diff --git a/docs/monaco/lib/client.js b/docs/monaco/lib/client.js index 477e96f1..c777f9e9 100644 --- a/docs/monaco/lib/client.js +++ b/docs/monaco/lib/client.js @@ -166,7 +166,9 @@ var lastValue = editor.getValue(); output_1.typecheck(lastValue, new URLSearchParams(window.location.search).getAll('arg')); var prog = surround(lastValue); console.log('evaluation', prog); -vm.eval(prog); +if (vm) { + vm.eval(prog); +} // install Monaco language client services monaco_languageclient_1.MonacoServices.install(editor); function startLanguageServer() { diff --git a/docs/monaco/lib/client.js.map b/docs/monaco/lib/client.js.map index e42695b3..670a3fc6 100644 --- a/docs/monaco/lib/client.js.map +++ b/docs/monaco/lib/client.js.map @@ -1 +1 @@ -{"version":3,"file":"client.js","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAA8C;AAC9C,+DAI+B;AAC/B,yCAAuC;AACvC,uDAA4D;AAE5D,mCAAsC;AAEtC,+BAAgC;AAChC,mCAAmC;AACnC,aAAa;AACb,wDAA2D;AAC3D,iFAAiF;AACjF,eAAQ,EAAE,CAAC;AAEX,IAAM,OAAO,GAAG,QAAQ,CAAC,cAAc,CAAC,QAAQ,CAAE,CAAC;AACnD,OAAO,CAAC,gBAAgB,CAAC,OAAO,EAAE,UAAC,CAAC;IAClC,uGAAuG;IACvG,wEAAwE;IACxE,+BAA+B;IAC/B,CAAC,CAAC,cAAc,EAAE,CAAC;AACrB,CAAC,CAAC,CAAC;AAEH,qBAAqB;AACrB,IAAM,IAAI,GAAG,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AAC3C,IAAM,YAAY,GAAG,IAAI;IACvB,CAAC,CAAC,kBAAkB,CAAC,IAAI,CAAC;IAC1B,CAAC,CAAC,+HASc,CAAC;AAEnB,uBAAuB;AACvB,IAAM,KAAK,GAAG,MAAM,CAAC,MAAM,CAAC,WAAW,CACrC,YAAY,EACZ,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B,IAAI,MAAM,EAAE;4BACV,kDAAkD;4BAClD,MAAM,CAAC,KAAK,EAAE,CAAC;4BACf,MAAM,GAAG,IAAI,CAAC;yBACf;wBACD,MAAM,GAAG,IAAI,CAAC;wBACd,iBAAiB,EAAE,CAAC;oBACtB,CAAC,CAAC;oBACU,qBAAM,qBAAY,CAAC,OAAO,EAAE,OAAO,CAAC,EAAA;;oBAAhD,CAAE,MAAM,GAAI,CAAA,SAAoC,CAAA,OAAxC,CAAyC,CAAC;oBAClD,mBAAmB,EAAE,CAAC;;;;;CACvB;AAED,UAAU,CAAC,EAAE,CAAC,YAAY,EAAE,UAAC,CAAM;IACjC,MAAM,GAAG,CAAC,CAAC;IAEX,IAAM,kBAAkB,GAAG,MAAM,CAAC,WAAW,CAAC,UAAC,GAAQ;QACrD,IAAM,OAAO,GAAG,MAAM,CAAC,iBAAiB,CAAC,GAAG,CAAC,CAAC;QAC9C,OAAO,CAAC,GAAG,CAAC,SAAS,GAAG,OAAO,CAAC,CAAC;QACjC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACvB,CAAC,EAAE,IAAI,CAAC,CAAC;IAET,MAAM,CAAC,EAAE,CAAC,SAAS,EAAE,UAAC,OAAe;QACnC,OAAO,CAAC,GAAG,CAAC,QAAQ,GAAG,OAAO,CAAC,CAAC;QAChC,MAAM,CAAC,KAAK,CACV,KAAK,EACL,IAAI,EACJ,CAAC,QAAQ,EAAE,QAAQ,CAAC,EACpB,CAAC,kBAAkB,EAAE,OAAO,CAAC,CAC9B,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEH,iBAAiB,EAAE,CAAC"} \ No newline at end of file diff --git a/docs/monaco/lib/main.bundle.js b/docs/monaco/lib/main.bundle.js index abc6c513..6d4c2897 100644 --- a/docs/monaco/lib/main.bundle.js +++ b/docs/monaco/lib/main.bundle.js @@ -1,3 +1,3 @@ /*! For license information please see main.bundle.js.LICENSE.txt */ -(()=>{var __webpack_modules__={5358:(e,t,n)=>{(e.exports=n(8826)(!1)).push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-builder-hidden {\n\tdisplay: none !important;\n}",""])},7461:(e,t,n)=>{(e.exports=n(8826)(!1)).push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-action-bar {\n\ttext-align: right;\n\toverflow: hidden;\n\twhite-space: nowrap;\n}\n\n.monaco-action-bar .actions-container {\n\tdisplay: flex;\n\tmargin: 0 auto;\n\tpadding: 0;\n\twidth: 100%;\n\tjustify-content: flex-end;\n}\n\n.monaco-action-bar.vertical .actions-container {\n\tdisplay: inline-block;\n}\n\n.monaco-action-bar.reverse .actions-container {\n\tflex-direction: row-reverse;\n}\n\n.monaco-action-bar .action-item {\n\tcursor: pointer;\n\tdisplay: inline-block;\n\t-ms-transition: -ms-transform 50ms ease;\n\t-webkit-transition: -webkit-transform 50ms ease;\n\t-moz-transition: -moz-transform 50ms ease;\n\t-o-transition: -o-transform 50ms ease;\n\ttransition: transform 50ms ease;\n\tposition: relative; /* DO NOT REMOVE - this is the key to preventing the ghosting icon bug in Chrome 42 */\n}\n\n.monaco-action-bar .action-item.disabled {\n\tcursor: default;\n}\n\n.monaco-action-bar.animated .action-item.active {\n\t-ms-transform: scale(1.272019649, 1.272019649); /* 1.272019649 = √φ */\n\t-webkit-transform: scale(1.272019649, 1.272019649);\n\t-moz-transform: scale(1.272019649, 1.272019649);\n\t-o-transform: scale(1.272019649, 1.272019649);\n\ttransform: scale(1.272019649, 1.272019649);\n}\n\n.monaco-action-bar .action-item .icon {\n\tdisplay: inline-block;\n}\n\n.monaco-action-bar .action-label {\n\tfont-size: 11px;\n\tmargin-right: 4px;\n}\n\n.monaco-action-bar .action-label.octicon {\n\tfont-size: 15px;\n\tline-height: 35px;\n\ttext-align: center;\n}\n\n.monaco-action-bar .action-item.disabled .action-label,\n.monaco-action-bar .action-item.disabled .action-label:hover {\n\topacity: 0.4;\n}\n\n/* Vertical actions */\n\n.monaco-action-bar.vertical {\n\ttext-align: left;\n}\n\n.monaco-action-bar.vertical .action-item {\n\tdisplay: block;\n}\n\n.monaco-action-bar.vertical .action-label.separator {\n\tdisplay: block;\n\tborder-bottom: 1px solid #bbb;\n\tpadding-top: 1px;\n\tmargin-left: .8em;\n\tmargin-right: .8em;\n}\n\n.monaco-action-bar.animated.vertical .action-item.active {\n\t-ms-transform: translate(5px, 0);\n\t-webkit-transform: translate(5px, 0);\n\t-moz-transform: translate(5px, 0);\n\t-o-transform: translate(5px, 0);\n\ttransform: translate(5px, 0);\n}\n\n.secondary-actions .monaco-action-bar .action-label {\n\tmargin-left: 6px;\n}\n\n/* Action Items */\n.monaco-action-bar .action-item.select-container {\n\toverflow: hidden; /* somehow the dropdown overflows its container, we prevent it here to not push */\n\tflex: 1;\n\tmax-width: 170px;\n\tmin-width: 60px;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n}",""])},6909:(e,t,n)=>{(e.exports=n(8826)(!1)).push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-aria-container {\n\tposition: absolute; /* try to hide from window but not from screen readers */\n\tleft:-999em;\n}",""])},7213:(e,t,n)=>{(e.exports=n(8826)(!1)).push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-custom-checkbox {\n\tmargin-left: 2px;\n\tfloat: left;\n\tcursor: pointer;\n\toverflow: hidden;\n\topacity: 0.7;\n\twidth: 20px;\n\theight: 20px;\n\tborder: 1px solid transparent;\n\tpadding: 1px;\n\n\t-webkit-box-sizing:\tborder-box;\n\t-o-box-sizing:\t\tborder-box;\n\t-moz-box-sizing:\tborder-box;\n\t-ms-box-sizing:\t\tborder-box;\n\tbox-sizing:\t\t\tborder-box;\n\n\t-webkit-user-select: none;\n\t-khtml-user-select: none;\n\t-moz-user-select: none;\n\t-o-user-select: none;\n\t-ms-user-select: none;\n\tuser-select: none;\n}\n\n.monaco-custom-checkbox:hover,\n.monaco-custom-checkbox.checked {\n\topacity: 1;\n}\n\n.hc-black .monaco-custom-checkbox {\n\tbackground: none;\n}\n\n.hc-black .monaco-custom-checkbox:hover {\n\tbackground: none;\n}",""])},5865:(e,t,n)=>{(e.exports=n(8826)(!1)).push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.context-view {\n\tposition: absolute;\n\tz-index: 2000;\n}",""])},7519:(e,t,n)=>{(e.exports=n(8826)(!1)).push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-count-badge {\n\tpadding: 0.3em 0.5em;\n\tborder-radius: 1em;\n\tfont-size: 85%;\n\tmin-width: 1.6em;\n\tline-height: 1em;\n\tfont-weight: normal;\n\ttext-align: center;\n\tdisplay: inline-block;\n\tbox-sizing: border-box;\n}",""])},7801:(e,t,n)=>{(e.exports=n(8826)(!1)).push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n/* ---------- Find input ---------- */\n\n.monaco-findInput {\n\tposition: relative;\n}\n\n.monaco-findInput .monaco-inputbox {\n\tfont-size: 13px;\n\twidth: 100%;\n\theight: 25px;\n}\n\n.monaco-findInput > .controls {\n\tposition: absolute;\n\ttop: 3px;\n\tright: 2px;\n}\n\n.vs .monaco-findInput.disabled {\n\tbackground-color: #E1E1E1;\n}\n\n/* Theming */\n.vs-dark .monaco-findInput.disabled {\n\tbackground-color: #333;\n}\n\n/* Highlighting */\n.monaco-findInput.highlight-0 .controls {\n\tanimation: monaco-findInput-highlight-0 100ms linear 0s;\n}\n.monaco-findInput.highlight-1 .controls {\n\tanimation: monaco-findInput-highlight-1 100ms linear 0s;\n}\n.hc-black .monaco-findInput.highlight-0 .controls,\n.vs-dark .monaco-findInput.highlight-0 .controls {\n\tanimation: monaco-findInput-highlight-dark-0 100ms linear 0s;\n}\n.hc-black .monaco-findInput.highlight-1 .controls,\n.vs-dark .monaco-findInput.highlight-1 .controls {\n\tanimation: monaco-findInput-highlight-dark-1 100ms linear 0s;\n}\n\n@keyframes monaco-findInput-highlight-0 {\n\t0% { background: rgba(253, 255, 0, 0.8); }\n\t100% { background: transparent; }\n}\n@keyframes monaco-findInput-highlight-1 {\n\t0% { background: rgba(253, 255, 0, 0.8); }\n\t/* Made intentionally different such that the CSS minifier does not collapse the two animations into a single one*/\n\t99% { background: transparent; }\n}\n\n@keyframes monaco-findInput-highlight-dark-0 {\n\t0% { background: rgba(255, 255, 255, 0.44); }\n\t100% { background: transparent; }\n}\n@keyframes monaco-findInput-highlight-dark-1 {\n\t0% { background: rgba(255, 255, 255, 0.44); }\n\t/* Made intentionally different such that the CSS minifier does not collapse the two animations into a single one*/\n\t99% { background: transparent; }\n}",""])},6930:(e,t,n)=>{(e.exports=n(8826)(!1)).push([e.id,'/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.vs .monaco-custom-checkbox.monaco-case-sensitive {\n\tbackground: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3d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A0NS42NjgtLjEzNXMuMzc4LS4yMTQuNTI0LS4zNzIuMjYxLS4zNDQuMzQzLS41NTcuMTIzLS40NDIuMTIzLS42ODh2LS42MDlsLTEuNDY1LjIwNXoiLz48L2c+PC9zdmc+") center center no-repeat;\n}\n.hc-black .monaco-custom-checkbox.monaco-case-sensitive,\n.hc-black .monaco-custom-checkbox.monaco-case-sensitive:hover,\n.vs-dark .monaco-custom-checkbox.monaco-case-sensitive {\n\tbackground: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+PHN0eWxlIHR5cGU9InRleHQvY3NzIj4uc3Qwe29wYWNpdHk6MDtmaWxsOiMyNjI2MjY7fSAuc3Qxe2ZpbGw6IzI2MjYyNjt9IC5zdDJ7ZmlsbDojQzVDNUM1O308L3N0eWxlPjxnIGlkPSJvdXRsaW5lIj48cmVjdCBjbGFzcz0ic3QwIiB3aWR0aD0iMTYiIGhlaWdodD0iMTYiLz48cGF0aCBjbGFzcz0ic3QxIiBkPSJNMTQuMTc2IDUuNTkyYy0uNTU1LS42LTEuMzM2LS45MDQtMi4zMjItLjkwNC0uMjU4IDAtLjUyMS4wMjQtLjc4NC4wNzItLjI0Ni4wNDQtLjQ3OS4xMDEtLjcuMTY5LS4yMjguMDctLjQzMi4xNDctLjYxMy4yMjktLjIyLjA5OS0uMzg5LjE5Ni0uNTEyLjI4NGwtLjQxOS4yOTl2Mi43MDFjLS4wODYuMTA4LS4xNjIuMjIzLS4yMjkuMzQ0bC0yLjQ1LTYuMzU0aC0yLjM5NGwtMy43NTMgOS44MDR2LjU5OGgzLjAyNWwuODM4LTIuMzVoMi4xNjdsLjg5MSAyLjM1aDMuMjM3bC0uMDAxLS4wMDNjLjMwNS4wOTIuNjMzLjE1Ljk5My4xNS4zNDQgMCAuNjcxLS4wNDkuOTc4LS4xNDZoMi44NTN2LTQuOTAzYy0uMDAxLS45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S0yLjc1M3oiLz48L2c+PC9zdmc+") center center no-repeat;\n}\n.hc-black .monaco-custom-checkbox.monaco-whole-word,\n.hc-black .monaco-custom-checkbox.monaco-whole-word:hover,\n.vs-dark .monaco-custom-checkbox.monaco-whole-word {\n\tbackground: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+PHN0eWxlIHR5cGU9InRleHQvY3NzIj4uc3Qwe29wYWNpdHk6MDtmaWxsOiMyNjI2MjY7fSAuc3Qxe2ZpbGw6IzI2MjYyNjt9IC5zdDJ7ZmlsbDojQzVDNUM1O308L3N0eWxlPjxnIGlkPSJvdXRsaW5lIj48cmVjdCBjbGFzcz0ic3QwIiB3aWR0aD0iMTYiIGhlaWdodD0iMTYiLz48cGF0aCBjbGFzcz0ic3QxIiBkPSJNMTYgNC4wMjJ2LTMuMDIyaC0xNi4wMTR2My4wMjJoMy4wNDZsLTMuMDQzIDcuOTQ1aC0uMDA0di4wMWwuMDE1IDEuMDIzaC0uMDE0djEuOTkxaDE2LjAxNHYtMy4wMjNoLTF2LTcuOTQ2aDF6bS01LjkxNCA1LjMwMWMwIC4yMzMtLjAyMy40NDEtLjA2Ni41OTUtLjA0Ny4xNjQtLjA5OS4yNDctLjEyNy4yODRsLS4wNzguMDY5LS4xNTEuMDI2LS4xMTUtLjAxNy0uMTM5LS4xMzdjLS4wMzEtLjA3OC0uMTEyLS4zMzItLjExMi0uNTY2IDAtLjI1NC4wOTEtLjU2MS4xMjYtLjY1NmwuMDY5LS4xNDEuMTA5LS4wODIuMTc4LS4wMjdjLjA3NyAwIC4xMTcuMDE0LjE3Ny4wNTZsLjA4Ny4xNzkuMDUxLjIzNy0uMDA5LjE4em0tMy42OTUtNS4zMDF2Mi44OTNsLTEuMTE2LTIuODkzaDEuMTE2em0tMy4wMjYgNy4wMmgxLjU3M2wuMzUxLjkyNmgtMi4yNTRsLjMz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Y4Miw3LjU1NCA0LjUxMyw4LjU2MSA1LjAxMyw5IDIsOSAyLDE0IDcsMTQgNywxMC43NDcgNy45NzgsMTEuNjA2IDguODIsOS43MjUgOS42NjEsMTEuNjAyIDEzLjE0NCw4LjU2MiAxMS45NjgsNy41NTQiLz48ZyBmaWxsPSIjNDI0MjQyIj48cGF0aCBkPSJNMTIuMzAxIDYuNTE4bC0yLjc3Mi4yNjIgMi4wODYgMS43ODgtMS41OTQgMS4zOTItMS4yMDEtMi42ODItMS4yMDEgMi42ODItMS41ODMtMS4zOTIgMi4wNzUtMS43ODgtMi43NzEtLjI2Mi42OTYtMi4xMjYgMi4zNTggMS4zOTItLjU5OS0yLjc4NGgyLjA1M2wtLjYwMiAyLjc4MyAyLjM1OS0xLjM5Mi42OTYgMi4xMjd6Ii8+PHJlY3QgeD0iMyIgeT0iMTAiIHdpZHRoPSIzIiBoZWlnaHQ9IjMiLz48L2c+PC9zdmc+") center center no-repeat;\n}\n.hc-black .monaco-custom-checkbox.monaco-regex,\n.hc-black .monaco-custom-checkbox.monaco-regex:hover,\n.vs-dark .monaco-custom-checkbox.monaco-regex {\n\tbackground: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+PHBvbHlnb24gZmlsbD0iIzJkMmQzMCIgcG9pbnRzPSIxMy42NCw3LjM5NiAxMi4xNjksMi44OTggMTAuNzA2LDMuNzYxIDExLjA4NywyIDYuNTU3LDIgNi45MzYsMy43NjIgNS40NzMsMi44OTggNCw3LjM5NiA1LjY4Miw3LjU1NCA0LjUxMyw4LjU2MSA1LjAxMyw5IDIsOSAyLDE0IDcsMTQgNywxMC43NDcgNy45NzgsMTEuNjA2IDguODIsOS43MjUgOS42NjEsMTEuNjAyIDEzLjE0NCw4LjU2MiAxMS45NjgsNy41NTQiLz48ZyBmaWxsPSIjQzVDNUM1Ij48cGF0aCBkPSJNMTIuMzAxIDYuNTE4bC0yLjc3Mi4yNjIgMi4wODYgMS43ODgtMS41OTQgMS4zOTItMS4yMDEtMi42ODItMS4yMDEgMi42ODItMS41ODMtMS4zOTIgMi4wNzUtMS43ODgtMi43NzEtLjI2Mi42OTYtMi4xMjYgMi4zNTggMS4zOTItLjU5OS0yLjc4NGgyLjA1M2wtLjYwMiAyLjc4MyAyLjM1OS0xLjM5Mi42OTYgMi4xMjd6Ii8+PHJlY3QgeD0iMyIgeT0iMTAiIHdpZHRoPSIzIiBoZWlnaHQ9IjMiLz48L2c+PC9zdmc+") center center no-repeat;\n}\n',""])},8197:(e,t,n)=>{(e.exports=n(8826)(!1)).push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n/* ---------- Icon label ---------- */\n\n.monaco-icon-label {\n\tdisplay: flex; /* required for icons support :before rule */\n\toverflow: hidden;\n\ttext-overflow: ellipsis;\n}\n\n.monaco-icon-label::before {\n\n\t/* svg icons rendered as background image */\n\tbackground-size: 16px;\n\tbackground-position: left center;\n\tbackground-repeat: no-repeat;\n\tpadding-right: 6px;\n\twidth: 16px;\n\theight: 22px;\n\tdisplay: inline-block;\n\n\t/* fonts icons */\n\t-webkit-font-smoothing: antialiased;\n\tvertical-align: top;\n\n\tflex-shrink: 0; /* fix for https://github.com/Microsoft/vscode/issues/13787 */\n}\n\n.monaco-icon-label > .monaco-icon-label-description-container {\n\toverflow: hidden; /* this causes the label/description to shrink first if decorations are enabled */\n\ttext-overflow: ellipsis;\n}\n\n.monaco-icon-label > .monaco-icon-label-description-container > .label-name {\n\tcolor: inherit;\n\twhite-space: pre; /* enable to show labels that include multiple whitespaces */\n}\n\n.monaco-icon-label > .monaco-icon-label-description-container > .label-description {\n\tmargin-left: 0.5em;\n\tfont-size: 0.9em;\n\twhite-space: pre; /* enable to show labels that include multiple whitespaces */\n}\n\n.monaco-icon-label.italic > .monaco-icon-label-description-container > .label-name,\n.monaco-icon-label.italic > .monaco-icon-label-description-container > .label-description {\n\tfont-style: italic;\n}\n\n.monaco-icon-label::after {\n\topacity: 0.75;\n\tfont-size: 90%;\n\tfont-weight: 600;\n\tpadding: 0 12px 0 5px;\n\tmargin-left: auto;\n\ttext-align: center;\n}\n\n/* make sure selection color wins when a label is being selected */\n.monaco-tree.focused .selected .monaco-icon-label, /* tree */\n.monaco-tree.focused .selected .monaco-icon-label::after,\n.monaco-list:focus .selected .monaco-icon-label, /* list */\n.monaco-list:focus .selected .monaco-icon-label::after\n{\n\tcolor: inherit !important;\n}\n",""])},8757:(e,t,n)=>{(e.exports=n(8826)(!1)).push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-inputbox {\n\tposition: relative;\n\tdisplay: block;\n\tpadding: 0;\n\t-webkit-box-sizing:\tborder-box;\n\t-o-box-sizing:\t\tborder-box;\n\t-moz-box-sizing:\tborder-box;\n\t-ms-box-sizing:\t\tborder-box;\n\tbox-sizing:\t\t\tborder-box;\n\tline-height: auto !important;\n\n\t/* Customizable */\n\tfont-size: inherit;\n}\n\n.monaco-inputbox.idle {\n\tborder: 1px solid transparent;\n}\n\n.monaco-inputbox > .wrapper > .input,\n.monaco-inputbox > .wrapper > .mirror {\n\n\t/* Customizable */\n\tpadding: 4px;\n}\n\n.monaco-inputbox > .wrapper {\n\tposition: relative;\n\twidth: 100%;\n\theight: 100%;\n}\n\n.monaco-inputbox > .wrapper > .input {\n\tdisplay: inline-block;\n\t-webkit-box-sizing:\tborder-box;\n\t-o-box-sizing:\t\tborder-box;\n\t-moz-box-sizing:\tborder-box;\n\t-ms-box-sizing:\t\tborder-box;\n\tbox-sizing:\t\t\tborder-box;\n\twidth: 100%;\n\theight: 100%;\n\tline-height: inherit;\n\tborder: none;\n\tfont-family: inherit;\n\tfont-size: inherit;\n\tresize: none;\n\tcolor: inherit;\n}\n\n.monaco-inputbox > .wrapper > input {\n\ttext-overflow: ellipsis;\n}\n\n.monaco-inputbox > .wrapper > textarea.input {\n\tdisplay: block;\n\toverflow: hidden;\n}\n\n.monaco-inputbox > .wrapper > .mirror {\n\tposition: absolute;\n\tdisplay: inline-block;\n\twidth: 100%;\n\ttop: 0;\n\tleft: 0;\n\t-webkit-box-sizing:\tborder-box;\n\t-o-box-sizing:\t\tborder-box;\n\t-moz-box-sizing:\tborder-box;\n\t-ms-box-sizing:\t\tborder-box;\n\tbox-sizing:\t\t\tborder-box;\n\twhite-space: pre-wrap;\n\tvisibility: hidden;\n\tmin-height: 26px;\n\tword-wrap: break-word;\n}\n\n/* Context view */\n\n.monaco-inputbox-container {\n\ttext-align: right;\n}\n\n.monaco-inputbox-container .monaco-inputbox-message {\n\tdisplay: inline-block;\n\toverflow: hidden;\n\ttext-align: left;\n\twidth: 100%;\n\t-webkit-box-sizing:\tborder-box;\n\t-o-box-sizing:\t\tborder-box;\n\t-moz-box-sizing:\tborder-box;\n\t-ms-box-sizing:\t\tborder-box;\n\tbox-sizing:\t\t\tborder-box;\n\tpadding: 0.4em;\n\tfont-size: 12px;\n\tline-height: 17px;\n\tmin-height: 34px;\n\tmargin-top: -1px;\n\tword-wrap: break-word;\n}\n\n/* Action bar support */\n.monaco-inputbox .monaco-action-bar {\n\tposition: absolute;\n\tright: 2px;\n\ttop: 4px;\n}\n\n.monaco-inputbox .monaco-action-bar .action-item {\n\tmargin-left: 2px;\n}\n\n.monaco-inputbox .monaco-action-bar .action-item .icon {\n\tbackground-repeat: no-repeat;\n\twidth: 16px;\n\theight: 16px;\n}",""])},8389:(e,t,n)=>{(e.exports=n(8826)(!1)).push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-keybinding {\n\tdisplay: flex;\n\talign-items: center;\n\tline-height: 10px;\n}\n\n.monaco-keybinding > .monaco-keybinding-key {\n\tdisplay: inline-block;\n\tborder: solid 1px rgba(204, 204, 204, 0.4);\n\tborder-bottom-color: rgba(187, 187, 187, 0.4);\n\tborder-radius: 3px;\n\tbox-shadow: inset 0 -1px 0 rgba(187, 187, 187, 0.4);\n\tbackground-color: rgba(221, 221, 221, 0.4);\n\tvertical-align: middle;\n\tcolor: #555;\n\tfont-size: 11px;\n\tpadding: 3px 5px;\n}\n\n.hc-black .monaco-keybinding > .monaco-keybinding-key,\n.vs-dark .monaco-keybinding > .monaco-keybinding-key {\n\tbackground-color: rgba(128, 128, 128, 0.17);\n\tcolor: #ccc;\n\tborder: solid 1px rgba(51, 51, 51, 0.6);\n\tborder-bottom-color: rgba(68, 68, 68, 0.6);\n\tbox-shadow: inset 0 -1px 0 rgba(68, 68, 68, 0.6);\n}\n\n.monaco-keybinding > .monaco-keybinding-key-separator {\n\tdisplay: inline-block;\n}\n\n.monaco-keybinding > .monaco-keybinding-key-chord-separator {\n\twidth: 2px;\n}",""])},5799:(e,t,n)=>{(e.exports=n(8826)(!1)).push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-list {\n\tposition: relative;\n\theight: 100%;\n\twidth: 100%;\n\twhite-space: nowrap;\n\t-webkit-user-select: none;\n\t-khtml-user-select: none;\n\t-moz-user-select: -moz-none;\n\t-ms-user-select: none;\n\t-o-user-select: none;\n\tuser-select: none;\n}\n\n.monaco-list > .monaco-scrollable-element {\n\theight: 100%;\n}\n\n.monaco-list-rows {\n\tposition: relative;\n\twidth: 100%;\n\theight: 100%;\n}\n\n.monaco-list-row {\n\tposition: absolute;\n\t-moz-box-sizing:\tborder-box;\n\t-o-box-sizing:\t\tborder-box;\n\t-ms-box-sizing:\t\tborder-box;\n\tbox-sizing:\t\t\tborder-box;\n\tcursor: pointer;\n\toverflow: hidden;\n\twidth: 100%;\n\ttouch-action: none;\n}\n\n/* for OS X ballistic scrolling */\n.monaco-list-row.scrolling {\n\tdisplay: none !important;\n}\n\n/* Focus */\n.monaco-list.element-focused, .monaco-list.selection-single, .monaco-list.selection-multiple {\n\toutline: 0 !important;\n}",""])},5245:(e,t,n)=>{(e.exports=n(8826)(!1)).push([e.id,'/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-menu .monaco-action-bar.vertical {\n\tmargin-left: 0;\n\toverflow: visible;\n}\n\n.monaco-menu .monaco-action-bar.vertical .actions-container {\n\tdisplay: block;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item {\n\tpadding: 0;\n\t-ms-transform: none;\n\t-webkit-transform: none;\n\t-moz-transform: none;\n\t-o-transform: none;\n\ttransform: none;\n\tdisplay: -ms-flexbox;\n\tdisplay: flex;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item.active {\n\t-ms-transform: none;\n\t-webkit-transform: none;\n\t-moz-transform: none;\n\t-o-transform: none;\n\ttransform: none;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item.focused {\n\tbackground-color: #E4E4E4;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-menu-item {\n\t-ms-flex: 1 1 auto;\n\tflex: 1 1 auto;\n\tdisplay: -ms-flexbox;\n\tdisplay: flex;\n\theight: 2em;\n\talign-items: center;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label {\n\t-ms-flex: 1 1 auto;\n\tflex: 1 1 auto;\n\ttext-decoration: none;\n\tpadding: 0 1em;\n\tbackground: none;\n\tfont-size: 12px;\n\tline-height: 1;\n}\n\n.monaco-menu .monaco-action-bar.vertical .keybinding,\n.monaco-menu .monaco-action-bar.vertical .submenu-indicator {\n\tdisplay: inline-block;\n\t-ms-flex: 2 1 auto;\n\tflex: 2 1 auto;\n\tpadding: 0 1em;\n\ttext-align: right;\n\tfont-size: 12px;\n\tline-height: 1;\n}\n\n\n.monaco-menu .monaco-action-bar.vertical .action-item.disabled .keybinding,\n.monaco-menu .monaco-action-bar.vertical .action-item.disabled .submenu-indicator {\n\topacity: 0.4;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label:not(.separator) {\n\tdisplay: inline-block;\n\t-webkit-box-sizing:\tborder-box;\n\t-o-box-sizing:\t\tborder-box;\n\t-moz-box-sizing:\tborder-box;\n\t-ms-box-sizing:\t\tborder-box;\n\tbox-sizing:\t\t\tborder-box;\n\tmargin: 0;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label.separator {\n\tpadding: 0.5em 0 0 0;\n\tmargin-bottom: 0.5em;\n\twidth: 100%;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label.separator.text {\n\tpadding: 0.7em 1em 0.1em 1em;\n\tfont-weight: bold;\n\topacity: 1;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label:hover {\n\tcolor: inherit;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label.checked:after {\n\tcontent: \' \\2713\';\n}\n\n/* Context Menu */\n\n.context-view.monaco-menu-container {\n\tfont-family: "Segoe WPC", "Segoe UI", ".SFNSDisplay-Light", "SFUIText-Light", "HelveticaNeue-Light", sans-serif, "Droid Sans Fallback";\n\toutline: 0;\n\tbox-shadow: 0 2px 8px #A8A8A8;\n\tborder: none;\n\tcolor: #646465;\n\tbackground-color: white;\n\t-webkit-animation: fadeIn 0.083s linear;\n\t-o-animation: fadeIn 0.083s linear;\n\t-moz-animation: fadeIn 0.083s linear;\n\t-ms-animation: fadeIn 0.083s linear;\n\tanimation: fadeIn 0.083s linear;\n}\n\n.context-view.monaco-menu-container :focus,\n.context-view.monaco-menu-container .monaco-action-bar.vertical:focus,\n.context-view.monaco-menu-container .monaco-action-bar.vertical :focus {\n\toutline: 0;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item {\n\tborder: 1px solid transparent; /* prevents jumping behaviour on hover or focus */\n}\n\n/* Dark theme */\n.vs-dark .monaco-menu .monaco-action-bar.vertical .action-item.focused {\n\tbackground-color: #4B4C4D;\n}\n\n.vs-dark .context-view.monaco-menu-container {\n\tbox-shadow: 0 2px 8px #000;\n\tcolor: #BBB;\n\tbackground-color: #2D2F31;\n}\n\n/* High Contrast Theming */\n.hc-black .context-view.monaco-menu-container {\n\tborder: 2px solid #6FC3DF;\n\tcolor: white;\n\tbackground-color: #0C141F;\n\tbox-shadow: none;\n}\n\n.hc-black .monaco-menu .monaco-action-bar.vertical .action-item.focused {\n\tbackground: none;\n\tborder: 1px dotted #f38518;\n}',""])},6953:(e,t,n)=>{(e.exports=n(8826)(!1)).push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-progress-container {\n\twidth: 100%;\n\theight: 5px;\n\toverflow: hidden; /* keep progress bit in bounds */\n}\n\n.monaco-progress-container .progress-bit {\n\twidth: 2%;\n\theight: 5px;\n\tposition: absolute;\n\tleft: 0;\n\tdisplay: none;\n}\n\n.monaco-progress-container.active .progress-bit {\n\tdisplay: inherit;\n}\n\n.monaco-progress-container.discrete .progress-bit {\n\tleft: 0;\n\ttransition: width 100ms linear;\n\t-webkit-transition: width 100ms linear;\n\t-o-transition: width 100ms linear;\n\t-moz-transition: width 100ms linear;\n\t-ms-transition: width 100ms linear;\n}\n\n.monaco-progress-container.discrete.done .progress-bit {\n\twidth: 100%;\n}\n\n.monaco-progress-container.infinite .progress-bit {\n\tanimation-name: progress;\n\tanimation-duration: 4s;\n\tanimation-iteration-count: infinite;\n\tanimation-timing-function: linear;\n\t-ms-animation-name: progress;\n\t-ms-animation-duration: 4s;\n\t-ms-animation-iteration-count: infinite;\n\t-ms-animation-timing-function: linear;\n\t-webkit-animation-name: progress;\n\t-webkit-animation-duration: 4s;\n\t-webkit-animation-iteration-count: infinite;\n\t-webkit-animation-timing-function: linear;\n\t-moz-animation-name: progress;\n\t-moz-animation-duration: 4s;\n\t-moz-animation-iteration-count: infinite;\n\t-moz-animation-timing-function: linear;\n\twill-change: transform;\n}\n\n/**\n * The progress bit has a width: 2% (1/50) of the parent container. The animation moves it from 0% to 100% of\n * that container. Since translateX is relative to the progress bit size, we have to multiple it with\n * its relative size to the parent container:\n * 50%: 50 * 50 = 2500%\n * 100%: 50 * 100 - 50 (do not overflow): 4950%\n */\n@keyframes progress { from { transform: translateX(0%) scaleX(1) } 50% { transform: translateX(2500%) scaleX(3) } to { transform: translateX(4950%) scaleX(1) } }\n@-ms-keyframes progress { from { transform: translateX(0%) scaleX(1) }\t50% { transform: translateX(2500%) scaleX(3) } to { transform: translateX(4950%) scaleX(1) } }\n@-webkit-keyframes progress { from { transform: translateX(0%) scaleX(1) }\t50% { transform: translateX(2500%) scaleX(3) } to { transform: translateX(4950%) scaleX(1) } }\n@-moz-keyframes progress { from { transform: translateX(0%) scaleX(1) }\t50% { transform: translateX(2500%) scaleX(3) } to { transform: translateX(4950%) scaleX(1) } }",""])},297:(e,t,n)=>{(e.exports=n(8826)(!1)).push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-sash {\n\tposition: absolute;\n\tz-index: 90;\n\ttouch-action: none;\n}\n\n.monaco-sash.disabled {\n\tpointer-events: none;\n}\n\n.monaco-sash.vertical {\n\tcursor: ew-resize;\n\ttop: 0;\n\twidth: 4px;\n\theight: 100%;\n}\n\n.monaco-sash.mac.vertical {\n\tcursor: col-resize;\n}\n\n.monaco-sash.vertical.minimum {\n\tcursor: e-resize;\n}\n\n.monaco-sash.vertical.maximum {\n\tcursor: w-resize;\n}\n\n.monaco-sash.horizontal {\n\tcursor: ns-resize;\n\tleft: 0;\n\twidth: 100%;\n\theight: 4px;\n}\n\n.monaco-sash.mac.horizontal {\n\tcursor: row-resize;\n}\n\n.monaco-sash.horizontal.minimum {\n\tcursor: s-resize;\n}\n\n.monaco-sash.horizontal.maximum {\n\tcursor: n-resize;\n}\n\n.monaco-sash:not(.disabled).orthogonal-start::before,\n.monaco-sash:not(.disabled).orthogonal-end::after {\n\tcontent: ' ';\n\theight: 8px;\n\twidth: 8px;\n\tz-index: 100;\n\tdisplay: block;\n\tcursor: all-scroll;\n\tposition: absolute;\n}\n\n.monaco-sash.orthogonal-start.vertical::before {\n\tleft: -2px;\n\ttop: -4px;\n}\n\n.monaco-sash.orthogonal-end.vertical::after {\n\tleft: -2px;\n\tbottom: -4px;\n}\n\n.monaco-sash.orthogonal-start.horizontal::before {\n\ttop: -2px;\n\tleft: -4px;\n}\n\n.monaco-sash.orthogonal-end.horizontal::after {\n\ttop: -2px;\n\tright: -4px;\n}\n\n.monaco-sash.disabled {\n\tcursor: default !important;\n}\n\n/** Touch **/\n\n.monaco-sash.touch.vertical {\n\twidth: 20px;\n}\n\n.monaco-sash.touch.horizontal {\n\theight: 20px;\n}\n\n/** Debug **/\n\n.monaco-sash.debug:not(.disabled) {\n\tbackground: cyan;\n}\n\n.monaco-sash.debug:not(.disabled).orthogonal-start::before,\n.monaco-sash.debug:not(.disabled).orthogonal-end::after {\n\tbackground: red;\n}",""])},9453:(e,t,n)=>{(e.exports=n(8826)(!1)).push([e.id,'/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n/* Arrows */\n.monaco-scrollable-element > .scrollbar > .up-arrow {\n\tbackground: url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMTEgMTEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0ibTkuNDgwNDYsOC45NjE1bDEuMjYsLTEuMjZsLTUuMDQsLTUuMDRsLTUuNDYsNS4wNGwxLjI2LDEuMjZsNC4yLC0zLjc4bDMuNzgsMy43OHoiIGZpbGw9IiM0MjQyNDIiLz48L3N2Zz4=");\n\tcursor: pointer;\n}\n.monaco-scrollable-element > .scrollbar > .down-arrow {\n\tbackground: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMSAxMSI+PHBhdGggdHJhbnNmb3JtPSJyb3RhdGUoLTE4MCA1LjQ5MDQ1OTkxODk3NTgzLDUuODExNTAwMDcyNDc5MjQ4KSIgZmlsbD0iIzQyNDI0MiIgZD0ibTkuNDgwNDYsOC45NjE1bDEuMjYsLTEuMjZsLTUuMDQsLTUuMDRsLTUuNDYsNS4wNGwxLjI2LDEuMjZsNC4yLC0zLjc4bDMuNzgsMy43OHoiLz48L3N2Zz4=");\n\tcursor: pointer;\n}\n.monaco-scrollable-element > .scrollbar > .left-arrow {\n\tbackground: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMSAxMSI+PHBhdGggdHJhbnNmb3JtPSJyb3RhdGUoLTkwIDUuNDkwNDU5OTE4OTc1ODMxLDUuNDMxMzgyMTc5MjYwMjU0KSIgZmlsbD0iIzQyNDI0MiIgZD0ibTkuNDgwNDYsOC41ODEzOGwxLjI2LC0xLjI2bC01LjA0LC01LjA0bC01LjQ2LDUuMDRsMS4yNiwxLjI2bDQuMiwtMy43OGwzLjc4LDMuNzh6Ii8+PC9zdmc+");\n\tcursor: pointer;\n}\n.monaco-scrollable-element > .scrollbar > .right-arrow {\n\tbackground: url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMTEgMTEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggdHJhbnNmb3JtPSJyb3RhdGUoOTAgNS42MTcxNjUwODg2NTM1NjQ1LDUuNTU4MDg5NzMzMTIzNzgpICIgZmlsbD0iIzQyNDI0MiIgZD0ibTkuNjA3MTcsOC43MDgwOWwxLjI2LC0xLjI2bC01LjA0LC01LjA0bC01LjQ2LDUuMDRsMS4yNiwxLjI2bDQuMiwtMy43OGwzLjc4LDMuNzh6Ii8+PC9zdmc+");\n\tcursor: pointer;\n}\n\n.hc-black .monaco-scrollable-element > .scrollbar > .up-arrow,\n.vs-dark .monaco-scrollable-element > .scrollbar > .up-arrow {\n\tbackground: url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMTEgMTEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0ibTkuNDgwNDYsOC45NjE1bDEuMjYsLTEuMjZsLTUuMDQsLTUuMDRsLTUuNDYsNS4wNGwxLjI2LDEuMjZsNC4yLC0zLjc4bDMuNzgsMy43OHoiIGZpbGw9IiNFOEU4RTgiLz48L3N2Zz4=");\n}\n.hc-black .monaco-scrollable-element > .scrollbar > .down-arrow,\n.vs-dark .monaco-scrollable-element > .scrollbar > .down-arrow {\n\tbackground: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMSAxMSI+PHBhdGggdHJhbnNmb3JtPSJyb3RhdGUoLTE4MCA1LjQ5MDQ1OTkxODk3NTgzLDUuODExNTAwMDcyNDc5MjQ4KSIgZmlsbD0iI0U4RThFOCIgZD0ibTkuNDgwNDYsOC45NjE1bDEuMjYsLTEuMjZsLTUuMDQsLTUuMDRsLTUuNDYsNS4wNGwxLjI2LDEuMjZsNC4yLC0zLjc4bDMuNzgsMy43OHoiLz48L3N2Zz4=");\n}\n.hc-black .monaco-scrollable-element > .scrollbar > .left-arrow,\n.vs-dark .monaco-scrollable-element > .scrollbar > .left-arrow {\n\tbackground: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMSAxMSI+PHBhdGggdHJhbnNmb3JtPSJyb3RhdGUoLTkwIDUuNDkwNDU5OTE4OTc1ODMxLDUuNDMxMzgyMTc5MjYwMjU0KSIgZmlsbD0iI0U4RThFOCIgZD0ibTkuNDgwNDYsOC41ODEzOGwxLjI2LC0xLjI2bC01LjA0LC01LjA0bC01LjQ2LDUuMDRsMS4yNiwxLjI2bDQuMiwtMy43OGwzLjc4LDMuNzh6Ii8+PC9zdmc+");\n}\n.hc-black .monaco-scrollable-element > .scrollbar > .right-arrow,\n.vs-dark .monaco-scrollable-element > .scrollbar > .right-arrow {\n\tbackground: url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMTEgMTEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggdHJhbnNmb3JtPSJyb3RhdGUoOTAgNS42MTcxNjUwODg2NTM1NjQ1LDUuNTU4MDg5NzMzMTIzNzgpICIgZmlsbD0iI0U4RThFOCIgZD0ibTkuNjA3MTcsOC43MDgwOWwxLjI2LC0xLjI2bC01LjA0LC01LjA0bC01LjQ2LDUuMDRsMS4yNiwxLjI2bDQuMiwtMy43OGwzLjc4LDMuNzh6Ii8+PC9zdmc+");\n}\n\n.monaco-scrollable-element > .visible {\n\topacity: 1;\n\n\t/* Background rule added for IE9 - to allow clicks on dom node */\n\tbackground:rgba(0,0,0,0);\n\n\t-webkit-transition: opacity 100ms linear;\n\t-o-transition: opacity 100ms linear;\n\t-moz-transition: opacity 100ms linear;\n\t-ms-transition: opacity 100ms linear;\n\ttransition: opacity 100ms linear;\n}\n.monaco-scrollable-element > .invisible {\n\topacity: 0;\n\tpointer-events: none;\n}\n.monaco-scrollable-element > .invisible.fade {\n\t-webkit-transition: opacity 800ms linear;\n\t-o-transition: opacity 800ms linear;\n\t-moz-transition: opacity 800ms linear;\n\t-ms-transition: opacity 800ms linear;\n\ttransition: opacity 800ms linear;\n}\n\n/* Scrollable Content Inset Shadow */\n.monaco-scrollable-element > .shadow {\n\tposition: absolute;\n\tdisplay: none;\n}\n.monaco-scrollable-element > .shadow.top {\n\tdisplay: block;\n\ttop: 0;\n\tleft: 3px;\n\theight: 3px;\n\twidth: 100%;\n\tbox-shadow: #DDD 0 6px 6px -6px inset;\n}\n.monaco-scrollable-element > .shadow.left {\n\tdisplay: block;\n\ttop: 3px;\n\tleft: 0;\n\theight: 100%;\n\twidth: 3px;\n\tbox-shadow: #DDD 6px 0 6px -6px inset;\n}\n.monaco-scrollable-element > .shadow.top-left-corner {\n\tdisplay: block;\n\ttop: 0;\n\tleft: 0;\n\theight: 3px;\n\twidth: 3px;\n}\n.monaco-scrollable-element > .shadow.top.left {\n\tbox-shadow: #DDD 6px 6px 6px -6px inset;\n}\n\n/* ---------- Default Style ---------- */\n\n.vs .monaco-scrollable-element > .scrollbar > .slider {\n\tbackground: rgba(100, 100, 100, .4);\n}\n.vs-dark .monaco-scrollable-element > .scrollbar > .slider {\n\tbackground: rgba(121, 121, 121, .4);\n}\n.hc-black .monaco-scrollable-element > .scrollbar > .slider {\n\tbackground: rgba(111, 195, 223, .6);\n}\n\n.monaco-scrollable-element > .scrollbar > .slider:hover {\n\tbackground: rgba(100, 100, 100, .7);\n}\n.hc-black .monaco-scrollable-element > .scrollbar > .slider:hover {\n\tbackground: rgba(111, 195, 223, .8);\n}\n\n.monaco-scrollable-element > .scrollbar > .slider.active {\n\tbackground: rgba(0, 0, 0, .6);\n}\n.vs-dark .monaco-scrollable-element > .scrollbar > .slider.active {\n\tbackground: rgba(191, 191, 191, .4);\n}\n.hc-black .monaco-scrollable-element > .scrollbar > .slider.active {\n\tbackground: rgba(111, 195, 223, 1);\n}\n\n.vs-dark .monaco-scrollable-element .shadow.top {\n\tbox-shadow: none;\n}\n\n.vs-dark .monaco-scrollable-element .shadow.left {\n\tbox-shadow: #000 6px 0 6px -6px inset;\n}\n\n.vs-dark .monaco-scrollable-element .shadow.top.left {\n\tbox-shadow: #000 6px 6px 6px -6px inset;\n}\n\n.hc-black .monaco-scrollable-element .shadow.top {\n\tbox-shadow: none;\n}\n\n.hc-black .monaco-scrollable-element .shadow.left {\n\tbox-shadow: none;\n}\n\n.hc-black .monaco-scrollable-element .shadow.top.left {\n\tbox-shadow: none;\n}',""])},6565:(e,t,n)=>{(e.exports=n(8826)(!1)).push([e.id,'/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-quick-open-widget {\n\tposition: absolute;\n\twidth: 600px;\n\tz-index: 2000;\n\tpadding-bottom: 6px;\n\tleft: 50%;\n\tmargin-left: -300px;\n}\n\n.monaco-quick-open-widget .monaco-progress-container {\n\tposition: absolute;\n\tleft: 0;\n\ttop: 38px;\n\tz-index: 1;\n\theight: 2px;\n}\n\n.monaco-quick-open-widget .monaco-progress-container .progress-bit {\n\theight: 2px;\n}\n\n.monaco-quick-open-widget .quick-open-input {\n\twidth: 588px;\n\tborder: none;\n\tmargin: 6px;\n}\n\n.monaco-quick-open-widget .quick-open-input .monaco-inputbox {\n\twidth: 100%;\n\theight: 25px;\n}\n\n.monaco-quick-open-widget .quick-open-result-count {\n\tposition: absolute;\n\tleft: -10000px;\n}\n\n.monaco-quick-open-widget .quick-open-tree {\n\tline-height: 22px;\n}\n\n.monaco-quick-open-widget .quick-open-tree .monaco-tree-row > .content > .sub-content {\n\toverflow: hidden;\n}\n\n.monaco-quick-open-widget.content-changing .quick-open-tree .monaco-scrollable-element .slider {\n\tdisplay: none; /* scrollbar slider causes some hectic updates when input changes quickly, so hide it while quick open changes */\n}\n\n.monaco-quick-open-widget .quick-open-tree .quick-open-entry {\n\toverflow: hidden;\n\ttext-overflow: ellipsis;\n\tdisplay: flex;\n\tflex-direction: column;\n\theight: 100%;\n}\n\n.monaco-quick-open-widget .quick-open-tree .quick-open-entry > .quick-open-row {\n\tdisplay: flex;\n\talign-items: center;\n}\n\n.monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon {\n\toverflow: hidden;\n\twidth: 16px;\n\theight: 16px;\n\tmargin-right: 4px;\n\tdisplay: inline-block;\n\tvertical-align: middle;\n\tflex-shrink: 0;\n}\n\n.monaco-quick-open-widget .quick-open-tree .monaco-icon-label,\n.monaco-quick-open-widget .quick-open-tree .monaco-icon-label .monaco-icon-label-description-container {\n\tflex: 1; /* make sure the icon label grows within the row */\n}\n\n.monaco-quick-open-widget .quick-open-tree .quick-open-entry .monaco-highlighted-label span {\n\topacity: 1;\n}\n\n.monaco-quick-open-widget .quick-open-tree .quick-open-entry-meta {\n\topacity: 0.7;\n\tline-height: normal;\n}\n\n.monaco-quick-open-widget .quick-open-tree .content.has-group-label .quick-open-entry-keybinding {\n\tmargin-right: 8px;\n}\n\n.monaco-quick-open-widget .quick-open-tree .quick-open-entry-keybinding .monaco-keybinding-key {\n\tvertical-align: text-bottom;\n}\n\n.monaco-quick-open-widget .quick-open-tree .results-group {\n\tmargin-right: 18px;\n}\n\n.monaco-quick-open-widget .quick-open-tree .monaco-tree-row.focused > .content.has-actions > .results-group,\n.monaco-quick-open-widget .quick-open-tree .monaco-tree-row:hover:not(.highlighted) > .content.has-actions > .results-group,\n.monaco-quick-open-widget .quick-open-tree .focused .monaco-tree-row.focused > .content.has-actions > .results-group {\n\tmargin-right: 0px;\n}\n\n.monaco-quick-open-widget .quick-open-tree .results-group-separator {\n\tborder-top-width: 1px;\n\tborder-top-style: solid;\n\tbox-sizing: border-box;\n\tmargin-left: -11px;\n\tpadding-left: 11px;\n}\n\n/* Actions in Quick Open Items */\n\n.monaco-tree .monaco-tree-row > .content.actions {\n\tposition: relative;\n\tdisplay: flex;\n}\n\n.monaco-tree .monaco-tree-row > .content.actions > .sub-content {\n\tflex: 1;\n}\n\n.monaco-tree .monaco-tree-row > .content.actions .action-item {\n\tmargin: 0;\n}\n\n.monaco-tree .monaco-tree-row > .content.actions > .primary-action-bar {\n\tline-height: 22px;\n}\n\n.monaco-tree .monaco-tree-row > .content.actions > .primary-action-bar {\n\tdisplay: none;\n\tpadding: 0 0.8em 0 0.4em;\n}\n\n.monaco-tree .monaco-tree-row.focused > .content.has-actions > .primary-action-bar {\n\twidth: 0; /* in order to support a11y with keyboard, we use width: 0 to hide the actions, which still allows to "Tab" into the actions */\n\tdisplay: block;\n}\n\n.monaco-tree .monaco-tree-row:hover:not(.highlighted) > .content.has-actions > .primary-action-bar,\n.monaco-tree.focused .monaco-tree-row.focused > .content.has-actions > .primary-action-bar,\n.monaco-tree .monaco-tree-row > .content.has-actions.more > .primary-action-bar {\n\twidth: inherit;\n\tdisplay: block;\n}\n\n.monaco-tree .monaco-tree-row > .content.actions > .primary-action-bar .action-label {\n\tmargin-right: 0.4em;\n\tmargin-top: 4px;\n\tbackground-repeat: no-repeat;\n\twidth: 16px;\n\theight: 16px;\n}\n\n.monaco-quick-open-widget .quick-open-tree .monaco-highlighted-label .highlight {\n\tfont-weight: bold;\n}',""])},7653:(e,t,n)=>{(e.exports=n(8826)(!1)).push([e.id,'/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n.monaco-tree {\n\theight: 100%;\n\twidth: 100%;\n\twhite-space: nowrap;\n\t-webkit-user-select: none;\n\t-khtml-user-select: none;\n\t-moz-user-select: -moz-none;\n\t-ms-user-select: none;\n\t-o-user-select: none;\n\tuser-select: none;\n\tposition: relative;\n}\n\n.monaco-tree > .monaco-scrollable-element {\n\theight: 100%;\n}\n\n.monaco-tree > .monaco-scrollable-element > .monaco-tree-wrapper {\n\theight: 100%;\n\twidth: 100%;\n\tposition: relative;\n}\n\n.monaco-tree .monaco-tree-rows {\n\tposition: absolute;\n\twidth: 100%;\n\theight: 100%;\n}\n\n.monaco-tree .monaco-tree-rows > .monaco-tree-row {\n\t-moz-box-sizing:\tborder-box;\n\t-o-box-sizing:\t\tborder-box;\n\t-ms-box-sizing:\t\tborder-box;\n\tbox-sizing:\t\t\tborder-box;\n\tcursor: pointer;\n\toverflow: hidden;\n\twidth: 100%;\n\ttouch-action: none;\n}\n\n.monaco-tree .monaco-tree-rows > .monaco-tree-row > .content {\n\tposition: relative;\n\theight: 100%;\n}\n\n.monaco-tree-drag-image {\n\tdisplay: inline-block;\n\tpadding: 1px 7px;\n\tborder-radius: 10px;\n\tfont-size: 12px;\n\tposition: absolute;\n}\n\n/* for OS X ballistic scrolling */\n.monaco-tree .monaco-tree-rows > .monaco-tree-row.scrolling {\n\tdisplay: none;\n}\n\n/* Expansion */\n\n.monaco-tree .monaco-tree-rows.show-twisties > .monaco-tree-row.has-children > .content:before {\n\tcontent: \' \';\n\tposition: absolute;\n\tdisplay: block;\n\tbackground: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiI+PHBhdGggZmlsbD0iIzY0NjQ2NSIgZD0iTTYgNHY4bDQtNC00LTR6bTEgMi40MTRMOC41ODYgOCA3IDkuNTg2VjYuNDE0eiIvPjwvc3ZnPg==") 50% 50% no-repeat;\n\twidth: 16px;\n\theight: 100%;\n\ttop: 0;\n\tleft: -16px;\n}\n\n.monaco-tree .monaco-tree-rows.show-twisties > .monaco-tree-row.expanded > .content:before {\n\tbackground-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiI+PHBhdGggZmlsbD0iIzY0NjQ2NSIgZD0iTTExIDEwSDUuMzQ0TDExIDQuNDE0VjEweiIvPjwvc3ZnPg==");\n}\n\n.monaco-tree .monaco-tree-rows > .monaco-tree-row.has-children.loading > .content:before {\n\tbackground-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0nMScgc3R5bGU9J29wYWNpdHk6MC4zOycgLz4KCQk8Y2lyY2xlIGN4PSc3LjgyODQnIGN5PSc3LjgyODQnIHI9JzEnIHN0eWxlPSdvcGFjaXR5OjAuMzsnIC8+CgkJPGNpcmNsZSBjeD0nNScgY3k9JzknIHI9JzEnIHN0eWxlPSdvcGFjaXR5OjAuMzsnIC8+CgkJPGNpcmNsZSBjeD0nMi4xNzE2JyBjeT0nNy44Mjg0JyByPScxJyBzdHlsZT0nb3BhY2l0eTowLjM7JyAvPgoJCTxjaXJjbGUgY3g9JzEnIGN5PSc1JyByPScxJyBzdHlsZT0nb3BhY2l0eTowLjM7JyAvPgoJCTxjaXJjbGUgY3g9JzIuMTcxNicgY3k9JzIuMTcxNicgcj0nMScgc3R5bGU9J29wYWNpdHk6MC4zOycgLz4KCTwvZz4KPC9zdmc+Cg==");\n}\n\n/* Highlighted */\n\n.monaco-tree.highlighted .monaco-tree-rows > .monaco-tree-row:not(.highlighted) {\n\topacity: 0.3;\n}\n\n.vs-dark .monaco-tree .monaco-tree-rows.show-twisties > .monaco-tree-row.has-children > .content:before {\n\tbackground-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiI+PHBhdGggZmlsbD0iI0U4RThFOCIgZD0iTTYgNHY4bDQtNC00LTR6bTEgMi40MTRMOC41ODYgOCA3IDkuNTg2VjYuNDE0eiIvPjwvc3ZnPg==");\n}\n\n.vs-dark .monaco-tree .monaco-tree-rows.show-twisties > .monaco-tree-row.expanded > .content:before {\n\tbackground-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiI+PHBhdGggZmlsbD0iI0U4RThFOCIgZD0iTTExIDEwSDUuMzQ0TDExIDQuNDE0VjEweiIvPjwvc3ZnPg==");\n}\n\n.vs-dark .monaco-tree .monaco-tree-rows > .monaco-tree-row.has-children.loading > .content:before {\n\tbackground-image: url("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0nMS4wJyBzdGFuZGFsb25lPSdubycgPz4KPHN2ZyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnIHZlcnNpb249JzEuMScgd2lkdGg9JzEwcHgnIGhlaWdodD0nMTBweCc+Cgk8c3R5bGU+CiAgICBjaXJjbGUgewogICAgICBhbmltYXRpb246IGJhbGwgMC42cyBsaW5lYXIgaW5maW5pdGU7CiAgICB9CgogICAgY2lyY2xlOm50aC1jaGlsZCgyKSB7IGFuaW1hdGlvbi1kZWxheTogMC4wNzVzOyB9CiAgICBjaXJjbGU6bnRoLWNoaWxkKDMpIHsgYW5pbWF0aW9uLWRlbGF5OiAwLjE1czsgfQogICAgY2lyY2xlOm50aC1jaGlsZCg0KSB7IGFuaW1hdGlvbi1kZWxheTogMC4yMjVzOyB9CiAgICBjaXJjbGU6bnRoLWNoaWxkKDUpIHsgYW5pbWF0aW9uLWRlbGF5OiAwLjNzOyB9CiAgICBjaXJjbGU6bnRoLWNoaWxkKDYpIHsgYW5pbWF0aW9uLWRlbGF5OiAwLjM3NXM7IH0KICAgIGNpcmNsZTpudGgtY2hpbGQoNykgeyBhbmltYXRpb24tZGVsYXk6IDAuNDVzOyB9CiAgICBjaXJjbGU6bnRoLWNoaWxkKDgpIHsgYW5pbWF0aW9uLWRlbGF5OiAwLjUyNXM7IH0KCiAgICBAa2V5ZnJhbWVzIGJhbGwgewogICAgICBmcm9tIHsgb3BhY2l0eTogMTsgfQogICAgICB0byB7IG9wYWNpdHk6IDAuMzsgfQogICAgfQoJPC9zdHlsZT4KCTxnIHN0eWxlPSJmaWxsOmdyZXk7Ij4KCQk8Y2lyY2xlIGN4PSc1JyBjeT0nMScgcj0nMScgc3R5bGU9J29wYWNpdHk6MC4zOycgLz4KCQk8Y2lyY2xlIGN4PSc3LjgyODQnIGN5PScyLjE3MTYnIHI9JzEnIHN0eWxlPSdvcGFjaXR5OjAuMzsnIC8+CgkJPGNpcmNsZSBjeD0nOScgY3k9JzUnIHI9JzEnIHN0eWxlPSdvcGFjaXR5OjAuMzsnIC8+CgkJPGNpcmNsZSBjeD0nNy44Mjg0JyBjeT0nNy44Mjg0JyByPScxJyBzdHlsZT0nb3BhY2l0eTowLjM7JyAvPgoJCTxjaXJjbGUgY3g9JzUnIGN5PSc5JyByPScxJyBzdHlsZT0nb3BhY2l0eTowLjM7JyAvPgoJCTxjaXJjbGUgY3g9JzIuMTcxNicgY3k9JzcuODI4NCcgcj0nMScgc3R5bGU9J29wYWNpdHk6MC4zOycgLz4KCQk8Y2lyY2xlIGN4PScxJyBjeT0nNScgcj0nMScgc3R5bGU9J29wYWNpdHk6MC4zOycgLz4KCQk8Y2lyY2xlIGN4PScyLjE3MTYnIGN5PScyLjE3MTYnIHI9JzEnIHN0eWxlPSdvcGFjaXR5OjAuMzsnIC8+Cgk8L2c+Cjwvc3ZnPgo=");\n}\n\n.hc-black .monaco-tree .monaco-tree-rows.show-twisties > .monaco-tree-row.has-children > .content:before\t{\n\tbackground-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+PHBhdGggZmlsbD0iI2ZmZiIgZD0iTTYgNHY4bDQtNC00LTR6bTEgMi40MTRsMS41ODYgMS41ODYtMS41ODYgMS41ODZ2LTMuMTcyeiIvPjwvc3ZnPg==");\n}\n\n.hc-black .monaco-tree .monaco-tree-rows.show-twisties > .monaco-tree-row.expanded > .content:before {\n\tbackground-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+PHBhdGggZmlsbD0iI2ZmZiIgZD0iTTExIDEwLjA3aC01LjY1Nmw1LjY1Ni01LjY1NnY1LjY1NnoiLz48L3N2Zz4=");\n}\n\n.hc-black .monaco-tree .monaco-tree-rows > .monaco-tree-row.has-children.loading > .content:before {\n\tbackground-image: url("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0nMS4wJyBzdGFuZGFsb25lPSdubycgPz4KPHN2ZyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnIHZlcnNpb249JzEuMScgd2lkdGg9JzEwcHgnIGhlaWdodD0nMTBweCc+Cgk8c3R5bGU+CiAgICBjaXJjbGUgewogICAgICBhbmltYXRpb246IGJhbGwgMC42cyBsaW5lYXIgaW5maW5pdGU7CiAgICB9CgogICAgY2lyY2xlOm50aC1jaGlsZCgyKSB7IGFuaW1hdGlvbi1kZWxheTogMC4wNzVzOyB9CiAgICBjaXJjbGU6bnRoLWNoaWxkKDMpIHsgYW5pbWF0aW9uLWRlbGF5OiAwLjE1czsgfQogICAgY2lyY2xlOm50aC1jaGlsZCg0KSB7IGFuaW1hdGlvbi1kZWxheTogMC4yMjVzOyB9CiAgICBjaXJjbGU6bnRoLWNoaWxkKDUpIHsgYW5pbWF0aW9uLWRlbGF5OiAwLjNzOyB9CiAgICBjaXJjbGU6bnRoLWNoaWxkKDYpIHsgYW5pbWF0aW9uLWRlbGF5OiAwLjM3NXM7IH0KICAgIGNpcmNsZTpudGgtY2hpbGQoNykgeyBhbmltYXRpb24tZGVsYXk6IDAuNDVzOyB9CiAgICBjaXJjbGU6bnRoLWNoaWxkKDgpIHsgYW5pbWF0aW9uLWRlbGF5OiAwLjUyNXM7IH0KCiAgICBAa2V5ZnJhbWVzIGJhbGwgewogICAgICBmcm9tIHsgb3BhY2l0eTogMTsgfQogICAgICB0byB7IG9wYWNpdHk6IDAuMzsgfQogICAgfQoJPC9zdHlsZT4KCTxnIHN0eWxlPSJmaWxsOndoaXRlOyI+CgkJPGNpcmNsZSBjeD0nNScgY3k9JzEnIHI9JzEnIHN0eWxlPSdvcGFjaXR5OjAuMzsnIC8+CgkJPGNpcmNsZSBjeD0nNy44Mjg0JyBjeT0nMi4xNzE2JyByPScxJyBzdHlsZT0nb3BhY2l0eTowLjM7JyAvPgoJCTxjaXJjbGUgY3g9JzknIGN5PSc1JyByPScxJyBzdHlsZT0nb3BhY2l0eTowLjM7JyAvPgoJCTxjaXJjbGUgY3g9JzcuODI4NCcgY3k9JzcuODI4NCcgcj0nMScgc3R5bGU9J29wYWNpdHk6MC4zOycgLz4KCQk8Y2lyY2xlIGN4PSc1JyBjeT0nOScgcj0nMScgc3R5bGU9J29wYWNpdHk6MC4zOycgLz4KCQk8Y2lyY2xlIGN4PScyLjE3MTYnIGN5PSc3LjgyODQnIHI9JzEnIHN0eWxlPSdvcGFjaXR5OjAuMzsnIC8+CgkJPGNpcmNsZSBjeD0nMScgY3k9JzUnIHI9JzEnIHN0eWxlPSdvcGFjaXR5OjAuMzsnIC8+CgkJPGNpcmNsZSBjeD0nMi4xNzE2JyBjeT0nMi4xNzE2JyByPScxJyBzdHlsZT0nb3BhY2l0eTowLjM7JyAvPgoJPC9nPgo8L3N2Zz4K");\n}\n\n.monaco-tree-action.collapse-all {\n\tbackground: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgdmlld0JveD0iLTEgMCAxNiAxNiIgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAtMSAwIDE2IDE2Ij48cGF0aCBmaWxsPSIjNDI0MjQyIiBkPSJNMTQgMXY5aC0xdi04aC04di0xaDl6bS0xMSAydjFoOHY4aDF2LTloLTl6bTcgMnY5aC05di05aDl6bS0yIDJoLTV2NWg1di01eiIvPjxyZWN0IHg9IjQiIHk9IjkiIGZpbGw9IiMwMDUzOUMiIHdpZHRoPSIzIiBoZWlnaHQ9IjEiLz48L3N2Zz4=") center center no-repeat;\n}\n\n.hc-black .monaco-tree-action.collapse-all,\n.vs-dark .monaco-tree-action.collapse-all {\n\tbackground: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgdmlld0JveD0iLTEgMCAxNiAxNiIgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAtMSAwIDE2IDE2Ij48cGF0aCBmaWxsPSIjQzVDNUM1IiBkPSJNMTQgMXY5aC0xdi04aC04di0xaDl6bS0xMSAydjFoOHY4aDF2LTloLTl6bTcgMnY5aC05di05aDl6bS0yIDJoLTV2NWg1di01eiIvPjxyZWN0IHg9IjQiIHk9IjkiIGZpbGw9IiM3NUJFRkYiIHdpZHRoPSIzIiBoZWlnaHQ9IjEiLz48L3N2Zz4=") center center no-repeat;\n}\n',""])},5728:(e,t,n)=>{(e.exports=n(8826)(!1)).push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .inputarea {\n\tmin-width: 0;\n\tmin-height: 0;\n\tmargin: 0;\n\tpadding: 0;\n\tposition: absolute;\n\toutline: none !important;\n\tresize: none;\n\tborder: none;\n\toverflow: hidden;\n\tcolor: transparent;\n\tbackground-color: transparent;\n}\n/*.monaco-editor .inputarea {\n\tposition: fixed !important;\n\twidth: 800px !important;\n\theight: 500px !important;\n\ttop: initial !important;\n\tleft: initial !important;\n\tbottom: 0 !important;\n\tright: 0 !important;\n\tcolor: black !important;\n\tbackground: white !important;\n\tline-height: 15px !important;\n\tfont-size: 14px !important;\n}*/\n.monaco-editor .inputarea.ime-input {\n\tz-index: 10;\n}\n",""])},5700:(e,t,n)=>{(e.exports=n(8826)(!1)).push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .view-overlays .current-line {\n\tdisplay: block;\n\tposition: absolute;\n\tleft: 0;\n\ttop: 0;\n\tbox-sizing: border-box;\n}",""])},3956:(e,t,n)=>{(e.exports=n(8826)(!1)).push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .margin-view-overlays .current-line {\n\tdisplay: block;\n\tposition: absolute;\n\tleft: 0;\n\ttop: 0;\n\tbox-sizing: border-box;\n}\n\n.monaco-editor .margin-view-overlays .current-line.current-line-margin.current-line-margin-both {\n\tborder-right: 0;\n}",""])},780:(e,t,n)=>{(e.exports=n(8826)(!1)).push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n/*\n\tKeeping name short for faster parsing.\n\tcdr = core decorations rendering (div)\n*/\n.monaco-editor .lines-content .cdr {\n\tposition: absolute;\n}",""])},4488:(e,t,n)=>{(e.exports=n(8826)(!1)).push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .glyph-margin {\n\tposition: absolute;\n\ttop: 0;\n}\n\n/*\n\tKeeping name short for faster parsing.\n\tcgmr = core glyph margin rendering (div)\n*/\n.monaco-editor .margin-view-overlays .cgmr {\n\tposition: absolute;\n}\n",""])},4796:(e,t,n)=>{(e.exports=n(8826)(!1)).push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n/*\n\tKeeping name short for faster parsing.\n\tcigr = core ident guides rendering (div)\n*/\n.monaco-editor .lines-content .cigr {\n\tposition: absolute;\n}\n.monaco-editor .lines-content .cigra {\n\tposition: absolute;\n}\n",""])},704:(e,t,n)=>{(e.exports=n(8826)(!1)).push([e.id,'/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .margin-view-overlays .line-numbers {\n\tposition: absolute;\n\ttext-align: right;\n\tdisplay: inline-block;\n\tvertical-align: middle;\n\tbox-sizing: border-box;\n\tcursor: default;\n\theight: 100%;\n}\n\n.monaco-editor .relative-current-line-number {\n\ttext-align: left;\n\tdisplay: inline-block;\n\twidth: 100%;\n}\n\n.monaco-editor .margin-view-overlays .line-numbers {\n\tcursor: -webkit-image-set(\n\t\turl("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNSIgaGVpZ2h0PSIyMSIgeD0iMHB4IiB5PSIwcHgiIHZpZXdCb3g9IjAgMCAxNSAyMSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgMTUgMjE7Ij48cG9seWdvbiBzdHlsZT0iZmlsbDojRkZGRkZGO3N0cm9rZTojMDAwMDAwIiBwb2ludHM9IjE0LjUsMS4yIDEuOSwxMy44IDcuMSwxMy44IDQuNSwxOS4xIDcuNywyMC4xIDEwLjMsMTQuOSAxNC41LDE4Ii8+PC9zdmc+") 1x,\n\t\turl("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHg9IjBweCIgeT0iMHB4IiB3aWR0aD0iMzAiIGhlaWdodD0iNDIiIHZpZXdCb3g9IjAgMCAzMCA0MiIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgMzAgNDI7Ij48cG9seWdvbiBzdHlsZT0iZmlsbDojRkZGRkZGO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyOyIgcG9pbnRzPSIyOSwyLjQgMy44LDI3LjYgMTQuMywyNy42IDksMzguMSAxNS40LDQwLjIgMjAuNiwyOS43IDI5LDM2Ii8+PC9zdmc+Cg==") 2x\n\t) 30 0, default;\n}\n\n.monaco-editor.mac .margin-view-overlays .line-numbers {\n\tcursor: -webkit-image-set(\n\t\turl("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMiIgaGVpZ2h0PSIxOCIgdmlld0JveD0iMCAwIDEyIDE4Ij48c3R5bGU+LnN0MHtmaWxsOiNmZmZ9PC9zdHlsZT48dGl0bGU+ZmxpcHBlZC1jdXJzb3ItbWFjPC90aXRsZT48cGF0aCBkPSJNNC4zIDE2LjVsMS42LTQuNkgxLjFMMTEuNSAxLjJ2MTQuNEw4LjcgMTNsLTEuNiA0LjV6Ii8+PHBhdGggY2xhc3M9InN0MCIgZD0iTTExIDE0LjVsLTIuNS0yLjNMNyAxNi43IDUgMTZsMS42LTQuNWgtNGw4LjUtOU0wIDEyLjVoNS4ybC0xLjUgNC4xTDcuNSAxOCA5IDE0LjJsMi45IDIuM1YwTDAgMTIuNXoiLz48L3N2Zz4=") 1x,\n\t\turl("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIzNiIgdmlld0JveD0iMCAwIDI0IDM2LjEiPjxkZWZzPjxzdHlsZT4uYXtmaWxsOiNmZmY7fTwvc3R5bGU+PC9kZWZzPjx0aXRsZT5mbGlwcGVkLWN1cnNvci1tYWMtMng8L3RpdGxlPjxwb2x5Z29uIHBvaW50cz0iOC42IDMzLjEgMTEuOCAyMy45IDIuMiAyMy45IDIzIDIuNSAyMyAzMS4zIDE3LjQgMjYuMSAxNC4yIDM1LjEgOC42IDMzLjEiLz48cGF0aCBjbGFzcz0iYSIgZD0iTTIyLDI5LjFsLTUtNC42LTMuMDYyLDguOTM4LTQuMDYyLTEuNUwxMywyM0g1TDIyLDVNMCwyNUgxMC40bC0zLDguM0wxNSwzNi4xbDMuMTI1LTcuNjYyTDI0LDMzVjBaIi8+PC9zdmc+") 2x\n\t) 24 3, default;\n}\n\n.monaco-editor .margin-view-overlays .line-numbers.lh-odd {\n\tmargin-top: 1px;\n}\n',""])},9425:(e,t,n)=>{(e.exports=n(8826)(!1)).push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n/* Uncomment to see lines flashing when they're painted */\n/*.monaco-editor .view-lines > .view-line {\n\tbackground-color: none;\n\tanimation-name: flash-background;\n\tanimation-duration: 800ms;\n}\n@keyframes flash-background {\n\t0% { background-color: lightgreen; }\n\t100% { background-color: none }\n}*/\n\n.monaco-editor.safari .lines-content,\n.monaco-editor.safari .view-line,\n.monaco-editor.safari .view-lines {\n\t-webkit-user-select: text;\n\tuser-select: text;\n}\n\n.monaco-editor .lines-content,\n.monaco-editor .view-line,\n.monaco-editor .view-lines {\n\t-webkit-user-select: none;\n\t-ms-user-select: none;\n\t-khtml-user-select: none;\n\t-moz-user-select: none;\n\t-o-user-select: none;\n\tuser-select: none;\n}\n\n.monaco-editor .view-lines {\n\tcursor: text;\n\twhite-space: nowrap;\n}\n\n.monaco-editor.vs-dark.mac .view-lines,\n.monaco-editor.hc-black.mac .view-lines {\n\tcursor: -webkit-image-set(url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAQAAAC1+jfqAAAAL0lEQVQoz2NgCD3x//9/BhBYBWdhgFVAiVW4JBFKGIa4AqD0//9D3pt4I4tAdAMAHTQ/j5Zom30AAAAASUVORK5CYII=) 1x, url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAQAAADZc7J/AAAAz0lEQVRIx2NgYGBY/R8I/vx5eelX3n82IJ9FxGf6tksvf/8FiTMQAcAGQMDvSwu09abffY8QYSAScNk45G198eX//yev73/4///701eh//kZSARckrNBRvz//+8+6ZohwCzjGNjdgQxkAg7B9WADeBjIBqtJCbhRA0YNoIkBSNmaPEMoNmA0FkYNoFKhapJ6FGyAH3nauaSmPfwI0v/3OukVi0CIZ+F25KrtYcx/CTIy0e+rC7R1Z4KMICVTQQ14feVXIbR695u14+Ir4gwAAD49E54wc1kWAAAAAElFTkSuQmCC) 2x) 5 8, text;\n}\n\n.monaco-editor .view-line {\n\tposition: absolute;\n\twidth: 100%;\n}\n\n/* TODO@tokenization bootstrap fix */\n/*.monaco-editor .view-line > span > span {\n\tfloat: none;\n\tmin-height: inherit;\n\tmargin-left: inherit;\n}*/",""])},2270:(e,t,n)=>{(e.exports=n(8826)(!1)).push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n.monaco-editor .lines-decorations {\n\tposition: absolute;\n\ttop: 0;\n\tbackground: white;\n}\n\n/*\n\tKeeping name short for faster parsing.\n\tcldr = core lines decorations rendering (div)\n*/\n.monaco-editor .margin-view-overlays .cldr {\n\tposition: absolute;\n\theight: 100%;\n}",""])},4464:(e,t,n)=>{(e.exports=n(8826)(!1)).push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n/*\n\tKeeping name short for faster parsing.\n\tcmdr = core margin decorations rendering (div)\n*/\n.monaco-editor .margin-view-overlays .cmdr {\n\tposition: absolute;\n\tleft: 0;\n\twidth: 100%;\n\theight: 100%;\n}",""])},8444:(e,t,n)=>{(e.exports=n(8826)(!1)).push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n/* START cover the case that slider is visible on mouseover */\n.monaco-editor .minimap.slider-mouseover .minimap-slider {\n\topacity: 0;\n\ttransition: opacity 100ms linear;\n}\n.monaco-editor .minimap.slider-mouseover:hover .minimap-slider {\n\topacity: 1;\n}\n.monaco-editor .minimap.slider-mouseover .minimap-slider.active {\n\topacity: 1;\n}\n/* END cover the case that slider is visible on mouseover */\n\n.monaco-editor .minimap-shadow-hidden {\n\tposition: absolute;\n\twidth: 0;\n}\n.monaco-editor .minimap-shadow-visible {\n\tposition: absolute;\n\tleft: -6px;\n\twidth: 6px;\n}\n",""])},9512:(e,t,n)=>{(e.exports=n(8826)(!1)).push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n.monaco-editor .overlayWidgets {\n\tposition: absolute;\n\ttop: 0;\n\tleft:0;\n}",""])},7508:(e,t,n)=>{(e.exports=n(8826)(!1)).push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .view-ruler {\n\tposition: absolute;\n\ttop: 0;\n}",""])},6044:(e,t,n)=>{(e.exports=n(8826)(!1)).push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .scroll-decoration {\n\tposition: absolute;\n\ttop: 0;\n\tleft: 0;\n\theight: 6px;\n}",""])},9412:(e,t,n)=>{(e.exports=n(8826)(!1)).push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n/*\n\tKeeping name short for faster parsing.\n\tcslr = core selections layer rendering (div)\n*/\n.monaco-editor .lines-content .cslr {\n\tposition: absolute;\n}\n\n.monaco-editor\t\t\t.top-left-radius\t\t{ border-top-left-radius: 3px; }\n.monaco-editor\t\t\t.bottom-left-radius\t\t{ border-bottom-left-radius: 3px; }\n.monaco-editor\t\t\t.top-right-radius\t\t{ border-top-right-radius: 3px; }\n.monaco-editor\t\t\t.bottom-right-radius\t{ border-bottom-right-radius: 3px; }\n\n.monaco-editor.hc-black .top-left-radius\t\t{ border-top-left-radius: 0; }\n.monaco-editor.hc-black .bottom-left-radius\t\t{ border-bottom-left-radius: 0; }\n.monaco-editor.hc-black .top-right-radius\t\t{ border-top-right-radius: 0; }\n.monaco-editor.hc-black .bottom-right-radius\t{ border-bottom-right-radius: 0; }\n",""])},9432:(e,t,n)=>{(e.exports=n(8826)(!1)).push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n.monaco-editor .cursors-layer {\n\tposition: absolute;\n\ttop: 0;\n}\n\n.monaco-editor .cursors-layer > .cursor {\n\tposition: absolute;\n\tcursor: text;\n\toverflow: hidden;\n}\n\n/* -- block-outline-style -- */\n.monaco-editor .cursors-layer.cursor-block-outline-style > .cursor {\n\tbox-sizing: border-box;\n\tbackground: transparent !important;\n\tborder-style: solid;\n\tborder-width: 1px;\n}\n\n/* -- underline-style -- */\n.monaco-editor .cursors-layer.cursor-underline-style > .cursor {\n\tborder-bottom-width: 2px;\n\tborder-bottom-style: solid;\n\tbackground: transparent !important;\n\tbox-sizing: border-box;\n}\n\n/* -- underline-thin-style -- */\n.monaco-editor .cursors-layer.cursor-underline-thin-style > .cursor {\n\tborder-bottom-width: 1px;\n\tborder-bottom-style: solid;\n\tbackground: transparent !important;\n\tbox-sizing: border-box;\n}\n\n@keyframes monaco-cursor-smooth {\n\t0%,\n\t20% {\n\t\topacity: 1;\n\t}\n\t60%,\n\t100% {\n\t\topacity: 0;\n\t}\n}\n\n@keyframes monaco-cursor-phase {\n\t0%,\n\t20% {\n\t\topacity: 1;\n\t}\n\t90%,\n\t100% {\n\t\topacity: 0;\n\t}\n}\n\n@keyframes monaco-cursor-expand {\n\t0%,\n\t20% {\n\t\ttransform: scaleY(1);\n\t}\n\t80%,\n\t100% {\n\t\ttransform: scaleY(0);\n\t}\n}\n\n.cursor-smooth {\n\tanimation: monaco-cursor-smooth 0.5s ease-in-out 0s 20 alternate;\n}\n\n.cursor-phase {\n\tanimation: monaco-cursor-phase 0.5s ease-in-out 0s 20 alternate;\n}\n\n.cursor-expand > .cursor {\n\tanimation: monaco-cursor-expand 0.5s ease-in-out 0s 20 alternate;\n}",""])},6117:(e,t,n)=>{(e.exports=n(8826)(!1)).push([e.id,'/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n/* ---------- DiffEditor ---------- */\n\n.monaco-diff-editor .diffOverview {\n\tz-index: 9;\n}\n\n/* colors not externalized: using transparancy on background */\n.monaco-diff-editor.vs\t\t\t.diffOverview { background: rgba(0, 0, 0, 0.03); }\n.monaco-diff-editor.vs-dark\t\t.diffOverview { background: rgba(255, 255, 255, 0.01); }\n\n.monaco-diff-editor .diffViewport {\n\tbox-shadow: inset 0px 0px 1px 0px #B9B9B9;\n\tbackground: rgba(0, 0, 0, 0.10);\n}\n\n.monaco-diff-editor.vs-dark .diffViewport,\n.monaco-diff-editor.hc-black .diffViewport {\n\tbackground: rgba(255, 255, 255, 0.10);\n}\n.monaco-scrollable-element.modified-in-monaco-diff-editor.vs\t\t.scrollbar { background: rgba(0,0,0,0); }\n.monaco-scrollable-element.modified-in-monaco-diff-editor.vs-dark\t.scrollbar { background: rgba(0,0,0,0); }\n.monaco-scrollable-element.modified-in-monaco-diff-editor.hc-black\t.scrollbar { background: none; }\n\n.monaco-scrollable-element.modified-in-monaco-diff-editor .slider {\n\tz-index: 10;\n}\n.modified-in-monaco-diff-editor\t\t\t\t.slider.active { background: rgba(171, 171, 171, .4); }\n.modified-in-monaco-diff-editor.hc-black\t.slider.active { background: none; }\n\n/* ---------- Diff ---------- */\n\n.monaco-editor .insert-sign,\n.monaco-diff-editor .insert-sign,\n.monaco-editor .delete-sign,\n.monaco-diff-editor .delete-sign {\n\tbackground-size: 60%;\n\topacity: 0.7;\n\tbackground-repeat: no-repeat;\n\tbackground-position: 50% 50%;\n}\n.monaco-editor.hc-black .insert-sign,\n.monaco-diff-editor.hc-black .insert-sign,\n.monaco-editor.hc-black .delete-sign,\n.monaco-diff-editor.hc-black .delete-sign {\n\topacity: 1;\n}\n.monaco-editor .insert-sign,\n.monaco-diff-editor .insert-sign {\n\tbackground-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHRpdGxlPkxheWVyIDE8L3RpdGxlPjxyZWN0IGhlaWdodD0iMTEiIHdpZHRoPSIzIiB5PSIzIiB4PSI3IiBmaWxsPSIjNDI0MjQyIi8+PHJlY3QgaGVpZ2h0PSIzIiB3aWR0aD0iMTEiIHk9IjciIHg9IjMiIGZpbGw9IiM0MjQyNDIiLz48L3N2Zz4=");\n}\n.monaco-editor .delete-sign,\n.monaco-diff-editor .delete-sign {\n\tbackground-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHRpdGxlPkxheWVyIDE8L3RpdGxlPjxyZWN0IGhlaWdodD0iMyIgd2lkdGg9IjExIiB5PSI3IiB4PSIzIiBmaWxsPSIjNDI0MjQyIi8+PC9zdmc+");\n}\n\n.monaco-editor.vs-dark .insert-sign,\n.monaco-diff-editor.vs-dark .insert-sign,\n.monaco-editor.hc-black .insert-sign,\n.monaco-diff-editor.hc-black .insert-sign {\n\tbackground-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHRpdGxlPkxheWVyIDE8L3RpdGxlPjxyZWN0IGhlaWdodD0iMTEiIHdpZHRoPSIzIiB5PSIzIiB4PSI3IiBmaWxsPSIjQzVDNUM1Ii8+PHJlY3QgaGVpZ2h0PSIzIiB3aWR0aD0iMTEiIHk9IjciIHg9IjMiIGZpbGw9IiNDNUM1QzUiLz48L3N2Zz4=");\n}\n.monaco-editor.vs-dark .delete-sign,\n.monaco-diff-editor.vs-dark .delete-sign,\n.monaco-editor.hc-black .delete-sign,\n.monaco-diff-editor.hc-black .delete-sign {\n\tbackground-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHRpdGxlPkxheWVyIDE8L3RpdGxlPjxyZWN0IGhlaWdodD0iMyIgd2lkdGg9IjExIiB5PSI3IiB4PSIzIiBmaWxsPSIjQzVDNUM1Ii8+PC9zdmc+");\n}\n\n.monaco-editor .inline-deleted-margin-view-zone {\n\ttext-align: right;\n}\n.monaco-editor .inline-added-margin-view-zone {\n\ttext-align: right;\n}\n\n.monaco-editor .diagonal-fill {\n\tbackground: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJCAYAAADgkQYQAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjEwMPRyoQAAAChJREFUKFNjOH/+fAMDDgCSu3Dhwn9c8gwwBTgNGR4KQP4HhQOhsAIAZCBTkhtqePcAAAAASUVORK5CYII=");\n}\n.monaco-editor.vs-dark .diagonal-fill {\n\topacity: 0.2;\n}\n.monaco-editor.hc-black .diagonal-fill {\n\tbackground: none;\n}\n\n/* ---------- Inline Diff ---------- */\n\n.monaco-editor .view-zones .view-lines .view-line span {\n\tdisplay: inline-block;\n}\n',""])},4238:(e,t,n)=>{(e.exports=n(8826)(!1)).push([e.id,'/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-diff-editor .diff-review-line-number {\n\ttext-align: right;\n\tdisplay: inline-block;\n}\n\n.monaco-diff-editor .diff-review {\n\tposition: absolute;\n\t-webkit-user-select: none;\n\t-ms-user-select: none;\n\t-khtml-user-select: none;\n\t-moz-user-select: none;\n\t-o-user-select: none;\n\tuser-select: none;\n}\n\n.monaco-diff-editor .diff-review-summary {\n\tpadding-left: 10px;\n}\n\n.monaco-diff-editor .diff-review-shadow {\n\tposition: absolute;\n}\n\n.monaco-diff-editor .diff-review-row {\n\twhite-space: pre;\n}\n\n.monaco-diff-editor .diff-review-table {\n\tdisplay: table;\n\tmin-width: 100%;\n}\n\n.monaco-diff-editor .diff-review-row {\n\tdisplay: table-row;\n\twidth: 100%;\n}\n\n.monaco-diff-editor .diff-review-cell {\n\tdisplay: table-cell;\n}\n\n.monaco-diff-editor .diff-review-spacer {\n\tdisplay: inline-block;\n\twidth: 10px;\n}\n\n.monaco-diff-editor .diff-review-actions {\n\tdisplay: inline-block;\n\tposition: absolute;\n\tright: 10px;\n\ttop: 2px;\n}\n\n.monaco-diff-editor .diff-review-actions .action-label {\n\twidth: 16px;\n\theight: 16px;\n\tmargin: 2px 0;\n}\n.monaco-diff-editor .action-label.icon.close-diff-review {\n\tbackground: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgdmlld0JveD0iMyAzIDE2IDE2IiBlbmFibGUtYmFja2dyb3VuZD0ibmV3IDMgMyAxNiAxNiI+PHBvbHlnb24gZmlsbD0iIzQyNDI0MiIgcG9pbnRzPSIxMi41OTcsMTEuMDQyIDE1LjQsMTMuODQ1IDEzLjg0NCwxNS40IDExLjA0MiwxMi41OTggOC4yMzksMTUuNCA2LjY4MywxMy44NDUgOS40ODUsMTEuMDQyIDYuNjgzLDguMjM5IDguMjM4LDYuNjgzIDExLjA0Miw5LjQ4NiAxMy44NDUsNi42ODMgMTUuNCw4LjIzOSIvPjwvc3ZnPg==") center center no-repeat;\n}\n.monaco-diff-editor.hc-black .action-label.icon.close-diff-review,\n.monaco-diff-editor.vs-dark .action-label.icon.close-diff-review {\n\tbackground: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgdmlld0JveD0iMyAzIDE2IDE2IiBlbmFibGUtYmFja2dyb3VuZD0ibmV3IDMgMyAxNiAxNiI+PHBvbHlnb24gZmlsbD0iI2U4ZThlOCIgcG9pbnRzPSIxMi41OTcsMTEuMDQyIDE1LjQsMTMuODQ1IDEzLjg0NCwxNS40IDExLjA0MiwxMi41OTggOC4yMzksMTUuNCA2LjY4MywxMy44NDUgOS40ODUsMTEuMDQyIDYuNjgzLDguMjM5IDguMjM4LDYuNjgzIDExLjA0Miw5LjQ4NiAxMy44NDUsNi42ODMgMTUuNCw4LjIzOSIvPjwvc3ZnPg==") center center no-repeat;\n}',""])},2076:(e,t,n)=>{(e.exports=n(8826)(!1)).push([e.id,'/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n/* -------------------- IE10 remove auto clear button -------------------- */\n\n::-ms-clear {\n\tdisplay: none;\n}\n\n/* All widgets */\n/* I am not a big fan of this rule */\n.monaco-editor .editor-widget input {\n\tcolor: inherit;\n}\n\n/* -------------------- Editor -------------------- */\n\n.monaco-editor {\n\tposition: relative;\n\toverflow: visible;\n\t-webkit-text-size-adjust: 100%;\n\t-webkit-font-feature-settings: "liga" off, "calt" off;\n\tfont-feature-settings: "liga" off, "calt" off;\n}\n.monaco-editor.enable-ligatures {\n\t-webkit-font-feature-settings: "liga" on, "calt" on;\n\tfont-feature-settings: "liga" on, "calt" on;\n}\n\n/* -------------------- Misc -------------------- */\n\n.monaco-editor .overflow-guard {\n\tposition: relative;\n\toverflow: hidden;\n}\n\n.monaco-editor .view-overlays {\n\tposition: absolute;\n\ttop: 0;\n}',""])},5701:(e,t,n)=>{(e.exports=n(8826)(!1)).push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .vs-whitespace {\n\tdisplay:inline-block;\n}\n\n",""])},8845:(e,t,n)=>{(e.exports=n(8826)(!1)).push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .bracket-match {\n\tbox-sizing: border-box;\n}\n",""])},7753:(e,t,n)=>{(e.exports=n(8826)(!1)).push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-menu .monaco-action-bar.vertical .action-label.hover {\n\tbackground-color: #EEE;\n}",""])},531:(e,t,n)=>{(e.exports=n(8826)(!1)).push([e.id,'/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .lightbulb-glyph {\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n\theight: 16px;\n\twidth: 20px;\n\tpadding-left: 2px;\n}\n\n.monaco-editor .lightbulb-glyph:hover {\n\tcursor: pointer;\n\t/* transform: scale(1.3, 1.3); */\n}\n\n.monaco-editor.vs .lightbulb-glyph {\n\tbackground: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiIgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgMTYgMTYiIGhlaWdodD0iMTYiIHdpZHRoPSIxNiI+PHBhdGggZmlsbD0iI0Y2RjZGNiIgZD0iTTEzLjUgNC4yQzEzLjEgMi4xIDEwLjggMCA5LjMgMEg2LjdjLS40IDAtLjYuMi0uNi4yQzQgLjggMi41IDIuNyAyLjUgNC45YzAgLjUtLjEgMi4zIDEuNyAzLjguNS41IDEuMiAyIDEuMyAyLjR2My4zTDcuMSAxNmgybDEuNS0xLjZWMTFjLjEtLjQuOC0xLjkgMS4zLTIuMyAxLjEtLjkgMS41LTEuOSAxLjYtMi43VjQuMnoiLz48Zz48ZyBmaWxsPSIjODQ4NDg0Ij48cGF0aCBkPSJNNi41IDEyaDN2MWgtM3pNNy41IDE1aDEuMWwuOS0xaC0zeiIvPjwvZz48cGF0aCBmaWxsPSIjZmMwIiBkPSJNMTIuNiA1YzAtMi4zLTEuOC00LjEtNC4xLTQuMS0uMSAwLTEuNC4xLTEuNC4xLTIuMS4zLTMuNyAyLTMuNyA0IDAgLjEtLjIgMS42IDEuNCAzIC43LjcgMS41IDIuNCAxLjYgMi45bC4xLjFoM2wuMS0uMmMuMS0uNS45LTIuMiAxLjYtMi45IDEuNi0xLjMgMS40LTIuOCAxLjQtMi45em0tMyAxbC0uNSAzaC0uNlY2YzEuMSAwIC45LTEgLjktMUg2LjV2LjFjMCAuMi4xLjkgMSAuOXYzSDdsLS4yLS43TDYuNSA2Yy0uNyAwLS45LS40LTEtLjd2LS40YzAtLjguOS0uOS45LS45aDMuMXMxIC4xIDEgMWMwIDAgLjEgMS0uOSAxeiIvPjwvZz48cGF0aCBmaWxsPSIjRjBFRkYxIiBkPSJNMTAuNSA1YzAtLjktMS0xLTEtMUg2LjRzLS45LjEtLjkuOXYuNGMwIC4zLjMuNy45LjdsLjQgMi4zLjIuN2guNVY2Yy0xIDAtMS0uNy0xLS45VjVoM3MuMSAxLS45IDF2M2guNmwuNS0zYy45IDAgLjgtMSAuOC0xeiIvPjwvc3ZnPg==") center center no-repeat;\n}\n\n.monaco-editor.vs-dark .lightbulb-glyph,\n.monaco-editor.hc-black .lightbulb-glyph {\n\tbackground: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiIgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgMTYgMTYiIGhlaWdodD0iMTYiIHdpZHRoPSIxNiI+PHBhdGggZmlsbD0iIzFFMUUxRSIgZD0iTTEzLjUgNC4yQzEzLjEgMi4xIDEwLjggMCA5LjMgMEg2LjdjLS40IDAtLjYuMi0uNi4yQzQgLjggMi41IDIuNyAyLjUgNC45YzAgLjUtLjEgMi4zIDEuNyAzLjguNS41IDEuMiAyIDEuMyAyLjR2My4zTDcuMSAxNmgybDEuNS0xLjZWMTFjLjEtLjQuOC0xLjkgMS4zLTIuMyAxLjEtLjkgMS41LTEuOSAxLjYtMi43VjQuMnoiLz48Zz48ZyBmaWxsPSIjQzVDNUM1Ij48cGF0aCBkPSJNNi41IDEyaDN2MWgtM3pNNy41IDE1aDEuMWwuOS0xaC0zeiIvPjwvZz48cGF0aCBmaWxsPSIjRERCMjA0IiBkPSJNMTIuNiA1YzAtMi4zLTEuOC00LjEtNC4xLTQuMS0uMSAwLTEuNC4xLTEuNC4xLTIuMS4zLTMuNyAyLTMuNyA0IDAgLjEtLjIgMS42IDEuNCAzIC43LjcgMS41IDIuNCAxLjYgMi45bC4xLjFoM2wuMS0uMmMuMS0uNS45LTIuMiAxLjYtMi45IDEuNi0xLjMgMS40LTIuOCAxLjQtMi45em0tMyAxbC0uNSAzaC0uNlY2YzEuMSAwIC45LTEgLjktMUg2LjV2LjFjMCAuMi4xLjkgMSAuOXYzSDdsLS4yLS43TDYuNSA2Yy0uNyAwLS45LS40LTEtLjd2LS40YzAtLjguOS0uOS45LS45aDMuMXMxIC4xIDEgMWMwIDAgLjEgMS0uOSAxeiIvPjwvZz48cGF0aCBmaWxsPSIjMjUyNTI2IiBkPSJNMTAuNSA1YzAtLjktMS0xLTEtMUg2LjRzLS45LjEtLjkuOXYuNGMwIC4zLjMuNy45LjdsLjQgMi4zLjIuN2guNVY2Yy0xIDAtMS0uNy0xLS45VjVoM3MuMSAxLS45IDF2M2guNmwuNS0zYy45IDAgLjgtMSAuOC0xeiIvPjwvc3ZnPg==") center center no-repeat;\n}\n',""])},6897:(e,t,n)=>{(e.exports=n(8826)(!1)).push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .codelens-decoration {\n\toverflow: hidden;\n\tdisplay: inline-block;\n\ttext-overflow: ellipsis;\n}\n\n.monaco-editor .codelens-decoration > span,\n.monaco-editor .codelens-decoration > a {\n\t-moz-user-select: none;\n\t-webkit-user-select: none;\n\t-ms-user-select: none;\n\tuser-select: none;\n\twhite-space: nowrap;\n\tvertical-align: sub;\n}\n\n.monaco-editor .codelens-decoration > a {\n\ttext-decoration: none;\n}\n\n.monaco-editor .codelens-decoration > a:hover {\n\ttext-decoration: underline;\n\tcursor: pointer;\n}\n\n.monaco-editor .codelens-decoration.invisible-cl {\n\topacity: 0;\n}\n\n@keyframes fadein { 0% { opacity:0; visibility:visible;} 100% { opacity:1; } }\n@-moz-keyframes fadein { 0% { opacity:0; visibility:visible;} 100% { opacity:1; } }\n@-o-keyframes fadein { 0% { opacity:0; visibility:visible;} 100% { opacity:1; } }\n@-webkit-keyframes fadein { 0% { opacity:0; visibility:visible;} 100% { opacity:1; } }\n\n.monaco-editor .codelens-decoration.fadein {\n\t-webkit-animation: fadein 0.5s linear;\n\t-moz-animation: fadein 0.5s linear;\n\t-o-animation: fadein 0.5s linear;\n\tanimation: fadein 0.5s linear;\n}\n",""])},4945:(e,t,n)=>{(e.exports=n(8826)(!1)).push([e.id,'/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.colorpicker-widget {\n\theight: 190px;\n\tuser-select: none;\n}\n\n.monaco-editor .colorpicker-hover:focus {\n\toutline: none;\n}\n\n\n/* Header */\n\n.colorpicker-header {\n\tdisplay: flex;\n\theight: 24px;\n\tposition: relative;\n\tbackground: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAYAAACp8Z5+AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAZdEVYdFNvZnR3YXJlAHBhaW50Lm5ldCA0LjAuMTZEaa/1AAAAHUlEQVQYV2PYvXu3JAi7uLiAMaYAjAGTQBPYLQkAa/0Zef3qRswAAAAASUVORK5CYII=");\n\tbackground-size: 9px 9px;\n\timage-rendering: pixelated;\n}\n\n.colorpicker-header .picked-color {\n\twidth: 216px;\n\ttext-align: center;\n\tline-height: 24px;\n\tcursor: pointer;\n\tcolor: white;\n\tflex: 1;\n\ttext-align: center;\n}\n\n.colorpicker-header .picked-color.light {\n\tcolor: black;\n}\n\n.colorpicker-header .original-color {\n\twidth: 74px;\n\tz-index: inherit;\n\tcursor: pointer;\n}\n\n\n/* Body */\n\n.colorpicker-body {\n\tdisplay: flex;\n\tpadding: 8px;\n\tposition: relative;\n}\n\n.colorpicker-body .saturation-wrap {\n\toverflow: hidden;\n\theight: 150px;\n\tposition: relative;\n\tmin-width: 220px;\n\tflex: 1;\n}\n\n.colorpicker-body .saturation-box {\n\theight: 150px;\n\tposition: absolute;\n}\n\n.colorpicker-body .saturation-selection {\n\twidth: 9px;\n\theight: 9px;\n\tmargin: -5px 0 0 -5px;\n\tborder: 1px solid rgb(255, 255, 255);\n\tborder-radius: 100%;\n\tbox-shadow: 0px 0px 2px rgba(0, 0, 0, 0.8);\n\tposition: absolute;\n}\n\n.colorpicker-body .strip {\n\twidth: 25px;\n\theight: 150px;\n}\n\n.colorpicker-body .hue-strip {\n\tposition: relative;\n\tmargin-left: 8px;\n\tcursor: -webkit-grab;\n\tbackground: linear-gradient(to bottom, #ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%);\n}\n\n.colorpicker-body .opacity-strip {\n\tposition: relative;\n\tmargin-left: 8px;\n\tcursor: -webkit-grab;\n\tbackground: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAYAAACp8Z5+AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAZdEVYdFNvZnR3YXJlAHBhaW50Lm5ldCA0LjAuMTZEaa/1AAAAHUlEQVQYV2PYvXu3JAi7uLiAMaYAjAGTQBPYLQkAa/0Zef3qRswAAAAASUVORK5CYII=");\n\tbackground-size: 9px 9px;\n\timage-rendering: pixelated;\n}\n\n.colorpicker-body .strip.grabbing {\n\tcursor: -webkit-grabbing;\n}\n\n.colorpicker-body .slider {\n\tposition: absolute;\n\ttop: 0;\n\tleft: -2px;\n\twidth: calc(100% + 4px);\n\theight: 4px;\n\tbox-sizing: border-box;\n\tborder: 1px solid rgba(255, 255, 255, 0.71);\n\tbox-shadow: 0px 0px 1px rgba(0, 0, 0, 0.85);\n}\n\n.colorpicker-body .strip .overlay {\n\theight: 150px;\n\tpointer-events: none;\n}',""])},9957:(e,t,n)=>{(e.exports=n(8826)(!1)).push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor.vs .dnd-target {\n\tborder-right: 2px dotted black;\n\tcolor: white; /* opposite of black */\n}\n.monaco-editor.vs-dark .dnd-target {\n\tborder-right: 2px dotted #AEAFAD;\n\tcolor: #51504f; /* opposite of #AEAFAD */\n}\n.monaco-editor.hc-black .dnd-target {\n\tborder-right: 2px dotted #fff;\n\tcolor: #000; /* opposite of #fff */\n}\n\n.monaco-editor.mouse-default .view-lines,\n.monaco-editor.vs-dark.mac.mouse-default .view-lines,\n.monaco-editor.hc-black.mac.mouse-default .view-lines {\n\tcursor: default;\n}\n.monaco-editor.mouse-copy .view-lines,\n.monaco-editor.vs-dark.mac.mouse-copy .view-lines,\n.monaco-editor.hc-black.mac.mouse-copy .view-lines {\n\tcursor: copy;\n}",""])},4701:(e,t,n)=>{(e.exports=n(8826)(!1)).push([e.id,'/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n/* Checkbox */\n\n.monaco-checkbox .label {\n\twidth: 12px;\n\theight: 12px;\n\tborder: 1px solid black;\n\tbackground-color: transparent;\n\tdisplay: inline-block;\n}\n\n.monaco-checkbox .checkbox {\n\tposition: absolute;\n\toverflow: hidden;\n\tclip: rect(0 0 0 0);\n\theight: 1px;\n\twidth: 1px;\n\tmargin: -1px;\n\tpadding: 0;\n\tborder: 0;\n}\n\n.monaco-checkbox .checkbox:checked + .label {\n\tbackground-color: black;\n}\n\n/* Find widget */\n.monaco-editor .find-widget {\n\tposition: absolute;\n\tz-index: 10;\n\ttop: -44px; /* find input height + shadow (10px) */\n\theight: 34px; /* find input height */\n\toverflow: hidden;\n\tline-height: 19px;\n\n\t-webkit-transition: top 200ms linear;\n\t-o-transition: top 200ms linear;\n\t-moz-transition: top 200ms linear;\n\t-ms-transition: top 200ms linear;\n\ttransition: top 200ms linear;\n\n\tpadding: 0 4px;\n}\n/* Find widget when replace is toggled on */\n.monaco-editor .find-widget.replaceToggled {\n\ttop: -74px; /* find input height + replace input height + shadow (10px) */\n\theight: 64px; /* find input height + replace input height */\n}\n.monaco-editor .find-widget.replaceToggled > .replace-part {\n\tdisplay: flex;\n\tdisplay: -webkit-flex;\n\talign-items: center;\n}\n\n.monaco-editor .find-widget.visible,\n.monaco-editor .find-widget.replaceToggled.visible {\n\ttop: 0;\n}\n\n.monaco-editor .find-widget .monaco-inputbox .input {\n\tbackground-color: transparent;\n\t/* Style to compensate for //winjs */\n\tmin-height: 0;\n}\n\n.monaco-editor .find-widget .replace-input .input {\n\tfont-size: 13px;\n}\n\n.monaco-editor .find-widget > .find-part,\n.monaco-editor .find-widget > .replace-part {\n\tmargin: 4px 0 0 17px;\n\tfont-size: 12px;\n\tdisplay: flex;\n\tdisplay: -webkit-flex;\n\talign-items: center;\n}\n\n.monaco-editor .find-widget > .find-part .monaco-inputbox,\n.monaco-editor .find-widget > .replace-part .monaco-inputbox {\n\theight: 25px;\n}\n\n.monaco-editor .find-widget > .find-part .monaco-inputbox > .wrapper > .input {\n\twidth: 100% !important;\n\tpadding-right: 66px;\n}\n.monaco-editor .find-widget > .find-part .monaco-inputbox > .wrapper > .input,\n.monaco-editor .find-widget > .replace-part .monaco-inputbox > .wrapper > .input {\n\tpadding-top: 2px;\n\tpadding-bottom: 2px;\n}\n\n.monaco-editor .find-widget .monaco-findInput {\n\tvertical-align: middle;\n\tdisplay: flex;\n\tdisplay: -webkit-flex;\n\tflex:1;\n}\n\n.monaco-editor .find-widget .matchesCount {\n\tdisplay: flex;\n\tdisplay: -webkit-flex;\n\tflex: initial;\n\tmargin: 0 1px 0 3px;\n\tpadding: 2px 2px 0 2px;\n\theight: 25px;\n\tvertical-align: middle;\n\tbox-sizing: border-box;\n\ttext-align: center;\n\tline-height: 23px;\n}\n\n.monaco-editor .find-widget .button {\n\tmin-width: 20px;\n\twidth: 20px;\n\theight: 20px;\n\tdisplay: flex;\n\tdisplay: -webkit-flex;\n\tflex: initial;\n\tmargin-left: 3px;\n\tbackground-position: center center;\n\tbackground-repeat: no-repeat;\n\tcursor: pointer;\n}\n\n.monaco-editor .find-widget .button:not(.disabled):hover {\n\tbackground-color: rgba(0, 0, 0, 0.1);\n}\n\n.monaco-editor .find-widget .button.left {\n\tmargin-left: 0;\n\tmargin-right: 3px;\n}\n\n.monaco-editor .find-widget .button.wide {\n\twidth: auto;\n\tpadding: 1px 6px;\n\ttop: -1px;\n}\n\n.monaco-editor .find-widget .button.toggle {\n\tposition: absolute;\n\ttop: 0;\n\tleft: 0;\n\twidth: 18px;\n\theight: 100%;\n\t-webkit-box-sizing:\tborder-box;\n\t-o-box-sizing:\t\tborder-box;\n\t-moz-box-sizing:\tborder-box;\n\t-ms-box-sizing:\t\tborder-box;\n\tbox-sizing:\t\t\tborder-box;\n}\n\n.monaco-editor .find-widget .button.toggle.disabled {\n\tdisplay: none;\n}\n\n.monaco-editor .find-widget .previous {\n\tbackground-image: url("data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiCgkgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIKCSB4PSIwcHgiIHk9IjBweCIgd2lkdGg9IjE2cHgiIGhlaWdodD0iMTZweCIgdmlld0JveD0iLTEgLTMgMTYgMTYiIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgLTEgLTMgMTYgMTYiIHhtbDpzcGFjZT0icHJlc2VydmUiPgo8cG9seWdvbiBmaWxsPSIjNDI0MjQyIiBwb2ludHM9IjEzLDQgNiw0IDksMSA2LDEgMiw1IDYsOSA5LDkgNiw2IDEzLDYgIi8+Cjwvc3ZnPgo=");\n}\n\n.monaco-editor .find-widget .next {\n\tbackground-image: url("data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiCgkgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIKCSB4PSIwcHgiIHk9IjBweCIgd2lkdGg9IjE2cHgiIGhlaWdodD0iMTZweCIgdmlld0JveD0iLTEgLTMgMTYgMTYiIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgLTEgLTMgMTYgMTYiIHhtbDpzcGFjZT0icHJlc2VydmUiPgo8cGF0aCBmaWxsPSIjNDI0MjQyIiBkPSJNMSw0aDdMNSwxaDNsNCw0TDgsOUg1bDMtM0gxVjR6Ii8+Cjwvc3ZnPgo=");\n}\n\n.monaco-editor .find-widget .disabled {\n\topacity: 0.3;\n\tcursor: default;\n}\n\n.monaco-editor .find-widget .monaco-checkbox {\n\twidth: 20px;\n\theight: 20px;\n\tdisplay: inline-block;\n\tvertical-align: middle;\n\tmargin-left: 3px;\n}\n\n.monaco-editor .find-widget .monaco-checkbox .label {\n\tcontent: \'\';\n\tdisplay: inline-block;\n\tbackground-repeat: no-repeat;\n\tbackground-position: 0 0;\n\tbackground-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCI+CjxnIHRyYW5zZm9ybT0idHJhbnNsYXRlKDAsLTEwMzIuMzYyMikiPgogIDxyZWN0IHdpZHRoPSI5IiBoZWlnaHQ9IjIiIHg9IjIiIHk9IjEwNDYuMzYyMiIgc3R5bGU9ImZpbGw6IzQyNDI0MjtmaWxsLW9wYWNpdHk6MTtzdHJva2U6bm9uZSIgLz4KICA8cmVjdCB3aWR0aD0iMTMiIGhlaWdodD0iMiIgeD0iMiIgeT0iMTA0My4zNjIyIiBzdHlsZT0iZmlsbDojNDI0MjQyO2ZpbGwtb3BhY2l0eToxO3N0cm9rZTpub25lIiAvPgogIDxyZWN0IHdpZHRoPSI2IiBoZWlnaHQ9IjIiIHg9IjIiIHk9IjEwNDAuMzYyMiIgc3R5bGU9ImZpbGw6IzQyNDI0MjtmaWxsLW9wYWNpdHk6MTtzdHJva2U6bm9uZSIgLz4KICA8cmVjdCB3aWR0aD0iMTIiIGhlaWdodD0iMiIgeD0iMiIgeT0iMTAzNy4zNjIyIiBzdHlsZT0iZmlsbDojNDI0MjQyO2ZpbGwtb3BhY2l0eToxO3N0cm9rZTpub25lIiAvPgo8L2c+Cjwvc3ZnPg==");\n\twidth: 20px;\n\theight: 20px;\n\tborder: none;\n}\n\n.monaco-editor .find-widget .monaco-checkbox .checkbox:disabled + .label {\n\topacity: 0.3;\n\tcursor: default;\n}\n\n.monaco-editor .find-widget .monaco-checkbox .checkbox:not(:disabled) + .label {\n\tcursor: pointer;\n}\n\n.monaco-editor .find-widget .monaco-checkbox .checkbox:not(:disabled):hover:before + .label {\n\tbackground-color: #DDD;\n}\n\n.monaco-editor .find-widget .monaco-checkbox .checkbox:checked + .label {\n\tbackground-color: rgba(100, 100, 100, 0.2);\n}\n\n.monaco-editor .find-widget .close-fw {\n\tbackground-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgdmlld0JveD0iMyAzIDE2IDE2IiBlbmFibGUtYmFja2dyb3VuZD0ibmV3IDMgMyAxNiAxNiI+PHBvbHlnb24gZmlsbD0iIzQyNDI0MiIgcG9pbnRzPSIxMi41OTcsMTEuMDQyIDE1LjQsMTMuODQ1IDEzLjg0NCwxNS40IDExLjA0MiwxMi41OTggOC4yMzksMTUuNCA2LjY4MywxMy44NDUgOS40ODUsMTEuMDQyIDYuNjgzLDguMjM5IDguMjM4LDYuNjgzIDExLjA0Miw5LjQ4NiAxMy44NDUsNi42ODMgMTUuNCw4LjIzOSIvPjwvc3ZnPg==");\n}\n\n.monaco-editor .find-widget .expand {\n\tbackground-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+PHBhdGggZmlsbD0iIzY0NjQ2NSIgZD0iTTExIDEwLjA3aC01LjY1Nmw1LjY1Ni01LjY1NnY1LjY1NnoiLz48L3N2Zz4=");\n}\n\n.monaco-editor .find-widget .collapse {\n\tbackground-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+PHBhdGggZmlsbD0iIzY0NjQ2NSIgZD0iTTYgNHY4bDQtNC00LTR6bTEgMi40MTRsMS41ODYgMS41ODYtMS41ODYgMS41ODZ2LTMuMTcyeiIvPjwvc3ZnPg==");\n}\n\n.monaco-editor .find-widget .replace {\n\tbackground-image: url("data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IiB3aWR0aD0iMTZweCIKCSBoZWlnaHQ9IjE2cHgiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgMTYgMTYiIHhtbDpzcGFjZT0icHJlc2VydmUiPgo8ZyBpZD0iaWNvbl94NUZfYmciPgoJPGc+CgkJPHBhdGggZmlsbD0iIzQyNDI0MiIgZD0iTTExLDNWMWgtMXY1djFoMWgyaDFWNFYzSDExeiBNMTMsNmgtMlY0aDJWNnoiLz4KCQk8cGF0aCBmaWxsPSIjNDI0MjQyIiBkPSJNMiwxNWg3VjlIMlYxNXogTTQsMTBoM3YxSDV2MmgydjFINFYxMHoiLz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1TDMsNkwyLjk3OSwzLjVjMC0wLjI3NSwwLjIyNS0wLjUsMC41LTAuNUg3VjJIMy40NzkKCQlDMi42NTEsMiwxLjk3OSwyLjY3MywxLjk3OSwzLjV6Ii8+CjwvZz4KPC9zdmc+Cg==");\n}\n\n.monaco-editor .find-widget > .replace-part {\n\tdisplay: none;\n}\n\n.monaco-editor .find-widget > .replace-part > .replace-input {\n\tdisplay: flex;\n\tdisplay: -webkit-flex;\n\tvertical-align: middle;\n\twidth: auto !important;\n}\n\n/* REDUCED */\n.monaco-editor .find-widget.reduced-find-widget .matchesCount,\n.monaco-editor .find-widget.reduced-find-widget .monaco-checkbox {\n\tdisplay:none;\n}\n\n/* NARROW (SMALLER THAN REDUCED) */\n.monaco-editor .find-widget.narrow-find-widget {\n\tmax-width: 257px !important;\n}\n\n/* COLLAPSED (SMALLER THAN NARROW) */\n.monaco-editor .find-widget.collapsed-find-widget {\n\tmax-width: 111px !important;\n}\n\n.monaco-editor .find-widget.collapsed-find-widget .button.previous,\n.monaco-editor .find-widget.collapsed-find-widget .button.next,\n.monaco-editor .find-widget.collapsed-find-widget .button.replace,\n.monaco-editor .find-widget.collapsed-find-widget .button.replace-all,\n.monaco-editor .find-widget.collapsed-find-widget > .find-part .monaco-findInput .controls {\n\tdisplay:none;\n}\n\n.monaco-editor .find-widget.collapsed-find-widget > .find-part .monaco-inputbox > .wrapper > .input {\n\tpadding-right: 0px;\n}\n\n.monaco-editor .findMatch {\n\t-webkit-animation-duration: 0;\n\t-webkit-animation-name: inherit !important;\n\t-moz-animation-duration: 0;\n\t-moz-animation-name: inherit !important;\n\t-ms-animation-duration: 0;\n\t-ms-animation-name: inherit !important;\n\tanimation-duration: 0;\n\tanimation-name: inherit !important;\n}\n\n.monaco-editor .find-widget .monaco-sash {\n\twidth: 2px !important;\n\tmargin-left: -4px;\n}\n\n.monaco-editor.hc-black .find-widget .previous,\n.monaco-editor.vs-dark .find-widget .previous {\n\tbackground-image: url("data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiCgkgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIKCSB4PSIwcHgiIHk9IjBweCIgd2lkdGg9IjE2cHgiIGhlaWdodD0iMTZweCIgdmlld0JveD0iLTEgLTMgMTYgMTYiIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgLTEgLTMgMTYgMTYiIHhtbDpzcGFjZT0icHJlc2VydmUiPgo8cG9seWdvbiBmaWxsPSIjQzVDNUM1IiBwb2ludHM9IjEzLDQgNiw0IDksMSA2LDEgMiw1IDYsOSA5LDkgNiw2IDEzLDYgIi8+Cjwvc3ZnPgo=");\n}\n\n.monaco-editor.hc-black .find-widget .next,\n.monaco-editor.vs-dark .find-widget .next {\n\tbackground-image: url("data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiCgkgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIKCSB4PSIwcHgiIHk9IjBweCIgd2lkdGg9IjE2cHgiIGhlaWdodD0iMTZweCIgdmlld0JveD0iLTEgLTMgMTYgMTYiIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgLTEgLTMgMTYgMTYiIHhtbDpzcGFjZT0icHJlc2VydmUiPgo8cGF0aCBmaWxsPSIjQzVDNUM1IiBkPSJNMSw0aDdMNSwxaDNsNCw0TDgsOUg1bDMtM0gxVjR6Ii8+Cjwvc3ZnPgo=");\n}\n\n.monaco-editor.hc-black .find-widget .monaco-checkbox .label,\n.monaco-editor.vs-dark .find-widget .monaco-checkbox .label {\n\tbackground-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCI+CjxnIHRyYW5zZm9ybT0idHJhbnNsYXRlKDAsLTEwMzIuMzYyMikiPgogIDxyZWN0IHdpZHRoPSI5IiBoZWlnaHQ9IjIiIHg9IjIiIHk9IjEwNDYuMzYyMiIgc3R5bGU9ImZpbGw6I0M1QzVDNTtmaWxsLW9wYWNpdHk6MTtzdHJva2U6bm9uZSIgLz4KICA8cmVjdCB3aWR0aD0iMTMiIGhlaWdodD0iMiIgeD0iMiIgeT0iMTA0My4zNjIyIiBzdHlsZT0iZmlsbDojQzVDNUM1O2ZpbGwtb3BhY2l0eToxO3N0cm9rZTpub25lIiAvPgogIDxyZWN0IHdpZHRoPSI2IiBoZWlnaHQ9IjIiIHg9IjIiIHk9IjEwNDAuMzYyMiIgc3R5bGU9ImZpbGw6I0M1QzVDNTtmaWxsLW9wYWNpdHk6MTtzdHJva2U6bm9uZSIgLz4KICA8cmVjdCB3aWR0aD0iMTIiIGhlaWdodD0iMiIgeD0iMiIgeT0iMTAzNy4zNjIyIiBzdHlsZT0iZmlsbDojQzVDNUM1O2ZpbGwtb3BhY2l0eToxO3N0cm9rZTpub25lIiAvPgo8L2c+Cjwvc3ZnPg==");\n}\n\n.monaco-editor.vs-dark .find-widget .monaco-checkbox .checkbox:not(:disabled):hover:before + .label {\n\tbackground-color: rgba(255, 255, 255, 0.1);\n}\n\n.monaco-editor.vs-dark .find-widget .monaco-checkbox .checkbox:checked + .label {\n\tbackground-color: rgba(255, 255, 255, 0.1);\n}\n\n.monaco-editor.hc-black .find-widget .close-fw,\n.monaco-editor.vs-dark .find-widget .close-fw {\n\tbackground-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgdmlld0JveD0iMyAzIDE2IDE2IiBlbmFibGUtYmFja2dyb3VuZD0ibmV3IDMgMyAxNiAxNiI+PHBvbHlnb24gZmlsbD0iI2U4ZThlOCIgcG9pbnRzPSIxMi41OTcsMTEuMDQyIDE1LjQsMTMuODQ1IDEzLjg0NCwxNS40IDExLjA0MiwxMi41OTggOC4yMzksMTUuNCA2LjY4MywxMy44NDUgOS40ODUsMTEuMDQyIDYuNjgzLDguMjM5IDguMjM4LDYuNjgzIDExLjA0Miw5LjQ4NiAxMy44NDUsNi42ODMgMTUuNCw4LjIzOSIvPjwvc3ZnPg==");\n}\n\n.monaco-editor.hc-black .find-widget .replace,\n.monaco-editor.vs-dark .find-widget .replace {\n\tbackground-image: url("data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IiB3aWR0aD0iMTZweCIKCSBoZWlnaHQ9IjE2cHgiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgMTYgMTYiIHhtbDpzcGFjZT0icHJlc2VydmUiPgo8ZyBpZD0iaWNvbl94NUZfYmciPgoJPGc+CgkJPHBhdGggZmlsbD0iI0M1QzVDNSIgZD0iTTExLDNWMWgtMXY1djFoMWgyaDFWNFYzSDExeiBNMTMsNmgtMlY0aDJWNnoiLz4KCQk8cGF0aCBmaWxsPSIjQzVDNUM1IiBkPSJNMiwxNWg3VjlIMlYxNXogTTQsMTBoM3YxSDV2MmgydjFINFYxMHoiLz4KCTwvZz4KPC9nPgo8ZyBpZD0iY29sb3JfeDVGX2ltcG9ydGFuY2UiPgoJPHBhdGggZmlsbD0iIzc1QkVGRiIgZD0iTTMuOTc5LDMuNUw0LDZMMyw1djEuNUw0LjUsOEw2LDYuNVY1TDUsNkw0Ljk3OSwzLjVjMC0wLjI3NSwwLjIyNS0wLjUsMC41LTAuNUg5VjJINS40NzkKCQlDNC42NTEsMiwzLjk3OSwyLjY3MywzLjk3OSwzLjV6Ii8+CjwvZz4KPC9zdmc+Cg==");\n}\n\n.monaco-editor.hc-black .find-widget .replace-all,\n.monaco-editor.vs-dark .find-widget .replace-all {\n\tbackground-image: url("data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IiB3aWR0aD0iMTZweCIKCSBoZWlnaHQ9IjE2cHgiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgMTYgMTYiIHhtbDpzcGFjZT0icHJlc2VydmUiPgo8ZyBpZD0iaWNvbl94NUZfYmciPgoJPHBhdGggZmlsbD0iI0M1QzVDNSIgZD0iTTExLDE1VjlIMXY2SDExeiBNMiwxNHYtMmgxdi0xSDJ2LTFoM3Y0SDJ6IE0xMCwxMUg4djJoMnYxSDd2LTRoM1YxMXogTTMsMTN2LTFoMXYxSDN6IE0xMyw3djZoLTFWOEg1VjcKCQlIMTN6IE0xMywyVjFoLTF2NWgzVjJIMTN6IE0xNCw1aC0xVjNoMVY1eiBNMTEsMnY0SDhWNGgxdjFoMVY0SDlWM0g4VjJIMTF6Ii8+CjwvZz4KPGcgaWQ9ImNvbG9yX3g1Rl9hY3Rpb24iPgoJPHBhdGggZmlsbD0iIzc1QkVGRiIgZD0iTTEuOTc5LDMuNUwyLDZMMSw1djEuNUwyLjUsOEw0LDYuNVY1TDMsNkwyLjk3OSwzLjVjMC0wLjI3NSwwLjIyNS0wLjUsMC41LTAuNUg3VjJIMy40NzkKCQlDMi42NTEsMiwxLjk3OSwyLjY3MywxLjk3OSwzLjV6Ii8+CjwvZz4KPC9zdmc+Cg==");\n}\n\n.monaco-editor.hc-black .find-widget .expand,\n.monaco-editor.vs-dark .find-widget .expand {\n\tbackground-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+PHBhdGggZmlsbD0iI2U4ZThlOCIgZD0iTTExIDEwLjA3aC01LjY1Nmw1LjY1Ni01LjY1NnY1LjY1NnoiLz48L3N2Zz4=");\n}\n\n.monaco-editor.hc-black .find-widget .collapse,\n.monaco-editor.vs-dark .find-widget .collapse {\n\tbackground-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+PHBhdGggZmlsbD0iI2U4ZThlOCIgZD0iTTYgNHY4bDQtNC00LTR6bTEgMi40MTRsMS41ODYgMS41ODYtMS41ODYgMS41ODZ2LTMuMTcyeiIvPjwvc3ZnPg==");\n}\n\n.monaco-editor.hc-black .find-widget .button:not(.disabled):hover,\n.monaco-editor.vs-dark .find-widget .button:not(.disabled):hover {\n\tbackground-color: rgba(255, 255, 255, 0.1);\n}\n\n.monaco-editor.hc-black .find-widget .button:before {\n\tposition: relative;\n\ttop: 1px;\n\tleft: 2px;\n}\n\n.monaco-editor.hc-black .find-widget .monaco-checkbox .checkbox:checked + .label {\n\tbackground-color: rgba(255, 255, 255, 0.1);\n}\n',""])},9333:(e,t,n)=>{(e.exports=n(8826)(!1)).push([e.id,'/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .margin-view-overlays .folding {\n\tmargin-left: 5px;\n\tcursor: pointer;\n\tbackground-repeat: no-repeat;\n\tbackground-origin: border-box;\n\tbackground-position: 3px center;\n\tbackground-size: 15px;\n\topacity: 0;\n\ttransition: opacity 0.5s;\n}\n\n.monaco-editor .margin-view-overlays .folding {\n\tbackground-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgMTUgMTUiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDE1IDE1OyI+CjxwYXRoIHN0eWxlPSJmaWxsOiNCNkI2QjYiIGQ9Ik0xMSw0djdINFY0SDExIE0xMiwzSDN2OWg5VjNMMTIsM3oiLz4KPGxpbmUgc3R5bGU9ImZpbGw6bm9uZTtzdHJva2U6IzZCNkI2QjtzdHJva2UtbWl0ZXJsaW1pdDoxMCIgeDE9IjEwIiB5MT0iNy41IiB4Mj0iNSIgeTI9IjcuNSIvPgo8L3N2Zz4=");\n}\n\n.monaco-editor.hc-black .margin-view-overlays .folding,\n.monaco-editor.vs-dark .margin-view-overlays .folding {\n\tbackground-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgMTUgMTUiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDE1IDE1OyI+CjxwYXRoIHN0eWxlPSJmaWxsOiM1QTVBNUEiIGQ9Ik0xMSw0djdINFY0SDExIE0xMiwzSDN2OWg5VjNMMTIsM3oiLz4KPGxpbmUgc3R5bGU9ImZpbGw6bm9uZTtzdHJva2U6I0M1QzVDNTtzdHJva2UtbWl0ZXJsaW1pdDoxMCIgeDE9IjEwIiB5MT0iNy41IiB4Mj0iNSIgeTI9IjcuNSIvPgo8L3N2Zz4=");\n}\n\n.monaco-editor .margin-view-overlays:hover .folding,\n.monaco-editor .margin-view-overlays .folding.alwaysShowFoldIcons {\n\topacity: 1;\n}\n\n.monaco-editor .margin-view-overlays .folding.collapsed {\n\tbackground-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgMTUgMTUiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDE1IDE1OyI+CjxyZWN0IHg9IjMiIHk9IjMiIHN0eWxlPSJmaWxsOiNFOEU4RTgiIHdpZHRoPSI5IiBoZWlnaHQ9IjkiLz4KPHBhdGggc3R5bGU9ImZpbGw6I0I2QjZCNiIgZD0iTTExLDR2N0g0VjRIMTEgTTEyLDNIM3Y5aDlWM0wxMiwzeiIvPgo8bGluZSBzdHlsZT0iZmlsbDpub25lO3N0cm9rZTojNkI2QjZCO3N0cm9rZS1taXRlcmxpbWl0OjEwIiB4MT0iMTAiIHkxPSI3LjUiIHgyPSI1IiB5Mj0iNy41Ii8+CjxsaW5lIHN0eWxlPSJmaWxsOm5vbmU7c3Ryb2tlOiM2QjZCNkI7c3Ryb2tlLW1pdGVybGltaXQ6MTAiIHgxPSI3LjUiIHkxPSI1IiB4Mj0iNy41IiB5Mj0iMTAiLz4KPC9zdmc+");\n\topacity: 1;\n}\n\n.monaco-editor.hc-black .margin-view-overlays .folding.collapsed,\n.monaco-editor.vs-dark .margin-view-overlays .folding.collapsed {\n\tbackground-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgMTUgMTUiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDE1IDE1OyI+CjxyZWN0IHg9IjMiIHk9IjMiIHN0eWxlPSJvcGFjaXR5OjAuMTtmaWxsOiNGRkZGRkYiIHdpZHRoPSI5IiBoZWlnaHQ9IjkiLz4KPHBhdGggc3R5bGU9ImZpbGw6IzVBNUE1QSIgZD0iTTExLDR2N0g0VjRIMTEgTTEyLDNIM3Y5aDlWM0wxMiwzeiIvPgo8bGluZSBzdHlsZT0iZmlsbDpub25lO3N0cm9rZTojQzVDNUM1O3N0cm9rZS1taXRlcmxpbWl0OjEwIiB4MT0iMTAiIHkxPSI3LjUiIHgyPSI1IiB5Mj0iNy41Ii8+CjxsaW5lIHN0eWxlPSJmaWxsOm5vbmU7c3Ryb2tlOiNDNUM1QzU7c3Ryb2tlLW1pdGVybGltaXQ6MTAiIHgxPSI3LjUiIHkxPSI1IiB4Mj0iNy41IiB5Mj0iMTAiLz4KPC9zdmc+");\n}\n\n.monaco-editor .inline-folded:after {\n\tcolor: grey;\n\tmargin: 0.1em 0.2em 0 0.2em;\n\tcontent: "\\22EF";\n\tdisplay: inline;\n\tline-height: 1em;\n\tcursor: pointer;\n}\n\n',""])},7490:(e,t,n)=>{(e.exports=n(8826)(!1)).push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .goto-definition-link {\n\ttext-decoration: underline;\n\tcursor: pointer;\n}",""])},561:(e,t,n)=>{(e.exports=n(8826)(!1)).push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n/* marker zone */\n\n.monaco-editor .marker-widget {\n\tpadding-left: 2px;\n\ttext-overflow: ellipsis;\n\twhite-space: nowrap;\n}\n\n.monaco-editor .marker-widget > .stale {\n\topacity: 0.6;\n\tfont-style: italic;\n}\n\n.monaco-editor .marker-widget div.block {\n\tdisplay: inline-block;\n\tvertical-align: top;\n}\n\n.monaco-editor .marker-widget .title {\n\tdisplay: inline-block;\n\tpadding-right: 5px;\n}\n\n.monaco-editor .marker-widget .descriptioncontainer {\n\tposition: relative;\n\twhite-space: pre;\n\t-webkit-user-select: text;\n\tuser-select: text;\n}\n\n.monaco-editor .marker-widget .descriptioncontainer .filename {\n\tcursor: pointer;\n\topacity: 0.6;\n}\n",""])},4053:(e,t,n)=>{(e.exports=n(8826)(!1)).push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor-hover {\n\tcursor: default;\n\tposition: absolute;\n\toverflow: hidden;\n\tz-index: 50;\n\t-webkit-user-select: text;\n\t-ms-user-select: text;\n\t-khtml-user-select: text;\n\t-moz-user-select: text;\n\t-o-user-select: text;\n\tuser-select: text;\n\tbox-sizing: initial;\n\tanimation: fadein 100ms linear;\n\tline-height: 1.5em;\n}\n\n.monaco-editor-hover.hidden {\n\tdisplay: none;\n}\n\n.monaco-editor-hover .monaco-editor-hover-content {\n\tmax-width: 500px;\n}\n\n.monaco-editor-hover .hover-row {\n\tpadding: 4px 5px;\n}\n\n.monaco-editor-hover p,\n.monaco-editor-hover ul {\n\tmargin: 8px 0;\n}\n\n.monaco-editor-hover p:first-child,\n.monaco-editor-hover ul:first-child {\n\tmargin-top: 0;\n}\n\n.monaco-editor-hover p:last-child,\n.monaco-editor-hover ul:last-child {\n\tmargin-bottom: 0;\n}\n\n.monaco-editor-hover ul {\n\tpadding-left: 20px;\n}\n\n.monaco-editor-hover li > p {\n\tmargin-bottom: 0;\n}\n\n.monaco-editor-hover li > ul {\n\tmargin-top: 0;\n}\n\n.monaco-editor-hover code {\n\tborder-radius: 3px;\n\tpadding: 0 0.4em;\n}\n\n.monaco-editor-hover .monaco-tokenized-source {\n\twhite-space: pre-wrap;\n\tword-break: break-all;\n}\n",""])},7913:(e,t,n)=>{(e.exports=n(8826)(!1)).push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n.monaco-editor .detected-link,\n.monaco-editor .detected-link-active {\n\ttext-decoration: underline;\n\ttext-underline-position: under;\n}\n\n.monaco-editor .detected-link-active {\n\tcursor: pointer;\n}\n",""])},7181:(e,t,n)=>{(e.exports=n(8826)(!1)).push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .monaco-editor-overlaymessage {\n\tpadding-bottom: 8px;\n}\n\n@keyframes fadeIn {\n\tfrom { opacity: 0; }\n\tto { opacity: 1; }\n}\n.monaco-editor .monaco-editor-overlaymessage.fadeIn {\n\tanimation: fadeIn 150ms ease-out;\n}\n\n@keyframes fadeOut {\n\tfrom { opacity: 1; }\n\tto { opacity: 0; }\n}\n.monaco-editor .monaco-editor-overlaymessage.fadeOut {\n\tanimation: fadeOut 100ms ease-out;\n}\n\n.monaco-editor .monaco-editor-overlaymessage .message {\n\tpadding: 1px 4px;\n}\n\n.monaco-editor .monaco-editor-overlaymessage .anchor {\n\twidth: 0 !important;\n\theight: 0 !important;\n\tborder-color: transparent;\n\tborder-style: solid;\n\tz-index: 1000;\n\tborder-width: 8px;\n\tposition: absolute;\n}\n",""])},4737:(e,t,n)=>{(e.exports=n(8826)(!1)).push([e.id,'/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .parameter-hints-widget {\n\tz-index: 10;\n\tdisplay: flex;\n\tflex-direction: column;\n\tline-height: 1.5em;\n}\n\n.monaco-editor .parameter-hints-widget > .wrapper {\n\tmax-width: 440px;\n\tdisplay: flex;\n\tflex-direction: column;\n}\n\n.monaco-editor .parameter-hints-widget.multiple {\n\tmin-height: 3.3em;\n\tpadding: 0 0 0 1.9em;\n}\n\n.monaco-editor .parameter-hints-widget.visible {\n\t-webkit-transition: left .05s ease-in-out;\n\t-moz-transition: left .05s ease-in-out;\n\t-o-transition: left .05s ease-in-out;\n\ttransition: left .05s ease-in-out;\n}\n\n.monaco-editor .parameter-hints-widget p,\n.monaco-editor .parameter-hints-widget ul {\n\tmargin: 8px 0;\n}\n\n.monaco-editor .parameter-hints-widget .monaco-scrollable-element,\n.monaco-editor .parameter-hints-widget .body {\n\tdisplay: flex;\n\tflex-direction: column;\n}\n\n.monaco-editor .parameter-hints-widget .signature {\n\tpadding: 4px 5px;\n}\n\n.monaco-editor .parameter-hints-widget .docs {\n\tpadding: 0 10px 0 5px;\n\twhite-space: pre-wrap;\n}\n\n.monaco-editor .parameter-hints-widget .docs .markdown-docs {\n\twhite-space: initial;\n}\n\n.monaco-editor .parameter-hints-widget .docs .code {\n\twhite-space: pre-wrap;\n}\n\n.monaco-editor .parameter-hints-widget .docs code {\n\tborder-radius: 3px;\n\tpadding: 0 0.4em;\n}\n\n.monaco-editor .parameter-hints-widget .buttons {\n\tposition: absolute;\n\tdisplay: none;\n\tbottom: 0;\n\tleft: 0;\n}\n\n.monaco-editor .parameter-hints-widget.multiple .buttons {\n\tdisplay: block;\n}\n\n.monaco-editor .parameter-hints-widget.multiple .button {\n\tposition: absolute;\n\tleft: 2px;\n\twidth: 16px;\n\theight: 16px;\n\tbackground-repeat: no-repeat;\n\tcursor: pointer;\n}\n\n.monaco-editor .parameter-hints-widget .button.previous {\n\tbottom: 24px;\n\tbackground-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiI+PHBhdGggZmlsbD0iIzQyNDI0MiIgZD0iTTEwLjggOS41bC45LS45TDguMSA1IDQuMiA4LjZsLjkuOSAzLTIuNyAyLjcgMi43eiIvPjwvc3ZnPg==");\n}\n\n.monaco-editor .parameter-hints-widget .button.next {\n\tbottom: 0;\n\tbackground-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiI+PHBhdGggZmlsbD0iIzQyNDI0MiIgZD0iTTUuMSA1bC0uOS45IDMuNiAzLjYgMy45LTMuNi0xLS45LTMgMi43TDUuMSA1eiIvPjwvc3ZnPg==");\n}\n\n.monaco-editor .parameter-hints-widget .overloads {\n\tposition: absolute;\n\tdisplay: none;\n\ttext-align: center;\n\tbottom: 14px;\n\tleft: 0;\n\twidth: 22px;\n\theight: 12px;\n\tline-height: 12px;\n\topacity: 0.5;\n}\n\n.monaco-editor .parameter-hints-widget.multiple .overloads {\n\tdisplay: block;\n}\n\n.monaco-editor .parameter-hints-widget .signature .parameter {\n\tdisplay: inline-block;\n}\n\n.monaco-editor .parameter-hints-widget .signature .parameter.active {\n\tfont-weight: bold;\n\ttext-decoration: underline;\n}\n\n.monaco-editor .parameter-hints-widget .documentation-parameter > .parameter {\n\tfont-weight: bold;\n\tmargin-right: 0.5em;\n}\n\n/*** VS Dark & High Contrast*/\n\n.monaco-editor.hc-black .parameter-hints-widget .button.previous,\n.monaco-editor.vs-dark .parameter-hints-widget .button.previous {\n\tbackground-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiI+PHBhdGggZmlsbD0iI0U4RThFOCIgZD0iTTEwLjggOS41bC45LS45TDguMSA1IDQuMiA4LjZsLjkuOSAzLTIuNyAyLjcgMi43eiIvPjwvc3ZnPg==");\n}\n\n.monaco-editor.hc-black .parameter-hints-widget .button.next,\n.monaco-editor.vs-dark .parameter-hints-widget .button.next {\n\tbackground-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiI+PHBhdGggZmlsbD0iI0U4RThFOCIgZD0iTTUuMSA1bC0uOS45IDMuNiAzLjYgMy45LTMuNi0xLS45LTMgMi43TDUuMSA1eiIvPjwvc3ZnPg==");\n}',""])},1445:(e,t,n)=>{(e.exports=n(8826)(!1)).push([e.id,'/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .peekview-widget .head {\n\t-webkit-box-sizing:\tborder-box;\n\t-o-box-sizing: border-box;\n\t-moz-box-sizing: border-box;\n\t-ms-box-sizing: border-box;\n\tbox-sizing:\tborder-box;\n\tdisplay: flex;\n}\n\n.monaco-editor .peekview-widget .head .peekview-title {\n\tdisplay: inline-block;\n\tfont-size: 13px;\n\tmargin-left: 20px;\n\tcursor: pointer;\n}\n\n.monaco-editor .peekview-widget .head .peekview-title .dirname:not(:empty) {\n\tfont-size: 0.9em;\n\tmargin-left: 0.5em;\n}\n\n.monaco-editor .peekview-widget .head .peekview-actions {\n\tflex: 1;\n\ttext-align: right;\n\tpadding-right: 2px;\n}\n\n.monaco-editor .peekview-widget .head .peekview-actions > .monaco-action-bar {\n\tdisplay: inline-block;\n}\n\n.monaco-editor .peekview-widget .head .peekview-actions > .monaco-action-bar,\n.monaco-editor .peekview-widget .head .peekview-actions > .monaco-action-bar > .actions-container {\n\theight: 100%;\n}\n\n.monaco-editor .peekview-widget .head .peekview-actions > .monaco-action-bar .action-item {\n\tmargin-left: 4px;\n}\n\n.monaco-editor .peekview-widget .head .peekview-actions > .monaco-action-bar .action-label {\n\twidth: 16px;\n\theight: 100%;\n\tmargin: 0;\n\tline-height: inherit;\n\tbackground-repeat: no-repeat;\n\tbackground-position: center center;\n}\n\n.monaco-editor .peekview-widget .head .peekview-actions > .monaco-action-bar .action-label.octicon {\n\tmargin: 0;\n}\n\n.monaco-editor .peekview-widget .head .peekview-actions .action-label.icon.close-peekview-action {\n\tbackground: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgdmlld0JveD0iMyAzIDE2IDE2IiBlbmFibGUtYmFja2dyb3VuZD0ibmV3IDMgMyAxNiAxNiI+PHBvbHlnb24gZmlsbD0iIzQyNDI0MiIgcG9pbnRzPSIxMi41OTcsMTEuMDQyIDE1LjQsMTMuODQ1IDEzLjg0NCwxNS40IDExLjA0MiwxMi41OTggOC4yMzksMTUuNCA2LjY4MywxMy44NDUgOS40ODUsMTEuMDQyIDYuNjgzLDguMjM5IDguMjM4LDYuNjgzIDExLjA0Miw5LjQ4NiAxMy44NDUsNi42ODMgMTUuNCw4LjIzOSIvPjwvc3ZnPg==") center center no-repeat;\n}\n\n.monaco-editor .peekview-widget > .body {\n\tborder-top: 1px solid;\n\tposition: relative;\n}\n\n/* Dark Theme */\n/* High Contrast Theme */\n\n.monaco-editor.hc-black .peekview-widget .head .peekview-actions .action-label.icon.close-peekview-action,\n.monaco-editor.vs-dark .peekview-widget .head .peekview-actions .action-label.icon.close-peekview-action {\n\tbackground: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgdmlld0JveD0iMyAzIDE2IDE2IiBlbmFibGUtYmFja2dyb3VuZD0ibmV3IDMgMyAxNiAxNiI+PHBvbHlnb24gZmlsbD0iI2U4ZThlOCIgcG9pbnRzPSIxMi41OTcsMTEuMDQyIDE1LjQsMTMuODQ1IDEzLjg0NCwxNS40IDExLjA0MiwxMi41OTggOC4yMzksMTUuNCA2LjY4MywxMy44NDUgOS40ODUsMTEuMDQyIDYuNjgzLDguMjM5IDguMjM4LDYuNjgzIDExLjA0Miw5LjQ4NiAxMy44NDUsNi42ODMgMTUuNCw4LjIzOSIvPjwvc3ZnPg==") center center no-repeat;\n}\n\n',""])},293:(e,t,n)=>{(e.exports=n(8826)(!1)).push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n/* -- zone widget */\n.monaco-editor .zone-widget .zone-widget-container.reference-zone-widget {\n\tborder-top-width: 1px;\n\tborder-bottom-width: 1px;\n}\n\n.monaco-editor .reference-zone-widget .inline {\n\tdisplay: inline-block;\n\tvertical-align: top;\n}\n\n.monaco-editor .reference-zone-widget .messages {\n\theight: 100%;\n\twidth: 100%;\n\ttext-align: center;\n\tpadding: 3em 0;\n}\n\n.monaco-editor .reference-zone-widget .ref-tree {\n\tline-height: 23px;\n}\n\n.monaco-editor .reference-zone-widget .ref-tree .reference {\n\ttext-overflow: ellipsis;\n\toverflow: hidden;\n}\n\n.monaco-editor .reference-zone-widget .ref-tree .reference-file {\n\tdisplay: inline-flex;\n\twidth: 100%;\n\theight: 100%;\n}\n\n.monaco-editor .reference-zone-widget .ref-tree .reference-file .count {\n\tmargin-right: 12px;\n\tmargin-left: auto;\n}\n\n/* High Contrast Theming */\n\n.monaco-editor.hc-black .reference-zone-widget .ref-tree .reference-file {\n\tfont-weight: bold;\n}\n",""])},3159:(e,t,n)=>{(e.exports=n(8826)(!1)).push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .rename-box {\n\tz-index: 100;\n\tcolor: inherit;\n}\n\n.monaco-editor .rename-box .rename-input {\n\tpadding: 4px;\n}\n",""])},6993:(e,t,n)=>{(e.exports=n(8826)(!1)).push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor.vs\t\t.snippet-placeholder { background-color: rgba(10, 50, 100, 0.2); min-width: 2px; }\n.monaco-editor.vs-dark\t.snippet-placeholder { background-color: rgba(124, 124, 124, 0.3); min-width: 2px; }\n.monaco-editor.hc-black\t.snippet-placeholder { background-color: rgba(124, 124, 124, 0.3); min-width: 2px; }\n\n.monaco-editor.vs\t\t.finish-snippet-placeholder { outline: rgba(10, 50, 100, 0.5) solid 1px; }\n.monaco-editor.vs-dark\t.finish-snippet-placeholder\t{ outline: #525252 solid 1px; }\n.monaco-editor.hc-black\t.finish-snippet-placeholder\t{ outline: #525252 solid 1px; }\n",""])},3376:(e,t,n)=>{(e.exports=n(8826)(!1)).push([e.id,'/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n/* Suggest widget*/\n.monaco-editor .suggest-widget {\n\tz-index: 40;\n}\n\n/** Initial widths **/\n\n.monaco-editor .suggest-widget {\n\twidth: 430px;\n}\n\n.monaco-editor .suggest-widget > .message,\n.monaco-editor .suggest-widget > .tree,\n.monaco-editor .suggest-widget > .details {\n\twidth: 100%;\n\tborder-style: solid;\n\tborder-width: 1px;\n\tbox-sizing: border-box;\n}\n\n.monaco-editor.hc-black .suggest-widget > .message,\n.monaco-editor.hc-black .suggest-widget > .tree,\n.monaco-editor.hc-black .suggest-widget > .details {\n\tborder-width: 2px;\n}\n\n/** Adjust width when docs are expanded to the side **/\n.monaco-editor .suggest-widget.docs-side {\n\twidth: 660px;\n}\n\n.monaco-editor .suggest-widget.docs-side > .tree,\n.monaco-editor .suggest-widget.docs-side > .details {\n\twidth: 50%;\n\tfloat: left;\n}\n\n.monaco-editor .suggest-widget.docs-side.list-right > .tree,\n.monaco-editor .suggest-widget.docs-side.list-right > .details {\n\tfloat: right;\n}\n\n\n/* Styles for Message element for when widget is loading or is empty */\n.monaco-editor .suggest-widget > .message {\n\tpadding-left: 22px;\n}\n\n/** Styles for the list element **/\n.monaco-editor .suggest-widget > .tree {\n\theight: 100%;\n}\n\n\n\n/** Styles for each row in the list element **/\n\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row {\n\tdisplay: flex;\n\t-mox-box-sizing: border-box;\n\tbox-sizing: border-box;\n\tpadding-right: 10px;\n\tbackground-repeat: no-repeat;\n\tbackground-position: 2px 2px;\n\twhite-space: nowrap;\n}\n\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row > .contents {\n\tflex: 1;\n\theight: 100%;\n\toverflow: hidden;\n\tpadding-left: 2px;\n}\n\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row > .contents > .main {\n\tdisplay: flex;\n\toverflow: hidden;\n\ttext-overflow: ellipsis;\n\twhite-space: pre;\n}\n\n.monaco-editor .suggest-widget:not(.frozen) .monaco-highlighted-label .highlight {\n\tfont-weight: bold;\n}\n\n/** Icon styles **/\n\n.monaco-editor .suggest-widget .details > .monaco-scrollable-element > .body > .header > .close,\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row > .contents > .main > .readMore {\n\topacity: 0.6;\n\tbackground-position: center center;\n\tbackground-repeat: no-repeat;\n\tbackground-size: 70%;\n\tcursor: pointer;\n}\n\n.monaco-editor .suggest-widget .details > .monaco-scrollable-element > .body > .header > .close {\n\tbackground-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgdmlld0JveD0iMyAzIDE2IDE2IiBlbmFibGUtYmFja2dyb3VuZD0ibmV3IDMgMyAxNiAxNiI+PHBvbHlnb24gZmlsbD0iIzQyNDI0MiIgcG9pbnRzPSIxMi41OTcsMTEuMDQyIDE1LjQsMTMuODQ1IDEzLjg0NCwxNS40IDExLjA0MiwxMi41OTggOC4yMzksMTUuNCA2LjY4MywxMy44NDUgOS40ODUsMTEuMDQyIDYuNjgzLDguMjM5IDguMjM4LDYuNjgzIDExLjA0Miw5LjQ4NiAxMy44NDUsNi42ODMgMTUuNCw4LjIzOSIvPjwvc3ZnPg==");\n\tfloat: right;\n\tmargin-right: 5px;\n}\n\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row > .contents > .main > .readMore {\n\tbackground-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+PHBhdGggZD0iTTggMWMtMy44NjUgMC03IDMuMTM1LTcgN3MzLjEzNSA3IDcgNyA3LTMuMTM1IDctNy0zLjEzNS03LTctN3ptMSAxMmgtMnYtN2gydjd6bTAtOGgtMnYtMmgydjJ6IiBmaWxsPSIjMUJBMUUyIi8+PHBhdGggZD0iTTcgNmgydjdoLTJ2LTd6bTAtMWgydi0yaC0ydjJ6IiBmaWxsPSIjZmZmIi8+PC9zdmc+");\n}\n\n.monaco-editor .suggest-widget .details > .monaco-scrollable-element > .body > .header > .close:hover,\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row > .contents > .main > .readMore:hover {\n\topacity: 1;\n}\n\n/** Type Info and icon next to the label in the focused completion item **/\n\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row > .contents > .main > .type-label {\n\tmargin-left: 0.8em;\n\tflex: 1;\n\ttext-align: right;\n\toverflow: hidden;\n\ttext-overflow: ellipsis;\n\topacity: 0.7;\n}\n\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row > .contents > .main > .type-label > .monaco-tokenized-source {\n\tdisplay: inline;\n}\n\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row > .contents > .main > .readMore,\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row > .contents > .main > .type-label,\n.monaco-editor .suggest-widget.docs-side .monaco-list .monaco-list-row.focused > .contents > .main > .readMore,\n.monaco-editor .suggest-widget.docs-side .monaco-list .monaco-list-row.focused > .contents > .main > .type-label,\n.monaco-editor .suggest-widget.docs-below .monaco-list .monaco-list-row.focused > .contents > .main > .readMore {\n\tdisplay: none;\n}\n\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row.focused > .contents > .main > .readMore,\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row.focused > .contents > .main > .type-label {\n\tdisplay: inline;\n}\n\n/** Styles for each row in the list **/\n\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row .icon {\n\tdisplay: block;\n\theight: 16px;\n\twidth: 16px;\n\tbackground-repeat: no-repeat;\n\tbackground-size: 80%;\n\tbackground-position: center;\n}\n\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row .icon { background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiI+PHN0eWxlPi5pY29uLWNhbnZhcy10cmFuc3BhcmVudHtvcGFjaXR5OjA7ZmlsbDojZjZmNmY2fS5pY29uLXZzLW91dHtmaWxsOiNmNmY2ZjZ9Lmljb24tdnMtYmd7ZmlsbDojNDI0MjQyfTwvc3R5bGU+PHBhdGggY2xhc3M9Imljb24tY2FudmFzLXRyYW5zcGFyZW50IiBkPSJNMTYgMTZIMFYwaDE2djE2eiIgaWQ9ImNhbnZhcyIvPjxwYXRoIGNsYXNzPSJpY29uLXZzLW91dCIgZD0iTTE2IDEwYzAgMi4yMDUtMS43OTQgNC00IDQtMS44NTggMC0zLjQxMS0xLjI3OS0zLjg1OC0zaC0uOTc4bDIuMzE4IDRIMHYtMS43MDNsMi0zLjQwOFYwaDExdjYuMTQyYzEuNzIxLjQ0NyAzIDIgMyAzLjg1OHoiIGlkPSJvdXRsaW5lIi8+PHBhdGggY2xhc3M9Imljb24tdnMtYmciIGQ9Ik0xMiAxdjQuNzVBNC4yNTUgNC4yNTUgMCAwIDAgNy43NSAxMGgtLjczMkw0LjI3NSA1LjI2OSAzIDcuNDQyVjFoOXpNNy43NDcgMTRMNC4yNjkgOCAuNzQ4IDE0aDYuOTk5ek0xNSAxMGEzIDMgMCAxIDEtNiAwIDMgMyAwIDAgMSA2IDB6IiBpZD0iaWNvbkJnIi8+PC9zdmc+"); }\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row .icon.method,\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row .icon.function,\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row .icon.constructor { background-image: url("data:image/svg+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zMTdsLTQgMi44MjF6IiBpZD0iaWNvbkJnIi8+PC9zdmc+"); }\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row .icon.field { background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiI+PHN0eWxlPi5pY29uLWNhbnZhcy10cmFuc3BhcmVudHtvcGFjaXR5OjA7ZmlsbDojZjZmNmY2fS5pY29uLXZzLW91dHtmaWxsOiNmNmY2ZjZ9Lmljb24tdnMtZmd7ZmlsbDojZjBlZmYxfS5pY29uLXZzLWFjdGlvbi1ibHVle2ZpbGw6IzAwNTM5Y308L3N0eWxlPjxwYXRoIGNsYXNzPSJpY29uLWNhbnZhcy10cmFuc3BhcmVudCIgZD0iTTE2IDE2SDBWMGgxNnYxNnoiIGlkPSJjYW52YXMiLz48cGF0aCBjbGFzcz0iaWNvbi12cy1vdXQiIGQ9Ik0wIDEwLjczNlY0LjVMOSAwbDcgMy41djYuMjM2bC05IDQuNS03LTMuNXoiIGlkPSJvdXRsaW5lIi8+PHBhdGggY2xhc3M9Imljb24tdnMtYWN0aW9uLWJsdWUiIGQ9Ik05IDFMMSA1djVsNiAzIDgtNFY0TDkgMXpNNyA2Ljg4MkwzLjIzNiA1IDkgMi4xMTggMTIuNzY0IDQgNyA2Ljg4MnoiIGlkPSJpY29uQmciLz48cGF0aCBjbGFzcz0iaWNvbi12cy1mZyIgZD0iTTkgMi4xMThMMTIuNzY0IDQgNyA2Ljg4MiAzLjIzNiA1IDkgMi4xMTh6IiBpZD0iaWNvbkZnIi8+PC9zdmc+"); }\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row .icon.event { background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiI+PHN0eWxlPi5pY29uLWNhbnZhcy10cmFuc3BhcmVudHtv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IMHYxMGg1di0xLjg1OWwyLjE1NiAxLjA3N0wxMSAxMC4yOTVWMTNoNVYzaC01eiIgaWQ9Im91dGxpbmUiIHN0eWxlPSJkaXNwbGF5OiBub25lOyIvPjxwYXRoIGNsYXNzPSJpY29uLXZzLWJnIiBkPSJNMiA1djZoMnYxSDFWNGgzdjFIMnptMTAgNnYxaDNWNGgtM3YxaDJ2NmgtMnoiIGlkPSJpY29uQmciLz48cGF0aCBjbGFzcz0iaWNvbi12cy1mZyIgZD0iTTcuMTU2IDcuMTU2bC0xLjU3OC0uNzg5IDMuMTU2LTEuNTc4IDEuNTc4Ljc4OS0zLjE1NiAxLjU3OHoiIGlkPSJpY29uRmciIHN0eWxlPSJkaXNwbGF5OiBub25lOyIvPjxwYXRoIGNsYXNzPSJpY29uLXZzLWFjdGlvbi1ibHVlIiBkPSJNOC43MzMgNEw0IDYuMzY3djMuMTU2TDcuMTU2IDExLjFsNC43MzMtMi4zNjdWNS41NzhMOC43MzMgNHpNNy4xNTYgNy4xNTZsLTEuNTc4LS43ODkgMy4xNTYtMS41NzggMS41NzguNzg5LTMuMTU2IDEuNTc4eiIgaWQ9ImNvbG9ySW1wb3J0YW5jZSIvPjwvc3ZnPg=="); }\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row .icon.class { background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiI+PHN0eWxlPi5pY29uLWNhbnZhcy10cmFuc3BhcmVudHtvcGFjaXR5OjA7ZmlsbDojZjZmNmY2fS5pY29uLXZzLW91dHtmaWxsOiNmNmY2ZjZ9Lmljb24tdnMtYWN0aW9uLW9yYW5nZXtmaWxsOiNjMjdkMWF9PC9zdHlsZT48cGF0aCBjbGFzcz0iaWNvbi1jYW52YXMtdHJhbnNwYXJlbnQiIGQ9Ik0xNiAxNkgwVjBoMTZ2MTZ6IiBpZD0iY2FudmFzIi8+PHBhdGggY2xhc3M9Imljb24tdnMtb3V0IiBkPSJNMTYgNi41ODZsLTMtM0wxMS41ODYgNUg5LjQxNGwxLTEtNC00aC0uODI4TDAgNS41ODZ2LjgyOGw0IDRMNi40MTQgOEg3djVoMS41ODZsMyAzaC44MjhMMTYgMTIuNDE0di0uODI4TDEzLjkxNCA5LjUgMTYgNy40MTR2LS44Mjh6IiBpZD0ib3V0bGluZSIvPjxwYXRoIGNsYXNzPSJpY29uLXZzLWFjdGlvbi1vcmFuZ2UiIGQ9Ik0xMyAxMGwyIDItMyAzLTItMiAxLTFIOFY3SDZMNCA5IDEgNmw1LTUgMyAzLTIgMmg1bDEtMSAyIDItMyAzLTItMiAxLTFIOXY0bDIuOTk5LjAwMkwxMyAxMHoiIGlkPSJpY29uQmciLz48L3N2Zz4="); }\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row .icon.interface { background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiI+PHN0eWxlPi5pY29uLWNhbnZhcy10cmFuc3BhcmVudHtvcGFjaXR5OjA7ZmlsbDojZjZmNmY2fS5pY29uLXZzLW91dHtmaWxsOiNmNmY2ZjZ9Lmljb24tdnMtZmd7ZmlsbDojZjBlZmYxfS5pY29uLXZzLWFjdGlvbi1ibHVle2ZpbGw6IzAwNTM5Y308L3N0eWxlPjxwYXRoIGNsYXNzPSJpY29uLWNhbnZhcy10cmFuc3BhcmVudCIgZD0iTTE2IDE2SDBWMGgxNnYxNnoiIGlkPSJjYW52YXMiLz48cGF0aCBjbGFzcz0iaWNvbi12cy1vdXQiIGQ9Ik0xMS41IDEyYy0xLjkxNSAwLTMuNjAyLTEuMjQxLTQuMjI4LTNoLTEuNDFhMy4xMSAzLjExIDAgMCAxLTIuNzM3IDEuNjI1QzEuNDAyIDEwLjYyNSAwIDkuMjIzIDAgNy41czEuNDAyLTMuMTI1IDMuMTI1LTMuMTI1YzEuMTY1IDAgMi4yMDEuNjM5IDIuNzM3IDEuNjI1aDEuNDFjLjYyNi0xLjc1OSAyLjMxMy0zIDQuMjI4LTNDMTMuOTgxIDMgMTYgNS4wMTkgMTYgNy41UzEzLjk4MSAxMiAxMS41IDEyeiIgaWQ9Im91dGxpbmUiLz48cGF0aCBjbGFzcz0iaWNvbi12cy1mZyIgZD0iTTExLjUgOUExLjUwMSAxLjUwMSAwIDEgMSAxMyA3LjVjMCAuODI2LS42NzMgMS41LTEuNSAxLjV6IiBpZD0iaWNvbkZnIi8+PHBhdGggY2xhc3M9Imljb24tdnMtYWN0aW9uLWJsdWUiIGQ9Ik0xMS41IDRhMy40OSAzLjQ5IDAgMCAwLTMuNDUgM0g1LjE4NUEyLjEyMiAyLjEyMiAwIDAgMCAxIDcuNWEyLjEyMyAyLjEyMyAwIDEgMCA0LjE4NS41SDguMDVhMy40OSAzLjQ5IDAgMCAwIDMuNDUgMyAzLjUgMy41IDAgMSAwIDAtN3ptMCA1Yy0uODI3IDAtMS41LS42NzMtMS41LTEuNVMxMC42NzMgNiAxMS41IDZzMS41LjY3MyAxLjUgMS41UzEyLjMyNyA5IDExLjUgOXoiIGlkPSJpY29uQmciLz48L3N2Zz4="); }\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row .icon.struct { background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiI+PHN0eWxlPi5pY29uLWNhbnZhcy10cmFuc3BhcmVudHtvcGFjaXR5OjA7ZmlsbDojZjZmNmY2fS5pY29uLXZzLW91dHtmaWxsOiNmNmY2ZjZ9Lmljb24tdnMtYWN0aW9uLWJsdWV7ZmlsbDojMDA1MzljfTwvc3R5bGU+PHBhdGggY2xhc3M9Imljb24tY2FudmFzLXRyYW5zcGFyZW50IiBkPSJNMTYgMTZIMFYwaDE2djE2eiIgaWQ9ImNhbnZhcyIvPjxwYXRoIGNsYXNzPSJpY29uLXZzLW91dCIgZD0iTTkgMTRWOEg3djZIMVYyaDE0djEySDl6IiBpZD0ib3V0bGluZSIgc3R5bGU9ImRpc3BsYXk6IG5vbmU7Ii8+PHBhdGggY2xhc3M9Imljb24tdnMtYWN0aW9uLWJsdWUiIGQ9Ik0xMCA5aDR2NGgtNFY5em0tOCA0aDRWOUgydjR6TTIgM3Y0aDEyVjNIMnoiIGlkPSJpY29uQmciLz48L3N2Zz4="); }\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row .icon.type-parameter { background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiI+PHN0eWxlPi5pY29uLWNhbnZhcy10cmFuc3BhcmVudHtvcGFjaXR5OjA7ZmlsbDojZjZmNmY2fS5pY29uLXZzLW91dHtmaWxsOiNmNmY2ZjZ9Lmljb24tdnMtYmd7ZmlsbDojNDI0MjQyfTwvc3R5bGU+PHBhdGggY2xhc3M9Imljb24tY2FudmFzLXRyYW5zcGFyZW50IiBkPSJNMTYgMTZIMFYwaDE2djE2eiIgaWQ9ImNhbnZhcyIvPjxwYXRoIGNsYXNzPSJpY29uLXZzLW91dCIgZD0iTTEwLjcwMiAxMC41bDItMi0yLTIgLjUtLjVIMTB2NWgxdjNINXYtM2gxVjZINC43OThsLjUuNS0yIDIgMiAyTDMgMTIuNzk3bC0zLTNWNy4yMDFsMy0zVjJoMTB2Mi4yMDFsMyAzdjIuNTk2bC0zIDMtMi4yOTgtMi4yOTd6IiBpZD0ib3V0bGluZSIgc3R5bGU9ImRpc3BsYXk6IG5vbmU7Ii8+PHBhdGggY2xhc3M9Imljb24tdnMtYmciIGQ9Ik00IDNoOHYyaC0xdi0uNWMwLS4yNzctLjIyNC0uNS0uNS0uNUg5djcuNWMwIC4yNzUuMjI0LjUuNS41aC41djFINnYtMWguNWEuNS41IDAgMCAwIC41LS41VjRINS41YS41LjUgMCAwIDAtLjUuNVY1SDRWM3pNMyA1LjYxNUwuMTE2IDguNSAzIDExLjM4M2wuODg0LS44ODMtMi0yIDItMkwzIDUuNjE1em0xMCAwbC0uODg0Ljg4NSAyIDItMiAyIC44ODQuODgzTDE1Ljg4NCA4LjUgMTMgNS42MTV6IiBpZD0iaWNvbkJnIi8+PC9zdmc+"); }\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row .icon.module { background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiI+PHN0eWxlPi5pY29uLWNhbnZhcy10cmFuc3BhcmVudHtvcGFjaXR5OjA7ZmlsbDojZjZmNmY2fS5pY29uLXZzLW91dHtmaWxsOiNmNmY2ZjZ9Lmljb24tdnMtYmd7ZmlsbDojNDI0MjQyfTwvc3R5bGU+PHBhdGggY2xhc3M9Imljb24tY2FudmFzLXRyYW5zcGFyZW50IiBkPSJNMTYgMTZIMFYwaDE2djE2eiIgaWQ9ImNhbnZhcyIvPjxwYXRoIGNsYXNzPSJpY29uLXZzLW91dCIgZD0iTTkuMjYgMTEuOTg0bC45NzgtLjAyMWEuOTYyLjk2MiAwIDAgMCAuMDktLjAwNmMuMDExLS4wNjMuMDI2LS4xNzkuMDI2LS4zNjFWOS42ODhjMC0uNjc5LjE4NS0xLjI1Ny41My0xLjcwNy0uMzQ2LS40NTItLjUzLTEuMDMtLjUzLTEuNzA1VjQuMzVjMC0uMTY3LS4wMjEtLjI1OS0uMDM0LS4zMDJMOS4yNiA0LjAyVi45NzNsMS4wMTEuMDExYzIuMTY3LjAyNCAzLjQwOSAxLjE1NiAzLjQwOSAzLjEwNXYxLjk2MmMwIC4zNTEuMDcxLjQ2MS4wNzIuNDYybC45MzYuMDYuMDUzLjkyN3YxLjkzNmwtLjkzNi4wNjFjLS4wNzYuMDE2LS4xMjUuMTQ2LS4xMjUuNDI0djIuMDE3Yz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Ljg0NC4zMjV2MS4wNTR6bTcuOTktNS41MTdjLS43MDYuMDQ1LTEuMDYuNTItMS4wNiAxLjQyMnYyLjAxN2MwIDEuMzY3LS44MDcgMi4wNi0yLjQyIDIuMDc4di0xLjA1M2MuMzk2LS4wMDkuNjc4LS4xMTguODQ0LS4zMjguMTY3LS4yMS4yNS0uNTU2LjI1LTEuMDM5VjkuNjg4YzAtLjkyNS40NDktMS40ODggMS4zNDctMS42ODh2LS4wMjFjLS44OTgtLjIxNC0xLjM0Ny0uNzgyLTEuMzQ3LTEuNzAyVjQuMzVjMC0uODUyLS4zNjQtMS4yODgtMS4wOTQtMS4zMDZ2LTEuMDZjMS42MTMuMDE4IDIuNDIuNzIgMi40MiAyLjEwNXYxLjk2MmMwIC45Mi4zNTQgMS40MDQgMS4wNiAxLjQ0OXYuOTk5eiIgaWQ9Imljb25CZyIvPjwvc3ZnPg=="); }\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row .icon.property { background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiI+PHN0eWxlPi5pY29uLWNhbnZhcy10cmFuc3BhcmVudHtvcGFjaXR5OjA7ZmlsbDojZjZmNmY2fS5pY29uLXZzLW91dHtmaWxsOiNmNmY2ZjZ9Lmljb24tdnMtYmd7ZmlsbDojNDI0MjQyfTwvc3R5bGU+PHBhdGggY2xhc3M9Imljb24tY2FudmFzLXRyYW5zcGFyZW50IiBkPSJNMTYgMTZIMFYwaDE2djE2eiIgaWQ9ImNhbnZhcyIvPjxwYXRoIGNsYXNzPSJpY29uLXZzLW91dCIgZD0iTTE2IDUuNWE1LjUgNS41IDAgMCAxLTUuNSA1LjVjLS4yNzUgMC0uNTQzLS4wMjctLjgwNy0uMDY2bC0uMDc5LS4wMTJhNS40MjkgNS40MjkgMCAwIDEtLjgxLS4xOTJsLTQuNTM3IDQuNTM3Yy0uNDcyLjQ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SJpY29uLWNhbnZhcy10cmFuc3BhcmVudCIgZD0iTTE2IDE2SDBWMGgxNnYxNnoiIGlkPSJjYW52YXMiLz48cGF0aCBjbGFzcz0iaWNvbi12cy1vdXQiIGQ9Ik0xNiAxMS4wMTNIMVY0aDE1djcuMDEzeiIgaWQ9Im91dGxpbmUiLz48cGF0aCBjbGFzcz0iaWNvbi12cy1mZyIgZD0iTTggOUg3VjZoM3YzSDlWN0g4djJ6TTQgN2gxdjJoMVY2SDN2M2gxVjd6bTggMGgxdjJoMVY2aC0zdjNoMVY3eiIgaWQ9Imljb25GZyIvPjxwYXRoIGNsYXNzPSJpY29uLXZzLWJnIiBkPSJNMiA1djVoMTNWNUgyem00IDRINVY3SDR2MkgzVjZoM3Yzem00IDBIOVY3SDh2Mkg3VjZoM3Yzem00IDBoLTFWN2gtMXYyaC0xVjZoM3YzeiIgaWQ9Imljb25CZyIvPjwvc3ZnPg=="); }\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row .icon.constant { background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiI+PHN0eWxlPi5pY29uLWNhbnZhcy10cmFuc3BhcmVudHtvcGFjaXR5OjA7ZmlsbDojZjZmNmY2fS5pY29uLXZzLW91dHtmaWxsOiNmNmY2ZjZ9Lmljb24tdnMtYmd7ZmlsbDojNDI0MjQyfS5pY29uLXZzLWZne2ZpbGw6I2YwZWZmMX0uaWNvbi12cy1hY3Rpb24tYmx1ZXtmaWxsOiMwMDUzOWN9PC9zdHlsZT48cGF0aCBjbGFzcz0iaWNvbi1jYW52YXMtdHJhbnNwYXJlbnQiIGQ9Ik0xNiAxNkgwVjBoMTZ2MTZ6IiBpZD0iY2FudmFzIi8+PHBhdGggY2xhc3M9Imljb24tdnMtb3V0IiBkPSJNMi44NzkgMTRMMSAxMi4xMjFWMy44NzlMMi44NzkgMmgxMC4yNDJMMTUgMy44Nzl2OC4yNDJMMTMuMTIxIDE0SDIuODc5eiIgaWQ9Im91dGxpbmUiLz48cGF0aCBjbGFzcz0iaWNvbi12cy1mZyIgZD0iTTEyLjI5MyA0SDMuNzA3TDMgNC43MDd2Ni41ODZsLjcwNy43MDdoOC41ODZsLjcwNy0uNzA3VjQuNzA3TDEyLjI5MyA0ek0xMSAxMEg1VjloNnYxem0wLTNINVY2aDZ2MXoiIGlkPSJpY29uRmciLz48ZyBpZD0iaWNvbkJnIj48cGF0aCBjbGFzcz0iaWNvbi12cy1iZyIgZD0iTTEyLjcwNyAxM0gzLjI5M0wyIDExLjcwN1Y0LjI5M0wzLjI5MyAzaDkuNDE0TDE0IDQuMjkzdjcuNDE0TDEyLjcwNyAxM3ptLTktMWg4LjU4NmwuNzA3LS43MDdWNC43MDdMMTIuMjkzIDRIMy43MDdMMyA0LjcwN3Y2LjU4NmwuNzA3LjcwN3oiLz48cGF0aCBjbGFzcz0iaWNvbi12cy1hY3Rpb24tYmx1ZSIgZD0iTTExIDdINVY2aDZ2MXptMCAySDV2MWg2Vjl6Ii8+PC9nPjwvc3ZnPg=="); }\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row .icon.value,\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row .icon.enum { background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiI+PHN0eWxlPi5pY29uLWNhbnZhcy10cmFuc3BhcmVudHtvcGFjaXR5OjA7ZmlsbDojZjZmNmY2fS5pY29uLXZzLW91dHtmaWxsOiNmNmY2ZjZ9Lmljb24tdnMtZmd7ZmlsbDojZjBlZmYxfS5pY29uLXZzLWFjdGlvbi1vcmFuZ2V7ZmlsbDojYzI3ZDFhfTwvc3R5bGU+PHBhdGggY2xhc3M9Imljb24tY2FudmFzLXRyYW5zcGFyZW50IiBkPSJNMTYgMTZIMFYwaDE2djE2eiIgaWQ9ImNhbnZhcyIvPjxwYXRoIGNsYXNzPSJpY29uLXZzLW91dCIgZD0iTTE0LjQxNCAxTDE2IDIuNTg2djUuODI4TDE0LjQxNCAxMEgxMHYzLjQxNkw4LjQxNCAxNUgxLjU4NkwwIDEzLjQxNnYtNS44M0wxLjU4NiA2SDZWMi41ODZMNy41ODYgMWg2LjgyOHoiIGlkPSJvdXRsaW5lIi8+PHBhdGggY2xhc3M9Imljb24tdnMtZmciIGQ9Ik0yIDEzaDZWOEgydjV6bTEtNGg0djFIM1Y5em0wIDJoNHYxSDN2LTF6bTExLTVWM0g4djNoLjQxNEw5IDYuNTg2VjZoNHYxSDkuNDE0bC41ODYuNTg2VjhoNFY2em0tMS0xSDlWNGg0djF6IiBpZD0iaWNvbkZnIi8+PHBhdGggY2xhc3M9Imljb24tdnMtYWN0aW9uLW9yYW5nZSIgZD0iTTMgMTFoNC4wMDF2MUgzdi0xem0wLTFoNC4wMDFWOUgzdjF6bTYtMnY1bC0xIDFIMmwtMS0xVjhsMS0xaDZsMSAxek04IDhIMnY1aDZWOHptMS0ybDEgMWgzVjZIOXptMC0xaDRWNEg5djF6bTUtM0g4TDcgM3YzaDFWM2g2djVoLTR2MWg0bDEtMVYzbC0xLTF6IiBpZD0iaWNvbkJnIi8+PC9zdmc+"); }\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row .icon.enum-member { background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiI+PHN0eWxlPi5pY29uLWNhbnZhcy10cmFuc3BhcmVudHtvcGFjaXR5OjA7ZmlsbDojZjZmNmY2fS5pY29uLXZzLW91dHtmaWxsOiNmNmY2ZjZ9Lmljb24tdnMtZmd7ZmlsbDojZjBlZmYxfS5pY29uLXZzLWFjdGlvbi1ibHVle2ZpbGw6IzAwNTM5Y308L3N0eWxlPjxwYXRoIGNsYXNzPSJpY29uLWNhbnZhcy10cmFuc3BhcmVudCIgZD0iTTE2IDE2SDBWMGgxNnYxNnoiIGlkPSJjYW52YXMiLz48cGF0aCBjbGFzcz0iaWNvbi12cy1vdXQiIGQ9Ik0wIDE1VjZoNlYyLjU4Nkw3LjU4NSAxaDYuODI5TDE2IDIuNTg2djUuODI5TDE0LjQxNCAxMEgxMHY1SDB6bTMtNnoiIGlkPSJvdXRsaW5lIi8+PHBhdGggY2xhc3M9Imljb24tdnMtZmciIGQ9Ik04IDN2M2g1djFoLTN2MWg0VjNIOHptNSAySDlWNGg0djF6TTIgOHY1aDZWOEgyem01IDNIM3YtMWg0djF6IiBpZD0iaWNvbkZnIi8+PHBhdGggY2xhc3M9Imljb24tdnMtYWN0aW9uLWJsdWUiIGQ9Ik0xMCA2aDN2MWgtM1Y2ek05IDR2MWg0VjRIOXptNS0ySDhMNyAzdjNoMVYzaDZ2NWgtNHYxaDRsMS0xVjNsLTEtMXptLTcgOEgzdjFoNHYtMXptMi0zdjdIMVY3aDh6TTggOEgydjVoNlY4eiIgaWQ9Imljb25CZyIvPjwvc3ZnPg=="); }\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row .icon.keyword { background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiI+PHN0eWxlPi5pY29uLWNhbnZhcy10cmFuc3BhcmVudHtvcGFjaXR5OjA7ZmlsbDojZjZmNmY2fS5pY29uLXZzLW91dHtmaWxsOiNmNmY2ZjZ9Lmljb24tdnMtYmd7ZmlsbDojNDI0MjQyfS5pY29uLXZzLWZne2ZpbGw6I2YwZWZmMX08L3N0eWxlPjxwYXRoIGNsYXNzPSJpY29uLWNhbnZhcy10cmFuc3BhcmVudCIgZD0iTTE2IDE2SDBWMGgxNnYxNnoiIGlkPSJjYW52YXMiLz48cGF0aCBjbGFzcz0iaWNvbi12cy1vdXQiIGQ9Ik0xNiA1VjJIOVYxSDB2MTRoMTN2LTNoM1Y5aC0xVjZIOVY1aDd6bS04IDdWOWgxdjNIOHoiIGlkPSJvdXRsaW5lIi8+PHBhdGggY2xhc3M9Imljb24tdnMtZmciIGQ9Ik0yIDNoNXYxSDJWM3oiIGlkPSJpY29uRmciLz48cGF0aCBjbGFzcz0iaWNvbi12cy1iZyIgZD0iTTE1IDRoLTVWM2g1djF6bS0xIDNoLTJ2MWgyVjd6bS00IDBIMXYxaDlWN3ptMiA2SDF2MWgxMXYtMXptLTUtM0gxdjFoNnYtMXptOCAwaC01djFoNXYtMXpNOCAydjNIMVYyaDd6TTcgM0gydjFoNVYzeiIgaWQ9Imljb25CZyIvPjwvc3ZnPg=="); }\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row .icon.text { background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiI+PHN0eWxlPi5pY29uLWNhbnZhcy10cmFuc3BhcmVudHtvcGFjaXR5OjA7ZmlsbDojZjZmNmY2fS5pY29uLXZzLW91dHtmaWxsOiNmNmY2ZjZ9Lmljb24tdnMtYmd7ZmlsbDojNDI0MjQyfS5pY29uLXZzLWZne2ZpbGw6I2YwZWZmMX08L3N0eWxlPjxwYXRoIGNsYXNzPSJpY29uLWNhbnZhcy10cmFuc3BhcmVudCIgZD0iTTE2IDE2SDBWMGgxNnYxNnoiIGlkPSJjYW52YXMiLz48cGF0aCBjbGFzcz0iaWNvbi12cy1vdXQiIGQ9Ik0xNiAxNUgwVjFoMTZ2MTR6IiBpZD0ib3V0bGluZSIvPjxwYXRoIGNsYXNzPSJpY29uLXZzLWZnIiBkPSJNOS4yMjkgNy4zNTRjLjAzNS4xNDYuMDUyLjMxLjA1Mi40OTQgMCAuMjM0LS4wMi40NDEtLjA2LjYyMS0uMDM5LjE4LS4wOTUuMzI4LS4xNjguNDQ1YS42ODcuNjg3IDAgMCAxLS45MTQuMjgxLjc2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gMCAzLjg1OS0zLjE0MSA3LTcgN3pNNS40IDcuOTMzYTIuNjcgMi42NyAwIDAgMSAyLjY2NyAyLjY2NmMwIC42MDYtLjE5MyAxLjE3OS0uNTQ0IDEuNjE0YTEuNTk5IDEuNTk5IDAgMCAwLS4zMjMuOTg3LjguOCAwIDAgMCAuOC44YzMuMzA5IDAgNi0yLjY5MSA2LTZzLTIuNjkxLTYtNi02LTYgMi42OTEtNiA2YzAgLjQ0MS4zNTkuOC44LjguMzc4IDAgLjcyOS0uMTE0Ljk4Ni0uMzIyQTIuNTY4IDIuNTY4IDAgMCAxIDUuNCA3LjkzM3oiLz48cGF0aCBjbGFzcz0iaWNvbi12cy1hY3Rpb24tcHVycGxlIiBkPSJNNC41IDUuMzc1YS44NzUuODc1IDAgMSAwIDAgMS43NS44NzUuODc1IDAgMCAwIDAtMS43NXoiLz48cGF0aCBjbGFzcz0iaWNvbi12cy1ibHVlIiBkPSJNNy4xMjUgMy42MjVhLjg3NS44NzUgMCAxIDAgMCAxLjc1Ljg3NS44NzUgMCAwIDAgMC0xLjc1eiIvPjxwYXRoIGNsYXNzPSJpY29uLXZzLWdyZWVuIiBkPSJNMTAuNjI1IDQuNWEuODc1Ljg3NSAwIDEgMCAwIDEuNzUuODc1Ljg3NSAwIDAgMCAwLTEuNzV6Ii8+PHBhdGggY2xhc3M9Imljb24tdnMteWVsbG93IiBkPSJNMTEuNSA4YS44NzUuODc1IDAgMSAwIDAgMS43NS44NzUuODc1IDAgMCAwIDAtMS43NXoiLz48cGF0aCBjbGFzcz0iaWNvbi12cy1yZWQiIGQ9Ik05Ljc1IDEwLjYyNWEuODc1Ljg3NSAwIDEgMCAwIDEuNzUuODc1Ljg3NSAwIDAgMCAwLTEuNzV6Ii8+PC9nPjwvc3ZnPg=="); }\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row .icon.file { background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiI+PHN0eWxlPi5pY29uLWNhbnZhcy10cmFuc3BhcmVudHtvcGFjaXR5OjA7ZmlsbDojZjZmNmY2fS5pY29uLXZzLW91dHtmaWxsOiNmNmY2ZjZ9Lmljb24tdnMtYmd7ZmlsbDojNDI0MjQyfS5pY29uLXZzLWZne2ZpbGw6I2YwZWZmMX08L3N0eWxlPjxwYXRoIGNsYXNzPSJpY29uLWNhbnZhcy10cmFuc3BhcmVudCIgZD0iTTE2IDE2SDBWMGgxNnYxNnoiIGlkPSJjYW52YXMiLz48cGF0aCBjbGFzcz0iaWNvbi12cy1vdXQiIGQ9Ik0xNSAxNkgyVjBoOC42MjFMMTUgNC4zNzlWMTZ6IiBpZD0ib3V0bGluZSIvPjxwYXRoIGNsYXNzPSJpY29uLXZzLWZnIiBkPSJNMTMgMTRINFYyaDV2NGg0djh6bS0zLTlWMi4yMDdMMTIuNzkzIDVIMTB6IiBpZD0iaWNvbkZnIi8+PHBhdGggY2xhc3M9Imljb24tdnMtYmciIGQ9Ik0zIDF2MTRoMTFWNC43OTNMMTAuMjA3IDFIM3ptMTAgMTNINFYyaDV2NGg0djh6bS0zLTlWMi4yMDdMMTIuNzkzIDVIMTB6IiBpZD0iaWNvbkJnIi8+PC9zdmc+"); }\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row .icon.reference { background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiI+PHN0eWxlPi5pY29uLWNhbnZhcy10cmFuc3BhcmVudHtvcGFjaXR5OjA7ZmlsbDojZjZmNmY2fS5pY29uLXZzLW91dHtmaWxsOiNmNmY2ZjZ9Lmljb24tdnMtYmd7ZmlsbDojNDI0MjQyfS5pY29uLXZzLWZne2ZpbGw6I2YwZWZmMX0uaWNvbi12cy1hY3Rpb24tYmx1ZXtmaWxsOiMwMDUzOWN9PC9zdHlsZT48cGF0aCBjbGFzcz0iaWNvbi1jYW52YXMtdHJhbnNwYXJlbnQiIGQ9Ik0xNiAxNkgwVjBoMTZ2MTZ6IiBpZD0iY2FudmFzIi8+PHBhdGggY2xhc3M9Imljb24tdnMtb3V0IiBkPSJNMTQgNC41NTZWMTNjMCAuOTctLjcwMSAyLTIgMkg0Yy0uOTcgMC0yLS43MDEtMi0yVjYuNjQ5QTMuNDk1IDMuNDk1IDAgMCAxIDAgMy41QzAgMS41NyAxLjU3IDAgMy41IDBINXYxaDUuMDYxTDE0IDQuNTU2eiIgaWQ9Im91dGxpbmUiIHN0eWxlPSJkaXNwbGF5OiBub25lOyIvPjxwYXRoIGNsYXNzPSJpY29uLXZzLWJnIiBkPSJNMTMgNXY4cy0uMDM1IDEtMS4wMzUgMWgtOFMzIDE0IDMgMTNWOWgxdjRoOFY2SDkuMzk3bC41MTctLjUyTDkgNC41NzJWM0g3LjQxOUw2LjQxMyAyaDMuMjI4TDEzIDV6IiBpZD0iaWNvbkJnIi8+PHBhdGggY2xhc3M9Imljb24tdnMtZmciIGQ9Ik03LjQxOSAzSDl2MS41NzJMNy40MTkgM3ptMS45NzggM0w2LjQxNiA5SDR2NGg4VjZIOS4zOTd6IiBpZD0iaWNvbkZnIiBzdHlsZT0iZGlzcGxheTogbm9uZTsiLz48cGF0aCBjbGFzcz0iaWNvbi12cy1hY3Rpb24tYmx1ZSIgZD0iTTUuOTg4IDZIMy41YTIuNSAyLjUgMCAxIDEgMC01SDR2MWgtLjVDMi42NzMgMiAyIDIuNjczIDIgMy41UzIuNjczIDUgMy41IDVoMi41MTNMNCAzaDJsMi41IDIuNDg0TDYgOEg0bDEuOTg4LTJ6IiBpZD0iY29sb3JBY3Rpb24iLz48L3N2Zz4="); }\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row .icon.snippet { background-image: url("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj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MS4zMzMzMzMzLDAsMCwxLjMzMzMzMzMsLTI0NS45OTk5OSwtNS4zMzMzMzMpIj4KICAgIDxwYXRoCiAgICAgICBkPSJtIDE4NSw0IDExLDAgMCwxMiAtMTEsMCB6IgogICAgICAgaWQ9InBhdGg0NTM0IgogICAgICAgc3R5bGU9ImZpbGw6I2Y2ZjZmNiIgLz4KICAgIDxwYXRoCiAgICAgICBkPSJtIDE5NCwxMyAwLC03IC03LDAgMCw3IC0xLDAgMCwtOCA5LDAgMCw4IC0xLDAgeiBtIC03LDIgLTEsMCAwLC0xIDEsMCAwLDEgeiBtIDIsLTEgLTEsMCAwLDEgMSwwIDAsLTEgeiBtIDIsMCAtMSwwIDAsMSAxLDAgMCwtMSB6IG0gMiwxIC0xLDAgMCwtMSAxLDAgMCwxIHogbSAyLC0xIC0xLDAgMCwxIDEsMCAwLC0xIHoiCiAgICAgICBpZD0icGF0aDQ1MzYiCiAgICAgICBzdHlsZT0iZmlsbDojNDI0MjQyIiAvPgogICAgPHBhdGgKICAgICAgIGQ9Im0gMTg3LDEzIDAsLTcgNywwIDAsNyAtNywwIHoiCiAgICAgICBpZD0icGF0aDQ1MzgiCiAgICAgICBzdHlsZT0iZmlsbDojZjBlZmYxIiAvPgogIDwvZz4KICA8cGF0aAogICAgIGlkPSJjYW52YXMiCiAgICAgZD0iTTE2IDE2SDBWMGgxNnYxNnoiCiAgICAgY2xhc3M9Imljb24tY2FudmFzLXRyYW5zcGFyZW50IiAvPgo8L3N2Zz4K"); }\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row .icon.customcolor { background-image: none; }\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row .icon.folder { background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+PHN0eWxlIHR5cGU9InRleHQvY3NzIj4uaWNvbi1jYW52YXMtdHJhbnNwYXJlbnR7b3BhY2l0eTowO2ZpbGw6I0Y2RjZGNjt9IC5pY29uLXZzLW91dHtvcGFjaXR5OjA7ZmlsbDojRjZGNkY2O30gLmljb24tdnMtZmd7ZmlsbDojRjBFRkYxO30gLmljb24tZm9sZGVye2ZpbGw6IzY1NjU2NTt9PC9zdHlsZT48cGF0aCBjbGFzcz0iaWNvbi1jYW52YXMtdHJhbnNwYXJlbnQiIGQ9Ik0xNiAxNmgtMTZ2LTE2aDE2djE2eiIgaWQ9ImNhbnZhcyIvPjxwYXRoIGNsYXNzPSJpY29uLXZzLW91dCIgZD0iTTE2IDIuNXYxMGMwIC44MjctLjY3MyAxLjUtMS41IDEuNWgtMTEuOTk2Yy0uODI3IDAtMS41LS42NzMtMS41LTEuNXYtOGMwLS44MjcuNjczLTEuNSAxLjUtMS41aDIuODg2bDEtMmg4LjExYy44MjcgMCAxLjUuNjczIDEuNSAxLjV6IiBpZD0ib3V0bGluZSIvPjxwYXRoIGNsYXNzPSJpY29uLWZvbGRlciIgZD0iTTE0LjUgMmgtNy40OTJsLTEgMmgtMy41MDRjLS4yNzcgMC0uNS4yMjQtLjUuNXY4YzAgLjI3Ni4yMjMuNS41LjVoMTEuOTk2Yy4yNzUgMCAuNS0uMjI0LjUtLjV2LTEwYzAtLjI3Ni0uMjI1LS41LS41LS41em0tLjQ5NiAyaC02LjQ5NmwuNS0xaDUuOTk2djF6IiBpZD0iaWNvbkJnIi8+PHBhdGggY2xhc3M9Imljb24tdnMtZmciIGQ9Ik0xNCAzdjFoLTYuNWwuNS0xaDZ6IiBpZD0iaWNvbkZnIi8+PC9zdmc+"); }\n\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row .icon.customcolor .colorspan {\n\tmargin: 0 0 0 0.3em;\n\tborder: 0.1em solid #000;\n\twidth: 0.7em;\n\theight: 0.7em;\n\tdisplay: inline-block;\n}\n\n/** Styles for the docs of the completion item in focus **/\n.monaco-editor .suggest-widget .details {\n\tdisplay: flex;\n\tflex-direction: column;\n\tcursor: default;\n}\n\n.monaco-editor .suggest-widget .details.no-docs {\n\tdisplay: none;\n}\n\n.monaco-editor .suggest-widget.docs-below .details {\n\tborder-top-width: 0px;\n}\n\n.monaco-editor .suggest-widget .details > .monaco-scrollable-element {\n\tflex: 1;\n}\n\n.monaco-editor .suggest-widget .details > .monaco-scrollable-element > .body {\n\tposition: absolute;\n\tbox-sizing: border-box;\n\theight: 100%;\n\twidth: 100%;\n}\n\n.monaco-editor .suggest-widget .details > .monaco-scrollable-element > .body > .header > .type {\n\tflex: 2;\n\toverflow: hidden;\n\ttext-overflow: ellipsis;\n\topacity: 0.7;\n\tword-break: break-all;\n\tmargin: 0;\n\tpadding: 4px 0 4px 5px;\n}\n\n.monaco-editor .suggest-widget .details > .monaco-scrollable-element > .body > .docs {\n\tmargin: 0;\n\tpadding: 4px 5px;\n\twhite-space: pre-wrap;\n}\n\n.monaco-editor .suggest-widget .details > .monaco-scrollable-element > .body > .docs.markdown-docs {\n\twhite-space: initial;\n}\n\n.monaco-editor .suggest-widget .details > .monaco-scrollable-element > .body > .docs .code {\n\twhite-space: pre-wrap;\n\tword-wrap: break-word;\n}\n\n.monaco-editor .suggest-widget .details > .monaco-scrollable-element > .body > p:empty {\n\tdisplay: none;\n}\n\n.monaco-editor .suggest-widget .details code {\n\tborder-radius: 3px;\n\tpadding: 0 0.4em;\n}\n\n/* High Contrast and Dark Theming */\n\n.monaco-editor.vs-dark .suggest-widget .details > .monaco-scrollable-element > .body > .header > .close,\n.monaco-editor.hc-black .suggest-widget .details > .monaco-scrollable-element > .body > .header > .close {\n\tbackground-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgdmlld0JveD0iMyAzIDE2IDE2IiBlbmFibGUtYmFja2dyb3VuZD0ibmV3IDMgMyAxNiAxNiI+PHBvbHlnb24gZmlsbD0iI2U4ZThlOCIgcG9pbnRzPSIxMi41OTcsMTEuMDQyIDE1LjQsMTMuODQ1IDEzLjg0NCwxNS40IDExLjA0MiwxMi41OTggOC4yMzksMTUuNCA2LjY4MywxMy44NDUgOS40ODUsMTEuMDQyIDYuNjgzLDguMjM5IDguMjM4LDYuNjgzIDExLjA0Miw5LjQ4NiAxMy44NDUsNi42ODMgMTUuNCw4LjIzOSIvPjwvc3ZnPg==");\n}\n\n.monaco-editor.vs-dark .suggest-widget .monaco-list .monaco-list-row .icon,\n.monaco-editor.hc-black .suggest-widget .monaco-list .monaco-list-row .icon { background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiI+PHN0eWxlPi5pY29uLWNhbnZhcy10cmFuc3BhcmVudHtvcGFjaXR5OjA7ZmlsbDojMmQyZDMwfS5pY29uLXZzLW91dHtmaWxsOiMyZDJkMzB9Lmljb24tdnMtYmd7ZmlsbDojYzVjNWM1fTwvc3R5bGU+PHBhdGggY2xhc3M9Imljb24tY2FudmFzLXRyYW5zcGFyZW50IiBkPSJNMTYgMTZIMFYwaDE2djE2eiIgaWQ9ImNhbnZhcyIvPjxwYXRoIGNsYXNzPSJpY29uLXZzLW91dCIgZD0iTTE2IDEwYzAgMi4yMDUtMS43OTQgNC00IDQtMS44NTggMC0zLjQxMS0xLjI3OS0zLjg1OC0zaC0uOTc4bDIuMzE4IDRIMHYtMS43MDNsMi0zLjQwOFYwaDExdjYuMTQyYzEuNzIxLjQ0NyAzIDIgMyAzLjg1OHoiIGlkPSJvdXRsaW5lIi8+PHBhdGggY2xhc3M9Imljb24tdnMtYmciIGQ9Ik0xMiAxdjQuNzVBNC4yNTUgNC4yNTUgMCAwIDAgNy43NSAxMGgtLjczMkw0LjI3NSA1LjI2OSAzIDcuNDQyVjFoOXpNNy43NDcgMTRMNC4yNjkgOCAuNzQ4IDE0aDYuOTk5ek0xNSAxMGEzIDMgMCAxIDEtNiAwIDMgMyAwIDAgMSA2IDB6IiBpZD0iaWNvbkJnIi8+PC9zdmc+"); }\n\n.monaco-editor.vs-dark .suggest-widget .monaco-list .monaco-list-row .icon.method,\n.monaco-editor.hc-black .suggest-widget .monaco-list .monaco-list-row .icon.method,\n.monaco-editor.vs-dark .suggest-widget .monaco-list .monaco-list-row .icon.function,\n.monaco-editor.hc-black .suggest-widget .monaco-list .monaco-list-row .icon.function,\n.monaco-editor.vs-dark .suggest-widget .monaco-list .monaco-list-row .icon.constructor,\n.monaco-editor.hc-black .suggest-widget .monaco-list .monaco-list-row .icon.constructor { background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiI+PHN0eWxlPi5pY29uLWNhbnZhcy10cmFuc3BhcmVudHtvcGFjaXR5OjA7ZmlsbDojMmQyZDMwfS5pY29uLXZzLW91dHtmaWxsOiMyZDJkMzB9Lmljb24tdnMtZmd7ZmlsbDojMmIyODJlfS5pY29uLXZzLWFjdGlvbi1wdXJwbGV7ZmlsbDojYjE4MGQ3fTwvc3R5bGU+PHBhdGggY2xhc3M9Imljb24tY2FudmFzLXRyYW5zcGFyZW50IiBkPSJNMTYgMTZIMFYwaDE2djE2eiIgaWQ9ImNhbnZhcyIvPjxwYXRoIGNsYXNzPSJpY29uLXZzLW91dCIgZD0iTTE1IDMuMzQ5djguNDAzTDguOTc1IDE2SDguMDdMMSAxMS41ODJWMy4zMjdMNy41OTUgMGgxLjExOEwxNSAzLjM0OXoiIGlkPSJvdXRsaW5lIi8+PHBhdGggY2xhc3M9Imljb24tdnMtZmciIGQ9Ik0xMi43MTUgNC4zOThMOC40ODcgNy4wMiAzLjU2NSA0LjI3Mmw0LjU3OC0yLjMwOSA0LjU3MiAyLjQzNXpNMyA1LjEwMmw1IDIuNzkydjUuNzA1bC01LTMuMTI1VjUuMTAyem02IDguNDM0VjcuODc4bDQtMi40OHY1LjMxN2wtNCAyLjgyMXoiIGlkPSJpY29uRmciLz48cGF0aCBjbGFzcz0iaWNvbi12cy1hY3Rpb24tcHVycGxlIiBkPSJNOC4xNTYuODM3TDIgMy45NDJ2Ny4wODVMOC41MTcgMTUuMSAxNCAxMS4yMzNWMy45NUw4LjE1Ni44Mzd6bTQuNTU5IDMuNTYxTDguNDg3IDcuMDIgMy41NjUgNC4yNzJsNC41NzgtMi4zMDkgNC41NzIgMi40MzV6TTMgNS4xMDJsNSAyLjc5MnY1LjcwNWwtNS0zLjEyNVY1LjEwMnptNiA4LjQzNFY3Ljg3OGw0LTIuNDh2NS4zMTdsLTQgMi44MjF6IiBpZD0iaWNvbkJnIi8+PC9zdmc+"); }\n\n.monaco-editor.vs-dark .suggest-widget .monaco-list .monaco-list-row .icon.field,\n.monaco-editor.hc-black .suggest-widget .monaco-list .monaco-list-row .icon.field { background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiI+PHN0eWxlPi5pY29uLWNhbnZhcy10cmFuc3BhcmVudHtvcGFjaXR5OjA7ZmlsbDojMmQyZDMwfS5pY29uLXZzLW91dHtmaWxsOiMyZDJkMzB9Lmljb24tdnMtZmd7ZmlsbDojMmIyODJlfS5pY29uLXZzLWFjdGlvbi1ibHVle2ZpbGw6Izc1YmVmZn08L3N0eWxlPjxwYXRoIGNsYXNzPSJpY29uLWNhbnZhcy10cmFuc3BhcmVudCIgZD0iTTE2IDE2SDBWMGgxNnYxNnoiIGlkPSJjYW52YXMiLz48cGF0aCBjbGFzcz0iaWNvbi12cy1vdXQiIGQ9Ik0wIDEwLjczNlY0LjVMOSAwbDcgMy41djYuMjM2bC05IDQuNS03LTMuNXoiIGlkPSJvdXRsaW5lIi8+PHBhdGggY2xhc3M9Imljb24tdnMtYWN0aW9uLWJsdWUiIGQ9Ik05IDFMMSA1djVsNiAzIDgtNFY0TDkgMXpNNyA2Ljg4MkwzLjIzNiA1IDkgMi4xMTggMTIuNzY0IDQgNyA2Ljg4MnoiIGlkPSJpY29uQmciLz48cGF0aCBjbGFzcz0iaWNvbi12cy1mZyIgZD0iTTkgMi4xMThMMTIuNzY0IDQgNyA2Ljg4MiAzLjIzNiA1IDkgMi4xMTh6IiBpZD0iaWNvbkZnIi8+PC9zdmc+"); }\n\n.monaco-editor.vs-dark .suggest-widget .monaco-list .monaco-list-row .icon.event,\n.monaco-editor.hc-black .suggest-widget .monaco-list .monaco-list-row .icon.event { background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiI+PHN0eWxlPi5pY29uLWNhbnZhcy10cmFuc3BhcmVudHtvcGFjaXR5OjA7ZmlsbDojMmQyZDMwfS5pY29uLXZzLW91dHtmaWxsOiMyZDJkMzB9Lmljb24tdnMtYWN0aW9uLW9yYW5nZXtmaWxsOiNlOGFiNTN9PC9zdHlsZT48cGF0aCBjbGFzcz0iaWNvbi1jYW52YXMtdHJhbnNwYXJlbnQiIGQ9Ik0xNiAxNkgwVjBoMTZ2MTZ6IiBpZD0iY2FudmFzIi8+PHBhdGggY2xhc3M9Imljb24tdnMtb3V0IiBkPSJNMTQgMS40MTRMOS40MTQgNkgxNHYxLjQxNEw1LjQxNCAxNkgzdi0xLjIzNEw1LjM3MSAxMEgyVjguNzY0TDYuMzgyIDBIMTR2MS40MTR6IiBpZD0ib3V0bGluZSIgc3R5bGU9ImRpc3BsYXk6IG5vbmU7Ii8+PHBhdGggY2xhc3M9Imljb24tdnMtYWN0aW9uLW9yYW5nZSIgZD0iTTcgN2g2bC04IDhINGwyLjk4NS02SDNsNC04aDZMNyA3eiIgaWQ9Imljb25CZyIvPjwvc3ZnPg=="); }\n\n.monaco-editor.vs-dark .suggest-widget .monaco-list .monaco-list-row .icon.operator,\n.monaco-editor.hc-black .suggest-widget .monaco-list .monaco-list-row .icon.operator { background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiI+PHN0eWxlPi5pY29uLWNhbnZhcy10cmFuc3BhcmVudHtvcGFjaXR5OjA7ZmlsbDojMmQyZDMwfS5pY29uLXZzLW91dHtmaWxsOiMyZDJkMzB9Lmljb24tdnMtZmd7ZmlsbDojMmIyODJlfS5pY29uLXZzLWFjdGlvbi1ibHVle2ZpbGw6Izc1YmVmZn08L3N0eWxlPjxwYXRoIGNsYXNzPSJpY29uLWNhbnZhcy10cmFuc3BhcmVudCIgZD0iTTE2IDE2SDBWMGgxNnYxNnoiIGlkPSJjYW52YXMiLz48cGF0aCBjbGFzcz0iaWNvbi12cy1vdXQiIGQ9Ik0xNiAxNkgwVjBoMTZ2MTZ6IiBpZD0ib3V0bGluZSIgc3R5bGU9ImRpc3BsYXk6IG5vbmU7Ii8+PHBhdGggY2xhc3M9Imljb24tdnMtYWN0aW9uLWJsdWUiIGQ9Ik0xIDF2MTRoMTRWMUgxem02IDEySDN2LTFoNHYxem0wLTNIM1Y5aDR2MXptMC01SDV2Mkg0VjVIMlY0aDJWMmgxdjJoMnYxem0zLjI4MSA4SDguNzE5bDMtNGgxLjU2M2wtMy4wMDEgNHpNMTQgNUg5VjRoNXYxeiIgaWQ9Imljb25CZyIvPjxwYXRoIGNsYXNzPSJpY29uLXZzLWZnIiBkPSJNNyA1SDV2Mkg0VjVIMlY0aDJWMmgxdjJoMnYxem03LTFIOXYxaDVWNHpNNyA5SDN2MWg0Vjl6bTAgM0gzdjFoNHYtMXptMy4yODEgMWwzLTRoLTEuNTYzbC0zIDRoMS41NjN6IiBpZD0iaWNvbkZnIiBzdHlsZT0iZGlzcGxheTogbm9uZTsiLz48L3N2Zz4="); }\n\n.monaco-editor.vs-dark .suggest-widget .monaco-list .monaco-list-row .icon.variable,\n.monaco-editor.hc-black .suggest-widget .monaco-list .monaco-list-row .icon.variable { background-image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NTc4LS43ODkgMy4xNTYtMS41NzggMS41NzguNzg5LTMuMTU2IDEuNTc4eiIgaWQ9ImNvbG9ySW1wb3J0YW5jZSIvPjwvc3ZnPg=="); }\n\n.monaco-editor.vs-dark .suggest-widget .monaco-list .monaco-list-row .icon.class,\n.monaco-editor.hc-black .suggest-widget .monaco-list .monaco-list-row .icon.class { background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiI+PHN0eWxlPi5pY29uLWNhbnZhcy10cmFuc3BhcmVudHtvcGFjaXR5OjA7ZmlsbDojMmQyZDMwfS5pY29uLXZzLW91dHtmaWxsOiMyZDJkMzB9Lmljb24tdnMtYWN0aW9uLW9yYW5nZXtmaWxsOiNlOGFiNTN9PC9zdHlsZT48cGF0aCBjbGFzcz0iaWNvbi1jYW52YXMtdHJhbnNwYXJlbnQiIGQ9Ik0xNiAxNkgwVjBoMTZ2MTZ6IiBpZD0iY2FudmFzIi8+PHBhdGggY2xhc3M9Imljb24tdnMtb3V0IiBkPSJNMTYgNi41ODZsLTMtM0wxMS41ODYgNUg5LjQxNGwxLTEtNC00aC0uODI4TDAgNS41ODZ2LjgyOGw0IDRMNi40MTQgOEg3djVoMS41ODZsMyAzaC44MjhMMTYgMTIuNDE0di0uODI4TDEzLjkxNCA5LjUgMTYgNy40MTR2LS44Mjh6IiBpZD0ib3V0bGluZSIvPjxwYXRoIGNsYXNzPSJpY29uLXZzLWFjdGlvbi1vcmFuZ2UiIGQ9Ik0xMyAxMGwyIDItMyAzLTItMiAxLTFIOFY3SDZMNCA5IDEgNmw1LTUgMyAzLTIgMmg1bDEtMSAyIDItMyAzLTItMiAxLTFIOXY0bDIuOTk5LjAwMkwxMyAxMHoiIGlkPSJpY29uQmciLz48L3N2Zz4="); }\n\n.monaco-editor.vs-dark .suggest-widget .monaco-list .monaco-list-row .icon.interface,\n.monaco-editor.hc-black .suggest-widget .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yAwIDEgMCA0LjE4NS41SDguMDVhMy40OSAzLjQ5IDAgMCAwIDMuNDUgMyAzLjUgMy41IDAgMSAwIDAtN3ptMCA1Yy0uODI3IDAtMS41LS42NzMtMS41LTEuNVMxMC42NzMgNiAxMS41IDZzMS41LjY3MyAxLjUgMS41UzEyLjMyNyA5IDExLjUgOXoiIGlkPSJpY29uQmciLz48L3N2Zz4="); }\n\n.monaco-editor.vs-dark .suggest-widget .monaco-list .monaco-list-row .icon.struct,\n.monaco-editor.hc-black .suggest-widget .monaco-list .monaco-list-row .icon.struct { background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiI+PHN0eWxlPi5pY29uLWNhbnZhcy10cmFuc3BhcmVudHtvcGFjaXR5OjA7ZmlsbDojMmQyZDMwfS5pY29uLXZzLW91dHtmaWxsOiMyZDJkMzB9Lmljb24tdnMtYWN0aW9uLWJsdWV7ZmlsbDojNzViZWZmfTwvc3R5bGU+PHBhdGggY2xhc3M9Imljb24tY2FudmFzLXRyYW5zcGFyZW50IiBkPSJNMTYgMTZIMFYwaDE2djE2eiIgaWQ9ImNhbnZhcyIvPjxwYXRoIGNsYXNzPSJpY29uLXZzLW91dCIgZD0iTTkgMTRWOEg3djZIMVYyaDE0djEySDl6IiBpZD0ib3V0bGluZSIgc3R5bGU9ImRpc3BsYXk6IG5vbmU7Ii8+PHBhdGggY2xhc3M9Imljb24tdnMtYWN0aW9uLWJsdWUiIGQ9Ik0xMCA5aDR2NGgtNFY5em0tOCA0aDRWOUgydjR6TTIgM3Y0aDEyVjNIMnoiIGlkPSJpY29uQmciLz48L3N2Zz4="); }\n\n.monaco-editor.vs-dark .suggest-widget .monaco-list .monaco-list-row .icon.type-parameter,\n.monaco-editor.hc-black .suggest-widget .monaco-list .monaco-list-row .icon.type-parameter { background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiI+PHN0eWxlPi5pY29uLWNhbnZhcy10cmFuc3BhcmVudHtvcGFjaXR5OjA7ZmlsbDojMmQyZDMwfS5pY29uLXZzLW91dHtmaWxsOiMyZDJkMzB9Lmljb24tdnMtYmd7ZmlsbDojYzVjNWM1fTwvc3R5bGU+PHBhdGggY2xhc3M9Imljb24tY2FudmFzLXRyYW5zcGFyZW50IiBkPSJNMTYgMTZIMFYwaDE2djE2eiIgaWQ9ImNhbnZhcyIvPjxwYXRoIGNsYXNzPSJpY29uLXZzLW91dCIgZD0iTTEwLjcwMiAxMC41bDItMi0yLTIgLjUtLjVIMTB2NWgxdjNINXYtM2gxVjZINC43OThsLjUuNS0yIDIgMiAyTDMgMTIuNzk3bC0zLTNWNy4yMDFsMy0zVjJoMTB2Mi4yMDFsMyAzdjIuNTk2bC0zIDMtMi4yOTgtMi4yOTd6IiBpZD0ib3V0bGluZSIgc3R5bGU9ImRpc3BsYXk6IG5vbmU7Ii8+PHBhdGggY2xhc3M9Imljb24tdnMtYmciIGQ9Ik00IDNoOHYyaC0xdi0uNWMwLS4yNzctLjIyNC0uNS0uNS0uNUg5djcuNWMwIC4yNzUuMjI0LjUuNS41aC41djFINnYtMWguNWEuNS41IDAgMCAwIC41LS41VjRINS41YS41LjUgMCAwIDAtLjUuNVY1SDRWM3pNMyA1LjYxNUwuMTE2IDguNSAzIDExLjM4M2wuODg0LS44ODMtMi0yIDItMkwzIDUuNjE1em0xMCAwbC0uODg0Ljg4NSAyIDItMiAyIC44ODQuODgzTDE1Ljg4NCA4LjUgMTMgNS42MTV6IiBpZD0iaWNvbkJnIi8+PC9zdmc+"); }\n\n.monaco-editor.vs-dark .suggest-widget .monaco-list .monaco-list-row .icon.module,\n.monaco-editor.hc-black .suggest-widget .monaco-list .monaco-list-row .icon.module { background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcv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VjQuMzVjMC0uODUyLS4zNjQtMS4yODgtMS4wOTQtMS4zMDZ2LTEuMDZjMS42MTMuMDE4IDIuNDIuNzIgMi40MiAyLjEwNXYxLjk2MmMwIC45Mi4zNTQgMS40MDQgMS4wNiAxLjQ0OXYuOTk5eiIgaWQ9Imljb25CZyIvPjwvc3ZnPg=="); }\n\n.monaco-editor.vs-dark .suggest-widget .monaco-list .monaco-list-row .icon.property,\n.monaco-editor.hc-black .suggest-widget .monaco-list .monaco-list-row .icon.property { background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiI+PHN0eWxlPi5pY29uLWNhbnZhcy10cmFuc3BhcmVudHtvcGFjaXR5OjA7ZmlsbDojMmQyZDMwfS5pY29uLXZzLW91dHtmaWxsOiMyZDJkMzB9Lmljb24tdnMtYmd7ZmlsbDojYzVjNWM1fTwvc3R5bGU+PHBhdGggY2xhc3M9Imljb24tY2FudmFzLXRyYW5zcGFyZW50IiBkPSJNMTYgMTZIMFYwaDE2djE2eiIgaWQ9ImNhbnZhcyIvPjxwYXRoIGNsYXNzPSJpY29uLXZzLW91dCIgZD0iTTE2IDUuNWE1LjUgNS41IDAgMCAxLTUuNSA1LjVjLS4yNzUgMC0uNTQzLS4wMjctLjgwNy0uMDY2bC0uMDc5LS4wMTJhNS40MjkgNS40MjkgMCAwIDEtLjgxLS4xOTJsLTQuNTM3IDQuNTM3Yy0uNDcyLjQ3My0xLjEuNzMzLTEuNzY3LjczM3MtMS4yOTUtLjI2LTEuNzY4LS43MzJhMi41MDIgMi41MDIgMCAwIDEgMC0zLjUzNWw0LjUzNy00LjUzN2E1LjQ1MiA1LjQ1MiAwIDAgMS0uMTkxLS44MTJjLS4wMDUtLjAyNS0uMDA4LS4wNTEtLjAxMi0uMDc3QTUuNTAzIDUuNTAzIDAgMCAxIDUgNS41YTUuNSA1LjUgMCAxIDEgMTEgMHoiIGlkPSJvdXRsaW5lIi8+PHBhdGggY2xhc3M9Imljb24tdnMtYmciIGQ9Ik0xNSA1LjVhNC41IDQuNSAwIDAgMS00LjUgNC41Yy0uNjkzIDAtMS4zNDItLjE3LTEuOTI5LS40NWwtNS4wMSA1LjAxYy0uMjkzLjI5NC0uNjc3LjQ0LTEuMDYxLjQ0cy0uNzY4LS4xNDYtMS4wNjEtLjQzOWExLjUgMS41IDAgMCAxIDAtMi4xMjFsNS4wMS01LjAxQTQuNDgzIDQuNDgzIDAgMCAxIDYgNS41IDQuNSA0LjUgMCAwIDEgMTAuNSAxYy42OTMgMCAxLjM0Mi4xNyAxLjkyOS40NUw5LjYzNiA0LjI0M2wyLjEyMSAyLjEyMSAyLjc5My0yLjc5M2MuMjguNTg3LjQ1IDEuMjM2LjQ1IDEuOTI5eiIgaWQ9Imljb25CZyIvPjwvc3ZnPg=="); }\n\n.monaco-editor.vs-dark .suggest-widget .monaco-list .monaco-list-row .icon.unit,\n.monaco-editor.hc-black .suggest-widget .monaco-list .monaco-list-row .icon.unit { background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiI+PHN0eWxlPi5pY29uLWNhbnZhcy10cmFuc3BhcmVudHtvcGFjaXR5OjA7ZmlsbDojMmQyZDMwfS5pY29uLXZzLW91dHtmaWxsOiMyZDJkMzB9Lmljb24tdnMtYmd7ZmlsbDojYzVjNWM1fS5pY29uLXZzLWZne2ZpbGw6IzJiMjgyZX08L3N0eWxlPjxwYXRoIGNsYXNzPSJpY29uLWNhbnZhcy10cmFuc3BhcmVudCIgZD0iTTE2IDE2SDBWMGgxNnYxNnoiIGlkPSJjYW52YXMiLz48cGF0aCBjbGFzcz0iaWNvbi12cy1vdXQiIGQ9Ik0xNiAxMS4wMTNIMVY0aDE1djcuMDEzeiIgaWQ9Im91dGxpbmUiLz48cGF0aCBjbGFzcz0iaWNvbi12cy1mZyIgZD0iTTggOUg3VjZoM3YzSDlWN0g4djJ6TTQgN2gxdjJoMVY2SDN2M2gxVjd6bTggMGgxdjJoMVY2aC0zdjNoMVY3eiIgaWQ9Imljb25GZyIvPjxwYXRoIGNsYXNzPSJpY29uLXZzLWJnIiBkPSJNMiA1djVoMTNWNUgyem00IDRINVY3SDR2MkgzVjZoM3Yzem00IDBIOVY3SDh2Mkg3VjZoM3Yzem00IDBoLTFWN2gtMXYyaC0xVjZoM3YzeiIgaWQ9Imljb25CZyIvPjwvc3ZnPg=="); }\n\n.monaco-editor.vs-dark .suggest-widget .monaco-list .monaco-list-row .icon.constant,\n.monaco-editor.hc-black .suggest-widget .monaco-list .monaco-list-row .icon.constant { background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiI+PHN0eWxlPi5pY29uLWNhbnZhcy10cmFuc3BhcmVudHtvcGFjaXR5OjA7ZmlsbDojMjUyNTI2fS5pY29uLXZzLW91dHtmaWxsOiMyNTI1MjZ9Lmljb24tdnMtYmd7ZmlsbDojYzVjNWM1fS5pY29uLXZzLWZne2ZpbGw6IzJiMjgyZX0uaWNvbi12cy1hY3Rpb24tYmx1ZXtmaWxsOiM3NWJlZmZ9PC9zdHlsZT48cGF0aCBjbGFzcz0iaWNvbi1jYW52YXMtdHJhbnNwYXJlbnQiIGQ9Ik0xNiAxNkgwVjBoMTZ2MTZ6IiBpZD0iY2FudmFzIi8+PHBhdGggY2xhc3M9Imljb24tdnMtb3V0IiBkPSJNMi44NzkgMTRMMSAxMi4xMjFWMy44NzlMMi44NzkgMmgxMC4yNDJMMTUgMy44Nzl2OC4yNDJMMTMuMTIxIDE0SDIuODc5eiIgaWQ9Im91dGxpbmUiLz48cGF0aCBjbGFzcz0iaWNvbi12cy1mZyIgZD0iTTEyLjI5MyA0SDMuNzA3TDMgNC43MDd2Ni41ODZsLjcwNy43MDdoOC41ODZsLjcwNy0uNzA3VjQuNzA3TDEyLjI5MyA0ek0xMSAxMEg1VjloNnYxem0wLTNINVY2aDZ2MXoiIGlkPSJpY29uRmciLz48ZyBpZD0iaWNvbkJnIj48cGF0aCBjbGFzcz0iaWNvbi12cy1iZyIgZD0iTTEyLjcwNyAxM0gzLjI5M0wyIDExLjcwN1Y0LjI5M0wzLjI5MyAzaDkuNDE0TDE0IDQuMjkzdjcuNDE0TDEyLjcwNyAxM3ptLTktMWg4LjU4NmwuNzA3LS43MDdWNC43MDdMMTIuMjkzIDRIMy43MDdMMyA0LjcwN3Y2LjU4NmwuNzA3LjcwN3oiLz48cGF0aCBjbGFzcz0iaWNvbi12cy1hY3Rpb24tYmx1ZSIgZD0iTTExIDdINVY2aDZ2MXptMCAySDV2MWg2Vjl6Ii8+PC9nPjwvc3ZnPg=="); }\n\n.monaco-editor.vs-dark .suggest-widget .monaco-list .monaco-list-row .icon.value,\n.monaco-editor.hc-black .suggest-widget .monaco-list .monaco-list-row .icon.value,\n.monaco-editor.vs-dark .suggest-widget .monaco-list .monaco-list-row .icon.enum,\n.monaco-editor.hc-black .suggest-widget .monaco-list .monaco-list-row .icon.enum { background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiI+PHN0eWxlPi5pY29uLWNhbnZhcy10cmFuc3BhcmVudHtvcGFjaXR5OjA7ZmlsbDojMmQyZDMwfS5pY29uLXZzLW91dHtmaWxsOiMyZDJkMzB9Lmljb24tdnMtZmd7ZmlsbDojMmIyODJlfS5pY29uLXZzLWFjdGlvbi1vcmFuZ2V7ZmlsbDojZThhYjUzfTwvc3R5bGU+PHBhdGggY2xhc3M9Imljb24tY2FudmFzLXRyYW5zcGFyZW50IiBkPSJNMTYgMTZIMFYwaDE2djE2eiIgaWQ9ImNhbnZhcyIvPjxwYXRoIGNsYXNzPSJpY29uLXZzLW91dCIgZD0iTTE0LjQxNCAxTDE2IDIuNTg2djUuODI4TDE0LjQxNCAxMEgxMHYzLjQxNkw4LjQxNCAxNUgxLjU4NkwwIDEzLjQxNnYtNS44M0wxLjU4NiA2SDZWMi41ODZMNy41ODYgMWg2LjgyOHoiIGlkPSJvdXRsaW5lIi8+PHBhdGggY2xhc3M9Imljb24tdnMtZmciIGQ9Ik0yIDEzaDZWOEgydjV6bTEtNGg0djFIM1Y5em0wIDJoNHYxSDN2LTF6bTExLTVWM0g4djNoLjQxNEw5IDYuNTg2VjZoNHYxSDkuNDE0bC41ODYuNTg2VjhoNFY2em0tMS0xSDlWNGg0djF6IiBpZD0iaWNvbkZnIi8+PHBhdGggY2xhc3M9Imljb24tdnMtYWN0aW9uLW9yYW5nZSIgZD0iTTMgMTFoNC4wMDF2MUgzdi0xem0wLTFoNC4wMDFWOUgzdjF6bTYtMnY1bC0xIDFIMmwtMS0xVjhsMS0xaDZsMSAxek04IDhIMnY1aDZWOHptMS0ybDEgMWgzVjZIOXptMC0xaDRWNEg5djF6bTUtM0g4TDcgM3YzaDFWM2g2djVoLTR2MWg0bDEtMVYzbC0xLTF6IiBpZD0iaWNvbkJnIi8+PC9zdmc+"); }\n\n.monaco-editor.vs-dark .suggest-widget .monaco-list .monaco-list-row .icon.enum-member,\n.monaco-editor.hc-black .suggest-widget .monaco-list .monaco-list-row .icon.enum-member { background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiI+PHN0eWxlPi5pY29uLWNhbnZhcy10cmFuc3BhcmVudHtvcGFjaXR5OjA7ZmlsbDojMmQyZDMwfS5pY29uLXZzLW91dHtmaWxsOiMyZDJkMzB9Lmljb24tdnMtZmd7ZmlsbDojMmIyODJlfS5pY29uLXZzLWFjdGlvbi1ibHVle2ZpbGw6Izc1YmVmZn08L3N0eWxlPjxwYXRoIGNsYXNzPSJpY29uLWNhbnZhcy10cmFuc3BhcmVudCIgZD0iTTE2IDE2SDBWMGgxNnYxNnoiIGlkPSJjYW52YXMiLz48cGF0aCBjbGFzcz0iaWNvbi12cy1vdXQiIGQ9Ik0wIDE1VjZoNlYyLjU4Nkw3LjU4NSAxaDYuODI5TDE2IDIuNTg2djUuODI5TDE0LjQxNCAxMEgxMHY1SDB6bTMtNnoiIGlkPSJvdXRsaW5lIi8+PHBhdGggY2xhc3M9Imljb24tdnMtZmciIGQ9Ik04IDN2M2g1djFoLTN2MWg0VjNIOHptNSAySDlWNGg0djF6TTIgOHY1aDZWOEgyem01IDNIM3YtMWg0djF6IiBpZD0iaWNvbkZnIi8+PHBhdGggY2xhc3M9Imljb24tdnMtYWN0aW9uLWJsdWUiIGQ9Ik0xMCA2aDN2MWgtM1Y2ek05IDR2MWg0VjRIOXptNS0ySDhMNyAzdjNoMVYzaDZ2NWgtNHYxaDRsMS0xVjNsLTEtMXptLTcgOEgzdjFoNHYtMXptMi0zdjdIMVY3aDh6TTggOEgydjVoNlY4eiIgaWQ9Imljb25CZyIvPjwvc3ZnPg=="); }\n\n.monaco-editor.vs-dark .suggest-widget .monaco-list .monaco-list-row .icon.keyword,\n.monaco-editor.hc-black .suggest-widget .monaco-list .monaco-list-row .icon.keyword { background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiI+PHN0eWxlPi5pY29uLWNhbnZhcy10cmFuc3BhcmVudHtvcGFjaXR5OjA7ZmlsbDojMmQyZDMwfS5pY29uLXZzLW91dHtmaWxsOiMyZDJkMzB9Lmljb24tdnMtYmd7ZmlsbDojYzVjNWM1fS5pY29uLXZzLWZne2ZpbGw6IzJiMjgyZX08L3N0eWxlPjxwYXRoIGNsYXNzPSJpY29uLWNhbnZhcy10cmFuc3BhcmVudCIgZD0iTTE2IDE2SDBWMGgxNnYxNnoiIGlkPSJjYW52YXMiLz48cGF0aCBjbGFzcz0iaWNvbi12cy1vdXQiIGQ9Ik0xNiA1VjJIOVYxSDB2MTRoMTN2LTNoM1Y5aC0xVjZIOVY1aDd6bS04IDdWOWgxdjNIOHoiIGlkPSJvdXRsaW5lIi8+PHBhdGggY2xhc3M9Imljb24tdnMtZmciIGQ9Ik0yIDNoNXYxSDJWM3oiIGlkPSJpY29uRmciLz48cGF0aCBjbGFzcz0iaWNvbi12cy1iZyIgZD0iTTE1IDRoLTVWM2g1djF6bS0xIDNoLTJ2MWgyVjd6bS00IDBIMXYxaDlWN3ptMiA2SDF2MWgxMXYtMXptLTUtM0gxdjFoNnYtMXptOCAwaC01djFoNXYtMXpNOCAydjNIMVYyaDd6TTcgM0gydjFoNVYzeiIgaWQ9Imljb25CZyIvPjwvc3ZnPg=="); }\n\n.monaco-editor.vs-dark .suggest-widget .monaco-list .monaco-list-row .icon.text,\n.monaco-editor.hc-black .suggest-widget .monaco-list .monaco-list-row .icon.text { background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiI+PHN0eWxlPi5pY29uLWNhbnZhcy10cmFuc3BhcmVudHtvcGFjaXR5OjA7ZmlsbDojMmQyZDMwfS5pY29uLXZzLW91dHtmaWxsOiMyZDJkMzB9Lmljb24tdnMtYmd7ZmlsbDojYzVjNWM1fS5pY29uLXZzLWZne2ZpbGw6IzJiMjgyZX08L3N0eWxlPjxwYXRoIGNsYXNzPSJpY29uLWNhbnZhcy10cmFuc3BhcmVudCIgZD0iTTE2IDE2SDBWMGgxNnYxNnoiIGlkPSJjYW52YXMiLz48cGF0aCBjbGFzcz0iaWNvbi12cy1vdXQiIGQ9Ik0xNiAxNUgwVjFoMTZ2MTR6IiBpZD0ib3V0bGluZSIvPjxwYXRoIGNsYXNzPSJpY29uLXZzLWZnIiBkPSJNOS4yMjkgNy4zNTRjLjAzNS4xNDYuMDUyLjMxLjA1Mi40OTQgMCAu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NDIzIDEuMTQ2LjA4NC4wNC4xNzEuMDc0LjI3NC4wNzQuMDQ5IDAgLjEwMS0uMDEuMTUzLS4wMjdhLjg1Ni44NTYgMCAwIDAgLjE1OC0uMDY4IDEuMTYgMS4xNiAwIDAgMCAuMjg4LS4yMjV2Ljc3Yy0uMDkuMDc2LS4xOTIuMTM5LS4zMDkuMTg0YTEuMDk4IDEuMDk4IDAgMCAxLS40MTIuMDY4Ljk3NC45NzQgMCAwIDEtLjUyMy0uMTQzIDEuMjU3IDEuMjU3IDAgMCAxLS4zOTYtLjM5NiAyLjA5OCAyLjA5OCAwIDAgMS0uMjUyLS42MDIgMy4xMTggMy4xMTggMCAwIDEtLjA4OC0uNzU0YzAtLjMxNi4wMzItLjYwNC4wOTYtLjg2MS4wNjMtLjI1OC4xNTUtLjQ3OS4yNzMtLjY2LjExOS0uMTgyLjI2NS0uMzIyLjQzMy0uNDI0YTEuMTAyIDEuMTAyIDAgMCAxIDEuMDczLS4wMjN6IiBpZD0iaWNvbkJnIi8+PC9zdmc+"); }\n\n.monaco-editor.vs-dark .suggest-widget .monaco-list .monaco-list-row .icon.color,\n.monaco-editor.hc-black .suggest-widget .monaco-list .monaco-list-row .icon.color { background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiI+PHN0eWxlPi5pY29uLWNhbnZhcy10cmFuc3BhcmVudHtvcGFjaXR5OjA7ZmlsbDojMmQyZDMwfS5pY29uLXZzLW91dHtmaWxsOiMyZDJkMzB9Lmljb24tdnMtYmd7ZmlsbDojYzVjNWM1fS5pY29uLXZzLXJlZHtmaWxsOiNmNDg3NzF9Lmljb24tdnMteWVsbG93e2ZpbGw6I2ZmY2MwMH0uaWNvbi12cy1ncmVlbntmaWxsOiMzMzk5MzN9Lmljb24tdnMtYmx1ZXtmaWxsOiMxYmExZTJ9Lmljb24tdnMtYWN0aW9uLXB1cnBsZX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CAwLTEuNzV6Ii8+PC9nPjwvc3ZnPg=="); }\n\n.monaco-editor.vs-dark .suggest-widget .monaco-list .monaco-list-row .icon.file,\n.monaco-editor.hc-black .suggest-widget .monaco-list .monaco-list-row .icon.file { background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiI+PHN0eWxlPi5pY29uLWNhbnZhcy10cmFuc3BhcmVudHtvcGFjaXR5OjA7ZmlsbDojMmQyZDMwfS5pY29uLXZzLW91dHtmaWxsOiMyZDJkMzB9Lmljb24tdnMtYmd7ZmlsbDojYzVjNWM1fS5pY29uLXZzLWZne2ZpbGw6IzJiMjgyZX08L3N0eWxlPjxwYXRoIGNsYXNzPSJpY29uLWNhbnZhcy10cmFuc3BhcmVudCIgZD0iTTE2IDE2SDBWMGgxNnYxNnoiIGlkPSJjYW52YXMiLz48cGF0aCBjbGFzcz0iaWNvbi12cy1vdXQiIGQ9Ik0xNSAxNkgyVjBoOC42MjFMMTUgNC4zNzlWMTZ6IiBpZD0ib3V0bGluZSIvPjxwYXRoIGNsYXNzPSJpY29uLXZzLWZnIiBkPSJNMTMgMTRINFYyaDV2NGg0djh6bS0zLTlWMi4yMDdMMTIuNzkzIDVIMTB6IiBpZD0iaWNvbkZnIi8+PHBhdGggY2xhc3M9Imljb24tdnMtYmciIGQ9Ik0zIDF2MTRoMTFWNC43OTNMMTAuMjA3IDFIM3ptMTAgMTNINFYyaDV2NGg0djh6bS0zLTlWMi4yMDdMMTIuNzkzIDVIMTB6IiBpZD0iaWNvbkJnIi8+PC9zdmc+"); }\n\n.monaco-editor.vs-dark .suggest-widget .monaco-list .monaco-list-row .icon.reference,\n.monaco-editor.hc-black .suggest-widget .monaco-list .monaco-list-row .icon.reference { background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgM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jczIDIgMy41UzIuNjczIDUgMy41IDVoMi41MTNMNCAzaDJsMi41IDIuNDg0TDYgOEg0bDEuOTg4LTJ6IiBpZD0iY29sb3JBY3Rpb24iLz48L3N2Zz4="); }\n\n.monaco-editor.vs-dark .suggest-widget .monaco-list .monaco-list-row .icon.snippet,\n.monaco-editor.hc-black .suggest-widget .monaco-list .monaco-list-row .icon.snippet { background-image: url("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjxzdmcKICAgeG1sbnM6ZGM9Imh0dHA6Ly9wdXJsLm9yZy9kYy9lbGVtZW50cy8xLjEvIgogICB4bWxuczpjYz0iaHR0cDovL2NyZWF0aXZlY29tbW9ucy5vcmcvbnMjIgogICB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiCiAgIHhtbG5zOnN2Zz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciCiAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgdmVyc2lvbj0iMS4xIgogICBpZD0ic3ZnNDY5NCIKICAgdmlld0JveD0iMCAwIDE2IDE2Ij4KICA8bWV0YWRhdGEKICAgICBpZD0ibWV0YWRhdGE0NzA1Ij4KICAgIDxyZGY6UkRGPgogICAgICA8Y2M6V29yawogICAgICAgICByZGY6YWJvdXQ9IiI+CiAgICAgICAgPGRjOmZvcm1hdD5pbWFnZS9zdmcreG1sPC9kYzpmb3JtYXQ+CiAgICAgICAgPGRjOnR5cGUKICAgICAgICAgICByZGY6cmVzb3VyY2U9Imh0dHA6Ly9wdXJsLm9yZy9kYy9kY21pdHlwZS9TdGlsbEltYWdlIiAvPgogICAgICAgIDxkYzp0aXRsZT48L2RjOnRpdGxlPgogICAgICA8L2NjOldvcms+CiAgICA8L3JkZjpSREY+CiAgPC9tZXRhZGF0YT4KICA8ZGVmcwogICAgIGlkPSJkZWZzNDcwMyIgLz4KICA8c3R5bGUKICAgICBpZD0ic3R5bGU0Njk2Ij4uaWNvbi1jYW52YXMtdHJhbnNwYXJlbnR7b3BhY2l0eTowO2ZpbGw6I2Y2ZjZmNn0uaWNvbi12cy1vdXR7ZmlsbDojZjZmNmY2fS5pY29uLXZzLWFjdGlvbi1vcmFuZ2V7ZmlsbDojYzI3ZDFhfTwvc3R5bGU+CiAgPGcKICAgICBpZD0iZzQ3MjQiCiAgICAgdHJhbnNmb3JtPSJtYXRyaXgoMS4zMzMzMzMzLDAsMCwxLjMzMzMzMzMsLTI0NS45OTk5OSwtMzEuOTk5OTk5KSI+CiAgICA8cGF0aAogICAgICAgZD0ibSAxODUsMjQgMTEsMCAwLDEyIC0xMSwwIHoiCiAgICAgICBpZD0icGF0aDQ1MjgiCiAgICAgICBzdHlsZT0iZmlsbDojMmQyZDMwIiAvPgogICAgPHBhdGgKICAgICAgIGQ9Im0gMTk0LDMzIDAsLTcgLTcsMCAwLDcgLTEsMCAwLC04IDksMCAwLDggeiBtIC04LDEgMSwwIDAsMSAtMSwwIHogbSAyLDAgMSwwIDAsMSAtMSwwIHogbSAyLDAgMSwwIDAsMSAtMSwwIHogbSAyLDAgMSwwIDAsMSAtMSwwIHogbSAyLDAgMSwwIDAsMSAtMSwwIHoiCiAgICAgICBpZD0icGF0aDQ1MzAiCiAgICAgICBzdHlsZT0iZmlsbDojYzVjNWM1IiAvPgogICAgPHBhdGgKICAgICAgIGQ9Im0gMTg3LDI2IDcsMCAwLDcgLTcsMCB6IgogICAgICAgaWQ9InBhdGg0NTMyIgogICAgICAgc3R5bGU9ImZpbGw6IzJiMjgyZSIgLz4KICA8L2c+Cjwvc3ZnPgo="); }\n\n.monaco-editor.vs-dark .suggest-widget .monaco-list .monaco-list-row .icon.customcolor,\n.monaco-editor.hc-black .suggest-widget .monaco-list .monaco-list-row .icon.customcolor { background-image: none; }\n\n.monaco-editor.vs-dark .suggest-widget .monaco-list .monaco-list-row .icon.folder,\n.monaco-editor.hc-black .suggest-widget .monaco-list .monaco-list-row .icon.folder { background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+PHN0eWxlIHR5cGU9InRleHQvY3NzIj4uaWNvbi1jYW52YXMtdHJhbnNwYXJlbnR7b3BhY2l0eTowO2ZpbGw6I0Y2RjZGNjt9IC5pY29uLXZzLW91dHtvcGFjaXR5OjA7ZmlsbDojRjZGNkY2O30gLmljb24tdnMtZmd7b3BhY2l0eTowO2ZpbGw6I0YwRUZGMTt9IC5pY29uLWZvbGRlcntmaWxsOiNDNUM1QzU7fTwvc3R5bGU+PHBhdGggY2xhc3M9Imljb24tY2FudmFzLXRyYW5zcGFyZW50IiBkPSJNMTYgMTZoLTE2di0xNmgxNnYxNnoiIGlkPSJjYW52YXMiLz48cGF0aCBjbGFzcz0iaWNvbi12cy1vdXQiIGQ9Ik0xNiAyLjV2MTBjMCAuODI3LS42NzMgMS41LTEuNSAxLjVoLTExLjk5NmMtLjgyNyAwLTEuNS0uNjczLTEuNS0xLjV2LThjMC0uODI3LjY3My0xLjUgMS41LTEuNWgyLjg4NmwxLTJoOC4xMWMuODI3IDAgMS41LjY3MyAxLjUgMS41eiIgaWQ9Im91dGxpbmUiLz48cGF0aCBjbGFzcz0iaWNvbi1mb2xkZXIiIGQ9Ik0xNC41IDJoLTcuNDkybC0xIDJoLTMuNTA0Yy0uMjc3IDAtLjUuMjI0LS41LjV2OGMwIC4yNzYuMjIzLjUuNS41aDExLjk5NmMuMjc1IDAgLjUtLjIyNC41LS41di0xMGMwLS4yNzYtLjIyNS0uNS0uNS0uNXptLS40OTYgMmgtNi40OTZsLjUtMWg1Ljk5NnYxeiIgaWQ9Imljb25CZyIvPjxwYXRoIGNsYXNzPSJpY29uLXZzLWZnIiBkPSJNMTQgM3YxaC02LjVsLjUtMWg2eiIgaWQ9Imljb25GZyIvPjwvc3ZnPg=="); }\n',""])},579:(e,t,n)=>{(e.exports=n(8826)(!1)).push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n.monaco-editor .zone-widget {\n\tposition: absolute;\n\tz-index: 10;\n}\n\n\n.monaco-editor .zone-widget .zone-widget-container {\n\tborder-top-style: solid;\n\tborder-bottom-style: solid;\n\tborder-top-width: 0;\n\tborder-bottom-width: 0;\n\tposition: relative;\n}\n",""])},4900:(e,t,n)=>{(e.exports=n(8826)(!1)).push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .accessibilityHelpWidget {\n\tpadding: 10px;\n\tvertical-align: middle;\n\toverflow: scroll;\n}",""])},5762:(e,t,n)=>{(e.exports=n(8826)(!1)).push([e.id,'/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .iPadShowKeyboard {\n\twidth: 58px;\n\tmin-width: 0;\n\theight: 36px;\n\tmin-height: 0;\n\tmargin: 0;\n\tpadding: 0;\n\tposition: absolute;\n\tresize: none;\n\toverflow: hidden;\n\tbackground: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI1OCIgaGVpZ2h0PSIzNiI+PHBhdGggZmlsbD0iI0YwRUZGMSIgZD0iTTU0IDMydi0yOGgtNTB2MjhoNTB6bS0xNi0yaC0xOHYtNmgxOHY2em02IDBoLTR2LTZoNHY2em04IDBoLTZ2LTZoNnY2em0tNC0yNGg0djRoLTR2LTR6bTAgNmg0djRoLTR2LTR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iBoZWlnaHQ9IjYiLz48L3N2Zz4=") center center no-repeat;\n\tborder: 4px solid #252526;\n}',""])},9528:(e,t,n)=>{(e.exports=n(8826)(!1)).push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .tokens-inspect-widget {\n\tz-index: 50;\n\t-webkit-user-select: text;\n\t-ms-user-select: text;\n\t-khtml-user-select: text;\n\t-moz-user-select: text;\n\t-o-user-select: text;\n\tuser-select: text;\n\tpadding: 10px;\n}\n\n.tokens-inspect-separator {\n\theight: 1px;\n\tborder: 0;\n}\n\n.monaco-editor .tokens-inspect-widget .tm-token {\n\tfont-family: monospace;\n}\n\n.monaco-editor .tokens-inspect-widget .tm-token-length {\n\tfont-weight: normal;\n\tfont-size: 60%;\n\tfloat: right;\n}\n\n.monaco-editor .tokens-inspect-widget .tm-metadata-table {\n\twidth: 100%;\n}\n\n.monaco-editor .tokens-inspect-widget .tm-metadata-value {\n\tfont-family: monospace;\n\ttext-align: right;\n}\n\n.monaco-editor .tokens-inspect-widget .tm-token-type {\n\tfont-family: monospace;\n}\n",""])},6394:(e,t,n)=>{(e.exports=n(8826)(!1)).push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-quick-open-widget {\n\tfont-size: 13px;\n}",""])},4576:(e,t,n)=>{(e.exports=n(8826)(!1)).push([e.id,'/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-quick-open-widget {\n\tfont-size: 13px;\n}\n\n.monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon,\n.vs-dark .monaco-quick-open-widget .quick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Z29uIHBvaW50cz0iMTAuMzU4LDggNy41LDkuODE1IDQuNjQyLDggNy41LDYuMTg1IiBmaWxsPSIjRjBFRkYxIi8+PHBvbHlnb24gcG9pbnRzPSI0LDguNzc3IDcsMTAuNjgzIDcsMTMuNDk4IDQsMTEuNTkzIiBmaWxsPSIjRjBFRkYxIi8+PHBvbHlnb24gcG9pbnRzPSI4LDEzLjQ5OCA4LDEwLjY4MyAxMSw4Ljc3NyAxMSwxMS41OTMiIGZpbGw9IiNGMEVGRjEiLz48L3N2Zz4=");\n\tbackground-repeat: no-repeat;\n}\n\n.monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.method,\n.monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.function,\n.monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.constructor\t\t{ background-position: 0 -4px; }\n.monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.field,\n.monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.variable \t\t\t{ background-position: -22px -4px; }\n.monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.class \t\t\t\t{ background-position: -43px -3px; }\n.monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.interface \t\t\t{ background-position: -63px -4px; }\n.monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.module \t\t\t{ background-position: -82px -4px; }\n.monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.property \t\t\t{ background-position: -102px -3px; }\n.monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.enum\t\t \t\t{ background-position: -122px -3px; }\n.monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.rule\t\t \t\t{ background-position: -242px -4px; }\n.monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.file\t\t \t\t{ background-position: -262px -4px; }\n\n.vs-dark .monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.method,\n.vs-dark .monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.function,\n.vs-dark .monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.constructor \t{ background-position: 0 -24px; }\n.vs-dark .monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.field,\n.vs-dark .monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.variable \t\t{ background-position: -22px -24px; }\n.vs-dark .monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.class \t\t{ background-position: -43px -23px; }\n.vs-dark .monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.interface \t{ background-position: -63px -24px; }\n.vs-dark .monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.module \t\t{ background-position: -82px -24px; }\n.vs-dark .monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.property \t\t{ background-position: -102px -23px; }\n.vs-dark .monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.enum\t\t \t{ background-position: -122px -23px; }\n.vs-dark .monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.rule\t\t \t{ background-position: -242px -24px; }\n.vs-dark .monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.file\t\t \t{ background-position: -262px -24px; }\n\n.hc-black .monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon {\n\tbackground: none;\n\tdisplay: inline;\n}\n\n.hc-black .monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon:before {\n\theight: 16px;\n\twidth: 16px;\n\tdisplay: inline-block;\n}\n\n.hc-black .monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.method:before,\n.hc-black .monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.function:before,\n.hc-black .monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.constructor:before {\n\tcontent: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+PHBhdGggZmlsbD0iI0IxODBENyIgZD0iTTUuNSAzbC00LjUgMi44NTd2NC4yODVsNC41IDIuODU4IDQuNS0yLjg1N3YtNC4yODZsLTQuNS0yLjg1N3ptLS41IDguNDk4bC0zLTEuOTA1di0yLjgxNmwzIDEuOTA1djIuODE2em0tMi4zNTgtNS40OThsMi44NTgtMS44MTUgMi44NTggMS44MTUtMi44NTggMS44MTUtMi44NTgtMS44MTV6bTYuMzU4IDMuNTkzbC0zIDEuOTA1di0yLjgxNWwzLTEuOTA1djIuODE1eiIvPjwvc3ZnPg==);\n\tmargin-left: 2px;\n}\n\n.hc-black .monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.field:before,\n.hc-black .monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.variable:before {\n\tcontent: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+PHBhdGggZmlsbD0iIzc1QkVGRiIgZD0iTTEgNnY0bDQgMiA2LTN2LTRsLTQtMi02IDN6bTQgMWwtMi0xIDQtMiAyIDEtNCAyeiIvPjwvc3ZnPg==);\n\tmargin-left: 2px;\n}\n\n.hc-black .monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.class:before {\n\tcontent: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+PHBvbHlnb24gZmlsbD0iI0U4QUI1MyIgcG9pbnRzPSIxMS45OTgsMTEuMDAyIDksMTEgOSw3IDExLDcgMTAsOCAxMiwxMCAxNSw3IDEzLDUgMTIsNiA3LDYgOSw0IDYsMSAxLDYgNCw5IDYsNyA4LDcgOCwxMiAxMSwxMiAxMCwxMyAxMiwxNSAxNSwxMiAxMywxMCIvPjwvc3ZnPg==);\n}\n\n.hc-black .monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.interface:before {\n\tcontent: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+PHBhdGggZmlsbD0iIzc1QkVGRiIgZD0iTTExLjUgNGMtMS43NTkgMC0zLjIwNCAxLjMwOC0zLjQ0OSAzaC0zLjEyMmMtLjIyMy0uODYxLS45OTgtMS41LTEuOTI5LTEuNS0xLjEwNCAwLTIgLjg5NS0yIDIgMCAxLjEwNC44OTYgMiAyIDIgLjkzMSAwIDEuNzA2LS42MzkgMS45MjktMS41aDMuMTIyYy4yNDUgMS42OTEgMS42OSAzIDMuNDQ5IDMgMS45MyAwIDMuNS0xLjU3IDMuNS0zLjUgMC0xLjkzMS0xLjU3LTMuNS0zLjUtMy41em0wIDVjLS44MjcgMC0xLjUtLjY3NC0xLjUtMS41IDAtLjgyOC42NzMtMS41IDEuNS0xLjVzMS41LjY3MiAxLjUgMS41YzAgLjgyNi0uNjczIDEuNS0xLjUgMS41eiIvPjwvc3ZnPg==);\n}\n\n.hc-black .monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.module:before {\n\tcontent: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+PHBhdGggZmlsbD0iI0M1QzVDNSIgZD0iTTkgMTF2LTFjMC0uODM0LjQ5Ni0xLjczOCAxLTItLjUwNC0uMjctMS0xLjE2OC0xLTJ2LTFjMC0uODQtLjU4NC0xLTEtMXYtMWMyLjA4MyAwIDIgMS4xNjYgMiAydjFjMCAuOTY5LjcwMy45OCAxIDF2MmMtLjMyMi4wMi0xIC4wNTMtMSAxdjFjMCAuODM0LjA4MyAyLTIgMnYtMWMuODMzIDAgMS0xIDEtMXptLTYgMHYtMWMwLS44MzQtLjQ5Ni0xLjczOC0xLTIgLjUwNC0uMjcgMS0xLjE2OCAxLTJ2LTFjMC0uODQuNTg0LTEgMS0xdi0xYy0yLjA4MyAwLTIgMS4xNjYtMiAydjFjMCAuOTY5LS43MDMuOTgtMSAxdjJjLjMyMi4wMiAxIC4wNTMgMSAxdjFjMCAuODM0LS4wODMgMiAyIDJ2LTFjLS44MzMgMC0xLTEtMS0xeiIvPjwvc3ZnPg==);\n\tmargin-left: 2px;\n}\n\n.hc-black .monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.property:before\t{\n\tcontent: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+PHBhdGggZmlsbD0iI0M1QzVDNSIgZD0iTTEyLjA5IDQuMzU5bC0yLjY0MSAyLjY0MS0yLTIgMi42NDEtMi42NDFjLS41MDItLjIyNi0xLjA1NS0uMzU5LTEuNjQxLS4zNTktMi4yMDkgMC00IDEuNzkxLTQgNCAwIC41ODYuMTMzIDEuMTM5LjM1OSAxLjY0bC0zLjM1OSAzLjM2cy0xIDEgMCAyaDJsMy4zNTktMy4zNmMuNTAzLjIyNiAxLjA1NS4zNiAxLjY0MS4zNiAyLjIwOSAwIDQtMS43OTEgNC00IDAtLjU4Ni0uMTMzLTEuMTM5LS4zNTktMS42NDF6Ii8+PC9zdmc+);\n\tmargin-left: 1px;\n}\n\n.hc-black .monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.value:before,\n.hc-black .monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.enum:before\t{\n\tcontent: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+PGcgZmlsbD0iIzc1QkVGRiI+PHBhdGggZD0iTTEyIDNoLTRsLTEgMXYyaDV2MWgtMnYxaDJsMS0xdi0zbC0xLTF6bTAgMmgtNHYtMWg0djF6TTMgMTJoNnYtNWgtNnY1em0xLTNoNHYxaC00di0xeiIvPjwvZz48L3N2Zz4=);\n}\n\n.hc-black .monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.rule:before {\n\tcontent: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMiIgaGVpZ2h0PSIxMiI+PHBhdGggZmlsbD0iI0M1QzVDNSIgZD0iTTEwIDVoLTh2LTJoOHYyem0wIDFoLTZ2MWg2di0xem0wIDJoLTZ2MWg2di0xeiIvPjwvc3ZnPg==);\n}\n\n.hc-black .monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.file:before {\n\tcontent: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+PHBhdGggZmlsbD0iI0M1QzVDNSIgZD0iTTkuNjc2IDJoLTYuNjc2djEyaDEwdi05bC0zLjMyNC0zem0yLjMyNCAxMWgtOHYtMTBoNXYzaDN2N3oiLz48L3N2Zz4=);\n}',""])},1129:(e,t,n)=>{(e.exports=n(8826)(!1)).push([e.id,'/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n\n/* Default standalone editor font */\n.monaco-editor {\n\tfont-family: -apple-system, BlinkMacSystemFont, "Segoe WPC", "Segoe UI", "HelveticaNeue-Light", "Ubuntu", "Droid Sans", sans-serif;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item .action-menu-item:focus .action-label {\n\tcolor: #0059AC;\n\tstroke-width: 1.2px;\n\ttext-shadow: 0px 0px 0.15px #0059AC;\n}\n\n.monaco-editor.vs-dark .monaco-menu .monaco-action-bar.vertical .action-menu-item:focus .action-label,\n.monaco-editor.hc-black .monaco-menu .monaco-action-bar.vertical .action-menu-item:focus .action-label {\n\tcolor: #ACDDFF;\n\tstroke-width: 1.2px;\n\ttext-shadow: 0px 0px 0.15px #ACDDFF;\n}\n\n.monaco-editor-hover p {\n\tmargin: 0;\n}\n\n/* The hc-black theme is already high contrast optimized */\n.monaco-editor.hc-black {\n\t-ms-high-contrast-adjust: none;\n}\n/* In case the browser goes into high contrast mode and the editor is not configured with the hc-black theme */\n@media screen and (-ms-high-contrast:active) {\n\n\t/* current line highlight */\n\t.monaco-editor.vs .view-overlays .current-line,\n\t.monaco-editor.vs-dark .view-overlays .current-line {\n\t\tborder-color: windowtext !important;\n\t\tborder-left: 0;\n\t\tborder-right: 0;\n\t}\n\n\t/* view cursors */\n\t.monaco-editor.vs .cursor,\n\t.monaco-editor.vs-dark .cursor {\n\t\tbackground-color: windowtext !important;\n\t}\n\t/* dnd target */\n\t.monaco-editor.vs .dnd-target,\n\t.monaco-editor.vs-dark .dnd-target {\n\t\tborder-color: windowtext !important;\n\t}\n\n\t/* selected text background */\n\t.monaco-editor.vs .selected-text,\n\t.monaco-editor.vs-dark .selected-text {\n\t\tbackground-color: highlight !important;\n\t}\n\n\t/* allow the text to have a transparent background. */\n\t.monaco-editor.vs .view-line,\n\t.monaco-editor.vs-dark .view-line {\n\t\t-ms-high-contrast-adjust: none;\n\t}\n\n\t/* text color */\n\t.monaco-editor.vs .view-line span,\n\t.monaco-editor.vs-dark .view-line span {\n\t\tcolor: windowtext !important;\n\t}\n\t/* selected text color */\n\t.monaco-editor.vs .view-line span.inline-selected-text,\n\t.monaco-editor.vs-dark .view-line span.inline-selected-text {\n\t\tcolor: highlighttext !important;\n\t}\n\n\t/* allow decorations */\n\t.monaco-editor.vs .view-overlays,\n\t.monaco-editor.vs-dark .view-overlays {\n\t\t-ms-high-contrast-adjust: none;\n\t}\n\n\t/* various decorations */\n\t.monaco-editor.vs .selectionHighlight,\n\t.monaco-editor.vs-dark .selectionHighlight,\n\t.monaco-editor.vs .wordHighlight,\n\t.monaco-editor.vs-dark .wordHighlight,\n\t.monaco-editor.vs .wordHighlightStrong,\n\t.monaco-editor.vs-dark .wordHighlightStrong,\n\t.monaco-editor.vs .reference-decoration,\n\t.monaco-editor.vs-dark .reference-decoration {\n\t\tborder: 2px dotted highlight !important;\n\t\tbackground: transparent !important;\n\t\tbox-sizing: border-box;\n\t}\n\t.monaco-editor.vs .rangeHighlight,\n\t.monaco-editor.vs-dark .rangeHighlight {\n\t\tbackground: transparent !important;\n\t\tborder: 1px dotted activeborder !important;\n\t\tbox-sizing: border-box;\n\t}\n\t.monaco-editor.vs .bracket-match,\n\t.monaco-editor.vs-dark .bracket-match {\n\t\tborder-color: windowtext !important;\n\t\tbackground: transparent !important;\n\t}\n\n\t/* find widget */\n\t.monaco-editor.vs .findMatch,\n\t.monaco-editor.vs-dark .findMatch,\n\t.monaco-editor.vs .currentFindMatch,\n\t.monaco-editor.vs-dark .currentFindMatch {\n\t\tborder: 2px dotted activeborder !important;\n\t\tbackground: transparent !important;\n\t\tbox-sizing: border-box;\n\t}\n\t.monaco-editor.vs .find-widget,\n\t.monaco-editor.vs-dark .find-widget {\n\t\tborder: 1px solid windowtext;\n\t}\n\n\t/* list - used by suggest widget */\n\t.monaco-editor.vs .monaco-list .monaco-list-row,\n\t.monaco-editor.vs-dark .monaco-list .monaco-list-row {\n\t\t-ms-high-contrast-adjust: none;\n\t\tcolor: windowtext !important;\n\t}\n\t.monaco-editor.vs .monaco-list .monaco-list-row.focused,\n\t.monaco-editor.vs-dark .monaco-list .monaco-list-row.focused {\n\t\tcolor: highlighttext !important;\n\t\tbackground-color: highlight !important;\n\t}\n\t.monaco-editor.vs .monaco-list .monaco-list-row:hover,\n\t.monaco-editor.vs-dark .monaco-list .monaco-list-row:hover {\n\t\tbackground: transparent !important;\n\t\tborder: 1px solid highlight;\n\t\tbox-sizing: border-box;\n\t}\n\n\t/* tree */\n\t.monaco-editor.vs .monaco-tree .monaco-tree-row,\n\t.monaco-editor.vs-dark .monaco-tree .monaco-tree-row {\n\t\t-ms-high-contrast-adjust: none;\n\t\tcolor: windowtext !important;\n\t}\n\t.monaco-editor.vs .monaco-tree .monaco-tree-row.selected,\n\t.monaco-editor.vs-dark .monaco-tree .monaco-tree-row.selected,\n\t.monaco-editor.vs .monaco-tree .monaco-tree-row.focused,\n\t.monaco-editor.vs-dark .monaco-tree .monaco-tree-row.focused {\n\t\tcolor: highlighttext !important;\n\t\tbackground-color: highlight !important;\n\t}\n\t.monaco-editor.vs .monaco-tree .monaco-tree-row:hover,\n\t.monaco-editor.vs-dark .monaco-tree .monaco-tree-row:hover {\n\t\tbackground: transparent !important;\n\t\tborder: 1px solid highlight;\n\t\tbox-sizing: border-box;\n\t}\n\n\t/* scrollbars */\n\t.monaco-editor.vs .monaco-scrollable-element > .scrollbar,\n\t.monaco-editor.vs-dark .monaco-scrollable-element > .scrollbar {\n\t\t-ms-high-contrast-adjust: none;\n\t\tbackground: background !important;\n\t\tborder: 1px solid windowtext;\n\t\tbox-sizing: border-box;\n\t}\n\t.monaco-editor.vs .monaco-scrollable-element > .scrollbar > .slider,\n\t.monaco-editor.vs-dark .monaco-scrollable-element > .scrollbar > .slider {\n\t\tbackground: windowtext !important;\n\t}\n\t.monaco-editor.vs .monaco-scrollable-element > .scrollbar > .slider:hover,\n\t.monaco-editor.vs-dark .monaco-scrollable-element > .scrollbar > .slider:hover {\n\t\tbackground: highlight !important;\n\t}\n\t.monaco-editor.vs .monaco-scrollable-element > .scrollbar > .slider.active,\n\t.monaco-editor.vs-dark .monaco-scrollable-element > .scrollbar > .slider.active {\n\t\tbackground: highlight !important;\n\t}\n\n\t/* overview ruler */\n\t.monaco-editor.vs .decorationsOverviewRuler,\n\t.monaco-editor.vs-dark .decorationsOverviewRuler {\n\t\topacity: 0;\n\t}\n\n\t/* minimap */\n\t.monaco-editor.vs .minimap,\n\t.monaco-editor.vs-dark .minimap {\n\t\tdisplay: none;\n\t}\n\n\t/* squiggles */\n\t.monaco-editor.vs .squiggly-d-error,\n\t.monaco-editor.vs-dark .squiggly-d-error {\n\t\tbackground: transparent !important;\n\t\tborder-bottom: 4px double #E47777;\n\t}\n\t.monaco-editor.vs .squiggly-c-warning,\n\t.monaco-editor.vs-dark .squiggly-c-warning {\n\t\tborder-bottom: 4px double #71B771;\n\t}\n\t.monaco-editor.vs .squiggly-b-info,\n\t.monaco-editor.vs-dark .squiggly-b-info {\n\t\tborder-bottom: 4px double #71B771;\n\t}\n\t.monaco-editor.vs .squiggly-a-hint,\n\t.monaco-editor.vs-dark .squiggly-a-hint {\n\t\tborder-bottom: 4px double #6c6c6c;\n\t}\n\n\t/* contextmenu */\n\t.monaco-editor.vs .monaco-menu .monaco-action-bar.vertical .action-menu-item:focus .action-label,\n\t.monaco-editor.vs-dark .monaco-menu .monaco-action-bar.vertical .action-menu-item:focus .action-label {\n\t\t-ms-high-contrast-adjust: none;\n\t\tcolor: highlighttext !important;\n\t\tbackground-color: highlight !important;\n\t}\n\t.monaco-editor.vs .monaco-menu .monaco-action-bar.vertical .action-menu-item:hover .action-label,\n\t.monaco-editor.vs-dark .monaco-menu .monaco-action-bar.vertical .action-menu-item:hover .action-label {\n\t\t-ms-high-contrast-adjust: none;\n\t\tbackground: transparent !important;\n\t\tborder: 1px solid highlight;\n\t\tbox-sizing: border-box;\n\t}\n\n\t/* diff editor */\n\t.monaco-diff-editor.vs .diffOverviewRuler,\n\t.monaco-diff-editor.vs-dark .diffOverviewRuler {\n\t\tdisplay: none;\n\t}\n\t.monaco-editor.vs .line-insert,\n\t.monaco-editor.vs-dark .line-insert,\n\t.monaco-editor.vs .line-delete,\n\t.monaco-editor.vs-dark .line-delete {\n\t\tbackground: transparent !important;\n\t\tborder: 1px solid highlight !important;\n\t\tbox-sizing: border-box;\n\t}\n\t.monaco-editor.vs .char-insert,\n\t.monaco-editor.vs-dark .char-insert,\n\t.monaco-editor.vs .char-delete,\n\t.monaco-editor.vs-dark .char-delete {\n\t\tbackground: transparent !important;\n\t}\n}\n\n/*.monaco-editor.vs [tabindex="0"]:focus {\n\toutline: 1px solid rgba(0, 122, 204, 0.4);\n\toutline-offset: -1px;\n\topacity: 1 !important;\n}\n\n.monaco-editor.vs-dark [tabindex="0"]:focus {\n\toutline: 1px solid rgba(14, 99, 156, 0.6);\n\toutline-offset: -1px;\n\topacity: 1 !important;\n}*/\n',""])},2368:(e,t,n)=>{(e.exports=n(8826)(!1)).push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.context-view .monaco-menu {\n\tmin-width: 130px;\n}\n",""])},4081:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(o,r){function s(e){try{u(i.next(e))}catch(e){r(e)}}function a(e){try{u(i.throw(e))}catch(e){r(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}u((i=i.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,i,o,r,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return r={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function a(r){return function(a){return function(r){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,i&&(o=2&r[0]?i.return:r[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,r[1])).done)return o;switch(i=0,o&&(r=[2&r[0],o.value]),r[0]){case 0:case 1:o=r;break;case 4:return s.label++,{value:r[1],done:!1};case 5:s.label++,i=r[1],r=[0];continue;case 7:r=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==r[0]&&2!==r[0])){s=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1] e\n puts e.to_s\n end\n "}!function(){i(this,void 0,void 0,(function(){var e,t;return o(this,(function(n){switch(n.label){case 0:return[4,fetch("./ruby-web.wasm")];case 1:return e=n.sent(),console.log(e),[4,WebAssembly.compileStreaming(e)];case 2:return t=n.sent(),console.log(t),[4,d.DefaultRubyVM(t)];case 3:return _=n.sent().vm,console.log(_),[2]}}))}))}(),v.onDidChangeModelContent((function(e){var t=v.getValue();window.location.hash="#"+encodeURIComponent(t).replace(/\(/g,"%28").replace(/\)/g,"%29"),h.typecheck(t,new URLSearchParams(window.location.search).getAll("arg"));var n=w(t);console.log("evaluation",n),document.getElementById("rubyoutput").innerText="",_.eval(w(t))}));var M=v.getValue();h.typecheck(M,new URLSearchParams(window.location.search).getAll("arg"));var C=w(M);console.log("evaluation",C),_.eval(C),s.MonacoServices.install(v);var S="ws://sorbet.run:8080",L=new r.Server(S),I=null,N=null;L.on("connection",(function(e){N=e;var t=I.addFunction((function(e){var t=I.Pointer_stringify(e);console.log("Write: "+t),N.send(t)}),"vi");N.on("message",(function(e){console.log("Read: "+e),I.ccall("lsp",null,["number","string"],[t,e])}))})),function e(){return i(this,void 0,void 0,(function(){var t,n,i;return o(this,(function(o){switch(o.label){case 0:return t=!1,n=function(e){return console.log(e)},i=function(n){console.log({event:n}),t||(t=!0,N&&(N.close(),N=null),I=null,e())},[4,l.createSorbet(n,i)];case 1:return I=o.sent().sorbet,function(){console.log("Starting language server.");var e=new r.WebSocket(S);u.listen({webSocket:e,onConnection:function(e){var t=function(e){return new s.MonacoLanguageClient({name:"Sample Language Client",clientOptions:{documentSelector:["ruby"]},connectionProvider:{get:function(t,n){return Promise.resolve(s.createConnection(e,t,n))}}})}(e),n=t.start();e.onClose((function(){n.dispose()}))}})}(),[2]}}))}))}()},8555:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(o,r){function s(e){try{u(i.next(e))}catch(e){r(e)}}function a(e){try{u(i.throw(e))}catch(e){r(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}u((i=i.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,i,o,r,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return r={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function a(r){return function(a){return function(r){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,i&&(o=2&r[0]?i.return:r[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,r[1])).done)return o;switch(i=0,o&&(r=[2&r[0],o.value]),r[0]){case 0:case 1:o=r;break;case 4:return s.label++,{value:r[1],done:!1};case 5:s.label++,i=r[1],r=[0];continue;case 7:r=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==r[0]&&2!==r[0])){s=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]{"use strict";document.getElementById("menu").addEventListener("click",(function(e){e.target.classList.toggle("is-showing")}))},4494:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.register=void 0;var n={comments:{lineComment:"#",blockComment:["=begin","=end"]},brackets:[["(",")"],["{","}"],["[","]"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],indentationRules:{increaseIndentPattern:new RegExp("^\\s*((begin|class|(private|protected)\\s+def|def|else|elsif|ensure|for|if|module|rescue|unless|until|when|while|case)|([^#]*\\sdo\\b)|([^#]*=\\s*(case|if|unless)))\\b([^#\\{;]|(\"|'|/).*\\4)*(#.*)?$"),decreaseIndentPattern:new RegExp("^\\s*([}\\]]([,)]?\\s*(#|$)|\\.[a-zA-Z_]\\w*\\b)|(end|rescue|ensure|else|elsif|when)\\b)")}},i={tokenPostfix:".ruby",keywords:["__LINE__","__ENCODING__","__FILE__","BEGIN","END","alias","and","begin","break","case","class","def","defined?","do","else","elsif","end","ensure","for","false","if","in","module","next","nil","not","or","redo","rescue","retry","return","self","super","then","true","undef","unless","until","when","while","yield"],keywordops:["::","..","...","?",":","=>"],builtins:["require","public","private","include","extend","attr_reader","protected","private_class_method","protected_class_method","new"],declarations:["module","class","def","case","do","begin","for","if","while","until","unless"],linedecls:["def","case","do","begin","for","if","while","until","unless"],operators:["^","&","|","<=>","==","===","!~","=~",">",">=","<","<=","<<",">>","+","-","*","/","%","**","~","+@","-@","[]","[]=","`","+=","-=","*=","**=","/=","^=","%=","<<=",">>=","&=","&&=","||=","|="],brackets:[{open:"(",close:")",token:"delimiter.parenthesis"},{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"}],symbols:/[=>"}],[/%([qws])(@delim)/,{token:"string.$1.delim",switchTo:"@qstring.$1.$2.$2"}],[/%r\(/,{token:"regexp.delim",switchTo:"@pregexp.(.)"}],[/%r\[/,{token:"regexp.delim",switchTo:"@pregexp.[.]"}],[/%r\{/,{token:"regexp.delim",switchTo:"@pregexp.{.}"}],[/%r"}],[/%r(@delim)/,{token:"regexp.delim",switchTo:"@pregexp.$1.$1"}],[/%(x|W|Q?)\(/,{token:"string.$1.delim",switchTo:"@qqstring.$1.(.)"}],[/%(x|W|Q?)\[/,{token:"string.$1.delim",switchTo:"@qqstring.$1.[.]"}],[/%(x|W|Q?)\{/,{token:"string.$1.delim",switchTo:"@qqstring.$1.{.}"}],[/%(x|W|Q?)"}],[/%(x|W|Q?)(@delim)/,{token:"string.$1.delim",switchTo:"@qqstring.$1.$2.$2"}],[/%([rqwsxW]|Q?)./,{token:"invalid",next:"@pop"}],[/./,{token:"invalid",next:"@pop"}]],qstring:[[/\\$/,"string.$S2.escape"],[/\\./,"string.$S2.escape"],[/./,{cases:{"$#==$S4":{token:"string.$S2.delim",next:"@pop"},"$#==$S3":{token:"string.$S2.delim",next:"@push"},"@default":"string.$S2"}}]],qqstring:[[/#/,"string.$S2.escape","@interpolated"],{include:"@qstring"}],whitespace:[[/[ \t\r\n]+/,""],[/^\s*=begin\b/,"comment","@comment"],[/#.*$/,"comment"]],comment:[[/[^=]+/,"comment"],[/^\s*=begin\b/,"comment.invalid"],[/^\s*=end\b.*/,"comment","@pop"],[/[=]/,"comment"]]}};t.register=function(){monaco.languages.register({id:"ruby",extensions:[".rb",".rbi"],aliases:["Ruby","rb","sorbet","srb"],mimetypes:["text/plain"]}),monaco.languages.setMonarchTokensProvider("ruby",i),monaco.languages.setLanguageConfiguration("ruby",n)}},14:function(e,t){"use strict";var n=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(o,r){function s(e){try{u(i.next(e))}catch(e){r(e)}}function a(e){try{u(i.throw(e))}catch(e){r(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}u((i=i.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,i,o,r,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return r={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function a(r){return function(a){return function(r){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,i&&(o=2&r[0]?i.return:r[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,r[1])).done)return o;switch(i=0,o&&(r=[2&r[0],o.value]),r[0]){case 0:case 1:o=r;break;case 4:return s.label++,{value:r[1],done:!1};case 5:s.label++,i=r[1],r=[0];continue;case 7:r=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==r[0]&&2!==r[0])){s=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]"']/gm,(function(e){return"&"===e?"&":"<"===e?"<":">"===e?">":'"'===e?""":"'"===e?"'":void 0}))},e.prototype.append_buffer=function(e){var t=this._buffer+e;this._buffer=t},e.prototype.get_next_packet=function(){var e={kind:t.EOS,text:"",url:""},i=this._buffer.length;if(0==i)return e;var r=this._buffer.indexOf("");if(-1==r)return e.kind=t.Text,e.text=this._buffer,this._buffer="",e;if(r>0)return e.kind=t.Text,e.text=this._buffer.slice(0,r),this._buffer=this._buffer.slice(r),e;if(0==r){if(1==i)return e.kind=t.Incomplete,e;var s=this._buffer.charAt(1);if("["!=s&&"]"!=s)return e.kind=t.ESC,e.text=this._buffer.slice(0,1),this._buffer=this._buffer.slice(1),e;if("["==s){if(this._csi_regex||(this._csi_regex=o(n(["\n ^ # beginning of line\n #\n # First attempt\n (?: # legal sequence\n [ # CSI\n ([<-?]?) # private-mode char\n ([d;]*) # any digits or semicolons\n ([ -/]? # an intermediate modifier\n [@-~]) # the command\n )\n | # alternate (second attempt)\n (?: # illegal sequence\n [ # CSI\n [ -~]* # anything legal\n ([\0-:]) # anything illegal\n )\n "],["\n ^ # beginning of line\n #\n # First attempt\n (?: # legal sequence\n \\x1b\\[ # CSI\n ([\\x3c-\\x3f]?) # private-mode char\n ([\\d;]*) # any digits or semicolons\n ([\\x20-\\x2f]? # an intermediate modifier\n [\\x40-\\x7e]) # the command\n )\n | # alternate (second attempt)\n (?: # illegal sequence\n \\x1b\\[ # CSI\n [\\x20-\\x7e]* # anything legal\n ([\\x00-\\x1f:]) # anything illegal\n )\n "]))),null===(l=this._buffer.match(this._csi_regex)))return e.kind=t.Incomplete,e;if(l[4])return e.kind=t.ESC,e.text=this._buffer.slice(0,1),this._buffer=this._buffer.slice(1),e;""!=l[1]||"m"!=l[3]?e.kind=t.Unknown:e.kind=t.SGR,e.text=l[2];var a=l[0].length;return this._buffer=this._buffer.slice(a),e}if("]"==s){if(i<4)return e.kind=t.Incomplete,e;if("8"!=this._buffer.charAt(2)||";"!=this._buffer.charAt(3))return e.kind=t.ESC,e.text=this._buffer.slice(0,1),this._buffer=this._buffer.slice(1),e;this._osc_st||(this._osc_st=function(e){for(var t=[],n=1;n0;){var n=t.shift(),i=parseInt(n,10);if(isNaN(i)||0===i)this.fg=this.bg=null,this.bold=!1;else if(1===i)this.bold=!0;else if(22===i)this.bold=!1;else if(39===i)this.fg=null;else if(49===i)this.bg=null;else if(i>=30&&i<38)this.fg=this.ansi_colors[0][i-30];else if(i>=40&&i<48)this.bg=this.ansi_colors[0][i-40];else if(i>=90&&i<98)this.fg=this.ansi_colors[1][i-90];else if(i>=100&&i<108)this.bg=this.ansi_colors[1][i-100];else if((38===i||48===i)&&t.length>0){var o=38===i,r=t.shift();if("5"===r&&t.length>0){var s=parseInt(t.shift(),10);s>=0&&s<=255&&(o?this.fg=this.palette_256[s]:this.bg=this.palette_256[s])}if("2"===r&&t.length>2){var a=parseInt(t.shift(),10),u=parseInt(t.shift(),10),l=parseInt(t.shift(),10);if(a>=0&&a<=255&&u>=0&&u<=255&&l>=0&&l<=255){var c={rgb:[a,u,l],class_name:"truecolor"};o?this.fg=c:this.bg=c}}}}},e.prototype.transform_to_html=function(e){var t=e.text;if(0===t.length)return t;if(t=this.escape_txt_for_html(t),!e.bold&&null===e.fg&&null===e.bg)return t;var n=[],i=[],o=e.fg,r=e.bg;e.bold&&n.push("font-weight:bold"),this._use_classes?(o&&("truecolor"!==o.class_name?i.push(o.class_name+"-fg"):n.push("color:rgb("+o.rgb.join(",")+")")),r&&("truecolor"!==r.class_name?i.push(r.class_name+"-bg"):n.push("background-color:rgb("+r.rgb.join(",")+")"))):(o&&n.push("color:rgb("+o.rgb.join(",")+")"),r&&n.push("background-color:rgb("+r.rgb+")"));var s="",a="";return i.length&&(s=' class="'+i.join(" ")+'"'),n.length&&(a=' style="'+n.join(";")+'"'),""+t+""},e.prototype.process_hyperlink=function(e){var t=e.url.split(":");return t.length<1?"":this._url_whitelist[t[0]]?''+this.escape_txt_for_html(e.text)+"":""},e}();function o(e){for(var t=[],n=1;n{var i=t;i.bignum=n(1683),i.define=n(4498).define,i.base=n(5370),i.constants=n(4940),i.decoders=n(4790),i.encoders=n(8202)},4498:(e,t,n)=>{var i=n(3529),o=n(9385);function r(e,t){this.name=e,this.body=t,this.decoders={},this.encoders={}}t.define=function(e,t){return new r(e,t)},r.prototype._createNamed=function(e){var t;try{t=n(7190).runInThisContext("(function "+this.name+"(entity) {\n this._initNamed(entity);\n})")}catch(e){t=function(e){this._initNamed(e)}}return o(t,e),t.prototype._initNamed=function(t){e.call(this,t)},new t(this)},r.prototype._getDecoder=function(e){return e=e||"der",this.decoders.hasOwnProperty(e)||(this.decoders[e]=this._createNamed(i.decoders[e])),this.decoders[e]},r.prototype.decode=function(e,t,n){return this._getDecoder(t).decode(e,n)},r.prototype._getEncoder=function(e){return e=e||"der",this.encoders.hasOwnProperty(e)||(this.encoders[e]=this._createNamed(i.encoders[e])),this.encoders[e]},r.prototype.encode=function(e,t,n){return this._getEncoder(t).encode(e,n)}},7194:(e,t,n)=>{var i=n(9385),o=n(5370).Reporter,r=n(1278).Buffer;function s(e,t){o.call(this,t),r.isBuffer(e)?(this.base=e,this.offset=0,this.length=e.length):this.error("Input not Buffer")}function a(e,t){if(Array.isArray(e))this.length=0,this.value=e.map((function(e){return e instanceof a||(e=new a(e,t)),this.length+=e.length,e}),this);else if("number"==typeof e){if(!(0<=e&&e<=255))return t.error("non-byte EncoderBuffer value");this.value=e,this.length=1}else if("string"==typeof e)this.value=e,this.length=r.byteLength(e);else{if(!r.isBuffer(e))return t.error("Unsupported type: "+typeof e);this.value=e,this.length=e.length}}i(s,o),t.t=s,s.prototype.save=function(){return{offset:this.offset,reporter:o.prototype.save.call(this)}},s.prototype.restore=function(e){var t=new s(this.base);return t.offset=e.offset,t.length=this.offset,this.offset=e.offset,o.prototype.restore.call(this,e.reporter),t},s.prototype.isEmpty=function(){return this.offset===this.length},s.prototype.readUInt8=function(e){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(e||"DecoderBuffer overrun")},s.prototype.skip=function(e,t){if(!(this.offset+e<=this.length))return this.error(t||"DecoderBuffer overrun");var n=new s(this.base);return n._reporterState=this._reporterState,n.offset=this.offset,n.length=this.offset+e,this.offset+=e,n},s.prototype.raw=function(e){return this.base.slice(e?e.offset:this.offset,this.length)},t.d=a,a.prototype.join=function(e,t){return e||(e=new r(this.length)),t||(t=0),0===this.length||(Array.isArray(this.value)?this.value.forEach((function(n){n.join(e,t),t+=n.length})):("number"==typeof this.value?e[t]=this.value:"string"==typeof this.value?e.write(this.value,t):r.isBuffer(this.value)&&this.value.copy(e,t),t+=this.length)),e}},5370:(e,t,n)=>{var i=t;i.Reporter=n(7793).a,i.DecoderBuffer=n(7194).t,i.EncoderBuffer=n(7194).d,i.Node=n(2624)},2624:(e,t,n)=>{var i=n(5370).Reporter,o=n(5370).EncoderBuffer,r=n(5370).DecoderBuffer,s=n(4890),a=["seq","seqof","set","setof","objid","bool","gentime","utctime","null_","enum","int","objDesc","bitstr","bmpstr","charstr","genstr","graphstr","ia5str","iso646str","numstr","octstr","printstr","t61str","unistr","utf8str","videostr"],u=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(a);function l(e,t){var n={};this._baseState=n,n.enc=e,n.parent=t||null,n.children=null,n.tag=null,n.args=null,n.reverseArgs=null,n.choice=null,n.optional=!1,n.any=!1,n.obj=!1,n.use=null,n.useDecoder=null,n.key=null,n.default=null,n.explicit=null,n.implicit=null,n.contains=null,n.parent||(n.children=[],this._wrap())}e.exports=l;var c=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];l.prototype.clone=function(){var e=this._baseState,t={};c.forEach((function(n){t[n]=e[n]}));var n=new this.constructor(t.parent);return n._baseState=t,n},l.prototype._wrap=function(){var e=this._baseState;u.forEach((function(t){this[t]=function(){var n=new this.constructor(this);return e.children.push(n),n[t].apply(n,arguments)}}),this)},l.prototype._init=function(e){var t=this._baseState;s(null===t.parent),e.call(this),t.children=t.children.filter((function(e){return e._baseState.parent===this}),this),s.equal(t.children.length,1,"Root node can have only one child")},l.prototype._useArgs=function(e){var t=this._baseState,n=e.filter((function(e){return e instanceof this.constructor}),this);e=e.filter((function(e){return!(e instanceof this.constructor)}),this),0!==n.length&&(s(null===t.children),t.children=n,n.forEach((function(e){e._baseState.parent=this}),this)),0!==e.length&&(s(null===t.args),t.args=e,t.reverseArgs=e.map((function(e){if("object"!=typeof e||e.constructor!==Object)return e;var t={};return Object.keys(e).forEach((function(n){n==(0|n)&&(n|=0);var i=e[n];t[i]=n})),t})))},["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"].forEach((function(e){l.prototype[e]=function(){var t=this._baseState;throw new Error(e+" not implemented for encoding: "+t.enc)}})),a.forEach((function(e){l.prototype[e]=function(){var t=this._baseState,n=Array.prototype.slice.call(arguments);return s(null===t.tag),t.tag=e,this._useArgs(n),this}})),l.prototype.use=function(e){s(e);var t=this._baseState;return s(null===t.use),t.use=e,this},l.prototype.optional=function(){return this._baseState.optional=!0,this},l.prototype.def=function(e){var t=this._baseState;return s(null===t.default),t.default=e,t.optional=!0,this},l.prototype.explicit=function(e){var t=this._baseState;return s(null===t.explicit&&null===t.implicit),t.explicit=e,this},l.prototype.implicit=function(e){var t=this._baseState;return s(null===t.explicit&&null===t.implicit),t.implicit=e,this},l.prototype.obj=function(){var e=this._baseState,t=Array.prototype.slice.call(arguments);return e.obj=!0,0!==t.length&&this._useArgs(t),this},l.prototype.key=function(e){var t=this._baseState;return s(null===t.key),t.key=e,this},l.prototype.any=function(){return this._baseState.any=!0,this},l.prototype.choice=function(e){var t=this._baseState;return s(null===t.choice),t.choice=e,this._useArgs(Object.keys(e).map((function(t){return e[t]}))),this},l.prototype.contains=function(e){var t=this._baseState;return s(null===t.use),t.contains=e,this},l.prototype._decode=function(e,t){var n=this._baseState;if(null===n.parent)return e.wrapResult(n.children[0]._decode(e,t));var i,o=n.default,s=!0,a=null;if(null!==n.key&&(a=e.enterKey(n.key)),n.optional){var u=null;if(null!==n.explicit?u=n.explicit:null!==n.implicit?u=n.implicit:null!==n.tag&&(u=n.tag),null!==u||n.any){if(s=this._peekTag(e,u,n.any),e.isError(s))return s}else{var l=e.save();try{null===n.choice?this._decodeGeneric(n.tag,e,t):this._decodeChoice(e,t),s=!0}catch(e){s=!1}e.restore(l)}}if(n.obj&&s&&(i=e.enterObject()),s){if(null!==n.explicit){var c=this._decodeTag(e,n.explicit);if(e.isError(c))return c;e=c}var h=e.offset;if(null===n.use&&null===n.choice){n.any&&(l=e.save());var d=this._decodeTag(e,null!==n.implicit?n.implicit:n.tag,n.any);if(e.isError(d))return d;n.any?o=e.raw(l):e=d}if(t&&t.track&&null!==n.tag&&t.track(e.path(),h,e.length,"tagged"),t&&t.track&&null!==n.tag&&t.track(e.path(),e.offset,e.length,"content"),n.any||(o=null===n.choice?this._decodeGeneric(n.tag,e,t):this._decodeChoice(e,t)),e.isError(o))return o;if(n.any||null!==n.choice||null===n.children||n.children.forEach((function(n){n._decode(e,t)})),n.contains&&("octstr"===n.tag||"bitstr"===n.tag)){var f=new r(o);o=this._getUse(n.contains,e._reporterState.obj)._decode(f,t)}}return n.obj&&s&&(o=e.leaveObject(i)),null===n.key||null===o&&!0!==s?null!==a&&e.exitKey(a):e.leaveKey(a,n.key,o),o},l.prototype._decodeGeneric=function(e,t,n){var i=this._baseState;return"seq"===e||"set"===e?null:"seqof"===e||"setof"===e?this._decodeList(t,e,i.args[0],n):/str$/.test(e)?this._decodeStr(t,e,n):"objid"===e&&i.args?this._decodeObjid(t,i.args[0],i.args[1],n):"objid"===e?this._decodeObjid(t,null,null,n):"gentime"===e||"utctime"===e?this._decodeTime(t,e,n):"null_"===e?this._decodeNull(t,n):"bool"===e?this._decodeBool(t,n):"objDesc"===e?this._decodeStr(t,e,n):"int"===e||"enum"===e?this._decodeInt(t,i.args&&i.args[0],n):null!==i.use?this._getUse(i.use,t._reporterState.obj)._decode(t,n):t.error("unknown tag: "+e)},l.prototype._getUse=function(e,t){var n=this._baseState;return n.useDecoder=this._use(e,t),s(null===n.useDecoder._baseState.parent),n.useDecoder=n.useDecoder._baseState.children[0],n.implicit!==n.useDecoder._baseState.implicit&&(n.useDecoder=n.useDecoder.clone(),n.useDecoder._baseState.implicit=n.implicit),n.useDecoder},l.prototype._decodeChoice=function(e,t){var n=this._baseState,i=null,o=!1;return Object.keys(n.choice).some((function(r){var s=e.save(),a=n.choice[r];try{var u=a._decode(e,t);if(e.isError(u))return!1;i={type:r,value:u},o=!0}catch(t){return e.restore(s),!1}return!0}),this),o?i:e.error("Choice not matched")},l.prototype._createEncoderBuffer=function(e){return new o(e,this.reporter)},l.prototype._encode=function(e,t,n){var i=this._baseState;if(null===i.default||i.default!==e){var o=this._encodeValue(e,t,n);if(void 0!==o&&!this._skipDefault(o,t,n))return o}},l.prototype._encodeValue=function(e,t,n){var o=this._baseState;if(null===o.parent)return o.children[0]._encode(e,t||new i);var r=null;if(this.reporter=t,o.optional&&void 0===e){if(null===o.default)return;e=o.default}var s=null,a=!1;if(o.any)r=this._createEncoderBuffer(e);else if(o.choice)r=this._encodeChoice(e,t);else if(o.contains)s=this._getUse(o.contains,n)._encode(e,t),a=!0;else if(o.children)s=o.children.map((function(n){if("null_"===n._baseState.tag)return n._encode(null,t,e);if(null===n._baseState.key)return t.error("Child should have a key");var i=t.enterKey(n._baseState.key);if("object"!=typeof e)return t.error("Child expected, but input is not object");var o=n._encode(e[n._baseState.key],t,e);return t.leaveKey(i),o}),this).filter((function(e){return e})),s=this._createEncoderBuffer(s);else if("seqof"===o.tag||"setof"===o.tag){if(!o.args||1!==o.args.length)return t.error("Too many args for : "+o.tag);if(!Array.isArray(e))return t.error("seqof/setof, but data is not Array");var u=this.clone();u._baseState.implicit=null,s=this._createEncoderBuffer(e.map((function(n){var i=this._baseState;return this._getUse(i.args[0],e)._encode(n,t)}),u))}else null!==o.use?r=this._getUse(o.use,n)._encode(e,t):(s=this._encodePrimitive(o.tag,e),a=!0);if(!o.any&&null===o.choice){var l=null!==o.implicit?o.implicit:o.tag,c=null===o.implicit?"universal":"context";null===l?null===o.use&&t.error("Tag could be omitted only for .use()"):null===o.use&&(r=this._encodeComposite(l,a,c,s))}return null!==o.explicit&&(r=this._encodeComposite(o.explicit,!1,"context",r)),r},l.prototype._encodeChoice=function(e,t){var n=this._baseState,i=n.choice[e.type];return i||s(!1,e.type+" not found in "+JSON.stringify(Object.keys(n.choice))),i._encode(e.value,t)},l.prototype._encodePrimitive=function(e,t){var n=this._baseState;if(/str$/.test(e))return this._encodeStr(t,e);if("objid"===e&&n.args)return this._encodeObjid(t,n.reverseArgs[0],n.args[1]);if("objid"===e)return this._encodeObjid(t,null,null);if("gentime"===e||"utctime"===e)return this._encodeTime(t,e);if("null_"===e)return this._encodeNull();if("int"===e||"enum"===e)return this._encodeInt(t,n.args&&n.reverseArgs[0]);if("bool"===e)return this._encodeBool(t);if("objDesc"===e)return this._encodeStr(t,e);throw new Error("Unsupported tag: "+e)},l.prototype._isNumstr=function(e){return/^[0-9 ]*$/.test(e)},l.prototype._isPrintstr=function(e){return/^[A-Za-z0-9 '\(\)\+,\-\.\/:=\?]*$/.test(e)}},7793:(e,t,n)=>{var i=n(9385);function o(e){this._reporterState={obj:null,path:[],options:e||{},errors:[]}}function r(e,t){this.path=e,this.rethrow(t)}t.a=o,o.prototype.isError=function(e){return e instanceof r},o.prototype.save=function(){var e=this._reporterState;return{obj:e.obj,pathLen:e.path.length}},o.prototype.restore=function(e){var t=this._reporterState;t.obj=e.obj,t.path=t.path.slice(0,e.pathLen)},o.prototype.enterKey=function(e){return this._reporterState.path.push(e)},o.prototype.exitKey=function(e){var t=this._reporterState;t.path=t.path.slice(0,e-1)},o.prototype.leaveKey=function(e,t,n){var i=this._reporterState;this.exitKey(e),null!==i.obj&&(i.obj[t]=n)},o.prototype.path=function(){return this._reporterState.path.join("/")},o.prototype.enterObject=function(){var e=this._reporterState,t=e.obj;return e.obj={},t},o.prototype.leaveObject=function(e){var t=this._reporterState,n=t.obj;return t.obj=e,n},o.prototype.error=function(e){var t,n=this._reporterState,i=e instanceof r;if(t=i?e:new r(n.path.map((function(e){return"["+JSON.stringify(e)+"]"})).join(""),e.message||e,e.stack),!n.options.partial)throw t;return i||n.errors.push(t),t},o.prototype.wrapResult=function(e){var t=this._reporterState;return t.options.partial?{result:this.isError(e)?null:e,errors:t.errors}:e},i(r,Error),r.prototype.rethrow=function(e){if(this.message=e+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,r),!this.stack)try{throw new Error(this.message)}catch(e){this.stack=e.stack}return this}},3275:(e,t,n)=>{var i=n(4940);t.tagClass={0:"universal",1:"application",2:"context",3:"private"},t.tagClassByName=i._reverse(t.tagClass),t.tag={0:"end",1:"bool",2:"int",3:"bitstr",4:"octstr",5:"null_",6:"objid",7:"objDesc",8:"external",9:"real",10:"enum",11:"embed",12:"utf8str",13:"relativeOid",16:"seq",17:"set",18:"numstr",19:"printstr",20:"t61str",21:"videostr",22:"ia5str",23:"utctime",24:"gentime",25:"graphstr",26:"iso646str",27:"genstr",28:"unistr",29:"charstr",30:"bmpstr"},t.tagByName=i._reverse(t.tag)},4940:(e,t,n)=>{var i=t;i._reverse=function(e){var t={};return Object.keys(e).forEach((function(n){(0|n)==n&&(n|=0);var i=e[n];t[i]=n})),t},i.der=n(3275)},8997:(e,t,n)=>{var i=n(9385),o=n(3529),r=o.base,s=o.bignum,a=o.constants.der;function u(e){this.enc="der",this.name=e.name,this.entity=e,this.tree=new l,this.tree._init(e.body)}function l(e){r.Node.call(this,"der",e)}function c(e,t){var n=e.readUInt8(t);if(e.isError(n))return n;var i=a.tagClass[n>>6],o=!(32&n);if(31&~n)n&=31;else{var r=n;for(n=0;!(128&~r);){if(r=e.readUInt8(t),e.isError(r))return r;n<<=7,n|=127&r}}return{cls:i,primitive:o,tag:n,tagStr:a.tag[n]}}function h(e,t,n){var i=e.readUInt8(n);if(e.isError(i))return i;if(!t&&128===i)return null;if(!(128&i))return i;var o=127&i;if(o>4)return e.error("length octect is too long");i=0;for(var r=0;r{var i=t;i.der=n(8997),i.pem=n(2420)},2420:(e,t,n)=>{var i=n(9385),o=n(1278).Buffer,r=n(8997);function s(e){r.call(this,e),this.enc="pem"}i(s,r),e.exports=s,s.prototype.decode=function(e,t){for(var n=e.toString().split(/[\r\n]+/g),i=t.label.toUpperCase(),s=/^-----(BEGIN|END) ([^-]+)-----$/,a=-1,u=-1,l=0;l{var i=n(9385),o=n(1278).Buffer,r=n(3529),s=r.base,a=r.constants.der;function u(e){this.enc="der",this.name=e.name,this.entity=e,this.tree=new l,this.tree._init(e.body)}function l(e){s.Node.call(this,"der",e)}function c(e){return e<10?"0"+e:e}e.exports=u,u.prototype.encode=function(e,t){return this.tree._encode(e,t).join()},i(l,s.Node),l.prototype._encodeComposite=function(e,t,n,i){var r,s=function(e,t,n,i){var o;if("seqof"===e?e="seq":"setof"===e&&(e="set"),a.tagByName.hasOwnProperty(e))o=a.tagByName[e];else{if("number"!=typeof e||(0|e)!==e)return i.error("Unknown tag: "+e);o=e}return o>=31?i.error("Multi-octet tag encoding unsupported"):(t||(o|=32),o|=a.tagClassByName[n||"universal"]<<6)}(e,t,n,this.reporter);if(i.length<128)return(r=new o(2))[0]=s,r[1]=i.length,this._createEncoderBuffer([r,i]);for(var u=1,l=i.length;l>=256;l>>=8)u++;(r=new o(2+u))[0]=s,r[1]=128|u,l=1+u;for(var c=i.length;c>0;l--,c>>=8)r[l]=255&c;return this._createEncoderBuffer([r,i])},l.prototype._encodeStr=function(e,t){if("bitstr"===t)return this._createEncoderBuffer([0|e.unused,e.data]);if("bmpstr"===t){for(var n=new o(2*e.length),i=0;i=40)return this.reporter.error("Second objid identifier OOB");e.splice(0,2,40*e[0]+e[1])}var r=0;for(i=0;i=128;s>>=7)r++}var a=new o(r),u=a.length-1;for(i=e.length-1;i>=0;i--)for(s=e[i],a[u--]=127&s;(s>>=7)>0;)a[u--]=128|127&s;return this._createEncoderBuffer(a)},l.prototype._encodeTime=function(e,t){var n,i=new Date(e);return"gentime"===t?n=[c(i.getFullYear()),c(i.getUTCMonth()+1),c(i.getUTCDate()),c(i.getUTCHours()),c(i.getUTCMinutes()),c(i.getUTCSeconds()),"Z"].join(""):"utctime"===t?n=[c(i.getFullYear()%100),c(i.getUTCMonth()+1),c(i.getUTCDate()),c(i.getUTCHours()),c(i.getUTCMinutes()),c(i.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+t+" time is not supported yet"),this._encodeStr(n,"octstr")},l.prototype._encodeNull=function(){return this._createEncoderBuffer("")},l.prototype._encodeInt=function(e,t){if("string"==typeof e){if(!t)return this.reporter.error("String int or enum given, but no values map");if(!t.hasOwnProperty(e))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(e));e=t[e]}if("number"!=typeof e&&!o.isBuffer(e)){var n=e.toArray();!e.sign&&128&n[0]&&n.unshift(0),e=new o(n)}if(o.isBuffer(e)){var i=e.length;0===e.length&&i++;var r=new o(i);return e.copy(r),0===e.length&&(r[0]=0),this._createEncoderBuffer(r)}if(e<128)return this._createEncoderBuffer(e);if(e<256)return this._createEncoderBuffer([0,e]);i=1;for(var s=e;s>=256;s>>=8)i++;for(s=(r=new Array(i)).length-1;s>=0;s--)r[s]=255&e,e>>=8;return 128&r[0]&&r.unshift(0),this._createEncoderBuffer(new o(r))},l.prototype._encodeBool=function(e){return this._createEncoderBuffer(e?255:0)},l.prototype._use=function(e,t){return"function"==typeof e&&(e=e(t)),e._getEncoder("der").tree},l.prototype._skipDefault=function(e,t,n){var i,o=this._baseState;if(null===o.default)return!1;var r=e.join();if(void 0===o.defaultBuffer&&(o.defaultBuffer=this._encodeValue(o.default,t,n).join()),r.length!==o.defaultBuffer.length)return!1;for(i=0;i{var i=t;i.der=n(7137),i.pem=n(480)},480:(e,t,n)=>{var i=n(9385),o=n(7137);function r(e){o.call(this,e),this.enc="pem"}i(r,o),e.exports=r,r.prototype.encode=function(e,t){for(var n=o.prototype.encode.call(this,e).toString("base64"),i=["-----BEGIN "+t.label+"-----"],r=0;r=65&&n<=70?n-55:n>=97&&n<=102?n-87:n-48&15}function u(e,t,n){var i=a(e,n);return n-1>=t&&(i|=a(e,n-1)<<4),i}function l(e,t,n,i){for(var o=0,r=Math.min(e.length,n),s=t;s=49?a-49+10:a>=17?a-17+10:a}return o}r.isBN=function(e){return e instanceof r||null!==e&&"object"==typeof e&&e.constructor.wordSize===r.wordSize&&Array.isArray(e.words)},r.max=function(e,t){return e.cmp(t)>0?e:t},r.min=function(e,t){return e.cmp(t)<0?e:t},r.prototype._init=function(e,t,n){if("number"==typeof e)return this._initNumber(e,t,n);if("object"==typeof e)return this._initArray(e,t,n);"hex"===t&&(t=16),i(t===(0|t)&&t>=2&&t<=36);var o=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(o++,this.negative=1),o=0;o-=3)s=e[o]|e[o-1]<<8|e[o-2]<<16,this.words[r]|=s<>>26-a&67108863,(a+=24)>=26&&(a-=26,r++);else if("le"===n)for(o=0,r=0;o>>26-a&67108863,(a+=24)>=26&&(a-=26,r++);return this.strip()},r.prototype._parseHex=function(e,t,n){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var i=0;i=t;i-=2)o=u(e,t,i)<=18?(r-=18,s+=1,this.words[s]|=o>>>26):r+=8;else for(i=(e.length-t)%2==0?t+1:t;i=18?(r-=18,s+=1,this.words[s]|=o>>>26):r+=8;this.strip()},r.prototype._parseBase=function(e,t,n){this.words=[0],this.length=1;for(var i=0,o=1;o<=67108863;o*=t)i++;i--,o=o/t|0;for(var r=e.length-n,s=r%i,a=Math.min(r,r-s)+n,u=0,c=n;c1&&0===this.words[this.length-1];)this.length--;return this._normSign()},r.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},r.prototype.inspect=function(){return(this.red?""};var c=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],h=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],d=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function f(e,t,n){n.negative=t.negative^e.negative;var i=e.length+t.length|0;n.length=i,i=i-1|0;var o=0|e.words[0],r=0|t.words[0],s=o*r,a=67108863&s,u=s/67108864|0;n.words[0]=a;for(var l=1;l>>26,h=67108863&u,d=Math.min(l,t.length-1),f=Math.max(0,l-e.length+1);f<=d;f++){var p=l-f|0;c+=(s=(o=0|e.words[p])*(r=0|t.words[f])+h)/67108864|0,h=67108863&s}n.words[l]=0|h,u=0|c}return 0!==u?n.words[l]=0|u:n.length--,n.strip()}r.prototype.toString=function(e,t){var n;if(t=0|t||1,16===(e=e||10)||"hex"===e){n="";for(var o=0,r=0,s=0;s>>24-o&16777215)||s!==this.length-1?c[6-u.length]+u+n:u+n,(o+=2)>=26&&(o-=26,s--)}for(0!==r&&(n=r.toString(16)+n);n.length%t!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(e===(0|e)&&e>=2&&e<=36){var l=h[e],f=d[e];n="";var p=this.clone();for(p.negative=0;!p.isZero();){var g=p.modn(f).toString(e);n=(p=p.idivn(f)).isZero()?g+n:c[l-g.length]+g+n}for(this.isZero()&&(n="0"+n);n.length%t!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}i(!1,"Base should be between 2 and 36")},r.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&i(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},r.prototype.toJSON=function(){return this.toString(16)},r.prototype.toBuffer=function(e,t){return i(void 0!==s),this.toArrayLike(s,e,t)},r.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},r.prototype.toArrayLike=function(e,t,n){var o=this.byteLength(),r=n||Math.max(1,o);i(o<=r,"byte array longer than desired length"),i(r>0,"Requested array length <= 0"),this.strip();var s,a,u="le"===t,l=new e(r),c=this.clone();if(u){for(a=0;!c.isZero();a++)s=c.andln(255),c.iushrn(8),l[a]=s;for(;a=4096&&(n+=13,t>>>=13),t>=64&&(n+=7,t>>>=7),t>=8&&(n+=4,t>>>=4),t>=2&&(n+=2,t>>>=2),n+t},r.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,n=0;return 8191&t||(n+=13,t>>>=13),127&t||(n+=7,t>>>=7),15&t||(n+=4,t>>>=4),3&t||(n+=2,t>>>=2),1&t||n++,n},r.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},r.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},r.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},r.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var n=0;ne.length?this.clone().iand(e):e.clone().iand(this)},r.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},r.prototype.iuxor=function(e){var t,n;this.length>e.length?(t=this,n=e):(t=e,n=this);for(var i=0;ie.length?this.clone().ixor(e):e.clone().ixor(this)},r.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},r.prototype.inotn=function(e){i("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),n=e%26;this._expand(t),n>0&&t--;for(var o=0;o0&&(this.words[o]=~this.words[o]&67108863>>26-n),this.strip()},r.prototype.notn=function(e){return this.clone().inotn(e)},r.prototype.setn=function(e,t){i("number"==typeof e&&e>=0);var n=e/26|0,o=e%26;return this._expand(n+1),this.words[n]=t?this.words[n]|1<e.length?(n=this,i=e):(n=e,i=this);for(var o=0,r=0;r>>26;for(;0!==o&&r>>26;if(this.length=n.length,0!==o)this.words[this.length]=o,this.length++;else if(n!==this)for(;re.length?this.clone().iadd(e):e.clone().iadd(this)},r.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var n,i,o=this.cmp(e);if(0===o)return this.negative=0,this.length=1,this.words[0]=0,this;o>0?(n=this,i=e):(n=e,i=this);for(var r=0,s=0;s>26,this.words[s]=67108863&t;for(;0!==r&&s>26,this.words[s]=67108863&t;if(0===r&&s>>13,f=0|s[1],p=8191&f,g=f>>>13,m=0|s[2],v=8191&m,y=m>>>13,b=0|s[3],_=8191&b,w=b>>>13,M=0|s[4],C=8191&M,S=M>>>13,L=0|s[5],I=8191&L,N=L>>>13,x=0|s[6],D=8191&x,k=x>>>13,T=0|s[7],E=8191&T,A=T>>>13,j=0|s[8],O=8191&j,R=j>>>13,P=0|s[9],z=8191&P,W=P>>>13,F=0|a[0],B=8191&F,H=F>>>13,V=0|a[1],U=8191&V,Y=V>>>13,Z=0|a[2],G=8191&Z,Q=Z>>>13,q=0|a[3],K=8191&q,J=q>>>13,X=0|a[4],$=8191&X,ee=X>>>13,te=0|a[5],ne=8191&te,ie=te>>>13,oe=0|a[6],re=8191&oe,se=oe>>>13,ae=0|a[7],ue=8191&ae,le=ae>>>13,ce=0|a[8],he=8191&ce,de=ce>>>13,fe=0|a[9],pe=8191&fe,ge=fe>>>13;n.negative=e.negative^t.negative,n.length=19;var me=(l+(i=Math.imul(h,B))|0)+((8191&(o=(o=Math.imul(h,H))+Math.imul(d,B)|0))<<13)|0;l=((r=Math.imul(d,H))+(o>>>13)|0)+(me>>>26)|0,me&=67108863,i=Math.imul(p,B),o=(o=Math.imul(p,H))+Math.imul(g,B)|0,r=Math.imul(g,H);var ve=(l+(i=i+Math.imul(h,U)|0)|0)+((8191&(o=(o=o+Math.imul(h,Y)|0)+Math.imul(d,U)|0))<<13)|0;l=((r=r+Math.imul(d,Y)|0)+(o>>>13)|0)+(ve>>>26)|0,ve&=67108863,i=Math.imul(v,B),o=(o=Math.imul(v,H))+Math.imul(y,B)|0,r=Math.imul(y,H),i=i+Math.imul(p,U)|0,o=(o=o+Math.imul(p,Y)|0)+Math.imul(g,U)|0,r=r+Math.imul(g,Y)|0;var ye=(l+(i=i+Math.imul(h,G)|0)|0)+((8191&(o=(o=o+Math.imul(h,Q)|0)+Math.imul(d,G)|0))<<13)|0;l=((r=r+Math.imul(d,Q)|0)+(o>>>13)|0)+(ye>>>26)|0,ye&=67108863,i=Math.imul(_,B),o=(o=Math.imul(_,H))+Math.imul(w,B)|0,r=Math.imul(w,H),i=i+Math.imul(v,U)|0,o=(o=o+Math.imul(v,Y)|0)+Math.imul(y,U)|0,r=r+Math.imul(y,Y)|0,i=i+Math.imul(p,G)|0,o=(o=o+Math.imul(p,Q)|0)+Math.imul(g,G)|0,r=r+Math.imul(g,Q)|0;var be=(l+(i=i+Math.imul(h,K)|0)|0)+((8191&(o=(o=o+Math.imul(h,J)|0)+Math.imul(d,K)|0))<<13)|0;l=((r=r+Math.imul(d,J)|0)+(o>>>13)|0)+(be>>>26)|0,be&=67108863,i=Math.imul(C,B),o=(o=Math.imul(C,H))+Math.imul(S,B)|0,r=Math.imul(S,H),i=i+Math.imul(_,U)|0,o=(o=o+Math.imul(_,Y)|0)+Math.imul(w,U)|0,r=r+Math.imul(w,Y)|0,i=i+Math.imul(v,G)|0,o=(o=o+Math.imul(v,Q)|0)+Math.imul(y,G)|0,r=r+Math.imul(y,Q)|0,i=i+Math.imul(p,K)|0,o=(o=o+Math.imul(p,J)|0)+Math.imul(g,K)|0,r=r+Math.imul(g,J)|0;var _e=(l+(i=i+Math.imul(h,$)|0)|0)+((8191&(o=(o=o+Math.imul(h,ee)|0)+Math.imul(d,$)|0))<<13)|0;l=((r=r+Math.imul(d,ee)|0)+(o>>>13)|0)+(_e>>>26)|0,_e&=67108863,i=Math.imul(I,B),o=(o=Math.imul(I,H))+Math.imul(N,B)|0,r=Math.imul(N,H),i=i+Math.imul(C,U)|0,o=(o=o+Math.imul(C,Y)|0)+Math.imul(S,U)|0,r=r+Math.imul(S,Y)|0,i=i+Math.imul(_,G)|0,o=(o=o+Math.imul(_,Q)|0)+Math.imul(w,G)|0,r=r+Math.imul(w,Q)|0,i=i+Math.imul(v,K)|0,o=(o=o+Math.imul(v,J)|0)+Math.imul(y,K)|0,r=r+Math.imul(y,J)|0,i=i+Math.imul(p,$)|0,o=(o=o+Math.imul(p,ee)|0)+Math.imul(g,$)|0,r=r+Math.imul(g,ee)|0;var we=(l+(i=i+Math.imul(h,ne)|0)|0)+((8191&(o=(o=o+Math.imul(h,ie)|0)+Math.imul(d,ne)|0))<<13)|0;l=((r=r+Math.imul(d,ie)|0)+(o>>>13)|0)+(we>>>26)|0,we&=67108863,i=Math.imul(D,B),o=(o=Math.imul(D,H))+Math.imul(k,B)|0,r=Math.imul(k,H),i=i+Math.imul(I,U)|0,o=(o=o+Math.imul(I,Y)|0)+Math.imul(N,U)|0,r=r+Math.imul(N,Y)|0,i=i+Math.imul(C,G)|0,o=(o=o+Math.imul(C,Q)|0)+Math.imul(S,G)|0,r=r+Math.imul(S,Q)|0,i=i+Math.imul(_,K)|0,o=(o=o+Math.imul(_,J)|0)+Math.imul(w,K)|0,r=r+Math.imul(w,J)|0,i=i+Math.imul(v,$)|0,o=(o=o+Math.imul(v,ee)|0)+Math.imul(y,$)|0,r=r+Math.imul(y,ee)|0,i=i+Math.imul(p,ne)|0,o=(o=o+Math.imul(p,ie)|0)+Math.imul(g,ne)|0,r=r+Math.imul(g,ie)|0;var Me=(l+(i=i+Math.imul(h,re)|0)|0)+((8191&(o=(o=o+Math.imul(h,se)|0)+Math.imul(d,re)|0))<<13)|0;l=((r=r+Math.imul(d,se)|0)+(o>>>13)|0)+(Me>>>26)|0,Me&=67108863,i=Math.imul(E,B),o=(o=Math.imul(E,H))+Math.imul(A,B)|0,r=Math.imul(A,H),i=i+Math.imul(D,U)|0,o=(o=o+Math.imul(D,Y)|0)+Math.imul(k,U)|0,r=r+Math.imul(k,Y)|0,i=i+Math.imul(I,G)|0,o=(o=o+Math.imul(I,Q)|0)+Math.imul(N,G)|0,r=r+Math.imul(N,Q)|0,i=i+Math.imul(C,K)|0,o=(o=o+Math.imul(C,J)|0)+Math.imul(S,K)|0,r=r+Math.imul(S,J)|0,i=i+Math.imul(_,$)|0,o=(o=o+Math.imul(_,ee)|0)+Math.imul(w,$)|0,r=r+Math.imul(w,ee)|0,i=i+Math.imul(v,ne)|0,o=(o=o+Math.imul(v,ie)|0)+Math.imul(y,ne)|0,r=r+Math.imul(y,ie)|0,i=i+Math.imul(p,re)|0,o=(o=o+Math.imul(p,se)|0)+Math.imul(g,re)|0,r=r+Math.imul(g,se)|0;var Ce=(l+(i=i+Math.imul(h,ue)|0)|0)+((8191&(o=(o=o+Math.imul(h,le)|0)+Math.imul(d,ue)|0))<<13)|0;l=((r=r+Math.imul(d,le)|0)+(o>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,i=Math.imul(O,B),o=(o=Math.imul(O,H))+Math.imul(R,B)|0,r=Math.imul(R,H),i=i+Math.imul(E,U)|0,o=(o=o+Math.imul(E,Y)|0)+Math.imul(A,U)|0,r=r+Math.imul(A,Y)|0,i=i+Math.imul(D,G)|0,o=(o=o+Math.imul(D,Q)|0)+Math.imul(k,G)|0,r=r+Math.imul(k,Q)|0,i=i+Math.imul(I,K)|0,o=(o=o+Math.imul(I,J)|0)+Math.imul(N,K)|0,r=r+Math.imul(N,J)|0,i=i+Math.imul(C,$)|0,o=(o=o+Math.imul(C,ee)|0)+Math.imul(S,$)|0,r=r+Math.imul(S,ee)|0,i=i+Math.imul(_,ne)|0,o=(o=o+Math.imul(_,ie)|0)+Math.imul(w,ne)|0,r=r+Math.imul(w,ie)|0,i=i+Math.imul(v,re)|0,o=(o=o+Math.imul(v,se)|0)+Math.imul(y,re)|0,r=r+Math.imul(y,se)|0,i=i+Math.imul(p,ue)|0,o=(o=o+Math.imul(p,le)|0)+Math.imul(g,ue)|0,r=r+Math.imul(g,le)|0;var Se=(l+(i=i+Math.imul(h,he)|0)|0)+((8191&(o=(o=o+Math.imul(h,de)|0)+Math.imul(d,he)|0))<<13)|0;l=((r=r+Math.imul(d,de)|0)+(o>>>13)|0)+(Se>>>26)|0,Se&=67108863,i=Math.imul(z,B),o=(o=Math.imul(z,H))+Math.imul(W,B)|0,r=Math.imul(W,H),i=i+Math.imul(O,U)|0,o=(o=o+Math.imul(O,Y)|0)+Math.imul(R,U)|0,r=r+Math.imul(R,Y)|0,i=i+Math.imul(E,G)|0,o=(o=o+Math.imul(E,Q)|0)+Math.imul(A,G)|0,r=r+Math.imul(A,Q)|0,i=i+Math.imul(D,K)|0,o=(o=o+Math.imul(D,J)|0)+Math.imul(k,K)|0,r=r+Math.imul(k,J)|0,i=i+Math.imul(I,$)|0,o=(o=o+Math.imul(I,ee)|0)+Math.imul(N,$)|0,r=r+Math.imul(N,ee)|0,i=i+Math.imul(C,ne)|0,o=(o=o+Math.imul(C,ie)|0)+Math.imul(S,ne)|0,r=r+Math.imul(S,ie)|0,i=i+Math.imul(_,re)|0,o=(o=o+Math.imul(_,se)|0)+Math.imul(w,re)|0,r=r+Math.imul(w,se)|0,i=i+Math.imul(v,ue)|0,o=(o=o+Math.imul(v,le)|0)+Math.imul(y,ue)|0,r=r+Math.imul(y,le)|0,i=i+Math.imul(p,he)|0,o=(o=o+Math.imul(p,de)|0)+Math.imul(g,he)|0,r=r+Math.imul(g,de)|0;var Le=(l+(i=i+Math.imul(h,pe)|0)|0)+((8191&(o=(o=o+Math.imul(h,ge)|0)+Math.imul(d,pe)|0))<<13)|0;l=((r=r+Math.imul(d,ge)|0)+(o>>>13)|0)+(Le>>>26)|0,Le&=67108863,i=Math.imul(z,U),o=(o=Math.imul(z,Y))+Math.imul(W,U)|0,r=Math.imul(W,Y),i=i+Math.imul(O,G)|0,o=(o=o+Math.imul(O,Q)|0)+Math.imul(R,G)|0,r=r+Math.imul(R,Q)|0,i=i+Math.imul(E,K)|0,o=(o=o+Math.imul(E,J)|0)+Math.imul(A,K)|0,r=r+Math.imul(A,J)|0,i=i+Math.imul(D,$)|0,o=(o=o+Math.imul(D,ee)|0)+Math.imul(k,$)|0,r=r+Math.imul(k,ee)|0,i=i+Math.imul(I,ne)|0,o=(o=o+Math.imul(I,ie)|0)+Math.imul(N,ne)|0,r=r+Math.imul(N,ie)|0,i=i+Math.imul(C,re)|0,o=(o=o+Math.imul(C,se)|0)+Math.imul(S,re)|0,r=r+Math.imul(S,se)|0,i=i+Math.imul(_,ue)|0,o=(o=o+Math.imul(_,le)|0)+Math.imul(w,ue)|0,r=r+Math.imul(w,le)|0,i=i+Math.imul(v,he)|0,o=(o=o+Math.imul(v,de)|0)+Math.imul(y,he)|0,r=r+Math.imul(y,de)|0;var Ie=(l+(i=i+Math.imul(p,pe)|0)|0)+((8191&(o=(o=o+Math.imul(p,ge)|0)+Math.imul(g,pe)|0))<<13)|0;l=((r=r+Math.imul(g,ge)|0)+(o>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,i=Math.imul(z,G),o=(o=Math.imul(z,Q))+Math.imul(W,G)|0,r=Math.imul(W,Q),i=i+Math.imul(O,K)|0,o=(o=o+Math.imul(O,J)|0)+Math.imul(R,K)|0,r=r+Math.imul(R,J)|0,i=i+Math.imul(E,$)|0,o=(o=o+Math.imul(E,ee)|0)+Math.imul(A,$)|0,r=r+Math.imul(A,ee)|0,i=i+Math.imul(D,ne)|0,o=(o=o+Math.imul(D,ie)|0)+Math.imul(k,ne)|0,r=r+Math.imul(k,ie)|0,i=i+Math.imul(I,re)|0,o=(o=o+Math.imul(I,se)|0)+Math.imul(N,re)|0,r=r+Math.imul(N,se)|0,i=i+Math.imul(C,ue)|0,o=(o=o+Math.imul(C,le)|0)+Math.imul(S,ue)|0,r=r+Math.imul(S,le)|0,i=i+Math.imul(_,he)|0,o=(o=o+Math.imul(_,de)|0)+Math.imul(w,he)|0,r=r+Math.imul(w,de)|0;var Ne=(l+(i=i+Math.imul(v,pe)|0)|0)+((8191&(o=(o=o+Math.imul(v,ge)|0)+Math.imul(y,pe)|0))<<13)|0;l=((r=r+Math.imul(y,ge)|0)+(o>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,i=Math.imul(z,K),o=(o=Math.imul(z,J))+Math.imul(W,K)|0,r=Math.imul(W,J),i=i+Math.imul(O,$)|0,o=(o=o+Math.imul(O,ee)|0)+Math.imul(R,$)|0,r=r+Math.imul(R,ee)|0,i=i+Math.imul(E,ne)|0,o=(o=o+Math.imul(E,ie)|0)+Math.imul(A,ne)|0,r=r+Math.imul(A,ie)|0,i=i+Math.imul(D,re)|0,o=(o=o+Math.imul(D,se)|0)+Math.imul(k,re)|0,r=r+Math.imul(k,se)|0,i=i+Math.imul(I,ue)|0,o=(o=o+Math.imul(I,le)|0)+Math.imul(N,ue)|0,r=r+Math.imul(N,le)|0,i=i+Math.imul(C,he)|0,o=(o=o+Math.imul(C,de)|0)+Math.imul(S,he)|0,r=r+Math.imul(S,de)|0;var xe=(l+(i=i+Math.imul(_,pe)|0)|0)+((8191&(o=(o=o+Math.imul(_,ge)|0)+Math.imul(w,pe)|0))<<13)|0;l=((r=r+Math.imul(w,ge)|0)+(o>>>13)|0)+(xe>>>26)|0,xe&=67108863,i=Math.imul(z,$),o=(o=Math.imul(z,ee))+Math.imul(W,$)|0,r=Math.imul(W,ee),i=i+Math.imul(O,ne)|0,o=(o=o+Math.imul(O,ie)|0)+Math.imul(R,ne)|0,r=r+Math.imul(R,ie)|0,i=i+Math.imul(E,re)|0,o=(o=o+Math.imul(E,se)|0)+Math.imul(A,re)|0,r=r+Math.imul(A,se)|0,i=i+Math.imul(D,ue)|0,o=(o=o+Math.imul(D,le)|0)+Math.imul(k,ue)|0,r=r+Math.imul(k,le)|0,i=i+Math.imul(I,he)|0,o=(o=o+Math.imul(I,de)|0)+Math.imul(N,he)|0,r=r+Math.imul(N,de)|0;var De=(l+(i=i+Math.imul(C,pe)|0)|0)+((8191&(o=(o=o+Math.imul(C,ge)|0)+Math.imul(S,pe)|0))<<13)|0;l=((r=r+Math.imul(S,ge)|0)+(o>>>13)|0)+(De>>>26)|0,De&=67108863,i=Math.imul(z,ne),o=(o=Math.imul(z,ie))+Math.imul(W,ne)|0,r=Math.imul(W,ie),i=i+Math.imul(O,re)|0,o=(o=o+Math.imul(O,se)|0)+Math.imul(R,re)|0,r=r+Math.imul(R,se)|0,i=i+Math.imul(E,ue)|0,o=(o=o+Math.imul(E,le)|0)+Math.imul(A,ue)|0,r=r+Math.imul(A,le)|0,i=i+Math.imul(D,he)|0,o=(o=o+Math.imul(D,de)|0)+Math.imul(k,he)|0,r=r+Math.imul(k,de)|0;var ke=(l+(i=i+Math.imul(I,pe)|0)|0)+((8191&(o=(o=o+Math.imul(I,ge)|0)+Math.imul(N,pe)|0))<<13)|0;l=((r=r+Math.imul(N,ge)|0)+(o>>>13)|0)+(ke>>>26)|0,ke&=67108863,i=Math.imul(z,re),o=(o=Math.imul(z,se))+Math.imul(W,re)|0,r=Math.imul(W,se),i=i+Math.imul(O,ue)|0,o=(o=o+Math.imul(O,le)|0)+Math.imul(R,ue)|0,r=r+Math.imul(R,le)|0,i=i+Math.imul(E,he)|0,o=(o=o+Math.imul(E,de)|0)+Math.imul(A,he)|0,r=r+Math.imul(A,de)|0;var Te=(l+(i=i+Math.imul(D,pe)|0)|0)+((8191&(o=(o=o+Math.imul(D,ge)|0)+Math.imul(k,pe)|0))<<13)|0;l=((r=r+Math.imul(k,ge)|0)+(o>>>13)|0)+(Te>>>26)|0,Te&=67108863,i=Math.imul(z,ue),o=(o=Math.imul(z,le))+Math.imul(W,ue)|0,r=Math.imul(W,le),i=i+Math.imul(O,he)|0,o=(o=o+Math.imul(O,de)|0)+Math.imul(R,he)|0,r=r+Math.imul(R,de)|0;var Ee=(l+(i=i+Math.imul(E,pe)|0)|0)+((8191&(o=(o=o+Math.imul(E,ge)|0)+Math.imul(A,pe)|0))<<13)|0;l=((r=r+Math.imul(A,ge)|0)+(o>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,i=Math.imul(z,he),o=(o=Math.imul(z,de))+Math.imul(W,he)|0,r=Math.imul(W,de);var Ae=(l+(i=i+Math.imul(O,pe)|0)|0)+((8191&(o=(o=o+Math.imul(O,ge)|0)+Math.imul(R,pe)|0))<<13)|0;l=((r=r+Math.imul(R,ge)|0)+(o>>>13)|0)+(Ae>>>26)|0,Ae&=67108863;var je=(l+(i=Math.imul(z,pe))|0)+((8191&(o=(o=Math.imul(z,ge))+Math.imul(W,pe)|0))<<13)|0;return l=((r=Math.imul(W,ge))+(o>>>13)|0)+(je>>>26)|0,je&=67108863,u[0]=me,u[1]=ve,u[2]=ye,u[3]=be,u[4]=_e,u[5]=we,u[6]=Me,u[7]=Ce,u[8]=Se,u[9]=Le,u[10]=Ie,u[11]=Ne,u[12]=xe,u[13]=De,u[14]=ke,u[15]=Te,u[16]=Ee,u[17]=Ae,u[18]=je,0!==l&&(u[19]=l,n.length++),n};function g(e,t,n){return(new m).mulp(e,t,n)}function m(e,t){this.x=e,this.y=t}Math.imul||(p=f),r.prototype.mulTo=function(e,t){var n,i=this.length+e.length;return n=10===this.length&&10===e.length?p(this,e,t):i<63?f(this,e,t):i<1024?function(e,t,n){n.negative=t.negative^e.negative,n.length=e.length+t.length;for(var i=0,o=0,r=0;r>>26)|0)>>>26,s&=67108863}n.words[r]=a,i=s,s=o}return 0!==i?n.words[r]=i:n.length--,n.strip()}(this,e,t):g(this,e,t),n},m.prototype.makeRBT=function(e){for(var t=new Array(e),n=r.prototype._countBits(e)-1,i=0;i>=1;return i},m.prototype.permute=function(e,t,n,i,o,r){for(var s=0;s>>=1)o++;return 1<>>=13,n[2*s+1]=8191&r,r>>>=13;for(s=2*t;s>=26,t+=o/67108864|0,t+=r>>>26,this.words[n]=67108863&r}return 0!==t&&(this.words[n]=t,this.length++),this},r.prototype.muln=function(e){return this.clone().imuln(e)},r.prototype.sqr=function(){return this.mul(this)},r.prototype.isqr=function(){return this.imul(this.clone())},r.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),n=0;n>>o}return t}(e);if(0===t.length)return new r(1);for(var n=this,i=0;i=0);var t,n=e%26,o=(e-n)/26,r=67108863>>>26-n<<26-n;if(0!==n){var s=0;for(t=0;t>>26-n}s&&(this.words[t]=s,this.length++)}if(0!==o){for(t=this.length-1;t>=0;t--)this.words[t+o]=this.words[t];for(t=0;t=0),o=t?(t-t%26)/26:0;var r=e%26,s=Math.min((e-r)/26,this.length),a=67108863^67108863>>>r<s)for(this.length-=s,l=0;l=0&&(0!==c||l>=o);l--){var h=0|this.words[l];this.words[l]=c<<26-r|h>>>r,c=h&a}return u&&0!==c&&(u.words[u.length++]=c),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},r.prototype.ishrn=function(e,t,n){return i(0===this.negative),this.iushrn(e,t,n)},r.prototype.shln=function(e){return this.clone().ishln(e)},r.prototype.ushln=function(e){return this.clone().iushln(e)},r.prototype.shrn=function(e){return this.clone().ishrn(e)},r.prototype.ushrn=function(e){return this.clone().iushrn(e)},r.prototype.testn=function(e){i("number"==typeof e&&e>=0);var t=e%26,n=(e-t)/26,o=1<=0);var t=e%26,n=(e-t)/26;if(i(0===this.negative,"imaskn works only with positive numbers"),this.length<=n)return this;if(0!==t&&n++,this.length=Math.min(n,this.length),0!==t){var o=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},r.prototype.isubn=function(e){if(i("number"==typeof e),i(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(u/67108864|0),this.words[o+n]=67108863&r}for(;o>26,this.words[o+n]=67108863&r;if(0===a)return this.strip();for(i(-1===a),a=0,o=0;o>26,this.words[o]=67108863&r;return this.negative=1,this.strip()},r.prototype._wordDiv=function(e,t){var n=(this.length,e.length),i=this.clone(),o=e,s=0|o.words[o.length-1];0!=(n=26-this._countBits(s))&&(o=o.ushln(n),i.iushln(n),s=0|o.words[o.length-1]);var a,u=i.length-o.length;if("mod"!==t){(a=new r(null)).length=u+1,a.words=new Array(a.length);for(var l=0;l=0;h--){var d=67108864*(0|i.words[o.length+h])+(0|i.words[o.length+h-1]);for(d=Math.min(d/s|0,67108863),i._ishlnsubmul(o,d,h);0!==i.negative;)d--,i.negative=0,i._ishlnsubmul(o,1,h),i.isZero()||(i.negative^=1);a&&(a.words[h]=d)}return a&&a.strip(),i.strip(),"div"!==t&&0!==n&&i.iushrn(n),{div:a||null,mod:i}},r.prototype.divmod=function(e,t,n){return i(!e.isZero()),this.isZero()?{div:new r(0),mod:new r(0)}:0!==this.negative&&0===e.negative?(a=this.neg().divmod(e,t),"mod"!==t&&(o=a.div.neg()),"div"!==t&&(s=a.mod.neg(),n&&0!==s.negative&&s.iadd(e)),{div:o,mod:s}):0===this.negative&&0!==e.negative?(a=this.divmod(e.neg(),t),"mod"!==t&&(o=a.div.neg()),{div:o,mod:a.mod}):this.negative&e.negative?(a=this.neg().divmod(e.neg(),t),"div"!==t&&(s=a.mod.neg(),n&&0!==s.negative&&s.isub(e)),{div:a.div,mod:s}):e.length>this.length||this.cmp(e)<0?{div:new r(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new r(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new r(this.modn(e.words[0]))}:this._wordDiv(e,t);var o,s,a},r.prototype.div=function(e){return this.divmod(e,"div",!1).div},r.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},r.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},r.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var n=0!==t.div.negative?t.mod.isub(e):t.mod,i=e.ushrn(1),o=e.andln(1),r=n.cmp(i);return r<0||1===o&&0===r?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},r.prototype.modn=function(e){i(e<=67108863);for(var t=(1<<26)%e,n=0,o=this.length-1;o>=0;o--)n=(t*n+(0|this.words[o]))%e;return n},r.prototype.idivn=function(e){i(e<=67108863);for(var t=0,n=this.length-1;n>=0;n--){var o=(0|this.words[n])+67108864*t;this.words[n]=o/e|0,t=o%e}return this.strip()},r.prototype.divn=function(e){return this.clone().idivn(e)},r.prototype.egcd=function(e){i(0===e.negative),i(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var o=new r(1),s=new r(0),a=new r(0),u=new r(1),l=0;t.isEven()&&n.isEven();)t.iushrn(1),n.iushrn(1),++l;for(var c=n.clone(),h=t.clone();!t.isZero();){for(var d=0,f=1;!(t.words[0]&f)&&d<26;++d,f<<=1);if(d>0)for(t.iushrn(d);d-- >0;)(o.isOdd()||s.isOdd())&&(o.iadd(c),s.isub(h)),o.iushrn(1),s.iushrn(1);for(var p=0,g=1;!(n.words[0]&g)&&p<26;++p,g<<=1);if(p>0)for(n.iushrn(p);p-- >0;)(a.isOdd()||u.isOdd())&&(a.iadd(c),u.isub(h)),a.iushrn(1),u.iushrn(1);t.cmp(n)>=0?(t.isub(n),o.isub(a),s.isub(u)):(n.isub(t),a.isub(o),u.isub(s))}return{a,b:u,gcd:n.iushln(l)}},r.prototype._invmp=function(e){i(0===e.negative),i(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var o,s=new r(1),a=new r(0),u=n.clone();t.cmpn(1)>0&&n.cmpn(1)>0;){for(var l=0,c=1;!(t.words[0]&c)&&l<26;++l,c<<=1);if(l>0)for(t.iushrn(l);l-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);for(var h=0,d=1;!(n.words[0]&d)&&h<26;++h,d<<=1);if(h>0)for(n.iushrn(h);h-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);t.cmp(n)>=0?(t.isub(n),s.isub(a)):(n.isub(t),a.isub(s))}return(o=0===t.cmpn(1)?s:a).cmpn(0)<0&&o.iadd(e),o},r.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),n=e.clone();t.negative=0,n.negative=0;for(var i=0;t.isEven()&&n.isEven();i++)t.iushrn(1),n.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;n.isEven();)n.iushrn(1);var o=t.cmp(n);if(o<0){var r=t;t=n,n=r}else if(0===o||0===n.cmpn(1))break;t.isub(n)}return n.iushln(i)},r.prototype.invm=function(e){return this.egcd(e).a.umod(e)},r.prototype.isEven=function(){return!(1&this.words[0])},r.prototype.isOdd=function(){return!(1&~this.words[0])},r.prototype.andln=function(e){return this.words[0]&e},r.prototype.bincn=function(e){i("number"==typeof e);var t=e%26,n=(e-t)/26,o=1<>>26,a&=67108863,this.words[s]=a}return 0!==r&&(this.words[s]=r,this.length++),this},r.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},r.prototype.cmpn=function(e){var t,n=e<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this.strip(),this.length>1)t=1;else{n&&(e=-e),i(e<=67108863,"Number is too big");var o=0|this.words[0];t=o===e?0:oe.length)return 1;if(this.length=0;n--){var i=0|this.words[n],o=0|e.words[n];if(i!==o){io&&(t=1);break}}return t},r.prototype.gtn=function(e){return 1===this.cmpn(e)},r.prototype.gt=function(e){return 1===this.cmp(e)},r.prototype.gten=function(e){return this.cmpn(e)>=0},r.prototype.gte=function(e){return this.cmp(e)>=0},r.prototype.ltn=function(e){return-1===this.cmpn(e)},r.prototype.lt=function(e){return-1===this.cmp(e)},r.prototype.lten=function(e){return this.cmpn(e)<=0},r.prototype.lte=function(e){return this.cmp(e)<=0},r.prototype.eqn=function(e){return 0===this.cmpn(e)},r.prototype.eq=function(e){return 0===this.cmp(e)},r.red=function(e){return new C(e)},r.prototype.toRed=function(e){return i(!this.red,"Already a number in reduction context"),i(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},r.prototype.fromRed=function(){return i(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},r.prototype._forceRed=function(e){return this.red=e,this},r.prototype.forceRed=function(e){return i(!this.red,"Already a number in reduction context"),this._forceRed(e)},r.prototype.redAdd=function(e){return i(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},r.prototype.redIAdd=function(e){return i(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},r.prototype.redSub=function(e){return i(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},r.prototype.redISub=function(e){return i(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},r.prototype.redShl=function(e){return i(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},r.prototype.redMul=function(e){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},r.prototype.redIMul=function(e){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},r.prototype.redSqr=function(){return i(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},r.prototype.redISqr=function(){return i(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},r.prototype.redSqrt=function(){return i(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},r.prototype.redInvm=function(){return i(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},r.prototype.redNeg=function(){return i(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},r.prototype.redPow=function(e){return i(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var v={k256:null,p224:null,p192:null,p25519:null};function y(e,t){this.name=e,this.p=new r(t,16),this.n=this.p.bitLength(),this.k=new r(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function b(){y.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function _(){y.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){y.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function M(){y.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function C(e){if("string"==typeof e){var t=r._prime(e);this.m=t.p,this.prime=t}else i(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function S(e){C.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new r(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}y.prototype._tmp=function(){var e=new r(null);return e.words=new Array(Math.ceil(this.n/13)),e},y.prototype.ireduce=function(e){var t,n=e;do{this.split(n,this.tmp),t=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(t>this.n);var i=t0?n.isub(this.p):void 0!==n.strip?n.strip():n._strip(),n},y.prototype.split=function(e,t){e.iushrn(this.n,0,t)},y.prototype.imulK=function(e){return e.imul(this.k)},o(b,y),b.prototype.split=function(e,t){for(var n=4194303,i=Math.min(e.length,9),o=0;o>>22,r=s}r>>>=22,e.words[o-10]=r,0===r&&e.length>10?e.length-=10:e.length-=9},b.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,n=0;n>>=26,e.words[n]=o,t=i}return 0!==t&&(e.words[e.length++]=t),e},r._prime=function(e){if(v[e])return v[e];var t;if("k256"===e)t=new b;else if("p224"===e)t=new _;else if("p192"===e)t=new w;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new M}return v[e]=t,t},C.prototype._verify1=function(e){i(0===e.negative,"red works only with positives"),i(e.red,"red works only with red numbers")},C.prototype._verify2=function(e,t){i(!(e.negative|t.negative),"red works only with positives"),i(e.red&&e.red===t.red,"red works only with red numbers")},C.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},C.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},C.prototype.add=function(e,t){this._verify2(e,t);var n=e.add(t);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},C.prototype.iadd=function(e,t){this._verify2(e,t);var n=e.iadd(t);return n.cmp(this.m)>=0&&n.isub(this.m),n},C.prototype.sub=function(e,t){this._verify2(e,t);var n=e.sub(t);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},C.prototype.isub=function(e,t){this._verify2(e,t);var n=e.isub(t);return n.cmpn(0)<0&&n.iadd(this.m),n},C.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},C.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},C.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},C.prototype.isqr=function(e){return this.imul(e,e.clone())},C.prototype.sqr=function(e){return this.mul(e,e)},C.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(i(t%2==1),3===t){var n=this.m.add(new r(1)).iushrn(2);return this.pow(e,n)}for(var o=this.m.subn(1),s=0;!o.isZero()&&0===o.andln(1);)s++,o.iushrn(1);i(!o.isZero());var a=new r(1).toRed(this),u=a.redNeg(),l=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new r(2*c*c).toRed(this);0!==this.pow(c,l).cmp(u);)c.redIAdd(u);for(var h=this.pow(c,o),d=this.pow(e,o.addn(1).iushrn(1)),f=this.pow(e,o),p=s;0!==f.cmp(a);){for(var g=f,m=0;0!==g.cmp(a);m++)g=g.redSqr();i(m=0;i--){for(var l=t.words[i],c=u-1;c>=0;c--){var h=l>>c&1;o!==n[0]&&(o=this.sqr(o)),0!==h||0!==s?(s<<=1,s|=h,(4==++a||0===i&&0===c)&&(o=this.mul(o,n[s]),a=0,s=0)):a=0}u=26}return o},C.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},C.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},r.mont=function(e){return new S(e)},o(S,C),S.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},S.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},S.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var n=e.imul(t),i=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=n.isub(i).iushrn(this.shift),r=o;return o.cmp(this.m)>=0?r=o.isub(this.m):o.cmpn(0)<0&&(r=o.iadd(this.m)),r._forceRed(this)},S.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new r(0)._forceRed(this);var n=e.mul(t),i=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=n.isub(i).iushrn(this.shift),s=o;return o.cmp(this.m)>=0?s=o.isub(this.m):o.cmpn(0)<0&&(s=o.iadd(this.m)),s._forceRed(this)},S.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=n.nmd(e),this)},1117:(e,t)=>{"use strict";t.byteLength=function(e){var t=a(e),n=t[0],i=t[1];return 3*(n+i)/4-i},t.toByteArray=function(e){var t,n,r=a(e),s=r[0],u=r[1],l=new o(function(e,t,n){return 3*(t+n)/4-n}(0,s,u)),c=0,h=u>0?s-4:s;for(n=0;n>16&255,l[c++]=t>>8&255,l[c++]=255&t;return 2===u&&(t=i[e.charCodeAt(n)]<<2|i[e.charCodeAt(n+1)]>>4,l[c++]=255&t),1===u&&(t=i[e.charCodeAt(n)]<<10|i[e.charCodeAt(n+1)]<<4|i[e.charCodeAt(n+2)]>>2,l[c++]=t>>8&255,l[c++]=255&t),l},t.fromByteArray=function(e){for(var t,i=e.length,o=i%3,r=[],s=16383,a=0,l=i-o;al?l:a+s));return 1===o?(t=e[i-1],r.push(n[t>>2]+n[t<<4&63]+"==")):2===o&&(t=(e[i-2]<<8)+e[i-1],r.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"=")),r.join("")};for(var n=[],i=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0;s<64;++s)n[s]=r[s],i[r.charCodeAt(s)]=s;function a(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function u(e,t,i){for(var o,r,s=[],a=t;a>18&63]+n[r>>12&63]+n[r>>6&63]+n[63&r]);return s.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},4917:function(e,t,n){!function(e,t){"use strict";function i(e,t){if(!e)throw new Error(t||"Assertion failed")}function o(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}function r(e,t,n){if(r.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(n=t,t=10),this._init(e||0,t||10,n||"be"))}var s;"object"==typeof e?e.exports=r:t.BN=r,r.BN=r,r.wordSize=26;try{s="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:n(5409).Buffer}catch(e){}function a(e,t){var n=e.charCodeAt(t);return n>=48&&n<=57?n-48:n>=65&&n<=70?n-55:n>=97&&n<=102?n-87:void i(!1,"Invalid character in "+e)}function u(e,t,n){var i=a(e,n);return n-1>=t&&(i|=a(e,n-1)<<4),i}function l(e,t,n,o){for(var r=0,s=0,a=Math.min(e.length,n),u=t;u=49?l-49+10:l>=17?l-17+10:l,i(l>=0&&s0?e:t},r.min=function(e,t){return e.cmp(t)<0?e:t},r.prototype._init=function(e,t,n){if("number"==typeof e)return this._initNumber(e,t,n);if("object"==typeof e)return this._initArray(e,t,n);"hex"===t&&(t=16),i(t===(0|t)&&t>=2&&t<=36);var o=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(o++,this.negative=1),o=0;o-=3)s=e[o]|e[o-1]<<8|e[o-2]<<16,this.words[r]|=s<>>26-a&67108863,(a+=24)>=26&&(a-=26,r++);else if("le"===n)for(o=0,r=0;o>>26-a&67108863,(a+=24)>=26&&(a-=26,r++);return this._strip()},r.prototype._parseHex=function(e,t,n){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var i=0;i=t;i-=2)o=u(e,t,i)<=18?(r-=18,s+=1,this.words[s]|=o>>>26):r+=8;else for(i=(e.length-t)%2==0?t+1:t;i=18?(r-=18,s+=1,this.words[s]|=o>>>26):r+=8;this._strip()},r.prototype._parseBase=function(e,t,n){this.words=[0],this.length=1;for(var i=0,o=1;o<=67108863;o*=t)i++;i--,o=o/t|0;for(var r=e.length-n,s=r%i,a=Math.min(r,r-s)+n,u=0,c=n;c1&&0===this.words[this.length-1];)this.length--;return this._normSign()},r.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{r.prototype[Symbol.for("nodejs.util.inspect.custom")]=h}catch(e){r.prototype.inspect=h}else r.prototype.inspect=h;function h(){return(this.red?""}var d=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],f=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],p=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function g(e,t,n){n.negative=t.negative^e.negative;var i=e.length+t.length|0;n.length=i,i=i-1|0;var o=0|e.words[0],r=0|t.words[0],s=o*r,a=67108863&s,u=s/67108864|0;n.words[0]=a;for(var l=1;l>>26,h=67108863&u,d=Math.min(l,t.length-1),f=Math.max(0,l-e.length+1);f<=d;f++){var p=l-f|0;c+=(s=(o=0|e.words[p])*(r=0|t.words[f])+h)/67108864|0,h=67108863&s}n.words[l]=0|h,u=0|c}return 0!==u?n.words[l]=0|u:n.length--,n._strip()}r.prototype.toString=function(e,t){var n;if(t=0|t||1,16===(e=e||10)||"hex"===e){n="";for(var o=0,r=0,s=0;s>>24-o&16777215,(o+=2)>=26&&(o-=26,s--),n=0!==r||s!==this.length-1?d[6-u.length]+u+n:u+n}for(0!==r&&(n=r.toString(16)+n);n.length%t!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(e===(0|e)&&e>=2&&e<=36){var l=f[e],c=p[e];n="";var h=this.clone();for(h.negative=0;!h.isZero();){var g=h.modrn(c).toString(e);n=(h=h.idivn(c)).isZero()?g+n:d[l-g.length]+g+n}for(this.isZero()&&(n="0"+n);n.length%t!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}i(!1,"Base should be between 2 and 36")},r.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&i(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},r.prototype.toJSON=function(){return this.toString(16,2)},s&&(r.prototype.toBuffer=function(e,t){return this.toArrayLike(s,e,t)}),r.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},r.prototype.toArrayLike=function(e,t,n){this._strip();var o=this.byteLength(),r=n||Math.max(1,o);i(o<=r,"byte array longer than desired length"),i(r>0,"Requested array length <= 0");var s=function(e,t){return e.allocUnsafe?e.allocUnsafe(t):new e(t)}(e,r);return this["_toArrayLike"+("le"===t?"LE":"BE")](s,o),s},r.prototype._toArrayLikeLE=function(e,t){for(var n=0,i=0,o=0,r=0;o>8&255),n>16&255),6===r?(n>24&255),i=0,r=0):(i=s>>>24,r+=2)}if(n=0&&(e[n--]=s>>8&255),n>=0&&(e[n--]=s>>16&255),6===r?(n>=0&&(e[n--]=s>>24&255),i=0,r=0):(i=s>>>24,r+=2)}if(n>=0)for(e[n--]=i;n>=0;)e[n--]=0},Math.clz32?r.prototype._countBits=function(e){return 32-Math.clz32(e)}:r.prototype._countBits=function(e){var t=e,n=0;return t>=4096&&(n+=13,t>>>=13),t>=64&&(n+=7,t>>>=7),t>=8&&(n+=4,t>>>=4),t>=2&&(n+=2,t>>>=2),n+t},r.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,n=0;return 8191&t||(n+=13,t>>>=13),127&t||(n+=7,t>>>=7),15&t||(n+=4,t>>>=4),3&t||(n+=2,t>>>=2),1&t||n++,n},r.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},r.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},r.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},r.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var n=0;ne.length?this.clone().iand(e):e.clone().iand(this)},r.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},r.prototype.iuxor=function(e){var t,n;this.length>e.length?(t=this,n=e):(t=e,n=this);for(var i=0;ie.length?this.clone().ixor(e):e.clone().ixor(this)},r.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},r.prototype.inotn=function(e){i("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),n=e%26;this._expand(t),n>0&&t--;for(var o=0;o0&&(this.words[o]=~this.words[o]&67108863>>26-n),this._strip()},r.prototype.notn=function(e){return this.clone().inotn(e)},r.prototype.setn=function(e,t){i("number"==typeof e&&e>=0);var n=e/26|0,o=e%26;return this._expand(n+1),this.words[n]=t?this.words[n]|1<e.length?(n=this,i=e):(n=e,i=this);for(var o=0,r=0;r>>26;for(;0!==o&&r>>26;if(this.length=n.length,0!==o)this.words[this.length]=o,this.length++;else if(n!==this)for(;re.length?this.clone().iadd(e):e.clone().iadd(this)},r.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var n,i,o=this.cmp(e);if(0===o)return this.negative=0,this.length=1,this.words[0]=0,this;o>0?(n=this,i=e):(n=e,i=this);for(var r=0,s=0;s>26,this.words[s]=67108863&t;for(;0!==r&&s>26,this.words[s]=67108863&t;if(0===r&&s>>13,f=0|s[1],p=8191&f,g=f>>>13,m=0|s[2],v=8191&m,y=m>>>13,b=0|s[3],_=8191&b,w=b>>>13,M=0|s[4],C=8191&M,S=M>>>13,L=0|s[5],I=8191&L,N=L>>>13,x=0|s[6],D=8191&x,k=x>>>13,T=0|s[7],E=8191&T,A=T>>>13,j=0|s[8],O=8191&j,R=j>>>13,P=0|s[9],z=8191&P,W=P>>>13,F=0|a[0],B=8191&F,H=F>>>13,V=0|a[1],U=8191&V,Y=V>>>13,Z=0|a[2],G=8191&Z,Q=Z>>>13,q=0|a[3],K=8191&q,J=q>>>13,X=0|a[4],$=8191&X,ee=X>>>13,te=0|a[5],ne=8191&te,ie=te>>>13,oe=0|a[6],re=8191&oe,se=oe>>>13,ae=0|a[7],ue=8191&ae,le=ae>>>13,ce=0|a[8],he=8191&ce,de=ce>>>13,fe=0|a[9],pe=8191&fe,ge=fe>>>13;n.negative=e.negative^t.negative,n.length=19;var me=(l+(i=Math.imul(h,B))|0)+((8191&(o=(o=Math.imul(h,H))+Math.imul(d,B)|0))<<13)|0;l=((r=Math.imul(d,H))+(o>>>13)|0)+(me>>>26)|0,me&=67108863,i=Math.imul(p,B),o=(o=Math.imul(p,H))+Math.imul(g,B)|0,r=Math.imul(g,H);var ve=(l+(i=i+Math.imul(h,U)|0)|0)+((8191&(o=(o=o+Math.imul(h,Y)|0)+Math.imul(d,U)|0))<<13)|0;l=((r=r+Math.imul(d,Y)|0)+(o>>>13)|0)+(ve>>>26)|0,ve&=67108863,i=Math.imul(v,B),o=(o=Math.imul(v,H))+Math.imul(y,B)|0,r=Math.imul(y,H),i=i+Math.imul(p,U)|0,o=(o=o+Math.imul(p,Y)|0)+Math.imul(g,U)|0,r=r+Math.imul(g,Y)|0;var ye=(l+(i=i+Math.imul(h,G)|0)|0)+((8191&(o=(o=o+Math.imul(h,Q)|0)+Math.imul(d,G)|0))<<13)|0;l=((r=r+Math.imul(d,Q)|0)+(o>>>13)|0)+(ye>>>26)|0,ye&=67108863,i=Math.imul(_,B),o=(o=Math.imul(_,H))+Math.imul(w,B)|0,r=Math.imul(w,H),i=i+Math.imul(v,U)|0,o=(o=o+Math.imul(v,Y)|0)+Math.imul(y,U)|0,r=r+Math.imul(y,Y)|0,i=i+Math.imul(p,G)|0,o=(o=o+Math.imul(p,Q)|0)+Math.imul(g,G)|0,r=r+Math.imul(g,Q)|0;var be=(l+(i=i+Math.imul(h,K)|0)|0)+((8191&(o=(o=o+Math.imul(h,J)|0)+Math.imul(d,K)|0))<<13)|0;l=((r=r+Math.imul(d,J)|0)+(o>>>13)|0)+(be>>>26)|0,be&=67108863,i=Math.imul(C,B),o=(o=Math.imul(C,H))+Math.imul(S,B)|0,r=Math.imul(S,H),i=i+Math.imul(_,U)|0,o=(o=o+Math.imul(_,Y)|0)+Math.imul(w,U)|0,r=r+Math.imul(w,Y)|0,i=i+Math.imul(v,G)|0,o=(o=o+Math.imul(v,Q)|0)+Math.imul(y,G)|0,r=r+Math.imul(y,Q)|0,i=i+Math.imul(p,K)|0,o=(o=o+Math.imul(p,J)|0)+Math.imul(g,K)|0,r=r+Math.imul(g,J)|0;var _e=(l+(i=i+Math.imul(h,$)|0)|0)+((8191&(o=(o=o+Math.imul(h,ee)|0)+Math.imul(d,$)|0))<<13)|0;l=((r=r+Math.imul(d,ee)|0)+(o>>>13)|0)+(_e>>>26)|0,_e&=67108863,i=Math.imul(I,B),o=(o=Math.imul(I,H))+Math.imul(N,B)|0,r=Math.imul(N,H),i=i+Math.imul(C,U)|0,o=(o=o+Math.imul(C,Y)|0)+Math.imul(S,U)|0,r=r+Math.imul(S,Y)|0,i=i+Math.imul(_,G)|0,o=(o=o+Math.imul(_,Q)|0)+Math.imul(w,G)|0,r=r+Math.imul(w,Q)|0,i=i+Math.imul(v,K)|0,o=(o=o+Math.imul(v,J)|0)+Math.imul(y,K)|0,r=r+Math.imul(y,J)|0,i=i+Math.imul(p,$)|0,o=(o=o+Math.imul(p,ee)|0)+Math.imul(g,$)|0,r=r+Math.imul(g,ee)|0;var we=(l+(i=i+Math.imul(h,ne)|0)|0)+((8191&(o=(o=o+Math.imul(h,ie)|0)+Math.imul(d,ne)|0))<<13)|0;l=((r=r+Math.imul(d,ie)|0)+(o>>>13)|0)+(we>>>26)|0,we&=67108863,i=Math.imul(D,B),o=(o=Math.imul(D,H))+Math.imul(k,B)|0,r=Math.imul(k,H),i=i+Math.imul(I,U)|0,o=(o=o+Math.imul(I,Y)|0)+Math.imul(N,U)|0,r=r+Math.imul(N,Y)|0,i=i+Math.imul(C,G)|0,o=(o=o+Math.imul(C,Q)|0)+Math.imul(S,G)|0,r=r+Math.imul(S,Q)|0,i=i+Math.imul(_,K)|0,o=(o=o+Math.imul(_,J)|0)+Math.imul(w,K)|0,r=r+Math.imul(w,J)|0,i=i+Math.imul(v,$)|0,o=(o=o+Math.imul(v,ee)|0)+Math.imul(y,$)|0,r=r+Math.imul(y,ee)|0,i=i+Math.imul(p,ne)|0,o=(o=o+Math.imul(p,ie)|0)+Math.imul(g,ne)|0,r=r+Math.imul(g,ie)|0;var Me=(l+(i=i+Math.imul(h,re)|0)|0)+((8191&(o=(o=o+Math.imul(h,se)|0)+Math.imul(d,re)|0))<<13)|0;l=((r=r+Math.imul(d,se)|0)+(o>>>13)|0)+(Me>>>26)|0,Me&=67108863,i=Math.imul(E,B),o=(o=Math.imul(E,H))+Math.imul(A,B)|0,r=Math.imul(A,H),i=i+Math.imul(D,U)|0,o=(o=o+Math.imul(D,Y)|0)+Math.imul(k,U)|0,r=r+Math.imul(k,Y)|0,i=i+Math.imul(I,G)|0,o=(o=o+Math.imul(I,Q)|0)+Math.imul(N,G)|0,r=r+Math.imul(N,Q)|0,i=i+Math.imul(C,K)|0,o=(o=o+Math.imul(C,J)|0)+Math.imul(S,K)|0,r=r+Math.imul(S,J)|0,i=i+Math.imul(_,$)|0,o=(o=o+Math.imul(_,ee)|0)+Math.imul(w,$)|0,r=r+Math.imul(w,ee)|0,i=i+Math.imul(v,ne)|0,o=(o=o+Math.imul(v,ie)|0)+Math.imul(y,ne)|0,r=r+Math.imul(y,ie)|0,i=i+Math.imul(p,re)|0,o=(o=o+Math.imul(p,se)|0)+Math.imul(g,re)|0,r=r+Math.imul(g,se)|0;var Ce=(l+(i=i+Math.imul(h,ue)|0)|0)+((8191&(o=(o=o+Math.imul(h,le)|0)+Math.imul(d,ue)|0))<<13)|0;l=((r=r+Math.imul(d,le)|0)+(o>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,i=Math.imul(O,B),o=(o=Math.imul(O,H))+Math.imul(R,B)|0,r=Math.imul(R,H),i=i+Math.imul(E,U)|0,o=(o=o+Math.imul(E,Y)|0)+Math.imul(A,U)|0,r=r+Math.imul(A,Y)|0,i=i+Math.imul(D,G)|0,o=(o=o+Math.imul(D,Q)|0)+Math.imul(k,G)|0,r=r+Math.imul(k,Q)|0,i=i+Math.imul(I,K)|0,o=(o=o+Math.imul(I,J)|0)+Math.imul(N,K)|0,r=r+Math.imul(N,J)|0,i=i+Math.imul(C,$)|0,o=(o=o+Math.imul(C,ee)|0)+Math.imul(S,$)|0,r=r+Math.imul(S,ee)|0,i=i+Math.imul(_,ne)|0,o=(o=o+Math.imul(_,ie)|0)+Math.imul(w,ne)|0,r=r+Math.imul(w,ie)|0,i=i+Math.imul(v,re)|0,o=(o=o+Math.imul(v,se)|0)+Math.imul(y,re)|0,r=r+Math.imul(y,se)|0,i=i+Math.imul(p,ue)|0,o=(o=o+Math.imul(p,le)|0)+Math.imul(g,ue)|0,r=r+Math.imul(g,le)|0;var Se=(l+(i=i+Math.imul(h,he)|0)|0)+((8191&(o=(o=o+Math.imul(h,de)|0)+Math.imul(d,he)|0))<<13)|0;l=((r=r+Math.imul(d,de)|0)+(o>>>13)|0)+(Se>>>26)|0,Se&=67108863,i=Math.imul(z,B),o=(o=Math.imul(z,H))+Math.imul(W,B)|0,r=Math.imul(W,H),i=i+Math.imul(O,U)|0,o=(o=o+Math.imul(O,Y)|0)+Math.imul(R,U)|0,r=r+Math.imul(R,Y)|0,i=i+Math.imul(E,G)|0,o=(o=o+Math.imul(E,Q)|0)+Math.imul(A,G)|0,r=r+Math.imul(A,Q)|0,i=i+Math.imul(D,K)|0,o=(o=o+Math.imul(D,J)|0)+Math.imul(k,K)|0,r=r+Math.imul(k,J)|0,i=i+Math.imul(I,$)|0,o=(o=o+Math.imul(I,ee)|0)+Math.imul(N,$)|0,r=r+Math.imul(N,ee)|0,i=i+Math.imul(C,ne)|0,o=(o=o+Math.imul(C,ie)|0)+Math.imul(S,ne)|0,r=r+Math.imul(S,ie)|0,i=i+Math.imul(_,re)|0,o=(o=o+Math.imul(_,se)|0)+Math.imul(w,re)|0,r=r+Math.imul(w,se)|0,i=i+Math.imul(v,ue)|0,o=(o=o+Math.imul(v,le)|0)+Math.imul(y,ue)|0,r=r+Math.imul(y,le)|0,i=i+Math.imul(p,he)|0,o=(o=o+Math.imul(p,de)|0)+Math.imul(g,he)|0,r=r+Math.imul(g,de)|0;var Le=(l+(i=i+Math.imul(h,pe)|0)|0)+((8191&(o=(o=o+Math.imul(h,ge)|0)+Math.imul(d,pe)|0))<<13)|0;l=((r=r+Math.imul(d,ge)|0)+(o>>>13)|0)+(Le>>>26)|0,Le&=67108863,i=Math.imul(z,U),o=(o=Math.imul(z,Y))+Math.imul(W,U)|0,r=Math.imul(W,Y),i=i+Math.imul(O,G)|0,o=(o=o+Math.imul(O,Q)|0)+Math.imul(R,G)|0,r=r+Math.imul(R,Q)|0,i=i+Math.imul(E,K)|0,o=(o=o+Math.imul(E,J)|0)+Math.imul(A,K)|0,r=r+Math.imul(A,J)|0,i=i+Math.imul(D,$)|0,o=(o=o+Math.imul(D,ee)|0)+Math.imul(k,$)|0,r=r+Math.imul(k,ee)|0,i=i+Math.imul(I,ne)|0,o=(o=o+Math.imul(I,ie)|0)+Math.imul(N,ne)|0,r=r+Math.imul(N,ie)|0,i=i+Math.imul(C,re)|0,o=(o=o+Math.imul(C,se)|0)+Math.imul(S,re)|0,r=r+Math.imul(S,se)|0,i=i+Math.imul(_,ue)|0,o=(o=o+Math.imul(_,le)|0)+Math.imul(w,ue)|0,r=r+Math.imul(w,le)|0,i=i+Math.imul(v,he)|0,o=(o=o+Math.imul(v,de)|0)+Math.imul(y,he)|0,r=r+Math.imul(y,de)|0;var Ie=(l+(i=i+Math.imul(p,pe)|0)|0)+((8191&(o=(o=o+Math.imul(p,ge)|0)+Math.imul(g,pe)|0))<<13)|0;l=((r=r+Math.imul(g,ge)|0)+(o>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,i=Math.imul(z,G),o=(o=Math.imul(z,Q))+Math.imul(W,G)|0,r=Math.imul(W,Q),i=i+Math.imul(O,K)|0,o=(o=o+Math.imul(O,J)|0)+Math.imul(R,K)|0,r=r+Math.imul(R,J)|0,i=i+Math.imul(E,$)|0,o=(o=o+Math.imul(E,ee)|0)+Math.imul(A,$)|0,r=r+Math.imul(A,ee)|0,i=i+Math.imul(D,ne)|0,o=(o=o+Math.imul(D,ie)|0)+Math.imul(k,ne)|0,r=r+Math.imul(k,ie)|0,i=i+Math.imul(I,re)|0,o=(o=o+Math.imul(I,se)|0)+Math.imul(N,re)|0,r=r+Math.imul(N,se)|0,i=i+Math.imul(C,ue)|0,o=(o=o+Math.imul(C,le)|0)+Math.imul(S,ue)|0,r=r+Math.imul(S,le)|0,i=i+Math.imul(_,he)|0,o=(o=o+Math.imul(_,de)|0)+Math.imul(w,he)|0,r=r+Math.imul(w,de)|0;var Ne=(l+(i=i+Math.imul(v,pe)|0)|0)+((8191&(o=(o=o+Math.imul(v,ge)|0)+Math.imul(y,pe)|0))<<13)|0;l=((r=r+Math.imul(y,ge)|0)+(o>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,i=Math.imul(z,K),o=(o=Math.imul(z,J))+Math.imul(W,K)|0,r=Math.imul(W,J),i=i+Math.imul(O,$)|0,o=(o=o+Math.imul(O,ee)|0)+Math.imul(R,$)|0,r=r+Math.imul(R,ee)|0,i=i+Math.imul(E,ne)|0,o=(o=o+Math.imul(E,ie)|0)+Math.imul(A,ne)|0,r=r+Math.imul(A,ie)|0,i=i+Math.imul(D,re)|0,o=(o=o+Math.imul(D,se)|0)+Math.imul(k,re)|0,r=r+Math.imul(k,se)|0,i=i+Math.imul(I,ue)|0,o=(o=o+Math.imul(I,le)|0)+Math.imul(N,ue)|0,r=r+Math.imul(N,le)|0,i=i+Math.imul(C,he)|0,o=(o=o+Math.imul(C,de)|0)+Math.imul(S,he)|0,r=r+Math.imul(S,de)|0;var xe=(l+(i=i+Math.imul(_,pe)|0)|0)+((8191&(o=(o=o+Math.imul(_,ge)|0)+Math.imul(w,pe)|0))<<13)|0;l=((r=r+Math.imul(w,ge)|0)+(o>>>13)|0)+(xe>>>26)|0,xe&=67108863,i=Math.imul(z,$),o=(o=Math.imul(z,ee))+Math.imul(W,$)|0,r=Math.imul(W,ee),i=i+Math.imul(O,ne)|0,o=(o=o+Math.imul(O,ie)|0)+Math.imul(R,ne)|0,r=r+Math.imul(R,ie)|0,i=i+Math.imul(E,re)|0,o=(o=o+Math.imul(E,se)|0)+Math.imul(A,re)|0,r=r+Math.imul(A,se)|0,i=i+Math.imul(D,ue)|0,o=(o=o+Math.imul(D,le)|0)+Math.imul(k,ue)|0,r=r+Math.imul(k,le)|0,i=i+Math.imul(I,he)|0,o=(o=o+Math.imul(I,de)|0)+Math.imul(N,he)|0,r=r+Math.imul(N,de)|0;var De=(l+(i=i+Math.imul(C,pe)|0)|0)+((8191&(o=(o=o+Math.imul(C,ge)|0)+Math.imul(S,pe)|0))<<13)|0;l=((r=r+Math.imul(S,ge)|0)+(o>>>13)|0)+(De>>>26)|0,De&=67108863,i=Math.imul(z,ne),o=(o=Math.imul(z,ie))+Math.imul(W,ne)|0,r=Math.imul(W,ie),i=i+Math.imul(O,re)|0,o=(o=o+Math.imul(O,se)|0)+Math.imul(R,re)|0,r=r+Math.imul(R,se)|0,i=i+Math.imul(E,ue)|0,o=(o=o+Math.imul(E,le)|0)+Math.imul(A,ue)|0,r=r+Math.imul(A,le)|0,i=i+Math.imul(D,he)|0,o=(o=o+Math.imul(D,de)|0)+Math.imul(k,he)|0,r=r+Math.imul(k,de)|0;var ke=(l+(i=i+Math.imul(I,pe)|0)|0)+((8191&(o=(o=o+Math.imul(I,ge)|0)+Math.imul(N,pe)|0))<<13)|0;l=((r=r+Math.imul(N,ge)|0)+(o>>>13)|0)+(ke>>>26)|0,ke&=67108863,i=Math.imul(z,re),o=(o=Math.imul(z,se))+Math.imul(W,re)|0,r=Math.imul(W,se),i=i+Math.imul(O,ue)|0,o=(o=o+Math.imul(O,le)|0)+Math.imul(R,ue)|0,r=r+Math.imul(R,le)|0,i=i+Math.imul(E,he)|0,o=(o=o+Math.imul(E,de)|0)+Math.imul(A,he)|0,r=r+Math.imul(A,de)|0;var Te=(l+(i=i+Math.imul(D,pe)|0)|0)+((8191&(o=(o=o+Math.imul(D,ge)|0)+Math.imul(k,pe)|0))<<13)|0;l=((r=r+Math.imul(k,ge)|0)+(o>>>13)|0)+(Te>>>26)|0,Te&=67108863,i=Math.imul(z,ue),o=(o=Math.imul(z,le))+Math.imul(W,ue)|0,r=Math.imul(W,le),i=i+Math.imul(O,he)|0,o=(o=o+Math.imul(O,de)|0)+Math.imul(R,he)|0,r=r+Math.imul(R,de)|0;var Ee=(l+(i=i+Math.imul(E,pe)|0)|0)+((8191&(o=(o=o+Math.imul(E,ge)|0)+Math.imul(A,pe)|0))<<13)|0;l=((r=r+Math.imul(A,ge)|0)+(o>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,i=Math.imul(z,he),o=(o=Math.imul(z,de))+Math.imul(W,he)|0,r=Math.imul(W,de);var Ae=(l+(i=i+Math.imul(O,pe)|0)|0)+((8191&(o=(o=o+Math.imul(O,ge)|0)+Math.imul(R,pe)|0))<<13)|0;l=((r=r+Math.imul(R,ge)|0)+(o>>>13)|0)+(Ae>>>26)|0,Ae&=67108863;var je=(l+(i=Math.imul(z,pe))|0)+((8191&(o=(o=Math.imul(z,ge))+Math.imul(W,pe)|0))<<13)|0;return l=((r=Math.imul(W,ge))+(o>>>13)|0)+(je>>>26)|0,je&=67108863,u[0]=me,u[1]=ve,u[2]=ye,u[3]=be,u[4]=_e,u[5]=we,u[6]=Me,u[7]=Ce,u[8]=Se,u[9]=Le,u[10]=Ie,u[11]=Ne,u[12]=xe,u[13]=De,u[14]=ke,u[15]=Te,u[16]=Ee,u[17]=Ae,u[18]=je,0!==l&&(u[19]=l,n.length++),n};function v(e,t,n){n.negative=t.negative^e.negative,n.length=e.length+t.length;for(var i=0,o=0,r=0;r>>26)|0)>>>26,s&=67108863}n.words[r]=a,i=s,s=o}return 0!==i?n.words[r]=i:n.length--,n._strip()}function y(e,t,n){return v(e,t,n)}function b(e,t){this.x=e,this.y=t}Math.imul||(m=g),r.prototype.mulTo=function(e,t){var n=this.length+e.length;return 10===this.length&&10===e.length?m(this,e,t):n<63?g(this,e,t):n<1024?v(this,e,t):y(this,e,t)},b.prototype.makeRBT=function(e){for(var t=new Array(e),n=r.prototype._countBits(e)-1,i=0;i>=1;return i},b.prototype.permute=function(e,t,n,i,o,r){for(var s=0;s>>=1)o++;return 1<>>=13,n[2*s+1]=8191&r,r>>>=13;for(s=2*t;s>=26,n+=r/67108864|0,n+=s>>>26,this.words[o]=67108863&s}return 0!==n&&(this.words[o]=n,this.length++),t?this.ineg():this},r.prototype.muln=function(e){return this.clone().imuln(e)},r.prototype.sqr=function(){return this.mul(this)},r.prototype.isqr=function(){return this.imul(this.clone())},r.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),n=0;n>>o&1}return t}(e);if(0===t.length)return new r(1);for(var n=this,i=0;i=0);var t,n=e%26,o=(e-n)/26,r=67108863>>>26-n<<26-n;if(0!==n){var s=0;for(t=0;t>>26-n}s&&(this.words[t]=s,this.length++)}if(0!==o){for(t=this.length-1;t>=0;t--)this.words[t+o]=this.words[t];for(t=0;t=0),o=t?(t-t%26)/26:0;var r=e%26,s=Math.min((e-r)/26,this.length),a=67108863^67108863>>>r<s)for(this.length-=s,l=0;l=0&&(0!==c||l>=o);l--){var h=0|this.words[l];this.words[l]=c<<26-r|h>>>r,c=h&a}return u&&0!==c&&(u.words[u.length++]=c),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},r.prototype.ishrn=function(e,t,n){return i(0===this.negative),this.iushrn(e,t,n)},r.prototype.shln=function(e){return this.clone().ishln(e)},r.prototype.ushln=function(e){return this.clone().iushln(e)},r.prototype.shrn=function(e){return this.clone().ishrn(e)},r.prototype.ushrn=function(e){return this.clone().iushrn(e)},r.prototype.testn=function(e){i("number"==typeof e&&e>=0);var t=e%26,n=(e-t)/26,o=1<=0);var t=e%26,n=(e-t)/26;if(i(0===this.negative,"imaskn works only with positive numbers"),this.length<=n)return this;if(0!==t&&n++,this.length=Math.min(n,this.length),0!==t){var o=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},r.prototype.isubn=function(e){if(i("number"==typeof e),i(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(u/67108864|0),this.words[o+n]=67108863&r}for(;o>26,this.words[o+n]=67108863&r;if(0===a)return this._strip();for(i(-1===a),a=0,o=0;o>26,this.words[o]=67108863&r;return this.negative=1,this._strip()},r.prototype._wordDiv=function(e,t){var n=(this.length,e.length),i=this.clone(),o=e,s=0|o.words[o.length-1];0!=(n=26-this._countBits(s))&&(o=o.ushln(n),i.iushln(n),s=0|o.words[o.length-1]);var a,u=i.length-o.length;if("mod"!==t){(a=new r(null)).length=u+1,a.words=new Array(a.length);for(var l=0;l=0;h--){var d=67108864*(0|i.words[o.length+h])+(0|i.words[o.length+h-1]);for(d=Math.min(d/s|0,67108863),i._ishlnsubmul(o,d,h);0!==i.negative;)d--,i.negative=0,i._ishlnsubmul(o,1,h),i.isZero()||(i.negative^=1);a&&(a.words[h]=d)}return a&&a._strip(),i._strip(),"div"!==t&&0!==n&&i.iushrn(n),{div:a||null,mod:i}},r.prototype.divmod=function(e,t,n){return i(!e.isZero()),this.isZero()?{div:new r(0),mod:new r(0)}:0!==this.negative&&0===e.negative?(a=this.neg().divmod(e,t),"mod"!==t&&(o=a.div.neg()),"div"!==t&&(s=a.mod.neg(),n&&0!==s.negative&&s.iadd(e)),{div:o,mod:s}):0===this.negative&&0!==e.negative?(a=this.divmod(e.neg(),t),"mod"!==t&&(o=a.div.neg()),{div:o,mod:a.mod}):this.negative&e.negative?(a=this.neg().divmod(e.neg(),t),"div"!==t&&(s=a.mod.neg(),n&&0!==s.negative&&s.isub(e)),{div:a.div,mod:s}):e.length>this.length||this.cmp(e)<0?{div:new r(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new r(this.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new r(this.modrn(e.words[0]))}:this._wordDiv(e,t);var o,s,a},r.prototype.div=function(e){return this.divmod(e,"div",!1).div},r.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},r.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},r.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var n=0!==t.div.negative?t.mod.isub(e):t.mod,i=e.ushrn(1),o=e.andln(1),r=n.cmp(i);return r<0||1===o&&0===r?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},r.prototype.modrn=function(e){var t=e<0;t&&(e=-e),i(e<=67108863);for(var n=(1<<26)%e,o=0,r=this.length-1;r>=0;r--)o=(n*o+(0|this.words[r]))%e;return t?-o:o},r.prototype.modn=function(e){return this.modrn(e)},r.prototype.idivn=function(e){var t=e<0;t&&(e=-e),i(e<=67108863);for(var n=0,o=this.length-1;o>=0;o--){var r=(0|this.words[o])+67108864*n;this.words[o]=r/e|0,n=r%e}return this._strip(),t?this.ineg():this},r.prototype.divn=function(e){return this.clone().idivn(e)},r.prototype.egcd=function(e){i(0===e.negative),i(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var o=new r(1),s=new r(0),a=new r(0),u=new r(1),l=0;t.isEven()&&n.isEven();)t.iushrn(1),n.iushrn(1),++l;for(var c=n.clone(),h=t.clone();!t.isZero();){for(var d=0,f=1;!(t.words[0]&f)&&d<26;++d,f<<=1);if(d>0)for(t.iushrn(d);d-- >0;)(o.isOdd()||s.isOdd())&&(o.iadd(c),s.isub(h)),o.iushrn(1),s.iushrn(1);for(var p=0,g=1;!(n.words[0]&g)&&p<26;++p,g<<=1);if(p>0)for(n.iushrn(p);p-- >0;)(a.isOdd()||u.isOdd())&&(a.iadd(c),u.isub(h)),a.iushrn(1),u.iushrn(1);t.cmp(n)>=0?(t.isub(n),o.isub(a),s.isub(u)):(n.isub(t),a.isub(o),u.isub(s))}return{a,b:u,gcd:n.iushln(l)}},r.prototype._invmp=function(e){i(0===e.negative),i(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var o,s=new r(1),a=new r(0),u=n.clone();t.cmpn(1)>0&&n.cmpn(1)>0;){for(var l=0,c=1;!(t.words[0]&c)&&l<26;++l,c<<=1);if(l>0)for(t.iushrn(l);l-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);for(var h=0,d=1;!(n.words[0]&d)&&h<26;++h,d<<=1);if(h>0)for(n.iushrn(h);h-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);t.cmp(n)>=0?(t.isub(n),s.isub(a)):(n.isub(t),a.isub(s))}return(o=0===t.cmpn(1)?s:a).cmpn(0)<0&&o.iadd(e),o},r.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),n=e.clone();t.negative=0,n.negative=0;for(var i=0;t.isEven()&&n.isEven();i++)t.iushrn(1),n.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;n.isEven();)n.iushrn(1);var o=t.cmp(n);if(o<0){var r=t;t=n,n=r}else if(0===o||0===n.cmpn(1))break;t.isub(n)}return n.iushln(i)},r.prototype.invm=function(e){return this.egcd(e).a.umod(e)},r.prototype.isEven=function(){return!(1&this.words[0])},r.prototype.isOdd=function(){return!(1&~this.words[0])},r.prototype.andln=function(e){return this.words[0]&e},r.prototype.bincn=function(e){i("number"==typeof e);var t=e%26,n=(e-t)/26,o=1<>>26,a&=67108863,this.words[s]=a}return 0!==r&&(this.words[s]=r,this.length++),this},r.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},r.prototype.cmpn=function(e){var t,n=e<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this._strip(),this.length>1)t=1;else{n&&(e=-e),i(e<=67108863,"Number is too big");var o=0|this.words[0];t=o===e?0:oe.length)return 1;if(this.length=0;n--){var i=0|this.words[n],o=0|e.words[n];if(i!==o){io&&(t=1);break}}return t},r.prototype.gtn=function(e){return 1===this.cmpn(e)},r.prototype.gt=function(e){return 1===this.cmp(e)},r.prototype.gten=function(e){return this.cmpn(e)>=0},r.prototype.gte=function(e){return this.cmp(e)>=0},r.prototype.ltn=function(e){return-1===this.cmpn(e)},r.prototype.lt=function(e){return-1===this.cmp(e)},r.prototype.lten=function(e){return this.cmpn(e)<=0},r.prototype.lte=function(e){return this.cmp(e)<=0},r.prototype.eqn=function(e){return 0===this.cmpn(e)},r.prototype.eq=function(e){return 0===this.cmp(e)},r.red=function(e){return new I(e)},r.prototype.toRed=function(e){return i(!this.red,"Already a number in reduction context"),i(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},r.prototype.fromRed=function(){return i(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},r.prototype._forceRed=function(e){return this.red=e,this},r.prototype.forceRed=function(e){return i(!this.red,"Already a number in reduction context"),this._forceRed(e)},r.prototype.redAdd=function(e){return i(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},r.prototype.redIAdd=function(e){return i(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},r.prototype.redSub=function(e){return i(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},r.prototype.redISub=function(e){return i(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},r.prototype.redShl=function(e){return i(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},r.prototype.redMul=function(e){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},r.prototype.redIMul=function(e){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},r.prototype.redSqr=function(){return i(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},r.prototype.redISqr=function(){return i(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},r.prototype.redSqrt=function(){return i(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},r.prototype.redInvm=function(){return i(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},r.prototype.redNeg=function(){return i(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},r.prototype.redPow=function(e){return i(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var _={k256:null,p224:null,p192:null,p25519:null};function w(e,t){this.name=e,this.p=new r(t,16),this.n=this.p.bitLength(),this.k=new r(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function M(){w.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function C(){w.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function S(){w.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function L(){w.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function I(e){if("string"==typeof e){var t=r._prime(e);this.m=t.p,this.prime=t}else i(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function N(e){I.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new r(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}w.prototype._tmp=function(){var e=new r(null);return e.words=new Array(Math.ceil(this.n/13)),e},w.prototype.ireduce=function(e){var t,n=e;do{this.split(n,this.tmp),t=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(t>this.n);var i=t0?n.isub(this.p):void 0!==n.strip?n.strip():n._strip(),n},w.prototype.split=function(e,t){e.iushrn(this.n,0,t)},w.prototype.imulK=function(e){return e.imul(this.k)},o(M,w),M.prototype.split=function(e,t){for(var n=4194303,i=Math.min(e.length,9),o=0;o>>22,r=s}r>>>=22,e.words[o-10]=r,0===r&&e.length>10?e.length-=10:e.length-=9},M.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,n=0;n>>=26,e.words[n]=o,t=i}return 0!==t&&(e.words[e.length++]=t),e},r._prime=function(e){if(_[e])return _[e];var t;if("k256"===e)t=new M;else if("p224"===e)t=new C;else if("p192"===e)t=new S;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new L}return _[e]=t,t},I.prototype._verify1=function(e){i(0===e.negative,"red works only with positives"),i(e.red,"red works only with red numbers")},I.prototype._verify2=function(e,t){i(!(e.negative|t.negative),"red works only with positives"),i(e.red&&e.red===t.red,"red works only with red numbers")},I.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):(c(e,e.umod(this.m)._forceRed(this)),e)},I.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},I.prototype.add=function(e,t){this._verify2(e,t);var n=e.add(t);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},I.prototype.iadd=function(e,t){this._verify2(e,t);var n=e.iadd(t);return n.cmp(this.m)>=0&&n.isub(this.m),n},I.prototype.sub=function(e,t){this._verify2(e,t);var n=e.sub(t);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},I.prototype.isub=function(e,t){this._verify2(e,t);var n=e.isub(t);return n.cmpn(0)<0&&n.iadd(this.m),n},I.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},I.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},I.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},I.prototype.isqr=function(e){return this.imul(e,e.clone())},I.prototype.sqr=function(e){return this.mul(e,e)},I.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(i(t%2==1),3===t){var n=this.m.add(new r(1)).iushrn(2);return this.pow(e,n)}for(var o=this.m.subn(1),s=0;!o.isZero()&&0===o.andln(1);)s++,o.iushrn(1);i(!o.isZero());var a=new r(1).toRed(this),u=a.redNeg(),l=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new r(2*c*c).toRed(this);0!==this.pow(c,l).cmp(u);)c.redIAdd(u);for(var h=this.pow(c,o),d=this.pow(e,o.addn(1).iushrn(1)),f=this.pow(e,o),p=s;0!==f.cmp(a);){for(var g=f,m=0;0!==g.cmp(a);m++)g=g.redSqr();i(m=0;i--){for(var l=t.words[i],c=u-1;c>=0;c--){var h=l>>c&1;o!==n[0]&&(o=this.sqr(o)),0!==h||0!==s?(s<<=1,s|=h,(4==++a||0===i&&0===c)&&(o=this.mul(o,n[s]),a=0,s=0)):a=0}u=26}return o},I.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},I.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},r.mont=function(e){return new N(e)},o(N,I),N.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},N.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},N.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var n=e.imul(t),i=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=n.isub(i).iushrn(this.shift),r=o;return o.cmp(this.m)>=0?r=o.isub(this.m):o.cmpn(0)<0&&(r=o.iadd(this.m)),r._forceRed(this)},N.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new r(0)._forceRed(this);var n=e.mul(t),i=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=n.isub(i).iushrn(this.shift),s=o;return o.cmp(this.m)>=0?s=o.isub(this.m):o.cmpn(0)<0&&(s=o.iadd(this.m)),s._forceRed(this)},N.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=n.nmd(e),this)},4366:(e,t,n)=>{var i;function o(e){this.rand=e}if(e.exports=function(e){return i||(i=new o(null)),i.generate(e)},e.exports.Rand=o,o.prototype.generate=function(e){return this._rand(e)},o.prototype._rand=function(e){if(this.rand.getBytes)return this.rand.getBytes(e);for(var t=new Uint8Array(e),n=0;n{var i=n(2238).Buffer;function o(e){i.isBuffer(e)||(e=i.from(e));for(var t=e.length/4|0,n=new Array(t),o=0;o>>24]^c[p>>>16&255]^h[g>>>8&255]^d[255&m]^t[v++],s=l[p>>>24]^c[g>>>16&255]^h[m>>>8&255]^d[255&f]^t[v++],a=l[g>>>24]^c[m>>>16&255]^h[f>>>8&255]^d[255&p]^t[v++],u=l[m>>>24]^c[f>>>16&255]^h[p>>>8&255]^d[255&g]^t[v++],f=r,p=s,g=a,m=u;return r=(i[f>>>24]<<24|i[p>>>16&255]<<16|i[g>>>8&255]<<8|i[255&m])^t[v++],s=(i[p>>>24]<<24|i[g>>>16&255]<<16|i[m>>>8&255]<<8|i[255&f])^t[v++],a=(i[g>>>24]<<24|i[m>>>16&255]<<16|i[f>>>8&255]<<8|i[255&p])^t[v++],u=(i[m>>>24]<<24|i[f>>>16&255]<<16|i[p>>>8&255]<<8|i[255&g])^t[v++],[r>>>=0,s>>>=0,a>>>=0,u>>>=0]}var a=[0,1,2,4,8,16,32,64,128,27,54],u=function(){for(var e=new Array(256),t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;for(var n=[],i=[],o=[[],[],[],[]],r=[[],[],[],[]],s=0,a=0,u=0;u<256;++u){var l=a^a<<1^a<<2^a<<3^a<<4;l=l>>>8^255&l^99,n[s]=l,i[l]=s;var c=e[s],h=e[c],d=e[h],f=257*e[l]^16843008*l;o[0][s]=f<<24|f>>>8,o[1][s]=f<<16|f>>>16,o[2][s]=f<<8|f>>>24,o[3][s]=f,f=16843009*d^65537*h^257*c^16843008*s,r[0][l]=f<<24|f>>>8,r[1][l]=f<<16|f>>>16,r[2][l]=f<<8|f>>>24,r[3][l]=f,0===s?s=a=1:(s=c^e[e[e[d^c]]],a^=e[e[a]])}return{SBOX:n,INV_SBOX:i,SUB_MIX:o,INV_SUB_MIX:r}}();function l(e){this._key=o(e),this._reset()}l.blockSize=16,l.keySize=32,l.prototype.blockSize=l.blockSize,l.prototype.keySize=l.keySize,l.prototype._reset=function(){for(var e=this._key,t=e.length,n=t+6,i=4*(n+1),o=[],r=0;r>>24,s=u.SBOX[s>>>24]<<24|u.SBOX[s>>>16&255]<<16|u.SBOX[s>>>8&255]<<8|u.SBOX[255&s],s^=a[r/t|0]<<24):t>6&&r%t==4&&(s=u.SBOX[s>>>24]<<24|u.SBOX[s>>>16&255]<<16|u.SBOX[s>>>8&255]<<8|u.SBOX[255&s]),o[r]=o[r-t]^s}for(var l=[],c=0;c>>24]]^u.INV_SUB_MIX[1][u.SBOX[d>>>16&255]]^u.INV_SUB_MIX[2][u.SBOX[d>>>8&255]]^u.INV_SUB_MIX[3][u.SBOX[255&d]]}this._nRounds=n,this._keySchedule=o,this._invKeySchedule=l},l.prototype.encryptBlockRaw=function(e){return s(e=o(e),this._keySchedule,u.SUB_MIX,u.SBOX,this._nRounds)},l.prototype.encryptBlock=function(e){var t=this.encryptBlockRaw(e),n=i.allocUnsafe(16);return n.writeUInt32BE(t[0],0),n.writeUInt32BE(t[1],4),n.writeUInt32BE(t[2],8),n.writeUInt32BE(t[3],12),n},l.prototype.decryptBlock=function(e){var t=(e=o(e))[1];e[1]=e[3],e[3]=t;var n=s(e,this._invKeySchedule,u.INV_SUB_MIX,u.INV_SBOX,this._nRounds),r=i.allocUnsafe(16);return r.writeUInt32BE(n[0],0),r.writeUInt32BE(n[3],4),r.writeUInt32BE(n[2],8),r.writeUInt32BE(n[1],12),r},l.prototype.scrub=function(){r(this._keySchedule),r(this._invKeySchedule),r(this._key)},e.exports.AES=l},8843:(e,t,n)=>{var i=n(7495),o=n(2238).Buffer,r=n(8511),s=n(9385),a=n(8893),u=n(2362),l=n(8317);function c(e,t,n,s){r.call(this);var u=o.alloc(4,0);this._cipher=new i.AES(t);var c=this._cipher.encryptBlock(u);this._ghash=new a(c),n=function(e,t,n){if(12===t.length)return e._finID=o.concat([t,o.from([0,0,0,1])]),o.concat([t,o.from([0,0,0,2])]);var i=new a(n),r=t.length,s=r%16;i.update(t),s&&(s=16-s,i.update(o.alloc(s,0))),i.update(o.alloc(8,0));var u=8*r,c=o.alloc(8);c.writeUIntBE(u,0,8),i.update(c),e._finID=i.state;var h=o.from(e._finID);return l(h),h}(this,n,c),this._prev=o.from(n),this._cache=o.allocUnsafe(0),this._secCache=o.allocUnsafe(0),this._decrypt=s,this._alen=0,this._len=0,this._mode=e,this._authTag=null,this._called=!1}s(c,r),c.prototype._update=function(e){if(!this._called&&this._alen){var t=16-this._alen%16;t<16&&(t=o.alloc(t,0),this._ghash.update(t))}this._called=!0;var n=this._mode.encrypt(this,e);return this._decrypt?this._ghash.update(e):this._ghash.update(n),this._len+=e.length,n},c.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var e=u(this._ghash.final(8*this._alen,8*this._len),this._cipher.encryptBlock(this._finID));if(this._decrypt&&function(e,t){var n=0;e.length!==t.length&&n++;for(var i=Math.min(e.length,t.length),o=0;o{var i=n(7790),o=n(3526),r=n(3219);t.createCipher=t.Cipher=i.createCipher,t.createCipheriv=t.Cipheriv=i.createCipheriv,t.createDecipher=t.Decipher=o.createDecipher,t.createDecipheriv=t.Decipheriv=o.createDecipheriv,t.listCiphers=t.getCiphers=function(){return Object.keys(r)}},3526:(e,t,n)=>{var i=n(8843),o=n(2238).Buffer,r=n(7943),s=n(9965),a=n(8511),u=n(7495),l=n(8819);function c(e,t,n){a.call(this),this._cache=new h,this._last=void 0,this._cipher=new u.AES(t),this._prev=o.from(n),this._mode=e,this._autopadding=!0}function h(){this.cache=o.allocUnsafe(0)}function d(e,t,n){var a=r[e.toLowerCase()];if(!a)throw new TypeError("invalid suite type");if("string"==typeof n&&(n=o.from(n)),"GCM"!==a.mode&&n.length!==a.iv)throw new TypeError("invalid iv length "+n.length);if("string"==typeof t&&(t=o.from(t)),t.length!==a.key/8)throw new TypeError("invalid key length "+t.length);return"stream"===a.type?new s(a.module,t,n,!0):"auth"===a.type?new i(a.module,t,n,!0):new c(a.module,t,n)}n(9385)(c,a),c.prototype._update=function(e){var t,n;this._cache.add(e);for(var i=[];t=this._cache.get(this._autopadding);)n=this._mode.decrypt(this,t),i.push(n);return o.concat(i)},c.prototype._final=function(){var e=this._cache.flush();if(this._autopadding)return function(e){var t=e[15];if(t<1||t>16)throw new Error("unable to decrypt data");for(var n=-1;++n16)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t}else if(this.cache.length>=16)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t;return null},h.prototype.flush=function(){if(this.cache.length)return this.cache},t.createDecipher=function(e,t){var n=r[e.toLowerCase()];if(!n)throw new TypeError("invalid suite type");var i=l(t,!1,n.key,n.iv);return d(e,i.key,i.iv)},t.createDecipheriv=d},7790:(e,t,n)=>{var i=n(7943),o=n(8843),r=n(2238).Buffer,s=n(9965),a=n(8511),u=n(7495),l=n(8819);function c(e,t,n){a.call(this),this._cache=new d,this._cipher=new u.AES(t),this._prev=r.from(n),this._mode=e,this._autopadding=!0}n(9385)(c,a),c.prototype._update=function(e){var t,n;this._cache.add(e);for(var i=[];t=this._cache.get();)n=this._mode.encrypt(this,t),i.push(n);return r.concat(i)};var h=r.alloc(16,16);function d(){this.cache=r.allocUnsafe(0)}function f(e,t,n){var a=i[e.toLowerCase()];if(!a)throw new TypeError("invalid suite type");if("string"==typeof t&&(t=r.from(t)),t.length!==a.key/8)throw new TypeError("invalid key length "+t.length);if("string"==typeof n&&(n=r.from(n)),"GCM"!==a.mode&&n.length!==a.iv)throw new TypeError("invalid iv length "+n.length);return"stream"===a.type?new s(a.module,t,n):"auth"===a.type?new o(a.module,t,n):new c(a.module,t,n)}c.prototype._final=function(){var e=this._cache.flush();if(this._autopadding)return e=this._mode.encrypt(this,e),this._cipher.scrub(),e;if(!e.equals(h))throw this._cipher.scrub(),new Error("data not multiple of block length")},c.prototype.setAutoPadding=function(e){return this._autopadding=!!e,this},d.prototype.add=function(e){this.cache=r.concat([this.cache,e])},d.prototype.get=function(){if(this.cache.length>15){var e=this.cache.slice(0,16);return this.cache=this.cache.slice(16),e}return null},d.prototype.flush=function(){for(var e=16-this.cache.length,t=r.allocUnsafe(e),n=-1;++n{var i=n(2238).Buffer,o=i.alloc(16,0);function r(e){var t=i.allocUnsafe(16);return t.writeUInt32BE(e[0]>>>0,0),t.writeUInt32BE(e[1]>>>0,4),t.writeUInt32BE(e[2]>>>0,8),t.writeUInt32BE(e[3]>>>0,12),t}function s(e){this.h=e,this.state=i.alloc(16,0),this.cache=i.allocUnsafe(0)}s.prototype.ghash=function(e){for(var t=-1;++t0;t--)i[t]=i[t]>>>1|(1&i[t-1])<<31;i[0]=i[0]>>>1,n&&(i[0]=i[0]^225<<24)}this.state=r(o)},s.prototype.update=function(e){var t;for(this.cache=i.concat([this.cache,e]);this.cache.length>=16;)t=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(t)},s.prototype.final=function(e,t){return this.cache.length&&this.ghash(i.concat([this.cache,o],16)),this.ghash(r([0,e,0,t])),this.state},e.exports=s},8317:e=>{e.exports=function(e){for(var t,n=e.length;n--;){if(255!==(t=e.readUInt8(n))){t++,e.writeUInt8(t,n);break}e.writeUInt8(0,n)}}},2981:(e,t,n)=>{var i=n(2362);t.encrypt=function(e,t){var n=i(t,e._prev);return e._prev=e._cipher.encryptBlock(n),e._prev},t.decrypt=function(e,t){var n=e._prev;e._prev=t;var o=e._cipher.decryptBlock(t);return i(o,n)}},4546:(e,t,n)=>{var i=n(2238).Buffer,o=n(2362);function r(e,t,n){var r=t.length,s=o(t,e._cache);return e._cache=e._cache.slice(r),e._prev=i.concat([e._prev,n?t:s]),s}t.encrypt=function(e,t,n){for(var o,s=i.allocUnsafe(0);t.length;){if(0===e._cache.length&&(e._cache=e._cipher.encryptBlock(e._prev),e._prev=i.allocUnsafe(0)),!(e._cache.length<=t.length)){s=i.concat([s,r(e,t,n)]);break}o=e._cache.length,s=i.concat([s,r(e,t.slice(0,o),n)]),t=t.slice(o)}return s}},6479:(e,t,n)=>{var i=n(2238).Buffer;function o(e,t,n){for(var i,o,s=-1,a=0;++s<8;)i=t&1<<7-s?128:0,a+=(128&(o=e._cipher.encryptBlock(e._prev)[0]^i))>>s%8,e._prev=r(e._prev,n?i:o);return a}function r(e,t){var n=e.length,o=-1,r=i.allocUnsafe(e.length);for(e=i.concat([e,i.from([t])]);++o>7;return r}t.encrypt=function(e,t,n){for(var r=t.length,s=i.allocUnsafe(r),a=-1;++a{var i=n(2238).Buffer;function o(e,t,n){var o=e._cipher.encryptBlock(e._prev)[0]^t;return e._prev=i.concat([e._prev.slice(1),i.from([n?t:o])]),o}t.encrypt=function(e,t,n){for(var r=t.length,s=i.allocUnsafe(r),a=-1;++a{var i=n(2362),o=n(2238).Buffer,r=n(8317);function s(e){var t=e._cipher.encryptBlockRaw(e._prev);return r(e._prev),t}t.encrypt=function(e,t){var n=Math.ceil(t.length/16),r=e._cache.length;e._cache=o.concat([e._cache,o.allocUnsafe(16*n)]);for(var a=0;a{t.encrypt=function(e,t){return e._cipher.encryptBlock(t)},t.decrypt=function(e,t){return e._cipher.decryptBlock(t)}},7943:(e,t,n)=>{var i={ECB:n(5593),CBC:n(2981),CFB:n(4546),CFB8:n(1584),CFB1:n(6479),OFB:n(1878),CTR:n(3872),GCM:n(3872)},o=n(3219);for(var r in o)o[r].module=i[o[r].mode];e.exports=o},1878:(e,t,n)=>{var i=n(1278).Buffer,o=n(2362);function r(e){return e._prev=e._cipher.encryptBlock(e._prev),e._prev}t.encrypt=function(e,t){for(;e._cache.length{var i=n(7495),o=n(2238).Buffer,r=n(8511);function s(e,t,n,s){r.call(this),this._cipher=new i.AES(t),this._prev=o.from(n),this._cache=o.allocUnsafe(0),this._secCache=o.allocUnsafe(0),this._decrypt=s,this._mode=e}n(9385)(s,r),s.prototype._update=function(e){return this._mode.encrypt(this,e,this._decrypt)},s.prototype._final=function(){this._cipher.scrub()},e.exports=s},7070:(e,t,n)=>{var i=n(7319),o=n(8668),r=n(7943),s=n(5859),a=n(8819);function u(e,t,n){if(e=e.toLowerCase(),r[e])return o.createCipheriv(e,t,n);if(s[e])return new i({key:t,iv:n,mode:e});throw new TypeError("invalid suite type")}function l(e,t,n){if(e=e.toLowerCase(),r[e])return o.createDecipheriv(e,t,n);if(s[e])return new i({key:t,iv:n,mode:e,decrypt:!0});throw new TypeError("invalid suite type")}t.createCipher=t.Cipher=function(e,t){var n,i;if(e=e.toLowerCase(),r[e])n=r[e].key,i=r[e].iv;else{if(!s[e])throw new TypeError("invalid suite type");n=8*s[e].key,i=s[e].iv}var o=a(t,!1,n,i);return u(e,o.key,o.iv)},t.createCipheriv=t.Cipheriv=u,t.createDecipher=t.Decipher=function(e,t){var n,i;if(e=e.toLowerCase(),r[e])n=r[e].key,i=r[e].iv;else{if(!s[e])throw new TypeError("invalid suite type");n=8*s[e].key,i=s[e].iv}var o=a(t,!1,n,i);return l(e,o.key,o.iv)},t.createDecipheriv=t.Decipheriv=l,t.listCiphers=t.getCiphers=function(){return Object.keys(s).concat(o.getCiphers())}},7319:(e,t,n)=>{var i=n(8511),o=n(2205),r=n(9385),s=n(2238).Buffer,a={"des-ede3-cbc":o.CBC.instantiate(o.EDE),"des-ede3":o.EDE,"des-ede-cbc":o.CBC.instantiate(o.EDE),"des-ede":o.EDE,"des-cbc":o.CBC.instantiate(o.DES),"des-ecb":o.DES};function u(e){i.call(this);var t,n=e.mode.toLowerCase(),o=a[n];t=e.decrypt?"decrypt":"encrypt";var r=e.key;s.isBuffer(r)||(r=s.from(r)),"des-ede"!==n&&"des-ede-cbc"!==n||(r=s.concat([r,r.slice(0,8)]));var u=e.iv;s.isBuffer(u)||(u=s.from(u)),this._des=o.create({key:r,iv:u,type:t})}a.des=a["des-cbc"],a.des3=a["des-ede3-cbc"],e.exports=u,r(u,i),u.prototype._update=function(e){return s.from(this._des.update(e))},u.prototype._final=function(){return s.from(this._des.final())}},5859:(e,t)=>{t["des-ecb"]={key:8,iv:0},t["des-cbc"]=t.des={key:8,iv:8},t["des-ede3-cbc"]=t.des3={key:24,iv:8},t["des-ede3"]={key:24,iv:0},t["des-ede-cbc"]={key:16,iv:8},t["des-ede"]={key:16,iv:0}},8470:(e,t,n)=>{var i=n(1278).Buffer,o=n(4917),r=n(8190);function s(e){var t,n=e.modulus.byteLength();do{t=new o(r(n))}while(t.cmp(e.modulus)>=0||!t.umod(e.prime1)||!t.umod(e.prime2));return t}function a(e,t){var n=function(e){var t=s(e);return{blinder:t.toRed(o.mont(e.modulus)).redPow(new o(e.publicExponent)).fromRed(),unblinder:t.invm(e.modulus)}}(t),r=t.modulus.byteLength(),a=new o(e).mul(n.blinder).umod(t.modulus),u=a.toRed(o.mont(t.prime1)),l=a.toRed(o.mont(t.prime2)),c=t.coefficient,h=t.prime1,d=t.prime2,f=u.redPow(t.exponent1).fromRed(),p=l.redPow(t.exponent2).fromRed(),g=f.isub(p).imul(c).umod(h).imul(d);return p.iadd(g).imul(n.unblinder).umod(t.modulus).toArrayLike(i,"be",r)}a.getr=s,e.exports=a},4136:(e,t,n)=>{"use strict";e.exports=n(2951)},455:(e,t,n)=>{"use strict";var i=n(9526).Buffer,o=n(2059),r=n(7462),s=n(2465),a=n(7134),u=n(1698),l=n(2951);function c(e){r.Writable.call(this);var t=l[e];if(!t)throw new Error("Unknown message digest");this._hashType=t.hash,this._hash=o(t.hash),this._tag=t.id,this._signType=t.sign}function h(e){r.Writable.call(this);var t=l[e];if(!t)throw new Error("Unknown message digest");this._hash=o(t.hash),this._tag=t.id,this._signType=t.sign}function d(e){return new c(e)}function f(e){return new h(e)}Object.keys(l).forEach((function(e){l[e].id=i.from(l[e].id,"hex"),l[e.toLowerCase()]=l[e]})),s(c,r.Writable),c.prototype._write=function(e,t,n){this._hash.update(e),n()},c.prototype.update=function(e,t){return this._hash.update("string"==typeof e?i.from(e,t):e),this},c.prototype.sign=function(e,t){this.end();var n=this._hash.digest(),i=a(n,e,this._hashType,this._signType,this._tag);return t?i.toString(t):i},s(h,r.Writable),h.prototype._write=function(e,t,n){this._hash.update(e),n()},h.prototype.update=function(e,t){return this._hash.update("string"==typeof e?i.from(e,t):e),this},h.prototype.verify=function(e,t,n){var o="string"==typeof t?i.from(t,n):t;this.end();var r=this._hash.digest();return u(o,r,e,this._signType,this._tag)},e.exports={Sign:d,Verify:f,createSign:d,createVerify:f}},7134:(e,t,n)=>{"use strict";var i=n(9526).Buffer,o=n(8080),r=n(8470),s=n(9478).ec,a=n(4917),u=n(5891),l=n(4589);function c(e,t,n,r){if((e=i.from(e.toArray())).length0&&n.ishrn(i),n}function d(e,t,n){var r,s;do{for(r=i.alloc(0);8*r.length{"use strict";var i=n(9526).Buffer,o=n(4917),r=n(9478).ec,s=n(5891),a=n(4589);function u(e,t){if(e.cmpn(0)<=0)throw new Error("invalid sig");if(e.cmp(t)>=0)throw new Error("invalid sig")}e.exports=function(e,t,n,l,c){var h=s(n);if("ec"===h.type){if("ecdsa"!==l&&"ecdsa/rsa"!==l)throw new Error("wrong public key type");return function(e,t,n){var i=a[n.data.algorithm.curve.join(".")];if(!i)throw new Error("unknown curve "+n.data.algorithm.curve.join("."));var o=new r(i),s=n.data.subjectPrivateKey.data;return o.verify(t,e,s)}(e,t,h)}if("dsa"===h.type){if("dsa"!==l)throw new Error("wrong public key type");return function(e,t,n){var i=n.data.p,r=n.data.q,a=n.data.g,l=n.data.pub_key,c=s.signature.decode(e,"der"),h=c.s,d=c.r;u(h,r),u(d,r);var f=o.mont(i),p=h.invm(r);return 0===a.toRed(f).redPow(new o(t).mul(p).mod(r)).fromRed().mul(l.toRed(f).redPow(d.mul(p).mod(r)).fromRed()).mod(i).mod(r).cmp(d)}(e,t,h)}if("rsa"!==l&&"ecdsa/rsa"!==l)throw new Error("wrong public key type");t=i.concat([c,t]);for(var d=h.modulus.byteLength(),f=[1],p=0;t.length+f.length+2{"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}},9526:(e,t,n)=>{var i=n(1278),o=i.Buffer;function r(e,t){for(var n in e)t[n]=e[n]}function s(e,t,n){return o(e,t,n)}o.from&&o.alloc&&o.allocUnsafe&&o.allocUnsafeSlow?e.exports=i:(r(i,t),t.Buffer=s),s.prototype=Object.create(o.prototype),r(o,s),s.from=function(e,t,n){if("number"==typeof e)throw new TypeError("Argument must not be a number");return o(e,t,n)},s.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError("Argument must be a number");var i=o(e);return void 0!==t?"string"==typeof n?i.fill(t,n):i.fill(t):i.fill(0),i},s.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return o(e)},s.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i.SlowBuffer(e)}},2362:(e,t,n)=>{var i=n(1278).Buffer;e.exports=function(e,t){for(var n=Math.min(e.length,t.length),o=new i(n),r=0;r{"use strict";const i=n(1117),o=n(2804),r="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=u,t.SlowBuffer=function(e){return+e!=e&&(e=0),u.alloc(+e)},t.INSPECT_MAX_BYTES=50;const s=2147483647;function a(e){if(e>s)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,u.prototype),t}function u(e,t,n){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return h(e)}return l(e,t,n)}function l(e,t,n){if("string"==typeof e)return function(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!u.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const n=0|g(e,t);let i=a(n);const o=i.write(e,t);return o!==n&&(i=i.slice(0,o)),i}(e,t);if(ArrayBuffer.isView(e))return function(e){if(q(e,Uint8Array)){const t=new Uint8Array(e);return f(t.buffer,t.byteOffset,t.byteLength)}return d(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(q(e,ArrayBuffer)||e&&q(e.buffer,ArrayBuffer))return f(e,t,n);if("undefined"!=typeof SharedArrayBuffer&&(q(e,SharedArrayBuffer)||e&&q(e.buffer,SharedArrayBuffer)))return f(e,t,n);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const i=e.valueOf&&e.valueOf();if(null!=i&&i!==e)return u.from(i,t,n);const o=function(e){if(u.isBuffer(e)){const t=0|p(e.length),n=a(t);return 0===n.length||e.copy(n,0,0,t),n}return void 0!==e.length?"number"!=typeof e.length||K(e.length)?a(0):d(e):"Buffer"===e.type&&Array.isArray(e.data)?d(e.data):void 0}(e);if(o)return o;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return u.from(e[Symbol.toPrimitive]("string"),t,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function c(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function h(e){return c(e),a(e<0?0:0|p(e))}function d(e){const t=e.length<0?0:0|p(e.length),n=a(t);for(let i=0;i=s)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s.toString(16)+" bytes");return 0|e}function g(e,t){if(u.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||q(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const n=e.length,i=arguments.length>2&&!0===arguments[2];if(!i&&0===n)return 0;let o=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return Z(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return G(e).length;default:if(o)return i?-1:Z(e).length;t=(""+t).toLowerCase(),o=!0}}function m(e,t,n){let i=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return k(this,t,n);case"utf8":case"utf-8":return I(this,t,n);case"ascii":return x(this,t,n);case"latin1":case"binary":return D(this,t,n);case"base64":return L(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,t,n);default:if(i)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),i=!0}}function v(e,t,n){const i=e[t];e[t]=e[n],e[n]=i}function y(e,t,n,i,o){if(0===e.length)return-1;if("string"==typeof n?(i=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),K(n=+n)&&(n=o?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(o)return-1;n=e.length-1}else if(n<0){if(!o)return-1;n=0}if("string"==typeof t&&(t=u.from(t,i)),u.isBuffer(t))return 0===t.length?-1:b(e,t,n,i,o);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):b(e,[t],n,i,o);throw new TypeError("val must be string, number or Buffer")}function b(e,t,n,i,o){let r,s=1,a=e.length,u=t.length;if(void 0!==i&&("ucs2"===(i=String(i).toLowerCase())||"ucs-2"===i||"utf16le"===i||"utf-16le"===i)){if(e.length<2||t.length<2)return-1;s=2,a/=2,u/=2,n/=2}function l(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(o){let i=-1;for(r=n;ra&&(n=a-u),r=n;r>=0;r--){let n=!0;for(let i=0;io&&(i=o):i=o;const r=t.length;let s;for(i>r/2&&(i=r/2),s=0;s>8,o=n%256,r.push(o),r.push(i);return r}(t,e.length-n),e,n,i)}function L(e,t,n){return 0===t&&n===e.length?i.fromByteArray(e):i.fromByteArray(e.slice(t,n))}function I(e,t,n){n=Math.min(e.length,n);const i=[];let o=t;for(;o239?4:t>223?3:t>191?2:1;if(o+s<=n){let n,i,a,u;switch(s){case 1:t<128&&(r=t);break;case 2:n=e[o+1],128==(192&n)&&(u=(31&t)<<6|63&n,u>127&&(r=u));break;case 3:n=e[o+1],i=e[o+2],128==(192&n)&&128==(192&i)&&(u=(15&t)<<12|(63&n)<<6|63&i,u>2047&&(u<55296||u>57343)&&(r=u));break;case 4:n=e[o+1],i=e[o+2],a=e[o+3],128==(192&n)&&128==(192&i)&&128==(192&a)&&(u=(15&t)<<18|(63&n)<<12|(63&i)<<6|63&a,u>65535&&u<1114112&&(r=u))}}null===r?(r=65533,s=1):r>65535&&(r-=65536,i.push(r>>>10&1023|55296),r=56320|1023&r),i.push(r),o+=s}return function(e){const t=e.length;if(t<=N)return String.fromCharCode.apply(String,e);let n="",i=0;for(;ii.length?(u.isBuffer(t)||(t=u.from(t)),t.copy(i,o)):Uint8Array.prototype.set.call(i,t,o);else{if(!u.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(i,o)}o+=t.length}return i},u.byteLength=g,u.prototype._isBuffer=!0,u.prototype.swap16=function(){const e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;tn&&(e+=" ... "),""},r&&(u.prototype[r]=u.prototype.inspect),u.prototype.compare=function(e,t,n,i,o){if(q(e,Uint8Array)&&(e=u.from(e,e.offset,e.byteLength)),!u.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===i&&(i=0),void 0===o&&(o=this.length),t<0||n>e.length||i<0||o>this.length)throw new RangeError("out of range index");if(i>=o&&t>=n)return 0;if(i>=o)return-1;if(t>=n)return 1;if(this===e)return 0;let r=(o>>>=0)-(i>>>=0),s=(n>>>=0)-(t>>>=0);const a=Math.min(r,s),l=this.slice(i,o),c=e.slice(t,n);for(let e=0;e>>=0,isFinite(n)?(n>>>=0,void 0===i&&(i="utf8")):(i=n,n=void 0)}const o=this.length-t;if((void 0===n||n>o)&&(n=o),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");let r=!1;for(;;)switch(i){case"hex":return _(this,e,t,n);case"utf8":case"utf-8":return w(this,e,t,n);case"ascii":case"latin1":case"binary":return M(this,e,t,n);case"base64":return C(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,e,t,n);default:if(r)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),r=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const N=4096;function x(e,t,n){let i="";n=Math.min(e.length,n);for(let o=t;oi)&&(n=i);let o="";for(let i=t;in)throw new RangeError("Trying to access beyond buffer length")}function A(e,t,n,i,o,r){if(!u.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||te.length)throw new RangeError("Index out of range")}function j(e,t,n,i,o){H(t,i,o,e,n,7);let r=Number(t&BigInt(4294967295));e[n++]=r,r>>=8,e[n++]=r,r>>=8,e[n++]=r,r>>=8,e[n++]=r;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[n++]=s,s>>=8,e[n++]=s,s>>=8,e[n++]=s,s>>=8,e[n++]=s,n}function O(e,t,n,i,o){H(t,i,o,e,n,7);let r=Number(t&BigInt(4294967295));e[n+7]=r,r>>=8,e[n+6]=r,r>>=8,e[n+5]=r,r>>=8,e[n+4]=r;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[n+3]=s,s>>=8,e[n+2]=s,s>>=8,e[n+1]=s,s>>=8,e[n]=s,n+8}function R(e,t,n,i,o,r){if(n+i>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function P(e,t,n,i,r){return t=+t,n>>>=0,r||R(e,0,n,4),o.write(e,t,n,i,23,4),n+4}function z(e,t,n,i,r){return t=+t,n>>>=0,r||R(e,0,n,8),o.write(e,t,n,i,52,8),n+8}u.prototype.slice=function(e,t){const n=this.length;(e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t>>=0,t>>>=0,n||E(e,t,this.length);let i=this[e],o=1,r=0;for(;++r>>=0,t>>>=0,n||E(e,t,this.length);let i=this[e+--t],o=1;for(;t>0&&(o*=256);)i+=this[e+--t]*o;return i},u.prototype.readUint8=u.prototype.readUInt8=function(e,t){return e>>>=0,t||E(e,1,this.length),this[e]},u.prototype.readUint16LE=u.prototype.readUInt16LE=function(e,t){return e>>>=0,t||E(e,2,this.length),this[e]|this[e+1]<<8},u.prototype.readUint16BE=u.prototype.readUInt16BE=function(e,t){return e>>>=0,t||E(e,2,this.length),this[e]<<8|this[e+1]},u.prototype.readUint32LE=u.prototype.readUInt32LE=function(e,t){return e>>>=0,t||E(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},u.prototype.readUint32BE=u.prototype.readUInt32BE=function(e,t){return e>>>=0,t||E(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},u.prototype.readBigUInt64LE=X((function(e){V(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||U(e,this.length-8);const i=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,o=this[++e]+256*this[++e]+65536*this[++e]+n*2**24;return BigInt(i)+(BigInt(o)<>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||U(e,this.length-8);const i=t*2**24+65536*this[++e]+256*this[++e]+this[++e],o=this[++e]*2**24+65536*this[++e]+256*this[++e]+n;return(BigInt(i)<>>=0,t>>>=0,n||E(e,t,this.length);let i=this[e],o=1,r=0;for(;++r=o&&(i-=Math.pow(2,8*t)),i},u.prototype.readIntBE=function(e,t,n){e>>>=0,t>>>=0,n||E(e,t,this.length);let i=t,o=1,r=this[e+--i];for(;i>0&&(o*=256);)r+=this[e+--i]*o;return o*=128,r>=o&&(r-=Math.pow(2,8*t)),r},u.prototype.readInt8=function(e,t){return e>>>=0,t||E(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},u.prototype.readInt16LE=function(e,t){e>>>=0,t||E(e,2,this.length);const n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt16BE=function(e,t){e>>>=0,t||E(e,2,this.length);const n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt32LE=function(e,t){return e>>>=0,t||E(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},u.prototype.readInt32BE=function(e,t){return e>>>=0,t||E(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},u.prototype.readBigInt64LE=X((function(e){V(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||U(e,this.length-8);const i=this[e+4]+256*this[e+5]+65536*this[e+6]+(n<<24);return(BigInt(i)<>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||U(e,this.length-8);const i=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(i)<>>=0,t||E(e,4,this.length),o.read(this,e,!0,23,4)},u.prototype.readFloatBE=function(e,t){return e>>>=0,t||E(e,4,this.length),o.read(this,e,!1,23,4)},u.prototype.readDoubleLE=function(e,t){return e>>>=0,t||E(e,8,this.length),o.read(this,e,!0,52,8)},u.prototype.readDoubleBE=function(e,t){return e>>>=0,t||E(e,8,this.length),o.read(this,e,!1,52,8)},u.prototype.writeUintLE=u.prototype.writeUIntLE=function(e,t,n,i){e=+e,t>>>=0,n>>>=0,i||A(this,e,t,n,Math.pow(2,8*n)-1,0);let o=1,r=0;for(this[t]=255&e;++r>>=0,n>>>=0,i||A(this,e,t,n,Math.pow(2,8*n)-1,0);let o=n-1,r=1;for(this[t+o]=255&e;--o>=0&&(r*=256);)this[t+o]=e/r&255;return t+n},u.prototype.writeUint8=u.prototype.writeUInt8=function(e,t,n){return e=+e,t>>>=0,n||A(this,e,t,1,255,0),this[t]=255&e,t+1},u.prototype.writeUint16LE=u.prototype.writeUInt16LE=function(e,t,n){return e=+e,t>>>=0,n||A(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},u.prototype.writeUint16BE=u.prototype.writeUInt16BE=function(e,t,n){return e=+e,t>>>=0,n||A(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},u.prototype.writeUint32LE=u.prototype.writeUInt32LE=function(e,t,n){return e=+e,t>>>=0,n||A(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},u.prototype.writeUint32BE=u.prototype.writeUInt32BE=function(e,t,n){return e=+e,t>>>=0,n||A(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},u.prototype.writeBigUInt64LE=X((function(e,t=0){return j(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),u.prototype.writeBigUInt64BE=X((function(e,t=0){return O(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),u.prototype.writeIntLE=function(e,t,n,i){if(e=+e,t>>>=0,!i){const i=Math.pow(2,8*n-1);A(this,e,t,n,i-1,-i)}let o=0,r=1,s=0;for(this[t]=255&e;++o>>=0,!i){const i=Math.pow(2,8*n-1);A(this,e,t,n,i-1,-i)}let o=n-1,r=1,s=0;for(this[t+o]=255&e;--o>=0&&(r*=256);)e<0&&0===s&&0!==this[t+o+1]&&(s=1),this[t+o]=(e/r|0)-s&255;return t+n},u.prototype.writeInt8=function(e,t,n){return e=+e,t>>>=0,n||A(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},u.prototype.writeInt16LE=function(e,t,n){return e=+e,t>>>=0,n||A(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},u.prototype.writeInt16BE=function(e,t,n){return e=+e,t>>>=0,n||A(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},u.prototype.writeInt32LE=function(e,t,n){return e=+e,t>>>=0,n||A(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},u.prototype.writeInt32BE=function(e,t,n){return e=+e,t>>>=0,n||A(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},u.prototype.writeBigInt64LE=X((function(e,t=0){return j(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),u.prototype.writeBigInt64BE=X((function(e,t=0){return O(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),u.prototype.writeFloatLE=function(e,t,n){return P(this,e,t,!0,n)},u.prototype.writeFloatBE=function(e,t,n){return P(this,e,t,!1,n)},u.prototype.writeDoubleLE=function(e,t,n){return z(this,e,t,!0,n)},u.prototype.writeDoubleBE=function(e,t,n){return z(this,e,t,!1,n)},u.prototype.copy=function(e,t,n,i){if(!u.isBuffer(e))throw new TypeError("argument should be a Buffer");if(n||(n=0),i||0===i||(i=this.length),t>=e.length&&(t=e.length),t||(t=0),i>0&&i=this.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),e.length-t>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(o=t;o=i+4;n-=3)t=`_${e.slice(n-3,n)}${t}`;return`${e.slice(0,n)}${t}`}function H(e,t,n,i,o,r){if(e>n||e3?0===t||t===BigInt(0)?`>= 0${i} and < 2${i} ** ${8*(r+1)}${i}`:`>= -(2${i} ** ${8*(r+1)-1}${i}) and < 2 ** ${8*(r+1)-1}${i}`:`>= ${t}${i} and <= ${n}${i}`,new W.ERR_OUT_OF_RANGE("value",o,e)}!function(e,t,n){V(t,"offset"),void 0!==e[t]&&void 0!==e[t+n]||U(t,e.length-(n+1))}(i,o,r)}function V(e,t){if("number"!=typeof e)throw new W.ERR_INVALID_ARG_TYPE(t,"number",e)}function U(e,t,n){if(Math.floor(e)!==e)throw V(e,n),new W.ERR_OUT_OF_RANGE(n||"offset","an integer",e);if(t<0)throw new W.ERR_BUFFER_OUT_OF_BOUNDS;throw new W.ERR_OUT_OF_RANGE(n||"offset",`>= ${n?1:0} and <= ${t}`,e)}F("ERR_BUFFER_OUT_OF_BOUNDS",(function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),F("ERR_INVALID_ARG_TYPE",(function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`}),TypeError),F("ERR_OUT_OF_RANGE",(function(e,t,n){let i=`The value of "${e}" is out of range.`,o=n;return Number.isInteger(n)&&Math.abs(n)>2**32?o=B(String(n)):"bigint"==typeof n&&(o=String(n),(n>BigInt(2)**BigInt(32)||n<-(BigInt(2)**BigInt(32)))&&(o=B(o)),o+="n"),i+=` It must be ${t}. Received ${o}`,i}),RangeError);const Y=/[^+/0-9A-Za-z-_]/g;function Z(e,t){let n;t=t||1/0;const i=e.length;let o=null;const r=[];for(let s=0;s55295&&n<57344){if(!o){if(n>56319){(t-=3)>-1&&r.push(239,191,189);continue}if(s+1===i){(t-=3)>-1&&r.push(239,191,189);continue}o=n;continue}if(n<56320){(t-=3)>-1&&r.push(239,191,189),o=n;continue}n=65536+(o-55296<<10|n-56320)}else o&&(t-=3)>-1&&r.push(239,191,189);if(o=null,n<128){if((t-=1)<0)break;r.push(n)}else if(n<2048){if((t-=2)<0)break;r.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;r.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;r.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return r}function G(e){return i.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(Y,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function Q(e,t,n,i){let o;for(o=0;o=t.length||o>=e.length);++o)t[o+n]=e[o];return o}function q(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function K(e){return e!=e}const J=function(){const e="0123456789abcdef",t=new Array(256);for(let n=0;n<16;++n){const i=16*n;for(let o=0;o<16;++o)t[i+o]=e[n]+e[o]}return t}();function X(e){return"undefined"==typeof BigInt?$:e}function $(){throw new Error("BigInt not supported")}},8511:(e,t,n)=>{var i=n(2238).Buffer,o=n(8741).Transform,r=n(230).I;function s(e){o.call(this),this.hashMode="string"==typeof e,this.hashMode?this[e]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}n(9385)(s,o),s.prototype.update=function(e,t,n){"string"==typeof e&&(e=i.from(e,t));var o=this._update(e);return this.hashMode?this:(n&&(o=this._toString(o,n)),o)},s.prototype.setAutoPadding=function(){},s.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},s.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},s.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},s.prototype._transform=function(e,t,n){var i;try{this.hashMode?this._update(e):this.push(this._update(e))}catch(e){i=e}finally{n(i)}},s.prototype._flush=function(e){var t;try{this.push(this.__final())}catch(e){t=e}e(t)},s.prototype._finalOrDigest=function(e){var t=this.__final()||i.alloc(0);return e&&(t=this._toString(t,e,!0)),t},s.prototype._toString=function(e,t,n){if(this._decoder||(this._decoder=new r(t),this._encoding=t),this._encoding!==t)throw new Error("can't switch encodings");var i=this._decoder.write(e);return n&&(i+=this._decoder.end()),i},e.exports=s},8565:(e,t,n)=>{function i(e){return Object.prototype.toString.call(e)}t.isArray=function(e){return Array.isArray?Array.isArray(e):"[object Array]"===i(e)},t.isBoolean=function(e){return"boolean"==typeof e},t.isNull=function(e){return null===e},t.isNullOrUndefined=function(e){return null==e},t.isNumber=function(e){return"number"==typeof e},t.isString=function(e){return"string"==typeof e},t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=function(e){return void 0===e},t.isRegExp=function(e){return"[object RegExp]"===i(e)},t.isObject=function(e){return"object"==typeof e&&null!==e},t.isDate=function(e){return"[object Date]"===i(e)},t.isError=function(e){return"[object Error]"===i(e)||e instanceof Error},t.isFunction=function(e){return"function"==typeof e},t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=n(1278).Buffer.isBuffer},4231:(e,t,n)=>{var i=n(1278).Buffer,o=n(9478),r=n(1046);e.exports=function(e){return new a(e)};var s={secp256k1:{name:"secp256k1",byteLength:32},secp224r1:{name:"p224",byteLength:28},prime256v1:{name:"p256",byteLength:32},prime192v1:{name:"p192",byteLength:24},ed25519:{name:"ed25519",byteLength:32},secp384r1:{name:"p384",byteLength:48},secp521r1:{name:"p521",byteLength:66}};function a(e){this.curveType=s[e],this.curveType||(this.curveType={name:e}),this.curve=new o.ec(this.curveType.name),this.keys=void 0}function u(e,t,n){Array.isArray(e)||(e=e.toArray());var o=new i(e);if(n&&o.length=65&&n<=70?n-55:n>=97&&n<=102?n-87:n-48&15}function u(e,t,n){var i=a(e,n);return n-1>=t&&(i|=a(e,n-1)<<4),i}function l(e,t,n,i){for(var o=0,r=Math.min(e.length,n),s=t;s=49?a-49+10:a>=17?a-17+10:a}return o}r.isBN=function(e){return e instanceof r||null!==e&&"object"==typeof e&&e.constructor.wordSize===r.wordSize&&Array.isArray(e.words)},r.max=function(e,t){return e.cmp(t)>0?e:t},r.min=function(e,t){return e.cmp(t)<0?e:t},r.prototype._init=function(e,t,n){if("number"==typeof e)return this._initNumber(e,t,n);if("object"==typeof e)return this._initArray(e,t,n);"hex"===t&&(t=16),i(t===(0|t)&&t>=2&&t<=36);var o=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(o++,this.negative=1),o=0;o-=3)s=e[o]|e[o-1]<<8|e[o-2]<<16,this.words[r]|=s<>>26-a&67108863,(a+=24)>=26&&(a-=26,r++);else if("le"===n)for(o=0,r=0;o>>26-a&67108863,(a+=24)>=26&&(a-=26,r++);return this.strip()},r.prototype._parseHex=function(e,t,n){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var i=0;i=t;i-=2)o=u(e,t,i)<=18?(r-=18,s+=1,this.words[s]|=o>>>26):r+=8;else for(i=(e.length-t)%2==0?t+1:t;i=18?(r-=18,s+=1,this.words[s]|=o>>>26):r+=8;this.strip()},r.prototype._parseBase=function(e,t,n){this.words=[0],this.length=1;for(var i=0,o=1;o<=67108863;o*=t)i++;i--,o=o/t|0;for(var r=e.length-n,s=r%i,a=Math.min(r,r-s)+n,u=0,c=n;c1&&0===this.words[this.length-1];)this.length--;return this._normSign()},r.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},r.prototype.inspect=function(){return(this.red?""};var c=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],h=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],d=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function f(e,t,n){n.negative=t.negative^e.negative;var i=e.length+t.length|0;n.length=i,i=i-1|0;var o=0|e.words[0],r=0|t.words[0],s=o*r,a=67108863&s,u=s/67108864|0;n.words[0]=a;for(var l=1;l>>26,h=67108863&u,d=Math.min(l,t.length-1),f=Math.max(0,l-e.length+1);f<=d;f++){var p=l-f|0;c+=(s=(o=0|e.words[p])*(r=0|t.words[f])+h)/67108864|0,h=67108863&s}n.words[l]=0|h,u=0|c}return 0!==u?n.words[l]=0|u:n.length--,n.strip()}r.prototype.toString=function(e,t){var n;if(t=0|t||1,16===(e=e||10)||"hex"===e){n="";for(var o=0,r=0,s=0;s>>24-o&16777215)||s!==this.length-1?c[6-u.length]+u+n:u+n,(o+=2)>=26&&(o-=26,s--)}for(0!==r&&(n=r.toString(16)+n);n.length%t!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(e===(0|e)&&e>=2&&e<=36){var l=h[e],f=d[e];n="";var p=this.clone();for(p.negative=0;!p.isZero();){var g=p.modn(f).toString(e);n=(p=p.idivn(f)).isZero()?g+n:c[l-g.length]+g+n}for(this.isZero()&&(n="0"+n);n.length%t!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}i(!1,"Base should be between 2 and 36")},r.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&i(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},r.prototype.toJSON=function(){return this.toString(16)},r.prototype.toBuffer=function(e,t){return i(void 0!==s),this.toArrayLike(s,e,t)},r.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},r.prototype.toArrayLike=function(e,t,n){var o=this.byteLength(),r=n||Math.max(1,o);i(o<=r,"byte array longer than desired length"),i(r>0,"Requested array length <= 0"),this.strip();var s,a,u="le"===t,l=new e(r),c=this.clone();if(u){for(a=0;!c.isZero();a++)s=c.andln(255),c.iushrn(8),l[a]=s;for(;a=4096&&(n+=13,t>>>=13),t>=64&&(n+=7,t>>>=7),t>=8&&(n+=4,t>>>=4),t>=2&&(n+=2,t>>>=2),n+t},r.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,n=0;return 8191&t||(n+=13,t>>>=13),127&t||(n+=7,t>>>=7),15&t||(n+=4,t>>>=4),3&t||(n+=2,t>>>=2),1&t||n++,n},r.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},r.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},r.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},r.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var n=0;ne.length?this.clone().iand(e):e.clone().iand(this)},r.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},r.prototype.iuxor=function(e){var t,n;this.length>e.length?(t=this,n=e):(t=e,n=this);for(var i=0;ie.length?this.clone().ixor(e):e.clone().ixor(this)},r.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},r.prototype.inotn=function(e){i("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),n=e%26;this._expand(t),n>0&&t--;for(var o=0;o0&&(this.words[o]=~this.words[o]&67108863>>26-n),this.strip()},r.prototype.notn=function(e){return this.clone().inotn(e)},r.prototype.setn=function(e,t){i("number"==typeof e&&e>=0);var n=e/26|0,o=e%26;return this._expand(n+1),this.words[n]=t?this.words[n]|1<e.length?(n=this,i=e):(n=e,i=this);for(var o=0,r=0;r>>26;for(;0!==o&&r>>26;if(this.length=n.length,0!==o)this.words[this.length]=o,this.length++;else if(n!==this)for(;re.length?this.clone().iadd(e):e.clone().iadd(this)},r.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var n,i,o=this.cmp(e);if(0===o)return this.negative=0,this.length=1,this.words[0]=0,this;o>0?(n=this,i=e):(n=e,i=this);for(var r=0,s=0;s>26,this.words[s]=67108863&t;for(;0!==r&&s>26,this.words[s]=67108863&t;if(0===r&&s>>13,f=0|s[1],p=8191&f,g=f>>>13,m=0|s[2],v=8191&m,y=m>>>13,b=0|s[3],_=8191&b,w=b>>>13,M=0|s[4],C=8191&M,S=M>>>13,L=0|s[5],I=8191&L,N=L>>>13,x=0|s[6],D=8191&x,k=x>>>13,T=0|s[7],E=8191&T,A=T>>>13,j=0|s[8],O=8191&j,R=j>>>13,P=0|s[9],z=8191&P,W=P>>>13,F=0|a[0],B=8191&F,H=F>>>13,V=0|a[1],U=8191&V,Y=V>>>13,Z=0|a[2],G=8191&Z,Q=Z>>>13,q=0|a[3],K=8191&q,J=q>>>13,X=0|a[4],$=8191&X,ee=X>>>13,te=0|a[5],ne=8191&te,ie=te>>>13,oe=0|a[6],re=8191&oe,se=oe>>>13,ae=0|a[7],ue=8191&ae,le=ae>>>13,ce=0|a[8],he=8191&ce,de=ce>>>13,fe=0|a[9],pe=8191&fe,ge=fe>>>13;n.negative=e.negative^t.negative,n.length=19;var me=(l+(i=Math.imul(h,B))|0)+((8191&(o=(o=Math.imul(h,H))+Math.imul(d,B)|0))<<13)|0;l=((r=Math.imul(d,H))+(o>>>13)|0)+(me>>>26)|0,me&=67108863,i=Math.imul(p,B),o=(o=Math.imul(p,H))+Math.imul(g,B)|0,r=Math.imul(g,H);var ve=(l+(i=i+Math.imul(h,U)|0)|0)+((8191&(o=(o=o+Math.imul(h,Y)|0)+Math.imul(d,U)|0))<<13)|0;l=((r=r+Math.imul(d,Y)|0)+(o>>>13)|0)+(ve>>>26)|0,ve&=67108863,i=Math.imul(v,B),o=(o=Math.imul(v,H))+Math.imul(y,B)|0,r=Math.imul(y,H),i=i+Math.imul(p,U)|0,o=(o=o+Math.imul(p,Y)|0)+Math.imul(g,U)|0,r=r+Math.imul(g,Y)|0;var ye=(l+(i=i+Math.imul(h,G)|0)|0)+((8191&(o=(o=o+Math.imul(h,Q)|0)+Math.imul(d,G)|0))<<13)|0;l=((r=r+Math.imul(d,Q)|0)+(o>>>13)|0)+(ye>>>26)|0,ye&=67108863,i=Math.imul(_,B),o=(o=Math.imul(_,H))+Math.imul(w,B)|0,r=Math.imul(w,H),i=i+Math.imul(v,U)|0,o=(o=o+Math.imul(v,Y)|0)+Math.imul(y,U)|0,r=r+Math.imul(y,Y)|0,i=i+Math.imul(p,G)|0,o=(o=o+Math.imul(p,Q)|0)+Math.imul(g,G)|0,r=r+Math.imul(g,Q)|0;var be=(l+(i=i+Math.imul(h,K)|0)|0)+((8191&(o=(o=o+Math.imul(h,J)|0)+Math.imul(d,K)|0))<<13)|0;l=((r=r+Math.imul(d,J)|0)+(o>>>13)|0)+(be>>>26)|0,be&=67108863,i=Math.imul(C,B),o=(o=Math.imul(C,H))+Math.imul(S,B)|0,r=Math.imul(S,H),i=i+Math.imul(_,U)|0,o=(o=o+Math.imul(_,Y)|0)+Math.imul(w,U)|0,r=r+Math.imul(w,Y)|0,i=i+Math.imul(v,G)|0,o=(o=o+Math.imul(v,Q)|0)+Math.imul(y,G)|0,r=r+Math.imul(y,Q)|0,i=i+Math.imul(p,K)|0,o=(o=o+Math.imul(p,J)|0)+Math.imul(g,K)|0,r=r+Math.imul(g,J)|0;var _e=(l+(i=i+Math.imul(h,$)|0)|0)+((8191&(o=(o=o+Math.imul(h,ee)|0)+Math.imul(d,$)|0))<<13)|0;l=((r=r+Math.imul(d,ee)|0)+(o>>>13)|0)+(_e>>>26)|0,_e&=67108863,i=Math.imul(I,B),o=(o=Math.imul(I,H))+Math.imul(N,B)|0,r=Math.imul(N,H),i=i+Math.imul(C,U)|0,o=(o=o+Math.imul(C,Y)|0)+Math.imul(S,U)|0,r=r+Math.imul(S,Y)|0,i=i+Math.imul(_,G)|0,o=(o=o+Math.imul(_,Q)|0)+Math.imul(w,G)|0,r=r+Math.imul(w,Q)|0,i=i+Math.imul(v,K)|0,o=(o=o+Math.imul(v,J)|0)+Math.imul(y,K)|0,r=r+Math.imul(y,J)|0,i=i+Math.imul(p,$)|0,o=(o=o+Math.imul(p,ee)|0)+Math.imul(g,$)|0,r=r+Math.imul(g,ee)|0;var we=(l+(i=i+Math.imul(h,ne)|0)|0)+((8191&(o=(o=o+Math.imul(h,ie)|0)+Math.imul(d,ne)|0))<<13)|0;l=((r=r+Math.imul(d,ie)|0)+(o>>>13)|0)+(we>>>26)|0,we&=67108863,i=Math.imul(D,B),o=(o=Math.imul(D,H))+Math.imul(k,B)|0,r=Math.imul(k,H),i=i+Math.imul(I,U)|0,o=(o=o+Math.imul(I,Y)|0)+Math.imul(N,U)|0,r=r+Math.imul(N,Y)|0,i=i+Math.imul(C,G)|0,o=(o=o+Math.imul(C,Q)|0)+Math.imul(S,G)|0,r=r+Math.imul(S,Q)|0,i=i+Math.imul(_,K)|0,o=(o=o+Math.imul(_,J)|0)+Math.imul(w,K)|0,r=r+Math.imul(w,J)|0,i=i+Math.imul(v,$)|0,o=(o=o+Math.imul(v,ee)|0)+Math.imul(y,$)|0,r=r+Math.imul(y,ee)|0,i=i+Math.imul(p,ne)|0,o=(o=o+Math.imul(p,ie)|0)+Math.imul(g,ne)|0,r=r+Math.imul(g,ie)|0;var Me=(l+(i=i+Math.imul(h,re)|0)|0)+((8191&(o=(o=o+Math.imul(h,se)|0)+Math.imul(d,re)|0))<<13)|0;l=((r=r+Math.imul(d,se)|0)+(o>>>13)|0)+(Me>>>26)|0,Me&=67108863,i=Math.imul(E,B),o=(o=Math.imul(E,H))+Math.imul(A,B)|0,r=Math.imul(A,H),i=i+Math.imul(D,U)|0,o=(o=o+Math.imul(D,Y)|0)+Math.imul(k,U)|0,r=r+Math.imul(k,Y)|0,i=i+Math.imul(I,G)|0,o=(o=o+Math.imul(I,Q)|0)+Math.imul(N,G)|0,r=r+Math.imul(N,Q)|0,i=i+Math.imul(C,K)|0,o=(o=o+Math.imul(C,J)|0)+Math.imul(S,K)|0,r=r+Math.imul(S,J)|0,i=i+Math.imul(_,$)|0,o=(o=o+Math.imul(_,ee)|0)+Math.imul(w,$)|0,r=r+Math.imul(w,ee)|0,i=i+Math.imul(v,ne)|0,o=(o=o+Math.imul(v,ie)|0)+Math.imul(y,ne)|0,r=r+Math.imul(y,ie)|0,i=i+Math.imul(p,re)|0,o=(o=o+Math.imul(p,se)|0)+Math.imul(g,re)|0,r=r+Math.imul(g,se)|0;var Ce=(l+(i=i+Math.imul(h,ue)|0)|0)+((8191&(o=(o=o+Math.imul(h,le)|0)+Math.imul(d,ue)|0))<<13)|0;l=((r=r+Math.imul(d,le)|0)+(o>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,i=Math.imul(O,B),o=(o=Math.imul(O,H))+Math.imul(R,B)|0,r=Math.imul(R,H),i=i+Math.imul(E,U)|0,o=(o=o+Math.imul(E,Y)|0)+Math.imul(A,U)|0,r=r+Math.imul(A,Y)|0,i=i+Math.imul(D,G)|0,o=(o=o+Math.imul(D,Q)|0)+Math.imul(k,G)|0,r=r+Math.imul(k,Q)|0,i=i+Math.imul(I,K)|0,o=(o=o+Math.imul(I,J)|0)+Math.imul(N,K)|0,r=r+Math.imul(N,J)|0,i=i+Math.imul(C,$)|0,o=(o=o+Math.imul(C,ee)|0)+Math.imul(S,$)|0,r=r+Math.imul(S,ee)|0,i=i+Math.imul(_,ne)|0,o=(o=o+Math.imul(_,ie)|0)+Math.imul(w,ne)|0,r=r+Math.imul(w,ie)|0,i=i+Math.imul(v,re)|0,o=(o=o+Math.imul(v,se)|0)+Math.imul(y,re)|0,r=r+Math.imul(y,se)|0,i=i+Math.imul(p,ue)|0,o=(o=o+Math.imul(p,le)|0)+Math.imul(g,ue)|0,r=r+Math.imul(g,le)|0;var Se=(l+(i=i+Math.imul(h,he)|0)|0)+((8191&(o=(o=o+Math.imul(h,de)|0)+Math.imul(d,he)|0))<<13)|0;l=((r=r+Math.imul(d,de)|0)+(o>>>13)|0)+(Se>>>26)|0,Se&=67108863,i=Math.imul(z,B),o=(o=Math.imul(z,H))+Math.imul(W,B)|0,r=Math.imul(W,H),i=i+Math.imul(O,U)|0,o=(o=o+Math.imul(O,Y)|0)+Math.imul(R,U)|0,r=r+Math.imul(R,Y)|0,i=i+Math.imul(E,G)|0,o=(o=o+Math.imul(E,Q)|0)+Math.imul(A,G)|0,r=r+Math.imul(A,Q)|0,i=i+Math.imul(D,K)|0,o=(o=o+Math.imul(D,J)|0)+Math.imul(k,K)|0,r=r+Math.imul(k,J)|0,i=i+Math.imul(I,$)|0,o=(o=o+Math.imul(I,ee)|0)+Math.imul(N,$)|0,r=r+Math.imul(N,ee)|0,i=i+Math.imul(C,ne)|0,o=(o=o+Math.imul(C,ie)|0)+Math.imul(S,ne)|0,r=r+Math.imul(S,ie)|0,i=i+Math.imul(_,re)|0,o=(o=o+Math.imul(_,se)|0)+Math.imul(w,re)|0,r=r+Math.imul(w,se)|0,i=i+Math.imul(v,ue)|0,o=(o=o+Math.imul(v,le)|0)+Math.imul(y,ue)|0,r=r+Math.imul(y,le)|0,i=i+Math.imul(p,he)|0,o=(o=o+Math.imul(p,de)|0)+Math.imul(g,he)|0,r=r+Math.imul(g,de)|0;var Le=(l+(i=i+Math.imul(h,pe)|0)|0)+((8191&(o=(o=o+Math.imul(h,ge)|0)+Math.imul(d,pe)|0))<<13)|0;l=((r=r+Math.imul(d,ge)|0)+(o>>>13)|0)+(Le>>>26)|0,Le&=67108863,i=Math.imul(z,U),o=(o=Math.imul(z,Y))+Math.imul(W,U)|0,r=Math.imul(W,Y),i=i+Math.imul(O,G)|0,o=(o=o+Math.imul(O,Q)|0)+Math.imul(R,G)|0,r=r+Math.imul(R,Q)|0,i=i+Math.imul(E,K)|0,o=(o=o+Math.imul(E,J)|0)+Math.imul(A,K)|0,r=r+Math.imul(A,J)|0,i=i+Math.imul(D,$)|0,o=(o=o+Math.imul(D,ee)|0)+Math.imul(k,$)|0,r=r+Math.imul(k,ee)|0,i=i+Math.imul(I,ne)|0,o=(o=o+Math.imul(I,ie)|0)+Math.imul(N,ne)|0,r=r+Math.imul(N,ie)|0,i=i+Math.imul(C,re)|0,o=(o=o+Math.imul(C,se)|0)+Math.imul(S,re)|0,r=r+Math.imul(S,se)|0,i=i+Math.imul(_,ue)|0,o=(o=o+Math.imul(_,le)|0)+Math.imul(w,ue)|0,r=r+Math.imul(w,le)|0,i=i+Math.imul(v,he)|0,o=(o=o+Math.imul(v,de)|0)+Math.imul(y,he)|0,r=r+Math.imul(y,de)|0;var Ie=(l+(i=i+Math.imul(p,pe)|0)|0)+((8191&(o=(o=o+Math.imul(p,ge)|0)+Math.imul(g,pe)|0))<<13)|0;l=((r=r+Math.imul(g,ge)|0)+(o>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,i=Math.imul(z,G),o=(o=Math.imul(z,Q))+Math.imul(W,G)|0,r=Math.imul(W,Q),i=i+Math.imul(O,K)|0,o=(o=o+Math.imul(O,J)|0)+Math.imul(R,K)|0,r=r+Math.imul(R,J)|0,i=i+Math.imul(E,$)|0,o=(o=o+Math.imul(E,ee)|0)+Math.imul(A,$)|0,r=r+Math.imul(A,ee)|0,i=i+Math.imul(D,ne)|0,o=(o=o+Math.imul(D,ie)|0)+Math.imul(k,ne)|0,r=r+Math.imul(k,ie)|0,i=i+Math.imul(I,re)|0,o=(o=o+Math.imul(I,se)|0)+Math.imul(N,re)|0,r=r+Math.imul(N,se)|0,i=i+Math.imul(C,ue)|0,o=(o=o+Math.imul(C,le)|0)+Math.imul(S,ue)|0,r=r+Math.imul(S,le)|0,i=i+Math.imul(_,he)|0,o=(o=o+Math.imul(_,de)|0)+Math.imul(w,he)|0,r=r+Math.imul(w,de)|0;var Ne=(l+(i=i+Math.imul(v,pe)|0)|0)+((8191&(o=(o=o+Math.imul(v,ge)|0)+Math.imul(y,pe)|0))<<13)|0;l=((r=r+Math.imul(y,ge)|0)+(o>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,i=Math.imul(z,K),o=(o=Math.imul(z,J))+Math.imul(W,K)|0,r=Math.imul(W,J),i=i+Math.imul(O,$)|0,o=(o=o+Math.imul(O,ee)|0)+Math.imul(R,$)|0,r=r+Math.imul(R,ee)|0,i=i+Math.imul(E,ne)|0,o=(o=o+Math.imul(E,ie)|0)+Math.imul(A,ne)|0,r=r+Math.imul(A,ie)|0,i=i+Math.imul(D,re)|0,o=(o=o+Math.imul(D,se)|0)+Math.imul(k,re)|0,r=r+Math.imul(k,se)|0,i=i+Math.imul(I,ue)|0,o=(o=o+Math.imul(I,le)|0)+Math.imul(N,ue)|0,r=r+Math.imul(N,le)|0,i=i+Math.imul(C,he)|0,o=(o=o+Math.imul(C,de)|0)+Math.imul(S,he)|0,r=r+Math.imul(S,de)|0;var xe=(l+(i=i+Math.imul(_,pe)|0)|0)+((8191&(o=(o=o+Math.imul(_,ge)|0)+Math.imul(w,pe)|0))<<13)|0;l=((r=r+Math.imul(w,ge)|0)+(o>>>13)|0)+(xe>>>26)|0,xe&=67108863,i=Math.imul(z,$),o=(o=Math.imul(z,ee))+Math.imul(W,$)|0,r=Math.imul(W,ee),i=i+Math.imul(O,ne)|0,o=(o=o+Math.imul(O,ie)|0)+Math.imul(R,ne)|0,r=r+Math.imul(R,ie)|0,i=i+Math.imul(E,re)|0,o=(o=o+Math.imul(E,se)|0)+Math.imul(A,re)|0,r=r+Math.imul(A,se)|0,i=i+Math.imul(D,ue)|0,o=(o=o+Math.imul(D,le)|0)+Math.imul(k,ue)|0,r=r+Math.imul(k,le)|0,i=i+Math.imul(I,he)|0,o=(o=o+Math.imul(I,de)|0)+Math.imul(N,he)|0,r=r+Math.imul(N,de)|0;var De=(l+(i=i+Math.imul(C,pe)|0)|0)+((8191&(o=(o=o+Math.imul(C,ge)|0)+Math.imul(S,pe)|0))<<13)|0;l=((r=r+Math.imul(S,ge)|0)+(o>>>13)|0)+(De>>>26)|0,De&=67108863,i=Math.imul(z,ne),o=(o=Math.imul(z,ie))+Math.imul(W,ne)|0,r=Math.imul(W,ie),i=i+Math.imul(O,re)|0,o=(o=o+Math.imul(O,se)|0)+Math.imul(R,re)|0,r=r+Math.imul(R,se)|0,i=i+Math.imul(E,ue)|0,o=(o=o+Math.imul(E,le)|0)+Math.imul(A,ue)|0,r=r+Math.imul(A,le)|0,i=i+Math.imul(D,he)|0,o=(o=o+Math.imul(D,de)|0)+Math.imul(k,he)|0,r=r+Math.imul(k,de)|0;var ke=(l+(i=i+Math.imul(I,pe)|0)|0)+((8191&(o=(o=o+Math.imul(I,ge)|0)+Math.imul(N,pe)|0))<<13)|0;l=((r=r+Math.imul(N,ge)|0)+(o>>>13)|0)+(ke>>>26)|0,ke&=67108863,i=Math.imul(z,re),o=(o=Math.imul(z,se))+Math.imul(W,re)|0,r=Math.imul(W,se),i=i+Math.imul(O,ue)|0,o=(o=o+Math.imul(O,le)|0)+Math.imul(R,ue)|0,r=r+Math.imul(R,le)|0,i=i+Math.imul(E,he)|0,o=(o=o+Math.imul(E,de)|0)+Math.imul(A,he)|0,r=r+Math.imul(A,de)|0;var Te=(l+(i=i+Math.imul(D,pe)|0)|0)+((8191&(o=(o=o+Math.imul(D,ge)|0)+Math.imul(k,pe)|0))<<13)|0;l=((r=r+Math.imul(k,ge)|0)+(o>>>13)|0)+(Te>>>26)|0,Te&=67108863,i=Math.imul(z,ue),o=(o=Math.imul(z,le))+Math.imul(W,ue)|0,r=Math.imul(W,le),i=i+Math.imul(O,he)|0,o=(o=o+Math.imul(O,de)|0)+Math.imul(R,he)|0,r=r+Math.imul(R,de)|0;var Ee=(l+(i=i+Math.imul(E,pe)|0)|0)+((8191&(o=(o=o+Math.imul(E,ge)|0)+Math.imul(A,pe)|0))<<13)|0;l=((r=r+Math.imul(A,ge)|0)+(o>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,i=Math.imul(z,he),o=(o=Math.imul(z,de))+Math.imul(W,he)|0,r=Math.imul(W,de);var Ae=(l+(i=i+Math.imul(O,pe)|0)|0)+((8191&(o=(o=o+Math.imul(O,ge)|0)+Math.imul(R,pe)|0))<<13)|0;l=((r=r+Math.imul(R,ge)|0)+(o>>>13)|0)+(Ae>>>26)|0,Ae&=67108863;var je=(l+(i=Math.imul(z,pe))|0)+((8191&(o=(o=Math.imul(z,ge))+Math.imul(W,pe)|0))<<13)|0;return l=((r=Math.imul(W,ge))+(o>>>13)|0)+(je>>>26)|0,je&=67108863,u[0]=me,u[1]=ve,u[2]=ye,u[3]=be,u[4]=_e,u[5]=we,u[6]=Me,u[7]=Ce,u[8]=Se,u[9]=Le,u[10]=Ie,u[11]=Ne,u[12]=xe,u[13]=De,u[14]=ke,u[15]=Te,u[16]=Ee,u[17]=Ae,u[18]=je,0!==l&&(u[19]=l,n.length++),n};function g(e,t,n){return(new m).mulp(e,t,n)}function m(e,t){this.x=e,this.y=t}Math.imul||(p=f),r.prototype.mulTo=function(e,t){var n,i=this.length+e.length;return n=10===this.length&&10===e.length?p(this,e,t):i<63?f(this,e,t):i<1024?function(e,t,n){n.negative=t.negative^e.negative,n.length=e.length+t.length;for(var i=0,o=0,r=0;r>>26)|0)>>>26,s&=67108863}n.words[r]=a,i=s,s=o}return 0!==i?n.words[r]=i:n.length--,n.strip()}(this,e,t):g(this,e,t),n},m.prototype.makeRBT=function(e){for(var t=new Array(e),n=r.prototype._countBits(e)-1,i=0;i>=1;return i},m.prototype.permute=function(e,t,n,i,o,r){for(var s=0;s>>=1)o++;return 1<>>=13,n[2*s+1]=8191&r,r>>>=13;for(s=2*t;s>=26,t+=o/67108864|0,t+=r>>>26,this.words[n]=67108863&r}return 0!==t&&(this.words[n]=t,this.length++),this},r.prototype.muln=function(e){return this.clone().imuln(e)},r.prototype.sqr=function(){return this.mul(this)},r.prototype.isqr=function(){return this.imul(this.clone())},r.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),n=0;n>>o}return t}(e);if(0===t.length)return new r(1);for(var n=this,i=0;i=0);var t,n=e%26,o=(e-n)/26,r=67108863>>>26-n<<26-n;if(0!==n){var s=0;for(t=0;t>>26-n}s&&(this.words[t]=s,this.length++)}if(0!==o){for(t=this.length-1;t>=0;t--)this.words[t+o]=this.words[t];for(t=0;t=0),o=t?(t-t%26)/26:0;var r=e%26,s=Math.min((e-r)/26,this.length),a=67108863^67108863>>>r<s)for(this.length-=s,l=0;l=0&&(0!==c||l>=o);l--){var h=0|this.words[l];this.words[l]=c<<26-r|h>>>r,c=h&a}return u&&0!==c&&(u.words[u.length++]=c),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},r.prototype.ishrn=function(e,t,n){return i(0===this.negative),this.iushrn(e,t,n)},r.prototype.shln=function(e){return this.clone().ishln(e)},r.prototype.ushln=function(e){return this.clone().iushln(e)},r.prototype.shrn=function(e){return this.clone().ishrn(e)},r.prototype.ushrn=function(e){return this.clone().iushrn(e)},r.prototype.testn=function(e){i("number"==typeof e&&e>=0);var t=e%26,n=(e-t)/26,o=1<=0);var t=e%26,n=(e-t)/26;if(i(0===this.negative,"imaskn works only with positive numbers"),this.length<=n)return this;if(0!==t&&n++,this.length=Math.min(n,this.length),0!==t){var o=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},r.prototype.isubn=function(e){if(i("number"==typeof e),i(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(u/67108864|0),this.words[o+n]=67108863&r}for(;o>26,this.words[o+n]=67108863&r;if(0===a)return this.strip();for(i(-1===a),a=0,o=0;o>26,this.words[o]=67108863&r;return this.negative=1,this.strip()},r.prototype._wordDiv=function(e,t){var n=(this.length,e.length),i=this.clone(),o=e,s=0|o.words[o.length-1];0!=(n=26-this._countBits(s))&&(o=o.ushln(n),i.iushln(n),s=0|o.words[o.length-1]);var a,u=i.length-o.length;if("mod"!==t){(a=new r(null)).length=u+1,a.words=new Array(a.length);for(var l=0;l=0;h--){var d=67108864*(0|i.words[o.length+h])+(0|i.words[o.length+h-1]);for(d=Math.min(d/s|0,67108863),i._ishlnsubmul(o,d,h);0!==i.negative;)d--,i.negative=0,i._ishlnsubmul(o,1,h),i.isZero()||(i.negative^=1);a&&(a.words[h]=d)}return a&&a.strip(),i.strip(),"div"!==t&&0!==n&&i.iushrn(n),{div:a||null,mod:i}},r.prototype.divmod=function(e,t,n){return i(!e.isZero()),this.isZero()?{div:new r(0),mod:new r(0)}:0!==this.negative&&0===e.negative?(a=this.neg().divmod(e,t),"mod"!==t&&(o=a.div.neg()),"div"!==t&&(s=a.mod.neg(),n&&0!==s.negative&&s.iadd(e)),{div:o,mod:s}):0===this.negative&&0!==e.negative?(a=this.divmod(e.neg(),t),"mod"!==t&&(o=a.div.neg()),{div:o,mod:a.mod}):this.negative&e.negative?(a=this.neg().divmod(e.neg(),t),"div"!==t&&(s=a.mod.neg(),n&&0!==s.negative&&s.isub(e)),{div:a.div,mod:s}):e.length>this.length||this.cmp(e)<0?{div:new r(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new r(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new r(this.modn(e.words[0]))}:this._wordDiv(e,t);var o,s,a},r.prototype.div=function(e){return this.divmod(e,"div",!1).div},r.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},r.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},r.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var n=0!==t.div.negative?t.mod.isub(e):t.mod,i=e.ushrn(1),o=e.andln(1),r=n.cmp(i);return r<0||1===o&&0===r?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},r.prototype.modn=function(e){i(e<=67108863);for(var t=(1<<26)%e,n=0,o=this.length-1;o>=0;o--)n=(t*n+(0|this.words[o]))%e;return n},r.prototype.idivn=function(e){i(e<=67108863);for(var t=0,n=this.length-1;n>=0;n--){var o=(0|this.words[n])+67108864*t;this.words[n]=o/e|0,t=o%e}return this.strip()},r.prototype.divn=function(e){return this.clone().idivn(e)},r.prototype.egcd=function(e){i(0===e.negative),i(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var o=new r(1),s=new r(0),a=new r(0),u=new r(1),l=0;t.isEven()&&n.isEven();)t.iushrn(1),n.iushrn(1),++l;for(var c=n.clone(),h=t.clone();!t.isZero();){for(var d=0,f=1;!(t.words[0]&f)&&d<26;++d,f<<=1);if(d>0)for(t.iushrn(d);d-- >0;)(o.isOdd()||s.isOdd())&&(o.iadd(c),s.isub(h)),o.iushrn(1),s.iushrn(1);for(var p=0,g=1;!(n.words[0]&g)&&p<26;++p,g<<=1);if(p>0)for(n.iushrn(p);p-- >0;)(a.isOdd()||u.isOdd())&&(a.iadd(c),u.isub(h)),a.iushrn(1),u.iushrn(1);t.cmp(n)>=0?(t.isub(n),o.isub(a),s.isub(u)):(n.isub(t),a.isub(o),u.isub(s))}return{a,b:u,gcd:n.iushln(l)}},r.prototype._invmp=function(e){i(0===e.negative),i(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var o,s=new r(1),a=new r(0),u=n.clone();t.cmpn(1)>0&&n.cmpn(1)>0;){for(var l=0,c=1;!(t.words[0]&c)&&l<26;++l,c<<=1);if(l>0)for(t.iushrn(l);l-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);for(var h=0,d=1;!(n.words[0]&d)&&h<26;++h,d<<=1);if(h>0)for(n.iushrn(h);h-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);t.cmp(n)>=0?(t.isub(n),s.isub(a)):(n.isub(t),a.isub(s))}return(o=0===t.cmpn(1)?s:a).cmpn(0)<0&&o.iadd(e),o},r.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),n=e.clone();t.negative=0,n.negative=0;for(var i=0;t.isEven()&&n.isEven();i++)t.iushrn(1),n.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;n.isEven();)n.iushrn(1);var o=t.cmp(n);if(o<0){var r=t;t=n,n=r}else if(0===o||0===n.cmpn(1))break;t.isub(n)}return n.iushln(i)},r.prototype.invm=function(e){return this.egcd(e).a.umod(e)},r.prototype.isEven=function(){return!(1&this.words[0])},r.prototype.isOdd=function(){return!(1&~this.words[0])},r.prototype.andln=function(e){return this.words[0]&e},r.prototype.bincn=function(e){i("number"==typeof e);var t=e%26,n=(e-t)/26,o=1<>>26,a&=67108863,this.words[s]=a}return 0!==r&&(this.words[s]=r,this.length++),this},r.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},r.prototype.cmpn=function(e){var t,n=e<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this.strip(),this.length>1)t=1;else{n&&(e=-e),i(e<=67108863,"Number is too big");var o=0|this.words[0];t=o===e?0:oe.length)return 1;if(this.length=0;n--){var i=0|this.words[n],o=0|e.words[n];if(i!==o){io&&(t=1);break}}return t},r.prototype.gtn=function(e){return 1===this.cmpn(e)},r.prototype.gt=function(e){return 1===this.cmp(e)},r.prototype.gten=function(e){return this.cmpn(e)>=0},r.prototype.gte=function(e){return this.cmp(e)>=0},r.prototype.ltn=function(e){return-1===this.cmpn(e)},r.prototype.lt=function(e){return-1===this.cmp(e)},r.prototype.lten=function(e){return this.cmpn(e)<=0},r.prototype.lte=function(e){return this.cmp(e)<=0},r.prototype.eqn=function(e){return 0===this.cmpn(e)},r.prototype.eq=function(e){return 0===this.cmp(e)},r.red=function(e){return new C(e)},r.prototype.toRed=function(e){return i(!this.red,"Already a number in reduction context"),i(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},r.prototype.fromRed=function(){return i(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},r.prototype._forceRed=function(e){return this.red=e,this},r.prototype.forceRed=function(e){return i(!this.red,"Already a number in reduction context"),this._forceRed(e)},r.prototype.redAdd=function(e){return i(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},r.prototype.redIAdd=function(e){return i(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},r.prototype.redSub=function(e){return i(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},r.prototype.redISub=function(e){return i(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},r.prototype.redShl=function(e){return i(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},r.prototype.redMul=function(e){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},r.prototype.redIMul=function(e){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},r.prototype.redSqr=function(){return i(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},r.prototype.redISqr=function(){return i(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},r.prototype.redSqrt=function(){return i(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},r.prototype.redInvm=function(){return i(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},r.prototype.redNeg=function(){return i(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},r.prototype.redPow=function(e){return i(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var v={k256:null,p224:null,p192:null,p25519:null};function y(e,t){this.name=e,this.p=new r(t,16),this.n=this.p.bitLength(),this.k=new r(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function b(){y.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function _(){y.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){y.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function M(){y.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function C(e){if("string"==typeof e){var t=r._prime(e);this.m=t.p,this.prime=t}else i(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function S(e){C.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new r(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}y.prototype._tmp=function(){var e=new r(null);return e.words=new Array(Math.ceil(this.n/13)),e},y.prototype.ireduce=function(e){var t,n=e;do{this.split(n,this.tmp),t=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(t>this.n);var i=t0?n.isub(this.p):void 0!==n.strip?n.strip():n._strip(),n},y.prototype.split=function(e,t){e.iushrn(this.n,0,t)},y.prototype.imulK=function(e){return e.imul(this.k)},o(b,y),b.prototype.split=function(e,t){for(var n=4194303,i=Math.min(e.length,9),o=0;o>>22,r=s}r>>>=22,e.words[o-10]=r,0===r&&e.length>10?e.length-=10:e.length-=9},b.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,n=0;n>>=26,e.words[n]=o,t=i}return 0!==t&&(e.words[e.length++]=t),e},r._prime=function(e){if(v[e])return v[e];var t;if("k256"===e)t=new b;else if("p224"===e)t=new _;else if("p192"===e)t=new w;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new M}return v[e]=t,t},C.prototype._verify1=function(e){i(0===e.negative,"red works only with positives"),i(e.red,"red works only with red numbers")},C.prototype._verify2=function(e,t){i(!(e.negative|t.negative),"red works only with positives"),i(e.red&&e.red===t.red,"red works only with red numbers")},C.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},C.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},C.prototype.add=function(e,t){this._verify2(e,t);var n=e.add(t);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},C.prototype.iadd=function(e,t){this._verify2(e,t);var n=e.iadd(t);return n.cmp(this.m)>=0&&n.isub(this.m),n},C.prototype.sub=function(e,t){this._verify2(e,t);var n=e.sub(t);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},C.prototype.isub=function(e,t){this._verify2(e,t);var n=e.isub(t);return n.cmpn(0)<0&&n.iadd(this.m),n},C.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},C.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},C.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},C.prototype.isqr=function(e){return this.imul(e,e.clone())},C.prototype.sqr=function(e){return this.mul(e,e)},C.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(i(t%2==1),3===t){var n=this.m.add(new r(1)).iushrn(2);return this.pow(e,n)}for(var o=this.m.subn(1),s=0;!o.isZero()&&0===o.andln(1);)s++,o.iushrn(1);i(!o.isZero());var a=new r(1).toRed(this),u=a.redNeg(),l=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new r(2*c*c).toRed(this);0!==this.pow(c,l).cmp(u);)c.redIAdd(u);for(var h=this.pow(c,o),d=this.pow(e,o.addn(1).iushrn(1)),f=this.pow(e,o),p=s;0!==f.cmp(a);){for(var g=f,m=0;0!==g.cmp(a);m++)g=g.redSqr();i(m=0;i--){for(var l=t.words[i],c=u-1;c>=0;c--){var h=l>>c&1;o!==n[0]&&(o=this.sqr(o)),0!==h||0!==s?(s<<=1,s|=h,(4==++a||0===i&&0===c)&&(o=this.mul(o,n[s]),a=0,s=0)):a=0}u=26}return o},C.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},C.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},r.mont=function(e){return new S(e)},o(S,C),S.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},S.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},S.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var n=e.imul(t),i=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=n.isub(i).iushrn(this.shift),r=o;return o.cmp(this.m)>=0?r=o.isub(this.m):o.cmpn(0)<0&&(r=o.iadd(this.m)),r._forceRed(this)},S.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new r(0)._forceRed(this);var n=e.mul(t),i=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=n.isub(i).iushrn(this.shift),s=o;return o.cmp(this.m)>=0?s=o.isub(this.m):o.cmpn(0)<0&&(s=o.iadd(this.m)),s._forceRed(this)},S.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=n.nmd(e),this)},2059:(e,t,n)=>{"use strict";var i=n(9385),o=n(9781),r=n(2428),s=n(5203),a=n(8511);function u(e){a.call(this,"digest"),this._hash=e}i(u,a),u.prototype._update=function(e){this._hash.update(e)},u.prototype._final=function(){return this._hash.digest()},e.exports=function(e){return"md5"===(e=e.toLowerCase())?new o:"rmd160"===e||"ripemd160"===e?new r:new u(s(e))}},4159:(e,t,n)=>{var i=n(9781);e.exports=function(e){return(new i).update(e).digest()}},8080:(e,t,n)=>{"use strict";var i=n(9385),o=n(2397),r=n(8511),s=n(2238).Buffer,a=n(4159),u=n(2428),l=n(5203),c=s.alloc(128);function h(e,t){r.call(this,"digest"),"string"==typeof t&&(t=s.from(t));var n="sha512"===e||"sha384"===e?128:64;this._alg=e,this._key=t,t.length>n?t=("rmd160"===e?new u:l(e)).update(t).digest():t.length{"use strict";var i=n(9385),o=n(2238).Buffer,r=n(8511),s=o.alloc(128),a=64;function u(e,t){r.call(this,"digest"),"string"==typeof t&&(t=o.from(t)),this._alg=e,this._key=t,t.length>a?t=e(t):t.length{"use strict";t.randomBytes=t.rng=t.pseudoRandomBytes=t.prng=n(8190),t.createHash=t.Hash=n(2059),t.createHmac=t.Hmac=n(8080);var i=n(4136),o=Object.keys(i),r=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(o);t.getHashes=function(){return r};var s=n(853);t.pbkdf2=s.pbkdf2,t.pbkdf2Sync=s.pbkdf2Sync;var a=n(7070);t.Cipher=a.Cipher,t.createCipher=a.createCipher,t.Cipheriv=a.Cipheriv,t.createCipheriv=a.createCipheriv,t.Decipher=a.Decipher,t.createDecipher=a.createDecipher,t.Decipheriv=a.Decipheriv,t.createDecipheriv=a.createDecipheriv,t.getCiphers=a.getCiphers,t.listCiphers=a.listCiphers;var u=n(969);t.DiffieHellmanGroup=u.DiffieHellmanGroup,t.createDiffieHellmanGroup=u.createDiffieHellmanGroup,t.getDiffieHellman=u.getDiffieHellman,t.createDiffieHellman=u.createDiffieHellman,t.DiffieHellman=u.DiffieHellman;var l=n(455);t.createSign=l.createSign,t.Sign=l.Sign,t.createVerify=l.createVerify,t.Verify=l.Verify,t.createECDH=n(4231);var c=n(4069);t.publicEncrypt=c.publicEncrypt,t.privateEncrypt=c.privateEncrypt,t.publicDecrypt=c.publicDecrypt,t.privateDecrypt=c.privateDecrypt;var h=n(5666);t.randomFill=h.randomFill,t.randomFillSync=h.randomFillSync,t.createCredentials=function(){throw new Error(["sorry, createCredentials is not implemented yet","we accept pull requests","https://github.com/crypto-browserify/crypto-browserify"].join("\n"))},t.constants={DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,NPN_ENABLED:1,ALPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6}},8826:e=>{e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n=function(e,t){var n,i=e[1]||"",o=e[3];if(!o)return i;if(t&&"function"==typeof btoa){var r=(n=o,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(n))))+" */"),s=o.sources.map((function(e){return"/*# sourceURL="+o.sourceRoot+e+" */"}));return[i].concat(s).concat([r]).join("\n")}return[i].join("\n")}(t,e);return t[2]?"@media "+t[2]+"{"+n+"}":n})).join("")},t.i=function(e,n){"string"==typeof e&&(e=[[null,e,""]]);for(var i={},o=0;o{"use strict";t.utils=n(8487),t.Cipher=n(3003),t.DES=n(4358),t.CBC=n(7472),t.EDE=n(634)},7472:(e,t,n)=>{"use strict";var i=n(4890),o=n(9385),r={};function s(e){i.equal(e.length,8,"Invalid IV length"),this.iv=new Array(8);for(var t=0;t{"use strict";var i=n(4890);function o(e){this.options=e,this.type=this.options.type,this.blockSize=8,this._init(),this.buffer=new Array(this.blockSize),this.bufferOff=0,this.padding=!1!==e.padding}e.exports=o,o.prototype._init=function(){},o.prototype.update=function(e){return 0===e.length?[]:"decrypt"===this.type?this._updateDecrypt(e):this._updateEncrypt(e)},o.prototype._buffer=function(e,t){for(var n=Math.min(this.buffer.length-this.bufferOff,e.length-t),i=0;i0;i--)t+=this._buffer(e,t),n+=this._flushBuffer(o,n);return t+=this._buffer(e,t),o},o.prototype.final=function(e){var t,n;return e&&(t=this.update(e)),n="encrypt"===this.type?this._finalEncrypt():this._finalDecrypt(),t?t.concat(n):n},o.prototype._pad=function(e,t){if(0===t)return!1;for(;t{"use strict";var i=n(4890),o=n(9385),r=n(8487),s=n(3003);function a(){this.tmp=new Array(2),this.keys=null}function u(e){s.call(this,e);var t=new a;this._desState=t,this.deriveKeys(t,e.key)}o(u,s),e.exports=u,u.create=function(e){return new u(e)};var l=[1,1,2,2,2,2,2,2,1,2,2,2,2,2,2,1];u.prototype.deriveKeys=function(e,t){e.keys=new Array(32),i.equal(t.length,this.blockSize,"Invalid key length");var n=r.readUInt32BE(t,0),o=r.readUInt32BE(t,4);r.pc1(n,o,e.tmp,0),n=e.tmp[0],o=e.tmp[1];for(var s=0;s>>1];n=r.r28shl(n,a),o=r.r28shl(o,a),r.pc2(n,o,e.keys,s)}},u.prototype._update=function(e,t,n,i){var o=this._desState,s=r.readUInt32BE(e,t),a=r.readUInt32BE(e,t+4);r.ip(s,a,o.tmp,0),s=o.tmp[0],a=o.tmp[1],"encrypt"===this.type?this._encrypt(o,s,a,o.tmp,0):this._decrypt(o,s,a,o.tmp,0),s=o.tmp[0],a=o.tmp[1],r.writeUInt32BE(n,s,i),r.writeUInt32BE(n,a,i+4)},u.prototype._pad=function(e,t){if(!1===this.padding)return!1;for(var n=e.length-t,i=t;i>>0,s=d}r.rip(a,s,i,o)},u.prototype._decrypt=function(e,t,n,i,o){for(var s=n,a=t,u=e.keys.length-2;u>=0;u-=2){var l=e.keys[u],c=e.keys[u+1];r.expand(s,e.tmp,0),l^=e.tmp[0],c^=e.tmp[1];var h=r.substitute(l,c),d=s;s=(a^r.permute(h))>>>0,a=d}r.rip(s,a,i,o)}},634:(e,t,n)=>{"use strict";var i=n(4890),o=n(9385),r=n(3003),s=n(4358);function a(e,t){i.equal(t.length,24,"Invalid key length");var n=t.slice(0,8),o=t.slice(8,16),r=t.slice(16,24);this.ciphers="encrypt"===e?[s.create({type:"encrypt",key:n}),s.create({type:"decrypt",key:o}),s.create({type:"encrypt",key:r})]:[s.create({type:"decrypt",key:r}),s.create({type:"encrypt",key:o}),s.create({type:"decrypt",key:n})]}function u(e){r.call(this,e);var t=new a(this.type,this.options.key);this._edeState=t}o(u,r),e.exports=u,u.create=function(e){return new u(e)},u.prototype._update=function(e,t,n,i){var o=this._edeState;o.ciphers[0]._update(e,t,n,i),o.ciphers[1]._update(n,i,n,i),o.ciphers[2]._update(n,i,n,i)},u.prototype._pad=s.prototype._pad,u.prototype._unpad=s.prototype._unpad},8487:(e,t)=>{"use strict";t.readUInt32BE=function(e,t){return(e[0+t]<<24|e[1+t]<<16|e[2+t]<<8|e[3+t])>>>0},t.writeUInt32BE=function(e,t,n){e[0+n]=t>>>24,e[1+n]=t>>>16&255,e[2+n]=t>>>8&255,e[3+n]=255&t},t.ip=function(e,t,n,i){for(var o=0,r=0,s=6;s>=0;s-=2){for(var a=0;a<=24;a+=8)o<<=1,o|=t>>>a+s&1;for(a=0;a<=24;a+=8)o<<=1,o|=e>>>a+s&1}for(s=6;s>=0;s-=2){for(a=1;a<=25;a+=8)r<<=1,r|=t>>>a+s&1;for(a=1;a<=25;a+=8)r<<=1,r|=e>>>a+s&1}n[i+0]=o>>>0,n[i+1]=r>>>0},t.rip=function(e,t,n,i){for(var o=0,r=0,s=0;s<4;s++)for(var a=24;a>=0;a-=8)o<<=1,o|=t>>>a+s&1,o<<=1,o|=e>>>a+s&1;for(s=4;s<8;s++)for(a=24;a>=0;a-=8)r<<=1,r|=t>>>a+s&1,r<<=1,r|=e>>>a+s&1;n[i+0]=o>>>0,n[i+1]=r>>>0},t.pc1=function(e,t,n,i){for(var o=0,r=0,s=7;s>=5;s--){for(var a=0;a<=24;a+=8)o<<=1,o|=t>>a+s&1;for(a=0;a<=24;a+=8)o<<=1,o|=e>>a+s&1}for(a=0;a<=24;a+=8)o<<=1,o|=t>>a+s&1;for(s=1;s<=3;s++){for(a=0;a<=24;a+=8)r<<=1,r|=t>>a+s&1;for(a=0;a<=24;a+=8)r<<=1,r|=e>>a+s&1}for(a=0;a<=24;a+=8)r<<=1,r|=e>>a+s&1;n[i+0]=o>>>0,n[i+1]=r>>>0},t.r28shl=function(e,t){return e<>>28-t};var n=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24];t.pc2=function(e,t,i,o){for(var r=0,s=0,a=n.length>>>1,u=0;u>>n[u]&1;for(u=a;u>>n[u]&1;i[o+0]=r>>>0,i[o+1]=s>>>0},t.expand=function(e,t,n){var i=0,o=0;i=(1&e)<<5|e>>>27;for(var r=23;r>=15;r-=4)i<<=6,i|=e>>>r&63;for(r=11;r>=3;r-=4)o|=e>>>r&63,o<<=6;o|=(31&e)<<1|e>>>31,t[n+0]=i>>>0,t[n+1]=o>>>0};var i=[14,0,4,15,13,7,1,4,2,14,15,2,11,13,8,1,3,10,10,6,6,12,12,11,5,9,9,5,0,3,7,8,4,15,1,12,14,8,8,2,13,4,6,9,2,1,11,7,15,5,12,11,9,3,7,14,3,10,10,0,5,6,0,13,15,3,1,13,8,4,14,7,6,15,11,2,3,8,4,14,9,12,7,0,2,1,13,10,12,6,0,9,5,11,10,5,0,13,14,8,7,10,11,1,10,3,4,15,13,4,1,2,5,11,8,6,12,7,6,12,9,0,3,5,2,14,15,9,10,13,0,7,9,0,14,9,6,3,3,4,15,6,5,10,1,2,13,8,12,5,7,14,11,12,4,11,2,15,8,1,13,1,6,10,4,13,9,0,8,6,15,9,3,8,0,7,11,4,1,15,2,14,12,3,5,11,10,5,14,2,7,12,7,13,13,8,14,11,3,5,0,6,6,15,9,0,10,3,1,4,2,7,8,2,5,12,11,1,12,10,4,14,15,9,10,3,6,15,9,0,0,6,12,10,11,1,7,13,13,8,15,9,1,4,3,5,14,11,5,12,2,7,8,2,4,14,2,14,12,11,4,2,1,12,7,4,10,7,11,13,6,1,8,5,5,0,3,15,15,10,13,3,0,9,14,8,9,6,4,11,2,8,1,12,11,7,10,1,13,14,7,2,8,13,15,6,9,15,12,0,5,9,6,10,3,4,0,5,14,3,12,10,1,15,10,4,15,2,9,7,2,12,6,9,8,5,0,6,13,1,3,13,4,14,14,0,7,11,5,3,11,8,9,4,14,3,15,2,5,12,2,9,8,5,12,15,3,10,7,11,0,14,4,1,10,7,1,6,13,0,11,8,6,13,4,13,11,0,2,11,14,7,15,4,0,9,8,1,13,10,3,14,12,3,9,5,7,12,5,2,10,15,6,8,1,6,1,6,4,11,11,13,13,8,12,1,3,4,7,10,14,7,10,9,15,5,6,0,8,15,0,14,5,2,9,3,2,12,13,1,2,15,8,13,4,8,6,10,15,3,11,7,1,4,10,12,9,5,3,6,14,11,5,0,0,14,12,9,7,2,7,2,11,1,4,14,1,7,9,4,12,10,14,8,2,13,0,15,6,12,10,9,13,0,15,3,3,5,5,6,8,11];t.substitute=function(e,t){for(var n=0,o=0;o<4;o++)n<<=4,n|=i[64*o+(e>>>18-6*o&63)];for(o=0;o<4;o++)n<<=4,n|=i[256+64*o+(t>>>18-6*o&63)];return n>>>0};var o=[16,25,12,11,3,20,4,15,31,17,9,6,27,14,1,22,30,24,8,18,0,5,29,23,13,19,2,26,10,21,28,7];t.permute=function(e){for(var t=0,n=0;n>>o[n]&1;return t>>>0},t.padSplit=function(e,t,n){for(var i=e.toString(2);i.length{var i=n(1278).Buffer,o=n(4359),r=n(3241),s=n(897),a={binary:!0,hex:!0,base64:!0};t.DiffieHellmanGroup=t.createDiffieHellmanGroup=t.getDiffieHellman=function(e){var t=new i(r[e].prime,"hex"),n=new i(r[e].gen,"hex");return new s(t,n)},t.createDiffieHellman=t.DiffieHellman=function e(t,n,r,u){return i.isBuffer(n)||void 0===a[n]?e(t,"binary",n,r):(n=n||"binary",u=u||"binary",r=r||new i([2]),i.isBuffer(r)||(r=new i(r,u)),"number"==typeof t?new s(o(t,r),r,!0):(i.isBuffer(t)||(t=new i(t,n)),new s(t,r,!0)))}},897:(e,t,n)=>{var i=n(1278).Buffer,o=n(4856),r=new(n(3587)),s=new o(24),a=new o(11),u=new o(10),l=new o(3),c=new o(7),h=n(4359),d=n(8190);function f(e,t){return t=t||"utf8",i.isBuffer(e)||(e=new i(e,t)),this._pub=new o(e),this}function p(e,t){return t=t||"utf8",i.isBuffer(e)||(e=new i(e,t)),this._priv=new o(e),this}e.exports=m;var g={};function m(e,t,n){this.setGenerator(t),this.__prime=new o(e),this._prime=o.mont(this.__prime),this._primeLen=e.length,this._pub=void 0,this._priv=void 0,this._primeCode=void 0,n?(this.setPublicKey=f,this.setPrivateKey=p):this._primeCode=8}function v(e,t){var n=new i(e.toArray());return t?n.toString(t):n}Object.defineProperty(m.prototype,"verifyError",{enumerable:!0,get:function(){return"number"!=typeof this._primeCode&&(this._primeCode=function(e,t){var n=t.toString("hex"),i=[n,e.toString(16)].join("_");if(i in g)return g[i];var o,d=0;if(e.isEven()||!h.simpleSieve||!h.fermatTest(e)||!r.test(e))return d+=1,d+="02"===n||"05"===n?8:4,g[i]=d,d;switch(r.test(e.shrn(1))||(d+=2),n){case"02":e.mod(s).cmp(a)&&(d+=8);break;case"05":(o=e.mod(u)).cmp(l)&&o.cmp(c)&&(d+=8);break;default:d+=4}return g[i]=d,d}(this.__prime,this.__gen)),this._primeCode}}),m.prototype.generateKeys=function(){return this._priv||(this._priv=new o(d(this._primeLen))),this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed(),this.getPublicKey()},m.prototype.computeSecret=function(e){var t=(e=(e=new o(e)).toRed(this._prime)).redPow(this._priv).fromRed(),n=new i(t.toArray()),r=this.getPrime();if(n.length{var i=n(8190);e.exports=y,y.simpleSieve=m,y.fermatTest=v;var o=n(4856),r=new o(24),s=new(n(3587)),a=new o(1),u=new o(2),l=new o(5),c=(new o(16),new o(8),new o(10)),h=new o(3),d=(new o(7),new o(11)),f=new o(4),p=(new o(12),null);function g(){if(null!==p)return p;var e=[];e[0]=2;for(var t=1,n=3;n<1048576;n+=2){for(var i=Math.ceil(Math.sqrt(n)),o=0;oe;)n.ishrn(1);if(n.isEven()&&n.iadd(a),n.testn(1)||n.iadd(u),t.cmp(u)){if(!t.cmp(l))for(;n.mod(c).cmp(h);)n.iadd(f)}else for(;n.mod(r).cmp(d);)n.iadd(f);if(m(p=n.shrn(1))&&m(n)&&v(p)&&v(n)&&s.test(p)&&s.test(n))return n}}},4856:function(e,t,n){!function(e,t){"use strict";function i(e,t){if(!e)throw new Error(t||"Assertion failed")}function o(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}function r(e,t,n){if(r.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(n=t,t=10),this._init(e||0,t||10,n||"be"))}var s;"object"==typeof e?e.exports=r:t.BN=r,r.BN=r,r.wordSize=26;try{s="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:n(6089).Buffer}catch(e){}function a(e,t){var n=e.charCodeAt(t);return n>=65&&n<=70?n-55:n>=97&&n<=102?n-87:n-48&15}function u(e,t,n){var i=a(e,n);return n-1>=t&&(i|=a(e,n-1)<<4),i}function l(e,t,n,i){for(var o=0,r=Math.min(e.length,n),s=t;s=49?a-49+10:a>=17?a-17+10:a}return o}r.isBN=function(e){return e instanceof r||null!==e&&"object"==typeof e&&e.constructor.wordSize===r.wordSize&&Array.isArray(e.words)},r.max=function(e,t){return e.cmp(t)>0?e:t},r.min=function(e,t){return e.cmp(t)<0?e:t},r.prototype._init=function(e,t,n){if("number"==typeof e)return this._initNumber(e,t,n);if("object"==typeof e)return this._initArray(e,t,n);"hex"===t&&(t=16),i(t===(0|t)&&t>=2&&t<=36);var o=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(o++,this.negative=1),o=0;o-=3)s=e[o]|e[o-1]<<8|e[o-2]<<16,this.words[r]|=s<>>26-a&67108863,(a+=24)>=26&&(a-=26,r++);else if("le"===n)for(o=0,r=0;o>>26-a&67108863,(a+=24)>=26&&(a-=26,r++);return this.strip()},r.prototype._parseHex=function(e,t,n){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var i=0;i=t;i-=2)o=u(e,t,i)<=18?(r-=18,s+=1,this.words[s]|=o>>>26):r+=8;else for(i=(e.length-t)%2==0?t+1:t;i=18?(r-=18,s+=1,this.words[s]|=o>>>26):r+=8;this.strip()},r.prototype._parseBase=function(e,t,n){this.words=[0],this.length=1;for(var i=0,o=1;o<=67108863;o*=t)i++;i--,o=o/t|0;for(var r=e.length-n,s=r%i,a=Math.min(r,r-s)+n,u=0,c=n;c1&&0===this.words[this.length-1];)this.length--;return this._normSign()},r.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},r.prototype.inspect=function(){return(this.red?""};var c=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],h=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],d=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function f(e,t,n){n.negative=t.negative^e.negative;var i=e.length+t.length|0;n.length=i,i=i-1|0;var o=0|e.words[0],r=0|t.words[0],s=o*r,a=67108863&s,u=s/67108864|0;n.words[0]=a;for(var l=1;l>>26,h=67108863&u,d=Math.min(l,t.length-1),f=Math.max(0,l-e.length+1);f<=d;f++){var p=l-f|0;c+=(s=(o=0|e.words[p])*(r=0|t.words[f])+h)/67108864|0,h=67108863&s}n.words[l]=0|h,u=0|c}return 0!==u?n.words[l]=0|u:n.length--,n.strip()}r.prototype.toString=function(e,t){var n;if(t=0|t||1,16===(e=e||10)||"hex"===e){n="";for(var o=0,r=0,s=0;s>>24-o&16777215)||s!==this.length-1?c[6-u.length]+u+n:u+n,(o+=2)>=26&&(o-=26,s--)}for(0!==r&&(n=r.toString(16)+n);n.length%t!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(e===(0|e)&&e>=2&&e<=36){var l=h[e],f=d[e];n="";var p=this.clone();for(p.negative=0;!p.isZero();){var g=p.modn(f).toString(e);n=(p=p.idivn(f)).isZero()?g+n:c[l-g.length]+g+n}for(this.isZero()&&(n="0"+n);n.length%t!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}i(!1,"Base should be between 2 and 36")},r.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&i(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},r.prototype.toJSON=function(){return this.toString(16)},r.prototype.toBuffer=function(e,t){return i(void 0!==s),this.toArrayLike(s,e,t)},r.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},r.prototype.toArrayLike=function(e,t,n){var o=this.byteLength(),r=n||Math.max(1,o);i(o<=r,"byte array longer than desired length"),i(r>0,"Requested array length <= 0"),this.strip();var s,a,u="le"===t,l=new e(r),c=this.clone();if(u){for(a=0;!c.isZero();a++)s=c.andln(255),c.iushrn(8),l[a]=s;for(;a=4096&&(n+=13,t>>>=13),t>=64&&(n+=7,t>>>=7),t>=8&&(n+=4,t>>>=4),t>=2&&(n+=2,t>>>=2),n+t},r.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,n=0;return 8191&t||(n+=13,t>>>=13),127&t||(n+=7,t>>>=7),15&t||(n+=4,t>>>=4),3&t||(n+=2,t>>>=2),1&t||n++,n},r.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},r.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},r.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},r.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var n=0;ne.length?this.clone().iand(e):e.clone().iand(this)},r.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},r.prototype.iuxor=function(e){var t,n;this.length>e.length?(t=this,n=e):(t=e,n=this);for(var i=0;ie.length?this.clone().ixor(e):e.clone().ixor(this)},r.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},r.prototype.inotn=function(e){i("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),n=e%26;this._expand(t),n>0&&t--;for(var o=0;o0&&(this.words[o]=~this.words[o]&67108863>>26-n),this.strip()},r.prototype.notn=function(e){return this.clone().inotn(e)},r.prototype.setn=function(e,t){i("number"==typeof e&&e>=0);var n=e/26|0,o=e%26;return this._expand(n+1),this.words[n]=t?this.words[n]|1<e.length?(n=this,i=e):(n=e,i=this);for(var o=0,r=0;r>>26;for(;0!==o&&r>>26;if(this.length=n.length,0!==o)this.words[this.length]=o,this.length++;else if(n!==this)for(;re.length?this.clone().iadd(e):e.clone().iadd(this)},r.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var n,i,o=this.cmp(e);if(0===o)return this.negative=0,this.length=1,this.words[0]=0,this;o>0?(n=this,i=e):(n=e,i=this);for(var r=0,s=0;s>26,this.words[s]=67108863&t;for(;0!==r&&s>26,this.words[s]=67108863&t;if(0===r&&s>>13,f=0|s[1],p=8191&f,g=f>>>13,m=0|s[2],v=8191&m,y=m>>>13,b=0|s[3],_=8191&b,w=b>>>13,M=0|s[4],C=8191&M,S=M>>>13,L=0|s[5],I=8191&L,N=L>>>13,x=0|s[6],D=8191&x,k=x>>>13,T=0|s[7],E=8191&T,A=T>>>13,j=0|s[8],O=8191&j,R=j>>>13,P=0|s[9],z=8191&P,W=P>>>13,F=0|a[0],B=8191&F,H=F>>>13,V=0|a[1],U=8191&V,Y=V>>>13,Z=0|a[2],G=8191&Z,Q=Z>>>13,q=0|a[3],K=8191&q,J=q>>>13,X=0|a[4],$=8191&X,ee=X>>>13,te=0|a[5],ne=8191&te,ie=te>>>13,oe=0|a[6],re=8191&oe,se=oe>>>13,ae=0|a[7],ue=8191&ae,le=ae>>>13,ce=0|a[8],he=8191&ce,de=ce>>>13,fe=0|a[9],pe=8191&fe,ge=fe>>>13;n.negative=e.negative^t.negative,n.length=19;var me=(l+(i=Math.imul(h,B))|0)+((8191&(o=(o=Math.imul(h,H))+Math.imul(d,B)|0))<<13)|0;l=((r=Math.imul(d,H))+(o>>>13)|0)+(me>>>26)|0,me&=67108863,i=Math.imul(p,B),o=(o=Math.imul(p,H))+Math.imul(g,B)|0,r=Math.imul(g,H);var ve=(l+(i=i+Math.imul(h,U)|0)|0)+((8191&(o=(o=o+Math.imul(h,Y)|0)+Math.imul(d,U)|0))<<13)|0;l=((r=r+Math.imul(d,Y)|0)+(o>>>13)|0)+(ve>>>26)|0,ve&=67108863,i=Math.imul(v,B),o=(o=Math.imul(v,H))+Math.imul(y,B)|0,r=Math.imul(y,H),i=i+Math.imul(p,U)|0,o=(o=o+Math.imul(p,Y)|0)+Math.imul(g,U)|0,r=r+Math.imul(g,Y)|0;var ye=(l+(i=i+Math.imul(h,G)|0)|0)+((8191&(o=(o=o+Math.imul(h,Q)|0)+Math.imul(d,G)|0))<<13)|0;l=((r=r+Math.imul(d,Q)|0)+(o>>>13)|0)+(ye>>>26)|0,ye&=67108863,i=Math.imul(_,B),o=(o=Math.imul(_,H))+Math.imul(w,B)|0,r=Math.imul(w,H),i=i+Math.imul(v,U)|0,o=(o=o+Math.imul(v,Y)|0)+Math.imul(y,U)|0,r=r+Math.imul(y,Y)|0,i=i+Math.imul(p,G)|0,o=(o=o+Math.imul(p,Q)|0)+Math.imul(g,G)|0,r=r+Math.imul(g,Q)|0;var be=(l+(i=i+Math.imul(h,K)|0)|0)+((8191&(o=(o=o+Math.imul(h,J)|0)+Math.imul(d,K)|0))<<13)|0;l=((r=r+Math.imul(d,J)|0)+(o>>>13)|0)+(be>>>26)|0,be&=67108863,i=Math.imul(C,B),o=(o=Math.imul(C,H))+Math.imul(S,B)|0,r=Math.imul(S,H),i=i+Math.imul(_,U)|0,o=(o=o+Math.imul(_,Y)|0)+Math.imul(w,U)|0,r=r+Math.imul(w,Y)|0,i=i+Math.imul(v,G)|0,o=(o=o+Math.imul(v,Q)|0)+Math.imul(y,G)|0,r=r+Math.imul(y,Q)|0,i=i+Math.imul(p,K)|0,o=(o=o+Math.imul(p,J)|0)+Math.imul(g,K)|0,r=r+Math.imul(g,J)|0;var _e=(l+(i=i+Math.imul(h,$)|0)|0)+((8191&(o=(o=o+Math.imul(h,ee)|0)+Math.imul(d,$)|0))<<13)|0;l=((r=r+Math.imul(d,ee)|0)+(o>>>13)|0)+(_e>>>26)|0,_e&=67108863,i=Math.imul(I,B),o=(o=Math.imul(I,H))+Math.imul(N,B)|0,r=Math.imul(N,H),i=i+Math.imul(C,U)|0,o=(o=o+Math.imul(C,Y)|0)+Math.imul(S,U)|0,r=r+Math.imul(S,Y)|0,i=i+Math.imul(_,G)|0,o=(o=o+Math.imul(_,Q)|0)+Math.imul(w,G)|0,r=r+Math.imul(w,Q)|0,i=i+Math.imul(v,K)|0,o=(o=o+Math.imul(v,J)|0)+Math.imul(y,K)|0,r=r+Math.imul(y,J)|0,i=i+Math.imul(p,$)|0,o=(o=o+Math.imul(p,ee)|0)+Math.imul(g,$)|0,r=r+Math.imul(g,ee)|0;var we=(l+(i=i+Math.imul(h,ne)|0)|0)+((8191&(o=(o=o+Math.imul(h,ie)|0)+Math.imul(d,ne)|0))<<13)|0;l=((r=r+Math.imul(d,ie)|0)+(o>>>13)|0)+(we>>>26)|0,we&=67108863,i=Math.imul(D,B),o=(o=Math.imul(D,H))+Math.imul(k,B)|0,r=Math.imul(k,H),i=i+Math.imul(I,U)|0,o=(o=o+Math.imul(I,Y)|0)+Math.imul(N,U)|0,r=r+Math.imul(N,Y)|0,i=i+Math.imul(C,G)|0,o=(o=o+Math.imul(C,Q)|0)+Math.imul(S,G)|0,r=r+Math.imul(S,Q)|0,i=i+Math.imul(_,K)|0,o=(o=o+Math.imul(_,J)|0)+Math.imul(w,K)|0,r=r+Math.imul(w,J)|0,i=i+Math.imul(v,$)|0,o=(o=o+Math.imul(v,ee)|0)+Math.imul(y,$)|0,r=r+Math.imul(y,ee)|0,i=i+Math.imul(p,ne)|0,o=(o=o+Math.imul(p,ie)|0)+Math.imul(g,ne)|0,r=r+Math.imul(g,ie)|0;var Me=(l+(i=i+Math.imul(h,re)|0)|0)+((8191&(o=(o=o+Math.imul(h,se)|0)+Math.imul(d,re)|0))<<13)|0;l=((r=r+Math.imul(d,se)|0)+(o>>>13)|0)+(Me>>>26)|0,Me&=67108863,i=Math.imul(E,B),o=(o=Math.imul(E,H))+Math.imul(A,B)|0,r=Math.imul(A,H),i=i+Math.imul(D,U)|0,o=(o=o+Math.imul(D,Y)|0)+Math.imul(k,U)|0,r=r+Math.imul(k,Y)|0,i=i+Math.imul(I,G)|0,o=(o=o+Math.imul(I,Q)|0)+Math.imul(N,G)|0,r=r+Math.imul(N,Q)|0,i=i+Math.imul(C,K)|0,o=(o=o+Math.imul(C,J)|0)+Math.imul(S,K)|0,r=r+Math.imul(S,J)|0,i=i+Math.imul(_,$)|0,o=(o=o+Math.imul(_,ee)|0)+Math.imul(w,$)|0,r=r+Math.imul(w,ee)|0,i=i+Math.imul(v,ne)|0,o=(o=o+Math.imul(v,ie)|0)+Math.imul(y,ne)|0,r=r+Math.imul(y,ie)|0,i=i+Math.imul(p,re)|0,o=(o=o+Math.imul(p,se)|0)+Math.imul(g,re)|0,r=r+Math.imul(g,se)|0;var Ce=(l+(i=i+Math.imul(h,ue)|0)|0)+((8191&(o=(o=o+Math.imul(h,le)|0)+Math.imul(d,ue)|0))<<13)|0;l=((r=r+Math.imul(d,le)|0)+(o>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,i=Math.imul(O,B),o=(o=Math.imul(O,H))+Math.imul(R,B)|0,r=Math.imul(R,H),i=i+Math.imul(E,U)|0,o=(o=o+Math.imul(E,Y)|0)+Math.imul(A,U)|0,r=r+Math.imul(A,Y)|0,i=i+Math.imul(D,G)|0,o=(o=o+Math.imul(D,Q)|0)+Math.imul(k,G)|0,r=r+Math.imul(k,Q)|0,i=i+Math.imul(I,K)|0,o=(o=o+Math.imul(I,J)|0)+Math.imul(N,K)|0,r=r+Math.imul(N,J)|0,i=i+Math.imul(C,$)|0,o=(o=o+Math.imul(C,ee)|0)+Math.imul(S,$)|0,r=r+Math.imul(S,ee)|0,i=i+Math.imul(_,ne)|0,o=(o=o+Math.imul(_,ie)|0)+Math.imul(w,ne)|0,r=r+Math.imul(w,ie)|0,i=i+Math.imul(v,re)|0,o=(o=o+Math.imul(v,se)|0)+Math.imul(y,re)|0,r=r+Math.imul(y,se)|0,i=i+Math.imul(p,ue)|0,o=(o=o+Math.imul(p,le)|0)+Math.imul(g,ue)|0,r=r+Math.imul(g,le)|0;var Se=(l+(i=i+Math.imul(h,he)|0)|0)+((8191&(o=(o=o+Math.imul(h,de)|0)+Math.imul(d,he)|0))<<13)|0;l=((r=r+Math.imul(d,de)|0)+(o>>>13)|0)+(Se>>>26)|0,Se&=67108863,i=Math.imul(z,B),o=(o=Math.imul(z,H))+Math.imul(W,B)|0,r=Math.imul(W,H),i=i+Math.imul(O,U)|0,o=(o=o+Math.imul(O,Y)|0)+Math.imul(R,U)|0,r=r+Math.imul(R,Y)|0,i=i+Math.imul(E,G)|0,o=(o=o+Math.imul(E,Q)|0)+Math.imul(A,G)|0,r=r+Math.imul(A,Q)|0,i=i+Math.imul(D,K)|0,o=(o=o+Math.imul(D,J)|0)+Math.imul(k,K)|0,r=r+Math.imul(k,J)|0,i=i+Math.imul(I,$)|0,o=(o=o+Math.imul(I,ee)|0)+Math.imul(N,$)|0,r=r+Math.imul(N,ee)|0,i=i+Math.imul(C,ne)|0,o=(o=o+Math.imul(C,ie)|0)+Math.imul(S,ne)|0,r=r+Math.imul(S,ie)|0,i=i+Math.imul(_,re)|0,o=(o=o+Math.imul(_,se)|0)+Math.imul(w,re)|0,r=r+Math.imul(w,se)|0,i=i+Math.imul(v,ue)|0,o=(o=o+Math.imul(v,le)|0)+Math.imul(y,ue)|0,r=r+Math.imul(y,le)|0,i=i+Math.imul(p,he)|0,o=(o=o+Math.imul(p,de)|0)+Math.imul(g,he)|0,r=r+Math.imul(g,de)|0;var Le=(l+(i=i+Math.imul(h,pe)|0)|0)+((8191&(o=(o=o+Math.imul(h,ge)|0)+Math.imul(d,pe)|0))<<13)|0;l=((r=r+Math.imul(d,ge)|0)+(o>>>13)|0)+(Le>>>26)|0,Le&=67108863,i=Math.imul(z,U),o=(o=Math.imul(z,Y))+Math.imul(W,U)|0,r=Math.imul(W,Y),i=i+Math.imul(O,G)|0,o=(o=o+Math.imul(O,Q)|0)+Math.imul(R,G)|0,r=r+Math.imul(R,Q)|0,i=i+Math.imul(E,K)|0,o=(o=o+Math.imul(E,J)|0)+Math.imul(A,K)|0,r=r+Math.imul(A,J)|0,i=i+Math.imul(D,$)|0,o=(o=o+Math.imul(D,ee)|0)+Math.imul(k,$)|0,r=r+Math.imul(k,ee)|0,i=i+Math.imul(I,ne)|0,o=(o=o+Math.imul(I,ie)|0)+Math.imul(N,ne)|0,r=r+Math.imul(N,ie)|0,i=i+Math.imul(C,re)|0,o=(o=o+Math.imul(C,se)|0)+Math.imul(S,re)|0,r=r+Math.imul(S,se)|0,i=i+Math.imul(_,ue)|0,o=(o=o+Math.imul(_,le)|0)+Math.imul(w,ue)|0,r=r+Math.imul(w,le)|0,i=i+Math.imul(v,he)|0,o=(o=o+Math.imul(v,de)|0)+Math.imul(y,he)|0,r=r+Math.imul(y,de)|0;var Ie=(l+(i=i+Math.imul(p,pe)|0)|0)+((8191&(o=(o=o+Math.imul(p,ge)|0)+Math.imul(g,pe)|0))<<13)|0;l=((r=r+Math.imul(g,ge)|0)+(o>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,i=Math.imul(z,G),o=(o=Math.imul(z,Q))+Math.imul(W,G)|0,r=Math.imul(W,Q),i=i+Math.imul(O,K)|0,o=(o=o+Math.imul(O,J)|0)+Math.imul(R,K)|0,r=r+Math.imul(R,J)|0,i=i+Math.imul(E,$)|0,o=(o=o+Math.imul(E,ee)|0)+Math.imul(A,$)|0,r=r+Math.imul(A,ee)|0,i=i+Math.imul(D,ne)|0,o=(o=o+Math.imul(D,ie)|0)+Math.imul(k,ne)|0,r=r+Math.imul(k,ie)|0,i=i+Math.imul(I,re)|0,o=(o=o+Math.imul(I,se)|0)+Math.imul(N,re)|0,r=r+Math.imul(N,se)|0,i=i+Math.imul(C,ue)|0,o=(o=o+Math.imul(C,le)|0)+Math.imul(S,ue)|0,r=r+Math.imul(S,le)|0,i=i+Math.imul(_,he)|0,o=(o=o+Math.imul(_,de)|0)+Math.imul(w,he)|0,r=r+Math.imul(w,de)|0;var Ne=(l+(i=i+Math.imul(v,pe)|0)|0)+((8191&(o=(o=o+Math.imul(v,ge)|0)+Math.imul(y,pe)|0))<<13)|0;l=((r=r+Math.imul(y,ge)|0)+(o>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,i=Math.imul(z,K),o=(o=Math.imul(z,J))+Math.imul(W,K)|0,r=Math.imul(W,J),i=i+Math.imul(O,$)|0,o=(o=o+Math.imul(O,ee)|0)+Math.imul(R,$)|0,r=r+Math.imul(R,ee)|0,i=i+Math.imul(E,ne)|0,o=(o=o+Math.imul(E,ie)|0)+Math.imul(A,ne)|0,r=r+Math.imul(A,ie)|0,i=i+Math.imul(D,re)|0,o=(o=o+Math.imul(D,se)|0)+Math.imul(k,re)|0,r=r+Math.imul(k,se)|0,i=i+Math.imul(I,ue)|0,o=(o=o+Math.imul(I,le)|0)+Math.imul(N,ue)|0,r=r+Math.imul(N,le)|0,i=i+Math.imul(C,he)|0,o=(o=o+Math.imul(C,de)|0)+Math.imul(S,he)|0,r=r+Math.imul(S,de)|0;var xe=(l+(i=i+Math.imul(_,pe)|0)|0)+((8191&(o=(o=o+Math.imul(_,ge)|0)+Math.imul(w,pe)|0))<<13)|0;l=((r=r+Math.imul(w,ge)|0)+(o>>>13)|0)+(xe>>>26)|0,xe&=67108863,i=Math.imul(z,$),o=(o=Math.imul(z,ee))+Math.imul(W,$)|0,r=Math.imul(W,ee),i=i+Math.imul(O,ne)|0,o=(o=o+Math.imul(O,ie)|0)+Math.imul(R,ne)|0,r=r+Math.imul(R,ie)|0,i=i+Math.imul(E,re)|0,o=(o=o+Math.imul(E,se)|0)+Math.imul(A,re)|0,r=r+Math.imul(A,se)|0,i=i+Math.imul(D,ue)|0,o=(o=o+Math.imul(D,le)|0)+Math.imul(k,ue)|0,r=r+Math.imul(k,le)|0,i=i+Math.imul(I,he)|0,o=(o=o+Math.imul(I,de)|0)+Math.imul(N,he)|0,r=r+Math.imul(N,de)|0;var De=(l+(i=i+Math.imul(C,pe)|0)|0)+((8191&(o=(o=o+Math.imul(C,ge)|0)+Math.imul(S,pe)|0))<<13)|0;l=((r=r+Math.imul(S,ge)|0)+(o>>>13)|0)+(De>>>26)|0,De&=67108863,i=Math.imul(z,ne),o=(o=Math.imul(z,ie))+Math.imul(W,ne)|0,r=Math.imul(W,ie),i=i+Math.imul(O,re)|0,o=(o=o+Math.imul(O,se)|0)+Math.imul(R,re)|0,r=r+Math.imul(R,se)|0,i=i+Math.imul(E,ue)|0,o=(o=o+Math.imul(E,le)|0)+Math.imul(A,ue)|0,r=r+Math.imul(A,le)|0,i=i+Math.imul(D,he)|0,o=(o=o+Math.imul(D,de)|0)+Math.imul(k,he)|0,r=r+Math.imul(k,de)|0;var ke=(l+(i=i+Math.imul(I,pe)|0)|0)+((8191&(o=(o=o+Math.imul(I,ge)|0)+Math.imul(N,pe)|0))<<13)|0;l=((r=r+Math.imul(N,ge)|0)+(o>>>13)|0)+(ke>>>26)|0,ke&=67108863,i=Math.imul(z,re),o=(o=Math.imul(z,se))+Math.imul(W,re)|0,r=Math.imul(W,se),i=i+Math.imul(O,ue)|0,o=(o=o+Math.imul(O,le)|0)+Math.imul(R,ue)|0,r=r+Math.imul(R,le)|0,i=i+Math.imul(E,he)|0,o=(o=o+Math.imul(E,de)|0)+Math.imul(A,he)|0,r=r+Math.imul(A,de)|0;var Te=(l+(i=i+Math.imul(D,pe)|0)|0)+((8191&(o=(o=o+Math.imul(D,ge)|0)+Math.imul(k,pe)|0))<<13)|0;l=((r=r+Math.imul(k,ge)|0)+(o>>>13)|0)+(Te>>>26)|0,Te&=67108863,i=Math.imul(z,ue),o=(o=Math.imul(z,le))+Math.imul(W,ue)|0,r=Math.imul(W,le),i=i+Math.imul(O,he)|0,o=(o=o+Math.imul(O,de)|0)+Math.imul(R,he)|0,r=r+Math.imul(R,de)|0;var Ee=(l+(i=i+Math.imul(E,pe)|0)|0)+((8191&(o=(o=o+Math.imul(E,ge)|0)+Math.imul(A,pe)|0))<<13)|0;l=((r=r+Math.imul(A,ge)|0)+(o>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,i=Math.imul(z,he),o=(o=Math.imul(z,de))+Math.imul(W,he)|0,r=Math.imul(W,de);var Ae=(l+(i=i+Math.imul(O,pe)|0)|0)+((8191&(o=(o=o+Math.imul(O,ge)|0)+Math.imul(R,pe)|0))<<13)|0;l=((r=r+Math.imul(R,ge)|0)+(o>>>13)|0)+(Ae>>>26)|0,Ae&=67108863;var je=(l+(i=Math.imul(z,pe))|0)+((8191&(o=(o=Math.imul(z,ge))+Math.imul(W,pe)|0))<<13)|0;return l=((r=Math.imul(W,ge))+(o>>>13)|0)+(je>>>26)|0,je&=67108863,u[0]=me,u[1]=ve,u[2]=ye,u[3]=be,u[4]=_e,u[5]=we,u[6]=Me,u[7]=Ce,u[8]=Se,u[9]=Le,u[10]=Ie,u[11]=Ne,u[12]=xe,u[13]=De,u[14]=ke,u[15]=Te,u[16]=Ee,u[17]=Ae,u[18]=je,0!==l&&(u[19]=l,n.length++),n};function g(e,t,n){return(new m).mulp(e,t,n)}function m(e,t){this.x=e,this.y=t}Math.imul||(p=f),r.prototype.mulTo=function(e,t){var n,i=this.length+e.length;return n=10===this.length&&10===e.length?p(this,e,t):i<63?f(this,e,t):i<1024?function(e,t,n){n.negative=t.negative^e.negative,n.length=e.length+t.length;for(var i=0,o=0,r=0;r>>26)|0)>>>26,s&=67108863}n.words[r]=a,i=s,s=o}return 0!==i?n.words[r]=i:n.length--,n.strip()}(this,e,t):g(this,e,t),n},m.prototype.makeRBT=function(e){for(var t=new Array(e),n=r.prototype._countBits(e)-1,i=0;i>=1;return i},m.prototype.permute=function(e,t,n,i,o,r){for(var s=0;s>>=1)o++;return 1<>>=13,n[2*s+1]=8191&r,r>>>=13;for(s=2*t;s>=26,t+=o/67108864|0,t+=r>>>26,this.words[n]=67108863&r}return 0!==t&&(this.words[n]=t,this.length++),this},r.prototype.muln=function(e){return this.clone().imuln(e)},r.prototype.sqr=function(){return this.mul(this)},r.prototype.isqr=function(){return this.imul(this.clone())},r.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),n=0;n>>o}return t}(e);if(0===t.length)return new r(1);for(var n=this,i=0;i=0);var t,n=e%26,o=(e-n)/26,r=67108863>>>26-n<<26-n;if(0!==n){var s=0;for(t=0;t>>26-n}s&&(this.words[t]=s,this.length++)}if(0!==o){for(t=this.length-1;t>=0;t--)this.words[t+o]=this.words[t];for(t=0;t=0),o=t?(t-t%26)/26:0;var r=e%26,s=Math.min((e-r)/26,this.length),a=67108863^67108863>>>r<s)for(this.length-=s,l=0;l=0&&(0!==c||l>=o);l--){var h=0|this.words[l];this.words[l]=c<<26-r|h>>>r,c=h&a}return u&&0!==c&&(u.words[u.length++]=c),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},r.prototype.ishrn=function(e,t,n){return i(0===this.negative),this.iushrn(e,t,n)},r.prototype.shln=function(e){return this.clone().ishln(e)},r.prototype.ushln=function(e){return this.clone().iushln(e)},r.prototype.shrn=function(e){return this.clone().ishrn(e)},r.prototype.ushrn=function(e){return this.clone().iushrn(e)},r.prototype.testn=function(e){i("number"==typeof e&&e>=0);var t=e%26,n=(e-t)/26,o=1<=0);var t=e%26,n=(e-t)/26;if(i(0===this.negative,"imaskn works only with positive numbers"),this.length<=n)return this;if(0!==t&&n++,this.length=Math.min(n,this.length),0!==t){var o=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},r.prototype.isubn=function(e){if(i("number"==typeof e),i(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(u/67108864|0),this.words[o+n]=67108863&r}for(;o>26,this.words[o+n]=67108863&r;if(0===a)return this.strip();for(i(-1===a),a=0,o=0;o>26,this.words[o]=67108863&r;return this.negative=1,this.strip()},r.prototype._wordDiv=function(e,t){var n=(this.length,e.length),i=this.clone(),o=e,s=0|o.words[o.length-1];0!=(n=26-this._countBits(s))&&(o=o.ushln(n),i.iushln(n),s=0|o.words[o.length-1]);var a,u=i.length-o.length;if("mod"!==t){(a=new r(null)).length=u+1,a.words=new Array(a.length);for(var l=0;l=0;h--){var d=67108864*(0|i.words[o.length+h])+(0|i.words[o.length+h-1]);for(d=Math.min(d/s|0,67108863),i._ishlnsubmul(o,d,h);0!==i.negative;)d--,i.negative=0,i._ishlnsubmul(o,1,h),i.isZero()||(i.negative^=1);a&&(a.words[h]=d)}return a&&a.strip(),i.strip(),"div"!==t&&0!==n&&i.iushrn(n),{div:a||null,mod:i}},r.prototype.divmod=function(e,t,n){return i(!e.isZero()),this.isZero()?{div:new r(0),mod:new r(0)}:0!==this.negative&&0===e.negative?(a=this.neg().divmod(e,t),"mod"!==t&&(o=a.div.neg()),"div"!==t&&(s=a.mod.neg(),n&&0!==s.negative&&s.iadd(e)),{div:o,mod:s}):0===this.negative&&0!==e.negative?(a=this.divmod(e.neg(),t),"mod"!==t&&(o=a.div.neg()),{div:o,mod:a.mod}):this.negative&e.negative?(a=this.neg().divmod(e.neg(),t),"div"!==t&&(s=a.mod.neg(),n&&0!==s.negative&&s.isub(e)),{div:a.div,mod:s}):e.length>this.length||this.cmp(e)<0?{div:new r(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new r(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new r(this.modn(e.words[0]))}:this._wordDiv(e,t);var o,s,a},r.prototype.div=function(e){return this.divmod(e,"div",!1).div},r.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},r.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},r.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var n=0!==t.div.negative?t.mod.isub(e):t.mod,i=e.ushrn(1),o=e.andln(1),r=n.cmp(i);return r<0||1===o&&0===r?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},r.prototype.modn=function(e){i(e<=67108863);for(var t=(1<<26)%e,n=0,o=this.length-1;o>=0;o--)n=(t*n+(0|this.words[o]))%e;return n},r.prototype.idivn=function(e){i(e<=67108863);for(var t=0,n=this.length-1;n>=0;n--){var o=(0|this.words[n])+67108864*t;this.words[n]=o/e|0,t=o%e}return this.strip()},r.prototype.divn=function(e){return this.clone().idivn(e)},r.prototype.egcd=function(e){i(0===e.negative),i(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var o=new r(1),s=new r(0),a=new r(0),u=new r(1),l=0;t.isEven()&&n.isEven();)t.iushrn(1),n.iushrn(1),++l;for(var c=n.clone(),h=t.clone();!t.isZero();){for(var d=0,f=1;!(t.words[0]&f)&&d<26;++d,f<<=1);if(d>0)for(t.iushrn(d);d-- >0;)(o.isOdd()||s.isOdd())&&(o.iadd(c),s.isub(h)),o.iushrn(1),s.iushrn(1);for(var p=0,g=1;!(n.words[0]&g)&&p<26;++p,g<<=1);if(p>0)for(n.iushrn(p);p-- >0;)(a.isOdd()||u.isOdd())&&(a.iadd(c),u.isub(h)),a.iushrn(1),u.iushrn(1);t.cmp(n)>=0?(t.isub(n),o.isub(a),s.isub(u)):(n.isub(t),a.isub(o),u.isub(s))}return{a,b:u,gcd:n.iushln(l)}},r.prototype._invmp=function(e){i(0===e.negative),i(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var o,s=new r(1),a=new r(0),u=n.clone();t.cmpn(1)>0&&n.cmpn(1)>0;){for(var l=0,c=1;!(t.words[0]&c)&&l<26;++l,c<<=1);if(l>0)for(t.iushrn(l);l-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);for(var h=0,d=1;!(n.words[0]&d)&&h<26;++h,d<<=1);if(h>0)for(n.iushrn(h);h-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);t.cmp(n)>=0?(t.isub(n),s.isub(a)):(n.isub(t),a.isub(s))}return(o=0===t.cmpn(1)?s:a).cmpn(0)<0&&o.iadd(e),o},r.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),n=e.clone();t.negative=0,n.negative=0;for(var i=0;t.isEven()&&n.isEven();i++)t.iushrn(1),n.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;n.isEven();)n.iushrn(1);var o=t.cmp(n);if(o<0){var r=t;t=n,n=r}else if(0===o||0===n.cmpn(1))break;t.isub(n)}return n.iushln(i)},r.prototype.invm=function(e){return this.egcd(e).a.umod(e)},r.prototype.isEven=function(){return!(1&this.words[0])},r.prototype.isOdd=function(){return!(1&~this.words[0])},r.prototype.andln=function(e){return this.words[0]&e},r.prototype.bincn=function(e){i("number"==typeof e);var t=e%26,n=(e-t)/26,o=1<>>26,a&=67108863,this.words[s]=a}return 0!==r&&(this.words[s]=r,this.length++),this},r.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},r.prototype.cmpn=function(e){var t,n=e<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this.strip(),this.length>1)t=1;else{n&&(e=-e),i(e<=67108863,"Number is too big");var o=0|this.words[0];t=o===e?0:oe.length)return 1;if(this.length=0;n--){var i=0|this.words[n],o=0|e.words[n];if(i!==o){io&&(t=1);break}}return t},r.prototype.gtn=function(e){return 1===this.cmpn(e)},r.prototype.gt=function(e){return 1===this.cmp(e)},r.prototype.gten=function(e){return this.cmpn(e)>=0},r.prototype.gte=function(e){return this.cmp(e)>=0},r.prototype.ltn=function(e){return-1===this.cmpn(e)},r.prototype.lt=function(e){return-1===this.cmp(e)},r.prototype.lten=function(e){return this.cmpn(e)<=0},r.prototype.lte=function(e){return this.cmp(e)<=0},r.prototype.eqn=function(e){return 0===this.cmpn(e)},r.prototype.eq=function(e){return 0===this.cmp(e)},r.red=function(e){return new C(e)},r.prototype.toRed=function(e){return i(!this.red,"Already a number in reduction context"),i(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},r.prototype.fromRed=function(){return i(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},r.prototype._forceRed=function(e){return this.red=e,this},r.prototype.forceRed=function(e){return i(!this.red,"Already a number in reduction context"),this._forceRed(e)},r.prototype.redAdd=function(e){return i(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},r.prototype.redIAdd=function(e){return i(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},r.prototype.redSub=function(e){return i(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},r.prototype.redISub=function(e){return i(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},r.prototype.redShl=function(e){return i(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},r.prototype.redMul=function(e){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},r.prototype.redIMul=function(e){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},r.prototype.redSqr=function(){return i(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},r.prototype.redISqr=function(){return i(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},r.prototype.redSqrt=function(){return i(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},r.prototype.redInvm=function(){return i(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},r.prototype.redNeg=function(){return i(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},r.prototype.redPow=function(e){return i(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var v={k256:null,p224:null,p192:null,p25519:null};function y(e,t){this.name=e,this.p=new r(t,16),this.n=this.p.bitLength(),this.k=new r(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function b(){y.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function _(){y.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){y.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function M(){y.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function C(e){if("string"==typeof e){var t=r._prime(e);this.m=t.p,this.prime=t}else i(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function S(e){C.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new r(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}y.prototype._tmp=function(){var e=new r(null);return e.words=new Array(Math.ceil(this.n/13)),e},y.prototype.ireduce=function(e){var t,n=e;do{this.split(n,this.tmp),t=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(t>this.n);var i=t0?n.isub(this.p):void 0!==n.strip?n.strip():n._strip(),n},y.prototype.split=function(e,t){e.iushrn(this.n,0,t)},y.prototype.imulK=function(e){return e.imul(this.k)},o(b,y),b.prototype.split=function(e,t){for(var n=4194303,i=Math.min(e.length,9),o=0;o>>22,r=s}r>>>=22,e.words[o-10]=r,0===r&&e.length>10?e.length-=10:e.length-=9},b.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,n=0;n>>=26,e.words[n]=o,t=i}return 0!==t&&(e.words[e.length++]=t),e},r._prime=function(e){if(v[e])return v[e];var t;if("k256"===e)t=new b;else if("p224"===e)t=new _;else if("p192"===e)t=new w;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new M}return v[e]=t,t},C.prototype._verify1=function(e){i(0===e.negative,"red works only with positives"),i(e.red,"red works only with red numbers")},C.prototype._verify2=function(e,t){i(!(e.negative|t.negative),"red works only with positives"),i(e.red&&e.red===t.red,"red works only with red numbers")},C.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},C.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},C.prototype.add=function(e,t){this._verify2(e,t);var n=e.add(t);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},C.prototype.iadd=function(e,t){this._verify2(e,t);var n=e.iadd(t);return n.cmp(this.m)>=0&&n.isub(this.m),n},C.prototype.sub=function(e,t){this._verify2(e,t);var n=e.sub(t);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},C.prototype.isub=function(e,t){this._verify2(e,t);var n=e.isub(t);return n.cmpn(0)<0&&n.iadd(this.m),n},C.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},C.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},C.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},C.prototype.isqr=function(e){return this.imul(e,e.clone())},C.prototype.sqr=function(e){return this.mul(e,e)},C.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(i(t%2==1),3===t){var n=this.m.add(new r(1)).iushrn(2);return this.pow(e,n)}for(var o=this.m.subn(1),s=0;!o.isZero()&&0===o.andln(1);)s++,o.iushrn(1);i(!o.isZero());var a=new r(1).toRed(this),u=a.redNeg(),l=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new r(2*c*c).toRed(this);0!==this.pow(c,l).cmp(u);)c.redIAdd(u);for(var h=this.pow(c,o),d=this.pow(e,o.addn(1).iushrn(1)),f=this.pow(e,o),p=s;0!==f.cmp(a);){for(var g=f,m=0;0!==g.cmp(a);m++)g=g.redSqr();i(m=0;i--){for(var l=t.words[i],c=u-1;c>=0;c--){var h=l>>c&1;o!==n[0]&&(o=this.sqr(o)),0!==h||0!==s?(s<<=1,s|=h,(4==++a||0===i&&0===c)&&(o=this.mul(o,n[s]),a=0,s=0)):a=0}u=26}return o},C.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},C.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},r.mont=function(e){return new S(e)},o(S,C),S.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},S.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},S.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var n=e.imul(t),i=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=n.isub(i).iushrn(this.shift),r=o;return o.cmp(this.m)>=0?r=o.isub(this.m):o.cmpn(0)<0&&(r=o.iadd(this.m)),r._forceRed(this)},S.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new r(0)._forceRed(this);var n=e.mul(t),i=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=n.isub(i).iushrn(this.shift),s=o;return o.cmp(this.m)>=0?s=o.isub(this.m):o.cmpn(0)<0&&(s=o.iadd(this.m)),s._forceRed(this)},S.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=n.nmd(e),this)},9478:(e,t,n)=>{"use strict";var i=t;i.version=n(1636).rE,i.utils=n(4528),i.rand=n(4366),i.curve=n(1766),i.curves=n(1353),i.ec=n(674),i.eddsa=n(6197)},700:(e,t,n)=>{"use strict";var i=n(8499),o=n(4528),r=o.getNAF,s=o.getJSF,a=o.assert;function u(e,t){this.type=e,this.p=new i(t.p,16),this.red=t.prime?i.red(t.prime):i.mont(this.p),this.zero=new i(0).toRed(this.red),this.one=new i(1).toRed(this.red),this.two=new i(2).toRed(this.red),this.n=t.n&&new i(t.n,16),this.g=t.g&&this.pointFromJSON(t.g,t.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var n=this.n&&this.p.div(this.n);!n||n.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function l(e,t){this.curve=e,this.type=t,this.precomputed=null}e.exports=u,u.prototype.point=function(){throw new Error("Not implemented")},u.prototype.validate=function(){throw new Error("Not implemented")},u.prototype._fixedNafMul=function(e,t){a(e.precomputed);var n=e._getDoubles(),i=r(t,1,this._bitLength),o=(1<=s;c--)u=(u<<1)+i[c];l.push(u)}for(var h=this.jpoint(null,null,null),d=this.jpoint(null,null,null),f=o;f>0;f--){for(s=0;s=0;l--){for(var c=0;l>=0&&0===s[l];l--)c++;if(l>=0&&c++,u=u.dblp(c),l<0)break;var h=s[l];a(0!==h),u="affine"===e.type?h>0?u.mixedAdd(o[h-1>>1]):u.mixedAdd(o[-h-1>>1].neg()):h>0?u.add(o[h-1>>1]):u.add(o[-h-1>>1].neg())}return"affine"===e.type?u.toP():u},u.prototype._wnafMulAdd=function(e,t,n,i,o){var a,u,l,c=this._wnafT1,h=this._wnafT2,d=this._wnafT3,f=0;for(a=0;a=1;a-=2){var g=a-1,m=a;if(1===c[g]&&1===c[m]){var v=[t[g],null,null,t[m]];0===t[g].y.cmp(t[m].y)?(v[1]=t[g].add(t[m]),v[2]=t[g].toJ().mixedAdd(t[m].neg())):0===t[g].y.cmp(t[m].y.redNeg())?(v[1]=t[g].toJ().mixedAdd(t[m]),v[2]=t[g].add(t[m].neg())):(v[1]=t[g].toJ().mixedAdd(t[m]),v[2]=t[g].toJ().mixedAdd(t[m].neg()));var y=[-3,-1,-5,-7,0,7,5,1,3],b=s(n[g],n[m]);for(f=Math.max(b[0].length,f),d[g]=new Array(f),d[m]=new Array(f),u=0;u=0;a--){for(var S=0;a>=0;){var L=!0;for(u=0;u=0&&S++,M=M.dblp(S),a<0)break;for(u=0;u0?l=h[u][I-1>>1]:I<0&&(l=h[u][-I-1>>1].neg()),M="affine"===l.type?M.mixedAdd(l):M.add(l))}}for(a=0;a=Math.ceil((e.bitLength()+1)/t.step)},l.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var n=[this],i=this,o=0;o{"use strict";var i=n(4528),o=n(8499),r=n(6987),s=n(700),a=i.assert;function u(e){this.twisted=1!=(0|e.a),this.mOneA=this.twisted&&-1==(0|e.a),this.extended=this.mOneA,s.call(this,"edwards",e),this.a=new o(e.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new o(e.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new o(e.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),a(!this.twisted||0===this.c.fromRed().cmpn(1)),this.oneC=1==(0|e.c)}function l(e,t,n,i,r){s.BasePoint.call(this,e,"projective"),null===t&&null===n&&null===i?(this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0):(this.x=new o(t,16),this.y=new o(n,16),this.z=i?new o(i,16):this.curve.one,this.t=r&&new o(r,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.t&&!this.t.red&&(this.t=this.t.toRed(this.curve.red)),this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t&&(this.t=this.x.redMul(this.y),this.zOne||(this.t=this.t.redMul(this.z.redInvm()))))}r(u,s),e.exports=u,u.prototype._mulA=function(e){return this.mOneA?e.redNeg():this.a.redMul(e)},u.prototype._mulC=function(e){return this.oneC?e:this.c.redMul(e)},u.prototype.jpoint=function(e,t,n,i){return this.point(e,t,n,i)},u.prototype.pointFromX=function(e,t){(e=new o(e,16)).red||(e=e.toRed(this.red));var n=e.redSqr(),i=this.c2.redSub(this.a.redMul(n)),r=this.one.redSub(this.c2.redMul(this.d).redMul(n)),s=i.redMul(r.redInvm()),a=s.redSqrt();if(0!==a.redSqr().redSub(s).cmp(this.zero))throw new Error("invalid point");var u=a.fromRed().isOdd();return(t&&!u||!t&&u)&&(a=a.redNeg()),this.point(e,a)},u.prototype.pointFromY=function(e,t){(e=new o(e,16)).red||(e=e.toRed(this.red));var n=e.redSqr(),i=n.redSub(this.c2),r=n.redMul(this.d).redMul(this.c2).redSub(this.a),s=i.redMul(r.redInvm());if(0===s.cmp(this.zero)){if(t)throw new Error("invalid point");return this.point(this.zero,e)}var a=s.redSqrt();if(0!==a.redSqr().redSub(s).cmp(this.zero))throw new Error("invalid point");return a.fromRed().isOdd()!==t&&(a=a.redNeg()),this.point(a,e)},u.prototype.validate=function(e){if(e.isInfinity())return!0;e.normalize();var t=e.x.redSqr(),n=e.y.redSqr(),i=t.redMul(this.a).redAdd(n),o=this.c2.redMul(this.one.redAdd(this.d.redMul(t).redMul(n)));return 0===i.cmp(o)},r(l,s.BasePoint),u.prototype.pointFromJSON=function(e){return l.fromJSON(this,e)},u.prototype.point=function(e,t,n,i){return new l(this,e,t,n,i)},l.fromJSON=function(e,t){return new l(e,t[0],t[1],t[2])},l.prototype.inspect=function(){return this.isInfinity()?"":""},l.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c))},l.prototype._extDbl=function(){var e=this.x.redSqr(),t=this.y.redSqr(),n=this.z.redSqr();n=n.redIAdd(n);var i=this.curve._mulA(e),o=this.x.redAdd(this.y).redSqr().redISub(e).redISub(t),r=i.redAdd(t),s=r.redSub(n),a=i.redSub(t),u=o.redMul(s),l=r.redMul(a),c=o.redMul(a),h=s.redMul(r);return this.curve.point(u,l,h,c)},l.prototype._projDbl=function(){var e,t,n,i,o,r,s=this.x.redAdd(this.y).redSqr(),a=this.x.redSqr(),u=this.y.redSqr();if(this.curve.twisted){var l=(i=this.curve._mulA(a)).redAdd(u);this.zOne?(e=s.redSub(a).redSub(u).redMul(l.redSub(this.curve.two)),t=l.redMul(i.redSub(u)),n=l.redSqr().redSub(l).redSub(l)):(o=this.z.redSqr(),r=l.redSub(o).redISub(o),e=s.redSub(a).redISub(u).redMul(r),t=l.redMul(i.redSub(u)),n=l.redMul(r))}else i=a.redAdd(u),o=this.curve._mulC(this.z).redSqr(),r=i.redSub(o).redSub(o),e=this.curve._mulC(s.redISub(i)).redMul(r),t=this.curve._mulC(i).redMul(a.redISub(u)),n=i.redMul(r);return this.curve.point(e,t,n)},l.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},l.prototype._extAdd=function(e){var t=this.y.redSub(this.x).redMul(e.y.redSub(e.x)),n=this.y.redAdd(this.x).redMul(e.y.redAdd(e.x)),i=this.t.redMul(this.curve.dd).redMul(e.t),o=this.z.redMul(e.z.redAdd(e.z)),r=n.redSub(t),s=o.redSub(i),a=o.redAdd(i),u=n.redAdd(t),l=r.redMul(s),c=a.redMul(u),h=r.redMul(u),d=s.redMul(a);return this.curve.point(l,c,d,h)},l.prototype._projAdd=function(e){var t,n,i=this.z.redMul(e.z),o=i.redSqr(),r=this.x.redMul(e.x),s=this.y.redMul(e.y),a=this.curve.d.redMul(r).redMul(s),u=o.redSub(a),l=o.redAdd(a),c=this.x.redAdd(this.y).redMul(e.x.redAdd(e.y)).redISub(r).redISub(s),h=i.redMul(u).redMul(c);return this.curve.twisted?(t=i.redMul(l).redMul(s.redSub(this.curve._mulA(r))),n=u.redMul(l)):(t=i.redMul(l).redMul(s.redSub(r)),n=this.curve._mulC(u).redMul(l)),this.curve.point(h,t,n)},l.prototype.add=function(e){return this.isInfinity()?e:e.isInfinity()?this:this.curve.extended?this._extAdd(e):this._projAdd(e)},l.prototype.mul=function(e){return this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve._wnafMul(this,e)},l.prototype.mulAdd=function(e,t,n){return this.curve._wnafMulAdd(1,[this,t],[e,n],2,!1)},l.prototype.jmulAdd=function(e,t,n){return this.curve._wnafMulAdd(1,[this,t],[e,n],2,!0)},l.prototype.normalize=function(){if(this.zOne)return this;var e=this.z.redInvm();return this.x=this.x.redMul(e),this.y=this.y.redMul(e),this.t&&(this.t=this.t.redMul(e)),this.z=this.curve.one,this.zOne=!0,this},l.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},l.prototype.getX=function(){return this.normalize(),this.x.fromRed()},l.prototype.getY=function(){return this.normalize(),this.y.fromRed()},l.prototype.eq=function(e){return this===e||0===this.getX().cmp(e.getX())&&0===this.getY().cmp(e.getY())},l.prototype.eqXToP=function(e){var t=e.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(t))return!0;for(var n=e.clone(),i=this.curve.redN.redMul(this.z);;){if(n.iadd(this.curve.n),n.cmp(this.curve.p)>=0)return!1;if(t.redIAdd(i),0===this.x.cmp(t))return!0}},l.prototype.toP=l.prototype.normalize,l.prototype.mixedAdd=l.prototype.add},1766:(e,t,n)=>{"use strict";var i=t;i.base=n(700),i.short=n(11),i.mont=n(4803),i.edwards=n(3217)},4803:(e,t,n)=>{"use strict";var i=n(8499),o=n(6987),r=n(700),s=n(4528);function a(e){r.call(this,"mont",e),this.a=new i(e.a,16).toRed(this.red),this.b=new i(e.b,16).toRed(this.red),this.i4=new i(4).toRed(this.red).redInvm(),this.two=new i(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function u(e,t,n){r.BasePoint.call(this,e,"projective"),null===t&&null===n?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new i(t,16),this.z=new i(n,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}o(a,r),e.exports=a,a.prototype.validate=function(e){var t=e.normalize().x,n=t.redSqr(),i=n.redMul(t).redAdd(n.redMul(this.a)).redAdd(t);return 0===i.redSqrt().redSqr().cmp(i)},o(u,r.BasePoint),a.prototype.decodePoint=function(e,t){return this.point(s.toArray(e,t),1)},a.prototype.point=function(e,t){return new u(this,e,t)},a.prototype.pointFromJSON=function(e){return u.fromJSON(this,e)},u.prototype.precompute=function(){},u.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},u.fromJSON=function(e,t){return new u(e,t[0],t[1]||e.one)},u.prototype.inspect=function(){return this.isInfinity()?"":""},u.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},u.prototype.dbl=function(){var e=this.x.redAdd(this.z).redSqr(),t=this.x.redSub(this.z).redSqr(),n=e.redSub(t),i=e.redMul(t),o=n.redMul(t.redAdd(this.curve.a24.redMul(n)));return this.curve.point(i,o)},u.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},u.prototype.diffAdd=function(e,t){var n=this.x.redAdd(this.z),i=this.x.redSub(this.z),o=e.x.redAdd(e.z),r=e.x.redSub(e.z).redMul(n),s=o.redMul(i),a=t.z.redMul(r.redAdd(s).redSqr()),u=t.x.redMul(r.redISub(s).redSqr());return this.curve.point(a,u)},u.prototype.mul=function(e){for(var t=e.clone(),n=this,i=this.curve.point(null,null),o=[];0!==t.cmpn(0);t.iushrn(1))o.push(t.andln(1));for(var r=o.length-1;r>=0;r--)0===o[r]?(n=n.diffAdd(i,this),i=i.dbl()):(i=n.diffAdd(i,this),n=n.dbl());return i},u.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},u.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},u.prototype.eq=function(e){return 0===this.getX().cmp(e.getX())},u.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},u.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},11:(e,t,n)=>{"use strict";var i=n(4528),o=n(8499),r=n(6987),s=n(700),a=i.assert;function u(e){s.call(this,"short",e),this.a=new o(e.a,16).toRed(this.red),this.b=new o(e.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=0===this.a.fromRed().cmpn(0),this.threeA=0===this.a.fromRed().sub(this.p).cmpn(-3),this.endo=this._getEndomorphism(e),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}function l(e,t,n,i){s.BasePoint.call(this,e,"affine"),null===t&&null===n?(this.x=null,this.y=null,this.inf=!0):(this.x=new o(t,16),this.y=new o(n,16),i&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function c(e,t,n,i){s.BasePoint.call(this,e,"jacobian"),null===t&&null===n&&null===i?(this.x=this.curve.one,this.y=this.curve.one,this.z=new o(0)):(this.x=new o(t,16),this.y=new o(n,16),this.z=new o(i,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}r(u,s),e.exports=u,u.prototype._getEndomorphism=function(e){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var t,n;if(e.beta)t=new o(e.beta,16).toRed(this.red);else{var i=this._getEndoRoots(this.p);t=(t=i[0].cmp(i[1])<0?i[0]:i[1]).toRed(this.red)}if(e.lambda)n=new o(e.lambda,16);else{var r=this._getEndoRoots(this.n);0===this.g.mul(r[0]).x.cmp(this.g.x.redMul(t))?n=r[0]:(n=r[1],a(0===this.g.mul(n).x.cmp(this.g.x.redMul(t))))}return{beta:t,lambda:n,basis:e.basis?e.basis.map((function(e){return{a:new o(e.a,16),b:new o(e.b,16)}})):this._getEndoBasis(n)}}},u.prototype._getEndoRoots=function(e){var t=e===this.p?this.red:o.mont(e),n=new o(2).toRed(t).redInvm(),i=n.redNeg(),r=new o(3).toRed(t).redNeg().redSqrt().redMul(n);return[i.redAdd(r).fromRed(),i.redSub(r).fromRed()]},u.prototype._getEndoBasis=function(e){for(var t,n,i,r,s,a,u,l,c,h=this.n.ushrn(Math.floor(this.n.bitLength()/2)),d=e,f=this.n.clone(),p=new o(1),g=new o(0),m=new o(0),v=new o(1),y=0;0!==d.cmpn(0);){var b=f.div(d);l=f.sub(b.mul(d)),c=m.sub(b.mul(p));var _=v.sub(b.mul(g));if(!i&&l.cmp(h)<0)t=u.neg(),n=p,i=l.neg(),r=c;else if(i&&2==++y)break;u=l,f=d,d=l,m=p,p=c,v=g,g=_}s=l.neg(),a=c;var w=i.sqr().add(r.sqr());return s.sqr().add(a.sqr()).cmp(w)>=0&&(s=t,a=n),i.negative&&(i=i.neg(),r=r.neg()),s.negative&&(s=s.neg(),a=a.neg()),[{a:i,b:r},{a:s,b:a}]},u.prototype._endoSplit=function(e){var t=this.endo.basis,n=t[0],i=t[1],o=i.b.mul(e).divRound(this.n),r=n.b.neg().mul(e).divRound(this.n),s=o.mul(n.a),a=r.mul(i.a),u=o.mul(n.b),l=r.mul(i.b);return{k1:e.sub(s).sub(a),k2:u.add(l).neg()}},u.prototype.pointFromX=function(e,t){(e=new o(e,16)).red||(e=e.toRed(this.red));var n=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),i=n.redSqrt();if(0!==i.redSqr().redSub(n).cmp(this.zero))throw new Error("invalid point");var r=i.fromRed().isOdd();return(t&&!r||!t&&r)&&(i=i.redNeg()),this.point(e,i)},u.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,n=e.y,i=this.a.redMul(t),o=t.redSqr().redMul(t).redIAdd(i).redIAdd(this.b);return 0===n.redSqr().redISub(o).cmpn(0)},u.prototype._endoWnafMulAdd=function(e,t,n){for(var i=this._endoWnafT1,o=this._endoWnafT2,r=0;r":""},l.prototype.isInfinity=function(){return this.inf},l.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(0===this.x.cmp(e.x))return this.curve.point(null,null);var t=this.y.redSub(e.y);0!==t.cmpn(0)&&(t=t.redMul(this.x.redSub(e.x).redInvm()));var n=t.redSqr().redISub(this.x).redISub(e.x),i=t.redMul(this.x.redSub(n)).redISub(this.y);return this.curve.point(n,i)},l.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(0===e.cmpn(0))return this.curve.point(null,null);var t=this.curve.a,n=this.x.redSqr(),i=e.redInvm(),o=n.redAdd(n).redIAdd(n).redIAdd(t).redMul(i),r=o.redSqr().redISub(this.x.redAdd(this.x)),s=o.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,s)},l.prototype.getX=function(){return this.x.fromRed()},l.prototype.getY=function(){return this.y.fromRed()},l.prototype.mul=function(e){return e=new o(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)},l.prototype.mulAdd=function(e,t,n){var i=[this,t],o=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(i,o):this.curve._wnafMulAdd(1,i,o,2)},l.prototype.jmulAdd=function(e,t,n){var i=[this,t],o=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(i,o,!0):this.curve._wnafMulAdd(1,i,o,2,!0)},l.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||0===this.x.cmp(e.x)&&0===this.y.cmp(e.y))},l.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var n=this.precomputed,i=function(e){return e.neg()};t.precomputed={naf:n.naf&&{wnd:n.naf.wnd,points:n.naf.points.map(i)},doubles:n.doubles&&{step:n.doubles.step,points:n.doubles.points.map(i)}}}return t},l.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},r(c,s.BasePoint),u.prototype.jpoint=function(e,t,n){return new c(this,e,t,n)},c.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),n=this.x.redMul(t),i=this.y.redMul(t).redMul(e);return this.curve.point(n,i)},c.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},c.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),n=this.z.redSqr(),i=this.x.redMul(t),o=e.x.redMul(n),r=this.y.redMul(t.redMul(e.z)),s=e.y.redMul(n.redMul(this.z)),a=i.redSub(o),u=r.redSub(s);if(0===a.cmpn(0))return 0!==u.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var l=a.redSqr(),c=l.redMul(a),h=i.redMul(l),d=u.redSqr().redIAdd(c).redISub(h).redISub(h),f=u.redMul(h.redISub(d)).redISub(r.redMul(c)),p=this.z.redMul(e.z).redMul(a);return this.curve.jpoint(d,f,p)},c.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),n=this.x,i=e.x.redMul(t),o=this.y,r=e.y.redMul(t).redMul(this.z),s=n.redSub(i),a=o.redSub(r);if(0===s.cmpn(0))return 0!==a.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var u=s.redSqr(),l=u.redMul(s),c=n.redMul(u),h=a.redSqr().redIAdd(l).redISub(c).redISub(c),d=a.redMul(c.redISub(h)).redISub(o.redMul(l)),f=this.z.redMul(s);return this.curve.jpoint(h,d,f)},c.prototype.dblp=function(e){if(0===e)return this;if(this.isInfinity())return this;if(!e)return this.dbl();var t;if(this.curve.zeroA||this.curve.threeA){var n=this;for(t=0;t=0)return!1;if(n.redIAdd(o),0===this.x.cmp(n))return!0}},c.prototype.inspect=function(){return this.isInfinity()?"":""},c.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},1353:(e,t,n)=>{"use strict";var i,o=t,r=n(3502),s=n(1766),a=n(4528).assert;function u(e){"short"===e.type?this.curve=new s.short(e):"edwards"===e.type?this.curve=new s.edwards(e):this.curve=new s.mont(e),this.g=this.curve.g,this.n=this.curve.n,this.hash=e.hash,a(this.g.validate(),"Invalid curve"),a(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function l(e,t){Object.defineProperty(o,e,{configurable:!0,enumerable:!0,get:function(){var n=new u(t);return Object.defineProperty(o,e,{configurable:!0,enumerable:!0,value:n}),n}})}o.PresetCurve=u,l("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:r.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),l("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:r.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),l("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:r.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),l("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:r.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),l("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:r.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),l("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:r.sha256,gRed:!1,g:["9"]}),l("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:r.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{i=n(9160)}catch(e){i=void 0}l("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:r.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",i]})},674:(e,t,n)=>{"use strict";var i=n(8499),o=n(4484),r=n(4528),s=n(1353),a=n(4366),u=r.assert,l=n(4765),c=n(4964);function h(e){if(!(this instanceof h))return new h(e);"string"==typeof e&&(u(Object.prototype.hasOwnProperty.call(s,e),"Unknown curve "+e),e=s[e]),e instanceof s.PresetCurve&&(e={curve:e}),this.curve=e.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=e.curve.g,this.g.precompute(e.curve.n.bitLength()+1),this.hash=e.hash||e.curve.hash}e.exports=h,h.prototype.keyPair=function(e){return new l(this,e)},h.prototype.keyFromPrivate=function(e,t){return l.fromPrivate(this,e,t)},h.prototype.keyFromPublic=function(e,t){return l.fromPublic(this,e,t)},h.prototype.genKeyPair=function(e){e||(e={});for(var t=new o({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||a(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),n=this.n.byteLength(),r=this.n.sub(new i(2));;){var s=new i(t.generate(n));if(!(s.cmp(r)>0))return s.iaddn(1),this.keyFromPrivate(s)}},h.prototype._truncateToN=function(e,t){var n=8*e.byteLength()-this.n.bitLength();return n>0&&(e=e.ushrn(n)),!t&&e.cmp(this.n)>=0?e.sub(this.n):e},h.prototype.sign=function(e,t,n,r){"object"==typeof n&&(r=n,n=null),r||(r={}),t=this.keyFromPrivate(t,n),e=this._truncateToN(new i(e,16));for(var s=this.n.byteLength(),a=t.getPrivate().toArray("be",s),u=e.toArray("be",s),l=new o({hash:this.hash,entropy:a,nonce:u,pers:r.pers,persEnc:r.persEnc||"utf8"}),h=this.n.sub(new i(1)),d=0;;d++){var f=r.k?r.k(d):new i(l.generate(this.n.byteLength()));if(!((f=this._truncateToN(f,!0)).cmpn(1)<=0||f.cmp(h)>=0)){var p=this.g.mul(f);if(!p.isInfinity()){var g=p.getX(),m=g.umod(this.n);if(0!==m.cmpn(0)){var v=f.invm(this.n).mul(m.mul(t.getPrivate()).iadd(e));if(0!==(v=v.umod(this.n)).cmpn(0)){var y=(p.getY().isOdd()?1:0)|(0!==g.cmp(m)?2:0);return r.canonical&&v.cmp(this.nh)>0&&(v=this.n.sub(v),y^=1),new c({r:m,s:v,recoveryParam:y})}}}}}},h.prototype.verify=function(e,t,n,o){e=this._truncateToN(new i(e,16)),n=this.keyFromPublic(n,o);var r=(t=new c(t,"hex")).r,s=t.s;if(r.cmpn(1)<0||r.cmp(this.n)>=0)return!1;if(s.cmpn(1)<0||s.cmp(this.n)>=0)return!1;var a,u=s.invm(this.n),l=u.mul(e).umod(this.n),h=u.mul(r).umod(this.n);return this.curve._maxwellTrick?!(a=this.g.jmulAdd(l,n.getPublic(),h)).isInfinity()&&a.eqXToP(r):!(a=this.g.mulAdd(l,n.getPublic(),h)).isInfinity()&&0===a.getX().umod(this.n).cmp(r)},h.prototype.recoverPubKey=function(e,t,n,o){u((3&n)===n,"The recovery param is more than two bits"),t=new c(t,o);var r=this.n,s=new i(e),a=t.r,l=t.s,h=1&n,d=n>>1;if(a.cmp(this.curve.p.umod(this.curve.n))>=0&&d)throw new Error("Unable to find sencond key candinate");a=d?this.curve.pointFromX(a.add(this.curve.n),h):this.curve.pointFromX(a,h);var f=t.r.invm(r),p=r.sub(s).mul(f).umod(r),g=l.mul(f).umod(r);return this.g.mulAdd(p,a,g)},h.prototype.getKeyRecoveryParam=function(e,t,n,i){if(null!==(t=new c(t,i)).recoveryParam)return t.recoveryParam;for(var o=0;o<4;o++){var r;try{r=this.recoverPubKey(e,t,o)}catch(e){continue}if(r.eq(n))return o}throw new Error("Unable to find valid recovery factor")}},4765:(e,t,n)=>{"use strict";var i=n(8499),o=n(4528).assert;function r(e,t){this.ec=e,this.priv=null,this.pub=null,t.priv&&this._importPrivate(t.priv,t.privEnc),t.pub&&this._importPublic(t.pub,t.pubEnc)}e.exports=r,r.fromPublic=function(e,t,n){return t instanceof r?t:new r(e,{pub:t,pubEnc:n})},r.fromPrivate=function(e,t,n){return t instanceof r?t:new r(e,{priv:t,privEnc:n})},r.prototype.validate=function(){var e=this.getPublic();return e.isInfinity()?{result:!1,reason:"Invalid public key"}:e.validate()?e.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},r.prototype.getPublic=function(e,t){return"string"==typeof e&&(t=e,e=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),t?this.pub.encode(t,e):this.pub},r.prototype.getPrivate=function(e){return"hex"===e?this.priv.toString(16,2):this.priv},r.prototype._importPrivate=function(e,t){this.priv=new i(e,t||16),this.priv=this.priv.umod(this.ec.curve.n)},r.prototype._importPublic=function(e,t){if(e.x||e.y)return"mont"===this.ec.curve.type?o(e.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||o(e.x&&e.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(e.x,e.y));this.pub=this.ec.curve.decodePoint(e,t)},r.prototype.derive=function(e){return e.validate()||o(e.validate(),"public point not validated"),e.mul(this.priv).getX()},r.prototype.sign=function(e,t,n){return this.ec.sign(e,this,t,n)},r.prototype.verify=function(e,t){return this.ec.verify(e,t,this)},r.prototype.inspect=function(){return""}},4964:(e,t,n)=>{"use strict";var i=n(8499),o=n(4528),r=o.assert;function s(e,t){if(e instanceof s)return e;this._importDER(e,t)||(r(e.r&&e.s,"Signature without r or s"),this.r=new i(e.r,16),this.s=new i(e.s,16),void 0===e.recoveryParam?this.recoveryParam=null:this.recoveryParam=e.recoveryParam)}function a(){this.place=0}function u(e,t){var n=e[t.place++];if(!(128&n))return n;var i=15&n;if(0===i||i>4)return!1;for(var o=0,r=0,s=t.place;r>>=0;return!(o<=127)&&(t.place=s,o)}function l(e){for(var t=0,n=e.length-1;!e[t]&&!(128&e[t+1])&&t>>3);for(e.push(128|n);--n;)e.push(t>>>(n<<3)&255);e.push(t)}}e.exports=s,s.prototype._importDER=function(e,t){e=o.toArray(e,t);var n=new a;if(48!==e[n.place++])return!1;var r=u(e,n);if(!1===r)return!1;if(r+n.place!==e.length)return!1;if(2!==e[n.place++])return!1;var s=u(e,n);if(!1===s)return!1;var l=e.slice(n.place,s+n.place);if(n.place+=s,2!==e[n.place++])return!1;var c=u(e,n);if(!1===c)return!1;if(e.length!==c+n.place)return!1;var h=e.slice(n.place,c+n.place);if(0===l[0]){if(!(128&l[1]))return!1;l=l.slice(1)}if(0===h[0]){if(!(128&h[1]))return!1;h=h.slice(1)}return this.r=new i(l),this.s=new i(h),this.recoveryParam=null,!0},s.prototype.toDER=function(e){var t=this.r.toArray(),n=this.s.toArray();for(128&t[0]&&(t=[0].concat(t)),128&n[0]&&(n=[0].concat(n)),t=l(t),n=l(n);!(n[0]||128&n[1]);)n=n.slice(1);var i=[2];c(i,t.length),(i=i.concat(t)).push(2),c(i,n.length);var r=i.concat(n),s=[48];return c(s,r.length),s=s.concat(r),o.encode(s,e)}},6197:(e,t,n)=>{"use strict";var i=n(3502),o=n(1353),r=n(4528),s=r.assert,a=r.parseBytes,u=n(6790),l=n(8539);function c(e){if(s("ed25519"===e,"only tested with ed25519 so far"),!(this instanceof c))return new c(e);e=o[e].curve,this.curve=e,this.g=e.g,this.g.precompute(e.n.bitLength()+1),this.pointClass=e.point().constructor,this.encodingLength=Math.ceil(e.n.bitLength()/8),this.hash=i.sha512}e.exports=c,c.prototype.sign=function(e,t){e=a(e);var n=this.keyFromSecret(t),i=this.hashInt(n.messagePrefix(),e),o=this.g.mul(i),r=this.encodePoint(o),s=this.hashInt(r,n.pubBytes(),e).mul(n.priv()),u=i.add(s).umod(this.curve.n);return this.makeSignature({R:o,S:u,Rencoded:r})},c.prototype.verify=function(e,t,n){e=a(e),t=this.makeSignature(t);var i=this.keyFromPublic(n),o=this.hashInt(t.Rencoded(),i.pubBytes(),e),r=this.g.mul(t.S());return t.R().add(i.pub().mul(o)).eq(r)},c.prototype.hashInt=function(){for(var e=this.hash(),t=0;t{"use strict";var i=n(4528),o=i.assert,r=i.parseBytes,s=i.cachedProperty;function a(e,t){this.eddsa=e,this._secret=r(t.secret),e.isPoint(t.pub)?this._pub=t.pub:this._pubBytes=r(t.pub)}a.fromPublic=function(e,t){return t instanceof a?t:new a(e,{pub:t})},a.fromSecret=function(e,t){return t instanceof a?t:new a(e,{secret:t})},a.prototype.secret=function(){return this._secret},s(a,"pubBytes",(function(){return this.eddsa.encodePoint(this.pub())})),s(a,"pub",(function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())})),s(a,"privBytes",(function(){var e=this.eddsa,t=this.hash(),n=e.encodingLength-1,i=t.slice(0,e.encodingLength);return i[0]&=248,i[n]&=127,i[n]|=64,i})),s(a,"priv",(function(){return this.eddsa.decodeInt(this.privBytes())})),s(a,"hash",(function(){return this.eddsa.hash().update(this.secret()).digest()})),s(a,"messagePrefix",(function(){return this.hash().slice(this.eddsa.encodingLength)})),a.prototype.sign=function(e){return o(this._secret,"KeyPair can only verify"),this.eddsa.sign(e,this)},a.prototype.verify=function(e,t){return this.eddsa.verify(e,t,this)},a.prototype.getSecret=function(e){return o(this._secret,"KeyPair is public only"),i.encode(this.secret(),e)},a.prototype.getPublic=function(e){return i.encode(this.pubBytes(),e)},e.exports=a},8539:(e,t,n)=>{"use strict";var i=n(8499),o=n(4528),r=o.assert,s=o.cachedProperty,a=o.parseBytes;function u(e,t){this.eddsa=e,"object"!=typeof t&&(t=a(t)),Array.isArray(t)&&(t={R:t.slice(0,e.encodingLength),S:t.slice(e.encodingLength)}),r(t.R&&t.S,"Signature without R or S"),e.isPoint(t.R)&&(this._R=t.R),t.S instanceof i&&(this._S=t.S),this._Rencoded=Array.isArray(t.R)?t.R:t.Rencoded,this._Sencoded=Array.isArray(t.S)?t.S:t.Sencoded}s(u,"S",(function(){return this.eddsa.decodeInt(this.Sencoded())})),s(u,"R",(function(){return this.eddsa.decodePoint(this.Rencoded())})),s(u,"Rencoded",(function(){return this.eddsa.encodePoint(this.R())})),s(u,"Sencoded",(function(){return this.eddsa.encodeInt(this.S())})),u.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},u.prototype.toHex=function(){return o.encode(this.toBytes(),"hex").toUpperCase()},e.exports=u},9160:e=>{e.exports={doubles:{step:4,points:[["e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a","f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821"],["8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508","11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf"],["175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739","d3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695"],["363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640","4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9"],["8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c","4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36"],["723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda","96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f"],["eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa","5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999"],["100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0","cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09"],["e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d","9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d"],["feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d","e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088"],["da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1","9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d"],["53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0","5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8"],["8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047","10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a"],["385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862","283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453"],["6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7","7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160"],["3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd","56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0"],["85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83","7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6"],["948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a","53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589"],["6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8","bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17"],["e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d","4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda"],["e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725","7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd"],["213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754","4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2"],["4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c","17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6"],["fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6","6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f"],["76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39","c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01"],["c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891","893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3"],["d895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b","febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f"],["b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03","2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7"],["e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d","eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78"],["a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070","7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1"],["90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4","e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150"],["8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da","662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82"],["e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11","1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc"],["8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e","efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b"],["e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41","2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51"],["b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef","67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45"],["d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8","db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120"],["324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d","648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84"],["4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96","35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d"],["9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd","ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d"],["6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5","9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8"],["a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266","40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8"],["7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71","34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac"],["928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac","c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f"],["85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751","1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962"],["ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e","493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907"],["827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241","c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec"],["eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3","be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d"],["e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f","4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414"],["1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19","aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd"],["146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be","b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0"],["fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9","6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811"],["da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2","8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1"],["a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13","7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c"],["174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c","ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73"],["959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba","2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd"],["d2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151","e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405"],["64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073","d99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589"],["8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458","38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e"],["13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b","69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27"],["bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366","d3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1"],["8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa","40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482"],["8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0","620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945"],["dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787","7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573"],["f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e","ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82"]]},naf:{wnd:7,points:[["f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9","388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672"],["2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4","d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6"],["5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc","6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da"],["acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe","cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37"],["774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb","d984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b"],["f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8","ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81"],["d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e","581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58"],["defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34","4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77"],["2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c","85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a"],["352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5","321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c"],["2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f","2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67"],["9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714","73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402"],["daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729","a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55"],["c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db","2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482"],["6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4","e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82"],["1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5","b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396"],["605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479","2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49"],["62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d","80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf"],["80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f","1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a"],["7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb","d0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7"],["d528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9","eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933"],["49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963","758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a"],["77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74","958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6"],["f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530","e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37"],["463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b","5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e"],["f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247","cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6"],["caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1","cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476"],["2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120","4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40"],["7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435","91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61"],["754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18","673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683"],["e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8","59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5"],["186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb","3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b"],["df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f","55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417"],["5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143","efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868"],["290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba","e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a"],["af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45","f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6"],["766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a","744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996"],["59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e","c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e"],["f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8","e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d"],["7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c","30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2"],["948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519","e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e"],["7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab","100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437"],["3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca","ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311"],["d3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf","8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4"],["1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610","68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575"],["733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4","f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d"],["15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c","d56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d"],["a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940","edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629"],["e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980","a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06"],["311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3","66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374"],["34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf","9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee"],["f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63","4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1"],["d7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448","fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b"],["32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf","5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661"],["7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5","8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6"],["ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6","8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e"],["16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5","5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d"],["eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99","f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc"],["78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51","f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4"],["494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5","42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c"],["a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5","204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b"],["c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997","4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913"],["841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881","73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154"],["5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5","39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865"],["36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66","d2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc"],["336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726","ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224"],["8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede","6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e"],["1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94","60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6"],["85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31","3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511"],["29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51","b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b"],["a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252","ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2"],["4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5","cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c"],["d24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b","6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3"],["ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4","322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d"],["af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f","6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700"],["e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889","2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4"],["591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246","b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196"],["11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984","998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4"],["3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a","b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257"],["cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030","bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13"],["c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197","6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096"],["c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593","c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38"],["a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef","21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f"],["347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38","60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448"],["da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a","49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a"],["c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111","5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4"],["4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502","7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437"],["3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea","be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7"],["cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26","8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d"],["b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986","39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a"],["d4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e","62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54"],["48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4","25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77"],["dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda","ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517"],["6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859","cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10"],["e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f","f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125"],["eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c","6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e"],["13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942","fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1"],["ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a","1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2"],["b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80","5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423"],["ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d","438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8"],["8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1","cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758"],["52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63","c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375"],["e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352","6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d"],["7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193","ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec"],["5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00","9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0"],["32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58","ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c"],["e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7","d3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4"],["8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8","c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f"],["4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e","67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649"],["3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d","cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826"],["674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b","299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5"],["d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f","f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87"],["30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6","462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b"],["be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297","62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc"],["93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a","7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c"],["b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c","ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f"],["d5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52","4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a"],["d3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb","bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46"],["463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065","bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f"],["7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917","603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03"],["74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9","cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08"],["30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3","553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8"],["9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57","712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373"],["176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66","ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3"],["75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8","9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8"],["809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721","9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1"],["1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180","4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9"]]}}},4528:(e,t,n)=>{"use strict";var i=t,o=n(8499),r=n(4890),s=n(3720);i.assert=r,i.toArray=s.toArray,i.zero2=s.zero2,i.toHex=s.toHex,i.encode=s.encode,i.getNAF=function(e,t,n){var i,o=new Array(Math.max(e.bitLength(),n)+1);for(i=0;i(r>>1)-1?(r>>1)-u:u,s.isubn(a)):a=0,o[i]=a,s.iushrn(1)}return o},i.getJSF=function(e,t){var n=[[],[]];e=e.clone(),t=t.clone();for(var i,o=0,r=0;e.cmpn(-o)>0||t.cmpn(-r)>0;){var s,a,u=e.andln(3)+o&3,l=t.andln(3)+r&3;3===u&&(u=-1),3===l&&(l=-1),s=1&u?3!=(i=e.andln(7)+o&7)&&5!==i||2!==l?u:-u:0,n[0].push(s),a=1&l?3!=(i=t.andln(7)+r&7)&&5!==i||2!==u?l:-l:0,n[1].push(a),2*o===s+1&&(o=1-o),2*r===a+1&&(r=1-r),e.iushrn(1),t.iushrn(1)}return n},i.cachedProperty=function(e,t,n){var i="_"+t;e.prototype[t]=function(){return void 0!==this[i]?this[i]:this[i]=n.call(this)}},i.parseBytes=function(e){return"string"==typeof e?i.toArray(e,"hex"):e},i.intFromLE=function(e){return new o(e,"hex","le")}},8499:function(e,t,n){!function(e,t){"use strict";function i(e,t){if(!e)throw new Error(t||"Assertion failed")}function o(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}function r(e,t,n){if(r.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(n=t,t=10),this._init(e||0,t||10,n||"be"))}var s;"object"==typeof e?e.exports=r:t.BN=r,r.BN=r,r.wordSize=26;try{s="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:n(9368).Buffer}catch(e){}function a(e,t){var n=e.charCodeAt(t);return n>=65&&n<=70?n-55:n>=97&&n<=102?n-87:n-48&15}function u(e,t,n){var i=a(e,n);return n-1>=t&&(i|=a(e,n-1)<<4),i}function l(e,t,n,i){for(var o=0,r=Math.min(e.length,n),s=t;s=49?a-49+10:a>=17?a-17+10:a}return o}r.isBN=function(e){return e instanceof r||null!==e&&"object"==typeof e&&e.constructor.wordSize===r.wordSize&&Array.isArray(e.words)},r.max=function(e,t){return e.cmp(t)>0?e:t},r.min=function(e,t){return e.cmp(t)<0?e:t},r.prototype._init=function(e,t,n){if("number"==typeof e)return this._initNumber(e,t,n);if("object"==typeof e)return this._initArray(e,t,n);"hex"===t&&(t=16),i(t===(0|t)&&t>=2&&t<=36);var o=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(o++,this.negative=1),o=0;o-=3)s=e[o]|e[o-1]<<8|e[o-2]<<16,this.words[r]|=s<>>26-a&67108863,(a+=24)>=26&&(a-=26,r++);else if("le"===n)for(o=0,r=0;o>>26-a&67108863,(a+=24)>=26&&(a-=26,r++);return this.strip()},r.prototype._parseHex=function(e,t,n){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var i=0;i=t;i-=2)o=u(e,t,i)<=18?(r-=18,s+=1,this.words[s]|=o>>>26):r+=8;else for(i=(e.length-t)%2==0?t+1:t;i=18?(r-=18,s+=1,this.words[s]|=o>>>26):r+=8;this.strip()},r.prototype._parseBase=function(e,t,n){this.words=[0],this.length=1;for(var i=0,o=1;o<=67108863;o*=t)i++;i--,o=o/t|0;for(var r=e.length-n,s=r%i,a=Math.min(r,r-s)+n,u=0,c=n;c1&&0===this.words[this.length-1];)this.length--;return this._normSign()},r.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},r.prototype.inspect=function(){return(this.red?""};var c=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],h=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],d=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function f(e,t,n){n.negative=t.negative^e.negative;var i=e.length+t.length|0;n.length=i,i=i-1|0;var o=0|e.words[0],r=0|t.words[0],s=o*r,a=67108863&s,u=s/67108864|0;n.words[0]=a;for(var l=1;l>>26,h=67108863&u,d=Math.min(l,t.length-1),f=Math.max(0,l-e.length+1);f<=d;f++){var p=l-f|0;c+=(s=(o=0|e.words[p])*(r=0|t.words[f])+h)/67108864|0,h=67108863&s}n.words[l]=0|h,u=0|c}return 0!==u?n.words[l]=0|u:n.length--,n.strip()}r.prototype.toString=function(e,t){var n;if(t=0|t||1,16===(e=e||10)||"hex"===e){n="";for(var o=0,r=0,s=0;s>>24-o&16777215)||s!==this.length-1?c[6-u.length]+u+n:u+n,(o+=2)>=26&&(o-=26,s--)}for(0!==r&&(n=r.toString(16)+n);n.length%t!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(e===(0|e)&&e>=2&&e<=36){var l=h[e],f=d[e];n="";var p=this.clone();for(p.negative=0;!p.isZero();){var g=p.modn(f).toString(e);n=(p=p.idivn(f)).isZero()?g+n:c[l-g.length]+g+n}for(this.isZero()&&(n="0"+n);n.length%t!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}i(!1,"Base should be between 2 and 36")},r.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&i(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},r.prototype.toJSON=function(){return this.toString(16)},r.prototype.toBuffer=function(e,t){return i(void 0!==s),this.toArrayLike(s,e,t)},r.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},r.prototype.toArrayLike=function(e,t,n){var o=this.byteLength(),r=n||Math.max(1,o);i(o<=r,"byte array longer than desired length"),i(r>0,"Requested array length <= 0"),this.strip();var s,a,u="le"===t,l=new e(r),c=this.clone();if(u){for(a=0;!c.isZero();a++)s=c.andln(255),c.iushrn(8),l[a]=s;for(;a=4096&&(n+=13,t>>>=13),t>=64&&(n+=7,t>>>=7),t>=8&&(n+=4,t>>>=4),t>=2&&(n+=2,t>>>=2),n+t},r.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,n=0;return 8191&t||(n+=13,t>>>=13),127&t||(n+=7,t>>>=7),15&t||(n+=4,t>>>=4),3&t||(n+=2,t>>>=2),1&t||n++,n},r.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},r.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},r.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},r.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var n=0;ne.length?this.clone().iand(e):e.clone().iand(this)},r.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},r.prototype.iuxor=function(e){var t,n;this.length>e.length?(t=this,n=e):(t=e,n=this);for(var i=0;ie.length?this.clone().ixor(e):e.clone().ixor(this)},r.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},r.prototype.inotn=function(e){i("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),n=e%26;this._expand(t),n>0&&t--;for(var o=0;o0&&(this.words[o]=~this.words[o]&67108863>>26-n),this.strip()},r.prototype.notn=function(e){return this.clone().inotn(e)},r.prototype.setn=function(e,t){i("number"==typeof e&&e>=0);var n=e/26|0,o=e%26;return this._expand(n+1),this.words[n]=t?this.words[n]|1<e.length?(n=this,i=e):(n=e,i=this);for(var o=0,r=0;r>>26;for(;0!==o&&r>>26;if(this.length=n.length,0!==o)this.words[this.length]=o,this.length++;else if(n!==this)for(;re.length?this.clone().iadd(e):e.clone().iadd(this)},r.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var n,i,o=this.cmp(e);if(0===o)return this.negative=0,this.length=1,this.words[0]=0,this;o>0?(n=this,i=e):(n=e,i=this);for(var r=0,s=0;s>26,this.words[s]=67108863&t;for(;0!==r&&s>26,this.words[s]=67108863&t;if(0===r&&s>>13,f=0|s[1],p=8191&f,g=f>>>13,m=0|s[2],v=8191&m,y=m>>>13,b=0|s[3],_=8191&b,w=b>>>13,M=0|s[4],C=8191&M,S=M>>>13,L=0|s[5],I=8191&L,N=L>>>13,x=0|s[6],D=8191&x,k=x>>>13,T=0|s[7],E=8191&T,A=T>>>13,j=0|s[8],O=8191&j,R=j>>>13,P=0|s[9],z=8191&P,W=P>>>13,F=0|a[0],B=8191&F,H=F>>>13,V=0|a[1],U=8191&V,Y=V>>>13,Z=0|a[2],G=8191&Z,Q=Z>>>13,q=0|a[3],K=8191&q,J=q>>>13,X=0|a[4],$=8191&X,ee=X>>>13,te=0|a[5],ne=8191&te,ie=te>>>13,oe=0|a[6],re=8191&oe,se=oe>>>13,ae=0|a[7],ue=8191&ae,le=ae>>>13,ce=0|a[8],he=8191&ce,de=ce>>>13,fe=0|a[9],pe=8191&fe,ge=fe>>>13;n.negative=e.negative^t.negative,n.length=19;var me=(l+(i=Math.imul(h,B))|0)+((8191&(o=(o=Math.imul(h,H))+Math.imul(d,B)|0))<<13)|0;l=((r=Math.imul(d,H))+(o>>>13)|0)+(me>>>26)|0,me&=67108863,i=Math.imul(p,B),o=(o=Math.imul(p,H))+Math.imul(g,B)|0,r=Math.imul(g,H);var ve=(l+(i=i+Math.imul(h,U)|0)|0)+((8191&(o=(o=o+Math.imul(h,Y)|0)+Math.imul(d,U)|0))<<13)|0;l=((r=r+Math.imul(d,Y)|0)+(o>>>13)|0)+(ve>>>26)|0,ve&=67108863,i=Math.imul(v,B),o=(o=Math.imul(v,H))+Math.imul(y,B)|0,r=Math.imul(y,H),i=i+Math.imul(p,U)|0,o=(o=o+Math.imul(p,Y)|0)+Math.imul(g,U)|0,r=r+Math.imul(g,Y)|0;var ye=(l+(i=i+Math.imul(h,G)|0)|0)+((8191&(o=(o=o+Math.imul(h,Q)|0)+Math.imul(d,G)|0))<<13)|0;l=((r=r+Math.imul(d,Q)|0)+(o>>>13)|0)+(ye>>>26)|0,ye&=67108863,i=Math.imul(_,B),o=(o=Math.imul(_,H))+Math.imul(w,B)|0,r=Math.imul(w,H),i=i+Math.imul(v,U)|0,o=(o=o+Math.imul(v,Y)|0)+Math.imul(y,U)|0,r=r+Math.imul(y,Y)|0,i=i+Math.imul(p,G)|0,o=(o=o+Math.imul(p,Q)|0)+Math.imul(g,G)|0,r=r+Math.imul(g,Q)|0;var be=(l+(i=i+Math.imul(h,K)|0)|0)+((8191&(o=(o=o+Math.imul(h,J)|0)+Math.imul(d,K)|0))<<13)|0;l=((r=r+Math.imul(d,J)|0)+(o>>>13)|0)+(be>>>26)|0,be&=67108863,i=Math.imul(C,B),o=(o=Math.imul(C,H))+Math.imul(S,B)|0,r=Math.imul(S,H),i=i+Math.imul(_,U)|0,o=(o=o+Math.imul(_,Y)|0)+Math.imul(w,U)|0,r=r+Math.imul(w,Y)|0,i=i+Math.imul(v,G)|0,o=(o=o+Math.imul(v,Q)|0)+Math.imul(y,G)|0,r=r+Math.imul(y,Q)|0,i=i+Math.imul(p,K)|0,o=(o=o+Math.imul(p,J)|0)+Math.imul(g,K)|0,r=r+Math.imul(g,J)|0;var _e=(l+(i=i+Math.imul(h,$)|0)|0)+((8191&(o=(o=o+Math.imul(h,ee)|0)+Math.imul(d,$)|0))<<13)|0;l=((r=r+Math.imul(d,ee)|0)+(o>>>13)|0)+(_e>>>26)|0,_e&=67108863,i=Math.imul(I,B),o=(o=Math.imul(I,H))+Math.imul(N,B)|0,r=Math.imul(N,H),i=i+Math.imul(C,U)|0,o=(o=o+Math.imul(C,Y)|0)+Math.imul(S,U)|0,r=r+Math.imul(S,Y)|0,i=i+Math.imul(_,G)|0,o=(o=o+Math.imul(_,Q)|0)+Math.imul(w,G)|0,r=r+Math.imul(w,Q)|0,i=i+Math.imul(v,K)|0,o=(o=o+Math.imul(v,J)|0)+Math.imul(y,K)|0,r=r+Math.imul(y,J)|0,i=i+Math.imul(p,$)|0,o=(o=o+Math.imul(p,ee)|0)+Math.imul(g,$)|0,r=r+Math.imul(g,ee)|0;var we=(l+(i=i+Math.imul(h,ne)|0)|0)+((8191&(o=(o=o+Math.imul(h,ie)|0)+Math.imul(d,ne)|0))<<13)|0;l=((r=r+Math.imul(d,ie)|0)+(o>>>13)|0)+(we>>>26)|0,we&=67108863,i=Math.imul(D,B),o=(o=Math.imul(D,H))+Math.imul(k,B)|0,r=Math.imul(k,H),i=i+Math.imul(I,U)|0,o=(o=o+Math.imul(I,Y)|0)+Math.imul(N,U)|0,r=r+Math.imul(N,Y)|0,i=i+Math.imul(C,G)|0,o=(o=o+Math.imul(C,Q)|0)+Math.imul(S,G)|0,r=r+Math.imul(S,Q)|0,i=i+Math.imul(_,K)|0,o=(o=o+Math.imul(_,J)|0)+Math.imul(w,K)|0,r=r+Math.imul(w,J)|0,i=i+Math.imul(v,$)|0,o=(o=o+Math.imul(v,ee)|0)+Math.imul(y,$)|0,r=r+Math.imul(y,ee)|0,i=i+Math.imul(p,ne)|0,o=(o=o+Math.imul(p,ie)|0)+Math.imul(g,ne)|0,r=r+Math.imul(g,ie)|0;var Me=(l+(i=i+Math.imul(h,re)|0)|0)+((8191&(o=(o=o+Math.imul(h,se)|0)+Math.imul(d,re)|0))<<13)|0;l=((r=r+Math.imul(d,se)|0)+(o>>>13)|0)+(Me>>>26)|0,Me&=67108863,i=Math.imul(E,B),o=(o=Math.imul(E,H))+Math.imul(A,B)|0,r=Math.imul(A,H),i=i+Math.imul(D,U)|0,o=(o=o+Math.imul(D,Y)|0)+Math.imul(k,U)|0,r=r+Math.imul(k,Y)|0,i=i+Math.imul(I,G)|0,o=(o=o+Math.imul(I,Q)|0)+Math.imul(N,G)|0,r=r+Math.imul(N,Q)|0,i=i+Math.imul(C,K)|0,o=(o=o+Math.imul(C,J)|0)+Math.imul(S,K)|0,r=r+Math.imul(S,J)|0,i=i+Math.imul(_,$)|0,o=(o=o+Math.imul(_,ee)|0)+Math.imul(w,$)|0,r=r+Math.imul(w,ee)|0,i=i+Math.imul(v,ne)|0,o=(o=o+Math.imul(v,ie)|0)+Math.imul(y,ne)|0,r=r+Math.imul(y,ie)|0,i=i+Math.imul(p,re)|0,o=(o=o+Math.imul(p,se)|0)+Math.imul(g,re)|0,r=r+Math.imul(g,se)|0;var Ce=(l+(i=i+Math.imul(h,ue)|0)|0)+((8191&(o=(o=o+Math.imul(h,le)|0)+Math.imul(d,ue)|0))<<13)|0;l=((r=r+Math.imul(d,le)|0)+(o>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,i=Math.imul(O,B),o=(o=Math.imul(O,H))+Math.imul(R,B)|0,r=Math.imul(R,H),i=i+Math.imul(E,U)|0,o=(o=o+Math.imul(E,Y)|0)+Math.imul(A,U)|0,r=r+Math.imul(A,Y)|0,i=i+Math.imul(D,G)|0,o=(o=o+Math.imul(D,Q)|0)+Math.imul(k,G)|0,r=r+Math.imul(k,Q)|0,i=i+Math.imul(I,K)|0,o=(o=o+Math.imul(I,J)|0)+Math.imul(N,K)|0,r=r+Math.imul(N,J)|0,i=i+Math.imul(C,$)|0,o=(o=o+Math.imul(C,ee)|0)+Math.imul(S,$)|0,r=r+Math.imul(S,ee)|0,i=i+Math.imul(_,ne)|0,o=(o=o+Math.imul(_,ie)|0)+Math.imul(w,ne)|0,r=r+Math.imul(w,ie)|0,i=i+Math.imul(v,re)|0,o=(o=o+Math.imul(v,se)|0)+Math.imul(y,re)|0,r=r+Math.imul(y,se)|0,i=i+Math.imul(p,ue)|0,o=(o=o+Math.imul(p,le)|0)+Math.imul(g,ue)|0,r=r+Math.imul(g,le)|0;var Se=(l+(i=i+Math.imul(h,he)|0)|0)+((8191&(o=(o=o+Math.imul(h,de)|0)+Math.imul(d,he)|0))<<13)|0;l=((r=r+Math.imul(d,de)|0)+(o>>>13)|0)+(Se>>>26)|0,Se&=67108863,i=Math.imul(z,B),o=(o=Math.imul(z,H))+Math.imul(W,B)|0,r=Math.imul(W,H),i=i+Math.imul(O,U)|0,o=(o=o+Math.imul(O,Y)|0)+Math.imul(R,U)|0,r=r+Math.imul(R,Y)|0,i=i+Math.imul(E,G)|0,o=(o=o+Math.imul(E,Q)|0)+Math.imul(A,G)|0,r=r+Math.imul(A,Q)|0,i=i+Math.imul(D,K)|0,o=(o=o+Math.imul(D,J)|0)+Math.imul(k,K)|0,r=r+Math.imul(k,J)|0,i=i+Math.imul(I,$)|0,o=(o=o+Math.imul(I,ee)|0)+Math.imul(N,$)|0,r=r+Math.imul(N,ee)|0,i=i+Math.imul(C,ne)|0,o=(o=o+Math.imul(C,ie)|0)+Math.imul(S,ne)|0,r=r+Math.imul(S,ie)|0,i=i+Math.imul(_,re)|0,o=(o=o+Math.imul(_,se)|0)+Math.imul(w,re)|0,r=r+Math.imul(w,se)|0,i=i+Math.imul(v,ue)|0,o=(o=o+Math.imul(v,le)|0)+Math.imul(y,ue)|0,r=r+Math.imul(y,le)|0,i=i+Math.imul(p,he)|0,o=(o=o+Math.imul(p,de)|0)+Math.imul(g,he)|0,r=r+Math.imul(g,de)|0;var Le=(l+(i=i+Math.imul(h,pe)|0)|0)+((8191&(o=(o=o+Math.imul(h,ge)|0)+Math.imul(d,pe)|0))<<13)|0;l=((r=r+Math.imul(d,ge)|0)+(o>>>13)|0)+(Le>>>26)|0,Le&=67108863,i=Math.imul(z,U),o=(o=Math.imul(z,Y))+Math.imul(W,U)|0,r=Math.imul(W,Y),i=i+Math.imul(O,G)|0,o=(o=o+Math.imul(O,Q)|0)+Math.imul(R,G)|0,r=r+Math.imul(R,Q)|0,i=i+Math.imul(E,K)|0,o=(o=o+Math.imul(E,J)|0)+Math.imul(A,K)|0,r=r+Math.imul(A,J)|0,i=i+Math.imul(D,$)|0,o=(o=o+Math.imul(D,ee)|0)+Math.imul(k,$)|0,r=r+Math.imul(k,ee)|0,i=i+Math.imul(I,ne)|0,o=(o=o+Math.imul(I,ie)|0)+Math.imul(N,ne)|0,r=r+Math.imul(N,ie)|0,i=i+Math.imul(C,re)|0,o=(o=o+Math.imul(C,se)|0)+Math.imul(S,re)|0,r=r+Math.imul(S,se)|0,i=i+Math.imul(_,ue)|0,o=(o=o+Math.imul(_,le)|0)+Math.imul(w,ue)|0,r=r+Math.imul(w,le)|0,i=i+Math.imul(v,he)|0,o=(o=o+Math.imul(v,de)|0)+Math.imul(y,he)|0,r=r+Math.imul(y,de)|0;var Ie=(l+(i=i+Math.imul(p,pe)|0)|0)+((8191&(o=(o=o+Math.imul(p,ge)|0)+Math.imul(g,pe)|0))<<13)|0;l=((r=r+Math.imul(g,ge)|0)+(o>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,i=Math.imul(z,G),o=(o=Math.imul(z,Q))+Math.imul(W,G)|0,r=Math.imul(W,Q),i=i+Math.imul(O,K)|0,o=(o=o+Math.imul(O,J)|0)+Math.imul(R,K)|0,r=r+Math.imul(R,J)|0,i=i+Math.imul(E,$)|0,o=(o=o+Math.imul(E,ee)|0)+Math.imul(A,$)|0,r=r+Math.imul(A,ee)|0,i=i+Math.imul(D,ne)|0,o=(o=o+Math.imul(D,ie)|0)+Math.imul(k,ne)|0,r=r+Math.imul(k,ie)|0,i=i+Math.imul(I,re)|0,o=(o=o+Math.imul(I,se)|0)+Math.imul(N,re)|0,r=r+Math.imul(N,se)|0,i=i+Math.imul(C,ue)|0,o=(o=o+Math.imul(C,le)|0)+Math.imul(S,ue)|0,r=r+Math.imul(S,le)|0,i=i+Math.imul(_,he)|0,o=(o=o+Math.imul(_,de)|0)+Math.imul(w,he)|0,r=r+Math.imul(w,de)|0;var Ne=(l+(i=i+Math.imul(v,pe)|0)|0)+((8191&(o=(o=o+Math.imul(v,ge)|0)+Math.imul(y,pe)|0))<<13)|0;l=((r=r+Math.imul(y,ge)|0)+(o>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,i=Math.imul(z,K),o=(o=Math.imul(z,J))+Math.imul(W,K)|0,r=Math.imul(W,J),i=i+Math.imul(O,$)|0,o=(o=o+Math.imul(O,ee)|0)+Math.imul(R,$)|0,r=r+Math.imul(R,ee)|0,i=i+Math.imul(E,ne)|0,o=(o=o+Math.imul(E,ie)|0)+Math.imul(A,ne)|0,r=r+Math.imul(A,ie)|0,i=i+Math.imul(D,re)|0,o=(o=o+Math.imul(D,se)|0)+Math.imul(k,re)|0,r=r+Math.imul(k,se)|0,i=i+Math.imul(I,ue)|0,o=(o=o+Math.imul(I,le)|0)+Math.imul(N,ue)|0,r=r+Math.imul(N,le)|0,i=i+Math.imul(C,he)|0,o=(o=o+Math.imul(C,de)|0)+Math.imul(S,he)|0,r=r+Math.imul(S,de)|0;var xe=(l+(i=i+Math.imul(_,pe)|0)|0)+((8191&(o=(o=o+Math.imul(_,ge)|0)+Math.imul(w,pe)|0))<<13)|0;l=((r=r+Math.imul(w,ge)|0)+(o>>>13)|0)+(xe>>>26)|0,xe&=67108863,i=Math.imul(z,$),o=(o=Math.imul(z,ee))+Math.imul(W,$)|0,r=Math.imul(W,ee),i=i+Math.imul(O,ne)|0,o=(o=o+Math.imul(O,ie)|0)+Math.imul(R,ne)|0,r=r+Math.imul(R,ie)|0,i=i+Math.imul(E,re)|0,o=(o=o+Math.imul(E,se)|0)+Math.imul(A,re)|0,r=r+Math.imul(A,se)|0,i=i+Math.imul(D,ue)|0,o=(o=o+Math.imul(D,le)|0)+Math.imul(k,ue)|0,r=r+Math.imul(k,le)|0,i=i+Math.imul(I,he)|0,o=(o=o+Math.imul(I,de)|0)+Math.imul(N,he)|0,r=r+Math.imul(N,de)|0;var De=(l+(i=i+Math.imul(C,pe)|0)|0)+((8191&(o=(o=o+Math.imul(C,ge)|0)+Math.imul(S,pe)|0))<<13)|0;l=((r=r+Math.imul(S,ge)|0)+(o>>>13)|0)+(De>>>26)|0,De&=67108863,i=Math.imul(z,ne),o=(o=Math.imul(z,ie))+Math.imul(W,ne)|0,r=Math.imul(W,ie),i=i+Math.imul(O,re)|0,o=(o=o+Math.imul(O,se)|0)+Math.imul(R,re)|0,r=r+Math.imul(R,se)|0,i=i+Math.imul(E,ue)|0,o=(o=o+Math.imul(E,le)|0)+Math.imul(A,ue)|0,r=r+Math.imul(A,le)|0,i=i+Math.imul(D,he)|0,o=(o=o+Math.imul(D,de)|0)+Math.imul(k,he)|0,r=r+Math.imul(k,de)|0;var ke=(l+(i=i+Math.imul(I,pe)|0)|0)+((8191&(o=(o=o+Math.imul(I,ge)|0)+Math.imul(N,pe)|0))<<13)|0;l=((r=r+Math.imul(N,ge)|0)+(o>>>13)|0)+(ke>>>26)|0,ke&=67108863,i=Math.imul(z,re),o=(o=Math.imul(z,se))+Math.imul(W,re)|0,r=Math.imul(W,se),i=i+Math.imul(O,ue)|0,o=(o=o+Math.imul(O,le)|0)+Math.imul(R,ue)|0,r=r+Math.imul(R,le)|0,i=i+Math.imul(E,he)|0,o=(o=o+Math.imul(E,de)|0)+Math.imul(A,he)|0,r=r+Math.imul(A,de)|0;var Te=(l+(i=i+Math.imul(D,pe)|0)|0)+((8191&(o=(o=o+Math.imul(D,ge)|0)+Math.imul(k,pe)|0))<<13)|0;l=((r=r+Math.imul(k,ge)|0)+(o>>>13)|0)+(Te>>>26)|0,Te&=67108863,i=Math.imul(z,ue),o=(o=Math.imul(z,le))+Math.imul(W,ue)|0,r=Math.imul(W,le),i=i+Math.imul(O,he)|0,o=(o=o+Math.imul(O,de)|0)+Math.imul(R,he)|0,r=r+Math.imul(R,de)|0;var Ee=(l+(i=i+Math.imul(E,pe)|0)|0)+((8191&(o=(o=o+Math.imul(E,ge)|0)+Math.imul(A,pe)|0))<<13)|0;l=((r=r+Math.imul(A,ge)|0)+(o>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,i=Math.imul(z,he),o=(o=Math.imul(z,de))+Math.imul(W,he)|0,r=Math.imul(W,de);var Ae=(l+(i=i+Math.imul(O,pe)|0)|0)+((8191&(o=(o=o+Math.imul(O,ge)|0)+Math.imul(R,pe)|0))<<13)|0;l=((r=r+Math.imul(R,ge)|0)+(o>>>13)|0)+(Ae>>>26)|0,Ae&=67108863;var je=(l+(i=Math.imul(z,pe))|0)+((8191&(o=(o=Math.imul(z,ge))+Math.imul(W,pe)|0))<<13)|0;return l=((r=Math.imul(W,ge))+(o>>>13)|0)+(je>>>26)|0,je&=67108863,u[0]=me,u[1]=ve,u[2]=ye,u[3]=be,u[4]=_e,u[5]=we,u[6]=Me,u[7]=Ce,u[8]=Se,u[9]=Le,u[10]=Ie,u[11]=Ne,u[12]=xe,u[13]=De,u[14]=ke,u[15]=Te,u[16]=Ee,u[17]=Ae,u[18]=je,0!==l&&(u[19]=l,n.length++),n};function g(e,t,n){return(new m).mulp(e,t,n)}function m(e,t){this.x=e,this.y=t}Math.imul||(p=f),r.prototype.mulTo=function(e,t){var n,i=this.length+e.length;return n=10===this.length&&10===e.length?p(this,e,t):i<63?f(this,e,t):i<1024?function(e,t,n){n.negative=t.negative^e.negative,n.length=e.length+t.length;for(var i=0,o=0,r=0;r>>26)|0)>>>26,s&=67108863}n.words[r]=a,i=s,s=o}return 0!==i?n.words[r]=i:n.length--,n.strip()}(this,e,t):g(this,e,t),n},m.prototype.makeRBT=function(e){for(var t=new Array(e),n=r.prototype._countBits(e)-1,i=0;i>=1;return i},m.prototype.permute=function(e,t,n,i,o,r){for(var s=0;s>>=1)o++;return 1<>>=13,n[2*s+1]=8191&r,r>>>=13;for(s=2*t;s>=26,t+=o/67108864|0,t+=r>>>26,this.words[n]=67108863&r}return 0!==t&&(this.words[n]=t,this.length++),this},r.prototype.muln=function(e){return this.clone().imuln(e)},r.prototype.sqr=function(){return this.mul(this)},r.prototype.isqr=function(){return this.imul(this.clone())},r.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),n=0;n>>o}return t}(e);if(0===t.length)return new r(1);for(var n=this,i=0;i=0);var t,n=e%26,o=(e-n)/26,r=67108863>>>26-n<<26-n;if(0!==n){var s=0;for(t=0;t>>26-n}s&&(this.words[t]=s,this.length++)}if(0!==o){for(t=this.length-1;t>=0;t--)this.words[t+o]=this.words[t];for(t=0;t=0),o=t?(t-t%26)/26:0;var r=e%26,s=Math.min((e-r)/26,this.length),a=67108863^67108863>>>r<s)for(this.length-=s,l=0;l=0&&(0!==c||l>=o);l--){var h=0|this.words[l];this.words[l]=c<<26-r|h>>>r,c=h&a}return u&&0!==c&&(u.words[u.length++]=c),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},r.prototype.ishrn=function(e,t,n){return i(0===this.negative),this.iushrn(e,t,n)},r.prototype.shln=function(e){return this.clone().ishln(e)},r.prototype.ushln=function(e){return this.clone().iushln(e)},r.prototype.shrn=function(e){return this.clone().ishrn(e)},r.prototype.ushrn=function(e){return this.clone().iushrn(e)},r.prototype.testn=function(e){i("number"==typeof e&&e>=0);var t=e%26,n=(e-t)/26,o=1<=0);var t=e%26,n=(e-t)/26;if(i(0===this.negative,"imaskn works only with positive numbers"),this.length<=n)return this;if(0!==t&&n++,this.length=Math.min(n,this.length),0!==t){var o=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},r.prototype.isubn=function(e){if(i("number"==typeof e),i(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(u/67108864|0),this.words[o+n]=67108863&r}for(;o>26,this.words[o+n]=67108863&r;if(0===a)return this.strip();for(i(-1===a),a=0,o=0;o>26,this.words[o]=67108863&r;return this.negative=1,this.strip()},r.prototype._wordDiv=function(e,t){var n=(this.length,e.length),i=this.clone(),o=e,s=0|o.words[o.length-1];0!=(n=26-this._countBits(s))&&(o=o.ushln(n),i.iushln(n),s=0|o.words[o.length-1]);var a,u=i.length-o.length;if("mod"!==t){(a=new r(null)).length=u+1,a.words=new Array(a.length);for(var l=0;l=0;h--){var d=67108864*(0|i.words[o.length+h])+(0|i.words[o.length+h-1]);for(d=Math.min(d/s|0,67108863),i._ishlnsubmul(o,d,h);0!==i.negative;)d--,i.negative=0,i._ishlnsubmul(o,1,h),i.isZero()||(i.negative^=1);a&&(a.words[h]=d)}return a&&a.strip(),i.strip(),"div"!==t&&0!==n&&i.iushrn(n),{div:a||null,mod:i}},r.prototype.divmod=function(e,t,n){return i(!e.isZero()),this.isZero()?{div:new r(0),mod:new r(0)}:0!==this.negative&&0===e.negative?(a=this.neg().divmod(e,t),"mod"!==t&&(o=a.div.neg()),"div"!==t&&(s=a.mod.neg(),n&&0!==s.negative&&s.iadd(e)),{div:o,mod:s}):0===this.negative&&0!==e.negative?(a=this.divmod(e.neg(),t),"mod"!==t&&(o=a.div.neg()),{div:o,mod:a.mod}):this.negative&e.negative?(a=this.neg().divmod(e.neg(),t),"div"!==t&&(s=a.mod.neg(),n&&0!==s.negative&&s.isub(e)),{div:a.div,mod:s}):e.length>this.length||this.cmp(e)<0?{div:new r(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new r(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new r(this.modn(e.words[0]))}:this._wordDiv(e,t);var o,s,a},r.prototype.div=function(e){return this.divmod(e,"div",!1).div},r.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},r.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},r.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var n=0!==t.div.negative?t.mod.isub(e):t.mod,i=e.ushrn(1),o=e.andln(1),r=n.cmp(i);return r<0||1===o&&0===r?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},r.prototype.modn=function(e){i(e<=67108863);for(var t=(1<<26)%e,n=0,o=this.length-1;o>=0;o--)n=(t*n+(0|this.words[o]))%e;return n},r.prototype.idivn=function(e){i(e<=67108863);for(var t=0,n=this.length-1;n>=0;n--){var o=(0|this.words[n])+67108864*t;this.words[n]=o/e|0,t=o%e}return this.strip()},r.prototype.divn=function(e){return this.clone().idivn(e)},r.prototype.egcd=function(e){i(0===e.negative),i(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var o=new r(1),s=new r(0),a=new r(0),u=new r(1),l=0;t.isEven()&&n.isEven();)t.iushrn(1),n.iushrn(1),++l;for(var c=n.clone(),h=t.clone();!t.isZero();){for(var d=0,f=1;!(t.words[0]&f)&&d<26;++d,f<<=1);if(d>0)for(t.iushrn(d);d-- >0;)(o.isOdd()||s.isOdd())&&(o.iadd(c),s.isub(h)),o.iushrn(1),s.iushrn(1);for(var p=0,g=1;!(n.words[0]&g)&&p<26;++p,g<<=1);if(p>0)for(n.iushrn(p);p-- >0;)(a.isOdd()||u.isOdd())&&(a.iadd(c),u.isub(h)),a.iushrn(1),u.iushrn(1);t.cmp(n)>=0?(t.isub(n),o.isub(a),s.isub(u)):(n.isub(t),a.isub(o),u.isub(s))}return{a,b:u,gcd:n.iushln(l)}},r.prototype._invmp=function(e){i(0===e.negative),i(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var o,s=new r(1),a=new r(0),u=n.clone();t.cmpn(1)>0&&n.cmpn(1)>0;){for(var l=0,c=1;!(t.words[0]&c)&&l<26;++l,c<<=1);if(l>0)for(t.iushrn(l);l-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);for(var h=0,d=1;!(n.words[0]&d)&&h<26;++h,d<<=1);if(h>0)for(n.iushrn(h);h-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);t.cmp(n)>=0?(t.isub(n),s.isub(a)):(n.isub(t),a.isub(s))}return(o=0===t.cmpn(1)?s:a).cmpn(0)<0&&o.iadd(e),o},r.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),n=e.clone();t.negative=0,n.negative=0;for(var i=0;t.isEven()&&n.isEven();i++)t.iushrn(1),n.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;n.isEven();)n.iushrn(1);var o=t.cmp(n);if(o<0){var r=t;t=n,n=r}else if(0===o||0===n.cmpn(1))break;t.isub(n)}return n.iushln(i)},r.prototype.invm=function(e){return this.egcd(e).a.umod(e)},r.prototype.isEven=function(){return!(1&this.words[0])},r.prototype.isOdd=function(){return!(1&~this.words[0])},r.prototype.andln=function(e){return this.words[0]&e},r.prototype.bincn=function(e){i("number"==typeof e);var t=e%26,n=(e-t)/26,o=1<>>26,a&=67108863,this.words[s]=a}return 0!==r&&(this.words[s]=r,this.length++),this},r.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},r.prototype.cmpn=function(e){var t,n=e<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this.strip(),this.length>1)t=1;else{n&&(e=-e),i(e<=67108863,"Number is too big");var o=0|this.words[0];t=o===e?0:oe.length)return 1;if(this.length=0;n--){var i=0|this.words[n],o=0|e.words[n];if(i!==o){io&&(t=1);break}}return t},r.prototype.gtn=function(e){return 1===this.cmpn(e)},r.prototype.gt=function(e){return 1===this.cmp(e)},r.prototype.gten=function(e){return this.cmpn(e)>=0},r.prototype.gte=function(e){return this.cmp(e)>=0},r.prototype.ltn=function(e){return-1===this.cmpn(e)},r.prototype.lt=function(e){return-1===this.cmp(e)},r.prototype.lten=function(e){return this.cmpn(e)<=0},r.prototype.lte=function(e){return this.cmp(e)<=0},r.prototype.eqn=function(e){return 0===this.cmpn(e)},r.prototype.eq=function(e){return 0===this.cmp(e)},r.red=function(e){return new C(e)},r.prototype.toRed=function(e){return i(!this.red,"Already a number in reduction context"),i(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},r.prototype.fromRed=function(){return i(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},r.prototype._forceRed=function(e){return this.red=e,this},r.prototype.forceRed=function(e){return i(!this.red,"Already a number in reduction context"),this._forceRed(e)},r.prototype.redAdd=function(e){return i(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},r.prototype.redIAdd=function(e){return i(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},r.prototype.redSub=function(e){return i(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},r.prototype.redISub=function(e){return i(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},r.prototype.redShl=function(e){return i(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},r.prototype.redMul=function(e){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},r.prototype.redIMul=function(e){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},r.prototype.redSqr=function(){return i(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},r.prototype.redISqr=function(){return i(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},r.prototype.redSqrt=function(){return i(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},r.prototype.redInvm=function(){return i(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},r.prototype.redNeg=function(){return i(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},r.prototype.redPow=function(e){return i(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var v={k256:null,p224:null,p192:null,p25519:null};function y(e,t){this.name=e,this.p=new r(t,16),this.n=this.p.bitLength(),this.k=new r(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function b(){y.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function _(){y.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){y.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function M(){y.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function C(e){if("string"==typeof e){var t=r._prime(e);this.m=t.p,this.prime=t}else i(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function S(e){C.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new r(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}y.prototype._tmp=function(){var e=new r(null);return e.words=new Array(Math.ceil(this.n/13)),e},y.prototype.ireduce=function(e){var t,n=e;do{this.split(n,this.tmp),t=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(t>this.n);var i=t0?n.isub(this.p):void 0!==n.strip?n.strip():n._strip(),n},y.prototype.split=function(e,t){e.iushrn(this.n,0,t)},y.prototype.imulK=function(e){return e.imul(this.k)},o(b,y),b.prototype.split=function(e,t){for(var n=4194303,i=Math.min(e.length,9),o=0;o>>22,r=s}r>>>=22,e.words[o-10]=r,0===r&&e.length>10?e.length-=10:e.length-=9},b.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,n=0;n>>=26,e.words[n]=o,t=i}return 0!==t&&(e.words[e.length++]=t),e},r._prime=function(e){if(v[e])return v[e];var t;if("k256"===e)t=new b;else if("p224"===e)t=new _;else if("p192"===e)t=new w;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new M}return v[e]=t,t},C.prototype._verify1=function(e){i(0===e.negative,"red works only with positives"),i(e.red,"red works only with red numbers")},C.prototype._verify2=function(e,t){i(!(e.negative|t.negative),"red works only with positives"),i(e.red&&e.red===t.red,"red works only with red numbers")},C.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},C.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},C.prototype.add=function(e,t){this._verify2(e,t);var n=e.add(t);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},C.prototype.iadd=function(e,t){this._verify2(e,t);var n=e.iadd(t);return n.cmp(this.m)>=0&&n.isub(this.m),n},C.prototype.sub=function(e,t){this._verify2(e,t);var n=e.sub(t);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},C.prototype.isub=function(e,t){this._verify2(e,t);var n=e.isub(t);return n.cmpn(0)<0&&n.iadd(this.m),n},C.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},C.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},C.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},C.prototype.isqr=function(e){return this.imul(e,e.clone())},C.prototype.sqr=function(e){return this.mul(e,e)},C.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(i(t%2==1),3===t){var n=this.m.add(new r(1)).iushrn(2);return this.pow(e,n)}for(var o=this.m.subn(1),s=0;!o.isZero()&&0===o.andln(1);)s++,o.iushrn(1);i(!o.isZero());var a=new r(1).toRed(this),u=a.redNeg(),l=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new r(2*c*c).toRed(this);0!==this.pow(c,l).cmp(u);)c.redIAdd(u);for(var h=this.pow(c,o),d=this.pow(e,o.addn(1).iushrn(1)),f=this.pow(e,o),p=s;0!==f.cmp(a);){for(var g=f,m=0;0!==g.cmp(a);m++)g=g.redSqr();i(m=0;i--){for(var l=t.words[i],c=u-1;c>=0;c--){var h=l>>c&1;o!==n[0]&&(o=this.sqr(o)),0!==h||0!==s?(s<<=1,s|=h,(4==++a||0===i&&0===c)&&(o=this.mul(o,n[s]),a=0,s=0)):a=0}u=26}return o},C.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},C.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},r.mont=function(e){return new S(e)},o(S,C),S.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},S.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},S.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var n=e.imul(t),i=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=n.isub(i).iushrn(this.shift),r=o;return o.cmp(this.m)>=0?r=o.isub(this.m):o.cmpn(0)<0&&(r=o.iadd(this.m)),r._forceRed(this)},S.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new r(0)._forceRed(this);var n=e.mul(t),i=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=n.isub(i).iushrn(this.shift),s=o;return o.cmp(this.m)>=0?s=o.isub(this.m):o.cmpn(0)<0&&(s=o.iadd(this.m)),s._forceRed(this)},S.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=n.nmd(e),this)},6987:e=>{"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}},3188:e=>{"use strict";var t,n="object"==typeof Reflect?Reflect:null,i=n&&"function"==typeof n.apply?n.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};t=n&&"function"==typeof n.ownKeys?n.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var o=Number.isNaN||function(e){return e!=e};function r(){r.init.call(this)}e.exports=r,e.exports.once=function(e,t){return new Promise((function(n,i){function o(n){e.removeListener(t,r),i(n)}function r(){"function"==typeof e.removeListener&&e.removeListener("error",o),n([].slice.call(arguments))}g(e,t,r,{once:!0}),"error"!==t&&function(e,t,n){"function"==typeof e.on&&g(e,"error",t,{once:!0})}(e,o)}))},r.EventEmitter=r,r.prototype._events=void 0,r.prototype._eventsCount=0,r.prototype._maxListeners=void 0;var s=10;function a(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function u(e){return void 0===e._maxListeners?r.defaultMaxListeners:e._maxListeners}function l(e,t,n,i){var o,r,s,l;if(a(n),void 0===(r=e._events)?(r=e._events=Object.create(null),e._eventsCount=0):(void 0!==r.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),r=e._events),s=r[t]),void 0===s)s=r[t]=n,++e._eventsCount;else if("function"==typeof s?s=r[t]=i?[n,s]:[s,n]:i?s.unshift(n):s.push(n),(o=u(e))>0&&s.length>o&&!s.warned){s.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=e,c.type=t,c.count=s.length,l=c,console&&console.warn&&console.warn(l)}return e}function c(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function h(e,t,n){var i={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},o=c.bind(i);return o.listener=n,i.wrapFn=o,o}function d(e,t,n){var i=e._events;if(void 0===i)return[];var o=i[t];return void 0===o?[]:"function"==typeof o?n?[o.listener||o]:[o]:n?function(e){for(var t=new Array(e.length),n=0;n0&&(s=t[0]),s instanceof Error)throw s;var a=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var u=r[e];if(void 0===u)return!1;if("function"==typeof u)i(u,this,t);else{var l=u.length,c=p(u,l);for(n=0;n=0;r--)if(n[r]===t||n[r].listener===t){s=n[r].listener,o=r;break}if(o<0)return this;0===o?n.shift():function(e,t){for(;t+1=0;i--)this.removeListener(e,t[i]);return this},r.prototype.listeners=function(e){return d(this,e,!0)},r.prototype.rawListeners=function(e){return d(this,e,!1)},r.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):f.call(e,t)},r.prototype.listenerCount=f,r.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},8819:(e,t,n)=>{var i=n(2238).Buffer,o=n(9781);e.exports=function(e,t,n,r){if(i.isBuffer(e)||(e=i.from(e,"binary")),t&&(i.isBuffer(t)||(t=i.from(t,"binary")),8!==t.length))throw new RangeError("salt should be Buffer with 8 byte length");for(var s=n/8,a=i.alloc(s),u=i.alloc(r||0),l=i.alloc(0);s>0||r>0;){var c=new o;c.update(l),c.update(e),t&&c.update(t),l=c.digest();var h=0;if(s>0){var d=a.length-s;h=Math.min(s,l.length),l.copy(a,d,0,h),s-=h}if(h0){var f=u.length-r,p=Math.min(r,l.length-h);l.copy(u,f,h,h+p),r-=p}}return l.fill(0),{key:a,iv:u}}},4922:e=>{e.exports=function(e,t){if("string"!=typeof e)throw new TypeError("Expected a string");for(var n,i=String(e),o="",r=!!t&&!!t.extended,s=!!t&&!!t.globstar,a=!1,u=t&&"string"==typeof t.flags?t.flags:"",l=0,c=i.length;l1)||"/"!==h&&void 0!==h||"/"!==f&&void 0!==f?o+="[^/]*":(o+="(?:[^/]*(?:/|$))*",l++):o+=".*";break;default:o+=n}return u&&~u.indexOf("g")||(o="^"+o+"$"),new RegExp(o,u)}},9558:(e,t,n)=>{"use strict";var i=n(2238).Buffer,o=n(8741).Transform;function r(e){o.call(this),this._block=i.allocUnsafe(e),this._blockSize=e,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}n(9385)(r,o),r.prototype._transform=function(e,t,n){var i=null;try{this.update(e,t)}catch(e){i=e}n(i)},r.prototype._flush=function(e){var t=null;try{this.push(this.digest())}catch(e){t=e}e(t)},r.prototype.update=function(e,t){if(function(e,t){if(!i.isBuffer(e)&&"string"!=typeof e)throw new TypeError("Data must be a string or a buffer")}(e),this._finalized)throw new Error("Digest already called");i.isBuffer(e)||(e=i.from(e,t));for(var n=this._block,o=0;this._blockOffset+e.length-o>=this._blockSize;){for(var r=this._blockOffset;r0;++s)this._length[s]+=a,(a=this._length[s]/4294967296|0)>0&&(this._length[s]-=4294967296*a);return this},r.prototype._update=function(){throw new Error("_update is not implemented")},r.prototype.digest=function(e){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var t=this._digest();void 0!==e&&(t=t.toString(e)),this._block.fill(0),this._blockOffset=0;for(var n=0;n<4;++n)this._length[n]=0;return t},r.prototype._digest=function(){throw new Error("_digest is not implemented")},e.exports=r},3502:(e,t,n)=>{var i=t;i.utils=n(3883),i.common=n(9589),i.sha=n(2992),i.ripemd=n(5171),i.hmac=n(8747),i.sha1=i.sha.sha1,i.sha256=i.sha.sha256,i.sha224=i.sha.sha224,i.sha384=i.sha.sha384,i.sha512=i.sha.sha512,i.ripemd160=i.ripemd.ripemd160},9589:(e,t,n)=>{"use strict";var i=n(3883),o=n(4890);function r(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}t.BlockHash=r,r.prototype.update=function(e,t){if(e=i.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){var n=(e=this.pending).length%this._delta8;this.pending=e.slice(e.length-n,e.length),0===this.pending.length&&(this.pending=null),e=i.join32(e,0,e.length-n,this.endian);for(var o=0;o>>24&255,i[o++]=e>>>16&255,i[o++]=e>>>8&255,i[o++]=255&e}else for(i[o++]=255&e,i[o++]=e>>>8&255,i[o++]=e>>>16&255,i[o++]=e>>>24&255,i[o++]=0,i[o++]=0,i[o++]=0,i[o++]=0,r=8;r{"use strict";var i=n(3883),o=n(4890);function r(e,t,n){if(!(this instanceof r))return new r(e,t,n);this.Hash=e,this.blockSize=e.blockSize/8,this.outSize=e.outSize/8,this.inner=null,this.outer=null,this._init(i.toArray(t,n))}e.exports=r,r.prototype._init=function(e){e.length>this.blockSize&&(e=(new this.Hash).update(e).digest()),o(e.length<=this.blockSize);for(var t=e.length;t{"use strict";var i=n(3883),o=n(9589),r=i.rotl32,s=i.sum32,a=i.sum32_3,u=i.sum32_4,l=o.BlockHash;function c(){if(!(this instanceof c))return new c;l.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}function h(e,t,n,i){return e<=15?t^n^i:e<=31?t&n|~t&i:e<=47?(t|~n)^i:e<=63?t&i|n&~i:t^(n|~i)}function d(e){return e<=15?0:e<=31?1518500249:e<=47?1859775393:e<=63?2400959708:2840853838}function f(e){return e<=15?1352829926:e<=31?1548603684:e<=47?1836072691:e<=63?2053994217:0}i.inherits(c,l),t.ripemd160=c,c.blockSize=512,c.outSize=160,c.hmacStrength=192,c.padLength=64,c.prototype._update=function(e,t){for(var n=this.h[0],i=this.h[1],o=this.h[2],l=this.h[3],c=this.h[4],y=n,b=i,_=o,w=l,M=c,C=0;C<80;C++){var S=s(r(u(n,h(C,i,o,l),e[p[C]+t],d(C)),m[C]),c);n=c,c=l,l=r(o,10),o=i,i=S,S=s(r(u(y,h(79-C,b,_,w),e[g[C]+t],f(C)),v[C]),M),y=M,M=w,w=r(_,10),_=b,b=S}S=a(this.h[1],o,w),this.h[1]=a(this.h[2],l,M),this.h[2]=a(this.h[3],c,y),this.h[3]=a(this.h[4],n,b),this.h[4]=a(this.h[0],i,_),this.h[0]=S},c.prototype._digest=function(e){return"hex"===e?i.toHex32(this.h,"little"):i.split32(this.h,"little")};var p=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],g=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],m=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],v=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]},2992:(e,t,n)=>{"use strict";t.sha1=n(4828),t.sha224=n(1627),t.sha256=n(1746),t.sha384=n(2618),t.sha512=n(491)},4828:(e,t,n)=>{"use strict";var i=n(3883),o=n(9589),r=n(5526),s=i.rotl32,a=i.sum32,u=i.sum32_5,l=r.ft_1,c=o.BlockHash,h=[1518500249,1859775393,2400959708,3395469782];function d(){if(!(this instanceof d))return new d;c.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}i.inherits(d,c),e.exports=d,d.blockSize=512,d.outSize=160,d.hmacStrength=80,d.padLength=64,d.prototype._update=function(e,t){for(var n=this.W,i=0;i<16;i++)n[i]=e[t+i];for(;i{"use strict";var i=n(3883),o=n(1746);function r(){if(!(this instanceof r))return new r;o.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}i.inherits(r,o),e.exports=r,r.blockSize=512,r.outSize=224,r.hmacStrength=192,r.padLength=64,r.prototype._digest=function(e){return"hex"===e?i.toHex32(this.h.slice(0,7),"big"):i.split32(this.h.slice(0,7),"big")}},1746:(e,t,n)=>{"use strict";var i=n(3883),o=n(9589),r=n(5526),s=n(4890),a=i.sum32,u=i.sum32_4,l=i.sum32_5,c=r.ch32,h=r.maj32,d=r.s0_256,f=r.s1_256,p=r.g0_256,g=r.g1_256,m=o.BlockHash,v=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function y(){if(!(this instanceof y))return new y;m.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=v,this.W=new Array(64)}i.inherits(y,m),e.exports=y,y.blockSize=512,y.outSize=256,y.hmacStrength=192,y.padLength=64,y.prototype._update=function(e,t){for(var n=this.W,i=0;i<16;i++)n[i]=e[t+i];for(;i{"use strict";var i=n(3883),o=n(491);function r(){if(!(this instanceof r))return new r;o.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}i.inherits(r,o),e.exports=r,r.blockSize=1024,r.outSize=384,r.hmacStrength=192,r.padLength=128,r.prototype._digest=function(e){return"hex"===e?i.toHex32(this.h.slice(0,12),"big"):i.split32(this.h.slice(0,12),"big")}},491:(e,t,n)=>{"use strict";var i=n(3883),o=n(9589),r=n(4890),s=i.rotr64_hi,a=i.rotr64_lo,u=i.shr64_hi,l=i.shr64_lo,c=i.sum64,h=i.sum64_hi,d=i.sum64_lo,f=i.sum64_4_hi,p=i.sum64_4_lo,g=i.sum64_5_hi,m=i.sum64_5_lo,v=o.BlockHash,y=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function b(){if(!(this instanceof b))return new b;v.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=y,this.W=new Array(160)}function _(e,t,n,i,o){var r=e&n^~e&o;return r<0&&(r+=4294967296),r}function w(e,t,n,i,o,r){var s=t&i^~t&r;return s<0&&(s+=4294967296),s}function M(e,t,n,i,o){var r=e&n^e&o^n&o;return r<0&&(r+=4294967296),r}function C(e,t,n,i,o,r){var s=t&i^t&r^i&r;return s<0&&(s+=4294967296),s}function S(e,t){var n=s(e,t,28)^s(t,e,2)^s(t,e,7);return n<0&&(n+=4294967296),n}function L(e,t){var n=a(e,t,28)^a(t,e,2)^a(t,e,7);return n<0&&(n+=4294967296),n}function I(e,t){var n=a(e,t,14)^a(e,t,18)^a(t,e,9);return n<0&&(n+=4294967296),n}function N(e,t){var n=s(e,t,1)^s(e,t,8)^u(e,t,7);return n<0&&(n+=4294967296),n}function x(e,t){var n=a(e,t,1)^a(e,t,8)^l(e,t,7);return n<0&&(n+=4294967296),n}function D(e,t){var n=a(e,t,19)^a(t,e,29)^l(e,t,6);return n<0&&(n+=4294967296),n}i.inherits(b,v),e.exports=b,b.blockSize=1024,b.outSize=512,b.hmacStrength=192,b.padLength=128,b.prototype._prepareBlock=function(e,t){for(var n=this.W,i=0;i<32;i++)n[i]=e[t+i];for(;i{"use strict";var i=n(3883).rotr32;function o(e,t,n){return e&t^~e&n}function r(e,t,n){return e&t^e&n^t&n}function s(e,t,n){return e^t^n}t.ft_1=function(e,t,n,i){return 0===e?o(t,n,i):1===e||3===e?s(t,n,i):2===e?r(t,n,i):void 0},t.ch32=o,t.maj32=r,t.p32=s,t.s0_256=function(e){return i(e,2)^i(e,13)^i(e,22)},t.s1_256=function(e){return i(e,6)^i(e,11)^i(e,25)},t.g0_256=function(e){return i(e,7)^i(e,18)^e>>>3},t.g1_256=function(e){return i(e,17)^i(e,19)^e>>>10}},3883:(e,t,n)=>{"use strict";var i=n(4890),o=n(9385);function r(e,t){return 55296==(64512&e.charCodeAt(t))&&!(t<0||t+1>=e.length)&&56320==(64512&e.charCodeAt(t+1))}function s(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function a(e){return 1===e.length?"0"+e:e}function u(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e}t.inherits=o,t.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var n=[];if("string"==typeof e)if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),o=0;o>6|192,n[i++]=63&s|128):r(e,o)?(s=65536+((1023&s)<<10)+(1023&e.charCodeAt(++o)),n[i++]=s>>18|240,n[i++]=s>>12&63|128,n[i++]=s>>6&63|128,n[i++]=63&s|128):(n[i++]=s>>12|224,n[i++]=s>>6&63|128,n[i++]=63&s|128)}else for(o=0;o>>0}return s},t.split32=function(e,t){for(var n=new Array(4*e.length),i=0,o=0;i>>24,n[o+1]=r>>>16&255,n[o+2]=r>>>8&255,n[o+3]=255&r):(n[o+3]=r>>>24,n[o+2]=r>>>16&255,n[o+1]=r>>>8&255,n[o]=255&r)}return n},t.rotr32=function(e,t){return e>>>t|e<<32-t},t.rotl32=function(e,t){return e<>>32-t},t.sum32=function(e,t){return e+t>>>0},t.sum32_3=function(e,t,n){return e+t+n>>>0},t.sum32_4=function(e,t,n,i){return e+t+n+i>>>0},t.sum32_5=function(e,t,n,i,o){return e+t+n+i+o>>>0},t.sum64=function(e,t,n,i){var o=e[t],r=i+e[t+1]>>>0,s=(r>>0,e[t+1]=r},t.sum64_hi=function(e,t,n,i){return(t+i>>>0>>0},t.sum64_lo=function(e,t,n,i){return t+i>>>0},t.sum64_4_hi=function(e,t,n,i,o,r,s,a){var u=0,l=t;return u+=(l=l+i>>>0)>>0)>>0)>>0},t.sum64_4_lo=function(e,t,n,i,o,r,s,a){return t+i+r+a>>>0},t.sum64_5_hi=function(e,t,n,i,o,r,s,a,u,l){var c=0,h=t;return c+=(h=h+i>>>0)>>0)>>0)>>0)>>0},t.sum64_5_lo=function(e,t,n,i,o,r,s,a,u,l){return t+i+r+a+l>>>0},t.rotr64_hi=function(e,t,n){return(t<<32-n|e>>>n)>>>0},t.rotr64_lo=function(e,t,n){return(e<<32-n|t>>>n)>>>0},t.shr64_hi=function(e,t,n){return e>>>n},t.shr64_lo=function(e,t,n){return(e<<32-n|t>>>n)>>>0}},4484:(e,t,n)=>{"use strict";var i=n(3502),o=n(3720),r=n(4890);function s(e){if(!(this instanceof s))return new s(e);this.hash=e.hash,this.predResist=!!e.predResist,this.outLen=this.hash.outSize,this.minEntropy=e.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var t=o.toArray(e.entropy,e.entropyEnc||"hex"),n=o.toArray(e.nonce,e.nonceEnc||"hex"),i=o.toArray(e.pers,e.persEnc||"hex");r(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,n,i)}e.exports=s,s.prototype._init=function(e,t,n){var i=e.concat(t).concat(n);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var o=0;o=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(n||[])),this._reseed=1},s.prototype.generate=function(e,t,n,i){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof t&&(i=n,n=t,t=null),n&&(n=o.toArray(n,i||"hex"),this._update(n));for(var r=[];r.length{t.read=function(e,t,n,i,o){var r,s,a=8*o-i-1,u=(1<>1,c=-7,h=n?o-1:0,d=n?-1:1,f=e[t+h];for(h+=d,r=f&(1<<-c)-1,f>>=-c,c+=a;c>0;r=256*r+e[t+h],h+=d,c-=8);for(s=r&(1<<-c)-1,r>>=-c,c+=i;c>0;s=256*s+e[t+h],h+=d,c-=8);if(0===r)r=1-l;else{if(r===u)return s?NaN:1/0*(f?-1:1);s+=Math.pow(2,i),r-=l}return(f?-1:1)*s*Math.pow(2,r-i)},t.write=function(e,t,n,i,o,r){var s,a,u,l=8*r-o-1,c=(1<>1,d=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,f=i?0:r-1,p=i?1:-1,g=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=c):(s=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-s))<1&&(s--,u*=2),(t+=s+h>=1?d/u:d*Math.pow(2,1-h))*u>=2&&(s++,u/=2),s+h>=c?(a=0,s=c):s+h>=1?(a=(t*u-1)*Math.pow(2,o),s+=h):(a=t*Math.pow(2,h-1)*Math.pow(2,o),s=0));o>=8;e[n+f]=255&a,f+=p,a/=256,o-=8);for(s=s<0;e[n+f]=255&s,f+=p,s/=256,l-=8);e[n+f-p]|=128*g}},9385:e=>{"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},7045:e=>{var t={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==t.call(e)}},9781:(e,t,n)=>{"use strict";var i=n(9385),o=n(9558),r=n(2238).Buffer,s=new Array(16);function a(){o.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}function u(e,t){return e<>>32-t}function l(e,t,n,i,o,r,s){return u(e+(t&n|~t&i)+o+r|0,s)+t|0}function c(e,t,n,i,o,r,s){return u(e+(t&i|n&~i)+o+r|0,s)+t|0}function h(e,t,n,i,o,r,s){return u(e+(t^n^i)+o+r|0,s)+t|0}function d(e,t,n,i,o,r,s){return u(e+(n^(t|~i))+o+r|0,s)+t|0}i(a,o),a.prototype._update=function(){for(var e=s,t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t);var n=this._a,i=this._b,o=this._c,r=this._d;n=l(n,i,o,r,e[0],3614090360,7),r=l(r,n,i,o,e[1],3905402710,12),o=l(o,r,n,i,e[2],606105819,17),i=l(i,o,r,n,e[3],3250441966,22),n=l(n,i,o,r,e[4],4118548399,7),r=l(r,n,i,o,e[5],1200080426,12),o=l(o,r,n,i,e[6],2821735955,17),i=l(i,o,r,n,e[7],4249261313,22),n=l(n,i,o,r,e[8],1770035416,7),r=l(r,n,i,o,e[9],2336552879,12),o=l(o,r,n,i,e[10],4294925233,17),i=l(i,o,r,n,e[11],2304563134,22),n=l(n,i,o,r,e[12],1804603682,7),r=l(r,n,i,o,e[13],4254626195,12),o=l(o,r,n,i,e[14],2792965006,17),n=c(n,i=l(i,o,r,n,e[15],1236535329,22),o,r,e[1],4129170786,5),r=c(r,n,i,o,e[6],3225465664,9),o=c(o,r,n,i,e[11],643717713,14),i=c(i,o,r,n,e[0],3921069994,20),n=c(n,i,o,r,e[5],3593408605,5),r=c(r,n,i,o,e[10],38016083,9),o=c(o,r,n,i,e[15],3634488961,14),i=c(i,o,r,n,e[4],3889429448,20),n=c(n,i,o,r,e[9],568446438,5),r=c(r,n,i,o,e[14],3275163606,9),o=c(o,r,n,i,e[3],4107603335,14),i=c(i,o,r,n,e[8],1163531501,20),n=c(n,i,o,r,e[13],2850285829,5),r=c(r,n,i,o,e[2],4243563512,9),o=c(o,r,n,i,e[7],1735328473,14),n=h(n,i=c(i,o,r,n,e[12],2368359562,20),o,r,e[5],4294588738,4),r=h(r,n,i,o,e[8],2272392833,11),o=h(o,r,n,i,e[11],1839030562,16),i=h(i,o,r,n,e[14],4259657740,23),n=h(n,i,o,r,e[1],2763975236,4),r=h(r,n,i,o,e[4],1272893353,11),o=h(o,r,n,i,e[7],4139469664,16),i=h(i,o,r,n,e[10],3200236656,23),n=h(n,i,o,r,e[13],681279174,4),r=h(r,n,i,o,e[0],3936430074,11),o=h(o,r,n,i,e[3],3572445317,16),i=h(i,o,r,n,e[6],76029189,23),n=h(n,i,o,r,e[9],3654602809,4),r=h(r,n,i,o,e[12],3873151461,11),o=h(o,r,n,i,e[15],530742520,16),n=d(n,i=h(i,o,r,n,e[2],3299628645,23),o,r,e[0],4096336452,6),r=d(r,n,i,o,e[7],1126891415,10),o=d(o,r,n,i,e[14],2878612391,15),i=d(i,o,r,n,e[5],4237533241,21),n=d(n,i,o,r,e[12],1700485571,6),r=d(r,n,i,o,e[3],2399980690,10),o=d(o,r,n,i,e[10],4293915773,15),i=d(i,o,r,n,e[1],2240044497,21),n=d(n,i,o,r,e[8],1873313359,6),r=d(r,n,i,o,e[15],4264355552,10),o=d(o,r,n,i,e[6],2734768916,15),i=d(i,o,r,n,e[13],1309151649,21),n=d(n,i,o,r,e[4],4149444226,6),r=d(r,n,i,o,e[11],3174756917,10),o=d(o,r,n,i,e[2],718787259,15),i=d(i,o,r,n,e[9],3951481745,21),this._a=this._a+n|0,this._b=this._b+i|0,this._c=this._c+o|0,this._d=this._d+r|0},a.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var e=r.allocUnsafe(16);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e},e.exports=a},3587:(e,t,n)=>{var i=n(7735),o=n(4366);function r(e){this.rand=e||new o.Rand}e.exports=r,r.create=function(e){return new r(e)},r.prototype._randbelow=function(e){var t=e.bitLength(),n=Math.ceil(t/8);do{var o=new i(this.rand.generate(n))}while(o.cmp(e)>=0);return o},r.prototype._randrange=function(e,t){var n=t.sub(e);return e.add(this._randbelow(n))},r.prototype.test=function(e,t,n){var o=e.bitLength(),r=i.mont(e),s=new i(1).toRed(r);t||(t=Math.max(1,o/48|0));for(var a=e.subn(1),u=0;!a.testn(u);u++);for(var l=e.shrn(u),c=a.toRed(r);t>0;t--){var h=this._randrange(new i(2),a);n&&n(h);var d=h.toRed(r).redPow(l);if(0!==d.cmp(s)&&0!==d.cmp(c)){for(var f=1;f0;t--){var c=this._randrange(new i(2),s),h=e.gcd(c);if(0!==h.cmpn(1))return h;var d=c.toRed(o).redPow(u);if(0!==d.cmp(r)&&0!==d.cmp(l)){for(var f=1;f=65&&n<=70?n-55:n>=97&&n<=102?n-87:n-48&15}function u(e,t,n){var i=a(e,n);return n-1>=t&&(i|=a(e,n-1)<<4),i}function l(e,t,n,i){for(var o=0,r=Math.min(e.length,n),s=t;s=49?a-49+10:a>=17?a-17+10:a}return o}r.isBN=function(e){return e instanceof r||null!==e&&"object"==typeof e&&e.constructor.wordSize===r.wordSize&&Array.isArray(e.words)},r.max=function(e,t){return e.cmp(t)>0?e:t},r.min=function(e,t){return e.cmp(t)<0?e:t},r.prototype._init=function(e,t,n){if("number"==typeof e)return this._initNumber(e,t,n);if("object"==typeof e)return this._initArray(e,t,n);"hex"===t&&(t=16),i(t===(0|t)&&t>=2&&t<=36);var o=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(o++,this.negative=1),o=0;o-=3)s=e[o]|e[o-1]<<8|e[o-2]<<16,this.words[r]|=s<>>26-a&67108863,(a+=24)>=26&&(a-=26,r++);else if("le"===n)for(o=0,r=0;o>>26-a&67108863,(a+=24)>=26&&(a-=26,r++);return this.strip()},r.prototype._parseHex=function(e,t,n){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var i=0;i=t;i-=2)o=u(e,t,i)<=18?(r-=18,s+=1,this.words[s]|=o>>>26):r+=8;else for(i=(e.length-t)%2==0?t+1:t;i=18?(r-=18,s+=1,this.words[s]|=o>>>26):r+=8;this.strip()},r.prototype._parseBase=function(e,t,n){this.words=[0],this.length=1;for(var i=0,o=1;o<=67108863;o*=t)i++;i--,o=o/t|0;for(var r=e.length-n,s=r%i,a=Math.min(r,r-s)+n,u=0,c=n;c1&&0===this.words[this.length-1];)this.length--;return this._normSign()},r.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},r.prototype.inspect=function(){return(this.red?""};var c=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],h=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],d=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function f(e,t,n){n.negative=t.negative^e.negative;var i=e.length+t.length|0;n.length=i,i=i-1|0;var o=0|e.words[0],r=0|t.words[0],s=o*r,a=67108863&s,u=s/67108864|0;n.words[0]=a;for(var l=1;l>>26,h=67108863&u,d=Math.min(l,t.length-1),f=Math.max(0,l-e.length+1);f<=d;f++){var p=l-f|0;c+=(s=(o=0|e.words[p])*(r=0|t.words[f])+h)/67108864|0,h=67108863&s}n.words[l]=0|h,u=0|c}return 0!==u?n.words[l]=0|u:n.length--,n.strip()}r.prototype.toString=function(e,t){var n;if(t=0|t||1,16===(e=e||10)||"hex"===e){n="";for(var o=0,r=0,s=0;s>>24-o&16777215)||s!==this.length-1?c[6-u.length]+u+n:u+n,(o+=2)>=26&&(o-=26,s--)}for(0!==r&&(n=r.toString(16)+n);n.length%t!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(e===(0|e)&&e>=2&&e<=36){var l=h[e],f=d[e];n="";var p=this.clone();for(p.negative=0;!p.isZero();){var g=p.modn(f).toString(e);n=(p=p.idivn(f)).isZero()?g+n:c[l-g.length]+g+n}for(this.isZero()&&(n="0"+n);n.length%t!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}i(!1,"Base should be between 2 and 36")},r.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&i(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},r.prototype.toJSON=function(){return this.toString(16)},r.prototype.toBuffer=function(e,t){return i(void 0!==s),this.toArrayLike(s,e,t)},r.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},r.prototype.toArrayLike=function(e,t,n){var o=this.byteLength(),r=n||Math.max(1,o);i(o<=r,"byte array longer than desired length"),i(r>0,"Requested array length <= 0"),this.strip();var s,a,u="le"===t,l=new e(r),c=this.clone();if(u){for(a=0;!c.isZero();a++)s=c.andln(255),c.iushrn(8),l[a]=s;for(;a=4096&&(n+=13,t>>>=13),t>=64&&(n+=7,t>>>=7),t>=8&&(n+=4,t>>>=4),t>=2&&(n+=2,t>>>=2),n+t},r.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,n=0;return 8191&t||(n+=13,t>>>=13),127&t||(n+=7,t>>>=7),15&t||(n+=4,t>>>=4),3&t||(n+=2,t>>>=2),1&t||n++,n},r.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},r.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},r.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},r.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var n=0;ne.length?this.clone().iand(e):e.clone().iand(this)},r.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},r.prototype.iuxor=function(e){var t,n;this.length>e.length?(t=this,n=e):(t=e,n=this);for(var i=0;ie.length?this.clone().ixor(e):e.clone().ixor(this)},r.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},r.prototype.inotn=function(e){i("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),n=e%26;this._expand(t),n>0&&t--;for(var o=0;o0&&(this.words[o]=~this.words[o]&67108863>>26-n),this.strip()},r.prototype.notn=function(e){return this.clone().inotn(e)},r.prototype.setn=function(e,t){i("number"==typeof e&&e>=0);var n=e/26|0,o=e%26;return this._expand(n+1),this.words[n]=t?this.words[n]|1<e.length?(n=this,i=e):(n=e,i=this);for(var o=0,r=0;r>>26;for(;0!==o&&r>>26;if(this.length=n.length,0!==o)this.words[this.length]=o,this.length++;else if(n!==this)for(;re.length?this.clone().iadd(e):e.clone().iadd(this)},r.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var n,i,o=this.cmp(e);if(0===o)return this.negative=0,this.length=1,this.words[0]=0,this;o>0?(n=this,i=e):(n=e,i=this);for(var r=0,s=0;s>26,this.words[s]=67108863&t;for(;0!==r&&s>26,this.words[s]=67108863&t;if(0===r&&s>>13,f=0|s[1],p=8191&f,g=f>>>13,m=0|s[2],v=8191&m,y=m>>>13,b=0|s[3],_=8191&b,w=b>>>13,M=0|s[4],C=8191&M,S=M>>>13,L=0|s[5],I=8191&L,N=L>>>13,x=0|s[6],D=8191&x,k=x>>>13,T=0|s[7],E=8191&T,A=T>>>13,j=0|s[8],O=8191&j,R=j>>>13,P=0|s[9],z=8191&P,W=P>>>13,F=0|a[0],B=8191&F,H=F>>>13,V=0|a[1],U=8191&V,Y=V>>>13,Z=0|a[2],G=8191&Z,Q=Z>>>13,q=0|a[3],K=8191&q,J=q>>>13,X=0|a[4],$=8191&X,ee=X>>>13,te=0|a[5],ne=8191&te,ie=te>>>13,oe=0|a[6],re=8191&oe,se=oe>>>13,ae=0|a[7],ue=8191&ae,le=ae>>>13,ce=0|a[8],he=8191&ce,de=ce>>>13,fe=0|a[9],pe=8191&fe,ge=fe>>>13;n.negative=e.negative^t.negative,n.length=19;var me=(l+(i=Math.imul(h,B))|0)+((8191&(o=(o=Math.imul(h,H))+Math.imul(d,B)|0))<<13)|0;l=((r=Math.imul(d,H))+(o>>>13)|0)+(me>>>26)|0,me&=67108863,i=Math.imul(p,B),o=(o=Math.imul(p,H))+Math.imul(g,B)|0,r=Math.imul(g,H);var ve=(l+(i=i+Math.imul(h,U)|0)|0)+((8191&(o=(o=o+Math.imul(h,Y)|0)+Math.imul(d,U)|0))<<13)|0;l=((r=r+Math.imul(d,Y)|0)+(o>>>13)|0)+(ve>>>26)|0,ve&=67108863,i=Math.imul(v,B),o=(o=Math.imul(v,H))+Math.imul(y,B)|0,r=Math.imul(y,H),i=i+Math.imul(p,U)|0,o=(o=o+Math.imul(p,Y)|0)+Math.imul(g,U)|0,r=r+Math.imul(g,Y)|0;var ye=(l+(i=i+Math.imul(h,G)|0)|0)+((8191&(o=(o=o+Math.imul(h,Q)|0)+Math.imul(d,G)|0))<<13)|0;l=((r=r+Math.imul(d,Q)|0)+(o>>>13)|0)+(ye>>>26)|0,ye&=67108863,i=Math.imul(_,B),o=(o=Math.imul(_,H))+Math.imul(w,B)|0,r=Math.imul(w,H),i=i+Math.imul(v,U)|0,o=(o=o+Math.imul(v,Y)|0)+Math.imul(y,U)|0,r=r+Math.imul(y,Y)|0,i=i+Math.imul(p,G)|0,o=(o=o+Math.imul(p,Q)|0)+Math.imul(g,G)|0,r=r+Math.imul(g,Q)|0;var be=(l+(i=i+Math.imul(h,K)|0)|0)+((8191&(o=(o=o+Math.imul(h,J)|0)+Math.imul(d,K)|0))<<13)|0;l=((r=r+Math.imul(d,J)|0)+(o>>>13)|0)+(be>>>26)|0,be&=67108863,i=Math.imul(C,B),o=(o=Math.imul(C,H))+Math.imul(S,B)|0,r=Math.imul(S,H),i=i+Math.imul(_,U)|0,o=(o=o+Math.imul(_,Y)|0)+Math.imul(w,U)|0,r=r+Math.imul(w,Y)|0,i=i+Math.imul(v,G)|0,o=(o=o+Math.imul(v,Q)|0)+Math.imul(y,G)|0,r=r+Math.imul(y,Q)|0,i=i+Math.imul(p,K)|0,o=(o=o+Math.imul(p,J)|0)+Math.imul(g,K)|0,r=r+Math.imul(g,J)|0;var _e=(l+(i=i+Math.imul(h,$)|0)|0)+((8191&(o=(o=o+Math.imul(h,ee)|0)+Math.imul(d,$)|0))<<13)|0;l=((r=r+Math.imul(d,ee)|0)+(o>>>13)|0)+(_e>>>26)|0,_e&=67108863,i=Math.imul(I,B),o=(o=Math.imul(I,H))+Math.imul(N,B)|0,r=Math.imul(N,H),i=i+Math.imul(C,U)|0,o=(o=o+Math.imul(C,Y)|0)+Math.imul(S,U)|0,r=r+Math.imul(S,Y)|0,i=i+Math.imul(_,G)|0,o=(o=o+Math.imul(_,Q)|0)+Math.imul(w,G)|0,r=r+Math.imul(w,Q)|0,i=i+Math.imul(v,K)|0,o=(o=o+Math.imul(v,J)|0)+Math.imul(y,K)|0,r=r+Math.imul(y,J)|0,i=i+Math.imul(p,$)|0,o=(o=o+Math.imul(p,ee)|0)+Math.imul(g,$)|0,r=r+Math.imul(g,ee)|0;var we=(l+(i=i+Math.imul(h,ne)|0)|0)+((8191&(o=(o=o+Math.imul(h,ie)|0)+Math.imul(d,ne)|0))<<13)|0;l=((r=r+Math.imul(d,ie)|0)+(o>>>13)|0)+(we>>>26)|0,we&=67108863,i=Math.imul(D,B),o=(o=Math.imul(D,H))+Math.imul(k,B)|0,r=Math.imul(k,H),i=i+Math.imul(I,U)|0,o=(o=o+Math.imul(I,Y)|0)+Math.imul(N,U)|0,r=r+Math.imul(N,Y)|0,i=i+Math.imul(C,G)|0,o=(o=o+Math.imul(C,Q)|0)+Math.imul(S,G)|0,r=r+Math.imul(S,Q)|0,i=i+Math.imul(_,K)|0,o=(o=o+Math.imul(_,J)|0)+Math.imul(w,K)|0,r=r+Math.imul(w,J)|0,i=i+Math.imul(v,$)|0,o=(o=o+Math.imul(v,ee)|0)+Math.imul(y,$)|0,r=r+Math.imul(y,ee)|0,i=i+Math.imul(p,ne)|0,o=(o=o+Math.imul(p,ie)|0)+Math.imul(g,ne)|0,r=r+Math.imul(g,ie)|0;var Me=(l+(i=i+Math.imul(h,re)|0)|0)+((8191&(o=(o=o+Math.imul(h,se)|0)+Math.imul(d,re)|0))<<13)|0;l=((r=r+Math.imul(d,se)|0)+(o>>>13)|0)+(Me>>>26)|0,Me&=67108863,i=Math.imul(E,B),o=(o=Math.imul(E,H))+Math.imul(A,B)|0,r=Math.imul(A,H),i=i+Math.imul(D,U)|0,o=(o=o+Math.imul(D,Y)|0)+Math.imul(k,U)|0,r=r+Math.imul(k,Y)|0,i=i+Math.imul(I,G)|0,o=(o=o+Math.imul(I,Q)|0)+Math.imul(N,G)|0,r=r+Math.imul(N,Q)|0,i=i+Math.imul(C,K)|0,o=(o=o+Math.imul(C,J)|0)+Math.imul(S,K)|0,r=r+Math.imul(S,J)|0,i=i+Math.imul(_,$)|0,o=(o=o+Math.imul(_,ee)|0)+Math.imul(w,$)|0,r=r+Math.imul(w,ee)|0,i=i+Math.imul(v,ne)|0,o=(o=o+Math.imul(v,ie)|0)+Math.imul(y,ne)|0,r=r+Math.imul(y,ie)|0,i=i+Math.imul(p,re)|0,o=(o=o+Math.imul(p,se)|0)+Math.imul(g,re)|0,r=r+Math.imul(g,se)|0;var Ce=(l+(i=i+Math.imul(h,ue)|0)|0)+((8191&(o=(o=o+Math.imul(h,le)|0)+Math.imul(d,ue)|0))<<13)|0;l=((r=r+Math.imul(d,le)|0)+(o>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,i=Math.imul(O,B),o=(o=Math.imul(O,H))+Math.imul(R,B)|0,r=Math.imul(R,H),i=i+Math.imul(E,U)|0,o=(o=o+Math.imul(E,Y)|0)+Math.imul(A,U)|0,r=r+Math.imul(A,Y)|0,i=i+Math.imul(D,G)|0,o=(o=o+Math.imul(D,Q)|0)+Math.imul(k,G)|0,r=r+Math.imul(k,Q)|0,i=i+Math.imul(I,K)|0,o=(o=o+Math.imul(I,J)|0)+Math.imul(N,K)|0,r=r+Math.imul(N,J)|0,i=i+Math.imul(C,$)|0,o=(o=o+Math.imul(C,ee)|0)+Math.imul(S,$)|0,r=r+Math.imul(S,ee)|0,i=i+Math.imul(_,ne)|0,o=(o=o+Math.imul(_,ie)|0)+Math.imul(w,ne)|0,r=r+Math.imul(w,ie)|0,i=i+Math.imul(v,re)|0,o=(o=o+Math.imul(v,se)|0)+Math.imul(y,re)|0,r=r+Math.imul(y,se)|0,i=i+Math.imul(p,ue)|0,o=(o=o+Math.imul(p,le)|0)+Math.imul(g,ue)|0,r=r+Math.imul(g,le)|0;var Se=(l+(i=i+Math.imul(h,he)|0)|0)+((8191&(o=(o=o+Math.imul(h,de)|0)+Math.imul(d,he)|0))<<13)|0;l=((r=r+Math.imul(d,de)|0)+(o>>>13)|0)+(Se>>>26)|0,Se&=67108863,i=Math.imul(z,B),o=(o=Math.imul(z,H))+Math.imul(W,B)|0,r=Math.imul(W,H),i=i+Math.imul(O,U)|0,o=(o=o+Math.imul(O,Y)|0)+Math.imul(R,U)|0,r=r+Math.imul(R,Y)|0,i=i+Math.imul(E,G)|0,o=(o=o+Math.imul(E,Q)|0)+Math.imul(A,G)|0,r=r+Math.imul(A,Q)|0,i=i+Math.imul(D,K)|0,o=(o=o+Math.imul(D,J)|0)+Math.imul(k,K)|0,r=r+Math.imul(k,J)|0,i=i+Math.imul(I,$)|0,o=(o=o+Math.imul(I,ee)|0)+Math.imul(N,$)|0,r=r+Math.imul(N,ee)|0,i=i+Math.imul(C,ne)|0,o=(o=o+Math.imul(C,ie)|0)+Math.imul(S,ne)|0,r=r+Math.imul(S,ie)|0,i=i+Math.imul(_,re)|0,o=(o=o+Math.imul(_,se)|0)+Math.imul(w,re)|0,r=r+Math.imul(w,se)|0,i=i+Math.imul(v,ue)|0,o=(o=o+Math.imul(v,le)|0)+Math.imul(y,ue)|0,r=r+Math.imul(y,le)|0,i=i+Math.imul(p,he)|0,o=(o=o+Math.imul(p,de)|0)+Math.imul(g,he)|0,r=r+Math.imul(g,de)|0;var Le=(l+(i=i+Math.imul(h,pe)|0)|0)+((8191&(o=(o=o+Math.imul(h,ge)|0)+Math.imul(d,pe)|0))<<13)|0;l=((r=r+Math.imul(d,ge)|0)+(o>>>13)|0)+(Le>>>26)|0,Le&=67108863,i=Math.imul(z,U),o=(o=Math.imul(z,Y))+Math.imul(W,U)|0,r=Math.imul(W,Y),i=i+Math.imul(O,G)|0,o=(o=o+Math.imul(O,Q)|0)+Math.imul(R,G)|0,r=r+Math.imul(R,Q)|0,i=i+Math.imul(E,K)|0,o=(o=o+Math.imul(E,J)|0)+Math.imul(A,K)|0,r=r+Math.imul(A,J)|0,i=i+Math.imul(D,$)|0,o=(o=o+Math.imul(D,ee)|0)+Math.imul(k,$)|0,r=r+Math.imul(k,ee)|0,i=i+Math.imul(I,ne)|0,o=(o=o+Math.imul(I,ie)|0)+Math.imul(N,ne)|0,r=r+Math.imul(N,ie)|0,i=i+Math.imul(C,re)|0,o=(o=o+Math.imul(C,se)|0)+Math.imul(S,re)|0,r=r+Math.imul(S,se)|0,i=i+Math.imul(_,ue)|0,o=(o=o+Math.imul(_,le)|0)+Math.imul(w,ue)|0,r=r+Math.imul(w,le)|0,i=i+Math.imul(v,he)|0,o=(o=o+Math.imul(v,de)|0)+Math.imul(y,he)|0,r=r+Math.imul(y,de)|0;var Ie=(l+(i=i+Math.imul(p,pe)|0)|0)+((8191&(o=(o=o+Math.imul(p,ge)|0)+Math.imul(g,pe)|0))<<13)|0;l=((r=r+Math.imul(g,ge)|0)+(o>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,i=Math.imul(z,G),o=(o=Math.imul(z,Q))+Math.imul(W,G)|0,r=Math.imul(W,Q),i=i+Math.imul(O,K)|0,o=(o=o+Math.imul(O,J)|0)+Math.imul(R,K)|0,r=r+Math.imul(R,J)|0,i=i+Math.imul(E,$)|0,o=(o=o+Math.imul(E,ee)|0)+Math.imul(A,$)|0,r=r+Math.imul(A,ee)|0,i=i+Math.imul(D,ne)|0,o=(o=o+Math.imul(D,ie)|0)+Math.imul(k,ne)|0,r=r+Math.imul(k,ie)|0,i=i+Math.imul(I,re)|0,o=(o=o+Math.imul(I,se)|0)+Math.imul(N,re)|0,r=r+Math.imul(N,se)|0,i=i+Math.imul(C,ue)|0,o=(o=o+Math.imul(C,le)|0)+Math.imul(S,ue)|0,r=r+Math.imul(S,le)|0,i=i+Math.imul(_,he)|0,o=(o=o+Math.imul(_,de)|0)+Math.imul(w,he)|0,r=r+Math.imul(w,de)|0;var Ne=(l+(i=i+Math.imul(v,pe)|0)|0)+((8191&(o=(o=o+Math.imul(v,ge)|0)+Math.imul(y,pe)|0))<<13)|0;l=((r=r+Math.imul(y,ge)|0)+(o>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,i=Math.imul(z,K),o=(o=Math.imul(z,J))+Math.imul(W,K)|0,r=Math.imul(W,J),i=i+Math.imul(O,$)|0,o=(o=o+Math.imul(O,ee)|0)+Math.imul(R,$)|0,r=r+Math.imul(R,ee)|0,i=i+Math.imul(E,ne)|0,o=(o=o+Math.imul(E,ie)|0)+Math.imul(A,ne)|0,r=r+Math.imul(A,ie)|0,i=i+Math.imul(D,re)|0,o=(o=o+Math.imul(D,se)|0)+Math.imul(k,re)|0,r=r+Math.imul(k,se)|0,i=i+Math.imul(I,ue)|0,o=(o=o+Math.imul(I,le)|0)+Math.imul(N,ue)|0,r=r+Math.imul(N,le)|0,i=i+Math.imul(C,he)|0,o=(o=o+Math.imul(C,de)|0)+Math.imul(S,he)|0,r=r+Math.imul(S,de)|0;var xe=(l+(i=i+Math.imul(_,pe)|0)|0)+((8191&(o=(o=o+Math.imul(_,ge)|0)+Math.imul(w,pe)|0))<<13)|0;l=((r=r+Math.imul(w,ge)|0)+(o>>>13)|0)+(xe>>>26)|0,xe&=67108863,i=Math.imul(z,$),o=(o=Math.imul(z,ee))+Math.imul(W,$)|0,r=Math.imul(W,ee),i=i+Math.imul(O,ne)|0,o=(o=o+Math.imul(O,ie)|0)+Math.imul(R,ne)|0,r=r+Math.imul(R,ie)|0,i=i+Math.imul(E,re)|0,o=(o=o+Math.imul(E,se)|0)+Math.imul(A,re)|0,r=r+Math.imul(A,se)|0,i=i+Math.imul(D,ue)|0,o=(o=o+Math.imul(D,le)|0)+Math.imul(k,ue)|0,r=r+Math.imul(k,le)|0,i=i+Math.imul(I,he)|0,o=(o=o+Math.imul(I,de)|0)+Math.imul(N,he)|0,r=r+Math.imul(N,de)|0;var De=(l+(i=i+Math.imul(C,pe)|0)|0)+((8191&(o=(o=o+Math.imul(C,ge)|0)+Math.imul(S,pe)|0))<<13)|0;l=((r=r+Math.imul(S,ge)|0)+(o>>>13)|0)+(De>>>26)|0,De&=67108863,i=Math.imul(z,ne),o=(o=Math.imul(z,ie))+Math.imul(W,ne)|0,r=Math.imul(W,ie),i=i+Math.imul(O,re)|0,o=(o=o+Math.imul(O,se)|0)+Math.imul(R,re)|0,r=r+Math.imul(R,se)|0,i=i+Math.imul(E,ue)|0,o=(o=o+Math.imul(E,le)|0)+Math.imul(A,ue)|0,r=r+Math.imul(A,le)|0,i=i+Math.imul(D,he)|0,o=(o=o+Math.imul(D,de)|0)+Math.imul(k,he)|0,r=r+Math.imul(k,de)|0;var ke=(l+(i=i+Math.imul(I,pe)|0)|0)+((8191&(o=(o=o+Math.imul(I,ge)|0)+Math.imul(N,pe)|0))<<13)|0;l=((r=r+Math.imul(N,ge)|0)+(o>>>13)|0)+(ke>>>26)|0,ke&=67108863,i=Math.imul(z,re),o=(o=Math.imul(z,se))+Math.imul(W,re)|0,r=Math.imul(W,se),i=i+Math.imul(O,ue)|0,o=(o=o+Math.imul(O,le)|0)+Math.imul(R,ue)|0,r=r+Math.imul(R,le)|0,i=i+Math.imul(E,he)|0,o=(o=o+Math.imul(E,de)|0)+Math.imul(A,he)|0,r=r+Math.imul(A,de)|0;var Te=(l+(i=i+Math.imul(D,pe)|0)|0)+((8191&(o=(o=o+Math.imul(D,ge)|0)+Math.imul(k,pe)|0))<<13)|0;l=((r=r+Math.imul(k,ge)|0)+(o>>>13)|0)+(Te>>>26)|0,Te&=67108863,i=Math.imul(z,ue),o=(o=Math.imul(z,le))+Math.imul(W,ue)|0,r=Math.imul(W,le),i=i+Math.imul(O,he)|0,o=(o=o+Math.imul(O,de)|0)+Math.imul(R,he)|0,r=r+Math.imul(R,de)|0;var Ee=(l+(i=i+Math.imul(E,pe)|0)|0)+((8191&(o=(o=o+Math.imul(E,ge)|0)+Math.imul(A,pe)|0))<<13)|0;l=((r=r+Math.imul(A,ge)|0)+(o>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,i=Math.imul(z,he),o=(o=Math.imul(z,de))+Math.imul(W,he)|0,r=Math.imul(W,de);var Ae=(l+(i=i+Math.imul(O,pe)|0)|0)+((8191&(o=(o=o+Math.imul(O,ge)|0)+Math.imul(R,pe)|0))<<13)|0;l=((r=r+Math.imul(R,ge)|0)+(o>>>13)|0)+(Ae>>>26)|0,Ae&=67108863;var je=(l+(i=Math.imul(z,pe))|0)+((8191&(o=(o=Math.imul(z,ge))+Math.imul(W,pe)|0))<<13)|0;return l=((r=Math.imul(W,ge))+(o>>>13)|0)+(je>>>26)|0,je&=67108863,u[0]=me,u[1]=ve,u[2]=ye,u[3]=be,u[4]=_e,u[5]=we,u[6]=Me,u[7]=Ce,u[8]=Se,u[9]=Le,u[10]=Ie,u[11]=Ne,u[12]=xe,u[13]=De,u[14]=ke,u[15]=Te,u[16]=Ee,u[17]=Ae,u[18]=je,0!==l&&(u[19]=l,n.length++),n};function g(e,t,n){return(new m).mulp(e,t,n)}function m(e,t){this.x=e,this.y=t}Math.imul||(p=f),r.prototype.mulTo=function(e,t){var n,i=this.length+e.length;return n=10===this.length&&10===e.length?p(this,e,t):i<63?f(this,e,t):i<1024?function(e,t,n){n.negative=t.negative^e.negative,n.length=e.length+t.length;for(var i=0,o=0,r=0;r>>26)|0)>>>26,s&=67108863}n.words[r]=a,i=s,s=o}return 0!==i?n.words[r]=i:n.length--,n.strip()}(this,e,t):g(this,e,t),n},m.prototype.makeRBT=function(e){for(var t=new Array(e),n=r.prototype._countBits(e)-1,i=0;i>=1;return i},m.prototype.permute=function(e,t,n,i,o,r){for(var s=0;s>>=1)o++;return 1<>>=13,n[2*s+1]=8191&r,r>>>=13;for(s=2*t;s>=26,t+=o/67108864|0,t+=r>>>26,this.words[n]=67108863&r}return 0!==t&&(this.words[n]=t,this.length++),this},r.prototype.muln=function(e){return this.clone().imuln(e)},r.prototype.sqr=function(){return this.mul(this)},r.prototype.isqr=function(){return this.imul(this.clone())},r.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),n=0;n>>o}return t}(e);if(0===t.length)return new r(1);for(var n=this,i=0;i=0);var t,n=e%26,o=(e-n)/26,r=67108863>>>26-n<<26-n;if(0!==n){var s=0;for(t=0;t>>26-n}s&&(this.words[t]=s,this.length++)}if(0!==o){for(t=this.length-1;t>=0;t--)this.words[t+o]=this.words[t];for(t=0;t=0),o=t?(t-t%26)/26:0;var r=e%26,s=Math.min((e-r)/26,this.length),a=67108863^67108863>>>r<s)for(this.length-=s,l=0;l=0&&(0!==c||l>=o);l--){var h=0|this.words[l];this.words[l]=c<<26-r|h>>>r,c=h&a}return u&&0!==c&&(u.words[u.length++]=c),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},r.prototype.ishrn=function(e,t,n){return i(0===this.negative),this.iushrn(e,t,n)},r.prototype.shln=function(e){return this.clone().ishln(e)},r.prototype.ushln=function(e){return this.clone().iushln(e)},r.prototype.shrn=function(e){return this.clone().ishrn(e)},r.prototype.ushrn=function(e){return this.clone().iushrn(e)},r.prototype.testn=function(e){i("number"==typeof e&&e>=0);var t=e%26,n=(e-t)/26,o=1<=0);var t=e%26,n=(e-t)/26;if(i(0===this.negative,"imaskn works only with positive numbers"),this.length<=n)return this;if(0!==t&&n++,this.length=Math.min(n,this.length),0!==t){var o=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},r.prototype.isubn=function(e){if(i("number"==typeof e),i(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(u/67108864|0),this.words[o+n]=67108863&r}for(;o>26,this.words[o+n]=67108863&r;if(0===a)return this.strip();for(i(-1===a),a=0,o=0;o>26,this.words[o]=67108863&r;return this.negative=1,this.strip()},r.prototype._wordDiv=function(e,t){var n=(this.length,e.length),i=this.clone(),o=e,s=0|o.words[o.length-1];0!=(n=26-this._countBits(s))&&(o=o.ushln(n),i.iushln(n),s=0|o.words[o.length-1]);var a,u=i.length-o.length;if("mod"!==t){(a=new r(null)).length=u+1,a.words=new Array(a.length);for(var l=0;l=0;h--){var d=67108864*(0|i.words[o.length+h])+(0|i.words[o.length+h-1]);for(d=Math.min(d/s|0,67108863),i._ishlnsubmul(o,d,h);0!==i.negative;)d--,i.negative=0,i._ishlnsubmul(o,1,h),i.isZero()||(i.negative^=1);a&&(a.words[h]=d)}return a&&a.strip(),i.strip(),"div"!==t&&0!==n&&i.iushrn(n),{div:a||null,mod:i}},r.prototype.divmod=function(e,t,n){return i(!e.isZero()),this.isZero()?{div:new r(0),mod:new r(0)}:0!==this.negative&&0===e.negative?(a=this.neg().divmod(e,t),"mod"!==t&&(o=a.div.neg()),"div"!==t&&(s=a.mod.neg(),n&&0!==s.negative&&s.iadd(e)),{div:o,mod:s}):0===this.negative&&0!==e.negative?(a=this.divmod(e.neg(),t),"mod"!==t&&(o=a.div.neg()),{div:o,mod:a.mod}):this.negative&e.negative?(a=this.neg().divmod(e.neg(),t),"div"!==t&&(s=a.mod.neg(),n&&0!==s.negative&&s.isub(e)),{div:a.div,mod:s}):e.length>this.length||this.cmp(e)<0?{div:new r(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new r(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new r(this.modn(e.words[0]))}:this._wordDiv(e,t);var o,s,a},r.prototype.div=function(e){return this.divmod(e,"div",!1).div},r.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},r.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},r.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var n=0!==t.div.negative?t.mod.isub(e):t.mod,i=e.ushrn(1),o=e.andln(1),r=n.cmp(i);return r<0||1===o&&0===r?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},r.prototype.modn=function(e){i(e<=67108863);for(var t=(1<<26)%e,n=0,o=this.length-1;o>=0;o--)n=(t*n+(0|this.words[o]))%e;return n},r.prototype.idivn=function(e){i(e<=67108863);for(var t=0,n=this.length-1;n>=0;n--){var o=(0|this.words[n])+67108864*t;this.words[n]=o/e|0,t=o%e}return this.strip()},r.prototype.divn=function(e){return this.clone().idivn(e)},r.prototype.egcd=function(e){i(0===e.negative),i(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var o=new r(1),s=new r(0),a=new r(0),u=new r(1),l=0;t.isEven()&&n.isEven();)t.iushrn(1),n.iushrn(1),++l;for(var c=n.clone(),h=t.clone();!t.isZero();){for(var d=0,f=1;!(t.words[0]&f)&&d<26;++d,f<<=1);if(d>0)for(t.iushrn(d);d-- >0;)(o.isOdd()||s.isOdd())&&(o.iadd(c),s.isub(h)),o.iushrn(1),s.iushrn(1);for(var p=0,g=1;!(n.words[0]&g)&&p<26;++p,g<<=1);if(p>0)for(n.iushrn(p);p-- >0;)(a.isOdd()||u.isOdd())&&(a.iadd(c),u.isub(h)),a.iushrn(1),u.iushrn(1);t.cmp(n)>=0?(t.isub(n),o.isub(a),s.isub(u)):(n.isub(t),a.isub(o),u.isub(s))}return{a,b:u,gcd:n.iushln(l)}},r.prototype._invmp=function(e){i(0===e.negative),i(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var o,s=new r(1),a=new r(0),u=n.clone();t.cmpn(1)>0&&n.cmpn(1)>0;){for(var l=0,c=1;!(t.words[0]&c)&&l<26;++l,c<<=1);if(l>0)for(t.iushrn(l);l-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);for(var h=0,d=1;!(n.words[0]&d)&&h<26;++h,d<<=1);if(h>0)for(n.iushrn(h);h-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);t.cmp(n)>=0?(t.isub(n),s.isub(a)):(n.isub(t),a.isub(s))}return(o=0===t.cmpn(1)?s:a).cmpn(0)<0&&o.iadd(e),o},r.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),n=e.clone();t.negative=0,n.negative=0;for(var i=0;t.isEven()&&n.isEven();i++)t.iushrn(1),n.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;n.isEven();)n.iushrn(1);var o=t.cmp(n);if(o<0){var r=t;t=n,n=r}else if(0===o||0===n.cmpn(1))break;t.isub(n)}return n.iushln(i)},r.prototype.invm=function(e){return this.egcd(e).a.umod(e)},r.prototype.isEven=function(){return!(1&this.words[0])},r.prototype.isOdd=function(){return!(1&~this.words[0])},r.prototype.andln=function(e){return this.words[0]&e},r.prototype.bincn=function(e){i("number"==typeof e);var t=e%26,n=(e-t)/26,o=1<>>26,a&=67108863,this.words[s]=a}return 0!==r&&(this.words[s]=r,this.length++),this},r.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},r.prototype.cmpn=function(e){var t,n=e<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this.strip(),this.length>1)t=1;else{n&&(e=-e),i(e<=67108863,"Number is too big");var o=0|this.words[0];t=o===e?0:oe.length)return 1;if(this.length=0;n--){var i=0|this.words[n],o=0|e.words[n];if(i!==o){io&&(t=1);break}}return t},r.prototype.gtn=function(e){return 1===this.cmpn(e)},r.prototype.gt=function(e){return 1===this.cmp(e)},r.prototype.gten=function(e){return this.cmpn(e)>=0},r.prototype.gte=function(e){return this.cmp(e)>=0},r.prototype.ltn=function(e){return-1===this.cmpn(e)},r.prototype.lt=function(e){return-1===this.cmp(e)},r.prototype.lten=function(e){return this.cmpn(e)<=0},r.prototype.lte=function(e){return this.cmp(e)<=0},r.prototype.eqn=function(e){return 0===this.cmpn(e)},r.prototype.eq=function(e){return 0===this.cmp(e)},r.red=function(e){return new C(e)},r.prototype.toRed=function(e){return i(!this.red,"Already a number in reduction context"),i(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},r.prototype.fromRed=function(){return i(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},r.prototype._forceRed=function(e){return this.red=e,this},r.prototype.forceRed=function(e){return i(!this.red,"Already a number in reduction context"),this._forceRed(e)},r.prototype.redAdd=function(e){return i(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},r.prototype.redIAdd=function(e){return i(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},r.prototype.redSub=function(e){return i(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},r.prototype.redISub=function(e){return i(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},r.prototype.redShl=function(e){return i(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},r.prototype.redMul=function(e){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},r.prototype.redIMul=function(e){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},r.prototype.redSqr=function(){return i(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},r.prototype.redISqr=function(){return i(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},r.prototype.redSqrt=function(){return i(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},r.prototype.redInvm=function(){return i(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},r.prototype.redNeg=function(){return i(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},r.prototype.redPow=function(e){return i(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var v={k256:null,p224:null,p192:null,p25519:null};function y(e,t){this.name=e,this.p=new r(t,16),this.n=this.p.bitLength(),this.k=new r(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function b(){y.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function _(){y.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){y.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function M(){y.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function C(e){if("string"==typeof e){var t=r._prime(e);this.m=t.p,this.prime=t}else i(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function S(e){C.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new r(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}y.prototype._tmp=function(){var e=new r(null);return e.words=new Array(Math.ceil(this.n/13)),e},y.prototype.ireduce=function(e){var t,n=e;do{this.split(n,this.tmp),t=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(t>this.n);var i=t0?n.isub(this.p):void 0!==n.strip?n.strip():n._strip(),n},y.prototype.split=function(e,t){e.iushrn(this.n,0,t)},y.prototype.imulK=function(e){return e.imul(this.k)},o(b,y),b.prototype.split=function(e,t){for(var n=4194303,i=Math.min(e.length,9),o=0;o>>22,r=s}r>>>=22,e.words[o-10]=r,0===r&&e.length>10?e.length-=10:e.length-=9},b.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,n=0;n>>=26,e.words[n]=o,t=i}return 0!==t&&(e.words[e.length++]=t),e},r._prime=function(e){if(v[e])return v[e];var t;if("k256"===e)t=new b;else if("p224"===e)t=new _;else if("p192"===e)t=new w;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new M}return v[e]=t,t},C.prototype._verify1=function(e){i(0===e.negative,"red works only with positives"),i(e.red,"red works only with red numbers")},C.prototype._verify2=function(e,t){i(!(e.negative|t.negative),"red works only with positives"),i(e.red&&e.red===t.red,"red works only with red numbers")},C.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},C.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},C.prototype.add=function(e,t){this._verify2(e,t);var n=e.add(t);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},C.prototype.iadd=function(e,t){this._verify2(e,t);var n=e.iadd(t);return n.cmp(this.m)>=0&&n.isub(this.m),n},C.prototype.sub=function(e,t){this._verify2(e,t);var n=e.sub(t);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},C.prototype.isub=function(e,t){this._verify2(e,t);var n=e.isub(t);return n.cmpn(0)<0&&n.iadd(this.m),n},C.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},C.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},C.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},C.prototype.isqr=function(e){return this.imul(e,e.clone())},C.prototype.sqr=function(e){return this.mul(e,e)},C.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(i(t%2==1),3===t){var n=this.m.add(new r(1)).iushrn(2);return this.pow(e,n)}for(var o=this.m.subn(1),s=0;!o.isZero()&&0===o.andln(1);)s++,o.iushrn(1);i(!o.isZero());var a=new r(1).toRed(this),u=a.redNeg(),l=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new r(2*c*c).toRed(this);0!==this.pow(c,l).cmp(u);)c.redIAdd(u);for(var h=this.pow(c,o),d=this.pow(e,o.addn(1).iushrn(1)),f=this.pow(e,o),p=s;0!==f.cmp(a);){for(var g=f,m=0;0!==g.cmp(a);m++)g=g.redSqr();i(m=0;i--){for(var l=t.words[i],c=u-1;c>=0;c--){var h=l>>c&1;o!==n[0]&&(o=this.sqr(o)),0!==h||0!==s?(s<<=1,s|=h,(4==++a||0===i&&0===c)&&(o=this.mul(o,n[s]),a=0,s=0)):a=0}u=26}return o},C.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},C.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},r.mont=function(e){return new S(e)},o(S,C),S.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},S.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},S.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var n=e.imul(t),i=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=n.isub(i).iushrn(this.shift),r=o;return o.cmp(this.m)>=0?r=o.isub(this.m):o.cmpn(0)<0&&(r=o.iadd(this.m)),r._forceRed(this)},S.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new r(0)._forceRed(this);var n=e.mul(t),i=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=n.isub(i).iushrn(this.shift),s=o;return o.cmp(this.m)>=0?s=o.isub(this.m):o.cmpn(0)<0&&(s=o.iadd(this.m)),s._forceRed(this)},S.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=n.nmd(e),this)},4890:e=>{function t(e,t){if(!e)throw new Error(t||"Assertion failed")}e.exports=t,t.equal=function(e,t,n){if(e!=t)throw new Error(n||"Assertion failed: "+e+" != "+t)}},3720:(e,t)=>{"use strict";var n=t;function i(e){return 1===e.length?"0"+e:e}function o(e){for(var t="",n=0;n>8,s=255&o;r?n.push(r,s):n.push(s)}return n},n.zero2=i,n.toHex=o,n.encode=function(e,t){return"hex"===t?o(e):e}},8253:function(e,t,n){var i=n(8957);!function(e){"use strict";var t="undefined"!=typeof window?window:void 0!==n.g?n.g:"undefined"!=typeof self?self:{},o=function(e,t){if(t=t.split(":")[0],!(e=+e))return!1;switch(t){case"http":case"ws":return 80!==e;case"https":case"wss":return 443!==e;case"ftp":return 21!==e;case"gopher":return 70!==e;case"file":return!1}return 0!==e},r=Object.prototype.hasOwnProperty;function s(e){return decodeURIComponent(e.replace(/\+/g," "))}var a={stringify:function(e,t){t=t||"";var n=[];for(var i in"string"!=typeof t&&(t="?"),e)r.call(e,i)&&n.push(encodeURIComponent(i)+"="+encodeURIComponent(e[i]));return n.length?t+n.join("&"):""},parse:function(e){for(var t,n=/([^=?&]+)=?([^&]*)/g,i={};t=n.exec(e);){var o=s(t[1]),r=s(t[2]);o in i||(i[o]=r)}return i}},u=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\S\s]*)/i,l=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,c=[["#","hash"],["?","query"],["/","pathname"],["@","auth",1],[NaN,"host",void 0,1,1],[/:(\d+)$/,"port",void 0,1],[NaN,"hostname",void 0,1,1]],h={hash:1,query:1};function d(e){var n,i=t&&t.location||{},o={},r=typeof(e=e||i);if("blob:"===e.protocol)o=new p(unescape(e.pathname),{});else if("string"===r)for(n in o=new p(e,{}),h)delete o[n];else if("object"===r){for(n in e)n in h||(o[n]=e[n]);void 0===o.slashes&&(o.slashes=l.test(e.href))}return o}function f(e){var t=u.exec(e);return{protocol:t[1]?t[1].toLowerCase():"",slashes:!!t[2],rest:t[3]}}function p(e,t,n){if(!(this instanceof p))return new p(e,t,n);var i,r,s,u,l,h,g=c.slice(),m=typeof t,v=this,y=0;for("object"!==m&&"string"!==m&&(n=t,t=null),n&&"function"!=typeof n&&(n=a.parse),t=d(t),i=!(r=f(e||"")).protocol&&!r.slashes,v.slashes=r.slashes||i&&t.slashes,v.protocol=r.protocol||t.protocol||"",e=r.rest,r.slashes||(g[2]=[/(.*)/,"pathname"]);y0;)n[i]=arguments[i+1];var o=e.type,r=this.listeners[o];return!!Array.isArray(r)&&(r.forEach((function(i){n.length>0?i.apply(t,n):i.call(t,e)})),!0)};var _=function(){this.urlMap={}};_.prototype.attachWebSocket=function(e,t){var n=this.urlMap[t];if(n&&n.server&&-1===n.websockets.indexOf(e))return n.websockets.push(e),n.server},_.prototype.addMembershipToRoom=function(e,t){var n=this.urlMap[e.url];n&&n.server&&-1!==n.websockets.indexOf(e)&&(n.roomMemberships[t]||(n.roomMemberships[t]=[]),n.roomMemberships[t].push(e))},_.prototype.attachServer=function(e,t){if(!this.urlMap[t])return this.urlMap[t]={server:e,websockets:[],roomMemberships:{}},e},_.prototype.serverLookup=function(e){var t=this.urlMap[e];if(t)return t.server},_.prototype.websocketsLookup=function(e,t,n){var i,o=this.urlMap[e];return i=o?o.websockets:[],t&&(i=o.roomMemberships[t]||[]),n?i.filter((function(e){return e!==n})):i},_.prototype.removeServer=function(e){delete this.urlMap[e]},_.prototype.removeWebSocket=function(e,t){var n=this.urlMap[t];n&&(n.websockets=y(n.websockets,(function(t){return t===e})))},_.prototype.removeMembershipFromRoom=function(e,t){var n=this.urlMap[e.url],i=n.roomMemberships[t];n&&null!==i&&(n.roomMemberships[t]=y(i,(function(t){return t===e})))};var w=new _,M=1e3,C={CONSTRUCTOR_ERROR:"Failed to construct 'WebSocket':",CLOSE_ERROR:"Failed to execute 'close' on 'WebSocket':",EVENT:{CONSTRUCT:"Failed to construct 'Event':",MESSAGE:"Failed to construct 'MessageEvent':",CLOSE:"Failed to construct 'CloseEvent':"}},S=function(){};S.prototype.stopPropagation=function(){},S.prototype.stopImmediatePropagation=function(){},S.prototype.initEvent=function(e,t,n){void 0===e&&(e="undefined"),void 0===t&&(t=!1),void 0===n&&(n=!1),this.type=""+e,this.bubbles=Boolean(t),this.cancelable=Boolean(n)};var L=function(e){function t(t,n){if(void 0===n&&(n={}),e.call(this),!t)throw new TypeError(C.EVENT_ERROR+" 1 argument required, but only 0 present.");if("object"!=typeof n)throw new TypeError(C.EVENT_ERROR+" parameter 2 ('eventInitDict') is not an object.");var i=n.bubbles,o=n.cancelable;this.type=""+t,this.timeStamp=Date.now(),this.target=null,this.srcElement=null,this.returnValue=!0,this.isTrusted=!1,this.eventPhase=0,this.defaultPrevented=!1,this.currentTarget=null,this.cancelable=!!o&&Boolean(o),this.canncelBubble=!1,this.bubbles=!!i&&Boolean(i)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t}(S),I=function(e){function t(t,n){if(void 0===n&&(n={}),e.call(this),!t)throw new TypeError(C.EVENT.MESSAGE+" 1 argument required, but only 0 present.");if("object"!=typeof n)throw new TypeError(C.EVENT.MESSAGE+" parameter 2 ('eventInitDict') is not an object");var i=n.bubbles,o=n.cancelable,r=n.data,s=n.origin,a=n.lastEventId,u=n.ports;this.type=""+t,this.timeStamp=Date.now(),this.target=null,this.srcElement=null,this.returnValue=!0,this.isTrusted=!1,this.eventPhase=0,this.defaultPrevented=!1,this.currentTarget=null,this.cancelable=!!o&&Boolean(o),this.canncelBubble=!1,this.bubbles=!!i&&Boolean(i),this.origin=""+s,this.ports=void 0===u?null:u,this.data=void 0===r?null:r,this.lastEventId=""+(a||"")}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t}(S),N=function(e){function t(t,n){if(void 0===n&&(n={}),e.call(this),!t)throw new TypeError(C.EVENT.CLOSE+" 1 argument required, but only 0 present.");if("object"!=typeof n)throw new TypeError(C.EVENT.CLOSE+" parameter 2 ('eventInitDict') is not an object");var i=n.bubbles,o=n.cancelable,r=n.code,s=n.reason,a=n.wasClean;this.type=""+t,this.timeStamp=Date.now(),this.target=null,this.srcElement=null,this.returnValue=!0,this.isTrusted=!1,this.eventPhase=0,this.defaultPrevented=!1,this.currentTarget=null,this.cancelable=!!o&&Boolean(o),this.cancelBubble=!1,this.bubbles=!!i&&Boolean(i),this.code="number"==typeof r?parseInt(r,10):0,this.reason=""+(s||""),this.wasClean=!!a&&Boolean(a)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t}(S);function x(e){var t=e.type,n=e.target,i=new L(t);return n&&(i.target=n,i.srcElement=n,i.currentTarget=n),i}function D(e){var t=e.type,n=e.origin,i=e.data,o=e.target,r=new I(t,{data:i,origin:n});return o&&(r.target=o,r.srcElement=o,r.currentTarget=o),r}function k(e){var t=e.code,n=e.reason,i=e.type,o=e.target,r=e.wasClean;r||(r=1e3===t);var s=new N(i,{code:t,reason:n,wasClean:r});return o&&(s.target=o,s.srcElement=o,s.currentTarget=o),s}function T(e,t,n){e.readyState=A.CLOSING;var i=w.serverLookup(e.url),o=k({type:"close",target:e,code:t,reason:n});m((function(){w.removeWebSocket(e,e.url),e.readyState=A.CLOSED,e.dispatchEvent(o),i&&i.dispatchEvent(o,i)}),e)}function E(e){return"[object Blob]"===Object.prototype.toString.call(e)||e instanceof ArrayBuffer||(e=String(e)),e}var A=function(e){function t(n,i){e.call(this),this.url=function(e){var t=new g(e),n=t.pathname,i=t.protocol,o=t.hash;if(!e)throw new TypeError(C.CONSTRUCTOR_ERROR+" 1 argument required, but only 0 present.");if(n||(t.pathname="/"),""===i)throw new SyntaxError(C.CONSTRUCTOR_ERROR+" The URL '"+t.toString()+"' is invalid.");if("ws:"!==i&&"wss:"!==i)throw new SyntaxError(C.CONSTRUCTOR_ERROR+" The URL's scheme must be either 'ws' or 'wss'. '"+i+"' is not allowed.");if(""!==o)throw new SyntaxError(C.CONSTRUCTOR_ERROR+" The URL contains a fragment identifier ('"+o+"'). Fragment identifiers are not allowed in WebSocket URLs.");return t.toString()}(n),i=function(e){if(void 0===e&&(e=[]),!Array.isArray(e)&&"string"!=typeof e)throw new SyntaxError(C.CONSTRUCTOR_ERROR+" The subprotocol '"+e.toString()+"' is invalid.");"string"==typeof e&&(e=[e]);var t=e.map((function(e){return{count:1,protocol:e}})).reduce((function(e,t){return e[t.protocol]=(e[t.protocol]||0)+t.count,e}),{}),n=Object.keys(t).filter((function(e){return t[e]>1}));if(n.length>0)throw new SyntaxError(C.CONSTRUCTOR_ERROR+" The subprotocol '"+n[0]+"' is duplicated.");return e}(i),this.protocol=i[0]||"",this.binaryType="blob",this.readyState=t.CONNECTING;var o=w.attachWebSocket(this,this.url);m((function(){if(o)if(o.options.verifyClient&&"function"==typeof o.options.verifyClient&&!o.options.verifyClient())this.readyState=t.CLOSED,v("error","WebSocket connection to '"+this.url+"' failed: HTTP Authentication failed; no valid credentials available"),w.removeWebSocket(this,this.url),this.dispatchEvent(x({type:"error",target:this})),this.dispatchEvent(k({type:"close",target:this,code:M}));else{if(o.options.selectProtocol&&"function"==typeof o.options.selectProtocol){var e=o.options.selectProtocol(i),n=""!==e,r=-1!==i.indexOf(e);if(n&&!r)return this.readyState=t.CLOSED,v("error","WebSocket connection to '"+this.url+"' failed: Invalid Sub-Protocol"),w.removeWebSocket(this,this.url),this.dispatchEvent(x({type:"error",target:this})),void this.dispatchEvent(k({type:"close",target:this,code:M}));this.protocol=e}this.readyState=t.OPEN,this.dispatchEvent(x({type:"open",target:this})),o.dispatchEvent(x({type:"connection"}),(s=this,a={get:function(e,t){return"close"===t?function(e){void 0===e&&(e={});var t=e.code||M,n=e.reason||"";T(s,t,n)}:"send"===t?function(e){e=E(e),s.dispatchEvent(D({type:"message",data:e,origin:this.url,target:s}))}:"on"===t?function(e,t){s.addEventListener("server::"+e,t)}:e[t]}},new Proxy(s,a)))}else this.readyState=t.CLOSED,this.dispatchEvent(x({type:"error",target:this})),this.dispatchEvent(k({type:"close",target:this,code:M})),v("error","WebSocket connection to '"+this.url+"' failed");var s,a}),this)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={onopen:{},onmessage:{},onclose:{},onerror:{}};return n.onopen.get=function(){return this.listeners.open},n.onmessage.get=function(){return this.listeners.message},n.onclose.get=function(){return this.listeners.close},n.onerror.get=function(){return this.listeners.error},n.onopen.set=function(e){delete this.listeners.open,this.addEventListener("open",e)},n.onmessage.set=function(e){delete this.listeners.message,this.addEventListener("message",e)},n.onclose.set=function(e){delete this.listeners.close,this.addEventListener("close",e)},n.onerror.set=function(e){delete this.listeners.error,this.addEventListener("error",e)},t.prototype.send=function(e){var n=this;if(this.readyState===t.CLOSING||this.readyState===t.CLOSED)throw new Error("WebSocket is already in CLOSING or CLOSED state");var i=D({type:"server::message",origin:this.url,data:E(e)}),o=w.serverLookup(this.url);o&&m((function(){n.dispatchEvent(i,e)}),o)},t.prototype.close=function(e,n){if(void 0!==e&&("number"!=typeof e||1e3!==e&&(e<3e3||e>4999)))throw new TypeError(C.CLOSE_ERROR+" The code must be either 1000, or between 3000 and 4999. "+e+" is neither.");if(void 0!==n&&(i=n,o=encodeURIComponent(i).match(/%[89ABab]/g),i.length+(o?o.length:0)>123))throw new SyntaxError(C.CLOSE_ERROR+" The message must not be greater than 123 bytes.");var i,o;this.readyState!==t.CLOSING&&this.readyState!==t.CLOSED&&(this.readyState===t.CONNECTING?function(e,t,n){e.readyState=A.CLOSING;var i=w.serverLookup(e.url),o=k({type:"close",target:e,code:t,reason:n,wasClean:!1}),r=x({type:"error",target:e});m((function(){w.removeWebSocket(e,e.url),e.readyState=A.CLOSED,e.dispatchEvent(r),e.dispatchEvent(o),i&&i.dispatchEvent(o,i)}),e)}(this,e,n):T(this,e,n))},Object.defineProperties(t.prototype,n),t}(b);A.CONNECTING=0,A.prototype.CONNECTING=A.CONNECTING,A.OPEN=1,A.prototype.OPEN=A.OPEN,A.CLOSING=2,A.prototype.CLOSING=A.CLOSING,A.CLOSED=3,A.prototype.CLOSED=A.CLOSED;function j(){return"undefined"!=typeof window?window:"object"==typeof i&&"object"==typeof n.g?n.g:this}var O=function(e){function t(t,n){void 0===n&&(n={}),e.call(this);var i=new g(t);if(i.pathname||(i.pathname="/"),this.url=i.toString(),this.originalWebSocket=null,!w.attachServer(this,this.url))throw this.dispatchEvent(x({type:"error"})),new Error("A mock server is already listening on this url");void 0===n.verifyClient&&(n.verifyClient=null),void 0===n.selectProtocol&&(n.selectProtocol=null),this.options=n,this.start()}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.start=function(){var e=j();e.WebSocket&&(this.originalWebSocket=e.WebSocket),e.WebSocket=A},t.prototype.stop=function(e){void 0===e&&(e=function(){});var t=j();this.originalWebSocket?t.WebSocket=this.originalWebSocket:delete t.WebSocket,this.originalWebSocket=null,w.removeServer(this.url),"function"==typeof e&&e()},t.prototype.on=function(e,t){this.addEventListener(e,t)},t.prototype.close=function(e){void 0===e&&(e={});var t=e.code,n=e.reason,i=e.wasClean,o=w.websocketsLookup(this.url);w.removeServer(this.url),o.forEach((function(e){e.readyState=A.CLOSE,e.dispatchEvent(k({type:"close",target:e,code:t||M,reason:n||"",wasClean:i}))})),this.dispatchEvent(k({type:"close"}),this)},t.prototype.emit=function(e,t,n){var i=this;void 0===n&&(n={});var o=n.websockets;o||(o=w.websocketsLookup(this.url)),t="object"!=typeof n||arguments.length>3?(t=Array.prototype.slice.call(arguments,1,arguments.length)).map((function(e){return E(e)})):E(t),o.forEach((function(n){Array.isArray(t)?n.dispatchEvent.apply(n,[D({type:e,data:t,origin:i.url,target:n})].concat(t)):n.dispatchEvent(D({type:e,data:t,origin:i.url,target:n}))}))},t.prototype.clients=function(){return w.websocketsLookup(this.url)},t.prototype.to=function(e,t,n){var i=this;void 0===n&&(n=[]);var o=this,r=n.concat(w.websocketsLookup(this.url,e,t)).reduce((function(e,t){return e.indexOf(t)>-1?e:e.concat(t)}),[]);return{to:function(e,t){return i.to.call(i,e,t,r)},emit:function(e,t){o.emit(e,t,{websockets:r})}}},t.prototype.in=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return this.to.apply(null,e)},t.prototype.simulate=function(e){var t=w.websocketsLookup(this.url);"error"===e&&t.forEach((function(e){e.readyState=A.CLOSE,e.dispatchEvent(x({type:"error"}))}))},t}(b);O.of=function(e){return new O(e)};var R=function(e){function t(n,i){var o=this;void 0===n&&(n="socket.io"),void 0===i&&(i=""),e.call(this),this.binaryType="blob";var r=new g(n);r.pathname||(r.pathname="/"),this.url=r.toString(),this.readyState=t.CONNECTING,this.protocol="","string"==typeof i||"object"==typeof i&&null!==i?this.protocol=i:Array.isArray(i)&&i.length>0&&(this.protocol=i[0]);var s=w.attachWebSocket(this,this.url);m((function(){s?(this.readyState=t.OPEN,s.dispatchEvent(x({type:"connection"}),s,this),s.dispatchEvent(x({type:"connect"}),s,this),this.dispatchEvent(x({type:"connect",target:this}))):(this.readyState=t.CLOSED,this.dispatchEvent(x({type:"error",target:this})),this.dispatchEvent(k({type:"close",target:this,code:M})),v("error","Socket.io connection to '"+this.url+"' failed"))}),this),this.addEventListener("close",(function(e){o.dispatchEvent(k({type:"disconnect",target:e.target,code:e.code}))}))}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={broadcast:{}};return t.prototype.close=function(){if(this.readyState===t.OPEN){var e=w.serverLookup(this.url);return w.removeWebSocket(this,this.url),this.readyState=t.CLOSED,this.dispatchEvent(k({type:"close",target:this,code:M})),e&&e.dispatchEvent(k({type:"disconnect",target:this,code:M}),e),this}},t.prototype.disconnect=function(){return this.close()},t.prototype.emit=function(e){for(var n=[],i=arguments.length-1;i-- >0;)n[i]=arguments[i+1];if(this.readyState!==t.OPEN)throw new Error("SocketIO is already in CLOSING or CLOSED state");var o=D({type:e,origin:this.url,data:n}),r=w.serverLookup(this.url);return r&&r.dispatchEvent.apply(r,[o].concat(n)),this},t.prototype.send=function(e){return this.emit("message",e),this},n.broadcast.get=function(){if(this.readyState!==t.OPEN)throw new Error("SocketIO is already in CLOSING or CLOSED state");var e=this,n=w.serverLookup(this.url);if(!n)throw new Error("SocketIO can not find a server at the specified URL ("+this.url+")");return{emit:function(t,i){return n.emit(t,i,{websockets:w.websocketsLookup(e.url,null,e)}),e},to:function(t){return n.to(t,e)},in:function(t){return n.in(t,e)}}},t.prototype.on=function(e,t){return this.addEventListener(e,t),this},t.prototype.off=function(e){this.removeEventListener(e)},t.prototype.join=function(e){w.addMembershipToRoom(this,e)},t.prototype.leave=function(e){w.removeMembershipFromRoom(this,e)},t.prototype.to=function(e){return this.broadcast.to(e)},t.prototype.in=function(){return this.to.apply(null,arguments)},t.prototype.dispatchEvent=function(e){for(var t=this,n=[],i=arguments.length-1;i-- >0;)n[i]=arguments[i+1];var o=e.type,r=this.listeners[o];if(!Array.isArray(r))return!1;r.forEach((function(i){n.length>0?i.apply(t,n):i.call(t,e.data?e.data:e)}))},Object.defineProperties(t.prototype,n),t}(b);R.CONNECTING=0,R.OPEN=1,R.CLOSING=2,R.CLOSED=3;var P=function(e,t){return new R(e,t)};P.connect=function(e,t){return P(e,t)};var z=O,W=A,F=P;e.Server=z,e.WebSocket=W,e.SocketIO=F,Object.defineProperty(e,"__esModule",{value:!0})}(t)},7339:(e,t,n)=>{"use strict";function i(e,t){return void 0===t&&(t=0),e[e.length-(1+t)]}function o(e,t,n){if(void 0===n&&(n=function(e,t){return e===t}),e.length!==t.length)return!1;for(var i=0,o=e.length;i0))return r;o=r-1}}return-(i+1)}function s(e,t){var n=0,i=e.length;if(0===i)return 0;for(;ni?e[u]=r[a++]:a>o?e[u]=r[s++]:t(r[a],r[s])<0?e[u]=r[a++]:e[u]=r[s++]}(e,t,n,r,i,o)}}function l(e,t){for(var n,i=[],o=0,r=a(e.slice(0),t);ot;o--)i.push(o);return i}function v(e,t,n){var i=e.slice(0,t),o=e.slice(t);return i.concat(n,o)}n.d(t,{$1:()=>p,$z:()=>l,Bq:()=>g,Ct:()=>h,El:()=>r,RT:()=>i,Yc:()=>c,ZN:()=>a,aB:()=>s,aI:()=>o,dM:()=>d,nK:()=>v,v4:()=>f,y1:()=>m})},5538:(e,t,n)=>{"use strict";n.d(t,{D7:()=>c,M_:()=>a,Qg:()=>d,aD:()=>h,cU:()=>u,dz:()=>s,iH:()=>f});var i=n(2337),o={};i.g3.addEventListener("error",(function(e){var t=e.detail,n=t.id;t.parent?t.handler&&o&&delete o[n]:(o[n]=t,1===Object.keys(o).length&&setTimeout((function(){var e=o;o={},Object.keys(e).forEach((function(t){var n=e[t];n.exception?s(n.exception):n.error&&s(n.error),console.log("WARNING: Promise with no error callback:"+n.id),console.log(n),n.exception&&console.log(n.exception.stack)}))}),0))}));var r=new(function(){function e(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout((function(){if(e.stack)throw new Error(e.message+"\n\n"+e.stack);throw e}),0)}}return e.prototype.emit=function(e){this.listeners.forEach((function(t){t(e)}))},e.prototype.onUnexpectedError=function(e){this.unexpectedErrorHandler(e),this.emit(e)},e.prototype.onUnexpectedExternalError=function(e){this.unexpectedErrorHandler(e)},e}());function s(e){c(e)||r.onUnexpectedError(e)}function a(e){c(e)||r.onUnexpectedExternalError(e)}function u(e){return e instanceof Error?{$isError:!0,name:e.name,message:e.message,stack:e.stacktrace||e.stack}:e}var l="Canceled";function c(e){return e instanceof Error&&e.name===l&&e.message===l}function h(){var e=new Error(l);return e.name=e.message,e}function d(e){return e?new Error("Illegal argument: "+e):new Error("Illegal argument")}function f(e){return e?new Error("Illegal state: "+e):new Error("Illegal state")}},2213:(e,t,n)=>{"use strict";n.d(t,{B5:()=>p,IC:()=>d,Jh:()=>i,Oo:()=>c,Pc:()=>h,Wj:()=>y,Zs:()=>g,_B:()=>l,at:()=>f,cy:()=>v,vl:()=>u});var i,o=n(5538),r=n(652),s=n(6621),a=n(8820);!function(e){var t={dispose:function(){}};e.None=function(){return t}}(i||(i={}));var u=function(){function e(e){this._options=e}return Object.defineProperty(e.prototype,"event",{get:function(){var t=this;return this._event||(this._event=function(n,i,o){t._listeners||(t._listeners=new a.w);var r=t._listeners.isEmpty();r&&t._options&&t._options.onFirstListenerAdd&&t._options.onFirstListenerAdd(t);var s,u=t._listeners.push(i?[n,i]:n);return r&&t._options&&t._options.onFirstListenerDidAdd&&t._options.onFirstListenerDidAdd(t),t._options&&t._options.onListenerDidAdd&&t._options.onListenerDidAdd(t,n,i),s={dispose:function(){s.dispose=e._noop,t._disposed||(u(),t._options&&t._options.onLastListenerRemove&&t._listeners.isEmpty()&&t._options.onLastListenerRemove(t))}},Array.isArray(o)&&o.push(s),s}),this._event},enumerable:!0,configurable:!0}),e.prototype.fire=function(e){if(this._listeners){this._deliveryQueue||(this._deliveryQueue=[]);for(var t=this._listeners.iterator(),n=t.next();!n.done;n=t.next())this._deliveryQueue.push([n.value,e]);for(;this._deliveryQueue.length>0;){var i=this._deliveryQueue.shift(),r=i[0],s=i[1];try{"function"==typeof r?r.call(void 0,s):r[0].call(r[1],s)}catch(n){(0,o.dz)(n)}}}},e.prototype.dispose=function(){this._listeners&&(this._listeners=void 0),this._deliveryQueue&&(this._deliveryQueue.length=0),this._disposed=!0},e._noop=function(){},e}(),l=function(){function e(){var e=this;this.hasListeners=!1,this.events=[],this.emitter=new u({onFirstListenerAdd:function(){return e.onFirstListenerAdd()},onLastListenerRemove:function(){return e.onLastListenerRemove()}})}return Object.defineProperty(e.prototype,"event",{get:function(){return this.emitter.event},enumerable:!0,configurable:!0}),e.prototype.add=function(e){var t=this,n={event:e,listener:null};return this.events.push(n),this.hasListeners&&this.hook(n),(0,s.s)((0,r.O)((function(){t.hasListeners&&t.unhook(n);var e=t.events.indexOf(n);t.events.splice(e,1)})))},e.prototype.onFirstListenerAdd=function(){var e=this;this.hasListeners=!0,this.events.forEach((function(t){return e.hook(t)}))},e.prototype.onLastListenerRemove=function(){var e=this;this.hasListeners=!1,this.events.forEach((function(t){return e.unhook(t)}))},e.prototype.hook=function(e){var t=this;e.listener=e.event((function(e){return t.emitter.fire(e)}))},e.prototype.unhook=function(e){e.listener.dispose(),e.listener=null},e.prototype.dispose=function(){this.emitter.dispose()},e}();function c(e){return function(t,n,i){void 0===n&&(n=null);var o=e((function(e){return o.dispose(),t.call(n,e)}),null,i);return o}}function h(){for(var e=[],t=0;t1)&&l.fire(e),a=0}),n)}))},onLastListenerRemove:function(){o.dispose()}});return l.event}var f=function(){function e(){this.buffers=[]}return e.prototype.wrapEvent=function(e){var t=this;return function(n,i,o){return e((function(e){var o=t.buffers[t.buffers.length-1];o?o.push((function(){return n.call(i,e)})):n.call(i,e)}),void 0,o)}},e.prototype.bufferEvents=function(e){var t=[];this.buffers.push(t),e(),this.buffers.pop(),t.forEach((function(e){return e()}))},e}();function p(e,t){return function(n,i,o){return void 0===i&&(i=null),e((function(e){return n.call(i,t(e))}),null,o)}}function g(e,t){return function(n,i,o){return void 0===i&&(i=null),e((function(e){return t(e)&&n.call(i,e)}),null,o)}}var m=function(){function e(e){this._event=e}return Object.defineProperty(e.prototype,"event",{get:function(){return this._event},enumerable:!0,configurable:!0}),e.prototype.map=function(t){return new e(p(this._event,t))},e.prototype.filter=function(t){return new e(g(this._event,t))},e.prototype.on=function(e,t,n){return this._event(e,t,n)},e}();function v(e){return new m(e)}var y=function(){function e(){this.emitter=new u,this.event=this.emitter.event,this.disposable=s.jG.None}return Object.defineProperty(e.prototype,"input",{set:function(e){this.disposable.dispose(),this.disposable=e(this.emitter.fire,this.emitter)},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){this.disposable.dispose(),this.emitter.dispose()},e}()},652:(e,t,n)=>{"use strict";function i(e){var t,n=this,i=!1;return function(){return i?t:(i=!0,t=e.apply(n,arguments))}}n.d(t,{O:()=>i})},699:(e,t,n)=>{"use strict";n.d(t,{YW:()=>D});var i=n(7339),o=n(899),r=n(6973),s=n(5983),a=n(2337),u="**",l="/",c="[/\\\\]",h="[^/\\\\]",d=/\//g;function f(e){switch(e){case 0:return"";case 1:return h+"*?";default:return"(?:"+c+"|"+h+"+"+c+"|"+c+h+"+)*?"}}function p(e,t){if(!e)return[];for(var n,i=[],o=!1,r=!1,s="",a=0;a0;n--){var r=e.charCodeAt(n-1);if(47===r||92===r)break}t=e.substr(n)}var s=o.indexOf(t);return-1!==s?i[s]:null};a.basenames=o,a.patterns=i,a.allBasenames=o;var u=e.filter((function(e){return!e.basenames}));return u.push(a),u}},6621:(e,t,n)=>{"use strict";function i(e){return"function"==typeof e.dispose&&0===e.dispose.length}function o(e){for(var t=[],n=1;no,BO:()=>u,Xm:()=>i,jG:()=>a,qE:()=>r,s:()=>s});var a=function(){function e(){this._toDispose=[]}return Object.defineProperty(e.prototype,"toDispose",{get:function(){return this._toDispose},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){this._toDispose=o(this._toDispose)},e.prototype._register=function(e){return this._toDispose.push(e),e},e.None=Object.freeze({dispose:function(){}}),e}(),u=function(){function e(e){this.object=e}return e.prototype.dispose=function(){},e}()},8820:(e,t,n)=>{"use strict";n.d(t,{w:()=>o});var i=function(e){this.element=e},o=function(){function e(){}return e.prototype.isEmpty=function(){return!this._first},e.prototype.unshift=function(e){return this.insert(e,!1)},e.prototype.push=function(e){return this.insert(e,!0)},e.prototype.insert=function(e,t){var n=this,o=new i(e);if(this._first)if(t){var r=this._last;this._last=o,o.prev=r,r.next=o}else{var s=this._first;this._first=o,o.next=s,s.prev=o}else this._first=o,this._last=o;return function(){for(var e=n._first;e instanceof i;e=e.next)if(e===o){if(e.prev&&e.next){var t=e.prev;t.next=e.next,e.next.prev=t}else e.prev||e.next?e.next?e.prev||(n._first=n._first.next,n._first.prev=void 0):(n._last=n._last.prev,n._last.next=void 0):(n._first=void 0,n._last=void 0);break}}},e.prototype.iterator=function(){var e={done:void 0,value:void 0},t=this._first;return{next:function(){return t?(e.done=!1,e.value=t.element,t=t.next):(e.done=!0,e.value=void 0),e}}},e}()},5983:(e,t,n)=>{"use strict";n.d(t,{cB:()=>c,fT:()=>h,qK:()=>d,zu:()=>r});var i,o=(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});function r(e){var t=[];return e.forEach((function(e){return t.push(e)})),t}var s,a=function(){function e(){this._value="",this._pos=0}return e.prototype.reset=function(e){return this._value=e,this._pos=0,this},e.prototype.next=function(){return this._pos+=1,this},e.prototype.hasNext=function(){return this._pos0)n.left||(n.left=new l,n.left.segment=i.value()),n=n.left;else if(o<0)n.right||(n.right=new l,n.right.segment=i.value()),n=n.right;else{if(!i.hasNext())break;i.next(),n.mid||(n.mid=new l,n.mid.segment=i.value()),n=n.mid}}var r=n.value;return n.value=t,n.key=e,r},e.prototype.get=function(e){for(var t=this._iter.reset(e),n=this._root;n;){var i=t.cmp(n.segment);if(i>0)n=n.left;else if(i<0)n=n.right;else{if(!t.hasNext())break;t.next(),n=n.mid}}return n?n.value:void 0},e.prototype.findSubstr=function(e){for(var t,n=this._iter.reset(e),i=this._root;i;){var o=n.cmp(i.segment);if(o>0)i=i.left;else if(o<0)i=i.right;else{if(!n.hasNext())break;n.next(),t=i.value||t,i=i.mid}}return i&&i.value||t},e.prototype.forEach=function(e){this._forEach(this._root,e)},e.prototype._forEach=function(e,t){e&&(this._forEach(e.left,t),e.value&&t(e.value,e.key),this._forEach(e.mid,t),this._forEach(e.right,t))},e}(),h=function(){function e(){this.map=new Map,this.ignoreCase=!1}return e.prototype.set=function(e,t){this.map.set(this.toKey(e),t)},e.prototype.get=function(e){return this.map.get(this.toKey(e))},e.prototype.toKey=function(e){var t=e.toString();return this.ignoreCase&&(t=t.toLowerCase()),t},e}();!function(e){e[e.None=0]="None",e[e.AsOld=1]="AsOld",e[e.AsNew=2]="AsNew"}(s||(s={}));var d=function(e){function t(t,n){void 0===n&&(n=1);var i=e.call(this)||this;return i._limit=t,i._ratio=Math.min(Math.max(0,n),1),i}return o(t,e),t.prototype.get=function(t){return e.prototype.get.call(this,t,s.AsNew)},t.prototype.set=function(t,n){e.prototype.set.call(this,t,n,s.AsNew),this.checkTrim()},t.prototype.checkTrim=function(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))},t}(function(){function e(){this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0}return e.prototype.clear=function(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0},Object.defineProperty(e.prototype,"size",{get:function(){return this._size},enumerable:!0,configurable:!0}),e.prototype.get=function(e,t){void 0===t&&(t=s.None);var n=this._map.get(e);if(n)return t!==s.None&&this.touch(n,t),n.value},e.prototype.set=function(e,t,n){void 0===n&&(n=s.None);var i=this._map.get(e);if(i)i.value=t,n!==s.None&&this.touch(i,n);else{switch(i={key:e,value:t,next:void 0,previous:void 0},n){case s.None:this.addItemLast(i);break;case s.AsOld:this.addItemFirst(i);break;case s.AsNew:default:this.addItemLast(i)}this._map.set(e,i),this._size++}},e.prototype.forEach=function(e,t){for(var n=this._head;n;)t?e.bind(t)(n.value,n.key,this):e(n.value,n.key,this),n=n.next},e.prototype.trimOld=function(e){if(!(e>=this.size))if(0!==e){for(var t=this._head,n=this.size;t&&n>e;)this._map.delete(t.key),t=t.next,n--;this._head=t,this._size=n,t.previous=void 0}else this.clear()},e.prototype.addItemFirst=function(e){if(this._head||this._tail){if(!this._head)throw new Error("Invalid list");e.next=this._head,this._head.previous=e}else this._tail=e;this._head=e},e.prototype.addItemLast=function(e){if(this._head||this._tail){if(!this._tail)throw new Error("Invalid list");e.previous=this._tail,this._tail.next=e}else this._head=e;this._tail=e},e.prototype.touch=function(e,t){if(!this._head||!this._tail)throw new Error("Invalid list");if(t===s.AsOld||t===s.AsNew)if(t===s.AsOld){if(e===this._head)return;var n=e.next,i=e.previous;e===this._tail?(i.next=void 0,this._tail=i):(n.previous=i,i.next=n),e.previous=void 0,e.next=this._head,this._head.previous=e,this._head=e}else if(t===s.AsNew){if(e===this._tail)return;n=e.next,i=e.previous,e===this._head?(n.previous=void 0,this._head=n):(n.previous=i,i.next=n),e.next=void 0,e.previous=this._tail,this._tail.next=e,this._tail=e}},e.prototype.toJSON=function(){var e=[];return this.forEach((function(t,n){e.push([n,t])})),e},e}())},4709:(e,t,n)=>{"use strict";n.d(t,{Fh:()=>h,Go:()=>o,aI:()=>l,co:()=>a,kp:()=>u,ol:()=>r,qt:()=>c});var i=n(1780);function o(e){if(!e||"object"!=typeof e)return e;if(e instanceof RegExp)return e;var t=Array.isArray(e)?[]:{};return Object.keys(e).forEach((function(n){e[n]&&"object"==typeof e[n]?t[n]=o(e[n]):t[n]=e[n]})),t}function r(e){if(!e||"object"!=typeof e)return e;for(var t=[e];t.length>0;){var n=t.shift();for(var i in Object.freeze(n),n)if(s.call(n,i)){var o=n[i];"object"!=typeof o||Object.isFrozen(o)||t.push(o)}}return e}var s=Object.prototype.hasOwnProperty;function a(e,t,n){return void 0===n&&(n=!0),(0,i.Gv)(e)?((0,i.Gv)(t)&&Object.keys(t).forEach((function(o){o in e?n&&((0,i.Gv)(e[o])&&(0,i.Gv)(t[o])?a(e[o],t[o],n):e[o]=t[o]):e[o]=t[o]})),e):t}function u(e){for(var t=[],n=1;n{"use strict";n.d(t,{LC:()=>l,P8:()=>u,S8:()=>d,Vn:()=>r,Yu:()=>s,_1:()=>g,fj:()=>p,oP:()=>m,pD:()=>a});var i=n(94),o=n(899),r="/",s=i.uF?"\\":"/";function a(e){var t=~e.lastIndexOf("/")||~e.lastIndexOf("\\");if(0===t)return".";if(0==~t)return e[0];if(~t==e.length-1)return a(e.substring(0,e.length-1));var n=e.substring(0,~t);return i.uF&&":"===n[n.length-1]&&(n+=s),n}function u(e){var t=~e.lastIndexOf("/")||~e.lastIndexOf("\\");return 0===t?e:~t==e.length-1?u(e.substring(0,e.length-1)):e.substr(1+~t)}function l(e){var t=~(e=u(e)).lastIndexOf(".");return t?e.substring(~t):""}var c=/(\/\.\.?\/)|(\/\.\.?)$|^(\.\.?\/)|(\/\/+)|(\\)/,h=/(\\\.\.?\\)|(\\\.\.?)$|^(\.\.?\\)|(\\\\+)|(\/)/;function d(e,t){if(null==e)return e;var n=e.length;if(0===n)return".";var o=i.uF&&t;if(function(e,t){return t?!h.test(e):!c.test(e)}(e,o))return e;for(var r=o?"\\":"/",s=function(e,t){if(void 0===t&&(t="/"),!e)return"";var n=e.length,i=e.charCodeAt(0);if(47===i||92===i){if((47===(i=e.charCodeAt(1))||92===i)&&47!==(i=e.charCodeAt(2))&&92!==i){for(var o=3,r=o;o=65&&i<=90||i>=97&&i<=122)&&58===e.charCodeAt(1))return 47===(i=e.charCodeAt(2))||92===i?e.slice(0,2)+t:e.slice(0,2);var s=e.indexOf("://");if(-1!==s)for(s+=3;s0)&&".."!==g&&(l=-1===p?"":l.slice(0,p),u=!0)}else f(e,a,d,".")&&(s||l||d0){var i=e.charCodeAt(e.length-1);if(47!==i&&92!==i){var o=n.charCodeAt(0);47!==o&&92!==o&&(e+=r)}}e+=n}return d(e)};function g(e,t,n,i){if(void 0===i&&(i=s),e===t)return!0;if(!e||!t)return!1;if(t.length>e.length)return!1;if(n){if(!(0,o.startsWithIgnoreCase)(e,t))return!1;if(t.length===e.length)return!0;var r=t.length;return t.charAt(t.length-1)===i&&r--,e.charAt(r)===i}return t.charAt(t.length-1)!==i&&(t+=i),0===e.indexOf(t)}function m(e){return i.uF?function(e){if(!e)return!1;var t=e.charCodeAt(0);if(47===t||92===t)return!0;if((t>=65&&t<=90||t>=97&&t<=122)&&e.length>2&&58===e.charCodeAt(1)){var n=e.charCodeAt(2);if(47===n||92===n)return!0}return!1}(e):function(e){return e&&47===e.charCodeAt(0)}(e)}},94:(e,t,n)=>{"use strict";n.d(t,{HZ:()=>v,OS:()=>w,YF:()=>_,ib:()=>m,j9:()=>g,uF:()=>f,zQ:()=>y,zx:()=>p});var i,o=n(8957),r=!1,s=!1,a=!1,u=!1,l=!1;if("object"==typeof o&&"function"==typeof o.nextTick&&"string"==typeof o.platform){r="win32"===o.platform,s="darwin"===o.platform,a="linux"===o.platform;var c=o.env.VSCODE_NLS_CONFIG;if(c)try{var h=JSON.parse(c);h.availableLanguages["*"];h.locale,h._translationsConfigFile}catch(e){}u=!0}else if("object"==typeof navigator){var d=navigator.userAgent;r=d.indexOf("Windows")>=0,s=d.indexOf("Macintosh")>=0,a=d.indexOf("Linux")>=0,l=!0,navigator.language}!function(e){e[e.Web=0]="Web",e[e.Mac=1]="Mac",e[e.Linux=2]="Linux",e[e.Windows=3]="Windows"}(i||(i={})),i.Web,u&&(s?i.Mac:r?i.Windows:a&&i.Linux);var f=r,p=s,g=a,m=u,v=l,y="object"==typeof self?self:"object"==typeof n.g?n.g:{},b=null;function _(e){return null===b&&(b=y.setImmediate?y.setImmediate.bind(y):void 0!==o&&"function"==typeof o.nextTick?o.nextTick.bind(o):y.setTimeout.bind(y)),b(e)}var w=s?2:r?1:3},9664:(e,t,n)=>{"use strict";n.d(t,{XR:()=>o,yE:()=>l});var i,o,r=n(6621),s=n(2213),a=(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});!function(e){e[e.Auto=1]="Auto",e[e.Hidden=2]="Hidden",e[e.Visible=3]="Visible"}(o||(o={}));var u=function(){function e(e,t,n,i,o,r){(e|=0)<0&&(e=0),(n|=0)+e>(t|=0)&&(n=t-e),n<0&&(n=0),(i|=0)<0&&(i=0),(r|=0)+i>(o|=0)&&(r=o-i),r<0&&(r=0),this.width=e,this.scrollWidth=t,this.scrollLeft=n,this.height=i,this.scrollHeight=o,this.scrollTop=r}return e.prototype.equals=function(e){return this.width===e.width&&this.scrollWidth===e.scrollWidth&&this.scrollLeft===e.scrollLeft&&this.height===e.height&&this.scrollHeight===e.scrollHeight&&this.scrollTop===e.scrollTop},e.prototype.withScrollDimensions=function(t){return new e(void 0!==t.width?t.width:this.width,void 0!==t.scrollWidth?t.scrollWidth:this.scrollWidth,this.scrollLeft,void 0!==t.height?t.height:this.height,void 0!==t.scrollHeight?t.scrollHeight:this.scrollHeight,this.scrollTop)},e.prototype.withScrollPosition=function(t){return new e(this.width,this.scrollWidth,void 0!==t.scrollLeft?t.scrollLeft:this.scrollLeft,this.height,this.scrollHeight,void 0!==t.scrollTop?t.scrollTop:this.scrollTop)},e.prototype.createScrollEvent=function(e){var t=this.width!==e.width,n=this.scrollWidth!==e.scrollWidth,i=this.scrollLeft!==e.scrollLeft,o=this.height!==e.height,r=this.scrollHeight!==e.scrollHeight,s=this.scrollTop!==e.scrollTop;return{width:this.width,scrollWidth:this.scrollWidth,scrollLeft:this.scrollLeft,height:this.height,scrollHeight:this.scrollHeight,scrollTop:this.scrollTop,widthChanged:t,scrollWidthChanged:n,scrollLeftChanged:i,heightChanged:o,scrollHeightChanged:r,scrollTopChanged:s}},e}(),l=function(e){function t(t,n){var i=e.call(this)||this;return i._onScroll=i._register(new s.vl),i.onScroll=i._onScroll.event,i._smoothScrollDuration=t,i._scheduleAtNextAnimationFrame=n,i._state=new u(0,0,0,0,0,0),i._smoothScrolling=null,i}return a(t,e),t.prototype.dispose=function(){this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),e.prototype.dispose.call(this)},t.prototype.setSmoothScrollDuration=function(e){this._smoothScrollDuration=e},t.prototype.validateScrollPosition=function(e){return this._state.withScrollPosition(e)},t.prototype.getScrollDimensions=function(){return this._state},t.prototype.setScrollDimensions=function(e){var t=this._state.withScrollDimensions(e);this._setState(t),this._smoothScrolling&&this._smoothScrolling.acceptScrollDimensions(this._state)},t.prototype.getFutureScrollPosition=function(){return this._smoothScrolling?this._smoothScrolling.to:this._state},t.prototype.getCurrentScrollPosition=function(){return this._state},t.prototype.setScrollPositionNow=function(e){var t=this._state.withScrollPosition(e);this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),this._setState(t)},t.prototype.setScrollPositionSmooth=function(e){var t=this;if(0===this._smoothScrollDuration)return this.setScrollPositionNow(e);if(this._smoothScrolling){e={scrollLeft:void 0===e.scrollLeft?this._smoothScrolling.to.scrollLeft:e.scrollLeft,scrollTop:void 0===e.scrollTop?this._smoothScrolling.to.scrollTop:e.scrollTop};var n=this._state.withScrollPosition(e);if(this._smoothScrolling.to.scrollLeft===n.scrollLeft&&this._smoothScrolling.to.scrollTop===n.scrollTop)return;var i=this._smoothScrolling.combine(this._state,n,this._smoothScrollDuration);this._smoothScrolling.dispose(),this._smoothScrolling=i}else n=this._state.withScrollPosition(e),this._smoothScrolling=d.start(this._state,n,this._smoothScrollDuration);this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame((function(){t._smoothScrolling&&(t._smoothScrolling.animationFrameDisposable=null,t._performSmoothScrolling())}))},t.prototype._performSmoothScrolling=function(){var e=this,t=this._smoothScrolling.tick(),n=this._state.withScrollPosition(t);if(this._setState(n),t.isDone)return this._smoothScrolling.dispose(),void(this._smoothScrolling=null);this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame((function(){e._smoothScrolling&&(e._smoothScrolling.animationFrameDisposable=null,e._performSmoothScrolling())}))},t.prototype._setState=function(e){var t=this._state;t.equals(e)||(this._state=e,this._onScroll.fire(this._state.createScrollEvent(t)))},t}(r.jG),c=function(e,t,n){this.scrollLeft=e,this.scrollTop=t,this.isDone=n};function h(e,t){var n=t-e;return function(t){return e+n*(1-(i=1-t,Math.pow(i,3)));var i}}var d=function(){function e(e,t,n,i){this.from=e,this.to=t,this.duration=i,this._startTime=n,this.animationFrameDisposable=null,this._initAnimations()}return e.prototype._initAnimations=function(){this.scrollLeft=this._initAnimation(this.from.scrollLeft,this.to.scrollLeft,this.to.width),this.scrollTop=this._initAnimation(this.from.scrollTop,this.to.scrollTop,this.to.height)},e.prototype._initAnimation=function(e,t,n){var i,o,r;if(Math.abs(e-t)>2.5*n){var s=void 0,a=void 0;return e{"use strict";n.r(t),n.d(t,{UTF8_BOM_CHARACTER:()=>B,commonPrefixLength:()=>D,commonSuffixLength:()=>k,compare:()=>w,compareIgnoreCase:()=>M,containsEmoji:()=>R,containsFullWidthCharacter:()=>W,containsRTL:()=>j,convertSimple2RegExpPattern:()=>f,createRegExp:()=>m,empty:()=>i,endsWith:()=>g,equalsIgnoreCase:()=>I,escape:()=>u,escapeRegExpCharacters:()=>l,firstNonWhitespaceIndex:()=>y,format:()=>a,getLeadingWhitespace:()=>b,isBasicASCII:()=>z,isFalsyOrWhitespace:()=>o,isFullWidthCharacter:()=>F,isHighSurrogate:()=>T,isLowSurrogate:()=>E,isLowerAsciiLetter:()=>C,isUpperAsciiLetter:()=>S,lastNonWhitespaceIndex:()=>_,ltrim:()=>h,pad:()=>r,regExpLeadsToEndlessLoop:()=>v,repeat:()=>U,rtrim:()=>d,safeBtoa:()=>V,startsWith:()=>p,startsWithIgnoreCase:()=>x,startsWithUTF8BOM:()=>H,trim:()=>c});var i="";function o(e){return!e||"string"!=typeof e||0===e.trim().length}function r(e,t,n){void 0===n&&(n="0");for(var i=""+e,o=[i],r=i.length;r=t.length?e:t[i]}))}function u(e){return e.replace(/[<|>|&]/g,(function(e){switch(e){case"<":return"<";case">":return">";case"&":return"&";default:return e}}))}function l(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\[\]\(\)\#]/g,"\\$&")}function c(e,t){return void 0===t&&(t=" "),d(h(e,t),t)}function h(e,t){if(!e||!t)return e;var n=t.length;if(0===n||0===e.length)return e;for(var i=0;e.indexOf(t,i)===i;)i+=n;return e.substring(i)}function d(e,t){if(!e||!t)return e;var n=t.length,i=e.length;if(0===n||0===i)return e;for(var o=i,r=-1;-1!==(r=e.lastIndexOf(t,o-1))&&r+n===o;){if(0===r)return"";o=r}return e.substring(0,o)}function f(e){return e.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}function p(e,t){if(e.length0?e.indexOf(t,n)===n:0===n&&e===t}function m(e,t,n){if(void 0===n&&(n={}),!e)throw new Error("Cannot create regex from empty string");t||(e=l(e)),n.wholeWord&&(/\B/.test(e.charAt(0))||(e="\\b"+e),/\B/.test(e.charAt(e.length-1))||(e+="\\b"));var i="";return n.global&&(i+="g"),n.matchCase||(i+="i"),n.multiline&&(i+="m"),new RegExp(e,i)}function v(e){return"^"!==e.source&&"^$"!==e.source&&"$"!==e.source&&"^\\s*$"!==e.source&&e.exec("")&&0===e.lastIndex}function y(e){for(var t=0,n=e.length;t=0;n--){var i=e.charCodeAt(n);if(32!==i&&9!==i)return n}return-1}function w(e,t){return et?1:0}function M(e,t){for(var n=Math.min(e.length,t.length),i=0;it.length?1:0}function C(e){return e>=97&&e<=122}function S(e){return e>=65&&e<=90}function L(e){return C(e)||S(e)}function I(e,t){return(e?e.length:0)===(t?t.length:0)&&N(e,t)}function N(e,t,n){if(void 0===n&&(n=e.length),"string"!=typeof e||"string"!=typeof t)return!1;for(var i=0;ie.length)&&N(e,t,n)}function D(e,t){var n,i=Math.min(e.length,t.length);for(n=0;n=11904&&e<=55215||e>=63744&&e<=64255||e>=65281&&e<=65374}var B=String.fromCharCode(65279);function H(e){return e&&e.length>0&&65279===e.charCodeAt(0)}function V(e){return btoa(encodeURIComponent(e))}function U(e,t){for(var n="",i=0;i{"use strict";n.d(t,{Et:()=>a,Gv:()=>s,Kg:()=>r,Lm:()=>u,RI:()=>d,Tn:()=>f,b0:()=>l,cy:()=>o,jx:()=>p,vt:()=>m,z:()=>c});var i={number:"number",string:"string",undefined:"undefined",object:"object",function:"function"};function o(e){return Array.isArray?Array.isArray(e):!(!e||typeof e.length!==i.number||e.constructor!==Array)}function r(e){return typeof e===i.string||e instanceof String}function s(e){return!(typeof e!==i.object||null===e||Array.isArray(e)||e instanceof RegExp||e instanceof Date)}function a(e){return(typeof e===i.number||e instanceof Number)&&!isNaN(e)}function u(e){return!0===e||!1===e}function l(e){return typeof e===i.undefined}function c(e){return l(e)||null===e}var h=Object.prototype.hasOwnProperty;function d(e){if(!s(e))return!1;for(var t in e)if(h.call(e,t))return!1;return!0}function f(e){return typeof e===i.function}function p(e,t){for(var n=Math.min(e.length,t.length),i=0;i{"use strict";n.d(t,{A:()=>p});var i,o,r=n(94),s=(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),a=/^\w[\w\d+.-]*$/,u=/^\//,l=/^\/\//,c="",h="/",d=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/,f=function(){function e(e,t,n,i,o){"object"==typeof e?(this.scheme=e.scheme||c,this.authority=e.authority||c,this.path=e.path||c,this.query=e.query||c,this.fragment=e.fragment||c):(this.scheme=e||c,this.authority=t||c,this.path=function(e,t){switch(e){case"https":case"http":case"file":t?t[0]!==h&&(t=h+t):t=h}return t}(this.scheme,n||c),this.query=i||c,this.fragment=o||c,function(e){if(e.scheme&&!a.test(e.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(e.path)if(e.authority){if(!u.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(l.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 ("//")')}(this))}return e.isUri=function(t){return t instanceof e||!!t&&"string"==typeof t.authority&&"string"==typeof t.fragment&&"string"==typeof t.path&&"string"==typeof t.query&&"string"==typeof t.scheme},Object.defineProperty(e.prototype,"fsPath",{get:function(){return b(this)},enumerable:!0,configurable:!0}),e.prototype.with=function(e){if(!e)return this;var t=e.scheme,n=e.authority,i=e.path,o=e.query,r=e.fragment;return void 0===t?t=this.scheme:null===t&&(t=c),void 0===n?n=this.authority:null===n&&(n=c),void 0===i?i=this.path:null===i&&(i=c),void 0===o?o=this.query:null===o&&(o=c),void 0===r?r=this.fragment:null===r&&(r=c),t===this.scheme&&n===this.authority&&i===this.path&&o===this.query&&r===this.fragment?this:new g(t,n,i,o,r)},e.parse=function(e){var t=d.exec(e);return t?new g(t[2]||c,decodeURIComponent(t[4]||c),decodeURIComponent(t[5]||c),decodeURIComponent(t[7]||c),decodeURIComponent(t[9]||c)):new g(c,c,c,c,c)},e.file=function(e){var t=c;if(r.uF&&(e=e.replace(/\\/g,h)),e[0]===h&&e[1]===h){var n=e.indexOf(h,2);-1===n?(t=e.substring(2),e=h):(t=e.substring(2,n),e=e.substring(n)||h)}return new g("file",t,e,c,c)},e.from=function(e){return new g(e.scheme,e.authority,e.path,e.query,e.fragment)},e.prototype.toString=function(e){return void 0===e&&(e=!1),_(this,e)},e.prototype.toJSON=function(){return this},e.revive=function(t){if(t){if(t instanceof e)return t;var n=new g(t);return n._fsPath=t.fsPath,n._formatted=t.external,n}return t},e}();const p=f;var g=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._formatted=null,t._fsPath=null,t}return s(t,e),Object.defineProperty(t.prototype,"fsPath",{get:function(){return this._fsPath||(this._fsPath=b(this)),this._fsPath},enumerable:!0,configurable:!0}),t.prototype.toString=function(e){return void 0===e&&(e=!1),e?_(this,!0):(this._formatted||(this._formatted=_(this,!1)),this._formatted)},t.prototype.toJSON=function(){var e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath),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},t}(f),m=((o={})[58]="%3A",o[47]="%2F",o[63]="%3F",o[35]="%23",o[91]="%5B",o[93]="%5D",o[64]="%40",o[33]="%21",o[36]="%24",o[38]="%26",o[39]="%27",o[40]="%28",o[41]="%29",o[42]="%2A",o[43]="%2B",o[44]="%2C",o[59]="%3B",o[61]="%3D",o[32]="%20",o);function v(e,t){for(var n=void 0,i=-1,o=0;o=97&&r<=122||r>=65&&r<=90||r>=48&&r<=57||45===r||46===r||95===r||126===r||t&&47===r)-1!==i&&(n+=encodeURIComponent(e.substring(i,o)),i=-1),void 0!==n&&(n+=e.charAt(o));else{void 0===n&&(n=e.substr(0,o));var s=m[r];void 0!==s?(-1!==i&&(n+=encodeURIComponent(e.substring(i,o)),i=-1),n+=s):-1===i&&(i=o)}}return-1!==i&&(n+=encodeURIComponent(e.substring(i))),void 0!==n?n:e}function y(e){for(var t=void 0,n=0;n1&&"file"===e.scheme?"//"+e.authority+e.path:47===e.path.charCodeAt(0)&&(e.path.charCodeAt(1)>=65&&e.path.charCodeAt(1)<=90||e.path.charCodeAt(1)>=97&&e.path.charCodeAt(1)<=122)&&58===e.path.charCodeAt(2)?e.path[1].toLowerCase()+e.path.substr(2):e.path,r.uF&&(t=t.replace(/\//g,"\\")),t}function _(e,t){var n=t?y:v,i="",o=e.scheme,r=e.authority,s=e.path,a=e.query,u=e.fragment;if(o&&(i+=o,i+=":"),(r||"file"===o)&&(i+=h,i+=h),r){var l=r.indexOf("@");if(-1!==l){var c=r.substr(0,l);r=r.substr(l+1),-1===(l=c.indexOf(":"))?i+=n(c,!1):(i+=n(c.substr(0,l),!1),i+=":",i+=n(c.substr(l+1),!1)),i+="@"}-1===(l=(r=r.toLowerCase()).indexOf(":"))?i+=n(r,!1):(i+=n(r.substr(0,l),!1),i+=r.substr(l))}if(s){if(s.length>=3&&47===s.charCodeAt(0)&&58===s.charCodeAt(2))(d=s.charCodeAt(1))>=65&&d<=90&&(s="/"+String.fromCharCode(d+32)+":"+s.substr(3));else if(s.length>=2&&58===s.charCodeAt(1)){var d;(d=s.charCodeAt(0))>=65&&d<=90&&(s=String.fromCharCode(d+32)+":"+s.substr(2))}i+=n(s,!0)}return a&&(i+="?",i+=n(a,!1)),u&&(i+="#",i+=t?u:v(u,!1)),i}},2337:(e,t,n)=>{"use strict";n.d(t,{K7:()=>r,g3:()=>s});var i,o=n(8957);!function(){var e=Object.create(null);e["WinJS/Core/_WinJS"]={};var t=function(t,n,i){var o={},r=!1,s=n.map((function(t){return"exports"===t?(r=!0,o):e[t]})),a=i.apply({},s);e[t]=r?o:a};t("WinJS/Core/_Global",[],(function(){return"undefined"!=typeof window?window:"undefined"!=typeof self?self:void 0!==n.g?n.g:{}})),t("WinJS/Core/_BaseCoreUtils",["WinJS/Core/_Global"],(function(e){var t=!!e.Windows,n=null;return{hasWinRT:t,markSupportedForProcessing:function(e){return e.supportedForProcessing=!0,e},_setImmediate:function(t){null===n&&(n=e.setImmediate?e.setImmediate.bind(e):void 0!==o&&"function"==typeof o.nextTick?o.nextTick.bind(o):e.setTimeout.bind(e)),n(t)}}})),t("WinJS/Core/_WriteProfilerMark",["WinJS/Core/_Global"],(function(e){return e.msWriteProfilerMark||function(){}})),t("WinJS/Core/_Base",["WinJS/Core/_WinJS","WinJS/Core/_Global","WinJS/Core/_BaseCoreUtils","WinJS/Core/_WriteProfilerMark"],(function(e,t,n,i){function o(e,t,n){var i,o,r,s=Object.keys(t),a=Array.isArray(e);for(o=0,r=s.length;o"),i}n.Namespace||(n.Namespace=Object.create(Object.prototype));Object.defineProperties(n.Namespace,{defineWithParent:{value:s,writable:!0,enumerable:!0,configurable:!0},define:{value:function(e,n){return s(t,e,n)},writable:!0,enumerable:!0,configurable:!0},_lazy:{value:function(e){var t,n,o=1;return{setName:function(e){t=e},get:function(){switch(o){case 3:return n;case 1:o=2;try{i("WinJS.Namespace._lazy:"+t+",StartTM"),n=e()}finally{i("WinJS.Namespace._lazy:"+t+",StopTM"),o=1}return e=null,o=3,n;case 2:throw"Illegal: reentrancy on initialization";default:throw"Illegal"}},set:function(e){if(2===o)throw"Illegal: reentrancy on initialization";o=3,n=e},enumerable:!0,configurable:!0}},writable:!0,enumerable:!0,configurable:!0},_moduleDefine:{value:function(e,n,i){var s=[e],a=null;return n&&(a=r(t,n),s.push(a)),o(s,i,n||""),a},writable:!0,enumerable:!0,configurable:!0}})}(),function(){function t(e,t,i){return e=e||function(){},n.markSupportedForProcessing(e),t&&o(e.prototype,t),i&&o(e,i),e}e.Namespace.define("WinJS.Class",{define:t,derive:function(e,i,r,s){if(e){i=i||function(){};var a=e.prototype;return i.prototype=Object.create(a),n.markSupportedForProcessing(i),Object.defineProperty(i.prototype,"constructor",{value:i,writable:!0,configurable:!0,enumerable:!0}),r&&o(i.prototype,r),s&&o(i,s),i}return t(i,r,s)},mix:function(e){var t,n;for(e=e||function(){},t=1,n=arguments.length;t{"use strict";n.r(t),n.d(t,{ShiftCommand:()=>u});var i=n(899),o=n(1315),r=n(1456),s=n(799),a=n(7623),u=function(){function e(e,t){this._opts=t,this._selection=e,this._useLastEditRangeForCursorEndPosition=!1,this._selectionStartColumnStaysPut=!1}return e.unshiftIndentCount=function(e,t,n){var i=o.A_.visibleColumnFromColumn(e,t,n);return o.A_.prevTabStop(i,n)/n},e.shiftIndentCount=function(e,t,n){var i=o.A_.visibleColumnFromColumn(e,t,n);return o.A_.nextTabStop(i,n)/n},e.prototype._addEditOperation=function(e,t,n){this._useLastEditRangeForCursorEndPosition?e.addTrackedEditOperation(t,n):e.addEditOperation(t,n)},e.prototype.getEditOperations=function(t,n){var s=this._selection.startLineNumber,u=this._selection.endLineNumber;1===this._selection.endColumn&&s!==u&&(u-=1);var l=this._opts.tabSize,c=this._opts.oneIndent,h=s===u;if(this._selection.isEmpty()&&/^\s*$/.test(t.getLineContent(s))&&(this._useLastEditRangeForCursorEndPosition=!0),this._opts.useTabStops)for(var d=["",c],f=0,p=0,g=s;g<=u;g++,f=p){p=0;var m=t.getLineContent(g),v=i.firstNonWhitespaceIndex(m);if((!this._opts.isUnshift||0!==m.length&&0!==v)&&(h||this._opts.isUnshift||0!==m.length)){if(-1===v&&(v=m.length),g>1&&o.A_.visibleColumnFromColumn(m,v+1,l)%l!=0&&t.isCheapToTokenize(g-1)){var y=a.cx.getRawEnterActionAtPosition(t,g-1,t.getLineMaxColumn(g-1));if(y){if(p=f,y.appendText)for(var b=0,_=y.appendText.length;b<_&&p{"use strict";n.d(t,{Ah:()=>i,HF:()=>I,Pk:()=>k,Re:()=>D,U7:()=>r,Wo:()=>L,a2:()=>p,jU:()=>x,m9:()=>s,tJ:()=>o,wb:()=>g,xs:()=>v});var i,o,r,s,a=n(486),u=n(94),l=n(9664),c=n(1279),h=n(7339),d=n(4709),f=Object.assign||function(e){for(var t,n=1,i=arguments.length;n=2?(S=y?i.Large:i.LargeBlocks,A=2/_):(S=y?i.Small:i.SmallBlocks,A=1/_),(I=Math.max(0,Math.floor((E-d-2)*A/(c+A))))/A>b&&(I=Math.floor(b*A)),N=E-I,"left"===v?(L=0,x+=I,D+=I,k+=I,T+=I):L=t-I-d}else L=0,I=0,S=i.None,N=E;var j=f?p:0;return{width:t,height:n,glyphMarginLeft:x,glyphMarginWidth:C,glyphMarginHeight:n,lineNumbersLeft:D,lineNumbersWidth:w,lineNumbersHeight:n,decorationsLeft:k,decorationsWidth:l,decorationsHeight:n,contentLeft:T,contentWidth:N,contentHeight:n,renderMinimap:S,minimapLeft:L,minimapWidth:I,viewportColumn:Math.max(1,Math.floor((N-d-2)/c)),verticalScrollbarWidth:d,horizontalScrollbarHeight:g,overviewRuler:{top:j,width:d,height:n-2*j,right:0}}},e}(),x={fontFamily:u.zx?"Menlo, Monaco, 'Courier New', monospace":u.j9?"'Droid Sans Mono', 'monospace', monospace, 'Droid Sans Fallback'":"Consolas, 'Courier New', monospace",fontWeight:"normal",fontSize:u.zx?12:14,lineHeight:0,letterSpacing:0},D={tabSize:4,insertSpaces:!0,detectIndentation:!0,trimAutoWhitespace:!0,largeFileOptimizations:!0},k={inDiffEditor:!1,wordSeparators:c.J3,lineNumbersMinChars:5,lineDecorationsWidth:10,readOnly:!1,mouseStyle:"text",disableLayerHinting:!1,automaticLayout:!1,wordWrap:"off",wordWrapColumn:80,wordWrapMinified:!0,wrappingIndent:o.Same,wordWrapBreakBeforeCharacters:"([{‘“〈《「『【〔([{「£¥$£¥++",wordWrapBreakAfterCharacters:" \t})]?|&,;¢°′″‰℃、。。、¢,.:;?!%・・ゝゞヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻ァィゥェォャュョッー”〉》」』】〕)]}」",wordWrapBreakObtrusiveCharacters:".",autoClosingBrackets:!0,autoIndent:!0,dragAndDrop:!0,emptySelectionClipboard:!0,useTabStops:!0,multiCursorModifier:"altKey",multiCursorMergeOverlapping:!0,accessibilitySupport:"auto",showUnused:!0,viewInfo:{extraEditorClassName:"",disableMonospaceOptimizations:!1,rulers:[],ariaLabel:a.k("editorViewAccessibleLabel","Editor content"),renderLineNumbers:1,renderCustomLineNumbers:null,selectOnLineNumbers:!0,glyphMargin:!0,revealHorizontalRightPadding:30,roundedSelection:!0,overviewRulerLanes:2,overviewRulerBorder:!0,cursorBlinking:r.Blink,mouseWheelZoom:!1,cursorStyle:s.Line,cursorWidth:0,hideCursorInOverviewRuler:!1,scrollBeyondLastLine:!0,scrollBeyondLastColumn:5,smoothScrolling:!1,stopRenderingLineAfter:1e4,renderWhitespace:"none",renderControlCharacters:!1,fontLigatures:!1,renderIndentGuides:!0,highlightActiveIndentGuide:!0,renderLineHighlight:"line",scrollbar:{vertical:l.XR.Auto,horizontal:l.XR.Auto,arrowSize:11,useShadows:!0,verticalHasArrows:!1,horizontalHasArrows:!1,horizontalScrollbarSize:10,horizontalSliderSize:10,verticalScrollbarSize:14,verticalSliderSize:14,handleMouseWheel:!0,mouseWheelScrollSensitivity:1},minimap:{enabled:!0,side:"right",showSlider:"mouseover",renderCharacters:!0,maxColumn:120},fixedOverflowWidgets:!1},contribInfo:{selectionClipboard:!0,hover:{enabled:!0,delay:300,sticky:!0},links:!0,contextmenu:!0,quickSuggestions:{other:!0,comments:!1,strings:!1},quickSuggestionsDelay:10,parameterHints:!0,iconsInSuggestions:!0,formatOnType:!1,formatOnPaste:!1,suggestOnTriggerCharacters:!0,acceptSuggestionOnEnter:"on",acceptSuggestionOnCommitCharacter:!0,wordBasedSuggestions:!0,suggestSelection:"recentlyUsed",suggestFontSize:0,suggestLineHeight:0,suggest:{filterGraceful:!0,snippets:"inline",snippetsPreventQuickSuggestions:!0},selectionHighlight:!0,occurrencesHighlight:!0,codeLens:!0,folding:!0,foldingStrategy:"auto",showFoldingControls:"mouseover",matchBrackets:!0,find:{seedSearchStringFromSelection:!0,autoFindInSelection:!1,globalFindClipboard:!1},colorDecorators:!0,lightbulbEnabled:!0,codeActionsOnSave:{},codeActionsOnSaveTimeout:750}}},1315:(e,t,n)=>{"use strict";n.d(t,{A_:()=>g,MF:()=>f,Q8:()=>d,d$:()=>c,mG:()=>h,vY:()=>p});var i=n(386),o=n(899),r=n(4170),s=n(799),a=n(1456),u=n(7623),l=n(5538),c=function(){function e(t,n,i,o){this._languageIdentifier=t;var r=o.editor;this.readOnly=r.readOnly,this.tabSize=i.tabSize,this.insertSpaces=i.insertSpaces,this.oneIndent=n,this.pageSize=Math.max(1,Math.floor(r.layoutInfo.height/r.fontInfo.lineHeight)-2),this.lineHeight=r.lineHeight,this.useTabStops=r.useTabStops,this.wordSeparators=r.wordSeparators,this.emptySelectionClipboard=r.emptySelectionClipboard,this.multiCursorMergeOverlapping=r.multiCursorMergeOverlapping,this.autoClosingBrackets=r.autoClosingBrackets,this.autoIndent=r.autoIndent,this.autoClosingPairsOpen={},this.autoClosingPairsClose={},this.surroundingPairs={},this._electricChars=null;var s=e._getAutoClosingPairs(t);if(s)for(var a=0;a=i.length)&&o.isLowSurrogate(i.charCodeAt(n))},e.isHighSurrogate=function(e,t,n){var i=e.getLineContent(t);return!(n<0||n>=i.length)&&o.isHighSurrogate(i.charCodeAt(n))},e.isInsideSurrogatePair=function(e,t,n){return this.isHighSurrogate(e,t,n-2)},e.visibleColumnFromColumn=function(e,t,n){var i=e.length;i>t-1&&(i=t-1);for(var r=0,s=0;s=t)return a-ts?s:o},e.nextTabStop=function(e,t){return e+t-e%t},e.prevTabStop=function(e,t){return e-1-(e-1)%t},e}()},2040:(e,t,n)=>{"use strict";n.d(t,{i:()=>l});var i,o,r,s=n(2879),a=(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),u=function(e){function t(t){for(var n=e.call(this,0)||this,i=0,o=t.length;i{"use strict";n.d(t,{V:()=>o,y:()=>r});var i=n(7597),o=function(){function e(t){var n=(0,i.W_)(t);this._defaultValue=n,this._asciiMap=e._createAsciiMap(n),this._map=new Map}return e._createAsciiMap=function(e){for(var t=new Uint8Array(256),n=0;n<256;n++)t[n]=e;return t},e.prototype.set=function(e,t){var n=(0,i.W_)(t);e>=0&&e<256?this._asciiMap[e]=n:this._map.set(e,n)},e.prototype.get=function(e){return e>=0&&e<256?this._asciiMap[e]:this._map.get(e)||this._defaultValue},e}(),r=function(){function e(){this._actual=new o(0)}return e.prototype.add=function(e){this._actual.set(e,1)},e.prototype.has=function(e){return 1===this._actual.get(e)},e}()},8953:(e,t,n)=>{"use strict";n.d(t,{f:()=>o});var i=n(5439),o=function(){function e(e,t){this._tokens=e,this._tokensCount=this._tokens.length>>>1,this._text=t}return e.prototype.equals=function(t){return t instanceof e&&this.slicedEquals(t,0,this._tokensCount)},e.prototype.slicedEquals=function(e,t,n){if(this._text!==e._text)return!1;if(this._tokensCount!==e._tokensCount)return!1;for(var i=t<<1,o=i+(n<<1),r=i;r0?this._tokens[e-1<<1]:0},e.prototype.getLanguageId=function(e){var t=this._tokens[1+(e<<1)];return i.xn.getLanguageId(t)},e.prototype.getStandardTokenType=function(e){var t=this._tokens[1+(e<<1)];return i.xn.getTokenType(t)},e.prototype.getForeground=function(e){var t=this._tokens[1+(e<<1)];return i.xn.getForeground(t)},e.prototype.getClassName=function(e){var t=this._tokens[1+(e<<1)];return i.xn.getClassNameFromMetadata(t)},e.prototype.getInlineStyle=function(e,t){var n=this._tokens[1+(e<<1)];return i.xn.getInlineStyleFromMetadata(n,t)},e.prototype.getEndOffset=function(e){return this._tokens[e<<1]},e.prototype.findTokenIndexAtOffset=function(t){return e.findIndexInTokensArray(this._tokens,t)},e.prototype.inflate=function(){return this},e.prototype.sliceAndInflate=function(e,t,n){return new r(this,e,t,n)},e.convertToEndOffset=function(e,t){for(var n=(e.length>>>1)-1,i=0;i>>1)-1;nt&&(i=o)}return n},e}(),r=function(){function e(e,t,n,i){this._source=e,this._startOffset=t,this._endOffset=n,this._deltaOffset=i,this._firstTokenIndex=e.findTokenIndexAtOffset(t),this._tokensCount=0;for(var o=this._firstTokenIndex,r=e.getCount();o=n);o++)this._tokensCount++}return e.prototype.equals=function(t){return t instanceof e&&this._startOffset===t._startOffset&&this._endOffset===t._endOffset&&this._deltaOffset===t._deltaOffset&&this._source.slicedEquals(t._source,this._firstTokenIndex,this._tokensCount)},e.prototype.getCount=function(){return this._tokensCount},e.prototype.getForeground=function(e){return this._source.getForeground(this._firstTokenIndex+e)},e.prototype.getEndOffset=function(e){var t=this._source.getEndOffset(this._firstTokenIndex+e);return Math.min(this._endOffset,t)-this._startOffset+this._deltaOffset},e.prototype.getClassName=function(e){return this._source.getClassName(this._firstTokenIndex+e)},e.prototype.getInlineStyle=function(e,t){return this._source.getInlineStyle(this._firstTokenIndex+e,t)},e.prototype.findTokenIndexAtOffset=function(e){return this._source.findTokenIndexAtOffset(e+this._startOffset-this._deltaOffset)-this._firstTokenIndex},e}()},386:(e,t,n)=>{"use strict";n.d(t,{y:()=>i});var i=function(){function e(e,t){this.lineNumber=e,this.column=t}return e.prototype.equals=function(t){return e.equals(this,t)},e.equals=function(e,t){return!e&&!t||!!e&&!!t&&e.lineNumber===t.lineNumber&&e.column===t.column},e.prototype.isBefore=function(t){return e.isBefore(this,t)},e.isBefore=function(e,t){return e.lineNumber{"use strict";n.d(t,{Q:()=>o});var i=n(386),o=function(){function e(e,t,n,i){e>n||e===n&&t>i?(this.startLineNumber=n,this.startColumn=i,this.endLineNumber=e,this.endColumn=t):(this.startLineNumber=e,this.startColumn=t,this.endLineNumber=n,this.endColumn=i)}return e.prototype.isEmpty=function(){return e.isEmpty(this)},e.isEmpty=function(e){return e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn},e.prototype.containsPosition=function(t){return e.containsPosition(this,t)},e.containsPosition=function(e,t){return!(t.lineNumbere.endLineNumber||t.lineNumber===e.startLineNumber&&t.columne.endColumn)},e.prototype.containsRange=function(t){return e.containsRange(this,t)},e.containsRange=function(e,t){return!(t.startLineNumbere.endLineNumber||t.endLineNumber>e.endLineNumber||t.startLineNumber===e.startLineNumber&&t.startColumne.endColumn)},e.prototype.plusRange=function(t){return e.plusRange(this,t)},e.plusRange=function(t,n){var i,o,r,s;return n.startLineNumbert.endLineNumber?(r=n.endLineNumber,s=n.endColumn):n.endLineNumber===t.endLineNumber?(r=n.endLineNumber,s=Math.max(n.endColumn,t.endColumn)):(r=t.endLineNumber,s=t.endColumn),new e(i,o,r,s)},e.prototype.intersectRanges=function(t){return e.intersectRanges(this,t)},e.intersectRanges=function(t,n){var i=t.startLineNumber,o=t.startColumn,r=t.endLineNumber,s=t.endColumn,a=n.startLineNumber,u=n.startColumn,l=n.endLineNumber,c=n.endColumn;return il?(r=l,s=c):r===l&&(s=Math.min(s,c)),i>r||i===r&&o>s?null:new e(i,o,r,s)},e.prototype.equalsRange=function(t){return e.equalsRange(this,t)},e.equalsRange=function(e,t){return!!e&&!!t&&e.startLineNumber===t.startLineNumber&&e.startColumn===t.startColumn&&e.endLineNumber===t.endLineNumber&&e.endColumn===t.endColumn},e.prototype.getEndPosition=function(){return new i.y(this.endLineNumber,this.endColumn)},e.prototype.getStartPosition=function(){return new i.y(this.startLineNumber,this.startColumn)},e.prototype.toString=function(){return"["+this.startLineNumber+","+this.startColumn+" -> "+this.endLineNumber+","+this.endColumn+"]"},e.prototype.setEndPosition=function(t,n){return new e(this.startLineNumber,this.startColumn,t,n)},e.prototype.setStartPosition=function(t,n){return new e(t,n,this.endLineNumber,this.endColumn)},e.prototype.collapseToStart=function(){return e.collapseToStart(this)},e.collapseToStart=function(t){return new e(t.startLineNumber,t.startColumn,t.startLineNumber,t.startColumn)},e.fromPositions=function(t,n){return void 0===n&&(n=t),new e(t.lineNumber,t.column,n.lineNumber,n.column)},e.lift=function(t){return t?new e(t.startLineNumber,t.startColumn,t.endLineNumber,t.endColumn):null},e.isIRange=function(e){return e&&"number"==typeof e.startLineNumber&&"number"==typeof e.startColumn&&"number"==typeof e.endLineNumber&&"number"==typeof e.endColumn},e.areIntersectingOrTouching=function(e,t){return!(e.endLineNumbere.startLineNumber},e}()},799:(e,t,n)=>{"use strict";n.d(t,{L:()=>u,S:()=>o});var i,o,r=n(1456),s=n(386),a=(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});!function(e){e[e.LTR=0]="LTR",e[e.RTL=1]="RTL"}(o||(o={}));var u=function(e){function t(t,n,i,o){var r=e.call(this,t,n,i,o)||this;return r.selectionStartLineNumber=t,r.selectionStartColumn=n,r.positionLineNumber=i,r.positionColumn=o,r}return a(t,e),t.prototype.clone=function(){return new t(this.selectionStartLineNumber,this.selectionStartColumn,this.positionLineNumber,this.positionColumn)},t.prototype.toString=function(){return"["+this.selectionStartLineNumber+","+this.selectionStartColumn+" -> "+this.positionLineNumber+","+this.positionColumn+"]"},t.prototype.equalsSelection=function(e){return t.selectionsEqual(this,e)},t.selectionsEqual=function(e,t){return e.selectionStartLineNumber===t.selectionStartLineNumber&&e.selectionStartColumn===t.selectionStartColumn&&e.positionLineNumber===t.positionLineNumber&&e.positionColumn===t.positionColumn},t.prototype.getDirection=function(){return this.selectionStartLineNumber===this.startLineNumber&&this.selectionStartColumn===this.startColumn?o.LTR:o.RTL},t.prototype.setEndPosition=function(e,n){return this.getDirection()===o.LTR?new t(this.startLineNumber,this.startColumn,e,n):new t(e,n,this.startLineNumber,this.startColumn)},t.prototype.getPosition=function(){return new s.y(this.positionLineNumber,this.positionColumn)},t.prototype.setStartPosition=function(e,n){return this.getDirection()===o.LTR?new t(e,n,this.endLineNumber,this.endColumn):new t(this.endLineNumber,this.endColumn,e,n)},t.fromPositions=function(e,n){return void 0===n&&(n=e),new t(e.lineNumber,e.column,n.lineNumber,n.column)},t.liftSelection=function(e){return new t(e.selectionStartLineNumber,e.selectionStartColumn,e.positionLineNumber,e.positionColumn)},t.selectionsArrEqual=function(e,t){if(e&&!t||!e&&t)return!1;if(!e&&!t)return!0;if(e.length!==t.length)return!1;for(var n=0,i=e.length;n{"use strict";n.d(t,{$M:()=>o,Zj:()=>r,ou:()=>i});var i=function(){function e(e,t,n){this.offset=0|e,this.type=t,this.language=n}return e.prototype.toString=function(){return"("+this.offset+", "+this.type+")"},e}(),o=function(e,t){this.tokens=e,this.endState=t},r=function(e,t){this.tokens=e,this.endState=t}},7597:(e,t,n)=>{"use strict";n.d(t,{EA:()=>s,Ie:()=>i,W_:()=>o,jT:()=>r});var i=function(){function e(e,t,n){for(var i=new Uint8Array(e*t),o=0,r=e*t;o255?255:0|e}function r(e){return e<0?0:e>4294967295?4294967295:0|e}function s(e){for(var t=e.length,n=new Uint32Array(t),i=0;i{"use strict";var i,o,r,s;n.d(t,{A5:()=>i,Dg:()=>l,F4:()=>c,WU:()=>s,X2:()=>u,kK:()=>a,kf:()=>o,of:()=>r}),function(e){e[e.Left=1]="Left",e[e.Center=2]="Center",e[e.Right=4]="Right",e[e.Full=7]="Full"}(i||(i={})),function(e){e[e.TextDefined=0]="TextDefined",e[e.LF=1]="LF",e[e.CRLF=2]="CRLF"}(o||(o={})),function(e){e[e.LF=1]="LF",e[e.CRLF=2]="CRLF"}(r||(r={})),function(e){e[e.LF=0]="LF",e[e.CRLF=1]="CRLF"}(s||(s={}));var a,u=function(){function e(e){this.tabSize=0|e.tabSize,this.insertSpaces=Boolean(e.insertSpaces),this.defaultEOL=0|e.defaultEOL,this.trimAutoWhitespace=Boolean(e.trimAutoWhitespace)}return e.prototype.equals=function(e){return this.tabSize===e.tabSize&&this.insertSpaces===e.insertSpaces&&this.defaultEOL===e.defaultEOL&&this.trimAutoWhitespace===e.trimAutoWhitespace},e.prototype.createChangeEvent=function(e){return{tabSize:this.tabSize!==e.tabSize,insertSpaces:this.insertSpaces!==e.insertSpaces,trimAutoWhitespace:this.trimAutoWhitespace!==e.trimAutoWhitespace}},e}(),l=function(e,t){this.range=e,this.matches=t};!function(e){e[e.AlwaysGrowsWhenTypingAtEdges=0]="AlwaysGrowsWhenTypingAtEdges",e[e.NeverGrowsWhenTypingAtEdges=1]="NeverGrowsWhenTypingAtEdges",e[e.GrowsOnlyWhenTypingBefore=2]="GrowsOnlyWhenTypingBefore",e[e.GrowsOnlyWhenTypingAfter=3]="GrowsOnlyWhenTypingAfter"}(a||(a={}));var c=function(e,t,n){this.reverseEdits=e,this.changes=t,this.trimAutoWhitespaceLineNumbers=n}},4170:(e,t,n)=>{"use strict";n.d(t,{kI:()=>Ve,Bz:()=>We});var i=n(6807),o=n(2213),r=n(4076),s=n(5439),a=n(5538),u=function(){function e(e,t){this.beforeVersionId=e,this.beforeCursorState=t,this.afterCursorState=null,this.afterVersionId=-1,this.editOperations=[]}return e.prototype.undo=function(e){for(var t=this.editOperations.length-1;t>=0;t--)this.editOperations[t]={operations:e.applyEdits(this.editOperations[t].operations)}},e.prototype.redo=function(e){for(var t=0;t0){var e=this.past.pop();try{e.undo(this.model)}catch(e){return(0,a.dz)(e),this.clear(),null}return this.future.push(e),{selections:e.beforeCursorState,recordedVersionId:e.beforeVersionId}}return null},e.prototype.canUndo=function(){return this.past.length>0},e.prototype.redo=function(){if(this.future.length>0){var e=this.future.pop();try{e.redo(this.model)}catch(e){return(0,a.dz)(e),this.clear(),null}return this.past.push(e),{selections:e.afterCursorState,recordedVersionId:e.afterVersionId}}return null},e.prototype.canRedo=function(){return this.future.length>0},e}(),d=n(1456),f=n(799),p=function(){this.changeType=1},g=function(e,t){this.changeType=2,this.lineNumber=e,this.detail=t},m=function(e,t){this.changeType=3,this.fromLineNumber=e,this.toLineNumber=t},v=function(e,t,n){this.changeType=4,this.fromLineNumber=e,this.toLineNumber=t,this.detail=n},y=function(){this.changeType=5},b=function(){function e(e,t,n,i){this.changes=e,this.versionId=t,this.isUndoing=n,this.isRedoing=i}return e.prototype.containsEvent=function(e){for(var t=0,n=this.changes.length;t>>0}function C(e,t){e.metadata=254&e.metadata|t}function S(e){return(2&e.metadata)>>>1==1}function L(e,t){e.metadata=253&e.metadata|(t?1:0)<<1}function I(e){return(4&e.metadata)>>>2==1}function N(e,t){e.metadata=251&e.metadata|(t?1:0)<<2}function x(e){return(8&e.metadata)>>>3==1}function D(e,t){e.metadata=247&e.metadata|(t?1:0)<<3}function k(e,t){e.metadata=207&e.metadata|t<<4}var T=function(){function e(e,t,n){this.metadata=0,this.parent=null,this.left=null,this.right=null,C(this,1),this.start=t,this.end=n,this.delta=0,this.maxEnd=n,this.id=e,this.ownerId=0,this.options=null,N(this,!1),k(this,1),D(this,!1),this.cachedVersionId=0,this.cachedAbsoluteStart=t,this.cachedAbsoluteEnd=n,this.range=null,L(this,!1)}return e.prototype.reset=function(e,t,n,i){this.start=t,this.end=n,this.maxEnd=n,this.cachedVersionId=e,this.cachedAbsoluteStart=t,this.cachedAbsoluteEnd=n,this.range=i},e.prototype.setOptions=function(e){this.options=e;var t=this.options.className;N(this,"squiggly-error"===t||"squiggly-warning"===t||"squiggly-info"===t),k(this,this.options.stickiness),D(this,!!this.options.overviewRuler.color)},e.prototype.setCachedOffsets=function(e,t,n){this.cachedVersionId!==n&&(this.range=null),this.cachedVersionId=n,this.cachedAbsoluteStart=e,this.cachedAbsoluteEnd=t},e.prototype.detach=function(){this.parent=null,this.left=null,this.right=null},e}(),E=new T(null,0,0);E.parent=E,E.left=E,E.right=E,C(E,0);var A=function(){function e(){this.root=E,this.requestNormalizeDelta=!1}return e.prototype.intervalSearch=function(e,t,n,i,o){return this.root===E?[]:function(e,t,n,i,o,r){for(var s=e.root,a=0,u=0,l=0,c=[],h=0;s!==E;)if(S(s))L(s.left,!1),L(s.right,!1),s===s.parent.right&&(a-=s.parent.delta),s=s.parent;else{if(!S(s.left)){if(a+s.maxEndn)L(s,!0);else{if((l=a+s.end)>=t){s.setCachedOffsets(u,l,r);var d=!0;i&&s.ownerId&&s.ownerId!==i&&(d=!1),o&&I(s)&&(d=!1),d&&(c[h++]=s)}L(s,!0),s.right===E||S(s.right)||(a+=s.delta,s=s.right)}}return L(e.root,!1),c}(this,e,t,n,i,o)},e.prototype.search=function(e,t,n){return this.root===E?[]:function(e,t,n,i){for(var o=e.root,r=0,s=0,a=0,u=[],l=0;o!==E;)if(S(o))L(o.left,!1),L(o.right,!1),o===o.parent.right&&(r-=o.parent.delta),o=o.parent;else if(o.left===E||S(o.left)){s=r+o.start,a=r+o.end,o.setCachedOffsets(s,a,i);var c=!0;t&&o.ownerId&&o.ownerId!==t&&(c=!1),n&&I(o)&&(c=!1),c&&(u[l++]=o),L(o,!0),o.right===E||S(o.right)||(r+=o.delta,o=o.right)}else o=o.left;return L(e.root,!1),u}(this,e,t,n)},e.prototype.collectNodesFromOwner=function(e){return function(e,t){for(var n=e.root,i=[],o=0;n!==E;)S(n)?(L(n.left,!1),L(n.right,!1),n=n.parent):n.left===E||S(n.left)?(n.ownerId===t&&(i[o++]=n),L(n,!0),n.right===E||S(n.right)||(n=n.right)):n=n.left;return L(e.root,!1),i}(this,e)},e.prototype.collectNodesPostOrder=function(){return function(e){for(var t=e.root,n=[],i=0;t!==E;)S(t)?(L(t.left,!1),L(t.right,!1),t=t.parent):t.left===E||S(t.left)?t.right===E||S(t.right)?(n[i++]=t,L(t,!0)):t=t.right:t=t.left;return L(e.root,!1),n}(this)},e.prototype.insert=function(e){R(this,e),this._normalizeDeltaIfNecessary()},e.prototype.delete=function(e){P(this,e),this._normalizeDeltaIfNecessary()},e.prototype.resolveNode=function(e,t){for(var n=e,i=0;e!==this.root;)e===e.parent.right&&(i+=e.parent.delta),e=e.parent;var o=n.start+i,r=n.end+i;n.setCachedOffsets(o,r,t)},e.prototype.acceptReplace=function(e,t,n,i){for(var o=function(e,t,n){for(var i=e.root,o=0,r=0,s=0,a=[],u=0;i!==E;)if(S(i))L(i.left,!1),L(i.right,!1),i===i.parent.right&&(o-=i.parent.delta),i=i.parent;else{if(!S(i.left)){if(o+i.maxEndn?L(i,!0):((s=o+i.end)>=t&&(i.setCachedOffsets(r,s,0),a[u++]=i),L(i,!0),i.right===E||S(i.right)||(o+=i.delta,i=i.right))}return L(e.root,!1),a}(this,e,e+t),r=0,s=o.length;rn?(o.start+=s,o.end+=s,o.delta+=s,(o.delta<-1073741824||o.delta>1073741824)&&(e.requestNormalizeDelta=!0),L(o,!0)):(L(o,!0),o.right===E||S(o.right)||(r+=o.delta,o=o.right))}L(e.root,!1)}(this,e,e+t,n),this._normalizeDeltaIfNecessary(),r=0,s=o.length;rn)&&1!==i&&(2===i||t)}function O(e,t,n,i,o){var r=function(e){return(48&e.metadata)>>>4}(e),s=0===r||2===r,a=1===r||2===r,u=n-t,l=i,c=Math.min(u,l),h=e.start,d=!1,f=e.end,p=!1,g=o?1:u>0?2:0;!d&&j(h,s,t,g)&&(d=!0),!p&&j(f,a,t,g)&&(p=!0),c>0&&!o&&(g=u>l?2:0,!d&&j(h,s,t+c,g)&&(d=!0),!p&&j(f,a,t+c,g)&&(p=!0)),g=o?1:0,!d&&j(h,s,n,g)&&(e.start=t+l,d=!0),!p&&j(f,a,n,g)&&(e.end=t+l,p=!0);var m=l-u;d||(e.start=Math.max(0,h+m),d=!0),p||(e.end=Math.max(0,f+m),p=!0),e.start>e.end&&(e.end=e.start)}function R(e,t){if(e.root===E)return t.parent=E,t.left=E,t.right=E,C(t,0),e.root=t,e.root;!function(e,t){for(var n,i,o,r,s=0,a=e.root,u=t.start,l=t.end;;)if(n=u,i=l,o=a.start+s,r=a.end+s,(n===o?i-r:n-o)<0){if(a.left===E){t.start-=s,t.end-=s,t.maxEnd-=s,a.left=t;break}a=a.left}else{if(a.right===E){t.start-=s+a.delta,t.end-=s+a.delta,t.maxEnd-=s+a.delta,a.right=t;break}s+=a.delta,a=a.right}t.parent=a,t.left=E,t.right=E,C(t,1)}(e,t),V(t.parent);for(var n=t;n!==e.root&&1===M(n.parent);){var i;n.parent===n.parent.parent.left?1===M(i=n.parent.parent.right)?(C(n.parent,0),C(i,0),C(n.parent.parent,1),n=n.parent.parent):(n===n.parent.right&&W(e,n=n.parent),C(n.parent,0),C(n.parent.parent,1),F(e,n.parent.parent)):1===M(i=n.parent.parent.left)?(C(n.parent,0),C(i,0),C(n.parent.parent,1),n=n.parent.parent):(n===n.parent.left&&F(e,n=n.parent),C(n.parent,0),C(n.parent.parent,1),W(e,n.parent.parent))}return C(e.root,0),t}function P(e,t){var n,i;if(t.left===E?(i=t,(n=t.right).delta+=t.delta,(n.delta<-1073741824||n.delta>1073741824)&&(e.requestNormalizeDelta=!0),n.start+=t.delta,n.end+=t.delta):t.right===E?(n=t.left,i=t):((n=(i=function(e){for(;e.left!==E;)e=e.left;return e}(t.right)).right).start+=i.delta,n.end+=i.delta,n.delta+=i.delta,(n.delta<-1073741824||n.delta>1073741824)&&(e.requestNormalizeDelta=!0),i.start+=t.delta,i.end+=t.delta,i.delta=t.delta,(i.delta<-1073741824||i.delta>1073741824)&&(e.requestNormalizeDelta=!0)),i===e.root)return e.root=n,C(n,0),t.detach(),z(),H(n),void(e.root.parent=E);var o,r=1===M(i);if(i===i.parent.left?i.parent.left=n:i.parent.right=n,i===t?n.parent=i.parent:(i.parent===t?n.parent=i:n.parent=i.parent,i.left=t.left,i.right=t.right,i.parent=t.parent,C(i,M(t)),t===e.root?e.root=i:t===t.parent.left?t.parent.left=i:t.parent.right=i,i.left!==E&&(i.left.parent=i),i.right!==E&&(i.right.parent=i)),t.detach(),r)return V(n.parent),i!==t&&(V(i),V(i.parent)),void z();for(V(n),V(n.parent),i!==t&&(V(i),V(i.parent));n!==e.root&&0===M(n);)n===n.parent.left?(1===M(o=n.parent.right)&&(C(o,0),C(n.parent,1),W(e,n.parent),o=n.parent.right),0===M(o.left)&&0===M(o.right)?(C(o,1),n=n.parent):(0===M(o.right)&&(C(o.left,0),C(o,1),F(e,o),o=n.parent.right),C(o,M(n.parent)),C(n.parent,0),C(o.right,0),W(e,n.parent),n=e.root)):(1===M(o=n.parent.left)&&(C(o,0),C(n.parent,1),F(e,n.parent),o=n.parent.left),0===M(o.left)&&0===M(o.right)?(C(o,1),n=n.parent):(0===M(o.left)&&(C(o.right,0),C(o,1),W(e,o),o=n.parent.left),C(o,M(n.parent)),C(n.parent,0),C(o.left,0),F(e,n.parent),n=e.root));C(n,0),z()}function z(){E.parent=E,E.delta=0,E.start=0,E.end=0}function W(e,t){var n=t.right;n.delta+=t.delta,(n.delta<-1073741824||n.delta>1073741824)&&(e.requestNormalizeDelta=!0),n.start+=t.delta,n.end+=t.delta,t.right=n.left,n.left!==E&&(n.left.parent=t),n.parent=t.parent,t.parent===E?e.root=n:t===t.parent.left?t.parent.left=n:t.parent.right=n,n.left=t,t.parent=n,H(t),H(n)}function F(e,t){var n=t.left;t.delta-=n.delta,(t.delta<-1073741824||t.delta>1073741824)&&(e.requestNormalizeDelta=!0),t.start-=n.delta,t.end-=n.delta,t.left=n.right,n.right!==E&&(n.right.parent=t),n.parent=t.parent,t.parent===E?e.root=n:t===t.parent.right?t.parent.right=n:t.parent.left=n,n.right=t,t.parent=n,H(t),H(n)}function B(e){var t=e.end;if(e.left!==E){var n=e.left.maxEnd;n>t&&(t=n)}if(e.right!==E){var i=e.right.maxEnd+e.delta;i>t&&(t=i)}return t}function H(e){e.maxEnd=B(e)}function V(e){for(;e!==E;){var t=B(e);if(e.maxEnd===t)return;e.maxEnd=t,e=e.parent}}var U=n(6621),Y=n(94),Z=Y.zQ.performance&&"function"==typeof Y.zQ.performance.now,G=function(){function e(e){this._highResolution=Z&&e,this._startTime=this._now(),this._stopTime=-1}return e.create=function(t){return void 0===t&&(t=!0),new e(t)},e.prototype.elapsed=function(){return-1!==this._stopTime?this._stopTime-this._startTime:this._now()-this._startTime},e.prototype._now=function(){return this._highResolution?Y.zQ.performance.now():(new Date).getTime()},e}(),Q=n(4998),q=n(6804),K=n(6360),J=n(386),X=n(7623),$=n(1279),ee=n(8953),te=n(7339);function ne(e){return(16384|e|2<<23)>>>0}var ie=new Uint32Array(0).buffer,oe=function(){function e(e){this._state=e,this._lineTokens=null,this._invalid=!0}return e.prototype.deleteBeginning=function(e){null!==this._lineTokens&&this._lineTokens!==ie&&this.delete(0,e)},e.prototype.deleteEnding=function(e){if(null!==this._lineTokens&&this._lineTokens!==ie){var t=new Uint32Array(this._lineTokens),n=t[t.length-2];this.delete(e,n)}},e.prototype.delete=function(e,t){if(null!==this._lineTokens&&this._lineTokens!==ie&&e!==t){var n=new Uint32Array(this._lineTokens),i=n.length>>>1;if(0!==e||n[n.length-2]!==t){var o=ee.f.findIndexInTokensArray(n,e),r=o>0?n[o-1<<1]:0;if(tl&&(n[u++]=d,n[u++]=n[1+(h<<1)],l=d)}if(u!==n.length){var f=new Uint32Array(u);f.set(n.subarray(0,u),0),this._lineTokens=f.buffer}}}else this._lineTokens=ie}},e.prototype.append=function(e){if(e!==ie)if(this._lineTokens!==ie){if(null!==this._lineTokens)if(null!==e){var t=new Uint32Array(this._lineTokens),n=new Uint32Array(e),i=n.length>>>1,o=new Uint32Array(t.length+n.length);o.set(t,0);for(var r=t.length,s=t[t.length-2],a=0;a>>1,o=ee.f.findIndexInTokensArray(n,e);o>0&&(o>0?n[o-1<<1]:0)===e&&o--;for(var r=o;r=e},e.prototype.hasLinesToTokenize=function(e){return this._invalidLineStartIndex=0;r--)this.invalidateLine(e.startLineNumber+r-1);this._acceptDeleteRange(e),this._acceptInsertText(new J.y(e.startLineNumber,e.startColumn),t,n)},e.prototype._acceptDeleteRange=function(e){var t=e.startLineNumber-1;if(!(t>=this._tokens.length))if(e.startLineNumber!==e.endLineNumber){var n=this._tokens[t];n.deleteEnding(e.startColumn-1);var i=e.endLineNumber-1,o=null;if(i=this._tokens.length))if(0!==t){var o=this._tokens[i];o.deleteEnding(e.column-1),o.insert(e.column-1,n);for(var r=new Array(t),s=t-1;s>=0;s--)r[s]=new oe(null);this._tokens=te.nK(this._tokens,e.lineNumber,r)}else this._tokens[i].insert(e.column-1,n)}},e.prototype._tokenizeOneLine=function(e,t){if(!this.hasLinesToTokenize(e))return e.getLineCount()+1;var n=this._invalidLineStartIndex+1;return this._updateTokensUntilLine(e,t,n),n},e.prototype._tokenizeText=function(e,t,n){var i=null;try{i=this.tokenizationSupport.tokenize2(t,n,0)}catch(e){(0,a.dz)(e)}return i||(i=(0,Q.T5)(this.languageIdentifier.id,t,n,0)),i},e.prototype._updateTokensUntilLine=function(e,t,n){if(this.tokenizationSupport){for(var i=e.getLineCount(),o=n-1,r=this._invalidLineStartIndex;r<=o;r++){var s=r+1,u=null,l=e.getLineContent(r+1);try{var c=this._getState(r).clone();u=this.tokenizationSupport.tokenize2(l,c,0)}catch(e){(0,a.dz)(e)}if(u||(u=(0,Q.T5)(this.languageIdentifier.id,l,this._getState(r),0)),this._setTokens(this.languageIdentifier.id,r,l.length,u.tokens),t.registerChangedTokens(r+1),this._setIsInvalid(r,!1),s0?t[n-1]:null;i&&i.toLineNumber===e-1?i.toLineNumber++:t[n]={fromLineNumber:e,toLineNumber:e}},e.prototype.build=function(){return 0===this._ranges.length?null:{ranges:this._ranges}},e}();function ae(e,t,n,i){var o;for(o=0;o0&&s>0)return 0;if(u>0&&l>0)return 0;var c=Math.abs(s-l),h=Math.abs(r-u);return 0===c?h:h%c==0?h/c:0}function ue(e,t,n){for(var i=Math.min(e.getLineCount(),1e4),o=0,r=0,s="",a=0,u=[0,0,0,0,0,0,0,0,0],l=1;l<=i;l++){for(var c=e.getLineLength(l),h=e.getLineContent(l),d=c<=65536,f=!1,p=0,g=0,m=0,v=0,y=c;v0?o++:g>1&&r++;var _=ae(s,a,h,p);_<=8&&u[_]++,s=h,a=p}}var w=n;o!==r&&(w=oC&&(C=t,M=e)})),{insertSpaces:w,tabSize:M}}var le=n(3517),ce=n(6343),he=function(){function e(e,t){this.piece=e,this.color=t,this.size_left=0,this.lf_left=0,this.parent=null,this.left=null,this.right=null}return e.prototype.next=function(){if(this.right!==de)return fe(this.right);for(var e=this;e.parent!==de&&e.parent.left!==e;)e=e.parent;return e.parent===de?de:e.parent},e.prototype.prev=function(){if(this.left!==de)return pe(this.left);for(var e=this;e.parent!==de&&e.parent.right!==e;)e=e.parent;return e.parent===de?de:e.parent},e.prototype.detach=function(){this.parent=null,this.left=null,this.right=null},e}(),de=new he(null,0);function fe(e){for(;e.left!==de;)e=e.left;return e}function pe(e){for(;e.right!==de;)e=e.right;return e}function ge(e){return e===de?0:e.size_left+e.piece.length+ge(e.right)}function me(e){return e===de?0:e.lf_left+e.piece.lineFeedCnt+me(e.right)}function ve(){de.parent=de}function ye(e,t){var n=t.right;n.size_left+=t.size_left+(t.piece?t.piece.length:0),n.lf_left+=t.lf_left+(t.piece?t.piece.lineFeedCnt:0),t.right=n.left,n.left!==de&&(n.left.parent=t),n.parent=t.parent,t.parent===de?e.root=n:t.parent.left===t?t.parent.left=n:t.parent.right=n,n.left=t,t.parent=n}function be(e,t){var n=t.left;t.left=n.right,n.right!==de&&(n.right.parent=t),n.parent=t.parent,t.size_left-=n.size_left+(n.piece?n.piece.length:0),t.lf_left-=n.lf_left+(n.piece?n.piece.lineFeedCnt:0),t.parent===de?e.root=n:t===t.parent.right?t.parent.right=n:t.parent.left=n,n.right=t,t.parent=n}function _e(e,t){var n,i;if(n=t.left===de?(i=t).right:t.right===de?(i=t).left:(i=fe(t.right)).right,i===e.root)return e.root=n,n.color=0,t.detach(),ve(),void(e.root.parent=de);var o=1===i.color;if(i===i.parent.left?i.parent.left=n:i.parent.right=n,i===t?(n.parent=i.parent,Ce(e,n)):(i.parent===t?n.parent=i:n.parent=i.parent,Ce(e,n),i.left=t.left,i.right=t.right,i.parent=t.parent,i.color=t.color,t===e.root?e.root=i:t===t.parent.left?t.parent.left=i:t.parent.right=i,i.left!==de&&(i.left.parent=i),i.right!==de&&(i.right.parent=i),i.size_left=t.size_left,i.lf_left=t.lf_left,Ce(e,i)),t.detach(),n.parent.left===n){var r=ge(n),s=me(n);if(r!==n.parent.size_left||s!==n.parent.lf_left){var a=r-n.parent.size_left,u=s-n.parent.lf_left;n.parent.size_left=r,n.parent.lf_left=s,Me(e,n.parent,a,u)}}if(Ce(e,n.parent),o)ve();else{for(var l;n!==e.root&&0===n.color;)n===n.parent.left?(1===(l=n.parent.right).color&&(l.color=0,n.parent.color=1,ye(e,n.parent),l=n.parent.right),0===l.left.color&&0===l.right.color?(l.color=1,n=n.parent):(0===l.right.color&&(l.left.color=0,l.color=1,be(e,l),l=n.parent.right),l.color=n.parent.color,n.parent.color=0,l.right.color=0,ye(e,n.parent),n=e.root)):(1===(l=n.parent.left).color&&(l.color=0,n.parent.color=1,be(e,n.parent),l=n.parent.left),0===l.left.color&&0===l.right.color?(l.color=1,n=n.parent):(0===l.left.color&&(l.right.color=0,l.color=1,ye(e,l),l=n.parent.left),l.color=n.parent.color,n.parent.color=0,l.left.color=0,be(e,n.parent),n=e.root));n.color=0,ve()}}function we(e,t){for(Ce(e,t);t!==e.root&&1===t.parent.color;){var n;t.parent===t.parent.parent.left?1===(n=t.parent.parent.right).color?(t.parent.color=0,n.color=0,t.parent.parent.color=1,t=t.parent.parent):(t===t.parent.right&&ye(e,t=t.parent),t.parent.color=0,t.parent.parent.color=1,be(e,t.parent.parent)):1===(n=t.parent.parent.left).color?(t.parent.color=0,n.color=0,t.parent.parent.color=1,t=t.parent.parent):(t===t.parent.left&&be(e,t=t.parent),t.parent.color=0,t.parent.parent.color=1,ye(e,t.parent.parent))}e.root.color=0}function Me(e,t,n,i){for(;t!==e.root&&t!==de;)t.parent.left===t&&(t.parent.size_left+=n,t.parent.lf_left+=i),t=t.parent}function Ce(e,t){var n=0,i=0;if(t!==e.root){if(0===n){for(;t!==e.root&&t===t.parent.right;)t=t.parent;if(t===e.root)return;n=ge((t=t.parent).left)-t.size_left,i=me(t.left)-t.lf_left,t.size_left+=n,t.lf_left+=i}for(;t!==e.root&&(0!==n||0!==i);)t.parent.left===t&&(t.parent.size_left+=n,t.parent.lf_left+=i),t=t.parent}}de.parent=de,de.left=de,de.right=de,de.color=0;var Se=65535;function Le(e){var t;return(t=e[e.length-1]<65536?new Uint16Array(e.length):new Uint32Array(e.length)).set(e,0),t}var Ie=function(e,t,n,i,o){this.lineStarts=e,this.cr=t,this.lf=n,this.crlf=i,this.isBasicASCII=o};function Ne(e,t){void 0===t&&(t=!0);for(var n=[0],i=1,o=0,r=e.length;o=0;t--){var n=this._cache[t];if(n.nodeStartOffset<=e&&n.nodeStartOffset+n.node.piece.length>=e)return n}return null},e.prototype.get2=function(e){for(var t=this._cache.length-1;t>=0;t--){var n=this._cache[t];if(n.nodeStartLineNumber&&n.nodeStartLineNumber=e)return n}return null},e.prototype.set=function(e){this._cache.length>=this._limit&&this._cache.shift(),this._cache.push(e)},e.prototype.valdiate=function(e){for(var t=!1,n=0;n=e)&&(this._cache[n]=null,t=!0)}if(t){var o=[];for(n=0;n0){e[o].lineStarts||(e[o].lineStarts=Ne(e[o].buffer));var s=new De(o+1,{line:0,column:0},{line:e[o].lineStarts.length-1,column:e[o].buffer.length-e[o].lineStarts[e[o].lineStarts.length-1]},e[o].lineStarts.length-1,e[o].buffer.length);this._buffers.push(e[o]),i=this.rbInsertRight(i,s)}this._searchCache=new Te(1),this._lastVisitedLine={lineNumber:0,value:null},this.computeBufferMetadata()},e.prototype.normalizeEOL=function(e){var t=this,n=65535-Math.floor(21845),i=2*n,o="",r=0,s=[];if(this.iterate(this.root,(function(a){var u=t.getNodeContent(a),l=u.length;if(r<=n||r+l0){var a=o.replace(/\r\n|\r|\n/g,e);s.push(new ke(a,Ne(a)))}this.create(s,e,!0)},e.prototype.getEOL=function(){return this._EOL},e.prototype.setEOL=function(e){this._EOL=e,this._EOLLength=this._EOL.length,this.normalizeEOL(e)},e.prototype.getOffsetAt=function(e,t){for(var n=0,i=this.root;i!==de;)if(i.left!==de&&i.lf_left+1>=e)i=i.left;else{if(i.lf_left+i.piece.lineFeedCnt+1>=e)return(n+=i.size_left)+(this.getAccumulatedValue(i,e-i.lf_left-2)+t-1);e-=i.lf_left+i.piece.lineFeedCnt,n+=i.size_left+i.piece.length,i=i.right}return n},e.prototype.getPositionAt=function(e){e=Math.floor(e),e=Math.max(0,e);for(var t=this.root,n=0,i=e;t!==de;)if(0!==t.size_left&&t.size_left>=e)t=t.left;else{if(t.size_left+t.piece.length>=e){var o=this.getIndexOf(t,e-t.size_left);if(n+=t.lf_left+o.index,0===o.index){var r=i-this.getOffsetAt(n+1,1);return new J.y(n+1,r+1)}return new J.y(n+1,o.remainder+1)}if(e-=t.size_left+t.piece.length,n+=t.lf_left+t.piece.lineFeedCnt,t.right===de)return r=i-e-this.getOffsetAt(n+1,1),new J.y(n+1,r+1);t=t.right}return new J.y(1,1)},e.prototype.getValueInRange=function(e,t){if(e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn)return"";var n=this.nodeAt2(e.startLineNumber,e.startColumn),i=this.nodeAt2(e.endLineNumber,e.endColumn),o=this.getValueInRange2(n,i);return t?t===this._EOL&&this._EOLNormalized&&t===this.getEOL()&&this._EOLNormalized?o:o.replace(/\r\n|\r|\n/g,t):o},e.prototype.getValueInRange2=function(e,t){if(e.node===t.node){var n=e.node,i=this._buffers[n.piece.bufferIndex].buffer,o=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);return i.substring(o+e.remainder,o+t.remainder)}var r=e.node,s=this._buffers[r.piece.bufferIndex].buffer,a=this.offsetInBuffer(r.piece.bufferIndex,r.piece.start),u=s.substring(a+e.remainder,a+r.piece.length);for(r=r.next();r!==de;){var l=this._buffers[r.piece.bufferIndex].buffer,c=this.offsetInBuffer(r.piece.bufferIndex,r.piece.start);if(r===t.node){u+=l.substring(c,c+t.remainder);break}u+=l.substr(c,r.piece.length),r=r.next()}return u},e.prototype.getLinesContent=function(){return this.getContentOfSubTree(this.root).split(/\r\n|\r|\n/)},e.prototype.getLength=function(){return this._length},e.prototype.getLineCount=function(){return this._lineCnt},e.prototype.getLineContent=function(e){return this._lastVisitedLine.lineNumber===e||(this._lastVisitedLine.lineNumber=e,e===this._lineCnt?this._lastVisitedLine.value=this.getLineRawContent(e):this._EOLNormalized?this._lastVisitedLine.value=this.getLineRawContent(e,this._EOLLength):this._lastVisitedLine.value=this.getLineRawContent(e).replace(/(\r\n|\r|\n)$/,"")),this._lastVisitedLine.value},e.prototype.getLineCharCode=function(e,t){var n=this.nodeAt2(e,t+1);if(n.remainder===n.node.piece.length){var i=n.node.next();if(!i)return 0;var o=this._buffers[i.piece.bufferIndex],r=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);return o.buffer.charCodeAt(r)}o=this._buffers[n.node.piece.bufferIndex];var s=(r=this.offsetInBuffer(n.node.piece.bufferIndex,n.node.piece.start))+n.remainder;return o.buffer.charCodeAt(s)},e.prototype.getLineLength=function(e){if(e===this.getLineCount()){var t=this.getOffsetAt(e,1);return this.getLength()-t}return this.getOffsetAt(e+1,1)-this.getOffsetAt(e,1)-this._EOLLength},e.prototype.findMatchesInNode=function(e,t,n,i,o,r,s,a,u,l,c){var h,f=this._buffers[e.piece.bufferIndex],p=this.offsetInBuffer(e.piece.bufferIndex,e.piece.start),g=this.offsetInBuffer(e.piece.bufferIndex,o),m=this.offsetInBuffer(e.piece.bufferIndex,r);t.reset(g);var v={line:0,column:0};do{if(h=t.next(f.buffer)){if(h.index>=m)return l;this.positionInBuffer(e,h.index-p,v);var y=this.getLineFeedCnt(e.piece.bufferIndex,o,v),b=v.line===o.line?v.column-o.column+i:v.column+1,_=b+h[0].length;if(c[l++]=(0,ce.dr)(new d.Q(n+y,b,n+y,_),h,a),h.index+h[0].length>=m)return l;if(l>=u)return l}}while(h);return l},e.prototype.findMatchesLineByLine=function(e,t,n,i){var o=[],r=0,s=new ce.W5(t.wordSeparators,t.regex),a=this.nodeAt2(e.startLineNumber,e.startColumn);if(null===a)return[];var u=this.nodeAt2(e.endLineNumber,e.endColumn);if(null===u)return[];var l=this.positionInBuffer(a.node,a.remainder),c=this.positionInBuffer(u.node,u.remainder);if(a.node===u.node)return this.findMatchesInNode(a.node,s,e.startLineNumber,e.startColumn,l,c,t,n,i,r,o),o;for(var h=e.startLineNumber,d=a.node;d!==u.node;){var f=this.getLineFeedCnt(d.piece.bufferIndex,l,d.piece.end);if(f>=1){var p=this._buffers[d.piece.bufferIndex].lineStarts,g=this.offsetInBuffer(d.piece.bufferIndex,d.piece.start),m=p[l.line+f],v=h===e.startLineNumber?e.startColumn:1;if((r=this.findMatchesInNode(d,s,h,v,l,this.positionInBuffer(d,m-g),t,n,i,r,o))>=i)return o;h+=f}var y=h===e.startLineNumber?e.startColumn-1:0;if(h===e.endLineNumber){var b=this.getLineContent(h).substring(y,e.endColumn-1);return r=this._findMatchesInLine(t,s,b,e.endLineNumber,y,r,o,n,i),o}if((r=this._findMatchesInLine(t,s,this.getLineContent(h).substr(y),h,y,r,o,n,i))>=i)return o;h++,d=(a=this.nodeAt2(h,1)).node,l=this.positionInBuffer(a.node,a.remainder)}if(h===e.endLineNumber){var _=h===e.startLineNumber?e.startColumn-1:0;return b=this.getLineContent(h).substring(_,e.endColumn-1),r=this._findMatchesInLine(t,s,b,e.endLineNumber,_,r,o,n,i),o}var w=h===e.startLineNumber?e.startColumn:1;return r=this.findMatchesInNode(u.node,s,h,w,l,c,t,n,i,r,o),o},e.prototype._findMatchesInLine=function(e,t,n,i,o,s,a,u,l){var c,h=e.wordSeparators;if(!u&&e.simpleSearch){for(var f=e.simpleSearch,p=f.length,g=n.length,m=-p;-1!==(m=n.indexOf(f,m+p));)if((!h||(0,ce.wC)(h,n,g,m,p))&&(a[s++]=new r.Dg(new d.Q(i,m+1+o,i,m+1+p+o),null),s>=l))return s;return s}t.reset(0);do{if((c=t.next(n))&&(a[s++]=(0,ce.dr)(new d.Q(i,c.index+1+o,i,c.index+1+c[0].length+o),c,u),s>=l))return s}while(c);return s},e.prototype.insert=function(e,t,n){if(void 0===n&&(n=!1),this._EOLNormalized=this._EOLNormalized&&n,this._lastVisitedLine.lineNumber=0,this._lastVisitedLine.value=null,this.root!==de){var i=this.nodeAt(e),o=i.node,r=i.remainder,s=i.nodeStartOffset,a=o.piece,u=a.bufferIndex,l=this.positionInBuffer(o,r);if(0===o.piece.bufferIndex&&a.end.line===this._lastChangeBufferPos.line&&a.end.column===this._lastChangeBufferPos.column&&s+a.length===e&&t.lengthe){var c=[],h=new De(a.bufferIndex,l,a.end,this.getLineFeedCnt(a.bufferIndex,l,a.end),this.offsetInBuffer(u,a.end)-this.offsetInBuffer(u,l));if(this.shouldCheckCRLF()&&this.endWithCR(t)&&10===this.nodeCharCodeAt(o,r)){var d={line:h.start.line+1,column:0};h=new De(h.bufferIndex,d,h.end,this.getLineFeedCnt(h.bufferIndex,d,h.end),h.length-1),t+="\n"}if(this.shouldCheckCRLF()&&this.startWithLF(t))if(13===this.nodeCharCodeAt(o,r-1)){var f=this.positionInBuffer(o,r-1);this.deleteNodeTail(o,f),t="\r"+t,0===o.piece.length&&c.push(o)}else this.deleteNodeTail(o,l);else this.deleteNodeTail(o,l);var p=this.createNewPieces(t);h.length>0&&this.rbInsertRight(o,h);for(var g=o,m=0;m=0;u--)a=this.rbInsertLeft(a,s[u]);this.validateCRLFWithPrevNode(a),this.deleteNodes(n)},e.prototype.insertContentToNodeRight=function(e,t){this.adjustCarriageReturnFromNext(e,t)&&(e+="\n");for(var n=this.createNewPieces(e),i=this.rbInsertRight(t,n[0]),o=i,r=1;r=o))break;c=i+1}return n?(n.line=i,n.column=l-r,null):{line:i,column:l-r}},e.prototype.getLineFeedCnt=function(e,t,n){if(0===n.column)return n.line-t.line;var i=this._buffers[e].lineStarts;if(n.line===i.length-1)return n.line-t.line;var o=i[n.line+1],r=i[n.line]+n.column;if(o>r+1)return n.line-t.line;var s=r-1;return 13===this._buffers[e].buffer.charCodeAt(s)?n.line-t.line+1:n.line-t.line},e.prototype.offsetInBuffer=function(e,t){return this._buffers[e].lineStarts[t.line]+t.column},e.prototype.deleteNodes=function(e){for(var t=0;tSe){for(var t=[];e.length>Se;){var n=e.charCodeAt(65534),i=void 0;13===n||n>=55296&&n<=56319?(i=e.substring(0,65534),e=e.substring(65534)):(i=e.substring(0,Se),e=e.substring(Se));var o=Ne(i);t.push(new De(this._buffers.length,{line:0,column:0},{line:o.length-1,column:i.length-o[o.length-1]},o.length-1,i.length)),this._buffers.push(new ke(i,o))}var r=Ne(e);return t.push(new De(this._buffers.length,{line:0,column:0},{line:r.length-1,column:e.length-r[r.length-1]},r.length-1,e.length)),this._buffers.push(new ke(e,r)),t}var s=this._buffers[0].buffer.length,a=Ne(e,!1),u=this._lastChangeBufferPos;if(this._buffers[0].lineStarts[this._buffers[0].lineStarts.length-1]===s&&0!==s&&this.startWithLF(e)&&this.endWithCR(this._buffers[0].buffer)){this._lastChangeBufferPos={line:this._lastChangeBufferPos.line,column:this._lastChangeBufferPos.column+1},u=this._lastChangeBufferPos;for(var l=0;l=e-1)n=n.left;else{if(n.lf_left+n.piece.lineFeedCnt>e-1)return r=this.getAccumulatedValue(n,e-n.lf_left-2),u=this.getAccumulatedValue(n,e-n.lf_left-1),s=this._buffers[n.piece.bufferIndex].buffer,a=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start),l+=n.size_left,this._searchCache.set({node:n,nodeStartOffset:l,nodeStartLineNumber:c-(e-1-n.lf_left)}),s.substring(a+r,a+u-t);if(n.lf_left+n.piece.lineFeedCnt===e-1){r=this.getAccumulatedValue(n,e-n.lf_left-2),s=this._buffers[n.piece.bufferIndex].buffer,a=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start),i=s.substring(a+r,a+n.piece.length);break}e-=n.lf_left+n.piece.lineFeedCnt,l+=n.size_left+n.piece.length,n=n.right}for(n=n.next();n!==de;){if(s=this._buffers[n.piece.bufferIndex].buffer,n.piece.lineFeedCnt>0)return u=this.getAccumulatedValue(n,0),a=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start),i+s.substring(a,a+u-t);a=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start),i+=s.substr(a,n.piece.length),n=n.next()}return i},e.prototype.computeBufferMetadata=function(){for(var e=this.root,t=1,n=0;e!==de;)t+=e.lf_left+e.piece.lineFeedCnt,n+=e.size_left+e.piece.length,e=e.right;this._lineCnt=t,this._length=n,this._searchCache.valdiate(this._length)},e.prototype.getIndexOf=function(e,t){var n=e.piece,i=this.positionInBuffer(e,t),o=i.line-n.start.line;if(this.offsetInBuffer(n.bufferIndex,n.end)-this.offsetInBuffer(n.bufferIndex,n.start)===t){var r=this.getLineFeedCnt(e.piece.bufferIndex,n.start,i);if(r!==o)return{index:r,remainder:0}}return{index:o,remainder:i.column}},e.prototype.getAccumulatedValue=function(e,t){if(t<0)return 0;var n=e.piece,i=this._buffers[n.bufferIndex].lineStarts,o=n.start.line+t+1;return o>n.end.line?i[n.end.line]+n.end.column-i[n.start.line]-n.start.column:i[o]-i[n.start.line]-n.start.column},e.prototype.deleteNodeTail=function(e,t){var n=e.piece,i=n.lineFeedCnt,o=this.offsetInBuffer(n.bufferIndex,n.end),r=t,s=this.offsetInBuffer(n.bufferIndex,r),a=this.getLineFeedCnt(n.bufferIndex,n.start,r),u=a-i,l=s-o,c=n.length+l;e.piece=new De(n.bufferIndex,n.start,r,a,c),Me(this,e,l,u)},e.prototype.deleteNodeHead=function(e,t){var n=e.piece,i=n.lineFeedCnt,o=this.offsetInBuffer(n.bufferIndex,n.start),r=t,s=this.getLineFeedCnt(n.bufferIndex,r,n.end),a=s-i,u=o-this.offsetInBuffer(n.bufferIndex,r),l=n.length+u;e.piece=new De(n.bufferIndex,r,n.end,s,l),Me(this,e,u,a)},e.prototype.shrinkNode=function(e,t,n){var i=e.piece,o=i.start,r=i.end,s=i.length,a=i.lineFeedCnt,u=t,l=this.getLineFeedCnt(i.bufferIndex,i.start,u),c=this.offsetInBuffer(i.bufferIndex,t)-this.offsetInBuffer(i.bufferIndex,o);e.piece=new De(i.bufferIndex,i.start,u,l,c),Me(this,e,c-s,l-a);var h=new De(i.bufferIndex,n,r,this.getLineFeedCnt(i.bufferIndex,n,r),this.offsetInBuffer(i.bufferIndex,r)-this.offsetInBuffer(i.bufferIndex,n)),d=this.rbInsertRight(e,h);this.validateCRLFWithPrevNode(d)},e.prototype.appendToNode=function(e,t){this.adjustCarriageReturnFromNext(t,e)&&(t+="\n");var n=this.shouldCheckCRLF()&&this.startWithLF(t)&&this.endWithCR(e),i=this._buffers[0].buffer.length;this._buffers[0].buffer+=t;for(var o=Ne(t,!1),r=0;re)t=t.left;else{if(t.size_left+t.piece.length>=e){i+=t.size_left;var o={node:t,remainder:e-t.size_left,nodeStartOffset:i};return this._searchCache.set(o),o}e-=t.size_left+t.piece.length,i+=t.size_left+t.piece.length,t=t.right}return null},e.prototype.nodeAt2=function(e,t){for(var n=this.root,i=0;n!==de;)if(n.left!==de&&n.lf_left>=e-1)n=n.left;else{if(n.lf_left+n.piece.lineFeedCnt>e-1){var o=this.getAccumulatedValue(n,e-n.lf_left-2),r=this.getAccumulatedValue(n,e-n.lf_left-1);return i+=n.size_left,{node:n,remainder:Math.min(o+t-1,r),nodeStartOffset:i}}if(n.lf_left+n.piece.lineFeedCnt===e-1){if((o=this.getAccumulatedValue(n,e-n.lf_left-2))+t-1<=n.piece.length)return{node:n,remainder:o+t-1,nodeStartOffset:i};t-=n.piece.length-o;break}e-=n.lf_left+n.piece.lineFeedCnt,i+=n.size_left+n.piece.length,n=n.right}for(n=n.next();n!==de;){if(n.piece.lineFeedCnt>0){r=this.getAccumulatedValue(n,0);var s=this.offsetOfNode(n);return{node:n,remainder:Math.min(t-1,r),nodeStartOffset:s}}if(n.piece.length>=t-1)return{node:n,remainder:t-1,nodeStartOffset:this.offsetOfNode(n)};t-=n.piece.length,n=n.next()}return null},e.prototype.nodeCharCodeAt=function(e,t){if(e.piece.lineFeedCnt<1)return-1;var n=this._buffers[e.piece.bufferIndex],i=this.offsetInBuffer(e.piece.bufferIndex,e.piece.start)+t;return n.buffer.charCodeAt(i)},e.prototype.offsetOfNode=function(e){if(!e)return 0;for(var t=e.size_left;e!==this.root;)e.parent.right===e&&(t+=e.parent.size_left+e.parent.piece.length),e=e.parent;return t},e.prototype.shouldCheckCRLF=function(){return!(this._EOLNormalized&&"\n"===this._EOL)},e.prototype.startWithLF=function(e){if("string"==typeof e)return 10===e.charCodeAt(0);if(e===de||0===e.piece.lineFeedCnt)return!1;var t=e.piece,n=this._buffers[t.bufferIndex].lineStarts,i=t.start.line,o=n[i]+t.start.column;return i!==n.length-1&&!(n[i+1]>o+1)&&10===this._buffers[t.bufferIndex].buffer.charCodeAt(o)},e.prototype.endWithCR=function(e){return"string"==typeof e?13===e.charCodeAt(e.length-1):e!==de&&0!==e.piece.lineFeedCnt&&13===this.nodeCharCodeAt(e,e.piece.length-1)},e.prototype.validateCRLFWithPrevNode=function(e){if(this.shouldCheckCRLF()&&this.startWithLF(e)){var t=e.prev();this.endWithCR(t)&&this.fixCRLF(t,e)}},e.prototype.validateCRLFWithNextNode=function(e){if(this.shouldCheckCRLF()&&this.endWithCR(e)){var t=e.next();this.startWithLF(t)&&this.fixCRLF(e,t)}},e.prototype.fixCRLF=function(e,t){var n,i=[],o=this._buffers[e.piece.bufferIndex].lineStarts;n=0===e.piece.end.column?{line:e.piece.end.line-1,column:o[e.piece.end.line]-o[e.piece.end.line-1]-1}:{line:e.piece.end.line,column:e.piece.end.column-1};var r=e.piece.length-1,s=e.piece.lineFeedCnt-1;e.piece=new De(e.piece.bufferIndex,e.piece.start,n,s,r),Me(this,e,-1,-1),0===e.piece.length&&i.push(e);var a={line:t.piece.start.line+1,column:0},u=t.piece.length-1,l=this.getLineFeedCnt(t.piece.bufferIndex,a,t.piece.end);t.piece=new De(t.piece.bufferIndex,a,t.piece.end,l,u),Me(this,t,-1,-1),0===t.piece.length&&i.push(t);var c=this.createNewPieces("\r\n");this.rbInsertRight(e,c[0]);for(var h=0;h0){m.sort((function(e,t){return t.lineNumber-e.lineNumber})),C=[],u=0;for(var S=m.length;u0&&m[u-1].lineNumber===y)){var L=m[u].oldContent,I=this.getLineContent(y);0!==I.length&&I!==L&&-1===w.firstNonWhitespaceIndex(I)&&C.push(y)}}return new r.F4(_,M,C)},e.prototype._reduceOperations=function(e){return e.length<1e3?e:[this._toSingleEditOperation(e)]},e.prototype._toSingleEditOperation=function(e){for(var t=!1,n=e[0].range,i=e[e.length-1].range,o=new d.Q(n.startLineNumber,n.startColumn,i.endLineNumber,i.endColumn),s=n.startLineNumber,a=n.startColumn,u=[],l=0,c=e.length;l0){var h=a.lines.length,f=a.lines[0],p=a.lines[h-1];c=1===h?new d.Q(u,l,u,l+f.length):new d.Q(u,l,u+h-1,p.length+1)}else c=new d.Q(u,l,u,l);t=c.endLineNumber,n=c.endColumn,i.push(c),o=a}return i},e._sortOpsAscending=function(e,t){var n=d.Q.compareRangesUsingEnds(e.range,t.range);return 0===n?e.sortIndex-t.sortIndex:n},e._sortOpsDescending=function(e,t){var n=d.Q.compareRangesUsingEnds(e.range,t.range);return 0===n?t.sortIndex-e.sortIndex:-n},e}(),je=function(){function e(e,t,n,i,o,r,s,a){this._chunks=e,this._bom=t,this._cr=n,this._lf=i,this._crlf=o,this._containsRTL=r,this._isBasicASCII=s,this._normalizeEOL=a}return e.prototype._getEOL=function(e){var t=this._cr+this._lf+this._crlf,n=this._cr+this._crlf;return 0===t?e===r.of.LF?"\n":"\r\n":n>t/2?"\r\n":"\n"},e.prototype.create=function(e){var t=this._getEOL(e),n=this._chunks;if(this._normalizeEOL&&("\r\n"===t&&(this._cr>0||this._lf>0)||"\n"===t&&(this._cr>0||this._crlf>0)))for(var i=0,o=n.length;i=55296&&t<=56319?(this._acceptChunk1(e.substr(0,e.length-1),!1),this._hasPreviousChar=!0,this._previousChar=t):(this._acceptChunk1(e,!1),this._hasPreviousChar=!1,this._previousChar=t)}},e.prototype._acceptChunk1=function(e,t){(t||0!==e.length)&&(this._hasPreviousChar?this._acceptChunk2(String.fromCharCode(this._previousChar)+e):this._acceptChunk2(e))},e.prototype._acceptChunk2=function(e){var t=function(e,t){e.length=0,e[0]=0;for(var n=1,i=0,o=0,r=0,s=!0,a=0,u=t.length;a126)&&(s=!1)}var c=new Ie(Le(e),i,o,r,s);return e.length=0,c}(this._tmpLineStarts,e);this.chunks.push(new ke(e,t.lineStarts)),this.cr+=t.cr,this.lf+=t.lf,this.crlf+=t.crlf,this.isBasicASCII&&(this.isBasicASCII=t.isBasicASCII),this.isBasicASCII||this.containsRTL||(this.containsRTL=w.containsRTL(e))},e.prototype.finish=function(e){return void 0===e&&(e=!0),this._finish(),new je(this.chunks,this.BOM,this.cr,this.lf,this.crlf,this.containsRTL,this.isBasicASCII,e)},e.prototype._finish=function(){if(0===this.chunks.length&&this._acceptChunk1("",!0),this._hasPreviousChar){this._hasPreviousChar=!1;var e=this.chunks[this.chunks.length-1];e.buffer+=String.fromCharCode(this._previousChar);var t=Ne(e.buffer);e.lineStarts=t,13===this._previousChar&&this.cr++}},e}(),Re=(xe=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}xe(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});function Pe(e,t){return("string"==typeof e?(n=e,i=new Oe,i.acceptChunk(n),i.finish()):e).create(t);var n,i}var ze=0,We=function(e){function t(n,a,u,l){void 0===l&&(l=null);var c=e.call(this)||this;c._onWillDispose=c._register(new o.vl),c.onWillDispose=c._onWillDispose.event,c._onDidChangeDecorations=c._register(new Ze),c.onDidChangeDecorations=c._onDidChangeDecorations.event,c._onDidChangeLanguage=c._register(new o.vl),c.onDidChangeLanguage=c._onDidChangeLanguage.event,c._onDidChangeLanguageConfiguration=c._register(new o.vl),c.onDidChangeLanguageConfiguration=c._onDidChangeLanguageConfiguration.event,c._onDidChangeTokens=c._register(new o.vl),c.onDidChangeTokens=c._onDidChangeTokens.event,c._onDidChangeOptions=c._register(new o.vl),c.onDidChangeOptions=c._onDidChangeOptions.event,c._eventEmitter=c._register(new Ge),ze++,c.id="$model"+ze,c.isForSimpleWidget=a.isForSimpleWidget,c._associatedResource=null==l?i.A.parse("inmemory://model/"+ze):l,c._attachedEditorCount=0,c._buffer=Pe(n,a.defaultEOL),c._options=t.resolveOptions(c._buffer,a);var f,p=c._buffer.getLineCount(),g=c._buffer.getValueLengthInRange(new d.Q(1,1,p,c._buffer.getLineLength(p)+1),r.kf.TextDefined);return a.largeFileOptimizations?c._isTooLargeForTokenization=g>t.LARGE_FILE_SIZE_THRESHOLD||p>t.LARGE_FILE_LINE_COUNT_THRESHOLD:c._isTooLargeForTokenization=!1,c._isTooLargeForSyncing=g>t.MODEL_SYNC_LIMIT,c._setVersionId(1),c._isDisposed=!1,c._isDisposing=!1,c._languageIdentifier=u||Q.z8,c._tokenizationListener=s.dG.onDidChange((function(e){-1!==e.changedLanguages.indexOf(c._languageIdentifier.language)&&(c._resetTokenizationState(),c.emitModelTokensChangedEvent({ranges:[{fromLineNumber:1,toLineNumber:c.getLineCount()}]}),c._shouldAutoTokenize()&&c._warmUpTokens())})),c._revalidateTokensTimeout=-1,c._languageRegistryListener=X.cx.onDidChange((function(e){e.languageIdentifier.id===c._languageIdentifier.id&&c._onDidChangeLanguageConfiguration.fire({})})),c._resetTokenizationState(),c._instanceId=(f=ze,(f%=52)<26?String.fromCharCode(97+f):String.fromCharCode(65+f-26)),c._lastDecorationId=0,c._decorations=Object.create(null),c._decorationsTree=new Fe,c._commandManager=new h(c),c._isUndoing=!1,c._isRedoing=!1,c._trimAutoWhitespaceLines=null,c}return Re(t,e),t.createFromString=function(e,n,i,o){return void 0===n&&(n=t.DEFAULT_CREATION_OPTIONS),void 0===i&&(i=null),void 0===o&&(o=null),new t(e,n,i,o)},t.resolveOptions=function(e,t){if(t.detectIndentation){var n=ue(e,t.tabSize,t.insertSpaces);return new r.X2({tabSize:n.tabSize,insertSpaces:n.insertSpaces,trimAutoWhitespace:t.trimAutoWhitespace,defaultEOL:t.defaultEOL})}return new r.X2({tabSize:t.tabSize,insertSpaces:t.insertSpaces,trimAutoWhitespace:t.trimAutoWhitespace,defaultEOL:t.defaultEOL})},t.prototype.onDidChangeRawContentFast=function(e){return this._eventEmitter.fastEvent((function(t){return e(t.rawContentChangedEvent)}))},t.prototype.onDidChangeRawContent=function(e){return this._eventEmitter.slowEvent((function(t){return e(t.rawContentChangedEvent)}))},t.prototype.onDidChangeContent=function(e){return this._eventEmitter.slowEvent((function(t){return e(t.contentChangedEvent)}))},t.prototype.dispose=function(){this._isDisposing=!0,this._onWillDispose.fire(),this._commandManager=null,this._decorations=null,this._decorationsTree=null,this._tokenizationListener.dispose(),this._languageRegistryListener.dispose(),this._clearTimers(),this._tokens=null,this._isDisposed=!0,this._buffer=null,e.prototype.dispose.call(this),this._isDisposing=!1},t.prototype._assertNotDisposed=function(){if(this._isDisposed)throw new Error("Model is disposed!")},t.prototype._emitContentChangedEvent=function(e,t){this._isDisposing||this._eventEmitter.fire(new _(e,t))},t.prototype.setValue=function(e){if(this._assertNotDisposed(),null!==e){var t=Pe(e,this._options.defaultEOL);this.setValueFromTextBuffer(t)}},t.prototype._createContentChanged2=function(e,t,n,i,o,r,s){return{changes:[{range:e,rangeOffset:t,rangeLength:n,text:i}],eol:this._buffer.getEOL(),versionId:this.getVersionId(),isUndoing:o,isRedoing:r,isFlush:s}},t.prototype.setValueFromTextBuffer=function(e){if(this._assertNotDisposed(),null!==e){var t=this.getFullModelRange(),n=this.getValueLengthInRange(t),i=this.getLineCount(),o=this.getLineMaxColumn(i);this._buffer=e,this._increaseVersionId(),this._resetTokenizationState(),this._decorations=Object.create(null),this._decorationsTree=new Fe,this._commandManager=new h(this),this._trimAutoWhitespaceLines=null,this._emitContentChangedEvent(new b([new p],this._versionId,!1,!1),this._createContentChanged2(new d.Q(1,1,i,o),0,n,this.getValue(),!1,!1,!0))}},t.prototype.setEOL=function(e){this._assertNotDisposed();var t=e===r.WU.CRLF?"\r\n":"\n";if(this._buffer.getEOL()!==t){var n=this.getFullModelRange(),i=this.getValueLengthInRange(n),o=this.getLineCount(),s=this.getLineMaxColumn(o);this._onBeforeEOLChange(),this._buffer.setEOL(t),this._increaseVersionId(),this._onAfterEOLChange(),this._emitContentChangedEvent(new b([new y],this._versionId,!1,!1),this._createContentChanged2(new d.Q(1,1,o,s),0,i,this.getValue(),!1,!1,!1))}},t.prototype._onBeforeEOLChange=function(){var e=this.getVersionId(),t=this._decorationsTree.search(0,!1,!1,e);this._ensureNodesHaveRanges(t)},t.prototype._onAfterEOLChange=function(){for(var e=this.getVersionId(),t=this._decorationsTree.collectNodesPostOrder(),n=0,i=t.length;n0},t.prototype.getAttachedEditorCount=function(){return this._attachedEditorCount},t.prototype.isTooLargeForSyncing=function(){return this._isTooLargeForSyncing},t.prototype.isTooLargeForTokenization=function(){return this._isTooLargeForTokenization},t.prototype.isDisposed=function(){return this._isDisposed},t.prototype.isDominatedByLongLines=function(){if(this._assertNotDisposed(),this.isTooLargeForTokenization())return!1;for(var e=0,t=0,n=this._buffer.getLineCount(),i=1;i<=n;i++){var o=this._buffer.getLineLength(i);o>=1e4?t+=o:e+=o}return t>e},Object.defineProperty(t.prototype,"uri",{get:function(){return this._associatedResource},enumerable:!0,configurable:!0}),t.prototype.getOptions=function(){return this._assertNotDisposed(),this._options},t.prototype.updateOptions=function(e){this._assertNotDisposed();var t=void 0!==e.tabSize?e.tabSize:this._options.tabSize,n=void 0!==e.insertSpaces?e.insertSpaces:this._options.insertSpaces,i=void 0!==e.trimAutoWhitespace?e.trimAutoWhitespace:this._options.trimAutoWhitespace,o=new r.X2({tabSize:t,insertSpaces:n,defaultEOL:this._options.defaultEOL,trimAutoWhitespace:i});if(!this._options.equals(o)){var s=this._options.createChangeEvent(o);this._options=o,this._onDidChangeOptions.fire(s)}},t.prototype.detectIndentation=function(e,t){this._assertNotDisposed();var n=ue(this._buffer,t,e);this.updateOptions({insertSpaces:n.insertSpaces,tabSize:n.tabSize})},t._normalizeIndentationFromWhitespace=function(e,t,n){for(var i=0,o=0;othis.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineContent(e)},t.prototype.getLineLength=function(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineLength(e)},t.prototype.getLinesContent=function(){return this._assertNotDisposed(),this._buffer.getLinesContent()},t.prototype.getEOL=function(){return this._assertNotDisposed(),this._buffer.getEOL()},t.prototype.getLineMinColumn=function(e){return this._assertNotDisposed(),1},t.prototype.getLineMaxColumn=function(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineLength(e)+1},t.prototype.getLineFirstNonWhitespaceColumn=function(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineFirstNonWhitespaceColumn(e)},t.prototype.getLineLastNonWhitespaceColumn=function(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineLastNonWhitespaceColumn(e)},t.prototype._validateRangeRelaxedNoAllocations=function(e){var t,n,i=this._buffer.getLineCount(),o=e.startLineNumber,r=e.startColumn;o<1?(t=1,n=1):o>i?(t=i,n=this.getLineMaxColumn(t)):(t=0|o,n=r<=1?1:r>=(c=this.getLineMaxColumn(t))?c:0|r);var s,a,u=e.endLineNumber,l=e.endColumn;if(u<1)s=1,a=1;else if(u>i)s=i,a=this.getLineMaxColumn(s);else{var c;s=0|u,a=l<=1?1:l>=(c=this.getLineMaxColumn(s))?c:0|l}return o===t&&r===n&&u===s&&l===a&&e instanceof d.Q&&!(e instanceof f.L)?e:new d.Q(t,n,s,a)},t.prototype._isValidPosition=function(e,t,n){if(isNaN(e))return!1;if(e<1)return!1;if(e>this._buffer.getLineCount())return!1;if(isNaN(t))return!1;if(t<1)return!1;if(t>this.getLineMaxColumn(e))return!1;if(n&&t>1){var i=this._buffer.getLineCharCode(e,t-2);if(w.isHighSurrogate(i))return!1}return!0},t.prototype._validatePosition=function(e,t,n){var i=Math.floor("number"!=typeof e||isNaN(e)?1:e),o=Math.floor("number"!=typeof t||isNaN(t)?1:t),r=this._buffer.getLineCount();if(i<1)return new J.y(1,1);if(i>r)return new J.y(r,this.getLineMaxColumn(r));if(o<=1)return new J.y(i,1);var s=this.getLineMaxColumn(i);if(o>=s)return new J.y(i,s);if(n){var a=this._buffer.getLineCharCode(i,o-2);if(w.isHighSurrogate(a))return new J.y(i,o-1)}return new J.y(i,o)},t.prototype.validatePosition=function(e){return this._assertNotDisposed(),e instanceof J.y&&this._isValidPosition(e.lineNumber,e.column,!0)?e:this._validatePosition(e.lineNumber,e.column,!0)},t.prototype._isValidRange=function(e,t){var n=e.startLineNumber,i=e.startColumn,o=e.endLineNumber,r=e.endColumn;if(!this._isValidPosition(n,i,!1))return!1;if(!this._isValidPosition(o,r,!1))return!1;if(t){var s=i>1?this._buffer.getLineCharCode(n,i-2):0,a=r>1&&r<=this._buffer.getLineLength(o)?this._buffer.getLineCharCode(o,r-2):0,u=w.isHighSurrogate(s),l=w.isHighSurrogate(a);return!u&&!l}return!0},t.prototype.validateRange=function(e){if(this._assertNotDisposed(),e instanceof d.Q&&!(e instanceof f.L)&&this._isValidRange(e,!0))return e;var t=this._validatePosition(e.startLineNumber,e.startColumn,!1),n=this._validatePosition(e.endLineNumber,e.endColumn,!1),i=t.lineNumber,o=t.column,r=n.lineNumber,s=n.column,a=o>1?this._buffer.getLineCharCode(i,o-2):0,u=s>1&&s<=this._buffer.getLineLength(r)?this._buffer.getLineCharCode(r,s-2):0,l=w.isHighSurrogate(a),c=w.isHighSurrogate(u);return l||c?i===r&&o===s?new d.Q(i,o-1,r,s-1):l&&c?new d.Q(i,o-1,r,s+1):l?new d.Q(i,o-1,r,s):new d.Q(i,o,r,s+1):new d.Q(i,o,r,s)},t.prototype.modifyPosition=function(e,t){this._assertNotDisposed();var n=this.getOffsetAt(e)+t;return this.getPositionAt(Math.min(this._buffer.getLength(),Math.max(0,n)))},t.prototype.getFullModelRange=function(){this._assertNotDisposed();var e=this.getLineCount();return new d.Q(1,1,e,this.getLineMaxColumn(e))},t.prototype.findMatchesLineByLine=function(e,t,n,i){return this._buffer.findMatchesLineByLine(e,t,n,i)},t.prototype.findMatches=function(e,t,n,i,o,r,s){var a;if(void 0===s&&(s=999),this._assertNotDisposed(),a=d.Q.isIRange(t)?this.validateRange(t):this.getFullModelRange(),!n&&e.indexOf("\n")<0){var u=new ce.lt(e,n,i,o).parseSearchRequest();return u?this.findMatchesLineByLine(a,u,r,s):[]}return ce.hB.findMatches(this,new ce.lt(e,n,i,o),a,r,s)},t.prototype.findNextMatch=function(e,t,n,i,o,r){this._assertNotDisposed();var s=this.validatePosition(t);if(!n&&e.indexOf("\n")<0){var a=new ce.lt(e,n,i,o).parseSearchRequest(),u=this.getLineCount(),l=new d.Q(s.lineNumber,s.column,u,this.getLineMaxColumn(u)),c=this.findMatchesLineByLine(l,a,r,1);return ce.hB.findNextMatch(this,new ce.lt(e,n,i,o),s,r),c.length>0?c[0]:(l=new d.Q(1,1,s.lineNumber,this.getLineMaxColumn(s.lineNumber)),(c=this.findMatchesLineByLine(l,a,r,1)).length>0?c[0]:null)}return ce.hB.findNextMatch(this,new ce.lt(e,n,i,o),s,r)},t.prototype.findPreviousMatch=function(e,t,n,i,o,r){this._assertNotDisposed();var s=this.validatePosition(t);return ce.hB.findPreviousMatch(this,new ce.lt(e,n,i,o),s,r)},t.prototype.pushStackElement=function(){this._commandManager.pushStackElement()},t.prototype.pushEOL=function(e){if(("\n"===this.getEOL()?r.WU.LF:r.WU.CRLF)!==e)try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._commandManager.pushEOL(e)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}},t.prototype.pushEditOperations=function(e,t,n){try{return this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._pushEditOperations(e,t,n)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}},t.prototype._pushEditOperations=function(e,t,n){var i=this;if(this._options.trimAutoWhitespace&&this._trimAutoWhitespaceLines){for(var o=t.map((function(e){return{range:i.validateRange(e.range),text:e.text}})),r=!0,s=0,a=e.length;su.endLineNumber,p=u.startLineNumber>y.endLineNumber;if(!f&&!p){l=!0;break}}if(!l){r=!1;break}}if(r)for(s=0,a=this._trimAutoWhitespaceLines.length;sy.endLineNumber||g===y.startLineNumber&&y.startColumn===m&&y.isEmpty()&&b&&b.length>0&&"\n"===b.charAt(0)||g===y.startLineNumber&&1===y.startColumn&&y.isEmpty()&&b&&b.length>0&&"\n"===b.charAt(b.length-1))){v=!1;break}}v&&t.push({range:new d.Q(g,1,g,m),text:null})}this._trimAutoWhitespaceLines=null}return this._commandManager.pushEditOperation(e,t,n)},t.prototype.applyEdits=function(e){try{return this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._applyEdits(e)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}},t._eolCount=function(e){for(var t=0,n=0,i=0,o=e.length;i=0;S--){var L=p+S,I=s-l-C+L;u.push(new g(L,this.getLineContent(I)))}if(M<_){var N=p+M;u.push(new m(N+1,y))}if(Mthis.getLineCount()?[]:this.getLinesDecorations(e,e,t,n)},t.prototype.getLinesDecorations=function(e,t,n,i){void 0===n&&(n=0),void 0===i&&(i=!1);var o=this.getLineCount(),r=Math.min(o,Math.max(1,e)),s=Math.min(o,Math.max(1,t)),a=this.getLineMaxColumn(s);return this._getDecorationsInRange(new d.Q(r,1,s,a),n,i)},t.prototype.getDecorationsInRange=function(e,t,n){void 0===t&&(t=0),void 0===n&&(n=!1);var i=this.validateRange(e);return this._getDecorationsInRange(i,t,n)},t.prototype.getOverviewRulerDecorations=function(e,t){void 0===e&&(e=0),void 0===t&&(t=!1);var n=this.getVersionId(),i=this._decorationsTree.search(e,t,!0,n);return this._ensureNodesHaveRanges(i)},t.prototype.getAllDecorations=function(e,t){void 0===e&&(e=0),void 0===t&&(t=!1);var n=this.getVersionId(),i=this._decorationsTree.search(e,t,!1,n);return this._ensureNodesHaveRanges(i)},t.prototype._getDecorationsInRange=function(e,t,n){var i=this._buffer.getOffsetAt(e.startLineNumber,e.startColumn),o=this._buffer.getOffsetAt(e.endLineNumber,e.endColumn),r=this.getVersionId(),s=this._decorationsTree.intervalSearch(i,o,t,n,r);return this._ensureNodesHaveRanges(s)},t.prototype._ensureNodesHaveRanges=function(e){for(var t=0,n=e.length;t0)for(;o>0&&s>=1;){var u=this.getLineFirstNonWhitespaceColumn(s);if(0!==u){if(u=0;c--)l=(f=this._tokens._tokenizeText(this._buffer,r[c],l))?f.endState.clone():a.clone();var h=Math.floor(.4*this._tokens.inValidLineStartIndex);t=Math.min(this.getLineCount(),t+h);for(var d=e;d<=t;d++){var f,p=this.getLineContent(d);(f=this._tokens._tokenizeText(this._buffer,p,l))?(this._tokens._setTokens(this._tokens.languageIdentifier.id,d-1,p.length,f.tokens),this._tokens._setIsInvalid(d-1,!1),this._tokens._setState(d-1,l),l=f.endState.clone(),i.registerChangedTokens(d)):l=a.clone()}var g=i.build();g&&this._onDidChangeTokens.fire(g)}}},t.prototype.forceTokenization=function(e){if(e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");var t=new se;this._tokens._updateTokensUntilLine(this._buffer,t,e);var n=t.build();n&&this._onDidChangeTokens.fire(n)},t.prototype.isCheapToTokenize=function(e){return this._tokens.isCheapToTokenize(e)},t.prototype.tokenizeIfCheap=function(e){this.isCheapToTokenize(e)&&this.forceTokenization(e)},t.prototype.getLineTokens=function(e){if(e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._getLineTokens(e)},t.prototype._getLineTokens=function(e){var t=this._buffer.getLineContent(e);return this._tokens.getTokens(this._languageIdentifier.id,e-1,t)},t.prototype.getLanguageIdentifier=function(){return this._languageIdentifier},t.prototype.getModeId=function(){return this._languageIdentifier.language},t.prototype.setMode=function(e){if(this._languageIdentifier.id!==e.id){var t={oldLanguage:this._languageIdentifier.language,newLanguage:e.language};this._languageIdentifier=e,this._resetTokenizationState(),this.emitModelTokensChangedEvent({ranges:[{fromLineNumber:1,toLineNumber:this.getLineCount()}]}),this._onDidChangeLanguage.fire(t),this._onDidChangeLanguageConfiguration.fire({})}},t.prototype.getLanguageIdAtPosition=function(e,t){if(!this._tokens.tokenizationSupport)return this._languageIdentifier.id;var n=this.validatePosition({lineNumber:e,column:t}),i=n.lineNumber,o=n.column,r=this._getLineTokens(i);return r.getLanguageId(r.findTokenIndexAtOffset(o-1))},t.prototype._beginBackgroundTokenization=function(){var e=this;this._shouldAutoTokenize()&&-1===this._revalidateTokensTimeout&&(this._revalidateTokensTimeout=setTimeout((function(){e._revalidateTokensTimeout=-1,e._revalidateTokensNow()}),0))},t.prototype._warmUpTokens=function(){var e=Math.min(100,this.getLineCount());this._revalidateTokensNow(e),this._tokens.hasLinesToTokenize(this._buffer)&&this._beginBackgroundTokenization()},t.prototype._revalidateTokensNow=function(e){void 0===e&&(e=this._buffer.getLineCount());for(var t=new se,n=G.create(!1);this._tokens.hasLinesToTokenize(this._buffer)&&!(n.elapsed()>20)&&!(this._tokens._tokenizeOneLine(this._buffer,t)>=e););this._tokens.hasLinesToTokenize(this._buffer)&&this._beginBackgroundTokenization();var i=t.build();i&&this._onDidChangeTokens.fire(i)},t.prototype.emitModelTokensChangedEvent=function(e){this._isDisposing||this._onDidChangeTokens.fire(e)},t.prototype.getWordAtPosition=function(e){this._assertNotDisposed();var n=this.validatePosition(e),i=this.getLineContent(n.lineNumber),o=this._getLineTokens(n.lineNumber),r=o.findTokenIndexAtOffset(n.column-1),s=t._findLanguageBoundaries(o,r),a=s[0],u=s[1],l=(0,$.Th)(n.column,X.cx.getWordDefinition(o.getLanguageId(r)),i.substring(a,u),a);if(l)return l;if(r>0&&a===n.column-1){var c=t._findLanguageBoundaries(o,r-1),h=c[0],d=c[1],f=(0,$.Th)(n.column,X.cx.getWordDefinition(o.getLanguageId(r-1)),i.substring(h,d),h);if(f)return f}return null},t._findLanguageBoundaries=function(e,t){for(var n,i,o=e.getLanguageId(t),r=t;r>=0&&e.getLanguageId(r)===o;r--)n=e.getStartOffset(r);r=t;for(var s=e.getCount();r0&&n.getStartOffset(o)===e.column-1){a=n.getStartOffset(o),o--;var l,c,h,d=X.cx.getBracketsSupport(n.getLanguageId(o));if(d&&!(0,q.Yo)(n.getStandardTokenType(o)))if(s=Math.max(n.getStartOffset(o),e.column-1-d.maxBracketLength),(l=K.Fu.findPrevBracketInToken(d.reversedRegex,t,i,s,a))&&l.startColumn<=e.column&&e.column<=l.endColumn&&(c=(c=i.substring(l.startColumn-1,l.endColumn-1)).toLowerCase(),h=this._matchFoundBracket(l,d.textIsBracket[c],d.textIsOpenBracket[c])))return h}return null},t.prototype._matchFoundBracket=function(e,t,n){if(!t)return null;var i;if(n){if(i=this._findMatchingBracketDown(t,e.getEndPosition()))return[e,i]}else if(i=this._findMatchingBracketUp(t,e.getStartPosition()))return[e,i];return null},t.prototype._findMatchingBracketUp=function(e,t){for(var n=e.languageIdentifier.id,i=e.reversedRegex,o=-1,r=t.lineNumber;r>=1;r--){var s=this._getLineTokens(r),a=s.getCount(),u=this._buffer.getLineContent(r),l=a-1,c=-1;for(r===t.lineNumber&&(l=s.findTokenIndexAtOffset(t.column-1),c=t.column-1);l>=0;l--){var h=s.getLanguageId(l),d=s.getStandardTokenType(l),f=s.getStartOffset(l),p=s.getEndOffset(l);if(-1===c&&(c=p),h===n&&!(0,q.Yo)(d))for(;;){var g=K.Fu.findPrevBracketInToken(i,r,u,f,c);if(!g)break;var m=u.substring(g.startColumn-1,g.endColumn-1);if((m=m.toLowerCase())===e.open?o++:m===e.close&&o--,0===o)return g;c=g.startColumn-1}c=-1}}return null},t.prototype._findMatchingBracketDown=function(e,t){for(var n=e.languageIdentifier.id,i=e.forwardRegex,o=1,r=t.lineNumber,s=this.getLineCount();r<=s;r++){var a=this._getLineTokens(r),u=a.getCount(),l=this._buffer.getLineContent(r),c=0,h=0;for(r===t.lineNumber&&(c=a.findTokenIndexAtOffset(t.column-1),h=t.column-1);co)throw new Error("Illegal value for lineNumber");for(var r=X.cx.getFoldingRules(this._languageIdentifier.id),s=r&&r.offSide,a=-2,u=-1,l=-2,c=-1,h=function(e){if(-1!==a&&(-2===a||a>e-1)){a=-1,u=-1;for(var t=e-2;t>=0;t--){var n=i._computeIndentLevel(t);if(n>=0){a=t,u=n;break}}}if(-2===l)for(l=-1,c=-1,t=e;t=0){l=t,c=r;break}}},d=-2,f=-1,p=-2,g=-1,m=function(e){if(-2===d){d=-1,f=-1;for(var t=e-2;t>=0;t--){var n=i._computeIndentLevel(t);if(n>=0){d=t,f=n;break}}}if(-1!==p&&(-2===p||p=0){p=t,g=r;break}}},v=0,y=!0,b=0,_=!0,w=0,M=0;y||_;M++){var C=e-M,S=e+M;if(0!==M&&(C<1||Co||S>n)&&(_=!1),M>5e4&&(y=!1,_=!1),y){var L=void 0;if((I=this._computeIndentLevel(C-1))>=0?(l=C-1,c=I,L=Math.ceil(I/this._options.tabSize)):(h(C),L=this._getIndentLevelForWhitespaceLine(s,u,c)),0===M){if(v=C,b=S,0===(w=L))return{startLineNumber:v,endLineNumber:b,indent:w};continue}L>=w?v=C:y=!1}if(_){var I,N=void 0;(I=this._computeIndentLevel(S-1))>=0?(d=S-1,f=I,N=Math.ceil(I/this._options.tabSize)):(m(S),N=this._getIndentLevelForWhitespaceLine(s,f,g)),N>=w?b=S:_=!1}}return{startLineNumber:v,endLineNumber:b,indent:w}},t.prototype.getLinesIndentGuides=function(e,t){this._assertNotDisposed();var n=this.getLineCount();if(e<1||e>n)throw new Error("Illegal value for startLineNumber");if(t<1||t>n)throw new Error("Illegal value for endLineNumber");for(var i=X.cx.getFoldingRules(this._languageIdentifier.id),o=i&&i.offSide,r=new Array(t-e+1),s=-2,a=-1,u=-2,l=-1,c=e;c<=t;c++){var h=c-e,d=this._computeIndentLevel(c-1);if(d>=0)s=c-1,a=d,r[h]=Math.ceil(d/this._options.tabSize);else{if(-2===s){s=-1,a=-1;for(var f=c-2;f>=0;f--)if((p=this._computeIndentLevel(f))>=0){s=f,a=p;break}}if(-1!==u&&(-2===u||u=0){u=f,l=p;break}}r[h]=this._getIndentLevelForWhitespaceLine(o,a,l)}}return r},t.prototype._getIndentLevelForWhitespaceLine=function(e,t,n){return-1===t||-1===n?0:t0?this._deferredEvent?this._deferredEvent=this._deferredEvent.merge(e):this._deferredEvent=e:(this._fastEmitter.fire(e),this._slowEmitter.fire(e))},t}(U.jG)},6343:(e,t,n)=>{"use strict";n.d(t,{W5:()=>p,dr:()=>c,hB:()=>d,lt:()=>u,wC:()=>f});var i=n(899),o=n(386),r=n(1456),s=n(4076),a=n(2040),u=function(){function e(e,t,n,i){this.searchString=e,this.isRegex=t,this.matchCase=n,this.wordSeparators=i}return e._isMultilineRegexSource=function(e){if(!e||0===e.length)return!1;for(var t=0,n=e.length;t=n)break;var i=e.charCodeAt(t);if(110===i||114===i)return!0}return!1},e.prototype.parseSearchRequest=function(){if(""===this.searchString)return null;var t;t=this.isRegex?e._isMultilineRegexSource(this.searchString):this.searchString.indexOf("\n")>=0;var n=null;try{n=i.createRegExp(this.searchString,this.isRegex,{matchCase:this.matchCase,wholeWord:!1,multiline:t,global:!0})}catch(e){return null}if(!n)return null;var o=!this.isRegex&&!t;return o&&this.searchString.toLowerCase()!==this.searchString.toUpperCase()&&(o=this.matchCase),new l(n,this.wordSeparators?(0,a.i)(this.wordSeparators):null,o?this.searchString:null)},e}(),l=function(e,t,n){this.regex=e,this.wordSeparators=t,this.simpleSearch=n};function c(e,t,n){if(!n)return new s.Dg(e,null);for(var i=[],o=0,r=t.length;o=e?i=o-1:t[o+1]>=e?(n=o,i=o):n=o+1}return n+1},e}(),d=function(){function e(){}return e.findMatches=function(e,t,n,i,o){var r=t.parseSearchRequest();return r?r.regex.multiline?this._doFindMatchesMultiline(e,n,new p(r.wordSeparators,r.regex),i,o):this._doFindMatchesLineByLine(e,n,r,i,o):[]},e._getMultilineMatchRange=function(e,t,n,i,o,s){var a,u,l=0;if(a="\r\n"===e.getEOL()?t+o+(l=i.findLineFeedCountBeforeOffset(o)):t+o,"\r\n"===e.getEOL()){var c=i.findLineFeedCountBeforeOffset(o+s.length)-l;u=a+s.length+c}else u=a+s.length;var h=e.getPositionAt(a),d=e.getPositionAt(u);return new r.Q(h.lineNumber,h.column,d.lineNumber,d.column)},e._doFindMatchesMultiline=function(e,t,n,i,o){var r,a=e.getOffsetAt(t.getStartPosition()),u=e.getValueInRange(t,s.kf.LF),l="\r\n"===e.getEOL()?new h(u):null,d=[],f=0;for(n.reset(0);r=n.next(u);)if(d[f++]=c(this._getMultilineMatchRange(e,a,u,l,r.index,r[0]),r,i),f>=o)return d;return d},e._doFindMatchesLineByLine=function(e,t,n,i,o){var r=[],s=0;if(t.startLineNumber===t.endLineNumber){var a=e.getLineContent(t.startLineNumber).substring(t.startColumn-1,t.endColumn-1);return s=this._findMatchesInLine(n,a,t.startLineNumber,t.startColumn-1,s,r,i,o),r}var u=e.getLineContent(t.startLineNumber).substring(t.startColumn-1);s=this._findMatchesInLine(n,u,t.startLineNumber,t.startColumn-1,s,r,i,o);for(var l=t.startLineNumber+1;l=l))return o;return o}var y,b=new p(e.wordSeparators,e.regex);b.reset(0);do{if((y=b.next(t))&&(a[o++]=c(new r.Q(n,y.index+1+i,n,y.index+1+y[0].length+i),y,u),o>=l))return o}while(y);return o},e.findNextMatch=function(e,t,n,i){var o=t.parseSearchRequest();if(!o)return null;var r=new p(o.wordSeparators,o.regex);return o.regex.multiline?this._doFindNextMatchMultiline(e,n,r,i):this._doFindNextMatchLineByLine(e,n,r,i)},e._doFindNextMatchMultiline=function(e,t,n,i){var a=new o.y(t.lineNumber,1),u=e.getOffsetAt(a),l=e.getLineCount(),d=e.getValueInRange(new r.Q(a.lineNumber,a.column,l,e.getLineMaxColumn(l)),s.kf.LF),f="\r\n"===e.getEOL()?new h(d):null;n.reset(t.column-1);var p=n.next(d);return p?c(this._getMultilineMatchRange(e,u,d,f,p.index,p[0]),p,i):1!==t.lineNumber||1!==t.column?this._doFindNextMatchMultiline(e,new o.y(1,1),n,i):null},e._doFindNextMatchLineByLine=function(e,t,n,i){var o=e.getLineCount(),r=t.lineNumber,s=e.getLineContent(r),a=this._findFirstMatchInLine(n,s,r,t.column,i);if(a)return a;for(var u=1;u<=o;u++){var l=(r+u-1)%o,c=e.getLineContent(l+1),h=this._findFirstMatchInLine(n,c,l+1,1,i);if(h)return h}return null},e._findFirstMatchInLine=function(e,t,n,i,o){e.reset(i-1);var s=e.next(t);return s?c(new r.Q(n,s.index+1,n,s.index+1+s[0].length),s,o):null},e.findPreviousMatch=function(e,t,n,i){var o=t.parseSearchRequest();if(!o)return null;var r=new p(o.wordSeparators,o.regex);return o.regex.multiline?this._doFindPreviousMatchMultiline(e,n,r,i):this._doFindPreviousMatchLineByLine(e,n,r,i)},e._doFindPreviousMatchMultiline=function(e,t,n,i){var s=this._doFindMatchesMultiline(e,new r.Q(1,1,t.lineNumber,t.column),n,i,9990);if(s.length>0)return s[s.length-1];var a=e.getLineCount();return t.lineNumber!==a||t.column!==e.getLineMaxColumn(a)?this._doFindPreviousMatchMultiline(e,new o.y(a,e.getLineMaxColumn(a)),n,i):null},e._doFindPreviousMatchLineByLine=function(e,t,n,i){var o=e.getLineCount(),r=t.lineNumber,s=e.getLineContent(r).substring(0,t.column-1),a=this._findLastMatchInLine(n,s,r,i);if(a)return a;for(var u=1;u<=o;u++){var l=(o+r-u-1)%o,c=e.getLineContent(l+1),h=this._findLastMatchInLine(n,c,l+1,i);if(h)return h}return null},e._findLastMatchInLine=function(e,t,n,i){var o,s=null;for(e.reset(0);o=e.next(t);)s=c(new r.Q(n,o.index+1,n,o.index+1+o[0].length),o,i);return s},e}();function f(e,t,n,i,o){return function(e,t,n,i,o){if(0===i)return!0;var r=t.charCodeAt(i-1);if(0!==e.get(r))return!0;if(13===r||10===r)return!0;if(o>0){var s=t.charCodeAt(i);if(0!==e.get(s))return!0}return!1}(e,t,0,i,o)&&function(e,t,n,i,o){if(i+o===n)return!0;var r=t.charCodeAt(i+o);if(0!==e.get(r))return!0;if(13===r||10===r)return!0;if(o>0){var s=t.charCodeAt(i+o-1);if(0!==e.get(s))return!0}return!1}(e,t,n,i,o)}var p=function(){function e(e,t){this._wordSeparators=e,this._searchRegex=t,this._prevMatchStartIndex=-1,this._prevMatchLength=0}return e.prototype.reset=function(e){this._searchRegex.lastIndex=e,this._prevMatchStartIndex=-1,this._prevMatchLength=0},e.prototype.next=function(e){var t,n=e.length;do{if(this._prevMatchStartIndex+this._prevMatchLength===n)return null;if(!(t=this._searchRegex.exec(e)))return null;var i=t.index,o=t[0].length;if(i===this._prevMatchStartIndex&&o===this._prevMatchLength)return null;if(this._prevMatchStartIndex=i,this._prevMatchLength=o,!this._wordSeparators||f(this._wordSeparators,e,n,i,o))return t}while(t);return null},e}()},1279:(e,t,n)=>{"use strict";n.d(t,{Io:()=>r,J3:()=>i,Ld:()=>o,Th:()=>s});var i="`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?",o=function(e){void 0===e&&(e="");for(var t="(-?\\d*\\.\\d\\w*)|([^",n=0;n=0||(t+="\\"+i[n]);return t+="\\s]+)",new RegExp(t,"g")}();function r(e){var t=o;if(e&&e instanceof RegExp)if(e.global)t=e;else{var n="g";e.ignoreCase&&(n+="i"),e.multiline&&(n+="m"),t=new RegExp(e.source,n)}return t.lastIndex=0,t}function s(e,t,n,i){t.lastIndex=0;var o=t.exec(n);if(!o)return null;var r=o[0].indexOf(" ")>=0?function(e,t,n,i){var o,r=e-1-i;for(t.lastIndex=0;o=t.exec(n);){if(o.index>r)return null;if(t.lastIndex>=r)return{word:o[0],startColumn:i+1+o.index,endColumn:i+1+t.lastIndex}}return null}(e,t,n,i):function(e,t,n,i){var o,r=e-1-i,s=n.lastIndexOf(" ",r-1)+1,a=n.indexOf(" ",r);for(-1===a&&(a=n.length),t.lastIndex=s;o=t.exec(n);)if(o.index<=r&&t.lastIndex>=r)return{word:o[0],startColumn:i+1+o.index,endColumn:i+1+t.lastIndex};return null}(e,t,n,i);return t.lastIndex=0,r}},5439:(e,t,n)=>{"use strict";n.d(t,{iM:()=>A,Kj:()=>h,qh:()=>E,Yu:()=>z,UU:()=>D,NQ:()=>j,Kb:()=>d,UG:()=>x,CW:()=>O,Wd:()=>N,lO:()=>_,Z8:()=>W,r8:()=>I,Lh:()=>k,Aj:()=>m,N9:()=>P,x4:()=>R,aW:()=>M,rN:()=>C,An:()=>L,er:()=>S,tS:()=>c,v0:()=>f,xn:()=>v,dG:()=>F,ce:()=>T,Yg:()=>w,je:()=>b});var i=n(2213),o=n(6621),r=n(699);function s(e,t,n,i){if(Array.isArray(e)){for(var o=0,a=0,u=e;ao&&(o=l)}return o}if("string"==typeof e)return i?"*"===e?5:e===n?10:0:0;if(e){var c=e.language,h=e.pattern,d=e.scheme,f=e.hasAccessToAllModels;if(!i&&!f)return 0;if(o=0,d)if(d===t.scheme)o=10;else{if("*"!==d)return 0;o=5}if(c)if(c===n)o=10;else{if("*"!==c)return 0;o=Math.max(o,5)}if(h){if(h!==t.fsPath&&!(0,r.YW)(h,t.fsPath))return 0;o=10}return o}return 0}var a=n(3072);function u(e){return"string"!=typeof e&&(Array.isArray(e)?e.every(u):e.exclusive)}const l=function(){function e(){this._clock=0,this._entries=[],this._onDidChange=new i.vl}return Object.defineProperty(e.prototype,"onDidChange",{get:function(){return this._onDidChange.event},enumerable:!0,configurable:!0}),e.prototype.register=function(e,t){var n=this,i={selector:e,provider:t,_score:-1,_time:this._clock++};return this._entries.push(i),this._lastCandidate=void 0,this._onDidChange.fire(this._entries.length),(0,o.s)((function(){if(i){var e=n._entries.indexOf(i);e>=0&&(n._entries.splice(e,1),n._lastCandidate=void 0,n._onDidChange.fire(n._entries.length),i=void 0)}}))},e.prototype.has=function(e){return this.all(e).length>0},e.prototype.all=function(e){if(!e)return[];this._updateScores(e);for(var t=[],n=0,i=this._entries;n0&&t.push(o.provider)}return t},e.prototype.ordered=function(e){var t=[];return this._orderedForEach(e,(function(e){return t.push(e.provider)})),t},e.prototype.orderedGroups=function(e){var t,n,i=[];return this._orderedForEach(e,(function(e){t&&n===e._score?t.push(e.provider):(n=e._score,t=[e.provider],i.push(t))})),i},e.prototype._orderedForEach=function(e,t){if(e){this._updateScores(e);for(var n=0;n0&&t(i)}}},e.prototype._updateScores=function(t){var n={uri:t.uri.toString(),language:t.getLanguageIdentifier().language};if(!this._lastCandidate||this._lastCandidate.language!==n.language||this._lastCandidate.uri!==n.uri){this._lastCandidate=n;for(var i=0,o=this._entries;i0){for(var l=0,c=this._entries;lt._score?-1:e._timet._time?-1:0},e}();var c,h,d,f,p=function(){function e(){this._onDidChange=new i.vl,this.onDidChange=this._onDidChange.event,this._map=Object.create(null),this._colorMap=null}return e.prototype.fire=function(e){this._onDidChange.fire({changedLanguages:e,changedColorMap:!1})},e.prototype.register=function(e,t){var n=this;return this._map[e]=t,this.fire([e]),(0,o.s)((function(){n._map[e]===t&&(delete n._map[e],n.fire([e]))}))},e.prototype.get=function(e){return this._map[e]||null},e.prototype.setColorMap=function(e){this._colorMap=e,this._onDidChange.fire({changedLanguages:Object.keys(this._map),changedColorMap:!0})},e.prototype.getColorMap=function(){return this._colorMap},e.prototype.getDefaultBackground=function(){return this._colorMap[2]},e}(),g=n(1780),m=function(e,t){this.language=e,this.id=t},v=function(){function e(){}return e.getLanguageId=function(e){return(255&e)>>>0},e.getTokenType=function(e){return(1792&e)>>>8},e.getFontStyle=function(e){return(14336&e)>>>11},e.getForeground=function(e){return(8372224&e)>>>14},e.getBackground=function(e){return(4286578688&e)>>>23},e.getClassNameFromMetadata=function(e){var t="mtk"+this.getForeground(e),n=this.getFontStyle(e);return 1&n&&(t+=" mtki"),2&n&&(t+=" mtkb"),4&n&&(t+=" mtku"),t},e.getInlineStyleFromMetadata=function(e,t){var n=this.getForeground(e),i=this.getFontStyle(e),o="color: "+t[n]+";";return 1&i&&(o+="font-style: italic;"),2&i&&(o+="font-weight: bold;"),4&i&&(o+="text-decoration: underline;"),o},e}();!function(e){e[e.Invoke=0]="Invoke",e[e.TriggerCharacter=1]="TriggerCharacter",e[e.TriggerForIncompleteCompletions=2]="TriggerForIncompleteCompletions"}(c||(c={})),function(e){e[e.Automatic=1]="Automatic",e[e.Manual=2]="Manual"}(h||(h={})),function(e){e[e.Text=0]="Text",e[e.Read=1]="Read",e[e.Write=2]="Write"}(d||(d={})),function(e){e[e.File=0]="File",e[e.Module=1]="Module",e[e.Namespace=2]="Namespace",e[e.Package=3]="Package",e[e.Class=4]="Class",e[e.Method=5]="Method",e[e.Property=6]="Property",e[e.Field=7]="Field",e[e.Constructor=8]="Constructor",e[e.Enum=9]="Enum",e[e.Interface=10]="Interface",e[e.Function=11]="Function",e[e.Variable=12]="Variable",e[e.Constant=13]="Constant",e[e.String=14]="String",e[e.Number=15]="Number",e[e.Boolean=16]="Boolean",e[e.Array=17]="Array",e[e.Object=18]="Object",e[e.Key=19]="Key",e[e.Null=20]="Null",e[e.EnumMember=21]="EnumMember",e[e.Struct=22]="Struct",e[e.Event=23]="Event",e[e.Operator=24]="Operator",e[e.TypeParameter=25]="TypeParameter"}(f||(f={}));var y,b=((y=Object.create(null))[f.File]="file",y[f.Module]="module",y[f.Namespace]="namespace",y[f.Package]="package",y[f.Class]="class",y[f.Method]="method",y[f.Property]="property",y[f.Field]="field",y[f.Constructor]="constructor",y[f.Enum]="enum",y[f.Interface]="interface",y[f.Function]="function",y[f.Variable]="variable",y[f.Constant]="constant",y[f.String]="string",y[f.Number]="number",y[f.Boolean]="boolean",y[f.Array]="array",y[f.Object]="object",y[f.Key]="key",y[f.Null]="null",y[f.EnumMember]="enum-member",y[f.Struct]="struct",y[f.Event]="event",y[f.Operator]="operator",y[f.TypeParameter]="type-parameter",function(e){return"symbol-icon "+(y[e]||"property")}),_=function(){function e(e){this.value=e}return e.Comment=new e("comment"),e.Imports=new e("imports"),e.Region=new e("region"),e}();function w(e){return(0,g.Gv)(e)&&e.resource&&Array.isArray(e.edits)}var M=new l,C=new l,S=new l,L=new l,I=new l,N=new l,x=new l,D=new l,k=new l,T=new l,E=new l,A=new l,j=new l,O=new l,R=new l,P=new l,z=new l,W=new l,F=new p},5074:(e,t,n)=>{"use strict";var i;n.d(t,{i:()=>o,l:()=>i}),function(e){e[e.None=0]="None",e[e.Indent=1]="Indent",e[e.IndentOutdent=2]="IndentOutdent",e[e.Outdent=3]="Outdent"}(i||(i={}));var o=function(){function e(e){if(this.open=e.open,this.close=e.close,this._standardTokenMask=0,Array.isArray(e.notIn))for(var t=0,n=e.notIn.length;t{"use strict";n.d(t,{cx:()=>y});var i=n(5074),o=function(){function e(e){e.autoClosingPairs?this._autoClosingPairs=e.autoClosingPairs.map((function(e){return new i.i(e)})):e.brackets?this._autoClosingPairs=e.brackets.map((function(e){return new i.i({open:e[0],close:e[1]})})):this._autoClosingPairs=[],this._surroundingPairs=e.surroundingPairs||this._autoClosingPairs}return e.prototype.getAutoClosingPairs=function(){return this._autoClosingPairs},e.prototype.shouldAutoClosePair=function(e,t,n){if(0===t.getTokenCount())return!0;for(var i=t.findTokenIndexAtOffset(n-2),o=t.getStandardTokenType(i),r=0;r1&&!!e.close})).map((function(e){return new i.i(e)})),n.docComment&&this._complexAutoClosePairs.push(new i.i({open:n.docComment.open,close:n.docComment.close}))}return e.prototype.getElectricCharacters=function(){var e=[];if(this._richEditBrackets)for(var t=0,n=this._richEditBrackets.brackets.length;t=0))return{appendText:s.close}}}return null},e}(),u=n(5538),l=n(899),c=function(){function e(t){(t=t||{}).brackets=t.brackets||[["(",")"],["{","}"],["[","]"]],this._brackets=t.brackets.map((function(t){return{open:t[0],openRegExp:e._createOpenBracketRegExp(t[0]),close:t[1],closeRegExp:e._createCloseBracketRegExp(t[1])}})),this._regExpRules=t.regExpRules||[]}return e.prototype.onEnter=function(e,t,n){for(var o=0,r=this._regExpRules.length;o0&&n.length>0)for(o=0,r=this._brackets.length;o0)for(o=0,r=this._brackets.length;o1){var o=t-1,r=-1;for(o=t-1;o>=1;o--){if(e.getLanguageIdAtPosition(o,0)!==i)return r;var s=e.getLineContent(o);if(!n.shouldIgnore(s)&&!/^\s+$/.test(s)&&""!==s)return o;r=o}}return-1},e.prototype.getInheritIndentForLine=function(e,t,n){void 0===n&&(n=!0);var o=this.getIndentRulesSupport(e.getLanguageIdentifier().id);if(!o)return null;if(t<=1)return{indentation:"",action:null};var r=this.getPrecedingValidLine(e,t,o);if(r<0)return null;if(r<1)return{indentation:"",action:null};var s=e.getLineContent(r);if(o.shouldIncrease(s)||o.shouldIndentNextLine(s))return{indentation:l.getLeadingWhitespace(s),action:i.l.Indent,line:r};if(o.shouldDecrease(s))return{indentation:l.getLeadingWhitespace(s),action:null,line:r};if(1===r)return{indentation:l.getLeadingWhitespace(e.getLineContent(r)),action:null,line:r};var a=r-1,u=o.getIndentMetadata(e.getLineContent(a));if(!(3&u)&&4&u){for(var c=0,h=a-1;h>0;h--)if(!o.shouldIndentNextLine(e.getLineContent(h))){c=h;break}return{indentation:l.getLeadingWhitespace(e.getLineContent(c+1)),action:null,line:c+1}}if(n)return{indentation:l.getLeadingWhitespace(e.getLineContent(r)),action:null,line:r};for(h=r;h>0;h--){var d=e.getLineContent(h);if(o.shouldIncrease(d))return{indentation:l.getLeadingWhitespace(d),action:i.l.Indent,line:h};if(o.shouldIndentNextLine(d)){c=0;for(var f=h-1;f>0;f--)if(!o.shouldIndentNextLine(e.getLineContent(h))){c=f;break}return{indentation:l.getLeadingWhitespace(e.getLineContent(c+1)),action:null,line:c+1}}if(o.shouldDecrease(d))return{indentation:l.getLeadingWhitespace(d),action:null,line:h}}return{indentation:l.getLeadingWhitespace(e.getLineContent(1)),action:null,line:1}},e.prototype.getGoodIndentForLine=function(e,t,n,o){var r=this.getIndentRulesSupport(t);if(!r)return null;var s=this.getInheritIndentForLine(e,n),a=e.getLineContent(n);if(s){var c=s.line;if(void 0!==c){var h=this._getOnEnterSupport(t),d=null;try{d=h.onEnter("",e.getLineContent(c),"")}catch(e){(0,u.dz)(e)}if(d){var f=l.getLeadingWhitespace(e.getLineContent(c));return d.removeText&&(f=f.substring(0,f.length-d.removeText)),d.indentAction===i.l.Indent||d.indentAction===i.l.IndentOutdent?f=o.shiftIndent(f):d.indentAction===i.l.Outdent&&(f=o.unshiftIndent(f)),r.shouldDecrease(a)&&(f=o.unshiftIndent(f)),d.appendText&&(f+=d.appendText),l.getLeadingWhitespace(f)}}return r.shouldDecrease(a)?s.action===i.l.Indent?s.indentation:o.unshiftIndent(s.indentation):s.action===i.l.Indent?o.shiftIndent(s.indentation):s.indentation}return null},e.prototype.getIndentForEnter=function(e,t,n,o){e.forceTokenization(t.startLineNumber);var s,a,u=e.getLineTokens(t.startLineNumber),c=(0,r.BQ)(u,t.startColumn-1),h=c.getLineContent(),d=!1;c.firstCharOffset>0&&u.getLanguageId(0)!==c.languageId?(d=!0,s=h.substr(0,t.startColumn-1-c.firstCharOffset)):s=u.getLineContent().substring(0,t.startColumn-1),a=t.isEmpty()?h.substr(t.startColumn-1-c.firstCharOffset):this.getScopedLineTokens(e,t.endLineNumber,t.endColumn).getLineContent().substr(t.endColumn-1-c.firstCharOffset);var f=this.getIndentRulesSupport(c.languageId);if(!f)return null;var p=s,g=l.getLeadingWhitespace(s);if(!o&&!d){var m=this.getInheritIndentForLine(e,t.startLineNumber);f.shouldDecrease(s)&&m&&(g=m.indentation,m.action!==i.l.Indent&&(g=n.unshiftIndent(g))),p=g+l.ltrim(l.ltrim(s," "),"\t")}var v={getLineTokens:function(t){return e.getLineTokens(t)},getLanguageIdentifier:function(){return e.getLanguageIdentifier()},getLanguageIdAtPosition:function(t,n){return e.getLanguageIdAtPosition(t,n)},getLineContent:function(n){return n===t.startLineNumber?p:e.getLineContent(n)}},y=l.getLeadingWhitespace(u.getLineContent()),b=this.getInheritIndentForLine(v,t.startLineNumber+1);if(!b){var _=d?y:g;return{beforeEnter:_,afterEnter:_}}var w=d?y:b.indentation;return b.action===i.l.Indent&&(w=n.shiftIndent(w)),f.shouldDecrease(a)&&(w=n.unshiftIndent(w)),{beforeEnter:d?y:g,afterEnter:w}},e.prototype.getIndentActionForType=function(e,t,n,o){var r=this.getScopedLineTokens(e,t.startLineNumber,t.startColumn),s=this.getIndentRulesSupport(r.languageId);if(!s)return null;var a,u=r.getLineContent(),l=u.substr(0,t.startColumn-1-r.firstCharOffset);if(a=t.isEmpty()?u.substr(t.startColumn-1-r.firstCharOffset):this.getScopedLineTokens(e,t.endLineNumber,t.endColumn).getLineContent().substr(t.endColumn-1-r.firstCharOffset),!s.shouldDecrease(l+a)&&s.shouldDecrease(l+n+a)){var c=this.getInheritIndentForLine(e,t.startLineNumber,!1);if(!c)return null;var h=c.indentation;return c.action!==i.l.Indent&&(h=o.unshiftIndent(h)),h}return null},e.prototype.getIndentMetadata=function(e,t){var n=this.getIndentRulesSupport(e.getLanguageIdentifier().id);return n?t<1||t>e.getLineCount()?null:n.getIndentMetadata(e.getLineContent(t)):null},e.prototype._getOnEnterSupport=function(e){var t=this._getRichEditSupport(e);return t&&t.onEnter||null},e.prototype.getRawEnterActionAtPosition=function(e,t,n){var i=this.getEnterAction(e,new g.Q(t,n,t,n));return i?i.enterAction:null},e.prototype.getEnterAction=function(e,t){var n=this.getIndentationAtPosition(e,t.startLineNumber,t.startColumn),o=this.getScopedLineTokens(e,t.startLineNumber,t.startColumn),r=this._getOnEnterSupport(o.languageId);if(!r)return null;var s,a=o.getLineContent(),l=a.substr(0,t.startColumn-1-o.firstCharOffset);s=t.isEmpty()?a.substr(t.startColumn-1-o.firstCharOffset):this.getScopedLineTokens(e,t.endLineNumber,t.endColumn).getLineContent().substr(t.endColumn-1-o.firstCharOffset);var c=t.startLineNumber,h="";if(c>1&&0===o.firstCharOffset){var d=this.getScopedLineTokens(e,c-1);d.languageId===o.languageId&&(h=d.getLineContent())}var f=null;try{f=r.onEnter(h,l,s)}catch(e){(0,u.dz)(e)}return f?(f.appendText||(f.indentAction===i.l.Indent||f.indentAction===i.l.IndentOutdent?f.appendText="\t":f.appendText=""),f.removeText&&(n=n.substring(0,n.length-f.removeText)),{enterAction:f,indentation:n}):null},e.prototype.getIndentationAtPosition=function(e,t,n){var i=e.getLineContent(t),o=l.getLeadingWhitespace(i);return o.length>n-1&&(o=o.substring(0,n-1)),o},e.prototype.getScopedLineTokens=function(e,t,n){e.forceTokenization(t);var i=e.getLineTokens(t),o=isNaN(n)?e.getLineMaxColumn(t)-1:n-1;return(0,r.BQ)(i,o)},e.prototype.getBracketsSupport=function(e){var t=this._getRichEditSupport(e);return t&&t.brackets||null},e}(),y=new v},4998:(e,t,n)=>{"use strict";n.d(t,{$H:()=>u,I8:()=>s,T5:()=>l,oe:()=>r,z8:()=>a});var i=n(5439),o=n(5752),r=new(function(){function e(){}return e.prototype.clone=function(){return this},e.prototype.equals=function(e){return this===e},e}()),s="vs.editor.nullMode",a=new i.Aj(s,0);function u(e,t,n,i){return new o.$M([new o.ou(i,"",e)],n)}function l(e,t,n,i){var r=new Uint32Array(2);return r[0]=i,r[1]=(16384|e|2<<23)>>>0,new o.Zj(r,n)}},6804:(e,t,n)=>{"use strict";function i(e,t){for(var n=e.getCount(),i=e.findTokenIndexAtOffset(t),r=e.getLanguageId(i),s=i;s+10&&e.getLanguageId(a-1)===r;)a--;return new o(e,r,a,s+1,e.getStartOffset(a),e.getEndOffset(s))}n.d(t,{BQ:()=>i,Yo:()=>r});var o=function(){function e(e,t,n,i,o,r){this._actual=e,this.languageId=t,this._firstTokenIndex=n,this._lastTokenIndex=i,this.firstCharOffset=o,this._lastCharOffset=r}return e.prototype.getLineContent=function(){return this._actual.getLineContent().substring(this.firstCharOffset,this._lastCharOffset)},e.prototype.getTokenCount=function(){return this._lastTokenIndex-this._firstTokenIndex},e.prototype.findTokenIndexAtOffset=function(e){return this._actual.findTokenIndexAtOffset(e+this.firstCharOffset)-this._firstTokenIndex},e.prototype.getStandardTokenType=function(e){return this._actual.getStandardTokenType(e+this._firstTokenIndex)},e}();function r(e){return!!(7&e)}},6360:(e,t,n)=>{"use strict";n.d(t,{Fu:()=>v,az:()=>s});var i=n(899),o=n(1456),r=function(e,t,n,i,o){this.languageIdentifier=e,this.open=t,this.close=n,this.forwardRegex=i,this.reversedRegex=o},s=function(e,t){var n=this;this.brackets=t.map((function(t){return new r(e,t[0],t[1],u({open:t[0],close:t[1]}),l({open:t[0],close:t[1]}))})),this.forwardRegex=c(this.brackets),this.reversedRegex=h(this.brackets),this.textIsBracket={},this.textIsOpenBracket={};var i=0;this.brackets.forEach((function(e){n.textIsBracket[e.open.toLowerCase()]=e,n.textIsBracket[e.close.toLowerCase()]=e,n.textIsOpenBracket[e.open.toLowerCase()]=!0,n.textIsOpenBracket[e.close.toLowerCase()]=!1,i=Math.max(i,e.open.length),i=Math.max(i,e.close.length)})),this.maxBracketLength=i};function a(e,t){var n={};return function(i){var o=e(i);return n.hasOwnProperty(o)||(n[o]=t(i)),n[o]}}var u=a((function(e){return e.open+";"+e.close}),(function(e){return f([e.open,e.close])})),l=a((function(e){return e.open+";"+e.close}),(function(e){return f([m(e.open),m(e.close)])})),c=a((function(e){return e.map((function(e){return e.open+";"+e.close})).join(";")}),(function(e){var t=[];return e.forEach((function(e){t.push(e.open),t.push(e.close)})),f(t)})),h=a((function(e){return e.map((function(e){return e.open+";"+e.close})).join(";")}),(function(e){var t=[];return e.forEach((function(e){t.push(m(e.open)),t.push(m(e.close))})),f(t)}));function d(e){var t=/^[\w]+$/.test(e);return e=i.escapeRegExpCharacters(e),t?"\\b"+e+"\\b":e}function f(e){var t="("+e.map(d).join(")|(")+")";return i.createRegExp(t,!0)}var p,g,m=(p=null,g=null,function(e){return p!==e&&(g=function(e){for(var t="",n=e.length-1;n>=0;n--)t+=e.charAt(n);return t}(p=e)),g}),v=function(){function e(){}return e._findPrevBracketInText=function(e,t,n,i){var r=n.match(e);if(!r)return null;var s=n.length-r.index,a=r[0].length,u=i+s;return new o.Q(t,u-a+1,t,u+1)},e.findPrevBracketInToken=function(e,t,n,i,o){var r=m(n).substring(n.length-o,n.length-i);return this._findPrevBracketInText(e,t,r,i)},e.findNextBracketInText=function(e,t,n,i){var r=n.match(e);if(!r)return null;var s=r.index,a=r[0].length;if(0===a)return null;var u=i+s;return new o.Q(t,u+1,t,u+1+a)},e.findNextBracketInToken=function(e,t,n,i,o){var r=n.substring(i,o);return this.findNextBracketInText(e,t,r,i)},e}()},3072:(e,t,n)=>{"use strict";n.d(t,{S:()=>i,v:()=>o});var i=(0,n(4264).u1)("modelService");function o(e){return!e.isTooLargeForSyncing()&&!e.isForSimpleWidget}},6625:(e,t,n)=>{"use strict";n.r(t),n.d(t,{CancellationTokenSource:()=>mE,Emitter:()=>vE,KeyCode:()=>yE,KeyMod:()=>bE,MarkerSeverity:()=>SE,MarkerTag:()=>LE,Position:()=>_E,Promise:()=>IE,Range:()=>wE,Selection:()=>ME,SelectionDirection:()=>CE,Token:()=>xE,Uri:()=>NE,editor:()=>DE,languages:()=>kE});var i,o=n(486),r=n(386),s=n(1456),a={ICodeEditor:"vs.editor.ICodeEditor",IDiffEditor:"vs.editor.IDiffEditor"},u={ExecuteCommand:"executeCommand",ExecuteCommands:"executeCommands",Type:"type",ReplacePreviousChar:"replacePreviousChar",CompositionStart:"compositionStart",CompositionEnd:"compositionEnd",Paste:"paste",Cut:"cut",Undo:"undo",Redo:"redo"},l=n(1315);!function(e){e[e.NotSet=0]="NotSet",e[e.ContentFlush=1]="ContentFlush",e[e.RecoverFromMarkers=2]="RecoverFromMarkers",e[e.Explicit=3]="Explicit",e[e.Paste=4]="Paste",e[e.Undo=5]="Undo",e[e.Redo=6]="Redo"}(i||(i={}));var c,h=function(e,t,n){this.lineNumber=e,this.column=t,this.leftoverVisibleColumns=n},d=function(){function e(){}return e.left=function(e,t,n,i){return i>t.getLineMinColumn(n)?l.A_.isLowSurrogate(t,n,i-2)?i-=2:i-=1:n>1&&(n-=1,i=t.getLineMaxColumn(n)),new h(n,i,0)},e.moveLeft=function(t,n,i,o,r){var s,a;if(i.hasSelection()&&!o)s=i.selection.startLineNumber,a=i.selection.startColumn;else{var u=e.left(t,n,i.position.lineNumber,i.position.column-(r-1));s=u.lineNumber,a=u.column}return i.move(o,s,a,0)},e.right=function(e,t,n,i){return iu?(n=u,s?i=t.getLineMaxColumn(n):(i=Math.min(t.getLineMaxColumn(n),i),l.A_.isInsideSurrogatePair(t,n,i)&&(i-=1))):(i=l.A_.columnFromVisibleColumn2(e,t,n,a),l.A_.isInsideSurrogatePair(t,n,i)&&(i-=1)),o=a-l.A_.visibleColumnFromColumn(t.getLineContent(n),i,e.tabSize),new h(n,i,o)},e.moveDown=function(t,n,i,o,r){var s,a;i.hasSelection()&&!o?(s=i.selection.endLineNumber,a=i.selection.endColumn):(s=i.position.lineNumber,a=i.position.column);var u=e.down(t,n,s,a,i.leftoverVisibleColumns,r,!0);return i.move(o,u.lineNumber,u.column,u.leftoverVisibleColumns)},e.translateDown=function(t,n,i){var o=i.selection,a=e.down(t,n,o.selectionStartLineNumber,o.selectionStartColumn,i.selectionStartLeftoverVisibleColumns,1,!1),u=e.down(t,n,o.positionLineNumber,o.positionColumn,i.leftoverVisibleColumns,1,!1);return new l.mG(new s.Q(a.lineNumber,a.column,a.lineNumber,a.column),a.leftoverVisibleColumns,new r.y(u.lineNumber,u.column),u.leftoverVisibleColumns)},e.up=function(e,t,n,i,o,r,s){var a=l.A_.visibleColumnFromColumn(t.getLineContent(n),i,e.tabSize)+o;return(n-=r)<1?(n=1,s?i=t.getLineMinColumn(n):(i=Math.min(t.getLineMaxColumn(n),i),l.A_.isInsideSurrogatePair(t,n,i)&&(i-=1))):(i=l.A_.columnFromVisibleColumn2(e,t,n,a),l.A_.isInsideSurrogatePair(t,n,i)&&(i-=1)),o=a-l.A_.visibleColumnFromColumn(t.getLineContent(n),i,e.tabSize),new h(n,i,o)},e.moveUp=function(t,n,i,o,r){var s,a;i.hasSelection()&&!o?(s=i.selection.startLineNumber,a=i.selection.startColumn):(s=i.position.lineNumber,a=i.position.column);var u=e.up(t,n,s,a,i.leftoverVisibleColumns,r,!0);return i.move(o,u.lineNumber,u.column,u.leftoverVisibleColumns)},e.translateUp=function(t,n,i){var o=i.selection,a=e.up(t,n,o.selectionStartLineNumber,o.selectionStartColumn,i.selectionStartLeftoverVisibleColumns,1,!1),u=e.up(t,n,o.positionLineNumber,o.positionColumn,i.leftoverVisibleColumns,1,!1);return new l.mG(new s.Q(a.lineNumber,a.column,a.lineNumber,a.column),a.leftoverVisibleColumns,new r.y(u.lineNumber,u.column),u.leftoverVisibleColumns)},e.moveToBeginningOfLine=function(e,t,n,i){var o,r=n.position.lineNumber,s=t.getLineMinColumn(r),a=t.getLineFirstNonWhitespaceColumn(r)||s;return o=n.position.column===a?s:a,n.move(i,r,o,0)},e.moveToEndOfLine=function(e,t,n,i){var o=n.position.lineNumber,r=t.getLineMaxColumn(o);return n.move(i,o,r,0)},e.moveToBeginningOfBuffer=function(e,t,n,i){return n.move(i,1,1,0)},e.moveToEndOfBuffer=function(e,t,n,i){var o=t.getLineCount(),r=t.getLineMaxColumn(o);return n.move(i,o,r,0)},e}(),f=n(2040),p=n(899),g=(c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}c(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),m=function(){function e(){}return e._createWord=function(e,t,n,i,o){return{start:i,end:o,wordType:t,nextCharClass:n}},e._findPreviousWordOnLine=function(e,t,n){var i=t.getLineContent(n.lineNumber);return this._doFindPreviousWordOnLine(i,e,n)},e._doFindPreviousWordOnLine=function(e,t,n){for(var i=0,o=n.column-2;o>=0;o--){var r=e.charCodeAt(o),s=t.get(r);if(0===s){if(2===i)return this._createWord(e,i,s,o+1,this._findEndOfWord(e,t,i,o+1));i=1}else if(2===s){if(1===i)return this._createWord(e,i,s,o+1,this._findEndOfWord(e,t,i,o+1));i=2}else if(1===s&&0!==i)return this._createWord(e,i,s,o+1,this._findEndOfWord(e,t,i,o+1))}return 0!==i?this._createWord(e,i,1,0,this._findEndOfWord(e,t,i,0)):null},e._findEndOfWord=function(e,t,n,i){for(var o=e.length,r=i;r=0;o--){var r=e.charCodeAt(o),s=t.get(r);if(1===s)return o+1;if(1===n&&2===s)return o+1;if(2===n&&0===s)return o+1}return 0},e.moveWordLeft=function(t,n,i,o){var s=i.lineNumber,a=i.column;1===a&&s>1&&(s-=1,a=n.getLineMaxColumn(s));var u=e._findPreviousWordOnLine(t,n,new r.y(s,a));return 0===o?(u&&2===u.wordType&&u.end-u.start==1&&0===u.nextCharClass&&(u=e._findPreviousWordOnLine(t,n,new r.y(s,u.start+1))),a=u?u.start+1:1):(u&&a<=u.end+1&&(u=e._findPreviousWordOnLine(t,n,new r.y(s,u.start+1))),a=u?u.end+1:1),new r.y(s,a)},e.moveWordRight=function(t,n,i,o){var s=i.lineNumber,a=i.column;a===n.getLineMaxColumn(s)&&s=u.start+1&&(u=e._findNextWordOnLine(t,n,new r.y(s,u.end+1))),a=u?u.start+1:n.getLineMaxColumn(s)),new r.y(s,a)},e._deleteWordLeftWhitespace=function(e,t){var n=e.getLineContent(t.lineNumber),i=t.column-2,o=p.lastNonWhitespaceIndex(n,i);return o+11?c=1:(l--,c=n.getLineMaxColumn(l)):(d&&c<=d.end+1&&(d=e._findPreviousWordOnLine(t,n,new r.y(l,d.start+1))),d?c=d.end+1:c>1?c=1:(l--,c=n.getLineMaxColumn(l))),new s.Q(l,c,u.lineNumber,u.column)},e._findFirstNonWhitespaceChar=function(e,t){for(var n=e.length,i=t;i=p.start+1&&(p=e._findNextWordOnLine(t,n,new r.y(l,p.end+1))),p?c=p.start+1:c=0;i--){var o=e.charCodeAt(i);if(32===o||9===o||!n&&p.isUpperAsciiLetter(o)||95===o)return i-1;if(n&&i1?new r.y(o-1,t.getLineMaxColumn(o-1)):n;var a=m.moveWordLeft(e,t,n,i),u=v(t.getLineContent(o),s-2),l=new r.y(o,u+2);return l.isBeforeOrEqual(a)?a:l},t.moveWordPartRight=function(e,t,n,i){var o=n.lineNumber,s=n.column;if(s===t.getLineMaxColumn(o))return oc&&(h=c,d=e.model.getLineMaxColumn(h)),l.MF.fromModelState(new l.mG(new s.Q(a.lineNumber,1,h,d),0,new r.y(h,d),0))}var f=t.modelState.selectionStart.getStartPosition().lineNumber;if(a.lineNumberf){c=e.viewModel.getLineCount();var p=u.lineNumber+1,g=1;return p>c&&(p=c,g=e.viewModel.getLineMaxColumn(p)),l.MF.fromViewState(t.viewState.move(t.modelState.hasSelection(),p,g,0))}var m=t.modelState.selectionStart.getEndPosition();return l.MF.fromModelState(t.modelState.move(t.modelState.hasSelection(),m.lineNumber,m.column,0))},e.word=function(e,t,n,i){var o=e.model.validatePosition(i);return l.MF.fromModelState(m.word(e.config,e.model,t.modelState,n,o))},e.cancelSelection=function(e,t){if(!t.modelState.hasSelection())return new l.MF(t.modelState,t.viewState);var n=t.viewState.position.lineNumber,i=t.viewState.position.column;return l.MF.fromViewState(new l.mG(new s.Q(n,i,n,i),0,new r.y(n,i),0))},e.moveTo=function(e,t,n,i,o){var s=e.model.validatePosition(i),a=o?e.validateViewPosition(new r.y(o.lineNumber,o.column),s):e.convertModelPositionToViewPosition(s);return l.MF.fromViewState(t.viewState.move(n,a.lineNumber,a.column,0))},e.move=function(e,t,n){var i=n.select,o=n.value;switch(n.direction){case 0:return 4===n.unit?this._moveHalfLineLeft(e,t,i):this._moveLeft(e,t,i,o);case 1:return 4===n.unit?this._moveHalfLineRight(e,t,i):this._moveRight(e,t,i,o);case 2:return 2===n.unit?this._moveUpByViewLines(e,t,i,o):this._moveUpByModelLines(e,t,i,o);case 3:return 2===n.unit?this._moveDownByViewLines(e,t,i,o):this._moveDownByModelLines(e,t,i,o);case 4:return this._moveToViewMinColumn(e,t,i);case 5:return this._moveToViewFirstNonWhitespaceColumn(e,t,i);case 6:return this._moveToViewCenterColumn(e,t,i);case 7:return this._moveToViewMaxColumn(e,t,i);case 8:return this._moveToViewLastNonWhitespaceColumn(e,t,i);case 9:var r=t[0],s=e.getCompletelyVisibleModelRange(),a=this._firstLineNumberInRange(e.model,s,o),u=e.model.getLineFirstNonWhitespaceColumn(a);return[this._moveToModelPosition(e,r,i,a,u)];case 11:return r=t[0],s=e.getCompletelyVisibleModelRange(),a=this._lastLineNumberInRange(e.model,s,o),u=e.model.getLineFirstNonWhitespaceColumn(a),[this._moveToModelPosition(e,r,i,a,u)];case 10:return r=t[0],s=e.getCompletelyVisibleModelRange(),a=Math.round((s.startLineNumber+s.endLineNumber)/2),u=e.model.getLineFirstNonWhitespaceColumn(a),[this._moveToModelPosition(e,r,i,a,u)];case 12:for(var l=e.getCompletelyVisibleViewRange(),c=[],h=0,d=t.length;hn.endLineNumber-1&&(o=n.endLineNumber-1),o>>0)>>>0}function R(e,t){if(0===e)return null;var n=(65535&e)>>>0,i=(4294901760&e)>>>16;return 0!==i?new W(P(n,t),P(i,t)):P(n,t)}function P(e,t){var n=!!(2048&e),i=!!(256&e);return new z(2===t?i:n,!!(1024&e),!!(512&e),2===t?n:i,255&e)}!function(){function e(e,t,n,i){void 0===n&&(n=t),void 0===i&&(i=n),E.define(e,t),A.define(e,n),j.define(e,i)}e(0,"unknown"),e(1,"Backspace"),e(2,"Tab"),e(3,"Enter"),e(4,"Shift"),e(5,"Ctrl"),e(6,"Alt"),e(7,"PauseBreak"),e(8,"CapsLock"),e(9,"Escape"),e(10,"Space"),e(11,"PageUp"),e(12,"PageDown"),e(13,"End"),e(14,"Home"),e(15,"LeftArrow","Left"),e(16,"UpArrow","Up"),e(17,"RightArrow","Right"),e(18,"DownArrow","Down"),e(19,"Insert"),e(20,"Delete"),e(21,"0"),e(22,"1"),e(23,"2"),e(24,"3"),e(25,"4"),e(26,"5"),e(27,"6"),e(28,"7"),e(29,"8"),e(30,"9"),e(31,"A"),e(32,"B"),e(33,"C"),e(34,"D"),e(35,"E"),e(36,"F"),e(37,"G"),e(38,"H"),e(39,"I"),e(40,"J"),e(41,"K"),e(42,"L"),e(43,"M"),e(44,"N"),e(45,"O"),e(46,"P"),e(47,"Q"),e(48,"R"),e(49,"S"),e(50,"T"),e(51,"U"),e(52,"V"),e(53,"W"),e(54,"X"),e(55,"Y"),e(56,"Z"),e(57,"Meta"),e(58,"ContextMenu"),e(59,"F1"),e(60,"F2"),e(61,"F3"),e(62,"F4"),e(63,"F5"),e(64,"F6"),e(65,"F7"),e(66,"F8"),e(67,"F9"),e(68,"F10"),e(69,"F11"),e(70,"F12"),e(71,"F13"),e(72,"F14"),e(73,"F15"),e(74,"F16"),e(75,"F17"),e(76,"F18"),e(77,"F19"),e(78,"NumLock"),e(79,"ScrollLock"),e(80,";",";","OEM_1"),e(81,"=","=","OEM_PLUS"),e(82,",",",","OEM_COMMA"),e(83,"-","-","OEM_MINUS"),e(84,".",".","OEM_PERIOD"),e(85,"/","/","OEM_2"),e(86,"`","`","OEM_3"),e(110,"ABNT_C1"),e(111,"ABNT_C2"),e(87,"[","[","OEM_4"),e(88,"\\","\\","OEM_5"),e(89,"]","]","OEM_6"),e(90,"'","'","OEM_7"),e(91,"OEM_8"),e(92,"OEM_102"),e(93,"NumPad0"),e(94,"NumPad1"),e(95,"NumPad2"),e(96,"NumPad3"),e(97,"NumPad4"),e(98,"NumPad5"),e(99,"NumPad6"),e(100,"NumPad7"),e(101,"NumPad8"),e(102,"NumPad9"),e(103,"NumPad_Multiply"),e(104,"NumPad_Add"),e(105,"NumPad_Separator"),e(106,"NumPad_Subtract"),e(107,"NumPad_Decimal"),e(108,"NumPad_Divide")}(),function(e){e.toString=function(e){return E.keyCodeToStr(e)},e.fromString=function(e){return E.strToKeyCode(e)},e.toUserSettingsUS=function(e){return A.keyCodeToStr(e)},e.toUserSettingsGeneral=function(e){return j.keyCodeToStr(e)},e.fromUserSettings=function(e){return A.strToKeyCode(e)||j.strToKeyCode(e)}}(C||(C={}));var z=function(){function e(e,t,n,i,o){this.type=1,this.ctrlKey=e,this.shiftKey=t,this.altKey=n,this.metaKey=i,this.keyCode=o}return e.prototype.equals=function(e){return 1===e.type&&this.ctrlKey===e.ctrlKey&&this.shiftKey===e.shiftKey&&this.altKey===e.altKey&&this.metaKey===e.metaKey&&this.keyCode===e.keyCode},e.prototype.isModifierKey=function(){return 0===this.keyCode||5===this.keyCode||57===this.keyCode||6===this.keyCode||4===this.keyCode},e.prototype.isDuplicateModifierCase=function(){return this.ctrlKey&&5===this.keyCode||this.shiftKey&&4===this.keyCode||this.altKey&&6===this.keyCode||this.metaKey&&57===this.keyCode},e}(),W=function(e,t){this.type=2,this.firstPart=e,this.chordPart=t},F=function(e,t,n,i,o,r){this.ctrlKey=e,this.shiftKey=t,this.altKey=n,this.metaKey=i,this.keyLabel=o,this.keyAriaLabel=r},B=n(94);function H(e,t){if(!e||null===e)throw new Error(t?"Assertion failed ("+t+")":"Assertion Failed")}var V=function(){function e(){this.data={}}return e.prototype.add=function(e,t){H(w.Kg(e)),H(w.Gv(t)),H(!this.data.hasOwnProperty(e),"There is already an extension with this id"),this.data[e]=t},e.prototype.as=function(e){return this.data[e]||null},e}(),U=new V,Y=function(){function e(){this._keybindings=[],this._keybindingsSorted=!0}return e.bindToCurrentPlatform=function(e){if(1===B.OS){if(e&&e.win)return e.win}else if(2===B.OS){if(e&&e.mac)return e.mac}else if(e&&e.linux)return e.linux;return e},e.prototype.registerKeybindingRule=function(t,n){void 0===n&&(n=0);var i=e.bindToCurrentPlatform(t);if(i&&i.primary&&this._registerDefaultKeybinding(R(i.primary,B.OS),t.id,t.weight,0,t.when,n),i&&Array.isArray(i.secondary))for(var o=0,r=i.secondary.length;o=21&&e<=30||e>=31&&e<=56||80===e||81===e||82===e||83===e||84===e||85===e||86===e||110===e||111===e||87===e||88===e||89===e||90===e||91===e||92===e},e.prototype._assertNoCtrlAlt=function(t,n){t.ctrlKey&&t.altKey&&!t.metaKey&&e._mightProduceChar(t.keyCode)&&console.warn("Ctrl+Alt+ keybindings should not be used by default under Windows. Offender: ",t," for ",n)},e.prototype._registerDefaultKeybinding=function(e,t,n,i,o,r){0===r&&1===B.OS&&(2===e.type?this._assertNoCtrlAlt(e.firstPart,t):this._assertNoCtrlAlt(e,t)),this._keybindings.push({keybinding:e,command:t,commandArgs:void 0,when:o,weight1:n,weight2:i}),this._keybindingsSorted=!1},e.prototype.getDefaultKeybindings=function(){return this._keybindingsSorted||(this._keybindings.sort(G),this._keybindingsSorted=!0),this._keybindings.slice(0)},e}(),Z=new Y;function G(e,t){return e.weight1!==t.weight1?e.weight1-t.weight1:e.commandt.command?1:e.weight2-t.weight2}U.add("platform.keybindingsRegistry",Z);var Q,q=(0,N.u1)("telemetryService"),K=n(3072),J=n(2337),X=n(2213),$=function(){function e(e,t,n,i,o){void 0===t&&(t=""),void 0===n&&(n=""),void 0===i&&(i=!0),this._onDidChange=new X.vl,this._id=e,this._label=t,this._cssClass=n,this._enabled=i,this._actionCallback=o}return e.prototype.dispose=function(){this._onDidChange.dispose()},Object.defineProperty(e.prototype,"onDidChange",{get:function(){return this._onDidChange.event},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"id",{get:function(){return this._id},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"label",{get:function(){return this._label},set:function(e){this._setLabel(e)},enumerable:!0,configurable:!0}),e.prototype._setLabel=function(e){this._label!==e&&(this._label=e,this._onDidChange.fire({label:e}))},Object.defineProperty(e.prototype,"tooltip",{get:function(){return this._tooltip},set:function(e){this._setTooltip(e)},enumerable:!0,configurable:!0}),e.prototype._setTooltip=function(e){this._tooltip!==e&&(this._tooltip=e,this._onDidChange.fire({tooltip:e}))},Object.defineProperty(e.prototype,"class",{get:function(){return this._cssClass},set:function(e){this._setClass(e)},enumerable:!0,configurable:!0}),e.prototype._setClass=function(e){this._cssClass!==e&&(this._cssClass=e,this._onDidChange.fire({class:e}))},Object.defineProperty(e.prototype,"enabled",{get:function(){return this._enabled},set:function(e){this._setEnabled(e)},enumerable:!0,configurable:!0}),e.prototype._setEnabled=function(e){this._enabled!==e&&(this._enabled=e,this._onDidChange.fire({enabled:e}))},Object.defineProperty(e.prototype,"checked",{get:function(){return this._checked},set:function(e){this._setChecked(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"radio",{get:function(){return this._radio},set:function(e){this._setRadio(e)},enumerable:!0,configurable:!0}),e.prototype._setChecked=function(e){this._checked!==e&&(this._checked=e,this._onDidChange.fire({checked:e}))},e.prototype._setRadio=function(e){this._radio!==e&&(this._radio=e,this._onDidChange.fire({radio:e}))},Object.defineProperty(e.prototype,"order",{get:function(){return this._order},set:function(e){this._order=e},enumerable:!0,configurable:!0}),e.prototype.run=function(e,t){return void 0!==this._actionCallback?this._actionCallback(e):J.g3.as(!0)},e}(),ee=function(){function e(){this._onDidBeforeRun=new X.vl,this._onDidRun=new X.vl}return Object.defineProperty(e.prototype,"onDidRun",{get:function(){return this._onDidRun.event},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onDidBeforeRun",{get:function(){return this._onDidBeforeRun.event},enumerable:!0,configurable:!0}),e.prototype.run=function(e,t){var n=this;return e.enabled?(this._onDidBeforeRun.fire({action:e}),this.runAction(e,t).then((function(t){n._onDidRun.fire({action:e,result:t})}),(function(t){n._onDidRun.fire({action:e,error:t})}))):J.g3.as(null)},e.prototype.runAction=function(e,t){var n=t?e.run(t):e.run();return J.g3.is(n)?n:J.g3.wrap(n)},e.prototype.dispose=function(){this._onDidBeforeRun.dispose(),this._onDidRun.dispose()},e}(),te=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();!function(e){e[e.Defined=1]="Defined",e[e.Not=2]="Not",e[e.Equals=3]="Equals",e[e.NotEquals=4]="NotEquals",e[e.And=5]="And",e[e.Regex=6]="Regex"}(Q||(Q={}));var ne=function(){function e(){}return e.has=function(e){return new oe(e)},e.equals=function(e,t){return new re(e,t)},e.regex=function(e,t){return new ue(e,t)},e.not=function(e){return new ae(e)},e.and=function(){for(var e=[],t=0;t=0){var t=e.split("!=");return new se(t[0].trim(),this._deserializeValue(t[1]))}return e.indexOf("==")>=0?(t=e.split("=="),new re(t[0].trim(),this._deserializeValue(t[1]))):e.indexOf("=~")>=0?(t=e.split("=~"),new ue(t[0].trim(),this._deserializeRegexValue(t[1]))):/^\!\s*/.test(e)?new ae(e.substr(1).trim()):new oe(e)},e._deserializeValue=function(e){if("true"===(e=e.trim()))return!0;if("false"===e)return!1;var t=/^'([^']*)'$/.exec(e);return t?t[1].trim():e},e._deserializeRegexValue=function(e){if((0,p.isFalsyOrWhitespace)(e))return console.warn("missing regexp-value for =~-expression"),null;var t=e.indexOf("/"),n=e.lastIndexOf("/");if(t===n||t<0)return console.warn("bad regexp-value '"+e+"', missing /-enclosure"),null;var i=e.slice(t+1,n),o="i"===e[n+1]?"i":"";try{return new RegExp(i,o)}catch(t){return console.warn("bad regexp-value '"+e+"', parse error: "+t),null}},e}();function ie(e,t){var n=e.getType(),i=t.getType();if(n!==i)return n-i;switch(n){case Q.Defined:case Q.Not:case Q.Equals:case Q.NotEquals:case Q.Regex:return e.cmp(t);default:throw new Error("Unknown ContextKeyExpr!")}}var oe=function(){function e(e){this.key=e}return e.prototype.getType=function(){return Q.Defined},e.prototype.cmp=function(e){return this.keye.key?1:0},e.prototype.equals=function(t){return t instanceof e&&this.key===t.key},e.prototype.evaluate=function(e){return!!e.getValue(this.key)},e.prototype.normalize=function(){return this},e.prototype.keys=function(){return[this.key]},e}(),re=function(){function e(e,t){this.key=e,this.value=t}return e.prototype.getType=function(){return Q.Equals},e.prototype.cmp=function(e){return this.keye.key?1:this.valuee.value?1:0},e.prototype.equals=function(t){return t instanceof e&&this.key===t.key&&this.value===t.value},e.prototype.evaluate=function(e){return e.getValue(this.key)==this.value},e.prototype.normalize=function(){return"boolean"==typeof this.value?this.value?new oe(this.key):new ae(this.key):this},e.prototype.keys=function(){return[this.key]},e}(),se=function(){function e(e,t){this.key=e,this.value=t}return e.prototype.getType=function(){return Q.NotEquals},e.prototype.cmp=function(e){return this.keye.key?1:this.valuee.value?1:0},e.prototype.equals=function(t){return t instanceof e&&this.key===t.key&&this.value===t.value},e.prototype.evaluate=function(e){return e.getValue(this.key)!=this.value},e.prototype.normalize=function(){return"boolean"==typeof this.value?this.value?new ae(this.key):new oe(this.key):this},e.prototype.keys=function(){return[this.key]},e}(),ae=function(){function e(e){this.key=e}return e.prototype.getType=function(){return Q.Not},e.prototype.cmp=function(e){return this.keye.key?1:0},e.prototype.equals=function(t){return t instanceof e&&this.key===t.key},e.prototype.evaluate=function(e){return!e.getValue(this.key)},e.prototype.normalize=function(){return this},e.prototype.keys=function(){return[this.key]},e}(),ue=function(){function e(e,t){this.key=e,this.regexp=t}return e.prototype.getType=function(){return Q.Regex},e.prototype.cmp=function(e){if(this.keye.key)return 1;var t=this.regexp?this.regexp.source:void 0;return te.regexp.source?1:0},e.prototype.equals=function(t){if(t instanceof e){var n=this.regexp?this.regexp.source:void 0;return this.key===t.key&&n===t.regexp.source}return!1},e.prototype.evaluate=function(e){return!!this.regexp&&this.regexp.test(e.getValue(this.key))},e.prototype.normalize=function(){return this},e.prototype.keys=function(){return[this.key]},e}(),le=function(){function e(t){this.expr=e._normalizeArr(t)}return e.prototype.getType=function(){return Q.And},e.prototype.equals=function(t){if(t instanceof e){if(this.expr.length!==t.expr.length)return!1;for(var n=0,i=this.expr.length;n=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},pe=function(e,t){return function(n,i){t(n,i,e)}};function ge(e){return void 0!==e.command}var me,ve=function(){function e(){this.id=String(e.ID++)}return e.ID=1,e.EditorContext=new e,e.CommandPalette=new e,e.MenubarEditMenu=new e,e.MenubarSelectionMenu=new e,e}(),ye=(0,N.u1)("menuService"),be=new(function(){function e(){this._commands=Object.create(null),this._menuItems=Object.create(null)}return e.prototype.addCommand=function(e){var t=this._commands[e.id];return this._commands[e.id]=e,void 0!==t},e.prototype.getCommand=function(e){return this._commands[e]},e.prototype.appendMenuItem=function(e,t){var n=e.id,i=this._menuItems[n];return i?i.push(t):this._menuItems[n]=i=[t],{dispose:function(){var e=i.indexOf(t);e>=0&&i.splice(e,1)}}},e.prototype.getMenuItems=function(e){var t=e.id,n=this._menuItems[t]||[];return t===ve.CommandPalette.id&&this._appendImplicitItems(n),n},e.prototype._appendImplicitItems=function(e){for(var t=new Set,n=0,i=e.filter((function(e){return ge(e)}));no,h=i>a,d=ia)continue;if(bi)continue;if(y1&&o--,this.columnSelect(e,t,n.selection,i,o)},e.columnSelectRight=function(e,t,n,i,o){for(var s=0,a=Math.min(n.position.lineNumber,i),u=Math.max(n.position.lineNumber,i),c=a;c<=u;c++){var h=t.getLineMaxColumn(c),d=l.A_.visibleColumnFromColumn2(e,t,new r.y(c,h));s=Math.max(s,d)}return ot.getLineCount()&&(o=t.getLineCount()),this.columnSelect(e,t,n.selection,o,r)},e}();!function(e){e.editorTextFocus=new ce("editorTextFocus",!1),e.focus=new ce("editorFocus",!1),e.textInputFocus=new ce("textInputFocus",!1),e.readOnly=new ce("editorReadonly",!1),e.writable=e.readOnly.toNegated(),e.hasNonEmptySelection=new ce("editorHasSelection",!1),e.hasOnlyEmptySelection=e.hasNonEmptySelection.toNegated(),e.hasMultipleSelections=new ce("editorHasMultipleSelections",!1),e.hasSingleSelection=e.hasMultipleSelections.toNegated(),e.tabMovesFocus=new ce("editorTabMovesFocus",!1),e.tabDoesNotMoveFocus=e.tabMovesFocus.toNegated(),e.isInEmbeddedEditor=new ce("isInEmbeddedEditor",void 0),e.canUndo=new ce("canUndo",!1),e.canRedo=new ce("canRedo",!1),e.languageId=new ce("editorLangId",void 0),e.hasCompletionItemProvider=new ce("editorHasCompletionItemProvider",void 0),e.hasCodeActionsProvider=new ce("editorHasCodeActionsProvider",void 0),e.hasCodeLensProvider=new ce("editorHasCodeLensProvider",void 0),e.hasDefinitionProvider=new ce("editorHasDefinitionProvider",void 0),e.hasImplementationProvider=new ce("editorHasImplementationProvider",void 0),e.hasTypeDefinitionProvider=new ce("editorHasTypeDefinitionProvider",void 0),e.hasHoverProvider=new ce("editorHasHoverProvider",void 0),e.hasDocumentHighlightProvider=new ce("editorHasDocumentHighlightProvider",void 0),e.hasDocumentSymbolProvider=new ce("editorHasDocumentSymbolProvider",void 0),e.hasReferenceProvider=new ce("editorHasReferenceProvider",void 0),e.hasRenameProvider=new ce("editorHasRenameProvider",void 0),e.hasDocumentFormattingProvider=new ce("editorHasDocumentFormattingProvider",void 0),e.hasDocumentSelectionFormattingProvider=new ce("editorHasDocumentSelectionFormattingProvider",void 0),e.hasSignatureHelpProvider=new ce("editorHasSignatureHelpProvider",void 0)}(Oe||(Oe={}));var Pe,ze,We,Fe,Be=n(799),He=function(){function e(e,t,n){void 0===n&&(n=!1),this._range=e,this._text=t,this.insertsAutoWhitespace=n}return e.prototype.getEditOperations=function(e,t){t.addTrackedEditOperation(this._range,this._text)},e.prototype.computeCursorState=function(e,t){var n=t.getInverseEditOperations()[0].range;return new Be.L(n.endLineNumber,n.endColumn,n.endLineNumber,n.endColumn)},e}(),Ve=function(){function e(e,t,n){void 0===n&&(n=!1),this._range=e,this._text=t,this.insertsAutoWhitespace=n}return e.prototype.getEditOperations=function(e,t){t.addTrackedEditOperation(this._range,this._text)},e.prototype.computeCursorState=function(e,t){var n=t.getInverseEditOperations()[0].range;return new Be.L(n.startLineNumber,n.startColumn,n.startLineNumber,n.startColumn)},e}(),Ue=function(){function e(e,t,n,i,o){void 0===o&&(o=!1),this._range=e,this._text=t,this._columnDeltaOffset=i,this._lineNumberDeltaOffset=n,this.insertsAutoWhitespace=o}return e.prototype.getEditOperations=function(e,t){t.addTrackedEditOperation(this._range,this._text)},e.prototype.computeCursorState=function(e,t){var n=t.getInverseEditOperations()[0].range;return new Be.L(n.endLineNumber+this._lineNumberDeltaOffset,n.endColumn+this._columnDeltaOffset,n.endLineNumber+this._lineNumberDeltaOffset,n.endColumn+this._columnDeltaOffset)},e}(),Ye=function(){function e(e,t,n){this._range=e,this._text=t,this._initialSelection=n}return e.prototype.getEditOperations=function(e,t){t.addEditOperation(this._range,this._text),this._selectionId=t.trackSelection(this._initialSelection)},e.prototype.computeCursorState=function(e,t){return t.getTrackedSelection(this._selectionId)},e}(),Ze=n(99),Ge=n(7623),Qe=n(5074),qe=function(){function e(e,t,n){this._range=e,this._charBeforeSelection=t,this._charAfterSelection=n}return e.prototype.getEditOperations=function(e,t){t.addTrackedEditOperation(new s.Q(this._range.startLineNumber,this._range.startColumn,this._range.startLineNumber,this._range.startColumn),this._charBeforeSelection),t.addTrackedEditOperation(new s.Q(this._range.endLineNumber,this._range.endColumn,this._range.endLineNumber,this._range.endColumn),this._charAfterSelection)},e.prototype.computeCursorState=function(e,t){var n=t.getInverseEditOperations(),i=n[0].range,o=n[1].range;return new Be.L(i.endLineNumber,i.endColumn,o.endLineNumber,o.endColumn-this._charAfterSelection.length)},e}(),Ke=function(){function e(){}return e.indent=function(e,t,n){for(var i=[],o=0,r=n.length;o1){var u=i-1;for(u=i-1;u>=1;u--){var l=n.getLineContent(u);if(p.lastNonWhitespaceIndex(l)>=0)break}if(u<1)return null;var c=n.getLineMaxColumn(u),h=Ge.cx.getEnterAction(n,new s.Q(u,c,u,c));h&&(r=h.indentation,(o=h.enterAction)&&(r+=o.appendText))}return o&&(o===Qe.l.Indent&&(r=e.shiftIndent(t,r)),o===Qe.l.Outdent&&(r=e.unshiftIndent(t,r)),r=t.normalizeIndentation(r)),r||null},e._replaceJumpToNextIndent=function(e,t,n,i){var o="",r=n.getStartPosition();if(e.insertSpaces)for(var s=l.A_.visibleColumnFromColumn2(e,t,r),a=e.tabSize,u=a-s%a,c=0;c=0?o.setEndPosition(o.endLineNumber,Math.max(o.endColumn,I+1)):o.setEndPosition(o.endLineNumber,n.getLineMaxColumn(o.endLineNumber)),i)return new Ve(o,S+t.normalizeIndentation(b.afterEnter),!0);var N=0;return C<=I+1&&(t.insertSpaces||(M=Math.ceil(M/t.tabSize)),N=Math.min(M+1-t.normalizeIndentation(b.afterEnter).length-1,0)),new Ue(o,S+t.normalizeIndentation(b.afterEnter),0,N,!0)}return e._typeCommand(o,"\n"+t.normalizeIndentation(w),i)},e._isAutoIndentType=function(e,t,n){if(!e.autoIndent)return!1;for(var i=0,o=n.length;i1){var c=(0,f.i)(t.wordSeparators),h=l.charCodeAt(u.column-2);if(0===c.get(h))return!1}var d=l.charAt(u.column-1);if(d&&!e._isBeforeClosingBrace(t,o,d)&&!/\s/.test(d))return!1;if(!n.isCheapToTokenize(u.lineNumber))return!1;n.forceTokenization(u.lineNumber);var p=n.getLineTokens(u.lineNumber),g=!1;try{g=Ge.cx.shouldAutoClosePair(o,p,u.column)}catch(e){(0,S.dz)(e)}if(!g)return!1}return!0},e._runAutoClosingOpenCharType=function(e,t,n,i,o){for(var r=[],s=0,a=i.length;s2){var d=(0,f.i)(n.wordSeparators),p=u.charCodeAt(a.column-3);if(0===d.get(p))continue}var g=u.charAt(a.column-1);if(g&&!e._isBeforeClosingBrace(n,c,g)&&!/\s/.test(g))continue;if(!i.isCheapToTokenize(a.lineNumber))continue;i.forceTokenization(a.lineNumber);var m=i.getLineTokens(a.lineNumber),v=!1;try{v=Ge.cx.shouldAutoClosePair(c,m,a.column-1)}catch(e){(0,S.dz)(e)}if(v){var y=n.autoClosingPairsOpen[c];r[s]=new Ue(o[s],y,0,-y.length)}}}return new l.vY(1,r,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})},e.typeWithInterceptors=function(t,n,i,o,r){if("\n"===r){for(var s=[],a=0,u=o.length;a1){var g=n.getLineContent(f.lineNumber),m=p.firstNonWhitespaceIndex(g),v=-1===m?g.length+1:m+1;if(f.column<=v){var y=l.A_.visibleColumnFromColumn2(t,n,f),b=l.A_.prevTabStop(y,t.tabSize),_=l.A_.columnFromVisibleColumn2(t,n,f.lineNumber,b);h=new s.Q(f.lineNumber,_,f.lineNumber,f.column)}else h=new s.Q(f.lineNumber,f.column-1,f.lineNumber,f.column)}else{var w=d.left(t,n,f.lineNumber,f.column);h=new s.Q(w.lineNumber,w.column,f.lineNumber,f.column)}}h.isEmpty()?o[a]=null:(h.startLineNumber!==h.endLineNumber&&(r=!0),o[a]=new He(h,""))}return[r,o]},e.cut=function(e,t,n){for(var i=[],o=0,r=n.length;o1?(c=u.lineNumber-1,h=t.getLineMaxColumn(u.lineNumber-1),d=u.lineNumber,f=t.getLineMaxColumn(u.lineNumber)):(c=u.lineNumber,h=1,d=u.lineNumber,f=t.getLineMaxColumn(u.lineNumber));var p=new s.Q(c,h,d,f);p.isEmpty()?i[o]=null:i[o]=new He(p,"")}else i[o]=null;else i[o]=new He(a,"")}return new l.vY(0,i,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})},e}(),Xe=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),$e=u,et=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Xe(t,e),t.prototype.runEditorCommand=function(e,t,n){var i=t._getCursors();i&&this.runCoreEditorCommand(i,n||{})},t}(Ne);function tt(e){return e.get(Ce).getFocusedCodeEditor()}function nt(e){e.register()}!function(e){e.description={description:"Scroll editor in the given direction",args:[{name:"Editor scroll argument object",description:"Property-value pairs that can be passed through this argument:\n\t\t\t\t\t* 'to': A mandatory direction value.\n\t\t\t\t\t\t```\n\t\t\t\t\t\t'up', 'down'\n\t\t\t\t\t\t```\n\t\t\t\t\t* 'by': Unit to move. Default is computed based on 'to' value.\n\t\t\t\t\t\t```\n\t\t\t\t\t\t'line', 'wrappedLine', 'page', 'halfPage'\n\t\t\t\t\t\t```\n\t\t\t\t\t* 'value': Number of units to move. Default is '1'.\n\t\t\t\t\t* 'revealCursor': If 'true' reveals the cursor if it is outside view port.\n\t\t\t\t",constraint:function(e){if(!w.Gv(e))return!1;var t=e;return!(!w.Kg(t.to)||!w.b0(t.by)&&!w.Kg(t.by)||!w.b0(t.value)&&!w.Et(t.value)||!w.b0(t.revealCursor)&&!w.Lm(t.revealCursor))}}]},e.RawDirection={Up:"up",Down:"down"},e.RawUnit={Line:"line",WrappedLine:"wrappedLine",Page:"page",HalfPage:"halfPage"},e.parse=function(t){var n,i;switch(t.to){case e.RawDirection.Up:n=1;break;case e.RawDirection.Down:n=2;break;default:return null}switch(t.by){case e.RawUnit.Line:i=1;break;case e.RawUnit.WrappedLine:i=2;break;case e.RawUnit.Page:i=3;break;case e.RawUnit.HalfPage:i=4;break;default:i=2}return{direction:n,unit:i,value:Math.floor(t.value||1),revealCursor:!!t.revealCursor,select:!!t.select}}}(Pe||(Pe={})),function(e){e.description={description:"Reveal the given line at the given logical position",args:[{name:"Reveal line argument object",description:"Property-value pairs that can be passed through this argument:\n\t\t\t\t\t* 'lineNumber': A mandatory line number value.\n\t\t\t\t\t* 'at': Logical position at which line has to be revealed .\n\t\t\t\t\t\t```\n\t\t\t\t\t\t'top', 'center', 'bottom'\n\t\t\t\t\t\t```\n\t\t\t\t",constraint:function(e){if(!w.Gv(e))return!1;var t=e;return!(!w.Et(t.lineNumber)||!w.b0(t.at)&&!w.Kg(t.at))}}]},e.RawAtArgument={Top:"top",Center:"center",Bottom:"bottom"}}(ze||(ze={})),function(e){var t=function(e){function t(t){var n=e.call(this,t)||this;return n._inSelectionMode=t.inSelectionMode,n}return Xe(t,e),t.prototype.runCoreEditorCommand=function(e,t){e.context.model.pushStackElement(),e.setStates(t.source,i.Explicit,[M.moveTo(e.context,e.getPrimaryCursor(),this._inSelectionMode,t.position,t.viewPosition)]),e.reveal(!0,0,0)},t}(et);e.MoveTo=Te(new t({id:"_moveTo",inSelectionMode:!1,precondition:null})),e.MoveToSelect=Te(new t({id:"_moveToSelect",inSelectionMode:!0,precondition:null}));var n=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Xe(t,e),t.prototype.runCoreEditorCommand=function(e,t){e.context.model.pushStackElement();var n=this._getColumnSelectResult(e.context,e.getPrimaryCursor(),e.getColumnSelectData(),t);e.setStates(t.source,i.Explicit,n.viewStates.map((function(e){return l.MF.fromViewState(e)}))),e.setColumnSelectData({toViewLineNumber:n.toLineNumber,toViewVisualColumn:n.toVisualColumn}),e.reveal(!0,n.reversed?1:2,0)},t}(et);e.ColumnSelect=Te(new(function(e){function t(){return e.call(this,{id:"columnSelect",precondition:null})||this}return Xe(t,e),t.prototype._getColumnSelectResult=function(e,t,n,i){var o,s=e.model.validatePosition(i.position);return o=i.viewPosition?e.validateViewPosition(new r.y(i.viewPosition.lineNumber,i.viewPosition.column),s):e.convertModelPositionToViewPosition(s),Re.columnSelect(e.config,e.viewModel,t.viewState.selection,o.lineNumber,i.mouseColumn-1)},t}(n))),e.CursorColumnSelectLeft=Te(new(function(e){function t(){return e.call(this,{id:"cursorColumnSelectLeft",precondition:null,kbOpts:{weight:0,kbExpr:Oe.textInputFocus,primary:3599,linux:{primary:0}}})||this}return Xe(t,e),t.prototype._getColumnSelectResult=function(e,t,n,i){return Re.columnSelectLeft(e.config,e.viewModel,t.viewState,n.toViewLineNumber,n.toViewVisualColumn)},t}(n))),e.CursorColumnSelectRight=Te(new(function(e){function t(){return e.call(this,{id:"cursorColumnSelectRight",precondition:null,kbOpts:{weight:0,kbExpr:Oe.textInputFocus,primary:3601,linux:{primary:0}}})||this}return Xe(t,e),t.prototype._getColumnSelectResult=function(e,t,n,i){return Re.columnSelectRight(e.config,e.viewModel,t.viewState,n.toViewLineNumber,n.toViewVisualColumn)},t}(n)));var o=function(e){function t(t){var n=e.call(this,t)||this;return n._isPaged=t.isPaged,n}return Xe(t,e),t.prototype._getColumnSelectResult=function(e,t,n,i){return Re.columnSelectUp(e.config,e.viewModel,t.viewState,this._isPaged,n.toViewLineNumber,n.toViewVisualColumn)},t}(n);e.CursorColumnSelectUp=Te(new o({isPaged:!1,id:"cursorColumnSelectUp",precondition:null,kbOpts:{weight:0,kbExpr:Oe.textInputFocus,primary:3600,linux:{primary:0}}})),e.CursorColumnSelectPageUp=Te(new o({isPaged:!0,id:"cursorColumnSelectPageUp",precondition:null,kbOpts:{weight:0,kbExpr:Oe.textInputFocus,primary:3595,linux:{primary:0}}}));var a=function(e){function t(t){var n=e.call(this,t)||this;return n._isPaged=t.isPaged,n}return Xe(t,e),t.prototype._getColumnSelectResult=function(e,t,n,i){return Re.columnSelectDown(e.config,e.viewModel,t.viewState,this._isPaged,n.toViewLineNumber,n.toViewVisualColumn)},t}(n);e.CursorColumnSelectDown=Te(new a({isPaged:!1,id:"cursorColumnSelectDown",precondition:null,kbOpts:{weight:0,kbExpr:Oe.textInputFocus,primary:3602,linux:{primary:0}}})),e.CursorColumnSelectPageDown=Te(new a({isPaged:!0,id:"cursorColumnSelectPageDown",precondition:null,kbOpts:{weight:0,kbExpr:Oe.textInputFocus,primary:3596,linux:{primary:0}}}));var u=function(e){function t(){return e.call(this,{id:"cursorMove",precondition:null,description:b.description})||this}return Xe(t,e),t.prototype.runCoreEditorCommand=function(e,t){var n=b.parse(t);n&&this._runCursorMove(e,t.source,n)},t.prototype._runCursorMove=function(e,t,n){e.context.model.pushStackElement(),e.setStates(t,i.Explicit,M.move(e.context,e.getAll(),n)),e.reveal(!0,0,0)},t}(et);e.CursorMoveImpl=u,e.CursorMove=Te(new u);var c=function(t){function n(e){var n=t.call(this,e)||this;return n._staticArgs=e.args,n}return Xe(n,t),n.prototype.runCoreEditorCommand=function(t,n){var i=this._staticArgs;-1===this._staticArgs.value&&(i={direction:this._staticArgs.direction,unit:this._staticArgs.unit,select:this._staticArgs.select,value:t.context.config.pageSize}),e.CursorMove._runCursorMove(t,n.source,i)},n}(et);e.CursorLeft=Te(new c({args:{direction:0,unit:0,select:!1,value:1},id:"cursorLeft",precondition:null,kbOpts:{weight:0,kbExpr:Oe.textInputFocus,primary:15,mac:{primary:15,secondary:[288]}}})),e.CursorLeftSelect=Te(new c({args:{direction:0,unit:0,select:!0,value:1},id:"cursorLeftSelect",precondition:null,kbOpts:{weight:0,kbExpr:Oe.textInputFocus,primary:1039}})),e.CursorRight=Te(new c({args:{direction:1,unit:0,select:!1,value:1},id:"cursorRight",precondition:null,kbOpts:{weight:0,kbExpr:Oe.textInputFocus,primary:17,mac:{primary:17,secondary:[292]}}})),e.CursorRightSelect=Te(new c({args:{direction:1,unit:0,select:!0,value:1},id:"cursorRightSelect",precondition:null,kbOpts:{weight:0,kbExpr:Oe.textInputFocus,primary:1041}})),e.CursorUp=Te(new c({args:{direction:2,unit:2,select:!1,value:1},id:"cursorUp",precondition:null,kbOpts:{weight:0,kbExpr:Oe.textInputFocus,primary:16,mac:{primary:16,secondary:[302]}}})),e.CursorUpSelect=Te(new c({args:{direction:2,unit:2,select:!0,value:1},id:"cursorUpSelect",precondition:null,kbOpts:{weight:0,kbExpr:Oe.textInputFocus,primary:1040,secondary:[3088],mac:{primary:1040},linux:{primary:1040}}})),e.CursorPageUp=Te(new c({args:{direction:2,unit:2,select:!1,value:-1},id:"cursorPageUp",precondition:null,kbOpts:{weight:0,kbExpr:Oe.textInputFocus,primary:11}})),e.CursorPageUpSelect=Te(new c({args:{direction:2,unit:2,select:!0,value:-1},id:"cursorPageUpSelect",precondition:null,kbOpts:{weight:0,kbExpr:Oe.textInputFocus,primary:1035}})),e.CursorDown=Te(new c({args:{direction:3,unit:2,select:!1,value:1},id:"cursorDown",precondition:null,kbOpts:{weight:0,kbExpr:Oe.textInputFocus,primary:18,mac:{primary:18,secondary:[300]}}})),e.CursorDownSelect=Te(new c({args:{direction:3,unit:2,select:!0,value:1},id:"cursorDownSelect",precondition:null,kbOpts:{weight:0,kbExpr:Oe.textInputFocus,primary:1042,secondary:[3090],mac:{primary:1042},linux:{primary:1042}}})),e.CursorPageDown=Te(new c({args:{direction:3,unit:2,select:!1,value:-1},id:"cursorPageDown",precondition:null,kbOpts:{weight:0,kbExpr:Oe.textInputFocus,primary:12}})),e.CursorPageDownSelect=Te(new c({args:{direction:3,unit:2,select:!0,value:-1},id:"cursorPageDownSelect",precondition:null,kbOpts:{weight:0,kbExpr:Oe.textInputFocus,primary:1036}})),e.CreateCursor=Te(new(function(e){function t(){return e.call(this,{id:"createCursor",precondition:null})||this}return Xe(t,e),t.prototype.runCoreEditorCommand=function(e,t){var n,o=e.context;n=t.wholeLine?M.line(o,e.getPrimaryCursor(),!1,t.position,t.viewPosition):M.moveTo(o,e.getPrimaryCursor(),!1,t.position,t.viewPosition);var r=e.getAll();if(r.length>1)for(var s=n.modelState?n.modelState.position:null,a=n.viewState?n.viewState.position:null,u=0,l=r.length;uo&&(i=o);var r=new s.Q(i,1,i,e.context.model.getLineMaxColumn(i)),a=0;if(n.at)switch(n.at){case ze.RawAtArgument.Top:a=3;break;case ze.RawAtArgument.Center:a=1;break;case ze.RawAtArgument.Bottom:a=4}var u=e.context.convertModelRangeToViewRange(r);e.revealRange(!1,u,a,0)},t}(et))),e.SelectAll=Te(new(function(e){function t(){return e.call(this,{id:"selectAll",precondition:null})||this}return Xe(t,e),t.prototype.runCoreEditorCommand=function(e,t){e.context.model.pushStackElement(),e.setStates(t.source,i.Explicit,[M.selectAll(e.context,e.getPrimaryCursor())])},t}(et))),e.SetSelection=Te(new(function(e){function t(){return e.call(this,{id:"setSelection",precondition:null})||this}return Xe(t,e),t.prototype.runCoreEditorCommand=function(e,t){e.context.model.pushStackElement(),e.setStates(t.source,i.Explicit,[l.MF.fromModelSelection(t.selection)])},t}(et)))}(We||(We={})),function(e){e.LineBreakInsert=Te(new(function(e){function t(){return e.call(this,{id:"lineBreakInsert",precondition:Oe.writable,kbOpts:{weight:0,kbExpr:Oe.textInputFocus,primary:null,mac:{primary:301}}})||this}return Xe(t,e),t.prototype.runEditorCommand=function(e,t,n){t.pushUndoStop(),t.executeCommands(this.id,Ke.lineBreakInsert(t._getCursorConfiguration(),t.getModel(),t.getSelections()))},t}(Ne))),e.Outdent=Te(new(function(e){function t(){return e.call(this,{id:"outdent",precondition:Oe.writable,kbOpts:{weight:0,kbExpr:ne.and(Oe.editorTextFocus,Oe.tabDoesNotMoveFocus),primary:1026}})||this}return Xe(t,e),t.prototype.runEditorCommand=function(e,t,n){t.pushUndoStop(),t.executeCommands(this.id,Ke.outdent(t._getCursorConfiguration(),t.getModel(),t.getSelections())),t.pushUndoStop()},t}(Ne))),e.Tab=Te(new(function(e){function t(){return e.call(this,{id:"tab",precondition:Oe.writable,kbOpts:{weight:0,kbExpr:ne.and(Oe.editorTextFocus,Oe.tabDoesNotMoveFocus),primary:2}})||this}return Xe(t,e),t.prototype.runEditorCommand=function(e,t,n){t.pushUndoStop(),t.executeCommands(this.id,Ke.tab(t._getCursorConfiguration(),t.getModel(),t.getSelections())),t.pushUndoStop()},t}(Ne))),e.DeleteLeft=Te(new(function(e){function t(){return e.call(this,{id:"deleteLeft",precondition:Oe.writable,kbOpts:{weight:0,kbExpr:Oe.textInputFocus,primary:1,secondary:[1025],mac:{primary:1,secondary:[1025,294,257]}}})||this}return Xe(t,e),t.prototype.runEditorCommand=function(e,t,n){var i=t._getCursors(),o=Je.deleteLeft(i.getPrevEditOperationType(),t._getCursorConfiguration(),t.getModel(),t.getSelections()),r=o[0],s=o[1];r&&t.pushUndoStop(),t.executeCommands(this.id,s),i.setPrevEditOperationType(2)},t}(Ne))),e.DeleteRight=Te(new(function(e){function t(){return e.call(this,{id:"deleteRight",precondition:Oe.writable,kbOpts:{weight:0,kbExpr:Oe.textInputFocus,primary:20,mac:{primary:20,secondary:[290,276]}}})||this}return Xe(t,e),t.prototype.runEditorCommand=function(e,t,n){var i=t._getCursors(),o=Je.deleteRight(i.getPrevEditOperationType(),t._getCursorConfiguration(),t.getModel(),t.getSelections()),r=o[0],s=o[1];r&&t.pushUndoStop(),t.executeCommands(this.id,s),i.setPrevEditOperationType(3)},t}(Ne)))}(Fe||(Fe={}));var it=function(e){function t(t){var n=e.call(this,t)||this;return n._editorHandler=t.editorHandler,n._inputHandler=t.inputHandler,n}return Xe(t,e),t.prototype.runCommand=function(e,t){var n=tt(e);if(n&&n.hasTextFocus())return this._runEditorHandler(n,t);var i=document.activeElement;if(!(i&&["input","textarea"].indexOf(i.tagName.toLowerCase())>=0)){var o=e.get(Ce).getActiveCodeEditor();return o?(o.focus(),this._runEditorHandler(o,t)):void 0}document.execCommand(this._inputHandler)},t.prototype._runEditorHandler=function(e,t){var n=this._editorHandler;"string"==typeof n?e.trigger("keyboard",n,t):((t=t||{}).source="keyboard",n.runEditorCommand(null,e,t))},t}(Ie),ot=function(e){function t(t,n){var i=e.call(this,{id:t,precondition:null})||this;return i._handlerId=n,i}return Xe(t,e),t.prototype.runCommand=function(e,t){var n=tt(e);n&&n.trigger("keyboard",this._handlerId,t)},t}(Ie);function rt(e){nt(new ot("default:"+e,e)),nt(new ot(e,e))}nt(new it({editorHandler:We.SelectAll,inputHandler:"selectAll",id:"editor.action.selectAll",precondition:Oe.textInputFocus,kbOpts:{weight:0,kbExpr:null,primary:2079},menubarOpts:{menuId:ve.MenubarSelectionMenu,group:"1_basic",title:o.k({key:"miSelectAll",comment:["&& denotes a mnemonic"]},"&&Select All"),order:1}})),nt(new it({editorHandler:$e.Undo,inputHandler:"undo",id:$e.Undo,precondition:Oe.writable,kbOpts:{weight:0,kbExpr:Oe.textInputFocus,primary:2104},menubarOpts:{menuId:ve.MenubarEditMenu,group:"1_do",title:o.k({key:"miUndo",comment:["&& denotes a mnemonic"]},"&&Undo"),order:1}})),nt(new ot("default:"+$e.Undo,$e.Undo)),nt(new it({editorHandler:$e.Redo,inputHandler:"redo",id:$e.Redo,precondition:Oe.writable,kbOpts:{weight:0,kbExpr:Oe.textInputFocus,primary:2103,secondary:[3128],mac:{primary:3128}},menubarOpts:{menuId:ve.MenubarEditMenu,group:"1_do",title:o.k({key:"miRedo",comment:["&& denotes a mnemonic"]},"&&Redo"),order:2}})),nt(new ot("default:"+$e.Redo,$e.Redo)),rt($e.Type),rt($e.ReplacePreviousChar),rt($e.CompositionStart),rt($e.CompositionEnd),rt($e.Paste),rt($e.Cut),n(9268),n(8189);var st,at=Object.freeze((function(e,t){var n=setTimeout(e.bind(t),0);return{dispose:function(){clearTimeout(n)}}}));!function(e){e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:X.Jh.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:at})}(st||(st={}));var ut=function(){function e(){this._isCancelled=!1}return e.prototype.cancel=function(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))},Object.defineProperty(e.prototype,"isCancellationRequested",{get:function(){return this._isCancelled},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onCancellationRequested",{get:function(){return this._isCancelled?at:(this._emitter||(this._emitter=new X.vl),this._emitter.event)},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){this._emitter&&(this._emitter.dispose(),this._emitter=void 0)},e}(),lt=function(){function e(){}return Object.defineProperty(e.prototype,"token",{get:function(){return this._token||(this._token=new ut),this._token},enumerable:!0,configurable:!0}),e.prototype.cancel=function(){this._token?this._token instanceof ut&&this._token.cancel():this._token=st.Cancelled},e.prototype.dispose=function(){this._token?this._token instanceof ut&&this._token.dispose():this._token=st.None},e}(),ct=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();function ht(e){return e&&"function"==typeof e.then}function dt(e){return ht(e)?e:J.g3.as(e)}function ft(e){var t=new lt,n=e(t.token),i=new Promise((function(e,i){t.token.onCancellationRequested((function(){i(S.aD())})),Promise.resolve(n).then((function(n){t.dispose(),e(n)}),(function(e){t.dispose(),i(e)}))}));return new(function(){function e(){}return e.prototype.cancel=function(){t.cancel()},e.prototype.then=function(e,t){return i.then(e,t)},e.prototype.catch=function(e){return this.then(void 0,e)},e}())}function pt(e){var t=new lt;return new J.g3((function(n,i,o){var r=e(t.token);r instanceof J.g3?r.then((function(e){t.dispose(),n(e)}),(function(e){t.dispose(),i(e)}),o):ht(r)?r.then((function(e){t.dispose(),n(e)}),(function(e){t.dispose(),i(e)})):(t.dispose(),n(r))}),(function(){t.cancel()}))}var gt=function(){function e(){this.activePromise=null,this.queuedPromise=null,this.queuedPromiseFactory=null}return e.prototype.queue=function(e){var t=this;if(this.activePromise){if(this.queuedPromiseFactory=e,!this.queuedPromise){var n=function(){t.queuedPromise=null;var e=t.queue(t.queuedPromiseFactory);return t.queuedPromiseFactory=null,e};this.queuedPromise=new J.g3((function(e,i,o){t.activePromise.then(n,n,o).done(e)}),(function(){t.activePromise.cancel()}))}return new J.g3((function(e,n,i){t.queuedPromise.then(e,n,i)}),(function(){}))}return this.activePromise=e(),new J.g3((function(e,n,i){t.activePromise.done((function(n){t.activePromise=null,e(n)}),(function(e){t.activePromise=null,n(e)}),i)}),(function(){t.activePromise.cancel()}))},e}(),mt=function(){function e(e){this.defaultDelay=e,this.timeout=null,this.completionPromise=null,this.onSuccess=null,this.task=null}return e.prototype.trigger=function(e,t){var n=this;return void 0===t&&(t=this.defaultDelay),this.task=e,this.cancelTimeout(),this.completionPromise||(this.completionPromise=new J.g3((function(e){n.onSuccess=e}),(function(){})).then((function(){n.completionPromise=null,n.onSuccess=null;var e=n.task;return n.task=null,e()}))),this.timeout=setTimeout((function(){n.timeout=null,n.onSuccess(null)}),t),this.completionPromise},e.prototype.cancel=function(){this.cancelTimeout(),this.completionPromise&&(this.completionPromise.cancel(),this.completionPromise=null)},e.prototype.cancelTimeout=function(){null!==this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},e}(),vt=function(e){function t(t){var n,i,o,r;return n=e.call(this,(function(e,t,n){i=e,o=t,r=n}),(function(){o(S.aD())}))||this,t.then(i,o,r),n}return ct(t,e),t}(J.g3);function yt(e,t){return n=e,J.g3.is(n)&&"function"==typeof n.done?new J.g3((function(n,i,o){e.done((function(e){try{t(e)}catch(e){S.dz(e)}n(e)}),(function(e){try{t(e)}catch(e){S.dz(e)}i(e)}),(function(e){o(e)}))}),(function(){e.cancel()})):(e.then((function(e){return t()}),(function(e){return t()})),e);var n}function bt(e,t,n){void 0===t&&(t=function(e){return!!e}),void 0===n&&(n=null);var i=0,o=e.length,r=function(){return i>=o?Promise.resolve(n):(0,e[i++])().then((function(e){return t(e)?Promise.resolve(e):r()}))};return r()}function _t(e,t,n){void 0===t&&(t=function(e){return!!e}),void 0===n&&(n=null);var i=0,o=e.length,r=function(){return i>=o?J.g3.as(n):(0,e[i++])().then((function(e){return t(e)?J.g3.as(e):r()}))};return r()}var wt=function(e){function t(){var t=e.call(this)||this;return t._token=-1,t}return ct(t,e),t.prototype.dispose=function(){this.cancel(),e.prototype.dispose.call(this)},t.prototype.cancel=function(){-1!==this._token&&(clearTimeout(this._token),this._token=-1)},t.prototype.cancelAndSet=function(e,t){var n=this;this.cancel(),this._token=setTimeout((function(){n._token=-1,e()}),t)},t.prototype.setIfNotSet=function(e,t){var n=this;-1===this._token&&(this._token=setTimeout((function(){n._token=-1,e()}),t))},t}(I.jG),Mt=function(e){function t(){var t=e.call(this)||this;return t._token=-1,t}return ct(t,e),t.prototype.dispose=function(){this.cancel(),e.prototype.dispose.call(this)},t.prototype.cancel=function(){-1!==this._token&&(clearInterval(this._token),this._token=-1)},t.prototype.cancelAndSet=function(e,t){this.cancel(),this._token=setInterval((function(){e()}),t)},t}(I.jG),Ct=function(){function e(e,t){this.timeoutToken=-1,this.runner=e,this.timeout=t,this.timeoutHandler=this.onTimeout.bind(this)}return e.prototype.dispose=function(){this.cancel(),this.runner=null},e.prototype.cancel=function(){this.isScheduled()&&(clearTimeout(this.timeoutToken),this.timeoutToken=-1)},e.prototype.schedule=function(e){void 0===e&&(e=this.timeout),this.cancel(),this.timeoutToken=setTimeout(this.timeoutHandler,e)},e.prototype.isScheduled=function(){return-1!==this.timeoutToken},e.prototype.onTimeout=function(){this.timeoutToken=-1,this.runner&&this.doRun()},e.prototype.doRun=function(){this.runner()},e}(),St=function(){function e(){this._zoomLevel=0,this._lastZoomLevelChangeTime=0,this._onDidChangeZoomLevel=new X.vl,this.onDidChangeZoomLevel=this._onDidChangeZoomLevel.event,this._accessibilitySupport=0,this._onDidChangeAccessibilitySupport=new X.vl,this.onDidChangeAccessibilitySupport=this._onDidChangeAccessibilitySupport.event}return e.prototype.getZoomLevel=function(){return this._zoomLevel},e.prototype.getTimeSinceLastZoomLevelChanged=function(){return Date.now()-this._lastZoomLevelChangeTime},e.prototype.getPixelRatio=function(){var e=document.createElement("canvas").getContext("2d");return(window.devicePixelRatio||1)/(e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1)},e.prototype.getAccessibilitySupport=function(){return this._accessibilitySupport},e.INSTANCE=new e,e}();function Lt(){return St.INSTANCE.getZoomLevel()}function It(e){return St.INSTANCE.onDidChangeZoomLevel(e)}var Nt=navigator.userAgent,xt=Nt.indexOf("Trident")>=0,Dt=Nt.indexOf("Edge/")>=0,kt=xt||Dt,Tt=Nt.indexOf("Firefox")>=0,Et=Nt.indexOf("AppleWebKit")>=0,At=Nt.indexOf("Chrome")>=0,jt=-1===Nt.indexOf("Chrome")&&Nt.indexOf("Safari")>=0,Ot=Nt.indexOf("iPad")>=0,Rt=Dt&&Nt.indexOf("WebView/")>=0,Pt=new Array(230),zt=new Array(112);!function(){for(var e=0;e=0;){if(r=s+o,(0===s||32===n.charCodeAt(s-1))&&32===n.charCodeAt(r))return this._lastStart=s,void(this._lastEnd=r+1);if(s>0&&32===n.charCodeAt(s-1)&&r===i)return this._lastStart=s-1,void(this._lastEnd=r);if(0===s&&r===i)return this._lastStart=0,void(this._lastEnd=r)}this._lastStart=-1}else this._lastStart=-1}else this._lastStart=-1},e.prototype.hasClass=function(e,t){return this._findClassName(e,t),-1!==this._lastStart},e.prototype.addClasses=function(e){for(var t=this,n=[],i=1;i0;)mn.sort(wn.sort),mn.shift().execute();yn=!1},pn=function(e,t){void 0===t&&(t=0);var n,i=new wn(e,t);return gn.push(i),vn||(vn=!0,n=bn,_n||(_n=self.requestAnimationFrame||self.msRequestAnimationFrame||self.webkitRequestAnimationFrame||self.mozRequestAnimationFrame||self.oRequestAnimationFrame||function(e){return setTimeout((function(){return e((new Date).getTime())}),0)}),_n.call(self,n)),i},fn=function(e,t){if(yn){var n=new wn(e,t);return mn.push(n),n}return pn(e,t)};var Mn=function(e,t){return t},Cn=function(e){function t(t,n,i,o,r){void 0===o&&(o=Mn),void 0===r&&(r=16);var s=e.call(this)||this,a=null,u=0,l=s._register(new wt),c=function(){u=(new Date).getTime(),i(a),a=null};return s._register(cn(t,n,(function(e){a=o(a,e);var t=(new Date).getTime()-u;t>=r?(l.cancel(),c()):l.setIfNotSet(c,r-t)}))),s}return $t(t,e),t}(I.jG);function Sn(e,t,n,i,o){return new Cn(e,t,n,i,o)}function Ln(e){return document.defaultView.getComputedStyle(e,null)}function In(e,t,n){var i=Ln(e),o="0";return i&&(o=i.getPropertyValue?i.getPropertyValue(t):i.getAttribute(n)),function(e,t){return parseFloat(t)||0}(0,o)}var Nn=function(e){return In(e,"border-left-width","borderLeftWidth")},xn=function(e){return In(e,"border-top-width","borderTopWidth")},Dn=function(e,t){this.width=e,this.height=t};function kn(e){for(var t=e.offsetParent,n=e.offsetTop,i=e.offsetLeft;null!==(e=e.parentNode)&&e!==document.body&&e!==document.documentElement;){n-=e.scrollTop;var o=Ln(e);o&&(i-="rtl"!==o.direction?e.scrollLeft:-e.scrollLeft),e===t&&(i+=Nn(e),n+=xn(e),n+=e.offsetTop,i+=e.offsetLeft,t=e.offsetParent)}return{left:i,top:n}}function Tn(e){var t=e.getBoundingClientRect();return{left:t.left+En.scrollX,top:t.top+En.scrollY,width:t.width,height:t.height}}var En=new(function(){function e(){}return Object.defineProperty(e.prototype,"scrollX",{get:function(){return"number"==typeof window.scrollX?window.scrollX:document.body.scrollLeft+document.documentElement.scrollLeft},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"scrollY",{get:function(){return"number"==typeof window.scrollY?window.scrollY:document.body.scrollTop+document.documentElement.scrollTop},enumerable:!0,configurable:!0}),e}());function An(e){var t=function(e){return In(e,"margin-left","marginLeft")}(e)+function(e){return In(e,"margin-right","marginRight")}(e);return e.offsetWidth+t}function jn(e){var t=Nn(e)+function(e){return In(e,"border-right-width","borderRightWidth")}(e),n=function(e){return In(e,"padding-left","paddingLeft")}(e)+function(e){return In(e,"padding-right","paddingRight")}(e);return e.offsetWidth-t-n}function On(e){var t=xn(e)+function(e){return In(e,"border-bottom-width","borderBottomWidth")}(e),n=function(e){return In(e,"padding-top","paddingTop")}(e)+function(e){return In(e,"padding-bottom","paddingBottom")}(e);return e.offsetHeight-t-n}function Rn(e){var t=function(e){return In(e,"margin-top","marginTop")}(e)+function(e){return In(e,"margin-bottom","marginBottom")}(e);return e.offsetHeight+t}function Pn(e,t){for(;e;){if(e===t)return!0;e=e.parentNode}return!1}function zn(e,t,n){for(;e;){if(rn(e,t))return e;if(n)if("string"==typeof n){if(rn(e,n))return null}else if(e===n)return null;e=e.parentNode}return null}function Wn(e){void 0===e&&(e=document.getElementsByTagName("head")[0]);var t=document.createElement("style");return t.type="text/css",t.media="screen",e.appendChild(t),t}var Fn=null;function Bn(){return Fn||(Fn=Wn()),Fn}function Hn(e,t){if(void 0===t&&(t=Bn()),t){for(var n=function(e){return e&&e.sheet&&e.sheet.rules?e.sheet.rules:e&&e.sheet&&e.sheet.cssRules?e.sheet.cssRules:[]}(t),i=[],o=0;o=0;o--)t.sheet.deleteRule(i[o])}}function Vn(e){return"object"==typeof HTMLElement?e instanceof HTMLElement:e&&"object"==typeof e&&1===e.nodeType&&"string"==typeof e.nodeName}var Un={CLICK:"click",AUXCLICK:"auxclick",DBLCLICK:"dblclick",MOUSE_UP:"mouseup",MOUSE_DOWN:"mousedown",MOUSE_OVER:"mouseover",MOUSE_MOVE:"mousemove",MOUSE_OUT:"mouseout",MOUSE_ENTER:"mouseenter",MOUSE_LEAVE:"mouseleave",CONTEXT_MENU:"contextmenu",WHEEL:"wheel",KEY_DOWN:"keydown",KEY_PRESS:"keypress",KEY_UP:"keyup",LOAD:"load",UNLOAD:"unload",ABORT:"abort",ERROR:"error",RESIZE:"resize",SCROLL:"scroll",SELECT:"select",CHANGE:"change",SUBMIT:"submit",RESET:"reset",FOCUS:"focus",FOCUS_IN:"focusin",FOCUS_OUT:"focusout",BLUR:"blur",INPUT:"input",STORAGE:"storage",DRAG_START:"dragstart",DRAG:"drag",DRAG_ENTER:"dragenter",DRAG_LEAVE:"dragleave",DRAG_OVER:"dragover",DROP:"drop",DRAG_END:"dragend",ANIMATION_START:Et?"webkitAnimationStart":"animationstart",ANIMATION_END:Et?"webkitAnimationEnd":"animationend",ANIMATION_ITERATION:Et?"webkitAnimationIteration":"animationiteration"},Yn=function(e,t){e.preventDefault?e.preventDefault():e.returnValue=!1,t&&(e.stopPropagation?e.stopPropagation():e.cancelBubble=!0)},Zn=function(){function e(e){var t=this;this._onDidFocus=new X.vl,this.onDidFocus=this._onDidFocus.event,this._onDidBlur=new X.vl,this.onDidBlur=this._onDidBlur.event,this.disposables=[];var n=!1,i=!1;Jt(e,Un.FOCUS,!0)((function(){i=!1,n||(n=!0,t._onDidFocus.fire())}),null,this.disposables),Jt(e,Un.BLUR,!0)((function(){n&&(i=!0,window.setTimeout((function(){i&&(i=!1,n=!1,t._onDidBlur.fire())}),0))}),null,this.disposables)}return e.prototype.dispose=function(){this.disposables=(0,I.AS)(this.disposables),this._onDidFocus.dispose(),this._onDidBlur.dispose()},e}();function Gn(e){return new Zn(e)}function Qn(e){for(var t=[],n=1;n0&&"#"===n.charAt(n.length-1)?n.substring(0,n.length-1):n)]=t,this._onDidChangeSchema.fire(e)},e}());U.add(si,ai);var ui,li="base.contributions.configuration";!function(e){e[e.APPLICATION=1]="APPLICATION",e[e.WINDOW=2]="WINDOW",e[e.RESOURCE=3]="RESOURCE"}(ui||(ui={}));var ci={properties:{},patternProperties:{}},hi={properties:{},patternProperties:{}},di={properties:{},patternProperties:{}},fi={properties:{},patternProperties:{}},pi="vscode://schemas/settings/editor",gi=U.as(si),mi=function(){function e(){this.overrideIdentifiers=[],this._onDidSchemaChange=new X.vl,this._onDidRegisterConfiguration=new X.vl,this.configurationContributors=[],this.editorConfigurationSchema={properties:{},patternProperties:{},additionalProperties:!1,errorMessage:"Unknown editor configuration setting"},this.configurationProperties={},this.excludedConfigurationProperties={},this.computeOverridePropertyPattern(),gi.registerSchema(pi,this.editorConfigurationSchema)}return e.prototype.registerConfiguration=function(e,t){void 0===t&&(t=!0),this.registerConfigurations([e],[],t)},e.prototype.registerConfigurations=function(e,t,n){var i=this;void 0===n&&(n=!0);var o=this.toConfiguration(t);o&&e.push(o);var r=[];e.forEach((function(e){r.push.apply(r,i.validateAndRegisterProperties(e,n)),i.configurationContributors.push(e),i.registerJSONConfiguration(e),i.updateSchemaForOverrideSettingsConfiguration(e)})),this._onDidRegisterConfiguration.fire(r)},e.prototype.registerOverrideIdentifiers=function(e){var t;(t=this.overrideIdentifiers).push.apply(t,e),this.updateOverridePropertyPatternKey()},e.prototype.toConfiguration=function(e){for(var t={id:"defaultOverrides",title:o.k("defaultConfigurations.title","Default Configuration Overrides"),properties:{}},n=0,i=e;nn?n:e}function ki(e,t){return"string"!=typeof e?t:e}var Ti=function(){function e(e){this.zoomLevel=e.zoomLevel,this.fontFamily=String(e.fontFamily),this.fontWeight=String(e.fontWeight),this.fontSize=e.fontSize,this.lineHeight=0|e.lineHeight,this.letterSpacing=e.letterSpacing}return e.createFromRawSettings=function(t,n){var i=ki(t.fontFamily,Li.jU.fontFamily),o=ki(t.fontWeight,Li.jU.fontWeight),r=xi(t.fontSize,Li.jU.fontSize);0===(r=Di(r,0,100))?r=Li.jU.fontSize:r<8&&(r=8);var s=function(e,t){if("number"==typeof e)return Math.round(e);var n=parseInt(e);return isNaN(n)?0:n}(t.lineHeight);0===(s=Di(s,0,150))?s=Math.round(Ni*r):s<8&&(s=8);var a=xi(t.letterSpacing,0);a=Di(a,-5,20);var u=1+.1*Si.getZoomLevel();return new e({zoomLevel:n,fontFamily:i,fontWeight:o,fontSize:r*=u,lineHeight:s*=u,letterSpacing:a})},e.prototype.getId=function(){return this.zoomLevel+"-"+this.fontFamily+"-"+this.fontWeight+"-"+this.fontSize+"-"+this.lineHeight+"-"+this.letterSpacing},e}(),Ei=function(e){function t(t,n){var i=e.call(this,t)||this;return i.isTrusted=n,i.isMonospace=t.isMonospace,i.typicalHalfwidthCharacterWidth=t.typicalHalfwidthCharacterWidth,i.typicalFullwidthCharacterWidth=t.typicalFullwidthCharacterWidth,i.spaceWidth=t.spaceWidth,i.maxDigitWidth=t.maxDigitWidth,i}return Ii(t,e),t.prototype.equals=function(e){return this.fontFamily===e.fontFamily&&this.fontWeight===e.fontWeight&&this.fontSize===e.fontSize&&this.lineHeight===e.lineHeight&&this.letterSpacing===e.letterSpacing&&this.typicalHalfwidthCharacterWidth===e.typicalHalfwidthCharacterWidth&&this.typicalFullwidthCharacterWidth===e.typicalFullwidthCharacterWidth&&this.spaceWidth===e.spaceWidth&&this.maxDigitWidth===e.maxDigitWidth},t}(Ti),Ai=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),ji=Li.Pk,Oi=Li.jU,Ri=Li.Re,Pi=new(function(){function e(){this._tabFocus=!1,this._onDidChangeTabFocus=new X.vl,this.onDidChangeTabFocus=this._onDidChangeTabFocus.event}return e.prototype.getTabFocusMode=function(){return this._tabFocus},e.prototype.setTabFocusMode=function(e){this._tabFocus!==e&&(this._tabFocus=e,this._onDidChangeTabFocus.fire(this._tabFocus))},e}()),zi=Object.hasOwnProperty,Wi=function(e){function t(t){var n=e.call(this)||this;return n._onDidChange=n._register(new X.vl),n.onDidChange=n._onDidChange.event,n._rawOptions=ri.co({},t||{}),n._rawOptions.scrollbar=ri.co({},n._rawOptions.scrollbar||{}),n._rawOptions.minimap=ri.co({},n._rawOptions.minimap||{}),n._rawOptions.find=ri.co({},n._rawOptions.find||{}),n._rawOptions.hover=ri.co({},n._rawOptions.hover||{}),n._validatedOptions=Li.Wo.validate(n._rawOptions,ji),n.editor=null,n._isDominatedByLongLines=!1,n._lineNumbersDigitCount=1,n._register(Si.onDidChangeZoomLevel((function(e){return n._recomputeOptions()}))),n._register(Pi.onDidChangeTabFocus((function(e){return n._recomputeOptions()}))),n}return Ai(t,e),t.prototype.observeReferenceElement=function(e){},t.prototype.dispose=function(){e.prototype.dispose.call(this)},t.prototype._recomputeOptions=function(){var e=this.editor,t=this._computeInternalOptions();e&&e.equals(t)||(this.editor=t,e&&this._onDidChange.fire(e.createChangeEvent(t)))},t.prototype.getRawOptions=function(){return this._rawOptions},t.prototype._computeInternalOptions=function(){var e=this._validatedOptions,t=this._getEnvConfiguration(),n=Ti.createFromRawSettings(this._rawOptions,t.zoomLevel),i={outerWidth:t.outerWidth,outerHeight:t.outerHeight,fontInfo:this.readConfiguration(n),extraEditorClassName:t.extraEditorClassName,isDominatedByLongLines:this._isDominatedByLongLines,lineNumbersDigitCount:this._lineNumbersDigitCount,emptySelectionClipboard:t.emptySelectionClipboard,pixelRatio:t.pixelRatio,tabFocusMode:Pi.getTabFocusMode(),accessibilitySupport:t.accessibilitySupport};return Li.HF.createInternalEditorOptions(i,e)},t._primitiveArrayEquals=function(e,t){if(e.length!==t.length)return!1;for(var n=0;n console.log` because `log` has been completed recently."),o.k("suggestSelection.recentlyUsedByPrefix","Select suggestions based on previous prefixes that have completed those suggestions, e.g. `co -> console` and `con -> const`.")],default:"recentlyUsed",description:o.k("suggestSelection","Controls how suggestions are pre-selected when showing the suggest list.")},"editor.suggestFontSize":{type:"integer",default:0,minimum:0,description:o.k("suggestFontSize","Font size for the suggest widget.")},"editor.suggestLineHeight":{type:"integer",default:0,minimum:0,description:o.k("suggestLineHeight","Line height for the suggest widget.")},"editor.suggest.filterGraceful":{type:"boolean",default:!0,description:o.k("suggest.filterGraceful","Controls whether filtering and sorting suggestions accounts for small typos.")},"editor.suggest.snippetsPreventQuickSuggestions":{type:"boolean",default:!0,description:o.k("suggest.snippetsPreventQuickSuggestions","Control whether an active snippet prevents quick suggestions.")},"editor.selectionHighlight":{type:"boolean",default:ji.contribInfo.selectionHighlight,description:o.k("selectionHighlight","Controls whether the editor should highlight matches similar to the selection")},"editor.occurrencesHighlight":{type:"boolean",default:ji.contribInfo.occurrencesHighlight,description:o.k("occurrencesHighlight","Controls whether the editor should highlight semantic symbol occurrences.")},"editor.overviewRulerLanes":{type:"integer",default:3,description:o.k("overviewRulerLanes","Controls the number of decorations that can show up at the same position in the overview ruler.")},"editor.overviewRulerBorder":{type:"boolean",default:ji.viewInfo.overviewRulerBorder,description:o.k("overviewRulerBorder","Controls whether a border should be drawn around the overview ruler.")},"editor.cursorBlinking":{type:"string",enum:["blink","smooth","phase","expand","solid"],default:Li.a2(ji.viewInfo.cursorBlinking),description:o.k("cursorBlinking","Control the cursor animation style.")},"editor.mouseWheelZoom":{type:"boolean",default:ji.viewInfo.mouseWheelZoom,description:o.k("mouseWheelZoom","Zoom the font of the editor when using mouse wheel and holding `Ctrl`.")},"editor.cursorStyle":{type:"string",enum:["block","block-outline","line","line-thin","underline","underline-thin"],default:Li.wb(ji.viewInfo.cursorStyle),description:o.k("cursorStyle","Controls the cursor style.")},"editor.cursorWidth":{type:"integer",default:ji.viewInfo.cursorWidth,description:o.k("cursorWidth","Controls the width of the cursor when `#editor.cursorStyle#` is set to `line`.")},"editor.fontLigatures":{type:"boolean",default:ji.viewInfo.fontLigatures,description:o.k("fontLigatures","Enables/Disables font ligatures.")},"editor.hideCursorInOverviewRuler":{type:"boolean",default:ji.viewInfo.hideCursorInOverviewRuler,description:o.k("hideCursorInOverviewRuler","Controls whether the cursor should be hidden in the overview ruler.")},"editor.renderWhitespace":{type:"string",enum:["none","boundary","all"],enumDescriptions:["",o.k("renderWhiteSpace.boundary","Render whitespace characters except for single spaces between words."),""],default:ji.viewInfo.renderWhitespace,description:o.k("renderWhitespace","Controls how the editor should render whitespace characters.")},"editor.renderControlCharacters":{type:"boolean",default:ji.viewInfo.renderControlCharacters,description:o.k("renderControlCharacters","Controls whether the editor should render control characters.")},"editor.renderIndentGuides":{type:"boolean",default:ji.viewInfo.renderIndentGuides,description:o.k("renderIndentGuides","Controls whether the editor should render indent guides.")},"editor.highlightActiveIndentGuide":{type:"boolean",default:ji.viewInfo.highlightActiveIndentGuide,description:o.k("highlightActiveIndentGuide","Controls whether the editor should highlight the active indent guide.")},"editor.renderLineHighlight":{type:"string",enum:["none","gutter","line","all"],enumDescriptions:["","","",o.k("renderLineHighlight.all","Highlights both the gutter and the current line.")],default:ji.viewInfo.renderLineHighlight,description:o.k("renderLineHighlight","Controls how the editor should render the current line highlight.")},"editor.codeLens":{type:"boolean",default:ji.contribInfo.codeLens,description:o.k("codeLens","Controls whether the editor shows CodeLens")},"editor.folding":{type:"boolean",default:ji.contribInfo.folding,description:o.k("folding","Controls whether the editor has code folding enabled")},"editor.foldingStrategy":{type:"string",enum:["auto","indentation"],default:ji.contribInfo.foldingStrategy,description:o.k("foldingStrategy","Controls the strategy for computing folding ranges. `auto` uses a language specific folding strategy, if available. `indentation` uses the indentation based folding strategy.")},"editor.showFoldingControls":{type:"string",enum:["always","mouseover"],default:ji.contribInfo.showFoldingControls,description:o.k("showFoldingControls","Controls whether the fold controls on the gutter are automatically hidden.")},"editor.matchBrackets":{type:"boolean",default:ji.contribInfo.matchBrackets,description:o.k("matchBrackets","Highlight matching brackets when one of them is selected.")},"editor.glyphMargin":{type:"boolean",default:ji.viewInfo.glyphMargin,description:o.k("glyphMargin","Controls whether the editor should render the vertical glyph margin. Glyph margin is mostly used for debugging.")},"editor.useTabStops":{type:"boolean",default:ji.useTabStops,description:o.k("useTabStops","Inserting and deleting whitespace follows tab stops.")},"editor.trimAutoWhitespace":{type:"boolean",default:Ri.trimAutoWhitespace,description:o.k("trimAutoWhitespace","Remove trailing auto inserted whitespace.")},"editor.stablePeek":{type:"boolean",default:!1,description:o.k("stablePeek","Keep peek editors open even when double clicking their content or when hitting `Escape`.")},"editor.dragAndDrop":{type:"boolean",default:ji.dragAndDrop,description:o.k("dragAndDrop","Controls whether the editor should allow moving selections via drag and drop.")},"editor.accessibilitySupport":{type:"string",enum:["auto","on","off"],enumDescriptions:[o.k("accessibilitySupport.auto","The editor will use platform APIs to detect when a Screen Reader is attached."),o.k("accessibilitySupport.on","The editor will be permanently optimized for usage with a Screen Reader."),o.k("accessibilitySupport.off","The editor will never be optimized for usage with a Screen Reader.")],default:ji.accessibilitySupport,description:o.k("accessibilitySupport","Controls whether the editor should run in a mode where it is optimized for screen readers.")},"editor.showUnused":{type:"boolean",default:ji.showUnused,description:o.k("showUnused","Controls fading out of unused code.")},"editor.links":{type:"boolean",default:ji.contribInfo.links,description:o.k("links","Controls whether the editor should detect links and make them clickable.")},"editor.colorDecorators":{type:"boolean",default:ji.contribInfo.colorDecorators,description:o.k("colorDecorators","Controls whether the editor should render the inline color decorators and color picker.")},"editor.lightbulb.enabled":{type:"boolean",default:ji.contribInfo.lightbulbEnabled,description:o.k("codeActions","Enables the code action lightbulb in the editor.")},"editor.codeActionsOnSave":{type:"object",properties:{"source.organizeImports":{type:"boolean",description:o.k("codeActionsOnSave.organizeImports","Controls whether organize imports action should be run on file save.")}},additionalProperties:{type:"boolean"},default:ji.contribInfo.codeActionsOnSave,description:o.k("codeActionsOnSave","Code action kinds to be run on save.")},"editor.codeActionsOnSaveTimeout":{type:"number",default:ji.contribInfo.codeActionsOnSaveTimeout,description:o.k("codeActionsOnSaveTimeout","Timeout in milliseconds after which the code actions that are run on save are cancelled.")},"editor.selectionClipboard":{type:"boolean",default:ji.contribInfo.selectionClipboard,description:o.k("selectionClipboard","Controls whether the Linux primary clipboard should be supported."),included:B.j9},"diffEditor.renderSideBySide":{type:"boolean",default:!0,description:o.k("sideBySide","Controls whether the diff editor shows the diff side by side or inline.")},"diffEditor.ignoreTrimWhitespace":{type:"boolean",default:!0,description:o.k("ignoreTrimWhitespace","Controls whether the diff editor shows changes in leading or trailing whitespace as diffs.")},"editor.largeFileOptimizations":{type:"boolean",default:Ri.largeFileOptimizations,description:o.k("largeFileOptimizations","Special handling for large files to disable certain memory intensive features.")},"diffEditor.renderIndicators":{type:"boolean",default:!0,description:o.k("renderIndicators","Controls whether the diff editor shows +/- indicators for added/removed changes.")}}},Hi=null;function Vi(){return null===Hi&&(Hi=Object.create(null),Object.keys(Bi.properties).forEach((function(e){Hi[e]=!0}))),Hi}Fi.registerConfiguration(Bi);var Ui=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Yi=function(e){function t(t,n){var i=e.call(this)||this;return i.referenceDomElement=t,i.changeCallback=n,i.measureReferenceDomElementToken=-1,i.width=-1,i.height=-1,i.measureReferenceDomElement(!1),i}return Ui(t,e),t.prototype.dispose=function(){this.stopObserving(),e.prototype.dispose.call(this)},t.prototype.getWidth=function(){return this.width},t.prototype.getHeight=function(){return this.height},t.prototype.startObserving=function(){var e=this;-1===this.measureReferenceDomElementToken&&(this.measureReferenceDomElementToken=setInterval((function(){return e.measureReferenceDomElement(!0)}),100))},t.prototype.stopObserving=function(){-1!==this.measureReferenceDomElementToken&&(clearInterval(this.measureReferenceDomElementToken),this.measureReferenceDomElementToken=-1)},t.prototype.observe=function(e){this.measureReferenceDomElement(!0,e)},t.prototype.measureReferenceDomElement=function(e,t){var n=0,i=0;t?(n=t.width,i=t.height):this.referenceDomElement&&(n=this.referenceDomElement.clientWidth,i=this.referenceDomElement.clientHeight),n=Math.max(5,n),i=Math.max(5,i),this.width===n&&this.height===i||(this.width=n,this.height=i,e&&this.changeCallback())},t}(I.jG),Zi=function(){function e(e,t){this.chr=e,this.type=t,this.width=0}return e.prototype.fulfill=function(e){this.width=e},e}(),Gi=function(){function e(e,t){this._bareFontInfo=e,this._requests=t,this._container=null,this._testElements=null}return e.prototype.read=function(){this._createDomElements(),document.body.appendChild(this._container),this._readFromDomElements(),document.body.removeChild(this._container),this._container=null,this._testElements=null},e.prototype._createDomElements=function(){var t=document.createElement("div");t.style.position="absolute",t.style.top="-50000px",t.style.width="50000px";var n=document.createElement("div");n.style.fontFamily=this._bareFontInfo.fontFamily,n.style.fontWeight=this._bareFontInfo.fontWeight,n.style.fontSize=this._bareFontInfo.fontSize+"px",n.style.lineHeight=this._bareFontInfo.lineHeight+"px",n.style.letterSpacing=this._bareFontInfo.letterSpacing+"px",t.appendChild(n);var i=document.createElement("div");i.style.fontFamily=this._bareFontInfo.fontFamily,i.style.fontWeight="bold",i.style.fontSize=this._bareFontInfo.fontSize+"px",i.style.lineHeight=this._bareFontInfo.lineHeight+"px",i.style.letterSpacing=this._bareFontInfo.letterSpacing+"px",t.appendChild(i);var o=document.createElement("div");o.style.fontFamily=this._bareFontInfo.fontFamily,o.style.fontWeight=this._bareFontInfo.fontWeight,o.style.fontSize=this._bareFontInfo.fontSize+"px",o.style.lineHeight=this._bareFontInfo.lineHeight+"px",o.style.letterSpacing=this._bareFontInfo.letterSpacing+"px",o.style.fontStyle="italic",t.appendChild(o);for(var r=[],s=0,a=this._requests.length;s.001){v=!1;break}}var M=St.INSTANCE.getTimeSinceLastZoomLevelChanged()>2e3;return new Ei({zoomLevel:Lt(),fontFamily:e.fontFamily,fontWeight:e.fontWeight,fontSize:e.fontSize,lineHeight:e.lineHeight,letterSpacing:e.letterSpacing,isMonospace:v,typicalHalfwidthCharacterWidth:i.width,typicalFullwidthCharacterWidth:o.width,spaceWidth:r.width,maxDigitWidth:m},M)},t.INSTANCE=new t,t}(I.jG),Ji=function(e){function t(t,n){void 0===n&&(n=null);var i,o=e.call(this,t)||this;return o._elementSizeObserver=o._register(new Yi(n,(function(){return o._onReferenceDomElementSizeChanged()}))),o._register(Ki.INSTANCE.onDidChange((function(){return o._onCSSBasedConfigurationChanged()}))),o._validatedOptions.automaticLayout&&o._elementSizeObserver.startObserving(),o._register(It((function(e){return o._recomputeOptions()}))),o._register((i=function(){return o._recomputeOptions()},St.INSTANCE.onDidChangeAccessibilitySupport(i))),o._recomputeOptions(),o}return Qi(t,e),t._massageFontFamily=function(e){return/[,"']/.test(e)?e:/[+ ]/.test(e)?'"'+e+'"':e},t.applyFontInfoSlow=function(e,n){e.style.fontFamily=t._massageFontFamily(n.fontFamily),e.style.fontWeight=n.fontWeight,e.style.fontSize=n.fontSize+"px",e.style.lineHeight=n.lineHeight+"px",e.style.letterSpacing=n.letterSpacing+"px"},t.applyFontInfo=function(e,n){e.setFontFamily(t._massageFontFamily(n.fontFamily)),e.setFontWeight(n.fontWeight),e.setFontSize(n.fontSize),e.setLineHeight(n.lineHeight),e.setLetterSpacing(n.letterSpacing)},t.prototype._onReferenceDomElementSizeChanged=function(){this._recomputeOptions()},t.prototype._onCSSBasedConfigurationChanged=function(){this._recomputeOptions()},t.prototype.observeReferenceElement=function(e){this._elementSizeObserver.observe(e)},t.prototype.dispose=function(){e.prototype.dispose.call(this)},t.prototype._getExtraEditorClassName=function(){var e="";return xt?e+="ie ":Tt?e+="ff ":Dt?e+="edge ":jt&&(e+="safari "),B.zx&&(e+="mac "),e},t.prototype._getEnvConfiguration=function(){return{extraEditorClassName:this._getExtraEditorClassName(),outerWidth:this._elementSizeObserver.getWidth(),outerHeight:this._elementSizeObserver.getHeight(),emptySelectionClipboard:Et||Tt,pixelRatio:St.INSTANCE.getPixelRatio(),zoomLevel:Lt(),accessibilitySupport:St.INSTANCE.getAccessibilitySupport()}},t.prototype.readConfiguration=function(e){return Ki.INSTANCE.readConfiguration(e)},t}(Wi),Xi=n(4076),$i=function(){function e(e){this.modelState=null,this.viewState=null,this._selTrackedRange=null,this._trackSelection=!0,this._setState(e,new l.mG(new s.Q(1,1,1,1),0,new r.y(1,1),0),new l.mG(new s.Q(1,1,1,1),0,new r.y(1,1),0))}return e.prototype.dispose=function(e){this._removeTrackedRange(e)},e.prototype.startTrackingSelection=function(e){this._trackSelection=!0,this._updateTrackedRange(e)},e.prototype.stopTrackingSelection=function(e){this._trackSelection=!1,this._removeTrackedRange(e)},e.prototype._updateTrackedRange=function(e){this._trackSelection&&(this._selTrackedRange=e.model._setTrackedRange(this._selTrackedRange,this.modelState.selection,Xi.kK.AlwaysGrowsWhenTypingAtEdges))},e.prototype._removeTrackedRange=function(e){this._selTrackedRange=e.model._setTrackedRange(this._selTrackedRange,null,Xi.kK.AlwaysGrowsWhenTypingAtEdges)},e.prototype.asCursorState=function(){return new l.MF(this.modelState,this.viewState)},e.prototype.readSelectionFromMarkers=function(e){var t=e.model._getTrackedRange(this._selTrackedRange);return this.modelState.selection.getDirection()===Be.S.LTR?new Be.L(t.startLineNumber,t.startColumn,t.endLineNumber,t.endColumn):new Be.L(t.endLineNumber,t.endColumn,t.startLineNumber,t.startColumn)},e.prototype.ensureValidState=function(e){this._setState(e,this.modelState,this.viewState)},e.prototype.setState=function(e,t,n){this._setState(e,t,n)},e.prototype._setState=function(e,t,n){if(t){a=e.model.validateRange(t.selectionStart);var i=t.selectionStart.equalsRange(a)?t.selectionStartLeftoverVisibleColumns:0,o=(u=e.model.validatePosition(t.position),t.position.equals(u)?t.leftoverVisibleColumns:0);t=new l.mG(a,i,u,o)}else{var a=e.model.validateRange(e.convertViewRangeToModelRange(n.selectionStart)),u=e.model.validatePosition(e.convertViewPositionToModelPosition(n.position.lineNumber,n.position.column));t=new l.mG(a,n.selectionStartLeftoverVisibleColumns,u,n.leftoverVisibleColumns)}if(n)d=e.validateViewRange(n.selectionStart,t.selectionStart),f=e.validateViewPosition(n.position,t.position),n=new l.mG(d,t.selectionStartLeftoverVisibleColumns,f,t.leftoverVisibleColumns);else{var c=e.convertModelPositionToViewPosition(new r.y(t.selectionStart.startLineNumber,t.selectionStart.startColumn)),h=e.convertModelPositionToViewPosition(new r.y(t.selectionStart.endLineNumber,t.selectionStart.endColumn)),d=new s.Q(c.lineNumber,c.column,h.lineNumber,h.column),f=e.convertModelPositionToViewPosition(t.position);n=new l.mG(d,t.selectionStartLeftoverVisibleColumns,f,t.leftoverVisibleColumns)}this.modelState=t,this.viewState=n,this._updateTrackedRange(e)},e}(),eo=function(){function e(e){this.context=e,this.primaryCursor=new $i(e),this.secondaryCursors=[],this.lastAddedCursorIndex=0}return e.prototype.dispose=function(){this.primaryCursor.dispose(this.context),this.killSecondaryCursors()},e.prototype.startTrackingSelections=function(){this.primaryCursor.startTrackingSelection(this.context);for(var e=0,t=this.secondaryCursors.length;en){var r=t-n;for(o=0;o=e+1&&this.lastAddedCursorIndex--,this.secondaryCursors[e].dispose(this.context),this.secondaryCursors.splice(e,1)},e.prototype._getAll=function(){var e=[];e[0]=this.primaryCursor;for(var t=0,n=this.secondaryCursors.length;td&&t[M].index--;e.splice(d,1),t.splice(h,1),this._removeSecondaryCursor(d-1),o--}}}},e}(),to=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),no=function(e){this.type=1,this.canUseLayerHinting=e.canUseLayerHinting,this.pixelRatio=e.pixelRatio,this.editorClassName=e.editorClassName,this.lineHeight=e.lineHeight,this.readOnly=e.readOnly,this.accessibilitySupport=e.accessibilitySupport,this.emptySelectionClipboard=e.emptySelectionClipboard,this.layoutInfo=e.layoutInfo,this.fontInfo=e.fontInfo,this.viewInfo=e.viewInfo,this.wrappingInfo=e.wrappingInfo},io=function(e){this.type=2,this.selections=e},oo=function(){this.type=3},ro=function(){this.type=4},so=function(e){this.type=5,this.isFocused=e},ao=function(){this.type=6},uo=function(e,t){this.type=7,this.fromLineNumber=e,this.toLineNumber=t},lo=function(e,t){this.type=8,this.fromLineNumber=e,this.toLineNumber=t},co=function(e,t){this.type=9,this.fromLineNumber=e,this.toLineNumber=t},ho=function(e,t,n,i){this.type=10,this.range=e,this.verticalType=t,this.revealHorizontal=n,this.scrollType=i},fo=function(e){this.type=11,this.scrollWidth=e.scrollWidth,this.scrollLeft=e.scrollLeft,this.scrollHeight=e.scrollHeight,this.scrollTop=e.scrollTop,this.scrollWidthChanged=e.scrollWidthChanged,this.scrollLeftChanged=e.scrollLeftChanged,this.scrollHeightChanged=e.scrollHeightChanged,this.scrollTopChanged=e.scrollTopChanged},po=function(e){this.type=12,this.ranges=e},go=function(){this.type=15},mo=function(){this.type=13},vo=function(){this.type=14},yo=function(){this.type=16},bo=function(e){function t(){var t=e.call(this)||this;return t._listeners=[],t._collector=null,t._collectorCnt=0,t}return to(t,e),t.prototype.dispose=function(){this._listeners=[],e.prototype.dispose.call(this)},t.prototype._beginEmit=function(){return this._collectorCnt++,1===this._collectorCnt&&(this._collector=new _o),this._collector},t.prototype._endEmit=function(){if(this._collectorCnt--,0===this._collectorCnt){var e=this._collector.finalize();this._collector=null,e.length>0&&this._emit(e)}},t.prototype._emit=function(e){for(var t=this._listeners.slice(0),n=0,i=t.length;nt.MAX_CURSOR_COUNT&&(i=i.slice(0,t.MAX_CURSOR_COUNT),this._onDidReachMaxCursorCount.fire(void 0));var o=new So(this._model,this);this._cursors.setStates(i),this._cursors.normalize(),this._columnSelectData=null,this._emitStateChangedIfNecessary(e,n,o)},t.prototype.setColumnSelectData=function(e){this._columnSelectData=e},t.prototype.reveal=function(e,t,n){this._revealRange(t,0,e,n)},t.prototype.revealRange=function(e,t,n,i){this.emitCursorRevealRange(t,n,e,i)},t.prototype.scrollTo=function(e){this._viewModel.viewLayout.setScrollPositionSmooth({scrollTop:e})},t.prototype.saveState=function(){for(var e=[],t=this._cursors.getSelections(),n=0,i=t.length;n1)return;var u=new s.Q(r.lineNumber,r.column,r.lineNumber,r.column);this.emitCursorRevealRange(u,t,n,i)},t.prototype.emitCursorRevealRange=function(e,t,n,i){try{this._beginEmit().emit(new ho(e,t,n,i))}finally{this._endEmit()}},t.prototype.trigger=function(e,t,n){var o=u;if(t!==o.CompositionStart)if(t===o.CompositionEnd&&(this._isDoingComposition=!1),this._configuration.editor.readOnly)this._onDidAttemptReadOnlyEdit.fire(void 0);else{var r=new So(this._model,this),s=i.NotSet;t!==o.Undo&&t!==o.Redo&&this._cursors.stopTrackingSelections(),this._cursors.ensureValidState(),this._isHandling=!0;try{switch(t){case o.Type:this._type(e,n.text);break;case o.ReplacePreviousChar:this._replacePreviousChar(n.text,n.replaceCharCnt);break;case o.Paste:s=i.Paste,this._paste(n.text,n.pasteOnNewLine,n.multicursorText);break;case o.Cut:this._cut();break;case o.Undo:s=i.Undo,this._interpretCommandResult(this._model.undo());break;case o.Redo:s=i.Redo,this._interpretCommandResult(this._model.redo());break;case o.ExecuteCommand:this._externalExecuteCommand(n);break;case o.ExecuteCommands:this._externalExecuteCommands(n);break;case o.CompositionEnd:this._interpretCompositionEnd(e)}}catch(e){(0,S.dz)(e)}this._isHandling=!1,t!==o.Undo&&t!==o.Redo&&this._cursors.startTrackingSelections(),this._emitStateChangedIfNecessary(e,s,r)&&this._revealRange(0,0,!0,0)}else this._isDoingComposition=!0},t.prototype._interpretCompositionEnd=function(e){this._isDoingComposition||"keyboard"!==e||this._executeEditOperation(Ke.compositionEndWithInterceptors(this._prevEditOperationType,this.context.config,this.context.model,this.getSelections()))},t.prototype._type=function(e,t){if(this._isDoingComposition||"keyboard"!==e)this._executeEditOperation(Ke.typeWithoutInterceptors(this._prevEditOperationType,this.context.config,this.context.model,this.getSelections(),t));else for(var n=0,i=t.length;n0&&(r[0]._isTracked=!0);var u=e.model.pushEditOperations(e.selectionsBefore,r,(function(n){for(var i=[],o=0;o0?(i[n].sort(s),a[n]=t[n].computeCursorState(e.model,{getInverseEditOperations:function(){return i[n]},getTrackedSelection:function(t){var n=parseInt(t,10),i=e.model._getTrackedRange(e.trackedRanges[n]);return e.trackedRangesDirection[n]===Be.S.LTR?new Be.L(i.startLineNumber,i.startColumn,i.endLineNumber,i.endColumn):new Be.L(i.endLineNumber,i.endColumn,i.startLineNumber,i.startColumn)}})):a[n]=e.selectionsBefore[n]};for(o=0;oo.identifier.major?i.identifier.major:o.identifier.major).toString()]=!0;for(var a=0;a0&&n--}}return t},e}(),No=n(5439),xo=n(4998),Do=n(8953);function ko(e,t,n,i,o,r){for(var s="
",a=i,u=0,l=0,c=t.getCount();l0;)d+=" ",p--;break;case 60:d+="<";break;case 62:d+=">";break;case 38:d+="&";break;case 0:d+="�";break;case 65279:case 8232:d+="�";break;case 13:d+="​";break;default:d+=String.fromCharCode(f)}}if(s+=''+d+"",h>o||a>=o)break}}return s+"
"}var To=function(e,t,n,i){this.top=0|e,this.left=0|t,this.width=0|n,this.height=0|i},Eo=function(e,t){this.tabSize=e,this.data=t},Ao=function(e,t,n,i,o){this.content=e,this.continuesWithWrappedLine=t,this.minColumn=n,this.maxColumn=i,this.tokens=o},jo=function(){function e(t,n,i,o,r,s,a,u,l){this.minColumn=t,this.maxColumn=n,this.content=i,this.continuesWithWrappedLine=o,this.isBasicASCII=e.isBasicASCII(i,s),this.containsRTL=e.containsRTL(i,this.isBasicASCII,r),this.tokens=a,this.inlineDecorations=u,this.tabSize=l}return e.isBasicASCII=function(e,t){return!t||p.isBasicASCII(e)},e.containsRTL=function(e,t,n){return!(t||!n)&&p.containsRTL(e)},e}(),Oo=function(e,t,n){this.range=e,this.inlineClassName=t,this.type=n},Ro=function(e,t){this.range=e,this.options=t},Po=function(){function e(e,t,n,i,o){this.editorId=e,this.model=t,this.configuration=n,this._linesCollection=i,this._coordinatesConverter=o,this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}return e.prototype._clearCachedModelDecorationsResolver=function(){this._cachedModelDecorationsResolver=null,this._cachedModelDecorationsResolverViewRange=null},e.prototype.dispose=function(){this._decorationsCache=null,this._clearCachedModelDecorationsResolver()},e.prototype.reset=function(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()},e.prototype.onModelDecorationsChanged=function(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()},e.prototype.onLineMappingChanged=function(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()},e.prototype._getOrCreateViewModelDecoration=function(e){var t=e.id,n=this._decorationsCache[t];if(!n){var i=e.range,o=e.options,a=void 0;if(o.isWholeLine){var u=this._coordinatesConverter.convertModelPositionToViewPosition(new r.y(i.startLineNumber,1)),l=this._coordinatesConverter.convertModelPositionToViewPosition(new r.y(i.endLineNumber,this.model.getLineMaxColumn(i.endLineNumber)));a=new s.Q(u.lineNumber,u.column,l.lineNumber,l.column)}else a=this._coordinatesConverter.convertModelRangeToViewRange(i);n=new Ro(a,o),this._decorationsCache[t]=n}return n},e.prototype.getDecorationsViewportData=function(e){var t=!0;return(t=(t=t&&null!==this._cachedModelDecorationsResolver)&&e.equalsRange(this._cachedModelDecorationsResolverViewRange))||(this._cachedModelDecorationsResolver=this._getDecorationsViewportData(e),this._cachedModelDecorationsResolverViewRange=e),this._cachedModelDecorationsResolver},e.prototype._getDecorationsViewportData=function(e){for(var t=this._linesCollection.getDecorationsInRange(e,this.editorId,this.configuration.editor.readOnly),n=e.startLineNumber,i=e.endLineNumber,o=[],r=0,a=[],u=n;u<=i;u++)a[u-n]=[];for(var l=0,c=t.length;l=0&&this.prefixSum.set(i.subarray(0,this.prefixSumValidIndex[0]+1)),!0)},e.prototype.changeValue=function(e,t){return e=(0,zo.jT)(e),t=(0,zo.jT)(t),this.values[e]!==t&&(this.values[e]=t,e-1=n.length)return!1;var o=n.length-e;return t>=o&&(t=o),0!==t&&(this.values=new Uint32Array(n.length-t),this.values.set(n.subarray(0,e),0),this.values.set(n.subarray(e+t),e),this.prefixSum=new Uint32Array(this.values.length),e-1=0&&this.prefixSum.set(i.subarray(0,this.prefixSumValidIndex[0]+1)),!0)},e.prototype.getTotalValue=function(){return 0===this.values.length?0:this._getAccumulatedValue(this.values.length-1)},e.prototype.getAccumulatedValue=function(e){return e<0?0:(e=(0,zo.jT)(e),this._getAccumulatedValue(e))},e.prototype._getAccumulatedValue=function(e){if(e<=this.prefixSumValidIndex[0])return this.prefixSum[e];var t=this.prefixSumValidIndex[0]+1;0===t&&(this.prefixSum[0]=this.values[0],t++),e>=this.values.length&&(e=this.values.length-1);for(var n=t;n<=e;n++)this.prefixSum[n]=this.prefixSum[n-1]+this.values[n];return this.prefixSumValidIndex[0]=Math.max(this.prefixSumValidIndex[0],e),this.prefixSum[e]},e.prototype.getIndexOf=function(e){e=Math.floor(e),this.getTotalValue();for(var t,n,i,o=0,r=this.values.length-1;o<=r;)if(t=o+(r-o)/2|0,e<(i=(n=this.prefixSum[t])-this.values[t]))r=t-1;else{if(!(e>=n))break;o=t+1}return new Wo(t,e-i)},e}(),Bo=function(){function e(e){this._cacheAccumulatedValueStart=0,this._cache=null,this._actual=new Fo(e),this._bustCache()}return e.prototype._bustCache=function(){this._cacheAccumulatedValueStart=0,this._cache=null},e.prototype.insertValues=function(e,t){this._actual.insertValues(e,t)&&this._bustCache()},e.prototype.changeValue=function(e,t){this._actual.changeValue(e,t)&&this._bustCache()},e.prototype.removeValues=function(e,t){this._actual.removeValues(e,t)&&this._bustCache()},e.prototype.getTotalValue=function(){return this._actual.getTotalValue()},e.prototype.getAccumulatedValue=function(e){return this._actual.getAccumulatedValue(e)},e.prototype.getIndexOf=function(e){if(e=Math.floor(e),null!==this._cache){var t=e-this._cacheAccumulatedValueStart;if(t>=0&&t0){switch(l=Math.min(c<=.5?h/(2*c):h/(2-2*c),1),s){case n:u=(i-o)/h+(i1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e},e.toRGBA=function(t){var n,i,o,r=t.h/360,s=t.s,a=t.l,u=t.a;if(0===s)n=i=o=a;else{var l=a<.5?a*(1+s):a+s-a*s,c=2*a-l;n=e._hue2rgb(c,l,r+1/3),i=e._hue2rgb(c,l,r),o=e._hue2rgb(c,l,r-1/3)}return new Uo(Math.round(255*n),Math.round(255*i),Math.round(255*o),u)},e}(),Zo=function(){function e(e,t,n,i){this.h=0|Math.max(Math.min(360,e),0),this.s=Vo(Math.max(Math.min(1,t),0),3),this.v=Vo(Math.max(Math.min(1,n),0),3),this.a=Vo(Math.max(Math.min(1,i),0),3)}return e.equals=function(e,t){return e.h===t.h&&e.s===t.s&&e.v===t.v&&e.a===t.a},e.fromRGBA=function(t){var n,i=t.r/255,o=t.g/255,r=t.b/255,s=Math.max(i,o,r),a=s-Math.min(i,o,r),u=0===s?0:a/s;return n=0===a?0:s===i?((o-r)/a%6+6)%6:s===o?(r-i)/a+2:(i-o)/a+4,new e(Math.round(60*n),u,s,t.a)},e.toRGBA=function(e){var t=e.h,n=e.s,i=e.v,o=e.a,r=i*n,s=r*(1-Math.abs(t/60%2-1)),a=i-r,u=[0,0,0],l=u[0],c=u[1],h=u[2];return t<60?(l=r,c=s):t<120?(l=s,c=r):t<180?(c=r,h=s):t<240?(c=s,h=r):t<300?(l=s,h=r):t<360&&(l=r,h=s),l=Math.round(255*(l+a)),c=Math.round(255*(c+a)),h=Math.round(255*(h+a)),new Uo(l,c,h,o)},e}(),Go=function(){function e(e){if(!e)throw new Error("Color needs a value");if(e instanceof Uo)this.rgba=e;else if(e instanceof Yo)this._hsla=e,this.rgba=Yo.toRGBA(e);else{if(!(e instanceof Zo))throw new Error("Invalid color ctor argument");this._hsva=e,this.rgba=Zo.toRGBA(e)}}return e.fromHex=function(t){return e.Format.CSS.parseHex(t)||e.red},Object.defineProperty(e.prototype,"hsla",{get:function(){return this._hsla?this._hsla:Yo.fromRGBA(this.rgba)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"hsva",{get:function(){return this._hsva?this._hsva:Zo.fromRGBA(this.rgba)},enumerable:!0,configurable:!0}),e.prototype.equals=function(e){return!!e&&Uo.equals(this.rgba,e.rgba)&&Yo.equals(this.hsla,e.hsla)&&Zo.equals(this.hsva,e.hsva)},e.prototype.getRelativeLuminance=function(){return Vo(.2126*e._relativeLuminanceForComponent(this.rgba.r)+.7152*e._relativeLuminanceForComponent(this.rgba.g)+.0722*e._relativeLuminanceForComponent(this.rgba.b),4)},e._relativeLuminanceForComponent=function(e){var t=e/255;return t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4)},e.prototype.isLighter=function(){return(299*this.rgba.r+587*this.rgba.g+114*this.rgba.b)/1e3>=128},e.prototype.isLighterThan=function(e){return this.getRelativeLuminance()>e.getRelativeLuminance()},e.prototype.isDarkerThan=function(e){return this.getRelativeLuminance()=a&&d<=u,p=er(this.linePositionMapperFactory,n[h],this.tabSize,this.wrappingColumn,this.columnsForFullWidthChar,this.wrappingIndent,!f);o[h]=p.getViewLineCount(),this.lines[h]=p}this._validModelVersionId=this.model.getVersionId(),this.prefixSumComputer=new Bo(o)},e.prototype.getHiddenAreas=function(){var e=this;return this.hiddenAreasIds.map((function(t){return e.model.getDecorationRange(t)}))},e.prototype._reduceRanges=function(e){var t=this;if(0===e.length)return[];for(var n=e.map((function(e){return t.model.validateRange(e)})).sort(s.Q.compareRangesUsingStarts),i=[],o=n[0].startLineNumber,r=n[0].endLineNumber,a=1,u=n.length;ar+1?(i.push(new s.Q(o,1,r,1)),o=l.startLineNumber,r=l.endLineNumber):l.endLineNumber>r&&(r=l.endLineNumber)}return i.push(new s.Q(o,1,r,1)),i},e.prototype.setHiddenAreas=function(e){var t=this,n=this._reduceRanges(e),i=this.hiddenAreasIds.map((function(e){return t.model.getDecorationRange(e)})).sort(s.Q.compareRangesUsingStarts);if(n.length===i.length){for(var o=!1,r=0;r=l&&p<=c?this.lines[r].isVisible()&&(this.lines[r]=this.lines[r].setVisible(!1),g=!0):(f=!0,this.lines[r].isVisible()||(this.lines[r]=this.lines[r].setVisible(!0),g=!0)),g){var m=this.lines[r].getViewLineCount();this.prefixSumComputer.changeValue(r,m)}}return f||this.setHiddenAreas([]),!0},e.prototype.modelPositionIsVisible=function(e,t){return!(e<1||e>this.lines.length)&&this.lines[e-1].isVisible()},e.prototype.setTabSize=function(e){return this.tabSize!==e&&(this.tabSize=e,this._constructLines(!1),!0)},e.prototype.setWrappingSettings=function(e,t,n){return(this.wrappingIndent!==e||this.wrappingColumn!==t||this.columnsForFullWidthChar!==n)&&(this.wrappingIndent=e,this.wrappingColumn=t,this.columnsForFullWidthChar=n,this._constructLines(!1),!0)},e.prototype.onModelFlushed=function(){this._constructLines(!0)},e.prototype.onModelLinesDeleted=function(e,t,n){if(e<=this._validModelVersionId)return null;var i=1===t?1:this.prefixSumComputer.getAccumulatedValue(t-2)+1,o=this.prefixSumComputer.getAccumulatedValue(n-1);return this.lines.splice(t-1,n-t+1),this.prefixSumComputer.removeValues(t-1,n-t+1),new lo(i,o)},e.prototype.onModelLinesInserted=function(e,t,n,i){if(e<=this._validModelVersionId)return null;for(var o=this.getHiddenAreas(),s=!1,a=new r.y(t,1),u=0;ua?(p=(f=1+(c=(l=1===t?1:this.prefixSumComputer.getAccumulatedValue(t-2)+1)+a-1))+(o-a)-1,u=!0):ot?t:e},e.prototype.warmUpLookupCache=function(e,t){this.prefixSumComputer.warmUpCache(e-1,t-1)},e.prototype.getActiveIndentGuide=function(e,t,n){this._ensureValidState(),e=this._toValidViewLineNumber(e),t=this._toValidViewLineNumber(t),n=this._toValidViewLineNumber(n);var i=this.convertViewPositionToModelPosition(e,this.getViewLineMinColumn(e)),o=this.convertViewPositionToModelPosition(t,this.getViewLineMinColumn(t)),r=this.convertViewPositionToModelPosition(n,this.getViewLineMinColumn(n)),s=this.model.getActiveIndentGuide(i.lineNumber,o.lineNumber,r.lineNumber),a=this.convertModelPositionToViewPosition(s.startLineNumber,1),u=this.convertModelPositionToViewPosition(s.endLineNumber,1);return{startLineNumber:a.lineNumber,endLineNumber:u.lineNumber,indent:s.indent}},e.prototype.getViewLinesIndentGuides=function(e,t){this._ensureValidState(),e=this._toValidViewLineNumber(e),t=this._toValidViewLineNumber(t);for(var n=this.convertViewPositionToModelPosition(e,this.getViewLineMinColumn(e)),i=this.convertViewPositionToModelPosition(t,this.getViewLineMaxColumn(t)),o=[],s=[],a=[],u=n.lineNumber-1,l=i.lineNumber-1,c=null,h=u;h<=l;h++){var d=this.lines[h];if(d.isVisible()){var f=d.getViewLineNumberOfModelPosition(0,h===u?n.column:1),p=d.getViewLineNumberOfModelPosition(0,this.model.getLineMaxColumn(h+1)),g=0;(C=p-f+1)>1&&1===d.getViewLineMinColumn(this.model,h+1,p)&&(g=0===f?1:2),s.push(C),a.push(g),null===c&&(c=new r.y(h+1,0))}else null!==c&&(o=o.concat(this.model.getLinesIndentGuides(c.lineNumber,h)),c=null)}null!==c&&(o=o.concat(this.model.getLinesIndentGuides(c.lineNumber,i.lineNumber)),c=null);for(var m=t-e+1,v=new Array(m),y=0,b=0,_=o.length;b<_;b++){var w,M=o[b],C=Math.min(m-y,s[b]);w=2===(g=a[b])?0:1===g?1:C;for(var S=0;St&&(f=!0,d=t-o+1);var p=h+d;if(c.getViewLinesData(this.model,u+1,h,p,o-e,n,a),o+=d,f)break}}return a},e.prototype.validateViewPosition=function(e,t,n){this._ensureValidState(),e=this._toValidViewLineNumber(e);var i=this.prefixSumComputer.getIndexOf(e-1),o=i.index,s=i.remainder,a=this.lines[o],u=a.getViewLineMinColumn(this.model,o+1,s),l=a.getViewLineMaxColumn(this.model,o+1,s);tl&&(t=l);var c=a.getModelColumnOfViewPosition(s,t);return this.model.validatePosition(new r.y(o+1,c)).equals(n)?new r.y(e,t):this.convertModelPositionToViewPosition(n.lineNumber,n.column)},e.prototype.convertViewPositionToModelPosition=function(e,t){this._ensureValidState(),e=this._toValidViewLineNumber(e);var n=this.prefixSumComputer.getIndexOf(e-1),i=n.index,o=n.remainder,s=this.lines[i].getModelColumnOfViewPosition(o,t);return this.model.validatePosition(new r.y(i+1,s))},e.prototype.convertModelPositionToViewPosition=function(e,t){this._ensureValidState();for(var n=this.model.validatePosition(new r.y(e,t)),i=n.lineNumber,o=n.column,s=i-1,a=!1;s>0&&!this.lines[s].isVisible();)s--,a=!0;if(0===s&&!this.lines[s].isVisible())return new r.y(1,1);var u=1+(0===s?0:this.prefixSumComputer.getAccumulatedValue(s-1));return a?this.lines[s].getViewPositionOfModelPosition(u,this.model.getLineMaxColumn(s+1)):this.lines[i-1].getViewPositionOfModelPosition(u,o)},e.prototype._getViewLineNumberForModelPosition=function(e,t){var n=e-1;if(this.lines[n].isVisible()){var i=1+(0===n?0:this.prefixSumComputer.getAccumulatedValue(n-1));return this.lines[n].getViewLineNumberOfModelPosition(i,t)}for(;n>0&&!this.lines[n].isVisible();)n--;if(0===n&&!this.lines[n].isVisible())return 1;var o=1+(0===n?0:this.prefixSumComputer.getAccumulatedValue(n-1));return this.lines[n].getViewLineNumberOfModelPosition(o,this.model.getLineMaxColumn(n+1))},e.prototype.getAllOverviewRulerDecorations=function(e,t,n){for(var i=this.model.getOverviewRulerDecorations(e,t),o=new ir,r=0,s=i.length;r0&&(r=this.wrappedIndent+r),r},e.prototype.getViewLineLength=function(e,t,n){if(!this._isVisible)throw new Error("Not supported");var i=this.getInputStartOffsetOfOutputLineIndex(n),o=this.getInputEndOffsetOfOutputLineIndex(e,t,n)-i;return n>0&&(o=this.wrappedIndent.length+o),o},e.prototype.getViewLineMinColumn=function(e,t,n){if(!this._isVisible)throw new Error("Not supported");return n>0?this.wrappedIndentLength+1:1},e.prototype.getViewLineMaxColumn=function(e,t,n){if(!this._isVisible)throw new Error("Not supported");return this.getViewLineContent(e,t,n).length+1},e.prototype.getViewLineData=function(e,t,n){if(!this._isVisible)throw new Error("Not supported");var i=this.getInputStartOffsetOfOutputLineIndex(n),o=this.getInputEndOffsetOfOutputLineIndex(e,t,n),r=e.getValueInRange({startLineNumber:t,startColumn:i+1,endLineNumber:t,endColumn:o+1});n>0&&(r=this.wrappedIndent+r);var s=n>0?this.wrappedIndentLength+1:1,a=r.length+1,u=n+10&&(l=this.wrappedIndentLength);var c=e.getLineTokens(t);return new Ao(r,u,s,a,c.sliceAndInflate(i,o,l))},e.prototype.getViewLinesData=function(e,t,n,i,o,r,s){if(!this._isVisible)throw new Error("Not supported");for(var a=n;a0&&(n0&&(o+=this.wrappedIndentLength),new r.y(e+i,o)},e.prototype.getViewLineNumberOfModelPosition=function(e,t){if(!this._isVisible)throw new Error("Not supported");return e+this.positionMapper.getOutputPositionOfInputOffset(t-1).outputLineIndex},e}();function er(e,t,n,i,o,r,s){var a=e.createLineMapping(t,n,i,o,r);return null===a?s?Jo.INSTANCE:Xo.INSTANCE:new $o(a,s)}var tr=function(){function e(e){this._lines=e}return e.prototype._validPosition=function(e){return this._lines.model.validatePosition(e)},e.prototype._validRange=function(e){return this._lines.model.validateRange(e)},e.prototype.convertViewPositionToModelPosition=function(e){return this._validPosition(e)},e.prototype.convertViewRangeToModelRange=function(e){return this._validRange(e)},e.prototype.validateViewPosition=function(e,t){return this._validPosition(t)},e.prototype.validateViewRange=function(e,t){return this._validRange(t)},e.prototype.convertModelPositionToViewPosition=function(e){return this._validPosition(e)},e.prototype.convertModelRangeToViewRange=function(e){return this._validRange(e)},e.prototype.modelPositionIsVisible=function(e){var t=this._lines.model.getLineCount();return!(e.lineNumber<1||e.lineNumber>t)},e}(),nr=function(){function e(e){this.model=e}return e.prototype.dispose=function(){},e.prototype.createCoordinatesConverter=function(){return new tr(this)},e.prototype.getHiddenAreas=function(){return[]},e.prototype.setHiddenAreas=function(e){return!1},e.prototype.setTabSize=function(e){return!1},e.prototype.setWrappingSettings=function(e,t,n){return!1},e.prototype.onModelFlushed=function(){},e.prototype.onModelLinesDeleted=function(e,t,n){return new lo(t,n)},e.prototype.onModelLinesInserted=function(e,t,n,i){return new co(t,n)},e.prototype.onModelLineChanged=function(e,t,n){return[!1,new uo(t,t),null,null]},e.prototype.acceptVersionId=function(e){},e.prototype.getViewLineCount=function(){return this.model.getLineCount()},e.prototype.warmUpLookupCache=function(e,t){},e.prototype.getActiveIndentGuide=function(e,t,n){return{startLineNumber:e,endLineNumber:e,indent:0}},e.prototype.getViewLinesIndentGuides=function(e,t){for(var n=t-e+1,i=new Array(n),o=0;o=t)return void(n>s&&(o[o.length-1]=n));o.push(i,t,n)}else this.result[e]=[i,t,n]},e}();function or(e,t){if(!e._resolvedColor){var n=t.type,i="dark"===n?e.darkColor:"light"===n?e.color:e.hcColor;e._resolvedColor=function(e,t){if("string"==typeof e)return e;var n=e?t.getColor(e.id):null;return n||(n=Go.transparent),n.toString()}(i,t)}return e._resolvedColor}var rr,sr,ar=function(){function e(t,n,i,o){this.r=e._clamp(t),this.g=e._clamp(n),this.b=e._clamp(i),this.a=e._clamp(o)}return e._clamp=function(e){return e<0?0:e>255?255:0|e},e}(),ur=function(){function e(){var e=this;this._onDidChange=new X.vl,this.onDidChange=this._onDidChange.event,this._updateColorMap(),No.dG.onDidChange((function(t){t.changedColorMap&&e._updateColorMap()}))}return e.getInstance=function(){return this._INSTANCE||(this._INSTANCE=new e),this._INSTANCE},e.prototype._updateColorMap=function(){var e=No.dG.getColorMap();if(!e)return this._colors=[null],void(this._backgroundIsLight=!0);this._colors=[null];for(var t=1;t=.5,this._onDidChange.fire(void 0)},e.prototype.getColor=function(e){return(e<1||e>=this._colors.length)&&(e=2),this._colors[e]},e.prototype.backgroundIsLight=function(){return this._backgroundIsLight},e._INSTANCE=null,e}(),lr=function(){function e(t,n){if(760!==t.length)throw new Error("Invalid x2CharData");if(190!==n.length)throw new Error("Invalid x1CharData");this.x2charData=t,this.x1charData=n,this.x2charDataLight=e.soften(t,.8),this.x1charDataLight=e.soften(n,50/60)}return e.soften=function(e,t){for(var n=new Uint8ClampedArray(e.length),i=0,o=e.length;it.width||i+4>t.height)console.warn("bad render request outside image data");else{var u=a?this.x2charDataLight:this.x2charData,l=e._getChIndex(o),c=4*t.width,h=s.r,d=s.g,f=s.b,p=r.r-h,g=r.g-d,m=r.b-f,v=t.data,y=4*l*2,b=i*c+4*n,_=u[y]/255;v[b+0]=h+p*_,v[b+1]=d+g*_,v[b+2]=f+m*_,_=u[y+1]/255,v[b+4]=h+p*_,v[b+5]=d+g*_,v[b+6]=f+m*_,b+=c,_=u[y+2]/255,v[b+0]=h+p*_,v[b+1]=d+g*_,v[b+2]=f+m*_,_=u[y+3]/255,v[b+4]=h+p*_,v[b+5]=d+g*_,v[b+6]=f+m*_,b+=c,_=u[y+4]/255,v[b+0]=h+p*_,v[b+1]=d+g*_,v[b+2]=f+m*_,_=u[y+5]/255,v[b+4]=h+p*_,v[b+5]=d+g*_,v[b+6]=f+m*_,b+=c,_=u[y+6]/255,v[b+0]=h+p*_,v[b+1]=d+g*_,v[b+2]=f+m*_,_=u[y+7]/255,v[b+4]=h+p*_,v[b+5]=d+g*_,v[b+6]=f+m*_}},e.prototype.x1RenderChar=function(t,n,i,o,r,s,a){if(n+1>t.width||i+2>t.height)console.warn("bad render request outside image data");else{var u=a?this.x1charDataLight:this.x1charData,l=e._getChIndex(o),c=4*t.width,h=s.r,d=s.g,f=s.b,p=r.r-h,g=r.g-d,m=r.b-f,v=t.data,y=2*l*1,b=i*c+4*n,_=u[y]/255;v[b+0]=h+p*_,v[b+1]=d+g*_,v[b+2]=f+m*_,b+=c,_=u[y+1]/255,v[b+0]=h+p*_,v[b+1]=d+g*_,v[b+2]=f+m*_}},e.prototype.x2BlockRenderChar=function(e,t,n,i,o,r){if(t+2>e.width||n+4>e.height)console.warn("bad render request outside image data");else{var s=4*e.width,a=o.r,u=o.g,l=o.b,c=a+.5*(i.r-a),h=u+.5*(i.g-u),d=l+.5*(i.b-l),f=e.data,p=n*s+4*t;f[p+0]=c,f[p+1]=h,f[p+2]=d,f[p+4]=c,f[p+5]=h,f[p+6]=d,f[(p+=s)+0]=c,f[p+1]=h,f[p+2]=d,f[p+4]=c,f[p+5]=h,f[p+6]=d,f[(p+=s)+0]=c,f[p+1]=h,f[p+2]=d,f[p+4]=c,f[p+5]=h,f[p+6]=d,f[(p+=s)+0]=c,f[p+1]=h,f[p+2]=d,f[p+4]=c,f[p+5]=h,f[p+6]=d}},e.prototype.x1BlockRenderChar=function(e,t,n,i,o,r){if(t+1>e.width||n+2>e.height)console.warn("bad render request outside image data");else{var s=4*e.width,a=o.r,u=o.g,l=o.b,c=a+.5*(i.r-a),h=u+.5*(i.g-u),d=l+.5*(i.b-l),f=e.data,p=n*s+4*t;f[p+0]=c,f[p+1]=h,f[p+2]=d,f[(p+=s)+0]=c,f[p+1]=h,f[p+2]=d}},e}(),cr=n(2879),hr=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),dr=function(e){function t(t,n,i){for(var o=e.call(this,0)||this,r=0;r=12352&&t<=12543||t>=13312&&t<=19903||t>=19968&&t<=40959?4:e.prototype.get.call(this,t)},t}(cr.V),fr=function(){function e(e,t,n){this.classifier=new dr(e,t,n)}return e.nextVisibleColumn=function(e,t,n,i){return e=+e,t=+t,i=+i,n?e+(t-e%t):e+i},e.prototype.createLineMapping=function(t,n,i,o,r){if(-1===i)return null;n=+n,i=+i,o=+o;var s=0,a="",u=-1;if((r=+r)!==Li.tJ.None&&-1!==(u=p.firstNonWhitespaceIndex(t))){a=t.substring(0,u);for(var l=0;li&&(a="",s=0)}var h=this.classifier,d=0,f=[],g=0,m=0,v=-1,y=0,b=-1,_=0,w=t.length;for(l=0;l0){var L=t.charCodeAt(l-1);1!==h.get(L)&&(v=l,y=s)}var I=1;if(p.isFullWidthCharacter(M)&&(I=o),(m=e.nextVisibleColumn(m,n,C,I))>i&&0!==l){var N=void 0,x=void 0;-1!==v&&y<=i?(N=v,x=y):-1!==b&&_<=i?(N=b,x=_):(N=l,x=s),f[g++]=N-d,d=N,m=e.nextVisibleColumn(x,n,C,I),v=-1,y=0,b=-1,_=0}if(-1!==v&&(y=e.nextVisibleColumn(y,n,C,I)),-1!==b&&(_=e.nextVisibleColumn(_,n,C,I)),2===S&&(r===Li.tJ.None||l>=u)&&(v=l+1,y=s),4===S&&l>>1;t===e[s]?i=t&&(this._whitespaceId2Index[l]=c+1)}this._whitespaceId2Index[e.toString()]=t,this._prefixSumValidIndex=Math.min(this._prefixSumValidIndex,t-1)},e.prototype.changeWhitespace=function(e,t,n){e|=0,t|=0,n|=0;var i=!1;return i=this.changeWhitespaceHeight(e,n)||i,this.changeWhitespaceAfterLineNumber(e,t)||i},e.prototype.changeWhitespaceHeight=function(e,t){t|=0;var n=(e|=0).toString();if(this._whitespaceId2Index.hasOwnProperty(n)){var i=this._whitespaceId2Index[n];if(this._heights[i]!==t)return this._heights[i]=t,this._prefixSumValidIndex=Math.min(this._prefixSumValidIndex,i-1),!0}return!1},e.prototype.changeWhitespaceAfterLineNumber=function(t,n){n|=0;var i=(t|=0).toString();if(this._whitespaceId2Index.hasOwnProperty(i)){var o=this._whitespaceId2Index[i];if(this._afterLineNumbers[o]!==n){var r=this._ordinals[o],s=this._heights[o],a=this._minWidths[o];this.removeWhitespace(t);var u=e.findInsertionIndex(this._afterLineNumbers,n,this._ordinals,r);return this._insertWhitespaceAtIndex(t,u,n,r,s,a),!0}}return!1},e.prototype.removeWhitespace=function(e){var t=(e|=0).toString();if(this._whitespaceId2Index.hasOwnProperty(t)){var n=this._whitespaceId2Index[t];return delete this._whitespaceId2Index[t],this._removeWhitespaceAtIndex(n),this._minWidth=-1,!0}return!1},e.prototype._removeWhitespaceAtIndex=function(e){e|=0,this._heights.splice(e,1),this._minWidths.splice(e,1),this._ids.splice(e,1),this._afterLineNumbers.splice(e,1),this._ordinals.splice(e,1),this._prefixSum.splice(e,1),this._prefixSumValidIndex=Math.min(this._prefixSumValidIndex,e-1);for(var t=Object.keys(this._whitespaceId2Index),n=0,i=t.length;n=e&&(this._whitespaceId2Index[o]=r-1)}},e.prototype.onLinesDeleted=function(e,t){e|=0,t|=0;for(var n=0,i=this._afterLineNumbers.length;nt&&(this._afterLineNumbers[n]-=t-e+1)}},e.prototype.onLinesInserted=function(e,t){e|=0,t|=0;for(var n=0,i=this._afterLineNumbers.length;n=t.length||t[o+1]>=e)return o;n=o+1|0}else i=o-1|0}return-1},e.prototype._findFirstWhitespaceAfterLineNumber=function(e){e|=0;var t=this._findLastWhitespaceBeforeLineNumber(e)+1;return t1?this._lineHeight*(e-1):0)+this._whitespaces.getAccumulatedHeightBeforeLineNumber(e)},e.prototype.getWhitespaceAccumulatedHeightBeforeLineNumber=function(e){return this._whitespaces.getAccumulatedHeightBeforeLineNumber(e)},e.prototype.getWhitespaceMinWidth=function(){return this._whitespaces.getMinWidth()},e.prototype.isAfterLines=function(e){return e>this.getLinesTotalHeight()},e.prototype.getLineNumberAtOrAfterVerticalOffset=function(e){if((e|=0)<0)return 1;for(var t=0|this._lineCount,n=this._lineHeight,i=1,o=t;i=s+n)i=r+1;else{if(e>=s)return r;o=r}}return i>t?t:i},e.prototype.getLinesViewportData=function(e,t){e|=0,t|=0;var n,i,o=this._lineHeight,r=0|this.getLineNumberAtOrAfterVerticalOffset(e),s=0|this.getVerticalOffsetForLineNumber(r),a=0|this._lineCount,u=0|this._whitespaces.getFirstWhitespaceIndexAfterLineNumber(r),l=0|this._whitespaces.getCount();-1===u?(u=l,i=a+1,n=0):(i=0|this._whitespaces.getAfterLineNumberForWhitespaceIndex(u),n=0|this._whitespaces.getHeightForWhitespaceIndex(u));var c=s,h=c,d=5e5,f=0;s>=d&&(f=Math.floor(s/d)*d,h-=f=Math.floor(f/o)*o);for(var p=[],g=e+(t-e)/2,m=-1,v=r;v<=a;v++){for(-1===m&&(c<=g&&gg)&&(m=v),c+=o,p[v-r]=h,h+=o;i===v;)h+=n,c+=n,++u>=l?i=a+1:(i=0|this._whitespaces.getAfterLineNumberForWhitespaceIndex(u),n=0|this._whitespaces.getHeightForWhitespaceIndex(u));if(c>=t){a=v;break}}-1===m&&(m=a);var y=0|this.getVerticalOffsetForLineNumber(a),b=r,_=a;return b<_&&st&&_--,{bigNumbersDelta:f,startLineNumber:r,endLineNumber:a,relativeVerticalOffset:p,centeredLineNumber:m,completelyVisibleStartLineNumber:b,completelyVisibleEndLineNumber:_}},e.prototype.getVerticalOffsetForWhitespaceIndex=function(e){e|=0;var t=this._whitespaces.getAfterLineNumberForWhitespaceIndex(e);return(t>=1?this._lineHeight*t:0)+(e>0?this._whitespaces.getAccumulatedHeight(e-1):0)},e.prototype.getWhitespaceIndexAtOrAfterVerticallOffset=function(e){e|=0;var t,n,i=0,o=this._whitespaces.getCount()-1;if(o<0)return-1;if(e>=this.getVerticalOffsetForWhitespaceIndex(o)+this._whitespaces.getHeightForWhitespaceIndex(o))return-1;for(;i=(n=this.getVerticalOffsetForWhitespaceIndex(t))+this._whitespaces.getHeightForWhitespaceIndex(t))i=t+1;else{if(e>=n)return t;o=t}return i},e.prototype.getWhitespaceAtVerticalOffset=function(e){e|=0;var t=this.getWhitespaceIndexAtOrAfterVerticallOffset(e);if(t<0)return null;if(t>=this._whitespaces.getCount())return null;var n=this.getVerticalOffsetForWhitespaceIndex(t);if(n>e)return null;var i=this._whitespaces.getHeightForWhitespaceIndex(t);return{id:this._whitespaces.getIdForWhitespaceIndex(t),afterLineNumber:this._whitespaces.getAfterLineNumberForWhitespaceIndex(t),verticalOffset:n,height:i}},e.prototype.getWhitespaceViewportData=function(e,t){e|=0,t|=0;var n=this.getWhitespaceIndexAtOrAfterVerticallOffset(e),i=this._whitespaces.getCount()-1;if(n<0)return[];for(var o=[],r=n;r<=i;r++){var s=this.getVerticalOffsetForWhitespaceIndex(r),a=this._whitespaces.getHeightForWhitespaceIndex(r);if(s>=t)break;o.push({id:this._whitespaces.getIdForWhitespaceIndex(r),afterLineNumber:this._whitespaces.getAfterLineNumberForWhitespaceIndex(r),verticalOffset:s,height:a})}return o},e.prototype.getWhitespaces=function(){return this._whitespaces.getWhitespaces(this._lineHeight)},e}(),yr=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),br=function(e){function t(t,n,i){var o=e.call(this)||this;return o._configuration=t,o._linesLayout=new vr(n,o._configuration.editor.lineHeight),o.scrollable=o._register(new gr.yE(0,i)),o._configureSmoothScrollDuration(),o.scrollable.setScrollDimensions({width:t.editor.layoutInfo.contentWidth,height:t.editor.layoutInfo.contentHeight}),o.onDidScroll=o.scrollable.onScroll,o._updateHeight(),o}return yr(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this)},t.prototype.onHeightMaybeChanged=function(){this._updateHeight()},t.prototype._configureSmoothScrollDuration=function(){this.scrollable.setSmoothScrollDuration(this._configuration.editor.viewInfo.smoothScrolling?125:0)},t.prototype.onConfigurationChanged=function(e){e.lineHeight&&this._linesLayout.setLineHeight(this._configuration.editor.lineHeight),e.layoutInfo&&this.scrollable.setScrollDimensions({width:this._configuration.editor.layoutInfo.contentWidth,height:this._configuration.editor.layoutInfo.contentHeight}),e.viewInfo&&this._configureSmoothScrollDuration(),this._updateHeight()},t.prototype.onFlushed=function(e){this._linesLayout.onFlushed(e)},t.prototype.onLinesDeleted=function(e,t){this._linesLayout.onLinesDeleted(e,t)},t.prototype.onLinesInserted=function(e,t){this._linesLayout.onLinesInserted(e,t)},t.prototype._getHorizontalScrollbarHeight=function(e){return this._configuration.editor.viewInfo.scrollbar.horizontal===gr.XR.Hidden||e.width>=e.scrollWidth?0:this._configuration.editor.viewInfo.scrollbar.horizontalScrollbarSize},t.prototype._getTotalHeight=function(){var e=this.scrollable.getScrollDimensions(),t=this._linesLayout.getLinesTotalHeight();return this._configuration.editor.viewInfo.scrollBeyondLastLine?t+=e.height-this._configuration.editor.lineHeight:t+=this._getHorizontalScrollbarHeight(e),Math.max(e.height,t)},t.prototype._updateHeight=function(){this.scrollable.setScrollDimensions({scrollHeight:this._getTotalHeight()})},t.prototype.getCurrentViewport=function(){var e=this.scrollable.getScrollDimensions(),t=this.scrollable.getCurrentScrollPosition();return new To(t.scrollTop,t.scrollLeft,e.width,e.height)},t.prototype.getFutureViewport=function(){var e=this.scrollable.getScrollDimensions(),t=this.scrollable.getFutureScrollPosition();return new To(t.scrollTop,t.scrollLeft,e.width,e.height)},t.prototype._computeScrollWidth=function(e,t){if(!this._configuration.editor.wrappingInfo.isViewportWrapping){var n=this._configuration.editor.viewInfo.scrollBeyondLastColumn*this._configuration.editor.fontInfo.typicalHalfwidthCharacterWidth,i=this._linesLayout.getWhitespaceMinWidth();return Math.max(e+n,t,i)}return Math.max(e,t)},t.prototype.onMaxLineWidthChanged=function(e){var t=this._computeScrollWidth(e,this.getCurrentViewport().width);this.scrollable.setScrollDimensions({scrollWidth:t}),this._updateHeight()},t.prototype.saveState=function(){var e=this.scrollable.getFutureScrollPosition(),t=e.scrollTop,n=this._linesLayout.getLineNumberAtOrAfterVerticalOffset(t);return{scrollTop:t,scrollTopWithoutViewZones:t-this._linesLayout.getWhitespaceAccumulatedHeightBeforeLineNumber(n),scrollLeft:e.scrollLeft}},t.prototype.addWhitespace=function(e,t,n,i){return this._linesLayout.insertWhitespace(e,t,n,i)},t.prototype.changeWhitespace=function(e,t,n){return this._linesLayout.changeWhitespace(e,t,n)},t.prototype.removeWhitespace=function(e){return this._linesLayout.removeWhitespace(e)},t.prototype.getVerticalOffsetForLineNumber=function(e){return this._linesLayout.getVerticalOffsetForLineNumber(e)},t.prototype.isAfterLines=function(e){return this._linesLayout.isAfterLines(e)},t.prototype.getLineNumberAtVerticalOffset=function(e){return this._linesLayout.getLineNumberAtOrAfterVerticalOffset(e)},t.prototype.getWhitespaceAtVerticalOffset=function(e){return this._linesLayout.getWhitespaceAtVerticalOffset(e)},t.prototype.getLinesViewportData=function(){var e=this.getCurrentViewport();return this._linesLayout.getLinesViewportData(e.top,e.top+e.height)},t.prototype.getLinesViewportDataAtScrollTop=function(e){var t=this.scrollable.getScrollDimensions();return e+t.height>t.scrollHeight&&(e=t.scrollHeight-t.height),e<0&&(e=0),this._linesLayout.getLinesViewportData(e,e+t.height)},t.prototype.getWhitespaceViewportData=function(){var e=this.getCurrentViewport();return this._linesLayout.getWhitespaceViewportData(e.top,e.top+e.height)},t.prototype.getWhitespaces=function(){return this._linesLayout.getWhitespaces()},t.prototype.getScrollWidth=function(){return this.scrollable.getScrollDimensions().scrollWidth},t.prototype.getScrollHeight=function(){return this.scrollable.getScrollDimensions().scrollHeight},t.prototype.getCurrentScrollLeft=function(){return this.scrollable.getCurrentScrollPosition().scrollLeft},t.prototype.getCurrentScrollTop=function(){return this.scrollable.getCurrentScrollPosition().scrollTop},t.prototype.validateScrollPosition=function(e){return this.scrollable.validateScrollPosition(e)},t.prototype.setScrollPositionNow=function(e){this.scrollable.setScrollPositionNow(e)},t.prototype.setScrollPositionSmooth=function(e){this.scrollable.setScrollPositionSmooth(e)},t.prototype.deltaScrollNow=function(e,t){var n=this.scrollable.getCurrentScrollPosition();this.scrollable.setScrollPositionNow({scrollLeft:n.scrollLeft+e,scrollTop:n.scrollTop+t})},t}(I.jG),_r=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),wr=function(e){function t(t,n,i,o){var r=e.call(this)||this;if(r.editorId=t,r.configuration=n,r.model=i,r.hasFocus=!1,r.viewportStartLine=-1,r.viewportStartLineTrackedRange=null,r.viewportStartLineTop=0,r.model.isTooLargeForTokenization())r.lines=new nr(r.model);else{var s=r.configuration.editor,a=new fr(s.wrappingInfo.wordWrapBreakBeforeCharacters,s.wrappingInfo.wordWrapBreakAfterCharacters,s.wrappingInfo.wordWrapBreakObtrusiveCharacters);r.lines=new Ko(r.model,a,r.model.getOptions().tabSize,s.wrappingInfo.wrappingColumn,s.fontInfo.typicalFullwidthCharacterWidth/s.fontInfo.typicalHalfwidthCharacterWidth,s.wrappingInfo.wrappingIndent)}return r.coordinatesConverter=r.lines.createCoordinatesConverter(),r.viewLayout=r._register(new br(r.configuration,r.getLineCount(),o)),r._register(r.viewLayout.onDidScroll((function(e){try{r._beginEmit().emit(new fo(e))}finally{r._endEmit()}}))),r.decorations=new Po(r.editorId,r.model,r.configuration,r.lines,r.coordinatesConverter),r._registerModelEvents(),r._register(r.configuration.onDidChange((function(e){try{var t=r._beginEmit();r._onConfigurationChanged(t,e)}finally{r._endEmit()}}))),r._register(ur.getInstance().onDidChange((function(){try{r._beginEmit().emit(new mo)}finally{r._endEmit()}}))),r}return _r(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this),this.decorations.dispose(),this.lines.dispose(),this.viewportStartLineTrackedRange=this.model._setTrackedRange(this.viewportStartLineTrackedRange,null,Xi.kK.NeverGrowsWhenTypingAtEdges)},t.prototype.setHasFocus=function(e){this.hasFocus=e},t.prototype._onConfigurationChanged=function(e,t){var n=null;if(-1!==this.viewportStartLine){var i=new r.y(this.viewportStartLine,this.getLineMinColumn(this.viewportStartLine));n=this.coordinatesConverter.convertViewPositionToModelPosition(i)}var o=!1,s=this.configuration.editor;if(this.lines.setWrappingSettings(s.wrappingInfo.wrappingIndent,s.wrappingInfo.wrappingColumn,s.fontInfo.typicalFullwidthCharacterWidth/s.fontInfo.typicalHalfwidthCharacterWidth)&&(e.emit(new ro),e.emit(new ao),e.emit(new oo),this.decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount()),0!==this.viewLayout.getCurrentScrollTop()&&(o=!0)),t.readOnly&&(this.decorations.reset(),e.emit(new oo)),e.emit(new no(t)),this.viewLayout.onConfigurationChanged(t),o&&n){var a=this.coordinatesConverter.convertModelPositionToViewPosition(n),u=this.viewLayout.getVerticalOffsetForLineNumber(a.lineNumber);this.viewLayout.deltaScrollNow(0,u-this.viewportStartLineTop)}},t.prototype._registerModelEvents=function(){var e=this;this._register(this.model.onDidChangeRawContentFast((function(t){try{for(var n=e._beginEmit(),i=!1,o=!1,r=t.changes,s=t.versionId,a=0,u=r.length;a=2&&e.viewportStartLineTrackedRange){var g=e.model._getTrackedRange(e.viewportStartLineTrackedRange);if(g){var m=e.coordinatesConverter.convertModelPositionToViewPosition(g.getStartPosition()),v=e.viewLayout.getVerticalOffsetForLineNumber(m.lineNumber);e.viewLayout.deltaScrollNow(0,v-e.viewportStartLineTop)}}}))),this._register(this.model.onDidChangeTokens((function(t){for(var n=[],i=0,o=t.ranges.length;iu||(r0&&u[c-1]===u[c]||(l+=this.model.getLineContent(u[c])+o);return l}var h=[];for(c=0;c'+this._getHTMLToCopy(n,r)+""},t.prototype._getHTMLToCopy=function(e,t){for(var n=e.startLineNumber,i=e.startColumn,o=e.endLineNumber,r=e.endColumn,s=this.getTabSize(),a="",u=n;u<=o;u++){var l=this.model.getLineTokens(u),c=l.getLineContent(),h=u===n?i-1:0,d=u===o?r-1:c.length;a+=""===c?"
":ko(c,l.inflate(),t,h,d,s)}return a},t.prototype._getColorMap=function(){for(var e=No.dG.getColorMap(),t=[null],n=1,i=e.length;n, selectionStart: "+this.selectionStart+", selectionEnd: "+this.selectionEnd+"]"},e.readFromTextArea=function(t){return new e(t.getValue(),t.getSelectionStart(),t.getSelectionEnd(),null,null)},e.prototype.collapseSelection=function(){return new e(this.value,this.value.length,this.value.length,null,null)},e.prototype.writeToTextArea=function(e,t,n){t.setValue(e,this.value),n&&t.setSelectionRange(e,this.selectionStart,this.selectionEnd)},e.prototype.deduceEditorPosition=function(e){if(e<=this.selectionStart){var t=this.value.substring(e,this.selectionStart);return this._finishDeduceEditorPosition(this.selectionStartPosition,t,-1)}if(e>=this.selectionEnd)return t=this.value.substring(this.selectionEnd,e),this._finishDeduceEditorPosition(this.selectionEndPosition,t,1);var n=this.value.substring(this.selectionStart,e);if(-1===n.indexOf(String.fromCharCode(8230)))return this._finishDeduceEditorPosition(this.selectionStartPosition,n,1);var i=this.value.substring(e,this.selectionEnd);return this._finishDeduceEditorPosition(this.selectionEndPosition,i,-1)},e.prototype._finishDeduceEditorPosition=function(e,t,n){for(var i=0,o=-1;-1!==(o=t.indexOf("\n",o+1));)i++;return[e,n*t.length,i]},e.selectedText=function(t){return new e(t,0,t.length,null,null)},e.deduceInput=function(e,t,n,i){if(!e)return{text:"",replaceCharCnt:0};var o=e.value,r=e.selectionStart,s=e.selectionEnd,a=t.value,u=t.selectionStart,l=t.selectionEnd;i&&o.length>0&&r===s&&u===l&&!p.startsWith(a,o)&&p.endsWith(a,o)&&(r=0,s=0);var c=o.substring(s),h=a.substring(l),d=p.commonSuffixLength(c,h);a=a.substring(0,a.length-d);var f=(o=o.substring(0,o.length-d)).substring(0,r),g=a.substring(0,u),m=p.commonPrefixLength(f,g);if(a=a.substring(m),o=o.substring(m),u-=m,r-=m,l-=m,s-=m,n&&u===l&&o.length>0){var v=null;if(u===a.length?p.startsWith(a,o)&&(v=a.substring(o.length)):p.endsWith(a,o)&&(v=a.substring(0,a.length-o.length)),null!==v&&v.length>0&&(/\uFE0F/.test(v)||p.containsEmoji(v)))return{text:v,replaceCharCnt:0}}return u===l?o===a&&0===r&&s===o.length&&u===a.length&&-1===a.indexOf("\n")&&p.containsFullWidthCharacter(a)?{text:"",replaceCharCnt:0}:{text:a,replaceCharCnt:f.length-m}:{text:a,replaceCharCnt:s-r}},e.EMPTY=new e("",0,0,null,null),e}()),Pr=function(){function e(){}return e._getPageOfLine=function(t){return Math.floor((t-1)/e._LINES_PER_PAGE)},e._getRangeForPage=function(t){var n=t*e._LINES_PER_PAGE,i=n+1,o=n+e._LINES_PER_PAGE;return new s.Q(i,1,o+1,1)},e.fromEditorSelection=function(t,n,i,o){var a=e._getPageOfLine(i.startLineNumber),u=e._getRangeForPage(a),l=e._getPageOfLine(i.endLineNumber),c=e._getRangeForPage(l),h=u.intersectRanges(new s.Q(1,1,i.startLineNumber,i.startColumn)),d=n.getValueInRange(h,Xi.kf.LF),f=n.getLineCount(),p=n.getLineMaxColumn(f),g=c.intersectRanges(new s.Q(i.endLineNumber,i.endColumn,f,p)),m=n.getValueInRange(g,Xi.kf.LF),v=null;if(a===l||a+1===l)v=n.getValueInRange(i,Xi.kf.LF);else{var y=u.intersectRanges(i),b=c.intersectRanges(i);v=n.getValueInRange(y,Xi.kf.LF)+String.fromCharCode(8230)+n.getValueInRange(b,Xi.kf.LF)}if(o){var _=500;d.length>_&&(d=d.substring(d.length-_,d.length)),m.length>_&&(m=m.substring(0,_)),v.length>1e3&&(v=v.substring(0,_)+String.fromCharCode(8230)+v.substring(v.length-_,v.length))}return new Rr(d+v+m,d.length,d.length+v.length,new r.y(i.startLineNumber,i.startColumn),new r.y(i.endLineNumber,i.endColumn))},e._LINES_PER_PAGE=10,e}(),zr=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Wr={forceCopyWithSyntaxHighlighting:!1},Fr=function(e){function t(t,n){var i=e.call(this)||this;i._onFocus=i._register(new X.vl),i.onFocus=i._onFocus.event,i._onBlur=i._register(new X.vl),i.onBlur=i._onBlur.event,i._onKeyDown=i._register(new X.vl),i.onKeyDown=i._onKeyDown.event,i._onKeyUp=i._register(new X.vl),i.onKeyUp=i._onKeyUp.event,i._onCut=i._register(new X.vl),i.onCut=i._onCut.event,i._onPaste=i._register(new X.vl),i.onPaste=i._onPaste.event,i._onType=i._register(new X.vl),i.onType=i._onType.event,i._onCompositionStart=i._register(new X.vl),i.onCompositionStart=i._onCompositionStart.event,i._onCompositionUpdate=i._register(new X.vl),i.onCompositionUpdate=i._onCompositionUpdate.event,i._onCompositionEnd=i._register(new X.vl),i.onCompositionEnd=i._onCompositionEnd.event,i._onSelectionChangeRequest=i._register(new X.vl),i.onSelectionChangeRequest=i._onSelectionChangeRequest.event,i._host=t,i._textArea=i._register(new Hr(n)),i._lastTextAreaEvent=0,i._asyncTriggerCut=i._register(new Ct((function(){return i._onCut.fire()}),0)),i._textAreaState=Rr.EMPTY,i.writeScreenReaderContent("ctor"),i._hasFocus=!1,i._isDoingComposition=!1,i._nextCommand=0,i._register(hn(n.domNode,"keydown",(function(e){!i._isDoingComposition||109!==e.keyCode&&1!==e.keyCode||e.stopPropagation(),e.equals(9)&&e.preventDefault(),i._onKeyDown.fire(e)}))),i._register(hn(n.domNode,"keyup",(function(e){i._onKeyUp.fire(e)}))),i._register(cn(n.domNode,"compositionstart",(function(e){i._lastTextAreaEvent=1,i._isDoingComposition||(i._isDoingComposition=!0,kt||i._setAndWriteTextAreaState("compositionstart",Rr.EMPTY),i._onCompositionStart.fire())})));var o=function(e,t){var n=i._textAreaState,o=Rr.readFromTextArea(i._textArea);return[o,Rr.deduceInput(n,o,e,t)]},r=function(e){var t=i._textAreaState,n=Rr.selectedText(e);return[n,{text:n.value,replaceCharCnt:t.selectionEnd-t.selectionStart}]},s=function(e){return!(!kt||"ja"!==e)||!(!xt||0!==e.indexOf("zh-Han"))};i._register(cn(n.domNode,"compositionupdate",(function(e){if(i._lastTextAreaEvent=2,s(e.locale)){var t=o(!1,!1),n=t[0],a=t[1];return i._textAreaState=n,i._onType.fire(a),void i._onCompositionUpdate.fire(e)}var u=r(e.data),l=u[0],c=u[1];i._textAreaState=l,i._onType.fire(c),i._onCompositionUpdate.fire(e)}))),i._register(cn(n.domNode,"compositionend",(function(e){if(i._lastTextAreaEvent=3,s(e.locale)){var t=o(!1,!1),n=t[0],a=t[1];i._textAreaState=n,i._onType.fire(a)}else{var u=r(e.data);n=u[0],a=u[1],i._textAreaState=n,i._onType.fire(a)}(kt||At)&&(i._textAreaState=Rr.readFromTextArea(i._textArea)),i._isDoingComposition&&(i._isDoingComposition=!1,i._onCompositionEnd.fire())}))),i._register(cn(n.domNode,"input",(function(){var e=8===i._lastTextAreaEvent;if(i._lastTextAreaEvent=4,i._textArea.setIgnoreSelectionChangeTime("received input event"),!i._isDoingComposition){var t=o(B.zx,e&&B.zx),n=t[0],r=t[1];0===r.replaceCharCnt&&1===r.text.length&&p.isHighSurrogate(r.text.charCodeAt(0))||(i._textAreaState=n,0===i._nextCommand?""!==r.text&&i._onType.fire(r):(""!==r.text&&i._onPaste.fire({text:r.text}),i._nextCommand=0))}}))),i._register(cn(n.domNode,"cut",(function(e){i._lastTextAreaEvent=5,i._textArea.setIgnoreSelectionChangeTime("received cut event"),i._ensureClipboardGetsEditorSelection(e),i._asyncTriggerCut.schedule()}))),i._register(cn(n.domNode,"copy",(function(e){i._lastTextAreaEvent=6,i._ensureClipboardGetsEditorSelection(e)}))),i._register(cn(n.domNode,"paste",(function(e){if(i._lastTextAreaEvent=7,i._textArea.setIgnoreSelectionChangeTime("received paste event"),Br.canUseTextData(e)){var t=Br.getTextData(e);""!==t&&i._onPaste.fire({text:t})}else i._textArea.getSelectionStart()!==i._textArea.getSelectionEnd()&&i._setAndWriteTextAreaState("paste",Rr.EMPTY),i._nextCommand=1}))),i._register(cn(n.domNode,"focus",(function(){i._lastTextAreaEvent=8,i._setHasFocus(!0)}))),i._register(cn(n.domNode,"blur",(function(){i._lastTextAreaEvent=9,i._setHasFocus(!1)})));var a=0;return i._register(cn(document,"selectionchange",(function(e){if(i._hasFocus&&!i._isDoingComposition&&At&&B.uF){var t=Date.now(),n=t-a;if(a=t,!(n<5)){var o=t-i._textArea.getIgnoreSelectionChangeTime();if(i._textArea.resetSelectionChangeTime(),!(o<100)&&i._textAreaState.selectionStartPosition&&i._textAreaState.selectionEndPosition){var r=i._textArea.getValue();if(i._textAreaState.value===r){var s=i._textArea.getSelectionStart(),u=i._textArea.getSelectionEnd();if(i._textAreaState.selectionStart!==s||i._textAreaState.selectionEnd!==u){var l=i._textAreaState.deduceEditorPosition(s),c=i._host.deduceModelPosition(l[0],l[1],l[2]),h=i._textAreaState.deduceEditorPosition(u),d=i._host.deduceModelPosition(h[0],h[1],h[2]),f=new Be.L(c.lineNumber,c.column,d.lineNumber,d.column);i._onSelectionChangeRequest.fire(f)}}}}}}))),i}return zr(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this)},t.prototype.focusTextArea=function(){this._setHasFocus(!0)},t.prototype.isFocused=function(){return this._hasFocus},t.prototype._setHasFocus=function(e){this._hasFocus!==e&&(this._hasFocus=e,this._hasFocus&&(Dt?this._setAndWriteTextAreaState("focusgain",Rr.EMPTY):this.writeScreenReaderContent("focusgain")),this._hasFocus?this._onFocus.fire():this._onBlur.fire())},t.prototype._setAndWriteTextAreaState=function(e,t){this._hasFocus||(t=t.collapseSelection()),t.writeToTextArea(e,this._textArea,this._hasFocus),this._textAreaState=t},t.prototype.writeScreenReaderContent=function(e){this._isDoingComposition||this._setAndWriteTextAreaState(e,this._host.getScreenReaderContent(this._textAreaState))},t.prototype._ensureClipboardGetsEditorSelection=function(e){var t=this._host.getPlainTextToCopy();if(Br.canUseTextData(e)){var n=null;(function(){if(xt)return!1;if(Dt){var e=Nt.indexOf("Edge/"),t=parseInt(Nt.substring(e+5,Nt.indexOf(".",e)),10);if(!t||t>=12&&t<=16)return!1}return!0})()&&(t.length<65536||Wr.forceCopyWithSyntaxHighlighting)&&(n=this._host.getHTMLToCopy()),Br.setTextData(e,t,n)}else this._setAndWriteTextAreaState("copy or cut",Rr.selectedText(t))},t}(I.jG),Br=function(){function e(){}return e.canUseTextData=function(e){return!!e.clipboardData||!!window.clipboardData},e.getTextData=function(e){if(e.clipboardData)return e.preventDefault(),e.clipboardData.getData("text/plain");if(window.clipboardData)return e.preventDefault(),window.clipboardData.getData("Text");throw new Error("ClipboardEventUtils.getTextData: Cannot use text data!")},e.setTextData=function(e,t,n){if(e.clipboardData)return e.clipboardData.setData("text/plain",t),null!==n&&e.clipboardData.setData("text/html",n),void e.preventDefault();if(window.clipboardData)return window.clipboardData.setData("Text",t),void e.preventDefault();throw new Error("ClipboardEventUtils.setTextData: Cannot use text data!")},e}(),Hr=function(e){function t(t){var n=e.call(this)||this;return n._actual=t,n._ignoreSelectionChangeTime=0,n}return zr(t,e),t.prototype.setIgnoreSelectionChangeTime=function(e){this._ignoreSelectionChangeTime=Date.now()},t.prototype.getIgnoreSelectionChangeTime=function(){return this._ignoreSelectionChangeTime},t.prototype.resetSelectionChangeTime=function(){this._ignoreSelectionChangeTime=0},t.prototype.getValue=function(){return this._actual.domNode.value},t.prototype.setValue=function(e,t){var n=this._actual.domNode;n.value!==t&&(this.setIgnoreSelectionChangeTime("setValue"),n.value=t)},t.prototype.getSelectionStart=function(){return this._actual.domNode.selectionStart},t.prototype.getSelectionEnd=function(){return this._actual.domNode.selectionEnd},t.prototype.setSelectionRange=function(e,t,n){var i=this._actual.domNode,o=document.activeElement===i,r=i.selectionStart,s=i.selectionEnd;if(o&&r===t&&s===n)Tt&&window.parent!==window&&i.focus();else{if(o)return this.setIgnoreSelectionChangeTime("setSelectionRange"),i.setSelectionRange(t,n),void(Tt&&window.parent!==window&&i.focus());try{var a=function(e){for(var t=[],n=0;e&&e.nodeType===e.ELEMENT_NODE;n++)t[n]=e.scrollTop,e=e.parentNode;return t}(i);this.setIgnoreSelectionChangeTime("setSelectionRange"),i.focus(),i.setSelectionRange(t,n),function(e,t){for(var n=0;e&&e.nodeType===e.ELEMENT_NODE;n++)e.scrollTop!==t[n]&&(e.scrollTop=t[n]),e=e.parentNode}(i,a)}catch(e){}}},t}(I.jG),Vr=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Ur=function(e){function t(t){var n=e.call(this)||this;return n._context=t,n._context.addEventHandler(n),n}return Vr(t,e),t.prototype.dispose=function(){this._context.removeEventHandler(this),this._context=null,e.prototype.dispose.call(this)},t}(Or),Yr=function(){function e(){}return e.write=function(e,t){e.setAttribute("data-mprt",String(t))},e.read=function(e){var t=e.getAttribute("data-mprt");return null===t?0:parseInt(t,10)},e.collect=function(e,t){for(var n=[],i=0;e&&e!==document.body&&e!==t;)e.nodeType===e.ELEMENT_NODE&&(n[i++]=this.read(e)),e=e.parentElement;for(var o=new Uint8Array(i),r=0;r'+n+"":String(i)}return 3===this._renderLineNumbers?this._lastCursorModelPosition.lineNumber===n||n%10==0?String(n):"":String(n)},t.prototype.prepareRender=function(e){if(0!==this._renderLineNumbers){for(var n=B.j9?this._lineHeight%2==0?" lh-even":" lh-odd":"",i=e.visibleRange.startLineNumber,o=e.visibleRange.endLineNumber,r='
',s=[],a=i;a<=o;a++){var u=a-i,l=this._getLineRenderLineNumber(a);s[u]=l?r+l+"
":""}this._renderResult=s}else this._renderResult=null},t.prototype.render=function(e,t){if(!this._renderResult)return"";var n=t-e;return n<0||n>=this._renderResult.length?"":this._renderResult[n]},t.CLASS_NAME="line-numbers",t}(Ga);Tr((function(e,t){var n=e.getColor(Sa);n&&t.addRule(".monaco-editor .line-numbers { color: "+n+"; }");var i=e.getColor(Ia);i&&t.addRule(".monaco-editor .current-line ~ .line-numbers { color: "+i+"; }")}));var Ka=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Ja=function(){function e(e,t,n){this.top=e,this.left=t,this.width=n}return e.prototype.setWidth=function(t){return new e(this.top,this.left,t)},e}(),Xa=kt||Tt,$a=function(){function e(){this._lastState=null}return e.prototype.set=function(e){this._lastState=e},e.prototype.get=function(e){return this._lastState&&this._lastState.lastCopiedValue===e?this._lastState:(this._lastState=null,null)},e.INSTANCE=new e,e}(),eu=function(e){function t(t,n,i){var o=e.call(this,t)||this;o._primaryCursorVisibleRange=null,o._viewController=n,o._viewHelper=i;var r=o._context.configuration.editor;o._accessibilitySupport=r.accessibilitySupport,o._contentLeft=r.layoutInfo.contentLeft,o._contentWidth=r.layoutInfo.contentWidth,o._contentHeight=r.layoutInfo.contentHeight,o._scrollLeft=0,o._scrollTop=0,o._fontInfo=r.fontInfo,o._lineHeight=r.lineHeight,o._emptySelectionClipboard=r.emptySelectionClipboard,o._visibleTextArea=null,o._selections=[new Be.L(1,1,1,1)],o.textArea=Ar(document.createElement("textarea")),Yr.write(o.textArea,6),o.textArea.setClassName("inputarea"),o.textArea.setAttribute("wrap","off"),o.textArea.setAttribute("autocorrect","off"),o.textArea.setAttribute("autocapitalize","off"),o.textArea.setAttribute("autocomplete","off"),o.textArea.setAttribute("spellcheck","false"),o.textArea.setAttribute("aria-label",r.viewInfo.ariaLabel),o.textArea.setAttribute("role","textbox"),o.textArea.setAttribute("aria-multiline","true"),o.textArea.setAttribute("aria-haspopup","false"),o.textArea.setAttribute("aria-autocomplete","both"),o.textAreaCover=Ar(document.createElement("div")),o.textAreaCover.setPosition("absolute");var a={getLineCount:function(){return o._context.model.getLineCount()},getLineMaxColumn:function(e){return o._context.model.getLineMaxColumn(e)},getValueInRange:function(e,t){return o._context.model.getValueInRange(e,t)}},u={getPlainTextToCopy:function(){var e=o._context.model.getPlainTextToCopy(o._selections,o._emptySelectionClipboard,B.uF),t=o._context.model.getEOL(),n=o._emptySelectionClipboard&&1===o._selections.length&&o._selections[0].isEmpty(),i=Array.isArray(e)?e:null,r=Array.isArray(e)?e.join(t):e,s=null;return(n||i)&&(s={lastCopiedValue:Tt?r.replace(/\r\n/g,"\n"):r,isFromEmptySelection:o._emptySelectionClipboard&&1===o._selections.length&&o._selections[0].isEmpty(),multicursorText:i}),$a.INSTANCE.set(s),r},getHTMLToCopy:function(){return o._context.model.getHTMLToCopy(o._selections,o._emptySelectionClipboard)},getScreenReaderContent:function(e){if(Ot)return Rr.EMPTY;if(1===o._accessibilitySupport){if(B.zx){var t=o._selections[0];if(t.isEmpty()){var n=t.getStartPosition(),i=o._getWordBeforePosition(n);if(0===i.length&&(i=o._getCharacterBeforePosition(n)),i.length>0)return new Rr(i,i.length,i.length,n,n)}}return Rr.EMPTY}return Pr.fromEditorSelection(e,a,o._selections[0],0===o._accessibilitySupport)},deduceModelPosition:function(e,t,n){return o._context.model.deduceModelPositionRelativeToViewPosition(e,t,n)}};return o._textAreaInput=o._register(new Fr(u,o.textArea)),o._register(o._textAreaInput.onKeyDown((function(e){o._viewController.emitKeyDown(e)}))),o._register(o._textAreaInput.onKeyUp((function(e){o._viewController.emitKeyUp(e)}))),o._register(o._textAreaInput.onPaste((function(e){var t=$a.INSTANCE.get(e.text),n=!1,i=null;t&&(n=o._emptySelectionClipboard&&t.isFromEmptySelection,i=t.multicursorText),o._viewController.paste("keyboard",e.text,n,i)}))),o._register(o._textAreaInput.onCut((function(){o._viewController.cut("keyboard")}))),o._register(o._textAreaInput.onType((function(e){e.replaceCharCnt?o._viewController.replacePreviousChar("keyboard",e.text,e.replaceCharCnt):o._viewController.type("keyboard",e.text)}))),o._register(o._textAreaInput.onSelectionChangeRequest((function(e){o._viewController.setSelection("keyboard",e)}))),o._register(o._textAreaInput.onCompositionStart((function(){var e=o._selections[0].startLineNumber,t=o._selections[0].startColumn;o._context.privateViewEventBus.emit(new ho(new s.Q(e,t,e,t),0,!0,1));var n=o._viewHelper.visibleRangeForPositionRelativeToEditor(e,t);n&&(o._visibleTextArea=new Ja(o._context.viewLayout.getVerticalOffsetForLineNumber(e),n.left,Xa?0:1),o._render()),o.textArea.setClassName("inputarea ime-input"),o._viewController.compositionStart("keyboard")}))),o._register(o._textAreaInput.onCompositionUpdate((function(e){o._visibleTextArea=kt?o._visibleTextArea.setWidth(0):o._visibleTextArea.setWidth(function(e,t){var n,i=document.createElement("canvas").getContext("2d");i.font=("normal","normal normal "+(n=t).fontWeight+" "+n.fontSize+"px / "+n.lineHeight+"px "+n.fontFamily);var o=i.measureText(e);return Tt?o.width+2:o.width}(e.data,o._fontInfo)),o._render()}))),o._register(o._textAreaInput.onCompositionEnd((function(){o._visibleTextArea=null,o._render(),o.textArea.setClassName("inputarea"),o._viewController.compositionEnd("keyboard")}))),o._register(o._textAreaInput.onFocus((function(){o._context.privateViewEventBus.emit(new so(!0))}))),o._register(o._textAreaInput.onBlur((function(){o._context.privateViewEventBus.emit(new so(!1))}))),o}return Ka(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this)},t.prototype._getWordBeforePosition=function(e){for(var t=this._context.model.getLineContent(e.lineNumber),n=(0,f.i)(this._context.configuration.editor.wordSeparators),i=e.column,o=0;i>1;){var r=t.charCodeAt(i-2);if(0!==n.get(r)||o>50)return t.substring(i-1,e.column-1);o++,i--}return t.substring(0,e.column-1)},t.prototype._getCharacterBeforePosition=function(e){if(e.column>1){var t=this._context.model.getLineContent(e.lineNumber).charAt(e.column-2);if(!p.isHighSurrogate(t.charCodeAt(0)))return t}return""},t.prototype.onConfigurationChanged=function(e){var t=this._context.configuration.editor;return e.fontInfo&&(this._fontInfo=t.fontInfo),e.viewInfo&&this.textArea.setAttribute("aria-label",t.viewInfo.ariaLabel),e.layoutInfo&&(this._contentLeft=t.layoutInfo.contentLeft,this._contentWidth=t.layoutInfo.contentWidth,this._contentHeight=t.layoutInfo.contentHeight),e.lineHeight&&(this._lineHeight=t.lineHeight),e.accessibilitySupport&&(this._accessibilitySupport=t.accessibilitySupport,this._textAreaInput.writeScreenReaderContent("strategy changed")),e.emptySelectionClipboard&&(this._emptySelectionClipboard=t.emptySelectionClipboard),!0},t.prototype.onCursorStateChanged=function(e){return this._selections=e.selections.slice(0),this._textAreaInput.writeScreenReaderContent("selection changed"),!0},t.prototype.onDecorationsChanged=function(e){return!0},t.prototype.onFlushed=function(e){return!0},t.prototype.onLinesChanged=function(e){return!0},t.prototype.onLinesDeleted=function(e){return!0},t.prototype.onLinesInserted=function(e){return!0},t.prototype.onScrollChanged=function(e){return this._scrollLeft=e.scrollLeft,this._scrollTop=e.scrollTop,!0},t.prototype.onZonesChanged=function(e){return!0},t.prototype.isFocused=function(){return this._textAreaInput.isFocused()},t.prototype.focusTextArea=function(){this._textAreaInput.focusTextArea()},t.prototype.prepareRender=function(e){if(2===this._accessibilitySupport)this._primaryCursorVisibleRange=null;else{var t=new r.y(this._selections[0].positionLineNumber,this._selections[0].positionColumn);this._primaryCursorVisibleRange=e.visibleRangeForPosition(t)}},t.prototype.render=function(e){this._textAreaInput.writeScreenReaderContent("render"),this._render()},t.prototype._render=function(){if(this._visibleTextArea)this._renderInsideEditor(this._visibleTextArea.top-this._scrollTop,this._contentLeft+this._visibleTextArea.left-this._scrollLeft,this._visibleTextArea.width,this._lineHeight,!0);else if(this._primaryCursorVisibleRange){var e=this._contentLeft+this._primaryCursorVisibleRange.left-this._scrollLeft;if(ethis._contentLeft+this._contentWidth)this._renderAtTopLeft();else{var t=this._context.viewLayout.getVerticalOffsetForLineNumber(this._selections[0].positionLineNumber)-this._scrollTop;t<0||t>this._contentHeight?this._renderAtTopLeft():this._renderInsideEditor(t,e,Xa?0:1,Xa?0:1,!1)}}else this._renderAtTopLeft()},t.prototype._renderInsideEditor=function(e,t,n,i,o){var r=this.textArea,s=this.textAreaCover;o?Ji.applyFontInfo(r,this._fontInfo):(r.setFontSize(1),r.setLineHeight(this._fontInfo.lineHeight)),r.setTop(e),r.setLeft(t),r.setWidth(n),r.setHeight(i),s.setTop(0),s.setLeft(0),s.setWidth(0),s.setHeight(0)},t.prototype._renderAtTopLeft=function(){var e=this.textArea,t=this.textAreaCover;if(Ji.applyFontInfo(e,this._fontInfo),e.setTop(0),e.setLeft(0),t.setTop(0),t.setLeft(0),Xa)return e.setWidth(0),e.setHeight(0),t.setWidth(0),void t.setHeight(0);e.setWidth(1),e.setHeight(1),t.setWidth(1),t.setHeight(1),this._context.configuration.editor.viewInfo.glyphMargin?t.setClassName("monaco-editor-background textAreaCover "+Gr.OUTER_CLASS_NAME):0!==this._context.configuration.editor.viewInfo.renderLineNumbers?t.setClassName("monaco-editor-background textAreaCover "+qa.CLASS_NAME):t.setClassName("monaco-editor-background textAreaCover")},t}(Ur),tu=n(7339);function nu(e,t,n){var i=null,o=null;if("function"==typeof n.value?(i="value",0!==(o=n.value).length&&console.warn("Memoize should only be used in functions with zero parameters")):"function"==typeof n.get&&(i="get",o=n.get),!o)throw new Error("not supported");var r="$memoize$"+t;n[i]=function(){for(var e=[],t=0;t0||window.navigator.msMaxTouchPoints>0},e.prototype.dispose=function(){this.handle&&(this.handle.dispose(),(0,I.AS)(this.toDispose),this.handle=null)},e.prototype.onTouchStart=function(e){var t=Date.now();this.handle&&(this.handle.dispose(),this.handle=null);for(var n=0,i=e.targetTouches.length;n=e.HOLD_DELAY&&Math.abs(u.initialPageX-tu.RT(u.rollingPageX))<30&&Math.abs(u.initialPageY-tu.RT(u.rollingPageY))<30){var c;(c=r.newGestureEvent(iu.Contextmenu,u.initialTarget)).pageX=tu.RT(u.rollingPageX),c.pageY=tu.RT(u.rollingPageY),r.dispatchEvent(c)}else if(1===i){var h=tu.RT(u.rollingPageX),d=tu.RT(u.rollingPageY),f=tu.RT(u.rollingTimestamps)-u.rollingTimestamps[0],p=h-u.rollingPageX[0],g=d-u.rollingPageY[0],m=r.targets.filter((function(e){return u.initialTarget instanceof Node&&e.contains(u.initialTarget)}));r.inertia(m,n,Math.abs(p)/f,p>0?1:-1,h,Math.abs(g)/f,g>0?1:-1,d)}r.dispatchEvent(r.newGestureEvent(iu.End,u.initialTarget)),delete r.activeTouches[a.identifier]},r=this,s=0,a=t.changedTouches.length;s0&&(p=!1,d=o*i*h),s>0&&(p=!1,f=a*s*h);var g=l.newGestureEvent(iu.Change);g.translationX=d,g.translationY=f,t.forEach((function(e){return e.dispatchEvent(g)})),p||l.inertia(t,c,i,o,r+d,s,a,u+f)}))},e.prototype.onTouchMove=function(e){for(var t=Date.now(),n=0,i=e.changedTouches.length;n3&&(r.rollingPageX.shift(),r.rollingPageY.shift(),r.rollingTimestamps.shift()),r.rollingPageX.push(o.pageX),r.rollingPageY.push(o.pageY),r.rollingTimestamps.push(t)}else console.warn("end of an UNKNOWN touch",o)}this.dispatched&&(e.preventDefault(),e.stopPropagation(),this.dispatched=!1)},e.SCROLL_FRICTION=-.005,e.HOLD_DELAY=700,function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);r>3&&s&&Object.defineProperty(t,n,s)}([nu],e,"isTouchDevice",null),e}();function uu(e){return!(!e||"function"!=typeof e.getEditorType)&&e.getEditorType()===a.ICodeEditor}!function(e){e[e.EXACT=0]="EXACT",e[e.ABOVE=1]="ABOVE",e[e.BELOW=2]="BELOW"}(ou||(ou={})),function(e){e[e.TOP_RIGHT_CORNER=0]="TOP_RIGHT_CORNER",e[e.BOTTOM_RIGHT_CORNER=1]="BOTTOM_RIGHT_CORNER",e[e.TOP_CENTER=2]="TOP_CENTER"}(ru||(ru={})),function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.TEXTAREA=1]="TEXTAREA",e[e.GUTTER_GLYPH_MARGIN=2]="GUTTER_GLYPH_MARGIN",e[e.GUTTER_LINE_NUMBERS=3]="GUTTER_LINE_NUMBERS",e[e.GUTTER_LINE_DECORATIONS=4]="GUTTER_LINE_DECORATIONS",e[e.GUTTER_VIEW_ZONE=5]="GUTTER_VIEW_ZONE",e[e.CONTENT_TEXT=6]="CONTENT_TEXT",e[e.CONTENT_EMPTY=7]="CONTENT_EMPTY",e[e.CONTENT_VIEW_ZONE=8]="CONTENT_VIEW_ZONE",e[e.CONTENT_WIDGET=9]="CONTENT_WIDGET",e[e.OVERVIEW_RULER=10]="OVERVIEW_RULER",e[e.SCROLLBAR=11]="SCROLLBAR",e[e.OVERLAY_WIDGET=12]="OVERLAY_WIDGET",e[e.OUTSIDE_EDITOR=13]="OUTSIDE_EDITOR"}(su||(su={}));var lu=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();function cu(e,t){var n=new Qt(t);return n.preventDefault(),{leftButton:n.leftButton,posx:n.posx,posy:n.posy}}var hu=function(e){function t(){var t=e.call(this)||this;return t.hooks=[],t.mouseMoveEventMerger=null,t.mouseMoveCallback=null,t.onStopCallback=null,t}return lu(t,e),t.prototype.dispose=function(){this.stopMonitoring(!1),e.prototype.dispose.call(this)},t.prototype.stopMonitoring=function(e){if(this.isMonitoring()){this.hooks=(0,I.AS)(this.hooks),this.mouseMoveEventMerger=null,this.mouseMoveCallback=null;var t=this.onStopCallback;this.onStopCallback=null,e&&t()}},t.prototype.isMonitoring=function(){return this.hooks.length>0},t.prototype.startMonitoring=function(e,t,n){var i=this;if(!this.isMonitoring()){this.mouseMoveEventMerger=e,this.mouseMoveCallback=t,this.onStopCallback=n;for(var o=Zt.getSameOriginWindowChain(),r=0;rn||c.isEmpty()&&(0===l.type||3===l.type))){var h=c.startLineNumber===n?c.startColumn:i,d=c.endLineNumber===n?c.endColumn:o;r[s++]=new e(h,d,l.inlineClassName,l.type)}}return r},e.compare=function(e,t){return e.startColumn===t.startColumn?e.endColumn===t.endColumn?e.classNamet.className?1:0:e.endColumn-t.endColumn:e.startColumn-t.startColumn},e}(),Mu=function(e,t,n){this.startOffset=e,this.endOffset=t,this.className=n},Cu=function(){function e(){this.stopOffsets=[],this.classNames=[],this.count=0}return e.prototype.consumeLowerThan=function(e,t,n){for(;this.count>0&&this.stopOffsets[0]0&&t=e){this.stopOffsets.splice(n,0,e),this.classNames.splice(n,0,t);break}this.count++},e}(),Su=function(){function e(){}return e.normalize=function(e,t){if(0===t.length)return[];for(var n=[],i=new Cu,o=0,r=0,s=t.length;r1){var h=e.charCodeAt(u-2);p.isHighSurrogate(h)&&u--}l>1&&(h=e.charCodeAt(l-2),p.isHighSurrogate(h)&&l--);var d=u-1,f=l-2;o=i.consumeLowerThan(d,o,n),0===i.count&&(o=d),i.insert(f,c)}return i.consumeLowerThan(1073741824,o,n),n},e}();vu="undefined"!=typeof TextDecoder?function(e){return new Lu(e)}:function(e){return new Iu};var Lu=function(){function e(e){this._decoder=new TextDecoder("UTF-16LE"),this._capacity=0|e,this._buffer=new Uint16Array(this._capacity),this._completedStrings=null,this._bufferLength=0}return e.prototype.reset=function(){this._completedStrings=null,this._bufferLength=0},e.prototype.build=function(){return null!==this._completedStrings?(this._flushBuffer(),this._completedStrings.join("")):this._buildBuffer()},e.prototype._buildBuffer=function(){if(0===this._bufferLength)return"";var e=new Uint16Array(this._buffer.buffer,0,this._bufferLength);return this._decoder.decode(e)},e.prototype._flushBuffer=function(){var e=this._buildBuffer();this._bufferLength=0,null===this._completedStrings?this._completedStrings=[e]:this._completedStrings[this._completedStrings.length]=e},e.prototype.write1=function(e){var t=this._capacity-this._bufferLength;t<=1&&(0===t||p.isHighSurrogate(e))&&this._flushBuffer(),this._buffer[this._bufferLength++]=e},e.prototype.appendASCII=function(e){this._bufferLength===this._capacity&&this._flushBuffer(),this._buffer[this._bufferLength++]=e},e.prototype.appendASCIIString=function(e){var t=e.length;if(this._bufferLength+t>=this._capacity)return this._flushBuffer(),void(this._completedStrings[this._completedStrings.length]=e);for(var n=0;n>>16},e.getCharIndex=function(e){return(65535&e)>>>0},e.prototype.setPartData=function(e,t,n,i){var o=(t<<16|n)>>>0;this._data[e]=o,this._absoluteOffsets[e]=i+n},e.prototype.getAbsoluteOffsets=function(){return this._absoluteOffsets},e.prototype.charOffsetToPartData=function(e){return 0===this.length?0:e<0?this._data[0]:e>=this.length?this._data[this.length-1]:this._data[e]},e.prototype.partDataToCharOffset=function(t,n,i){if(0===this.length)return 0;for(var o=(t<<16|i)>>>0,r=0,s=this.length-1;r+1>>1,u=this._data[a];if(u===o)return a;u>o?s=a:r=a}if(r===s)return r;var l=this._data[r],c=this._data[s];if(l===o)return r;if(c===o)return s;var h=e.getPartIndex(l);return i-e.getCharIndex(l)<=(h!==e.getPartIndex(c)?n:e.getCharIndex(c))-i?r:s},e}(),ku=function(e,t,n){this.characterMapping=e,this.containsRTL=t,this.containsForeignElements=n};function Tu(e,t){if(0===e.lineContent.length){var n=0,i=" ";if(e.lineDecorations.length>0){for(var o=[],r=0,s=e.lineDecorations.length;r')}return t.appendASCIIString(i),new ku(new Du(0,0),!1,n)}return function(e,t){var n=e.fontIsMonospace,i=e.containsForeignElements,o=e.lineContent,r=e.len,s=e.isOverflowing,a=e.parts,u=e.tabSize,l=e.containsRTL,c=e.spaceWidth,h=e.renderWhitespace,d=e.renderControlCharacters,f=new Du(r+1,a.length),g=0,m=0,v=0,y=0,b=0;t.appendASCIIString("");for(var _=0,w=a.length;_=0;if(v=0,t.appendASCIIString('0&&(k>1?t.write1(8594):t.write1(65515),k--);k>0;)t.write1(160),k--;else t.write1(183);v++}y=I}else{for(I=0,l&&t.appendASCIIString(' dir="ltr"'),t.appendASCII(62);g0;)t.write1(160),I++,k--;break;case 32:t.write1(160),I++;break;case 60:t.appendASCIIString("<"),I++;break;case 62:t.appendASCIIString(">"),I++;break;case 38:t.appendASCIIString("&"),I++;break;case 0:t.appendASCIIString("�"),I++;break;case 65279:case 8232:t.write1(65533),I++;break;default:p.isFullWidthCharacter(D)&&m++,d&&D<32?(t.write1(9216+D),I++):(t.write1(D),I++)}v++}y=I}t.appendASCIIString("")}return f.setPartData(r,a.length-1,v,b),s&&t.appendASCIIString(""),t.appendASCIIString(""),new ku(f,l,i)}(function(e){var t,n,i=e.useMonospaceOptimizations,o=e.lineContent;-1!==e.stopRenderingLineAfter&&e.stopRenderingLineAfter0&&(i[o++]=new Nu(t,""));for(var r=0,s=e.getCount();r=n){i[o++]=new Nu(n,u);break}i[o++]=new Nu(a,u)}}return i}(e.lineTokens,e.fauxIndentLength,n);2!==e.renderWhitespace&&1!==e.renderWhitespace||(r=function(e,t,n,i,o,r,s,a){var u,l=[],c=0,h=0,d=i[h].type,f=i[h].endIndex,g=p.firstNonWhitespaceIndex(e);-1===g?(g=t,u=t):u=p.lastNonWhitespaceIndex(e);for(var m=0,v=0;vu)_=!0;else if(9===b)_=!0;else if(32===b)if(a)if(y)_=!0;else{var w=v+1=r)&&(l[c++]=new Nu(v,"vs-whitespace"),m%=r):(v===f||_&&v>o)&&(l[c++]=new Nu(v,d),m%=r),9===b?m=r:p.isFullWidthCharacter(b)?m+=2:m++,y=_,v===f&&(d=i[++h].type,f=i[h].endIndex)}var M=!1;if(y)if(n&&a){var C=t>0?e.charCodeAt(t-1):0,S=t>1?e.charCodeAt(t-2):0;32===C&&32!==S&&9!==S||(M=!0)}else M=!0;return l[c++]=new Nu(t,M?"vs-whitespace":d),l}(o,n,e.continuesWithWrappedLine,r,e.fauxIndentLength,e.tabSize,i,1===e.renderWhitespace));var s=0;if(e.lineDecorations.length>0){for(var a=0,u=e.lineDecorations.length;al&&(l=g.startOffset,a[u++]=new Nu(l,p)),!(g.endOffset+1<=f)){l=f,a[u++]=new Nu(l,p+" "+g.className);break}l=g.endOffset+1,a[u++]=new Nu(l,p+" "+g.className),s++}f>l&&(l=f,a[u++]=new Nu(l,p))}var m=n[n.length-1].endIndex;if(s50){for(var c=a.type,h=Math.ceil(l/50),d=1;d=u?o=Math.max(o,u+l-i):(t[n++]=new zu(i,o),i=u,o=l)}return t[n++]=new zu(i,o),t},e._createHorizontalRangesFromClientRects=function(e,t){if(!e||0===e.length)return null;for(var n=[],i=0,o=e.length;ia)return null;(t=Math.min(a,Math.max(0,t)))!==(i=Math.min(a,Math.max(0,i)))&&i>0&&0===o&&(i--,o=Number.MAX_VALUE);var u=e.children[t].firstChild,l=e.children[i].firstChild;if(u&&l||(!u&&0===n&&t>0&&(u=e.children[t-1].firstChild,n=1073741824),!l&&0===o&&i>0&&(l=e.children[i-1].firstChild,o=1073741824)),!u||!l)return null;n=Math.min(u.textContent.length,Math.max(0,n)),o=Math.min(l.textContent.length,Math.max(0,o));var c=this._readClientRects(u,n,l,o,s);return this._createHorizontalRangesFromClientRects(c,r)},e}(),Bu=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Hu=!!B.ib||!(B.j9||Tt||jt),Vu=kt,Uu=function(){function e(e,t){this._domNode=e,this._clientRectDeltaLeft=0,this._clientRectDeltaLeftRead=!1,this.endNode=t}return Object.defineProperty(e.prototype,"clientRectDeltaLeft",{get:function(){return this._clientRectDeltaLeftRead||(this._clientRectDeltaLeftRead=!0,this._clientRectDeltaLeft=this._domNode.getBoundingClientRect().left),this._clientRectDeltaLeft},enumerable:!0,configurable:!0}),e}(),Yu=function(){function e(e,t){this.themeType=t,this.renderWhitespace=e.editor.viewInfo.renderWhitespace,this.renderControlCharacters=e.editor.viewInfo.renderControlCharacters,this.spaceWidth=e.editor.fontInfo.spaceWidth,this.useMonospaceOptimizations=e.editor.fontInfo.isMonospace&&!e.editor.viewInfo.disableMonospaceOptimizations,this.lineHeight=e.editor.lineHeight,this.stopRenderingLineAfter=e.editor.viewInfo.stopRenderingLineAfter,this.fontLigatures=e.editor.viewInfo.fontLigatures}return e.prototype.equals=function(e){return this.themeType===e.themeType&&this.renderWhitespace===e.renderWhitespace&&this.renderControlCharacters===e.renderControlCharacters&&this.spaceWidth===e.spaceWidth&&this.useMonospaceOptimizations===e.useMonospaceOptimizations&&this.lineHeight===e.lineHeight&&this.stopRenderingLineAfter===e.stopRenderingLineAfter&&this.fontLigatures===e.fontLigatures},e}(),Zu=function(){function e(e){this._options=e,this._isMaybeInvalid=!0,this._renderedViewLine=null}return e.prototype.getDomNode=function(){return this._renderedViewLine&&this._renderedViewLine.domNode?this._renderedViewLine.domNode.domNode:null},e.prototype.setDomNode=function(e){if(!this._renderedViewLine)throw new Error("I have no rendered view line to set the dom node to...");this._renderedViewLine.domNode=Ar(e)},e.prototype.onContentChanged=function(){this._isMaybeInvalid=!0},e.prototype.onTokensChanged=function(){this._isMaybeInvalid=!0},e.prototype.onDecorationsChanged=function(){this._isMaybeInvalid=!0},e.prototype.onOptionsChanged=function(e){this._isMaybeInvalid=!0,this._options=e},e.prototype.onSelectionChanged=function(){return!(!Vu&&this._options.themeType!==Nr||(this._isMaybeInvalid=!0,0))},e.prototype.renderLine=function(t,n,i,o){if(!1===this._isMaybeInvalid)return!1;this._isMaybeInvalid=!1;var r=i.getViewLineRenderingData(t),s=this._options,a=wu.filter(r.inlineDecorations,t,r.minColumn,r.maxColumn);if(Vu||s.themeType===Nr)for(var u=i.selections,l=0,c=u.length;lt)){var d=h.startLineNumber===t?h.startColumn:r.minColumn,f=h.endLineNumber===t?h.endColumn:r.maxColumn;d');var g=Tu(p,o);o.appendASCIIString("");var m=null;return Hu&&r.isBasicASCII&&s.useMonospaceOptimizations&&0===g.containsForeignElements&&r.content.length<300&&p.lineTokens.getCount()<100&&(m=new Gu(this._renderedViewLine?this._renderedViewLine.domNode:null,p,g.characterMapping)),m||(m=Ku(this._renderedViewLine?this._renderedViewLine.domNode:null,p,g.characterMapping,g.containsRTL,g.containsForeignElements)),this._renderedViewLine=m,!0},e.prototype.layoutLine=function(e,t){this._renderedViewLine&&this._renderedViewLine.domNode&&(this._renderedViewLine.domNode.setTop(t),this._renderedViewLine.domNode.setHeight(this._options.lineHeight))},e.prototype.getWidth=function(){return this._renderedViewLine?this._renderedViewLine.getWidth():0},e.prototype.getWidthIsFast=function(){return!this._renderedViewLine||this._renderedViewLine.getWidthIsFast()},e.prototype.getVisibleRangesForRange=function(e,t,n){e|=0,t|=0,e=Math.min(this._renderedViewLine.input.lineContent.length+1,Math.max(1,e)),t=Math.min(this._renderedViewLine.input.lineContent.length+1,Math.max(1,t));var i=0|this._renderedViewLine.input.stopRenderingLineAfter;return-1!==i&&e>i&&t>i?null:(-1!==i&&e>i&&(e=i),-1!==i&&t>i&&(t=i),this._renderedViewLine.getVisibleRangesForRange(e,t,n))},e.prototype.getColumnOfNodeOffset=function(e,t,n){return this._renderedViewLine.getColumnOfNodeOffset(e,t,n)},e.CLASS_NAME="view-line",e}(),Gu=function(){function e(e,t,n){this.domNode=e,this.input=t,this._characterMapping=n,this._charWidth=t.spaceWidth}return e.prototype.getWidth=function(){return this._getCharPosition(this._characterMapping.length)},e.prototype.getWidthIsFast=function(){return!0},e.prototype.getVisibleRangesForRange=function(e,t,n){var i=this._getCharPosition(e),o=this._getCharPosition(t);return[new zu(i,o-i)]},e.prototype._getCharPosition=function(e){var t=this._characterMapping.getAbsoluteOffsets();return 0===t.length?0:Math.round(this._charWidth*t[e-1])},e.prototype.getColumnOfNodeOffset=function(e,t,n){for(var i=t.textContent.length,o=-1;t;)t=t.previousSibling,o++;return this._characterMapping.partDataToCharOffset(o,i,n)+1},e}(),Qu=function(){function e(e,t,n,i,o){if(this.domNode=e,this.input=t,this._characterMapping=n,this._isWhitespaceOnly=/^\s*$/.test(t.lineContent),this._containsForeignElements=o,this._cachedWidth=-1,this._pixelOffsetCache=null,!i||0===this._characterMapping.length){this._pixelOffsetCache=new Int32Array(Math.max(2,this._characterMapping.length+1));for(var r=0,s=this._characterMapping.length;r<=s;r++)this._pixelOffsetCache[r]=-1}}return e.prototype._getReadingTarget=function(){return this.domNode.domNode.firstChild},e.prototype.getWidth=function(){return-1===this._cachedWidth&&(this._cachedWidth=this._getReadingTarget().offsetWidth),this._cachedWidth},e.prototype.getWidthIsFast=function(){return-1!==this._cachedWidth},e.prototype.getVisibleRangesForRange=function(e,t,n){if(null!==this._pixelOffsetCache){var i=this._readPixelOffset(e,n);if(-1===i)return null;var o=this._readPixelOffset(t,n);return-1===o?null:[new zu(i,o-i)]}return this._readVisibleRangesForRange(e,t,n)},e.prototype._readVisibleRangesForRange=function(e,t,n){if(e===t){var i=this._readPixelOffset(e,n);return-1===i?null:[new zu(i,0)]}return this._readRawVisibleRangesForRange(e,t,n)},e.prototype._readPixelOffset=function(e,t){if(0===this._characterMapping.length){if(0===this._containsForeignElements)return 0;if(2===this._containsForeignElements)return 0;if(1===this._containsForeignElements)return this.getWidth()}if(null!==this._pixelOffsetCache){var n=this._pixelOffsetCache[e];if(-1!==n)return n;var i=this._actualReadPixelOffset(e,t);return this._pixelOffsetCache[e]=i,i}return this._actualReadPixelOffset(e,t)},e.prototype._actualReadPixelOffset=function(e,t){if(0===this._characterMapping.length){var n=Fu.readHorizontalRanges(this._getReadingTarget(),0,0,0,0,t.clientRectDeltaLeft,t.endNode);return n&&0!==n.length?n[0].left:-1}if(e===this._characterMapping.length&&this._isWhitespaceOnly&&0===this._containsForeignElements)return this.getWidth();var i=this._characterMapping.charOffsetToPartData(e-1),o=Du.getPartIndex(i),r=Du.getCharIndex(i),s=Fu.readHorizontalRanges(this._getReadingTarget(),o,r,o,r,t.clientRectDeltaLeft,t.endNode);return s&&0!==s.length?s[0].left:-1},e.prototype._readRawVisibleRangesForRange=function(e,t,n){if(1===e&&t===this._characterMapping.length)return[new zu(0,this.getWidth())];var i=this._characterMapping.charOffsetToPartData(e-1),o=Du.getPartIndex(i),r=Du.getCharIndex(i),s=this._characterMapping.charOffsetToPartData(t-1),a=Du.getPartIndex(s),u=Du.getCharIndex(s);return Fu.readHorizontalRanges(this._getReadingTarget(),o,r,a,u,n.clientRectDeltaLeft,n.endNode)},e.prototype.getColumnOfNodeOffset=function(e,t,n){for(var i=t.textContent.length,o=-1;t;)t=t.previousSibling,o++;return this._characterMapping.partDataToCharOffset(o,i,n)+1},e}(),qu=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Bu(t,e),t.prototype._readVisibleRangesForRange=function(t,n,i){var o=e.prototype._readVisibleRangesForRange.call(this,t,n,i);if(!o||0===o.length||t===n||1===t&&n===this._characterMapping.length)return o;var r=this._readPixelOffset(n-1,i),s=this._readPixelOffset(n,i);if(-1!==r&&-1!==s){var a=r<=s,u=o[o.length-1];a&&u.left=4&&3===e[0]&&7===e[3]},e.isStrictChildOfViewLines=function(e){return e.length>4&&3===e[0]&&7===e[3]},e.isChildOfScrollableElement=function(e){return e.length>=2&&3===e[0]&&5===e[1]},e.isChildOfMinimap=function(e){return e.length>=2&&3===e[0]&&8===e[1]},e.isChildOfContentWidgets=function(e){return e.length>=4&&3===e[0]&&1===e[3]},e.isChildOfOverflowingContentWidgets=function(e){return e.length>=1&&2===e[0]},e.isChildOfOverlayWidgets=function(e){return e.length>=2&&3===e[0]&&4===e[1]},e}(),el=function(){function e(e,t,n){this.model=e.model,this.layoutInfo=e.configuration.editor.layoutInfo,this.viewDomNode=t.viewDomNode,this.lineHeight=e.configuration.editor.lineHeight,this.typicalHalfwidthCharacterWidth=e.configuration.editor.fontInfo.typicalHalfwidthCharacterWidth,this.lastViewCursorsRenderData=n,this._context=e,this._viewHelper=t}return e.prototype.getZoneAtCoord=function(t){return e.getZoneAtCoord(this._context,t)},e.getZoneAtCoord=function(e,t){var n=e.viewLayout.getWhitespaceAtVerticalOffset(t);if(n){var i,o=n.verticalOffset+n.height/2,s=e.model.getLineCount(),a=null,u=null;return n.afterLineNumber!==s&&(u=new r.y(n.afterLineNumber+1,1)),n.afterLineNumber>0&&(a=new r.y(n.afterLineNumber,e.model.getLineMaxColumn(n.afterLineNumber))),i=null===u?a:null===a?u:t=e.layoutInfo.glyphMarginLeft,this.isInContentArea=!this.isInMarginArea,this.mouseColumn=Math.max(0,ol._getMouseColumn(this.mouseContentHorizontalOffset,e.typicalHalfwidthCharacterWidth))})),nl={isAfterLines:!0};function il(e){return{isAfterLines:!1,horizontalDistanceToText:e}}var ol=function(){function e(e,t){this._context=e,this._viewHelper=t}return e.prototype.mouseTargetIsWidget=function(e){var t=e.target,n=Yr.collect(t,this._viewHelper.viewDomNode);return!(!$u.isChildOfContentWidgets(n)&&!$u.isChildOfOverflowingContentWidgets(n)&&!$u.isChildOfOverlayWidgets(n))},e.prototype.createMouseTarget=function(t,n,i,o){var r=new el(this._context,this._viewHelper,t),s=new tl(r,n,i,o);try{return e._createMouseTarget(r,s,!1)}catch(e){return s.fulfill(su.UNKNOWN)}},e._createMouseTarget=function(t,n,i){if(null===n.target){if(i)return n.fulfill(su.UNKNOWN);var o=e._doHitTest(t,n);return o.position?e.createMouseTargetFromHitTestPosition(t,n,o.position.lineNumber,o.position.column):this._createMouseTarget(t,n.withTarget(o.hitTarget),!0)}var r=null;return(r=(r=(r=(r=(r=(r=(r=(r=(r=(r=r||e._hitTestContentWidget(t,n))||e._hitTestOverlayWidget(t,n))||e._hitTestMinimap(t,n))||e._hitTestScrollbarSlider(t,n))||e._hitTestViewZone(t,n))||e._hitTestMargin(t,n))||e._hitTestViewCursor(t,n))||e._hitTestTextArea(t,n))||e._hitTestViewLines(t,n,i))||e._hitTestScrollbar(t,n))||n.fulfill(su.UNKNOWN)},e._hitTestContentWidget=function(e,t){if($u.isChildOfContentWidgets(t.targetPath)||$u.isChildOfOverflowingContentWidgets(t.targetPath)){var n=e.findAttribute(t.target,"widgetId");return n?t.fulfill(su.CONTENT_WIDGET,null,null,n):t.fulfill(su.UNKNOWN)}return null},e._hitTestOverlayWidget=function(e,t){if($u.isChildOfOverlayWidgets(t.targetPath)){var n=e.findAttribute(t.target,"widgetId");return n?t.fulfill(su.OVERLAY_WIDGET,null,null,n):t.fulfill(su.UNKNOWN)}return null},e._hitTestViewCursor=function(e,t){if(t.target)for(var n=0,i=(r=e.lastViewCursorsRenderData).length;no.contentLeft+o.width)){var u=e.getVerticalOffsetForLineNumber(o.position.lineNumber);if(u<=a&&a<=u+o.height)return t.fulfill(su.CONTENT_TEXT,o.position)}}return null},e._hitTestViewZone=function(e,t){var n=e.getZoneAtCoord(t.mouseVerticalOffset);if(n){var i=t.isInContentArea?su.CONTENT_VIEW_ZONE:su.GUTTER_VIEW_ZONE;return t.fulfill(i,n.position,null,n)}return null},e._hitTestTextArea=function(e,t){return $u.isTextArea(t.targetPath)?t.fulfill(su.TEXTAREA):null},e._hitTestMargin=function(e,t){if(t.isInMarginArea){var n=e.getFullLineRangeAtCoord(t.mouseVerticalOffset),i=n.range.getStartPosition(),o=Math.abs(t.pos.x-t.editorPos.x),r={isAfterLines:n.isAfterLines,glyphMarginLeft:e.layoutInfo.glyphMarginLeft,glyphMarginWidth:e.layoutInfo.glyphMarginWidth,lineNumbersWidth:e.layoutInfo.lineNumbersWidth,offsetX:o};return(o-=e.layoutInfo.glyphMarginLeft)<=e.layoutInfo.glyphMarginWidth?t.fulfill(su.GUTTER_GLYPH_MARGIN,i,n.range,r):(o-=e.layoutInfo.glyphMarginWidth)<=e.layoutInfo.lineNumbersWidth?t.fulfill(su.GUTTER_LINE_NUMBERS,i,n.range,r):(o-=e.layoutInfo.lineNumbersWidth,t.fulfill(su.GUTTER_LINE_DECORATIONS,i,n.range,r))}return null},e._hitTestViewLines=function(t,n,i){if(!$u.isChildOfViewLines(n.targetPath))return null;if(t.isAfterLines(n.mouseVerticalOffset)){var o=t.model.getLineCount(),s=t.model.getLineMaxColumn(o);return n.fulfill(su.CONTENT_EMPTY,new r.y(o,s),void 0,nl)}if(i){if($u.isStrictChildOfViewLines(n.targetPath)){var a=t.getLineNumberAtVerticalOffset(n.mouseVerticalOffset);if(0===t.model.getLineLength(a)){var u=t.getLineWidth(a),l=il(n.mouseContentHorizontalOffset-u);return n.fulfill(su.CONTENT_EMPTY,new r.y(a,1),void 0,l)}}return n.fulfill(su.UNKNOWN)}var c=e._doHitTest(t,n);return c.position?e.createMouseTargetFromHitTestPosition(t,n,c.position.lineNumber,c.position.column):this._createMouseTarget(t,n.withTarget(c.hitTarget),!0)},e._hitTestMinimap=function(e,t){if($u.isChildOfMinimap(t.targetPath)){var n=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),i=e.model.getLineMaxColumn(n);return t.fulfill(su.SCROLLBAR,new r.y(n,i))}return null},e._hitTestScrollbarSlider=function(e,t){if($u.isChildOfScrollableElement(t.targetPath)&&t.target&&1===t.target.nodeType){var n=t.target.className;if(n&&/\b(slider|scrollbar)\b/.test(n)){var i=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),o=e.model.getLineMaxColumn(i);return t.fulfill(su.SCROLLBAR,new r.y(i,o))}}return null},e._hitTestScrollbar=function(e,t){if($u.isChildOfScrollableElement(t.targetPath)){var n=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),i=e.model.getLineMaxColumn(n);return t.fulfill(su.SCROLLBAR,new r.y(n,i))}return null},e.prototype.getMouseColumn=function(t,n){var i=this._context.configuration.editor.layoutInfo,o=this._context.viewLayout.getCurrentScrollLeft()+n.x-t.x-i.contentLeft;return e._getMouseColumn(o,this._context.configuration.editor.fontInfo.typicalHalfwidthCharacterWidth)},e._getMouseColumn=function(e,t){return e<0?1:Math.round(e/t)+1},e.createMouseTargetFromHitTestPosition=function(e,t,n,i){var o=new r.y(n,i),a=e.getLineWidth(n);if(t.mouseContentHorizontalOffset>a){if(Dt&&1===o.column){var u=il(t.mouseContentHorizontalOffset-a);return t.fulfill(su.CONTENT_EMPTY,new r.y(n,e.model.getLineMaxColumn(n)),void 0,u)}var l=il(t.mouseContentHorizontalOffset-a);return t.fulfill(su.CONTENT_EMPTY,o,void 0,l)}var c=e.visibleRangeForPosition2(n,i);if(!c)return t.fulfill(su.UNKNOWN,o);var h=c.left;if(t.mouseContentHorizontalOffset===h)return t.fulfill(su.CONTENT_TEXT,o);var d=[];if(d.push({offset:c.left,column:i}),i>1){var f=e.visibleRangeForPosition2(n,i-1);f&&d.push({offset:f.left,column:i-1})}if(i=t.editorPos.y+e.layoutInfo.height&&(o=t.editorPos.y+e.layoutInfo.height-1);var r=new fu(t.pos.x,o),s=this._actualDoHitTestWithCaretRangeFromPoint(e,r.toClientCoordinates());return s.position?s:this._actualDoHitTestWithCaretRangeFromPoint(e,t.pos.toClientCoordinates())},e._actualDoHitTestWithCaretRangeFromPoint=function(e,t){var n=document.caretRangeFromPoint(t.clientX,t.clientY);if(!n||!n.startContainer)return{position:null,hitTarget:null};var i,o=n.startContainer;if(o.nodeType===o.TEXT_NODE){var r=(a=(s=o.parentNode)?s.parentNode:null)?a.parentNode:null;if((r&&r.nodeType===r.ELEMENT_NODE?r.className:null)===Zu.CLASS_NAME)return{position:e.getPositionFromDOMInfo(s,n.startOffset),hitTarget:null};i=o.parentNode}else if(o.nodeType===o.ELEMENT_NODE){var s,a;if(((a=(s=o.parentNode)?s.parentNode:null)&&a.nodeType===a.ELEMENT_NODE?a.className:null)===Zu.CLASS_NAME)return{position:e.getPositionFromDOMInfo(o,o.textContent.length),hitTarget:null};i=o}return{position:null,hitTarget:i}},e._doHitTestWithCaretPositionFromPoint=function(e,t){var n=document.caretPositionFromPoint(t.clientX,t.clientY);if(n.offsetNode.nodeType===n.offsetNode.TEXT_NODE){var i=n.offsetNode.parentNode,o=i?i.parentNode:null,r=o?o.parentNode:null;return(r&&r.nodeType===r.ELEMENT_NODE?r.className:null)===Zu.CLASS_NAME?{position:e.getPositionFromDOMInfo(n.offsetNode.parentNode,n.offset),hitTarget:null}:{position:null,hitTarget:n.offsetNode.parentNode}}return{position:null,hitTarget:n.offsetNode}},e._doHitTestWithMoveToPoint=function(e,t){var n=null,i=null,o=document.body.createTextRange();try{o.moveToPoint(t.clientX,t.clientY)}catch(e){return{position:null,hitTarget:null}}o.collapse(!0);var r=o?o.parentElement():null,s=r?r.parentNode:null,a=s?s.parentNode:null;if((a&&a.nodeType===a.ELEMENT_NODE?a.className:"")===Zu.CLASS_NAME){var u=o.duplicate();u.moveToElementText(r),u.setEndPoint("EndToStart",o),n=e.getPositionFromDOMInfo(r,u.text.length),u.moveToElementText(e.viewDomNode)}else i=r;return o.moveToElementText(e.viewDomNode),{position:n,hitTarget:i}},e._doHitTest=function(e,t){return document.caretRangeFromPoint?this._doHitTestWithCaretRangeFromPoint(e,t):document.caretPositionFromPoint?this._doHitTestWithCaretPositionFromPoint(e,t.pos.toClientCoordinates()):document.body.createTextRange?this._doHitTestWithMoveToPoint(e,t.pos.toClientCoordinates()):{position:null,hitTarget:null}},e}(),rl=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();function sl(e){return function(t,n){var i=!1;return e&&(i=e.mouseTargetIsWidget(n)),i||n.preventDefault(),n}}var al=function(e){function t(n,i,o){var r=e.call(this)||this;r._isFocused=!1,r._context=n,r.viewController=i,r.viewHelper=o,r.mouseTargetFactory=new ol(r._context,o),r._mouseDownOperation=r._register(new ul(r._context,r.viewController,r.viewHelper,(function(e,t){return r._createMouseTarget(e,t)}),(function(e){return r._getMouseColumn(e)}))),r._asyncFocus=r._register(new Ct((function(){return r.viewHelper.focusTextArea()}),0)),r.lastMouseLeaveTime=-1;var s=new bu(r.viewHelper.viewDomNode);r._register(s.onContextMenu(r.viewHelper.viewDomNode,(function(e){return r._onContextMenu(e,!0)}))),r._register(s.onMouseMoveThrottled(r.viewHelper.viewDomNode,(function(e){return r._onMouseMove(e)}),sl(r.mouseTargetFactory),t.MOUSE_MOVE_MINIMUM_TIME)),r._register(s.onMouseUp(r.viewHelper.viewDomNode,(function(e){return r._onMouseUp(e)}))),r._register(s.onMouseLeave(r.viewHelper.viewDomNode,(function(e){return r._onMouseLeave(e)}))),r._register(s.onMouseDown(r.viewHelper.viewDomNode,(function(e){return r._onMouseDown(e)})));var a=function(e){if(r._context.configuration.editor.viewInfo.mouseWheelZoom){var t=new Kt(e);if(t.browserEvent.ctrlKey||t.browserEvent.metaKey){var n=Si.getZoomLevel(),i=t.deltaY>0?1:-1;Si.setZoomLevel(n+i),t.preventDefault(),t.stopPropagation()}}};return r._register(cn(r.viewHelper.viewDomNode,"mousewheel",a,!0)),r._register(cn(r.viewHelper.viewDomNode,"DOMMouseScroll",a,!0)),r._context.addEventHandler(r),r}return rl(t,e),t.prototype.dispose=function(){this._context.removeEventHandler(this),e.prototype.dispose.call(this)},t.prototype.onCursorStateChanged=function(e){return this._mouseDownOperation.onCursorStateChanged(e),!1},t.prototype.onFocusChanged=function(e){return this._isFocused=e.isFocused,!1},t.prototype.onScrollChanged=function(e){return this._mouseDownOperation.onScrollChanged(),!1},t.prototype.getTargetAtClientPoint=function(e,t){var n=new pu(e,t).toPageCoordinates(),i=mu(this.viewHelper.viewDomNode);if(n.yi.y+i.height||n.xi.x+i.width)return null;var o=this.viewHelper.getLastViewCursorsRenderData();return this.mouseTargetFactory.createMouseTarget(o,i,n,null)},t.prototype._createMouseTarget=function(e,t){var n=this.viewHelper.getLastViewCursorsRenderData();return this.mouseTargetFactory.createMouseTarget(n,e.editorPos,e.pos,t?e.target:null)},t.prototype._getMouseColumn=function(e){return this.mouseTargetFactory.getMouseColumn(e.editorPos,e.pos)},t.prototype._onContextMenu=function(e,t){this.viewController.emitContextMenu({event:e,target:this._createMouseTarget(e,t)})},t.prototype._onMouseMove=function(e){this._mouseDownOperation.isActive()||e.timestampt.y+t.height){var u,l;if(s=i.getCurrentScrollTop()+(e.posy-t.y),(u=el.getZoneAtCoord(this._context,s))&&(l=this._helpPositionJumpOverViewZone(u)))return new Xu(null,su.OUTSIDE_EDITOR,o,l);var c=i.getLineNumberAtVerticalOffset(s);return new Xu(null,su.OUTSIDE_EDITOR,o,new r.y(c,n.getLineMaxColumn(c)))}var h=i.getLineNumberAtVerticalOffset(i.getCurrentScrollTop()+(e.posy-t.y));return e.posxt.x+t.width?new Xu(null,su.OUTSIDE_EDITOR,o,new r.y(h,n.getLineMaxColumn(h))):null},t.prototype._findMousePosition=function(e,t){var n=this._getPositionOutsideEditor(e);if(n)return n;var i=this._createMouseTarget(e,t);if(!i.position)return null;if(i.type===su.CONTENT_VIEW_ZONE||i.type===su.GUTTER_VIEW_ZONE){var o=this._helpPositionJumpOverViewZone(i.detail);if(o)return new Xu(i.element,i.type,i.mouseColumn,o,null,i.detail)}return i},t.prototype._helpPositionJumpOverViewZone=function(e){var t=new r.y(this._currentSelection.selectionStartLineNumber,this._currentSelection.selectionStartColumn),n=e.positionBefore,i=e.positionAfter;return n&&i?n.isBefore(t)?n:i:null},t.prototype._dispatchMouse=function(e,t){this._viewController.dispatchMouse({position:e.position,mouseColumn:e.mouseColumn,startedOnLineNumbers:this._mouseState.startedOnLineNumbers,inSelectionMode:t,mouseDownCount:this._mouseState.count,altKey:this._mouseState.altKey,ctrlKey:this._mouseState.ctrlKey,metaKey:this._mouseState.metaKey,shiftKey:this._mouseState.shiftKey,leftButton:this._mouseState.leftButton,middleButton:this._mouseState.middleButton})},t}(I.jG),ll=function(){function e(){this._altKey=!1,this._ctrlKey=!1,this._metaKey=!1,this._shiftKey=!1,this._leftButton=!1,this._middleButton=!1,this._startedOnLineNumbers=!1,this._lastMouseDownPosition=null,this._lastMouseDownPositionEqualCount=0,this._lastMouseDownCount=0,this._lastSetMouseDownCountTime=0,this.isDragAndDrop=!1}return Object.defineProperty(e.prototype,"altKey",{get:function(){return this._altKey},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"ctrlKey",{get:function(){return this._ctrlKey},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"metaKey",{get:function(){return this._metaKey},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"shiftKey",{get:function(){return this._shiftKey},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"leftButton",{get:function(){return this._leftButton},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"middleButton",{get:function(){return this._middleButton},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"startedOnLineNumbers",{get:function(){return this._startedOnLineNumbers},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"count",{get:function(){return this._lastMouseDownCount},enumerable:!0,configurable:!0}),e.prototype.setModifiers=function(e){this._altKey=e.altKey,this._ctrlKey=e.ctrlKey,this._metaKey=e.metaKey,this._shiftKey=e.shiftKey},e.prototype.setStartButtons=function(e){this._leftButton=e.leftButton,this._middleButton=e.middleButton},e.prototype.setStartedOnLineNumbers=function(e){this._startedOnLineNumbers=e},e.prototype.trySetCount=function(t,n){var i=(new Date).getTime();i-this._lastSetMouseDownCountTime>e.CLEAR_MOUSE_DOWN_COUNT_TIME&&(t=1),this._lastSetMouseDownCountTime=i,t>this._lastMouseDownCount+1&&(t=this._lastMouseDownCount+1),this._lastMouseDownPosition&&this._lastMouseDownPosition.equals(n)?this._lastMouseDownPositionEqualCount++:this._lastMouseDownPositionEqualCount=1,this._lastMouseDownPosition=n,this._lastMouseDownCount=Math.min(t,this._lastMouseDownPositionEqualCount)},e.CLEAR_MOUSE_DOWN_COUNT_TIME=400,e}(),cl=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();function hl(e,t){var n={translationY:t.translationY,translationX:t.translationX};return e&&(n.translationY+=e.translationY,n.translationX+=e.translationX),n}var dl=function(e){function t(t,n,i){var o=e.call(this,t,n,i)||this;return o.viewHelper.linesContentDomNode.style.msTouchAction="none",o.viewHelper.linesContentDomNode.style.msContentZooming="none",o._installGestureHandlerTimeout=window.setTimeout((function(){if(o._installGestureHandlerTimeout=-1,window.MSGesture){var e=new MSGesture,t=new MSGesture;e.target=o.viewHelper.linesContentDomNode,t.target=o.viewHelper.linesContentDomNode,o.viewHelper.linesContentDomNode.addEventListener("MSPointerDown",(function(n){var i=n.pointerType;i!==(n.MSPOINTER_TYPE_MOUSE||"mouse")?i===(n.MSPOINTER_TYPE_TOUCH||"touch")?(o._lastPointerType="touch",e.addPointer(n.pointerId)):(o._lastPointerType="pen",t.addPointer(n.pointerId)):o._lastPointerType="mouse"})),o._register(Sn(o.viewHelper.linesContentDomNode,"MSGestureChange",(function(e){return o._onGestureChange(e)}),hl)),o._register(cn(o.viewHelper.linesContentDomNode,"MSGestureTap",(function(e){return o._onCaptureGestureTap(e)}),!0))}}),100),o._lastPointerType="mouse",o}return cl(t,e),t.prototype._onMouseDown=function(t){"mouse"===this._lastPointerType&&e.prototype._onMouseDown.call(this,t)},t.prototype._onCaptureGestureTap=function(e){var t=this,n=new yu(e,this.viewHelper.viewDomNode),i=this._createMouseTarget(n,!1);i.position&&this.viewController.moveTo(i.position),n.browserEvent.fromElement?(n.preventDefault(),this.viewHelper.focusTextArea()):setTimeout((function(){t.viewHelper.focusTextArea()}))},t.prototype._onGestureChange=function(e){this._context.viewLayout.deltaScrollNow(-e.translationX,-e.translationY)},t.prototype.dispose=function(){window.clearTimeout(this._installGestureHandlerTimeout),e.prototype.dispose.call(this)},t}(al),fl=function(e){function t(t,n,i){var o=e.call(this,t,n,i)||this;return o.viewHelper.linesContentDomNode.style.touchAction="none",o._installGestureHandlerTimeout=window.setTimeout((function(){if(o._installGestureHandlerTimeout=-1,window.MSGesture){var e=new MSGesture,t=new MSGesture;e.target=o.viewHelper.linesContentDomNode,t.target=o.viewHelper.linesContentDomNode,o.viewHelper.linesContentDomNode.addEventListener("pointerdown",(function(n){var i=n.pointerType;"mouse"!==i?"touch"===i?(o._lastPointerType="touch",e.addPointer(n.pointerId)):(o._lastPointerType="pen",t.addPointer(n.pointerId)):o._lastPointerType="mouse"})),o._register(Sn(o.viewHelper.linesContentDomNode,"MSGestureChange",(function(e){return o._onGestureChange(e)}),hl)),o._register(cn(o.viewHelper.linesContentDomNode,"MSGestureTap",(function(e){return o._onCaptureGestureTap(e)}),!0))}}),100),o._lastPointerType="mouse",o}return cl(t,e),t.prototype._onMouseDown=function(t){"mouse"===this._lastPointerType&&e.prototype._onMouseDown.call(this,t)},t.prototype._onCaptureGestureTap=function(e){var t=this,n=new yu(e,this.viewHelper.viewDomNode),i=this._createMouseTarget(n,!1);i.position&&this.viewController.moveTo(i.position),n.browserEvent.fromElement?(n.preventDefault(),this.viewHelper.focusTextArea()):setTimeout((function(){t.viewHelper.focusTextArea()}))},t.prototype._onGestureChange=function(e){this._context.viewLayout.deltaScrollNow(-e.translationX,-e.translationY)},t.prototype.dispose=function(){window.clearTimeout(this._installGestureHandlerTimeout),e.prototype.dispose.call(this)},t}(al),pl=function(e){function t(t,n,i){var o=e.call(this,t,n,i)||this;return au.addTarget(o.viewHelper.linesContentDomNode),o._register(cn(o.viewHelper.linesContentDomNode,iu.Tap,(function(e){return o.onTap(e)}))),o._register(cn(o.viewHelper.linesContentDomNode,iu.Change,(function(e){return o.onChange(e)}))),o._register(cn(o.viewHelper.linesContentDomNode,iu.Contextmenu,(function(e){return o._onContextMenu(new yu(e,o.viewHelper.viewDomNode),!1)}))),o}return cl(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this)},t.prototype.onTap=function(e){e.preventDefault(),this.viewHelper.focusTextArea();var t=this._createMouseTarget(new yu(e,this.viewHelper.viewDomNode),!1);t.position&&this.viewController.moveTo(t.position)},t.prototype.onChange=function(e){this._context.viewLayout.deltaScrollNow(-e.translationX,-e.translationY)},t}(al),gl=function(){function e(e,t,n){window.navigator.msPointerEnabled?this.handler=new dl(e,t,n):window.TouchEvent?this.handler=new pl(e,t,n):window.navigator.pointerEnabled||window.PointerEvent?this.handler=new fl(e,t,n):this.handler=new al(e,t,n)}return e.prototype.getTargetAtClientPoint=function(e,t){return this.handler.getTargetAtClientPoint(e,t)},e.prototype.dispose=function(){this.handler.dispose()},e}(),ml=function(){function e(e,t,n,i,o){this.configuration=e,this.viewModel=t,this._execCoreEditorCommandFunc=n,this.outgoingEvents=i,this.commandDelegate=o}return e.prototype._execMouseCommand=function(e,t){t.source="mouse",this._execCoreEditorCommandFunc(e,t)},e.prototype.paste=function(e,t,n,i){this.commandDelegate.paste(e,t,n,i)},e.prototype.type=function(e,t){this.commandDelegate.type(e,t)},e.prototype.replacePreviousChar=function(e,t,n){this.commandDelegate.replacePreviousChar(e,t,n)},e.prototype.compositionStart=function(e){this.commandDelegate.compositionStart(e)},e.prototype.compositionEnd=function(e){this.commandDelegate.compositionEnd(e)},e.prototype.cut=function(e){this.commandDelegate.cut(e)},e.prototype.setSelection=function(e,t){this._execCoreEditorCommandFunc(We.SetSelection,{source:e,selection:t})},e.prototype._validateViewColumn=function(e){var t=this.viewModel.getLineMinColumn(e.lineNumber);return e.column=4?this.selectAll():3===e.mouseDownCount?this._hasMulticursorModifier(e)?e.inSelectionMode?this.lastCursorLineSelectDrag(e.position):this.lastCursorLineSelect(e.position):e.inSelectionMode?this.lineSelectDrag(e.position):this.lineSelect(e.position):2===e.mouseDownCount?this._hasMulticursorModifier(e)?this.lastCursorWordSelect(e.position):e.inSelectionMode?this.wordSelectDrag(e.position):this.wordSelect(e.position):this._hasMulticursorModifier(e)?this._hasNonMulticursorModifier(e)||(e.shiftKey?this.columnSelect(e.position,e.mouseColumn):e.inSelectionMode?this.lastCursorMoveToSelect(e.position):this.createCursor(e.position,!1)):e.inSelectionMode?this.moveToSelect(e.position):this.moveTo(e.position)},e.prototype._usualArgs=function(e){return e=this._validateViewColumn(e),{position:this.convertViewToModelPosition(e),viewPosition:e}},e.prototype.moveTo=function(e){this._execMouseCommand(We.MoveTo,this._usualArgs(e))},e.prototype.moveToSelect=function(e){this._execMouseCommand(We.MoveToSelect,this._usualArgs(e))},e.prototype.columnSelect=function(e,t){e=this._validateViewColumn(e),this._execMouseCommand(We.ColumnSelect,{position:this.convertViewToModelPosition(e),viewPosition:e,mouseColumn:t})},e.prototype.createCursor=function(e,t){e=this._validateViewColumn(e),this._execMouseCommand(We.CreateCursor,{position:this.convertViewToModelPosition(e),viewPosition:e,wholeLine:t})},e.prototype.lastCursorMoveToSelect=function(e){this._execMouseCommand(We.LastCursorMoveToSelect,this._usualArgs(e))},e.prototype.wordSelect=function(e){this._execMouseCommand(We.WordSelect,this._usualArgs(e))},e.prototype.wordSelectDrag=function(e){this._execMouseCommand(We.WordSelectDrag,this._usualArgs(e))},e.prototype.lastCursorWordSelect=function(e){this._execMouseCommand(We.LastCursorWordSelect,this._usualArgs(e))},e.prototype.lineSelect=function(e){this._execMouseCommand(We.LineSelect,this._usualArgs(e))},e.prototype.lineSelectDrag=function(e){this._execMouseCommand(We.LineSelectDrag,this._usualArgs(e))},e.prototype.lastCursorLineSelect=function(e){this._execMouseCommand(We.LastCursorLineSelect,this._usualArgs(e))},e.prototype.lastCursorLineSelectDrag=function(e){this._execMouseCommand(We.LastCursorLineSelectDrag,this._usualArgs(e))},e.prototype.selectAll=function(){this._execMouseCommand(We.SelectAll,{})},e.prototype.convertViewToModelPosition=function(e){return this.viewModel.coordinatesConverter.convertViewPositionToModelPosition(e)},e.prototype.emitKeyDown=function(e){this.outgoingEvents.emitKeyDown(e)},e.prototype.emitKeyUp=function(e){this.outgoingEvents.emitKeyUp(e)},e.prototype.emitContextMenu=function(e){this.outgoingEvents.emitContextMenu(e)},e.prototype.emitMouseMove=function(e){this.outgoingEvents.emitMouseMove(e)},e.prototype.emitMouseLeave=function(e){this.outgoingEvents.emitMouseLeave(e)},e.prototype.emitMouseUp=function(e){this.outgoingEvents.emitMouseUp(e)},e.prototype.emitMouseDown=function(e){this.outgoingEvents.emitMouseDown(e)},e.prototype.emitMouseDrag=function(e){this.outgoingEvents.emitMouseDrag(e)},e.prototype.emitMouseDrop=function(e){this.outgoingEvents.emitMouseDrop(e)},e}(),vl=function(){function e(e){this._eventHandlerGateKeeper=e,this._eventHandlers=[],this._eventQueue=null,this._isConsumingQueue=!1}return e.prototype.addEventHandler=function(e){for(var t=0,n=this._eventHandlers.length;t=this._lines.length)throw new Error("Illegal value for lineNumber");return this._lines[t]},e.prototype.onLinesDeleted=function(e,t){if(0===this.getCount())return null;var n=this.getStartLineNumber(),i=this.getEndLineNumber();if(ti)return null;for(var r=0,s=0,a=n;a<=i;a++){var u=a-this._rendLineNumberStart;e<=a&&a<=t&&(0===s?(r=u,s=1):s++)}if(e=n&&r<=i&&(this._lines[r-this._rendLineNumberStart].onContentChanged(),o=!0);return o},e.prototype.onLinesInserted=function(e,t){if(0===this.getCount())return null;var n=t-e+1,i=this.getStartLineNumber(),o=this.getEndLineNumber();if(e<=i)return this._rendLineNumberStart+=n,null;if(e>o)return null;if(n+e>o)return this._lines.splice(e-this._rendLineNumberStart,o-e+1);for(var r=[],s=0;sn))for(var a=Math.max(t,s.fromLineNumber),u=Math.min(n,s.toLineNumber),l=a;l<=u;l++){var c=l-this._rendLineNumberStart;this._lines[c].onTokensChanged(),i=!0}}return i},e}(),bl=function(){function e(e){var t=this;this._host=e,this.domNode=this._createDomNode(),this._linesCollection=new yl((function(){return t._host.createVisibleLine()}))}return e.prototype._createDomNode=function(){var e=Ar(document.createElement("div"));return e.setClassName("view-layer"),e.setPosition("absolute"),e.domNode.setAttribute("role","presentation"),e.domNode.setAttribute("aria-hidden","true"),e},e.prototype.onConfigurationChanged=function(e){return e.layoutInfo},e.prototype.onFlushed=function(e){return this._linesCollection.flush(),!0},e.prototype.onLinesChanged=function(e){return this._linesCollection.onLinesChanged(e.fromLineNumber,e.toLineNumber)},e.prototype.onLinesDeleted=function(e){var t=this._linesCollection.onLinesDeleted(e.fromLineNumber,e.toLineNumber);if(t)for(var n=0,i=t.length;nt?(u=t)<=(s=Math.min(n,o.rendLineNumberStart-1))&&(this._insertLinesBefore(o,u,s,i,t),o.linesLength+=s-u+1):o.rendLineNumberStart0&&(this._removeLinesBefore(o,a),o.linesLength-=a),o.rendLineNumberStart=t,o.rendLineNumberStart+o.linesLength-1n){var s,a,u=Math.max(0,n-o.rendLineNumberStart+1);(a=(s=o.linesLength-1)-u+1)>0&&(this._removeLinesAfter(o,a),o.linesLength-=a)}return this._finishRendering(o,!1,i),o},e.prototype._renderUntouchedLines=function(e,t,n,i,o){for(var r=e.rendLineNumberStart,s=e.lines,a=t;a<=n;a++){var u=r+a;s[a].layoutLine(u,i[u-o])}},e.prototype._insertLinesBefore=function(e,t,n,i,o){for(var r=[],s=0,a=t;a<=n;a++)r[s++]=this.host.createVisibleLine();e.lines=r.concat(e.lines)},e.prototype._removeLinesBefore=function(e,t){for(var n=0;n=0;s--){var a=e.lines[s];i[s]&&(a.setDomNode(r),r=r.previousSibling)}},e.prototype._finishRenderingInvalidLines=function(e,t,n){var i=document.createElement("div");i.innerHTML=t;for(var o=0;o'),i.appendASCIIString(o),i.appendASCIIString(""),!0)},e.prototype.layoutLine=function(e,t){this._domNode&&(this._domNode.setTop(t),this._domNode.setHeight(this._lineHeight))},e}(),Sl=function(e){function t(t){var n=e.call(this,t)||this;return n._contentWidth=n._context.configuration.editor.layoutInfo.contentWidth,n.domNode.setHeight(0),n}return wl(t,e),t.prototype.onConfigurationChanged=function(t){return t.layoutInfo&&(this._contentWidth=this._context.configuration.editor.layoutInfo.contentWidth),e.prototype.onConfigurationChanged.call(this,t)},t.prototype.onScrollChanged=function(t){return e.prototype.onScrollChanged.call(this,t)||t.scrollWidthChanged},t.prototype._viewOverlaysRender=function(t){e.prototype._viewOverlaysRender.call(this,t),this.domNode.setWidth(Math.max(t.scrollWidth,this._contentWidth))},t}(Ml),Ll=function(e){function t(t){var n=e.call(this,t)||this;return n._contentLeft=n._context.configuration.editor.layoutInfo.contentLeft,n.domNode.setClassName("margin-view-overlays"),n.domNode.setWidth(1),Ji.applyFontInfo(n.domNode,n._context.configuration.editor.fontInfo),n}return wl(t,e),t.prototype.onConfigurationChanged=function(t){var n=!1;return t.fontInfo&&(Ji.applyFontInfo(this.domNode,this._context.configuration.editor.fontInfo),n=!0),t.layoutInfo&&(this._contentLeft=this._context.configuration.editor.layoutInfo.contentLeft,n=!0),e.prototype.onConfigurationChanged.call(this,t)||n},t.prototype.onScrollChanged=function(t){return e.prototype.onScrollChanged.call(this,t)||t.scrollHeightChanged},t.prototype._viewOverlaysRender=function(t){e.prototype._viewOverlaysRender.call(this,t);var n=Math.min(t.scrollHeight,1e6);this.domNode.setHeight(n),this.domNode.setWidth(this._contentLeft)},t}(Ml),Il=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Nl=function(e,t){this.top=e,this.left=t},xl=function(e){function t(t,n){var i=e.call(this,t)||this;return i._viewDomNode=n,i._widgets={},i.domNode=Ar(document.createElement("div")),Yr.write(i.domNode,1),i.domNode.setClassName("contentWidgets"),i.domNode.setPosition("absolute"),i.domNode.setTop(0),i.overflowingContentWidgetsDomNode=Ar(document.createElement("div")),Yr.write(i.overflowingContentWidgetsDomNode,2),i.overflowingContentWidgetsDomNode.setClassName("overflowingContentWidgets"),i}return Il(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this),this._widgets=null,this.domNode=null},t.prototype.onConfigurationChanged=function(e){for(var t=Object.keys(this._widgets),n=0,i=t.length;n=n,l=s,c=i.viewportHeight-s>=n,h=e.left;return h+t>i.scrollLeft+i.viewportWidth&&(h=i.scrollLeft+i.viewportWidth-t),hthis._contentWidth)return null;var r,s=e.top-n,a=e.top+this._lineHeight,u=o+this._contentLeft,l=Tn(this._viewDomNode.domNode),c=l.top+s-En.scrollY,h=l.top+a-En.scrollY,d=l.left+u-En.scrollX,f=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,p=c>=22,g=h+n<=(window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight)-22;return d+t+20>f&&(d-=r=d-(f-t-20),u-=r),d<0&&(d-=r=d,u-=r),this._fixedOverflowWidgets&&(s=c,a=h,u=d),{aboveTop:s,fitsAbove:p,belowTop:a,fitsBelow:g,left:u}},e.prototype._prepareRenderWidgetAtExactPositionOverflowing=function(e){return new Nl(e.top,e.left+this._contentLeft)},e.prototype._getTopLeft=function(e){if(!this._viewPosition)return null;var t=e.visibleRangeForPosition(this._viewPosition);if(!t)return null;var n=e.getVerticalOffsetForLineNumber(this._viewPosition.lineNumber)-e.scrollTop;return new Nl(n,t.left)},e.prototype._prepareRenderWidget=function(e,t){var n=this;if(!e)return null;for(var i=null,o=function(){if(!i){if(-1===n._cachedDomNodeClientWidth||-1===n._cachedDomNodeClientHeight){var o=n.domNode.domNode;n._cachedDomNodeClientWidth=o.clientWidth,n._cachedDomNodeClientHeight=o.clientHeight}i=n.allowEditorOverflow?n._layoutBoxInPage(e,n._cachedDomNodeClientWidth,n._cachedDomNodeClientHeight,t):n._layoutBoxInViewport(e,n._cachedDomNodeClientWidth,n._cachedDomNodeClientHeight,t)}},r=1;r<=2;r++)for(var s=0;se.endLineNumber||this.domNode.setMaxWidth(this._maxWidth))},e.prototype.prepareRender=function(e){var t=this._getTopLeft(e);this._renderData=this._prepareRenderWidget(t,e)},e.prototype.render=function(e){this._renderData?(this.allowEditorOverflow?(this.domNode.setTop(this._renderData.top),this.domNode.setLeft(this._renderData.left)):(this.domNode.setTop(this._renderData.top+e.scrollTop-e.bigNumbersDelta),this.domNode.setLeft(this._renderData.left)),this._isVisible||(this.domNode.setVisibility("inherit"),this.domNode.setAttribute("monaco-visible-content-widget","true"),this._isVisible=!0)):this._isVisible&&(this.domNode.removeAttribute("monaco-visible-content-widget"),this._isVisible=!1,this.domNode.setVisibility("hidden"))},e}(),kl=(n(4188),function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}()),Tl=function(e){function t(t){var n=e.call(this)||this;return n._context=t,n._lineHeight=n._context.configuration.editor.lineHeight,n._renderLineHighlight=n._context.configuration.editor.viewInfo.renderLineHighlight,n._selectionIsEmpty=!0,n._primaryCursorLineNumber=1,n._scrollWidth=0,n._contentWidth=n._context.configuration.editor.layoutInfo.contentWidth,n._context.addEventHandler(n),n}return kl(t,e),t.prototype.dispose=function(){this._context.removeEventHandler(this),this._context=null,e.prototype.dispose.call(this)},t.prototype.onConfigurationChanged=function(e){return e.lineHeight&&(this._lineHeight=this._context.configuration.editor.lineHeight),e.viewInfo&&(this._renderLineHighlight=this._context.configuration.editor.viewInfo.renderLineHighlight),e.layoutInfo&&(this._contentWidth=this._context.configuration.editor.layoutInfo.contentWidth),!0},t.prototype.onCursorStateChanged=function(e){var t=!1,n=e.selections[0].positionLineNumber;this._primaryCursorLineNumber!==n&&(this._primaryCursorLineNumber=n,t=!0);var i=e.selections[0].isEmpty();return this._selectionIsEmpty!==i?(this._selectionIsEmpty=i,t=!0,!0):t},t.prototype.onFlushed=function(e){return!0},t.prototype.onLinesDeleted=function(e){return!0},t.prototype.onLinesInserted=function(e){return!0},t.prototype.onScrollChanged=function(e){return e.scrollWidthChanged},t.prototype.onZonesChanged=function(e){return!0},t.prototype.prepareRender=function(e){this._scrollWidth=e.scrollWidth},t.prototype.render=function(e,t){return t===this._primaryCursorLineNumber&&this._shouldShowCurrentLine()?'
':""},t.prototype._shouldShowCurrentLine=function(){return("line"===this._renderLineHighlight||"all"===this._renderLineHighlight)&&this._selectionIsEmpty},t.prototype._willRenderMarginCurrentLine=function(){return"gutter"===this._renderLineHighlight||"all"===this._renderLineHighlight},t}(Ga);Tr((function(e,t){var n=e.getColor(ga);if(n&&t.addRule(".monaco-editor .view-overlays .current-line { background-color: "+n+"; }"),!n||n.isTransparent()||e.defines(ma)){var i=e.getColor(ma);i&&(t.addRule(".monaco-editor .view-overlays .current-line { border: 2px solid "+i+"; }"),"hc"===e.type&&t.addRule(".monaco-editor .view-overlays .current-line { border-width: 1px; }"))}})),n(7052);var El=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Al=function(e){function t(t){var n=e.call(this)||this;return n._context=t,n._lineHeight=n._context.configuration.editor.lineHeight,n._renderLineHighlight=n._context.configuration.editor.viewInfo.renderLineHighlight,n._selectionIsEmpty=!0,n._primaryCursorLineNumber=1,n._contentLeft=n._context.configuration.editor.layoutInfo.contentLeft,n._context.addEventHandler(n),n}return El(t,e),t.prototype.dispose=function(){this._context.removeEventHandler(this),this._context=null,e.prototype.dispose.call(this)},t.prototype.onConfigurationChanged=function(e){return e.lineHeight&&(this._lineHeight=this._context.configuration.editor.lineHeight),e.viewInfo&&(this._renderLineHighlight=this._context.configuration.editor.viewInfo.renderLineHighlight),e.layoutInfo&&(this._contentLeft=this._context.configuration.editor.layoutInfo.contentLeft),!0},t.prototype.onCursorStateChanged=function(e){var t=!1,n=e.selections[0].positionLineNumber;this._primaryCursorLineNumber!==n&&(this._primaryCursorLineNumber=n,t=!0);var i=e.selections[0].isEmpty();return this._selectionIsEmpty!==i?(this._selectionIsEmpty=i,t=!0,!0):t},t.prototype.onFlushed=function(e){return!0},t.prototype.onLinesDeleted=function(e){return!0},t.prototype.onLinesInserted=function(e){return!0},t.prototype.onZonesChanged=function(e){return!0},t.prototype.prepareRender=function(e){},t.prototype.render=function(e,t){if(t===this._primaryCursorLineNumber){var n="current-line";return this._shouldShowCurrentLine()&&(n="current-line current-line-margin"+(this._willRenderContentCurrentLine()?" current-line-margin-both":"")),'
'}return""},t.prototype._shouldShowCurrentLine=function(){return"gutter"===this._renderLineHighlight||"all"===this._renderLineHighlight},t.prototype._willRenderContentCurrentLine=function(){return("line"===this._renderLineHighlight||"all"===this._renderLineHighlight)&&this._selectionIsEmpty},t}(Ga);Tr((function(e,t){var n=e.getColor(ga);if(n)t.addRule(".monaco-editor .margin-view-overlays .current-line-margin { background-color: "+n+"; border: none; }");else{var i=e.getColor(ma);i&&t.addRule(".monaco-editor .margin-view-overlays .current-line-margin { border: 2px solid "+i+"; }"),"hc"===e.type&&t.addRule(".monaco-editor .margin-view-overlays .current-line-margin { border-width: 1px; }")}})),n(2612);var jl=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Ol=function(e){function t(t){var n=e.call(this)||this;return n._context=t,n._lineHeight=n._context.configuration.editor.lineHeight,n._typicalHalfwidthCharacterWidth=n._context.configuration.editor.fontInfo.typicalHalfwidthCharacterWidth,n._renderResult=null,n._context.addEventHandler(n),n}return jl(t,e),t.prototype.dispose=function(){this._context.removeEventHandler(this),this._context=null,this._renderResult=null,e.prototype.dispose.call(this)},t.prototype.onConfigurationChanged=function(e){return e.lineHeight&&(this._lineHeight=this._context.configuration.editor.lineHeight),e.fontInfo&&(this._typicalHalfwidthCharacterWidth=this._context.configuration.editor.fontInfo.typicalHalfwidthCharacterWidth),!0},t.prototype.onDecorationsChanged=function(e){return!0},t.prototype.onFlushed=function(e){return!0},t.prototype.onLinesChanged=function(e){return!0},t.prototype.onLinesDeleted=function(e){return!0},t.prototype.onLinesInserted=function(e){return!0},t.prototype.onScrollChanged=function(e){return e.scrollTopChanged||e.scrollWidthChanged},t.prototype.onZonesChanged=function(e){return!0},t.prototype.prepareRender=function(e){for(var t=e.getDecorationsInViewport(),n=[],i=0,o=0,r=t.length;ot.options.zIndex)return 1;var n=e.options.className,i=t.options.className;return ni?1:s.Q.compareRangesUsingStarts(e.range,t.range)}));for(var u=e.visibleRange.startLineNumber,l=e.visibleRange.endLineNumber,c=[],h=u;h<=l;h++)c[h-u]="";this._renderWholeLineDecorations(e,n,c),this._renderNormalDecorations(e,n,c),this._renderResult=c},t.prototype._renderWholeLineDecorations=function(e,t,n){for(var i=String(this._lineHeight),o=e.visibleRange.startLineNumber,r=e.visibleRange.endLineNumber,s=0,a=t.length;s',c=Math.max(u.range.startLineNumber,o),h=Math.min(u.range.endLineNumber,r),d=c;d<=h;d++)n[d-o]+=l}},t.prototype._renderNormalDecorations=function(e,t,n){for(var i=String(this._lineHeight),o=e.visibleRange.startLineNumber,r=null,a=!1,u=null,l=0,c=t.length;l';s[h]+=m}}},t.prototype.render=function(e,t){if(!this._renderResult)return"";var n=t-e;return n<0||n>=this._renderResult.length?"":this._renderResult[n]},t}(Ga),Rl=(n(9632),function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}()),Pl=function(e,t,n){this.startLineNumber=+e,this.endLineNumber=+t,this.className=String(n)},zl=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Rl(t,e),t.prototype._render=function(e,t,n){for(var i=[],o=e;o<=t;o++)i[o-e]=[];if(0===n.length)return i;n.sort((function(e,t){return e.className===t.className?e.startLineNumber===t.startLineNumber?e.endLineNumber-t.endLineNumber:e.startLineNumber-t.startLineNumber:e.className',s=[],a=t;a<=n;a++){var u=a-t,l=i[u];0===l.length?s[u]="":s[u]='
=this._renderResult.length?"":this._renderResult[n]},t}(zl),Fl=(n(6452),function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}()),Bl=function(e){function t(t){var n=e.call(this)||this;return n._context=t,n._primaryLineNumber=0,n._lineHeight=n._context.configuration.editor.lineHeight,n._spaceWidth=n._context.configuration.editor.fontInfo.spaceWidth,n._enabled=n._context.configuration.editor.viewInfo.renderIndentGuides,n._activeIndentEnabled=n._context.configuration.editor.viewInfo.highlightActiveIndentGuide,n._renderResult=null,n._context.addEventHandler(n),n}return Fl(t,e),t.prototype.dispose=function(){this._context.removeEventHandler(this),this._context=null,this._renderResult=null,e.prototype.dispose.call(this)},t.prototype.onConfigurationChanged=function(e){return e.lineHeight&&(this._lineHeight=this._context.configuration.editor.lineHeight),e.fontInfo&&(this._spaceWidth=this._context.configuration.editor.fontInfo.spaceWidth),e.viewInfo&&(this._enabled=this._context.configuration.editor.viewInfo.renderIndentGuides,this._activeIndentEnabled=this._context.configuration.editor.viewInfo.highlightActiveIndentGuide),!0},t.prototype.onCursorStateChanged=function(e){var t=e.selections[0],n=t.isEmpty()?t.positionLineNumber:0;return this._primaryLineNumber!==n&&(this._primaryLineNumber=n,!0)},t.prototype.onDecorationsChanged=function(e){return!0},t.prototype.onFlushed=function(e){return!0},t.prototype.onLinesChanged=function(e){return!0},t.prototype.onLinesDeleted=function(e){return!0},t.prototype.onLinesInserted=function(e){return!0},t.prototype.onScrollChanged=function(e){return e.scrollTopChanged},t.prototype.onZonesChanged=function(e){return!0},t.prototype.onLanguageConfigurationChanged=function(e){return!0},t.prototype.prepareRender=function(e){if(this._enabled){var t=e.visibleRange.startLineNumber,n=e.visibleRange.endLineNumber,i=this._context.model.getTabSize()*this._spaceWidth,o=e.scrollWidth,s=this._lineHeight,a=i,u=this._context.model.getLinesIndentGuides(t,n),l=0,c=0,h=0;if(this._activeIndentEnabled&&this._primaryLineNumber){var d=this._context.model.getActiveIndentGuide(this._primaryLineNumber,t,n);l=d.startLineNumber,c=d.endLineNumber,h=d.indent}for(var f=[],p=t;p<=n;p++){for(var g=l<=p&&p<=c,m=p-t,v=u[m],y="",b=e.visibleRangeForPosition(new r.y(p,1)),_=b?b.left:0,w=1;w<=v&&(y+='
',!((_+=i)>o));w++);f[m]=y}this._renderResult=f}else this._renderResult=null},t.prototype.render=function(e,t){if(!this._renderResult)return"";var n=t-e;return n<0||n>=this._renderResult.length?"":this._renderResult[n]},t}(Ga);Tr((function(e,t){var n=e.getColor(Ma);n&&t.addRule(".monaco-editor .lines-content .cigr { box-shadow: 1px 0 0 0 "+n+" inset; }");var i=e.getColor(Ca)||n;i&&t.addRule(".monaco-editor .lines-content .cigra { box-shadow: 1px 0 0 0 "+i+" inset; }")})),n(3721);var Hl=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Vl=function(){function e(){this._currentVisibleRange=new s.Q(1,1,1,1)}return e.prototype.getCurrentVisibleRange=function(){return this._currentVisibleRange},e.prototype.setCurrentVisibleRange=function(e){this._currentVisibleRange=e},e}(),Ul=function(e,t,n,i,o,r){this.lineNumber=e,this.startColumn=t,this.endColumn=n,this.startScrollTop=i,this.stopScrollTop=o,this.scrollType=r},Yl=function(e){function t(t,n){var i=e.call(this,t)||this;i._linesContent=n,i._textRangeRestingSpot=document.createElement("div"),i._visibleLines=new bl(i),i.domNode=i._visibleLines.domNode;var o=i._context.configuration;return i._lineHeight=o.editor.lineHeight,i._typicalHalfwidthCharacterWidth=o.editor.fontInfo.typicalHalfwidthCharacterWidth,i._isViewportWrapping=o.editor.wrappingInfo.isViewportWrapping,i._revealHorizontalRightPadding=o.editor.viewInfo.revealHorizontalRightPadding,i._canUseLayerHinting=o.editor.canUseLayerHinting,i._viewLineOptions=new Yu(o,i._context.theme.type),Yr.write(i.domNode,7),i.domNode.setClassName("view-lines"),Ji.applyFontInfo(i.domNode,o.editor.fontInfo),i._maxLineWidth=0,i._asyncUpdateLineWidths=new Ct((function(){i._updateLineWidthsSlow()}),200),i._lastRenderedData=new Vl,i._horizontalRevealRequest=null,i}return Hl(t,e),t.prototype.dispose=function(){this._asyncUpdateLineWidths.dispose(),e.prototype.dispose.call(this)},t.prototype.getDomNode=function(){return this.domNode},t.prototype.createVisibleLine=function(){return new Zu(this._viewLineOptions)},t.prototype.onConfigurationChanged=function(e){this._visibleLines.onConfigurationChanged(e),e.wrappingInfo&&(this._maxLineWidth=0);var t=this._context.configuration;return e.lineHeight&&(this._lineHeight=t.editor.lineHeight),e.fontInfo&&(this._typicalHalfwidthCharacterWidth=t.editor.fontInfo.typicalHalfwidthCharacterWidth),e.wrappingInfo&&(this._isViewportWrapping=t.editor.wrappingInfo.isViewportWrapping),e.viewInfo&&(this._revealHorizontalRightPadding=t.editor.viewInfo.revealHorizontalRightPadding),e.canUseLayerHinting&&(this._canUseLayerHinting=t.editor.canUseLayerHinting),e.fontInfo&&Ji.applyFontInfo(this.domNode,t.editor.fontInfo),this._onOptionsMaybeChanged(),e.layoutInfo&&(this._maxLineWidth=0),!0},t.prototype._onOptionsMaybeChanged=function(){var e=this._context.configuration,t=new Yu(e,this._context.theme.type);if(!this._viewLineOptions.equals(t)){this._viewLineOptions=t;for(var n=this._visibleLines.getStartLineNumber(),i=this._visibleLines.getEndLineNumber(),o=n;o<=i;o++)this._visibleLines.getVisibleLine(o).onOptionsChanged(this._viewLineOptions);return!0}return!1},t.prototype.onCursorStateChanged=function(e){for(var t=this._visibleLines.getStartLineNumber(),n=this._visibleLines.getEndLineNumber(),i=!1,o=t;o<=n;o++)i=this._visibleLines.getVisibleLine(o).onSelectionChanged()||i;return i},t.prototype.onDecorationsChanged=function(e){for(var t=this._visibleLines.getStartLineNumber(),n=this._visibleLines.getEndLineNumber(),i=t;i<=n;i++)this._visibleLines.getVisibleLine(i).onDecorationsChanged();return!0},t.prototype.onFlushed=function(e){var t=this._visibleLines.onFlushed(e);return this._maxLineWidth=0,t},t.prototype.onLinesChanged=function(e){return this._visibleLines.onLinesChanged(e)},t.prototype.onLinesDeleted=function(e){return this._visibleLines.onLinesDeleted(e)},t.prototype.onLinesInserted=function(e){return this._visibleLines.onLinesInserted(e)},t.prototype.onRevealRangeRequest=function(e){var t=this._computeScrollTopToRevealRange(this._context.viewLayout.getFutureViewport(),e.range,e.verticalType),n=this._context.viewLayout.validateScrollPosition({scrollTop:t});e.revealHorizontal?e.range.startLineNumber!==e.range.endLineNumber?n={scrollTop:n.scrollTop,scrollLeft:0}:this._horizontalRevealRequest=new Ul(e.range.startLineNumber,e.range.startColumn,e.range.endColumn,this._context.viewLayout.getCurrentScrollTop(),n.scrollTop,e.scrollType):this._horizontalRevealRequest=null;var i=Math.abs(this._context.viewLayout.getCurrentScrollTop()-n.scrollTop);return 0===e.scrollType&&i>this._lineHeight?this._context.viewLayout.setScrollPositionSmooth(n):this._context.viewLayout.setScrollPositionNow(n),!0},t.prototype.onScrollChanged=function(e){if(this._horizontalRevealRequest&&e.scrollLeftChanged&&(this._horizontalRevealRequest=null),this._horizontalRevealRequest&&e.scrollTopChanged){var t=Math.min(this._horizontalRevealRequest.startScrollTop,this._horizontalRevealRequest.stopScrollTop),n=Math.max(this._horizontalRevealRequest.startScrollTop,this._horizontalRevealRequest.stopScrollTop);(e.scrollTopn)&&(this._horizontalRevealRequest=null)}return this.domNode.setWidth(e.scrollWidth),this._visibleLines.onScrollChanged(e)||!0},t.prototype.onTokensChanged=function(e){return this._visibleLines.onTokensChanged(e)},t.prototype.onZonesChanged=function(e){return this._context.viewLayout.onMaxLineWidthChanged(this._maxLineWidth),this._visibleLines.onZonesChanged(e)},t.prototype.onThemeChanged=function(e){return this._onOptionsMaybeChanged()},t.prototype.getPositionFromDOMInfo=function(e,t){var n=this._getViewLineDomNode(e);if(null===n)return null;var i=this._getLineNumberFor(n);if(-1===i)return null;if(i<1||i>this._context.model.getLineCount())return null;if(1===this._context.model.getLineMaxColumn(i))return new r.y(i,1);var o=this._visibleLines.getStartLineNumber(),s=this._visibleLines.getEndLineNumber();if(is)return null;var a=this._visibleLines.getVisibleLine(i).getColumnOfNodeOffset(i,e,t),u=this._context.model.getLineMinColumn(i);return an?-1:this._visibleLines.getVisibleLine(e).getWidth()},t.prototype.linesVisibleRangesForRange=function(e,t){if(this.shouldRender())return null;var n=e.endLineNumber;if(!(e=s.Q.intersectRanges(e,this._lastRenderedData.getCurrentVisibleRange())))return null;var i,o=[],a=0,u=new Uu(this.domNode.domNode,this._textRangeRestingSpot);t&&(i=this._context.model.coordinatesConverter.convertViewPositionToModelPosition(new r.y(e.startLineNumber,1)).lineNumber);for(var l=this._visibleLines.getStartLineNumber(),c=this._visibleLines.getEndLineNumber(),h=e.startLineNumber;h<=e.endLineNumber;h++)if(!(hc)){var d=h===e.startLineNumber?e.startColumn:1,f=h===e.endLineNumber?e.endColumn:this._context.model.getLineMaxColumn(h),p=this._visibleLines.getVisibleLine(h).getVisibleRangesForRange(d,f,u);p&&0!==p.length&&(t&&ho)){var a=r===e.startLineNumber?e.startColumn:1,u=r===e.endLineNumber?e.endColumn:this._context.model.getLineMaxColumn(r),l=this._visibleLines.getVisibleLine(r).getVisibleRangesForRange(a,u,n);l&&0!==l.length&&(t=t.concat(l))}return 0===t.length?null:t},t.prototype.updateLineWidths=function(){this._updateLineWidths(!1)},t.prototype._updateLineWidthsFast=function(){return this._updateLineWidths(!0)},t.prototype._updateLineWidthsSlow=function(){this._updateLineWidths(!1)},t.prototype._updateLineWidths=function(e){for(var t=this._visibleLines.getStartLineNumber(),n=this._visibleLines.getEndLineNumber(),i=1,o=!0,r=t;r<=n;r++){var s=this._visibleLines.getVisibleLine(r);!e||s.getWidthIsFast()?i=Math.max(i,s.getWidth()):o=!1}return o&&1===t&&n===this._context.model.getLineCount()&&(this._maxLineWidth=0),this._ensureMaxLineWidth(i),o},t.prototype.prepareRender=function(){throw new Error("Not supported")},t.prototype.render=function(){throw new Error("Not supported")},t.prototype.renderText=function(e){if(this._visibleLines.renderLines(e),this._lastRenderedData.setCurrentVisibleRange(e.visibleRange),this.domNode.setWidth(this._context.viewLayout.getScrollWidth()),this.domNode.setHeight(Math.min(this._context.viewLayout.getScrollHeight(),1e6)),this._horizontalRevealRequest){var t=this._horizontalRevealRequest.lineNumber,n=this._horizontalRevealRequest.startColumn,i=this._horizontalRevealRequest.endColumn,o=this._horizontalRevealRequest.scrollType;if(e.startLineNumber<=t&&t<=e.endLineNumber){this._horizontalRevealRequest=null,this.onDidRender();var r=this._computeScrollLeftToRevealRange(t,n,i);this._isViewportWrapping||this._ensureMaxLineWidth(r.maxHorizontalOffset),0===o?this._context.viewLayout.setScrollPositionSmooth({scrollLeft:r.scrollLeft}):this._context.viewLayout.setScrollPositionNow({scrollLeft:r.scrollLeft})}}this._updateLineWidthsFast()||this._asyncUpdateLineWidths.schedule(),this._linesContent.setLayerHinting(this._canUseLayerHinting);var s=this._context.viewLayout.getCurrentScrollTop()-e.bigNumbersDelta;this._linesContent.setTop(-s),this._linesContent.setLeft(-this._context.viewLayout.getCurrentScrollLeft())},t.prototype._ensureMaxLineWidth=function(e){var t=Math.ceil(e);this._maxLineWidthh&&(h=f.left+f.width)}return o=h,c=Math.max(0,c-t.HORIZONTAL_EXTRA_PX),h+=this._revealHorizontalRightPadding,{scrollLeft:this._computeMinimumScrolling(a,u,c,h),maxHorizontalOffset:o}},t.prototype._computeMinimumScrolling=function(e,t,n,i,o,r){o=!!o,r=!!r;var s=(t|=0)-(e|=0);return(i|=0)-(n|=0)t?Math.max(0,i-s):e:n},t.HORIZONTAL_EXTRA_PX=30,t}(Ur),Zl=(n(9062),function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}()),Gl=function(e){function t(t){var n=e.call(this)||this;return n._context=t,n._decorationsLeft=n._context.configuration.editor.layoutInfo.decorationsLeft,n._decorationsWidth=n._context.configuration.editor.layoutInfo.decorationsWidth,n._renderResult=null,n._context.addEventHandler(n),n}return Zl(t,e),t.prototype.dispose=function(){this._context.removeEventHandler(this),this._context=null,this._renderResult=null,e.prototype.dispose.call(this)},t.prototype.onConfigurationChanged=function(e){return e.layoutInfo&&(this._decorationsLeft=this._context.configuration.editor.layoutInfo.decorationsLeft,this._decorationsWidth=this._context.configuration.editor.layoutInfo.decorationsWidth),!0},t.prototype.onDecorationsChanged=function(e){return!0},t.prototype.onFlushed=function(e){return!0},t.prototype.onLinesChanged=function(e){return!0},t.prototype.onLinesDeleted=function(e){return!0},t.prototype.onLinesInserted=function(e){return!0},t.prototype.onScrollChanged=function(e){return e.scrollTopChanged},t.prototype.onZonesChanged=function(e){return!0},t.prototype._getDecorations=function(e){for(var t=e.getDecorationsInViewport(),n=[],i=0,o=0,r=t.length;o
',r=[],s=t;s<=n;s++){for(var a=s-t,u=i[a],l="",c=0,h=u.length;c';o[s]=u}this._renderResult=o},t.prototype.render=function(e,t){return this._renderResult?this._renderResult[t-e]:""},t}(zl),Kl=(n(4480),function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}()),Jl=function(e){function t(t){var n=e.call(this,t)||this;return n._widgets={},n._verticalScrollbarWidth=n._context.configuration.editor.layoutInfo.verticalScrollbarWidth,n._minimapWidth=n._context.configuration.editor.layoutInfo.minimapWidth,n._horizontalScrollbarHeight=n._context.configuration.editor.layoutInfo.horizontalScrollbarHeight,n._editorHeight=n._context.configuration.editor.layoutInfo.height,n._editorWidth=n._context.configuration.editor.layoutInfo.width,n._domNode=Ar(document.createElement("div")),Yr.write(n._domNode,4),n._domNode.setClassName("overlayWidgets"),n}return Kl(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this),this._widgets=null},t.prototype.getDomNode=function(){return this._domNode},t.prototype.onConfigurationChanged=function(e){return!!e.layoutInfo&&(this._verticalScrollbarWidth=this._context.configuration.editor.layoutInfo.verticalScrollbarWidth,this._minimapWidth=this._context.configuration.editor.layoutInfo.minimapWidth,this._horizontalScrollbarHeight=this._context.configuration.editor.layoutInfo.horizontalScrollbarHeight,this._editorHeight=this._context.configuration.editor.layoutInfo.height,this._editorWidth=this._context.configuration.editor.layoutInfo.width,!0)},t.prototype.addWidget=function(e){var t=Ar(e.getDomNode());this._widgets[e.getId()]={widget:e,preference:null,domNode:t},t.setPosition("absolute"),t.setAttribute("widgetId",e.getId()),this._domNode.appendChild(t),this.setShouldRender()},t.prototype.setWidgetPosition=function(e,t){var n=this._widgets[e.getId()];return n.preference!==t&&(n.preference=t,this.setShouldRender(),!0)},t.prototype.removeWidget=function(e){var t=e.getId();if(this._widgets.hasOwnProperty(t)){var n=this._widgets[t].domNode.domNode;delete this._widgets[t],n.parentNode.removeChild(n),this.setShouldRender()}},t.prototype._renderWidget=function(e){var t=e.domNode;if(null!==e.preference)if(e.preference===ru.TOP_RIGHT_CORNER)t.setTop(0),t.setRight(2*this._verticalScrollbarWidth+this._minimapWidth);else if(e.preference===ru.BOTTOM_RIGHT_CORNER){var n=t.domNode.clientHeight;t.setTop(this._editorHeight-n-2*this._horizontalScrollbarHeight),t.setRight(2*this._verticalScrollbarWidth+this._minimapWidth)}else e.preference===ru.TOP_CENTER&&(t.setTop(0),t.domNode.style.right="50%");else t.unsetTop()},t.prototype.prepareRender=function(e){},t.prototype.render=function(e){this._domNode.setWidth(this._editorWidth);for(var t=Object.keys(this._widgets),n=0,i=t.length;n=3){var o,r,s,a=i-(o=Math.floor(i/3))-(r=Math.floor(i/3)),u=(s=e)+o;return[[0,s,u,s,s+o+a,s,u,s],[0,o,a,o+a,r,o+a+r,a+r,o+a+r]]}return 2===n?[[0,s=e,s,s,s+(o=Math.floor(i/2)),s,s,s],[0,o,o,o,r=i-o,o+r,o+r,o+r]]:[[0,e,e,e,e,e,e,e],[0,i,i,i,i,i,i,i]]},e.prototype.equals=function(e){return this.lineHeight===e.lineHeight&&this.pixelRatio===e.pixelRatio&&this.overviewRulerLanes===e.overviewRulerLanes&&this.renderBorder===e.renderBorder&&this.borderColor===e.borderColor&&this.hideCursor===e.hideCursor&&this.cursorColor===e.cursorColor&&this.themeType===e.themeType&&this.backgroundColor===e.backgroundColor&&this.top===e.top&&this.right===e.right&&this.domWidth===e.domWidth&&this.domHeight===e.domHeight&&this.canvasWidth===e.canvasWidth&&this.canvasHeight===e.canvasHeight},e}(),ec=function(e){function t(t){var n=e.call(this,t)||this;return n._domNode=Ar(document.createElement("canvas")),n._domNode.setClassName("decorationsOverviewRuler"),n._domNode.setPosition("absolute"),n._domNode.setLayerHinting(!0),n._domNode.setAttribute("aria-hidden","true"),n._settings=null,n._updateSettings(!1),n._tokensColorTrackerListener=No.dG.onDidChange((function(e){e.changedColorMap&&n._updateSettings(!0)})),n._cursorPositions=[],n}return Xl(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this),this._tokensColorTrackerListener.dispose()},t.prototype._updateSettings=function(e){var t=new $l(this._context.configuration,this._context.theme);return!(null!==this._settings&&this._settings.equals(t)||(this._settings=t,this._domNode.setTop(this._settings.top),this._domNode.setRight(this._settings.right),this._domNode.setWidth(this._settings.domWidth),this._domNode.setHeight(this._settings.domHeight),this._domNode.domNode.width=this._settings.canvasWidth,this._domNode.domNode.height=this._settings.canvasHeight,e&&this._render(),0))},t.prototype.onConfigurationChanged=function(e){return this._updateSettings(!1)},t.prototype.onCursorStateChanged=function(e){this._cursorPositions=[];for(var t=0,n=e.selections.length;tt&&(D=t-a),S=D-a,T=D+a),S>y+1||w!==m?(0!==b&&u.fillRect(l[m],v,c[m],y-v),m=w,v=S,y=T):T>y&&(y=T)}u.fillRect(l[m],v,c[m],y-v)}if(!this._settings.hideCursor){var L=2*this._settings.pixelRatio|0,I=L/2|0,N=this._settings.x[7],x=this._settings.w[7];for(u.fillStyle=this._settings.cursorColor,v=-100,y=-100,b=0,_=this._cursorPositions.length;b<_;b++){var D,k=this._cursorPositions[b];(D=i.getVerticalOffsetForLineNumber(k.lineNumber)*o|0)t&&(D=t-I);var T=(S=D-I)+L;S>y+1?(0!==b&&u.fillRect(N,v,x,y-v),v=S,y=T):T>y&&(y=T)}u.fillRect(N,v,x,y-v)}this._settings.renderBorder&&this._settings.borderColor&&this._settings.overviewRulerLanes>0&&(u.beginPath(),u.lineWidth=1,u.strokeStyle=this._settings.borderColor,u.moveTo(0,0),u.lineTo(0,t),u.stroke(),u.moveTo(0,0),u.lineTo(e,0),u.stroke())},t}(Ur),tc=function(){function e(e,t,n){this.from=0|e,this.to=0|t,this.colorId=0|n}return e.compare=function(e,t){return e.colorId===t.colorId?e.from===t.from?e.to-t.to:e.from-t.from:e.colorId-t.colorId},e}(),nc=function(){function e(e,t,n){this.startLineNumber=e,this.endLineNumber=t,this.color=n,this._colorZone=null}return e.compare=function(e,t){return e.color===t.color?e.startLineNumber===t.startLineNumber?e.endLineNumber-t.endLineNumber:e.startLineNumber-t.startLineNumber:e.colorn&&(d=n-f);var p=u.color,g=this._color2Id[p];g||(g=++this._lastAssignedId,this._color2Id[p]=g,this._id2Color[g]=p);var m=new tc(d-f,d+f,g);u.setColorZone(m),r.push(m)}return this._colorZonesInvalid=!1,r.sort(tc.compare),r},e}(),oc=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),rc=function(e){function t(t,n){var i=e.call(this)||this;return i._context=t,i._domNode=Ar(document.createElement("canvas")),i._domNode.setClassName(n),i._domNode.setPosition("absolute"),i._domNode.setLayerHinting(!0),i._zoneManager=new ic((function(e){return i._context.viewLayout.getVerticalOffsetForLineNumber(e)})),i._zoneManager.setDOMWidth(0),i._zoneManager.setDOMHeight(0),i._zoneManager.setOuterHeight(i._context.viewLayout.getScrollHeight()),i._zoneManager.setLineHeight(i._context.configuration.editor.lineHeight),i._zoneManager.setPixelRatio(i._context.configuration.editor.pixelRatio),i._context.addEventHandler(i),i}return oc(t,e),t.prototype.dispose=function(){this._context.removeEventHandler(this),this._zoneManager=null,e.prototype.dispose.call(this)},t.prototype.onConfigurationChanged=function(e){return e.lineHeight&&(this._zoneManager.setLineHeight(this._context.configuration.editor.lineHeight),this._render()),e.pixelRatio&&(this._zoneManager.setPixelRatio(this._context.configuration.editor.pixelRatio),this._domNode.setWidth(this._zoneManager.getDOMWidth()),this._domNode.setHeight(this._zoneManager.getDOMHeight()),this._domNode.domNode.width=this._zoneManager.getCanvasWidth(),this._domNode.domNode.height=this._zoneManager.getCanvasHeight(),this._render()),!0},t.prototype.onFlushed=function(e){return this._render(),!0},t.prototype.onScrollChanged=function(e){return e.scrollHeightChanged&&(this._zoneManager.setOuterHeight(e.scrollHeight),this._render()),!0},t.prototype.onZonesChanged=function(e){return this._render(),!0},t.prototype.getDomNode=function(){return this._domNode.domNode},t.prototype.setLayout=function(e){this._domNode.setTop(e.top),this._domNode.setRight(e.right);var t=!1;t=this._zoneManager.setDOMWidth(e.width)||t,(t=this._zoneManager.setDOMHeight(e.height)||t)&&(this._domNode.setWidth(this._zoneManager.getDOMWidth()),this._domNode.setHeight(this._zoneManager.getDOMHeight()),this._domNode.domNode.width=this._zoneManager.getCanvasWidth(),this._domNode.domNode.height=this._zoneManager.getCanvasHeight(),this._render())},t.prototype.setZones=function(e){this._zoneManager.setZones(e),this._render()},t.prototype._render=function(){if(0===this._zoneManager.getOuterHeight())return!1;var e=this._zoneManager.getCanvasWidth(),t=this._zoneManager.getCanvasHeight(),n=this._zoneManager.resolveColorZones(),i=this._zoneManager.getId2Color(),o=this._domNode.domNode.getContext("2d");return o.clearRect(0,0,e,t),n.length>0&&this._renderOneLane(o,n,i,e),!0},t.prototype._renderOneLane=function(e,t,n,i){for(var o=0,r=0,s=0,a=0,u=t.length;a=h?s=Math.max(s,d):(e.fillRect(0,r,i,s-r),r=h,s=d)}e.fillRect(0,r,i,s-r)},t}(Or),sc=(n(9964),function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}()),ac=function(e){function t(t){var n=e.call(this,t)||this;return n.domNode=Ar(document.createElement("div")),n.domNode.setAttribute("role","presentation"),n.domNode.setAttribute("aria-hidden","true"),n.domNode.setClassName("view-rulers"),n._renderedRulers=[],n._rulers=n._context.configuration.editor.viewInfo.rulers,n._typicalHalfwidthCharacterWidth=n._context.configuration.editor.fontInfo.typicalHalfwidthCharacterWidth,n}return sc(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this)},t.prototype.onConfigurationChanged=function(e){return!!(e.viewInfo||e.layoutInfo||e.fontInfo)&&(this._rulers=this._context.configuration.editor.viewInfo.rulers,this._typicalHalfwidthCharacterWidth=this._context.configuration.editor.fontInfo.typicalHalfwidthCharacterWidth,!0)},t.prototype.onScrollChanged=function(e){return e.scrollHeightChanged},t.prototype.prepareRender=function(e){},t.prototype._ensureRulersCount=function(){var e=this._renderedRulers.length,t=this._rulers.length;if(e!==t)if(e0;)(r=Ar(document.createElement("div"))).setClassName("view-ruler"),r.setWidth(n),this.domNode.appendChild(r),this._renderedRulers.push(r),i--;else for(var o=e-t;o>0;){var r=this._renderedRulers.pop();this.domNode.removeChild(r),o--}},t.prototype.render=function(e){this._ensureRulersCount();for(var t=0,n=this._rulers.length;t0;return this._shouldShow!==e&&(this._shouldShow=e,!0)},t.prototype.getDomNode=function(){return this._domNode},t.prototype._updateWidth=function(){var e,t=this._context.configuration.editor.layoutInfo;return e=0===t.renderMinimap||t.minimapWidth>0&&0===t.minimapLeft?t.width:t.width-t.minimapWidth-t.verticalScrollbarWidth,this._width!==e&&(this._width=e,!0)},t.prototype.onConfigurationChanged=function(e){var t=!1;return e.viewInfo&&(this._useShadows=this._context.configuration.editor.viewInfo.scrollbar.useShadows),e.layoutInfo&&(t=this._updateWidth()),this._updateShouldShow()||t},t.prototype.onScrollChanged=function(e){return this._scrollTop=e.scrollTop,this._updateShouldShow()},t.prototype.prepareRender=function(e){},t.prototype.render=function(e){this._domNode.setWidth(this._width),this._domNode.setClassName(this._shouldShow?"scroll-decoration":"")},t}(Ur);Tr((function(e,t){var n=e.getColor(ks);n&&t.addRule(".monaco-editor .scroll-decoration { box-shadow: "+n+" 0 6px 6px -6px inset; }")})),n(2108);var cc=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),hc=function(e){this.left=e.left,this.width=e.width,this.startStyle=null,this.endStyle=null},dc=function(e,t){this.lineNumber=e,this.ranges=t};function fc(e){return new hc(e)}function pc(e){return new dc(e.lineNumber,e.ranges.map(fc))}var gc=kt,mc=function(e){function t(t){var n=e.call(this)||this;return n._previousFrameVisibleRangesWithStyle=[],n._context=t,n._lineHeight=n._context.configuration.editor.lineHeight,n._roundedSelection=n._context.configuration.editor.viewInfo.roundedSelection,n._typicalHalfwidthCharacterWidth=n._context.configuration.editor.fontInfo.typicalHalfwidthCharacterWidth,n._selections=[],n._renderResult=null,n._context.addEventHandler(n),n}return cc(t,e),t.prototype.dispose=function(){this._context.removeEventHandler(this),this._context=null,this._selections=null,this._renderResult=null,e.prototype.dispose.call(this)},t.prototype.onConfigurationChanged=function(e){return e.lineHeight&&(this._lineHeight=this._context.configuration.editor.lineHeight),e.viewInfo&&(this._roundedSelection=this._context.configuration.editor.viewInfo.roundedSelection),e.fontInfo&&(this._typicalHalfwidthCharacterWidth=this._context.configuration.editor.fontInfo.typicalHalfwidthCharacterWidth),!0},t.prototype.onCursorStateChanged=function(e){return this._selections=e.selections.slice(0),!0},t.prototype.onDecorationsChanged=function(e){return!0},t.prototype.onFlushed=function(e){return!0},t.prototype.onLinesChanged=function(e){return!0},t.prototype.onLinesDeleted=function(e){return!0},t.prototype.onLinesInserted=function(e){return!0},t.prototype.onScrollChanged=function(e){return e.scrollTopChanged},t.prototype.onZonesChanged=function(e){return!0},t.prototype._visibleRangesHaveGaps=function(e){for(var t=0,n=e.length;t1)return!0;return!1},t.prototype._enrichVisibleRangesWithStyle=function(e,t,n){var i=this._typicalHalfwidthCharacterWidth/4,o=null,r=null;if(n&&n.length>0&&t.length>0){var s=t[0].lineNumber;if(s===e.startLineNumber)for(var a=0;!o&&a=0;a--)n[a].lineNumber===u&&(r=n[a].ranges[0]);o&&!o.startStyle&&(o=null),r&&!r.startStyle&&(r=null)}a=0;for(var l=t.length;a0){var g=t[a-1].ranges[0].left,m=t[a-1].ranges[0].left+t[a-1].ranges[0].width;vc(h-g)g&&(f.top=1),vc(d-m)'},t.prototype._actualRenderOneSelection=function(e,n,i,o){for(var r=o.length>0&&o[0].ranges[0].startStyle,s=this._lineHeight.toString(),a=(this._lineHeight-1).toString(),u=o.length>0?o[0].lineNumber:0,l=o.length>0?o[o.length-1].lineNumber:0,c=0,h=o.length;c1,l)}}this._previousFrameVisibleRangesWithStyle=r,this._renderResult=t},t.prototype.render=function(e,t){if(!this._renderResult)return"";var n=t-e;return n<0||n>=this._renderResult.length?"":this._renderResult[n]},t.SELECTION_CLASS_NAME="selected-text",t.SELECTION_TOP_LEFT="top-left-radius",t.SELECTION_BOTTOM_LEFT="bottom-left-radius",t.SELECTION_TOP_RIGHT="top-right-radius",t.SELECTION_BOTTOM_RIGHT="bottom-right-radius",t.EDITOR_BACKGROUND_CLASS_NAME="monaco-editor-background",t.ROUNDED_PIECE_WIDTH=10,t}(Ga);function vc(e){return e<0?-e:e}Tr((function(e,t){var n=e.getColor(Fs);n&&t.addRule(".monaco-editor .focused .selected-text { background-color: "+n+"; }");var i=e.getColor(Hs);i&&t.addRule(".monaco-editor .selected-text { background-color: "+i+"; }");var o=e.getColor(Bs);o&&t.addRule(".monaco-editor .view-line span.inline-selected-text { color: "+o+"; }")})),n(4256);var yc=function(e,t,n,i,o,r){this.top=e,this.left=t,this.width=n,this.height=i,this.textContent=o,this.textContentClassName=r},bc=function(){function e(e){this._context=e,this._cursorStyle=this._context.configuration.editor.viewInfo.cursorStyle,this._lineHeight=this._context.configuration.editor.lineHeight,this._typicalHalfwidthCharacterWidth=this._context.configuration.editor.fontInfo.typicalHalfwidthCharacterWidth,this._lineCursorWidth=Math.min(this._context.configuration.editor.viewInfo.cursorWidth,this._typicalHalfwidthCharacterWidth),this._isVisible=!0,this._domNode=Ar(document.createElement("div")),this._domNode.setClassName("cursor"),this._domNode.setHeight(this._lineHeight),this._domNode.setTop(0),this._domNode.setLeft(0),Ji.applyFontInfo(this._domNode,this._context.configuration.editor.fontInfo),this._domNode.setDisplay("none"),this.updatePosition(new r.y(1,1)),this._lastRenderedContent="",this._renderData=null}return e.prototype.getDomNode=function(){return this._domNode},e.prototype.getPosition=function(){return this._position},e.prototype.show=function(){this._isVisible||(this._domNode.setVisibility("inherit"),this._isVisible=!0)},e.prototype.hide=function(){this._isVisible&&(this._domNode.setVisibility("hidden"),this._isVisible=!1)},e.prototype.onConfigurationChanged=function(e){return e.lineHeight&&(this._lineHeight=this._context.configuration.editor.lineHeight),e.fontInfo&&(Ji.applyFontInfo(this._domNode,this._context.configuration.editor.fontInfo),this._typicalHalfwidthCharacterWidth=this._context.configuration.editor.fontInfo.typicalHalfwidthCharacterWidth),e.viewInfo&&(this._cursorStyle=this._context.configuration.editor.viewInfo.cursorStyle,this._lineCursorWidth=Math.min(this._context.configuration.editor.viewInfo.cursorWidth,this._typicalHalfwidthCharacterWidth)),!0},e.prototype.onCursorPositionChanged=function(e){return this.updatePosition(e),!0},e.prototype._prepareRender=function(e){var t="",n="";if(this._cursorStyle===Li.m9.Line||this._cursorStyle===Li.m9.LineThin){var i,o=e.visibleRangeForPosition(this._position);if(!o)return null;this._cursorStyle===Li.m9.Line?(i=ni(this._lineCursorWidth>0?this._lineCursorWidth:2))>2&&(t=this._context.model.getLineContent(this._position.lineNumber).charAt(this._position.column-1)):i=ni(1);var r=e.getVerticalOffsetForLineNumber(this._position.lineNumber)-e.bigNumbersDelta;return new yc(r,o.left,i,this._lineHeight,t,n)}var a=e.linesVisibleRangesForRange(new s.Q(this._position.lineNumber,this._position.column,this._position.lineNumber,this._position.column+1),!1);if(!a||0===a.length||0===a[0].ranges.length)return null;var u=a[0].ranges[0],l=u.width<1?this._typicalHalfwidthCharacterWidth:u.width;if(this._cursorStyle===Li.m9.Block){var c=this._context.model.getViewLineData(this._position.lineNumber);t=c.content.charAt(this._position.column-1),p.isHighSurrogate(c.content.charCodeAt(this._position.column-1))&&(t+=c.content.charAt(this._position.column));var h=c.tokens.findTokenIndexAtOffset(this._position.column-1);n=c.tokens.getClassName(h)}var d=e.getVerticalOffsetForLineNumber(this._position.lineNumber)-e.bigNumbersDelta,f=this._lineHeight;return this._cursorStyle!==Li.m9.Underline&&this._cursorStyle!==Li.m9.UnderlineThin||(d+=this._lineHeight-2,f=2),new yc(d,u.left,l,f,t,n)},e.prototype.prepareRender=function(e){this._renderData=this._prepareRender(e)},e.prototype.render=function(e){return this._renderData?(this._lastRenderedContent!==this._renderData.textContent&&(this._lastRenderedContent=this._renderData.textContent,this._domNode.domNode.textContent=this._lastRenderedContent),this._domNode.setClassName("cursor "+this._renderData.textContentClassName),this._domNode.setDisplay("block"),this._domNode.setTop(this._renderData.top),this._domNode.setLeft(this._renderData.left),this._domNode.setWidth(this._renderData.width),this._domNode.setLineHeight(this._renderData.height),this._domNode.setHeight(this._renderData.height),{domNode:this._domNode.domNode,position:this._position,contentLeft:this._renderData.left,height:this._renderData.height,width:2}):(this._domNode.setDisplay("none"),null)},e.prototype.updatePosition=function(e){this._position=e},e}(),_c=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),wc=function(e){function t(t){var n=e.call(this,t)||this;return n._readOnly=n._context.configuration.editor.readOnly,n._cursorBlinking=n._context.configuration.editor.viewInfo.cursorBlinking,n._cursorStyle=n._context.configuration.editor.viewInfo.cursorStyle,n._selectionIsEmpty=!0,n._primaryCursor=new bc(n._context),n._secondaryCursors=[],n._renderData=[],n._domNode=Ar(document.createElement("div")),n._domNode.setAttribute("role","presentation"),n._domNode.setAttribute("aria-hidden","true"),n._updateDomClassName(),n._domNode.appendChild(n._primaryCursor.getDomNode()),n._startCursorBlinkAnimation=new wt,n._cursorFlatBlinkInterval=new Mt,n._blinkingEnabled=!1,n._editorHasFocus=!1,n._updateBlinking(),n}return _c(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this),this._startCursorBlinkAnimation.dispose(),this._cursorFlatBlinkInterval.dispose()},t.prototype.getDomNode=function(){return this._domNode},t.prototype.onConfigurationChanged=function(e){e.readOnly&&(this._readOnly=this._context.configuration.editor.readOnly),e.viewInfo&&(this._cursorBlinking=this._context.configuration.editor.viewInfo.cursorBlinking,this._cursorStyle=this._context.configuration.editor.viewInfo.cursorStyle),this._primaryCursor.onConfigurationChanged(e),this._updateBlinking(),e.viewInfo&&this._updateDomClassName();for(var t=0,n=this._secondaryCursors.length;tt.length){var r=this._secondaryCursors.length-t.length;for(i=0;i140)n._setDesiredScrollPositionNow(r.getScrollPosition());else{var a=n._sliderMousePosition(e)-i;n._setDesiredScrollPositionNow(r.getDesiredScrollPositionFromDelta(a))}}),(function(){n.slider.toggleClassName("active",!1),n._host.onDragEnd(),t()})),this._host.onDragStart()},t.prototype._setDesiredScrollPositionNow=function(e){var t={};this.writeScrollPosition(t,e),this._scrollable.setScrollPositionNow(t)},t}(kc),Pc=function(){function e(e,t,n){this._scrollbarSize=Math.round(t),this._oppositeScrollbarSize=Math.round(n),this._arrowSize=Math.round(e),this._visibleSize=0,this._scrollSize=0,this._scrollPosition=0,this._computedAvailableSize=0,this._computedIsNeeded=!1,this._computedSliderSize=0,this._computedSliderRatio=0,this._computedSliderPosition=0,this._refreshComputedValues()}return e.prototype.clone=function(){var t=new e(this._arrowSize,this._scrollbarSize,this._oppositeScrollbarSize);return t.setVisibleSize(this._visibleSize),t.setScrollSize(this._scrollSize),t.setScrollPosition(this._scrollPosition),t},e.prototype.setVisibleSize=function(e){var t=Math.round(e);return this._visibleSize!==t&&(this._visibleSize=t,this._refreshComputedValues(),!0)},e.prototype.setScrollSize=function(e){var t=Math.round(e);return this._scrollSize!==t&&(this._scrollSize=t,this._refreshComputedValues(),!0)},e.prototype.setScrollPosition=function(e){var t=Math.round(e);return this._scrollPosition!==t&&(this._scrollPosition=t,this._refreshComputedValues(),!0)},e._computeValues=function(e,t,n,i,o){var r=Math.max(0,n-e),s=Math.max(0,r-2*t),a=i>0&&i>n;if(!a)return{computedAvailableSize:Math.round(r),computedIsNeeded:a,computedSliderSize:Math.round(s),computedSliderRatio:0,computedSliderPosition:0};var u=Math.round(Math.max(20,Math.floor(n*s/i))),l=(s-u)/(i-n),c=o*l;return{computedAvailableSize:Math.round(r),computedIsNeeded:a,computedSliderSize:Math.round(u),computedSliderRatio:l,computedSliderPosition:Math.round(c)}},e.prototype._refreshComputedValues=function(){var t=e._computeValues(this._oppositeScrollbarSize,this._arrowSize,this._visibleSize,this._scrollSize,this._scrollPosition);this._computedAvailableSize=t.computedAvailableSize,this._computedIsNeeded=t.computedIsNeeded,this._computedSliderSize=t.computedSliderSize,this._computedSliderRatio=t.computedSliderRatio,this._computedSliderPosition=t.computedSliderPosition},e.prototype.getArrowSize=function(){return this._arrowSize},e.prototype.getScrollPosition=function(){return this._scrollPosition},e.prototype.getRectangleLargeSize=function(){return this._computedAvailableSize},e.prototype.getRectangleSmallSize=function(){return this._scrollbarSize},e.prototype.isNeeded=function(){return this._computedIsNeeded},e.prototype.getSliderSize=function(){return this._computedSliderSize},e.prototype.getSliderPosition=function(){return this._computedSliderPosition},e.prototype.getDesiredScrollPositionFromOffset=function(e){if(!this._computedIsNeeded)return 0;var t=e-this._arrowSize-this._computedSliderSize/2;return Math.round(t/this._computedSliderRatio)},e.prototype.getDesiredScrollPositionFromDelta=function(e){if(!this._computedIsNeeded)return 0;var t=this._computedSliderPosition+e;return Math.round(t/this._computedSliderRatio)},e}(),zc=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Wc=function(e){function t(t,n,i){var o=e.call(this,{lazyRender:n.lazyRender,host:i,scrollbarState:new Pc(n.horizontalHasArrows?n.arrowSize:0,n.horizontal===gr.XR.Hidden?0:n.horizontalScrollbarSize,n.vertical===gr.XR.Hidden?0:n.verticalScrollbarSize),visibility:n.horizontal,extraScrollbarClassName:"horizontal",scrollable:t})||this;if(n.horizontalHasArrows){var r=(n.arrowSize-11)/2,s=(n.horizontalScrollbarSize-11)/2;o._createArrow({className:"left-arrow",top:s,left:r,bottom:void 0,right:void 0,bgWidth:n.arrowSize,bgHeight:n.horizontalScrollbarSize,onActivate:function(){return o._host.onMouseWheel(new Kt(null,1,0))}}),o._createArrow({className:"right-arrow",top:s,left:void 0,bottom:void 0,right:r,bgWidth:n.arrowSize,bgHeight:n.horizontalScrollbarSize,onActivate:function(){return o._host.onMouseWheel(new Kt(null,-1,0))}})}return o._createSlider(Math.floor((n.horizontalScrollbarSize-n.horizontalSliderSize)/2),0,null,n.horizontalSliderSize),o}return zc(t,e),t.prototype._updateSlider=function(e,t){this.slider.setWidth(e),this.slider.setLeft(t)},t.prototype._renderDomNode=function(e,t){this.domNode.setWidth(e),this.domNode.setHeight(t),this.domNode.setLeft(0),this.domNode.setBottom(0)},t.prototype.onDidScroll=function(e){return this._shouldRender=this._onElementScrollSize(e.scrollWidth)||this._shouldRender,this._shouldRender=this._onElementScrollPosition(e.scrollLeft)||this._shouldRender,this._shouldRender=this._onElementSize(e.width)||this._shouldRender,this._shouldRender},t.prototype._mouseDownRelativePosition=function(e,t){return e},t.prototype._sliderMousePosition=function(e){return e.posx},t.prototype._sliderOrthogonalMousePosition=function(e){return e.posy},t.prototype.writeScrollPosition=function(e,t){e.scrollLeft=t},t}(Rc),Fc=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Bc=function(e){function t(t,n,i){var o=e.call(this,{lazyRender:n.lazyRender,host:i,scrollbarState:new Pc(n.verticalHasArrows?n.arrowSize:0,n.vertical===gr.XR.Hidden?0:n.verticalScrollbarSize,0),visibility:n.vertical,extraScrollbarClassName:"vertical",scrollable:t})||this;if(n.verticalHasArrows){var r=(n.arrowSize-11)/2,s=(n.verticalScrollbarSize-11)/2;o._createArrow({className:"up-arrow",top:r,left:s,bottom:void 0,right:void 0,bgWidth:n.verticalScrollbarSize,bgHeight:n.arrowSize,onActivate:function(){return o._host.onMouseWheel(new Kt(null,0,1))}}),o._createArrow({className:"down-arrow",top:void 0,left:s,bottom:r,right:void 0,bgWidth:n.verticalScrollbarSize,bgHeight:n.arrowSize,onActivate:function(){return o._host.onMouseWheel(new Kt(null,0,-1))}})}return o._createSlider(0,Math.floor((n.verticalScrollbarSize-n.verticalSliderSize)/2),n.verticalSliderSize,null),o}return Fc(t,e),t.prototype._updateSlider=function(e,t){this.slider.setHeight(e),this.slider.setTop(t)},t.prototype._renderDomNode=function(e,t){this.domNode.setWidth(t),this.domNode.setHeight(e),this.domNode.setRight(0),this.domNode.setTop(0)},t.prototype.onDidScroll=function(e){return this._shouldRender=this._onElementScrollSize(e.scrollHeight)||this._shouldRender,this._shouldRender=this._onElementScrollPosition(e.scrollTop)||this._shouldRender,this._shouldRender=this._onElementSize(e.height)||this._shouldRender,this._shouldRender},t.prototype._mouseDownRelativePosition=function(e,t){return t},t.prototype._sliderMousePosition=function(e){return e.posy},t.prototype._sliderOrthogonalMousePosition=function(e){return e.posx},t.prototype.writeScrollPosition=function(e,t){e.scrollTop=t},t}(Rc),Hc=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Vc=function(e,t,n){this.timestamp=e,this.deltaX=t,this.deltaY=n,this.score=0},Uc=function(){function e(){this._capacity=5,this._memory=[],this._front=-1,this._rear=-1}return e.prototype.isPhysicalMouseWheel=function(){if(-1===this._front&&-1===this._rear)return!1;for(var e=1,t=0,n=1,i=this._rear;;){var o=i===this._front?e:Math.pow(2,-n);if(e-=o,t+=this._memory[i].score*o,i===this._front)break;i=(this._capacity+i-1)%this._capacity,n++}return t<=.5},e.prototype.accept=function(e,t,n){var i=new Vc(e,t,n);i.score=this._computeScore(i),-1===this._front&&-1===this._rear?(this._memory[0]=i,this._front=0,this._rear=0):(this._rear=(this._rear+1)%this._capacity,this._rear===this._front&&(this._front=(this._front+1)%this._capacity),this._memory[this._rear]=i)},e.prototype._computeScore=function(e){if(Math.abs(e.deltaX)>0&&Math.abs(e.deltaY)>0)return 1;var t=.5;return-1===this._front&&-1===this._rear||this._memory[this._rear],(Math.abs(e.deltaX-Math.round(e.deltaX))>0||Math.abs(e.deltaY-Math.round(e.deltaY))>0)&&(t+=.25),Math.min(Math.max(t,0),1)},e.INSTANCE=new e,e}(),Yc=function(e){function t(t,n,i){var o=e.call(this)||this;o._onScroll=o._register(new X.vl),o.onScroll=o._onScroll.event,t.style.overflow="hidden",o._options=qc(n),o._scrollable=i,o._register(o._scrollable.onScroll((function(e){o._onDidScroll(e),o._onScroll.fire(e)})));var r={onMouseWheel:function(e){return o._onMouseWheel(e)},onDragStart:function(){return o._onDragStart()},onDragEnd:function(){return o._onDragEnd()}};return o._verticalScrollbar=o._register(new Bc(o._scrollable,o._options,r)),o._horizontalScrollbar=o._register(new Wc(o._scrollable,o._options,r)),o._domNode=document.createElement("div"),o._domNode.className="monaco-scrollable-element "+o._options.className,o._domNode.setAttribute("role","presentation"),o._domNode.style.position="relative",o._domNode.style.overflow="hidden",o._domNode.appendChild(t),o._domNode.appendChild(o._horizontalScrollbar.domNode.domNode),o._domNode.appendChild(o._verticalScrollbar.domNode.domNode),o._options.useShadows&&(o._leftShadowDomNode=Ar(document.createElement("div")),o._leftShadowDomNode.setClassName("shadow"),o._domNode.appendChild(o._leftShadowDomNode.domNode),o._topShadowDomNode=Ar(document.createElement("div")),o._topShadowDomNode.setClassName("shadow"),o._domNode.appendChild(o._topShadowDomNode.domNode),o._topLeftShadowDomNode=Ar(document.createElement("div")),o._topLeftShadowDomNode.setClassName("shadow top-left-corner"),o._domNode.appendChild(o._topLeftShadowDomNode.domNode)),o._listenOnDomNode=o._options.listenOnDomNode||o._domNode,o._mouseWheelToDispose=[],o._setListeningToMouseWheel(o._options.handleMouseWheel),o.onmouseover(o._listenOnDomNode,(function(e){return o._onMouseOver(e)})),o.onnonbubblingmouseout(o._listenOnDomNode,(function(e){return o._onMouseOut(e)})),o._hideTimeout=o._register(new wt),o._isDragging=!1,o._mouseIsOver=!1,o._shouldRender=!0,o._revealOnScroll=!0,o}return Hc(t,e),t.prototype.dispose=function(){this._mouseWheelToDispose=(0,I.AS)(this._mouseWheelToDispose),e.prototype.dispose.call(this)},t.prototype.getDomNode=function(){return this._domNode},t.prototype.getOverviewRulerLayoutInfo=function(){return{parent:this._domNode,insertBefore:this._verticalScrollbar.domNode.domNode}},t.prototype.delegateVerticalScrollbarMouseDown=function(e){this._verticalScrollbar.delegateMouseDown(e)},t.prototype.getScrollDimensions=function(){return this._scrollable.getScrollDimensions()},t.prototype.setScrollDimensions=function(e){this._scrollable.setScrollDimensions(e)},t.prototype.updateClassName=function(e){this._options.className=e,B.zx&&(this._options.className+=" mac"),this._domNode.className="monaco-scrollable-element "+this._options.className},t.prototype.updateOptions=function(e){var t=qc(e);this._options.handleMouseWheel=t.handleMouseWheel,this._options.mouseWheelScrollSensitivity=t.mouseWheelScrollSensitivity,this._setListeningToMouseWheel(this._options.handleMouseWheel),this._options.lazyRender||this._render()},t.prototype._setListeningToMouseWheel=function(e){var t=this;if(this._mouseWheelToDispose.length>0!==e&&(this._mouseWheelToDispose=(0,I.AS)(this._mouseWheelToDispose),e)){var n=function(e){var n=new Kt(e);t._onMouseWheel(n)};this._mouseWheelToDispose.push(cn(this._listenOnDomNode,"mousewheel",n)),this._mouseWheelToDispose.push(cn(this._listenOnDomNode,"DOMMouseScroll",n))}},t.prototype._onMouseWheel=function(e){var t,n=Uc.INSTANCE;if(n.accept(Date.now(),e.deltaX,e.deltaY),e.deltaY||e.deltaX){var i=e.deltaY*this._options.mouseWheelScrollSensitivity,o=e.deltaX*this._options.mouseWheelScrollSensitivity;this._options.flipAxes&&(i=(t=[o,i])[0],o=t[1]);var r=!B.zx&&e.browserEvent&&e.browserEvent.shiftKey;!this._options.scrollYToX&&!r||o||(o=i,i=0);var s=this._scrollable.getFutureScrollPosition(),a={};if(i){var u=s.scrollTop-50*i;this._verticalScrollbar.writeScrollPosition(a,u)}if(o){var l=s.scrollLeft-50*o;this._horizontalScrollbar.writeScrollPosition(a,l)}a=this._scrollable.validateScrollPosition(a),(s.scrollLeft!==a.scrollLeft||s.scrollTop!==a.scrollTop)&&(this._options.mouseWheelSmoothScroll&&n.isPhysicalMouseWheel()?this._scrollable.setScrollPositionSmooth(a):this._scrollable.setScrollPositionNow(a),this._shouldRender=!0)}(this._options.alwaysConsumeMouseWheel||this._shouldRender)&&(e.preventDefault(),e.stopPropagation())},t.prototype._onDidScroll=function(e){this._shouldRender=this._horizontalScrollbar.onDidScroll(e)||this._shouldRender,this._shouldRender=this._verticalScrollbar.onDidScroll(e)||this._shouldRender,this._options.useShadows&&(this._shouldRender=!0),this._revealOnScroll&&this._reveal(),this._options.lazyRender||this._render()},t.prototype.renderNow=function(){if(!this._options.lazyRender)throw new Error("Please use `lazyRender` together with `renderNow`!");this._render()},t.prototype._render=function(){if(this._shouldRender&&(this._shouldRender=!1,this._horizontalScrollbar.render(),this._verticalScrollbar.render(),this._options.useShadows)){var e=this._scrollable.getCurrentScrollPosition(),t=e.scrollTop>0,n=e.scrollLeft>0;this._leftShadowDomNode.setClassName("shadow"+(n?" left":"")),this._topShadowDomNode.setClassName("shadow"+(t?" top":"")),this._topLeftShadowDomNode.setClassName("shadow top-left-corner"+(t?" top":"")+(n?" left":""))}},t.prototype._onDragStart=function(){this._isDragging=!0,this._reveal()},t.prototype._onDragEnd=function(){this._isDragging=!1,this._hide()},t.prototype._onMouseOut=function(e){this._mouseIsOver=!1,this._hide()},t.prototype._onMouseOver=function(e){this._mouseIsOver=!0,this._reveal()},t.prototype._reveal=function(){this._verticalScrollbar.beginReveal(),this._horizontalScrollbar.beginReveal(),this._scheduleHide()},t.prototype._hide=function(){this._mouseIsOver||this._isDragging||(this._verticalScrollbar.beginHide(),this._horizontalScrollbar.beginHide())},t.prototype._scheduleHide=function(){var e=this;this._mouseIsOver||this._isDragging||this._hideTimeout.cancelAndSet((function(){return e._hide()}),500)},t}(kc),Zc=function(e){function t(t,n){var i=this;(n=n||{}).mouseWheelSmoothScroll=!1;var o=new gr.yE(0,(function(e){return pn(e)}));return(i=e.call(this,t,n,o)||this)._register(o),i}return Hc(t,e),t.prototype.setScrollPosition=function(e){this._scrollable.setScrollPositionNow(e)},t.prototype.getScrollPosition=function(){return this._scrollable.getCurrentScrollPosition()},t}(Yc),Gc=function(e){function t(t,n,i){return e.call(this,t,n,i)||this}return Hc(t,e),t}(Yc),Qc=function(e){function t(t,n){var i=e.call(this,t,n)||this;return i._element=t,i.onScroll((function(e){e.scrollTopChanged&&(i._element.scrollTop=e.scrollTop),e.scrollLeftChanged&&(i._element.scrollLeft=e.scrollLeft)})),i.scanDomNode(),i}return Hc(t,e),t.prototype.scanDomNode=function(){this.setScrollDimensions({width:this._element.clientWidth,scrollWidth:this._element.scrollWidth,height:this._element.clientHeight,scrollHeight:this._element.scrollHeight}),this.setScrollPosition({scrollLeft:this._element.scrollLeft,scrollTop:this._element.scrollTop})},t}(Zc);function qc(e){var t={lazyRender:void 0!==e.lazyRender&&e.lazyRender,className:void 0!==e.className?e.className:"",useShadows:void 0===e.useShadows||e.useShadows,handleMouseWheel:void 0===e.handleMouseWheel||e.handleMouseWheel,flipAxes:void 0!==e.flipAxes&&e.flipAxes,alwaysConsumeMouseWheel:void 0!==e.alwaysConsumeMouseWheel&&e.alwaysConsumeMouseWheel,scrollYToX:void 0!==e.scrollYToX&&e.scrollYToX,mouseWheelScrollSensitivity:void 0!==e.mouseWheelScrollSensitivity?e.mouseWheelScrollSensitivity:1,mouseWheelSmoothScroll:void 0===e.mouseWheelSmoothScroll||e.mouseWheelSmoothScroll,arrowSize:void 0!==e.arrowSize?e.arrowSize:11,listenOnDomNode:void 0!==e.listenOnDomNode?e.listenOnDomNode:null,horizontal:void 0!==e.horizontal?e.horizontal:gr.XR.Auto,horizontalScrollbarSize:void 0!==e.horizontalScrollbarSize?e.horizontalScrollbarSize:10,horizontalSliderSize:void 0!==e.horizontalSliderSize?e.horizontalSliderSize:0,horizontalHasArrows:void 0!==e.horizontalHasArrows&&e.horizontalHasArrows,vertical:void 0!==e.vertical?e.vertical:gr.XR.Auto,verticalScrollbarSize:void 0!==e.verticalScrollbarSize?e.verticalScrollbarSize:10,verticalHasArrows:void 0!==e.verticalHasArrows&&e.verticalHasArrows,verticalSliderSize:void 0!==e.verticalSliderSize?e.verticalSliderSize:0};return t.horizontalSliderSize=void 0!==e.horizontalSliderSize?e.horizontalSliderSize:t.horizontalScrollbarSize,t.verticalSliderSize=void 0!==e.verticalSliderSize?e.verticalSliderSize:t.verticalScrollbarSize,B.zx&&(t.className+=" mac"),t}var Kc=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Jc=function(e){function t(t,n,i,o){var r=e.call(this,t)||this,s=r._context.configuration.editor.viewInfo.scrollbar,a={listenOnDomNode:i.domNode,className:"editor-scrollable "+xr(t.theme.type),useShadows:!1,lazyRender:!0,vertical:s.vertical,horizontal:s.horizontal,verticalHasArrows:s.verticalHasArrows,horizontalHasArrows:s.horizontalHasArrows,verticalScrollbarSize:s.verticalScrollbarSize,verticalSliderSize:s.verticalSliderSize,horizontalScrollbarSize:s.horizontalScrollbarSize,horizontalSliderSize:s.horizontalSliderSize,handleMouseWheel:s.handleMouseWheel,arrowSize:s.arrowSize,mouseWheelScrollSensitivity:s.mouseWheelScrollSensitivity};r.scrollbar=r._register(new Gc(n.domNode,a,r._context.viewLayout.scrollable)),Yr.write(r.scrollbar.getDomNode(),5),r.scrollbarDomNode=Ar(r.scrollbar.getDomNode()),r.scrollbarDomNode.setPosition("absolute"),r._setLayout();var u=function(e,t,n){var i={};if(t){var o=e.scrollTop;o&&(i.scrollTop=r._context.viewLayout.getCurrentScrollTop()+o,e.scrollTop=0)}if(n){var s=e.scrollLeft;s&&(i.scrollLeft=r._context.viewLayout.getCurrentScrollLeft()+s,e.scrollLeft=0)}r._context.viewLayout.setScrollPositionNow(i)};return r._register(cn(i.domNode,"scroll",(function(e){return u(i.domNode,!0,!0)}))),r._register(cn(n.domNode,"scroll",(function(e){return u(n.domNode,!0,!1)}))),r._register(cn(o.domNode,"scroll",(function(e){return u(o.domNode,!0,!1)}))),r._register(cn(r.scrollbarDomNode.domNode,"scroll",(function(e){return u(r.scrollbarDomNode.domNode,!0,!1)}))),r}return Kc(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this)},t.prototype._setLayout=function(){var e=this._context.configuration.editor.layoutInfo;this.scrollbarDomNode.setLeft(e.contentLeft),"right"===this._context.configuration.editor.viewInfo.minimap.side?this.scrollbarDomNode.setWidth(e.contentWidth+e.minimapWidth):this.scrollbarDomNode.setWidth(e.contentWidth),this.scrollbarDomNode.setHeight(e.contentHeight)},t.prototype.getOverviewRulerLayoutInfo=function(){return this.scrollbar.getOverviewRulerLayoutInfo()},t.prototype.getDomNode=function(){return this.scrollbarDomNode},t.prototype.delegateVerticalScrollbarMouseDown=function(e){this.scrollbar.delegateVerticalScrollbarMouseDown(e)},t.prototype.onConfigurationChanged=function(e){if(e.viewInfo){var t=this._context.configuration.editor,n={handleMouseWheel:t.viewInfo.scrollbar.handleMouseWheel,mouseWheelScrollSensitivity:t.viewInfo.scrollbar.mouseWheelScrollSensitivity};this.scrollbar.updateOptions(n)}return e.layoutInfo&&this._setLayout(),!0},t.prototype.onScrollChanged=function(e){return!0},t.prototype.onThemeChanged=function(e){return this.scrollbar.updateClassName("editor-scrollable "+xr(this._context.theme.type)),!0},t.prototype.prepareRender=function(e){},t.prototype.render=function(e){this.scrollbar.renderNow()},t}(Ur);function Xc(e){for(var t=new Uint8ClampedArray(e.length),n=0,i=e.length;n=s)return new e(a,u,y,b,c,_=1,s);var _=Math.max(1,Math.floor(n-b*d/f));return l&&l.scrollHeight===u&&(l.scrollTop>a&&(_=Math.min(_,l.startLineNumber)),l.scrollTop140)n._context.viewLayout.setScrollPositionNow({scrollTop:o.scrollTop});else{var s=e.posy-t;n._context.viewLayout.setScrollPositionNow({scrollTop:o.getDesiredScrollTopFromDelta(s)})}}),(function(){n._slider.toggleClassName("active",!1)}))}})),n}return ih(t,e),t.prototype.dispose=function(){this._mouseDownListener.dispose(),this._sliderMouseMoveMonitor.dispose(),this._sliderMouseDownListener.dispose(),e.prototype.dispose.call(this)},t.prototype._getMinimapDomNodeClassName=function(){return"always"===this._options.showSlider?"minimap slider-always":"minimap slider-mouseover"},t.prototype.getDomNode=function(){return this._domNode},t.prototype._applyLayout=function(){this._domNode.setLeft(this._options.minimapLeft),this._domNode.setWidth(this._options.minimapWidth),this._domNode.setHeight(this._options.minimapHeight),this._shadow.setHeight(this._options.minimapHeight),this._canvas.setWidth(this._options.canvasOuterWidth),this._canvas.setHeight(this._options.canvasOuterHeight),this._canvas.domNode.width=this._options.canvasInnerWidth,this._canvas.domNode.height=this._options.canvasInnerHeight,this._slider.setWidth(this._options.minimapWidth)},t.prototype._getBuffer=function(){return this._buffers||(this._buffers=new ch(this._canvas.domNode.getContext("2d"),this._options.canvasInnerWidth,this._options.canvasInnerHeight,this._tokensColorTracker.getColor(2))),this._buffers.getBuffer()},t.prototype._onOptionsMaybeChanged=function(){var e=new sh(this._context.configuration);return!this._options.equals(e)&&(this._options=e,this._lastRenderData=null,this._buffers=null,this._applyLayout(),this._domNode.setClassName(this._getMinimapDomNodeClassName()),!0)},t.prototype.onConfigurationChanged=function(e){return this._onOptionsMaybeChanged()},t.prototype.onFlushed=function(e){return this._lastRenderData=null,!0},t.prototype.onLinesChanged=function(e){return!!this._lastRenderData&&this._lastRenderData.onLinesChanged(e)},t.prototype.onLinesDeleted=function(e){return this._lastRenderData&&this._lastRenderData.onLinesDeleted(e),!0},t.prototype.onLinesInserted=function(e){return this._lastRenderData&&this._lastRenderData.onLinesInserted(e),!0},t.prototype.onScrollChanged=function(e){return!0},t.prototype.onTokensChanged=function(e){return!!this._lastRenderData&&this._lastRenderData.onTokensChanged(e)},t.prototype.onTokensColorsChanged=function(e){return this._lastRenderData=null,this._buffers=null,!0},t.prototype.onZonesChanged=function(e){return this._lastRenderData=null,!0},t.prototype.prepareRender=function(e){},t.prototype.render=function(e){if(0===this._options.renderMinimap)return this._shadow.setClassName("minimap-shadow-hidden"),this._sliderHorizontal.setWidth(0),void this._sliderHorizontal.setHeight(0);e.scrollLeft+e.viewportWidth>=e.scrollWidth?this._shadow.setClassName("minimap-shadow-hidden"):this._shadow.setClassName("minimap-shadow-visible");var t=ah.create(this._options,e.visibleRange.startLineNumber,e.visibleRange.endLineNumber,e.viewportHeight,e.viewportData.whitespaceViewportData.length>0,this._context.model.getLineCount(),e.scrollTop,e.scrollHeight,this._lastRenderData?this._lastRenderData.renderedLayout:null);this._slider.setTop(t.sliderTop),this._slider.setHeight(t.sliderHeight);var n=e.scrollLeft/this._options.typicalHalfwidthCharacterWidth,i=Math.min(this._options.minimapWidth,Math.round(n*rh(this._options.renderMinimap)/this._options.pixelRatio));this._sliderHorizontal.setLeft(i),this._sliderHorizontal.setWidth(this._options.minimapWidth-i),this._sliderHorizontal.setTop(0),this._sliderHorizontal.setHeight(t.sliderHeight),this._lastRenderData=this.renderLines(t)},t.prototype.renderLines=function(e){var n=this._options.renderMinimap,i=e.startLineNumber,o=e.endLineNumber,r=oh(n);if(this._lastRenderData&&this._lastRenderData.linesEquals(e)){var s=this._lastRenderData._get();return new lh(e,s.imageData,s.lines)}for(var a=this._getBuffer(),u=t._renderUntouchedLines(a,i,o,r,this._lastRenderData),l=u[0],c=u[1],h=u[2],d=this._context.model.getMinimapLinesRenderingData(i,o,h),f=d.tabSize,p=this._tokensColorTracker.getColor(2),g=this._tokensColorTracker.backgroundIsLight(),m=0,v=[],y=0,b=o-i+1;y=0&&Ld)return;var M=l.charCodeAt(g);if(9===M){var C=a-(g+m)%a;m+=C-1,f+=C*h}else if(32===M)f+=h;else for(var S=p.isFullWidthCharacter(M)?2:1,L=0;Ld)return}},t}(Ur);Tr((function(e,t){var n=e.getColor(Ts);if(n){var i=n.transparent(.5);t.addRule(".monaco-editor .minimap-slider, .monaco-editor .minimap-slider .minimap-slider-horizontal { background: "+i+"; }")}var o=e.getColor(Es);if(o){var r=o.transparent(.5);t.addRule(".monaco-editor .minimap-slider:hover, .monaco-editor .minimap-slider:hover .minimap-slider-horizontal { background: "+r+"; }")}var s=e.getColor(As);if(s){var a=s.transparent(.5);t.addRule(".monaco-editor .minimap-slider.active, .monaco-editor .minimap-slider.active .minimap-slider-horizontal { background: "+a+"; }")}var u=e.getColor(ks);u&&t.addRule(".monaco-editor .minimap-shadow-visible { box-shadow: "+u+" -6px 0 6px -6px inset; }")}));var dh=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),fh=function(e){function t(t,n,i,o,r,s){var a=e.call(this)||this;a._cursor=r,a._renderAnimationFrame=null,a.outgoingEvents=new Ic(o);var u=new ml(n,o,s,a.outgoingEvents,t);return a.eventDispatcher=new vl((function(e){return a._renderOnce(e)})),a.eventDispatcher.addEventHandler(a),a._context=new Sc(n,i.getTheme(),o,a.eventDispatcher),a._register(i.onThemeChange((function(e){a._context.theme=e,a.eventDispatcher.emit(new go),a.render(!0,!1)}))),a.viewParts=[],a._textAreaHandler=new eu(a._context,u,a.createTextAreaHandlerHelper()),a.viewParts.push(a._textAreaHandler),a.createViewParts(),a._setLayout(),a.pointerHandler=new gl(a._context,u,a.createPointerHandlerHelper()),a._register(o.addEventListener((function(e){a.eventDispatcher.emitMany(e)}))),a._register(a._cursor.addEventListener((function(e){a.eventDispatcher.emitMany(e)}))),a}return dh(t,e),t.prototype.createViewParts=function(){this.linesContent=Ar(document.createElement("div")),this.linesContent.setClassName("lines-content monaco-editor-background"),this.linesContent.setPosition("absolute"),this.domNode=Ar(document.createElement("div")),this.domNode.setClassName(this.getEditorClassName()),this.overflowGuardContainer=Ar(document.createElement("div")),Yr.write(this.overflowGuardContainer,3),this.overflowGuardContainer.setClassName("overflow-guard"),this._scrollbar=new Jc(this._context,this.linesContent,this.domNode,this.overflowGuardContainer),this.viewParts.push(this._scrollbar),this.viewLines=new Yl(this._context,this.linesContent),this.viewZones=new Cc(this._context),this.viewParts.push(this.viewZones);var e=new ec(this._context);this.viewParts.push(e);var t=new lc(this._context);this.viewParts.push(t);var n=new Sl(this._context);this.viewParts.push(n),n.addDynamicOverlay(new Tl(this._context)),n.addDynamicOverlay(new mc(this._context)),n.addDynamicOverlay(new Bl(this._context)),n.addDynamicOverlay(new Ol(this._context));var i=new Ll(this._context);this.viewParts.push(i),i.addDynamicOverlay(new Al(this._context)),i.addDynamicOverlay(new Wl(this._context)),i.addDynamicOverlay(new ql(this._context)),i.addDynamicOverlay(new Gl(this._context)),i.addDynamicOverlay(new qa(this._context));var o=new Gr(this._context);o.getDomNode().appendChild(this.viewZones.marginDomNode),o.getDomNode().appendChild(i.getDomNode()),this.viewParts.push(o),this.contentWidgets=new xl(this._context,this.domNode),this.viewParts.push(this.contentWidgets),this.viewCursors=new wc(this._context),this.viewParts.push(this.viewCursors),this.overlayWidgets=new Jl(this._context),this.viewParts.push(this.overlayWidgets);var r=new ac(this._context);this.viewParts.push(r);var s=new hh(this._context);if(this.viewParts.push(s),e){var a=this._scrollbar.getOverviewRulerLayoutInfo();a.parent.insertBefore(e.getDomNode(),a.insertBefore)}this.linesContent.appendChild(n.getDomNode()),this.linesContent.appendChild(r.domNode),this.linesContent.appendChild(this.viewZones.domNode),this.linesContent.appendChild(this.viewLines.getDomNode()),this.linesContent.appendChild(this.contentWidgets.domNode),this.linesContent.appendChild(this.viewCursors.getDomNode()),this.overflowGuardContainer.appendChild(o.getDomNode()),this.overflowGuardContainer.appendChild(this._scrollbar.getDomNode()),this.overflowGuardContainer.appendChild(t.getDomNode()),this.overflowGuardContainer.appendChild(this._textAreaHandler.textArea),this.overflowGuardContainer.appendChild(this._textAreaHandler.textAreaCover),this.overflowGuardContainer.appendChild(this.overlayWidgets.getDomNode()),this.overflowGuardContainer.appendChild(s.getDomNode()),this.domNode.appendChild(this.overflowGuardContainer),this.domNode.appendChild(this.contentWidgets.overflowingContentWidgetsDomNode)},t.prototype._flushAccumulatedAndRenderNow=function(){this._renderNow()},t.prototype.createPointerHandlerHelper=function(){var e=this;return{viewDomNode:this.domNode.domNode,linesContentDomNode:this.linesContent.domNode,focusTextArea:function(){e.focus()},getLastViewCursorsRenderData:function(){return e.viewCursors.getLastRenderData()||[]},shouldSuppressMouseDownOnViewZone:function(t){return e.viewZones.shouldSuppressMouseDownOnViewZone(t)},shouldSuppressMouseDownOnWidget:function(t){return e.contentWidgets.shouldSuppressMouseDownOnWidget(t)},getPositionFromDOMInfo:function(t,n){return e._flushAccumulatedAndRenderNow(),e.viewLines.getPositionFromDOMInfo(t,n)},visibleRangeForPosition2:function(t,n){e._flushAccumulatedAndRenderNow();var i=e.viewLines.visibleRangesForRange2(new s.Q(t,n,t,n));return i?i[0]:null},getLineWidth:function(t){return e._flushAccumulatedAndRenderNow(),e.viewLines.getLineWidth(t)}}},t.prototype.createTextAreaHandlerHelper=function(){var e=this;return{visibleRangeForPositionRelativeToEditor:function(t,n){e._flushAccumulatedAndRenderNow();var i=e.viewLines.visibleRangesForRange2(new s.Q(t,n,t,n));return i?i[0]:null}}},t.prototype._setLayout=function(){var e=this._context.configuration.editor.layoutInfo;this.domNode.setWidth(e.width),this.domNode.setHeight(e.height),this.overflowGuardContainer.setWidth(e.width),this.overflowGuardContainer.setHeight(e.height),this.linesContent.setWidth(1e6),this.linesContent.setHeight(1e6)},t.prototype.getEditorClassName=function(){var e=this._textAreaHandler.isFocused()?" focused":"";return this._context.configuration.editor.editorClassName+" "+xr(this._context.theme.type)+e},t.prototype.onConfigurationChanged=function(e){return e.editorClassName&&this.domNode.setClassName(this.getEditorClassName()),e.layoutInfo&&this._setLayout(),!1},t.prototype.onFocusChanged=function(e){return this.domNode.setClassName(this.getEditorClassName()),this._context.model.setHasFocus(e.isFocused),e.isFocused?this.outgoingEvents.emitViewFocusGained():this.outgoingEvents.emitViewFocusLost(),!1},t.prototype.onScrollChanged=function(e){return this.outgoingEvents.emitScrollChanged(e),!1},t.prototype.onThemeChanged=function(e){return this.domNode.setClassName(this.getEditorClassName()),!1},t.prototype.dispose=function(){null!==this._renderAnimationFrame&&(this._renderAnimationFrame.dispose(),this._renderAnimationFrame=null),this.eventDispatcher.removeEventHandler(this),this.outgoingEvents.dispose(),this.pointerHandler.dispose(),this.viewLines.dispose();for(var t=0,n=this.viewParts.length;t=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([vh(3,N._Y),vh(4,Ce),vh(5,D),vh(6,he),vh(7,Lr),vh(8,Cr)],t)}(I.jG),wh=function(e){function t(){var t=e.call(this)||this;return t._onDidChangeToTrue=t._register(new X.vl),t.onDidChangeToTrue=t._onDidChangeToTrue.event,t._onDidChangeToFalse=t._register(new X.vl),t.onDidChangeToFalse=t._onDidChangeToFalse.event,t._value=0,t}return mh(t,e),t.prototype.setValue=function(e){var t=e?2:1;this._value!==t&&(this._value=t,2===this._value?this._onDidChangeToTrue.fire():1===this._value&&this._onDidChangeToFalse.fire())},t}(I.jG),Mh=function(e){function t(t,n){var i=e.call(this)||this;return i._editor=t,n.createKey("editorId",t.getId()),i._editorFocus=Oe.focus.bindTo(n),i._textInputFocus=Oe.textInputFocus.bindTo(n),i._editorTextFocus=Oe.editorTextFocus.bindTo(n),i._editorTabMovesFocus=Oe.tabMovesFocus.bindTo(n),i._editorReadonly=Oe.readOnly.bindTo(n),i._hasMultipleSelections=Oe.hasMultipleSelections.bindTo(n),i._hasNonEmptySelection=Oe.hasNonEmptySelection.bindTo(n),i._canUndo=Oe.canUndo.bindTo(n),i._canRedo=Oe.canRedo.bindTo(n),i._register(i._editor.onDidChangeConfiguration((function(){return i._updateFromConfig()}))),i._register(i._editor.onDidChangeCursorSelection((function(){return i._updateFromSelection()}))),i._register(i._editor.onDidFocusEditorWidget((function(){return i._updateFromFocus()}))),i._register(i._editor.onDidBlurEditorWidget((function(){return i._updateFromFocus()}))),i._register(i._editor.onDidFocusEditorText((function(){return i._updateFromFocus()}))),i._register(i._editor.onDidBlurEditorText((function(){return i._updateFromFocus()}))),i._register(i._editor.onDidChangeModel((function(){return i._updateFromModel()}))),i._register(i._editor.onDidChangeConfiguration((function(){return i._updateFromModel()}))),i._updateFromConfig(),i._updateFromSelection(),i._updateFromFocus(),i._updateFromModel(),i}return mh(t,e),t.prototype._updateFromConfig=function(){var e=this._editor.getConfiguration();this._editorTabMovesFocus.set(e.tabFocusMode),this._editorReadonly.set(e.readOnly)},t.prototype._updateFromSelection=function(){var e=this._editor.getSelections();e?(this._hasMultipleSelections.set(e.length>1),this._hasNonEmptySelection.set(e.some((function(e){return!e.isEmpty()})))):(this._hasMultipleSelections.reset(),this._hasNonEmptySelection.reset())},t.prototype._updateFromFocus=function(){this._editorFocus.set(this._editor.hasWidgetFocus()&&!this._editor.isSimpleWidget),this._editorTextFocus.set(this._editor.hasTextFocus()&&!this._editor.isSimpleWidget),this._textInputFocus.set(this._editor.hasTextFocus())},t.prototype._updateFromModel=function(){var e=this._editor.getModel();this._canUndo.set(e&&e.canUndo()),this._canRedo.set(e&&e.canRedo())},t}(I.jG),Ch=function(e){function t(t,n){var i=e.call(this)||this;i._editor=t,i._langId=Oe.languageId.bindTo(n),i._hasCompletionItemProvider=Oe.hasCompletionItemProvider.bindTo(n),i._hasCodeActionsProvider=Oe.hasCodeActionsProvider.bindTo(n),i._hasCodeLensProvider=Oe.hasCodeLensProvider.bindTo(n),i._hasDefinitionProvider=Oe.hasDefinitionProvider.bindTo(n),i._hasImplementationProvider=Oe.hasImplementationProvider.bindTo(n),i._hasTypeDefinitionProvider=Oe.hasTypeDefinitionProvider.bindTo(n),i._hasHoverProvider=Oe.hasHoverProvider.bindTo(n),i._hasDocumentHighlightProvider=Oe.hasDocumentHighlightProvider.bindTo(n),i._hasDocumentSymbolProvider=Oe.hasDocumentSymbolProvider.bindTo(n),i._hasReferenceProvider=Oe.hasReferenceProvider.bindTo(n),i._hasRenameProvider=Oe.hasRenameProvider.bindTo(n),i._hasDocumentFormattingProvider=Oe.hasDocumentFormattingProvider.bindTo(n),i._hasDocumentSelectionFormattingProvider=Oe.hasDocumentSelectionFormattingProvider.bindTo(n),i._hasSignatureHelpProvider=Oe.hasSignatureHelpProvider.bindTo(n),i._isInWalkThrough=Oe.isInEmbeddedEditor.bindTo(n);var o=function(){return i._update()};return i._register(t.onDidChangeModel(o)),i._register(t.onDidChangeModelLanguage(o)),i._register(No.er.onDidChange(o)),i._register(No.iM.onDidChange(o)),i._register(No.qh.onDidChange(o)),i._register(No.UU.onDidChange(o)),i._register(No.Lh.onDidChange(o)),i._register(No.ce.onDidChange(o)),i._register(No.r8.onDidChange(o)),i._register(No.UG.onDidChange(o)),i._register(No.Wd.onDidChange(o)),i._register(No.aW.onDidChange(o)),i._register(No.rN.onDidChange(o)),i._register(No.NQ.onDidChange(o)),i._register(No.CW.onDidChange(o)),i._register(No.An.onDidChange(o)),o(),i}return mh(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this)},t.prototype.reset=function(){this._langId.reset(),this._hasCompletionItemProvider.reset(),this._hasCodeActionsProvider.reset(),this._hasCodeLensProvider.reset(),this._hasDefinitionProvider.reset(),this._hasImplementationProvider.reset(),this._hasTypeDefinitionProvider.reset(),this._hasHoverProvider.reset(),this._hasDocumentHighlightProvider.reset(),this._hasDocumentSymbolProvider.reset(),this._hasReferenceProvider.reset(),this._hasRenameProvider.reset(),this._hasDocumentFormattingProvider.reset(),this._hasDocumentSelectionFormattingProvider.reset(),this._hasSignatureHelpProvider.reset(),this._isInWalkThrough.reset()},t.prototype._update=function(){var e=this._editor.getModel();e?(this._langId.set(e.getLanguageIdentifier().language),this._hasCompletionItemProvider.set(No.er.has(e)),this._hasCodeActionsProvider.set(No.iM.has(e)),this._hasCodeLensProvider.set(No.qh.has(e)),this._hasDefinitionProvider.set(No.UU.has(e)),this._hasImplementationProvider.set(No.Lh.has(e)),this._hasTypeDefinitionProvider.set(No.ce.has(e)),this._hasHoverProvider.set(No.r8.has(e)),this._hasDocumentHighlightProvider.set(No.UG.has(e)),this._hasDocumentSymbolProvider.set(No.Wd.has(e)),this._hasReferenceProvider.set(No.aW.has(e)),this._hasRenameProvider.set(No.rN.has(e)),this._hasSignatureHelpProvider.set(No.An.has(e)),this._hasDocumentFormattingProvider.set(No.NQ.has(e)||No.CW.has(e)),this._hasDocumentSelectionFormattingProvider.set(No.CW.has(e)),this._isInWalkThrough.set(e.uri.scheme===rr.walkThroughSnippet)):this.reset()},t}(I.jG),Sh=function(e){function t(t){var n=e.call(this)||this;return n._onChange=n._register(new X.vl),n.onChange=n._onChange.event,n._hasFocus=!1,n._domFocusTracker=n._register(Gn(t)),n._register(n._domFocusTracker.onDidFocus((function(){n._hasFocus=!0,n._onChange.fire(void 0)}))),n._register(n._domFocusTracker.onDidBlur((function(){n._hasFocus=!1,n._onChange.fire(void 0)}))),n}return mh(t,e),t.prototype.hasFocus=function(){return this._hasFocus},t}(I.jG),Lh=encodeURIComponent("");function Nh(e){return Lh+encodeURIComponent(e.toString())+Ih}var xh,Dh,kh=encodeURIComponent('');Tr((function(e,t){var n=e.getColor(ja);n&&t.addRule(".monaco-editor .squiggly-error { border-bottom: 4px double "+n+"; }");var i=e.getColor(Aa);i&&t.addRule('.monaco-editor .squiggly-error { background: url("data:image/svg+xml,'+Nh(i)+'") repeat-x bottom left; }');var o=e.getColor(Ra);o&&t.addRule(".monaco-editor .squiggly-warning { border-bottom: 4px double "+o+"; }");var r=e.getColor(Oa);r&&t.addRule('.monaco-editor .squiggly-warning { background: url("data:image/svg+xml,'+Nh(r)+'") repeat-x bottom left; }');var s=e.getColor(za);s&&t.addRule(".monaco-editor .squiggly-info { border-bottom: 4px double "+s+"; }");var a=e.getColor(Pa);a&&t.addRule('.monaco-editor .squiggly-info { background: url("data:image/svg+xml,'+Nh(a)+'") repeat-x bottom left; }');var u=e.getColor(Fa);u&&t.addRule(".monaco-editor .squiggly-hint { border-bottom: 2px dotted "+u+"; }");var l=e.getColor(Wa);l&&t.addRule('.monaco-editor .squiggly-hint { background: url("data:image/svg+xml,'+(kh+encodeURIComponent(l.toString())+Th)+'") no-repeat bottom left; }');var c=e.getColor(Ha);c&&t.addRule("."+bh+" .monaco-editor .squiggly-inline-unnecessary { opacity: "+c.rgba.a+"; will-change: opacity; }");var h=e.getColor(Ba);h&&t.addRule("."+bh+" .monaco-editor .squiggly-unnecessary { border-bottom: 2px dashed "+h+"; }")})),n(5549),n(7297),function(e){e[e.VERTICAL=0]="VERTICAL",e[e.HORIZONTAL=1]="HORIZONTAL"}(xh||(xh={})),function(e){e[e.Disabled=0]="Disabled",e[e.Minimum=1]="Minimum",e[e.Maximum=2]="Maximum",e[e.Enabled=3]="Enabled"}(Dh||(Dh={}));var Eh=function(){function e(e,t,n){void 0===n&&(n={}),this.disposables=[],this._state=Dh.Enabled,this._onDidEnablementChange=new X.vl,this.onDidEnablementChange=this._onDidEnablementChange.event,this._onDidStart=new X.vl,this.onDidStart=this._onDidStart.event,this._onDidChange=new X.vl,this.onDidChange=this._onDidChange.event,this._onDidReset=new X.vl,this.onDidReset=this._onDidReset.event,this._onDidEnd=new X.vl,this.onDidEnd=this._onDidEnd.event,this.linkedSash=void 0,this.orthogonalStartSashDisposables=[],this.orthogonalEndSashDisposables=[],this.el=Qn(e,Jn(".monaco-sash")),B.zx&&sn(this.el,"mac"),Jt(this.el,"mousedown")(this.onMouseDown,this,this.disposables),Jt(this.el,"dblclick")(this.onMouseDoubleClick,this,this.disposables),au.addTarget(this.el),Jt(this.el,iu.Start)(this.onTouchStart,this,this.disposables),Ot&&sn(this.el,"touch"),this.setOrientation(n.orientation||xh.VERTICAL),this.hidden=!1,this.layoutProvider=t,this.orthogonalStartSash=n.orthogonalStartSash,this.orthogonalEndSash=n.orthogonalEndSash,un(this.el,"debug",!1)}return Object.defineProperty(e.prototype,"state",{get:function(){return this._state},set:function(e){this._state!==e&&(un(this.el,"disabled",e===Dh.Disabled),un(this.el,"minimum",e===Dh.Minimum),un(this.el,"maximum",e===Dh.Maximum),this._state=e,this._onDidEnablementChange.fire(e))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"orthogonalStartSash",{get:function(){return this._orthogonalStartSash},set:function(e){this.orthogonalStartSashDisposables=(0,I.AS)(this.orthogonalStartSashDisposables),e?(e.onDidEnablementChange(this.onOrthogonalStartSashEnablementChange,this,this.orthogonalStartSashDisposables),this.onOrthogonalStartSashEnablementChange(e.state)):this.onOrthogonalStartSashEnablementChange(Dh.Disabled),this._orthogonalStartSash=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"orthogonalEndSash",{get:function(){return this._orthogonalEndSash},set:function(e){this.orthogonalEndSashDisposables=(0,I.AS)(this.orthogonalEndSashDisposables),e?(e.onDidEnablementChange(this.onOrthogonalEndSashEnablementChange,this,this.orthogonalEndSashDisposables),this.onOrthogonalEndSashEnablementChange(e.state)):this.onOrthogonalEndSashEnablementChange(Dh.Disabled),this._orthogonalEndSash=e},enumerable:!0,configurable:!0}),e.prototype.setOrientation=function(e){this.orientation=e,this.orientation===xh.HORIZONTAL?(sn(this.el,"horizontal"),an(this.el,"vertical")):(an(this.el,"horizontal"),sn(this.el,"vertical")),this.layoutProvider&&this.layout()},e.prototype.onMouseDown=function(e){var t=this;Yn(e,!1);var n=!1;if(this.linkedSash&&!e.__linkedSashEvent&&(e.__linkedSashEvent=!0,this.linkedSash.onMouseDown(e)),!e.__orthogonalSashEvent){var i=void 0;this.orientation===xh.VERTICAL?e.offsetY<=4?i=this.orthogonalStartSash:e.offsetY>=this.el.clientHeight-4&&(i=this.orthogonalEndSash):e.offsetX<=4?i=this.orthogonalStartSash:e.offsetX>=this.el.clientWidth-4&&(i=this.orthogonalEndSash),i&&(n=!0,e.__orthogonalSashEvent=!0,i.onMouseDown(e))}if(this.state){for(var o=0,r=ti("iframe");o=0){var n=e.split("-");e=n[0];for(var i=1;i=0){var t=e.split("-");e=t[0];for(var n=1;n=n.actionsList.children.length?(n.actionsList.appendChild(i),n.items.push(r)):(n.actionsList.insertBefore(i,n.actionsList.children[o]),n.items.splice(o,0,r),o++)}))},e.prototype.clear=function(){this.items=I.AS(this.items),Zh(this.actionsList).empty()},e.prototype.isEmpty=function(){return 0===this.items.length},e.prototype.focus=function(e){e&&void 0===this.focusedItem?(this.focusedItem=this.items.length-1,this.focusNext()):this.updateFocus()},e.prototype.focusNext=function(){void 0===this.focusedItem&&(this.focusedItem=this.items.length-1);var e,t=this.focusedItem;do{this.focusedItem=(this.focusedItem+1)%this.items.length,e=this.items[this.focusedItem]}while(this.focusedItem!==t&&!e.isEnabled());this.focusedItem!==t||e.isEnabled()||(this.focusedItem=void 0),this.updateFocus()},e.prototype.focusPrevious=function(){void 0===this.focusedItem&&(this.focusedItem=0);var e,t=this.focusedItem;do{this.focusedItem=this.focusedItem-1,this.focusedItem<0&&(this.focusedItem=this.items.length-1),e=this.items[this.focusedItem]}while(this.focusedItem!==t&&!e.isEnabled());this.focusedItem!==t||e.isEnabled()||(this.focusedItem=void 0),this.updateFocus(!0)},e.prototype.updateFocus=function(e){void 0===this.focusedItem&&this.domNode.focus();for(var t=0;t0){var y=e[r-1];m=0===y.originalEndLineNumber?y.originalStartLineNumber+1:y.originalEndLineNumber+1,v=0===y.modifiedEndLineNumber?y.modifiedStartLineNumber+1:y.modifiedEndLineNumber+1}var b=p-3+1,_=g-3+1;bC&&(N+=I=C-N,x+=I),x>S&&(N+=I=S-x,x+=I),d[f++]=new ed(w,N,M,x),i[o++]=new td(d)}var D=i[0].entries,k=[],T=0;for(r=1,s=i.length;rf)&&(f=b),0!==_&&(0===p||_g)&&(g=w)}var M=document.createElement("div");M.className="diff-review-row";var C=document.createElement("div");C.className="diff-review-cell diff-review-summary";var S=f-d+1,L=g-p+1;C.appendChild(document.createTextNode(l+1+"/"+this._diffs.length+": @@ -"+d+","+S+" +"+p+","+L+" @@")),M.setAttribute("data-line",String(p));var I=function(e){return 0===e?o.k("no_lines","no lines"):1===e?o.k("one_line","1 line"):o.k("more_lines","{0} lines",e)},N=I(S),x=I(L);M.setAttribute("aria-label",o.k({key:"header",comment:["This is the ARIA label for a git diff header.","A git diff header looks like this: @@ -154,12 +159,39 @@.","That encodes that at original line 154 (which is now line 159), 12 lines were removed/changed with 39 lines.","Variables 0 and 1 refer to the diff index out of total number of diffs.","Variables 2 and 4 will be numbers (a line number).",'Variables 3 and 5 will be "no lines", "1 line" or "X lines", localized separately.']},"Difference {0} of {1}: original {2}, {3}, modified {4}, {5}",l+1,this._diffs.length,d,N,p,x)),M.appendChild(C),M.setAttribute("role","listitem"),h.appendChild(M);var D=p;for(m=0,v=c.length;m0){n=o[0].getStartPosition();var r=t.getTopForPosition(n.lineNumber,n.column);i=t.getScrollTop()-r}}return new e(n,i)},e.prototype.restore=function(e){if(this._visiblePosition){var t=e.getTopForPosition(this._visiblePosition.lineNumber,this._visiblePosition.column);e.setScrollTop(t+this._visiblePositionScrollDelta)}},e}(),ud=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),ld=function(e,t){return function(n,i){t(n,i,e)}},cd=function(){function e(){this._zones=[],this._zonesMap={},this._decorations=[]}return e.prototype.getForeignViewZones=function(e){var t=this;return e.filter((function(e){return!t._zonesMap[String(e.id)]}))},e.prototype.clean=function(e){var t=this;this._zones.length>0&&e.changeViewZones((function(e){for(var n=0,i=t._zones.length;n0?o/n:0;return{height:Math.max(0,Math.floor(e.contentHeight*r)),top:Math.floor(t*r)}},t.prototype._createDataSource=function(){var e=this;return{getWidth:function(){return e._width},getHeight:function(){return e._height-e._reviewHeight},getContainerDomNode:function(){return e._containerDomElement},relayoutEditors:function(){e._doLayout()},getOriginalEditor:function(){return e.originalEditor},getModifiedEditor:function(){return e.modifiedEditor}}},t.prototype._setStrategy=function(e){this._strategy&&this._strategy.dispose(),this._strategy=e,e.applyColors(this._themeService.getTheme()),this._lineChanges&&this._updateDecorations(),this._measureDomElement(!0)},t.prototype._getLineChangeAtOrBeforeLineNumber=function(e,t){if(0===this._lineChanges.length||e=s?n=o+1:(n=o,i=o)}return this._lineChanges[n]},t.prototype._getEquivalentLineForOriginalLineNumber=function(e){var t=this._getLineChangeAtOrBeforeLineNumber(e,(function(e){return e.originalStartLineNumber}));if(!t)return e;var n=t.originalStartLineNumber+(t.originalEndLineNumber>0?-1:0),i=t.modifiedStartLineNumber+(t.modifiedEndLineNumber>0?-1:0),o=t.originalEndLineNumber>0?t.originalEndLineNumber-t.originalStartLineNumber+1:0,r=t.modifiedEndLineNumber>0?t.modifiedEndLineNumber-t.modifiedStartLineNumber+1:0,s=e-n;return s<=o?i+Math.min(s,r):i+r-o+s},t.prototype._getEquivalentLineForModifiedLineNumber=function(e){var t=this._getLineChangeAtOrBeforeLineNumber(e,(function(e){return e.modifiedStartLineNumber}));if(!t)return e;var n=t.originalStartLineNumber+(t.originalEndLineNumber>0?-1:0),i=t.modifiedStartLineNumber+(t.modifiedEndLineNumber>0?-1:0),o=t.originalEndLineNumber>0?t.originalEndLineNumber-t.originalStartLineNumber+1:0,r=t.modifiedEndLineNumber>0?t.modifiedEndLineNumber-t.modifiedStartLineNumber+1:0,s=e-i;return s<=r?n+Math.min(s,o):n+o-r+s},t.prototype.getDiffLineInformationForOriginal=function(e){return this._lineChanges?{equivalentLineNumber:this._getEquivalentLineForOriginalLineNumber(e)}:null},t.prototype.getDiffLineInformationForModified=function(e){return this._lineChanges?{equivalentLineNumber:this._getEquivalentLineForModifiedLineNumber(e)}:null},t.ONE_OVERVIEW_WIDTH=15,t.ENTIRE_DIFF_OVERVIEW_WIDTH=30,t.UPDATE_DIFF_DECORATIONS_DELAY=200,t=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([ld(2,Ah),ld(3,he),ld(4,N._Y),ld(5,Ce),ld(6,Lr),ld(7,Cr)],t)}(I.jG),fd=function(e){function t(t){var n=e.call(this)||this;return n._dataSource=t,n}return ud(t,e),t.prototype.applyColors=function(e){var t=(e.getColor(ia)||ta).transparent(2),n=(e.getColor(oa)||na).transparent(2),i=!t.equals(this._insertColor)||!n.equals(this._removeColor);return this._insertColor=t,this._removeColor=n,i},t.prototype.getEditorsDiffDecorations=function(e,t,n,i,o,r,s){o=o.sort((function(e,t){return e.afterLineNumber-t.afterLineNumber})),i=i.sort((function(e,t){return e.afterLineNumber-t.afterLineNumber}));var a=this._getViewZones(e,i,o,r,s,n),u=this._getOriginalEditorDecorations(e,t,n,r,s),l=this._getModifiedEditorDecorations(e,t,n,r,s);return{original:{decorations:u.decorations,overviewZones:u.overviewZones,zones:a.original},modified:{decorations:l.decorations,overviewZones:l.overviewZones,zones:a.modified}}},t}(I.jG),pd=function(){function e(e){this._source=e,this._index=-1,this.advance()}return e.prototype.advance=function(){this._index++,this._index0){var n=e[e.length-1];if(n.afterLineNumber===t.afterLineNumber&&null===n.domNode)return void(n.heightInLines+=t.heightInLines)}e.push(t)},l=new pd(this.modifiedForeignVZ),c=new pd(this.originalForeignVZ),h=0,d=this.lineChanges.length;h<=d;h++){var f=h0?-1:0),o=f.modifiedStartLineNumber+(f.modifiedEndLineNumber>0?-1:0),n=f.originalEndLineNumber>0?f.originalEndLineNumber-f.originalStartLineNumber+1:0,t=f.modifiedEndLineNumber>0?f.modifiedEndLineNumber-f.modifiedStartLineNumber+1:0,r=Math.max(f.originalStartLineNumber,f.originalEndLineNumber),s=Math.max(f.modifiedStartLineNumber,f.modifiedEndLineNumber)):(r=i+=1e7+n,s=o+=1e7+t);for(var p,g=[],m=[];l.current&&l.current.afterLineNumber<=s;){var v=void 0;v=l.current.afterLineNumber<=o?i-o+l.current.afterLineNumber:r,g.push({afterLineNumber:v,heightInLines:l.current.heightInLines,domNode:null}),l.advance()}for(;c.current&&c.current.afterLineNumber<=r;)v=void 0,v=c.current.afterLineNumber<=i?o-i+c.current.afterLineNumber:s,m.push({afterLineNumber:v,heightInLines:c.current.heightInLines,domNode:null}),c.advance();null!==f&&Md(f)&&(p=this._produceOriginalFromDiff(f,n,t))&&g.push(p),null!==f&&Cd(f)&&(p=this._produceModifiedFromDiff(f,n,t))&&m.push(p);var y=0,b=0;for(g=g.sort(a),m=m.sort(a);y=w.heightInLines?(_.heightInLines-=w.heightInLines,b++):(w.heightInLines-=_.heightInLines,y++)}for(;y2*t.MINIMUM_EDITOR_WIDTH?(in-t.MINIMUM_EDITOR_WIDTH&&(i=n-t.MINIMUM_EDITOR_WIDTH)):i=o,this._sashPosition!==i&&(this._sashPosition=i,this._sash.layout()),this._sashPosition},t.prototype.onSashDragStart=function(){this._startSashPosition=this._sashPosition},t.prototype.onSashDrag=function(e){var t=this._dataSource.getWidth()-dd.ENTIRE_DIFF_OVERVIEW_WIDTH,n=this.layout((this._startSashPosition+(e.currentX-e.startX))/t);this._sashRatio=n/t,this._dataSource.relayoutEditors()},t.prototype.onSashDragEnd=function(){this._sash.layout()},t.prototype.onSashReset=function(){this._sashRatio=.5,this._dataSource.relayoutEditors(),this._sash.layout()},t.prototype.getVerticalSashTop=function(e){return 0},t.prototype.getVerticalSashLeft=function(e){return this._sashPosition},t.prototype.getVerticalSashHeight=function(e){return this._dataSource.getHeight()},t.prototype._getViewZones=function(e,t,n,i,o){return new bd(e,t,n).getViewZones()},t.prototype._getOriginalEditorDecorations=function(e,t,n,i,o){for(var r=this._removeColor.toString(),a={decorations:[],overviewZones:[]},u=i.getModel(),l=0,c=e.length;lt?{afterLineNumber:Math.max(e.originalStartLineNumber,e.originalEndLineNumber),heightInLines:n-t,domNode:null}:null},t.prototype._produceModifiedFromDiff=function(e,t,n){return t>n?{afterLineNumber:Math.max(e.modifiedStartLineNumber,e.modifiedEndLineNumber),heightInLines:t-n,domNode:null}:null},t}(gd),_d=function(e){function t(t,n){var i=e.call(this,t)||this;return i.decorationsLeft=t.getOriginalEditor().getLayoutInfo().decorationsLeft,i._register(t.getOriginalEditor().onDidLayoutChange((function(e){i.decorationsLeft!==e.decorationsLeft&&(i.decorationsLeft=e.decorationsLeft,t.relayoutEditors())}))),i}return ud(t,e),t.prototype.setEnableSplitViewResizing=function(e){},t.prototype._getViewZones=function(e,t,n,i,o,r){return new wd(e,t,n,i,o,r).getViewZones()},t.prototype._getOriginalEditorDecorations=function(e,t,n,i,o){for(var r=this._removeColor.toString(),a={decorations:[],overviewZones:[]},u=0,l=e.length;u'])}f+=this.modifiedEditorConfiguration.viewInfo.scrollBeyondLastColumn;var m=document.createElement("div");m.className="view-lines line-delete",m.innerHTML=u.build(),Ji.applyFontInfoSlow(m,this.modifiedEditorConfiguration.fontInfo);var v=document.createElement("div");return v.className="inline-deleted-margin-view-zone",v.innerHTML=l.join(""),Ji.applyFontInfoSlow(v,this.modifiedEditorConfiguration.fontInfo),{shouldNotShrink:!0,afterLineNumber:0===e.modifiedEndLineNumber?e.modifiedStartLineNumber:e.modifiedStartLineNumber-1,heightInLines:t,minWidthInPx:f*d,domNode:m,marginDomNode:v}},t.prototype._renderOriginalLine=function(e,t,n,i,o,r,s){var a=t.getLineTokens(o),u=a.getLineContent(),l=wu.filter(r,o,1,u.length+1);s.appendASCIIString('
');var c=jo.isBasicASCII(u,t.mightContainNonBasicASCII()),h=jo.containsRTL(u,c,t.mightContainRTL()),d=Tu(new xu(n.fontInfo.isMonospace&&!n.viewInfo.disableMonospaceOptimizations,u,!1,c,h,0,a,l,i,n.fontInfo.spaceWidth,n.viewInfo.stopRenderingLineAfter,n.viewInfo.renderWhitespace,n.viewInfo.renderControlCharacters,n.viewInfo.fontLigatures),s);s.appendASCIIString("
");var f=d.characterMapping.getAbsoluteOffsets();return f.length>0?f[f.length-1]:0},t}(gd);function Md(e){return e.modifiedEndLineNumber>0}function Cd(e){return e.originalEndLineNumber>0}Tr((function(e,t){var n=e.getColor(ia);n&&(t.addRule(".monaco-editor .line-insert, .monaco-editor .char-insert { background-color: "+n+"; }"),t.addRule(".monaco-diff-editor .line-insert, .monaco-diff-editor .char-insert { background-color: "+n+"; }"),t.addRule(".monaco-editor .inline-added-margin-view-zone { background-color: "+n+"; }"));var i=e.getColor(oa);i&&(t.addRule(".monaco-editor .line-delete, .monaco-editor .char-delete { background-color: "+i+"; }"),t.addRule(".monaco-diff-editor .line-delete, .monaco-diff-editor .char-delete { background-color: "+i+"; }"),t.addRule(".monaco-editor .inline-deleted-margin-view-zone { background-color: "+i+"; }"));var o=e.getColor(ra);o&&t.addRule(".monaco-editor .line-insert, .monaco-editor .char-insert { border: 1px "+("hc"===e.type?"dashed":"solid")+" "+o+"; }");var r=e.getColor(sa);r&&t.addRule(".monaco-editor .line-delete, .monaco-editor .char-delete { border: 1px "+("hc"===e.type?"dashed":"solid")+" "+r+"; }");var s=e.getColor(ks);s&&t.addRule(".monaco-diff-editor.side-by-side .editor.modified { box-shadow: -6px 0 5px -5px "+s+"; }");var a=e.getColor(aa);a&&t.addRule(".monaco-diff-editor.side-by-side .editor.modified { border-left: 1px solid "+a+"; }")}));var Sd={followsCaret:!0,ignoreCharChanges:!0,alwaysRevealFirst:!0},Ld=function(){function e(e,t){void 0===t&&(t={});var n=this;this._onDidUpdate=new X.vl,this._editor=e,this._options=ri.co(t,Sd,!1),this.disposed=!1,this._disposables=[],this.nextIdx=-1,this.ranges=[],this.ignoreSelectionChange=!1,this.revealFirst=this._options.alwaysRevealFirst,this._disposables.push(this._editor.onDidDispose((function(){return n.dispose()}))),this._disposables.push(this._editor.onDidUpdateDiff((function(){return n._onDiffUpdated()}))),this._options.followsCaret&&this._disposables.push(this._editor.getModifiedEditor().onDidChangeCursorPosition((function(e){n.ignoreSelectionChange||(n.nextIdx=-1)}))),this._options.alwaysRevealFirst&&this._disposables.push(this._editor.getModifiedEditor().onDidChangeModel((function(e){n.revealFirst=!0}))),this._init()}return e.prototype._init=function(){this._editor.getLineChanges()},e.prototype._onDiffUpdated=function(){this._init(),this._compute(this._editor.getLineChanges()),this.revealFirst&&null!==this._editor.getLineChanges()&&(this.revealFirst=!1,this.nextIdx=-1,this.next(1))},e.prototype._compute=function(e){var t=this;this.ranges=[],e&&e.forEach((function(e){!t._options.ignoreCharChanges&&e.charChanges?e.charChanges.forEach((function(e){t.ranges.push({rhs:!0,range:new s.Q(e.modifiedStartLineNumber,e.modifiedStartColumn,e.modifiedEndLineNumber,e.modifiedEndColumn)})})):t.ranges.push({rhs:!0,range:new s.Q(e.modifiedStartLineNumber,1,e.modifiedStartLineNumber,1)})})),this.ranges.sort((function(e,t){return e.range.getStartPosition().isBeforeOrEqual(t.range.getStartPosition())?-1:t.range.getStartPosition().isBeforeOrEqual(e.range.getStartPosition())?1:0})),this._onDidUpdate.fire(this)},e.prototype._initIdx=function(e){for(var t=!1,n=this._editor.getPosition(),i=0,o=this.ranges.length;i=this.ranges.length&&(this.nextIdx=0)):(this.nextIdx-=1,this.nextIdx<0&&(this.nextIdx=this.ranges.length-1));var n=this.ranges[this.nextIdx];this.ignoreSelectionChange=!0;try{var i=n.range.getStartPosition();this._editor.setPosition(i),this._editor.revealPositionInCenter(i,t)}finally{this.ignoreSelectionChange=!1}}},e.prototype.canNavigate=function(){return this.ranges&&this.ranges.length>0},e.prototype.next=function(e){void 0===e&&(e=0),this._move(!0,e)},e.prototype.previous=function(e){void 0===e&&(e=0),this._move(!1,e)},e.prototype.dispose=function(){(0,I.AS)(this._disposables),this._disposables.length=0,this._onDidUpdate.dispose(),this.ranges=null,this.disposed=!0},e}(),Id=(n(8165),function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}()),Nd=Kr("editorOverviewRuler.bracketMatchForeground",{dark:"#A0A0A0",light:"#A0A0A0",hc:"#A0A0A0"},o.k("overviewRulerBracketMatchForeground","Overview ruler marker color for matching brackets.")),xd=function(e){function t(){return e.call(this,{id:"editor.action.jumpToBracket",label:o.k("smartSelect.jumpBracket","Go to Bracket"),alias:"Go to Bracket",precondition:null,kbOpts:{kbExpr:Oe.editorTextFocus,primary:3160,weight:100}})||this}return Id(t,e),t.prototype.run=function(e,t){var n=Td.get(t);n&&n.jumpToBracket()},t}(xe),Dd=function(e){function t(){return e.call(this,{id:"editor.action.selectToBracket",label:o.k("smartSelect.selectToBracket","Select to Bracket"),alias:"Select to Bracket",precondition:null})||this}return Id(t,e),t.prototype.run=function(e,t){var n=Td.get(t);n&&n.selectToBracket()},t}(xe),kd=function(e,t){this.position=e,this.brackets=t},Td=function(e){function t(t){var n=e.call(this)||this;return n._editor=t,n._lastBracketsData=[],n._lastVersionId=0,n._decorations=[],n._updateBracketsSoon=n._register(new Ct((function(){return n._updateBrackets()}),50)),n._matchBrackets=n._editor.getConfiguration().contribInfo.matchBrackets,n._updateBracketsSoon.schedule(),n._register(t.onDidChangeCursorPosition((function(e){n._matchBrackets&&n._updateBracketsSoon.schedule()}))),n._register(t.onDidChangeModelContent((function(e){n._updateBracketsSoon.schedule()}))),n._register(t.onDidChangeModel((function(e){n._decorations=[],n._updateBracketsSoon.schedule()}))),n._register(t.onDidChangeModelLanguageConfiguration((function(e){n._lastBracketsData=[],n._updateBracketsSoon.schedule()}))),n._register(t.onDidChangeConfiguration((function(e){n._matchBrackets=n._editor.getConfiguration().contribInfo.matchBrackets,!n._matchBrackets&&n._decorations.length>0&&(n._decorations=n._editor.deltaDecorations(n._decorations,[])),n._updateBracketsSoon.schedule()}))),n}return Id(t,e),t.get=function(e){return e.getContribution(t.ID)},t.prototype.getId=function(){return t.ID},t.prototype.jumpToBracket=function(){var e=this._editor.getModel();if(e){var t=this._editor.getSelections().map((function(t){var n=t.getStartPosition(),i=e.matchBracket(n),o=null;if(i)i[0].containsPosition(n)?o=i[1].getStartPosition():i[1].containsPosition(n)&&(o=i[0].getStartPosition());else{var r=e.findNextBracket(n);r&&r.range&&(o=r.range.getStartPosition())}return o?new Be.L(o.lineNumber,o.column,o.lineNumber,o.column):new Be.L(n.lineNumber,n.column,n.lineNumber,n.column)}));this._editor.setSelections(t),this._editor.revealRange(t[0])}},t.prototype.selectToBracket=function(){var e=this._editor.getModel();if(e){var t=[];this._editor.getSelections().forEach((function(n){var i=n.getStartPosition(),o=e.matchBracket(i),r=null,s=null;if(!o){var a=e.findNextBracket(i);a&&a.range&&(o=e.matchBracket(a.range.getStartPosition()))}o&&(o[0].startLineNumber===o[1].startLineNumber?(r=o[1].startColumn0&&(this._editor.setSelections(t),this._editor.revealRange(t[0]))}},t.prototype._updateBrackets=function(){if(this._matchBrackets){this._recomputeBrackets();for(var e=[],n=0,i=0,o=this._lastBracketsData.length;i1&&o.sort(r.y.compare);var c=[],h=0,d=0,f=n.length;for(a=0,u=o.length;at.getLineMinColumn(i)?(0,p.isLowSurrogate)(t.getLineContent(i).charCodeAt(n-2))?n-=2:n-=1:i>1&&(i-=1,n=t.getLineMaxColumn(i)),new r.y(i,n)},t.prototype.positionRightOf=function(e,t){var n=e.column,i=e.lineNumber;return n0&&(t.pushUndoStop(),t.executeCommands(this.id,i),t.pushUndoStop())},t}(xe)),n(8401);var zd=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Wd="9_cutcopypaste",Fd=B.ib||document.queryCommandSupported("cut"),Bd=B.ib||document.queryCommandSupported("copy"),Hd=Bd&&!kt,Vd=B.ib||!At&&document.queryCommandSupported("paste"),Ud=function(e){function t(t,n){var i=e.call(this,n)||this;return i.browserCommand=t,i}return zd(t,e),t.prototype.runCommand=function(e,t){var n=e.get(Ce).getFocusedCodeEditor();n&&n.hasTextFocus()?n.trigger("keyboard",this.id,t):document.execCommand(this.browserCommand)},t.prototype.run=function(e,t){t.focus(),document.execCommand(this.browserCommand)},t}(xe),Yd=function(e){function t(){var t={kbExpr:Oe.textInputFocus,primary:2102,win:{primary:2102,secondary:[1044]},weight:100};return B.ib||(t=null),e.call(this,"cut",{id:"editor.action.clipboardCutAction",label:o.k("actions.clipboard.cutLabel","Cut"),alias:"Cut",precondition:Oe.writable,kbOpts:t,menuOpts:{group:Wd,order:1},menubarOpts:{menuId:ve.MenubarEditMenu,group:"2_ccp",title:o.k({key:"miCut",comment:["&& denotes a mnemonic"]},"Cu&&t"),order:1}})||this}return zd(t,e),t.prototype.run=function(t,n){!n.getConfiguration().emptySelectionClipboard&&n.getSelection().isEmpty()||e.prototype.run.call(this,t,n)},t}(Ud),Zd=function(e){function t(){var t={kbExpr:Oe.textInputFocus,primary:2081,win:{primary:2081,secondary:[2067]},weight:100};return B.ib||(t=null),e.call(this,"copy",{id:"editor.action.clipboardCopyAction",label:o.k("actions.clipboard.copyLabel","Copy"),alias:"Copy",precondition:null,kbOpts:t,menuOpts:{group:Wd,order:2},menubarOpts:{menuId:ve.MenubarEditMenu,group:"2_ccp",title:o.k({key:"miCopy",comment:["&& denotes a mnemonic"]},"&&Copy"),order:2}})||this}return zd(t,e),t.prototype.run=function(t,n){!n.getConfiguration().emptySelectionClipboard&&n.getSelection().isEmpty()||e.prototype.run.call(this,t,n)},t}(Ud),Gd=function(e){function t(){var t={kbExpr:Oe.textInputFocus,primary:2100,win:{primary:2100,secondary:[1043]},weight:100};return B.ib||(t=null),e.call(this,"paste",{id:"editor.action.clipboardPasteAction",label:o.k("actions.clipboard.pasteLabel","Paste"),alias:"Paste",precondition:Oe.writable,kbOpts:t,menuOpts:{group:Wd,order:3},menubarOpts:{menuId:ve.MenubarEditMenu,group:"2_ccp",title:o.k({key:"miPaste",comment:["&& denotes a mnemonic"]},"&&Paste"),order:3}})||this}return zd(t,e),t}(Ud),Qd=function(e){function t(){return e.call(this,"copy",{id:"editor.action.clipboardCopyWithSyntaxHighlightingAction",label:o.k("actions.clipboard.copyWithSyntaxHighlightingLabel","Copy With Syntax Highlighting"),alias:"Copy With Syntax Highlighting",precondition:null,kbOpts:{kbExpr:Oe.textInputFocus,primary:null,weight:100}})||this}return zd(t,e),t.prototype.run=function(t,n){!n.getConfiguration().emptySelectionClipboard&&n.getSelection().isEmpty()||(Wr.forceCopyWithSyntaxHighlighting=!0,e.prototype.run.call(this,t,n),Wr.forceCopyWithSyntaxHighlighting=!1)},t}(Ud);Fd&&Ee(Yd),Bd&&Ee(Zd),Vd&&Ee(Gd),Hd&&Ee(Qd),n(3465);var qd=function(){function e(e,t){this.afterLineNumber=e,this._onHeight=t,this.heightInLines=1,this.suppressMouseDown=!0,this.domNode=document.createElement("div")}return e.prototype.onComputedHeight=function(e){void 0===this._lastHeight?this._lastHeight=e:this._lastHeight!==e&&(this._lastHeight=e,this._onHeight())},e}(),Kd=function(){function e(t,n,i,o){var r=this;this.allowEditorOverflow=!1,this.suppressMouseDown=!0,this._disposables=[],this._commands=Object.create(null),this._id="codeLensWidget"+ ++e._idPool,this._editor=t,this.setSymbolRange(n),this._domNode=document.createElement("span"),this._domNode.innerHTML=" ",sn(this._domNode,"codelens-decoration"),sn(this._domNode,"invisible-cl"),this._updateHeight(),this._disposables.push(this._editor.onDidChangeConfiguration((function(e){return e.fontInfo&&r._updateHeight()}))),this._disposables.push(cn(this._domNode,"click",(function(e){var n=e.target;if("A"===n.tagName&&n.id){var s=r._commands[n.id];s&&(t.focus(),i.executeCommand.apply(i,[s.id].concat(s.arguments)).done(void 0,(function(e){o.error(e)})))}}))),this.updateVisibility()}return e.prototype.dispose=function(){(0,I.AS)(this._disposables)},e.prototype._updateHeight=function(){var e=this._editor.getConfiguration(),t=e.fontInfo,n=e.lineHeight;this._domNode.style.height=Math.round(1.1*n)+"px",this._domNode.style.lineHeight=n+"px",this._domNode.style.fontSize=Math.round(.9*t.fontSize)+"px",this._domNode.innerHTML=" "},e.prototype.updateVisibility=function(){this.isVisible()&&(an(this._domNode,"invisible-cl"),sn(this._domNode,"fadein"))},e.prototype.withCommands=function(e){if(this._commands=Object.create(null),e&&e.length){for(var t=[],n=0;n{1}",n,o),this._commands[n]=i):r=(0,p.format)("{0}",o),t.push(r)}this._domNode.innerHTML=t.join(" | "),this._editor.layoutContentWidget(this)}else this._domNode.innerHTML="no commands"},e.prototype.getId=function(){return this._id},e.prototype.getDomNode=function(){return this._domNode},e.prototype.setSymbolRange=function(e){var t=e.startLineNumber,n=this._editor.getModel().getLineFirstNonWhitespaceColumn(t);this._widgetPosition={position:{lineNumber:t,column:n},preference:[ou.ABOVE]}},e.prototype.getPosition=function(){return this._widgetPosition},e.prototype.isVisible=function(){return this._domNode.hasAttribute("monaco-visible-content-widget")},e._idPool=0,e}(),Jd=function(){function e(){this._removeDecorations=[],this._addDecorations=[],this._addDecorationsCallbacks=[]}return e.prototype.addDecoration=function(e,t){this._addDecorations.push(e),this._addDecorationsCallbacks.push(t)},e.prototype.removeDecoration=function(e){this._removeDecorations.push(e)},e.prototype.commit=function(e){for(var t=e.deltaDecorations(this._removeDecorations,this._addDecorations),n=0,i=t.length;nt.symbol.range.startLineNumber?1:i.indexOf(e.provider)i.indexOf(t.provider)?1:e.symbol.range.startColumnt.symbol.range.startColumn?1:0}))}))}Tr((function(e,t){var n=e.getColor(xa);n&&t.addRule(".monaco-editor .codelens-decoration { color: "+n+"; }");var i=e.getColor(ea);i&&t.addRule(".monaco-editor .codelens-decoration > a:hover { color: "+i+" !important; }")})),De("_executeCodeLensProvider",(function(e,t){var n=t.resource,i=t.itemResolveCount;if(!(n instanceof L.A))throw(0,S.Qg)();var o=e.get(K.S).getModel(n);if(!o)throw(0,S.Qg)();var r=[];return $d(o,st.None).then((function(e){for(var t=[],n=0,s=e;n0&&t.push(Promise.resolve(a.provider.resolveCodeLens(o,a.symbol,st.None)).then((function(e){return r.push(e)})))}return Promise.all(t)})).then((function(){return r}))}));var ef=function(e,t){return function(n,i){t(n,i,e)}},tf=function(){function e(e,t,n){var i=this;this._editor=e,this._commandService=t,this._notificationService=n,this._isEnabled=this._editor.getConfiguration().contribInfo.codeLens,this._globalToDispose=[],this._localToDispose=[],this._lenses=[],this._currentFindCodeLensSymbolsPromise=null,this._modelChangeCounter=0,this._globalToDispose.push(this._editor.onDidChangeModel((function(){return i._onModelChange()}))),this._globalToDispose.push(this._editor.onDidChangeModelLanguage((function(){return i._onModelChange()}))),this._globalToDispose.push(this._editor.onDidChangeConfiguration((function(e){var t=i._isEnabled;i._isEnabled=i._editor.getConfiguration().contribInfo.codeLens,t!==i._isEnabled&&i._onModelChange()}))),this._globalToDispose.push(No.qh.onDidChange(this._onModelChange,this)),this._onModelChange()}return e.prototype.dispose=function(){this._localDispose(),this._globalToDispose=(0,I.AS)(this._globalToDispose)},e.prototype._localDispose=function(){this._currentFindCodeLensSymbolsPromise&&(this._currentFindCodeLensSymbolsPromise.cancel(),this._currentFindCodeLensSymbolsPromise=null,this._modelChangeCounter++),this._currentResolveCodeLensSymbolsPromise&&(this._currentResolveCodeLensSymbolsPromise.cancel(),this._currentResolveCodeLensSymbolsPromise=null),this._localToDispose=(0,I.AS)(this._localToDispose)},e.prototype.getId=function(){return e.ID},e.prototype._onModelChange=function(){var e=this;this._localDispose();var t=this._editor.getModel();if(t&&this._isEnabled&&No.qh.has(t)){for(var n=0,i=No.qh.all(t);n0&&e._detectVisibleLenses.schedule()}))),this._localToDispose.push(this._editor.onDidLayoutChange((function(t){e._detectVisibleLenses.schedule()}))),this._localToDispose.push((0,I.s)((function(){if(e._editor.getModel()){var t=ad.capture(e._editor);e._editor.changeDecorations((function(t){e._editor.changeViewZones((function(n){e._disposeAllLenses(t,n)}))})),t.restore(e._editor)}else e._disposeAllLenses(null,null)}))),s.schedule()}},e.prototype._disposeAllLenses=function(e,t){var n=new Jd;this._lenses.forEach((function(e){return e.dispose(n,t)})),e&&n.commit(e),this._lenses=[]},e.prototype._renderCodeLensSymbols=function(e){var t=this;if(this._editor.getModel()){for(var n,i=this._editor.getModel().getLineCount(),o=[],r=0,s=e;ri||(n&&n[n.length-1].symbol.range.startLineNumber===u?n.push(a):(n=[a],o.push(n)))}var l=ad.capture(this._editor);this._editor.changeDecorations((function(e){t._editor.changeViewZones((function(n){for(var i=0,r=0,s=new Jd;r=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([ef(1,D),ef(2,Cr)],e)}();function nf(e,t){switch(void 0===t&&(t=0),typeof e){case"object":return null===e?of(349,t):Array.isArray(e)?(n=e,i=of(104579,i=t),n.reduce((function(e,t){return nf(t,e)}),i)):function(e,t){return t=of(181387,t),Object.keys(e).sort().reduce((function(t,n){return t=rf(n,t),nf(e[n],t)}),t)}(e,t);case"string":return rf(e,t);case"boolean":return function(e,t){return of(e?433:863,t)}(e,t);case"number":return of(e,t);case"undefined":return of(e,937);default:return of(e,617)}var n,i}function of(e,t){return(t<<5)-t+e|0}function rf(e,t){t=of(149417,t);for(var n=0,i=e.length;n=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([pf(1,Ce),pf(2,uf)],e)}();Ae(gf);var mf=function(){function e(){}return e.insert=function(e,t){return{range:new s.Q(e.lineNumber,e.column,e.lineNumber,e.column),text:t,forceMoveMarkers:!0}},e.delete=function(e){return{range:e,text:null}},e.replace=function(e,t){return{range:e,text:t}},e.replaceMove=function(e,t){return{range:e,text:t,forceMoveMarkers:!0}},e}(),vf=function(){function e(e){this._selection=e,this._usedEndToken=null}return e._haystackHasNeedleAtOffset=function(e,t,n){if(n<0)return!1;var i=t.length;if(n+i>e.length)return!1;for(var o=0;o=65&&r<=90&&r+32===s||s>=65&&s<=90&&s+32===r))return!1}return!0},e.prototype._createOperationsForBlockComment=function(t,n,i,o){var r,a=t.startLineNumber,u=t.startColumn,l=t.endLineNumber,c=t.endColumn,h=i.getLineContent(a),d=i.getLineContent(l),f=n.blockCommentStartToken,p=n.blockCommentEndToken,g=h.lastIndexOf(f,u-1+f.length),m=d.indexOf(p,c-1-p.length);if(-1!==g&&-1!==m)if(a===l)h.substring(g+f.length,m).indexOf(p)>=0&&(g=-1,m=-1);else{var v=h.substring(g+f.length),y=d.substring(0,m);(v.indexOf(p)>=0||y.indexOf(p)>=0)&&(g=-1,m=-1)}-1!==g&&-1!==m?(g+f.length0&&32===d.charCodeAt(m-1)&&(p=" "+p,m-=1),r=e._createRemoveBlockCommentOperations(new s.Q(a,g+f.length+1,l,m+1),f,p)):(r=e._createAddBlockCommentOperations(t,f,p),this._usedEndToken=1===r.length?p:null);for(var b=0;ba?r-1:r}},e}(),bf=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),_f=function(e){function t(t,n){var i=e.call(this,n)||this;return i._type=t,i}return bf(t,e),t.prototype.run=function(e,t){var n=t.getModel();if(n){for(var i=[],o=t.getSelections(),r=n.getOptions(),s=0;s0&&s._contextViewService.hideContextView()}))),this._toDispose.push(this._editor.onKeyDown((function(e){58===e.keyCode&&(e.preventDefault(),e.stopPropagation(),s.showContextMenu())})))}return e.get=function(t){return t.getContribution(e.ID)},e.prototype._onContextMenu=function(e){if(!this._editor.getConfiguration().contribInfo.contextmenu)return this._editor.focus(),void(e.target.position&&!this._editor.getSelection().containsPosition(e.target.position)&&this._editor.setPosition(e.target.position));var t;e.target.type!==su.OVERLAY_WIDGET&&(e.event.preventDefault(),(e.target.type===su.CONTENT_TEXT||e.target.type===su.CONTENT_EMPTY||e.target.type===su.TEXTAREA)&&(this._editor.focus(),e.target.position&&!this._editor.getSelection().containsPosition(e.target.position)&&this._editor.setPosition(e.target.position),e.target.type!==su.TEXTAREA&&(t={x:e.event.posx,y:e.event.posy+1}),this.showContextMenu(t)))},e.prototype.showContextMenu=function(e){if(this._editor.getConfiguration().contribInfo.contextmenu)if(this._contextMenuService){var t=this._getMenuActions();t.length>0&&this._doShowContextMenu(t,e)}else this._editor.focus()},e.prototype._getMenuActions=function(){var e=[],t=this._menuService.createMenu(ve.EditorContext,this._contextKeyService),n=t.getActions({arg:this._editor.getModel().uri});t.dispose();for(var i=0,o=n;i0&&this._contextViewService.hideContextView(),this._toDispose=(0,I.AS)(this._toDispose)},e.ID="editor.contrib.contextmenu",e=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([kf(1,Nf),kf(2,If),kf(3,he),kf(4,xf),kf(5,ye)],e)}(),Ef=function(e){function t(){return e.call(this,{id:"editor.action.showContextMenu",label:o.k("action.showContextMenu.label","Show Editor Context Menu"),alias:"Show Editor Context Menu",precondition:null,kbOpts:{kbExpr:Oe.textInputFocus,primary:1092,weight:100}})||this}return Df(t,e),t.prototype.run=function(e,t){Tf.get(t).showContextMenu()},t}(xe);Ae(Tf),Ee(Ef);var Af=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),jf=function(){function e(e){this.selections=e}return e.prototype.equals=function(e){var t=this.selections.length;if(t!==e.selections.length)return!1;for(var n=0;n50&&n._undoStack.shift()),n._prevState=n._readState()}))),n}return Af(t,e),t.get=function(e){return e.getContribution(t.ID)},t.prototype._readState=function(){return this._editor.getModel()?new jf(this._editor.getSelections()):null},t.prototype.getId=function(){return t.ID},t.prototype.cursorUndo=function(){for(var e=new jf(this._editor.getSelections());this._undoStack.length>0;){var t=this._undoStack.pop();if(!t.equals(e))return this._isCursorUndo=!0,this._editor.setSelections(t.selections),this._editor.revealRangeInCenterIfOutsideViewport(t.selections[0],0),void(this._isCursorUndo=!1)}},t.ID="editor.contrib.cursorUndoController",t}(I.jG),Rf=function(e){function t(){return e.call(this,{id:"cursorUndo",label:o.k("cursor.undo","Soft Undo"),alias:"Soft Undo",precondition:null,kbOpts:{kbExpr:Oe.textInputFocus,primary:2099,weight:100}})||this}return Af(t,e),t.prototype.run=function(e,t,n){Of.get(t).cursorUndo()},t}(xe);Ae(Of),Ee(Rf),n(7853);var Pf=function(){function e(e,t,n){this.selection=e,this.targetPosition=t,this.copy=n}return e.prototype.getEditOperations=function(e,t){var n=e.getValueInRange(this.selection);this.copy||t.addEditOperation(this.selection,null),t.addEditOperation(new s.Q(this.targetPosition.lineNumber,this.targetPosition.column,this.targetPosition.lineNumber,this.targetPosition.column),n),!this.selection.containsPosition(this.targetPosition)||this.copy&&(this.selection.getEndPosition().equals(this.targetPosition)||this.selection.getStartPosition().equals(this.targetPosition))?this.copy?this.targetSelection=new Be.L(this.targetPosition.lineNumber,this.targetPosition.column,this.selection.endLineNumber-this.selection.startLineNumber+this.targetPosition.lineNumber,this.selection.startLineNumber===this.selection.endLineNumber?this.targetPosition.column+this.selection.endColumn-this.selection.startColumn:this.selection.endColumn):this.targetPosition.lineNumber>this.selection.endLineNumber?this.targetSelection=new Be.L(this.targetPosition.lineNumber-this.selection.endLineNumber+this.selection.startLineNumber,this.targetPosition.column,this.targetPosition.lineNumber,this.selection.startLineNumber===this.selection.endLineNumber?this.targetPosition.column+this.selection.endColumn-this.selection.startColumn:this.selection.endColumn):this.targetPosition.lineNumber0;){if(e=0?t+1:1},e.prototype.getCurrentMatchesPosition=function(t){for(var n=this._editor.getModel().getDecorationsInRange(t),i=0,o=n.length;i1e3){r=e._FIND_MATCH_NO_OVERVIEW_DECORATION;for(var u=i._editor.getModel().getLineCount(),l=i._editor.getLayoutInfo().height/u,c=Math.max(2,Math.ceil(3/l)),h=t[0].range.startLineNumber,d=t[0].range.endLineNumber,f=1,p=t.length;f=g.startLineNumber?g.endLineNumber>d&&(d=g.endLineNumber):(a.push({range:new s.Q(h,1,d,1),options:e._FIND_MATCH_ONLY_OVERVIEW_DECORATION}),h=g.startLineNumber,d=g.endLineNumber)}a.push({range:new s.Q(h,1,d,1),options:e._FIND_MATCH_ONLY_OVERVIEW_DECORATION})}var m=new Array(t.length);for(f=0,p=t.length;f=0;t--){var n=this._decorations[t],i=this._editor.getModel().getDecorationRange(n);if(i&&!(i.endLineNumber>e.lineNumber)){if(i.endLineNumbere.column))return i}}return this._editor.getModel().getDecorationRange(this._decorations[this._decorations.length-1])},e.prototype.matchAfterPosition=function(e){if(0===this._decorations.length)return null;for(var t=0,n=this._decorations.length;te.lineNumber)return o;if(!(o.startColumn0){for(var n=[],i=0;i0},e.prototype._cannotFind=function(){if(!this._hasMatches()){var e=this._decorations.getFindScope();return e&&this._editor.revealRangeInCenterIfOutsideViewport(e,0),!0}return!1},e.prototype._setCurrentFindMatch=function(e){var t=this._decorations.setCurrentFindMatch(e);this._state.changeMatchInfo(t,this._decorations.getCount(),e),this._editor.setSelection(e),this._editor.revealRangeInCenterIfOutsideViewport(e,0)},e.prototype._prevSearchPosition=function(e){var t=this._state.isRegex&&(this._state.searchString.indexOf("^")>=0||this._state.searchString.indexOf("$")>=0),n=e.lineNumber,i=e.column,o=this._editor.getModel();return t||1===i?(1===n?n=o.getLineCount():n--,i=o.getLineMaxColumn(n)):i--,new r.y(n,i)},e.prototype._moveToPrevMatch=function(t,n){if(void 0===n&&(n=!1),this._decorations.getCount()=0||this._state.searchString.indexOf("$")>=0),n=e.lineNumber,i=e.column,o=this._editor.getModel();return t||i===o.getLineMaxColumn(n)?(n===o.getLineCount()?n=1:n++,i=1):i++,new r.y(n,i)},e.prototype._moveToNextMatch=function(e){if(this._decorations.getCount()=i)break;if(36===(a=e.charCodeAt(n))){t.emitUnchanged(n-1),t.emitStatic("$",n+1);continue}if(48===a||38===a){t.emitUnchanged(n-1),t.emitMatchIndex(0,n+1);continue}if(49<=a&&a<=57){var r=a-48;if(n+1=i)break;var a;switch(a=e.charCodeAt(n)){case 92:t.emitUnchanged(n-1),t.emitStatic("\\",n+1);break;case 110:t.emitUnchanged(n-1),t.emitStatic("\n",n+1);break;case 116:t.emitUnchanged(n-1),t.emitStatic("\t",n+1)}}}return t.finalize()}(this._state.replaceString):Wf.fromStaticValue(this._state.replaceString)},e.prototype.replace=function(){if(this._hasMatches()){var e=this._getReplacePattern(),t=this._editor.getSelection(),n=this._getNextMatch(t.getStartPosition(),e.hasReplacementPatterns,!1);if(n)if(t.equalsRange(n.range)){var i=e.buildReplaceString(n.matches),o=new He(t,i);this._executeEditorCommand("replace",o),this._decorations.setStartPosition(new r.y(t.startLineNumber,t.startColumn+i.length)),this.research(!0)}else this._decorations.setStartPosition(this._editor.getPosition()),this._setCurrentFindMatch(n.range)}},e.prototype._findMatches=function(t,n,i){var o=e._getSearchRange(this._editor.getModel(),t);return this._editor.getModel().findMatches(this._state.searchString,o,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getConfiguration().wordSeparators:null,n,i)},e.prototype.replaceAll=function(){if(this._hasMatches()){var e=this._decorations.getFindScope();null===e&&this._state.matchesCount>=ap?this._largeReplaceAll():this._regularReplaceAll(e),this.research(!1)}},e.prototype._largeReplaceAll=function(){var e=new Uf.lt(this._state.searchString,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getConfiguration().wordSeparators:null).parseSearchRequest();if(e){var t=e.regex;if(!t.multiline){var n="m";t.ignoreCase&&(n+="i"),t.global&&(n+="g"),t=new RegExp(t.source,n)}var i,o=this._editor.getModel(),r=o.getValue(Xi.kf.LF),s=o.getFullModelRange(),a=this._getReplacePattern();i=a.hasReplacementPatterns?r.replace(t,(function(){return a.buildReplaceString(arguments)})):r.replace(t,a.buildReplaceString(null));var u=new Ye(s,i,this._editor.getSelection());this._executeEditorCommand("replaceAll",u)}},e.prototype._regularReplaceAll=function(e){for(var t=this._getReplacePattern(),n=this._findMatches(e,t.hasReplacementPatterns,1073741824),i=[],o=0,r=n.length;ot&&(e=t),this._matchesPosition!==e&&(this._matchesPosition=e,i.matchesPosition=!0,o=!0),this._matchesCount!==t&&(this._matchesCount=t,i.matchesCount=!0,o=!0),void 0!==n&&(s.Q.equalsRange(this._currentMatch,n)||(this._currentMatch=n,i.currentMatch=!0,o=!0)),o&&this._onFindReplaceStateChange.fire(i)},e.prototype.change=function(e,t,n){void 0===n&&(n=!0);var i={moveCursor:t,updateHistory:n,searchString:!1,replaceString:!1,isRevealed:!1,isReplaceRevealed:!1,isRegex:!1,wholeWord:!1,matchCase:!1,searchScope:!1,matchesPosition:!1,matchesCount:!1,currentMatch:!1},o=!1,r=this.isRegex,a=this.wholeWord,u=this.matchCase;void 0!==e.searchString&&this._searchString!==e.searchString&&(this._searchString=e.searchString,i.searchString=!0,o=!0),void 0!==e.replaceString&&this._replaceString!==e.replaceString&&(this._replaceString=e.replaceString,i.replaceString=!0,o=!0),void 0!==e.isRevealed&&this._isRevealed!==e.isRevealed&&(this._isRevealed=e.isRevealed,i.isRevealed=!0,o=!0),void 0!==e.isReplaceRevealed&&this._isReplaceRevealed!==e.isReplaceRevealed&&(this._isReplaceRevealed=e.isReplaceRevealed,i.isReplaceRevealed=!0,o=!0),void 0!==e.isRegex&&(this._isRegex=e.isRegex),void 0!==e.wholeWord&&(this._wholeWord=e.wholeWord),void 0!==e.matchCase&&(this._matchCase=e.matchCase),void 0!==e.searchScope&&(s.Q.equalsRange(this._searchScope,e.searchScope)||(this._searchScope=e.searchScope,i.searchScope=!0,o=!0)),this._isRegexOverride=void 0!==e.isRegexOverride?e.isRegexOverride:0,this._wholeWordOverride=void 0!==e.wholeWordOverride?e.wholeWordOverride:0,this._matchCaseOverride=void 0!==e.matchCaseOverride?e.matchCaseOverride:0,r!==this.isRegex&&(o=!0,i.isRegex=!0),a!==this.wholeWord&&(o=!0,i.wholeWord=!0),u!==this.matchCase&&(o=!0,i.matchCase=!0),o&&this._onFindReplaceStateChange.fire(i)},e}(),dp=(0,N.u1)("storageService");!function(e){e[e.GLOBAL=0]="GLOBAL",e[e.WORKSPACE=1]="WORKSPACE"}(cp||(cp={}));var fp,pp={_serviceBrand:void 0,store:function(){},remove:function(){},get:function(e,t,n){return n},getInteger:function(e,t,n){return n},getBoolean:function(e,t,n){return n}},gp=(0,N.u1)("clipboardService"),mp=(n(9925),n(2269),function(){function e(e){this._prefix=e,this._lastId=0}return e.prototype.nextId=function(){return this._prefix+ ++this._lastId},e}()),vp=new mp("id#"),yp=function(){function e(e){void 0===e&&(e=""),this.value=e}return e.prototype.appendText=function(e){return this.value+=e.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&"),this},e.prototype.appendMarkdown=function(e){return this.value+=e,this},e.prototype.appendCodeblock=function(e,t){return this.value+="\n```",this.value+=e,this.value+="\n",this.value+=t,this.value+="\n```\n",this},e}();function bp(e){return _p(e)?!e.value:!Array.isArray(e)||e.every(bp)}function _p(e){return e instanceof yp||!(!e||"object"!=typeof e)&&"string"==typeof e.value&&("boolean"==typeof e.isTrusted||void 0===e.isTrusted)}function wp(e,t){return e===t||!(!e||!t)&&e.value===t.value&&e.isTrusted===t.isTrusted}function Mp(e){return e?e.replace(/\\([\\`*_{}[\]()#+\-.!])/g,"$1"):e}(function(e){var t={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:p,hr:/^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/,nptable:p,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( *)(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:"^ {0,3}(?:<(script|pre|style)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?\\?>\\n*|\\n*|\\n*|)[\\s\\S]*?(?:\\n{2,}|$)|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=\\h*\\n)[\\s\\S]*?(?:\\n{2,}|$)|(?=\\h*\\n)[\\s\\S]*?(?:\\n{2,}|$))",def:/^ {0,3}\[(label)\]: *\n? *]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,table:p,lheading:/^([^\n]+)\n *(=|-){2,} *(?:\n+|$)/,paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading| {0,3}>|<\/?(?:tag)(?: +|\n|\/?>)|<(?:script|pre|style|!--))[^\n]+)*)/,text:/^[^\n]+/};function n(e){this.tokens=[],this.tokens.links={},this.options=e||y.defaults,this.rules=t.normal,this.options.pedantic?this.rules=t.pedantic:this.options.gfm&&(this.options.tables?this.rules=t.tables:this.rules=t.gfm)}t._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,t._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,t.def=c(t.def).replace("label",t._label).replace("title",t._title).getRegex(),t.bullet=/(?:[*+-]|\d+\.)/,t.item=/^( *)(bull) [^\n]*(?:\n(?!\1bull )[^\n]*)*/,t.item=c(t.item,"gm").replace(/bull/g,t.bullet).getRegex(),t.list=c(t.list).replace(/bull/g,t.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+t.def.source+")").getRegex(),t._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",t._comment=//,t.html=c(t.html,"i").replace("comment",t._comment).replace("tag",t._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),t.paragraph=c(t.paragraph).replace("hr",t.hr).replace("heading",t.heading).replace("lheading",t.lheading).replace("tag",t._tag).getRegex(),t.blockquote=c(t.blockquote).replace("paragraph",t.paragraph).getRegex(),t.normal=g({},t),t.gfm=g({},t.normal,{fences:/^ *(`{3,}|~{3,})[ \.]*(\S+)? *\n([\s\S]*?)\n? *\1 *(?:\n+|$)/,paragraph:/^/,heading:/^ *(#{1,6}) +([^\n]+?) *#* *(?:\n+|$)/}),t.gfm.paragraph=c(t.paragraph).replace("(?!","(?!"+t.gfm.fences.source.replace("\\1","\\2")+"|"+t.list.source.replace("\\1","\\3")+"|").getRegex(),t.tables=g({},t.gfm,{nptable:/^ *([^|\n ].*\|.*)\n *([-:]+ *\|[-| :]*)(?:\n((?:.*[^>\n ].*(?:\n|$))*)\n*|$)/,table:/^ *\|(.+)\n *\|?( *[-:]+[-| :]*)(?:\n((?: *[^>\n ].*(?:\n|$))*)\n*|$)/}),t.pedantic=g({},t.normal,{html:c("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",t._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/}),n.rules=t,n.lex=function(e,t){return new n(t).lex(e)},n.prototype.lex=function(e){return e=e.replace(/\r\n|\r/g,"\n").replace(/\t/g," ").replace(/\u00a0/g," ").replace(/\u2424/g,"\n"),this.token(e,!0)},n.prototype.token=function(e,n){var i,o,r,s,a,u,l,c,h,d,f,p,g;for(e=e.replace(/^ +$/gm,"");e;)if((r=this.rules.newline.exec(e))&&(e=e.substring(r[0].length),r[0].length>1&&this.tokens.push({type:"space"})),r=this.rules.code.exec(e))e=e.substring(r[0].length),r=r[0].replace(/^ {4}/gm,""),this.tokens.push({type:"code",text:this.options.pedantic?r:v(r,"\n")});else if(r=this.rules.fences.exec(e))e=e.substring(r[0].length),this.tokens.push({type:"code",lang:r[2],text:r[3]||""});else if(r=this.rules.heading.exec(e))e=e.substring(r[0].length),this.tokens.push({type:"heading",depth:r[1].length,text:r[2]});else if(n&&(r=this.rules.nptable.exec(e))&&(u={type:"table",header:m(r[1].replace(/^ *| *\| *$/g,"")),align:r[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:r[3]?r[3].replace(/\n$/,"").split("\n"):[]}).header.length===u.align.length){for(e=e.substring(r[0].length),c=0;c ?/gm,""),this.token(r,n),this.tokens.push({type:"blockquote_end"});else if(r=this.rules.list.exec(e)){for(e=e.substring(r[0].length),f=(s=r[2]).length>1,this.tokens.push({type:"list_start",ordered:f,start:f?+s:""}),i=!1,d=(r=r[0].match(this.rules.item)).length,c=0;c1&&a.length>1||(e=r.slice(c+1).join("\n")+e,c=d-1)),o=i||/\n\n(?!\s*$)/.test(u),c!==d-1&&(i="\n"===u.charAt(u.length-1),o||(o=i)),g=void 0,(p=/^\[[ xX]\] /.test(u))&&(g=" "!==u[1],u=u.replace(/^\[[ xX]\] +/,"")),this.tokens.push({type:o?"loose_item_start":"list_item_start",task:p,checked:g}),this.token(u,!1),this.tokens.push({type:"list_item_end"});this.tokens.push({type:"list_end"})}else if(r=this.rules.html.exec(e))e=e.substring(r[0].length),this.tokens.push({type:this.options.sanitize?"paragraph":"html",pre:!this.options.sanitizer&&("pre"===r[1]||"script"===r[1]||"style"===r[1]),text:r[0]});else if(n&&(r=this.rules.def.exec(e)))e=e.substring(r[0].length),r[3]&&(r[3]=r[3].substring(1,r[3].length-1)),h=r[1].toLowerCase().replace(/\s+/g," "),this.tokens.links[h]||(this.tokens.links[h]={href:r[2],title:r[3]});else if(n&&(r=this.rules.table.exec(e))&&(u={type:"table",header:m(r[1].replace(/^ *| *\| *$/g,"")),align:r[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:r[3]?r[3].replace(/(?: *\| *)?\n$/,"").split("\n"):[]}).header.length===u.align.length){for(e=e.substring(r[0].length),c=0;c?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:p,tag:"^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^",link:/^!?\[(label)\]\(href(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(?!\s*\])((?:\\[\[\]]?|[^\[\]\\])+)\]/,nolink:/^!?\[(?!\s*\])((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\](?:\[\])?/,strong:/^__([^\s][\s\S]*?[^\s])__(?!_)|^\*\*([^\s][\s\S]*?[^\s])\*\*(?!\*)|^__([^\s])__(?!_)|^\*\*([^\s])\*\*(?!\*)/,em:/^_([^\s][\s\S]*?[^\s_])_(?!_)|^_([^\s_][\s\S]*?[^\s])_(?!_)|^\*([^\s][\s\S]*?[^\s*])\*(?!\*)|^\*([^\s*][\s\S]*?[^\s])\*(?!\*)|^_([^\s_])_(?!_)|^\*([^\s*])\*(?!\*)/,code:/^(`+)\s*([\s\S]*?[^`]?)\s*\1(?!`)/,br:/^ {2,}\n(?!\s*$)/,del:p,text:/^[\s\S]+?(?=[\\/g,">").replace(/"/g,""").replace(/'/g,"'")}function l(e){return e.replace(/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi,(function(e,t){return"colon"===(t=t.toLowerCase())?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""}))}function c(e,t){return e=e.source||e,t=t||"",{replace:function(t,n){return n=(n=n.source||n).replace(/(^|[^\[])\^/g,"$1"),e=e.replace(t,n),this},getRegex:function(){return new RegExp(e,t)}}}function h(e,t){return d[" "+e]||(/^[^:]+:\/*[^/]*$/.test(e)?d[" "+e]=e+"/":d[" "+e]=v(e,"/",!0)),e=d[" "+e],"//"===t.slice(0,2)?e.replace(/:[\s\S]*/,":")+t:"/"===t.charAt(0)?e.replace(/(:\/*[^/]*)[\s\S]*/,"$1")+t:e+t}i._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,i._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,i._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,i.autolink=c(i.autolink).replace("scheme",i._scheme).replace("email",i._email).getRegex(),i._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,i.tag=c(i.tag).replace("comment",t._comment).replace("attribute",i._attribute).getRegex(),i._label=/(?:\[[^\[\]]*\]|\\[\[\]]?|`[^`]*`|[^\[\]\\])*?/,i._href=/\s*(<(?:\\[<>]?|[^\s<>\\])*>|(?:\\[()]?|\([^\s\x00-\x1f()\\]*\)|[^\s\x00-\x1f()\\])*?)/,i._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,i.link=c(i.link).replace("label",i._label).replace("href",i._href).replace("title",i._title).getRegex(),i.reflink=c(i.reflink).replace("label",i._label).getRegex(),i.normal=g({},i),i.pedantic=g({},i.normal,{strong:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,em:/^_(?=\S)([\s\S]*?\S)_(?!_)|^\*(?=\S)([\s\S]*?\S)\*(?!\*)/,link:c(/^!?\[(label)\]\((.*?)\)/).replace("label",i._label).getRegex(),reflink:c(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",i._label).getRegex()}),i.gfm=g({},i.normal,{escape:c(i.escape).replace("])","~|])").getRegex(),url:c(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("email",i._email).getRegex(),_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^~~(?=\S)([\s\S]*?\S)~~/,text:c(i.text).replace("]|","~]|").replace("|","|https?://|ftp://|www\\.|[a-zA-Z0-9.!#$%&'*+/=?^_`{\\|}~-]+@|").getRegex()}),i.breaks=g({},i.gfm,{br:c(i.br).replace("{2,}","*").getRegex(),text:c(i.gfm.text).replace("{2,}","*").getRegex()}),o.rules=i,o.output=function(e,t,n){return new o(t,n).output(e)},o.prototype.output=function(e){for(var t,n,i,r,s,a="";e;)if(s=this.rules.escape.exec(e))e=e.substring(s[0].length),a+=s[1];else if(s=this.rules.autolink.exec(e))e=e.substring(s[0].length),i="@"===s[2]?"mailto:"+(n=u(this.mangle(s[1]))):n=u(s[1]),a+=this.renderer.link(i,null,n);else if(this.inLink||!(s=this.rules.url.exec(e))){if(s=this.rules.tag.exec(e))!this.inLink&&/^/i.test(s[0])&&(this.inLink=!1),e=e.substring(s[0].length),a+=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(s[0]):u(s[0]):s[0];else if(s=this.rules.link.exec(e))e=e.substring(s[0].length),this.inLink=!0,i=s[2],this.options.pedantic?(t=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(i))?(i=t[1],r=t[3]):r="":r=s[3]?s[3].slice(1,-1):"",i=i.trim().replace(/^<([\s\S]*)>$/,"$1"),a+=this.outputLink(s,{href:o.escapes(i),title:o.escapes(r)}),this.inLink=!1;else if((s=this.rules.reflink.exec(e))||(s=this.rules.nolink.exec(e))){if(e=e.substring(s[0].length),t=(s[2]||s[1]).replace(/\s+/g," "),!(t=this.links[t.toLowerCase()])||!t.href){a+=s[0].charAt(0),e=s[0].substring(1)+e;continue}this.inLink=!0,a+=this.outputLink(s,t),this.inLink=!1}else if(s=this.rules.strong.exec(e))e=e.substring(s[0].length),a+=this.renderer.strong(this.output(s[4]||s[3]||s[2]||s[1]));else if(s=this.rules.em.exec(e))e=e.substring(s[0].length),a+=this.renderer.em(this.output(s[6]||s[5]||s[4]||s[3]||s[2]||s[1]));else if(s=this.rules.code.exec(e))e=e.substring(s[0].length),a+=this.renderer.codespan(u(s[2].trim(),!0));else if(s=this.rules.br.exec(e))e=e.substring(s[0].length),a+=this.renderer.br();else if(s=this.rules.del.exec(e))e=e.substring(s[0].length),a+=this.renderer.del(this.output(s[1]));else if(s=this.rules.text.exec(e))e=e.substring(s[0].length),a+=this.renderer.text(u(this.smartypants(s[0])));else if(e)throw new Error("Infinite loop on byte: "+e.charCodeAt(0))}else s[0]=this.rules._backpedal.exec(s[0])[0],e=e.substring(s[0].length),"@"===s[2]?i="mailto:"+(n=u(s[0])):(n=u(s[0]),i="www."===s[1]?"http://"+n:n),a+=this.renderer.link(i,null,n);return a},o.escapes=function(e){return e?e.replace(o.rules._escapes,"$1"):e},o.prototype.outputLink=function(e,t){var n=t.href,i=t.title?u(t.title):null;return"!"!==e[0].charAt(0)?this.renderer.link(n,i,this.output(e[1])):this.renderer.image(n,i,u(e[1]))},o.prototype.smartypants=function(e){return this.options.smartypants?e.replace(/---/g,"—").replace(/--/g,"–").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1‘").replace(/'/g,"’").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”").replace(/\.{3}/g,"…"):e},o.prototype.mangle=function(e){if(!this.options.mangle)return e;for(var t,n="",i=e.length,o=0;o.5&&(t="x"+t.toString(16)),n+="&#"+t+";";return n},r.prototype.code=function(e,t,n){if(this.options.highlight){var i=this.options.highlight(e,t);null!=i&&i!==e&&(n=!0,e=i)}return t?'
'+(n?e:u(e,!0))+"
\n":"
"+(n?e:u(e,!0))+"
"},r.prototype.blockquote=function(e){return"
\n"+e+"
\n"},r.prototype.html=function(e){return e},r.prototype.heading=function(e,t,n){return this.options.headerIds?"'+e+"\n":""+e+"\n"},r.prototype.hr=function(){return this.options.xhtml?"
\n":"
\n"},r.prototype.list=function(e,t,n){var i=t?"ol":"ul";return"<"+i+(t&&1!==n?' start="'+n+'"':"")+">\n"+e+"\n"},r.prototype.listitem=function(e){return"
  • "+e+"
  • \n"},r.prototype.checkbox=function(e){return" "},r.prototype.paragraph=function(e){return"

    "+e+"

    \n"},r.prototype.table=function(e,t){return t&&(t=""+t+""),"\n\n"+e+"\n"+t+"
    \n"},r.prototype.tablerow=function(e){return"\n"+e+"\n"},r.prototype.tablecell=function(e,t){var n=t.header?"th":"td";return(t.align?"<"+n+' align="'+t.align+'">':"<"+n+">")+e+"\n"},r.prototype.strong=function(e){return""+e+""},r.prototype.em=function(e){return""+e+""},r.prototype.codespan=function(e){return""+e+""},r.prototype.br=function(){return this.options.xhtml?"
    ":"
    "},r.prototype.del=function(e){return""+e+""},r.prototype.link=function(e,t,n){if(this.options.sanitize){try{var i=decodeURIComponent(l(e)).replace(/[^\w:]/g,"").toLowerCase()}catch(e){return n}if(0===i.indexOf("javascript:")||0===i.indexOf("vbscript:")||0===i.indexOf("data:"))return n}this.options.baseUrl&&!f.test(e)&&(e=h(this.options.baseUrl,e));try{e=encodeURI(e).replace(/%25/g,"%")}catch(e){return n}var o='
    "+n+""},r.prototype.image=function(e,t,n){this.options.baseUrl&&!f.test(e)&&(e=h(this.options.baseUrl,e));var i=''+n+'":">")},r.prototype.text=function(e){return e},s.prototype.strong=s.prototype.em=s.prototype.codespan=s.prototype.del=s.prototype.text=function(e){return e},s.prototype.link=s.prototype.image=function(e,t,n){return""+n},s.prototype.br=function(){return""},a.parse=function(e,t){return new a(t).parse(e)},a.prototype.parse=function(e){this.inline=new o(e.links,this.options),this.inlineText=new o(e.links,g({},this.options,{renderer:new s})),this.tokens=e.reverse();for(var t="";this.next();)t+=this.tok();return t},a.prototype.next=function(){return this.token=this.tokens.pop()},a.prototype.peek=function(){return this.tokens[this.tokens.length-1]||0},a.prototype.parseText=function(){for(var e=this.token.text;"text"===this.peek().type;)e+="\n"+this.next().text;return this.inline.output(e)},a.prototype.tok=function(){switch(this.token.type){case"space":return"";case"hr":return this.renderer.hr();case"heading":return this.renderer.heading(this.inline.output(this.token.text),this.token.depth,l(this.inlineText.output(this.token.text)));case"code":return this.renderer.code(this.token.text,this.token.lang,this.token.escaped);case"table":var e,t,n,i,o="",r="";for(n="",e=0;e=0&&"\\"===n[o];)i=!i;return i?"|":" |"})).split(/ \|/),i=0;if(n.length>t)n.splice(t);else for(;n.lengthAn error occurred:

    "+u(e.message+"",!0)+"
    ";throw e}}p.exec=p,y.options=y.setOptions=function(e){return g(y.defaults,e),y},y.getDefaults=function(){return{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:new r,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tables:!0,xhtml:!1}},y.defaults=y.getDefaults(),y.Parser=a,y.parser=a.parse,y.Renderer=r,y.TextRenderer=s,y.Lexer=n,y.lexer=n.lex,y.InlineLexer=o,y.inlineLexer=o.output,y.parse=y,fp=y}).call(void 0);var Cp=fp;function Sp(e){var t=e.inline?"span":"div",n=document.createElement(t);return e.className&&(n.className=e.className),n}function Lp(e,t){void 0===t&&(t={});var n=Sp(t);return kp(n,function(e){for(var t={type:1,children:[]},n=0,i=t,o=[],r=new Dp(e);!r.eos();){var s=r.next(),a="\\"===s&&0!==Tp(r.peek());if(a&&(s=r.next()),a||0===Tp(s)||s!==r.peek())if("\n"===s)2===i.type&&(i=o.pop()),i.children.push({type:7});else if(2!==i.type){var u={type:2,content:s};i.children.push(u),o.push(i),i=u}else i.content+=s;else{r.advance(),2===i.type&&(i=o.pop());var l=Tp(s);if(i.type===l||5===i.type&&6===l)i=o.pop();else{var c={type:l,children:[]};5===l&&(c.index=n,n++),i.children.push(c),o.push(i),i=c}}}return 2===i.type&&(i=o.pop()),o.length,t}(e),t.actionHandler),n}fp.Parser,fp.parser,fp.Renderer,fp.TextRenderer,fp.Lexer,fp.lexer,fp.InlineLexer,fp.inlineLexer,fp.parse;var Ip,Np,xp,Dp=function(){function e(e){this.source=e,this.index=0}return e.prototype.eos=function(){return this.index>=this.source.length},e.prototype.next=function(){var e=this.peek();return this.advance(),e},e.prototype.peek=function(){return this.source[this.index]},e.prototype.advance=function(){this.index++},e}();function kp(e,t,n){var i;if(2===t.type)i=document.createTextNode(t.content);else if(3===t.type)i=document.createElement("b");else if(4===t.type)i=document.createElement("i");else if(5===t.type&&n){var o=document.createElement("a");o.href="#",n.disposeables.push(hn(o,"click",(function(e){n.callback(String(t.index),e)}))),i=o}else 7===t.type?i=document.createElement("br"):1===t.type&&(i=e);e!==i&&e.appendChild(i),Array.isArray(t.children)&&t.children.forEach((function(e){kp(i,e,n)}))}function Tp(e){switch(e){case"*":return 3;case"_":return 4;case"[":return 5;case"]":return 6;default:return 0}}function Ep(e){Wp(Np,e)}function Ap(e){B.zx?Ep(e):Wp(xp,e)}n(7269);var jp,Op,Rp,Pp=0,zp=void 0;function Wp(e,t){if(Ip){switch(zp===t?Pp++:(zp=t,Pp=0),Pp){case 0:break;case 1:t=o.k("repeated","{0} (occurred again)",t);break;default:t=o.k("repeatedNtimes","{0} (occurred {1} times)",t,Pp)}en(e),e.textContent=t,e.style.visibility="hidden",e.style.visibility="visible"}}function Fp(e,t,n){var i=n.offset+n.size;return n.position===Rp.Before?t<=e-i?i:t<=n.offset?n.offset-t:Math.max(e-t,0):t<=n.offset?n.offset-t:t<=e-i?i:0}n(3009),function(e){e[e.LEFT=0]="LEFT",e[e.RIGHT=1]="RIGHT"}(jp||(jp={})),function(e){e[e.BELOW=0]="BELOW",e[e.ABOVE=1]="ABOVE"}(Op||(Op={})),function(e){e[e.Before=0]="Before",e[e.After=1]="After"}(Rp||(Rp={}));var Bp,Hp=function(){function e(e){var t=this;this.$view=Zh(".context-view").hide(),this.setContainer(e),this.toDispose=[(0,I.s)((function(){t.setContainer(null)}))],this.toDisposeOnClean=null}return e.prototype.setContainer=function(t){var n=this;this.$container&&(this.$container.getHTMLElement().removeChild(this.$view.getHTMLElement()),this.$container.off(e.BUBBLE_UP_EVENTS),this.$container.off(e.BUBBLE_DOWN_EVENTS,!0),this.$container=null),t&&(this.$container=Zh(t),this.$view.appendTo(this.$container),this.$container.on(e.BUBBLE_UP_EVENTS,(function(e){n.onDOMEvent(e,document.activeElement,!1)})),this.$container.on(e.BUBBLE_DOWN_EVENTS,(function(e){n.onDOMEvent(e,document.activeElement,!0)}),null,!0))},e.prototype.show=function(e){this.isVisible()&&this.hide(),this.$view.setClass("context-view").empty().style({top:"0px",left:"0px"}).show(),this.toDisposeOnClean=e.render(this.$view.getHTMLElement()),this.delegate=e,this.doLayout()},e.prototype.layout=function(){this.isVisible()&&(!1!==this.delegate.canRelayout?(this.delegate.layout&&this.delegate.layout(),this.doLayout()):this.hide())},e.prototype.doLayout=function(){var e,t=this.delegate.getAnchor();if(Vn(t)){var n=Tn(t);e={top:n.top,left:n.left,width:n.width,height:n.height}}else{var i=t;e={top:i.y,left:i.x,width:i.width||0,height:i.height||0}}var o,r=this.$view.getTotalSize(),s=this.delegate.anchorPosition||Op.BELOW,a=this.delegate.anchorAlignment||jp.LEFT,u={offset:e.top,size:e.height,position:s===Op.BELOW?Rp.Before:Rp.After};o=a===jp.LEFT?{offset:e.left,size:0,position:Rp.Before}:{offset:e.left+e.width,size:0,position:Rp.After};var l=Tn(this.$container.getHTMLElement()),c=Fp(window.innerHeight,r.height,u)-l.top,h=Fp(window.innerWidth,r.width,o)-l.left;this.$view.removeClass("top","bottom","left","right"),this.$view.addClass(s===Op.BELOW?"bottom":"top"),this.$view.addClass(a===jp.LEFT?"left":"right"),this.$view.style({top:c+"px",left:h+"px",width:"initial"})},e.prototype.hide=function(e){this.delegate&&this.delegate.onHide&&this.delegate.onHide(e),this.delegate=null,this.toDisposeOnClean&&(this.toDisposeOnClean.dispose(),this.toDisposeOnClean=null),this.$view.hide()},e.prototype.isVisible=function(){return!!this.delegate},e.prototype.onDOMEvent=function(e,t,n){this.delegate&&(this.delegate.onDOMEvent?this.delegate.onDOMEvent(e,document.activeElement):n&&!Pn(e.target,this.$container.getHTMLElement())&&this.hide())},e.prototype.dispose=function(){this.hide(),this.toDispose=(0,I.AS)(this.toDispose)},e.BUBBLE_UP_EVENTS=["click","keydown","focus","blur"],e.BUBBLE_DOWN_EVENTS=["click"],e}(),Vp=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();!function(e){var t={next:function(){return{done:!0,value:void 0}}};function n(e,t){for(var n=e.next();!n.done;n=e.next())t(n.value)}e.empty=function(){return t},e.iterate=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=e.length),{next:function(){return t>=n?{done:!0,value:void 0}:{done:!1,value:e[t++]}}}},e.map=function(e,t){return{next:function(){var n=e.next(),i=n.done,o=n.value;return{done:i,value:i?void 0:t(o)}}}},e.filter=function(e,t){return{next:function(){for(;;){var n=e.next(),i=n.done,o=n.value;if(i)return{done:i,value:void 0};if(t(o))return{done:i,value:o}}}}},e.forEach=n,e.collect=function(e){var t=[];return n(e,(function(e){return t.push(e)})),t}}(Bp||(Bp={}));var Up,Yp=function(){function e(e,t,n,i){void 0===t&&(t=0),void 0===n&&(n=e.length),void 0===i&&(i=t-1),this.items=e,this.start=t,this.end=n,this.index=i}return e.prototype.next=function(){return this.index=Math.min(this.index+1,this.end),this.current()},e.prototype.current=function(){return this.index===this.start-1||this.index===this.end?null:this.items[this.index]},e}(),Zp=function(e){function t(t,n,i,o){return void 0===n&&(n=0),void 0===i&&(i=t.length),void 0===o&&(o=n-1),e.call(this,t,n,i,o)||this}return Vp(t,e),t.prototype.current=function(){return e.prototype.current.call(this)},t.prototype.previous=function(){return this.index=Math.max(this.index-1,this.start-1),this.current()},t.prototype.first=function(){return this.index=this.start,this.current()},t.prototype.last=function(){return this.index=this.end-1,this.current()},t.prototype.parent=function(){return null},t}(Yp),Gp=function(){function e(e,t){this.iterator=e,this.fn=t}return e.prototype.next=function(){return this.fn(this.iterator.next())},e}(),Qp=function(){function e(e,t){void 0===e&&(e=[]),void 0===t&&(t=10),this._initialize(e),this._limit=t,this._onChange()}return e.prototype.add=function(e){this._history.delete(e),this._history.add(e),this._onChange()},e.prototype.next=function(){return this._navigator.next()},e.prototype.previous=function(){return this._navigator.previous()},e.prototype.current=function(){return this._navigator.current()},e.prototype.parent=function(){return null},e.prototype.first=function(){return this._navigator.first()},e.prototype.last=function(){return this._navigator.last()},e.prototype.has=function(e){return this._history.has(e)},e.prototype._onChange=function(){this._reduceToLimit(),this._navigator=new Zp(this._elements,0,this._elements.length,this._elements.length)},e.prototype._reduceToLimit=function(){var e=this._elements;e.length>this._limit&&this._initialize(e.slice(e.length-this._limit))},e.prototype._initialize=function(e){this._history=new Set;for(var t=0,n=e;t=0){var n=void 0;e.equals(17)?n=(t+1)%r.length:e.equals(15)&&(n=0===t?r.length-1:t-1),e.equals(9)?r[t].blur():n>=0&&r[n].focus(),Yn(e,!0)}}})),this.setInputWidth();var s=document.createElement("div");s.className="controls",s.appendChild(this.caseSensitive.domNode),s.appendChild(this.wholeWords.domNode),s.appendChild(this.regex.domNode),this.domNode.appendChild(s)},t.prototype.validate=function(){this.inputBox.validate()},t.prototype.dispose=function(){e.prototype.dispose.call(this)},t}(kc);function fg(e,t){return e.getContext(document.activeElement).getValue(t)}var pg=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),gg=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},mg=function(e,t){return function(n,i){t(n,i,e)}},vg="historyNavigationWidget",yg="historyNavigationEnabled";function bg(e,t){var n=function(e,t){return e.createScoped(t.target)}(e,t);return function(e,t,n){new ce(n,t).bindTo(e)}(n,t,vg),{scopedContextKeyService:n,historyNavigationEnablement:new ce(yg,!0).bindTo(n)}}var _g=function(e){function t(t,n,i,o){var r=e.call(this,t,n,i)||this;return r._register(bg(o,{target:r.element,historyNavigator:r}).scopedContextKeyService),r}return pg(t,e),gg([mg(3,he)],t)}($p),wg=function(e){function t(t,n,i,o){var r=e.call(this,t,n,i)||this;return r._register(bg(o,{target:r.inputBox.element,historyNavigator:r.inputBox}).scopedContextKeyService),r}return pg(t,e),gg([mg(3,he)],t)}(dg);Z.registerCommandAndKeybindingRule({id:"history.showPrevious",weight:200,when:ne.and(new oe(vg),new re(yg,!0)),primary:16,secondary:[528],handler:function(e,t){fg(e.get(he),vg).historyNavigator.showPreviousValue()}}),Z.registerCommandAndKeybindingRule({id:"history.showNext",weight:200,when:new le([new oe(vg),new re(yg,!0)]),primary:18,secondary:[530],handler:function(e,t){fg(e.get(he),vg).historyNavigator.showNextValue()}});var Mg=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Cg=o.k("label.find","Find"),Sg=o.k("placeholder.find","Find"),Lg=o.k("label.previousMatchButton","Previous match"),Ig=o.k("label.nextMatchButton","Next match"),Ng=o.k("label.toggleSelectionFind","Find in selection"),xg=o.k("label.closeButton","Close"),Dg=o.k("label.replace","Replace"),kg=o.k("placeholder.replace","Replace"),Tg=o.k("label.replaceButton","Replace"),Eg=o.k("label.replaceAllButton","Replace All"),Ag=o.k("label.toggleReplaceButton","Toggle Replace mode"),jg=o.k("title.matchesCountLimit","Only the first {0} results are highlighted, but all find operations work on the entire text.",ap),Og=o.k("label.matchesLocation","{0} of {1}"),Rg=o.k("label.noResults","No Results"),Pg=411,zg=69,Wg=17+(zg+3+1)+92+2,Fg=function(e){this.afterLineNumber=e,this.heightInPx=34,this.suppressMouseDown=!1,this.domNode=document.createElement("div"),this.domNode.className="dock-find-viewzone"},Bg=function(e){function t(t,n,i,o,r,s,a){var u=e.call(this)||this;return u._codeEditor=t,u._controller=n,u._state=i,u._contextViewProvider=o,u._keybindingService=r,u._contextKeyService=s,u._isVisible=!1,u._isReplaceVisible=!1,u._updateHistoryDelayer=new mt(500),u._register(u._state.onFindReplaceStateChange((function(e){return u._onStateChanged(e)}))),u._buildDomNode(),u._updateButtons(),u._tryUpdateWidgetWidth(),u._register(u._codeEditor.onDidChangeConfiguration((function(e){e.readOnly&&(u._codeEditor.getConfiguration().readOnly&&u._state.change({isReplaceRevealed:!1},!1),u._updateButtons()),e.layoutInfo&&u._tryUpdateWidgetWidth()}))),u._register(u._codeEditor.onDidChangeCursorSelection((function(){u._isVisible&&u._updateToggleSelectionFindButton()}))),u._register(u._codeEditor.onDidFocusEditorWidget((function(){if(u._isVisible){var e=u._controller.getGlobalBufferTerm();e&&e!==u._state.searchString&&(u._state.change({searchString:e},!0),u._findInput.select())}}))),u._findInputFocused=Zf.bindTo(s),u._findFocusTracker=u._register(Gn(u._findInput.inputBox.inputElement)),u._register(u._findFocusTracker.onDidFocus((function(){u._findInputFocused.set(!0),u._updateSearchScope()}))),u._register(u._findFocusTracker.onDidBlur((function(){u._findInputFocused.set(!1)}))),u._replaceInputFocused=Gf.bindTo(s),u._replaceFocusTracker=u._register(Gn(u._replaceInputBox.inputElement)),u._register(u._replaceFocusTracker.onDidFocus((function(){u._replaceInputFocused.set(!0),u._updateSearchScope()}))),u._register(u._replaceFocusTracker.onDidBlur((function(){u._replaceInputFocused.set(!1)}))),u._codeEditor.addOverlayWidget(u),u._viewZone=new Fg(0),u._applyTheme(a.getTheme()),u._register(a.onThemeChange(u._applyTheme.bind(u))),u._register(u._codeEditor.onDidChangeModel((function(e){u._isVisible&&void 0!==u._viewZoneId&&u._codeEditor.changeViewZones((function(e){e.removeZone(u._viewZoneId),u._viewZoneId=void 0}))}))),u._register(u._codeEditor.onDidScrollChange((function(e){e.scrollTopChanged?u._layoutViewZone():setTimeout((function(){u._layoutViewZone()}),0)}))),u}return Mg(t,e),t.prototype.getId=function(){return t.ID},t.prototype.getDomNode=function(){return this._domNode},t.prototype.getPosition=function(){return this._isVisible?{preference:ru.TOP_RIGHT_CORNER}:null},t.prototype._onStateChanged=function(e){if(e.searchString&&(this._findInput.setValue(this._state.searchString),this._updateButtons()),e.replaceString&&(this._replaceInputBox.value=this._state.replaceString),e.isRevealed&&(this._state.isRevealed?this._reveal(!0):this._hide(!0)),e.isReplaceRevealed&&(this._state.isReplaceRevealed?this._codeEditor.getConfiguration().readOnly||this._isReplaceVisible||(this._isReplaceVisible=!0,this._replaceInputBox.width=this._findInput.inputBox.width,this._updateButtons()):this._isReplaceVisible&&(this._isReplaceVisible=!1,this._updateButtons())),e.isRegex&&this._findInput.setRegex(this._state.isRegex),e.wholeWord&&this._findInput.setWholeWords(this._state.wholeWord),e.matchCase&&this._findInput.setCaseSensitive(this._state.matchCase),e.searchScope&&(this._state.searchScope?this._toggleSelectionFind.checked=!0:this._toggleSelectionFind.checked=!1,this._updateToggleSelectionFindButton()),e.searchString||e.matchesCount||e.matchesPosition){var t=this._state.searchString.length>0&&0===this._state.matchesCount;un(this._domNode,"no-results",t),this._updateMatchesCount()}(e.searchString||e.currentMatch)&&this._layoutViewZone(),e.updateHistory&&this._delayedUpdateHistory()},t.prototype._delayedUpdateHistory=function(){this._updateHistoryDelayer.trigger(this._updateHistory.bind(this))},t.prototype._updateHistory=function(){this._state.searchString&&this._findInput.inputBox.addToHistory(),this._state.replaceString&&this._replaceInputBox.addToHistory()},t.prototype._updateMatchesCount=function(){var e;if(this._matchesCount.style.minWidth=zg+"px",this._state.matchesCount>=ap?this._matchesCount.title=jg:this._matchesCount.title="",this._matchesCount.firstChild&&this._matchesCount.removeChild(this._matchesCount.firstChild),this._state.matchesCount>0){var t=String(this._state.matchesCount);this._state.matchesCount>=ap&&(t+="+");var n=String(this._state.matchesPosition);"0"===n&&(n="?"),e=p.format(Og,n,t)}else e=Rg;this._matchesCount.appendChild(document.createTextNode(e)),zg=Math.max(zg,this._matchesCount.clientWidth)},t.prototype._updateToggleSelectionFindButton=function(){var e=this._codeEditor.getSelection(),t=!!e&&(e.startLineNumber!==e.endLineNumber||e.startColumn!==e.endColumn),n=this._toggleSelectionFind.checked;this._toggleSelectionFind.setEnabled(this._isVisible&&(n||t))},t.prototype._updateButtons=function(){this._findInput.setEnabled(this._isVisible),this._replaceInputBox.setEnabled(this._isVisible&&this._isReplaceVisible),this._updateToggleSelectionFindButton(),this._closeBtn.setEnabled(this._isVisible);var e=this._state.searchString.length>0;this._prevBtn.setEnabled(this._isVisible&&e),this._nextBtn.setEnabled(this._isVisible&&e),this._replaceBtn.setEnabled(this._isVisible&&this._isReplaceVisible&&e),this._replaceAllBtn.setEnabled(this._isVisible&&this._isReplaceVisible&&e),un(this._domNode,"replaceToggled",this._isReplaceVisible),this._toggleReplaceBtn.toggleClass("collapse",!this._isReplaceVisible),this._toggleReplaceBtn.toggleClass("expand",this._isReplaceVisible),this._toggleReplaceBtn.setExpanded(this._isReplaceVisible);var t=!this._codeEditor.getConfiguration().readOnly;this._toggleReplaceBtn.setEnabled(this._isVisible&&t)},t.prototype._reveal=function(e){var t=this;if(!this._isVisible){this._isVisible=!0;var n=this._codeEditor.getSelection();n&&(n.startLineNumber!==n.endLineNumber||n.startColumn!==n.endColumn)&&this._codeEditor.getConfiguration().contribInfo.find.autoFindInSelection?this._toggleSelectionFind.checked=!0:this._toggleSelectionFind.checked=!1,this._tryUpdateWidgetWidth(),this._updateButtons(),setTimeout((function(){sn(t._domNode,"visible"),t._domNode.setAttribute("aria-hidden","false")}),0),this._codeEditor.layoutOverlayWidget(this);var i=!0;if(this._codeEditor.getConfiguration().contribInfo.find.seedSearchStringFromSelection&&n){var o=Tn(this._codeEditor.getDomNode()),r=this._codeEditor.getScrolledVisiblePosition(n.getStartPosition()),s=o.left+r.left;if(r.topn.startLineNumber&&(i=!1);var a=kn(this._domNode).left;s>a&&(i=!1);var u=this._codeEditor.getScrolledVisiblePosition(n.getEndPosition());o.left+u.left>a&&(i=!1)}}this._showViewZone(i)}},t.prototype._hide=function(e){var t=this;this._isVisible&&(this._isVisible=!1,this._updateButtons(),an(this._domNode,"visible"),this._domNode.setAttribute("aria-hidden","true"),e&&this._codeEditor.focus(),this._codeEditor.layoutOverlayWidget(this),this._codeEditor.changeViewZones((function(e){void 0!==t._viewZoneId&&(e.removeZone(t._viewZoneId),t._viewZoneId=void 0,t._codeEditor.setScrollTop(t._codeEditor.getScrollTop()-t._viewZone.heightInPx))})))},t.prototype._layoutViewZone=function(){var e=this;this._isVisible&&void 0===this._viewZoneId&&this._codeEditor.changeViewZones((function(t){e._state.isReplaceRevealed?e._viewZone.heightInPx=64:e._viewZone.heightInPx=34,e._viewZoneId=t.addZone(e._viewZone),e._codeEditor.setScrollTop(e._codeEditor.getScrollTop()+e._viewZone.heightInPx)}))},t.prototype._showViewZone=function(e){var t=this;void 0===e&&(e=!0),this._isVisible&&this._codeEditor.changeViewZones((function(n){var i=34;void 0!==t._viewZoneId?(t._state.isReplaceRevealed?(t._viewZone.heightInPx=64,i=30):(t._viewZone.heightInPx=34,i=-30),n.removeZone(t._viewZoneId)):t._viewZone.heightInPx=34,t._viewZoneId=n.addZone(t._viewZone),e&&t._codeEditor.setScrollTop(t._codeEditor.getScrollTop()+i)}))},t.prototype._applyTheme=function(e){var t={inputActiveOptionBorder:e.getColor(us),inputBackground:e.getColor(rs),inputForeground:e.getColor(ss),inputBorder:e.getColor(as),inputValidationInfoBackground:e.getColor(ls),inputValidationInfoBorder:e.getColor(cs),inputValidationWarningBackground:e.getColor(hs),inputValidationWarningBorder:e.getColor(ds),inputValidationErrorBackground:e.getColor(fs),inputValidationErrorBorder:e.getColor(ps)};this._findInput.style(t),this._replaceInputBox.style(t)},t.prototype._tryUpdateWidgetWidth=function(){if(this._isVisible){var e=this._codeEditor.getConfiguration().layoutInfo.width,t=this._codeEditor.getConfiguration().layoutInfo.minimapWidth,n=!1,i=!1,o=!1;if(this._resized&&An(this._domNode)>Pg)return this._domNode.style.maxWidth=e-28-t-15+"px",void(this._replaceInputBox.inputElement.style.width=An(this._findInput.inputBox.inputElement)+"px");if(439+t>=e&&(i=!0),439+t-zg>=e&&(o=!0),439+t-zg>=e+50&&(n=!0),un(this._domNode,"collapsed-find-widget",n),un(this._domNode,"narrow-find-widget",o),un(this._domNode,"reduced-find-widget",i),o||n||(this._domNode.style.maxWidth=e-28-t-15+"px"),this._resized){var r=An(this._findInput.inputBox.inputElement);r>0&&(this._replaceInputBox.inputElement.style.width=r+"px")}}},t.prototype.focusFindInput=function(){this._findInput.select(),this._findInput.focus()},t.prototype.focusReplaceInput=function(){this._replaceInputBox.select(),this._replaceInputBox.focus()},t.prototype.highlightFindOptions=function(){this._findInput.highlightFindOptions()},t.prototype._updateSearchScope=function(){if(this._toggleSelectionFind.checked){var e=this._codeEditor.getSelection();1===e.endColumn&&e.endLineNumber>e.startLineNumber&&(e=e.setEndPosition(e.endLineNumber-1,1));var t=this._state.currentMatch;e.startLineNumber!==e.endLineNumber&&(s.Q.equalsRange(e,t)||this._state.change({searchScope:e},!0))}},t.prototype._onFindInputMouseDown=function(e){e.middleButton&&e.stopPropagation()},t.prototype._onFindInputKeyDown=function(e){return e.equals(3)?(this._codeEditor.getAction(Xf).run().done(null,S.dz),void e.preventDefault()):e.equals(1027)?(this._codeEditor.getAction($f).run().done(null,S.dz),void e.preventDefault()):e.equals(2)?(this._isReplaceVisible?this._replaceInputBox.focus():this._findInput.focusOnCaseSensitive(),void e.preventDefault()):e.equals(2066)?(this._codeEditor.focus(),void e.preventDefault()):void 0},t.prototype._onReplaceInputKeyDown=function(e){return e.equals(3)?(this._controller.replace(),void e.preventDefault()):e.equals(2051)?(this._controller.replaceAll(),void e.preventDefault()):e.equals(2)?(this._findInput.focusOnCaseSensitive(),void e.preventDefault()):e.equals(1026)?(this._findInput.focus(),void e.preventDefault()):e.equals(2066)?(this._codeEditor.focus(),void e.preventDefault()):void 0},t.prototype.getHorizontalSashTop=function(e){return 0},t.prototype.getHorizontalSashLeft=function(e){return 0},t.prototype.getHorizontalSashWidth=function(e){return 500},t.prototype._keybindingLabelFor=function(e){var t=this._keybindingService.lookupKeybinding(e);return t?" ("+t.getLabel()+")":""},t.prototype._buildFindPart=function(){var e=this;this._findInput=this._register(new wg(null,this._contextViewProvider,{width:221,label:Cg,placeholder:Sg,appendCaseSensitiveLabel:this._keybindingLabelFor(tp),appendWholeWordsLabel:this._keybindingLabelFor(np),appendRegexLabel:this._keybindingLabelFor(ip),validation:function(t){if(0===t.length)return null;if(!e._findInput.getRegex())return null;try{return new RegExp(t),null}catch(e){return{content:e.message}}}},this._contextKeyService)),this._findInput.setRegex(!!this._state.isRegex),this._findInput.setCaseSensitive(!!this._state.matchCase),this._findInput.setWholeWords(!!this._state.wholeWord),this._register(this._findInput.onKeyDown((function(t){return e._onFindInputKeyDown(t)}))),this._register(this._findInput.inputBox.onDidChange((function(){e._state.change({searchString:e._findInput.getValue()},!0)}))),this._register(this._findInput.onDidOptionChange((function(){e._state.change({isRegex:e._findInput.getRegex(),wholeWord:e._findInput.getWholeWords(),matchCase:e._findInput.getCaseSensitive()},!0)}))),this._register(this._findInput.onCaseSensitiveKeyDown((function(t){t.equals(1026)&&e._isReplaceVisible&&(e._replaceInputBox.focus(),t.preventDefault())}))),B.j9&&this._register(this._findInput.onMouseDown((function(t){return e._onFindInputMouseDown(t)}))),this._matchesCount=document.createElement("div"),this._matchesCount.className="matchesCount",this._updateMatchesCount(),this._prevBtn=this._register(new Vg({label:Lg+this._keybindingLabelFor($f),className:"previous",onTrigger:function(){e._codeEditor.getAction($f).run().done(null,S.dz)}})),this._nextBtn=this._register(new Vg({label:Ig+this._keybindingLabelFor(Xf),className:"next",onTrigger:function(){e._codeEditor.getAction(Xf).run().done(null,S.dz)}}));var t=document.createElement("div");return t.className="find-part",t.appendChild(this._findInput.domNode),t.appendChild(this._matchesCount),t.appendChild(this._prevBtn.domNode),t.appendChild(this._nextBtn.domNode),this._toggleSelectionFind=this._register(new Hg({parent:t,title:Ng+this._keybindingLabelFor(op),onChange:function(){if(e._toggleSelectionFind.checked){var t=e._codeEditor.getSelection();1===t.endColumn&&t.endLineNumber>t.startLineNumber&&(t=t.setEndPosition(t.endLineNumber-1,1)),t.isEmpty()||e._state.change({searchScope:t},!0)}else e._state.change({searchScope:null},!0)}})),this._closeBtn=this._register(new Vg({label:xg+this._keybindingLabelFor(ep),className:"close-fw",onTrigger:function(){e._state.change({isRevealed:!1,searchScope:null},!1)},onKeyDown:function(t){t.equals(2)&&e._isReplaceVisible&&(e._replaceBtn.isEnabled()?e._replaceBtn.focus():e._codeEditor.focus(),t.preventDefault())}})),t.appendChild(this._closeBtn.domNode),t},t.prototype._buildReplacePart=function(){var e=this,t=document.createElement("div");t.className="replace-input",t.style.width="221px",this._replaceInputBox=this._register(new _g(t,null,{ariaLabel:Dg,placeholder:kg,history:[]},this._contextKeyService)),this._register(hn(this._replaceInputBox.inputElement,"keydown",(function(t){return e._onReplaceInputKeyDown(t)}))),this._register(hn(this._replaceInputBox.inputElement,"input",(function(t){e._state.change({replaceString:e._replaceInputBox.value},!1)}))),this._replaceBtn=this._register(new Vg({label:Tg+this._keybindingLabelFor(rp),className:"replace",onTrigger:function(){e._controller.replace()},onKeyDown:function(t){t.equals(1026)&&(e._closeBtn.focus(),t.preventDefault())}})),this._replaceAllBtn=this._register(new Vg({label:Eg+this._keybindingLabelFor(sp),className:"replace-all",onTrigger:function(){e._controller.replaceAll()}}));var n=document.createElement("div");return n.className="replace-part",n.appendChild(t),n.appendChild(this._replaceBtn.domNode),n.appendChild(this._replaceAllBtn.domNode),n},t.prototype._buildDomNode=function(){var e=this,t=this._buildFindPart(),n=this._buildReplacePart();this._toggleReplaceBtn=this._register(new Vg({label:Ag,className:"toggle left",onTrigger:function(){e._state.change({isReplaceRevealed:!e._isReplaceVisible},!1),e._isReplaceVisible&&(e._replaceInputBox.width=e._findInput.inputBox.width),e._showViewZone()}})),this._toggleReplaceBtn.toggleClass("expand",this._isReplaceVisible),this._toggleReplaceBtn.toggleClass("collapse",!this._isReplaceVisible),this._toggleReplaceBtn.setExpanded(this._isReplaceVisible),this._domNode=document.createElement("div"),this._domNode.className="editor-widget find-widget",this._domNode.setAttribute("aria-hidden","true"),this._domNode.style.width=Pg+"px",this._domNode.appendChild(this._toggleReplaceBtn.domNode),this._domNode.appendChild(t),this._domNode.appendChild(n),this._buildSash()},t.prototype._buildSash=function(){var e=this;this._resizeSash=new Eh(this._domNode,this,{orientation:xh.VERTICAL}),this._resized=!1;var t=Pg;this._register(this._resizeSash.onDidStart((function(n){t=An(e._domNode)}))),this._register(this._resizeSash.onDidChange((function(n){e._resized=!0;var i=t+n.startX-n.currentX;if(!(i(parseFloat(Ln(e._domNode).maxWidth)||0)||(e._domNode.style.width=i+"px",e._isReplaceVisible&&(e._replaceInputBox.width=o))}})))},t.ID="editor.contrib.findWidget",t}(kc),Hg=function(e){function t(n){var i=e.call(this)||this;return i._opts=n,i._domNode=document.createElement("div"),i._domNode.className="monaco-checkbox",i._domNode.title=i._opts.title,i._domNode.tabIndex=0,i._checkbox=document.createElement("input"),i._checkbox.type="checkbox",i._checkbox.className="checkbox",i._checkbox.id="checkbox-"+t._COUNTER++,i._checkbox.tabIndex=-1,i._label=document.createElement("label"),i._label.className="label",i._label.htmlFor=i._checkbox.id,i._label.tabIndex=-1,i._domNode.appendChild(i._checkbox),i._domNode.appendChild(i._label),i._opts.parent.appendChild(i._domNode),i.onchange(i._checkbox,(function(e){i._opts.onChange()})),i}return Mg(t,e),Object.defineProperty(t.prototype,"domNode",{get:function(){return this._domNode},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"checked",{get:function(){return this._checkbox.checked},set:function(e){this._checkbox.checked=e},enumerable:!0,configurable:!0}),t.prototype.enable=function(){this._checkbox.removeAttribute("disabled")},t.prototype.disable=function(){this._checkbox.disabled=!0},t.prototype.setEnabled=function(e){e?(this.enable(),this.domNode.tabIndex=0):(this.disable(),this.domNode.tabIndex=-1)},t._COUNTER=0,t}(kc),Vg=function(e){function t(t){var n=e.call(this)||this;return n._opts=t,n._domNode=document.createElement("div"),n._domNode.title=n._opts.label,n._domNode.tabIndex=0,n._domNode.className="button "+n._opts.className,n._domNode.setAttribute("role","button"),n._domNode.setAttribute("aria-label",n._opts.label),n.onclick(n._domNode,(function(e){n._opts.onTrigger(),e.preventDefault()})),n.onkeydown(n._domNode,(function(e){if(e.equals(10)||e.equals(3))return n._opts.onTrigger(),void e.preventDefault();n._opts.onKeyDown&&n._opts.onKeyDown(e)})),n}return Mg(t,e),Object.defineProperty(t.prototype,"domNode",{get:function(){return this._domNode},enumerable:!0,configurable:!0}),t.prototype.isEnabled=function(){return this._domNode.tabIndex>=0},t.prototype.focus=function(){this._domNode.focus()},t.prototype.setEnabled=function(e){un(this._domNode,"disabled",!e),this._domNode.setAttribute("aria-disabled",String(!e)),this._domNode.tabIndex=e?0:-1},t.prototype.setExpanded=function(e){this._domNode.setAttribute("aria-expanded",String(!!e))},t.prototype.toggleClass=function(e,t){un(this._domNode,e,t)},t}(kc);Tr((function(e,t){var n=function(e,n){n&&t.addRule(".monaco-editor "+e+" { background-color: "+n+"; }")};n(".findMatch",e.getColor(Zs)),n(".currentFindMatch",e.getColor(Ys)),n(".findScope",e.getColor(Gs)),n(".find-widget",e.getColor(Ps));var i=e.getColor(os);i&&t.addRule(".monaco-editor .find-widget { box-shadow: 0 2px 8px "+i+"; }");var o=e.getColor(qs);o&&t.addRule(".monaco-editor .findMatch { border: 1px "+("hc"===e.type?"dotted":"solid")+" "+o+"; box-sizing: border-box; }");var r=e.getColor(Qs);r&&t.addRule(".monaco-editor .currentFindMatch { border: 2px solid "+r+"; padding: 1px; box-sizing: border-box; }");var s=e.getColor(Ks);s&&t.addRule(".monaco-editor .findScope { border: 1px "+("hc"===e.type?"dashed":"solid")+" "+s+"; }");var a=e.getColor(es);a&&t.addRule(".monaco-editor .find-widget { border: 2px solid "+a+"; }");var u=e.getColor(Xr);u&&t.addRule(".monaco-editor .find-widget.no-results .matchesCount { color: "+u+"; }");var l=e.getColor(Ws);if(l)t.addRule(".monaco-editor .find-widget .monaco-sash { background-color: "+l+"; width: 3px !important; margin-left: -4px;}");else{var c=e.getColor(zs);c&&t.addRule(".monaco-editor .find-widget .monaco-sash { background-color: "+c+"; width: 3px !important; margin-left: -4px;}")}}));var Ug=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Yg=function(e){function t(t,n,i,o){var r=e.call(this)||this;r._hideSoon=r._register(new Ct((function(){return r._hide()}),2e3)),r._isVisible=!1,r._editor=t,r._state=n,r._keybindingService=i,r._domNode=document.createElement("div"),r._domNode.className="findOptionsWidget",r._domNode.style.display="none",r._domNode.style.top="10px",r._domNode.setAttribute("role","presentation"),r._domNode.setAttribute("aria-hidden","true");var s=o.getTheme().getColor(us);return r.caseSensitive=r._register(new ag({appendTitle:r._keybindingLabelFor(tp),isChecked:r._state.matchCase,inputActiveOptionBorder:s})),r._domNode.appendChild(r.caseSensitive.domNode),r._register(r.caseSensitive.onChange((function(){r._state.change({matchCase:r.caseSensitive.checked},!1)}))),r.wholeWords=r._register(new ug({appendTitle:r._keybindingLabelFor(np),isChecked:r._state.wholeWord,inputActiveOptionBorder:s})),r._domNode.appendChild(r.wholeWords.domNode),r._register(r.wholeWords.onChange((function(){r._state.change({wholeWord:r.wholeWords.checked},!1)}))),r.regex=r._register(new lg({appendTitle:r._keybindingLabelFor(ip),isChecked:r._state.isRegex,inputActiveOptionBorder:s})),r._domNode.appendChild(r.regex.domNode),r._register(r.regex.onChange((function(){r._state.change({isRegex:r.regex.checked},!1)}))),r._editor.addOverlayWidget(r),r._register(r._state.onFindReplaceStateChange((function(e){var t=!1;e.isRegex&&(r.regex.checked=r._state.isRegex,t=!0),e.wholeWord&&(r.wholeWords.checked=r._state.wholeWord,t=!0),e.matchCase&&(r.caseSensitive.checked=r._state.matchCase,t=!0),!r._state.isRevealed&&t&&r._revealTemporarily()}))),r._register(dn(r._domNode,(function(e){return r._onMouseOut()}))),r._register(cn(r._domNode,"mouseover",(function(e){return r._onMouseOver()}))),r._applyTheme(o.getTheme()),r._register(o.onThemeChange(r._applyTheme.bind(r))),r}return Ug(t,e),t.prototype._keybindingLabelFor=function(e){var t=this._keybindingService.lookupKeybinding(e);return t?" ("+t.getLabel()+")":""},t.prototype.dispose=function(){this._editor.removeOverlayWidget(this),e.prototype.dispose.call(this)},t.prototype.getId=function(){return t.ID},t.prototype.getDomNode=function(){return this._domNode},t.prototype.getPosition=function(){return{preference:ru.TOP_RIGHT_CORNER}},t.prototype.highlightFindOptions=function(){this._revealTemporarily()},t.prototype._revealTemporarily=function(){this._show(),this._hideSoon.schedule()},t.prototype._onMouseOut=function(){this._hideSoon.schedule()},t.prototype._onMouseOver=function(){this._hideSoon.cancel()},t.prototype._show=function(){this._isVisible||(this._isVisible=!0,this._domNode.style.display="block")},t.prototype._hide=function(){this._isVisible&&(this._isVisible=!1,this._domNode.style.display="none")},t.prototype._applyTheme=function(e){var t={inputActiveOptionBorder:e.getColor(us)};this.caseSensitive.style(t),this.wholeWords.style(t),this.regex.style(t)},t.ID="editor.contrib.findOptionsWidget",t}(kc);Tr((function(e,t){var n=e.getColor(Ps);n&&t.addRule(".monaco-editor .findOptionsWidget { background-color: "+n+"; }");var i=e.getColor(os);i&&t.addRule(".monaco-editor .findOptionsWidget { box-shadow: 0 2px 8px "+i+"; }");var o=e.getColor(es);o&&t.addRule(".monaco-editor .findOptionsWidget { border: 2px solid "+o+"; }")}));var Zg=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Gg=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},Qg=function(e,t){return function(n,i){t(n,i,e)}};function qg(e){var t=e.getSelection();if(t.startLineNumber===t.endLineNumber){if(!t.isEmpty())return e.getModel().getValueInRange(t);var n=e.getModel().getWordAtPosition(t.getStartPosition());if(n)return n.word}return null}var Kg=function(e){function t(t,n,i,o){var r=e.call(this)||this;return r._editor=t,r._findWidgetVisible=Yf.bindTo(n),r._storageService=i,r._clipboardService=o,r._updateHistoryDelayer=new mt(500),r._state=r._register(new hp),r.loadQueryState(),r._register(r._state.onFindReplaceStateChange((function(e){return r._onStateChanged(e)}))),r._model=null,r._register(r._editor.onDidChangeModel((function(){var e=r._editor.getModel()&&r._state.isRevealed;r.disposeModel(),r._state.change({searchScope:null,matchCase:r._storageService.getBoolean("editor.matchCase",cp.WORKSPACE,!1),wholeWord:r._storageService.getBoolean("editor.wholeWord",cp.WORKSPACE,!1),isRegex:r._storageService.getBoolean("editor.isRegex",cp.WORKSPACE,!1)},!1),e&&r._start({forceRevealReplace:!1,seedSearchStringFromSelection:!1,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!1})}))),r}return Zg(t,e),t.get=function(e){return e.getContribution(t.ID)},t.prototype.dispose=function(){this.disposeModel(),e.prototype.dispose.call(this)},t.prototype.disposeModel=function(){this._model&&(this._model.dispose(),this._model=null)},t.prototype.getId=function(){return t.ID},t.prototype._onStateChanged=function(e){this.saveQueryState(e),e.isRevealed&&(this._state.isRevealed?this._findWidgetVisible.set(!0):(this._findWidgetVisible.reset(),this.disposeModel())),e.searchString&&this.setGlobalBufferTerm(this._state.searchString)},t.prototype.saveQueryState=function(e){e.isRegex&&this._storageService.store("editor.isRegex",this._state.actualIsRegex,cp.WORKSPACE),e.wholeWord&&this._storageService.store("editor.wholeWord",this._state.actualWholeWord,cp.WORKSPACE),e.matchCase&&this._storageService.store("editor.matchCase",this._state.actualMatchCase,cp.WORKSPACE)},t.prototype.loadQueryState=function(){this._state.change({matchCase:this._storageService.getBoolean("editor.matchCase",cp.WORKSPACE,this._state.matchCase),wholeWord:this._storageService.getBoolean("editor.wholeWord",cp.WORKSPACE,this._state.wholeWord),isRegex:this._storageService.getBoolean("editor.isRegex",cp.WORKSPACE,this._state.isRegex)},!1)},t.prototype.getState=function(){return this._state},t.prototype.closeFindWidget=function(){this._state.change({isRevealed:!1,searchScope:null},!1),this._editor.focus()},t.prototype.toggleCaseSensitive=function(){this._state.change({matchCase:!this._state.matchCase},!1)},t.prototype.toggleWholeWords=function(){this._state.change({wholeWord:!this._state.wholeWord},!1)},t.prototype.toggleRegex=function(){this._state.change({isRegex:!this._state.isRegex},!1)},t.prototype.toggleSearchScope=function(){if(this._state.searchScope)this._state.change({searchScope:null},!0);else{var e=this._editor.getSelection();1===e.endColumn&&e.endLineNumber>e.startLineNumber&&(e=e.setEndPosition(e.endLineNumber-1,1)),e.isEmpty()||this._state.change({searchScope:e},!0)}},t.prototype.setSearchString=function(e){this._state.isRegex&&(e=p.escapeRegExpCharacters(e)),this._state.change({searchString:e},!1)},t.prototype.highlightFindOptions=function(){},t.prototype._start=function(e){if(this.disposeModel(),this._editor.getModel()){var t,n={isRevealed:!0};e.seedSearchStringFromSelection&&(t=qg(this._editor))&&(this._state.isRegex?n.searchString=p.escapeRegExpCharacters(t):n.searchString=t),!n.searchString&&e.seedSearchStringFromGlobalClipboard&&(t=this.getGlobalBufferTerm())&&(n.searchString=t),e.forceRevealReplace?n.isReplaceRevealed=!0:this._findWidgetVisible.get()||(n.isReplaceRevealed=!1),this._state.change(n,!1),this._model||(this._model=new up(this._editor,this._state))}},t.prototype.start=function(e){this._start(e)},t.prototype.moveToNextMatch=function(){return!!this._model&&(this._model.moveToNextMatch(),!0)},t.prototype.moveToPrevMatch=function(){return!!this._model&&(this._model.moveToPrevMatch(),!0)},t.prototype.replace=function(){return!!this._model&&(this._model.replace(),!0)},t.prototype.replaceAll=function(){return!!this._model&&(this._model.replaceAll(),!0)},t.prototype.selectAllMatches=function(){return!!this._model&&(this._model.selectAllMatches(),this._editor.focus(),!0)},t.prototype.getGlobalBufferTerm=function(){return this._editor.getConfiguration().contribInfo.find.globalFindClipboard&&this._clipboardService&&!this._editor.getModel().isTooLargeForSyncing()?this._clipboardService.readFindText():""},t.prototype.setGlobalBufferTerm=function(e){this._editor.getConfiguration().contribInfo.find.globalFindClipboard&&this._clipboardService&&!this._editor.getModel().isTooLargeForSyncing()&&this._clipboardService.writeFindText(e)},t.ID="editor.contrib.findController",t=Gg([Qg(1,he),Qg(2,dp),Qg(3,gp)],t)}(I.jG),Jg=function(e){function t(t,n,i,o,r,s,a){var u=e.call(this,t,i,s,a)||this;return u._contextViewService=n,u._contextKeyService=i,u._keybindingService=o,u._themeService=r,u}return Zg(t,e),t.prototype._start=function(t){this._widget||this._createFindWidget(),e.prototype._start.call(this,t),2===t.shouldFocus?this._widget.focusReplaceInput():1===t.shouldFocus&&this._widget.focusFindInput()},t.prototype.highlightFindOptions=function(){this._widget||this._createFindWidget(),this._state.isRevealed?this._widget.highlightFindOptions():this._findOptionsWidget.highlightFindOptions()},t.prototype._createFindWidget=function(){this._widget=this._register(new Bg(this._editor,this,this._state,this._contextViewService,this._keybindingService,this._contextKeyService,this._themeService)),this._findOptionsWidget=this._register(new Yg(this._editor,this._state,this._keybindingService,this._themeService))},Gg([Qg(1,If),Qg(2,he),Qg(3,xf),Qg(4,Lr),Qg(5,dp),Qg(6,(0,N.lq)(gp))],t)}(Kg),Xg=function(e){function t(){return e.call(this,{id:"actions.find",label:o.k("startFindAction","Find"),alias:"Find",precondition:null,kbOpts:{kbExpr:null,primary:2084,weight:100},menubarOpts:{menuId:ve.MenubarEditMenu,group:"3_find",title:o.k({key:"miFind",comment:["&& denotes a mnemonic"]},"&&Find"),order:1}})||this}return Zg(t,e),t.prototype.run=function(e,t){var n=Kg.get(t);n&&n.start({forceRevealReplace:!1,seedSearchStringFromSelection:t.getConfiguration().contribInfo.find.seedSearchStringFromSelection,seedSearchStringFromGlobalClipboard:t.getConfiguration().contribInfo.find.globalFindClipboard,shouldFocus:1,shouldAnimate:!0})},t}(xe),$g=function(e){function t(){return e.call(this,{id:"actions.findWithSelection",label:o.k("startFindWithSelectionAction","Find With Selection"),alias:"Find With Selection",precondition:null,kbOpts:{kbExpr:null,primary:null,mac:{primary:2083},weight:100}})||this}return Zg(t,e),t.prototype.run=function(e,t){var n=Kg.get(t);n&&(n.start({forceRevealReplace:!1,seedSearchStringFromSelection:!0,seedSearchStringFromGlobalClipboard:!1,shouldFocus:1,shouldAnimate:!0}),n.setGlobalBufferTerm(n.getState().searchString))},t}(xe),em=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Zg(t,e),t.prototype.run=function(e,t){var n=Kg.get(t);n&&!this._run(n)&&(n.start({forceRevealReplace:!1,seedSearchStringFromSelection:0===n.getState().searchString.length&&t.getConfiguration().contribInfo.find.seedSearchStringFromSelection,seedSearchStringFromGlobalClipboard:!0,shouldFocus:0,shouldAnimate:!0}),this._run(n))},t}(xe),tm=function(e){function t(){return e.call(this,{id:Xf,label:o.k("findNextMatchAction","Find Next"),alias:"Find Next",precondition:null,kbOpts:{kbExpr:Oe.focus,primary:61,mac:{primary:2085,secondary:[61]},weight:100}})||this}return Zg(t,e),t.prototype._run=function(e){return e.moveToNextMatch()},t}(em),nm=function(e){function t(){return e.call(this,{id:$f,label:o.k("findPreviousMatchAction","Find Previous"),alias:"Find Previous",precondition:null,kbOpts:{kbExpr:Oe.focus,primary:1085,mac:{primary:3109,secondary:[1085]},weight:100}})||this}return Zg(t,e),t.prototype._run=function(e){return e.moveToPrevMatch()},t}(em),im=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Zg(t,e),t.prototype.run=function(e,t){var n=Kg.get(t);if(n){var i=qg(t);i&&n.setSearchString(i),this._run(n)||(n.start({forceRevealReplace:!1,seedSearchStringFromSelection:t.getConfiguration().contribInfo.find.seedSearchStringFromSelection,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!0}),this._run(n))}},t}(xe),om=function(e){function t(){return e.call(this,{id:"editor.action.nextSelectionMatchFindAction",label:o.k("nextSelectionMatchFindAction","Find Next Selection"),alias:"Find Next Selection",precondition:null,kbOpts:{kbExpr:Oe.focus,primary:2109,weight:100}})||this}return Zg(t,e),t.prototype._run=function(e){return e.moveToNextMatch()},t}(im),rm=function(e){function t(){return e.call(this,{id:"editor.action.previousSelectionMatchFindAction",label:o.k("previousSelectionMatchFindAction","Find Previous Selection"),alias:"Find Previous Selection",precondition:null,kbOpts:{kbExpr:Oe.focus,primary:3133,weight:100}})||this}return Zg(t,e),t.prototype._run=function(e){return e.moveToPrevMatch()},t}(im),sm=function(e){function t(){return e.call(this,{id:"editor.action.startFindReplaceAction",label:o.k("startReplace","Replace"),alias:"Replace",precondition:null,kbOpts:{kbExpr:null,primary:2086,mac:{primary:2596},weight:100},menubarOpts:{menuId:ve.MenubarEditMenu,group:"3_find",title:o.k({key:"miReplace",comment:["&& denotes a mnemonic"]},"&&Replace"),order:2}})||this}return Zg(t,e),t.prototype.run=function(e,t){if(!t.getConfiguration().readOnly){var n=Kg.get(t),i=t.getSelection(),o=!i.isEmpty()&&i.startLineNumber===i.endLineNumber&&t.getConfiguration().contribInfo.find.seedSearchStringFromSelection,r=n.getState().searchString||o?2:1;n&&n.start({forceRevealReplace:!0,seedSearchStringFromSelection:o,seedSearchStringFromGlobalClipboard:t.getConfiguration().contribInfo.find.seedSearchStringFromSelection,shouldFocus:r,shouldAnimate:!0})}},t}(xe);Ae(Jg),Ee(Xg),Ee($g),Ee(tm),Ee(nm),Ee(om),Ee(rm),Ee(sm);var am=Ne.bindToContribution(Kg.get);Te(new am({id:ep,precondition:Yf,handler:function(e){return e.closeFindWidget()},kbOpts:{weight:105,kbExpr:Oe.focus,primary:9,secondary:[1033]}})),Te(new am({id:tp,precondition:null,handler:function(e){return e.toggleCaseSensitive()},kbOpts:{weight:105,kbExpr:Oe.focus,primary:Qf.primary,mac:Qf.mac,win:Qf.win,linux:Qf.linux}})),Te(new am({id:np,precondition:null,handler:function(e){return e.toggleWholeWords()},kbOpts:{weight:105,kbExpr:Oe.focus,primary:qf.primary,mac:qf.mac,win:qf.win,linux:qf.linux}})),Te(new am({id:ip,precondition:null,handler:function(e){return e.toggleRegex()},kbOpts:{weight:105,kbExpr:Oe.focus,primary:Kf.primary,mac:Kf.mac,win:Kf.win,linux:Kf.linux}})),Te(new am({id:op,precondition:null,handler:function(e){return e.toggleSearchScope()},kbOpts:{weight:105,kbExpr:Oe.focus,primary:Jf.primary,mac:Jf.mac,win:Jf.win,linux:Jf.linux}})),Te(new am({id:rp,precondition:Yf,handler:function(e){return e.replace()},kbOpts:{weight:105,kbExpr:Oe.focus,primary:3094}})),Te(new am({id:sp,precondition:Yf,handler:function(e){return e.replaceAll()},kbOpts:{weight:105,kbExpr:Oe.focus,primary:2563}})),Te(new am({id:"editor.action.selectAllMatches",precondition:Yf,handler:function(e){return e.selectAllMatches()},kbOpts:{weight:105,kbExpr:Oe.focus,primary:515}})),n(9501);var um=16777215,lm=4278190080,cm=function(){function e(e,t,n){if(e.length!==t.length||e.length>65535)throw new Error("invalid startIndexes or endIndexes size");this._startIndexes=e,this._endIndexes=t,this._collapseStates=new Uint32Array(Math.ceil(e.length/32)),this._types=n}return e.prototype.ensureParentIndices=function(){var e=this;if(!this._parentsComputed){this._parentsComputed=!0;for(var t=[],n=function(n,i){var o=t[t.length-1];return e.getStartLineNumber(o)<=n&&e.getEndLineNumber(o)>=i},i=0,o=this._startIndexes.length;ium||s>um)throw new Error("startLineNumber or endLineNumber must not exceed "+um);for(;t.length>0&&!n(r,s);)t.pop();var a=t.length>0?t[t.length-1]:-1;t.push(i),this._startIndexes[i]=r+((255&a)<<24),this._endIndexes[i]=s+((65280&a)<<16)}}},Object.defineProperty(e.prototype,"length",{get:function(){return this._startIndexes.length},enumerable:!0,configurable:!0}),e.prototype.getStartLineNumber=function(e){return this._startIndexes[e]&um},e.prototype.getEndLineNumber=function(e){return this._endIndexes[e]&um},e.prototype.getType=function(e){return this._types?this._types[e]:void 0},e.prototype.hasTypes=function(){return!!this._types},e.prototype.isCollapsed=function(e){var t=e/32|0,n=e%32;return!!(this._collapseStates[t]&1<>>24)+((this._endIndexes[e]&lm)>>>16);return 65535===t?-1:t},e.prototype.contains=function(e,t){return this.getStartLineNumber(e)<=t&&this.getEndLineNumber(e)>=t},e.prototype.findIndex=function(e){var t=0,n=this._startIndexes.length;if(0===n)return-1;for(;t=0){if(this.getEndLineNumber(t)>=e)return t;for(t=this.getParentIndex(t);-1!==t;){if(this.contains(t,e))return t;t=this.getParentIndex(t)}}return-1},e.prototype.toString=function(){for(var e=[],t=0;t=this.endLineNumber},e.prototype.containsLine=function(e){return this.startLineNumber<=e&&e<=this.endLineNumber},e}(),dm=function(){function e(e,t){this._updateEventEmitter=new X.vl,this._textModel=e,this._decorationProvider=t,this._regions=new cm(new Uint32Array(0),new Uint32Array(0)),this._editorDecorationIds=[],this._isInitialized=!1}return Object.defineProperty(e.prototype,"regions",{get:function(){return this._regions},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onDidChange",{get:function(){return this._updateEventEmitter.event},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"textModel",{get:function(){return this._textModel},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isInitialized",{get:function(){return this._isInitialized},enumerable:!0,configurable:!0}),e.prototype.toggleCollapseState=function(e){var t=this;if(e.length){var n={};this._decorationProvider.changeDecorations((function(i){for(var o=0,r=e;o=h))break;o(a,c===h),a++}}u=s()}for(;a0?e:null},e.prototype.applyMemento=function(e){if(Array.isArray(e)){for(var t=[],n=0,i=e;n=0;){var r=this._regions.toRegion(i);t&&!t(r,o)||n.push(r),o++,i=r.parentIndex}return n},e.prototype.getRegionAtLine=function(e){if(this._regions){var t=this._regions.findRange(e);if(t>=0)return this._regions.toRegion(t)}return null},e.prototype.getRegionsInside=function(e,t){for(var n=[],i=t&&2===t.length,o=i?[]:null,r=e?e.regionIndex+1:0,s=e?e.endLineNumber:Number.MAX_VALUE,a=r,u=this._regions.length;a0&&!l.containedBy(o[o.length-1]);)o.pop();o.push(l),t(l,o.length)&&n.push(l)}else t&&!t(l)||n.push(l)}return n},e}();function fm(e,t,n,i){void 0===n&&(n=Number.MAX_VALUE);var o=[];if(i&&i.length>0)for(var r=0,s=i;r1)){var l=e.getRegionsInside(u,(function(e,i){return e.isCollapsed!==t&&i=0;s--)if(n!==o.isCollapsed(s)){var a=o.getStartLineNumber(s);t.test(i.getLineContent(a))&&r.push(o.toRegion(s))}e.toggleCollapseState(r)}function mm(e,t,n){for(var i=e.regions,o=[],r=i.length-1;r>=0;r--)n!==i.isCollapsed(r)&&t===i.getType(r)&&o.push(i.toRegion(r));e.toggleCollapseState(o)}var vm=function(){function e(e){this.editor=e,this.autoHideFoldingControls=!0}return e.prototype.getDecorationOption=function(t){return t?e.COLLAPSED_VISUAL_DECORATION:this.autoHideFoldingControls?e.EXPANDED_AUTO_HIDE_VISUAL_DECORATION:e.EXPANDED_VISUAL_DECORATION},e.prototype.deltaDecorations=function(e,t){return this.editor.deltaDecorations(e,t)},e.prototype.changeDecorations=function(e){return this.editor.changeDecorations(e)},e.COLLAPSED_VISUAL_DECORATION=Ho.kI.register({stickiness:Xi.kK.NeverGrowsWhenTypingAtEdges,afterContentClassName:"inline-folded",linesDecorationsClassName:"folding collapsed"}),e.EXPANDED_AUTO_HIDE_VISUAL_DECORATION=Ho.kI.register({stickiness:Xi.kK.NeverGrowsWhenTypingAtEdges,linesDecorationsClassName:"folding"}),e.EXPANDED_VISUAL_DECORATION=Ho.kI.register({stickiness:Xi.kK.NeverGrowsWhenTypingAtEdges,linesDecorationsClassName:"folding alwaysShowFoldIcons"}),e}(),ym=function(){function e(e){var t=this;this._updateEventEmitter=new X.vl,this._foldingModel=e,this._foldingModelListener=e.onDidChange((function(e){return t.updateHiddenRanges()})),this._hiddenRanges=[],e.regions.length&&this.updateHiddenRanges()}return Object.defineProperty(e.prototype,"onDidChange",{get:function(){return this._updateEventEmitter.event},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"hiddenRanges",{get:function(){return this._hiddenRanges},enumerable:!0,configurable:!0}),e.prototype.updateHiddenRanges=function(){for(var e=!1,t=[],n=0,i=0,o=Number.MAX_VALUE,r=-1,a=this._foldingModel.regions;n0},e.prototype.isHidden=function(e){return null!==bm(this._hiddenRanges,e)},e.prototype.adjustSelections=function(e){for(var t=this,n=!1,i=this._foldingModel.textModel,o=null,r=function(e){return o&&function(e,t){return e>=t.startLineNumber&&e<=t.endLineNumber}(e,o)||(o=bm(t._hiddenRanges,e)),o?o.startLineNumber-1:null},s=0,a=e.length;s0&&(this._hiddenRanges=[],this._updateEventEmitter.fire(this._hiddenRanges)),this._foldingModelListener&&(this._foldingModelListener.dispose(),this._foldingModelListener=null)},e}();function bm(e,t){var n=(0,tu.aB)(e,(function(e){return t=0&&e[n].endLineNumber>=t?e[n]:null}var _m=function(){function e(e){this.editorModel=e,this.id="indent"}return e.prototype.dispose=function(){},e.prototype.compute=function(e){var t=Ge.cx.getFoldingRules(this.editorModel.getLanguageIdentifier().id),n=t&&t.offSide,i=t&&t.markers;return J.g3.as(function(e,t,n,i){void 0===i&&(i=5e3);var o=e.getOptions().tabSize,r=new wm(i),s=void 0;n&&(s=new RegExp("("+n.start.source+")|(?:"+n.end.source+")"));var a=[];a.push({indent:-1,line:e.getLineCount()+1,marker:!1});for(var u=e.getLineCount();u>0;u--){var l=e.getLineContent(u),c=Ho.Bz.computeIndentLevel(l,o),h=a[a.length-1];if(-1!==c){var d=void 0;if(s&&(d=l.match(s))){if(!d[1]){a.push({indent:-2,line:u,marker:!0});continue}for(var f=a.length-1;f>0&&!a[f].marker;)f--;if(f>0){a.length=f+1,h=a[f],r.insertFirst(u,h.line,c),h.marker=!1,h.indent=c,h.line=u;continue}}if(h.indent>c){do{a.pop(),h=a[a.length-1]}while(h.indent>c);var p=h.line-1;p-u>=1&&r.insertFirst(u,p,c)}h.indent===c?h.line=u:a.push({indent:c,line:u,marker:!1})}else t&&!h.marker&&(h.line=u)}return r.toIndentRanges(e)}(this.editorModel,n,i))},e}(),wm=function(){function e(e){this._startIndexes=[],this._endIndexes=[],this._indentOccurrences=[],this._length=0,this._foldingRangesLimit=e}return e.prototype.insertFirst=function(e,t,n){if(!(e>um||t>um)){var i=this._length;this._startIndexes[i]=e,this._endIndexes[i]=t,this._length++,n<1e3&&(this._indentOccurrences[n]=(this._indentOccurrences[n]||0)+1)}},e.prototype.toIndentRanges=function(e){if(this._length<=this._foldingRangesLimit){for(var t=new Uint32Array(this._length),n=new Uint32Array(this._length),i=this._length-1,o=0;i>=0;i--,o++)t[o]=this._startIndexes[i],n[o]=this._endIndexes[i];return new cm(t,n)}var r=0,s=this._indentOccurrences.length;for(i=0;ithis._foldingRangesLimit){s=i;break}r+=a}}var u=e.getOptions().tabSize;for(t=new Uint32Array(this._foldingRangesLimit),n=new Uint32Array(this._foldingRangesLimit),i=this._length-1,o=0;i>=0;i--){var l=this._startIndexes[i],c=e.getLineContent(l),h=Ho.Bz.computeIndentLevel(c,u);(h0&&u.end>u.start&&u.end<=r&&i.push({start:u.start,end:u.end,rank:o,kind:u.kind})}}}),S.M_)}));return J.g3.join(o).then((function(e){return i}))}(this.providers,this.editorModel,e).then((function(e){return e?Im(e,t.limit):null}))},e.prototype.dispose=function(){},e}(),Lm=function(){function e(e){this._startIndexes=[],this._endIndexes=[],this._nestingLevels=[],this._nestingLevelCounts=[],this._types=[],this._length=0,this._foldingRangesLimit=e}return e.prototype.add=function(e,t,n,i){if(!(e>um||t>um)){var o=this._length;this._startIndexes[o]=e,this._endIndexes[o]=t,this._nestingLevels[o]=i,this._types[o]=n,this._length++,i<30&&(this._nestingLevelCounts[i]=(this._nestingLevelCounts[i]||0)+1)}},e.prototype.toIndentRanges=function(){if(this._length<=this._foldingRangesLimit){for(var e=new Uint32Array(this._length),t=new Uint32Array(this._length),n=0;nthis._foldingRangesLimit){o=n;break}i+=r}}e=new Uint32Array(this._foldingRangesLimit),t=new Uint32Array(this._foldingRangesLimit);for(var s=[],a=(n=0,0);no.start)if(u.end<=o.end)r.push(o),o=u,i.add(u.start,u.end,u.kind&&u.kind.value,r.length);else{if(u.start>o.end){do{o=r.pop()}while(o&&u.start>o.end);o&&r.push(o),o=u}i.add(u.start,u.end,u.kind&&u.kind.value,r.length)}}else o=u,i.add(u.start,u.end,u.kind&&u.kind.value,r.length)}return i.toIndentRanges()}var Nm="init",xm=function(){function e(e,t,n,i){this.editorModel=e,this.id=Nm,t.length&&(this.decorationIds=e.deltaDecorations([],t.map((function(t){return{range:{startLineNumber:t.startLineNumber,startColumn:0,endLineNumber:t.endLineNumber,endColumn:e.getLineLength(t.endLineNumber)},options:{stickiness:Xi.kK.NeverGrowsWhenTypingAtEdges}}}))),this.timeout=setTimeout(n,i))}return e.prototype.dispose=function(){this.decorationIds&&(this.editorModel.deltaDecorations(this.decorationIds,[]),this.decorationIds=void 0),"number"==typeof this.timeout&&(clearTimeout(this.timeout),this.timeout=void 0)},e.prototype.compute=function(e){var t=[];if(this.decorationIds)for(var n=0,i=this.decorationIds;n0&&(this.rangeProvider=new Sm(e,n))}return this.foldingStateMemento=null,this.rangeProvider},e.prototype.getFoldingModel=function(){return this.foldingModelPromise},e.prototype.onModelContentChanged=function(){var e=this;this.updateScheduler&&(this.foldingRegionPromise&&(this.foldingRegionPromise.cancel(),this.foldingRegionPromise=null),this.foldingModelPromise=this.updateScheduler.trigger((function(){if(!e.foldingModel)return null;var t=e.foldingRegionPromise=ft((function(t){return e.getRangeProvider(e.foldingModel.textModel).compute(t)}));return J.g3.wrap(t.then((function(n){if(n&&t===e.foldingRegionPromise){var i=e.editor.getSelections(),o=i?i.map((function(e){return e.startLineNumber})):[];e.foldingModel.update(n,o)}return e.foldingModel})))})))},e.prototype.onHiddenRangesChanges=function(e){if(e.length){var t=this.editor.getSelections();t&&this.hiddenRangeModel.adjustSelections(t)&&this.editor.setSelections(t)}this.editor.setHiddenAreas(e)},e.prototype.onCursorPositionChanged=function(){this.hiddenRangeModel.hasRanges()&&this.cursorChangedScheduler.schedule()},e.prototype.revealCursor=function(){var e=this;this.getFoldingModel().then((function(t){if(t){var n=e.editor.getSelections();if(n&&n.length>0){for(var i=[],o=function(n){var o=n.selectionStartLineNumber;e.hiddenRangeModel.isHidden(o)&&i.push.apply(i,t.getAllRegionsAtLine(o,(function(e){return e.isCollapsed&&o>e.startLineNumber})))},r=0,s=n;r=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},ov=function(e,t){return function(n,i){t(n,i,e)}};function rv(e){if((e=e.filter((function(e){return e.range}))).length){for(var t=e[0].range,n=1;n1)){var n=this.editor.getModel(),i=this.editor.getPosition(),o=!1,r=this.editor.onDidChangeModelContent((function(e){if(e.isFlush)return o=!0,void r.dispose();for(var t=0,n=e.changes.length;t1)){var n=this.editor.getModel(),i=n.getOptions(),o=i.tabSize,r=i.insertSpaces,s=new sd(this.editor,5);Xm(n,e,{tabSize:o,insertSpaces:r}).then((function(e){return t.workerService.computeMoreMinimalEdits(n.uri,e)})).then((function(e){s.validate(t.editor)&&!(0,tu.Ct)(e)&&(tv.execute(t.editor,e),rv(e))}))}},e.prototype.getId=function(){return e.ID},e.prototype.dispose=function(){this.callOnDispose=(0,I.AS)(this.callOnDispose),this.callOnModel=(0,I.AS)(this.callOnModel)},e.ID="editor.contrib.formatOnPaste",e=iv([ov(1,Ah)],e)}(),uv=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return nv(t,e),t.prototype.run=function(e,t){var n=this,i=e.get(Ah),o=e.get(Cr),r=this._getFormattingEdits(t);if(!r)return J.g3.as(void 0);var s=new sd(t,5);return r.then((function(e){return i.computeMoreMinimalEdits(t.getModel().uri,e)})).then((function(e){s.validate(t)&&!(0,tu.Ct)(e)&&(tv.execute(t,e),rv(e),t.focus())}),(function(e){if(!(e instanceof Error&&e.name===Jm.Name))throw e;n._notifyNoProviderError(o,t.getModel().getLanguageIdentifier().language)}))},t.prototype._notifyNoProviderError=function(e,t){e.info(o.k("no.provider","There is no formatter for '{0}'-files installed.",t))},t}(xe),lv=function(e){function t(){return e.call(this,{id:"editor.action.formatDocument",label:o.k("formatDocument.label","Format Document"),alias:"Format Document",precondition:Oe.writable,kbOpts:{kbExpr:Oe.editorTextFocus,primary:1572,linux:{primary:3111},weight:100},menuOpts:{when:Oe.hasDocumentFormattingProvider,group:"1_modification",order:1.3}})||this}return nv(t,e),t.prototype._getFormattingEdits=function(e){var t=e.getModel(),n=t.getOptions();return $m(t,{tabSize:n.tabSize,insertSpaces:n.insertSpaces})},t.prototype._notifyNoProviderError=function(e,t){e.info(o.k("no.documentprovider","There is no document formatter for '{0}'-files installed.",t))},t}(uv),cv=function(e){function t(){return e.call(this,{id:"editor.action.formatSelection",label:o.k("formatSelection.label","Format Selection"),alias:"Format Code",precondition:ne.and(Oe.writable,Oe.hasNonEmptySelection),kbOpts:{kbExpr:Oe.editorTextFocus,primary:O(2089,2084),weight:100},menuOpts:{when:ne.and(Oe.hasDocumentSelectionFormattingProvider,Oe.hasNonEmptySelection),group:"1_modification",order:1.31}})||this}return nv(t,e),t.prototype._getFormattingEdits=function(e){var t=e.getModel(),n=t.getOptions(),i=n.tabSize,o=n.insertSpaces;return Xm(t,e.getSelection(),{tabSize:i,insertSpaces:o})},t.prototype._notifyNoProviderError=function(e,t){e.info(o.k("no.selectionprovider","There is no selection formatter for '{0}'-files installed.",t))},t}(uv);function hv(e,t,n,i){var o=n.ordered(e).map((function(n){return pt((function(o){return i(n,e,t,o)})).then(void 0,(function(e){return(0,S.M_)(e),null}))}));return J.g3.join(o).then(tu.Bq).then((function(e){return(0,tu.Yc)(e)}))}function dv(e,t){return hv(e,t,No.UU,(function(e,t,n,i){return e.provideDefinition(t,n,i)}))}function fv(e,t){return hv(e,t,No.Lh,(function(e,t,n,i){return e.provideImplementation(t,n,i)}))}function pv(e,t){return hv(e,t,No.ce,(function(e,t,n,i){return e.provideTypeDefinition(t,n,i)}))}Ae(sv),Ae(av),Ee(lv),Ee(cv),k.registerCommand("editor.action.format",(function(e){var t=e.get(Ce).getFocusedCodeEditor();if(t)return(new(function(e){function t(){return e.call(this,{})||this}return nv(t,e),t.prototype._getFormattingEdits=function(e){var t=e.getModel(),n=e.getSelection(),i=t.getOptions(),o=i.tabSize,r=i.insertSpaces;return n.isEmpty()?$m(t,{tabSize:o,insertSpaces:r}):Xm(t,n,{tabSize:o,insertSpaces:r})},t}(uv))).run(e,t)})),ke("_executeDefinitionProvider",dv),ke("_executeImplementationProvider",fv),ke("_executeTypeDefinitionProvider",pv),n(8605),n(2215);var gv={badgeBackground:Go.fromHex("#4D4D4D"),badgeForeground:Go.fromHex("#FFFFFF")},mv=function(){function e(e,t){this.options=t||Object.create(null),(0,ri.co)(this.options,gv,!1),this.badgeBackground=this.options.badgeBackground,this.badgeForeground=this.options.badgeForeground,this.badgeBorder=this.options.badgeBorder,this.element=Qn(e,Jn(".monaco-count-badge")),this.countFormat=this.options.countFormat||"{0}",this.titleFormat=this.options.titleFormat||"",this.setCount(this.options.count||0)}return e.prototype.setCount=function(e){this.count=e,this.render()},e.prototype.setTitleFormat=function(e){this.titleFormat=e,this.render()},e.prototype.render=function(){this.element.textContent=(0,p.format)(this.countFormat,this.count),this.element.title=(0,p.format)(this.titleFormat,this.count),this.applyStyles()},e.prototype.style=function(e){this.badgeBackground=e.badgeBackground,this.badgeForeground=e.badgeForeground,this.badgeBorder=e.badgeBorder,this.applyStyles()},e.prototype.applyStyles=function(){if(this.element){var e=this.badgeBackground?this.badgeBackground.toString():null,t=this.badgeForeground?this.badgeForeground.toString():null,n=this.badgeBorder?this.badgeBorder.toString():null;this.element.style.backgroundColor=e,this.element.style.color=t,this.element.style.borderWidth=n?"1px":null,this.element.style.borderStyle=n?"solid":null,this.element.style.borderColor=n}},e}();function vv(e){return(0,p.escape)(e)}n(4445);var yv=function(){function e(e){this.domNode=document.createElement("span"),this.domNode.className="monaco-highlighted-label",this.didEverRender=!1,e.appendChild(this.domNode)}return Object.defineProperty(e.prototype,"element",{get:function(){return this.domNode},enumerable:!0,configurable:!0}),e.prototype.set=function(t,n,i,o){void 0===n&&(n=[]),void 0===i&&(i=""),t||(t=""),o&&(t=e.escapeNewLines(t,n)),this.didEverRender&&this.text===t&&this.title===i&&ri.aI(this.highlights,n)||(Array.isArray(n)||(n=[]),this.text=t,this.title=i,this.highlights=n,this.render())},e.prototype.render=function(){en(this.domNode);for(var e,t=[],n=0,i=0;i"),t.push(vv(this.text.substring(n,e.start))),t.push(""),n=e.end),t.push(''),t.push(vv(this.text.substring(e.start,e.end))),t.push(""),n=e.end);n"),t.push(vv(this.text.substring(n))),t.push("")),this.domNode.innerHTML=t.join(""),this.domNode.title=this.title,this.didEverRender=!0},e.prototype.dispose=function(){this.text=null,this.highlights=null},e.escapeNewLines=function(e,t){var n=0,i=0;return e.replace(/\r\n|\r|\n/,(function(e,o){i="\r\n"===e?-1:0,o+=n;for(var r=0,s=t;r=o&&(a.start+=i),a.end>=o&&(a.end+=i))}return n+=i,"⏎"}))},e}(),bv=n(6973);function _v(e,t,n){if(!e)return null;"string"==typeof e&&(e=L.A.file(e));var i=n?n.getWorkspaceFolder(e):null;if(i){var o=n.getWorkspace().folders.length>1,r=void 0;if(r=function(e,t,n){return!(e!==t)||!(!e||!t)&&(n?(0,p.equalsIgnoreCase)(e.toString(),t.toString()):e.toString()===t.toString())}(i.uri,e,!B.j9)?"":(0,bv.S8)((0,p.ltrim)(e.path.substr(i.uri.path.length),bv.Vn),!0),o){var s=i&&i.name?i.name:(0,bv.P8)(i.uri.fsPath);r=r?s+" • "+r:s}return r}if(e.scheme!==rr.file&&e.scheme!==rr.untitled)return e.with({query:null,fragment:null}).toString(!0);if(Mv(e.fsPath))return(0,bv.S8)(Cv(e.fsPath),!0);var a=(0,bv.S8)(e.fsPath,!0);return!B.uF&&t&&(a=function(e,t){if(B.uF||!e||!t)return e;var n=Iv.original===t?Iv.normalized:void 0;return n||(n=""+(0,p.rtrim)(t,bv.Vn)+bv.Vn,Iv={original:t,normalized:n}),(B.j9?(0,p.startsWith)(e,n):(0,p.startsWithIgnoreCase)(e,n))&&(e="~/"+e.substr(n.length)),e}(a,t.userHome)),a}function wv(e){if(!e)return null;"string"==typeof e&&(e=L.A.file(e));var t=(0,bv.P8)(e.path)||(e.scheme===rr.file?e.fsPath:e.path);return Mv(t)?Cv(t):t}function Mv(e){return B.uF&&e&&":"===e[1]}function Cv(e){return Mv(e)?e.charAt(0).toUpperCase()+e.slice(1):e}var Sv,Lv,Iv=Object.create(null),Nv=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),xv=function(){function e(e){this._element=e}return Object.defineProperty(e.prototype,"element",{get:function(){return this._element},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"textContent",{set:function(e){this.disposed||e===this._textContent||(this._textContent=e,this._element.textContent=e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"className",{set:function(e){this.disposed||e===this._className||(this._className=e,this._element.className=e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"title",{set:function(e){this.disposed||e===this._title||(this._title=e,this._title?this._element.title=e:this._element.removeAttribute("title"))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"empty",{set:function(e){this.disposed||e===this._empty||(this._empty=e,this._element.style.marginLeft=e?"0":null)},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){this.disposed=!0},e}(),Dv=function(e){function t(t,n){var i=e.call(this)||this;return i.domNode=i._register(new xv(Qn(t,Jn(".monaco-icon-label")))),i.labelDescriptionContainer=i._register(new xv(Qn(i.domNode.element,Jn(".monaco-icon-label-description-container")))),n&&n.supportHighlights?i.labelNode=i._register(new yv(Qn(i.labelDescriptionContainer.element,Jn("a.label-name")))):i.labelNode=i._register(new xv(Qn(i.labelDescriptionContainer.element,Jn("a.label-name")))),n&&n.supportDescriptionHighlights?i.descriptionNodeFactory=function(){return i._register(new yv(Qn(i.labelDescriptionContainer.element,Jn("span.label-description"))))}:i.descriptionNodeFactory=function(){return i._register(new xv(Qn(i.labelDescriptionContainer.element,Jn("span.label-description"))))},i}return Nv(t,e),t.prototype.setValue=function(e,t,n){var i=["monaco-icon-label"];n&&(n.extraClasses&&i.push.apply(i,n.extraClasses),n.italic&&i.push("italic")),this.domNode.className=i.join(" "),this.domNode.title=n&&n.title?n.title:"",this.labelNode instanceof yv?this.labelNode.set(e||"",n?n.matches:void 0):this.labelNode.textContent=e||"",(t||this.descriptionNode)&&(this.descriptionNode||(this.descriptionNode=this.descriptionNodeFactory()),this.descriptionNode instanceof yv?(this.descriptionNode.set(t||"",n?n.descriptionMatches:void 0),n&&n.descriptionTitle?this.descriptionNode.element.title=n.descriptionTitle:this.descriptionNode.element.removeAttribute("title")):(this.descriptionNode.textContent=t||"",this.descriptionNode.title=n&&n.descriptionTitle?n.descriptionTitle:"",this.descriptionNode.empty=!t))},t}(I.jG),kv=function(e){function t(t,n,i,o){var r=e.call(this,t)||this;return r.setFile(n,i,o),r}return Nv(t,e),t.prototype.setFile=function(e,t,n){var i=bv.pD(e.fsPath);this.setValue(wv(e),i&&"."!==i?_v(i,n,t):"",{title:e.fsPath})},t}(Dv),Tv=n(5983),Ev=(0,N.u1)("contextService");!function(e){e.isIWorkspace=function(e){return e&&"object"==typeof e&&"string"==typeof e.id&&"string"==typeof e.name&&Array.isArray(e.folders)}}(Sv||(Sv={})),function(e){e.isIWorkspaceFolder=function(e){return e&&"object"==typeof e&&L.A.isUri(e.uri)&&"string"==typeof e.name&&"function"==typeof e.toResource}}(Lv||(Lv={})),function(){function e(e,t,n,i,o){void 0===t&&(t=""),void 0===n&&(n=[]),void 0===i&&(i=null),this._id=e,this._name=t,this._configuration=i,this._ctime=o,this._foldersMap=Tv.cB.forPaths(),this.folders=n}Object.defineProperty(e.prototype,"folders",{get:function(){return this._folders},set:function(e){this._folders=e,this.updateFoldersMap()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"id",{get:function(){return this._id},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"name",{get:function(){return this._name},set:function(e){this._name=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"configuration",{get:function(){return this._configuration},set:function(e){this._configuration=e},enumerable:!0,configurable:!0}),e.prototype.getFolder=function(e){return e?this._foldersMap.findSubstr(e.toString()):null},e.prototype.updateFoldersMap=function(){this._foldersMap=Tv.cB.forPaths();for(var e=0,t=this.folders;e=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([Rv(3,N._Y),Rv(4,Ce),Rv(5,D),Rv(6,he),Rv(7,Lr),Rv(8,Cr)],t)}(_h),zv=(n(2029),n(8523),new Go(new Uo(0,122,204))),Wv={showArrow:!0,showFrame:!0,className:"",frameColor:zv,arrowColor:zv,keepEditorSelection:!1},Fv=function(){function e(e,t,n,i,o,r){this.domNode=e,this.afterLineNumber=t,this.afterColumn=n,this.heightInLines=i,this._onDomNodeTop=o,this._onComputedHeight=r}return e.prototype.onDomNodeTop=function(e){this._onDomNodeTop(e)},e.prototype.onComputedHeight=function(e){this._onComputedHeight(e)},e}(),Bv=function(){function e(e,t){this._id=e,this._domNode=t}return e.prototype.getId=function(){return this._id},e.prototype.getDomNode=function(){return this._domNode},e.prototype.getPosition=function(){return null},e}(),Hv=function(){function e(t){this._editor=t,this._ruleName=e._IdGenerator.nextId(),this._decorations=[]}return e.prototype.dispose=function(){this.hide(),Hn(this._ruleName)},Object.defineProperty(e.prototype,"color",{set:function(e){this._color!==e&&(this._color=e,this._updateStyle())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"height",{set:function(e){this._height!==e&&(this._height=e,this._updateStyle())},enumerable:!0,configurable:!0}),e.prototype._updateStyle=function(){var e,t,n;Hn(this._ruleName),e=".monaco-editor "+this._ruleName,t="border-style: solid; border-color: transparent; border-bottom-color: "+this._color+"; border-width: "+this._height+"px; bottom: -"+this._height+"px; margin-left: -"+this._height+"px; ",void 0===n&&(n=Bn()),n&&t&&n.sheet.insertRule(e+"{"+t+"}",0)},e.prototype.show=function(e){this._decorations=this._editor.deltaDecorations(this._decorations,[{range:s.Q.fromPositions(e),options:{className:this._ruleName,stickiness:Xi.kK.NeverGrowsWhenTypingAtEdges}}])},e.prototype.hide=function(){this._editor.deltaDecorations(this._decorations,[])},e._IdGenerator=new mp(".arrow-decoration-"),e}(),Vv=function(){function e(e,t){void 0===t&&(t={});var n=this;this._positionMarkerId=[],this._disposables=[],this._isShowing=!1,this.editor=e,this.options=ri.Go(t),ri.co(this.options,Wv,!1),this.domNode=document.createElement("div"),this.options.isAccessible||(this.domNode.setAttribute("aria-hidden","true"),this.domNode.setAttribute("role","presentation")),this._disposables.push(this.editor.onDidLayoutChange((function(e){var t=n._getWidth(e);n.domNode.style.width=t+"px",n.domNode.style.left=n._getLeft(e)+"px",n._onWidth(t)})))}return e.prototype.dispose=function(){var e=this;(0,I.AS)(this._disposables),this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),this._viewZone&&this.editor.changeViewZones((function(t){t.removeZone(e._viewZone.id),e._viewZone=null})),this.editor.deltaDecorations(this._positionMarkerId,[]),this._positionMarkerId=[]},e.prototype.create=function(){sn(this.domNode,"zone-widget"),sn(this.domNode,this.options.className),this.container=document.createElement("div"),sn(this.container,"zone-widget-container"),this.domNode.appendChild(this.container),this.options.showArrow&&(this._arrow=new Hv(this.editor),this._disposables.push(this._arrow)),this._fillContainer(this.container),this._initSash(),this._applyStyles()},e.prototype.style=function(e){e.frameColor&&(this.options.frameColor=e.frameColor),e.arrowColor&&(this.options.arrowColor=e.arrowColor),this._applyStyles()},e.prototype._applyStyles=function(){if(this.container){var e=this.options.frameColor.toString();this.container.style.borderTopColor=e,this.container.style.borderBottomColor=e}if(this._arrow){var t=this.options.arrowColor.toString();this._arrow.color=t}},e.prototype._getWidth=function(e){return e.width-e.minimapWidth-e.verticalScrollbarWidth},e.prototype._getLeft=function(e){return e.minimapWidth>0&&0===e.minimapLeft?e.minimapWidth:0},e.prototype._onViewZoneTop=function(e){this.domNode.style.top=e+"px"},e.prototype._onViewZoneHeight=function(e){this.domNode.style.height=e+"px";var t=e-this._decoratingElementsHeight();this.container.style.height=t+"px";var n=this.editor.getLayoutInfo();this._doLayout(t,this._getWidth(n)),this._resizeSash.layout()},Object.defineProperty(e.prototype,"position",{get:function(){var e=this._positionMarkerId[0];if(e){var t=this.editor.getModel().getDecorationRange(e);if(t)return t.getStartPosition()}},enumerable:!0,configurable:!0}),e.prototype.show=function(e,t){var n=s.Q.isIRange(e)?e:new s.Q(e.lineNumber,e.column,e.lineNumber,e.column);this._isShowing=!0,this._showImpl(n,t),this._isShowing=!1,this._positionMarkerId=this.editor.deltaDecorations(this._positionMarkerId,[{range:n,options:Ho.kI.EMPTY}])},e.prototype.hide=function(){var e=this;this._viewZone&&(this.editor.changeViewZones((function(t){t.removeZone(e._viewZone.id)})),this._viewZone=null),this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),this._arrow&&this._arrow.hide()},e.prototype._decoratingElementsHeight=function(){var e=this.editor.getConfiguration().lineHeight,t=0;return this.options.showArrow&&(t+=2*Math.round(e/3)),this.options.showFrame&&(t+=2*Math.round(e/9)),t},e.prototype._showImpl=function(e,t){var n=this,i={lineNumber:e.startLineNumber,column:e.startColumn},o=this.editor.getLayoutInfo(),r=this._getWidth(o);this.domNode.style.width=r+"px",this.domNode.style.left=this._getLeft(o)+"px";var s=document.createElement("div");s.style.overflow="hidden";var a=this.editor.getConfiguration().lineHeight,u=this.editor.getLayoutInfo().height/a*.8;t>=u&&(t=u);var l=0,c=0;if(this.options.showArrow&&(l=Math.round(a/3),this._arrow.height=l,this._arrow.show(i)),this.options.showFrame&&(c=Math.round(a/9)),this.editor.changeViewZones((function(e){n._viewZone&&e.removeZone(n._viewZone.id),n._overlayWidget&&(n.editor.removeOverlayWidget(n._overlayWidget),n._overlayWidget=null),n.domNode.style.top="-1000px",n._viewZone=new Fv(s,i.lineNumber,i.column,t,(function(e){return n._onViewZoneTop(e)}),(function(e){return n._onViewZoneHeight(e)})),n._viewZone.id=e.addZone(n._viewZone),n._overlayWidget=new Bv("vs.editor.contrib.zoneWidget"+n._viewZone.id,n.domNode),n.editor.addOverlayWidget(n._overlayWidget)})),this.options.showFrame){var h=this.options.frameWidth?this.options.frameWidth:c;this.container.style.borderTopWidth=h+"px",this.container.style.borderBottomWidth=h+"px"}var d=t*a-this._decoratingElementsHeight();this.container.style.top=l+"px",this.container.style.height=d+"px",this.container.style.overflow="hidden",this._doLayout(d,r),this.options.keepEditorSelection||this.editor.setSelection(e);var f=Math.min(this.editor.getModel().getLineCount(),Math.max(1,e.endLineNumber+1));this.revealLine(f)},e.prototype.revealLine=function(e){this.editor.revealLine(e,0)},e.prototype.setCssClass=function(e,t){t&&this.container.classList.remove(t),sn(this.container,e)},e.prototype._onWidth=function(e){},e.prototype._doLayout=function(e,t){},e.prototype._relayout=function(e){var t=this;this._viewZone.heightInLines!==e&&this.editor.changeViewZones((function(n){t._viewZone.heightInLines=e,n.layoutZone(t._viewZone.id)}))},e.prototype._initSash=function(){var e,t=this;this._resizeSash=new Eh(this.domNode,this,{orientation:xh.HORIZONTAL}),this.options.isResizeable||(this._resizeSash.hide(),this._resizeSash.state=Dh.Disabled),this._disposables.push(this._resizeSash.onDidStart((function(n){t._viewZone&&(e={startY:n.startY,heightInLines:t._viewZone.heightInLines})}))),this._disposables.push(this._resizeSash.onDidEnd((function(){e=void 0}))),this._disposables.push(this._resizeSash.onDidChange((function(n){if(e){var i=(n.currentY-e.startY)/t.editor.getConfiguration().lineHeight,o=i<0?Math.ceil(i):Math.floor(i),r=e.heightInLines+o;r>5&&r<35&&t._relayout(r)}})))},e.prototype.getHorizontalSashLeft=function(){return 0},e.prototype.getHorizontalSashTop=function(){return parseInt(this.domNode.style.height)-this._decoratingElementsHeight()/2},e.prototype.getHorizontalSashWidth=function(){var e=this.editor.getLayoutInfo();return e.width-e.minimapWidth},e}(),Uv=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();!function(e){e.inPeekEditor=new ce("inReferenceSearchEditor",!0),e.notInPeekEditor=e.inPeekEditor.toNegated()}(Av||(Av={}));var Yv={headerBackgroundColor:Go.white,primaryHeadingColor:Go.fromHex("#333333"),secondaryHeadingColor:Go.fromHex("#6c6c6cb3")},Zv=function(e){function t(t,n){void 0===n&&(n={});var i=e.call(this,t,n)||this;return i._onDidClose=new X.vl,ri.co(i.options,Yv,!1),i}return Uv(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this),this._onDidClose.fire(this)},Object.defineProperty(t.prototype,"onDidClose",{get:function(){return this._onDidClose.event},enumerable:!0,configurable:!0}),t.prototype.style=function(t){var n=this.options;t.headerBackgroundColor&&(n.headerBackgroundColor=t.headerBackgroundColor),t.primaryHeadingColor&&(n.primaryHeadingColor=t.primaryHeadingColor),t.secondaryHeadingColor&&(n.secondaryHeadingColor=t.secondaryHeadingColor),e.prototype.style.call(this,t)},t.prototype._applyStyles=function(){e.prototype._applyStyles.call(this);var t=this.options;this._headElement&&(this._headElement.style.backgroundColor=t.headerBackgroundColor.toString()),this._primaryHeading&&(this._primaryHeading.style.color=t.primaryHeadingColor.toString()),this._secondaryHeading&&(this._secondaryHeading.style.color=t.secondaryHeadingColor.toString()),this._bodyElement&&(this._bodyElement.style.borderColor=t.frameColor.toString())},t.prototype._fillContainer=function(e){this.setCssClass("peekview-widget"),this._headElement=Zh(".head").getHTMLElement(),this._bodyElement=Zh(".body").getHTMLElement(),this._fillHead(this._headElement),this._fillBody(this._bodyElement),e.appendChild(this._headElement),e.appendChild(this._bodyElement)},t.prototype._fillHead=function(e){var t=this,n=Zh(".peekview-title").on(Un.CLICK,(function(e){return t._onTitleClick(e)})).appendTo(this._headElement).getHTMLElement();this._primaryHeading=Zh("span.filename").appendTo(n).getHTMLElement(),this._secondaryHeading=Zh("span.dirname").appendTo(n).getHTMLElement(),this._metaHeading=Zh("span.meta").appendTo(n).getHTMLElement();var i=Zh(".peekview-actions").appendTo(this._headElement),r=this._getActionBarOptions();this._actionbarWidget=new Xh(i.getHTMLElement(),r),this._disposables.push(this._actionbarWidget),this._actionbarWidget.push(new $("peekview.close",o.k("label.close","Close"),"close-peekview-action",!0,(function(){return t.dispose(),null})),{label:!1,icon:!0})},t.prototype._getActionBarOptions=function(){return{}},t.prototype._onTitleClick=function(e){},t.prototype.setTitle=function(e,t){Zh(this._primaryHeading).safeInnerHtml(e),this._primaryHeading.setAttribute("aria-label",e),t?Zh(this._secondaryHeading).safeInnerHtml(t):en(this._secondaryHeading)},t.prototype.setMetaTitle=function(e){e?Zh(this._metaHeading).safeInnerHtml(e):en(this._metaHeading)},t.prototype._doLayout=function(e,t){if(!this._isShowing&&e<0)this.dispose();else{var n=Math.ceil(1.2*this.editor.getConfiguration().lineHeight),i=e-(n+2);this._doLayoutHead(n,t),this._doLayoutBody(i,t)}},t.prototype._doLayoutHead=function(e,t){this._headElement.style.height=p.format("{0}px",e),this._headElement.style.lineHeight=this._headElement.style.height},t.prototype._doLayoutBody=function(e,t){this._bodyElement.style.height=p.format("{0}px",e)},t}(Vv),Gv=function(){function e(e,t){this._parent=e,this._range=t,this._onRefChanged=new X.vl,this.onRefChanged=this._onRefChanged.event,this._id=vp.nextId()}return Object.defineProperty(e.prototype,"id",{get:function(){return this._id},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"parent",{get:function(){return this._parent},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"uri",{get:function(){return this._parent.uri},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"range",{get:function(){return this._range},set:function(e){this._range=e,this._onRefChanged.fire(this)},enumerable:!0,configurable:!0}),e.prototype.getAriaMessage=function(){return(0,o.k)("aria.oneReference","symbol in {0} on line {1} at column {2}",(0,bv.P8)(this.uri.fsPath),this.range.startLineNumber,this.range.startColumn)},e}(),Qv=function(){function e(e){this._modelReference=e}return Object.defineProperty(e.prototype,"_model",{get:function(){return this._modelReference.object.textEditorModel},enumerable:!0,configurable:!0}),e.prototype.preview=function(e,t){void 0===t&&(t=8);var n=this._model;if(n){var i=e.startLineNumber,o=e.startColumn,r=e.endLineNumber,a=e.endColumn,u=n.getWordUntilPosition({lineNumber:i,column:o-t}),l=new s.Q(i,u.startColumn,i,o),c=new s.Q(r,a,r,Number.MAX_VALUE);return{before:n.getValueInRange(l).replace(/^\s+/,p.empty),inside:n.getValueInRange(e),after:n.getValueInRange(c).replace(/\s+$/,p.empty)}}},e.prototype.dispose=function(){this._modelReference&&(this._modelReference.dispose(),this._modelReference=null)},e}(),qv=function(){function e(e,t){this._parent=e,this._uri=t,this._children=[]}return Object.defineProperty(e.prototype,"id",{get:function(){return this._uri.toString()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"parent",{get:function(){return this._parent},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"children",{get:function(){return this._children},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"uri",{get:function(){return this._uri},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"preview",{get:function(){return this._preview},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"failure",{get:function(){return this._loadFailure},enumerable:!0,configurable:!0}),e.prototype.getAriaMessage=function(){var e=this.children.length;return 1===e?(0,o.k)("aria.fileReferences.1","1 symbol in {0}, full path {1}",(0,bv.P8)(this.uri.fsPath),this.uri.fsPath):(0,o.k)("aria.fileReferences.N","{0} symbols in {1}, full path {2}",e,(0,bv.P8)(this.uri.fsPath),this.uri.fsPath)},e.prototype.resolve=function(e){var t=this;return this._resolved?J.g3.as(this):e.createModelReference(this._uri).then((function(e){if(!e.object)throw e.dispose(),new Error;return t._preview=new Qv(e),t._resolved=!0,t}),(function(e){return t._children=[],t._resolved=!0,t._loadFailure=e,t}))},e.prototype.dispose=function(){this._preview&&(this._preview.dispose(),this._preview=null)},e}(),Kv=function(){function e(t){var n,i=this;this._groups=[],this._references=[],this._onDidChangeReferenceRange=new X.vl,this.onDidChangeReferenceRange=this._onDidChangeReferenceRange.event,this._disposables=[],t.sort(e._compareReferences);for(var o=0,r=t;o0?(i=t?(i+1)%o:(i+o-1)%o,n.children[i]):(i=n.parent.groups.indexOf(n),t?(i=(i+1)%r,n.parent.groups[i].children[0]):(i=(i+r-1)%r,n.parent.groups[i].children[n.parent.groups[i].children.length-1]))},e.prototype.nearestReference=function(e,t){var n=this._references.map((function(n,i){return{idx:i,prefixLen:p.commonPrefixLength(n.uri.toString(),e.toString()),offsetDist:100*Math.abs(n.range.startLineNumber-t.lineNumber)+Math.abs(n.range.startColumn-t.column)}})).sort((function(e,t){return e.prefixLen>t.prefixLen?-1:e.prefixLent.offsetDist?1:0}))[0];if(n)return this._references[n.idx]},e.prototype.dispose=function(){this._groups=(0,I.AS)(this._groups),(0,I.AS)(this._disposables),this._disposables.length=0},e._compareReferences=function(e,t){var n=e.uri.toString(),i=t.uri.toString();return ni?1:s.Q.compareRangesUsingStarts(e.range,t.range)},e}(),Jv=(0,N.u1)("textModelService");function Xv(e,t){var n=Object.create(null);for(var i in t){var o=t[i];"string"==typeof o?n[i]=e.getColor(o):"function"==typeof o&&(n[i]=o(e))}return n}function $v(e,t,n){function i(i){var o=Xv(e.getTheme(),t);"function"==typeof n?n(o):n.style(o)}return i(e.getTheme()),e.onThemeChange(i)}function ey(e,t,n){return $v(t,(0,ri.co)(n||Object.create(null),iy,!1),e)}var ty,ny,iy={listFocusBackground:gs,listFocusForeground:ms,listActiveSelectionBackground:vs,listActiveSelectionForeground:ys,listFocusAndSelectionBackground:vs,listFocusAndSelectionForeground:ys,listInactiveSelectionBackground:bs,listInactiveSelectionForeground:_s,listInactiveFocusBackground:ws,listHoverBackground:Ms,listHoverForeground:Cs,listDropBackground:Ss,listFocusOutline:ts,listSelectionOutline:ts,listHoverOutline:ts},oy=(0,N.u1)("environmentService");n(461),function(e){e[e.ON_MOUSE_DOWN=0]="ON_MOUSE_DOWN",e[e.ON_MOUSE_UP=1]="ON_MOUSE_UP"}(ty||(ty={})),function(e){e[e.SINGLE_CLICK=0]="SINGLE_CLICK",e[e.DOUBLE_CLICK=1]="DOUBLE_CLICK"}(ny||(ny={}));var ry=function(){function e(){this._arr=[]}return e.prototype.set=function(e,t){this._arr.push({keybinding:R(e,B.OS),callback:t})},e.prototype.dispatch=function(e){for(var t=this._arr.length-1;t>=0;t--){var n=this._arr[t];if(e.equals(n.keybinding))return n.callback}return null},e}(),sy=function(){function e(e){void 0===e&&(e={clickBehavior:ty.ON_MOUSE_DOWN,keyboardSupport:!0,openMode:ny.SINGLE_CLICK});var t=this;this.options=e,this.downKeyBindingDispatcher=new ry,this.upKeyBindingDispatcher=new ry,("boolean"!=typeof e.keyboardSupport||e.keyboardSupport)&&(this.downKeyBindingDispatcher.set(16,(function(e,n){return t.onUp(e,n)})),this.downKeyBindingDispatcher.set(18,(function(e,n){return t.onDown(e,n)})),this.downKeyBindingDispatcher.set(15,(function(e,n){return t.onLeft(e,n)})),this.downKeyBindingDispatcher.set(17,(function(e,n){return t.onRight(e,n)})),B.zx&&(this.downKeyBindingDispatcher.set(2064,(function(e,n){return t.onLeft(e,n)})),this.downKeyBindingDispatcher.set(300,(function(e,n){return t.onDown(e,n)})),this.downKeyBindingDispatcher.set(302,(function(e,n){return t.onUp(e,n)}))),this.downKeyBindingDispatcher.set(11,(function(e,n){return t.onPageUp(e,n)})),this.downKeyBindingDispatcher.set(12,(function(e,n){return t.onPageDown(e,n)})),this.downKeyBindingDispatcher.set(14,(function(e,n){return t.onHome(e,n)})),this.downKeyBindingDispatcher.set(13,(function(e,n){return t.onEnd(e,n)})),this.downKeyBindingDispatcher.set(10,(function(e,n){return t.onSpace(e,n)})),this.downKeyBindingDispatcher.set(9,(function(e,n){return t.onEscape(e,n)})),this.upKeyBindingDispatcher.set(3,this.onEnter.bind(this)),this.upKeyBindingDispatcher.set(2051,this.onEnter.bind(this)))}return e.prototype.onMouseDown=function(e,t,n,i){if(void 0===i&&(i="mouse"),this.options.clickBehavior===ty.ON_MOUSE_DOWN&&(n.leftButton||n.middleButton)){if(n.target){if(n.target.tagName&&"input"===n.target.tagName.toLowerCase())return!1;if(zn(n.target,"scrollbar","monaco-tree"))return!1;if(zn(n.target,"monaco-action-bar","row"))return!1}return this.onLeftClick(e,t,n,i)}return!1},e.prototype.onClick=function(e,t,n){return B.zx&&n.ctrlKey?(n.preventDefault(),n.stopPropagation(),!1):(!n.target||!n.target.tagName||"input"!==n.target.tagName.toLowerCase())&&(this.options.clickBehavior!==ty.ON_MOUSE_DOWN||!n.leftButton&&!n.middleButton)&&this.onLeftClick(e,t,n)},e.prototype.onLeftClick=function(e,t,n,i){void 0===i&&(i="mouse");var o=n,r={origin:i,originalEvent:n,didClickOnTwistie:this.isClickOnTwistie(o)};return e.getInput()===t?(e.clearFocus(r),e.clearSelection(r)):(n&&o.browserEvent&&"mousedown"===o.browserEvent.type&&1===o.browserEvent.detail||n.preventDefault(),n.stopPropagation(),e.domFocus(),e.setSelection([t],r),e.setFocus(t,r),this.shouldToggleExpansion(t,o,i)&&(e.isExpanded(t)?e.collapse(t).done(null,S.dz):e.expand(t).done(null,S.dz))),!0},e.prototype.shouldToggleExpansion=function(e,t,n){var i="mouse"===n&&2===t.detail;return this.openOnSingleClick||i||this.isClickOnTwistie(t)},e.prototype.setOpenMode=function(e){this.options.openMode=e},Object.defineProperty(e.prototype,"openOnSingleClick",{get:function(){return this.options.openMode===ny.SINGLE_CLICK},enumerable:!0,configurable:!0}),e.prototype.isClickOnTwistie=function(e){var t=e.target;if(!rn(t,"content"))return!1;var n=window.getComputedStyle(t,":before");if("none"===n.backgroundImage||"none"===n.display)return!1;var i=parseInt(n.width)+parseInt(n.paddingRight);return e.browserEvent.offsetX<=i},e.prototype.onContextMenu=function(e,t,n){return n.target&&n.target.tagName&&"input"===n.target.tagName.toLowerCase()||n&&(n.preventDefault(),n.stopPropagation()),!1},e.prototype.onTap=function(e,t,n){var i=n.initialTarget;return(!i||!i.tagName||"input"!==i.tagName.toLowerCase())&&this.onLeftClick(e,t,n,"touch")},e.prototype.onKeyDown=function(e,t){return this.onKey(this.downKeyBindingDispatcher,e,t)},e.prototype.onKeyUp=function(e,t){return this.onKey(this.upKeyBindingDispatcher,e,t)},e.prototype.onKey=function(e,t,n){var i=e.dispatch(n.toKeybinding());return!(!i||!i(t,n)||(n.preventDefault(),n.stopPropagation(),0))},e.prototype.onUp=function(e,t){var n={origin:"keyboard",originalEvent:t};return e.getHighlight()?e.clearHighlight(n):(e.focusPrevious(1,n),e.reveal(e.getFocus()).done(null,S.dz)),!0},e.prototype.onPageUp=function(e,t){var n={origin:"keyboard",originalEvent:t};return e.getHighlight()?e.clearHighlight(n):(e.focusPreviousPage(n),e.reveal(e.getFocus()).done(null,S.dz)),!0},e.prototype.onDown=function(e,t){var n={origin:"keyboard",originalEvent:t};return e.getHighlight()?e.clearHighlight(n):(e.focusNext(1,n),e.reveal(e.getFocus()).done(null,S.dz)),!0},e.prototype.onPageDown=function(e,t){var n={origin:"keyboard",originalEvent:t};return e.getHighlight()?e.clearHighlight(n):(e.focusNextPage(n),e.reveal(e.getFocus()).done(null,S.dz)),!0},e.prototype.onHome=function(e,t){var n={origin:"keyboard",originalEvent:t};return e.getHighlight()?e.clearHighlight(n):(e.focusFirst(n),e.reveal(e.getFocus()).done(null,S.dz)),!0},e.prototype.onEnd=function(e,t){var n={origin:"keyboard",originalEvent:t};return e.getHighlight()?e.clearHighlight(n):(e.focusLast(n),e.reveal(e.getFocus()).done(null,S.dz)),!0},e.prototype.onLeft=function(e,t){var n={origin:"keyboard",originalEvent:t};if(e.getHighlight())e.clearHighlight(n);else{var i=e.getFocus();e.collapse(i).then((function(t){if(i&&!t)return e.focusParent(n),e.reveal(e.getFocus())})).done(null,S.dz)}return!0},e.prototype.onRight=function(e,t){var n={origin:"keyboard",originalEvent:t};if(e.getHighlight())e.clearHighlight(n);else{var i=e.getFocus();e.expand(i).then((function(t){if(i&&!t)return e.focusFirstChild(n),e.reveal(e.getFocus())})).done(null,S.dz)}return!0},e.prototype.onEnter=function(e,t){var n={origin:"keyboard",originalEvent:t};if(e.getHighlight())return!1;var i=e.getFocus();return i&&e.setSelection([i],n),!0},e.prototype.onSpace=function(e,t){if(e.getHighlight())return!1;var n=e.getFocus();return n&&e.toggleExpansion(n),!0},e.prototype.onEscape=function(e,t){var n={origin:"keyboard",originalEvent:t};return e.getHighlight()?(e.clearHighlight(n),!0):e.getSelection().length?(e.clearSelection(n),!0):!!e.getFocus()&&(e.clearFocus(n),!0)},e}(),ay=function(){function e(){}return e.prototype.getDragURI=function(e,t){return null},e.prototype.onDragStart=function(e,t,n){},e.prototype.onDragOver=function(e,t,n,i){return null},e.prototype.drop=function(e,t,n,i){},e}(),uy=function(){function e(){}return e.prototype.isVisible=function(e,t){return!0},e}(),ly=function(){function e(){}return e.prototype.getAriaLabel=function(e,t){return null},e}(),cy=function(){function e(e,t){this.styleElement=e,this.selectorSuffix=t}return e.prototype.style=function(e){var t=this.selectorSuffix?"."+this.selectorSuffix:"",n=[];e.listFocusBackground&&n.push(".monaco-tree"+t+".focused .monaco-tree-rows > .monaco-tree-row.focused:not(.highlighted) { background-color: "+e.listFocusBackground+"; }"),e.listFocusForeground&&n.push(".monaco-tree"+t+".focused .monaco-tree-rows > .monaco-tree-row.focused:not(.highlighted) { color: "+e.listFocusForeground+"; }"),e.listActiveSelectionBackground&&n.push(".monaco-tree"+t+".focused .monaco-tree-rows > .monaco-tree-row.selected:not(.highlighted) { background-color: "+e.listActiveSelectionBackground+"; }"),e.listActiveSelectionForeground&&n.push(".monaco-tree"+t+".focused .monaco-tree-rows > .monaco-tree-row.selected:not(.highlighted) { color: "+e.listActiveSelectionForeground+"; }"),e.listFocusAndSelectionBackground&&n.push("\n\t\t\t\t.monaco-tree-drag-image,\n\t\t\t\t.monaco-tree"+t+".focused .monaco-tree-rows > .monaco-tree-row.focused.selected:not(.highlighted) { background-color: "+e.listFocusAndSelectionBackground+"; }\n\t\t\t"),e.listFocusAndSelectionForeground&&n.push("\n\t\t\t\t.monaco-tree-drag-image,\n\t\t\t\t.monaco-tree"+t+".focused .monaco-tree-rows > .monaco-tree-row.focused.selected:not(.highlighted) { color: "+e.listFocusAndSelectionForeground+"; }\n\t\t\t"),e.listInactiveSelectionBackground&&n.push(".monaco-tree"+t+" .monaco-tree-rows > .monaco-tree-row.selected:not(.highlighted) { background-color: "+e.listInactiveSelectionBackground+"; }"),e.listInactiveSelectionForeground&&n.push(".monaco-tree"+t+" .monaco-tree-rows > .monaco-tree-row.selected:not(.highlighted) { color: "+e.listInactiveSelectionForeground+"; }"),e.listHoverBackground&&n.push(".monaco-tree"+t+" .monaco-tree-rows > .monaco-tree-row:hover:not(.highlighted):not(.selected):not(.focused) { background-color: "+e.listHoverBackground+"; }"),e.listHoverForeground&&n.push(".monaco-tree"+t+" .monaco-tree-rows > .monaco-tree-row:hover:not(.highlighted):not(.selected):not(.focused) { color: "+e.listHoverForeground+"; }"),e.listDropBackground&&n.push("\n\t\t\t\t.monaco-tree"+t+" .monaco-tree-wrapper.drop-target,\n\t\t\t\t.monaco-tree"+t+" .monaco-tree-rows > .monaco-tree-row.drop-target { background-color: "+e.listDropBackground+" !important; color: inherit !important; }\n\t\t\t"),e.listFocusOutline&&n.push("\n\t\t\t\t.monaco-tree-drag-image\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{ border: 1px solid "+e.listFocusOutline+"; background: #000; }\n\t\t\t\t.monaco-tree"+t+" .monaco-tree-rows > .monaco-tree-row \t\t\t\t\t\t\t\t\t\t\t\t\t\t{ border: 1px solid transparent; }\n\t\t\t\t.monaco-tree"+t+".focused .monaco-tree-rows > .monaco-tree-row.focused:not(.highlighted) \t\t\t\t\t\t{ border: 1px dotted "+e.listFocusOutline+"; }\n\t\t\t\t.monaco-tree"+t+".focused .monaco-tree-rows > .monaco-tree-row.selected:not(.highlighted) \t\t\t\t\t\t{ border: 1px solid "+e.listFocusOutline+"; }\n\t\t\t\t.monaco-tree"+t+" .monaco-tree-rows > .monaco-tree-row.selected:not(.highlighted) \t\t\t\t\t\t\t{ border: 1px solid "+e.listFocusOutline+"; }\n\t\t\t\t.monaco-tree"+t+" .monaco-tree-rows > .monaco-tree-row:hover:not(.highlighted):not(.selected):not(.focused) \t{ border: 1px dashed "+e.listFocusOutline+"; }\n\t\t\t\t.monaco-tree"+t+" .monaco-tree-wrapper.drop-target,\n\t\t\t\t.monaco-tree"+t+" .monaco-tree-rows > .monaco-tree-row.drop-target\t\t\t\t\t\t\t\t\t\t\t\t{ border: 1px dashed "+e.listFocusOutline+"; }\n\t\t\t");var i=n.join("\n");i!==this.styleElement.innerHTML&&(this.styleElement.innerHTML=i)},e}(),hy=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),dy=function(){function e(e){this._onDispose=new X.vl,this.onDispose=this._onDispose.event,this._item=e}return Object.defineProperty(e.prototype,"item",{get:function(){return this._item},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){this._onDispose&&(this._onDispose.fire(),this._onDispose.dispose(),this._onDispose=null)},e}(),fy=function(){function e(){this.locks=Object.create({})}return e.prototype.isLocked=function(e){return!!this.locks[e.id]},e.prototype.run=function(e,t){var n,i,o=this,r=this.getLock(e);return r?new J.g3((function(i,s){n=(0,X.Oo)(r.onDispose)((function(){return o.run(e,t).then(i,s)}))}),(function(){n.dispose()})):new J.g3((function(n,r){if(e.isDisposed())return r(new Error("Item is disposed."));var s=o.locks[e.id]=new dy(e);return i=t().then((function(t){return delete o.locks[e.id],s.dispose(),t})).then(n,r)}),(function(){return i.cancel()}))},e.prototype.getLock=function(e){var t;for(t in this.locks){var n=this.locks[t];if(e.intersects(n.item))return n}return null},e}(),py=function(){function e(){this._isDisposed=!1,this._onDidRevealItem=new X._B,this.onDidRevealItem=this._onDidRevealItem.event,this._onExpandItem=new X._B,this.onExpandItem=this._onExpandItem.event,this._onDidExpandItem=new X._B,this.onDidExpandItem=this._onDidExpandItem.event,this._onCollapseItem=new X._B,this.onCollapseItem=this._onCollapseItem.event,this._onDidCollapseItem=new X._B,this.onDidCollapseItem=this._onDidCollapseItem.event,this._onDidAddTraitItem=new X._B,this.onDidAddTraitItem=this._onDidAddTraitItem.event,this._onDidRemoveTraitItem=new X._B,this.onDidRemoveTraitItem=this._onDidRemoveTraitItem.event,this._onDidRefreshItem=new X._B,this.onDidRefreshItem=this._onDidRefreshItem.event,this._onRefreshItemChildren=new X._B,this.onRefreshItemChildren=this._onRefreshItemChildren.event,this._onDidRefreshItemChildren=new X._B,this.onDidRefreshItemChildren=this._onDidRefreshItemChildren.event,this._onDidDisposeItem=new X._B,this.onDidDisposeItem=this._onDidDisposeItem.event,this.items={}}return e.prototype.register=function(e){H(!this.isRegistered(e.id),"item already registered: "+e.id);var t=(0,I.qE)([this._onDidRevealItem.add(e.onDidReveal),this._onExpandItem.add(e.onExpand),this._onDidExpandItem.add(e.onDidExpand),this._onCollapseItem.add(e.onCollapse),this._onDidCollapseItem.add(e.onDidCollapse),this._onDidAddTraitItem.add(e.onDidAddTrait),this._onDidRemoveTraitItem.add(e.onDidRemoveTrait),this._onDidRefreshItem.add(e.onDidRefresh),this._onRefreshItemChildren.add(e.onRefreshChildren),this._onDidRefreshItemChildren.add(e.onDidRefreshChildren),this._onDidDisposeItem.add(e.onDidDispose)]);this.items[e.id]={item:e,disposable:t}},e.prototype.deregister=function(e){H(this.isRegistered(e.id),"item not registered: "+e.id),this.items[e.id].disposable.dispose(),delete this.items[e.id]},e.prototype.isRegistered=function(e){return this.items.hasOwnProperty(e)},e.prototype.getItem=function(e){var t=this.items[e];return t?t.item:null},e.prototype.dispose=function(){this.items=null,this._onDidRevealItem.dispose(),this._onExpandItem.dispose(),this._onDidExpandItem.dispose(),this._onCollapseItem.dispose(),this._onDidCollapseItem.dispose(),this._onDidAddTraitItem.dispose(),this._onDidRemoveTraitItem.dispose(),this._onDidRefreshItem.dispose(),this._onRefreshItemChildren.dispose(),this._onDidRefreshItemChildren.dispose(),this._isDisposed=!0},e.prototype.isDisposed=function(){return this._isDisposed},e}(),gy=function(){function e(e,t,n,i,o){this._onDidCreate=new X.vl,this._onDidReveal=new X.vl,this.onDidReveal=this._onDidReveal.event,this._onExpand=new X.vl,this.onExpand=this._onExpand.event,this._onDidExpand=new X.vl,this.onDidExpand=this._onDidExpand.event,this._onCollapse=new X.vl,this.onCollapse=this._onCollapse.event,this._onDidCollapse=new X.vl,this.onDidCollapse=this._onDidCollapse.event,this._onDidAddTrait=new X.vl,this.onDidAddTrait=this._onDidAddTrait.event,this._onDidRemoveTrait=new X.vl,this.onDidRemoveTrait=this._onDidRemoveTrait.event,this._onDidRefresh=new X.vl,this.onDidRefresh=this._onDidRefresh.event,this._onRefreshChildren=new X.vl,this.onRefreshChildren=this._onRefreshChildren.event,this._onDidRefreshChildren=new X.vl,this.onDidRefreshChildren=this._onDidRefreshChildren.event,this._onDidDispose=new X.vl,this.onDidDispose=this._onDidDispose.event,this.registry=t,this.context=n,this.lock=i,this.element=o,this.id=e,this.registry.register(this),this.doesHaveChildren=this.context.dataSource.hasChildren(this.context.tree,this.element),this.needsChildrenRefresh=!0,this.parent=null,this.previous=null,this.next=null,this.firstChild=null,this.lastChild=null,this.traits={},this.depth=0,this.expanded=this.context.dataSource.shouldAutoexpand&&this.context.dataSource.shouldAutoexpand(this.context.tree,o),this._onDidCreate.fire(this),this.visible=this._isVisible(),this.height=this._getHeight(),this._isDisposed=!1}return e.prototype.getElement=function(){return this.element},e.prototype.hasChildren=function(){return this.doesHaveChildren},e.prototype.getDepth=function(){return this.depth},e.prototype.isVisible=function(){return this.visible},e.prototype.setVisible=function(e){this.visible=e},e.prototype.isExpanded=function(){return this.expanded},e.prototype._setExpanded=function(e){this.expanded=e},e.prototype.reveal=function(e){void 0===e&&(e=null);var t={item:this,relativeTop:e};this._onDidReveal.fire(t)},e.prototype.expand=function(){var e=this;return this.isExpanded()||!this.doesHaveChildren||this.lock.isLocked(this)?J.g3.as(!1):this.lock.run(this,(function(){var t={item:e};return e._onExpand.fire(t),(e.needsChildrenRefresh?e.refreshChildren(!1,!0,!0):J.g3.as(null)).then((function(){return e._setExpanded(!0),e._onDidExpand.fire(t),!0}))})).then((function(t){return!e.isDisposed()&&(e.context.options.autoExpandSingleChildren&&t&&null!==e.firstChild&&e.firstChild===e.lastChild&&e.firstChild.isVisible()?e.firstChild.expand().then((function(){return!0})):t)}))},e.prototype.collapse=function(e){var t=this;if(void 0===e&&(e=!1),e){var n=J.g3.as(null);return this.forEachChild((function(e){n=n.then((function(){return e.collapse(!0)}))})),n.then((function(){return t.collapse(!1)}))}return!this.isExpanded()||this.lock.isLocked(this)?J.g3.as(!1):this.lock.run(this,(function(){var e={item:t};return t._onCollapse.fire(e),t._setExpanded(!1),t._onDidCollapse.fire(e),J.g3.as(!0)}))},e.prototype.addTrait=function(e){var t={item:this,trait:e};this.traits[e]=!0,this._onDidAddTrait.fire(t)},e.prototype.removeTrait=function(e){var t={item:this,trait:e};delete this.traits[e],this._onDidRemoveTrait.fire(t)},e.prototype.hasTrait=function(e){return this.traits[e]||!1},e.prototype.getAllTraits=function(){var e,t=[];for(e in this.traits)this.traits.hasOwnProperty(e)&&this.traits[e]&&t.push(e);return t},e.prototype.getHeight=function(){return this.height},e.prototype.refreshChildren=function(t,n,i){var o=this;if(void 0===n&&(n=!1),void 0===i&&(i=!1),!i&&!this.isExpanded())return this.needsChildrenRefresh=!0,J.g3.as(this);this.needsChildrenRefresh=!1;var r=function(){var i={item:o,isNested:n};o._onRefreshChildren.fire(i);var r=(o.doesHaveChildren?o.context.dataSource.getChildren(o.context.tree,o.element):J.g3.as([])).then((function(n){if(o.isDisposed()||o.registry.isDisposed())return J.g3.as(null);if(!Array.isArray(n))return J.g3.wrapError(new Error("Please return an array of children."));n=n?n.slice(0):[],n=o.sort(n);for(var i={};null!==o.firstChild;)i[o.firstChild.id]=o.firstChild,o.removeChild(o.firstChild);for(var r=0,s=n.length;r0||this.m_modifiedCount>0)&&this.m_changes.push(new by(this.m_originalStart,this.m_originalCount,this.m_modifiedStart,this.m_modifiedCount)),this.m_originalCount=0,this.m_modifiedCount=0,this.m_originalStart=Number.MAX_VALUE,this.m_modifiedStart=Number.MAX_VALUE},e.prototype.AddOriginalElement=function(e,t){this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,t),this.m_originalCount++},e.prototype.AddModifiedElement=function(e,t){this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,t),this.m_modifiedCount++},e.prototype.getChanges=function(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes},e.prototype.getReverseChanges=function(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes.reverse(),this.m_changes},e}(),Ny=function(){function e(e,t,n){void 0===n&&(n=null),this.OriginalSequence=e,this.ModifiedSequence=t,this.ContinueProcessingPredicate=n,this.m_forwardHistory=[],this.m_reverseHistory=[]}return e.prototype.ElementsAreEqual=function(e,t){return this.OriginalSequence.getElementAtIndex(e)===this.ModifiedSequence.getElementAtIndex(t)},e.prototype.OriginalElementsAreEqual=function(e,t){return this.OriginalSequence.getElementAtIndex(e)===this.OriginalSequence.getElementAtIndex(t)},e.prototype.ModifiedElementsAreEqual=function(e,t){return this.ModifiedSequence.getElementAtIndex(e)===this.ModifiedSequence.getElementAtIndex(t)},e.prototype.ComputeDiff=function(e){return this._ComputeDiff(0,this.OriginalSequence.getLength()-1,0,this.ModifiedSequence.getLength()-1,e)},e.prototype._ComputeDiff=function(e,t,n,i,o){var r=this.ComputeDiffRecursive(e,t,n,i,[!1]);return o?this.ShiftChanges(r):r},e.prototype.ComputeDiffRecursive=function(e,t,n,i,o){for(o[0]=!1;e<=t&&n<=i&&this.ElementsAreEqual(e,n);)e++,n++;for(;t>=e&&i>=n&&this.ElementsAreEqual(t,i);)t--,i--;if(e>t||n>i){var r=void 0;return n<=i?(Sy.Assert(e===t+1,"originalStart should only be one more than originalEnd"),r=[new by(e,0,n,i-n+1)]):e<=t?(Sy.Assert(n===i+1,"modifiedStart should only be one more than modifiedEnd"),r=[new by(e,t-e+1,n,0)]):(Sy.Assert(e===t+1,"originalStart should only be one more than originalEnd"),Sy.Assert(n===i+1,"modifiedStart should only be one more than modifiedEnd"),r=[]),r}var s=[0],a=[0],u=this.ComputeRecursionPoint(e,t,n,i,s,a,o),l=s[0],c=a[0];if(null!==u)return u;if(!o[0]){var h,d=this.ComputeDiffRecursive(e,l,n,c,o);return h=o[0]?[new by(l+1,t-(l+1)+1,c+1,i-(c+1)+1)]:this.ComputeDiffRecursive(l+1,t,c+1,i,o),this.ConcatenateChanges(d,h)}return[new by(e,t-e+1,n,i-n+1)]},e.prototype.WALKTRACE=function(e,t,n,i,o,r,s,a,u,l,c,h,d,f,p,g,m,v){var y,b,_=null,w=new Iy,M=t,C=n,S=d[0]-g[0]-i,L=Number.MIN_VALUE,I=this.m_forwardHistory.length-1;do{(b=S+e)===M||b=0&&(e=(u=this.m_forwardHistory[I])[0],M=1,C=u.length-1)}while(--I>=-1);if(y=w.getReverseChanges(),v[0]){var N=d[0]+1,x=g[0]+1;if(null!==y&&y.length>0){var D=y[y.length-1];N=Math.max(N,D.getOriginalEnd()),x=Math.max(x,D.getModifiedEnd())}_=[new by(N,h-N+1,x,p-x+1)]}else{w=new Iy,M=r,C=s,S=d[0]-g[0]-a,L=Number.MAX_VALUE,I=m?this.m_reverseHistory.length-1:this.m_reverseHistory.length-2;do{(b=S+o)===M||b=l[b+1]?(f=(c=l[b+1]-1)-S-a,c>L&&w.MarkNextChange(),L=c+1,w.AddOriginalElement(c+1,f+1),S=b+1-o):(f=(c=l[b-1])-S-a,c>L&&w.MarkNextChange(),L=c,w.AddModifiedElement(c+1,f+1),S=b-1-o),I>=0&&(o=(l=this.m_reverseHistory[I])[0],M=1,C=l.length-1)}while(--I>=-1);_=w.getChanges()}return this.ConcatenateChanges(y,_)},e.prototype.ComputeRecursionPoint=function(e,t,n,i,o,r,s){var a,u,l,c=0,h=0,d=0,f=0;e--,n--,o[0]=0,r[0]=0,this.m_forwardHistory=[],this.m_reverseHistory=[];var p,g,m=t-e+(i-n),v=m+1,y=new Array(v),b=new Array(v),_=i-n,w=t-e,M=e-n,C=t-i,S=(w-_)%2==0;for(y[_]=e,b[w]=t,s[0]=!1,l=1;l<=m/2+1;l++){var L=0,I=0;for(c=this.ClipDiagonalBound(_-l,l,_,v),h=this.ClipDiagonalBound(_+l,l,_,v),p=c;p<=h;p+=2){for(u=(a=p===c||pL+I&&(L=a,I=u),!S&&Math.abs(p-w)<=l-1&&a>=b[p])return o[0]=a,r[0]=u,g<=b[p]&&l<=1448?this.WALKTRACE(_,c,h,M,w,d,f,C,y,b,a,t,o,u,i,r,S,s):null}var N=(L-e+(I-n)-l)/2;if(null!==this.ContinueProcessingPredicate&&!this.ContinueProcessingPredicate(L,this.OriginalSequence,N))return s[0]=!0,o[0]=L,r[0]=I,N>0&&l<=1448?this.WALKTRACE(_,c,h,M,w,d,f,C,y,b,a,t,o,u,i,r,S,s):(e++,n++,[new by(e,t-e+1,n,i-n+1)]);for(d=this.ClipDiagonalBound(w-l,l,w,v),f=this.ClipDiagonalBound(w+l,l,w,v),p=d;p<=f;p+=2){for(u=(a=p===d||p=b[p+1]?b[p+1]-1:b[p-1])-(p-w)-C,g=a;a>e&&u>n&&this.ElementsAreEqual(a,u);)a--,u--;if(b[p]=a,S&&Math.abs(p-_)<=l&&a<=y[p])return o[0]=a,r[0]=u,g>=y[p]&&l<=1448?this.WALKTRACE(_,c,h,M,w,d,f,C,y,b,a,t,o,u,i,r,S,s):null}if(l<=1447){var x=new Array(h-c+2);x[0]=_-c+1,Ly.Copy(y,c,x,1,h-c+1),this.m_forwardHistory.push(x),(x=new Array(f-d+2))[0]=w-d+1,Ly.Copy(b,d,x,1,f-d+1),this.m_reverseHistory.push(x)}}return this.WALKTRACE(_,c,h,M,w,d,f,C,y,b,a,t,o,u,i,r,S,s)},e.prototype.ShiftChanges=function(e){var t;do{t=!1;for(var n=0;n0,a=i.modifiedLength>0;i.originalStart+i.originalLength=0;n--){if(i=e[n],o=0,r=0,n>0){var c=e[n-1];c.originalLength>0&&(o=c.originalStart+c.originalLength),c.modifiedLength>0&&(r=c.modifiedStart+c.modifiedLength)}s=i.originalLength>0,a=i.modifiedLength>0;for(var h=0,d=this._boundaryScore(i.originalStart,i.originalLength,i.modifiedStart,i.modifiedLength),f=1;;f++){var p=i.originalStart-f,g=i.modifiedStart-f;if(pd&&(d=m,h=f)}i.originalStart-=h,i.modifiedStart-=h}return e},e.prototype._OriginalIsBoundary=function(e){if(e<=0||e>=this.OriginalSequence.getLength()-1)return!0;var t=this.OriginalSequence.getElementAtIndex(e);return"string"==typeof t&&/^\s*$/.test(t)},e.prototype._OriginalRegionIsBoundary=function(e,t){if(this._OriginalIsBoundary(e)||this._OriginalIsBoundary(e-1))return!0;if(t>0){var n=e+t;if(this._OriginalIsBoundary(n-1)||this._OriginalIsBoundary(n))return!0}return!1},e.prototype._ModifiedIsBoundary=function(e){if(e<=0||e>=this.ModifiedSequence.getLength()-1)return!0;var t=this.ModifiedSequence.getElementAtIndex(e);return"string"==typeof t&&/^\s*$/.test(t)},e.prototype._ModifiedRegionIsBoundary=function(e,t){if(this._ModifiedIsBoundary(e)||this._ModifiedIsBoundary(e-1))return!0;if(t>0){var n=e+t;if(this._ModifiedIsBoundary(n-1)||this._ModifiedIsBoundary(n))return!0}return!1},e.prototype._boundaryScore=function(e,t,n,i){return(this._OriginalRegionIsBoundary(e,t)?1:0)+(this._ModifiedRegionIsBoundary(n,i)?1:0)},e.prototype.ConcatenateChanges=function(e,t){var n=[],i=null;return 0===e.length||0===t.length?t.length>0?t:e:this.ChangesOverlap(e[e.length-1],t[0],n)?(i=new Array(e.length+t.length-1),Ly.Copy(e,0,i,0,e.length-1),i[e.length-1]=n[0],Ly.Copy(t,1,i,e.length,t.length-1),i):(i=new Array(e.length+t.length),Ly.Copy(e,0,i,0,e.length),Ly.Copy(t,0,i,e.length,t.length),i)},e.prototype.ChangesOverlap=function(e,t,n){if(Sy.Assert(e.originalStart<=t.originalStart,"Left change is not less than or equal to right change"),Sy.Assert(e.modifiedStart<=t.modifiedStart,"Left change is not less than or equal to right change"),e.originalStart+e.originalLength>=t.originalStart||e.modifiedStart+e.modifiedLength>=t.modifiedStart){var i=e.originalStart,o=e.originalLength,r=e.modifiedStart,s=e.modifiedLength;return e.originalStart+e.originalLength>=t.originalStart&&(o=t.originalStart+t.originalLength-e.originalStart),e.modifiedStart+e.modifiedLength>=t.modifiedStart&&(s=t.modifiedStart+t.modifiedLength-e.modifiedStart),n[0]=new by(i,o,r,s),!0}return n[0]=null,!1},e.prototype.ClipDiagonalBound=function(e,t,n,i){if(e>=0&&e=0;r--)this.onInsertItem(l[r]);for(r=this.heightMap.length-1;r>=o;r--)this.onRefreshItem(this.heightMap[r]);return a},e.prototype.onInsertItem=function(e){},e.prototype.onRemoveItems=function(e){for(var t,n,i,o=null,r=0;t=e.next();){if(i=this.indexes[t],!(n=this.heightMap[i]))return void console.error("view item doesnt exist");r-=n.height,delete this.indexes[t],this.onRemoveItem(n),null===o&&(o=i)}if(0!==r)for(this.heightMap.splice(o,i-o+1),i=o;i=n.top+n.height))return t;if(i===t)break;i=t}return this.heightMap.length},e.prototype.indexAfter=function(e){return Math.min(this.indexAt(e)+1,this.heightMap.length)},e.prototype.itemAtIndex=function(e){return this.heightMap[e]},e.prototype.itemAfter=function(e){return this.heightMap[this.indexes[e.model.id]+1]||null},e.prototype.createViewItem=function(e){throw new Error("not implemented")},e.prototype.dispose=function(){this.heightMap=null,this.indexes=null},e}(),Ey=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Ay=function(){function e(e,t,n){this._posx=e,this._posy=t,this._target=n}return e.prototype.preventDefault=function(){},e.prototype.stopPropagation=function(){},Object.defineProperty(e.prototype,"target",{get:function(){return this._target},enumerable:!0,configurable:!0}),e}(),jy=function(e){function t(t){var n=e.call(this,t.posx,t.posy,t.target)||this;return n.originalEvent=t,n}return Ey(t,e),t.prototype.preventDefault=function(){this.originalEvent.preventDefault()},t.prototype.stopPropagation=function(){this.originalEvent.stopPropagation()},t}(Ay),Oy=function(e){function t(t,n,i){var o=e.call(this,t,n,i.target)||this;return o.originalEvent=i,o}return Ey(t,e),t.prototype.preventDefault=function(){this.originalEvent.preventDefault()},t.prototype.stopPropagation=function(){this.originalEvent.stopPropagation()},t}(Ay);!function(e){e[e.COPY=0]="COPY",e[e.MOVE=1]="MOVE"}(My||(My={})),function(e){e[e.BUBBLE_DOWN=0]="BUBBLE_DOWN",e[e.BUBBLE_UP=1]="BUBBLE_UP"}(Cy||(Cy={}));var Ry,Py,zy=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Wy=function(){function e(e){this.context=e,this._cache={"":[]}}return e.prototype.alloc=function(e){var t=this.cache(e).pop();if(!t){var n=document.createElement("div");n.className="content";var i=document.createElement("div");i.appendChild(n),t={element:i,templateId:e,templateData:this.context.renderer.renderTemplate(this.context.tree,e,n)}}return t},e.prototype.release=function(e,t){!function(e){try{e.parentElement.removeChild(e)}catch(e){}}(t.element),this.cache(e).push(t)},e.prototype.cache=function(e){return this._cache[e]||(this._cache[e]=[])},e.prototype.garbageCollect=function(){var e=this;this._cache&&Object.keys(this._cache).forEach((function(t){e._cache[t].forEach((function(n){e.context.renderer.disposeTemplate(e.context.tree,t,n.templateData),n.element=null,n.templateData=null})),delete e._cache[t]}))},e.prototype.dispose=function(){this.garbageCollect(),this._cache=null,this.context=null},e}(),Fy=function(){function e(e,t){var n=this;this.width=0,this.context=e,this.model=t,this.id=this.model.id,this.row=null,this.top=0,this.height=t.getHeight(),this._styles={},t.getAllTraits().forEach((function(e){return n._styles[e]=!0})),t.isExpanded()&&this.addClass("expanded")}return Object.defineProperty(e.prototype,"expanded",{set:function(e){e?this.addClass("expanded"):this.removeClass("expanded")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"loading",{set:function(e){e?this.addClass("loading"):this.removeClass("loading")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"draggable",{get:function(){return this._draggable},set:function(e){this._draggable=e,this.render(!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"dropTarget",{set:function(e){e?this.addClass("drop-target"):this.removeClass("drop-target")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"element",{get:function(){return this.row&&this.row.element},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"templateId",{get:function(){return this._templateId||(this._templateId=this.context.renderer.getTemplateId&&this.context.renderer.getTemplateId(this.context.tree,this.model.getElement()))},enumerable:!0,configurable:!0}),e.prototype.addClass=function(e){this._styles[e]=!0,this.render(!0)},e.prototype.removeClass=function(e){delete this._styles[e],this.render(!0)},e.prototype.render=function(e){var t=this;if(void 0===e&&(e=!1),this.model&&this.element){var n=["monaco-tree-row"];n.push.apply(n,Object.keys(this._styles)),this.model.hasChildren()&&n.push("has-children"),this.element.className=n.join(" "),this.element.draggable=this.draggable,this.element.style.height=this.height+"px",this.element.setAttribute("role","treeitem");var i=this.context.accessibilityProvider,o=i.getAriaLabel(this.context.tree,this.model.getElement());if(o&&this.element.setAttribute("aria-label",o),i.getPosInSet&&i.getSetSize&&(this.element.setAttribute("aria-setsize",i.getSetSize()),this.element.setAttribute("aria-posinset",i.getPosInSet(this.context.tree,this.model.getElement()))),this.model.hasTrait("focused")){var r=p.safeBtoa(this.model.id);this.element.setAttribute("aria-selected","true"),this.element.setAttribute("id",r)}else this.element.setAttribute("aria-selected","false"),this.element.removeAttribute("id");this.model.hasChildren()?this.element.setAttribute("aria-expanded",String(!!this._styles.expanded)):this.element.removeAttribute("aria-expanded"),this.element.setAttribute("aria-level",String(this.model.getDepth())),this.context.options.paddingOnRow?this.element.style.paddingLeft=this.context.options.twistiePixels+(this.model.getDepth()-1)*this.context.options.indentPixels+"px":(this.element.style.paddingLeft=(this.model.getDepth()-1)*this.context.options.indentPixels+"px",this.row.element.firstElementChild.style.paddingLeft=this.context.options.twistiePixels+"px");var s=this.context.dnd.getDragURI(this.context.tree,this.model.getElement());if(s!==this.uri&&(this.unbindDragStart&&(this.unbindDragStart.dispose(),this.unbindDragStart=null),s?(this.uri=s,this.draggable=!0,this.unbindDragStart=cn(this.element,"dragstart",(function(e){t.onDragStart(e)}))):this.uri=null),!e&&this.element){var a=window.getComputedStyle(this.element),u=parseFloat(a.paddingLeft);this.context.horizontalScrolling&&(this.element.style.width="fit-content"),this.context.renderer.renderElement(this.context.tree,this.model.getElement(),this.templateId,this.row.templateData),this.context.horizontalScrolling&&(this.width=jn(this.element)+u,this.element.style.width="")}}},e.prototype.insertInDOM=function(e,t){if(this.row||(this.row=this.context.cache.alloc(this.templateId),this.element[Hy.BINDING]=this),!this.element.parentElement){if(null===t)e.appendChild(this.element);else try{e.insertBefore(this.element,t)}catch(t){console.warn("Failed to locate previous tree element"),e.appendChild(this.element)}this.render()}},e.prototype.removeFromDOM=function(){this.row&&(this.unbindDragStart&&(this.unbindDragStart.dispose(),this.unbindDragStart=null),this.uri=null,this.element[Hy.BINDING]=null,this.context.cache.release(this.templateId,this.row),this.row=null)},e.prototype.dispose=function(){this.row=null,this.model=null},e}(),By=function(e){function t(t,n,i){var o=e.call(this,t,n)||this;return o.row={element:i,templateData:null,templateId:null},o}return zy(t,e),t.prototype.render=function(){if(this.model&&this.element){var e=["monaco-tree-wrapper"];e.push.apply(e,Object.keys(this._styles)),this.model.hasChildren()&&e.push("has-children"),this.element.className=e.join(" ")}},t.prototype.insertInDOM=function(e,t){},t.prototype.removeFromDOM=function(){},t}(Fy),Hy=function(e){function t(n,i){var o=e.call(this)||this;o.lastClickTimeStamp=0,o.contentWidthUpdateDelayer=new mt(50),o.isRefreshing=!1,o.refreshingPreviousChildrenIds={},o._onDOMFocus=new X.vl,o._onDOMBlur=new X.vl,o._onDidScroll=new X.vl,t.counter++,o.instance=t.counter;var r=void 0===n.options.horizontalScrollMode?gr.XR.Hidden:n.options.horizontalScrollMode;o.horizontalScrolling=r!==gr.XR.Hidden,o.context={dataSource:n.dataSource,renderer:n.renderer,controller:n.controller,dnd:n.dnd,filter:n.filter,sorter:n.sorter,tree:n.tree,accessibilityProvider:n.accessibilityProvider,options:n.options,cache:new Wy(n),horizontalScrolling:o.horizontalScrolling},o.modelListeners=[],o.viewListeners=[],o.model=null,o.items={},o.domNode=document.createElement("div"),o.domNode.className="monaco-tree no-focused-item monaco-tree-instance-"+o.instance,o.domNode.tabIndex=n.options.preventRootFocus?-1:0,o.styleElement=Wn(o.domNode),o.treeStyler=n.styler,o.treeStyler||(o.treeStyler=new cy(o.styleElement,"monaco-tree-instance-"+o.instance)),o.domNode.setAttribute("role","tree"),o.context.options.ariaLabel&&o.domNode.setAttribute("aria-label",o.context.options.ariaLabel),o.context.options.alwaysFocused&&sn(o.domNode,"focused"),o.context.options.paddingOnRow||sn(o.domNode,"no-row-padding"),o.wrapper=document.createElement("div"),o.wrapper.className="monaco-tree-wrapper",o.scrollableElement=new Zc(o.wrapper,{alwaysConsumeMouseWheel:!0,horizontal:r,vertical:void 0!==n.options.verticalScrollMode?n.options.verticalScrollMode:gr.XR.Auto,useShadows:n.options.useShadows}),o.scrollableElement.onScroll((function(e){o.render(e.scrollTop,e.height,e.scrollLeft,e.width,e.scrollWidth),o._onDidScroll.fire()})),xt?(o.wrapper.style.msTouchAction="none",o.wrapper.style.msContentZooming="none"):au.addTarget(o.wrapper),o.rowsContainer=document.createElement("div"),o.rowsContainer.className="monaco-tree-rows",n.options.showTwistie&&(o.rowsContainer.className+=" show-twisties");var s=Gn(o.domNode);return o.viewListeners.push(s.onDidFocus((function(){return o.onFocus()}))),o.viewListeners.push(s.onDidBlur((function(){return o.onBlur()}))),o.viewListeners.push(s),o.viewListeners.push(cn(o.domNode,"keydown",(function(e){return o.onKeyDown(e)}))),o.viewListeners.push(cn(o.domNode,"keyup",(function(e){return o.onKeyUp(e)}))),o.viewListeners.push(cn(o.domNode,"mousedown",(function(e){return o.onMouseDown(e)}))),o.viewListeners.push(cn(o.domNode,"mouseup",(function(e){return o.onMouseUp(e)}))),o.viewListeners.push(cn(o.wrapper,"click",(function(e){return o.onClick(e)}))),o.viewListeners.push(cn(o.wrapper,"auxclick",(function(e){return o.onClick(e)}))),o.viewListeners.push(cn(o.domNode,"contextmenu",(function(e){return o.onContextMenu(e)}))),o.viewListeners.push(cn(o.wrapper,iu.Tap,(function(e){return o.onTap(e)}))),o.viewListeners.push(cn(o.wrapper,iu.Change,(function(e){return o.onTouchChange(e)}))),xt&&(o.viewListeners.push(cn(o.wrapper,"MSPointerDown",(function(e){return o.onMsPointerDown(e)}))),o.viewListeners.push(cn(o.wrapper,"MSGestureTap",(function(e){return o.onMsGestureTap(e)}))),o.viewListeners.push(Sn(o.wrapper,"MSGestureChange",(function(e){return o.onThrottledMsGestureChange(e)}),(function(e,t){t.stopPropagation(),t.preventDefault();var n={translationY:t.translationY,translationX:t.translationX};return e&&(n.translationY+=e.translationY,n.translationX+=e.translationX),n})))),o.viewListeners.push(cn(window,"dragover",(function(e){return o.onDragOver(e)}))),o.viewListeners.push(cn(o.wrapper,"drop",(function(e){return o.onDrop(e)}))),o.viewListeners.push(cn(window,"dragend",(function(e){return o.onDragEnd(e)}))),o.viewListeners.push(cn(window,"dragleave",(function(e){return o.onDragOver(e)}))),o.wrapper.appendChild(o.rowsContainer),o.domNode.appendChild(o.scrollableElement.getDomNode()),i.appendChild(o.domNode),o.lastRenderTop=0,o.lastRenderHeight=0,o.didJustPressContextMenuKey=!1,o.currentDropTarget=null,o.currentDropTargets=[],o.shouldInvalidateDropReaction=!1,o.dragAndDropScrollInterval=null,o.dragAndDropScrollTimeout=null,o.onHiddenScrollTop=null,o.onRowsChanged(),o.layout(),o.setupMSGesture(),o.applyStyles(n.options),o}return zy(t,e),Object.defineProperty(t.prototype,"onDOMFocus",{get:function(){return this._onDOMFocus.event},enumerable:!0,configurable:!0}),t.prototype.applyStyles=function(e){this.treeStyler.style(e)},t.prototype.createViewItem=function(e){return new Fy(this.context,e)},t.prototype.getHTMLElement=function(){return this.domNode},t.prototype.focus=function(){this.domNode.focus()},t.prototype.isFocused=function(){return document.activeElement===this.domNode},t.prototype.blur=function(){this.domNode.blur()},t.prototype.setupMSGesture=function(){var e=this;window.MSGesture&&(this.msGesture=new MSGesture,setTimeout((function(){return e.msGesture.target=e.wrapper}),100))},t.prototype.isTreeVisible=function(){return null===this.onHiddenScrollTop},t.prototype.layout=function(e,t){this.isTreeVisible()&&(this.viewHeight=e||On(this.wrapper),this.scrollHeight=this.getContentHeight(),this.horizontalScrolling&&(this.viewWidth=t||jn(this.wrapper)))},t.prototype.render=function(e,t,n,i,o){var r,s,a=e,u=e+t,l=this.lastRenderTop+this.lastRenderHeight;for(r=this.indexAfter(u)-1,s=this.indexAt(Math.max(l,a));r>=s;r--)this.insertItemInDOM(this.itemAtIndex(r));for(r=Math.min(this.indexAt(this.lastRenderTop),this.indexAfter(u))-1,s=this.indexAt(a);r>=s;r--)this.insertItemInDOM(this.itemAtIndex(r));for(r=this.indexAt(this.lastRenderTop),s=Math.min(this.indexAt(a),this.indexAfter(l));r1e3,l=void 0,c=void 0;if(!u){var h=new Ny({getLength:function(){return r.length},getElementAtIndex:function(e){return r[e]}},{getLength:function(){return s.length},getElementAtIndex:function(e){return s[e].id}},null);c=(l=h.ComputeDiff(!1)).some((function(e){if(e.modifiedLength>0)for(var n=e.modifiedStart,i=e.modifiedStart+e.modifiedLength;n0&&this.onRemoveItems(new Yp(r,p.originalStart,p.originalStart+p.originalLength)),p.modifiedLength>0){var g=s[p.modifiedStart-1]||n;g=g.getDepth()>0?g:null,this.onInsertItems(new Yp(s,p.modifiedStart,p.modifiedStart+p.modifiedLength),g?g.id:null)}}else(u||l.length)&&(this.onRemoveItems(new Yp(r)),this.onInsertItems(new Yp(s),n.getDepth()>0?n.id:null));(u||l.length)&&this.onRowsChanged()}},t.prototype.onItemRefresh=function(e){this.onItemsRefresh([e])},t.prototype.onItemsRefresh=function(e){var t=this;this.onRefreshItemSet(e.filter((function(e){return t.items.hasOwnProperty(e.id)}))),this.onRowsChanged()},t.prototype.onItemExpanding=function(e){var t=this.items[e.item.id];t&&(t.expanded=!0)},t.prototype.onItemExpanded=function(e){var t=e.item,n=this.items[t.id];if(n){n.expanded=!0;var i=this.onInsertItems(t.getNavigator(),t.id),o=this.scrollTop;n.top+n.height<=this.scrollTop&&(o+=i),this.onRowsChanged(o)}},t.prototype.onItemCollapsing=function(e){var t=e.item,n=this.items[t.id];n&&(n.expanded=!1,this.onRemoveItems(new Gp(t.getNavigator(),(function(e){return e&&e.id}))),this.onRowsChanged())},t.prototype.onItemReveal=function(e){var t=e.item,n=e.relativeTop,i=this.items[t.id];if(i)if(null!==n){n=(n=n<0?0:n)>1?1:n;var o=i.height-this.viewHeight;this.scrollTop=o*n+i.top}else{var r=i.top+i.height,s=this.scrollTop+this.viewHeight;i.top=s&&(this.scrollTop=r-this.viewHeight)}},t.prototype.onItemAddTrait=function(e){var t=e.item,n=e.trait,i=this.items[t.id];i&&i.addClass(n),"highlighted"===n&&(sn(this.domNode,n),i&&(this.highlightedItemWasDraggable=!!i.draggable,i.draggable&&(i.draggable=!1)))},t.prototype.onItemRemoveTrait=function(e){var t=e.item,n=e.trait,i=this.items[t.id];i&&i.removeClass(n),"highlighted"===n&&(an(this.domNode,n),this.highlightedItemWasDraggable&&(i.draggable=!0),this.highlightedItemWasDraggable=!1)},t.prototype.onModelFocusChange=function(){var e=this.model&&this.model.getFocus();un(this.domNode,"no-focused-item",!e),e?this.domNode.setAttribute("aria-activedescendant",p.safeBtoa(this.context.dataSource.getId(this.context.tree,e))):this.domNode.removeAttribute("aria-activedescendant")},t.prototype.onInsertItem=function(e){var t=this;e.onDragStart=function(n){t.onDragStart(e,n)},e.needsRender=!0,this.refreshViewItem(e),this.items[e.id]=e},t.prototype.onRefreshItem=function(e,t){void 0===t&&(t=!1),e.needsRender=e.needsRender||t,this.refreshViewItem(e)},t.prototype.onRemoveItem=function(e){this.removeItemFromDOM(e),e.dispose(),delete this.items[e.id]},t.prototype.refreshViewItem=function(e){e.render(),this.shouldBeRendered(e)?this.insertItemInDOM(e):this.removeItemFromDOM(e)},t.prototype.onClick=function(e){if(!this.lastPointerType||"mouse"===this.lastPointerType){var t=new Qt(e),n=this.getItemAround(t.target);n&&(xt&&Date.now()-this.lastClickTimeStamp<300&&(t.detail=2),this.lastClickTimeStamp=Date.now(),this.context.controller.onClick(this.context.tree,n.model.getElement(),t))}},t.prototype.onMouseDown=function(e){if(this.didJustPressContextMenuKey=!1,this.context.controller.onMouseDown&&(!this.lastPointerType||"mouse"===this.lastPointerType)){var t=new Qt(e);if(!(t.ctrlKey&&B.ib&&B.zx)){var n=this.getItemAround(t.target);n&&this.context.controller.onMouseDown(this.context.tree,n.model.getElement(),t)}}},t.prototype.onMouseUp=function(e){if(this.context.controller.onMouseUp&&(!this.lastPointerType||"mouse"===this.lastPointerType)){var t=new Qt(e);if(!(t.ctrlKey&&B.ib&&B.zx)){var n=this.getItemAround(t.target);n&&this.context.controller.onMouseUp(this.context.tree,n.model.getElement(),t)}}},t.prototype.onTap=function(e){var t=this.getItemAround(e.initialTarget);t&&this.context.controller.onTap(this.context.tree,t.model.getElement(),e)},t.prototype.onTouchChange=function(e){e.preventDefault(),e.stopPropagation(),this.scrollTop-=e.translationY},t.prototype.onContextMenu=function(e){var t,n;if(e instanceof KeyboardEvent||this.didJustPressContextMenuKey){this.didJustPressContextMenuKey=!1;var i,o=new Bt(e);if(n=this.model.getFocus()){var r=this.context.dataSource.getId(this.context.tree,n);i=Tn(this.items[r].element)}else n=this.model.getInput(),i=Tn(this.inputItem.element);t=new Oy(i.left+i.width,i.top,o)}else{var s=new Qt(e),a=this.getItemAround(s.target);if(!a)return;n=a.model.getElement(),t=new jy(s)}this.context.controller.onContextMenu(this.context.tree,n,t)},t.prototype.onKeyDown=function(e){var t=new Bt(e);this.didJustPressContextMenuKey=58===t.keyCode||t.shiftKey&&68===t.keyCode,this.didJustPressContextMenuKey&&(t.preventDefault(),t.stopPropagation()),t.target&&t.target.tagName&&"input"===t.target.tagName.toLowerCase()||this.context.controller.onKeyDown(this.context.tree,t)},t.prototype.onKeyUp=function(e){this.didJustPressContextMenuKey&&this.onContextMenu(e),this.didJustPressContextMenuKey=!1,this.context.controller.onKeyUp(this.context.tree,new Bt(e))},t.prototype.onDragStart=function(e,n){if(!this.model.getHighlight()){var i,o=e.model.getElement(),r=this.model.getSelection();if(i=r.indexOf(o)>-1?r:[o],n.dataTransfer.effectAllowed="copyMove",n.dataTransfer.setData("ResourceURLs",JSON.stringify([e.uri])),n.dataTransfer.setDragImage){var s;s=this.context.dnd.getDragLabel?this.context.dnd.getDragLabel(this.context.tree,i):String(i.length);var a=document.createElement("div");a.className="monaco-tree-drag-image",a.textContent=s,document.body.appendChild(a),n.dataTransfer.setDragImage(a,-10,-10),setTimeout((function(){return document.body.removeChild(a)}),0)}this.currentDragAndDropData=new xy(i),t.currentExternalDragAndDropData=new Dy(i),this.context.dnd.onDragStart(this.context.tree,this.currentDragAndDropData,new qt(n))}},t.prototype.setupDragAndDropScrollInterval=function(){var e=this,t=kn(this.wrapper).top;this.dragAndDropScrollInterval||(this.dragAndDropScrollInterval=window.setInterval((function(){if(void 0!==e.dragAndDropMouseY){var n=e.dragAndDropMouseY-t,i=0,o=e.viewHeight-35;n<35?i=Math.max(-14,.2*(n-35)):n>o&&(i=Math.min(14,.2*(n-o))),e.scrollTop+=i}}),10),this.cancelDragAndDropScrollTimeout(),this.dragAndDropScrollTimeout=window.setTimeout((function(){e.cancelDragAndDropScrollInterval(),e.dragAndDropScrollTimeout=null}),1e3))},t.prototype.cancelDragAndDropScrollInterval=function(){this.dragAndDropScrollInterval&&(window.clearInterval(this.dragAndDropScrollInterval),this.dragAndDropScrollInterval=null),this.cancelDragAndDropScrollTimeout()},t.prototype.cancelDragAndDropScrollTimeout=function(){this.dragAndDropScrollTimeout&&(window.clearTimeout(this.dragAndDropScrollTimeout),this.dragAndDropScrollTimeout=null)},t.prototype.onDragOver=function(e){var n,i=this,o=new qt(e),r=this.getItemAround(o.target);if(!r||0===o.posx&&0===o.posy&&o.browserEvent.type===Un.DRAG_LEAVE)return this.currentDropTarget&&(this.currentDropTargets.forEach((function(e){return e.dropTarget=!1})),this.currentDropTargets=[],this.currentDropPromise&&(this.currentDropPromise.cancel(),this.currentDropPromise=null)),this.cancelDragAndDropScrollInterval(),this.currentDropTarget=null,this.currentDropElement=null,this.dragAndDropMouseY=null,!1;if(this.setupDragAndDropScrollInterval(),this.dragAndDropMouseY=o.posy,!this.currentDragAndDropData)if(t.currentExternalDragAndDropData)this.currentDragAndDropData=t.currentExternalDragAndDropData;else{if(!o.dataTransfer.types)return!1;this.currentDragAndDropData=new ky}this.currentDragAndDropData.update(o);var s,a=r.model;do{if(n=a?a.getElement():this.model.getInput(),!(s=this.context.dnd.onDragOver(this.context.tree,this.currentDragAndDropData,n,o))||s.bubble!==Cy.BUBBLE_UP)break;a=a&&a.parent}while(a);if(!a)return this.currentDropElement=null,!1;var u=s&&s.accept;u?(this.currentDropElement=a.getElement(),o.preventDefault(),o.dataTransfer.dropEffect=s.effect===My.COPY?"copy":"move"):this.currentDropElement=null;var l,c,h=a.id===this.inputItem.id?this.inputItem:this.items[a.id];if((this.shouldInvalidateDropReaction||this.currentDropTarget!==h||(c=s,!(!(l=this.currentDropElementReaction)&&!c||l&&c&&l.accept===c.accept&&l.bubble===c.bubble&&l.effect===c.effect)))&&(this.shouldInvalidateDropReaction=!1,this.currentDropTarget&&(this.currentDropTargets.forEach((function(e){return e.dropTarget=!1})),this.currentDropTargets=[],this.currentDropPromise&&(this.currentDropPromise.cancel(),this.currentDropPromise=null)),this.currentDropTarget=h,this.currentDropElementReaction=s,u)){if(this.currentDropTarget&&(this.currentDropTarget.dropTarget=!0,this.currentDropTargets.push(this.currentDropTarget)),s.bubble===Cy.BUBBLE_DOWN)for(var d,f=a.getNavigator();d=f.next();)(r=this.items[d.id])&&(r.dropTarget=!0,this.currentDropTargets.push(r));s.autoExpand&&(this.currentDropPromise=J.g3.timeout(500).then((function(){return i.context.tree.expand(i.currentDropElement)})).then((function(){return i.shouldInvalidateDropReaction=!0})))}return!0},t.prototype.onDrop=function(e){if(this.currentDropElement){var t=new qt(e);t.preventDefault(),this.currentDragAndDropData.update(t),this.context.dnd.drop(this.context.tree,this.currentDragAndDropData,this.currentDropElement,t),this.onDragEnd(e)}this.cancelDragAndDropScrollInterval()},t.prototype.onDragEnd=function(e){this.currentDropTarget&&(this.currentDropTargets.forEach((function(e){return e.dropTarget=!1})),this.currentDropTargets=[]),this.currentDropPromise&&(this.currentDropPromise.cancel(),this.currentDropPromise=null),this.cancelDragAndDropScrollInterval(),this.currentDragAndDropData=null,t.currentExternalDragAndDropData=null,this.currentDropElement=null,this.currentDropTarget=null,this.dragAndDropMouseY=null},t.prototype.onFocus=function(){this.context.options.alwaysFocused||sn(this.domNode,"focused"),this._onDOMFocus.fire()},t.prototype.onBlur=function(){this.context.options.alwaysFocused||an(this.domNode,"focused"),this.domNode.removeAttribute("aria-activedescendant"),this._onDOMBlur.fire()},t.prototype.onMsPointerDown=function(e){if(this.msGesture){var t=e.pointerType;t!==(e.MSPOINTER_TYPE_MOUSE||"mouse")?t===(e.MSPOINTER_TYPE_TOUCH||"touch")&&(this.lastPointerType="touch",e.stopPropagation(),e.preventDefault(),this.msGesture.addPointer(e.pointerId)):this.lastPointerType="mouse"}},t.prototype.onThrottledMsGestureChange=function(e){this.scrollTop-=e.translationY},t.prototype.onMsGestureTap=function(e){e.initialTarget=document.elementFromPoint(e.clientX,e.clientY),this.onTap(e)},t.prototype.insertItemInDOM=function(e){var t=null,n=this.itemAfter(e);n&&n.element&&(t=n.element),e.insertInDOM(this.rowsContainer,t)},t.prototype.removeItemFromDOM=function(e){e&&e.removeFromDOM()},t.prototype.shouldBeRendered=function(e){return e.topthis.lastRenderTop},t.prototype.getItemAround=function(e){var n=this.inputItem;do{if(e[t.BINDING]&&(n=e[t.BINDING]),e===this.wrapper||e===this.domNode)return n;if(e===document.body)return null}while(e=e.parentElement)},t.prototype.releaseModel=function(){this.model&&(this.modelListeners=I.AS(this.modelListeners),this.model=null)},t.prototype.dispose=function(){var t=this;this.scrollableElement.dispose(),this.releaseModel(),this.modelListeners=null,this.viewListeners=I.AS(this.viewListeners),this._onDOMFocus.dispose(),this._onDOMBlur.dispose(),this.domNode.parentNode&&this.domNode.parentNode.removeChild(this.domNode),this.domNode=null,this.items&&(Object.keys(this.items).forEach((function(e){return t.items[e].removeFromDOM()})),this.items=null),this.context.cache&&(this.context.cache.dispose(),this.context.cache=null),e.prototype.dispose.call(this)},t.BINDING="monaco-tree-row",t.LOADING_DECORATION_DELAY=800,t.counter=0,t.currentExternalDragAndDropData=null,t}(Ty),Vy=function(e,t,n){if(void 0===n&&(n={}),this.tree=e,this.configuration=t,this.options=n,!t.dataSource)throw new Error("You must provide a Data Source to the tree.");this.dataSource=t.dataSource,this.renderer=t.renderer,this.controller=t.controller||new sy({clickBehavior:ty.ON_MOUSE_UP,keyboardSupport:"boolean"!=typeof n.keyboardSupport||n.keyboardSupport}),this.dnd=t.dnd||new ay,this.filter=t.filter||new uy,this.sorter=t.sorter||null,this.accessibilityProvider=t.accessibilityProvider||new ly,this.styler=t.styler||null},Uy={listFocusBackground:Go.fromHex("#073655"),listActiveSelectionBackground:Go.fromHex("#0E639C"),listActiveSelectionForeground:Go.fromHex("#FFFFFF"),listFocusAndSelectionBackground:Go.fromHex("#094771"),listFocusAndSelectionForeground:Go.fromHex("#FFFFFF"),listInactiveSelectionBackground:Go.fromHex("#3F3F46"),listHoverBackground:Go.fromHex("#2A2D2E"),listDropBackground:Go.fromHex("#383B3D")},Yy=function(){function e(e,t,n){void 0===n&&(n={}),this._onDidChangeFocus=new X.Wj,this.onDidChangeFocus=this._onDidChangeFocus.event,this._onDidChangeSelection=new X.Wj,this.onDidChangeSelection=this._onDidChangeSelection.event,this._onHighlightChange=new X.Wj,this._onDidExpandItem=new X.Wj,this._onDidCollapseItem=new X.Wj,this._onDispose=new X.vl,this.onDidDispose=this._onDispose.event,this.container=e,(0,ri.co)(n,Uy,!1),n.twistiePixels="number"==typeof n.twistiePixels?n.twistiePixels:32,n.showTwistie=!1!==n.showTwistie,n.indentPixels="number"==typeof n.indentPixels?n.indentPixels:12,n.alwaysFocused=!0===n.alwaysFocused,n.useShadows=!1!==n.useShadows,n.paddingOnRow=!1!==n.paddingOnRow,n.showLoading=!1!==n.showLoading,this.context=new Vy(this,t,n),this.model=new yy(this.context),this.view=new Hy(this.context,this.container),this.view.setModel(this.model),this._onDidChangeFocus.input=this.model.onDidFocus,this._onDidChangeSelection.input=this.model.onDidSelect,this._onHighlightChange.input=this.model.onDidHighlight,this._onDidExpandItem.input=this.model.onDidExpandItem,this._onDidCollapseItem.input=this.model.onDidCollapseItem}return e.prototype.style=function(e){this.view.applyStyles(e)},Object.defineProperty(e.prototype,"onDidFocus",{get:function(){return this.view&&this.view.onDOMFocus},enumerable:!0,configurable:!0}),e.prototype.getHTMLElement=function(){return this.view.getHTMLElement()},e.prototype.layout=function(e,t){this.view.layout(e,t)},e.prototype.domFocus=function(){this.view.focus()},e.prototype.isDOMFocused=function(){return this.view.isFocused()},e.prototype.domBlur=function(){this.view.blur()},e.prototype.setInput=function(e){return this.model.setInput(e)},e.prototype.getInput=function(){return this.model.getInput()},e.prototype.refresh=function(e,t){return void 0===e&&(e=null),void 0===t&&(t=!0),this.model.refresh(e,t)},e.prototype.expand=function(e){return this.model.expand(e)},e.prototype.collapse=function(e,t){return void 0===t&&(t=!1),this.model.collapse(e,t)},e.prototype.toggleExpansion=function(e,t){return void 0===t&&(t=!1),this.model.toggleExpansion(e,t)},e.prototype.isExpanded=function(e){return this.model.isExpanded(e)},e.prototype.reveal=function(e,t){return void 0===t&&(t=null),this.model.reveal(e,t)},e.prototype.getHighlight=function(){return this.model.getHighlight()},e.prototype.clearHighlight=function(e){this.model.setHighlight(null,e)},e.prototype.setSelection=function(e,t){this.model.setSelection(e,t)},e.prototype.getSelection=function(){return this.model.getSelection()},e.prototype.clearSelection=function(e){this.model.setSelection([],e)},e.prototype.setFocus=function(e,t){this.model.setFocus(e,t)},e.prototype.getFocus=function(){return this.model.getFocus()},e.prototype.focusNext=function(e,t){this.model.focusNext(e,t)},e.prototype.focusPrevious=function(e,t){this.model.focusPrevious(e,t)},e.prototype.focusParent=function(e){this.model.focusParent(e)},e.prototype.focusFirstChild=function(e){this.model.focusFirstChild(e)},e.prototype.focusFirst=function(e,t){this.model.focusFirst(e,t)},e.prototype.focusNth=function(e,t){this.model.focusNth(e,t)},e.prototype.focusLast=function(e,t){this.model.focusLast(e,t)},e.prototype.focusNextPage=function(e){this.view.focusNextPage(e)},e.prototype.focusPreviousPage=function(e){this.view.focusPreviousPage(e)},e.prototype.clearFocus=function(e){this.model.setFocus(null,e)},e.prototype.dispose=function(){this._onDispose.fire(),null!==this.model&&(this.model.dispose(),this.model=null),null!==this.view&&(this.view.dispose(),this.view=null),this._onDidChangeFocus.dispose(),this._onDidChangeSelection.dispose(),this._onHighlightChange.dispose(),this._onDidExpandItem.dispose(),this._onDidCollapseItem.dispose(),this._onDispose.dispose()},e}(),Zy=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Gy=Object.assign||function(e){for(var t,n=1,i=arguments.length;n=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},qy=function(e,t){return function(n,i){t(n,i,e)}},Ky=(0,N.u1)("listService"),Jy=function(){function e(e){this.lists=[],this._lastFocusedWidget=void 0}return Object.defineProperty(e.prototype,"lastFocusedList",{get:function(){return this._lastFocusedWidget},enumerable:!0,configurable:!0}),e.prototype.register=function(e,t){var n=this;if(this.lists.some((function(t){return t.widget===e})))throw new Error("Cannot register the same widget multiple times");var i={widget:e,extraContextKeys:t};return this.lists.push(i),e.isDOMFocused()&&(this._lastFocusedWidget=e),(0,I.qE)([e.onDidFocus((function(){return n._lastFocusedWidget=e})),(0,I.s)((function(){return n.lists.splice(n.lists.indexOf(i),1)})),e.onDidDispose((function(){n.lists=n.lists.filter((function(e){return e!==i})),n._lastFocusedWidget===e&&(n._lastFocusedWidget=void 0)}))])},Qy([qy(0,he)],e)}(),Xy=new ce("listFocus",!0),$y=new ce("listSupportsMultiselect",!0),eb=new ce("listHasSelectionOrFocus",!1),tb=new ce("listDoubleSelection",!1),nb=new ce("listMultiSelection",!1),ib="workbench.list.multiSelectModifier",ob="workbench.list.openMode",rb="workbench.tree.horizontalScrolling";function sb(e){return"alt"===e.getValue(ib)}function ab(e){return"doubleClick"!==e.getValue(ob)}var ub=function(e){function t(t,n,i,o,r,s,a,u){var l=this,c=function(e,t){return e.controller||(e.controller=t.createInstance(lb,{})),e.styler||(e.styler=new cy((Py||(Py=Wn()),Py))),e}(n,a),h=u.getValue(rb)?gr.XR.Auto:gr.XR.Hidden,d=Gy({horizontalScrollMode:h,keyboardSupport:!1},Xv(s.getTheme(),iy),i);return(l=e.call(this,t,c,d)||this).disposables=[],l.contextKeyService=function(e,t){var n=e.createScoped(t.getHTMLElement());return Xy.bindTo(n),n}(o,l),$y.bindTo(l.contextKeyService),l.listHasSelectionOrFocus=eb.bindTo(l.contextKeyService),l.listDoubleSelection=tb.bindTo(l.contextKeyService),l.listMultiSelection=nb.bindTo(l.contextKeyService),l._openOnSingleClick=ab(u),l._useAltAsMultipleSelectionModifier=sb(u),l.disposables.push(l.contextKeyService,r.register(l),ey(l,s)),l.disposables.push(l.onDidChangeSelection((function(){var e=l.getSelection(),t=l.getFocus();l.listHasSelectionOrFocus.set(e&&e.length>0||!!t),l.listDoubleSelection.set(e&&2===e.length),l.listMultiSelection.set(e&&e.length>1)}))),l.disposables.push(l.onDidChangeFocus((function(){var e=l.getSelection(),t=l.getFocus();l.listHasSelectionOrFocus.set(e&&e.length>0||!!t)}))),l.disposables.push(u.onDidChangeConfiguration((function(e){e.affectsConfiguration(ob)&&(l._openOnSingleClick=ab(u)),e.affectsConfiguration(ib)&&(l._useAltAsMultipleSelectionModifier=sb(u))}))),l}return Zy(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this),this.disposables=(0,I.AS)(this.disposables)},Qy([qy(3,he),qy(4,Ky),qy(5,Lr),qy(6,N._Y),qy(7,uf)],t)}(Yy),lb=function(e){function t(t,n){var i=e.call(this,function(e){return"boolean"!=typeof e.keyboardSupport&&(e.keyboardSupport=!1),"number"!=typeof e.clickBehavior&&(e.clickBehavior=ty.ON_MOUSE_DOWN),e}(t))||this;return i.configurationService=n,i.disposables=[],(0,w.z)(t.openMode)&&(i.setOpenMode(i.getOpenModeSetting()),i.registerListeners()),i}return Zy(t,e),t.prototype.registerListeners=function(){var e=this;this.disposables.push(this.configurationService.onDidChangeConfiguration((function(t){t.affectsConfiguration(ob)&&e.setOpenMode(e.getOpenModeSetting())})))},t.prototype.getOpenModeSetting=function(){return ab(this.configurationService)?ny.SINGLE_CLICK:ny.DOUBLE_CLICK},t.prototype.dispose=function(){this.disposables=(0,I.AS)(this.disposables)},Qy([qy(1,uf)],t)}(sy);U.as(li).registerConfiguration({id:"workbench",order:7,title:(0,o.k)("workbenchConfigurationTitle","Workbench"),type:"object",properties:(Ry={},Ry[ib]={type:"string",enum:["ctrlCmd","alt"],enumDescriptions:[(0,o.k)("multiSelectModifier.ctrlCmd","Maps to `Control` on Windows and Linux and to `Command` on macOS."),(0,o.k)("multiSelectModifier.alt","Maps to `Alt` on Windows and Linux and to `Option` on macOS.")],default:"ctrlCmd",description:(0,o.k)({key:"multiSelectModifier",comment:["- `ctrlCmd` refers to a value the setting can take and should not be localized.","- `Control` and `Command` refer to the modifier keys Ctrl or Cmd on the keyboard and can be localized."]},"The modifier to be used to add an item in trees and lists to a multi-selection with the mouse (for example in the explorer, open editors and scm view). The 'Open to Side' mouse gestures - if supported - will adapt such that they do not conflict with the multiselect modifier.")},Ry[ob]={type:"string",enum:["singleClick","doubleClick"],default:"singleClick",description:(0,o.k)({key:"openModeModifier",comment:["`singleClick` and `doubleClick` refers to a value the setting can take and should not be localized."]},"Controls how to open items in trees and lists using the mouse (if supported). For parents with children in trees, this setting will control if a single click expands the parent or a double click. Note that some trees and lists might choose to ignore this setting if it is not applicable. ")},Ry[rb]={type:"boolean",default:!1,description:(0,o.k)("horizontalScrolling setting","Controls whether trees support horizontal scrolling in the workbench.")},Ry)});var cb=(0,N.u1)("uriDisplay"),hb=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),db=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},fb=function(e,t){return function(n,i){t(n,i,e)}},pb=function(){function e(e,t){var n=this;this._editor=e,this._model=t,this._decorations=new Map,this._decorationIgnoreSet=new Set,this._callOnDispose=[],this._callOnModelChange=[],this._callOnDispose.push(this._editor.onDidChangeModel((function(){return n._onModelChanged()}))),this._onModelChanged()}return e.prototype.dispose=function(){this._callOnModelChange=(0,I.AS)(this._callOnModelChange),this._callOnDispose=(0,I.AS)(this._callOnDispose),this.removeDecorations()},e.prototype._onModelChanged=function(){this._callOnModelChange=(0,I.AS)(this._callOnModelChange);var e=this._editor.getModel();if(e)for(var t=0,n=this._model.groups;t1?this.badge.setTitleFormat(o.k("referencesCount","{0} references",t)):this.badge.setTitleFormat(o.k("referenceCount","{0} reference",t))},db([fb(1,Ev),fb(2,(0,N.lq)(oy)),fb(3,Lr)],e)}(),yb=function(){function e(e){var t=document.createElement("div");this.before=document.createElement("span"),this.inside=document.createElement("span"),this.after=document.createElement("span"),sn(this.inside,"referenceMatch"),sn(t,"reference"),t.appendChild(this.before),t.appendChild(this.inside),t.appendChild(this.after),e.appendChild(t)}return e.prototype.set=function(e){var t=e.parent.preview.preview(e.range),n=t.before,i=t.inside,o=t.after;this.before.innerHTML=p.escape(n),this.inside.innerHTML=p.escape(i),this.after.innerHTML=p.escape(o)},e}(),bb=function(){function e(e,t,n){this._contextService=e,this._themeService=t,this._environmentService=n}return e.prototype.getHeight=function(e,t){return 23},e.prototype.getTemplateId=function(t,n){if(n instanceof qv)return e._ids.FileReferences;if(n instanceof Gv)return e._ids.OneReference;throw n},e.prototype.renderTemplate=function(t,n,i){if(n===e._ids.FileReferences)return new vb(i,this._contextService,this._environmentService,this._themeService);if(n===e._ids.OneReference)return new yb(i);throw n},e.prototype.renderElement=function(e,t,n,i){if(t instanceof qv)i.set(t);else{if(!(t instanceof Gv))throw n;i.set(t)}},e.prototype.disposeTemplate=function(e,t,n){n instanceof vb&&n.dispose()},e._ids={FileReferences:"FileReferences",OneReference:"OneReference"},e=db([fb(0,Ev),fb(1,Lr),fb(2,(0,N.lq)(oy))],e)}(),_b=function(){function e(){}return e.prototype.getAriaLabel=function(e,t){return t instanceof qv||t instanceof Gv?t.getAriaMessage():void 0},e}(),wb=function(){function e(e,t){var n,i=this;this._disposables=[],this._onDidChangePercentages=new X.vl,this._ratio=t,this._sash=new Eh(e,{getVerticalSashLeft:function(){return i._width*i._ratio},getVerticalSashHeight:function(){return i._height}}),this._disposables.push(this._sash.onDidStart((function(e){n=e.startX-i._width*i.ratio}))),this._disposables.push(this._sash.onDidChange((function(e){var t=e.currentX-n;t>20&&t+200?e.children[0]:void 0},t.prototype._revealReference=function(e,t){return n=this,i=void 0,a=function(){var n,i=this;return function(e,t){var n,i,o,r,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return r={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function a(r){return function(a){return function(r){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,i&&(o=2&r[0]?i.return:r[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,r[1])).done)return o;switch(i=0,o&&(r=[2&r[0],o.value]),r[0]){case 0:case 1:o=r;break;case 4:return s.label++,{value:r[1],done:!1};case 5:s.label++,i=r[1],r=[0];continue;case 7:r=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==r[0]&&2!==r[0])){s=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1] .monaco-tree-row.selected:not(.highlighted) { background-color: "+l+"; }");var c=e.getColor(Eb);c&&t.addRule(".monaco-editor .reference-zone-widget .ref-tree .monaco-tree.focused .monaco-tree-rows > .monaco-tree-row.selected:not(.highlighted) { color: "+c+" !important; }");var h=e.getColor(Ab);h&&t.addRule(".monaco-editor .reference-zone-widget .preview .monaco-editor .monaco-editor-background,.monaco-editor .reference-zone-widget .preview .monaco-editor .inputarea.ime-input {\tbackground-color: "+h+";}");var d=e.getColor(jb);d&&t.addRule(".monaco-editor .reference-zone-widget .preview .monaco-editor .margin {\tbackground-color: "+d+";}")}));var zb=function(e,t){return function(n,i){t(n,i,e)}},Wb=new ce("referenceSearchVisible",!1),Fb=function(){function e(e,t,n,i,o,r,s,a){this._defaultTreeKeyboardSupport=e,this._editorService=i,this._notificationService=o,this._instantiationService=r,this._storageService=s,this._configurationService=a,this._requestIdPool=0,this._disposables=[],this._ignoreModelChangeEvent=!1,this._editor=t,this._referenceSearchVisible=Wb.bindTo(n)}return e.get=function(t){return t.getContribution(e.ID)},e.prototype.getId=function(){return e.ID},e.prototype.dispose=function(){this._referenceSearchVisible.reset(),(0,I.AS)(this._disposables),(0,I.AS)(this._widget),(0,I.AS)(this._model),this._widget=null,this._model=null,this._editor=null},e.prototype.toggleWidget=function(e,t,n){var i,s=this;if(this._widget&&(i=this._widget.position),this.closeWidget(),i&&e.containsPosition(i))return null;this._referenceSearchVisible.set(!0),this._disposables.push(this._editor.onDidChangeModelLanguage((function(){s.closeWidget()}))),this._disposables.push(this._editor.onDidChangeModel((function(){s._ignoreModelChangeEvent||s.closeWidget()})));var a="peekViewLayout",u=JSON.parse(this._storageService.get(a,void 0,"{}"));this._widget=this._instantiationService.createInstance(Cb,this._editor,this._defaultTreeKeyboardSupport,u),this._widget.setTitle(o.k("labelLoading","Loading...")),this._widget.show(e),this._disposables.push(this._widget.onDidClose((function(){t.cancel(),s._storageService.store(a,JSON.stringify(s._widget.layoutData)),s._widget=null,s.closeWidget()}))),this._disposables.push(this._widget.onDidSelectReference((function(e){var t=e.element,i=e.kind;switch(i){case"open":if("editor"===e.source&&s._configurationService.getValue("editor.stablePeek"))break;case"side":s.openReference(t,"side"===i);break;case"goto":n.onGoto?n.onGoto(t):s._gotoReference(t)}})));var l=++this._requestIdPool;t.then((function(t){if(l===s._requestIdPool&&s._widget)return s._model&&s._model.dispose(),s._model=t,s._widget.setModel(s._model).then((function(){if(s._widget){s._widget.setMetaTitle(n.getMetaTitle(s._model));var t=s._editor.getModel().uri,i=new r.y(e.startLineNumber,e.startColumn),o=s._model.nearestReference(t,i);if(o)return s._widget.setSelection(o)}}))}),(function(e){s._notificationService.error(e)}))},e.prototype.goToNextOrPreviousReference=function(e){return t=this,n=void 0,o=function(){var t,n,i;return function(e,t){var n,i,o,r,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return r={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function a(r){return function(a){return function(r){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,i&&(o=2&r[0]?i.return:r[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,r[1])).done)return o;switch(i=0,o&&(r=[2&r[0],o.value]),r[0]){case 0:case 1:o=r;break;case 4:return s.label++,{value:r[1],done:!1};case 5:s.label++,i=r[1],r=[0];continue;case 7:r=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==r[0]&&2!==r[0])){s=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([zb(2,he),zb(3,Ce),zb(4,Cr),zb(5,N._Y),zb(6,dp),zb(7,uf)],e)}(),Bb=(n(7445),function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}()),Hb=function(e){function t(n,i){var o=e.call(this)||this;return o._messageListeners=[],o._editor=n,o._visible=t.MESSAGE_VISIBLE.bindTo(i),o._register(o._editor.onDidAttemptReadOnlyEdit((function(){return o._onDidAttemptReadOnlyEdit()}))),o}return Bb(t,e),t.get=function(e){return e.getContribution(t._id)},t.prototype.getId=function(){return t._id},t.prototype.dispose=function(){e.prototype.dispose.call(this),this._visible.reset()},t.prototype.showMessage=function(e,t){var n,i=this;Ep(e),this._visible.set(!0),(0,I.AS)(this._messageWidget),this._messageListeners=(0,I.AS)(this._messageListeners),this._messageWidget=new Vb(this._editor,t,e),this._messageListeners.push(this._editor.onDidBlurEditorText((function(){return i.closeMessage()}))),this._messageListeners.push(this._editor.onDidChangeCursorPosition((function(){return i.closeMessage()}))),this._messageListeners.push(this._editor.onDidDispose((function(){return i.closeMessage()}))),this._messageListeners.push(this._editor.onDidChangeModel((function(){return i.closeMessage()}))),this._messageListeners.push(function(e,t){for(var n=[],i=2;i=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([(n=1,i=he,function(e,t){i(e,t,n)})],t);var n,i}(I.jG);Te(new(Ne.bindToContribution(Hb.get))({id:"leaveEditorMessage",precondition:Hb.MESSAGE_VISIBLE,handler:function(e){return e.closeMessage()},kbOpts:{weight:130,primary:9}}));var Vb=function(){function e(e,t,n){var i=t.lineNumber,o=t.column;this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this._editor=e,this._editor.revealLinesInCenterIfOutsideViewport(i,i,0),this._position={lineNumber:i,column:o-1},this._domNode=document.createElement("div"),this._domNode.classList.add("monaco-editor-overlaymessage");var r=document.createElement("div");r.classList.add("message"),r.textContent=n,this._domNode.appendChild(r);var s=document.createElement("div");s.classList.add("anchor"),this._domNode.appendChild(s),this._editor.addContentWidget(this),this._domNode.classList.add("fadeIn")}return e.fadeOut=function(e){var t,n=function(){e.dispose(),clearTimeout(t),e.getDomNode().removeEventListener("animationend",n)};return t=setTimeout(n,110),e.getDomNode().addEventListener("animationend",n),e.getDomNode().classList.add("fadeOut"),{dispose:n}},e.prototype.dispose=function(){this._editor.removeContentWidget(this)},e.prototype.getId=function(){return"messageoverlay"},e.prototype.getDomNode=function(){return this._domNode},e.prototype.getPosition=function(){return{position:this._position,preference:[ou.ABOVE]}},e}();Ae(Hb),Tr((function(e,t){var n=e.getColor(cs);if(n){var i=e.type===Nr?2:1;t.addRule(".monaco-editor .monaco-editor-overlaymessage .anchor { border-top-color: "+n+"; }"),t.addRule(".monaco-editor .monaco-editor-overlaymessage .message { border: "+i+"px solid "+n+"; }")}var o=e.getColor(ls);o&&t.addRule(".monaco-editor .monaco-editor-overlaymessage .message { background-color: "+o+"; }")}));var Ub=(0,N.u1)("progressService"),Yb=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Zb=function(e,t,n,i){void 0===e&&(e=!1),void 0===t&&(t=!1),void 0===n&&(n=!0),void 0===i&&(i=!0),this.openToSide=e,this.openInPeek=t,this.filterCurrent=n,this.showMessage=i},Gb=function(e){function t(t,n){var i=e.call(this,n)||this;return i._configuration=t,i}return Yb(t,e),t.prototype.run=function(e,t){var n=this,i=e.get(Cr),o=e.get(Ce),r=e.get(Ub),a=t.getModel(),u=t.getPosition(),l=this._getDeclarationsAtPosition(a,u).then((function(e){if(!a.isDisposed()&&t.getModel()===a){for(var i=-1,r=[],l=0;l1&&o.k("meta.title"," – {0} definitions",e.references.length)},t.prototype._onResult=function(e,t,n){var i=this;if(Ep(n.getAriaMessage()),this._configuration.openInPeek)this._openInPeek(e,t,n);else{var o=n.nearestReference(t.getModel().uri,t.getPosition());this._openReference(t,e,o,this._configuration.openToSide).then((function(t){t&&n.references.length>1?i._openInPeek(e,t,n):n.dispose()}))}},t.prototype._openReference=function(e,t,n,i){var o=n.uri,r=n.range;return t.openCodeEditor({resource:o,options:{selection:s.Q.collapseToStart(r),revealIfOpened:!0,revealInCenterIfOutsideViewport:!0}},e,i)},t.prototype._openInPeek=function(e,t,n){var i=this,o=Fb.get(t);o?o.toggleWidget(t.getSelection(),ft((function(e){return Promise.resolve(n)})),{getMetaTitle:function(e){return i._getMetaTitle(e)},onGoto:function(n){return o.closeWidget(),i._openReference(t,e,n,!1)}}):n.dispose()},t}(xe),Qb=B.HZ?2118:70,qb=function(e){function t(){return e.call(this,new Zb,{id:t.ID,label:o.k("actions.goToDecl.label","Go to Definition"),alias:"Go to Definition",precondition:ne.and(Oe.hasDefinitionProvider,Oe.isInEmbeddedEditor.toNegated()),kbOpts:{kbExpr:Oe.editorTextFocus,primary:Qb,weight:100},menuOpts:{group:"navigation",order:1.1}})||this}return Yb(t,e),t.ID="editor.action.goToDeclaration",t}(Gb),Kb=function(e){function t(){return e.call(this,new Zb(!0),{id:t.ID,label:o.k("actions.goToDeclToSide.label","Open Definition to the Side"),alias:"Open Definition to the Side",precondition:ne.and(Oe.hasDefinitionProvider,Oe.isInEmbeddedEditor.toNegated()),kbOpts:{kbExpr:Oe.editorTextFocus,primary:O(2089,Qb),weight:100}})||this}return Yb(t,e),t.ID="editor.action.openDeclarationToTheSide",t}(Gb),Jb=function(e){function t(){return e.call(this,new Zb(void 0,!0,!1),{id:"editor.action.previewDeclaration",label:o.k("actions.previewDecl.label","Peek Definition"),alias:"Peek Definition",precondition:ne.and(Oe.hasDefinitionProvider,Av.notInPeekEditor,Oe.isInEmbeddedEditor.toNegated()),kbOpts:{kbExpr:Oe.editorTextFocus,primary:582,linux:{primary:3140},weight:100},menuOpts:{group:"navigation",order:1.2}})||this}return Yb(t,e),t}(Gb),Xb=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Yb(t,e),t.prototype._getDeclarationsAtPosition=function(e,t){return fv(e,t)},t.prototype._getNoResultFoundMessage=function(e){return e&&e.word?o.k("goToImplementation.noResultWord","No implementation found for '{0}'",e.word):o.k("goToImplementation.generic.noResults","No implementation found")},t.prototype._getMetaTitle=function(e){return e.references.length>1&&o.k("meta.implementations.title"," – {0} implementations",e.references.length)},t}(Gb),$b=function(e){function t(){return e.call(this,new Zb,{id:t.ID,label:o.k("actions.goToImplementation.label","Go to Implementation"),alias:"Go to Implementation",precondition:ne.and(Oe.hasImplementationProvider,Oe.isInEmbeddedEditor.toNegated()),kbOpts:{kbExpr:Oe.editorTextFocus,primary:2118,weight:100}})||this}return Yb(t,e),t.ID="editor.action.goToImplementation",t}(Xb),e_=function(e){function t(){return e.call(this,new Zb(!1,!0,!1),{id:t.ID,label:o.k("actions.peekImplementation.label","Peek Implementation"),alias:"Peek Implementation",precondition:ne.and(Oe.hasImplementationProvider,Oe.isInEmbeddedEditor.toNegated()),kbOpts:{kbExpr:Oe.editorTextFocus,primary:3142,weight:100}})||this}return Yb(t,e),t.ID="editor.action.peekImplementation",t}(Xb),t_=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Yb(t,e),t.prototype._getDeclarationsAtPosition=function(e,t){return pv(e,t)},t.prototype._getNoResultFoundMessage=function(e){return e&&e.word?o.k("goToTypeDefinition.noResultWord","No type definition found for '{0}'",e.word):o.k("goToTypeDefinition.generic.noResults","No type definition found")},t.prototype._getMetaTitle=function(e){return e.references.length>1&&o.k("meta.typeDefinitions.title"," – {0} type definitions",e.references.length)},t}(Gb),n_=function(e){function t(){return e.call(this,new Zb,{id:t.ID,label:o.k("actions.goToTypeDefinition.label","Go to Type Definition"),alias:"Go to Type Definition",precondition:ne.and(Oe.hasTypeDefinitionProvider,Oe.isInEmbeddedEditor.toNegated()),kbOpts:{kbExpr:Oe.editorTextFocus,primary:0,weight:100},menuOpts:{group:"navigation",order:1.4}})||this}return Yb(t,e),t.ID="editor.action.goToTypeDefinition",t}(t_),i_=function(e){function t(){return e.call(this,new Zb(!1,!0,!1),{id:t.ID,label:o.k("actions.peekTypeDefinition.label","Peek Type Definition"),alias:"Peek Type Definition",precondition:ne.and(Oe.hasTypeDefinitionProvider,Oe.isInEmbeddedEditor.toNegated()),kbOpts:{kbExpr:Oe.editorTextFocus,primary:0,weight:100}})||this}return Yb(t,e),t.ID="editor.action.peekTypeDefinition",t}(t_);Ee(qb),Ee(Kb),Ee(Jb),Ee($b),Ee(e_),Ee(n_),Ee(i_),n(9114);var o_=(0,N.u1)("modeService"),r_=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();function s_(e,t){return!!e[t]}var a_=function(e,t){this.target=e.target,this.hasTriggerModifier=s_(e.event,t.triggerModifier),this.hasSideBySideModifier=s_(e.event,t.triggerSideBySideModifier),this.isNoneOrSingleMouseDown=xt||e.event.detail<=1},u_=function(e,t){this.keyCodeIsTriggerKey=e.keyCode===t.triggerKey,this.keyCodeIsSideBySideKey=e.keyCode===t.triggerSideBySideKey,this.hasTriggerModifier=s_(e,t.triggerModifier)},l_=function(){function e(e,t,n,i){this.triggerKey=e,this.triggerModifier=t,this.triggerSideBySideKey=n,this.triggerSideBySideModifier=i}return e.prototype.equals=function(e){return this.triggerKey===e.triggerKey&&this.triggerModifier===e.triggerModifier&&this.triggerSideBySideKey===e.triggerSideBySideKey&&this.triggerSideBySideModifier===e.triggerSideBySideModifier},e}();function c_(e){return"altKey"===e?B.zx?new l_(57,"metaKey",6,"altKey"):new l_(5,"ctrlKey",6,"altKey"):B.zx?new l_(6,"altKey",57,"metaKey"):new l_(6,"altKey",5,"ctrlKey")}var h_,d_,f_,p_=function(e){function t(t){var n=e.call(this)||this;return n._onMouseMoveOrRelevantKeyDown=n._register(new X.vl),n.onMouseMoveOrRelevantKeyDown=n._onMouseMoveOrRelevantKeyDown.event,n._onExecute=n._register(new X.vl),n.onExecute=n._onExecute.event,n._onCancel=n._register(new X.vl),n.onCancel=n._onCancel.event,n._editor=t,n._opts=c_(n._editor.getConfiguration().multiCursorModifier),n.lastMouseMoveEvent=null,n.hasTriggerKeyOnMouseDown=!1,n._register(n._editor.onDidChangeConfiguration((function(e){if(e.multiCursorModifier){var t=c_(n._editor.getConfiguration().multiCursorModifier);if(n._opts.equals(t))return;n._opts=t,n.lastMouseMoveEvent=null,n.hasTriggerKeyOnMouseDown=!1,n._onCancel.fire()}}))),n._register(n._editor.onMouseMove((function(e){return n.onEditorMouseMove(new a_(e,n._opts))}))),n._register(n._editor.onMouseDown((function(e){return n.onEditorMouseDown(new a_(e,n._opts))}))),n._register(n._editor.onMouseUp((function(e){return n.onEditorMouseUp(new a_(e,n._opts))}))),n._register(n._editor.onKeyDown((function(e){return n.onEditorKeyDown(new u_(e,n._opts))}))),n._register(n._editor.onKeyUp((function(e){return n.onEditorKeyUp(new u_(e,n._opts))}))),n._register(n._editor.onMouseDrag((function(){return n.resetHandler()}))),n._register(n._editor.onDidChangeCursorSelection((function(e){return n.onDidChangeCursorSelection(e)}))),n._register(n._editor.onDidChangeModel((function(e){return n.resetHandler()}))),n._register(n._editor.onDidChangeModelContent((function(){return n.resetHandler()}))),n._register(n._editor.onDidScrollChange((function(e){(e.scrollTopChanged||e.scrollLeftChanged)&&n.resetHandler()}))),n}return r_(t,e),t.prototype.onDidChangeCursorSelection=function(e){e.selection&&e.selection.startColumn!==e.selection.endColumn&&this.resetHandler()},t.prototype.onEditorMouseMove=function(e){this.lastMouseMoveEvent=e,this._onMouseMoveOrRelevantKeyDown.fire([e,null])},t.prototype.onEditorMouseDown=function(e){this.hasTriggerKeyOnMouseDown=e.hasTriggerModifier},t.prototype.onEditorMouseUp=function(e){this.hasTriggerKeyOnMouseDown&&this._onExecute.fire(e)},t.prototype.onEditorKeyDown=function(e){this.lastMouseMoveEvent&&(e.keyCodeIsTriggerKey||e.keyCodeIsSideBySideKey&&e.hasTriggerModifier)?this._onMouseMoveOrRelevantKeyDown.fire([this.lastMouseMoveEvent,e]):e.hasTriggerModifier&&this._onCancel.fire()},t.prototype.onEditorKeyUp=function(e){e.keyCodeIsTriggerKey&&this._onCancel.fire()},t.prototype.resetHandler=function(){this.lastMouseMoveEvent=null,this.hasTriggerKeyOnMouseDown=!1,this._onCancel.fire()},t}(I.jG),g_=function(e,t){return function(n,i){t(n,i,e)}},m_=function(){function e(e,t,n){var i=this;this.textModelResolverService=t,this.modeService=n,this.toUnhook=[],this.decorations=[],this.editor=e,this.throttler=new gt;var o=new p_(e);this.toUnhook.push(o),this.toUnhook.push(o.onMouseMoveOrRelevantKeyDown((function(e){var t=e[0],n=e[1];i.startFindDefinition(t,n)}))),this.toUnhook.push(o.onExecute((function(e){i.isEnabled(e)&&i.gotoDefinition(e.target,e.hasSideBySideModifier).done((function(){i.removeDecorations()}),(function(e){i.removeDecorations(),(0,S.dz)(e)}))}))),this.toUnhook.push(o.onCancel((function(){i.removeDecorations(),i.currentWordUnderMouse=null})))}return e.prototype.startFindDefinition=function(e,t){var n=this;if(!this.isEnabled(e,t))return this.currentWordUnderMouse=null,void this.removeDecorations();var i=e.target.position,r=i?this.editor.getModel().getWordAtPosition(i):null;if(!r)return this.currentWordUnderMouse=null,void this.removeDecorations();if(!this.currentWordUnderMouse||this.currentWordUnderMouse.startColumn!==r.startColumn||this.currentWordUnderMouse.endColumn!==r.endColumn||this.currentWordUnderMouse.word!==r.word){this.currentWordUnderMouse=r;var a=new sd(this.editor,15);this.throttler.queue((function(){return a.validate(n.editor)?n.findDefinition(e.target):J.g3.wrap(null)})).then((function(e){if(e&&e.length&&a.validate(n.editor))if(e.length>1)n.addDecoration(new s.Q(i.lineNumber,r.startColumn,i.lineNumber,r.endColumn),(new yp).appendText(o.k("multipleResults","Click to show {0} definitions.",e.length)));else{var t=e[0];if(!t.uri)return;n.textModelResolverService.createModelReference(t.uri).then((function(e){if(e.object&&e.object.textEditorModel){var o=e.object.textEditorModel,a=t.range.startLineNumber;if(0!==o.getLineMaxColumn(a)){var u,l=n.getPreviewValue(o,a);u=t.origin?s.Q.lift(t.origin):new s.Q(i.lineNumber,r.startColumn,i.lineNumber,r.endColumn),n.addDecoration(u,(new yp).appendCodeblock(n.modeService.getModeIdByFilenameOrFirstLine(o.uri.fsPath),l)),e.dispose()}else e.dispose()}else e.dispose()}))}else n.removeDecorations()})).done(void 0,S.dz)}},e.prototype.getPreviewValue=function(t,n){var i=this.getPreviewRangeBasedOnBrackets(t,n);return i.endLineNumber-i.startLineNumber>=e.MAX_SOURCE_PREVIEW_LINES&&(i=this.getPreviewRangeBasedOnIndentation(t,n)),this.stripIndentationFromPreviewRange(t,n,i)},e.prototype.stripIndentationFromPreviewRange=function(e,t,n){for(var i=e.getLineFirstNonWhitespaceColumn(t),o=t+1;oi)return new s.Q(n,1,i+1,1);u=t.findNextBracket(new r.y(h,d))}return new s.Q(n,1,i+1,1)},e.prototype.addDecoration=function(e,t){var n={range:e,options:{inlineClassName:"goto-definition-link",hoverMessage:t}};this.decorations=this.editor.deltaDecorations(this.decorations,[n])},e.prototype.removeDecorations=function(){this.decorations.length>0&&(this.decorations=this.editor.deltaDecorations(this.decorations,[]))},e.prototype.isEnabled=function(e,t){return this.editor.getModel()&&e.isNoneOrSingleMouseDown&&e.target.type===su.CONTENT_TEXT&&(e.hasTriggerModifier||t&&t.keyCodeIsTriggerKey)&&No.UU.has(this.editor.getModel())},e.prototype.findDefinition=function(e){var t=this.editor.getModel();return t?dv(t,e.position):J.g3.as(null)},e.prototype.gotoDefinition=function(e,t){var n=this;this.editor.setPosition(e.position);var i=new Gb(new Zb(t,!1,!0,!1),{alias:void 0,label:void 0,id:void 0,precondition:void 0});return this.editor.invokeWithinContext((function(e){return i.run(e,n.editor)}))},e.prototype.getId=function(){return e.ID},e.prototype.dispose=function(){this.toUnhook=(0,I.AS)(this.toUnhook)},e.ID="editor.contrib.gotodefinitionwithmouse",e.MAX_SOURCE_PREVIEW_LINES=8,e=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([g_(1,Jv),g_(2,o_)],e)}();Ae(m_),Tr((function(e,t){var n=e.getColor(ea);n&&t.addRule(".monaco-editor .goto-definition-link { color: "+n+" !important; }")})),function(e){e[e.Unnecessary=1]="Unnecessary"}(h_||(h_={})),function(e){e[e.Hint=1]="Hint",e[e.Info=2]="Info",e[e.Warning=4]="Warning",e[e.Error=8]="Error"}(d_||(d_={})),function(e){e.compare=function(e,t){return t-e};var t=Object.create(null);t[e.Error]=(0,o.k)("sev.error","Error"),t[e.Warning]=(0,o.k)("sev.warning","Warning"),t[e.Info]=(0,o.k)("sev.info","Info"),e.toString=function(e){return t[e]||""},e.fromSeverity=function(t){switch(t){case Mr.Error:return e.Error;case Mr.Warning:return e.Warning;case Mr.Info:return e.Info;case Mr.Ignore:return e.Hint}}}(d_||(d_={})),function(e){var t="";e.makeKey=function(e){var n=[t];return e.source?n.push(e.source.replace("¦","¦")):n.push(t),e.code?n.push(e.code.replace("¦","¦")):n.push(t),void 0!==e.severity&&null!==e.severity?n.push(d_.toString(e.severity)):n.push(t),e.message?n.push(e.message.replace("¦","¦")):n.push(t),void 0!==e.startLineNumber&&null!==e.startLineNumber?n.push(e.startLineNumber.toString()):n.push(t),void 0!==e.startColumn&&null!==e.startColumn?n.push(e.startColumn.toString()):n.push(t),void 0!==e.endLineNumber&&null!==e.endLineNumber?n.push(e.endLineNumber.toString()):n.push(t),void 0!==e.endColumn&&null!==e.endColumn?n.push(e.endColumn.toString()):n.push(t),n.push(t),n.join("¦")}}(f_||(f_={}));var v_=(0,N.u1)("markerService"),y_=(n(7609),function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}()),b_=function(){function e(e,t,n){var i=this;this._lines=0,this._longestLineLength=0,this._relatedDiagnostics=new WeakMap,this._disposables=[],this._editor=t;var o=document.createElement("div");o.className="descriptioncontainer",o.setAttribute("aria-live","assertive"),o.setAttribute("role","alert"),this._messageBlock=document.createElement("div"),o.appendChild(this._messageBlock),this._relatedBlock=document.createElement("div"),o.appendChild(this._relatedBlock),this._disposables.push(hn(this._relatedBlock,"click",(function(e){e.preventDefault();var t=i._relatedDiagnostics.get(e.target);t&&n(t)}))),this._scrollable=new Zc(o,{horizontal:gr.XR.Auto,vertical:gr.XR.Auto,useShadows:!1,horizontalScrollbarSize:3,verticalScrollbarSize:3}),sn(this._scrollable.getDomNode(),"block"),e.appendChild(this._scrollable.getDomNode()),this._disposables.push(this._scrollable.onScroll((function(e){o.style.left="-"+e.scrollLeft+"px",o.style.top="-"+e.scrollTop+"px"}))),this._disposables.push(this._scrollable)}return e.prototype.dispose=function(){(0,I.AS)(this._disposables)},e.prototype.update=function(e){var t=e.source,n=e.message,i=e.relatedInformation;if(t){this._lines=0,this._longestLineLength=0;for(var o=new Array(t.length+3+1).join(" "),r=n.split(/\r\n|\r|\n/g),s=0;s=0?this._markers[this._nextIdx]:void 0;this._markers=e||[],this._markers.sort(E_.compareMarker),this._nextIdx=t?Math.max(-1,(0,tu.El)(this._markers,t,E_.compareMarker)):-1,this._onMarkerSetChanged.fire(this)},e.prototype.withoutWatchingEditorPosition=function(e){this._ignoreSelectionChange=!0;try{e()}finally{this._ignoreSelectionChange=!1}},e.prototype._initIdx=function(e){for(var t=!1,n=this._editor.getPosition(),i=0;i0?this._nextIdx=(this._nextIdx-1+this._markers.length)%this._markers.length:i=!0),n!==this._nextIdx){var o=this._markers[this._nextIdx];this._onCurrentMarkerChanged.fire(o)}return i},e.prototype.canNavigate=function(){return this._markers.length>0},e.prototype.findMarkerAtPosition=function(e){for(var t=0,n=this._markers;t=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([D_(1,v_),D_(2,he),D_(3,Lr),D_(4,Ce)],e)}(),E_=function(e){function t(t,n,i){var o=e.call(this,i)||this;return o._isNext=t,o._multiFile=n,o}return x_(t,e),t.prototype.run=function(e,n){var i=this,o=e.get(v_),r=e.get(Ce),s=T_.get(n);if(s){var a=s.getOrCreateModel();if(a.move(this._isNext,!this._multiFile)&&this._multiFile){var u=o.read({severities:d_.Error|d_.Warning|d_.Info}).sort(t.compareMarker);if(0!==u.length){var l=a.currentMarker||{resource:n.getModel().uri,severity:d_.Error,startLineNumber:1,startColumn:1,endLineNumber:1,endColumn:1},c=(0,tu.El)(u,l,t.compareMarker);c<0?(c=~c,c%=u.length):c=this._isNext?(c+1)%u.length:(c+u.length-1)%u.length;var h=u[c];if(h.resource.toString()!==n.getModel().uri.toString())return s.closeMarkersNavigation(),r.openCodeEditor({resource:h.resource,options:{pinned:!1,revealIfOpened:!0,revealInCenterIfOutsideViewport:!0,selection:h}},n).then((function(e){if(e)return e.getAction(i.id).run()}));a.move(this._isNext,!0)}}}},t.compareMarker=function(e,t){var n=(0,p.compare)(e.resource.toString(),t.resource.toString());return 0===n&&(n=d_.compare(e.severity,t.severity)),0===n&&(n=s.Q.compareRangesUsingStarts(e,t)),n},t}(xe),A_=function(e){function t(){return e.call(this,!0,!1,{id:"editor.action.marker.next",label:o.k("markerAction.next.label","Go to Next Problem (Error, Warning, Info)"),alias:"Go to Next Error or Warning",precondition:Oe.writable})||this}return x_(t,e),t}(E_),j_=function(e){function t(){return e.call(this,!1,!1,{id:"editor.action.marker.prev",label:o.k("markerAction.previous.label","Go to Previous Problem (Error, Warning, Info)"),alias:"Go to Previous Error or Warning",precondition:Oe.writable})||this}return x_(t,e),t}(E_),O_=function(e){function t(){return e.call(this,!0,!0,{id:"editor.action.marker.nextInFiles",label:o.k("markerAction.nextInFiles.label","Go to Next Problem in Files (Error, Warning, Info)"),alias:"Go to Next Error or Warning in Files",precondition:Oe.writable,kbOpts:{kbExpr:Oe.focus,primary:66,weight:100}})||this}return x_(t,e),t}(E_),R_=function(e){function t(){return e.call(this,!1,!0,{id:"editor.action.marker.prevInFiles",label:o.k("markerAction.previousInFiles.label","Go to Previous Problem in Files (Error, Warning, Info)"),alias:"Go to Previous Error or Warning in Files",precondition:Oe.writable,kbOpts:{kbExpr:Oe.focus,primary:1090,weight:100}})||this}return x_(t,e),t}(E_);Ae(T_),Ee(A_),Ee(j_),Ee(O_),Ee(R_);var P_=new ce("markersNavigationVisible",!1);Te(new(Ne.bindToContribution(T_.get))({id:"closeMarkersNavigation",precondition:P_,handler:function(e){return e.closeMarkersNavigation()},kbOpts:{weight:150,kbExpr:Oe.focus,primary:9,secondary:[1033]}})),n(541);var z_=(0,N.u1)("openerService"),W_=Object.freeze({_serviceBrand:void 0,open:function(){return J.g3.as(void 0)}});function F_(e,t,n){var i=No.r8.ordered(e).map((function(i){return Promise.resolve(i.provideHover(e,t,n)).then((function(e){return e&&(n=void 0!==(t=e).range,i=void 0!==t.contents&&t.contents&&t.contents.length>0,n&&i)?e:void 0;var t,n,i}),(function(e){(0,S.M_)(e)}))}));return Promise.all(i).then((function(e){return(0,tu.Yc)(e)}))}ke("_executeHoverProvider",(function(e,t){return F_(e,t,st.None)}));var B_=function(){function e(t,n,i,o){var r=this;this._computer=t,this._state=0,this._hoverTime=e.HOVER_TIME,this._firstWaitScheduler=new Ct((function(){return r._triggerAsyncComputation()}),0),this._secondWaitScheduler=new Ct((function(){return r._triggerSyncComputation()}),0),this._loadingMessageScheduler=new Ct((function(){return r._showLoadingMessage()}),0),this._asyncComputationPromise=null,this._asyncComputationPromiseDone=!1,this._completeCallback=n,this._errorCallback=i,this._progressCallback=o}return e.prototype.setHoverTime=function(e){this._hoverTime=e},e.prototype._firstWaitTime=function(){return this._hoverTime/2},e.prototype._secondWaitTime=function(){return this._hoverTime/2},e.prototype._loadingMessageTime=function(){return 3*this._hoverTime},e.prototype._triggerAsyncComputation=function(){var e=this;this._state=2,this._secondWaitScheduler.schedule(this._secondWaitTime()),this._computer.computeAsync?(this._asyncComputationPromiseDone=!1,this._asyncComputationPromise=ft((function(t){return e._computer.computeAsync(t)})),this._asyncComputationPromise.then((function(t){e._asyncComputationPromiseDone=!0,e._withAsyncResult(t)}),(function(t){return e._onError(t)}))):this._asyncComputationPromiseDone=!0},e.prototype._triggerSyncComputation=function(){this._computer.computeSync&&this._computer.onResult(this._computer.computeSync(),!0),this._asyncComputationPromiseDone?(this._state=0,this._onComplete(this._computer.getResult())):(this._state=3,this._onProgress(this._computer.getResult()))},e.prototype._showLoadingMessage=function(){3===this._state&&this._onProgress(this._computer.getResultWithLoadingMessage())},e.prototype._withAsyncResult=function(e){e&&this._computer.onResult(e,!1),3===this._state&&(this._state=0,this._onComplete(this._computer.getResult()))},e.prototype._onComplete=function(e){this._completeCallback&&this._completeCallback(e)},e.prototype._onError=function(e){this._errorCallback?this._errorCallback(e):(0,S.dz)(e)},e.prototype._onProgress=function(e){this._progressCallback&&this._progressCallback(e)},e.prototype.start=function(e){if(0===e)0===this._state&&(this._state=1,this._firstWaitScheduler.schedule(this._firstWaitTime()),this._loadingMessageScheduler.schedule(this._loadingMessageTime()));else switch(this._state){case 0:this._triggerAsyncComputation(),this._secondWaitScheduler.cancel(),this._triggerSyncComputation();break;case 2:this._secondWaitScheduler.cancel(),this._triggerSyncComputation()}},e.prototype.cancel=function(){this._loadingMessageScheduler.cancel(),1===this._state&&this._firstWaitScheduler.cancel(),2===this._state&&(this._secondWaitScheduler.cancel(),this._asyncComputationPromise&&(this._asyncComputationPromise.cancel(),this._asyncComputationPromise=null)),3===this._state&&this._asyncComputationPromise&&(this._asyncComputationPromise.cancel(),this._asyncComputationPromise=null),this._state=0},e.HOVER_TIME=300,e}(),H_=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),V_=function(e){function t(t,n){var i=e.call(this)||this;return i.disposables=[],i.allowEditorOverflow=!0,i._id=t,i._editor=n,i._isVisible=!1,i._containerDomNode=document.createElement("div"),i._containerDomNode.className="monaco-editor-hover hidden",i._containerDomNode.tabIndex=0,i._domNode=document.createElement("div"),i._domNode.className="monaco-editor-hover-content",i.scrollbar=new Qc(i._domNode,{}),i.disposables.push(i.scrollbar),i._containerDomNode.appendChild(i.scrollbar.getDomNode()),i.onkeydown(i._containerDomNode,(function(e){e.equals(9)&&i.hide()})),i._register(i._editor.onDidChangeConfiguration((function(e){e.fontInfo&&i.updateFont()}))),i._editor.onDidLayoutChange((function(e){return i.updateMaxHeight()})),i.updateMaxHeight(),i._editor.addContentWidget(i),i._showAtPosition=null,i}return H_(t,e),Object.defineProperty(t.prototype,"isVisible",{get:function(){return this._isVisible},set:function(e){this._isVisible=e,un(this._containerDomNode,"hidden",!this._isVisible)},enumerable:!0,configurable:!0}),t.prototype.getId=function(){return this._id},t.prototype.getDomNode=function(){return this._containerDomNode},t.prototype.showAt=function(e,t){this._showAtPosition=new r.y(e.lineNumber,e.column),this.isVisible=!0,this._editor.layoutContentWidget(this),this._editor.render(),this._stoleFocus=t,t&&this._containerDomNode.focus()},t.prototype.hide=function(){this.isVisible&&(this.isVisible=!1,this._editor.layoutContentWidget(this),this._stoleFocus&&this._editor.focus())},t.prototype.getPosition=function(){return this.isVisible?{position:this._showAtPosition,preference:[ou.ABOVE,ou.BELOW]}:null},t.prototype.dispose=function(){this._editor.removeContentWidget(this),this.disposables=(0,I.AS)(this.disposables),e.prototype.dispose.call(this)},t.prototype.updateFont=function(){var e=this;Array.prototype.slice.call(this._domNode.getElementsByClassName("code")).forEach((function(t){return e._editor.applyFontInfo(t)}))},t.prototype.updateContents=function(e){this._domNode.textContent="",this._domNode.appendChild(e),this.updateFont(),this._editor.layoutContentWidget(this),this.onContentsChange()},t.prototype.onContentsChange=function(){this.scrollbar.scanDomNode()},t.prototype.updateMaxHeight=function(){var e=Math.max(this._editor.getLayoutInfo().height/4,250),t=this._editor.getConfiguration().fontInfo,n=t.fontSize,i=t.lineHeight;this._domNode.style.fontSize=n+"px",this._domNode.style.lineHeight=i+"px",this._domNode.style.maxHeight=e+"px"},t}(kc),U_=function(e){function t(t,n){var i=e.call(this)||this;return i._id=t,i._editor=n,i._isVisible=!1,i._domNode=document.createElement("div"),i._domNode.className="monaco-editor-hover hidden",i._domNode.setAttribute("aria-hidden","true"),i._domNode.setAttribute("role","presentation"),i._showAtLineNumber=-1,i._register(i._editor.onDidChangeConfiguration((function(e){e.fontInfo&&i.updateFont()}))),i._editor.addOverlayWidget(i),i}return H_(t,e),Object.defineProperty(t.prototype,"isVisible",{get:function(){return this._isVisible},set:function(e){this._isVisible=e,un(this._domNode,"hidden",!this._isVisible)},enumerable:!0,configurable:!0}),t.prototype.getId=function(){return this._id},t.prototype.getDomNode=function(){return this._domNode},t.prototype.showAt=function(e){this._showAtLineNumber=e,this.isVisible||(this.isVisible=!0);var t=this._editor.getLayoutInfo(),n=this._editor.getTopForLineNumber(this._showAtLineNumber),i=this._editor.getScrollTop(),o=this._editor.getConfiguration().lineHeight,r=n-i-(this._domNode.clientHeight-o)/2;this._domNode.style.left=t.glyphMarginLeft+t.glyphMarginWidth+"px",this._domNode.style.top=Math.max(Math.round(r),0)+"px"},t.prototype.hide=function(){this.isVisible&&(this.isVisible=!1)},t.prototype.getPosition=function(){return null},t.prototype.dispose=function(){this._editor.removeOverlayWidget(this),e.prototype.dispose.call(this)},t.prototype.updateFont=function(){var e=this,t=Array.prototype.slice.call(this._domNode.getElementsByTagName("code")),n=Array.prototype.slice.call(this._domNode.getElementsByClassName("code"));t.concat(n).forEach((function(t){return e._editor.applyFontInfo(t)}))},t.prototype.updateContents=function(e){this._domNode.textContent="",this._domNode.appendChild(e),this.updateFont()},t}(kc),Y_=function(){function e(e,t,n){this.presentationIndex=n,this._onColorFlushed=new X.vl,this.onColorFlushed=this._onColorFlushed.event,this._onDidChangeColor=new X.vl,this.onDidChangeColor=this._onDidChangeColor.event,this._onDidChangePresentation=new X.vl,this.onDidChangePresentation=this._onDidChangePresentation.event,this.originalColor=e,this._color=e,this._colorPresentations=t}return Object.defineProperty(e.prototype,"color",{get:function(){return this._color},set:function(e){this._color.equals(e)||(this._color=e,this._onDidChangeColor.fire(e))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"presentation",{get:function(){return this.colorPresentations[this.presentationIndex]},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"colorPresentations",{get:function(){return this._colorPresentations},set:function(e){this._colorPresentations=e,this.presentationIndex>e.length-1&&(this.presentationIndex=0),this._onDidChangePresentation.fire(this.presentation)},enumerable:!0,configurable:!0}),e.prototype.selectNextColorPresentation=function(){this.presentationIndex=(this.presentationIndex+1)%this.colorPresentations.length,this.flushColor(),this._onDidChangePresentation.fire(this.presentation)},e.prototype.guessColorPresentation=function(e,t){for(var n=0;nthis._editor.getModel().getLineCount())return[];var n=gf.get(this._editor),i=this._editor.getModel().getLineMaxColumn(t),o=this._editor.getLineDecorations(t),r=!1,a=o.map((function(o){var a=o.range.startLineNumber===t?o.range.startColumn:1,u=o.range.endLineNumber===t?o.range.endColumn:i;if(a>e._range.startColumn||e._range.endColumn>u)return null;var l=new s.Q(e._range.startLineNumber,a,e._range.startLineNumber,u),c=n.getColorData(o.range.getStartPosition());if(!r&&c){r=!0;var h=c.colorInfo,d=h.color,f=h.range;return new iw(f,d,c.provider)}if(bp(o.options.hoverMessage))return null;var p=void 0;return o.options.hoverMessage&&(p=Array.isArray(o.options.hoverMessage)?o.options.hoverMessage.slice():[o.options.hoverMessage]),{contents:p,range:l}}));return a.filter((function(e){return!!e}))},e.prototype.onResult=function(e,t){this._result=t?e.concat(this._result.sort((function(e,t){return e instanceof iw?-1:t instanceof iw?1:0}))):this._result.concat(e)},e.prototype.getResult=function(){return this._result.slice(0)},e.prototype.getResultWithLoadingMessage=function(){return this._result.slice(0).concat([this._getLoadingMessage()])},e.prototype._getLoadingMessage=function(){return{range:this._range,contents:[(new yp).appendText(o.k("modesContentHover.loading","Loading..."))]}},e}(),rw=function(e){function t(n,i,o){var r=e.call(this,t.ID,n)||this;return r._themeService=o,r.renderDisposable=I.jG.None,r._computer=new ow(r._editor),r._highlightDecorations=[],r._isChangingDecorations=!1,r._markdownRenderer=i,r._register(i.onDidRenderCodeBlock(r.onContentsChange,r)),r._hoverOperation=new B_(r._computer,(function(e){return r._withResult(e,!0)}),null,(function(e){return r._withResult(e,!1)})),r._register(hn(r.getDomNode(),Un.FOCUS,(function(){r._colorPicker&&sn(r.getDomNode(),"colorpicker-hover")}))),r._register(hn(r.getDomNode(),Un.BLUR,(function(){an(r.getDomNode(),"colorpicker-hover")}))),r._register(n.onDidChangeConfiguration((function(e){r._hoverOperation.setHoverTime(r._editor.getConfiguration().contribInfo.hover.delay)}))),r}return tw(t,e),t.prototype.dispose=function(){this.renderDisposable.dispose(),this.renderDisposable=I.jG.None,this._hoverOperation.cancel(),e.prototype.dispose.call(this)},t.prototype.onModelDecorationsChanged=function(){this._isChangingDecorations||this.isVisible&&(this._hoverOperation.cancel(),this._computer.clearResult(),this._colorPicker||this._hoverOperation.start(0))},t.prototype.startShowingAt=function(e,t,n){if(!this._lastRange||!this._lastRange.equalsRange(e)){if(this._hoverOperation.cancel(),this.isVisible)if(this._showAtPosition.lineNumber!==e.startLineNumber)this.hide();else{for(var i=[],o=0,r=this._messages.length;o=e.endColumn&&i.push(s)}if(i.length>0){if(function(e,t){if(!e&&t||e&&!t||e.length!==t.length)return!1;for(var n=0;n0?this._renderMessages(this._lastRange,this._messages):t&&this.hide()},t.prototype._renderMessages=function(e,n){var i=this;this.renderDisposable.dispose(),this._colorPicker=null;var o,a=Number.MAX_VALUE,u=n[0].range,l=document.createDocumentFragment(),c=!0,h=!1;n.forEach((function(t){if(t.range)if(a=Math.min(a,t.range.startColumn),u=s.Q.plusRange(u,t.range),t instanceof iw){h=!0;var n=t.color,d=n.red,f=n.green,p=n.blue,g=n.alpha,m=new Uo(255*d,255*f,255*p,g),v=new Go(m),y=i._editor.getModel(),b=new s.Q(t.range.startLineNumber,t.range.startColumn,t.range.endLineNumber,t.range.endColumn),_={range:t.range,color:t.color},w=new Y_(v,[],0),M=new ew(l,w,i._editor.getConfiguration().pixelRatio,i._themeService);sf(y,_,t.provider,st.None).then((function(n){w.colorPresentations=n;var u=i._editor.getModel().getValueInRange(t.range);w.guessColorPresentation(v,u);var c=function(){var e,t;w.presentation.textEdit?(e=[w.presentation.textEdit],t=(t=new s.Q(w.presentation.textEdit.range.startLineNumber,w.presentation.textEdit.range.startColumn,w.presentation.textEdit.range.endLineNumber,w.presentation.textEdit.range.endColumn)).setEndPosition(t.endLineNumber,t.startColumn+w.presentation.textEdit.text.length)):(e=[{identifier:null,range:b,text:w.presentation.label,forceMoveMarkers:!1}],t=b.setEndPosition(b.endLineNumber,b.startColumn+w.presentation.label.length)),i._editor.executeEdits("colorpicker",e),w.presentation.additionalTextEdits&&(e=w.presentation.additionalTextEdits.slice(),i._editor.executeEdits("colorpicker",e),i.hide()),i._editor.pushUndoStop(),b=t},h=function(e){return sf(y,{range:b,color:{red:e.rgba.r/255,green:e.rgba.g/255,blue:e.rgba.b/255,alpha:e.rgba.a}},t.provider,st.None).then((function(e){w.colorPresentations=e}))},d=w.onColorFlushed((function(e){h(e).then(c)})),f=w.onDidChangeColor(h);i._colorPicker=M,i.showAt(new r.y(e.startLineNumber,a),i._shouldFocus),i.updateContents(l),i._colorPicker.layout(),i.renderDisposable=(0,I.qE)([d,f,M,o])}))}else t.contents.filter((function(e){return!bp(e)})).forEach((function(e){var t=i._markdownRenderer.render(e);o=t,l.appendChild(nw("div.hover-row",null,t.element)),c=!1}))})),h||c||(this.showAt(new r.y(e.startLineNumber,a),this._shouldFocus),this.updateContents(l)),this._isChangingDecorations=!0,this._highlightDecorations=this._editor.deltaDecorations(this._highlightDecorations,[{range:u,options:t._DECORATION_OPTIONS}]),this._isChangingDecorations=!1},t.ID="editor.contrib.modesContentHoverWidget",t._DECORATION_OPTIONS=Ho.kI.register({className:"hoverHighlight"}),t}(V_),sw=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),aw=function(){function e(e){this._editor=e,this._lineNumber=-1}return e.prototype.setLineNumber=function(e){this._lineNumber=e,this._result=[]},e.prototype.clearResult=function(){this._result=[]},e.prototype.computeSync=function(){for(var e=function(e){return{value:e}},t=this._editor.getLineDecorations(this._lineNumber),n=[],i=0,o=t.length;i0?this._renderMessages(this._lastLineNumber,this._messages):this.hide()},t.prototype._renderMessages=function(e,t){var n=this;(0,I.AS)(this._renderDisposeables),this._renderDisposeables=[];var i=document.createDocumentFragment();t.forEach((function(e){var t=n._markdownRenderer.render(e.value);n._renderDisposeables.push(t),i.appendChild(Jn("div.hover-row",null,t.element))})),this.updateContents(i),this.showAt(e)},t.ID="editor.contrib.modesGlyphHoverWidget",t}(U_),lw=function(e,t){return function(n,i){t(n,i,e)}},cw=function(){function e(e,t,n){void 0===n&&(n=W_),this._editor=e,this._modeService=t,this._openerService=n,this._onDidRenderCodeBlock=new X.vl,this.onDidRenderCodeBlock=this._onDidRenderCodeBlock.event}return e.prototype.getOptions=function(e){var t=this;return{codeBlockRenderer:function(e,n){var i=e?t._modeService.getModeIdForLanguageName(e):t._editor.getModel().getLanguageIdentifier().language;return t._modeService.getOrCreateMode(i).then((function(e){return function(e,t){for(var n='
    ',i=e.split(/\r\n|\r|\n/),o=t.getInitialState(),r=0,s=i.length;r0&&(n+="
    ");var u=t.tokenize2(a,o,0);Do.f.convertToEndOffset(u.tokens,a.length);for(var l=new Do.f(u.tokens,a).inflate(),c=0,h=0,d=l.getCount();h'+p.escape(a.substring(c,g))+"",c=g}o=u.endState}return n+"
    "}(n,function(e){return No.dG.get(e)||{getInitialState:function(){return xo.oe},tokenize:void 0,tokenize2:function(e,t,n){return(0,xo.T5)(0,e,t,n)}}}(i))})).then((function(e){return''+e+""}))},codeBlockRenderCallback:function(){return t._onDidRenderCodeBlock.fire()},actionHandler:{callback:function(e){t._openerService.open(L.A.parse(e)).then(void 0,S.dz)},disposeables:e}}},e.prototype.render=function(e){var t,n=[];return t=e?function(e,t){void 0===t&&(t={});var n,i=Sp(t),o=new Promise((function(e){return n=e})),r=new Cp.Renderer;r.image=function(e,t,n){var i=[];if(e){var o=e.split("|").map((function(e){return e.trim()}));e=o[0];var r=o[1];if(r){var s=/height=(\d+)/.exec(r),a=/width=(\d+)/.exec(r),u=s&&s[1],l=a&&a[1],c=isFinite(parseInt(l)),h=isFinite(parseInt(u));c&&i.push('width="'+l+'"'),h&&i.push('height="'+u+'"')}}var d=[];return e&&d.push('src="'+e+'"'),n&&d.push('alt="'+n+'"'),t&&d.push('title="'+t+'"'),i.length&&(d=d.concat(i)),""},r.link=function(t,n,i){return t===i&&(i=Mp(i)),n=Mp(n),!(t=Mp(t))||t.match(/^data:|javascript:/i)||t.match(/^command:/i)&&!e.isTrusted?i:''+i+""},r.paragraph=function(e){return"

    "+e+"

    "},t.codeBlockRenderer&&(r.code=function(e,n){var r=t.codeBlockRenderer(n,e),s=vp.nextId(),a=Promise.all([r,o]).then((function(e){var t=e[0],n=i.querySelector('div[data-code="'+s+'"]');n&&(n.innerHTML=t)})).catch((function(e){}));return t.codeBlockRenderCallback&&a.then(t.codeBlockRenderCallback),'
    '+(0,p.escape)(e)+"
    "}),t.actionHandler&&t.actionHandler.disposeables.push(hn(i,"click",(function(e){var n=e.target;if("A"===n.tagName||(n=n.parentElement)&&"A"===n.tagName){var i=n.dataset.href;i&&t.actionHandler.callback(i,e)}})));var s={sanitize:!0,renderer:r};return i.innerHTML=Cp(e.value,s),n(),i}(e,this.getOptions(n)):document.createElement("span"),{element:t,dispose:function(){return(0,I.AS)(n)}}},function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([lw(1,o_),lw(2,(0,N.lq)(z_))],e)}(),hw=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),dw=function(e,t){return function(n,i){t(n,i,e)}},fw=function(){function e(e,t,n,i){var o=this;this._editor=e,this._openerService=t,this._modeService=n,this._themeService=i,this._toUnhook=[],this._isMouseDown=!1,this._hoverClicked=!1,this._hookEvents(),this._didChangeConfigurationHandler=this._editor.onDidChangeConfiguration((function(e){e.contribInfo&&(o._hideWidgets(),o._unhookEvents(),o._hookEvents())}))}return Object.defineProperty(e.prototype,"contentWidget",{get:function(){return this._contentWidget||this._createHoverWidget(),this._contentWidget},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"glyphWidget",{get:function(){return this._glyphWidget||this._createHoverWidget(),this._glyphWidget},enumerable:!0,configurable:!0}),e.get=function(t){return t.getContribution(e.ID)},e.prototype._hookEvents=function(){var e=this,t=function(){return e._hideWidgets()},n=this._editor.getConfiguration().contribInfo.hover;this._isHoverEnabled=n.enabled,this._isHoverSticky=n.sticky,this._isHoverEnabled?(this._toUnhook.push(this._editor.onMouseDown((function(t){return e._onEditorMouseDown(t)}))),this._toUnhook.push(this._editor.onMouseUp((function(t){return e._onEditorMouseUp(t)}))),this._toUnhook.push(this._editor.onMouseMove((function(t){return e._onEditorMouseMove(t)}))),this._toUnhook.push(this._editor.onKeyDown((function(t){return e._onKeyDown(t)}))),this._toUnhook.push(this._editor.onDidChangeModelDecorations((function(){return e._onModelDecorationsChanged()})))):this._toUnhook.push(this._editor.onMouseMove(t)),this._toUnhook.push(this._editor.onMouseLeave(t)),this._toUnhook.push(this._editor.onDidChangeModel(t)),this._toUnhook.push(this._editor.onDidScrollChange((function(t){return e._onEditorScrollChanged(t)})))},e.prototype._unhookEvents=function(){this._toUnhook=(0,I.AS)(this._toUnhook)},e.prototype._onModelDecorationsChanged=function(){this.contentWidget.onModelDecorationsChanged(),this.glyphWidget.onModelDecorationsChanged()},e.prototype._onEditorScrollChanged=function(e){(e.scrollTopChanged||e.scrollLeftChanged)&&this._hideWidgets()},e.prototype._onEditorMouseDown=function(e){this._isMouseDown=!0;var t=e.target.type;t!==su.CONTENT_WIDGET||e.target.detail!==rw.ID?t===su.OVERLAY_WIDGET&&e.target.detail===uw.ID||(t!==su.OVERLAY_WIDGET&&e.target.detail!==uw.ID&&(this._hoverClicked=!1),this._hideWidgets()):this._hoverClicked=!0},e.prototype._onEditorMouseUp=function(e){this._isMouseDown=!1},e.prototype._onEditorMouseMove=function(e){var t=e.target.type,n=B.zx?e.event.metaKey:e.event.ctrlKey;if(!(this._isMouseDown&&this._hoverClicked&&this.contentWidget.isColorPickerVisible())&&(!this._isHoverSticky||t!==su.CONTENT_WIDGET||e.target.detail!==rw.ID||n)&&(!this._isHoverSticky||t!==su.OVERLAY_WIDGET||e.target.detail!==uw.ID||n)){if(t===su.CONTENT_EMPTY){var i=this._editor.getConfiguration().fontInfo.typicalHalfwidthCharacterWidth/2,o=e.target.detail;o&&!o.isAfterLines&&"number"==typeof o.horizontalDistanceToText&&o.horizontalDistanceToText=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([dw(1,z_),dw(2,o_),dw(3,Lr)],e)}(),pw=function(e){function t(){return e.call(this,{id:"editor.action.showHover",label:o.k({key:"showHover",comment:["Label for action that will trigger the showing of a hover in the editor.","This allows for users to show the hover without using the mouse."]},"Show Hover"),alias:"Show Hover",precondition:null,kbOpts:{kbExpr:Oe.editorTextFocus,primary:O(2089,2087),weight:100}})||this}return hw(t,e),t.prototype.run=function(e,t){var n=fw.get(t);if(n){var i=t.getPosition(),o=new s.Q(i.lineNumber,i.column,i.lineNumber,i.column);n.showContentHover(o,1,!0)}},t}(xe);Ae(fw),Ee(pw),Tr((function(e,t){var n=e.getColor(Js);n&&t.addRule(".monaco-editor .hoverHighlight { background-color: "+n+"; }");var i=e.getColor(Xs);i&&t.addRule(".monaco-editor .monaco-editor-hover { background-color: "+i+"; }");var o=e.getColor($s);o&&(t.addRule(".monaco-editor .monaco-editor-hover { border: 1px solid "+o+"; }"),t.addRule(".monaco-editor .monaco-editor-hover .hover-row:not(:first-child):not(:empty) { border-top: 1px solid "+o.transparent(.5)+"; }"));var r=e.getColor(ns);r&&t.addRule(".monaco-editor .monaco-editor-hover a { color: "+r+"; }");var s=e.getColor(is);s&&t.addRule(".monaco-editor .monaco-editor-hover code { background-color: "+s+"; }")}));var gw=function(){function e(e,t,n){this._editRange=e,this._originalSelection=t,this._text=n}return e.prototype.getEditOperations=function(e,t){t.addTrackedEditOperation(this._editRange,this._text)},e.prototype.computeCursorState=function(e,t){var n=t.getInverseEditOperations()[0].range;return this._originalSelection.isEmpty()?new Be.L(n.endLineNumber,Math.min(this._originalSelection.positionColumn,n.endColumn),n.endLineNumber,Math.min(this._originalSelection.positionColumn,n.endColumn)):new Be.L(n.endLineNumber,n.endColumn-this._text.length,n.endLineNumber,n.endColumn)},e}(),mw=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),vw=function(){function e(e,t){this.decorationIds=[],this.editor=e,this.editorWorkerService=t}return e.get=function(t){return t.getContribution(e.ID)},e.prototype.dispose=function(){},e.prototype.getId=function(){return e.ID},e.prototype.run=function(t,n){var i=this;this.currentRequest&&this.currentRequest.cancel();var o=this.editor.getSelection(),r=this.editor.getModel().uri;if(o.startLineNumber!==o.endLineNumber)return null;var a=new sd(this.editor,5);return this.editorWorkerService.canNavigateValueSet(r)?(this.currentRequest=ft((function(e){return i.editorWorkerService.navigateValueSet(r,o,n)})),this.currentRequest.then((function(n){if(n&&n.range&&n.value&&a.validate(i.editor)){var r=s.Q.lift(n.range),u=n.range,l=n.value.length-(o.endColumn-o.startColumn);u={startLineNumber:u.startLineNumber,startColumn:u.startColumn,endLineNumber:u.endLineNumber,endColumn:u.startColumn+n.value.length},l>1&&(o=new Be.L(o.startLineNumber,o.startColumn,o.endLineNumber,o.endColumn+l-1));var c=new gw(r,o,n.value);i.editor.pushUndoStop(),i.editor.executeCommand(t,c),i.editor.pushUndoStop(),i.decorationIds=i.editor.deltaDecorations(i.decorationIds,[{range:u,options:e.DECORATION}]),i.decorationRemover&&i.decorationRemover.cancel(),i.decorationRemover=(350,ft((function(e){return new Promise((function(t,n){var i=setTimeout(t,350);e.onCancellationRequested((function(e){clearTimeout(i),n(S.aD())}))}))}))),i.decorationRemover.then((function(){return i.decorationIds=i.editor.deltaDecorations(i.decorationIds,[])})).catch(S.dz)}})).catch(S.dz)):void 0},e.ID="editor.contrib.inPlaceReplaceController",e.DECORATION=Ho.kI.register({className:"valueSetReplacement"}),e=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([(t=1,n=Ah,function(e,i){n(e,i,t)})],e);var t,n}(),yw=function(e){function t(){return e.call(this,{id:"editor.action.inPlaceReplace.up",label:o.k("InPlaceReplaceAction.previous.label","Replace with Previous Value"),alias:"Replace with Previous Value",precondition:Oe.writable,kbOpts:{kbExpr:Oe.editorTextFocus,primary:3154,weight:100}})||this}return mw(t,e),t.prototype.run=function(e,t){var n=vw.get(t);if(n)return J.g3.wrap(n.run(this.id,!0))},t}(xe),bw=function(e){function t(){return e.call(this,{id:"editor.action.inPlaceReplace.down",label:o.k("InPlaceReplaceAction.next.label","Replace with Next Value"),alias:"Replace with Next Value",precondition:Oe.writable,kbOpts:{kbExpr:Oe.editorTextFocus,primary:3156,weight:100}})||this}return mw(t,e),t.prototype.run=function(e,t){var n=vw.get(t);if(n)return J.g3.wrap(n.run(this.id,!1))},t}(xe);Ae(vw),Ee(yw),Ee(bw),Tr((function(e,t){var n=e.getColor(ka);n&&t.addRule(".monaco-editor.vs .valueSetReplacement { outline: solid 2px "+n+"; }")}));var _w=function(){function e(e,t){this.selection=e,this.descending=t}return e.prototype.getEditOperations=function(e,t){var n=function(e,t,n){var i=ww(e,t,n);return i?mf.replace(new s.Q(i.startLineNumber,1,i.endLineNumber,e.getLineMaxColumn(i.endLineNumber)),i.after.join("\n")):null}(e,this.selection,this.descending);n&&t.addEditOperation(n.range,n.text),this.selectionId=t.trackSelection(this.selection)},e.prototype.computeCursorState=function(e,t){return t.getTrackedSelection(this.selectionId)},e.canRun=function(e,t,n){var i=ww(e,t,n);if(!i)return!1;for(var o=0,r=i.before.length;o=o)return null;for(var r=[],s=i;s<=o;s++)r.push(e.getLineContent(s));var a=r.slice(0);return a.sort((function(e,t){return e.toLowerCase().localeCompare(t.toLowerCase())})),!0===n&&(a=a.reverse()),{startLineNumber:i,endLineNumber:o,before:r,after:a}}var Mw=function(){function e(e,t){this.selection=e,this.cursors=t}return e.prototype.getEditOperations=function(e,t){for(var n=function(e,t){t.sort((function(e,t){return e.lineNumber===t.lineNumber?e.column-t.column:e.lineNumber-t.lineNumber}));for(var n=t.length-2;n>=0;n--)t[n].lineNumber===t[n+1].lineNumber&&t.splice(n,1);for(var i=[],o=0,r=0,a=t.length,u=1,l=e.getLineCount();u<=l;u++){var c=e.getLineContent(u),h=c.length+1,d=0;if(!(r1&&(n-=1,o=e.getLineMaxColumn(n)),t.addTrackedEditOperation(new s.Q(n,o,i,r),null)}},e.prototype.computeCursorState=function(e,t){var n=t.getInverseEditOperations()[0].range;return new Be.L(n.endLineNumber,this.restoreCursorToColumn,n.endLineNumber,this.restoreCursorToColumn)},e}();function Lw(e,t){for(var n=0,i=0;i=i.startLineNumber+1&&t<=i.endLineNumber+1?e.getLineContent(t-1):e.getLineContent(t)};var b=Ge.cx.getGoodIndentForLine(u,e.getLanguageIdAtPosition(h,1),i.startLineNumber+1,a);if(null!==b&&(y=p.getLeadingWhitespace(e.getLineContent(i.startLineNumber)),(C=Lw(b,o))!==(S=Lw(y,o)))){var _=C-S;this.getIndentEditsOfMovingBlock(e,t,i,o,r,_)}}}else t.addEditOperation(new s.Q(i.startLineNumber,1,i.startLineNumber,1),f+"\n")}else{var w;if(h=i.startLineNumber-1,d=e.getLineContent(h),t.addEditOperation(new s.Q(h,1,h+1,1),null),t.addEditOperation(new s.Q(i.endLineNumber,e.getLineMaxColumn(i.endLineNumber),i.endLineNumber,e.getLineMaxColumn(i.endLineNumber)),"\n"+d),this.shouldAutoIndent(e,i))if(u.getLineContent=function(t){return t===h?e.getLineContent(i.startLineNumber):e.getLineContent(t)},null!==(w=this.matchEnterRule(e,a,o,i.startLineNumber,i.startLineNumber-2)))0!==w&&this.getIndentEditsOfMovingBlock(e,t,i,o,r,w);else{var M=Ge.cx.getGoodIndentForLine(u,e.getLanguageIdAtPosition(i.startLineNumber,1),h,a);if(null!==M){var C,S,L=p.getLeadingWhitespace(e.getLineContent(i.startLineNumber));(C=Lw(M,o))!==(S=Lw(L,o))&&(_=C-S,this.getIndentEditsOfMovingBlock(e,t,i,o,r,_))}}}}this._selectionId=t.trackSelection(i)}},e.prototype.buildIndentConverter=function(e){return{shiftIndent:function(t){for(var n=Ze.ShiftCommand.shiftIndentCount(t,t.length+1,e),i="",o=0;o=1;){var u;if(u=a===o&&void 0!==r?r:e.getLineContent(a),p.lastNonWhitespaceIndex(u)>=0)break;a--}if(a<1||i>e.getLineCount())return null;var l=e.getLineMaxColumn(a),c=Ge.cx.getEnterAction(e,new s.Q(a,l,a,l));if(c){var h=c.indentation,d=c.enterAction;d.indentAction===Qe.l.None||d.indentAction===Qe.l.Indent?h=c.indentation+d.appendText:d.indentAction===Qe.l.IndentOutdent?h=c.indentation:d.indentAction===Qe.l.Outdent&&(h=t.unshiftIndent(c.indentation)+d.appendText);var f=e.getLineContent(i);if(this.trimLeft(f).indexOf(this.trimLeft(h))>=0){var g=p.getLeadingWhitespace(e.getLineContent(i)),m=p.getLeadingWhitespace(h);return 2&Ge.cx.getIndentMetadata(e,i)&&(m=t.unshiftIndent(m)),Lw(m,n)-Lw(g,n)}}return null},e.prototype.trimLeft=function(e){return e.replace(/^\s+/,"")},e.prototype.shouldAutoIndent=function(e,t){if(!this._autoIndent)return!1;if(!e.isCheapToTokenize(t.startLineNumber))return!1;var n=e.getLanguageIdAtPosition(t.startLineNumber,1);return n===e.getLanguageIdAtPosition(t.endLineNumber,1)&&null!==Ge.cx.getIndentRulesSupport(n)},e.prototype.getIndentEditsOfMovingBlock=function(e,t,n,i,o,r){for(var a=n.startLineNumber;a<=n.endLineNumber;a++){var u=e.getLineContent(a),l=p.getLeadingWhitespace(u),c=Iw(Lw(l,i)+r,i,o);c!==l&&(t.addEditOperation(new s.Q(a,1,a,l.length+1),c),a===n.endLineNumber&&n.endColumn<=l.length+1&&""===c&&(this._moveEndLineSelectionShrink=!0))}},e.prototype.computeCursorState=function(e,t){var n=t.getTrackedSelection(this._selectionId);return this._moveEndPositionDown&&(n=n.setEndPosition(n.endLineNumber+1,1)),this._moveEndLineSelectionShrink&&n.startLineNumber0){var s=t.startLineNumber-o;r=new Be.L(s,t.startColumn,s,t.startColumn)}else r=new Be.L(t.startLineNumber,t.startColumn,t.startLineNumber,t.startColumn);o+=t.endLineNumber-t.startLineNumber,t.intersectRanges(e)?n=r:i.push(r)})),n&&i.unshift(n),i},t.prototype._getRangesToDelete=function(e){var t=e.getSelections(),n=e.getModel();return t.sort(s.Q.compareRangesUsingStarts),t.map((function(e){if(e.isEmpty()){if(1===e.startColumn){var t=Math.max(1,e.startLineNumber-1),i=1===e.startLineNumber?1:n.getLineContent(t).length+1;return new s.Q(t,i,e.startLineNumber,1)}return new s.Q(e.startLineNumber,1,e.startLineNumber,e.startColumn)}return e}))},t}(Uw),Zw=function(e){function t(){return e.call(this,{id:"deleteAllRight",label:o.k("lines.deleteAllRight","Delete All Right"),alias:"Delete All Right",precondition:Oe.writable,kbOpts:{kbExpr:Oe.textInputFocus,primary:null,mac:{primary:297,secondary:[2068]},weight:100}})||this}return xw(t,e),t.prototype._getEndCursorState=function(e,t){for(var n,i=[],o=0,r=t.length;oe.endLineNumber+1?(o.push(e),t):new Be.L(e.startLineNumber,e.startColumn,t.endLineNumber,t.endColumn):t.startLineNumber>e.endLineNumber?(o.push(e),t):new Be.L(e.startLineNumber,e.startColumn,t.endLineNumber,t.endColumn)}));o.push(r);for(var a=t.getModel(),u=[],l=[],c=i,h=0,d=0,f=o.length;d=1){var L=!0;""===w&&(L=!1),!L||" "!==w.charAt(w.length-1)&&"\t"!==w.charAt(w.length-1)||(L=!1,w=w.replace(/[\s\uFEFF\xA0]+$/g," "));var I=C.substr(S-1);w+=(L?" ":"")+I,m=L?I.length+1:I.length}else m=0}var N=new s.Q(g,1,v,y);if(!N.isEmpty()){var x=void 0;p.isEmpty()?(u.push(mf.replace(N,w)),x=new Be.L(N.startLineNumber-h,w.length-m+1,g-h,w.length-m+1)):p.startLineNumber===p.endLineNumber?(u.push(mf.replace(N,w)),x=new Be.L(p.startLineNumber-h,p.startColumn,p.endLineNumber-h,p.endColumn)):(u.push(mf.replace(N,w)),x=new Be.L(p.startLineNumber-h,p.startColumn,p.startLineNumber-h,w.length-b)),null!==s.Q.intersectRanges(N,i)?c=x:l.push(x)}h+=N.endLineNumber-N.startLineNumber}l.unshift(c),t.pushUndoStop(),t.executeEdits(this.id,u,l),t.pushUndoStop()},t}(xe),Qw=function(e){function t(){return e.call(this,{id:"editor.action.transpose",label:o.k("editor.transpose","Transpose characters around the cursor"),alias:"Transpose characters around the cursor",precondition:Oe.writable})||this}return xw(t,e),t.prototype.run=function(e,t){for(var n=t.getSelections(),i=t.getModel(),o=[],r=0,a=n.length;r=c){if(l.lineNumber===i.getLineCount())continue;var h=new s.Q(l.lineNumber,Math.max(1,l.column-1),l.lineNumber+1,1),d=i.getValueInRange(h).split("").reverse().join("");o.push(new He(new Be.L(l.lineNumber,Math.max(1,l.column-1),l.lineNumber+1,1),d))}else h=new s.Q(l.lineNumber,Math.max(1,l.column-1),l.lineNumber,l.column+1),d=i.getValueInRange(h).split("").reverse().join(""),o.push(new Ye(h,d,new Be.L(l.lineNumber,l.column+1,l.lineNumber,l.column+1)))}}t.pushUndoStop(),t.executeCommands(this.id,o),t.pushUndoStop()},t}(xe),qw=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return xw(t,e),t.prototype.run=function(e,t){for(var n=t.getSelections(),i=t.getModel(),o=[],r=0,a=n.length;r0&&o[o.length-1])||6!==r[0]&&2!==r[0])){s=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([tM(1,z_),tM(2,Cr)],e)}(),lM=function(e){function t(){return e.call(this,{id:"editor.action.openLink",label:o.k("label","Open Link"),alias:"Open Link",precondition:null})||this}return eM(t,e),t.prototype.run=function(e,t){var n=uM.get(t);if(n)for(var i=0,o=t.getSelections();i1&&n.push(new Be.L(e.endLineNumber,e.endColumn,e.endLineNumber,e.endColumn))}},t.prototype.run=function(e,t){var n=this,i=t.getModel(),o=t.getSelections(),r=[];o.forEach((function(e){return n.getCursorsForSelection(e,i,r)})),r.length>0&&t.setSelections(r)},t}(xe),pM=function(e,t,n){this.selections=e,this.revealRange=t,this.revealScrollType=n},gM=function(){function e(e,t,n,i,o,r,s){this._editor=e,this.findController=t,this.isDisconnectedFromFindController=n,this.searchText=i,this.wholeWord=o,this.matchCase=r,this.currentMatch=s}return e.create=function(t,n){var i=n.getState();if(!t.hasTextFocus()&&i.isRevealed&&i.searchString.length>0)return new e(t,n,!1,i.searchString,i.wholeWord,i.matchCase,null);var o,r,s=!1,a=t.getSelections();1===a.length&&a[0].isEmpty()?(s=!0,o=!0,r=!0):(o=i.wholeWord,r=i.matchCase);var u,l=t.getSelection(),c=null;if(l.isEmpty()){var h=t.getModel().getWordAtPosition(l.getStartPosition());if(!h)return null;u=h.word,c=new Be.L(l.startLineNumber,h.startColumn,l.startLineNumber,h.endColumn)}else u=t.getModel().getValueInRange(l).replace(/\r\n/g,"\n");return new e(t,n,s,u,o,r,c)},e.prototype.addSelectionToNextFindMatch=function(){var e=this._getNextMatch();if(!e)return null;var t=this._editor.getSelections();return new pM(t.concat(e),e,0)},e.prototype.moveSelectionToNextFindMatch=function(){var e=this._getNextMatch();if(!e)return null;var t=this._editor.getSelections();return new pM(t.slice(0,t.length-1).concat(e),e,0)},e.prototype._getNextMatch=function(){if(this.currentMatch){var e=this.currentMatch;return this.currentMatch=null,e}this.findController.highlightFindOptions();var t=this._editor.getSelections(),n=t[t.length-1],i=this._editor.getModel().findNextMatch(this.searchText,n.getEndPosition(),!1,this.matchCase,this.wholeWord?this._editor.getConfiguration().wordSeparators:null,!1);return i?new Be.L(i.range.startLineNumber,i.range.startColumn,i.range.endLineNumber,i.range.endColumn):null},e.prototype.addSelectionToPreviousFindMatch=function(){var e=this._getPreviousMatch();if(!e)return null;var t=this._editor.getSelections();return new pM(t.concat(e),e,0)},e.prototype.moveSelectionToPreviousFindMatch=function(){var e=this._getPreviousMatch();if(!e)return null;var t=this._editor.getSelections();return new pM(t.slice(0,t.length-1).concat(e),e,0)},e.prototype._getPreviousMatch=function(){if(this.currentMatch){var e=this.currentMatch;return this.currentMatch=null,e}this.findController.highlightFindOptions();var t=this._editor.getSelections(),n=t[t.length-1],i=this._editor.getModel().findPreviousMatch(this.searchText,n.getStartPosition(),!1,this.matchCase,this.wholeWord?this._editor.getConfiguration().wordSeparators:null,!1);return i?new Be.L(i.range.startLineNumber,i.range.startColumn,i.range.endLineNumber,i.range.endColumn):null},e.prototype.selectAll=function(){return this.findController.highlightFindOptions(),this._editor.getModel().findMatches(this.searchText,!0,!1,this.matchCase,this.wholeWord?this._editor.getConfiguration().wordSeparators:null,!1,1073741824)},e}(),mM=function(e){function t(t){var n=e.call(this)||this;return n._editor=t,n._ignoreSelectionChange=!1,n._session=null,n._sessionDispose=[],n}return cM(t,e),t.get=function(e){return e.getContribution(t.ID)},t.prototype.dispose=function(){this._endSession(),e.prototype.dispose.call(this)},t.prototype.getId=function(){return t.ID},t.prototype._beginSessionIfNeeded=function(e){var t=this;if(!this._session){var n=gM.create(this._editor,e);if(!n)return;this._session=n;var i={searchString:this._session.searchText};this._session.isDisconnectedFromFindController&&(i.wholeWordOverride=1,i.matchCaseOverride=1,i.isRegexOverride=2),e.getState().change(i,!1),this._sessionDispose=[this._editor.onDidChangeCursorSelection((function(e){t._ignoreSelectionChange||t._endSession()})),this._editor.onDidBlurEditorText((function(){t._endSession()})),e.getState().onFindReplaceStateChange((function(e){(e.matchCase||e.wholeWord)&&t._endSession()}))]}},t.prototype._endSession=function(){this._sessionDispose=(0,I.AS)(this._sessionDispose),this._session&&this._session.isDisconnectedFromFindController&&this._session.findController.getState().change({wholeWordOverride:0,matchCaseOverride:0,isRegexOverride:0},!1),this._session=null},t.prototype._setSelections=function(e){this._ignoreSelectionChange=!0,this._editor.setSelections(e),this._ignoreSelectionChange=!1},t.prototype._expandEmptyToWord=function(e,t){if(!t.isEmpty())return t;var n=e.getWordAtPosition(t.getStartPosition());return n?new Be.L(t.startLineNumber,n.startColumn,t.startLineNumber,n.endColumn):t},t.prototype._applySessionResult=function(e){e&&(this._setSelections(e.selections),e.revealRange&&this._editor.revealRangeInCenterIfOutsideViewport(e.revealRange,e.revealScrollType))},t.prototype.getSession=function(e){return this._session},t.prototype.addSelectionToNextFindMatch=function(e){if(!this._session){var t=this._editor.getSelections();if(t.length>1){var n=e.getState().matchCase;if(!IM(this._editor.getModel(),t,n)){for(var i=this._editor.getModel(),o=[],r=0,s=t.length;r0&&n.isRegex)t=this._editor.getModel().findMatches(n.searchString,!0,n.isRegex,n.matchCase,n.wholeWord?this._editor.getConfiguration().wordSeparators:null,!1,1073741824);else{if(this._beginSessionIfNeeded(e),!this._session)return;t=this._session.selectAll()}if(t.length>0){for(var i=this._editor.getSelection(),o=0,r=t.length;o1){var u=r.getState().matchCase;if(!IM(t.getModel(),a,u))return null}s=gM.create(t,r)}if(!s)return null;var l=null,c=No.UG.has(n);if(s.currentMatch){if(c)return null;if(!t.getConfiguration().contribInfo.occurrencesHighlight)return null;l=s.currentMatch}if(/^[ \t]+$/.test(s.searchText))return null;if(s.searchText.length>200)return null;var h=r.getState(),d=h.matchCase;if(h.isRevealed){var f=h.searchString;d||(f=f.toLowerCase());var p=s.searchText;if(d||(p=p.toLowerCase()),f===p&&s.matchCase===h.matchCase&&s.wholeWord===h.wholeWord&&!h.isRegex)return null}return new SM(l,s.searchText,s.matchCase,s.wholeWord?t.getConfiguration().wordSeparators:null)},t.prototype._setState=function(e){if(SM.softEquals(this.state,e))this.state=e;else if(this.state=e,this.state){var n=this.editor.getModel();if(!n.isTooLargeForTokenization()){var i=No.UG.has(n),o=n.findMatches(this.state.searchText,!0,!1,this.state.matchCase,this.state.wordSeparators,!1).map((function(e){return e.range}));o.sort(s.Q.compareRangesUsingStarts);var r=this.editor.getSelections();r.sort(s.Q.compareRangesUsingStarts);for(var a=[],u=0,l=0,c=o.length,h=r.length;u=h)a.push(d),u++;else{var f=s.Q.compareRangesUsingStarts(d,r[l]);f<0?(!r[l].isEmpty()&&s.Q.areIntersecting(d,r[l])||a.push(d),u++):(f>0||u++,l++)}}var p=a.map((function(e){return{range:e,options:i?t._SELECTION_HIGHLIGHT:t._SELECTION_HIGHLIGHT_OVERVIEW}}));this.decorations=this.editor.deltaDecorations(this.decorations,p)}}else this.decorations=this.editor.deltaDecorations(this.decorations,[])},t.prototype.dispose=function(){this._setState(null),e.prototype.dispose.call(this)},t.ID="editor.contrib.selectionHighlighter",t._SELECTION_HIGHLIGHT_OVERVIEW=Ho.kI.register({stickiness:Xi.kK.NeverGrowsWhenTypingAtEdges,className:"selectionHighlight",overviewRuler:{color:Ir(ca),darkColor:Ir(ca),position:Xi.A5.Center}}),t._SELECTION_HIGHLIGHT=Ho.kI.register({stickiness:Xi.kK.NeverGrowsWhenTypingAtEdges,className:"selectionHighlight"}),t}(I.jG);function IM(e,t,n){for(var i=NM(e,t[0],!n),o=1,r=t.length;o1;un(this.element,"multiple",e),this.keyMultipleSignatures.set(e),this.signature.innerHTML="",this.docs.innerHTML="";var t=this.hints.signatures[this.currentSignature];if(t){var n=Qn(this.signature,EM(".code")),i=t.parameters.length>0,r=this.editor.getConfiguration().fontInfo;n.style.fontSize=r.fontSize+"px",n.style.fontFamily=r.fontFamily,i?this.renderParameters(n,t,this.hints.activeParameter):Qn(n,EM("span")).textContent=t.label,(0,I.AS)(this.renderDisposeables),this.renderDisposeables=[];var s=t.parameters[this.hints.activeParameter];if(s&&s.documentation){var a=EM("span.documentation");if("string"==typeof s.documentation)a.textContent=s.documentation;else{var u=this.markdownRenderer.render(s.documentation);sn(u.element,"markdown-docs"),this.renderDisposeables.push(u),a.appendChild(u.element)}Qn(this.docs,EM("p",null,a))}un(this.signature,"has-docs",!!t.documentation),"string"==typeof t.documentation?Qn(this.docs,EM("p",null,t.documentation)):(u=this.markdownRenderer.render(t.documentation),sn(u.element,"markdown-docs"),this.renderDisposeables.push(u),Qn(this.docs,u.element));var l=String(this.currentSignature+1);if(this.hints.signatures.length<10&&(l+="/"+this.hints.signatures.length),this.overloads.textContent=l,s){var c=s.label;this.announcedLabel!==c&&(Ep(o.k("hint","{0}, hint",c)),this.announcedLabel=c)}this.editor.layoutContentWidget(this),this.scrollbar.scanDomNode()}},e.prototype.renderParameters=function(e,t,n){for(var i,o=t.label.length,r=0,s=t.parameters.length-1;s>=0;s--){var a=t.parameters[s],u=0,l=0;(r=t.label.lastIndexOf(a.label,o-1))>=0&&(u=r,l=r+a.label.length),(i=document.createElement("span")).textContent=t.label.substring(l,o),qn(e,i),(i=document.createElement("span")).className="parameter "+(s===n?"active":""),i.textContent=t.label.substring(u,l),qn(e,i),o=u}(i=document.createElement("span")).textContent=t.label.substring(0,o),qn(e,i)},e.prototype.next=function(){var e=this.hints.signatures.length,t=this.currentSignature%e==e-1;return e<2||t?(this.cancel(),!1):(this.currentSignature++,this.render(),!0)},e.prototype.previous=function(){var e=this.hints.signatures.length,t=0===this.currentSignature;return e<2||t?(this.cancel(),!1):(this.currentSignature--,this.render(),!0)},e.prototype.cancel=function(){this.model.cancel()},e.prototype.getDomNode=function(){return this.element},e.prototype.getId=function(){return e.ID},e.prototype.trigger=function(){this.model.trigger(0)},e.prototype.updateMaxHeight=function(){var e=Math.max(this.editor.getLayoutInfo().height/4,250);this.element.style.maxHeight=e+"px"},e.prototype.dispose=function(){this.disposables=(0,I.AS)(this.disposables),this.renderDisposeables=(0,I.AS)(this.renderDisposeables),this.model&&(this.model.dispose(),this.model=null)},e.ID="editor.widget.parameterHintsWidget",e=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([TM(1,he),TM(2,z_),TM(3,o_)],e)}();Tr((function(e,t){var n=e.getColor($s);if(n){var i=e.type===Nr?2:1;t.addRule(".monaco-editor .parameter-hints-widget { border: "+i+"px solid "+n+"; }"),t.addRule(".monaco-editor .parameter-hints-widget.multiple .body { border-left: 1px solid "+n.transparent(.5)+"; }"),t.addRule(".monaco-editor .parameter-hints-widget .signature.has-docs { border-bottom: 1px solid "+n.transparent(.5)+"; }")}var o=e.getColor(Xs);o&&t.addRule(".monaco-editor .parameter-hints-widget { background-color: "+o+"; }");var r=e.getColor(ns);r&&t.addRule(".monaco-editor .parameter-hints-widget a { color: "+r+"; }");var s=e.getColor(is);s&&t.addRule(".monaco-editor .parameter-hints-widget code { background-color: "+s+"; }")}));var OM=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),RM=function(){function e(e,t){this.editor=e,this.widget=t.createInstance(jM,this.editor)}return e.get=function(t){return t.getContribution(e.ID)},e.prototype.getId=function(){return e.ID},e.prototype.cancel=function(){this.widget.cancel()},e.prototype.previous=function(){this.widget.previous()},e.prototype.next=function(){this.widget.next()},e.prototype.trigger=function(){this.widget.trigger()},e.prototype.dispose=function(){this.widget=(0,I.AS)(this.widget)},e.ID="editor.controller.parameterHints",e=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([(t=1,n=N._Y,function(e,i){n(e,i,t)})],e);var t,n}(),PM=function(e){function t(){return e.call(this,{id:"editor.action.triggerParameterHints",label:o.k("parameterHints.trigger.label","Trigger Parameter Hints"),alias:"Trigger Parameter Hints",precondition:Oe.hasSignatureHelpProvider,kbOpts:{kbExpr:Oe.editorTextFocus,primary:3082,weight:100}})||this}return OM(t,e),t.prototype.run=function(e,t){var n=RM.get(t);n&&n.trigger()},t}(xe);Ae(RM),Ee(PM);var zM=Ne.bindToContribution(RM.get);Te(new zM({id:"closeParameterHints",precondition:xM.Visible,handler:function(e){return e.cancel()},kbOpts:{weight:175,kbExpr:Oe.editorTextFocus,primary:9,secondary:[1033]}})),Te(new zM({id:"showPrevParameterHint",precondition:ne.and(xM.Visible,xM.MultipleSignatures),handler:function(e){return e.previous()},kbOpts:{weight:175,kbExpr:Oe.editorTextFocus,primary:16,secondary:[528],mac:{primary:16,secondary:[528,302]}}})),Te(new zM({id:"showNextParameterHint",precondition:ne.and(xM.Visible,xM.MultipleSignatures),handler:function(e){return e.next()},kbOpts:{weight:175,kbExpr:Oe.editorTextFocus,primary:18,secondary:[530],mac:{primary:18,secondary:[530,300]}}}));var WM,FM=(0,N.u1)("IWorkspaceEditService"),BM=function(){function e(e){this.value=e}return e.prototype.contains=function(t){return this.value===t||(0,p.startsWith)(t,this.value+e.sep)},e.sep=".",e.Empty=new e(""),e.Refactor=new e("refactor"),e.Source=new e("source"),e.SourceOrganizeImports=new e("source.organizeImports"),e}();function HM(e,t,n,i){void 0===i&&(i=st.None);var o={only:n&&n.filter&&n.filter.kind?n.filter.kind.value:void 0,trigger:n&&"manual"===n.type?No.Kj.Manual:No.Kj.Automatic},r=No.iM.all(e).map((function(i){return pt((function(n){return i.provideCodeActions(e,t,o,n)})).then((function(e){return Array.isArray(e)?e.filter((function(e){return function(e,t){return!!t&&(!(e&&e.kind&&(!t.kind||!e.kind.contains(t.kind)))&&!(t.kind&&BM.Source.contains(t.kind)&&(!e||!e.includeSourceActions)))}(n&&n.filter,e)})):[]}),(function(e){if((0,S.D7)(e))throw e;return(0,S.M_)(e),[]}))}));return Promise.all(r).then(tu.Bq).then((function(e){return(0,tu.ZN)(e,VM)}))}function VM(e,t){var n=!(0,tu.Ct)(e.diagnostics),i=!(0,tu.Ct)(t.diagnostics);return n?i?e.diagnostics[0].message.localeCompare(t.diagnostics[0].message):-1:i?1:0}!function(e){e[e.IfSingle=1]="IfSingle",e[e.First=2]="First",e[e.Never=3]="Never"}(WM||(WM={})),De("_executeCodeActionProvider",(function(e,t){var n=t.resource,i=t.range;if(!(n instanceof L.A&&s.Q.isIRange(i)))throw(0,S.Qg)();var o=e.get(K.S).getModel(n);if(!o)throw(0,S.Qg)();return HM(o,o.validateRange(i),{type:"manual",filter:{includeSourceActions:!0}})}));var UM=new ce("supportedCodeAction",""),YM=function(){function e(e,t,n,i,o){void 0===i&&(i=250);var r=this;this._editor=e,this._markerService=t,this._signalChange=n,this._progressService=o,this._disposables=[],this._disposables.push((0,X.IC)(this._markerService.onMarkerChanged,(function(e,t){return e?e.concat(t):t}),i/2)((function(e){return r._onMarkerChanges(e)})),(0,X.IC)(this._editor.onDidChangeCursorPosition,(function(e,t){return t}),i)((function(e){return r._onCursorChange()})))}return e.prototype.dispose=function(){this._disposables=(0,I.AS)(this._disposables)},e.prototype.trigger=function(e){var t=this._getRangeOfSelectionUnlessWhitespaceEnclosed(e);return this._createEventAndSignalChange(e,t)},e.prototype._onMarkerChanges=function(e){for(var t=this._editor.getModel().uri,n=0,i=e;n=t._editor.getModel().getLineCount()&&t._futureFixes.cancel()}))),this._disposables.push(hn(this._domNode,"click",(function(e){t._editor.focus();var n=Tn(t._domNode),i=n.top,o=n.height,r=t._editor.getConfiguration().lineHeight,s=Math.floor(r/3);t._position&&t._position.position.lineNumber0?i.isEmpty()&&e.every((function(e){return e.kind&&BM.Refactor.contains(e.kind)}))?t.hide():t._show():t.hide()})).catch((function(e){t.hide()}))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"title",{get:function(){return this._domNode.title},set:function(e){this._domNode.title=e},enumerable:!0,configurable:!0}),e.prototype._show=function(){var t=this._editor.getConfiguration();if(t.contribInfo.lightbulbEnabled){var n=this._model.position.lineNumber,i=this._editor.getModel();if(i){var o=i.getOptions().tabSize,r=i.getLineContent(n),s=Ho.Bz.computeIndentLevel(r,o),a=n;t.fontInfo.spaceWidth*s>22||(n>1?a-=1:a+=1),this._position={position:{lineNumber:a,column:1},preference:e._posPref},this._editor.layoutContentWidget(this)}}},e.prototype.hide=function(){this._position=null,this._model=null,this._futureFixes.cancel(),this._editor.layoutContentWidget(this)},e._posPref=[ou.EXACT],e}()),qM=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),KM=function(e,t){return function(n,i){t(n,i,e)}};function JM(e){return ne.regex(UM.keys()[0],new RegExp("(\\s|^)"+(0,p.escapeRegExpCharacters)(e.value)+"\\b"))}var XM=function(){function e(e,t,n,i,o,r,s,a){var u=this;this._commandService=r,this._keybindingService=s,this._bulkEditService=a,this._disposables=[],this._editor=e,this._model=new ZM(this._editor,t,n,i),this._codeActionContextMenu=new GM(e,o,(function(e){return u._onApplyCodeAction(e)})),this._lightBulbWidget=new QM(e),this._updateLightBulbTitle(),this._disposables.push(this._codeActionContextMenu.onDidExecuteCodeAction((function(e){return u._model.trigger({type:"auto",filter:{}})})),this._lightBulbWidget.onClick(this._handleLightBulbSelect,this),this._model.onDidChangeFixes((function(e){return u._onCodeActionsEvent(e)})),this._keybindingService.onDidUpdateKeybindings(this._updateLightBulbTitle,this))}return e.get=function(t){return t.getContribution(e.ID)},e.prototype.dispose=function(){this._model.dispose(),(0,I.AS)(this._disposables)},e.prototype._onCodeActionsEvent=function(e){var t=this;this._activeRequest&&(this._activeRequest.cancel(),this._activeRequest=void 0),e&&e.actions&&(this._activeRequest=e.actions),e&&e.actions&&e.trigger.filter&&e.trigger.filter.kind?e.actions.then((function(n){e.trigger.autoApply===WM.First||e.trigger.autoApply===WM.IfSingle&&1===n.length?t._onApplyCodeAction(n[0]):t._codeActionContextMenu.show(e.actions,e.position)})).catch(S.dz):e&&"manual"===e.trigger.type?this._codeActionContextMenu.show(e.actions,e.position):e&&e.actions?this._codeActionContextMenu.isVisible?this._codeActionContextMenu.show(e.actions,e.position):this._lightBulbWidget.model=e:this._lightBulbWidget.hide()},e.prototype.getId=function(){return e.ID},e.prototype._handleLightBulbSelect=function(e){this._lightBulbWidget.model.actions&&this._codeActionContextMenu.show(this._lightBulbWidget.model.actions,e)},e.prototype.triggerFromEditorSelection=function(e,t){return this._model.trigger({type:"manual",filter:e,autoApply:t})},e.prototype._updateLightBulbTitle=function(){var e,t=this._keybindingService.lookupKeybinding(eC.Id);e=t?o.k("quickFixWithKb","Show Fixes ({0})",t.getLabel()):o.k("quickFix","Show Fixes"),this._lightBulbWidget.title=e},e.prototype._onApplyCodeAction=function(e){return J.g3.wrap(function(e,t,n,i){return o=this,r=void 0,a=function(){return function(e,t){var n,i,o,r,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return r={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function a(r){return function(a){return function(r){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,i&&(o=2&r[0]?i.return:r[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,r[1])).done)return o;switch(i=0,o&&(r=[2&r[0],o.value]),r[0]){case 0:case 1:o=r;break;case 4:return s.label++,{value:r[1],done:!1};case 5:s.label++,i=r[1],r=[0];continue;case 7:r=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==r[0]&&2!==r[0])){s=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([KM(1,v_),KM(2,he),KM(3,Ub),KM(4,Nf),KM(5,D),KM(6,xf),KM(7,FM)],e)}();function $M(e,t,n,i){var o=XM.get(e);if(o){var r=e.getPosition();o.triggerFromEditorSelection(n,i).then((function(n){n&&n.length||Hb.get(e).showMessage(t,r)}))}}var eC=function(e){function t(){return e.call(this,{id:t.Id,label:o.k("quickfix.trigger.label","Quick Fix..."),alias:"Quick Fix",precondition:ne.and(Oe.writable,Oe.hasCodeActionsProvider),kbOpts:{kbExpr:Oe.editorTextFocus,primary:2132,weight:100}})||this}return qM(t,e),t.prototype.run=function(e,t){return $M(t,o.k("editor.action.quickFix.noneMessage","No code actions available"))},t.Id="editor.action.quickFix",t}(xe),tC=function(){function e(e,t){this.kind=e,this.apply=t}return e.fromUser=function(t){return t&&"object"==typeof t?new e(e.getKindFromUser(t),e.getApplyFromUser(t)):new e(BM.Empty,WM.IfSingle)},e.getApplyFromUser=function(e){switch("string"==typeof e.apply?e.apply.toLowerCase():""){case"first":return WM.First;case"never":return WM.Never;default:return WM.IfSingle}},e.getKindFromUser=function(e){return"string"==typeof e.kind?new BM(e.kind):BM.Empty},e}(),nC=function(e){function t(){return e.call(this,{id:t.Id,precondition:ne.and(Oe.writable,Oe.hasCodeActionsProvider)})||this}return qM(t,e),t.prototype.runEditorCommand=function(e,t,n){var i=tC.fromUser(n);return $M(t,o.k("editor.action.quickFix.noneMessage","No code actions available"),{kind:i.kind,includeSourceActions:!0},i.apply)},t.Id="editor.action.codeAction",t}(Ne),iC=function(e){function t(){return e.call(this,{id:t.Id,label:o.k("refactor.label","Refactor..."),alias:"Refactor",precondition:ne.and(Oe.writable,Oe.hasCodeActionsProvider),kbOpts:{kbExpr:Oe.editorTextFocus,primary:3120,mac:{primary:1328},weight:100},menuOpts:{group:"1_modification",order:2,when:ne.and(Oe.writable,JM(BM.Refactor))}})||this}return qM(t,e),t.prototype.run=function(e,t){return $M(t,o.k("editor.action.refactor.noneMessage","No refactorings available"),{kind:BM.Refactor},WM.Never)},t.Id="editor.action.refactor",t}(xe),oC=function(e){function t(){return e.call(this,{id:t.Id,label:o.k("source.label","Source Action..."),alias:"Source Action",precondition:ne.and(Oe.writable,Oe.hasCodeActionsProvider),menuOpts:{group:"1_modification",order:2.1,when:ne.and(Oe.writable,JM(BM.Source))}})||this}return qM(t,e),t.prototype.run=function(e,t){return $M(t,o.k("editor.action.source.noneMessage","No source actions available"),{kind:BM.Source,includeSourceActions:!0},WM.Never)},t.Id="editor.action.sourceAction",t}(xe),rC=function(e){function t(){return e.call(this,{id:t.Id,label:o.k("organizeImports.label","Organize Imports"),alias:"Organize Imports",precondition:ne.and(Oe.writable,JM(BM.SourceOrganizeImports)),kbOpts:{kbExpr:Oe.editorTextFocus,primary:1581,weight:100}})||this}return qM(t,e),t.prototype.run=function(e,t){return $M(t,o.k("editor.action.organize.noneMessage","No organize imports action available"),{kind:BM.SourceOrganizeImports,includeSourceActions:!0},WM.IfSingle)},t.Id="editor.action.organizeImports",t}(xe);Ae(XM),Ee(eC),Ee(iC),Ee(oC),Ee(rC),Te(new nC);var sC=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),aC={getMetaTitle:function(e){return e.references.length>1&&o.k("meta.titleReference"," – {0} references",e.references.length)}},uC=function(){function e(e,t){e instanceof Pv&&Av.inPeekEditor.bindTo(t)}return e.prototype.dispose=function(){},e.prototype.getId=function(){return e.ID},e.ID="editor.contrib.referenceController",e=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([(t=1,n=he,function(e,i){n(e,i,t)})],e);var t,n}(),lC=function(e){function t(){return e.call(this,{id:"editor.action.referenceSearch.trigger",label:o.k("references.action.label","Find All References"),alias:"Find All References",precondition:ne.and(Oe.hasReferenceProvider,Av.notInPeekEditor,Oe.isInEmbeddedEditor.toNegated()),kbOpts:{kbExpr:Oe.editorTextFocus,primary:1094,weight:100},menuOpts:{group:"navigation",order:1.5}})||this}return sC(t,e),t.prototype.run=function(e,t){var n=Fb.get(t);if(n){var i=t.getSelection(),o=t.getModel(),r=ft((function(e){return dC(o,i.getStartPosition()).then((function(e){return new Kv(e)}))}));n.toggleWidget(i,r,aC)}},t}(xe);function cC(e,t){hC(e,(function(e){return e.closeWidget()}))}function hC(e,t){var n=function(e){var t=e.get(Ce).getFocusedCodeEditor();return t instanceof Pv?t.getParentEditor():t}(e);if(n){var i=Fb.get(n);i&&t(i)}}function dC(e,t,n){var i=No.aW.ordered(e).map((function(n){return pt((function(i){return n.provideReferences(e,t,{includeDeclaration:!0},i)})).then((function(e){if(Array.isArray(e))return e}),(function(e){(0,S.M_)(e)}))}));return Promise.all(i).then((function(e){for(var t=[],n=0,i=e;n=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([(t=1,n=Lr,function(e,i){n(e,i,t)})],e);var t,n}();const pC=fC;var gC=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),mC=function(e,t){return function(n,i){t(n,i,e)}},vC=function(e,t,n,i){return new(n||(n=Promise))((function(o,r){function s(e){try{u(i.next(e))}catch(e){r(e)}}function a(e){try{u(i.throw(e))}catch(e){r(e)}}function u(e){e.done?o(e.value):new n((function(t){t(e.value)})).then(s,a)}u((i=i.apply(e,t||[])).next())}))},yC=function(e,t){var n,i,o,r,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return r={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function a(r){return function(a){return function(r){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,i&&(o=2&r[0]?i.return:r[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,r[1])).done)return o;switch(i=0,o&&(r=[2&r[0],o.value]),r[0]){case 0:case 1:o=r;break;case 4:return s.label++,{value:r[1],done:!1};case 5:s.label++,i=r[1],r=[0];continue;case 7:r=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==r[0]&&2!==r[0])){s=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]0},e.prototype.resolveRenameLocation=function(){return vC(this,void 0,void 0,(function(){var e,t,n,i=this;return yC(this,(function(o){switch(o.label){case 0:return(e=this._provider[0]).resolveRenameLocation?[4,pt((function(t){return e.resolveRenameLocation(i.model,i.position,t)}))]:[3,2];case 1:t=o.sent(),o.label=2;case 2:return t||(n=this.model.getWordAtPosition(this.position))&&(t={range:new s.Q(this.position.lineNumber,n.startColumn,this.position.lineNumber,n.endColumn),text:n.word}),[2,t]}}))}))},e.prototype.provideRenameEdits=function(e,t,n,i){return void 0===t&&(t=0),void 0===n&&(n=[]),void 0===i&&(i=this.position),vC(this,void 0,void 0,(function(){var i,r,s=this;return yC(this,(function(a){switch(a.label){case 0:return t>=this._provider.length?[2,{edits:void 0,rejectReason:n.join("\n")}]:(i=this._provider[t],[4,pt((function(t){return i.provideRenameEdits(s.model,s.position,e,t)}))]);case 1:return(r=a.sent())?r.rejectReason?[2,this.provideRenameEdits(e,t+1,n.concat(r.rejectReason))]:[2,r]:[2,this.provideRenameEdits(e,t+1,n.concat(o.k("no result","No result.")))]}}))}))},e}(),_C=new ce("renameInputVisible",!1),wC=function(){function e(e,t,n,i,o,r){this.editor=e,this._notificationService=t,this._bulkEditService=n,this._progressService=i,this._renameInputField=new pC(e,r),this._renameInputVisible=_C.bindTo(o)}return e.get=function(t){return t.getContribution(e.ID)},e.prototype.dispose=function(){this._renameInputField.dispose()},e.prototype.getId=function(){return e.ID},e.prototype.run=function(){return vC(this,void 0,void 0,(function(){var e,t,n,i,r,a,u,l=this;return yC(this,(function(c){switch(c.label){case 0:if(e=this.editor.getPosition(),!(t=new bC(this.editor.getModel(),e)).hasProvider())return[2,void 0];c.label=1;case 1:return c.trys.push([1,3,,4]),[4,t.resolveRenameLocation()];case 2:return n=c.sent(),[3,4];case 3:return i=c.sent(),Hb.get(this.editor).showMessage(i,e),[2,void 0];case 4:return n?(r=this.editor.getSelection(),a=0,u=n.text.length,s.Q.isEmpty(r)||s.Q.spansMultipleLines(r)||!s.Q.containsRange(n.range,r)||(a=Math.max(0,r.startColumn-n.range.startColumn),u=Math.min(n.range.endColumn,r.endColumn)-n.range.startColumn),this._renameInputVisible.set(!0),[2,this._renameInputField.getInput(n.range,n.text,a,u).then((function(e){if(l._renameInputVisible.reset(),"boolean"!=typeof e){l.editor.focus();var i=new sd(l.editor,15),r=J.g3.wrap(t.provideRenameEdits(e,0,[],s.Q.lift(n.range).getStartPosition()).then((function(t){if(!t.rejectReason)return l._bulkEditService.apply(t,{editor:l.editor}).then((function(t){t.ariaSummary&&Ep(o.k("aria","Successfully renamed '{0}' to '{1}'. Summary: {2}",n.text,e,t.ariaSummary))}));i.validate(l.editor)?Hb.get(l.editor).showMessage(t.rejectReason,l.editor.getPosition()):l._notificationService.info(t.rejectReason)}),(function(e){return l._notificationService.error(o.k("rename.failed","Rename failed to execute.")),J.g3.wrapError(e)})));return l._progressService.showWhile(r,250),r}e&&l.editor.focus()}),(function(e){return l._renameInputVisible.reset(),J.g3.wrapError(e)}))]):[2,void 0]}}))}))},e.prototype.acceptRenameInput=function(){this._renameInputField.acceptInput()},e.prototype.cancelRenameInput=function(){this._renameInputField.cancelInput(!0)},e.ID="editor.contrib.renameController",e=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([mC(1,Cr),mC(2,FM),mC(3,Ub),mC(4,he),mC(5,Lr)],e)}(),MC=function(e){function t(){return e.call(this,{id:"editor.action.rename",label:o.k("rename.label","Rename Symbol"),alias:"Rename Symbol",precondition:ne.and(Oe.writable,Oe.hasRenameProvider),kbOpts:{kbExpr:Oe.editorTextFocus,primary:60,weight:100},menuOpts:{group:"1_modification",order:1.1}})||this}return gC(t,e),t.prototype.runCommand=function(t,n){var i=this,o=t.get(Ce),s=n||[void 0,void 0],a=s[0],u=s[1];return L.A.isUri(a)&&r.y.isIPosition(u)?o.openCodeEditor({resource:a},o.getActiveCodeEditor()).then((function(e){e.setPosition(u),e.invokeWithinContext((function(t){return i.reportTelemetry(t,e),i.run(t,e)}))}),S.dz):e.prototype.runCommand.call(this,t,n)},t.prototype.run=function(e,t){var n=wC.get(t);if(n)return J.g3.wrap(n.run())},t}(xe);Ae(wC),Ee(MC);var CC=Ne.bindToContribution(wC.get);Te(new CC({id:"acceptRenameInput",precondition:_C,handler:function(e){return e.acceptRenameInput()},kbOpts:{weight:199,kbExpr:Oe.focus,primary:3}})),Te(new CC({id:"cancelRenameInput",precondition:_C,handler:function(e){return e.cancelRenameInput()},kbOpts:{weight:199,kbExpr:Oe.focus,primary:9,secondary:[1033]}})),ke("_executeDocumentRenameProvider",(function(e,t,n){var i=n.newName;if("string"!=typeof i)throw(0,S.Qg)("newName");return function(e,t,n){return vC(this,void 0,void 0,(function(){return yC(this,(function(i){return[2,new bC(e,t).provideRenameEdits(n)]}))}))}(e,t,i)}));var SC=n(6804),LC=n(6360),IC=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),NC=function(){function e(){}return Object.defineProperty(e.prototype,"range",{get:function(){return new s.Q(this.start.lineNumber,this.start.column,this.end.lineNumber,this.end.column)},enumerable:!0,configurable:!0}),e}(),xC=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return IC(t,e),Object.defineProperty(t.prototype,"hasChildren",{get:function(){return this.children&&this.children.length>0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isEmpty",{get:function(){return!this.hasChildren&&!this.parent},enumerable:!0,configurable:!0}),t.prototype.append=function(e){return!!e&&(e.parent=this,this.children||(this.children=[]),e instanceof t?e.children&&this.children.push.apply(this.children,e.children):this.children.push(e),!0)},t}(NC),DC=function(e){function t(){var t=e.call(this)||this;return t.elements=new xC,t.elements.parent=t,t}return IC(t,e),t}(NC),kC=function(e,t,n){this.range=e,this.bracket=t,this.bracketType=n};function TC(e){var t=new NC;return t.start=e.range.getStartPosition(),t.end=e.range.getEndPosition(),t}var EC=function(e,t,n){this.lineNumber=n,this.lineText=e.getLineContent(),this.startOffset=e.getStartOffset(t),this.endOffset=e.getEndOffset(t),this.type=e.getStandardTokenType(t),this.languageId=e.getLanguageId(t)},AC=function(){function e(e){this._model=e,this._lineCount=this._model.getLineCount(),this._versionId=this._model.getVersionId(),this._lineNumber=0,this._tokenIndex=0,this._lineTokens=null,this._advance()}return e.prototype._advance=function(){for(this._lineTokens&&(this._tokenIndex++,this._tokenIndex>=this._lineTokens.getCount()&&(this._lineTokens=null));this._lineNumber0)return this._nextBuff.shift();var e=this._rawTokenScanner.next();if(!e)return null;var t=e.lineNumber,n=e.lineText,i=e.type,o=e.startOffset,r=e.endOffset;this._cachedLanguageId!==e.languageId&&(this._cachedLanguageId=e.languageId,this._cachedLanguageBrackets=Ge.cx.getBracketsSupport(this._cachedLanguageId));var a,u=this._cachedLanguageBrackets;if(!u||(0,SC.Yo)(i))return new kC(new s.Q(t,o+1,t,r+1),0,null);do{if(a=LC.Fu.findNextBracketInToken(u.forwardRegex,t,n,o,r)){var l=a.startColumn-1,c=a.endColumn-1;o=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([(t=0,n=K.S,function(e,i){n(e,i,t)})],e);var t,n}(),zC=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),WC=function(e){this.editor=e,this.next=null,this.previous=null,this.selection=e.getSelection()},FC=function(){function e(e,t){this.editor=e,this._tokenSelectionSupport=t.createInstance(PC),this._state=null,this._ignoreSelection=!1}return e.get=function(t){return t.getContribution(e.ID)},e.prototype.dispose=function(){},e.prototype.getId=function(){return e.ID},e.prototype.run=function(e){var t=this,n=this.editor.getSelection(),i=this.editor.getModel();this._state&&this._state.editor!==this.editor&&(this._state=null);var o=J.g3.as(null);return this._state||(o=this._tokenSelectionSupport.getRangesToPosition(i.uri,n.getStartPosition()).then((function(e){if(!tu.Ct(e)){var n;e.filter((function(e){var n=t.editor.getSelection(),i=new s.Q(e.range.startLineNumber,e.range.startColumn,e.range.endLineNumber,e.range.endColumn);return i.containsPosition(n.getStartPosition())&&i.containsPosition(n.getEndPosition())})).forEach((function(e){var i=e.range,o=new WC(t.editor);o.selection=new s.Q(i.startLineNumber,i.startColumn,i.endLineNumber,i.endColumn),n&&(o.next=n,n.previous=o),n=o}));var i=new WC(t.editor);i.next=n,n&&(n.previous=i),t._state=i;var o=t.editor.onDidChangeCursorPosition((function(e){t._ignoreSelection||(t._state=null,o.dispose())}))}}))),o.then((function(){if(t._state&&(t._state=e?t._state.next:t._state.previous,t._state)){t._ignoreSelection=!0;try{t.editor.setSelection(t._state.selection)}finally{t._ignoreSelection=!1}}}))},e.ID="editor.contrib.smartSelectController",e=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([(t=1,n=N._Y,function(e,i){n(e,i,t)})],e);var t,n}(),BC=function(e){function t(t,n){var i=e.call(this,n)||this;return i._forward=t,i}return zC(t,e),t.prototype.run=function(e,t){var n=FC.get(t);if(n)return n.run(this._forward)},t}(xe),HC=function(e){function t(){return e.call(this,!0,{id:"editor.action.smartSelect.grow",label:o.k("smartSelect.grow","Expand Select"),alias:"Expand Select",precondition:null,kbOpts:{kbExpr:Oe.editorTextFocus,primary:1553,mac:{primary:3345},weight:100},menubarOpts:{menuId:ve.MenubarSelectionMenu,group:"1_basic",title:o.k({key:"miSmartSelectGrow",comment:["&& denotes a mnemonic"]},"&&Expand Selection"),order:2}})||this}return zC(t,e),t}(BC),VC=function(e){function t(){return e.call(this,!1,{id:"editor.action.smartSelect.shrink",label:o.k("smartSelect.shrink","Shrink Select"),alias:"Shrink Select",precondition:null,kbOpts:{kbExpr:Oe.editorTextFocus,primary:1551,mac:{primary:3343},weight:100},menubarOpts:{menuId:ve.MenubarSelectionMenu,group:"1_basic",title:o.k({key:"miSmartSelectShrink",comment:["&& denotes a mnemonic"]},"&&Shrink Selection"),order:3}})||this}return zC(t,e),t}(BC);Ae(FC),Ee(HC),Ee(VC),n(1417);var UC,YC=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),ZC=function(){function e(){this.text("")}return e.isDigitCharacter=function(e){return e>=48&&e<=57},e.isVariableCharacter=function(e){return 95===e||e>=97&&e<=122||e>=65&&e<=90},e.prototype.text=function(e){this.value=e,this.pos=0},e.prototype.tokenText=function(e){return this.value.substr(e.pos,e.len)},e.prototype.next=function(){if(this.pos>=this.value.length)return{type:14,pos:this.pos,len:0};var t,n=this.pos,i=0,o=this.value.charCodeAt(n);if("number"==typeof(t=e._table[o]))return this.pos+=1,{type:t,pos:n,len:1};if(e.isDigitCharacter(o)){t=8;do{i+=1,o=this.value.charCodeAt(n+i)}while(e.isDigitCharacter(o));return this.pos+=i,{type:t,pos:n,len:i}}if(e.isVariableCharacter(o)){t=9;do{o=this.value.charCodeAt(n+ ++i)}while(e.isVariableCharacter(o)||e.isDigitCharacter(o));return this.pos+=i,{type:t,pos:n,len:i}}t=10;do{i+=1,o=this.value.charCodeAt(n+i)}while(!isNaN(o)&&void 0===e._table[o]&&!e.isDigitCharacter(o)&&!e.isVariableCharacter(o));return this.pos+=i,{type:t,pos:n,len:i}},e._table=((UC={})[36]=0,UC[58]=1,UC[44]=2,UC[123]=3,UC[125]=4,UC[92]=5,UC[47]=6,UC[124]=7,UC[43]=11,UC[45]=12,UC[63]=13,UC),e}(),GC=function(){function e(){this._children=[]}return e.prototype.appendChild=function(e){return e instanceof QC&&this._children[this._children.length-1]instanceof QC?this._children[this._children.length-1].value+=e.value:(e.parent=this,this._children.push(e)),this},e.prototype.replace=function(e,t){var n=e.parent,i=n.children.indexOf(e),o=n.children.slice(0);o.splice.apply(o,[i,1].concat(t)),n._children=o,t.forEach((function(e){return e.parent=n}))},Object.defineProperty(e.prototype,"children",{get:function(){return this._children},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"snippet",{get:function(){for(var e=this;;){if(!e)return;if(e instanceof iS)return e;e=e.parent}},enumerable:!0,configurable:!0}),e.prototype.toString=function(){return this.children.reduce((function(e,t){return e+t.toString()}),"")},e.prototype.len=function(){return 0},e}(),QC=function(e){function t(t){var n=e.call(this)||this;return n.value=t,n}return YC(t,e),t.prototype.toString=function(){return this.value},t.prototype.len=function(){return this.value.length},t.prototype.clone=function(){return new t(this.value)},t}(GC),qC=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return YC(t,e),t}(GC),KC=function(e){function t(t){var n=e.call(this)||this;return n.index=t,n}return YC(t,e),t.compareByIndex=function(e,t){return e.index===t.index?0:e.isFinalTabstop?1:t.isFinalTabstop||e.indext.index?1:0},Object.defineProperty(t.prototype,"isFinalTabstop",{get:function(){return 0===this.index},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"choice",{get:function(){return 1===this._children.length&&this._children[0]instanceof JC?this._children[0]:void 0},enumerable:!0,configurable:!0}),t.prototype.clone=function(){var e=new t(this.index);return this.transform&&(e.transform=this.transform.clone()),e._children=this.children.map((function(e){return e.clone()})),e},t}(qC),JC=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.options=[],t}return YC(t,e),t.prototype.appendChild=function(e){return e instanceof QC&&(e.parent=this,this.options.push(e)),this},t.prototype.toString=function(){return this.options[0].value},t.prototype.len=function(){return this.options[0].len()},t.prototype.clone=function(){var e=new t;return this.options.forEach(e.appendChild,e),e},t}(GC),XC=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return YC(t,e),t.prototype.resolve=function(e){var t=this;return e.replace(this.regexp,(function(){for(var e="",n=0,i=t._children;no.index?arguments[o.index]:"";e+=r=o.resolve(r)}else e+=o.toString()}return e}))},t.prototype.toString=function(){return""},t.prototype.clone=function(){var e=new t;return e.regexp=new RegExp(this.regexp.source,(this.regexp.ignoreCase?"i":"")+(this.regexp.global?"g":"")),e._children=this.children.map((function(e){return e.clone()})),e},t}(GC),$C=function(e){function t(t,n,i,o){var r=e.call(this)||this;return r.index=t,r.shorthandName=n,r.ifValue=i,r.elseValue=o,r}return YC(t,e),t.prototype.resolve=function(e){return"upcase"===this.shorthandName?e?e.toLocaleUpperCase():"":"downcase"===this.shorthandName?e?e.toLocaleLowerCase():"":"capitalize"===this.shorthandName?e?e[0].toLocaleUpperCase()+e.substr(1):"":Boolean(e)&&"string"==typeof this.ifValue?this.ifValue:Boolean(e)||"string"!=typeof this.elseValue?e||"":this.elseValue},t.prototype.clone=function(){return new t(this.index,this.shorthandName,this.ifValue,this.elseValue)},t}(GC),eS=function(e){function t(t){var n=e.call(this)||this;return n.name=t,n}return YC(t,e),t.prototype.resolve=function(e){var t=e.resolve(this);return this.transform&&(t=this.transform.resolve(t||"")),void 0!==t&&(this._children=[new QC(t)],!0)},t.prototype.clone=function(){var e=new t(this.name);return this.transform&&(e.transform=this.transform.clone()),e._children=this.children.map((function(e){return e.clone()})),e},t}(qC);function tS(e,t){for(var n=e.slice();n.length>0;){var i=n.shift();if(!t(i))break;n.unshift.apply(n,i.children)}}var nS,iS=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return YC(t,e),Object.defineProperty(t.prototype,"placeholderInfo",{get:function(){if(!this._placeholders){var e,t=[];this.walk((function(n){return n instanceof KC&&(t.push(n),e=!e||e.index0?o.set(e.index,e.children):r.push(e)),!0}));for(var a=0,u=r;a0&&t),!o.has(0)&&n&&i.appendChild(new KC(0)),i},e.prototype._accept=function(e,t){if(void 0===e||this._token.type===e){var n=!t||this._scanner.tokenText(this._token);return this._token=this._scanner.next(),n}return!1},e.prototype._backTo=function(e){return this._scanner.pos=e.pos+e.len,this._token=e,!1},e.prototype._until=function(e){if(14===this._token.type)return!1;for(var t=this._token;this._token.type!==e;)if(this._token=this._scanner.next(),14===this._token.type)return!1;var n=this._scanner.value.substring(t.pos,this._token.pos);return this._token=this._scanner.next(),n},e.prototype._parse=function(e){return this._parseEscaped(e)||this._parseTabstopOrVariableName(e)||this._parseComplexPlaceholder(e)||this._parseComplexVariable(e)||this._parseAnything(e)},e.prototype._parseEscaped=function(e){var t;return!!(t=this._accept(5,!0))&&(t=this._accept(0,!0)||this._accept(4,!0)||this._accept(5,!0)||t,e.appendChild(new QC(t)),!0)},e.prototype._parseTabstopOrVariableName=function(e){var t,n=this._token;return this._accept(0)&&(t=this._accept(9,!0)||this._accept(8,!0))?(e.appendChild(/^\d+$/.test(t)?new KC(Number(t)):new eS(t)),!0):this._backTo(n)},e.prototype._parseComplexPlaceholder=function(e){var t,n=this._token;if(!(this._accept(0)&&this._accept(3)&&(t=this._accept(8,!0))))return this._backTo(n);var i=new KC(Number(t));if(this._accept(1))for(;;){if(this._accept(4))return e.appendChild(i),!0;if(!this._parse(i))return e.appendChild(new QC("${"+t+":")),i.children.forEach(e.appendChild,e),!0}else{if(!(i.index>0&&this._accept(7)))return this._accept(6)?this._parseTransform(i)?(e.appendChild(i),!0):(this._backTo(n),!1):this._accept(4)?(e.appendChild(i),!0):this._backTo(n);for(var o=new JC;;){if(this._parseChoiceElement(o)){if(this._accept(2))continue;if(this._accept(7)&&(i.appendChild(o),this._accept(4)))return e.appendChild(i),!0}return this._backTo(n),!1}}},e.prototype._parseChoiceElement=function(e){for(var t=this._token,n=[];2!==this._token.type&&7!==this._token.type;){var i=void 0;if(!(i=(i=this._accept(5,!0))?this._accept(2,!0)||this._accept(7,!0)||i:this._accept(void 0,!0)))return this._backTo(t),!1;n.push(i)}return 0===n.length?(this._backTo(t),!1):(e.appendChild(new QC(n.join(""))),!0)},e.prototype._parseComplexVariable=function(e){var t,n=this._token;if(!(this._accept(0)&&this._accept(3)&&(t=this._accept(9,!0))))return this._backTo(n);var i=new eS(t);if(!this._accept(1))return this._accept(6)?this._parseTransform(i)?(e.appendChild(i),!0):(this._backTo(n),!1):this._accept(4)?(e.appendChild(i),!0):this._backTo(n);for(;;){if(this._accept(4))return e.appendChild(i),!0;if(!this._parse(i))return e.appendChild(new QC("${"+t+":")),i.children.forEach(e.appendChild,e),!0}},e.prototype._parseTransform=function(e){for(var t=new XC,n="",i="";!this._accept(6);){var o=void 0;if(o=this._accept(5,!0))n+=o=this._accept(6,!0)||o;else{if(14===this._token.type)return!1;n+=this._accept(void 0,!0)}}for(;!this._accept(6);)if(o=void 0,o=this._accept(5,!0))o=this._accept(6,!0)||o,t.appendChild(new QC(o));else if(!this._parseFormatString(t)&&!this._parseAnything(t))return!1;for(;!this._accept(4);){if(14===this._token.type)return!1;i+=this._accept(void 0,!0)}try{t.regexp=new RegExp(n,i)}catch(e){return!1}return e.transform=t,!0},e.prototype._parseFormatString=function(e){var t=this._token;if(!this._accept(0))return!1;var n=!1;this._accept(3)&&(n=!0);var i=this._accept(8,!0);if(!i)return this._backTo(t),!1;if(!n)return e.appendChild(new $C(Number(i))),!0;if(this._accept(4))return e.appendChild(new $C(Number(i))),!0;if(!this._accept(1))return this._backTo(t),!1;if(this._accept(6)){var o=this._accept(9,!0);return o&&this._accept(4)?(e.appendChild(new $C(Number(i),o)),!0):(this._backTo(t),!1)}if(this._accept(11)){if(r=this._until(4))return e.appendChild(new $C(Number(i),void 0,r,void 0)),!0}else if(this._accept(12)){if(s=this._until(4))return e.appendChild(new $C(Number(i),void 0,void 0,s)),!0}else if(this._accept(13)){var r;if((r=this._until(1))&&(s=this._until(4)))return e.appendChild(new $C(Number(i),void 0,r,s)),!0}else{var s;if(s=this._until(4))return e.appendChild(new $C(Number(i),void 0,void 0,s)),!0}return this._backTo(t),!1},e.prototype._parseAnything=function(e){return 14!==this._token.type&&(e.appendChild(new QC(this._scanner.tokenText(this._token))),this._accept(void 0),!0)},e}(),rS=function(){function e(e){this._delegates=e}return e.prototype.resolve=function(e){for(var t=0,n=this._delegates;t=0){for(var i=[],o=0,r=this._placeholderGroups[this._placeholderGroupsIdx];o0&&this._editor.executeEdits("snippet.placeholderTransform",i)}return!0===t&&this._placeholderGroupsIdx0&&(this._placeholderGroupsIdx-=1),this._editor.getModel().changeDecorations((function(t){for(var i=new Set,o=[],r=0,s=n._placeholderGroups[n._placeholderGroupsIdx];r0},enumerable:!0,configurable:!0}),e.prototype.computePossibleSelections=function(){for(var e=new Map,t=0,n=this._placeholderGroups;t ")+'"'},e.prototype.insert=function(){var t=this,n=this._editor.getModel(),i=e.createEditsAndSnippets(this._editor,this._template,this._overwriteBefore,this._overwriteAfter,!1),o=i.edits,r=i.snippets;this._snippets=r;var s=n.pushEditOperations(this._editor.getSelections(),o,(function(e){return t._snippets[0].hasPlaceholder?t._move(!0):e.map((function(e){return Be.L.fromPositions(e.range.getEndPosition())}))}));this._editor.setSelections(s),this._editor.revealRange(s[0])},e.prototype.merge=function(t,n,i){var o=this;void 0===n&&(n=0),void 0===i&&(i=0),this._templateMerges.push([this._snippets[0]._nestingLevel,this._snippets[0]._placeholderGroupsIdx,t]);var r=e.createEditsAndSnippets(this._editor,t,n,i,!0),s=r.edits,a=r.snippets;this._editor.setSelections(this._editor.getModel().pushEditOperations(this._editor.getSelections(),s,(function(e){for(var t=0,n=o._snippets;t0},e}(),dS={Visible:new ce("suggestWidgetVisible",!1),MultipleSuggestions:new ce("suggestWidgetMultipleSuggestions",!1),MakesTextEdit:new ce("suggestionMakesTextEdit",!0),AcceptOnKey:new ce("suggestionSupportsAcceptOnKey",!0),AcceptSuggestionsOnEnter:new ce("acceptSuggestionOnEnter",!0)};function fS(e,t,n,i,o,r){void 0===n&&(n="bottom"),void 0===r&&(r=st.None);var s=[],a=function(e){return"none"===e?function(e){return"snippet"!==e.type}:function(){return!0}}(n);t=t.clone();var u=No.er.orderedGroups(e),l=o||{triggerKind:No.tS.Invoke},c=!1,h=u.map((function(n){return function(){return Promise.all(n.map((function(n){if((0,tu.Ct)(i)||!(i.indexOf(n)<0))return Promise.resolve(n.provideCompletionItems(e,t,l,r)).then((function(i){var o=s.length;if(i&&!(0,tu.Ct)(i.suggestions))for(var r=0,u=i.suggestions;r")}},e.prototype._doInsert=function(e,t,n,i,o){var r=this;void 0===t&&(t=0),void 0===n&&(n=0),void 0===i&&(i=!0),void 0===o&&(o=!0),this._snippetListener=(0,I.AS)(this._snippetListener),i&&this._editor.getModel().pushStackElement(),this._session?this._session.merge(e,t,n):(this._modelVersionId=this._editor.getModel().getAlternativeVersionId(),this._session=new hS(this._editor,e,t,n),this._session.insert()),o&&this._editor.getModel().pushStackElement(),this._updateState(),this._snippetListener=[this._editor.onDidChangeModelContent((function(e){return e.isFlush&&r.cancel()})),this._editor.onDidChangeModel((function(){return r.cancel()})),this._editor.onDidChangeCursorSelection((function(){return r._updateState()}))]},e.prototype._updateState=function(){if(this._session){if(this._modelVersionId===this._editor.getModel().getAlternativeVersionId())return this.cancel();if(!this._session.hasPlaceholder)return this.cancel();if(this._session.isAtLastPlaceholder||!this._session.isSelectionWithinPlaceholders())return this.cancel();this._inSnippet.set(!0),this._hasPrevTabstop.set(!this._session.isAtFirstPlaceholder),this._hasNextTabstop.set(!this._session.isAtLastPlaceholder),this._handleChoice()}},e.prototype._handleChoice=function(){var e,t,n=this._session.choice;if(n){if(this._currentChoice!==n){this._currentChoice=n,this._editor.setSelections(this._editor.getSelections().map((function(e){return Be.L.fromPositions(e.getStartPosition())})));var i=n.options[0];e=this._editor,t=n.options.map((function(e,t){return{type:"value",label:e.value,insertText:e.value,sortText:(0,p.repeat)("a",t),overwriteAfter:i.value.length}})),setTimeout((function(){var n;(n=_S.onlyOnceSuggestions).push.apply(n,t),e.getContribution("editor.contrib.suggestController").triggerSuggest([_S])}),0)}}else this._currentChoice=void 0},e.prototype.finish=function(){for(;this._inSnippet.get();)this.next()},e.prototype.cancel=function(){this._inSnippet.reset(),this._hasPrevTabstop.reset(),this._hasNextTabstop.reset(),(0,I.AS)(this._snippetListener),(0,I.AS)(this._session),this._session=void 0,this._modelVersionId=-1},e.prototype.prev=function(){this._session.prev(),this._updateState()},e.prototype.next=function(){this._session.next(),this._updateState()},e.prototype.isInSnippet=function(){return this._inSnippet.get()},e.InSnippetMode=new ce("inSnippetMode",!1),e.HasNextTabstop=new ce("hasNextTabstop",!1),e.HasPrevTabstop=new ce("hasPrevTabstop",!1),e=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([CS(1,wS),CS(2,he)],e)}();Ae(SS);var LS=Ne.bindToContribution(SS.get);function IS(){for(var e=[],t=0;t0?[{start:0,end:t.length}]:[]:null}.bind(void 0,!0);function xS(e,t,n,i){return n===e.length?[]:i===t.length?null:e[n]===t[i]?(o=xS(e,t,n+1,i+1))?jS({start:i,end:i+1},o):null:xS(e,t,n,i+1);var o}function DS(e){return 97<=e&&e<=122}function kS(e){return 65<=e&&e<=90}function TS(e){return 48<=e&&e<=57}function ES(e){return 32===e||9===e||10===e||13===e}function AS(e){return DS(e)||kS(e)||TS(e)}function jS(e,t){return 0===t.length?t=[e]:e.end===t[0].start?t[0].start=e.start:t.unshift(e),t}function OS(e,t){for(var n=t;n0&&!AS(e.charCodeAt(n-1)))return n}return e.length}function RS(e,t,n,i){if(n===e.length)return[];if(i===t.length)return null;if(e[n]!==t[i].toLowerCase())return null;var o=null,r=i+1;for(o=RS(e,t,n+1,i+1);!o&&(r=OS(t,r))60)return null;var n=function(e){for(var t=0,n=0,i=0,o=0,r=0,s=0;s.2&&t<.8&&i>.6&&o<.2}(n)){if(!function(e){var t=e.upperPercent;return 0===e.lowerPercent&&t>.6}(n))return null;t=t.toLowerCase()}var i=null,o=0;for(e=e.toLowerCase();o=0&&(i.push(s),o=s+1)}return[i.length,i]}function VS(){for(var e=[],t=[0],n=1;n<=100;n++)t.push(-n);for(n=0;n<=100;n++){var i=t.slice(0);i[0]=-n,e.push(i)}return e}var US=VS(),YS=VS(),ZS=VS(),GS=!1;function QS(e,t,n,i,o){function r(e,t,n){for(void 0===n&&(n=" ");e.length=e.length)return!1;switch(e.charCodeAt(t)){case 95:case 45:case 46:case 32:case 47:case 92:case 39:case 34:case 58:return!0;default:return!1}}function KS(e,t){if(t<0||t>=e.length)return!1;switch(e.charCodeAt(t)){case 32:case 9:return!0;default:return!1}}function JS(e,t,n,i){var o=e.length>100?100:e.length,r=t.length>100?100:t.length,s=0;for(void 0===n&&(n=o);sr)){for(var a=e.toLowerCase(),u=t.toLowerCase(),l=s,c=0;l1?1:h),p=US[l-1][c]+-1,g=US[l][c-1]+-1;g>=p?g>f?(US[l][c]=g,ZS[l][c]=4):g===f?(US[l][c]=g,ZS[l][c]=6):(US[l][c]=f,ZS[l][c]=2):p>f?(US[l][c]=p,ZS[l][c]=1):p===f?(US[l][c]=p,ZS[l][c]=3):(US[l][c]=f,ZS[l][c]=2)}if(GS&&(console.log(QS(US,e,o,t,r)),console.log(QS(ZS,e,o,t,r)),console.log(QS(YS,e,o,t,r))),$S=0,eL=-100,tL=s,nL=i,iL(o,r,o===r?1:0,new oL,!1),0!==$S)return[eL,XS.toArray()]}}}var XS,$S=0,eL=0,tL=0,nL=!1;function iL(e,t,n,i,o){if(!($S>=10||n<-25)){for(var r=0;e>tL&&t>0;){var s=YS[e][t],a=ZS[e][t];if(4===a)t-=1,o?n-=5:i.isEmpty()||(n-=1),o=!1,r=0;else{if(!(2&a))return;if(4&a&&iL(e,t-1,i.isEmpty()?n:n-1,i.slice(),o),n+=s,e-=1,t-=1,i.unshift(t),o=!0,1===s){if(r+=1,e===tL&&!nL)return}else n+=1+r*(s-1),r=0}}$S+=1,(n-=t>=3?9:3*t)>eL&&(eL=n,XS=i)}}var oL=function(){function e(){}return e.prototype.isEmpty=function(){return!this._data&&(!this._parent||this._parent.isEmpty())},e.prototype.unshift=function(e){this._data?this._data.unshift(e):this._data=[e]},e.prototype.slice=function(){var t=new e;return t._parent=this,t._parentLen=this._data?this._data.length:0,t},e.prototype.toArray=function(){if(!this._data)return this._parent.toArray();for(var e=[],t=this;t;)t._parent&&t._parent._data&&e.push(t._parent._data.slice(t._parent._data.length-t._parentLen)),t=t._parent;return Array.prototype.concat.apply(this._data,e)},e}();function rL(e,t,n){return function(e,t,n,i){var o=JS(e,t,i);if(e.length>=3)for(var r=Math.min(7,e.length-1),s=1;so[0])&&(o=u))}}return o}(e,t,0,n)}function sL(e,t){if(!(t+1>=e.length)){var n=e[t],i=e[t+1];if(n!==i)return e.slice(0,t)+i+n+e.slice(t+2)}}var aL=function(){function e(t,n,i,o){void 0===o&&(o=Li.Pk.contribInfo.suggest),this._snippetCompareFn=e._compareCompletionItems,this._items=t,this._column=n,this._options=o,this._refilterKind=1,this._lineContext=i,"top"===o.snippets?this._snippetCompareFn=e._compareCompletionItemsSnippetsUp:"bottom"===o.snippets&&(this._snippetCompareFn=e._compareCompletionItemsSnippetsDown)}return e.prototype.dispose=function(){for(var e=new Set,t=0,n=this._items;t2e3?JS:rL,a=0;at.score?-1:e.scoret.idx?1:0},e._compareCompletionItemsSnippetsDown=function(t,n){if(t.suggestion.type!==n.suggestion.type){if("snippet"===t.suggestion.type)return 1;if("snippet"===n.suggestion.type)return-1}return e._compareCompletionItems(t,n)},e._compareCompletionItemsSnippetsUp=function(t,n){if(t.suggestion.type!==n.suggestion.type){if("snippet"===t.suggestion.type)return-1;if("snippet"===n.suggestion.type)return 1}return e._compareCompletionItems(t,n)},e}(),uL=function(){function e(e,t,n){this.leadingLineContent=e.getLineContent(t.lineNumber).substr(0,t.column-1),this.leadingWord=e.getWordUntilPosition(t),this.lineNumber=t.lineNumber,this.column=t.column,this.auto=n}return e.shouldAutoTrigger=function(e){var t=e.getModel();if(!t)return!1;var n=e.getPosition();t.tokenizeIfCheap(n.lineNumber);var i=t.getWordAtPosition(n);return!!i&&i.endColumn===n.column&&!!isNaN(Number(i.word))},e}(),lL=function(){function e(e){var t=this;this._toDispose=[],this._triggerQuickSuggest=new wt,this._triggerRefilter=new wt,this._onDidCancel=new X.vl,this._onDidTrigger=new X.vl,this._onDidSuggest=new X.vl,this.onDidCancel=this._onDidCancel.event,this.onDidTrigger=this._onDidTrigger.event,this.onDidSuggest=this._onDidSuggest.event,this._editor=e,this._state=0,this._requestPromise=null,this._completionModel=null,this._context=null,this._currentSelection=this._editor.getSelection()||new Be.L(1,1,1,1),this._toDispose.push(this._editor.onDidChangeModel((function(){t._updateTriggerCharacters(),t.cancel()}))),this._toDispose.push(this._editor.onDidChangeModelLanguage((function(){t._updateTriggerCharacters(),t.cancel()}))),this._toDispose.push(this._editor.onDidChangeConfiguration((function(){t._updateTriggerCharacters(),t._updateQuickSuggest()}))),this._toDispose.push(No.er.onDidChange((function(){t._updateTriggerCharacters(),t._updateActiveSuggestSession()}))),this._toDispose.push(this._editor.onDidChangeCursorSelection((function(e){t._onCursorChange(e)}))),this._toDispose.push(this._editor.onDidChangeModelContent((function(e){t._refilterCompletionItems()}))),this._updateTriggerCharacters(),this._updateQuickSuggest()}return e.prototype.dispose=function(){(0,I.AS)([this._onDidCancel,this._onDidSuggest,this._onDidTrigger,this._triggerCharacterListener,this._triggerQuickSuggest,this._triggerRefilter]),this._toDispose=(0,I.AS)(this._toDispose),(0,I.AS)(this._completionModel),this.cancel()},e.prototype._updateQuickSuggest=function(){this._quickSuggestDelay=this._editor.getConfiguration().contribInfo.quickSuggestionsDelay,(isNaN(this._quickSuggestDelay)||!this._quickSuggestDelay&&0!==this._quickSuggestDelay||this._quickSuggestDelay<0)&&(this._quickSuggestDelay=10)},e.prototype._updateTriggerCharacters=function(){var e=this;if((0,I.AS)(this._triggerCharacterListener),!this._editor.getConfiguration().readOnly&&this._editor.getModel()&&this._editor.getConfiguration().contribInfo.suggestOnTriggerCharacters){for(var t=Object.create(null),n=0,i=No.er.all(this._editor.getModel());nthis._context.column&&this._completionModel.incomplete.size>0&&0!==e.leadingWord.word.length){var t=this._completionModel.incomplete,n=this._completionModel.adopt(t);this.trigger({auto:2===this._state},!0,(0,Tv.zu)(t),n)}else{var i=this._completionModel.lineContext,o=!1;if(this._completionModel.lineContext={leadingLineContent:e.leadingLineContent,characterCountDelta:e.column-this._context.column},0===this._completionModel.items.length){if(uL.shouldAutoTrigger(this._editor)&&this._context.leadingWord.endColumn0)&&0===e.leadingWord.word.length)return void this.cancel()}this._onDidSuggest.fire({completionModel:this._completionModel,auto:this._context.auto,isFrozen:o})}}else this.cancel()},e}();function cL(e,t){if(e.start>=t.end||t.start>=e.end)return{start:0,end:0};var n=Math.max(e.start,t.start),i=Math.min(e.end,t.end);return i-n<=0?{start:0,end:0}:{start:n,end:i}}function hL(e){return e.end-e.start<=0}function dL(e,t){var n=[],i={start:e.start,end:Math.min(t.start,e.end)},o={start:Math.max(t.end,e.start),end:e.end};return hL(i)||n.push(i),hL(o)||n.push(o),n}function fL(e,t){for(var n=[],i=0,o=t;i=r.range.end)){if(e.end=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},yL={useShadows:!0,verticalScrollMode:gr.XR.Auto},bL=function(){function e(e,t,n,i){void 0===i&&(i=yL),this.virtualDelegate=t,this.renderers=new Map,this.splicing=!1,this.items=[],this.itemId=0,this.rangeMap=new gL;for(var o=0,r=n;o=0}))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onMouseDblClick",{get:function(){var e=this;return(0,X.Zs)((0,X.B5)(Jt(this.domNode,"dblclick"),(function(t){return e.toMouseEvent(t)})),(function(e){return e.index>=0}))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onMouseDown",{get:function(){var e=this;return(0,X.Zs)((0,X.B5)(Jt(this.domNode,"mousedown"),(function(t){return e.toMouseEvent(t)})),(function(e){return e.index>=0}))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onContextMenu",{get:function(){var e=this;return(0,X.Zs)((0,X.B5)(Jt(this.domNode,"contextmenu"),(function(t){return e.toMouseEvent(t)})),(function(e){return e.index>=0}))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onTouchStart",{get:function(){var e=this;return(0,X.Zs)((0,X.B5)(Jt(this.domNode,"touchstart"),(function(t){return e.toTouchEvent(t)})),(function(e){return e.index>=0}))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onTap",{get:function(){var e=this;return(0,X.Zs)((0,X.B5)(Jt(this.rowsContainer,iu.Tap),(function(t){return e.toGestureEvent(t)})),(function(e){return e.index>=0}))},enumerable:!0,configurable:!0}),e.prototype.toMouseEvent=function(e){var t=this.getItemIndexFromEventTarget(e.target),n=t<0?void 0:this.items[t];return{browserEvent:e,index:t,element:n&&n.element}},e.prototype.toTouchEvent=function(e){var t=this.getItemIndexFromEventTarget(e.target),n=t<0?void 0:this.items[t];return{browserEvent:e,index:t,element:n&&n.element}},e.prototype.toGestureEvent=function(e){var t=this.getItemIndexFromEventTarget(e.initialTarget),n=t<0?void 0:this.items[t];return{browserEvent:e,index:t,element:n&&n.element}},e.prototype.onScroll=function(e){try{this.render(e.scrollTop,e.height)}catch(t){throw console.log("Got bad scroll event:",e),t}},e.prototype.onTouchChange=function(e){e.preventDefault(),e.stopPropagation(),this.scrollTop-=e.translationY},e.prototype.onDragOver=function(e){this.setupDragAndDropScrollInterval(),this.dragAndDropMouseY=e.posy},e.prototype.setupDragAndDropScrollInterval=function(){var e=this,t=kn(this._domNode).top;this.dragAndDropScrollInterval||(this.dragAndDropScrollInterval=window.setInterval((function(){if(void 0!==e.dragAndDropMouseY){var n=e.dragAndDropMouseY-t,i=0,o=e.renderHeight-35;n<35?i=Math.max(-14,.2*(n-35)):n>o&&(i=Math.min(14,.2*(n-o))),e.scrollTop+=i}}),10),this.cancelDragAndDropScrollTimeout(),this.dragAndDropScrollTimeout=window.setTimeout((function(){e.cancelDragAndDropScrollInterval(),e.dragAndDropScrollTimeout=null}),1e3))},e.prototype.cancelDragAndDropScrollInterval=function(){this.dragAndDropScrollInterval&&(window.clearInterval(this.dragAndDropScrollInterval),this.dragAndDropScrollInterval=null),this.cancelDragAndDropScrollTimeout()},e.prototype.cancelDragAndDropScrollTimeout=function(){this.dragAndDropScrollTimeout&&(window.clearTimeout(this.dragAndDropScrollTimeout),this.dragAndDropScrollTimeout=null)},e.prototype.getItemIndexFromEventTarget=function(e){for(;e instanceof HTMLElement&&e!==this.rowsContainer;){var t=e,n=t.getAttribute("data-index");if(n){var i=Number(n);if(!isNaN(i))return i}e=t.parentElement}return-1},e.prototype.getRenderRange=function(e,t){return{start:this.rangeMap.indexAt(e),end:this.rangeMap.indexAfter(e+t-1)}},e.prototype.getNextToLastElement=function(e){var t=e[e.length-1];if(!t)return null;var n=this.items[t.end];return n&&n.row?n.row.domNode:null},e.prototype.dispose=function(){if(this.items){for(var e=0,t=this.items;e=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},CL=function(){function e(e){this.trait=e,this.renderedElements=[]}return Object.defineProperty(e.prototype,"templateId",{get:function(){return"template:"+this.trait.trait},enumerable:!0,configurable:!0}),e.prototype.renderTemplate=function(e){return e},e.prototype.renderElement=function(e,t,n){var i=(0,tu.v4)(this.renderedElements,(function(e){return e.templateData===n}));if(i>=0){var o=this.renderedElements[i];this.trait.unrender(n),o.index=t}else o={index:t,templateData:n},this.renderedElements.push(o);this.trait.renderIndex(t,n)},e.prototype.disposeElement=function(){},e.prototype.splice=function(e,t,n){for(var i=[],o=0;o=e+t&&i.push({index:r.index+n-t,templateData:r.templateData})}this.renderedElements=i},e.prototype.renderIndexes=function(e){for(var t=0,n=this.renderedElements;t-1&&this.trait.renderIndex(o,r)}},e.prototype.disposeTemplate=function(e){var t=(0,tu.v4)(this.renderedElements,(function(t){return t.templateData===e}));t<0||this.renderedElements.splice(t,1)},e}(),SL=function(){function e(e){this._trait=e,this._onChange=new X.vl,this.indexes=[]}return Object.defineProperty(e.prototype,"onChange",{get:function(){return this._onChange.event},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"trait",{get:function(){return this._trait},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"renderer",{get:function(){return new CL(this)},enumerable:!0,configurable:!0}),e.prototype.splice=function(e,t,n){var i=n.length-t,o=e+t,r=this.indexes.filter((function(t){return t=o})).map((function(e){return e+i})));this.renderer.splice(e,t,n.length),this.set(r)},e.prototype.renderIndex=function(e,t){un(t,this._trait,this.contains(e))},e.prototype.unrender=function(e){an(e,this._trait)},e.prototype.set=function(e){var t=this.indexes;this.indexes=e;var n=PL(t,e);return this.renderer.renderIndexes(n),this._onChange.fire({indexes:e}),t},e.prototype.get=function(){return this.indexes},e.prototype.contains=function(e){return this.indexes.some((function(t){return t===e}))},e.prototype.dispose=function(){this.indexes=null,this._onChange=(0,I.AS)(this._onChange)},ML([nu],e.prototype,"renderer",null),e}(),LL=function(e){function t(t){var n=e.call(this,"focused")||this;return n.getDomId=t,n}return wL(t,e),t.prototype.renderIndex=function(t,n){e.prototype.renderIndex.call(this,t,n),n.setAttribute("role","treeitem"),n.setAttribute("id",this.getDomId(t))},t}(SL),IL=function(){function e(e,t,n){this.trait=e,this.view=t,this.getId=n}return e.prototype.splice=function(e,t,n){var i=this;if(!this.getId)return this.trait.splice(e,t,n.map((function(e){return!1})));var o=this.trait.get().map((function(e){return i.getId(i.view.element(e))})),r=n.map((function(e){return o.indexOf(i.getId(e))>-1}));this.trait.splice(e,t,r)},e}();function NL(e){return"INPUT"===e.tagName||"TEXTAREA"===e.tagName}var xL=function(){function e(e,t,n){this.list=e,this.view=t;var i=!(!1===n.multipleSelectionSupport);this.disposables=[],this.openController=n.openController||EL;var o=(0,X.cy)(Jt(t.domNode,"keydown")).filter((function(e){return!NL(e.target)})).map((function(e){return new Bt(e)}));o.filter((function(e){return 3===e.keyCode})).on(this.onEnter,this,this.disposables),o.filter((function(e){return 16===e.keyCode})).on(this.onUpArrow,this,this.disposables),o.filter((function(e){return 18===e.keyCode})).on(this.onDownArrow,this,this.disposables),o.filter((function(e){return 11===e.keyCode})).on(this.onPageUpArrow,this,this.disposables),o.filter((function(e){return 12===e.keyCode})).on(this.onPageDownArrow,this,this.disposables),o.filter((function(e){return 9===e.keyCode})).on(this.onEscape,this,this.disposables),i&&o.filter((function(e){return(B.zx?e.metaKey:e.ctrlKey)&&31===e.keyCode})).on(this.onCtrlA,this,this.disposables)}return e.prototype.onEnter=function(e){e.preventDefault(),e.stopPropagation(),this.list.setSelection(this.list.getFocus()),this.openController.shouldOpen(e.browserEvent)&&this.list.open(this.list.getFocus(),e.browserEvent)},e.prototype.onUpArrow=function(e){e.preventDefault(),e.stopPropagation(),this.list.focusPrevious(),this.list.reveal(this.list.getFocus()[0]),this.view.domNode.focus()},e.prototype.onDownArrow=function(e){e.preventDefault(),e.stopPropagation(),this.list.focusNext(),this.list.reveal(this.list.getFocus()[0]),this.view.domNode.focus()},e.prototype.onPageUpArrow=function(e){e.preventDefault(),e.stopPropagation(),this.list.focusPreviousPage(),this.list.reveal(this.list.getFocus()[0]),this.view.domNode.focus()},e.prototype.onPageDownArrow=function(e){e.preventDefault(),e.stopPropagation(),this.list.focusNextPage(),this.list.reveal(this.list.getFocus()[0]),this.view.domNode.focus()},e.prototype.onCtrlA=function(e){e.preventDefault(),e.stopPropagation(),this.list.setSelection((0,tu.y1)(this.list.length)),this.view.domNode.focus()},e.prototype.onEscape=function(e){e.preventDefault(),e.stopPropagation(),this.list.setSelection([]),this.view.domNode.focus()},e.prototype.dispose=function(){this.disposables=(0,I.AS)(this.disposables)},e}(),DL=function(){function e(e,t){this.list=e,this.view=t,this.disposables=[],this.disposables=[],(0,X.cy)(Jt(t.domNode,"keydown")).filter((function(e){return!NL(e.target)})).map((function(e){return new Bt(e)})).filter((function(e){return!(2!==e.keyCode||e.ctrlKey||e.metaKey||e.shiftKey||e.altKey)})).on(this.onTab,this,this.disposables)}return e.prototype.onTab=function(e){if(e.target===this.view.domNode){var t=this.list.getFocus();if(0!==t.length){var n=this.view.domElement(t[0]).querySelector("[tabIndex]");if(n&&n instanceof HTMLElement){var i=window.getComputedStyle(n);"hidden"!==i.visibility&&"none"!==i.display&&(e.preventDefault(),e.stopPropagation(),n.focus())}}}},e.prototype.dispose=function(){this.disposables=(0,I.AS)(this.disposables)},e}();function kL(e){return e instanceof MouseEvent&&2===e.button}var TL={isSelectionSingleChangeEvent:function(e){return B.zx?e.browserEvent.metaKey:e.browserEvent.ctrlKey},isSelectionRangeChangeEvent:function(e){return e.browserEvent.shiftKey}},EL={shouldOpen:function(e){return!(e instanceof MouseEvent&&kL(e))}},AL=function(){function e(e,t,n){void 0===n&&(n={}),this.list=e,this.view=t,this.options=n,this.didJustPressContextMenuKey=!1,this.disposables=[],this.multipleSelectionSupport=!(!1===n.multipleSelectionSupport),this.multipleSelectionSupport&&(this.multipleSelectionController=n.multipleSelectionController||TL),this.openController=n.openController||EL,t.onMouseDown(this.onMouseDown,this,this.disposables),t.onMouseClick(this.onPointer,this,this.disposables),t.onMouseDblClick(this.onDoubleClick,this,this.disposables),t.onTouchStart(this.onMouseDown,this,this.disposables),t.onTap(this.onPointer,this,this.disposables),au.addTarget(t.domNode)}return Object.defineProperty(e.prototype,"onContextMenu",{get:function(){var e=this,t=(0,X.cy)(Jt(this.view.domNode,"keydown")).map((function(e){return new Bt(e)})).filter((function(t){return e.didJustPressContextMenuKey=58===t.keyCode||t.shiftKey&&68===t.keyCode})).filter((function(e){return e.preventDefault(),e.stopPropagation(),!1})).event,n=(0,X.cy)(Jt(this.view.domNode,"keyup")).filter((function(){var t=e.didJustPressContextMenuKey;return e.didJustPressContextMenuKey=!1,t})).filter((function(){return e.list.getFocus().length>0})).map((function(){var t=e.list.getFocus()[0];return{index:t,element:e.view.element(t),anchor:e.view.domElement(t)}})).filter((function(e){return!!e.anchor})).event,i=(0,X.cy)(this.view.onContextMenu).filter((function(){return!e.didJustPressContextMenuKey})).map((function(e){var t=e.element,n=e.index,i=e.browserEvent;return{element:t,index:n,anchor:{x:i.clientX+1,y:i.clientY}}})).event;return(0,X.Pc)(t,n,i)},enumerable:!0,configurable:!0}),e.prototype.isSelectionSingleChangeEvent=function(e){return this.multipleSelectionController?this.multipleSelectionController.isSelectionSingleChangeEvent(e):B.zx?e.browserEvent.metaKey:e.browserEvent.ctrlKey},e.prototype.isSelectionRangeChangeEvent=function(e){return this.multipleSelectionController?this.multipleSelectionController.isSelectionRangeChangeEvent(e):e.browserEvent.shiftKey},e.prototype.isSelectionChangeEvent=function(e){return this.isSelectionSingleChangeEvent(e)||this.isSelectionRangeChangeEvent(e)},e.prototype.onMouseDown=function(e){!1===this.options.focusOnMouseDown?(e.browserEvent.preventDefault(),e.browserEvent.stopPropagation()):document.activeElement!==e.browserEvent.target&&this.view.domNode.focus();var t=this.list.getFocus()[0],n=this.list.getSelection();if(t=void 0===t?n[0]:t,this.multipleSelectionSupport&&this.isSelectionRangeChangeEvent(e))return this.changeSelection(e,t);var i=e.index;if(n.every((function(e){return e!==i}))&&this.list.setFocus([i]),this.multipleSelectionSupport&&this.isSelectionChangeEvent(e))return this.changeSelection(e,t);this.options.selectOnMouseDown&&!kL(e.browserEvent)&&(this.list.setSelection([i]),this.openController.shouldOpen(e.browserEvent)&&this.list.open([i],e.browserEvent))},e.prototype.onPointer=function(e){if(!(this.multipleSelectionSupport&&this.isSelectionChangeEvent(e)||this.options.selectOnMouseDown)){var t=this.list.getFocus();this.list.setSelection(t),this.openController.shouldOpen(e.browserEvent)&&this.list.open(t,e.browserEvent)}},e.prototype.onDoubleClick=function(e){if(!this.multipleSelectionSupport||!this.isSelectionChangeEvent(e)){var t=this.list.getFocus();this.list.setSelection(t),this.list.pin(t)}},e.prototype.changeSelection=function(e,t){var n=e.index;if(this.isSelectionRangeChangeEvent(e)&&void 0!==t){var i=Math.min(t,n),o=Math.max(t,n),r=(0,tu.y1)(i,o+1),s=function(e,t){var n=e.indexOf(t);if(-1===n)return[];for(var i=[],o=n-1;o>=0&&e[o]===t-(n-o);)i.push(e[o--]);for(i.reverse(),o=n;o=e.length)n.push(t[o++]);else if(o>=t.length)n.push(e[i++]);else{if(e[i]===t[o]){i++,o++;continue}e[i]=e.length)n.push(t[o++]);else if(o>=t.length)n.push(e[i++]);else{if(e[i]===t[o]){n.push(e[i]),i++,o++;continue}e[i]this.view.length)throw new Error("Invalid start index: "+e);if(t<0)throw new Error("Invalid delete count: "+t);0===t&&0===n.length||this.eventBufferer.bufferEvents((function(){return i.spliceable.splice(e,t,n)}))},Object.defineProperty(e.prototype,"length",{get:function(){return this.view.length},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"contentHeight",{get:function(){return this.view.getContentHeight()},enumerable:!0,configurable:!0}),e.prototype.layout=function(e){this.view.layout(e)},e.prototype.setSelection=function(e){for(var t=0,n=e;t=this.length)throw new Error("Invalid index "+i)}e=e.sort(zL),this.selection.set(e)},e.prototype.getSelection=function(){return this.selection.get()},e.prototype.setFocus=function(e){for(var t=0,n=e;t=this.length)throw new Error("Invalid index "+i)}e=e.sort(zL),this.focus.set(e)},e.prototype.focusNext=function(e,t){if(void 0===e&&(e=1),void 0===t&&(t=!1),0!==this.length){var n=this.focus.get(),i=n.length>0?n[0]+e:0;this.setFocus(t?[i%this.length]:[Math.min(i,this.length-1)])}},e.prototype.focusPrevious=function(e,t){if(void 0===e&&(e=1),void 0===t&&(t=!1),0!==this.length){var n=this.focus.get(),i=n.length>0?n[0]-e:0;t&&i<0&&(i=(this.length+i%this.length)%this.length),this.setFocus([Math.max(i,0)])}},e.prototype.focusNextPage=function(){var e=this,t=this.view.indexAt(this.view.getScrollTop()+this.view.renderHeight);t=0===t?0:t-1;var n=this.view.element(t);if(this.getFocusedElements()[0]!==n)this.setFocus([t]);else{var i=this.view.getScrollTop();this.view.setScrollTop(i+this.view.renderHeight-this.view.elementHeight(t)),this.view.getScrollTop()!==i&&setTimeout((function(){return e.focusNextPage()}),0)}},e.prototype.focusPreviousPage=function(){var e,t=this,n=this.view.getScrollTop();e=0===n?this.view.indexAt(n):this.view.indexAfter(n-1);var i=this.view.element(e);if(this.getFocusedElements()[0]!==i)this.setFocus([e]);else{var o=n;this.view.setScrollTop(n-this.view.renderHeight),this.view.getScrollTop()!==o&&setTimeout((function(){return t.focusPreviousPage()}),0)}},e.prototype.focusLast=function(){0!==this.length&&this.setFocus([this.length-1])},e.prototype.focusFirst=function(){0!==this.length&&this.setFocus([0])},e.prototype.getFocus=function(){return this.focus.get()},e.prototype.getFocusedElements=function(){var e=this;return this.getFocus().map((function(t){return e.view.element(t)}))},e.prototype.reveal=function(e,t){if(e<0||e>=this.length)throw new Error("Invalid index "+e);var n,i=this.view.getScrollTop(),o=this.view.elementTop(e),r=this.view.elementHeight(e);if((0,w.Et)(t)){var s=r-this.view.renderHeight;this.view.setScrollTop(s*(n=t,0,1,Math.min(Math.max(n,0),1))+o)}else{var a=o+r,u=i+this.view.renderHeight;o=u&&this.view.setScrollTop(a-this.view.renderHeight)}},e.prototype.getElementDomId=function(e){return this.idPrefix+"_"+e},e.prototype.isDOMFocused=function(){return this.view.domNode===document.activeElement},e.prototype.getHTMLElement=function(){return this.view.domNode},e.prototype.open=function(e,t){for(var n=this,i=0,o=e;i=this.length)throw new Error("Invalid index "+r)}this._onOpen.fire({indexes:e,elements:e.map((function(e){return n.view.element(e)})),browserEvent:t})},e.prototype.pin=function(e){for(var t=0,n=e;t=this.length)throw new Error("Invalid index "+i)}this._onPin.fire(e)},e.prototype.style=function(e){this.styleController.style(e)},e.prototype.toListEvent=function(e){var t=this,n=e.indexes;return{indexes:n,elements:n.map((function(e){return t.view.element(e)}))}},e.prototype._onFocusChange=function(){var e=this.focus.get();e.length>0?this.view.domNode.setAttribute("aria-activedescendant",this.getElementDomId(e[0])):this.view.domNode.removeAttribute("aria-activedescendant"),this.view.domNode.setAttribute("role","tree"),un(this.view.domNode,"element-focused",e.length>0)},e.prototype._onSelectionChange=function(){var e=this.selection.get();un(this.view.domNode,"selection-none",0===e.length),un(this.view.domNode,"selection-single",1===e.length),un(this.view.domNode,"selection-multiple",e.length>1)},e.prototype.dispose=function(){this._onDidDispose.fire(),this.disposables=(0,I.AS)(this.disposables)},e.InstanceCount=0,ML([nu],e.prototype,"onFocusChange",null),ML([nu],e.prototype,"onSelectionChange",null),e}(),BL=Object.assign||function(e){for(var t,n=1,i=arguments.length;n1),r)i?this.setState(0):this.setState(2),this.completionModel=null;else{var s=this.completionModel.stats;s.wasAutomaticallyTriggered=!!i,this.telemetryService.publicLog("suggestWidget",BL({},s,this.editor.getTelemetryData())),this.list.splice(0,this.list.length,this.completionModel.items),n?this.setState(4):this.setState(3),this.list.reveal(t,t),this.list.setFocus([t]),this.detailsBorderColor&&(this.details.element.style.borderColor=this.detailsBorderColor)}}},e.prototype.selectNextPage=function(){switch(this.state){case 0:return!1;case 5:return this.details.pageDown(),!0;case 1:return!this.isAuto;default:return this.list.focusNextPage(),!0}},e.prototype.selectNext=function(){switch(this.state){case 0:return!1;case 1:return!this.isAuto;default:return this.list.focusNext(1,!0),!0}},e.prototype.selectLast=function(){switch(this.state){case 0:return!1;case 5:return this.details.scrollBottom(),!0;case 1:return!this.isAuto;default:return this.list.focusLast(),!0}},e.prototype.selectPreviousPage=function(){switch(this.state){case 0:return!1;case 5:return this.details.pageUp(),!0;case 1:return!this.isAuto;default:return this.list.focusPreviousPage(),!0}},e.prototype.selectPrevious=function(){switch(this.state){case 0:return!1;case 1:return!this.isAuto;default:return this.list.focusPrevious(1,!0),!1}},e.prototype.selectFirst=function(){switch(this.state){case 0:return!1;case 5:return this.details.scrollTop(),!0;case 1:return!this.isAuto;default:return this.list.focusFirst(),!0}},e.prototype.getFocusedItem=function(){if(0!==this.state&&2!==this.state&&1!==this.state)return{item:this.list.getFocusedElements()[0],index:this.list.getFocus()[0],model:this.completionModel}},e.prototype.toggleDetailsFocus=function(){5===this.state?(this.setState(3),this.detailsBorderColor&&(this.details.element.style.borderColor=this.detailsBorderColor)):3===this.state&&this.expandDocsSettingFromStorage()&&(this.setState(5),this.detailsFocusBorderColor&&(this.details.element.style.borderColor=this.detailsFocusBorderColor)),this.telemetryService.publicLog("suggestWidget:toggleDetailsFocus",this.editor.getTelemetryData())},e.prototype.toggleDetails=function(){if(KL(this.list.getFocusedElements()[0]))if(this.expandDocsSettingFromStorage())this.updateExpandDocsSetting(!1),$n(this.details.element),an(this.element,"docs-side"),an(this.element,"docs-below"),this.editor.layoutContentWidget(this),this.telemetryService.publicLog("suggestWidget:collapseDetails",this.editor.getTelemetryData());else{if(3!==this.state&&5!==this.state&&4!==this.state)return;this.updateExpandDocsSetting(!0),this.showDetails(),this.telemetryService.publicLog("suggestWidget:expandDetails",this.editor.getTelemetryData())}},e.prototype.showDetails=function(){this.expandSideOrBelow(),Xn(this.details.element),this.details.render(this.list.getFocusedElements()[0]),this.details.element.style.maxHeight=this.maxWidgetHeight+"px",this.listElement.style.marginTop="0px",this.editor.layoutContentWidget(this),this.adjustDocsPosition(),this.editor.focus(),this._ariaAlert(this.details.getAriaLabel())},e.prototype.show=function(){var e=this,t=this.updateListHeight();t!==this.listHeight&&(this.editor.layoutContentWidget(this),this.listHeight=t),this.suggestWidgetVisible.set(!0),this.showTimeout.cancelAndSet((function(){sn(e.element,"visible"),e.onDidShowEmitter.fire(e)}),100)},e.prototype.hide=function(){this.suggestWidgetVisible.reset(),this.suggestWidgetMultipleSuggestions.reset(),an(this.element,"visible")},e.prototype.hideWidget=function(){clearTimeout(this.loadingTimeout),this.setState(0),this.onDidHideEmitter.fire(this)},e.prototype.getPosition=function(){return 0===this.state?null:{position:this.editor.getPosition(),preference:[ou.BELOW,ou.ABOVE]}},e.prototype.getDomNode=function(){return this.element},e.prototype.getId=function(){return e.ID},e.prototype.updateListHeight=function(){var e=0;if(2===this.state||1===this.state)e=this.unfocusedHeight;else{var t=this.list.contentHeight/this.unfocusedHeight;e=Math.min(t,12)*this.unfocusedHeight}return this.element.style.lineHeight=this.unfocusedHeight+"px",this.listElement.style.height=e+"px",this.list.layout(e),e},e.prototype.adjustDocsPosition=function(){var e=this.editor.getConfiguration().fontInfo.lineHeight,t=this.editor.getScrolledVisiblePosition(this.editor.getPosition()),n=Tn(this.editor.getDomNode()),i=n.left+t.left,o=n.top+t.top+t.height,r=Tn(this.element),s=r.left,a=r.top;sa&&this.details.element.offsetHeight>this.listElement.offsetHeight&&(this.listElement.style.marginTop=this.details.element.offsetHeight-this.listElement.offsetHeight+"px")},e.prototype.expandSideOrBelow=function(){if(!KL(this.focusedItem)&&this.firstFocusInCurrentList)return an(this.element,"docs-side"),void an(this.element,"docs-below");var e=this.element.style.maxWidth.match(/(\d+)px/);!e||Number(e[1])=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([HL(1,q),HL(2,he),HL(3,Lr),HL(4,dp),HL(5,xf),HL(6,o_),HL(7,z_)],e)}();Tr((function(e,t){var n=e.getColor(GL);n&&t.addRule(".monaco-editor .suggest-widget .monaco-list .monaco-list-row .monaco-highlighted-label .highlight { color: "+n+"; }");var i=e.getColor(YL);i&&t.addRule(".monaco-editor .suggest-widget { color: "+i+"; }");var o=e.getColor(ns);o&&t.addRule(".monaco-editor .suggest-widget a { color: "+o+"; }");var r=e.getColor(is);r&&t.addRule(".monaco-editor .suggest-widget code { background-color: "+r+"; }")}));var eI=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),tI=function(){function e(){}return e.prototype.select=function(e,t,n){if(0===n.length)return 0;for(var i=n[0].score,o=1;os&&c.type===u.type&&c.insertText===u.insertText&&(s=c.touch,r=a)}return-1===r?e.prototype.select.call(this,t,n,i):r},t.prototype.toJSON=function(){var e=[];return this._cache.forEach((function(t,n){e.push([n,t])})),e},t.prototype.fromJSON=function(e){this._cache.clear();for(var t=0,n=e;t0){this._seq=e[0][1].touch+1;for(var t=0,n=e;t=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([(t=1,n=dp,function(e,i){n(e,i,t)})],e);var t,n}(),sI=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),aI=function(e,t){return function(n,i){t(n,i,e)}},uI=function(){function e(e,t,n){var i=this;this._disposables=[],this._activeAcceptCharacters=new Set,this._disposables.push(t.onDidShow((function(){return i._onItem(t.getFocusedItem())}))),this._disposables.push(t.onDidFocus(this._onItem,this)),this._disposables.push(t.onDidHide(this.reset,this)),this._disposables.push(e.onWillType((function(t){if(i._activeItem){var o=t[t.length-1];i._activeAcceptCharacters.has(o)&&e.getConfiguration().contribInfo.acceptSuggestionOnCommitCharacter&&n(i._activeItem)}})))}return e.prototype._onItem=function(e){if(e&&!(0,tu.Ct)(e.item.suggestion.commitCharacters)){this._activeItem=e,this._activeAcceptCharacters.clear();for(var t=0,n=e.item.suggestion.commitCharacters;t0&&this._activeAcceptCharacters.add(i[0])}}else this.reset()},e.prototype.reset=function(){this._activeItem=void 0},e.prototype.dispose=function(){(0,I.AS)(this._disposables)},e}(),lI=function(){function e(e,t,n,i){var o=this;this._editor=e,this._commandService=t,this._contextKeyService=n,this._instantiationService=i,this._toDispose=[],this._model=new lL(this._editor),this._memory=i.createInstance(rI,this._editor.getConfiguration().contribInfo.suggestSelection),this._toDispose.push(this._model.onDidTrigger((function(e){o._widget||o._createSuggestWidget(),o._widget.showTriggered(e.auto)}))),this._toDispose.push(this._model.onDidSuggest((function(e){var t=o._memory.select(o._editor.getModel(),o._editor.getPosition(),e.completionModel.items);o._widget.showSuggestions(e.completionModel,t,e.isFrozen,e.auto)}))),this._toDispose.push(this._model.onDidCancel((function(e){o._widget&&!e.retrigger&&o._widget.hideWidget()})));var r=dS.AcceptSuggestionsOnEnter.bindTo(n),s=function(){var e=o._editor.getConfiguration().contribInfo,t=e.acceptSuggestionOnEnter,n=e.suggestSelection;r.set("on"===t||"smart"===t),o._memory.setMode(n)};this._toDispose.push(this._editor.onDidChangeConfiguration((function(e){return s()}))),s()}return e.get=function(t){return t.getContribution(e.ID)},e.prototype._createSuggestWidget=function(){var e=this;this._widget=this._instantiationService.createInstance($L,this._editor),this._toDispose.push(this._widget.onDidSelect(this._onDidSelectItem,this));var t=new uI(this._editor,this._widget,(function(t){return e._onDidSelectItem(t)}));this._toDispose.push(t,this._model.onDidSuggest((function(e){0===e.completionModel.items.length&&t.reset()})));var n=dS.MakesTextEdit.bindTo(this._contextKeyService);this._toDispose.push(this._widget.onDidFocus((function(t){var i=t.item,o=e._editor.getPosition(),r=i.position.column-i.suggestion.overwriteBefore,s=o.column,a=!0;"smart"!==e._editor.getConfiguration().contribInfo.acceptSuggestionOnEnter||2!==e._model.state||i.suggestion.command||i.suggestion.additionalTextEdits||"textmate"===i.suggestion.snippetType||s-r!==i.suggestion.insertText.length||(a=e._editor.getModel().getValueInRange({startLineNumber:o.lineNumber,startColumn:r,endLineNumber:o.lineNumber,endColumn:s})!==i.suggestion.insertText),n.set(a)}))),this._toDispose.push({dispose:function(){n.reset()}})},e.prototype.getId=function(){return e.ID},e.prototype.dispose=function(){this._toDispose=(0,I.AS)(this._toDispose),this._widget&&(this._widget.dispose(),this._widget=null),this._model&&(this._model.dispose(),this._model=null)},e.prototype._onDidSelectItem=function(e){var t;if(e&&e.item){var n=e.item,i=n.suggestion,o=n.position,r=this._editor.getPosition().column-o.column;this._editor.pushUndoStop(),Array.isArray(i.additionalTextEdits)&&this._editor.executeEdits("suggestController.additionalTextEdits",i.additionalTextEdits.map((function(e){return mf.replace(s.Q.lift(e.range),e.text)}))),this._memory.memorize(this._editor.getModel(),this._editor.getPosition(),e.item);var a=i.insertText;"textmate"!==i.snippetType&&(a=oS.escape(a)),SS.get(this._editor).insert(a,i.overwriteBefore+r,i.overwriteAfter,!1,!1),this._editor.pushUndoStop(),i.command?i.command.id===cI.id?this._model.trigger({auto:!0},!0):((t=this._commandService).executeCommand.apply(t,[i.command.id].concat(i.command.arguments)).done(void 0,S.dz),this._model.cancel()):this._model.cancel(),this._alertCompletionItem(e.item)}else this._model.cancel()},e.prototype._alertCompletionItem=function(e){var t=e.suggestion;Ep(o.k("arai.alert.snippet","Accepting '{0}' did insert the following text: {1}",t.label,t.insertText))},e.prototype.triggerSuggest=function(e){this._model.trigger({auto:!1},!1,e),this._editor.revealLine(this._editor.getPosition().lineNumber,0),this._editor.focus()},e.prototype.acceptSelectedSuggestion=function(){if(this._widget){var e=this._widget.getFocusedItem();this._onDidSelectItem(e)}},e.prototype.cancelSuggestWidget=function(){this._widget&&(this._model.cancel(),this._widget.hideWidget())},e.prototype.selectNextSuggestion=function(){this._widget&&this._widget.selectNext()},e.prototype.selectNextPageSuggestion=function(){this._widget&&this._widget.selectNextPage()},e.prototype.selectLastSuggestion=function(){this._widget&&this._widget.selectLast()},e.prototype.selectPrevSuggestion=function(){this._widget&&this._widget.selectPrevious()},e.prototype.selectPrevPageSuggestion=function(){this._widget&&this._widget.selectPreviousPage()},e.prototype.selectFirstSuggestion=function(){this._widget&&this._widget.selectFirst()},e.prototype.toggleSuggestionDetails=function(){this._widget&&this._widget.toggleDetails()},e.prototype.toggleSuggestionFocus=function(){this._widget&&this._widget.toggleDetailsFocus()},e.ID="editor.contrib.suggestController",e=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([aI(1,D),aI(2,he),aI(3,N._Y)],e)}(),cI=function(e){function t(){return e.call(this,{id:t.id,label:o.k("suggest.trigger.label","Trigger Suggest"),alias:"Trigger Suggest",precondition:ne.and(Oe.writable,Oe.hasCompletionItemProvider),kbOpts:{kbExpr:Oe.textInputFocus,primary:2058,mac:{primary:266},weight:100}})||this}return sI(t,e),t.prototype.run=function(e,t){var n=lI.get(t);n&&n.triggerSuggest()},t.id="editor.action.triggerSuggest",t}(xe);Ae(lI),Ee(cI);var hI=190,dI=Ne.bindToContribution(lI.get);Te(new dI({id:"acceptSelectedSuggestion",precondition:dS.Visible,handler:function(e){return e.acceptSelectedSuggestion()},kbOpts:{weight:hI,kbExpr:Oe.textInputFocus,primary:2}})),Te(new dI({id:"acceptSelectedSuggestionOnEnter",precondition:dS.Visible,handler:function(e){return e.acceptSelectedSuggestion()},kbOpts:{weight:hI,kbExpr:ne.and(Oe.textInputFocus,dS.AcceptSuggestionsOnEnter,dS.MakesTextEdit),primary:3}})),Te(new dI({id:"hideSuggestWidget",precondition:dS.Visible,handler:function(e){return e.cancelSuggestWidget()},kbOpts:{weight:hI,kbExpr:Oe.textInputFocus,primary:9,secondary:[1033]}})),Te(new dI({id:"selectNextSuggestion",precondition:ne.and(dS.Visible,dS.MultipleSuggestions),handler:function(e){return e.selectNextSuggestion()},kbOpts:{weight:hI,kbExpr:Oe.textInputFocus,primary:18,secondary:[2066],mac:{primary:18,secondary:[2066,300]}}})),Te(new dI({id:"selectNextPageSuggestion",precondition:ne.and(dS.Visible,dS.MultipleSuggestions),handler:function(e){return e.selectNextPageSuggestion()},kbOpts:{weight:hI,kbExpr:Oe.textInputFocus,primary:12,secondary:[2060]}})),Te(new dI({id:"selectLastSuggestion",precondition:ne.and(dS.Visible,dS.MultipleSuggestions),handler:function(e){return e.selectLastSuggestion()}})),Te(new dI({id:"selectPrevSuggestion",precondition:ne.and(dS.Visible,dS.MultipleSuggestions),handler:function(e){return e.selectPrevSuggestion()},kbOpts:{weight:hI,kbExpr:Oe.textInputFocus,primary:16,secondary:[2064],mac:{primary:16,secondary:[2064,302]}}})),Te(new dI({id:"selectPrevPageSuggestion",precondition:ne.and(dS.Visible,dS.MultipleSuggestions),handler:function(e){return e.selectPrevPageSuggestion()},kbOpts:{weight:hI,kbExpr:Oe.textInputFocus,primary:11,secondary:[2059]}})),Te(new dI({id:"selectFirstSuggestion",precondition:ne.and(dS.Visible,dS.MultipleSuggestions),handler:function(e){return e.selectFirstSuggestion()}})),Te(new dI({id:"toggleSuggestionDetails",precondition:dS.Visible,handler:function(e){return e.toggleSuggestionDetails()},kbOpts:{weight:hI,kbExpr:Oe.textInputFocus,primary:2058,mac:{primary:266}}})),Te(new dI({id:"toggleSuggestionFocus",precondition:dS.Visible,handler:function(e){return e.toggleSuggestionFocus()},kbOpts:{weight:hI,kbExpr:Oe.textInputFocus,primary:2570,mac:{primary:778}}}));var fI=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),pI=function(e){function t(){return e.call(this,{id:t.ID,label:o.k({key:"toggle.tabMovesFocus",comment:["Turn on/off use of tab key for moving focus around VS Code"]},"Toggle Tab Key Moves Focus"),alias:"Toggle Tab Key Moves Focus",precondition:null,kbOpts:{kbExpr:null,primary:2091,mac:{primary:1323},weight:100}})||this}return fI(t,e),t.prototype.run=function(e,t){var n=Pi.getTabFocusMode();Pi.setTabFocusMode(!n)},t.ID="editor.action.toggleTabFocusMode",t}(xe);Ee(pI);var gI=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),mI=Kr("editor.wordHighlightBackground",{dark:"#575757B8",light:"#57575740",hc:null},o.k("wordHighlight","Background color of a symbol during read-access, like reading a variable. The color must not be opaque to not hide underlying decorations."),!0),vI=Kr("editor.wordHighlightStrongBackground",{dark:"#004972B8",light:"#0e639c40",hc:null},o.k("wordHighlightStrong","Background color of a symbol during write-access, like writing to a variable. The color must not be opaque to not hide underlying decorations."),!0),yI=Kr("editor.wordHighlightBorder",{light:null,dark:null,hc:ts},o.k("wordHighlightBorder","Border color of a symbol during read-access, like reading a variable.")),bI=Kr("editor.wordHighlightStrongBorder",{light:null,dark:null,hc:ts},o.k("wordHighlightStrongBorder","Border color of a symbol during write-access, like writing to a variable.")),_I=Kr("editorOverviewRuler.wordHighlightForeground",{dark:"#A0A0A0CC",light:"#A0A0A0CC",hc:"#A0A0A0CC"},o.k("overviewRulerWordHighlightForeground","Overview ruler marker color for symbol highlights. The color must not be opaque to not hide underlying decorations."),!0),wI=Kr("editorOverviewRuler.wordHighlightStrongForeground",{dark:"#C0A0C0CC",light:"#C0A0C0CC",hc:"#C0A0C0CC"},o.k("overviewRulerWordHighlightStrongForeground","Overview ruler marker color for write-access symbol highlights. The color must not be opaque to not hide underlying decorations."),!0),MI=new ce("hasWordHighlights",!1);function CI(e,t,n){return bt(No.UG.ordered(e).map((function(i){return function(){return Promise.resolve(i.provideDocumentHighlights(e,t,n)).then(void 0,S.M_)}})),(function(e){return!(0,tu.Ct)(e)}))}ke("_executeDocumentHighlights",(function(e,t){return CI(e,t,st.None)}));var SI=function(){function e(e,t){var n=this;this.workerRequestTokenId=0,this.workerRequest=null,this.workerRequestCompleted=!1,this.workerRequestValue=[],this.lastCursorPositionChangeTime=0,this.renderDecorationsTimer=-1,this.editor=e,this._hasWordHighlights=MI.bindTo(t),this._ignorePositionChangeEvent=!1,this.occurrencesHighlight=this.editor.getConfiguration().contribInfo.occurrencesHighlight,this.model=this.editor.getModel(),this.toUnhook=[],this.toUnhook.push(e.onDidChangeCursorPosition((function(e){n._ignorePositionChangeEvent||n.occurrencesHighlight&&n._onPositionChanged(e)}))),this.toUnhook.push(e.onDidChangeModel((function(e){n._stopAll(),n.model=n.editor.getModel()}))),this.toUnhook.push(e.onDidChangeModelContent((function(e){n._stopAll()}))),this.toUnhook.push(e.onDidChangeConfiguration((function(e){var t=n.editor.getConfiguration().contribInfo.occurrencesHighlight;n.occurrencesHighlight!==t&&(n.occurrencesHighlight=t,n._stopAll())}))),this._lastWordRange=null,this._decorationIds=[],this.workerRequestTokenId=0,this.workerRequest=null,this.workerRequestCompleted=!1,this.lastCursorPositionChangeTime=0,this.renderDecorationsTimer=-1}return e.prototype.hasDecorations=function(){return this._decorationIds.length>0},e.prototype.restore=function(){this.occurrencesHighlight&&this._run()},e.prototype._getSortedHighlights=function(){var e=this;return this._decorationIds.map((function(t){return e.model.getDecorationRange(t)})).sort(s.Q.compareRangesUsingStarts)},e.prototype.moveNext=function(){var e=this,t=this._getSortedHighlights(),n=t[((0,tu.v4)(t,(function(t){return t.containsPosition(e.editor.getPosition())}))+1)%t.length];try{this._ignorePositionChangeEvent=!0,this.editor.setPosition(n.getStartPosition()),this.editor.revealRangeInCenterIfOutsideViewport(n)}finally{this._ignorePositionChangeEvent=!1}},e.prototype.moveBack=function(){var e=this,t=this._getSortedHighlights(),n=t[((0,tu.v4)(t,(function(t){return t.containsPosition(e.editor.getPosition())}))-1+t.length)%t.length];try{this._ignorePositionChangeEvent=!0,this.editor.setPosition(n.getStartPosition()),this.editor.revealRangeInCenterIfOutsideViewport(n)}finally{this._ignorePositionChangeEvent=!1}},e.prototype._removeDecorations=function(){this._decorationIds.length>0&&(this._decorationIds=this.editor.deltaDecorations(this._decorationIds,[]),this._hasWordHighlights.set(!1))},e.prototype._stopAll=function(){this._lastWordRange=null,this._removeDecorations(),-1!==this.renderDecorationsTimer&&(clearTimeout(this.renderDecorationsTimer),this.renderDecorationsTimer=-1),null!==this.workerRequest&&(this.workerRequest.cancel(),this.workerRequest=null),this.workerRequestCompleted||(this.workerRequestTokenId++,this.workerRequestCompleted=!0)},e.prototype._onPositionChanged=function(e){this.occurrencesHighlight&&e.reason===i.Explicit?this._run():this._stopAll()},e.prototype._run=function(){var e=this;if(No.UG.has(this.model)){var t=this.editor.getSelection();if(t.startLineNumber===t.endLineNumber){var n=t.startLineNumber,i=t.startColumn,o=t.endColumn,r=this.model.getWordAtPosition({lineNumber:n,column:i});if(!r||r.startColumn>i||r.endColumn=o&&(u=!0)}if(this.lastCursorPositionChangeTime=(new Date).getTime(),u)this.workerRequestCompleted&&-1!==this.renderDecorationsTimer&&(clearTimeout(this.renderDecorationsTimer),this.renderDecorationsTimer=-1,this._beginRenderDecorations());else{this._stopAll();var d=++this.workerRequestTokenId;this.workerRequestCompleted=!1,this.workerRequest=ft((function(t){return CI(e.model,e.editor.getPosition(),t)})),this.workerRequest.then((function(t){d===e.workerRequestTokenId&&(e.workerRequestCompleted=!0,e.workerRequestValue=t||[],e._beginRenderDecorations())}),S.dz)}this._lastWordRange=a}}else this._stopAll()}else this._stopAll()},e.prototype._beginRenderDecorations=function(){var e=this,t=(new Date).getTime(),n=this.lastCursorPositionChangeTime+250;t>=n?(this.renderDecorationsTimer=-1,this.renderDecorations()):this.renderDecorationsTimer=setTimeout((function(){e.renderDecorations()}),n-t)},e.prototype.renderDecorations=function(){this.renderDecorationsTimer=-1;for(var t=[],n=0,i=this.workerRequestValue.length;n=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([(t=1,n=he,function(e,i){n(e,i,t)})],e);var t,n}(),II=function(e){function t(t,n){var i=e.call(this,n)||this;return i._isNext=t,i}return gI(t,e),t.prototype.run=function(e,t){var n=LI.get(t);n&&(this._isNext?n.moveNext():n.moveBack())},t}(xe),NI=function(e){function t(){return e.call(this,!0,{id:"editor.action.wordHighlight.next",label:o.k("wordHighlight.next.label","Go to Next Symbol Highlight"),alias:"Go to Next Symbol Highlight",precondition:MI,kbOpts:{kbExpr:Oe.editorTextFocus,primary:65,weight:100}})||this}return gI(t,e),t}(II),xI=function(e){function t(){return e.call(this,!1,{id:"editor.action.wordHighlight.prev",label:o.k("wordHighlight.previous.label","Go to Previous Symbol Highlight"),alias:"Go to Previous Symbol Highlight",precondition:MI,kbOpts:{kbExpr:Oe.editorTextFocus,primary:1089,weight:100}})||this}return gI(t,e),t}(II);Ae(LI),Ee(NI),Ee(xI),Tr((function(e,t){var n=e.getColor(Vs);n&&(t.addRule(".monaco-editor .focused .selectionHighlight { background-color: "+n+"; }"),t.addRule(".monaco-editor .selectionHighlight { background-color: "+n.transparent(.5)+"; }"));var i=e.getColor(mI);i&&t.addRule(".monaco-editor .wordHighlight { background-color: "+i+"; }");var o=e.getColor(vI);o&&t.addRule(".monaco-editor .wordHighlightStrong { background-color: "+o+"; }");var r=e.getColor(Us);r&&t.addRule(".monaco-editor .selectionHighlight { border: 1px "+("hc"===e.type?"dotted":"solid")+" "+r+"; box-sizing: border-box; }");var s=e.getColor(yI);s&&t.addRule(".monaco-editor .wordHighlight { border: 1px "+("hc"===e.type?"dashed":"solid")+" "+s+"; box-sizing: border-box; }");var a=e.getColor(bI);a&&t.addRule(".monaco-editor .wordHighlightStrong { border: 1px "+("hc"===e.type?"dashed":"solid")+" "+a+"; box-sizing: border-box; }")}));var DI=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),kI=function(e){function t(t){var n=e.call(this,t)||this;return n._inSelectionMode=t.inSelectionMode,n._wordNavigationType=t.wordNavigationType,n}return DI(t,e),t.prototype.runEditorCommand=function(e,t,n){var o=this,s=t.getConfiguration(),a=(0,f.i)(s.wordSeparators),u=t.getModel(),c=t.getSelections().map((function(e){var t=new r.y(e.positionLineNumber,e.positionColumn),n=o._move(a,u,t,o._wordNavigationType);return o._moveTo(e,n,o._inSelectionMode)}));if(t._getCursors().setStates("moveWordCommand",i.NotSet,c.map((function(e){return l.MF.fromModelSelection(e)}))),1===c.length){var h=new r.y(c[0].positionLineNumber,c[0].positionColumn);t.revealPosition(h,0)}},t.prototype._moveTo=function(e,t,n){return n?new Be.L(e.selectionStartLineNumber,e.selectionStartColumn,t.lineNumber,t.column):new Be.L(t.lineNumber,t.column,t.lineNumber,t.column)},t}(Ne),TI=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return DI(t,e),t.prototype._move=function(e,t,n,i){return m.moveWordLeft(e,t,n,i)},t}(kI),EI=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return DI(t,e),t.prototype._move=function(e,t,n,i){return m.moveWordRight(e,t,n,i)},t}(kI),AI=function(e){function t(){return e.call(this,{inSelectionMode:!1,wordNavigationType:0,id:"cursorWordStartLeft",precondition:null,kbOpts:{kbExpr:Oe.textInputFocus,primary:2063,mac:{primary:527},weight:100}})||this}return DI(t,e),t}(TI),jI=function(e){function t(){return e.call(this,{inSelectionMode:!1,wordNavigationType:1,id:"cursorWordEndLeft",precondition:null})||this}return DI(t,e),t}(TI),OI=function(e){function t(){return e.call(this,{inSelectionMode:!1,wordNavigationType:0,id:"cursorWordLeft",precondition:null})||this}return DI(t,e),t}(TI),RI=function(e){function t(){return e.call(this,{inSelectionMode:!0,wordNavigationType:0,id:"cursorWordStartLeftSelect",precondition:null,kbOpts:{kbExpr:Oe.textInputFocus,primary:3087,mac:{primary:1551},weight:100}})||this}return DI(t,e),t}(TI),PI=function(e){function t(){return e.call(this,{inSelectionMode:!0,wordNavigationType:1,id:"cursorWordEndLeftSelect",precondition:null})||this}return DI(t,e),t}(TI),zI=function(e){function t(){return e.call(this,{inSelectionMode:!0,wordNavigationType:0,id:"cursorWordLeftSelect",precondition:null})||this}return DI(t,e),t}(TI),WI=function(e){function t(){return e.call(this,{inSelectionMode:!1,wordNavigationType:0,id:"cursorWordStartRight",precondition:null})||this}return DI(t,e),t}(EI),FI=function(e){function t(){return e.call(this,{inSelectionMode:!1,wordNavigationType:1,id:"cursorWordEndRight",precondition:null,kbOpts:{kbExpr:Oe.textInputFocus,primary:2065,mac:{primary:529},weight:100}})||this}return DI(t,e),t}(EI),BI=function(e){function t(){return e.call(this,{inSelectionMode:!1,wordNavigationType:1,id:"cursorWordRight",precondition:null})||this}return DI(t,e),t}(EI),HI=function(e){function t(){return e.call(this,{inSelectionMode:!0,wordNavigationType:0,id:"cursorWordStartRightSelect",precondition:null})||this}return DI(t,e),t}(EI),VI=function(e){function t(){return e.call(this,{inSelectionMode:!0,wordNavigationType:1,id:"cursorWordEndRightSelect",precondition:null,kbOpts:{kbExpr:Oe.textInputFocus,primary:3089,mac:{primary:1553},weight:100}})||this}return DI(t,e),t}(EI),UI=function(e){function t(){return e.call(this,{inSelectionMode:!0,wordNavigationType:1,id:"cursorWordRightSelect",precondition:null})||this}return DI(t,e),t}(EI),YI=function(e){function t(t){var n=e.call(this,t)||this;return n._whitespaceHeuristics=t.whitespaceHeuristics,n._wordNavigationType=t.wordNavigationType,n}return DI(t,e),t.prototype.runEditorCommand=function(e,t,n){var i=this,o=t.getConfiguration(),r=(0,f.i)(o.wordSeparators),s=t.getModel(),a=t.getSelections().map((function(e){var t=i._delete(r,s,e,i._whitespaceHeuristics,i._wordNavigationType);return new He(t,"")}));t.pushUndoStop(),t.executeCommands(this.id,a),t.pushUndoStop()},t}(Ne),ZI=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return DI(t,e),t.prototype._delete=function(e,t,n,i,o){return m.deleteWordLeft(e,t,n,i,o)||new s.Q(1,1,1,1)},t}(YI),GI=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return DI(t,e),t.prototype._delete=function(e,t,n,i,o){var r=m.deleteWordRight(e,t,n,i,o);if(r)return r;var a=t.getLineCount(),u=t.getLineMaxColumn(a);return new s.Q(a,u,a,u)},t}(YI),QI=function(e){function t(){return e.call(this,{whitespaceHeuristics:!1,wordNavigationType:0,id:"deleteWordStartLeft",precondition:Oe.writable})||this}return DI(t,e),t}(ZI),qI=function(e){function t(){return e.call(this,{whitespaceHeuristics:!1,wordNavigationType:1,id:"deleteWordEndLeft",precondition:Oe.writable})||this}return DI(t,e),t}(ZI),KI=function(e){function t(){return e.call(this,{whitespaceHeuristics:!0,wordNavigationType:0,id:"deleteWordLeft",precondition:Oe.writable,kbOpts:{kbExpr:Oe.textInputFocus,primary:2049,mac:{primary:513},weight:100}})||this}return DI(t,e),t}(ZI),JI=function(e){function t(){return e.call(this,{whitespaceHeuristics:!1,wordNavigationType:0,id:"deleteWordStartRight",precondition:Oe.writable})||this}return DI(t,e),t}(GI),XI=function(e){function t(){return e.call(this,{whitespaceHeuristics:!1,wordNavigationType:1,id:"deleteWordEndRight",precondition:Oe.writable})||this}return DI(t,e),t}(GI),$I=function(e){function t(){return e.call(this,{whitespaceHeuristics:!0,wordNavigationType:1,id:"deleteWordRight",precondition:Oe.writable,kbOpts:{kbExpr:Oe.textInputFocus,primary:2068,mac:{primary:532},weight:100}})||this}return DI(t,e),t}(GI);Te(new AI),Te(new jI),Te(new OI),Te(new RI),Te(new PI),Te(new zI),Te(new WI),Te(new FI),Te(new BI),Te(new HI),Te(new VI),Te(new UI),Te(new QI),Te(new qI),Te(new KI),Te(new JI),Te(new XI),Te(new $I);var eN=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),tN=function(e){function t(){return e.call(this,{whitespaceHeuristics:!0,wordNavigationType:0,id:"deleteWordPartLeft",precondition:Oe.writable,kbOpts:{kbExpr:Oe.textInputFocus,primary:0,mac:{primary:769},weight:100}})||this}return eN(t,e),t.prototype._delete=function(e,t,n,i,o){return _.deleteWordPartLeft(e,t,n,i,o)||new s.Q(1,1,1,1)},t}(YI),nN=function(e){function t(){return e.call(this,{whitespaceHeuristics:!0,wordNavigationType:1,id:"deleteWordPartRight",precondition:Oe.writable,kbOpts:{kbExpr:Oe.textInputFocus,primary:0,mac:{primary:788},weight:100}})||this}return eN(t,e),t.prototype._delete=function(e,t,n,i,o){var r=_.deleteWordPartRight(e,t,n,i,o);if(r)return r;var a=t.getLineCount(),u=t.getLineMaxColumn(a);return new s.Q(a,u,a,u)},t}(YI),iN=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return eN(t,e),t.prototype._move=function(e,t,n,i){return _.moveWordPartLeft(e,t,n,i)},t}(kI),oN=function(e){function t(){return e.call(this,{inSelectionMode:!1,wordNavigationType:0,id:"cursorWordPartLeft",precondition:null,kbOpts:{kbExpr:Oe.textInputFocus,primary:0,mac:{primary:783},weight:100}})||this}return eN(t,e),t}(iN);k.registerCommandAlias("cursorWordPartStartLeft","cursorWordPartLeft");var rN=function(e){function t(){return e.call(this,{inSelectionMode:!0,wordNavigationType:0,id:"cursorWordPartLeftSelect",precondition:null,kbOpts:{kbExpr:Oe.textInputFocus,primary:0,mac:{primary:1807},weight:100}})||this}return eN(t,e),t}(iN);k.registerCommandAlias("cursorWordPartStartLeftSelect","cursorWordPartLeftSelect");var sN=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return eN(t,e),t.prototype._move=function(e,t,n,i){return _.moveWordPartRight(e,t,n,i)},t}(kI),aN=function(e){function t(){return e.call(this,{inSelectionMode:!1,wordNavigationType:1,id:"cursorWordPartRight",precondition:null,kbOpts:{kbExpr:Oe.textInputFocus,primary:0,mac:{primary:785},weight:100}})||this}return eN(t,e),t}(sN),uN=function(e){function t(){return e.call(this,{inSelectionMode:!0,wordNavigationType:1,id:"cursorWordPartRightSelect",precondition:null,kbOpts:{kbExpr:Oe.textInputFocus,primary:0,mac:{primary:1809},weight:100}})||this}return eN(t,e),t}(sN);Te(new tN),Te(new nN),Te(new oN),Te(new rN),Te(new aN),Te(new uN),n(5676);var lN=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),cN=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},hN=function(e,t){return function(n,i){t(n,i,e)}},dN=new ce("accessibilityHelpWidgetVisible",!1),fN=function(e){function t(t,n){var i=e.call(this)||this;return i._editor=t,i._widget=i._register(n.createInstance(bN,i._editor)),i}return lN(t,e),t.get=function(e){return e.getContribution(t.ID)},t.prototype.getId=function(){return t.ID},t.prototype.show=function(){this._widget.show()},t.prototype.hide=function(){this._widget.hide()},t.ID="editor.contrib.accessibilityHelpController",t=cN([hN(1,N._Y)],t)}(I.jG),pN=o.k("noSelection","No selection"),gN=o.k("singleSelectionRange","Line {0}, Column {1} ({2} selected)"),mN=o.k("singleSelection","Line {0}, Column {1}"),vN=o.k("multiSelectionRange","{0} selections ({1} characters selected)"),yN=o.k("multiSelection","{0} selections"),bN=function(e){function t(t,n,i,r){var s=e.call(this)||this;return s._contextKeyService=n,s._keybindingService=i,s._openerService=r,s._editor=t,s._isVisibleKey=dN.bindTo(s._contextKeyService),s._domNode=Ar(document.createElement("div")),s._domNode.setClassName("accessibilityHelpWidget"),s._domNode.setDisplay("none"),s._domNode.setAttribute("role","dialog"),s._domNode.setAttribute("aria-hidden","true"),s._contentDomNode=Ar(document.createElement("div")),s._contentDomNode.setAttribute("role","document"),s._domNode.appendChild(s._contentDomNode),s._isVisible=!1,s._register(s._editor.onDidLayoutChange((function(){s._isVisible&&s._layout()}))),s._register(hn(s._contentDomNode.domNode,"keydown",(function(e){if(s._isVisible&&(e.equals(2083)&&(Ep(o.k("emergencyConfOn","Now changing the setting `accessibilitySupport` to 'on'.")),s._editor.updateOptions({accessibilitySupport:"on"}),en(s._contentDomNode.domNode),s._buildContent(),s._contentDomNode.domNode.focus(),e.preventDefault(),e.stopPropagation()),e.equals(2086))){Ep(o.k("openingDocs","Now opening the Editor Accessibility documentation page."));var t=s._editor.getRawConfiguration().accessibilityHelpUrl;void 0===t&&(t="https://go.microsoft.com/fwlink/?linkid=852450"),s._openerService.open(L.A.parse(t)),e.preventDefault(),e.stopPropagation()}}))),s.onblur(s._contentDomNode.domNode,(function(){s.hide()})),s._editor.addOverlayWidget(s),s}return lN(t,e),t.prototype.dispose=function(){this._editor.removeOverlayWidget(this),e.prototype.dispose.call(this)},t.prototype.getId=function(){return t.ID},t.prototype.getDomNode=function(){return this._domNode.domNode},t.prototype.getPosition=function(){return{preference:null}},t.prototype.show=function(){this._isVisible||(this._isVisible=!0,this._isVisibleKey.set(!0),this._layout(),this._domNode.setDisplay("block"),this._domNode.setAttribute("aria-hidden","false"),this._contentDomNode.domNode.tabIndex=0,this._buildContent(),this._contentDomNode.domNode.focus())},t.prototype._descriptionForCommand=function(e,t,n){var i=this._keybindingService.lookupKeybinding(e);return i?p.format(t,i.getAriaLabel()):p.format(n,e)},t.prototype._buildContent=function(){var e=this._editor.getConfiguration(),t=this._editor.getSelections(),n=0;if(t){var i=this._editor.getModel();i&&t.forEach((function(e){n+=i.getValueLengthInRange(e)}))}var r=function(e,t){return e&&0!==e.length?1===e.length?t?p.format(gN,e[0].positionLineNumber,e[0].positionColumn,t):p.format(mN,e[0].positionLineNumber,e[0].positionColumn):t?p.format(vN,e.length,t):e.length>0?p.format(yN,e.length):null:pN}(t,n);switch(e.wrappingInfo.inDiffEditor?e.readOnly?r+=o.k("readonlyDiffEditor"," in a read-only pane of a diff editor."):r+=o.k("editableDiffEditor"," in a pane of a diff editor."):e.readOnly?r+=o.k("readonlyEditor"," in a read-only code editor"):r+=o.k("editableEditor"," in a code editor"),e.accessibilitySupport){case 0:var s=B.zx?o.k("changeConfigToOnMac","To configure the editor to be optimized for usage with a Screen Reader press Command+E now."):o.k("changeConfigToOnWinLinux","To configure the editor to be optimized for usage with a Screen Reader press Control+E now.");r+="\n\n - "+s;break;case 2:r+="\n\n - "+o.k("auto_on","The editor is configured to be optimized for usage with a Screen Reader.");break;case 1:r+="\n\n - "+o.k("auto_off","The editor is configured to never be optimized for usage with a Screen Reader, which is not the case at this time."),r+=" "+s}var a=o.k("tabFocusModeOnMsg","Pressing Tab in the current editor will move focus to the next focusable element. Toggle this behavior by pressing {0}."),u=o.k("tabFocusModeOnMsgNoKb","Pressing Tab in the current editor will move focus to the next focusable element. The command {0} is currently not triggerable by a keybinding."),l=o.k("tabFocusModeOffMsg","Pressing Tab in the current editor will insert the tab character. Toggle this behavior by pressing {0}."),c=o.k("tabFocusModeOffMsgNoKb","Pressing Tab in the current editor will insert the tab character. The command {0} is currently not triggerable by a keybinding.");e.tabFocusMode?r+="\n\n - "+this._descriptionForCommand(pI.ID,a,u):r+="\n\n - "+this._descriptionForCommand(pI.ID,l,c),r+="\n\n - "+(B.zx?o.k("openDocMac","Press Command+H now to open a browser window with more information related to editor accessibility."):o.k("openDocWinLinux","Press Control+H now to open a browser window with more information related to editor accessibility.")),r+="\n\n"+o.k("outroMsg","You can dismiss this tooltip and return to the editor by pressing Escape or Shift+Escape."),this._contentDomNode.domNode.appendChild(Lp(r)),this._contentDomNode.domNode.setAttribute("aria-label",r)},t.prototype.hide=function(){this._isVisible&&(this._isVisible=!1,this._isVisibleKey.reset(),this._domNode.setDisplay("none"),this._domNode.setAttribute("aria-hidden","true"),this._contentDomNode.domNode.tabIndex=-1,en(this._contentDomNode.domNode),this._editor.focus())},t.prototype._layout=function(){var e=this._editor.getLayoutInfo(),n=Math.max(5,Math.min(t.WIDTH,e.width-40)),i=Math.max(5,Math.min(t.HEIGHT,e.height-40));this._domNode.setWidth(n),this._domNode.setHeight(i);var o=Math.round((e.height-i)/2);this._domNode.setTop(o);var r=Math.round((e.width-n)/2);this._domNode.setLeft(r)},t.ID="editor.contrib.accessibilityHelpWidget",t.WIDTH=500,t.HEIGHT=300,t=cN([hN(1,he),hN(2,xf),hN(3,z_)],t)}(kc),_N=function(e){function t(){return e.call(this,{id:"editor.action.showAccessibilityHelp",label:o.k("ShowAccessibilityHelpAction","Show Accessibility Help"),alias:"Show Accessibility Help",precondition:null,kbOpts:{kbExpr:Oe.focus,primary:xt?2107:571,weight:100}})||this}return lN(t,e),t.prototype.run=function(e,t){var n=fN.get(t);n&&n.show()},t}(xe);Ae(fN),Ee(_N),Te(new(Ne.bindToContribution(fN.get))({id:"closeAccessibilityHelp",precondition:dN,handler:function(e){return e.hide()},kbOpts:{weight:200,kbExpr:Oe.focus,primary:9,secondary:[1033]}})),Tr((function(e,t){var n=e.getColor(Ps);n&&t.addRule(".monaco-editor .accessibilityHelpWidget { background-color: "+n+"; }");var i=e.getColor(os);i&&t.addRule(".monaco-editor .accessibilityHelpWidget { box-shadow: 0 2px 8px "+i+"; }");var o=e.getColor(es);o&&t.addRule(".monaco-editor .accessibilityHelpWidget { border: 2px solid "+o+"; }")})),n(6336);var wN=(0,N.u1)("themeService"),MN=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),CN=function(e,t){return function(n,i){t(n,i,e)}},SN=function(e){function t(t,n,i){var o=e.call(this)||this;return o._editor=t,o._standaloneThemeService=n,o._modeService=i,o._widget=null,o._register(o._editor.onDidChangeModel((function(e){return o.stop()}))),o._register(o._editor.onDidChangeModelLanguage((function(e){return o.stop()}))),o._register(No.dG.onDidChange((function(e){return o.stop()}))),o}return MN(t,e),t.get=function(e){return e.getContribution(t.ID)},t.prototype.getId=function(){return t.ID},t.prototype.dispose=function(){this.stop(),e.prototype.dispose.call(this)},t.prototype.launch=function(){this._widget||this._editor.getModel()&&(this._widget=new IN(this._editor,this._standaloneThemeService,this._modeService))},t.prototype.stop=function(){this._widget&&(this._widget.dispose(),this._widget=null)},t.ID="editor.contrib.inspectTokens",t=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([CN(1,wN),CN(2,o_)],t)}(I.jG),LN=function(e){function t(){return e.call(this,{id:"editor.action.inspectTokens",label:o.k("inspectTokens","Developer: Inspect Tokens"),alias:"Developer: Inspect Tokens",precondition:null})||this}return MN(t,e),t.prototype.run=function(e,t){var n=SN.get(t);n&&n.launch()},t}(xe),IN=function(e){function t(t,n,i){var o,r=e.call(this)||this;return r.allowEditorOverflow=!0,r._editor=t,r._modeService=i,r._model=r._editor.getModel(),r._domNode=document.createElement("div"),r._domNode.className="tokens-inspect-widget",r._tokenizationSupport=(o=r._model.getLanguageIdentifier(),No.dG.get(o.language)||{getInitialState:function(){return xo.oe},tokenize:function(e,t,n){return(0,xo.$H)(o.language,e,t,n)},tokenize2:function(e,t,n){return(0,xo.T5)(o.id,e,t,n)}}),r._compute(r._editor.getPosition()),r._register(r._editor.onDidChangeCursorPosition((function(e){return r._compute(r._editor.getPosition())}))),r._editor.addContentWidget(r),r}return MN(t,e),t.prototype.dispose=function(){this._editor.removeContentWidget(this),e.prototype.dispose.call(this)},t.prototype.getId=function(){return t._ID},t.prototype._compute=function(e){for(var t=this._getTokensAtLine(e.lineNumber),n=0,i=t.tokens1.length-1;i>=0;i--){var o=t.tokens1[i];if(e.column-1>=o.offset){n=i;break}}var r=0;for(i=t.tokens2.length>>>1;i>=0;i--)if(e.column-1>=t.tokens2[i<<1]){r=i;break}var s="",a=this._model.getLineContent(e.lineNumber),u="";if(n'+function(e){for(var t="",n=0,i=e.length;n('+u.length+" "+(1===u.length?"char":"chars")+")",s+='
    ';var h=this._decodeMetadata(t.tokens2[1+(r<<1)]);s+='',s+='",s+='",s+='",s+='",s+='",s+="",s+='
    ',n'+(0,p.escape)(t.tokens1[n].type)+""),this._domNode.innerHTML=s,this._editor.layoutContentWidget(this)},t.prototype._decodeMetadata=function(e){var t=No.dG.getColorMap(),n=No.xn.getLanguageId(e),i=No.xn.getTokenType(e),o=No.xn.getFontStyle(e),r=No.xn.getForeground(e),s=No.xn.getBackground(e);return{languageIdentifier:this._modeService.getLanguageIdentifier(n),tokenType:i,fontStyle:o,foreground:t[r],background:t[s]}},t.prototype._tokenTypeToString=function(e){switch(e){case 0:return"Other";case 1:return"Comment";case 2:return"String";case 4:return"RegEx"}return"??"},t.prototype._fontStyleToString=function(e){var t="";return 1&e&&(t+="italic "),2&e&&(t+="bold "),4&e&&(t+="underline "),0===t.length&&(t="---"),t},t.prototype._getTokensAtLine=function(e){var t=this._getStateBeforeLine(e),n=this._tokenizationSupport.tokenize(this._model.getLineContent(e),t,0),i=this._tokenizationSupport.tokenize2(this._model.getLineContent(e),t,0);return{startState:t,tokens1:n.tokens,tokens2:i.tokens,endState:n.endState}},t.prototype._getStateBeforeLine=function(e){for(var t=this._tokenizationSupport.getInitialState(),n=1;n0?n.actionBar.push(e,{icon:!0,label:!1}):n.actionBar.isEmpty()||e&&0!==e.length||n.actionBar.clear()})),e instanceof WN&&e.getGroupLabel()?sn(n.container,"has-group-label"):an(n.container,"has-group-label"),e instanceof WN){var o=e,r=n;o.showBorder()?(sn(r.container,"results-group-separator"),r.container.style.borderTopColor=i.pickerGroupBorder.toString()):(an(r.container,"results-group-separator"),r.container.style.borderTopColor=null);var s=o.getGroupLabel()||"";r.group.textContent=s,r.group.style.color=i.pickerGroupForeground.toString()}if(e instanceof zN){var a=e.getHighlights(),u=a[0],l=a[1],c=a[2],h=e.getIcon()?"quick-open-entry-icon "+e.getIcon():"";n.icon.className=h;var d=e.getLabelOptions()||Object.create(null);d.matches=u||[],d.title=e.getTooltip(),d.descriptionTitle=e.getDescriptionTooltip()||e.getDescription(),d.descriptionMatches=l||[],n.label.setValue(e.getLabel(),e.getDescription(),d),n.detail.set(e.getDetail(),c),n.keybinding.set(e.getKeybinding(),null)}},e.prototype.disposeTemplate=function(e,t){var n=t;n.actionBar.dispose(),n.actionBar=null,n.container=null,n.entry=null,n.keybinding.dispose(),n.keybinding=null,n.detail.dispose(),n.detail=null,n.group=null,n.icon=null,n.label.dispose(),n.label=null},e}(),VN=function(){function e(e,t){void 0===e&&(e=[]),void 0===t&&(t=new FN),this._entries=e,this._dataSource=this,this._renderer=new HN(t),this._filter=this,this._runner=this,this._accessibilityProvider=this}return Object.defineProperty(e.prototype,"entries",{get:function(){return this._entries},set:function(e){this._entries=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"dataSource",{get:function(){return this._dataSource},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"renderer",{get:function(){return this._renderer},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"filter",{get:function(){return this._filter},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"runner",{get:function(){return this._runner},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"accessibilityProvider",{get:function(){return this._accessibilityProvider},enumerable:!0,configurable:!0}),e.prototype.getId=function(e){return e.getId()},e.prototype.getLabel=function(e){return e.getLabel()},e.prototype.getAriaLabel=function(e){return e.getAriaLabel()?o.k("quickOpenAriaLabelEntry","{0}, picker",e.getAriaLabel()):o.k("quickOpenAriaLabel","picker")},e.prototype.isVisible=function(e){return!e.isHidden()},e.prototype.run=function(e,t,n){return e.run(t,n)},e}();!function(e){e[e.PREVIEW=0]="PREVIEW",e[e.OPEN=1]="OPEN",e[e.OPEN_IN_BACKGROUND=2]="OPEN_IN_BACKGROUND"}(AN||(AN={})),n(6173);var UN,YN=function(){function e(e){this.modelProvider=(0,w.Tn)(e.getModel)?e:{getModel:function(){return e}}}return e.prototype.getId=function(e,t){if(!t)return null;var n=this.modelProvider.getModel();return n===t?"__root__":n.dataSource.getId(t)},e.prototype.hasChildren=function(e,t){var n=this.modelProvider.getModel();return n&&n===t&&n.entries.length>0},e.prototype.getChildren=function(e,t){var n=this.modelProvider.getModel();return J.g3.as(n===t?n.entries:[])},e.prototype.getParent=function(e,t){return J.g3.as(null)},e}(),ZN=function(){function e(e){this.modelProvider=e}return e.prototype.getAriaLabel=function(e,t){var n=this.modelProvider.getModel();return n.accessibilityProvider&&n.accessibilityProvider.getAriaLabel(t)},e.prototype.getPosInSet=function(e,t){var n=this.modelProvider.getModel();return String(n.entries.indexOf(t)+1)},e.prototype.getSetSize=function(){var e=this.modelProvider.getModel();return String(e.entries.length)},e}(),GN=function(){function e(e){this.modelProvider=e}return e.prototype.isVisible=function(e,t){var n=this.modelProvider.getModel();return!n.filter||n.filter.isVisible(t)},e}(),QN=function(){function e(e,t){this.modelProvider=e,this.styles=t}return e.prototype.updateStyles=function(e){this.styles=e},e.prototype.getHeight=function(e,t){return this.modelProvider.getModel().renderer.getHeight(t)},e.prototype.getTemplateId=function(e,t){return this.modelProvider.getModel().renderer.getTemplateId(t)},e.prototype.renderTemplate=function(e,t,n){return this.modelProvider.getModel().renderer.renderTemplate(t,n,this.styles)},e.prototype.renderElement=function(e,t,n,i){this.modelProvider.getModel().renderer.renderElement(t,n,i,this.styles)},e.prototype.disposeTemplate=function(e,t,n){this.modelProvider.getModel().renderer.disposeTemplate(t,n)},e}(),qN=(n(1825),function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}()),KN="infinite",JN={progressBarBackground:Go.fromHex("#0E70C0")},XN=function(e){function t(t,n){var i=e.call(this)||this;return i.options=n||Object.create(null),(0,ri.co)(i.options,JN,!1),i.workedVal=0,i.progressBarBackground=i.options.progressBarBackground,i.create(t),i}return qN(t,e),t.prototype.create=function(e){var t=this;Zh(e).div({class:"monaco-progress-container"},(function(e){t.element=e.clone(),e.div({class:"progress-bit"}).on([Un.ANIMATION_START,Un.ANIMATION_END,Un.ANIMATION_ITERATION],(function(e){e.type===Un.ANIMATION_ITERATION&&t.animationStopToken&&t.animationStopToken(null)}),t.toDispose),t.bit=e.getHTMLElement()})),this.applyStyles()},t.prototype.off=function(){this.bit.style.width="inherit",this.bit.style.opacity="1",this.element.removeClass("active"),this.element.removeClass(KN),this.element.removeClass("discrete"),this.workedVal=0,this.totalWork=void 0},t.prototype.stop=function(){return this.doDone(!1)},t.prototype.doDone=function(e){var t=this;return this.element.addClass("done"),this.element.hasClass(KN)?(this.bit.style.opacity="0",e?J.g3.timeout(200).then((function(){return t.off()})):this.off()):(this.bit.style.width="inherit",e?J.g3.timeout(200).then((function(){return t.off()})):this.off()),this},t.prototype.hide=function(){this.element.hide()},t.prototype.style=function(e){this.progressBarBackground=e.progressBarBackground,this.applyStyles()},t.prototype.applyStyles=function(){if(this.bit){var e=this.progressBarBackground?this.progressBarBackground.toString():null;this.bit.style.backgroundColor=e}},t}(I.jG),$N=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),ex=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return $N(t,e),t.prototype.onContextMenu=function(t,n,i){return B.zx?this.onLeftClick(t,n,i):e.prototype.onContextMenu.call(this,t,n,i)},t}(sy);!function(e){e[e.ELEMENT_SELECTED=0]="ELEMENT_SELECTED",e[e.FOCUS_LOST=1]="FOCUS_LOST",e[e.CANCELED=2]="CANCELED"}(UN||(UN={}));var tx={background:Go.fromHex("#1E1E1E"),foreground:Go.fromHex("#CCCCCC"),pickerGroupForeground:Go.fromHex("#0097FB"),pickerGroupBorder:Go.fromHex("#3F3F46"),widgetShadow:Go.fromHex("#000000"),progressBarBackground:Go.fromHex("#0E70C0")},nx=o.k("quickOpenAriaLabel","Quick picker. Type to narrow down results."),ix=function(e){function t(t,n,i){var o=e.call(this)||this;return o.isDisposed=!1,o.container=t,o.callbacks=n,o.options=i,o.styles=i||Object.create(null),(0,ri.co)(o.styles,tx,!1),o.model=null,o}return $N(t,e),t.prototype.getModel=function(){return this.model},t.prototype.create=function(){var e=this;return this.builder=Zh().div((function(t){t.on(Un.KEY_DOWN,(function(t){var n=new Bt(t);if(9===n.keyCode)Yn(t,!0),e.hide(UN.CANCELED);else if(2===n.keyCode&&!n.altKey&&!n.ctrlKey&&!n.metaKey){var i=t.currentTarget.querySelectorAll("input, .monaco-tree, .monaco-tree-row.focused .action-label.icon");n.shiftKey&&n.target===i[0]?(Yn(t,!0),i[i.length-1].focus()):n.shiftKey||n.target!==i[i.length-1]||(Yn(t,!0),i[0].focus())}})).on(Un.CONTEXT_MENU,(function(e){return Yn(e,!0)})).on(Un.FOCUS,(function(t){return e.gainingFocus()}),null,!0).on(Un.BLUR,(function(t){return e.loosingFocus(t)}),null,!0),e.progressBar=e._register(new XN(t.clone(),{progressBarBackground:e.styles.progressBarBackground})),e.progressBar.hide(),t.div({class:"quick-open-input"},(function(t){e.inputContainer=t,e.inputBox=e._register(new Xp(t.getHTMLElement(),null,{placeholder:e.options.inputPlaceHolder||"",ariaLabel:nx,inputBackground:e.styles.inputBackground,inputForeground:e.styles.inputForeground,inputBorder:e.styles.inputBorder,inputValidationInfoBackground:e.styles.inputValidationInfoBackground,inputValidationInfoBorder:e.styles.inputValidationInfoBorder,inputValidationWarningBackground:e.styles.inputValidationWarningBackground,inputValidationWarningBorder:e.styles.inputValidationWarningBorder,inputValidationErrorBackground:e.styles.inputValidationErrorBackground,inputValidationErrorBorder:e.styles.inputValidationErrorBorder})),e.inputElement=e.inputBox.inputElement,e.inputElement.setAttribute("role","combobox"),e.inputElement.setAttribute("aria-haspopup","false"),e.inputElement.setAttribute("aria-autocomplete","list"),cn(e.inputBox.inputElement,Un.KEY_DOWN,(function(t){var n=new Bt(t),i=e.shouldOpenInBackground(n);if(2!==n.keyCode)if(18===n.keyCode||16===n.keyCode||12===n.keyCode||11===n.keyCode)Yn(t,!0),e.navigateInTree(n.keyCode,n.shiftKey),e.inputBox.inputElement.selectionStart===e.inputBox.inputElement.selectionEnd&&(e.inputBox.inputElement.selectionStart=e.inputBox.value.length);else if(3===n.keyCode||i){Yn(t,!0);var o=e.tree.getFocus();o&&e.elementSelected(o,t,i?AN.OPEN_IN_BACKGROUND:AN.OPEN)}})),cn(e.inputBox.inputElement,Un.INPUT,(function(t){e.onType()}))})),e.resultCount=t.div({class:"quick-open-result-count","aria-live":"polite"}).clone(),e.treeContainer=t.div({class:"quick-open-tree"},(function(t){var n=e.options.treeCreator||function(e,t,n){return new Yy(e,t,n)};e.tree=e._register(n(t.getHTMLElement(),{dataSource:new YN(e),controller:new ex({clickBehavior:ty.ON_MOUSE_UP,keyboardSupport:e.options.keyboardSupport}),renderer:e.renderer=new QN(e,e.styles),filter:new GN(e),accessibilityProvider:new ZN(e)},{twistiePixels:11,indentPixels:0,alwaysFocused:!0,verticalScrollMode:gr.XR.Visible,horizontalScrollMode:gr.XR.Hidden,ariaLabel:o.k("treeAriaLabel","Quick Picker"),keyboardSupport:e.options.keyboardSupport,preventRootFocus:!1})),e.treeElement=e.tree.getHTMLElement(),e._register(e.tree.onDidChangeFocus((function(t){e.elementFocused(t.focus,t)}))),e._register(e.tree.onDidChangeSelection((function(t){if(t.selection&&t.selection.length>0){var n=t.payload&&t.payload.originalEvent instanceof Qt?t.payload.originalEvent:void 0,i=!!n&&e.shouldOpenInBackground(n);e.elementSelected(t.selection[0],t,i?AN.OPEN_IN_BACKGROUND:AN.OPEN)}})))})).on(Un.KEY_DOWN,(function(t){var n=new Bt(t);e.quickNavigateConfiguration&&(18!==n.keyCode&&16!==n.keyCode&&12!==n.keyCode&&11!==n.keyCode||(Yn(t,!0),e.navigateInTree(n.keyCode)))})).on(Un.KEY_UP,(function(t){var n=new Bt(t),i=n.keyCode;if(e.quickNavigateConfiguration){var o=e.quickNavigateConfiguration.keybindings,r=3===i||o.some((function(e){var t=e.getParts(),o=t[0];return!(t[1]||(o.shiftKey&&4===i?n.ctrlKey||n.altKey||n.metaKey:!(o.altKey&&6===i||o.ctrlKey&&5===i||o.metaKey&&57===i)))}));if(r){var s=e.tree.getFocus();s&&e.elementSelected(s,t)}}})).clone()})).addClass("monaco-quick-open-widget").build(this.container),this.layoutDimensions&&this.layout(this.layoutDimensions),this.applyStyles(),cn(this.treeContainer.getHTMLElement(),Un.KEY_DOWN,(function(t){var n=new Bt(t);e.quickNavigateConfiguration||18!==n.keyCode&&16!==n.keyCode&&12!==n.keyCode&&11!==n.keyCode||(Yn(t,!0),e.navigateInTree(n.keyCode,n.shiftKey),e.treeElement.focus())})),this.builder.getHTMLElement()},t.prototype.style=function(e){this.styles=e,this.applyStyles()},t.prototype.applyStyles=function(){if(this.builder){var e=this.styles.foreground?this.styles.foreground.toString():null,t=this.styles.background?this.styles.background.toString():null,n=this.styles.borderColor?this.styles.borderColor.toString():null,i=this.styles.widgetShadow?this.styles.widgetShadow.toString():null;this.builder.style("color",e),this.builder.style("background-color",t),this.builder.style("border-color",n),this.builder.style("border-width",n?"1px":null),this.builder.style("border-style",n?"solid":null),this.builder.style("box-shadow",i?"0 5px 8px "+i:null)}this.progressBar&&this.progressBar.style({progressBarBackground:this.styles.progressBarBackground}),this.inputBox&&this.inputBox.style({inputBackground:this.styles.inputBackground,inputForeground:this.styles.inputForeground,inputBorder:this.styles.inputBorder,inputValidationInfoBackground:this.styles.inputValidationInfoBackground,inputValidationInfoBorder:this.styles.inputValidationInfoBorder,inputValidationWarningBackground:this.styles.inputValidationWarningBackground,inputValidationWarningBorder:this.styles.inputValidationWarningBorder,inputValidationErrorBackground:this.styles.inputValidationErrorBackground,inputValidationErrorBorder:this.styles.inputValidationErrorBorder}),this.tree&&!this.options.treeCreator&&this.tree.style(this.styles),this.renderer&&this.renderer.updateStyles(this.styles)},t.prototype.shouldOpenInBackground=function(e){if(e instanceof Bt){if(17!==e.keyCode)return!1;if(e.metaKey||e.ctrlKey||e.shiftKey||e.altKey)return!1;var t=this.inputBox.inputElement;return t.selectionEnd===this.inputBox.value.length&&t.selectionStart===t.selectionEnd}return e.middleButton},t.prototype.onType=function(){var e=this.inputBox.value;this.helpText&&(e?this.helpText.hide():this.helpText.show()),this.callbacks.onType(e)},t.prototype.navigateInTree=function(e,t){var n=this.tree.getInput(),i=n?n.entries:[],o=this.tree.getFocus();switch(e){case 18:this.tree.focusNext();break;case 16:this.tree.focusPrevious();break;case 12:this.tree.focusNextPage();break;case 11:this.tree.focusPreviousPage();break;case 2:t?this.tree.focusPrevious():this.tree.focusNext()}var r=this.tree.getFocus();i.length>1&&o===r&&(16===e||2===e&&t?this.tree.focusLast():(18===e||2===e&&!t)&&this.tree.focusFirst()),(r=this.tree.getFocus())&&this.tree.reveal(r).done(null,S.dz)},t.prototype.elementFocused=function(e,t){if(e&&this.isVisible()){this.inputElement.setAttribute("aria-activedescendant",this.treeElement.getAttribute("aria-activedescendant"));var n={event:t,keymods:this.extractKeyMods(t),quickNavigateConfiguration:this.quickNavigateConfiguration};this.model.runner.run(e,AN.PREVIEW,n)}},t.prototype.elementSelected=function(e,t,n){var i=!0;if(this.isVisible()){var o=n||AN.OPEN,r={event:t,keymods:this.extractKeyMods(t),quickNavigateConfiguration:this.quickNavigateConfiguration};i=this.model.runner.run(e,o,r)}i&&this.hide(UN.ELEMENT_SELECTED)},t.prototype.extractKeyMods=function(e){return{ctrlCmd:e&&(e.ctrlKey||e.metaKey||e.payload&&e.payload.originalEvent&&(e.payload.originalEvent.ctrlKey||e.payload.originalEvent.metaKey)),alt:e&&(e.altKey||e.payload&&e.payload.originalEvent&&e.payload.originalEvent.altKey)}},t.prototype.show=function(e,t){this.visible=!0,this.isLoosingFocus=!1,this.quickNavigateConfiguration=t?t.quickNavigateConfiguration:void 0,this.quickNavigateConfiguration?(this.inputContainer.hide(),this.builder.show(),this.tree.domFocus()):(this.inputContainer.show(),this.builder.show(),this.inputBox.focus()),this.helpText&&(this.quickNavigateConfiguration||w.Kg(e)?this.helpText.hide():this.helpText.show()),w.Kg(e)?this.doShowWithPrefix(e):this.doShowWithInput(e,t&&t.autoFocus?t.autoFocus:{}),t&&t.inputSelection&&!this.quickNavigateConfiguration&&this.inputBox.select(t.inputSelection),this.callbacks.onShow&&this.callbacks.onShow()},t.prototype.doShowWithPrefix=function(e){this.inputBox.value=e,this.callbacks.onType(e)},t.prototype.doShowWithInput=function(e,t){this.setInput(e,t)},t.prototype.setInputAndLayout=function(e,t){var n=this;this.treeContainer.style({height:this.getHeight(e)+"px"}),this.tree.setInput(null).then((function(){return n.model=e,n.inputElement.setAttribute("aria-haspopup",String(e&&e.entries&&e.entries.length>0)),n.tree.setInput(e)})).done((function(){n.tree.layout();var i=e?e.entries.filter((function(t){return n.isElementVisible(e,t)})):[];n.updateResultCount(i.length),i.length&&n.autoFocus(e,i,t)}),S.dz)},t.prototype.isElementVisible=function(e,t){return!e.filter||e.filter.isVisible(t)},t.prototype.autoFocus=function(e,t,n){if(void 0===n&&(n={}),n.autoFocusPrefixMatch){for(var i=void 0,o=void 0,r=n.autoFocusPrefixMatch,s=r.toLowerCase(),a=0;an.autoFocusIndex&&(this.tree.focusNth(n.autoFocusIndex),this.tree.reveal(this.tree.getFocus()).done(null,S.dz)):n.autoFocusSecondEntry?t.length>1&&this.tree.focusNth(1):n.autoFocusLastEntry&&t.length>1&&this.tree.focusLast()},t.prototype.getHeight=function(e){var n=this,i=e.renderer;if(!e){var o=i.getHeight(null);return this.options.minItemsToShow?this.options.minItemsToShow*o:0}var r,s=0;this.layoutDimensions&&this.layoutDimensions.height&&(r=.4*(this.layoutDimensions.height-50)),(!r||r>t.MAX_ITEMS_HEIGHT)&&(r=t.MAX_ITEMS_HEIGHT);for(var a=e.entries.filter((function(t){return n.isElementVisible(e,t)})),u=this.options.maxItemsToShow||a.length,l=0;l=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([(t=1,n=Lr,function(e,i){n(e,i,t)})],e);var t,n}(),ax=function(e){function t(t,n){var i=e.call(this,n)||this;return i._inputAriaLabel=t,i}return rx(t,e),t.prototype.getController=function(e){return sx.get(e)},t.prototype._show=function(e,t){e.run({inputAriaLabel:this._inputAriaLabel,getModel:function(e){return t.getModel(e)},getAutoFocus:function(e){return t.getAutoFocus(e)}})},t}(xe);function ux(e){var t=[],n=No.Wd.all(e).map((function(n){return pt((function(t){return n.provideDocumentSymbols(e,t)})).then((function(e){Array.isArray(e)&&t.push.apply(t,e)}),(function(e){(0,S.M_)(e)}))}));return J.g3.join(n).then((function(){var e=[];return cx(e,t,""),e.sort(lx),e}))}function lx(e,t){return s.Q.compareRangesUsingStarts(e.range,t.range)}function cx(e,t,n){for(var i=0,o=t;i0&&0===n.indexOf(dx)){var d=null,f=null,g=0;for(a=0;a0)):g++}f&&f.setGroupLabel(this.typeToLabel(d,g))}else r.length>0&&r[0].setGroupLabel(o.k("symbols","symbols ({0})",r.length));return r},t.prototype.typeToLabel=function(e,t){switch(e){case"module":return o.k("modules","modules ({0})",t);case"class":return o.k("class","classes ({0})",t);case"interface":return o.k("interface","interfaces ({0})",t);case"method":return o.k("method","methods ({0})",t);case"function":return o.k("function","functions ({0})",t);case"property":return o.k("property","properties ({0})",t);case"variable":return o.k("variable","variables ({0})",t);case"var":return o.k("variable2","variables ({0})",t);case"constructor":return o.k("_constructor","constructors ({0})",t);case"call":return o.k("call","calls ({0})",t)}return e},t.prototype.sortNormal=function(e,t,n){var i=t.getLabel().toLowerCase(),o=n.getLabel().toLowerCase(),r=i.localeCompare(o);if(0!==r)return r;var s=t.getRange(),a=n.getRange();return s.startLineNumber-a.startLineNumber},t.prototype.sortScoped=function(e,t,n){e=e.substr(1);var i=t.getType(),o=n.getType(),r=i.localeCompare(o);if(0!==r)return r;if(e){var s=t.getLabel().toLowerCase(),a=n.getLabel().toLowerCase(),u=s.localeCompare(a);if(0!==u)return u}var l=t.getRange(),c=n.getRange();return l.startLineNumber-c.startLineNumber},t}(ax);Ee(px),n(2114);var gx=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),mx=function(e){function t(t,n,i){var o=e.call(this)||this;return o.editor=n,o.decorator=i,o._parseResult=o._parseInput(t),o}return gx(t,e),t.prototype._parseInput=function(e){var t,n,i=e.split(",").map((function(e){return parseInt(e,10)})).filter((function(e){return!isNaN(e)}));t=0===i.length?new r.y(-1,-1):1===i.length?new r.y(i[0],1):new r.y(i[0],i[1]);var s=(n=uu(this.editor)?this.editor.getModel():this.editor.getModel().modified).validatePosition(t).equals(t);return{position:t,isValid:s,label:s?t.column&&t.column>1?o.k("gotoLineLabelValidLineAndColumn","Go to line {0} and character {1}",t.lineNumber,t.column):o.k("gotoLineLabelValidLine","Go to line {0}",t.lineNumber,t.column):t.lineNumber<1||t.lineNumber>n.getLineCount()?o.k("gotoLineLabelEmptyWithLineLimit","Type a line number between 1 and {0} to navigate to",n.getLineCount()):o.k("gotoLineLabelEmptyWithLineAndColumnLimit","Type a character between 1 and {0} to navigate to",n.getLineMaxColumn(t.lineNumber))}},t.prototype.getLabel=function(){return this._parseResult.label},t.prototype.getAriaLabel=function(){return o.k("gotoLineAriaLabel","Go to line {0}",this._parseResult.label)},t.prototype.run=function(e,t){return e===AN.OPEN?this.runOpen():this.runPreview()},t.prototype.runOpen=function(){if(!this._parseResult.isValid)return!1;var e=this.toSelection();return this.editor.setSelection(e),this.editor.revealRangeInCenter(e,0),this.editor.focus(),!0},t.prototype.runPreview=function(){if(!this._parseResult.isValid)return this.decorator.clearDecorations(),!1;var e=this.toSelection();return this.editor.revealRangeInCenter(e,0),this.decorator.decorateLine(e,this.editor),!1},t.prototype.toSelection=function(){return new s.Q(this._parseResult.position.lineNumber,this._parseResult.position.column,this._parseResult.position.lineNumber,this._parseResult.position.column)},t}(zN);Ee(function(e){function t(){return e.call(this,o.k("gotoLineActionInput","Type a line number, followed by an optional colon and a character number to navigate to"),{id:"editor.action.gotoLine",label:o.k("GotoLineAction.label","Go to Line..."),alias:"Go to Line...",precondition:null,kbOpts:{kbExpr:Oe.focus,primary:2085,mac:{primary:293},weight:100}})||this}return gx(t,e),t.prototype.run=function(e,t){var n=this;this._show(this.getController(t),{getModel:function(e){return new VN([new mx(e,t,n.getController(t))])},getAutoFocus:function(e){return{autoFocusFirstEntry:e.length>0}}})},t}(ax));var vx=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),yx=function(e){function t(t,n,i,o){var r=e.call(this)||this;return r.key=t,r.setHighlights(n),r.action=i,r.editor=o,r}return vx(t,e),t.prototype.getLabel=function(){return this.action.label},t.prototype.getAriaLabel=function(){return o.k("ariaLabelEntry","{0}, commands",this.getLabel())},t.prototype.getGroupLabel=function(){return this.key},t.prototype.run=function(e,t){var n=this;return e===AN.OPEN&&(J.g3.timeout(50).done((function(){n.editor.focus();try{(n.action.run()||J.g3.as(null)).done(null,S.dz)}catch(e){(0,S.dz)(e)}}),S.dz),!0)},t}(WN),bx=function(e){function t(){return e.call(this,o.k("quickCommandActionInput","Type the name of an action you want to execute"),{id:"editor.action.quickCommand",label:o.k("QuickCommandAction.label","Command Palette"),alias:"Command Palette",precondition:null,kbOpts:{kbExpr:Oe.focus,primary:xt?571:59,weight:100},menuOpts:{group:"z_commands",order:1}})||this}return vx(t,e),t.prototype.run=function(e,t){var n=this,i=e.get(xf);this._show(this.getController(t),{getModel:function(e){return new VN(n._editorActionsToEntries(i,t,e))},getAutoFocus:function(e){return{autoFocusFirstEntry:!0,autoFocusPrefixMatch:e}}})},t.prototype._sort=function(e,t){var n=e.getLabel().toLowerCase(),i=t.getLabel().toLowerCase();return n.localeCompare(i)},t.prototype._editorActionsToEntries=function(e,t,n){for(var i=t.getSupportedActions(),o=[],r=0;r=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([Mx(1,he),Mx(2,Ce),Mx(3,Cr),Mx(4,N._Y),Mx(5,dp),Mx(6,uf)],t)}(Fb);Ae(Cx);var Sx,Lx,Ix=n(5752);!function(e){e[e.Unnecessary=1]="Unnecessary"}(Sx||(Sx={})),function(e){e[e.Hint=1]="Hint",e[e.Info=2]="Info",e[e.Warning=4]="Warning",e[e.Error=8]="Error"}(Lx||(Lx={}));var Nx,xx=function(){function e(){}return e.chord=function(e,t){return O(e,t)},e.CtrlCmd=2048,e.Shift=1024,e.Alt=512,e.WinCtrl=256,e}();function Dx(){return{editor:void 0,languages:void 0,CancellationTokenSource:lt,Emitter:X.vl,KeyCode:Nx,KeyMod:xx,Position:r.y,Range:s.Q,Selection:Be.L,SelectionDirection:Be.S,MarkerSeverity:Lx,MarkerTag:Sx,Promise:J.g3,Uri:L.A,Token:Ix.ou}}!function(e){e[e.Unknown=0]="Unknown",e[e.Backspace=1]="Backspace",e[e.Tab=2]="Tab",e[e.Enter=3]="Enter",e[e.Shift=4]="Shift",e[e.Ctrl=5]="Ctrl",e[e.Alt=6]="Alt",e[e.PauseBreak=7]="PauseBreak",e[e.CapsLock=8]="CapsLock",e[e.Escape=9]="Escape",e[e.Space=10]="Space",e[e.PageUp=11]="PageUp",e[e.PageDown=12]="PageDown",e[e.End=13]="End",e[e.Home=14]="Home",e[e.LeftArrow=15]="LeftArrow",e[e.UpArrow=16]="UpArrow",e[e.RightArrow=17]="RightArrow",e[e.DownArrow=18]="DownArrow",e[e.Insert=19]="Insert",e[e.Delete=20]="Delete",e[e.KEY_0=21]="KEY_0",e[e.KEY_1=22]="KEY_1",e[e.KEY_2=23]="KEY_2",e[e.KEY_3=24]="KEY_3",e[e.KEY_4=25]="KEY_4",e[e.KEY_5=26]="KEY_5",e[e.KEY_6=27]="KEY_6",e[e.KEY_7=28]="KEY_7",e[e.KEY_8=29]="KEY_8",e[e.KEY_9=30]="KEY_9",e[e.KEY_A=31]="KEY_A",e[e.KEY_B=32]="KEY_B",e[e.KEY_C=33]="KEY_C",e[e.KEY_D=34]="KEY_D",e[e.KEY_E=35]="KEY_E",e[e.KEY_F=36]="KEY_F",e[e.KEY_G=37]="KEY_G",e[e.KEY_H=38]="KEY_H",e[e.KEY_I=39]="KEY_I",e[e.KEY_J=40]="KEY_J",e[e.KEY_K=41]="KEY_K",e[e.KEY_L=42]="KEY_L",e[e.KEY_M=43]="KEY_M",e[e.KEY_N=44]="KEY_N",e[e.KEY_O=45]="KEY_O",e[e.KEY_P=46]="KEY_P",e[e.KEY_Q=47]="KEY_Q",e[e.KEY_R=48]="KEY_R",e[e.KEY_S=49]="KEY_S",e[e.KEY_T=50]="KEY_T",e[e.KEY_U=51]="KEY_U",e[e.KEY_V=52]="KEY_V",e[e.KEY_W=53]="KEY_W",e[e.KEY_X=54]="KEY_X",e[e.KEY_Y=55]="KEY_Y",e[e.KEY_Z=56]="KEY_Z",e[e.Meta=57]="Meta",e[e.ContextMenu=58]="ContextMenu",e[e.F1=59]="F1",e[e.F2=60]="F2",e[e.F3=61]="F3",e[e.F4=62]="F4",e[e.F5=63]="F5",e[e.F6=64]="F6",e[e.F7=65]="F7",e[e.F8=66]="F8",e[e.F9=67]="F9",e[e.F10=68]="F10",e[e.F11=69]="F11",e[e.F12=70]="F12",e[e.F13=71]="F13",e[e.F14=72]="F14",e[e.F15=73]="F15",e[e.F16=74]="F16",e[e.F17=75]="F17",e[e.F18=76]="F18",e[e.F19=77]="F19",e[e.NumLock=78]="NumLock",e[e.ScrollLock=79]="ScrollLock",e[e.US_SEMICOLON=80]="US_SEMICOLON",e[e.US_EQUAL=81]="US_EQUAL",e[e.US_COMMA=82]="US_COMMA",e[e.US_MINUS=83]="US_MINUS",e[e.US_DOT=84]="US_DOT",e[e.US_SLASH=85]="US_SLASH",e[e.US_BACKTICK=86]="US_BACKTICK",e[e.US_OPEN_SQUARE_BRACKET=87]="US_OPEN_SQUARE_BRACKET",e[e.US_BACKSLASH=88]="US_BACKSLASH",e[e.US_CLOSE_SQUARE_BRACKET=89]="US_CLOSE_SQUARE_BRACKET",e[e.US_QUOTE=90]="US_QUOTE",e[e.OEM_8=91]="OEM_8",e[e.OEM_102=92]="OEM_102",e[e.NUMPAD_0=93]="NUMPAD_0",e[e.NUMPAD_1=94]="NUMPAD_1",e[e.NUMPAD_2=95]="NUMPAD_2",e[e.NUMPAD_3=96]="NUMPAD_3",e[e.NUMPAD_4=97]="NUMPAD_4",e[e.NUMPAD_5=98]="NUMPAD_5",e[e.NUMPAD_6=99]="NUMPAD_6",e[e.NUMPAD_7=100]="NUMPAD_7",e[e.NUMPAD_8=101]="NUMPAD_8",e[e.NUMPAD_9=102]="NUMPAD_9",e[e.NUMPAD_MULTIPLY=103]="NUMPAD_MULTIPLY",e[e.NUMPAD_ADD=104]="NUMPAD_ADD",e[e.NUMPAD_SEPARATOR=105]="NUMPAD_SEPARATOR",e[e.NUMPAD_SUBTRACT=106]="NUMPAD_SUBTRACT",e[e.NUMPAD_DECIMAL=107]="NUMPAD_DECIMAL",e[e.NUMPAD_DIVIDE=108]="NUMPAD_DIVIDE",e[e.KEY_IN_COMPOSITION=109]="KEY_IN_COMPOSITION",e[e.ABNT_C1=110]="ABNT_C1",e[e.ABNT_C2=111]="ABNT_C2",e[e.MAX_VALUE=112]="MAX_VALUE"}(Nx||(Nx={})),n(1121);var kx=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Tx=function(e){function t(t,n,i,o,r){var s=e.call(this)||this;return s._contextKeyService=t,s._commandService=n,s._telemetryService=i,s._statusService=r,s._notificationService=o,s._currentChord=null,s._currentChordChecker=new Mt,s._currentChordStatusMessage=null,s._onDidUpdateKeybindings=s._register(new X.vl),s}return kx(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this)},Object.defineProperty(t.prototype,"onDidUpdateKeybindings",{get:function(){return this._onDidUpdateKeybindings?this._onDidUpdateKeybindings.event:X.Jh.None},enumerable:!0,configurable:!0}),t.prototype.lookupKeybinding=function(e){var t=this._getResolver().lookupPrimaryKeybinding(e);return t?t.resolvedKeybinding:null},t.prototype._enterChordMode=function(e,t){var n=this;this._currentChord={keypress:e,label:t},this._statusService&&(this._currentChordStatusMessage=this._statusService.setStatusMessage(o.k("first.chord","({0}) was pressed. Waiting for second key of chord...",t)));var i=Date.now();this._currentChordChecker.cancelAndSet((function(){n._documentHasFocus()?Date.now()-i>5e3&&n._leaveChordMode():n._leaveChordMode()}),500)},t.prototype._leaveChordMode=function(){this._currentChordStatusMessage&&(this._currentChordStatusMessage.dispose(),this._currentChordStatusMessage=null),this._currentChordChecker.cancel(),this._currentChord=null},t.prototype._dispatch=function(e,t){var n=this,i=!1,r=this.resolveKeyboardEvent(e);if(r.isChord())return console.warn("Unexpected keyboard event mapped to a chord"),null;var s=r.getDispatchParts()[0];if(null===s)return i;var a=this._contextKeyService.getContext(t),u=this._currentChord?this._currentChord.keypress:null,l=r.getLabel(),c=this._getResolver().resolve(a,u,s);return c&&c.enterChord?(i=!0,this._enterChordMode(s,l),i):(this._statusService&&this._currentChord&&(c&&c.commandId||(this._statusService.setStatusMessage(o.k("missing.chord","The key combination ({0}, {1}) is not a command.",this._currentChord.label,l),1e4),i=!0)),this._leaveChordMode(),c&&c.commandId&&(c.bubble||(i=!0),void 0===c.commandArgs?this._commandService.executeCommand(c.commandId).done(void 0,(function(e){return n._notificationService.warn(e)})):this._commandService.executeCommand(c.commandId,c.commandArgs).done(void 0,(function(e){return n._notificationService.warn(e)})),this._telemetryService.publicLog("workbenchActionExecuted",{id:c.commandId,from:"keybinding"})),i)},t}(I.jG),Ex=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Ax=function(e){function t(t,n){var i=e.call(this)||this;if(i._os=n,null===t)throw new Error("Invalid USLayoutResolvedKeybinding");return 2===t.type?(i._firstPart=t.firstPart,i._chordPart=t.chordPart):(i._firstPart=t,i._chordPart=null),i}return Ex(t,e),t.prototype._keyCodeToUILabel=function(e){if(2===this._os)switch(e){case 15:return"←";case 16:return"↑";case 17:return"→";case 18:return"↓"}return C.toString(e)},t.prototype._getUILabelForKeybinding=function(e){return e?e.isDuplicateModifierCase()?"":this._keyCodeToUILabel(e.keyCode):null},t.prototype.getLabel=function(){var e=this._getUILabelForKeybinding(this._firstPart),t=this._getUILabelForKeybinding(this._chordPart);return kN.toLabel(this._firstPart,e,this._chordPart,t,this._os)},t.prototype._getAriaLabelForKeybinding=function(e){return e?e.isDuplicateModifierCase()?"":C.toString(e.keyCode):null},t.prototype.getAriaLabel=function(){var e=this._getAriaLabelForKeybinding(this._firstPart),t=this._getAriaLabelForKeybinding(this._chordPart);return TN.toLabel(this._firstPart,e,this._chordPart,t,this._os)},t.prototype.isChord=function(){return!!this._chordPart},t.prototype.getParts=function(){return[this._toResolvedKeybindingPart(this._firstPart),this._toResolvedKeybindingPart(this._chordPart)]},t.prototype._toResolvedKeybindingPart=function(e){return e?new F(e.ctrlKey,e.shiftKey,e.altKey,e.metaKey,this._getUILabelForKeybinding(e),this._getAriaLabelForKeybinding(e)):null},t.prototype.getDispatchParts=function(){return[this._firstPart?t.getDispatchStr(this._firstPart):null,this._chordPart?t.getDispatchStr(this._chordPart):null]},t.getDispatchStr=function(e){if(e.isModifierKey())return null;var t="";return e.ctrlKey&&(t+="ctrl+"),e.shiftKey&&(t+="shift+"),e.altKey&&(t+="alt+"),e.metaKey&&(t+="meta+"),t+C.toString(e.keyCode)},t}((function(){})),jx=function(){function e(t,n){this._defaultKeybindings=t,this._defaultBoundCommands=new Map;for(var i=0,o=t.length;i=0;c--)this._isTargetedForRemoval(e[c],a,u,s,l)&&e.splice(c,1);else n.push(r)}return e.concat(n)},e.prototype._addKeyPress=function(t,n){var i=this._map.get(t);if(void 0===i)return this._map.set(t,[n]),void this._addToLookupMap(n);for(var o=i.length-1;o>=0;o--){var r=i[o];if(r.command!==n.command){var s=null!==r.keypressChordPart,a=null!==n.keypressChordPart;s&&a&&r.keypressChordPart!==n.keypressChordPart||e.whenIsEntirelyIncluded(r.when,n.when)&&this._removeFromLookupMap(r)}}i.push(n),this._addToLookupMap(n)},e.prototype._addToLookupMap=function(e){if(e.command){var t=this._lookupMap.get(e.command);void 0===t?(t=[e],this._lookupMap.set(e.command,t)):t.push(e)}},e.prototype._removeFromLookupMap=function(e){var t=this._lookupMap.get(e.command);if(void 0!==t)for(var n=0,i=t.length;n=0;i--){var o=n[i];if(e.contextMatchesRules(t,o.when))return o}return null},e.contextMatchesRules=function(e,t){return!t||t.evaluate(e)},e}(),Ox=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Rx=function(){function e(e,t,n){void 0===e&&(e={}),void 0===t&&(t=[]),void 0===n&&(n=[]),this._contents=e,this._keys=t,this._overrides=n,this.isFrozen=!1}return Object.defineProperty(e.prototype,"contents",{get:function(){return this.checkAndFreeze(this._contents)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"overrides",{get:function(){return this.checkAndFreeze(this._overrides)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"keys",{get:function(){return this.checkAndFreeze(this._keys)},enumerable:!0,configurable:!0}),e.prototype.getValue=function(e){return e?(t=function(e,t){for(var n=e,i=0;i0&&t.push([r,s])}return t},e._fillInKbExprKeys=function(e,t){if(e)for(var n=0,i=e.keys();ns)return 1;var a="string"==typeof e.command.title?e.command.title:e.command.title.value,u="string"==typeof t.command.title?t.command.title:t.command.title.value;return a.localeCompare(u)},e=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([Wx(2,D),Wx(3,he)],e)}(),Bx=function(e,t,n,i,o){if(this.resolvedKeybinding=e,e){var r=e.getDispatchParts(),s=r[0],a=r[1];this.keypressFirstPart=s,this.keypressChordPart=a}else this.keypressFirstPart=null,this.keypressChordPart=null;this.bubble=!!t&&94===t.charCodeAt(0),this.command=this.bubble?t.substr(1):t,this.commandArgs=n,this.when=i,this.isDefault=o},Hx=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Vx=function(){function e(e){this.model=e,this._onDispose=new X.vl}return Object.defineProperty(e.prototype,"textEditorModel",{get:function(){return this.model},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){this._onDispose.fire()},e}(),Ux=function(){function e(){}return e.prototype.setEditor=function(e){this.editor=e},e.prototype.createModelReference=function(e){var t,n,i,o,r=this;return i=function(t){return r.findModel(t,e)},o=function(t){return r.findModel(t.getOriginalEditor(),e)||r.findModel(t.getModifiedEditor(),e)},(t=uu(n=this.editor)?i(n):o(n))?J.g3.as(new I.BO(new Vx(t))):J.g3.as(new I.BO(null))},e.prototype.findModel=function(e,t){var n=e.getModel();return n.uri.toString()!==t.toString()?null:n},e}(),Yx=function(){function e(){}return e.prototype.showWhile=function(e,t){return null},e}(),Zx=function(){},Gx=function(){function e(){}return e.prototype.info=function(e){return this.notify({severity:Mr.Info,message:e})},e.prototype.warn=function(e){return this.notify({severity:Mr.Warning,message:e})},e.prototype.error=function(e){return this.notify({severity:Mr.Error,message:e})},e.prototype.notify=function(t){switch(t.severity){case Mr.Error:console.error(t.message);break;case Mr.Warning:console.warn(t.message);break;default:console.log(t.message)}return e.NO_OP},e.NO_OP=new Sr,e}(),Qx=function(){function e(e){this._onWillExecuteCommand=new X.vl,this._instantiationService=e,this._dynamicCommands=Object.create(null)}return e.prototype.addCommand=function(e){var t=this,n=e.id;return this._dynamicCommands[n]=e,(0,I.s)((function(){delete t._dynamicCommands[n]}))},e.prototype.executeCommand=function(e){for(var t=[],n=1;n=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},aD=function(e,t){return function(n,i){t(n,i,e)}},uD=0,lD=!1;var cD=function(e){function t(t,n,i,r,s,a,u,l,c){var h,d=this;return(n=n||{}).ariaLabel=n.ariaLabel||o.k("editorViewAccessibleLabel","Editor content"),n.ariaLabel=n.ariaLabel+";"+(xt?o.k("accessibilityHelpMessageIE","Press Ctrl+F1 for Accessibility Options."):o.k("accessibilityHelpMessage","Press Alt+F1 for Accessibility Options.")),d=e.call(this,t,n,{},i,r,s,a,l,c)||this,u instanceof qx&&(d._standaloneKeybindingService=u),lD||(lD=!0,h=document.body,(Ip=document.createElement("div")).className="monaco-aria-container",(Np=document.createElement("div")).className="monaco-alert",Np.setAttribute("role","alert"),Np.setAttribute("aria-atomic","true"),Ip.appendChild(Np),(xp=document.createElement("div")).className="monaco-status",xp.setAttribute("role","status"),xp.setAttribute("aria-atomic","true"),Ip.appendChild(xp),h.appendChild(Ip)),d}return rD(t,e),t.prototype.addCommand=function(e,t,n){if(!this._standaloneKeybindingService)return console.warn("Cannot add command because the editor is configured with an unrecognized KeybindingService"),null;var i="DYNAMIC_"+ ++uD,o=ne.deserialize(n);return this._standaloneKeybindingService.addDynamicKeybinding(i,e,t,o),i},t.prototype.createContextKey=function(e,t){return this._contextKeyService.createKey(e,t)},t.prototype.addAction=function(e){var t=this;if("string"!=typeof e.id||"string"!=typeof e.label||"function"!=typeof e.run)throw new Error("Invalid action descriptor, `id`, `label` and `run` are required properties!");if(!this._standaloneKeybindingService)return console.warn("Cannot add keybinding because the editor is configured with an unrecognized KeybindingService"),I.jG.None;var n=e.id,i=e.label,o=ne.and(ne.equals("editorId",this.getId()),ne.deserialize(e.precondition)),r=e.keybindings,s=ne.and(o,ne.deserialize(e.keybindingContext)),a=e.contextMenuGroupId||null,u=e.contextMenuOrder||0,l=function(){return e.run(t)||J.g3.as(void 0)},c=[],h=this.getId()+":"+n;if(c.push(k.registerCommand(h,l)),a){var d={command:{id:h,title:i},when:o,group:a,order:u};c.push(be.appendMenuItem(ve.EditorContext,d))}Array.isArray(r)&&(c=c.concat(r.map((function(e){return t._standaloneKeybindingService.addDynamicKeybinding(h,e,l,s)}))));var f=new gh(h,i,i,o,l,this._contextKeyService);return this._actions[n]=f,c.push((0,I.s)((function(){delete t._actions[n]}))),(0,I.qE)(c)},sD([aD(2,N._Y),aD(3,Ce),aD(4,D),aD(5,he),aD(6,xf),aD(7,Lr),aD(8,Cr)],t)}(_h),hD=function(e){function t(t,n,i,o,r,s,a,u,l,c,h,d){var f=this;nD(d,n,!1),"string"==typeof(n=n||{}).theme&&c.setTheme(n.theme);var p=n.model;if(delete n.model,(f=e.call(this,t,n,o,r,s,a,u,c,h)||this)._contextViewService=l,f._configurationService=d,f._register(i),void 0===p?(p=self.monaco.editor.createModel(n.value||"",n.language||"text/plain"),f._ownsModel=!0):f._ownsModel=!1,f._attachModel(p),p){var g={oldModelUrl:null,newModelUrl:p.uri};f._onDidChangeModel.fire(g)}return f}return rD(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this)},t.prototype.updateOptions=function(t){nD(this._configurationService,t,!1),e.prototype.updateOptions.call(this,t)},t.prototype._attachModel=function(t){e.prototype._attachModel.call(this,t),this._view&&this._contextViewService.setContainer(this._view.domNode.domNode)},t.prototype._postDetachModelCleanup=function(t){e.prototype._postDetachModelCleanup.call(this,t),t&&this._ownsModel&&(t.dispose(),this._ownsModel=!1)},sD([aD(3,N._Y),aD(4,Ce),aD(5,D),aD(6,he),aD(7,xf),aD(8,If),aD(9,wN),aD(10,Cr),aD(11,uf)],t)}(cD),dD=function(e){function t(t,n,i,o,r,s,a,u,l,c,h,d){var f=this;return nD(d,n,!0),"string"==typeof(n=n||{}).theme&&(n.theme=c.setTheme(n.theme)),(f=e.call(this,t,n,u,r,o,l,c,h)||this)._contextViewService=a,f._configurationService=d,f._register(i),f._contextViewService.setContainer(f._containerDomElement),f}return rD(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this)},t.prototype.updateOptions=function(t){nD(this._configurationService,t,!0),e.prototype.updateOptions.call(this,t)},t.prototype._createInnerEditor=function(e,t,n){return e.createInstance(cD,t,n)},t.prototype.getOriginalEditor=function(){return e.prototype.getOriginalEditor.call(this)},t.prototype.getModifiedEditor=function(){return e.prototype.getModifiedEditor.call(this)},t.prototype.addCommand=function(e,t,n){return this.getModifiedEditor().addCommand(e,t,n)},t.prototype.createContextKey=function(e,t){return this.getModifiedEditor().createContextKey(e,t)},t.prototype.addAction=function(e){return this.getModifiedEditor().addAction(e)},sD([aD(3,N._Y),aD(4,he),aD(5,xf),aD(6,If),aD(7,Ah),aD(8,Ce),aD(9,wN),aD(10,Cr),aD(11,uf)],t)}(dd),fD=(n(7512),n(437),function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}()),pD=function(e){function t(t,n,i){var o=e.call(this,i||"submenu",t,"",!0)||this;return o.entries=n,o}return fD(t,e),t}($),gD=function(){function e(e,t,n){void 0===n&&(n={});var i=this;sn(e,"monaco-menu-container"),e.setAttribute("role","presentation");var o=document.createElement("div");sn(o,"monaco-menu"),o.setAttribute("role","presentation"),e.appendChild(o);var r={parent:this};this.actionBar=new Xh(o,{orientation:Uh.VERTICAL,actionItemProvider:function(e){return i.doGetActionItem(e,n,r)},context:n.context,actionRunner:n.actionRunner,isMenu:!0,ariaLabel:n.ariaLabel}),this.actionBar.push(t,{icon:!0,label:!0,isMenu:!0})}return e.prototype.doGetActionItem=function(e,t,n){if(e instanceof qh)return new Kh(t.context,e,{icon:!0});if(e instanceof pD)return new vD(e,e.entries,n,t);var i={};if(t.getKeyBinding){var o=t.getKeyBinding(e);o&&(i.keybinding=o.getLabel())}return new mD(t.context,e,i)},Object.defineProperty(e.prototype,"onDidCancel",{get:function(){return this.actionBar.onDidCancel},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onDidBlur",{get:function(){return this.actionBar.onDidBlur},enumerable:!0,configurable:!0}),e.prototype.focus=function(e){void 0===e&&(e=!0),this.actionBar&&this.actionBar.focus(e)},e.prototype.dispose=function(){this.actionBar&&(this.actionBar.dispose(),this.actionBar=null),this.listener&&(this.listener.dispose(),this.listener=null)},e}(),mD=function(e){function t(t,n,i){void 0===i&&(i={});var o=this;return i.isMenu=!0,(o=e.call(this,n,n,i)||this).options=i,o.options.icon=void 0!==i.icon&&i.icon,o.options.label=void 0===i.label||i.label,o.cssClass="",o}return fD(t,e),t.prototype.render=function(t){e.prototype.render.call(this,t),this.$e=Zh("a.action-menu-item").appendTo(this.builder),this._action.id===qh.ID?this.$e.attr({role:"presentation"}):this.$e.attr({role:"menuitem"}),this.$label=Zh("span.action-label").appendTo(this.$e),this.options.label&&this.options.keybinding&&Zh("span.keybinding").text(this.options.keybinding).appendTo(this.$e),this._updateClass(),this._updateLabel(),this._updateTooltip(),this._updateEnabled(),this._updateChecked()},t.prototype._updateLabel=function(){if(this.options.label){var e=this.getAction().label;if(e){var n=t.MNEMONIC_REGEX.exec(e);if(n&&2===n.length){var i=n[1],o=e.replace(t.MNEMONIC_REGEX,i);this.$e.getHTMLElement().accessKey=i.toLocaleLowerCase(),this.$label.attr("aria-label",o)}else this.$label.attr("aria-label",e);e=e.replace(t.MNEMONIC_REGEX,"$1̲")}this.$label.text(e)}},t.prototype._updateTooltip=function(){var e=null;this.getAction().tooltip?e=this.getAction().tooltip:!this.options.label&&this.getAction().label&&this.options.icon&&(e=this.getAction().label,this.options.keybinding&&(e=o.k({key:"titleLabel",comment:["action title","action keybinding"]},"{0} ({1})",e,this.options.keybinding))),e&&this.$e.attr({title:e})},t.prototype._updateClass=function(){this.cssClass&&this.$e.removeClass(this.cssClass),this.options.icon?(this.cssClass=this.getAction().class,this.$label.addClass("icon"),this.cssClass&&this.$label.addClass(this.cssClass),this._updateEnabled()):this.$label.removeClass("icon")},t.prototype._updateEnabled=function(){this.getAction().enabled?(this.builder.removeClass("disabled"),this.$e.removeClass("disabled"),this.$e.attr({tabindex:0})):(this.builder.addClass("disabled"),this.$e.addClass("disabled"),ei(this.$e.getHTMLElement()))},t.prototype._updateChecked=function(){this.getAction().checked?this.$label.addClass("checked"):this.$label.removeClass("checked")},t.MNEMONIC_REGEX=/&&(.)/g,t}(Qh),vD=function(e){function t(t,n,i,o){var r=e.call(this,t,t,{label:!0,isMenu:!0})||this;return r.submenuActions=n,r.parentData=i,r.submenuOptions=o,r.showScheduler=new Ct((function(){r.mouseOver&&(r.cleanupExistingSubmenu(!1),r.createSubmenu(!1))}),250),r.hideScheduler=new Ct((function(){Pn(document.activeElement,r.builder.getHTMLElement())||r.parentData.submenu!==r.mysubmenu||(r.parentData.parent.focus(!1),r.cleanupExistingSubmenu(!0))}),750),r}return fD(t,e),t.prototype.render=function(t){var n=this;e.prototype.render.call(this,t),this.$e.addClass("monaco-submenu-item"),this.$e.attr("aria-haspopup","true"),Zh("span.submenu-indicator").text("▶").appendTo(this.$e),Zh(this.builder).on(Un.KEY_UP,(function(e){new Bt(e).equals(17)&&(Yn(e,!0),n.createSubmenu(!0))})),Zh(this.builder).on(Un.KEY_DOWN,(function(e){new Bt(e).equals(17)&&Yn(e,!0)})),Zh(this.builder).on(Un.MOUSE_OVER,(function(e){n.mouseOver||(n.mouseOver=!0,n.showScheduler.schedule())})),Zh(this.builder).on(Un.MOUSE_LEAVE,(function(e){n.mouseOver=!1})),Zh(this.builder).on(Un.FOCUS_OUT,(function(e){Pn(document.activeElement,n.builder.getHTMLElement())||n.hideScheduler.schedule()}))},t.prototype.onClick=function(e){Yn(e,!0),this.createSubmenu(!1)},t.prototype.cleanupExistingSubmenu=function(e){this.parentData.submenu&&(e||this.parentData.submenu!==this.mysubmenu)&&(this.parentData.submenu.dispose(),this.parentData.submenu=null,this.submenuContainer&&(this.submenuContainer.dispose(),this.submenuContainer=null))},t.prototype.createSubmenu=function(e){var t=this;void 0===e&&(e=!0),this.parentData.submenu?this.parentData.submenu.focus(!1):(this.submenuContainer=Zh(this.builder).div({class:"monaco-submenu menubar-menu-items-holder context-view"}),Zh(this.submenuContainer).style({left:Zh(this.builder).getClientArea().width+"px"}),Zh(this.submenuContainer).on(Un.KEY_UP,(function(e){new Bt(e).equals(15)&&(Yn(e,!0),t.parentData.parent.focus(),t.parentData.submenu.dispose(),t.parentData.submenu=null,t.submenuContainer.dispose(),t.submenuContainer=null)})),Zh(this.submenuContainer).on(Un.KEY_DOWN,(function(e){new Bt(e).equals(15)&&Yn(e,!0)})),this.parentData.submenu=new gD(this.submenuContainer.getHTMLElement(),this.submenuActions,this.submenuOptions),this.parentData.submenu.focus(e),this.mysubmenu=this.parentData.submenu)},t.prototype.dispose=function(){e.prototype.dispose.call(this),this.hideScheduler.dispose(),this.mysubmenu&&(this.mysubmenu.dispose(),this.mysubmenu=null),this.submenuContainer&&(this.submenuContainer.dispose(),this.submenuContainer=null)},t}(mD),yD=function(){function e(e,t,n,i){this.setContainer(e),this.contextViewService=t,this.telemetryService=n,this.notificationService=i,this.menuContainerElement=null}return e.prototype.setContainer=function(e){var t=this;this.$el&&(this.$el.off(["click","mousedown"]),this.$el=null),e&&(this.$el=Zh(e),this.$el.on("mousedown",(function(e){return t.onMouseDown(e)})))},e.prototype.showContextMenu=function(e){var t=this;e.getActions().done((function(n){n.length&&t.contextViewService.showContextView({getAnchor:function(){return e.getAnchor()},canRelayout:!1,render:function(i){t.menuContainerElement=i;var o=e.getMenuClassName?e.getMenuClassName():"";o&&(i.className+=" "+o);var r=[],s=e.actionRunner||new ee;s.onDidBeforeRun(t.onActionRun,t,r),s.onDidRun(t.onDidActionRun,t,r);var a=new gD(i,n,{actionItemProvider:e.getActionItem,context:e.getActionsContext?e.getActionsContext():null,actionRunner:s,getKeyBinding:e.getKeyBinding});return a.onDidCancel((function(){return t.contextViewService.hideContextView(!0)}),null,r),a.onDidBlur((function(){return t.contextViewService.hideContextView(!0)}),null,r),a.focus(!!e.autoSelectFirstItem),(0,I.qE)(r.concat([a]))},onHide:function(n){e.onHide&&e.onHide(n),t.menuContainerElement=null}})}))},e.prototype.onActionRun=function(e){this.telemetryService&&this.telemetryService.publicLog("workbenchActionExecuted",{id:e.action.id,from:"contextMenu"}),this.contextViewService.hideContextView(!1)},e.prototype.onDidActionRun=function(e){e.error&&this.notificationService&&this.notificationService.error(e.error)},e.prototype.onMouseDown=function(e){if(this.menuContainerElement){for(var t=new Qt(e).target;t;){if(t===this.menuContainerElement)return;t=t.parentElement}this.contextViewService.hideContextView()}},e.prototype.dispose=function(){this.setContainer(null)},e}(),bD=function(){function e(e,t,n,i){this._onDidContextMenu=new X.vl,this.contextMenuHandler=new yD(e,i,t,n)}return e.prototype.dispose=function(){this.contextMenuHandler.dispose()},e.prototype.showContextMenu=function(e){this.contextMenuHandler.showContextMenu(e),this._onDidContextMenu.fire()},e}(),_D=function(e,t){return function(n,i){t(n,i,e)}},wD=function(){function e(e,t,n){this.logService=n,this.contextView=new Hp(e)}return e.prototype.dispose=function(){this.contextView.dispose()},e.prototype.setContainer=function(e){this.logService.trace("ContextViewService#setContainer"),this.contextView.setContainer(e)},e.prototype.showContextView=function(e){this.logService.trace("ContextViewService#showContextView"),this.contextView.show(e)},e.prototype.layout=function(){this.contextView.layout()},e.prototype.hideContextView=function(e){this.logService.trace("ContextViewService#hideContextView"),this.contextView.hide(e)},function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([_D(1,q),_D(2,wS)],e)}(),MD=Object.prototype.hasOwnProperty;function CD(e,t){var n=function(n){if(MD.call(e,n)&&!1===t({key:n,value:e[n]},(function(){delete e[n]})))return{value:void 0}};for(var i in e){var o=n(i);if("object"==typeof o)return o.value}}var SD,LD=function(){function e(e){this._hashFn=e,this._nodes=Object.create(null)}return e.prototype.roots=function(){var e=[];return CD(this._nodes,(function(t){(0,w.RI)(t.value.outgoing)&&e.push(t.value)})),e},e.prototype.insertEdge=function(e,t){var n=this.lookupOrInsertNode(e),i=this.lookupOrInsertNode(t);n.outgoing[this._hashFn(t)]=i,i.incoming[this._hashFn(e)]=n},e.prototype.removeNode=function(e){var t=this._hashFn(e);delete this._nodes[t],CD(this._nodes,(function(e){delete e.value.outgoing[t],delete e.value.incoming[t]}))},e.prototype.lookupOrInsertNode=function(e){var t=this._hashFn(e),n=this._nodes[t];return n||(n=function(e){return{data:e,incoming:Object.create(null),outgoing:Object.create(null)}}(e),this._nodes[t]=n),n},Object.defineProperty(e.prototype,"length",{get:function(){return Object.keys(this._nodes).length},enumerable:!0,configurable:!0}),e.prototype.toString=function(){var e=[];return CD(this._nodes,(function(t){e.push(t.key+", (incoming)["+Object.keys(t.value.incoming).join(", ")+"], (outgoing)["+Object.keys(t.value.outgoing).join(",")+"]")})),e.join("\n")},e}(),ID=function(e){for(var t=[],n=1;n0?i[0].index:n.length;if(n.length!==l){console.warn("[createInstance] First service dependency of "+e.ctor.name+" at position "+(l+1)+" conflicts with "+n.length+" static arguments");var c=l-n.length;n=c>0?n.concat(new Array(c)):n.slice(0,l)}var h=[e.ctor];return h.push.apply(h,n),h.push.apply(h,o),w.vt.apply(null,h)},e.prototype._getOrCreateServiceInstance=function(e){var t=this._services.get(e);return t instanceof ID?this._createAndCacheServiceInstance(e,t):t},e.prototype._createAndCacheServiceInstance=function(e,t){H(this._services.get(e)instanceof ID);var n=new LD((function(e){return e.id.toString()}));function i(){var e=new Error("[createInstance] cyclic dependency between services");throw e.message=n.toString(),e}for(var o=0,r=[{id:e,desc:t}];r.length;){var s=r.pop();n.lookupOrInsertNode(s),o++>100&&i();for(var a=0,u=N._$.getServiceDependencies(s.desc.ctor);a0?a:1,startColumn:u=u>0?u:1,endLineNumber:l=l>=a?l:a,endColumn:c=c>0?c:u,relatedInformation:h,tags:d}},e.prototype.read=function(t){void 0===t&&(t=Object.create(null));var n=t.owner,i=t.resource,o=t.severities,r=t.take;if((!r||r<0)&&(r=-1),n&&i){if(b=SD.get(this._byResource,i.toString(),n)){for(var s=[],a=0,u=b;a0&&c===r)break}}return s}return[]}if(n||i){var h=n?this._byOwner[n]:this._byResource[i.toString()];if(!h)return[];for(var d in s=[],h)for(var f=0,p=h[d];f0&&c===r))return s;return s}s=[];for(var g in this._byResource)for(var m in this._byResource[g])for(var v=0,y=this._byResource[g][m];v0&&c===r)return s}}return s},e._accept=function(e,t){return void 0===t||(t&e.severity)===e.severity},e._debouncer=function(t,n){t||(e._dedupeMap=Object.create(null),t=[]);for(var i=0,o=n;i1&&p>1&&h.charCodeAt(f-2)===d.charCodeAt(p-2);)f--,p--;(f>1||p>1)&&this._pushTrimWhitespaceCharChange(o,r+1,1,f,s+1,1,p);for(var g=WD._getLastNonBlankColumn(h,1),m=WD._getLastNonBlankColumn(d,1),v=h.length+1,y=d.length+1;gt&&(t=l),s>n&&(n=s),(c=r[2])>n&&(n=c)}t++,n++;var a=new zo.Ie(n,t,0);for(i=0,o=e.length;i=this._maxCharCode?0:this._states.get(e,t)},e}(),ZD=null,GD=null,QD=function(){function e(){}return e._createLink=function(e,t,n,i,o){var r=o-1;do{var s=t.charCodeAt(r);if(2!==e.get(s))break;r--}while(r>i);if(i>0){var a=t.charCodeAt(i-1),u=t.charCodeAt(r);(40===a&&41===u||91===a&&93===u||123===a&&125===u)&&r--}return{range:{startLineNumber:n,startColumn:i+1,endLineNumber:n,endColumn:r+2},url:t.substring(i,r+1)}},e.computeLinks=function(t){for(var n=(null===ZD&&(ZD=new YD([[1,104,2],[1,72,2],[1,102,6],[1,70,6],[2,116,3],[2,84,3],[3,116,4],[3,84,4],[4,112,5],[4,80,5],[5,115,9],[5,83,9],[5,58,10],[6,105,7],[6,73,7],[7,108,8],[7,76,8],[8,101,9],[8,69,9],[9,58,10],[10,47,11],[11,47,12]])),ZD),i=function(){if(null===GD){GD=new cr.V(0);for(var e=0;e<49;e++)GD.set(" \t<>'\"、。。、,.:;?!@#$%&*‘“〈《「『【〔([{「」}])〕】』」》〉”’`~…".charCodeAt(e),1);for(e=0;e<3;e++)GD.set(".,;".charCodeAt(e),2)}return GD}(),o=[],r=1,s=t.getLineCount();r<=s;r++){for(var a=t.getLineContent(r),u=a.length,l=0,c=0,h=0,d=1,f=!1,p=!1,g=!1;l=0?((i+=n?1:-1)<0?i=e.length-1:i%=e.length,e[i]):null},e.INSTANCE=new e,e}(),KD=n(1279),JD=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),XD=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return JD(t,e),Object.defineProperty(t.prototype,"uri",{get:function(){return this._uri},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"version",{get:function(){return this._versionId},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"eol",{get:function(){return this._eol},enumerable:!0,configurable:!0}),t.prototype.getValue=function(){return this.getText()},t.prototype.getLinesContent=function(){return this._lines.slice(0)},t.prototype.getLineCount=function(){return this._lines.length},t.prototype.getLineContent=function(e){return this._lines[e-1]},t.prototype.getWordAtPosition=function(e,t){var n=(0,KD.Th)(e.column,(0,KD.Io)(t),this._lines[e.lineNumber-1],0);return n?new s.Q(e.lineNumber,n.startColumn,e.lineNumber,n.endColumn):null},t.prototype.getWordUntilPosition=function(e,t){var n=this.getWordAtPosition(e,t);return n?{word:this._lines[e.lineNumber-1].substring(n.startColumn-1,e.column-1),startColumn:n.startColumn,endColumn:e.column}:{word:"",startColumn:e.column,endColumn:e.column}},t.prototype.createWordIterator=function(e){var t,n=this,i={done:!1,value:""},o=0,r=0,s=[],a=function(){if(r=n._lines.length))return t=n._lines[o],s=n._wordenize(t,e),r=0,o+=1,a();i.done=!0,i.value=void 0}return i};return{next:a}},t.prototype._wordenize=function(e,t){var n,i=[];for(t.lastIndex=0;(n=t.exec(e))&&0!==n[0].length;)i.push({start:n.index,end:n.index+n[0].length});return i},t.prototype.getValueInRange=function(e){if((e=this._validateRange(e)).startLineNumber===e.endLineNumber)return this._lines[e.startLineNumber-1].substring(e.startColumn-1,e.endColumn-1);var t=this._eol,n=e.startLineNumber-1,i=e.endLineNumber-1,o=[];o.push(this._lines[n].substring(e.startColumn-1));for(var r=n+1;rthis._lines.length)t=this._lines.length,n=this._lines[t-1].length+1,i=!0;else{var o=this._lines[t-1].length+1;n<1?(n=1,i=!0):n>o&&(n=o,i=!0)}return i?{lineNumber:t,column:n}:e},t}(UD),$D=function(){function e(e){this._foreignModuleFactory=e,this._foreignModule=null}return e.prototype.computeDiff=function(e,t,n){var i=this._getModel(e),o=this._getModel(t);if(!i||!o)return null;var r=i.getLinesContent(),s=o.getLinesContent(),a=new VD(r,s,{shouldComputeCharChanges:!0,shouldPostProcessCharChanges:!0,shouldIgnoreTrimWhitespace:n,shouldMakePrettyDiff:!0});return J.g3.as(a.computeDiff())},e.prototype.computeMoreMinimalEdits=function(t,n){var i=this._getModel(t);if(!i)return J.g3.as(n);for(var o,r=[],a=0,u=n;ae._diffLimit)r.push({range:c,text:h});else for(var p=wy(f,h,!1),g=i.offsetAt(s.Q.lift(c).getStartPosition()),m=0,v=p;m=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([ik(0,K.S),ik(1,tk)],t)}(I.jG),sk=function(){function e(e,t,n){this._workerManager=e,this._configurationService=t,this._modelService=n}return e.prototype.provideCompletionItems=function(e,t){if(this._configurationService.getValue(e.uri,t,"editor").wordBasedSuggestions&&ok(this._modelService,e.uri))return this._workerManager.withWorker().then((function(n){return n.textualSuggest(e.uri,t)}))},e}(),ak=function(e){function t(t){var n=e.call(this)||this;return n._modelService=t,n._editorWorkerClient=null,n._register(new Mt).cancelAndSet((function(){return n._checkStopIdleWorker()}),Math.round(15e4)),n._register(n._modelService.onModelRemoved((function(e){return n._checkStopEmptyWorker()}))),n}return nk(t,e),t.prototype.dispose=function(){this._editorWorkerClient&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null),e.prototype.dispose.call(this)},t.prototype._checkStopEmptyWorker=function(){this._editorWorkerClient&&0===this._modelService.getModels().length&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null)},t.prototype._checkStopIdleWorker=function(){this._editorWorkerClient&&(new Date).getTime()-this._lastWorkerUsedTime>3e5&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null)},t.prototype.withWorker=function(){return this._lastWorkerUsedTime=(new Date).getTime(),this._editorWorkerClient||(this._editorWorkerClient=new ck(this._modelService,"editorWorkerService")),J.g3.as(this._editorWorkerClient)},t}(I.jG),uk=function(e){function t(t,n,i){var o=e.call(this)||this;if(o._syncedModels=Object.create(null),o._syncedModelsLastUsedTime=Object.create(null),o._proxy=t,o._modelService=n,!i){var r=new Mt;r.cancelAndSet((function(){return o._checkStopModelSync()}),Math.round(3e4)),o._register(r)}return o}return nk(t,e),t.prototype.dispose=function(){for(var t in this._syncedModels)(0,I.AS)(this._syncedModels[t]);this._syncedModels=Object.create(null),this._syncedModelsLastUsedTime=Object.create(null),e.prototype.dispose.call(this)},t.prototype.esureSyncedResources=function(e){for(var t=0;t6e4&&t.push(n);for(var i=0;i=0}}(e);gk.push(n),n.userConfigured?vk.push(n):mk.push(n),t&&!n.userConfigured&&gk.forEach((function(e){e.mime===n.mime||e.userConfigured||(n.extension&&e.extension===n.extension&&console.warn("Overwriting extension <<"+n.extension+">> to now point to mime <<"+n.mime+">>"),n.filename&&e.filename===n.filename&&console.warn("Overwriting filename <<"+n.filename+">> to now point to mime <<"+n.mime+">>"),n.filepattern&&e.filepattern===n.filepattern&&console.warn("Overwriting filepattern <<"+n.filepattern+">> to now point to mime <<"+n.mime+">>"),n.firstline&&e.firstline===n.firstline&&console.warn("Overwriting firstline <<"+n.firstline+">> to now point to mime <<"+n.mime+">>"))}))}function bk(e,t,n){for(var i,o,r,s=n.length-1;s>=0;s--){var a=n[s];if(t===a.filenameLowercase){i=a;break}if(a.filepattern&&(!o||a.filepattern.length>o.filepattern.length)){var u=a.filepatternOnPath?e:t;(0,dk.YW)(a.filepatternLowercase,u)&&(o=a)}a.extension&&(!r||a.extension.length>r.extension.length)&&p.endsWith(t,a.extensionLowercase)&&(r=a)}return i?i.mime:o?o.mime:r?r.mime:null}var _k=new(function(){function e(){this._onDidAddLanguages=new X.vl,this.onDidAddLanguages=this._onDidAddLanguages.event,this._languages=[]}return e.prototype.registerLanguage=function(e){this._languages.push(e),this._onDidAddLanguages.fire([e])},e.prototype.getLanguages=function(){return this._languages.slice(0)},e}());U.add("editor.modesRegistry",_k);var wk="plaintext",Mk=new No.Aj(wk,1);_k.registerLanguage({id:wk,extensions:[".txt",".gitignore"],aliases:[o.k("plainText.alias","Plain Text"),"text"],mimetypes:["text/plain"]}),Ge.cx.register(Mk,{brackets:[["(",")"],["[","]"],["{","}"]]});var Ck=Object.prototype.hasOwnProperty,Sk=function(){function e(e,t){void 0===e&&(e=!0),void 0===t&&(t=!1);var n=this;this._nextLanguageId=1,this._languages={},this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},this._languageIds=[],this._warnOnOverwrite=t,e&&(this._registerLanguages(_k.getLanguages()),_k.onDidAddLanguages((function(e){return n._registerLanguages(e)})))}return e.prototype._registerLanguages=function(e){var t=this;if(0!==e.length){for(var n=0;n0&&((n=e.mimetypes).push.apply(n,t.mimetypes),o=t.mimetypes[0]),o||(o="text/x-"+i,e.mimetypes.push(o)),Array.isArray(t.extensions))for(var r=0,s=t.extensions;r0){var f=t.firstLine;"^"!==f.charAt(0)&&(f="^"+f);try{var g=new RegExp(f);p.regExpLeadsToEndlessLoop(g)||yk({id:i,mime:o,firstline:g},this._warnOnOverwrite)}catch(e){(0,S.dz)(e)}}e.aliases.push(i);var m=null;if(void 0!==t.aliases&&Array.isArray(t.aliases)&&(m=0===t.aliases.length?[null]:t.aliases),null!==m)for(var v=0;v0;if(y&&null===m[0]);else{var b=(y?m[0]:null)||i;!y&&e.name||(e.name=b)}t.configuration&&e.configurationFiles.push(t.configuration)},e.prototype.isRegisteredMode=function(e){return!!Ck.call(this._mimeTypesMap,e)||Ck.call(this._languages,e)},e.prototype.getModeIdForLanguageNameLowercase=function(e){return Ck.call(this._lowercaseNameMap,e)?this._lowercaseNameMap[e].language:null},e.prototype.extractModeIds=function(e){var t=this;return e?e.split(",").map((function(e){return e.trim()})).map((function(e){return Ck.call(t._mimeTypesMap,e)?t._mimeTypesMap[e].language:e})).filter((function(e){return Ck.call(t._languages,e)})):[]},e.prototype.getLanguageIdentifier=function(e){if(e===xo.I8||0===e)return xo.z8;var t;if("string"==typeof e)t=e;else if(!(t=this._languageIds[e]))return null;return Ck.call(this._languages,t)?this._languages[t].identifier:null},e.prototype.getModeIdsFromFilenameOrFirstLine=function(e,t){if(!e&&!t)return[];var n=function(e,t){if(!e)return[pk];e=e.toLowerCase();var n=bv.P8(e),i=bk(e,n,vk);if(i)return[i,fk];var o=bk(e,n,mk);if(o)return[o,fk];if(t){var r=function(e){if(p.startsWithUTF8BOM(e)&&(e=e.substr(1)),e.length>0)for(var t=0;t0)return n.mime}}return null}(t);if(r)return[r,fk]}return[pk]}(e,t);return this.extractModeIds(n.join(","))},e}(),Lk=function(){function e(e){void 0===e&&(e=!1),this._onDidCreateMode=new X.vl,this.onDidCreateMode=this._onDidCreateMode.event,this._instantiatedModes={},this._registry=new Sk(!0,e)}return e.prototype._onReady=function(){return J.g3.as(!0)},e.prototype.isRegisteredMode=function(e){return this._registry.isRegisteredMode(e)},e.prototype.getModeIdForLanguageName=function(e){return this._registry.getModeIdForLanguageNameLowercase(e)},e.prototype.getModeIdByFilenameOrFirstLine=function(e,t){var n=this._registry.getModeIdsFromFilenameOrFirstLine(e,t);return n.length>0?n[0]:null},e.prototype.getModeId=function(e){var t=this._registry.extractModeIds(e);return t.length>0?t[0]:null},e.prototype.getLanguageIdentifier=function(e){return this._registry.getLanguageIdentifier(e)},e.prototype.getMode=function(e){for(var t=this._registry.extractModeIds(e),n=!1,i=0;i=o?new s.Q(n.startLineNumber,o-1,n.endLineNumber,o):new s.Q(n.startLineNumber,n.startColumn,n.endLineNumber,n.endColumn+1))}}else if(t.endColumn===Number.MAX_VALUE&&1===t.startColumn&&n.startLineNumber===n.endLineNumber){var r=e.getLineFirstNonWhitespaceColumn(t.startLineNumber);r=0?"squiggly-unnecessary":"squiggly-hint",r=0;break;case d_.Warning:t="squiggly-warning",n=Ir(Ua),i=Ir(Ua),r=20;break;case d_.Info:t="squiggly-info",n=Ir(Ya),i=Ir(Ya),r=10;break;case d_.Error:default:t="squiggly-error",n=Ir(Va),i=Ir(Va),r=30}e.tags&&-1!==e.tags.indexOf(h_.Unnecessary)&&(s="squiggly-inline-unnecessary");var a=null,u=e.message,l=e.source,c=e.relatedInformation;if("string"==typeof u&&(u=u.trim(),l&&(u=/\n/g.test(u)?o.k("diagAndSourceMultiline","[{0}]\n{1}",l,u):o.k("diagAndSource","[{0}] {1}",l,u)),a=(new yp).appendCodeblock("_",u),!(0,tu.Ct)(c))){a.appendMarkdown("\n");for(var h=0,d=c;h=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([Ik(0,v_),Ik(1,uf)],e)}(),Ek=function(){function e(){this._codeEditors=Object.create(null),this._diffEditors=Object.create(null),this._onCodeEditorAdd=new X.vl,this._onCodeEditorRemove=new X.vl,this._onDiffEditorAdd=new X.vl,this._onDiffEditorRemove=new X.vl}return e.prototype.addCodeEditor=function(e){this._codeEditors[e.getId()]=e,this._onCodeEditorAdd.fire(e)},Object.defineProperty(e.prototype,"onCodeEditorAdd",{get:function(){return this._onCodeEditorAdd.event},enumerable:!0,configurable:!0}),e.prototype.removeCodeEditor=function(e){delete this._codeEditors[e.getId()]&&this._onCodeEditorRemove.fire(e)},e.prototype.listCodeEditors=function(){var e=this;return Object.keys(this._codeEditors).map((function(t){return e._codeEditors[t]}))},e.prototype.addDiffEditor=function(e){this._diffEditors[e.getId()]=e,this._onDiffEditorAdd.fire(e)},e.prototype.removeDiffEditor=function(e){delete this._diffEditors[e.getId()]&&this._onDiffEditorRemove.fire(e)},e.prototype.listDiffEditors=function(){var e=this;return Object.keys(this._diffEditors).map((function(t){return e._diffEditors[t]}))},e.prototype.getFocusedCodeEditor=function(){for(var e=null,t=this.listCodeEditors(),n=0;n=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([(n=0,i=Lr,function(e,t){i(e,t,n)})],t);var n,i}(Ek),Ok=function(){function e(e,t){this._parentTypeKey=t.parentTypeKey,this.refCount=0,this._beforeContentRules=new zk(3,t,e),this._afterContentRules=new zk(4,t,e)}return e.prototype.getOptions=function(e,t){var n=e.resolveDecorationOptions(this._parentTypeKey,!0);return this._beforeContentRules&&(n.beforeContentClassName=this._beforeContentRules.className),this._afterContentRules&&(n.afterContentClassName=this._afterContentRules.className),n},e.prototype.dispose=function(){this._beforeContentRules&&(this._beforeContentRules.dispose(),this._beforeContentRules=null),this._afterContentRules&&(this._afterContentRules.dispose(),this._afterContentRules=null)},e}(),Rk=function(){function e(e,t){var n=this;this.refCount=0,this._disposables=[];var i=function(i){var o=new zk(i,t,e);if(o.hasContent)return n._disposables.push(o),o.className};this.className=i(0);var o,r=(o=new zk(1,t,e)).hasContent?(n._disposables.push(o),{className:o.className,hasLetterSpacing:o.hasLetterSpacing}):null;r&&(this.inlineClassName=r.className,this.inlineClassNameAffectsLetterSpacing=r.hasLetterSpacing),this.beforeContentClassName=i(3),this.afterContentClassName=i(4),this.glyphMarginClassName=i(2);var s=t.options;this.isWholeLine=Boolean(s.isWholeLine),this.stickiness=s.rangeBehavior;var a=s.light&&s.light.overviewRulerColor||s.overviewRulerColor,u=s.dark&&s.dark.overviewRulerColor||s.overviewRulerColor;void 0===a&&void 0===u||(this.overviewRuler={color:a||u,darkColor:u||a,position:s.overviewRulerLane||Xi.A5.Center})}return e.prototype.getOptions=function(e,t){return t?{inlineClassName:this.inlineClassName,beforeContentClassName:this.beforeContentClassName,afterContentClassName:this.afterContentClassName,className:this.className,glyphMarginClassName:this.glyphMarginClassName,isWholeLine:this.isWholeLine,overviewRuler:this.overviewRuler,stickiness:this.stickiness}:this},e.prototype.dispose=function(){this._disposables=(0,I.AS)(this._disposables)},e}(),Pk={color:"color:{0} !important;",opacity:"opacity:{0}; will-change: opacity;",backgroundColor:"background-color:{0};",outline:"outline:{0};",outlineColor:"outline-color:{0};",outlineStyle:"outline-style:{0};",outlineWidth:"outline-width:{0};",border:"border:{0};",borderColor:"border-color:{0};",borderRadius:"border-radius:{0};",borderSpacing:"border-spacing:{0};",borderStyle:"border-style:{0};",borderWidth:"border-width:{0};",fontStyle:"font-style:{0};",fontWeight:"font-weight:{0};",textDecoration:"text-decoration:{0};",cursor:"cursor:{0};",letterSpacing:"letter-spacing:{0};",gutterIconPath:"background:url('{0}') center center no-repeat;",gutterIconSize:"background-size:{0};",contentText:"content:'{0}';",contentIconPath:"content:url('{0}');",margin:"margin:{0};",width:"width:{0};",height:"height:{0};"},zk=function(){function e(e,t,n){var i=this;this._theme=n.getTheme(),this._ruleType=e,this._providerArgs=t,this._usesThemeColors=!1,this._hasContent=!1,this._hasLetterSpacing=!1;var o=Wk.getClassName(this._providerArgs.key,e);this._providerArgs.parentTypeKey&&(o=o+" "+Wk.getClassName(this._providerArgs.parentTypeKey,e)),this._className=o,this._unThemedSelector=Wk.getSelector(this._providerArgs.key,this._providerArgs.parentTypeKey,e),this._buildCSS(),this._usesThemeColors&&(this._themeListener=n.onThemeChange((function(e){i._theme=n.getTheme(),i._removeCSS(),i._buildCSS()})))}return e.prototype.dispose=function(){this._hasContent&&(this._removeCSS(),this._hasContent=!1),this._themeListener&&(this._themeListener.dispose(),this._themeListener=null)},Object.defineProperty(e.prototype,"hasContent",{get:function(){return this._hasContent},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"hasLetterSpacing",{get:function(){return this._hasLetterSpacing},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"className",{get:function(){return this._className},enumerable:!0,configurable:!0}),e.prototype._buildCSS=function(){var e,t,n,i=this._providerArgs.options;switch(this._ruleType){case 0:e=this.getCSSTextForModelDecorationClassName(i),t=this.getCSSTextForModelDecorationClassName(i.light),n=this.getCSSTextForModelDecorationClassName(i.dark);break;case 1:e=this.getCSSTextForModelDecorationInlineClassName(i),t=this.getCSSTextForModelDecorationInlineClassName(i.light),n=this.getCSSTextForModelDecorationInlineClassName(i.dark);break;case 2:e=this.getCSSTextForModelDecorationGlyphMarginClassName(i),t=this.getCSSTextForModelDecorationGlyphMarginClassName(i.light),n=this.getCSSTextForModelDecorationGlyphMarginClassName(i.dark);break;case 3:e=this.getCSSTextForModelDecorationContentClassName(i.before),t=this.getCSSTextForModelDecorationContentClassName(i.light&&i.light.before),n=this.getCSSTextForModelDecorationContentClassName(i.dark&&i.dark.before);break;case 4:e=this.getCSSTextForModelDecorationContentClassName(i.after),t=this.getCSSTextForModelDecorationContentClassName(i.light&&i.light.after),n=this.getCSSTextForModelDecorationContentClassName(i.dark&&i.dark.after);break;default:throw new Error("Unknown rule type: "+this._ruleType)}var o=this._providerArgs.styleSheet.sheet,r=!1;e.length>0&&(o.insertRule(this._unThemedSelector+" {"+e+"}",0),r=!0),t.length>0&&(o.insertRule(".vs"+this._unThemedSelector+" {"+t+"}",0),r=!0),n.length>0&&(o.insertRule(".vs-dark"+this._unThemedSelector+", .hc-black"+this._unThemedSelector+" {"+n+"}",0),r=!0),this._hasContent=r},e.prototype._removeCSS=function(){Hn(this._unThemedSelector,this._providerArgs.styleSheet)},e.prototype.getCSSTextForModelDecorationClassName=function(e){if(!e)return"";var t=[];return this.collectCSSText(e,["backgroundColor"],t),this.collectCSSText(e,["outline","outlineColor","outlineStyle","outlineWidth"],t),this.collectBorderSettingsCSSText(e,t),t.join("")},e.prototype.getCSSTextForModelDecorationInlineClassName=function(e){if(!e)return"";var t=[];return this.collectCSSText(e,["fontStyle","fontWeight","textDecoration","cursor","color","opacity","letterSpacing"],t),e.letterSpacing&&(this._hasLetterSpacing=!0),t.join("")},e.prototype.getCSSTextForModelDecorationContentClassName=function(e){if(!e)return"";var t=[];if(void 0!==e){if(this.collectBorderSettingsCSSText(e,t),void 0!==e.contentIconPath&&("string"==typeof e.contentIconPath?t.push(p.format(Pk.contentIconPath,L.A.file(e.contentIconPath).toString().replace(/'/g,"%27"))):t.push(p.format(Pk.contentIconPath,L.A.revive(e.contentIconPath).toString(!0).replace(/'/g,"%27")))),"string"==typeof e.contentText){var n=e.contentText.match(/^.*$/m)[0].replace(/['\\]/g,"\\$&");t.push(p.format(Pk.contentText,n))}this.collectCSSText(e,["fontStyle","fontWeight","textDecoration","color","opacity","backgroundColor","margin"],t),this.collectCSSText(e,["width","height"],t)&&t.push("display:inline-block;")}return t.join("")},e.prototype.getCSSTextForModelDecorationGlyphMarginClassName=function(e){if(!e)return"";var t=[];return void 0!==e.gutterIconPath&&("string"==typeof e.gutterIconPath?t.push(p.format(Pk.gutterIconPath,L.A.file(e.gutterIconPath).toString())):t.push(p.format(Pk.gutterIconPath,L.A.revive(e.gutterIconPath).toString(!0).replace(/'/g,"%27"))),void 0!==e.gutterIconSize&&t.push(p.format(Pk.gutterIconSize,e.gutterIconSize))),t.join("")},e.prototype.collectBorderSettingsCSSText=function(e,t){return!!this.collectCSSText(e,["border","borderColor","borderRadius","borderSpacing","borderStyle","borderWidth"],t)&&(t.push(p.format("box-sizing: border-box;")),!0)},e.prototype.collectCSSText=function(e,t,n){for(var i=n.length,o=0,r=t;o=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([(n=0,i=uf,function(e,t){i(e,t,n)})],t);var n,i}(Qk),Kk=function(e){function t(t,n,i){var o=e.call(this,t.createChildContext())||this;return o._parent=t,o._onDidChangeContextKey=n,i&&(o._domNode=i,o._domNode.setAttribute(Vk,String(o._myContextId))),o}return Hk(t,e),t.prototype.dispose=function(){this._parent.disposeContext(this._myContextId),this._domNode&&(this._domNode.removeAttribute(Vk),this._domNode=void 0)},Object.defineProperty(t.prototype,"onDidChangeContext",{get:function(){return this._parent.onDidChangeContext},enumerable:!0,configurable:!0}),t.prototype.getContextValuesContainer=function(e){return this._parent.getContextValuesContainer(e)},t.prototype.createChildContext=function(e){return void 0===e&&(e=this._myContextId),this._parent.createChildContext(e)},t.prototype.disposeContext=function(e){this._parent.disposeContext(e)},t}(Qk);k.registerCommand("setContext",(function(e,t,n){e.get(he).createKey(String(t),n)}));var Jk=function(e,t,n,i,o){this.token=e,this.index=t,this.fontStyle=n,this.foreground=i,this.background=o};function Xk(e,t){e.sort((function(e,t){var n=function(e,t){return et?1:0}(e.token,t.token);return 0!==n?n:e.index-t.index}));for(var n=0,i="000000",o="ffffff";e.length>=1&&""===e[0].token;){var r=e.shift();-1!==r.fontStyle&&(n=r.fontStyle),null!==r.foreground&&(i=r.foreground),null!==r.background&&(o=r.background)}for(var s=new iT,a=0,u=t;a>>0,this._cache.set(t,n)}return(n|e)>>>0},e}(),rT=/\b(comment|string|regex)\b/,sT=function(){function e(e,t,n){this._fontStyle=e,this._foreground=t,this._background=n,this.metadata=(this._fontStyle<<11|this._foreground<<14|this._background<<23)>>>0}return e.prototype.clone=function(){return new e(this._fontStyle,this._foreground,this._background)},e.prototype.acceptOverwrite=function(e,t,n){-1!==e&&(this._fontStyle=e),0!==t&&(this._foreground=t),0!==n&&(this._background=n),this.metadata=(this._fontStyle<<11|this._foreground<<14|this._background<<23)>>>0},e}(),aT=function(){function e(e){this._mainRule=e,this._children=new Map}return e.prototype.match=function(e){if(""===e)return this._mainRule;var t,n,i=e.indexOf(".");-1===i?(t=e,n=""):(t=e.substring(0,i),n=e.substring(i+1));var o=this._children.get(t);return void 0!==o?o.match(n):this._mainRule},e.prototype.insert=function(t,n,i,o){if(""!==t){var r,s,a=t.indexOf(".");-1===a?(r=t,s=""):(r=t.substring(0,a),s=t.substring(a+1));var u=this._children.get(r);void 0===u&&(u=new e(this._mainRule.clone()),this._children.set(r,u)),u.insert(s,n,i,o)}else this._mainRule.acceptOverwrite(n,i,o)},e}(),uT={base:"vs",inherit:!1,rules:[{token:"",foreground:"000000",background:"fffffe"},{token:"invalid",foreground:"cd3131"},{token:"emphasis",fontStyle:"italic"},{token:"strong",fontStyle:"bold"},{token:"variable",foreground:"001188"},{token:"variable.predefined",foreground:"4864AA"},{token:"constant",foreground:"dd0000"},{token:"comment",foreground:"008000"},{token:"number",foreground:"09885A"},{token:"number.hex",foreground:"3030c0"},{token:"regexp",foreground:"800000"},{token:"annotation",foreground:"808080"},{token:"type",foreground:"008080"},{token:"delimiter",foreground:"000000"},{token:"delimiter.html",foreground:"383838"},{token:"delimiter.xml",foreground:"0000FF"},{token:"tag",foreground:"800000"},{token:"tag.id.pug",foreground:"4F76AC"},{token:"tag.class.pug",foreground:"4F76AC"},{token:"meta.scss",foreground:"800000"},{token:"metatag",foreground:"e00000"},{token:"metatag.content.html",foreground:"FF0000"},{token:"metatag.html",foreground:"808080"},{token:"metatag.xml",foreground:"808080"},{token:"metatag.php",fontStyle:"bold"},{token:"key",foreground:"863B00"},{token:"string.key.json",foreground:"A31515"},{token:"string.value.json",foreground:"0451A5"},{token:"attribute.name",foreground:"FF0000"},{token:"attribute.value",foreground:"0451A5"},{token:"attribute.value.number",foreground:"09885A"},{token:"attribute.value.unit",foreground:"09885A"},{token:"attribute.value.html",foreground:"0000FF"},{token:"attribute.value.xml",foreground:"0000FF"},{token:"string",foreground:"A31515"},{token:"string.html",foreground:"0000FF"},{token:"string.sql",foreground:"FF0000"},{token:"string.yaml",foreground:"0451A5"},{token:"keyword",foreground:"0000FF"},{token:"keyword.json",foreground:"0451A5"},{token:"keyword.flow",foreground:"AF00DB"},{token:"keyword.flow.scss",foreground:"0000FF"},{token:"operator.scss",foreground:"666666"},{token:"operator.sql",foreground:"778899"},{token:"operator.swift",foreground:"666666"},{token:"predefined.sql",foreground:"FF00FF"}],colors:($k={},$k[Os]="#FFFFFE",$k[Rs]="#000000",$k[Hs]="#E5EBF1",$k[Ma]="#D3D3D3",$k[Ca]="#939393",$k[Vs]="#ADD6FF4D",$k)},lT={base:"vs-dark",inherit:!1,rules:[{token:"",foreground:"D4D4D4",background:"1E1E1E"},{token:"invalid",foreground:"f44747"},{token:"emphasis",fontStyle:"italic"},{token:"strong",fontStyle:"bold"},{token:"variable",foreground:"74B0DF"},{token:"variable.predefined",foreground:"4864AA"},{token:"variable.parameter",foreground:"9CDCFE"},{token:"constant",foreground:"569CD6"},{token:"comment",foreground:"608B4E"},{token:"number",foreground:"B5CEA8"},{token:"number.hex",foreground:"5BB498"},{token:"regexp",foreground:"B46695"},{token:"annotation",foreground:"cc6666"},{token:"type",foreground:"3DC9B0"},{token:"delimiter",foreground:"DCDCDC"},{token:"delimiter.html",foreground:"808080"},{token:"delimiter.xml",foreground:"808080"},{token:"tag",foreground:"569CD6"},{token:"tag.id.pug",foreground:"4F76AC"},{token:"tag.class.pug",foreground:"4F76AC"},{token:"meta.scss",foreground:"A79873"},{token:"meta.tag",foreground:"CE9178"},{token:"metatag",foreground:"DD6A6F"},{token:"metatag.content.html",foreground:"9CDCFE"},{token:"metatag.html",foreground:"569CD6"},{token:"metatag.xml",foreground:"569CD6"},{token:"metatag.php",fontStyle:"bold"},{token:"key",foreground:"9CDCFE"},{token:"string.key.json",foreground:"9CDCFE"},{token:"string.value.json",foreground:"CE9178"},{token:"attribute.name",foreground:"9CDCFE"},{token:"attribute.value",foreground:"CE9178"},{token:"attribute.value.number.css",foreground:"B5CEA8"},{token:"attribute.value.unit.css",foreground:"B5CEA8"},{token:"attribute.value.hex.css",foreground:"D4D4D4"},{token:"string",foreground:"CE9178"},{token:"string.sql",foreground:"FF0000"},{token:"keyword",foreground:"569CD6"},{token:"keyword.flow",foreground:"C586C0"},{token:"keyword.json",foreground:"CE9178"},{token:"keyword.flow.scss",foreground:"569CD6"},{token:"operator.scss",foreground:"909090"},{token:"operator.sql",foreground:"778899"},{token:"operator.swift",foreground:"909090"},{token:"predefined.sql",foreground:"FF00FF"}],colors:(eT={},eT[Os]="#1E1E1E",eT[Rs]="#D4D4D4",eT[Hs]="#3A3D41",eT[Ma]="#404040",eT[Ca]="#707070",eT[Vs]="#ADD6FF26",eT)},cT={base:"hc-black",inherit:!1,rules:[{token:"",foreground:"FFFFFF",background:"000000"},{token:"invalid",foreground:"f44747"},{token:"emphasis",fontStyle:"italic"},{token:"strong",fontStyle:"bold"},{token:"variable",foreground:"1AEBFF"},{token:"variable.parameter",foreground:"9CDCFE"},{token:"constant",foreground:"569CD6"},{token:"comment",foreground:"608B4E"},{token:"number",foreground:"FFFFFF"},{token:"regexp",foreground:"C0C0C0"},{token:"annotation",foreground:"569CD6"},{token:"type",foreground:"3DC9B0"},{token:"delimiter",foreground:"FFFF00"},{token:"delimiter.html",foreground:"FFFF00"},{token:"tag",foreground:"569CD6"},{token:"tag.id.pug",foreground:"4F76AC"},{token:"tag.class.pug",foreground:"4F76AC"},{token:"meta",foreground:"D4D4D4"},{token:"meta.tag",foreground:"CE9178"},{token:"metatag",foreground:"569CD6"},{token:"metatag.content.html",foreground:"1AEBFF"},{token:"metatag.html",foreground:"569CD6"},{token:"metatag.xml",foreground:"569CD6"},{token:"metatag.php",fontStyle:"bold"},{token:"key",foreground:"9CDCFE"},{token:"string.key",foreground:"9CDCFE"},{token:"string.value",foreground:"CE9178"},{token:"attribute.name",foreground:"569CD6"},{token:"attribute.value",foreground:"3FF23F"},{token:"string",foreground:"CE9178"},{token:"string.sql",foreground:"FF0000"},{token:"keyword",foreground:"569CD6"},{token:"keyword.flow",foreground:"C586C0"},{token:"operator.sql",foreground:"778899"},{token:"operator.swift",foreground:"909090"},{token:"predefined.sql",foreground:"FF00FF"}],colors:(tT={},tT[Os]="#000000",tT[Rs]="#FFFFFF",tT[Ma]="#FFFFFF",tT[Ca]="#FFFFFF",tT)},hT="vs",dT="vs-dark",fT="hc-black",pT=U.as(Qr),gT=U.as(Dr),mT=function(){function e(e,t){this.themeData=t;var n=t.base;e.length>0?(this.id=n+" "+e,this.themeName=e):(this.id=n,this.themeName=n),this.colors=null,this.defaultColors=Object.create(null),this._tokenTheme=null}return Object.defineProperty(e.prototype,"base",{get:function(){return this.themeData.base},enumerable:!0,configurable:!0}),e.prototype.notifyBaseUpdated=function(){this.themeData.inherit&&(this.colors=null,this._tokenTheme=null)},e.prototype.getColors=function(){if(!this.colors){var e=Object.create(null);for(var t in this.themeData.colors)e[t]=Go.fromHex(this.themeData.colors[t]);if(this.themeData.inherit){var n=yT(this.themeData.base);for(var t in n.colors)e[t]||(e[t]=Go.fromHex(n.colors[t]))}this.colors=e}return this.colors},e.prototype.getColor=function(e,t){return this.getColors()[e]||(!1!==t?this.getDefault(e):null)},e.prototype.getDefault=function(e){var t=this.defaultColors[e];return t||(t=pT.resolveDefaultColor(e,this),this.defaultColors[e]=t,t)},e.prototype.defines=function(e){return Object.prototype.hasOwnProperty.call(this.getColors(),e)},Object.defineProperty(e.prototype,"type",{get:function(){switch(this.base){case hT:return"light";case fT:return"hc";default:return"dark"}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"tokenTheme",{get:function(){if(!this._tokenTheme){var e=[],t=[];if(this.themeData.inherit){var n=yT(this.themeData.base);e=n.rules,n.encodedTokensColors&&(t=n.encodedTokensColors)}e=e.concat(this.themeData.rules),this.themeData.encodedTokensColors&&(t=this.themeData.encodedTokensColors),this._tokenTheme=oT.createFromRawTokenTheme(e,t)}return this._tokenTheme},enumerable:!0,configurable:!0}),e}();function vT(e){return e===hT||e===dT||e===fT}function yT(e){switch(e){case hT:return uT;case dT:return lT;case fT:return cT}}function bT(e){var t=yT(e);return new mT(e,t)}var _T,wT=function(){function e(){this.environment=Object.create(null),this._onThemeChange=new X.vl,this._knownThemes=new Map,this._knownThemes.set(hT,bT(hT)),this._knownThemes.set(dT,bT(dT)),this._knownThemes.set(fT,bT(fT)),this._styleElement=Wn(),this._styleElement.className="monaco-colors",this.setTheme(hT)}return Object.defineProperty(e.prototype,"onThemeChange",{get:function(){return this._onThemeChange.event},enumerable:!0,configurable:!0}),e.prototype.defineTheme=function(e,t){if(!/^[a-z0-9\-]+$/i.test(e))throw new Error("Illegal theme name!");if(!vT(t.base)&&!vT(e))throw new Error("Illegal theme base!");this._knownThemes.set(e,new mT(e,t)),vT(e)&&this._knownThemes.forEach((function(t){t.base===e&&t.notifyBaseUpdated()})),this._theme&&this._theme.themeName===e&&this.setTheme(e)},e.prototype.getTheme=function(){return this._theme},e.prototype.setTheme=function(e){var t,n=this;t=this._knownThemes.has(e)?this._knownThemes.get(e):this._knownThemes.get(hT),this._theme=t;var i=[],o={},r={addRule:function(e){o[e]||(i.push(e),o[e]=!0)}};gT.getThemingParticipants().forEach((function(e){return e(t,r,n.environment)}));var s=t.tokenTheme.getColorMap();return r.addRule(function(e){for(var t=[],n=1,i=e.length;n200)return e;if("object"==typeof e){switch(e.$mid){case 1:return L.A.revive(e);case 2:return new RegExp(e.source,e.flags)}for(var n in e)Object.hasOwnProperty.call(e,n)&&(e[n]=IT(e[n],t+1))}return e}var NT=new(function(){function e(){}return e.prototype.publicLog=function(e,t){return J.g3.wrap(null)},e.prototype.getTelemetryInfo=function(){return J.g3.wrap({instanceId:"someValue.instanceId",sessionId:"someValue.sessionId",machineId:"someValue.machineId"})},e}()),xT=function(e,t){return function(n,i){t(n,i,e)}},DT=function(){function e(e,t,n){void 0===n&&(n=NT),this._editorService=e,this._commandService=t,this._telemetryService=n}return e.prototype.open=function(e,t){var n;this._telemetryService.publicLog("openerService",{scheme:e.scheme});var i=e.scheme,o=e.path,r=e.query,s=e.fragment,a=J.g3.wrap(void 0);if(i===rr.http||i===rr.https||i===rr.mailto)ii(e.toString(!0));else if("command"===i&&k.getCommand(o)){var u=[];try{u=LT(r),Array.isArray(u)||(u=[u])}catch(e){}a=(n=this._commandService).executeCommand.apply(n,[o].concat(u))}else{var l=void 0,c=/^L?(\d+)(?:,(\d+))?/.exec(s);if(c&&(l={startLineNumber:parseInt(c[1]),startColumn:c[2]?parseInt(c[2]):1},e=e.with({fragment:""})),!e.scheme)return J.g3.as(void 0);e.scheme===rr.file&&(e=e.with({path:(0,bv.S8)(e.path)})),a=this._editorService.openCodeEditor({resource:e,options:{selection:l}},this._editorService.getFocusedCodeEditor(),t&&t.openToSide)}return a},function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([xT(0,Ce),xT(1,D),xT(2,(0,N.lq)(q))],e)}(),kT=function(){function e(){}return e.colorizeElement=function(e,t,n,i){var o=(i=i||{}).theme||"vs",r=i.mimeType||n.getAttribute("lang")||n.getAttribute("data-lang");if(r){e.setTheme(o);var s=n.firstChild.nodeValue;return n.className+=" "+o,this.colorize(t,s,r,i).then((function(e){n.innerHTML=e}),(function(e){return console.error(e)}))}console.error("Mode not detected")},e._tokenizationSupportChangedPromise=function(e){var t=null,n=function(){t&&(t.dispose(),t=null)};return new J.g3((function(i,o){t=No.dG.onDidChange((function(t){t.changedLanguages.indexOf(e)>=0&&(n(),i(void 0))}))}),n)},e.colorize=function(e,t,n,i){p.startsWithUTF8BOM(t)&&(t=t.substr(1));var o=t.split(/\r\n|\r|\n/),r=e.getModeId(n);void 0===(i=i||{}).tabSize&&(i.tabSize=4),e.getOrCreateMode(r);var s=No.dG.get(r);return s?J.g3.as(TT(o,i.tabSize,s)):J.g3.any([this._tokenizationSupportChangedPromise(r),J.g3.timeout(500)]).then((function(e){var t=No.dG.get(r);return t?TT(o,i.tabSize,t):function(e,t){var n=[],i=new Uint32Array(2);i[0]=0,i[1]=16793600;for(var o=0,r=e.length;o")}return n.join("")}(o,i.tabSize)}))},e.colorizeLine=function(e,t,n,i,o){void 0===o&&(o=4);var r=jo.isBasicASCII(e,t),s=jo.containsRTL(e,r,n);return Au(new xu(!1,e,!1,r,s,0,i,[],o,0,-1,"none",!1,!1)).html},e.colorizeModelLine=function(e,t,n){void 0===n&&(n=4);var i=e.getLineContent(t);e.forceTokenization(t);var o=e.getLineTokens(t).inflate();return this.colorizeLine(i,e.mightContainNonBasicASCII(),e.mightContainRTL(),o,n)},e}();function TT(e,t,n){return function(e,t,n){for(var i=[],o=n.getInitialState(),r=0,s=e.length;r"),o=u.endState}return i.join("")}(e,t,n)}var ET,AT,jT=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),OT=function(e){function t(t,n){var i=e.call(this,t,n.label)||this;return i._foreignModuleId=n.moduleId,i._foreignModuleCreateData=n.createData||null,i._foreignProxy=null,i}return jT(t,e),t.prototype._getForeignProxy=function(){var e=this;return this._foreignProxy||(this._foreignProxy=new vt(this._getProxy().then((function(t){return t.loadForeignModule(e._foreignModuleId,e._foreignModuleCreateData).then((function(n){e._foreignModuleId=null,e._foreignModuleCreateData=null;for(var i=function(e,n){return t.fmr(e,n)},o=function(e,t){return function(){var n=Array.prototype.slice.call(arguments,0);return t(e,n)}},r={},s=0;s'"_]/g,"-")}function VT(e,t){throw new Error(e.languageId+": "+t)}function UT(e,t,n,i,o){var r=null;return t.replace(/\$((\$)|(#)|(\d\d?)|[sS](\d\d?)|@(\w+))/g,(function(t,s,a,u,l,c,h,d,f){return FT(a)?FT(u)?!FT(l)&&l0;){var n=e.tokenizer[t];if(n)return n;var i=t.lastIndexOf(".");t=i<0?null:t.substr(0,i)}return null}function ZT(e,t,n){return"boolean"==typeof e?e:(n&&(e||void 0===t)&&n(),void 0===t?null:t)}function GT(e,t,n){return"string"==typeof e?e:(n&&(e||void 0===t)&&n(),void 0===t?null:t)}function QT(e,t){if("string"!=typeof t)return null;for(var n=0;t.indexOf("@")>=0&&n<5;)n++,t=t.replace(/@(\w+)/g,(function(n,i){var o="";return"string"==typeof e[i]?o=e[i]:e[i]&&e[i]instanceof RegExp?o=e[i].source:void 0===e[i]?VT(e,"language definition does not contain attribute '"+i+"', used at: "+t):VT(e,"attribute reference '"+i+"' must be a string, used at: "+t),FT(o)?"":"(?:"+o+")"}));return new RegExp(t,e.ignoreCase?"i":"")}function qT(e,t,n,i){var o=-1,r=n,s=n.match(/^\$(([sS]?)(\d\d?)|#)(.*)$/);s&&(s[3]&&(o=parseInt(s[3]),s[2]&&(o+=100)),r=s[4]);var a,u="~",l=r;if(r&&0!==r.length?/^\w*$/.test(l)?u="==":(s=r.match(/^(@|!@|~|!~|==|!=)(.*)$/))&&(u=s[1],l=s[2]):(u="!=",l=""),"~"!==u&&"!~"!==u||!/^(\w|\|)*$/.test(l))if("@"===u||"!@"===u){var c=e[l];c||VT(e,"the @ match target '"+l+"' is not defined, in rule: "+t),function(e,t){if(!t)return!1;if(!Array.isArray(t))return!1;for(var n in t)if(t.hasOwnProperty(n)&&"string"!=typeof t[n])return!1;return!0}(0,c)||VT(e,"the @ match target '"+l+"' must be an array of strings, in rule: "+t);var h=ri.qt(c,e.ignoreCase);a=function(e){return"@"===u?h(e):!h(e)}}else if("~"===u||"!~"===u)if(l.indexOf("$")<0){var d=QT(e,"^"+l+"$");a=function(e){return"~"===u?d.test(e):!d.test(e)}}else a=function(t,n,i,o){return QT(e,"^"+UT(e,l,n,i,o)+"$").test(t)};else if(l.indexOf("$")<0){var f=BT(e,l);a=function(e){return"=="===u?e===f:e!==f}}else{var p=BT(e,l);a=function(t,n,i,o,r){var s=UT(e,p,n,i,o);return"=="===u?t===s:t!==s}}else{var g=ri.qt(l.split("|"),e.ignoreCase);a=function(e){return"~"===u?g(e):!g(e)}}return-1===o?{name:n,value:i,test:function(e,t,n,i){return a(e,e,t,n,i)}}:{name:n,value:i,test:function(e,t,n,i){var r=function(e,t,n,i){if(i<0)return e;if(i=100){i-=100;var o=n.split(".");if(o.unshift(n),i=0&&(i.tokenSubst=!0),"string"==typeof n.bracket&&("@open"===n.bracket?i.bracket=1:"@close"===n.bracket?i.bracket=-1:VT(e,"a 'bracket' attribute must be either '@open' or '@close', in rule: "+t)),n.next)if("string"!=typeof n.next)VT(e,"the next state must be a string value in rule: "+t);else{var o=n.next;/^(@pop|@push|@popall)$/.test(o)||("@"===o[0]&&(o=o.substr(1)),o.indexOf("$")<0&&(function(e,t){for(;t&&t.length>0;){if(e.stateNames[t])return!0;var n=t.lastIndexOf(".");t=n<0?null:t.substr(0,n)}return!1}(e,UT(e,o,"",[],""))||VT(e,"the next state '"+n.next+"' is not defined in rule: "+t))),i.next=o}return"number"==typeof n.goBack&&(i.goBack=n.goBack),"string"==typeof n.switchTo&&(i.switchTo=n.switchTo),"string"==typeof n.log&&(i.log=n.log),"string"==typeof n.nextEmbedded&&(i.nextEmbedded=n.nextEmbedded,e.usesEmbedded=!0),i}if(Array.isArray(n)){var r=[];for(var s in n)n.hasOwnProperty(s)&&(r[s]=KT(e,t,n[s]));return{group:r}}if(n.cases){var a=[];for(var u in n.cases)if(n.cases.hasOwnProperty(u)){var l=KT(e,t,n.cases[u]);"@default"===u||"@"===u||""===u?a.push({test:null,value:l,name:u}):"@eos"===u?a.push({test:function(e,t,n,i){return i},value:l,name:u}):a.push(qT(e,t,u,l))}var c=e.defaultToken;return{test:function(e,t,n,i){for(var o in a)if(a.hasOwnProperty(o)&&(!a[o].test||a[o].test(e,t,n,i)))return a[o].value;return c}}}return VT(e,"an action must be a string, an object with a 'token' or 'cases' attribute, or an array of actions; in rule: "+t),""}return{token:""}}!function(e){e[e.Smooth=0]="Smooth",e[e.Immediate=1]="Immediate"}(ET||(ET={})),function(e){e[e.Off=0]="Off",e[e.On=1]="On",e[e.Relative=2]="Relative",e[e.Interval=3]="Interval",e[e.Custom=4]="Custom"}(AT||(AT={}));var JT=function(){function e(e){this.regex=new RegExp(""),this.action={token:""},this.matchOnlyAtLineStart=!1,this.name="",this.name=e}return e.prototype.setRegex=function(e,t){var n;"string"==typeof t?n=t:t instanceof RegExp?n=t.source:VT(e,"rules must start with a match string or regular expression: "+this.name),this.matchOnlyAtLineStart=n.length>0&&"^"===n[0],this.name=this.name+": "+n,this.regex=QT(e,"^(?:"+(this.matchOnlyAtLineStart?n.substr(1):n)+")")},e.prototype.setAction=function(e,t){this.action=KT(e,this.name,t)},e}(),XT=function(){function e(e){this._maxCacheDepth=e,this._entries=Object.create(null)}return e.create=function(e,t){return this._INSTANCE.create(e,t)},e.prototype.create=function(e,t){if(null!==e&&e.depth>=this._maxCacheDepth)return new $T(e,t);var n=$T.getStackElementId(e);n.length>0&&(n+="|"),n+=t;var i=this._entries[n];return i||(i=new $T(e,t),this._entries[n]=i,i)},e._INSTANCE=new e(5),e}(),$T=function(){function e(e,t){this.parent=e,this.state=t,this.depth=(this.parent?this.parent.depth:0)+1}return e.getStackElementId=function(e){for(var t="";null!==e;)t.length>0&&(t+="|"),t+=e.state,e=e.parent;return t},e._equals=function(e,t){for(;null!==e&&null!==t;){if(e===t)return!0;if(e.state!==t.state)return!1;e=e.parent,t=t.parent}return null===e&&null===t},e.prototype.equals=function(t){return e._equals(this,t)},e.prototype.push=function(e){return XT.create(this,e)},e.prototype.pop=function(){return this.parent},e.prototype.popall=function(){for(var e=this;e.parent;)e=e.parent;return e},e.prototype.switchTo=function(e){return XT.create(this.parent,e)},e}(),eE=function(){function e(e,t){this.modeId=e,this.state=t}return e.prototype.equals=function(e){return this.modeId===e.modeId&&this.state.equals(e.state)},e.prototype.clone=function(){return this.state.clone()===this.state?this:new e(this.modeId,this.state)},e}(),tE=function(){function e(e){this._maxCacheDepth=e,this._entries=Object.create(null)}return e.create=function(e,t){return this._INSTANCE.create(e,t)},e.prototype.create=function(e,t){if(null!==t)return new nE(e,t);if(null!==e&&e.depth>=this._maxCacheDepth)return new nE(e,t);var n=$T.getStackElementId(e),i=this._entries[n];return i||(i=new nE(e,null),this._entries[n]=i,i)},e._INSTANCE=new e(5),e}(),nE=function(){function e(e,t){this.stack=e,this.embeddedModeData=t}return e.prototype.clone=function(){return(this.embeddedModeData?this.embeddedModeData.clone():null)===this.embeddedModeData?this:tE.create(this.stack,this.embeddedModeData)},e.prototype.equals=function(t){return t instanceof e&&!!this.stack.equals(t.stack)&&(null===this.embeddedModeData&&null===t.embeddedModeData||null!==this.embeddedModeData&&null!==t.embeddedModeData&&this.embeddedModeData.equals(t.embeddedModeData))},e}(),iE=Object.hasOwnProperty,oE=function(){function e(){this._tokens=[],this._language=null,this._lastTokenType=null,this._lastTokenLanguage=null}return e.prototype.enterMode=function(e,t){this._language=t},e.prototype.emit=function(e,t){this._lastTokenType===t&&this._lastTokenLanguage===this._language||(this._lastTokenType=t,this._lastTokenLanguage=this._language,this._tokens.push(new Ix.ou(e,t,this._language)))},e.prototype.nestedModeTokenize=function(e,t,n){var i=t.modeId,o=t.state,r=No.dG.get(i);if(!r)return this.enterMode(n,i),this.emit(n,""),o;var s=r.tokenize(e,o,n);return this._tokens=this._tokens.concat(s.tokens),this._lastTokenType=null,this._lastTokenLanguage=null,this._language=null,s.endState},e.prototype.finalize=function(e){return new Ix.$M(this._tokens,e)},e}(),rE=function(){function e(e,t){this._modeService=e,this._theme=t,this._prependTokens=null,this._tokens=[],this._currentLanguageId=0,this._lastTokenMetadata=0}return e.prototype.enterMode=function(e,t){this._currentLanguageId=this._modeService.getLanguageIdentifier(t).id},e.prototype.emit=function(e,t){var n=this._theme.match(this._currentLanguageId,t);this._lastTokenMetadata!==n&&(this._lastTokenMetadata=n,this._tokens.push(e),this._tokens.push(n))},e._merge=function(e,t,n){var i=null!==e?e.length:0,o=t.length,r=null!==n?n.length:0;if(0===i&&0===o&&0===r)return new Uint32Array(0);if(0===i&&0===o)return n;if(0===o&&0===r)return e;var s=new Uint32Array(i+o+r);null!==e&&s.set(e);for(var a=0;a0&&i.nestedModeTokenize(s,t.embeddedModeData,n);var a=e.substring(o);return this._myTokenize(a,t,n+o,i)},e.prototype._myTokenize=function(e,t,n,i){i.enterMode(n,this._modeId);for(var o=e.length,r=t.embeddedModeData,s=t.stack,a=0,u=null,l=null,c=null,h=null;a=o)break;var w=this._lexer.tokenizer[g];w||(w=YT(this._lexer,g))||VT(this._lexer,"tokenizer state is not defined: "+g);var M=e.substr(a);for(var C in w)if(iE.call(w,C)){var S=w[C];if((0===a||!S.matchOnlyAtLineStart)&&(m=M.match(S.regex))){v=m[0],y=S.action;break}}}for(m||(m=[""],v=""),y||(a=this._lexer.maxStack?VT(this._lexer,"maximum tokenizer stack size reached: ["+s.state+","+s.parent.state+",...]"):s=s.push(g);else if("@pop"===y.next)s.depth<=1?VT(this._lexer,"trying to pop an empty stack in rule: "+b.name):s=s.pop();else if("@popall"===y.next)s=s.popall();else{var I;"@"===(I=UT(this._lexer,y.next,v,m,g))[0]&&(I=I.substr(1)),YT(this._lexer,I)?s=s.push(I):VT(this._lexer,"trying to set a next state '"+I+"' that is undefined in rule: "+b.name)}y.log&&"string"==typeof y.log&&(j=this._lexer,O=this._lexer.languageId+": "+UT(this._lexer,y.log,v,m,g),console.log(j.languageId+": "+O))}if(null===L&&VT(this._lexer,"lexer rule has no well-defined action in rule: "+b.name),Array.isArray(L)){u&&u.length>0&&VT(this._lexer,"groups cannot be nested: "+b.name),m.length!==L.length+1&&VT(this._lexer,"matched number of groups does not match the number of actions in rule: "+b.name);for(var N=0,x=1;x0&&o[r-1]===c)){var h=l.startIndex;0===a?h=0:h=1&&u.length<=3)if(c.setRegex(i,u[0]),u.length>=3)if("string"==typeof u[1])c.setAction(i,{token:u[1],next:u[2]});else if("object"==typeof u[1]){var h=u[1];h.next=u[2],c.setAction(i,h)}else VT(n,"a next state as the last element of a rule can only be given if the action is either an object or a string, at: "+e);else c.setAction(i,u[1]);else u.regex||VT(n,"a rule must either be an array, or an object with a 'regex' or 'include' field at: "+e),u.name&&(c.name=GT(u.name)),u.matchOnlyAtStart&&(c.matchOnlyAtLineStart=ZT(u.matchOnlyAtLineStart)),c.setRegex(i,u.regex),c.setAction(i,u.action);r.push(c)}}}for(var r in i.languageId=e,i.ignoreCase=n.ignoreCase,i.noThrow=n.noThrow,i.usesEmbedded=n.usesEmbedded,i.stateNames=t.tokenizer,i.defaultToken=n.defaultToken,t.tokenizer&&"object"==typeof t.tokenizer||VT(n,"a language definition must define the 'tokenizer' attribute as an object"),n.tokenizer=[],t.tokenizer)if(t.tokenizer.hasOwnProperty(r)){n.start||(n.start=r);var s=t.tokenizer[r];n.tokenizer[r]=new Array,o("tokenizer."+r,n.tokenizer[r],s)}n.usesEmbedded=i.usesEmbedded,t.brackets?Array.isArray(t.brackets)||VT(n,"the 'brackets' attribute must be defined as an array"):t.brackets=[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}];var a=[];for(var u in t.brackets)if(t.brackets.hasOwnProperty(u)){var l=t.brackets[u];l&&Array.isArray(l)&&3===l.length&&(l={token:l[2],open:l[0],close:l[1]}),l.open===l.close&&VT(n,"open and close brackets in a 'brackets' attribute must be different: "+l.open+"\n hint: use the 'bracket' attribute if matching on equal brackets is required."),"string"==typeof l.open&&"string"==typeof l.token?a.push({token:GT(l.token)+n.tokenPostfix,open:BT(n,GT(l.open)),close:BT(n,GT(l.close))}):VT(n,"every element in the 'brackets' array must be a '{open,close,token}' object or array")}return n.brackets=a,n.noThrow=!0,n}(e,t),i=function(e,t,n,i){return new sE(e,t,n,i)}(_T.modeService.get(),_T.standaloneThemeService.get(),e,n);return No.dG.register(e,i)},registerReferenceProvider:function(e,t){return No.aW.register(e,t)},registerRenameProvider:function(e,t){return No.rN.register(e,t)},registerCompletionItemProvider:function(e,t){var n=new dE(t);return No.er.register(e,{triggerCharacters:t.triggerCharacters,provideCompletionItems:function(e,t,i,o){return n.provideCompletionItems(e,t,i,o)},resolveCompletionItem:function(e,t,i,o){return n.resolveCompletionItem(e,t,i,o)}})},registerSignatureHelpProvider:function(e,t){return No.An.register(e,t)},registerHoverProvider:function(e,t){return No.r8.register(e,{provideHover:function(e,n,i){var o=e.getWordAtPosition(n);return dt(t.provideHover(e,n,i)).then((function(e){if(e)return!e.range&&o&&(e.range=new s.Q(n.lineNumber,o.startColumn,n.lineNumber,o.endColumn)),e.range||(e.range=new s.Q(n.lineNumber,n.column,n.lineNumber,n.column)),e}))}})},registerDocumentSymbolProvider:function(e,t){return No.Wd.register(e,t)},registerDocumentHighlightProvider:function(e,t){return No.UG.register(e,t)},registerDefinitionProvider:function(e,t){return No.UU.register(e,t)},registerImplementationProvider:function(e,t){return No.Lh.register(e,t)},registerTypeDefinitionProvider:function(e,t){return No.ce.register(e,t)},registerCodeLensProvider:function(e,t){return No.qh.register(e,t)},registerCodeActionProvider:function(e,t){return No.iM.register(e,{provideCodeActions:function(e,n,i,o){var r=_T.markerService.get().read({resource:e.uri}).filter((function(e){return s.Q.areIntersectingOrTouching(e,n)}));return t.provideCodeActions(e,n,{markers:r,only:i.only},o)}})},registerDocumentFormattingEditProvider:function(e,t){return No.NQ.register(e,t)},registerDocumentRangeFormattingEditProvider:function(e,t){return No.CW.register(e,t)},registerOnTypeFormattingEditProvider:function(e,t){return No.x4.register(e,t)},registerLinkProvider:function(e,t){return No.N9.register(e,t)},registerColorProvider:function(e,t){return No.Yu.register(e,t)},registerFoldingRangeProvider:function(e,t){return No.Z8.register(e,t)},DocumentHighlightKind:No.Kb,CompletionItemKind:uE,SymbolKind:No.v0,IndentAction:Qe.l,SuggestTriggerKind:No.tS,FoldingRangeKind:No.lO};var mE=gE.CancellationTokenSource,vE=gE.Emitter,yE=gE.KeyCode,bE=gE.KeyMod,_E=gE.Position,wE=gE.Range,ME=gE.Selection,CE=gE.SelectionDirection,SE=gE.MarkerSeverity,LE=gE.MarkerTag,IE=gE.Promise,NE=gE.Uri,xE=gE.Token,DE=gE.editor,kE=gE.languages;pE.monaco=gE,void 0!==pE.require&&"function"==typeof pE.require.config&&pE.require.config({ignoreDuplicateModules:["vscode-languageserver-types","vscode-languageserver-types/main","vscode-nls","vscode-nls/vscode-nls","jsonc-parser","jsonc-parser/main","vscode-uri","vscode-uri/index"]})},486:(e,t,n)=>{"use strict";function i(e,t){for(var n=[],i=2;ii})},4264:(e,t,n)=>{"use strict";var i;n.d(t,{_$:()=>i,_Y:()=>o,lq:()=>a,u1:()=>s}),function(e){e.serviceIds=new Map,e.DI_TARGET="$di$target",e.DI_DEPENDENCIES="$di$dependencies",e.getServiceDependencies=function(t){return t[e.DI_DEPENDENCIES]||[]}}(i||(i={}));var o=s("instantiationService");function r(e,t,n,o){t[i.DI_TARGET]===t?t[i.DI_DEPENDENCIES].push({id:e,index:n,optional:o}):(t[i.DI_DEPENDENCIES]=[{id:e,index:n,optional:o}],t[i.DI_TARGET]=t)}function s(e){if(i.serviceIds.has(e))return i.serviceIds.get(e);var t=function(e,n,i){if(3!==arguments.length)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");r(t,e,i,!1)};return t.toString=function(){return e},i.serviceIds.set(e,t),t}function a(e){return function(t,n,i){if(3!==arguments.length)throw new Error("@optional-decorator can only be used to decorate a parameter");r(e,t,i,!0)}}},7999:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(7850),o=n(8361);t.createConnection=function(e,t,n){return e.onError((function(e){t(e[0],e[1],e[2])})),e.onClose(n),{listen:function(){return e.listen()},sendRequest:function(t){for(var n=[],i=1;i{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(1175),o=function(){function e(){this.channels=new Map}return e.prototype.showMessage=function(e,t){for(var n=[],o=2;o{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(1175);t.Disposable=i.Disposable;var o=function(){function e(){this.disposables=[]}return e.prototype.dispose=function(){for(;0!==this.disposables.length;)this.disposables.pop().dispose()},e.prototype.push=function(e){var t=this.disposables;return t.push(e),{dispose:function(){var n=t.indexOf(e);-1!==n&&t.splice(n,1)}}},e}();t.DisposableCollection=o},9891:(e,t,n)=>{"use strict";function i(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}Object.defineProperty(t,"__esModule",{value:!0}),i(n(7861)),i(n(1175)),i(n(7999)),i(n(1871)),i(n(2239)),i(n(2407)),i(n(8130)),i(n(4960)),i(n(9209)),i(n(6877))},2239:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e){this.editor=e}return e.prototype.registerCommand=function(e,t,n){return this.editor._commandService.addCommand({id:e,handler:function(e){for(var n=[],i=1;i{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(7861),o=function(){function e(e,t){this.name=e,this.p2m=t,this.diagnostics=new Map,this.toDispose=new i.DisposableCollection}return e.prototype.dispose=function(){this.toDispose.dispose()},e.prototype.get=function(e){var t=this.diagnostics.get(e);return t?t.diagnostics:[]},e.prototype.set=function(e,t){var n=this,o=this.diagnostics.get(e);if(o)o.diagnostics=t;else{var s=new r(e,t,this.name,this.p2m);this.diagnostics.set(e,s),this.toDispose.push(i.Disposable.create((function(){n.diagnostics.delete(e),s.dispose()})))}},e}();t.MonacoDiagnosticCollection=o;var r=function(){function e(e,t,n,i){var o=this;this.owner=n,this.p2m=i,this._markers=[],this._diagnostics=[],this.uri=monaco.Uri.parse(e),this.diagnostics=t,monaco.editor.onDidCreateModel((function(e){return o.doUpdateModelMarkers(e)}))}return Object.defineProperty(e.prototype,"diagnostics",{get:function(){return this._diagnostics},set:function(e){this._diagnostics=e,this._markers=this.p2m.asDiagnostics(e),this.updateModelMarkers()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"markers",{get:function(){return this._markers},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){this._markers=[],this.updateModelMarkers()},e.prototype.updateModelMarkers=function(){var e=monaco.editor.getModel(this.uri);this.doUpdateModelMarkers(e)},e.prototype.doUpdateModelMarkers=function(e){e&&this.uri.toString()===e.uri.toString()&&monaco.editor.setModelMarkers(e,this.owner,this._markers)},e}();t.MonacoModelDiagnostics=r},1871:function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=function(e,t){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},i(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var r=n(2947),s=n(1585),a=n(2117),u=n(4868),l=n(8822),c=n(222);!function(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}(n(2947));var h=function(e){function t(n){var i=n.id,o=n.name,r=n.clientOptions,s=n.connectionProvider,a=e.call(this,i||o.toLowerCase(),o,r)||this;a.connectionProvider=s,a.createConnection=a.doCreateConnection.bind(a);var u=a;return u._p2c=new Proxy(u._p2c,{get:function(e,n){return"asUri"===n?e[n]:t.bypassConversion}}),u._c2p=new Proxy(u._c2p,{get:function(e,n){return"asUri"===n?e[n]:"asCompletionParams"===n?function(t,n,i){return{textDocument:e.asTextDocumentIdentifier(t),position:n,context:i}}:"asWillSaveTextDocumentParams"===n?function(t){return{textDocument:e.asTextDocumentIdentifier(t.document),reason:t.reason}}:n.endsWith("Params")?e[n]:t.bypassConversion}}),a}return o(t,e),t.prototype.doCreateConnection=function(){var e=this.handleConnectionError.bind(this),t=this.handleConnectionClosed.bind(this);return this.connectionProvider.get(e,t,this.outputChannel)},t.prototype.createMessageTransports=function(e){throw new Error("Unsupported")},t.prototype.registerBuiltinFeatures=function(){e.prototype.registerBuiltinFeatures.call(this),this.registerFeature(new s.TypeDefinitionFeature(this)),this.registerFeature(new a.ImplementationFeature(this)),this.registerFeature(new u.ColorProviderFeature(this)),this.registerFeature(new l.WorkspaceFoldersFeature(this));var n=new c.FoldingRangeFeature(this);n.asFoldingRanges=t.bypassConversion,this.registerFeature(n)},t.bypassConversion=function(e){return e||void 0},t}(r.BaseLanguageClient);t.MonacoLanguageClient=h},8130:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i,o=n(4922),r=n(1175),s=n(459),a=n(7861);function u(e,t){return o(e,{extended:!0,globstar:!0}).test(t)}function l(){for(var e=[],t=0,n=monaco.languages.getLanguages().map((function(e){return e.id}));t{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(6877),o=n(2239),r=n(8130),s=n(4960),a=n(2407),u=n(1175);!function(e){function t(e,t){void 0===t&&(t={});var n=new i.MonacoToProtocolConverter,u=new i.ProtocolToMonacoConverter;return{commands:new o.MonacoCommands(e),languages:new r.MonacoLanguages(u,n),workspace:new s.MonacoWorkspace(u,n,t.rootUri),window:new a.ConsoleWindow}}e.create=t,e.install=function(e,n){void 0===n&&(n={});var i=t(e,n);return u.Services.install(i),i},e.get=function(){return u.Services.get()}}(t.MonacoServices||(t.MonacoServices={}))},4960:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(1175),o=function(){function e(e,t,n){void 0===n&&(n=null);var o=this;this.p2m=e,this.m2p=t,this._rootUri=n,this.documents=new Map,this.onDidOpenTextDocumentEmitter=new i.Emitter,this.onDidCloseTextDocumentEmitter=new i.Emitter,this.onDidChangeTextDocumentEmitter=new i.Emitter;for(var r=0,s=monaco.editor.getModels();r{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i,o=n(7850),r=n(9204);t.Disposable=r.Disposable,t.CancellationToken=r.CancellationToken,t.Event=r.Event,t.Emitter=r.Emitter,function(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}(n(7850)),function(e){var t=window,n=Symbol("Services");e.get=function(){var e=t[n];if(!e)throw new Error("Language Client services has not been installed");return e},e.install=function(e){t[n]&&console.error(new Error("Language Client services has been overriden")),t[n]=e}}(t.Services||(t.Services={})),t.isDocumentSelector=function(e){return!(!e||!Array.isArray(e))&&e.every((function(e){return"string"==typeof e||o.DocumentFilter.is(e)}))},(t.DocumentIdentifier||(t.DocumentIdentifier={})).is=function(e){return!!e&&"uri"in e&&"languageId"in e},(i=t.ConfigurationTarget||(t.ConfigurationTarget={}))[i.Global=1]="Global",i[i.Workspace=2]="Workspace",i[i.WorkspaceFolder=3]="WorkspaceFolder"},8316:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(o,r){function s(e){try{u(i.next(e))}catch(e){r(e)}}function a(e){try{u(i.throw(e))}catch(e){r(e)}}function u(e){e.done?o(e.value):new n((function(t){t(e.value)})).then(s,a)}u((i=i.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,i,o,r,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return r={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function a(r){return function(a){return function(r){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,i&&(o=2&r[0]?i.return:r[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,r[1])).done)return o;switch(i=0,o&&(r=[2&r[0],o.value]),r[0]){case 0:case 1:o=r;break;case 4:return s.label++,{value:r[1],done:!1};case 5:s.label++,i=r[1],r=[0];continue;case 7:r=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==r[0]&&2!==r[0])){s=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]{"use strict";var i=n(8316),o=n(1175);e.exports=i.createVSCodeApi(o.Services.get)},1134:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i,o=n(712),r=n(3717);!function(e){e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:o.Event.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:o.Event.None}),e.is=function(t){var n=t;return n&&(n===e.None||n===e.Cancelled||r.boolean(n.isCancellationRequested)&&!!n.onCancellationRequested)}}(i=t.CancellationToken||(t.CancellationToken={}));var s=Object.freeze((function(e,t){var n=setTimeout(e.bind(t),0);return{dispose:function(){clearTimeout(n)}}})),a=function(){function e(){this._isCancelled=!1}return e.prototype.cancel=function(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this._emitter=void 0))},Object.defineProperty(e.prototype,"isCancellationRequested",{get:function(){return this._isCancelled},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onCancellationRequested",{get:function(){return this._isCancelled?s:(this._emitter||(this._emitter=new o.Emitter),this._emitter.event)},enumerable:!0,configurable:!0}),e}(),u=function(){function e(){}return Object.defineProperty(e.prototype,"token",{get:function(){return this._token||(this._token=new a),this._token},enumerable:!0,configurable:!0}),e.prototype.cancel=function(){this._token?this._token.cancel():this._token=i.Cancelled},e.prototype.dispose=function(){this.cancel()},e}();t.CancellationTokenSource=u},712:(e,t)=>{"use strict";var n,i;Object.defineProperty(t,"__esModule",{value:!0}),(t.Disposable||(t.Disposable={})).create=function(e){return{dispose:e}},n=t.Event||(t.Event={}),i={dispose:function(){}},n.None=function(){return i};var o=function(){function e(){}return e.prototype.add=function(e,t,n){var i=this;void 0===t&&(t=null),this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(e),this._contexts.push(t),Array.isArray(n)&&n.push({dispose:function(){return i.remove(e,t)}})},e.prototype.remove=function(e,t){if(void 0===t&&(t=null),this._callbacks){for(var n=!1,i=0,o=this._callbacks.length;i{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=Object.prototype.toString;function i(e){return"[object String]"===n.call(e)}function o(e){return Array.isArray(e)}t.boolean=function(e){return!0===e||!1===e},t.string=i,t.number=function(e){return"[object Number]"===n.call(e)},t.error=function(e){return"[object Error]"===n.call(e)},t.func=function(e){return"[object Function]"===n.call(e)},t.array=o,t.stringArray=function(e){return o(e)&&e.every((function(e){return i(e)}))}},9316:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.None=0,e.First=1,e.Last=2}(n=t.Touch||(t.Touch={}));var i=function(){function e(){this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0}return e.prototype.clear=function(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0},e.prototype.isEmpty=function(){return!this._head&&!this._tail},Object.defineProperty(e.prototype,"size",{get:function(){return this._size},enumerable:!0,configurable:!0}),e.prototype.has=function(e){return this._map.has(e)},e.prototype.get=function(e){var t=this._map.get(e);if(t)return t.value},e.prototype.set=function(e,t,i){void 0===i&&(i=n.None);var o=this._map.get(e);if(o)o.value=t,i!==n.None&&this.touch(o,i);else{switch(o={key:e,value:t,next:void 0,previous:void 0},i){case n.None:this.addItemLast(o);break;case n.First:this.addItemFirst(o);break;case n.Last:default:this.addItemLast(o)}this._map.set(e,o),this._size++}},e.prototype.delete=function(e){var t=this._map.get(e);return!!t&&(this._map.delete(e),this.removeItem(t),this._size--,!0)},e.prototype.shift=function(){if(this._head||this._tail){if(!this._head||!this._tail)throw new Error("Invalid list");var e=this._head;return this._map.delete(e.key),this.removeItem(e),this._size--,e.value}},e.prototype.forEach=function(e,t){for(var n=this._head;n;)t?e.bind(t)(n.value,n.key,this):e(n.value,n.key,this),n=n.next},e.prototype.forEachReverse=function(e,t){for(var n=this._tail;n;)t?e.bind(t)(n.value,n.key,this):e(n.value,n.key,this),n=n.previous},e.prototype.values=function(){for(var e=[],t=this._head;t;)e.push(t.value),t=t.next;return e},e.prototype.keys=function(){for(var e=[],t=this._head;t;)e.push(t.key),t=t.next;return e},e.prototype.addItemFirst=function(e){if(this._head||this._tail){if(!this._head)throw new Error("Invalid list");e.next=this._head,this._head.previous=e}else this._tail=e;this._head=e},e.prototype.addItemLast=function(e){if(this._head||this._tail){if(!this._tail)throw new Error("Invalid list");e.previous=this._tail,this._tail.next=e}else this._head=e;this._tail=e},e.prototype.removeItem=function(e){if(e===this._head&&e===this._tail)this._head=void 0,this._tail=void 0;else if(e===this._head)this._head=e.next;else if(e===this._tail)this._tail=e.previous;else{var t=e.next,n=e.previous;if(!t||!n)throw new Error("Invalid list");t.previous=n,n.next=t}},e.prototype.touch=function(e,t){if(!this._head||!this._tail)throw new Error("Invalid list");if(t===n.First||t===n.Last)if(t===n.First){if(e===this._head)return;var i=e.next,o=e.previous;e===this._tail?(o.next=void 0,this._tail=o):(i.previous=o,o.next=i),e.previous=void 0,e.next=this._head,this._head.previous=e,this._head=e}else if(t===n.Last){if(e===this._tail)return;i=e.next,o=e.previous,e===this._head?(i.previous=void 0,this._head=i):(i.previous=o,o.next=i),e.next=void 0,e.previous=this._tail,this._tail.next=e,this._tail=e}},e}();t.LinkedMap=i},9204:function(e,t,n){"use strict";var i,o=n(7188).setImmedate,r=this&&this.__extends||(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});function s(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}Object.defineProperty(t,"__esModule",{value:!0});var a=n(3717),u=n(3997);t.RequestType=u.RequestType,t.RequestType0=u.RequestType0,t.RequestType1=u.RequestType1,t.RequestType2=u.RequestType2,t.RequestType3=u.RequestType3,t.RequestType4=u.RequestType4,t.RequestType5=u.RequestType5,t.RequestType6=u.RequestType6,t.RequestType7=u.RequestType7,t.RequestType8=u.RequestType8,t.RequestType9=u.RequestType9,t.ResponseError=u.ResponseError,t.ErrorCodes=u.ErrorCodes,t.NotificationType=u.NotificationType,t.NotificationType0=u.NotificationType0,t.NotificationType1=u.NotificationType1,t.NotificationType2=u.NotificationType2,t.NotificationType3=u.NotificationType3,t.NotificationType4=u.NotificationType4,t.NotificationType5=u.NotificationType5,t.NotificationType6=u.NotificationType6,t.NotificationType7=u.NotificationType7,t.NotificationType8=u.NotificationType8,t.NotificationType9=u.NotificationType9;var l=n(9177);t.MessageReader=l.MessageReader,t.StreamMessageReader=l.StreamMessageReader,t.IPCMessageReader=l.IPCMessageReader,t.SocketMessageReader=l.SocketMessageReader;var c=n(2677);t.MessageWriter=c.MessageWriter,t.StreamMessageWriter=c.StreamMessageWriter,t.IPCMessageWriter=c.IPCMessageWriter,t.SocketMessageWriter=c.SocketMessageWriter;var h=n(712);t.Disposable=h.Disposable,t.Event=h.Event,t.Emitter=h.Emitter;var d=n(1134);t.CancellationTokenSource=d.CancellationTokenSource,t.CancellationToken=d.CancellationToken;var f,p,g,m,v,y=n(9316);s(n(7706)),s(n(8578)),function(e){e.type=new u.NotificationType("$/cancelRequest")}(f||(f={})),t.NullLogger=Object.freeze({error:function(){},warn:function(){},info:function(){},log:function(){}}),function(e){e[e.Off=0]="Off",e[e.Messages=1]="Messages",e[e.Verbose=2]="Verbose"}(p=t.Trace||(t.Trace={})),function(e){e.fromString=function(t){switch(t=t.toLowerCase()){case"off":default:return e.Off;case"messages":return e.Messages;case"verbose":return e.Verbose}},e.toString=function(t){switch(t){case e.Off:return"off";case e.Messages:return"messages";case e.Verbose:return"verbose";default:return"off"}}}(p=t.Trace||(t.Trace={})),function(e){e.type=new u.NotificationType("$/setTraceNotification")}(g=t.SetTraceNotification||(t.SetTraceNotification={})),function(e){e.type=new u.NotificationType("$/logTraceNotification")}(m=t.LogTraceNotification||(t.LogTraceNotification={})),function(e){e[e.Closed=1]="Closed",e[e.Disposed=2]="Disposed",e[e.AlreadyListening=3]="AlreadyListening"}(v=t.ConnectionErrors||(t.ConnectionErrors={}));var b,_=function(e){function t(n,i){var o=e.call(this,i)||this;return o.code=n,Object.setPrototypeOf(o,t.prototype),o}return r(t,e),t}(Error);function w(e,t,n,i){var r,s,l=0,c=0,w=0,M="2.0",C=void 0,S=Object.create(null),L=void 0,I=Object.create(null),N=new y.LinkedMap,x=Object.create(null),D=Object.create(null),k=p.Off,T=b.New,E=new h.Emitter,A=new h.Emitter,j=new h.Emitter,O=new h.Emitter;function R(e){return"req-"+e.toString()}function P(e){}function z(){return T===b.Listening}function W(){return T===b.Closed}function F(){return T===b.Disposed}function B(){T!==b.New&&T!==b.Listening||(T=b.Closed,A.fire(void 0))}function H(){r||0===N.size||(r=o((function(){r=void 0,function(){if(0!==N.size){var e=N.shift();try{u.isRequestMessage(e)?function(e){if(!F()){!function(e){if(k!==p.Off&&s){var t=void 0;k===p.Verbose&&e.params&&(t="Params: "+JSON.stringify(e.params,null,4)+"\n\n"),s.log("Received request '"+e.method+" - ("+e.id+")'.",t)}}(e);var n,i,o=S[e.method];o&&(n=o.type,i=o.handler);var r=Date.now();if(i||C){var l=new d.CancellationTokenSource,c=String(e.id);D[c]=l;try{var h,f=h=void 0===e.params||void 0!==n&&0===n.numberOfParams?i?i(l.token):C(e.method,l.token):a.array(e.params)&&(void 0===n||n.numberOfParams>1)?i?i.apply(void 0,e.params.concat([l.token])):C.apply(void 0,[e.method].concat(e.params,[l.token])):i?i(e.params,l.token):C(e.method,e.params,l.token);h?f.then?f.then((function(t){delete D[c],g(t,e.method,r)}),(function(t){delete D[c],t instanceof u.ResponseError?m(t,e.method,r):t&&a.string(t.message)?m(new u.ResponseError(u.ErrorCodes.InternalError,"Request "+e.method+" failed with message: "+t.message),e.method,r):m(new u.ResponseError(u.ErrorCodes.InternalError,"Request "+e.method+" failed unexpectedly without providing any details."),e.method,r)})):(delete D[c],g(h,e.method,r)):(delete D[c],function(n,i,o){void 0===n&&(n=null);var r={jsonrpc:M,id:e.id,result:n};U(r,i,o),t.write(r)}(h,e.method,r))}catch(t){delete D[c],t instanceof u.ResponseError?g(t,e.method,r):t&&a.string(t.message)?m(new u.ResponseError(u.ErrorCodes.InternalError,"Request "+e.method+" failed with message: "+t.message),e.method,r):m(new u.ResponseError(u.ErrorCodes.InternalError,"Request "+e.method+" failed unexpectedly without providing any details."),e.method,r)}}else m(new u.ResponseError(u.ErrorCodes.MethodNotFound,"Unhandled method "+e.method),e.method,r)}function g(n,i,o){var r={jsonrpc:M,id:e.id};n instanceof u.ResponseError?r.error=n.toJson():r.result=void 0===n?null:n,U(r,i,o),t.write(r)}function m(n,i,o){var r={jsonrpc:M,id:e.id,error:n.toJson()};U(r,i,o),t.write(r)}}(e):u.isNotificationMessage(e)?function(e){if(!F()){var t,i=void 0;if(e.method===f.type.method)t=function(e){var t=e.id,n=D[String(t)];n&&n.cancel()};else{var o=I[e.method];o&&(t=o.handler,i=o.type)}if(t||L)try{!function(e){if(k!==p.Off&&s&&e.method!==m.type.method){var t=void 0;k===p.Verbose&&(t=e.params?"Params: "+JSON.stringify(e.params,null,4)+"\n\n":"No parameters provided.\n\n"),s.log("Received notification '"+e.method+"'.",t)}}(e),void 0===e.params||void 0!==i&&0===i.numberOfParams?t?t():L(e.method):a.array(e.params)&&(void 0===i||i.numberOfParams>1)?t?t.apply(void 0,e.params):L.apply(void 0,[e.method].concat(e.params)):t?t(e.params):L(e.method,e.params)}catch(t){t.message?n.error("Notification handler '"+e.method+"' failed with message: "+t.message):n.error("Notification handler '"+e.method+"' failed unexpectedly.")}else j.fire(e)}}(e):u.isResponseMessage(e)?function(e){if(!F())if(null===e.id)e.error?n.error("Received response message without id: Error is: \n"+JSON.stringify(e.error,void 0,4)):n.error("Received response message without id. No further error information provided.");else{var t=String(e.id),i=x[t];if(function(e,t){if(k!==p.Off&&s){var n=void 0;if(k===p.Verbose&&(e.error&&e.error.data?n="Error data: "+JSON.stringify(e.error.data,null,4)+"\n\n":e.result?n="Result: "+JSON.stringify(e.result,null,4)+"\n\n":void 0===e.error&&(n="No result returned.\n\n")),t){var i=e.error?" Request failed: "+e.error.message+" ("+e.error.code+").":"";s.log("Received response '"+t.method+" - ("+e.id+")' in "+(Date.now()-t.timerStart)+"ms."+i,n)}else s.log("Received response "+e.id+" without active response promise.",n)}}(e,i),i){delete x[t];try{if(e.error){var o=e.error;i.reject(new u.ResponseError(o.code,o.message,o.data))}else{if(void 0===e.result)throw new Error("Should never happen.");i.resolve(e.result)}}catch(o){o.message?n.error("Response handler '"+i.method+"' failed with message: "+o.message):n.error("Response handler '"+i.method+"' failed unexpectedly.")}}}}(e):function(e){if(e){n.error("Received message which is neither a response nor a notification message:\n"+JSON.stringify(e,null,4));var t=e;if(a.string(t.id)||a.number(t.id)){var i=String(t.id),o=x[i];o&&o.reject(new Error("The received response has neither a result nor an error property."))}}else n.error("Received empty message.")}(e)}finally{H()}}}()})))}e.onClose(B),e.onError((function(e){E.fire([e,void 0,void 0])})),t.onClose(B),t.onError((function(e){E.fire(e)}));var V=function(e){try{if(u.isNotificationMessage(e)&&e.method===f.type.method){var n=R(e.params.id),o=N.get(n);if(u.isRequestMessage(o)){var r=i&&i.cancelUndispatched?i.cancelUndispatched(o,P):void 0;if(r&&(void 0!==r.error||void 0!==r.result))return N.delete(n),r.id=o.id,U(r,e.method,Date.now()),void t.write(r)}}!function(e,t){var n;u.isRequestMessage(t)?e.set(R(t.id),t):u.isResponseMessage(t)?e.set(null===(n=t.id)?"res-unknown-"+(++w).toString():"res-"+n.toString(),t):e.set("not-"+(++c).toString(),t)}(N,e)}finally{H()}};function U(e,t,n){if(k!==p.Off&&s){var i=void 0;k===p.Verbose&&(e.error&&e.error.data?i="Error data: "+JSON.stringify(e.error.data,null,4)+"\n\n":e.result?i="Result: "+JSON.stringify(e.result,null,4)+"\n\n":void 0===e.error&&(i="No result returned.\n\n")),s.log("Sending response '"+t+" - ("+e.id+")'. Processing request took "+(Date.now()-n)+"ms",i)}}function Y(){if(W())throw new _(v.Closed,"Connection is closed.");if(F())throw new _(v.Disposed,"Connection is disposed.")}function Z(e){return void 0===e?null:e}function G(e,t){var n,i=e.numberOfParams;switch(i){case 0:n=null;break;case 1:n=Z(t[0]);break;default:n=[];for(var o=0;o=t.length)t.copy(this.buffer,this.index,0,t.length);else{var r=(Math.ceil((this.index+t.length)/u)+1)*u;0===this.index?(this.buffer=new o(r),t.copy(this.buffer,0,0,t.length)):this.buffer=o.concat([this.buffer.slice(0,this.index),t],r)}this.index+=t.length},e.prototype.tryReadHeaders=function(){for(var e=void 0,t=0;t+3=this.index)return e;e=Object.create(null),this.buffer.toString("ascii",0,t).split("\r\n").forEach((function(t){var n=t.indexOf(":");if(-1===n)throw new Error("Message header must separate key and value using :");var i=t.substr(0,n),o=t.substr(n+1).trim();e[i]=o}));var n=t+4;return this.buffer=this.buffer.slice(n),this.index=this.index-n,e},e.prototype.tryReadContent=function(e){if(this.index0&&t.doWriteMessage(t.queue.shift())})))}catch(t){this.errorCount++,this.fireError(t,e,this.errorCount)}},t}(c);t.IPCMessageWriter=d;var f=function(e){function t(t,n){void 0===n&&(n="utf8");var i=e.call(this)||this;return i.socket=t,i.queue=[],i.sending=!1,i.encoding=n,i.errorCount=0,i.socket.on("error",(function(e){return i.fireError(e)})),i.socket.on("close",(function(){return i.fireClose()})),i}return r(t,e),t.prototype.write=function(e){this.sending||0!==this.queue.length?this.queue.push(e):this.doWriteMessage(e)},t.prototype.doWriteMessage=function(e){var t=this,n=JSON.stringify(e),i=o.byteLength(n,this.encoding),r=[u,i.toString(),l,l];try{this.sending=!0,this.socket.write(r.join(""),"ascii",(function(i){i&&t.handleError(i,e);try{t.socket.write(n,t.encoding,(function(n){t.sending=!1,n?t.handleError(n,e):t.errorCount=0,t.queue.length>0&&t.doWriteMessage(t.queue.shift())}))}catch(i){t.handleError(i,e)}}))}catch(t){this.handleError(t,e)}},t.prototype.handleError=function(e,t){this.errorCount++,this.fireError(e,t,this.errorCount)},t}(c);t.SocketMessageWriter=f},3997:function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var r,s=n(3717);!function(e){e.ParseError=-32700,e.InvalidRequest=-32600,e.MethodNotFound=-32601,e.InvalidParams=-32602,e.InternalError=-32603,e.serverErrorStart=-32099,e.serverErrorEnd=-32e3,e.ServerNotInitialized=-32002,e.UnknownErrorCode=-32001,e.RequestCancelled=-32800,e.MessageWriteError=1,e.MessageReadError=2}(r=t.ErrorCodes||(t.ErrorCodes={}));var a=function(e){function t(n,i,o){var a=e.call(this,i)||this;return a.code=s.number(n)?n:r.UnknownErrorCode,a.data=o,Object.setPrototypeOf(a,t.prototype),a}return o(t,e),t.prototype.toJson=function(){return{code:this.code,message:this.message,data:this.data}},t}(Error);t.ResponseError=a;var u=function(){function e(e,t){this._method=e,this._numberOfParams=t}return Object.defineProperty(e.prototype,"method",{get:function(){return this._method},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"numberOfParams",{get:function(){return this._numberOfParams},enumerable:!0,configurable:!0}),e}();t.AbstractMessageType=u;var l=function(e){function t(t){var n=e.call(this,t,0)||this;return n._=void 0,n}return o(t,e),t}(u);t.RequestType0=l;var c=function(e){function t(t){var n=e.call(this,t,1)||this;return n._=void 0,n}return o(t,e),t}(u);t.RequestType=c;var h=function(e){function t(t){var n=e.call(this,t,1)||this;return n._=void 0,n}return o(t,e),t}(u);t.RequestType1=h;var d=function(e){function t(t){var n=e.call(this,t,2)||this;return n._=void 0,n}return o(t,e),t}(u);t.RequestType2=d;var f=function(e){function t(t){var n=e.call(this,t,3)||this;return n._=void 0,n}return o(t,e),t}(u);t.RequestType3=f;var p=function(e){function t(t){var n=e.call(this,t,4)||this;return n._=void 0,n}return o(t,e),t}(u);t.RequestType4=p;var g=function(e){function t(t){var n=e.call(this,t,5)||this;return n._=void 0,n}return o(t,e),t}(u);t.RequestType5=g;var m=function(e){function t(t){var n=e.call(this,t,6)||this;return n._=void 0,n}return o(t,e),t}(u);t.RequestType6=m;var v=function(e){function t(t){var n=e.call(this,t,7)||this;return n._=void 0,n}return o(t,e),t}(u);t.RequestType7=v;var y=function(e){function t(t){var n=e.call(this,t,8)||this;return n._=void 0,n}return o(t,e),t}(u);t.RequestType8=y;var b=function(e){function t(t){var n=e.call(this,t,9)||this;return n._=void 0,n}return o(t,e),t}(u);t.RequestType9=b;var _=function(e){function t(t){var n=e.call(this,t,1)||this;return n._=void 0,n}return o(t,e),t}(u);t.NotificationType=_;var w=function(e){function t(t){var n=e.call(this,t,0)||this;return n._=void 0,n}return o(t,e),t}(u);t.NotificationType0=w;var M=function(e){function t(t){var n=e.call(this,t,1)||this;return n._=void 0,n}return o(t,e),t}(u);t.NotificationType1=M;var C=function(e){function t(t){var n=e.call(this,t,2)||this;return n._=void 0,n}return o(t,e),t}(u);t.NotificationType2=C;var S=function(e){function t(t){var n=e.call(this,t,3)||this;return n._=void 0,n}return o(t,e),t}(u);t.NotificationType3=S;var L=function(e){function t(t){var n=e.call(this,t,4)||this;return n._=void 0,n}return o(t,e),t}(u);t.NotificationType4=L;var I=function(e){function t(t){var n=e.call(this,t,5)||this;return n._=void 0,n}return o(t,e),t}(u);t.NotificationType5=I;var N=function(e){function t(t){var n=e.call(this,t,6)||this;return n._=void 0,n}return o(t,e),t}(u);t.NotificationType6=N;var x=function(e){function t(t){var n=e.call(this,t,7)||this;return n._=void 0,n}return o(t,e),t}(u);t.NotificationType7=x;var D=function(e){function t(t){var n=e.call(this,t,8)||this;return n._=void 0,n}return o(t,e),t}(u);t.NotificationType8=D;var k=function(e){function t(t){var n=e.call(this,t,9)||this;return n._=void 0,n}return o(t,e),t}(u);t.NotificationType9=k,t.isRequestMessage=function(e){var t=e;return t&&s.string(t.method)&&(s.string(t.id)||s.number(t.id))},t.isNotificationMessage=function(e){var t=e;return t&&s.string(t.method)&&void 0===e.id},t.isResponseMessage=function(e){var t=e;return t&&(void 0!==t.result||!!t.error)&&(s.string(t.id)||s.number(t.id)||null===t.id)}},7706:(e,t,n)=>{"use strict";var i=n(8957);Object.defineProperty(t,"__esModule",{value:!0});var o=n(4708),r=n(2935),s=n(5314),a=n(8489),u=n(9177),l=n(2677);t.generateRandomPipeName=function(){var e=s.randomBytes(21).toString("hex");return"win32"===i.platform?"\\\\.\\pipe\\vscode-jsonrpc-"+e+"-sock":o.join(r.tmpdir(),"vscode-"+e+".sock")},t.createClientPipeTransport=function(e,t){var n;void 0===t&&(t="utf-8");var i=new Promise((function(e,t){n=e}));return new Promise((function(o,r){var s=a.createServer((function(e){s.close(),n([new u.SocketMessageReader(e,t),new l.SocketMessageWriter(e,t)])}));s.on("error",r),s.listen(e,(function(){s.removeListener("error",r),o({onConnected:function(){return i}})}))}))},t.createServerPipeTransport=function(e,t){void 0===t&&(t="utf-8");var n=a.createConnection(e);return[new u.SocketMessageReader(n,t),new l.SocketMessageWriter(n,t)]}},8578:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(8489),o=n(9177),r=n(2677);t.createClientSocketTransport=function(e,t){var n;void 0===t&&(t="utf-8");var s=new Promise((function(e,t){n=e}));return new Promise((function(a,u){var l=i.createServer((function(e){l.close(),n([new o.SocketMessageReader(e,t),new r.SocketMessageWriter(e,t)])}));l.on("error",u),l.listen(e,"127.0.0.1",(function(){l.removeListener("error",u),a({onConnected:function(){return s}})}))}))},t.createServerSocketTransport=function(e,t){void 0===t&&(t="utf-8");var n=i.createConnection(e,"127.0.0.1");return[new o.SocketMessageReader(n,t),new r.SocketMessageWriter(n,t)]}},1655:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Vim=void 0;var i,o=(i=n(5408))&&i.__esModule?i:{default:i};function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}var s=o.default.Pos;function a(e,t){var n=e.state.vim;if(!n||n.insertMode)return t.head;var i=n.sel.head;return i?n.visualBlock&&t.head.line!=i.line?void 0:t.from()!=t.anchor||t.empty()||t.head.line!=i.line||t.head.ch==i.ch?t.head:new s(t.head.line,t.head.ch-1):t.head}var u=[{keys:"",type:"keyToKey",toKeys:"h"},{keys:"",type:"keyToKey",toKeys:"l"},{keys:"",type:"keyToKey",toKeys:"k"},{keys:"",type:"keyToKey",toKeys:"j"},{keys:"g",type:"keyToKey",toKeys:"gk"},{keys:"g",type:"keyToKey",toKeys:"gj"},{keys:"",type:"keyToKey",toKeys:"l"},{keys:"",type:"keyToKey",toKeys:"h",context:"normal"},{keys:"",type:"keyToKey",toKeys:"x",context:"normal"},{keys:"",type:"keyToKey",toKeys:"W"},{keys:"",type:"keyToKey",toKeys:"B",context:"normal"},{keys:"",type:"keyToKey",toKeys:"w"},{keys:"",type:"keyToKey",toKeys:"b",context:"normal"},{keys:"",type:"keyToKey",toKeys:"j"},{keys:"",type:"keyToKey",toKeys:"k"},{keys:"",type:"keyToKey",toKeys:""},{keys:"",type:"keyToKey",toKeys:""},{keys:"",type:"keyToKey",toKeys:"",context:"insert"},{keys:"",type:"keyToKey",toKeys:"",context:"insert"},{keys:"s",type:"keyToKey",toKeys:"cl",context:"normal"},{keys:"s",type:"keyToKey",toKeys:"c",context:"visual"},{keys:"S",type:"keyToKey",toKeys:"cc",context:"normal"},{keys:"S",type:"keyToKey",toKeys:"VdO",context:"visual"},{keys:"",type:"keyToKey",toKeys:"0"},{keys:"",type:"keyToKey",toKeys:"$"},{keys:"",type:"keyToKey",toKeys:""},{keys:"",type:"keyToKey",toKeys:""},{keys:"",type:"keyToKey",toKeys:"j^",context:"normal"},{keys:"",type:"keyToKey",toKeys:"i",context:"normal"},{keys:"",type:"action",action:"toggleOverwrite",context:"insert"},{keys:"H",type:"motion",motion:"moveToTopLine",motionArgs:{linewise:!0,toJumplist:!0}},{keys:"M",type:"motion",motion:"moveToMiddleLine",motionArgs:{linewise:!0,toJumplist:!0}},{keys:"L",type:"motion",motion:"moveToBottomLine",motionArgs:{linewise:!0,toJumplist:!0}},{keys:"h",type:"motion",motion:"moveByCharacters",motionArgs:{forward:!1}},{keys:"l",type:"motion",motion:"moveByCharacters",motionArgs:{forward:!0}},{keys:"j",type:"motion",motion:"moveByLines",motionArgs:{forward:!0,linewise:!0}},{keys:"k",type:"motion",motion:"moveByLines",motionArgs:{forward:!1,linewise:!0}},{keys:"gj",type:"motion",motion:"moveByDisplayLines",motionArgs:{forward:!0}},{keys:"gk",type:"motion",motion:"moveByDisplayLines",motionArgs:{forward:!1}},{keys:"w",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!1}},{keys:"W",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!1,bigWord:!0}},{keys:"e",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!0,inclusive:!0}},{keys:"E",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!0,bigWord:!0,inclusive:!0}},{keys:"b",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1}},{keys:"B",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1,bigWord:!0}},{keys:"ge",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!0,inclusive:!0}},{keys:"gE",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!0,bigWord:!0,inclusive:!0}},{keys:"{",type:"motion",motion:"moveByParagraph",motionArgs:{forward:!1,toJumplist:!0}},{keys:"}",type:"motion",motion:"moveByParagraph",motionArgs:{forward:!0,toJumplist:!0}},{keys:"(",type:"motion",motion:"moveBySentence",motionArgs:{forward:!1}},{keys:")",type:"motion",motion:"moveBySentence",motionArgs:{forward:!0}},{keys:"",type:"motion",motion:"moveByPage",motionArgs:{forward:!0}},{keys:"",type:"motion",motion:"moveByPage",motionArgs:{forward:!1}},{keys:"",type:"motion",motion:"moveByScroll",motionArgs:{forward:!0,explicitRepeat:!0}},{keys:"",type:"motion",motion:"moveByScroll",motionArgs:{forward:!1,explicitRepeat:!0}},{keys:"gg",type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!1,explicitRepeat:!0,linewise:!0,toJumplist:!0}},{keys:"G",type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!0,explicitRepeat:!0,linewise:!0,toJumplist:!0}},{keys:"g$",type:"motion",motion:"moveToEndOfDisplayLine"},{keys:"g^",type:"motion",motion:"moveToStartOfDisplayLine"},{keys:"g0",type:"motion",motion:"moveToStartOfDisplayLine"},{keys:"0",type:"motion",motion:"moveToStartOfLine"},{keys:"^",type:"motion",motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:"+",type:"motion",motion:"moveByLines",motionArgs:{forward:!0,toFirstChar:!0}},{keys:"-",type:"motion",motion:"moveByLines",motionArgs:{forward:!1,toFirstChar:!0}},{keys:"_",type:"motion",motion:"moveByLines",motionArgs:{forward:!0,toFirstChar:!0,repeatOffset:-1}},{keys:"$",type:"motion",motion:"moveToEol",motionArgs:{inclusive:!0}},{keys:"%",type:"motion",motion:"moveToMatchedSymbol",motionArgs:{inclusive:!0,toJumplist:!0}},{keys:"f",type:"motion",motion:"moveToCharacter",motionArgs:{forward:!0,inclusive:!0}},{keys:"F",type:"motion",motion:"moveToCharacter",motionArgs:{forward:!1}},{keys:"t",type:"motion",motion:"moveTillCharacter",motionArgs:{forward:!0,inclusive:!0}},{keys:"T",type:"motion",motion:"moveTillCharacter",motionArgs:{forward:!1}},{keys:";",type:"motion",motion:"repeatLastCharacterSearch",motionArgs:{forward:!0}},{keys:",",type:"motion",motion:"repeatLastCharacterSearch",motionArgs:{forward:!1}},{keys:"'",type:"motion",motion:"goToMark",motionArgs:{toJumplist:!0,linewise:!0}},{keys:"`",type:"motion",motion:"goToMark",motionArgs:{toJumplist:!0}},{keys:"]`",type:"motion",motion:"jumpToMark",motionArgs:{forward:!0}},{keys:"[`",type:"motion",motion:"jumpToMark",motionArgs:{forward:!1}},{keys:"]'",type:"motion",motion:"jumpToMark",motionArgs:{forward:!0,linewise:!0}},{keys:"['",type:"motion",motion:"jumpToMark",motionArgs:{forward:!1,linewise:!0}},{keys:"]p",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!0,isEdit:!0,matchIndent:!0}},{keys:"[p",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!1,isEdit:!0,matchIndent:!0}},{keys:"]",type:"motion",motion:"moveToSymbol",motionArgs:{forward:!0,toJumplist:!0}},{keys:"[",type:"motion",motion:"moveToSymbol",motionArgs:{forward:!1,toJumplist:!0}},{keys:"|",type:"motion",motion:"moveToColumn"},{keys:"o",type:"motion",motion:"moveToOtherHighlightedEnd",context:"visual"},{keys:"O",type:"motion",motion:"moveToOtherHighlightedEnd",motionArgs:{sameLine:!0},context:"visual"},{keys:"d",type:"operator",operator:"delete"},{keys:"y",type:"operator",operator:"yank"},{keys:"c",type:"operator",operator:"change"},{keys:"=",type:"operator",operator:"indentAuto"},{keys:">",type:"operator",operator:"indent",operatorArgs:{indentRight:!0}},{keys:"<",type:"operator",operator:"indent",operatorArgs:{indentRight:!1}},{keys:"g~",type:"operator",operator:"changeCase"},{keys:"gu",type:"operator",operator:"changeCase",operatorArgs:{toLower:!0},isEdit:!0},{keys:"gU",type:"operator",operator:"changeCase",operatorArgs:{toLower:!1},isEdit:!0},{keys:"n",type:"motion",motion:"findNext",motionArgs:{forward:!0,toJumplist:!0}},{keys:"N",type:"motion",motion:"findNext",motionArgs:{forward:!1,toJumplist:!0}},{keys:"gn",type:"motion",motion:"findAndSelectNextInclusive",motionArgs:{forward:!0}},{keys:"gN",type:"motion",motion:"findAndSelectNextInclusive",motionArgs:{forward:!1}},{keys:"x",type:"operatorMotion",operator:"delete",motion:"moveByCharacters",motionArgs:{forward:!0},operatorMotionArgs:{visualLine:!1}},{keys:"X",type:"operatorMotion",operator:"delete",motion:"moveByCharacters",motionArgs:{forward:!1},operatorMotionArgs:{visualLine:!0}},{keys:"D",type:"operatorMotion",operator:"delete",motion:"moveToEol",motionArgs:{inclusive:!0},context:"normal"},{keys:"D",type:"operator",operator:"delete",operatorArgs:{linewise:!0},context:"visual"},{keys:"Y",type:"operatorMotion",operator:"yank",motion:"expandToLine",motionArgs:{linewise:!0},context:"normal"},{keys:"Y",type:"operator",operator:"yank",operatorArgs:{linewise:!0},context:"visual"},{keys:"C",type:"operatorMotion",operator:"change",motion:"moveToEol",motionArgs:{inclusive:!0},context:"normal"},{keys:"C",type:"operator",operator:"change",operatorArgs:{linewise:!0},context:"visual"},{keys:"~",type:"operatorMotion",operator:"changeCase",motion:"moveByCharacters",motionArgs:{forward:!0},operatorArgs:{shouldMoveCursor:!0},context:"normal"},{keys:"~",type:"operator",operator:"changeCase",context:"visual"},{keys:"",type:"operatorMotion",operator:"delete",motion:"moveToStartOfLine",context:"insert"},{keys:"",type:"operatorMotion",operator:"delete",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1},context:"insert"},{keys:"",type:"idle",context:"normal"},{keys:"",type:"action",action:"jumpListWalk",actionArgs:{forward:!0}},{keys:"",type:"action",action:"jumpListWalk",actionArgs:{forward:!1}},{keys:"",type:"action",action:"scroll",actionArgs:{forward:!0,linewise:!0}},{keys:"",type:"action",action:"scroll",actionArgs:{forward:!1,linewise:!0}},{keys:"a",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"charAfter"},context:"normal"},{keys:"A",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"eol"},context:"normal"},{keys:"A",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"endOfSelectedArea"},context:"visual"},{keys:"i",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"inplace"},context:"normal"},{keys:"gi",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"lastEdit"},context:"normal"},{keys:"I",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"firstNonBlank"},context:"normal"},{keys:"gI",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"bol"},context:"normal"},{keys:"I",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"startOfSelectedArea"},context:"visual"},{keys:"o",type:"action",action:"newLineAndEnterInsertMode",isEdit:!0,interlaceInsertRepeat:!0,actionArgs:{after:!0},context:"normal"},{keys:"O",type:"action",action:"newLineAndEnterInsertMode",isEdit:!0,interlaceInsertRepeat:!0,actionArgs:{after:!1},context:"normal"},{keys:"v",type:"action",action:"toggleVisualMode"},{keys:"V",type:"action",action:"toggleVisualMode",actionArgs:{linewise:!0}},{keys:"",type:"action",action:"toggleVisualMode",actionArgs:{blockwise:!0}},{keys:"",type:"action",action:"toggleVisualMode",actionArgs:{blockwise:!0}},{keys:"gv",type:"action",action:"reselectLastSelection"},{keys:"J",type:"action",action:"joinLines",isEdit:!0},{keys:"gJ",type:"action",action:"joinLines",actionArgs:{keepSpaces:!0},isEdit:!0},{keys:"p",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!0,isEdit:!0}},{keys:"P",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!1,isEdit:!0}},{keys:"r",type:"action",action:"replace",isEdit:!0},{keys:"@",type:"action",action:"replayMacro"},{keys:"q",type:"action",action:"enterMacroRecordMode"},{keys:"R",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{replace:!0},context:"normal"},{keys:"R",type:"operator",operator:"change",operatorArgs:{linewise:!0,fullLine:!0},context:"visual",exitVisualBlock:!0},{keys:"u",type:"action",action:"undo",context:"normal"},{keys:"u",type:"operator",operator:"changeCase",operatorArgs:{toLower:!0},context:"visual",isEdit:!0},{keys:"U",type:"operator",operator:"changeCase",operatorArgs:{toLower:!1},context:"visual",isEdit:!0},{keys:"",type:"action",action:"redo"},{keys:"m",type:"action",action:"setMark"},{keys:'"',type:"action",action:"setRegister"},{keys:"zz",type:"action",action:"scrollToCursor",actionArgs:{position:"center"}},{keys:"z.",type:"action",action:"scrollToCursor",actionArgs:{position:"center"},motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:"zt",type:"action",action:"scrollToCursor",actionArgs:{position:"top"}},{keys:"z",type:"action",action:"scrollToCursor",actionArgs:{position:"top"},motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:"z-",type:"action",action:"scrollToCursor",actionArgs:{position:"bottom"}},{keys:"zb",type:"action",action:"scrollToCursor",actionArgs:{position:"bottom"},motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:".",type:"action",action:"repeatLastEdit"},{keys:"",type:"action",action:"incrementNumberToken",isEdit:!0,actionArgs:{increase:!0,backtrack:!1}},{keys:"",type:"action",action:"incrementNumberToken",isEdit:!0,actionArgs:{increase:!1,backtrack:!1}},{keys:"",type:"action",action:"indent",actionArgs:{indentRight:!0},context:"insert"},{keys:"",type:"action",action:"indent",actionArgs:{indentRight:!1},context:"insert"},{keys:"a",type:"motion",motion:"textObjectManipulation"},{keys:"i",type:"motion",motion:"textObjectManipulation",motionArgs:{textObjectInner:!0}},{keys:"/",type:"search",searchArgs:{forward:!0,querySrc:"prompt",toJumplist:!0}},{keys:"?",type:"search",searchArgs:{forward:!1,querySrc:"prompt",toJumplist:!0}},{keys:"*",type:"search",searchArgs:{forward:!0,querySrc:"wordUnderCursor",wholeWordOnly:!0,toJumplist:!0}},{keys:"#",type:"search",searchArgs:{forward:!1,querySrc:"wordUnderCursor",wholeWordOnly:!0,toJumplist:!0}},{keys:"g*",type:"search",searchArgs:{forward:!0,querySrc:"wordUnderCursor",toJumplist:!0}},{keys:"g#",type:"search",searchArgs:{forward:!1,querySrc:"wordUnderCursor",toJumplist:!0}},{keys:":",type:"ex"}],l=u.length,c=[{name:"colorscheme",shortName:"colo"},{name:"map"},{name:"imap",shortName:"im"},{name:"nmap",shortName:"nm"},{name:"vmap",shortName:"vm"},{name:"unmap"},{name:"write",shortName:"w"},{name:"undo",shortName:"u"},{name:"redo",shortName:"red"},{name:"set",shortName:"se"},{name:"setlocal",shortName:"setl"},{name:"setglobal",shortName:"setg"},{name:"sort",shortName:"sor"},{name:"substitute",shortName:"s",possiblyAsync:!0},{name:"nohlsearch",shortName:"noh"},{name:"yank",shortName:"y"},{name:"delmarks",shortName:"delm"},{name:"registers",shortName:"reg",excludeFromCommandHistory:!0},{name:"vglobal",shortName:"v"},{name:"global",shortName:"g"}],h=function(){function e(e,n){e.attached=!1,this==o.default.keyMap.vim&&(e.options.$customCursor=null),n&&n.attach==t||function(e){e.setOption("disableInput",!1),e.off("cursorActivity",Xe),e.state.vim=null,ze&&clearTimeout(ze),e.leaveVimMode()}(e)}function t(e,n){this==o.default.keyMap.vim&&(e.attached=!0,e.curOp&&(e.curOp.selectionChanged=!0),e.options.$customCursor=a),n&&n.attach==t||function(e){e.setOption("disableInput",!0),e.setOption("showCursorWhenSelecting",!1),o.default.signal(e,"vim-mode-change",{mode:"normal"}),e.on("cursorActivity",Xe),P(e),e.enterVimMode()}(e)}function n(e,t){if(t){if(this[e])return this[e];var n=function(e){if("'"==e.charAt(0))return e.charAt(1);if("AltGraph"===e)return!1;var t=e.split(/-(?!$)/),n=t[t.length-1];if(1==t.length&&1==t[0].length)return!1;if(2==t.length&&"Shift"==t[0]&&1==n.length)return!1;for(var o=!1,r=0;r")}(e);if(!n)return!1;var r=W.findKey(t,n);return"function"==typeof r&&o.default.signal(t,"vim-keypress",n),r}}o.default.defineOption("vimMode",!1,(function(e,t,n){t&&"vim"!=e.getOption("keyMap")?e.setOption("keyMap","vim"):!t&&n!=o.default.Init&&/^vim/.test(e.getOption("keyMap"))&&e.setOption("keyMap","default")}));var i={Shift:"S",Ctrl:"C",Alt:"A",Cmd:"D",Mod:"A",CapsLock:""},h={Enter:"CR",Backspace:"BS",Delete:"Del",Insert:"Ins"},d=/[\d]/,f=[o.default.isWordChar,function(e){return e&&!o.default.isWordChar(e)&&!/\s/.test(e)}],p=[function(e){return/\S/.test(e)}];function g(e,t){for(var n=[],i=e;i"]),w=[].concat(v,y,b,["-",'"',".",":","_","/"]);try{m=new RegExp("^[\\p{Lu}]$","u")}catch(e){m=/^[A-Z]$/}function M(e,t){return t>=e.firstLine()&&t<=e.lastLine()}function C(e){return/^[a-z]$/.test(e)}function S(e){return m.test(e)}function L(e){return/^\s*$/.test(e)}function I(e){return-1!=".?!".indexOf(e)}function N(e,t){for(var n=0;nn?t=n:t0?1:-1,c=r.getCursor();do{if((a=o[(e+(t+=l))%e])&&(u=a.find())&&!ne(c,u))break}while(ti)}return a}return{cachedCursor:void 0,add:function(r,s,a){var u=o[t%e];function l(n){var i=++t%e,s=o[i];s&&s.clear(),o[i]=r.setBookmark(n)}if(u){var c=u.find();c&&!ne(c,s)&&l(s)}else l(s);l(a),n=t,(i=t-e+1)<0&&(i=0)},find:function(e,n){var i=t,o=r(e,n);return t=i,o&&o.find()},move:r}},O=function(e){return e?{changes:e.changes,expectCursorActivityForChange:e.expectCursorActivityForChange}:{changes:[],expectCursorActivityForChange:!1}};function R(){this.latestRegister=void 0,this.isPlaying=!1,this.isRecording=!1,this.replaySearchQueries=[],this.onRecordingDone=void 0,this.lastInsertModeChanges=O()}function P(e){return e.state.vim||(e.state.vim={inputState:new F,lastEditInputState:void 0,lastEditActionCommand:void 0,lastHPos:-1,lastHSPos:-1,lastMotion:null,marks:{},insertMode:!1,insertModeRepeat:void 0,visualMode:!1,visualLine:!1,visualBlock:!1,lastSelection:null,lastPastedText:null,sel:{},options:{}}),e.state.vim}function z(){for(var e in E={searchQuery:null,searchIsReversed:!1,lastSubstituteReplacePart:void 0,jumpList:j(),macroModeState:new R,lastCharacterSearch:{increment:0,forward:!0,selectedCharacter:""},registerController:new V({}),searchHistoryController:new U,exCommandHistoryController:new U},x){var t=x[e];t.value=t.defaultValue}}R.prototype={exitMacroRecordMode:function(){var e=E.macroModeState;e.onRecordingDone&&e.onRecordingDone(),e.onRecordingDone=void 0,e.isRecording=!1},enterMacroRecordMode:function(e,t){var n=E.registerController.getRegister(t);n&&(n.clear(),this.latestRegister=t,e.openDialog&&(this.onRecordingDone=e.openDialog(document.createTextNode("(recording)["+t+"]"),null,{bottom:!0})),this.isRecording=!0)}};var W={buildKeyMap:function(){},getRegisterController:function(){return E.registerController},resetVimGlobalState_:z,getVimGlobalState_:function(){return E},maybeInitVimState_:P,suppressErrorLogging:!1,InsertModeKey:$e,map:function(e,t,n){Ge.map(e,t,n)},unmap:function(e,t){return Ge.unmap(e,t)},noremap:function(e,t,n){function i(e){return e?[e]:["normal","insert","visual"]}for(var o=i(n),r=u.length,s=r-l;s=0;o--){var r=i[o];if(e!==r.context)if(r.context)this._mapCommand(r);else{var s=["normal","insert","visual"];for(var a in s)if(s[a]!==e){var c={};for(var h in r)c[h]=r[h];c.context=s[a],this._mapCommand(c)}}}},setOption:k,getOption:T,defineOption:D,defineEx:function(e,t,n){if(t){if(0!==e.indexOf(t))throw new Error('(Vim.defineEx) "'+t+'" is not a prefix of "'+e+'", command not registered')}else t=e;Ze[e]=n,Ge.commandMap_[t]={name:e,shortName:t,type:"api"}},handleKey:function(e,t,n){var i=this.findKey(e,t,n);if("function"==typeof i)return i()},findKey:function(e,t,n){var i,o=P(e);function r(){if(""==t){if(o.visualMode)ge(e);else{if(!o.insertMode)return;Qe(e)}return B(e),!0}}return!1===(i=o.insertMode?function(){if(r())return!0;for(var n=o.inputState.keyBuffer=o.inputState.keyBuffer+t,i=1==t.length,s=Y.matchCommand(n,u,o.inputState,"insert");n.length>1&&"full"!=s.type;){n=o.inputState.keyBuffer=n.slice(1);var a=Y.matchCommand(n,u,o.inputState,"insert");"none"!=a.type&&(s=a)}if("none"==s.type)return B(e),!1;if("partial"==s.type)return A&&window.clearTimeout(A),A=window.setTimeout((function(){o.insertMode&&o.inputState.keyBuffer&&B(e)}),T("insertModeEscKeysTimeout")),!i;if(A&&window.clearTimeout(A),i){for(var l=e.listSelections(),c=0;c|<\w+>|./.exec(n),t=i[0],n=n.substring(i.index+t.length),W.handleKey(e,t,"mapping")}(i.toKeys):Y.processCommand(e,o,i)}catch(t){throw e.state.vim=void 0,P(e),W.suppressErrorLogging||console.log(t),t}return!0}))}},handleEx:function(e,t){Ge.processCommand(e,t)},defineMotion:function(e,t){Z[e]=t},defineAction:function(e,t){q[e]=t},defineOperator:function(e,t){Q[e]=t},mapCommand:function(e,t,n,i,o){var r={keys:e,type:t};for(var s in r[t]=n,r[t+"Args"]=i,o)r[s]=o[s];qe(r)},_mapCommand:qe,defineRegister:function(e,t){var n=E.registerController.registers;if(!e||1!=e.length)throw Error("Register name must be 1 character");if(n[e])throw Error("Register already defined "+e);n[e]=t,w.push(e)},exitVisualMode:ge,exitInsertMode:Qe};function F(){this.prefixRepeat=[],this.motionRepeat=[],this.operator=null,this.operatorArgs=null,this.motion=null,this.motionArgs=null,this.keyBuffer=[],this.registerName=null}function B(e,t){e.state.vim.inputState=new F,o.default.signal(e,"vim-command-done",t)}function H(e,t,n){this.clear(),this.keyBuffer=[e||""],this.insertModeChanges=[],this.searchQueries=[],this.linewise=!!t,this.blockwise=!!n}function V(e){this.registers=e,this.unnamedRegister=e['"']=new H,e["."]=new H,e[":"]=new H,e["/"]=new H}function U(){this.historyBuffer=[],this.iterator=0,this.initialPrefix=null}F.prototype.pushRepeatDigit=function(e){this.operator?this.motionRepeat=this.motionRepeat.concat(e):this.prefixRepeat=this.prefixRepeat.concat(e)},F.prototype.getRepeat=function(){var e=0;return(this.prefixRepeat.length>0||this.motionRepeat.length>0)&&(e=1,this.prefixRepeat.length>0&&(e*=parseInt(this.prefixRepeat.join(""),10)),this.motionRepeat.length>0&&(e*=parseInt(this.motionRepeat.join(""),10))),e},H.prototype={setText:function(e,t,n){this.keyBuffer=[e||""],this.linewise=!!t,this.blockwise=!!n},pushText:function(e,t){t&&(this.linewise||this.keyBuffer.push("\n"),this.linewise=!0),this.keyBuffer.push(e)},pushInsertModeChanges:function(e){this.insertModeChanges.push(O(e))},pushSearchQuery:function(e){this.searchQueries.push(e)},clear:function(){this.keyBuffer=[],this.insertModeChanges=[],this.searchQueries=[],this.linewise=!1},toString:function(){return this.keyBuffer.join("")}},V.prototype={pushText:function(e,t,n,i,o){if("_"!==e){i&&"\n"!==n.charAt(n.length-1)&&(n+="\n");var r=this.isValidRegister(e)?this.getRegister(e):null;if(r)S(e)?r.pushText(n,i):r.setText(n,i,o),this.unnamedRegister.setText(r.toString(),i);else{switch(t){case"yank":this.registers[0]=new H(n,i,o);break;case"delete":case"change":-1==n.indexOf("\n")?this.registers["-"]=new H(n,i):(this.shiftNumericRegisters_(),this.registers[1]=new H(n,i))}this.unnamedRegister.setText(n,i,o)}}},getRegister:function(e){return this.isValidRegister(e)?(e=e.toLowerCase(),this.registers[e]||(this.registers[e]=new H),this.registers[e]):this.unnamedRegister},isValidRegister:function(e){return e&&N(e,w)},shiftNumericRegisters_:function(){for(var e=9;e>=2;e--)this.registers[e]=this.getRegister(""+(e-1))}},U.prototype={nextMatch:function(e,t){var n=this.historyBuffer,i=t?-1:1;null===this.initialPrefix&&(this.initialPrefix=e);for(var o=this.iterator+i;t?o>=0:o=n.length?(this.iterator=n.length,this.initialPrefix):o<0?e:void 0},pushInput:function(e){var t=this.historyBuffer.indexOf(e);t>-1&&this.historyBuffer.splice(t,1),e.length&&this.historyBuffer.push(e)},reset:function(){this.initialPrefix=null,this.iterator=this.historyBuffer.length}};var Y={matchCommand:function(e,t,n,i){var o,r=function(e,t,n,i){for(var o,r=[],s=[],a=0;a"==o.keys.slice(-11)){var u=function(e){var t=/^.*(<[^>]+>)$/.exec(e),n=t?t[1]:e.slice(-1);if(n.length>1)switch(n){case"":n="\n";break;case"":n=" ";break;default:n=""}return n}(e);if(!u)return{type:"none"};n.selectedCharacter=u}return{type:"full",command:o}},processCommand:function(e,t,n){switch(t.inputState.repeatOverride=n.repeatOverride,n.type){case"motion":this.processMotion(e,t,n);break;case"operator":this.processOperator(e,t,n);break;case"operatorMotion":this.processOperatorMotion(e,t,n);break;case"action":this.processAction(e,t,n);break;case"search":this.processSearch(e,t,n);break;case"ex":case"keyToEx":this.processEx(e,t,n)}},processMotion:function(e,t,n){t.inputState.motion=n.motion,t.inputState.motionArgs=J(n.motionArgs),this.evalInput(e,t)},processOperator:function(e,t,n){var i=t.inputState;if(i.operator){if(i.operator==n.operator)return i.motion="expandToLine",i.motionArgs={linewise:!0},void this.evalInput(e,t);B(e)}i.operator=n.operator,i.operatorArgs=J(n.operatorArgs),n.keys.length>1&&(i.operatorShortcut=n.keys),n.exitVisualBlock&&(t.visualBlock=!1,fe(e)),t.visualMode&&this.evalInput(e,t)},processOperatorMotion:function(e,t,n){var i=t.visualMode,o=J(n.operatorMotionArgs);o&&i&&o.visualLine&&(t.visualLine=!0),this.processOperator(e,t,n),i||this.processMotion(e,t,n)},processAction:function(e,t,n){var i=t.inputState,o=i.getRepeat(),r=!!o,s=J(n.actionArgs)||{};i.selectedCharacter&&(s.selectedCharacter=i.selectedCharacter),n.operator&&this.processOperator(e,t,n),n.motion&&this.processMotion(e,t,n),(n.motion||n.operator)&&this.evalInput(e,t),s.repeat=o||1,s.repeatIsExplicit=r,s.registerName=i.registerName,B(e),t.lastMotion=null,n.isEdit&&this.recordLastEdit(t,i,n),q[n.action](e,s,t)},processSearch:function(e,t,n){if(e.getSearchCursor){var i=n.searchArgs.forward,r=n.searchArgs.wholeWordOnly;De(e).setReversed(!i);var s=i?"/":"?",a=De(e).getQuery(),u=e.getScrollInfo();switch(n.searchArgs.querySrc){case"prompt":var l=E.macroModeState;l.isPlaying?f(d=l.replaySearchQueries.shift(),!0,!1):Re(e,{onClose:function(t){e.scrollTo(u.left,u.top),f(t,!0,!0);var n=E.macroModeState;n.isRecording&&function(e,t){if(!e.isPlaying){var n=e.latestRegister,i=E.registerController.getRegister(n);i&&i.pushSearchQuery&&i.pushSearchQuery(t)}}(n,t)},prefix:s,desc:"(JavaScript regexp)",onKeyUp:function(t,n,r){var s,a,l,c=o.default.keyName(t);"Up"==c||"Down"==c?(s="Up"==c,a=t.target?t.target.selectionEnd:0,r(n=E.searchHistoryController.nextMatch(n,s)||""),a&&t.target&&(t.target.selectionEnd=t.target.selectionStart=Math.min(a,t.target.value.length))):"Left"!=c&&"Right"!=c&&"Ctrl"!=c&&"Alt"!=c&&"Shift"!=c&&E.searchHistoryController.reset();try{l=Pe(e,n,!0,!0)}catch(t){}l?e.scrollIntoView(Fe(e,!i,l),30):(Be(e),e.scrollTo(u.left,u.top))},onKeyDown:function(t,n,i){var r=o.default.keyName(t);"Esc"==r||"Ctrl-C"==r||"Ctrl-["==r||"Backspace"==r&&""==n?(E.searchHistoryController.pushInput(n),E.searchHistoryController.reset(),Pe(e,a),Be(e),e.scrollTo(u.left,u.top),o.default.e_stop(t),B(e),i(),e.focus()):"Up"==r||"Down"==r?o.default.e_stop(t):"Ctrl-U"==r&&(o.default.e_stop(t),i(""))}});break;case"wordUnderCursor":var c=ve(e,!1,0,!1,!0),h=!0;if(c||(c=ve(e,!1,0,!1,!1),h=!1),!c)return;var d=e.getLine(c.start.line).substring(c.start.ch,c.end.ch);d=h&&r?"\\b"+d+"\\b":d.replace(/([.?*+$\[\]\/\\(){}|\-])/g,"\\$1"),E.jumpList.cachedCursor=e.getCursor(),e.setCursor(c.start),f(d,!0,!1)}}function f(i,o,r){E.searchHistoryController.pushInput(i),E.searchHistoryController.reset();try{Pe(e,i,o,r)}catch(t){return Oe(e,"Invalid regex: "+i),void B(e)}Y.processMotion(e,t,{type:"motion",motion:"findNext",motionArgs:{forward:!0,toJumplist:n.searchArgs.toJumplist}})}},processEx:function(e,t,n){function i(t){E.exCommandHistoryController.pushInput(t),E.exCommandHistoryController.reset(),Ge.processCommand(e,t)}function r(t,n,i){var r,s,a=o.default.keyName(t);("Esc"==a||"Ctrl-C"==a||"Ctrl-["==a||"Backspace"==a&&""==n)&&(E.exCommandHistoryController.pushInput(n),E.exCommandHistoryController.reset(),o.default.e_stop(t),B(e),i(),e.focus()),"Up"==a||"Down"==a?(o.default.e_stop(t),r="Up"==a,s=t.target?t.target.selectionEnd:0,i(n=E.exCommandHistoryController.nextMatch(n,r)||""),s&&t.target&&(t.target.selectionEnd=t.target.selectionStart=Math.min(s,t.target.value.length))):"Ctrl-U"==a?(o.default.e_stop(t),i("")):"Left"!=a&&"Right"!=a&&"Ctrl"!=a&&"Alt"!=a&&"Shift"!=a&&E.exCommandHistoryController.reset()}"keyToEx"==n.type?Ge.processCommand(e,n.exArgs.input):t.visualMode?Re(e,{onClose:i,prefix:":",value:"'<,'>",onKeyDown:r,selectValueOnOpen:!1}):Re(e,{onClose:i,prefix:":",onKeyDown:r})},evalInput:function(e,t){var n,i,o,r=t.inputState,a=r.motion,u=r.motionArgs||{},l=r.operator,c=r.operatorArgs||{},h=r.registerName,d=t.sel,f=te(t.visualMode?K(e,d.head):e.getCursor("head")),p=te(t.visualMode?K(e,d.anchor):e.getCursor("anchor")),g=te(f),m=te(p);if(l&&this.recordLastEdit(t,r),(o=void 0!==r.repeatOverride?r.repeatOverride:r.getRepeat())>0&&u.explicitRepeat?u.repeatIsExplicit=!0:(u.noRepeat||!u.explicitRepeat&&0===o)&&(o=1,u.repeatIsExplicit=!1),r.selectedCharacter&&(u.selectedCharacter=c.selectedCharacter=r.selectedCharacter),u.repeat=o,B(e),a){var v=Z[a](e,f,u,t,r);if(t.lastMotion=Z[a],!v)return;if(u.toJumplist){var y=E.jumpList,b=y.cachedCursor;b?(ye(e,b,v),delete y.cachedCursor):ye(e,f,v)}v instanceof Array?(i=v[0],n=v[1]):n=v,n||(n=te(f)),t.visualMode?(t.visualBlock&&n.ch===1/0||(n=K(e,n)),i&&(i=K(e,i)),i=i||m,d.anchor=i,d.head=n,fe(e),Le(e,t,"<",ie(i,n)?i:n),Le(e,t,">",ie(i,n)?n:i)):l||(n=K(e,n),e.setCursor(n.line,n.ch))}if(l){if(c.lastSel){i=m;var _=c.lastSel,w=Math.abs(_.head.line-_.anchor.line),M=Math.abs(_.head.ch-_.anchor.ch);n=_.visualLine?new s(m.line+w,m.ch):_.visualBlock?new s(m.line+w,m.ch+M):_.head.line==_.anchor.line?new s(m.line,m.ch+M):new s(m.line+w,m.ch),t.visualMode=!0,t.visualLine=_.visualLine,t.visualBlock=_.visualBlock,d=t.sel={anchor:i,head:n},fe(e)}else t.visualMode&&(c.lastSel={anchor:te(d.anchor),head:te(d.head),visualBlock:t.visualBlock,visualLine:t.visualLine});var C,S,I,N,x;if(t.visualMode){if(C=oe(d.head,d.anchor),S=re(d.head,d.anchor),I=t.visualLine||c.linewise,x=pe(e,{anchor:C,head:S},N=t.visualBlock?"block":I?"line":"char"),I){var D=x.ranges;if("block"==N)for(var k=0;k0&&r&&L(r);r=o.pop())n.line--,n.ch=0;r?(n.line--,n.ch=ae(e,n.line)):n.ch=0}}(e,C,S),x=pe(e,{anchor:C,head:S},N="char",!u.inclusive||I)}e.setSelections(x.ranges,x.primary),t.lastMotion=null,c.repeat=o,c.registerName=h,c.linewise=I;var A=Q[l](e,c,x.ranges,m,n);t.visualMode&&ge(e,null!=A),A&&e.setCursor(A)}},recordLastEdit:function(e,t,n){var i=E.macroModeState;i.isPlaying||(e.lastEditInputState=t,e.lastEditActionCommand=n,i.lastInsertModeChanges.changes=[],i.lastInsertModeChanges.expectCursorActivityForChange=!1,i.lastInsertModeChanges.visualBlock=e.visualBlock?e.sel.head.line-e.sel.anchor.line:0)}},Z={moveToTopLine:function(e,t,n){var i=He(e).top+n.repeat-1;return new s(i,me(e.getLine(i)))},moveToMiddleLine:function(e){var t=He(e),n=Math.floor(.5*(t.top+t.bottom));return new s(n,me(e.getLine(n)))},moveToBottomLine:function(e,t,n){var i=He(e).bottom-n.repeat+1;return new s(i,me(e.getLine(i)))},expandToLine:function(e,t,n){return new s(t.line+n.repeat-1,1/0)},findNext:function(e,t,n){var i=De(e),o=i.getQuery();if(o){var r=!n.forward;return r=i.isReversed()?!r:r,We(e,o),Fe(e,r,o,n.repeat)}},findAndSelectNextInclusive:function(e,t,n,i,r){var a=De(e),u=a.getQuery();if(u){var l=!n.forward,c=function(e,t,n,i,o){return void 0===i&&(i=1),e.operation((function(){var r=e.getCursor(),a=e.getSearchCursor(n,r),u=a.find(!t);!o.visualMode&&u&&ne(a.from(),r)&&a.find(!t);for(var l=0;lu:h.linec&&o.line==c?Ce(e,t,n,i,!0):(n.toFirstChar&&(r=me(e.getLine(u)),i.lastHPos=r),i.lastHSPos=e.charCoords(new s(u,r),"div").left,new s(u,r))},moveByDisplayLines:function(e,t,n,i){var o=t;switch(i.lastMotion){case this.moveByDisplayLines:case this.moveByScroll:case this.moveByLines:case this.moveToColumn:case this.moveToEol:break;default:i.lastHSPos=e.charCoords(o,"div").left}var r=n.repeat;if((u=e.findPosV(o,n.forward?r:-r,"line",i.lastHSPos)).hitSide)if(n.forward)var a={top:e.charCoords(u,"div").top+8,left:i.lastHSPos},u=e.coordsChar(a,"div");else{var l=e.charCoords(new s(e.firstLine(),0),"div");l.left=i.lastHSPos,u=e.coordsChar(l,"div")}return i.lastHPos=u.ch,u},moveByPage:function(e,t,n){var i=t,o=n.repeat;return e.findPosV(i,n.forward?o:-o,"page")},moveByParagraph:function(e,t,n){var i=n.forward?1:-1;return Ne(e,t,n.repeat,i)},moveBySentence:function(e,t,n){var i=n.forward?1:-1;return function(e,t,n,i){function o(e,t){if(t.pos+t.dir<0||t.pos+t.dir>=t.line.length){if(t.ln+=t.dir,!M(e,t.ln))return t.line=null,t.ln=null,void(t.pos=null);t.line=e.getLine(t.ln),t.pos=t.dir>0?0:t.line.length-1}else t.pos+=t.dir}function r(e,t,n,i){var r=""===(l=e.getLine(t)),s={line:l,ln:t,pos:n,dir:i},a={ln:s.ln,pos:s.pos},u=""===s.line;for(o(e,s);null!==s.line;){if(a.ln=s.ln,a.pos=s.pos,""===s.line&&!u)return{ln:s.ln,pos:s.pos};if(r&&""!==s.line&&!L(s.line[s.pos]))return{ln:s.ln,pos:s.pos};!I(s.line[s.pos])||r||s.pos!==s.line.length-1&&!L(s.line[s.pos+1])||(r=!0),o(e,s)}var l=e.getLine(a.ln);a.pos=0;for(var c=l.length-1;c>=0;--c)if(!L(l[c])){a.pos=c;break}return a}function a(e,t,n,i){var r={line:e.getLine(t),ln:t,pos:n,dir:i},s={ln:r.ln,pos:null},a=""===r.line;for(o(e,r);null!==r.line;){if(""===r.line&&!a)return null!==s.pos?s:{ln:r.ln,pos:r.pos};if(I(r.line[r.pos])&&null!==s.pos&&(r.ln!==s.ln||r.pos+1!==s.pos))return s;""===r.line||L(r.line[r.pos])||(a=!1,s={ln:r.ln,pos:r.pos}),o(e,r)}var u=e.getLine(s.ln);s.pos=0;for(var l=0;l0;)u=i<0?a(e,u.ln,u.pos,i):r(e,u.ln,u.pos,i),n--;return new s(u.ln,u.pos)}(e,t,n.repeat,i)},moveByScroll:function(e,t,n,i){var o,r=e.getScrollInfo(),s=n.repeat;s||(s=r.clientHeight/(2*e.defaultTextHeight()));var a=e.charCoords(t,"local");if(n.repeat=s,!(o=Z.moveByDisplayLines(e,t,n,i)))return null;var u=e.charCoords(o,"local");return e.scrollTo(null,r.top+u.top-a.top),o},moveByWords:function(e,t,n){return function(e,t,n,i,o,r){var a=te(t),u=[];(i&&!o||!i&&o)&&n++;for(var l=!(i&&o),c=0;c0)h.index=0;else{var g=h.lineText.length;h.index=g>0?g-1:0}h.nextCh=h.lineText.charAt(h.index)}p(h)&&(o.line=l,o.ch=h.index,t--)}return h.nextCh||h.curMoveThrough?new s(l,h.index):o}(e,n.repeat,n.forward,n.selectedCharacter)||t},moveToColumn:function(e,t,n,i){var o=n.repeat;return i.lastHPos=o-1,i.lastHSPos=e.charCoords(t,"div").left,function(e,t){var n=e.getCursor().line;return K(e,new s(n,t-1))}(e,o)},moveToEol:function(e,t,n,i){return Ce(e,t,n,i,!1)},moveToFirstNonWhiteSpaceCharacter:function(e,t){var n=t;return new s(n.line,me(e.getLine(n.line)))},moveToMatchedSymbol:function(e,t){var n=t,i=n.line,o=n.ch;if(o"===o?/[(){}[\]<>]/:/[(){}[\]]/;return e.findMatchingBracket(new s(i,o),{bracketRegex:r}).to}return n},moveToStartOfLine:function(e,t){return new s(t.line,0)},moveToLineOrEdgeOfDocument:function(e,t,n){var i=n.forward?e.lastLine():e.firstLine();return n.repeatIsExplicit&&(i=n.repeat-e.getOption("firstLineNumber")),new s(i,me(e.getLine(i)))},moveToStartOfDisplayLine:function(e){return e.execCommand("goLineLeft"),e.getCursor()},moveToEndOfDisplayLine:function(e){e.execCommand("goLineRight");var t=e.getCursor();return"before"==t.sticky&&t.ch--,t},textObjectManipulation:function(e,t,n,i){var r=n.selectedCharacter;"b"==r?r="(":"B"==r&&(r="{");var a,u=!n.textObjectInner;if({"(":")",")":"(","{":"}","}":"{","[":"]","]":"[","<":">",">":"<"}[r])a=function(e,t,n,i){var o,r,a=t,u={"(":/[()]/,")":/[()]/,"[":/[[\]]/,"]":/[[\]]/,"{":/[{}]/,"}":/[{}]/,"<":/[<>]/,">":/[<>]/}[n],l={"(":"(",")":"(","[":"[","]":"[","{":"{","}":"{","<":"<",">":"<"}[n],c=e.getLine(a.line).charAt(a.ch)===l?1:0;if(o=e.scanForBracket(new s(a.line,a.ch+c),-1,void 0,{bracketRegex:u}),r=e.scanForBracket(new s(a.line,a.ch+c),1,void 0,{bracketRegex:u}),!o||!r)return{start:a,end:a};if(o=o.pos,r=r.pos,o.line==r.line&&o.ch>r.ch||o.line>r.line){var h=o;o=r,r=h}return i?r.ch+=1:o.ch+=1,{start:o,end:r}}(e,t,r,u);else if({"'":!0,'"':!0,"`":!0}[r])a=function(e,t,n,i){var o,r,a,u,l=te(t),c=e.getLine(l.line).split(""),h=c.indexOf(n);if(l.ch-1&&!o;a--)c[a]==n&&(o=a+1);else o=l.ch+1;if(o&&!r)for(a=o,u=c.length;ae.lastLine()&&t.linewise&&!p?e.replaceRange("",f,l):e.replaceRange("",u,l),t.linewise&&(p||(e.setCursor(f),o.default.commands.newlineAndIndent(e)),u.ch=Number.MAX_VALUE),i=u}E.registerController.pushText(t.registerName,"change",r,t.linewise,n.length>1),q.enterInsertMode(e,{head:i},e.state.vim)},delete:function(e,t,n){var i,o;e.pushUndoStop();var r=e.state.vim;if(r.visualBlock){o=e.getSelection();var a=G("",n.length);e.replaceSelections(a),i=oe(n[0].head,n[0].anchor)}else{var u=n[0].anchor,l=n[0].head;t.linewise&&l.line!=e.firstLine()&&u.line==e.lastLine()&&u.line==l.line-1&&(u.line==e.firstLine()?u.ch=0:u=new s(u.line-1,ae(e,u.line-1))),o=e.getRange(u,l),e.replaceRange("",u,l),i=u,t.linewise&&(i=Z.moveToFirstNonWhiteSpaceCharacter(e,u))}return E.registerController.pushText(t.registerName,"delete",o,t.linewise,r.visualBlock),K(e,i)},indent:function(e,t,n){var i=e.state.vim,o=n[0].anchor.line,r=i.visualBlock?n[n.length-1].anchor.line:n[0].head.line,s=i.visualMode?t.repeat:1;t.linewise&&r--,e.pushUndoStop();for(var a=o;a<=r;a++)for(var u=0;ul.top?(u.line+=(a-l.top)/o,u.line=Math.ceil(u.line),e.setCursor(u),l=e.charCoords(u,"local"),e.scrollTo(null,l.top)):e.scrollTo(null,a);else{var c=a+e.getScrollInfo().clientHeight;c=r.anchor.line?X(r.head,0,1):new s(r.anchor.line,0)}else if("inplace"==i){if(n.visualMode)return}else"lastEdit"==i&&(a=Ue(e)||a);e.setOption("disableInput",!1),t&&t.replace?(e.toggleOverwrite(!0),e.setOption("keyMap","vim-replace"),o.default.signal(e,"vim-mode-change",{mode:"replace"})):(e.toggleOverwrite(!1),e.setOption("keyMap","vim-insert"),o.default.signal(e,"vim-mode-change",{mode:"insert"})),E.macroModeState.isPlaying||(e.on("change",Je),o.default.on(e.getInputField(),"keydown",et)),n.visualMode&&ge(e),he(e,a,u)}},toggleVisualMode:function(e,t,n){var i,r=t.repeat,a=e.getCursor();n.visualMode?n.visualLine^t.linewise||n.visualBlock^t.blockwise?(n.visualLine=!!t.linewise,n.visualBlock=!!t.blockwise,o.default.signal(e,"vim-mode-change",{mode:"visual",subMode:n.visualLine?"linewise":n.visualBlock?"blockwise":""}),fe(e)):ge(e):(n.visualMode=!0,n.visualLine=!!t.linewise,n.visualBlock=!!t.blockwise,i=K(e,new s(a.line,a.ch+r-1)),n.sel={anchor:a,head:i},o.default.signal(e,"vim-mode-change",{mode:"visual",subMode:n.visualLine?"linewise":n.visualBlock?"blockwise":""}),fe(e),Le(e,n,"<",oe(a,i)),Le(e,n,">",re(a,i)))},reselectLastSelection:function(e,t,n){var i=n.lastSelection;if(n.visualMode&&de(e,n),i){var r=i.anchorMark.find(),s=i.headMark.find();if(!r||!s)return;n.sel={anchor:r,head:s},n.visualMode=!0,n.visualLine=i.visualLine,n.visualBlock=i.visualBlock,fe(e),Le(e,n,"<",oe(r,s)),Le(e,n,">",re(r,s)),o.default.signal(e,"vim-mode-change",{mode:"visual",subMode:n.visualLine?"linewise":n.visualBlock?"blockwise":""})}},joinLines:function(e,t,n){var i,o;if(n.visualMode){if(i=e.getCursor("anchor"),ie(o=e.getCursor("head"),i)){var r=o;o=i,i=r}o.ch=ae(e,o.line)-1}else{var a=Math.max(t.repeat,2);i=e.getCursor(),o=K(e,new s(i.line+a-1,1/0))}for(var u=0,l=i.line;l1&&(f=Array(t.repeat+1).join(f));var p,g,m=o.linewise,v=o.blockwise;if(v){f=f.split("\n"),m&&f.pop();for(var y=0;ye.lastLine()&&e.replaceRange("\n",new s(I,0)),ae(e,I)c.length&&(i=c.length),r=new s(u.line,i)}if("\n"==a)n.visualMode||e.replaceRange("",u,r),(o.default.commands.newlineAndIndentContinueComment||o.default.commands.newlineAndIndent)(e);else{var h=e.getRange(u,r);if(h=h.replace(/[^\n]/g,a),n.visualBlock){var d=new Array(e.getOption("tabSize")+1).join(" ");h=(h=e.getSelection()).replace(/\t/g,d).replace(/[^\n]/g,a).split("\n"),e.replaceSelections(h)}else e.replaceRange(h,u,r);n.visualMode?(u=ie(l[0].anchor,l[0].head)?l[0].anchor:l[0].head,e.setCursor(u),ge(e,!1)):e.setCursor(X(r,0,-1))}},incrementNumberToken:function(e,t){for(var n,i,o,r,a=e.getCursor(),u=e.getLine(a.line),l=/(-?)(?:(0x)([\da-f]+)|(0b|0|)(\d+))/gi;null!==(n=l.exec(u))&&(o=(i=n.index)+n[0].length,!(a.ch"==t.slice(-11)){var n=t.length-11,i=e.slice(0,n),o=t.slice(0,n);return i==o&&e.length>n?"full":0==o.indexOf(i)&&"partial"}return e==t?"full":0==t.indexOf(e)&&"partial"}function ee(e,t,n){return function(){for(var i=0;i2&&(t=oe.apply(void 0,Array.prototype.slice.call(arguments,1))),ie(e,t)?e:t}function re(e,t){return arguments.length>2&&(t=re.apply(void 0,Array.prototype.slice.call(arguments,1))),ie(e,t)?t:e}function se(e,t,n){var i=ie(e,t),o=ie(t,n);return i&&o}function ae(e,t){return e.getLine(t).length}function ue(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function le(e,t,n){var i=ae(e,t),o=new Array(n-i+1).join(" ");e.setCursor(new s(t,i)),e.replaceRange(o,e.getCursor())}function ce(e,t){var n=[],i=e.listSelections(),o=te(e.clipPos(t)),r=!ne(t,o),a=function(e,t,n){for(var i=0;ia?l:0,h=i[c].anchor,d=Math.min(h.line,o.line),f=Math.max(h.line,o.line),p=h.ch,g=o.ch,m=i[c].head.ch-p,v=g-p;m>0&&v<=0?(p++,r||g--):m<0&&v>=0?(p--,u||g++):m<0&&-1==v&&(p--,g++);for(var y=d;y<=f;y++){var b={anchor:new s(y,p),head:new s(y,g)};n.push(b)}return e.setSelections(n),t.ch=g,h.ch=p,h}function he(e,t,n){for(var i=[],o=0;ol&&(o.line=l),o.ch=ae(e,o.line)}return{ranges:[{anchor:r,head:o}],primary:0}}if("block"==n){var c=Math.min(r.line,o.line),h=r.ch,d=Math.max(r.line,o.line),f=o.ch;h=a.length)return null;i?l=p[0]:(l=f[0])(a.charAt(u))||(l=f[1]);for(var c=u,h=u;l(a.charAt(c))&&c=0;)h--;if(h++,t){for(var d=c;/\s/.test(a.charAt(c))&&c0;)h--;h||(h=g)}}return{start:new s(r.line,h),end:new s(r.line,c)}}function ye(e,t,n){ne(t,n)||E.jumpList.add(e,t,n)}function be(e,t){E.lastCharacterSearch.increment=e,E.lastCharacterSearch.forward=t.forward,E.lastCharacterSearch.selectedCharacter=t.selectedCharacter}var _e={"(":"bracket",")":"bracket","{":"bracket","}":"bracket","[":"section","]":"section","*":"comment","/":"comment",m:"method",M:"method","#":"preprocess"},we={bracket:{isComplete:function(e){if(e.nextCh===e.symb){if(e.depth++,e.depth>=1)return!0}else e.nextCh===e.reverseSymb&&e.depth--;return!1}},section:{init:function(e){e.curMoveThrough=!0,e.symb=(e.forward?"]":"[")===e.symb?"{":"}"},isComplete:function(e){return 0===e.index&&e.nextCh===e.symb}},comment:{isComplete:function(e){var t="*"===e.lastCh&&"/"===e.nextCh;return e.lastCh=e.nextCh,t}},method:{init:function(e){e.symb="m"===e.symb?"{":"}",e.reverseSymb="{"===e.symb?"}":"{"},isComplete:function(e){return e.nextCh===e.symb}},preprocess:{init:function(e){e.index=0},isComplete:function(e){if("#"===e.nextCh){var t=e.lineText.match(/^#(\w+)/)[1];if("endif"===t){if(e.forward&&0===e.depth)return!0;e.depth++}else if("if"===t){if(!e.forward&&0===e.depth)return!0;e.depth--}if("else"===t&&0===e.depth)return!0}return!1}}};function Me(e,t,n,i,o){var r=t.line,s=t.ch,a=e.getLine(r),u=n?1:-1,l=i?p:f;if(o&&""==a){if(r+=u,a=e.getLine(r),!M(e,r))return null;s=n?0:a.length}for(;;){if(o&&""==a)return{from:0,to:0,line:r};for(var c=u>0?a.length:-1,h=c,d=c;s!=c;){for(var g=!1,m=0;m0?0:a.length}}function Ce(e,t,n,i,o){var r=new s(t.line+n.repeat-1,1/0),a=e.clipPos(r);return a.ch--,o||(i.lastHPos=1/0,i.lastHSPos=e.charCoords(a,"div").left),r}function Se(e,t,n,i){for(var o,r=e.getCursor(),a=r.ch,u=0;u0;)d(c,i)&&n--,c+=i;return new s(c,0)}var f=e.state.vim;if(f.visualLine&&d(a,1,!0)){var p=f.sel.anchor;d(p.line,-1,!0)&&(o&&p.line==a||(a+=1))}var g=h(a);for(c=a;c<=l&&n;c++)d(c,1,!0)&&(o&&h(c)==g||n--);for(r=new s(c,0),c>l&&!g?g=!0:o=!1,c=a;c>u&&(o&&h(c)!=g&&c!=a||!d(c,-1,!0));c--);return{start:new s(c,0),end:r}}function xe(){}function De(e){var t=e.state.vim;return t.searchState_||(t.searchState_=new xe)}function ke(e,t){var n=Te(e,t)||[];if(!n.length)return[];var i=[];if(0===n[0]){for(var o=0;o@~])/);return n.commandName=i?i[1]:t.match(/.*/)[0],n},parseLineSpec_:function(e,t){var n=t.match(/^(\d+)/);if(n)return parseInt(n[1],10)-1;switch(t.next()){case".":return this.parseLineSpecOffset_(t,e.getCursor().line);case"$":return this.parseLineSpecOffset_(t,e.lastLine());case"'":var i=t.next(),o=Ve(e,e.state.vim,i);if(!o)throw new Error("Mark not set");return this.parseLineSpecOffset_(t,o.line);case"-":case"+":return t.backUp(1),this.parseLineSpecOffset_(t,e.getCursor().line);default:return void t.backUp(1)}},parseLineSpecOffset_:function(e,t){var n=e.match(/^([+-])?(\d+)/);if(n){var i=parseInt(n[2],10);"-"==n[1]?t-=i:t+=i}return t},parseCommandArgs_:function(e,t,n){if(!e.eol()){t.argString=e.match(/.*/)[0];var i=n.argDelimiter||/\s+/,o=ue(t.argString).split(i);o.length&&o[0]&&(t.args=o)}},matchCommand_:function(e){for(var t=e.length;t>0;t--){var n=e.substring(0,t);if(this.commandMap_[n]){var i=this.commandMap_[n];if(0===i.name.indexOf(e))return i}}return null},buildCommandMap_:function(){this.commandMap_={};for(var e=0;e1)return"Invalid arguments";a=(l?"decimal":c&&"hex")||h&&"octal"}s[2]&&(u=new RegExp(s[2].substr(1,s[2].length-2),i?"i":""))}}();if(l)Oe(e,l+": "+t.argString);else{var c=t.line||e.firstLine(),h=t.lineEnd||t.line||e.lastLine();if(c!=h){var d=new s(c,0),f=new s(h,ae(e,h)),p=e.getRange(d,f).split("\n"),g=u||("decimal"==a?/(-?)([\d]+)/:"hex"==a?/(-?)(?:0x)?([0-9a-f]+)/i:"octal"==a?/([0-7]+)/:null),m="decimal"==a?10:"hex"==a?16:"octal"==a?8:null,v=[],y=[];if(a||u)for(var b=0;b=o&&t<=a:t==o);)if(n||s.from().line!=h||d)return e.scrollIntoView(s.from(),30),e.setSelection(s.from(),s.to()),c=s.from(),void(f=!1);var t,o,a,u,l;f=!0}function v(t){if(t&&t(),e.focus(),c){e.setCursor(c);var n=e.state.vim;n.exMode=!1,n.lastHPos=n.lastHSPos=c.ch}l&&l()}if(m(),!f)return t?void Re(e,{prefix:je("span","replace with ",je("strong",u)," (y/n/a/q/l)"),onKeyDown:function(t,n,i){switch(o.default.e_stop(t),o.default.keyName(t)){case"Y":g(),m();break;case"N":m();break;case"A":var r=l;l=void 0,e.operation(p),l=r;break;case"L":g();case"Q":case"Esc":case"Ctrl-C":case"Ctrl-[":v(i)}return f&&v(i),!0}}):(p(),void(l&&l()));Oe(e,"No matches for "+a.source)}(e,h,f,g,m,y,p,c,t.callback)}else Oe(e,"No previous substitute regular expression")},redo:o.default.commands.redo,undo:o.default.commands.undo,write:function(e){o.default.commands.save?o.default.commands.save(e):e.save&&e.save()},nohlsearch:function(e){Be(e)},yank:function(e){var t=te(e.getCursor()).line,n=e.getLine(t);E.registerController.pushText("0","yank",n,!0,!0)},delmarks:function(e,t){if(t.argString&&ue(t.argString))for(var n=e.state.vim,i=new o.default.StringStream(ue(t.argString));!i.eol();){i.eatSpace();var r=i.pos;if(!i.match(/[a-zA-Z]/,!1))return void Oe(e,"Invalid argument: "+t.argString.substring(r));var s=i.next();if(i.match("-",!0)){if(!i.match(/[a-zA-Z]/,!1))return void Oe(e,"Invalid argument: "+t.argString.substring(r));var a=s,u=i.next();if(!(C(a)&&C(u)||S(a)&&S(u)))return void Oe(e,"Invalid argument: "+a+"-");var l=a.charCodeAt(0),c=u.charCodeAt(0);if(l>=c)return void Oe(e,"Invalid argument: "+t.argString.substring(r));for(var h=0;h<=c-l;h++){var d=String.fromCharCode(l+h);delete n.marks[d]}}else delete n.marks[s]}else Oe(e,"Argument required")}},Ge=new Ye;function Qe(e){var t=e.state.vim,n=E.macroModeState,i=E.registerController.getRegister("."),r=n.isPlaying,s=n.lastInsertModeChanges;r||(e.off("change",Je),o.default.off(e.getInputField(),"keydown",et)),!r&&t.insertModeRepeat>1&&(tt(e,t,t.insertModeRepeat-1,!0),t.lastEditInputState.repeatOverride=t.insertModeRepeat),delete t.insertModeRepeat,t.insertMode=!1,e.setCursor(e.getCursor().line,e.getCursor().ch-1),e.setOption("keyMap","vim"),e.setOption("disableInput",!0),e.toggleOverwrite(!1),i.setText(s.changes.join("")),o.default.signal(e,"vim-mode-change",{mode:"normal"}),n.isRecording&&function(e){if(!e.isPlaying){var t=e.latestRegister,n=E.registerController.getRegister(t);n&&n.pushInsertModeChanges&&n.pushInsertModeChanges(e.lastInsertModeChanges)}}(n),e.enterVimMode()}function qe(e){u.unshift(e)}function Ke(e,t,n,i){var o=E.registerController.getRegister(i);if(":"==i)return o.keyBuffer[0]&&Ge.processCommand(e,o.keyBuffer[0]),void(n.isPlaying=!1);var r=o.keyBuffer,s=0;n.isPlaying=!0,n.replaySearchQueries=o.searchQueries.slice(0);for(var a=0;a|<\w+>|./.exec(c))[0],c=c.substring(u.index+l.length),W.handleKey(e,l,"macro"),t.insertMode){var h=o.insertModeChanges[s++].changes;E.macroModeState.lastInsertModeChanges.changes=h,nt(e,h,1),Qe(e)}n.isPlaying=!1}function Je(e,t){var n=E.macroModeState,i=n.lastInsertModeChanges;if(!n.isPlaying)for(;t;){if(i.expectCursorActivityForChange=!0,i.ignoreCount>1)i.ignoreCount--;else if("+input"==t.origin||"paste"==t.origin||void 0===t.origin){var o=e.listSelections().length;o>1&&(i.ignoreCount=o);var r=t.text.join("\n");i.maybeReset&&(i.changes=[],i.maybeReset=!1),r&&(e.state.overwrite&&!/\n/.test(r)?i.changes.push([r]):i.changes.push(r))}t=t.next}}function Xe(e){var t=e.state.vim;if(t.insertMode){var n=E.macroModeState;if(n.isPlaying)return;var i=n.lastInsertModeChanges;i.expectCursorActivityForChange?i.expectCursorActivityForChange=!1:i.maybeReset=!0}else e.curOp.isVimOp||function(e,t){var n=e.getCursor("anchor"),i=e.getCursor("head");if(t.visualMode&&!e.somethingSelected()?ge(e,!1):t.visualMode||t.insertMode||!e.somethingSelected()||(t.visualMode=!0,t.visualLine=!1,o.default.signal(e,"vim-mode-change",{mode:"visual"})),t.visualMode){var r=ie(i,n)?0:-1,s=ie(i,n)?-1:0;i=X(i,0,r),n=X(n,0,s),t.sel={anchor:n,head:i},Le(e,t,"<",oe(i,n)),Le(e,t,">",re(i,n))}else t.insertMode||(t.lastHPos=e.getCursor().ch)}(e,t)}function $e(e){this.keyName=e}function et(e){var t=E.macroModeState.lastInsertModeChanges,n=o.default.keyName(e);n&&(-1==n.indexOf("Delete")&&-1==n.indexOf("Backspace")||o.default.lookupKey(n,"vim-insert",(function(){return t.maybeReset&&(t.changes=[],t.maybeReset=!1),t.changes.push(new $e(n)),!0})))}function tt(e,t,n,i){var o=E.macroModeState;o.isPlaying=!0;var r=!!t.lastEditActionCommand,s=t.inputState;function a(){r?Y.processAction(e,t,t.lastEditActionCommand):Y.evalInput(e,t)}function u(n){if(o.lastInsertModeChanges.changes.length>0){n=t.lastEditActionCommand?n:1;var i=o.lastInsertModeChanges;nt(e,i.changes,n)}}if(t.inputState=t.lastEditInputState,r&&t.lastEditActionCommand.interlaceInsertRepeat)for(var l=0;l{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=n(6625),o=n(99);function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n=this.string.length},sol:function(){return this.pos==this.lineStart},peek:function(){return this.string.charAt(this.pos)||void 0},next:function(){if(this.post},eatSpace:function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},skipToEnd:function(){this.pos=this.string.length},skipTo:function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},backUp:function(e){this.pos-=e},column:function(){throw"not implemented"},indentation:function(){throw"not implemented"},match:function(e,t,n){if("string"!=typeof e){var i=this.string.slice(this.pos).match(e);return i&&i.index>0?null:(i&&!1!==t&&(this.pos+=i[0].length),i)}var o=function(e){return n?e.toLowerCase():e};if(o(this.string.substr(this.pos,e.length))==o(e))return!1!==t&&(this.pos+=e.length),!0},current:function(){return this.string.slice(this.start,this.pos)},hideFirstChars:function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}}};var m=function(){function e(t,n,i,o){a(this,e),this.cm=t,this.id=n,this.lineNumber=i+1,this.column=o+1,t.marks[this.id]=this}return l(e,[{key:"clear",value:function(){delete this.cm.marks[this.id]}},{key:"find",value:function(){return p(this)}}]),e}();function v(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=!0,o=i.KeyCode[e.keyCode];e.key&&(o=e.key,n=!1);var r=o,s=t;switch(e.keyCode){case i.KeyCode.Shift:case i.KeyCode.Meta:case i.KeyCode.Alt:case i.KeyCode.Ctrl:return r;case i.KeyCode.Escape:s=!0,r="Esc";break;case i.KeyCode.Space:s=!0}return o.startsWith("Key")||o.startsWith("KEY_")?r=o[o.length-1].toLowerCase():o.startsWith("Digit")?r=o.slice(5,6):o.startsWith("Numpad")?r=o.slice(6,7):o.endsWith("Arrow")?(s=!0,r=o.substring(0,o.length-5)):(o.startsWith("US_")||o.startsWith("Bracket")||!r)&&(r=e.browserEvent.key),s||e.altKey||e.ctrlKey||e.metaKey?(e.altKey&&(r="Alt-".concat(r)),e.ctrlKey&&(r="Ctrl-".concat(r)),e.metaKey&&(r="Meta-".concat(r)),e.shiftKey&&(r="Shift-".concat(r))):r=e.key||e.browserEvent.key,1===r.length&&n&&(r="'".concat(r,"'")),r}var y=function(){function e(t){a(this,e),b.call(this),this.editor=t,this.state={keyMap:"vim"},this.marks={},this.$uid=0,this.disposables=[],this.listeners={},this.curOp={},this.attached=!1,this.statusBar=null,this.options={},this.addLocalListeners(),this.ctxInsert=this.editor.createContextKey("insertMode",!0)}return l(e,[{key:"attach",value:function(){e.keyMap.vim.attach(this)}},{key:"addLocalListeners",value:function(){this.disposables.push(this.editor.onDidChangeCursorPosition(this.handleCursorChange),this.editor.onDidChangeModelContent(this.handleChange),this.editor.onKeyDown(this.handleKeyDown))}},{key:"handleReplaceMode",value:function(e,t){var n=!1,o=e,r=this.editor.getPosition(),s=new i.Range(r.lineNumber,r.column,r.lineNumber,r.column+1);if(e.startsWith("'"))o=e[1];else if("Enter"===o)o="\n";else{if("Backspace"!==o)return;var a=this.replaceStack.pop();if(!a)return;n=!0,o=a,s=new i.Range(r.lineNumber,r.column,r.lineNumber,r.column-1)}t.preventDefault(),t.stopPropagation(),this.replaceStack||(this.replaceStack=[]),n||this.replaceStack.push(this.editor.getModel().getValueInRange(s)),this.editor.executeEdits("vim",[{text:o,range:s,forceMoveMarkers:!0}]),n&&this.editor.setPosition(s.getStartPosition())}},{key:"setOption",value:function(e,t){this.state[e]=t,"theme"===e&&i.editor.setTheme(t)}},{key:"getConfiguration",value:function(){var e=this.editor,t=c;return"function"==typeof e.getConfiguration?e.getConfiguration():("EditorOption"in i.editor&&(t=i.editor.EditorOption),{readOnly:e.getOption(t.readOnly),viewInfo:{cursorWidth:e.getOption(t.cursorWidth)},fontInfo:e.getOption(t.fontInfo)})}},{key:"getOption",value:function(e){return"readOnly"===e?this.getConfiguration().readOnly:"firstLineNumber"===e?this.firstLine()+1:"indentWithTabs"===e?!this.editor.getModel().getOptions().insertSpaces:"function"==typeof this.editor.getConfiguration?this.editor.getRawConfiguration()[e]:this.editor.getRawOptions()[e]}},{key:"dispatch",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;it&&(e=t-1),this.editor.getModel().getLineContent(e+1)}},{key:"getAnchorForSelection",value:function(e){return e.isEmpty()?e.getPosition():e.getDirection()===i.SelectionDirection.LTR?e.getStartPosition():e.getEndPosition()}},{key:"getHeadForSelection",value:function(e){return e.isEmpty()?e.getPosition():e.getDirection()===i.SelectionDirection.LTR?e.getEndPosition():e.getStartPosition()}},{key:"getCursor",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;if(!e)return p(this.editor.getPosition());var t=this.editor.getSelection();return p(t.isEmpty()?t.getPosition():"anchor"===e?this.getAnchorForSelection(t):this.getHeadForSelection(t))}},{key:"getRange",value:function(e,t){var n=g(e),o=g(t);return this.editor.getModel().getValueInRange(i.Range.fromPositions(n,o))}},{key:"getSelection",value:function(){var e=[],t=this.editor;return t.getSelections().map((function(n){e.push(t.getModel().getValueInRange(n))})),e.join("\n")}},{key:"replaceRange",value:function(e,t,n){var o=g(t),r=n?g(n):o;this.editor.executeEdits("vim",[{text:e,range:i.Range.fromPositions(o,r)}]),this.pushUndoStop()}},{key:"pushUndoStop",value:function(){this.editor.pushUndoStop()}},{key:"setCursor",value:function(e,t){var n=e;"object"!==s(e)&&((n={}).line=e,n.ch=t);var i=this.editor.getModel().validatePosition(g(n));this.editor.setPosition(g(n)),this.editor.revealPosition(i)}},{key:"somethingSelected",value:function(){return!this.editor.getSelection().isEmpty()}},{key:"operation",value:function(e,t){return e()}},{key:"listSelections",value:function(){var e=this,t=this.editor.getSelections();return!t.length||this.inVirtualSelectionMode?[{anchor:this.getCursor("anchor"),head:this.getCursor("head")}]:t.map((function(t){return t.getPosition(),t.getStartPosition(),t.getEndPosition(),{anchor:e.clipPos(p(e.getAnchorForSelection(t))),head:e.clipPos(p(e.getHeadForSelection(t)))}}))}},{key:"focus",value:function(){this.editor.focus()}},{key:"setSelections",value:function(e,t){var n=!!this.editor.getSelections().length,o=e.map((function(e,t){var o=e.anchor,r=e.head;return n?i.Selection.fromPositions(g(o),g(r)):i.Selection.fromPositions(g(r),g(o))}));if(t&&o[t]&&o.push(o.splice(t,1)[0]),o.length){var r,s=o[0];r=s.getDirection()===i.SelectionDirection.LTR?s.getEndPosition():s.getStartPosition(),this.editor.setSelections(o),this.editor.revealPosition(r)}}},{key:"setSelection",value:function(e,t){var n=i.Range.fromPositions(g(e),g(t));this.editor.setSelection(n)}},{key:"getSelections",value:function(){var e=this.editor;return e.getSelections().map((function(t){return e.getModel().getValueInRange(t)}))}},{key:"replaceSelections",value:function(e){var t=this.editor;t.getSelections().forEach((function(n,i){t.executeEdits("vim",[{range:n,text:e[i],forceMoveMarkers:!1}])}))}},{key:"toggleOverwrite",value:function(e){e?(this.enterVimMode(),this.replaceMode=!0):(this.leaveVimMode(),this.replaceMode=!1,this.replaceStack=[])}},{key:"charCoords",value:function(e,t){return{top:e.line,left:e.ch}}},{key:"coordsChar",value:function(e,t){}},{key:"clipPos",value:function(e){return p(this.editor.getModel().validatePosition(g(e)))}},{key:"setBookmark",value:function(e,t){var n=new m(this,this.$uid++,e.line,e.ch);return t&&t.insertLeft||(n.$insertRight=!0),this.marks[n.id]=n,n}},{key:"getScrollInfo",value:function(){var e,t,n=this.editor,i=(e=n.getVisibleRanges(),t=1,function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var i,o,r=[],s=!0,a=!1;try{for(n=n.call(e);!(s=(i=n.next()).done)&&(r.push(i.value),!t||r.length!==t);s=!0);}catch(e){a=!0,o=e}finally{try{s||null==n.return||n.return()}finally{if(a)throw o}}return r}}(e,t)||function(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())[0];return{left:0,top:i.startLineNumber-1,height:n.getModel().getLineCount(),clientHeight:i.endLineNumber-i.startLineNumber+1}}},{key:"triggerEditorAction",value:function(e){this.editor.trigger("vim",e)}},{key:"dispose",value:function(){this.dispatch("dispose"),this.removeOverlay(),e.keyMap.vim&&e.keyMap.vim.detach(this),this.disposables.forEach((function(e){return e.dispose()}))}},{key:"getInputField",value:function(){}},{key:"getWrapperElement",value:function(){}},{key:"enterVimMode",value:function(){this.ctxInsert.set(!1);var e=this.getConfiguration();this.initialCursorWidth=e.viewInfo.cursorWidth||0,this.editor.updateOptions({cursorWidth:e.fontInfo.typicalFullwidthCharacterWidth,cursorBlinking:"solid"})}},{key:"leaveVimMode",value:function(){this.ctxInsert.set(!0),this.editor.updateOptions({cursorWidth:this.initialCursorWidth||0,cursorBlinking:"blink"})}},{key:"virtualSelectionMode",value:function(){return this.inVirtualSelectionMode}},{key:"markText",value:function(){return{clear:function(){},find:function(){}}}},{key:"getUserVisibleLines",value:function(){var e=this.editor.getVisibleRanges();if(!e.length)return{top:0,bottom:0};var t={top:1/0,bottom:0};return e.reduce((function(e,t){return t.startLineNumbere.bottom&&(e.bottom=t.endLineNumber),e}),t),t.top-=1,t.bottom-=1,t}},{key:"findPosV",value:function(e,t,n){var i=this.editor,o=t,r=n,s=g(e);if("page"===n){var a=i.getLayoutInfo().height,u=this.getConfiguration().fontInfo.lineHeight;o*=Math.floor(a/u),r="line"}return"line"===r&&(s.lineNumber+=o),p(s)}},{key:"findMatchingBracket",value:function(e){var t,n,i=g(e),o=this.editor.getModel();return(t=o.bracketPairs?o.bracketPairs.matchBracket(i):null===(n=o.matchBracket)||void 0===n?void 0:n.call(o,i))&&2===t.length?{to:p(t[1].getStartPosition())}:{to:null}}},{key:"findFirstNonWhiteSpaceCharacter",value:function(e){return this.editor.getModel().getLineFirstNonWhitespaceColumn(e+1)-1}},{key:"scrollTo",value:function(e,t){(e||t)&&(e||(t<0&&(t=this.editor.getPosition().lineNumber-t),this.editor.setScrollTop(this.editor.getTopForLineNumber(t+1))))}},{key:"moveCurrentLineTo",value:function(e){var t,n=this.editor,o=n.getPosition(),r=i.Range.fromPositions(o,o);switch(e){case"top":return void n.revealRangeAtTop(r);case"center":return void n.revealRangeInCenter(r);case"bottom":return void(null===(t=n._revealRange)||void 0===t||t.call(n,r,4))}}},{key:"getSearchCursor",value:function(e,t){var n=!1,i=!1;e instanceof RegExp&&!e.global&&(n=!e.ignoreCase,e=e.source,i=!0),null==t.ch&&(t.ch=Number.MAX_VALUE);var o=g(t),r=this,s=this.editor,a=null,u=s.getModel(),l=u.findMatches(e,!1,i,n)||[];return{getMatches:function(){return l},findNext:function(){return this.find(!1)},findPrevious:function(){return this.find(!0)},jumpTo:function(e){if(!l||!l.length)return!1;var t=l[e];return a=t.range,r.highlightRanges([a],"currentFindMatch"),r.highlightRanges(l.map((function(e){return e.range})).filter((function(e){return!e.equalsRange(a)}))),a},find:function(t){if(!l||!l.length)return!1;var s;if(t){var c=a?a.getStartPosition():o;if(!(s=u.findPreviousMatch(e,c,i,n))||!s.range.getStartPosition().isBeforeOrEqual(c))return!1}else{var h=a?u.getPositionAt(u.getOffsetAt(a.getStartPosition())+1):o;if(!(s=u.findNextMatch(e,h,i,n))||!h.isBeforeOrEqual(s.range.getStartPosition()))return!1}return a=s.range,r.highlightRanges([a],"currentFindMatch"),r.highlightRanges(l.map((function(e){return e.range})).filter((function(e){return!e.equalsRange(a)}))),a},from:function(){return a&&p(a.getStartPosition())},to:function(){return a&&p(a.getEndPosition())},replace:function(e){a&&(s.executeEdits("vim",[{range:a,text:e,forceMoveMarkers:!0}]),a.setEndPosition(s.getPosition()),s.setPosition(a.getStartPosition()))}}}},{key:"highlightRanges",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"findMatch",n="decoration".concat(t);return this[n]=this.editor.deltaDecorations(this[n]||[],e.map((function(e){return{range:e,options:{stickiness:i.editor.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges,zIndex:13,className:t,showIfCollapsed:!0}}}))),this[n]}},{key:"addOverlay",value:function(e,t,n){var i=e.query,o=!1,r=!1;i&&i instanceof RegExp&&!i.global&&(r=!0,o=!i.ignoreCase,i=i.source);var s=this.editor.getModel().findNextMatch(i,this.editor.getPosition(),r,o);s&&s.range&&this.highlightRanges([s.range])}},{key:"removeOverlay",value:function(){var e=this;["currentFindMatch","findMatch"].forEach((function(t){e.editor.deltaDecorations(e["decoration".concat(t)]||[],[])}))}},{key:"scrollIntoView",value:function(e){e&&this.editor.revealPosition(g(e))}},{key:"moveH",value:function(e,t){if("char"===t){var n=this.editor.getPosition();this.editor.setPosition(new i.Position(n.lineNumber,n.column+e))}}},{key:"scanForBracket",value:function(t,n,i,o){for(var r=o.bracketRegex,s=g(t),a=this.editor.getModel(),u=(-1===n?a.findPreviousMatch:a.findNextMatch).bind(a),l=[],c=0;;){if(c>10)return;var h=u(r.source,s,!0,!0,null,!0),d=h.matches[0];if(void 0===h)return;var f=e.matchingBrackets[d];if(f&&">"===f.charAt(1)==n>0)l.push(d);else{if(0===l.length)return{pos:p(h.range.getStartPosition())};l.pop()}s=a.getPositionAt(a.getOffsetAt(h.range.getStartPosition())+n),c+=1}}},{key:"indexFromPos",value:function(e){return this.editor.getModel().getOffsetAt(g(e))}},{key:"posFromIndex",value:function(e){return p(this.editor.getModel().getPositionAt(e))}},{key:"indentLine",value:function(e){var t,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=this.editor;t=r._getViewModel?r._getViewModel().cursorConfig:r._getCursors().context.config;var s=new i.Position(e+1,1),a=i.Selection.fromPositions(s,s);r.executeCommand("vim",new o.ShiftCommand(a,{isUnshift:!n,tabSize:t.tabSize,indentSize:t.indentSize,insertSpaces:t.insertSpaces,useTabStops:t.useTabStops,autoIndent:t.autoIndent}))}},{key:"setStatusBar",value:function(e){this.statusBar=e}},{key:"openDialog",value:function(e,t,n){if(this.statusBar)return this.statusBar.setSec(e,t,n)}},{key:"openNotification",value:function(e){this.statusBar&&this.statusBar.showNotification(e)}},{key:"smartIndent",value:function(){this.editor.getAction("editor.action.formatSelection").run()}},{key:"moveCursorTo",value:function(e){var t=this.editor.getPosition();"start"===e?t.column=1:"end"===e&&(t.column=this.editor.getModel().getLineMaxColumn(t.lineNumber)),this.editor.setPosition(t)}},{key:"execCommand",value:function(e){switch(e){case"goLineLeft":this.moveCursorTo("start");break;case"goLineRight":this.moveCursorTo("end");break;case"indentAuto":this.smartIndent()}}}]),e}();y.Pos=d,y.signal=function(e,t,n){e.dispatch(t,n)},y.on=function(){},y.off=function(){},y.addClass=function(){},y.rmClass=function(){},y.defineOption=function(){},y.keyMap={default:function(e){return function(e){return!0}}},y.matchingBrackets={"(":")>",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<","<":">>",">":"<<"},y.isWordChar=function(e){return/\w/.test(e)||e>"€"&&(e.toUpperCase()!=e.toLowerCase()||h.test(e))},y.keyName=v,y.StringStream=f,y.e_stop=function(e){return e.stopPropagation?e.stopPropagation():e.cancelBubble=!0,y.e_preventDefault(e),!1},y.e_preventDefault=function(e){return e.preventDefault?(e.preventDefault(),e.browserEvent&&e.browserEvent.preventDefault()):e.returnValue=!1,!1},y.commands={redo:function(e){e.editor.getModel().redo()},undo:function(e){e.editor.getModel().undo()},newlineAndIndent:function(e){e.triggerEditorAction("editor.action.insertLineAfter")}},y.lookupKey=function e(t,n,i){"string"==typeof n&&(n=y.keyMap[n]);var o="function"==typeof n?n(t):n[t];if(!1===o)return"nothing";if("..."===o)return"multi";if(null!=o&&i(o))return"handled";if(n.fallthrough){if(!Array.isArray(n.fallthrough))return e(t,n.fallthrough,i);for(var r=0;r{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"StatusBar",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"VimMode",{enumerable:!0,get:function(){return i.default}}),t.initVimMode=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:o.default,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,s=new i.default(e);if(!t)return s.attach(),s;var a=new n(t,e,r),u="";return s.on("vim-mode-change",(function(e){a.setMode(e)})),s.on("vim-keypress",(function(e){":"===e?u="":u+=e,a.setKeyBuffer(u)})),s.on("vim-command-done",(function(){u="",a.setKeyBuffer(u)})),s.on("dispose",(function(){a.toggleVisibility(!1),a.closeInput(),a.clear()})),a.toggleVisibility(!0),s.setStatusBar(a),s.attach(),s};var i=r(n(1655)),o=r(n(6817));function r(e){return e&&e.__esModule?e:{default:e}}},6817:(e,t)=>{"use strict";function n(e,t){for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:null;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.closeInput=function(){i.removeInputListeners(),i.input=null,i.setSec(""),i.editor&&i.editor.focus()},this.clear=function(){i.setInnerHtml_(i.node,"")},this.inputKeyUp=function(e){var t=i.input.options;t&&t.onKeyUp&&t.onKeyUp(e,e.target.value,i.closeInput)},this.inputKeyInput=function(e){var t=i.input.options;t&&t.onKeyInput&&t.onKeyUp(e,e.target.value,i.closeInput)},this.inputBlur=function(){i.input.options.closeOnBlur&&i.closeInput()},this.inputKeyDown=function(e){var t=i.input,n=t.options,o=t.callback;n&&n.onKeyDown&&n.onKeyDown(e,e.target.value,i.closeInput)||((27===e.keyCode||n&&!1!==n.closeOnEnter&&13==e.keyCode)&&(i.input.node.blur(),e.stopPropagation(),i.closeInput()),13===e.keyCode&&o&&(e.stopPropagation(),e.preventDefault(),o(e.target.value)))},this.node=t,this.modeInfoNode=document.createElement("span"),this.secInfoNode=document.createElement("span"),this.notifNode=document.createElement("span"),this.notifNode.className="vim-notification",this.keyInfoNode=document.createElement("span"),this.keyInfoNode.setAttribute("style","float: right"),this.node.appendChild(this.modeInfoNode),this.node.appendChild(this.secInfoNode),this.node.appendChild(this.notifNode),this.node.appendChild(this.keyInfoNode),this.toggleVisibility(!1),this.editor=n,this.sanitizer=o}var t,i;return t=e,(i=[{key:"setMode",value:function(e){"visual"!==e.mode?this.setText("--".concat(e.mode.toUpperCase(),"--")):"linewise"===e.subMode?this.setText("--VISUAL LINE--"):"blockwise"===e.subMode?this.setText("--VISUAL BLOCK--"):this.setText("--VISUAL--")}},{key:"setKeyBuffer",value:function(e){this.keyInfoNode.textContent=e}},{key:"setSec",value:function(e,t,n){if(this.notifNode.textContent="",void 0===e)return this.closeInput;this.setInnerHtml_(this.secInfoNode,e);var i=this.secInfoNode.querySelector("input");return i&&(i.focus(),this.input={callback:t,options:n,node:i},n&&(n.selectValueOnOpen&&i.select(),n.value&&(i.value=n.value)),this.addInputListeners()),this.closeInput}},{key:"setText",value:function(e){this.modeInfoNode.textContent=e}},{key:"toggleVisibility",value:function(e){this.node.style.display=e?"block":"none",this.input&&this.removeInputListeners(),clearInterval(this.notifTimeout)}},{key:"addInputListeners",value:function(){var e=this.input.node;e.addEventListener("keyup",this.inputKeyUp),e.addEventListener("keydown",this.inputKeyDown),e.addEventListener("input",this.inputKeyInput),e.addEventListener("blur",this.inputBlur)}},{key:"removeInputListeners",value:function(){if(this.input&&this.input.node){var e=this.input.node;e.removeEventListener("keyup",this.inputKeyUp),e.removeEventListener("keydown",this.inputKeyDown),e.removeEventListener("input",this.inputKeyInput),e.removeEventListener("blur",this.inputBlur)}}},{key:"showNotification",value:function(e){var t=this,n=document.createElement("span");this.setInnerHtml_(n,e),this.notifNode.textContent=n.textContent,this.notifTimeout=setTimeout((function(){t.notifNode.textContent=""}),5e3)}},{key:"setInnerHtml_",value:function(e,t){for(;e.childNodes.length;)e.removeChild(e.childNodes[0]);t&&(this.sanitizer?e.appendChild(this.sanitizer(t)):e.appendChild(t))}}])&&n(t.prototype,i),Object.defineProperty(t,"prototype",{writable:!1}),e}();t.default=i},2935:(e,t)=>{t.endianness=function(){return"LE"},t.hostname=function(){return"undefined"!=typeof location?location.hostname:""},t.loadavg=function(){return[]},t.uptime=function(){return 0},t.freemem=function(){return Number.MAX_VALUE},t.totalmem=function(){return Number.MAX_VALUE},t.cpus=function(){return[]},t.type=function(){return"Browser"},t.release=function(){return"undefined"!=typeof navigator?navigator.appVersion:""},t.networkInterfaces=t.getNetworkInterfaces=function(){return{}},t.arch=function(){return"javascript"},t.platform=function(){return"browser"},t.tmpdir=t.tmpDir=function(){return"/tmp"},t.EOL="\n",t.homedir=function(){return"/"}},2082:(e,t,n)=>{"use strict";var i=n(3529);t.certificate=n(8244);var o=i.define("RSAPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("modulus").int(),this.key("publicExponent").int(),this.key("privateExponent").int(),this.key("prime1").int(),this.key("prime2").int(),this.key("exponent1").int(),this.key("exponent2").int(),this.key("coefficient").int())}));t.RSAPrivateKey=o;var r=i.define("RSAPublicKey",(function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())}));t.RSAPublicKey=r;var s=i.define("AlgorithmIdentifier",(function(){this.seq().obj(this.key("algorithm").objid(),this.key("none").null_().optional(),this.key("curve").objid().optional(),this.key("params").seq().obj(this.key("p").int(),this.key("q").int(),this.key("g").int()).optional())})),a=i.define("SubjectPublicKeyInfo",(function(){this.seq().obj(this.key("algorithm").use(s),this.key("subjectPublicKey").bitstr())}));t.PublicKey=a;var u=i.define("PrivateKeyInfo",(function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(s),this.key("subjectPrivateKey").octstr())}));t.PrivateKey=u;var l=i.define("EncryptedPrivateKeyInfo",(function(){this.seq().obj(this.key("algorithm").seq().obj(this.key("id").objid(),this.key("decrypt").seq().obj(this.key("kde").seq().obj(this.key("id").objid(),this.key("kdeparams").seq().obj(this.key("salt").octstr(),this.key("iters").int())),this.key("cipher").seq().obj(this.key("algo").objid(),this.key("iv").octstr()))),this.key("subjectPrivateKey").octstr())}));t.EncryptedPrivateKey=l;var c=i.define("DSAPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("p").int(),this.key("q").int(),this.key("g").int(),this.key("pub_key").int(),this.key("priv_key").int())}));t.DSAPrivateKey=c,t.DSAparam=i.define("DSAparam",(function(){this.int()}));var h=i.define("ECParameters",(function(){this.choice({namedCurve:this.objid()})})),d=i.define("ECPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(h),this.key("publicKey").optional().explicit(1).bitstr())}));t.ECPrivateKey=d,t.signature=i.define("signature",(function(){this.seq().obj(this.key("r").int(),this.key("s").int())}))},8244:(e,t,n)=>{"use strict";var i=n(3529),o=i.define("Time",(function(){this.choice({utcTime:this.utctime(),generalTime:this.gentime()})})),r=i.define("AttributeTypeValue",(function(){this.seq().obj(this.key("type").objid(),this.key("value").any())})),s=i.define("AlgorithmIdentifier",(function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional(),this.key("curve").objid().optional())})),a=i.define("SubjectPublicKeyInfo",(function(){this.seq().obj(this.key("algorithm").use(s),this.key("subjectPublicKey").bitstr())})),u=i.define("RelativeDistinguishedName",(function(){this.setof(r)})),l=i.define("RDNSequence",(function(){this.seqof(u)})),c=i.define("Name",(function(){this.choice({rdnSequence:this.use(l)})})),h=i.define("Validity",(function(){this.seq().obj(this.key("notBefore").use(o),this.key("notAfter").use(o))})),d=i.define("Extension",(function(){this.seq().obj(this.key("extnID").objid(),this.key("critical").bool().def(!1),this.key("extnValue").octstr())})),f=i.define("TBSCertificate",(function(){this.seq().obj(this.key("version").explicit(0).int().optional(),this.key("serialNumber").int(),this.key("signature").use(s),this.key("issuer").use(c),this.key("validity").use(h),this.key("subject").use(c),this.key("subjectPublicKeyInfo").use(a),this.key("issuerUniqueID").implicit(1).bitstr().optional(),this.key("subjectUniqueID").implicit(2).bitstr().optional(),this.key("extensions").explicit(3).seqof(d).optional())})),p=i.define("X509Certificate",(function(){this.seq().obj(this.key("tbsCertificate").use(f),this.key("signatureAlgorithm").use(s),this.key("signatureValue").bitstr())}));e.exports=p},272:(e,t,n)=>{"use strict";var i=/Proc-Type: 4,ENCRYPTED[\n\r]+DEK-Info: AES-((?:128)|(?:192)|(?:256))-CBC,([0-9A-H]+)[\n\r]+([0-9A-z\n\r+/=]+)[\n\r]+/m,o=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----/m,r=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----([0-9A-z\n\r+/=]+)-----END \1-----$/m,s=n(8819),a=n(8668),u=n(1059).Buffer;e.exports=function(e,t){var n,l=e.toString(),c=l.match(i);if(c){var h="aes"+c[1],d=u.from(c[2],"hex"),f=u.from(c[3].replace(/[\r\n]/g,""),"base64"),p=s(t,d.slice(0,8),parseInt(c[1],10)).key,g=[],m=a.createDecipheriv(h,p,d);g.push(m.update(f)),g.push(m.final()),n=u.concat(g)}else{var v=l.match(r);n=u.from(v[2].replace(/[\r\n]/g,""),"base64")}return{tag:l.match(o)[1],data:n}}},5891:(e,t,n)=>{"use strict";var i=n(2082),o=n(5579),r=n(272),s=n(8668),a=n(853),u=n(1059).Buffer;function l(e){var t;"object"!=typeof e||u.isBuffer(e)||(t=e.passphrase,e=e.key),"string"==typeof e&&(e=u.from(e));var n,l,c=r(e,t),h=c.tag,d=c.data;switch(h){case"CERTIFICATE":l=i.certificate.decode(d,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":switch(l||(l=i.PublicKey.decode(d,"der")),n=l.algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return i.RSAPublicKey.decode(l.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return l.subjectPrivateKey=l.subjectPublicKey,{type:"ec",data:l};case"1.2.840.10040.4.1":return l.algorithm.params.pub_key=i.DSAparam.decode(l.subjectPublicKey.data,"der"),{type:"dsa",data:l.algorithm.params};default:throw new Error("unknown key id "+n)}case"ENCRYPTED PRIVATE KEY":d=function(e,t){var n=e.algorithm.decrypt.kde.kdeparams.salt,i=parseInt(e.algorithm.decrypt.kde.kdeparams.iters.toString(),10),r=o[e.algorithm.decrypt.cipher.algo.join(".")],l=e.algorithm.decrypt.cipher.iv,c=e.subjectPrivateKey,h=parseInt(r.split("-")[1],10)/8,d=a.pbkdf2Sync(t,n,i,h,"sha1"),f=s.createDecipheriv(r,d,l),p=[];return p.push(f.update(c)),p.push(f.final()),u.concat(p)}(d=i.EncryptedPrivateKey.decode(d,"der"),t);case"PRIVATE KEY":switch(n=(l=i.PrivateKey.decode(d,"der")).algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return i.RSAPrivateKey.decode(l.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:l.algorithm.curve,privateKey:i.ECPrivateKey.decode(l.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return l.algorithm.params.priv_key=i.DSAparam.decode(l.subjectPrivateKey,"der"),{type:"dsa",params:l.algorithm.params};default:throw new Error("unknown key id "+n)}case"RSA PUBLIC KEY":return i.RSAPublicKey.decode(d,"der");case"RSA PRIVATE KEY":return i.RSAPrivateKey.decode(d,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:i.DSAPrivateKey.decode(d,"der")};case"EC PRIVATE KEY":return{curve:(d=i.ECPrivateKey.decode(d,"der")).parameters.value,privateKey:d.privateKey};default:throw new Error("unknown key type "+h)}}l.signature=i.signature,e.exports=l},1059:(e,t,n)=>{var i=n(1278),o=i.Buffer;function r(e,t){for(var n in e)t[n]=e[n]}function s(e,t,n){return o(e,t,n)}o.from&&o.alloc&&o.allocUnsafe&&o.allocUnsafeSlow?e.exports=i:(r(i,t),t.Buffer=s),s.prototype=Object.create(o.prototype),r(o,s),s.from=function(e,t,n){if("number"==typeof e)throw new TypeError("Argument must not be a number");return o(e,t,n)},s.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError("Argument must be a number");var i=o(e);return void 0!==t?"string"==typeof n?i.fill(t,n):i.fill(t):i.fill(0),i},s.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return o(e)},s.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i.SlowBuffer(e)}},4708:(e,t,n)=>{"use strict";var i=n(8957);function o(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}function r(e,t){for(var n,i="",o=0,r=-1,s=0,a=0;a<=e.length;++a){if(a2){var u=i.lastIndexOf("/");if(u!==i.length-1){-1===u?(i="",o=0):o=(i=i.slice(0,u)).length-1-i.lastIndexOf("/"),r=a,s=0;continue}}else if(2===i.length||1===i.length){i="",o=0,r=a,s=0;continue}t&&(i.length>0?i+="/..":i="..",o=2)}else i.length>0?i+="/"+e.slice(r+1,a):i=e.slice(r+1,a),o=a-r-1;r=a,s=0}else 46===n&&-1!==s?++s:s=-1}return i}var s={resolve:function(){for(var e,t="",n=!1,s=arguments.length-1;s>=-1&&!n;s--){var a;s>=0?a=arguments[s]:(void 0===e&&(e=i.cwd()),a=e),o(a),0!==a.length&&(t=a+"/"+t,n=47===a.charCodeAt(0))}return t=r(t,!n),n?t.length>0?"/"+t:"/":t.length>0?t:"."},normalize:function(e){if(o(e),0===e.length)return".";var t=47===e.charCodeAt(0),n=47===e.charCodeAt(e.length-1);return 0!==(e=r(e,!t)).length||t||(e="."),e.length>0&&n&&(e+="/"),t?"/"+e:e},isAbsolute:function(e){return o(e),e.length>0&&47===e.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var e,t=0;t0&&(void 0===e?e=n:e+="/"+n)}return void 0===e?".":s.normalize(e)},relative:function(e,t){if(o(e),o(t),e===t)return"";if((e=s.resolve(e))===(t=s.resolve(t)))return"";for(var n=1;nl){if(47===t.charCodeAt(a+h))return t.slice(a+h+1);if(0===h)return t.slice(a+h)}else r>l&&(47===e.charCodeAt(n+h)?c=h:0===h&&(c=0));break}var d=e.charCodeAt(n+h);if(d!==t.charCodeAt(a+h))break;47===d&&(c=h)}var f="";for(h=n+c+1;h<=i;++h)h!==i&&47!==e.charCodeAt(h)||(0===f.length?f+="..":f+="/..");return f.length>0?f+t.slice(a+c):(a+=c,47===t.charCodeAt(a)&&++a,t.slice(a))},_makeLong:function(e){return e},dirname:function(e){if(o(e),0===e.length)return".";for(var t=e.charCodeAt(0),n=47===t,i=-1,r=!0,s=e.length-1;s>=1;--s)if(47===(t=e.charCodeAt(s))){if(!r){i=s;break}}else r=!1;return-1===i?n?"/":".":n&&1===i?"//":e.slice(0,i)},basename:function(e,t){if(void 0!==t&&"string"!=typeof t)throw new TypeError('"ext" argument must be a string');o(e);var n,i=0,r=-1,s=!0;if(void 0!==t&&t.length>0&&t.length<=e.length){if(t.length===e.length&&t===e)return"";var a=t.length-1,u=-1;for(n=e.length-1;n>=0;--n){var l=e.charCodeAt(n);if(47===l){if(!s){i=n+1;break}}else-1===u&&(s=!1,u=n+1),a>=0&&(l===t.charCodeAt(a)?-1==--a&&(r=n):(a=-1,r=u))}return i===r?r=u:-1===r&&(r=e.length),e.slice(i,r)}for(n=e.length-1;n>=0;--n)if(47===e.charCodeAt(n)){if(!s){i=n+1;break}}else-1===r&&(s=!1,r=n+1);return-1===r?"":e.slice(i,r)},extname:function(e){o(e);for(var t=-1,n=0,i=-1,r=!0,s=0,a=e.length-1;a>=0;--a){var u=e.charCodeAt(a);if(47!==u)-1===i&&(r=!1,i=a+1),46===u?-1===t?t=a:1!==s&&(s=1):-1!==t&&(s=-1);else if(!r){n=a+1;break}}return-1===t||-1===i||0===s||1===s&&t===i-1&&t===n+1?"":e.slice(t,i)},format:function(e){if(null===e||"object"!=typeof e)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return function(e,t){var n=t.dir||t.root,i=t.base||(t.name||"")+(t.ext||"");return n?n===t.root?n+i:n+"/"+i:i}(0,e)},parse:function(e){o(e);var t={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return t;var n,i=e.charCodeAt(0),r=47===i;r?(t.root="/",n=1):n=0;for(var s=-1,a=0,u=-1,l=!0,c=e.length-1,h=0;c>=n;--c)if(47!==(i=e.charCodeAt(c)))-1===u&&(l=!1,u=c+1),46===i?-1===s?s=c:1!==h&&(h=1):-1!==s&&(h=-1);else if(!l){a=c+1;break}return-1===s||-1===u||0===h||1===h&&s===u-1&&s===a+1?-1!==u&&(t.base=t.name=0===a&&r?e.slice(1,u):e.slice(a,u)):(0===a&&r?(t.name=e.slice(1,s),t.base=e.slice(1,u)):(t.name=e.slice(a,s),t.base=e.slice(a,u)),t.ext=e.slice(s,u)),a>0?t.dir=e.slice(0,a-1):r&&(t.dir="/"),t},sep:"/",delimiter:":",win32:null,posix:null};s.posix=s,e.exports=s},853:(e,t,n)=>{t.pbkdf2=n(285),t.pbkdf2Sync=n(1895)},285:(e,t,n)=>{var i,o,r=n(2238).Buffer,s=n(399),a=n(7424),u=n(1895),l=n(2483),c=n.g.crypto&&n.g.crypto.subtle,h={sha:"SHA-1","sha-1":"SHA-1",sha1:"SHA-1",sha256:"SHA-256","sha-256":"SHA-256",sha384:"SHA-384","sha-384":"SHA-384","sha-512":"SHA-512",sha512:"SHA-512"},d=[];function f(){return o||(o=n.g.process&&n.g.process.nextTick?n.g.process.nextTick:n.g.queueMicrotask?n.g.queueMicrotask:n.g.setImmediate?n.g.setImmediate:n.g.setTimeout)}function p(e,t,n,i,o){return c.importKey("raw",e,{name:"PBKDF2"},!1,["deriveBits"]).then((function(e){return c.deriveBits({name:"PBKDF2",salt:t,iterations:n,hash:{name:o}},e,i<<3)})).then((function(e){return r.from(e)}))}e.exports=function(e,t,o,g,m,v){"function"==typeof m&&(v=m,m=void 0);var y=h[(m=m||"sha1").toLowerCase()];if(y&&"function"==typeof n.g.Promise){if(s(o,g),e=l(e,a,"Password"),t=l(t,a,"Salt"),"function"!=typeof v)throw new Error("No callback provided to pbkdf2");!function(e,t){e.then((function(e){f()((function(){t(null,e)}))}),(function(e){f()((function(){t(e)}))}))}(function(e){if(n.g.process&&!n.g.process.browser)return Promise.resolve(!1);if(!c||!c.importKey||!c.deriveBits)return Promise.resolve(!1);if(void 0!==d[e])return d[e];var t=p(i=i||r.alloc(8),i,10,128,e).then((function(){return!0})).catch((function(){return!1}));return d[e]=t,t}(y).then((function(n){return n?p(e,t,o,g,y):u(e,t,o,g,m)})),v)}else f()((function(){var n;try{n=u(e,t,o,g,m)}catch(e){return v(e)}v(null,n)}))}},7424:(e,t,n)=>{var i,o=n(8957);i=n.g.process&&n.g.process.browser?"utf-8":n.g.process&&n.g.process.version?parseInt(o.version.split(".")[0].slice(1),10)>=6?"utf-8":"binary":"utf-8",e.exports=i},399:e=>{var t=Math.pow(2,30)-1;e.exports=function(e,n){if("number"!=typeof e)throw new TypeError("Iterations not a number");if(e<0)throw new TypeError("Bad iterations");if("number"!=typeof n)throw new TypeError("Key length not a number");if(n<0||n>t||n!=n)throw new TypeError("Bad key length")}},1895:(e,t,n)=>{var i=n(4159),o=n(2428),r=n(5203),s=n(2238).Buffer,a=n(399),u=n(7424),l=n(2483),c=s.alloc(128),h={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};function d(e,t,n){var a=function(e){return"rmd160"===e||"ripemd160"===e?function(e){return(new o).update(e).digest()}:"md5"===e?i:function(t){return r(e).update(t).digest()}}(e),u="sha512"===e||"sha384"===e?128:64;t.length>u?t=a(t):t.length{var i=n(2238).Buffer;e.exports=function(e,t,n){if(i.isBuffer(e))return e;if("string"==typeof e)return i.from(e,t);if(ArrayBuffer.isView(e))return i.from(e.buffer);throw new TypeError(n+" must be a string, a Buffer, a typed array or a DataView")}},2808:(e,t,n)=>{"use strict";var i=n(8957);void 0===i||!i.version||0===i.version.indexOf("v0.")||0===i.version.indexOf("v1.")&&0!==i.version.indexOf("v1.8.")?e.exports={nextTick:function(e,t,n,o){if("function"!=typeof e)throw new TypeError('"callback" argument must be a function');var r,s,a=arguments.length;switch(a){case 0:case 1:return i.nextTick(e);case 2:return i.nextTick((function(){e.call(null,t)}));case 3:return i.nextTick((function(){e.call(null,t,n)}));case 4:return i.nextTick((function(){e.call(null,t,n,o)}));default:for(r=new Array(a-1),s=0;s{var t,n,i=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function r(){throw new Error("clearTimeout has not been defined")}function s(e){if(t===setTimeout)return setTimeout(e,0);if((t===o||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(n){try{return t.call(null,e,0)}catch(n){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:o}catch(e){t=o}try{n="function"==typeof clearTimeout?clearTimeout:r}catch(e){n=r}}();var a,u=[],l=!1,c=-1;function h(){l&&a&&(l=!1,a.length?u=a.concat(u):c=-1,u.length&&d())}function d(){if(!l){var e=s(h);l=!0;for(var t=u.length;t;){for(a=u,u=[];++c1)for(var n=1;n{t.publicEncrypt=n(3347),t.privateDecrypt=n(2965),t.privateEncrypt=function(e,n){return t.publicEncrypt(e,n,!0)},t.publicDecrypt=function(e,n){return t.privateDecrypt(e,n,!0)}},9643:(e,t,n)=>{var i=n(2059),o=n(2238).Buffer;function r(e){var t=o.allocUnsafe(4);return t.writeUInt32BE(e,0),t}e.exports=function(e,t){for(var n,s=o.alloc(0),a=0;s.length=65&&n<=70?n-55:n>=97&&n<=102?n-87:n-48&15}function u(e,t,n){var i=a(e,n);return n-1>=t&&(i|=a(e,n-1)<<4),i}function l(e,t,n,i){for(var o=0,r=Math.min(e.length,n),s=t;s=49?a-49+10:a>=17?a-17+10:a}return o}r.isBN=function(e){return e instanceof r||null!==e&&"object"==typeof e&&e.constructor.wordSize===r.wordSize&&Array.isArray(e.words)},r.max=function(e,t){return e.cmp(t)>0?e:t},r.min=function(e,t){return e.cmp(t)<0?e:t},r.prototype._init=function(e,t,n){if("number"==typeof e)return this._initNumber(e,t,n);if("object"==typeof e)return this._initArray(e,t,n);"hex"===t&&(t=16),i(t===(0|t)&&t>=2&&t<=36);var o=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(o++,this.negative=1),o=0;o-=3)s=e[o]|e[o-1]<<8|e[o-2]<<16,this.words[r]|=s<>>26-a&67108863,(a+=24)>=26&&(a-=26,r++);else if("le"===n)for(o=0,r=0;o>>26-a&67108863,(a+=24)>=26&&(a-=26,r++);return this.strip()},r.prototype._parseHex=function(e,t,n){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var i=0;i=t;i-=2)o=u(e,t,i)<=18?(r-=18,s+=1,this.words[s]|=o>>>26):r+=8;else for(i=(e.length-t)%2==0?t+1:t;i=18?(r-=18,s+=1,this.words[s]|=o>>>26):r+=8;this.strip()},r.prototype._parseBase=function(e,t,n){this.words=[0],this.length=1;for(var i=0,o=1;o<=67108863;o*=t)i++;i--,o=o/t|0;for(var r=e.length-n,s=r%i,a=Math.min(r,r-s)+n,u=0,c=n;c1&&0===this.words[this.length-1];)this.length--;return this._normSign()},r.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},r.prototype.inspect=function(){return(this.red?""};var c=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],h=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],d=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function f(e,t,n){n.negative=t.negative^e.negative;var i=e.length+t.length|0;n.length=i,i=i-1|0;var o=0|e.words[0],r=0|t.words[0],s=o*r,a=67108863&s,u=s/67108864|0;n.words[0]=a;for(var l=1;l>>26,h=67108863&u,d=Math.min(l,t.length-1),f=Math.max(0,l-e.length+1);f<=d;f++){var p=l-f|0;c+=(s=(o=0|e.words[p])*(r=0|t.words[f])+h)/67108864|0,h=67108863&s}n.words[l]=0|h,u=0|c}return 0!==u?n.words[l]=0|u:n.length--,n.strip()}r.prototype.toString=function(e,t){var n;if(t=0|t||1,16===(e=e||10)||"hex"===e){n="";for(var o=0,r=0,s=0;s>>24-o&16777215)||s!==this.length-1?c[6-u.length]+u+n:u+n,(o+=2)>=26&&(o-=26,s--)}for(0!==r&&(n=r.toString(16)+n);n.length%t!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(e===(0|e)&&e>=2&&e<=36){var l=h[e],f=d[e];n="";var p=this.clone();for(p.negative=0;!p.isZero();){var g=p.modn(f).toString(e);n=(p=p.idivn(f)).isZero()?g+n:c[l-g.length]+g+n}for(this.isZero()&&(n="0"+n);n.length%t!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}i(!1,"Base should be between 2 and 36")},r.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&i(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},r.prototype.toJSON=function(){return this.toString(16)},r.prototype.toBuffer=function(e,t){return i(void 0!==s),this.toArrayLike(s,e,t)},r.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},r.prototype.toArrayLike=function(e,t,n){var o=this.byteLength(),r=n||Math.max(1,o);i(o<=r,"byte array longer than desired length"),i(r>0,"Requested array length <= 0"),this.strip();var s,a,u="le"===t,l=new e(r),c=this.clone();if(u){for(a=0;!c.isZero();a++)s=c.andln(255),c.iushrn(8),l[a]=s;for(;a=4096&&(n+=13,t>>>=13),t>=64&&(n+=7,t>>>=7),t>=8&&(n+=4,t>>>=4),t>=2&&(n+=2,t>>>=2),n+t},r.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,n=0;return 8191&t||(n+=13,t>>>=13),127&t||(n+=7,t>>>=7),15&t||(n+=4,t>>>=4),3&t||(n+=2,t>>>=2),1&t||n++,n},r.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},r.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},r.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},r.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var n=0;ne.length?this.clone().iand(e):e.clone().iand(this)},r.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},r.prototype.iuxor=function(e){var t,n;this.length>e.length?(t=this,n=e):(t=e,n=this);for(var i=0;ie.length?this.clone().ixor(e):e.clone().ixor(this)},r.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},r.prototype.inotn=function(e){i("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),n=e%26;this._expand(t),n>0&&t--;for(var o=0;o0&&(this.words[o]=~this.words[o]&67108863>>26-n),this.strip()},r.prototype.notn=function(e){return this.clone().inotn(e)},r.prototype.setn=function(e,t){i("number"==typeof e&&e>=0);var n=e/26|0,o=e%26;return this._expand(n+1),this.words[n]=t?this.words[n]|1<e.length?(n=this,i=e):(n=e,i=this);for(var o=0,r=0;r>>26;for(;0!==o&&r>>26;if(this.length=n.length,0!==o)this.words[this.length]=o,this.length++;else if(n!==this)for(;re.length?this.clone().iadd(e):e.clone().iadd(this)},r.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var n,i,o=this.cmp(e);if(0===o)return this.negative=0,this.length=1,this.words[0]=0,this;o>0?(n=this,i=e):(n=e,i=this);for(var r=0,s=0;s>26,this.words[s]=67108863&t;for(;0!==r&&s>26,this.words[s]=67108863&t;if(0===r&&s>>13,f=0|s[1],p=8191&f,g=f>>>13,m=0|s[2],v=8191&m,y=m>>>13,b=0|s[3],_=8191&b,w=b>>>13,M=0|s[4],C=8191&M,S=M>>>13,L=0|s[5],I=8191&L,N=L>>>13,x=0|s[6],D=8191&x,k=x>>>13,T=0|s[7],E=8191&T,A=T>>>13,j=0|s[8],O=8191&j,R=j>>>13,P=0|s[9],z=8191&P,W=P>>>13,F=0|a[0],B=8191&F,H=F>>>13,V=0|a[1],U=8191&V,Y=V>>>13,Z=0|a[2],G=8191&Z,Q=Z>>>13,q=0|a[3],K=8191&q,J=q>>>13,X=0|a[4],$=8191&X,ee=X>>>13,te=0|a[5],ne=8191&te,ie=te>>>13,oe=0|a[6],re=8191&oe,se=oe>>>13,ae=0|a[7],ue=8191&ae,le=ae>>>13,ce=0|a[8],he=8191&ce,de=ce>>>13,fe=0|a[9],pe=8191&fe,ge=fe>>>13;n.negative=e.negative^t.negative,n.length=19;var me=(l+(i=Math.imul(h,B))|0)+((8191&(o=(o=Math.imul(h,H))+Math.imul(d,B)|0))<<13)|0;l=((r=Math.imul(d,H))+(o>>>13)|0)+(me>>>26)|0,me&=67108863,i=Math.imul(p,B),o=(o=Math.imul(p,H))+Math.imul(g,B)|0,r=Math.imul(g,H);var ve=(l+(i=i+Math.imul(h,U)|0)|0)+((8191&(o=(o=o+Math.imul(h,Y)|0)+Math.imul(d,U)|0))<<13)|0;l=((r=r+Math.imul(d,Y)|0)+(o>>>13)|0)+(ve>>>26)|0,ve&=67108863,i=Math.imul(v,B),o=(o=Math.imul(v,H))+Math.imul(y,B)|0,r=Math.imul(y,H),i=i+Math.imul(p,U)|0,o=(o=o+Math.imul(p,Y)|0)+Math.imul(g,U)|0,r=r+Math.imul(g,Y)|0;var ye=(l+(i=i+Math.imul(h,G)|0)|0)+((8191&(o=(o=o+Math.imul(h,Q)|0)+Math.imul(d,G)|0))<<13)|0;l=((r=r+Math.imul(d,Q)|0)+(o>>>13)|0)+(ye>>>26)|0,ye&=67108863,i=Math.imul(_,B),o=(o=Math.imul(_,H))+Math.imul(w,B)|0,r=Math.imul(w,H),i=i+Math.imul(v,U)|0,o=(o=o+Math.imul(v,Y)|0)+Math.imul(y,U)|0,r=r+Math.imul(y,Y)|0,i=i+Math.imul(p,G)|0,o=(o=o+Math.imul(p,Q)|0)+Math.imul(g,G)|0,r=r+Math.imul(g,Q)|0;var be=(l+(i=i+Math.imul(h,K)|0)|0)+((8191&(o=(o=o+Math.imul(h,J)|0)+Math.imul(d,K)|0))<<13)|0;l=((r=r+Math.imul(d,J)|0)+(o>>>13)|0)+(be>>>26)|0,be&=67108863,i=Math.imul(C,B),o=(o=Math.imul(C,H))+Math.imul(S,B)|0,r=Math.imul(S,H),i=i+Math.imul(_,U)|0,o=(o=o+Math.imul(_,Y)|0)+Math.imul(w,U)|0,r=r+Math.imul(w,Y)|0,i=i+Math.imul(v,G)|0,o=(o=o+Math.imul(v,Q)|0)+Math.imul(y,G)|0,r=r+Math.imul(y,Q)|0,i=i+Math.imul(p,K)|0,o=(o=o+Math.imul(p,J)|0)+Math.imul(g,K)|0,r=r+Math.imul(g,J)|0;var _e=(l+(i=i+Math.imul(h,$)|0)|0)+((8191&(o=(o=o+Math.imul(h,ee)|0)+Math.imul(d,$)|0))<<13)|0;l=((r=r+Math.imul(d,ee)|0)+(o>>>13)|0)+(_e>>>26)|0,_e&=67108863,i=Math.imul(I,B),o=(o=Math.imul(I,H))+Math.imul(N,B)|0,r=Math.imul(N,H),i=i+Math.imul(C,U)|0,o=(o=o+Math.imul(C,Y)|0)+Math.imul(S,U)|0,r=r+Math.imul(S,Y)|0,i=i+Math.imul(_,G)|0,o=(o=o+Math.imul(_,Q)|0)+Math.imul(w,G)|0,r=r+Math.imul(w,Q)|0,i=i+Math.imul(v,K)|0,o=(o=o+Math.imul(v,J)|0)+Math.imul(y,K)|0,r=r+Math.imul(y,J)|0,i=i+Math.imul(p,$)|0,o=(o=o+Math.imul(p,ee)|0)+Math.imul(g,$)|0,r=r+Math.imul(g,ee)|0;var we=(l+(i=i+Math.imul(h,ne)|0)|0)+((8191&(o=(o=o+Math.imul(h,ie)|0)+Math.imul(d,ne)|0))<<13)|0;l=((r=r+Math.imul(d,ie)|0)+(o>>>13)|0)+(we>>>26)|0,we&=67108863,i=Math.imul(D,B),o=(o=Math.imul(D,H))+Math.imul(k,B)|0,r=Math.imul(k,H),i=i+Math.imul(I,U)|0,o=(o=o+Math.imul(I,Y)|0)+Math.imul(N,U)|0,r=r+Math.imul(N,Y)|0,i=i+Math.imul(C,G)|0,o=(o=o+Math.imul(C,Q)|0)+Math.imul(S,G)|0,r=r+Math.imul(S,Q)|0,i=i+Math.imul(_,K)|0,o=(o=o+Math.imul(_,J)|0)+Math.imul(w,K)|0,r=r+Math.imul(w,J)|0,i=i+Math.imul(v,$)|0,o=(o=o+Math.imul(v,ee)|0)+Math.imul(y,$)|0,r=r+Math.imul(y,ee)|0,i=i+Math.imul(p,ne)|0,o=(o=o+Math.imul(p,ie)|0)+Math.imul(g,ne)|0,r=r+Math.imul(g,ie)|0;var Me=(l+(i=i+Math.imul(h,re)|0)|0)+((8191&(o=(o=o+Math.imul(h,se)|0)+Math.imul(d,re)|0))<<13)|0;l=((r=r+Math.imul(d,se)|0)+(o>>>13)|0)+(Me>>>26)|0,Me&=67108863,i=Math.imul(E,B),o=(o=Math.imul(E,H))+Math.imul(A,B)|0,r=Math.imul(A,H),i=i+Math.imul(D,U)|0,o=(o=o+Math.imul(D,Y)|0)+Math.imul(k,U)|0,r=r+Math.imul(k,Y)|0,i=i+Math.imul(I,G)|0,o=(o=o+Math.imul(I,Q)|0)+Math.imul(N,G)|0,r=r+Math.imul(N,Q)|0,i=i+Math.imul(C,K)|0,o=(o=o+Math.imul(C,J)|0)+Math.imul(S,K)|0,r=r+Math.imul(S,J)|0,i=i+Math.imul(_,$)|0,o=(o=o+Math.imul(_,ee)|0)+Math.imul(w,$)|0,r=r+Math.imul(w,ee)|0,i=i+Math.imul(v,ne)|0,o=(o=o+Math.imul(v,ie)|0)+Math.imul(y,ne)|0,r=r+Math.imul(y,ie)|0,i=i+Math.imul(p,re)|0,o=(o=o+Math.imul(p,se)|0)+Math.imul(g,re)|0,r=r+Math.imul(g,se)|0;var Ce=(l+(i=i+Math.imul(h,ue)|0)|0)+((8191&(o=(o=o+Math.imul(h,le)|0)+Math.imul(d,ue)|0))<<13)|0;l=((r=r+Math.imul(d,le)|0)+(o>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,i=Math.imul(O,B),o=(o=Math.imul(O,H))+Math.imul(R,B)|0,r=Math.imul(R,H),i=i+Math.imul(E,U)|0,o=(o=o+Math.imul(E,Y)|0)+Math.imul(A,U)|0,r=r+Math.imul(A,Y)|0,i=i+Math.imul(D,G)|0,o=(o=o+Math.imul(D,Q)|0)+Math.imul(k,G)|0,r=r+Math.imul(k,Q)|0,i=i+Math.imul(I,K)|0,o=(o=o+Math.imul(I,J)|0)+Math.imul(N,K)|0,r=r+Math.imul(N,J)|0,i=i+Math.imul(C,$)|0,o=(o=o+Math.imul(C,ee)|0)+Math.imul(S,$)|0,r=r+Math.imul(S,ee)|0,i=i+Math.imul(_,ne)|0,o=(o=o+Math.imul(_,ie)|0)+Math.imul(w,ne)|0,r=r+Math.imul(w,ie)|0,i=i+Math.imul(v,re)|0,o=(o=o+Math.imul(v,se)|0)+Math.imul(y,re)|0,r=r+Math.imul(y,se)|0,i=i+Math.imul(p,ue)|0,o=(o=o+Math.imul(p,le)|0)+Math.imul(g,ue)|0,r=r+Math.imul(g,le)|0;var Se=(l+(i=i+Math.imul(h,he)|0)|0)+((8191&(o=(o=o+Math.imul(h,de)|0)+Math.imul(d,he)|0))<<13)|0;l=((r=r+Math.imul(d,de)|0)+(o>>>13)|0)+(Se>>>26)|0,Se&=67108863,i=Math.imul(z,B),o=(o=Math.imul(z,H))+Math.imul(W,B)|0,r=Math.imul(W,H),i=i+Math.imul(O,U)|0,o=(o=o+Math.imul(O,Y)|0)+Math.imul(R,U)|0,r=r+Math.imul(R,Y)|0,i=i+Math.imul(E,G)|0,o=(o=o+Math.imul(E,Q)|0)+Math.imul(A,G)|0,r=r+Math.imul(A,Q)|0,i=i+Math.imul(D,K)|0,o=(o=o+Math.imul(D,J)|0)+Math.imul(k,K)|0,r=r+Math.imul(k,J)|0,i=i+Math.imul(I,$)|0,o=(o=o+Math.imul(I,ee)|0)+Math.imul(N,$)|0,r=r+Math.imul(N,ee)|0,i=i+Math.imul(C,ne)|0,o=(o=o+Math.imul(C,ie)|0)+Math.imul(S,ne)|0,r=r+Math.imul(S,ie)|0,i=i+Math.imul(_,re)|0,o=(o=o+Math.imul(_,se)|0)+Math.imul(w,re)|0,r=r+Math.imul(w,se)|0,i=i+Math.imul(v,ue)|0,o=(o=o+Math.imul(v,le)|0)+Math.imul(y,ue)|0,r=r+Math.imul(y,le)|0,i=i+Math.imul(p,he)|0,o=(o=o+Math.imul(p,de)|0)+Math.imul(g,he)|0,r=r+Math.imul(g,de)|0;var Le=(l+(i=i+Math.imul(h,pe)|0)|0)+((8191&(o=(o=o+Math.imul(h,ge)|0)+Math.imul(d,pe)|0))<<13)|0;l=((r=r+Math.imul(d,ge)|0)+(o>>>13)|0)+(Le>>>26)|0,Le&=67108863,i=Math.imul(z,U),o=(o=Math.imul(z,Y))+Math.imul(W,U)|0,r=Math.imul(W,Y),i=i+Math.imul(O,G)|0,o=(o=o+Math.imul(O,Q)|0)+Math.imul(R,G)|0,r=r+Math.imul(R,Q)|0,i=i+Math.imul(E,K)|0,o=(o=o+Math.imul(E,J)|0)+Math.imul(A,K)|0,r=r+Math.imul(A,J)|0,i=i+Math.imul(D,$)|0,o=(o=o+Math.imul(D,ee)|0)+Math.imul(k,$)|0,r=r+Math.imul(k,ee)|0,i=i+Math.imul(I,ne)|0,o=(o=o+Math.imul(I,ie)|0)+Math.imul(N,ne)|0,r=r+Math.imul(N,ie)|0,i=i+Math.imul(C,re)|0,o=(o=o+Math.imul(C,se)|0)+Math.imul(S,re)|0,r=r+Math.imul(S,se)|0,i=i+Math.imul(_,ue)|0,o=(o=o+Math.imul(_,le)|0)+Math.imul(w,ue)|0,r=r+Math.imul(w,le)|0,i=i+Math.imul(v,he)|0,o=(o=o+Math.imul(v,de)|0)+Math.imul(y,he)|0,r=r+Math.imul(y,de)|0;var Ie=(l+(i=i+Math.imul(p,pe)|0)|0)+((8191&(o=(o=o+Math.imul(p,ge)|0)+Math.imul(g,pe)|0))<<13)|0;l=((r=r+Math.imul(g,ge)|0)+(o>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,i=Math.imul(z,G),o=(o=Math.imul(z,Q))+Math.imul(W,G)|0,r=Math.imul(W,Q),i=i+Math.imul(O,K)|0,o=(o=o+Math.imul(O,J)|0)+Math.imul(R,K)|0,r=r+Math.imul(R,J)|0,i=i+Math.imul(E,$)|0,o=(o=o+Math.imul(E,ee)|0)+Math.imul(A,$)|0,r=r+Math.imul(A,ee)|0,i=i+Math.imul(D,ne)|0,o=(o=o+Math.imul(D,ie)|0)+Math.imul(k,ne)|0,r=r+Math.imul(k,ie)|0,i=i+Math.imul(I,re)|0,o=(o=o+Math.imul(I,se)|0)+Math.imul(N,re)|0,r=r+Math.imul(N,se)|0,i=i+Math.imul(C,ue)|0,o=(o=o+Math.imul(C,le)|0)+Math.imul(S,ue)|0,r=r+Math.imul(S,le)|0,i=i+Math.imul(_,he)|0,o=(o=o+Math.imul(_,de)|0)+Math.imul(w,he)|0,r=r+Math.imul(w,de)|0;var Ne=(l+(i=i+Math.imul(v,pe)|0)|0)+((8191&(o=(o=o+Math.imul(v,ge)|0)+Math.imul(y,pe)|0))<<13)|0;l=((r=r+Math.imul(y,ge)|0)+(o>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,i=Math.imul(z,K),o=(o=Math.imul(z,J))+Math.imul(W,K)|0,r=Math.imul(W,J),i=i+Math.imul(O,$)|0,o=(o=o+Math.imul(O,ee)|0)+Math.imul(R,$)|0,r=r+Math.imul(R,ee)|0,i=i+Math.imul(E,ne)|0,o=(o=o+Math.imul(E,ie)|0)+Math.imul(A,ne)|0,r=r+Math.imul(A,ie)|0,i=i+Math.imul(D,re)|0,o=(o=o+Math.imul(D,se)|0)+Math.imul(k,re)|0,r=r+Math.imul(k,se)|0,i=i+Math.imul(I,ue)|0,o=(o=o+Math.imul(I,le)|0)+Math.imul(N,ue)|0,r=r+Math.imul(N,le)|0,i=i+Math.imul(C,he)|0,o=(o=o+Math.imul(C,de)|0)+Math.imul(S,he)|0,r=r+Math.imul(S,de)|0;var xe=(l+(i=i+Math.imul(_,pe)|0)|0)+((8191&(o=(o=o+Math.imul(_,ge)|0)+Math.imul(w,pe)|0))<<13)|0;l=((r=r+Math.imul(w,ge)|0)+(o>>>13)|0)+(xe>>>26)|0,xe&=67108863,i=Math.imul(z,$),o=(o=Math.imul(z,ee))+Math.imul(W,$)|0,r=Math.imul(W,ee),i=i+Math.imul(O,ne)|0,o=(o=o+Math.imul(O,ie)|0)+Math.imul(R,ne)|0,r=r+Math.imul(R,ie)|0,i=i+Math.imul(E,re)|0,o=(o=o+Math.imul(E,se)|0)+Math.imul(A,re)|0,r=r+Math.imul(A,se)|0,i=i+Math.imul(D,ue)|0,o=(o=o+Math.imul(D,le)|0)+Math.imul(k,ue)|0,r=r+Math.imul(k,le)|0,i=i+Math.imul(I,he)|0,o=(o=o+Math.imul(I,de)|0)+Math.imul(N,he)|0,r=r+Math.imul(N,de)|0;var De=(l+(i=i+Math.imul(C,pe)|0)|0)+((8191&(o=(o=o+Math.imul(C,ge)|0)+Math.imul(S,pe)|0))<<13)|0;l=((r=r+Math.imul(S,ge)|0)+(o>>>13)|0)+(De>>>26)|0,De&=67108863,i=Math.imul(z,ne),o=(o=Math.imul(z,ie))+Math.imul(W,ne)|0,r=Math.imul(W,ie),i=i+Math.imul(O,re)|0,o=(o=o+Math.imul(O,se)|0)+Math.imul(R,re)|0,r=r+Math.imul(R,se)|0,i=i+Math.imul(E,ue)|0,o=(o=o+Math.imul(E,le)|0)+Math.imul(A,ue)|0,r=r+Math.imul(A,le)|0,i=i+Math.imul(D,he)|0,o=(o=o+Math.imul(D,de)|0)+Math.imul(k,he)|0,r=r+Math.imul(k,de)|0;var ke=(l+(i=i+Math.imul(I,pe)|0)|0)+((8191&(o=(o=o+Math.imul(I,ge)|0)+Math.imul(N,pe)|0))<<13)|0;l=((r=r+Math.imul(N,ge)|0)+(o>>>13)|0)+(ke>>>26)|0,ke&=67108863,i=Math.imul(z,re),o=(o=Math.imul(z,se))+Math.imul(W,re)|0,r=Math.imul(W,se),i=i+Math.imul(O,ue)|0,o=(o=o+Math.imul(O,le)|0)+Math.imul(R,ue)|0,r=r+Math.imul(R,le)|0,i=i+Math.imul(E,he)|0,o=(o=o+Math.imul(E,de)|0)+Math.imul(A,he)|0,r=r+Math.imul(A,de)|0;var Te=(l+(i=i+Math.imul(D,pe)|0)|0)+((8191&(o=(o=o+Math.imul(D,ge)|0)+Math.imul(k,pe)|0))<<13)|0;l=((r=r+Math.imul(k,ge)|0)+(o>>>13)|0)+(Te>>>26)|0,Te&=67108863,i=Math.imul(z,ue),o=(o=Math.imul(z,le))+Math.imul(W,ue)|0,r=Math.imul(W,le),i=i+Math.imul(O,he)|0,o=(o=o+Math.imul(O,de)|0)+Math.imul(R,he)|0,r=r+Math.imul(R,de)|0;var Ee=(l+(i=i+Math.imul(E,pe)|0)|0)+((8191&(o=(o=o+Math.imul(E,ge)|0)+Math.imul(A,pe)|0))<<13)|0;l=((r=r+Math.imul(A,ge)|0)+(o>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,i=Math.imul(z,he),o=(o=Math.imul(z,de))+Math.imul(W,he)|0,r=Math.imul(W,de);var Ae=(l+(i=i+Math.imul(O,pe)|0)|0)+((8191&(o=(o=o+Math.imul(O,ge)|0)+Math.imul(R,pe)|0))<<13)|0;l=((r=r+Math.imul(R,ge)|0)+(o>>>13)|0)+(Ae>>>26)|0,Ae&=67108863;var je=(l+(i=Math.imul(z,pe))|0)+((8191&(o=(o=Math.imul(z,ge))+Math.imul(W,pe)|0))<<13)|0;return l=((r=Math.imul(W,ge))+(o>>>13)|0)+(je>>>26)|0,je&=67108863,u[0]=me,u[1]=ve,u[2]=ye,u[3]=be,u[4]=_e,u[5]=we,u[6]=Me,u[7]=Ce,u[8]=Se,u[9]=Le,u[10]=Ie,u[11]=Ne,u[12]=xe,u[13]=De,u[14]=ke,u[15]=Te,u[16]=Ee,u[17]=Ae,u[18]=je,0!==l&&(u[19]=l,n.length++),n};function g(e,t,n){return(new m).mulp(e,t,n)}function m(e,t){this.x=e,this.y=t}Math.imul||(p=f),r.prototype.mulTo=function(e,t){var n,i=this.length+e.length;return n=10===this.length&&10===e.length?p(this,e,t):i<63?f(this,e,t):i<1024?function(e,t,n){n.negative=t.negative^e.negative,n.length=e.length+t.length;for(var i=0,o=0,r=0;r>>26)|0)>>>26,s&=67108863}n.words[r]=a,i=s,s=o}return 0!==i?n.words[r]=i:n.length--,n.strip()}(this,e,t):g(this,e,t),n},m.prototype.makeRBT=function(e){for(var t=new Array(e),n=r.prototype._countBits(e)-1,i=0;i>=1;return i},m.prototype.permute=function(e,t,n,i,o,r){for(var s=0;s>>=1)o++;return 1<>>=13,n[2*s+1]=8191&r,r>>>=13;for(s=2*t;s>=26,t+=o/67108864|0,t+=r>>>26,this.words[n]=67108863&r}return 0!==t&&(this.words[n]=t,this.length++),this},r.prototype.muln=function(e){return this.clone().imuln(e)},r.prototype.sqr=function(){return this.mul(this)},r.prototype.isqr=function(){return this.imul(this.clone())},r.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),n=0;n>>o}return t}(e);if(0===t.length)return new r(1);for(var n=this,i=0;i=0);var t,n=e%26,o=(e-n)/26,r=67108863>>>26-n<<26-n;if(0!==n){var s=0;for(t=0;t>>26-n}s&&(this.words[t]=s,this.length++)}if(0!==o){for(t=this.length-1;t>=0;t--)this.words[t+o]=this.words[t];for(t=0;t=0),o=t?(t-t%26)/26:0;var r=e%26,s=Math.min((e-r)/26,this.length),a=67108863^67108863>>>r<s)for(this.length-=s,l=0;l=0&&(0!==c||l>=o);l--){var h=0|this.words[l];this.words[l]=c<<26-r|h>>>r,c=h&a}return u&&0!==c&&(u.words[u.length++]=c),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},r.prototype.ishrn=function(e,t,n){return i(0===this.negative),this.iushrn(e,t,n)},r.prototype.shln=function(e){return this.clone().ishln(e)},r.prototype.ushln=function(e){return this.clone().iushln(e)},r.prototype.shrn=function(e){return this.clone().ishrn(e)},r.prototype.ushrn=function(e){return this.clone().iushrn(e)},r.prototype.testn=function(e){i("number"==typeof e&&e>=0);var t=e%26,n=(e-t)/26,o=1<=0);var t=e%26,n=(e-t)/26;if(i(0===this.negative,"imaskn works only with positive numbers"),this.length<=n)return this;if(0!==t&&n++,this.length=Math.min(n,this.length),0!==t){var o=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},r.prototype.isubn=function(e){if(i("number"==typeof e),i(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(u/67108864|0),this.words[o+n]=67108863&r}for(;o>26,this.words[o+n]=67108863&r;if(0===a)return this.strip();for(i(-1===a),a=0,o=0;o>26,this.words[o]=67108863&r;return this.negative=1,this.strip()},r.prototype._wordDiv=function(e,t){var n=(this.length,e.length),i=this.clone(),o=e,s=0|o.words[o.length-1];0!=(n=26-this._countBits(s))&&(o=o.ushln(n),i.iushln(n),s=0|o.words[o.length-1]);var a,u=i.length-o.length;if("mod"!==t){(a=new r(null)).length=u+1,a.words=new Array(a.length);for(var l=0;l=0;h--){var d=67108864*(0|i.words[o.length+h])+(0|i.words[o.length+h-1]);for(d=Math.min(d/s|0,67108863),i._ishlnsubmul(o,d,h);0!==i.negative;)d--,i.negative=0,i._ishlnsubmul(o,1,h),i.isZero()||(i.negative^=1);a&&(a.words[h]=d)}return a&&a.strip(),i.strip(),"div"!==t&&0!==n&&i.iushrn(n),{div:a||null,mod:i}},r.prototype.divmod=function(e,t,n){return i(!e.isZero()),this.isZero()?{div:new r(0),mod:new r(0)}:0!==this.negative&&0===e.negative?(a=this.neg().divmod(e,t),"mod"!==t&&(o=a.div.neg()),"div"!==t&&(s=a.mod.neg(),n&&0!==s.negative&&s.iadd(e)),{div:o,mod:s}):0===this.negative&&0!==e.negative?(a=this.divmod(e.neg(),t),"mod"!==t&&(o=a.div.neg()),{div:o,mod:a.mod}):this.negative&e.negative?(a=this.neg().divmod(e.neg(),t),"div"!==t&&(s=a.mod.neg(),n&&0!==s.negative&&s.isub(e)),{div:a.div,mod:s}):e.length>this.length||this.cmp(e)<0?{div:new r(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new r(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new r(this.modn(e.words[0]))}:this._wordDiv(e,t);var o,s,a},r.prototype.div=function(e){return this.divmod(e,"div",!1).div},r.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},r.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},r.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var n=0!==t.div.negative?t.mod.isub(e):t.mod,i=e.ushrn(1),o=e.andln(1),r=n.cmp(i);return r<0||1===o&&0===r?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},r.prototype.modn=function(e){i(e<=67108863);for(var t=(1<<26)%e,n=0,o=this.length-1;o>=0;o--)n=(t*n+(0|this.words[o]))%e;return n},r.prototype.idivn=function(e){i(e<=67108863);for(var t=0,n=this.length-1;n>=0;n--){var o=(0|this.words[n])+67108864*t;this.words[n]=o/e|0,t=o%e}return this.strip()},r.prototype.divn=function(e){return this.clone().idivn(e)},r.prototype.egcd=function(e){i(0===e.negative),i(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var o=new r(1),s=new r(0),a=new r(0),u=new r(1),l=0;t.isEven()&&n.isEven();)t.iushrn(1),n.iushrn(1),++l;for(var c=n.clone(),h=t.clone();!t.isZero();){for(var d=0,f=1;!(t.words[0]&f)&&d<26;++d,f<<=1);if(d>0)for(t.iushrn(d);d-- >0;)(o.isOdd()||s.isOdd())&&(o.iadd(c),s.isub(h)),o.iushrn(1),s.iushrn(1);for(var p=0,g=1;!(n.words[0]&g)&&p<26;++p,g<<=1);if(p>0)for(n.iushrn(p);p-- >0;)(a.isOdd()||u.isOdd())&&(a.iadd(c),u.isub(h)),a.iushrn(1),u.iushrn(1);t.cmp(n)>=0?(t.isub(n),o.isub(a),s.isub(u)):(n.isub(t),a.isub(o),u.isub(s))}return{a,b:u,gcd:n.iushln(l)}},r.prototype._invmp=function(e){i(0===e.negative),i(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var o,s=new r(1),a=new r(0),u=n.clone();t.cmpn(1)>0&&n.cmpn(1)>0;){for(var l=0,c=1;!(t.words[0]&c)&&l<26;++l,c<<=1);if(l>0)for(t.iushrn(l);l-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);for(var h=0,d=1;!(n.words[0]&d)&&h<26;++h,d<<=1);if(h>0)for(n.iushrn(h);h-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);t.cmp(n)>=0?(t.isub(n),s.isub(a)):(n.isub(t),a.isub(s))}return(o=0===t.cmpn(1)?s:a).cmpn(0)<0&&o.iadd(e),o},r.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),n=e.clone();t.negative=0,n.negative=0;for(var i=0;t.isEven()&&n.isEven();i++)t.iushrn(1),n.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;n.isEven();)n.iushrn(1);var o=t.cmp(n);if(o<0){var r=t;t=n,n=r}else if(0===o||0===n.cmpn(1))break;t.isub(n)}return n.iushln(i)},r.prototype.invm=function(e){return this.egcd(e).a.umod(e)},r.prototype.isEven=function(){return!(1&this.words[0])},r.prototype.isOdd=function(){return!(1&~this.words[0])},r.prototype.andln=function(e){return this.words[0]&e},r.prototype.bincn=function(e){i("number"==typeof e);var t=e%26,n=(e-t)/26,o=1<>>26,a&=67108863,this.words[s]=a}return 0!==r&&(this.words[s]=r,this.length++),this},r.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},r.prototype.cmpn=function(e){var t,n=e<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this.strip(),this.length>1)t=1;else{n&&(e=-e),i(e<=67108863,"Number is too big");var o=0|this.words[0];t=o===e?0:oe.length)return 1;if(this.length=0;n--){var i=0|this.words[n],o=0|e.words[n];if(i!==o){io&&(t=1);break}}return t},r.prototype.gtn=function(e){return 1===this.cmpn(e)},r.prototype.gt=function(e){return 1===this.cmp(e)},r.prototype.gten=function(e){return this.cmpn(e)>=0},r.prototype.gte=function(e){return this.cmp(e)>=0},r.prototype.ltn=function(e){return-1===this.cmpn(e)},r.prototype.lt=function(e){return-1===this.cmp(e)},r.prototype.lten=function(e){return this.cmpn(e)<=0},r.prototype.lte=function(e){return this.cmp(e)<=0},r.prototype.eqn=function(e){return 0===this.cmpn(e)},r.prototype.eq=function(e){return 0===this.cmp(e)},r.red=function(e){return new C(e)},r.prototype.toRed=function(e){return i(!this.red,"Already a number in reduction context"),i(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},r.prototype.fromRed=function(){return i(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},r.prototype._forceRed=function(e){return this.red=e,this},r.prototype.forceRed=function(e){return i(!this.red,"Already a number in reduction context"),this._forceRed(e)},r.prototype.redAdd=function(e){return i(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},r.prototype.redIAdd=function(e){return i(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},r.prototype.redSub=function(e){return i(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},r.prototype.redISub=function(e){return i(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},r.prototype.redShl=function(e){return i(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},r.prototype.redMul=function(e){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},r.prototype.redIMul=function(e){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},r.prototype.redSqr=function(){return i(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},r.prototype.redISqr=function(){return i(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},r.prototype.redSqrt=function(){return i(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},r.prototype.redInvm=function(){return i(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},r.prototype.redNeg=function(){return i(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},r.prototype.redPow=function(e){return i(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var v={k256:null,p224:null,p192:null,p25519:null};function y(e,t){this.name=e,this.p=new r(t,16),this.n=this.p.bitLength(),this.k=new r(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function b(){y.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function _(){y.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){y.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function M(){y.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function C(e){if("string"==typeof e){var t=r._prime(e);this.m=t.p,this.prime=t}else i(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function S(e){C.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new r(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}y.prototype._tmp=function(){var e=new r(null);return e.words=new Array(Math.ceil(this.n/13)),e},y.prototype.ireduce=function(e){var t,n=e;do{this.split(n,this.tmp),t=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(t>this.n);var i=t0?n.isub(this.p):void 0!==n.strip?n.strip():n._strip(),n},y.prototype.split=function(e,t){e.iushrn(this.n,0,t)},y.prototype.imulK=function(e){return e.imul(this.k)},o(b,y),b.prototype.split=function(e,t){for(var n=4194303,i=Math.min(e.length,9),o=0;o>>22,r=s}r>>>=22,e.words[o-10]=r,0===r&&e.length>10?e.length-=10:e.length-=9},b.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,n=0;n>>=26,e.words[n]=o,t=i}return 0!==t&&(e.words[e.length++]=t),e},r._prime=function(e){if(v[e])return v[e];var t;if("k256"===e)t=new b;else if("p224"===e)t=new _;else if("p192"===e)t=new w;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new M}return v[e]=t,t},C.prototype._verify1=function(e){i(0===e.negative,"red works only with positives"),i(e.red,"red works only with red numbers")},C.prototype._verify2=function(e,t){i(!(e.negative|t.negative),"red works only with positives"),i(e.red&&e.red===t.red,"red works only with red numbers")},C.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},C.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},C.prototype.add=function(e,t){this._verify2(e,t);var n=e.add(t);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},C.prototype.iadd=function(e,t){this._verify2(e,t);var n=e.iadd(t);return n.cmp(this.m)>=0&&n.isub(this.m),n},C.prototype.sub=function(e,t){this._verify2(e,t);var n=e.sub(t);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},C.prototype.isub=function(e,t){this._verify2(e,t);var n=e.isub(t);return n.cmpn(0)<0&&n.iadd(this.m),n},C.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},C.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},C.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},C.prototype.isqr=function(e){return this.imul(e,e.clone())},C.prototype.sqr=function(e){return this.mul(e,e)},C.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(i(t%2==1),3===t){var n=this.m.add(new r(1)).iushrn(2);return this.pow(e,n)}for(var o=this.m.subn(1),s=0;!o.isZero()&&0===o.andln(1);)s++,o.iushrn(1);i(!o.isZero());var a=new r(1).toRed(this),u=a.redNeg(),l=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new r(2*c*c).toRed(this);0!==this.pow(c,l).cmp(u);)c.redIAdd(u);for(var h=this.pow(c,o),d=this.pow(e,o.addn(1).iushrn(1)),f=this.pow(e,o),p=s;0!==f.cmp(a);){for(var g=f,m=0;0!==g.cmp(a);m++)g=g.redSqr();i(m=0;i--){for(var l=t.words[i],c=u-1;c>=0;c--){var h=l>>c&1;o!==n[0]&&(o=this.sqr(o)),0!==h||0!==s?(s<<=1,s|=h,(4==++a||0===i&&0===c)&&(o=this.mul(o,n[s]),a=0,s=0)):a=0}u=26}return o},C.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},C.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},r.mont=function(e){return new S(e)},o(S,C),S.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},S.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},S.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var n=e.imul(t),i=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=n.isub(i).iushrn(this.shift),r=o;return o.cmp(this.m)>=0?r=o.isub(this.m):o.cmpn(0)<0&&(r=o.iadd(this.m)),r._forceRed(this)},S.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new r(0)._forceRed(this);var n=e.mul(t),i=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=n.isub(i).iushrn(this.shift),s=o;return o.cmp(this.m)>=0?s=o.isub(this.m):o.cmpn(0)<0&&(s=o.iadd(this.m)),s._forceRed(this)},S.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=n.nmd(e),this)},2965:(e,t,n)=>{var i=n(5891),o=n(9643),r=n(5292),s=n(5532),a=n(8470),u=n(2059),l=n(8232),c=n(2238).Buffer;e.exports=function(e,t,n){var h;h=e.padding?e.padding:n?1:4;var d,f=i(e),p=f.modulus.byteLength();if(t.length>p||new s(t).cmp(f.modulus)>=0)throw new Error("decryption error");d=n?l(new s(t),f):a(t,f);var g=c.alloc(p-d.length);if(d=c.concat([g,d],p),4===h)return function(e,t){var n=e.modulus.byteLength(),i=u("sha1").update(c.alloc(0)).digest(),s=i.length;if(0!==t[0])throw new Error("decryption error");var a=t.slice(1,s+1),l=t.slice(s+1),h=r(a,o(l,s)),d=r(l,o(h,n-s-1));if(function(e,t){e=c.from(e),t=c.from(t);var n=0,i=e.length;e.length!==t.length&&(n++,i=Math.min(e.length,t.length));for(var o=-1;++o=t.length){r++;break}var s=t.slice(2,o-1);if(("0002"!==i.toString("hex")&&!n||"0001"!==i.toString("hex")&&n)&&r++,s.length<8&&r++,r)throw new Error("decryption error");return t.slice(o)}(0,d,n);if(3===h)return d;throw new Error("unknown padding")}},3347:(e,t,n)=>{var i=n(5891),o=n(8190),r=n(2059),s=n(9643),a=n(5292),u=n(5532),l=n(8232),c=n(8470),h=n(2238).Buffer;e.exports=function(e,t,n){var d;d=e.padding?e.padding:n?1:4;var f,p=i(e);if(4===d)f=function(e,t){var n=e.modulus.byteLength(),i=t.length,l=r("sha1").update(h.alloc(0)).digest(),c=l.length,d=2*c;if(i>n-d-2)throw new Error("message too long");var f=h.alloc(n-i-d-2),p=n-c-1,g=o(c),m=a(h.concat([l,f,h.alloc(1,1),t],p),s(g,p)),v=a(g,s(m,c));return new u(h.concat([h.alloc(1),v,m],n))}(p,t);else if(1===d)f=function(e,t,n){var i,r=t.length,s=e.modulus.byteLength();if(r>s-11)throw new Error("message too long");return i=n?h.alloc(s-r-3,255):function(e){for(var t,n=h.allocUnsafe(e),i=0,r=o(2*e),s=0;i=0)throw new Error("data too long for modulus")}return n?c(f,p):l(f,p)}},8232:(e,t,n)=>{var i=n(5532),o=n(2238).Buffer;e.exports=function(e,t){return o.from(e.toRed(i.mont(t.modulus)).redPow(new i(t.publicExponent)).fromRed().toArray())}},5292:e=>{e.exports=function(e,t){for(var n=e.length,i=-1;++i{"use strict";var i=n(8957),o=65536,r=n(2238).Buffer,s=n.g.crypto||n.g.msCrypto;s&&s.getRandomValues?e.exports=function(e,t){if(e>4294967295)throw new RangeError("requested too many random bytes");var n=r.allocUnsafe(e);if(e>0)if(e>o)for(var a=0;a{"use strict";var i=n(8957);function o(){throw new Error("secure random number generation not supported by this browser\nuse chrome, FireFox or Internet Explorer 11")}var r=n(2238),s=n(8190),a=r.Buffer,u=r.kMaxLength,l=n.g.crypto||n.g.msCrypto,c=Math.pow(2,32)-1;function h(e,t){if("number"!=typeof e||e!=e)throw new TypeError("offset must be a number");if(e>c||e<0)throw new TypeError("offset must be a uint32");if(e>u||e>t)throw new RangeError("offset out of range")}function d(e,t,n){if("number"!=typeof e||e!=e)throw new TypeError("size must be a number");if(e>c||e<0)throw new TypeError("size must be a uint32");if(e+t>n||e>u)throw new RangeError("buffer too small")}function f(e,t,n,o){if(i.browser){var r=e.buffer,a=new Uint8Array(r,t,n);return l.getRandomValues(a),o?void i.nextTick((function(){o(null,e)})):e}if(!o)return s(n).copy(e,t),e;s(n,(function(n,i){if(n)return o(n);i.copy(e,t),o(null,e)}))}l&&l.getRandomValues||!i.browser?(t.randomFill=function(e,t,i,o){if(!(a.isBuffer(e)||e instanceof n.g.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');if("function"==typeof t)o=t,t=0,i=e.length;else if("function"==typeof i)o=i,i=e.length-t;else if("function"!=typeof o)throw new TypeError('"cb" argument must be a function');return h(t,e.length),d(i,t,e.length),f(e,t,i,o)},t.randomFillSync=function(e,t,i){if(void 0===t&&(t=0),!(a.isBuffer(e)||e instanceof n.g.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');return h(t,e.length),void 0===i&&(i=e.length-t),d(i,t,e.length),f(e,t,i)}):(t.randomFill=o,t.randomFillSync=o)},2443:(e,t,n)=>{"use strict";var i=n(2808),o=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};e.exports=h;var r=Object.create(n(8565));r.inherits=n(9385);var s=n(6102),a=n(217);r.inherits(h,s);for(var u=o(a.prototype),l=0;l{"use strict";e.exports=r;var i=n(7517),o=Object.create(n(8565));function r(e){if(!(this instanceof r))return new r(e);i.call(this,e)}o.inherits=n(9385),o.inherits(r,i),r.prototype._transform=function(e,t,n){n(null,e)}},6102:(e,t,n)=>{"use strict";var i=n(8957),o=n(2808);e.exports=b;var r,s=n(7045);b.ReadableState=y,n(3188).EventEmitter;var a=function(e,t){return e.listeners(t).length},u=n(4486),l=n(2238).Buffer,c=(void 0!==n.g?n.g:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){},h=Object.create(n(8565));h.inherits=n(9385);var d=n(9838),f=void 0;f=d&&d.debuglog?d.debuglog("stream"):function(){};var p,g=n(8961),m=n(6613);h.inherits(b,u);var v=["error","close","destroy","pause","resume"];function y(e,t){e=e||{};var i=t instanceof(r=r||n(2443));this.objectMode=!!e.objectMode,i&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var o=e.highWaterMark,s=e.readableHighWaterMark,a=this.objectMode?16:16384;this.highWaterMark=o||0===o?o:i&&(s||0===s)?s:a,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new g,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(p||(p=n(203).I),this.decoder=new p(e.encoding),this.encoding=e.encoding)}function b(e){if(r=r||n(2443),!(this instanceof b))return new b(e);this._readableState=new y(e,this),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),u.call(this)}function _(e,t,n,i,o){var r,s=e._readableState;return null===t?(s.reading=!1,function(e,t){if(!t.ended){if(t.decoder){var n=t.decoder.end();n&&n.length&&(t.buffer.push(n),t.length+=t.objectMode?1:n.length)}t.ended=!0,S(e)}}(e,s)):(o||(r=function(e,t){var n,i;return i=t,l.isBuffer(i)||i instanceof c||"string"==typeof t||void 0===t||e.objectMode||(n=new TypeError("Invalid non-string/buffer chunk")),n}(s,t)),r?e.emit("error",r):s.objectMode||t&&t.length>0?("string"==typeof t||s.objectMode||Object.getPrototypeOf(t)===l.prototype||(t=function(e){return l.from(e)}(t)),i?s.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):w(e,s,t,!0):s.ended?e.emit("error",new Error("stream.push() after EOF")):(s.reading=!1,s.decoder&&!n?(t=s.decoder.write(t),s.objectMode||0!==t.length?w(e,s,t,!1):I(e,s)):w(e,s,t,!1))):i||(s.reading=!1)),function(e){return!e.ended&&(e.needReadable||e.lengtht.highWaterMark&&(t.highWaterMark=function(e){return e>=M?e=M:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function S(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(f("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?o.nextTick(L,e):L(e))}function L(e){f("emit readable"),e.emit("readable"),k(e)}function I(e,t){t.readingMore||(t.readingMore=!0,o.nextTick(N,e,t))}function N(e,t){for(var n=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length=t.length?(n=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):n=function(e,t,n){var i;return er.length?r.length:e;if(s===r.length?o+=r:o+=r.slice(0,e),0==(e-=s)){s===r.length?(++i,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=r.slice(s));break}++i}return t.length-=i,o}(e,t):function(e,t){var n=l.allocUnsafe(e),i=t.head,o=1;for(i.data.copy(n),e-=i.data.length;i=i.next;){var r=i.data,s=e>r.length?r.length:e;if(r.copy(n,n.length-e,0,s),0==(e-=s)){s===r.length?(++o,i.next?t.head=i.next:t.head=t.tail=null):(t.head=i,i.data=r.slice(s));break}++o}return t.length-=o,n}(e,t),i}(e,t.buffer,t.decoder),n);var n}function E(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,o.nextTick(A,t,e))}function A(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function j(e,t){for(var n=0,i=e.length;n=t.highWaterMark||t.ended))return f("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?E(this):S(this),null;if(0===(e=C(e,t))&&t.ended)return 0===t.length&&E(this),null;var i,o=t.needReadable;return f("need readable",o),(0===t.length||t.length-e0?T(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&E(this)),null!==i&&this.emit("data",i),i},b.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},b.prototype.pipe=function(e,t){var n=this,r=this._readableState;switch(r.pipesCount){case 0:r.pipes=e;break;case 1:r.pipes=[r.pipes,e];break;default:r.pipes.push(e)}r.pipesCount+=1,f("pipe count=%d opts=%j",r.pipesCount,t);var u=t&&!1===t.end||e===i.stdout||e===i.stderr?y:l;function l(){f("onend"),e.end()}r.endEmitted?o.nextTick(u):n.once("end",u),e.on("unpipe",(function t(i,o){f("onunpipe"),i===n&&o&&!1===o.hasUnpiped&&(o.hasUnpiped=!0,f("cleanup"),e.removeListener("close",m),e.removeListener("finish",v),e.removeListener("drain",c),e.removeListener("error",g),e.removeListener("unpipe",t),n.removeListener("end",l),n.removeListener("end",y),n.removeListener("data",p),h=!0,!r.awaitDrain||e._writableState&&!e._writableState.needDrain||c())}));var c=function(e){return function(){var t=e._readableState;f("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&a(e,"data")&&(t.flowing=!0,k(e))}}(n);e.on("drain",c);var h=!1,d=!1;function p(t){f("ondata"),d=!1,!1!==e.write(t)||d||((1===r.pipesCount&&r.pipes===e||r.pipesCount>1&&-1!==j(r.pipes,e))&&!h&&(f("false write response, pause",r.awaitDrain),r.awaitDrain++,d=!0),n.pause())}function g(t){f("onerror",t),y(),e.removeListener("error",g),0===a(e,"error")&&e.emit("error",t)}function m(){e.removeListener("finish",v),y()}function v(){f("onfinish"),e.removeListener("close",m),y()}function y(){f("unpipe"),n.unpipe(e)}return n.on("data",p),function(e,t,n){if("function"==typeof e.prependListener)return e.prependListener(t,n);e._events&&e._events[t]?s(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]:e.on(t,n)}(e,"error",g),e.once("close",m),e.once("finish",v),e.emit("pipe",n),r.flowing||(f("pipe resume"),n.resume()),e},b.prototype.unpipe=function(e){var t=this._readableState,n={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,n)),this;if(!e){var i=t.pipes,o=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var r=0;r{"use strict";e.exports=s;var i=n(2443),o=Object.create(n(8565));function r(e,t){var n=this._transformState;n.transforming=!1;var i=n.writecb;if(!i)return this.emit("error",new Error("write callback called multiple times"));n.writechunk=null,n.writecb=null,null!=t&&this.push(t),i(e);var o=this._readableState;o.reading=!1,(o.needReadable||o.length{"use strict";var i=n(8957),o=n(7188).setImmedate,r=n(2808);function s(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,n){var i=e.entry;for(e.entry=null;i;){var o=i.callback;t.pendingcb--,o(undefined),i=i.next}t.corkedRequestsFree.next=e}(t,e)}}e.exports=y;var a,u=!i.browser&&["v0.10","v0.9."].indexOf(i.version.slice(0,5))>-1?o:r.nextTick;y.WritableState=v;var l=Object.create(n(8565));l.inherits=n(9385);var c,h={deprecate:n(4982)},d=n(4486),f=n(2238).Buffer,p=(void 0!==n.g?n.g:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){},g=n(6613);function m(){}function v(e,t){a=a||n(2443),e=e||{};var i=t instanceof a;this.objectMode=!!e.objectMode,i&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var o=e.highWaterMark,l=e.writableHighWaterMark,c=this.objectMode?16:16384;this.highWaterMark=o||0===o?o:i&&(l||0===l)?l:c,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var h=!1===e.decodeStrings;this.decodeStrings=!h,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var n=e._writableState,i=n.sync,o=n.writecb;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(n),t)!function(e,t,n,i,o){--t.pendingcb,n?(r.nextTick(o,i),r.nextTick(S,e,t),e._writableState.errorEmitted=!0,e.emit("error",i)):(o(i),e._writableState.errorEmitted=!0,e.emit("error",i),S(e,t))}(e,n,i,t,o);else{var s=M(n);s||n.corked||n.bufferProcessing||!n.bufferedRequest||w(e,n),i?u(_,e,n,s,o):_(e,n,s,o)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new s(this)}function y(e){if(a=a||n(2443),!(c.call(y,this)||this instanceof a))return new y(e);this._writableState=new v(e,this),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),d.call(this)}function b(e,t,n,i,o,r,s){t.writelen=i,t.writecb=s,t.writing=!0,t.sync=!0,n?e._writev(o,t.onwrite):e._write(o,r,t.onwrite),t.sync=!1}function _(e,t,n,i){n||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,i(),S(e,t)}function w(e,t){t.bufferProcessing=!0;var n=t.bufferedRequest;if(e._writev&&n&&n.next){var i=t.bufferedRequestCount,o=new Array(i),r=t.corkedRequestsFree;r.entry=n;for(var a=0,u=!0;n;)o[a]=n,n.isBuf||(u=!1),n=n.next,a+=1;o.allBuffers=u,b(e,t,!0,t.length,o,"",r.finish),t.pendingcb++,t.lastBufferedRequest=null,r.next?(t.corkedRequestsFree=r.next,r.next=null):t.corkedRequestsFree=new s(t),t.bufferedRequestCount=0}else{for(;n;){var l=n.chunk,c=n.encoding,h=n.callback;if(b(e,t,!1,t.objectMode?1:l.length,l,c,h),n=n.next,t.bufferedRequestCount--,t.writing)break}null===n&&(t.lastBufferedRequest=null)}t.bufferedRequest=n,t.bufferProcessing=!1}function M(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function C(e,t){e._final((function(n){t.pendingcb--,n&&e.emit("error",n),t.prefinished=!0,e.emit("prefinish"),S(e,t)}))}function S(e,t){var n=M(t);return n&&(function(e,t){t.prefinished||t.finalCalled||("function"==typeof e._final?(t.pendingcb++,t.finalCalled=!0,r.nextTick(C,e,t)):(t.prefinished=!0,e.emit("prefinish")))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"))),n}l.inherits(y,d),v.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(v.prototype,"buffer",{get:h.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(c=Function.prototype[Symbol.hasInstance],Object.defineProperty(y,Symbol.hasInstance,{value:function(e){return!!c.call(this,e)||this===y&&e&&e._writableState instanceof v}})):c=function(e){return e instanceof this},y.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},y.prototype.write=function(e,t,n){var i,o=this._writableState,s=!1,a=!o.objectMode&&(i=e,f.isBuffer(i)||i instanceof p);return a&&!f.isBuffer(e)&&(e=function(e){return f.from(e)}(e)),"function"==typeof t&&(n=t,t=null),a?t="buffer":t||(t=o.defaultEncoding),"function"!=typeof n&&(n=m),o.ended?function(e,t){var n=new Error("write after end");e.emit("error",n),r.nextTick(t,n)}(this,n):(a||function(e,t,n,i){var o=!0,s=!1;return null===n?s=new TypeError("May not write null values to stream"):"string"==typeof n||void 0===n||t.objectMode||(s=new TypeError("Invalid non-string/buffer chunk")),s&&(e.emit("error",s),r.nextTick(i,s),o=!1),o}(this,o,e,n))&&(o.pendingcb++,s=function(e,t,n,i,o,r){if(!n){var s=function(e,t,n){return e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=f.from(t,n)),t}(t,i,o);i!==s&&(n=!0,o="buffer",i=s)}var a=t.objectMode?1:i.length;t.length+=a;var u=t.length-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(y.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),y.prototype._write=function(e,t,n){n(new Error("_write() is not implemented"))},y.prototype._writev=null,y.prototype.end=function(e,t,n){var i=this._writableState;"function"==typeof e?(n=e,e=null,t=null):"function"==typeof t&&(n=t,t=null),null!=e&&this.write(e,t),i.corked&&(i.corked=1,this.uncork()),i.ending||function(e,t,n){t.ending=!0,S(e,t),n&&(t.finished?r.nextTick(n):e.once("finish",n)),t.ended=!0,e.writable=!1}(this,i,n)},Object.defineProperty(y.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),y.prototype.destroy=g.destroy,y.prototype._undestroy=g.undestroy,y.prototype._destroy=function(e,t){this.end(),t(e)}},8961:(e,t,n)=>{"use strict";var i=n(2238).Buffer,o=n(5340);e.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}return e.prototype.push=function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},e.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},e.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},e.prototype.clear=function(){this.head=this.tail=null,this.length=0},e.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,n=""+t.data;t=t.next;)n+=e+t.data;return n},e.prototype.concat=function(e){if(0===this.length)return i.alloc(0);for(var t,n,o=i.allocUnsafe(e>>>0),r=this.head,s=0;r;)t=o,n=s,r.data.copy(t,n),s+=r.data.length,r=r.next;return o},e}(),o&&o.inspect&&o.inspect.custom&&(e.exports.prototype[o.inspect.custom]=function(){var e=o.inspect({length:this.length});return this.constructor.name+" "+e})},6613:(e,t,n)=>{"use strict";var i=n(2808);function o(e,t){e.emit("error",t)}e.exports={destroy:function(e,t){var n=this,r=this._readableState&&this._readableState.destroyed,s=this._writableState&&this._writableState.destroyed;return r||s?(t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,i.nextTick(o,this,e)):i.nextTick(o,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,(function(e){!t&&e?n._writableState?n._writableState.errorEmitted||(n._writableState.errorEmitted=!0,i.nextTick(o,n,e)):i.nextTick(o,n,e):t&&t(e)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}},4486:(e,t,n)=>{e.exports=n(3188).EventEmitter},203:(e,t,n)=>{"use strict";var i=n(2238).Buffer,o=i.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function r(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(i.isEncoding===o||!o(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=u,this.end=l,t=4;break;case"utf8":this.fillLast=a,t=4;break;case"base64":this.text=c,this.end=h,t=3;break;default:return this.write=d,void(this.end=f)}this.lastNeed=0,this.lastTotal=0,this.lastChar=i.allocUnsafe(t)}function s(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function a(e){var t=this.lastTotal-this.lastNeed,n=function(e,t,n){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==n?n:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function u(e,t){if((e.length-t)%2==0){var n=e.toString("utf16le",t);if(n){var i=n.charCodeAt(n.length-1);if(i>=55296&&i<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function l(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,n)}return t}function c(e,t){var n=(e.length-t)%3;return 0===n?e.toString("base64",t):(this.lastNeed=3-n,this.lastTotal=3,1===n?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-n))}function h(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function d(e){return e.toString(this.encoding)}function f(e){return e&&e.length?this.write(e):""}t.I=r,r.prototype.write=function(e){if(0===e.length)return"";var t,n;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";n=this.lastNeed,this.lastNeed=0}else n=0;return n=0?(o>0&&(e.lastNeed=o-1),o):--i=0?(o>0&&(e.lastNeed=o-2),o):--i=0?(o>0&&(2===o?o=0:e.lastNeed=o-3),o):0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=n;var i=e.length-(n-this.lastNeed);return e.copy(this.lastChar,0,i),e.toString("utf8",t,i)},r.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},7462:(e,t,n)=>{(t=e.exports=n(6102)).Stream=t,t.Readable=t,t.Writable=n(217),t.Duplex=n(2443),t.Transform=n(7517),t.PassThrough=n(6071)},2428:(e,t,n)=>{"use strict";var i=n(1278).Buffer,o=n(9385),r=n(9558),s=new Array(16),a=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],u=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],l=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],c=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],h=[0,1518500249,1859775393,2400959708,2840853838],d=[1352829926,1548603684,1836072691,2053994217,0];function f(){r.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}function p(e,t){return e<>>32-t}function g(e,t,n,i,o,r,s,a){return p(e+(t^n^i)+r+s|0,a)+o|0}function m(e,t,n,i,o,r,s,a){return p(e+(t&n|~t&i)+r+s|0,a)+o|0}function v(e,t,n,i,o,r,s,a){return p(e+((t|~n)^i)+r+s|0,a)+o|0}function y(e,t,n,i,o,r,s,a){return p(e+(t&i|n&~i)+r+s|0,a)+o|0}function b(e,t,n,i,o,r,s,a){return p(e+(t^(n|~i))+r+s|0,a)+o|0}o(f,r),f.prototype._update=function(){for(var e=s,t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t);for(var n=0|this._a,i=0|this._b,o=0|this._c,r=0|this._d,f=0|this._e,_=0|this._a,w=0|this._b,M=0|this._c,C=0|this._d,S=0|this._e,L=0;L<80;L+=1){var I,N;L<16?(I=g(n,i,o,r,f,e[a[L]],h[0],l[L]),N=b(_,w,M,C,S,e[u[L]],d[0],c[L])):L<32?(I=m(n,i,o,r,f,e[a[L]],h[1],l[L]),N=y(_,w,M,C,S,e[u[L]],d[1],c[L])):L<48?(I=v(n,i,o,r,f,e[a[L]],h[2],l[L]),N=v(_,w,M,C,S,e[u[L]],d[2],c[L])):L<64?(I=y(n,i,o,r,f,e[a[L]],h[3],l[L]),N=m(_,w,M,C,S,e[u[L]],d[3],c[L])):(I=b(n,i,o,r,f,e[a[L]],h[4],l[L]),N=g(_,w,M,C,S,e[u[L]],d[4],c[L])),n=f,f=r,r=p(o,10),o=i,i=I,_=S,S=C,C=p(M,10),M=w,w=N}var x=this._b+o+C|0;this._b=this._c+r+S|0,this._c=this._d+f+_|0,this._d=this._e+n+w|0,this._e=this._a+i+M|0,this._a=x},f.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var e=i.alloc?i.alloc(20):new i(20);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e.writeInt32LE(this._e,16),e},e.exports=f},2238:(e,t,n)=>{var i=n(1278),o=i.Buffer;function r(e,t){for(var n in e)t[n]=e[n]}function s(e,t,n){return o(e,t,n)}o.from&&o.alloc&&o.allocUnsafe&&o.allocUnsafeSlow?e.exports=i:(r(i,t),t.Buffer=s),r(o,s),s.from=function(e,t,n){if("number"==typeof e)throw new TypeError("Argument must not be a number");return o(e,t,n)},s.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError("Argument must be a number");var i=o(e);return void 0!==t?"string"==typeof n?i.fill(t,n):i.fill(t):i.fill(0),i},s.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return o(e)},s.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i.SlowBuffer(e)}},7188:function(e,t,n){var i=n(8957);!function(e,t){"use strict";if(!e.setImmediate){var n,o,r,s,a,u=1,l={},c=!1,h=e.document,d=Object.getPrototypeOf&&Object.getPrototypeOf(e);d=d&&d.setTimeout?d:e,"[object process]"==={}.toString.call(e.process)?n=function(e){i.nextTick((function(){p(e)}))}:function(){if(e.postMessage&&!e.importScripts){var t=!0,n=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=n,t}}()?(s="setImmediate$"+Math.random()+"$",a=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(s)&&p(+t.data.slice(s.length))},e.addEventListener?e.addEventListener("message",a,!1):e.attachEvent("onmessage",a),n=function(t){e.postMessage(s+t,"*")}):e.MessageChannel?((r=new MessageChannel).port1.onmessage=function(e){p(e.data)},n=function(e){r.port2.postMessage(e)}):h&&"onreadystatechange"in h.createElement("script")?(o=h.documentElement,n=function(e){var t=h.createElement("script");t.onreadystatechange=function(){p(e),t.onreadystatechange=null,o.removeChild(t),t=null},o.appendChild(t)}):n=function(e){setTimeout(p,0,e)},d.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),i=0;i{var i=n(2238).Buffer;function o(e,t){this._block=i.alloc(e),this._finalSize=t,this._blockSize=e,this._len=0}o.prototype.update=function(e,t){"string"==typeof e&&(t=t||"utf8",e=i.from(e,t));for(var n=this._block,o=this._blockSize,r=e.length,s=this._len,a=0;a=this._finalSize&&(this._update(this._block),this._block.fill(0));var n=8*this._len;if(n<=4294967295)this._block.writeUInt32BE(n,this._blockSize-4);else{var i=(4294967295&n)>>>0,o=(n-i)/4294967296;this._block.writeUInt32BE(o,this._blockSize-8),this._block.writeUInt32BE(i,this._blockSize-4)}this._update(this._block);var r=this._hash();return e?r.toString(e):r},o.prototype._update=function(){throw new Error("_update must be implemented by subclass")},e.exports=o},5203:(e,t,n)=>{var i=e.exports=function(e){e=e.toLowerCase();var t=i[e];if(!t)throw new Error(e+" is not supported (we accept pull requests)");return new t};i.sha=n(8313),i.sha1=n(6534),i.sha224=n(7093),i.sha256=n(1444),i.sha384=n(7152),i.sha512=n(3073)},8313:(e,t,n)=>{var i=n(9385),o=n(351),r=n(2238).Buffer,s=[1518500249,1859775393,-1894007588,-899497514],a=new Array(80);function u(){this.init(),this._w=a,o.call(this,64,56)}function l(e){return e<<30|e>>>2}function c(e,t,n,i){return 0===e?t&n|~t&i:2===e?t&n|t&i|n&i:t^n^i}i(u,o),u.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},u.prototype._update=function(e){for(var t,n=this._w,i=0|this._a,o=0|this._b,r=0|this._c,a=0|this._d,u=0|this._e,h=0;h<16;++h)n[h]=e.readInt32BE(4*h);for(;h<80;++h)n[h]=n[h-3]^n[h-8]^n[h-14]^n[h-16];for(var d=0;d<80;++d){var f=~~(d/20),p=0|((t=i)<<5|t>>>27)+c(f,o,r,a)+u+n[d]+s[f];u=a,a=r,r=l(o),o=i,i=p}this._a=i+this._a|0,this._b=o+this._b|0,this._c=r+this._c|0,this._d=a+this._d|0,this._e=u+this._e|0},u.prototype._hash=function(){var e=r.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},e.exports=u},6534:(e,t,n)=>{var i=n(9385),o=n(351),r=n(2238).Buffer,s=[1518500249,1859775393,-1894007588,-899497514],a=new Array(80);function u(){this.init(),this._w=a,o.call(this,64,56)}function l(e){return e<<5|e>>>27}function c(e){return e<<30|e>>>2}function h(e,t,n,i){return 0===e?t&n|~t&i:2===e?t&n|t&i|n&i:t^n^i}i(u,o),u.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},u.prototype._update=function(e){for(var t,n=this._w,i=0|this._a,o=0|this._b,r=0|this._c,a=0|this._d,u=0|this._e,d=0;d<16;++d)n[d]=e.readInt32BE(4*d);for(;d<80;++d)n[d]=(t=n[d-3]^n[d-8]^n[d-14]^n[d-16])<<1|t>>>31;for(var f=0;f<80;++f){var p=~~(f/20),g=l(i)+h(p,o,r,a)+u+n[f]+s[p]|0;u=a,a=r,r=c(o),o=i,i=g}this._a=i+this._a|0,this._b=o+this._b|0,this._c=r+this._c|0,this._d=a+this._d|0,this._e=u+this._e|0},u.prototype._hash=function(){var e=r.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},e.exports=u},7093:(e,t,n)=>{var i=n(9385),o=n(1444),r=n(351),s=n(2238).Buffer,a=new Array(64);function u(){this.init(),this._w=a,r.call(this,64,56)}i(u,o),u.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},u.prototype._hash=function(){var e=s.allocUnsafe(28);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e},e.exports=u},1444:(e,t,n)=>{var i=n(9385),o=n(351),r=n(2238).Buffer,s=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],a=new Array(64);function u(){this.init(),this._w=a,o.call(this,64,56)}function l(e,t,n){return n^e&(t^n)}function c(e,t,n){return e&t|n&(e|t)}function h(e){return(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10)}function d(e){return(e>>>6|e<<26)^(e>>>11|e<<21)^(e>>>25|e<<7)}function f(e){return(e>>>7|e<<25)^(e>>>18|e<<14)^e>>>3}i(u,o),u.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},u.prototype._update=function(e){for(var t,n=this._w,i=0|this._a,o=0|this._b,r=0|this._c,a=0|this._d,u=0|this._e,p=0|this._f,g=0|this._g,m=0|this._h,v=0;v<16;++v)n[v]=e.readInt32BE(4*v);for(;v<64;++v)n[v]=0|(((t=n[v-2])>>>17|t<<15)^(t>>>19|t<<13)^t>>>10)+n[v-7]+f(n[v-15])+n[v-16];for(var y=0;y<64;++y){var b=m+d(u)+l(u,p,g)+s[y]+n[y]|0,_=h(i)+c(i,o,r)|0;m=g,g=p,p=u,u=a+b|0,a=r,r=o,o=i,i=b+_|0}this._a=i+this._a|0,this._b=o+this._b|0,this._c=r+this._c|0,this._d=a+this._d|0,this._e=u+this._e|0,this._f=p+this._f|0,this._g=g+this._g|0,this._h=m+this._h|0},u.prototype._hash=function(){var e=r.allocUnsafe(32);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e.writeInt32BE(this._h,28),e},e.exports=u},7152:(e,t,n)=>{var i=n(9385),o=n(3073),r=n(351),s=n(2238).Buffer,a=new Array(160);function u(){this.init(),this._w=a,r.call(this,128,112)}i(u,o),u.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},u.prototype._hash=function(){var e=s.allocUnsafe(48);function t(t,n,i){e.writeInt32BE(t,i),e.writeInt32BE(n,i+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),e},e.exports=u},3073:(e,t,n)=>{var i=n(9385),o=n(351),r=n(2238).Buffer,s=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],a=new Array(160);function u(){this.init(),this._w=a,o.call(this,128,112)}function l(e,t,n){return n^e&(t^n)}function c(e,t,n){return e&t|n&(e|t)}function h(e,t){return(e>>>28|t<<4)^(t>>>2|e<<30)^(t>>>7|e<<25)}function d(e,t){return(e>>>14|t<<18)^(e>>>18|t<<14)^(t>>>9|e<<23)}function f(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^e>>>7}function p(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^(e>>>7|t<<25)}function g(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^e>>>6}function m(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^(e>>>6|t<<26)}function v(e,t){return e>>>0>>0?1:0}i(u,o),u.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this},u.prototype._update=function(e){for(var t=this._w,n=0|this._ah,i=0|this._bh,o=0|this._ch,r=0|this._dh,a=0|this._eh,u=0|this._fh,y=0|this._gh,b=0|this._hh,_=0|this._al,w=0|this._bl,M=0|this._cl,C=0|this._dl,S=0|this._el,L=0|this._fl,I=0|this._gl,N=0|this._hl,x=0;x<32;x+=2)t[x]=e.readInt32BE(4*x),t[x+1]=e.readInt32BE(4*x+4);for(;x<160;x+=2){var D=t[x-30],k=t[x-30+1],T=f(D,k),E=p(k,D),A=g(D=t[x-4],k=t[x-4+1]),j=m(k,D),O=t[x-14],R=t[x-14+1],P=t[x-32],z=t[x-32+1],W=E+R|0,F=T+O+v(W,E)|0;F=(F=F+A+v(W=W+j|0,j)|0)+P+v(W=W+z|0,z)|0,t[x]=F,t[x+1]=W}for(var B=0;B<160;B+=2){F=t[B],W=t[B+1];var H=c(n,i,o),V=c(_,w,M),U=h(n,_),Y=h(_,n),Z=d(a,S),G=d(S,a),Q=s[B],q=s[B+1],K=l(a,u,y),J=l(S,L,I),X=N+G|0,$=b+Z+v(X,N)|0;$=($=($=$+K+v(X=X+J|0,J)|0)+Q+v(X=X+q|0,q)|0)+F+v(X=X+W|0,W)|0;var ee=Y+V|0,te=U+H+v(ee,Y)|0;b=y,N=I,y=u,I=L,u=a,L=S,a=r+$+v(S=C+X|0,C)|0,r=o,C=M,o=i,M=w,i=n,w=_,n=$+te+v(_=X+ee|0,X)|0}this._al=this._al+_|0,this._bl=this._bl+w|0,this._cl=this._cl+M|0,this._dl=this._dl+C|0,this._el=this._el+S|0,this._fl=this._fl+L|0,this._gl=this._gl+I|0,this._hl=this._hl+N|0,this._ah=this._ah+n+v(this._al,_)|0,this._bh=this._bh+i+v(this._bl,w)|0,this._ch=this._ch+o+v(this._cl,M)|0,this._dh=this._dh+r+v(this._dl,C)|0,this._eh=this._eh+a+v(this._el,S)|0,this._fh=this._fh+u+v(this._fl,L)|0,this._gh=this._gh+y+v(this._gl,I)|0,this._hh=this._hh+b+v(this._hl,N)|0},u.prototype._hash=function(){var e=r.allocUnsafe(64);function t(t,n,i){e.writeInt32BE(t,i),e.writeInt32BE(n,i+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),t(this._gh,this._gl,48),t(this._hh,this._hl,56),e},e.exports=u},8741:(e,t,n)=>{e.exports=o;var i=n(3188).EventEmitter;function o(){i.call(this)}n(1322)(o,i),o.Readable=n(3284),o.Writable=n(5828),o.Duplex=n(3030),o.Transform=n(5154),o.PassThrough=n(3488),o.finished=n(9262),o.pipeline=n(4030),o.Stream=o,o.prototype.pipe=function(e,t){var n=this;function o(t){e.writable&&!1===e.write(t)&&n.pause&&n.pause()}function r(){n.readable&&n.resume&&n.resume()}n.on("data",o),e.on("drain",r),e._isStdio||t&&!1===t.end||(n.on("end",a),n.on("close",u));var s=!1;function a(){s||(s=!0,e.end())}function u(){s||(s=!0,"function"==typeof e.destroy&&e.destroy())}function l(e){if(c(),0===i.listenerCount(this,"error"))throw e}function c(){n.removeListener("data",o),e.removeListener("drain",r),n.removeListener("end",a),n.removeListener("close",u),n.removeListener("error",l),e.removeListener("error",l),n.removeListener("end",c),n.removeListener("close",c),e.removeListener("close",c)}return n.on("error",l),e.on("error",l),n.on("end",c),n.on("close",c),e.on("close",c),e.emit("pipe",n),e}},1322:e=>{"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}},368:e=>{"use strict";var t={};function n(e,n,i){i||(i=Error);var o=function(e){var t,i;function o(t,i,o){return e.call(this,function(e,t,i){return"string"==typeof n?n:n(e,t,i)}(t,i,o))||this}return i=e,(t=o).prototype=Object.create(i.prototype),t.prototype.constructor=t,t.__proto__=i,o}(i);o.prototype.name=i.name,o.prototype.code=e,t[e]=o}function i(e,t){if(Array.isArray(e)){var n=e.length;return e=e.map((function(e){return String(e)})),n>2?"one of ".concat(t," ").concat(e.slice(0,n-1).join(", "),", or ")+e[n-1]:2===n?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}n("ERR_INVALID_OPT_VALUE",(function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'}),TypeError),n("ERR_INVALID_ARG_TYPE",(function(e,t,n){var o,r,s,a,u;if("string"==typeof t&&(r="not ",t.substr(0,4)===r)?(o="must not be",t=t.replace(/^not /,"")):o="must be",function(e,t,n){return(void 0===n||n>e.length)&&(n=e.length),e.substring(n-9,n)===t}(e," argument"))s="The ".concat(e," ").concat(o," ").concat(i(t,"type"));else{var l=("number"!=typeof u&&(u=0),u+1>(a=e).length||-1===a.indexOf(".",u)?"argument":"property");s='The "'.concat(e,'" ').concat(l," ").concat(o," ").concat(i(t,"type"))}return s+". Received type ".concat(typeof n)}),TypeError),n("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),n("ERR_METHOD_NOT_IMPLEMENTED",(function(e){return"The "+e+" method is not implemented"})),n("ERR_STREAM_PREMATURE_CLOSE","Premature close"),n("ERR_STREAM_DESTROYED",(function(e){return"Cannot call "+e+" after a stream was destroyed"})),n("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),n("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),n("ERR_STREAM_WRITE_AFTER_END","write after end"),n("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),n("ERR_UNKNOWN_ENCODING",(function(e){return"Unknown encoding: "+e}),TypeError),n("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),e.exports.F=t},3030:(e,t,n)=>{"use strict";var i=n(8957),o=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};e.exports=c;var r=n(3284),s=n(5828);n(1322)(c,r);for(var a=o(s.prototype),u=0;u{"use strict";e.exports=o;var i=n(5154);function o(e){if(!(this instanceof o))return new o(e);i.call(this,e)}n(1322)(o,i),o.prototype._transform=function(e,t,n){n(null,e)}},3284:(e,t,n)=>{"use strict";var i,o=n(8957);e.exports=L,L.ReadableState=S,n(3188).EventEmitter;var r,s=function(e,t){return e.listeners(t).length},a=n(8137),u=n(1278).Buffer,l=(void 0!==n.g?n.g:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){},c=n(9580);r=c&&c.debuglog?c.debuglog("stream"):function(){};var h,d,f,p=n(5081),g=n(9944),m=n(7403).getHighWaterMark,v=n(368).F,y=v.ERR_INVALID_ARG_TYPE,b=v.ERR_STREAM_PUSH_AFTER_EOF,_=v.ERR_METHOD_NOT_IMPLEMENTED,w=v.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;n(1322)(L,a);var M=g.errorOrDestroy,C=["error","close","destroy","pause","resume"];function S(e,t,o){i=i||n(3030),e=e||{},"boolean"!=typeof o&&(o=t instanceof i),this.objectMode=!!e.objectMode,o&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=m(this,e,"readableHighWaterMark",o),this.buffer=new p,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(h||(h=n(230).I),this.decoder=new h(e.encoding),this.encoding=e.encoding)}function L(e){if(i=i||n(3030),!(this instanceof L))return new L(e);var t=this instanceof i;this._readableState=new S(e,this,t),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),a.call(this)}function I(e,t,n,i,o){r("readableAddChunk",t);var s,a=e._readableState;if(null===t)a.reading=!1,function(e,t){if(r("onEofChunk"),!t.ended){if(t.decoder){var n=t.decoder.end();n&&n.length&&(t.buffer.push(n),t.length+=t.objectMode?1:n.length)}t.ended=!0,t.sync?k(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,T(e)))}}(e,a);else if(o||(s=function(e,t){var n,i;return i=t,u.isBuffer(i)||i instanceof l||"string"==typeof t||void 0===t||e.objectMode||(n=new y("chunk",["string","Buffer","Uint8Array"],t)),n}(a,t)),s)M(e,s);else if(a.objectMode||t&&t.length>0)if("string"==typeof t||a.objectMode||Object.getPrototypeOf(t)===u.prototype||(t=function(e){return u.from(e)}(t)),i)a.endEmitted?M(e,new w):N(e,a,t,!0);else if(a.ended)M(e,new b);else{if(a.destroyed)return!1;a.reading=!1,a.decoder&&!n?(t=a.decoder.write(t),a.objectMode||0!==t.length?N(e,a,t,!1):E(e,a)):N(e,a,t,!1)}else i||(a.reading=!1,E(e,a));return!a.ended&&(a.lengtht.highWaterMark&&(t.highWaterMark=function(e){return e>=x?e=x:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function k(e){var t=e._readableState;r("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(r("emitReadable",t.flowing),t.emittedReadable=!0,o.nextTick(T,e))}function T(e){var t=e._readableState;r("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,P(e)}function E(e,t){t.readingMore||(t.readingMore=!0,o.nextTick(A,e,t))}function A(e,t){for(;!t.reading&&!t.ended&&(t.length0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function O(e){r("readable nexttick read 0"),e.read(0)}function R(e,t){r("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),P(e),t.flowing&&!t.reading&&e.read(0)}function P(e){var t=e._readableState;for(r("flow",t.flowing);t.flowing&&null!==e.read(););}function z(e,t){return 0===t.length?null:(t.objectMode?n=t.buffer.shift():!e||e>=t.length?(n=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):n=t.buffer.consume(e,t.decoder),n);var n}function W(e){var t=e._readableState;r("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,o.nextTick(F,t,e))}function F(e,t){if(r("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var n=t._writableState;(!n||n.autoDestroy&&n.finished)&&t.destroy()}}function B(e,t){for(var n=0,i=e.length;n=t.highWaterMark:t.length>0)||t.ended))return r("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?W(this):k(this),null;if(0===(e=D(e,t))&&t.ended)return 0===t.length&&W(this),null;var i,o=t.needReadable;return r("need readable",o),(0===t.length||t.length-e0?z(e,t):null)?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&W(this)),null!==i&&this.emit("data",i),i},L.prototype._read=function(e){M(this,new _("_read()"))},L.prototype.pipe=function(e,t){var n=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=e;break;case 1:i.pipes=[i.pipes,e];break;default:i.pipes.push(e)}i.pipesCount+=1,r("pipe count=%d opts=%j",i.pipesCount,t);var a=t&&!1===t.end||e===o.stdout||e===o.stderr?g:u;function u(){r("onend"),e.end()}i.endEmitted?o.nextTick(a):n.once("end",a),e.on("unpipe",(function t(o,s){r("onunpipe"),o===n&&s&&!1===s.hasUnpiped&&(s.hasUnpiped=!0,r("cleanup"),e.removeListener("close",f),e.removeListener("finish",p),e.removeListener("drain",l),e.removeListener("error",d),e.removeListener("unpipe",t),n.removeListener("end",u),n.removeListener("end",g),n.removeListener("data",h),c=!0,!i.awaitDrain||e._writableState&&!e._writableState.needDrain||l())}));var l=function(e){return function(){var t=e._readableState;r("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&s(e,"data")&&(t.flowing=!0,P(e))}}(n);e.on("drain",l);var c=!1;function h(t){r("ondata");var o=e.write(t);r("dest.write",o),!1===o&&((1===i.pipesCount&&i.pipes===e||i.pipesCount>1&&-1!==B(i.pipes,e))&&!c&&(r("false write response, pause",i.awaitDrain),i.awaitDrain++),n.pause())}function d(t){r("onerror",t),g(),e.removeListener("error",d),0===s(e,"error")&&M(e,t)}function f(){e.removeListener("finish",p),g()}function p(){r("onfinish"),e.removeListener("close",f),g()}function g(){r("unpipe"),n.unpipe(e)}return n.on("data",h),function(e,t,n){if("function"==typeof e.prependListener)return e.prependListener(t,n);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]:e.on(t,n)}(e,"error",d),e.once("close",f),e.once("finish",p),e.emit("pipe",n),i.flowing||(r("pipe resume"),n.resume()),e},L.prototype.unpipe=function(e){var t=this._readableState,n={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,n)),this;if(!e){var i=t.pipes,o=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var r=0;r0,!1!==i.flowing&&this.resume()):"readable"===e&&(i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,r("on readable",i.length,i.reading),i.length?k(this):i.reading||o.nextTick(O,this))),n},L.prototype.addListener=L.prototype.on,L.prototype.removeListener=function(e,t){var n=a.prototype.removeListener.call(this,e,t);return"readable"===e&&o.nextTick(j,this),n},L.prototype.removeAllListeners=function(e){var t=a.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||o.nextTick(j,this),t},L.prototype.resume=function(){var e=this._readableState;return e.flowing||(r("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,o.nextTick(R,e,t))}(this,e)),e.paused=!1,this},L.prototype.pause=function(){return r("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(r("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},L.prototype.wrap=function(e){var t=this,n=this._readableState,i=!1;for(var o in e.on("end",(function(){if(r("wrapped end"),n.decoder&&!n.ended){var e=n.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(o){r("wrapped data"),n.decoder&&(o=n.decoder.write(o)),n.objectMode&&null==o||(n.objectMode||o&&o.length)&&(t.push(o)||(i=!0,e.pause()))})),e)void 0===this[o]&&"function"==typeof e[o]&&(this[o]=function(t){return function(){return e[t].apply(e,arguments)}}(o));for(var s=0;s{"use strict";e.exports=c;var i=n(368).F,o=i.ERR_METHOD_NOT_IMPLEMENTED,r=i.ERR_MULTIPLE_CALLBACK,s=i.ERR_TRANSFORM_ALREADY_TRANSFORMING,a=i.ERR_TRANSFORM_WITH_LENGTH_0,u=n(3030);function l(e,t){var n=this._transformState;n.transforming=!1;var i=n.writecb;if(null===i)return this.emit("error",new r);n.writechunk=null,n.writecb=null,null!=t&&this.push(t),i(e);var o=this._readableState;o.reading=!1,(o.needReadable||o.length{"use strict";var i,o=n(8957);function r(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,n){var i=e.entry;for(e.entry=null;i;){var o=i.callback;t.pendingcb--,o(undefined),i=i.next}t.corkedRequestsFree.next=e}(t,e)}}e.exports=L,L.WritableState=S;var s,a={deprecate:n(4982)},u=n(8137),l=n(1278).Buffer,c=(void 0!==n.g?n.g:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){},h=n(9944),d=n(7403).getHighWaterMark,f=n(368).F,p=f.ERR_INVALID_ARG_TYPE,g=f.ERR_METHOD_NOT_IMPLEMENTED,m=f.ERR_MULTIPLE_CALLBACK,v=f.ERR_STREAM_CANNOT_PIPE,y=f.ERR_STREAM_DESTROYED,b=f.ERR_STREAM_NULL_VALUES,_=f.ERR_STREAM_WRITE_AFTER_END,w=f.ERR_UNKNOWN_ENCODING,M=h.errorOrDestroy;function C(){}function S(e,t,s){i=i||n(3030),e=e||{},"boolean"!=typeof s&&(s=t instanceof i),this.objectMode=!!e.objectMode,s&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=d(this,e,"writableHighWaterMark",s),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var a=!1===e.decodeStrings;this.decodeStrings=!a,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var n=e._writableState,i=n.sync,r=n.writecb;if("function"!=typeof r)throw new m;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(n),t)!function(e,t,n,i,r){--t.pendingcb,n?(o.nextTick(r,i),o.nextTick(T,e,t),e._writableState.errorEmitted=!0,M(e,i)):(r(i),e._writableState.errorEmitted=!0,M(e,i),T(e,t))}(e,n,i,t,r);else{var s=D(n)||e.destroyed;s||n.corked||n.bufferProcessing||!n.bufferedRequest||x(e,n),i?o.nextTick(N,e,n,s,r):N(e,n,s,r)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new r(this)}function L(e){var t=this instanceof(i=i||n(3030));if(!t&&!s.call(L,this))return new L(e);this._writableState=new S(e,this,t),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),u.call(this)}function I(e,t,n,i,o,r,s){t.writelen=i,t.writecb=s,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new y("write")):n?e._writev(o,t.onwrite):e._write(o,r,t.onwrite),t.sync=!1}function N(e,t,n,i){n||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,i(),T(e,t)}function x(e,t){t.bufferProcessing=!0;var n=t.bufferedRequest;if(e._writev&&n&&n.next){var i=t.bufferedRequestCount,o=new Array(i),s=t.corkedRequestsFree;s.entry=n;for(var a=0,u=!0;n;)o[a]=n,n.isBuf||(u=!1),n=n.next,a+=1;o.allBuffers=u,I(e,t,!0,t.length,o,"",s.finish),t.pendingcb++,t.lastBufferedRequest=null,s.next?(t.corkedRequestsFree=s.next,s.next=null):t.corkedRequestsFree=new r(t),t.bufferedRequestCount=0}else{for(;n;){var l=n.chunk,c=n.encoding,h=n.callback;if(I(e,t,!1,t.objectMode?1:l.length,l,c,h),n=n.next,t.bufferedRequestCount--,t.writing)break}null===n&&(t.lastBufferedRequest=null)}t.bufferedRequest=n,t.bufferProcessing=!1}function D(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function k(e,t){e._final((function(n){t.pendingcb--,n&&M(e,n),t.prefinished=!0,e.emit("prefinish"),T(e,t)}))}function T(e,t){var n=D(t);if(n&&(function(e,t){t.prefinished||t.finalCalled||("function"!=typeof e._final||t.destroyed?(t.prefinished=!0,e.emit("prefinish")):(t.pendingcb++,t.finalCalled=!0,o.nextTick(k,e,t)))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"),t.autoDestroy))){var i=e._readableState;(!i||i.autoDestroy&&i.endEmitted)&&e.destroy()}return n}n(1322)(L,u),S.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(S.prototype,"buffer",{get:a.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(s=Function.prototype[Symbol.hasInstance],Object.defineProperty(L,Symbol.hasInstance,{value:function(e){return!!s.call(this,e)||this===L&&e&&e._writableState instanceof S}})):s=function(e){return e instanceof this},L.prototype.pipe=function(){M(this,new v)},L.prototype.write=function(e,t,n){var i,r=this._writableState,s=!1,a=!r.objectMode&&(i=e,l.isBuffer(i)||i instanceof c);return a&&!l.isBuffer(e)&&(e=function(e){return l.from(e)}(e)),"function"==typeof t&&(n=t,t=null),a?t="buffer":t||(t=r.defaultEncoding),"function"!=typeof n&&(n=C),r.ending?function(e,t){var n=new _;M(e,n),o.nextTick(t,n)}(this,n):(a||function(e,t,n,i){var r;return null===n?r=new b:"string"==typeof n||t.objectMode||(r=new p("chunk",["string","Buffer"],n)),!r||(M(e,r),o.nextTick(i,r),!1)}(this,r,e,n))&&(r.pendingcb++,s=function(e,t,n,i,o,r){if(!n){var s=function(e,t,n){return e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=l.from(t,n)),t}(t,i,o);i!==s&&(n=!0,o="buffer",i=s)}var a=t.objectMode?1:i.length;t.length+=a;var u=t.length-1))throw new w(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(L.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(L.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),L.prototype._write=function(e,t,n){n(new g("_write()"))},L.prototype._writev=null,L.prototype.end=function(e,t,n){var i=this._writableState;return"function"==typeof e?(n=e,e=null,t=null):"function"==typeof t&&(n=t,t=null),null!=e&&this.write(e,t),i.corked&&(i.corked=1,this.uncork()),i.ending||function(e,t,n){t.ending=!0,T(e,t),n&&(t.finished?o.nextTick(n):e.once("finish",n)),t.ended=!0,e.writable=!1}(this,i,n),this},Object.defineProperty(L.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(L.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),L.prototype.destroy=h.destroy,L.prototype._undestroy=h.undestroy,L.prototype._destroy=function(e,t){t(e)}},1339:(e,t,n)=>{"use strict";var i,o=n(8957);function r(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,"string");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var s=n(9262),a=Symbol("lastResolve"),u=Symbol("lastReject"),l=Symbol("error"),c=Symbol("ended"),h=Symbol("lastPromise"),d=Symbol("handlePromise"),f=Symbol("stream");function p(e,t){return{value:e,done:t}}function g(e){var t=e[a];if(null!==t){var n=e[f].read();null!==n&&(e[h]=null,e[a]=null,e[u]=null,t(p(n,!1)))}}function m(e){o.nextTick(g,e)}var v=Object.getPrototypeOf((function(){})),y=Object.setPrototypeOf((r(i={get stream(){return this[f]},next:function(){var e=this,t=this[l];if(null!==t)return Promise.reject(t);if(this[c])return Promise.resolve(p(void 0,!0));if(this[f].destroyed)return new Promise((function(t,n){o.nextTick((function(){e[l]?n(e[l]):t(p(void 0,!0))}))}));var n,i=this[h];if(i)n=new Promise(function(e,t){return function(n,i){e.then((function(){t[c]?n(p(void 0,!0)):t[d](n,i)}),i)}}(i,this));else{var r=this[f].read();if(null!==r)return Promise.resolve(p(r,!1));n=new Promise(this[d])}return this[h]=n,n}},Symbol.asyncIterator,(function(){return this})),r(i,"return",(function(){var e=this;return new Promise((function(t,n){e[f].destroy(null,(function(e){e?n(e):t(p(void 0,!0))}))}))})),i),v);e.exports=function(e){var t,n=Object.create(y,(r(t={},f,{value:e,writable:!0}),r(t,a,{value:null,writable:!0}),r(t,u,{value:null,writable:!0}),r(t,l,{value:null,writable:!0}),r(t,c,{value:e._readableState.endEmitted,writable:!0}),r(t,d,{value:function(e,t){var i=n[f].read();i?(n[h]=null,n[a]=null,n[u]=null,e(p(i,!1))):(n[a]=e,n[u]=t)},writable:!0}),t));return n[h]=null,s(e,(function(e){if(e&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code){var t=n[u];return null!==t&&(n[h]=null,n[a]=null,n[u]=null,t(e)),void(n[l]=e)}var i=n[a];null!==i&&(n[h]=null,n[a]=null,n[u]=null,i(p(void 0,!0))),n[c]=!0})),e.on("readable",m.bind(null,n)),n}},5081:(e,t,n)=>{"use strict";function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function o(e){for(var t=1;t0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:"unshift",value:function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}},{key:"shift",value:function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(e){if(0===this.length)return"";for(var t=this.head,n=""+t.data;t=t.next;)n+=e+t.data;return n}},{key:"concat",value:function(e){if(0===this.length)return u.alloc(0);for(var t,n,i,o=u.allocUnsafe(e>>>0),r=this.head,s=0;r;)t=r.data,n=o,i=s,u.prototype.copy.call(t,n,i),s+=r.data.length,r=r.next;return o}},{key:"consume",value:function(e,t){var n;return eo.length?o.length:e;if(r===o.length?i+=o:i+=o.slice(0,e),0==(e-=r)){r===o.length?(++n,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=o.slice(r));break}++n}return this.length-=n,i}},{key:"_getBuffer",value:function(e){var t=u.allocUnsafe(e),n=this.head,i=1;for(n.data.copy(t),e-=n.data.length;n=n.next;){var o=n.data,r=e>o.length?o.length:e;if(o.copy(t,t.length-e,0,r),0==(e-=r)){r===o.length?(++i,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=o.slice(r));break}++i}return this.length-=i,t}},{key:c,value:function(e,t){return l(this,o(o({},t),{},{depth:0,customInspect:!1}))}}])&&s(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}()},9944:(e,t,n)=>{"use strict";var i=n(8957);function o(e,t){s(e,t),r(e)}function r(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function s(e,t){e.emit("error",t)}e.exports={destroy:function(e,t){var n=this,a=this._readableState&&this._readableState.destroyed,u=this._writableState&&this._writableState.destroyed;return a||u?(t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,i.nextTick(s,this,e)):i.nextTick(s,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,(function(e){!t&&e?n._writableState?n._writableState.errorEmitted?i.nextTick(r,n):(n._writableState.errorEmitted=!0,i.nextTick(o,n,e)):i.nextTick(o,n,e):t?(i.nextTick(r,n),t(e)):i.nextTick(r,n)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(e,t){var n=e._readableState,i=e._writableState;n&&n.autoDestroy||i&&i.autoDestroy?e.destroy(t):e.emit("error",t)}}},9262:(e,t,n)=>{"use strict";var i=n(368).F.ERR_STREAM_PREMATURE_CLOSE;function o(){}e.exports=function e(t,n,r){if("function"==typeof n)return e(t,null,n);n||(n={}),r=function(e){var t=!1;return function(){if(!t){t=!0;for(var n=arguments.length,i=new Array(n),o=0;o{e.exports=function(){throw new Error("Readable.from is not available in the browser")}},4030:(e,t,n)=>{"use strict";var i,o=n(368).F,r=o.ERR_MISSING_ARGS,s=o.ERR_STREAM_DESTROYED;function a(e){if(e)throw e}function u(e){e()}function l(e,t){return e.pipe(t)}e.exports=function(){for(var e=arguments.length,t=new Array(e),o=0;o0,(function(e){c||(c=e),e&&d.forEach(u),r||(d.forEach(u),h(c))}))}));return t.reduce(l)}},7403:(e,t,n)=>{"use strict";var i=n(368).F.ERR_INVALID_OPT_VALUE;e.exports={getHighWaterMark:function(e,t,n,o){var r=function(e,t,n){return null!=e.highWaterMark?e.highWaterMark:t?e[n]:null}(t,o,n);if(null!=r){if(!isFinite(r)||Math.floor(r)!==r||r<0)throw new i(o?n:"highWaterMark",r);return Math.floor(r)}return e.objectMode?16:16384}}},8137:(e,t,n)=>{e.exports=n(3188).EventEmitter},230:(e,t,n)=>{"use strict";var i=n(9600).Buffer,o=i.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function r(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(i.isEncoding===o||!o(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=u,this.end=l,t=4;break;case"utf8":this.fillLast=a,t=4;break;case"base64":this.text=c,this.end=h,t=3;break;default:return this.write=d,void(this.end=f)}this.lastNeed=0,this.lastTotal=0,this.lastChar=i.allocUnsafe(t)}function s(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function a(e){var t=this.lastTotal-this.lastNeed,n=function(e,t,n){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==n?n:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function u(e,t){if((e.length-t)%2==0){var n=e.toString("utf16le",t);if(n){var i=n.charCodeAt(n.length-1);if(i>=55296&&i<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function l(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,n)}return t}function c(e,t){var n=(e.length-t)%3;return 0===n?e.toString("base64",t):(this.lastNeed=3-n,this.lastTotal=3,1===n?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-n))}function h(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function d(e){return e.toString(this.encoding)}function f(e){return e&&e.length?this.write(e):""}t.I=r,r.prototype.write=function(e){if(0===e.length)return"";var t,n;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";n=this.lastNeed,this.lastNeed=0}else n=0;return n=0?(o>0&&(e.lastNeed=o-1),o):--i=0?(o>0&&(e.lastNeed=o-2),o):--i=0?(o>0&&(2===o?o=0:e.lastNeed=o-3),o):0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=n;var i=e.length-(n-this.lastNeed);return e.copy(this.lastChar,0,i),e.toString("utf8",t,i)},r.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},9600:(e,t,n)=>{var i=n(1278),o=i.Buffer;function r(e,t){for(var n in e)t[n]=e[n]}function s(e,t,n){return o(e,t,n)}o.from&&o.alloc&&o.allocUnsafe&&o.allocUnsafeSlow?e.exports=i:(r(i,t),t.Buffer=s),s.prototype=Object.create(o.prototype),r(o,s),s.from=function(e,t,n){if("number"==typeof e)throw new TypeError("Argument must not be a number");return o(e,t,n)},s.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError("Argument must be a number");var i=o(e);return void 0!==t?"string"==typeof n?i.fill(t,n):i.fill(t):i.fill(0),i},s.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return o(e)},s.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i.SlowBuffer(e)}},650:(e,t,n)=>{var i,o,r={},s=(i=function(){return window&&document&&document.all&&!window.atob},function(){return void 0===o&&(o=i.apply(this,arguments)),o}),a=function(e){return document.querySelector(e)},u=function(e){var t={};return function(e){if("function"==typeof e)return e();if(void 0===t[e]){var n=a.call(this,e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}t[e]=n}return t[e]}}(),l=null,c=0,h=[],d=n(2693);function f(e,t){for(var n=0;n=0&&h.splice(t,1)}function v(e){var t=document.createElement("style");return e.attrs.type="text/css",y(t,e.attrs),g(e,t),t}function y(e,t){Object.keys(t).forEach((function(n){e.setAttribute(n,t[n])}))}function b(e,t){var n,i,o,r;if(t.transform&&e.css){if(!(r=t.transform(e.css)))return function(){};e.css=r}if(t.singleton){var s=c++;n=l||(l=v(t)),i=M.bind(null,n,s,!1),o=M.bind(null,n,s,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=function(e){var t=document.createElement("link");return e.attrs.type="text/css",e.attrs.rel="stylesheet",y(t,e.attrs),g(e,t),t}(t),i=S.bind(null,n,t),o=function(){m(n),n.href&&URL.revokeObjectURL(n.href)}):(n=v(t),i=C.bind(null,n),o=function(){m(n)});return i(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;i(e=t)}else o()}}e.exports=function(e,t){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(t=t||{}).attrs="object"==typeof t.attrs?t.attrs:{},t.singleton||"boolean"==typeof t.singleton||(t.singleton=s()),t.insertInto||(t.insertInto="head"),t.insertAt||(t.insertAt="bottom");var n=p(e,t);return f(n,t),function(e){for(var i=[],o=0;o{e.exports=function(e){var t="undefined"!=typeof window&&window.location;if(!t)throw new Error("fixUrls requires window.location");if(!e||"string"!=typeof e)return e;var n=t.protocol+"//"+t.host,i=n+t.pathname.replace(/\/[^\/]*$/,"/");return e.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,(function(e,t){var o,r=t.trim().replace(/^"(.*)"$/,(function(e,t){return t})).replace(/^'(.*)'$/,(function(e,t){return t}));return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(r)?e:(o=0===r.indexOf("//")?r:0===r.indexOf("/")?n+r:i+r.replace(/^\.\//,""),"url("+JSON.stringify(o)+")")}))}},4982:(e,t,n)=>{function i(e){try{if(!n.g.localStorage)return!1}catch(e){return!1}var t=n.g.localStorage[e];return null!=t&&"true"===String(t).toLowerCase()}e.exports=function(e,t){if(i("noDeprecation"))return e;var n=!1;return function(){if(!n){if(i("throwDeprecation"))throw new Error(t);i("traceDeprecation")?console.trace(t):console.warn(t),n=!0}return e.apply(this,arguments)}}},7190:(__unused_webpack_module,exports)=>{var indexOf=function(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0;n0)&&!(i=r.next()).done;)s.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return s},a=this&&this.__spread||function(){for(var e=[],t=0;t=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}};Object.defineProperty(t,"__esModule",{value:!0});var l=n(9120),c=n(7850),h=n(3450),d=n(9950),f=n(8330),p=n(5200),g=n(6297);!function(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}(n(7850));var m,v,y=function(){function e(){}return e.prototype.error=function(e){console.error(e)},e.prototype.warn=function(e){console.warn(e)},e.prototype.info=function(e){console.info(e)},e.prototype.log=function(e){console.log(e)},e}();!function(e){e[e.Continue=1]="Continue",e[e.Shutdown=2]="Shutdown"}(m=t.ErrorAction||(t.ErrorAction={})),function(e){e[e.DoNotRestart=1]="DoNotRestart",e[e.Restart=2]="Restart"}(v=t.CloseAction||(t.CloseAction={}));var b,_,w,M=function(){function e(e){this.name=e,this.restarts=[]}return e.prototype.error=function(e,t,n){return n&&n<=3?m.Continue:m.Shutdown},e.prototype.closed=function(){return this.restarts.push(Date.now()),this.restarts.length<5?v.Restart:this.restarts[this.restarts.length-1]-this.restarts[0]<=18e4?(l.window.showErrorMessage("The "+this.name+" server crashed 5 times in the last 3 minutes. The server will not be restarted."),v.DoNotRestart):(this.restarts.shift(),v.Restart)},e}();!function(e){e[e.Info=1]="Info",e[e.Warn=2]="Warn",e[e.Error=3]="Error",e[e.Never=4]="Never"}(b=t.RevealOutputChannelOn||(t.RevealOutputChannelOn={})),function(e){e[e.Stopped=1]="Stopped",e[e.Running=2]="Running"}(_=t.State||(t.State={})),function(e){e[e.Initial=0]="Initial",e[e.Starting=1]="Starting",e[e.StartFailed=2]="StartFailed",e[e.Running=3]="Running",e[e.Stopping=4]="Stopping",e[e.Stopped=5]="Stopped"}(w||(w={}));var C,S=[c.SymbolKind.File,c.SymbolKind.Module,c.SymbolKind.Namespace,c.SymbolKind.Package,c.SymbolKind.Class,c.SymbolKind.Method,c.SymbolKind.Property,c.SymbolKind.Field,c.SymbolKind.Constructor,c.SymbolKind.Enum,c.SymbolKind.Interface,c.SymbolKind.Function,c.SymbolKind.Variable,c.SymbolKind.Constant,c.SymbolKind.String,c.SymbolKind.Number,c.SymbolKind.Boolean,c.SymbolKind.Array,c.SymbolKind.Object,c.SymbolKind.Key,c.SymbolKind.Null,c.SymbolKind.EnumMember,c.SymbolKind.Struct,c.SymbolKind.Event,c.SymbolKind.Operator,c.SymbolKind.TypeParameter],L=[c.CompletionItemKind.Text,c.CompletionItemKind.Method,c.CompletionItemKind.Function,c.CompletionItemKind.Constructor,c.CompletionItemKind.Field,c.CompletionItemKind.Variable,c.CompletionItemKind.Class,c.CompletionItemKind.Interface,c.CompletionItemKind.Module,c.CompletionItemKind.Property,c.CompletionItemKind.Unit,c.CompletionItemKind.Value,c.CompletionItemKind.Enum,c.CompletionItemKind.Keyword,c.CompletionItemKind.Snippet,c.CompletionItemKind.Color,c.CompletionItemKind.File,c.CompletionItemKind.Reference,c.CompletionItemKind.Folder,c.CompletionItemKind.EnumMember,c.CompletionItemKind.Constant,c.CompletionItemKind.Struct,c.CompletionItemKind.Event,c.CompletionItemKind.Operator,c.CompletionItemKind.TypeParameter];function I(e,t){return void 0===e[t]&&(e[t]={}),e[t]}!function(e){e.is=function(e){var t=e;return t&&f.func(t.register)&&f.func(t.unregister)&&f.func(t.dispose)&&void 0!==t.messages}}(C||(C={}));var N=function(){function e(e,t,n,i,o,r){this._client=e,this._event=t,this._type=n,this._middleware=i,this._createParams=o,this._selectorFilter=r,this._selectors=new Map}return e.textDocumentFilter=function(e,t){var n,i;try{for(var o=u(e),r=o.next();!r.done;r=o.next()){var s=r.value;if(l.languages.match(s,t))return!0}}catch(e){n={error:e}}finally{try{r&&!r.done&&(i=o.return)&&i.call(o)}finally{if(n)throw n.error}}return!1},e.prototype.register=function(e,t){t.registerOptions.documentSelector&&(this._listener||(this._listener=this._event(this.callback,this)),this._selectors.set(t.id,t.registerOptions.documentSelector))},e.prototype.callback=function(e){var t=this;this._selectorFilter&&!this._selectorFilter(this._selectors.values(),e)||(this._middleware?this._middleware(e,(function(e){return t._client.sendNotification(t._type,t._createParams(e))})):this._client.sendNotification(this._type,this._createParams(e)),this.notificationSent(e))},e.prototype.notificationSent=function(e){},e.prototype.unregister=function(e){this._selectors.delete(e),0===this._selectors.size&&this._listener&&(this._listener.dispose(),this._listener=void 0)},e.prototype.dispose=function(){this._selectors.clear(),this._listener&&this._listener.dispose()},e}(),x=function(e){function t(t,n){var i=e.call(this,t,l.workspace.onDidOpenTextDocument,c.DidOpenTextDocumentNotification.type,t.clientOptions.middleware.didOpen,(function(e){return t.code2ProtocolConverter.asOpenTextDocumentParams(e)}),N.textDocumentFilter)||this;return i._syncedDocuments=n,i}return r(t,e),Object.defineProperty(t.prototype,"messages",{get:function(){return c.DidOpenTextDocumentNotification.type},enumerable:!0,configurable:!0}),t.prototype.fillClientCapabilities=function(e){I(I(e,"textDocument"),"synchronization").dynamicRegistration=!0},t.prototype.initialize=function(e,t){var n=e.resolvedTextDocumentSync;t&&n&&n.openClose&&this.register(this.messages,{id:g.generateUuid(),registerOptions:{documentSelector:t}})},t.prototype.register=function(t,n){var i=this;if(e.prototype.register.call(this,t,n),n.registerOptions.documentSelector){var o=n.registerOptions.documentSelector;l.workspace.textDocuments.forEach((function(e){var t=e.uri.toString();if(!i._syncedDocuments.has(t)&&l.languages.match(o,e)){var n=i._client.clientOptions.middleware,r=function(e){i._client.sendNotification(i._type,i._createParams(e))};n.didOpen?n.didOpen(e,r):r(e),i._syncedDocuments.set(t,e)}}))}},t.prototype.notificationSent=function(t){e.prototype.notificationSent.call(this,t),this._syncedDocuments.set(t.uri.toString(),t)},t}(N),D=function(e){function t(t,n){var i=e.call(this,t,l.workspace.onDidCloseTextDocument,c.DidCloseTextDocumentNotification.type,t.clientOptions.middleware.didClose,(function(e){return t.code2ProtocolConverter.asCloseTextDocumentParams(e)}),N.textDocumentFilter)||this;return i._syncedDocuments=n,i}return r(t,e),Object.defineProperty(t.prototype,"messages",{get:function(){return c.DidCloseTextDocumentNotification.type},enumerable:!0,configurable:!0}),t.prototype.fillClientCapabilities=function(e){I(I(e,"textDocument"),"synchronization").dynamicRegistration=!0},t.prototype.initialize=function(e,t){var n=e.resolvedTextDocumentSync;t&&n&&n.openClose&&this.register(this.messages,{id:g.generateUuid(),registerOptions:{documentSelector:t}})},t.prototype.notificationSent=function(t){e.prototype.notificationSent.call(this,t),this._syncedDocuments.delete(t.uri.toString())},t.prototype.unregister=function(t){var n=this,i=this._selectors.get(t);e.prototype.unregister.call(this,t);var o=this._selectors.values();this._syncedDocuments.forEach((function(e){if(l.languages.match(i,e)&&!n._selectorFilter(o,e)){var t=n._client.clientOptions.middleware,r=function(e){n._client.sendNotification(n._type,n._createParams(e))};n._syncedDocuments.delete(e.uri.toString()),t.didClose?t.didClose(e,r):r(e)}}))},t}(N),k=function(){function e(e){this._client=e,this._changeData=new Map,this._forcingDelivery=!1}return Object.defineProperty(e.prototype,"messages",{get:function(){return c.DidChangeTextDocumentNotification.type},enumerable:!0,configurable:!0}),e.prototype.fillClientCapabilities=function(e){I(I(e,"textDocument"),"synchronization").dynamicRegistration=!0},e.prototype.initialize=function(e,t){var n=e.resolvedTextDocumentSync;t&&n&&void 0!==n.change&&n.change!==c.TextDocumentSyncKind.None&&this.register(this.messages,{id:g.generateUuid(),registerOptions:Object.assign({},{documentSelector:t},{syncKind:n.change})})},e.prototype.register=function(e,t){t.registerOptions.documentSelector&&(this._listener||(this._listener=l.workspace.onDidChangeTextDocument(this.callback,this)),this._changeData.set(t.id,{documentSelector:t.registerOptions.documentSelector,syncKind:t.registerOptions.syncKind}))},e.prototype.callback=function(e){var t,n,i=this;if(0!==e.contentChanges.length){var o=function(t){if(l.languages.match(t.documentSelector,e.document)){var n=r._client.clientOptions.middleware;if(t.syncKind===c.TextDocumentSyncKind.Incremental){var o=r._client.code2ProtocolConverter.asChangeTextDocumentParams(e);n.didChange?n.didChange(e,(function(){return i._client.sendNotification(c.DidChangeTextDocumentNotification.type,o)})):r._client.sendNotification(c.DidChangeTextDocumentNotification.type,o)}else if(t.syncKind===c.TextDocumentSyncKind.Full){var s=function(e){i._changeDelayer?(i._changeDelayer.uri!==e.document.uri.toString()&&(i.forceDelivery(),i._changeDelayer.uri=e.document.uri.toString()),i._changeDelayer.delayer.trigger((function(){i._client.sendNotification(c.DidChangeTextDocumentNotification.type,i._client.code2ProtocolConverter.asChangeTextDocumentParams(e.document))}))):(i._changeDelayer={uri:e.document.uri.toString(),delayer:new p.Delayer(200)},i._changeDelayer.delayer.trigger((function(){i._client.sendNotification(c.DidChangeTextDocumentNotification.type,i._client.code2ProtocolConverter.asChangeTextDocumentParams(e.document))}),-1))};n.didChange?n.didChange(e,s):s(e)}}},r=this;try{for(var s=u(this._changeData.values()),a=s.next();!a.done;a=s.next())o(a.value)}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}}},e.prototype.unregister=function(e){this._changeData.delete(e),0===this._changeData.size&&this._listener&&(this._listener.dispose(),this._listener=void 0)},e.prototype.dispose=function(){this._changeDelayer=void 0,this._forcingDelivery=!1,this._changeData.clear(),this._listener&&(this._listener.dispose(),this._listener=void 0)},e.prototype.forceDelivery=function(){if(!this._forcingDelivery&&this._changeDelayer)try{this._forcingDelivery=!0,this._changeDelayer.delayer.forceDelivery()}finally{this._forcingDelivery=!1}},e}(),T=function(e){function t(t){return e.call(this,t,l.workspace.onWillSaveTextDocument,c.WillSaveTextDocumentNotification.type,t.clientOptions.middleware.willSave,(function(e){return t.code2ProtocolConverter.asWillSaveTextDocumentParams(e)}),(function(e,t){return N.textDocumentFilter(e,t.document)}))||this}return r(t,e),Object.defineProperty(t.prototype,"messages",{get:function(){return c.WillSaveTextDocumentNotification.type},enumerable:!0,configurable:!0}),t.prototype.fillClientCapabilities=function(e){I(I(e,"textDocument"),"synchronization").willSave=!0},t.prototype.initialize=function(e,t){var n=e.resolvedTextDocumentSync;t&&n&&n.willSave&&this.register(this.messages,{id:g.generateUuid(),registerOptions:{documentSelector:t}})},t}(N),E=function(){function e(e){this._client=e,this._selectors=new Map}return Object.defineProperty(e.prototype,"messages",{get:function(){return c.WillSaveTextDocumentWaitUntilRequest.type},enumerable:!0,configurable:!0}),e.prototype.fillClientCapabilities=function(e){I(I(e,"textDocument"),"synchronization").willSaveWaitUntil=!0},e.prototype.initialize=function(e,t){var n=e.resolvedTextDocumentSync;t&&n&&n.willSaveWaitUntil&&this.register(this.messages,{id:g.generateUuid(),registerOptions:{documentSelector:t}})},e.prototype.register=function(e,t){t.registerOptions.documentSelector&&(this._listener||(this._listener=l.workspace.onWillSaveTextDocument(this.callback,this)),this._selectors.set(t.id,t.registerOptions.documentSelector))},e.prototype.callback=function(e){var t=this;if(N.textDocumentFilter(this._selectors.values(),e.document)){var n=this._client.clientOptions.middleware,i=function(e){return t._client.sendRequest(c.WillSaveTextDocumentWaitUntilRequest.type,t._client.code2ProtocolConverter.asWillSaveTextDocumentParams(e)).then((function(e){var n=t._client.protocol2CodeConverter.asTextEdits(e);return void 0===n?[]:n}))};e.waitUntil(n.willSaveWaitUntil?n.willSaveWaitUntil(e,i):i(e))}},e.prototype.unregister=function(e){this._selectors.delete(e),0===this._selectors.size&&this._listener&&(this._listener.dispose(),this._listener=void 0)},e.prototype.dispose=function(){this._selectors.clear(),this._listener&&(this._listener.dispose(),this._listener=void 0)},e}(),A=function(e){function t(t){var n=e.call(this,t,l.workspace.onDidSaveTextDocument,c.DidSaveTextDocumentNotification.type,t.clientOptions.middleware.didSave,(function(e){return t.code2ProtocolConverter.asSaveTextDocumentParams(e,n._includeText)}),N.textDocumentFilter)||this;return n}return r(t,e),Object.defineProperty(t.prototype,"messages",{get:function(){return c.DidSaveTextDocumentNotification.type},enumerable:!0,configurable:!0}),t.prototype.fillClientCapabilities=function(e){I(I(e,"textDocument"),"synchronization").didSave=!0},t.prototype.initialize=function(e,t){var n=e.resolvedTextDocumentSync;t&&n&&n.save&&this.register(this.messages,{id:g.generateUuid(),registerOptions:Object.assign({},{documentSelector:t},{includeText:!!n.save.includeText})})},t.prototype.register=function(t,n){this._includeText=!!n.registerOptions.includeText,e.prototype.register.call(this,t,n)},t}(N),j=function(){function e(e,t){this._client=e,this._notifyFileEvent=t,this._watchers=new Map}return Object.defineProperty(e.prototype,"messages",{get:function(){return c.DidChangeWatchedFilesNotification.type},enumerable:!0,configurable:!0}),e.prototype.fillClientCapabilities=function(e){I(I(e,"workspace"),"didChangeWatchedFiles").dynamicRegistration=!0},e.prototype.initialize=function(e,t){},e.prototype.register=function(e,t){var n,i;if(Array.isArray(t.registerOptions.watchers)){var o=[];try{for(var r=u(t.registerOptions.watchers),s=r.next();!s.done;s=r.next()){var a=s.value;if(f.string(a.globPattern)){var h=!0,d=!0,p=!0;void 0!==a.kind&&null!==a.kind&&(h=!!(a.kind&c.WatchKind.Create),d=!!(a.kind&c.WatchKind.Change),p=!!(a.kind&c.WatchKind.Delete));var g=l.workspace.createFileSystemWatcher(a.globPattern,!h,!d,!p);this.hookListeners(g,h,d,p),o.push(g)}}}catch(e){n={error:e}}finally{try{s&&!s.done&&(i=r.return)&&i.call(r)}finally{if(n)throw n.error}}this._watchers.set(t.id,o)}},e.prototype.registerRaw=function(e,t){var n,i,o=[];try{for(var r=u(t),s=r.next();!s.done;s=r.next()){var a=s.value;this.hookListeners(a,!0,!0,!0,o)}}catch(e){n={error:e}}finally{try{s&&!s.done&&(i=r.return)&&i.call(r)}finally{if(n)throw n.error}}this._watchers.set(e,o)},e.prototype.hookListeners=function(e,t,n,i,o){var r=this;t&&e.onDidCreate((function(e){return r._notifyFileEvent({uri:r._client.code2ProtocolConverter.asUri(e),type:c.FileChangeType.Created})}),null,o),n&&e.onDidChange((function(e){return r._notifyFileEvent({uri:r._client.code2ProtocolConverter.asUri(e),type:c.FileChangeType.Changed})}),null,o),i&&e.onDidDelete((function(e){return r._notifyFileEvent({uri:r._client.code2ProtocolConverter.asUri(e),type:c.FileChangeType.Deleted})}),null,o)},e.prototype.unregister=function(e){var t,n,i=this._watchers.get(e);if(i)try{for(var o=u(i),r=o.next();!r.done;r=o.next())r.value.dispose()}catch(e){t={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}},e.prototype.dispose=function(){this._watchers.forEach((function(e){var t,n;try{for(var i=u(e),o=i.next();!o.done;o=i.next())o.value.dispose()}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}})),this._watchers.clear()},e}(),O=function(){function e(e,t){this._client=e,this._message=t,this._providers=new Map}return Object.defineProperty(e.prototype,"messages",{get:function(){return this._message},enumerable:!0,configurable:!0}),e.prototype.register=function(e,t){if(e.method!==this.messages.method)throw new Error("Register called on wrong feature. Requested "+e.method+" but reached feature "+this.messages.method);if(t.registerOptions.documentSelector){var n=this.registerLanguageProvider(t.registerOptions);n&&this._providers.set(t.id,n)}},e.prototype.unregister=function(e){var t=this._providers.get(e);t&&t.dispose()},e.prototype.dispose=function(){this._providers.forEach((function(e){e.dispose()})),this._providers.clear()},e}();t.TextDocumentFeature=O;var R=function(){function e(e,t){this._client=e,this._message=t,this._providers=new Map}return Object.defineProperty(e.prototype,"messages",{get:function(){return this._message},enumerable:!0,configurable:!0}),e.prototype.register=function(e,t){if(e.method!==this.messages.method)throw new Error("Register called on wron feature. Requested "+e.method+" but reached feature "+this.messages.method);var n=this.registerLanguageProvider(t.registerOptions);n&&this._providers.set(t.id,n)},e.prototype.unregister=function(e){var t=this._providers.get(e);t&&t.dispose()},e.prototype.dispose=function(){this._providers.forEach((function(e){e.dispose()})),this._providers.clear()},e}(),P=function(e){function t(t){return e.call(this,t,c.CompletionRequest.type)||this}return r(t,e),t.prototype.fillClientCapabilities=function(e){var t=I(I(e,"textDocument"),"completion");t.dynamicRegistration=!0,t.contextSupport=!0,t.completionItem={snippetSupport:!0,commitCharactersSupport:!0,documentationFormat:[c.MarkupKind.Markdown,c.MarkupKind.PlainText],deprecatedSupport:!0,preselectSupport:!0},t.completionItemKind={valueSet:L}},t.prototype.initialize=function(e,t){e.completionProvider&&t&&this.register(this.messages,{id:g.generateUuid(),registerOptions:Object.assign({},{documentSelector:t},e.completionProvider)})},t.prototype.registerLanguageProvider=function(e){var t=e.triggerCharacters||[],n=this._client,i=function(e,t,i,o){return n.sendRequest(c.CompletionRequest.type,n.code2ProtocolConverter.asCompletionParams(e,t,i),o).then(n.protocol2CodeConverter.asCompletionResult,(function(e){return n.logFailedRequest(c.CompletionRequest.type,e),Promise.resolve([])}))},o=function(e,t){return n.sendRequest(c.CompletionResolveRequest.type,n.code2ProtocolConverter.asCompletionItem(e),t).then(n.protocol2CodeConverter.asCompletionItem,(function(t){return n.logFailedRequest(c.CompletionResolveRequest.type,t),Promise.resolve(e)}))},r=this._client.clientOptions.middleware;return l.languages.registerCompletionItemProvider.apply(l.languages,a([e.documentSelector,{provideCompletionItems:function(e,t,n,o){return r.provideCompletionItem?r.provideCompletionItem(e,t,o,n,i):i(e,t,o,n)},resolveCompletionItem:e.resolveProvider?function(e,t){return r.resolveCompletionItem?r.resolveCompletionItem(e,t,o):o(e,t)}:void 0}],t))},t}(O),z=function(e){function t(t){return e.call(this,t,c.HoverRequest.type)||this}return r(t,e),t.prototype.fillClientCapabilities=function(e){var t=I(I(e,"textDocument"),"hover");t.dynamicRegistration=!0,t.contentFormat=[c.MarkupKind.Markdown,c.MarkupKind.PlainText]},t.prototype.initialize=function(e,t){e.hoverProvider&&t&&this.register(this.messages,{id:g.generateUuid(),registerOptions:Object.assign({},{documentSelector:t})})},t.prototype.registerLanguageProvider=function(e){var t=this._client,n=function(e,n,i){return t.sendRequest(c.HoverRequest.type,t.code2ProtocolConverter.asTextDocumentPositionParams(e,n),i).then(t.protocol2CodeConverter.asHover,(function(e){return t.logFailedRequest(c.HoverRequest.type,e),Promise.resolve(null)}))},i=t.clientOptions.middleware;return l.languages.registerHoverProvider(e.documentSelector,{provideHover:function(e,t,o){return i.provideHover?i.provideHover(e,t,o,n):n(e,t,o)}})},t}(O),W=function(e){function t(t){return e.call(this,t,c.SignatureHelpRequest.type)||this}return r(t,e),t.prototype.fillClientCapabilities=function(e){var t=I(I(e,"textDocument"),"signatureHelp");t.dynamicRegistration=!0,t.signatureInformation={documentationFormat:[c.MarkupKind.Markdown,c.MarkupKind.PlainText]}},t.prototype.initialize=function(e,t){e.signatureHelpProvider&&t&&this.register(this.messages,{id:g.generateUuid(),registerOptions:Object.assign({},{documentSelector:t},e.signatureHelpProvider)})},t.prototype.registerLanguageProvider=function(e){var t=this._client,n=function(e,n,i){return t.sendRequest(c.SignatureHelpRequest.type,t.code2ProtocolConverter.asTextDocumentPositionParams(e,n),i).then(t.protocol2CodeConverter.asSignatureHelp,(function(e){return t.logFailedRequest(c.SignatureHelpRequest.type,e),Promise.resolve(null)}))},i=t.clientOptions.middleware,o=e.triggerCharacters||[];return l.languages.registerSignatureHelpProvider.apply(l.languages,a([e.documentSelector,{provideSignatureHelp:function(e,t,o){return i.provideSignatureHelp?i.provideSignatureHelp(e,t,o,n):n(e,t,o)}}],o))},t}(O),F=function(e){function t(t){return e.call(this,t,c.DefinitionRequest.type)||this}return r(t,e),t.prototype.fillClientCapabilities=function(e){I(I(e,"textDocument"),"definition").dynamicRegistration=!0},t.prototype.initialize=function(e,t){e.definitionProvider&&t&&this.register(this.messages,{id:g.generateUuid(),registerOptions:Object.assign({},{documentSelector:t})})},t.prototype.registerLanguageProvider=function(e){var t=this._client,n=function(e,n,i){return t.sendRequest(c.DefinitionRequest.type,t.code2ProtocolConverter.asTextDocumentPositionParams(e,n),i).then(t.protocol2CodeConverter.asDefinitionResult,(function(e){return t.logFailedRequest(c.DefinitionRequest.type,e),Promise.resolve(null)}))},i=t.clientOptions.middleware;return l.languages.registerDefinitionProvider(e.documentSelector,{provideDefinition:function(e,t,o){return i.provideDefinition?i.provideDefinition(e,t,o,n):n(e,t,o)}})},t}(O),B=function(e){function t(t){return e.call(this,t,c.ReferencesRequest.type)||this}return r(t,e),t.prototype.fillClientCapabilities=function(e){I(I(e,"textDocument"),"references").dynamicRegistration=!0},t.prototype.initialize=function(e,t){e.referencesProvider&&t&&this.register(this.messages,{id:g.generateUuid(),registerOptions:Object.assign({},{documentSelector:t})})},t.prototype.registerLanguageProvider=function(e){var t=this._client,n=function(e,n,i,o){return t.sendRequest(c.ReferencesRequest.type,t.code2ProtocolConverter.asReferenceParams(e,n,i),o).then(t.protocol2CodeConverter.asReferences,(function(e){return t.logFailedRequest(c.ReferencesRequest.type,e),Promise.resolve([])}))},i=t.clientOptions.middleware;return l.languages.registerReferenceProvider(e.documentSelector,{provideReferences:function(e,t,o,r){return i.provideReferences?i.provideReferences(e,t,o,r,n):n(e,t,o,r)}})},t}(O),H=function(e){function t(t){return e.call(this,t,c.DocumentHighlightRequest.type)||this}return r(t,e),t.prototype.fillClientCapabilities=function(e){I(I(e,"textDocument"),"documentHighlight").dynamicRegistration=!0},t.prototype.initialize=function(e,t){e.documentHighlightProvider&&t&&this.register(this.messages,{id:g.generateUuid(),registerOptions:Object.assign({},{documentSelector:t})})},t.prototype.registerLanguageProvider=function(e){var t=this._client,n=function(e,n,i){return t.sendRequest(c.DocumentHighlightRequest.type,t.code2ProtocolConverter.asTextDocumentPositionParams(e,n),i).then(t.protocol2CodeConverter.asDocumentHighlights,(function(e){return t.logFailedRequest(c.DocumentHighlightRequest.type,e),Promise.resolve([])}))},i=t.clientOptions.middleware;return l.languages.registerDocumentHighlightProvider(e.documentSelector,{provideDocumentHighlights:function(e,t,o){return i.provideDocumentHighlights?i.provideDocumentHighlights(e,t,o,n):n(e,t,o)}})},t}(O),V=function(e){function t(t){return e.call(this,t,c.DocumentSymbolRequest.type)||this}return r(t,e),t.prototype.fillClientCapabilities=function(e){var t=I(I(e,"textDocument"),"documentSymbol");t.dynamicRegistration=!0,t.symbolKind={valueSet:S},t.hierarchicalDocumentSymbolSupport=!0},t.prototype.initialize=function(e,t){e.documentSymbolProvider&&t&&this.register(this.messages,{id:g.generateUuid(),registerOptions:Object.assign({},{documentSelector:t})})},t.prototype.registerLanguageProvider=function(e){var t=this._client,n=function(e,n){return t.sendRequest(c.DocumentSymbolRequest.type,t.code2ProtocolConverter.asDocumentSymbolParams(e),n).then((function(e){if(null!==e){if(0===e.length)return[];var n=e[0];return c.DocumentSymbol.is(n)?t.protocol2CodeConverter.asDocumentSymbols(e):t.protocol2CodeConverter.asSymbolInformations(e)}}),(function(e){return t.logFailedRequest(c.DocumentSymbolRequest.type,e),Promise.resolve([])}))},i=t.clientOptions.middleware;return l.languages.registerDocumentSymbolProvider(e.documentSelector,{provideDocumentSymbols:function(e,t){return i.provideDocumentSymbols?i.provideDocumentSymbols(e,t,n):n(e,t)}})},t}(O),U=function(e){function t(t){return e.call(this,t,c.WorkspaceSymbolRequest.type)||this}return r(t,e),t.prototype.fillClientCapabilities=function(e){var t=I(I(e,"workspace"),"symbol");t.dynamicRegistration=!0,t.symbolKind={valueSet:S}},t.prototype.initialize=function(e){e.workspaceSymbolProvider&&this.register(this.messages,{id:g.generateUuid(),registerOptions:void 0})},t.prototype.registerLanguageProvider=function(e){var t=this._client,n=function(e,n){return t.sendRequest(c.WorkspaceSymbolRequest.type,{query:e},n).then(t.protocol2CodeConverter.asSymbolInformations,(function(e){return t.logFailedRequest(c.WorkspaceSymbolRequest.type,e),Promise.resolve([])}))},i=t.clientOptions.middleware;return l.languages.registerWorkspaceSymbolProvider({provideWorkspaceSymbols:function(e,t){return i.provideWorkspaceSymbols?i.provideWorkspaceSymbols(e,t,n):n(e,t)}})},t}(R),Y=function(e){function t(t){return e.call(this,t,c.CodeActionRequest.type)||this}return r(t,e),t.prototype.fillClientCapabilities=function(e){var t=I(I(e,"textDocument"),"codeAction");t.dynamicRegistration=!0,t.codeActionLiteralSupport={codeActionKind:{valueSet:["",c.CodeActionKind.QuickFix,c.CodeActionKind.Refactor,c.CodeActionKind.RefactorExtract,c.CodeActionKind.RefactorInline,c.CodeActionKind.RefactorRewrite,c.CodeActionKind.Source,c.CodeActionKind.SourceOrganizeImports]}}},t.prototype.initialize=function(e,t){e.codeActionProvider&&t&&this.register(this.messages,{id:g.generateUuid(),registerOptions:Object.assign({},{documentSelector:t})})},t.prototype.registerLanguageProvider=function(e){var t=this._client,n=function(e,n,i,o){var r={textDocument:t.code2ProtocolConverter.asTextDocumentIdentifier(e),range:t.code2ProtocolConverter.asRange(n),context:t.code2ProtocolConverter.asCodeActionContext(i)};return t.sendRequest(c.CodeActionRequest.type,r,o).then((function(e){var n,i;if(null!==e){var o=[];try{for(var r=u(e),s=r.next();!s.done;s=r.next()){var a=s.value;c.Command.is(a)?o.push(t.protocol2CodeConverter.asCommand(a)):o.push(t.protocol2CodeConverter.asCodeAction(a))}}catch(e){n={error:e}}finally{try{s&&!s.done&&(i=r.return)&&i.call(r)}finally{if(n)throw n.error}}return o}}),(function(e){return t.logFailedRequest(c.CodeActionRequest.type,e),Promise.resolve([])}))},i=t.clientOptions.middleware;return l.languages.registerCodeActionsProvider(e.documentSelector,{provideCodeActions:function(e,t,o,r){return i.provideCodeActions?i.provideCodeActions(e,t,o,r,n):n(e,t,o,r)}})},t}(O),Z=function(e){function t(t){return e.call(this,t,c.CodeLensRequest.type)||this}return r(t,e),t.prototype.fillClientCapabilities=function(e){I(I(e,"textDocument"),"codeLens").dynamicRegistration=!0},t.prototype.initialize=function(e,t){e.codeLensProvider&&t&&this.register(this.messages,{id:g.generateUuid(),registerOptions:Object.assign({},{documentSelector:t},e.codeLensProvider)})},t.prototype.registerLanguageProvider=function(e){var t=this._client,n=function(e,n){return t.sendRequest(c.CodeLensRequest.type,t.code2ProtocolConverter.asCodeLensParams(e),n).then(t.protocol2CodeConverter.asCodeLenses,(function(e){return t.logFailedRequest(c.CodeLensRequest.type,e),Promise.resolve([])}))},i=function(e,n){return t.sendRequest(c.CodeLensResolveRequest.type,t.code2ProtocolConverter.asCodeLens(e),n).then(t.protocol2CodeConverter.asCodeLens,(function(n){return t.logFailedRequest(c.CodeLensResolveRequest.type,n),e}))},o=t.clientOptions.middleware;return l.languages.registerCodeLensProvider(e.documentSelector,{provideCodeLenses:function(e,t){return o.provideCodeLenses?o.provideCodeLenses(e,t,n):n(e,t)},resolveCodeLens:e.resolveProvider?function(e,t){return o.resolveCodeLens?o.resolveCodeLens(e,t,i):i(e,t)}:void 0})},t}(O),G=function(e){function t(t){return e.call(this,t,c.DocumentFormattingRequest.type)||this}return r(t,e),t.prototype.fillClientCapabilities=function(e){I(I(e,"textDocument"),"formatting").dynamicRegistration=!0},t.prototype.initialize=function(e,t){e.documentFormattingProvider&&t&&this.register(this.messages,{id:g.generateUuid(),registerOptions:Object.assign({},{documentSelector:t})})},t.prototype.registerLanguageProvider=function(e){var t=this._client,n=function(e,n,i){var o={textDocument:t.code2ProtocolConverter.asTextDocumentIdentifier(e),options:t.code2ProtocolConverter.asFormattingOptions(n)};return t.sendRequest(c.DocumentFormattingRequest.type,o,i).then(t.protocol2CodeConverter.asTextEdits,(function(e){return t.logFailedRequest(c.DocumentFormattingRequest.type,e),Promise.resolve([])}))},i=t.clientOptions.middleware;return l.languages.registerDocumentFormattingEditProvider(e.documentSelector,{provideDocumentFormattingEdits:function(e,t,o){return i.provideDocumentFormattingEdits?i.provideDocumentFormattingEdits(e,t,o,n):n(e,t,o)}})},t}(O),Q=function(e){function t(t){return e.call(this,t,c.DocumentRangeFormattingRequest.type)||this}return r(t,e),t.prototype.fillClientCapabilities=function(e){I(I(e,"textDocument"),"rangeFormatting").dynamicRegistration=!0},t.prototype.initialize=function(e,t){e.documentRangeFormattingProvider&&t&&this.register(this.messages,{id:g.generateUuid(),registerOptions:Object.assign({},{documentSelector:t})})},t.prototype.registerLanguageProvider=function(e){var t=this._client,n=function(e,n,i,o){var r={textDocument:t.code2ProtocolConverter.asTextDocumentIdentifier(e),range:t.code2ProtocolConverter.asRange(n),options:t.code2ProtocolConverter.asFormattingOptions(i)};return t.sendRequest(c.DocumentRangeFormattingRequest.type,r,o).then(t.protocol2CodeConverter.asTextEdits,(function(e){return t.logFailedRequest(c.DocumentRangeFormattingRequest.type,e),Promise.resolve([])}))},i=t.clientOptions.middleware;return l.languages.registerDocumentRangeFormattingEditProvider(e.documentSelector,{provideDocumentRangeFormattingEdits:function(e,t,o,r){return i.provideDocumentRangeFormattingEdits?i.provideDocumentRangeFormattingEdits(e,t,o,r,n):n(e,t,o,r)}})},t}(O),q=function(e){function t(t){return e.call(this,t,c.DocumentOnTypeFormattingRequest.type)||this}return r(t,e),t.prototype.fillClientCapabilities=function(e){I(I(e,"textDocument"),"onTypeFormatting").dynamicRegistration=!0},t.prototype.initialize=function(e,t){e.documentOnTypeFormattingProvider&&t&&this.register(this.messages,{id:g.generateUuid(),registerOptions:Object.assign({},{documentSelector:t},e.documentOnTypeFormattingProvider)})},t.prototype.registerLanguageProvider=function(e){var t=this._client,n=e.moreTriggerCharacter||[],i=function(e,n,i,o,r){var s={textDocument:t.code2ProtocolConverter.asTextDocumentIdentifier(e),position:t.code2ProtocolConverter.asPosition(n),ch:i,options:t.code2ProtocolConverter.asFormattingOptions(o)};return t.sendRequest(c.DocumentOnTypeFormattingRequest.type,s,r).then(t.protocol2CodeConverter.asTextEdits,(function(e){return t.logFailedRequest(c.DocumentOnTypeFormattingRequest.type,e),Promise.resolve([])}))},o=t.clientOptions.middleware;return l.languages.registerOnTypeFormattingEditProvider.apply(l.languages,a([e.documentSelector,{provideOnTypeFormattingEdits:function(e,t,n,r,s){return o.provideOnTypeFormattingEdits?o.provideOnTypeFormattingEdits(e,t,n,r,s,i):i(e,t,n,r,s)}},e.firstTriggerCharacter],n))},t}(O),K=function(e){function t(t){return e.call(this,t,c.RenameRequest.type)||this}return r(t,e),t.prototype.fillClientCapabilities=function(e){I(I(e,"textDocument"),"rename").dynamicRegistration=!0},t.prototype.initialize=function(e,t){e.renameProvider&&t&&this.register(this.messages,{id:g.generateUuid(),registerOptions:Object.assign({},{documentSelector:t})})},t.prototype.registerLanguageProvider=function(e){var t=this._client,n=function(e,n,i,o){var r={textDocument:t.code2ProtocolConverter.asTextDocumentIdentifier(e),position:t.code2ProtocolConverter.asPosition(n),newName:i};return t.sendRequest(c.RenameRequest.type,r,o).then(t.protocol2CodeConverter.asWorkspaceEdit,(function(e){return t.logFailedRequest(c.RenameRequest.type,e),Promise.reject(new Error(e.message))}))},i=t.clientOptions.middleware;return l.languages.registerRenameProvider(e.documentSelector,{provideRenameEdits:function(e,t,o,r){return i.provideRenameEdits?i.provideRenameEdits(e,t,o,r,n):n(e,t,o,r)}})},t}(O),J=function(e){function t(t){return e.call(this,t,c.DocumentLinkRequest.type)||this}return r(t,e),t.prototype.fillClientCapabilities=function(e){I(I(e,"textDocument"),"documentLink").dynamicRegistration=!0},t.prototype.initialize=function(e,t){e.documentLinkProvider&&t&&this.register(this.messages,{id:g.generateUuid(),registerOptions:Object.assign({},{documentSelector:t},e.documentLinkProvider)})},t.prototype.registerLanguageProvider=function(e){var t=this._client,n=function(e,n){return t.sendRequest(c.DocumentLinkRequest.type,t.code2ProtocolConverter.asDocumentLinkParams(e),n).then(t.protocol2CodeConverter.asDocumentLinks,(function(e){t.logFailedRequest(c.DocumentLinkRequest.type,e),Promise.resolve(new Error(e.message))}))},i=function(e,n){return t.sendRequest(c.DocumentLinkResolveRequest.type,t.code2ProtocolConverter.asDocumentLink(e),n).then(t.protocol2CodeConverter.asDocumentLink,(function(e){t.logFailedRequest(c.DocumentLinkResolveRequest.type,e),Promise.resolve(new Error(e.message))}))},o=t.clientOptions.middleware;return l.languages.registerDocumentLinkProvider(e.documentSelector,{provideDocumentLinks:function(e,t){return o.provideDocumentLinks?o.provideDocumentLinks(e,t,n):n(e,t)},resolveDocumentLink:e.resolveProvider?function(e,t){return o.resolveDocumentLink?o.resolveDocumentLink(e,t,i):i(e,t)}:void 0})},t}(O),X=function(){function e(e){this._client=e,this._listeners=new Map}return Object.defineProperty(e.prototype,"messages",{get:function(){return c.DidChangeConfigurationNotification.type},enumerable:!0,configurable:!0}),e.prototype.fillClientCapabilities=function(e){I(I(e,"workspace"),"didChangeConfiguration").dynamicRegistration=!0},e.prototype.initialize=function(){var e=this._client.clientOptions.synchronize.configurationSection;void 0!==e&&this.register(this.messages,{id:g.generateUuid(),registerOptions:{section:e}})},e.prototype.register=function(e,t){var n=this,i=l.workspace.onDidChangeConfiguration((function(e){n.onDidChangeConfiguration(t.registerOptions.section,e)}));this._listeners.set(t.id,i),void 0!==t.registerOptions.section&&this.onDidChangeConfiguration(t.registerOptions.section,void 0)},e.prototype.unregister=function(e){var t=this._listeners.get(e);t&&(this._listeners.delete(e),t.dispose())},e.prototype.dispose=function(){var e,t;try{for(var n=u(this._listeners.values()),i=n.next();!i.done;i=n.next())i.value.dispose()}catch(t){e={error:t}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}}this._listeners.clear()},e.prototype.onDidChangeConfiguration=function(e,t){var n,i=this;if(void 0===(n=f.string(e)?[e]:e)||void 0===t||n.some((function(e){return t.affectsConfiguration(e)}))){var o=function(e){void 0!==e?i._client.sendNotification(c.DidChangeConfigurationNotification.type,{settings:i.extractSettingsInformation(e)}):i._client.sendNotification(c.DidChangeConfigurationNotification.type,{settings:null})},r=this.getMiddleware();r?r(n,o):o(n)}},e.prototype.extractSettingsInformation=function(e){function t(e,t){for(var n=e,i=0;i=0?l.workspace.getConfiguration(s.substr(0,a),n).get(s.substr(a+1)):l.workspace.getConfiguration(s,n)){var u=e[o].split(".");t(i,u)[u[u.length-1]]=r}}return i},e.prototype.getMiddleware=function(){var e=this._client.clientOptions.middleware;return e.workspace&&e.workspace.didChangeConfiguration?e.workspace.didChangeConfiguration:void 0},e}(),$=function(){function e(e){this._client=e,this._commands=new Map}return Object.defineProperty(e.prototype,"messages",{get:function(){return c.ExecuteCommandRequest.type},enumerable:!0,configurable:!0}),e.prototype.fillClientCapabilities=function(e){I(I(e,"workspace"),"executeCommand").dynamicRegistration=!0},e.prototype.initialize=function(e){e.executeCommandProvider&&this.register(this.messages,{id:g.generateUuid(),registerOptions:Object.assign({},e.executeCommandProvider)})},e.prototype.register=function(e,t){var n,i,o=this._client;if(t.registerOptions.commands){var r=[],s=function(e){r.push(l.commands.registerCommand(e,(function(){for(var t=[],n=0;n=0){var h=o.get(c.textDocument.uri);if(h&&h.version!==c.textDocument.version){r=!0;break}}}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}return r?Promise.resolve({applied:!1}):l.workspace.applyEdit(this._p2c.asWorkspaceEdit(e.edit)).then((function(e){return{applied:e}}))},e.prototype.logFailedRequest=function(e,t){t instanceof c.ResponseError&&t.code===c.ErrorCodes.RequestCancelled||this.error("Request "+e.method+" failed.",t)},e}();t.BaseLanguageClient=ee},3450:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(9120),o=n(7850),r=n(8330),s=n(9653),a=n(237),u=n(1269);t.createConverter=function(e){var t=e||function(e){return e.toString()};function n(e){return t(e)}function l(e){return{uri:t(e.uri)}}function c(e){return{uri:t(e.uri),version:e.version}}function h(e){switch(e){case i.TextDocumentSaveReason.Manual:return o.TextDocumentSaveReason.Manual;case i.TextDocumentSaveReason.AfterDelay:return o.TextDocumentSaveReason.AfterDelay;case i.TextDocumentSaveReason.FocusOut:return o.TextDocumentSaveReason.FocusOut}return o.TextDocumentSaveReason.Manual}function d(e){switch(e){case i.CompletionTriggerKind.TriggerCharacter:return o.CompletionTriggerKind.TriggerCharacter;case i.CompletionTriggerKind.TriggerForIncompleteCompletions:return o.CompletionTriggerKind.TriggerForIncompleteCompletions;default:return o.CompletionTriggerKind.Invoked}}function f(e){return{line:e.line,character:e.character}}function p(e){if(void 0!==e)return null===e?null:{line:e.line,character:e.character}}function g(e){return null==e?e:{start:p(e.start),end:p(e.end)}}function m(e){switch(e){case i.DiagnosticSeverity.Error:return o.DiagnosticSeverity.Error;case i.DiagnosticSeverity.Warning:return o.DiagnosticSeverity.Warning;case i.DiagnosticSeverity.Information:return o.DiagnosticSeverity.Information;case i.DiagnosticSeverity.Hint:return o.DiagnosticSeverity.Hint}}function v(e){var t=o.Diagnostic.create(g(e.range),e.message);return r.number(e.severity)&&(t.severity=m(e.severity)),(r.number(e.code)||r.string(e.code))&&(t.code=e.code),e.source&&(t.source=e.source),t}function y(e){return null==e?e:e.map(v)}function b(e){return{range:g(e.range),newText:e.newText}}function _(e){var t=o.Command.create(e.title,e.command);return e.arguments&&(t.arguments=e.arguments),t}return{asUri:n,asTextDocumentIdentifier:l,asOpenTextDocumentParams:function(e){return{textDocument:{uri:t(e.uri),languageId:e.languageId,version:e.version,text:e.getText()}}},asChangeTextDocumentParams:function(e){var n;if((n=e).uri&&n.version)return{textDocument:{uri:t(e.uri),version:e.version},contentChanges:[{text:e.getText()}]};if(function(e){var t=e;return!!t.document&&!!t.contentChanges}(e)){var i=e.document;return{textDocument:{uri:t(i.uri),version:i.version},contentChanges:e.contentChanges.map((function(e){var t=e.range;return{range:{start:{line:t.start.line,character:t.start.character},end:{line:t.end.line,character:t.end.character}},rangeLength:e.rangeLength,text:e.text}}))}}throw Error("Unsupported text document change parameter")},asCloseTextDocumentParams:function(e){return{textDocument:l(e)}},asSaveTextDocumentParams:function(e,t){void 0===t&&(t=!1);var n={textDocument:c(e)};return t&&(n.text=e.getText()),n},asWillSaveTextDocumentParams:function(e){return{textDocument:l(e.document),reason:h(e.reason)}},asTextDocumentPositionParams:function(e,t){return{textDocument:l(e),position:f(t)}},asCompletionParams:function(e,t,n){return{textDocument:l(e),position:f(t),context:{triggerKind:d(n.triggerKind),triggerCharacter:n.triggerCharacter}}},asWorkerPosition:f,asRange:g,asPosition:p,asDiagnosticSeverity:m,asDiagnostic:v,asDiagnostics:y,asCompletionItem:function(e){var t,n,a,u,l,c,h,d,f={label:e.label},p=e instanceof s.default?e:void 0;return e.detail&&(f.detail=e.detail),e.documentation&&(p&&"$string"!==p.documentationFormat?f.documentation=function(e,t){switch(e){case"$string":return t;case o.MarkupKind.PlainText:return{kind:e,value:t};case o.MarkupKind.Markdown:return{kind:e,value:t.value};default:return"Unsupported Markup content received. Kind is: "+e}}(p.documentationFormat,e.documentation):f.documentation=e.documentation),e.filterText&&(f.filterText=e.filterText),u=f,l=e,h=o.InsertTextFormat.PlainText,d=void 0,l.textEdit?(c=l.textEdit.newText,d=g(l.textEdit.range)):l.insertText instanceof i.SnippetString?(h=o.InsertTextFormat.Snippet,c=l.insertText.value):c=l.insertText,l.range&&(d=g(l.range)),u.insertTextFormat=h,l.fromEdit&&c&&d?u.textEdit={newText:c,range:d}:u.insertText=c,r.number(e.kind)&&(f.kind=(t=e.kind,void 0!==(n=p&&p.originalItemKind)?n:t+1)),e.sortText&&(f.sortText=e.sortText),e.additionalTextEdits&&(f.additionalTextEdits=null==(a=e.additionalTextEdits)?a:a.map(b)),e.commitCharacters&&(f.commitCharacters=e.commitCharacters.slice()),e.command&&(f.command=_(e.command)),!0!==e.preselect&&!1!==e.preselect||(f.preselect=e.preselect),p&&(void 0!==p.data&&(f.data=p.data),!0!==p.deprecated&&!1!==p.deprecated||(f.deprecated=p.deprecated)),f},asTextEdit:b,asReferenceParams:function(e,t,n){return{textDocument:l(e),position:f(t),context:{includeDeclaration:n.includeDeclaration}}},asCodeActionContext:function(e){return null==e?e:o.CodeActionContext.create(y(e.diagnostics),r.string(e.only)?[e.only]:void 0)},asCommand:_,asCodeLens:function(e){var t=o.CodeLens.create(g(e.range));return e.command&&(t.command=_(e.command)),e instanceof a.default&&e.data&&(t.data=e.data),t},asFormattingOptions:function(e){return{tabSize:e.tabSize,insertSpaces:e.insertSpaces}},asDocumentSymbolParams:function(e){return{textDocument:l(e)}},asCodeLensParams:function(e){return{textDocument:l(e)}},asDocumentLink:function(e){var t=o.DocumentLink.create(g(e.range));e.target&&(t.target=n(e.target));var i=e instanceof u.default?e:void 0;return i&&i.data&&(t.data=i.data),t},asDocumentLinkParams:function(e){return{textDocument:l(e)}}}}},4868:function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var r=n(6297),s=n(8330),a=n(9120),u=n(7850);function l(e,t){return void 0===e[t]&&(e[t]={}),e[t]}var c=function(e){function t(t){return e.call(this,t,u.DocumentColorRequest.type)||this}return o(t,e),t.prototype.fillClientCapabilities=function(e){l(l(e,"textDocument"),"colorProvider").dynamicRegistration=!0},t.prototype.initialize=function(e,t){if(e.colorProvider){var n=e.colorProvider,i=s.string(n.id)&&n.id.length>0?n.id:r.generateUuid(),o=n.documentSelector||t;o&&this.register(this.messages,{id:i,registerOptions:Object.assign({},{documentSelector:o})})}},t.prototype.registerLanguageProvider=function(e){var t=this,n=this._client,i=function(e,i,o){var r={color:e,textDocument:n.code2ProtocolConverter.asTextDocumentIdentifier(i.document),range:n.code2ProtocolConverter.asRange(i.range)};return n.sendRequest(u.ColorPresentationRequest.type,r,o).then(t.asColorPresentations.bind(t),(function(e){return n.logFailedRequest(u.ColorPresentationRequest.type,e),Promise.resolve(null)}))},o=function(e,i){var o={textDocument:n.code2ProtocolConverter.asTextDocumentIdentifier(e)};return n.sendRequest(u.DocumentColorRequest.type,o,i).then(t.asColorInformations.bind(t),(function(e){return n.logFailedRequest(u.ColorPresentationRequest.type,e),Promise.resolve(null)}))},r=n.clientOptions.middleware;return a.languages.registerColorProvider(e.documentSelector,{provideColorPresentations:function(e,t,n){return r.provideColorPresentations?r.provideColorPresentations(e,t,n,i):i(e,t,n)},provideDocumentColors:function(e,t){return r.provideDocumentColors?r.provideDocumentColors(e,t,o):o(e,t)}})},t.prototype.asColor=function(e){return new a.Color(e.red,e.green,e.blue,e.alpha)},t.prototype.asColorInformations=function(e){var t=this;return Array.isArray(e)?e.map((function(e){return new a.ColorInformation(t._client.protocol2CodeConverter.asRange(e.range),t.asColor(e.color))})):[]},t.prototype.asColorPresentations=function(e){var t=this;return Array.isArray(e)?e.map((function(e){var n=new a.ColorPresentation(e.label);return n.additionalTextEdits=t._client.protocol2CodeConverter.asTextEdits(e.additionalTextEdits),n.textEdit=t._client.protocol2CodeConverter.asTextEdit(e.textEdit),n})):[]},t}(n(2947).TextDocumentFeature);t.ColorProviderFeature=c},222:function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var r=n(6297),s=n(8330),a=n(9120),u=n(7850);function l(e,t){return void 0===e[t]&&(e[t]={}),e[t]}var c=function(e){function t(t){return e.call(this,t,u.FoldingRangeRequest.type)||this}return o(t,e),t.prototype.fillClientCapabilities=function(e){var t=l(l(e,"textDocument"),"foldingRange");t.dynamicRegistration=!0,t.rangeLimit=5e3,t.lineFoldingOnly=!0},t.prototype.initialize=function(e,t){if(e.foldingRangeProvider){var n=e.foldingRangeProvider,i=s.string(n.id)&&n.id.length>0?n.id:r.generateUuid(),o=n.documentSelector||t;o&&this.register(this.messages,{id:i,registerOptions:Object.assign({},{documentSelector:o})})}},t.prototype.registerLanguageProvider=function(e){var t=this,n=this._client,i=function(e,i,o){var r={textDocument:n.code2ProtocolConverter.asTextDocumentIdentifier(e)};return n.sendRequest(u.FoldingRangeRequest.type,r,o).then(t.asFoldingRanges.bind(t),(function(e){return n.logFailedRequest(u.FoldingRangeRequest.type,e),Promise.resolve(null)}))},o=n.clientOptions.middleware;return a.languages.registerFoldingRangeProvider(e.documentSelector,{provideFoldingRanges:function(e,t,n){return o.provideFoldingRanges?o.provideFoldingRanges(e,t,n,i):i(e,0,n)}})},t.prototype.asFoldingRangeKind=function(e){if(e)switch(e){case u.FoldingRangeKind.Comment:return a.FoldingRangeKind.Comment;case u.FoldingRangeKind.Imports:return a.FoldingRangeKind.Imports;case u.FoldingRangeKind.Region:return a.FoldingRangeKind.Region}},t.prototype.asFoldingRanges=function(e){var t=this;return Array.isArray(e)?e.map((function(e){return new a.FoldingRange(e.startLine,e.endLine,t.asFoldingRangeKind(e.kind))})):[]},t}(n(2947).TextDocumentFeature);t.FoldingRangeFeature=c},2117:function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var r=n(6297),s=n(8330),a=n(9120),u=n(7850);function l(e,t){return void 0===e[t]&&(e[t]={}),e[t]}var c=function(e){function t(t){return e.call(this,t,u.ImplementationRequest.type)||this}return o(t,e),t.prototype.fillClientCapabilities=function(e){l(l(e,"textDocument"),"implementation").dynamicRegistration=!0},t.prototype.initialize=function(e,t){if(e.implementationProvider)if(!0===e.implementationProvider){if(!t)return;this.register(this.messages,{id:r.generateUuid(),registerOptions:Object.assign({},{documentSelector:t})})}else{var n=e.implementationProvider,i=s.string(n.id)&&n.id.length>0?n.id:r.generateUuid(),o=n.documentSelector||t;o&&this.register(this.messages,{id:i,registerOptions:Object.assign({},{documentSelector:o})})}},t.prototype.registerLanguageProvider=function(e){var t=this._client,n=function(e,n,i){return t.sendRequest(u.ImplementationRequest.type,t.code2ProtocolConverter.asTextDocumentPositionParams(e,n),i).then(t.protocol2CodeConverter.asDefinitionResult,(function(e){return t.logFailedRequest(u.ImplementationRequest.type,e),Promise.resolve(null)}))},i=t.clientOptions.middleware;return a.languages.registerImplementationProvider(e.documentSelector,{provideImplementation:function(e,t,o){return i.provideImplementation?i.provideImplementation(e,t,o,n):n(e,t,o)}})},t}(n(2947).TextDocumentFeature);t.ImplementationFeature=c},237:function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){function t(t){return e.call(this,t)||this}return o(t,e),t}(n(9120).CodeLens);t.default=r},9653:function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){function t(t){return e.call(this,t)||this}return o(t,e),t}(n(9120).CompletionItem);t.default=r},9950:function(e,t,n){"use strict";var i=this&&this.__values||function(e){var t="function"==typeof Symbol&&e[Symbol.iterator],n=0;return t?t.call(e):{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}},o=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var i,o,r=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(i=r.next()).done;)s.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return s};Object.defineProperty(t,"__esModule",{value:!0});var r,s=n(9120),a=n(7850),u=n(8330),l=n(9653),c=n(237),h=n(1269);!function(e){e.is=function(e){var t=e;return t&&u.string(t.language)&&u.string(t.value)}}(r||(r={})),t.createConverter=function(e){var t=e||function(e){return s.Uri.parse(e)};function n(e){return t(e)}function d(e){return e.map(f)}function f(e){var t=new s.Diagnostic(m(e.range),e.message,v(e.severity));return(u.number(e.code)||u.string(e.code))&&(t.code=e.code),e.source&&(t.source=e.source),e.relatedInformation&&(t.relatedInformation=e.relatedInformation.map(p)),t}function p(e){return new s.DiagnosticRelatedInformation(I(e.location),e.message)}function g(e){if(e)return new s.Position(e.line,e.character)}function m(e){if(e)return new s.Range(g(e.start),g(e.end))}function v(e){if(null==e)return s.DiagnosticSeverity.Error;switch(e){case a.DiagnosticSeverity.Error:return s.DiagnosticSeverity.Error;case a.DiagnosticSeverity.Warning:return s.DiagnosticSeverity.Warning;case a.DiagnosticSeverity.Information:return s.DiagnosticSeverity.Information;case a.DiagnosticSeverity.Hint:return s.DiagnosticSeverity.Hint}return s.DiagnosticSeverity.Error}function y(e){if(u.string(e))return e;switch(e.kind){case a.MarkupKind.Markdown:return new s.MarkdownString(e.value);case a.MarkupKind.PlainText:return e.value;default:return"Unsupported Markup content received. Kind is: "+e.kind}}function b(e){var t=new l.default(e.label);e.detail&&(t.detail=e.detail),e.documentation&&(t.documentation=y(e.documentation),t.documentationFormat=u.string(e.documentation)?"$string":e.documentation.kind),e.filterText&&(t.filterText=e.filterText);var n,i=function(e){return e.textEdit?e.insertTextFormat===a.InsertTextFormat.Snippet?{text:new s.SnippetString(e.textEdit.newText),range:m(e.textEdit.range),fromEdit:!0}:{text:e.textEdit.newText,range:m(e.textEdit.range),fromEdit:!0}:e.insertText?e.insertTextFormat===a.InsertTextFormat.Snippet?{text:new s.SnippetString(e.insertText),fromEdit:!1}:{text:e.insertText,fromEdit:!1}:void 0}(e);if(i&&(t.insertText=i.text,t.range=i.range,t.fromEdit=i.fromEdit),u.number(e.kind)){var r=o((n=e.kind,a.CompletionItemKind.Text<=n&&n<=a.CompletionItemKind.TypeParameter?[n-1,void 0]:[s.CompletionItemKind.Text,n]),2),c=r[0],h=r[1];t.kind=c,h&&(t.originalItemKind=h)}return e.sortText&&(t.sortText=e.sortText),e.additionalTextEdits&&(t.additionalTextEdits=w(e.additionalTextEdits)),u.stringArray(e.commitCharacters)&&(t.commitCharacters=e.commitCharacters.slice()),e.command&&(t.command=E(e.command)),!0!==e.deprecated&&!1!==e.deprecated||(t.deprecated=e.deprecated),!0!==e.preselect&&!1!==e.preselect||(t.preselect=e.preselect),void 0!==e.data&&(t.data=e.data),t}function _(e){if(e)return new s.TextEdit(m(e.range),e.newText)}function w(e){if(e)return e.map(_)}function M(e){return e.map(C)}function C(e){var t=new s.SignatureInformation(e.label);return e.documentation&&(t.documentation=y(e.documentation)),e.parameters&&(t.parameters=S(e.parameters)),t}function S(e){return e.map(L)}function L(e){var t=new s.ParameterInformation(e.label);return e.documentation&&(t.documentation=y(e.documentation)),t}function I(e){if(e)return new s.Location(t(e.uri),m(e.range))}function N(e){var t=new s.DocumentHighlight(m(e.range));return u.number(e.kind)&&(t.kind=x(e.kind)),t}function x(e){switch(e){case a.DocumentHighlightKind.Text:return s.DocumentHighlightKind.Text;case a.DocumentHighlightKind.Read:return s.DocumentHighlightKind.Read;case a.DocumentHighlightKind.Write:return s.DocumentHighlightKind.Write}return s.DocumentHighlightKind.Text}function D(e){return e<=a.SymbolKind.TypeParameter?e-1:s.SymbolKind.Property}function k(e,n){var i=new s.SymbolInformation(e.name,D(e.kind),m(e.location.range),e.location.uri?t(e.location.uri):n);return e.containerName&&(i.containerName=e.containerName),i}function T(e){var t,n,o=new s.DocumentSymbol(e.name,void 0!==e.detail?e.detail:e.name,D(e.kind),m(e.range),m(e.selectionRange));if(void 0!==e.children&&e.children.length>0){var r=[];try{for(var a=i(e.children),u=a.next();!u.done;u=a.next()){var l=u.value;r.push(T(l))}}catch(e){t={error:e}}finally{try{u&&!u.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}o.children=r}return o}function E(e){var t={title:e.title,command:e.command};return e.arguments&&(t.arguments=e.arguments),t}var A=new Map;function j(e){if(e){var t=new c.default(m(e.range));return e.command&&(t.command=E(e.command)),void 0!==e.data&&null!==e.data&&(t.data=e.data),t}}function O(e){if(e){var n=new s.WorkspaceEdit;return e.documentChanges?e.documentChanges.forEach((function(e){n.set(t(e.textDocument.uri),w(e.edits))})):e.changes&&Object.keys(e.changes).forEach((function(i){n.set(t(i),w(e.changes[i]))})),n}}function R(e){var t=m(e.range),i=e.target?n(e.target):void 0,o=new h.default(t,i);return void 0!==e.data&&null!==e.data&&(o.data=e.data),o}function P(e){return new s.Color(e.red,e.green,e.blue,e.alpha)}function z(e){return new s.ColorInformation(m(e.range),P(e.color))}function W(e){var t=new s.ColorPresentation(e.label);return t.additionalTextEdits=w(e.additionalTextEdits),e.textEdit&&(t.textEdit=_(e.textEdit)),t}function F(e){if(e)switch(e){case a.FoldingRangeKind.Comment:return s.FoldingRangeKind.Comment;case a.FoldingRangeKind.Imports:return s.FoldingRangeKind.Imports;case a.FoldingRangeKind.Region:return s.FoldingRangeKind.Region}}function B(e){return new s.FoldingRange(e.startLine,e.endLine,F(e.kind))}return A.set("",s.CodeActionKind.Empty),A.set(a.CodeActionKind.QuickFix,s.CodeActionKind.QuickFix),A.set(a.CodeActionKind.Refactor,s.CodeActionKind.Refactor),A.set(a.CodeActionKind.RefactorExtract,s.CodeActionKind.RefactorExtract),A.set(a.CodeActionKind.RefactorInline,s.CodeActionKind.RefactorInline),A.set(a.CodeActionKind.RefactorRewrite,s.CodeActionKind.RefactorRewrite),A.set(a.CodeActionKind.Source,s.CodeActionKind.Source),A.set(a.CodeActionKind.SourceOrganizeImports,s.CodeActionKind.SourceOrganizeImports),{asUri:n,asDiagnostics:d,asDiagnostic:f,asRange:m,asPosition:g,asDiagnosticSeverity:v,asHover:function(e){if(e)return new s.Hover(function(e){var t,n;if(u.string(e))return new s.MarkdownString(e);if(r.is(e))return(o=new s.MarkdownString).appendCodeblock(e.value,e.language);if(Array.isArray(e)){var o=[];try{for(var l=i(e),c=l.next();!c.done;c=l.next()){var h=c.value,d=new s.MarkdownString;r.is(h)?d.appendCodeblock(h.value,h.language):d.appendMarkdown(h),o.push(d)}}catch(e){t={error:e}}finally{try{c&&!c.done&&(n=l.return)&&n.call(l)}finally{if(t)throw t.error}}return o}switch(o=void 0,e.kind){case a.MarkupKind.Markdown:return new s.MarkdownString(e.value);case a.MarkupKind.PlainText:return(o=new s.MarkdownString).appendText(e.value),o;default:return(o=new s.MarkdownString).appendText("Unsupported Markup content received. Kind is: "+e.kind),o}}(e.contents),m(e.range))},asCompletionResult:function(e){if(e){if(Array.isArray(e))return e.map(b);var t=e;return new s.CompletionList(t.items.map(b),t.isIncomplete)}},asCompletionItem:b,asTextEdit:_,asTextEdits:w,asSignatureHelp:function(e){if(e){var t=new s.SignatureHelp;return u.number(e.activeSignature)?t.activeSignature=e.activeSignature:t.activeSignature=0,u.number(e.activeParameter)?t.activeParameter=e.activeParameter:t.activeParameter=0,e.signatures&&(t.signatures=M(e.signatures)),t}},asSignatureInformations:M,asSignatureInformation:C,asParameterInformations:S,asParameterInformation:L,asDefinitionResult:function(e){if(e)return u.array(e)?e.map((function(e){return I(e)})):I(e)},asLocation:I,asReferences:function(e){if(e)return e.map((function(e){return I(e)}))},asDocumentHighlights:function(e){if(e)return e.map(N)},asDocumentHighlight:N,asDocumentHighlightKind:x,asSymbolInformations:function(e,t){if(e)return e.map((function(e){return k(e,t)}))},asSymbolInformation:k,asDocumentSymbols:function(e){if(null!=e)return e.map(T)},asDocumentSymbol:T,asCommand:E,asCommands:function(e){if(e)return e.map(E)},asCodeAction:function(e){if(null!=e){var t=new s.CodeAction(e.title);return void 0!==e.kind&&(t.kind=function(e){var t,n;if(null!=e){var o=A.get(e);if(o)return o;var r=e.split(".");o=s.CodeActionKind.Empty;try{for(var a=i(r),u=a.next();!u.done;u=a.next()){var l=u.value;o=o.append(l)}}catch(e){t={error:e}}finally{try{u&&!u.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}return o}}(e.kind)),e.diagnostics&&(t.diagnostics=d(e.diagnostics)),e.edit&&(t.edit=O(e.edit)),e.command&&(t.command=E(e.command)),t}},asCodeLens:j,asCodeLenses:function(e){if(e)return e.map((function(e){return j(e)}))},asWorkspaceEdit:O,asDocumentLink:R,asDocumentLinks:function(e){if(e)return e.map(R)},asFoldingRangeKind:F,asFoldingRange:B,asFoldingRanges:function(e){if(Array.isArray(e))return e.map(B)},asColor:P,asColorInformation:z,asColorInformations:function(e){if(Array.isArray(e))return e.map(z)},asColorPresentation:W,asColorPresentations:function(e){if(Array.isArray(e))return e.map(W)}}}},1269:function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){function t(t,n){return e.call(this,t,n)||this}return o(t,e),t}(n(9120).DocumentLink);t.default=r},1585:function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var r=n(6297),s=n(8330),a=n(9120),u=n(7850);function l(e,t){return void 0===e[t]&&(e[t]={}),e[t]}var c=function(e){function t(t){return e.call(this,t,u.TypeDefinitionRequest.type)||this}return o(t,e),t.prototype.fillClientCapabilities=function(e){l(l(e,"textDocument"),"typeDefinition").dynamicRegistration=!0},t.prototype.initialize=function(e,t){if(e.typeDefinitionProvider)if(!0===e.typeDefinitionProvider){if(!t)return;this.register(this.messages,{id:r.generateUuid(),registerOptions:Object.assign({},{documentSelector:t})})}else{var n=e.typeDefinitionProvider,i=s.string(n.id)&&n.id.length>0?n.id:r.generateUuid(),o=n.documentSelector||t;o&&this.register(this.messages,{id:i,registerOptions:Object.assign({},{documentSelector:o})})}},t.prototype.registerLanguageProvider=function(e){var t=this._client,n=function(e,n,i){return t.sendRequest(u.TypeDefinitionRequest.type,t.code2ProtocolConverter.asTextDocumentPositionParams(e,n),i).then(t.protocol2CodeConverter.asDefinitionResult,(function(e){return t.logFailedRequest(u.TypeDefinitionRequest.type,e),Promise.resolve(null)}))},i=t.clientOptions.middleware;return a.languages.registerTypeDefinitionProvider(e.documentSelector,{provideTypeDefinition:function(e,t,o){return i.provideTypeDefinition?i.provideTypeDefinition(e,t,o,n):n(e,t,o)}})},t}(n(2947).TextDocumentFeature);t.TypeDefinitionFeature=c},5200:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e){this.defaultDelay=e,this.timeout=void 0,this.completionPromise=void 0,this.onSuccess=void 0,this.task=void 0}return e.prototype.trigger=function(e,t){var n=this;return void 0===t&&(t=this.defaultDelay),this.task=e,t>=0&&this.cancelTimeout(),this.completionPromise||(this.completionPromise=new Promise((function(e){n.onSuccess=e})).then((function(){n.completionPromise=void 0,n.onSuccess=void 0;var e=n.task();return n.task=void 0,e}))),(t>=0||void 0===this.timeout)&&(this.timeout=setTimeout((function(){n.timeout=void 0,n.onSuccess(void 0)}),t>=0?t:this.defaultDelay)),this.completionPromise},e.prototype.forceDelivery=function(){if(this.completionPromise){this.cancelTimeout();var e=this.task();return this.completionPromise=void 0,this.onSuccess=void 0,this.task=void 0,e}},e.prototype.isTriggered=function(){return void 0!==this.timeout},e.prototype.cancel=function(){this.cancelTimeout(),this.completionPromise=void 0},e.prototype.cancelTimeout=function(){void 0!==this.timeout&&(clearTimeout(this.timeout),this.timeout=void 0)},e}();t.Delayer=n},8330:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=Object.prototype.toString;function i(e){return"[object String]"===n.call(e)}function o(e){return"[object Function]"===n.call(e)}function r(e){return Array.isArray(e)}t.boolean=function(e){return!0===e||!1===e},t.string=i,t.number=function(e){return"[object Number]"===n.call(e)},t.error=function(e){return"[object Error]"===n.call(e)},t.func=o,t.array=r,t.stringArray=function(e){return r(e)&&e.every((function(e){return i(e)}))},t.typedArray=function(e,t){return Array.isArray(e)&&e.every(t)},t.thenable=function(e){return e&&o(e.then)}},6297:function(e,t){"use strict";var n,i=this&&this.__extends||(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function i(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)});Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e){this._value=e}return e.prototype.asHex=function(){return this._value},e.prototype.equals=function(e){return this.asHex()===e.asHex()},e}(),r=function(e){function t(){return e.call(this,[t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),"-",t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),"-","4",t._randomHex(),t._randomHex(),t._randomHex(),"-",t._oneOf(t._timeHighBits),t._randomHex(),t._randomHex(),t._randomHex(),"-",t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex()].join(""))||this}return i(t,e),t._oneOf=function(e){return e[Math.floor(e.length*Math.random())]},t._randomHex=function(){return t._oneOf(t._chars)},t._chars=["0","1","2","3","4","5","6","6","7","8","9","a","b","c","d","e","f"],t._timeHighBits=["8","9","a","b"],t}(o);function s(){return new r}t.empty=new o("00000000-0000-0000-0000-000000000000"),t.v4=s;var a=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function u(e){return a.test(e)}t.isUUID=u,t.parse=function(e){if(!u(e))throw new Error("invalid uuid");return new o(e)},t.generateUuid=function(){return s().asHex()}},8822:function(e,t,n){"use strict";var i=this&&this.__values||function(e){var t="function"==typeof Symbol&&e[Symbol.iterator],n=0;return t?t.call(e):{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}};Object.defineProperty(t,"__esModule",{value:!0});var o=n(6297),r=n(9120),s=n(7850);function a(e,t){if(void 0!==e)return e[t]}var u=function(){function e(e){this._client=e,this._listeners=new Map}return Object.defineProperty(e.prototype,"messages",{get:function(){return s.DidChangeWorkspaceFoldersNotification.type},enumerable:!0,configurable:!0}),e.prototype.fillInitializeParams=function(e){var t=this,n=r.workspace.workspaceFolders;e.workspaceFolders=void 0===n?null:n.map((function(e){return t.asProtocol(e)}))},e.prototype.fillClientCapabilities=function(e){e.workspace=e.workspace||{},e.workspace.workspaceFolders=!0},e.prototype.initialize=function(e){var t=this,n=this._client;n.onRequest(s.WorkspaceFoldersRequest.type,(function(e){var i=function(){var e=r.workspace.workspaceFolders;return void 0===e?null:e.map((function(e){return t.asProtocol(e)}))},o=n.clientOptions.middleware.workspace;return o&&o.workspaceFolders?o.workspaceFolders(e,i):i()}));var i,u=a(a(a(e,"workspace"),"workspaceFolders"),"changeNotifications");"string"==typeof u?i=u:!0===u&&(i=o.generateUuid()),i&&this.register(this.messages,{id:i,registerOptions:void 0})},e.prototype.register=function(e,t){var n=this,i=t.id,o=this._client,a=r.workspace.onDidChangeWorkspaceFolders((function(e){var t=function(e){var t={event:{added:e.added.map((function(e){return n.asProtocol(e)})),removed:e.removed.map((function(e){return n.asProtocol(e)}))}};n._client.sendNotification(s.DidChangeWorkspaceFoldersNotification.type,t)},i=o.clientOptions.middleware.workspace;i&&i.didChangeWorkspaceFolders?i.didChangeWorkspaceFolders(e,t):t(e)}));this._listeners.set(i,a)},e.prototype.unregister=function(e){var t=this._listeners.get(e);void 0!==t&&(this._listeners.delete(e),t.dispose())},e.prototype.dispose=function(){var e,t;try{for(var n=i(this._listeners.values()),o=n.next();!o.done;o=n.next())o.value.dispose()}catch(t){e={error:t}}finally{try{o&&!o.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}}this._listeners.clear()},e.prototype.asProtocol=function(e){return void 0===e?null:{uri:this._client.code2ProtocolConverter.asUri(e.uri),name:e.name}},e}();t.WorkspaceFoldersFeature=u},1875:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(2149),o=n(5704);var r;!function(e){e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:i.Event.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:i.Event.None}),e.is=function(t){let n=t;return n&&(n===e.None||n===e.Cancelled||o.boolean(n.isCancellationRequested)&&!!n.onCancellationRequested)}}(r=t.CancellationToken||(t.CancellationToken={}));const s=Object.freeze((function(e,t){let n=setTimeout(e.bind(t),0);return{dispose(){clearTimeout(n)}}}));class a{constructor(){this._isCancelled=!1}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this._emitter=void 0))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?s:(this._emitter||(this._emitter=new i.Emitter),this._emitter.event)}}t.CancellationTokenSource=class{get token(){return this._token||(this._token=new a),this._token}cancel(){this._token?this._token.cancel():this._token=r.Cancelled}dispose(){this.cancel()}}},2149:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),(t.Disposable||(t.Disposable={})).create=function(e){return{dispose:e}},function(e){const t={dispose(){}};e.None=function(){return t}}(t.Event||(t.Event={}));class n{add(e,t=null,n){this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(e),this._contexts.push(t),Array.isArray(n)&&n.push({dispose:()=>this.remove(e,t)})}remove(e,t=null){if(this._callbacks){for(var n=!1,i=0,o=this._callbacks.length;i{let r;return this._callbacks||(this._callbacks=new n),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(e,t),r={dispose:()=>{this._callbacks.remove(e,t),r.dispose=i._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this)}},Array.isArray(o)&&o.push(r),r}),this._event}fire(e){this._callbacks&&this._callbacks.invoke.call(this._callbacks,e)}dispose(){this._callbacks&&(this._callbacks.dispose(),this._callbacks=void 0)}}i._noop=function(){},t.Emitter=i},5704:(e,t)=>{"use strict";function n(e){return"string"==typeof e||e instanceof String}function i(e){return Array.isArray(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.boolean=function(e){return!0===e||!1===e},t.string=n,t.number=function(e){return"number"==typeof e||e instanceof Number},t.error=function(e){return e instanceof Error},t.func=function(e){return"function"==typeof e},t.array=i,t.stringArray=function(e){return i(e)&&e.every((e=>n(e)))}},8003:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.None=0,e.First=1,e.Last=2}(n=t.Touch||(t.Touch={})),t.LinkedMap=class{constructor(){this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}has(e){return this._map.has(e)}get(e){const t=this._map.get(e);if(t)return t.value}set(e,t,i=n.None){let o=this._map.get(e);if(o)o.value=t,i!==n.None&&this.touch(o,i);else{switch(o={key:e,value:t,next:void 0,previous:void 0},i){case n.None:this.addItemLast(o);break;case n.First:this.addItemFirst(o);break;case n.Last:default:this.addItemLast(o)}this._map.set(e,o),this._size++}}delete(e){const t=this._map.get(e);return!!t&&(this._map.delete(e),this.removeItem(t),this._size--,!0)}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");const e=this._head;return this._map.delete(e.key),this.removeItem(e),this._size--,e.value}forEach(e,t){let n=this._head;for(;n;)t?e.bind(t)(n.value,n.key,this):e(n.value,n.key,this),n=n.next}forEachReverse(e,t){let n=this._tail;for(;n;)t?e.bind(t)(n.value,n.key,this):e(n.value,n.key,this),n=n.previous}values(){let e=[],t=this._head;for(;t;)e.push(t.value),t=t.next;return e}keys(){let e=[],t=this._head;for(;t;)e.push(t.key),t=t.next;return e}addItemFirst(e){if(this._head||this._tail){if(!this._head)throw new Error("Invalid list");e.next=this._head,this._head.previous=e}else this._tail=e;this._head=e}addItemLast(e){if(this._head||this._tail){if(!this._tail)throw new Error("Invalid list");e.previous=this._tail,this._tail.next=e}else this._head=e;this._tail=e}removeItem(e){if(e===this._head&&e===this._tail)this._head=void 0,this._tail=void 0;else if(e===this._head)this._head=e.next;else if(e===this._tail)this._tail=e.previous;else{const t=e.next,n=e.previous;if(!t||!n)throw new Error("Invalid list");t.previous=n,n.next=t}}touch(e,t){if(!this._head||!this._tail)throw new Error("Invalid list");if(t===n.First||t===n.Last)if(t===n.First){if(e===this._head)return;const t=e.next,n=e.previous;e===this._tail?(n.next=void 0,this._tail=n):(t.previous=n,n.next=t),e.previous=void 0,e.next=this._head,this._head.previous=e,this._head=e}else if(t===n.Last){if(e===this._tail)return;const t=e.next,n=e.previous;e===this._head?(t.previous=void 0,this._head=t):(t.previous=n,n.next=t),e.next=void 0,e.previous=this._tail,this._tail.next=e,this._tail=e}}}},9449:(e,t,n)=>{"use strict";var i=n(7188).setImmedate;function o(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}Object.defineProperty(t,"__esModule",{value:!0});const r=n(5704),s=n(8420);t.RequestType=s.RequestType,t.RequestType0=s.RequestType0,t.RequestType1=s.RequestType1,t.RequestType2=s.RequestType2,t.RequestType3=s.RequestType3,t.RequestType4=s.RequestType4,t.RequestType5=s.RequestType5,t.RequestType6=s.RequestType6,t.RequestType7=s.RequestType7,t.RequestType8=s.RequestType8,t.RequestType9=s.RequestType9,t.ResponseError=s.ResponseError,t.ErrorCodes=s.ErrorCodes,t.NotificationType=s.NotificationType,t.NotificationType0=s.NotificationType0,t.NotificationType1=s.NotificationType1,t.NotificationType2=s.NotificationType2,t.NotificationType3=s.NotificationType3,t.NotificationType4=s.NotificationType4,t.NotificationType5=s.NotificationType5,t.NotificationType6=s.NotificationType6,t.NotificationType7=s.NotificationType7,t.NotificationType8=s.NotificationType8,t.NotificationType9=s.NotificationType9;const a=n(9722);t.MessageReader=a.MessageReader,t.StreamMessageReader=a.StreamMessageReader,t.IPCMessageReader=a.IPCMessageReader,t.SocketMessageReader=a.SocketMessageReader;const u=n(2794);t.MessageWriter=u.MessageWriter,t.StreamMessageWriter=u.StreamMessageWriter,t.IPCMessageWriter=u.IPCMessageWriter,t.SocketMessageWriter=u.SocketMessageWriter;const l=n(2149);t.Disposable=l.Disposable,t.Event=l.Event,t.Emitter=l.Emitter;const c=n(1875);t.CancellationTokenSource=c.CancellationTokenSource,t.CancellationToken=c.CancellationToken;const h=n(8003);var d,f,p,g,m,v,y;o(n(6849)),o(n(5134)),function(e){e.type=new s.NotificationType("$/cancelRequest")}(d||(d={})),t.NullLogger=Object.freeze({error:()=>{},warn:()=>{},info:()=>{},log:()=>{}}),function(e){e[e.Off=0]="Off",e[e.Messages=1]="Messages",e[e.Verbose=2]="Verbose"}(f=t.Trace||(t.Trace={})),function(e){e.fromString=function(t){switch(t=t.toLowerCase()){case"off":default:return e.Off;case"messages":return e.Messages;case"verbose":return e.Verbose}},e.toString=function(t){switch(t){case e.Off:return"off";case e.Messages:return"messages";case e.Verbose:return"verbose";default:return"off"}}}(f=t.Trace||(t.Trace={})),function(e){e.Text="text",e.JSON="json"}(t.TraceFormat||(t.TraceFormat={})),function(e){e.fromString=function(t){return"json"===(t=t.toLowerCase())?e.JSON:e.Text}}(p=t.TraceFormat||(t.TraceFormat={})),function(e){e.type=new s.NotificationType("$/setTraceNotification")}(g=t.SetTraceNotification||(t.SetTraceNotification={})),function(e){e.type=new s.NotificationType("$/logTraceNotification")}(m=t.LogTraceNotification||(t.LogTraceNotification={})),function(e){e[e.Closed=1]="Closed",e[e.Disposed=2]="Disposed",e[e.AlreadyListening=3]="AlreadyListening"}(v=t.ConnectionErrors||(t.ConnectionErrors={}));class b extends Error{constructor(e,t){super(t),this.code=e,Object.setPrototypeOf(this,b.prototype)}}function _(e,t,n,o){let a=0,u=0,_=0;const w="2.0";let M,C,S,L,I=Object.create(null),N=Object.create(null),x=new h.LinkedMap,D=Object.create(null),k=Object.create(null),T=f.Off,E=p.Text,A=y.New,j=new l.Emitter,O=new l.Emitter,R=new l.Emitter,P=new l.Emitter;function z(e){return"req-"+e.toString()}function W(e){}function F(){return A===y.Listening}function B(){return A===y.Closed}function H(){return A===y.Disposed}function V(){A!==y.New&&A!==y.Listening||(A=y.Closed,O.fire(void 0))}function U(){S||0===x.size||(S=i((()=>{S=void 0,function(){if(0===x.size)return;let e=x.shift();try{s.isRequestMessage(e)?function(e){if(H())return;function n(n,i,o){let r={jsonrpc:w,id:e.id};n instanceof s.ResponseError?r.error=n.toJson():r.result=void 0===n?null:n,Z(r,i,o),t.write(r)}function i(n,i,o){let r={jsonrpc:w,id:e.id,error:n.toJson()};Z(r,i,o),t.write(r)}!function(e){if(T!==f.Off&&L)if(E===p.Text){let t;T===f.Verbose&&e.params&&(t=`Params: ${JSON.stringify(e.params,null,4)}\n\n`),L.log(`Received request '${e.method} - (${e.id})'.`,t)}else G("receive-request",e)}(e);let o,a,u=I[e.method];u&&(o=u.type,a=u.handler);let l=Date.now();if(a||M){let u=new c.CancellationTokenSource,h=String(e.id);k[h]=u;try{let c;c=void 0===e.params||void 0!==o&&0===o.numberOfParams?a?a(u.token):M(e.method,u.token):r.array(e.params)&&(void 0===o||o.numberOfParams>1)?a?a(...e.params,u.token):M(e.method,...e.params,u.token):a?a(e.params,u.token):M(e.method,e.params,u.token);let d=c;c?d.then?d.then((t=>{delete k[h],n(t,e.method,l)}),(t=>{delete k[h],t instanceof s.ResponseError?i(t,e.method,l):t&&r.string(t.message)?i(new s.ResponseError(s.ErrorCodes.InternalError,`Request ${e.method} failed with message: ${t.message}`),e.method,l):i(new s.ResponseError(s.ErrorCodes.InternalError,`Request ${e.method} failed unexpectedly without providing any details.`),e.method,l)})):(delete k[h],n(c,e.method,l)):(delete k[h],function(n,i,o){void 0===n&&(n=null);let r={jsonrpc:w,id:e.id,result:n};Z(r,i,o),t.write(r)}(c,e.method,l))}catch(t){delete k[h],t instanceof s.ResponseError?n(t,e.method,l):t&&r.string(t.message)?i(new s.ResponseError(s.ErrorCodes.InternalError,`Request ${e.method} failed with message: ${t.message}`),e.method,l):i(new s.ResponseError(s.ErrorCodes.InternalError,`Request ${e.method} failed unexpectedly without providing any details.`),e.method,l)}}else i(new s.ResponseError(s.ErrorCodes.MethodNotFound,`Unhandled method ${e.method}`),e.method,l)}(e):s.isNotificationMessage(e)?function(e){if(H())return;let t,i;if(e.method===d.type.method)i=e=>{let t=e.id,n=k[String(t)];n&&n.cancel()};else{let n=N[e.method];n&&(i=n.handler,t=n.type)}if(i||C)try{!function(e){if(T!==f.Off&&L&&e.method!==m.type.method)if(E===p.Text){let t;T===f.Verbose&&(t=e.params?`Params: ${JSON.stringify(e.params,null,4)}\n\n`:"No parameters provided.\n\n"),L.log(`Received notification '${e.method}'.`,t)}else G("receive-notification",e)}(e),void 0===e.params||void 0!==t&&0===t.numberOfParams?i?i():C(e.method):r.array(e.params)&&(void 0===t||t.numberOfParams>1)?i?i(...e.params):C(e.method,...e.params):i?i(e.params):C(e.method,e.params)}catch(t){t.message?n.error(`Notification handler '${e.method}' failed with message: ${t.message}`):n.error(`Notification handler '${e.method}' failed unexpectedly.`)}else R.fire(e)}(e):s.isResponseMessage(e)?function(e){if(!H())if(null===e.id)e.error?n.error(`Received response message without id: Error is: \n${JSON.stringify(e.error,void 0,4)}`):n.error("Received response message without id. No further error information provided.");else{let t=String(e.id),i=D[t];if(function(e,t){if(T!==f.Off&&L)if(E===p.Text){let n;if(T===f.Verbose&&(e.error&&e.error.data?n=`Error data: ${JSON.stringify(e.error.data,null,4)}\n\n`:e.result?n=`Result: ${JSON.stringify(e.result,null,4)}\n\n`:void 0===e.error&&(n="No result returned.\n\n")),t){let i=e.error?` Request failed: ${e.error.message} (${e.error.code}).`:"";L.log(`Received response '${t.method} - (${e.id})' in ${Date.now()-t.timerStart}ms.${i}`,n)}else L.log(`Received response ${e.id} without active response promise.`,n)}else G("receive-response",e)}(e,i),i){delete D[t];try{if(e.error){let t=e.error;i.reject(new s.ResponseError(t.code,t.message,t.data))}else{if(void 0===e.result)throw new Error("Should never happen.");i.resolve(e.result)}}catch(e){e.message?n.error(`Response handler '${i.method}' failed with message: ${e.message}`):n.error(`Response handler '${i.method}' failed unexpectedly.`)}}}}(e):function(e){if(!e)return void n.error("Received empty message.");n.error(`Received message which is neither a response nor a notification message:\n${JSON.stringify(e,null,4)}`);let t=e;if(r.string(t.id)||r.number(t.id)){let e=String(t.id),n=D[e];n&&n.reject(new Error("The received response has neither a result nor an error property."))}}(e)}finally{U()}}()})))}e.onClose(V),e.onError((function(e){j.fire([e,void 0,void 0])})),t.onClose(V),t.onError((function(e){j.fire(e)}));let Y=e=>{try{if(s.isNotificationMessage(e)&&e.method===d.type.method){let n=z(e.params.id),i=x.get(n);if(s.isRequestMessage(i)){let r=o&&o.cancelUndispatched?o.cancelUndispatched(i,W):void 0;if(r&&(void 0!==r.error||void 0!==r.result))return x.delete(n),r.id=i.id,Z(r,e.method,Date.now()),void t.write(r)}}!function(e,t){var n;s.isRequestMessage(t)?e.set(z(t.id),t):s.isResponseMessage(t)?e.set(null===(n=t.id)?"res-unknown-"+(++_).toString():"res-"+n.toString(),t):e.set("not-"+(++u).toString(),t)}(x,e)}finally{U()}};function Z(e,t,n){if(T!==f.Off&&L)if(E===p.Text){let i;T===f.Verbose&&(e.error&&e.error.data?i=`Error data: ${JSON.stringify(e.error.data,null,4)}\n\n`:e.result?i=`Result: ${JSON.stringify(e.result,null,4)}\n\n`:void 0===e.error&&(i="No result returned.\n\n")),L.log(`Sending response '${t} - (${e.id})'. Processing request took ${Date.now()-n}ms`,i)}else G("send-response",e)}function G(e,t){if(!L||T===f.Off)return;const n={isLSPMessage:!0,type:e,message:t,timestamp:Date.now()};L.log(n)}function Q(){if(B())throw new b(v.Closed,"Connection is closed.");if(H())throw new b(v.Disposed,"Connection is disposed.")}function q(e){return void 0===e?null:e}function K(e,t){let n,i=e.numberOfParams;switch(i){case 0:n=null;break;case 1:n=q(t[0]);break;default:n=[];for(let e=0;e{let i,o;if(Q(),r.string(e))switch(i=e,n.length){case 0:o=null;break;case 1:o=n[0];break;default:o=n}else i=e.method,o=K(e,n);let s={jsonrpc:w,method:i,params:o};!function(e){if(T!==f.Off&&L)if(E===p.Text){let t;T===f.Verbose&&(t=e.params?`Params: ${JSON.stringify(e.params,null,4)}\n\n`:"No parameters provided.\n\n"),L.log(`Sending notification '${e.method}'.`,t)}else G("send-notification",e)}(s),t.write(s)},onNotification:(e,t)=>{Q(),r.func(e)?C=e:t&&(r.string(e)?N[e]={type:void 0,handler:t}:N[e.method]={type:e,handler:t})},sendRequest:(e,...n)=>{let i,o,u;if(Q(),function(){if(!F())throw new Error("Call listen() first.")}(),r.string(e))switch(i=e,n.length){case 0:o=null;break;case 1:c.CancellationToken.is(n[0])?(o=null,u=n[0]):o=q(n[0]);break;default:const e=n.length-1;c.CancellationToken.is(n[e])?(u=n[e],o=2===n.length?q(n[0]):n.slice(0,e).map((e=>q(e)))):o=n.map((e=>q(e)))}else{i=e.method,o=K(e,n);let t=e.numberOfParams;u=c.CancellationToken.is(n[t])?n[t]:void 0}let l=a++,h=new Promise(((e,n)=>{let r={jsonrpc:w,id:l,method:i,params:o},a={method:i,timerStart:Date.now(),resolve:e,reject:n};!function(e){if(T!==f.Off&&L)if(E===p.Text){let t;T===f.Verbose&&e.params&&(t=`Params: ${JSON.stringify(e.params,null,4)}\n\n`),L.log(`Sending request '${e.method} - (${e.id})'.`,t)}else G("send-request",e)}(r);try{t.write(r)}catch(e){a.reject(new s.ResponseError(s.ErrorCodes.MessageWriteError,e.message?e.message:"Unknown reason")),a=null}a&&(D[String(l)]=a)}));return u&&u.onCancellationRequested((()=>{J.sendNotification(d.type,{id:l})})),h},onRequest:(e,t)=>{Q(),r.func(e)?M=e:t&&(r.string(e)?I[e]={type:void 0,handler:t}:I[e.method]={type:e,handler:t})},trace:(e,t,n)=>{let i=!1,o=p.Text;void 0!==n&&(r.boolean(n)?i=n:(i=n.sendNotification||!1,o=n.traceFormat||p.Text)),T=e,E=o,L=T===f.Off?void 0:t,!i||B()||H()||J.sendNotification(g.type,{value:f.toString(e)})},onError:j.event,onClose:O.event,onUnhandledNotification:R.event,onDispose:P.event,dispose:()=>{if(H())return;A=y.Disposed,P.fire(void 0);let n=new Error("Connection got disposed.");Object.keys(D).forEach((e=>{D[e].reject(n)})),D=Object.create(null),k=Object.create(null),x=new h.LinkedMap,r.func(t.dispose)&&t.dispose(),r.func(e.dispose)&&e.dispose()},listen:()=>{Q(),function(){if(F())throw new b(v.AlreadyListening,"Connection is already listening")}(),A=y.Listening,e.listen(Y)},inspect:()=>{console.log("inspect")}};return J.onNotification(m.type,(e=>{T!==f.Off&&L&&L.log(e.message,T===f.Verbose?e.verbose:void 0)})),J}t.ConnectionError=b,(t.ConnectionStrategy||(t.ConnectionStrategy={})).is=function(e){let t=e;return t&&r.func(t.cancelUndispatched)},function(e){e[e.New=1]="New",e[e.Listening=2]="Listening",e[e.Closed=3]="Closed",e[e.Disposed=4]="Disposed"}(y||(y={})),t.createMessageConnection=function(e,n,i,o){i||(i=t.NullLogger);let r=void 0!==(s=e).listen&&void 0===s.read?e:new a.StreamMessageReader(e);var s;let l=function(e){return void 0!==e.write&&void 0===e.end}(n)?n:new u.StreamMessageWriter(n);return _(r,l,i,o)}},9722:(e,t,n)=>{"use strict";var i=n(1278).Buffer;Object.defineProperty(t,"__esModule",{value:!0});const o=n(2149),r=n(5704);let s=8192,a=i.from("\r","ascii")[0],u=i.from("\n","ascii")[0];class l{constructor(e="utf8"){this.encoding=e,this.index=0,this.buffer=i.allocUnsafe(s)}append(e){var t=e;if("string"==typeof e){var n=e,o=i.byteLength(n,this.encoding);(t=i.allocUnsafe(o)).write(n,0,o,this.encoding)}if(this.buffer.length-this.index>=t.length)t.copy(this.buffer,this.index,0,t.length);else{var r=(Math.ceil((this.index+t.length)/s)+1)*s;0===this.index?(this.buffer=i.allocUnsafe(r),t.copy(this.buffer,0,0,t.length)):this.buffer=i.concat([this.buffer.slice(0,this.index),t],r)}this.index+=t.length}tryReadHeaders(){let e,t=0;for(;t+3=this.index)return e;e=Object.create(null),this.buffer.toString("ascii",0,t).split("\r\n").forEach((t=>{let n=t.indexOf(":");if(-1===n)throw new Error("Message header must separate key and value using :");let i=t.substr(0,n),o=t.substr(n+1).trim();e[i]=o}));let n=t+4;return this.buffer=this.buffer.slice(n),this.index=this.index-n,e}tryReadContent(e){if(this.index{this.onData(e)})),this.readable.on("error",(e=>this.fireError(e))),this.readable.on("close",(()=>this.fireClose()))}onData(e){for(this.buffer.append(e);;){if(-1===this.nextMessageLength){let e=this.buffer.tryReadHeaders();if(!e)return;let t=e["Content-Length"];if(!t)throw new Error("Header must provide a Content-Length property.");let n=parseInt(t);if(isNaN(n))throw new Error("Content-Length value must be a number.");this.nextMessageLength=n}var t=this.buffer.tryReadContent(this.nextMessageLength);if(null===t)return void this.setPartialMessageTimer();this.clearPartialMessageTimer(),this.nextMessageLength=-1,this.messageToken++;var n=JSON.parse(t);this.callback(n)}}clearPartialMessageTimer(){this.partialMessageTimer&&(clearTimeout(this.partialMessageTimer),this.partialMessageTimer=void 0)}setPartialMessageTimer(){this.clearPartialMessageTimer(),this._partialMessageTimeout<=0||(this.partialMessageTimer=setTimeout(((e,t)=>{this.partialMessageTimer=void 0,e===this.messageToken&&(this.firePartialMessage({messageToken:e,waitingTime:t}),this.setPartialMessageTimer())}),this._partialMessageTimeout,this.messageToken,this._partialMessageTimeout))}}t.StreamMessageReader=h,t.IPCMessageReader=class extends c{constructor(e){super(),this.process=e;let t=this.process;t.on("error",(e=>this.fireError(e))),t.on("close",(()=>this.fireClose()))}listen(e){this.process.on("message",e)}},t.SocketMessageReader=class extends h{constructor(e,t="utf-8"){super(e,t)}}},2794:(e,t,n)=>{"use strict";var i=n(1278).Buffer;Object.defineProperty(t,"__esModule",{value:!0});const o=n(2149),r=n(5704);let s="Content-Length: ",a="\r\n";(t.MessageWriter||(t.MessageWriter={})).is=function(e){let t=e;return t&&r.func(t.dispose)&&r.func(t.onClose)&&r.func(t.onError)&&r.func(t.write)};class u{constructor(){this.errorEmitter=new o.Emitter,this.closeEmitter=new o.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(e,t,n){this.errorEmitter.fire([this.asError(e),t,n])}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}asError(e){return e instanceof Error?e:new Error(`Writer recevied error. Reason: ${r.string(e.message)?e.message:"unknown"}`)}}t.AbstractMessageWriter=u,t.StreamMessageWriter=class extends u{constructor(e,t="utf8"){super(),this.writable=e,this.encoding=t,this.errorCount=0,this.writable.on("error",(e=>this.fireError(e))),this.writable.on("close",(()=>this.fireClose()))}write(e){let t=JSON.stringify(e),n=i.byteLength(t,this.encoding),o=[s,n.toString(),a,a];try{this.writable.write(o.join(""),"ascii"),this.writable.write(t,this.encoding),this.errorCount=0}catch(t){this.errorCount++,this.fireError(t,e,this.errorCount)}}},t.IPCMessageWriter=class extends u{constructor(e){super(),this.process=e,this.errorCount=0,this.queue=[],this.sending=!1;let t=this.process;t.on("error",(e=>this.fireError(e))),t.on("close",(()=>this.fireClose))}write(e){this.sending||0!==this.queue.length?this.queue.push(e):this.doWriteMessage(e)}doWriteMessage(e){try{this.process.send&&(this.sending=!0,this.process.send(e,void 0,void 0,(t=>{this.sending=!1,t?(this.errorCount++,this.fireError(t,e,this.errorCount)):this.errorCount=0,this.queue.length>0&&this.doWriteMessage(this.queue.shift())})))}catch(t){this.errorCount++,this.fireError(t,e,this.errorCount)}}},t.SocketMessageWriter=class extends u{constructor(e,t="utf8"){super(),this.socket=e,this.queue=[],this.sending=!1,this.encoding=t,this.errorCount=0,this.socket.on("error",(e=>this.fireError(e))),this.socket.on("close",(()=>this.fireClose()))}write(e){this.sending||0!==this.queue.length?this.queue.push(e):this.doWriteMessage(e)}doWriteMessage(e){let t=JSON.stringify(e),n=i.byteLength(t,this.encoding),o=[s,n.toString(),a,a];try{this.sending=!0,this.socket.write(o.join(""),"ascii",(n=>{n&&this.handleError(n,e);try{this.socket.write(t,this.encoding,(t=>{this.sending=!1,t?this.handleError(t,e):this.errorCount=0,this.queue.length>0&&this.doWriteMessage(this.queue.shift())}))}catch(n){this.handleError(n,e)}}))}catch(t){this.handleError(t,e)}}handleError(e,t){this.errorCount++,this.fireError(e,t,this.errorCount)}}},8420:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(5704);var o;!function(e){e.ParseError=-32700,e.InvalidRequest=-32600,e.MethodNotFound=-32601,e.InvalidParams=-32602,e.InternalError=-32603,e.serverErrorStart=-32099,e.serverErrorEnd=-32e3,e.ServerNotInitialized=-32002,e.UnknownErrorCode=-32001,e.RequestCancelled=-32800,e.MessageWriteError=1,e.MessageReadError=2}(o=t.ErrorCodes||(t.ErrorCodes={}));class r extends Error{constructor(e,t,n){super(t),this.code=i.number(e)?e:o.UnknownErrorCode,this.data=n,Object.setPrototypeOf(this,r.prototype)}toJson(){return{code:this.code,message:this.message,data:this.data}}}t.ResponseError=r;class s{constructor(e,t){this._method=e,this._numberOfParams=t}get method(){return this._method}get numberOfParams(){return this._numberOfParams}}t.AbstractMessageType=s,t.RequestType0=class extends s{constructor(e){super(e,0),this._=void 0}},t.RequestType=class extends s{constructor(e){super(e,1),this._=void 0}},t.RequestType1=class extends s{constructor(e){super(e,1),this._=void 0}},t.RequestType2=class extends s{constructor(e){super(e,2),this._=void 0}},t.RequestType3=class extends s{constructor(e){super(e,3),this._=void 0}},t.RequestType4=class extends s{constructor(e){super(e,4),this._=void 0}},t.RequestType5=class extends s{constructor(e){super(e,5),this._=void 0}},t.RequestType6=class extends s{constructor(e){super(e,6),this._=void 0}},t.RequestType7=class extends s{constructor(e){super(e,7),this._=void 0}},t.RequestType8=class extends s{constructor(e){super(e,8),this._=void 0}},t.RequestType9=class extends s{constructor(e){super(e,9),this._=void 0}},t.NotificationType=class extends s{constructor(e){super(e,1),this._=void 0}},t.NotificationType0=class extends s{constructor(e){super(e,0),this._=void 0}},t.NotificationType1=class extends s{constructor(e){super(e,1),this._=void 0}},t.NotificationType2=class extends s{constructor(e){super(e,2),this._=void 0}},t.NotificationType3=class extends s{constructor(e){super(e,3),this._=void 0}},t.NotificationType4=class extends s{constructor(e){super(e,4),this._=void 0}},t.NotificationType5=class extends s{constructor(e){super(e,5),this._=void 0}},t.NotificationType6=class extends s{constructor(e){super(e,6),this._=void 0}},t.NotificationType7=class extends s{constructor(e){super(e,7),this._=void 0}},t.NotificationType8=class extends s{constructor(e){super(e,8),this._=void 0}},t.NotificationType9=class extends s{constructor(e){super(e,9),this._=void 0}},t.isRequestMessage=function(e){let t=e;return t&&i.string(t.method)&&(i.string(t.id)||i.number(t.id))},t.isNotificationMessage=function(e){let t=e;return t&&i.string(t.method)&&void 0===e.id},t.isResponseMessage=function(e){let t=e;return t&&(void 0!==t.result||!!t.error)&&(i.string(t.id)||i.number(t.id)||null===t.id)}},6849:(e,t,n)=>{"use strict";var i=n(8957);Object.defineProperty(t,"__esModule",{value:!0});const o=n(4708),r=n(2935),s=n(5314),a=n(2922),u=n(9722),l=n(2794);t.generateRandomPipeName=function(){const e=s.randomBytes(21).toString("hex");return"win32"===i.platform?`\\\\.\\pipe\\vscode-jsonrpc-${e}-sock`:o.join(r.tmpdir(),`vscode-${e}.sock`)},t.createClientPipeTransport=function(e,t="utf-8"){let n,i=new Promise(((e,t)=>{n=e}));return new Promise(((o,r)=>{let s=a.createServer((e=>{s.close(),n([new u.SocketMessageReader(e,t),new l.SocketMessageWriter(e,t)])}));s.on("error",r),s.listen(e,(()=>{s.removeListener("error",r),o({onConnected:()=>i})}))}))},t.createServerPipeTransport=function(e,t="utf-8"){const n=a.createConnection(e);return[new u.SocketMessageReader(n,t),new l.SocketMessageWriter(n,t)]}},5134:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(2922),o=n(9722),r=n(2794);t.createClientSocketTransport=function(e,t="utf-8"){let n,s=new Promise(((e,t)=>{n=e}));return new Promise(((a,u)=>{let l=i.createServer((e=>{l.close(),n([new o.SocketMessageReader(e,t),new r.SocketMessageWriter(e,t)])}));l.on("error",u),l.listen(e,"127.0.0.1",(()=>{l.removeListener("error",u),a({onConnected:()=>s})}))}))},t.createServerSocketTransport=function(e,t="utf-8"){const n=i.createConnection(e,"127.0.0.1");return[new o.SocketMessageReader(n,t),new r.SocketMessageWriter(n,t)]}},7850:(e,t,n)=>{"use strict";function i(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}Object.defineProperty(t,"__esModule",{value:!0});const o=n(9449);t.ErrorCodes=o.ErrorCodes,t.ResponseError=o.ResponseError,t.CancellationToken=o.CancellationToken,t.CancellationTokenSource=o.CancellationTokenSource,t.Disposable=o.Disposable,t.Event=o.Event,t.Emitter=o.Emitter,t.Trace=o.Trace,t.TraceFormat=o.TraceFormat,t.SetTraceNotification=o.SetTraceNotification,t.LogTraceNotification=o.LogTraceNotification,t.RequestType=o.RequestType,t.RequestType0=o.RequestType0,t.NotificationType=o.NotificationType,t.NotificationType0=o.NotificationType0,t.MessageReader=o.MessageReader,t.MessageWriter=o.MessageWriter,t.ConnectionStrategy=o.ConnectionStrategy,t.StreamMessageReader=o.StreamMessageReader,t.StreamMessageWriter=o.StreamMessageWriter,t.IPCMessageReader=o.IPCMessageReader,t.IPCMessageWriter=o.IPCMessageWriter,t.createClientPipeTransport=o.createClientPipeTransport,t.createServerPipeTransport=o.createServerPipeTransport,t.generateRandomPipeName=o.generateRandomPipeName,t.createClientSocketTransport=o.createClientSocketTransport,t.createServerSocketTransport=o.createServerSocketTransport,i(n(1579)),i(n(4583)),t.createProtocolConnection=function(e,t,n,i){return o.createMessageConnection(e,t,n,i)}},3203:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(9449);(t.DocumentColorRequest||(t.DocumentColorRequest={})).type=new i.RequestType("textDocument/documentColor"),(t.ColorPresentationRequest||(t.ColorPresentationRequest={})).type=new i.RequestType("textDocument/colorPresentation")},2615:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(9449);(t.ConfigurationRequest||(t.ConfigurationRequest={})).type=new i.RequestType("workspace/configuration")},1411:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(9449);var o;(o=t.FoldingRangeKind||(t.FoldingRangeKind={})).Comment="comment",o.Imports="imports",o.Region="region",(t.FoldingRangeRequest||(t.FoldingRangeRequest={})).type=new i.RequestType("textDocument/foldingRange")},8391:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(9449);(t.ImplementationRequest||(t.ImplementationRequest={})).type=new i.RequestType("textDocument/implementation")},4583:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(8361),o=n(9449),r=n(8391);t.ImplementationRequest=r.ImplementationRequest;const s=n(2544);t.TypeDefinitionRequest=s.TypeDefinitionRequest;const a=n(8291);t.WorkspaceFoldersRequest=a.WorkspaceFoldersRequest,t.DidChangeWorkspaceFoldersNotification=a.DidChangeWorkspaceFoldersNotification;const u=n(2615);t.ConfigurationRequest=u.ConfigurationRequest;const l=n(3203);t.DocumentColorRequest=l.DocumentColorRequest,t.ColorPresentationRequest=l.ColorPresentationRequest;const c=n(1411);var h,d,f,p,g,m,v;t.FoldingRangeRequest=c.FoldingRangeRequest,(t.DocumentFilter||(t.DocumentFilter={})).is=function(e){let t=e;return i.string(t.language)||i.string(t.scheme)||i.string(t.pattern)},(t.RegistrationRequest||(t.RegistrationRequest={})).type=new o.RequestType("client/registerCapability"),(t.UnregistrationRequest||(t.UnregistrationRequest={})).type=new o.RequestType("client/unregisterCapability"),(v=t.ResourceOperationKind||(t.ResourceOperationKind={})).Create="create",v.Rename="rename",v.Delete="delete",(m=t.FailureHandlingKind||(t.FailureHandlingKind={})).Abort="abort",m.Transactional="transactional",m.TextOnlyTransactional="textOnlyTransactional",m.Undo="undo",(g=t.TextDocumentSyncKind||(t.TextDocumentSyncKind={})).None=0,g.Full=1,g.Incremental=2,(t.InitializeRequest||(t.InitializeRequest={})).type=new o.RequestType("initialize"),(t.InitializeError||(t.InitializeError={})).unknownProtocolVersion=1,(t.InitializedNotification||(t.InitializedNotification={})).type=new o.NotificationType("initialized"),(t.ShutdownRequest||(t.ShutdownRequest={})).type=new o.RequestType0("shutdown"),(t.ExitNotification||(t.ExitNotification={})).type=new o.NotificationType0("exit"),(t.DidChangeConfigurationNotification||(t.DidChangeConfigurationNotification={})).type=new o.NotificationType("workspace/didChangeConfiguration"),(p=t.MessageType||(t.MessageType={})).Error=1,p.Warning=2,p.Info=3,p.Log=4,(t.ShowMessageNotification||(t.ShowMessageNotification={})).type=new o.NotificationType("window/showMessage"),(t.ShowMessageRequest||(t.ShowMessageRequest={})).type=new o.RequestType("window/showMessageRequest"),(t.LogMessageNotification||(t.LogMessageNotification={})).type=new o.NotificationType("window/logMessage"),(t.TelemetryEventNotification||(t.TelemetryEventNotification={})).type=new o.NotificationType("telemetry/event"),(t.DidOpenTextDocumentNotification||(t.DidOpenTextDocumentNotification={})).type=new o.NotificationType("textDocument/didOpen"),(t.DidChangeTextDocumentNotification||(t.DidChangeTextDocumentNotification={})).type=new o.NotificationType("textDocument/didChange"),(t.DidCloseTextDocumentNotification||(t.DidCloseTextDocumentNotification={})).type=new o.NotificationType("textDocument/didClose"),(t.DidSaveTextDocumentNotification||(t.DidSaveTextDocumentNotification={})).type=new o.NotificationType("textDocument/didSave"),(t.WillSaveTextDocumentNotification||(t.WillSaveTextDocumentNotification={})).type=new o.NotificationType("textDocument/willSave"),(t.WillSaveTextDocumentWaitUntilRequest||(t.WillSaveTextDocumentWaitUntilRequest={})).type=new o.RequestType("textDocument/willSaveWaitUntil"),(t.DidChangeWatchedFilesNotification||(t.DidChangeWatchedFilesNotification={})).type=new o.NotificationType("workspace/didChangeWatchedFiles"),(f=t.FileChangeType||(t.FileChangeType={})).Created=1,f.Changed=2,f.Deleted=3,(d=t.WatchKind||(t.WatchKind={})).Create=1,d.Change=2,d.Delete=4,(t.PublishDiagnosticsNotification||(t.PublishDiagnosticsNotification={})).type=new o.NotificationType("textDocument/publishDiagnostics"),(h=t.CompletionTriggerKind||(t.CompletionTriggerKind={})).Invoked=1,h.TriggerCharacter=2,h.TriggerForIncompleteCompletions=3,(t.CompletionRequest||(t.CompletionRequest={})).type=new o.RequestType("textDocument/completion"),(t.CompletionResolveRequest||(t.CompletionResolveRequest={})).type=new o.RequestType("completionItem/resolve"),(t.HoverRequest||(t.HoverRequest={})).type=new o.RequestType("textDocument/hover"),(t.SignatureHelpRequest||(t.SignatureHelpRequest={})).type=new o.RequestType("textDocument/signatureHelp"),(t.DefinitionRequest||(t.DefinitionRequest={})).type=new o.RequestType("textDocument/definition"),(t.ReferencesRequest||(t.ReferencesRequest={})).type=new o.RequestType("textDocument/references"),(t.DocumentHighlightRequest||(t.DocumentHighlightRequest={})).type=new o.RequestType("textDocument/documentHighlight"),(t.DocumentSymbolRequest||(t.DocumentSymbolRequest={})).type=new o.RequestType("textDocument/documentSymbol"),(t.WorkspaceSymbolRequest||(t.WorkspaceSymbolRequest={})).type=new o.RequestType("workspace/symbol"),(t.CodeActionRequest||(t.CodeActionRequest={})).type=new o.RequestType("textDocument/codeAction"),(t.CodeLensRequest||(t.CodeLensRequest={})).type=new o.RequestType("textDocument/codeLens"),(t.CodeLensResolveRequest||(t.CodeLensResolveRequest={})).type=new o.RequestType("codeLens/resolve"),(t.DocumentFormattingRequest||(t.DocumentFormattingRequest={})).type=new o.RequestType("textDocument/formatting"),(t.DocumentRangeFormattingRequest||(t.DocumentRangeFormattingRequest={})).type=new o.RequestType("textDocument/rangeFormatting"),(t.DocumentOnTypeFormattingRequest||(t.DocumentOnTypeFormattingRequest={})).type=new o.RequestType("textDocument/onTypeFormatting"),(t.RenameRequest||(t.RenameRequest={})).type=new o.RequestType("textDocument/rename"),(t.PrepareRenameRequest||(t.PrepareRenameRequest={})).type=new o.RequestType("textDocument/prepareRename"),(t.DocumentLinkRequest||(t.DocumentLinkRequest={})).type=new o.RequestType("textDocument/documentLink"),(t.DocumentLinkResolveRequest||(t.DocumentLinkResolveRequest={})).type=new o.RequestType("documentLink/resolve"),(t.ExecuteCommandRequest||(t.ExecuteCommandRequest={})).type=new o.RequestType("workspace/executeCommand"),(t.ApplyWorkspaceEditRequest||(t.ApplyWorkspaceEditRequest={})).type=new o.RequestType("workspace/applyEdit")},2544:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(9449);(t.TypeDefinitionRequest||(t.TypeDefinitionRequest={})).type=new i.RequestType("textDocument/typeDefinition")},8291:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(9449);(t.WorkspaceFoldersRequest||(t.WorkspaceFoldersRequest={})).type=new i.RequestType0("workspace/workspaceFolders"),(t.DidChangeWorkspaceFoldersNotification||(t.DidChangeWorkspaceFoldersNotification={})).type=new i.NotificationType("workspace/didChangeWorkspaceFolders")},8361:(e,t)=>{"use strict";function n(e){return"string"==typeof e||e instanceof String}function i(e){return"function"==typeof e}function o(e){return Array.isArray(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.boolean=function(e){return!0===e||!1===e},t.string=n,t.number=function(e){return"number"==typeof e||e instanceof Number},t.error=function(e){return e instanceof Error},t.func=i,t.array=o,t.stringArray=function(e){return o(e)&&e.every((e=>n(e)))},t.typedArray=function(e,t){return Array.isArray(e)&&e.every(t)},t.thenable=function(e){return e&&i(e.then)}},1579:(e,t,n)=>{"use strict";var i,o,r,s,a,u,l,c,h,d,f,p,g,m,v,y,b,_;n.r(t),n.d(t,{CodeAction:()=>H,CodeActionContext:()=>B,CodeActionKind:()=>F,CodeLens:()=>V,Color:()=>s,ColorInformation:()=>a,ColorPresentation:()=>u,Command:()=>p,CompletionItem:()=>x,CompletionItemKind:()=>I,CompletionList:()=>D,CreateFile:()=>v,DeleteFile:()=>b,Diagnostic:()=>f,DiagnosticRelatedInformation:()=>h,DiagnosticSeverity:()=>d,DocumentHighlight:()=>O,DocumentHighlightKind:()=>j,DocumentLink:()=>Z,DocumentSymbol:()=>Y,EOL:()=>q,FoldingRange:()=>c,FoldingRangeKind:()=>l,FormattingOptions:()=>U,Hover:()=>T,InsertTextFormat:()=>N,Location:()=>r,MarkedString:()=>k,MarkupContent:()=>L,MarkupKind:()=>S,ParameterInformation:()=>E,Position:()=>i,Range:()=>o,RenameFile:()=>y,SignatureInformation:()=>A,SymbolInformation:()=>P,SymbolKind:()=>R,TextDocument:()=>G,TextDocumentEdit:()=>m,TextDocumentIdentifier:()=>w,TextDocumentItem:()=>C,TextDocumentSaveReason:()=>Q,TextEdit:()=>g,VersionedTextDocumentIdentifier:()=>M,WorkspaceChange:()=>W,WorkspaceEdit:()=>_}),function(e){e.create=function(e,t){return{line:e,character:t}},e.is=function(e){var t=e;return K.objectLiteral(t)&&K.number(t.line)&&K.number(t.character)}}(i||(i={})),function(e){e.create=function(e,t,n,o){if(K.number(e)&&K.number(t)&&K.number(n)&&K.number(o))return{start:i.create(e,t),end:i.create(n,o)};if(i.is(e)&&i.is(t))return{start:e,end:t};throw new Error("Range#create called with invalid arguments["+e+", "+t+", "+n+", "+o+"]")},e.is=function(e){var t=e;return K.objectLiteral(t)&&i.is(t.start)&&i.is(t.end)}}(o||(o={})),function(e){e.create=function(e,t){return{uri:e,range:t}},e.is=function(e){var t=e;return K.defined(t)&&o.is(t.range)&&(K.string(t.uri)||K.undefined(t.uri))}}(r||(r={})),function(e){e.create=function(e,t,n,i){return{red:e,green:t,blue:n,alpha:i}},e.is=function(e){var t=e;return K.number(t.red)&&K.number(t.green)&&K.number(t.blue)&&K.number(t.alpha)}}(s||(s={})),function(e){e.create=function(e,t){return{range:e,color:t}},e.is=function(e){var t=e;return o.is(t.range)&&s.is(t.color)}}(a||(a={})),function(e){e.create=function(e,t,n){return{label:e,textEdit:t,additionalTextEdits:n}},e.is=function(e){var t=e;return K.string(t.label)&&(K.undefined(t.textEdit)||g.is(t))&&(K.undefined(t.additionalTextEdits)||K.typedArray(t.additionalTextEdits,g.is))}}(u||(u={})),function(e){e.Comment="comment",e.Imports="imports",e.Region="region"}(l||(l={})),function(e){e.create=function(e,t,n,i,o){var r={startLine:e,endLine:t};return K.defined(n)&&(r.startCharacter=n),K.defined(i)&&(r.endCharacter=i),K.defined(o)&&(r.kind=o),r},e.is=function(e){var t=e;return K.number(t.startLine)&&K.number(t.startLine)&&(K.undefined(t.startCharacter)||K.number(t.startCharacter))&&(K.undefined(t.endCharacter)||K.number(t.endCharacter))&&(K.undefined(t.kind)||K.string(t.kind))}}(c||(c={})),function(e){e.create=function(e,t){return{location:e,message:t}},e.is=function(e){var t=e;return K.defined(t)&&r.is(t.location)&&K.string(t.message)}}(h||(h={})),function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4}(d||(d={})),function(e){e.create=function(e,t,n,i,o,r){var s={range:e,message:t};return K.defined(n)&&(s.severity=n),K.defined(i)&&(s.code=i),K.defined(o)&&(s.source=o),K.defined(r)&&(s.relatedInformation=r),s},e.is=function(e){var t=e;return K.defined(t)&&o.is(t.range)&&K.string(t.message)&&(K.number(t.severity)||K.undefined(t.severity))&&(K.number(t.code)||K.string(t.code)||K.undefined(t.code))&&(K.string(t.source)||K.undefined(t.source))&&(K.undefined(t.relatedInformation)||K.typedArray(t.relatedInformation,h.is))}}(f||(f={})),function(e){e.create=function(e,t){for(var n=[],i=2;i0&&(o.arguments=n),o},e.is=function(e){var t=e;return K.defined(t)&&K.string(t.title)&&K.string(t.command)}}(p||(p={})),function(e){e.replace=function(e,t){return{range:e,newText:t}},e.insert=function(e,t){return{range:{start:e,end:e},newText:t}},e.del=function(e){return{range:e,newText:""}},e.is=function(e){var t=e;return K.objectLiteral(t)&&K.string(t.newText)&&o.is(t.range)}}(g||(g={})),function(e){e.create=function(e,t){return{textDocument:e,edits:t}},e.is=function(e){var t=e;return K.defined(t)&&M.is(t.textDocument)&&Array.isArray(t.edits)}}(m||(m={})),function(e){e.create=function(e,t){var n={kind:"create",uri:e};return void 0===t||void 0===t.overwrite&&void 0===t.ignoreIfExists||(n.options=t),n},e.is=function(e){var t=e;return t&&"create"===t.kind&&K.string(t.uri)&&(void 0===t.options||(void 0===t.options.overwrite||K.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||K.boolean(t.options.ignoreIfExists)))}}(v||(v={})),function(e){e.create=function(e,t,n){var i={kind:"rename",oldUri:e,newUri:t};return void 0===n||void 0===n.overwrite&&void 0===n.ignoreIfExists||(i.options=n),i},e.is=function(e){var t=e;return t&&"rename"===t.kind&&K.string(t.oldUri)&&K.string(t.newUri)&&(void 0===t.options||(void 0===t.options.overwrite||K.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||K.boolean(t.options.ignoreIfExists)))}}(y||(y={})),function(e){e.create=function(e,t){var n={kind:"delete",uri:e};return void 0===t||void 0===t.recursive&&void 0===t.ignoreIfNotExists||(n.options=t),n},e.is=function(e){var t=e;return t&&"delete"===t.kind&&K.string(t.uri)&&(void 0===t.options||(void 0===t.options.recursive||K.boolean(t.options.recursive))&&(void 0===t.options.ignoreIfNotExists||K.boolean(t.options.ignoreIfNotExists)))}}(b||(b={})),function(e){e.is=function(e){var t=e;return t&&(void 0!==t.changes||void 0!==t.documentChanges)&&(void 0===t.documentChanges||t.documentChanges.every((function(e){return K.string(e.kind)?v.is(e)||y.is(e)||b.is(e):m.is(e)})))}}(_||(_={}));var w,M,C,S,L,I,N,x,D,k,T,E,A,j,O,R,P,z=function(){function e(e){this.edits=e}return e.prototype.insert=function(e,t){this.edits.push(g.insert(e,t))},e.prototype.replace=function(e,t){this.edits.push(g.replace(e,t))},e.prototype.delete=function(e){this.edits.push(g.del(e))},e.prototype.add=function(e){this.edits.push(e)},e.prototype.all=function(){return this.edits},e.prototype.clear=function(){this.edits.splice(0,this.edits.length)},e}(),W=function(){function e(e){var t=this;this._textEditChanges=Object.create(null),e&&(this._workspaceEdit=e,e.documentChanges?e.documentChanges.forEach((function(e){if(m.is(e)){var n=new z(e.edits);t._textEditChanges[e.textDocument.uri]=n}})):e.changes&&Object.keys(e.changes).forEach((function(n){var i=new z(e.changes[n]);t._textEditChanges[n]=i})))}return Object.defineProperty(e.prototype,"edit",{get:function(){return this._workspaceEdit},enumerable:!0,configurable:!0}),e.prototype.getTextEditChange=function(e){if(M.is(e)){if(this._workspaceEdit||(this._workspaceEdit={documentChanges:[]}),!this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");var t=e;if(!(i=this._textEditChanges[t.uri])){var n={textDocument:t,edits:o=[]};this._workspaceEdit.documentChanges.push(n),i=new z(o),this._textEditChanges[t.uri]=i}return i}if(this._workspaceEdit||(this._workspaceEdit={changes:Object.create(null)}),!this._workspaceEdit.changes)throw new Error("Workspace edit is not configured for normal text edit changes.");var i;if(!(i=this._textEditChanges[e])){var o=[];this._workspaceEdit.changes[e]=o,i=new z(o),this._textEditChanges[e]=i}return i},e.prototype.createFile=function(e,t){this.checkDocumentChanges(),this._workspaceEdit.documentChanges.push(v.create(e,t))},e.prototype.renameFile=function(e,t,n){this.checkDocumentChanges(),this._workspaceEdit.documentChanges.push(y.create(e,t,n))},e.prototype.deleteFile=function(e,t){this.checkDocumentChanges(),this._workspaceEdit.documentChanges.push(b.create(e,t))},e.prototype.checkDocumentChanges=function(){if(!this._workspaceEdit||!this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.")},e}();!function(e){e.create=function(e){return{uri:e}},e.is=function(e){var t=e;return K.defined(t)&&K.string(t.uri)}}(w||(w={})),function(e){e.create=function(e,t){return{uri:e,version:t}},e.is=function(e){var t=e;return K.defined(t)&&K.string(t.uri)&&(null===t.version||K.number(t.version))}}(M||(M={})),function(e){e.create=function(e,t,n,i){return{uri:e,languageId:t,version:n,text:i}},e.is=function(e){var t=e;return K.defined(t)&&K.string(t.uri)&&K.string(t.languageId)&&K.number(t.version)&&K.string(t.text)}}(C||(C={})),function(e){e.PlainText="plaintext",e.Markdown="markdown"}(S||(S={})),function(e){e.is=function(t){var n=t;return n===e.PlainText||n===e.Markdown}}(S||(S={})),function(e){e.is=function(e){var t=e;return K.objectLiteral(e)&&S.is(t.kind)&&K.string(t.value)}}(L||(L={})),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}(I||(I={})),function(e){e.PlainText=1,e.Snippet=2}(N||(N={})),function(e){e.create=function(e){return{label:e}}}(x||(x={})),function(e){e.create=function(e,t){return{items:e||[],isIncomplete:!!t}}}(D||(D={})),function(e){e.fromPlainText=function(e){return e.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")},e.is=function(e){var t=e;return K.string(t)||K.objectLiteral(t)&&K.string(t.language)&&K.string(t.value)}}(k||(k={})),function(e){e.is=function(e){var t=e;return K.objectLiteral(t)&&(L.is(t.contents)||k.is(t.contents)||K.typedArray(t.contents,k.is))&&(void 0===e.range||o.is(e.range))}}(T||(T={})),function(e){e.create=function(e,t){return t?{label:e,documentation:t}:{label:e}}}(E||(E={})),function(e){e.create=function(e,t){for(var n=[],i=2;i=0;s--){var a=o[s],u=e.offsetAt(a.range.start),l=e.offsetAt(a.range.end);if(!(l<=r))throw new Error("Ovelapping edit");i=i.substring(0,u)+a.newText+i.substring(l,i.length),r=u}return i}}(G||(G={})),function(e){e.Manual=1,e.AfterDelay=2,e.FocusOut=3}(Q||(Q={}));var K,J=function(){function e(e,t,n,i){this._uri=e,this._languageId=t,this._version=n,this._content=i,this._lineOffsets=null}return Object.defineProperty(e.prototype,"uri",{get:function(){return this._uri},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"languageId",{get:function(){return this._languageId},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"version",{get:function(){return this._version},enumerable:!0,configurable:!0}),e.prototype.getText=function(e){if(e){var t=this.offsetAt(e.start),n=this.offsetAt(e.end);return this._content.substring(t,n)}return this._content},e.prototype.update=function(e,t){this._content=e.text,this._version=t,this._lineOffsets=null},e.prototype.getLineOffsets=function(){if(null===this._lineOffsets){for(var e=[],t=this._content,n=!0,i=0;i0&&e.push(t.length),this._lineOffsets=e}return this._lineOffsets},e.prototype.positionAt=function(e){e=Math.max(Math.min(e,this._content.length),0);var t=this.getLineOffsets(),n=0,o=t.length;if(0===o)return i.create(0,e);for(;ne?o=r:n=r+1}var s=n-1;return i.create(s,e-t[s])},e.prototype.offsetAt=function(e){var t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;var n=t[e.line],i=e.line+1{"use strict";n.r(t),n.d(t,{default:()=>g});var i,o,r=n(8957),s=(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});if("object"==typeof r)o="win32"===r.platform;else if("object"==typeof navigator){var a=navigator.userAgent;o=a.indexOf("Windows")>=0}var u=/^\w[\w\d+.-]*$/,l=/^\//,c=/^\/\//,h="",d="/",f=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/,p=function(){function e(e,t,n,i,o){"object"==typeof e?(this.scheme=e.scheme||h,this.authority=e.authority||h,this.path=e.path||h,this.query=e.query||h,this.fragment=e.fragment||h):(this.scheme=e||h,this.authority=t||h,this.path=function(e,t){switch(e){case"https":case"http":case"file":t?t[0]!==d&&(t=d+t):t=d}return t}(this.scheme,n||h),this.query=i||h,this.fragment=o||h,function(e){if(e.scheme&&!u.test(e.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(e.path)if(e.authority){if(!l.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(c.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 ("//")')}(this))}return e.isUri=function(t){return t instanceof e||!!t&&"string"==typeof t.authority&&"string"==typeof t.fragment&&"string"==typeof t.path&&"string"==typeof t.query&&"string"==typeof t.scheme},Object.defineProperty(e.prototype,"fsPath",{get:function(){return w(this)},enumerable:!0,configurable:!0}),e.prototype.with=function(e){if(!e)return this;var t=e.scheme,n=e.authority,i=e.path,o=e.query,r=e.fragment;return void 0===t?t=this.scheme:null===t&&(t=h),void 0===n?n=this.authority:null===n&&(n=h),void 0===i?i=this.path:null===i&&(i=h),void 0===o?o=this.query:null===o&&(o=h),void 0===r?r=this.fragment:null===r&&(r=h),t===this.scheme&&n===this.authority&&i===this.path&&o===this.query&&r===this.fragment?this:new v(t,n,i,o,r)},e.parse=function(e){var t=f.exec(e);return t?new v(t[2]||h,decodeURIComponent(t[4]||h),decodeURIComponent(t[5]||h),decodeURIComponent(t[7]||h),decodeURIComponent(t[9]||h)):new v(h,h,h,h,h)},e.file=function(e){var t=h;if(o&&(e=e.replace(/\\/g,d)),e[0]===d&&e[1]===d){var n=e.indexOf(d,2);-1===n?(t=e.substring(2),e=d):(t=e.substring(2,n),e=e.substring(n)||d)}return new v("file",t,e,h,h)},e.from=function(e){return new v(e.scheme,e.authority,e.path,e.query,e.fragment)},e.prototype.toString=function(e){return void 0===e&&(e=!1),M(this,e)},e.prototype.toJSON=function(){return this},e.revive=function(t){if(t){if(t instanceof e)return t;var n=new v(t);return n._fsPath=t.fsPath,n._formatted=t.external,n}return t},e}();const g=p;var m,v=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._formatted=null,t._fsPath=null,t}return s(t,e),Object.defineProperty(t.prototype,"fsPath",{get:function(){return this._fsPath||(this._fsPath=w(this)),this._fsPath},enumerable:!0,configurable:!0}),t.prototype.toString=function(e){return void 0===e&&(e=!1),e?M(this,!0):(this._formatted||(this._formatted=M(this,!1)),this._formatted)},t.prototype.toJSON=function(){var e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath),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},t}(p),y=((m={})[58]="%3A",m[47]="%2F",m[63]="%3F",m[35]="%23",m[91]="%5B",m[93]="%5D",m[64]="%40",m[33]="%21",m[36]="%24",m[38]="%26",m[39]="%27",m[40]="%28",m[41]="%29",m[42]="%2A",m[43]="%2B",m[44]="%2C",m[59]="%3B",m[61]="%3D",m[32]="%20",m);function b(e,t){for(var n=void 0,i=-1,o=0;o=97&&r<=122||r>=65&&r<=90||r>=48&&r<=57||45===r||46===r||95===r||126===r||t&&47===r)-1!==i&&(n+=encodeURIComponent(e.substring(i,o)),i=-1),void 0!==n&&(n+=e.charAt(o));else{void 0===n&&(n=e.substr(0,o));var s=y[r];void 0!==s?(-1!==i&&(n+=encodeURIComponent(e.substring(i,o)),i=-1),n+=s):-1===i&&(i=o)}}return-1!==i&&(n+=encodeURIComponent(e.substring(i))),void 0!==n?n:e}function _(e){for(var t=void 0,n=0;n1&&"file"===e.scheme?"//"+e.authority+e.path:47===e.path.charCodeAt(0)&&(e.path.charCodeAt(1)>=65&&e.path.charCodeAt(1)<=90||e.path.charCodeAt(1)>=97&&e.path.charCodeAt(1)<=122)&&58===e.path.charCodeAt(2)?e.path[1].toLowerCase()+e.path.substr(2):e.path,o&&(t=t.replace(/\//g,"\\")),t}function M(e,t){var n=t?_:b,i="",o=e.scheme,r=e.authority,s=e.path,a=e.query,u=e.fragment;if(o&&(i+=o,i+=":"),(r||"file"===o)&&(i+=d,i+=d),r){var l=r.indexOf("@");if(-1!==l){var c=r.substr(0,l);r=r.substr(l+1),-1===(l=c.indexOf(":"))?i+=n(c,!1):(i+=n(c.substr(0,l),!1),i+=":",i+=n(c.substr(l+1),!1)),i+="@"}-1===(l=(r=r.toLowerCase()).indexOf(":"))?i+=n(r,!1):(i+=n(r.substr(0,l),!1),i+=r.substr(l))}if(s){if(s.length>=3&&47===s.charCodeAt(0)&&58===s.charCodeAt(2))(h=s.charCodeAt(1))>=65&&h<=90&&(s="/"+String.fromCharCode(h+32)+":"+s.substr(3));else if(s.length>=2&&58===s.charCodeAt(1)){var h;(h=s.charCodeAt(0))>=65&&h<=90&&(s=String.fromCharCode(h+32)+":"+s.substr(2))}i+=n(s,!0)}return a&&(i+="?",i+=n(a,!1)),u&&(i+="#",i+=t?u:b(u,!1)),i}},987:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(3397),o=n(3839);function r(e){return{send:function(t){return e.send(t)},onMessage:function(t){return e.onmessage=function(e){return t(e.data)}},onError:function(t){return e.onerror=function(e){"message"in e&&t(e.message)}},onClose:function(t){return e.onclose=function(e){return t(e.code,e.reason)}},dispose:function(){return e.close()}}}t.listen=function(e){var t=e.webSocket,n=e.onConnection,s=e.logger||new o.ConsoleLogger;t.onopen=function(){var e=r(t),o=i.createWebSocketConnection(e,s);n(o)}},t.toSocket=r},8217:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(5924);t.Disposable=i.Disposable;var o=function(){function e(){this.disposables=[]}return e.prototype.dispose=function(){for(;0!==this.disposables.length;)this.disposables.pop().dispose()},e.prototype.push=function(e){var t=this.disposables;return t.push(e),{dispose:function(){var n=t.indexOf(e);-1!==n&&t.splice(n,1)}}},e}();t.DisposableCollection=o},4823:(e,t,n)=>{"use strict";function i(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}Object.defineProperty(t,"__esModule",{value:!0}),i(n(9192)),i(n(7633)),i(n(8217)),i(n(3397)),i(n(3839)),i(n(987))},3839:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(){}return e.prototype.error=function(e){console.error(e)},e.prototype.warn=function(e){console.warn(e)},e.prototype.info=function(e){console.info(e)},e.prototype.log=function(e){console.log(e)},e.prototype.debug=function(e){console.debug(e)},e}();t.ConsoleLogger=n},4645:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(9192),o=n(6450),r=n(8434);t.createWebSocketConnection=function(e,t){var n=new o.WebSocketMessageReader(e),s=new r.WebSocketMessageWriter(e),a=i.createMessageConnection(n,s,t);return a.onClose((function(){return a.dispose()})),a}},3397:(e,t,n)=>{"use strict";function i(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}Object.defineProperty(t,"__esModule",{value:!0}),i(n(6450)),i(n(8434)),i(n(4645))},6450:function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){function t(t){var n=e.call(this)||this;return n.socket=t,n.state="initial",n.events=[],n.socket.onMessage((function(e){return n.readMessage(e)})),n.socket.onError((function(e){return n.fireError(e)})),n.socket.onClose((function(e,t){if(1e3!==e){var i={name:""+e,message:"Error during socket reconnect: code = "+e+", reason = "+t};n.fireError(i)}n.fireClose()})),n}return o(t,e),t.prototype.listen=function(e){if("initial"===this.state)for(this.state="listening",this.callback=e;0!==this.events.length;){var t=this.events.pop();t.message?this.readMessage(t.message):t.error?this.fireError(t.error):this.fireClose()}},t.prototype.readMessage=function(e){if("initial"===this.state)this.events.splice(0,0,{message:e});else if("listening"===this.state){var t=JSON.parse(e);this.callback(t)}},t.prototype.fireError=function(t){"initial"===this.state?this.events.splice(0,0,{error:t}):"listening"===this.state&&e.prototype.fireError.call(this,t)},t.prototype.fireClose=function(){"initial"===this.state?this.events.splice(0,0,{}):"listening"===this.state&&e.prototype.fireClose.call(this),this.state="closed"},t}(n(8125).AbstractMessageReader);t.WebSocketMessageReader=r},8434:function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){function t(t){var n=e.call(this)||this;return n.socket=t,n.errorCount=0,n}return o(t,e),t.prototype.write=function(e){try{var t=JSON.stringify(e);this.socket.send(t)}catch(t){this.errorCount++,this.fireError(t,e,this.errorCount)}},t}(n(5417).AbstractMessageWriter);t.WebSocketMessageWriter=r},5114:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i,o=n(5924),r=n(7145);!function(e){e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:o.Event.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:o.Event.None}),e.is=function(t){var n=t;return n&&(n===e.None||n===e.Cancelled||r.boolean(n.isCancellationRequested)&&!!n.onCancellationRequested)}}(i=t.CancellationToken||(t.CancellationToken={}));var s=Object.freeze((function(e,t){var n=setTimeout(e.bind(t),0);return{dispose:function(){clearTimeout(n)}}})),a=function(){function e(){this._isCancelled=!1}return e.prototype.cancel=function(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this._emitter=void 0))},Object.defineProperty(e.prototype,"isCancellationRequested",{get:function(){return this._isCancelled},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onCancellationRequested",{get:function(){return this._isCancelled?s:(this._emitter||(this._emitter=new o.Emitter),this._emitter.event)},enumerable:!0,configurable:!0}),e}(),u=function(){function e(){}return Object.defineProperty(e.prototype,"token",{get:function(){return this._token||(this._token=new a),this._token},enumerable:!0,configurable:!0}),e.prototype.cancel=function(){this._token?this._token.cancel():this._token=i.Cancelled},e.prototype.dispose=function(){this.cancel()},e}();t.CancellationTokenSource=u},5924:(e,t)=>{"use strict";var n,i;Object.defineProperty(t,"__esModule",{value:!0}),(t.Disposable||(t.Disposable={})).create=function(e){return{dispose:e}},n=t.Event||(t.Event={}),i={dispose:function(){}},n.None=function(){return i};var o=function(){function e(){}return e.prototype.add=function(e,t,n){var i=this;void 0===t&&(t=null),this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(e),this._contexts.push(t),Array.isArray(n)&&n.push({dispose:function(){return i.remove(e,t)}})},e.prototype.remove=function(e,t){if(void 0===t&&(t=null),this._callbacks){for(var n=!1,i=0,o=this._callbacks.length;i{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=Object.prototype.toString;function i(e){return"[object String]"===n.call(e)}function o(e){return Array.isArray(e)}t.boolean=function(e){return!0===e||!1===e},t.string=i,t.number=function(e){return"[object Number]"===n.call(e)},t.error=function(e){return"[object Error]"===n.call(e)},t.func=function(e){return"[object Function]"===n.call(e)},t.array=o,t.stringArray=function(e){return o(e)&&e.every((function(e){return i(e)}))}},7688:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.None=0,e.First=1,e.Last=2}(n=t.Touch||(t.Touch={}));var i=function(){function e(){this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0}return e.prototype.clear=function(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0},e.prototype.isEmpty=function(){return!this._head&&!this._tail},Object.defineProperty(e.prototype,"size",{get:function(){return this._size},enumerable:!0,configurable:!0}),e.prototype.has=function(e){return this._map.has(e)},e.prototype.get=function(e){var t=this._map.get(e);if(t)return t.value},e.prototype.set=function(e,t,i){void 0===i&&(i=n.None);var o=this._map.get(e);if(o)o.value=t,i!==n.None&&this.touch(o,i);else{switch(o={key:e,value:t,next:void 0,previous:void 0},i){case n.None:this.addItemLast(o);break;case n.First:this.addItemFirst(o);break;case n.Last:default:this.addItemLast(o)}this._map.set(e,o),this._size++}},e.prototype.delete=function(e){var t=this._map.get(e);return!!t&&(this._map.delete(e),this.removeItem(t),this._size--,!0)},e.prototype.shift=function(){if(this._head||this._tail){if(!this._head||!this._tail)throw new Error("Invalid list");var e=this._head;return this._map.delete(e.key),this.removeItem(e),this._size--,e.value}},e.prototype.forEach=function(e,t){for(var n=this._head;n;)t?e.bind(t)(n.value,n.key,this):e(n.value,n.key,this),n=n.next},e.prototype.forEachReverse=function(e,t){for(var n=this._tail;n;)t?e.bind(t)(n.value,n.key,this):e(n.value,n.key,this),n=n.previous},e.prototype.values=function(){for(var e=[],t=this._head;t;)e.push(t.value),t=t.next;return e},e.prototype.keys=function(){for(var e=[],t=this._head;t;)e.push(t.key),t=t.next;return e},e.prototype.addItemFirst=function(e){if(this._head||this._tail){if(!this._head)throw new Error("Invalid list");e.next=this._head,this._head.previous=e}else this._tail=e;this._head=e},e.prototype.addItemLast=function(e){if(this._head||this._tail){if(!this._tail)throw new Error("Invalid list");e.previous=this._tail,this._tail.next=e}else this._head=e;this._tail=e},e.prototype.removeItem=function(e){if(e===this._head&&e===this._tail)this._head=void 0,this._tail=void 0;else if(e===this._head)this._head=e.next;else if(e===this._tail)this._tail=e.previous;else{var t=e.next,n=e.previous;if(!t||!n)throw new Error("Invalid list");t.previous=n,n.next=t}},e.prototype.touch=function(e,t){if(!this._head||!this._tail)throw new Error("Invalid list");if(t===n.First||t===n.Last)if(t===n.First){if(e===this._head)return;var i=e.next,o=e.previous;e===this._tail?(o.next=void 0,this._tail=o):(i.previous=o,o.next=i),e.previous=void 0,e.next=this._head,this._head.previous=e,this._head=e}else if(t===n.Last){if(e===this._tail)return;i=e.next,o=e.previous,e===this._head?(i.previous=void 0,this._head=i):(i.previous=o,o.next=i),e.next=void 0,e.previous=this._tail,this._tail.next=e,this._tail=e}},e}();t.LinkedMap=i},9192:function(e,t,n){"use strict";var i,o=n(7188).setImmedate,r=this&&this.__extends||(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});function s(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}Object.defineProperty(t,"__esModule",{value:!0});var a=n(7145),u=n(7633);t.RequestType=u.RequestType,t.RequestType0=u.RequestType0,t.RequestType1=u.RequestType1,t.RequestType2=u.RequestType2,t.RequestType3=u.RequestType3,t.RequestType4=u.RequestType4,t.RequestType5=u.RequestType5,t.RequestType6=u.RequestType6,t.RequestType7=u.RequestType7,t.RequestType8=u.RequestType8,t.RequestType9=u.RequestType9,t.ResponseError=u.ResponseError,t.ErrorCodes=u.ErrorCodes,t.NotificationType=u.NotificationType,t.NotificationType0=u.NotificationType0,t.NotificationType1=u.NotificationType1,t.NotificationType2=u.NotificationType2,t.NotificationType3=u.NotificationType3,t.NotificationType4=u.NotificationType4,t.NotificationType5=u.NotificationType5,t.NotificationType6=u.NotificationType6,t.NotificationType7=u.NotificationType7,t.NotificationType8=u.NotificationType8,t.NotificationType9=u.NotificationType9;var l=n(8125);t.MessageReader=l.MessageReader,t.StreamMessageReader=l.StreamMessageReader,t.IPCMessageReader=l.IPCMessageReader,t.SocketMessageReader=l.SocketMessageReader;var c=n(5417);t.MessageWriter=c.MessageWriter,t.StreamMessageWriter=c.StreamMessageWriter,t.IPCMessageWriter=c.IPCMessageWriter,t.SocketMessageWriter=c.SocketMessageWriter;var h=n(5924);t.Disposable=h.Disposable,t.Event=h.Event,t.Emitter=h.Emitter;var d=n(5114);t.CancellationTokenSource=d.CancellationTokenSource,t.CancellationToken=d.CancellationToken;var f,p,g,m,v,y=n(7688);s(n(2262)),s(n(2081)),function(e){e.type=new u.NotificationType("$/cancelRequest")}(f||(f={})),t.NullLogger=Object.freeze({error:function(){},warn:function(){},info:function(){},log:function(){}}),function(e){e[e.Off=0]="Off",e[e.Messages=1]="Messages",e[e.Verbose=2]="Verbose"}(p=t.Trace||(t.Trace={})),function(e){e.fromString=function(t){switch(t=t.toLowerCase()){case"off":default:return e.Off;case"messages":return e.Messages;case"verbose":return e.Verbose}},e.toString=function(t){switch(t){case e.Off:return"off";case e.Messages:return"messages";case e.Verbose:return"verbose";default:return"off"}}}(p=t.Trace||(t.Trace={})),function(e){e.type=new u.NotificationType("$/setTraceNotification")}(g=t.SetTraceNotification||(t.SetTraceNotification={})),function(e){e.type=new u.NotificationType("$/logTraceNotification")}(m=t.LogTraceNotification||(t.LogTraceNotification={})),function(e){e[e.Closed=1]="Closed",e[e.Disposed=2]="Disposed",e[e.AlreadyListening=3]="AlreadyListening"}(v=t.ConnectionErrors||(t.ConnectionErrors={}));var b,_=function(e){function t(n,i){var o=e.call(this,i)||this;return o.code=n,Object.setPrototypeOf(o,t.prototype),o}return r(t,e),t}(Error);function w(e,t,n,i){var r,s,l=0,c=0,w=0,M="2.0",C=void 0,S=Object.create(null),L=void 0,I=Object.create(null),N=new y.LinkedMap,x=Object.create(null),D=Object.create(null),k=p.Off,T=b.New,E=new h.Emitter,A=new h.Emitter,j=new h.Emitter,O=new h.Emitter;function R(e){return"req-"+e.toString()}function P(e){}function z(){return T===b.Listening}function W(){return T===b.Closed}function F(){return T===b.Disposed}function B(){T!==b.New&&T!==b.Listening||(T=b.Closed,A.fire(void 0))}function H(){r||0===N.size||(r=o((function(){r=void 0,function(){if(0!==N.size){var e=N.shift();try{u.isRequestMessage(e)?function(e){if(!F()){!function(e){if(k!==p.Off&&s){var t=void 0;k===p.Verbose&&e.params&&(t="Params: "+JSON.stringify(e.params,null,4)+"\n\n"),s.log("Received request '"+e.method+" - ("+e.id+")'.",t)}}(e);var n,i,o=S[e.method];o&&(n=o.type,i=o.handler);var r=Date.now();if(i||C){var l=new d.CancellationTokenSource,c=String(e.id);D[c]=l;try{var h,f=h=void 0===e.params||void 0!==n&&0===n.numberOfParams?i?i(l.token):C(e.method,l.token):a.array(e.params)&&(void 0===n||n.numberOfParams>1)?i?i.apply(void 0,e.params.concat([l.token])):C.apply(void 0,[e.method].concat(e.params,[l.token])):i?i(e.params,l.token):C(e.method,e.params,l.token);h?f.then?f.then((function(t){delete D[c],g(t,e.method,r)}),(function(t){delete D[c],t instanceof u.ResponseError?m(t,e.method,r):t&&a.string(t.message)?m(new u.ResponseError(u.ErrorCodes.InternalError,"Request "+e.method+" failed with message: "+t.message),e.method,r):m(new u.ResponseError(u.ErrorCodes.InternalError,"Request "+e.method+" failed unexpectedly without providing any details."),e.method,r)})):(delete D[c],g(h,e.method,r)):(delete D[c],function(n,i,o){void 0===n&&(n=null);var r={jsonrpc:M,id:e.id,result:n};U(r,i,o),t.write(r)}(h,e.method,r))}catch(t){delete D[c],t instanceof u.ResponseError?g(t,e.method,r):t&&a.string(t.message)?m(new u.ResponseError(u.ErrorCodes.InternalError,"Request "+e.method+" failed with message: "+t.message),e.method,r):m(new u.ResponseError(u.ErrorCodes.InternalError,"Request "+e.method+" failed unexpectedly without providing any details."),e.method,r)}}else m(new u.ResponseError(u.ErrorCodes.MethodNotFound,"Unhandled method "+e.method),e.method,r)}function g(n,i,o){var r={jsonrpc:M,id:e.id};n instanceof u.ResponseError?r.error=n.toJson():r.result=void 0===n?null:n,U(r,i,o),t.write(r)}function m(n,i,o){var r={jsonrpc:M,id:e.id,error:n.toJson()};U(r,i,o),t.write(r)}}(e):u.isNotificationMessage(e)?function(e){if(!F()){var t,i=void 0;if(e.method===f.type.method)t=function(e){var t=e.id,n=D[String(t)];n&&n.cancel()};else{var o=I[e.method];o&&(t=o.handler,i=o.type)}if(t||L)try{!function(e){if(k!==p.Off&&s&&e.method!==m.type.method){var t=void 0;k===p.Verbose&&(t=e.params?"Params: "+JSON.stringify(e.params,null,4)+"\n\n":"No parameters provided.\n\n"),s.log("Received notification '"+e.method+"'.",t)}}(e),void 0===e.params||void 0!==i&&0===i.numberOfParams?t?t():L(e.method):a.array(e.params)&&(void 0===i||i.numberOfParams>1)?t?t.apply(void 0,e.params):L.apply(void 0,[e.method].concat(e.params)):t?t(e.params):L(e.method,e.params)}catch(t){t.message?n.error("Notification handler '"+e.method+"' failed with message: "+t.message):n.error("Notification handler '"+e.method+"' failed unexpectedly.")}else j.fire(e)}}(e):u.isResponseMessage(e)?function(e){if(!F())if(null===e.id)e.error?n.error("Received response message without id: Error is: \n"+JSON.stringify(e.error,void 0,4)):n.error("Received response message without id. No further error information provided.");else{var t=String(e.id),i=x[t];if(function(e,t){if(k!==p.Off&&s){var n=void 0;if(k===p.Verbose&&(e.error&&e.error.data?n="Error data: "+JSON.stringify(e.error.data,null,4)+"\n\n":e.result?n="Result: "+JSON.stringify(e.result,null,4)+"\n\n":void 0===e.error&&(n="No result returned.\n\n")),t){var i=e.error?" Request failed: "+e.error.message+" ("+e.error.code+").":"";s.log("Received response '"+t.method+" - ("+e.id+")' in "+(Date.now()-t.timerStart)+"ms."+i,n)}else s.log("Received response "+e.id+" without active response promise.",n)}}(e,i),i){delete x[t];try{if(e.error){var o=e.error;i.reject(new u.ResponseError(o.code,o.message,o.data))}else{if(void 0===e.result)throw new Error("Should never happen.");i.resolve(e.result)}}catch(o){o.message?n.error("Response handler '"+i.method+"' failed with message: "+o.message):n.error("Response handler '"+i.method+"' failed unexpectedly.")}}}}(e):function(e){if(e){n.error("Received message which is neither a response nor a notification message:\n"+JSON.stringify(e,null,4));var t=e;if(a.string(t.id)||a.number(t.id)){var i=String(t.id),o=x[i];o&&o.reject(new Error("The received response has neither a result nor an error property."))}}else n.error("Received empty message.")}(e)}finally{H()}}}()})))}e.onClose(B),e.onError((function(e){E.fire([e,void 0,void 0])})),t.onClose(B),t.onError((function(e){E.fire(e)}));var V=function(e){try{if(u.isNotificationMessage(e)&&e.method===f.type.method){var n=R(e.params.id),o=N.get(n);if(u.isRequestMessage(o)){var r=i&&i.cancelUndispatched?i.cancelUndispatched(o,P):void 0;if(r&&(void 0!==r.error||void 0!==r.result))return N.delete(n),r.id=o.id,U(r,e.method,Date.now()),void t.write(r)}}!function(e,t){var n;u.isRequestMessage(t)?e.set(R(t.id),t):u.isResponseMessage(t)?e.set(null===(n=t.id)?"res-unknown-"+(++w).toString():"res-"+n.toString(),t):e.set("not-"+(++c).toString(),t)}(N,e)}finally{H()}};function U(e,t,n){if(k!==p.Off&&s){var i=void 0;k===p.Verbose&&(e.error&&e.error.data?i="Error data: "+JSON.stringify(e.error.data,null,4)+"\n\n":e.result?i="Result: "+JSON.stringify(e.result,null,4)+"\n\n":void 0===e.error&&(i="No result returned.\n\n")),s.log("Sending response '"+t+" - ("+e.id+")'. Processing request took "+(Date.now()-n)+"ms",i)}}function Y(){if(W())throw new _(v.Closed,"Connection is closed.");if(F())throw new _(v.Disposed,"Connection is disposed.")}function Z(e){return void 0===e?null:e}function G(e,t){var n,i=e.numberOfParams;switch(i){case 0:n=null;break;case 1:n=Z(t[0]);break;default:n=[];for(var o=0;o=t.length)t.copy(this.buffer,this.index,0,t.length);else{var r=(Math.ceil((this.index+t.length)/u)+1)*u;0===this.index?(this.buffer=new o(r),t.copy(this.buffer,0,0,t.length)):this.buffer=o.concat([this.buffer.slice(0,this.index),t],r)}this.index+=t.length},e.prototype.tryReadHeaders=function(){for(var e=void 0,t=0;t+3=this.index)return e;e=Object.create(null),this.buffer.toString("ascii",0,t).split("\r\n").forEach((function(t){var n=t.indexOf(":");if(-1===n)throw new Error("Message header must separate key and value using :");var i=t.substr(0,n),o=t.substr(n+1).trim();e[i]=o}));var n=t+4;return this.buffer=this.buffer.slice(n),this.index=this.index-n,e},e.prototype.tryReadContent=function(e){if(this.index0&&t.doWriteMessage(t.queue.shift())})))}catch(t){this.errorCount++,this.fireError(t,e,this.errorCount)}},t}(c);t.IPCMessageWriter=d;var f=function(e){function t(t,n){void 0===n&&(n="utf8");var i=e.call(this)||this;return i.socket=t,i.queue=[],i.sending=!1,i.encoding=n,i.errorCount=0,i.socket.on("error",(function(e){return i.fireError(e)})),i.socket.on("close",(function(){return i.fireClose()})),i}return r(t,e),t.prototype.write=function(e){this.sending||0!==this.queue.length?this.queue.push(e):this.doWriteMessage(e)},t.prototype.doWriteMessage=function(e){var t=this,n=JSON.stringify(e),i=o.byteLength(n,this.encoding),r=[u,i.toString(),l,l];try{this.sending=!0,this.socket.write(r.join(""),"ascii",(function(i){i&&t.handleError(i,e);try{t.socket.write(n,t.encoding,(function(n){t.sending=!1,n?t.handleError(n,e):t.errorCount=0,t.queue.length>0&&t.doWriteMessage(t.queue.shift())}))}catch(i){t.handleError(i,e)}}))}catch(t){this.handleError(t,e)}},t.prototype.handleError=function(e,t){this.errorCount++,this.fireError(e,t,this.errorCount)},t}(c);t.SocketMessageWriter=f},7633:function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var r,s=n(7145);!function(e){e.ParseError=-32700,e.InvalidRequest=-32600,e.MethodNotFound=-32601,e.InvalidParams=-32602,e.InternalError=-32603,e.serverErrorStart=-32099,e.serverErrorEnd=-32e3,e.ServerNotInitialized=-32002,e.UnknownErrorCode=-32001,e.RequestCancelled=-32800,e.MessageWriteError=1,e.MessageReadError=2}(r=t.ErrorCodes||(t.ErrorCodes={}));var a=function(e){function t(n,i,o){var a=e.call(this,i)||this;return a.code=s.number(n)?n:r.UnknownErrorCode,a.data=o,Object.setPrototypeOf(a,t.prototype),a}return o(t,e),t.prototype.toJson=function(){return{code:this.code,message:this.message,data:this.data}},t}(Error);t.ResponseError=a;var u=function(){function e(e,t){this._method=e,this._numberOfParams=t}return Object.defineProperty(e.prototype,"method",{get:function(){return this._method},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"numberOfParams",{get:function(){return this._numberOfParams},enumerable:!0,configurable:!0}),e}();t.AbstractMessageType=u;var l=function(e){function t(t){var n=e.call(this,t,0)||this;return n._=void 0,n}return o(t,e),t}(u);t.RequestType0=l;var c=function(e){function t(t){var n=e.call(this,t,1)||this;return n._=void 0,n}return o(t,e),t}(u);t.RequestType=c;var h=function(e){function t(t){var n=e.call(this,t,1)||this;return n._=void 0,n}return o(t,e),t}(u);t.RequestType1=h;var d=function(e){function t(t){var n=e.call(this,t,2)||this;return n._=void 0,n}return o(t,e),t}(u);t.RequestType2=d;var f=function(e){function t(t){var n=e.call(this,t,3)||this;return n._=void 0,n}return o(t,e),t}(u);t.RequestType3=f;var p=function(e){function t(t){var n=e.call(this,t,4)||this;return n._=void 0,n}return o(t,e),t}(u);t.RequestType4=p;var g=function(e){function t(t){var n=e.call(this,t,5)||this;return n._=void 0,n}return o(t,e),t}(u);t.RequestType5=g;var m=function(e){function t(t){var n=e.call(this,t,6)||this;return n._=void 0,n}return o(t,e),t}(u);t.RequestType6=m;var v=function(e){function t(t){var n=e.call(this,t,7)||this;return n._=void 0,n}return o(t,e),t}(u);t.RequestType7=v;var y=function(e){function t(t){var n=e.call(this,t,8)||this;return n._=void 0,n}return o(t,e),t}(u);t.RequestType8=y;var b=function(e){function t(t){var n=e.call(this,t,9)||this;return n._=void 0,n}return o(t,e),t}(u);t.RequestType9=b;var _=function(e){function t(t){var n=e.call(this,t,1)||this;return n._=void 0,n}return o(t,e),t}(u);t.NotificationType=_;var w=function(e){function t(t){var n=e.call(this,t,0)||this;return n._=void 0,n}return o(t,e),t}(u);t.NotificationType0=w;var M=function(e){function t(t){var n=e.call(this,t,1)||this;return n._=void 0,n}return o(t,e),t}(u);t.NotificationType1=M;var C=function(e){function t(t){var n=e.call(this,t,2)||this;return n._=void 0,n}return o(t,e),t}(u);t.NotificationType2=C;var S=function(e){function t(t){var n=e.call(this,t,3)||this;return n._=void 0,n}return o(t,e),t}(u);t.NotificationType3=S;var L=function(e){function t(t){var n=e.call(this,t,4)||this;return n._=void 0,n}return o(t,e),t}(u);t.NotificationType4=L;var I=function(e){function t(t){var n=e.call(this,t,5)||this;return n._=void 0,n}return o(t,e),t}(u);t.NotificationType5=I;var N=function(e){function t(t){var n=e.call(this,t,6)||this;return n._=void 0,n}return o(t,e),t}(u);t.NotificationType6=N;var x=function(e){function t(t){var n=e.call(this,t,7)||this;return n._=void 0,n}return o(t,e),t}(u);t.NotificationType7=x;var D=function(e){function t(t){var n=e.call(this,t,8)||this;return n._=void 0,n}return o(t,e),t}(u);t.NotificationType8=D;var k=function(e){function t(t){var n=e.call(this,t,9)||this;return n._=void 0,n}return o(t,e),t}(u);t.NotificationType9=k,t.isRequestMessage=function(e){var t=e;return t&&s.string(t.method)&&(s.string(t.id)||s.number(t.id))},t.isNotificationMessage=function(e){var t=e;return t&&s.string(t.method)&&void 0===e.id},t.isResponseMessage=function(e){var t=e;return t&&(void 0!==t.result||!!t.error)&&(s.string(t.id)||s.number(t.id)||null===t.id)}},2262:(e,t,n)=>{"use strict";var i=n(8957);Object.defineProperty(t,"__esModule",{value:!0});var o=n(4708),r=n(2935),s=n(5314),a=n(8849),u=n(8125),l=n(5417);t.generateRandomPipeName=function(){var e=s.randomBytes(21).toString("hex");return"win32"===i.platform?"\\\\.\\pipe\\vscode-jsonrpc-"+e+"-sock":o.join(r.tmpdir(),"vscode-"+e+".sock")},t.createClientPipeTransport=function(e,t){var n;void 0===t&&(t="utf-8");var i=new Promise((function(e,t){n=e}));return new Promise((function(o,r){var s=a.createServer((function(e){s.close(),n([new u.SocketMessageReader(e,t),new l.SocketMessageWriter(e,t)])}));s.on("error",r),s.listen(e,(function(){s.removeListener("error",r),o({onConnected:function(){return i}})}))}))},t.createServerPipeTransport=function(e,t){void 0===t&&(t="utf-8");var n=a.createConnection(e);return[new u.SocketMessageReader(n,t),new l.SocketMessageWriter(n,t)]}},2081:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(8849),o=n(8125),r=n(5417);t.createClientSocketTransport=function(e,t){var n;void 0===t&&(t="utf-8");var s=new Promise((function(e,t){n=e}));return new Promise((function(a,u){var l=i.createServer((function(e){l.close(),n([new o.SocketMessageReader(e,t),new r.SocketMessageWriter(e,t)])}));l.on("error",u),l.listen(e,"127.0.0.1",(function(){l.removeListener("error",u),a({onConnected:function(){return s}})}))}))},t.createServerSocketTransport=function(e,t){void 0===t&&(t="utf-8");var n=i.createConnection(e,"127.0.0.1");return[new o.SocketMessageReader(n,t),new r.SocketMessageWriter(n,t)]}},918:(e,t,n)=>{var i=n(5358);"string"==typeof i&&(i=[[e.id,i,""]]);n(650)(i,{hmr:!0,transform:void 0,insertInto:void 0}),i.locals&&(e.exports=i.locals)},3021:(e,t,n)=>{var i=n(7461);"string"==typeof i&&(i=[[e.id,i,""]]);n(650)(i,{hmr:!0,transform:void 0,insertInto:void 0}),i.locals&&(e.exports=i.locals)},7269:(e,t,n)=>{var i=n(6909);"string"==typeof i&&(i=[[e.id,i,""]]);n(650)(i,{hmr:!0,transform:void 0,insertInto:void 0}),i.locals&&(e.exports=i.locals)},2773:(e,t,n)=>{var i=n(7213);"string"==typeof i&&(i=[[e.id,i,""]]);n(650)(i,{hmr:!0,transform:void 0,insertInto:void 0}),i.locals&&(e.exports=i.locals)},3009:(e,t,n)=>{var i=n(5865);"string"==typeof i&&(i=[[e.id,i,""]]);n(650)(i,{hmr:!0,transform:void 0,insertInto:void 0}),i.locals&&(e.exports=i.locals)},2215:(e,t,n)=>{var i=n(7519);"string"==typeof i&&(i=[[e.id,i,""]]);n(650)(i,{hmr:!0,transform:void 0,insertInto:void 0}),i.locals&&(e.exports=i.locals)},4065:(e,t,n)=>{var i=n(7801);"string"==typeof i&&(i=[[e.id,i,""]]);n(650)(i,{hmr:!0,transform:void 0,insertInto:void 0}),i.locals&&(e.exports=i.locals)},4954:(e,t,n)=>{var i=n(6930);"string"==typeof i&&(i=[[e.id,i,""]]);n(650)(i,{hmr:!0,transform:void 0,insertInto:void 0}),i.locals&&(e.exports=i.locals)},4445:(e,t,n)=>{var i=n(8197);"string"==typeof i&&(i=[[e.id,i,""]]);n(650)(i,{hmr:!0,transform:void 0,insertInto:void 0}),i.locals&&(e.exports=i.locals)},2269:(e,t,n)=>{var i=n(8757);"string"==typeof i&&(i=[[e.id,i,""]]);n(650)(i,{hmr:!0,transform:void 0,insertInto:void 0}),i.locals&&(e.exports=i.locals)},2701:(e,t,n)=>{var i=n(8389);"string"==typeof i&&(i=[[e.id,i,""]]);n(650)(i,{hmr:!0,transform:void 0,insertInto:void 0}),i.locals&&(e.exports=i.locals)},9087:(e,t,n)=>{var i=n(5799);"string"==typeof i&&(i=[[e.id,i,""]]);n(650)(i,{hmr:!0,transform:void 0,insertInto:void 0}),i.locals&&(e.exports=i.locals)},437:(e,t,n)=>{var i=n(5245);"string"==typeof i&&(i=[[e.id,i,""]]);n(650)(i,{hmr:!0,transform:void 0,insertInto:void 0}),i.locals&&(e.exports=i.locals)},1825:(e,t,n)=>{var i=n(6953);"string"==typeof i&&(i=[[e.id,i,""]]);n(650)(i,{hmr:!0,transform:void 0,insertInto:void 0}),i.locals&&(e.exports=i.locals)},7297:(e,t,n)=>{var i=n(297);"string"==typeof i&&(i=[[e.id,i,""]]);n(650)(i,{hmr:!0,transform:void 0,insertInto:void 0}),i.locals&&(e.exports=i.locals)},1189:(e,t,n)=>{var i=n(9453);"string"==typeof i&&(i=[[e.id,i,""]]);n(650)(i,{hmr:!0,transform:void 0,insertInto:void 0}),i.locals&&(e.exports=i.locals)},6173:(e,t,n)=>{var i=n(6565);"string"==typeof i&&(i=[[e.id,i,""]]);n(650)(i,{hmr:!0,transform:void 0,insertInto:void 0}),i.locals&&(e.exports=i.locals)},461:(e,t,n)=>{var i=n(7653);"string"==typeof i&&(i=[[e.id,i,""]]);n(650)(i,{hmr:!0,transform:void 0,insertInto:void 0}),i.locals&&(e.exports=i.locals)},1848:(e,t,n)=>{var i=n(5728);"string"==typeof i&&(i=[[e.id,i,""]]);n(650)(i,{hmr:!0,transform:void 0,insertInto:void 0}),i.locals&&(e.exports=i.locals)},4188:(e,t,n)=>{var i=n(5700);"string"==typeof i&&(i=[[e.id,i,""]]);n(650)(i,{hmr:!0,transform:void 0,insertInto:void 0}),i.locals&&(e.exports=i.locals)},7052:(e,t,n)=>{var i=n(3956);"string"==typeof i&&(i=[[e.id,i,""]]);n(650)(i,{hmr:!0,transform:void 0,insertInto:void 0}),i.locals&&(e.exports=i.locals)},2612:(e,t,n)=>{var i=n(780);"string"==typeof i&&(i=[[e.id,i,""]]);n(650)(i,{hmr:!0,transform:void 0,insertInto:void 0}),i.locals&&(e.exports=i.locals)},9632:(e,t,n)=>{var i=n(4488);"string"==typeof i&&(i=[[e.id,i,""]]);n(650)(i,{hmr:!0,transform:void 0,insertInto:void 0}),i.locals&&(e.exports=i.locals)},6452:(e,t,n)=>{var i=n(4796);"string"==typeof i&&(i=[[e.id,i,""]]);n(650)(i,{hmr:!0,transform:void 0,insertInto:void 0}),i.locals&&(e.exports=i.locals)},1192:(e,t,n)=>{var i=n(704);"string"==typeof i&&(i=[[e.id,i,""]]);n(650)(i,{hmr:!0,transform:void 0,insertInto:void 0}),i.locals&&(e.exports=i.locals)},3721:(e,t,n)=>{var i=n(9425);"string"==typeof i&&(i=[[e.id,i,""]]);n(650)(i,{hmr:!0,transform:void 0,insertInto:void 0}),i.locals&&(e.exports=i.locals)},9062:(e,t,n)=>{var i=n(2270);"string"==typeof i&&(i=[[e.id,i,""]]);n(650)(i,{hmr:!0,transform:void 0,insertInto:void 0}),i.locals&&(e.exports=i.locals)},4504:(e,t,n)=>{var i=n(4464);"string"==typeof i&&(i=[[e.id,i,""]]);n(650)(i,{hmr:!0,transform:void 0,insertInto:void 0}),i.locals&&(e.exports=i.locals)},5620:(e,t,n)=>{var i=n(8444);"string"==typeof i&&(i=[[e.id,i,""]]);n(650)(i,{hmr:!0,transform:void 0,insertInto:void 0}),i.locals&&(e.exports=i.locals)},4480:(e,t,n)=>{var i=n(9512);"string"==typeof i&&(i=[[e.id,i,""]]);n(650)(i,{hmr:!0,transform:void 0,insertInto:void 0}),i.locals&&(e.exports=i.locals)},9964:(e,t,n)=>{var i=n(7508);"string"==typeof i&&(i=[[e.id,i,""]]);n(650)(i,{hmr:!0,transform:void 0,insertInto:void 0}),i.locals&&(e.exports=i.locals)},1492:(e,t,n)=>{var i=n(6044);"string"==typeof i&&(i=[[e.id,i,""]]);n(650)(i,{hmr:!0,transform:void 0,insertInto:void 0}),i.locals&&(e.exports=i.locals)},2108:(e,t,n)=>{var i=n(9412);"string"==typeof i&&(i=[[e.id,i,""]]);n(650)(i,{hmr:!0,transform:void 0,insertInto:void 0}),i.locals&&(e.exports=i.locals)},4256:(e,t,n)=>{var i=n(9432);"string"==typeof i&&(i=[[e.id,i,""]]);n(650)(i,{hmr:!0,transform:void 0,insertInto:void 0}),i.locals&&(e.exports=i.locals)},5549:(e,t,n)=>{var i=n(6117);"string"==typeof i&&(i=[[e.id,i,""]]);n(650)(i,{hmr:!0,transform:void 0,insertInto:void 0}),i.locals&&(e.exports=i.locals)},4374:(e,t,n)=>{var i=n(4238);"string"==typeof i&&(i=[[e.id,i,""]]);n(650)(i,{hmr:!0,transform:void 0,insertInto:void 0}),i.locals&&(e.exports=i.locals)},9268:(e,t,n)=>{var i=n(2076);"string"==typeof i&&(i=[[e.id,i,""]]);n(650)(i,{hmr:!0,transform:void 0,insertInto:void 0}),i.locals&&(e.exports=i.locals)},8189:(e,t,n)=>{var i=n(5701);"string"==typeof i&&(i=[[e.id,i,""]]);n(650)(i,{hmr:!0,transform:void 0,insertInto:void 0}),i.locals&&(e.exports=i.locals)},8165:(e,t,n)=>{var i=n(8845);"string"==typeof i&&(i=[[e.id,i,""]]);n(650)(i,{hmr:!0,transform:void 0,insertInto:void 0}),i.locals&&(e.exports=i.locals)},8401:(e,t,n)=>{var i=n(7753);"string"==typeof i&&(i=[[e.id,i,""]]);n(650)(i,{hmr:!0,transform:void 0,insertInto:void 0}),i.locals&&(e.exports=i.locals)},6315:(e,t,n)=>{var i=n(531);"string"==typeof i&&(i=[[e.id,i,""]]);n(650)(i,{hmr:!0,transform:void 0,insertInto:void 0}),i.locals&&(e.exports=i.locals)},3465:(e,t,n)=>{var i=n(6897);"string"==typeof i&&(i=[[e.id,i,""]]);n(650)(i,{hmr:!0,transform:void 0,insertInto:void 0}),i.locals&&(e.exports=i.locals)},729:(e,t,n)=>{var i=n(4945);"string"==typeof i&&(i=[[e.id,i,""]]);n(650)(i,{hmr:!0,transform:void 0,insertInto:void 0}),i.locals&&(e.exports=i.locals)},7853:(e,t,n)=>{var i=n(9957);"string"==typeof i&&(i=[[e.id,i,""]]);n(650)(i,{hmr:!0,transform:void 0,insertInto:void 0}),i.locals&&(e.exports=i.locals)},9925:(e,t,n)=>{var i=n(4701);"string"==typeof i&&(i=[[e.id,i,""]]);n(650)(i,{hmr:!0,transform:void 0,insertInto:void 0}),i.locals&&(e.exports=i.locals)},9501:(e,t,n)=>{var i=n(9333);"string"==typeof i&&(i=[[e.id,i,""]]);n(650)(i,{hmr:!0,transform:void 0,insertInto:void 0}),i.locals&&(e.exports=i.locals)},9114:(e,t,n)=>{var i=n(7490);"string"==typeof i&&(i=[[e.id,i,""]]);n(650)(i,{hmr:!0,transform:void 0,insertInto:void 0}),i.locals&&(e.exports=i.locals)},7609:(e,t,n)=>{var i=n(561);"string"==typeof i&&(i=[[e.id,i,""]]);n(650)(i,{hmr:!0,transform:void 0,insertInto:void 0}),i.locals&&(e.exports=i.locals)},541:(e,t,n)=>{var i=n(4053);"string"==typeof i&&(i=[[e.id,i,""]]);n(650)(i,{hmr:!0,transform:void 0,insertInto:void 0}),i.locals&&(e.exports=i.locals)},7313:(e,t,n)=>{var i=n(7913);"string"==typeof i&&(i=[[e.id,i,""]]);n(650)(i,{hmr:!0,transform:void 0,insertInto:void 0}),i.locals&&(e.exports=i.locals)},7445:(e,t,n)=>{var i=n(7181);"string"==typeof i&&(i=[[e.id,i,""]]);n(650)(i,{hmr:!0,transform:void 0,insertInto:void 0}),i.locals&&(e.exports=i.locals)},8521:(e,t,n)=>{var i=n(4737);"string"==typeof i&&(i=[[e.id,i,""]]);n(650)(i,{hmr:!0,transform:void 0,insertInto:void 0}),i.locals&&(e.exports=i.locals)},2029:(e,t,n)=>{var i=n(1445);"string"==typeof i&&(i=[[e.id,i,""]]);n(650)(i,{hmr:!0,transform:void 0,insertInto:void 0}),i.locals&&(e.exports=i.locals)},8605:(e,t,n)=>{var i=n(293);"string"==typeof i&&(i=[[e.id,i,""]]);n(650)(i,{hmr:!0,transform:void 0,insertInto:void 0}),i.locals&&(e.exports=i.locals)},4175:(e,t,n)=>{var i=n(3159);"string"==typeof i&&(i=[[e.id,i,""]]);n(650)(i,{hmr:!0,transform:void 0,insertInto:void 0}),i.locals&&(e.exports=i.locals)},1417:(e,t,n)=>{var i=n(6993);"string"==typeof i&&(i=[[e.id,i,""]]);n(650)(i,{hmr:!0,transform:void 0,insertInto:void 0}),i.locals&&(e.exports=i.locals)},9928:(e,t,n)=>{var i=n(3376);"string"==typeof i&&(i=[[e.id,i,""]]);n(650)(i,{hmr:!0,transform:void 0,insertInto:void 0}),i.locals&&(e.exports=i.locals)},8523:(e,t,n)=>{var i=n(579);"string"==typeof i&&(i=[[e.id,i,""]]);n(650)(i,{hmr:!0,transform:void 0,insertInto:void 0}),i.locals&&(e.exports=i.locals)},5676:(e,t,n)=>{var i=n(4900);"string"==typeof i&&(i=[[e.id,i,""]]);n(650)(i,{hmr:!0,transform:void 0,insertInto:void 0}),i.locals&&(e.exports=i.locals)},7946:(e,t,n)=>{var i=n(5762);"string"==typeof i&&(i=[[e.id,i,""]]);n(650)(i,{hmr:!0,transform:void 0,insertInto:void 0}),i.locals&&(e.exports=i.locals)},6336:(e,t,n)=>{var i=n(9528);"string"==typeof i&&(i=[[e.id,i,""]]);n(650)(i,{hmr:!0,transform:void 0,insertInto:void 0}),i.locals&&(e.exports=i.locals)},2114:(e,t,n)=>{var i=n(6394);"string"==typeof i&&(i=[[e.id,i,""]]);n(650)(i,{hmr:!0,transform:void 0,insertInto:void 0}),i.locals&&(e.exports=i.locals)},9176:(e,t,n)=>{var i=n(4576);"string"==typeof i&&(i=[[e.id,i,""]]);n(650)(i,{hmr:!0,transform:void 0,insertInto:void 0}),i.locals&&(e.exports=i.locals)},1121:(e,t,n)=>{var i=n(1129);"string"==typeof i&&(i=[[e.id,i,""]]);n(650)(i,{hmr:!0,transform:void 0,insertInto:void 0}),i.locals&&(e.exports=i.locals)},7512:(e,t,n)=>{var i=n(2368);"string"==typeof i&&(i=[[e.id,i,""]]);n(650)(i,{hmr:!0,transform:void 0,insertInto:void 0}),i.locals&&(e.exports=i.locals)},8982:()=>{},5409:()=>{},3776:()=>{},7965:()=>{},6089:()=>{},9368:()=>{},4688:()=>{},8489:()=>{},1069:()=>{},5340:()=>{},9838:()=>{},3779:()=>{},9580:()=>{},2922:()=>{},8849:()=>{},873:(e,t,n)=>{"use strict";n.r(t),n.d(t,{DefaultRubyVM:()=>T});class i{static read_bytes(e,t){const n=new i;return n.buf=e.getUint32(t,!0),n.buf_len=e.getUint32(t+4,!0),n}static read_bytes_array(e,t,n){const o=[];for(let r=0;r{}}(void 0===e||e,this.prefix)}get enabled(){return this.isEnabled}constructor(e){this.isEnabled=e,this.prefix="wasi:",this.enable(e)}}(!1);class s extends Error{constructor(e){super("exit with exit code "+e),this.code=e}}let a=class{start(e){this.inst=e;try{return e.exports._start(),0}catch(e){if(e instanceof s)return e.code;throw e}}initialize(e){this.inst=e,e.exports._initialize&&e.exports._initialize()}constructor(e,t,n,a={}){this.args=[],this.env=[],this.fds=[],r.enable(a.debug),this.args=e,this.env=t,this.fds=n;const u=this;this.wasiImport={args_sizes_get(e,t){const n=new DataView(u.inst.exports.memory.buffer);n.setUint32(e,u.args.length,!0);let i=0;for(const e of u.args)i+=e.length+1;return n.setUint32(t,i,!0),r.log(n.getUint32(e,!0),n.getUint32(t,!0)),0},args_get(e,t){const n=new DataView(u.inst.exports.memory.buffer),i=new Uint8Array(u.inst.exports.memory.buffer),o=t;for(let o=0;onull!=u.fds[e]?0:8,fd_allocate:(e,t,n)=>null!=u.fds[e]?u.fds[e].fd_allocate(t,n):8,fd_close(e){if(null!=u.fds[e]){const t=u.fds[e].fd_close();return u.fds[e]=void 0,t}return 8},fd_datasync:e=>null!=u.fds[e]?u.fds[e].fd_sync():8,fd_fdstat_get(e,t){if(null!=u.fds[e]){const{ret:n,fdstat:i}=u.fds[e].fd_fdstat_get();return null!=i&&i.write_bytes(new DataView(u.inst.exports.memory.buffer),t),n}return 8},fd_fdstat_set_flags:(e,t)=>null!=u.fds[e]?u.fds[e].fd_fdstat_set_flags(t):8,fd_fdstat_set_rights:(e,t,n)=>null!=u.fds[e]?u.fds[e].fd_fdstat_set_rights(t,n):8,fd_filestat_get(e,t){if(null!=u.fds[e]){const{ret:n,filestat:i}=u.fds[e].fd_filestat_get();return null!=i&&i.write_bytes(new DataView(u.inst.exports.memory.buffer),t),n}return 8},fd_filestat_set_size:(e,t)=>null!=u.fds[e]?u.fds[e].fd_filestat_set_size(t):8,fd_filestat_set_times:(e,t,n,i)=>null!=u.fds[e]?u.fds[e].fd_filestat_set_times(t,n,i):8,fd_pread(e,t,n,o,r){const s=new DataView(u.inst.exports.memory.buffer),a=new Uint8Array(u.inst.exports.memory.buffer);if(null!=u.fds[e]){const l=i.read_bytes_array(s,t,n);let c=0;for(const t of l){const{ret:n,data:i}=u.fds[e].fd_pread(t.buf_len,o);if(0!=n)return s.setUint32(r,c,!0),n;if(a.set(i,t.buf),c+=i.length,o+=BigInt(i.length),i.length!=t.buf_len)break}return s.setUint32(r,c,!0),0}return 8},fd_prestat_get(e,t){const n=new DataView(u.inst.exports.memory.buffer);if(null!=u.fds[e]){const{ret:i,prestat:o}=u.fds[e].fd_prestat_get();return null!=o&&o.write_bytes(n,t),i}return 8},fd_prestat_dir_name(e,t,n){if(null!=u.fds[e]){const{ret:i,prestat:o}=u.fds[e].fd_prestat_get();if(null==o)return i;const r=o.inner.pr_name;return new Uint8Array(u.inst.exports.memory.buffer).set(r.slice(0,n),t),r.byteLength>n?37:0}return 8},fd_pwrite(e,t,n,i,r){const s=new DataView(u.inst.exports.memory.buffer),a=new Uint8Array(u.inst.exports.memory.buffer);if(null!=u.fds[e]){const l=o.read_bytes_array(s,t,n);let c=0;for(const t of l){const n=a.slice(t.buf,t.buf+t.buf_len),{ret:o,nwritten:l}=u.fds[e].fd_pwrite(n,i);if(0!=o)return s.setUint32(r,c,!0),o;if(c+=l,i+=BigInt(l),l!=n.byteLength)break}return s.setUint32(r,c,!0),0}return 8},fd_read(e,t,n,o){const r=new DataView(u.inst.exports.memory.buffer),s=new Uint8Array(u.inst.exports.memory.buffer);if(null!=u.fds[e]){const a=i.read_bytes_array(r,t,n);let l=0;for(const t of a){const{ret:n,data:i}=u.fds[e].fd_read(t.buf_len);if(0!=n)return r.setUint32(o,l,!0),n;if(s.set(i,t.buf),l+=i.length,i.length!=t.buf_len)break}return r.setUint32(o,l,!0),0}return 8},fd_readdir(e,t,n,i,o){const r=new DataView(u.inst.exports.memory.buffer),s=new Uint8Array(u.inst.exports.memory.buffer);if(null!=u.fds[e]){let a=0;for(;;){const{ret:l,dirent:c}=u.fds[e].fd_readdir_single(i);if(0!=l)return r.setUint32(o,a,!0),l;if(null==c)break;if(n-anull!=u.fds[e]?u.fds[e].fd_sync():8,fd_tell(e,t){const n=new DataView(u.inst.exports.memory.buffer);if(null!=u.fds[e]){const{ret:i,offset:o}=u.fds[e].fd_tell();return n.setBigUint64(t,o,!0),i}return 8},fd_write(e,t,n,i){const r=new DataView(u.inst.exports.memory.buffer),s=new Uint8Array(u.inst.exports.memory.buffer);if(null!=u.fds[e]){const a=o.read_bytes_array(r,t,n);let l=0;for(const t of a){const n=s.slice(t.buf,t.buf+t.buf_len),{ret:o,nwritten:a}=u.fds[e].fd_write(n);if(0!=o)return r.setUint32(i,l,!0),o;if(l+=a,a!=n.byteLength)break}return r.setUint32(i,l,!0),0}return 8},path_create_directory(e,t,n){const i=new Uint8Array(u.inst.exports.memory.buffer);if(null!=u.fds[e]){const o=new TextDecoder("utf-8").decode(i.slice(t,t+n));return u.fds[e].path_create_directory(o)}return 8},path_filestat_get(e,t,n,i,o){const r=new DataView(u.inst.exports.memory.buffer),s=new Uint8Array(u.inst.exports.memory.buffer);if(null!=u.fds[e]){const a=new TextDecoder("utf-8").decode(s.slice(n,n+i)),{ret:l,filestat:c}=u.fds[e].path_filestat_get(t,a);return null!=c&&c.write_bytes(r,o),l}return 8},path_filestat_set_times(e,t,n,i,o,r,s){const a=new Uint8Array(u.inst.exports.memory.buffer);if(null!=u.fds[e]){const l=new TextDecoder("utf-8").decode(a.slice(n,n+i));return u.fds[e].path_filestat_set_times(t,l,o,r,s)}return 8},path_link(e,t,n,i,o,r,s){const a=new Uint8Array(u.inst.exports.memory.buffer);if(null!=u.fds[e]&&null!=u.fds[o]){const l=new TextDecoder("utf-8").decode(a.slice(n,n+i)),c=new TextDecoder("utf-8").decode(a.slice(r,r+s)),{ret:h,inode_obj:d}=u.fds[e].path_lookup(l,t);return null==d?h:u.fds[o].path_link(c,d,!1)}return 8},path_open(e,t,n,i,o,s,a,l,c){const h=new DataView(u.inst.exports.memory.buffer),d=new Uint8Array(u.inst.exports.memory.buffer);if(null!=u.fds[e]){const f=new TextDecoder("utf-8").decode(d.slice(n,n+i));r.log(f);const{ret:p,fd_obj:g}=u.fds[e].path_open(t,f,o,s,a,l);if(0!=p)return p;u.fds.push(g);const m=u.fds.length-1;return h.setUint32(c,m,!0),0}return 8},path_readlink(e,t,n,i,o,s){const a=new DataView(u.inst.exports.memory.buffer),l=new Uint8Array(u.inst.exports.memory.buffer);if(null!=u.fds[e]){const c=new TextDecoder("utf-8").decode(l.slice(t,t+n));r.log(c);const{ret:h,data:d}=u.fds[e].path_readlink(c);if(null!=d){const e=(new TextEncoder).encode(d);if(e.length>o)return a.setUint32(s,0,!0),8;l.set(e,i),a.setUint32(s,e.length,!0)}return h}return 8},path_remove_directory(e,t,n){const i=new Uint8Array(u.inst.exports.memory.buffer);if(null!=u.fds[e]){const o=new TextDecoder("utf-8").decode(i.slice(t,t+n));return u.fds[e].path_remove_directory(o)}return 8},path_rename(e,t,n,i,o,r){const s=new Uint8Array(u.inst.exports.memory.buffer);if(null!=u.fds[e]&&null!=u.fds[i]){const a=new TextDecoder("utf-8").decode(s.slice(t,t+n)),l=new TextDecoder("utf-8").decode(s.slice(o,o+r));let{ret:c,inode_obj:h}=u.fds[e].path_unlink(a);if(null==h)return c;if(c=u.fds[i].path_link(l,h,!0),0!=c&&0!=u.fds[e].path_link(a,h,!0))throw"path_link should always return success when relinking an inode back to the original place";return c}return 8},path_symlink(e,t,n,i,o){const r=new Uint8Array(u.inst.exports.memory.buffer);return null!=u.fds[n]?(new TextDecoder("utf-8").decode(r.slice(e,e+t)),new TextDecoder("utf-8").decode(r.slice(i,i+o)),58):8},path_unlink_file(e,t,n){const i=new Uint8Array(u.inst.exports.memory.buffer);if(null!=u.fds[e]){const o=new TextDecoder("utf-8").decode(i.slice(t,t+n));return u.fds[e].path_unlink_file(o)}return 8},poll_oneoff(e,t,n){throw"async io not supported"},proc_exit(e){throw new s(e)},proc_raise(e){throw"raised signal "+e},sched_yield(){},random_get(e,t){const n=new Uint8Array(u.inst.exports.memory.buffer);for(let i=0;i0;){o=t(o,i,1,i+e.length),i+=e.length;const{read:s,written:a}=h.encodeInto(e,new Uint8Array(n.buffer,o+r,i-r));r+=a,e=e.slice(s)}return i>r&&(o=t(o,i,1,r)),f=r,o}let f=0;class p{constructor(){this.list=[],this.head=0}insert(e){this.head>=this.list.length&&this.list.push({next:this.list.length+1,val:void 0});const t=this.head,n=this.list[t];return this.head=n.next,n.next=-1,n.val=e,t}get(e){if(e>=this.list.length)throw new RangeError("handle index not valid");const t=this.list[e];if(-1===t.next)return t.val;throw new RangeError("handle index not valid")}remove(e){const t=this.get(e),n=this.list[e];return n.val=void 0,n.next=this.head,this.head=e,t}}function g(){throw new RangeError("invalid variant discriminant for bool")}class m{constructor(){this._resource0_slab=new p,this._resource1_slab=new p}addToImports(e){"canonical_abi"in e||(e.canonical_abi={}),e.canonical_abi["resource_drop_rb-iseq"]=e=>{this._resource0_slab.remove(e).drop()},e.canonical_abi["resource_clone_rb-iseq"]=e=>{const t=this._resource0_slab.get(e);return this._resource0_slab.insert(t.clone())},e.canonical_abi["resource_get_rb-iseq"]=e=>this._resource0_slab.get(e)._wasm_val,e.canonical_abi["resource_new_rb-iseq"]=e=>(this._registry0,this._resource0_slab.insert(new v(e,this))),e.canonical_abi["resource_drop_rb-abi-value"]=e=>{this._resource1_slab.remove(e).drop()},e.canonical_abi["resource_clone_rb-abi-value"]=e=>{const t=this._resource1_slab.get(e);return this._resource1_slab.insert(t.clone())},e.canonical_abi["resource_get_rb-abi-value"]=e=>this._resource1_slab.get(e)._wasm_val,e.canonical_abi["resource_new_rb-abi-value"]=e=>(this._registry1,this._resource1_slab.insert(new y(e,this)))}async instantiate(e,t){if(t=t||{},this.addToImports(t),e instanceof WebAssembly.Instance)this.instance=e;else if(e instanceof WebAssembly.Module)this.instance=await WebAssembly.instantiate(e,t);else if(e instanceof ArrayBuffer||e instanceof Uint8Array){const{instance:n}=await WebAssembly.instantiate(e,t);this.instance=n}else{const{instance:n}=await WebAssembly.instantiateStreaming(e,t);this.instance=n}this._exports=this.instance.exports,this._registry0=new FinalizationRegistry(this._exports["canonical_abi_drop_rb-iseq"]),this._registry1=new FinalizationRegistry(this._exports["canonical_abi_drop_rb-abi-value"])}rubyShowVersion(){this._exports["ruby-show-version: func() -> ()"]()}rubyInit(){this._exports["ruby-init: func() -> ()"]()}rubySysinit(e){const t=this._exports.memory,n=this._exports.cabi_realloc,i=e,o=i.length,r=n(0,0,4,8*o);for(let e=0;e) -> ()"](r,o)}rubyOptions(e){const t=this._exports.memory,n=this._exports.cabi_realloc,i=e,o=i.length,r=n(0,0,4,8*o);for(let e=0;e) -> handle"](r,o);return this._resource0_slab.remove(s)}rubyScript(e){const t=this._exports.memory,n=d(e,this._exports.cabi_realloc,t),i=f;this._exports["ruby-script: func(name: string) -> ()"](n,i)}rubyInitLoadpath(){this._exports["ruby-init-loadpath: func() -> ()"]()}rbEvalStringProtect(e){const t=this._exports.memory,n=d(e,this._exports.cabi_realloc,t),i=f,o=this._exports["rb-eval-string-protect: func(str: string) -> tuple, s32>"](n,i);return[this._resource1_slab.remove(l(t).getInt32(o+0,!0)),l(t).getInt32(o+4,!0)]}rbFuncallvProtect(e,t,n){const i=this._exports.memory,o=this._exports.cabi_realloc,r=e;if(!(r instanceof y))throw new TypeError("expected instance of RbAbiValue");const s=n,a=s.length,u=o(0,0,4,4*a);for(let e=0;e, mid: u32, args: list>) -> tuple, s32>"](this._resource1_slab.insert(r.clone()),t>>>0,u,a);return[this._resource1_slab.remove(l(i).getInt32(c+0,!0)),l(i).getInt32(c+4,!0)]}rbIntern(e){const t=this._exports.memory,n=d(e,this._exports.cabi_realloc,t),i=f;return this._exports["rb-intern: func(name: string) -> u32"](n,i)>>>0}rbErrinfo(){const e=this._exports["rb-errinfo: func() -> handle"]();return this._resource1_slab.remove(e)}rbClearErrinfo(){this._exports["rb-clear-errinfo: func() -> ()"]()}rstringPtr(e){const t=this._exports.memory,n=e;if(!(n instanceof y))throw new TypeError("expected instance of RbAbiValue");const i=this._exports["rstring-ptr: func(value: handle) -> string"](this._resource1_slab.insert(n.clone())),o=l(t).getInt32(i+0,!0),r=l(t).getInt32(i+4,!0),s=c.decode(new Uint8Array(t.buffer,o,r));return this._exports["cabi_post_rstring-ptr"](i),s}rbVmBugreport(){this._exports["rb-vm-bugreport: func() -> ()"]()}rbGcEnable(){const e=this._exports["rb-gc-enable: func() -> bool"]();return 0!=e&&(1==e||g())}rbGcDisable(){const e=this._exports["rb-gc-disable: func() -> bool"]();return 0!=e&&(1==e||g())}rbSetShouldProhibitRewind(e){const t=this._exports["rb-set-should-prohibit-rewind: func(new-value: bool) -> bool"](e?1:0);return 0!=t&&(1==t||g())}}class v{constructor(e,t){this._wasm_val=e,this._obj=t,this._refcnt=1,t._registry0.register(this,e,this)}clone(){return this._refcnt+=1,this}drop(){if(this._refcnt-=1,0!==this._refcnt)return;this._obj._registry0.unregister(this);const e=this._obj._exports["canonical_abi_drop_rb-iseq"],t=this._wasm_val;delete this._obj,delete this._refcnt,delete this._wasm_val,e(t)}}class y{constructor(e,t){this._wasm_val=e,this._obj=t,this._refcnt=1,t._registry1.register(this,e,this)}clone(){return this._refcnt+=1,this}drop(){if(this._refcnt-=1,0!==this._refcnt)return;this._obj._registry1.unregister(this);const e=this._obj._exports["canonical_abi_drop_rb-abi-value"],t=this._wasm_val;delete this._obj,delete this._refcnt,delete this._wasm_val,e(t)}}class b{constructor(){this.instance=null,this.interfaceState={hasJSFrameAfterRbFrame:!1},this.guest=(e=>{const t=["constructor"].concat(["addToImports","instantiate","rbSetShouldProhibitRewind","rbGcDisable","rbGcEnable"]);for(const n of Object.getOwnPropertyNames(m.prototype)){if(t.includes(n))continue;const i=e[n];"function"==typeof i&&(e[n]=(...t)=>{if(this.interfaceState.hasJSFrameAfterRbFrame){const n=this.guest.rbSetShouldProhibitRewind(!0),o=this.guest.rbGcDisable(),r=Reflect.apply(i,e,t);return this.guest.rbSetShouldProhibitRewind(n),o||this.guest.rbGcEnable(),r}return Reflect.apply(i,e,t)})}return e})(new m),this.transport=new _,this.exceptionFormatter=new C}initialize(e=["ruby.wasm","-EUTF-8","-e_=0"]){const t=e.map((e=>e+"\0"));this.guest.rubyInit(),this.guest.rubySysinit(t),this.guest.rubyOptions(t),this.eval('require "/bundle/setup"')}async setInstance(e){this.instance=e,await this.guest.instantiate(e)}addToImports(e){function t(e){return(...t)=>{try{return{tag:"success",val:e(...t)}}catch(e){if(e instanceof k)throw e;return{tag:"failure",val:e}}}}this.guest.addToImports(e),e["rb-js-abi-host"]={rb_wasm_throw_prohibit_rewind_exception:(e,t)=>{const n=this.instance.exports.memory;let i=`Ruby APIs that may rewind the VM stack are prohibited under nested VM operation (${(new TextDecoder).decode(new Uint8Array(n.buffer,e,t))})\nNested VM operation means that the call stack has sandwitched JS frames like JS -> Ruby -> JS -> Ruby caused by something like \`window.rubyVM.eval("JS.global[:rubyVM].eval('Fiber.yield')")\`\n\nPlease check your call stack and make sure that you are **not** doing any of the following inside the nested Ruby frame:\n 1. Switching fibers (e.g. Fiber#resume, Fiber.yield, and Fiber#transfer)\n Note that \`evalAsync\` JS API switches fibers internally\n 2. Raising uncaught exceptions\n Please catch all exceptions inside the nested operation\n 3. Calling Continuation APIs\n`;const o=new w(this.guest.rbErrinfo(),this,this.privateObject());throw"false"===o.call("nil?").toString()&&(i+="\n"+this.exceptionFormatter.format(o,this,this.privateObject())),new k(i)}},function(e,t,n){"rb-js-abi-host"in e||(e["rb-js-abi-host"]={}),e["rb-js-abi-host"]["eval-js: func(code: string) -> variant { success(handle), failure(handle) }"]=function(e,o,r){const s=n("memory"),a=e,u=o,h=c.decode(new Uint8Array(s.buffer,a,u)),d=t.evalJs(h);switch(d.tag){case"success":{const e=d.val;l(s).setInt8(r+0,0,!0),l(s).setInt32(r+4,i.insert(e),!0);break}case"failure":{const e=d.val;l(s).setInt8(r+0,1,!0),l(s).setInt32(r+4,i.insert(e),!0);break}default:throw new RangeError("invalid variant specified for JsAbiResult")}},e["rb-js-abi-host"]["is-js: func(value: handle) -> bool"]=function(e){return t.isJs(i.get(e))?1:0},e["rb-js-abi-host"]["instance-of: func(value: handle, klass: handle) -> bool"]=function(e,n){return t.instanceOf(i.get(e),i.get(n))?1:0},e["rb-js-abi-host"]["global-this: func() -> handle"]=function(){const e=t.globalThis();return i.insert(e)},e["rb-js-abi-host"]["int-to-js-number: func(value: s32) -> handle"]=function(e){const n=t.intToJsNumber(e);return i.insert(n)},e["rb-js-abi-host"]["float-to-js-number: func(value: float64) -> handle"]=function(e){const n=t.floatToJsNumber(e);return i.insert(n)},e["rb-js-abi-host"]["string-to-js-string: func(value: string) -> handle"]=function(e,o){const r=n("memory"),s=e,a=o,u=c.decode(new Uint8Array(r.buffer,s,a)),l=t.stringToJsString(u);return i.insert(l)},e["rb-js-abi-host"]["bool-to-js-bool: func(value: bool) -> handle"]=function(e){const n=e,o=t.boolToJsBool(0!=n&&(1==n||g()));return i.insert(o)},e["rb-js-abi-host"]["proc-to-js-function: func(value: u32) -> handle"]=function(e){const n=t.procToJsFunction(e>>>0);return i.insert(n)},e["rb-js-abi-host"]["rb-object-to-js-rb-value: func(raw-rb-abi-value: u32) -> handle"]=function(e){const n=t.rbObjectToJsRbValue(e>>>0);return i.insert(n)},e["rb-js-abi-host"]["js-value-to-string: func(value: handle) -> string"]=function(e,o){const r=n("memory"),s=n("cabi_realloc"),a=d(t.jsValueToString(i.get(e)),s,r),u=f;l(r).setInt32(o+4,u,!0),l(r).setInt32(o+0,a,!0)},e["rb-js-abi-host"]["js-value-to-integer: func(value: handle) -> variant { f64(float64), bignum(string) }"]=function(e,o){const r=n("memory"),s=n("cabi_realloc"),a=t.jsValueToInteger(i.get(e));switch(a.tag){case"f64":{const e=a.val;l(r).setInt8(o+0,0,!0),l(r).setFloat64(o+8,+e,!0);break}case"bignum":{const e=a.val;l(r).setInt8(o+0,1,!0);const t=d(e,s,r),n=f;l(r).setInt32(o+12,n,!0),l(r).setInt32(o+8,t,!0);break}default:throw new RangeError("invalid variant specified for RawInteger")}},e["rb-js-abi-host"]["export-js-value-to-host: func(value: handle) -> ()"]=function(e){t.exportJsValueToHost(i.get(e))},e["rb-js-abi-host"]["import-js-value-from-host: func() -> handle"]=function(){const e=t.importJsValueFromHost();return i.insert(e)},e["rb-js-abi-host"]["js-value-typeof: func(value: handle) -> string"]=function(e,o){const r=n("memory"),s=n("cabi_realloc"),a=d(t.jsValueTypeof(i.get(e)),s,r),u=f;l(r).setInt32(o+4,u,!0),l(r).setInt32(o+0,a,!0)},e["rb-js-abi-host"]["js-value-equal: func(lhs: handle, rhs: handle) -> bool"]=function(e,n){return t.jsValueEqual(i.get(e),i.get(n))?1:0},e["rb-js-abi-host"]["js-value-strictly-equal: func(lhs: handle, rhs: handle) -> bool"]=function(e,n){return t.jsValueStrictlyEqual(i.get(e),i.get(n))?1:0},e["rb-js-abi-host"]["reflect-apply: func(target: handle, this-argument: handle, arguments: list>) -> variant { success(handle), failure(handle) }"]=function(e,o,r,s,a){const u=n("memory"),c=s,h=r,d=[];for(let e=0;e, arguments: list>) -> handle"]=function(e,o,r){const s=n("memory"),a=r,u=o,c=[];for(let e=0;e, property-key: string) -> bool"]=function(e,o,r){const s=n("memory"),a=o,u=r,l=c.decode(new Uint8Array(s.buffer,a,u));return t.reflectDeleteProperty(i.get(e),l)?1:0},e["rb-js-abi-host"]["reflect-get: func(target: handle, property-key: string) -> variant { success(handle), failure(handle) }"]=function(e,o,r,s){const a=n("memory"),u=o,h=r,d=c.decode(new Uint8Array(a.buffer,u,h)),f=t.reflectGet(i.get(e),d);switch(f.tag){case"success":{const e=f.val;l(a).setInt8(s+0,0,!0),l(a).setInt32(s+4,i.insert(e),!0);break}case"failure":{const e=f.val;l(a).setInt8(s+0,1,!0),l(a).setInt32(s+4,i.insert(e),!0);break}default:throw new RangeError("invalid variant specified for JsAbiResult")}},e["rb-js-abi-host"]["reflect-get-own-property-descriptor: func(target: handle, property-key: string) -> handle"]=function(e,o,r){const s=n("memory"),a=o,u=r,l=c.decode(new Uint8Array(s.buffer,a,u)),h=t.reflectGetOwnPropertyDescriptor(i.get(e),l);return i.insert(h)},e["rb-js-abi-host"]["reflect-get-prototype-of: func(target: handle) -> handle"]=function(e){const n=t.reflectGetPrototypeOf(i.get(e));return i.insert(n)},e["rb-js-abi-host"]["reflect-has: func(target: handle, property-key: string) -> bool"]=function(e,o,r){const s=n("memory"),a=o,u=r,l=c.decode(new Uint8Array(s.buffer,a,u));return t.reflectHas(i.get(e),l)?1:0},e["rb-js-abi-host"]["reflect-is-extensible: func(target: handle) -> bool"]=function(e){return t.reflectIsExtensible(i.get(e))?1:0},e["rb-js-abi-host"]["reflect-own-keys: func(target: handle) -> list>"]=function(e,o){const r=n("memory"),s=n("cabi_realloc"),a=t.reflectOwnKeys(i.get(e)),u=a.length,c=s(0,0,4,4*u);for(let e=0;e) -> bool"]=function(e){return t.reflectPreventExtensions(i.get(e))?1:0},e["rb-js-abi-host"]["reflect-set: func(target: handle, property-key: string, value: handle) -> variant { success(handle), failure(handle) }"]=function(e,o,r,s,a){const u=n("memory"),h=o,d=r,f=c.decode(new Uint8Array(u.buffer,h,d)),p=t.reflectSet(i.get(e),f,i.get(s));switch(p.tag){case"success":{const e=p.val;l(u).setInt8(a+0,0,!0),l(u).setInt32(a+4,i.insert(e),!0);break}case"failure":{const e=p.val;l(u).setInt8(a+0,1,!0),l(u).setInt32(a+4,i.insert(e),!0);break}default:throw new RangeError("invalid variant specified for JsAbiResult")}},e["rb-js-abi-host"]["reflect-set-prototype-of: func(target: handle, prototype: handle) -> bool"]=function(e,n){return t.reflectSetPrototypeOf(i.get(e),i.get(n))?1:0},"canonical_abi"in e||(e.canonical_abi={});const i=new p;e.canonical_abi["resource_drop_js-abi-value"]=e=>{const n=i.remove(e);t.dropJsAbiValue&&t.dropJsAbiValue(n)}}(e,(e=>{for(const[t,n]of Object.entries(e))"function"==typeof n&&(e[t]=(...t)=>{const i=this.interfaceState.hasJSFrameAfterRbFrame;this.interfaceState.hasJSFrameAfterRbFrame=!0;const o=Reflect.apply(n,e,t);return this.interfaceState.hasJSFrameAfterRbFrame=i,o});return e})({evalJs:t((e=>Function(e)())),isJs:e=>!0,globalThis:()=>{if("undefined"!=typeof globalThis)return globalThis;if("undefined"!=typeof global)return global;if("undefined"!=typeof window)return window;throw new Error("unable to locate global object")},intToJsNumber:e=>e,floatToJsNumber:e=>e,stringToJsString:e=>e,boolToJsBool:e=>e,procToJsFunction:e=>{const t=this.rbValueOfPointer(e);return(...e)=>t.call("call",...e.map((e=>this.wrap(e)))).toJS()},rbObjectToJsRbValue:e=>this.rbValueOfPointer(e),jsValueToString:e=>String(e),jsValueToInteger:e=>"number"==typeof e?{tag:"f64",val:e}:"bigint"==typeof e?{tag:"bignum",val:BigInt(e).toString(10)+"\0"}:"string"==typeof e?{tag:"bignum",val:e+"\0"}:void 0===e?{tag:"f64",val:0}:{tag:"f64",val:Number(e)},exportJsValueToHost:e=>{this.transport.takeJsValue(e)},importJsValueFromHost:()=>this.transport.consumeJsValue(),instanceOf:(e,t)=>"function"==typeof t&&e instanceof t,jsValueTypeof:e=>typeof e,jsValueEqual:(e,t)=>e==t,jsValueStrictlyEqual:(e,t)=>e===t,reflectApply:t(((e,t,n)=>Reflect.apply(e,t,n))),reflectConstruct:function(e,t){throw new Error("Function not implemented.")},reflectDeleteProperty:function(e,t){throw new Error("Function not implemented.")},reflectGet:t(((e,t)=>e[t])),reflectGetOwnPropertyDescriptor:function(e,t){throw new Error("Function not implemented.")},reflectGetPrototypeOf:function(e){throw new Error("Function not implemented.")},reflectHas:function(e,t){throw new Error("Function not implemented.")},reflectIsExtensible:function(e){throw new Error("Function not implemented.")},reflectOwnKeys:function(e){throw new Error("Function not implemented.")},reflectPreventExtensions:function(e){throw new Error("Function not implemented.")},reflectSet:t(((e,t,n)=>Reflect.set(e,t,n))),reflectSetPrototypeOf:function(e,t){throw new Error("Function not implemented.")}}),(e=>this.instance.exports[e]))}printVersion(){this.guest.rubyShowVersion()}eval(e){return N(this,this.privateObject(),e)}evalAsync(e){const t=this.eval("require 'js'; JS");return x(this,this.privateObject(),(n=>{t.call("__eval_async_rb",this.wrap(e),n)}))}wrap(e){return this.transport.importJsValue(e,this)}privateObject(){return{transport:this.transport,exceptionFormatter:this.exceptionFormatter}}rbValueOfPointer(e){const t=new y(e,this.guest);return new w(t,this,this.privateObject())}}class _{constructor(){this._takenJsValue=null}takeJsValue(e){this._takenJsValue=e}consumeJsValue(){return this._takenJsValue}exportJsValue(e){return e.call("__export_to_js"),this._takenJsValue}importJsValue(e,t){return this._takenJsValue=e,t.eval('require "js"; JS::Object').call("__import_from_js")}}class w{constructor(e,t,n){this.inner=e,this.vm=t,this.privateObject=n}call(e,...t){const n=t.map((e=>e.inner));return new w(I(this.vm,this.privateObject,this.inner,e,n),this.vm,this.privateObject)}callAsync(e,...t){const n=this.vm.eval("require 'js'; JS");return x(this.vm,this.privateObject,(i=>{n.call("__call_async_method",this,this.vm.wrap(e),i,...t)}))}[Symbol.toPrimitive](e){return"string"===e||"default"===e?this.toString():null}toString(){const e=I(this.vm,this.privateObject,this.inner,"to_s",[]);return this.vm.guest.rstringPtr(e)}toJS(){const e=this.vm.eval("JS").call("try_convert",this);return"true"===e.call("nil?").toString()?null:this.privateObject.transport.exportJsValue(e)}}var M;!function(e){e[e.None=0]="None",e[e.Return=1]="Return",e[e.Break=2]="Break",e[e.Next=3]="Next",e[e.Retry=4]="Retry",e[e.Redo=5]="Redo",e[e.Raise=6]="Raise",e[e.Throw=7]="Throw",e[e.Fatal=8]="Fatal",e[e.Mask=15]="Mask"}(M||(M={}));class C{constructor(){this.literalsCache=null,this.isFormmatting=!1}format(e,t,n){class i extends Error{}if(this.isFormmatting)throw new i("Unexpected exception occurred during formatting exception message");this.isFormmatting=!0;try{return this._format(e,t,n)}finally{this.isFormmatting=!1}}_format(e,t,n){const[i,o,r]=(()=>{if(null==this.literalsCache){const e=[N(t,n,"0"),N(t,n,"1"),N(t,n,'"\n"')];return this.literalsCache=e,e}return this.literalsCache})();let s,a,u;try{s=e.call("class").toString()}catch(e){s="unknown"}try{u=e.call("message").toString()}catch(e){u="unknown"}try{a=e.call("backtrace")}catch(e){return this.formatString(s,u)}if("true"===a.call("nil?").toString())return this.formatString(s,u);try{const e=a.call("at",i),t=a.call("drop",o).call("join",r);return this.formatString(s,u,[e.toString(),t.toString()])}catch(e){return this.formatString(s,u)}}formatString(e,t,n){return n?`${n[0]}: ${t} (${e})\n${n[1]}`:`${e}: ${t}`}}const S=(e,t,n)=>{switch(e&M.Mask){case M.None:break;case M.Return:throw new D("unexpected return");case M.Next:throw new D("unexpected next");case M.Break:throw new D("unexpected break");case M.Redo:throw new D("unexpected redo");case M.Retry:throw new D("retry outside of rescue clause");case M.Throw:throw new D("unexpected throw");case M.Raise:case M.Fatal:const i=new w(t.guest.rbErrinfo(),t,n);if("true"===i.call("nil?").toString())throw new D("no exception object");throw t.guest.rbClearErrinfo(),new D(n.exceptionFormatter.format(i,t,n));default:throw new D(`unknown error tag: ${e}`)}};function L(e,t){try{return t()}catch(t){if(t instanceof D)throw t;if(e.guest.rbVmBugreport(),t instanceof WebAssembly.RuntimeError&&"unreachable"===t.message){const e=new D(`Something went wrong in Ruby VM: ${t}`);throw e.stack=t.stack,e}throw t}}const I=(e,t,n,i,o)=>{const r=e.guest.rbIntern(i+"\0");return L(e,(()=>{const[i,s]=e.guest.rbFuncallvProtect(n,r,o);return S(s,e,t),i}))},N=(e,t,n)=>L(e,(()=>{const[i,o]=e.guest.rbEvalStringProtect(n+"\0");return S(o,e,t),new w(i,e,t)}));function x(e,t,n){return new Promise(((i,o)=>{const r=e.wrap({resolve:i,reject:n=>{const i=new D(t.exceptionFormatter.format(n,e,t));o(i)}});n(r)}))}class D extends Error{constructor(e){super(e)}}class k extends D{constructor(e){super("Ruby Fatal Error: "+e)}}const T=async(e,t={})=>{var n,i;const o=Object.entries(null!==(n=t.env)&&void 0!==n?n:{}).map((([e,t])=>`${e}=${t}`)),r=new a([],o,[],{debug:!1}),s=new b,u={wasi_snapshot_preview1:r.wasiImport};s.addToImports(u);const l=null===(i=t.consolePrint)||void 0===i||i?function({stdout:e,stderr:t}={stdout:console.log,stderr:console.warn}){let n,i;function o(){if(void 0===n)throw new Error("Memory is not set");return void 0!==i&&0!==i.buffer.byteLength||(i=new DataView(n.buffer)),i}const r=new TextDecoder;return{addToImports(i){const s=i.wasi_snapshot_preview1,a=s.fd_write;s.fd_write=(i,s,u,l)=>{if(1!==i&&2!==i)return a(i,s,u,l);const c=o(),h=Array.from({length:u},((e,t)=>{const i=s+8*t,o=c.getUint32(i,!0),r=c.getUint32(i+4,!0);return new Uint8Array(n.buffer,o,r)}));let d=0,f="";for(const e of h)f+=r.decode(e),d+=e.byteLength;return c.setUint32(l,d,!0),(1===i?e:t)(f),0};const u=s.fd_filestat_get;s.fd_filestat_get=(e,t)=>{if(1!==e&&2!==e)return u(e,t);const n=o(),i=u(e,t);if(0!==i)return i;const r=t+0;return n.setUint8(r,2),0};const l=s.fd_fdstat_get;s.fd_fdstat_get=(e,t)=>{if(1!==e&&2!==e)return l(e,t);const n=o(),i=t+0;n.setUint8(i,2);const r=t+8;return n.setBigUint64(r,BigInt(1)),0}},setMemory(e){n=e}}}():void 0;null==l||l.addToImports(u);const c=await WebAssembly.instantiate(e,u);return await s.setInstance(c),null==l||l.setMemory(c.exports.memory),r.initialize(c),s.initialize(),{vm:s,wasi:r,instance:c}}},3219:e=>{"use strict";e.exports=JSON.parse('{"aes-128-ecb":{"cipher":"AES","key":128,"iv":0,"mode":"ECB","type":"block"},"aes-192-ecb":{"cipher":"AES","key":192,"iv":0,"mode":"ECB","type":"block"},"aes-256-ecb":{"cipher":"AES","key":256,"iv":0,"mode":"ECB","type":"block"},"aes-128-cbc":{"cipher":"AES","key":128,"iv":16,"mode":"CBC","type":"block"},"aes-192-cbc":{"cipher":"AES","key":192,"iv":16,"mode":"CBC","type":"block"},"aes-256-cbc":{"cipher":"AES","key":256,"iv":16,"mode":"CBC","type":"block"},"aes128":{"cipher":"AES","key":128,"iv":16,"mode":"CBC","type":"block"},"aes192":{"cipher":"AES","key":192,"iv":16,"mode":"CBC","type":"block"},"aes256":{"cipher":"AES","key":256,"iv":16,"mode":"CBC","type":"block"},"aes-128-cfb":{"cipher":"AES","key":128,"iv":16,"mode":"CFB","type":"stream"},"aes-192-cfb":{"cipher":"AES","key":192,"iv":16,"mode":"CFB","type":"stream"},"aes-256-cfb":{"cipher":"AES","key":256,"iv":16,"mode":"CFB","type":"stream"},"aes-128-cfb8":{"cipher":"AES","key":128,"iv":16,"mode":"CFB8","type":"stream"},"aes-192-cfb8":{"cipher":"AES","key":192,"iv":16,"mode":"CFB8","type":"stream"},"aes-256-cfb8":{"cipher":"AES","key":256,"iv":16,"mode":"CFB8","type":"stream"},"aes-128-cfb1":{"cipher":"AES","key":128,"iv":16,"mode":"CFB1","type":"stream"},"aes-192-cfb1":{"cipher":"AES","key":192,"iv":16,"mode":"CFB1","type":"stream"},"aes-256-cfb1":{"cipher":"AES","key":256,"iv":16,"mode":"CFB1","type":"stream"},"aes-128-ofb":{"cipher":"AES","key":128,"iv":16,"mode":"OFB","type":"stream"},"aes-192-ofb":{"cipher":"AES","key":192,"iv":16,"mode":"OFB","type":"stream"},"aes-256-ofb":{"cipher":"AES","key":256,"iv":16,"mode":"OFB","type":"stream"},"aes-128-ctr":{"cipher":"AES","key":128,"iv":16,"mode":"CTR","type":"stream"},"aes-192-ctr":{"cipher":"AES","key":192,"iv":16,"mode":"CTR","type":"stream"},"aes-256-ctr":{"cipher":"AES","key":256,"iv":16,"mode":"CTR","type":"stream"},"aes-128-gcm":{"cipher":"AES","key":128,"iv":12,"mode":"GCM","type":"auth"},"aes-192-gcm":{"cipher":"AES","key":192,"iv":12,"mode":"GCM","type":"auth"},"aes-256-gcm":{"cipher":"AES","key":256,"iv":12,"mode":"GCM","type":"auth"}}')},2951:e=>{"use strict";e.exports=JSON.parse('{"sha224WithRSAEncryption":{"sign":"rsa","hash":"sha224","id":"302d300d06096086480165030402040500041c"},"RSA-SHA224":{"sign":"ecdsa/rsa","hash":"sha224","id":"302d300d06096086480165030402040500041c"},"sha256WithRSAEncryption":{"sign":"rsa","hash":"sha256","id":"3031300d060960864801650304020105000420"},"RSA-SHA256":{"sign":"ecdsa/rsa","hash":"sha256","id":"3031300d060960864801650304020105000420"},"sha384WithRSAEncryption":{"sign":"rsa","hash":"sha384","id":"3041300d060960864801650304020205000430"},"RSA-SHA384":{"sign":"ecdsa/rsa","hash":"sha384","id":"3041300d060960864801650304020205000430"},"sha512WithRSAEncryption":{"sign":"rsa","hash":"sha512","id":"3051300d060960864801650304020305000440"},"RSA-SHA512":{"sign":"ecdsa/rsa","hash":"sha512","id":"3051300d060960864801650304020305000440"},"RSA-SHA1":{"sign":"rsa","hash":"sha1","id":"3021300906052b0e03021a05000414"},"ecdsa-with-SHA1":{"sign":"ecdsa","hash":"sha1","id":""},"sha256":{"sign":"ecdsa","hash":"sha256","id":""},"sha224":{"sign":"ecdsa","hash":"sha224","id":""},"sha384":{"sign":"ecdsa","hash":"sha384","id":""},"sha512":{"sign":"ecdsa","hash":"sha512","id":""},"DSA-SHA":{"sign":"dsa","hash":"sha1","id":""},"DSA-SHA1":{"sign":"dsa","hash":"sha1","id":""},"DSA":{"sign":"dsa","hash":"sha1","id":""},"DSA-WITH-SHA224":{"sign":"dsa","hash":"sha224","id":""},"DSA-SHA224":{"sign":"dsa","hash":"sha224","id":""},"DSA-WITH-SHA256":{"sign":"dsa","hash":"sha256","id":""},"DSA-SHA256":{"sign":"dsa","hash":"sha256","id":""},"DSA-WITH-SHA384":{"sign":"dsa","hash":"sha384","id":""},"DSA-SHA384":{"sign":"dsa","hash":"sha384","id":""},"DSA-WITH-SHA512":{"sign":"dsa","hash":"sha512","id":""},"DSA-SHA512":{"sign":"dsa","hash":"sha512","id":""},"DSA-RIPEMD160":{"sign":"dsa","hash":"rmd160","id":""},"ripemd160WithRSA":{"sign":"rsa","hash":"rmd160","id":"3021300906052b2403020105000414"},"RSA-RIPEMD160":{"sign":"rsa","hash":"rmd160","id":"3021300906052b2403020105000414"},"md5WithRSAEncryption":{"sign":"rsa","hash":"md5","id":"3020300c06082a864886f70d020505000410"},"RSA-MD5":{"sign":"rsa","hash":"md5","id":"3020300c06082a864886f70d020505000410"}}')},4589:e=>{"use strict";e.exports=JSON.parse('{"1.3.132.0.10":"secp256k1","1.3.132.0.33":"p224","1.2.840.10045.3.1.1":"p192","1.2.840.10045.3.1.7":"p256","1.3.132.0.34":"p384","1.3.132.0.35":"p521"}')},3241:e=>{"use strict";e.exports=JSON.parse('{"modp1":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a3620ffffffffffffffff"},"modp2":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece65381ffffffffffffffff"},"modp5":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca237327ffffffffffffffff"},"modp14":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aacaa68ffffffffffffffff"},"modp15":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a93ad2caffffffffffffffff"},"modp16":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199ffffffffffffffff"},"modp17":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff"},"modp18":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff"}}')},1636:e=>{"use strict";e.exports={rE:"6.5.5"}},5579:e=>{"use strict";e.exports=JSON.parse('{"2.16.840.1.101.3.4.1.1":"aes-128-ecb","2.16.840.1.101.3.4.1.2":"aes-128-cbc","2.16.840.1.101.3.4.1.3":"aes-128-ofb","2.16.840.1.101.3.4.1.4":"aes-128-cfb","2.16.840.1.101.3.4.1.21":"aes-192-ecb","2.16.840.1.101.3.4.1.22":"aes-192-cbc","2.16.840.1.101.3.4.1.23":"aes-192-ofb","2.16.840.1.101.3.4.1.24":"aes-192-cfb","2.16.840.1.101.3.4.1.41":"aes-256-ecb","2.16.840.1.101.3.4.1.42":"aes-256-cbc","2.16.840.1.101.3.4.1.43":"aes-256-ofb","2.16.840.1.101.3.4.1.44":"aes-256-cfb"}')}},__webpack_module_cache__={};function __webpack_require__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var n=__webpack_module_cache__[e]={id:e,loaded:!1,exports:{}};return __webpack_modules__[e].call(n.exports,n,n.exports,__webpack_require__),n.loaded=!0,n.exports}__webpack_require__.d=(e,t)=>{for(var n in t)__webpack_require__.o(t,n)&&!__webpack_require__.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},__webpack_require__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),__webpack_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),__webpack_require__.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},__webpack_require__.nmd=e=>(e.paths=[],e.children||(e.children=[]),e);var __webpack_exports__={};(()=>{"use strict";__webpack_require__(5609),__webpack_require__(6625),self.MonacoEnvironment={getWorkerUrl:function(){return"./monaco/lib/editor.worker.bundle.js"}},__webpack_require__(4081)})()})(); +(()=>{var __webpack_modules__={5358:(e,t,n)=>{(e.exports=n(8826)(!1)).push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-builder-hidden {\n\tdisplay: none !important;\n}",""])},7461:(e,t,n)=>{(e.exports=n(8826)(!1)).push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-action-bar {\n\ttext-align: right;\n\toverflow: hidden;\n\twhite-space: nowrap;\n}\n\n.monaco-action-bar .actions-container {\n\tdisplay: flex;\n\tmargin: 0 auto;\n\tpadding: 0;\n\twidth: 100%;\n\tjustify-content: flex-end;\n}\n\n.monaco-action-bar.vertical .actions-container {\n\tdisplay: inline-block;\n}\n\n.monaco-action-bar.reverse .actions-container {\n\tflex-direction: row-reverse;\n}\n\n.monaco-action-bar .action-item {\n\tcursor: pointer;\n\tdisplay: inline-block;\n\t-ms-transition: -ms-transform 50ms ease;\n\t-webkit-transition: -webkit-transform 50ms ease;\n\t-moz-transition: -moz-transform 50ms ease;\n\t-o-transition: -o-transform 50ms ease;\n\ttransition: transform 50ms ease;\n\tposition: relative; /* DO NOT REMOVE - this is the key to preventing the ghosting icon bug in Chrome 42 */\n}\n\n.monaco-action-bar .action-item.disabled {\n\tcursor: default;\n}\n\n.monaco-action-bar.animated .action-item.active {\n\t-ms-transform: scale(1.272019649, 1.272019649); /* 1.272019649 = √φ */\n\t-webkit-transform: scale(1.272019649, 1.272019649);\n\t-moz-transform: scale(1.272019649, 1.272019649);\n\t-o-transform: scale(1.272019649, 1.272019649);\n\ttransform: scale(1.272019649, 1.272019649);\n}\n\n.monaco-action-bar .action-item .icon {\n\tdisplay: inline-block;\n}\n\n.monaco-action-bar .action-label {\n\tfont-size: 11px;\n\tmargin-right: 4px;\n}\n\n.monaco-action-bar .action-label.octicon {\n\tfont-size: 15px;\n\tline-height: 35px;\n\ttext-align: center;\n}\n\n.monaco-action-bar .action-item.disabled .action-label,\n.monaco-action-bar .action-item.disabled .action-label:hover {\n\topacity: 0.4;\n}\n\n/* Vertical actions */\n\n.monaco-action-bar.vertical {\n\ttext-align: left;\n}\n\n.monaco-action-bar.vertical .action-item {\n\tdisplay: block;\n}\n\n.monaco-action-bar.vertical .action-label.separator {\n\tdisplay: block;\n\tborder-bottom: 1px solid #bbb;\n\tpadding-top: 1px;\n\tmargin-left: .8em;\n\tmargin-right: .8em;\n}\n\n.monaco-action-bar.animated.vertical .action-item.active {\n\t-ms-transform: translate(5px, 0);\n\t-webkit-transform: translate(5px, 0);\n\t-moz-transform: translate(5px, 0);\n\t-o-transform: translate(5px, 0);\n\ttransform: translate(5px, 0);\n}\n\n.secondary-actions .monaco-action-bar .action-label {\n\tmargin-left: 6px;\n}\n\n/* Action Items */\n.monaco-action-bar .action-item.select-container {\n\toverflow: hidden; /* somehow the dropdown overflows its container, we prevent it here to not push */\n\tflex: 1;\n\tmax-width: 170px;\n\tmin-width: 60px;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n}",""])},6909:(e,t,n)=>{(e.exports=n(8826)(!1)).push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-aria-container {\n\tposition: absolute; /* try to hide from window but not from screen readers */\n\tleft:-999em;\n}",""])},7213:(e,t,n)=>{(e.exports=n(8826)(!1)).push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-custom-checkbox {\n\tmargin-left: 2px;\n\tfloat: left;\n\tcursor: pointer;\n\toverflow: hidden;\n\topacity: 0.7;\n\twidth: 20px;\n\theight: 20px;\n\tborder: 1px solid transparent;\n\tpadding: 1px;\n\n\t-webkit-box-sizing:\tborder-box;\n\t-o-box-sizing:\t\tborder-box;\n\t-moz-box-sizing:\tborder-box;\n\t-ms-box-sizing:\t\tborder-box;\n\tbox-sizing:\t\t\tborder-box;\n\n\t-webkit-user-select: none;\n\t-khtml-user-select: none;\n\t-moz-user-select: none;\n\t-o-user-select: none;\n\t-ms-user-select: none;\n\tuser-select: none;\n}\n\n.monaco-custom-checkbox:hover,\n.monaco-custom-checkbox.checked {\n\topacity: 1;\n}\n\n.hc-black .monaco-custom-checkbox {\n\tbackground: none;\n}\n\n.hc-black .monaco-custom-checkbox:hover {\n\tbackground: none;\n}",""])},5865:(e,t,n)=>{(e.exports=n(8826)(!1)).push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.context-view {\n\tposition: absolute;\n\tz-index: 2000;\n}",""])},7519:(e,t,n)=>{(e.exports=n(8826)(!1)).push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-count-badge {\n\tpadding: 0.3em 0.5em;\n\tborder-radius: 1em;\n\tfont-size: 85%;\n\tmin-width: 1.6em;\n\tline-height: 1em;\n\tfont-weight: normal;\n\ttext-align: center;\n\tdisplay: inline-block;\n\tbox-sizing: border-box;\n}",""])},7801:(e,t,n)=>{(e.exports=n(8826)(!1)).push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n/* ---------- Find input ---------- */\n\n.monaco-findInput {\n\tposition: relative;\n}\n\n.monaco-findInput .monaco-inputbox {\n\tfont-size: 13px;\n\twidth: 100%;\n\theight: 25px;\n}\n\n.monaco-findInput > .controls {\n\tposition: absolute;\n\ttop: 3px;\n\tright: 2px;\n}\n\n.vs .monaco-findInput.disabled {\n\tbackground-color: #E1E1E1;\n}\n\n/* Theming */\n.vs-dark .monaco-findInput.disabled {\n\tbackground-color: #333;\n}\n\n/* Highlighting */\n.monaco-findInput.highlight-0 .controls {\n\tanimation: monaco-findInput-highlight-0 100ms linear 0s;\n}\n.monaco-findInput.highlight-1 .controls {\n\tanimation: monaco-findInput-highlight-1 100ms linear 0s;\n}\n.hc-black .monaco-findInput.highlight-0 .controls,\n.vs-dark .monaco-findInput.highlight-0 .controls {\n\tanimation: monaco-findInput-highlight-dark-0 100ms linear 0s;\n}\n.hc-black .monaco-findInput.highlight-1 .controls,\n.vs-dark .monaco-findInput.highlight-1 .controls {\n\tanimation: monaco-findInput-highlight-dark-1 100ms linear 0s;\n}\n\n@keyframes monaco-findInput-highlight-0 {\n\t0% { background: rgba(253, 255, 0, 0.8); }\n\t100% { background: transparent; }\n}\n@keyframes monaco-findInput-highlight-1 {\n\t0% { background: rgba(253, 255, 0, 0.8); }\n\t/* Made intentionally different such that the CSS minifier does not collapse the two animations into a single one*/\n\t99% { background: transparent; }\n}\n\n@keyframes monaco-findInput-highlight-dark-0 {\n\t0% { background: rgba(255, 255, 255, 0.44); }\n\t100% { background: transparent; }\n}\n@keyframes monaco-findInput-highlight-dark-1 {\n\t0% { background: rgba(255, 255, 255, 0.44); }\n\t/* Made intentionally different such that the CSS minifier does not collapse the two animations into a single one*/\n\t99% { background: transparent; }\n}",""])},6930:(e,t,n)=>{(e.exports=n(8826)(!1)).push([e.id,'/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.vs .monaco-custom-checkbox.monaco-case-sensitive {\n\tbackground: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+PHN0eWxlIHR5cGU9InRleHQvY3NzIj4uc3Qwe29wYWNpdHk6MDtmaWxsOiNGNkY2RjY7fSAuc3Qxe2ZpbGw6I0Y2RjZGNjt9IC5zdDJ7ZmlsbDojNDI0MjQyO308L3N0eWxlPjxnIGlkPSJvdXRsaW5lIj48cmVjdCBjbGFzcz0ic3QwIiB3aWR0aD0iMTYiIGhlaWdodD0iMTYiLz48cG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S4zNjYtLjI4MS0uMzM4LS4zNjMtLjU1MS0uMTI0LS40NDItLjEyNC0uNjg4YzAtLjI2Mi4wMzktLjUwMi4xMTctLjcyMXMuMTk4LS40MTIuMzYtLjU4LjM2Ny0uMzA4LjYxNS0uNDE5LjU0NC0uMTkuODg4LS4yMzdsMS44MTEtLjI1MmMwLS4yNzMtLjAyOS0uNTA3LS4wODgtLjdzLS4xNDMtLjM1MS0uMjUyLS40NzItLjI0MS0uMjEtLjM5Ni0uMjY3LS4zMjUtLjA4NS0uNTEzLS4wODVjLS4zNjMgMC0uNzE0LjA2NC0xLjA1Mi4xOTNzLS42MzguMzEtLjkwNC41NHYtLjk4NGMuMDgyLS4wNTkuMTk2LS4xMjEuMzQzLS4xODhzLjMxMi0uMTI4LjQ5NS0uMTg1LjM3OC0uMTA0LjU4My0uMTQxLjQwNy0uMDU2LjYwNi0uMDU2Yy42OTkgMCAxLjIyOS4xOTQgMS41ODguNTgzcy41MzkuOTQyLjUzOSAxLjY2MXYzLjkwMmgtLjk2em0tMS40NTQtMi44M2MtLjI3My4wMzUtLjQ5OC4wODUtLjY3NC4xNDlzLS4zMTMuMTQ0LS40MS4yMzctLjE2NS4yMDUtLjIwMi4zMzQtLjA1NS4yNzYtLjA1NS40NGMwIC4xNDEuMDI1LjI3MS4wNzYuMzkzcy4xMjQuMjI3LjIyLjMxNi4yMTUuMTYuMzU3LjIxMS4zMDguMDc2LjQ5NS4wNzZjLjI0MiAwIC40NjUtLjA0NS42NjgtLjEzNXMuMzc4LS4yMTQuNTI0LS4zNzIuMjYxLS4zNDQuMzQzLS41NTcuMTIzLS40NDIuMTIzLS42ODh2LS42MDlsLTEuNDY1LjIwNXoiLz48L2c+PC9zdmc+") center center no-repeat;\n}\n.hc-black .monaco-custom-checkbox.monaco-case-sensitive,\n.hc-black .monaco-custom-checkbox.monaco-case-sensitive:hover,\n.vs-dark .monaco-custom-checkbox.monaco-case-sensitive {\n\tbackground: url("data:image/svg+xml;base64,PHN2ZyB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4yNDYtLjE2MS40NTMtLjI3OC42MTQtLjExNy4xNjItLjI2LjI4NS0uNDIxLjM2Ni0uMzIyLjE2Mi0uNzYuMTY2LTEuMDY5LjAxNS0uMTUzLS4wNzUtLjI4Ni0uMTc1LS4zOTMtLjI5Ni0uMDg1LS4wOTYtLjE1Ni0uMjE2LS4yMTgtLjM2NyAwIDAtLjE3OS0uNDQ3LS4xNzktLjk0NyAwLS41LjE3OS0xLjAwMi4xNzktMS4wMDIuMDYyLS4xNzcuMTM2LS4zMTguMjI0LS40My4xMTQtLjE0My4yNTYtLjI1OS40MjQtLjM0NS4xNjgtLjA4Ni4zNjUtLjEyOS41ODctLjEyOS4xOSAwIC4zNjQuMDM3LjUxNy4xMDl6Ii8+PHJlY3QgeD0iLjk4NyIgeT0iMiIgY2xhc3M9InN0MiIgd2lkdGg9IjE0LjAxMyIgaGVpZ2h0PSIxLjAyMyIvPjxyZWN0IHg9Ii45ODciIHk9IjEyLjk2OCIgY2xhc3M9InN0MiIgd2lkdGg9IjE0LjAxMyIgaGVpZ2h0PSIxLjAyMyIvPjxwYXRoIGNsYXNzPSJzdDIiIGQ9Ik0xLjk5MSAxMi4wMzFsLjcyOC0yLjAzMWgyLjIxOWwuNzc4IDIuMDMxaDEuMDgybC0yLjQ4NS03LjE1OGgtLjk0MWwtMi40NDEgNy4wODYtLjAyNS4wNzJoMS4wODV6bTEuODI3LTUuNjA5aC4wMjJsLjkxNCAyLjc1M2gtMS44NDFsLjkwNS0yLjc1M3oiLz48L2c+PC9zdmc+") center center no-repeat;\n}\n.hc-black .monaco-custom-checkbox.monaco-whole-word,\n.hc-black .monaco-custom-checkbox.monaco-whole-word:hover,\n.vs-dark .monaco-custom-checkbox.monaco-whole-word {\n\tbackground: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+PHN0eWxlIHR5cGU9InRleHQvY3NzIj4uc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DEgMi42ODItMS41ODMtMS4zOTIgMi4wNzUtMS43ODgtMi43NzEtLjI2Mi42OTYtMi4xMjYgMi4zNTggMS4zOTItLjU5OS0yLjc4NGgyLjA1M2wtLjYwMiAyLjc4MyAyLjM1OS0xLjM5Mi42OTYgMi4xMjd6Ii8+PHJlY3QgeD0iMyIgeT0iMTAiIHdpZHRoPSIzIiBoZWlnaHQ9IjMiLz48L2c+PC9zdmc+") center center no-repeat;\n}\n.hc-black .monaco-custom-checkbox.monaco-regex,\n.hc-black .monaco-custom-checkbox.monaco-regex:hover,\n.vs-dark .monaco-custom-checkbox.monaco-regex {\n\tbackground: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+PHBvbHlnb24gZmlsbD0iIzJkMmQzMCIgcG9pbnRzPSIxMy42NCw3LjM5NiAxMi4xNjksMi44OTggMTAuNzA2LDMuNzYxIDExLjA4NywyIDYuNTU3LDIgNi45MzYsMy43NjIgNS40NzMsMi44OTggNCw3LjM5NiA1LjY4Miw3LjU1NCA0LjUxMyw4LjU2MSA1LjAxMyw5IDIsOSAyLDE0IDcsMTQgNywxMC43NDcgNy45NzgsMTEuNjA2IDguODIsOS43MjUgOS42NjEsMTEuNjAyIDEzLjE0NCw4LjU2MiAxMS45NjgsNy41NTQiLz48ZyBmaWxsPSIjQzVDNUM1Ij48cGF0aCBkPSJNMTIuMzAxIDYuNTE4bC0yLjc3Mi4yNjIgMi4wODYgMS43ODgtMS41OTQgMS4zOTItMS4yMDEtMi42ODItMS4yMDEgMi42ODItMS41ODMtMS4zOTIgMi4wNzUtMS43ODgtMi43NzEtLjI2Mi42OTYtMi4xMjYgMi4zNTggMS4zOTItLjU5OS0yLjc4NGgyLjA1M2wtLjYwMiAyLjc4MyAyLjM1OS0xLjM5Mi42OTYgMi4xMjd6Ii8+PHJlY3QgeD0iMyIgeT0iMTAiIHdpZHRoPSIzIiBoZWlnaHQ9IjMiLz48L2c+PC9zdmc+") center center no-repeat;\n}\n',""])},8197:(e,t,n)=>{(e.exports=n(8826)(!1)).push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n/* ---------- Icon label ---------- */\n\n.monaco-icon-label {\n\tdisplay: flex; /* required for icons support :before rule */\n\toverflow: hidden;\n\ttext-overflow: ellipsis;\n}\n\n.monaco-icon-label::before {\n\n\t/* svg icons rendered as background image */\n\tbackground-size: 16px;\n\tbackground-position: left center;\n\tbackground-repeat: no-repeat;\n\tpadding-right: 6px;\n\twidth: 16px;\n\theight: 22px;\n\tdisplay: inline-block;\n\n\t/* fonts icons */\n\t-webkit-font-smoothing: antialiased;\n\tvertical-align: top;\n\n\tflex-shrink: 0; /* fix for https://github.com/Microsoft/vscode/issues/13787 */\n}\n\n.monaco-icon-label > .monaco-icon-label-description-container {\n\toverflow: hidden; /* this causes the label/description to shrink first if decorations are enabled */\n\ttext-overflow: ellipsis;\n}\n\n.monaco-icon-label > .monaco-icon-label-description-container > .label-name {\n\tcolor: inherit;\n\twhite-space: pre; /* enable to show labels that include multiple whitespaces */\n}\n\n.monaco-icon-label > .monaco-icon-label-description-container > .label-description {\n\tmargin-left: 0.5em;\n\tfont-size: 0.9em;\n\twhite-space: pre; /* enable to show labels that include multiple whitespaces */\n}\n\n.monaco-icon-label.italic > .monaco-icon-label-description-container > .label-name,\n.monaco-icon-label.italic > .monaco-icon-label-description-container > .label-description {\n\tfont-style: italic;\n}\n\n.monaco-icon-label::after {\n\topacity: 0.75;\n\tfont-size: 90%;\n\tfont-weight: 600;\n\tpadding: 0 12px 0 5px;\n\tmargin-left: auto;\n\ttext-align: center;\n}\n\n/* make sure selection color wins when a label is being selected */\n.monaco-tree.focused .selected .monaco-icon-label, /* tree */\n.monaco-tree.focused .selected .monaco-icon-label::after,\n.monaco-list:focus .selected .monaco-icon-label, /* list */\n.monaco-list:focus .selected .monaco-icon-label::after\n{\n\tcolor: inherit !important;\n}\n",""])},8757:(e,t,n)=>{(e.exports=n(8826)(!1)).push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-inputbox {\n\tposition: relative;\n\tdisplay: block;\n\tpadding: 0;\n\t-webkit-box-sizing:\tborder-box;\n\t-o-box-sizing:\t\tborder-box;\n\t-moz-box-sizing:\tborder-box;\n\t-ms-box-sizing:\t\tborder-box;\n\tbox-sizing:\t\t\tborder-box;\n\tline-height: auto !important;\n\n\t/* Customizable */\n\tfont-size: inherit;\n}\n\n.monaco-inputbox.idle {\n\tborder: 1px solid transparent;\n}\n\n.monaco-inputbox > .wrapper > .input,\n.monaco-inputbox > .wrapper > .mirror {\n\n\t/* Customizable */\n\tpadding: 4px;\n}\n\n.monaco-inputbox > .wrapper {\n\tposition: relative;\n\twidth: 100%;\n\theight: 100%;\n}\n\n.monaco-inputbox > .wrapper > .input {\n\tdisplay: inline-block;\n\t-webkit-box-sizing:\tborder-box;\n\t-o-box-sizing:\t\tborder-box;\n\t-moz-box-sizing:\tborder-box;\n\t-ms-box-sizing:\t\tborder-box;\n\tbox-sizing:\t\t\tborder-box;\n\twidth: 100%;\n\theight: 100%;\n\tline-height: inherit;\n\tborder: none;\n\tfont-family: inherit;\n\tfont-size: inherit;\n\tresize: none;\n\tcolor: inherit;\n}\n\n.monaco-inputbox > .wrapper > input {\n\ttext-overflow: ellipsis;\n}\n\n.monaco-inputbox > .wrapper > textarea.input {\n\tdisplay: block;\n\toverflow: hidden;\n}\n\n.monaco-inputbox > .wrapper > .mirror {\n\tposition: absolute;\n\tdisplay: inline-block;\n\twidth: 100%;\n\ttop: 0;\n\tleft: 0;\n\t-webkit-box-sizing:\tborder-box;\n\t-o-box-sizing:\t\tborder-box;\n\t-moz-box-sizing:\tborder-box;\n\t-ms-box-sizing:\t\tborder-box;\n\tbox-sizing:\t\t\tborder-box;\n\twhite-space: pre-wrap;\n\tvisibility: hidden;\n\tmin-height: 26px;\n\tword-wrap: break-word;\n}\n\n/* Context view */\n\n.monaco-inputbox-container {\n\ttext-align: right;\n}\n\n.monaco-inputbox-container .monaco-inputbox-message {\n\tdisplay: inline-block;\n\toverflow: hidden;\n\ttext-align: left;\n\twidth: 100%;\n\t-webkit-box-sizing:\tborder-box;\n\t-o-box-sizing:\t\tborder-box;\n\t-moz-box-sizing:\tborder-box;\n\t-ms-box-sizing:\t\tborder-box;\n\tbox-sizing:\t\t\tborder-box;\n\tpadding: 0.4em;\n\tfont-size: 12px;\n\tline-height: 17px;\n\tmin-height: 34px;\n\tmargin-top: -1px;\n\tword-wrap: break-word;\n}\n\n/* Action bar support */\n.monaco-inputbox .monaco-action-bar {\n\tposition: absolute;\n\tright: 2px;\n\ttop: 4px;\n}\n\n.monaco-inputbox .monaco-action-bar .action-item {\n\tmargin-left: 2px;\n}\n\n.monaco-inputbox .monaco-action-bar .action-item .icon {\n\tbackground-repeat: no-repeat;\n\twidth: 16px;\n\theight: 16px;\n}",""])},8389:(e,t,n)=>{(e.exports=n(8826)(!1)).push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-keybinding {\n\tdisplay: flex;\n\talign-items: center;\n\tline-height: 10px;\n}\n\n.monaco-keybinding > .monaco-keybinding-key {\n\tdisplay: inline-block;\n\tborder: solid 1px rgba(204, 204, 204, 0.4);\n\tborder-bottom-color: rgba(187, 187, 187, 0.4);\n\tborder-radius: 3px;\n\tbox-shadow: inset 0 -1px 0 rgba(187, 187, 187, 0.4);\n\tbackground-color: rgba(221, 221, 221, 0.4);\n\tvertical-align: middle;\n\tcolor: #555;\n\tfont-size: 11px;\n\tpadding: 3px 5px;\n}\n\n.hc-black .monaco-keybinding > .monaco-keybinding-key,\n.vs-dark .monaco-keybinding > .monaco-keybinding-key {\n\tbackground-color: rgba(128, 128, 128, 0.17);\n\tcolor: #ccc;\n\tborder: solid 1px rgba(51, 51, 51, 0.6);\n\tborder-bottom-color: rgba(68, 68, 68, 0.6);\n\tbox-shadow: inset 0 -1px 0 rgba(68, 68, 68, 0.6);\n}\n\n.monaco-keybinding > .monaco-keybinding-key-separator {\n\tdisplay: inline-block;\n}\n\n.monaco-keybinding > .monaco-keybinding-key-chord-separator {\n\twidth: 2px;\n}",""])},5799:(e,t,n)=>{(e.exports=n(8826)(!1)).push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-list {\n\tposition: relative;\n\theight: 100%;\n\twidth: 100%;\n\twhite-space: nowrap;\n\t-webkit-user-select: none;\n\t-khtml-user-select: none;\n\t-moz-user-select: -moz-none;\n\t-ms-user-select: none;\n\t-o-user-select: none;\n\tuser-select: none;\n}\n\n.monaco-list > .monaco-scrollable-element {\n\theight: 100%;\n}\n\n.monaco-list-rows {\n\tposition: relative;\n\twidth: 100%;\n\theight: 100%;\n}\n\n.monaco-list-row {\n\tposition: absolute;\n\t-moz-box-sizing:\tborder-box;\n\t-o-box-sizing:\t\tborder-box;\n\t-ms-box-sizing:\t\tborder-box;\n\tbox-sizing:\t\t\tborder-box;\n\tcursor: pointer;\n\toverflow: hidden;\n\twidth: 100%;\n\ttouch-action: none;\n}\n\n/* for OS X ballistic scrolling */\n.monaco-list-row.scrolling {\n\tdisplay: none !important;\n}\n\n/* Focus */\n.monaco-list.element-focused, .monaco-list.selection-single, .monaco-list.selection-multiple {\n\toutline: 0 !important;\n}",""])},5245:(e,t,n)=>{(e.exports=n(8826)(!1)).push([e.id,'/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-menu .monaco-action-bar.vertical {\n\tmargin-left: 0;\n\toverflow: visible;\n}\n\n.monaco-menu .monaco-action-bar.vertical .actions-container {\n\tdisplay: block;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item {\n\tpadding: 0;\n\t-ms-transform: none;\n\t-webkit-transform: none;\n\t-moz-transform: none;\n\t-o-transform: none;\n\ttransform: none;\n\tdisplay: -ms-flexbox;\n\tdisplay: flex;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item.active {\n\t-ms-transform: none;\n\t-webkit-transform: none;\n\t-moz-transform: none;\n\t-o-transform: none;\n\ttransform: none;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item.focused {\n\tbackground-color: #E4E4E4;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-menu-item {\n\t-ms-flex: 1 1 auto;\n\tflex: 1 1 auto;\n\tdisplay: -ms-flexbox;\n\tdisplay: flex;\n\theight: 2em;\n\talign-items: center;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label {\n\t-ms-flex: 1 1 auto;\n\tflex: 1 1 auto;\n\ttext-decoration: none;\n\tpadding: 0 1em;\n\tbackground: none;\n\tfont-size: 12px;\n\tline-height: 1;\n}\n\n.monaco-menu .monaco-action-bar.vertical .keybinding,\n.monaco-menu .monaco-action-bar.vertical .submenu-indicator {\n\tdisplay: inline-block;\n\t-ms-flex: 2 1 auto;\n\tflex: 2 1 auto;\n\tpadding: 0 1em;\n\ttext-align: right;\n\tfont-size: 12px;\n\tline-height: 1;\n}\n\n\n.monaco-menu .monaco-action-bar.vertical .action-item.disabled .keybinding,\n.monaco-menu .monaco-action-bar.vertical .action-item.disabled .submenu-indicator {\n\topacity: 0.4;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label:not(.separator) {\n\tdisplay: inline-block;\n\t-webkit-box-sizing:\tborder-box;\n\t-o-box-sizing:\t\tborder-box;\n\t-moz-box-sizing:\tborder-box;\n\t-ms-box-sizing:\t\tborder-box;\n\tbox-sizing:\t\t\tborder-box;\n\tmargin: 0;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label.separator {\n\tpadding: 0.5em 0 0 0;\n\tmargin-bottom: 0.5em;\n\twidth: 100%;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label.separator.text {\n\tpadding: 0.7em 1em 0.1em 1em;\n\tfont-weight: bold;\n\topacity: 1;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label:hover {\n\tcolor: inherit;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label.checked:after {\n\tcontent: \' \\2713\';\n}\n\n/* Context Menu */\n\n.context-view.monaco-menu-container {\n\tfont-family: "Segoe WPC", "Segoe UI", ".SFNSDisplay-Light", "SFUIText-Light", "HelveticaNeue-Light", sans-serif, "Droid Sans Fallback";\n\toutline: 0;\n\tbox-shadow: 0 2px 8px #A8A8A8;\n\tborder: none;\n\tcolor: #646465;\n\tbackground-color: white;\n\t-webkit-animation: fadeIn 0.083s linear;\n\t-o-animation: fadeIn 0.083s linear;\n\t-moz-animation: fadeIn 0.083s linear;\n\t-ms-animation: fadeIn 0.083s linear;\n\tanimation: fadeIn 0.083s linear;\n}\n\n.context-view.monaco-menu-container :focus,\n.context-view.monaco-menu-container .monaco-action-bar.vertical:focus,\n.context-view.monaco-menu-container .monaco-action-bar.vertical :focus {\n\toutline: 0;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item {\n\tborder: 1px solid transparent; /* prevents jumping behaviour on hover or focus */\n}\n\n/* Dark theme */\n.vs-dark .monaco-menu .monaco-action-bar.vertical .action-item.focused {\n\tbackground-color: #4B4C4D;\n}\n\n.vs-dark .context-view.monaco-menu-container {\n\tbox-shadow: 0 2px 8px #000;\n\tcolor: #BBB;\n\tbackground-color: #2D2F31;\n}\n\n/* High Contrast Theming */\n.hc-black .context-view.monaco-menu-container {\n\tborder: 2px solid #6FC3DF;\n\tcolor: white;\n\tbackground-color: #0C141F;\n\tbox-shadow: none;\n}\n\n.hc-black .monaco-menu .monaco-action-bar.vertical .action-item.focused {\n\tbackground: none;\n\tborder: 1px dotted #f38518;\n}',""])},6953:(e,t,n)=>{(e.exports=n(8826)(!1)).push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-progress-container {\n\twidth: 100%;\n\theight: 5px;\n\toverflow: hidden; /* keep progress bit in bounds */\n}\n\n.monaco-progress-container .progress-bit {\n\twidth: 2%;\n\theight: 5px;\n\tposition: absolute;\n\tleft: 0;\n\tdisplay: none;\n}\n\n.monaco-progress-container.active .progress-bit {\n\tdisplay: inherit;\n}\n\n.monaco-progress-container.discrete .progress-bit {\n\tleft: 0;\n\ttransition: width 100ms linear;\n\t-webkit-transition: width 100ms linear;\n\t-o-transition: width 100ms linear;\n\t-moz-transition: width 100ms linear;\n\t-ms-transition: width 100ms linear;\n}\n\n.monaco-progress-container.discrete.done .progress-bit {\n\twidth: 100%;\n}\n\n.monaco-progress-container.infinite .progress-bit {\n\tanimation-name: progress;\n\tanimation-duration: 4s;\n\tanimation-iteration-count: infinite;\n\tanimation-timing-function: linear;\n\t-ms-animation-name: progress;\n\t-ms-animation-duration: 4s;\n\t-ms-animation-iteration-count: infinite;\n\t-ms-animation-timing-function: linear;\n\t-webkit-animation-name: progress;\n\t-webkit-animation-duration: 4s;\n\t-webkit-animation-iteration-count: infinite;\n\t-webkit-animation-timing-function: linear;\n\t-moz-animation-name: progress;\n\t-moz-animation-duration: 4s;\n\t-moz-animation-iteration-count: infinite;\n\t-moz-animation-timing-function: linear;\n\twill-change: transform;\n}\n\n/**\n * The progress bit has a width: 2% (1/50) of the parent container. The animation moves it from 0% to 100% of\n * that container. Since translateX is relative to the progress bit size, we have to multiple it with\n * its relative size to the parent container:\n * 50%: 50 * 50 = 2500%\n * 100%: 50 * 100 - 50 (do not overflow): 4950%\n */\n@keyframes progress { from { transform: translateX(0%) scaleX(1) } 50% { transform: translateX(2500%) scaleX(3) } to { transform: translateX(4950%) scaleX(1) } }\n@-ms-keyframes progress { from { transform: translateX(0%) scaleX(1) }\t50% { transform: translateX(2500%) scaleX(3) } to { transform: translateX(4950%) scaleX(1) } }\n@-webkit-keyframes progress { from { transform: translateX(0%) scaleX(1) }\t50% { transform: translateX(2500%) scaleX(3) } to { transform: translateX(4950%) scaleX(1) } }\n@-moz-keyframes progress { from { transform: translateX(0%) scaleX(1) }\t50% { transform: translateX(2500%) scaleX(3) } to { transform: translateX(4950%) scaleX(1) } }",""])},297:(e,t,n)=>{(e.exports=n(8826)(!1)).push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-sash {\n\tposition: absolute;\n\tz-index: 90;\n\ttouch-action: none;\n}\n\n.monaco-sash.disabled {\n\tpointer-events: none;\n}\n\n.monaco-sash.vertical {\n\tcursor: ew-resize;\n\ttop: 0;\n\twidth: 4px;\n\theight: 100%;\n}\n\n.monaco-sash.mac.vertical {\n\tcursor: col-resize;\n}\n\n.monaco-sash.vertical.minimum {\n\tcursor: e-resize;\n}\n\n.monaco-sash.vertical.maximum {\n\tcursor: w-resize;\n}\n\n.monaco-sash.horizontal {\n\tcursor: ns-resize;\n\tleft: 0;\n\twidth: 100%;\n\theight: 4px;\n}\n\n.monaco-sash.mac.horizontal {\n\tcursor: row-resize;\n}\n\n.monaco-sash.horizontal.minimum {\n\tcursor: s-resize;\n}\n\n.monaco-sash.horizontal.maximum {\n\tcursor: n-resize;\n}\n\n.monaco-sash:not(.disabled).orthogonal-start::before,\n.monaco-sash:not(.disabled).orthogonal-end::after {\n\tcontent: ' ';\n\theight: 8px;\n\twidth: 8px;\n\tz-index: 100;\n\tdisplay: block;\n\tcursor: all-scroll;\n\tposition: absolute;\n}\n\n.monaco-sash.orthogonal-start.vertical::before {\n\tleft: -2px;\n\ttop: -4px;\n}\n\n.monaco-sash.orthogonal-end.vertical::after {\n\tleft: -2px;\n\tbottom: -4px;\n}\n\n.monaco-sash.orthogonal-start.horizontal::before {\n\ttop: -2px;\n\tleft: -4px;\n}\n\n.monaco-sash.orthogonal-end.horizontal::after {\n\ttop: -2px;\n\tright: -4px;\n}\n\n.monaco-sash.disabled {\n\tcursor: default !important;\n}\n\n/** Touch **/\n\n.monaco-sash.touch.vertical {\n\twidth: 20px;\n}\n\n.monaco-sash.touch.horizontal {\n\theight: 20px;\n}\n\n/** Debug **/\n\n.monaco-sash.debug:not(.disabled) {\n\tbackground: cyan;\n}\n\n.monaco-sash.debug:not(.disabled).orthogonal-start::before,\n.monaco-sash.debug:not(.disabled).orthogonal-end::after {\n\tbackground: red;\n}",""])},9453:(e,t,n)=>{(e.exports=n(8826)(!1)).push([e.id,'/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n/* Arrows */\n.monaco-scrollable-element > .scrollbar > .up-arrow {\n\tbackground: url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMTEgMTEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0ibTkuNDgwNDYsOC45NjE1bDEuMjYsLTEuMjZsLTUuMDQsLTUuMDRsLTUuNDYsNS4wNGwxLjI2LDEuMjZsNC4yLC0zLjc4bDMuNzgsMy43OHoiIGZpbGw9IiM0MjQyNDIiLz48L3N2Zz4=");\n\tcursor: pointer;\n}\n.monaco-scrollable-element > .scrollbar > .down-arrow {\n\tbackground: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMSAxMSI+PHBhdGggdHJhbnNmb3JtPSJyb3RhdGUoLTE4MCA1LjQ5MDQ1OTkxODk3NTgzLDUuODExNTAwMDcyNDc5MjQ4KSIgZmlsbD0iIzQyNDI0MiIgZD0ibTkuNDgwNDYsOC45NjE1bDEuMjYsLTEuMjZsLTUuMDQsLTUuMDRsLTUuNDYsNS4wNGwxLjI2LDEuMjZsNC4yLC0zLjc4bDMuNzgsMy43OHoiLz48L3N2Zz4=");\n\tcursor: pointer;\n}\n.monaco-scrollable-element > .scrollbar > .left-arrow {\n\tbackground: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMSAxMSI+PHBhdGggdHJhbnNmb3JtPSJyb3RhdGUoLTkwIDUuNDkwNDU5OTE4OTc1ODMxLDUuNDMxMzgyMTc5MjYwMjU0KSIgZmlsbD0iIzQyNDI0MiIgZD0ibTkuNDgwNDYsOC41ODEzOGwxLjI2LC0xLjI2bC01LjA0LC01LjA0bC01LjQ2LDUuMDRsMS4yNiwxLjI2bDQuMiwtMy43OGwzLjc4LDMuNzh6Ii8+PC9zdmc+");\n\tcursor: pointer;\n}\n.monaco-scrollable-element > .scrollbar > .right-arrow {\n\tbackground: url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMTEgMTEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggdHJhbnNmb3JtPSJyb3RhdGUoOTAgNS42MTcxNjUwODg2NTM1NjQ1LDUuNTU4MDg5NzMzMTIzNzgpICIgZmlsbD0iIzQyNDI0MiIgZD0ibTkuNjA3MTcsOC43MDgwOWwxLjI2LC0xLjI2bC01LjA0LC01LjA0bC01LjQ2LDUuMDRsMS4yNiwxLjI2bDQuMiwtMy43OGwzLjc4LDMuNzh6Ii8+PC9zdmc+");\n\tcursor: pointer;\n}\n\n.hc-black .monaco-scrollable-element > .scrollbar > .up-arrow,\n.vs-dark .monaco-scrollable-element > .scrollbar > .up-arrow {\n\tbackground: url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMTEgMTEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0ibTkuNDgwNDYsOC45NjE1bDEuMjYsLTEuMjZsLTUuMDQsLTUuMDRsLTUuNDYsNS4wNGwxLjI2LDEuMjZsNC4yLC0zLjc4bDMuNzgsMy43OHoiIGZpbGw9IiNFOEU4RTgiLz48L3N2Zz4=");\n}\n.hc-black .monaco-scrollable-element > .scrollbar > .down-arrow,\n.vs-dark .monaco-scrollable-element > .scrollbar > .down-arrow {\n\tbackground: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMSAxMSI+PHBhdGggdHJhbnNmb3JtPSJyb3RhdGUoLTE4MCA1LjQ5MDQ1OTkxODk3NTgzLDUuODExNTAwMDcyNDc5MjQ4KSIgZmlsbD0iI0U4RThFOCIgZD0ibTkuNDgwNDYsOC45NjE1bDEuMjYsLTEuMjZsLTUuMDQsLTUuMDRsLTUuNDYsNS4wNGwxLjI2LDEuMjZsNC4yLC0zLjc4bDMuNzgsMy43OHoiLz48L3N2Zz4=");\n}\n.hc-black .monaco-scrollable-element > .scrollbar > .left-arrow,\n.vs-dark .monaco-scrollable-element > .scrollbar > .left-arrow {\n\tbackground: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMSAxMSI+PHBhdGggdHJhbnNmb3JtPSJyb3RhdGUoLTkwIDUuNDkwNDU5OTE4OTc1ODMxLDUuNDMxMzgyMTc5MjYwMjU0KSIgZmlsbD0iI0U4RThFOCIgZD0ibTkuNDgwNDYsOC41ODEzOGwxLjI2LC0xLjI2bC01LjA0LC01LjA0bC01LjQ2LDUuMDRsMS4yNiwxLjI2bDQuMiwtMy43OGwzLjc4LDMuNzh6Ii8+PC9zdmc+");\n}\n.hc-black .monaco-scrollable-element > .scrollbar > .right-arrow,\n.vs-dark .monaco-scrollable-element > .scrollbar > .right-arrow {\n\tbackground: url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMTEgMTEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggdHJhbnNmb3JtPSJyb3RhdGUoOTAgNS42MTcxNjUwODg2NTM1NjQ1LDUuNTU4MDg5NzMzMTIzNzgpICIgZmlsbD0iI0U4RThFOCIgZD0ibTkuNjA3MTcsOC43MDgwOWwxLjI2LC0xLjI2bC01LjA0LC01LjA0bC01LjQ2LDUuMDRsMS4yNiwxLjI2bDQuMiwtMy43OGwzLjc4LDMuNzh6Ii8+PC9zdmc+");\n}\n\n.monaco-scrollable-element > .visible {\n\topacity: 1;\n\n\t/* Background rule added for IE9 - to allow clicks on dom node */\n\tbackground:rgba(0,0,0,0);\n\n\t-webkit-transition: opacity 100ms linear;\n\t-o-transition: opacity 100ms linear;\n\t-moz-transition: opacity 100ms linear;\n\t-ms-transition: opacity 100ms linear;\n\ttransition: opacity 100ms linear;\n}\n.monaco-scrollable-element > .invisible {\n\topacity: 0;\n\tpointer-events: none;\n}\n.monaco-scrollable-element > .invisible.fade {\n\t-webkit-transition: opacity 800ms linear;\n\t-o-transition: opacity 800ms linear;\n\t-moz-transition: opacity 800ms linear;\n\t-ms-transition: opacity 800ms linear;\n\ttransition: opacity 800ms linear;\n}\n\n/* Scrollable Content Inset Shadow */\n.monaco-scrollable-element > .shadow {\n\tposition: absolute;\n\tdisplay: none;\n}\n.monaco-scrollable-element > .shadow.top {\n\tdisplay: block;\n\ttop: 0;\n\tleft: 3px;\n\theight: 3px;\n\twidth: 100%;\n\tbox-shadow: #DDD 0 6px 6px -6px inset;\n}\n.monaco-scrollable-element > .shadow.left {\n\tdisplay: block;\n\ttop: 3px;\n\tleft: 0;\n\theight: 100%;\n\twidth: 3px;\n\tbox-shadow: #DDD 6px 0 6px -6px inset;\n}\n.monaco-scrollable-element > .shadow.top-left-corner {\n\tdisplay: block;\n\ttop: 0;\n\tleft: 0;\n\theight: 3px;\n\twidth: 3px;\n}\n.monaco-scrollable-element > .shadow.top.left {\n\tbox-shadow: #DDD 6px 6px 6px -6px inset;\n}\n\n/* ---------- Default Style ---------- */\n\n.vs .monaco-scrollable-element > .scrollbar > .slider {\n\tbackground: rgba(100, 100, 100, .4);\n}\n.vs-dark .monaco-scrollable-element > .scrollbar > .slider {\n\tbackground: rgba(121, 121, 121, .4);\n}\n.hc-black .monaco-scrollable-element > .scrollbar > .slider {\n\tbackground: rgba(111, 195, 223, .6);\n}\n\n.monaco-scrollable-element > .scrollbar > .slider:hover {\n\tbackground: rgba(100, 100, 100, .7);\n}\n.hc-black .monaco-scrollable-element > .scrollbar > .slider:hover {\n\tbackground: rgba(111, 195, 223, .8);\n}\n\n.monaco-scrollable-element > .scrollbar > .slider.active {\n\tbackground: rgba(0, 0, 0, .6);\n}\n.vs-dark .monaco-scrollable-element > .scrollbar > .slider.active {\n\tbackground: rgba(191, 191, 191, .4);\n}\n.hc-black .monaco-scrollable-element > .scrollbar > .slider.active {\n\tbackground: rgba(111, 195, 223, 1);\n}\n\n.vs-dark .monaco-scrollable-element .shadow.top {\n\tbox-shadow: none;\n}\n\n.vs-dark .monaco-scrollable-element .shadow.left {\n\tbox-shadow: #000 6px 0 6px -6px inset;\n}\n\n.vs-dark .monaco-scrollable-element .shadow.top.left {\n\tbox-shadow: #000 6px 6px 6px -6px inset;\n}\n\n.hc-black .monaco-scrollable-element .shadow.top {\n\tbox-shadow: none;\n}\n\n.hc-black .monaco-scrollable-element .shadow.left {\n\tbox-shadow: none;\n}\n\n.hc-black .monaco-scrollable-element .shadow.top.left {\n\tbox-shadow: none;\n}',""])},6565:(e,t,n)=>{(e.exports=n(8826)(!1)).push([e.id,'/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-quick-open-widget {\n\tposition: absolute;\n\twidth: 600px;\n\tz-index: 2000;\n\tpadding-bottom: 6px;\n\tleft: 50%;\n\tmargin-left: -300px;\n}\n\n.monaco-quick-open-widget .monaco-progress-container {\n\tposition: absolute;\n\tleft: 0;\n\ttop: 38px;\n\tz-index: 1;\n\theight: 2px;\n}\n\n.monaco-quick-open-widget .monaco-progress-container .progress-bit {\n\theight: 2px;\n}\n\n.monaco-quick-open-widget .quick-open-input {\n\twidth: 588px;\n\tborder: none;\n\tmargin: 6px;\n}\n\n.monaco-quick-open-widget .quick-open-input .monaco-inputbox {\n\twidth: 100%;\n\theight: 25px;\n}\n\n.monaco-quick-open-widget .quick-open-result-count {\n\tposition: absolute;\n\tleft: -10000px;\n}\n\n.monaco-quick-open-widget .quick-open-tree {\n\tline-height: 22px;\n}\n\n.monaco-quick-open-widget .quick-open-tree .monaco-tree-row > .content > .sub-content {\n\toverflow: hidden;\n}\n\n.monaco-quick-open-widget.content-changing .quick-open-tree .monaco-scrollable-element .slider {\n\tdisplay: none; /* scrollbar slider causes some hectic updates when input changes quickly, so hide it while quick open changes */\n}\n\n.monaco-quick-open-widget .quick-open-tree .quick-open-entry {\n\toverflow: hidden;\n\ttext-overflow: ellipsis;\n\tdisplay: flex;\n\tflex-direction: column;\n\theight: 100%;\n}\n\n.monaco-quick-open-widget .quick-open-tree .quick-open-entry > .quick-open-row {\n\tdisplay: flex;\n\talign-items: center;\n}\n\n.monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon {\n\toverflow: hidden;\n\twidth: 16px;\n\theight: 16px;\n\tmargin-right: 4px;\n\tdisplay: inline-block;\n\tvertical-align: middle;\n\tflex-shrink: 0;\n}\n\n.monaco-quick-open-widget .quick-open-tree .monaco-icon-label,\n.monaco-quick-open-widget .quick-open-tree .monaco-icon-label .monaco-icon-label-description-container {\n\tflex: 1; /* make sure the icon label grows within the row */\n}\n\n.monaco-quick-open-widget .quick-open-tree .quick-open-entry .monaco-highlighted-label span {\n\topacity: 1;\n}\n\n.monaco-quick-open-widget .quick-open-tree .quick-open-entry-meta {\n\topacity: 0.7;\n\tline-height: normal;\n}\n\n.monaco-quick-open-widget .quick-open-tree .content.has-group-label .quick-open-entry-keybinding {\n\tmargin-right: 8px;\n}\n\n.monaco-quick-open-widget .quick-open-tree .quick-open-entry-keybinding .monaco-keybinding-key {\n\tvertical-align: text-bottom;\n}\n\n.monaco-quick-open-widget .quick-open-tree .results-group {\n\tmargin-right: 18px;\n}\n\n.monaco-quick-open-widget .quick-open-tree .monaco-tree-row.focused > .content.has-actions > .results-group,\n.monaco-quick-open-widget .quick-open-tree .monaco-tree-row:hover:not(.highlighted) > .content.has-actions > .results-group,\n.monaco-quick-open-widget .quick-open-tree .focused .monaco-tree-row.focused > .content.has-actions > .results-group {\n\tmargin-right: 0px;\n}\n\n.monaco-quick-open-widget .quick-open-tree .results-group-separator {\n\tborder-top-width: 1px;\n\tborder-top-style: solid;\n\tbox-sizing: border-box;\n\tmargin-left: -11px;\n\tpadding-left: 11px;\n}\n\n/* Actions in Quick Open Items */\n\n.monaco-tree .monaco-tree-row > .content.actions {\n\tposition: relative;\n\tdisplay: flex;\n}\n\n.monaco-tree .monaco-tree-row > .content.actions > .sub-content {\n\tflex: 1;\n}\n\n.monaco-tree .monaco-tree-row > .content.actions .action-item {\n\tmargin: 0;\n}\n\n.monaco-tree .monaco-tree-row > .content.actions > .primary-action-bar {\n\tline-height: 22px;\n}\n\n.monaco-tree .monaco-tree-row > .content.actions > .primary-action-bar {\n\tdisplay: none;\n\tpadding: 0 0.8em 0 0.4em;\n}\n\n.monaco-tree .monaco-tree-row.focused > .content.has-actions > .primary-action-bar {\n\twidth: 0; /* in order to support a11y with keyboard, we use width: 0 to hide the actions, which still allows to "Tab" into the actions */\n\tdisplay: block;\n}\n\n.monaco-tree .monaco-tree-row:hover:not(.highlighted) > .content.has-actions > .primary-action-bar,\n.monaco-tree.focused .monaco-tree-row.focused > .content.has-actions > .primary-action-bar,\n.monaco-tree .monaco-tree-row > .content.has-actions.more > .primary-action-bar {\n\twidth: inherit;\n\tdisplay: block;\n}\n\n.monaco-tree .monaco-tree-row > .content.actions > .primary-action-bar .action-label {\n\tmargin-right: 0.4em;\n\tmargin-top: 4px;\n\tbackground-repeat: no-repeat;\n\twidth: 16px;\n\theight: 16px;\n}\n\n.monaco-quick-open-widget .quick-open-tree .monaco-highlighted-label .highlight {\n\tfont-weight: bold;\n}',""])},7653:(e,t,n)=>{(e.exports=n(8826)(!1)).push([e.id,'/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n.monaco-tree {\n\theight: 100%;\n\twidth: 100%;\n\twhite-space: nowrap;\n\t-webkit-user-select: none;\n\t-khtml-user-select: none;\n\t-moz-user-select: -moz-none;\n\t-ms-user-select: none;\n\t-o-user-select: none;\n\tuser-select: none;\n\tposition: relative;\n}\n\n.monaco-tree > .monaco-scrollable-element {\n\theight: 100%;\n}\n\n.monaco-tree > .monaco-scrollable-element > .monaco-tree-wrapper {\n\theight: 100%;\n\twidth: 100%;\n\tposition: relative;\n}\n\n.monaco-tree .monaco-tree-rows {\n\tposition: absolute;\n\twidth: 100%;\n\theight: 100%;\n}\n\n.monaco-tree .monaco-tree-rows > .monaco-tree-row {\n\t-moz-box-sizing:\tborder-box;\n\t-o-box-sizing:\t\tborder-box;\n\t-ms-box-sizing:\t\tborder-box;\n\tbox-sizing:\t\t\tborder-box;\n\tcursor: pointer;\n\toverflow: hidden;\n\twidth: 100%;\n\ttouch-action: none;\n}\n\n.monaco-tree .monaco-tree-rows > .monaco-tree-row > .content {\n\tposition: relative;\n\theight: 100%;\n}\n\n.monaco-tree-drag-image {\n\tdisplay: inline-block;\n\tpadding: 1px 7px;\n\tborder-radius: 10px;\n\tfont-size: 12px;\n\tposition: absolute;\n}\n\n/* for OS X ballistic scrolling */\n.monaco-tree .monaco-tree-rows > .monaco-tree-row.scrolling {\n\tdisplay: none;\n}\n\n/* Expansion */\n\n.monaco-tree .monaco-tree-rows.show-twisties > .monaco-tree-row.has-children > .content:before {\n\tcontent: \' \';\n\tposition: absolute;\n\tdisplay: block;\n\tbackground: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiI+PHBhdGggZmlsbD0iIzY0NjQ2NSIgZD0iTTYgNHY4bDQtNC00LTR6bTEgMi40MTRMOC41ODYgOCA3IDkuNTg2VjYuNDE0eiIvPjwvc3ZnPg==") 50% 50% no-repeat;\n\twidth: 16px;\n\theight: 100%;\n\ttop: 0;\n\tleft: -16px;\n}\n\n.monaco-tree .monaco-tree-rows.show-twisties > .monaco-tree-row.expanded > .content:before {\n\tbackground-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiI+PHBhdGggZmlsbD0iIzY0NjQ2NSIgZD0iTTExIDEwSDUuMzQ0TDExIDQuNDE0VjEweiIvPjwvc3ZnPg==");\n}\n\n.monaco-tree .monaco-tree-rows > .monaco-tree-row.has-children.loading > .content:before {\n\tbackground-image: url("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0nMS4wJyBzdGFuZGFsb25lPSdubycgPz4KPHN2ZyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnIHZlcnNpb249JzEuMScgd2lkdGg9JzEwcHgnIGhlaWdodD0nMTBweCc+Cgk8c3R5bGU+CiAgICBjaXJjbGUgewogICAgICBhbmltYXRpb246IGJhbGwgMC42cyBsaW5lYXIgaW5maW5pdGU7CiAgICB9CgogICAgY2lyY2xl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7JyAvPgoJCTxjaXJjbGUgY3g9JzEnIGN5PSc1JyByPScxJyBzdHlsZT0nb3BhY2l0eTowLjM7JyAvPgoJCTxjaXJjbGUgY3g9JzIuMTcxNicgY3k9JzIuMTcxNicgcj0nMScgc3R5bGU9J29wYWNpdHk6MC4zOycgLz4KCTwvZz4KPC9zdmc+Cg==");\n}\n\n/* Highlighted */\n\n.monaco-tree.highlighted .monaco-tree-rows > .monaco-tree-row:not(.highlighted) {\n\topacity: 0.3;\n}\n\n.vs-dark .monaco-tree .monaco-tree-rows.show-twisties > .monaco-tree-row.has-children > .content:before {\n\tbackground-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiI+PHBhdGggZmlsbD0iI0U4RThFOCIgZD0iTTYgNHY4bDQtNC00LTR6bTEgMi40MTRMOC41ODYgOCA3IDkuNTg2VjYuNDE0eiIvPjwvc3ZnPg==");\n}\n\n.vs-dark .monaco-tree .monaco-tree-rows.show-twisties > .monaco-tree-row.expanded > .content:before {\n\tbackground-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiI+PHBhdGggZmlsbD0iI0U4RThFOCIgZD0iTTExIDEwSDUuMzQ0TDExIDQuNDE0VjEweiIvPjwvc3ZnPg==");\n}\n\n.vs-dark .monaco-tree .monaco-tree-rows > .monaco-tree-row.has-children.loading > .content:before {\n\tbackground-image: url("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0nMS4wJyBzdGFuZGFsb25lPSdubycgPz4KPHN2ZyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnIHZlcnNpb249JzEuMScgd2lkdGg9JzEwcHgnIGhlaWdodD0nMTBweCc+Cgk8c3R5bGU+CiAgICBjaXJjbGUgewogICAgICBhbmltYXRpb246IGJhbGwg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PgoJCTxjaXJjbGUgY3g9JzIuMTcxNicgY3k9JzcuODI4NCcgcj0nMScgc3R5bGU9J29wYWNpdHk6MC4zOycgLz4KCQk8Y2lyY2xlIGN4PScxJyBjeT0nNScgcj0nMScgc3R5bGU9J29wYWNpdHk6MC4zOycgLz4KCQk8Y2lyY2xlIGN4PScyLjE3MTYnIGN5PScyLjE3MTYnIHI9JzEnIHN0eWxlPSdvcGFjaXR5OjAuMzsnIC8+Cgk8L2c+Cjwvc3ZnPgo=");\n}\n\n.hc-black .monaco-tree .monaco-tree-rows.show-twisties > .monaco-tree-row.has-children > .content:before\t{\n\tbackground-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+PHBhdGggZmlsbD0iI2ZmZiIgZD0iTTYgNHY4bDQtNC00LTR6bTEgMi40MTRsMS41ODYgMS41ODYtMS41ODYgMS41ODZ2LTMuMTcyeiIvPjwvc3ZnPg==");\n}\n\n.hc-black .monaco-tree .monaco-tree-rows.show-twisties > .monaco-tree-row.expanded > .content:before {\n\tbackground-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+PHBhdGggZmlsbD0iI2ZmZiIgZD0iTTExIDEwLjA3aC01LjY1Nmw1LjY1Ni01LjY1NnY1LjY1NnoiLz48L3N2Zz4=");\n}\n\n.hc-black .monaco-tree .monaco-tree-rows > .monaco-tree-row.has-children.loading > .content:before {\n\tbackground-image: url("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0nMS4wJyBzdGFuZGFsb25lPSdubycgPz4KPHN2ZyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnIHZlcnNpb249JzEuMScgd2lkdGg9JzEwcHgnIGhlaWdodD0nMTBweCc+Cgk8c3R5bGU+CiAgIC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Scgc3R5bGU9J29wYWNpdHk6MC4zOycgLz4KCQk8Y2lyY2xlIGN4PScyLjE3MTYnIGN5PSc3LjgyODQnIHI9JzEnIHN0eWxlPSdvcGFjaXR5OjAuMzsnIC8+CgkJPGNpcmNsZSBjeD0nMScgY3k9JzUnIHI9JzEnIHN0eWxlPSdvcGFjaXR5OjAuMzsnIC8+CgkJPGNpcmNsZSBjeD0nMi4xNzE2JyBjeT0nMi4xNzE2JyByPScxJyBzdHlsZT0nb3BhY2l0eTowLjM7JyAvPgoJPC9nPgo8L3N2Zz4K");\n}\n\n.monaco-tree-action.collapse-all {\n\tbackground: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgdmlld0JveD0iLTEgMCAxNiAxNiIgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAtMSAwIDE2IDE2Ij48cGF0aCBmaWxsPSIjNDI0MjQyIiBkPSJNMTQgMXY5aC0xdi04aC04di0xaDl6bS0xMSAydjFoOHY4aDF2LTloLTl6bTcgMnY5aC05di05aDl6bS0yIDJoLTV2NWg1di01eiIvPjxyZWN0IHg9IjQiIHk9IjkiIGZpbGw9IiMwMDUzOUMiIHdpZHRoPSIzIiBoZWlnaHQ9IjEiLz48L3N2Zz4=") center center no-repeat;\n}\n\n.hc-black .monaco-tree-action.collapse-all,\n.vs-dark .monaco-tree-action.collapse-all {\n\tbackground: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgdmlld0JveD0iLTEgMCAxNiAxNiIgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAtMSAwIDE2IDE2Ij48cGF0aCBmaWxsPSIjQzVDNUM1IiBkPSJNMTQgMXY5aC0xdi04aC04di0xaDl6bS0xMSAydjFoOHY4aDF2LTloLTl6bTcgMnY5aC05di05aDl6bS0yIDJoLTV2NWg1di01eiIvPjxyZWN0IHg9IjQiIHk9IjkiIGZpbGw9IiM3NUJFRkYiIHdpZHRoPSIzIiBoZWlnaHQ9IjEiLz48L3N2Zz4=") center center no-repeat;\n}\n',""])},5728:(e,t,n)=>{(e.exports=n(8826)(!1)).push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .inputarea {\n\tmin-width: 0;\n\tmin-height: 0;\n\tmargin: 0;\n\tpadding: 0;\n\tposition: absolute;\n\toutline: none !important;\n\tresize: none;\n\tborder: none;\n\toverflow: hidden;\n\tcolor: transparent;\n\tbackground-color: transparent;\n}\n/*.monaco-editor .inputarea {\n\tposition: fixed !important;\n\twidth: 800px !important;\n\theight: 500px !important;\n\ttop: initial !important;\n\tleft: initial !important;\n\tbottom: 0 !important;\n\tright: 0 !important;\n\tcolor: black !important;\n\tbackground: white !important;\n\tline-height: 15px !important;\n\tfont-size: 14px !important;\n}*/\n.monaco-editor .inputarea.ime-input {\n\tz-index: 10;\n}\n",""])},5700:(e,t,n)=>{(e.exports=n(8826)(!1)).push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .view-overlays .current-line {\n\tdisplay: block;\n\tposition: absolute;\n\tleft: 0;\n\ttop: 0;\n\tbox-sizing: border-box;\n}",""])},3956:(e,t,n)=>{(e.exports=n(8826)(!1)).push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .margin-view-overlays .current-line {\n\tdisplay: block;\n\tposition: absolute;\n\tleft: 0;\n\ttop: 0;\n\tbox-sizing: border-box;\n}\n\n.monaco-editor .margin-view-overlays .current-line.current-line-margin.current-line-margin-both {\n\tborder-right: 0;\n}",""])},780:(e,t,n)=>{(e.exports=n(8826)(!1)).push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n/*\n\tKeeping name short for faster parsing.\n\tcdr = core decorations rendering (div)\n*/\n.monaco-editor .lines-content .cdr {\n\tposition: absolute;\n}",""])},4488:(e,t,n)=>{(e.exports=n(8826)(!1)).push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .glyph-margin {\n\tposition: absolute;\n\ttop: 0;\n}\n\n/*\n\tKeeping name short for faster parsing.\n\tcgmr = core glyph margin rendering (div)\n*/\n.monaco-editor .margin-view-overlays .cgmr {\n\tposition: absolute;\n}\n",""])},4796:(e,t,n)=>{(e.exports=n(8826)(!1)).push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n/*\n\tKeeping name short for faster parsing.\n\tcigr = core ident guides rendering (div)\n*/\n.monaco-editor .lines-content .cigr {\n\tposition: absolute;\n}\n.monaco-editor .lines-content .cigra {\n\tposition: absolute;\n}\n",""])},704:(e,t,n)=>{(e.exports=n(8826)(!1)).push([e.id,'/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .margin-view-overlays .line-numbers {\n\tposition: absolute;\n\ttext-align: right;\n\tdisplay: inline-block;\n\tvertical-align: middle;\n\tbox-sizing: border-box;\n\tcursor: default;\n\theight: 100%;\n}\n\n.monaco-editor .relative-current-line-number {\n\ttext-align: left;\n\tdisplay: inline-block;\n\twidth: 100%;\n}\n\n.monaco-editor .margin-view-overlays .line-numbers {\n\tcursor: -webkit-image-set(\n\t\turl("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNSIgaGVpZ2h0PSIyMSIgeD0iMHB4IiB5PSIwcHgiIHZpZXdCb3g9IjAgMCAxNSAyMSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgMTUgMjE7Ij48cG9seWdvbiBzdHlsZT0iZmlsbDojRkZGRkZGO3N0cm9rZTojMDAwMDAwIiBwb2ludHM9IjE0LjUsMS4yIDEuOSwxMy44IDcuMSwxMy44IDQuNSwxOS4xIDcuNywyMC4xIDEwLjMsMTQuOSAxNC41LDE4Ii8+PC9zdmc+") 1x,\n\t\turl("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHg9IjBweCIgeT0iMHB4IiB3aWR0aD0iMzAiIGhlaWdodD0iNDIiIHZpZXdCb3g9IjAgMCAzMCA0MiIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgMzAgNDI7Ij48cG9seWdvbiBzdHlsZT0iZmlsbDojRkZGRkZGO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyOyIgcG9pbnRzPSIyOSwyLjQgMy44LDI3LjYgMTQuMywyNy42IDksMzguMSAxNS40LDQwLjIgMjAuNiwyOS43IDI5LDM2Ii8+PC9zdmc+Cg==") 2x\n\t) 30 0, default;\n}\n\n.monaco-editor.mac .margin-view-overlays .line-numbers {\n\tcursor: -webkit-image-set(\n\t\turl("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMiIgaGVpZ2h0PSIxOCIgdmlld0JveD0iMCAwIDEyIDE4Ij48c3R5bGU+LnN0MHtmaWxsOiNmZmZ9PC9zdHlsZT48dGl0bGU+ZmxpcHBlZC1jdXJzb3ItbWFjPC90aXRsZT48cGF0aCBkPSJNNC4zIDE2LjVsMS42LTQuNkgxLjFMMTEuNSAxLjJ2MTQuNEw4LjcgMTNsLTEuNiA0LjV6Ii8+PHBhdGggY2xhc3M9InN0MCIgZD0iTTExIDE0LjVsLTIuNS0yLjNMNyAxNi43IDUgMTZsMS42LTQuNWgtNGw4LjUtOU0wIDEyLjVoNS4ybC0xLjUgNC4xTDcuNSAxOCA5IDE0LjJsMi45IDIuM1YwTDAgMTIuNXoiLz48L3N2Zz4=") 1x,\n\t\turl("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIzNiIgdmlld0JveD0iMCAwIDI0IDM2LjEiPjxkZWZzPjxzdHlsZT4uYXtmaWxsOiNmZmY7fTwvc3R5bGU+PC9kZWZzPjx0aXRsZT5mbGlwcGVkLWN1cnNvci1tYWMtMng8L3RpdGxlPjxwb2x5Z29uIHBvaW50cz0iOC42IDMzLjEgMTEuOCAyMy45IDIuMiAyMy45IDIzIDIuNSAyMyAzMS4zIDE3LjQgMjYuMSAxNC4yIDM1LjEgOC42IDMzLjEiLz48cGF0aCBjbGFzcz0iYSIgZD0iTTIyLDI5LjFsLTUtNC42LTMuMDYyLDguOTM4LTQuMDYyLTEuNUwxMywyM0g1TDIyLDVNMCwyNUgxMC40bC0zLDguM0wxNSwzNi4xbDMuMTI1LTcuNjYyTDI0LDMzVjBaIi8+PC9zdmc+") 2x\n\t) 24 3, default;\n}\n\n.monaco-editor .margin-view-overlays .line-numbers.lh-odd {\n\tmargin-top: 1px;\n}\n',""])},9425:(e,t,n)=>{(e.exports=n(8826)(!1)).push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n/* Uncomment to see lines flashing when they're painted */\n/*.monaco-editor .view-lines > .view-line {\n\tbackground-color: none;\n\tanimation-name: flash-background;\n\tanimation-duration: 800ms;\n}\n@keyframes flash-background {\n\t0% { background-color: lightgreen; }\n\t100% { background-color: none }\n}*/\n\n.monaco-editor.safari .lines-content,\n.monaco-editor.safari .view-line,\n.monaco-editor.safari .view-lines {\n\t-webkit-user-select: text;\n\tuser-select: text;\n}\n\n.monaco-editor .lines-content,\n.monaco-editor .view-line,\n.monaco-editor .view-lines {\n\t-webkit-user-select: none;\n\t-ms-user-select: none;\n\t-khtml-user-select: none;\n\t-moz-user-select: none;\n\t-o-user-select: none;\n\tuser-select: none;\n}\n\n.monaco-editor .view-lines {\n\tcursor: text;\n\twhite-space: nowrap;\n}\n\n.monaco-editor.vs-dark.mac .view-lines,\n.monaco-editor.hc-black.mac .view-lines {\n\tcursor: -webkit-image-set(url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAQAAAC1+jfqAAAAL0lEQVQoz2NgCD3x//9/BhBYBWdhgFVAiVW4JBFKGIa4AqD0//9D3pt4I4tAdAMAHTQ/j5Zom30AAAAASUVORK5CYII=) 1x, url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAQAAADZc7J/AAAAz0lEQVRIx2NgYGBY/R8I/vx5eelX3n82IJ9FxGf6tksvf/8FiTMQAcAGQMDvSwu09abffY8QYSAScNk45G198eX//yev73/4///701eh//kZSARckrNBRvz//+8+6ZohwCzjGNjdgQxkAg7B9WADeBjIBqtJCbhRA0YNoIkBSNmaPEMoNmA0FkYNoFKhapJ6FGyAH3nauaSmPfwI0v/3OukVi0CIZ+F25KrtYcx/CTIy0e+rC7R1Z4KMICVTQQ14feVXIbR695u14+Ir4gwAAD49E54wc1kWAAAAAElFTkSuQmCC) 2x) 5 8, text;\n}\n\n.monaco-editor .view-line {\n\tposition: absolute;\n\twidth: 100%;\n}\n\n/* TODO@tokenization bootstrap fix */\n/*.monaco-editor .view-line > span > span {\n\tfloat: none;\n\tmin-height: inherit;\n\tmargin-left: inherit;\n}*/",""])},2270:(e,t,n)=>{(e.exports=n(8826)(!1)).push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n.monaco-editor .lines-decorations {\n\tposition: absolute;\n\ttop: 0;\n\tbackground: white;\n}\n\n/*\n\tKeeping name short for faster parsing.\n\tcldr = core lines decorations rendering (div)\n*/\n.monaco-editor .margin-view-overlays .cldr {\n\tposition: absolute;\n\theight: 100%;\n}",""])},4464:(e,t,n)=>{(e.exports=n(8826)(!1)).push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n/*\n\tKeeping name short for faster parsing.\n\tcmdr = core margin decorations rendering (div)\n*/\n.monaco-editor .margin-view-overlays .cmdr {\n\tposition: absolute;\n\tleft: 0;\n\twidth: 100%;\n\theight: 100%;\n}",""])},8444:(e,t,n)=>{(e.exports=n(8826)(!1)).push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n/* START cover the case that slider is visible on mouseover */\n.monaco-editor .minimap.slider-mouseover .minimap-slider {\n\topacity: 0;\n\ttransition: opacity 100ms linear;\n}\n.monaco-editor .minimap.slider-mouseover:hover .minimap-slider {\n\topacity: 1;\n}\n.monaco-editor .minimap.slider-mouseover .minimap-slider.active {\n\topacity: 1;\n}\n/* END cover the case that slider is visible on mouseover */\n\n.monaco-editor .minimap-shadow-hidden {\n\tposition: absolute;\n\twidth: 0;\n}\n.monaco-editor .minimap-shadow-visible {\n\tposition: absolute;\n\tleft: -6px;\n\twidth: 6px;\n}\n",""])},9512:(e,t,n)=>{(e.exports=n(8826)(!1)).push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n.monaco-editor .overlayWidgets {\n\tposition: absolute;\n\ttop: 0;\n\tleft:0;\n}",""])},7508:(e,t,n)=>{(e.exports=n(8826)(!1)).push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .view-ruler {\n\tposition: absolute;\n\ttop: 0;\n}",""])},6044:(e,t,n)=>{(e.exports=n(8826)(!1)).push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .scroll-decoration {\n\tposition: absolute;\n\ttop: 0;\n\tleft: 0;\n\theight: 6px;\n}",""])},9412:(e,t,n)=>{(e.exports=n(8826)(!1)).push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n/*\n\tKeeping name short for faster parsing.\n\tcslr = core selections layer rendering (div)\n*/\n.monaco-editor .lines-content .cslr {\n\tposition: absolute;\n}\n\n.monaco-editor\t\t\t.top-left-radius\t\t{ border-top-left-radius: 3px; }\n.monaco-editor\t\t\t.bottom-left-radius\t\t{ border-bottom-left-radius: 3px; }\n.monaco-editor\t\t\t.top-right-radius\t\t{ border-top-right-radius: 3px; }\n.monaco-editor\t\t\t.bottom-right-radius\t{ border-bottom-right-radius: 3px; }\n\n.monaco-editor.hc-black .top-left-radius\t\t{ border-top-left-radius: 0; }\n.monaco-editor.hc-black .bottom-left-radius\t\t{ border-bottom-left-radius: 0; }\n.monaco-editor.hc-black .top-right-radius\t\t{ border-top-right-radius: 0; }\n.monaco-editor.hc-black .bottom-right-radius\t{ border-bottom-right-radius: 0; }\n",""])},9432:(e,t,n)=>{(e.exports=n(8826)(!1)).push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n.monaco-editor .cursors-layer {\n\tposition: absolute;\n\ttop: 0;\n}\n\n.monaco-editor .cursors-layer > .cursor {\n\tposition: absolute;\n\tcursor: text;\n\toverflow: hidden;\n}\n\n/* -- block-outline-style -- */\n.monaco-editor .cursors-layer.cursor-block-outline-style > .cursor {\n\tbox-sizing: border-box;\n\tbackground: transparent !important;\n\tborder-style: solid;\n\tborder-width: 1px;\n}\n\n/* -- underline-style -- */\n.monaco-editor .cursors-layer.cursor-underline-style > .cursor {\n\tborder-bottom-width: 2px;\n\tborder-bottom-style: solid;\n\tbackground: transparent !important;\n\tbox-sizing: border-box;\n}\n\n/* -- underline-thin-style -- */\n.monaco-editor .cursors-layer.cursor-underline-thin-style > .cursor {\n\tborder-bottom-width: 1px;\n\tborder-bottom-style: solid;\n\tbackground: transparent !important;\n\tbox-sizing: border-box;\n}\n\n@keyframes monaco-cursor-smooth {\n\t0%,\n\t20% {\n\t\topacity: 1;\n\t}\n\t60%,\n\t100% {\n\t\topacity: 0;\n\t}\n}\n\n@keyframes monaco-cursor-phase {\n\t0%,\n\t20% {\n\t\topacity: 1;\n\t}\n\t90%,\n\t100% {\n\t\topacity: 0;\n\t}\n}\n\n@keyframes monaco-cursor-expand {\n\t0%,\n\t20% {\n\t\ttransform: scaleY(1);\n\t}\n\t80%,\n\t100% {\n\t\ttransform: scaleY(0);\n\t}\n}\n\n.cursor-smooth {\n\tanimation: monaco-cursor-smooth 0.5s ease-in-out 0s 20 alternate;\n}\n\n.cursor-phase {\n\tanimation: monaco-cursor-phase 0.5s ease-in-out 0s 20 alternate;\n}\n\n.cursor-expand > .cursor {\n\tanimation: monaco-cursor-expand 0.5s ease-in-out 0s 20 alternate;\n}",""])},6117:(e,t,n)=>{(e.exports=n(8826)(!1)).push([e.id,'/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n/* ---------- DiffEditor ---------- */\n\n.monaco-diff-editor .diffOverview {\n\tz-index: 9;\n}\n\n/* colors not externalized: using transparancy on background */\n.monaco-diff-editor.vs\t\t\t.diffOverview { background: rgba(0, 0, 0, 0.03); }\n.monaco-diff-editor.vs-dark\t\t.diffOverview { background: rgba(255, 255, 255, 0.01); }\n\n.monaco-diff-editor .diffViewport {\n\tbox-shadow: inset 0px 0px 1px 0px #B9B9B9;\n\tbackground: rgba(0, 0, 0, 0.10);\n}\n\n.monaco-diff-editor.vs-dark .diffViewport,\n.monaco-diff-editor.hc-black .diffViewport {\n\tbackground: rgba(255, 255, 255, 0.10);\n}\n.monaco-scrollable-element.modified-in-monaco-diff-editor.vs\t\t.scrollbar { background: rgba(0,0,0,0); }\n.monaco-scrollable-element.modified-in-monaco-diff-editor.vs-dark\t.scrollbar { background: rgba(0,0,0,0); }\n.monaco-scrollable-element.modified-in-monaco-diff-editor.hc-black\t.scrollbar { background: none; }\n\n.monaco-scrollable-element.modified-in-monaco-diff-editor .slider {\n\tz-index: 10;\n}\n.modified-in-monaco-diff-editor\t\t\t\t.slider.active { background: rgba(171, 171, 171, .4); }\n.modified-in-monaco-diff-editor.hc-black\t.slider.active { background: none; }\n\n/* ---------- Diff ---------- */\n\n.monaco-editor .insert-sign,\n.monaco-diff-editor .insert-sign,\n.monaco-editor .delete-sign,\n.monaco-diff-editor .delete-sign {\n\tbackground-size: 60%;\n\topacity: 0.7;\n\tbackground-repeat: no-repeat;\n\tbackground-position: 50% 50%;\n}\n.monaco-editor.hc-black .insert-sign,\n.monaco-diff-editor.hc-black .insert-sign,\n.monaco-editor.hc-black .delete-sign,\n.monaco-diff-editor.hc-black .delete-sign {\n\topacity: 1;\n}\n.monaco-editor .insert-sign,\n.monaco-diff-editor .insert-sign {\n\tbackground-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHRpdGxlPkxheWVyIDE8L3RpdGxlPjxyZWN0IGhlaWdodD0iMTEiIHdpZHRoPSIzIiB5PSIzIiB4PSI3IiBmaWxsPSIjNDI0MjQyIi8+PHJlY3QgaGVpZ2h0PSIzIiB3aWR0aD0iMTEiIHk9IjciIHg9IjMiIGZpbGw9IiM0MjQyNDIiLz48L3N2Zz4=");\n}\n.monaco-editor .delete-sign,\n.monaco-diff-editor .delete-sign {\n\tbackground-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHRpdGxlPkxheWVyIDE8L3RpdGxlPjxyZWN0IGhlaWdodD0iMyIgd2lkdGg9IjExIiB5PSI3IiB4PSIzIiBmaWxsPSIjNDI0MjQyIi8+PC9zdmc+");\n}\n\n.monaco-editor.vs-dark .insert-sign,\n.monaco-diff-editor.vs-dark .insert-sign,\n.monaco-editor.hc-black .insert-sign,\n.monaco-diff-editor.hc-black .insert-sign {\n\tbackground-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHRpdGxlPkxheWVyIDE8L3RpdGxlPjxyZWN0IGhlaWdodD0iMTEiIHdpZHRoPSIzIiB5PSIzIiB4PSI3IiBmaWxsPSIjQzVDNUM1Ii8+PHJlY3QgaGVpZ2h0PSIzIiB3aWR0aD0iMTEiIHk9IjciIHg9IjMiIGZpbGw9IiNDNUM1QzUiLz48L3N2Zz4=");\n}\n.monaco-editor.vs-dark .delete-sign,\n.monaco-diff-editor.vs-dark .delete-sign,\n.monaco-editor.hc-black .delete-sign,\n.monaco-diff-editor.hc-black .delete-sign {\n\tbackground-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHRpdGxlPkxheWVyIDE8L3RpdGxlPjxyZWN0IGhlaWdodD0iMyIgd2lkdGg9IjExIiB5PSI3IiB4PSIzIiBmaWxsPSIjQzVDNUM1Ii8+PC9zdmc+");\n}\n\n.monaco-editor .inline-deleted-margin-view-zone {\n\ttext-align: right;\n}\n.monaco-editor .inline-added-margin-view-zone {\n\ttext-align: right;\n}\n\n.monaco-editor .diagonal-fill {\n\tbackground: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJCAYAAADgkQYQAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjEwMPRyoQAAAChJREFUKFNjOH/+fAMDDgCSu3Dhwn9c8gwwBTgNGR4KQP4HhQOhsAIAZCBTkhtqePcAAAAASUVORK5CYII=");\n}\n.monaco-editor.vs-dark .diagonal-fill {\n\topacity: 0.2;\n}\n.monaco-editor.hc-black .diagonal-fill {\n\tbackground: none;\n}\n\n/* ---------- Inline Diff ---------- */\n\n.monaco-editor .view-zones .view-lines .view-line span {\n\tdisplay: inline-block;\n}\n',""])},4238:(e,t,n)=>{(e.exports=n(8826)(!1)).push([e.id,'/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-diff-editor .diff-review-line-number {\n\ttext-align: right;\n\tdisplay: inline-block;\n}\n\n.monaco-diff-editor .diff-review {\n\tposition: absolute;\n\t-webkit-user-select: none;\n\t-ms-user-select: none;\n\t-khtml-user-select: none;\n\t-moz-user-select: none;\n\t-o-user-select: none;\n\tuser-select: none;\n}\n\n.monaco-diff-editor .diff-review-summary {\n\tpadding-left: 10px;\n}\n\n.monaco-diff-editor .diff-review-shadow {\n\tposition: absolute;\n}\n\n.monaco-diff-editor .diff-review-row {\n\twhite-space: pre;\n}\n\n.monaco-diff-editor .diff-review-table {\n\tdisplay: table;\n\tmin-width: 100%;\n}\n\n.monaco-diff-editor .diff-review-row {\n\tdisplay: table-row;\n\twidth: 100%;\n}\n\n.monaco-diff-editor .diff-review-cell {\n\tdisplay: table-cell;\n}\n\n.monaco-diff-editor .diff-review-spacer {\n\tdisplay: inline-block;\n\twidth: 10px;\n}\n\n.monaco-diff-editor .diff-review-actions {\n\tdisplay: inline-block;\n\tposition: absolute;\n\tright: 10px;\n\ttop: 2px;\n}\n\n.monaco-diff-editor .diff-review-actions .action-label {\n\twidth: 16px;\n\theight: 16px;\n\tmargin: 2px 0;\n}\n.monaco-diff-editor .action-label.icon.close-diff-review {\n\tbackground: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgdmlld0JveD0iMyAzIDE2IDE2IiBlbmFibGUtYmFja2dyb3VuZD0ibmV3IDMgMyAxNiAxNiI+PHBvbHlnb24gZmlsbD0iIzQyNDI0MiIgcG9pbnRzPSIxMi41OTcsMTEuMDQyIDE1LjQsMTMuODQ1IDEzLjg0NCwxNS40IDExLjA0MiwxMi41OTggOC4yMzksMTUuNCA2LjY4MywxMy44NDUgOS40ODUsMTEuMDQyIDYuNjgzLDguMjM5IDguMjM4LDYuNjgzIDExLjA0Miw5LjQ4NiAxMy44NDUsNi42ODMgMTUuNCw4LjIzOSIvPjwvc3ZnPg==") center center no-repeat;\n}\n.monaco-diff-editor.hc-black .action-label.icon.close-diff-review,\n.monaco-diff-editor.vs-dark .action-label.icon.close-diff-review {\n\tbackground: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgdmlld0JveD0iMyAzIDE2IDE2IiBlbmFibGUtYmFja2dyb3VuZD0ibmV3IDMgMyAxNiAxNiI+PHBvbHlnb24gZmlsbD0iI2U4ZThlOCIgcG9pbnRzPSIxMi41OTcsMTEuMDQyIDE1LjQsMTMuODQ1IDEzLjg0NCwxNS40IDExLjA0MiwxMi41OTggOC4yMzksMTUuNCA2LjY4MywxMy44NDUgOS40ODUsMTEuMDQyIDYuNjgzLDguMjM5IDguMjM4LDYuNjgzIDExLjA0Miw5LjQ4NiAxMy44NDUsNi42ODMgMTUuNCw4LjIzOSIvPjwvc3ZnPg==") center center no-repeat;\n}',""])},2076:(e,t,n)=>{(e.exports=n(8826)(!1)).push([e.id,'/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n/* -------------------- IE10 remove auto clear button -------------------- */\n\n::-ms-clear {\n\tdisplay: none;\n}\n\n/* All widgets */\n/* I am not a big fan of this rule */\n.monaco-editor .editor-widget input {\n\tcolor: inherit;\n}\n\n/* -------------------- Editor -------------------- */\n\n.monaco-editor {\n\tposition: relative;\n\toverflow: visible;\n\t-webkit-text-size-adjust: 100%;\n\t-webkit-font-feature-settings: "liga" off, "calt" off;\n\tfont-feature-settings: "liga" off, "calt" off;\n}\n.monaco-editor.enable-ligatures {\n\t-webkit-font-feature-settings: "liga" on, "calt" on;\n\tfont-feature-settings: "liga" on, "calt" on;\n}\n\n/* -------------------- Misc -------------------- */\n\n.monaco-editor .overflow-guard {\n\tposition: relative;\n\toverflow: hidden;\n}\n\n.monaco-editor .view-overlays {\n\tposition: absolute;\n\ttop: 0;\n}',""])},5701:(e,t,n)=>{(e.exports=n(8826)(!1)).push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .vs-whitespace {\n\tdisplay:inline-block;\n}\n\n",""])},8845:(e,t,n)=>{(e.exports=n(8826)(!1)).push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .bracket-match {\n\tbox-sizing: border-box;\n}\n",""])},7753:(e,t,n)=>{(e.exports=n(8826)(!1)).push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-menu .monaco-action-bar.vertical .action-label.hover {\n\tbackground-color: #EEE;\n}",""])},531:(e,t,n)=>{(e.exports=n(8826)(!1)).push([e.id,'/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .lightbulb-glyph {\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n\theight: 16px;\n\twidth: 20px;\n\tpadding-left: 2px;\n}\n\n.monaco-editor .lightbulb-glyph:hover {\n\tcursor: pointer;\n\t/* transform: scale(1.3, 1.3); */\n}\n\n.monaco-editor.vs .lightbulb-glyph {\n\tbackground: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiIgZW5hYmxlLWJhY2tncm91bmQ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nPg==") center center no-repeat;\n}\n\n.monaco-editor.vs-dark .lightbulb-glyph,\n.monaco-editor.hc-black .lightbulb-glyph {\n\tbackground: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiIgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgMTYgMTYiIGhlaWdodD0iMTYiIHdpZHRoPSIxNiI+PHBhdGggZmlsbD0iIzFFMUUxRSIgZD0iTTEzLjUgNC4yQzEzLjEgMi4xIDEwLjggMCA5LjMgMEg2LjdjLS40IDAtLjYuMi0uNi4yQzQgLjggMi41IDIuNyAyLjUgNC45YzAgLjUtLjEgMi4zIDEuNyAzLjguNS41IDEuMiAyIDEuMyAyLjR2My4zTDcuMSAxNmgybDEuNS0xLjZWMTFjLjEtLjQuOC0xLjkgMS4zLTIuMyAxLjEtLjkgMS41LTEuOSAxLjYtMi43VjQuMnoiLz48Zz48ZyBmaWxsPSIjQzVDNUM1Ij48cGF0aCBkPSJNNi41IDEyaDN2MWgtM3pNNy41IDE1aDEuMWwuOS0xaC0zeiIvPjwvZz48cGF0aCBmaWxsPSIjRERCMjA0IiBkPSJNMTIuNiA1YzAtMi4zLTEuOC00LjEtNC4xLTQuMS0uMSAwLTEuNC4xLTEuNC4xLTIuMS4zLTMuNyAyLTMuNyA0IDAgLjEtLjIgMS42IDEuNCAzIC43LjcgMS41IDIuNCAxLjYgMi45bC4xLjFoM2wuMS0uMmMuMS0uNS45LTIuMiAxLjYtMi45IDEuNi0xLjMgMS40LTIuOCAxLjQtMi45em0tMyAxbC0uNSAzaC0uNlY2YzEuMSAwIC45LTEgLjktMUg2LjV2LjFjMCAuMi4xLjkgMSAuOXYzSDdsLS4yLS43TDYuNSA2Yy0uNyAwLS45LS40LTEtLjd2LS40YzAtLjguOS0uOS45LS45aDMuMXMxIC4xIDEgMWMwIDAgLjEgMS0uOSAxeiIvPjwvZz48cGF0aCBmaWxsPSIjMjUyNTI2IiBkPSJNMTAuNSA1YzAtLjktMS0xLTEtMUg2LjRzLS45LjEtLjkuOXYuNGMwIC4zLjMuNy45LjdsLjQgMi4zLjIuN2guNVY2Yy0xIDAtMS0uNy0xLS45VjVoM3MuMSAxLS45IDF2M2guNmwuNS0zYy45IDAgLjgtMSAuOC0xeiIvPjwvc3ZnPg==") center center no-repeat;\n}\n',""])},6897:(e,t,n)=>{(e.exports=n(8826)(!1)).push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .codelens-decoration {\n\toverflow: hidden;\n\tdisplay: inline-block;\n\ttext-overflow: ellipsis;\n}\n\n.monaco-editor .codelens-decoration > span,\n.monaco-editor .codelens-decoration > a {\n\t-moz-user-select: none;\n\t-webkit-user-select: none;\n\t-ms-user-select: none;\n\tuser-select: none;\n\twhite-space: nowrap;\n\tvertical-align: sub;\n}\n\n.monaco-editor .codelens-decoration > a {\n\ttext-decoration: none;\n}\n\n.monaco-editor .codelens-decoration > a:hover {\n\ttext-decoration: underline;\n\tcursor: pointer;\n}\n\n.monaco-editor .codelens-decoration.invisible-cl {\n\topacity: 0;\n}\n\n@keyframes fadein { 0% { opacity:0; visibility:visible;} 100% { opacity:1; } }\n@-moz-keyframes fadein { 0% { opacity:0; visibility:visible;} 100% { opacity:1; } }\n@-o-keyframes fadein { 0% { opacity:0; visibility:visible;} 100% { opacity:1; } }\n@-webkit-keyframes fadein { 0% { opacity:0; visibility:visible;} 100% { opacity:1; } }\n\n.monaco-editor .codelens-decoration.fadein {\n\t-webkit-animation: fadein 0.5s linear;\n\t-moz-animation: fadein 0.5s linear;\n\t-o-animation: fadein 0.5s linear;\n\tanimation: fadein 0.5s linear;\n}\n",""])},4945:(e,t,n)=>{(e.exports=n(8826)(!1)).push([e.id,'/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.colorpicker-widget {\n\theight: 190px;\n\tuser-select: none;\n}\n\n.monaco-editor .colorpicker-hover:focus {\n\toutline: none;\n}\n\n\n/* Header */\n\n.colorpicker-header {\n\tdisplay: flex;\n\theight: 24px;\n\tposition: relative;\n\tbackground: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAYAAACp8Z5+AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAZdEVYdFNvZnR3YXJlAHBhaW50Lm5ldCA0LjAuMTZEaa/1AAAAHUlEQVQYV2PYvXu3JAi7uLiAMaYAjAGTQBPYLQkAa/0Zef3qRswAAAAASUVORK5CYII=");\n\tbackground-size: 9px 9px;\n\timage-rendering: pixelated;\n}\n\n.colorpicker-header .picked-color {\n\twidth: 216px;\n\ttext-align: center;\n\tline-height: 24px;\n\tcursor: pointer;\n\tcolor: white;\n\tflex: 1;\n\ttext-align: center;\n}\n\n.colorpicker-header .picked-color.light {\n\tcolor: black;\n}\n\n.colorpicker-header .original-color {\n\twidth: 74px;\n\tz-index: inherit;\n\tcursor: pointer;\n}\n\n\n/* Body */\n\n.colorpicker-body {\n\tdisplay: flex;\n\tpadding: 8px;\n\tposition: relative;\n}\n\n.colorpicker-body .saturation-wrap {\n\toverflow: hidden;\n\theight: 150px;\n\tposition: relative;\n\tmin-width: 220px;\n\tflex: 1;\n}\n\n.colorpicker-body .saturation-box {\n\theight: 150px;\n\tposition: absolute;\n}\n\n.colorpicker-body .saturation-selection {\n\twidth: 9px;\n\theight: 9px;\n\tmargin: -5px 0 0 -5px;\n\tborder: 1px solid rgb(255, 255, 255);\n\tborder-radius: 100%;\n\tbox-shadow: 0px 0px 2px rgba(0, 0, 0, 0.8);\n\tposition: absolute;\n}\n\n.colorpicker-body .strip {\n\twidth: 25px;\n\theight: 150px;\n}\n\n.colorpicker-body .hue-strip {\n\tposition: relative;\n\tmargin-left: 8px;\n\tcursor: -webkit-grab;\n\tbackground: linear-gradient(to bottom, #ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%);\n}\n\n.colorpicker-body .opacity-strip {\n\tposition: relative;\n\tmargin-left: 8px;\n\tcursor: -webkit-grab;\n\tbackground: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAYAAACp8Z5+AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAZdEVYdFNvZnR3YXJlAHBhaW50Lm5ldCA0LjAuMTZEaa/1AAAAHUlEQVQYV2PYvXu3JAi7uLiAMaYAjAGTQBPYLQkAa/0Zef3qRswAAAAASUVORK5CYII=");\n\tbackground-size: 9px 9px;\n\timage-rendering: pixelated;\n}\n\n.colorpicker-body .strip.grabbing {\n\tcursor: -webkit-grabbing;\n}\n\n.colorpicker-body .slider {\n\tposition: absolute;\n\ttop: 0;\n\tleft: -2px;\n\twidth: calc(100% + 4px);\n\theight: 4px;\n\tbox-sizing: border-box;\n\tborder: 1px solid rgba(255, 255, 255, 0.71);\n\tbox-shadow: 0px 0px 1px rgba(0, 0, 0, 0.85);\n}\n\n.colorpicker-body .strip .overlay {\n\theight: 150px;\n\tpointer-events: none;\n}',""])},9957:(e,t,n)=>{(e.exports=n(8826)(!1)).push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor.vs .dnd-target {\n\tborder-right: 2px dotted black;\n\tcolor: white; /* opposite of black */\n}\n.monaco-editor.vs-dark .dnd-target {\n\tborder-right: 2px dotted #AEAFAD;\n\tcolor: #51504f; /* opposite of #AEAFAD */\n}\n.monaco-editor.hc-black .dnd-target {\n\tborder-right: 2px dotted #fff;\n\tcolor: #000; /* opposite of #fff */\n}\n\n.monaco-editor.mouse-default .view-lines,\n.monaco-editor.vs-dark.mac.mouse-default .view-lines,\n.monaco-editor.hc-black.mac.mouse-default .view-lines {\n\tcursor: default;\n}\n.monaco-editor.mouse-copy .view-lines,\n.monaco-editor.vs-dark.mac.mouse-copy .view-lines,\n.monaco-editor.hc-black.mac.mouse-copy .view-lines {\n\tcursor: copy;\n}",""])},4701:(e,t,n)=>{(e.exports=n(8826)(!1)).push([e.id,'/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n/* Checkbox */\n\n.monaco-checkbox .label {\n\twidth: 12px;\n\theight: 12px;\n\tborder: 1px solid black;\n\tbackground-color: transparent;\n\tdisplay: inline-block;\n}\n\n.monaco-checkbox .checkbox {\n\tposition: absolute;\n\toverflow: hidden;\n\tclip: rect(0 0 0 0);\n\theight: 1px;\n\twidth: 1px;\n\tmargin: -1px;\n\tpadding: 0;\n\tborder: 0;\n}\n\n.monaco-checkbox .checkbox:checked + .label {\n\tbackground-color: black;\n}\n\n/* Find widget */\n.monaco-editor .find-widget {\n\tposition: absolute;\n\tz-index: 10;\n\ttop: -44px; /* find input height + shadow (10px) */\n\theight: 34px; /* find input height */\n\toverflow: hidden;\n\tline-height: 19px;\n\n\t-webkit-transition: top 200ms linear;\n\t-o-transition: top 200ms linear;\n\t-moz-transition: top 200ms linear;\n\t-ms-transition: top 200ms linear;\n\ttransition: top 200ms linear;\n\n\tpadding: 0 4px;\n}\n/* Find widget when replace is toggled on */\n.monaco-editor .find-widget.replaceToggled {\n\ttop: -74px; /* find input height + replace input height + shadow (10px) */\n\theight: 64px; /* find input height + replace input height */\n}\n.monaco-editor .find-widget.replaceToggled > .replace-part {\n\tdisplay: flex;\n\tdisplay: -webkit-flex;\n\talign-items: center;\n}\n\n.monaco-editor .find-widget.visible,\n.monaco-editor .find-widget.replaceToggled.visible {\n\ttop: 0;\n}\n\n.monaco-editor .find-widget .monaco-inputbox .input {\n\tbackground-color: transparent;\n\t/* Style to compensate for //winjs */\n\tmin-height: 0;\n}\n\n.monaco-editor .find-widget .replace-input .input {\n\tfont-size: 13px;\n}\n\n.monaco-editor .find-widget > .find-part,\n.monaco-editor .find-widget > .replace-part {\n\tmargin: 4px 0 0 17px;\n\tfont-size: 12px;\n\tdisplay: flex;\n\tdisplay: -webkit-flex;\n\talign-items: center;\n}\n\n.monaco-editor .find-widget > .find-part .monaco-inputbox,\n.monaco-editor .find-widget > .replace-part .monaco-inputbox {\n\theight: 25px;\n}\n\n.monaco-editor .find-widget > .find-part .monaco-inputbox > .wrapper > .input {\n\twidth: 100% !important;\n\tpadding-right: 66px;\n}\n.monaco-editor .find-widget > .find-part .monaco-inputbox > .wrapper > .input,\n.monaco-editor .find-widget > .replace-part .monaco-inputbox > .wrapper > .input {\n\tpadding-top: 2px;\n\tpadding-bottom: 2px;\n}\n\n.monaco-editor .find-widget .monaco-findInput {\n\tvertical-align: middle;\n\tdisplay: flex;\n\tdisplay: -webkit-flex;\n\tflex:1;\n}\n\n.monaco-editor .find-widget .matchesCount {\n\tdisplay: flex;\n\tdisplay: -webkit-flex;\n\tflex: initial;\n\tmargin: 0 1px 0 3px;\n\tpadding: 2px 2px 0 2px;\n\theight: 25px;\n\tvertical-align: middle;\n\tbox-sizing: border-box;\n\ttext-align: center;\n\tline-height: 23px;\n}\n\n.monaco-editor .find-widget .button {\n\tmin-width: 20px;\n\twidth: 20px;\n\theight: 20px;\n\tdisplay: flex;\n\tdisplay: -webkit-flex;\n\tflex: initial;\n\tmargin-left: 3px;\n\tbackground-position: center center;\n\tbackground-repeat: no-repeat;\n\tcursor: pointer;\n}\n\n.monaco-editor .find-widget .button:not(.disabled):hover {\n\tbackground-color: rgba(0, 0, 0, 0.1);\n}\n\n.monaco-editor .find-widget .button.left {\n\tmargin-left: 0;\n\tmargin-right: 3px;\n}\n\n.monaco-editor .find-widget .button.wide {\n\twidth: auto;\n\tpadding: 1px 6px;\n\ttop: -1px;\n}\n\n.monaco-editor .find-widget .button.toggle {\n\tposition: absolute;\n\ttop: 0;\n\tleft: 0;\n\twidth: 18px;\n\theight: 100%;\n\t-webkit-box-sizing:\tborder-box;\n\t-o-box-sizing:\t\tborder-box;\n\t-moz-box-sizing:\tborder-box;\n\t-ms-box-sizing:\t\tborder-box;\n\tbox-sizing:\t\t\tborder-box;\n}\n\n.monaco-editor .find-widget .button.toggle.disabled {\n\tdisplay: none;\n}\n\n.monaco-editor .find-widget .previous {\n\tbackground-image: url("data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiCgkgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIKCSB4PSIwcHgiIHk9IjBweCIgd2lkdGg9IjE2cHgiIGhlaWdodD0iMTZweCIgdmlld0JveD0iLTEgLTMgMTYgMTYiIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgLTEgLTMgMTYgMTYiIHhtbDpzcGFjZT0icHJlc2VydmUiPgo8cG9seWdvbiBmaWxsPSIjNDI0MjQyIiBwb2ludHM9IjEzLDQgNiw0IDksMSA2LDEgMiw1IDYsOSA5LDkgNiw2IDEzLDYgIi8+Cjwvc3ZnPgo=");\n}\n\n.monaco-editor .find-widget .next {\n\tbackground-image: url("data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiCgkgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIKCSB4PSIwcHgiIHk9IjBweCIgd2lkdGg9IjE2cHgiIGhlaWdodD0iMTZweCIgdmlld0JveD0iLTEgLTMgMTYgMTYiIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgLTEgLTMgMTYgMTYiIHhtbDpzcGFjZT0icHJlc2VydmUiPgo8cGF0aCBmaWxsPSIjNDI0MjQyIiBkPSJNMSw0aDdMNSwxaDNsNCw0TDgsOUg1bDMtM0gxVjR6Ii8+Cjwvc3ZnPgo=");\n}\n\n.monaco-editor .find-widget .disabled {\n\topacity: 0.3;\n\tcursor: default;\n}\n\n.monaco-editor .find-widget .monaco-checkbox {\n\twidth: 20px;\n\theight: 20px;\n\tdisplay: inline-block;\n\tvertical-align: middle;\n\tmargin-left: 3px;\n}\n\n.monaco-editor .find-widget .monaco-checkbox .label {\n\tcontent: \'\';\n\tdisplay: inline-block;\n\tbackground-repeat: no-repeat;\n\tbackground-position: 0 0;\n\tbackground-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCI+CjxnIHRyYW5zZm9ybT0idHJhbnNsYXRlKDAsLTEwMzIuMzYyMikiPgogIDxyZWN0IHdpZHRoPSI5IiBoZWlnaHQ9IjIiIHg9IjIiIHk9IjEwNDYuMzYyMiIgc3R5bGU9ImZpbGw6IzQyNDI0MjtmaWxsLW9wYWNpdHk6MTtzdHJva2U6bm9uZSIgLz4KICA8cmVjdCB3aWR0aD0iMTMiIGhlaWdodD0iMiIgeD0iMiIgeT0iMTA0My4zNjIyIiBzdHlsZT0iZmlsbDojNDI0MjQyO2ZpbGwtb3BhY2l0eToxO3N0cm9rZTpub25lIiAvPgogIDxyZWN0IHdpZHRoPSI2IiBoZWlnaHQ9IjIiIHg9IjIiIHk9IjEwNDAuMzYyMiIgc3R5bGU9ImZpbGw6IzQyNDI0MjtmaWxsLW9wYWNpdHk6MTtzdHJva2U6bm9uZSIgLz4KICA8cmVjdCB3aWR0aD0iMTIiIGhlaWdodD0iMiIgeD0iMiIgeT0iMTAzNy4zNjIyIiBzdHlsZT0iZmlsbDojNDI0MjQyO2ZpbGwtb3BhY2l0eToxO3N0cm9rZTpub25lIiAvPgo8L2c+Cjwvc3ZnPg==");\n\twidth: 20px;\n\theight: 20px;\n\tborder: none;\n}\n\n.monaco-editor .find-widget .monaco-checkbox .checkbox:disabled + .label {\n\topacity: 0.3;\n\tcursor: default;\n}\n\n.monaco-editor .find-widget .monaco-checkbox .checkbox:not(:disabled) + .label {\n\tcursor: pointer;\n}\n\n.monaco-editor .find-widget .monaco-checkbox .checkbox:not(:disabled):hover:before + .label {\n\tbackground-color: #DDD;\n}\n\n.monaco-editor .find-widget .monaco-checkbox .checkbox:checked + .label {\n\tbackground-color: rgba(100, 100, 100, 0.2);\n}\n\n.monaco-editor .find-widget .close-fw {\n\tbackground-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgdmlld0JveD0iMyAzIDE2IDE2IiBlbmFibGUtYmFja2dyb3VuZD0ibmV3IDMgMyAxNiAxNiI+PHBvbHlnb24gZmlsbD0iIzQyNDI0MiIgcG9pbnRzPSIxMi41OTcsMTEuMDQyIDE1LjQsMTMuODQ1IDEzLjg0NCwxNS40IDExLjA0MiwxMi41OTggOC4yMzksMTUuNCA2LjY4MywxMy44NDUgOS40ODUsMTEuMDQyIDYuNjgzLDguMjM5IDguMjM4LDYuNjgzIDExLjA0Miw5LjQ4NiAxMy44NDUsNi42ODMgMTUuNCw4LjIzOSIvPjwvc3ZnPg==");\n}\n\n.monaco-editor .find-widget .expand {\n\tbackground-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+PHBhdGggZmlsbD0iIzY0NjQ2NSIgZD0iTTExIDEwLjA3aC01LjY1Nmw1LjY1Ni01LjY1NnY1LjY1NnoiLz48L3N2Zz4=");\n}\n\n.monaco-editor .find-widget .collapse {\n\tbackground-image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+Cg==");\n}\n\n.monaco-editor .find-widget .replace-all {\n\tbackground-image: url("data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IiB3aWR0aD0iMTZweCIKCSBoZWlnaHQ9IjE2cHgiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgMTYgMTYiIHhtbDpzcGFjZT0icHJlc2VydmUiPgo8ZyBpZD0iaWNvbl94NUZfYmciPgoJPHBhdGggZmlsbD0iIzQyNDI0MiIgZD0iTTExLDE1VjlIMXY2SDExeiBNMiwxNHYtMmgxdi0xSDJ2LTFoM3Y0SDJ6IE0xMCwxMUg4djJoMnYxSDd2LTRoM1YxMXogTTMsMTN2LTFoMXYxSDN6IE0xMyw3djZoLTFWOEg1VjcKCQlIMTN6IE0xMywyVjFoLTF2NWgzVjJIMTN6IE0xNCw1aC0xVjNoMVY1eiBNMTEsMnY0SDhWNGgxdjFoMVY0SDlWM0g4VjJIMTF6Ii8+CjwvZz4KPGcgaWQ9ImNvbG9yX3g1Rl9hY3Rpb24iPgoJPHBhdGggZmlsbD0iIzAwNTM5QyIgZD0iTTEuOTc5LDMuNUwyLDZMMSw1djEuNUwyLjUsOEw0LDYuNVY1TDMsNkwyLjk3OSwzLjVjMC0wLjI3NSwwLjIyNS0wLjUsMC41LTAuNUg3VjJIMy40NzkKCQlDMi42NTEsMiwxLjk3OSwyLjY3MywxLjk3OSwzLjV6Ii8+CjwvZz4KPC9zdmc+Cg==");\n}\n\n.monaco-editor .find-widget > .replace-part {\n\tdisplay: none;\n}\n\n.monaco-editor .find-widget > .replace-part > .replace-input {\n\tdisplay: flex;\n\tdisplay: -webkit-flex;\n\tvertical-align: middle;\n\twidth: auto !important;\n}\n\n/* REDUCED */\n.monaco-editor .find-widget.reduced-find-widget .matchesCount,\n.monaco-editor .find-widget.reduced-find-widget .monaco-checkbox {\n\tdisplay:none;\n}\n\n/* NARROW (SMALLER THAN REDUCED) */\n.monaco-editor .find-widget.narrow-find-widget {\n\tmax-width: 257px !important;\n}\n\n/* COLLAPSED (SMALLER THAN NARROW) */\n.monaco-editor .find-widget.collapsed-find-widget {\n\tmax-width: 111px !important;\n}\n\n.monaco-editor .find-widget.collapsed-find-widget .button.previous,\n.monaco-editor .find-widget.collapsed-find-widget .button.next,\n.monaco-editor .find-widget.collapsed-find-widget .button.replace,\n.monaco-editor .find-widget.collapsed-find-widget .button.replace-all,\n.monaco-editor .find-widget.collapsed-find-widget > .find-part .monaco-findInput .controls {\n\tdisplay:none;\n}\n\n.monaco-editor .find-widget.collapsed-find-widget > .find-part .monaco-inputbox > .wrapper > .input {\n\tpadding-right: 0px;\n}\n\n.monaco-editor .findMatch {\n\t-webkit-animation-duration: 0;\n\t-webkit-animation-name: inherit !important;\n\t-moz-animation-duration: 0;\n\t-moz-animation-name: inherit !important;\n\t-ms-animation-duration: 0;\n\t-ms-animation-name: inherit !important;\n\tanimation-duration: 0;\n\tanimation-name: inherit !important;\n}\n\n.monaco-editor .find-widget .monaco-sash {\n\twidth: 2px !important;\n\tmargin-left: -4px;\n}\n\n.monaco-editor.hc-black .find-widget .previous,\n.monaco-editor.vs-dark .find-widget .previous {\n\tbackground-image: url("data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiCgkgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIKCSB4PSIwcHgiIHk9IjBweCIgd2lkdGg9IjE2cHgiIGhlaWdodD0iMTZweCIgdmlld0JveD0iLTEgLTMgMTYgMTYiIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgLTEgLTMgMTYgMTYiIHhtbDpzcGFjZT0icHJlc2VydmUiPgo8cG9seWdvbiBmaWxsPSIjQzVDNUM1IiBwb2ludHM9IjEzLDQgNiw0IDksMSA2LDEgMiw1IDYsOSA5LDkgNiw2IDEzLDYgIi8+Cjwvc3ZnPgo=");\n}\n\n.monaco-editor.hc-black .find-widget .next,\n.monaco-editor.vs-dark .find-widget .next {\n\tbackground-image: url("data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiCgkgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIKCSB4PSIwcHgiIHk9IjBweCIgd2lkdGg9IjE2cHgiIGhlaWdodD0iMTZweCIgdmlld0JveD0iLTEgLTMgMTYgMTYiIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgLTEgLTMgMTYgMTYiIHhtbDpzcGFjZT0icHJlc2VydmUiPgo8cGF0aCBmaWxsPSIjQzVDNUM1IiBkPSJNMSw0aDdMNSwxaDNsNCw0TDgsOUg1bDMtM0gxVjR6Ii8+Cjwvc3ZnPgo=");\n}\n\n.monaco-editor.hc-black .find-widget .monaco-checkbox .label,\n.monaco-editor.vs-dark .find-widget .monaco-checkbox .label {\n\tbackground-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCI+CjxnIHRyYW5zZm9ybT0idHJhbnNsYXRlKDAsLTEwMzIuMzYyMikiPgogIDxyZWN0IHdpZHRoPSI5IiBoZWlnaHQ9IjIiIHg9IjIiIHk9IjEwNDYuMzYyMiIgc3R5bGU9ImZpbGw6I0M1QzVDNTtmaWxsLW9wYWNpdHk6MTtzdHJva2U6bm9uZSIgLz4KICA8cmVjdCB3aWR0aD0iMTMiIGhlaWdodD0iMiIgeD0iMiIgeT0iMTA0My4zNjIyIiBzdHlsZT0iZmlsbDojQzVDNUM1O2ZpbGwtb3BhY2l0eToxO3N0cm9rZTpub25lIiAvPgogIDxyZWN0IHdpZHRoPSI2IiBoZWlnaHQ9IjIiIHg9IjIiIHk9IjEwNDAuMzYyMiIgc3R5bGU9ImZpbGw6I0M1QzVDNTtmaWxsLW9wYWNpdHk6MTtzdHJva2U6bm9uZSIgLz4KICA8cmVjdCB3aWR0aD0iMTIiIGhlaWdodD0iMiIgeD0iMiIgeT0iMTAzNy4zNjIyIiBzdHlsZT0iZmlsbDojQzVDNUM1O2ZpbGwtb3BhY2l0eToxO3N0cm9rZTpub25lIiAvPgo8L2c+Cjwvc3ZnPg==");\n}\n\n.monaco-editor.vs-dark .find-widget .monaco-checkbox .checkbox:not(:disabled):hover:before + .label {\n\tbackground-color: rgba(255, 255, 255, 0.1);\n}\n\n.monaco-editor.vs-dark .find-widget .monaco-checkbox .checkbox:checked + .label {\n\tbackground-color: rgba(255, 255, 255, 0.1);\n}\n\n.monaco-editor.hc-black .find-widget .close-fw,\n.monaco-editor.vs-dark .find-widget .close-fw {\n\tbackground-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgdmlld0JveD0iMyAzIDE2IDE2IiBlbmFibGUtYmFja2dyb3VuZD0ibmV3IDMgMyAxNiAxNiI+PHBvbHlnb24gZmlsbD0iI2U4ZThlOCIgcG9pbnRzPSIxMi41OTcsMTEuMDQyIDE1LjQsMTMuODQ1IDEzLjg0NCwxNS40IDExLjA0MiwxMi41OTggOC4yMzksMTUuNCA2LjY4MywxMy44NDUgOS40ODUsMTEuMDQyIDYuNjgzLDguMjM5IDguMjM4LDYuNjgzIDExLjA0Miw5LjQ4NiAxMy44NDUsNi42ODMgMTUuNCw4LjIzOSIvPjwvc3ZnPg==");\n}\n\n.monaco-editor.hc-black .find-widget .replace,\n.monaco-editor.vs-dark .find-widget .replace {\n\tbackground-image: url("data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IiB3aWR0aD0iMTZweCIKCSBoZWlnaHQ9IjE2cHgiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgMTYgMTYiIHhtbDpzcGFjZT0icHJlc2VydmUiPgo8ZyBpZD0iaWNvbl94NUZfYmciPgoJPGc+CgkJPHBhdGggZmlsbD0iI0M1QzVDNSIgZD0iTTExLDNWMWgtMXY1djFoMWgyaDFWNFYzSDExeiBNMTMsNmgtMlY0aDJWNnoiLz4KCQk8cGF0aCBmaWxsPSIjQzVDNUM1IiBkPSJNMiwxNWg3VjlIMlYxNXogTTQsMTBoM3YxSDV2MmgydjFINFYxMHoiLz4KCTwvZz4KPC9nPgo8ZyBpZD0iY29sb3JfeDVGX2ltcG9ydGFuY2UiPgoJPHBhdGggZmlsbD0iIzc1QkVGRiIgZD0iTTMuOTc5LDMuNUw0LDZMMyw1djEuNUw0LjUsOEw2LDYuNVY1TDUsNkw0Ljk3OSwzLjVjMC0wLjI3NSwwLjIyNS0wLjUsMC41LTAuNUg5VjJINS40NzkKCQlDNC42NTEsMiwzLjk3OSwyLjY3MywzLjk3OSwzLjV6Ii8+CjwvZz4KPC9zdmc+Cg==");\n}\n\n.monaco-editor.hc-black .find-widget .replace-all,\n.monaco-editor.vs-dark .find-widget .replace-all {\n\tbackground-image: url("data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IiB3aWR0aD0iMTZweCIKCSBoZWlnaHQ9IjE2cHgiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgMTYgMTYiIHhtbDpzcGFjZT0icHJlc2VydmUiPgo8ZyBpZD0iaWNvbl94NUZfYmciPgoJPHBhdGggZmlsbD0iI0M1QzVDNSIgZD0iTTExLDE1VjlIMXY2SDExeiBNMiwxNHYtMmgxdi0xSDJ2LTFoM3Y0SDJ6IE0xMCwxMUg4djJoMnYxSDd2LTRoM1YxMXogTTMsMTN2LTFoMXYxSDN6IE0xMyw3djZoLTFWOEg1VjcKCQlIMTN6IE0xMywyVjFoLTF2NWgzVjJIMTN6IE0xNCw1aC0xVjNoMVY1eiBNMTEsMnY0SDhWNGgxdjFoMVY0SDlWM0g4VjJIMTF6Ii8+CjwvZz4KPGcgaWQ9ImNvbG9yX3g1Rl9hY3Rpb24iPgoJPHBhdGggZmlsbD0iIzc1QkVGRiIgZD0iTTEuOTc5LDMuNUwyLDZMMSw1djEuNUwyLjUsOEw0LDYuNVY1TDMsNkwyLjk3OSwzLjVjMC0wLjI3NSwwLjIyNS0wLjUsMC41LTAuNUg3VjJIMy40NzkKCQlDMi42NTEsMiwxLjk3OSwyLjY3MywxLjk3OSwzLjV6Ii8+CjwvZz4KPC9zdmc+Cg==");\n}\n\n.monaco-editor.hc-black .find-widget .expand,\n.monaco-editor.vs-dark .find-widget .expand {\n\tbackground-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+PHBhdGggZmlsbD0iI2U4ZThlOCIgZD0iTTExIDEwLjA3aC01LjY1Nmw1LjY1Ni01LjY1NnY1LjY1NnoiLz48L3N2Zz4=");\n}\n\n.monaco-editor.hc-black .find-widget .collapse,\n.monaco-editor.vs-dark .find-widget .collapse {\n\tbackground-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+PHBhdGggZmlsbD0iI2U4ZThlOCIgZD0iTTYgNHY4bDQtNC00LTR6bTEgMi40MTRsMS41ODYgMS41ODYtMS41ODYgMS41ODZ2LTMuMTcyeiIvPjwvc3ZnPg==");\n}\n\n.monaco-editor.hc-black .find-widget .button:not(.disabled):hover,\n.monaco-editor.vs-dark .find-widget .button:not(.disabled):hover {\n\tbackground-color: rgba(255, 255, 255, 0.1);\n}\n\n.monaco-editor.hc-black .find-widget .button:before {\n\tposition: relative;\n\ttop: 1px;\n\tleft: 2px;\n}\n\n.monaco-editor.hc-black .find-widget .monaco-checkbox .checkbox:checked + .label {\n\tbackground-color: rgba(255, 255, 255, 0.1);\n}\n',""])},9333:(e,t,n)=>{(e.exports=n(8826)(!1)).push([e.id,'/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .margin-view-overlays .folding {\n\tmargin-left: 5px;\n\tcursor: pointer;\n\tbackground-repeat: no-repeat;\n\tbackground-origin: border-box;\n\tbackground-position: 3px center;\n\tbackground-size: 15px;\n\topacity: 0;\n\ttransition: opacity 0.5s;\n}\n\n.monaco-editor .margin-view-overlays .folding {\n\tbackground-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgMTUgMTUiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDE1IDE1OyI+CjxwYXRoIHN0eWxlPSJmaWxsOiNCNkI2QjYiIGQ9Ik0xMSw0djdINFY0SDExIE0xMiwzSDN2OWg5VjNMMTIsM3oiLz4KPGxpbmUgc3R5bGU9ImZpbGw6bm9uZTtzdHJva2U6IzZCNkI2QjtzdHJva2UtbWl0ZXJsaW1pdDoxMCIgeDE9IjEwIiB5MT0iNy41IiB4Mj0iNSIgeTI9IjcuNSIvPgo8L3N2Zz4=");\n}\n\n.monaco-editor.hc-black .margin-view-overlays .folding,\n.monaco-editor.vs-dark .margin-view-overlays .folding {\n\tbackground-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgMTUgMTUiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDE1IDE1OyI+CjxwYXRoIHN0eWxlPSJmaWxsOiM1QTVBNUEiIGQ9Ik0xMSw0djdINFY0SDExIE0xMiwzSDN2OWg5VjNMMTIsM3oiLz4KPGxpbmUgc3R5bGU9ImZpbGw6bm9uZTtzdHJva2U6I0M1QzVDNTtzdHJva2UtbWl0ZXJsaW1pdDoxMCIgeDE9IjEwIiB5MT0iNy41IiB4Mj0iNSIgeTI9IjcuNSIvPgo8L3N2Zz4=");\n}\n\n.monaco-editor .margin-view-overlays:hover .folding,\n.monaco-editor .margin-view-overlays .folding.alwaysShowFoldIcons {\n\topacity: 1;\n}\n\n.monaco-editor .margin-view-overlays .folding.collapsed {\n\tbackground-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgMTUgMTUiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDE1IDE1OyI+CjxyZWN0IHg9IjMiIHk9IjMiIHN0eWxlPSJmaWxsOiNFOEU4RTgiIHdpZHRoPSI5IiBoZWlnaHQ9IjkiLz4KPHBhdGggc3R5bGU9ImZpbGw6I0I2QjZCNiIgZD0iTTExLDR2N0g0VjRIMTEgTTEyLDNIM3Y5aDlWM0wxMiwzeiIvPgo8bGluZSBzdHlsZT0iZmlsbDpub25lO3N0cm9rZTojNkI2QjZCO3N0cm9rZS1taXRlcmxpbWl0OjEwIiB4MT0iMTAiIHkxPSI3LjUiIHgyPSI1IiB5Mj0iNy41Ii8+CjxsaW5lIHN0eWxlPSJmaWxsOm5vbmU7c3Ryb2tlOiM2QjZCNkI7c3Ryb2tlLW1pdGVybGltaXQ6MTAiIHgxPSI3LjUiIHkxPSI1IiB4Mj0iNy41IiB5Mj0iMTAiLz4KPC9zdmc+");\n\topacity: 1;\n}\n\n.monaco-editor.hc-black .margin-view-overlays .folding.collapsed,\n.monaco-editor.vs-dark .margin-view-overlays .folding.collapsed {\n\tbackground-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgMTUgMTUiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDE1IDE1OyI+CjxyZWN0IHg9IjMiIHk9IjMiIHN0eWxlPSJvcGFjaXR5OjAuMTtmaWxsOiNGRkZGRkYiIHdpZHRoPSI5IiBoZWlnaHQ9IjkiLz4KPHBhdGggc3R5bGU9ImZpbGw6IzVBNUE1QSIgZD0iTTExLDR2N0g0VjRIMTEgTTEyLDNIM3Y5aDlWM0wxMiwzeiIvPgo8bGluZSBzdHlsZT0iZmlsbDpub25lO3N0cm9rZTojQzVDNUM1O3N0cm9rZS1taXRlcmxpbWl0OjEwIiB4MT0iMTAiIHkxPSI3LjUiIHgyPSI1IiB5Mj0iNy41Ii8+CjxsaW5lIHN0eWxlPSJmaWxsOm5vbmU7c3Ryb2tlOiNDNUM1QzU7c3Ryb2tlLW1pdGVybGltaXQ6MTAiIHgxPSI3LjUiIHkxPSI1IiB4Mj0iNy41IiB5Mj0iMTAiLz4KPC9zdmc+");\n}\n\n.monaco-editor .inline-folded:after {\n\tcolor: grey;\n\tmargin: 0.1em 0.2em 0 0.2em;\n\tcontent: "\\22EF";\n\tdisplay: inline;\n\tline-height: 1em;\n\tcursor: pointer;\n}\n\n',""])},7490:(e,t,n)=>{(e.exports=n(8826)(!1)).push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .goto-definition-link {\n\ttext-decoration: underline;\n\tcursor: pointer;\n}",""])},561:(e,t,n)=>{(e.exports=n(8826)(!1)).push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n/* marker zone */\n\n.monaco-editor .marker-widget {\n\tpadding-left: 2px;\n\ttext-overflow: ellipsis;\n\twhite-space: nowrap;\n}\n\n.monaco-editor .marker-widget > .stale {\n\topacity: 0.6;\n\tfont-style: italic;\n}\n\n.monaco-editor .marker-widget div.block {\n\tdisplay: inline-block;\n\tvertical-align: top;\n}\n\n.monaco-editor .marker-widget .title {\n\tdisplay: inline-block;\n\tpadding-right: 5px;\n}\n\n.monaco-editor .marker-widget .descriptioncontainer {\n\tposition: relative;\n\twhite-space: pre;\n\t-webkit-user-select: text;\n\tuser-select: text;\n}\n\n.monaco-editor .marker-widget .descriptioncontainer .filename {\n\tcursor: pointer;\n\topacity: 0.6;\n}\n",""])},4053:(e,t,n)=>{(e.exports=n(8826)(!1)).push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor-hover {\n\tcursor: default;\n\tposition: absolute;\n\toverflow: hidden;\n\tz-index: 50;\n\t-webkit-user-select: text;\n\t-ms-user-select: text;\n\t-khtml-user-select: text;\n\t-moz-user-select: text;\n\t-o-user-select: text;\n\tuser-select: text;\n\tbox-sizing: initial;\n\tanimation: fadein 100ms linear;\n\tline-height: 1.5em;\n}\n\n.monaco-editor-hover.hidden {\n\tdisplay: none;\n}\n\n.monaco-editor-hover .monaco-editor-hover-content {\n\tmax-width: 500px;\n}\n\n.monaco-editor-hover .hover-row {\n\tpadding: 4px 5px;\n}\n\n.monaco-editor-hover p,\n.monaco-editor-hover ul {\n\tmargin: 8px 0;\n}\n\n.monaco-editor-hover p:first-child,\n.monaco-editor-hover ul:first-child {\n\tmargin-top: 0;\n}\n\n.monaco-editor-hover p:last-child,\n.monaco-editor-hover ul:last-child {\n\tmargin-bottom: 0;\n}\n\n.monaco-editor-hover ul {\n\tpadding-left: 20px;\n}\n\n.monaco-editor-hover li > p {\n\tmargin-bottom: 0;\n}\n\n.monaco-editor-hover li > ul {\n\tmargin-top: 0;\n}\n\n.monaco-editor-hover code {\n\tborder-radius: 3px;\n\tpadding: 0 0.4em;\n}\n\n.monaco-editor-hover .monaco-tokenized-source {\n\twhite-space: pre-wrap;\n\tword-break: break-all;\n}\n",""])},7913:(e,t,n)=>{(e.exports=n(8826)(!1)).push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n.monaco-editor .detected-link,\n.monaco-editor .detected-link-active {\n\ttext-decoration: underline;\n\ttext-underline-position: under;\n}\n\n.monaco-editor .detected-link-active {\n\tcursor: pointer;\n}\n",""])},7181:(e,t,n)=>{(e.exports=n(8826)(!1)).push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .monaco-editor-overlaymessage {\n\tpadding-bottom: 8px;\n}\n\n@keyframes fadeIn {\n\tfrom { opacity: 0; }\n\tto { opacity: 1; }\n}\n.monaco-editor .monaco-editor-overlaymessage.fadeIn {\n\tanimation: fadeIn 150ms ease-out;\n}\n\n@keyframes fadeOut {\n\tfrom { opacity: 1; }\n\tto { opacity: 0; }\n}\n.monaco-editor .monaco-editor-overlaymessage.fadeOut {\n\tanimation: fadeOut 100ms ease-out;\n}\n\n.monaco-editor .monaco-editor-overlaymessage .message {\n\tpadding: 1px 4px;\n}\n\n.monaco-editor .monaco-editor-overlaymessage .anchor {\n\twidth: 0 !important;\n\theight: 0 !important;\n\tborder-color: transparent;\n\tborder-style: solid;\n\tz-index: 1000;\n\tborder-width: 8px;\n\tposition: absolute;\n}\n",""])},4737:(e,t,n)=>{(e.exports=n(8826)(!1)).push([e.id,'/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .parameter-hints-widget {\n\tz-index: 10;\n\tdisplay: flex;\n\tflex-direction: column;\n\tline-height: 1.5em;\n}\n\n.monaco-editor .parameter-hints-widget > .wrapper {\n\tmax-width: 440px;\n\tdisplay: flex;\n\tflex-direction: column;\n}\n\n.monaco-editor .parameter-hints-widget.multiple {\n\tmin-height: 3.3em;\n\tpadding: 0 0 0 1.9em;\n}\n\n.monaco-editor .parameter-hints-widget.visible {\n\t-webkit-transition: left .05s ease-in-out;\n\t-moz-transition: left .05s ease-in-out;\n\t-o-transition: left .05s ease-in-out;\n\ttransition: left .05s ease-in-out;\n}\n\n.monaco-editor .parameter-hints-widget p,\n.monaco-editor .parameter-hints-widget ul {\n\tmargin: 8px 0;\n}\n\n.monaco-editor .parameter-hints-widget .monaco-scrollable-element,\n.monaco-editor .parameter-hints-widget .body {\n\tdisplay: flex;\n\tflex-direction: column;\n}\n\n.monaco-editor .parameter-hints-widget .signature {\n\tpadding: 4px 5px;\n}\n\n.monaco-editor .parameter-hints-widget .docs {\n\tpadding: 0 10px 0 5px;\n\twhite-space: pre-wrap;\n}\n\n.monaco-editor .parameter-hints-widget .docs .markdown-docs {\n\twhite-space: initial;\n}\n\n.monaco-editor .parameter-hints-widget .docs .code {\n\twhite-space: pre-wrap;\n}\n\n.monaco-editor .parameter-hints-widget .docs code {\n\tborder-radius: 3px;\n\tpadding: 0 0.4em;\n}\n\n.monaco-editor .parameter-hints-widget .buttons {\n\tposition: absolute;\n\tdisplay: none;\n\tbottom: 0;\n\tleft: 0;\n}\n\n.monaco-editor .parameter-hints-widget.multiple .buttons {\n\tdisplay: block;\n}\n\n.monaco-editor .parameter-hints-widget.multiple .button {\n\tposition: absolute;\n\tleft: 2px;\n\twidth: 16px;\n\theight: 16px;\n\tbackground-repeat: no-repeat;\n\tcursor: pointer;\n}\n\n.monaco-editor .parameter-hints-widget .button.previous {\n\tbottom: 24px;\n\tbackground-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiI+PHBhdGggZmlsbD0iIzQyNDI0MiIgZD0iTTEwLjggOS41bC45LS45TDguMSA1IDQuMiA4LjZsLjkuOSAzLTIuNyAyLjcgMi43eiIvPjwvc3ZnPg==");\n}\n\n.monaco-editor .parameter-hints-widget .button.next {\n\tbottom: 0;\n\tbackground-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiI+PHBhdGggZmlsbD0iIzQyNDI0MiIgZD0iTTUuMSA1bC0uOS45IDMuNiAzLjYgMy45LTMuNi0xLS45LTMgMi43TDUuMSA1eiIvPjwvc3ZnPg==");\n}\n\n.monaco-editor .parameter-hints-widget .overloads {\n\tposition: absolute;\n\tdisplay: none;\n\ttext-align: center;\n\tbottom: 14px;\n\tleft: 0;\n\twidth: 22px;\n\theight: 12px;\n\tline-height: 12px;\n\topacity: 0.5;\n}\n\n.monaco-editor .parameter-hints-widget.multiple .overloads {\n\tdisplay: block;\n}\n\n.monaco-editor .parameter-hints-widget .signature .parameter {\n\tdisplay: inline-block;\n}\n\n.monaco-editor .parameter-hints-widget .signature .parameter.active {\n\tfont-weight: bold;\n\ttext-decoration: underline;\n}\n\n.monaco-editor .parameter-hints-widget .documentation-parameter > .parameter {\n\tfont-weight: bold;\n\tmargin-right: 0.5em;\n}\n\n/*** VS Dark & High Contrast*/\n\n.monaco-editor.hc-black .parameter-hints-widget .button.previous,\n.monaco-editor.vs-dark .parameter-hints-widget .button.previous {\n\tbackground-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiI+PHBhdGggZmlsbD0iI0U4RThFOCIgZD0iTTEwLjggOS41bC45LS45TDguMSA1IDQuMiA4LjZsLjkuOSAzLTIuNyAyLjcgMi43eiIvPjwvc3ZnPg==");\n}\n\n.monaco-editor.hc-black .parameter-hints-widget .button.next,\n.monaco-editor.vs-dark .parameter-hints-widget .button.next {\n\tbackground-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiI+PHBhdGggZmlsbD0iI0U4RThFOCIgZD0iTTUuMSA1bC0uOS45IDMuNiAzLjYgMy45LTMuNi0xLS45LTMgMi43TDUuMSA1eiIvPjwvc3ZnPg==");\n}',""])},1445:(e,t,n)=>{(e.exports=n(8826)(!1)).push([e.id,'/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .peekview-widget .head {\n\t-webkit-box-sizing:\tborder-box;\n\t-o-box-sizing: border-box;\n\t-moz-box-sizing: border-box;\n\t-ms-box-sizing: border-box;\n\tbox-sizing:\tborder-box;\n\tdisplay: flex;\n}\n\n.monaco-editor .peekview-widget .head .peekview-title {\n\tdisplay: inline-block;\n\tfont-size: 13px;\n\tmargin-left: 20px;\n\tcursor: pointer;\n}\n\n.monaco-editor .peekview-widget .head .peekview-title .dirname:not(:empty) {\n\tfont-size: 0.9em;\n\tmargin-left: 0.5em;\n}\n\n.monaco-editor .peekview-widget .head .peekview-actions {\n\tflex: 1;\n\ttext-align: right;\n\tpadding-right: 2px;\n}\n\n.monaco-editor .peekview-widget .head .peekview-actions > .monaco-action-bar {\n\tdisplay: inline-block;\n}\n\n.monaco-editor .peekview-widget .head .peekview-actions > .monaco-action-bar,\n.monaco-editor .peekview-widget .head .peekview-actions > .monaco-action-bar > .actions-container {\n\theight: 100%;\n}\n\n.monaco-editor .peekview-widget .head .peekview-actions > .monaco-action-bar .action-item {\n\tmargin-left: 4px;\n}\n\n.monaco-editor .peekview-widget .head .peekview-actions > .monaco-action-bar .action-label {\n\twidth: 16px;\n\theight: 100%;\n\tmargin: 0;\n\tline-height: inherit;\n\tbackground-repeat: no-repeat;\n\tbackground-position: center center;\n}\n\n.monaco-editor .peekview-widget .head .peekview-actions > .monaco-action-bar .action-label.octicon {\n\tmargin: 0;\n}\n\n.monaco-editor .peekview-widget .head .peekview-actions .action-label.icon.close-peekview-action {\n\tbackground: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgdmlld0JveD0iMyAzIDE2IDE2IiBlbmFibGUtYmFja2dyb3VuZD0ibmV3IDMgMyAxNiAxNiI+PHBvbHlnb24gZmlsbD0iIzQyNDI0MiIgcG9pbnRzPSIxMi41OTcsMTEuMDQyIDE1LjQsMTMuODQ1IDEzLjg0NCwxNS40IDExLjA0MiwxMi41OTggOC4yMzksMTUuNCA2LjY4MywxMy44NDUgOS40ODUsMTEuMDQyIDYuNjgzLDguMjM5IDguMjM4LDYuNjgzIDExLjA0Miw5LjQ4NiAxMy44NDUsNi42ODMgMTUuNCw4LjIzOSIvPjwvc3ZnPg==") center center no-repeat;\n}\n\n.monaco-editor .peekview-widget > .body {\n\tborder-top: 1px solid;\n\tposition: relative;\n}\n\n/* Dark Theme */\n/* High Contrast Theme */\n\n.monaco-editor.hc-black .peekview-widget .head .peekview-actions .action-label.icon.close-peekview-action,\n.monaco-editor.vs-dark .peekview-widget .head .peekview-actions .action-label.icon.close-peekview-action {\n\tbackground: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgdmlld0JveD0iMyAzIDE2IDE2IiBlbmFibGUtYmFja2dyb3VuZD0ibmV3IDMgMyAxNiAxNiI+PHBvbHlnb24gZmlsbD0iI2U4ZThlOCIgcG9pbnRzPSIxMi41OTcsMTEuMDQyIDE1LjQsMTMuODQ1IDEzLjg0NCwxNS40IDExLjA0MiwxMi41OTggOC4yMzksMTUuNCA2LjY4MywxMy44NDUgOS40ODUsMTEuMDQyIDYuNjgzLDguMjM5IDguMjM4LDYuNjgzIDExLjA0Miw5LjQ4NiAxMy44NDUsNi42ODMgMTUuNCw4LjIzOSIvPjwvc3ZnPg==") center center no-repeat;\n}\n\n',""])},293:(e,t,n)=>{(e.exports=n(8826)(!1)).push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n/* -- zone widget */\n.monaco-editor .zone-widget .zone-widget-container.reference-zone-widget {\n\tborder-top-width: 1px;\n\tborder-bottom-width: 1px;\n}\n\n.monaco-editor .reference-zone-widget .inline {\n\tdisplay: inline-block;\n\tvertical-align: top;\n}\n\n.monaco-editor .reference-zone-widget .messages {\n\theight: 100%;\n\twidth: 100%;\n\ttext-align: center;\n\tpadding: 3em 0;\n}\n\n.monaco-editor .reference-zone-widget .ref-tree {\n\tline-height: 23px;\n}\n\n.monaco-editor .reference-zone-widget .ref-tree .reference {\n\ttext-overflow: ellipsis;\n\toverflow: hidden;\n}\n\n.monaco-editor .reference-zone-widget .ref-tree .reference-file {\n\tdisplay: inline-flex;\n\twidth: 100%;\n\theight: 100%;\n}\n\n.monaco-editor .reference-zone-widget .ref-tree .reference-file .count {\n\tmargin-right: 12px;\n\tmargin-left: auto;\n}\n\n/* High Contrast Theming */\n\n.monaco-editor.hc-black .reference-zone-widget .ref-tree .reference-file {\n\tfont-weight: bold;\n}\n",""])},3159:(e,t,n)=>{(e.exports=n(8826)(!1)).push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .rename-box {\n\tz-index: 100;\n\tcolor: inherit;\n}\n\n.monaco-editor .rename-box .rename-input {\n\tpadding: 4px;\n}\n",""])},6993:(e,t,n)=>{(e.exports=n(8826)(!1)).push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor.vs\t\t.snippet-placeholder { background-color: rgba(10, 50, 100, 0.2); min-width: 2px; }\n.monaco-editor.vs-dark\t.snippet-placeholder { background-color: rgba(124, 124, 124, 0.3); min-width: 2px; }\n.monaco-editor.hc-black\t.snippet-placeholder { background-color: rgba(124, 124, 124, 0.3); min-width: 2px; }\n\n.monaco-editor.vs\t\t.finish-snippet-placeholder { outline: rgba(10, 50, 100, 0.5) solid 1px; }\n.monaco-editor.vs-dark\t.finish-snippet-placeholder\t{ outline: #525252 solid 1px; }\n.monaco-editor.hc-black\t.finish-snippet-placeholder\t{ outline: #525252 solid 1px; }\n",""])},3376:(e,t,n)=>{(e.exports=n(8826)(!1)).push([e.id,'/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n/* Suggest widget*/\n.monaco-editor .suggest-widget {\n\tz-index: 40;\n}\n\n/** Initial widths **/\n\n.monaco-editor .suggest-widget {\n\twidth: 430px;\n}\n\n.monaco-editor .suggest-widget > .message,\n.monaco-editor .suggest-widget > .tree,\n.monaco-editor .suggest-widget > .details {\n\twidth: 100%;\n\tborder-style: solid;\n\tborder-width: 1px;\n\tbox-sizing: border-box;\n}\n\n.monaco-editor.hc-black .suggest-widget > .message,\n.monaco-editor.hc-black .suggest-widget > .tree,\n.monaco-editor.hc-black .suggest-widget > .details {\n\tborder-width: 2px;\n}\n\n/** Adjust width when docs are expanded to the side **/\n.monaco-editor .suggest-widget.docs-side {\n\twidth: 660px;\n}\n\n.monaco-editor .suggest-widget.docs-side > .tree,\n.monaco-editor .suggest-widget.docs-side > .details {\n\twidth: 50%;\n\tfloat: left;\n}\n\n.monaco-editor .suggest-widget.docs-side.list-right > .tree,\n.monaco-editor .suggest-widget.docs-side.list-right > .details {\n\tfloat: right;\n}\n\n\n/* Styles for Message element for when widget is loading or is empty */\n.monaco-editor .suggest-widget > .message {\n\tpadding-left: 22px;\n}\n\n/** Styles for the list element **/\n.monaco-editor .suggest-widget > .tree {\n\theight: 100%;\n}\n\n\n\n/** Styles for each row in the list element **/\n\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row {\n\tdisplay: flex;\n\t-mox-box-sizing: border-box;\n\tbox-sizing: border-box;\n\tpadding-right: 10px;\n\tbackground-repeat: no-repeat;\n\tbackground-position: 2px 2px;\n\twhite-space: nowrap;\n}\n\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row > .contents {\n\tflex: 1;\n\theight: 100%;\n\toverflow: hidden;\n\tpadding-left: 2px;\n}\n\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row > .contents > .main {\n\tdisplay: flex;\n\toverflow: hidden;\n\ttext-overflow: ellipsis;\n\twhite-space: pre;\n}\n\n.monaco-editor .suggest-widget:not(.frozen) .monaco-highlighted-label .highlight {\n\tfont-weight: bold;\n}\n\n/** Icon styles **/\n\n.monaco-editor .suggest-widget .details > .monaco-scrollable-element > .body > .header > .close,\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row > .contents > .main > .readMore {\n\topacity: 0.6;\n\tbackground-position: center center;\n\tbackground-repeat: no-repeat;\n\tbackground-size: 70%;\n\tcursor: pointer;\n}\n\n.monaco-editor .suggest-widget .details > .monaco-scrollable-element > .body > .header > .close {\n\tbackground-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgdmlld0JveD0iMyAzIDE2IDE2IiBlbmFibGUtYmFja2dyb3VuZD0ibmV3IDMgMyAxNiAxNiI+PHBvbHlnb24gZmlsbD0iIzQyNDI0MiIgcG9pbnRzPSIxMi41OTcsMTEuMDQyIDE1LjQsMTMuODQ1IDEzLjg0NCwxNS40IDExLjA0MiwxMi41OTggOC4yMzksMTUuNCA2LjY4MywxMy44NDUgOS40ODUsMTEuMDQyIDYuNjgzLDguMjM5IDguMjM4LDYuNjgzIDExLjA0Miw5LjQ4NiAxMy44NDUsNi42ODMgMTUuNCw4LjIzOSIvPjwvc3ZnPg==");\n\tfloat: right;\n\tmargin-right: 5px;\n}\n\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row > .contents > .main > .readMore {\n\tbackground-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+PHBhdGggZD0iTTggMWMtMy44NjUgMC03IDMuMTM1LTcgN3MzLjEzNSA3IDcgNyA3LTMuMTM1IDctNy0zLjEzNS03LTctN3ptMSAxMmgtMnYtN2gydjd6bTAtOGgtMnYtMmgydjJ6IiBmaWxsPSIjMUJBMUUyIi8+PHBhdGggZD0iTTcgNmgydjdoLTJ2LTd6bTAtMWgydi0yaC0ydjJ6IiBmaWxsPSIjZmZmIi8+PC9zdmc+");\n}\n\n.monaco-editor .suggest-widget .details > .monaco-scrollable-element > .body > .header > .close:hover,\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row > .contents > .main > .readMore:hover {\n\topacity: 1;\n}\n\n/** Type Info and icon next to the label in the focused completion item **/\n\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row > .contents > .main > .type-label {\n\tmargin-left: 0.8em;\n\tflex: 1;\n\ttext-align: right;\n\toverflow: hidden;\n\ttext-overflow: ellipsis;\n\topacity: 0.7;\n}\n\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row > .contents > .main > .type-label > .monaco-tokenized-source {\n\tdisplay: inline;\n}\n\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row > .contents > .main > .readMore,\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row > .contents > .main > .type-label,\n.monaco-editor .suggest-widget.docs-side .monaco-list .monaco-list-row.focused > .contents > .main > .readMore,\n.monaco-editor .suggest-widget.docs-side .monaco-list .monaco-list-row.focused > .contents > .main > .type-label,\n.monaco-editor .suggest-widget.docs-below .monaco-list .monaco-list-row.focused > .contents > .main > .readMore {\n\tdisplay: none;\n}\n\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row.focused > .contents > .main > .readMore,\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row.focused > .contents > .main > .type-label {\n\tdisplay: inline;\n}\n\n/** Styles for each row in the list **/\n\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row .icon {\n\tdisplay: block;\n\theight: 16px;\n\twidth: 16px;\n\tbackground-repeat: no-repeat;\n\tbackground-size: 80%;\n\tbackground-position: center;\n}\n\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row .icon { background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiI+PHN0eWxlPi5pY29uLWNhbnZhcy10cmFuc3BhcmVudHtvcGFjaXR5OjA7ZmlsbDojZjZmNmY2fS5pY29uLXZzLW91dHtmaWxsOiNmNmY2ZjZ9Lmljb24tdnMtYmd7ZmlsbDojNDI0MjQyfTwvc3R5bGU+PHBhdGggY2xhc3M9Imljb24tY2FudmFzLXRyYW5zcGFyZW50IiBkPSJNMTYgMTZIMFYwaDE2djE2eiIgaWQ9ImNhbnZhcyIvPjxwYXRoIGNsYXNzPSJpY29uLXZzLW91dCIgZD0iTTE2IDEwYzAgMi4yMDUtMS43OTQgNC00IDQtMS44NTggMC0zLjQxMS0xLjI3OS0zLjg1OC0zaC0uOTc4bDIuMzE4IDRIMHYtMS43MDNsMi0zLjQwOFYwaDExdjYuMTQyYzEuNzIxLjQ0NyAzIDIgMyAzLjg1OHoiIGlkPSJvdXRsaW5lIi8+PHBhdGggY2xhc3M9Imljb24tdnMtYmciIGQ9Ik0xMiAxdjQuNzVBNC4yNTUgNC4yNTUgMCAwIDAgNy43NSAxMGgtLjczMkw0LjI3NSA1LjI2OSAzIDcuNDQyVjFoOXpNNy43NDcgMTRMNC4yNjkgOCAuNzQ4IDE0aDYuOTk5ek0xNSAxMGEzIDMgMCAxIDEtNiAwIDMgMyAwIDAgMSA2IDB6IiBpZD0iaWNvbkJnIi8+PC9zdmc+"); }\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row .icon.method,\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row .icon.function,\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row .icon.constructor { background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiI+PHN0eWxlPi5pY29uLWNhbnZhcy10cmFuc3BhcmVudHtvcGFjaXR5OjA7ZmlsbDojZjZmNmY2fS5pY29uLXZzLW91dHtmaWxsOiNmNmY2ZjZ9Lmljb24tdnMtZmd7ZmlsbDojZjBlZmYxfS5pY29uLXZzLWFjdGlvbi1wdXJwbGV7ZmlsbDojNjUyZDkwfTwvc3R5bGU+PHBhdGggY2xhc3M9Imljb24tY2FudmFzLXRyYW5zcGFyZW50IiBkPSJNMTYgMTZIMFYwaDE2djE2eiIgaWQ9ImNhbnZhcyIvPjxwYXRoIGNsYXNzPSJpY29uLXZzLW91dCIgZD0iTTE1IDMuMzQ5djguNDAzTDguOTc1IDE2SDguMDdMMSAxMS41ODJWMy4zMjdMNy41OTUgMGgxLjExOEwxNSAzLjM0OXoiIGlkPSJvdXRsaW5lIi8+PHBhdGggY2xhc3M9Imljb24tdnMtZmciIGQ9Ik0xMi43MTUgNC4zOThMOC40ODcgNy4wMiAzLjU2NSA0LjI3Mmw0LjU3OC0yLjMwOSA0LjU3MiAyLjQzNXpNMyA1LjEwMmw1IDIuNzkydjUuNzA1bC01LTMuMTI1VjUuMTAyem02IDguNDM0VjcuODc4bDQtMi40OHY1LjMxN2wtNCAyLjgyMXoiIGlkPSJpY29uRmciLz48cGF0aCBjbGFzcz0iaWNvbi12cy1hY3Rpb24tcHVycGxlIiBkPSJNOC4xNTYuODM3TDIgMy45NDJ2Ny4wODVMOC41MTcgMTUuMSAxNCAxMS4yMzNWMy45NUw4LjE1Ni44Mzd6bTQuNTU5IDMuNTYxTDguNDg3IDcuMDIgMy41NjUgNC4yNzJsNC41NzgtMi4zMDkgNC41NzIgMi40MzV6TTMgNS4xMDJsNSAyLjc5MnY1LjcwNWwtNS0zLjEyNVY1LjEwMnptNiA4LjQzNFY3Ljg3OGw0LTIuNDh2NS4zMTdsLTQgMi44MjF6IiBpZD0iaWNvbkJnIi8+PC9zdmc+"); }\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row .icon.field { background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiI+PHN0eWxlPi5pY29uLWNhbnZhcy10cmFuc3BhcmVudHtvcGFjaXR5OjA7ZmlsbDojZjZmNmY2fS5pY29uLXZzLW91dHt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MTRMOS40MTQgNkgxNHYxLjQxNEw1LjQxNCAxNkgzdi0xLjIzNEw1LjM3MSAxMEgyVjguNzY0TDYuMzgyIDBIMTR2MS40MTR6IiBpZD0ib3V0bGluZSIgc3R5bGU9ImRpc3BsYXk6IG5vbmU7Ii8+PHBhdGggY2xhc3M9Imljb24tdnMtYWN0aW9uLW9yYW5nZSIgZD0iTTcgN2g2bC04IDhINGwyLjk4NS02SDNsNC04aDZMNyA3eiIgaWQ9Imljb25CZyIvPjwvc3ZnPg=="); }\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row .icon.operator { background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiI+PHN0eWxlPi5pY29uLWNhbnZhcy10cmFuc3BhcmVudHtvcGFjaXR5OjA7ZmlsbDojZjZmNmY2fS5pY29uLXZzLW91dHtmaWxsOiNmNmY2ZjZ9Lmljb24tdnMtZmd7ZmlsbDojZjBlZmYxfS5pY29uLXZzLWFjdGlvbi1ibHVle2ZpbGw6IzAwNTM5Y308L3N0eWxlPjxwYXRoIGNsYXNzPSJpY29uLWNhbnZhcy10cmFuc3BhcmVudCIgZD0iTTE2IDE2SDBWMGgxNnYxNnoiIGlkPSJjYW52YXMiLz48cGF0aCBjbGFzcz0iaWNvbi12cy1vdXQiIGQ9Ik0xNiAxNkgwVjBoMTZ2MTZ6IiBpZD0ib3V0bGluZSIgc3R5bGU9ImRpc3BsYXk6IG5vbmU7Ii8+PHBhdGggY2xhc3M9Imljb24tdnMtYWN0aW9uLWJsdWUiIGQ9Ik0xIDF2MTRoMTRWMUgxem02IDEySDN2LTFoNHYxem0wLTNIM1Y5aDR2MXptMC01SDV2Mkg0VjVIMlY0aDJWMmgxdjJoMnYxem0zLjI4MSA4SDguNzE5bDMtNGgxLjU2M2wtMy4wMDEgNHpNMTQgNUg5VjRoNXYxeiIgaWQ9Imljb25CZyIvPjxwYXRoIGNsYXNzPSJpY29uLXZzLWZnIiBkPSJNNyA1SDV2Mkg0VjVIMlY0aDJWMmgxdjJoMnYxem03LTFIOXYxaDVWNHpNNyA5SDN2MWg0Vjl6bTAgM0gzdjFoNHYtMXptMy4yODEgMWwzLTRoLTEuNTYzbC0zIDRoMS41NjN6IiBpZD0iaWNvbkZnIiBzdHlsZT0iZGlzcGxheTogbm9uZTsiLz48L3N2Zz4="); }\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row .icon.variable { background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiI+PHN0eWxlPi5pY29uLWNhbnZhcy10cmFuc3BhcmVudHtvcGFjaXR5OjA7ZmlsbDojZjZmNmY2fS5pY29uLXZzLW91dHtmaWxsOiNmNmY2ZjZ9Lmljb24tdnMtYmd7ZmlsbDojNDI0MjQyfS5pY29uLXZzLWZne2ZpbGw6I2YwZWZmMX0uaWNvbi12cy1hY3Rpb24tYmx1ZXtmaWxsOiMwMDUzOWN9PC9zdHlsZT48cGF0aCBjbGFzcz0iaWNvbi1jYW52YXMtdHJhbnNwYXJlbnQiIGQ9Ik0xNiAxNkgwVjBoMTZ2MTZ6IiBpZD0iY2FudmFzIi8+PHBhdGggY2xhc3M9Imljb24tdnMtb3V0IiBkPSJNMTEgM3YxLjAxNUw4LjczMyAyLjg4MiA1IDQuNzQ5VjNIMHYxMGg1di0xLjg1OWwyLjE1NiAxLjA3N0wxMSAxMC4yOTVWMTNoNVYzaC01eiIgaWQ9Im91dGxpbmUiIHN0eWxlPSJkaXNwbGF5OiBub25lOyIvPjxwYXRoIGNsYXNzPSJpY29uLXZzLWJnIiBkPSJNMiA1djZoMnYxSDFWNGgzdjFIMnptMTAgNnYxaDNWNGgtM3YxaDJ2NmgtMnoiIGlkPSJpY29uQmciLz48cGF0aCBjbGFzcz0iaWNvbi12cy1mZyIgZD0iTTcuMTU2IDcuMTU2bC0xLjU3OC0uNzg5IDMuMTU2LTEuNTc4IDEuNTc4Ljc4OS0zLjE1NiAxLjU3OHoiIGlkPSJpY29uRmciIHN0eWxlPSJkaXNwbGF5OiBub25lOyIvPjxwYXRoIGNsYXNzPSJpY29uLXZzLWFjdGlvbi1ibHVlIiBkPSJNOC43MzMgNEw0IDYuMzY3djMuMTU2TDcuMTU2IDExLjFsNC43MzMtMi4zNjdWNS41NzhMOC43MzMgNHpNNy4xNTYgNy4xNTZsLTEuNTc4LS43ODkgMy4xNTYtMS41NzggMS41NzguNzg5LTMuMTU2IDEuNTc4eiIgaWQ9ImNvbG9ySW1wb3J0YW5jZSIvPjwvc3ZnPg=="); }\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row .icon.class { background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiI+PHN0eWxlPi5pY29uLWNhbnZhcy10cmFuc3BhcmVudHtvcGFjaXR5OjA7ZmlsbDojZjZmNmY2fS5pY29uLXZzLW91dHtmaWxsOiNmNmY2ZjZ9Lmljb24tdnMtYWN0aW9uLW9yYW5nZXtmaWxsOiNjMjdkMWF9PC9zdHlsZT48cGF0aCBjbGFzcz0iaWNvbi1jYW52YXMtdHJhbnNwYXJlbnQiIGQ9Ik0xNiAxNkgwVjBoMTZ2MTZ6IiBpZD0iY2FudmFzIi8+PHBhdGggY2xhc3M9Imljb24tdnMtb3V0IiBkPSJNMTYgNi41ODZsLTMtM0wxMS41ODYgNUg5LjQxNGwxLTEtNC00aC0uODI4TDAgNS41ODZ2LjgyOGw0IDRMNi40MTQgOEg3djVoMS41ODZsMyAzaC44MjhMMTYgMTIuNDE0di0uODI4TDEzLjkxNCA5LjUgMTYgNy40MTR2LS44Mjh6IiBpZD0ib3V0bGluZSIvPjxwYXRoIGNsYXNzPSJpY29uLXZzLWFjdGlvbi1vcmFuZ2UiIGQ9Ik0xMyAxMGwyIDItMyAzLTItMiAxLTFIOFY3SDZMNCA5IDEgNmw1LTUgMyAzLTIgMmg1bDEtMSAyIDItMyAzLTItMiAxLTFIOXY0bDIuOTk5LjAwMkwxMyAxMHoiIGlkPSJpY29uQmciLz48L3N2Zz4="); }\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row .icon.interface { background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiI+PHN0eWxlPi5pY29uLWNhbnZhcy10cmFuc3BhcmVudHtvcGFjaXR5OjA7ZmlsbDojZjZmNmY2fS5pY29uLXZzLW91dHtmaWxsOiNmNmY2ZjZ9Lmljb24tdnMtZmd7ZmlsbDojZjBlZmYxfS5pY29uLXZzLWFjdGlvbi1ibHVle2ZpbGw6IzAwNTM5Y308L3N0eWxlPjxwYXRoIGNsYXNzPSJpY29uLWNhbnZhcy10cmFuc3BhcmVudCIgZD0iTTE2IDE2SDBWMGgxNnYxNnoiIGlkPSJjYW52YXMiLz48cGF0aCBjbGFzcz0iaWNvbi12cy1vdXQiIGQ9Ik0xMS41IDEyYy0xLjkxNSAwLTMuNjAyLTEuMjQxLTQuMjI4LTNoLTEuNDFhMy4xMSAzLjExIDAgMCAxLTIuNzM3IDEuNjI1QzEuNDAyIDEwLjYyNSAwIDkuMjIzIDAgNy41czEuNDAyLTMuMTI1IDMuMTI1LTMuMTI1YzEuMTY1IDAgMi4yMDEuNjM5IDIuNzM3IDEuNjI1aDEuNDFjLjYyNi0xLjc1OSAyLjMxMy0zIDQuMjI4LTNDMTMuOTgxIDMgMTYgNS4wMTkgMTYgNy41UzEzLjk4MSAxMiAxMS41IDEyeiIgaWQ9Im91dGxpbmUiLz48cGF0aCBjbGFzcz0iaWNvbi12cy1mZyIgZD0iTTExLjUgOUExLjUwMSAxLjUwMSAwIDEgMSAxMyA3LjVjMCAuODI2LS42NzMgMS41LTEuNSAxLjV6IiBpZD0iaWNvbkZnIi8+PHBhdGggY2xhc3M9Imljb24tdnMtYWN0aW9uLWJsdWUiIGQ9Ik0xMS41IDRhMy40OSAzLjQ5IDAgMCAwLTMuNDUgM0g1LjE4NUEyLjEyMiAyLjEyMiAwIDAgMCAxIDcuNWEyLjEyMyAyLjEyMyAwIDEgMCA0LjE4NS41SDguMDVhMy40OSAzLjQ5IDAgMCAwIDMuNDUgMyAzLjUgMy41IDAgMSAwIDAtN3ptMCA1Yy0uODI3IDAtMS41LS42NzMtMS41LTEuNVMxMC42NzMgNiAxMS41IDZzMS41LjY3MyAxLjUgMS41UzEyLjMyNyA5IDExLjUgOXoiIGlkPSJpY29uQmciLz48L3N2Zz4="); }\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row .icon.struct { background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiI+PHN0eWxlPi5pY29uLWNhbnZhcy10cmFuc3BhcmVudHtvcGFjaXR5OjA7ZmlsbDojZjZmNmY2fS5pY29uLXZzLW91dHtmaWxsOiNmNmY2ZjZ9Lmljb24tdnMtYWN0aW9uLWJsdWV7ZmlsbDojMDA1MzljfTwvc3R5bGU+PHBhdGggY2xhc3M9Imljb24tY2FudmFzLXRyYW5zcGFyZW50IiBkPSJNMTYgMTZIMFYwaDE2djE2eiIgaWQ9ImNhbnZhcyIvPjxwYXRoIGNsYXNzPSJpY29uLXZzLW91dCIgZD0iTTkgMTRWOEg3djZIMVYyaDE0djEySDl6IiBpZD0ib3V0bGluZSIgc3R5bGU9ImRpc3BsYXk6IG5vbmU7Ii8+PHBhdGggY2xhc3M9Imljb24tdnMtYWN0aW9uLWJsdWUiIGQ9Ik0xMCA5aDR2NGgtNFY5em0tOCA0aDRWOUgydjR6TTIgM3Y0aDEyVjNIMnoiIGlkPSJpY29uQmciLz48L3N2Zz4="); }\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row .icon.type-parameter { background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiI+PHN0eWxlPi5pY29uLWNhbnZhcy10cmFuc3BhcmVudHtvcGFjaXR5OjA7ZmlsbDojZjZmNmY2fS5pY29uLXZzLW91dHtmaWxsOiNmNmY2ZjZ9Lmljb24tdnMtYmd7ZmlsbDojNDI0MjQyfTwvc3R5bGU+PHBhdGggY2xhc3M9Imljb24tY2FudmFzLXRyYW5zcGFyZW50IiBkPSJNMTYgMTZIMFYwaDE2djE2eiIgaWQ9ImNhbnZhcyIvPjxwYXRoIGNsYXNzPSJpY29uLXZzLW91dCIgZD0iTTEwLjcwMiAxMC41bDItMi0yLTIgLjUtLjVIMTB2NWgxdjNINXYtM2gxVjZINC43OThsLjUuNS0yIDIgMiAyTDMgMTIuNzk3bC0zLTNWNy4yMDFsMy0zVjJoMTB2Mi4yMDFsMyAzdjIuNTk2bC0zIDMtMi4yOTgtMi4yOTd6IiBpZD0ib3V0bGluZSIgc3R5bGU9ImRpc3BsYXk6IG5vbmU7Ii8+PHBhdGggY2xhc3M9Imljb24tdnMtYmciIGQ9Ik00IDNoOHYyaC0xdi0uNWMwLS4yNzctLjIyNC0uNS0uNS0uNUg5djcuNWMwIC4yNzUuMjI0LjUuNS41aC41djFINnYtMWguNWEuNS41IDAgMCAwIC41LS41VjRINS41YS41LjUgMCAwIDAtLjUuNVY1SDRWM3pNMyA1LjYxNUwuMTE2IDguNSAzIDExLjM4M2wuODg0LS44ODMtMi0yIDItMkwzIDUuNjE1em0xMCAwbC0uODg0Ljg4NSAyIDItMiAyIC44ODQuODgzTDE1Ljg4NCA4LjUgMTMgNS42MTV6IiBpZD0iaWNvbkJnIi8+PC9zdmc+"); }\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row .icon.module { background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz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gxdjJoMVY2aC0zdjNoMVY3eiIgaWQ9Imljb25GZyIvPjxwYXRoIGNsYXNzPSJpY29uLXZzLWJnIiBkPSJNMiA1djVoMTNWNUgyem00IDRINVY3SDR2MkgzVjZoM3Yzem00IDBIOVY3SDh2Mkg3VjZoM3Yzem00IDBoLTFWN2gtMXYyaC0xVjZoM3YzeiIgaWQ9Imljb25CZyIvPjwvc3ZnPg=="); }\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row .icon.constant { background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiI+PHN0eWxlPi5pY29uLWNhbnZhcy10cmFuc3BhcmVudHtvcGFjaXR5OjA7ZmlsbDojZjZmNmY2fS5pY29uLXZzLW91dHtmaWxsOiNmNmY2ZjZ9Lmljb24tdnMtYmd7ZmlsbDojNDI0MjQyfS5pY29uLXZzLWZne2ZpbGw6I2YwZWZmMX0uaWNvbi12cy1hY3Rpb24tYmx1ZXtmaWxsOiMwMDUzOWN9PC9zdHlsZT48cGF0aCBjbGFzcz0iaWNvbi1jYW52YXMtdHJhbnNwYXJlbnQiIGQ9Ik0xNiAxNkgwVjBoMTZ2MTZ6IiBpZD0iY2FudmFzIi8+PHBhdGggY2xhc3M9Imljb24tdnMtb3V0IiBkPSJNMi44NzkgMTRMMSAxMi4xMjFWMy44NzlMMi44NzkgMmgxMC4yNDJMMTUgMy44Nzl2OC4yNDJMMTMuMTIxIDE0SDIuODc5eiIgaWQ9Im91dGxpbmUiLz48cGF0aCBjbGFzcz0iaWNvbi12cy1mZyIgZD0iTTEyLjI5MyA0SDMuNzA3TDMgNC43MDd2Ni41ODZsLjcwNy43MDdoOC41ODZsLjcwNy0uNzA3VjQuNzA3TDEyLjI5MyA0ek0xMSAxMEg1VjloNnYxem0wLTNINVY2aDZ2MXoiIGlkPSJpY29uRmciLz48ZyBpZD0iaWNvbkJnIj48cGF0aCBjbGFzcz0iaWNvbi12cy1iZyIgZD0iTTEyLjcwNyAxM0gzLjI5M0wyIDExLjcwN1Y0LjI5M0wzLjI5MyAzaDkuNDE0TDE0IDQuMjkzdjcuNDE0TDEyLjcwNyAxM3ptLTktMWg4LjU4NmwuNzA3LS43MDdWNC43MDdMMTIuMjkzIDRIMy43MDdMMyA0LjcwN3Y2LjU4NmwuNzA3LjcwN3oiLz48cGF0aCBjbGFzcz0iaWNvbi12cy1hY3Rpb24tYmx1ZSIgZD0iTTExIDdINVY2aDZ2MXptMCAySDV2MWg2Vjl6Ii8+PC9nPjwvc3ZnPg=="); }\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row .icon.value,\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row .icon.enum { background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiI+PHN0eWxlPi5pY29uLWNhbnZhcy10cmFuc3BhcmVudHtvcGFjaXR5OjA7ZmlsbDojZjZmNmY2fS5pY29uLXZzLW91dHtmaWxsOiNmNmY2ZjZ9Lmljb24tdnMtZmd7ZmlsbDojZjBlZmYxfS5pY29uLXZzLWFjdGlvbi1vcmFuZ2V7ZmlsbDojYzI3ZDFhfTwvc3R5bGU+PHBhdGggY2xhc3M9Imljb24tY2FudmFzLXRyYW5zcGFyZW50IiBkPSJNMTYgMTZIMFYwaDE2djE2eiIgaWQ9ImNhbnZhcyIvPjxwYXRoIGNsYXNzPSJpY29uLXZzLW91dCIgZD0iTTE0LjQxNCAxTDE2IDIuNTg2djUuODI4TDE0LjQxNCAxMEgxMHYzLjQxNkw4LjQxNCAxNUgxLjU4NkwwIDEzLjQxNnYtNS44M0wxLjU4NiA2SDZWMi41ODZMNy41ODYgMWg2LjgyOHoiIGlkPSJvdXRsaW5lIi8+PHBhdGggY2xhc3M9Imljb24tdnMtZmciIGQ9Ik0yIDEzaDZWOEgydjV6bTEtNGg0djFIM1Y5em0wIDJoNHYxSDN2LTF6bTExLTVWM0g4djNoLjQxNEw5IDYuNTg2VjZoNHYxSDkuNDE0bC41ODYuNTg2VjhoNFY2em0tMS0xSDlWNGg0djF6IiBpZD0iaWNvbkZnIi8+PHBhdGggY2xhc3M9Imljb24tdnMtYWN0aW9uLW9yYW5nZSIgZD0iTTMgMTFoNC4wMDF2MUgzdi0xem0wLTFoNC4wMDFWOUgzdjF6bTYtMnY1bC0xIDFIMmwtMS0xVjhsMS0xaDZsMSAxek04IDhIMnY1aDZWOHptMS0ybDEgMWgzVjZIOXptMC0xaDRWNEg5djF6bTUtM0g4TDcgM3YzaDFWM2g2djVoLTR2MWg0bDEtMVYzbC0xLTF6IiBpZD0iaWNvbkJnIi8+PC9zdmc+"); }\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row .icon.enum-member { background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiI+PHN0eWxlPi5pY29uLWNhbnZhcy10cmFuc3BhcmVudHtvcGFjaXR5OjA7ZmlsbDojZjZmNmY2fS5pY29uLXZzLW91dHtmaWxsOiNmNmY2ZjZ9Lmljb24tdnMtZmd7ZmlsbDojZjBlZmYxfS5pY29uLXZzLWFjdGlvbi1ibHVle2ZpbGw6IzAwNTM5Y308L3N0eWxlPjxwYXRoIGNsYXNzPSJpY29uLWNhbnZhcy10cmFuc3BhcmVudCIgZD0iTTE2IDE2SDBWMGgxNnYxNnoiIGlkPSJjYW52YXMiLz48cGF0aCBjbGFzcz0iaWNvbi12cy1vdXQiIGQ9Ik0wIDE1VjZoNlYyLjU4Nkw3LjU4NSAxaDYuODI5TDE2IDIuNTg2djUuODI5TDE0LjQxNCAxMEgxMHY1SDB6bTMtNnoiIGlkPSJvdXRsaW5lIi8+PHBhdGggY2xhc3M9Imljb24tdnMtZmciIGQ9Ik04IDN2M2g1djFoLTN2MWg0VjNIOHptNSAySDlWNGg0djF6TTIgOHY1aDZWOEgyem01IDNIM3YtMWg0djF6IiBpZD0iaWNvbkZnIi8+PHBhdGggY2xhc3M9Imljb24tdnMtYWN0aW9uLWJsdWUiIGQ9Ik0xMCA2aDN2MWgtM1Y2ek05IDR2MWg0VjRIOXptNS0ySDhMNyAzdjNoMVYzaDZ2NWgtNHYxaDRsMS0xVjNsLTEtMXptLTcgOEgzdjFoNHYtMXptMi0zdjdIMVY3aDh6TTggOEgydjVoNlY4eiIgaWQ9Imljb25CZyIvPjwvc3ZnPg=="); }\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row .icon.keyword { background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiI+PHN0eWxlPi5pY29uLWNhbnZhcy10cmFuc3BhcmVudHtvcGFjaXR5OjA7ZmlsbDojZjZmNmY2fS5pY29uLXZzLW91dHtmaWxsOiNmNmY2ZjZ9Lmljb24tdnMtYmd7ZmlsbDojNDI0MjQyfS5pY29uLXZzLWZne2ZpbGw6I2YwZWZmMX08L3N0eWxlPjxwYXRoIGNsYXNzPSJpY29uLWNhbnZhcy10cmFuc3BhcmVudCIgZD0iTTE2IDE2SDBWMGgxNnYxNnoiIGlkPSJjYW52YXMiLz48cGF0aCBjbGFzcz0iaWNvbi12cy1vdXQiIGQ9Ik0xNiA1VjJIOVYxSDB2MTRoMTN2LTNoM1Y5aC0xVjZIOVY1aDd6bS04IDdWOWgxdjNIOHoiIGlkPSJvdXRsaW5lIi8+PHBhdGggY2xhc3M9Imljb24tdnMtZmciIGQ9Ik0yIDNoNXYxSDJWM3oiIGlkPSJpY29uRmciLz48cGF0aCBjbGFzcz0iaWNvbi12cy1iZyIgZD0iTTE1IDRoLTVWM2g1djF6bS0xIDNoLTJ2MWgyVjd6bS00IDBIMXYxaDlWN3ptMiA2SDF2MWgxMXYtMXptLTUtM0gxdj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C0uNzU0YzAtLjMxNi4wMzItLjYwNC4wOTYtLjg2MS4wNjMtLjI1OC4xNTUtLjQ3OS4yNzMtLjY2LjExOS0uMTgyLjI2NS0uMzIyLjQzMy0uNDI0YTEuMTAyIDEuMTAyIDAgMCAxIDEuMDczLS4wMjN6IiBpZD0iaWNvbkJnIi8+PC9zdmc+"); }\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row .icon.color { background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiI+PHN0eWxlPi5pY29uLWNhbnZhcy10cmFuc3BhcmVudHtvcGFjaXR5OjA7ZmlsbDojZjZmNmY2fS5pY29uLXZzLW91dHtmaWxsOiNmNmY2ZjZ9Lmljb24tdnMtYmd7ZmlsbDojNDI0MjQyfS5pY29uLXZzLXJlZHtmaWxsOiNlNTE0MDB9Lmljb24tdnMteWVsbG93e2ZpbGw6I2ZmY2MwMH0uaWNvbi12cy1ncmVlbntmaWxsOiMzMzk5MzN9Lmljb24tdnMtYmx1ZXtmaWxsOiMxYmExZTJ9Lmljb24tdnMtYWN0aW9uLXB1cnBsZXtmaWxsOiM2NTJkOTB9Lmljb24td2hpdGV7ZmlsbDojZmZmZmZmfTwvc3R5bGU+PHBhdGggY2xhc3M9Imljb24tY2FudmFzLXRyYW5zcGFyZW50IiBkPSJNMTYgMTZIMFYwaDE2djE2eiIgaWQ9ImNhbnZhcyIvPjxwYXRoIGNsYXNzPSJpY29uLXZzLW91dCIgZD0iTTE2IDhjMCA0LjQxMS0zLjU4OSA4LTggOGEyLjgwMyAyLjgwMyAwIDAgMS0yLjgtMi44YzAtLjgzMy4yNzItMS42MjkuNzY2LTIuMjQxYS41OTYuNTk2IDAgMCAwIC4xMDEtLjM1OS42NjcuNjY3IDAgMCAwLS42NjctLjY2Ni41OC41OCAwIDAgMC0uMzU4LjEwMkEzLjU4NCAzLjU4NCAwIDAgMSAy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0uMTE0Ljk4Ni0uMzIyQTIuNTY4IDIuNTY4IDAgMCAxIDUuNCA3LjkzM3oiLz48cGF0aCBjbGFzcz0iaWNvbi12cy1hY3Rpb24tcHVycGxlIiBkPSJNNC41IDUuMzc1YS44NzUuODc1IDAgMSAwIDAgMS43NS44NzUuODc1IDAgMCAwIDAtMS43NXoiLz48cGF0aCBjbGFzcz0iaWNvbi12cy1ibHVlIiBkPSJNNy4xMjUgMy42MjVhLjg3NS44NzUgMCAxIDAgMCAxLjc1Ljg3NS44NzUgMCAwIDAgMC0xLjc1eiIvPjxwYXRoIGNsYXNzPSJpY29uLXZzLWdyZWVuIiBkPSJNMTAuNjI1IDQuNWEuODc1Ljg3NSAwIDEgMCAwIDEuNzUuODc1Ljg3NSAwIDAgMCAwLTEuNzV6Ii8+PHBhdGggY2xhc3M9Imljb24tdnMteWVsbG93IiBkPSJNMTEuNSA4YS44NzUuODc1IDAgMSAwIDAgMS43NS44NzUuODc1IDAgMCAwIDAtMS43NXoiLz48cGF0aCBjbGFzcz0iaWNvbi12cy1yZWQiIGQ9Ik05Ljc1IDEwLjYyNWEuODc1Ljg3NSAwIDEgMCAwIDEuNzUuODc1Ljg3NSAwIDAgMCAwLTEuNzV6Ii8+PC9nPjwvc3ZnPg=="); }\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row .icon.file { background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiI+PHN0eWxlPi5pY29uLWNhbnZhcy10cmFuc3BhcmVudHtvcGFjaXR5OjA7ZmlsbDojZjZmNmY2fS5pY29uLXZzLW91dHtmaWxsOiNmNmY2ZjZ9Lmljb24tdnMtYmd7ZmlsbDojNDI0MjQyfS5pY29uLXZzLWZne2ZpbGw6I2YwZWZmMX08L3N0eWxlPjxwYXRoIGNsYXNzPSJpY29uLWNhbnZhcy10cmFuc3BhcmVudCIgZD0iTTE2IDE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YxaDUuMDYxTDE0IDQuNTU2eiIgaWQ9Im91dGxpbmUiIHN0eWxlPSJkaXNwbGF5OiBub25lOyIvPjxwYXRoIGNsYXNzPSJpY29uLXZzLWJnIiBkPSJNMTMgNXY4cy0uMDM1IDEtMS4wMzUgMWgtOFMzIDE0IDMgMTNWOWgxdjRoOFY2SDkuMzk3bC41MTctLjUyTDkgNC41NzJWM0g3LjQxOUw2LjQxMyAyaDMuMjI4TDEzIDV6IiBpZD0iaWNvbkJnIi8+PHBhdGggY2xhc3M9Imljb24tdnMtZmciIGQ9Ik03LjQxOSAzSDl2MS41NzJMNy40MTkgM3ptMS45NzggM0w2LjQxNiA5SDR2NGg4VjZIOS4zOTd6IiBpZD0iaWNvbkZnIiBzdHlsZT0iZGlzcGxheTogbm9uZTsiLz48cGF0aCBjbGFzcz0iaWNvbi12cy1hY3Rpb24tYmx1ZSIgZD0iTTUuOTg4IDZIMy41YTIuNSAyLjUgMCAxIDEgMC01SDR2MWgtLjVDMi42NzMgMiAyIDIuNjczIDIgMy41UzIuNjczIDUgMy41IDVoMi41MTNMNCAzaDJsMi41IDIuNDg0TDYgOEg0bDEuOTg4LTJ6IiBpZD0iY29sb3JBY3Rpb24iLz48L3N2Zz4="); }\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row .icon.snippet { background-image: url("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjxzdmcKICAgeG1sbnM6ZGM9Imh0dHA6Ly9wdXJsLm9yZy9kYy9lbGVtZW50cy8xLjEvIgogICB4bWxuczpjYz0iaHR0cDovL2NyZWF0aXZlY29tbW9ucy5vcmcvbnMjIgogICB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiCiAgIHhtbG5zOnN2Zz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciCiAgIHhtbG5zP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0xLDAgeiBtIC03LDIgLTEsMCAwLC0xIDEsMCAwLDEgeiBtIDIsLTEgLTEsMCAwLDEgMSwwIDAsLTEgeiBtIDIsMCAtMSwwIDAsMSAxLDAgMCwtMSB6IG0gMiwxIC0xLDAgMCwtMSAxLDAgMCwxIHogbSAyLC0xIC0xLDAgMCwxIDEsMCAwLC0xIHoiCiAgICAgICBpZD0icGF0aDQ1MzYiCiAgICAgICBzdHlsZT0iZmlsbDojNDI0MjQyIiAvPgogICAgPHBhdGgKICAgICAgIGQ9Im0gMTg3LDEzIDAsLTcgNywwIDAsNyAtNywwIHoiCiAgICAgICBpZD0icGF0aDQ1MzgiCiAgICAgICBzdHlsZT0iZmlsbDojZjBlZmYxIiAvPgogIDwvZz4KICA8cGF0aAogICAgIGlkPSJjYW52YXMiCiAgICAgZD0iTTE2IDE2SDBWMGgxNnYxNnoiCiAgICAgY2xhc3M9Imljb24tY2FudmFzLXRyYW5zcGFyZW50IiAvPgo8L3N2Zz4K"); }\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row .icon.customcolor { background-image: none; }\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row .icon.folder { background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+PHN0eWxlIHR5cGU9InRleHQvY3NzIj4uaWNvbi1jYW52YXMtdHJhbnNwYXJlbnR7b3BhY2l0eTowO2ZpbGw6I0Y2RjZGNjt9IC5pY29uLXZzLW91dHtvcGFjaXR5OjA7ZmlsbDojRjZGNkY2O30gLmljb24tdnMtZmd7ZmlsbDojRjBFRkYxO30gLmljb24tZm9sZGVye2ZpbGw6IzY1NjU2NTt9PC9zdHlsZT48cGF0aCBjbGFzcz0iaWNvbi1jYW52YXMtdHJhbnNwYXJlbnQiIGQ9Ik0xNiAxNmgtMTZ2LTE2aDE2djE2eiIgaWQ9ImNhbnZhcyIvPjxwYXRoIGNsYXNzPSJpY29uLXZzLW91dCIgZD0iTTE2IDIuNXYxMGMwIC44MjctLjY3MyAxLjUtMS41IDEuNWgtMTEuOTk2Yy0uODI3IDAtMS41LS42NzMtMS41LTEuNXYtOGMwLS44MjcuNjczLTEuNSAxLjUtMS41aDIuODg2bDEtMmg4LjExYy44MjcgMCAxLjUuNjczIDEuNSAxLjV6IiBpZD0ib3V0bGluZSIvPjxwYXRoIGNsYXNzPSJpY29uLWZvbGRlciIgZD0iTTE0LjUgMmgtNy40OTJsLTEgMmgtMy41MDRjLS4yNzcgMC0uNS4yMjQtLjUuNXY4YzAgLjI3Ni4yMjMuNS41LjVoMTEuOTk2Yy4yNzUgMCAuNS0uMjI0LjUtLjV2LTEwYzAtLjI3Ni0uMjI1LS41LS41LS41em0tLjQ5NiAyaC02LjQ5NmwuNS0xaDUuOTk2djF6IiBpZD0iaWNvbkJnIi8+PHBhdGggY2xhc3M9Imljb24tdnMtZmciIGQ9Ik0xNCAzdjFoLTYuNWwuNS0xaDZ6IiBpZD0iaWNvbkZnIi8+PC9zdmc+"); }\n\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row .icon.customcolor .colorspan {\n\tmargin: 0 0 0 0.3em;\n\tborder: 0.1em solid #000;\n\twidth: 0.7em;\n\theight: 0.7em;\n\tdisplay: inline-block;\n}\n\n/** Styles for the docs of the completion item in focus **/\n.monaco-editor .suggest-widget .details {\n\tdisplay: flex;\n\tflex-direction: column;\n\tcursor: default;\n}\n\n.monaco-editor .suggest-widget .details.no-docs {\n\tdisplay: none;\n}\n\n.monaco-editor .suggest-widget.docs-below .details {\n\tborder-top-width: 0px;\n}\n\n.monaco-editor .suggest-widget .details > .monaco-scrollable-element {\n\tflex: 1;\n}\n\n.monaco-editor .suggest-widget .details > .monaco-scrollable-element > .body {\n\tposition: absolute;\n\tbox-sizing: border-box;\n\theight: 100%;\n\twidth: 100%;\n}\n\n.monaco-editor .suggest-widget .details > .monaco-scrollable-element > .body > .header > .type {\n\tflex: 2;\n\toverflow: hidden;\n\ttext-overflow: ellipsis;\n\topacity: 0.7;\n\tword-break: break-all;\n\tmargin: 0;\n\tpadding: 4px 0 4px 5px;\n}\n\n.monaco-editor .suggest-widget .details > .monaco-scrollable-element > .body > .docs {\n\tmargin: 0;\n\tpadding: 4px 5px;\n\twhite-space: pre-wrap;\n}\n\n.monaco-editor .suggest-widget .details > .monaco-scrollable-element > .body > .docs.markdown-docs {\n\twhite-space: initial;\n}\n\n.monaco-editor .suggest-widget .details > .monaco-scrollable-element > .body > .docs .code {\n\twhite-space: pre-wrap;\n\tword-wrap: break-word;\n}\n\n.monaco-editor .suggest-widget .details > .monaco-scrollable-element > .body > p:empty {\n\tdisplay: none;\n}\n\n.monaco-editor .suggest-widget .details code {\n\tborder-radius: 3px;\n\tpadding: 0 0.4em;\n}\n\n/* High Contrast and Dark Theming */\n\n.monaco-editor.vs-dark .suggest-widget .details > .monaco-scrollable-element > .body > .header > .close,\n.monaco-editor.hc-black .suggest-widget .details > .monaco-scrollable-element > .body > .header > .close {\n\tbackground-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgdmlld0JveD0iMyAzIDE2IDE2IiBlbmFibGUtYmFja2dyb3VuZD0ibmV3IDMgMyAxNiAxNiI+PHBvbHlnb24gZmlsbD0iI2U4ZThlOCIgcG9pbnRzPSIxMi41OTcsMTEuMDQyIDE1LjQsMTMuODQ1IDEzLjg0NCwxNS40IDExLjA0MiwxMi41OTggOC4yMzksMTUuNCA2LjY4MywxMy44NDUgOS40ODUsMTEuMDQyIDYuNjgzLDguMjM5IDguMjM4LDYuNjgzIDExLjA0Miw5LjQ4NiAxMy44NDUsNi42ODMgMTUuNCw4LjIzOSIvPjwvc3ZnPg==");\n}\n\n.monaco-editor.vs-dark .suggest-widget .monaco-list .monaco-list-row .icon,\n.monaco-editor.hc-black .suggest-widget .monaco-list .monaco-list-row .icon { background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiI+PHN0eWxlPi5pY29uLWNhbnZhcy10cmFuc3BhcmVudHtvcGFjaXR5OjA7ZmlsbDojMmQyZDMwfS5pY29uLXZzLW91dHtmaWxsOiMyZDJkMzB9Lmljb24tdnMtYmd7ZmlsbDojYzVjNWM1fTwvc3R5bGU+PHBhdGggY2xhc3M9Imljb24tY2FudmFzLXRyYW5zcGFyZW50IiBkPSJNMTYgMTZIMFYwaDE2djE2eiIgaWQ9ImNhbnZhcyIvPjxwYXRoIGNsYXNzPSJpY29uLXZzLW91dCIgZD0iTTE2IDEwYzAgMi4yMDUtMS43OTQgNC00IDQtMS44NTggMC0zLjQxMS0xLjI3OS0zLjg1OC0zaC0uOTc4bDIuMzE4IDRIMHYtMS43MDNsMi0zLjQwOFYwaDExdjYuMTQyYzEuNzIxLjQ0NyAzIDIgMyAzLjg1OHoiIGlkPSJvdXRsaW5lIi8+PHBhdGggY2xhc3M9Imljb24tdnMtYmciIGQ9Ik0xMiAxdjQuNzVBNC4yNTUgNC4yNTUgMCAwIDAgNy43NSAxMGgtLjczMkw0LjI3NSA1LjI2OSAzIDcuNDQyVjFoOXpNNy43NDcgMTRMNC4yNjkgOCAuNzQ4IDE0aDYuOTk5ek0xNSAxMGEzIDMgMCAxIDEtNiAwIDMgMyAwIDAgMSA2IDB6IiBpZD0iaWNvbkJnIi8+PC9zdmc+"); }\n\n.monaco-editor.vs-dark .suggest-widget .monaco-list .monaco-list-row .icon.method,\n.monaco-editor.hc-black .suggest-widget .monaco-list .monaco-list-row .icon.method,\n.monaco-editor.vs-dark .suggest-widget .monaco-list .monaco-list-row .icon.function,\n.monaco-editor.hc-black .suggest-widget .monaco-list .monaco-list-row .icon.function,\n.monaco-editor.vs-dark .suggest-widget .monaco-list .monaco-list-row .icon.constructor,\n.monaco-editor.hc-black .suggest-widget .monaco-list .monaco-list-row .icon.constructor { background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiI+PHN0eWxlPi5pY29uLWNhbnZhcy10cmFuc3BhcmVudHtvcGFjaXR5OjA7ZmlsbDojMmQyZDMwfS5pY29uLXZzLW91dHtmaWxsOiMyZDJkMzB9Lmljb24tdnMtZmd7ZmlsbDojMmIyODJlfS5pY29uLXZzLWFjdGlvbi1wdXJwbGV7ZmlsbDojYjE4MGQ3fTwvc3R5bGU+PHBhdGggY2xhc3M9Imljb24tY2FudmFzLXRyYW5zcGFyZW50IiBkPSJNMTYgMTZIMFYwaDE2djE2eiIgaWQ9ImNhbnZhcyIvPjxwYXRoIGNsYXNzPSJpY29uLXZzLW91dCIgZD0iTTE1IDMuMzQ5djguNDAzTDguOTc1IDE2SDguMDdMMSAxMS41ODJWMy4zMjdMNy41OTUgMGgxLjExOEwxNSAzLjM0OXoiIGlkPSJvdXRsaW5lIi8+PHBhdGggY2xhc3M9Imljb24tdnMtZmciIGQ9Ik0xMi43MTUgNC4zOThMOC40ODcgNy4wMiAzLjU2NSA0LjI3Mmw0LjU3OC0yLjMwOSA0LjU3MiAyLjQzNXpNMyA1LjEwMmw1IDIuNzkydjUuNzA1bC01LTMuMTI1VjUuMTAyem02IDguNDM0VjcuODc4bDQtMi40OHY1LjMxN2wtNCAyLjgyMXoiIGlkPSJpY29uRmciLz48cGF0aCBjbGFzcz0iaWNvbi12cy1hY3Rpb24tcHVycGxlIiBkPSJNOC4xNTYuODM3TDIgMy45NDJ2Ny4wODVMOC41MTcgMTUuMSAxNCAxMS4yMzNWMy45NUw4LjE1Ni44Mzd6bTQuNTU5IDMuNTYxTDguNDg3IDcuMDIgMy41NjUgNC4yNzJsNC41NzgtMi4zMDkgNC41NzIgMi40MzV6TTMgNS4xMDJsNSAyLjc5MnY1LjcwNWwtNS0zLjEyNVY1LjEwMnptNiA4LjQzNFY3Ljg3OGw0LTIuNDh2NS4zMTdsLTQgMi44MjF6IiBpZD0iaWNvbkJnIi8+PC9zdmc+"); }\n\n.monaco-editor.vs-dark .suggest-widget .monaco-list .monaco-list-row .icon.field,\n.monaco-editor.hc-black .suggest-widget .monaco-list .monaco-list-row .icon.field { background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiI+PHN0eWxlPi5pY29uLWNhbnZhcy10cmFuc3BhcmVudHtvcGFjaXR5OjA7ZmlsbDojMmQyZDMwfS5pY29uLXZzLW91dHtmaWxsOiMyZDJkMzB9Lmljb24tdnMtZmd7ZmlsbDojMmIyODJlfS5pY29uLXZzLWFjdGlvbi1ibHVle2ZpbGw6Izc1YmVmZn08L3N0eWxlPjxwYXRoIGNsYXNzPSJpY29uLWNhbnZhcy10cmFuc3BhcmVudCIgZD0iTTE2IDE2SDBWMGgxNnYxNnoiIGlkPSJjYW52YXMiLz48cGF0aCBjbGFzcz0iaWNvbi12cy1vdXQiIGQ9Ik0wIDEwLjczNlY0LjVMOSAwbDcgMy41djYuMjM2bC05IDQuNS03LTMuNXoiIGlkPSJvdXRsaW5lIi8+PHBhdGggY2xhc3M9Imljb24tdnMtYWN0aW9uLWJsdWUiIGQ9Ik05IDFMMSA1djVsNiAzIDgtNFY0TDkgMXpNNyA2Ljg4MkwzLjIzNiA1IDkgMi4xMTggMTIuNzY0IDQgNyA2Ljg4MnoiIGlkPSJpY29uQmciLz48cGF0aCBjbGFzcz0iaWNvbi12cy1mZyIgZD0iTTkgMi4xMThMMTIuNzY0IDQgNyA2Ljg4MiAzLjIzNiA1IDkgMi4xMTh6IiBpZD0iaWNvbkZnIi8+PC9zdmc+"); }\n\n.monaco-editor.vs-dark .suggest-widget .monaco-list .monaco-list-row .icon.event,\n.monaco-editor.hc-black .suggest-widget .monaco-list .monaco-list-row .icon.event { background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiI+PHN0eWxlPi5pY29uLWNhbnZhcy10cmFuc3BhcmVudHtvcGFjaXR5OjA7ZmlsbDojMmQyZDMwfS5pY29uLXZzLW91dHtmaWxsOiMyZDJkMzB9Lmljb24tdnMtYWN0aW9uLW9yYW5nZXtmaWxsOiNlOGFiNTN9PC9zdHlsZT48cGF0aCBjbGFzcz0iaWNvbi1jYW52YXMtdHJhbnNwYXJlbnQiIGQ9Ik0xNiAxNkgwVjBoMTZ2MTZ6IiBpZD0iY2FudmFzIi8+PHBhdGggY2xhc3M9Imljb24tdnMtb3V0IiBkPSJNMTQgMS40MTRMOS40MTQgNkgxNHYxLjQxNEw1LjQxNCAxNkgzdi0xLjIzNEw1LjM3MSAxMEgyVjguNzY0TDYuMzgyIDBIMTR2MS40MTR6IiBpZD0ib3V0bGluZSIgc3R5bGU9ImRpc3BsYXk6IG5vbmU7Ii8+PHBhdGggY2xhc3M9Imljb24tdnMtYWN0aW9uLW9yYW5nZSIgZD0iTTcgN2g2bC04IDhINGwyLjk4NS02SDNsNC04aDZMNyA3eiIgaWQ9Imljb25CZyIvPjwvc3ZnPg=="); }\n\n.monaco-editor.vs-dark .suggest-widget .monaco-list .monaco-list-row .icon.operator,\n.monaco-editor.hc-black .suggest-widget .monaco-list .monaco-list-row .icon.operator { background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiI+PHN0eWxlPi5pY29uLWNhbnZhcy10cmFuc3BhcmVudHtvcGFjaXR5OjA7ZmlsbDojMmQyZDMwfS5pY29uLXZzLW91dHtmaWxsOiMyZDJkMzB9Lmljb24tdnMtZmd7ZmlsbDojMmIyODJlfS5pY29uLXZzLWFjdGlvbi1ibHVle2ZpbGw6Izc1YmVmZn08L3N0eWxlPjxwYXRoIGNsYXNzPSJpY29uLWNhbnZhcy10cmFuc3BhcmVudCIgZD0iTTE2IDE2SDBWMGgxNnYxNnoiIGlkPSJjYW52YXMiLz48cGF0aCBjbGFzcz0iaWNvbi12cy1vdXQiIGQ9Ik0xNiAxNkgwVjBoMTZ2MTZ6IiBpZD0ib3V0bGluZSIgc3R5bGU9ImRpc3BsYXk6IG5vbmU7Ii8+PHBhdGggY2xhc3M9Imljb24tdnMtYWN0aW9uLWJsdWUiIGQ9Ik0xIDF2MTRoMTRWMUgxem02IDEySDN2LTFoNHYxem0wLTNIM1Y5aDR2MXptMC01SDV2Mkg0VjVIMlY0aDJWMmgxdjJoMnYxem0zLjI4MSA4SDguNzE5bDMtNGgxLjU2M2wtMy4wMDEgNHpNMTQgNUg5VjRoNXYxeiIgaWQ9Imljb25CZyIvPjxwYXRoIGNsYXNzPSJpY29uLXZzLWZnIiBkPSJNNyA1SDV2Mkg0VjVIMlY0aDJWMmgxdjJoMnYxem03LTFIOXYxaDVWNHpNNyA5SDN2MWg0Vjl6bTAgM0gzdjFoNHYtMXptMy4yODEgMWwzLTRoLTEuNTYzbC0zIDRoMS41NjN6IiBpZD0iaWNvbkZnIiBzdHlsZT0iZGlzcGxheTogbm9uZTsiLz48L3N2Zz4="); }\n\n.monaco-editor.vs-dark .suggest-widget .monaco-list .monaco-list-row .icon.variable,\n.monaco-editor.hc-black .suggest-widget .monaco-list .monaco-list-row .icon.variable { background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiI+PHN0eWxlPi5pY29uLWNhbnZhcy10cmFuc3BhcmVudHtvcGFjaXR5OjA7ZmlsbDojMmQyZDMwfS5pY29uLXZzLW91dHtmaWxsOiMyZDJkMzB9Lmljb24tdnMtYmd7ZmlsbDojYzVjNWM1fS5pY29uLXZzLWZne2ZpbGw6IzJiMjgyZX0uaWNvbi12cy1hY3Rpb24tYmx1ZXtmaWxsOiM3NWJlZmZ9PC9zdHlsZT48cGF0aCBjbGFzcz0iaWNvbi1jYW52YXMtdHJhbnNwYXJlbnQiIGQ9Ik0xNiAxNkgwVjBoMTZ2MTZ6IiBpZD0iY2FudmFzIi8+PHBhdGggY2xhc3M9Imljb24tdnMtb3V0IiBkPSJNMTEgM3YxLjAxNUw4LjczMyAyLjg4MiA1IDQuNzQ5VjNIMHYxMGg1di0xLjg1OWwyLjE1NiAxLjA3N0wxMSAxMC4yOTVWMTNoNVYzaC01eiIgaWQ9Im91dGxpbmUiIHN0eWxlPSJkaXNwbGF5OiBub25lOyIvPjxwYXRoIGNsYXNzPSJpY29uLXZzLWJnIiBkPSJNMiA1djZoMnYxSDFWNGgzdjFIMnptMTAgNnYxaDNWNGgtM3YxaDJ2NmgtMnoiIGlkPSJpY29uQmciLz48cGF0aCBjbGFzcz0iaWNvbi12cy1mZyIgZD0iTTcuMTU2IDcuMTU2bC0xLjU3OC0uNzg5IDMuMTU2LTEuNTc4IDEuNTc4Ljc4OS0zLjE1NiAxLjU3OHoiIGlkPSJpY29uRmciIHN0eWxlPSJkaXNwbGF5OiBub25lOyIvPjxwYXRoIGNsYXNzPSJpY29uLXZzLWFjdGlvbi1ibHVlIiBkPSJNOC43MzMgNEw0IDYuMzY3djMuMTU2TDcuMTU2IDExLjFsNC43MzMtMi4zNjdWNS41NzhMOC43MzMgNHpNNy4xNTYgNy4xNTZsLTEuNTc4LS43ODkgMy4xNTYtMS41NzggMS41NzguNzg5LTMuMTU2IDEuNTc4eiIgaWQ9ImNvbG9ySW1wb3J0YW5jZSIvPjwvc3ZnPg=="); }\n\n.monaco-editor.vs-dark .suggest-widget .monaco-list .monaco-list-row .icon.class,\n.monaco-editor.hc-black .suggest-widget .monaco-list .monaco-list-row .icon.class { background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiI+PHN0eWxlPi5pY29uLWNhbnZhcy10cmFuc3BhcmVudHtvcGFjaXR5OjA7ZmlsbDojMmQyZDMwfS5pY29uLXZzLW91dHtmaWxsOiMyZDJkMzB9Lmljb24tdnMtYWN0aW9uLW9yYW5nZXtmaWxsOiNlOGFiNTN9PC9zdHlsZT48cGF0aCBjbGFzcz0iaWNvbi1jYW52YXMtdHJhbnNwYXJlbnQiIGQ9Ik0xNiAxNkgwVjBoMTZ2MTZ6IiBpZD0iY2FudmFzIi8+PHBhdGggY2xhc3M9Imljb24tdnMtb3V0IiBkPSJNMTYgNi41ODZsLTMtM0wxMS41ODYgNUg5LjQxNGwxLTEtNC00aC0uODI4TDAgNS41ODZ2LjgyOGw0IDRMNi40MTQgOEg3djVoMS41ODZsMyAzaC44MjhMMTYgMTIuNDE0di0uODI4TDEzLjkxNCA5LjUgMTYgNy40MTR2LS44Mjh6IiBpZD0ib3V0bGluZSIvPjxwYXRoIGNsYXNzPSJpY29uLXZzLWFjdGlvbi1vcmFuZ2UiIGQ9Ik0xMyAxMGwyIDItMyAzLTItMiAxLTFIOFY3SDZMNCA5IDEgNmw1LTUgMyAzLTIgMmg1bDEtMSAyIDItMyAzLTItMiAxLTFIOXY0bDIuOTk5LjAwMkwxMyAxMHoiIGlkPSJpY29uQmciLz48L3N2Zz4="); }\n\n.monaco-editor.vs-dark .suggest-widget .monaco-list .monaco-list-row .icon.interface,\n.monaco-editor.hc-black .suggest-widget .monaco-list .monaco-list-row .icon.interface { background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiI+PHN0eWxlPi5pY29uLWNhbnZhcy10cmFuc3BhcmVudHtvcGFjaXR5OjA7ZmlsbDojMmQyZDMwfS5pY29uLXZzLW91dHtmaWxsOiMyZDJkMzB9Lmljb24tdnMtZmd7ZmlsbDojMmIyODJlfS5pY29uLXZzLWFjd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suggest-widget .monaco-list .monaco-list-row .icon.struct { background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiI+PHN0eWxlPi5pY29uLWNhbnZhcy10cmFuc3BhcmVudHtvcGFjaXR5OjA7ZmlsbDojMmQyZDMwfS5pY29uLXZzLW91dHtmaWxsOiMyZDJkMzB9Lmljb24tdnMtYWN0aW9uLWJsdWV7ZmlsbDojNzViZWZmfTwvc3R5bGU+PHBhdGggY2xhc3M9Imljb24tY2FudmFzLXRyYW5zcGFyZW50IiBkPSJNMTYgMTZIMFYwaDE2djE2eiIgaWQ9ImNhbnZhcyIvPjxwYXRoIGNsYXNzPSJpY29uLXZzLW91dCIgZD0iTTkgMTRWOEg3djZIMVYyaDE0djEySDl6IiBpZD0ib3V0bGluZSIgc3R5bGU9ImRpc3BsYXk6IG5vbmU7Ii8+PHBhdGggY2xhc3M9Imljb24tdnMtYWN0aW9uLWJsdWUiIGQ9Ik0xMCA5aDR2NGgtNFY5em0tOCA0aDRWOUgydjR6TTIgM3Y0aDEyVjNIMnoiIGlkPSJpY29uQmciLz48L3N2Zz4="); }\n\n.monaco-editor.vs-dark .suggest-widget .monaco-list .monaco-list-row .icon.type-parameter,\n.monaco-editor.hc-black .suggest-widget .monaco-list .monaco-list-row .icon.type-parameter { background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiI+PHN0eWxlPi5pY29uLWNhbnZhcy10cmFuc3BhcmVudHtvcGFjaXR5OjA7ZmlsbDojMmQyZDMwfS5pY29uLXZzLW91dHtmaWxsOiMyZDJkMzB9Lmljb24tdnMtYmd7ZmlsbDojYzVjNWM1fTwvc3R5bGU+PHBhdGggY2xhc3M9Imljb24tY2FudmFzLXRyYW5zcGFyZW50IiBkPSJNMTYgMTZIMFYwaDE2djE2eiIgaWQ9ImNhbnZhcyIvPjxwYXRoIGNsYXNzPSJpY29uLXZzLW91dCIgZD0iTTEwLjcwMiAxMC41bDItMi0yLTIgLjUtLjVIMTB2NWgxdjNINXYtM2gxVjZINC43OThsLjUuNS0yIDIgMiAyTDMgMTIuNzk3bC0zLTNWNy4yMDFsMy0zVjJoMTB2Mi4yMDFsMyAzdjIuNTk2bC0zIDMtMi4yOTgtMi4yOTd6IiBpZD0ib3V0bGluZSIgc3R5bGU9ImRpc3BsYXk6IG5vbmU7Ii8+PHBhdGggY2xhc3M9Imljb24tdnMtYmciIGQ9Ik00IDNoOHYyaC0xdi0uNWMwLS4yNzctLjIyNC0uNS0uNS0uNUg5djcuNWMwIC4yNzUuMjI0LjUuNS41aC41djFINnYtMWguNWEuNS41IDAgMCAwIC41LS41VjRINS41YS41LjUgMCAwIDAtLjUuNVY1SDRWM3pNMyA1LjYxNUwuMTE2IDguNSAzIDExLjM4M2wuODg0LS44ODMtMi0yIDItMkwzIDUuNjE1em0xMCAwbC0uODg0Ljg4NSAyIDItMiAyIC44ODQuODgzTDE1Ljg4NCA4LjUgMTMgNS42MTV6IiBpZD0iaWNvbkJnIi8+PC9zdmc+"); }\n\n.monaco-editor.vs-dark .suggest-widget .monaco-list .monaco-list-row .icon.module,\n.monaco-editor.hc-black .suggest-widget .monaco-list .monaco-list-row .icon.module { background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiI+PHN0eWxlPi5pY29uLWNhbnZhcy10cmFuc3BhcmVudHtvcGFjaXR5OjA7ZmlsbDojMmQyZDMwfS5pY29uLXZzLW91dHtmaWxsOiMyZDJkMzB9Lmljb24tdnMtYmd7ZmlsbDojYzVjNWM1fTwvc3R5bGU+PHBhdGggY2xhc3M9Imljb24tY2FudmFzLXRyYW5zcGFyZW50IiBkPSJNMTYgMTZIMFYwaDE2djE2eiIgaWQ9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0xLjAxMS0uMDEyeiIgaWQ9Im91dGxpbmUiLz48cGF0aCBjbGFzcz0iaWNvbi12cy1iZyIgZD0iTTUuNzUgMTQuMDE2Yy0xLjYyMy0uMDE5LTIuNDM0LS43MTEtMi40MzQtMi4wNzhWOS45MjFjMC0uOTAyLS4zNTUtMS4zNzYtMS4wNjYtMS40MjJ2LS45OThjLjcxMS0uMDQ1IDEuMDY2LS41MjkgMS4wNjYtMS40NDlWNC4wOWMwLTEuMzg1LjgxMS0yLjA4NyAyLjQzNC0yLjEwNXYxLjA2Yy0uNzI1LjAxNy0xLjA4Ny40NTMtMS4wODcgMS4zMDV2MS45MjhjMCAuOTItLjQ1NCAxLjQ4OC0xLjM2IDEuNzAyVjhjLjkwNy4yMDEgMS4zNi43NjMgMS4zNiAxLjY4OHYxLjkwN2MwIC40ODguMDgxLjgzNS4yNDMgMS4wNDIuMTYyLjIwOC40NDMuMzE2Ljg0NC4zMjV2MS4wNTR6bTcuOTktNS41MTdjLS43MDYuMDQ1LTEuMDYuNTItMS4wNiAxLjQyMnYyLjAxN2MwIDEuMzY3LS44MDcgMi4wNi0yLjQyIDIuMDc4di0xLjA1M2MuMzk2LS4wMDkuNjc4LS4xMTguODQ0LS4zMjguMTY3LS4yMS4yNS0uNTU2LjI1LTEuMDM5VjkuNjg4YzAtLjkyNS40NDktMS40ODggMS4zNDctMS42ODh2LS4wMjFjLS44OTgtLjIxNC0xLjM0Ny0uNzgyLTEuMzQ3LTEuNzAyVjQuMzVjMC0uODUyLS4zNjQtMS4yODgtMS4wOTQtMS4zMDZ2LTEuMDZjMS42MTMuMDE4IDIuNDIuNzIgMi40MiAyLjEwNXYxLjk2MmMwIC45Mi4zNTQgMS40MDQgMS4wNiAxLjQ0OXYuOTk5eiIgaWQ9Imljb25CZyIvPjwvc3ZnPg=="); }\n\n.monaco-editor.vs-dark .suggest-widget .monaco-list .monaco-list-row .icon.property,\n.monaco-editor.hc-black .suggest-widget .monaco-list .monaco-list-row .icon.property { background-image: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DAgMCAxIDYgNS41IDQuNSA0LjUgMCAwIDEgMTAuNSAxYy42OTMgMCAxLjM0Mi4xNyAxLjkyOS40NUw5LjYzNiA0LjI0M2wyLjEyMSAyLjEyMSAyLjc5My0yLjc5M2MuMjguNTg3LjQ1IDEuMjM2LjQ1IDEuOTI5eiIgaWQ9Imljb25CZyIvPjwvc3ZnPg=="); }\n\n.monaco-editor.vs-dark .suggest-widget .monaco-list .monaco-list-row .icon.unit,\n.monaco-editor.hc-black .suggest-widget .monaco-list .monaco-list-row .icon.unit { background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiI+PHN0eWxlPi5pY29uLWNhbnZhcy10cmFuc3BhcmVudHtvcGFjaXR5OjA7ZmlsbDojMmQyZDMwfS5pY29uLXZzLW91dHtmaWxsOiMyZDJkMzB9Lmljb24tdnMtYmd7ZmlsbDojYzVjNWM1fS5pY29uLXZzLWZne2ZpbGw6IzJiMjgyZX08L3N0eWxlPjxwYXRoIGNsYXNzPSJpY29uLWNhbnZhcy10cmFuc3BhcmVudCIgZD0iTTE2IDE2SDBWMGgxNnYxNnoiIGlkPSJjYW52YXMiLz48cGF0aCBjbGFzcz0iaWNvbi12cy1vdXQiIGQ9Ik0xNiAxMS4wMTNIMVY0aDE1djcuMDEzeiIgaWQ9Im91dGxpbmUiLz48cGF0aCBjbGFzcz0iaWNvbi12cy1mZyIgZD0iTTggOUg3VjZoM3YzSDlWN0g4djJ6TTQgN2gxdjJoMVY2SDN2M2gxVjd6bTggMGgxdjJoMVY2aC0zdjNoMVY3eiIgaWQ9Imljb25GZyIvPjxwYXRoIGNsYXNzPSJpY29uLXZzLWJnIiBkPSJNMiA1djVoMTNWNUgyem00IDRINVY3SDR2MkgzVjZoM3Yzem00IDBIOVY3SDh2Mkg3VjZoM3Yzem00IDBoLTFWN2gtMXYyaC0xVjZoM3YzeiIgaWQ9Imljb25CZyIvPjwvc3ZnPg=="); }\n\n.monaco-editor.vs-dark .suggest-widget .monaco-list .monaco-list-row .icon.constant,\n.monaco-editor.hc-black .suggest-widget .monaco-list .monaco-list-row .icon.constant { background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiI+PHN0eWxlPi5pY29uLWNhbnZhcy10cmFuc3BhcmVudHtvcGFjaXR5OjA7ZmlsbDojMjUyNTI2fS5pY29uLXZzLW91dHtmaWxsOiMyNTI1MjZ9Lmljb24tdnMtYmd7ZmlsbDojYzVjNWM1fS5pY29uLXZzLWZne2ZpbGw6IzJiMjgyZX0uaWNvbi12cy1hY3Rpb24tYmx1ZXtmaWxsOiM3NWJlZmZ9PC9zdHlsZT48cGF0aCBjbGFzcz0iaWNvbi1jYW52YXMtdHJhbnNwYXJlbnQiIGQ9Ik0xNiAxNkgwVjBoMTZ2MTZ6IiBpZD0iY2FudmFzIi8+PHBhdGggY2xhc3M9Imljb24tdnMtb3V0IiBkPSJNMi44NzkgMTRMMSAxMi4xMjFWMy44NzlMMi44NzkgMmgxMC4yNDJMMTUgMy44Nzl2OC4yNDJMMTMuMTIxIDE0SDIuODc5eiIgaWQ9Im91dGxpbmUiLz48cGF0aCBjbGFzcz0iaWNvbi12cy1mZyIgZD0iTTEyLjI5MyA0SDMuNzA3TDMgNC43MDd2Ni41ODZsLjcwNy43MDdoOC41ODZsLjcwNy0uNzA3VjQuNzA3TDEyLjI5MyA0ek0xMSAxMEg1VjloNnYxem0wLTNINVY2aDZ2MXoiIGlkPSJpY29uRmciLz48ZyBpZD0iaWNvbkJnIj48cGF0aCBjbGFzcz0iaWNvbi12cy1iZyIgZD0iTTEyLjcwNyAxM0gzLjI5M0wyIDExLjcwN1Y0LjI5M0wzLjI5MyAzaDkuNDE0TDE0IDQuMjkzdjcuNDE0TDEyLjcwNyAxM3ptLTktMWg4LjU4NmwuNzA3LS43MDdWNC43MDdMMTIuMjkzIDRIMy43MDdMMyA0LjcwN3Y2LjU4NmwuNzA3LjcwN3oiLz48cGF0aCBjbGFzcz0iaWNvbi12cy1hY3Rpb24tYmx1ZSIgZD0iTTExIDdINVY2aDZ2MXptMCAySDV2MWg2Vjl6Ii8+PC9nPjwvc3ZnPg=="); }\n\n.monaco-editor.vs-dark .suggest-widget .monaco-list .monaco-list-row .icon.value,\n.monaco-editor.hc-black .suggest-widget .monaco-list .monaco-list-row .icon.value,\n.monaco-editor.vs-dark .suggest-widget .monaco-list .monaco-list-row .icon.enum,\n.monaco-editor.hc-black .suggest-widget .monaco-list .monaco-list-row .icon.enum { background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiI+PHN0eWxlPi5pY29uLWNhbnZhcy10cmFuc3BhcmVudHtvcGFjaXR5OjA7ZmlsbDojMmQyZDMwfS5pY29uLXZzLW91dHtmaWxsOiMyZDJkMzB9Lmljb24tdnMtZmd7ZmlsbDojMmIyODJlfS5pY29uLXZzLWFjdGlvbi1vcmFuZ2V7ZmlsbDojZThhYjUzfTwvc3R5bGU+PHBhdGggY2xhc3M9Imljb24tY2FudmFzLXRyYW5zcGFyZW50IiBkPSJNMTYgMTZIMFYwaDE2djE2eiIgaWQ9ImNhbnZhcyIvPjxwYXRoIGNsYXNzPSJpY29uLXZzLW91dCIgZD0iTTE0LjQxNCAxTDE2IDIuNTg2djUuODI4TDE0LjQxNCAxMEgxMHYzLjQxNkw4LjQxNCAxNUgxLjU4NkwwIDEzLjQxNnYtNS44M0wxLjU4NiA2SDZWMi41ODZMNy41ODYgMWg2LjgyOHoiIGlkPSJvdXRsaW5lIi8+PHBhdGggY2xhc3M9Imljb24tdnMtZmciIGQ9Ik0yIDEzaDZWOEgydjV6bTEtNGg0djFIM1Y5em0wIDJoNHYxSDN2LTF6bTExLTVWM0g4djNoLjQxNEw5IDYuNTg2VjZoNHYxSDkuNDE0bC41ODYuNTg2VjhoNFY2em0tMS0xSDlWNGg0djF6IiBpZD0iaWNvbkZnIi8+PHBhdGggY2xhc3M9Imljb24tdnMtYWN0aW9uLW9yYW5nZSIgZD0iTTMgMTFoNC4wMDF2MUgzdi0xem0wLTFoNC4wMDFWOUgzdjF6bTYtMnY1bC0xIDFIMmwtMS0xVjhsMS0xaDZsMSAxek04IDhIMnY1aDZWOHptMS0ybDEgMWgzVjZIOXptMC0xaDRWNEg5djF6bTUtM0g4TDcgM3YzaDFWM2g2djVoLTR2MWg0bDEtMVYzbC0xLTF6IiBpZD0iaWNvbkJnIi8+PC9zdmc+"); }\n\n.monaco-editor.vs-dark .suggest-widget .monaco-list .monaco-list-row .icon.enum-member,\n.monaco-editor.hc-black .suggest-widget .monaco-list .monaco-list-row .icon.enum-member { background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiI+PHN0eWxlPi5pY29uLWNhbnZhcy10cmFuc3BhcmVudHtvcGFjaXR5OjA7ZmlsbDojMmQyZDMwfS5pY29uLXZzLW91dHtmaWxsOiMyZDJkMzB9Lmljb24tdnMtZmd7ZmlsbDojMmIyODJlfS5pY29uLXZzLWFjdGlvbi1ibHVle2ZpbGw6Izc1YmVmZn08L3N0eWxlPjxwYXRoIGNsYXNzPSJpY29uLWNhbnZhcy10cmFuc3BhcmVudCIgZD0iTTE2IDE2SDBWMGgxNnYxNnoiIGlkPSJjYW52YXMiLz48cGF0aCBjbGFzcz0iaWNvbi12cy1vdXQiIGQ9Ik0wIDE1VjZoNlYyLjU4Nkw3LjU4NSAxaDYuODI5TDE2IDIuNTg2djUuODI5TDE0LjQxNCAxMEgxMHY1SDB6bTMtNnoiIGlkPSJvdXRsaW5lIi8+PHBhdGggY2xhc3M9Imljb24tdnMtZmciIGQ9Ik04IDN2M2g1djFoLTN2MWg0VjNIOHptNSAySDlWNGg0djF6TTIgOHY1aDZWOEgyem01IDNIM3YtMWg0djF6IiBpZD0iaWNvbkZnIi8+PHBhdGggY2xhc3M9Imljb24tdnMtYWN0aW9uLWJsdWUiIGQ9Ik0xMCA2aDN2MWgtM1Y2ek05IDR2MWg0VjRIOXptNS0ySDhMNyAzdjNoMVYzaDZ2NWgtNHYxaDRsMS0xVjNsLTEtMXptLTcgOEgzdjFoNHYtMXptMi0zdjdIMVY3aDh6TTggOEgydjVoNlY4eiIgaWQ9Imljb25CZyIvPjwvc3ZnPg=="); }\n\n.monaco-editor.vs-dark .suggest-widget .monaco-list .monaco-list-row .icon.keyword,\n.monaco-editor.hc-black .suggest-widget .monaco-list .monaco-list-row .icon.keyword { background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiI+PHN0eWxlPi5pY29uLWNhbnZhcy10cmFuc3BhcmVudHtvcGFjaXR5OjA7ZmlsbDojMmQyZDMwfS5pY29uLXZzLW91dHtmaWxsOiMyZDJkMzB9Lmljb24tdnMtYmd7ZmlsbDojYzVjNWM1fS5pY29uLXZzLWZne2ZpbGw6IzJiMjgyZX08L3N0eWxlPjxwYXRoIGNsYXNzPSJpY29uLWNhbnZhcy10cmFuc3BhcmVudCIgZD0iTTE2IDE2SDBWMGgxNnYxNnoiIGlkPSJjYW52YXMiLz48cGF0aCBjbGFzcz0iaWNvbi12cy1vdXQiIGQ9Ik0xNiA1VjJIOVYxSDB2MTRoMTN2LTNoM1Y5aC0xVjZIOVY1aDd6bS04IDdWOWgxdjNIOHoiIGlkPSJvdXRsaW5lIi8+PHBhdGggY2xhc3M9Imljb24tdnMtZmciIGQ9Ik0yIDNoNXYxSDJWM3oiIGlkPSJpY29uRmciLz48cGF0aCBjbGFzcz0iaWNvbi12cy1iZyIgZD0iTTE1IDRoLTVWM2g1djF6bS0xIDNoLTJ2MWgyVjd6bS00IDBIMXYxaDlWN3ptMiA2SDF2MWgxMXYtMXptLTUtM0gxdjFoNnYtMXptOCAwaC01djFoNXYtMXpNOCAydjNIMVYyaDd6TTcgM0gydjFoNVYzeiIgaWQ9Imljb25CZyIvPjwvc3ZnPg=="); }\n\n.monaco-editor.vs-dark .suggest-widget .monaco-list .monaco-list-row .icon.text,\n.monaco-editor.hc-black .suggest-widget .monaco-list .monaco-list-row .icon.text { background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiI+PHN0eWxlPi5pY29uLWNhbnZhcy10cmFuc3BhcmVudHtvcGFjaXR5OjA7ZmlsbDojMmQyZDMwfS5pY29uLXZzLW91dHtmaWxsOiMyZDJkMzB9Lmljb24tdnMtYmd7ZmlsbDojYzVjNWM1fS5pY29uLXZzLWZne2ZpbGw6IzJiMjgyZX08L3N0eWxlPjxwYXRoIGNsYXNzPSJpY29uLWNhbnZhcy10cmFuc3BhcmVudCIgZD0iTTE2IDE2SDBWMGgxNnYxNnoiIGlkPSJjYW52YXMiLz48cGF0aCBjbGFzcz0iaWNvbi12cy1vdXQiIGQ9Ik0xNiAxNUgwVjFoMTZ2MTR6IiBpZD0ib3V0bGluZSIvPjxwYXRoIGNsYXNzPSJpY29uLXZzLWZnIiBkPSJNOS4yMjkgNy4zNTRjLjAzNS4xNDYuMDUyLjMxLjA1Mi40OTQgMCAuMjM0LS4wMi40NDEtLjA2LjYyMS0uMDM5LjE4LS4wOTUuMzI4LS4xNjguNDQ1YS42ODcuNjg3IDAgMCAxLS45MTQuMjgxLjc2Ljc2IDAgMCAxLS4yMzctLjIwNy45ODguOTg4IDAgMCAxLS4xNTQtLjMwNiAxLjI2MiAxLjI2MiAwIDAgMS0uMDU3LS4zODF2LS41MDZjMC0uMTcuMDItLjMyNi4wNjEtLjQ2NXMuMDk2LS4yNTguMTY4LS4zNTlhLjc1Ni43NTYgMCAw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DEuMjU3IDAgMCAxLS4zOTYtLjM5NiAyLjA5OCAyLjA5OCAwIDAgMS0uMjUyLS42MDIgMy4xMTggMy4xMTggMCAwIDEtLjA4OC0uNzU0YzAtLjMxNi4wMzItLjYwNC4wOTYtLjg2MS4wNjMtLjI1OC4xNTUtLjQ3OS4yNzMtLjY2LjExOS0uMTgyLjI2NS0uMzIyLjQzMy0uNDI0YTEuMTAyIDEuMTAyIDAgMCAxIDEuMDczLS4wMjN6IiBpZD0iaWNvbkJnIi8+PC9zdmc+"); }\n\n.monaco-editor.vs-dark .suggest-widget .monaco-list .monaco-list-row .icon.color,\n.monaco-editor.hc-black .suggest-widget .monaco-list .monaco-list-row .icon.color { background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiI+PHN0eWxlPi5pY29uLWNhbnZhcy10cmFuc3BhcmVudHtvcGFjaXR5OjA7ZmlsbDojMmQyZDMwfS5pY29uLXZzLW91dHtmaWxsOiMyZDJkMzB9Lmljb24tdnMtYmd7ZmlsbDojYzVjNWM1fS5pY29uLXZzLXJlZHtmaWxsOiNmNDg3NzF9Lmljb24tdnMteWVsbG93e2ZpbGw6I2ZmY2MwMH0uaWNvbi12cy1ncmVlbntmaWxsOiMzMzk5MzN9Lmljb24tdnMtYmx1ZXtmaWxsOiMxYmExZTJ9Lmljb24tdnMtYWN0aW9uLXB1cnBsZXtmaWxsOiNiMTgwZDd9Lmljb24td2hpdGV7ZmlsbDojMDAwMDAwfTwvc3R5bGU+PHBhdGggY2xhc3M9Imljb24tY2FudmFzLXRyYW5zcGFyZW50IiBkPSJNMTYgMTZIMFYwaDE2djE2eiIgaWQ9ImNhbnZhcyIvPjxwYXRoIGNsYXNzPSJpY29uLXZzLW91dCIgZD0iTTE2IDhjMCA0LjQxMS0zLjU4OSA4LTggOGEyLjgwMyAyLjgwMyAwIDAgMS0yLjgtMi44YzAtLjgzM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DEuNTk5IDAgMCAwLS4zMjMuOTg3LjguOCAwIDAgMCAuOC44YzMuMzA5IDAgNi0yLjY5MSA2LTZzLTIuNjkxLTYtNi02LTYgMi42OTEtNiA2YzAgLjQ0MS4zNTkuOC44LjguMzc4IDAgLjcyOS0uMTE0Ljk4Ni0uMzIyQTIuNTY4IDIuNTY4IDAgMCAxIDUuNCA3LjkzM3oiLz48cGF0aCBjbGFzcz0iaWNvbi12cy1hY3Rpb24tcHVycGxlIiBkPSJNNC41IDUuMzc1YS44NzUuODc1IDAgMSAwIDAgMS43NS44NzUuODc1IDAgMCAwIDAtMS43NXoiLz48cGF0aCBjbGFzcz0iaWNvbi12cy1ibHVlIiBkPSJNNy4xMjUgMy42MjVhLjg3NS44NzUgMCAxIDAgMCAxLjc1Ljg3NS44NzUgMCAwIDAgMC0xLjc1eiIvPjxwYXRoIGNsYXNzPSJpY29uLXZzLWdyZWVuIiBkPSJNMTAuNjI1IDQuNWEuODc1Ljg3NSAwIDEgMCAwIDEuNzUuODc1Ljg3NSAwIDAgMCAwLTEuNzV6Ii8+PHBhdGggY2xhc3M9Imljb24tdnMteWVsbG93IiBkPSJNMTEuNSA4YS44NzUuODc1IDAgMSAwIDAgMS43NS44NzUuODc1IDAgMCAwIDAtMS43NXoiLz48cGF0aCBjbGFzcz0iaWNvbi12cy1yZWQiIGQ9Ik05Ljc1IDEwLjYyNWEuODc1Ljg3NSAwIDEgMCAwIDEuNzUuODc1Ljg3NSAwIDAgMCAwLTEuNzV6Ii8+PC9nPjwvc3ZnPg=="); }\n\n.monaco-editor.vs-dark .suggest-widget .monaco-list .monaco-list-row .icon.file,\n.monaco-editor.hc-black .suggest-widget .monaco-list .monaco-list-row .icon.file { background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiI+PHN0eWxlPi5pY29uLWNhbnZhcy10cmFuc3BhcmVudHtvcGFjaXR5OjA7ZmlsbDojMmQyZDMwfS5pY29uLXZzLW91dHtmaWxsOiMyZDJkMzB9Lmljb24tdnMtYmd7ZmlsbDojYzVjNWM1fS5pY29uLXZzLWZne2ZpbGw6IzJiMjgyZX08L3N0eWxlPjxwYXRoIGNsYXNzPSJpY29uLWNhbnZhcy10cmFuc3BhcmVudCIgZD0iTTE2IDE2SDBWMGgxNnYxNnoiIGlkPSJjYW52YXMiLz48cGF0aCBjbGFzcz0iaWNvbi12cy1vdXQiIGQ9Ik0xNSAxNkgyVjBoOC42MjFMMTUgNC4zNzlWMTZ6IiBpZD0ib3V0bGluZSIvPjxwYXRoIGNsYXNzPSJpY29uLXZzLWZnIiBkPSJNMTMgMTRINFYyaDV2NGg0djh6bS0zLTlWMi4yMDdMMTIuNzkzIDVIMTB6IiBpZD0iaWNvbkZnIi8+PHBhdGggY2xhc3M9Imljb24tdnMtYmciIGQ9Ik0zIDF2MTRoMTFWNC43OTNMMTAuMjA3IDFIM3ptMTAgMTNINFYyaDV2NGg0djh6bS0zLTlWMi4yMDdMMTIuNzkzIDVIMTB6IiBpZD0iaWNvbkJnIi8+PC9zdmc+"); }\n\n.monaco-editor.vs-dark .suggest-widget .monaco-list .monaco-list-row .icon.reference,\n.monaco-editor.hc-black .suggest-widget .monaco-list .monaco-list-row .icon.reference { background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiI+PHN0eWxlPi5pY29uLWNhbnZhcy10cmFuc3BhcmVudHtvcGFjaXR5OjA7ZmlsbDojMmQyZDMwfS5pY29uLXZzLW91dHtmaWxsOiMyZDJkMzB9Lmljb24tdnMtYmd7ZmlsbDojYzVjNWM1fS5pY29uLXZzLWZne2ZpbGw6IzJiMjgyZX0uaWNvbi12cy1hY3Rpb24tYmx1ZXtmaWxsOiM3NWJlZmZ9PC9zdHlsZT48cGF0aCBjbGFzcz0iaWNvbi1jYW52YXMtdHJhbnNwYXJlbnQiIGQ9Ik0xNiAxNkgwVjBoMTZ2MTZ6IiBpZD0iY2FudmFzIi8+PHBhdGggY2xhc3M9Imljb24tdnMtb3V0IiBkPSJNMTQgNC41NTZWMTNjMCAuOTctLjcwMSAyLTIgMkg0Yy0uOTcgMC0yLS43MDEtMi0yVjYuNjQ5QTMuNDk1IDMuNDk1IDAgMCAxIDAgMy41QzAgMS41NyAxLjU3IDAgMy41IDBINXYxaDUuMDYxTDE0IDQuNTU2eiIgaWQ9Im91dGxpbmUiIHN0eWxlPSJkaXNwbGF5OiBub25lOyIvPjxwYXRoIGNsYXNzPSJpY29uLXZzLWJnIiBkPSJNMTMgNXY4cy0uMDM1IDEtMS4wMzUgMWgtOFMzIDE0IDMgMTNWOWgxdjRoOFY2SDkuMzk3bC41MTctLjUyTDkgNC41NzJWM0g3LjQxOUw2LjQxMyAyaDMuMjI4TDEzIDV6IiBpZD0iaWNvbkJnIi8+PHBhdGggY2xhc3M9Imljb24tdnMtZmciIGQ9Ik03LjQxOSAzSDl2MS41NzJMNy40MTkgM3ptMS45NzggM0w2LjQxNiA5SDR2NGg4VjZIOS4zOTd6IiBpZD0iaWNvbkZnIiBzdHlsZT0iZGlzcGxheTogbm9uZTsiLz48cGF0aCBjbGFzcz0iaWNvbi12cy1hY3Rpb24tYmx1ZSIgZD0iTTUuOTg4IDZIMy41YTIuNSAyLjUgMCAxIDEgMC01SDR2MWgtLjVDMi42NzMgMiAyIDIuNjczIDIgMy41UzIuNjczIDUgMy41IDVoMi41MTNMNCAzaDJsMi41IDIuNDg0TDYgOEg0bDEuOTg4LTJ6IiBpZD0iY29sb3JBY3Rpb24iLz48L3N2Zz4="); }\n\n.monaco-editor.vs-dark .suggest-widget .monaco-list .monaco-list-row .icon.snippet,\n.monaco-editor.hc-black .suggest-widget .monaco-list .monaco-list-row .icon.snippet { background-image: url("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTg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dHJhbnNmb3JtPSJtYXRyaXgoMS4zMzMzMzMzLDAsMCwxLjMzMzMzMzMsLTI0NS45OTk5OSwtMzEuOTk5OTk5KSI+CiAgICA8cGF0aAogICAgICAgZD0ibSAxODUsMjQgMTEsMCAwLDEyIC0xMSwwIHoiCiAgICAgICBpZD0icGF0aDQ1MjgiCiAgICAgICBzdHlsZT0iZmlsbDojMmQyZDMwIiAvPgogICAgPHBhdGgKICAgICAgIGQ9Im0gMTk0LDMzIDAsLTcgLTcsMCAwLDcgLTEsMCAwLC04IDksMCAwLDggeiBtIC04LDEgMSwwIDAsMSAtMSwwIHogbSAyLDAgMSwwIDAsMSAtMSwwIHogbSAyLDAgMSwwIDAsMSAtMSwwIHogbSAyLDAgMSwwIDAsMSAtMSwwIHogbSAyLDAgMSwwIDAsMSAtMSwwIHoiCiAgICAgICBpZD0icGF0aDQ1MzAiCiAgICAgICBzdHlsZT0iZmlsbDojYzVjNWM1IiAvPgogICAgPHBhdGgKICAgICAgIGQ9Im0gMTg3LDI2IDcsMCAwLDcgLTcsMCB6IgogICAgICAgaWQ9InBhdGg0NTMyIgogICAgICAgc3R5bGU9ImZpbGw6IzJiMjgyZSIgLz4KICA8L2c+Cjwvc3ZnPgo="); }\n\n.monaco-editor.vs-dark .suggest-widget .monaco-list .monaco-list-row .icon.customcolor,\n.monaco-editor.hc-black .suggest-widget .monaco-list .monaco-list-row .icon.customcolor { background-image: none; }\n\n.monaco-editor.vs-dark .suggest-widget .monaco-list .monaco-list-row .icon.folder,\n.monaco-editor.hc-black .suggest-widget .monaco-list .monaco-list-row .icon.folder { background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+PHN0eWxlIHR5cGU9InRleHQvY3NzIj4uaWNvbi1jYW52YXMtdHJhbnNwYXJlbnR7b3BhY2l0eTowO2ZpbGw6I0Y2RjZGNjt9IC5pY29uLXZzLW91dHtvcGFjaXR5OjA7ZmlsbDojRjZGNkY2O30gLmljb24tdnMtZmd7b3BhY2l0eTowO2ZpbGw6I0YwRUZGMTt9IC5pY29uLWZvbGRlcntmaWxsOiNDNUM1QzU7fTwvc3R5bGU+PHBhdGggY2xhc3M9Imljb24tY2FudmFzLXRyYW5zcGFyZW50IiBkPSJNMTYgMTZoLTE2di0xNmgxNnYxNnoiIGlkPSJjYW52YXMiLz48cGF0aCBjbGFzcz0iaWNvbi12cy1vdXQiIGQ9Ik0xNiAyLjV2MTBjMCAuODI3LS42NzMgMS41LTEuNSAxLjVoLTExLjk5NmMtLjgyNyAwLTEuNS0uNjczLTEuNS0xLjV2LThjMC0uODI3LjY3My0xLjUgMS41LTEuNWgyLjg4NmwxLTJoOC4xMWMuODI3IDAgMS41LjY3MyAxLjUgMS41eiIgaWQ9Im91dGxpbmUiLz48cGF0aCBjbGFzcz0iaWNvbi1mb2xkZXIiIGQ9Ik0xNC41IDJoLTcuNDkybC0xIDJoLTMuNTA0Yy0uMjc3IDAtLjUuMjI0LS41LjV2OGMwIC4yNzYuMjIzLjUuNS41aDExLjk5NmMuMjc1IDAgLjUtLjIyNC41LS41di0xMGMwLS4yNzYtLjIyNS0uNS0uNS0uNXptLS40OTYgMmgtNi40OTZsLjUtMWg1Ljk5NnYxeiIgaWQ9Imljb25CZyIvPjxwYXRoIGNsYXNzPSJpY29uLXZzLWZnIiBkPSJNMTQgM3YxaC02LjVsLjUtMWg2eiIgaWQ9Imljb25GZyIvPjwvc3ZnPg=="); }\n',""])},579:(e,t,n)=>{(e.exports=n(8826)(!1)).push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n.monaco-editor .zone-widget {\n\tposition: absolute;\n\tz-index: 10;\n}\n\n\n.monaco-editor .zone-widget .zone-widget-container {\n\tborder-top-style: solid;\n\tborder-bottom-style: solid;\n\tborder-top-width: 0;\n\tborder-bottom-width: 0;\n\tposition: relative;\n}\n",""])},4900:(e,t,n)=>{(e.exports=n(8826)(!1)).push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .accessibilityHelpWidget {\n\tpadding: 10px;\n\tvertical-align: middle;\n\toverflow: scroll;\n}",""])},5762:(e,t,n)=>{(e.exports=n(8826)(!1)).push([e.id,'/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .iPadShowKeyboard {\n\twidth: 58px;\n\tmin-width: 0;\n\theight: 36px;\n\tmin-height: 0;\n\tmargin: 0;\n\tpadding: 0;\n\tposition: absolute;\n\tresize: none;\n\toverflow: hidden;\n\tbackground: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI1OCIgaGVpZ2h0PSIzNiI+PHBhdGggZmlsbD0iI0YwRUZGMSIgZD0iTTU0IDMydi0yOGgtNTB2MjhoNTB6bS0xNi0yaC0xOHYtNmgxOHY2em02IDBoLTR2LTZoNHY2em04IDBoLTZ2LTZoNnY2em0tNC0yNGg0djRoLTR2LTR6bTAgNmg0djRoLTR2LTR6bTAgNmg0djRoLTR2LTR6bS02LTEyaDR2NGgtNHYtNHptMCA2aDR2NGgtNHYtNHptMCA2aDR2NGgtNHYtNHptLTYtMTJoNHY0aC00di00em0wIDZoNHY0aC00di00em0wIDZoNHY0aC00di00em0tNi0xMmg0djRoLTR2LTR6bTAgNmg0djRoLTR2LTR6bTAgNmg0djRoLTR2LTR6bS02LTEyaDR2NGgtNHYtNHptMCA2aDR2NGgtNHYtNHptMCA2aDR2NGgtNHYtNHptLTYtMTJoNHY0aC00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IiBoZWlnaHQ9IjQiLz48cmVjdCB4PSIyNCIgeT0iMTgiIGZpbGw9IiNDNUM1QzUiIHdpZHRoPSI0IiBoZWlnaHQ9IjQiLz48cmVjdCB4PSIzMCIgeT0iMTgiIGZpbGw9IiNDNUM1QzUiIHdpZHRoPSI0IiBoZWlnaHQ9IjQiLz48cmVjdCB4PSIzNiIgeT0iMTgiIGZpbGw9IiNDNUM1QzUiIHdpZHRoPSI0IiBoZWlnaHQ9IjQiLz48cmVjdCB4PSI0MiIgeT0iMTgiIGZpbGw9IiNDNUM1QzUiIHdpZHRoPSI0IiBoZWlnaHQ9IjQiLz48cmVjdCB4PSI0OCIgeT0iMTgiIGZpbGw9IiNDNUM1QzUiIHdpZHRoPSI0IiBoZWlnaHQ9IjQiLz48cmVjdCB4PSI2IiB5PSIyNCIgZmlsbD0iI0M1QzVDNSIgd2lkdGg9IjYiIGhlaWdodD0iNiIvPjxyZWN0IHg9IjQ2IiB5PSIyNCIgZmlsbD0iI0M1QzVDNSIgd2lkdGg9IjYiIGhlaWdodD0iNiIvPjxyZWN0IHg9IjIwIiB5PSIyNCIgZmlsbD0iI0M1QzVDNSIgd2lkdGg9IjE4IiBoZWlnaHQ9IjYiLz48cmVjdCB4PSIxNCIgeT0iMjQiIGZpbGw9IiNDNUM1QzUiIHdpZHRoPSI0IiBoZWlnaHQ9IjYiLz48cmVjdCB4PSI0MCIgeT0iMjQiIGZpbGw9IiNDNUM1QzUiIHdpZHRoPSI0IiBoZWlnaHQ9IjYiLz48L3N2Zz4=") center center no-repeat;\n\tborder: 4px solid #252526;\n}',""])},9528:(e,t,n)=>{(e.exports=n(8826)(!1)).push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .tokens-inspect-widget {\n\tz-index: 50;\n\t-webkit-user-select: text;\n\t-ms-user-select: text;\n\t-khtml-user-select: text;\n\t-moz-user-select: text;\n\t-o-user-select: text;\n\tuser-select: text;\n\tpadding: 10px;\n}\n\n.tokens-inspect-separator {\n\theight: 1px;\n\tborder: 0;\n}\n\n.monaco-editor .tokens-inspect-widget .tm-token {\n\tfont-family: monospace;\n}\n\n.monaco-editor .tokens-inspect-widget .tm-token-length {\n\tfont-weight: normal;\n\tfont-size: 60%;\n\tfloat: right;\n}\n\n.monaco-editor .tokens-inspect-widget .tm-metadata-table {\n\twidth: 100%;\n}\n\n.monaco-editor .tokens-inspect-widget .tm-metadata-value {\n\tfont-family: monospace;\n\ttext-align: right;\n}\n\n.monaco-editor .tokens-inspect-widget .tm-token-type {\n\tfont-family: monospace;\n}\n",""])},6394:(e,t,n)=>{(e.exports=n(8826)(!1)).push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-quick-open-widget {\n\tfont-size: 13px;\n}",""])},4576:(e,t,n)=>{(e.exports=n(8826)(!1)).push([e.id,'/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-quick-open-widget {\n\tfont-size: 13px;\n}\n\n.monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon,\n.vs-dark .monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon {\n\tbackground-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIzMDAiIGhlaWdodD0iNDAiPjxwYXRoIGQ9Ik0yODguNDgzIDMzYy0uNzcyIDAtMS40OTctLjEyMy0yLjE1My0uMzY1LS42NzgtLjI1My0xLjI3LS42MTctMS43Ni0xLjA4NC0uNS0uNDc1LS44OTItMS4wNDktMS4xNjMtM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Lz48L3N2Zz4=");\n\tbackground-repeat: no-repeat;\n}\n\n.monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.method,\n.monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.function,\n.monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.constructor\t\t{ background-position: 0 -4px; }\n.monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.field,\n.monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.variable \t\t\t{ background-position: -22px -4px; }\n.monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.class \t\t\t\t{ background-position: -43px -3px; }\n.monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.interface \t\t\t{ background-position: -63px -4px; }\n.monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.module \t\t\t{ background-position: -82px -4px; }\n.monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.property \t\t\t{ background-position: -102px -3px; }\n.monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.enum\t\t \t\t{ background-position: -122px -3px; }\n.monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.rule\t\t \t\t{ background-position: -242px -4px; }\n.monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.file\t\t \t\t{ background-position: -262px -4px; }\n\n.vs-dark .monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.method,\n.vs-dark .monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.function,\n.vs-dark .monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.constructor \t{ background-position: 0 -24px; }\n.vs-dark .monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.field,\n.vs-dark .monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.variable \t\t{ background-position: -22px -24px; }\n.vs-dark .monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.class \t\t{ background-position: -43px -23px; }\n.vs-dark .monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.interface \t{ background-position: -63px -24px; }\n.vs-dark .monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.module \t\t{ background-position: -82px -24px; }\n.vs-dark .monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.property \t\t{ background-position: -102px -23px; }\n.vs-dark .monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.enum\t\t \t{ background-position: -122px -23px; }\n.vs-dark .monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.rule\t\t \t{ background-position: -242px -24px; }\n.vs-dark .monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.file\t\t \t{ background-position: -262px -24px; }\n\n.hc-black .monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon {\n\tbackground: none;\n\tdisplay: inline;\n}\n\n.hc-black .monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon:before {\n\theight: 16px;\n\twidth: 16px;\n\tdisplay: inline-block;\n}\n\n.hc-black .monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.method:before,\n.hc-black .monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.function:before,\n.hc-black .monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.constructor:before {\n\tcontent: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+PHBhdGggZmlsbD0iI0IxODBENyIgZD0iTTUuNSAzbC00LjUgMi44NTd2NC4yODVsNC41IDIuODU4IDQuNS0yLjg1N3YtNC4yODZsLTQuNS0yLjg1N3ptLS41IDguNDk4bC0zLTEuOTA1di0yLjgxNmwzIDEuOTA1djIuODE2em0tMi4zNTgtNS40OThsMi44NTgtMS44MTUgMi44NTggMS44MTUtMi44NTggMS44MTUtMi44NTgtMS44MTV6bTYuMzU4IDMuNTkzbC0zIDEuOTA1di0yLjgxNWwzLTEuOTA1djIuODE1eiIvPjwvc3ZnPg==);\n\tmargin-left: 2px;\n}\n\n.hc-black .monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.field:before,\n.hc-black .monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.variable:before {\n\tcontent: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+PHBhdGggZmlsbD0iIzc1QkVGRiIgZD0iTTEgNnY0bDQgMiA2LTN2LTRsLTQtMi02IDN6bTQgMWwtMi0xIDQtMiAyIDEtNCAyeiIvPjwvc3ZnPg==);\n\tmargin-left: 2px;\n}\n\n.hc-black .monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.class:before {\n\tcontent: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+PHBvbHlnb24gZmlsbD0iI0U4QUI1MyIgcG9pbnRzPSIxMS45OTgsMTEuMDAyIDksMTEgOSw3IDExLDcgMTAsOCAxMiwxMCAxNSw3IDEzLDUgMTIsNiA3LDYgOSw0IDYsMSAxLDYgNCw5IDYsNyA4LDcgOCwxMiAxMSwxMiAxMCwxMyAxMiwxNSAxNSwxMiAxMywxMCIvPjwvc3ZnPg==);\n}\n\n.hc-black .monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.interface:before {\n\tcontent: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+PHBhdGggZmlsbD0iIzc1QkVGRiIgZD0iTTExLjUgNGMtMS43NTkgMC0zLjIwNCAxLjMwOC0zLjQ0OSAzaC0zLjEyMmMtLjIyMy0uODYxLS45OTgtMS41LTEuOTI5LTEuNS0xLjEwNCAwLTIgLjg5NS0yIDIgMCAxLjEwNC44OTYgMiAyIDIgLjkzMSAwIDEuNzA2LS42MzkgMS45MjktMS41aDMuMTIyYy4yNDUgMS42OTEgMS42OSAzIDMuNDQ5IDMgMS45MyAwIDMuNS0xLjU3IDMuNS0zLjUgMC0xLjkzMS0xLjU3LTMuNS0zLjUtMy41em0wIDVjLS44MjcgMC0xLjUtLjY3NC0xLjUtMS41IDAtLjgyOC42NzMtMS41IDEuNS0xLjVzMS41LjY3MiAxLjUgMS41YzAgLjgyNi0uNjczIDEuNS0xLjUgMS41eiIvPjwvc3ZnPg==);\n}\n\n.hc-black .monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.module:before {\n\tcontent: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+PHBhdGggZmlsbD0iI0M1QzVDNSIgZD0iTTkgMTF2LTFjMC0uODM0LjQ5Ni0xLjczOCAxLTItLjUwNC0uMjctMS0xLjE2OC0xLTJ2LTFjMC0uODQtLjU4NC0xLTEtMXYtMWMyLjA4MyAwIDIgMS4xNjYgMiAydjFjMCAuOTY5LjcwMy45OCAxIDF2MmMtLjMyMi4wMi0xIC4wNTMtMSAxdjFjMCAuODM0LjA4MyAyLTIgMnYtMWMuODMzIDAgMS0xIDEtMXptLTYgMHYtMWMwLS44MzQtLjQ5Ni0xLjczOC0xLTIgLjUwNC0uMjcgMS0xLjE2OCAxLTJ2LTFjMC0uODQuNTg0LTEgMS0xdi0xYy0yLjA4MyAwLTIgMS4xNjYtMiAydjFjMCAuOTY5LS43MDMuOTgtMSAxdjJjLjMyMi4wMiAxIC4wNTMgMSAxdjFjMCAuODM0LS4wODMgMiAyIDJ2LTFjLS44MzMgMC0xLTEtMS0xeiIvPjwvc3ZnPg==);\n\tmargin-left: 2px;\n}\n\n.hc-black .monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.property:before\t{\n\tcontent: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+PHBhdGggZmlsbD0iI0M1QzVDNSIgZD0iTTEyLjA5IDQuMzU5bC0yLjY0MSAyLjY0MS0yLTIgMi42NDEtMi42NDFjLS41MDItLjIyNi0xLjA1NS0uMzU5LTEuNjQxLS4zNTktMi4yMDkgMC00IDEuNzkxLTQgNCAwIC41ODYuMTMzIDEuMTM5LjM1OSAxLjY0bC0zLjM1OSAzLjM2cy0xIDEgMCAyaDJsMy4zNTktMy4zNmMuNTAzLjIyNiAxLjA1NS4zNiAxLjY0MS4zNiAyLjIwOSAwIDQtMS43OTEgNC00IDAtLjU4Ni0uMTMzLTEuMTM5LS4zNTktMS42NDF6Ii8+PC9zdmc+);\n\tmargin-left: 1px;\n}\n\n.hc-black .monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.value:before,\n.hc-black .monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.enum:before\t{\n\tcontent: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+PGcgZmlsbD0iIzc1QkVGRiI+PHBhdGggZD0iTTEyIDNoLTRsLTEgMXYyaDV2MWgtMnYxaDJsMS0xdi0zbC0xLTF6bTAgMmgtNHYtMWg0djF6TTMgMTJoNnYtNWgtNnY1em0xLTNoNHYxaC00di0xeiIvPjwvZz48L3N2Zz4=);\n}\n\n.hc-black .monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.rule:before {\n\tcontent: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMiIgaGVpZ2h0PSIxMiI+PHBhdGggZmlsbD0iI0M1QzVDNSIgZD0iTTEwIDVoLTh2LTJoOHYyem0wIDFoLTZ2MWg2di0xem0wIDJoLTZ2MWg2di0xeiIvPjwvc3ZnPg==);\n}\n\n.hc-black .monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.file:before {\n\tcontent: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+PHBhdGggZmlsbD0iI0M1QzVDNSIgZD0iTTkuNjc2IDJoLTYuNjc2djEyaDEwdi05bC0zLjMyNC0zem0yLjMyNCAxMWgtOHYtMTBoNXYzaDN2N3oiLz48L3N2Zz4=);\n}',""])},1129:(e,t,n)=>{(e.exports=n(8826)(!1)).push([e.id,'/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n\n/* Default standalone editor font */\n.monaco-editor {\n\tfont-family: -apple-system, BlinkMacSystemFont, "Segoe WPC", "Segoe UI", "HelveticaNeue-Light", "Ubuntu", "Droid Sans", sans-serif;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item .action-menu-item:focus .action-label {\n\tcolor: #0059AC;\n\tstroke-width: 1.2px;\n\ttext-shadow: 0px 0px 0.15px #0059AC;\n}\n\n.monaco-editor.vs-dark .monaco-menu .monaco-action-bar.vertical .action-menu-item:focus .action-label,\n.monaco-editor.hc-black .monaco-menu .monaco-action-bar.vertical .action-menu-item:focus .action-label {\n\tcolor: #ACDDFF;\n\tstroke-width: 1.2px;\n\ttext-shadow: 0px 0px 0.15px #ACDDFF;\n}\n\n.monaco-editor-hover p {\n\tmargin: 0;\n}\n\n/* The hc-black theme is already high contrast optimized */\n.monaco-editor.hc-black {\n\t-ms-high-contrast-adjust: none;\n}\n/* In case the browser goes into high contrast mode and the editor is not configured with the hc-black theme */\n@media screen and (-ms-high-contrast:active) {\n\n\t/* current line highlight */\n\t.monaco-editor.vs .view-overlays .current-line,\n\t.monaco-editor.vs-dark .view-overlays .current-line {\n\t\tborder-color: windowtext !important;\n\t\tborder-left: 0;\n\t\tborder-right: 0;\n\t}\n\n\t/* view cursors */\n\t.monaco-editor.vs .cursor,\n\t.monaco-editor.vs-dark .cursor {\n\t\tbackground-color: windowtext !important;\n\t}\n\t/* dnd target */\n\t.monaco-editor.vs .dnd-target,\n\t.monaco-editor.vs-dark .dnd-target {\n\t\tborder-color: windowtext !important;\n\t}\n\n\t/* selected text background */\n\t.monaco-editor.vs .selected-text,\n\t.monaco-editor.vs-dark .selected-text {\n\t\tbackground-color: highlight !important;\n\t}\n\n\t/* allow the text to have a transparent background. */\n\t.monaco-editor.vs .view-line,\n\t.monaco-editor.vs-dark .view-line {\n\t\t-ms-high-contrast-adjust: none;\n\t}\n\n\t/* text color */\n\t.monaco-editor.vs .view-line span,\n\t.monaco-editor.vs-dark .view-line span {\n\t\tcolor: windowtext !important;\n\t}\n\t/* selected text color */\n\t.monaco-editor.vs .view-line span.inline-selected-text,\n\t.monaco-editor.vs-dark .view-line span.inline-selected-text {\n\t\tcolor: highlighttext !important;\n\t}\n\n\t/* allow decorations */\n\t.monaco-editor.vs .view-overlays,\n\t.monaco-editor.vs-dark .view-overlays {\n\t\t-ms-high-contrast-adjust: none;\n\t}\n\n\t/* various decorations */\n\t.monaco-editor.vs .selectionHighlight,\n\t.monaco-editor.vs-dark .selectionHighlight,\n\t.monaco-editor.vs .wordHighlight,\n\t.monaco-editor.vs-dark .wordHighlight,\n\t.monaco-editor.vs .wordHighlightStrong,\n\t.monaco-editor.vs-dark .wordHighlightStrong,\n\t.monaco-editor.vs .reference-decoration,\n\t.monaco-editor.vs-dark .reference-decoration {\n\t\tborder: 2px dotted highlight !important;\n\t\tbackground: transparent !important;\n\t\tbox-sizing: border-box;\n\t}\n\t.monaco-editor.vs .rangeHighlight,\n\t.monaco-editor.vs-dark .rangeHighlight {\n\t\tbackground: transparent !important;\n\t\tborder: 1px dotted activeborder !important;\n\t\tbox-sizing: border-box;\n\t}\n\t.monaco-editor.vs .bracket-match,\n\t.monaco-editor.vs-dark .bracket-match {\n\t\tborder-color: windowtext !important;\n\t\tbackground: transparent !important;\n\t}\n\n\t/* find widget */\n\t.monaco-editor.vs .findMatch,\n\t.monaco-editor.vs-dark .findMatch,\n\t.monaco-editor.vs .currentFindMatch,\n\t.monaco-editor.vs-dark .currentFindMatch {\n\t\tborder: 2px dotted activeborder !important;\n\t\tbackground: transparent !important;\n\t\tbox-sizing: border-box;\n\t}\n\t.monaco-editor.vs .find-widget,\n\t.monaco-editor.vs-dark .find-widget {\n\t\tborder: 1px solid windowtext;\n\t}\n\n\t/* list - used by suggest widget */\n\t.monaco-editor.vs .monaco-list .monaco-list-row,\n\t.monaco-editor.vs-dark .monaco-list .monaco-list-row {\n\t\t-ms-high-contrast-adjust: none;\n\t\tcolor: windowtext !important;\n\t}\n\t.monaco-editor.vs .monaco-list .monaco-list-row.focused,\n\t.monaco-editor.vs-dark .monaco-list .monaco-list-row.focused {\n\t\tcolor: highlighttext !important;\n\t\tbackground-color: highlight !important;\n\t}\n\t.monaco-editor.vs .monaco-list .monaco-list-row:hover,\n\t.monaco-editor.vs-dark .monaco-list .monaco-list-row:hover {\n\t\tbackground: transparent !important;\n\t\tborder: 1px solid highlight;\n\t\tbox-sizing: border-box;\n\t}\n\n\t/* tree */\n\t.monaco-editor.vs .monaco-tree .monaco-tree-row,\n\t.monaco-editor.vs-dark .monaco-tree .monaco-tree-row {\n\t\t-ms-high-contrast-adjust: none;\n\t\tcolor: windowtext !important;\n\t}\n\t.monaco-editor.vs .monaco-tree .monaco-tree-row.selected,\n\t.monaco-editor.vs-dark .monaco-tree .monaco-tree-row.selected,\n\t.monaco-editor.vs .monaco-tree .monaco-tree-row.focused,\n\t.monaco-editor.vs-dark .monaco-tree .monaco-tree-row.focused {\n\t\tcolor: highlighttext !important;\n\t\tbackground-color: highlight !important;\n\t}\n\t.monaco-editor.vs .monaco-tree .monaco-tree-row:hover,\n\t.monaco-editor.vs-dark .monaco-tree .monaco-tree-row:hover {\n\t\tbackground: transparent !important;\n\t\tborder: 1px solid highlight;\n\t\tbox-sizing: border-box;\n\t}\n\n\t/* scrollbars */\n\t.monaco-editor.vs .monaco-scrollable-element > .scrollbar,\n\t.monaco-editor.vs-dark .monaco-scrollable-element > .scrollbar {\n\t\t-ms-high-contrast-adjust: none;\n\t\tbackground: background !important;\n\t\tborder: 1px solid windowtext;\n\t\tbox-sizing: border-box;\n\t}\n\t.monaco-editor.vs .monaco-scrollable-element > .scrollbar > .slider,\n\t.monaco-editor.vs-dark .monaco-scrollable-element > .scrollbar > .slider {\n\t\tbackground: windowtext !important;\n\t}\n\t.monaco-editor.vs .monaco-scrollable-element > .scrollbar > .slider:hover,\n\t.monaco-editor.vs-dark .monaco-scrollable-element > .scrollbar > .slider:hover {\n\t\tbackground: highlight !important;\n\t}\n\t.monaco-editor.vs .monaco-scrollable-element > .scrollbar > .slider.active,\n\t.monaco-editor.vs-dark .monaco-scrollable-element > .scrollbar > .slider.active {\n\t\tbackground: highlight !important;\n\t}\n\n\t/* overview ruler */\n\t.monaco-editor.vs .decorationsOverviewRuler,\n\t.monaco-editor.vs-dark .decorationsOverviewRuler {\n\t\topacity: 0;\n\t}\n\n\t/* minimap */\n\t.monaco-editor.vs .minimap,\n\t.monaco-editor.vs-dark .minimap {\n\t\tdisplay: none;\n\t}\n\n\t/* squiggles */\n\t.monaco-editor.vs .squiggly-d-error,\n\t.monaco-editor.vs-dark .squiggly-d-error {\n\t\tbackground: transparent !important;\n\t\tborder-bottom: 4px double #E47777;\n\t}\n\t.monaco-editor.vs .squiggly-c-warning,\n\t.monaco-editor.vs-dark .squiggly-c-warning {\n\t\tborder-bottom: 4px double #71B771;\n\t}\n\t.monaco-editor.vs .squiggly-b-info,\n\t.monaco-editor.vs-dark .squiggly-b-info {\n\t\tborder-bottom: 4px double #71B771;\n\t}\n\t.monaco-editor.vs .squiggly-a-hint,\n\t.monaco-editor.vs-dark .squiggly-a-hint {\n\t\tborder-bottom: 4px double #6c6c6c;\n\t}\n\n\t/* contextmenu */\n\t.monaco-editor.vs .monaco-menu .monaco-action-bar.vertical .action-menu-item:focus .action-label,\n\t.monaco-editor.vs-dark .monaco-menu .monaco-action-bar.vertical .action-menu-item:focus .action-label {\n\t\t-ms-high-contrast-adjust: none;\n\t\tcolor: highlighttext !important;\n\t\tbackground-color: highlight !important;\n\t}\n\t.monaco-editor.vs .monaco-menu .monaco-action-bar.vertical .action-menu-item:hover .action-label,\n\t.monaco-editor.vs-dark .monaco-menu .monaco-action-bar.vertical .action-menu-item:hover .action-label {\n\t\t-ms-high-contrast-adjust: none;\n\t\tbackground: transparent !important;\n\t\tborder: 1px solid highlight;\n\t\tbox-sizing: border-box;\n\t}\n\n\t/* diff editor */\n\t.monaco-diff-editor.vs .diffOverviewRuler,\n\t.monaco-diff-editor.vs-dark .diffOverviewRuler {\n\t\tdisplay: none;\n\t}\n\t.monaco-editor.vs .line-insert,\n\t.monaco-editor.vs-dark .line-insert,\n\t.monaco-editor.vs .line-delete,\n\t.monaco-editor.vs-dark .line-delete {\n\t\tbackground: transparent !important;\n\t\tborder: 1px solid highlight !important;\n\t\tbox-sizing: border-box;\n\t}\n\t.monaco-editor.vs .char-insert,\n\t.monaco-editor.vs-dark .char-insert,\n\t.monaco-editor.vs .char-delete,\n\t.monaco-editor.vs-dark .char-delete {\n\t\tbackground: transparent !important;\n\t}\n}\n\n/*.monaco-editor.vs [tabindex="0"]:focus {\n\toutline: 1px solid rgba(0, 122, 204, 0.4);\n\toutline-offset: -1px;\n\topacity: 1 !important;\n}\n\n.monaco-editor.vs-dark [tabindex="0"]:focus {\n\toutline: 1px solid rgba(14, 99, 156, 0.6);\n\toutline-offset: -1px;\n\topacity: 1 !important;\n}*/\n',""])},2368:(e,t,n)=>{(e.exports=n(8826)(!1)).push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.context-view .monaco-menu {\n\tmin-width: 130px;\n}\n",""])},4081:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(o,r){function s(e){try{u(i.next(e))}catch(e){r(e)}}function a(e){try{u(i.throw(e))}catch(e){r(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}u((i=i.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,i,o,r,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return r={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function a(r){return function(a){return function(r){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,i&&(o=2&r[0]?i.return:r[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,r[1])).done)return o;switch(i=0,o&&(r=[2&r[0],o.value]),r[0]){case 0:case 1:o=r;break;case 4:return s.label++,{value:r[1],done:!1};case 5:s.label++,i=r[1],r=[0];continue;case 7:r=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==r[0]&&2!==r[0])){s=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1] e\n puts e.to_s\n end\n "}!function(){i(this,void 0,void 0,(function(){var e,t;return o(this,(function(n){switch(n.label){case 0:return[4,fetch("./ruby-web.wasm")];case 1:return e=n.sent(),console.log(e),[4,WebAssembly.compileStreaming(e)];case 2:return t=n.sent(),console.log(t),[4,d.DefaultRubyVM(t)];case 3:return _=n.sent().vm,console.log(_),[2]}}))}))}(),v.onDidChangeModelContent((function(e){var t=v.getValue();window.location.hash="#"+encodeURIComponent(t).replace(/\(/g,"%28").replace(/\)/g,"%29"),h.typecheck(t,new URLSearchParams(window.location.search).getAll("arg"));var n=w(t);console.log("evaluation",n),document.getElementById("rubyoutput").innerText="",_.eval(w(t))}));var M=v.getValue();h.typecheck(M,new URLSearchParams(window.location.search).getAll("arg"));var C=w(M);console.log("evaluation",C),_&&_.eval(C),s.MonacoServices.install(v);var S="ws://sorbet.run:8080",L=new r.Server(S),I=null,N=null;L.on("connection",(function(e){N=e;var t=I.addFunction((function(e){var t=I.Pointer_stringify(e);console.log("Write: "+t),N.send(t)}),"vi");N.on("message",(function(e){console.log("Read: "+e),I.ccall("lsp",null,["number","string"],[t,e])}))})),function e(){return i(this,void 0,void 0,(function(){var t,n,i;return o(this,(function(o){switch(o.label){case 0:return t=!1,n=function(e){return console.log(e)},i=function(n){console.log({event:n}),t||(t=!0,N&&(N.close(),N=null),I=null,e())},[4,l.createSorbet(n,i)];case 1:return I=o.sent().sorbet,function(){console.log("Starting language server.");var e=new r.WebSocket(S);u.listen({webSocket:e,onConnection:function(e){var t=function(e){return new s.MonacoLanguageClient({name:"Sample Language Client",clientOptions:{documentSelector:["ruby"]},connectionProvider:{get:function(t,n){return Promise.resolve(s.createConnection(e,t,n))}}})}(e),n=t.start();e.onClose((function(){n.dispose()}))}})}(),[2]}}))}))}()},8555:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(o,r){function s(e){try{u(i.next(e))}catch(e){r(e)}}function a(e){try{u(i.throw(e))}catch(e){r(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}u((i=i.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,i,o,r,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return r={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function a(r){return function(a){return function(r){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,i&&(o=2&r[0]?i.return:r[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,r[1])).done)return o;switch(i=0,o&&(r=[2&r[0],o.value]),r[0]){case 0:case 1:o=r;break;case 4:return s.label++,{value:r[1],done:!1};case 5:s.label++,i=r[1],r=[0];continue;case 7:r=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==r[0]&&2!==r[0])){s=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]{"use strict";document.getElementById("menu").addEventListener("click",(function(e){e.target.classList.toggle("is-showing")}))},4494:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.register=void 0;var n={comments:{lineComment:"#",blockComment:["=begin","=end"]},brackets:[["(",")"],["{","}"],["[","]"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],indentationRules:{increaseIndentPattern:new RegExp("^\\s*((begin|class|(private|protected)\\s+def|def|else|elsif|ensure|for|if|module|rescue|unless|until|when|while|case)|([^#]*\\sdo\\b)|([^#]*=\\s*(case|if|unless)))\\b([^#\\{;]|(\"|'|/).*\\4)*(#.*)?$"),decreaseIndentPattern:new RegExp("^\\s*([}\\]]([,)]?\\s*(#|$)|\\.[a-zA-Z_]\\w*\\b)|(end|rescue|ensure|else|elsif|when)\\b)")}},i={tokenPostfix:".ruby",keywords:["__LINE__","__ENCODING__","__FILE__","BEGIN","END","alias","and","begin","break","case","class","def","defined?","do","else","elsif","end","ensure","for","false","if","in","module","next","nil","not","or","redo","rescue","retry","return","self","super","then","true","undef","unless","until","when","while","yield"],keywordops:["::","..","...","?",":","=>"],builtins:["require","public","private","include","extend","attr_reader","protected","private_class_method","protected_class_method","new"],declarations:["module","class","def","case","do","begin","for","if","while","until","unless"],linedecls:["def","case","do","begin","for","if","while","until","unless"],operators:["^","&","|","<=>","==","===","!~","=~",">",">=","<","<=","<<",">>","+","-","*","/","%","**","~","+@","-@","[]","[]=","`","+=","-=","*=","**=","/=","^=","%=","<<=",">>=","&=","&&=","||=","|="],brackets:[{open:"(",close:")",token:"delimiter.parenthesis"},{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"}],symbols:/[=>"}],[/%([qws])(@delim)/,{token:"string.$1.delim",switchTo:"@qstring.$1.$2.$2"}],[/%r\(/,{token:"regexp.delim",switchTo:"@pregexp.(.)"}],[/%r\[/,{token:"regexp.delim",switchTo:"@pregexp.[.]"}],[/%r\{/,{token:"regexp.delim",switchTo:"@pregexp.{.}"}],[/%r"}],[/%r(@delim)/,{token:"regexp.delim",switchTo:"@pregexp.$1.$1"}],[/%(x|W|Q?)\(/,{token:"string.$1.delim",switchTo:"@qqstring.$1.(.)"}],[/%(x|W|Q?)\[/,{token:"string.$1.delim",switchTo:"@qqstring.$1.[.]"}],[/%(x|W|Q?)\{/,{token:"string.$1.delim",switchTo:"@qqstring.$1.{.}"}],[/%(x|W|Q?)"}],[/%(x|W|Q?)(@delim)/,{token:"string.$1.delim",switchTo:"@qqstring.$1.$2.$2"}],[/%([rqwsxW]|Q?)./,{token:"invalid",next:"@pop"}],[/./,{token:"invalid",next:"@pop"}]],qstring:[[/\\$/,"string.$S2.escape"],[/\\./,"string.$S2.escape"],[/./,{cases:{"$#==$S4":{token:"string.$S2.delim",next:"@pop"},"$#==$S3":{token:"string.$S2.delim",next:"@push"},"@default":"string.$S2"}}]],qqstring:[[/#/,"string.$S2.escape","@interpolated"],{include:"@qstring"}],whitespace:[[/[ \t\r\n]+/,""],[/^\s*=begin\b/,"comment","@comment"],[/#.*$/,"comment"]],comment:[[/[^=]+/,"comment"],[/^\s*=begin\b/,"comment.invalid"],[/^\s*=end\b.*/,"comment","@pop"],[/[=]/,"comment"]]}};t.register=function(){monaco.languages.register({id:"ruby",extensions:[".rb",".rbi"],aliases:["Ruby","rb","sorbet","srb"],mimetypes:["text/plain"]}),monaco.languages.setMonarchTokensProvider("ruby",i),monaco.languages.setLanguageConfiguration("ruby",n)}},14:function(e,t){"use strict";var n=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(o,r){function s(e){try{u(i.next(e))}catch(e){r(e)}}function a(e){try{u(i.throw(e))}catch(e){r(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}u((i=i.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,i,o,r,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return r={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function a(r){return function(a){return function(r){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,i&&(o=2&r[0]?i.return:r[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,r[1])).done)return o;switch(i=0,o&&(r=[2&r[0],o.value]),r[0]){case 0:case 1:o=r;break;case 4:return s.label++,{value:r[1],done:!1};case 5:s.label++,i=r[1],r=[0];continue;case 7:r=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==r[0]&&2!==r[0])){s=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]"']/gm,(function(e){return"&"===e?"&":"<"===e?"<":">"===e?">":'"'===e?""":"'"===e?"'":void 0}))},e.prototype.append_buffer=function(e){var t=this._buffer+e;this._buffer=t},e.prototype.get_next_packet=function(){var e={kind:t.EOS,text:"",url:""},i=this._buffer.length;if(0==i)return e;var r=this._buffer.indexOf("");if(-1==r)return e.kind=t.Text,e.text=this._buffer,this._buffer="",e;if(r>0)return e.kind=t.Text,e.text=this._buffer.slice(0,r),this._buffer=this._buffer.slice(r),e;if(0==r){if(1==i)return e.kind=t.Incomplete,e;var s=this._buffer.charAt(1);if("["!=s&&"]"!=s)return e.kind=t.ESC,e.text=this._buffer.slice(0,1),this._buffer=this._buffer.slice(1),e;if("["==s){if(this._csi_regex||(this._csi_regex=o(n(["\n ^ # beginning of line\n #\n # First attempt\n (?: # legal sequence\n [ # CSI\n ([<-?]?) # private-mode char\n ([d;]*) # any digits or semicolons\n ([ -/]? # an intermediate modifier\n [@-~]) # the command\n )\n | # alternate (second attempt)\n (?: # illegal sequence\n [ # CSI\n [ -~]* # anything legal\n ([\0-:]) # anything illegal\n )\n "],["\n ^ # beginning of line\n #\n # First attempt\n (?: # legal sequence\n \\x1b\\[ # CSI\n ([\\x3c-\\x3f]?) # private-mode char\n ([\\d;]*) # any digits or semicolons\n ([\\x20-\\x2f]? # an intermediate modifier\n [\\x40-\\x7e]) # the command\n )\n | # alternate (second attempt)\n (?: # illegal sequence\n \\x1b\\[ # CSI\n [\\x20-\\x7e]* # anything legal\n ([\\x00-\\x1f:]) # anything illegal\n )\n "]))),null===(l=this._buffer.match(this._csi_regex)))return e.kind=t.Incomplete,e;if(l[4])return e.kind=t.ESC,e.text=this._buffer.slice(0,1),this._buffer=this._buffer.slice(1),e;""!=l[1]||"m"!=l[3]?e.kind=t.Unknown:e.kind=t.SGR,e.text=l[2];var a=l[0].length;return this._buffer=this._buffer.slice(a),e}if("]"==s){if(i<4)return e.kind=t.Incomplete,e;if("8"!=this._buffer.charAt(2)||";"!=this._buffer.charAt(3))return e.kind=t.ESC,e.text=this._buffer.slice(0,1),this._buffer=this._buffer.slice(1),e;this._osc_st||(this._osc_st=function(e){for(var t=[],n=1;n0;){var n=t.shift(),i=parseInt(n,10);if(isNaN(i)||0===i)this.fg=this.bg=null,this.bold=!1;else if(1===i)this.bold=!0;else if(22===i)this.bold=!1;else if(39===i)this.fg=null;else if(49===i)this.bg=null;else if(i>=30&&i<38)this.fg=this.ansi_colors[0][i-30];else if(i>=40&&i<48)this.bg=this.ansi_colors[0][i-40];else if(i>=90&&i<98)this.fg=this.ansi_colors[1][i-90];else if(i>=100&&i<108)this.bg=this.ansi_colors[1][i-100];else if((38===i||48===i)&&t.length>0){var o=38===i,r=t.shift();if("5"===r&&t.length>0){var s=parseInt(t.shift(),10);s>=0&&s<=255&&(o?this.fg=this.palette_256[s]:this.bg=this.palette_256[s])}if("2"===r&&t.length>2){var a=parseInt(t.shift(),10),u=parseInt(t.shift(),10),l=parseInt(t.shift(),10);if(a>=0&&a<=255&&u>=0&&u<=255&&l>=0&&l<=255){var c={rgb:[a,u,l],class_name:"truecolor"};o?this.fg=c:this.bg=c}}}}},e.prototype.transform_to_html=function(e){var t=e.text;if(0===t.length)return t;if(t=this.escape_txt_for_html(t),!e.bold&&null===e.fg&&null===e.bg)return t;var n=[],i=[],o=e.fg,r=e.bg;e.bold&&n.push("font-weight:bold"),this._use_classes?(o&&("truecolor"!==o.class_name?i.push(o.class_name+"-fg"):n.push("color:rgb("+o.rgb.join(",")+")")),r&&("truecolor"!==r.class_name?i.push(r.class_name+"-bg"):n.push("background-color:rgb("+r.rgb.join(",")+")"))):(o&&n.push("color:rgb("+o.rgb.join(",")+")"),r&&n.push("background-color:rgb("+r.rgb+")"));var s="",a="";return i.length&&(s=' class="'+i.join(" ")+'"'),n.length&&(a=' style="'+n.join(";")+'"'),""+t+""},e.prototype.process_hyperlink=function(e){var t=e.url.split(":");return t.length<1?"":this._url_whitelist[t[0]]?''+this.escape_txt_for_html(e.text)+"":""},e}();function o(e){for(var t=[],n=1;n{var i=t;i.bignum=n(1683),i.define=n(4498).define,i.base=n(5370),i.constants=n(4940),i.decoders=n(4790),i.encoders=n(8202)},4498:(e,t,n)=>{var i=n(3529),o=n(9385);function r(e,t){this.name=e,this.body=t,this.decoders={},this.encoders={}}t.define=function(e,t){return new r(e,t)},r.prototype._createNamed=function(e){var t;try{t=n(7190).runInThisContext("(function "+this.name+"(entity) {\n this._initNamed(entity);\n})")}catch(e){t=function(e){this._initNamed(e)}}return o(t,e),t.prototype._initNamed=function(t){e.call(this,t)},new t(this)},r.prototype._getDecoder=function(e){return e=e||"der",this.decoders.hasOwnProperty(e)||(this.decoders[e]=this._createNamed(i.decoders[e])),this.decoders[e]},r.prototype.decode=function(e,t,n){return this._getDecoder(t).decode(e,n)},r.prototype._getEncoder=function(e){return e=e||"der",this.encoders.hasOwnProperty(e)||(this.encoders[e]=this._createNamed(i.encoders[e])),this.encoders[e]},r.prototype.encode=function(e,t,n){return this._getEncoder(t).encode(e,n)}},7194:(e,t,n)=>{var i=n(9385),o=n(5370).Reporter,r=n(1278).Buffer;function s(e,t){o.call(this,t),r.isBuffer(e)?(this.base=e,this.offset=0,this.length=e.length):this.error("Input not Buffer")}function a(e,t){if(Array.isArray(e))this.length=0,this.value=e.map((function(e){return e instanceof a||(e=new a(e,t)),this.length+=e.length,e}),this);else if("number"==typeof e){if(!(0<=e&&e<=255))return t.error("non-byte EncoderBuffer value");this.value=e,this.length=1}else if("string"==typeof e)this.value=e,this.length=r.byteLength(e);else{if(!r.isBuffer(e))return t.error("Unsupported type: "+typeof e);this.value=e,this.length=e.length}}i(s,o),t.t=s,s.prototype.save=function(){return{offset:this.offset,reporter:o.prototype.save.call(this)}},s.prototype.restore=function(e){var t=new s(this.base);return t.offset=e.offset,t.length=this.offset,this.offset=e.offset,o.prototype.restore.call(this,e.reporter),t},s.prototype.isEmpty=function(){return this.offset===this.length},s.prototype.readUInt8=function(e){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(e||"DecoderBuffer overrun")},s.prototype.skip=function(e,t){if(!(this.offset+e<=this.length))return this.error(t||"DecoderBuffer overrun");var n=new s(this.base);return n._reporterState=this._reporterState,n.offset=this.offset,n.length=this.offset+e,this.offset+=e,n},s.prototype.raw=function(e){return this.base.slice(e?e.offset:this.offset,this.length)},t.d=a,a.prototype.join=function(e,t){return e||(e=new r(this.length)),t||(t=0),0===this.length||(Array.isArray(this.value)?this.value.forEach((function(n){n.join(e,t),t+=n.length})):("number"==typeof this.value?e[t]=this.value:"string"==typeof this.value?e.write(this.value,t):r.isBuffer(this.value)&&this.value.copy(e,t),t+=this.length)),e}},5370:(e,t,n)=>{var i=t;i.Reporter=n(7793).a,i.DecoderBuffer=n(7194).t,i.EncoderBuffer=n(7194).d,i.Node=n(2624)},2624:(e,t,n)=>{var i=n(5370).Reporter,o=n(5370).EncoderBuffer,r=n(5370).DecoderBuffer,s=n(4890),a=["seq","seqof","set","setof","objid","bool","gentime","utctime","null_","enum","int","objDesc","bitstr","bmpstr","charstr","genstr","graphstr","ia5str","iso646str","numstr","octstr","printstr","t61str","unistr","utf8str","videostr"],u=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(a);function l(e,t){var n={};this._baseState=n,n.enc=e,n.parent=t||null,n.children=null,n.tag=null,n.args=null,n.reverseArgs=null,n.choice=null,n.optional=!1,n.any=!1,n.obj=!1,n.use=null,n.useDecoder=null,n.key=null,n.default=null,n.explicit=null,n.implicit=null,n.contains=null,n.parent||(n.children=[],this._wrap())}e.exports=l;var c=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];l.prototype.clone=function(){var e=this._baseState,t={};c.forEach((function(n){t[n]=e[n]}));var n=new this.constructor(t.parent);return n._baseState=t,n},l.prototype._wrap=function(){var e=this._baseState;u.forEach((function(t){this[t]=function(){var n=new this.constructor(this);return e.children.push(n),n[t].apply(n,arguments)}}),this)},l.prototype._init=function(e){var t=this._baseState;s(null===t.parent),e.call(this),t.children=t.children.filter((function(e){return e._baseState.parent===this}),this),s.equal(t.children.length,1,"Root node can have only one child")},l.prototype._useArgs=function(e){var t=this._baseState,n=e.filter((function(e){return e instanceof this.constructor}),this);e=e.filter((function(e){return!(e instanceof this.constructor)}),this),0!==n.length&&(s(null===t.children),t.children=n,n.forEach((function(e){e._baseState.parent=this}),this)),0!==e.length&&(s(null===t.args),t.args=e,t.reverseArgs=e.map((function(e){if("object"!=typeof e||e.constructor!==Object)return e;var t={};return Object.keys(e).forEach((function(n){n==(0|n)&&(n|=0);var i=e[n];t[i]=n})),t})))},["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"].forEach((function(e){l.prototype[e]=function(){var t=this._baseState;throw new Error(e+" not implemented for encoding: "+t.enc)}})),a.forEach((function(e){l.prototype[e]=function(){var t=this._baseState,n=Array.prototype.slice.call(arguments);return s(null===t.tag),t.tag=e,this._useArgs(n),this}})),l.prototype.use=function(e){s(e);var t=this._baseState;return s(null===t.use),t.use=e,this},l.prototype.optional=function(){return this._baseState.optional=!0,this},l.prototype.def=function(e){var t=this._baseState;return s(null===t.default),t.default=e,t.optional=!0,this},l.prototype.explicit=function(e){var t=this._baseState;return s(null===t.explicit&&null===t.implicit),t.explicit=e,this},l.prototype.implicit=function(e){var t=this._baseState;return s(null===t.explicit&&null===t.implicit),t.implicit=e,this},l.prototype.obj=function(){var e=this._baseState,t=Array.prototype.slice.call(arguments);return e.obj=!0,0!==t.length&&this._useArgs(t),this},l.prototype.key=function(e){var t=this._baseState;return s(null===t.key),t.key=e,this},l.prototype.any=function(){return this._baseState.any=!0,this},l.prototype.choice=function(e){var t=this._baseState;return s(null===t.choice),t.choice=e,this._useArgs(Object.keys(e).map((function(t){return e[t]}))),this},l.prototype.contains=function(e){var t=this._baseState;return s(null===t.use),t.contains=e,this},l.prototype._decode=function(e,t){var n=this._baseState;if(null===n.parent)return e.wrapResult(n.children[0]._decode(e,t));var i,o=n.default,s=!0,a=null;if(null!==n.key&&(a=e.enterKey(n.key)),n.optional){var u=null;if(null!==n.explicit?u=n.explicit:null!==n.implicit?u=n.implicit:null!==n.tag&&(u=n.tag),null!==u||n.any){if(s=this._peekTag(e,u,n.any),e.isError(s))return s}else{var l=e.save();try{null===n.choice?this._decodeGeneric(n.tag,e,t):this._decodeChoice(e,t),s=!0}catch(e){s=!1}e.restore(l)}}if(n.obj&&s&&(i=e.enterObject()),s){if(null!==n.explicit){var c=this._decodeTag(e,n.explicit);if(e.isError(c))return c;e=c}var h=e.offset;if(null===n.use&&null===n.choice){n.any&&(l=e.save());var d=this._decodeTag(e,null!==n.implicit?n.implicit:n.tag,n.any);if(e.isError(d))return d;n.any?o=e.raw(l):e=d}if(t&&t.track&&null!==n.tag&&t.track(e.path(),h,e.length,"tagged"),t&&t.track&&null!==n.tag&&t.track(e.path(),e.offset,e.length,"content"),n.any||(o=null===n.choice?this._decodeGeneric(n.tag,e,t):this._decodeChoice(e,t)),e.isError(o))return o;if(n.any||null!==n.choice||null===n.children||n.children.forEach((function(n){n._decode(e,t)})),n.contains&&("octstr"===n.tag||"bitstr"===n.tag)){var f=new r(o);o=this._getUse(n.contains,e._reporterState.obj)._decode(f,t)}}return n.obj&&s&&(o=e.leaveObject(i)),null===n.key||null===o&&!0!==s?null!==a&&e.exitKey(a):e.leaveKey(a,n.key,o),o},l.prototype._decodeGeneric=function(e,t,n){var i=this._baseState;return"seq"===e||"set"===e?null:"seqof"===e||"setof"===e?this._decodeList(t,e,i.args[0],n):/str$/.test(e)?this._decodeStr(t,e,n):"objid"===e&&i.args?this._decodeObjid(t,i.args[0],i.args[1],n):"objid"===e?this._decodeObjid(t,null,null,n):"gentime"===e||"utctime"===e?this._decodeTime(t,e,n):"null_"===e?this._decodeNull(t,n):"bool"===e?this._decodeBool(t,n):"objDesc"===e?this._decodeStr(t,e,n):"int"===e||"enum"===e?this._decodeInt(t,i.args&&i.args[0],n):null!==i.use?this._getUse(i.use,t._reporterState.obj)._decode(t,n):t.error("unknown tag: "+e)},l.prototype._getUse=function(e,t){var n=this._baseState;return n.useDecoder=this._use(e,t),s(null===n.useDecoder._baseState.parent),n.useDecoder=n.useDecoder._baseState.children[0],n.implicit!==n.useDecoder._baseState.implicit&&(n.useDecoder=n.useDecoder.clone(),n.useDecoder._baseState.implicit=n.implicit),n.useDecoder},l.prototype._decodeChoice=function(e,t){var n=this._baseState,i=null,o=!1;return Object.keys(n.choice).some((function(r){var s=e.save(),a=n.choice[r];try{var u=a._decode(e,t);if(e.isError(u))return!1;i={type:r,value:u},o=!0}catch(t){return e.restore(s),!1}return!0}),this),o?i:e.error("Choice not matched")},l.prototype._createEncoderBuffer=function(e){return new o(e,this.reporter)},l.prototype._encode=function(e,t,n){var i=this._baseState;if(null===i.default||i.default!==e){var o=this._encodeValue(e,t,n);if(void 0!==o&&!this._skipDefault(o,t,n))return o}},l.prototype._encodeValue=function(e,t,n){var o=this._baseState;if(null===o.parent)return o.children[0]._encode(e,t||new i);var r=null;if(this.reporter=t,o.optional&&void 0===e){if(null===o.default)return;e=o.default}var s=null,a=!1;if(o.any)r=this._createEncoderBuffer(e);else if(o.choice)r=this._encodeChoice(e,t);else if(o.contains)s=this._getUse(o.contains,n)._encode(e,t),a=!0;else if(o.children)s=o.children.map((function(n){if("null_"===n._baseState.tag)return n._encode(null,t,e);if(null===n._baseState.key)return t.error("Child should have a key");var i=t.enterKey(n._baseState.key);if("object"!=typeof e)return t.error("Child expected, but input is not object");var o=n._encode(e[n._baseState.key],t,e);return t.leaveKey(i),o}),this).filter((function(e){return e})),s=this._createEncoderBuffer(s);else if("seqof"===o.tag||"setof"===o.tag){if(!o.args||1!==o.args.length)return t.error("Too many args for : "+o.tag);if(!Array.isArray(e))return t.error("seqof/setof, but data is not Array");var u=this.clone();u._baseState.implicit=null,s=this._createEncoderBuffer(e.map((function(n){var i=this._baseState;return this._getUse(i.args[0],e)._encode(n,t)}),u))}else null!==o.use?r=this._getUse(o.use,n)._encode(e,t):(s=this._encodePrimitive(o.tag,e),a=!0);if(!o.any&&null===o.choice){var l=null!==o.implicit?o.implicit:o.tag,c=null===o.implicit?"universal":"context";null===l?null===o.use&&t.error("Tag could be omitted only for .use()"):null===o.use&&(r=this._encodeComposite(l,a,c,s))}return null!==o.explicit&&(r=this._encodeComposite(o.explicit,!1,"context",r)),r},l.prototype._encodeChoice=function(e,t){var n=this._baseState,i=n.choice[e.type];return i||s(!1,e.type+" not found in "+JSON.stringify(Object.keys(n.choice))),i._encode(e.value,t)},l.prototype._encodePrimitive=function(e,t){var n=this._baseState;if(/str$/.test(e))return this._encodeStr(t,e);if("objid"===e&&n.args)return this._encodeObjid(t,n.reverseArgs[0],n.args[1]);if("objid"===e)return this._encodeObjid(t,null,null);if("gentime"===e||"utctime"===e)return this._encodeTime(t,e);if("null_"===e)return this._encodeNull();if("int"===e||"enum"===e)return this._encodeInt(t,n.args&&n.reverseArgs[0]);if("bool"===e)return this._encodeBool(t);if("objDesc"===e)return this._encodeStr(t,e);throw new Error("Unsupported tag: "+e)},l.prototype._isNumstr=function(e){return/^[0-9 ]*$/.test(e)},l.prototype._isPrintstr=function(e){return/^[A-Za-z0-9 '\(\)\+,\-\.\/:=\?]*$/.test(e)}},7793:(e,t,n)=>{var i=n(9385);function o(e){this._reporterState={obj:null,path:[],options:e||{},errors:[]}}function r(e,t){this.path=e,this.rethrow(t)}t.a=o,o.prototype.isError=function(e){return e instanceof r},o.prototype.save=function(){var e=this._reporterState;return{obj:e.obj,pathLen:e.path.length}},o.prototype.restore=function(e){var t=this._reporterState;t.obj=e.obj,t.path=t.path.slice(0,e.pathLen)},o.prototype.enterKey=function(e){return this._reporterState.path.push(e)},o.prototype.exitKey=function(e){var t=this._reporterState;t.path=t.path.slice(0,e-1)},o.prototype.leaveKey=function(e,t,n){var i=this._reporterState;this.exitKey(e),null!==i.obj&&(i.obj[t]=n)},o.prototype.path=function(){return this._reporterState.path.join("/")},o.prototype.enterObject=function(){var e=this._reporterState,t=e.obj;return e.obj={},t},o.prototype.leaveObject=function(e){var t=this._reporterState,n=t.obj;return t.obj=e,n},o.prototype.error=function(e){var t,n=this._reporterState,i=e instanceof r;if(t=i?e:new r(n.path.map((function(e){return"["+JSON.stringify(e)+"]"})).join(""),e.message||e,e.stack),!n.options.partial)throw t;return i||n.errors.push(t),t},o.prototype.wrapResult=function(e){var t=this._reporterState;return t.options.partial?{result:this.isError(e)?null:e,errors:t.errors}:e},i(r,Error),r.prototype.rethrow=function(e){if(this.message=e+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,r),!this.stack)try{throw new Error(this.message)}catch(e){this.stack=e.stack}return this}},3275:(e,t,n)=>{var i=n(4940);t.tagClass={0:"universal",1:"application",2:"context",3:"private"},t.tagClassByName=i._reverse(t.tagClass),t.tag={0:"end",1:"bool",2:"int",3:"bitstr",4:"octstr",5:"null_",6:"objid",7:"objDesc",8:"external",9:"real",10:"enum",11:"embed",12:"utf8str",13:"relativeOid",16:"seq",17:"set",18:"numstr",19:"printstr",20:"t61str",21:"videostr",22:"ia5str",23:"utctime",24:"gentime",25:"graphstr",26:"iso646str",27:"genstr",28:"unistr",29:"charstr",30:"bmpstr"},t.tagByName=i._reverse(t.tag)},4940:(e,t,n)=>{var i=t;i._reverse=function(e){var t={};return Object.keys(e).forEach((function(n){(0|n)==n&&(n|=0);var i=e[n];t[i]=n})),t},i.der=n(3275)},8997:(e,t,n)=>{var i=n(9385),o=n(3529),r=o.base,s=o.bignum,a=o.constants.der;function u(e){this.enc="der",this.name=e.name,this.entity=e,this.tree=new l,this.tree._init(e.body)}function l(e){r.Node.call(this,"der",e)}function c(e,t){var n=e.readUInt8(t);if(e.isError(n))return n;var i=a.tagClass[n>>6],o=!(32&n);if(31&~n)n&=31;else{var r=n;for(n=0;!(128&~r);){if(r=e.readUInt8(t),e.isError(r))return r;n<<=7,n|=127&r}}return{cls:i,primitive:o,tag:n,tagStr:a.tag[n]}}function h(e,t,n){var i=e.readUInt8(n);if(e.isError(i))return i;if(!t&&128===i)return null;if(!(128&i))return i;var o=127&i;if(o>4)return e.error("length octect is too long");i=0;for(var r=0;r{var i=t;i.der=n(8997),i.pem=n(2420)},2420:(e,t,n)=>{var i=n(9385),o=n(1278).Buffer,r=n(8997);function s(e){r.call(this,e),this.enc="pem"}i(s,r),e.exports=s,s.prototype.decode=function(e,t){for(var n=e.toString().split(/[\r\n]+/g),i=t.label.toUpperCase(),s=/^-----(BEGIN|END) ([^-]+)-----$/,a=-1,u=-1,l=0;l{var i=n(9385),o=n(1278).Buffer,r=n(3529),s=r.base,a=r.constants.der;function u(e){this.enc="der",this.name=e.name,this.entity=e,this.tree=new l,this.tree._init(e.body)}function l(e){s.Node.call(this,"der",e)}function c(e){return e<10?"0"+e:e}e.exports=u,u.prototype.encode=function(e,t){return this.tree._encode(e,t).join()},i(l,s.Node),l.prototype._encodeComposite=function(e,t,n,i){var r,s=function(e,t,n,i){var o;if("seqof"===e?e="seq":"setof"===e&&(e="set"),a.tagByName.hasOwnProperty(e))o=a.tagByName[e];else{if("number"!=typeof e||(0|e)!==e)return i.error("Unknown tag: "+e);o=e}return o>=31?i.error("Multi-octet tag encoding unsupported"):(t||(o|=32),o|=a.tagClassByName[n||"universal"]<<6)}(e,t,n,this.reporter);if(i.length<128)return(r=new o(2))[0]=s,r[1]=i.length,this._createEncoderBuffer([r,i]);for(var u=1,l=i.length;l>=256;l>>=8)u++;(r=new o(2+u))[0]=s,r[1]=128|u,l=1+u;for(var c=i.length;c>0;l--,c>>=8)r[l]=255&c;return this._createEncoderBuffer([r,i])},l.prototype._encodeStr=function(e,t){if("bitstr"===t)return this._createEncoderBuffer([0|e.unused,e.data]);if("bmpstr"===t){for(var n=new o(2*e.length),i=0;i=40)return this.reporter.error("Second objid identifier OOB");e.splice(0,2,40*e[0]+e[1])}var r=0;for(i=0;i=128;s>>=7)r++}var a=new o(r),u=a.length-1;for(i=e.length-1;i>=0;i--)for(s=e[i],a[u--]=127&s;(s>>=7)>0;)a[u--]=128|127&s;return this._createEncoderBuffer(a)},l.prototype._encodeTime=function(e,t){var n,i=new Date(e);return"gentime"===t?n=[c(i.getFullYear()),c(i.getUTCMonth()+1),c(i.getUTCDate()),c(i.getUTCHours()),c(i.getUTCMinutes()),c(i.getUTCSeconds()),"Z"].join(""):"utctime"===t?n=[c(i.getFullYear()%100),c(i.getUTCMonth()+1),c(i.getUTCDate()),c(i.getUTCHours()),c(i.getUTCMinutes()),c(i.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+t+" time is not supported yet"),this._encodeStr(n,"octstr")},l.prototype._encodeNull=function(){return this._createEncoderBuffer("")},l.prototype._encodeInt=function(e,t){if("string"==typeof e){if(!t)return this.reporter.error("String int or enum given, but no values map");if(!t.hasOwnProperty(e))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(e));e=t[e]}if("number"!=typeof e&&!o.isBuffer(e)){var n=e.toArray();!e.sign&&128&n[0]&&n.unshift(0),e=new o(n)}if(o.isBuffer(e)){var i=e.length;0===e.length&&i++;var r=new o(i);return e.copy(r),0===e.length&&(r[0]=0),this._createEncoderBuffer(r)}if(e<128)return this._createEncoderBuffer(e);if(e<256)return this._createEncoderBuffer([0,e]);i=1;for(var s=e;s>=256;s>>=8)i++;for(s=(r=new Array(i)).length-1;s>=0;s--)r[s]=255&e,e>>=8;return 128&r[0]&&r.unshift(0),this._createEncoderBuffer(new o(r))},l.prototype._encodeBool=function(e){return this._createEncoderBuffer(e?255:0)},l.prototype._use=function(e,t){return"function"==typeof e&&(e=e(t)),e._getEncoder("der").tree},l.prototype._skipDefault=function(e,t,n){var i,o=this._baseState;if(null===o.default)return!1;var r=e.join();if(void 0===o.defaultBuffer&&(o.defaultBuffer=this._encodeValue(o.default,t,n).join()),r.length!==o.defaultBuffer.length)return!1;for(i=0;i{var i=t;i.der=n(7137),i.pem=n(480)},480:(e,t,n)=>{var i=n(9385),o=n(7137);function r(e){o.call(this,e),this.enc="pem"}i(r,o),e.exports=r,r.prototype.encode=function(e,t){for(var n=o.prototype.encode.call(this,e).toString("base64"),i=["-----BEGIN "+t.label+"-----"],r=0;r=65&&n<=70?n-55:n>=97&&n<=102?n-87:n-48&15}function u(e,t,n){var i=a(e,n);return n-1>=t&&(i|=a(e,n-1)<<4),i}function l(e,t,n,i){for(var o=0,r=Math.min(e.length,n),s=t;s=49?a-49+10:a>=17?a-17+10:a}return o}r.isBN=function(e){return e instanceof r||null!==e&&"object"==typeof e&&e.constructor.wordSize===r.wordSize&&Array.isArray(e.words)},r.max=function(e,t){return e.cmp(t)>0?e:t},r.min=function(e,t){return e.cmp(t)<0?e:t},r.prototype._init=function(e,t,n){if("number"==typeof e)return this._initNumber(e,t,n);if("object"==typeof e)return this._initArray(e,t,n);"hex"===t&&(t=16),i(t===(0|t)&&t>=2&&t<=36);var o=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(o++,this.negative=1),o=0;o-=3)s=e[o]|e[o-1]<<8|e[o-2]<<16,this.words[r]|=s<>>26-a&67108863,(a+=24)>=26&&(a-=26,r++);else if("le"===n)for(o=0,r=0;o>>26-a&67108863,(a+=24)>=26&&(a-=26,r++);return this.strip()},r.prototype._parseHex=function(e,t,n){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var i=0;i=t;i-=2)o=u(e,t,i)<=18?(r-=18,s+=1,this.words[s]|=o>>>26):r+=8;else for(i=(e.length-t)%2==0?t+1:t;i=18?(r-=18,s+=1,this.words[s]|=o>>>26):r+=8;this.strip()},r.prototype._parseBase=function(e,t,n){this.words=[0],this.length=1;for(var i=0,o=1;o<=67108863;o*=t)i++;i--,o=o/t|0;for(var r=e.length-n,s=r%i,a=Math.min(r,r-s)+n,u=0,c=n;c1&&0===this.words[this.length-1];)this.length--;return this._normSign()},r.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},r.prototype.inspect=function(){return(this.red?""};var c=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],h=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],d=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function f(e,t,n){n.negative=t.negative^e.negative;var i=e.length+t.length|0;n.length=i,i=i-1|0;var o=0|e.words[0],r=0|t.words[0],s=o*r,a=67108863&s,u=s/67108864|0;n.words[0]=a;for(var l=1;l>>26,h=67108863&u,d=Math.min(l,t.length-1),f=Math.max(0,l-e.length+1);f<=d;f++){var p=l-f|0;c+=(s=(o=0|e.words[p])*(r=0|t.words[f])+h)/67108864|0,h=67108863&s}n.words[l]=0|h,u=0|c}return 0!==u?n.words[l]=0|u:n.length--,n.strip()}r.prototype.toString=function(e,t){var n;if(t=0|t||1,16===(e=e||10)||"hex"===e){n="";for(var o=0,r=0,s=0;s>>24-o&16777215)||s!==this.length-1?c[6-u.length]+u+n:u+n,(o+=2)>=26&&(o-=26,s--)}for(0!==r&&(n=r.toString(16)+n);n.length%t!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(e===(0|e)&&e>=2&&e<=36){var l=h[e],f=d[e];n="";var p=this.clone();for(p.negative=0;!p.isZero();){var g=p.modn(f).toString(e);n=(p=p.idivn(f)).isZero()?g+n:c[l-g.length]+g+n}for(this.isZero()&&(n="0"+n);n.length%t!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}i(!1,"Base should be between 2 and 36")},r.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&i(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},r.prototype.toJSON=function(){return this.toString(16)},r.prototype.toBuffer=function(e,t){return i(void 0!==s),this.toArrayLike(s,e,t)},r.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},r.prototype.toArrayLike=function(e,t,n){var o=this.byteLength(),r=n||Math.max(1,o);i(o<=r,"byte array longer than desired length"),i(r>0,"Requested array length <= 0"),this.strip();var s,a,u="le"===t,l=new e(r),c=this.clone();if(u){for(a=0;!c.isZero();a++)s=c.andln(255),c.iushrn(8),l[a]=s;for(;a=4096&&(n+=13,t>>>=13),t>=64&&(n+=7,t>>>=7),t>=8&&(n+=4,t>>>=4),t>=2&&(n+=2,t>>>=2),n+t},r.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,n=0;return 8191&t||(n+=13,t>>>=13),127&t||(n+=7,t>>>=7),15&t||(n+=4,t>>>=4),3&t||(n+=2,t>>>=2),1&t||n++,n},r.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},r.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},r.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},r.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var n=0;ne.length?this.clone().iand(e):e.clone().iand(this)},r.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},r.prototype.iuxor=function(e){var t,n;this.length>e.length?(t=this,n=e):(t=e,n=this);for(var i=0;ie.length?this.clone().ixor(e):e.clone().ixor(this)},r.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},r.prototype.inotn=function(e){i("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),n=e%26;this._expand(t),n>0&&t--;for(var o=0;o0&&(this.words[o]=~this.words[o]&67108863>>26-n),this.strip()},r.prototype.notn=function(e){return this.clone().inotn(e)},r.prototype.setn=function(e,t){i("number"==typeof e&&e>=0);var n=e/26|0,o=e%26;return this._expand(n+1),this.words[n]=t?this.words[n]|1<e.length?(n=this,i=e):(n=e,i=this);for(var o=0,r=0;r>>26;for(;0!==o&&r>>26;if(this.length=n.length,0!==o)this.words[this.length]=o,this.length++;else if(n!==this)for(;re.length?this.clone().iadd(e):e.clone().iadd(this)},r.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var n,i,o=this.cmp(e);if(0===o)return this.negative=0,this.length=1,this.words[0]=0,this;o>0?(n=this,i=e):(n=e,i=this);for(var r=0,s=0;s>26,this.words[s]=67108863&t;for(;0!==r&&s>26,this.words[s]=67108863&t;if(0===r&&s>>13,f=0|s[1],p=8191&f,g=f>>>13,m=0|s[2],v=8191&m,y=m>>>13,b=0|s[3],_=8191&b,w=b>>>13,M=0|s[4],C=8191&M,S=M>>>13,L=0|s[5],I=8191&L,N=L>>>13,x=0|s[6],D=8191&x,k=x>>>13,T=0|s[7],E=8191&T,A=T>>>13,j=0|s[8],O=8191&j,R=j>>>13,P=0|s[9],z=8191&P,W=P>>>13,F=0|a[0],B=8191&F,H=F>>>13,V=0|a[1],U=8191&V,Y=V>>>13,Z=0|a[2],G=8191&Z,Q=Z>>>13,q=0|a[3],K=8191&q,J=q>>>13,X=0|a[4],$=8191&X,ee=X>>>13,te=0|a[5],ne=8191&te,ie=te>>>13,oe=0|a[6],re=8191&oe,se=oe>>>13,ae=0|a[7],ue=8191&ae,le=ae>>>13,ce=0|a[8],he=8191&ce,de=ce>>>13,fe=0|a[9],pe=8191&fe,ge=fe>>>13;n.negative=e.negative^t.negative,n.length=19;var me=(l+(i=Math.imul(h,B))|0)+((8191&(o=(o=Math.imul(h,H))+Math.imul(d,B)|0))<<13)|0;l=((r=Math.imul(d,H))+(o>>>13)|0)+(me>>>26)|0,me&=67108863,i=Math.imul(p,B),o=(o=Math.imul(p,H))+Math.imul(g,B)|0,r=Math.imul(g,H);var ve=(l+(i=i+Math.imul(h,U)|0)|0)+((8191&(o=(o=o+Math.imul(h,Y)|0)+Math.imul(d,U)|0))<<13)|0;l=((r=r+Math.imul(d,Y)|0)+(o>>>13)|0)+(ve>>>26)|0,ve&=67108863,i=Math.imul(v,B),o=(o=Math.imul(v,H))+Math.imul(y,B)|0,r=Math.imul(y,H),i=i+Math.imul(p,U)|0,o=(o=o+Math.imul(p,Y)|0)+Math.imul(g,U)|0,r=r+Math.imul(g,Y)|0;var ye=(l+(i=i+Math.imul(h,G)|0)|0)+((8191&(o=(o=o+Math.imul(h,Q)|0)+Math.imul(d,G)|0))<<13)|0;l=((r=r+Math.imul(d,Q)|0)+(o>>>13)|0)+(ye>>>26)|0,ye&=67108863,i=Math.imul(_,B),o=(o=Math.imul(_,H))+Math.imul(w,B)|0,r=Math.imul(w,H),i=i+Math.imul(v,U)|0,o=(o=o+Math.imul(v,Y)|0)+Math.imul(y,U)|0,r=r+Math.imul(y,Y)|0,i=i+Math.imul(p,G)|0,o=(o=o+Math.imul(p,Q)|0)+Math.imul(g,G)|0,r=r+Math.imul(g,Q)|0;var be=(l+(i=i+Math.imul(h,K)|0)|0)+((8191&(o=(o=o+Math.imul(h,J)|0)+Math.imul(d,K)|0))<<13)|0;l=((r=r+Math.imul(d,J)|0)+(o>>>13)|0)+(be>>>26)|0,be&=67108863,i=Math.imul(C,B),o=(o=Math.imul(C,H))+Math.imul(S,B)|0,r=Math.imul(S,H),i=i+Math.imul(_,U)|0,o=(o=o+Math.imul(_,Y)|0)+Math.imul(w,U)|0,r=r+Math.imul(w,Y)|0,i=i+Math.imul(v,G)|0,o=(o=o+Math.imul(v,Q)|0)+Math.imul(y,G)|0,r=r+Math.imul(y,Q)|0,i=i+Math.imul(p,K)|0,o=(o=o+Math.imul(p,J)|0)+Math.imul(g,K)|0,r=r+Math.imul(g,J)|0;var _e=(l+(i=i+Math.imul(h,$)|0)|0)+((8191&(o=(o=o+Math.imul(h,ee)|0)+Math.imul(d,$)|0))<<13)|0;l=((r=r+Math.imul(d,ee)|0)+(o>>>13)|0)+(_e>>>26)|0,_e&=67108863,i=Math.imul(I,B),o=(o=Math.imul(I,H))+Math.imul(N,B)|0,r=Math.imul(N,H),i=i+Math.imul(C,U)|0,o=(o=o+Math.imul(C,Y)|0)+Math.imul(S,U)|0,r=r+Math.imul(S,Y)|0,i=i+Math.imul(_,G)|0,o=(o=o+Math.imul(_,Q)|0)+Math.imul(w,G)|0,r=r+Math.imul(w,Q)|0,i=i+Math.imul(v,K)|0,o=(o=o+Math.imul(v,J)|0)+Math.imul(y,K)|0,r=r+Math.imul(y,J)|0,i=i+Math.imul(p,$)|0,o=(o=o+Math.imul(p,ee)|0)+Math.imul(g,$)|0,r=r+Math.imul(g,ee)|0;var we=(l+(i=i+Math.imul(h,ne)|0)|0)+((8191&(o=(o=o+Math.imul(h,ie)|0)+Math.imul(d,ne)|0))<<13)|0;l=((r=r+Math.imul(d,ie)|0)+(o>>>13)|0)+(we>>>26)|0,we&=67108863,i=Math.imul(D,B),o=(o=Math.imul(D,H))+Math.imul(k,B)|0,r=Math.imul(k,H),i=i+Math.imul(I,U)|0,o=(o=o+Math.imul(I,Y)|0)+Math.imul(N,U)|0,r=r+Math.imul(N,Y)|0,i=i+Math.imul(C,G)|0,o=(o=o+Math.imul(C,Q)|0)+Math.imul(S,G)|0,r=r+Math.imul(S,Q)|0,i=i+Math.imul(_,K)|0,o=(o=o+Math.imul(_,J)|0)+Math.imul(w,K)|0,r=r+Math.imul(w,J)|0,i=i+Math.imul(v,$)|0,o=(o=o+Math.imul(v,ee)|0)+Math.imul(y,$)|0,r=r+Math.imul(y,ee)|0,i=i+Math.imul(p,ne)|0,o=(o=o+Math.imul(p,ie)|0)+Math.imul(g,ne)|0,r=r+Math.imul(g,ie)|0;var Me=(l+(i=i+Math.imul(h,re)|0)|0)+((8191&(o=(o=o+Math.imul(h,se)|0)+Math.imul(d,re)|0))<<13)|0;l=((r=r+Math.imul(d,se)|0)+(o>>>13)|0)+(Me>>>26)|0,Me&=67108863,i=Math.imul(E,B),o=(o=Math.imul(E,H))+Math.imul(A,B)|0,r=Math.imul(A,H),i=i+Math.imul(D,U)|0,o=(o=o+Math.imul(D,Y)|0)+Math.imul(k,U)|0,r=r+Math.imul(k,Y)|0,i=i+Math.imul(I,G)|0,o=(o=o+Math.imul(I,Q)|0)+Math.imul(N,G)|0,r=r+Math.imul(N,Q)|0,i=i+Math.imul(C,K)|0,o=(o=o+Math.imul(C,J)|0)+Math.imul(S,K)|0,r=r+Math.imul(S,J)|0,i=i+Math.imul(_,$)|0,o=(o=o+Math.imul(_,ee)|0)+Math.imul(w,$)|0,r=r+Math.imul(w,ee)|0,i=i+Math.imul(v,ne)|0,o=(o=o+Math.imul(v,ie)|0)+Math.imul(y,ne)|0,r=r+Math.imul(y,ie)|0,i=i+Math.imul(p,re)|0,o=(o=o+Math.imul(p,se)|0)+Math.imul(g,re)|0,r=r+Math.imul(g,se)|0;var Ce=(l+(i=i+Math.imul(h,ue)|0)|0)+((8191&(o=(o=o+Math.imul(h,le)|0)+Math.imul(d,ue)|0))<<13)|0;l=((r=r+Math.imul(d,le)|0)+(o>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,i=Math.imul(O,B),o=(o=Math.imul(O,H))+Math.imul(R,B)|0,r=Math.imul(R,H),i=i+Math.imul(E,U)|0,o=(o=o+Math.imul(E,Y)|0)+Math.imul(A,U)|0,r=r+Math.imul(A,Y)|0,i=i+Math.imul(D,G)|0,o=(o=o+Math.imul(D,Q)|0)+Math.imul(k,G)|0,r=r+Math.imul(k,Q)|0,i=i+Math.imul(I,K)|0,o=(o=o+Math.imul(I,J)|0)+Math.imul(N,K)|0,r=r+Math.imul(N,J)|0,i=i+Math.imul(C,$)|0,o=(o=o+Math.imul(C,ee)|0)+Math.imul(S,$)|0,r=r+Math.imul(S,ee)|0,i=i+Math.imul(_,ne)|0,o=(o=o+Math.imul(_,ie)|0)+Math.imul(w,ne)|0,r=r+Math.imul(w,ie)|0,i=i+Math.imul(v,re)|0,o=(o=o+Math.imul(v,se)|0)+Math.imul(y,re)|0,r=r+Math.imul(y,se)|0,i=i+Math.imul(p,ue)|0,o=(o=o+Math.imul(p,le)|0)+Math.imul(g,ue)|0,r=r+Math.imul(g,le)|0;var Se=(l+(i=i+Math.imul(h,he)|0)|0)+((8191&(o=(o=o+Math.imul(h,de)|0)+Math.imul(d,he)|0))<<13)|0;l=((r=r+Math.imul(d,de)|0)+(o>>>13)|0)+(Se>>>26)|0,Se&=67108863,i=Math.imul(z,B),o=(o=Math.imul(z,H))+Math.imul(W,B)|0,r=Math.imul(W,H),i=i+Math.imul(O,U)|0,o=(o=o+Math.imul(O,Y)|0)+Math.imul(R,U)|0,r=r+Math.imul(R,Y)|0,i=i+Math.imul(E,G)|0,o=(o=o+Math.imul(E,Q)|0)+Math.imul(A,G)|0,r=r+Math.imul(A,Q)|0,i=i+Math.imul(D,K)|0,o=(o=o+Math.imul(D,J)|0)+Math.imul(k,K)|0,r=r+Math.imul(k,J)|0,i=i+Math.imul(I,$)|0,o=(o=o+Math.imul(I,ee)|0)+Math.imul(N,$)|0,r=r+Math.imul(N,ee)|0,i=i+Math.imul(C,ne)|0,o=(o=o+Math.imul(C,ie)|0)+Math.imul(S,ne)|0,r=r+Math.imul(S,ie)|0,i=i+Math.imul(_,re)|0,o=(o=o+Math.imul(_,se)|0)+Math.imul(w,re)|0,r=r+Math.imul(w,se)|0,i=i+Math.imul(v,ue)|0,o=(o=o+Math.imul(v,le)|0)+Math.imul(y,ue)|0,r=r+Math.imul(y,le)|0,i=i+Math.imul(p,he)|0,o=(o=o+Math.imul(p,de)|0)+Math.imul(g,he)|0,r=r+Math.imul(g,de)|0;var Le=(l+(i=i+Math.imul(h,pe)|0)|0)+((8191&(o=(o=o+Math.imul(h,ge)|0)+Math.imul(d,pe)|0))<<13)|0;l=((r=r+Math.imul(d,ge)|0)+(o>>>13)|0)+(Le>>>26)|0,Le&=67108863,i=Math.imul(z,U),o=(o=Math.imul(z,Y))+Math.imul(W,U)|0,r=Math.imul(W,Y),i=i+Math.imul(O,G)|0,o=(o=o+Math.imul(O,Q)|0)+Math.imul(R,G)|0,r=r+Math.imul(R,Q)|0,i=i+Math.imul(E,K)|0,o=(o=o+Math.imul(E,J)|0)+Math.imul(A,K)|0,r=r+Math.imul(A,J)|0,i=i+Math.imul(D,$)|0,o=(o=o+Math.imul(D,ee)|0)+Math.imul(k,$)|0,r=r+Math.imul(k,ee)|0,i=i+Math.imul(I,ne)|0,o=(o=o+Math.imul(I,ie)|0)+Math.imul(N,ne)|0,r=r+Math.imul(N,ie)|0,i=i+Math.imul(C,re)|0,o=(o=o+Math.imul(C,se)|0)+Math.imul(S,re)|0,r=r+Math.imul(S,se)|0,i=i+Math.imul(_,ue)|0,o=(o=o+Math.imul(_,le)|0)+Math.imul(w,ue)|0,r=r+Math.imul(w,le)|0,i=i+Math.imul(v,he)|0,o=(o=o+Math.imul(v,de)|0)+Math.imul(y,he)|0,r=r+Math.imul(y,de)|0;var Ie=(l+(i=i+Math.imul(p,pe)|0)|0)+((8191&(o=(o=o+Math.imul(p,ge)|0)+Math.imul(g,pe)|0))<<13)|0;l=((r=r+Math.imul(g,ge)|0)+(o>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,i=Math.imul(z,G),o=(o=Math.imul(z,Q))+Math.imul(W,G)|0,r=Math.imul(W,Q),i=i+Math.imul(O,K)|0,o=(o=o+Math.imul(O,J)|0)+Math.imul(R,K)|0,r=r+Math.imul(R,J)|0,i=i+Math.imul(E,$)|0,o=(o=o+Math.imul(E,ee)|0)+Math.imul(A,$)|0,r=r+Math.imul(A,ee)|0,i=i+Math.imul(D,ne)|0,o=(o=o+Math.imul(D,ie)|0)+Math.imul(k,ne)|0,r=r+Math.imul(k,ie)|0,i=i+Math.imul(I,re)|0,o=(o=o+Math.imul(I,se)|0)+Math.imul(N,re)|0,r=r+Math.imul(N,se)|0,i=i+Math.imul(C,ue)|0,o=(o=o+Math.imul(C,le)|0)+Math.imul(S,ue)|0,r=r+Math.imul(S,le)|0,i=i+Math.imul(_,he)|0,o=(o=o+Math.imul(_,de)|0)+Math.imul(w,he)|0,r=r+Math.imul(w,de)|0;var Ne=(l+(i=i+Math.imul(v,pe)|0)|0)+((8191&(o=(o=o+Math.imul(v,ge)|0)+Math.imul(y,pe)|0))<<13)|0;l=((r=r+Math.imul(y,ge)|0)+(o>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,i=Math.imul(z,K),o=(o=Math.imul(z,J))+Math.imul(W,K)|0,r=Math.imul(W,J),i=i+Math.imul(O,$)|0,o=(o=o+Math.imul(O,ee)|0)+Math.imul(R,$)|0,r=r+Math.imul(R,ee)|0,i=i+Math.imul(E,ne)|0,o=(o=o+Math.imul(E,ie)|0)+Math.imul(A,ne)|0,r=r+Math.imul(A,ie)|0,i=i+Math.imul(D,re)|0,o=(o=o+Math.imul(D,se)|0)+Math.imul(k,re)|0,r=r+Math.imul(k,se)|0,i=i+Math.imul(I,ue)|0,o=(o=o+Math.imul(I,le)|0)+Math.imul(N,ue)|0,r=r+Math.imul(N,le)|0,i=i+Math.imul(C,he)|0,o=(o=o+Math.imul(C,de)|0)+Math.imul(S,he)|0,r=r+Math.imul(S,de)|0;var xe=(l+(i=i+Math.imul(_,pe)|0)|0)+((8191&(o=(o=o+Math.imul(_,ge)|0)+Math.imul(w,pe)|0))<<13)|0;l=((r=r+Math.imul(w,ge)|0)+(o>>>13)|0)+(xe>>>26)|0,xe&=67108863,i=Math.imul(z,$),o=(o=Math.imul(z,ee))+Math.imul(W,$)|0,r=Math.imul(W,ee),i=i+Math.imul(O,ne)|0,o=(o=o+Math.imul(O,ie)|0)+Math.imul(R,ne)|0,r=r+Math.imul(R,ie)|0,i=i+Math.imul(E,re)|0,o=(o=o+Math.imul(E,se)|0)+Math.imul(A,re)|0,r=r+Math.imul(A,se)|0,i=i+Math.imul(D,ue)|0,o=(o=o+Math.imul(D,le)|0)+Math.imul(k,ue)|0,r=r+Math.imul(k,le)|0,i=i+Math.imul(I,he)|0,o=(o=o+Math.imul(I,de)|0)+Math.imul(N,he)|0,r=r+Math.imul(N,de)|0;var De=(l+(i=i+Math.imul(C,pe)|0)|0)+((8191&(o=(o=o+Math.imul(C,ge)|0)+Math.imul(S,pe)|0))<<13)|0;l=((r=r+Math.imul(S,ge)|0)+(o>>>13)|0)+(De>>>26)|0,De&=67108863,i=Math.imul(z,ne),o=(o=Math.imul(z,ie))+Math.imul(W,ne)|0,r=Math.imul(W,ie),i=i+Math.imul(O,re)|0,o=(o=o+Math.imul(O,se)|0)+Math.imul(R,re)|0,r=r+Math.imul(R,se)|0,i=i+Math.imul(E,ue)|0,o=(o=o+Math.imul(E,le)|0)+Math.imul(A,ue)|0,r=r+Math.imul(A,le)|0,i=i+Math.imul(D,he)|0,o=(o=o+Math.imul(D,de)|0)+Math.imul(k,he)|0,r=r+Math.imul(k,de)|0;var ke=(l+(i=i+Math.imul(I,pe)|0)|0)+((8191&(o=(o=o+Math.imul(I,ge)|0)+Math.imul(N,pe)|0))<<13)|0;l=((r=r+Math.imul(N,ge)|0)+(o>>>13)|0)+(ke>>>26)|0,ke&=67108863,i=Math.imul(z,re),o=(o=Math.imul(z,se))+Math.imul(W,re)|0,r=Math.imul(W,se),i=i+Math.imul(O,ue)|0,o=(o=o+Math.imul(O,le)|0)+Math.imul(R,ue)|0,r=r+Math.imul(R,le)|0,i=i+Math.imul(E,he)|0,o=(o=o+Math.imul(E,de)|0)+Math.imul(A,he)|0,r=r+Math.imul(A,de)|0;var Te=(l+(i=i+Math.imul(D,pe)|0)|0)+((8191&(o=(o=o+Math.imul(D,ge)|0)+Math.imul(k,pe)|0))<<13)|0;l=((r=r+Math.imul(k,ge)|0)+(o>>>13)|0)+(Te>>>26)|0,Te&=67108863,i=Math.imul(z,ue),o=(o=Math.imul(z,le))+Math.imul(W,ue)|0,r=Math.imul(W,le),i=i+Math.imul(O,he)|0,o=(o=o+Math.imul(O,de)|0)+Math.imul(R,he)|0,r=r+Math.imul(R,de)|0;var Ee=(l+(i=i+Math.imul(E,pe)|0)|0)+((8191&(o=(o=o+Math.imul(E,ge)|0)+Math.imul(A,pe)|0))<<13)|0;l=((r=r+Math.imul(A,ge)|0)+(o>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,i=Math.imul(z,he),o=(o=Math.imul(z,de))+Math.imul(W,he)|0,r=Math.imul(W,de);var Ae=(l+(i=i+Math.imul(O,pe)|0)|0)+((8191&(o=(o=o+Math.imul(O,ge)|0)+Math.imul(R,pe)|0))<<13)|0;l=((r=r+Math.imul(R,ge)|0)+(o>>>13)|0)+(Ae>>>26)|0,Ae&=67108863;var je=(l+(i=Math.imul(z,pe))|0)+((8191&(o=(o=Math.imul(z,ge))+Math.imul(W,pe)|0))<<13)|0;return l=((r=Math.imul(W,ge))+(o>>>13)|0)+(je>>>26)|0,je&=67108863,u[0]=me,u[1]=ve,u[2]=ye,u[3]=be,u[4]=_e,u[5]=we,u[6]=Me,u[7]=Ce,u[8]=Se,u[9]=Le,u[10]=Ie,u[11]=Ne,u[12]=xe,u[13]=De,u[14]=ke,u[15]=Te,u[16]=Ee,u[17]=Ae,u[18]=je,0!==l&&(u[19]=l,n.length++),n};function g(e,t,n){return(new m).mulp(e,t,n)}function m(e,t){this.x=e,this.y=t}Math.imul||(p=f),r.prototype.mulTo=function(e,t){var n,i=this.length+e.length;return n=10===this.length&&10===e.length?p(this,e,t):i<63?f(this,e,t):i<1024?function(e,t,n){n.negative=t.negative^e.negative,n.length=e.length+t.length;for(var i=0,o=0,r=0;r>>26)|0)>>>26,s&=67108863}n.words[r]=a,i=s,s=o}return 0!==i?n.words[r]=i:n.length--,n.strip()}(this,e,t):g(this,e,t),n},m.prototype.makeRBT=function(e){for(var t=new Array(e),n=r.prototype._countBits(e)-1,i=0;i>=1;return i},m.prototype.permute=function(e,t,n,i,o,r){for(var s=0;s>>=1)o++;return 1<>>=13,n[2*s+1]=8191&r,r>>>=13;for(s=2*t;s>=26,t+=o/67108864|0,t+=r>>>26,this.words[n]=67108863&r}return 0!==t&&(this.words[n]=t,this.length++),this},r.prototype.muln=function(e){return this.clone().imuln(e)},r.prototype.sqr=function(){return this.mul(this)},r.prototype.isqr=function(){return this.imul(this.clone())},r.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),n=0;n>>o}return t}(e);if(0===t.length)return new r(1);for(var n=this,i=0;i=0);var t,n=e%26,o=(e-n)/26,r=67108863>>>26-n<<26-n;if(0!==n){var s=0;for(t=0;t>>26-n}s&&(this.words[t]=s,this.length++)}if(0!==o){for(t=this.length-1;t>=0;t--)this.words[t+o]=this.words[t];for(t=0;t=0),o=t?(t-t%26)/26:0;var r=e%26,s=Math.min((e-r)/26,this.length),a=67108863^67108863>>>r<s)for(this.length-=s,l=0;l=0&&(0!==c||l>=o);l--){var h=0|this.words[l];this.words[l]=c<<26-r|h>>>r,c=h&a}return u&&0!==c&&(u.words[u.length++]=c),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},r.prototype.ishrn=function(e,t,n){return i(0===this.negative),this.iushrn(e,t,n)},r.prototype.shln=function(e){return this.clone().ishln(e)},r.prototype.ushln=function(e){return this.clone().iushln(e)},r.prototype.shrn=function(e){return this.clone().ishrn(e)},r.prototype.ushrn=function(e){return this.clone().iushrn(e)},r.prototype.testn=function(e){i("number"==typeof e&&e>=0);var t=e%26,n=(e-t)/26,o=1<=0);var t=e%26,n=(e-t)/26;if(i(0===this.negative,"imaskn works only with positive numbers"),this.length<=n)return this;if(0!==t&&n++,this.length=Math.min(n,this.length),0!==t){var o=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},r.prototype.isubn=function(e){if(i("number"==typeof e),i(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(u/67108864|0),this.words[o+n]=67108863&r}for(;o>26,this.words[o+n]=67108863&r;if(0===a)return this.strip();for(i(-1===a),a=0,o=0;o>26,this.words[o]=67108863&r;return this.negative=1,this.strip()},r.prototype._wordDiv=function(e,t){var n=(this.length,e.length),i=this.clone(),o=e,s=0|o.words[o.length-1];0!=(n=26-this._countBits(s))&&(o=o.ushln(n),i.iushln(n),s=0|o.words[o.length-1]);var a,u=i.length-o.length;if("mod"!==t){(a=new r(null)).length=u+1,a.words=new Array(a.length);for(var l=0;l=0;h--){var d=67108864*(0|i.words[o.length+h])+(0|i.words[o.length+h-1]);for(d=Math.min(d/s|0,67108863),i._ishlnsubmul(o,d,h);0!==i.negative;)d--,i.negative=0,i._ishlnsubmul(o,1,h),i.isZero()||(i.negative^=1);a&&(a.words[h]=d)}return a&&a.strip(),i.strip(),"div"!==t&&0!==n&&i.iushrn(n),{div:a||null,mod:i}},r.prototype.divmod=function(e,t,n){return i(!e.isZero()),this.isZero()?{div:new r(0),mod:new r(0)}:0!==this.negative&&0===e.negative?(a=this.neg().divmod(e,t),"mod"!==t&&(o=a.div.neg()),"div"!==t&&(s=a.mod.neg(),n&&0!==s.negative&&s.iadd(e)),{div:o,mod:s}):0===this.negative&&0!==e.negative?(a=this.divmod(e.neg(),t),"mod"!==t&&(o=a.div.neg()),{div:o,mod:a.mod}):this.negative&e.negative?(a=this.neg().divmod(e.neg(),t),"div"!==t&&(s=a.mod.neg(),n&&0!==s.negative&&s.isub(e)),{div:a.div,mod:s}):e.length>this.length||this.cmp(e)<0?{div:new r(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new r(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new r(this.modn(e.words[0]))}:this._wordDiv(e,t);var o,s,a},r.prototype.div=function(e){return this.divmod(e,"div",!1).div},r.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},r.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},r.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var n=0!==t.div.negative?t.mod.isub(e):t.mod,i=e.ushrn(1),o=e.andln(1),r=n.cmp(i);return r<0||1===o&&0===r?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},r.prototype.modn=function(e){i(e<=67108863);for(var t=(1<<26)%e,n=0,o=this.length-1;o>=0;o--)n=(t*n+(0|this.words[o]))%e;return n},r.prototype.idivn=function(e){i(e<=67108863);for(var t=0,n=this.length-1;n>=0;n--){var o=(0|this.words[n])+67108864*t;this.words[n]=o/e|0,t=o%e}return this.strip()},r.prototype.divn=function(e){return this.clone().idivn(e)},r.prototype.egcd=function(e){i(0===e.negative),i(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var o=new r(1),s=new r(0),a=new r(0),u=new r(1),l=0;t.isEven()&&n.isEven();)t.iushrn(1),n.iushrn(1),++l;for(var c=n.clone(),h=t.clone();!t.isZero();){for(var d=0,f=1;!(t.words[0]&f)&&d<26;++d,f<<=1);if(d>0)for(t.iushrn(d);d-- >0;)(o.isOdd()||s.isOdd())&&(o.iadd(c),s.isub(h)),o.iushrn(1),s.iushrn(1);for(var p=0,g=1;!(n.words[0]&g)&&p<26;++p,g<<=1);if(p>0)for(n.iushrn(p);p-- >0;)(a.isOdd()||u.isOdd())&&(a.iadd(c),u.isub(h)),a.iushrn(1),u.iushrn(1);t.cmp(n)>=0?(t.isub(n),o.isub(a),s.isub(u)):(n.isub(t),a.isub(o),u.isub(s))}return{a,b:u,gcd:n.iushln(l)}},r.prototype._invmp=function(e){i(0===e.negative),i(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var o,s=new r(1),a=new r(0),u=n.clone();t.cmpn(1)>0&&n.cmpn(1)>0;){for(var l=0,c=1;!(t.words[0]&c)&&l<26;++l,c<<=1);if(l>0)for(t.iushrn(l);l-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);for(var h=0,d=1;!(n.words[0]&d)&&h<26;++h,d<<=1);if(h>0)for(n.iushrn(h);h-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);t.cmp(n)>=0?(t.isub(n),s.isub(a)):(n.isub(t),a.isub(s))}return(o=0===t.cmpn(1)?s:a).cmpn(0)<0&&o.iadd(e),o},r.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),n=e.clone();t.negative=0,n.negative=0;for(var i=0;t.isEven()&&n.isEven();i++)t.iushrn(1),n.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;n.isEven();)n.iushrn(1);var o=t.cmp(n);if(o<0){var r=t;t=n,n=r}else if(0===o||0===n.cmpn(1))break;t.isub(n)}return n.iushln(i)},r.prototype.invm=function(e){return this.egcd(e).a.umod(e)},r.prototype.isEven=function(){return!(1&this.words[0])},r.prototype.isOdd=function(){return!(1&~this.words[0])},r.prototype.andln=function(e){return this.words[0]&e},r.prototype.bincn=function(e){i("number"==typeof e);var t=e%26,n=(e-t)/26,o=1<>>26,a&=67108863,this.words[s]=a}return 0!==r&&(this.words[s]=r,this.length++),this},r.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},r.prototype.cmpn=function(e){var t,n=e<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this.strip(),this.length>1)t=1;else{n&&(e=-e),i(e<=67108863,"Number is too big");var o=0|this.words[0];t=o===e?0:oe.length)return 1;if(this.length=0;n--){var i=0|this.words[n],o=0|e.words[n];if(i!==o){io&&(t=1);break}}return t},r.prototype.gtn=function(e){return 1===this.cmpn(e)},r.prototype.gt=function(e){return 1===this.cmp(e)},r.prototype.gten=function(e){return this.cmpn(e)>=0},r.prototype.gte=function(e){return this.cmp(e)>=0},r.prototype.ltn=function(e){return-1===this.cmpn(e)},r.prototype.lt=function(e){return-1===this.cmp(e)},r.prototype.lten=function(e){return this.cmpn(e)<=0},r.prototype.lte=function(e){return this.cmp(e)<=0},r.prototype.eqn=function(e){return 0===this.cmpn(e)},r.prototype.eq=function(e){return 0===this.cmp(e)},r.red=function(e){return new C(e)},r.prototype.toRed=function(e){return i(!this.red,"Already a number in reduction context"),i(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},r.prototype.fromRed=function(){return i(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},r.prototype._forceRed=function(e){return this.red=e,this},r.prototype.forceRed=function(e){return i(!this.red,"Already a number in reduction context"),this._forceRed(e)},r.prototype.redAdd=function(e){return i(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},r.prototype.redIAdd=function(e){return i(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},r.prototype.redSub=function(e){return i(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},r.prototype.redISub=function(e){return i(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},r.prototype.redShl=function(e){return i(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},r.prototype.redMul=function(e){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},r.prototype.redIMul=function(e){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},r.prototype.redSqr=function(){return i(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},r.prototype.redISqr=function(){return i(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},r.prototype.redSqrt=function(){return i(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},r.prototype.redInvm=function(){return i(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},r.prototype.redNeg=function(){return i(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},r.prototype.redPow=function(e){return i(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var v={k256:null,p224:null,p192:null,p25519:null};function y(e,t){this.name=e,this.p=new r(t,16),this.n=this.p.bitLength(),this.k=new r(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function b(){y.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function _(){y.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){y.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function M(){y.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function C(e){if("string"==typeof e){var t=r._prime(e);this.m=t.p,this.prime=t}else i(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function S(e){C.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new r(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}y.prototype._tmp=function(){var e=new r(null);return e.words=new Array(Math.ceil(this.n/13)),e},y.prototype.ireduce=function(e){var t,n=e;do{this.split(n,this.tmp),t=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(t>this.n);var i=t0?n.isub(this.p):void 0!==n.strip?n.strip():n._strip(),n},y.prototype.split=function(e,t){e.iushrn(this.n,0,t)},y.prototype.imulK=function(e){return e.imul(this.k)},o(b,y),b.prototype.split=function(e,t){for(var n=4194303,i=Math.min(e.length,9),o=0;o>>22,r=s}r>>>=22,e.words[o-10]=r,0===r&&e.length>10?e.length-=10:e.length-=9},b.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,n=0;n>>=26,e.words[n]=o,t=i}return 0!==t&&(e.words[e.length++]=t),e},r._prime=function(e){if(v[e])return v[e];var t;if("k256"===e)t=new b;else if("p224"===e)t=new _;else if("p192"===e)t=new w;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new M}return v[e]=t,t},C.prototype._verify1=function(e){i(0===e.negative,"red works only with positives"),i(e.red,"red works only with red numbers")},C.prototype._verify2=function(e,t){i(!(e.negative|t.negative),"red works only with positives"),i(e.red&&e.red===t.red,"red works only with red numbers")},C.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},C.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},C.prototype.add=function(e,t){this._verify2(e,t);var n=e.add(t);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},C.prototype.iadd=function(e,t){this._verify2(e,t);var n=e.iadd(t);return n.cmp(this.m)>=0&&n.isub(this.m),n},C.prototype.sub=function(e,t){this._verify2(e,t);var n=e.sub(t);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},C.prototype.isub=function(e,t){this._verify2(e,t);var n=e.isub(t);return n.cmpn(0)<0&&n.iadd(this.m),n},C.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},C.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},C.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},C.prototype.isqr=function(e){return this.imul(e,e.clone())},C.prototype.sqr=function(e){return this.mul(e,e)},C.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(i(t%2==1),3===t){var n=this.m.add(new r(1)).iushrn(2);return this.pow(e,n)}for(var o=this.m.subn(1),s=0;!o.isZero()&&0===o.andln(1);)s++,o.iushrn(1);i(!o.isZero());var a=new r(1).toRed(this),u=a.redNeg(),l=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new r(2*c*c).toRed(this);0!==this.pow(c,l).cmp(u);)c.redIAdd(u);for(var h=this.pow(c,o),d=this.pow(e,o.addn(1).iushrn(1)),f=this.pow(e,o),p=s;0!==f.cmp(a);){for(var g=f,m=0;0!==g.cmp(a);m++)g=g.redSqr();i(m=0;i--){for(var l=t.words[i],c=u-1;c>=0;c--){var h=l>>c&1;o!==n[0]&&(o=this.sqr(o)),0!==h||0!==s?(s<<=1,s|=h,(4==++a||0===i&&0===c)&&(o=this.mul(o,n[s]),a=0,s=0)):a=0}u=26}return o},C.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},C.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},r.mont=function(e){return new S(e)},o(S,C),S.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},S.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},S.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var n=e.imul(t),i=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=n.isub(i).iushrn(this.shift),r=o;return o.cmp(this.m)>=0?r=o.isub(this.m):o.cmpn(0)<0&&(r=o.iadd(this.m)),r._forceRed(this)},S.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new r(0)._forceRed(this);var n=e.mul(t),i=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=n.isub(i).iushrn(this.shift),s=o;return o.cmp(this.m)>=0?s=o.isub(this.m):o.cmpn(0)<0&&(s=o.iadd(this.m)),s._forceRed(this)},S.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=n.nmd(e),this)},1117:(e,t)=>{"use strict";t.byteLength=function(e){var t=a(e),n=t[0],i=t[1];return 3*(n+i)/4-i},t.toByteArray=function(e){var t,n,r=a(e),s=r[0],u=r[1],l=new o(function(e,t,n){return 3*(t+n)/4-n}(0,s,u)),c=0,h=u>0?s-4:s;for(n=0;n>16&255,l[c++]=t>>8&255,l[c++]=255&t;return 2===u&&(t=i[e.charCodeAt(n)]<<2|i[e.charCodeAt(n+1)]>>4,l[c++]=255&t),1===u&&(t=i[e.charCodeAt(n)]<<10|i[e.charCodeAt(n+1)]<<4|i[e.charCodeAt(n+2)]>>2,l[c++]=t>>8&255,l[c++]=255&t),l},t.fromByteArray=function(e){for(var t,i=e.length,o=i%3,r=[],s=16383,a=0,l=i-o;al?l:a+s));return 1===o?(t=e[i-1],r.push(n[t>>2]+n[t<<4&63]+"==")):2===o&&(t=(e[i-2]<<8)+e[i-1],r.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"=")),r.join("")};for(var n=[],i=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0;s<64;++s)n[s]=r[s],i[r.charCodeAt(s)]=s;function a(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function u(e,t,i){for(var o,r,s=[],a=t;a>18&63]+n[r>>12&63]+n[r>>6&63]+n[63&r]);return s.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},4917:function(e,t,n){!function(e,t){"use strict";function i(e,t){if(!e)throw new Error(t||"Assertion failed")}function o(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}function r(e,t,n){if(r.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(n=t,t=10),this._init(e||0,t||10,n||"be"))}var s;"object"==typeof e?e.exports=r:t.BN=r,r.BN=r,r.wordSize=26;try{s="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:n(5409).Buffer}catch(e){}function a(e,t){var n=e.charCodeAt(t);return n>=48&&n<=57?n-48:n>=65&&n<=70?n-55:n>=97&&n<=102?n-87:void i(!1,"Invalid character in "+e)}function u(e,t,n){var i=a(e,n);return n-1>=t&&(i|=a(e,n-1)<<4),i}function l(e,t,n,o){for(var r=0,s=0,a=Math.min(e.length,n),u=t;u=49?l-49+10:l>=17?l-17+10:l,i(l>=0&&s0?e:t},r.min=function(e,t){return e.cmp(t)<0?e:t},r.prototype._init=function(e,t,n){if("number"==typeof e)return this._initNumber(e,t,n);if("object"==typeof e)return this._initArray(e,t,n);"hex"===t&&(t=16),i(t===(0|t)&&t>=2&&t<=36);var o=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(o++,this.negative=1),o=0;o-=3)s=e[o]|e[o-1]<<8|e[o-2]<<16,this.words[r]|=s<>>26-a&67108863,(a+=24)>=26&&(a-=26,r++);else if("le"===n)for(o=0,r=0;o>>26-a&67108863,(a+=24)>=26&&(a-=26,r++);return this._strip()},r.prototype._parseHex=function(e,t,n){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var i=0;i=t;i-=2)o=u(e,t,i)<=18?(r-=18,s+=1,this.words[s]|=o>>>26):r+=8;else for(i=(e.length-t)%2==0?t+1:t;i=18?(r-=18,s+=1,this.words[s]|=o>>>26):r+=8;this._strip()},r.prototype._parseBase=function(e,t,n){this.words=[0],this.length=1;for(var i=0,o=1;o<=67108863;o*=t)i++;i--,o=o/t|0;for(var r=e.length-n,s=r%i,a=Math.min(r,r-s)+n,u=0,c=n;c1&&0===this.words[this.length-1];)this.length--;return this._normSign()},r.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{r.prototype[Symbol.for("nodejs.util.inspect.custom")]=h}catch(e){r.prototype.inspect=h}else r.prototype.inspect=h;function h(){return(this.red?""}var d=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],f=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],p=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function g(e,t,n){n.negative=t.negative^e.negative;var i=e.length+t.length|0;n.length=i,i=i-1|0;var o=0|e.words[0],r=0|t.words[0],s=o*r,a=67108863&s,u=s/67108864|0;n.words[0]=a;for(var l=1;l>>26,h=67108863&u,d=Math.min(l,t.length-1),f=Math.max(0,l-e.length+1);f<=d;f++){var p=l-f|0;c+=(s=(o=0|e.words[p])*(r=0|t.words[f])+h)/67108864|0,h=67108863&s}n.words[l]=0|h,u=0|c}return 0!==u?n.words[l]=0|u:n.length--,n._strip()}r.prototype.toString=function(e,t){var n;if(t=0|t||1,16===(e=e||10)||"hex"===e){n="";for(var o=0,r=0,s=0;s>>24-o&16777215,(o+=2)>=26&&(o-=26,s--),n=0!==r||s!==this.length-1?d[6-u.length]+u+n:u+n}for(0!==r&&(n=r.toString(16)+n);n.length%t!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(e===(0|e)&&e>=2&&e<=36){var l=f[e],c=p[e];n="";var h=this.clone();for(h.negative=0;!h.isZero();){var g=h.modrn(c).toString(e);n=(h=h.idivn(c)).isZero()?g+n:d[l-g.length]+g+n}for(this.isZero()&&(n="0"+n);n.length%t!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}i(!1,"Base should be between 2 and 36")},r.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&i(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},r.prototype.toJSON=function(){return this.toString(16,2)},s&&(r.prototype.toBuffer=function(e,t){return this.toArrayLike(s,e,t)}),r.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},r.prototype.toArrayLike=function(e,t,n){this._strip();var o=this.byteLength(),r=n||Math.max(1,o);i(o<=r,"byte array longer than desired length"),i(r>0,"Requested array length <= 0");var s=function(e,t){return e.allocUnsafe?e.allocUnsafe(t):new e(t)}(e,r);return this["_toArrayLike"+("le"===t?"LE":"BE")](s,o),s},r.prototype._toArrayLikeLE=function(e,t){for(var n=0,i=0,o=0,r=0;o>8&255),n>16&255),6===r?(n>24&255),i=0,r=0):(i=s>>>24,r+=2)}if(n=0&&(e[n--]=s>>8&255),n>=0&&(e[n--]=s>>16&255),6===r?(n>=0&&(e[n--]=s>>24&255),i=0,r=0):(i=s>>>24,r+=2)}if(n>=0)for(e[n--]=i;n>=0;)e[n--]=0},Math.clz32?r.prototype._countBits=function(e){return 32-Math.clz32(e)}:r.prototype._countBits=function(e){var t=e,n=0;return t>=4096&&(n+=13,t>>>=13),t>=64&&(n+=7,t>>>=7),t>=8&&(n+=4,t>>>=4),t>=2&&(n+=2,t>>>=2),n+t},r.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,n=0;return 8191&t||(n+=13,t>>>=13),127&t||(n+=7,t>>>=7),15&t||(n+=4,t>>>=4),3&t||(n+=2,t>>>=2),1&t||n++,n},r.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},r.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},r.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},r.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var n=0;ne.length?this.clone().iand(e):e.clone().iand(this)},r.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},r.prototype.iuxor=function(e){var t,n;this.length>e.length?(t=this,n=e):(t=e,n=this);for(var i=0;ie.length?this.clone().ixor(e):e.clone().ixor(this)},r.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},r.prototype.inotn=function(e){i("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),n=e%26;this._expand(t),n>0&&t--;for(var o=0;o0&&(this.words[o]=~this.words[o]&67108863>>26-n),this._strip()},r.prototype.notn=function(e){return this.clone().inotn(e)},r.prototype.setn=function(e,t){i("number"==typeof e&&e>=0);var n=e/26|0,o=e%26;return this._expand(n+1),this.words[n]=t?this.words[n]|1<e.length?(n=this,i=e):(n=e,i=this);for(var o=0,r=0;r>>26;for(;0!==o&&r>>26;if(this.length=n.length,0!==o)this.words[this.length]=o,this.length++;else if(n!==this)for(;re.length?this.clone().iadd(e):e.clone().iadd(this)},r.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var n,i,o=this.cmp(e);if(0===o)return this.negative=0,this.length=1,this.words[0]=0,this;o>0?(n=this,i=e):(n=e,i=this);for(var r=0,s=0;s>26,this.words[s]=67108863&t;for(;0!==r&&s>26,this.words[s]=67108863&t;if(0===r&&s>>13,f=0|s[1],p=8191&f,g=f>>>13,m=0|s[2],v=8191&m,y=m>>>13,b=0|s[3],_=8191&b,w=b>>>13,M=0|s[4],C=8191&M,S=M>>>13,L=0|s[5],I=8191&L,N=L>>>13,x=0|s[6],D=8191&x,k=x>>>13,T=0|s[7],E=8191&T,A=T>>>13,j=0|s[8],O=8191&j,R=j>>>13,P=0|s[9],z=8191&P,W=P>>>13,F=0|a[0],B=8191&F,H=F>>>13,V=0|a[1],U=8191&V,Y=V>>>13,Z=0|a[2],G=8191&Z,Q=Z>>>13,q=0|a[3],K=8191&q,J=q>>>13,X=0|a[4],$=8191&X,ee=X>>>13,te=0|a[5],ne=8191&te,ie=te>>>13,oe=0|a[6],re=8191&oe,se=oe>>>13,ae=0|a[7],ue=8191&ae,le=ae>>>13,ce=0|a[8],he=8191&ce,de=ce>>>13,fe=0|a[9],pe=8191&fe,ge=fe>>>13;n.negative=e.negative^t.negative,n.length=19;var me=(l+(i=Math.imul(h,B))|0)+((8191&(o=(o=Math.imul(h,H))+Math.imul(d,B)|0))<<13)|0;l=((r=Math.imul(d,H))+(o>>>13)|0)+(me>>>26)|0,me&=67108863,i=Math.imul(p,B),o=(o=Math.imul(p,H))+Math.imul(g,B)|0,r=Math.imul(g,H);var ve=(l+(i=i+Math.imul(h,U)|0)|0)+((8191&(o=(o=o+Math.imul(h,Y)|0)+Math.imul(d,U)|0))<<13)|0;l=((r=r+Math.imul(d,Y)|0)+(o>>>13)|0)+(ve>>>26)|0,ve&=67108863,i=Math.imul(v,B),o=(o=Math.imul(v,H))+Math.imul(y,B)|0,r=Math.imul(y,H),i=i+Math.imul(p,U)|0,o=(o=o+Math.imul(p,Y)|0)+Math.imul(g,U)|0,r=r+Math.imul(g,Y)|0;var ye=(l+(i=i+Math.imul(h,G)|0)|0)+((8191&(o=(o=o+Math.imul(h,Q)|0)+Math.imul(d,G)|0))<<13)|0;l=((r=r+Math.imul(d,Q)|0)+(o>>>13)|0)+(ye>>>26)|0,ye&=67108863,i=Math.imul(_,B),o=(o=Math.imul(_,H))+Math.imul(w,B)|0,r=Math.imul(w,H),i=i+Math.imul(v,U)|0,o=(o=o+Math.imul(v,Y)|0)+Math.imul(y,U)|0,r=r+Math.imul(y,Y)|0,i=i+Math.imul(p,G)|0,o=(o=o+Math.imul(p,Q)|0)+Math.imul(g,G)|0,r=r+Math.imul(g,Q)|0;var be=(l+(i=i+Math.imul(h,K)|0)|0)+((8191&(o=(o=o+Math.imul(h,J)|0)+Math.imul(d,K)|0))<<13)|0;l=((r=r+Math.imul(d,J)|0)+(o>>>13)|0)+(be>>>26)|0,be&=67108863,i=Math.imul(C,B),o=(o=Math.imul(C,H))+Math.imul(S,B)|0,r=Math.imul(S,H),i=i+Math.imul(_,U)|0,o=(o=o+Math.imul(_,Y)|0)+Math.imul(w,U)|0,r=r+Math.imul(w,Y)|0,i=i+Math.imul(v,G)|0,o=(o=o+Math.imul(v,Q)|0)+Math.imul(y,G)|0,r=r+Math.imul(y,Q)|0,i=i+Math.imul(p,K)|0,o=(o=o+Math.imul(p,J)|0)+Math.imul(g,K)|0,r=r+Math.imul(g,J)|0;var _e=(l+(i=i+Math.imul(h,$)|0)|0)+((8191&(o=(o=o+Math.imul(h,ee)|0)+Math.imul(d,$)|0))<<13)|0;l=((r=r+Math.imul(d,ee)|0)+(o>>>13)|0)+(_e>>>26)|0,_e&=67108863,i=Math.imul(I,B),o=(o=Math.imul(I,H))+Math.imul(N,B)|0,r=Math.imul(N,H),i=i+Math.imul(C,U)|0,o=(o=o+Math.imul(C,Y)|0)+Math.imul(S,U)|0,r=r+Math.imul(S,Y)|0,i=i+Math.imul(_,G)|0,o=(o=o+Math.imul(_,Q)|0)+Math.imul(w,G)|0,r=r+Math.imul(w,Q)|0,i=i+Math.imul(v,K)|0,o=(o=o+Math.imul(v,J)|0)+Math.imul(y,K)|0,r=r+Math.imul(y,J)|0,i=i+Math.imul(p,$)|0,o=(o=o+Math.imul(p,ee)|0)+Math.imul(g,$)|0,r=r+Math.imul(g,ee)|0;var we=(l+(i=i+Math.imul(h,ne)|0)|0)+((8191&(o=(o=o+Math.imul(h,ie)|0)+Math.imul(d,ne)|0))<<13)|0;l=((r=r+Math.imul(d,ie)|0)+(o>>>13)|0)+(we>>>26)|0,we&=67108863,i=Math.imul(D,B),o=(o=Math.imul(D,H))+Math.imul(k,B)|0,r=Math.imul(k,H),i=i+Math.imul(I,U)|0,o=(o=o+Math.imul(I,Y)|0)+Math.imul(N,U)|0,r=r+Math.imul(N,Y)|0,i=i+Math.imul(C,G)|0,o=(o=o+Math.imul(C,Q)|0)+Math.imul(S,G)|0,r=r+Math.imul(S,Q)|0,i=i+Math.imul(_,K)|0,o=(o=o+Math.imul(_,J)|0)+Math.imul(w,K)|0,r=r+Math.imul(w,J)|0,i=i+Math.imul(v,$)|0,o=(o=o+Math.imul(v,ee)|0)+Math.imul(y,$)|0,r=r+Math.imul(y,ee)|0,i=i+Math.imul(p,ne)|0,o=(o=o+Math.imul(p,ie)|0)+Math.imul(g,ne)|0,r=r+Math.imul(g,ie)|0;var Me=(l+(i=i+Math.imul(h,re)|0)|0)+((8191&(o=(o=o+Math.imul(h,se)|0)+Math.imul(d,re)|0))<<13)|0;l=((r=r+Math.imul(d,se)|0)+(o>>>13)|0)+(Me>>>26)|0,Me&=67108863,i=Math.imul(E,B),o=(o=Math.imul(E,H))+Math.imul(A,B)|0,r=Math.imul(A,H),i=i+Math.imul(D,U)|0,o=(o=o+Math.imul(D,Y)|0)+Math.imul(k,U)|0,r=r+Math.imul(k,Y)|0,i=i+Math.imul(I,G)|0,o=(o=o+Math.imul(I,Q)|0)+Math.imul(N,G)|0,r=r+Math.imul(N,Q)|0,i=i+Math.imul(C,K)|0,o=(o=o+Math.imul(C,J)|0)+Math.imul(S,K)|0,r=r+Math.imul(S,J)|0,i=i+Math.imul(_,$)|0,o=(o=o+Math.imul(_,ee)|0)+Math.imul(w,$)|0,r=r+Math.imul(w,ee)|0,i=i+Math.imul(v,ne)|0,o=(o=o+Math.imul(v,ie)|0)+Math.imul(y,ne)|0,r=r+Math.imul(y,ie)|0,i=i+Math.imul(p,re)|0,o=(o=o+Math.imul(p,se)|0)+Math.imul(g,re)|0,r=r+Math.imul(g,se)|0;var Ce=(l+(i=i+Math.imul(h,ue)|0)|0)+((8191&(o=(o=o+Math.imul(h,le)|0)+Math.imul(d,ue)|0))<<13)|0;l=((r=r+Math.imul(d,le)|0)+(o>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,i=Math.imul(O,B),o=(o=Math.imul(O,H))+Math.imul(R,B)|0,r=Math.imul(R,H),i=i+Math.imul(E,U)|0,o=(o=o+Math.imul(E,Y)|0)+Math.imul(A,U)|0,r=r+Math.imul(A,Y)|0,i=i+Math.imul(D,G)|0,o=(o=o+Math.imul(D,Q)|0)+Math.imul(k,G)|0,r=r+Math.imul(k,Q)|0,i=i+Math.imul(I,K)|0,o=(o=o+Math.imul(I,J)|0)+Math.imul(N,K)|0,r=r+Math.imul(N,J)|0,i=i+Math.imul(C,$)|0,o=(o=o+Math.imul(C,ee)|0)+Math.imul(S,$)|0,r=r+Math.imul(S,ee)|0,i=i+Math.imul(_,ne)|0,o=(o=o+Math.imul(_,ie)|0)+Math.imul(w,ne)|0,r=r+Math.imul(w,ie)|0,i=i+Math.imul(v,re)|0,o=(o=o+Math.imul(v,se)|0)+Math.imul(y,re)|0,r=r+Math.imul(y,se)|0,i=i+Math.imul(p,ue)|0,o=(o=o+Math.imul(p,le)|0)+Math.imul(g,ue)|0,r=r+Math.imul(g,le)|0;var Se=(l+(i=i+Math.imul(h,he)|0)|0)+((8191&(o=(o=o+Math.imul(h,de)|0)+Math.imul(d,he)|0))<<13)|0;l=((r=r+Math.imul(d,de)|0)+(o>>>13)|0)+(Se>>>26)|0,Se&=67108863,i=Math.imul(z,B),o=(o=Math.imul(z,H))+Math.imul(W,B)|0,r=Math.imul(W,H),i=i+Math.imul(O,U)|0,o=(o=o+Math.imul(O,Y)|0)+Math.imul(R,U)|0,r=r+Math.imul(R,Y)|0,i=i+Math.imul(E,G)|0,o=(o=o+Math.imul(E,Q)|0)+Math.imul(A,G)|0,r=r+Math.imul(A,Q)|0,i=i+Math.imul(D,K)|0,o=(o=o+Math.imul(D,J)|0)+Math.imul(k,K)|0,r=r+Math.imul(k,J)|0,i=i+Math.imul(I,$)|0,o=(o=o+Math.imul(I,ee)|0)+Math.imul(N,$)|0,r=r+Math.imul(N,ee)|0,i=i+Math.imul(C,ne)|0,o=(o=o+Math.imul(C,ie)|0)+Math.imul(S,ne)|0,r=r+Math.imul(S,ie)|0,i=i+Math.imul(_,re)|0,o=(o=o+Math.imul(_,se)|0)+Math.imul(w,re)|0,r=r+Math.imul(w,se)|0,i=i+Math.imul(v,ue)|0,o=(o=o+Math.imul(v,le)|0)+Math.imul(y,ue)|0,r=r+Math.imul(y,le)|0,i=i+Math.imul(p,he)|0,o=(o=o+Math.imul(p,de)|0)+Math.imul(g,he)|0,r=r+Math.imul(g,de)|0;var Le=(l+(i=i+Math.imul(h,pe)|0)|0)+((8191&(o=(o=o+Math.imul(h,ge)|0)+Math.imul(d,pe)|0))<<13)|0;l=((r=r+Math.imul(d,ge)|0)+(o>>>13)|0)+(Le>>>26)|0,Le&=67108863,i=Math.imul(z,U),o=(o=Math.imul(z,Y))+Math.imul(W,U)|0,r=Math.imul(W,Y),i=i+Math.imul(O,G)|0,o=(o=o+Math.imul(O,Q)|0)+Math.imul(R,G)|0,r=r+Math.imul(R,Q)|0,i=i+Math.imul(E,K)|0,o=(o=o+Math.imul(E,J)|0)+Math.imul(A,K)|0,r=r+Math.imul(A,J)|0,i=i+Math.imul(D,$)|0,o=(o=o+Math.imul(D,ee)|0)+Math.imul(k,$)|0,r=r+Math.imul(k,ee)|0,i=i+Math.imul(I,ne)|0,o=(o=o+Math.imul(I,ie)|0)+Math.imul(N,ne)|0,r=r+Math.imul(N,ie)|0,i=i+Math.imul(C,re)|0,o=(o=o+Math.imul(C,se)|0)+Math.imul(S,re)|0,r=r+Math.imul(S,se)|0,i=i+Math.imul(_,ue)|0,o=(o=o+Math.imul(_,le)|0)+Math.imul(w,ue)|0,r=r+Math.imul(w,le)|0,i=i+Math.imul(v,he)|0,o=(o=o+Math.imul(v,de)|0)+Math.imul(y,he)|0,r=r+Math.imul(y,de)|0;var Ie=(l+(i=i+Math.imul(p,pe)|0)|0)+((8191&(o=(o=o+Math.imul(p,ge)|0)+Math.imul(g,pe)|0))<<13)|0;l=((r=r+Math.imul(g,ge)|0)+(o>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,i=Math.imul(z,G),o=(o=Math.imul(z,Q))+Math.imul(W,G)|0,r=Math.imul(W,Q),i=i+Math.imul(O,K)|0,o=(o=o+Math.imul(O,J)|0)+Math.imul(R,K)|0,r=r+Math.imul(R,J)|0,i=i+Math.imul(E,$)|0,o=(o=o+Math.imul(E,ee)|0)+Math.imul(A,$)|0,r=r+Math.imul(A,ee)|0,i=i+Math.imul(D,ne)|0,o=(o=o+Math.imul(D,ie)|0)+Math.imul(k,ne)|0,r=r+Math.imul(k,ie)|0,i=i+Math.imul(I,re)|0,o=(o=o+Math.imul(I,se)|0)+Math.imul(N,re)|0,r=r+Math.imul(N,se)|0,i=i+Math.imul(C,ue)|0,o=(o=o+Math.imul(C,le)|0)+Math.imul(S,ue)|0,r=r+Math.imul(S,le)|0,i=i+Math.imul(_,he)|0,o=(o=o+Math.imul(_,de)|0)+Math.imul(w,he)|0,r=r+Math.imul(w,de)|0;var Ne=(l+(i=i+Math.imul(v,pe)|0)|0)+((8191&(o=(o=o+Math.imul(v,ge)|0)+Math.imul(y,pe)|0))<<13)|0;l=((r=r+Math.imul(y,ge)|0)+(o>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,i=Math.imul(z,K),o=(o=Math.imul(z,J))+Math.imul(W,K)|0,r=Math.imul(W,J),i=i+Math.imul(O,$)|0,o=(o=o+Math.imul(O,ee)|0)+Math.imul(R,$)|0,r=r+Math.imul(R,ee)|0,i=i+Math.imul(E,ne)|0,o=(o=o+Math.imul(E,ie)|0)+Math.imul(A,ne)|0,r=r+Math.imul(A,ie)|0,i=i+Math.imul(D,re)|0,o=(o=o+Math.imul(D,se)|0)+Math.imul(k,re)|0,r=r+Math.imul(k,se)|0,i=i+Math.imul(I,ue)|0,o=(o=o+Math.imul(I,le)|0)+Math.imul(N,ue)|0,r=r+Math.imul(N,le)|0,i=i+Math.imul(C,he)|0,o=(o=o+Math.imul(C,de)|0)+Math.imul(S,he)|0,r=r+Math.imul(S,de)|0;var xe=(l+(i=i+Math.imul(_,pe)|0)|0)+((8191&(o=(o=o+Math.imul(_,ge)|0)+Math.imul(w,pe)|0))<<13)|0;l=((r=r+Math.imul(w,ge)|0)+(o>>>13)|0)+(xe>>>26)|0,xe&=67108863,i=Math.imul(z,$),o=(o=Math.imul(z,ee))+Math.imul(W,$)|0,r=Math.imul(W,ee),i=i+Math.imul(O,ne)|0,o=(o=o+Math.imul(O,ie)|0)+Math.imul(R,ne)|0,r=r+Math.imul(R,ie)|0,i=i+Math.imul(E,re)|0,o=(o=o+Math.imul(E,se)|0)+Math.imul(A,re)|0,r=r+Math.imul(A,se)|0,i=i+Math.imul(D,ue)|0,o=(o=o+Math.imul(D,le)|0)+Math.imul(k,ue)|0,r=r+Math.imul(k,le)|0,i=i+Math.imul(I,he)|0,o=(o=o+Math.imul(I,de)|0)+Math.imul(N,he)|0,r=r+Math.imul(N,de)|0;var De=(l+(i=i+Math.imul(C,pe)|0)|0)+((8191&(o=(o=o+Math.imul(C,ge)|0)+Math.imul(S,pe)|0))<<13)|0;l=((r=r+Math.imul(S,ge)|0)+(o>>>13)|0)+(De>>>26)|0,De&=67108863,i=Math.imul(z,ne),o=(o=Math.imul(z,ie))+Math.imul(W,ne)|0,r=Math.imul(W,ie),i=i+Math.imul(O,re)|0,o=(o=o+Math.imul(O,se)|0)+Math.imul(R,re)|0,r=r+Math.imul(R,se)|0,i=i+Math.imul(E,ue)|0,o=(o=o+Math.imul(E,le)|0)+Math.imul(A,ue)|0,r=r+Math.imul(A,le)|0,i=i+Math.imul(D,he)|0,o=(o=o+Math.imul(D,de)|0)+Math.imul(k,he)|0,r=r+Math.imul(k,de)|0;var ke=(l+(i=i+Math.imul(I,pe)|0)|0)+((8191&(o=(o=o+Math.imul(I,ge)|0)+Math.imul(N,pe)|0))<<13)|0;l=((r=r+Math.imul(N,ge)|0)+(o>>>13)|0)+(ke>>>26)|0,ke&=67108863,i=Math.imul(z,re),o=(o=Math.imul(z,se))+Math.imul(W,re)|0,r=Math.imul(W,se),i=i+Math.imul(O,ue)|0,o=(o=o+Math.imul(O,le)|0)+Math.imul(R,ue)|0,r=r+Math.imul(R,le)|0,i=i+Math.imul(E,he)|0,o=(o=o+Math.imul(E,de)|0)+Math.imul(A,he)|0,r=r+Math.imul(A,de)|0;var Te=(l+(i=i+Math.imul(D,pe)|0)|0)+((8191&(o=(o=o+Math.imul(D,ge)|0)+Math.imul(k,pe)|0))<<13)|0;l=((r=r+Math.imul(k,ge)|0)+(o>>>13)|0)+(Te>>>26)|0,Te&=67108863,i=Math.imul(z,ue),o=(o=Math.imul(z,le))+Math.imul(W,ue)|0,r=Math.imul(W,le),i=i+Math.imul(O,he)|0,o=(o=o+Math.imul(O,de)|0)+Math.imul(R,he)|0,r=r+Math.imul(R,de)|0;var Ee=(l+(i=i+Math.imul(E,pe)|0)|0)+((8191&(o=(o=o+Math.imul(E,ge)|0)+Math.imul(A,pe)|0))<<13)|0;l=((r=r+Math.imul(A,ge)|0)+(o>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,i=Math.imul(z,he),o=(o=Math.imul(z,de))+Math.imul(W,he)|0,r=Math.imul(W,de);var Ae=(l+(i=i+Math.imul(O,pe)|0)|0)+((8191&(o=(o=o+Math.imul(O,ge)|0)+Math.imul(R,pe)|0))<<13)|0;l=((r=r+Math.imul(R,ge)|0)+(o>>>13)|0)+(Ae>>>26)|0,Ae&=67108863;var je=(l+(i=Math.imul(z,pe))|0)+((8191&(o=(o=Math.imul(z,ge))+Math.imul(W,pe)|0))<<13)|0;return l=((r=Math.imul(W,ge))+(o>>>13)|0)+(je>>>26)|0,je&=67108863,u[0]=me,u[1]=ve,u[2]=ye,u[3]=be,u[4]=_e,u[5]=we,u[6]=Me,u[7]=Ce,u[8]=Se,u[9]=Le,u[10]=Ie,u[11]=Ne,u[12]=xe,u[13]=De,u[14]=ke,u[15]=Te,u[16]=Ee,u[17]=Ae,u[18]=je,0!==l&&(u[19]=l,n.length++),n};function v(e,t,n){n.negative=t.negative^e.negative,n.length=e.length+t.length;for(var i=0,o=0,r=0;r>>26)|0)>>>26,s&=67108863}n.words[r]=a,i=s,s=o}return 0!==i?n.words[r]=i:n.length--,n._strip()}function y(e,t,n){return v(e,t,n)}function b(e,t){this.x=e,this.y=t}Math.imul||(m=g),r.prototype.mulTo=function(e,t){var n=this.length+e.length;return 10===this.length&&10===e.length?m(this,e,t):n<63?g(this,e,t):n<1024?v(this,e,t):y(this,e,t)},b.prototype.makeRBT=function(e){for(var t=new Array(e),n=r.prototype._countBits(e)-1,i=0;i>=1;return i},b.prototype.permute=function(e,t,n,i,o,r){for(var s=0;s>>=1)o++;return 1<>>=13,n[2*s+1]=8191&r,r>>>=13;for(s=2*t;s>=26,n+=r/67108864|0,n+=s>>>26,this.words[o]=67108863&s}return 0!==n&&(this.words[o]=n,this.length++),t?this.ineg():this},r.prototype.muln=function(e){return this.clone().imuln(e)},r.prototype.sqr=function(){return this.mul(this)},r.prototype.isqr=function(){return this.imul(this.clone())},r.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),n=0;n>>o&1}return t}(e);if(0===t.length)return new r(1);for(var n=this,i=0;i=0);var t,n=e%26,o=(e-n)/26,r=67108863>>>26-n<<26-n;if(0!==n){var s=0;for(t=0;t>>26-n}s&&(this.words[t]=s,this.length++)}if(0!==o){for(t=this.length-1;t>=0;t--)this.words[t+o]=this.words[t];for(t=0;t=0),o=t?(t-t%26)/26:0;var r=e%26,s=Math.min((e-r)/26,this.length),a=67108863^67108863>>>r<s)for(this.length-=s,l=0;l=0&&(0!==c||l>=o);l--){var h=0|this.words[l];this.words[l]=c<<26-r|h>>>r,c=h&a}return u&&0!==c&&(u.words[u.length++]=c),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},r.prototype.ishrn=function(e,t,n){return i(0===this.negative),this.iushrn(e,t,n)},r.prototype.shln=function(e){return this.clone().ishln(e)},r.prototype.ushln=function(e){return this.clone().iushln(e)},r.prototype.shrn=function(e){return this.clone().ishrn(e)},r.prototype.ushrn=function(e){return this.clone().iushrn(e)},r.prototype.testn=function(e){i("number"==typeof e&&e>=0);var t=e%26,n=(e-t)/26,o=1<=0);var t=e%26,n=(e-t)/26;if(i(0===this.negative,"imaskn works only with positive numbers"),this.length<=n)return this;if(0!==t&&n++,this.length=Math.min(n,this.length),0!==t){var o=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},r.prototype.isubn=function(e){if(i("number"==typeof e),i(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(u/67108864|0),this.words[o+n]=67108863&r}for(;o>26,this.words[o+n]=67108863&r;if(0===a)return this._strip();for(i(-1===a),a=0,o=0;o>26,this.words[o]=67108863&r;return this.negative=1,this._strip()},r.prototype._wordDiv=function(e,t){var n=(this.length,e.length),i=this.clone(),o=e,s=0|o.words[o.length-1];0!=(n=26-this._countBits(s))&&(o=o.ushln(n),i.iushln(n),s=0|o.words[o.length-1]);var a,u=i.length-o.length;if("mod"!==t){(a=new r(null)).length=u+1,a.words=new Array(a.length);for(var l=0;l=0;h--){var d=67108864*(0|i.words[o.length+h])+(0|i.words[o.length+h-1]);for(d=Math.min(d/s|0,67108863),i._ishlnsubmul(o,d,h);0!==i.negative;)d--,i.negative=0,i._ishlnsubmul(o,1,h),i.isZero()||(i.negative^=1);a&&(a.words[h]=d)}return a&&a._strip(),i._strip(),"div"!==t&&0!==n&&i.iushrn(n),{div:a||null,mod:i}},r.prototype.divmod=function(e,t,n){return i(!e.isZero()),this.isZero()?{div:new r(0),mod:new r(0)}:0!==this.negative&&0===e.negative?(a=this.neg().divmod(e,t),"mod"!==t&&(o=a.div.neg()),"div"!==t&&(s=a.mod.neg(),n&&0!==s.negative&&s.iadd(e)),{div:o,mod:s}):0===this.negative&&0!==e.negative?(a=this.divmod(e.neg(),t),"mod"!==t&&(o=a.div.neg()),{div:o,mod:a.mod}):this.negative&e.negative?(a=this.neg().divmod(e.neg(),t),"div"!==t&&(s=a.mod.neg(),n&&0!==s.negative&&s.isub(e)),{div:a.div,mod:s}):e.length>this.length||this.cmp(e)<0?{div:new r(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new r(this.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new r(this.modrn(e.words[0]))}:this._wordDiv(e,t);var o,s,a},r.prototype.div=function(e){return this.divmod(e,"div",!1).div},r.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},r.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},r.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var n=0!==t.div.negative?t.mod.isub(e):t.mod,i=e.ushrn(1),o=e.andln(1),r=n.cmp(i);return r<0||1===o&&0===r?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},r.prototype.modrn=function(e){var t=e<0;t&&(e=-e),i(e<=67108863);for(var n=(1<<26)%e,o=0,r=this.length-1;r>=0;r--)o=(n*o+(0|this.words[r]))%e;return t?-o:o},r.prototype.modn=function(e){return this.modrn(e)},r.prototype.idivn=function(e){var t=e<0;t&&(e=-e),i(e<=67108863);for(var n=0,o=this.length-1;o>=0;o--){var r=(0|this.words[o])+67108864*n;this.words[o]=r/e|0,n=r%e}return this._strip(),t?this.ineg():this},r.prototype.divn=function(e){return this.clone().idivn(e)},r.prototype.egcd=function(e){i(0===e.negative),i(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var o=new r(1),s=new r(0),a=new r(0),u=new r(1),l=0;t.isEven()&&n.isEven();)t.iushrn(1),n.iushrn(1),++l;for(var c=n.clone(),h=t.clone();!t.isZero();){for(var d=0,f=1;!(t.words[0]&f)&&d<26;++d,f<<=1);if(d>0)for(t.iushrn(d);d-- >0;)(o.isOdd()||s.isOdd())&&(o.iadd(c),s.isub(h)),o.iushrn(1),s.iushrn(1);for(var p=0,g=1;!(n.words[0]&g)&&p<26;++p,g<<=1);if(p>0)for(n.iushrn(p);p-- >0;)(a.isOdd()||u.isOdd())&&(a.iadd(c),u.isub(h)),a.iushrn(1),u.iushrn(1);t.cmp(n)>=0?(t.isub(n),o.isub(a),s.isub(u)):(n.isub(t),a.isub(o),u.isub(s))}return{a,b:u,gcd:n.iushln(l)}},r.prototype._invmp=function(e){i(0===e.negative),i(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var o,s=new r(1),a=new r(0),u=n.clone();t.cmpn(1)>0&&n.cmpn(1)>0;){for(var l=0,c=1;!(t.words[0]&c)&&l<26;++l,c<<=1);if(l>0)for(t.iushrn(l);l-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);for(var h=0,d=1;!(n.words[0]&d)&&h<26;++h,d<<=1);if(h>0)for(n.iushrn(h);h-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);t.cmp(n)>=0?(t.isub(n),s.isub(a)):(n.isub(t),a.isub(s))}return(o=0===t.cmpn(1)?s:a).cmpn(0)<0&&o.iadd(e),o},r.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),n=e.clone();t.negative=0,n.negative=0;for(var i=0;t.isEven()&&n.isEven();i++)t.iushrn(1),n.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;n.isEven();)n.iushrn(1);var o=t.cmp(n);if(o<0){var r=t;t=n,n=r}else if(0===o||0===n.cmpn(1))break;t.isub(n)}return n.iushln(i)},r.prototype.invm=function(e){return this.egcd(e).a.umod(e)},r.prototype.isEven=function(){return!(1&this.words[0])},r.prototype.isOdd=function(){return!(1&~this.words[0])},r.prototype.andln=function(e){return this.words[0]&e},r.prototype.bincn=function(e){i("number"==typeof e);var t=e%26,n=(e-t)/26,o=1<>>26,a&=67108863,this.words[s]=a}return 0!==r&&(this.words[s]=r,this.length++),this},r.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},r.prototype.cmpn=function(e){var t,n=e<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this._strip(),this.length>1)t=1;else{n&&(e=-e),i(e<=67108863,"Number is too big");var o=0|this.words[0];t=o===e?0:oe.length)return 1;if(this.length=0;n--){var i=0|this.words[n],o=0|e.words[n];if(i!==o){io&&(t=1);break}}return t},r.prototype.gtn=function(e){return 1===this.cmpn(e)},r.prototype.gt=function(e){return 1===this.cmp(e)},r.prototype.gten=function(e){return this.cmpn(e)>=0},r.prototype.gte=function(e){return this.cmp(e)>=0},r.prototype.ltn=function(e){return-1===this.cmpn(e)},r.prototype.lt=function(e){return-1===this.cmp(e)},r.prototype.lten=function(e){return this.cmpn(e)<=0},r.prototype.lte=function(e){return this.cmp(e)<=0},r.prototype.eqn=function(e){return 0===this.cmpn(e)},r.prototype.eq=function(e){return 0===this.cmp(e)},r.red=function(e){return new I(e)},r.prototype.toRed=function(e){return i(!this.red,"Already a number in reduction context"),i(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},r.prototype.fromRed=function(){return i(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},r.prototype._forceRed=function(e){return this.red=e,this},r.prototype.forceRed=function(e){return i(!this.red,"Already a number in reduction context"),this._forceRed(e)},r.prototype.redAdd=function(e){return i(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},r.prototype.redIAdd=function(e){return i(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},r.prototype.redSub=function(e){return i(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},r.prototype.redISub=function(e){return i(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},r.prototype.redShl=function(e){return i(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},r.prototype.redMul=function(e){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},r.prototype.redIMul=function(e){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},r.prototype.redSqr=function(){return i(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},r.prototype.redISqr=function(){return i(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},r.prototype.redSqrt=function(){return i(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},r.prototype.redInvm=function(){return i(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},r.prototype.redNeg=function(){return i(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},r.prototype.redPow=function(e){return i(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var _={k256:null,p224:null,p192:null,p25519:null};function w(e,t){this.name=e,this.p=new r(t,16),this.n=this.p.bitLength(),this.k=new r(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function M(){w.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function C(){w.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function S(){w.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function L(){w.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function I(e){if("string"==typeof e){var t=r._prime(e);this.m=t.p,this.prime=t}else i(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function N(e){I.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new r(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}w.prototype._tmp=function(){var e=new r(null);return e.words=new Array(Math.ceil(this.n/13)),e},w.prototype.ireduce=function(e){var t,n=e;do{this.split(n,this.tmp),t=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(t>this.n);var i=t0?n.isub(this.p):void 0!==n.strip?n.strip():n._strip(),n},w.prototype.split=function(e,t){e.iushrn(this.n,0,t)},w.prototype.imulK=function(e){return e.imul(this.k)},o(M,w),M.prototype.split=function(e,t){for(var n=4194303,i=Math.min(e.length,9),o=0;o>>22,r=s}r>>>=22,e.words[o-10]=r,0===r&&e.length>10?e.length-=10:e.length-=9},M.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,n=0;n>>=26,e.words[n]=o,t=i}return 0!==t&&(e.words[e.length++]=t),e},r._prime=function(e){if(_[e])return _[e];var t;if("k256"===e)t=new M;else if("p224"===e)t=new C;else if("p192"===e)t=new S;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new L}return _[e]=t,t},I.prototype._verify1=function(e){i(0===e.negative,"red works only with positives"),i(e.red,"red works only with red numbers")},I.prototype._verify2=function(e,t){i(!(e.negative|t.negative),"red works only with positives"),i(e.red&&e.red===t.red,"red works only with red numbers")},I.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):(c(e,e.umod(this.m)._forceRed(this)),e)},I.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},I.prototype.add=function(e,t){this._verify2(e,t);var n=e.add(t);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},I.prototype.iadd=function(e,t){this._verify2(e,t);var n=e.iadd(t);return n.cmp(this.m)>=0&&n.isub(this.m),n},I.prototype.sub=function(e,t){this._verify2(e,t);var n=e.sub(t);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},I.prototype.isub=function(e,t){this._verify2(e,t);var n=e.isub(t);return n.cmpn(0)<0&&n.iadd(this.m),n},I.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},I.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},I.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},I.prototype.isqr=function(e){return this.imul(e,e.clone())},I.prototype.sqr=function(e){return this.mul(e,e)},I.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(i(t%2==1),3===t){var n=this.m.add(new r(1)).iushrn(2);return this.pow(e,n)}for(var o=this.m.subn(1),s=0;!o.isZero()&&0===o.andln(1);)s++,o.iushrn(1);i(!o.isZero());var a=new r(1).toRed(this),u=a.redNeg(),l=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new r(2*c*c).toRed(this);0!==this.pow(c,l).cmp(u);)c.redIAdd(u);for(var h=this.pow(c,o),d=this.pow(e,o.addn(1).iushrn(1)),f=this.pow(e,o),p=s;0!==f.cmp(a);){for(var g=f,m=0;0!==g.cmp(a);m++)g=g.redSqr();i(m=0;i--){for(var l=t.words[i],c=u-1;c>=0;c--){var h=l>>c&1;o!==n[0]&&(o=this.sqr(o)),0!==h||0!==s?(s<<=1,s|=h,(4==++a||0===i&&0===c)&&(o=this.mul(o,n[s]),a=0,s=0)):a=0}u=26}return o},I.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},I.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},r.mont=function(e){return new N(e)},o(N,I),N.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},N.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},N.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var n=e.imul(t),i=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=n.isub(i).iushrn(this.shift),r=o;return o.cmp(this.m)>=0?r=o.isub(this.m):o.cmpn(0)<0&&(r=o.iadd(this.m)),r._forceRed(this)},N.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new r(0)._forceRed(this);var n=e.mul(t),i=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=n.isub(i).iushrn(this.shift),s=o;return o.cmp(this.m)>=0?s=o.isub(this.m):o.cmpn(0)<0&&(s=o.iadd(this.m)),s._forceRed(this)},N.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=n.nmd(e),this)},4366:(e,t,n)=>{var i;function o(e){this.rand=e}if(e.exports=function(e){return i||(i=new o(null)),i.generate(e)},e.exports.Rand=o,o.prototype.generate=function(e){return this._rand(e)},o.prototype._rand=function(e){if(this.rand.getBytes)return this.rand.getBytes(e);for(var t=new Uint8Array(e),n=0;n{var i=n(2238).Buffer;function o(e){i.isBuffer(e)||(e=i.from(e));for(var t=e.length/4|0,n=new Array(t),o=0;o>>24]^c[p>>>16&255]^h[g>>>8&255]^d[255&m]^t[v++],s=l[p>>>24]^c[g>>>16&255]^h[m>>>8&255]^d[255&f]^t[v++],a=l[g>>>24]^c[m>>>16&255]^h[f>>>8&255]^d[255&p]^t[v++],u=l[m>>>24]^c[f>>>16&255]^h[p>>>8&255]^d[255&g]^t[v++],f=r,p=s,g=a,m=u;return r=(i[f>>>24]<<24|i[p>>>16&255]<<16|i[g>>>8&255]<<8|i[255&m])^t[v++],s=(i[p>>>24]<<24|i[g>>>16&255]<<16|i[m>>>8&255]<<8|i[255&f])^t[v++],a=(i[g>>>24]<<24|i[m>>>16&255]<<16|i[f>>>8&255]<<8|i[255&p])^t[v++],u=(i[m>>>24]<<24|i[f>>>16&255]<<16|i[p>>>8&255]<<8|i[255&g])^t[v++],[r>>>=0,s>>>=0,a>>>=0,u>>>=0]}var a=[0,1,2,4,8,16,32,64,128,27,54],u=function(){for(var e=new Array(256),t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;for(var n=[],i=[],o=[[],[],[],[]],r=[[],[],[],[]],s=0,a=0,u=0;u<256;++u){var l=a^a<<1^a<<2^a<<3^a<<4;l=l>>>8^255&l^99,n[s]=l,i[l]=s;var c=e[s],h=e[c],d=e[h],f=257*e[l]^16843008*l;o[0][s]=f<<24|f>>>8,o[1][s]=f<<16|f>>>16,o[2][s]=f<<8|f>>>24,o[3][s]=f,f=16843009*d^65537*h^257*c^16843008*s,r[0][l]=f<<24|f>>>8,r[1][l]=f<<16|f>>>16,r[2][l]=f<<8|f>>>24,r[3][l]=f,0===s?s=a=1:(s=c^e[e[e[d^c]]],a^=e[e[a]])}return{SBOX:n,INV_SBOX:i,SUB_MIX:o,INV_SUB_MIX:r}}();function l(e){this._key=o(e),this._reset()}l.blockSize=16,l.keySize=32,l.prototype.blockSize=l.blockSize,l.prototype.keySize=l.keySize,l.prototype._reset=function(){for(var e=this._key,t=e.length,n=t+6,i=4*(n+1),o=[],r=0;r>>24,s=u.SBOX[s>>>24]<<24|u.SBOX[s>>>16&255]<<16|u.SBOX[s>>>8&255]<<8|u.SBOX[255&s],s^=a[r/t|0]<<24):t>6&&r%t==4&&(s=u.SBOX[s>>>24]<<24|u.SBOX[s>>>16&255]<<16|u.SBOX[s>>>8&255]<<8|u.SBOX[255&s]),o[r]=o[r-t]^s}for(var l=[],c=0;c>>24]]^u.INV_SUB_MIX[1][u.SBOX[d>>>16&255]]^u.INV_SUB_MIX[2][u.SBOX[d>>>8&255]]^u.INV_SUB_MIX[3][u.SBOX[255&d]]}this._nRounds=n,this._keySchedule=o,this._invKeySchedule=l},l.prototype.encryptBlockRaw=function(e){return s(e=o(e),this._keySchedule,u.SUB_MIX,u.SBOX,this._nRounds)},l.prototype.encryptBlock=function(e){var t=this.encryptBlockRaw(e),n=i.allocUnsafe(16);return n.writeUInt32BE(t[0],0),n.writeUInt32BE(t[1],4),n.writeUInt32BE(t[2],8),n.writeUInt32BE(t[3],12),n},l.prototype.decryptBlock=function(e){var t=(e=o(e))[1];e[1]=e[3],e[3]=t;var n=s(e,this._invKeySchedule,u.INV_SUB_MIX,u.INV_SBOX,this._nRounds),r=i.allocUnsafe(16);return r.writeUInt32BE(n[0],0),r.writeUInt32BE(n[3],4),r.writeUInt32BE(n[2],8),r.writeUInt32BE(n[1],12),r},l.prototype.scrub=function(){r(this._keySchedule),r(this._invKeySchedule),r(this._key)},e.exports.AES=l},8843:(e,t,n)=>{var i=n(7495),o=n(2238).Buffer,r=n(8511),s=n(9385),a=n(8893),u=n(2362),l=n(8317);function c(e,t,n,s){r.call(this);var u=o.alloc(4,0);this._cipher=new i.AES(t);var c=this._cipher.encryptBlock(u);this._ghash=new a(c),n=function(e,t,n){if(12===t.length)return e._finID=o.concat([t,o.from([0,0,0,1])]),o.concat([t,o.from([0,0,0,2])]);var i=new a(n),r=t.length,s=r%16;i.update(t),s&&(s=16-s,i.update(o.alloc(s,0))),i.update(o.alloc(8,0));var u=8*r,c=o.alloc(8);c.writeUIntBE(u,0,8),i.update(c),e._finID=i.state;var h=o.from(e._finID);return l(h),h}(this,n,c),this._prev=o.from(n),this._cache=o.allocUnsafe(0),this._secCache=o.allocUnsafe(0),this._decrypt=s,this._alen=0,this._len=0,this._mode=e,this._authTag=null,this._called=!1}s(c,r),c.prototype._update=function(e){if(!this._called&&this._alen){var t=16-this._alen%16;t<16&&(t=o.alloc(t,0),this._ghash.update(t))}this._called=!0;var n=this._mode.encrypt(this,e);return this._decrypt?this._ghash.update(e):this._ghash.update(n),this._len+=e.length,n},c.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var e=u(this._ghash.final(8*this._alen,8*this._len),this._cipher.encryptBlock(this._finID));if(this._decrypt&&function(e,t){var n=0;e.length!==t.length&&n++;for(var i=Math.min(e.length,t.length),o=0;o{var i=n(7790),o=n(3526),r=n(3219);t.createCipher=t.Cipher=i.createCipher,t.createCipheriv=t.Cipheriv=i.createCipheriv,t.createDecipher=t.Decipher=o.createDecipher,t.createDecipheriv=t.Decipheriv=o.createDecipheriv,t.listCiphers=t.getCiphers=function(){return Object.keys(r)}},3526:(e,t,n)=>{var i=n(8843),o=n(2238).Buffer,r=n(7943),s=n(9965),a=n(8511),u=n(7495),l=n(8819);function c(e,t,n){a.call(this),this._cache=new h,this._last=void 0,this._cipher=new u.AES(t),this._prev=o.from(n),this._mode=e,this._autopadding=!0}function h(){this.cache=o.allocUnsafe(0)}function d(e,t,n){var a=r[e.toLowerCase()];if(!a)throw new TypeError("invalid suite type");if("string"==typeof n&&(n=o.from(n)),"GCM"!==a.mode&&n.length!==a.iv)throw new TypeError("invalid iv length "+n.length);if("string"==typeof t&&(t=o.from(t)),t.length!==a.key/8)throw new TypeError("invalid key length "+t.length);return"stream"===a.type?new s(a.module,t,n,!0):"auth"===a.type?new i(a.module,t,n,!0):new c(a.module,t,n)}n(9385)(c,a),c.prototype._update=function(e){var t,n;this._cache.add(e);for(var i=[];t=this._cache.get(this._autopadding);)n=this._mode.decrypt(this,t),i.push(n);return o.concat(i)},c.prototype._final=function(){var e=this._cache.flush();if(this._autopadding)return function(e){var t=e[15];if(t<1||t>16)throw new Error("unable to decrypt data");for(var n=-1;++n16)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t}else if(this.cache.length>=16)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t;return null},h.prototype.flush=function(){if(this.cache.length)return this.cache},t.createDecipher=function(e,t){var n=r[e.toLowerCase()];if(!n)throw new TypeError("invalid suite type");var i=l(t,!1,n.key,n.iv);return d(e,i.key,i.iv)},t.createDecipheriv=d},7790:(e,t,n)=>{var i=n(7943),o=n(8843),r=n(2238).Buffer,s=n(9965),a=n(8511),u=n(7495),l=n(8819);function c(e,t,n){a.call(this),this._cache=new d,this._cipher=new u.AES(t),this._prev=r.from(n),this._mode=e,this._autopadding=!0}n(9385)(c,a),c.prototype._update=function(e){var t,n;this._cache.add(e);for(var i=[];t=this._cache.get();)n=this._mode.encrypt(this,t),i.push(n);return r.concat(i)};var h=r.alloc(16,16);function d(){this.cache=r.allocUnsafe(0)}function f(e,t,n){var a=i[e.toLowerCase()];if(!a)throw new TypeError("invalid suite type");if("string"==typeof t&&(t=r.from(t)),t.length!==a.key/8)throw new TypeError("invalid key length "+t.length);if("string"==typeof n&&(n=r.from(n)),"GCM"!==a.mode&&n.length!==a.iv)throw new TypeError("invalid iv length "+n.length);return"stream"===a.type?new s(a.module,t,n):"auth"===a.type?new o(a.module,t,n):new c(a.module,t,n)}c.prototype._final=function(){var e=this._cache.flush();if(this._autopadding)return e=this._mode.encrypt(this,e),this._cipher.scrub(),e;if(!e.equals(h))throw this._cipher.scrub(),new Error("data not multiple of block length")},c.prototype.setAutoPadding=function(e){return this._autopadding=!!e,this},d.prototype.add=function(e){this.cache=r.concat([this.cache,e])},d.prototype.get=function(){if(this.cache.length>15){var e=this.cache.slice(0,16);return this.cache=this.cache.slice(16),e}return null},d.prototype.flush=function(){for(var e=16-this.cache.length,t=r.allocUnsafe(e),n=-1;++n{var i=n(2238).Buffer,o=i.alloc(16,0);function r(e){var t=i.allocUnsafe(16);return t.writeUInt32BE(e[0]>>>0,0),t.writeUInt32BE(e[1]>>>0,4),t.writeUInt32BE(e[2]>>>0,8),t.writeUInt32BE(e[3]>>>0,12),t}function s(e){this.h=e,this.state=i.alloc(16,0),this.cache=i.allocUnsafe(0)}s.prototype.ghash=function(e){for(var t=-1;++t0;t--)i[t]=i[t]>>>1|(1&i[t-1])<<31;i[0]=i[0]>>>1,n&&(i[0]=i[0]^225<<24)}this.state=r(o)},s.prototype.update=function(e){var t;for(this.cache=i.concat([this.cache,e]);this.cache.length>=16;)t=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(t)},s.prototype.final=function(e,t){return this.cache.length&&this.ghash(i.concat([this.cache,o],16)),this.ghash(r([0,e,0,t])),this.state},e.exports=s},8317:e=>{e.exports=function(e){for(var t,n=e.length;n--;){if(255!==(t=e.readUInt8(n))){t++,e.writeUInt8(t,n);break}e.writeUInt8(0,n)}}},2981:(e,t,n)=>{var i=n(2362);t.encrypt=function(e,t){var n=i(t,e._prev);return e._prev=e._cipher.encryptBlock(n),e._prev},t.decrypt=function(e,t){var n=e._prev;e._prev=t;var o=e._cipher.decryptBlock(t);return i(o,n)}},4546:(e,t,n)=>{var i=n(2238).Buffer,o=n(2362);function r(e,t,n){var r=t.length,s=o(t,e._cache);return e._cache=e._cache.slice(r),e._prev=i.concat([e._prev,n?t:s]),s}t.encrypt=function(e,t,n){for(var o,s=i.allocUnsafe(0);t.length;){if(0===e._cache.length&&(e._cache=e._cipher.encryptBlock(e._prev),e._prev=i.allocUnsafe(0)),!(e._cache.length<=t.length)){s=i.concat([s,r(e,t,n)]);break}o=e._cache.length,s=i.concat([s,r(e,t.slice(0,o),n)]),t=t.slice(o)}return s}},6479:(e,t,n)=>{var i=n(2238).Buffer;function o(e,t,n){for(var i,o,s=-1,a=0;++s<8;)i=t&1<<7-s?128:0,a+=(128&(o=e._cipher.encryptBlock(e._prev)[0]^i))>>s%8,e._prev=r(e._prev,n?i:o);return a}function r(e,t){var n=e.length,o=-1,r=i.allocUnsafe(e.length);for(e=i.concat([e,i.from([t])]);++o>7;return r}t.encrypt=function(e,t,n){for(var r=t.length,s=i.allocUnsafe(r),a=-1;++a{var i=n(2238).Buffer;function o(e,t,n){var o=e._cipher.encryptBlock(e._prev)[0]^t;return e._prev=i.concat([e._prev.slice(1),i.from([n?t:o])]),o}t.encrypt=function(e,t,n){for(var r=t.length,s=i.allocUnsafe(r),a=-1;++a{var i=n(2362),o=n(2238).Buffer,r=n(8317);function s(e){var t=e._cipher.encryptBlockRaw(e._prev);return r(e._prev),t}t.encrypt=function(e,t){var n=Math.ceil(t.length/16),r=e._cache.length;e._cache=o.concat([e._cache,o.allocUnsafe(16*n)]);for(var a=0;a{t.encrypt=function(e,t){return e._cipher.encryptBlock(t)},t.decrypt=function(e,t){return e._cipher.decryptBlock(t)}},7943:(e,t,n)=>{var i={ECB:n(5593),CBC:n(2981),CFB:n(4546),CFB8:n(1584),CFB1:n(6479),OFB:n(1878),CTR:n(3872),GCM:n(3872)},o=n(3219);for(var r in o)o[r].module=i[o[r].mode];e.exports=o},1878:(e,t,n)=>{var i=n(1278).Buffer,o=n(2362);function r(e){return e._prev=e._cipher.encryptBlock(e._prev),e._prev}t.encrypt=function(e,t){for(;e._cache.length{var i=n(7495),o=n(2238).Buffer,r=n(8511);function s(e,t,n,s){r.call(this),this._cipher=new i.AES(t),this._prev=o.from(n),this._cache=o.allocUnsafe(0),this._secCache=o.allocUnsafe(0),this._decrypt=s,this._mode=e}n(9385)(s,r),s.prototype._update=function(e){return this._mode.encrypt(this,e,this._decrypt)},s.prototype._final=function(){this._cipher.scrub()},e.exports=s},7070:(e,t,n)=>{var i=n(7319),o=n(8668),r=n(7943),s=n(5859),a=n(8819);function u(e,t,n){if(e=e.toLowerCase(),r[e])return o.createCipheriv(e,t,n);if(s[e])return new i({key:t,iv:n,mode:e});throw new TypeError("invalid suite type")}function l(e,t,n){if(e=e.toLowerCase(),r[e])return o.createDecipheriv(e,t,n);if(s[e])return new i({key:t,iv:n,mode:e,decrypt:!0});throw new TypeError("invalid suite type")}t.createCipher=t.Cipher=function(e,t){var n,i;if(e=e.toLowerCase(),r[e])n=r[e].key,i=r[e].iv;else{if(!s[e])throw new TypeError("invalid suite type");n=8*s[e].key,i=s[e].iv}var o=a(t,!1,n,i);return u(e,o.key,o.iv)},t.createCipheriv=t.Cipheriv=u,t.createDecipher=t.Decipher=function(e,t){var n,i;if(e=e.toLowerCase(),r[e])n=r[e].key,i=r[e].iv;else{if(!s[e])throw new TypeError("invalid suite type");n=8*s[e].key,i=s[e].iv}var o=a(t,!1,n,i);return l(e,o.key,o.iv)},t.createDecipheriv=t.Decipheriv=l,t.listCiphers=t.getCiphers=function(){return Object.keys(s).concat(o.getCiphers())}},7319:(e,t,n)=>{var i=n(8511),o=n(2205),r=n(9385),s=n(2238).Buffer,a={"des-ede3-cbc":o.CBC.instantiate(o.EDE),"des-ede3":o.EDE,"des-ede-cbc":o.CBC.instantiate(o.EDE),"des-ede":o.EDE,"des-cbc":o.CBC.instantiate(o.DES),"des-ecb":o.DES};function u(e){i.call(this);var t,n=e.mode.toLowerCase(),o=a[n];t=e.decrypt?"decrypt":"encrypt";var r=e.key;s.isBuffer(r)||(r=s.from(r)),"des-ede"!==n&&"des-ede-cbc"!==n||(r=s.concat([r,r.slice(0,8)]));var u=e.iv;s.isBuffer(u)||(u=s.from(u)),this._des=o.create({key:r,iv:u,type:t})}a.des=a["des-cbc"],a.des3=a["des-ede3-cbc"],e.exports=u,r(u,i),u.prototype._update=function(e){return s.from(this._des.update(e))},u.prototype._final=function(){return s.from(this._des.final())}},5859:(e,t)=>{t["des-ecb"]={key:8,iv:0},t["des-cbc"]=t.des={key:8,iv:8},t["des-ede3-cbc"]=t.des3={key:24,iv:8},t["des-ede3"]={key:24,iv:0},t["des-ede-cbc"]={key:16,iv:8},t["des-ede"]={key:16,iv:0}},8470:(e,t,n)=>{var i=n(1278).Buffer,o=n(4917),r=n(8190);function s(e){var t,n=e.modulus.byteLength();do{t=new o(r(n))}while(t.cmp(e.modulus)>=0||!t.umod(e.prime1)||!t.umod(e.prime2));return t}function a(e,t){var n=function(e){var t=s(e);return{blinder:t.toRed(o.mont(e.modulus)).redPow(new o(e.publicExponent)).fromRed(),unblinder:t.invm(e.modulus)}}(t),r=t.modulus.byteLength(),a=new o(e).mul(n.blinder).umod(t.modulus),u=a.toRed(o.mont(t.prime1)),l=a.toRed(o.mont(t.prime2)),c=t.coefficient,h=t.prime1,d=t.prime2,f=u.redPow(t.exponent1).fromRed(),p=l.redPow(t.exponent2).fromRed(),g=f.isub(p).imul(c).umod(h).imul(d);return p.iadd(g).imul(n.unblinder).umod(t.modulus).toArrayLike(i,"be",r)}a.getr=s,e.exports=a},4136:(e,t,n)=>{"use strict";e.exports=n(2951)},455:(e,t,n)=>{"use strict";var i=n(9526).Buffer,o=n(2059),r=n(7462),s=n(2465),a=n(7134),u=n(1698),l=n(2951);function c(e){r.Writable.call(this);var t=l[e];if(!t)throw new Error("Unknown message digest");this._hashType=t.hash,this._hash=o(t.hash),this._tag=t.id,this._signType=t.sign}function h(e){r.Writable.call(this);var t=l[e];if(!t)throw new Error("Unknown message digest");this._hash=o(t.hash),this._tag=t.id,this._signType=t.sign}function d(e){return new c(e)}function f(e){return new h(e)}Object.keys(l).forEach((function(e){l[e].id=i.from(l[e].id,"hex"),l[e.toLowerCase()]=l[e]})),s(c,r.Writable),c.prototype._write=function(e,t,n){this._hash.update(e),n()},c.prototype.update=function(e,t){return this._hash.update("string"==typeof e?i.from(e,t):e),this},c.prototype.sign=function(e,t){this.end();var n=this._hash.digest(),i=a(n,e,this._hashType,this._signType,this._tag);return t?i.toString(t):i},s(h,r.Writable),h.prototype._write=function(e,t,n){this._hash.update(e),n()},h.prototype.update=function(e,t){return this._hash.update("string"==typeof e?i.from(e,t):e),this},h.prototype.verify=function(e,t,n){var o="string"==typeof t?i.from(t,n):t;this.end();var r=this._hash.digest();return u(o,r,e,this._signType,this._tag)},e.exports={Sign:d,Verify:f,createSign:d,createVerify:f}},7134:(e,t,n)=>{"use strict";var i=n(9526).Buffer,o=n(8080),r=n(8470),s=n(9478).ec,a=n(4917),u=n(5891),l=n(4589);function c(e,t,n,r){if((e=i.from(e.toArray())).length0&&n.ishrn(i),n}function d(e,t,n){var r,s;do{for(r=i.alloc(0);8*r.length{"use strict";var i=n(9526).Buffer,o=n(4917),r=n(9478).ec,s=n(5891),a=n(4589);function u(e,t){if(e.cmpn(0)<=0)throw new Error("invalid sig");if(e.cmp(t)>=0)throw new Error("invalid sig")}e.exports=function(e,t,n,l,c){var h=s(n);if("ec"===h.type){if("ecdsa"!==l&&"ecdsa/rsa"!==l)throw new Error("wrong public key type");return function(e,t,n){var i=a[n.data.algorithm.curve.join(".")];if(!i)throw new Error("unknown curve "+n.data.algorithm.curve.join("."));var o=new r(i),s=n.data.subjectPrivateKey.data;return o.verify(t,e,s)}(e,t,h)}if("dsa"===h.type){if("dsa"!==l)throw new Error("wrong public key type");return function(e,t,n){var i=n.data.p,r=n.data.q,a=n.data.g,l=n.data.pub_key,c=s.signature.decode(e,"der"),h=c.s,d=c.r;u(h,r),u(d,r);var f=o.mont(i),p=h.invm(r);return 0===a.toRed(f).redPow(new o(t).mul(p).mod(r)).fromRed().mul(l.toRed(f).redPow(d.mul(p).mod(r)).fromRed()).mod(i).mod(r).cmp(d)}(e,t,h)}if("rsa"!==l&&"ecdsa/rsa"!==l)throw new Error("wrong public key type");t=i.concat([c,t]);for(var d=h.modulus.byteLength(),f=[1],p=0;t.length+f.length+2{"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}},9526:(e,t,n)=>{var i=n(1278),o=i.Buffer;function r(e,t){for(var n in e)t[n]=e[n]}function s(e,t,n){return o(e,t,n)}o.from&&o.alloc&&o.allocUnsafe&&o.allocUnsafeSlow?e.exports=i:(r(i,t),t.Buffer=s),s.prototype=Object.create(o.prototype),r(o,s),s.from=function(e,t,n){if("number"==typeof e)throw new TypeError("Argument must not be a number");return o(e,t,n)},s.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError("Argument must be a number");var i=o(e);return void 0!==t?"string"==typeof n?i.fill(t,n):i.fill(t):i.fill(0),i},s.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return o(e)},s.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i.SlowBuffer(e)}},2362:(e,t,n)=>{var i=n(1278).Buffer;e.exports=function(e,t){for(var n=Math.min(e.length,t.length),o=new i(n),r=0;r{"use strict";const i=n(1117),o=n(2804),r="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=u,t.SlowBuffer=function(e){return+e!=e&&(e=0),u.alloc(+e)},t.INSPECT_MAX_BYTES=50;const s=2147483647;function a(e){if(e>s)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,u.prototype),t}function u(e,t,n){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return h(e)}return l(e,t,n)}function l(e,t,n){if("string"==typeof e)return function(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!u.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const n=0|g(e,t);let i=a(n);const o=i.write(e,t);return o!==n&&(i=i.slice(0,o)),i}(e,t);if(ArrayBuffer.isView(e))return function(e){if(q(e,Uint8Array)){const t=new Uint8Array(e);return f(t.buffer,t.byteOffset,t.byteLength)}return d(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(q(e,ArrayBuffer)||e&&q(e.buffer,ArrayBuffer))return f(e,t,n);if("undefined"!=typeof SharedArrayBuffer&&(q(e,SharedArrayBuffer)||e&&q(e.buffer,SharedArrayBuffer)))return f(e,t,n);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const i=e.valueOf&&e.valueOf();if(null!=i&&i!==e)return u.from(i,t,n);const o=function(e){if(u.isBuffer(e)){const t=0|p(e.length),n=a(t);return 0===n.length||e.copy(n,0,0,t),n}return void 0!==e.length?"number"!=typeof e.length||K(e.length)?a(0):d(e):"Buffer"===e.type&&Array.isArray(e.data)?d(e.data):void 0}(e);if(o)return o;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return u.from(e[Symbol.toPrimitive]("string"),t,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function c(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function h(e){return c(e),a(e<0?0:0|p(e))}function d(e){const t=e.length<0?0:0|p(e.length),n=a(t);for(let i=0;i=s)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s.toString(16)+" bytes");return 0|e}function g(e,t){if(u.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||q(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const n=e.length,i=arguments.length>2&&!0===arguments[2];if(!i&&0===n)return 0;let o=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return Z(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return G(e).length;default:if(o)return i?-1:Z(e).length;t=(""+t).toLowerCase(),o=!0}}function m(e,t,n){let i=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return k(this,t,n);case"utf8":case"utf-8":return I(this,t,n);case"ascii":return x(this,t,n);case"latin1":case"binary":return D(this,t,n);case"base64":return L(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,t,n);default:if(i)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),i=!0}}function v(e,t,n){const i=e[t];e[t]=e[n],e[n]=i}function y(e,t,n,i,o){if(0===e.length)return-1;if("string"==typeof n?(i=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),K(n=+n)&&(n=o?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(o)return-1;n=e.length-1}else if(n<0){if(!o)return-1;n=0}if("string"==typeof t&&(t=u.from(t,i)),u.isBuffer(t))return 0===t.length?-1:b(e,t,n,i,o);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):b(e,[t],n,i,o);throw new TypeError("val must be string, number or Buffer")}function b(e,t,n,i,o){let r,s=1,a=e.length,u=t.length;if(void 0!==i&&("ucs2"===(i=String(i).toLowerCase())||"ucs-2"===i||"utf16le"===i||"utf-16le"===i)){if(e.length<2||t.length<2)return-1;s=2,a/=2,u/=2,n/=2}function l(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(o){let i=-1;for(r=n;ra&&(n=a-u),r=n;r>=0;r--){let n=!0;for(let i=0;io&&(i=o):i=o;const r=t.length;let s;for(i>r/2&&(i=r/2),s=0;s>8,o=n%256,r.push(o),r.push(i);return r}(t,e.length-n),e,n,i)}function L(e,t,n){return 0===t&&n===e.length?i.fromByteArray(e):i.fromByteArray(e.slice(t,n))}function I(e,t,n){n=Math.min(e.length,n);const i=[];let o=t;for(;o239?4:t>223?3:t>191?2:1;if(o+s<=n){let n,i,a,u;switch(s){case 1:t<128&&(r=t);break;case 2:n=e[o+1],128==(192&n)&&(u=(31&t)<<6|63&n,u>127&&(r=u));break;case 3:n=e[o+1],i=e[o+2],128==(192&n)&&128==(192&i)&&(u=(15&t)<<12|(63&n)<<6|63&i,u>2047&&(u<55296||u>57343)&&(r=u));break;case 4:n=e[o+1],i=e[o+2],a=e[o+3],128==(192&n)&&128==(192&i)&&128==(192&a)&&(u=(15&t)<<18|(63&n)<<12|(63&i)<<6|63&a,u>65535&&u<1114112&&(r=u))}}null===r?(r=65533,s=1):r>65535&&(r-=65536,i.push(r>>>10&1023|55296),r=56320|1023&r),i.push(r),o+=s}return function(e){const t=e.length;if(t<=N)return String.fromCharCode.apply(String,e);let n="",i=0;for(;ii.length?(u.isBuffer(t)||(t=u.from(t)),t.copy(i,o)):Uint8Array.prototype.set.call(i,t,o);else{if(!u.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(i,o)}o+=t.length}return i},u.byteLength=g,u.prototype._isBuffer=!0,u.prototype.swap16=function(){const e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;tn&&(e+=" ... "),""},r&&(u.prototype[r]=u.prototype.inspect),u.prototype.compare=function(e,t,n,i,o){if(q(e,Uint8Array)&&(e=u.from(e,e.offset,e.byteLength)),!u.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===i&&(i=0),void 0===o&&(o=this.length),t<0||n>e.length||i<0||o>this.length)throw new RangeError("out of range index");if(i>=o&&t>=n)return 0;if(i>=o)return-1;if(t>=n)return 1;if(this===e)return 0;let r=(o>>>=0)-(i>>>=0),s=(n>>>=0)-(t>>>=0);const a=Math.min(r,s),l=this.slice(i,o),c=e.slice(t,n);for(let e=0;e>>=0,isFinite(n)?(n>>>=0,void 0===i&&(i="utf8")):(i=n,n=void 0)}const o=this.length-t;if((void 0===n||n>o)&&(n=o),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");let r=!1;for(;;)switch(i){case"hex":return _(this,e,t,n);case"utf8":case"utf-8":return w(this,e,t,n);case"ascii":case"latin1":case"binary":return M(this,e,t,n);case"base64":return C(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,e,t,n);default:if(r)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),r=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const N=4096;function x(e,t,n){let i="";n=Math.min(e.length,n);for(let o=t;oi)&&(n=i);let o="";for(let i=t;in)throw new RangeError("Trying to access beyond buffer length")}function A(e,t,n,i,o,r){if(!u.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||te.length)throw new RangeError("Index out of range")}function j(e,t,n,i,o){H(t,i,o,e,n,7);let r=Number(t&BigInt(4294967295));e[n++]=r,r>>=8,e[n++]=r,r>>=8,e[n++]=r,r>>=8,e[n++]=r;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[n++]=s,s>>=8,e[n++]=s,s>>=8,e[n++]=s,s>>=8,e[n++]=s,n}function O(e,t,n,i,o){H(t,i,o,e,n,7);let r=Number(t&BigInt(4294967295));e[n+7]=r,r>>=8,e[n+6]=r,r>>=8,e[n+5]=r,r>>=8,e[n+4]=r;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[n+3]=s,s>>=8,e[n+2]=s,s>>=8,e[n+1]=s,s>>=8,e[n]=s,n+8}function R(e,t,n,i,o,r){if(n+i>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function P(e,t,n,i,r){return t=+t,n>>>=0,r||R(e,0,n,4),o.write(e,t,n,i,23,4),n+4}function z(e,t,n,i,r){return t=+t,n>>>=0,r||R(e,0,n,8),o.write(e,t,n,i,52,8),n+8}u.prototype.slice=function(e,t){const n=this.length;(e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t>>=0,t>>>=0,n||E(e,t,this.length);let i=this[e],o=1,r=0;for(;++r>>=0,t>>>=0,n||E(e,t,this.length);let i=this[e+--t],o=1;for(;t>0&&(o*=256);)i+=this[e+--t]*o;return i},u.prototype.readUint8=u.prototype.readUInt8=function(e,t){return e>>>=0,t||E(e,1,this.length),this[e]},u.prototype.readUint16LE=u.prototype.readUInt16LE=function(e,t){return e>>>=0,t||E(e,2,this.length),this[e]|this[e+1]<<8},u.prototype.readUint16BE=u.prototype.readUInt16BE=function(e,t){return e>>>=0,t||E(e,2,this.length),this[e]<<8|this[e+1]},u.prototype.readUint32LE=u.prototype.readUInt32LE=function(e,t){return e>>>=0,t||E(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},u.prototype.readUint32BE=u.prototype.readUInt32BE=function(e,t){return e>>>=0,t||E(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},u.prototype.readBigUInt64LE=X((function(e){V(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||U(e,this.length-8);const i=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,o=this[++e]+256*this[++e]+65536*this[++e]+n*2**24;return BigInt(i)+(BigInt(o)<>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||U(e,this.length-8);const i=t*2**24+65536*this[++e]+256*this[++e]+this[++e],o=this[++e]*2**24+65536*this[++e]+256*this[++e]+n;return(BigInt(i)<>>=0,t>>>=0,n||E(e,t,this.length);let i=this[e],o=1,r=0;for(;++r=o&&(i-=Math.pow(2,8*t)),i},u.prototype.readIntBE=function(e,t,n){e>>>=0,t>>>=0,n||E(e,t,this.length);let i=t,o=1,r=this[e+--i];for(;i>0&&(o*=256);)r+=this[e+--i]*o;return o*=128,r>=o&&(r-=Math.pow(2,8*t)),r},u.prototype.readInt8=function(e,t){return e>>>=0,t||E(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},u.prototype.readInt16LE=function(e,t){e>>>=0,t||E(e,2,this.length);const n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt16BE=function(e,t){e>>>=0,t||E(e,2,this.length);const n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt32LE=function(e,t){return e>>>=0,t||E(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},u.prototype.readInt32BE=function(e,t){return e>>>=0,t||E(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},u.prototype.readBigInt64LE=X((function(e){V(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||U(e,this.length-8);const i=this[e+4]+256*this[e+5]+65536*this[e+6]+(n<<24);return(BigInt(i)<>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||U(e,this.length-8);const i=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(i)<>>=0,t||E(e,4,this.length),o.read(this,e,!0,23,4)},u.prototype.readFloatBE=function(e,t){return e>>>=0,t||E(e,4,this.length),o.read(this,e,!1,23,4)},u.prototype.readDoubleLE=function(e,t){return e>>>=0,t||E(e,8,this.length),o.read(this,e,!0,52,8)},u.prototype.readDoubleBE=function(e,t){return e>>>=0,t||E(e,8,this.length),o.read(this,e,!1,52,8)},u.prototype.writeUintLE=u.prototype.writeUIntLE=function(e,t,n,i){e=+e,t>>>=0,n>>>=0,i||A(this,e,t,n,Math.pow(2,8*n)-1,0);let o=1,r=0;for(this[t]=255&e;++r>>=0,n>>>=0,i||A(this,e,t,n,Math.pow(2,8*n)-1,0);let o=n-1,r=1;for(this[t+o]=255&e;--o>=0&&(r*=256);)this[t+o]=e/r&255;return t+n},u.prototype.writeUint8=u.prototype.writeUInt8=function(e,t,n){return e=+e,t>>>=0,n||A(this,e,t,1,255,0),this[t]=255&e,t+1},u.prototype.writeUint16LE=u.prototype.writeUInt16LE=function(e,t,n){return e=+e,t>>>=0,n||A(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},u.prototype.writeUint16BE=u.prototype.writeUInt16BE=function(e,t,n){return e=+e,t>>>=0,n||A(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},u.prototype.writeUint32LE=u.prototype.writeUInt32LE=function(e,t,n){return e=+e,t>>>=0,n||A(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},u.prototype.writeUint32BE=u.prototype.writeUInt32BE=function(e,t,n){return e=+e,t>>>=0,n||A(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},u.prototype.writeBigUInt64LE=X((function(e,t=0){return j(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),u.prototype.writeBigUInt64BE=X((function(e,t=0){return O(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),u.prototype.writeIntLE=function(e,t,n,i){if(e=+e,t>>>=0,!i){const i=Math.pow(2,8*n-1);A(this,e,t,n,i-1,-i)}let o=0,r=1,s=0;for(this[t]=255&e;++o>>=0,!i){const i=Math.pow(2,8*n-1);A(this,e,t,n,i-1,-i)}let o=n-1,r=1,s=0;for(this[t+o]=255&e;--o>=0&&(r*=256);)e<0&&0===s&&0!==this[t+o+1]&&(s=1),this[t+o]=(e/r|0)-s&255;return t+n},u.prototype.writeInt8=function(e,t,n){return e=+e,t>>>=0,n||A(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},u.prototype.writeInt16LE=function(e,t,n){return e=+e,t>>>=0,n||A(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},u.prototype.writeInt16BE=function(e,t,n){return e=+e,t>>>=0,n||A(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},u.prototype.writeInt32LE=function(e,t,n){return e=+e,t>>>=0,n||A(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},u.prototype.writeInt32BE=function(e,t,n){return e=+e,t>>>=0,n||A(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},u.prototype.writeBigInt64LE=X((function(e,t=0){return j(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),u.prototype.writeBigInt64BE=X((function(e,t=0){return O(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),u.prototype.writeFloatLE=function(e,t,n){return P(this,e,t,!0,n)},u.prototype.writeFloatBE=function(e,t,n){return P(this,e,t,!1,n)},u.prototype.writeDoubleLE=function(e,t,n){return z(this,e,t,!0,n)},u.prototype.writeDoubleBE=function(e,t,n){return z(this,e,t,!1,n)},u.prototype.copy=function(e,t,n,i){if(!u.isBuffer(e))throw new TypeError("argument should be a Buffer");if(n||(n=0),i||0===i||(i=this.length),t>=e.length&&(t=e.length),t||(t=0),i>0&&i=this.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),e.length-t>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(o=t;o=i+4;n-=3)t=`_${e.slice(n-3,n)}${t}`;return`${e.slice(0,n)}${t}`}function H(e,t,n,i,o,r){if(e>n||e3?0===t||t===BigInt(0)?`>= 0${i} and < 2${i} ** ${8*(r+1)}${i}`:`>= -(2${i} ** ${8*(r+1)-1}${i}) and < 2 ** ${8*(r+1)-1}${i}`:`>= ${t}${i} and <= ${n}${i}`,new W.ERR_OUT_OF_RANGE("value",o,e)}!function(e,t,n){V(t,"offset"),void 0!==e[t]&&void 0!==e[t+n]||U(t,e.length-(n+1))}(i,o,r)}function V(e,t){if("number"!=typeof e)throw new W.ERR_INVALID_ARG_TYPE(t,"number",e)}function U(e,t,n){if(Math.floor(e)!==e)throw V(e,n),new W.ERR_OUT_OF_RANGE(n||"offset","an integer",e);if(t<0)throw new W.ERR_BUFFER_OUT_OF_BOUNDS;throw new W.ERR_OUT_OF_RANGE(n||"offset",`>= ${n?1:0} and <= ${t}`,e)}F("ERR_BUFFER_OUT_OF_BOUNDS",(function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),F("ERR_INVALID_ARG_TYPE",(function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`}),TypeError),F("ERR_OUT_OF_RANGE",(function(e,t,n){let i=`The value of "${e}" is out of range.`,o=n;return Number.isInteger(n)&&Math.abs(n)>2**32?o=B(String(n)):"bigint"==typeof n&&(o=String(n),(n>BigInt(2)**BigInt(32)||n<-(BigInt(2)**BigInt(32)))&&(o=B(o)),o+="n"),i+=` It must be ${t}. Received ${o}`,i}),RangeError);const Y=/[^+/0-9A-Za-z-_]/g;function Z(e,t){let n;t=t||1/0;const i=e.length;let o=null;const r=[];for(let s=0;s55295&&n<57344){if(!o){if(n>56319){(t-=3)>-1&&r.push(239,191,189);continue}if(s+1===i){(t-=3)>-1&&r.push(239,191,189);continue}o=n;continue}if(n<56320){(t-=3)>-1&&r.push(239,191,189),o=n;continue}n=65536+(o-55296<<10|n-56320)}else o&&(t-=3)>-1&&r.push(239,191,189);if(o=null,n<128){if((t-=1)<0)break;r.push(n)}else if(n<2048){if((t-=2)<0)break;r.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;r.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;r.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return r}function G(e){return i.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(Y,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function Q(e,t,n,i){let o;for(o=0;o=t.length||o>=e.length);++o)t[o+n]=e[o];return o}function q(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function K(e){return e!=e}const J=function(){const e="0123456789abcdef",t=new Array(256);for(let n=0;n<16;++n){const i=16*n;for(let o=0;o<16;++o)t[i+o]=e[n]+e[o]}return t}();function X(e){return"undefined"==typeof BigInt?$:e}function $(){throw new Error("BigInt not supported")}},8511:(e,t,n)=>{var i=n(2238).Buffer,o=n(8741).Transform,r=n(230).I;function s(e){o.call(this),this.hashMode="string"==typeof e,this.hashMode?this[e]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}n(9385)(s,o),s.prototype.update=function(e,t,n){"string"==typeof e&&(e=i.from(e,t));var o=this._update(e);return this.hashMode?this:(n&&(o=this._toString(o,n)),o)},s.prototype.setAutoPadding=function(){},s.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},s.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},s.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},s.prototype._transform=function(e,t,n){var i;try{this.hashMode?this._update(e):this.push(this._update(e))}catch(e){i=e}finally{n(i)}},s.prototype._flush=function(e){var t;try{this.push(this.__final())}catch(e){t=e}e(t)},s.prototype._finalOrDigest=function(e){var t=this.__final()||i.alloc(0);return e&&(t=this._toString(t,e,!0)),t},s.prototype._toString=function(e,t,n){if(this._decoder||(this._decoder=new r(t),this._encoding=t),this._encoding!==t)throw new Error("can't switch encodings");var i=this._decoder.write(e);return n&&(i+=this._decoder.end()),i},e.exports=s},8565:(e,t,n)=>{function i(e){return Object.prototype.toString.call(e)}t.isArray=function(e){return Array.isArray?Array.isArray(e):"[object Array]"===i(e)},t.isBoolean=function(e){return"boolean"==typeof e},t.isNull=function(e){return null===e},t.isNullOrUndefined=function(e){return null==e},t.isNumber=function(e){return"number"==typeof e},t.isString=function(e){return"string"==typeof e},t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=function(e){return void 0===e},t.isRegExp=function(e){return"[object RegExp]"===i(e)},t.isObject=function(e){return"object"==typeof e&&null!==e},t.isDate=function(e){return"[object Date]"===i(e)},t.isError=function(e){return"[object Error]"===i(e)||e instanceof Error},t.isFunction=function(e){return"function"==typeof e},t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=n(1278).Buffer.isBuffer},4231:(e,t,n)=>{var i=n(1278).Buffer,o=n(9478),r=n(1046);e.exports=function(e){return new a(e)};var s={secp256k1:{name:"secp256k1",byteLength:32},secp224r1:{name:"p224",byteLength:28},prime256v1:{name:"p256",byteLength:32},prime192v1:{name:"p192",byteLength:24},ed25519:{name:"ed25519",byteLength:32},secp384r1:{name:"p384",byteLength:48},secp521r1:{name:"p521",byteLength:66}};function a(e){this.curveType=s[e],this.curveType||(this.curveType={name:e}),this.curve=new o.ec(this.curveType.name),this.keys=void 0}function u(e,t,n){Array.isArray(e)||(e=e.toArray());var o=new i(e);if(n&&o.length=65&&n<=70?n-55:n>=97&&n<=102?n-87:n-48&15}function u(e,t,n){var i=a(e,n);return n-1>=t&&(i|=a(e,n-1)<<4),i}function l(e,t,n,i){for(var o=0,r=Math.min(e.length,n),s=t;s=49?a-49+10:a>=17?a-17+10:a}return o}r.isBN=function(e){return e instanceof r||null!==e&&"object"==typeof e&&e.constructor.wordSize===r.wordSize&&Array.isArray(e.words)},r.max=function(e,t){return e.cmp(t)>0?e:t},r.min=function(e,t){return e.cmp(t)<0?e:t},r.prototype._init=function(e,t,n){if("number"==typeof e)return this._initNumber(e,t,n);if("object"==typeof e)return this._initArray(e,t,n);"hex"===t&&(t=16),i(t===(0|t)&&t>=2&&t<=36);var o=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(o++,this.negative=1),o=0;o-=3)s=e[o]|e[o-1]<<8|e[o-2]<<16,this.words[r]|=s<>>26-a&67108863,(a+=24)>=26&&(a-=26,r++);else if("le"===n)for(o=0,r=0;o>>26-a&67108863,(a+=24)>=26&&(a-=26,r++);return this.strip()},r.prototype._parseHex=function(e,t,n){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var i=0;i=t;i-=2)o=u(e,t,i)<=18?(r-=18,s+=1,this.words[s]|=o>>>26):r+=8;else for(i=(e.length-t)%2==0?t+1:t;i=18?(r-=18,s+=1,this.words[s]|=o>>>26):r+=8;this.strip()},r.prototype._parseBase=function(e,t,n){this.words=[0],this.length=1;for(var i=0,o=1;o<=67108863;o*=t)i++;i--,o=o/t|0;for(var r=e.length-n,s=r%i,a=Math.min(r,r-s)+n,u=0,c=n;c1&&0===this.words[this.length-1];)this.length--;return this._normSign()},r.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},r.prototype.inspect=function(){return(this.red?""};var c=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],h=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],d=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function f(e,t,n){n.negative=t.negative^e.negative;var i=e.length+t.length|0;n.length=i,i=i-1|0;var o=0|e.words[0],r=0|t.words[0],s=o*r,a=67108863&s,u=s/67108864|0;n.words[0]=a;for(var l=1;l>>26,h=67108863&u,d=Math.min(l,t.length-1),f=Math.max(0,l-e.length+1);f<=d;f++){var p=l-f|0;c+=(s=(o=0|e.words[p])*(r=0|t.words[f])+h)/67108864|0,h=67108863&s}n.words[l]=0|h,u=0|c}return 0!==u?n.words[l]=0|u:n.length--,n.strip()}r.prototype.toString=function(e,t){var n;if(t=0|t||1,16===(e=e||10)||"hex"===e){n="";for(var o=0,r=0,s=0;s>>24-o&16777215)||s!==this.length-1?c[6-u.length]+u+n:u+n,(o+=2)>=26&&(o-=26,s--)}for(0!==r&&(n=r.toString(16)+n);n.length%t!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(e===(0|e)&&e>=2&&e<=36){var l=h[e],f=d[e];n="";var p=this.clone();for(p.negative=0;!p.isZero();){var g=p.modn(f).toString(e);n=(p=p.idivn(f)).isZero()?g+n:c[l-g.length]+g+n}for(this.isZero()&&(n="0"+n);n.length%t!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}i(!1,"Base should be between 2 and 36")},r.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&i(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},r.prototype.toJSON=function(){return this.toString(16)},r.prototype.toBuffer=function(e,t){return i(void 0!==s),this.toArrayLike(s,e,t)},r.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},r.prototype.toArrayLike=function(e,t,n){var o=this.byteLength(),r=n||Math.max(1,o);i(o<=r,"byte array longer than desired length"),i(r>0,"Requested array length <= 0"),this.strip();var s,a,u="le"===t,l=new e(r),c=this.clone();if(u){for(a=0;!c.isZero();a++)s=c.andln(255),c.iushrn(8),l[a]=s;for(;a=4096&&(n+=13,t>>>=13),t>=64&&(n+=7,t>>>=7),t>=8&&(n+=4,t>>>=4),t>=2&&(n+=2,t>>>=2),n+t},r.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,n=0;return 8191&t||(n+=13,t>>>=13),127&t||(n+=7,t>>>=7),15&t||(n+=4,t>>>=4),3&t||(n+=2,t>>>=2),1&t||n++,n},r.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},r.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},r.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},r.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var n=0;ne.length?this.clone().iand(e):e.clone().iand(this)},r.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},r.prototype.iuxor=function(e){var t,n;this.length>e.length?(t=this,n=e):(t=e,n=this);for(var i=0;ie.length?this.clone().ixor(e):e.clone().ixor(this)},r.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},r.prototype.inotn=function(e){i("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),n=e%26;this._expand(t),n>0&&t--;for(var o=0;o0&&(this.words[o]=~this.words[o]&67108863>>26-n),this.strip()},r.prototype.notn=function(e){return this.clone().inotn(e)},r.prototype.setn=function(e,t){i("number"==typeof e&&e>=0);var n=e/26|0,o=e%26;return this._expand(n+1),this.words[n]=t?this.words[n]|1<e.length?(n=this,i=e):(n=e,i=this);for(var o=0,r=0;r>>26;for(;0!==o&&r>>26;if(this.length=n.length,0!==o)this.words[this.length]=o,this.length++;else if(n!==this)for(;re.length?this.clone().iadd(e):e.clone().iadd(this)},r.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var n,i,o=this.cmp(e);if(0===o)return this.negative=0,this.length=1,this.words[0]=0,this;o>0?(n=this,i=e):(n=e,i=this);for(var r=0,s=0;s>26,this.words[s]=67108863&t;for(;0!==r&&s>26,this.words[s]=67108863&t;if(0===r&&s>>13,f=0|s[1],p=8191&f,g=f>>>13,m=0|s[2],v=8191&m,y=m>>>13,b=0|s[3],_=8191&b,w=b>>>13,M=0|s[4],C=8191&M,S=M>>>13,L=0|s[5],I=8191&L,N=L>>>13,x=0|s[6],D=8191&x,k=x>>>13,T=0|s[7],E=8191&T,A=T>>>13,j=0|s[8],O=8191&j,R=j>>>13,P=0|s[9],z=8191&P,W=P>>>13,F=0|a[0],B=8191&F,H=F>>>13,V=0|a[1],U=8191&V,Y=V>>>13,Z=0|a[2],G=8191&Z,Q=Z>>>13,q=0|a[3],K=8191&q,J=q>>>13,X=0|a[4],$=8191&X,ee=X>>>13,te=0|a[5],ne=8191&te,ie=te>>>13,oe=0|a[6],re=8191&oe,se=oe>>>13,ae=0|a[7],ue=8191&ae,le=ae>>>13,ce=0|a[8],he=8191&ce,de=ce>>>13,fe=0|a[9],pe=8191&fe,ge=fe>>>13;n.negative=e.negative^t.negative,n.length=19;var me=(l+(i=Math.imul(h,B))|0)+((8191&(o=(o=Math.imul(h,H))+Math.imul(d,B)|0))<<13)|0;l=((r=Math.imul(d,H))+(o>>>13)|0)+(me>>>26)|0,me&=67108863,i=Math.imul(p,B),o=(o=Math.imul(p,H))+Math.imul(g,B)|0,r=Math.imul(g,H);var ve=(l+(i=i+Math.imul(h,U)|0)|0)+((8191&(o=(o=o+Math.imul(h,Y)|0)+Math.imul(d,U)|0))<<13)|0;l=((r=r+Math.imul(d,Y)|0)+(o>>>13)|0)+(ve>>>26)|0,ve&=67108863,i=Math.imul(v,B),o=(o=Math.imul(v,H))+Math.imul(y,B)|0,r=Math.imul(y,H),i=i+Math.imul(p,U)|0,o=(o=o+Math.imul(p,Y)|0)+Math.imul(g,U)|0,r=r+Math.imul(g,Y)|0;var ye=(l+(i=i+Math.imul(h,G)|0)|0)+((8191&(o=(o=o+Math.imul(h,Q)|0)+Math.imul(d,G)|0))<<13)|0;l=((r=r+Math.imul(d,Q)|0)+(o>>>13)|0)+(ye>>>26)|0,ye&=67108863,i=Math.imul(_,B),o=(o=Math.imul(_,H))+Math.imul(w,B)|0,r=Math.imul(w,H),i=i+Math.imul(v,U)|0,o=(o=o+Math.imul(v,Y)|0)+Math.imul(y,U)|0,r=r+Math.imul(y,Y)|0,i=i+Math.imul(p,G)|0,o=(o=o+Math.imul(p,Q)|0)+Math.imul(g,G)|0,r=r+Math.imul(g,Q)|0;var be=(l+(i=i+Math.imul(h,K)|0)|0)+((8191&(o=(o=o+Math.imul(h,J)|0)+Math.imul(d,K)|0))<<13)|0;l=((r=r+Math.imul(d,J)|0)+(o>>>13)|0)+(be>>>26)|0,be&=67108863,i=Math.imul(C,B),o=(o=Math.imul(C,H))+Math.imul(S,B)|0,r=Math.imul(S,H),i=i+Math.imul(_,U)|0,o=(o=o+Math.imul(_,Y)|0)+Math.imul(w,U)|0,r=r+Math.imul(w,Y)|0,i=i+Math.imul(v,G)|0,o=(o=o+Math.imul(v,Q)|0)+Math.imul(y,G)|0,r=r+Math.imul(y,Q)|0,i=i+Math.imul(p,K)|0,o=(o=o+Math.imul(p,J)|0)+Math.imul(g,K)|0,r=r+Math.imul(g,J)|0;var _e=(l+(i=i+Math.imul(h,$)|0)|0)+((8191&(o=(o=o+Math.imul(h,ee)|0)+Math.imul(d,$)|0))<<13)|0;l=((r=r+Math.imul(d,ee)|0)+(o>>>13)|0)+(_e>>>26)|0,_e&=67108863,i=Math.imul(I,B),o=(o=Math.imul(I,H))+Math.imul(N,B)|0,r=Math.imul(N,H),i=i+Math.imul(C,U)|0,o=(o=o+Math.imul(C,Y)|0)+Math.imul(S,U)|0,r=r+Math.imul(S,Y)|0,i=i+Math.imul(_,G)|0,o=(o=o+Math.imul(_,Q)|0)+Math.imul(w,G)|0,r=r+Math.imul(w,Q)|0,i=i+Math.imul(v,K)|0,o=(o=o+Math.imul(v,J)|0)+Math.imul(y,K)|0,r=r+Math.imul(y,J)|0,i=i+Math.imul(p,$)|0,o=(o=o+Math.imul(p,ee)|0)+Math.imul(g,$)|0,r=r+Math.imul(g,ee)|0;var we=(l+(i=i+Math.imul(h,ne)|0)|0)+((8191&(o=(o=o+Math.imul(h,ie)|0)+Math.imul(d,ne)|0))<<13)|0;l=((r=r+Math.imul(d,ie)|0)+(o>>>13)|0)+(we>>>26)|0,we&=67108863,i=Math.imul(D,B),o=(o=Math.imul(D,H))+Math.imul(k,B)|0,r=Math.imul(k,H),i=i+Math.imul(I,U)|0,o=(o=o+Math.imul(I,Y)|0)+Math.imul(N,U)|0,r=r+Math.imul(N,Y)|0,i=i+Math.imul(C,G)|0,o=(o=o+Math.imul(C,Q)|0)+Math.imul(S,G)|0,r=r+Math.imul(S,Q)|0,i=i+Math.imul(_,K)|0,o=(o=o+Math.imul(_,J)|0)+Math.imul(w,K)|0,r=r+Math.imul(w,J)|0,i=i+Math.imul(v,$)|0,o=(o=o+Math.imul(v,ee)|0)+Math.imul(y,$)|0,r=r+Math.imul(y,ee)|0,i=i+Math.imul(p,ne)|0,o=(o=o+Math.imul(p,ie)|0)+Math.imul(g,ne)|0,r=r+Math.imul(g,ie)|0;var Me=(l+(i=i+Math.imul(h,re)|0)|0)+((8191&(o=(o=o+Math.imul(h,se)|0)+Math.imul(d,re)|0))<<13)|0;l=((r=r+Math.imul(d,se)|0)+(o>>>13)|0)+(Me>>>26)|0,Me&=67108863,i=Math.imul(E,B),o=(o=Math.imul(E,H))+Math.imul(A,B)|0,r=Math.imul(A,H),i=i+Math.imul(D,U)|0,o=(o=o+Math.imul(D,Y)|0)+Math.imul(k,U)|0,r=r+Math.imul(k,Y)|0,i=i+Math.imul(I,G)|0,o=(o=o+Math.imul(I,Q)|0)+Math.imul(N,G)|0,r=r+Math.imul(N,Q)|0,i=i+Math.imul(C,K)|0,o=(o=o+Math.imul(C,J)|0)+Math.imul(S,K)|0,r=r+Math.imul(S,J)|0,i=i+Math.imul(_,$)|0,o=(o=o+Math.imul(_,ee)|0)+Math.imul(w,$)|0,r=r+Math.imul(w,ee)|0,i=i+Math.imul(v,ne)|0,o=(o=o+Math.imul(v,ie)|0)+Math.imul(y,ne)|0,r=r+Math.imul(y,ie)|0,i=i+Math.imul(p,re)|0,o=(o=o+Math.imul(p,se)|0)+Math.imul(g,re)|0,r=r+Math.imul(g,se)|0;var Ce=(l+(i=i+Math.imul(h,ue)|0)|0)+((8191&(o=(o=o+Math.imul(h,le)|0)+Math.imul(d,ue)|0))<<13)|0;l=((r=r+Math.imul(d,le)|0)+(o>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,i=Math.imul(O,B),o=(o=Math.imul(O,H))+Math.imul(R,B)|0,r=Math.imul(R,H),i=i+Math.imul(E,U)|0,o=(o=o+Math.imul(E,Y)|0)+Math.imul(A,U)|0,r=r+Math.imul(A,Y)|0,i=i+Math.imul(D,G)|0,o=(o=o+Math.imul(D,Q)|0)+Math.imul(k,G)|0,r=r+Math.imul(k,Q)|0,i=i+Math.imul(I,K)|0,o=(o=o+Math.imul(I,J)|0)+Math.imul(N,K)|0,r=r+Math.imul(N,J)|0,i=i+Math.imul(C,$)|0,o=(o=o+Math.imul(C,ee)|0)+Math.imul(S,$)|0,r=r+Math.imul(S,ee)|0,i=i+Math.imul(_,ne)|0,o=(o=o+Math.imul(_,ie)|0)+Math.imul(w,ne)|0,r=r+Math.imul(w,ie)|0,i=i+Math.imul(v,re)|0,o=(o=o+Math.imul(v,se)|0)+Math.imul(y,re)|0,r=r+Math.imul(y,se)|0,i=i+Math.imul(p,ue)|0,o=(o=o+Math.imul(p,le)|0)+Math.imul(g,ue)|0,r=r+Math.imul(g,le)|0;var Se=(l+(i=i+Math.imul(h,he)|0)|0)+((8191&(o=(o=o+Math.imul(h,de)|0)+Math.imul(d,he)|0))<<13)|0;l=((r=r+Math.imul(d,de)|0)+(o>>>13)|0)+(Se>>>26)|0,Se&=67108863,i=Math.imul(z,B),o=(o=Math.imul(z,H))+Math.imul(W,B)|0,r=Math.imul(W,H),i=i+Math.imul(O,U)|0,o=(o=o+Math.imul(O,Y)|0)+Math.imul(R,U)|0,r=r+Math.imul(R,Y)|0,i=i+Math.imul(E,G)|0,o=(o=o+Math.imul(E,Q)|0)+Math.imul(A,G)|0,r=r+Math.imul(A,Q)|0,i=i+Math.imul(D,K)|0,o=(o=o+Math.imul(D,J)|0)+Math.imul(k,K)|0,r=r+Math.imul(k,J)|0,i=i+Math.imul(I,$)|0,o=(o=o+Math.imul(I,ee)|0)+Math.imul(N,$)|0,r=r+Math.imul(N,ee)|0,i=i+Math.imul(C,ne)|0,o=(o=o+Math.imul(C,ie)|0)+Math.imul(S,ne)|0,r=r+Math.imul(S,ie)|0,i=i+Math.imul(_,re)|0,o=(o=o+Math.imul(_,se)|0)+Math.imul(w,re)|0,r=r+Math.imul(w,se)|0,i=i+Math.imul(v,ue)|0,o=(o=o+Math.imul(v,le)|0)+Math.imul(y,ue)|0,r=r+Math.imul(y,le)|0,i=i+Math.imul(p,he)|0,o=(o=o+Math.imul(p,de)|0)+Math.imul(g,he)|0,r=r+Math.imul(g,de)|0;var Le=(l+(i=i+Math.imul(h,pe)|0)|0)+((8191&(o=(o=o+Math.imul(h,ge)|0)+Math.imul(d,pe)|0))<<13)|0;l=((r=r+Math.imul(d,ge)|0)+(o>>>13)|0)+(Le>>>26)|0,Le&=67108863,i=Math.imul(z,U),o=(o=Math.imul(z,Y))+Math.imul(W,U)|0,r=Math.imul(W,Y),i=i+Math.imul(O,G)|0,o=(o=o+Math.imul(O,Q)|0)+Math.imul(R,G)|0,r=r+Math.imul(R,Q)|0,i=i+Math.imul(E,K)|0,o=(o=o+Math.imul(E,J)|0)+Math.imul(A,K)|0,r=r+Math.imul(A,J)|0,i=i+Math.imul(D,$)|0,o=(o=o+Math.imul(D,ee)|0)+Math.imul(k,$)|0,r=r+Math.imul(k,ee)|0,i=i+Math.imul(I,ne)|0,o=(o=o+Math.imul(I,ie)|0)+Math.imul(N,ne)|0,r=r+Math.imul(N,ie)|0,i=i+Math.imul(C,re)|0,o=(o=o+Math.imul(C,se)|0)+Math.imul(S,re)|0,r=r+Math.imul(S,se)|0,i=i+Math.imul(_,ue)|0,o=(o=o+Math.imul(_,le)|0)+Math.imul(w,ue)|0,r=r+Math.imul(w,le)|0,i=i+Math.imul(v,he)|0,o=(o=o+Math.imul(v,de)|0)+Math.imul(y,he)|0,r=r+Math.imul(y,de)|0;var Ie=(l+(i=i+Math.imul(p,pe)|0)|0)+((8191&(o=(o=o+Math.imul(p,ge)|0)+Math.imul(g,pe)|0))<<13)|0;l=((r=r+Math.imul(g,ge)|0)+(o>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,i=Math.imul(z,G),o=(o=Math.imul(z,Q))+Math.imul(W,G)|0,r=Math.imul(W,Q),i=i+Math.imul(O,K)|0,o=(o=o+Math.imul(O,J)|0)+Math.imul(R,K)|0,r=r+Math.imul(R,J)|0,i=i+Math.imul(E,$)|0,o=(o=o+Math.imul(E,ee)|0)+Math.imul(A,$)|0,r=r+Math.imul(A,ee)|0,i=i+Math.imul(D,ne)|0,o=(o=o+Math.imul(D,ie)|0)+Math.imul(k,ne)|0,r=r+Math.imul(k,ie)|0,i=i+Math.imul(I,re)|0,o=(o=o+Math.imul(I,se)|0)+Math.imul(N,re)|0,r=r+Math.imul(N,se)|0,i=i+Math.imul(C,ue)|0,o=(o=o+Math.imul(C,le)|0)+Math.imul(S,ue)|0,r=r+Math.imul(S,le)|0,i=i+Math.imul(_,he)|0,o=(o=o+Math.imul(_,de)|0)+Math.imul(w,he)|0,r=r+Math.imul(w,de)|0;var Ne=(l+(i=i+Math.imul(v,pe)|0)|0)+((8191&(o=(o=o+Math.imul(v,ge)|0)+Math.imul(y,pe)|0))<<13)|0;l=((r=r+Math.imul(y,ge)|0)+(o>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,i=Math.imul(z,K),o=(o=Math.imul(z,J))+Math.imul(W,K)|0,r=Math.imul(W,J),i=i+Math.imul(O,$)|0,o=(o=o+Math.imul(O,ee)|0)+Math.imul(R,$)|0,r=r+Math.imul(R,ee)|0,i=i+Math.imul(E,ne)|0,o=(o=o+Math.imul(E,ie)|0)+Math.imul(A,ne)|0,r=r+Math.imul(A,ie)|0,i=i+Math.imul(D,re)|0,o=(o=o+Math.imul(D,se)|0)+Math.imul(k,re)|0,r=r+Math.imul(k,se)|0,i=i+Math.imul(I,ue)|0,o=(o=o+Math.imul(I,le)|0)+Math.imul(N,ue)|0,r=r+Math.imul(N,le)|0,i=i+Math.imul(C,he)|0,o=(o=o+Math.imul(C,de)|0)+Math.imul(S,he)|0,r=r+Math.imul(S,de)|0;var xe=(l+(i=i+Math.imul(_,pe)|0)|0)+((8191&(o=(o=o+Math.imul(_,ge)|0)+Math.imul(w,pe)|0))<<13)|0;l=((r=r+Math.imul(w,ge)|0)+(o>>>13)|0)+(xe>>>26)|0,xe&=67108863,i=Math.imul(z,$),o=(o=Math.imul(z,ee))+Math.imul(W,$)|0,r=Math.imul(W,ee),i=i+Math.imul(O,ne)|0,o=(o=o+Math.imul(O,ie)|0)+Math.imul(R,ne)|0,r=r+Math.imul(R,ie)|0,i=i+Math.imul(E,re)|0,o=(o=o+Math.imul(E,se)|0)+Math.imul(A,re)|0,r=r+Math.imul(A,se)|0,i=i+Math.imul(D,ue)|0,o=(o=o+Math.imul(D,le)|0)+Math.imul(k,ue)|0,r=r+Math.imul(k,le)|0,i=i+Math.imul(I,he)|0,o=(o=o+Math.imul(I,de)|0)+Math.imul(N,he)|0,r=r+Math.imul(N,de)|0;var De=(l+(i=i+Math.imul(C,pe)|0)|0)+((8191&(o=(o=o+Math.imul(C,ge)|0)+Math.imul(S,pe)|0))<<13)|0;l=((r=r+Math.imul(S,ge)|0)+(o>>>13)|0)+(De>>>26)|0,De&=67108863,i=Math.imul(z,ne),o=(o=Math.imul(z,ie))+Math.imul(W,ne)|0,r=Math.imul(W,ie),i=i+Math.imul(O,re)|0,o=(o=o+Math.imul(O,se)|0)+Math.imul(R,re)|0,r=r+Math.imul(R,se)|0,i=i+Math.imul(E,ue)|0,o=(o=o+Math.imul(E,le)|0)+Math.imul(A,ue)|0,r=r+Math.imul(A,le)|0,i=i+Math.imul(D,he)|0,o=(o=o+Math.imul(D,de)|0)+Math.imul(k,he)|0,r=r+Math.imul(k,de)|0;var ke=(l+(i=i+Math.imul(I,pe)|0)|0)+((8191&(o=(o=o+Math.imul(I,ge)|0)+Math.imul(N,pe)|0))<<13)|0;l=((r=r+Math.imul(N,ge)|0)+(o>>>13)|0)+(ke>>>26)|0,ke&=67108863,i=Math.imul(z,re),o=(o=Math.imul(z,se))+Math.imul(W,re)|0,r=Math.imul(W,se),i=i+Math.imul(O,ue)|0,o=(o=o+Math.imul(O,le)|0)+Math.imul(R,ue)|0,r=r+Math.imul(R,le)|0,i=i+Math.imul(E,he)|0,o=(o=o+Math.imul(E,de)|0)+Math.imul(A,he)|0,r=r+Math.imul(A,de)|0;var Te=(l+(i=i+Math.imul(D,pe)|0)|0)+((8191&(o=(o=o+Math.imul(D,ge)|0)+Math.imul(k,pe)|0))<<13)|0;l=((r=r+Math.imul(k,ge)|0)+(o>>>13)|0)+(Te>>>26)|0,Te&=67108863,i=Math.imul(z,ue),o=(o=Math.imul(z,le))+Math.imul(W,ue)|0,r=Math.imul(W,le),i=i+Math.imul(O,he)|0,o=(o=o+Math.imul(O,de)|0)+Math.imul(R,he)|0,r=r+Math.imul(R,de)|0;var Ee=(l+(i=i+Math.imul(E,pe)|0)|0)+((8191&(o=(o=o+Math.imul(E,ge)|0)+Math.imul(A,pe)|0))<<13)|0;l=((r=r+Math.imul(A,ge)|0)+(o>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,i=Math.imul(z,he),o=(o=Math.imul(z,de))+Math.imul(W,he)|0,r=Math.imul(W,de);var Ae=(l+(i=i+Math.imul(O,pe)|0)|0)+((8191&(o=(o=o+Math.imul(O,ge)|0)+Math.imul(R,pe)|0))<<13)|0;l=((r=r+Math.imul(R,ge)|0)+(o>>>13)|0)+(Ae>>>26)|0,Ae&=67108863;var je=(l+(i=Math.imul(z,pe))|0)+((8191&(o=(o=Math.imul(z,ge))+Math.imul(W,pe)|0))<<13)|0;return l=((r=Math.imul(W,ge))+(o>>>13)|0)+(je>>>26)|0,je&=67108863,u[0]=me,u[1]=ve,u[2]=ye,u[3]=be,u[4]=_e,u[5]=we,u[6]=Me,u[7]=Ce,u[8]=Se,u[9]=Le,u[10]=Ie,u[11]=Ne,u[12]=xe,u[13]=De,u[14]=ke,u[15]=Te,u[16]=Ee,u[17]=Ae,u[18]=je,0!==l&&(u[19]=l,n.length++),n};function g(e,t,n){return(new m).mulp(e,t,n)}function m(e,t){this.x=e,this.y=t}Math.imul||(p=f),r.prototype.mulTo=function(e,t){var n,i=this.length+e.length;return n=10===this.length&&10===e.length?p(this,e,t):i<63?f(this,e,t):i<1024?function(e,t,n){n.negative=t.negative^e.negative,n.length=e.length+t.length;for(var i=0,o=0,r=0;r>>26)|0)>>>26,s&=67108863}n.words[r]=a,i=s,s=o}return 0!==i?n.words[r]=i:n.length--,n.strip()}(this,e,t):g(this,e,t),n},m.prototype.makeRBT=function(e){for(var t=new Array(e),n=r.prototype._countBits(e)-1,i=0;i>=1;return i},m.prototype.permute=function(e,t,n,i,o,r){for(var s=0;s>>=1)o++;return 1<>>=13,n[2*s+1]=8191&r,r>>>=13;for(s=2*t;s>=26,t+=o/67108864|0,t+=r>>>26,this.words[n]=67108863&r}return 0!==t&&(this.words[n]=t,this.length++),this},r.prototype.muln=function(e){return this.clone().imuln(e)},r.prototype.sqr=function(){return this.mul(this)},r.prototype.isqr=function(){return this.imul(this.clone())},r.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),n=0;n>>o}return t}(e);if(0===t.length)return new r(1);for(var n=this,i=0;i=0);var t,n=e%26,o=(e-n)/26,r=67108863>>>26-n<<26-n;if(0!==n){var s=0;for(t=0;t>>26-n}s&&(this.words[t]=s,this.length++)}if(0!==o){for(t=this.length-1;t>=0;t--)this.words[t+o]=this.words[t];for(t=0;t=0),o=t?(t-t%26)/26:0;var r=e%26,s=Math.min((e-r)/26,this.length),a=67108863^67108863>>>r<s)for(this.length-=s,l=0;l=0&&(0!==c||l>=o);l--){var h=0|this.words[l];this.words[l]=c<<26-r|h>>>r,c=h&a}return u&&0!==c&&(u.words[u.length++]=c),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},r.prototype.ishrn=function(e,t,n){return i(0===this.negative),this.iushrn(e,t,n)},r.prototype.shln=function(e){return this.clone().ishln(e)},r.prototype.ushln=function(e){return this.clone().iushln(e)},r.prototype.shrn=function(e){return this.clone().ishrn(e)},r.prototype.ushrn=function(e){return this.clone().iushrn(e)},r.prototype.testn=function(e){i("number"==typeof e&&e>=0);var t=e%26,n=(e-t)/26,o=1<=0);var t=e%26,n=(e-t)/26;if(i(0===this.negative,"imaskn works only with positive numbers"),this.length<=n)return this;if(0!==t&&n++,this.length=Math.min(n,this.length),0!==t){var o=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},r.prototype.isubn=function(e){if(i("number"==typeof e),i(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(u/67108864|0),this.words[o+n]=67108863&r}for(;o>26,this.words[o+n]=67108863&r;if(0===a)return this.strip();for(i(-1===a),a=0,o=0;o>26,this.words[o]=67108863&r;return this.negative=1,this.strip()},r.prototype._wordDiv=function(e,t){var n=(this.length,e.length),i=this.clone(),o=e,s=0|o.words[o.length-1];0!=(n=26-this._countBits(s))&&(o=o.ushln(n),i.iushln(n),s=0|o.words[o.length-1]);var a,u=i.length-o.length;if("mod"!==t){(a=new r(null)).length=u+1,a.words=new Array(a.length);for(var l=0;l=0;h--){var d=67108864*(0|i.words[o.length+h])+(0|i.words[o.length+h-1]);for(d=Math.min(d/s|0,67108863),i._ishlnsubmul(o,d,h);0!==i.negative;)d--,i.negative=0,i._ishlnsubmul(o,1,h),i.isZero()||(i.negative^=1);a&&(a.words[h]=d)}return a&&a.strip(),i.strip(),"div"!==t&&0!==n&&i.iushrn(n),{div:a||null,mod:i}},r.prototype.divmod=function(e,t,n){return i(!e.isZero()),this.isZero()?{div:new r(0),mod:new r(0)}:0!==this.negative&&0===e.negative?(a=this.neg().divmod(e,t),"mod"!==t&&(o=a.div.neg()),"div"!==t&&(s=a.mod.neg(),n&&0!==s.negative&&s.iadd(e)),{div:o,mod:s}):0===this.negative&&0!==e.negative?(a=this.divmod(e.neg(),t),"mod"!==t&&(o=a.div.neg()),{div:o,mod:a.mod}):this.negative&e.negative?(a=this.neg().divmod(e.neg(),t),"div"!==t&&(s=a.mod.neg(),n&&0!==s.negative&&s.isub(e)),{div:a.div,mod:s}):e.length>this.length||this.cmp(e)<0?{div:new r(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new r(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new r(this.modn(e.words[0]))}:this._wordDiv(e,t);var o,s,a},r.prototype.div=function(e){return this.divmod(e,"div",!1).div},r.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},r.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},r.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var n=0!==t.div.negative?t.mod.isub(e):t.mod,i=e.ushrn(1),o=e.andln(1),r=n.cmp(i);return r<0||1===o&&0===r?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},r.prototype.modn=function(e){i(e<=67108863);for(var t=(1<<26)%e,n=0,o=this.length-1;o>=0;o--)n=(t*n+(0|this.words[o]))%e;return n},r.prototype.idivn=function(e){i(e<=67108863);for(var t=0,n=this.length-1;n>=0;n--){var o=(0|this.words[n])+67108864*t;this.words[n]=o/e|0,t=o%e}return this.strip()},r.prototype.divn=function(e){return this.clone().idivn(e)},r.prototype.egcd=function(e){i(0===e.negative),i(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var o=new r(1),s=new r(0),a=new r(0),u=new r(1),l=0;t.isEven()&&n.isEven();)t.iushrn(1),n.iushrn(1),++l;for(var c=n.clone(),h=t.clone();!t.isZero();){for(var d=0,f=1;!(t.words[0]&f)&&d<26;++d,f<<=1);if(d>0)for(t.iushrn(d);d-- >0;)(o.isOdd()||s.isOdd())&&(o.iadd(c),s.isub(h)),o.iushrn(1),s.iushrn(1);for(var p=0,g=1;!(n.words[0]&g)&&p<26;++p,g<<=1);if(p>0)for(n.iushrn(p);p-- >0;)(a.isOdd()||u.isOdd())&&(a.iadd(c),u.isub(h)),a.iushrn(1),u.iushrn(1);t.cmp(n)>=0?(t.isub(n),o.isub(a),s.isub(u)):(n.isub(t),a.isub(o),u.isub(s))}return{a,b:u,gcd:n.iushln(l)}},r.prototype._invmp=function(e){i(0===e.negative),i(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var o,s=new r(1),a=new r(0),u=n.clone();t.cmpn(1)>0&&n.cmpn(1)>0;){for(var l=0,c=1;!(t.words[0]&c)&&l<26;++l,c<<=1);if(l>0)for(t.iushrn(l);l-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);for(var h=0,d=1;!(n.words[0]&d)&&h<26;++h,d<<=1);if(h>0)for(n.iushrn(h);h-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);t.cmp(n)>=0?(t.isub(n),s.isub(a)):(n.isub(t),a.isub(s))}return(o=0===t.cmpn(1)?s:a).cmpn(0)<0&&o.iadd(e),o},r.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),n=e.clone();t.negative=0,n.negative=0;for(var i=0;t.isEven()&&n.isEven();i++)t.iushrn(1),n.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;n.isEven();)n.iushrn(1);var o=t.cmp(n);if(o<0){var r=t;t=n,n=r}else if(0===o||0===n.cmpn(1))break;t.isub(n)}return n.iushln(i)},r.prototype.invm=function(e){return this.egcd(e).a.umod(e)},r.prototype.isEven=function(){return!(1&this.words[0])},r.prototype.isOdd=function(){return!(1&~this.words[0])},r.prototype.andln=function(e){return this.words[0]&e},r.prototype.bincn=function(e){i("number"==typeof e);var t=e%26,n=(e-t)/26,o=1<>>26,a&=67108863,this.words[s]=a}return 0!==r&&(this.words[s]=r,this.length++),this},r.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},r.prototype.cmpn=function(e){var t,n=e<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this.strip(),this.length>1)t=1;else{n&&(e=-e),i(e<=67108863,"Number is too big");var o=0|this.words[0];t=o===e?0:oe.length)return 1;if(this.length=0;n--){var i=0|this.words[n],o=0|e.words[n];if(i!==o){io&&(t=1);break}}return t},r.prototype.gtn=function(e){return 1===this.cmpn(e)},r.prototype.gt=function(e){return 1===this.cmp(e)},r.prototype.gten=function(e){return this.cmpn(e)>=0},r.prototype.gte=function(e){return this.cmp(e)>=0},r.prototype.ltn=function(e){return-1===this.cmpn(e)},r.prototype.lt=function(e){return-1===this.cmp(e)},r.prototype.lten=function(e){return this.cmpn(e)<=0},r.prototype.lte=function(e){return this.cmp(e)<=0},r.prototype.eqn=function(e){return 0===this.cmpn(e)},r.prototype.eq=function(e){return 0===this.cmp(e)},r.red=function(e){return new C(e)},r.prototype.toRed=function(e){return i(!this.red,"Already a number in reduction context"),i(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},r.prototype.fromRed=function(){return i(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},r.prototype._forceRed=function(e){return this.red=e,this},r.prototype.forceRed=function(e){return i(!this.red,"Already a number in reduction context"),this._forceRed(e)},r.prototype.redAdd=function(e){return i(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},r.prototype.redIAdd=function(e){return i(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},r.prototype.redSub=function(e){return i(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},r.prototype.redISub=function(e){return i(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},r.prototype.redShl=function(e){return i(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},r.prototype.redMul=function(e){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},r.prototype.redIMul=function(e){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},r.prototype.redSqr=function(){return i(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},r.prototype.redISqr=function(){return i(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},r.prototype.redSqrt=function(){return i(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},r.prototype.redInvm=function(){return i(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},r.prototype.redNeg=function(){return i(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},r.prototype.redPow=function(e){return i(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var v={k256:null,p224:null,p192:null,p25519:null};function y(e,t){this.name=e,this.p=new r(t,16),this.n=this.p.bitLength(),this.k=new r(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function b(){y.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function _(){y.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){y.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function M(){y.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function C(e){if("string"==typeof e){var t=r._prime(e);this.m=t.p,this.prime=t}else i(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function S(e){C.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new r(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}y.prototype._tmp=function(){var e=new r(null);return e.words=new Array(Math.ceil(this.n/13)),e},y.prototype.ireduce=function(e){var t,n=e;do{this.split(n,this.tmp),t=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(t>this.n);var i=t0?n.isub(this.p):void 0!==n.strip?n.strip():n._strip(),n},y.prototype.split=function(e,t){e.iushrn(this.n,0,t)},y.prototype.imulK=function(e){return e.imul(this.k)},o(b,y),b.prototype.split=function(e,t){for(var n=4194303,i=Math.min(e.length,9),o=0;o>>22,r=s}r>>>=22,e.words[o-10]=r,0===r&&e.length>10?e.length-=10:e.length-=9},b.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,n=0;n>>=26,e.words[n]=o,t=i}return 0!==t&&(e.words[e.length++]=t),e},r._prime=function(e){if(v[e])return v[e];var t;if("k256"===e)t=new b;else if("p224"===e)t=new _;else if("p192"===e)t=new w;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new M}return v[e]=t,t},C.prototype._verify1=function(e){i(0===e.negative,"red works only with positives"),i(e.red,"red works only with red numbers")},C.prototype._verify2=function(e,t){i(!(e.negative|t.negative),"red works only with positives"),i(e.red&&e.red===t.red,"red works only with red numbers")},C.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},C.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},C.prototype.add=function(e,t){this._verify2(e,t);var n=e.add(t);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},C.prototype.iadd=function(e,t){this._verify2(e,t);var n=e.iadd(t);return n.cmp(this.m)>=0&&n.isub(this.m),n},C.prototype.sub=function(e,t){this._verify2(e,t);var n=e.sub(t);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},C.prototype.isub=function(e,t){this._verify2(e,t);var n=e.isub(t);return n.cmpn(0)<0&&n.iadd(this.m),n},C.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},C.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},C.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},C.prototype.isqr=function(e){return this.imul(e,e.clone())},C.prototype.sqr=function(e){return this.mul(e,e)},C.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(i(t%2==1),3===t){var n=this.m.add(new r(1)).iushrn(2);return this.pow(e,n)}for(var o=this.m.subn(1),s=0;!o.isZero()&&0===o.andln(1);)s++,o.iushrn(1);i(!o.isZero());var a=new r(1).toRed(this),u=a.redNeg(),l=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new r(2*c*c).toRed(this);0!==this.pow(c,l).cmp(u);)c.redIAdd(u);for(var h=this.pow(c,o),d=this.pow(e,o.addn(1).iushrn(1)),f=this.pow(e,o),p=s;0!==f.cmp(a);){for(var g=f,m=0;0!==g.cmp(a);m++)g=g.redSqr();i(m=0;i--){for(var l=t.words[i],c=u-1;c>=0;c--){var h=l>>c&1;o!==n[0]&&(o=this.sqr(o)),0!==h||0!==s?(s<<=1,s|=h,(4==++a||0===i&&0===c)&&(o=this.mul(o,n[s]),a=0,s=0)):a=0}u=26}return o},C.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},C.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},r.mont=function(e){return new S(e)},o(S,C),S.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},S.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},S.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var n=e.imul(t),i=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=n.isub(i).iushrn(this.shift),r=o;return o.cmp(this.m)>=0?r=o.isub(this.m):o.cmpn(0)<0&&(r=o.iadd(this.m)),r._forceRed(this)},S.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new r(0)._forceRed(this);var n=e.mul(t),i=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=n.isub(i).iushrn(this.shift),s=o;return o.cmp(this.m)>=0?s=o.isub(this.m):o.cmpn(0)<0&&(s=o.iadd(this.m)),s._forceRed(this)},S.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=n.nmd(e),this)},2059:(e,t,n)=>{"use strict";var i=n(9385),o=n(9781),r=n(2428),s=n(5203),a=n(8511);function u(e){a.call(this,"digest"),this._hash=e}i(u,a),u.prototype._update=function(e){this._hash.update(e)},u.prototype._final=function(){return this._hash.digest()},e.exports=function(e){return"md5"===(e=e.toLowerCase())?new o:"rmd160"===e||"ripemd160"===e?new r:new u(s(e))}},4159:(e,t,n)=>{var i=n(9781);e.exports=function(e){return(new i).update(e).digest()}},8080:(e,t,n)=>{"use strict";var i=n(9385),o=n(2397),r=n(8511),s=n(2238).Buffer,a=n(4159),u=n(2428),l=n(5203),c=s.alloc(128);function h(e,t){r.call(this,"digest"),"string"==typeof t&&(t=s.from(t));var n="sha512"===e||"sha384"===e?128:64;this._alg=e,this._key=t,t.length>n?t=("rmd160"===e?new u:l(e)).update(t).digest():t.length{"use strict";var i=n(9385),o=n(2238).Buffer,r=n(8511),s=o.alloc(128),a=64;function u(e,t){r.call(this,"digest"),"string"==typeof t&&(t=o.from(t)),this._alg=e,this._key=t,t.length>a?t=e(t):t.length{"use strict";t.randomBytes=t.rng=t.pseudoRandomBytes=t.prng=n(8190),t.createHash=t.Hash=n(2059),t.createHmac=t.Hmac=n(8080);var i=n(4136),o=Object.keys(i),r=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(o);t.getHashes=function(){return r};var s=n(853);t.pbkdf2=s.pbkdf2,t.pbkdf2Sync=s.pbkdf2Sync;var a=n(7070);t.Cipher=a.Cipher,t.createCipher=a.createCipher,t.Cipheriv=a.Cipheriv,t.createCipheriv=a.createCipheriv,t.Decipher=a.Decipher,t.createDecipher=a.createDecipher,t.Decipheriv=a.Decipheriv,t.createDecipheriv=a.createDecipheriv,t.getCiphers=a.getCiphers,t.listCiphers=a.listCiphers;var u=n(969);t.DiffieHellmanGroup=u.DiffieHellmanGroup,t.createDiffieHellmanGroup=u.createDiffieHellmanGroup,t.getDiffieHellman=u.getDiffieHellman,t.createDiffieHellman=u.createDiffieHellman,t.DiffieHellman=u.DiffieHellman;var l=n(455);t.createSign=l.createSign,t.Sign=l.Sign,t.createVerify=l.createVerify,t.Verify=l.Verify,t.createECDH=n(4231);var c=n(4069);t.publicEncrypt=c.publicEncrypt,t.privateEncrypt=c.privateEncrypt,t.publicDecrypt=c.publicDecrypt,t.privateDecrypt=c.privateDecrypt;var h=n(5666);t.randomFill=h.randomFill,t.randomFillSync=h.randomFillSync,t.createCredentials=function(){throw new Error(["sorry, createCredentials is not implemented yet","we accept pull requests","https://github.com/crypto-browserify/crypto-browserify"].join("\n"))},t.constants={DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,NPN_ENABLED:1,ALPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6}},8826:e=>{e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n=function(e,t){var n,i=e[1]||"",o=e[3];if(!o)return i;if(t&&"function"==typeof btoa){var r=(n=o,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(n))))+" */"),s=o.sources.map((function(e){return"/*# sourceURL="+o.sourceRoot+e+" */"}));return[i].concat(s).concat([r]).join("\n")}return[i].join("\n")}(t,e);return t[2]?"@media "+t[2]+"{"+n+"}":n})).join("")},t.i=function(e,n){"string"==typeof e&&(e=[[null,e,""]]);for(var i={},o=0;o{"use strict";t.utils=n(8487),t.Cipher=n(3003),t.DES=n(4358),t.CBC=n(7472),t.EDE=n(634)},7472:(e,t,n)=>{"use strict";var i=n(4890),o=n(9385),r={};function s(e){i.equal(e.length,8,"Invalid IV length"),this.iv=new Array(8);for(var t=0;t{"use strict";var i=n(4890);function o(e){this.options=e,this.type=this.options.type,this.blockSize=8,this._init(),this.buffer=new Array(this.blockSize),this.bufferOff=0,this.padding=!1!==e.padding}e.exports=o,o.prototype._init=function(){},o.prototype.update=function(e){return 0===e.length?[]:"decrypt"===this.type?this._updateDecrypt(e):this._updateEncrypt(e)},o.prototype._buffer=function(e,t){for(var n=Math.min(this.buffer.length-this.bufferOff,e.length-t),i=0;i0;i--)t+=this._buffer(e,t),n+=this._flushBuffer(o,n);return t+=this._buffer(e,t),o},o.prototype.final=function(e){var t,n;return e&&(t=this.update(e)),n="encrypt"===this.type?this._finalEncrypt():this._finalDecrypt(),t?t.concat(n):n},o.prototype._pad=function(e,t){if(0===t)return!1;for(;t{"use strict";var i=n(4890),o=n(9385),r=n(8487),s=n(3003);function a(){this.tmp=new Array(2),this.keys=null}function u(e){s.call(this,e);var t=new a;this._desState=t,this.deriveKeys(t,e.key)}o(u,s),e.exports=u,u.create=function(e){return new u(e)};var l=[1,1,2,2,2,2,2,2,1,2,2,2,2,2,2,1];u.prototype.deriveKeys=function(e,t){e.keys=new Array(32),i.equal(t.length,this.blockSize,"Invalid key length");var n=r.readUInt32BE(t,0),o=r.readUInt32BE(t,4);r.pc1(n,o,e.tmp,0),n=e.tmp[0],o=e.tmp[1];for(var s=0;s>>1];n=r.r28shl(n,a),o=r.r28shl(o,a),r.pc2(n,o,e.keys,s)}},u.prototype._update=function(e,t,n,i){var o=this._desState,s=r.readUInt32BE(e,t),a=r.readUInt32BE(e,t+4);r.ip(s,a,o.tmp,0),s=o.tmp[0],a=o.tmp[1],"encrypt"===this.type?this._encrypt(o,s,a,o.tmp,0):this._decrypt(o,s,a,o.tmp,0),s=o.tmp[0],a=o.tmp[1],r.writeUInt32BE(n,s,i),r.writeUInt32BE(n,a,i+4)},u.prototype._pad=function(e,t){if(!1===this.padding)return!1;for(var n=e.length-t,i=t;i>>0,s=d}r.rip(a,s,i,o)},u.prototype._decrypt=function(e,t,n,i,o){for(var s=n,a=t,u=e.keys.length-2;u>=0;u-=2){var l=e.keys[u],c=e.keys[u+1];r.expand(s,e.tmp,0),l^=e.tmp[0],c^=e.tmp[1];var h=r.substitute(l,c),d=s;s=(a^r.permute(h))>>>0,a=d}r.rip(s,a,i,o)}},634:(e,t,n)=>{"use strict";var i=n(4890),o=n(9385),r=n(3003),s=n(4358);function a(e,t){i.equal(t.length,24,"Invalid key length");var n=t.slice(0,8),o=t.slice(8,16),r=t.slice(16,24);this.ciphers="encrypt"===e?[s.create({type:"encrypt",key:n}),s.create({type:"decrypt",key:o}),s.create({type:"encrypt",key:r})]:[s.create({type:"decrypt",key:r}),s.create({type:"encrypt",key:o}),s.create({type:"decrypt",key:n})]}function u(e){r.call(this,e);var t=new a(this.type,this.options.key);this._edeState=t}o(u,r),e.exports=u,u.create=function(e){return new u(e)},u.prototype._update=function(e,t,n,i){var o=this._edeState;o.ciphers[0]._update(e,t,n,i),o.ciphers[1]._update(n,i,n,i),o.ciphers[2]._update(n,i,n,i)},u.prototype._pad=s.prototype._pad,u.prototype._unpad=s.prototype._unpad},8487:(e,t)=>{"use strict";t.readUInt32BE=function(e,t){return(e[0+t]<<24|e[1+t]<<16|e[2+t]<<8|e[3+t])>>>0},t.writeUInt32BE=function(e,t,n){e[0+n]=t>>>24,e[1+n]=t>>>16&255,e[2+n]=t>>>8&255,e[3+n]=255&t},t.ip=function(e,t,n,i){for(var o=0,r=0,s=6;s>=0;s-=2){for(var a=0;a<=24;a+=8)o<<=1,o|=t>>>a+s&1;for(a=0;a<=24;a+=8)o<<=1,o|=e>>>a+s&1}for(s=6;s>=0;s-=2){for(a=1;a<=25;a+=8)r<<=1,r|=t>>>a+s&1;for(a=1;a<=25;a+=8)r<<=1,r|=e>>>a+s&1}n[i+0]=o>>>0,n[i+1]=r>>>0},t.rip=function(e,t,n,i){for(var o=0,r=0,s=0;s<4;s++)for(var a=24;a>=0;a-=8)o<<=1,o|=t>>>a+s&1,o<<=1,o|=e>>>a+s&1;for(s=4;s<8;s++)for(a=24;a>=0;a-=8)r<<=1,r|=t>>>a+s&1,r<<=1,r|=e>>>a+s&1;n[i+0]=o>>>0,n[i+1]=r>>>0},t.pc1=function(e,t,n,i){for(var o=0,r=0,s=7;s>=5;s--){for(var a=0;a<=24;a+=8)o<<=1,o|=t>>a+s&1;for(a=0;a<=24;a+=8)o<<=1,o|=e>>a+s&1}for(a=0;a<=24;a+=8)o<<=1,o|=t>>a+s&1;for(s=1;s<=3;s++){for(a=0;a<=24;a+=8)r<<=1,r|=t>>a+s&1;for(a=0;a<=24;a+=8)r<<=1,r|=e>>a+s&1}for(a=0;a<=24;a+=8)r<<=1,r|=e>>a+s&1;n[i+0]=o>>>0,n[i+1]=r>>>0},t.r28shl=function(e,t){return e<>>28-t};var n=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24];t.pc2=function(e,t,i,o){for(var r=0,s=0,a=n.length>>>1,u=0;u>>n[u]&1;for(u=a;u>>n[u]&1;i[o+0]=r>>>0,i[o+1]=s>>>0},t.expand=function(e,t,n){var i=0,o=0;i=(1&e)<<5|e>>>27;for(var r=23;r>=15;r-=4)i<<=6,i|=e>>>r&63;for(r=11;r>=3;r-=4)o|=e>>>r&63,o<<=6;o|=(31&e)<<1|e>>>31,t[n+0]=i>>>0,t[n+1]=o>>>0};var i=[14,0,4,15,13,7,1,4,2,14,15,2,11,13,8,1,3,10,10,6,6,12,12,11,5,9,9,5,0,3,7,8,4,15,1,12,14,8,8,2,13,4,6,9,2,1,11,7,15,5,12,11,9,3,7,14,3,10,10,0,5,6,0,13,15,3,1,13,8,4,14,7,6,15,11,2,3,8,4,14,9,12,7,0,2,1,13,10,12,6,0,9,5,11,10,5,0,13,14,8,7,10,11,1,10,3,4,15,13,4,1,2,5,11,8,6,12,7,6,12,9,0,3,5,2,14,15,9,10,13,0,7,9,0,14,9,6,3,3,4,15,6,5,10,1,2,13,8,12,5,7,14,11,12,4,11,2,15,8,1,13,1,6,10,4,13,9,0,8,6,15,9,3,8,0,7,11,4,1,15,2,14,12,3,5,11,10,5,14,2,7,12,7,13,13,8,14,11,3,5,0,6,6,15,9,0,10,3,1,4,2,7,8,2,5,12,11,1,12,10,4,14,15,9,10,3,6,15,9,0,0,6,12,10,11,1,7,13,13,8,15,9,1,4,3,5,14,11,5,12,2,7,8,2,4,14,2,14,12,11,4,2,1,12,7,4,10,7,11,13,6,1,8,5,5,0,3,15,15,10,13,3,0,9,14,8,9,6,4,11,2,8,1,12,11,7,10,1,13,14,7,2,8,13,15,6,9,15,12,0,5,9,6,10,3,4,0,5,14,3,12,10,1,15,10,4,15,2,9,7,2,12,6,9,8,5,0,6,13,1,3,13,4,14,14,0,7,11,5,3,11,8,9,4,14,3,15,2,5,12,2,9,8,5,12,15,3,10,7,11,0,14,4,1,10,7,1,6,13,0,11,8,6,13,4,13,11,0,2,11,14,7,15,4,0,9,8,1,13,10,3,14,12,3,9,5,7,12,5,2,10,15,6,8,1,6,1,6,4,11,11,13,13,8,12,1,3,4,7,10,14,7,10,9,15,5,6,0,8,15,0,14,5,2,9,3,2,12,13,1,2,15,8,13,4,8,6,10,15,3,11,7,1,4,10,12,9,5,3,6,14,11,5,0,0,14,12,9,7,2,7,2,11,1,4,14,1,7,9,4,12,10,14,8,2,13,0,15,6,12,10,9,13,0,15,3,3,5,5,6,8,11];t.substitute=function(e,t){for(var n=0,o=0;o<4;o++)n<<=4,n|=i[64*o+(e>>>18-6*o&63)];for(o=0;o<4;o++)n<<=4,n|=i[256+64*o+(t>>>18-6*o&63)];return n>>>0};var o=[16,25,12,11,3,20,4,15,31,17,9,6,27,14,1,22,30,24,8,18,0,5,29,23,13,19,2,26,10,21,28,7];t.permute=function(e){for(var t=0,n=0;n>>o[n]&1;return t>>>0},t.padSplit=function(e,t,n){for(var i=e.toString(2);i.length{var i=n(1278).Buffer,o=n(4359),r=n(3241),s=n(897),a={binary:!0,hex:!0,base64:!0};t.DiffieHellmanGroup=t.createDiffieHellmanGroup=t.getDiffieHellman=function(e){var t=new i(r[e].prime,"hex"),n=new i(r[e].gen,"hex");return new s(t,n)},t.createDiffieHellman=t.DiffieHellman=function e(t,n,r,u){return i.isBuffer(n)||void 0===a[n]?e(t,"binary",n,r):(n=n||"binary",u=u||"binary",r=r||new i([2]),i.isBuffer(r)||(r=new i(r,u)),"number"==typeof t?new s(o(t,r),r,!0):(i.isBuffer(t)||(t=new i(t,n)),new s(t,r,!0)))}},897:(e,t,n)=>{var i=n(1278).Buffer,o=n(4856),r=new(n(3587)),s=new o(24),a=new o(11),u=new o(10),l=new o(3),c=new o(7),h=n(4359),d=n(8190);function f(e,t){return t=t||"utf8",i.isBuffer(e)||(e=new i(e,t)),this._pub=new o(e),this}function p(e,t){return t=t||"utf8",i.isBuffer(e)||(e=new i(e,t)),this._priv=new o(e),this}e.exports=m;var g={};function m(e,t,n){this.setGenerator(t),this.__prime=new o(e),this._prime=o.mont(this.__prime),this._primeLen=e.length,this._pub=void 0,this._priv=void 0,this._primeCode=void 0,n?(this.setPublicKey=f,this.setPrivateKey=p):this._primeCode=8}function v(e,t){var n=new i(e.toArray());return t?n.toString(t):n}Object.defineProperty(m.prototype,"verifyError",{enumerable:!0,get:function(){return"number"!=typeof this._primeCode&&(this._primeCode=function(e,t){var n=t.toString("hex"),i=[n,e.toString(16)].join("_");if(i in g)return g[i];var o,d=0;if(e.isEven()||!h.simpleSieve||!h.fermatTest(e)||!r.test(e))return d+=1,d+="02"===n||"05"===n?8:4,g[i]=d,d;switch(r.test(e.shrn(1))||(d+=2),n){case"02":e.mod(s).cmp(a)&&(d+=8);break;case"05":(o=e.mod(u)).cmp(l)&&o.cmp(c)&&(d+=8);break;default:d+=4}return g[i]=d,d}(this.__prime,this.__gen)),this._primeCode}}),m.prototype.generateKeys=function(){return this._priv||(this._priv=new o(d(this._primeLen))),this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed(),this.getPublicKey()},m.prototype.computeSecret=function(e){var t=(e=(e=new o(e)).toRed(this._prime)).redPow(this._priv).fromRed(),n=new i(t.toArray()),r=this.getPrime();if(n.length{var i=n(8190);e.exports=y,y.simpleSieve=m,y.fermatTest=v;var o=n(4856),r=new o(24),s=new(n(3587)),a=new o(1),u=new o(2),l=new o(5),c=(new o(16),new o(8),new o(10)),h=new o(3),d=(new o(7),new o(11)),f=new o(4),p=(new o(12),null);function g(){if(null!==p)return p;var e=[];e[0]=2;for(var t=1,n=3;n<1048576;n+=2){for(var i=Math.ceil(Math.sqrt(n)),o=0;oe;)n.ishrn(1);if(n.isEven()&&n.iadd(a),n.testn(1)||n.iadd(u),t.cmp(u)){if(!t.cmp(l))for(;n.mod(c).cmp(h);)n.iadd(f)}else for(;n.mod(r).cmp(d);)n.iadd(f);if(m(p=n.shrn(1))&&m(n)&&v(p)&&v(n)&&s.test(p)&&s.test(n))return n}}},4856:function(e,t,n){!function(e,t){"use strict";function i(e,t){if(!e)throw new Error(t||"Assertion failed")}function o(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}function r(e,t,n){if(r.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(n=t,t=10),this._init(e||0,t||10,n||"be"))}var s;"object"==typeof e?e.exports=r:t.BN=r,r.BN=r,r.wordSize=26;try{s="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:n(6089).Buffer}catch(e){}function a(e,t){var n=e.charCodeAt(t);return n>=65&&n<=70?n-55:n>=97&&n<=102?n-87:n-48&15}function u(e,t,n){var i=a(e,n);return n-1>=t&&(i|=a(e,n-1)<<4),i}function l(e,t,n,i){for(var o=0,r=Math.min(e.length,n),s=t;s=49?a-49+10:a>=17?a-17+10:a}return o}r.isBN=function(e){return e instanceof r||null!==e&&"object"==typeof e&&e.constructor.wordSize===r.wordSize&&Array.isArray(e.words)},r.max=function(e,t){return e.cmp(t)>0?e:t},r.min=function(e,t){return e.cmp(t)<0?e:t},r.prototype._init=function(e,t,n){if("number"==typeof e)return this._initNumber(e,t,n);if("object"==typeof e)return this._initArray(e,t,n);"hex"===t&&(t=16),i(t===(0|t)&&t>=2&&t<=36);var o=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(o++,this.negative=1),o=0;o-=3)s=e[o]|e[o-1]<<8|e[o-2]<<16,this.words[r]|=s<>>26-a&67108863,(a+=24)>=26&&(a-=26,r++);else if("le"===n)for(o=0,r=0;o>>26-a&67108863,(a+=24)>=26&&(a-=26,r++);return this.strip()},r.prototype._parseHex=function(e,t,n){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var i=0;i=t;i-=2)o=u(e,t,i)<=18?(r-=18,s+=1,this.words[s]|=o>>>26):r+=8;else for(i=(e.length-t)%2==0?t+1:t;i=18?(r-=18,s+=1,this.words[s]|=o>>>26):r+=8;this.strip()},r.prototype._parseBase=function(e,t,n){this.words=[0],this.length=1;for(var i=0,o=1;o<=67108863;o*=t)i++;i--,o=o/t|0;for(var r=e.length-n,s=r%i,a=Math.min(r,r-s)+n,u=0,c=n;c1&&0===this.words[this.length-1];)this.length--;return this._normSign()},r.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},r.prototype.inspect=function(){return(this.red?""};var c=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],h=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],d=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function f(e,t,n){n.negative=t.negative^e.negative;var i=e.length+t.length|0;n.length=i,i=i-1|0;var o=0|e.words[0],r=0|t.words[0],s=o*r,a=67108863&s,u=s/67108864|0;n.words[0]=a;for(var l=1;l>>26,h=67108863&u,d=Math.min(l,t.length-1),f=Math.max(0,l-e.length+1);f<=d;f++){var p=l-f|0;c+=(s=(o=0|e.words[p])*(r=0|t.words[f])+h)/67108864|0,h=67108863&s}n.words[l]=0|h,u=0|c}return 0!==u?n.words[l]=0|u:n.length--,n.strip()}r.prototype.toString=function(e,t){var n;if(t=0|t||1,16===(e=e||10)||"hex"===e){n="";for(var o=0,r=0,s=0;s>>24-o&16777215)||s!==this.length-1?c[6-u.length]+u+n:u+n,(o+=2)>=26&&(o-=26,s--)}for(0!==r&&(n=r.toString(16)+n);n.length%t!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(e===(0|e)&&e>=2&&e<=36){var l=h[e],f=d[e];n="";var p=this.clone();for(p.negative=0;!p.isZero();){var g=p.modn(f).toString(e);n=(p=p.idivn(f)).isZero()?g+n:c[l-g.length]+g+n}for(this.isZero()&&(n="0"+n);n.length%t!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}i(!1,"Base should be between 2 and 36")},r.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&i(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},r.prototype.toJSON=function(){return this.toString(16)},r.prototype.toBuffer=function(e,t){return i(void 0!==s),this.toArrayLike(s,e,t)},r.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},r.prototype.toArrayLike=function(e,t,n){var o=this.byteLength(),r=n||Math.max(1,o);i(o<=r,"byte array longer than desired length"),i(r>0,"Requested array length <= 0"),this.strip();var s,a,u="le"===t,l=new e(r),c=this.clone();if(u){for(a=0;!c.isZero();a++)s=c.andln(255),c.iushrn(8),l[a]=s;for(;a=4096&&(n+=13,t>>>=13),t>=64&&(n+=7,t>>>=7),t>=8&&(n+=4,t>>>=4),t>=2&&(n+=2,t>>>=2),n+t},r.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,n=0;return 8191&t||(n+=13,t>>>=13),127&t||(n+=7,t>>>=7),15&t||(n+=4,t>>>=4),3&t||(n+=2,t>>>=2),1&t||n++,n},r.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},r.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},r.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},r.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var n=0;ne.length?this.clone().iand(e):e.clone().iand(this)},r.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},r.prototype.iuxor=function(e){var t,n;this.length>e.length?(t=this,n=e):(t=e,n=this);for(var i=0;ie.length?this.clone().ixor(e):e.clone().ixor(this)},r.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},r.prototype.inotn=function(e){i("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),n=e%26;this._expand(t),n>0&&t--;for(var o=0;o0&&(this.words[o]=~this.words[o]&67108863>>26-n),this.strip()},r.prototype.notn=function(e){return this.clone().inotn(e)},r.prototype.setn=function(e,t){i("number"==typeof e&&e>=0);var n=e/26|0,o=e%26;return this._expand(n+1),this.words[n]=t?this.words[n]|1<e.length?(n=this,i=e):(n=e,i=this);for(var o=0,r=0;r>>26;for(;0!==o&&r>>26;if(this.length=n.length,0!==o)this.words[this.length]=o,this.length++;else if(n!==this)for(;re.length?this.clone().iadd(e):e.clone().iadd(this)},r.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var n,i,o=this.cmp(e);if(0===o)return this.negative=0,this.length=1,this.words[0]=0,this;o>0?(n=this,i=e):(n=e,i=this);for(var r=0,s=0;s>26,this.words[s]=67108863&t;for(;0!==r&&s>26,this.words[s]=67108863&t;if(0===r&&s>>13,f=0|s[1],p=8191&f,g=f>>>13,m=0|s[2],v=8191&m,y=m>>>13,b=0|s[3],_=8191&b,w=b>>>13,M=0|s[4],C=8191&M,S=M>>>13,L=0|s[5],I=8191&L,N=L>>>13,x=0|s[6],D=8191&x,k=x>>>13,T=0|s[7],E=8191&T,A=T>>>13,j=0|s[8],O=8191&j,R=j>>>13,P=0|s[9],z=8191&P,W=P>>>13,F=0|a[0],B=8191&F,H=F>>>13,V=0|a[1],U=8191&V,Y=V>>>13,Z=0|a[2],G=8191&Z,Q=Z>>>13,q=0|a[3],K=8191&q,J=q>>>13,X=0|a[4],$=8191&X,ee=X>>>13,te=0|a[5],ne=8191&te,ie=te>>>13,oe=0|a[6],re=8191&oe,se=oe>>>13,ae=0|a[7],ue=8191&ae,le=ae>>>13,ce=0|a[8],he=8191&ce,de=ce>>>13,fe=0|a[9],pe=8191&fe,ge=fe>>>13;n.negative=e.negative^t.negative,n.length=19;var me=(l+(i=Math.imul(h,B))|0)+((8191&(o=(o=Math.imul(h,H))+Math.imul(d,B)|0))<<13)|0;l=((r=Math.imul(d,H))+(o>>>13)|0)+(me>>>26)|0,me&=67108863,i=Math.imul(p,B),o=(o=Math.imul(p,H))+Math.imul(g,B)|0,r=Math.imul(g,H);var ve=(l+(i=i+Math.imul(h,U)|0)|0)+((8191&(o=(o=o+Math.imul(h,Y)|0)+Math.imul(d,U)|0))<<13)|0;l=((r=r+Math.imul(d,Y)|0)+(o>>>13)|0)+(ve>>>26)|0,ve&=67108863,i=Math.imul(v,B),o=(o=Math.imul(v,H))+Math.imul(y,B)|0,r=Math.imul(y,H),i=i+Math.imul(p,U)|0,o=(o=o+Math.imul(p,Y)|0)+Math.imul(g,U)|0,r=r+Math.imul(g,Y)|0;var ye=(l+(i=i+Math.imul(h,G)|0)|0)+((8191&(o=(o=o+Math.imul(h,Q)|0)+Math.imul(d,G)|0))<<13)|0;l=((r=r+Math.imul(d,Q)|0)+(o>>>13)|0)+(ye>>>26)|0,ye&=67108863,i=Math.imul(_,B),o=(o=Math.imul(_,H))+Math.imul(w,B)|0,r=Math.imul(w,H),i=i+Math.imul(v,U)|0,o=(o=o+Math.imul(v,Y)|0)+Math.imul(y,U)|0,r=r+Math.imul(y,Y)|0,i=i+Math.imul(p,G)|0,o=(o=o+Math.imul(p,Q)|0)+Math.imul(g,G)|0,r=r+Math.imul(g,Q)|0;var be=(l+(i=i+Math.imul(h,K)|0)|0)+((8191&(o=(o=o+Math.imul(h,J)|0)+Math.imul(d,K)|0))<<13)|0;l=((r=r+Math.imul(d,J)|0)+(o>>>13)|0)+(be>>>26)|0,be&=67108863,i=Math.imul(C,B),o=(o=Math.imul(C,H))+Math.imul(S,B)|0,r=Math.imul(S,H),i=i+Math.imul(_,U)|0,o=(o=o+Math.imul(_,Y)|0)+Math.imul(w,U)|0,r=r+Math.imul(w,Y)|0,i=i+Math.imul(v,G)|0,o=(o=o+Math.imul(v,Q)|0)+Math.imul(y,G)|0,r=r+Math.imul(y,Q)|0,i=i+Math.imul(p,K)|0,o=(o=o+Math.imul(p,J)|0)+Math.imul(g,K)|0,r=r+Math.imul(g,J)|0;var _e=(l+(i=i+Math.imul(h,$)|0)|0)+((8191&(o=(o=o+Math.imul(h,ee)|0)+Math.imul(d,$)|0))<<13)|0;l=((r=r+Math.imul(d,ee)|0)+(o>>>13)|0)+(_e>>>26)|0,_e&=67108863,i=Math.imul(I,B),o=(o=Math.imul(I,H))+Math.imul(N,B)|0,r=Math.imul(N,H),i=i+Math.imul(C,U)|0,o=(o=o+Math.imul(C,Y)|0)+Math.imul(S,U)|0,r=r+Math.imul(S,Y)|0,i=i+Math.imul(_,G)|0,o=(o=o+Math.imul(_,Q)|0)+Math.imul(w,G)|0,r=r+Math.imul(w,Q)|0,i=i+Math.imul(v,K)|0,o=(o=o+Math.imul(v,J)|0)+Math.imul(y,K)|0,r=r+Math.imul(y,J)|0,i=i+Math.imul(p,$)|0,o=(o=o+Math.imul(p,ee)|0)+Math.imul(g,$)|0,r=r+Math.imul(g,ee)|0;var we=(l+(i=i+Math.imul(h,ne)|0)|0)+((8191&(o=(o=o+Math.imul(h,ie)|0)+Math.imul(d,ne)|0))<<13)|0;l=((r=r+Math.imul(d,ie)|0)+(o>>>13)|0)+(we>>>26)|0,we&=67108863,i=Math.imul(D,B),o=(o=Math.imul(D,H))+Math.imul(k,B)|0,r=Math.imul(k,H),i=i+Math.imul(I,U)|0,o=(o=o+Math.imul(I,Y)|0)+Math.imul(N,U)|0,r=r+Math.imul(N,Y)|0,i=i+Math.imul(C,G)|0,o=(o=o+Math.imul(C,Q)|0)+Math.imul(S,G)|0,r=r+Math.imul(S,Q)|0,i=i+Math.imul(_,K)|0,o=(o=o+Math.imul(_,J)|0)+Math.imul(w,K)|0,r=r+Math.imul(w,J)|0,i=i+Math.imul(v,$)|0,o=(o=o+Math.imul(v,ee)|0)+Math.imul(y,$)|0,r=r+Math.imul(y,ee)|0,i=i+Math.imul(p,ne)|0,o=(o=o+Math.imul(p,ie)|0)+Math.imul(g,ne)|0,r=r+Math.imul(g,ie)|0;var Me=(l+(i=i+Math.imul(h,re)|0)|0)+((8191&(o=(o=o+Math.imul(h,se)|0)+Math.imul(d,re)|0))<<13)|0;l=((r=r+Math.imul(d,se)|0)+(o>>>13)|0)+(Me>>>26)|0,Me&=67108863,i=Math.imul(E,B),o=(o=Math.imul(E,H))+Math.imul(A,B)|0,r=Math.imul(A,H),i=i+Math.imul(D,U)|0,o=(o=o+Math.imul(D,Y)|0)+Math.imul(k,U)|0,r=r+Math.imul(k,Y)|0,i=i+Math.imul(I,G)|0,o=(o=o+Math.imul(I,Q)|0)+Math.imul(N,G)|0,r=r+Math.imul(N,Q)|0,i=i+Math.imul(C,K)|0,o=(o=o+Math.imul(C,J)|0)+Math.imul(S,K)|0,r=r+Math.imul(S,J)|0,i=i+Math.imul(_,$)|0,o=(o=o+Math.imul(_,ee)|0)+Math.imul(w,$)|0,r=r+Math.imul(w,ee)|0,i=i+Math.imul(v,ne)|0,o=(o=o+Math.imul(v,ie)|0)+Math.imul(y,ne)|0,r=r+Math.imul(y,ie)|0,i=i+Math.imul(p,re)|0,o=(o=o+Math.imul(p,se)|0)+Math.imul(g,re)|0,r=r+Math.imul(g,se)|0;var Ce=(l+(i=i+Math.imul(h,ue)|0)|0)+((8191&(o=(o=o+Math.imul(h,le)|0)+Math.imul(d,ue)|0))<<13)|0;l=((r=r+Math.imul(d,le)|0)+(o>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,i=Math.imul(O,B),o=(o=Math.imul(O,H))+Math.imul(R,B)|0,r=Math.imul(R,H),i=i+Math.imul(E,U)|0,o=(o=o+Math.imul(E,Y)|0)+Math.imul(A,U)|0,r=r+Math.imul(A,Y)|0,i=i+Math.imul(D,G)|0,o=(o=o+Math.imul(D,Q)|0)+Math.imul(k,G)|0,r=r+Math.imul(k,Q)|0,i=i+Math.imul(I,K)|0,o=(o=o+Math.imul(I,J)|0)+Math.imul(N,K)|0,r=r+Math.imul(N,J)|0,i=i+Math.imul(C,$)|0,o=(o=o+Math.imul(C,ee)|0)+Math.imul(S,$)|0,r=r+Math.imul(S,ee)|0,i=i+Math.imul(_,ne)|0,o=(o=o+Math.imul(_,ie)|0)+Math.imul(w,ne)|0,r=r+Math.imul(w,ie)|0,i=i+Math.imul(v,re)|0,o=(o=o+Math.imul(v,se)|0)+Math.imul(y,re)|0,r=r+Math.imul(y,se)|0,i=i+Math.imul(p,ue)|0,o=(o=o+Math.imul(p,le)|0)+Math.imul(g,ue)|0,r=r+Math.imul(g,le)|0;var Se=(l+(i=i+Math.imul(h,he)|0)|0)+((8191&(o=(o=o+Math.imul(h,de)|0)+Math.imul(d,he)|0))<<13)|0;l=((r=r+Math.imul(d,de)|0)+(o>>>13)|0)+(Se>>>26)|0,Se&=67108863,i=Math.imul(z,B),o=(o=Math.imul(z,H))+Math.imul(W,B)|0,r=Math.imul(W,H),i=i+Math.imul(O,U)|0,o=(o=o+Math.imul(O,Y)|0)+Math.imul(R,U)|0,r=r+Math.imul(R,Y)|0,i=i+Math.imul(E,G)|0,o=(o=o+Math.imul(E,Q)|0)+Math.imul(A,G)|0,r=r+Math.imul(A,Q)|0,i=i+Math.imul(D,K)|0,o=(o=o+Math.imul(D,J)|0)+Math.imul(k,K)|0,r=r+Math.imul(k,J)|0,i=i+Math.imul(I,$)|0,o=(o=o+Math.imul(I,ee)|0)+Math.imul(N,$)|0,r=r+Math.imul(N,ee)|0,i=i+Math.imul(C,ne)|0,o=(o=o+Math.imul(C,ie)|0)+Math.imul(S,ne)|0,r=r+Math.imul(S,ie)|0,i=i+Math.imul(_,re)|0,o=(o=o+Math.imul(_,se)|0)+Math.imul(w,re)|0,r=r+Math.imul(w,se)|0,i=i+Math.imul(v,ue)|0,o=(o=o+Math.imul(v,le)|0)+Math.imul(y,ue)|0,r=r+Math.imul(y,le)|0,i=i+Math.imul(p,he)|0,o=(o=o+Math.imul(p,de)|0)+Math.imul(g,he)|0,r=r+Math.imul(g,de)|0;var Le=(l+(i=i+Math.imul(h,pe)|0)|0)+((8191&(o=(o=o+Math.imul(h,ge)|0)+Math.imul(d,pe)|0))<<13)|0;l=((r=r+Math.imul(d,ge)|0)+(o>>>13)|0)+(Le>>>26)|0,Le&=67108863,i=Math.imul(z,U),o=(o=Math.imul(z,Y))+Math.imul(W,U)|0,r=Math.imul(W,Y),i=i+Math.imul(O,G)|0,o=(o=o+Math.imul(O,Q)|0)+Math.imul(R,G)|0,r=r+Math.imul(R,Q)|0,i=i+Math.imul(E,K)|0,o=(o=o+Math.imul(E,J)|0)+Math.imul(A,K)|0,r=r+Math.imul(A,J)|0,i=i+Math.imul(D,$)|0,o=(o=o+Math.imul(D,ee)|0)+Math.imul(k,$)|0,r=r+Math.imul(k,ee)|0,i=i+Math.imul(I,ne)|0,o=(o=o+Math.imul(I,ie)|0)+Math.imul(N,ne)|0,r=r+Math.imul(N,ie)|0,i=i+Math.imul(C,re)|0,o=(o=o+Math.imul(C,se)|0)+Math.imul(S,re)|0,r=r+Math.imul(S,se)|0,i=i+Math.imul(_,ue)|0,o=(o=o+Math.imul(_,le)|0)+Math.imul(w,ue)|0,r=r+Math.imul(w,le)|0,i=i+Math.imul(v,he)|0,o=(o=o+Math.imul(v,de)|0)+Math.imul(y,he)|0,r=r+Math.imul(y,de)|0;var Ie=(l+(i=i+Math.imul(p,pe)|0)|0)+((8191&(o=(o=o+Math.imul(p,ge)|0)+Math.imul(g,pe)|0))<<13)|0;l=((r=r+Math.imul(g,ge)|0)+(o>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,i=Math.imul(z,G),o=(o=Math.imul(z,Q))+Math.imul(W,G)|0,r=Math.imul(W,Q),i=i+Math.imul(O,K)|0,o=(o=o+Math.imul(O,J)|0)+Math.imul(R,K)|0,r=r+Math.imul(R,J)|0,i=i+Math.imul(E,$)|0,o=(o=o+Math.imul(E,ee)|0)+Math.imul(A,$)|0,r=r+Math.imul(A,ee)|0,i=i+Math.imul(D,ne)|0,o=(o=o+Math.imul(D,ie)|0)+Math.imul(k,ne)|0,r=r+Math.imul(k,ie)|0,i=i+Math.imul(I,re)|0,o=(o=o+Math.imul(I,se)|0)+Math.imul(N,re)|0,r=r+Math.imul(N,se)|0,i=i+Math.imul(C,ue)|0,o=(o=o+Math.imul(C,le)|0)+Math.imul(S,ue)|0,r=r+Math.imul(S,le)|0,i=i+Math.imul(_,he)|0,o=(o=o+Math.imul(_,de)|0)+Math.imul(w,he)|0,r=r+Math.imul(w,de)|0;var Ne=(l+(i=i+Math.imul(v,pe)|0)|0)+((8191&(o=(o=o+Math.imul(v,ge)|0)+Math.imul(y,pe)|0))<<13)|0;l=((r=r+Math.imul(y,ge)|0)+(o>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,i=Math.imul(z,K),o=(o=Math.imul(z,J))+Math.imul(W,K)|0,r=Math.imul(W,J),i=i+Math.imul(O,$)|0,o=(o=o+Math.imul(O,ee)|0)+Math.imul(R,$)|0,r=r+Math.imul(R,ee)|0,i=i+Math.imul(E,ne)|0,o=(o=o+Math.imul(E,ie)|0)+Math.imul(A,ne)|0,r=r+Math.imul(A,ie)|0,i=i+Math.imul(D,re)|0,o=(o=o+Math.imul(D,se)|0)+Math.imul(k,re)|0,r=r+Math.imul(k,se)|0,i=i+Math.imul(I,ue)|0,o=(o=o+Math.imul(I,le)|0)+Math.imul(N,ue)|0,r=r+Math.imul(N,le)|0,i=i+Math.imul(C,he)|0,o=(o=o+Math.imul(C,de)|0)+Math.imul(S,he)|0,r=r+Math.imul(S,de)|0;var xe=(l+(i=i+Math.imul(_,pe)|0)|0)+((8191&(o=(o=o+Math.imul(_,ge)|0)+Math.imul(w,pe)|0))<<13)|0;l=((r=r+Math.imul(w,ge)|0)+(o>>>13)|0)+(xe>>>26)|0,xe&=67108863,i=Math.imul(z,$),o=(o=Math.imul(z,ee))+Math.imul(W,$)|0,r=Math.imul(W,ee),i=i+Math.imul(O,ne)|0,o=(o=o+Math.imul(O,ie)|0)+Math.imul(R,ne)|0,r=r+Math.imul(R,ie)|0,i=i+Math.imul(E,re)|0,o=(o=o+Math.imul(E,se)|0)+Math.imul(A,re)|0,r=r+Math.imul(A,se)|0,i=i+Math.imul(D,ue)|0,o=(o=o+Math.imul(D,le)|0)+Math.imul(k,ue)|0,r=r+Math.imul(k,le)|0,i=i+Math.imul(I,he)|0,o=(o=o+Math.imul(I,de)|0)+Math.imul(N,he)|0,r=r+Math.imul(N,de)|0;var De=(l+(i=i+Math.imul(C,pe)|0)|0)+((8191&(o=(o=o+Math.imul(C,ge)|0)+Math.imul(S,pe)|0))<<13)|0;l=((r=r+Math.imul(S,ge)|0)+(o>>>13)|0)+(De>>>26)|0,De&=67108863,i=Math.imul(z,ne),o=(o=Math.imul(z,ie))+Math.imul(W,ne)|0,r=Math.imul(W,ie),i=i+Math.imul(O,re)|0,o=(o=o+Math.imul(O,se)|0)+Math.imul(R,re)|0,r=r+Math.imul(R,se)|0,i=i+Math.imul(E,ue)|0,o=(o=o+Math.imul(E,le)|0)+Math.imul(A,ue)|0,r=r+Math.imul(A,le)|0,i=i+Math.imul(D,he)|0,o=(o=o+Math.imul(D,de)|0)+Math.imul(k,he)|0,r=r+Math.imul(k,de)|0;var ke=(l+(i=i+Math.imul(I,pe)|0)|0)+((8191&(o=(o=o+Math.imul(I,ge)|0)+Math.imul(N,pe)|0))<<13)|0;l=((r=r+Math.imul(N,ge)|0)+(o>>>13)|0)+(ke>>>26)|0,ke&=67108863,i=Math.imul(z,re),o=(o=Math.imul(z,se))+Math.imul(W,re)|0,r=Math.imul(W,se),i=i+Math.imul(O,ue)|0,o=(o=o+Math.imul(O,le)|0)+Math.imul(R,ue)|0,r=r+Math.imul(R,le)|0,i=i+Math.imul(E,he)|0,o=(o=o+Math.imul(E,de)|0)+Math.imul(A,he)|0,r=r+Math.imul(A,de)|0;var Te=(l+(i=i+Math.imul(D,pe)|0)|0)+((8191&(o=(o=o+Math.imul(D,ge)|0)+Math.imul(k,pe)|0))<<13)|0;l=((r=r+Math.imul(k,ge)|0)+(o>>>13)|0)+(Te>>>26)|0,Te&=67108863,i=Math.imul(z,ue),o=(o=Math.imul(z,le))+Math.imul(W,ue)|0,r=Math.imul(W,le),i=i+Math.imul(O,he)|0,o=(o=o+Math.imul(O,de)|0)+Math.imul(R,he)|0,r=r+Math.imul(R,de)|0;var Ee=(l+(i=i+Math.imul(E,pe)|0)|0)+((8191&(o=(o=o+Math.imul(E,ge)|0)+Math.imul(A,pe)|0))<<13)|0;l=((r=r+Math.imul(A,ge)|0)+(o>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,i=Math.imul(z,he),o=(o=Math.imul(z,de))+Math.imul(W,he)|0,r=Math.imul(W,de);var Ae=(l+(i=i+Math.imul(O,pe)|0)|0)+((8191&(o=(o=o+Math.imul(O,ge)|0)+Math.imul(R,pe)|0))<<13)|0;l=((r=r+Math.imul(R,ge)|0)+(o>>>13)|0)+(Ae>>>26)|0,Ae&=67108863;var je=(l+(i=Math.imul(z,pe))|0)+((8191&(o=(o=Math.imul(z,ge))+Math.imul(W,pe)|0))<<13)|0;return l=((r=Math.imul(W,ge))+(o>>>13)|0)+(je>>>26)|0,je&=67108863,u[0]=me,u[1]=ve,u[2]=ye,u[3]=be,u[4]=_e,u[5]=we,u[6]=Me,u[7]=Ce,u[8]=Se,u[9]=Le,u[10]=Ie,u[11]=Ne,u[12]=xe,u[13]=De,u[14]=ke,u[15]=Te,u[16]=Ee,u[17]=Ae,u[18]=je,0!==l&&(u[19]=l,n.length++),n};function g(e,t,n){return(new m).mulp(e,t,n)}function m(e,t){this.x=e,this.y=t}Math.imul||(p=f),r.prototype.mulTo=function(e,t){var n,i=this.length+e.length;return n=10===this.length&&10===e.length?p(this,e,t):i<63?f(this,e,t):i<1024?function(e,t,n){n.negative=t.negative^e.negative,n.length=e.length+t.length;for(var i=0,o=0,r=0;r>>26)|0)>>>26,s&=67108863}n.words[r]=a,i=s,s=o}return 0!==i?n.words[r]=i:n.length--,n.strip()}(this,e,t):g(this,e,t),n},m.prototype.makeRBT=function(e){for(var t=new Array(e),n=r.prototype._countBits(e)-1,i=0;i>=1;return i},m.prototype.permute=function(e,t,n,i,o,r){for(var s=0;s>>=1)o++;return 1<>>=13,n[2*s+1]=8191&r,r>>>=13;for(s=2*t;s>=26,t+=o/67108864|0,t+=r>>>26,this.words[n]=67108863&r}return 0!==t&&(this.words[n]=t,this.length++),this},r.prototype.muln=function(e){return this.clone().imuln(e)},r.prototype.sqr=function(){return this.mul(this)},r.prototype.isqr=function(){return this.imul(this.clone())},r.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),n=0;n>>o}return t}(e);if(0===t.length)return new r(1);for(var n=this,i=0;i=0);var t,n=e%26,o=(e-n)/26,r=67108863>>>26-n<<26-n;if(0!==n){var s=0;for(t=0;t>>26-n}s&&(this.words[t]=s,this.length++)}if(0!==o){for(t=this.length-1;t>=0;t--)this.words[t+o]=this.words[t];for(t=0;t=0),o=t?(t-t%26)/26:0;var r=e%26,s=Math.min((e-r)/26,this.length),a=67108863^67108863>>>r<s)for(this.length-=s,l=0;l=0&&(0!==c||l>=o);l--){var h=0|this.words[l];this.words[l]=c<<26-r|h>>>r,c=h&a}return u&&0!==c&&(u.words[u.length++]=c),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},r.prototype.ishrn=function(e,t,n){return i(0===this.negative),this.iushrn(e,t,n)},r.prototype.shln=function(e){return this.clone().ishln(e)},r.prototype.ushln=function(e){return this.clone().iushln(e)},r.prototype.shrn=function(e){return this.clone().ishrn(e)},r.prototype.ushrn=function(e){return this.clone().iushrn(e)},r.prototype.testn=function(e){i("number"==typeof e&&e>=0);var t=e%26,n=(e-t)/26,o=1<=0);var t=e%26,n=(e-t)/26;if(i(0===this.negative,"imaskn works only with positive numbers"),this.length<=n)return this;if(0!==t&&n++,this.length=Math.min(n,this.length),0!==t){var o=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},r.prototype.isubn=function(e){if(i("number"==typeof e),i(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(u/67108864|0),this.words[o+n]=67108863&r}for(;o>26,this.words[o+n]=67108863&r;if(0===a)return this.strip();for(i(-1===a),a=0,o=0;o>26,this.words[o]=67108863&r;return this.negative=1,this.strip()},r.prototype._wordDiv=function(e,t){var n=(this.length,e.length),i=this.clone(),o=e,s=0|o.words[o.length-1];0!=(n=26-this._countBits(s))&&(o=o.ushln(n),i.iushln(n),s=0|o.words[o.length-1]);var a,u=i.length-o.length;if("mod"!==t){(a=new r(null)).length=u+1,a.words=new Array(a.length);for(var l=0;l=0;h--){var d=67108864*(0|i.words[o.length+h])+(0|i.words[o.length+h-1]);for(d=Math.min(d/s|0,67108863),i._ishlnsubmul(o,d,h);0!==i.negative;)d--,i.negative=0,i._ishlnsubmul(o,1,h),i.isZero()||(i.negative^=1);a&&(a.words[h]=d)}return a&&a.strip(),i.strip(),"div"!==t&&0!==n&&i.iushrn(n),{div:a||null,mod:i}},r.prototype.divmod=function(e,t,n){return i(!e.isZero()),this.isZero()?{div:new r(0),mod:new r(0)}:0!==this.negative&&0===e.negative?(a=this.neg().divmod(e,t),"mod"!==t&&(o=a.div.neg()),"div"!==t&&(s=a.mod.neg(),n&&0!==s.negative&&s.iadd(e)),{div:o,mod:s}):0===this.negative&&0!==e.negative?(a=this.divmod(e.neg(),t),"mod"!==t&&(o=a.div.neg()),{div:o,mod:a.mod}):this.negative&e.negative?(a=this.neg().divmod(e.neg(),t),"div"!==t&&(s=a.mod.neg(),n&&0!==s.negative&&s.isub(e)),{div:a.div,mod:s}):e.length>this.length||this.cmp(e)<0?{div:new r(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new r(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new r(this.modn(e.words[0]))}:this._wordDiv(e,t);var o,s,a},r.prototype.div=function(e){return this.divmod(e,"div",!1).div},r.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},r.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},r.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var n=0!==t.div.negative?t.mod.isub(e):t.mod,i=e.ushrn(1),o=e.andln(1),r=n.cmp(i);return r<0||1===o&&0===r?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},r.prototype.modn=function(e){i(e<=67108863);for(var t=(1<<26)%e,n=0,o=this.length-1;o>=0;o--)n=(t*n+(0|this.words[o]))%e;return n},r.prototype.idivn=function(e){i(e<=67108863);for(var t=0,n=this.length-1;n>=0;n--){var o=(0|this.words[n])+67108864*t;this.words[n]=o/e|0,t=o%e}return this.strip()},r.prototype.divn=function(e){return this.clone().idivn(e)},r.prototype.egcd=function(e){i(0===e.negative),i(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var o=new r(1),s=new r(0),a=new r(0),u=new r(1),l=0;t.isEven()&&n.isEven();)t.iushrn(1),n.iushrn(1),++l;for(var c=n.clone(),h=t.clone();!t.isZero();){for(var d=0,f=1;!(t.words[0]&f)&&d<26;++d,f<<=1);if(d>0)for(t.iushrn(d);d-- >0;)(o.isOdd()||s.isOdd())&&(o.iadd(c),s.isub(h)),o.iushrn(1),s.iushrn(1);for(var p=0,g=1;!(n.words[0]&g)&&p<26;++p,g<<=1);if(p>0)for(n.iushrn(p);p-- >0;)(a.isOdd()||u.isOdd())&&(a.iadd(c),u.isub(h)),a.iushrn(1),u.iushrn(1);t.cmp(n)>=0?(t.isub(n),o.isub(a),s.isub(u)):(n.isub(t),a.isub(o),u.isub(s))}return{a,b:u,gcd:n.iushln(l)}},r.prototype._invmp=function(e){i(0===e.negative),i(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var o,s=new r(1),a=new r(0),u=n.clone();t.cmpn(1)>0&&n.cmpn(1)>0;){for(var l=0,c=1;!(t.words[0]&c)&&l<26;++l,c<<=1);if(l>0)for(t.iushrn(l);l-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);for(var h=0,d=1;!(n.words[0]&d)&&h<26;++h,d<<=1);if(h>0)for(n.iushrn(h);h-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);t.cmp(n)>=0?(t.isub(n),s.isub(a)):(n.isub(t),a.isub(s))}return(o=0===t.cmpn(1)?s:a).cmpn(0)<0&&o.iadd(e),o},r.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),n=e.clone();t.negative=0,n.negative=0;for(var i=0;t.isEven()&&n.isEven();i++)t.iushrn(1),n.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;n.isEven();)n.iushrn(1);var o=t.cmp(n);if(o<0){var r=t;t=n,n=r}else if(0===o||0===n.cmpn(1))break;t.isub(n)}return n.iushln(i)},r.prototype.invm=function(e){return this.egcd(e).a.umod(e)},r.prototype.isEven=function(){return!(1&this.words[0])},r.prototype.isOdd=function(){return!(1&~this.words[0])},r.prototype.andln=function(e){return this.words[0]&e},r.prototype.bincn=function(e){i("number"==typeof e);var t=e%26,n=(e-t)/26,o=1<>>26,a&=67108863,this.words[s]=a}return 0!==r&&(this.words[s]=r,this.length++),this},r.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},r.prototype.cmpn=function(e){var t,n=e<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this.strip(),this.length>1)t=1;else{n&&(e=-e),i(e<=67108863,"Number is too big");var o=0|this.words[0];t=o===e?0:oe.length)return 1;if(this.length=0;n--){var i=0|this.words[n],o=0|e.words[n];if(i!==o){io&&(t=1);break}}return t},r.prototype.gtn=function(e){return 1===this.cmpn(e)},r.prototype.gt=function(e){return 1===this.cmp(e)},r.prototype.gten=function(e){return this.cmpn(e)>=0},r.prototype.gte=function(e){return this.cmp(e)>=0},r.prototype.ltn=function(e){return-1===this.cmpn(e)},r.prototype.lt=function(e){return-1===this.cmp(e)},r.prototype.lten=function(e){return this.cmpn(e)<=0},r.prototype.lte=function(e){return this.cmp(e)<=0},r.prototype.eqn=function(e){return 0===this.cmpn(e)},r.prototype.eq=function(e){return 0===this.cmp(e)},r.red=function(e){return new C(e)},r.prototype.toRed=function(e){return i(!this.red,"Already a number in reduction context"),i(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},r.prototype.fromRed=function(){return i(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},r.prototype._forceRed=function(e){return this.red=e,this},r.prototype.forceRed=function(e){return i(!this.red,"Already a number in reduction context"),this._forceRed(e)},r.prototype.redAdd=function(e){return i(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},r.prototype.redIAdd=function(e){return i(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},r.prototype.redSub=function(e){return i(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},r.prototype.redISub=function(e){return i(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},r.prototype.redShl=function(e){return i(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},r.prototype.redMul=function(e){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},r.prototype.redIMul=function(e){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},r.prototype.redSqr=function(){return i(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},r.prototype.redISqr=function(){return i(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},r.prototype.redSqrt=function(){return i(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},r.prototype.redInvm=function(){return i(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},r.prototype.redNeg=function(){return i(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},r.prototype.redPow=function(e){return i(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var v={k256:null,p224:null,p192:null,p25519:null};function y(e,t){this.name=e,this.p=new r(t,16),this.n=this.p.bitLength(),this.k=new r(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function b(){y.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function _(){y.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){y.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function M(){y.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function C(e){if("string"==typeof e){var t=r._prime(e);this.m=t.p,this.prime=t}else i(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function S(e){C.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new r(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}y.prototype._tmp=function(){var e=new r(null);return e.words=new Array(Math.ceil(this.n/13)),e},y.prototype.ireduce=function(e){var t,n=e;do{this.split(n,this.tmp),t=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(t>this.n);var i=t0?n.isub(this.p):void 0!==n.strip?n.strip():n._strip(),n},y.prototype.split=function(e,t){e.iushrn(this.n,0,t)},y.prototype.imulK=function(e){return e.imul(this.k)},o(b,y),b.prototype.split=function(e,t){for(var n=4194303,i=Math.min(e.length,9),o=0;o>>22,r=s}r>>>=22,e.words[o-10]=r,0===r&&e.length>10?e.length-=10:e.length-=9},b.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,n=0;n>>=26,e.words[n]=o,t=i}return 0!==t&&(e.words[e.length++]=t),e},r._prime=function(e){if(v[e])return v[e];var t;if("k256"===e)t=new b;else if("p224"===e)t=new _;else if("p192"===e)t=new w;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new M}return v[e]=t,t},C.prototype._verify1=function(e){i(0===e.negative,"red works only with positives"),i(e.red,"red works only with red numbers")},C.prototype._verify2=function(e,t){i(!(e.negative|t.negative),"red works only with positives"),i(e.red&&e.red===t.red,"red works only with red numbers")},C.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},C.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},C.prototype.add=function(e,t){this._verify2(e,t);var n=e.add(t);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},C.prototype.iadd=function(e,t){this._verify2(e,t);var n=e.iadd(t);return n.cmp(this.m)>=0&&n.isub(this.m),n},C.prototype.sub=function(e,t){this._verify2(e,t);var n=e.sub(t);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},C.prototype.isub=function(e,t){this._verify2(e,t);var n=e.isub(t);return n.cmpn(0)<0&&n.iadd(this.m),n},C.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},C.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},C.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},C.prototype.isqr=function(e){return this.imul(e,e.clone())},C.prototype.sqr=function(e){return this.mul(e,e)},C.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(i(t%2==1),3===t){var n=this.m.add(new r(1)).iushrn(2);return this.pow(e,n)}for(var o=this.m.subn(1),s=0;!o.isZero()&&0===o.andln(1);)s++,o.iushrn(1);i(!o.isZero());var a=new r(1).toRed(this),u=a.redNeg(),l=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new r(2*c*c).toRed(this);0!==this.pow(c,l).cmp(u);)c.redIAdd(u);for(var h=this.pow(c,o),d=this.pow(e,o.addn(1).iushrn(1)),f=this.pow(e,o),p=s;0!==f.cmp(a);){for(var g=f,m=0;0!==g.cmp(a);m++)g=g.redSqr();i(m=0;i--){for(var l=t.words[i],c=u-1;c>=0;c--){var h=l>>c&1;o!==n[0]&&(o=this.sqr(o)),0!==h||0!==s?(s<<=1,s|=h,(4==++a||0===i&&0===c)&&(o=this.mul(o,n[s]),a=0,s=0)):a=0}u=26}return o},C.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},C.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},r.mont=function(e){return new S(e)},o(S,C),S.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},S.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},S.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var n=e.imul(t),i=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=n.isub(i).iushrn(this.shift),r=o;return o.cmp(this.m)>=0?r=o.isub(this.m):o.cmpn(0)<0&&(r=o.iadd(this.m)),r._forceRed(this)},S.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new r(0)._forceRed(this);var n=e.mul(t),i=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=n.isub(i).iushrn(this.shift),s=o;return o.cmp(this.m)>=0?s=o.isub(this.m):o.cmpn(0)<0&&(s=o.iadd(this.m)),s._forceRed(this)},S.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=n.nmd(e),this)},9478:(e,t,n)=>{"use strict";var i=t;i.version=n(1636).rE,i.utils=n(4528),i.rand=n(4366),i.curve=n(1766),i.curves=n(1353),i.ec=n(674),i.eddsa=n(6197)},700:(e,t,n)=>{"use strict";var i=n(8499),o=n(4528),r=o.getNAF,s=o.getJSF,a=o.assert;function u(e,t){this.type=e,this.p=new i(t.p,16),this.red=t.prime?i.red(t.prime):i.mont(this.p),this.zero=new i(0).toRed(this.red),this.one=new i(1).toRed(this.red),this.two=new i(2).toRed(this.red),this.n=t.n&&new i(t.n,16),this.g=t.g&&this.pointFromJSON(t.g,t.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var n=this.n&&this.p.div(this.n);!n||n.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function l(e,t){this.curve=e,this.type=t,this.precomputed=null}e.exports=u,u.prototype.point=function(){throw new Error("Not implemented")},u.prototype.validate=function(){throw new Error("Not implemented")},u.prototype._fixedNafMul=function(e,t){a(e.precomputed);var n=e._getDoubles(),i=r(t,1,this._bitLength),o=(1<=s;c--)u=(u<<1)+i[c];l.push(u)}for(var h=this.jpoint(null,null,null),d=this.jpoint(null,null,null),f=o;f>0;f--){for(s=0;s=0;l--){for(var c=0;l>=0&&0===s[l];l--)c++;if(l>=0&&c++,u=u.dblp(c),l<0)break;var h=s[l];a(0!==h),u="affine"===e.type?h>0?u.mixedAdd(o[h-1>>1]):u.mixedAdd(o[-h-1>>1].neg()):h>0?u.add(o[h-1>>1]):u.add(o[-h-1>>1].neg())}return"affine"===e.type?u.toP():u},u.prototype._wnafMulAdd=function(e,t,n,i,o){var a,u,l,c=this._wnafT1,h=this._wnafT2,d=this._wnafT3,f=0;for(a=0;a=1;a-=2){var g=a-1,m=a;if(1===c[g]&&1===c[m]){var v=[t[g],null,null,t[m]];0===t[g].y.cmp(t[m].y)?(v[1]=t[g].add(t[m]),v[2]=t[g].toJ().mixedAdd(t[m].neg())):0===t[g].y.cmp(t[m].y.redNeg())?(v[1]=t[g].toJ().mixedAdd(t[m]),v[2]=t[g].add(t[m].neg())):(v[1]=t[g].toJ().mixedAdd(t[m]),v[2]=t[g].toJ().mixedAdd(t[m].neg()));var y=[-3,-1,-5,-7,0,7,5,1,3],b=s(n[g],n[m]);for(f=Math.max(b[0].length,f),d[g]=new Array(f),d[m]=new Array(f),u=0;u=0;a--){for(var S=0;a>=0;){var L=!0;for(u=0;u=0&&S++,M=M.dblp(S),a<0)break;for(u=0;u0?l=h[u][I-1>>1]:I<0&&(l=h[u][-I-1>>1].neg()),M="affine"===l.type?M.mixedAdd(l):M.add(l))}}for(a=0;a=Math.ceil((e.bitLength()+1)/t.step)},l.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var n=[this],i=this,o=0;o{"use strict";var i=n(4528),o=n(8499),r=n(6987),s=n(700),a=i.assert;function u(e){this.twisted=1!=(0|e.a),this.mOneA=this.twisted&&-1==(0|e.a),this.extended=this.mOneA,s.call(this,"edwards",e),this.a=new o(e.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new o(e.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new o(e.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),a(!this.twisted||0===this.c.fromRed().cmpn(1)),this.oneC=1==(0|e.c)}function l(e,t,n,i,r){s.BasePoint.call(this,e,"projective"),null===t&&null===n&&null===i?(this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0):(this.x=new o(t,16),this.y=new o(n,16),this.z=i?new o(i,16):this.curve.one,this.t=r&&new o(r,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.t&&!this.t.red&&(this.t=this.t.toRed(this.curve.red)),this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t&&(this.t=this.x.redMul(this.y),this.zOne||(this.t=this.t.redMul(this.z.redInvm()))))}r(u,s),e.exports=u,u.prototype._mulA=function(e){return this.mOneA?e.redNeg():this.a.redMul(e)},u.prototype._mulC=function(e){return this.oneC?e:this.c.redMul(e)},u.prototype.jpoint=function(e,t,n,i){return this.point(e,t,n,i)},u.prototype.pointFromX=function(e,t){(e=new o(e,16)).red||(e=e.toRed(this.red));var n=e.redSqr(),i=this.c2.redSub(this.a.redMul(n)),r=this.one.redSub(this.c2.redMul(this.d).redMul(n)),s=i.redMul(r.redInvm()),a=s.redSqrt();if(0!==a.redSqr().redSub(s).cmp(this.zero))throw new Error("invalid point");var u=a.fromRed().isOdd();return(t&&!u||!t&&u)&&(a=a.redNeg()),this.point(e,a)},u.prototype.pointFromY=function(e,t){(e=new o(e,16)).red||(e=e.toRed(this.red));var n=e.redSqr(),i=n.redSub(this.c2),r=n.redMul(this.d).redMul(this.c2).redSub(this.a),s=i.redMul(r.redInvm());if(0===s.cmp(this.zero)){if(t)throw new Error("invalid point");return this.point(this.zero,e)}var a=s.redSqrt();if(0!==a.redSqr().redSub(s).cmp(this.zero))throw new Error("invalid point");return a.fromRed().isOdd()!==t&&(a=a.redNeg()),this.point(a,e)},u.prototype.validate=function(e){if(e.isInfinity())return!0;e.normalize();var t=e.x.redSqr(),n=e.y.redSqr(),i=t.redMul(this.a).redAdd(n),o=this.c2.redMul(this.one.redAdd(this.d.redMul(t).redMul(n)));return 0===i.cmp(o)},r(l,s.BasePoint),u.prototype.pointFromJSON=function(e){return l.fromJSON(this,e)},u.prototype.point=function(e,t,n,i){return new l(this,e,t,n,i)},l.fromJSON=function(e,t){return new l(e,t[0],t[1],t[2])},l.prototype.inspect=function(){return this.isInfinity()?"":""},l.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c))},l.prototype._extDbl=function(){var e=this.x.redSqr(),t=this.y.redSqr(),n=this.z.redSqr();n=n.redIAdd(n);var i=this.curve._mulA(e),o=this.x.redAdd(this.y).redSqr().redISub(e).redISub(t),r=i.redAdd(t),s=r.redSub(n),a=i.redSub(t),u=o.redMul(s),l=r.redMul(a),c=o.redMul(a),h=s.redMul(r);return this.curve.point(u,l,h,c)},l.prototype._projDbl=function(){var e,t,n,i,o,r,s=this.x.redAdd(this.y).redSqr(),a=this.x.redSqr(),u=this.y.redSqr();if(this.curve.twisted){var l=(i=this.curve._mulA(a)).redAdd(u);this.zOne?(e=s.redSub(a).redSub(u).redMul(l.redSub(this.curve.two)),t=l.redMul(i.redSub(u)),n=l.redSqr().redSub(l).redSub(l)):(o=this.z.redSqr(),r=l.redSub(o).redISub(o),e=s.redSub(a).redISub(u).redMul(r),t=l.redMul(i.redSub(u)),n=l.redMul(r))}else i=a.redAdd(u),o=this.curve._mulC(this.z).redSqr(),r=i.redSub(o).redSub(o),e=this.curve._mulC(s.redISub(i)).redMul(r),t=this.curve._mulC(i).redMul(a.redISub(u)),n=i.redMul(r);return this.curve.point(e,t,n)},l.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},l.prototype._extAdd=function(e){var t=this.y.redSub(this.x).redMul(e.y.redSub(e.x)),n=this.y.redAdd(this.x).redMul(e.y.redAdd(e.x)),i=this.t.redMul(this.curve.dd).redMul(e.t),o=this.z.redMul(e.z.redAdd(e.z)),r=n.redSub(t),s=o.redSub(i),a=o.redAdd(i),u=n.redAdd(t),l=r.redMul(s),c=a.redMul(u),h=r.redMul(u),d=s.redMul(a);return this.curve.point(l,c,d,h)},l.prototype._projAdd=function(e){var t,n,i=this.z.redMul(e.z),o=i.redSqr(),r=this.x.redMul(e.x),s=this.y.redMul(e.y),a=this.curve.d.redMul(r).redMul(s),u=o.redSub(a),l=o.redAdd(a),c=this.x.redAdd(this.y).redMul(e.x.redAdd(e.y)).redISub(r).redISub(s),h=i.redMul(u).redMul(c);return this.curve.twisted?(t=i.redMul(l).redMul(s.redSub(this.curve._mulA(r))),n=u.redMul(l)):(t=i.redMul(l).redMul(s.redSub(r)),n=this.curve._mulC(u).redMul(l)),this.curve.point(h,t,n)},l.prototype.add=function(e){return this.isInfinity()?e:e.isInfinity()?this:this.curve.extended?this._extAdd(e):this._projAdd(e)},l.prototype.mul=function(e){return this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve._wnafMul(this,e)},l.prototype.mulAdd=function(e,t,n){return this.curve._wnafMulAdd(1,[this,t],[e,n],2,!1)},l.prototype.jmulAdd=function(e,t,n){return this.curve._wnafMulAdd(1,[this,t],[e,n],2,!0)},l.prototype.normalize=function(){if(this.zOne)return this;var e=this.z.redInvm();return this.x=this.x.redMul(e),this.y=this.y.redMul(e),this.t&&(this.t=this.t.redMul(e)),this.z=this.curve.one,this.zOne=!0,this},l.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},l.prototype.getX=function(){return this.normalize(),this.x.fromRed()},l.prototype.getY=function(){return this.normalize(),this.y.fromRed()},l.prototype.eq=function(e){return this===e||0===this.getX().cmp(e.getX())&&0===this.getY().cmp(e.getY())},l.prototype.eqXToP=function(e){var t=e.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(t))return!0;for(var n=e.clone(),i=this.curve.redN.redMul(this.z);;){if(n.iadd(this.curve.n),n.cmp(this.curve.p)>=0)return!1;if(t.redIAdd(i),0===this.x.cmp(t))return!0}},l.prototype.toP=l.prototype.normalize,l.prototype.mixedAdd=l.prototype.add},1766:(e,t,n)=>{"use strict";var i=t;i.base=n(700),i.short=n(11),i.mont=n(4803),i.edwards=n(3217)},4803:(e,t,n)=>{"use strict";var i=n(8499),o=n(6987),r=n(700),s=n(4528);function a(e){r.call(this,"mont",e),this.a=new i(e.a,16).toRed(this.red),this.b=new i(e.b,16).toRed(this.red),this.i4=new i(4).toRed(this.red).redInvm(),this.two=new i(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function u(e,t,n){r.BasePoint.call(this,e,"projective"),null===t&&null===n?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new i(t,16),this.z=new i(n,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}o(a,r),e.exports=a,a.prototype.validate=function(e){var t=e.normalize().x,n=t.redSqr(),i=n.redMul(t).redAdd(n.redMul(this.a)).redAdd(t);return 0===i.redSqrt().redSqr().cmp(i)},o(u,r.BasePoint),a.prototype.decodePoint=function(e,t){return this.point(s.toArray(e,t),1)},a.prototype.point=function(e,t){return new u(this,e,t)},a.prototype.pointFromJSON=function(e){return u.fromJSON(this,e)},u.prototype.precompute=function(){},u.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},u.fromJSON=function(e,t){return new u(e,t[0],t[1]||e.one)},u.prototype.inspect=function(){return this.isInfinity()?"":""},u.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},u.prototype.dbl=function(){var e=this.x.redAdd(this.z).redSqr(),t=this.x.redSub(this.z).redSqr(),n=e.redSub(t),i=e.redMul(t),o=n.redMul(t.redAdd(this.curve.a24.redMul(n)));return this.curve.point(i,o)},u.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},u.prototype.diffAdd=function(e,t){var n=this.x.redAdd(this.z),i=this.x.redSub(this.z),o=e.x.redAdd(e.z),r=e.x.redSub(e.z).redMul(n),s=o.redMul(i),a=t.z.redMul(r.redAdd(s).redSqr()),u=t.x.redMul(r.redISub(s).redSqr());return this.curve.point(a,u)},u.prototype.mul=function(e){for(var t=e.clone(),n=this,i=this.curve.point(null,null),o=[];0!==t.cmpn(0);t.iushrn(1))o.push(t.andln(1));for(var r=o.length-1;r>=0;r--)0===o[r]?(n=n.diffAdd(i,this),i=i.dbl()):(i=n.diffAdd(i,this),n=n.dbl());return i},u.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},u.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},u.prototype.eq=function(e){return 0===this.getX().cmp(e.getX())},u.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},u.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},11:(e,t,n)=>{"use strict";var i=n(4528),o=n(8499),r=n(6987),s=n(700),a=i.assert;function u(e){s.call(this,"short",e),this.a=new o(e.a,16).toRed(this.red),this.b=new o(e.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=0===this.a.fromRed().cmpn(0),this.threeA=0===this.a.fromRed().sub(this.p).cmpn(-3),this.endo=this._getEndomorphism(e),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}function l(e,t,n,i){s.BasePoint.call(this,e,"affine"),null===t&&null===n?(this.x=null,this.y=null,this.inf=!0):(this.x=new o(t,16),this.y=new o(n,16),i&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function c(e,t,n,i){s.BasePoint.call(this,e,"jacobian"),null===t&&null===n&&null===i?(this.x=this.curve.one,this.y=this.curve.one,this.z=new o(0)):(this.x=new o(t,16),this.y=new o(n,16),this.z=new o(i,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}r(u,s),e.exports=u,u.prototype._getEndomorphism=function(e){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var t,n;if(e.beta)t=new o(e.beta,16).toRed(this.red);else{var i=this._getEndoRoots(this.p);t=(t=i[0].cmp(i[1])<0?i[0]:i[1]).toRed(this.red)}if(e.lambda)n=new o(e.lambda,16);else{var r=this._getEndoRoots(this.n);0===this.g.mul(r[0]).x.cmp(this.g.x.redMul(t))?n=r[0]:(n=r[1],a(0===this.g.mul(n).x.cmp(this.g.x.redMul(t))))}return{beta:t,lambda:n,basis:e.basis?e.basis.map((function(e){return{a:new o(e.a,16),b:new o(e.b,16)}})):this._getEndoBasis(n)}}},u.prototype._getEndoRoots=function(e){var t=e===this.p?this.red:o.mont(e),n=new o(2).toRed(t).redInvm(),i=n.redNeg(),r=new o(3).toRed(t).redNeg().redSqrt().redMul(n);return[i.redAdd(r).fromRed(),i.redSub(r).fromRed()]},u.prototype._getEndoBasis=function(e){for(var t,n,i,r,s,a,u,l,c,h=this.n.ushrn(Math.floor(this.n.bitLength()/2)),d=e,f=this.n.clone(),p=new o(1),g=new o(0),m=new o(0),v=new o(1),y=0;0!==d.cmpn(0);){var b=f.div(d);l=f.sub(b.mul(d)),c=m.sub(b.mul(p));var _=v.sub(b.mul(g));if(!i&&l.cmp(h)<0)t=u.neg(),n=p,i=l.neg(),r=c;else if(i&&2==++y)break;u=l,f=d,d=l,m=p,p=c,v=g,g=_}s=l.neg(),a=c;var w=i.sqr().add(r.sqr());return s.sqr().add(a.sqr()).cmp(w)>=0&&(s=t,a=n),i.negative&&(i=i.neg(),r=r.neg()),s.negative&&(s=s.neg(),a=a.neg()),[{a:i,b:r},{a:s,b:a}]},u.prototype._endoSplit=function(e){var t=this.endo.basis,n=t[0],i=t[1],o=i.b.mul(e).divRound(this.n),r=n.b.neg().mul(e).divRound(this.n),s=o.mul(n.a),a=r.mul(i.a),u=o.mul(n.b),l=r.mul(i.b);return{k1:e.sub(s).sub(a),k2:u.add(l).neg()}},u.prototype.pointFromX=function(e,t){(e=new o(e,16)).red||(e=e.toRed(this.red));var n=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),i=n.redSqrt();if(0!==i.redSqr().redSub(n).cmp(this.zero))throw new Error("invalid point");var r=i.fromRed().isOdd();return(t&&!r||!t&&r)&&(i=i.redNeg()),this.point(e,i)},u.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,n=e.y,i=this.a.redMul(t),o=t.redSqr().redMul(t).redIAdd(i).redIAdd(this.b);return 0===n.redSqr().redISub(o).cmpn(0)},u.prototype._endoWnafMulAdd=function(e,t,n){for(var i=this._endoWnafT1,o=this._endoWnafT2,r=0;r":""},l.prototype.isInfinity=function(){return this.inf},l.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(0===this.x.cmp(e.x))return this.curve.point(null,null);var t=this.y.redSub(e.y);0!==t.cmpn(0)&&(t=t.redMul(this.x.redSub(e.x).redInvm()));var n=t.redSqr().redISub(this.x).redISub(e.x),i=t.redMul(this.x.redSub(n)).redISub(this.y);return this.curve.point(n,i)},l.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(0===e.cmpn(0))return this.curve.point(null,null);var t=this.curve.a,n=this.x.redSqr(),i=e.redInvm(),o=n.redAdd(n).redIAdd(n).redIAdd(t).redMul(i),r=o.redSqr().redISub(this.x.redAdd(this.x)),s=o.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,s)},l.prototype.getX=function(){return this.x.fromRed()},l.prototype.getY=function(){return this.y.fromRed()},l.prototype.mul=function(e){return e=new o(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)},l.prototype.mulAdd=function(e,t,n){var i=[this,t],o=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(i,o):this.curve._wnafMulAdd(1,i,o,2)},l.prototype.jmulAdd=function(e,t,n){var i=[this,t],o=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(i,o,!0):this.curve._wnafMulAdd(1,i,o,2,!0)},l.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||0===this.x.cmp(e.x)&&0===this.y.cmp(e.y))},l.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var n=this.precomputed,i=function(e){return e.neg()};t.precomputed={naf:n.naf&&{wnd:n.naf.wnd,points:n.naf.points.map(i)},doubles:n.doubles&&{step:n.doubles.step,points:n.doubles.points.map(i)}}}return t},l.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},r(c,s.BasePoint),u.prototype.jpoint=function(e,t,n){return new c(this,e,t,n)},c.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),n=this.x.redMul(t),i=this.y.redMul(t).redMul(e);return this.curve.point(n,i)},c.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},c.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),n=this.z.redSqr(),i=this.x.redMul(t),o=e.x.redMul(n),r=this.y.redMul(t.redMul(e.z)),s=e.y.redMul(n.redMul(this.z)),a=i.redSub(o),u=r.redSub(s);if(0===a.cmpn(0))return 0!==u.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var l=a.redSqr(),c=l.redMul(a),h=i.redMul(l),d=u.redSqr().redIAdd(c).redISub(h).redISub(h),f=u.redMul(h.redISub(d)).redISub(r.redMul(c)),p=this.z.redMul(e.z).redMul(a);return this.curve.jpoint(d,f,p)},c.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),n=this.x,i=e.x.redMul(t),o=this.y,r=e.y.redMul(t).redMul(this.z),s=n.redSub(i),a=o.redSub(r);if(0===s.cmpn(0))return 0!==a.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var u=s.redSqr(),l=u.redMul(s),c=n.redMul(u),h=a.redSqr().redIAdd(l).redISub(c).redISub(c),d=a.redMul(c.redISub(h)).redISub(o.redMul(l)),f=this.z.redMul(s);return this.curve.jpoint(h,d,f)},c.prototype.dblp=function(e){if(0===e)return this;if(this.isInfinity())return this;if(!e)return this.dbl();var t;if(this.curve.zeroA||this.curve.threeA){var n=this;for(t=0;t=0)return!1;if(n.redIAdd(o),0===this.x.cmp(n))return!0}},c.prototype.inspect=function(){return this.isInfinity()?"":""},c.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},1353:(e,t,n)=>{"use strict";var i,o=t,r=n(3502),s=n(1766),a=n(4528).assert;function u(e){"short"===e.type?this.curve=new s.short(e):"edwards"===e.type?this.curve=new s.edwards(e):this.curve=new s.mont(e),this.g=this.curve.g,this.n=this.curve.n,this.hash=e.hash,a(this.g.validate(),"Invalid curve"),a(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function l(e,t){Object.defineProperty(o,e,{configurable:!0,enumerable:!0,get:function(){var n=new u(t);return Object.defineProperty(o,e,{configurable:!0,enumerable:!0,value:n}),n}})}o.PresetCurve=u,l("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:r.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),l("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:r.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),l("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:r.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),l("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:r.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),l("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:r.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),l("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:r.sha256,gRed:!1,g:["9"]}),l("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:r.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{i=n(9160)}catch(e){i=void 0}l("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:r.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",i]})},674:(e,t,n)=>{"use strict";var i=n(8499),o=n(4484),r=n(4528),s=n(1353),a=n(4366),u=r.assert,l=n(4765),c=n(4964);function h(e){if(!(this instanceof h))return new h(e);"string"==typeof e&&(u(Object.prototype.hasOwnProperty.call(s,e),"Unknown curve "+e),e=s[e]),e instanceof s.PresetCurve&&(e={curve:e}),this.curve=e.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=e.curve.g,this.g.precompute(e.curve.n.bitLength()+1),this.hash=e.hash||e.curve.hash}e.exports=h,h.prototype.keyPair=function(e){return new l(this,e)},h.prototype.keyFromPrivate=function(e,t){return l.fromPrivate(this,e,t)},h.prototype.keyFromPublic=function(e,t){return l.fromPublic(this,e,t)},h.prototype.genKeyPair=function(e){e||(e={});for(var t=new o({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||a(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),n=this.n.byteLength(),r=this.n.sub(new i(2));;){var s=new i(t.generate(n));if(!(s.cmp(r)>0))return s.iaddn(1),this.keyFromPrivate(s)}},h.prototype._truncateToN=function(e,t){var n=8*e.byteLength()-this.n.bitLength();return n>0&&(e=e.ushrn(n)),!t&&e.cmp(this.n)>=0?e.sub(this.n):e},h.prototype.sign=function(e,t,n,r){"object"==typeof n&&(r=n,n=null),r||(r={}),t=this.keyFromPrivate(t,n),e=this._truncateToN(new i(e,16));for(var s=this.n.byteLength(),a=t.getPrivate().toArray("be",s),u=e.toArray("be",s),l=new o({hash:this.hash,entropy:a,nonce:u,pers:r.pers,persEnc:r.persEnc||"utf8"}),h=this.n.sub(new i(1)),d=0;;d++){var f=r.k?r.k(d):new i(l.generate(this.n.byteLength()));if(!((f=this._truncateToN(f,!0)).cmpn(1)<=0||f.cmp(h)>=0)){var p=this.g.mul(f);if(!p.isInfinity()){var g=p.getX(),m=g.umod(this.n);if(0!==m.cmpn(0)){var v=f.invm(this.n).mul(m.mul(t.getPrivate()).iadd(e));if(0!==(v=v.umod(this.n)).cmpn(0)){var y=(p.getY().isOdd()?1:0)|(0!==g.cmp(m)?2:0);return r.canonical&&v.cmp(this.nh)>0&&(v=this.n.sub(v),y^=1),new c({r:m,s:v,recoveryParam:y})}}}}}},h.prototype.verify=function(e,t,n,o){e=this._truncateToN(new i(e,16)),n=this.keyFromPublic(n,o);var r=(t=new c(t,"hex")).r,s=t.s;if(r.cmpn(1)<0||r.cmp(this.n)>=0)return!1;if(s.cmpn(1)<0||s.cmp(this.n)>=0)return!1;var a,u=s.invm(this.n),l=u.mul(e).umod(this.n),h=u.mul(r).umod(this.n);return this.curve._maxwellTrick?!(a=this.g.jmulAdd(l,n.getPublic(),h)).isInfinity()&&a.eqXToP(r):!(a=this.g.mulAdd(l,n.getPublic(),h)).isInfinity()&&0===a.getX().umod(this.n).cmp(r)},h.prototype.recoverPubKey=function(e,t,n,o){u((3&n)===n,"The recovery param is more than two bits"),t=new c(t,o);var r=this.n,s=new i(e),a=t.r,l=t.s,h=1&n,d=n>>1;if(a.cmp(this.curve.p.umod(this.curve.n))>=0&&d)throw new Error("Unable to find sencond key candinate");a=d?this.curve.pointFromX(a.add(this.curve.n),h):this.curve.pointFromX(a,h);var f=t.r.invm(r),p=r.sub(s).mul(f).umod(r),g=l.mul(f).umod(r);return this.g.mulAdd(p,a,g)},h.prototype.getKeyRecoveryParam=function(e,t,n,i){if(null!==(t=new c(t,i)).recoveryParam)return t.recoveryParam;for(var o=0;o<4;o++){var r;try{r=this.recoverPubKey(e,t,o)}catch(e){continue}if(r.eq(n))return o}throw new Error("Unable to find valid recovery factor")}},4765:(e,t,n)=>{"use strict";var i=n(8499),o=n(4528).assert;function r(e,t){this.ec=e,this.priv=null,this.pub=null,t.priv&&this._importPrivate(t.priv,t.privEnc),t.pub&&this._importPublic(t.pub,t.pubEnc)}e.exports=r,r.fromPublic=function(e,t,n){return t instanceof r?t:new r(e,{pub:t,pubEnc:n})},r.fromPrivate=function(e,t,n){return t instanceof r?t:new r(e,{priv:t,privEnc:n})},r.prototype.validate=function(){var e=this.getPublic();return e.isInfinity()?{result:!1,reason:"Invalid public key"}:e.validate()?e.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},r.prototype.getPublic=function(e,t){return"string"==typeof e&&(t=e,e=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),t?this.pub.encode(t,e):this.pub},r.prototype.getPrivate=function(e){return"hex"===e?this.priv.toString(16,2):this.priv},r.prototype._importPrivate=function(e,t){this.priv=new i(e,t||16),this.priv=this.priv.umod(this.ec.curve.n)},r.prototype._importPublic=function(e,t){if(e.x||e.y)return"mont"===this.ec.curve.type?o(e.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||o(e.x&&e.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(e.x,e.y));this.pub=this.ec.curve.decodePoint(e,t)},r.prototype.derive=function(e){return e.validate()||o(e.validate(),"public point not validated"),e.mul(this.priv).getX()},r.prototype.sign=function(e,t,n){return this.ec.sign(e,this,t,n)},r.prototype.verify=function(e,t){return this.ec.verify(e,t,this)},r.prototype.inspect=function(){return""}},4964:(e,t,n)=>{"use strict";var i=n(8499),o=n(4528),r=o.assert;function s(e,t){if(e instanceof s)return e;this._importDER(e,t)||(r(e.r&&e.s,"Signature without r or s"),this.r=new i(e.r,16),this.s=new i(e.s,16),void 0===e.recoveryParam?this.recoveryParam=null:this.recoveryParam=e.recoveryParam)}function a(){this.place=0}function u(e,t){var n=e[t.place++];if(!(128&n))return n;var i=15&n;if(0===i||i>4)return!1;for(var o=0,r=0,s=t.place;r>>=0;return!(o<=127)&&(t.place=s,o)}function l(e){for(var t=0,n=e.length-1;!e[t]&&!(128&e[t+1])&&t>>3);for(e.push(128|n);--n;)e.push(t>>>(n<<3)&255);e.push(t)}}e.exports=s,s.prototype._importDER=function(e,t){e=o.toArray(e,t);var n=new a;if(48!==e[n.place++])return!1;var r=u(e,n);if(!1===r)return!1;if(r+n.place!==e.length)return!1;if(2!==e[n.place++])return!1;var s=u(e,n);if(!1===s)return!1;var l=e.slice(n.place,s+n.place);if(n.place+=s,2!==e[n.place++])return!1;var c=u(e,n);if(!1===c)return!1;if(e.length!==c+n.place)return!1;var h=e.slice(n.place,c+n.place);if(0===l[0]){if(!(128&l[1]))return!1;l=l.slice(1)}if(0===h[0]){if(!(128&h[1]))return!1;h=h.slice(1)}return this.r=new i(l),this.s=new i(h),this.recoveryParam=null,!0},s.prototype.toDER=function(e){var t=this.r.toArray(),n=this.s.toArray();for(128&t[0]&&(t=[0].concat(t)),128&n[0]&&(n=[0].concat(n)),t=l(t),n=l(n);!(n[0]||128&n[1]);)n=n.slice(1);var i=[2];c(i,t.length),(i=i.concat(t)).push(2),c(i,n.length);var r=i.concat(n),s=[48];return c(s,r.length),s=s.concat(r),o.encode(s,e)}},6197:(e,t,n)=>{"use strict";var i=n(3502),o=n(1353),r=n(4528),s=r.assert,a=r.parseBytes,u=n(6790),l=n(8539);function c(e){if(s("ed25519"===e,"only tested with ed25519 so far"),!(this instanceof c))return new c(e);e=o[e].curve,this.curve=e,this.g=e.g,this.g.precompute(e.n.bitLength()+1),this.pointClass=e.point().constructor,this.encodingLength=Math.ceil(e.n.bitLength()/8),this.hash=i.sha512}e.exports=c,c.prototype.sign=function(e,t){e=a(e);var n=this.keyFromSecret(t),i=this.hashInt(n.messagePrefix(),e),o=this.g.mul(i),r=this.encodePoint(o),s=this.hashInt(r,n.pubBytes(),e).mul(n.priv()),u=i.add(s).umod(this.curve.n);return this.makeSignature({R:o,S:u,Rencoded:r})},c.prototype.verify=function(e,t,n){e=a(e),t=this.makeSignature(t);var i=this.keyFromPublic(n),o=this.hashInt(t.Rencoded(),i.pubBytes(),e),r=this.g.mul(t.S());return t.R().add(i.pub().mul(o)).eq(r)},c.prototype.hashInt=function(){for(var e=this.hash(),t=0;t{"use strict";var i=n(4528),o=i.assert,r=i.parseBytes,s=i.cachedProperty;function a(e,t){this.eddsa=e,this._secret=r(t.secret),e.isPoint(t.pub)?this._pub=t.pub:this._pubBytes=r(t.pub)}a.fromPublic=function(e,t){return t instanceof a?t:new a(e,{pub:t})},a.fromSecret=function(e,t){return t instanceof a?t:new a(e,{secret:t})},a.prototype.secret=function(){return this._secret},s(a,"pubBytes",(function(){return this.eddsa.encodePoint(this.pub())})),s(a,"pub",(function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())})),s(a,"privBytes",(function(){var e=this.eddsa,t=this.hash(),n=e.encodingLength-1,i=t.slice(0,e.encodingLength);return i[0]&=248,i[n]&=127,i[n]|=64,i})),s(a,"priv",(function(){return this.eddsa.decodeInt(this.privBytes())})),s(a,"hash",(function(){return this.eddsa.hash().update(this.secret()).digest()})),s(a,"messagePrefix",(function(){return this.hash().slice(this.eddsa.encodingLength)})),a.prototype.sign=function(e){return o(this._secret,"KeyPair can only verify"),this.eddsa.sign(e,this)},a.prototype.verify=function(e,t){return this.eddsa.verify(e,t,this)},a.prototype.getSecret=function(e){return o(this._secret,"KeyPair is public only"),i.encode(this.secret(),e)},a.prototype.getPublic=function(e){return i.encode(this.pubBytes(),e)},e.exports=a},8539:(e,t,n)=>{"use strict";var i=n(8499),o=n(4528),r=o.assert,s=o.cachedProperty,a=o.parseBytes;function u(e,t){this.eddsa=e,"object"!=typeof t&&(t=a(t)),Array.isArray(t)&&(t={R:t.slice(0,e.encodingLength),S:t.slice(e.encodingLength)}),r(t.R&&t.S,"Signature without R or S"),e.isPoint(t.R)&&(this._R=t.R),t.S instanceof i&&(this._S=t.S),this._Rencoded=Array.isArray(t.R)?t.R:t.Rencoded,this._Sencoded=Array.isArray(t.S)?t.S:t.Sencoded}s(u,"S",(function(){return this.eddsa.decodeInt(this.Sencoded())})),s(u,"R",(function(){return this.eddsa.decodePoint(this.Rencoded())})),s(u,"Rencoded",(function(){return this.eddsa.encodePoint(this.R())})),s(u,"Sencoded",(function(){return this.eddsa.encodeInt(this.S())})),u.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},u.prototype.toHex=function(){return o.encode(this.toBytes(),"hex").toUpperCase()},e.exports=u},9160:e=>{e.exports={doubles:{step:4,points:[["e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a","f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821"],["8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508","11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf"],["175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739","d3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695"],["363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640","4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9"],["8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c","4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36"],["723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda","96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f"],["eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa","5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999"],["100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0","cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09"],["e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d","9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d"],["feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d","e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088"],["da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1","9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d"],["53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0","5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8"],["8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047","10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a"],["385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862","283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453"],["6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7","7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160"],["3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd","56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0"],["85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83","7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6"],["948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a","53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589"],["6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8","bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17"],["e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d","4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda"],["e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725","7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd"],["213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754","4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2"],["4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c","17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6"],["fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6","6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f"],["76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39","c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01"],["c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891","893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3"],["d895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b","febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f"],["b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03","2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7"],["e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d","eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78"],["a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070","7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1"],["90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4","e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150"],["8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da","662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82"],["e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11","1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc"],["8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e","efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b"],["e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41","2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51"],["b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef","67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45"],["d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8","db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120"],["324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d","648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84"],["4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96","35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d"],["9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd","ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d"],["6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5","9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8"],["a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266","40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8"],["7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71","34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac"],["928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac","c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f"],["85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751","1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962"],["ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e","493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907"],["827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241","c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec"],["eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3","be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d"],["e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f","4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414"],["1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19","aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd"],["146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be","b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0"],["fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9","6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811"],["da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2","8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1"],["a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13","7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c"],["174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c","ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73"],["959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba","2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd"],["d2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151","e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405"],["64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073","d99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589"],["8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458","38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e"],["13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b","69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27"],["bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366","d3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1"],["8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa","40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482"],["8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0","620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945"],["dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787","7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573"],["f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e","ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82"]]},naf:{wnd:7,points:[["f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9","388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672"],["2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4","d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6"],["5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc","6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da"],["acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe","cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37"],["774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb","d984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b"],["f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8","ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81"],["d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e","581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58"],["defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34","4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77"],["2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c","85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a"],["352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5","321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c"],["2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f","2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67"],["9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714","73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402"],["daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729","a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55"],["c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db","2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482"],["6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4","e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82"],["1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5","b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396"],["605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479","2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49"],["62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d","80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf"],["80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f","1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a"],["7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb","d0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7"],["d528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9","eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933"],["49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963","758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a"],["77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74","958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6"],["f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530","e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37"],["463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b","5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e"],["f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247","cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6"],["caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1","cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476"],["2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120","4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40"],["7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435","91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61"],["754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18","673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683"],["e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8","59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5"],["186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb","3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b"],["df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f","55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417"],["5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143","efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868"],["290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba","e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a"],["af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45","f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6"],["766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a","744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996"],["59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e","c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e"],["f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8","e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d"],["7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c","30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2"],["948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519","e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e"],["7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab","100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437"],["3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca","ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311"],["d3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf","8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4"],["1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610","68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575"],["733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4","f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d"],["15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c","d56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d"],["a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940","edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629"],["e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980","a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06"],["311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3","66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374"],["34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf","9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee"],["f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63","4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1"],["d7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448","fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b"],["32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf","5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661"],["7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5","8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6"],["ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6","8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e"],["16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5","5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d"],["eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99","f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc"],["78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51","f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4"],["494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5","42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c"],["a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5","204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b"],["c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997","4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913"],["841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881","73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154"],["5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5","39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865"],["36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66","d2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc"],["336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726","ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224"],["8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede","6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e"],["1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94","60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6"],["85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31","3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511"],["29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51","b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b"],["a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252","ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2"],["4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5","cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c"],["d24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b","6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3"],["ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4","322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d"],["af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f","6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700"],["e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889","2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4"],["591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246","b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196"],["11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984","998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4"],["3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a","b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257"],["cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030","bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13"],["c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197","6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096"],["c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593","c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38"],["a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef","21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f"],["347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38","60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448"],["da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a","49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a"],["c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111","5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4"],["4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502","7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437"],["3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea","be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7"],["cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26","8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d"],["b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986","39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a"],["d4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e","62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54"],["48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4","25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77"],["dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda","ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517"],["6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859","cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10"],["e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f","f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125"],["eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c","6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e"],["13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942","fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1"],["ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a","1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2"],["b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80","5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423"],["ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d","438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8"],["8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1","cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758"],["52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63","c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375"],["e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352","6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d"],["7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193","ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec"],["5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00","9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0"],["32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58","ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c"],["e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7","d3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4"],["8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8","c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f"],["4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e","67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649"],["3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d","cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826"],["674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b","299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5"],["d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f","f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87"],["30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6","462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b"],["be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297","62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc"],["93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a","7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c"],["b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c","ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f"],["d5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52","4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a"],["d3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb","bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46"],["463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065","bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f"],["7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917","603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03"],["74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9","cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08"],["30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3","553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8"],["9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57","712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373"],["176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66","ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3"],["75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8","9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8"],["809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721","9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1"],["1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180","4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9"]]}}},4528:(e,t,n)=>{"use strict";var i=t,o=n(8499),r=n(4890),s=n(3720);i.assert=r,i.toArray=s.toArray,i.zero2=s.zero2,i.toHex=s.toHex,i.encode=s.encode,i.getNAF=function(e,t,n){var i,o=new Array(Math.max(e.bitLength(),n)+1);for(i=0;i(r>>1)-1?(r>>1)-u:u,s.isubn(a)):a=0,o[i]=a,s.iushrn(1)}return o},i.getJSF=function(e,t){var n=[[],[]];e=e.clone(),t=t.clone();for(var i,o=0,r=0;e.cmpn(-o)>0||t.cmpn(-r)>0;){var s,a,u=e.andln(3)+o&3,l=t.andln(3)+r&3;3===u&&(u=-1),3===l&&(l=-1),s=1&u?3!=(i=e.andln(7)+o&7)&&5!==i||2!==l?u:-u:0,n[0].push(s),a=1&l?3!=(i=t.andln(7)+r&7)&&5!==i||2!==u?l:-l:0,n[1].push(a),2*o===s+1&&(o=1-o),2*r===a+1&&(r=1-r),e.iushrn(1),t.iushrn(1)}return n},i.cachedProperty=function(e,t,n){var i="_"+t;e.prototype[t]=function(){return void 0!==this[i]?this[i]:this[i]=n.call(this)}},i.parseBytes=function(e){return"string"==typeof e?i.toArray(e,"hex"):e},i.intFromLE=function(e){return new o(e,"hex","le")}},8499:function(e,t,n){!function(e,t){"use strict";function i(e,t){if(!e)throw new Error(t||"Assertion failed")}function o(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}function r(e,t,n){if(r.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(n=t,t=10),this._init(e||0,t||10,n||"be"))}var s;"object"==typeof e?e.exports=r:t.BN=r,r.BN=r,r.wordSize=26;try{s="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:n(9368).Buffer}catch(e){}function a(e,t){var n=e.charCodeAt(t);return n>=65&&n<=70?n-55:n>=97&&n<=102?n-87:n-48&15}function u(e,t,n){var i=a(e,n);return n-1>=t&&(i|=a(e,n-1)<<4),i}function l(e,t,n,i){for(var o=0,r=Math.min(e.length,n),s=t;s=49?a-49+10:a>=17?a-17+10:a}return o}r.isBN=function(e){return e instanceof r||null!==e&&"object"==typeof e&&e.constructor.wordSize===r.wordSize&&Array.isArray(e.words)},r.max=function(e,t){return e.cmp(t)>0?e:t},r.min=function(e,t){return e.cmp(t)<0?e:t},r.prototype._init=function(e,t,n){if("number"==typeof e)return this._initNumber(e,t,n);if("object"==typeof e)return this._initArray(e,t,n);"hex"===t&&(t=16),i(t===(0|t)&&t>=2&&t<=36);var o=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(o++,this.negative=1),o=0;o-=3)s=e[o]|e[o-1]<<8|e[o-2]<<16,this.words[r]|=s<>>26-a&67108863,(a+=24)>=26&&(a-=26,r++);else if("le"===n)for(o=0,r=0;o>>26-a&67108863,(a+=24)>=26&&(a-=26,r++);return this.strip()},r.prototype._parseHex=function(e,t,n){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var i=0;i=t;i-=2)o=u(e,t,i)<=18?(r-=18,s+=1,this.words[s]|=o>>>26):r+=8;else for(i=(e.length-t)%2==0?t+1:t;i=18?(r-=18,s+=1,this.words[s]|=o>>>26):r+=8;this.strip()},r.prototype._parseBase=function(e,t,n){this.words=[0],this.length=1;for(var i=0,o=1;o<=67108863;o*=t)i++;i--,o=o/t|0;for(var r=e.length-n,s=r%i,a=Math.min(r,r-s)+n,u=0,c=n;c1&&0===this.words[this.length-1];)this.length--;return this._normSign()},r.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},r.prototype.inspect=function(){return(this.red?""};var c=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],h=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],d=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function f(e,t,n){n.negative=t.negative^e.negative;var i=e.length+t.length|0;n.length=i,i=i-1|0;var o=0|e.words[0],r=0|t.words[0],s=o*r,a=67108863&s,u=s/67108864|0;n.words[0]=a;for(var l=1;l>>26,h=67108863&u,d=Math.min(l,t.length-1),f=Math.max(0,l-e.length+1);f<=d;f++){var p=l-f|0;c+=(s=(o=0|e.words[p])*(r=0|t.words[f])+h)/67108864|0,h=67108863&s}n.words[l]=0|h,u=0|c}return 0!==u?n.words[l]=0|u:n.length--,n.strip()}r.prototype.toString=function(e,t){var n;if(t=0|t||1,16===(e=e||10)||"hex"===e){n="";for(var o=0,r=0,s=0;s>>24-o&16777215)||s!==this.length-1?c[6-u.length]+u+n:u+n,(o+=2)>=26&&(o-=26,s--)}for(0!==r&&(n=r.toString(16)+n);n.length%t!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(e===(0|e)&&e>=2&&e<=36){var l=h[e],f=d[e];n="";var p=this.clone();for(p.negative=0;!p.isZero();){var g=p.modn(f).toString(e);n=(p=p.idivn(f)).isZero()?g+n:c[l-g.length]+g+n}for(this.isZero()&&(n="0"+n);n.length%t!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}i(!1,"Base should be between 2 and 36")},r.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&i(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},r.prototype.toJSON=function(){return this.toString(16)},r.prototype.toBuffer=function(e,t){return i(void 0!==s),this.toArrayLike(s,e,t)},r.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},r.prototype.toArrayLike=function(e,t,n){var o=this.byteLength(),r=n||Math.max(1,o);i(o<=r,"byte array longer than desired length"),i(r>0,"Requested array length <= 0"),this.strip();var s,a,u="le"===t,l=new e(r),c=this.clone();if(u){for(a=0;!c.isZero();a++)s=c.andln(255),c.iushrn(8),l[a]=s;for(;a=4096&&(n+=13,t>>>=13),t>=64&&(n+=7,t>>>=7),t>=8&&(n+=4,t>>>=4),t>=2&&(n+=2,t>>>=2),n+t},r.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,n=0;return 8191&t||(n+=13,t>>>=13),127&t||(n+=7,t>>>=7),15&t||(n+=4,t>>>=4),3&t||(n+=2,t>>>=2),1&t||n++,n},r.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},r.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},r.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},r.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var n=0;ne.length?this.clone().iand(e):e.clone().iand(this)},r.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},r.prototype.iuxor=function(e){var t,n;this.length>e.length?(t=this,n=e):(t=e,n=this);for(var i=0;ie.length?this.clone().ixor(e):e.clone().ixor(this)},r.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},r.prototype.inotn=function(e){i("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),n=e%26;this._expand(t),n>0&&t--;for(var o=0;o0&&(this.words[o]=~this.words[o]&67108863>>26-n),this.strip()},r.prototype.notn=function(e){return this.clone().inotn(e)},r.prototype.setn=function(e,t){i("number"==typeof e&&e>=0);var n=e/26|0,o=e%26;return this._expand(n+1),this.words[n]=t?this.words[n]|1<e.length?(n=this,i=e):(n=e,i=this);for(var o=0,r=0;r>>26;for(;0!==o&&r>>26;if(this.length=n.length,0!==o)this.words[this.length]=o,this.length++;else if(n!==this)for(;re.length?this.clone().iadd(e):e.clone().iadd(this)},r.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var n,i,o=this.cmp(e);if(0===o)return this.negative=0,this.length=1,this.words[0]=0,this;o>0?(n=this,i=e):(n=e,i=this);for(var r=0,s=0;s>26,this.words[s]=67108863&t;for(;0!==r&&s>26,this.words[s]=67108863&t;if(0===r&&s>>13,f=0|s[1],p=8191&f,g=f>>>13,m=0|s[2],v=8191&m,y=m>>>13,b=0|s[3],_=8191&b,w=b>>>13,M=0|s[4],C=8191&M,S=M>>>13,L=0|s[5],I=8191&L,N=L>>>13,x=0|s[6],D=8191&x,k=x>>>13,T=0|s[7],E=8191&T,A=T>>>13,j=0|s[8],O=8191&j,R=j>>>13,P=0|s[9],z=8191&P,W=P>>>13,F=0|a[0],B=8191&F,H=F>>>13,V=0|a[1],U=8191&V,Y=V>>>13,Z=0|a[2],G=8191&Z,Q=Z>>>13,q=0|a[3],K=8191&q,J=q>>>13,X=0|a[4],$=8191&X,ee=X>>>13,te=0|a[5],ne=8191&te,ie=te>>>13,oe=0|a[6],re=8191&oe,se=oe>>>13,ae=0|a[7],ue=8191&ae,le=ae>>>13,ce=0|a[8],he=8191&ce,de=ce>>>13,fe=0|a[9],pe=8191&fe,ge=fe>>>13;n.negative=e.negative^t.negative,n.length=19;var me=(l+(i=Math.imul(h,B))|0)+((8191&(o=(o=Math.imul(h,H))+Math.imul(d,B)|0))<<13)|0;l=((r=Math.imul(d,H))+(o>>>13)|0)+(me>>>26)|0,me&=67108863,i=Math.imul(p,B),o=(o=Math.imul(p,H))+Math.imul(g,B)|0,r=Math.imul(g,H);var ve=(l+(i=i+Math.imul(h,U)|0)|0)+((8191&(o=(o=o+Math.imul(h,Y)|0)+Math.imul(d,U)|0))<<13)|0;l=((r=r+Math.imul(d,Y)|0)+(o>>>13)|0)+(ve>>>26)|0,ve&=67108863,i=Math.imul(v,B),o=(o=Math.imul(v,H))+Math.imul(y,B)|0,r=Math.imul(y,H),i=i+Math.imul(p,U)|0,o=(o=o+Math.imul(p,Y)|0)+Math.imul(g,U)|0,r=r+Math.imul(g,Y)|0;var ye=(l+(i=i+Math.imul(h,G)|0)|0)+((8191&(o=(o=o+Math.imul(h,Q)|0)+Math.imul(d,G)|0))<<13)|0;l=((r=r+Math.imul(d,Q)|0)+(o>>>13)|0)+(ye>>>26)|0,ye&=67108863,i=Math.imul(_,B),o=(o=Math.imul(_,H))+Math.imul(w,B)|0,r=Math.imul(w,H),i=i+Math.imul(v,U)|0,o=(o=o+Math.imul(v,Y)|0)+Math.imul(y,U)|0,r=r+Math.imul(y,Y)|0,i=i+Math.imul(p,G)|0,o=(o=o+Math.imul(p,Q)|0)+Math.imul(g,G)|0,r=r+Math.imul(g,Q)|0;var be=(l+(i=i+Math.imul(h,K)|0)|0)+((8191&(o=(o=o+Math.imul(h,J)|0)+Math.imul(d,K)|0))<<13)|0;l=((r=r+Math.imul(d,J)|0)+(o>>>13)|0)+(be>>>26)|0,be&=67108863,i=Math.imul(C,B),o=(o=Math.imul(C,H))+Math.imul(S,B)|0,r=Math.imul(S,H),i=i+Math.imul(_,U)|0,o=(o=o+Math.imul(_,Y)|0)+Math.imul(w,U)|0,r=r+Math.imul(w,Y)|0,i=i+Math.imul(v,G)|0,o=(o=o+Math.imul(v,Q)|0)+Math.imul(y,G)|0,r=r+Math.imul(y,Q)|0,i=i+Math.imul(p,K)|0,o=(o=o+Math.imul(p,J)|0)+Math.imul(g,K)|0,r=r+Math.imul(g,J)|0;var _e=(l+(i=i+Math.imul(h,$)|0)|0)+((8191&(o=(o=o+Math.imul(h,ee)|0)+Math.imul(d,$)|0))<<13)|0;l=((r=r+Math.imul(d,ee)|0)+(o>>>13)|0)+(_e>>>26)|0,_e&=67108863,i=Math.imul(I,B),o=(o=Math.imul(I,H))+Math.imul(N,B)|0,r=Math.imul(N,H),i=i+Math.imul(C,U)|0,o=(o=o+Math.imul(C,Y)|0)+Math.imul(S,U)|0,r=r+Math.imul(S,Y)|0,i=i+Math.imul(_,G)|0,o=(o=o+Math.imul(_,Q)|0)+Math.imul(w,G)|0,r=r+Math.imul(w,Q)|0,i=i+Math.imul(v,K)|0,o=(o=o+Math.imul(v,J)|0)+Math.imul(y,K)|0,r=r+Math.imul(y,J)|0,i=i+Math.imul(p,$)|0,o=(o=o+Math.imul(p,ee)|0)+Math.imul(g,$)|0,r=r+Math.imul(g,ee)|0;var we=(l+(i=i+Math.imul(h,ne)|0)|0)+((8191&(o=(o=o+Math.imul(h,ie)|0)+Math.imul(d,ne)|0))<<13)|0;l=((r=r+Math.imul(d,ie)|0)+(o>>>13)|0)+(we>>>26)|0,we&=67108863,i=Math.imul(D,B),o=(o=Math.imul(D,H))+Math.imul(k,B)|0,r=Math.imul(k,H),i=i+Math.imul(I,U)|0,o=(o=o+Math.imul(I,Y)|0)+Math.imul(N,U)|0,r=r+Math.imul(N,Y)|0,i=i+Math.imul(C,G)|0,o=(o=o+Math.imul(C,Q)|0)+Math.imul(S,G)|0,r=r+Math.imul(S,Q)|0,i=i+Math.imul(_,K)|0,o=(o=o+Math.imul(_,J)|0)+Math.imul(w,K)|0,r=r+Math.imul(w,J)|0,i=i+Math.imul(v,$)|0,o=(o=o+Math.imul(v,ee)|0)+Math.imul(y,$)|0,r=r+Math.imul(y,ee)|0,i=i+Math.imul(p,ne)|0,o=(o=o+Math.imul(p,ie)|0)+Math.imul(g,ne)|0,r=r+Math.imul(g,ie)|0;var Me=(l+(i=i+Math.imul(h,re)|0)|0)+((8191&(o=(o=o+Math.imul(h,se)|0)+Math.imul(d,re)|0))<<13)|0;l=((r=r+Math.imul(d,se)|0)+(o>>>13)|0)+(Me>>>26)|0,Me&=67108863,i=Math.imul(E,B),o=(o=Math.imul(E,H))+Math.imul(A,B)|0,r=Math.imul(A,H),i=i+Math.imul(D,U)|0,o=(o=o+Math.imul(D,Y)|0)+Math.imul(k,U)|0,r=r+Math.imul(k,Y)|0,i=i+Math.imul(I,G)|0,o=(o=o+Math.imul(I,Q)|0)+Math.imul(N,G)|0,r=r+Math.imul(N,Q)|0,i=i+Math.imul(C,K)|0,o=(o=o+Math.imul(C,J)|0)+Math.imul(S,K)|0,r=r+Math.imul(S,J)|0,i=i+Math.imul(_,$)|0,o=(o=o+Math.imul(_,ee)|0)+Math.imul(w,$)|0,r=r+Math.imul(w,ee)|0,i=i+Math.imul(v,ne)|0,o=(o=o+Math.imul(v,ie)|0)+Math.imul(y,ne)|0,r=r+Math.imul(y,ie)|0,i=i+Math.imul(p,re)|0,o=(o=o+Math.imul(p,se)|0)+Math.imul(g,re)|0,r=r+Math.imul(g,se)|0;var Ce=(l+(i=i+Math.imul(h,ue)|0)|0)+((8191&(o=(o=o+Math.imul(h,le)|0)+Math.imul(d,ue)|0))<<13)|0;l=((r=r+Math.imul(d,le)|0)+(o>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,i=Math.imul(O,B),o=(o=Math.imul(O,H))+Math.imul(R,B)|0,r=Math.imul(R,H),i=i+Math.imul(E,U)|0,o=(o=o+Math.imul(E,Y)|0)+Math.imul(A,U)|0,r=r+Math.imul(A,Y)|0,i=i+Math.imul(D,G)|0,o=(o=o+Math.imul(D,Q)|0)+Math.imul(k,G)|0,r=r+Math.imul(k,Q)|0,i=i+Math.imul(I,K)|0,o=(o=o+Math.imul(I,J)|0)+Math.imul(N,K)|0,r=r+Math.imul(N,J)|0,i=i+Math.imul(C,$)|0,o=(o=o+Math.imul(C,ee)|0)+Math.imul(S,$)|0,r=r+Math.imul(S,ee)|0,i=i+Math.imul(_,ne)|0,o=(o=o+Math.imul(_,ie)|0)+Math.imul(w,ne)|0,r=r+Math.imul(w,ie)|0,i=i+Math.imul(v,re)|0,o=(o=o+Math.imul(v,se)|0)+Math.imul(y,re)|0,r=r+Math.imul(y,se)|0,i=i+Math.imul(p,ue)|0,o=(o=o+Math.imul(p,le)|0)+Math.imul(g,ue)|0,r=r+Math.imul(g,le)|0;var Se=(l+(i=i+Math.imul(h,he)|0)|0)+((8191&(o=(o=o+Math.imul(h,de)|0)+Math.imul(d,he)|0))<<13)|0;l=((r=r+Math.imul(d,de)|0)+(o>>>13)|0)+(Se>>>26)|0,Se&=67108863,i=Math.imul(z,B),o=(o=Math.imul(z,H))+Math.imul(W,B)|0,r=Math.imul(W,H),i=i+Math.imul(O,U)|0,o=(o=o+Math.imul(O,Y)|0)+Math.imul(R,U)|0,r=r+Math.imul(R,Y)|0,i=i+Math.imul(E,G)|0,o=(o=o+Math.imul(E,Q)|0)+Math.imul(A,G)|0,r=r+Math.imul(A,Q)|0,i=i+Math.imul(D,K)|0,o=(o=o+Math.imul(D,J)|0)+Math.imul(k,K)|0,r=r+Math.imul(k,J)|0,i=i+Math.imul(I,$)|0,o=(o=o+Math.imul(I,ee)|0)+Math.imul(N,$)|0,r=r+Math.imul(N,ee)|0,i=i+Math.imul(C,ne)|0,o=(o=o+Math.imul(C,ie)|0)+Math.imul(S,ne)|0,r=r+Math.imul(S,ie)|0,i=i+Math.imul(_,re)|0,o=(o=o+Math.imul(_,se)|0)+Math.imul(w,re)|0,r=r+Math.imul(w,se)|0,i=i+Math.imul(v,ue)|0,o=(o=o+Math.imul(v,le)|0)+Math.imul(y,ue)|0,r=r+Math.imul(y,le)|0,i=i+Math.imul(p,he)|0,o=(o=o+Math.imul(p,de)|0)+Math.imul(g,he)|0,r=r+Math.imul(g,de)|0;var Le=(l+(i=i+Math.imul(h,pe)|0)|0)+((8191&(o=(o=o+Math.imul(h,ge)|0)+Math.imul(d,pe)|0))<<13)|0;l=((r=r+Math.imul(d,ge)|0)+(o>>>13)|0)+(Le>>>26)|0,Le&=67108863,i=Math.imul(z,U),o=(o=Math.imul(z,Y))+Math.imul(W,U)|0,r=Math.imul(W,Y),i=i+Math.imul(O,G)|0,o=(o=o+Math.imul(O,Q)|0)+Math.imul(R,G)|0,r=r+Math.imul(R,Q)|0,i=i+Math.imul(E,K)|0,o=(o=o+Math.imul(E,J)|0)+Math.imul(A,K)|0,r=r+Math.imul(A,J)|0,i=i+Math.imul(D,$)|0,o=(o=o+Math.imul(D,ee)|0)+Math.imul(k,$)|0,r=r+Math.imul(k,ee)|0,i=i+Math.imul(I,ne)|0,o=(o=o+Math.imul(I,ie)|0)+Math.imul(N,ne)|0,r=r+Math.imul(N,ie)|0,i=i+Math.imul(C,re)|0,o=(o=o+Math.imul(C,se)|0)+Math.imul(S,re)|0,r=r+Math.imul(S,se)|0,i=i+Math.imul(_,ue)|0,o=(o=o+Math.imul(_,le)|0)+Math.imul(w,ue)|0,r=r+Math.imul(w,le)|0,i=i+Math.imul(v,he)|0,o=(o=o+Math.imul(v,de)|0)+Math.imul(y,he)|0,r=r+Math.imul(y,de)|0;var Ie=(l+(i=i+Math.imul(p,pe)|0)|0)+((8191&(o=(o=o+Math.imul(p,ge)|0)+Math.imul(g,pe)|0))<<13)|0;l=((r=r+Math.imul(g,ge)|0)+(o>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,i=Math.imul(z,G),o=(o=Math.imul(z,Q))+Math.imul(W,G)|0,r=Math.imul(W,Q),i=i+Math.imul(O,K)|0,o=(o=o+Math.imul(O,J)|0)+Math.imul(R,K)|0,r=r+Math.imul(R,J)|0,i=i+Math.imul(E,$)|0,o=(o=o+Math.imul(E,ee)|0)+Math.imul(A,$)|0,r=r+Math.imul(A,ee)|0,i=i+Math.imul(D,ne)|0,o=(o=o+Math.imul(D,ie)|0)+Math.imul(k,ne)|0,r=r+Math.imul(k,ie)|0,i=i+Math.imul(I,re)|0,o=(o=o+Math.imul(I,se)|0)+Math.imul(N,re)|0,r=r+Math.imul(N,se)|0,i=i+Math.imul(C,ue)|0,o=(o=o+Math.imul(C,le)|0)+Math.imul(S,ue)|0,r=r+Math.imul(S,le)|0,i=i+Math.imul(_,he)|0,o=(o=o+Math.imul(_,de)|0)+Math.imul(w,he)|0,r=r+Math.imul(w,de)|0;var Ne=(l+(i=i+Math.imul(v,pe)|0)|0)+((8191&(o=(o=o+Math.imul(v,ge)|0)+Math.imul(y,pe)|0))<<13)|0;l=((r=r+Math.imul(y,ge)|0)+(o>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,i=Math.imul(z,K),o=(o=Math.imul(z,J))+Math.imul(W,K)|0,r=Math.imul(W,J),i=i+Math.imul(O,$)|0,o=(o=o+Math.imul(O,ee)|0)+Math.imul(R,$)|0,r=r+Math.imul(R,ee)|0,i=i+Math.imul(E,ne)|0,o=(o=o+Math.imul(E,ie)|0)+Math.imul(A,ne)|0,r=r+Math.imul(A,ie)|0,i=i+Math.imul(D,re)|0,o=(o=o+Math.imul(D,se)|0)+Math.imul(k,re)|0,r=r+Math.imul(k,se)|0,i=i+Math.imul(I,ue)|0,o=(o=o+Math.imul(I,le)|0)+Math.imul(N,ue)|0,r=r+Math.imul(N,le)|0,i=i+Math.imul(C,he)|0,o=(o=o+Math.imul(C,de)|0)+Math.imul(S,he)|0,r=r+Math.imul(S,de)|0;var xe=(l+(i=i+Math.imul(_,pe)|0)|0)+((8191&(o=(o=o+Math.imul(_,ge)|0)+Math.imul(w,pe)|0))<<13)|0;l=((r=r+Math.imul(w,ge)|0)+(o>>>13)|0)+(xe>>>26)|0,xe&=67108863,i=Math.imul(z,$),o=(o=Math.imul(z,ee))+Math.imul(W,$)|0,r=Math.imul(W,ee),i=i+Math.imul(O,ne)|0,o=(o=o+Math.imul(O,ie)|0)+Math.imul(R,ne)|0,r=r+Math.imul(R,ie)|0,i=i+Math.imul(E,re)|0,o=(o=o+Math.imul(E,se)|0)+Math.imul(A,re)|0,r=r+Math.imul(A,se)|0,i=i+Math.imul(D,ue)|0,o=(o=o+Math.imul(D,le)|0)+Math.imul(k,ue)|0,r=r+Math.imul(k,le)|0,i=i+Math.imul(I,he)|0,o=(o=o+Math.imul(I,de)|0)+Math.imul(N,he)|0,r=r+Math.imul(N,de)|0;var De=(l+(i=i+Math.imul(C,pe)|0)|0)+((8191&(o=(o=o+Math.imul(C,ge)|0)+Math.imul(S,pe)|0))<<13)|0;l=((r=r+Math.imul(S,ge)|0)+(o>>>13)|0)+(De>>>26)|0,De&=67108863,i=Math.imul(z,ne),o=(o=Math.imul(z,ie))+Math.imul(W,ne)|0,r=Math.imul(W,ie),i=i+Math.imul(O,re)|0,o=(o=o+Math.imul(O,se)|0)+Math.imul(R,re)|0,r=r+Math.imul(R,se)|0,i=i+Math.imul(E,ue)|0,o=(o=o+Math.imul(E,le)|0)+Math.imul(A,ue)|0,r=r+Math.imul(A,le)|0,i=i+Math.imul(D,he)|0,o=(o=o+Math.imul(D,de)|0)+Math.imul(k,he)|0,r=r+Math.imul(k,de)|0;var ke=(l+(i=i+Math.imul(I,pe)|0)|0)+((8191&(o=(o=o+Math.imul(I,ge)|0)+Math.imul(N,pe)|0))<<13)|0;l=((r=r+Math.imul(N,ge)|0)+(o>>>13)|0)+(ke>>>26)|0,ke&=67108863,i=Math.imul(z,re),o=(o=Math.imul(z,se))+Math.imul(W,re)|0,r=Math.imul(W,se),i=i+Math.imul(O,ue)|0,o=(o=o+Math.imul(O,le)|0)+Math.imul(R,ue)|0,r=r+Math.imul(R,le)|0,i=i+Math.imul(E,he)|0,o=(o=o+Math.imul(E,de)|0)+Math.imul(A,he)|0,r=r+Math.imul(A,de)|0;var Te=(l+(i=i+Math.imul(D,pe)|0)|0)+((8191&(o=(o=o+Math.imul(D,ge)|0)+Math.imul(k,pe)|0))<<13)|0;l=((r=r+Math.imul(k,ge)|0)+(o>>>13)|0)+(Te>>>26)|0,Te&=67108863,i=Math.imul(z,ue),o=(o=Math.imul(z,le))+Math.imul(W,ue)|0,r=Math.imul(W,le),i=i+Math.imul(O,he)|0,o=(o=o+Math.imul(O,de)|0)+Math.imul(R,he)|0,r=r+Math.imul(R,de)|0;var Ee=(l+(i=i+Math.imul(E,pe)|0)|0)+((8191&(o=(o=o+Math.imul(E,ge)|0)+Math.imul(A,pe)|0))<<13)|0;l=((r=r+Math.imul(A,ge)|0)+(o>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,i=Math.imul(z,he),o=(o=Math.imul(z,de))+Math.imul(W,he)|0,r=Math.imul(W,de);var Ae=(l+(i=i+Math.imul(O,pe)|0)|0)+((8191&(o=(o=o+Math.imul(O,ge)|0)+Math.imul(R,pe)|0))<<13)|0;l=((r=r+Math.imul(R,ge)|0)+(o>>>13)|0)+(Ae>>>26)|0,Ae&=67108863;var je=(l+(i=Math.imul(z,pe))|0)+((8191&(o=(o=Math.imul(z,ge))+Math.imul(W,pe)|0))<<13)|0;return l=((r=Math.imul(W,ge))+(o>>>13)|0)+(je>>>26)|0,je&=67108863,u[0]=me,u[1]=ve,u[2]=ye,u[3]=be,u[4]=_e,u[5]=we,u[6]=Me,u[7]=Ce,u[8]=Se,u[9]=Le,u[10]=Ie,u[11]=Ne,u[12]=xe,u[13]=De,u[14]=ke,u[15]=Te,u[16]=Ee,u[17]=Ae,u[18]=je,0!==l&&(u[19]=l,n.length++),n};function g(e,t,n){return(new m).mulp(e,t,n)}function m(e,t){this.x=e,this.y=t}Math.imul||(p=f),r.prototype.mulTo=function(e,t){var n,i=this.length+e.length;return n=10===this.length&&10===e.length?p(this,e,t):i<63?f(this,e,t):i<1024?function(e,t,n){n.negative=t.negative^e.negative,n.length=e.length+t.length;for(var i=0,o=0,r=0;r>>26)|0)>>>26,s&=67108863}n.words[r]=a,i=s,s=o}return 0!==i?n.words[r]=i:n.length--,n.strip()}(this,e,t):g(this,e,t),n},m.prototype.makeRBT=function(e){for(var t=new Array(e),n=r.prototype._countBits(e)-1,i=0;i>=1;return i},m.prototype.permute=function(e,t,n,i,o,r){for(var s=0;s>>=1)o++;return 1<>>=13,n[2*s+1]=8191&r,r>>>=13;for(s=2*t;s>=26,t+=o/67108864|0,t+=r>>>26,this.words[n]=67108863&r}return 0!==t&&(this.words[n]=t,this.length++),this},r.prototype.muln=function(e){return this.clone().imuln(e)},r.prototype.sqr=function(){return this.mul(this)},r.prototype.isqr=function(){return this.imul(this.clone())},r.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),n=0;n>>o}return t}(e);if(0===t.length)return new r(1);for(var n=this,i=0;i=0);var t,n=e%26,o=(e-n)/26,r=67108863>>>26-n<<26-n;if(0!==n){var s=0;for(t=0;t>>26-n}s&&(this.words[t]=s,this.length++)}if(0!==o){for(t=this.length-1;t>=0;t--)this.words[t+o]=this.words[t];for(t=0;t=0),o=t?(t-t%26)/26:0;var r=e%26,s=Math.min((e-r)/26,this.length),a=67108863^67108863>>>r<s)for(this.length-=s,l=0;l=0&&(0!==c||l>=o);l--){var h=0|this.words[l];this.words[l]=c<<26-r|h>>>r,c=h&a}return u&&0!==c&&(u.words[u.length++]=c),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},r.prototype.ishrn=function(e,t,n){return i(0===this.negative),this.iushrn(e,t,n)},r.prototype.shln=function(e){return this.clone().ishln(e)},r.prototype.ushln=function(e){return this.clone().iushln(e)},r.prototype.shrn=function(e){return this.clone().ishrn(e)},r.prototype.ushrn=function(e){return this.clone().iushrn(e)},r.prototype.testn=function(e){i("number"==typeof e&&e>=0);var t=e%26,n=(e-t)/26,o=1<=0);var t=e%26,n=(e-t)/26;if(i(0===this.negative,"imaskn works only with positive numbers"),this.length<=n)return this;if(0!==t&&n++,this.length=Math.min(n,this.length),0!==t){var o=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},r.prototype.isubn=function(e){if(i("number"==typeof e),i(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(u/67108864|0),this.words[o+n]=67108863&r}for(;o>26,this.words[o+n]=67108863&r;if(0===a)return this.strip();for(i(-1===a),a=0,o=0;o>26,this.words[o]=67108863&r;return this.negative=1,this.strip()},r.prototype._wordDiv=function(e,t){var n=(this.length,e.length),i=this.clone(),o=e,s=0|o.words[o.length-1];0!=(n=26-this._countBits(s))&&(o=o.ushln(n),i.iushln(n),s=0|o.words[o.length-1]);var a,u=i.length-o.length;if("mod"!==t){(a=new r(null)).length=u+1,a.words=new Array(a.length);for(var l=0;l=0;h--){var d=67108864*(0|i.words[o.length+h])+(0|i.words[o.length+h-1]);for(d=Math.min(d/s|0,67108863),i._ishlnsubmul(o,d,h);0!==i.negative;)d--,i.negative=0,i._ishlnsubmul(o,1,h),i.isZero()||(i.negative^=1);a&&(a.words[h]=d)}return a&&a.strip(),i.strip(),"div"!==t&&0!==n&&i.iushrn(n),{div:a||null,mod:i}},r.prototype.divmod=function(e,t,n){return i(!e.isZero()),this.isZero()?{div:new r(0),mod:new r(0)}:0!==this.negative&&0===e.negative?(a=this.neg().divmod(e,t),"mod"!==t&&(o=a.div.neg()),"div"!==t&&(s=a.mod.neg(),n&&0!==s.negative&&s.iadd(e)),{div:o,mod:s}):0===this.negative&&0!==e.negative?(a=this.divmod(e.neg(),t),"mod"!==t&&(o=a.div.neg()),{div:o,mod:a.mod}):this.negative&e.negative?(a=this.neg().divmod(e.neg(),t),"div"!==t&&(s=a.mod.neg(),n&&0!==s.negative&&s.isub(e)),{div:a.div,mod:s}):e.length>this.length||this.cmp(e)<0?{div:new r(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new r(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new r(this.modn(e.words[0]))}:this._wordDiv(e,t);var o,s,a},r.prototype.div=function(e){return this.divmod(e,"div",!1).div},r.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},r.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},r.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var n=0!==t.div.negative?t.mod.isub(e):t.mod,i=e.ushrn(1),o=e.andln(1),r=n.cmp(i);return r<0||1===o&&0===r?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},r.prototype.modn=function(e){i(e<=67108863);for(var t=(1<<26)%e,n=0,o=this.length-1;o>=0;o--)n=(t*n+(0|this.words[o]))%e;return n},r.prototype.idivn=function(e){i(e<=67108863);for(var t=0,n=this.length-1;n>=0;n--){var o=(0|this.words[n])+67108864*t;this.words[n]=o/e|0,t=o%e}return this.strip()},r.prototype.divn=function(e){return this.clone().idivn(e)},r.prototype.egcd=function(e){i(0===e.negative),i(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var o=new r(1),s=new r(0),a=new r(0),u=new r(1),l=0;t.isEven()&&n.isEven();)t.iushrn(1),n.iushrn(1),++l;for(var c=n.clone(),h=t.clone();!t.isZero();){for(var d=0,f=1;!(t.words[0]&f)&&d<26;++d,f<<=1);if(d>0)for(t.iushrn(d);d-- >0;)(o.isOdd()||s.isOdd())&&(o.iadd(c),s.isub(h)),o.iushrn(1),s.iushrn(1);for(var p=0,g=1;!(n.words[0]&g)&&p<26;++p,g<<=1);if(p>0)for(n.iushrn(p);p-- >0;)(a.isOdd()||u.isOdd())&&(a.iadd(c),u.isub(h)),a.iushrn(1),u.iushrn(1);t.cmp(n)>=0?(t.isub(n),o.isub(a),s.isub(u)):(n.isub(t),a.isub(o),u.isub(s))}return{a,b:u,gcd:n.iushln(l)}},r.prototype._invmp=function(e){i(0===e.negative),i(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var o,s=new r(1),a=new r(0),u=n.clone();t.cmpn(1)>0&&n.cmpn(1)>0;){for(var l=0,c=1;!(t.words[0]&c)&&l<26;++l,c<<=1);if(l>0)for(t.iushrn(l);l-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);for(var h=0,d=1;!(n.words[0]&d)&&h<26;++h,d<<=1);if(h>0)for(n.iushrn(h);h-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);t.cmp(n)>=0?(t.isub(n),s.isub(a)):(n.isub(t),a.isub(s))}return(o=0===t.cmpn(1)?s:a).cmpn(0)<0&&o.iadd(e),o},r.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),n=e.clone();t.negative=0,n.negative=0;for(var i=0;t.isEven()&&n.isEven();i++)t.iushrn(1),n.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;n.isEven();)n.iushrn(1);var o=t.cmp(n);if(o<0){var r=t;t=n,n=r}else if(0===o||0===n.cmpn(1))break;t.isub(n)}return n.iushln(i)},r.prototype.invm=function(e){return this.egcd(e).a.umod(e)},r.prototype.isEven=function(){return!(1&this.words[0])},r.prototype.isOdd=function(){return!(1&~this.words[0])},r.prototype.andln=function(e){return this.words[0]&e},r.prototype.bincn=function(e){i("number"==typeof e);var t=e%26,n=(e-t)/26,o=1<>>26,a&=67108863,this.words[s]=a}return 0!==r&&(this.words[s]=r,this.length++),this},r.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},r.prototype.cmpn=function(e){var t,n=e<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this.strip(),this.length>1)t=1;else{n&&(e=-e),i(e<=67108863,"Number is too big");var o=0|this.words[0];t=o===e?0:oe.length)return 1;if(this.length=0;n--){var i=0|this.words[n],o=0|e.words[n];if(i!==o){io&&(t=1);break}}return t},r.prototype.gtn=function(e){return 1===this.cmpn(e)},r.prototype.gt=function(e){return 1===this.cmp(e)},r.prototype.gten=function(e){return this.cmpn(e)>=0},r.prototype.gte=function(e){return this.cmp(e)>=0},r.prototype.ltn=function(e){return-1===this.cmpn(e)},r.prototype.lt=function(e){return-1===this.cmp(e)},r.prototype.lten=function(e){return this.cmpn(e)<=0},r.prototype.lte=function(e){return this.cmp(e)<=0},r.prototype.eqn=function(e){return 0===this.cmpn(e)},r.prototype.eq=function(e){return 0===this.cmp(e)},r.red=function(e){return new C(e)},r.prototype.toRed=function(e){return i(!this.red,"Already a number in reduction context"),i(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},r.prototype.fromRed=function(){return i(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},r.prototype._forceRed=function(e){return this.red=e,this},r.prototype.forceRed=function(e){return i(!this.red,"Already a number in reduction context"),this._forceRed(e)},r.prototype.redAdd=function(e){return i(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},r.prototype.redIAdd=function(e){return i(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},r.prototype.redSub=function(e){return i(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},r.prototype.redISub=function(e){return i(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},r.prototype.redShl=function(e){return i(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},r.prototype.redMul=function(e){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},r.prototype.redIMul=function(e){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},r.prototype.redSqr=function(){return i(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},r.prototype.redISqr=function(){return i(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},r.prototype.redSqrt=function(){return i(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},r.prototype.redInvm=function(){return i(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},r.prototype.redNeg=function(){return i(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},r.prototype.redPow=function(e){return i(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var v={k256:null,p224:null,p192:null,p25519:null};function y(e,t){this.name=e,this.p=new r(t,16),this.n=this.p.bitLength(),this.k=new r(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function b(){y.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function _(){y.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){y.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function M(){y.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function C(e){if("string"==typeof e){var t=r._prime(e);this.m=t.p,this.prime=t}else i(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function S(e){C.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new r(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}y.prototype._tmp=function(){var e=new r(null);return e.words=new Array(Math.ceil(this.n/13)),e},y.prototype.ireduce=function(e){var t,n=e;do{this.split(n,this.tmp),t=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(t>this.n);var i=t0?n.isub(this.p):void 0!==n.strip?n.strip():n._strip(),n},y.prototype.split=function(e,t){e.iushrn(this.n,0,t)},y.prototype.imulK=function(e){return e.imul(this.k)},o(b,y),b.prototype.split=function(e,t){for(var n=4194303,i=Math.min(e.length,9),o=0;o>>22,r=s}r>>>=22,e.words[o-10]=r,0===r&&e.length>10?e.length-=10:e.length-=9},b.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,n=0;n>>=26,e.words[n]=o,t=i}return 0!==t&&(e.words[e.length++]=t),e},r._prime=function(e){if(v[e])return v[e];var t;if("k256"===e)t=new b;else if("p224"===e)t=new _;else if("p192"===e)t=new w;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new M}return v[e]=t,t},C.prototype._verify1=function(e){i(0===e.negative,"red works only with positives"),i(e.red,"red works only with red numbers")},C.prototype._verify2=function(e,t){i(!(e.negative|t.negative),"red works only with positives"),i(e.red&&e.red===t.red,"red works only with red numbers")},C.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},C.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},C.prototype.add=function(e,t){this._verify2(e,t);var n=e.add(t);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},C.prototype.iadd=function(e,t){this._verify2(e,t);var n=e.iadd(t);return n.cmp(this.m)>=0&&n.isub(this.m),n},C.prototype.sub=function(e,t){this._verify2(e,t);var n=e.sub(t);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},C.prototype.isub=function(e,t){this._verify2(e,t);var n=e.isub(t);return n.cmpn(0)<0&&n.iadd(this.m),n},C.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},C.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},C.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},C.prototype.isqr=function(e){return this.imul(e,e.clone())},C.prototype.sqr=function(e){return this.mul(e,e)},C.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(i(t%2==1),3===t){var n=this.m.add(new r(1)).iushrn(2);return this.pow(e,n)}for(var o=this.m.subn(1),s=0;!o.isZero()&&0===o.andln(1);)s++,o.iushrn(1);i(!o.isZero());var a=new r(1).toRed(this),u=a.redNeg(),l=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new r(2*c*c).toRed(this);0!==this.pow(c,l).cmp(u);)c.redIAdd(u);for(var h=this.pow(c,o),d=this.pow(e,o.addn(1).iushrn(1)),f=this.pow(e,o),p=s;0!==f.cmp(a);){for(var g=f,m=0;0!==g.cmp(a);m++)g=g.redSqr();i(m=0;i--){for(var l=t.words[i],c=u-1;c>=0;c--){var h=l>>c&1;o!==n[0]&&(o=this.sqr(o)),0!==h||0!==s?(s<<=1,s|=h,(4==++a||0===i&&0===c)&&(o=this.mul(o,n[s]),a=0,s=0)):a=0}u=26}return o},C.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},C.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},r.mont=function(e){return new S(e)},o(S,C),S.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},S.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},S.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var n=e.imul(t),i=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=n.isub(i).iushrn(this.shift),r=o;return o.cmp(this.m)>=0?r=o.isub(this.m):o.cmpn(0)<0&&(r=o.iadd(this.m)),r._forceRed(this)},S.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new r(0)._forceRed(this);var n=e.mul(t),i=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=n.isub(i).iushrn(this.shift),s=o;return o.cmp(this.m)>=0?s=o.isub(this.m):o.cmpn(0)<0&&(s=o.iadd(this.m)),s._forceRed(this)},S.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=n.nmd(e),this)},6987:e=>{"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}},3188:e=>{"use strict";var t,n="object"==typeof Reflect?Reflect:null,i=n&&"function"==typeof n.apply?n.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};t=n&&"function"==typeof n.ownKeys?n.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var o=Number.isNaN||function(e){return e!=e};function r(){r.init.call(this)}e.exports=r,e.exports.once=function(e,t){return new Promise((function(n,i){function o(n){e.removeListener(t,r),i(n)}function r(){"function"==typeof e.removeListener&&e.removeListener("error",o),n([].slice.call(arguments))}g(e,t,r,{once:!0}),"error"!==t&&function(e,t,n){"function"==typeof e.on&&g(e,"error",t,{once:!0})}(e,o)}))},r.EventEmitter=r,r.prototype._events=void 0,r.prototype._eventsCount=0,r.prototype._maxListeners=void 0;var s=10;function a(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function u(e){return void 0===e._maxListeners?r.defaultMaxListeners:e._maxListeners}function l(e,t,n,i){var o,r,s,l;if(a(n),void 0===(r=e._events)?(r=e._events=Object.create(null),e._eventsCount=0):(void 0!==r.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),r=e._events),s=r[t]),void 0===s)s=r[t]=n,++e._eventsCount;else if("function"==typeof s?s=r[t]=i?[n,s]:[s,n]:i?s.unshift(n):s.push(n),(o=u(e))>0&&s.length>o&&!s.warned){s.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=e,c.type=t,c.count=s.length,l=c,console&&console.warn&&console.warn(l)}return e}function c(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function h(e,t,n){var i={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},o=c.bind(i);return o.listener=n,i.wrapFn=o,o}function d(e,t,n){var i=e._events;if(void 0===i)return[];var o=i[t];return void 0===o?[]:"function"==typeof o?n?[o.listener||o]:[o]:n?function(e){for(var t=new Array(e.length),n=0;n0&&(s=t[0]),s instanceof Error)throw s;var a=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var u=r[e];if(void 0===u)return!1;if("function"==typeof u)i(u,this,t);else{var l=u.length,c=p(u,l);for(n=0;n=0;r--)if(n[r]===t||n[r].listener===t){s=n[r].listener,o=r;break}if(o<0)return this;0===o?n.shift():function(e,t){for(;t+1=0;i--)this.removeListener(e,t[i]);return this},r.prototype.listeners=function(e){return d(this,e,!0)},r.prototype.rawListeners=function(e){return d(this,e,!1)},r.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):f.call(e,t)},r.prototype.listenerCount=f,r.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},8819:(e,t,n)=>{var i=n(2238).Buffer,o=n(9781);e.exports=function(e,t,n,r){if(i.isBuffer(e)||(e=i.from(e,"binary")),t&&(i.isBuffer(t)||(t=i.from(t,"binary")),8!==t.length))throw new RangeError("salt should be Buffer with 8 byte length");for(var s=n/8,a=i.alloc(s),u=i.alloc(r||0),l=i.alloc(0);s>0||r>0;){var c=new o;c.update(l),c.update(e),t&&c.update(t),l=c.digest();var h=0;if(s>0){var d=a.length-s;h=Math.min(s,l.length),l.copy(a,d,0,h),s-=h}if(h0){var f=u.length-r,p=Math.min(r,l.length-h);l.copy(u,f,h,h+p),r-=p}}return l.fill(0),{key:a,iv:u}}},4922:e=>{e.exports=function(e,t){if("string"!=typeof e)throw new TypeError("Expected a string");for(var n,i=String(e),o="",r=!!t&&!!t.extended,s=!!t&&!!t.globstar,a=!1,u=t&&"string"==typeof t.flags?t.flags:"",l=0,c=i.length;l1)||"/"!==h&&void 0!==h||"/"!==f&&void 0!==f?o+="[^/]*":(o+="(?:[^/]*(?:/|$))*",l++):o+=".*";break;default:o+=n}return u&&~u.indexOf("g")||(o="^"+o+"$"),new RegExp(o,u)}},9558:(e,t,n)=>{"use strict";var i=n(2238).Buffer,o=n(8741).Transform;function r(e){o.call(this),this._block=i.allocUnsafe(e),this._blockSize=e,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}n(9385)(r,o),r.prototype._transform=function(e,t,n){var i=null;try{this.update(e,t)}catch(e){i=e}n(i)},r.prototype._flush=function(e){var t=null;try{this.push(this.digest())}catch(e){t=e}e(t)},r.prototype.update=function(e,t){if(function(e,t){if(!i.isBuffer(e)&&"string"!=typeof e)throw new TypeError("Data must be a string or a buffer")}(e),this._finalized)throw new Error("Digest already called");i.isBuffer(e)||(e=i.from(e,t));for(var n=this._block,o=0;this._blockOffset+e.length-o>=this._blockSize;){for(var r=this._blockOffset;r0;++s)this._length[s]+=a,(a=this._length[s]/4294967296|0)>0&&(this._length[s]-=4294967296*a);return this},r.prototype._update=function(){throw new Error("_update is not implemented")},r.prototype.digest=function(e){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var t=this._digest();void 0!==e&&(t=t.toString(e)),this._block.fill(0),this._blockOffset=0;for(var n=0;n<4;++n)this._length[n]=0;return t},r.prototype._digest=function(){throw new Error("_digest is not implemented")},e.exports=r},3502:(e,t,n)=>{var i=t;i.utils=n(3883),i.common=n(9589),i.sha=n(2992),i.ripemd=n(5171),i.hmac=n(8747),i.sha1=i.sha.sha1,i.sha256=i.sha.sha256,i.sha224=i.sha.sha224,i.sha384=i.sha.sha384,i.sha512=i.sha.sha512,i.ripemd160=i.ripemd.ripemd160},9589:(e,t,n)=>{"use strict";var i=n(3883),o=n(4890);function r(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}t.BlockHash=r,r.prototype.update=function(e,t){if(e=i.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){var n=(e=this.pending).length%this._delta8;this.pending=e.slice(e.length-n,e.length),0===this.pending.length&&(this.pending=null),e=i.join32(e,0,e.length-n,this.endian);for(var o=0;o>>24&255,i[o++]=e>>>16&255,i[o++]=e>>>8&255,i[o++]=255&e}else for(i[o++]=255&e,i[o++]=e>>>8&255,i[o++]=e>>>16&255,i[o++]=e>>>24&255,i[o++]=0,i[o++]=0,i[o++]=0,i[o++]=0,r=8;r{"use strict";var i=n(3883),o=n(4890);function r(e,t,n){if(!(this instanceof r))return new r(e,t,n);this.Hash=e,this.blockSize=e.blockSize/8,this.outSize=e.outSize/8,this.inner=null,this.outer=null,this._init(i.toArray(t,n))}e.exports=r,r.prototype._init=function(e){e.length>this.blockSize&&(e=(new this.Hash).update(e).digest()),o(e.length<=this.blockSize);for(var t=e.length;t{"use strict";var i=n(3883),o=n(9589),r=i.rotl32,s=i.sum32,a=i.sum32_3,u=i.sum32_4,l=o.BlockHash;function c(){if(!(this instanceof c))return new c;l.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}function h(e,t,n,i){return e<=15?t^n^i:e<=31?t&n|~t&i:e<=47?(t|~n)^i:e<=63?t&i|n&~i:t^(n|~i)}function d(e){return e<=15?0:e<=31?1518500249:e<=47?1859775393:e<=63?2400959708:2840853838}function f(e){return e<=15?1352829926:e<=31?1548603684:e<=47?1836072691:e<=63?2053994217:0}i.inherits(c,l),t.ripemd160=c,c.blockSize=512,c.outSize=160,c.hmacStrength=192,c.padLength=64,c.prototype._update=function(e,t){for(var n=this.h[0],i=this.h[1],o=this.h[2],l=this.h[3],c=this.h[4],y=n,b=i,_=o,w=l,M=c,C=0;C<80;C++){var S=s(r(u(n,h(C,i,o,l),e[p[C]+t],d(C)),m[C]),c);n=c,c=l,l=r(o,10),o=i,i=S,S=s(r(u(y,h(79-C,b,_,w),e[g[C]+t],f(C)),v[C]),M),y=M,M=w,w=r(_,10),_=b,b=S}S=a(this.h[1],o,w),this.h[1]=a(this.h[2],l,M),this.h[2]=a(this.h[3],c,y),this.h[3]=a(this.h[4],n,b),this.h[4]=a(this.h[0],i,_),this.h[0]=S},c.prototype._digest=function(e){return"hex"===e?i.toHex32(this.h,"little"):i.split32(this.h,"little")};var p=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],g=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],m=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],v=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]},2992:(e,t,n)=>{"use strict";t.sha1=n(4828),t.sha224=n(1627),t.sha256=n(1746),t.sha384=n(2618),t.sha512=n(491)},4828:(e,t,n)=>{"use strict";var i=n(3883),o=n(9589),r=n(5526),s=i.rotl32,a=i.sum32,u=i.sum32_5,l=r.ft_1,c=o.BlockHash,h=[1518500249,1859775393,2400959708,3395469782];function d(){if(!(this instanceof d))return new d;c.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}i.inherits(d,c),e.exports=d,d.blockSize=512,d.outSize=160,d.hmacStrength=80,d.padLength=64,d.prototype._update=function(e,t){for(var n=this.W,i=0;i<16;i++)n[i]=e[t+i];for(;i{"use strict";var i=n(3883),o=n(1746);function r(){if(!(this instanceof r))return new r;o.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}i.inherits(r,o),e.exports=r,r.blockSize=512,r.outSize=224,r.hmacStrength=192,r.padLength=64,r.prototype._digest=function(e){return"hex"===e?i.toHex32(this.h.slice(0,7),"big"):i.split32(this.h.slice(0,7),"big")}},1746:(e,t,n)=>{"use strict";var i=n(3883),o=n(9589),r=n(5526),s=n(4890),a=i.sum32,u=i.sum32_4,l=i.sum32_5,c=r.ch32,h=r.maj32,d=r.s0_256,f=r.s1_256,p=r.g0_256,g=r.g1_256,m=o.BlockHash,v=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function y(){if(!(this instanceof y))return new y;m.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=v,this.W=new Array(64)}i.inherits(y,m),e.exports=y,y.blockSize=512,y.outSize=256,y.hmacStrength=192,y.padLength=64,y.prototype._update=function(e,t){for(var n=this.W,i=0;i<16;i++)n[i]=e[t+i];for(;i{"use strict";var i=n(3883),o=n(491);function r(){if(!(this instanceof r))return new r;o.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}i.inherits(r,o),e.exports=r,r.blockSize=1024,r.outSize=384,r.hmacStrength=192,r.padLength=128,r.prototype._digest=function(e){return"hex"===e?i.toHex32(this.h.slice(0,12),"big"):i.split32(this.h.slice(0,12),"big")}},491:(e,t,n)=>{"use strict";var i=n(3883),o=n(9589),r=n(4890),s=i.rotr64_hi,a=i.rotr64_lo,u=i.shr64_hi,l=i.shr64_lo,c=i.sum64,h=i.sum64_hi,d=i.sum64_lo,f=i.sum64_4_hi,p=i.sum64_4_lo,g=i.sum64_5_hi,m=i.sum64_5_lo,v=o.BlockHash,y=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function b(){if(!(this instanceof b))return new b;v.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=y,this.W=new Array(160)}function _(e,t,n,i,o){var r=e&n^~e&o;return r<0&&(r+=4294967296),r}function w(e,t,n,i,o,r){var s=t&i^~t&r;return s<0&&(s+=4294967296),s}function M(e,t,n,i,o){var r=e&n^e&o^n&o;return r<0&&(r+=4294967296),r}function C(e,t,n,i,o,r){var s=t&i^t&r^i&r;return s<0&&(s+=4294967296),s}function S(e,t){var n=s(e,t,28)^s(t,e,2)^s(t,e,7);return n<0&&(n+=4294967296),n}function L(e,t){var n=a(e,t,28)^a(t,e,2)^a(t,e,7);return n<0&&(n+=4294967296),n}function I(e,t){var n=a(e,t,14)^a(e,t,18)^a(t,e,9);return n<0&&(n+=4294967296),n}function N(e,t){var n=s(e,t,1)^s(e,t,8)^u(e,t,7);return n<0&&(n+=4294967296),n}function x(e,t){var n=a(e,t,1)^a(e,t,8)^l(e,t,7);return n<0&&(n+=4294967296),n}function D(e,t){var n=a(e,t,19)^a(t,e,29)^l(e,t,6);return n<0&&(n+=4294967296),n}i.inherits(b,v),e.exports=b,b.blockSize=1024,b.outSize=512,b.hmacStrength=192,b.padLength=128,b.prototype._prepareBlock=function(e,t){for(var n=this.W,i=0;i<32;i++)n[i]=e[t+i];for(;i{"use strict";var i=n(3883).rotr32;function o(e,t,n){return e&t^~e&n}function r(e,t,n){return e&t^e&n^t&n}function s(e,t,n){return e^t^n}t.ft_1=function(e,t,n,i){return 0===e?o(t,n,i):1===e||3===e?s(t,n,i):2===e?r(t,n,i):void 0},t.ch32=o,t.maj32=r,t.p32=s,t.s0_256=function(e){return i(e,2)^i(e,13)^i(e,22)},t.s1_256=function(e){return i(e,6)^i(e,11)^i(e,25)},t.g0_256=function(e){return i(e,7)^i(e,18)^e>>>3},t.g1_256=function(e){return i(e,17)^i(e,19)^e>>>10}},3883:(e,t,n)=>{"use strict";var i=n(4890),o=n(9385);function r(e,t){return 55296==(64512&e.charCodeAt(t))&&!(t<0||t+1>=e.length)&&56320==(64512&e.charCodeAt(t+1))}function s(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function a(e){return 1===e.length?"0"+e:e}function u(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e}t.inherits=o,t.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var n=[];if("string"==typeof e)if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),o=0;o>6|192,n[i++]=63&s|128):r(e,o)?(s=65536+((1023&s)<<10)+(1023&e.charCodeAt(++o)),n[i++]=s>>18|240,n[i++]=s>>12&63|128,n[i++]=s>>6&63|128,n[i++]=63&s|128):(n[i++]=s>>12|224,n[i++]=s>>6&63|128,n[i++]=63&s|128)}else for(o=0;o>>0}return s},t.split32=function(e,t){for(var n=new Array(4*e.length),i=0,o=0;i>>24,n[o+1]=r>>>16&255,n[o+2]=r>>>8&255,n[o+3]=255&r):(n[o+3]=r>>>24,n[o+2]=r>>>16&255,n[o+1]=r>>>8&255,n[o]=255&r)}return n},t.rotr32=function(e,t){return e>>>t|e<<32-t},t.rotl32=function(e,t){return e<>>32-t},t.sum32=function(e,t){return e+t>>>0},t.sum32_3=function(e,t,n){return e+t+n>>>0},t.sum32_4=function(e,t,n,i){return e+t+n+i>>>0},t.sum32_5=function(e,t,n,i,o){return e+t+n+i+o>>>0},t.sum64=function(e,t,n,i){var o=e[t],r=i+e[t+1]>>>0,s=(r>>0,e[t+1]=r},t.sum64_hi=function(e,t,n,i){return(t+i>>>0>>0},t.sum64_lo=function(e,t,n,i){return t+i>>>0},t.sum64_4_hi=function(e,t,n,i,o,r,s,a){var u=0,l=t;return u+=(l=l+i>>>0)>>0)>>0)>>0},t.sum64_4_lo=function(e,t,n,i,o,r,s,a){return t+i+r+a>>>0},t.sum64_5_hi=function(e,t,n,i,o,r,s,a,u,l){var c=0,h=t;return c+=(h=h+i>>>0)>>0)>>0)>>0)>>0},t.sum64_5_lo=function(e,t,n,i,o,r,s,a,u,l){return t+i+r+a+l>>>0},t.rotr64_hi=function(e,t,n){return(t<<32-n|e>>>n)>>>0},t.rotr64_lo=function(e,t,n){return(e<<32-n|t>>>n)>>>0},t.shr64_hi=function(e,t,n){return e>>>n},t.shr64_lo=function(e,t,n){return(e<<32-n|t>>>n)>>>0}},4484:(e,t,n)=>{"use strict";var i=n(3502),o=n(3720),r=n(4890);function s(e){if(!(this instanceof s))return new s(e);this.hash=e.hash,this.predResist=!!e.predResist,this.outLen=this.hash.outSize,this.minEntropy=e.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var t=o.toArray(e.entropy,e.entropyEnc||"hex"),n=o.toArray(e.nonce,e.nonceEnc||"hex"),i=o.toArray(e.pers,e.persEnc||"hex");r(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,n,i)}e.exports=s,s.prototype._init=function(e,t,n){var i=e.concat(t).concat(n);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var o=0;o=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(n||[])),this._reseed=1},s.prototype.generate=function(e,t,n,i){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof t&&(i=n,n=t,t=null),n&&(n=o.toArray(n,i||"hex"),this._update(n));for(var r=[];r.length{t.read=function(e,t,n,i,o){var r,s,a=8*o-i-1,u=(1<>1,c=-7,h=n?o-1:0,d=n?-1:1,f=e[t+h];for(h+=d,r=f&(1<<-c)-1,f>>=-c,c+=a;c>0;r=256*r+e[t+h],h+=d,c-=8);for(s=r&(1<<-c)-1,r>>=-c,c+=i;c>0;s=256*s+e[t+h],h+=d,c-=8);if(0===r)r=1-l;else{if(r===u)return s?NaN:1/0*(f?-1:1);s+=Math.pow(2,i),r-=l}return(f?-1:1)*s*Math.pow(2,r-i)},t.write=function(e,t,n,i,o,r){var s,a,u,l=8*r-o-1,c=(1<>1,d=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,f=i?0:r-1,p=i?1:-1,g=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=c):(s=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-s))<1&&(s--,u*=2),(t+=s+h>=1?d/u:d*Math.pow(2,1-h))*u>=2&&(s++,u/=2),s+h>=c?(a=0,s=c):s+h>=1?(a=(t*u-1)*Math.pow(2,o),s+=h):(a=t*Math.pow(2,h-1)*Math.pow(2,o),s=0));o>=8;e[n+f]=255&a,f+=p,a/=256,o-=8);for(s=s<0;e[n+f]=255&s,f+=p,s/=256,l-=8);e[n+f-p]|=128*g}},9385:e=>{"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},7045:e=>{var t={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==t.call(e)}},9781:(e,t,n)=>{"use strict";var i=n(9385),o=n(9558),r=n(2238).Buffer,s=new Array(16);function a(){o.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}function u(e,t){return e<>>32-t}function l(e,t,n,i,o,r,s){return u(e+(t&n|~t&i)+o+r|0,s)+t|0}function c(e,t,n,i,o,r,s){return u(e+(t&i|n&~i)+o+r|0,s)+t|0}function h(e,t,n,i,o,r,s){return u(e+(t^n^i)+o+r|0,s)+t|0}function d(e,t,n,i,o,r,s){return u(e+(n^(t|~i))+o+r|0,s)+t|0}i(a,o),a.prototype._update=function(){for(var e=s,t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t);var n=this._a,i=this._b,o=this._c,r=this._d;n=l(n,i,o,r,e[0],3614090360,7),r=l(r,n,i,o,e[1],3905402710,12),o=l(o,r,n,i,e[2],606105819,17),i=l(i,o,r,n,e[3],3250441966,22),n=l(n,i,o,r,e[4],4118548399,7),r=l(r,n,i,o,e[5],1200080426,12),o=l(o,r,n,i,e[6],2821735955,17),i=l(i,o,r,n,e[7],4249261313,22),n=l(n,i,o,r,e[8],1770035416,7),r=l(r,n,i,o,e[9],2336552879,12),o=l(o,r,n,i,e[10],4294925233,17),i=l(i,o,r,n,e[11],2304563134,22),n=l(n,i,o,r,e[12],1804603682,7),r=l(r,n,i,o,e[13],4254626195,12),o=l(o,r,n,i,e[14],2792965006,17),n=c(n,i=l(i,o,r,n,e[15],1236535329,22),o,r,e[1],4129170786,5),r=c(r,n,i,o,e[6],3225465664,9),o=c(o,r,n,i,e[11],643717713,14),i=c(i,o,r,n,e[0],3921069994,20),n=c(n,i,o,r,e[5],3593408605,5),r=c(r,n,i,o,e[10],38016083,9),o=c(o,r,n,i,e[15],3634488961,14),i=c(i,o,r,n,e[4],3889429448,20),n=c(n,i,o,r,e[9],568446438,5),r=c(r,n,i,o,e[14],3275163606,9),o=c(o,r,n,i,e[3],4107603335,14),i=c(i,o,r,n,e[8],1163531501,20),n=c(n,i,o,r,e[13],2850285829,5),r=c(r,n,i,o,e[2],4243563512,9),o=c(o,r,n,i,e[7],1735328473,14),n=h(n,i=c(i,o,r,n,e[12],2368359562,20),o,r,e[5],4294588738,4),r=h(r,n,i,o,e[8],2272392833,11),o=h(o,r,n,i,e[11],1839030562,16),i=h(i,o,r,n,e[14],4259657740,23),n=h(n,i,o,r,e[1],2763975236,4),r=h(r,n,i,o,e[4],1272893353,11),o=h(o,r,n,i,e[7],4139469664,16),i=h(i,o,r,n,e[10],3200236656,23),n=h(n,i,o,r,e[13],681279174,4),r=h(r,n,i,o,e[0],3936430074,11),o=h(o,r,n,i,e[3],3572445317,16),i=h(i,o,r,n,e[6],76029189,23),n=h(n,i,o,r,e[9],3654602809,4),r=h(r,n,i,o,e[12],3873151461,11),o=h(o,r,n,i,e[15],530742520,16),n=d(n,i=h(i,o,r,n,e[2],3299628645,23),o,r,e[0],4096336452,6),r=d(r,n,i,o,e[7],1126891415,10),o=d(o,r,n,i,e[14],2878612391,15),i=d(i,o,r,n,e[5],4237533241,21),n=d(n,i,o,r,e[12],1700485571,6),r=d(r,n,i,o,e[3],2399980690,10),o=d(o,r,n,i,e[10],4293915773,15),i=d(i,o,r,n,e[1],2240044497,21),n=d(n,i,o,r,e[8],1873313359,6),r=d(r,n,i,o,e[15],4264355552,10),o=d(o,r,n,i,e[6],2734768916,15),i=d(i,o,r,n,e[13],1309151649,21),n=d(n,i,o,r,e[4],4149444226,6),r=d(r,n,i,o,e[11],3174756917,10),o=d(o,r,n,i,e[2],718787259,15),i=d(i,o,r,n,e[9],3951481745,21),this._a=this._a+n|0,this._b=this._b+i|0,this._c=this._c+o|0,this._d=this._d+r|0},a.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var e=r.allocUnsafe(16);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e},e.exports=a},3587:(e,t,n)=>{var i=n(7735),o=n(4366);function r(e){this.rand=e||new o.Rand}e.exports=r,r.create=function(e){return new r(e)},r.prototype._randbelow=function(e){var t=e.bitLength(),n=Math.ceil(t/8);do{var o=new i(this.rand.generate(n))}while(o.cmp(e)>=0);return o},r.prototype._randrange=function(e,t){var n=t.sub(e);return e.add(this._randbelow(n))},r.prototype.test=function(e,t,n){var o=e.bitLength(),r=i.mont(e),s=new i(1).toRed(r);t||(t=Math.max(1,o/48|0));for(var a=e.subn(1),u=0;!a.testn(u);u++);for(var l=e.shrn(u),c=a.toRed(r);t>0;t--){var h=this._randrange(new i(2),a);n&&n(h);var d=h.toRed(r).redPow(l);if(0!==d.cmp(s)&&0!==d.cmp(c)){for(var f=1;f0;t--){var c=this._randrange(new i(2),s),h=e.gcd(c);if(0!==h.cmpn(1))return h;var d=c.toRed(o).redPow(u);if(0!==d.cmp(r)&&0!==d.cmp(l)){for(var f=1;f=65&&n<=70?n-55:n>=97&&n<=102?n-87:n-48&15}function u(e,t,n){var i=a(e,n);return n-1>=t&&(i|=a(e,n-1)<<4),i}function l(e,t,n,i){for(var o=0,r=Math.min(e.length,n),s=t;s=49?a-49+10:a>=17?a-17+10:a}return o}r.isBN=function(e){return e instanceof r||null!==e&&"object"==typeof e&&e.constructor.wordSize===r.wordSize&&Array.isArray(e.words)},r.max=function(e,t){return e.cmp(t)>0?e:t},r.min=function(e,t){return e.cmp(t)<0?e:t},r.prototype._init=function(e,t,n){if("number"==typeof e)return this._initNumber(e,t,n);if("object"==typeof e)return this._initArray(e,t,n);"hex"===t&&(t=16),i(t===(0|t)&&t>=2&&t<=36);var o=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(o++,this.negative=1),o=0;o-=3)s=e[o]|e[o-1]<<8|e[o-2]<<16,this.words[r]|=s<>>26-a&67108863,(a+=24)>=26&&(a-=26,r++);else if("le"===n)for(o=0,r=0;o>>26-a&67108863,(a+=24)>=26&&(a-=26,r++);return this.strip()},r.prototype._parseHex=function(e,t,n){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var i=0;i=t;i-=2)o=u(e,t,i)<=18?(r-=18,s+=1,this.words[s]|=o>>>26):r+=8;else for(i=(e.length-t)%2==0?t+1:t;i=18?(r-=18,s+=1,this.words[s]|=o>>>26):r+=8;this.strip()},r.prototype._parseBase=function(e,t,n){this.words=[0],this.length=1;for(var i=0,o=1;o<=67108863;o*=t)i++;i--,o=o/t|0;for(var r=e.length-n,s=r%i,a=Math.min(r,r-s)+n,u=0,c=n;c1&&0===this.words[this.length-1];)this.length--;return this._normSign()},r.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},r.prototype.inspect=function(){return(this.red?""};var c=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],h=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],d=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function f(e,t,n){n.negative=t.negative^e.negative;var i=e.length+t.length|0;n.length=i,i=i-1|0;var o=0|e.words[0],r=0|t.words[0],s=o*r,a=67108863&s,u=s/67108864|0;n.words[0]=a;for(var l=1;l>>26,h=67108863&u,d=Math.min(l,t.length-1),f=Math.max(0,l-e.length+1);f<=d;f++){var p=l-f|0;c+=(s=(o=0|e.words[p])*(r=0|t.words[f])+h)/67108864|0,h=67108863&s}n.words[l]=0|h,u=0|c}return 0!==u?n.words[l]=0|u:n.length--,n.strip()}r.prototype.toString=function(e,t){var n;if(t=0|t||1,16===(e=e||10)||"hex"===e){n="";for(var o=0,r=0,s=0;s>>24-o&16777215)||s!==this.length-1?c[6-u.length]+u+n:u+n,(o+=2)>=26&&(o-=26,s--)}for(0!==r&&(n=r.toString(16)+n);n.length%t!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(e===(0|e)&&e>=2&&e<=36){var l=h[e],f=d[e];n="";var p=this.clone();for(p.negative=0;!p.isZero();){var g=p.modn(f).toString(e);n=(p=p.idivn(f)).isZero()?g+n:c[l-g.length]+g+n}for(this.isZero()&&(n="0"+n);n.length%t!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}i(!1,"Base should be between 2 and 36")},r.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&i(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},r.prototype.toJSON=function(){return this.toString(16)},r.prototype.toBuffer=function(e,t){return i(void 0!==s),this.toArrayLike(s,e,t)},r.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},r.prototype.toArrayLike=function(e,t,n){var o=this.byteLength(),r=n||Math.max(1,o);i(o<=r,"byte array longer than desired length"),i(r>0,"Requested array length <= 0"),this.strip();var s,a,u="le"===t,l=new e(r),c=this.clone();if(u){for(a=0;!c.isZero();a++)s=c.andln(255),c.iushrn(8),l[a]=s;for(;a=4096&&(n+=13,t>>>=13),t>=64&&(n+=7,t>>>=7),t>=8&&(n+=4,t>>>=4),t>=2&&(n+=2,t>>>=2),n+t},r.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,n=0;return 8191&t||(n+=13,t>>>=13),127&t||(n+=7,t>>>=7),15&t||(n+=4,t>>>=4),3&t||(n+=2,t>>>=2),1&t||n++,n},r.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},r.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},r.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},r.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var n=0;ne.length?this.clone().iand(e):e.clone().iand(this)},r.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},r.prototype.iuxor=function(e){var t,n;this.length>e.length?(t=this,n=e):(t=e,n=this);for(var i=0;ie.length?this.clone().ixor(e):e.clone().ixor(this)},r.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},r.prototype.inotn=function(e){i("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),n=e%26;this._expand(t),n>0&&t--;for(var o=0;o0&&(this.words[o]=~this.words[o]&67108863>>26-n),this.strip()},r.prototype.notn=function(e){return this.clone().inotn(e)},r.prototype.setn=function(e,t){i("number"==typeof e&&e>=0);var n=e/26|0,o=e%26;return this._expand(n+1),this.words[n]=t?this.words[n]|1<e.length?(n=this,i=e):(n=e,i=this);for(var o=0,r=0;r>>26;for(;0!==o&&r>>26;if(this.length=n.length,0!==o)this.words[this.length]=o,this.length++;else if(n!==this)for(;re.length?this.clone().iadd(e):e.clone().iadd(this)},r.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var n,i,o=this.cmp(e);if(0===o)return this.negative=0,this.length=1,this.words[0]=0,this;o>0?(n=this,i=e):(n=e,i=this);for(var r=0,s=0;s>26,this.words[s]=67108863&t;for(;0!==r&&s>26,this.words[s]=67108863&t;if(0===r&&s>>13,f=0|s[1],p=8191&f,g=f>>>13,m=0|s[2],v=8191&m,y=m>>>13,b=0|s[3],_=8191&b,w=b>>>13,M=0|s[4],C=8191&M,S=M>>>13,L=0|s[5],I=8191&L,N=L>>>13,x=0|s[6],D=8191&x,k=x>>>13,T=0|s[7],E=8191&T,A=T>>>13,j=0|s[8],O=8191&j,R=j>>>13,P=0|s[9],z=8191&P,W=P>>>13,F=0|a[0],B=8191&F,H=F>>>13,V=0|a[1],U=8191&V,Y=V>>>13,Z=0|a[2],G=8191&Z,Q=Z>>>13,q=0|a[3],K=8191&q,J=q>>>13,X=0|a[4],$=8191&X,ee=X>>>13,te=0|a[5],ne=8191&te,ie=te>>>13,oe=0|a[6],re=8191&oe,se=oe>>>13,ae=0|a[7],ue=8191&ae,le=ae>>>13,ce=0|a[8],he=8191&ce,de=ce>>>13,fe=0|a[9],pe=8191&fe,ge=fe>>>13;n.negative=e.negative^t.negative,n.length=19;var me=(l+(i=Math.imul(h,B))|0)+((8191&(o=(o=Math.imul(h,H))+Math.imul(d,B)|0))<<13)|0;l=((r=Math.imul(d,H))+(o>>>13)|0)+(me>>>26)|0,me&=67108863,i=Math.imul(p,B),o=(o=Math.imul(p,H))+Math.imul(g,B)|0,r=Math.imul(g,H);var ve=(l+(i=i+Math.imul(h,U)|0)|0)+((8191&(o=(o=o+Math.imul(h,Y)|0)+Math.imul(d,U)|0))<<13)|0;l=((r=r+Math.imul(d,Y)|0)+(o>>>13)|0)+(ve>>>26)|0,ve&=67108863,i=Math.imul(v,B),o=(o=Math.imul(v,H))+Math.imul(y,B)|0,r=Math.imul(y,H),i=i+Math.imul(p,U)|0,o=(o=o+Math.imul(p,Y)|0)+Math.imul(g,U)|0,r=r+Math.imul(g,Y)|0;var ye=(l+(i=i+Math.imul(h,G)|0)|0)+((8191&(o=(o=o+Math.imul(h,Q)|0)+Math.imul(d,G)|0))<<13)|0;l=((r=r+Math.imul(d,Q)|0)+(o>>>13)|0)+(ye>>>26)|0,ye&=67108863,i=Math.imul(_,B),o=(o=Math.imul(_,H))+Math.imul(w,B)|0,r=Math.imul(w,H),i=i+Math.imul(v,U)|0,o=(o=o+Math.imul(v,Y)|0)+Math.imul(y,U)|0,r=r+Math.imul(y,Y)|0,i=i+Math.imul(p,G)|0,o=(o=o+Math.imul(p,Q)|0)+Math.imul(g,G)|0,r=r+Math.imul(g,Q)|0;var be=(l+(i=i+Math.imul(h,K)|0)|0)+((8191&(o=(o=o+Math.imul(h,J)|0)+Math.imul(d,K)|0))<<13)|0;l=((r=r+Math.imul(d,J)|0)+(o>>>13)|0)+(be>>>26)|0,be&=67108863,i=Math.imul(C,B),o=(o=Math.imul(C,H))+Math.imul(S,B)|0,r=Math.imul(S,H),i=i+Math.imul(_,U)|0,o=(o=o+Math.imul(_,Y)|0)+Math.imul(w,U)|0,r=r+Math.imul(w,Y)|0,i=i+Math.imul(v,G)|0,o=(o=o+Math.imul(v,Q)|0)+Math.imul(y,G)|0,r=r+Math.imul(y,Q)|0,i=i+Math.imul(p,K)|0,o=(o=o+Math.imul(p,J)|0)+Math.imul(g,K)|0,r=r+Math.imul(g,J)|0;var _e=(l+(i=i+Math.imul(h,$)|0)|0)+((8191&(o=(o=o+Math.imul(h,ee)|0)+Math.imul(d,$)|0))<<13)|0;l=((r=r+Math.imul(d,ee)|0)+(o>>>13)|0)+(_e>>>26)|0,_e&=67108863,i=Math.imul(I,B),o=(o=Math.imul(I,H))+Math.imul(N,B)|0,r=Math.imul(N,H),i=i+Math.imul(C,U)|0,o=(o=o+Math.imul(C,Y)|0)+Math.imul(S,U)|0,r=r+Math.imul(S,Y)|0,i=i+Math.imul(_,G)|0,o=(o=o+Math.imul(_,Q)|0)+Math.imul(w,G)|0,r=r+Math.imul(w,Q)|0,i=i+Math.imul(v,K)|0,o=(o=o+Math.imul(v,J)|0)+Math.imul(y,K)|0,r=r+Math.imul(y,J)|0,i=i+Math.imul(p,$)|0,o=(o=o+Math.imul(p,ee)|0)+Math.imul(g,$)|0,r=r+Math.imul(g,ee)|0;var we=(l+(i=i+Math.imul(h,ne)|0)|0)+((8191&(o=(o=o+Math.imul(h,ie)|0)+Math.imul(d,ne)|0))<<13)|0;l=((r=r+Math.imul(d,ie)|0)+(o>>>13)|0)+(we>>>26)|0,we&=67108863,i=Math.imul(D,B),o=(o=Math.imul(D,H))+Math.imul(k,B)|0,r=Math.imul(k,H),i=i+Math.imul(I,U)|0,o=(o=o+Math.imul(I,Y)|0)+Math.imul(N,U)|0,r=r+Math.imul(N,Y)|0,i=i+Math.imul(C,G)|0,o=(o=o+Math.imul(C,Q)|0)+Math.imul(S,G)|0,r=r+Math.imul(S,Q)|0,i=i+Math.imul(_,K)|0,o=(o=o+Math.imul(_,J)|0)+Math.imul(w,K)|0,r=r+Math.imul(w,J)|0,i=i+Math.imul(v,$)|0,o=(o=o+Math.imul(v,ee)|0)+Math.imul(y,$)|0,r=r+Math.imul(y,ee)|0,i=i+Math.imul(p,ne)|0,o=(o=o+Math.imul(p,ie)|0)+Math.imul(g,ne)|0,r=r+Math.imul(g,ie)|0;var Me=(l+(i=i+Math.imul(h,re)|0)|0)+((8191&(o=(o=o+Math.imul(h,se)|0)+Math.imul(d,re)|0))<<13)|0;l=((r=r+Math.imul(d,se)|0)+(o>>>13)|0)+(Me>>>26)|0,Me&=67108863,i=Math.imul(E,B),o=(o=Math.imul(E,H))+Math.imul(A,B)|0,r=Math.imul(A,H),i=i+Math.imul(D,U)|0,o=(o=o+Math.imul(D,Y)|0)+Math.imul(k,U)|0,r=r+Math.imul(k,Y)|0,i=i+Math.imul(I,G)|0,o=(o=o+Math.imul(I,Q)|0)+Math.imul(N,G)|0,r=r+Math.imul(N,Q)|0,i=i+Math.imul(C,K)|0,o=(o=o+Math.imul(C,J)|0)+Math.imul(S,K)|0,r=r+Math.imul(S,J)|0,i=i+Math.imul(_,$)|0,o=(o=o+Math.imul(_,ee)|0)+Math.imul(w,$)|0,r=r+Math.imul(w,ee)|0,i=i+Math.imul(v,ne)|0,o=(o=o+Math.imul(v,ie)|0)+Math.imul(y,ne)|0,r=r+Math.imul(y,ie)|0,i=i+Math.imul(p,re)|0,o=(o=o+Math.imul(p,se)|0)+Math.imul(g,re)|0,r=r+Math.imul(g,se)|0;var Ce=(l+(i=i+Math.imul(h,ue)|0)|0)+((8191&(o=(o=o+Math.imul(h,le)|0)+Math.imul(d,ue)|0))<<13)|0;l=((r=r+Math.imul(d,le)|0)+(o>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,i=Math.imul(O,B),o=(o=Math.imul(O,H))+Math.imul(R,B)|0,r=Math.imul(R,H),i=i+Math.imul(E,U)|0,o=(o=o+Math.imul(E,Y)|0)+Math.imul(A,U)|0,r=r+Math.imul(A,Y)|0,i=i+Math.imul(D,G)|0,o=(o=o+Math.imul(D,Q)|0)+Math.imul(k,G)|0,r=r+Math.imul(k,Q)|0,i=i+Math.imul(I,K)|0,o=(o=o+Math.imul(I,J)|0)+Math.imul(N,K)|0,r=r+Math.imul(N,J)|0,i=i+Math.imul(C,$)|0,o=(o=o+Math.imul(C,ee)|0)+Math.imul(S,$)|0,r=r+Math.imul(S,ee)|0,i=i+Math.imul(_,ne)|0,o=(o=o+Math.imul(_,ie)|0)+Math.imul(w,ne)|0,r=r+Math.imul(w,ie)|0,i=i+Math.imul(v,re)|0,o=(o=o+Math.imul(v,se)|0)+Math.imul(y,re)|0,r=r+Math.imul(y,se)|0,i=i+Math.imul(p,ue)|0,o=(o=o+Math.imul(p,le)|0)+Math.imul(g,ue)|0,r=r+Math.imul(g,le)|0;var Se=(l+(i=i+Math.imul(h,he)|0)|0)+((8191&(o=(o=o+Math.imul(h,de)|0)+Math.imul(d,he)|0))<<13)|0;l=((r=r+Math.imul(d,de)|0)+(o>>>13)|0)+(Se>>>26)|0,Se&=67108863,i=Math.imul(z,B),o=(o=Math.imul(z,H))+Math.imul(W,B)|0,r=Math.imul(W,H),i=i+Math.imul(O,U)|0,o=(o=o+Math.imul(O,Y)|0)+Math.imul(R,U)|0,r=r+Math.imul(R,Y)|0,i=i+Math.imul(E,G)|0,o=(o=o+Math.imul(E,Q)|0)+Math.imul(A,G)|0,r=r+Math.imul(A,Q)|0,i=i+Math.imul(D,K)|0,o=(o=o+Math.imul(D,J)|0)+Math.imul(k,K)|0,r=r+Math.imul(k,J)|0,i=i+Math.imul(I,$)|0,o=(o=o+Math.imul(I,ee)|0)+Math.imul(N,$)|0,r=r+Math.imul(N,ee)|0,i=i+Math.imul(C,ne)|0,o=(o=o+Math.imul(C,ie)|0)+Math.imul(S,ne)|0,r=r+Math.imul(S,ie)|0,i=i+Math.imul(_,re)|0,o=(o=o+Math.imul(_,se)|0)+Math.imul(w,re)|0,r=r+Math.imul(w,se)|0,i=i+Math.imul(v,ue)|0,o=(o=o+Math.imul(v,le)|0)+Math.imul(y,ue)|0,r=r+Math.imul(y,le)|0,i=i+Math.imul(p,he)|0,o=(o=o+Math.imul(p,de)|0)+Math.imul(g,he)|0,r=r+Math.imul(g,de)|0;var Le=(l+(i=i+Math.imul(h,pe)|0)|0)+((8191&(o=(o=o+Math.imul(h,ge)|0)+Math.imul(d,pe)|0))<<13)|0;l=((r=r+Math.imul(d,ge)|0)+(o>>>13)|0)+(Le>>>26)|0,Le&=67108863,i=Math.imul(z,U),o=(o=Math.imul(z,Y))+Math.imul(W,U)|0,r=Math.imul(W,Y),i=i+Math.imul(O,G)|0,o=(o=o+Math.imul(O,Q)|0)+Math.imul(R,G)|0,r=r+Math.imul(R,Q)|0,i=i+Math.imul(E,K)|0,o=(o=o+Math.imul(E,J)|0)+Math.imul(A,K)|0,r=r+Math.imul(A,J)|0,i=i+Math.imul(D,$)|0,o=(o=o+Math.imul(D,ee)|0)+Math.imul(k,$)|0,r=r+Math.imul(k,ee)|0,i=i+Math.imul(I,ne)|0,o=(o=o+Math.imul(I,ie)|0)+Math.imul(N,ne)|0,r=r+Math.imul(N,ie)|0,i=i+Math.imul(C,re)|0,o=(o=o+Math.imul(C,se)|0)+Math.imul(S,re)|0,r=r+Math.imul(S,se)|0,i=i+Math.imul(_,ue)|0,o=(o=o+Math.imul(_,le)|0)+Math.imul(w,ue)|0,r=r+Math.imul(w,le)|0,i=i+Math.imul(v,he)|0,o=(o=o+Math.imul(v,de)|0)+Math.imul(y,he)|0,r=r+Math.imul(y,de)|0;var Ie=(l+(i=i+Math.imul(p,pe)|0)|0)+((8191&(o=(o=o+Math.imul(p,ge)|0)+Math.imul(g,pe)|0))<<13)|0;l=((r=r+Math.imul(g,ge)|0)+(o>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,i=Math.imul(z,G),o=(o=Math.imul(z,Q))+Math.imul(W,G)|0,r=Math.imul(W,Q),i=i+Math.imul(O,K)|0,o=(o=o+Math.imul(O,J)|0)+Math.imul(R,K)|0,r=r+Math.imul(R,J)|0,i=i+Math.imul(E,$)|0,o=(o=o+Math.imul(E,ee)|0)+Math.imul(A,$)|0,r=r+Math.imul(A,ee)|0,i=i+Math.imul(D,ne)|0,o=(o=o+Math.imul(D,ie)|0)+Math.imul(k,ne)|0,r=r+Math.imul(k,ie)|0,i=i+Math.imul(I,re)|0,o=(o=o+Math.imul(I,se)|0)+Math.imul(N,re)|0,r=r+Math.imul(N,se)|0,i=i+Math.imul(C,ue)|0,o=(o=o+Math.imul(C,le)|0)+Math.imul(S,ue)|0,r=r+Math.imul(S,le)|0,i=i+Math.imul(_,he)|0,o=(o=o+Math.imul(_,de)|0)+Math.imul(w,he)|0,r=r+Math.imul(w,de)|0;var Ne=(l+(i=i+Math.imul(v,pe)|0)|0)+((8191&(o=(o=o+Math.imul(v,ge)|0)+Math.imul(y,pe)|0))<<13)|0;l=((r=r+Math.imul(y,ge)|0)+(o>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,i=Math.imul(z,K),o=(o=Math.imul(z,J))+Math.imul(W,K)|0,r=Math.imul(W,J),i=i+Math.imul(O,$)|0,o=(o=o+Math.imul(O,ee)|0)+Math.imul(R,$)|0,r=r+Math.imul(R,ee)|0,i=i+Math.imul(E,ne)|0,o=(o=o+Math.imul(E,ie)|0)+Math.imul(A,ne)|0,r=r+Math.imul(A,ie)|0,i=i+Math.imul(D,re)|0,o=(o=o+Math.imul(D,se)|0)+Math.imul(k,re)|0,r=r+Math.imul(k,se)|0,i=i+Math.imul(I,ue)|0,o=(o=o+Math.imul(I,le)|0)+Math.imul(N,ue)|0,r=r+Math.imul(N,le)|0,i=i+Math.imul(C,he)|0,o=(o=o+Math.imul(C,de)|0)+Math.imul(S,he)|0,r=r+Math.imul(S,de)|0;var xe=(l+(i=i+Math.imul(_,pe)|0)|0)+((8191&(o=(o=o+Math.imul(_,ge)|0)+Math.imul(w,pe)|0))<<13)|0;l=((r=r+Math.imul(w,ge)|0)+(o>>>13)|0)+(xe>>>26)|0,xe&=67108863,i=Math.imul(z,$),o=(o=Math.imul(z,ee))+Math.imul(W,$)|0,r=Math.imul(W,ee),i=i+Math.imul(O,ne)|0,o=(o=o+Math.imul(O,ie)|0)+Math.imul(R,ne)|0,r=r+Math.imul(R,ie)|0,i=i+Math.imul(E,re)|0,o=(o=o+Math.imul(E,se)|0)+Math.imul(A,re)|0,r=r+Math.imul(A,se)|0,i=i+Math.imul(D,ue)|0,o=(o=o+Math.imul(D,le)|0)+Math.imul(k,ue)|0,r=r+Math.imul(k,le)|0,i=i+Math.imul(I,he)|0,o=(o=o+Math.imul(I,de)|0)+Math.imul(N,he)|0,r=r+Math.imul(N,de)|0;var De=(l+(i=i+Math.imul(C,pe)|0)|0)+((8191&(o=(o=o+Math.imul(C,ge)|0)+Math.imul(S,pe)|0))<<13)|0;l=((r=r+Math.imul(S,ge)|0)+(o>>>13)|0)+(De>>>26)|0,De&=67108863,i=Math.imul(z,ne),o=(o=Math.imul(z,ie))+Math.imul(W,ne)|0,r=Math.imul(W,ie),i=i+Math.imul(O,re)|0,o=(o=o+Math.imul(O,se)|0)+Math.imul(R,re)|0,r=r+Math.imul(R,se)|0,i=i+Math.imul(E,ue)|0,o=(o=o+Math.imul(E,le)|0)+Math.imul(A,ue)|0,r=r+Math.imul(A,le)|0,i=i+Math.imul(D,he)|0,o=(o=o+Math.imul(D,de)|0)+Math.imul(k,he)|0,r=r+Math.imul(k,de)|0;var ke=(l+(i=i+Math.imul(I,pe)|0)|0)+((8191&(o=(o=o+Math.imul(I,ge)|0)+Math.imul(N,pe)|0))<<13)|0;l=((r=r+Math.imul(N,ge)|0)+(o>>>13)|0)+(ke>>>26)|0,ke&=67108863,i=Math.imul(z,re),o=(o=Math.imul(z,se))+Math.imul(W,re)|0,r=Math.imul(W,se),i=i+Math.imul(O,ue)|0,o=(o=o+Math.imul(O,le)|0)+Math.imul(R,ue)|0,r=r+Math.imul(R,le)|0,i=i+Math.imul(E,he)|0,o=(o=o+Math.imul(E,de)|0)+Math.imul(A,he)|0,r=r+Math.imul(A,de)|0;var Te=(l+(i=i+Math.imul(D,pe)|0)|0)+((8191&(o=(o=o+Math.imul(D,ge)|0)+Math.imul(k,pe)|0))<<13)|0;l=((r=r+Math.imul(k,ge)|0)+(o>>>13)|0)+(Te>>>26)|0,Te&=67108863,i=Math.imul(z,ue),o=(o=Math.imul(z,le))+Math.imul(W,ue)|0,r=Math.imul(W,le),i=i+Math.imul(O,he)|0,o=(o=o+Math.imul(O,de)|0)+Math.imul(R,he)|0,r=r+Math.imul(R,de)|0;var Ee=(l+(i=i+Math.imul(E,pe)|0)|0)+((8191&(o=(o=o+Math.imul(E,ge)|0)+Math.imul(A,pe)|0))<<13)|0;l=((r=r+Math.imul(A,ge)|0)+(o>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,i=Math.imul(z,he),o=(o=Math.imul(z,de))+Math.imul(W,he)|0,r=Math.imul(W,de);var Ae=(l+(i=i+Math.imul(O,pe)|0)|0)+((8191&(o=(o=o+Math.imul(O,ge)|0)+Math.imul(R,pe)|0))<<13)|0;l=((r=r+Math.imul(R,ge)|0)+(o>>>13)|0)+(Ae>>>26)|0,Ae&=67108863;var je=(l+(i=Math.imul(z,pe))|0)+((8191&(o=(o=Math.imul(z,ge))+Math.imul(W,pe)|0))<<13)|0;return l=((r=Math.imul(W,ge))+(o>>>13)|0)+(je>>>26)|0,je&=67108863,u[0]=me,u[1]=ve,u[2]=ye,u[3]=be,u[4]=_e,u[5]=we,u[6]=Me,u[7]=Ce,u[8]=Se,u[9]=Le,u[10]=Ie,u[11]=Ne,u[12]=xe,u[13]=De,u[14]=ke,u[15]=Te,u[16]=Ee,u[17]=Ae,u[18]=je,0!==l&&(u[19]=l,n.length++),n};function g(e,t,n){return(new m).mulp(e,t,n)}function m(e,t){this.x=e,this.y=t}Math.imul||(p=f),r.prototype.mulTo=function(e,t){var n,i=this.length+e.length;return n=10===this.length&&10===e.length?p(this,e,t):i<63?f(this,e,t):i<1024?function(e,t,n){n.negative=t.negative^e.negative,n.length=e.length+t.length;for(var i=0,o=0,r=0;r>>26)|0)>>>26,s&=67108863}n.words[r]=a,i=s,s=o}return 0!==i?n.words[r]=i:n.length--,n.strip()}(this,e,t):g(this,e,t),n},m.prototype.makeRBT=function(e){for(var t=new Array(e),n=r.prototype._countBits(e)-1,i=0;i>=1;return i},m.prototype.permute=function(e,t,n,i,o,r){for(var s=0;s>>=1)o++;return 1<>>=13,n[2*s+1]=8191&r,r>>>=13;for(s=2*t;s>=26,t+=o/67108864|0,t+=r>>>26,this.words[n]=67108863&r}return 0!==t&&(this.words[n]=t,this.length++),this},r.prototype.muln=function(e){return this.clone().imuln(e)},r.prototype.sqr=function(){return this.mul(this)},r.prototype.isqr=function(){return this.imul(this.clone())},r.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),n=0;n>>o}return t}(e);if(0===t.length)return new r(1);for(var n=this,i=0;i=0);var t,n=e%26,o=(e-n)/26,r=67108863>>>26-n<<26-n;if(0!==n){var s=0;for(t=0;t>>26-n}s&&(this.words[t]=s,this.length++)}if(0!==o){for(t=this.length-1;t>=0;t--)this.words[t+o]=this.words[t];for(t=0;t=0),o=t?(t-t%26)/26:0;var r=e%26,s=Math.min((e-r)/26,this.length),a=67108863^67108863>>>r<s)for(this.length-=s,l=0;l=0&&(0!==c||l>=o);l--){var h=0|this.words[l];this.words[l]=c<<26-r|h>>>r,c=h&a}return u&&0!==c&&(u.words[u.length++]=c),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},r.prototype.ishrn=function(e,t,n){return i(0===this.negative),this.iushrn(e,t,n)},r.prototype.shln=function(e){return this.clone().ishln(e)},r.prototype.ushln=function(e){return this.clone().iushln(e)},r.prototype.shrn=function(e){return this.clone().ishrn(e)},r.prototype.ushrn=function(e){return this.clone().iushrn(e)},r.prototype.testn=function(e){i("number"==typeof e&&e>=0);var t=e%26,n=(e-t)/26,o=1<=0);var t=e%26,n=(e-t)/26;if(i(0===this.negative,"imaskn works only with positive numbers"),this.length<=n)return this;if(0!==t&&n++,this.length=Math.min(n,this.length),0!==t){var o=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},r.prototype.isubn=function(e){if(i("number"==typeof e),i(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(u/67108864|0),this.words[o+n]=67108863&r}for(;o>26,this.words[o+n]=67108863&r;if(0===a)return this.strip();for(i(-1===a),a=0,o=0;o>26,this.words[o]=67108863&r;return this.negative=1,this.strip()},r.prototype._wordDiv=function(e,t){var n=(this.length,e.length),i=this.clone(),o=e,s=0|o.words[o.length-1];0!=(n=26-this._countBits(s))&&(o=o.ushln(n),i.iushln(n),s=0|o.words[o.length-1]);var a,u=i.length-o.length;if("mod"!==t){(a=new r(null)).length=u+1,a.words=new Array(a.length);for(var l=0;l=0;h--){var d=67108864*(0|i.words[o.length+h])+(0|i.words[o.length+h-1]);for(d=Math.min(d/s|0,67108863),i._ishlnsubmul(o,d,h);0!==i.negative;)d--,i.negative=0,i._ishlnsubmul(o,1,h),i.isZero()||(i.negative^=1);a&&(a.words[h]=d)}return a&&a.strip(),i.strip(),"div"!==t&&0!==n&&i.iushrn(n),{div:a||null,mod:i}},r.prototype.divmod=function(e,t,n){return i(!e.isZero()),this.isZero()?{div:new r(0),mod:new r(0)}:0!==this.negative&&0===e.negative?(a=this.neg().divmod(e,t),"mod"!==t&&(o=a.div.neg()),"div"!==t&&(s=a.mod.neg(),n&&0!==s.negative&&s.iadd(e)),{div:o,mod:s}):0===this.negative&&0!==e.negative?(a=this.divmod(e.neg(),t),"mod"!==t&&(o=a.div.neg()),{div:o,mod:a.mod}):this.negative&e.negative?(a=this.neg().divmod(e.neg(),t),"div"!==t&&(s=a.mod.neg(),n&&0!==s.negative&&s.isub(e)),{div:a.div,mod:s}):e.length>this.length||this.cmp(e)<0?{div:new r(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new r(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new r(this.modn(e.words[0]))}:this._wordDiv(e,t);var o,s,a},r.prototype.div=function(e){return this.divmod(e,"div",!1).div},r.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},r.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},r.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var n=0!==t.div.negative?t.mod.isub(e):t.mod,i=e.ushrn(1),o=e.andln(1),r=n.cmp(i);return r<0||1===o&&0===r?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},r.prototype.modn=function(e){i(e<=67108863);for(var t=(1<<26)%e,n=0,o=this.length-1;o>=0;o--)n=(t*n+(0|this.words[o]))%e;return n},r.prototype.idivn=function(e){i(e<=67108863);for(var t=0,n=this.length-1;n>=0;n--){var o=(0|this.words[n])+67108864*t;this.words[n]=o/e|0,t=o%e}return this.strip()},r.prototype.divn=function(e){return this.clone().idivn(e)},r.prototype.egcd=function(e){i(0===e.negative),i(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var o=new r(1),s=new r(0),a=new r(0),u=new r(1),l=0;t.isEven()&&n.isEven();)t.iushrn(1),n.iushrn(1),++l;for(var c=n.clone(),h=t.clone();!t.isZero();){for(var d=0,f=1;!(t.words[0]&f)&&d<26;++d,f<<=1);if(d>0)for(t.iushrn(d);d-- >0;)(o.isOdd()||s.isOdd())&&(o.iadd(c),s.isub(h)),o.iushrn(1),s.iushrn(1);for(var p=0,g=1;!(n.words[0]&g)&&p<26;++p,g<<=1);if(p>0)for(n.iushrn(p);p-- >0;)(a.isOdd()||u.isOdd())&&(a.iadd(c),u.isub(h)),a.iushrn(1),u.iushrn(1);t.cmp(n)>=0?(t.isub(n),o.isub(a),s.isub(u)):(n.isub(t),a.isub(o),u.isub(s))}return{a,b:u,gcd:n.iushln(l)}},r.prototype._invmp=function(e){i(0===e.negative),i(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var o,s=new r(1),a=new r(0),u=n.clone();t.cmpn(1)>0&&n.cmpn(1)>0;){for(var l=0,c=1;!(t.words[0]&c)&&l<26;++l,c<<=1);if(l>0)for(t.iushrn(l);l-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);for(var h=0,d=1;!(n.words[0]&d)&&h<26;++h,d<<=1);if(h>0)for(n.iushrn(h);h-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);t.cmp(n)>=0?(t.isub(n),s.isub(a)):(n.isub(t),a.isub(s))}return(o=0===t.cmpn(1)?s:a).cmpn(0)<0&&o.iadd(e),o},r.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),n=e.clone();t.negative=0,n.negative=0;for(var i=0;t.isEven()&&n.isEven();i++)t.iushrn(1),n.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;n.isEven();)n.iushrn(1);var o=t.cmp(n);if(o<0){var r=t;t=n,n=r}else if(0===o||0===n.cmpn(1))break;t.isub(n)}return n.iushln(i)},r.prototype.invm=function(e){return this.egcd(e).a.umod(e)},r.prototype.isEven=function(){return!(1&this.words[0])},r.prototype.isOdd=function(){return!(1&~this.words[0])},r.prototype.andln=function(e){return this.words[0]&e},r.prototype.bincn=function(e){i("number"==typeof e);var t=e%26,n=(e-t)/26,o=1<>>26,a&=67108863,this.words[s]=a}return 0!==r&&(this.words[s]=r,this.length++),this},r.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},r.prototype.cmpn=function(e){var t,n=e<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this.strip(),this.length>1)t=1;else{n&&(e=-e),i(e<=67108863,"Number is too big");var o=0|this.words[0];t=o===e?0:oe.length)return 1;if(this.length=0;n--){var i=0|this.words[n],o=0|e.words[n];if(i!==o){io&&(t=1);break}}return t},r.prototype.gtn=function(e){return 1===this.cmpn(e)},r.prototype.gt=function(e){return 1===this.cmp(e)},r.prototype.gten=function(e){return this.cmpn(e)>=0},r.prototype.gte=function(e){return this.cmp(e)>=0},r.prototype.ltn=function(e){return-1===this.cmpn(e)},r.prototype.lt=function(e){return-1===this.cmp(e)},r.prototype.lten=function(e){return this.cmpn(e)<=0},r.prototype.lte=function(e){return this.cmp(e)<=0},r.prototype.eqn=function(e){return 0===this.cmpn(e)},r.prototype.eq=function(e){return 0===this.cmp(e)},r.red=function(e){return new C(e)},r.prototype.toRed=function(e){return i(!this.red,"Already a number in reduction context"),i(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},r.prototype.fromRed=function(){return i(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},r.prototype._forceRed=function(e){return this.red=e,this},r.prototype.forceRed=function(e){return i(!this.red,"Already a number in reduction context"),this._forceRed(e)},r.prototype.redAdd=function(e){return i(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},r.prototype.redIAdd=function(e){return i(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},r.prototype.redSub=function(e){return i(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},r.prototype.redISub=function(e){return i(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},r.prototype.redShl=function(e){return i(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},r.prototype.redMul=function(e){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},r.prototype.redIMul=function(e){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},r.prototype.redSqr=function(){return i(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},r.prototype.redISqr=function(){return i(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},r.prototype.redSqrt=function(){return i(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},r.prototype.redInvm=function(){return i(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},r.prototype.redNeg=function(){return i(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},r.prototype.redPow=function(e){return i(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var v={k256:null,p224:null,p192:null,p25519:null};function y(e,t){this.name=e,this.p=new r(t,16),this.n=this.p.bitLength(),this.k=new r(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function b(){y.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function _(){y.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){y.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function M(){y.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function C(e){if("string"==typeof e){var t=r._prime(e);this.m=t.p,this.prime=t}else i(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function S(e){C.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new r(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}y.prototype._tmp=function(){var e=new r(null);return e.words=new Array(Math.ceil(this.n/13)),e},y.prototype.ireduce=function(e){var t,n=e;do{this.split(n,this.tmp),t=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(t>this.n);var i=t0?n.isub(this.p):void 0!==n.strip?n.strip():n._strip(),n},y.prototype.split=function(e,t){e.iushrn(this.n,0,t)},y.prototype.imulK=function(e){return e.imul(this.k)},o(b,y),b.prototype.split=function(e,t){for(var n=4194303,i=Math.min(e.length,9),o=0;o>>22,r=s}r>>>=22,e.words[o-10]=r,0===r&&e.length>10?e.length-=10:e.length-=9},b.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,n=0;n>>=26,e.words[n]=o,t=i}return 0!==t&&(e.words[e.length++]=t),e},r._prime=function(e){if(v[e])return v[e];var t;if("k256"===e)t=new b;else if("p224"===e)t=new _;else if("p192"===e)t=new w;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new M}return v[e]=t,t},C.prototype._verify1=function(e){i(0===e.negative,"red works only with positives"),i(e.red,"red works only with red numbers")},C.prototype._verify2=function(e,t){i(!(e.negative|t.negative),"red works only with positives"),i(e.red&&e.red===t.red,"red works only with red numbers")},C.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},C.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},C.prototype.add=function(e,t){this._verify2(e,t);var n=e.add(t);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},C.prototype.iadd=function(e,t){this._verify2(e,t);var n=e.iadd(t);return n.cmp(this.m)>=0&&n.isub(this.m),n},C.prototype.sub=function(e,t){this._verify2(e,t);var n=e.sub(t);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},C.prototype.isub=function(e,t){this._verify2(e,t);var n=e.isub(t);return n.cmpn(0)<0&&n.iadd(this.m),n},C.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},C.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},C.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},C.prototype.isqr=function(e){return this.imul(e,e.clone())},C.prototype.sqr=function(e){return this.mul(e,e)},C.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(i(t%2==1),3===t){var n=this.m.add(new r(1)).iushrn(2);return this.pow(e,n)}for(var o=this.m.subn(1),s=0;!o.isZero()&&0===o.andln(1);)s++,o.iushrn(1);i(!o.isZero());var a=new r(1).toRed(this),u=a.redNeg(),l=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new r(2*c*c).toRed(this);0!==this.pow(c,l).cmp(u);)c.redIAdd(u);for(var h=this.pow(c,o),d=this.pow(e,o.addn(1).iushrn(1)),f=this.pow(e,o),p=s;0!==f.cmp(a);){for(var g=f,m=0;0!==g.cmp(a);m++)g=g.redSqr();i(m=0;i--){for(var l=t.words[i],c=u-1;c>=0;c--){var h=l>>c&1;o!==n[0]&&(o=this.sqr(o)),0!==h||0!==s?(s<<=1,s|=h,(4==++a||0===i&&0===c)&&(o=this.mul(o,n[s]),a=0,s=0)):a=0}u=26}return o},C.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},C.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},r.mont=function(e){return new S(e)},o(S,C),S.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},S.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},S.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var n=e.imul(t),i=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=n.isub(i).iushrn(this.shift),r=o;return o.cmp(this.m)>=0?r=o.isub(this.m):o.cmpn(0)<0&&(r=o.iadd(this.m)),r._forceRed(this)},S.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new r(0)._forceRed(this);var n=e.mul(t),i=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=n.isub(i).iushrn(this.shift),s=o;return o.cmp(this.m)>=0?s=o.isub(this.m):o.cmpn(0)<0&&(s=o.iadd(this.m)),s._forceRed(this)},S.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=n.nmd(e),this)},4890:e=>{function t(e,t){if(!e)throw new Error(t||"Assertion failed")}e.exports=t,t.equal=function(e,t,n){if(e!=t)throw new Error(n||"Assertion failed: "+e+" != "+t)}},3720:(e,t)=>{"use strict";var n=t;function i(e){return 1===e.length?"0"+e:e}function o(e){for(var t="",n=0;n>8,s=255&o;r?n.push(r,s):n.push(s)}return n},n.zero2=i,n.toHex=o,n.encode=function(e,t){return"hex"===t?o(e):e}},8253:function(e,t,n){var i=n(8957);!function(e){"use strict";var t="undefined"!=typeof window?window:void 0!==n.g?n.g:"undefined"!=typeof self?self:{},o=function(e,t){if(t=t.split(":")[0],!(e=+e))return!1;switch(t){case"http":case"ws":return 80!==e;case"https":case"wss":return 443!==e;case"ftp":return 21!==e;case"gopher":return 70!==e;case"file":return!1}return 0!==e},r=Object.prototype.hasOwnProperty;function s(e){return decodeURIComponent(e.replace(/\+/g," "))}var a={stringify:function(e,t){t=t||"";var n=[];for(var i in"string"!=typeof t&&(t="?"),e)r.call(e,i)&&n.push(encodeURIComponent(i)+"="+encodeURIComponent(e[i]));return n.length?t+n.join("&"):""},parse:function(e){for(var t,n=/([^=?&]+)=?([^&]*)/g,i={};t=n.exec(e);){var o=s(t[1]),r=s(t[2]);o in i||(i[o]=r)}return i}},u=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\S\s]*)/i,l=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,c=[["#","hash"],["?","query"],["/","pathname"],["@","auth",1],[NaN,"host",void 0,1,1],[/:(\d+)$/,"port",void 0,1],[NaN,"hostname",void 0,1,1]],h={hash:1,query:1};function d(e){var n,i=t&&t.location||{},o={},r=typeof(e=e||i);if("blob:"===e.protocol)o=new p(unescape(e.pathname),{});else if("string"===r)for(n in o=new p(e,{}),h)delete o[n];else if("object"===r){for(n in e)n in h||(o[n]=e[n]);void 0===o.slashes&&(o.slashes=l.test(e.href))}return o}function f(e){var t=u.exec(e);return{protocol:t[1]?t[1].toLowerCase():"",slashes:!!t[2],rest:t[3]}}function p(e,t,n){if(!(this instanceof p))return new p(e,t,n);var i,r,s,u,l,h,g=c.slice(),m=typeof t,v=this,y=0;for("object"!==m&&"string"!==m&&(n=t,t=null),n&&"function"!=typeof n&&(n=a.parse),t=d(t),i=!(r=f(e||"")).protocol&&!r.slashes,v.slashes=r.slashes||i&&t.slashes,v.protocol=r.protocol||t.protocol||"",e=r.rest,r.slashes||(g[2]=[/(.*)/,"pathname"]);y0;)n[i]=arguments[i+1];var o=e.type,r=this.listeners[o];return!!Array.isArray(r)&&(r.forEach((function(i){n.length>0?i.apply(t,n):i.call(t,e)})),!0)};var _=function(){this.urlMap={}};_.prototype.attachWebSocket=function(e,t){var n=this.urlMap[t];if(n&&n.server&&-1===n.websockets.indexOf(e))return n.websockets.push(e),n.server},_.prototype.addMembershipToRoom=function(e,t){var n=this.urlMap[e.url];n&&n.server&&-1!==n.websockets.indexOf(e)&&(n.roomMemberships[t]||(n.roomMemberships[t]=[]),n.roomMemberships[t].push(e))},_.prototype.attachServer=function(e,t){if(!this.urlMap[t])return this.urlMap[t]={server:e,websockets:[],roomMemberships:{}},e},_.prototype.serverLookup=function(e){var t=this.urlMap[e];if(t)return t.server},_.prototype.websocketsLookup=function(e,t,n){var i,o=this.urlMap[e];return i=o?o.websockets:[],t&&(i=o.roomMemberships[t]||[]),n?i.filter((function(e){return e!==n})):i},_.prototype.removeServer=function(e){delete this.urlMap[e]},_.prototype.removeWebSocket=function(e,t){var n=this.urlMap[t];n&&(n.websockets=y(n.websockets,(function(t){return t===e})))},_.prototype.removeMembershipFromRoom=function(e,t){var n=this.urlMap[e.url],i=n.roomMemberships[t];n&&null!==i&&(n.roomMemberships[t]=y(i,(function(t){return t===e})))};var w=new _,M=1e3,C={CONSTRUCTOR_ERROR:"Failed to construct 'WebSocket':",CLOSE_ERROR:"Failed to execute 'close' on 'WebSocket':",EVENT:{CONSTRUCT:"Failed to construct 'Event':",MESSAGE:"Failed to construct 'MessageEvent':",CLOSE:"Failed to construct 'CloseEvent':"}},S=function(){};S.prototype.stopPropagation=function(){},S.prototype.stopImmediatePropagation=function(){},S.prototype.initEvent=function(e,t,n){void 0===e&&(e="undefined"),void 0===t&&(t=!1),void 0===n&&(n=!1),this.type=""+e,this.bubbles=Boolean(t),this.cancelable=Boolean(n)};var L=function(e){function t(t,n){if(void 0===n&&(n={}),e.call(this),!t)throw new TypeError(C.EVENT_ERROR+" 1 argument required, but only 0 present.");if("object"!=typeof n)throw new TypeError(C.EVENT_ERROR+" parameter 2 ('eventInitDict') is not an object.");var i=n.bubbles,o=n.cancelable;this.type=""+t,this.timeStamp=Date.now(),this.target=null,this.srcElement=null,this.returnValue=!0,this.isTrusted=!1,this.eventPhase=0,this.defaultPrevented=!1,this.currentTarget=null,this.cancelable=!!o&&Boolean(o),this.canncelBubble=!1,this.bubbles=!!i&&Boolean(i)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t}(S),I=function(e){function t(t,n){if(void 0===n&&(n={}),e.call(this),!t)throw new TypeError(C.EVENT.MESSAGE+" 1 argument required, but only 0 present.");if("object"!=typeof n)throw new TypeError(C.EVENT.MESSAGE+" parameter 2 ('eventInitDict') is not an object");var i=n.bubbles,o=n.cancelable,r=n.data,s=n.origin,a=n.lastEventId,u=n.ports;this.type=""+t,this.timeStamp=Date.now(),this.target=null,this.srcElement=null,this.returnValue=!0,this.isTrusted=!1,this.eventPhase=0,this.defaultPrevented=!1,this.currentTarget=null,this.cancelable=!!o&&Boolean(o),this.canncelBubble=!1,this.bubbles=!!i&&Boolean(i),this.origin=""+s,this.ports=void 0===u?null:u,this.data=void 0===r?null:r,this.lastEventId=""+(a||"")}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t}(S),N=function(e){function t(t,n){if(void 0===n&&(n={}),e.call(this),!t)throw new TypeError(C.EVENT.CLOSE+" 1 argument required, but only 0 present.");if("object"!=typeof n)throw new TypeError(C.EVENT.CLOSE+" parameter 2 ('eventInitDict') is not an object");var i=n.bubbles,o=n.cancelable,r=n.code,s=n.reason,a=n.wasClean;this.type=""+t,this.timeStamp=Date.now(),this.target=null,this.srcElement=null,this.returnValue=!0,this.isTrusted=!1,this.eventPhase=0,this.defaultPrevented=!1,this.currentTarget=null,this.cancelable=!!o&&Boolean(o),this.cancelBubble=!1,this.bubbles=!!i&&Boolean(i),this.code="number"==typeof r?parseInt(r,10):0,this.reason=""+(s||""),this.wasClean=!!a&&Boolean(a)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t}(S);function x(e){var t=e.type,n=e.target,i=new L(t);return n&&(i.target=n,i.srcElement=n,i.currentTarget=n),i}function D(e){var t=e.type,n=e.origin,i=e.data,o=e.target,r=new I(t,{data:i,origin:n});return o&&(r.target=o,r.srcElement=o,r.currentTarget=o),r}function k(e){var t=e.code,n=e.reason,i=e.type,o=e.target,r=e.wasClean;r||(r=1e3===t);var s=new N(i,{code:t,reason:n,wasClean:r});return o&&(s.target=o,s.srcElement=o,s.currentTarget=o),s}function T(e,t,n){e.readyState=A.CLOSING;var i=w.serverLookup(e.url),o=k({type:"close",target:e,code:t,reason:n});m((function(){w.removeWebSocket(e,e.url),e.readyState=A.CLOSED,e.dispatchEvent(o),i&&i.dispatchEvent(o,i)}),e)}function E(e){return"[object Blob]"===Object.prototype.toString.call(e)||e instanceof ArrayBuffer||(e=String(e)),e}var A=function(e){function t(n,i){e.call(this),this.url=function(e){var t=new g(e),n=t.pathname,i=t.protocol,o=t.hash;if(!e)throw new TypeError(C.CONSTRUCTOR_ERROR+" 1 argument required, but only 0 present.");if(n||(t.pathname="/"),""===i)throw new SyntaxError(C.CONSTRUCTOR_ERROR+" The URL '"+t.toString()+"' is invalid.");if("ws:"!==i&&"wss:"!==i)throw new SyntaxError(C.CONSTRUCTOR_ERROR+" The URL's scheme must be either 'ws' or 'wss'. '"+i+"' is not allowed.");if(""!==o)throw new SyntaxError(C.CONSTRUCTOR_ERROR+" The URL contains a fragment identifier ('"+o+"'). Fragment identifiers are not allowed in WebSocket URLs.");return t.toString()}(n),i=function(e){if(void 0===e&&(e=[]),!Array.isArray(e)&&"string"!=typeof e)throw new SyntaxError(C.CONSTRUCTOR_ERROR+" The subprotocol '"+e.toString()+"' is invalid.");"string"==typeof e&&(e=[e]);var t=e.map((function(e){return{count:1,protocol:e}})).reduce((function(e,t){return e[t.protocol]=(e[t.protocol]||0)+t.count,e}),{}),n=Object.keys(t).filter((function(e){return t[e]>1}));if(n.length>0)throw new SyntaxError(C.CONSTRUCTOR_ERROR+" The subprotocol '"+n[0]+"' is duplicated.");return e}(i),this.protocol=i[0]||"",this.binaryType="blob",this.readyState=t.CONNECTING;var o=w.attachWebSocket(this,this.url);m((function(){if(o)if(o.options.verifyClient&&"function"==typeof o.options.verifyClient&&!o.options.verifyClient())this.readyState=t.CLOSED,v("error","WebSocket connection to '"+this.url+"' failed: HTTP Authentication failed; no valid credentials available"),w.removeWebSocket(this,this.url),this.dispatchEvent(x({type:"error",target:this})),this.dispatchEvent(k({type:"close",target:this,code:M}));else{if(o.options.selectProtocol&&"function"==typeof o.options.selectProtocol){var e=o.options.selectProtocol(i),n=""!==e,r=-1!==i.indexOf(e);if(n&&!r)return this.readyState=t.CLOSED,v("error","WebSocket connection to '"+this.url+"' failed: Invalid Sub-Protocol"),w.removeWebSocket(this,this.url),this.dispatchEvent(x({type:"error",target:this})),void this.dispatchEvent(k({type:"close",target:this,code:M}));this.protocol=e}this.readyState=t.OPEN,this.dispatchEvent(x({type:"open",target:this})),o.dispatchEvent(x({type:"connection"}),(s=this,a={get:function(e,t){return"close"===t?function(e){void 0===e&&(e={});var t=e.code||M,n=e.reason||"";T(s,t,n)}:"send"===t?function(e){e=E(e),s.dispatchEvent(D({type:"message",data:e,origin:this.url,target:s}))}:"on"===t?function(e,t){s.addEventListener("server::"+e,t)}:e[t]}},new Proxy(s,a)))}else this.readyState=t.CLOSED,this.dispatchEvent(x({type:"error",target:this})),this.dispatchEvent(k({type:"close",target:this,code:M})),v("error","WebSocket connection to '"+this.url+"' failed");var s,a}),this)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={onopen:{},onmessage:{},onclose:{},onerror:{}};return n.onopen.get=function(){return this.listeners.open},n.onmessage.get=function(){return this.listeners.message},n.onclose.get=function(){return this.listeners.close},n.onerror.get=function(){return this.listeners.error},n.onopen.set=function(e){delete this.listeners.open,this.addEventListener("open",e)},n.onmessage.set=function(e){delete this.listeners.message,this.addEventListener("message",e)},n.onclose.set=function(e){delete this.listeners.close,this.addEventListener("close",e)},n.onerror.set=function(e){delete this.listeners.error,this.addEventListener("error",e)},t.prototype.send=function(e){var n=this;if(this.readyState===t.CLOSING||this.readyState===t.CLOSED)throw new Error("WebSocket is already in CLOSING or CLOSED state");var i=D({type:"server::message",origin:this.url,data:E(e)}),o=w.serverLookup(this.url);o&&m((function(){n.dispatchEvent(i,e)}),o)},t.prototype.close=function(e,n){if(void 0!==e&&("number"!=typeof e||1e3!==e&&(e<3e3||e>4999)))throw new TypeError(C.CLOSE_ERROR+" The code must be either 1000, or between 3000 and 4999. "+e+" is neither.");if(void 0!==n&&(i=n,o=encodeURIComponent(i).match(/%[89ABab]/g),i.length+(o?o.length:0)>123))throw new SyntaxError(C.CLOSE_ERROR+" The message must not be greater than 123 bytes.");var i,o;this.readyState!==t.CLOSING&&this.readyState!==t.CLOSED&&(this.readyState===t.CONNECTING?function(e,t,n){e.readyState=A.CLOSING;var i=w.serverLookup(e.url),o=k({type:"close",target:e,code:t,reason:n,wasClean:!1}),r=x({type:"error",target:e});m((function(){w.removeWebSocket(e,e.url),e.readyState=A.CLOSED,e.dispatchEvent(r),e.dispatchEvent(o),i&&i.dispatchEvent(o,i)}),e)}(this,e,n):T(this,e,n))},Object.defineProperties(t.prototype,n),t}(b);A.CONNECTING=0,A.prototype.CONNECTING=A.CONNECTING,A.OPEN=1,A.prototype.OPEN=A.OPEN,A.CLOSING=2,A.prototype.CLOSING=A.CLOSING,A.CLOSED=3,A.prototype.CLOSED=A.CLOSED;function j(){return"undefined"!=typeof window?window:"object"==typeof i&&"object"==typeof n.g?n.g:this}var O=function(e){function t(t,n){void 0===n&&(n={}),e.call(this);var i=new g(t);if(i.pathname||(i.pathname="/"),this.url=i.toString(),this.originalWebSocket=null,!w.attachServer(this,this.url))throw this.dispatchEvent(x({type:"error"})),new Error("A mock server is already listening on this url");void 0===n.verifyClient&&(n.verifyClient=null),void 0===n.selectProtocol&&(n.selectProtocol=null),this.options=n,this.start()}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.start=function(){var e=j();e.WebSocket&&(this.originalWebSocket=e.WebSocket),e.WebSocket=A},t.prototype.stop=function(e){void 0===e&&(e=function(){});var t=j();this.originalWebSocket?t.WebSocket=this.originalWebSocket:delete t.WebSocket,this.originalWebSocket=null,w.removeServer(this.url),"function"==typeof e&&e()},t.prototype.on=function(e,t){this.addEventListener(e,t)},t.prototype.close=function(e){void 0===e&&(e={});var t=e.code,n=e.reason,i=e.wasClean,o=w.websocketsLookup(this.url);w.removeServer(this.url),o.forEach((function(e){e.readyState=A.CLOSE,e.dispatchEvent(k({type:"close",target:e,code:t||M,reason:n||"",wasClean:i}))})),this.dispatchEvent(k({type:"close"}),this)},t.prototype.emit=function(e,t,n){var i=this;void 0===n&&(n={});var o=n.websockets;o||(o=w.websocketsLookup(this.url)),t="object"!=typeof n||arguments.length>3?(t=Array.prototype.slice.call(arguments,1,arguments.length)).map((function(e){return E(e)})):E(t),o.forEach((function(n){Array.isArray(t)?n.dispatchEvent.apply(n,[D({type:e,data:t,origin:i.url,target:n})].concat(t)):n.dispatchEvent(D({type:e,data:t,origin:i.url,target:n}))}))},t.prototype.clients=function(){return w.websocketsLookup(this.url)},t.prototype.to=function(e,t,n){var i=this;void 0===n&&(n=[]);var o=this,r=n.concat(w.websocketsLookup(this.url,e,t)).reduce((function(e,t){return e.indexOf(t)>-1?e:e.concat(t)}),[]);return{to:function(e,t){return i.to.call(i,e,t,r)},emit:function(e,t){o.emit(e,t,{websockets:r})}}},t.prototype.in=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return this.to.apply(null,e)},t.prototype.simulate=function(e){var t=w.websocketsLookup(this.url);"error"===e&&t.forEach((function(e){e.readyState=A.CLOSE,e.dispatchEvent(x({type:"error"}))}))},t}(b);O.of=function(e){return new O(e)};var R=function(e){function t(n,i){var o=this;void 0===n&&(n="socket.io"),void 0===i&&(i=""),e.call(this),this.binaryType="blob";var r=new g(n);r.pathname||(r.pathname="/"),this.url=r.toString(),this.readyState=t.CONNECTING,this.protocol="","string"==typeof i||"object"==typeof i&&null!==i?this.protocol=i:Array.isArray(i)&&i.length>0&&(this.protocol=i[0]);var s=w.attachWebSocket(this,this.url);m((function(){s?(this.readyState=t.OPEN,s.dispatchEvent(x({type:"connection"}),s,this),s.dispatchEvent(x({type:"connect"}),s,this),this.dispatchEvent(x({type:"connect",target:this}))):(this.readyState=t.CLOSED,this.dispatchEvent(x({type:"error",target:this})),this.dispatchEvent(k({type:"close",target:this,code:M})),v("error","Socket.io connection to '"+this.url+"' failed"))}),this),this.addEventListener("close",(function(e){o.dispatchEvent(k({type:"disconnect",target:e.target,code:e.code}))}))}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={broadcast:{}};return t.prototype.close=function(){if(this.readyState===t.OPEN){var e=w.serverLookup(this.url);return w.removeWebSocket(this,this.url),this.readyState=t.CLOSED,this.dispatchEvent(k({type:"close",target:this,code:M})),e&&e.dispatchEvent(k({type:"disconnect",target:this,code:M}),e),this}},t.prototype.disconnect=function(){return this.close()},t.prototype.emit=function(e){for(var n=[],i=arguments.length-1;i-- >0;)n[i]=arguments[i+1];if(this.readyState!==t.OPEN)throw new Error("SocketIO is already in CLOSING or CLOSED state");var o=D({type:e,origin:this.url,data:n}),r=w.serverLookup(this.url);return r&&r.dispatchEvent.apply(r,[o].concat(n)),this},t.prototype.send=function(e){return this.emit("message",e),this},n.broadcast.get=function(){if(this.readyState!==t.OPEN)throw new Error("SocketIO is already in CLOSING or CLOSED state");var e=this,n=w.serverLookup(this.url);if(!n)throw new Error("SocketIO can not find a server at the specified URL ("+this.url+")");return{emit:function(t,i){return n.emit(t,i,{websockets:w.websocketsLookup(e.url,null,e)}),e},to:function(t){return n.to(t,e)},in:function(t){return n.in(t,e)}}},t.prototype.on=function(e,t){return this.addEventListener(e,t),this},t.prototype.off=function(e){this.removeEventListener(e)},t.prototype.join=function(e){w.addMembershipToRoom(this,e)},t.prototype.leave=function(e){w.removeMembershipFromRoom(this,e)},t.prototype.to=function(e){return this.broadcast.to(e)},t.prototype.in=function(){return this.to.apply(null,arguments)},t.prototype.dispatchEvent=function(e){for(var t=this,n=[],i=arguments.length-1;i-- >0;)n[i]=arguments[i+1];var o=e.type,r=this.listeners[o];if(!Array.isArray(r))return!1;r.forEach((function(i){n.length>0?i.apply(t,n):i.call(t,e.data?e.data:e)}))},Object.defineProperties(t.prototype,n),t}(b);R.CONNECTING=0,R.OPEN=1,R.CLOSING=2,R.CLOSED=3;var P=function(e,t){return new R(e,t)};P.connect=function(e,t){return P(e,t)};var z=O,W=A,F=P;e.Server=z,e.WebSocket=W,e.SocketIO=F,Object.defineProperty(e,"__esModule",{value:!0})}(t)},7339:(e,t,n)=>{"use strict";function i(e,t){return void 0===t&&(t=0),e[e.length-(1+t)]}function o(e,t,n){if(void 0===n&&(n=function(e,t){return e===t}),e.length!==t.length)return!1;for(var i=0,o=e.length;i0))return r;o=r-1}}return-(i+1)}function s(e,t){var n=0,i=e.length;if(0===i)return 0;for(;ni?e[u]=r[a++]:a>o?e[u]=r[s++]:t(r[a],r[s])<0?e[u]=r[a++]:e[u]=r[s++]}(e,t,n,r,i,o)}}function l(e,t){for(var n,i=[],o=0,r=a(e.slice(0),t);ot;o--)i.push(o);return i}function v(e,t,n){var i=e.slice(0,t),o=e.slice(t);return i.concat(n,o)}n.d(t,{$1:()=>p,$z:()=>l,Bq:()=>g,Ct:()=>h,El:()=>r,RT:()=>i,Yc:()=>c,ZN:()=>a,aB:()=>s,aI:()=>o,dM:()=>d,nK:()=>v,v4:()=>f,y1:()=>m})},5538:(e,t,n)=>{"use strict";n.d(t,{D7:()=>c,M_:()=>a,Qg:()=>d,aD:()=>h,cU:()=>u,dz:()=>s,iH:()=>f});var i=n(2337),o={};i.g3.addEventListener("error",(function(e){var t=e.detail,n=t.id;t.parent?t.handler&&o&&delete o[n]:(o[n]=t,1===Object.keys(o).length&&setTimeout((function(){var e=o;o={},Object.keys(e).forEach((function(t){var n=e[t];n.exception?s(n.exception):n.error&&s(n.error),console.log("WARNING: Promise with no error callback:"+n.id),console.log(n),n.exception&&console.log(n.exception.stack)}))}),0))}));var r=new(function(){function e(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout((function(){if(e.stack)throw new Error(e.message+"\n\n"+e.stack);throw e}),0)}}return e.prototype.emit=function(e){this.listeners.forEach((function(t){t(e)}))},e.prototype.onUnexpectedError=function(e){this.unexpectedErrorHandler(e),this.emit(e)},e.prototype.onUnexpectedExternalError=function(e){this.unexpectedErrorHandler(e)},e}());function s(e){c(e)||r.onUnexpectedError(e)}function a(e){c(e)||r.onUnexpectedExternalError(e)}function u(e){return e instanceof Error?{$isError:!0,name:e.name,message:e.message,stack:e.stacktrace||e.stack}:e}var l="Canceled";function c(e){return e instanceof Error&&e.name===l&&e.message===l}function h(){var e=new Error(l);return e.name=e.message,e}function d(e){return e?new Error("Illegal argument: "+e):new Error("Illegal argument")}function f(e){return e?new Error("Illegal state: "+e):new Error("Illegal state")}},2213:(e,t,n)=>{"use strict";n.d(t,{B5:()=>p,IC:()=>d,Jh:()=>i,Oo:()=>c,Pc:()=>h,Wj:()=>y,Zs:()=>g,_B:()=>l,at:()=>f,cy:()=>v,vl:()=>u});var i,o=n(5538),r=n(652),s=n(6621),a=n(8820);!function(e){var t={dispose:function(){}};e.None=function(){return t}}(i||(i={}));var u=function(){function e(e){this._options=e}return Object.defineProperty(e.prototype,"event",{get:function(){var t=this;return this._event||(this._event=function(n,i,o){t._listeners||(t._listeners=new a.w);var r=t._listeners.isEmpty();r&&t._options&&t._options.onFirstListenerAdd&&t._options.onFirstListenerAdd(t);var s,u=t._listeners.push(i?[n,i]:n);return r&&t._options&&t._options.onFirstListenerDidAdd&&t._options.onFirstListenerDidAdd(t),t._options&&t._options.onListenerDidAdd&&t._options.onListenerDidAdd(t,n,i),s={dispose:function(){s.dispose=e._noop,t._disposed||(u(),t._options&&t._options.onLastListenerRemove&&t._listeners.isEmpty()&&t._options.onLastListenerRemove(t))}},Array.isArray(o)&&o.push(s),s}),this._event},enumerable:!0,configurable:!0}),e.prototype.fire=function(e){if(this._listeners){this._deliveryQueue||(this._deliveryQueue=[]);for(var t=this._listeners.iterator(),n=t.next();!n.done;n=t.next())this._deliveryQueue.push([n.value,e]);for(;this._deliveryQueue.length>0;){var i=this._deliveryQueue.shift(),r=i[0],s=i[1];try{"function"==typeof r?r.call(void 0,s):r[0].call(r[1],s)}catch(n){(0,o.dz)(n)}}}},e.prototype.dispose=function(){this._listeners&&(this._listeners=void 0),this._deliveryQueue&&(this._deliveryQueue.length=0),this._disposed=!0},e._noop=function(){},e}(),l=function(){function e(){var e=this;this.hasListeners=!1,this.events=[],this.emitter=new u({onFirstListenerAdd:function(){return e.onFirstListenerAdd()},onLastListenerRemove:function(){return e.onLastListenerRemove()}})}return Object.defineProperty(e.prototype,"event",{get:function(){return this.emitter.event},enumerable:!0,configurable:!0}),e.prototype.add=function(e){var t=this,n={event:e,listener:null};return this.events.push(n),this.hasListeners&&this.hook(n),(0,s.s)((0,r.O)((function(){t.hasListeners&&t.unhook(n);var e=t.events.indexOf(n);t.events.splice(e,1)})))},e.prototype.onFirstListenerAdd=function(){var e=this;this.hasListeners=!0,this.events.forEach((function(t){return e.hook(t)}))},e.prototype.onLastListenerRemove=function(){var e=this;this.hasListeners=!1,this.events.forEach((function(t){return e.unhook(t)}))},e.prototype.hook=function(e){var t=this;e.listener=e.event((function(e){return t.emitter.fire(e)}))},e.prototype.unhook=function(e){e.listener.dispose(),e.listener=null},e.prototype.dispose=function(){this.emitter.dispose()},e}();function c(e){return function(t,n,i){void 0===n&&(n=null);var o=e((function(e){return o.dispose(),t.call(n,e)}),null,i);return o}}function h(){for(var e=[],t=0;t1)&&l.fire(e),a=0}),n)}))},onLastListenerRemove:function(){o.dispose()}});return l.event}var f=function(){function e(){this.buffers=[]}return e.prototype.wrapEvent=function(e){var t=this;return function(n,i,o){return e((function(e){var o=t.buffers[t.buffers.length-1];o?o.push((function(){return n.call(i,e)})):n.call(i,e)}),void 0,o)}},e.prototype.bufferEvents=function(e){var t=[];this.buffers.push(t),e(),this.buffers.pop(),t.forEach((function(e){return e()}))},e}();function p(e,t){return function(n,i,o){return void 0===i&&(i=null),e((function(e){return n.call(i,t(e))}),null,o)}}function g(e,t){return function(n,i,o){return void 0===i&&(i=null),e((function(e){return t(e)&&n.call(i,e)}),null,o)}}var m=function(){function e(e){this._event=e}return Object.defineProperty(e.prototype,"event",{get:function(){return this._event},enumerable:!0,configurable:!0}),e.prototype.map=function(t){return new e(p(this._event,t))},e.prototype.filter=function(t){return new e(g(this._event,t))},e.prototype.on=function(e,t,n){return this._event(e,t,n)},e}();function v(e){return new m(e)}var y=function(){function e(){this.emitter=new u,this.event=this.emitter.event,this.disposable=s.jG.None}return Object.defineProperty(e.prototype,"input",{set:function(e){this.disposable.dispose(),this.disposable=e(this.emitter.fire,this.emitter)},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){this.disposable.dispose(),this.emitter.dispose()},e}()},652:(e,t,n)=>{"use strict";function i(e){var t,n=this,i=!1;return function(){return i?t:(i=!0,t=e.apply(n,arguments))}}n.d(t,{O:()=>i})},699:(e,t,n)=>{"use strict";n.d(t,{YW:()=>D});var i=n(7339),o=n(899),r=n(6973),s=n(5983),a=n(2337),u="**",l="/",c="[/\\\\]",h="[^/\\\\]",d=/\//g;function f(e){switch(e){case 0:return"";case 1:return h+"*?";default:return"(?:"+c+"|"+h+"+"+c+"|"+c+h+"+)*?"}}function p(e,t){if(!e)return[];for(var n,i=[],o=!1,r=!1,s="",a=0;a0;n--){var r=e.charCodeAt(n-1);if(47===r||92===r)break}t=e.substr(n)}var s=o.indexOf(t);return-1!==s?i[s]:null};a.basenames=o,a.patterns=i,a.allBasenames=o;var u=e.filter((function(e){return!e.basenames}));return u.push(a),u}},6621:(e,t,n)=>{"use strict";function i(e){return"function"==typeof e.dispose&&0===e.dispose.length}function o(e){for(var t=[],n=1;no,BO:()=>u,Xm:()=>i,jG:()=>a,qE:()=>r,s:()=>s});var a=function(){function e(){this._toDispose=[]}return Object.defineProperty(e.prototype,"toDispose",{get:function(){return this._toDispose},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){this._toDispose=o(this._toDispose)},e.prototype._register=function(e){return this._toDispose.push(e),e},e.None=Object.freeze({dispose:function(){}}),e}(),u=function(){function e(e){this.object=e}return e.prototype.dispose=function(){},e}()},8820:(e,t,n)=>{"use strict";n.d(t,{w:()=>o});var i=function(e){this.element=e},o=function(){function e(){}return e.prototype.isEmpty=function(){return!this._first},e.prototype.unshift=function(e){return this.insert(e,!1)},e.prototype.push=function(e){return this.insert(e,!0)},e.prototype.insert=function(e,t){var n=this,o=new i(e);if(this._first)if(t){var r=this._last;this._last=o,o.prev=r,r.next=o}else{var s=this._first;this._first=o,o.next=s,s.prev=o}else this._first=o,this._last=o;return function(){for(var e=n._first;e instanceof i;e=e.next)if(e===o){if(e.prev&&e.next){var t=e.prev;t.next=e.next,e.next.prev=t}else e.prev||e.next?e.next?e.prev||(n._first=n._first.next,n._first.prev=void 0):(n._last=n._last.prev,n._last.next=void 0):(n._first=void 0,n._last=void 0);break}}},e.prototype.iterator=function(){var e={done:void 0,value:void 0},t=this._first;return{next:function(){return t?(e.done=!1,e.value=t.element,t=t.next):(e.done=!0,e.value=void 0),e}}},e}()},5983:(e,t,n)=>{"use strict";n.d(t,{cB:()=>c,fT:()=>h,qK:()=>d,zu:()=>r});var i,o=(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});function r(e){var t=[];return e.forEach((function(e){return t.push(e)})),t}var s,a=function(){function e(){this._value="",this._pos=0}return e.prototype.reset=function(e){return this._value=e,this._pos=0,this},e.prototype.next=function(){return this._pos+=1,this},e.prototype.hasNext=function(){return this._pos0)n.left||(n.left=new l,n.left.segment=i.value()),n=n.left;else if(o<0)n.right||(n.right=new l,n.right.segment=i.value()),n=n.right;else{if(!i.hasNext())break;i.next(),n.mid||(n.mid=new l,n.mid.segment=i.value()),n=n.mid}}var r=n.value;return n.value=t,n.key=e,r},e.prototype.get=function(e){for(var t=this._iter.reset(e),n=this._root;n;){var i=t.cmp(n.segment);if(i>0)n=n.left;else if(i<0)n=n.right;else{if(!t.hasNext())break;t.next(),n=n.mid}}return n?n.value:void 0},e.prototype.findSubstr=function(e){for(var t,n=this._iter.reset(e),i=this._root;i;){var o=n.cmp(i.segment);if(o>0)i=i.left;else if(o<0)i=i.right;else{if(!n.hasNext())break;n.next(),t=i.value||t,i=i.mid}}return i&&i.value||t},e.prototype.forEach=function(e){this._forEach(this._root,e)},e.prototype._forEach=function(e,t){e&&(this._forEach(e.left,t),e.value&&t(e.value,e.key),this._forEach(e.mid,t),this._forEach(e.right,t))},e}(),h=function(){function e(){this.map=new Map,this.ignoreCase=!1}return e.prototype.set=function(e,t){this.map.set(this.toKey(e),t)},e.prototype.get=function(e){return this.map.get(this.toKey(e))},e.prototype.toKey=function(e){var t=e.toString();return this.ignoreCase&&(t=t.toLowerCase()),t},e}();!function(e){e[e.None=0]="None",e[e.AsOld=1]="AsOld",e[e.AsNew=2]="AsNew"}(s||(s={}));var d=function(e){function t(t,n){void 0===n&&(n=1);var i=e.call(this)||this;return i._limit=t,i._ratio=Math.min(Math.max(0,n),1),i}return o(t,e),t.prototype.get=function(t){return e.prototype.get.call(this,t,s.AsNew)},t.prototype.set=function(t,n){e.prototype.set.call(this,t,n,s.AsNew),this.checkTrim()},t.prototype.checkTrim=function(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))},t}(function(){function e(){this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0}return e.prototype.clear=function(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0},Object.defineProperty(e.prototype,"size",{get:function(){return this._size},enumerable:!0,configurable:!0}),e.prototype.get=function(e,t){void 0===t&&(t=s.None);var n=this._map.get(e);if(n)return t!==s.None&&this.touch(n,t),n.value},e.prototype.set=function(e,t,n){void 0===n&&(n=s.None);var i=this._map.get(e);if(i)i.value=t,n!==s.None&&this.touch(i,n);else{switch(i={key:e,value:t,next:void 0,previous:void 0},n){case s.None:this.addItemLast(i);break;case s.AsOld:this.addItemFirst(i);break;case s.AsNew:default:this.addItemLast(i)}this._map.set(e,i),this._size++}},e.prototype.forEach=function(e,t){for(var n=this._head;n;)t?e.bind(t)(n.value,n.key,this):e(n.value,n.key,this),n=n.next},e.prototype.trimOld=function(e){if(!(e>=this.size))if(0!==e){for(var t=this._head,n=this.size;t&&n>e;)this._map.delete(t.key),t=t.next,n--;this._head=t,this._size=n,t.previous=void 0}else this.clear()},e.prototype.addItemFirst=function(e){if(this._head||this._tail){if(!this._head)throw new Error("Invalid list");e.next=this._head,this._head.previous=e}else this._tail=e;this._head=e},e.prototype.addItemLast=function(e){if(this._head||this._tail){if(!this._tail)throw new Error("Invalid list");e.previous=this._tail,this._tail.next=e}else this._head=e;this._tail=e},e.prototype.touch=function(e,t){if(!this._head||!this._tail)throw new Error("Invalid list");if(t===s.AsOld||t===s.AsNew)if(t===s.AsOld){if(e===this._head)return;var n=e.next,i=e.previous;e===this._tail?(i.next=void 0,this._tail=i):(n.previous=i,i.next=n),e.previous=void 0,e.next=this._head,this._head.previous=e,this._head=e}else if(t===s.AsNew){if(e===this._tail)return;n=e.next,i=e.previous,e===this._head?(n.previous=void 0,this._head=n):(n.previous=i,i.next=n),e.next=void 0,e.previous=this._tail,this._tail.next=e,this._tail=e}},e.prototype.toJSON=function(){var e=[];return this.forEach((function(t,n){e.push([n,t])})),e},e}())},4709:(e,t,n)=>{"use strict";n.d(t,{Fh:()=>h,Go:()=>o,aI:()=>l,co:()=>a,kp:()=>u,ol:()=>r,qt:()=>c});var i=n(1780);function o(e){if(!e||"object"!=typeof e)return e;if(e instanceof RegExp)return e;var t=Array.isArray(e)?[]:{};return Object.keys(e).forEach((function(n){e[n]&&"object"==typeof e[n]?t[n]=o(e[n]):t[n]=e[n]})),t}function r(e){if(!e||"object"!=typeof e)return e;for(var t=[e];t.length>0;){var n=t.shift();for(var i in Object.freeze(n),n)if(s.call(n,i)){var o=n[i];"object"!=typeof o||Object.isFrozen(o)||t.push(o)}}return e}var s=Object.prototype.hasOwnProperty;function a(e,t,n){return void 0===n&&(n=!0),(0,i.Gv)(e)?((0,i.Gv)(t)&&Object.keys(t).forEach((function(o){o in e?n&&((0,i.Gv)(e[o])&&(0,i.Gv)(t[o])?a(e[o],t[o],n):e[o]=t[o]):e[o]=t[o]})),e):t}function u(e){for(var t=[],n=1;n{"use strict";n.d(t,{LC:()=>l,P8:()=>u,S8:()=>d,Vn:()=>r,Yu:()=>s,_1:()=>g,fj:()=>p,oP:()=>m,pD:()=>a});var i=n(94),o=n(899),r="/",s=i.uF?"\\":"/";function a(e){var t=~e.lastIndexOf("/")||~e.lastIndexOf("\\");if(0===t)return".";if(0==~t)return e[0];if(~t==e.length-1)return a(e.substring(0,e.length-1));var n=e.substring(0,~t);return i.uF&&":"===n[n.length-1]&&(n+=s),n}function u(e){var t=~e.lastIndexOf("/")||~e.lastIndexOf("\\");return 0===t?e:~t==e.length-1?u(e.substring(0,e.length-1)):e.substr(1+~t)}function l(e){var t=~(e=u(e)).lastIndexOf(".");return t?e.substring(~t):""}var c=/(\/\.\.?\/)|(\/\.\.?)$|^(\.\.?\/)|(\/\/+)|(\\)/,h=/(\\\.\.?\\)|(\\\.\.?)$|^(\.\.?\\)|(\\\\+)|(\/)/;function d(e,t){if(null==e)return e;var n=e.length;if(0===n)return".";var o=i.uF&&t;if(function(e,t){return t?!h.test(e):!c.test(e)}(e,o))return e;for(var r=o?"\\":"/",s=function(e,t){if(void 0===t&&(t="/"),!e)return"";var n=e.length,i=e.charCodeAt(0);if(47===i||92===i){if((47===(i=e.charCodeAt(1))||92===i)&&47!==(i=e.charCodeAt(2))&&92!==i){for(var o=3,r=o;o=65&&i<=90||i>=97&&i<=122)&&58===e.charCodeAt(1))return 47===(i=e.charCodeAt(2))||92===i?e.slice(0,2)+t:e.slice(0,2);var s=e.indexOf("://");if(-1!==s)for(s+=3;s0)&&".."!==g&&(l=-1===p?"":l.slice(0,p),u=!0)}else f(e,a,d,".")&&(s||l||d0){var i=e.charCodeAt(e.length-1);if(47!==i&&92!==i){var o=n.charCodeAt(0);47!==o&&92!==o&&(e+=r)}}e+=n}return d(e)};function g(e,t,n,i){if(void 0===i&&(i=s),e===t)return!0;if(!e||!t)return!1;if(t.length>e.length)return!1;if(n){if(!(0,o.startsWithIgnoreCase)(e,t))return!1;if(t.length===e.length)return!0;var r=t.length;return t.charAt(t.length-1)===i&&r--,e.charAt(r)===i}return t.charAt(t.length-1)!==i&&(t+=i),0===e.indexOf(t)}function m(e){return i.uF?function(e){if(!e)return!1;var t=e.charCodeAt(0);if(47===t||92===t)return!0;if((t>=65&&t<=90||t>=97&&t<=122)&&e.length>2&&58===e.charCodeAt(1)){var n=e.charCodeAt(2);if(47===n||92===n)return!0}return!1}(e):function(e){return e&&47===e.charCodeAt(0)}(e)}},94:(e,t,n)=>{"use strict";n.d(t,{HZ:()=>v,OS:()=>w,YF:()=>_,ib:()=>m,j9:()=>g,uF:()=>f,zQ:()=>y,zx:()=>p});var i,o=n(8957),r=!1,s=!1,a=!1,u=!1,l=!1;if("object"==typeof o&&"function"==typeof o.nextTick&&"string"==typeof o.platform){r="win32"===o.platform,s="darwin"===o.platform,a="linux"===o.platform;var c=o.env.VSCODE_NLS_CONFIG;if(c)try{var h=JSON.parse(c);h.availableLanguages["*"];h.locale,h._translationsConfigFile}catch(e){}u=!0}else if("object"==typeof navigator){var d=navigator.userAgent;r=d.indexOf("Windows")>=0,s=d.indexOf("Macintosh")>=0,a=d.indexOf("Linux")>=0,l=!0,navigator.language}!function(e){e[e.Web=0]="Web",e[e.Mac=1]="Mac",e[e.Linux=2]="Linux",e[e.Windows=3]="Windows"}(i||(i={})),i.Web,u&&(s?i.Mac:r?i.Windows:a&&i.Linux);var f=r,p=s,g=a,m=u,v=l,y="object"==typeof self?self:"object"==typeof n.g?n.g:{},b=null;function _(e){return null===b&&(b=y.setImmediate?y.setImmediate.bind(y):void 0!==o&&"function"==typeof o.nextTick?o.nextTick.bind(o):y.setTimeout.bind(y)),b(e)}var w=s?2:r?1:3},9664:(e,t,n)=>{"use strict";n.d(t,{XR:()=>o,yE:()=>l});var i,o,r=n(6621),s=n(2213),a=(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});!function(e){e[e.Auto=1]="Auto",e[e.Hidden=2]="Hidden",e[e.Visible=3]="Visible"}(o||(o={}));var u=function(){function e(e,t,n,i,o,r){(e|=0)<0&&(e=0),(n|=0)+e>(t|=0)&&(n=t-e),n<0&&(n=0),(i|=0)<0&&(i=0),(r|=0)+i>(o|=0)&&(r=o-i),r<0&&(r=0),this.width=e,this.scrollWidth=t,this.scrollLeft=n,this.height=i,this.scrollHeight=o,this.scrollTop=r}return e.prototype.equals=function(e){return this.width===e.width&&this.scrollWidth===e.scrollWidth&&this.scrollLeft===e.scrollLeft&&this.height===e.height&&this.scrollHeight===e.scrollHeight&&this.scrollTop===e.scrollTop},e.prototype.withScrollDimensions=function(t){return new e(void 0!==t.width?t.width:this.width,void 0!==t.scrollWidth?t.scrollWidth:this.scrollWidth,this.scrollLeft,void 0!==t.height?t.height:this.height,void 0!==t.scrollHeight?t.scrollHeight:this.scrollHeight,this.scrollTop)},e.prototype.withScrollPosition=function(t){return new e(this.width,this.scrollWidth,void 0!==t.scrollLeft?t.scrollLeft:this.scrollLeft,this.height,this.scrollHeight,void 0!==t.scrollTop?t.scrollTop:this.scrollTop)},e.prototype.createScrollEvent=function(e){var t=this.width!==e.width,n=this.scrollWidth!==e.scrollWidth,i=this.scrollLeft!==e.scrollLeft,o=this.height!==e.height,r=this.scrollHeight!==e.scrollHeight,s=this.scrollTop!==e.scrollTop;return{width:this.width,scrollWidth:this.scrollWidth,scrollLeft:this.scrollLeft,height:this.height,scrollHeight:this.scrollHeight,scrollTop:this.scrollTop,widthChanged:t,scrollWidthChanged:n,scrollLeftChanged:i,heightChanged:o,scrollHeightChanged:r,scrollTopChanged:s}},e}(),l=function(e){function t(t,n){var i=e.call(this)||this;return i._onScroll=i._register(new s.vl),i.onScroll=i._onScroll.event,i._smoothScrollDuration=t,i._scheduleAtNextAnimationFrame=n,i._state=new u(0,0,0,0,0,0),i._smoothScrolling=null,i}return a(t,e),t.prototype.dispose=function(){this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),e.prototype.dispose.call(this)},t.prototype.setSmoothScrollDuration=function(e){this._smoothScrollDuration=e},t.prototype.validateScrollPosition=function(e){return this._state.withScrollPosition(e)},t.prototype.getScrollDimensions=function(){return this._state},t.prototype.setScrollDimensions=function(e){var t=this._state.withScrollDimensions(e);this._setState(t),this._smoothScrolling&&this._smoothScrolling.acceptScrollDimensions(this._state)},t.prototype.getFutureScrollPosition=function(){return this._smoothScrolling?this._smoothScrolling.to:this._state},t.prototype.getCurrentScrollPosition=function(){return this._state},t.prototype.setScrollPositionNow=function(e){var t=this._state.withScrollPosition(e);this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),this._setState(t)},t.prototype.setScrollPositionSmooth=function(e){var t=this;if(0===this._smoothScrollDuration)return this.setScrollPositionNow(e);if(this._smoothScrolling){e={scrollLeft:void 0===e.scrollLeft?this._smoothScrolling.to.scrollLeft:e.scrollLeft,scrollTop:void 0===e.scrollTop?this._smoothScrolling.to.scrollTop:e.scrollTop};var n=this._state.withScrollPosition(e);if(this._smoothScrolling.to.scrollLeft===n.scrollLeft&&this._smoothScrolling.to.scrollTop===n.scrollTop)return;var i=this._smoothScrolling.combine(this._state,n,this._smoothScrollDuration);this._smoothScrolling.dispose(),this._smoothScrolling=i}else n=this._state.withScrollPosition(e),this._smoothScrolling=d.start(this._state,n,this._smoothScrollDuration);this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame((function(){t._smoothScrolling&&(t._smoothScrolling.animationFrameDisposable=null,t._performSmoothScrolling())}))},t.prototype._performSmoothScrolling=function(){var e=this,t=this._smoothScrolling.tick(),n=this._state.withScrollPosition(t);if(this._setState(n),t.isDone)return this._smoothScrolling.dispose(),void(this._smoothScrolling=null);this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame((function(){e._smoothScrolling&&(e._smoothScrolling.animationFrameDisposable=null,e._performSmoothScrolling())}))},t.prototype._setState=function(e){var t=this._state;t.equals(e)||(this._state=e,this._onScroll.fire(this._state.createScrollEvent(t)))},t}(r.jG),c=function(e,t,n){this.scrollLeft=e,this.scrollTop=t,this.isDone=n};function h(e,t){var n=t-e;return function(t){return e+n*(1-(i=1-t,Math.pow(i,3)));var i}}var d=function(){function e(e,t,n,i){this.from=e,this.to=t,this.duration=i,this._startTime=n,this.animationFrameDisposable=null,this._initAnimations()}return e.prototype._initAnimations=function(){this.scrollLeft=this._initAnimation(this.from.scrollLeft,this.to.scrollLeft,this.to.width),this.scrollTop=this._initAnimation(this.from.scrollTop,this.to.scrollTop,this.to.height)},e.prototype._initAnimation=function(e,t,n){var i,o,r;if(Math.abs(e-t)>2.5*n){var s=void 0,a=void 0;return e{"use strict";n.r(t),n.d(t,{UTF8_BOM_CHARACTER:()=>B,commonPrefixLength:()=>D,commonSuffixLength:()=>k,compare:()=>w,compareIgnoreCase:()=>M,containsEmoji:()=>R,containsFullWidthCharacter:()=>W,containsRTL:()=>j,convertSimple2RegExpPattern:()=>f,createRegExp:()=>m,empty:()=>i,endsWith:()=>g,equalsIgnoreCase:()=>I,escape:()=>u,escapeRegExpCharacters:()=>l,firstNonWhitespaceIndex:()=>y,format:()=>a,getLeadingWhitespace:()=>b,isBasicASCII:()=>z,isFalsyOrWhitespace:()=>o,isFullWidthCharacter:()=>F,isHighSurrogate:()=>T,isLowSurrogate:()=>E,isLowerAsciiLetter:()=>C,isUpperAsciiLetter:()=>S,lastNonWhitespaceIndex:()=>_,ltrim:()=>h,pad:()=>r,regExpLeadsToEndlessLoop:()=>v,repeat:()=>U,rtrim:()=>d,safeBtoa:()=>V,startsWith:()=>p,startsWithIgnoreCase:()=>x,startsWithUTF8BOM:()=>H,trim:()=>c});var i="";function o(e){return!e||"string"!=typeof e||0===e.trim().length}function r(e,t,n){void 0===n&&(n="0");for(var i=""+e,o=[i],r=i.length;r=t.length?e:t[i]}))}function u(e){return e.replace(/[<|>|&]/g,(function(e){switch(e){case"<":return"<";case">":return">";case"&":return"&";default:return e}}))}function l(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\[\]\(\)\#]/g,"\\$&")}function c(e,t){return void 0===t&&(t=" "),d(h(e,t),t)}function h(e,t){if(!e||!t)return e;var n=t.length;if(0===n||0===e.length)return e;for(var i=0;e.indexOf(t,i)===i;)i+=n;return e.substring(i)}function d(e,t){if(!e||!t)return e;var n=t.length,i=e.length;if(0===n||0===i)return e;for(var o=i,r=-1;-1!==(r=e.lastIndexOf(t,o-1))&&r+n===o;){if(0===r)return"";o=r}return e.substring(0,o)}function f(e){return e.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}function p(e,t){if(e.length0?e.indexOf(t,n)===n:0===n&&e===t}function m(e,t,n){if(void 0===n&&(n={}),!e)throw new Error("Cannot create regex from empty string");t||(e=l(e)),n.wholeWord&&(/\B/.test(e.charAt(0))||(e="\\b"+e),/\B/.test(e.charAt(e.length-1))||(e+="\\b"));var i="";return n.global&&(i+="g"),n.matchCase||(i+="i"),n.multiline&&(i+="m"),new RegExp(e,i)}function v(e){return"^"!==e.source&&"^$"!==e.source&&"$"!==e.source&&"^\\s*$"!==e.source&&e.exec("")&&0===e.lastIndex}function y(e){for(var t=0,n=e.length;t=0;n--){var i=e.charCodeAt(n);if(32!==i&&9!==i)return n}return-1}function w(e,t){return et?1:0}function M(e,t){for(var n=Math.min(e.length,t.length),i=0;it.length?1:0}function C(e){return e>=97&&e<=122}function S(e){return e>=65&&e<=90}function L(e){return C(e)||S(e)}function I(e,t){return(e?e.length:0)===(t?t.length:0)&&N(e,t)}function N(e,t,n){if(void 0===n&&(n=e.length),"string"!=typeof e||"string"!=typeof t)return!1;for(var i=0;ie.length)&&N(e,t,n)}function D(e,t){var n,i=Math.min(e.length,t.length);for(n=0;n=11904&&e<=55215||e>=63744&&e<=64255||e>=65281&&e<=65374}var B=String.fromCharCode(65279);function H(e){return e&&e.length>0&&65279===e.charCodeAt(0)}function V(e){return btoa(encodeURIComponent(e))}function U(e,t){for(var n="",i=0;i{"use strict";n.d(t,{Et:()=>a,Gv:()=>s,Kg:()=>r,Lm:()=>u,RI:()=>d,Tn:()=>f,b0:()=>l,cy:()=>o,jx:()=>p,vt:()=>m,z:()=>c});var i={number:"number",string:"string",undefined:"undefined",object:"object",function:"function"};function o(e){return Array.isArray?Array.isArray(e):!(!e||typeof e.length!==i.number||e.constructor!==Array)}function r(e){return typeof e===i.string||e instanceof String}function s(e){return!(typeof e!==i.object||null===e||Array.isArray(e)||e instanceof RegExp||e instanceof Date)}function a(e){return(typeof e===i.number||e instanceof Number)&&!isNaN(e)}function u(e){return!0===e||!1===e}function l(e){return typeof e===i.undefined}function c(e){return l(e)||null===e}var h=Object.prototype.hasOwnProperty;function d(e){if(!s(e))return!1;for(var t in e)if(h.call(e,t))return!1;return!0}function f(e){return typeof e===i.function}function p(e,t){for(var n=Math.min(e.length,t.length),i=0;i{"use strict";n.d(t,{A:()=>p});var i,o,r=n(94),s=(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),a=/^\w[\w\d+.-]*$/,u=/^\//,l=/^\/\//,c="",h="/",d=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/,f=function(){function e(e,t,n,i,o){"object"==typeof e?(this.scheme=e.scheme||c,this.authority=e.authority||c,this.path=e.path||c,this.query=e.query||c,this.fragment=e.fragment||c):(this.scheme=e||c,this.authority=t||c,this.path=function(e,t){switch(e){case"https":case"http":case"file":t?t[0]!==h&&(t=h+t):t=h}return t}(this.scheme,n||c),this.query=i||c,this.fragment=o||c,function(e){if(e.scheme&&!a.test(e.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(e.path)if(e.authority){if(!u.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(l.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 ("//")')}(this))}return e.isUri=function(t){return t instanceof e||!!t&&"string"==typeof t.authority&&"string"==typeof t.fragment&&"string"==typeof t.path&&"string"==typeof t.query&&"string"==typeof t.scheme},Object.defineProperty(e.prototype,"fsPath",{get:function(){return b(this)},enumerable:!0,configurable:!0}),e.prototype.with=function(e){if(!e)return this;var t=e.scheme,n=e.authority,i=e.path,o=e.query,r=e.fragment;return void 0===t?t=this.scheme:null===t&&(t=c),void 0===n?n=this.authority:null===n&&(n=c),void 0===i?i=this.path:null===i&&(i=c),void 0===o?o=this.query:null===o&&(o=c),void 0===r?r=this.fragment:null===r&&(r=c),t===this.scheme&&n===this.authority&&i===this.path&&o===this.query&&r===this.fragment?this:new g(t,n,i,o,r)},e.parse=function(e){var t=d.exec(e);return t?new g(t[2]||c,decodeURIComponent(t[4]||c),decodeURIComponent(t[5]||c),decodeURIComponent(t[7]||c),decodeURIComponent(t[9]||c)):new g(c,c,c,c,c)},e.file=function(e){var t=c;if(r.uF&&(e=e.replace(/\\/g,h)),e[0]===h&&e[1]===h){var n=e.indexOf(h,2);-1===n?(t=e.substring(2),e=h):(t=e.substring(2,n),e=e.substring(n)||h)}return new g("file",t,e,c,c)},e.from=function(e){return new g(e.scheme,e.authority,e.path,e.query,e.fragment)},e.prototype.toString=function(e){return void 0===e&&(e=!1),_(this,e)},e.prototype.toJSON=function(){return this},e.revive=function(t){if(t){if(t instanceof e)return t;var n=new g(t);return n._fsPath=t.fsPath,n._formatted=t.external,n}return t},e}();const p=f;var g=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._formatted=null,t._fsPath=null,t}return s(t,e),Object.defineProperty(t.prototype,"fsPath",{get:function(){return this._fsPath||(this._fsPath=b(this)),this._fsPath},enumerable:!0,configurable:!0}),t.prototype.toString=function(e){return void 0===e&&(e=!1),e?_(this,!0):(this._formatted||(this._formatted=_(this,!1)),this._formatted)},t.prototype.toJSON=function(){var e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath),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},t}(f),m=((o={})[58]="%3A",o[47]="%2F",o[63]="%3F",o[35]="%23",o[91]="%5B",o[93]="%5D",o[64]="%40",o[33]="%21",o[36]="%24",o[38]="%26",o[39]="%27",o[40]="%28",o[41]="%29",o[42]="%2A",o[43]="%2B",o[44]="%2C",o[59]="%3B",o[61]="%3D",o[32]="%20",o);function v(e,t){for(var n=void 0,i=-1,o=0;o=97&&r<=122||r>=65&&r<=90||r>=48&&r<=57||45===r||46===r||95===r||126===r||t&&47===r)-1!==i&&(n+=encodeURIComponent(e.substring(i,o)),i=-1),void 0!==n&&(n+=e.charAt(o));else{void 0===n&&(n=e.substr(0,o));var s=m[r];void 0!==s?(-1!==i&&(n+=encodeURIComponent(e.substring(i,o)),i=-1),n+=s):-1===i&&(i=o)}}return-1!==i&&(n+=encodeURIComponent(e.substring(i))),void 0!==n?n:e}function y(e){for(var t=void 0,n=0;n1&&"file"===e.scheme?"//"+e.authority+e.path:47===e.path.charCodeAt(0)&&(e.path.charCodeAt(1)>=65&&e.path.charCodeAt(1)<=90||e.path.charCodeAt(1)>=97&&e.path.charCodeAt(1)<=122)&&58===e.path.charCodeAt(2)?e.path[1].toLowerCase()+e.path.substr(2):e.path,r.uF&&(t=t.replace(/\//g,"\\")),t}function _(e,t){var n=t?y:v,i="",o=e.scheme,r=e.authority,s=e.path,a=e.query,u=e.fragment;if(o&&(i+=o,i+=":"),(r||"file"===o)&&(i+=h,i+=h),r){var l=r.indexOf("@");if(-1!==l){var c=r.substr(0,l);r=r.substr(l+1),-1===(l=c.indexOf(":"))?i+=n(c,!1):(i+=n(c.substr(0,l),!1),i+=":",i+=n(c.substr(l+1),!1)),i+="@"}-1===(l=(r=r.toLowerCase()).indexOf(":"))?i+=n(r,!1):(i+=n(r.substr(0,l),!1),i+=r.substr(l))}if(s){if(s.length>=3&&47===s.charCodeAt(0)&&58===s.charCodeAt(2))(d=s.charCodeAt(1))>=65&&d<=90&&(s="/"+String.fromCharCode(d+32)+":"+s.substr(3));else if(s.length>=2&&58===s.charCodeAt(1)){var d;(d=s.charCodeAt(0))>=65&&d<=90&&(s=String.fromCharCode(d+32)+":"+s.substr(2))}i+=n(s,!0)}return a&&(i+="?",i+=n(a,!1)),u&&(i+="#",i+=t?u:v(u,!1)),i}},2337:(e,t,n)=>{"use strict";n.d(t,{K7:()=>r,g3:()=>s});var i,o=n(8957);!function(){var e=Object.create(null);e["WinJS/Core/_WinJS"]={};var t=function(t,n,i){var o={},r=!1,s=n.map((function(t){return"exports"===t?(r=!0,o):e[t]})),a=i.apply({},s);e[t]=r?o:a};t("WinJS/Core/_Global",[],(function(){return"undefined"!=typeof window?window:"undefined"!=typeof self?self:void 0!==n.g?n.g:{}})),t("WinJS/Core/_BaseCoreUtils",["WinJS/Core/_Global"],(function(e){var t=!!e.Windows,n=null;return{hasWinRT:t,markSupportedForProcessing:function(e){return e.supportedForProcessing=!0,e},_setImmediate:function(t){null===n&&(n=e.setImmediate?e.setImmediate.bind(e):void 0!==o&&"function"==typeof o.nextTick?o.nextTick.bind(o):e.setTimeout.bind(e)),n(t)}}})),t("WinJS/Core/_WriteProfilerMark",["WinJS/Core/_Global"],(function(e){return e.msWriteProfilerMark||function(){}})),t("WinJS/Core/_Base",["WinJS/Core/_WinJS","WinJS/Core/_Global","WinJS/Core/_BaseCoreUtils","WinJS/Core/_WriteProfilerMark"],(function(e,t,n,i){function o(e,t,n){var i,o,r,s=Object.keys(t),a=Array.isArray(e);for(o=0,r=s.length;o"),i}n.Namespace||(n.Namespace=Object.create(Object.prototype));Object.defineProperties(n.Namespace,{defineWithParent:{value:s,writable:!0,enumerable:!0,configurable:!0},define:{value:function(e,n){return s(t,e,n)},writable:!0,enumerable:!0,configurable:!0},_lazy:{value:function(e){var t,n,o=1;return{setName:function(e){t=e},get:function(){switch(o){case 3:return n;case 1:o=2;try{i("WinJS.Namespace._lazy:"+t+",StartTM"),n=e()}finally{i("WinJS.Namespace._lazy:"+t+",StopTM"),o=1}return e=null,o=3,n;case 2:throw"Illegal: reentrancy on initialization";default:throw"Illegal"}},set:function(e){if(2===o)throw"Illegal: reentrancy on initialization";o=3,n=e},enumerable:!0,configurable:!0}},writable:!0,enumerable:!0,configurable:!0},_moduleDefine:{value:function(e,n,i){var s=[e],a=null;return n&&(a=r(t,n),s.push(a)),o(s,i,n||""),a},writable:!0,enumerable:!0,configurable:!0}})}(),function(){function t(e,t,i){return e=e||function(){},n.markSupportedForProcessing(e),t&&o(e.prototype,t),i&&o(e,i),e}e.Namespace.define("WinJS.Class",{define:t,derive:function(e,i,r,s){if(e){i=i||function(){};var a=e.prototype;return i.prototype=Object.create(a),n.markSupportedForProcessing(i),Object.defineProperty(i.prototype,"constructor",{value:i,writable:!0,configurable:!0,enumerable:!0}),r&&o(i.prototype,r),s&&o(i,s),i}return t(i,r,s)},mix:function(e){var t,n;for(e=e||function(){},t=1,n=arguments.length;t{"use strict";n.r(t),n.d(t,{ShiftCommand:()=>u});var i=n(899),o=n(1315),r=n(1456),s=n(799),a=n(7623),u=function(){function e(e,t){this._opts=t,this._selection=e,this._useLastEditRangeForCursorEndPosition=!1,this._selectionStartColumnStaysPut=!1}return e.unshiftIndentCount=function(e,t,n){var i=o.A_.visibleColumnFromColumn(e,t,n);return o.A_.prevTabStop(i,n)/n},e.shiftIndentCount=function(e,t,n){var i=o.A_.visibleColumnFromColumn(e,t,n);return o.A_.nextTabStop(i,n)/n},e.prototype._addEditOperation=function(e,t,n){this._useLastEditRangeForCursorEndPosition?e.addTrackedEditOperation(t,n):e.addEditOperation(t,n)},e.prototype.getEditOperations=function(t,n){var s=this._selection.startLineNumber,u=this._selection.endLineNumber;1===this._selection.endColumn&&s!==u&&(u-=1);var l=this._opts.tabSize,c=this._opts.oneIndent,h=s===u;if(this._selection.isEmpty()&&/^\s*$/.test(t.getLineContent(s))&&(this._useLastEditRangeForCursorEndPosition=!0),this._opts.useTabStops)for(var d=["",c],f=0,p=0,g=s;g<=u;g++,f=p){p=0;var m=t.getLineContent(g),v=i.firstNonWhitespaceIndex(m);if((!this._opts.isUnshift||0!==m.length&&0!==v)&&(h||this._opts.isUnshift||0!==m.length)){if(-1===v&&(v=m.length),g>1&&o.A_.visibleColumnFromColumn(m,v+1,l)%l!=0&&t.isCheapToTokenize(g-1)){var y=a.cx.getRawEnterActionAtPosition(t,g-1,t.getLineMaxColumn(g-1));if(y){if(p=f,y.appendText)for(var b=0,_=y.appendText.length;b<_&&p{"use strict";n.d(t,{Ah:()=>i,HF:()=>I,Pk:()=>k,Re:()=>D,U7:()=>r,Wo:()=>L,a2:()=>p,jU:()=>x,m9:()=>s,tJ:()=>o,wb:()=>g,xs:()=>v});var i,o,r,s,a=n(486),u=n(94),l=n(9664),c=n(1279),h=n(7339),d=n(4709),f=Object.assign||function(e){for(var t,n=1,i=arguments.length;n=2?(S=y?i.Large:i.LargeBlocks,A=2/_):(S=y?i.Small:i.SmallBlocks,A=1/_),(I=Math.max(0,Math.floor((E-d-2)*A/(c+A))))/A>b&&(I=Math.floor(b*A)),N=E-I,"left"===v?(L=0,x+=I,D+=I,k+=I,T+=I):L=t-I-d}else L=0,I=0,S=i.None,N=E;var j=f?p:0;return{width:t,height:n,glyphMarginLeft:x,glyphMarginWidth:C,glyphMarginHeight:n,lineNumbersLeft:D,lineNumbersWidth:w,lineNumbersHeight:n,decorationsLeft:k,decorationsWidth:l,decorationsHeight:n,contentLeft:T,contentWidth:N,contentHeight:n,renderMinimap:S,minimapLeft:L,minimapWidth:I,viewportColumn:Math.max(1,Math.floor((N-d-2)/c)),verticalScrollbarWidth:d,horizontalScrollbarHeight:g,overviewRuler:{top:j,width:d,height:n-2*j,right:0}}},e}(),x={fontFamily:u.zx?"Menlo, Monaco, 'Courier New', monospace":u.j9?"'Droid Sans Mono', 'monospace', monospace, 'Droid Sans Fallback'":"Consolas, 'Courier New', monospace",fontWeight:"normal",fontSize:u.zx?12:14,lineHeight:0,letterSpacing:0},D={tabSize:4,insertSpaces:!0,detectIndentation:!0,trimAutoWhitespace:!0,largeFileOptimizations:!0},k={inDiffEditor:!1,wordSeparators:c.J3,lineNumbersMinChars:5,lineDecorationsWidth:10,readOnly:!1,mouseStyle:"text",disableLayerHinting:!1,automaticLayout:!1,wordWrap:"off",wordWrapColumn:80,wordWrapMinified:!0,wrappingIndent:o.Same,wordWrapBreakBeforeCharacters:"([{‘“〈《「『【〔([{「£¥$£¥++",wordWrapBreakAfterCharacters:" \t})]?|&,;¢°′″‰℃、。。、¢,.:;?!%・・ゝゞヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻ァィゥェォャュョッー”〉》」』】〕)]}」",wordWrapBreakObtrusiveCharacters:".",autoClosingBrackets:!0,autoIndent:!0,dragAndDrop:!0,emptySelectionClipboard:!0,useTabStops:!0,multiCursorModifier:"altKey",multiCursorMergeOverlapping:!0,accessibilitySupport:"auto",showUnused:!0,viewInfo:{extraEditorClassName:"",disableMonospaceOptimizations:!1,rulers:[],ariaLabel:a.k("editorViewAccessibleLabel","Editor content"),renderLineNumbers:1,renderCustomLineNumbers:null,selectOnLineNumbers:!0,glyphMargin:!0,revealHorizontalRightPadding:30,roundedSelection:!0,overviewRulerLanes:2,overviewRulerBorder:!0,cursorBlinking:r.Blink,mouseWheelZoom:!1,cursorStyle:s.Line,cursorWidth:0,hideCursorInOverviewRuler:!1,scrollBeyondLastLine:!0,scrollBeyondLastColumn:5,smoothScrolling:!1,stopRenderingLineAfter:1e4,renderWhitespace:"none",renderControlCharacters:!1,fontLigatures:!1,renderIndentGuides:!0,highlightActiveIndentGuide:!0,renderLineHighlight:"line",scrollbar:{vertical:l.XR.Auto,horizontal:l.XR.Auto,arrowSize:11,useShadows:!0,verticalHasArrows:!1,horizontalHasArrows:!1,horizontalScrollbarSize:10,horizontalSliderSize:10,verticalScrollbarSize:14,verticalSliderSize:14,handleMouseWheel:!0,mouseWheelScrollSensitivity:1},minimap:{enabled:!0,side:"right",showSlider:"mouseover",renderCharacters:!0,maxColumn:120},fixedOverflowWidgets:!1},contribInfo:{selectionClipboard:!0,hover:{enabled:!0,delay:300,sticky:!0},links:!0,contextmenu:!0,quickSuggestions:{other:!0,comments:!1,strings:!1},quickSuggestionsDelay:10,parameterHints:!0,iconsInSuggestions:!0,formatOnType:!1,formatOnPaste:!1,suggestOnTriggerCharacters:!0,acceptSuggestionOnEnter:"on",acceptSuggestionOnCommitCharacter:!0,wordBasedSuggestions:!0,suggestSelection:"recentlyUsed",suggestFontSize:0,suggestLineHeight:0,suggest:{filterGraceful:!0,snippets:"inline",snippetsPreventQuickSuggestions:!0},selectionHighlight:!0,occurrencesHighlight:!0,codeLens:!0,folding:!0,foldingStrategy:"auto",showFoldingControls:"mouseover",matchBrackets:!0,find:{seedSearchStringFromSelection:!0,autoFindInSelection:!1,globalFindClipboard:!1},colorDecorators:!0,lightbulbEnabled:!0,codeActionsOnSave:{},codeActionsOnSaveTimeout:750}}},1315:(e,t,n)=>{"use strict";n.d(t,{A_:()=>g,MF:()=>f,Q8:()=>d,d$:()=>c,mG:()=>h,vY:()=>p});var i=n(386),o=n(899),r=n(4170),s=n(799),a=n(1456),u=n(7623),l=n(5538),c=function(){function e(t,n,i,o){this._languageIdentifier=t;var r=o.editor;this.readOnly=r.readOnly,this.tabSize=i.tabSize,this.insertSpaces=i.insertSpaces,this.oneIndent=n,this.pageSize=Math.max(1,Math.floor(r.layoutInfo.height/r.fontInfo.lineHeight)-2),this.lineHeight=r.lineHeight,this.useTabStops=r.useTabStops,this.wordSeparators=r.wordSeparators,this.emptySelectionClipboard=r.emptySelectionClipboard,this.multiCursorMergeOverlapping=r.multiCursorMergeOverlapping,this.autoClosingBrackets=r.autoClosingBrackets,this.autoIndent=r.autoIndent,this.autoClosingPairsOpen={},this.autoClosingPairsClose={},this.surroundingPairs={},this._electricChars=null;var s=e._getAutoClosingPairs(t);if(s)for(var a=0;a=i.length)&&o.isLowSurrogate(i.charCodeAt(n))},e.isHighSurrogate=function(e,t,n){var i=e.getLineContent(t);return!(n<0||n>=i.length)&&o.isHighSurrogate(i.charCodeAt(n))},e.isInsideSurrogatePair=function(e,t,n){return this.isHighSurrogate(e,t,n-2)},e.visibleColumnFromColumn=function(e,t,n){var i=e.length;i>t-1&&(i=t-1);for(var r=0,s=0;s=t)return a-ts?s:o},e.nextTabStop=function(e,t){return e+t-e%t},e.prevTabStop=function(e,t){return e-1-(e-1)%t},e}()},2040:(e,t,n)=>{"use strict";n.d(t,{i:()=>l});var i,o,r,s=n(2879),a=(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),u=function(e){function t(t){for(var n=e.call(this,0)||this,i=0,o=t.length;i{"use strict";n.d(t,{V:()=>o,y:()=>r});var i=n(7597),o=function(){function e(t){var n=(0,i.W_)(t);this._defaultValue=n,this._asciiMap=e._createAsciiMap(n),this._map=new Map}return e._createAsciiMap=function(e){for(var t=new Uint8Array(256),n=0;n<256;n++)t[n]=e;return t},e.prototype.set=function(e,t){var n=(0,i.W_)(t);e>=0&&e<256?this._asciiMap[e]=n:this._map.set(e,n)},e.prototype.get=function(e){return e>=0&&e<256?this._asciiMap[e]:this._map.get(e)||this._defaultValue},e}(),r=function(){function e(){this._actual=new o(0)}return e.prototype.add=function(e){this._actual.set(e,1)},e.prototype.has=function(e){return 1===this._actual.get(e)},e}()},8953:(e,t,n)=>{"use strict";n.d(t,{f:()=>o});var i=n(5439),o=function(){function e(e,t){this._tokens=e,this._tokensCount=this._tokens.length>>>1,this._text=t}return e.prototype.equals=function(t){return t instanceof e&&this.slicedEquals(t,0,this._tokensCount)},e.prototype.slicedEquals=function(e,t,n){if(this._text!==e._text)return!1;if(this._tokensCount!==e._tokensCount)return!1;for(var i=t<<1,o=i+(n<<1),r=i;r0?this._tokens[e-1<<1]:0},e.prototype.getLanguageId=function(e){var t=this._tokens[1+(e<<1)];return i.xn.getLanguageId(t)},e.prototype.getStandardTokenType=function(e){var t=this._tokens[1+(e<<1)];return i.xn.getTokenType(t)},e.prototype.getForeground=function(e){var t=this._tokens[1+(e<<1)];return i.xn.getForeground(t)},e.prototype.getClassName=function(e){var t=this._tokens[1+(e<<1)];return i.xn.getClassNameFromMetadata(t)},e.prototype.getInlineStyle=function(e,t){var n=this._tokens[1+(e<<1)];return i.xn.getInlineStyleFromMetadata(n,t)},e.prototype.getEndOffset=function(e){return this._tokens[e<<1]},e.prototype.findTokenIndexAtOffset=function(t){return e.findIndexInTokensArray(this._tokens,t)},e.prototype.inflate=function(){return this},e.prototype.sliceAndInflate=function(e,t,n){return new r(this,e,t,n)},e.convertToEndOffset=function(e,t){for(var n=(e.length>>>1)-1,i=0;i>>1)-1;nt&&(i=o)}return n},e}(),r=function(){function e(e,t,n,i){this._source=e,this._startOffset=t,this._endOffset=n,this._deltaOffset=i,this._firstTokenIndex=e.findTokenIndexAtOffset(t),this._tokensCount=0;for(var o=this._firstTokenIndex,r=e.getCount();o=n);o++)this._tokensCount++}return e.prototype.equals=function(t){return t instanceof e&&this._startOffset===t._startOffset&&this._endOffset===t._endOffset&&this._deltaOffset===t._deltaOffset&&this._source.slicedEquals(t._source,this._firstTokenIndex,this._tokensCount)},e.prototype.getCount=function(){return this._tokensCount},e.prototype.getForeground=function(e){return this._source.getForeground(this._firstTokenIndex+e)},e.prototype.getEndOffset=function(e){var t=this._source.getEndOffset(this._firstTokenIndex+e);return Math.min(this._endOffset,t)-this._startOffset+this._deltaOffset},e.prototype.getClassName=function(e){return this._source.getClassName(this._firstTokenIndex+e)},e.prototype.getInlineStyle=function(e,t){return this._source.getInlineStyle(this._firstTokenIndex+e,t)},e.prototype.findTokenIndexAtOffset=function(e){return this._source.findTokenIndexAtOffset(e+this._startOffset-this._deltaOffset)-this._firstTokenIndex},e}()},386:(e,t,n)=>{"use strict";n.d(t,{y:()=>i});var i=function(){function e(e,t){this.lineNumber=e,this.column=t}return e.prototype.equals=function(t){return e.equals(this,t)},e.equals=function(e,t){return!e&&!t||!!e&&!!t&&e.lineNumber===t.lineNumber&&e.column===t.column},e.prototype.isBefore=function(t){return e.isBefore(this,t)},e.isBefore=function(e,t){return e.lineNumber{"use strict";n.d(t,{Q:()=>o});var i=n(386),o=function(){function e(e,t,n,i){e>n||e===n&&t>i?(this.startLineNumber=n,this.startColumn=i,this.endLineNumber=e,this.endColumn=t):(this.startLineNumber=e,this.startColumn=t,this.endLineNumber=n,this.endColumn=i)}return e.prototype.isEmpty=function(){return e.isEmpty(this)},e.isEmpty=function(e){return e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn},e.prototype.containsPosition=function(t){return e.containsPosition(this,t)},e.containsPosition=function(e,t){return!(t.lineNumbere.endLineNumber||t.lineNumber===e.startLineNumber&&t.columne.endColumn)},e.prototype.containsRange=function(t){return e.containsRange(this,t)},e.containsRange=function(e,t){return!(t.startLineNumbere.endLineNumber||t.endLineNumber>e.endLineNumber||t.startLineNumber===e.startLineNumber&&t.startColumne.endColumn)},e.prototype.plusRange=function(t){return e.plusRange(this,t)},e.plusRange=function(t,n){var i,o,r,s;return n.startLineNumbert.endLineNumber?(r=n.endLineNumber,s=n.endColumn):n.endLineNumber===t.endLineNumber?(r=n.endLineNumber,s=Math.max(n.endColumn,t.endColumn)):(r=t.endLineNumber,s=t.endColumn),new e(i,o,r,s)},e.prototype.intersectRanges=function(t){return e.intersectRanges(this,t)},e.intersectRanges=function(t,n){var i=t.startLineNumber,o=t.startColumn,r=t.endLineNumber,s=t.endColumn,a=n.startLineNumber,u=n.startColumn,l=n.endLineNumber,c=n.endColumn;return il?(r=l,s=c):r===l&&(s=Math.min(s,c)),i>r||i===r&&o>s?null:new e(i,o,r,s)},e.prototype.equalsRange=function(t){return e.equalsRange(this,t)},e.equalsRange=function(e,t){return!!e&&!!t&&e.startLineNumber===t.startLineNumber&&e.startColumn===t.startColumn&&e.endLineNumber===t.endLineNumber&&e.endColumn===t.endColumn},e.prototype.getEndPosition=function(){return new i.y(this.endLineNumber,this.endColumn)},e.prototype.getStartPosition=function(){return new i.y(this.startLineNumber,this.startColumn)},e.prototype.toString=function(){return"["+this.startLineNumber+","+this.startColumn+" -> "+this.endLineNumber+","+this.endColumn+"]"},e.prototype.setEndPosition=function(t,n){return new e(this.startLineNumber,this.startColumn,t,n)},e.prototype.setStartPosition=function(t,n){return new e(t,n,this.endLineNumber,this.endColumn)},e.prototype.collapseToStart=function(){return e.collapseToStart(this)},e.collapseToStart=function(t){return new e(t.startLineNumber,t.startColumn,t.startLineNumber,t.startColumn)},e.fromPositions=function(t,n){return void 0===n&&(n=t),new e(t.lineNumber,t.column,n.lineNumber,n.column)},e.lift=function(t){return t?new e(t.startLineNumber,t.startColumn,t.endLineNumber,t.endColumn):null},e.isIRange=function(e){return e&&"number"==typeof e.startLineNumber&&"number"==typeof e.startColumn&&"number"==typeof e.endLineNumber&&"number"==typeof e.endColumn},e.areIntersectingOrTouching=function(e,t){return!(e.endLineNumbere.startLineNumber},e}()},799:(e,t,n)=>{"use strict";n.d(t,{L:()=>u,S:()=>o});var i,o,r=n(1456),s=n(386),a=(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});!function(e){e[e.LTR=0]="LTR",e[e.RTL=1]="RTL"}(o||(o={}));var u=function(e){function t(t,n,i,o){var r=e.call(this,t,n,i,o)||this;return r.selectionStartLineNumber=t,r.selectionStartColumn=n,r.positionLineNumber=i,r.positionColumn=o,r}return a(t,e),t.prototype.clone=function(){return new t(this.selectionStartLineNumber,this.selectionStartColumn,this.positionLineNumber,this.positionColumn)},t.prototype.toString=function(){return"["+this.selectionStartLineNumber+","+this.selectionStartColumn+" -> "+this.positionLineNumber+","+this.positionColumn+"]"},t.prototype.equalsSelection=function(e){return t.selectionsEqual(this,e)},t.selectionsEqual=function(e,t){return e.selectionStartLineNumber===t.selectionStartLineNumber&&e.selectionStartColumn===t.selectionStartColumn&&e.positionLineNumber===t.positionLineNumber&&e.positionColumn===t.positionColumn},t.prototype.getDirection=function(){return this.selectionStartLineNumber===this.startLineNumber&&this.selectionStartColumn===this.startColumn?o.LTR:o.RTL},t.prototype.setEndPosition=function(e,n){return this.getDirection()===o.LTR?new t(this.startLineNumber,this.startColumn,e,n):new t(e,n,this.startLineNumber,this.startColumn)},t.prototype.getPosition=function(){return new s.y(this.positionLineNumber,this.positionColumn)},t.prototype.setStartPosition=function(e,n){return this.getDirection()===o.LTR?new t(e,n,this.endLineNumber,this.endColumn):new t(this.endLineNumber,this.endColumn,e,n)},t.fromPositions=function(e,n){return void 0===n&&(n=e),new t(e.lineNumber,e.column,n.lineNumber,n.column)},t.liftSelection=function(e){return new t(e.selectionStartLineNumber,e.selectionStartColumn,e.positionLineNumber,e.positionColumn)},t.selectionsArrEqual=function(e,t){if(e&&!t||!e&&t)return!1;if(!e&&!t)return!0;if(e.length!==t.length)return!1;for(var n=0,i=e.length;n{"use strict";n.d(t,{$M:()=>o,Zj:()=>r,ou:()=>i});var i=function(){function e(e,t,n){this.offset=0|e,this.type=t,this.language=n}return e.prototype.toString=function(){return"("+this.offset+", "+this.type+")"},e}(),o=function(e,t){this.tokens=e,this.endState=t},r=function(e,t){this.tokens=e,this.endState=t}},7597:(e,t,n)=>{"use strict";n.d(t,{EA:()=>s,Ie:()=>i,W_:()=>o,jT:()=>r});var i=function(){function e(e,t,n){for(var i=new Uint8Array(e*t),o=0,r=e*t;o255?255:0|e}function r(e){return e<0?0:e>4294967295?4294967295:0|e}function s(e){for(var t=e.length,n=new Uint32Array(t),i=0;i{"use strict";var i,o,r,s;n.d(t,{A5:()=>i,Dg:()=>l,F4:()=>c,WU:()=>s,X2:()=>u,kK:()=>a,kf:()=>o,of:()=>r}),function(e){e[e.Left=1]="Left",e[e.Center=2]="Center",e[e.Right=4]="Right",e[e.Full=7]="Full"}(i||(i={})),function(e){e[e.TextDefined=0]="TextDefined",e[e.LF=1]="LF",e[e.CRLF=2]="CRLF"}(o||(o={})),function(e){e[e.LF=1]="LF",e[e.CRLF=2]="CRLF"}(r||(r={})),function(e){e[e.LF=0]="LF",e[e.CRLF=1]="CRLF"}(s||(s={}));var a,u=function(){function e(e){this.tabSize=0|e.tabSize,this.insertSpaces=Boolean(e.insertSpaces),this.defaultEOL=0|e.defaultEOL,this.trimAutoWhitespace=Boolean(e.trimAutoWhitespace)}return e.prototype.equals=function(e){return this.tabSize===e.tabSize&&this.insertSpaces===e.insertSpaces&&this.defaultEOL===e.defaultEOL&&this.trimAutoWhitespace===e.trimAutoWhitespace},e.prototype.createChangeEvent=function(e){return{tabSize:this.tabSize!==e.tabSize,insertSpaces:this.insertSpaces!==e.insertSpaces,trimAutoWhitespace:this.trimAutoWhitespace!==e.trimAutoWhitespace}},e}(),l=function(e,t){this.range=e,this.matches=t};!function(e){e[e.AlwaysGrowsWhenTypingAtEdges=0]="AlwaysGrowsWhenTypingAtEdges",e[e.NeverGrowsWhenTypingAtEdges=1]="NeverGrowsWhenTypingAtEdges",e[e.GrowsOnlyWhenTypingBefore=2]="GrowsOnlyWhenTypingBefore",e[e.GrowsOnlyWhenTypingAfter=3]="GrowsOnlyWhenTypingAfter"}(a||(a={}));var c=function(e,t,n){this.reverseEdits=e,this.changes=t,this.trimAutoWhitespaceLineNumbers=n}},4170:(e,t,n)=>{"use strict";n.d(t,{kI:()=>Ve,Bz:()=>We});var i=n(6807),o=n(2213),r=n(4076),s=n(5439),a=n(5538),u=function(){function e(e,t){this.beforeVersionId=e,this.beforeCursorState=t,this.afterCursorState=null,this.afterVersionId=-1,this.editOperations=[]}return e.prototype.undo=function(e){for(var t=this.editOperations.length-1;t>=0;t--)this.editOperations[t]={operations:e.applyEdits(this.editOperations[t].operations)}},e.prototype.redo=function(e){for(var t=0;t0){var e=this.past.pop();try{e.undo(this.model)}catch(e){return(0,a.dz)(e),this.clear(),null}return this.future.push(e),{selections:e.beforeCursorState,recordedVersionId:e.beforeVersionId}}return null},e.prototype.canUndo=function(){return this.past.length>0},e.prototype.redo=function(){if(this.future.length>0){var e=this.future.pop();try{e.redo(this.model)}catch(e){return(0,a.dz)(e),this.clear(),null}return this.past.push(e),{selections:e.afterCursorState,recordedVersionId:e.afterVersionId}}return null},e.prototype.canRedo=function(){return this.future.length>0},e}(),d=n(1456),f=n(799),p=function(){this.changeType=1},g=function(e,t){this.changeType=2,this.lineNumber=e,this.detail=t},m=function(e,t){this.changeType=3,this.fromLineNumber=e,this.toLineNumber=t},v=function(e,t,n){this.changeType=4,this.fromLineNumber=e,this.toLineNumber=t,this.detail=n},y=function(){this.changeType=5},b=function(){function e(e,t,n,i){this.changes=e,this.versionId=t,this.isUndoing=n,this.isRedoing=i}return e.prototype.containsEvent=function(e){for(var t=0,n=this.changes.length;t>>0}function C(e,t){e.metadata=254&e.metadata|t}function S(e){return(2&e.metadata)>>>1==1}function L(e,t){e.metadata=253&e.metadata|(t?1:0)<<1}function I(e){return(4&e.metadata)>>>2==1}function N(e,t){e.metadata=251&e.metadata|(t?1:0)<<2}function x(e){return(8&e.metadata)>>>3==1}function D(e,t){e.metadata=247&e.metadata|(t?1:0)<<3}function k(e,t){e.metadata=207&e.metadata|t<<4}var T=function(){function e(e,t,n){this.metadata=0,this.parent=null,this.left=null,this.right=null,C(this,1),this.start=t,this.end=n,this.delta=0,this.maxEnd=n,this.id=e,this.ownerId=0,this.options=null,N(this,!1),k(this,1),D(this,!1),this.cachedVersionId=0,this.cachedAbsoluteStart=t,this.cachedAbsoluteEnd=n,this.range=null,L(this,!1)}return e.prototype.reset=function(e,t,n,i){this.start=t,this.end=n,this.maxEnd=n,this.cachedVersionId=e,this.cachedAbsoluteStart=t,this.cachedAbsoluteEnd=n,this.range=i},e.prototype.setOptions=function(e){this.options=e;var t=this.options.className;N(this,"squiggly-error"===t||"squiggly-warning"===t||"squiggly-info"===t),k(this,this.options.stickiness),D(this,!!this.options.overviewRuler.color)},e.prototype.setCachedOffsets=function(e,t,n){this.cachedVersionId!==n&&(this.range=null),this.cachedVersionId=n,this.cachedAbsoluteStart=e,this.cachedAbsoluteEnd=t},e.prototype.detach=function(){this.parent=null,this.left=null,this.right=null},e}(),E=new T(null,0,0);E.parent=E,E.left=E,E.right=E,C(E,0);var A=function(){function e(){this.root=E,this.requestNormalizeDelta=!1}return e.prototype.intervalSearch=function(e,t,n,i,o){return this.root===E?[]:function(e,t,n,i,o,r){for(var s=e.root,a=0,u=0,l=0,c=[],h=0;s!==E;)if(S(s))L(s.left,!1),L(s.right,!1),s===s.parent.right&&(a-=s.parent.delta),s=s.parent;else{if(!S(s.left)){if(a+s.maxEndn)L(s,!0);else{if((l=a+s.end)>=t){s.setCachedOffsets(u,l,r);var d=!0;i&&s.ownerId&&s.ownerId!==i&&(d=!1),o&&I(s)&&(d=!1),d&&(c[h++]=s)}L(s,!0),s.right===E||S(s.right)||(a+=s.delta,s=s.right)}}return L(e.root,!1),c}(this,e,t,n,i,o)},e.prototype.search=function(e,t,n){return this.root===E?[]:function(e,t,n,i){for(var o=e.root,r=0,s=0,a=0,u=[],l=0;o!==E;)if(S(o))L(o.left,!1),L(o.right,!1),o===o.parent.right&&(r-=o.parent.delta),o=o.parent;else if(o.left===E||S(o.left)){s=r+o.start,a=r+o.end,o.setCachedOffsets(s,a,i);var c=!0;t&&o.ownerId&&o.ownerId!==t&&(c=!1),n&&I(o)&&(c=!1),c&&(u[l++]=o),L(o,!0),o.right===E||S(o.right)||(r+=o.delta,o=o.right)}else o=o.left;return L(e.root,!1),u}(this,e,t,n)},e.prototype.collectNodesFromOwner=function(e){return function(e,t){for(var n=e.root,i=[],o=0;n!==E;)S(n)?(L(n.left,!1),L(n.right,!1),n=n.parent):n.left===E||S(n.left)?(n.ownerId===t&&(i[o++]=n),L(n,!0),n.right===E||S(n.right)||(n=n.right)):n=n.left;return L(e.root,!1),i}(this,e)},e.prototype.collectNodesPostOrder=function(){return function(e){for(var t=e.root,n=[],i=0;t!==E;)S(t)?(L(t.left,!1),L(t.right,!1),t=t.parent):t.left===E||S(t.left)?t.right===E||S(t.right)?(n[i++]=t,L(t,!0)):t=t.right:t=t.left;return L(e.root,!1),n}(this)},e.prototype.insert=function(e){R(this,e),this._normalizeDeltaIfNecessary()},e.prototype.delete=function(e){P(this,e),this._normalizeDeltaIfNecessary()},e.prototype.resolveNode=function(e,t){for(var n=e,i=0;e!==this.root;)e===e.parent.right&&(i+=e.parent.delta),e=e.parent;var o=n.start+i,r=n.end+i;n.setCachedOffsets(o,r,t)},e.prototype.acceptReplace=function(e,t,n,i){for(var o=function(e,t,n){for(var i=e.root,o=0,r=0,s=0,a=[],u=0;i!==E;)if(S(i))L(i.left,!1),L(i.right,!1),i===i.parent.right&&(o-=i.parent.delta),i=i.parent;else{if(!S(i.left)){if(o+i.maxEndn?L(i,!0):((s=o+i.end)>=t&&(i.setCachedOffsets(r,s,0),a[u++]=i),L(i,!0),i.right===E||S(i.right)||(o+=i.delta,i=i.right))}return L(e.root,!1),a}(this,e,e+t),r=0,s=o.length;rn?(o.start+=s,o.end+=s,o.delta+=s,(o.delta<-1073741824||o.delta>1073741824)&&(e.requestNormalizeDelta=!0),L(o,!0)):(L(o,!0),o.right===E||S(o.right)||(r+=o.delta,o=o.right))}L(e.root,!1)}(this,e,e+t,n),this._normalizeDeltaIfNecessary(),r=0,s=o.length;rn)&&1!==i&&(2===i||t)}function O(e,t,n,i,o){var r=function(e){return(48&e.metadata)>>>4}(e),s=0===r||2===r,a=1===r||2===r,u=n-t,l=i,c=Math.min(u,l),h=e.start,d=!1,f=e.end,p=!1,g=o?1:u>0?2:0;!d&&j(h,s,t,g)&&(d=!0),!p&&j(f,a,t,g)&&(p=!0),c>0&&!o&&(g=u>l?2:0,!d&&j(h,s,t+c,g)&&(d=!0),!p&&j(f,a,t+c,g)&&(p=!0)),g=o?1:0,!d&&j(h,s,n,g)&&(e.start=t+l,d=!0),!p&&j(f,a,n,g)&&(e.end=t+l,p=!0);var m=l-u;d||(e.start=Math.max(0,h+m),d=!0),p||(e.end=Math.max(0,f+m),p=!0),e.start>e.end&&(e.end=e.start)}function R(e,t){if(e.root===E)return t.parent=E,t.left=E,t.right=E,C(t,0),e.root=t,e.root;!function(e,t){for(var n,i,o,r,s=0,a=e.root,u=t.start,l=t.end;;)if(n=u,i=l,o=a.start+s,r=a.end+s,(n===o?i-r:n-o)<0){if(a.left===E){t.start-=s,t.end-=s,t.maxEnd-=s,a.left=t;break}a=a.left}else{if(a.right===E){t.start-=s+a.delta,t.end-=s+a.delta,t.maxEnd-=s+a.delta,a.right=t;break}s+=a.delta,a=a.right}t.parent=a,t.left=E,t.right=E,C(t,1)}(e,t),V(t.parent);for(var n=t;n!==e.root&&1===M(n.parent);){var i;n.parent===n.parent.parent.left?1===M(i=n.parent.parent.right)?(C(n.parent,0),C(i,0),C(n.parent.parent,1),n=n.parent.parent):(n===n.parent.right&&W(e,n=n.parent),C(n.parent,0),C(n.parent.parent,1),F(e,n.parent.parent)):1===M(i=n.parent.parent.left)?(C(n.parent,0),C(i,0),C(n.parent.parent,1),n=n.parent.parent):(n===n.parent.left&&F(e,n=n.parent),C(n.parent,0),C(n.parent.parent,1),W(e,n.parent.parent))}return C(e.root,0),t}function P(e,t){var n,i;if(t.left===E?(i=t,(n=t.right).delta+=t.delta,(n.delta<-1073741824||n.delta>1073741824)&&(e.requestNormalizeDelta=!0),n.start+=t.delta,n.end+=t.delta):t.right===E?(n=t.left,i=t):((n=(i=function(e){for(;e.left!==E;)e=e.left;return e}(t.right)).right).start+=i.delta,n.end+=i.delta,n.delta+=i.delta,(n.delta<-1073741824||n.delta>1073741824)&&(e.requestNormalizeDelta=!0),i.start+=t.delta,i.end+=t.delta,i.delta=t.delta,(i.delta<-1073741824||i.delta>1073741824)&&(e.requestNormalizeDelta=!0)),i===e.root)return e.root=n,C(n,0),t.detach(),z(),H(n),void(e.root.parent=E);var o,r=1===M(i);if(i===i.parent.left?i.parent.left=n:i.parent.right=n,i===t?n.parent=i.parent:(i.parent===t?n.parent=i:n.parent=i.parent,i.left=t.left,i.right=t.right,i.parent=t.parent,C(i,M(t)),t===e.root?e.root=i:t===t.parent.left?t.parent.left=i:t.parent.right=i,i.left!==E&&(i.left.parent=i),i.right!==E&&(i.right.parent=i)),t.detach(),r)return V(n.parent),i!==t&&(V(i),V(i.parent)),void z();for(V(n),V(n.parent),i!==t&&(V(i),V(i.parent));n!==e.root&&0===M(n);)n===n.parent.left?(1===M(o=n.parent.right)&&(C(o,0),C(n.parent,1),W(e,n.parent),o=n.parent.right),0===M(o.left)&&0===M(o.right)?(C(o,1),n=n.parent):(0===M(o.right)&&(C(o.left,0),C(o,1),F(e,o),o=n.parent.right),C(o,M(n.parent)),C(n.parent,0),C(o.right,0),W(e,n.parent),n=e.root)):(1===M(o=n.parent.left)&&(C(o,0),C(n.parent,1),F(e,n.parent),o=n.parent.left),0===M(o.left)&&0===M(o.right)?(C(o,1),n=n.parent):(0===M(o.left)&&(C(o.right,0),C(o,1),W(e,o),o=n.parent.left),C(o,M(n.parent)),C(n.parent,0),C(o.left,0),F(e,n.parent),n=e.root));C(n,0),z()}function z(){E.parent=E,E.delta=0,E.start=0,E.end=0}function W(e,t){var n=t.right;n.delta+=t.delta,(n.delta<-1073741824||n.delta>1073741824)&&(e.requestNormalizeDelta=!0),n.start+=t.delta,n.end+=t.delta,t.right=n.left,n.left!==E&&(n.left.parent=t),n.parent=t.parent,t.parent===E?e.root=n:t===t.parent.left?t.parent.left=n:t.parent.right=n,n.left=t,t.parent=n,H(t),H(n)}function F(e,t){var n=t.left;t.delta-=n.delta,(t.delta<-1073741824||t.delta>1073741824)&&(e.requestNormalizeDelta=!0),t.start-=n.delta,t.end-=n.delta,t.left=n.right,n.right!==E&&(n.right.parent=t),n.parent=t.parent,t.parent===E?e.root=n:t===t.parent.right?t.parent.right=n:t.parent.left=n,n.right=t,t.parent=n,H(t),H(n)}function B(e){var t=e.end;if(e.left!==E){var n=e.left.maxEnd;n>t&&(t=n)}if(e.right!==E){var i=e.right.maxEnd+e.delta;i>t&&(t=i)}return t}function H(e){e.maxEnd=B(e)}function V(e){for(;e!==E;){var t=B(e);if(e.maxEnd===t)return;e.maxEnd=t,e=e.parent}}var U=n(6621),Y=n(94),Z=Y.zQ.performance&&"function"==typeof Y.zQ.performance.now,G=function(){function e(e){this._highResolution=Z&&e,this._startTime=this._now(),this._stopTime=-1}return e.create=function(t){return void 0===t&&(t=!0),new e(t)},e.prototype.elapsed=function(){return-1!==this._stopTime?this._stopTime-this._startTime:this._now()-this._startTime},e.prototype._now=function(){return this._highResolution?Y.zQ.performance.now():(new Date).getTime()},e}(),Q=n(4998),q=n(6804),K=n(6360),J=n(386),X=n(7623),$=n(1279),ee=n(8953),te=n(7339);function ne(e){return(16384|e|2<<23)>>>0}var ie=new Uint32Array(0).buffer,oe=function(){function e(e){this._state=e,this._lineTokens=null,this._invalid=!0}return e.prototype.deleteBeginning=function(e){null!==this._lineTokens&&this._lineTokens!==ie&&this.delete(0,e)},e.prototype.deleteEnding=function(e){if(null!==this._lineTokens&&this._lineTokens!==ie){var t=new Uint32Array(this._lineTokens),n=t[t.length-2];this.delete(e,n)}},e.prototype.delete=function(e,t){if(null!==this._lineTokens&&this._lineTokens!==ie&&e!==t){var n=new Uint32Array(this._lineTokens),i=n.length>>>1;if(0!==e||n[n.length-2]!==t){var o=ee.f.findIndexInTokensArray(n,e),r=o>0?n[o-1<<1]:0;if(tl&&(n[u++]=d,n[u++]=n[1+(h<<1)],l=d)}if(u!==n.length){var f=new Uint32Array(u);f.set(n.subarray(0,u),0),this._lineTokens=f.buffer}}}else this._lineTokens=ie}},e.prototype.append=function(e){if(e!==ie)if(this._lineTokens!==ie){if(null!==this._lineTokens)if(null!==e){var t=new Uint32Array(this._lineTokens),n=new Uint32Array(e),i=n.length>>>1,o=new Uint32Array(t.length+n.length);o.set(t,0);for(var r=t.length,s=t[t.length-2],a=0;a>>1,o=ee.f.findIndexInTokensArray(n,e);o>0&&(o>0?n[o-1<<1]:0)===e&&o--;for(var r=o;r=e},e.prototype.hasLinesToTokenize=function(e){return this._invalidLineStartIndex=0;r--)this.invalidateLine(e.startLineNumber+r-1);this._acceptDeleteRange(e),this._acceptInsertText(new J.y(e.startLineNumber,e.startColumn),t,n)},e.prototype._acceptDeleteRange=function(e){var t=e.startLineNumber-1;if(!(t>=this._tokens.length))if(e.startLineNumber!==e.endLineNumber){var n=this._tokens[t];n.deleteEnding(e.startColumn-1);var i=e.endLineNumber-1,o=null;if(i=this._tokens.length))if(0!==t){var o=this._tokens[i];o.deleteEnding(e.column-1),o.insert(e.column-1,n);for(var r=new Array(t),s=t-1;s>=0;s--)r[s]=new oe(null);this._tokens=te.nK(this._tokens,e.lineNumber,r)}else this._tokens[i].insert(e.column-1,n)}},e.prototype._tokenizeOneLine=function(e,t){if(!this.hasLinesToTokenize(e))return e.getLineCount()+1;var n=this._invalidLineStartIndex+1;return this._updateTokensUntilLine(e,t,n),n},e.prototype._tokenizeText=function(e,t,n){var i=null;try{i=this.tokenizationSupport.tokenize2(t,n,0)}catch(e){(0,a.dz)(e)}return i||(i=(0,Q.T5)(this.languageIdentifier.id,t,n,0)),i},e.prototype._updateTokensUntilLine=function(e,t,n){if(this.tokenizationSupport){for(var i=e.getLineCount(),o=n-1,r=this._invalidLineStartIndex;r<=o;r++){var s=r+1,u=null,l=e.getLineContent(r+1);try{var c=this._getState(r).clone();u=this.tokenizationSupport.tokenize2(l,c,0)}catch(e){(0,a.dz)(e)}if(u||(u=(0,Q.T5)(this.languageIdentifier.id,l,this._getState(r),0)),this._setTokens(this.languageIdentifier.id,r,l.length,u.tokens),t.registerChangedTokens(r+1),this._setIsInvalid(r,!1),s0?t[n-1]:null;i&&i.toLineNumber===e-1?i.toLineNumber++:t[n]={fromLineNumber:e,toLineNumber:e}},e.prototype.build=function(){return 0===this._ranges.length?null:{ranges:this._ranges}},e}();function ae(e,t,n,i){var o;for(o=0;o0&&s>0)return 0;if(u>0&&l>0)return 0;var c=Math.abs(s-l),h=Math.abs(r-u);return 0===c?h:h%c==0?h/c:0}function ue(e,t,n){for(var i=Math.min(e.getLineCount(),1e4),o=0,r=0,s="",a=0,u=[0,0,0,0,0,0,0,0,0],l=1;l<=i;l++){for(var c=e.getLineLength(l),h=e.getLineContent(l),d=c<=65536,f=!1,p=0,g=0,m=0,v=0,y=c;v0?o++:g>1&&r++;var _=ae(s,a,h,p);_<=8&&u[_]++,s=h,a=p}}var w=n;o!==r&&(w=oC&&(C=t,M=e)})),{insertSpaces:w,tabSize:M}}var le=n(3517),ce=n(6343),he=function(){function e(e,t){this.piece=e,this.color=t,this.size_left=0,this.lf_left=0,this.parent=null,this.left=null,this.right=null}return e.prototype.next=function(){if(this.right!==de)return fe(this.right);for(var e=this;e.parent!==de&&e.parent.left!==e;)e=e.parent;return e.parent===de?de:e.parent},e.prototype.prev=function(){if(this.left!==de)return pe(this.left);for(var e=this;e.parent!==de&&e.parent.right!==e;)e=e.parent;return e.parent===de?de:e.parent},e.prototype.detach=function(){this.parent=null,this.left=null,this.right=null},e}(),de=new he(null,0);function fe(e){for(;e.left!==de;)e=e.left;return e}function pe(e){for(;e.right!==de;)e=e.right;return e}function ge(e){return e===de?0:e.size_left+e.piece.length+ge(e.right)}function me(e){return e===de?0:e.lf_left+e.piece.lineFeedCnt+me(e.right)}function ve(){de.parent=de}function ye(e,t){var n=t.right;n.size_left+=t.size_left+(t.piece?t.piece.length:0),n.lf_left+=t.lf_left+(t.piece?t.piece.lineFeedCnt:0),t.right=n.left,n.left!==de&&(n.left.parent=t),n.parent=t.parent,t.parent===de?e.root=n:t.parent.left===t?t.parent.left=n:t.parent.right=n,n.left=t,t.parent=n}function be(e,t){var n=t.left;t.left=n.right,n.right!==de&&(n.right.parent=t),n.parent=t.parent,t.size_left-=n.size_left+(n.piece?n.piece.length:0),t.lf_left-=n.lf_left+(n.piece?n.piece.lineFeedCnt:0),t.parent===de?e.root=n:t===t.parent.right?t.parent.right=n:t.parent.left=n,n.right=t,t.parent=n}function _e(e,t){var n,i;if(n=t.left===de?(i=t).right:t.right===de?(i=t).left:(i=fe(t.right)).right,i===e.root)return e.root=n,n.color=0,t.detach(),ve(),void(e.root.parent=de);var o=1===i.color;if(i===i.parent.left?i.parent.left=n:i.parent.right=n,i===t?(n.parent=i.parent,Ce(e,n)):(i.parent===t?n.parent=i:n.parent=i.parent,Ce(e,n),i.left=t.left,i.right=t.right,i.parent=t.parent,i.color=t.color,t===e.root?e.root=i:t===t.parent.left?t.parent.left=i:t.parent.right=i,i.left!==de&&(i.left.parent=i),i.right!==de&&(i.right.parent=i),i.size_left=t.size_left,i.lf_left=t.lf_left,Ce(e,i)),t.detach(),n.parent.left===n){var r=ge(n),s=me(n);if(r!==n.parent.size_left||s!==n.parent.lf_left){var a=r-n.parent.size_left,u=s-n.parent.lf_left;n.parent.size_left=r,n.parent.lf_left=s,Me(e,n.parent,a,u)}}if(Ce(e,n.parent),o)ve();else{for(var l;n!==e.root&&0===n.color;)n===n.parent.left?(1===(l=n.parent.right).color&&(l.color=0,n.parent.color=1,ye(e,n.parent),l=n.parent.right),0===l.left.color&&0===l.right.color?(l.color=1,n=n.parent):(0===l.right.color&&(l.left.color=0,l.color=1,be(e,l),l=n.parent.right),l.color=n.parent.color,n.parent.color=0,l.right.color=0,ye(e,n.parent),n=e.root)):(1===(l=n.parent.left).color&&(l.color=0,n.parent.color=1,be(e,n.parent),l=n.parent.left),0===l.left.color&&0===l.right.color?(l.color=1,n=n.parent):(0===l.left.color&&(l.right.color=0,l.color=1,ye(e,l),l=n.parent.left),l.color=n.parent.color,n.parent.color=0,l.left.color=0,be(e,n.parent),n=e.root));n.color=0,ve()}}function we(e,t){for(Ce(e,t);t!==e.root&&1===t.parent.color;){var n;t.parent===t.parent.parent.left?1===(n=t.parent.parent.right).color?(t.parent.color=0,n.color=0,t.parent.parent.color=1,t=t.parent.parent):(t===t.parent.right&&ye(e,t=t.parent),t.parent.color=0,t.parent.parent.color=1,be(e,t.parent.parent)):1===(n=t.parent.parent.left).color?(t.parent.color=0,n.color=0,t.parent.parent.color=1,t=t.parent.parent):(t===t.parent.left&&be(e,t=t.parent),t.parent.color=0,t.parent.parent.color=1,ye(e,t.parent.parent))}e.root.color=0}function Me(e,t,n,i){for(;t!==e.root&&t!==de;)t.parent.left===t&&(t.parent.size_left+=n,t.parent.lf_left+=i),t=t.parent}function Ce(e,t){var n=0,i=0;if(t!==e.root){if(0===n){for(;t!==e.root&&t===t.parent.right;)t=t.parent;if(t===e.root)return;n=ge((t=t.parent).left)-t.size_left,i=me(t.left)-t.lf_left,t.size_left+=n,t.lf_left+=i}for(;t!==e.root&&(0!==n||0!==i);)t.parent.left===t&&(t.parent.size_left+=n,t.parent.lf_left+=i),t=t.parent}}de.parent=de,de.left=de,de.right=de,de.color=0;var Se=65535;function Le(e){var t;return(t=e[e.length-1]<65536?new Uint16Array(e.length):new Uint32Array(e.length)).set(e,0),t}var Ie=function(e,t,n,i,o){this.lineStarts=e,this.cr=t,this.lf=n,this.crlf=i,this.isBasicASCII=o};function Ne(e,t){void 0===t&&(t=!0);for(var n=[0],i=1,o=0,r=e.length;o=0;t--){var n=this._cache[t];if(n.nodeStartOffset<=e&&n.nodeStartOffset+n.node.piece.length>=e)return n}return null},e.prototype.get2=function(e){for(var t=this._cache.length-1;t>=0;t--){var n=this._cache[t];if(n.nodeStartLineNumber&&n.nodeStartLineNumber=e)return n}return null},e.prototype.set=function(e){this._cache.length>=this._limit&&this._cache.shift(),this._cache.push(e)},e.prototype.valdiate=function(e){for(var t=!1,n=0;n=e)&&(this._cache[n]=null,t=!0)}if(t){var o=[];for(n=0;n0){e[o].lineStarts||(e[o].lineStarts=Ne(e[o].buffer));var s=new De(o+1,{line:0,column:0},{line:e[o].lineStarts.length-1,column:e[o].buffer.length-e[o].lineStarts[e[o].lineStarts.length-1]},e[o].lineStarts.length-1,e[o].buffer.length);this._buffers.push(e[o]),i=this.rbInsertRight(i,s)}this._searchCache=new Te(1),this._lastVisitedLine={lineNumber:0,value:null},this.computeBufferMetadata()},e.prototype.normalizeEOL=function(e){var t=this,n=65535-Math.floor(21845),i=2*n,o="",r=0,s=[];if(this.iterate(this.root,(function(a){var u=t.getNodeContent(a),l=u.length;if(r<=n||r+l0){var a=o.replace(/\r\n|\r|\n/g,e);s.push(new ke(a,Ne(a)))}this.create(s,e,!0)},e.prototype.getEOL=function(){return this._EOL},e.prototype.setEOL=function(e){this._EOL=e,this._EOLLength=this._EOL.length,this.normalizeEOL(e)},e.prototype.getOffsetAt=function(e,t){for(var n=0,i=this.root;i!==de;)if(i.left!==de&&i.lf_left+1>=e)i=i.left;else{if(i.lf_left+i.piece.lineFeedCnt+1>=e)return(n+=i.size_left)+(this.getAccumulatedValue(i,e-i.lf_left-2)+t-1);e-=i.lf_left+i.piece.lineFeedCnt,n+=i.size_left+i.piece.length,i=i.right}return n},e.prototype.getPositionAt=function(e){e=Math.floor(e),e=Math.max(0,e);for(var t=this.root,n=0,i=e;t!==de;)if(0!==t.size_left&&t.size_left>=e)t=t.left;else{if(t.size_left+t.piece.length>=e){var o=this.getIndexOf(t,e-t.size_left);if(n+=t.lf_left+o.index,0===o.index){var r=i-this.getOffsetAt(n+1,1);return new J.y(n+1,r+1)}return new J.y(n+1,o.remainder+1)}if(e-=t.size_left+t.piece.length,n+=t.lf_left+t.piece.lineFeedCnt,t.right===de)return r=i-e-this.getOffsetAt(n+1,1),new J.y(n+1,r+1);t=t.right}return new J.y(1,1)},e.prototype.getValueInRange=function(e,t){if(e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn)return"";var n=this.nodeAt2(e.startLineNumber,e.startColumn),i=this.nodeAt2(e.endLineNumber,e.endColumn),o=this.getValueInRange2(n,i);return t?t===this._EOL&&this._EOLNormalized&&t===this.getEOL()&&this._EOLNormalized?o:o.replace(/\r\n|\r|\n/g,t):o},e.prototype.getValueInRange2=function(e,t){if(e.node===t.node){var n=e.node,i=this._buffers[n.piece.bufferIndex].buffer,o=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);return i.substring(o+e.remainder,o+t.remainder)}var r=e.node,s=this._buffers[r.piece.bufferIndex].buffer,a=this.offsetInBuffer(r.piece.bufferIndex,r.piece.start),u=s.substring(a+e.remainder,a+r.piece.length);for(r=r.next();r!==de;){var l=this._buffers[r.piece.bufferIndex].buffer,c=this.offsetInBuffer(r.piece.bufferIndex,r.piece.start);if(r===t.node){u+=l.substring(c,c+t.remainder);break}u+=l.substr(c,r.piece.length),r=r.next()}return u},e.prototype.getLinesContent=function(){return this.getContentOfSubTree(this.root).split(/\r\n|\r|\n/)},e.prototype.getLength=function(){return this._length},e.prototype.getLineCount=function(){return this._lineCnt},e.prototype.getLineContent=function(e){return this._lastVisitedLine.lineNumber===e||(this._lastVisitedLine.lineNumber=e,e===this._lineCnt?this._lastVisitedLine.value=this.getLineRawContent(e):this._EOLNormalized?this._lastVisitedLine.value=this.getLineRawContent(e,this._EOLLength):this._lastVisitedLine.value=this.getLineRawContent(e).replace(/(\r\n|\r|\n)$/,"")),this._lastVisitedLine.value},e.prototype.getLineCharCode=function(e,t){var n=this.nodeAt2(e,t+1);if(n.remainder===n.node.piece.length){var i=n.node.next();if(!i)return 0;var o=this._buffers[i.piece.bufferIndex],r=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);return o.buffer.charCodeAt(r)}o=this._buffers[n.node.piece.bufferIndex];var s=(r=this.offsetInBuffer(n.node.piece.bufferIndex,n.node.piece.start))+n.remainder;return o.buffer.charCodeAt(s)},e.prototype.getLineLength=function(e){if(e===this.getLineCount()){var t=this.getOffsetAt(e,1);return this.getLength()-t}return this.getOffsetAt(e+1,1)-this.getOffsetAt(e,1)-this._EOLLength},e.prototype.findMatchesInNode=function(e,t,n,i,o,r,s,a,u,l,c){var h,f=this._buffers[e.piece.bufferIndex],p=this.offsetInBuffer(e.piece.bufferIndex,e.piece.start),g=this.offsetInBuffer(e.piece.bufferIndex,o),m=this.offsetInBuffer(e.piece.bufferIndex,r);t.reset(g);var v={line:0,column:0};do{if(h=t.next(f.buffer)){if(h.index>=m)return l;this.positionInBuffer(e,h.index-p,v);var y=this.getLineFeedCnt(e.piece.bufferIndex,o,v),b=v.line===o.line?v.column-o.column+i:v.column+1,_=b+h[0].length;if(c[l++]=(0,ce.dr)(new d.Q(n+y,b,n+y,_),h,a),h.index+h[0].length>=m)return l;if(l>=u)return l}}while(h);return l},e.prototype.findMatchesLineByLine=function(e,t,n,i){var o=[],r=0,s=new ce.W5(t.wordSeparators,t.regex),a=this.nodeAt2(e.startLineNumber,e.startColumn);if(null===a)return[];var u=this.nodeAt2(e.endLineNumber,e.endColumn);if(null===u)return[];var l=this.positionInBuffer(a.node,a.remainder),c=this.positionInBuffer(u.node,u.remainder);if(a.node===u.node)return this.findMatchesInNode(a.node,s,e.startLineNumber,e.startColumn,l,c,t,n,i,r,o),o;for(var h=e.startLineNumber,d=a.node;d!==u.node;){var f=this.getLineFeedCnt(d.piece.bufferIndex,l,d.piece.end);if(f>=1){var p=this._buffers[d.piece.bufferIndex].lineStarts,g=this.offsetInBuffer(d.piece.bufferIndex,d.piece.start),m=p[l.line+f],v=h===e.startLineNumber?e.startColumn:1;if((r=this.findMatchesInNode(d,s,h,v,l,this.positionInBuffer(d,m-g),t,n,i,r,o))>=i)return o;h+=f}var y=h===e.startLineNumber?e.startColumn-1:0;if(h===e.endLineNumber){var b=this.getLineContent(h).substring(y,e.endColumn-1);return r=this._findMatchesInLine(t,s,b,e.endLineNumber,y,r,o,n,i),o}if((r=this._findMatchesInLine(t,s,this.getLineContent(h).substr(y),h,y,r,o,n,i))>=i)return o;h++,d=(a=this.nodeAt2(h,1)).node,l=this.positionInBuffer(a.node,a.remainder)}if(h===e.endLineNumber){var _=h===e.startLineNumber?e.startColumn-1:0;return b=this.getLineContent(h).substring(_,e.endColumn-1),r=this._findMatchesInLine(t,s,b,e.endLineNumber,_,r,o,n,i),o}var w=h===e.startLineNumber?e.startColumn:1;return r=this.findMatchesInNode(u.node,s,h,w,l,c,t,n,i,r,o),o},e.prototype._findMatchesInLine=function(e,t,n,i,o,s,a,u,l){var c,h=e.wordSeparators;if(!u&&e.simpleSearch){for(var f=e.simpleSearch,p=f.length,g=n.length,m=-p;-1!==(m=n.indexOf(f,m+p));)if((!h||(0,ce.wC)(h,n,g,m,p))&&(a[s++]=new r.Dg(new d.Q(i,m+1+o,i,m+1+p+o),null),s>=l))return s;return s}t.reset(0);do{if((c=t.next(n))&&(a[s++]=(0,ce.dr)(new d.Q(i,c.index+1+o,i,c.index+1+c[0].length+o),c,u),s>=l))return s}while(c);return s},e.prototype.insert=function(e,t,n){if(void 0===n&&(n=!1),this._EOLNormalized=this._EOLNormalized&&n,this._lastVisitedLine.lineNumber=0,this._lastVisitedLine.value=null,this.root!==de){var i=this.nodeAt(e),o=i.node,r=i.remainder,s=i.nodeStartOffset,a=o.piece,u=a.bufferIndex,l=this.positionInBuffer(o,r);if(0===o.piece.bufferIndex&&a.end.line===this._lastChangeBufferPos.line&&a.end.column===this._lastChangeBufferPos.column&&s+a.length===e&&t.lengthe){var c=[],h=new De(a.bufferIndex,l,a.end,this.getLineFeedCnt(a.bufferIndex,l,a.end),this.offsetInBuffer(u,a.end)-this.offsetInBuffer(u,l));if(this.shouldCheckCRLF()&&this.endWithCR(t)&&10===this.nodeCharCodeAt(o,r)){var d={line:h.start.line+1,column:0};h=new De(h.bufferIndex,d,h.end,this.getLineFeedCnt(h.bufferIndex,d,h.end),h.length-1),t+="\n"}if(this.shouldCheckCRLF()&&this.startWithLF(t))if(13===this.nodeCharCodeAt(o,r-1)){var f=this.positionInBuffer(o,r-1);this.deleteNodeTail(o,f),t="\r"+t,0===o.piece.length&&c.push(o)}else this.deleteNodeTail(o,l);else this.deleteNodeTail(o,l);var p=this.createNewPieces(t);h.length>0&&this.rbInsertRight(o,h);for(var g=o,m=0;m=0;u--)a=this.rbInsertLeft(a,s[u]);this.validateCRLFWithPrevNode(a),this.deleteNodes(n)},e.prototype.insertContentToNodeRight=function(e,t){this.adjustCarriageReturnFromNext(e,t)&&(e+="\n");for(var n=this.createNewPieces(e),i=this.rbInsertRight(t,n[0]),o=i,r=1;r=o))break;c=i+1}return n?(n.line=i,n.column=l-r,null):{line:i,column:l-r}},e.prototype.getLineFeedCnt=function(e,t,n){if(0===n.column)return n.line-t.line;var i=this._buffers[e].lineStarts;if(n.line===i.length-1)return n.line-t.line;var o=i[n.line+1],r=i[n.line]+n.column;if(o>r+1)return n.line-t.line;var s=r-1;return 13===this._buffers[e].buffer.charCodeAt(s)?n.line-t.line+1:n.line-t.line},e.prototype.offsetInBuffer=function(e,t){return this._buffers[e].lineStarts[t.line]+t.column},e.prototype.deleteNodes=function(e){for(var t=0;tSe){for(var t=[];e.length>Se;){var n=e.charCodeAt(65534),i=void 0;13===n||n>=55296&&n<=56319?(i=e.substring(0,65534),e=e.substring(65534)):(i=e.substring(0,Se),e=e.substring(Se));var o=Ne(i);t.push(new De(this._buffers.length,{line:0,column:0},{line:o.length-1,column:i.length-o[o.length-1]},o.length-1,i.length)),this._buffers.push(new ke(i,o))}var r=Ne(e);return t.push(new De(this._buffers.length,{line:0,column:0},{line:r.length-1,column:e.length-r[r.length-1]},r.length-1,e.length)),this._buffers.push(new ke(e,r)),t}var s=this._buffers[0].buffer.length,a=Ne(e,!1),u=this._lastChangeBufferPos;if(this._buffers[0].lineStarts[this._buffers[0].lineStarts.length-1]===s&&0!==s&&this.startWithLF(e)&&this.endWithCR(this._buffers[0].buffer)){this._lastChangeBufferPos={line:this._lastChangeBufferPos.line,column:this._lastChangeBufferPos.column+1},u=this._lastChangeBufferPos;for(var l=0;l=e-1)n=n.left;else{if(n.lf_left+n.piece.lineFeedCnt>e-1)return r=this.getAccumulatedValue(n,e-n.lf_left-2),u=this.getAccumulatedValue(n,e-n.lf_left-1),s=this._buffers[n.piece.bufferIndex].buffer,a=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start),l+=n.size_left,this._searchCache.set({node:n,nodeStartOffset:l,nodeStartLineNumber:c-(e-1-n.lf_left)}),s.substring(a+r,a+u-t);if(n.lf_left+n.piece.lineFeedCnt===e-1){r=this.getAccumulatedValue(n,e-n.lf_left-2),s=this._buffers[n.piece.bufferIndex].buffer,a=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start),i=s.substring(a+r,a+n.piece.length);break}e-=n.lf_left+n.piece.lineFeedCnt,l+=n.size_left+n.piece.length,n=n.right}for(n=n.next();n!==de;){if(s=this._buffers[n.piece.bufferIndex].buffer,n.piece.lineFeedCnt>0)return u=this.getAccumulatedValue(n,0),a=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start),i+s.substring(a,a+u-t);a=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start),i+=s.substr(a,n.piece.length),n=n.next()}return i},e.prototype.computeBufferMetadata=function(){for(var e=this.root,t=1,n=0;e!==de;)t+=e.lf_left+e.piece.lineFeedCnt,n+=e.size_left+e.piece.length,e=e.right;this._lineCnt=t,this._length=n,this._searchCache.valdiate(this._length)},e.prototype.getIndexOf=function(e,t){var n=e.piece,i=this.positionInBuffer(e,t),o=i.line-n.start.line;if(this.offsetInBuffer(n.bufferIndex,n.end)-this.offsetInBuffer(n.bufferIndex,n.start)===t){var r=this.getLineFeedCnt(e.piece.bufferIndex,n.start,i);if(r!==o)return{index:r,remainder:0}}return{index:o,remainder:i.column}},e.prototype.getAccumulatedValue=function(e,t){if(t<0)return 0;var n=e.piece,i=this._buffers[n.bufferIndex].lineStarts,o=n.start.line+t+1;return o>n.end.line?i[n.end.line]+n.end.column-i[n.start.line]-n.start.column:i[o]-i[n.start.line]-n.start.column},e.prototype.deleteNodeTail=function(e,t){var n=e.piece,i=n.lineFeedCnt,o=this.offsetInBuffer(n.bufferIndex,n.end),r=t,s=this.offsetInBuffer(n.bufferIndex,r),a=this.getLineFeedCnt(n.bufferIndex,n.start,r),u=a-i,l=s-o,c=n.length+l;e.piece=new De(n.bufferIndex,n.start,r,a,c),Me(this,e,l,u)},e.prototype.deleteNodeHead=function(e,t){var n=e.piece,i=n.lineFeedCnt,o=this.offsetInBuffer(n.bufferIndex,n.start),r=t,s=this.getLineFeedCnt(n.bufferIndex,r,n.end),a=s-i,u=o-this.offsetInBuffer(n.bufferIndex,r),l=n.length+u;e.piece=new De(n.bufferIndex,r,n.end,s,l),Me(this,e,u,a)},e.prototype.shrinkNode=function(e,t,n){var i=e.piece,o=i.start,r=i.end,s=i.length,a=i.lineFeedCnt,u=t,l=this.getLineFeedCnt(i.bufferIndex,i.start,u),c=this.offsetInBuffer(i.bufferIndex,t)-this.offsetInBuffer(i.bufferIndex,o);e.piece=new De(i.bufferIndex,i.start,u,l,c),Me(this,e,c-s,l-a);var h=new De(i.bufferIndex,n,r,this.getLineFeedCnt(i.bufferIndex,n,r),this.offsetInBuffer(i.bufferIndex,r)-this.offsetInBuffer(i.bufferIndex,n)),d=this.rbInsertRight(e,h);this.validateCRLFWithPrevNode(d)},e.prototype.appendToNode=function(e,t){this.adjustCarriageReturnFromNext(t,e)&&(t+="\n");var n=this.shouldCheckCRLF()&&this.startWithLF(t)&&this.endWithCR(e),i=this._buffers[0].buffer.length;this._buffers[0].buffer+=t;for(var o=Ne(t,!1),r=0;re)t=t.left;else{if(t.size_left+t.piece.length>=e){i+=t.size_left;var o={node:t,remainder:e-t.size_left,nodeStartOffset:i};return this._searchCache.set(o),o}e-=t.size_left+t.piece.length,i+=t.size_left+t.piece.length,t=t.right}return null},e.prototype.nodeAt2=function(e,t){for(var n=this.root,i=0;n!==de;)if(n.left!==de&&n.lf_left>=e-1)n=n.left;else{if(n.lf_left+n.piece.lineFeedCnt>e-1){var o=this.getAccumulatedValue(n,e-n.lf_left-2),r=this.getAccumulatedValue(n,e-n.lf_left-1);return i+=n.size_left,{node:n,remainder:Math.min(o+t-1,r),nodeStartOffset:i}}if(n.lf_left+n.piece.lineFeedCnt===e-1){if((o=this.getAccumulatedValue(n,e-n.lf_left-2))+t-1<=n.piece.length)return{node:n,remainder:o+t-1,nodeStartOffset:i};t-=n.piece.length-o;break}e-=n.lf_left+n.piece.lineFeedCnt,i+=n.size_left+n.piece.length,n=n.right}for(n=n.next();n!==de;){if(n.piece.lineFeedCnt>0){r=this.getAccumulatedValue(n,0);var s=this.offsetOfNode(n);return{node:n,remainder:Math.min(t-1,r),nodeStartOffset:s}}if(n.piece.length>=t-1)return{node:n,remainder:t-1,nodeStartOffset:this.offsetOfNode(n)};t-=n.piece.length,n=n.next()}return null},e.prototype.nodeCharCodeAt=function(e,t){if(e.piece.lineFeedCnt<1)return-1;var n=this._buffers[e.piece.bufferIndex],i=this.offsetInBuffer(e.piece.bufferIndex,e.piece.start)+t;return n.buffer.charCodeAt(i)},e.prototype.offsetOfNode=function(e){if(!e)return 0;for(var t=e.size_left;e!==this.root;)e.parent.right===e&&(t+=e.parent.size_left+e.parent.piece.length),e=e.parent;return t},e.prototype.shouldCheckCRLF=function(){return!(this._EOLNormalized&&"\n"===this._EOL)},e.prototype.startWithLF=function(e){if("string"==typeof e)return 10===e.charCodeAt(0);if(e===de||0===e.piece.lineFeedCnt)return!1;var t=e.piece,n=this._buffers[t.bufferIndex].lineStarts,i=t.start.line,o=n[i]+t.start.column;return i!==n.length-1&&!(n[i+1]>o+1)&&10===this._buffers[t.bufferIndex].buffer.charCodeAt(o)},e.prototype.endWithCR=function(e){return"string"==typeof e?13===e.charCodeAt(e.length-1):e!==de&&0!==e.piece.lineFeedCnt&&13===this.nodeCharCodeAt(e,e.piece.length-1)},e.prototype.validateCRLFWithPrevNode=function(e){if(this.shouldCheckCRLF()&&this.startWithLF(e)){var t=e.prev();this.endWithCR(t)&&this.fixCRLF(t,e)}},e.prototype.validateCRLFWithNextNode=function(e){if(this.shouldCheckCRLF()&&this.endWithCR(e)){var t=e.next();this.startWithLF(t)&&this.fixCRLF(e,t)}},e.prototype.fixCRLF=function(e,t){var n,i=[],o=this._buffers[e.piece.bufferIndex].lineStarts;n=0===e.piece.end.column?{line:e.piece.end.line-1,column:o[e.piece.end.line]-o[e.piece.end.line-1]-1}:{line:e.piece.end.line,column:e.piece.end.column-1};var r=e.piece.length-1,s=e.piece.lineFeedCnt-1;e.piece=new De(e.piece.bufferIndex,e.piece.start,n,s,r),Me(this,e,-1,-1),0===e.piece.length&&i.push(e);var a={line:t.piece.start.line+1,column:0},u=t.piece.length-1,l=this.getLineFeedCnt(t.piece.bufferIndex,a,t.piece.end);t.piece=new De(t.piece.bufferIndex,a,t.piece.end,l,u),Me(this,t,-1,-1),0===t.piece.length&&i.push(t);var c=this.createNewPieces("\r\n");this.rbInsertRight(e,c[0]);for(var h=0;h0){m.sort((function(e,t){return t.lineNumber-e.lineNumber})),C=[],u=0;for(var S=m.length;u0&&m[u-1].lineNumber===y)){var L=m[u].oldContent,I=this.getLineContent(y);0!==I.length&&I!==L&&-1===w.firstNonWhitespaceIndex(I)&&C.push(y)}}return new r.F4(_,M,C)},e.prototype._reduceOperations=function(e){return e.length<1e3?e:[this._toSingleEditOperation(e)]},e.prototype._toSingleEditOperation=function(e){for(var t=!1,n=e[0].range,i=e[e.length-1].range,o=new d.Q(n.startLineNumber,n.startColumn,i.endLineNumber,i.endColumn),s=n.startLineNumber,a=n.startColumn,u=[],l=0,c=e.length;l0){var h=a.lines.length,f=a.lines[0],p=a.lines[h-1];c=1===h?new d.Q(u,l,u,l+f.length):new d.Q(u,l,u+h-1,p.length+1)}else c=new d.Q(u,l,u,l);t=c.endLineNumber,n=c.endColumn,i.push(c),o=a}return i},e._sortOpsAscending=function(e,t){var n=d.Q.compareRangesUsingEnds(e.range,t.range);return 0===n?e.sortIndex-t.sortIndex:n},e._sortOpsDescending=function(e,t){var n=d.Q.compareRangesUsingEnds(e.range,t.range);return 0===n?t.sortIndex-e.sortIndex:-n},e}(),je=function(){function e(e,t,n,i,o,r,s,a){this._chunks=e,this._bom=t,this._cr=n,this._lf=i,this._crlf=o,this._containsRTL=r,this._isBasicASCII=s,this._normalizeEOL=a}return e.prototype._getEOL=function(e){var t=this._cr+this._lf+this._crlf,n=this._cr+this._crlf;return 0===t?e===r.of.LF?"\n":"\r\n":n>t/2?"\r\n":"\n"},e.prototype.create=function(e){var t=this._getEOL(e),n=this._chunks;if(this._normalizeEOL&&("\r\n"===t&&(this._cr>0||this._lf>0)||"\n"===t&&(this._cr>0||this._crlf>0)))for(var i=0,o=n.length;i=55296&&t<=56319?(this._acceptChunk1(e.substr(0,e.length-1),!1),this._hasPreviousChar=!0,this._previousChar=t):(this._acceptChunk1(e,!1),this._hasPreviousChar=!1,this._previousChar=t)}},e.prototype._acceptChunk1=function(e,t){(t||0!==e.length)&&(this._hasPreviousChar?this._acceptChunk2(String.fromCharCode(this._previousChar)+e):this._acceptChunk2(e))},e.prototype._acceptChunk2=function(e){var t=function(e,t){e.length=0,e[0]=0;for(var n=1,i=0,o=0,r=0,s=!0,a=0,u=t.length;a126)&&(s=!1)}var c=new Ie(Le(e),i,o,r,s);return e.length=0,c}(this._tmpLineStarts,e);this.chunks.push(new ke(e,t.lineStarts)),this.cr+=t.cr,this.lf+=t.lf,this.crlf+=t.crlf,this.isBasicASCII&&(this.isBasicASCII=t.isBasicASCII),this.isBasicASCII||this.containsRTL||(this.containsRTL=w.containsRTL(e))},e.prototype.finish=function(e){return void 0===e&&(e=!0),this._finish(),new je(this.chunks,this.BOM,this.cr,this.lf,this.crlf,this.containsRTL,this.isBasicASCII,e)},e.prototype._finish=function(){if(0===this.chunks.length&&this._acceptChunk1("",!0),this._hasPreviousChar){this._hasPreviousChar=!1;var e=this.chunks[this.chunks.length-1];e.buffer+=String.fromCharCode(this._previousChar);var t=Ne(e.buffer);e.lineStarts=t,13===this._previousChar&&this.cr++}},e}(),Re=(xe=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}xe(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});function Pe(e,t){return("string"==typeof e?(n=e,i=new Oe,i.acceptChunk(n),i.finish()):e).create(t);var n,i}var ze=0,We=function(e){function t(n,a,u,l){void 0===l&&(l=null);var c=e.call(this)||this;c._onWillDispose=c._register(new o.vl),c.onWillDispose=c._onWillDispose.event,c._onDidChangeDecorations=c._register(new Ze),c.onDidChangeDecorations=c._onDidChangeDecorations.event,c._onDidChangeLanguage=c._register(new o.vl),c.onDidChangeLanguage=c._onDidChangeLanguage.event,c._onDidChangeLanguageConfiguration=c._register(new o.vl),c.onDidChangeLanguageConfiguration=c._onDidChangeLanguageConfiguration.event,c._onDidChangeTokens=c._register(new o.vl),c.onDidChangeTokens=c._onDidChangeTokens.event,c._onDidChangeOptions=c._register(new o.vl),c.onDidChangeOptions=c._onDidChangeOptions.event,c._eventEmitter=c._register(new Ge),ze++,c.id="$model"+ze,c.isForSimpleWidget=a.isForSimpleWidget,c._associatedResource=null==l?i.A.parse("inmemory://model/"+ze):l,c._attachedEditorCount=0,c._buffer=Pe(n,a.defaultEOL),c._options=t.resolveOptions(c._buffer,a);var f,p=c._buffer.getLineCount(),g=c._buffer.getValueLengthInRange(new d.Q(1,1,p,c._buffer.getLineLength(p)+1),r.kf.TextDefined);return a.largeFileOptimizations?c._isTooLargeForTokenization=g>t.LARGE_FILE_SIZE_THRESHOLD||p>t.LARGE_FILE_LINE_COUNT_THRESHOLD:c._isTooLargeForTokenization=!1,c._isTooLargeForSyncing=g>t.MODEL_SYNC_LIMIT,c._setVersionId(1),c._isDisposed=!1,c._isDisposing=!1,c._languageIdentifier=u||Q.z8,c._tokenizationListener=s.dG.onDidChange((function(e){-1!==e.changedLanguages.indexOf(c._languageIdentifier.language)&&(c._resetTokenizationState(),c.emitModelTokensChangedEvent({ranges:[{fromLineNumber:1,toLineNumber:c.getLineCount()}]}),c._shouldAutoTokenize()&&c._warmUpTokens())})),c._revalidateTokensTimeout=-1,c._languageRegistryListener=X.cx.onDidChange((function(e){e.languageIdentifier.id===c._languageIdentifier.id&&c._onDidChangeLanguageConfiguration.fire({})})),c._resetTokenizationState(),c._instanceId=(f=ze,(f%=52)<26?String.fromCharCode(97+f):String.fromCharCode(65+f-26)),c._lastDecorationId=0,c._decorations=Object.create(null),c._decorationsTree=new Fe,c._commandManager=new h(c),c._isUndoing=!1,c._isRedoing=!1,c._trimAutoWhitespaceLines=null,c}return Re(t,e),t.createFromString=function(e,n,i,o){return void 0===n&&(n=t.DEFAULT_CREATION_OPTIONS),void 0===i&&(i=null),void 0===o&&(o=null),new t(e,n,i,o)},t.resolveOptions=function(e,t){if(t.detectIndentation){var n=ue(e,t.tabSize,t.insertSpaces);return new r.X2({tabSize:n.tabSize,insertSpaces:n.insertSpaces,trimAutoWhitespace:t.trimAutoWhitespace,defaultEOL:t.defaultEOL})}return new r.X2({tabSize:t.tabSize,insertSpaces:t.insertSpaces,trimAutoWhitespace:t.trimAutoWhitespace,defaultEOL:t.defaultEOL})},t.prototype.onDidChangeRawContentFast=function(e){return this._eventEmitter.fastEvent((function(t){return e(t.rawContentChangedEvent)}))},t.prototype.onDidChangeRawContent=function(e){return this._eventEmitter.slowEvent((function(t){return e(t.rawContentChangedEvent)}))},t.prototype.onDidChangeContent=function(e){return this._eventEmitter.slowEvent((function(t){return e(t.contentChangedEvent)}))},t.prototype.dispose=function(){this._isDisposing=!0,this._onWillDispose.fire(),this._commandManager=null,this._decorations=null,this._decorationsTree=null,this._tokenizationListener.dispose(),this._languageRegistryListener.dispose(),this._clearTimers(),this._tokens=null,this._isDisposed=!0,this._buffer=null,e.prototype.dispose.call(this),this._isDisposing=!1},t.prototype._assertNotDisposed=function(){if(this._isDisposed)throw new Error("Model is disposed!")},t.prototype._emitContentChangedEvent=function(e,t){this._isDisposing||this._eventEmitter.fire(new _(e,t))},t.prototype.setValue=function(e){if(this._assertNotDisposed(),null!==e){var t=Pe(e,this._options.defaultEOL);this.setValueFromTextBuffer(t)}},t.prototype._createContentChanged2=function(e,t,n,i,o,r,s){return{changes:[{range:e,rangeOffset:t,rangeLength:n,text:i}],eol:this._buffer.getEOL(),versionId:this.getVersionId(),isUndoing:o,isRedoing:r,isFlush:s}},t.prototype.setValueFromTextBuffer=function(e){if(this._assertNotDisposed(),null!==e){var t=this.getFullModelRange(),n=this.getValueLengthInRange(t),i=this.getLineCount(),o=this.getLineMaxColumn(i);this._buffer=e,this._increaseVersionId(),this._resetTokenizationState(),this._decorations=Object.create(null),this._decorationsTree=new Fe,this._commandManager=new h(this),this._trimAutoWhitespaceLines=null,this._emitContentChangedEvent(new b([new p],this._versionId,!1,!1),this._createContentChanged2(new d.Q(1,1,i,o),0,n,this.getValue(),!1,!1,!0))}},t.prototype.setEOL=function(e){this._assertNotDisposed();var t=e===r.WU.CRLF?"\r\n":"\n";if(this._buffer.getEOL()!==t){var n=this.getFullModelRange(),i=this.getValueLengthInRange(n),o=this.getLineCount(),s=this.getLineMaxColumn(o);this._onBeforeEOLChange(),this._buffer.setEOL(t),this._increaseVersionId(),this._onAfterEOLChange(),this._emitContentChangedEvent(new b([new y],this._versionId,!1,!1),this._createContentChanged2(new d.Q(1,1,o,s),0,i,this.getValue(),!1,!1,!1))}},t.prototype._onBeforeEOLChange=function(){var e=this.getVersionId(),t=this._decorationsTree.search(0,!1,!1,e);this._ensureNodesHaveRanges(t)},t.prototype._onAfterEOLChange=function(){for(var e=this.getVersionId(),t=this._decorationsTree.collectNodesPostOrder(),n=0,i=t.length;n0},t.prototype.getAttachedEditorCount=function(){return this._attachedEditorCount},t.prototype.isTooLargeForSyncing=function(){return this._isTooLargeForSyncing},t.prototype.isTooLargeForTokenization=function(){return this._isTooLargeForTokenization},t.prototype.isDisposed=function(){return this._isDisposed},t.prototype.isDominatedByLongLines=function(){if(this._assertNotDisposed(),this.isTooLargeForTokenization())return!1;for(var e=0,t=0,n=this._buffer.getLineCount(),i=1;i<=n;i++){var o=this._buffer.getLineLength(i);o>=1e4?t+=o:e+=o}return t>e},Object.defineProperty(t.prototype,"uri",{get:function(){return this._associatedResource},enumerable:!0,configurable:!0}),t.prototype.getOptions=function(){return this._assertNotDisposed(),this._options},t.prototype.updateOptions=function(e){this._assertNotDisposed();var t=void 0!==e.tabSize?e.tabSize:this._options.tabSize,n=void 0!==e.insertSpaces?e.insertSpaces:this._options.insertSpaces,i=void 0!==e.trimAutoWhitespace?e.trimAutoWhitespace:this._options.trimAutoWhitespace,o=new r.X2({tabSize:t,insertSpaces:n,defaultEOL:this._options.defaultEOL,trimAutoWhitespace:i});if(!this._options.equals(o)){var s=this._options.createChangeEvent(o);this._options=o,this._onDidChangeOptions.fire(s)}},t.prototype.detectIndentation=function(e,t){this._assertNotDisposed();var n=ue(this._buffer,t,e);this.updateOptions({insertSpaces:n.insertSpaces,tabSize:n.tabSize})},t._normalizeIndentationFromWhitespace=function(e,t,n){for(var i=0,o=0;othis.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineContent(e)},t.prototype.getLineLength=function(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineLength(e)},t.prototype.getLinesContent=function(){return this._assertNotDisposed(),this._buffer.getLinesContent()},t.prototype.getEOL=function(){return this._assertNotDisposed(),this._buffer.getEOL()},t.prototype.getLineMinColumn=function(e){return this._assertNotDisposed(),1},t.prototype.getLineMaxColumn=function(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineLength(e)+1},t.prototype.getLineFirstNonWhitespaceColumn=function(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineFirstNonWhitespaceColumn(e)},t.prototype.getLineLastNonWhitespaceColumn=function(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineLastNonWhitespaceColumn(e)},t.prototype._validateRangeRelaxedNoAllocations=function(e){var t,n,i=this._buffer.getLineCount(),o=e.startLineNumber,r=e.startColumn;o<1?(t=1,n=1):o>i?(t=i,n=this.getLineMaxColumn(t)):(t=0|o,n=r<=1?1:r>=(c=this.getLineMaxColumn(t))?c:0|r);var s,a,u=e.endLineNumber,l=e.endColumn;if(u<1)s=1,a=1;else if(u>i)s=i,a=this.getLineMaxColumn(s);else{var c;s=0|u,a=l<=1?1:l>=(c=this.getLineMaxColumn(s))?c:0|l}return o===t&&r===n&&u===s&&l===a&&e instanceof d.Q&&!(e instanceof f.L)?e:new d.Q(t,n,s,a)},t.prototype._isValidPosition=function(e,t,n){if(isNaN(e))return!1;if(e<1)return!1;if(e>this._buffer.getLineCount())return!1;if(isNaN(t))return!1;if(t<1)return!1;if(t>this.getLineMaxColumn(e))return!1;if(n&&t>1){var i=this._buffer.getLineCharCode(e,t-2);if(w.isHighSurrogate(i))return!1}return!0},t.prototype._validatePosition=function(e,t,n){var i=Math.floor("number"!=typeof e||isNaN(e)?1:e),o=Math.floor("number"!=typeof t||isNaN(t)?1:t),r=this._buffer.getLineCount();if(i<1)return new J.y(1,1);if(i>r)return new J.y(r,this.getLineMaxColumn(r));if(o<=1)return new J.y(i,1);var s=this.getLineMaxColumn(i);if(o>=s)return new J.y(i,s);if(n){var a=this._buffer.getLineCharCode(i,o-2);if(w.isHighSurrogate(a))return new J.y(i,o-1)}return new J.y(i,o)},t.prototype.validatePosition=function(e){return this._assertNotDisposed(),e instanceof J.y&&this._isValidPosition(e.lineNumber,e.column,!0)?e:this._validatePosition(e.lineNumber,e.column,!0)},t.prototype._isValidRange=function(e,t){var n=e.startLineNumber,i=e.startColumn,o=e.endLineNumber,r=e.endColumn;if(!this._isValidPosition(n,i,!1))return!1;if(!this._isValidPosition(o,r,!1))return!1;if(t){var s=i>1?this._buffer.getLineCharCode(n,i-2):0,a=r>1&&r<=this._buffer.getLineLength(o)?this._buffer.getLineCharCode(o,r-2):0,u=w.isHighSurrogate(s),l=w.isHighSurrogate(a);return!u&&!l}return!0},t.prototype.validateRange=function(e){if(this._assertNotDisposed(),e instanceof d.Q&&!(e instanceof f.L)&&this._isValidRange(e,!0))return e;var t=this._validatePosition(e.startLineNumber,e.startColumn,!1),n=this._validatePosition(e.endLineNumber,e.endColumn,!1),i=t.lineNumber,o=t.column,r=n.lineNumber,s=n.column,a=o>1?this._buffer.getLineCharCode(i,o-2):0,u=s>1&&s<=this._buffer.getLineLength(r)?this._buffer.getLineCharCode(r,s-2):0,l=w.isHighSurrogate(a),c=w.isHighSurrogate(u);return l||c?i===r&&o===s?new d.Q(i,o-1,r,s-1):l&&c?new d.Q(i,o-1,r,s+1):l?new d.Q(i,o-1,r,s):new d.Q(i,o,r,s+1):new d.Q(i,o,r,s)},t.prototype.modifyPosition=function(e,t){this._assertNotDisposed();var n=this.getOffsetAt(e)+t;return this.getPositionAt(Math.min(this._buffer.getLength(),Math.max(0,n)))},t.prototype.getFullModelRange=function(){this._assertNotDisposed();var e=this.getLineCount();return new d.Q(1,1,e,this.getLineMaxColumn(e))},t.prototype.findMatchesLineByLine=function(e,t,n,i){return this._buffer.findMatchesLineByLine(e,t,n,i)},t.prototype.findMatches=function(e,t,n,i,o,r,s){var a;if(void 0===s&&(s=999),this._assertNotDisposed(),a=d.Q.isIRange(t)?this.validateRange(t):this.getFullModelRange(),!n&&e.indexOf("\n")<0){var u=new ce.lt(e,n,i,o).parseSearchRequest();return u?this.findMatchesLineByLine(a,u,r,s):[]}return ce.hB.findMatches(this,new ce.lt(e,n,i,o),a,r,s)},t.prototype.findNextMatch=function(e,t,n,i,o,r){this._assertNotDisposed();var s=this.validatePosition(t);if(!n&&e.indexOf("\n")<0){var a=new ce.lt(e,n,i,o).parseSearchRequest(),u=this.getLineCount(),l=new d.Q(s.lineNumber,s.column,u,this.getLineMaxColumn(u)),c=this.findMatchesLineByLine(l,a,r,1);return ce.hB.findNextMatch(this,new ce.lt(e,n,i,o),s,r),c.length>0?c[0]:(l=new d.Q(1,1,s.lineNumber,this.getLineMaxColumn(s.lineNumber)),(c=this.findMatchesLineByLine(l,a,r,1)).length>0?c[0]:null)}return ce.hB.findNextMatch(this,new ce.lt(e,n,i,o),s,r)},t.prototype.findPreviousMatch=function(e,t,n,i,o,r){this._assertNotDisposed();var s=this.validatePosition(t);return ce.hB.findPreviousMatch(this,new ce.lt(e,n,i,o),s,r)},t.prototype.pushStackElement=function(){this._commandManager.pushStackElement()},t.prototype.pushEOL=function(e){if(("\n"===this.getEOL()?r.WU.LF:r.WU.CRLF)!==e)try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._commandManager.pushEOL(e)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}},t.prototype.pushEditOperations=function(e,t,n){try{return this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._pushEditOperations(e,t,n)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}},t.prototype._pushEditOperations=function(e,t,n){var i=this;if(this._options.trimAutoWhitespace&&this._trimAutoWhitespaceLines){for(var o=t.map((function(e){return{range:i.validateRange(e.range),text:e.text}})),r=!0,s=0,a=e.length;su.endLineNumber,p=u.startLineNumber>y.endLineNumber;if(!f&&!p){l=!0;break}}if(!l){r=!1;break}}if(r)for(s=0,a=this._trimAutoWhitespaceLines.length;sy.endLineNumber||g===y.startLineNumber&&y.startColumn===m&&y.isEmpty()&&b&&b.length>0&&"\n"===b.charAt(0)||g===y.startLineNumber&&1===y.startColumn&&y.isEmpty()&&b&&b.length>0&&"\n"===b.charAt(b.length-1))){v=!1;break}}v&&t.push({range:new d.Q(g,1,g,m),text:null})}this._trimAutoWhitespaceLines=null}return this._commandManager.pushEditOperation(e,t,n)},t.prototype.applyEdits=function(e){try{return this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._applyEdits(e)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}},t._eolCount=function(e){for(var t=0,n=0,i=0,o=e.length;i=0;S--){var L=p+S,I=s-l-C+L;u.push(new g(L,this.getLineContent(I)))}if(M<_){var N=p+M;u.push(new m(N+1,y))}if(Mthis.getLineCount()?[]:this.getLinesDecorations(e,e,t,n)},t.prototype.getLinesDecorations=function(e,t,n,i){void 0===n&&(n=0),void 0===i&&(i=!1);var o=this.getLineCount(),r=Math.min(o,Math.max(1,e)),s=Math.min(o,Math.max(1,t)),a=this.getLineMaxColumn(s);return this._getDecorationsInRange(new d.Q(r,1,s,a),n,i)},t.prototype.getDecorationsInRange=function(e,t,n){void 0===t&&(t=0),void 0===n&&(n=!1);var i=this.validateRange(e);return this._getDecorationsInRange(i,t,n)},t.prototype.getOverviewRulerDecorations=function(e,t){void 0===e&&(e=0),void 0===t&&(t=!1);var n=this.getVersionId(),i=this._decorationsTree.search(e,t,!0,n);return this._ensureNodesHaveRanges(i)},t.prototype.getAllDecorations=function(e,t){void 0===e&&(e=0),void 0===t&&(t=!1);var n=this.getVersionId(),i=this._decorationsTree.search(e,t,!1,n);return this._ensureNodesHaveRanges(i)},t.prototype._getDecorationsInRange=function(e,t,n){var i=this._buffer.getOffsetAt(e.startLineNumber,e.startColumn),o=this._buffer.getOffsetAt(e.endLineNumber,e.endColumn),r=this.getVersionId(),s=this._decorationsTree.intervalSearch(i,o,t,n,r);return this._ensureNodesHaveRanges(s)},t.prototype._ensureNodesHaveRanges=function(e){for(var t=0,n=e.length;t0)for(;o>0&&s>=1;){var u=this.getLineFirstNonWhitespaceColumn(s);if(0!==u){if(u=0;c--)l=(f=this._tokens._tokenizeText(this._buffer,r[c],l))?f.endState.clone():a.clone();var h=Math.floor(.4*this._tokens.inValidLineStartIndex);t=Math.min(this.getLineCount(),t+h);for(var d=e;d<=t;d++){var f,p=this.getLineContent(d);(f=this._tokens._tokenizeText(this._buffer,p,l))?(this._tokens._setTokens(this._tokens.languageIdentifier.id,d-1,p.length,f.tokens),this._tokens._setIsInvalid(d-1,!1),this._tokens._setState(d-1,l),l=f.endState.clone(),i.registerChangedTokens(d)):l=a.clone()}var g=i.build();g&&this._onDidChangeTokens.fire(g)}}},t.prototype.forceTokenization=function(e){if(e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");var t=new se;this._tokens._updateTokensUntilLine(this._buffer,t,e);var n=t.build();n&&this._onDidChangeTokens.fire(n)},t.prototype.isCheapToTokenize=function(e){return this._tokens.isCheapToTokenize(e)},t.prototype.tokenizeIfCheap=function(e){this.isCheapToTokenize(e)&&this.forceTokenization(e)},t.prototype.getLineTokens=function(e){if(e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._getLineTokens(e)},t.prototype._getLineTokens=function(e){var t=this._buffer.getLineContent(e);return this._tokens.getTokens(this._languageIdentifier.id,e-1,t)},t.prototype.getLanguageIdentifier=function(){return this._languageIdentifier},t.prototype.getModeId=function(){return this._languageIdentifier.language},t.prototype.setMode=function(e){if(this._languageIdentifier.id!==e.id){var t={oldLanguage:this._languageIdentifier.language,newLanguage:e.language};this._languageIdentifier=e,this._resetTokenizationState(),this.emitModelTokensChangedEvent({ranges:[{fromLineNumber:1,toLineNumber:this.getLineCount()}]}),this._onDidChangeLanguage.fire(t),this._onDidChangeLanguageConfiguration.fire({})}},t.prototype.getLanguageIdAtPosition=function(e,t){if(!this._tokens.tokenizationSupport)return this._languageIdentifier.id;var n=this.validatePosition({lineNumber:e,column:t}),i=n.lineNumber,o=n.column,r=this._getLineTokens(i);return r.getLanguageId(r.findTokenIndexAtOffset(o-1))},t.prototype._beginBackgroundTokenization=function(){var e=this;this._shouldAutoTokenize()&&-1===this._revalidateTokensTimeout&&(this._revalidateTokensTimeout=setTimeout((function(){e._revalidateTokensTimeout=-1,e._revalidateTokensNow()}),0))},t.prototype._warmUpTokens=function(){var e=Math.min(100,this.getLineCount());this._revalidateTokensNow(e),this._tokens.hasLinesToTokenize(this._buffer)&&this._beginBackgroundTokenization()},t.prototype._revalidateTokensNow=function(e){void 0===e&&(e=this._buffer.getLineCount());for(var t=new se,n=G.create(!1);this._tokens.hasLinesToTokenize(this._buffer)&&!(n.elapsed()>20)&&!(this._tokens._tokenizeOneLine(this._buffer,t)>=e););this._tokens.hasLinesToTokenize(this._buffer)&&this._beginBackgroundTokenization();var i=t.build();i&&this._onDidChangeTokens.fire(i)},t.prototype.emitModelTokensChangedEvent=function(e){this._isDisposing||this._onDidChangeTokens.fire(e)},t.prototype.getWordAtPosition=function(e){this._assertNotDisposed();var n=this.validatePosition(e),i=this.getLineContent(n.lineNumber),o=this._getLineTokens(n.lineNumber),r=o.findTokenIndexAtOffset(n.column-1),s=t._findLanguageBoundaries(o,r),a=s[0],u=s[1],l=(0,$.Th)(n.column,X.cx.getWordDefinition(o.getLanguageId(r)),i.substring(a,u),a);if(l)return l;if(r>0&&a===n.column-1){var c=t._findLanguageBoundaries(o,r-1),h=c[0],d=c[1],f=(0,$.Th)(n.column,X.cx.getWordDefinition(o.getLanguageId(r-1)),i.substring(h,d),h);if(f)return f}return null},t._findLanguageBoundaries=function(e,t){for(var n,i,o=e.getLanguageId(t),r=t;r>=0&&e.getLanguageId(r)===o;r--)n=e.getStartOffset(r);r=t;for(var s=e.getCount();r0&&n.getStartOffset(o)===e.column-1){a=n.getStartOffset(o),o--;var l,c,h,d=X.cx.getBracketsSupport(n.getLanguageId(o));if(d&&!(0,q.Yo)(n.getStandardTokenType(o)))if(s=Math.max(n.getStartOffset(o),e.column-1-d.maxBracketLength),(l=K.Fu.findPrevBracketInToken(d.reversedRegex,t,i,s,a))&&l.startColumn<=e.column&&e.column<=l.endColumn&&(c=(c=i.substring(l.startColumn-1,l.endColumn-1)).toLowerCase(),h=this._matchFoundBracket(l,d.textIsBracket[c],d.textIsOpenBracket[c])))return h}return null},t.prototype._matchFoundBracket=function(e,t,n){if(!t)return null;var i;if(n){if(i=this._findMatchingBracketDown(t,e.getEndPosition()))return[e,i]}else if(i=this._findMatchingBracketUp(t,e.getStartPosition()))return[e,i];return null},t.prototype._findMatchingBracketUp=function(e,t){for(var n=e.languageIdentifier.id,i=e.reversedRegex,o=-1,r=t.lineNumber;r>=1;r--){var s=this._getLineTokens(r),a=s.getCount(),u=this._buffer.getLineContent(r),l=a-1,c=-1;for(r===t.lineNumber&&(l=s.findTokenIndexAtOffset(t.column-1),c=t.column-1);l>=0;l--){var h=s.getLanguageId(l),d=s.getStandardTokenType(l),f=s.getStartOffset(l),p=s.getEndOffset(l);if(-1===c&&(c=p),h===n&&!(0,q.Yo)(d))for(;;){var g=K.Fu.findPrevBracketInToken(i,r,u,f,c);if(!g)break;var m=u.substring(g.startColumn-1,g.endColumn-1);if((m=m.toLowerCase())===e.open?o++:m===e.close&&o--,0===o)return g;c=g.startColumn-1}c=-1}}return null},t.prototype._findMatchingBracketDown=function(e,t){for(var n=e.languageIdentifier.id,i=e.forwardRegex,o=1,r=t.lineNumber,s=this.getLineCount();r<=s;r++){var a=this._getLineTokens(r),u=a.getCount(),l=this._buffer.getLineContent(r),c=0,h=0;for(r===t.lineNumber&&(c=a.findTokenIndexAtOffset(t.column-1),h=t.column-1);co)throw new Error("Illegal value for lineNumber");for(var r=X.cx.getFoldingRules(this._languageIdentifier.id),s=r&&r.offSide,a=-2,u=-1,l=-2,c=-1,h=function(e){if(-1!==a&&(-2===a||a>e-1)){a=-1,u=-1;for(var t=e-2;t>=0;t--){var n=i._computeIndentLevel(t);if(n>=0){a=t,u=n;break}}}if(-2===l)for(l=-1,c=-1,t=e;t=0){l=t,c=r;break}}},d=-2,f=-1,p=-2,g=-1,m=function(e){if(-2===d){d=-1,f=-1;for(var t=e-2;t>=0;t--){var n=i._computeIndentLevel(t);if(n>=0){d=t,f=n;break}}}if(-1!==p&&(-2===p||p=0){p=t,g=r;break}}},v=0,y=!0,b=0,_=!0,w=0,M=0;y||_;M++){var C=e-M,S=e+M;if(0!==M&&(C<1||Co||S>n)&&(_=!1),M>5e4&&(y=!1,_=!1),y){var L=void 0;if((I=this._computeIndentLevel(C-1))>=0?(l=C-1,c=I,L=Math.ceil(I/this._options.tabSize)):(h(C),L=this._getIndentLevelForWhitespaceLine(s,u,c)),0===M){if(v=C,b=S,0===(w=L))return{startLineNumber:v,endLineNumber:b,indent:w};continue}L>=w?v=C:y=!1}if(_){var I,N=void 0;(I=this._computeIndentLevel(S-1))>=0?(d=S-1,f=I,N=Math.ceil(I/this._options.tabSize)):(m(S),N=this._getIndentLevelForWhitespaceLine(s,f,g)),N>=w?b=S:_=!1}}return{startLineNumber:v,endLineNumber:b,indent:w}},t.prototype.getLinesIndentGuides=function(e,t){this._assertNotDisposed();var n=this.getLineCount();if(e<1||e>n)throw new Error("Illegal value for startLineNumber");if(t<1||t>n)throw new Error("Illegal value for endLineNumber");for(var i=X.cx.getFoldingRules(this._languageIdentifier.id),o=i&&i.offSide,r=new Array(t-e+1),s=-2,a=-1,u=-2,l=-1,c=e;c<=t;c++){var h=c-e,d=this._computeIndentLevel(c-1);if(d>=0)s=c-1,a=d,r[h]=Math.ceil(d/this._options.tabSize);else{if(-2===s){s=-1,a=-1;for(var f=c-2;f>=0;f--)if((p=this._computeIndentLevel(f))>=0){s=f,a=p;break}}if(-1!==u&&(-2===u||u=0){u=f,l=p;break}}r[h]=this._getIndentLevelForWhitespaceLine(o,a,l)}}return r},t.prototype._getIndentLevelForWhitespaceLine=function(e,t,n){return-1===t||-1===n?0:t0?this._deferredEvent?this._deferredEvent=this._deferredEvent.merge(e):this._deferredEvent=e:(this._fastEmitter.fire(e),this._slowEmitter.fire(e))},t}(U.jG)},6343:(e,t,n)=>{"use strict";n.d(t,{W5:()=>p,dr:()=>c,hB:()=>d,lt:()=>u,wC:()=>f});var i=n(899),o=n(386),r=n(1456),s=n(4076),a=n(2040),u=function(){function e(e,t,n,i){this.searchString=e,this.isRegex=t,this.matchCase=n,this.wordSeparators=i}return e._isMultilineRegexSource=function(e){if(!e||0===e.length)return!1;for(var t=0,n=e.length;t=n)break;var i=e.charCodeAt(t);if(110===i||114===i)return!0}return!1},e.prototype.parseSearchRequest=function(){if(""===this.searchString)return null;var t;t=this.isRegex?e._isMultilineRegexSource(this.searchString):this.searchString.indexOf("\n")>=0;var n=null;try{n=i.createRegExp(this.searchString,this.isRegex,{matchCase:this.matchCase,wholeWord:!1,multiline:t,global:!0})}catch(e){return null}if(!n)return null;var o=!this.isRegex&&!t;return o&&this.searchString.toLowerCase()!==this.searchString.toUpperCase()&&(o=this.matchCase),new l(n,this.wordSeparators?(0,a.i)(this.wordSeparators):null,o?this.searchString:null)},e}(),l=function(e,t,n){this.regex=e,this.wordSeparators=t,this.simpleSearch=n};function c(e,t,n){if(!n)return new s.Dg(e,null);for(var i=[],o=0,r=t.length;o=e?i=o-1:t[o+1]>=e?(n=o,i=o):n=o+1}return n+1},e}(),d=function(){function e(){}return e.findMatches=function(e,t,n,i,o){var r=t.parseSearchRequest();return r?r.regex.multiline?this._doFindMatchesMultiline(e,n,new p(r.wordSeparators,r.regex),i,o):this._doFindMatchesLineByLine(e,n,r,i,o):[]},e._getMultilineMatchRange=function(e,t,n,i,o,s){var a,u,l=0;if(a="\r\n"===e.getEOL()?t+o+(l=i.findLineFeedCountBeforeOffset(o)):t+o,"\r\n"===e.getEOL()){var c=i.findLineFeedCountBeforeOffset(o+s.length)-l;u=a+s.length+c}else u=a+s.length;var h=e.getPositionAt(a),d=e.getPositionAt(u);return new r.Q(h.lineNumber,h.column,d.lineNumber,d.column)},e._doFindMatchesMultiline=function(e,t,n,i,o){var r,a=e.getOffsetAt(t.getStartPosition()),u=e.getValueInRange(t,s.kf.LF),l="\r\n"===e.getEOL()?new h(u):null,d=[],f=0;for(n.reset(0);r=n.next(u);)if(d[f++]=c(this._getMultilineMatchRange(e,a,u,l,r.index,r[0]),r,i),f>=o)return d;return d},e._doFindMatchesLineByLine=function(e,t,n,i,o){var r=[],s=0;if(t.startLineNumber===t.endLineNumber){var a=e.getLineContent(t.startLineNumber).substring(t.startColumn-1,t.endColumn-1);return s=this._findMatchesInLine(n,a,t.startLineNumber,t.startColumn-1,s,r,i,o),r}var u=e.getLineContent(t.startLineNumber).substring(t.startColumn-1);s=this._findMatchesInLine(n,u,t.startLineNumber,t.startColumn-1,s,r,i,o);for(var l=t.startLineNumber+1;l=l))return o;return o}var y,b=new p(e.wordSeparators,e.regex);b.reset(0);do{if((y=b.next(t))&&(a[o++]=c(new r.Q(n,y.index+1+i,n,y.index+1+y[0].length+i),y,u),o>=l))return o}while(y);return o},e.findNextMatch=function(e,t,n,i){var o=t.parseSearchRequest();if(!o)return null;var r=new p(o.wordSeparators,o.regex);return o.regex.multiline?this._doFindNextMatchMultiline(e,n,r,i):this._doFindNextMatchLineByLine(e,n,r,i)},e._doFindNextMatchMultiline=function(e,t,n,i){var a=new o.y(t.lineNumber,1),u=e.getOffsetAt(a),l=e.getLineCount(),d=e.getValueInRange(new r.Q(a.lineNumber,a.column,l,e.getLineMaxColumn(l)),s.kf.LF),f="\r\n"===e.getEOL()?new h(d):null;n.reset(t.column-1);var p=n.next(d);return p?c(this._getMultilineMatchRange(e,u,d,f,p.index,p[0]),p,i):1!==t.lineNumber||1!==t.column?this._doFindNextMatchMultiline(e,new o.y(1,1),n,i):null},e._doFindNextMatchLineByLine=function(e,t,n,i){var o=e.getLineCount(),r=t.lineNumber,s=e.getLineContent(r),a=this._findFirstMatchInLine(n,s,r,t.column,i);if(a)return a;for(var u=1;u<=o;u++){var l=(r+u-1)%o,c=e.getLineContent(l+1),h=this._findFirstMatchInLine(n,c,l+1,1,i);if(h)return h}return null},e._findFirstMatchInLine=function(e,t,n,i,o){e.reset(i-1);var s=e.next(t);return s?c(new r.Q(n,s.index+1,n,s.index+1+s[0].length),s,o):null},e.findPreviousMatch=function(e,t,n,i){var o=t.parseSearchRequest();if(!o)return null;var r=new p(o.wordSeparators,o.regex);return o.regex.multiline?this._doFindPreviousMatchMultiline(e,n,r,i):this._doFindPreviousMatchLineByLine(e,n,r,i)},e._doFindPreviousMatchMultiline=function(e,t,n,i){var s=this._doFindMatchesMultiline(e,new r.Q(1,1,t.lineNumber,t.column),n,i,9990);if(s.length>0)return s[s.length-1];var a=e.getLineCount();return t.lineNumber!==a||t.column!==e.getLineMaxColumn(a)?this._doFindPreviousMatchMultiline(e,new o.y(a,e.getLineMaxColumn(a)),n,i):null},e._doFindPreviousMatchLineByLine=function(e,t,n,i){var o=e.getLineCount(),r=t.lineNumber,s=e.getLineContent(r).substring(0,t.column-1),a=this._findLastMatchInLine(n,s,r,i);if(a)return a;for(var u=1;u<=o;u++){var l=(o+r-u-1)%o,c=e.getLineContent(l+1),h=this._findLastMatchInLine(n,c,l+1,i);if(h)return h}return null},e._findLastMatchInLine=function(e,t,n,i){var o,s=null;for(e.reset(0);o=e.next(t);)s=c(new r.Q(n,o.index+1,n,o.index+1+o[0].length),o,i);return s},e}();function f(e,t,n,i,o){return function(e,t,n,i,o){if(0===i)return!0;var r=t.charCodeAt(i-1);if(0!==e.get(r))return!0;if(13===r||10===r)return!0;if(o>0){var s=t.charCodeAt(i);if(0!==e.get(s))return!0}return!1}(e,t,0,i,o)&&function(e,t,n,i,o){if(i+o===n)return!0;var r=t.charCodeAt(i+o);if(0!==e.get(r))return!0;if(13===r||10===r)return!0;if(o>0){var s=t.charCodeAt(i+o-1);if(0!==e.get(s))return!0}return!1}(e,t,n,i,o)}var p=function(){function e(e,t){this._wordSeparators=e,this._searchRegex=t,this._prevMatchStartIndex=-1,this._prevMatchLength=0}return e.prototype.reset=function(e){this._searchRegex.lastIndex=e,this._prevMatchStartIndex=-1,this._prevMatchLength=0},e.prototype.next=function(e){var t,n=e.length;do{if(this._prevMatchStartIndex+this._prevMatchLength===n)return null;if(!(t=this._searchRegex.exec(e)))return null;var i=t.index,o=t[0].length;if(i===this._prevMatchStartIndex&&o===this._prevMatchLength)return null;if(this._prevMatchStartIndex=i,this._prevMatchLength=o,!this._wordSeparators||f(this._wordSeparators,e,n,i,o))return t}while(t);return null},e}()},1279:(e,t,n)=>{"use strict";n.d(t,{Io:()=>r,J3:()=>i,Ld:()=>o,Th:()=>s});var i="`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?",o=function(e){void 0===e&&(e="");for(var t="(-?\\d*\\.\\d\\w*)|([^",n=0;n=0||(t+="\\"+i[n]);return t+="\\s]+)",new RegExp(t,"g")}();function r(e){var t=o;if(e&&e instanceof RegExp)if(e.global)t=e;else{var n="g";e.ignoreCase&&(n+="i"),e.multiline&&(n+="m"),t=new RegExp(e.source,n)}return t.lastIndex=0,t}function s(e,t,n,i){t.lastIndex=0;var o=t.exec(n);if(!o)return null;var r=o[0].indexOf(" ")>=0?function(e,t,n,i){var o,r=e-1-i;for(t.lastIndex=0;o=t.exec(n);){if(o.index>r)return null;if(t.lastIndex>=r)return{word:o[0],startColumn:i+1+o.index,endColumn:i+1+t.lastIndex}}return null}(e,t,n,i):function(e,t,n,i){var o,r=e-1-i,s=n.lastIndexOf(" ",r-1)+1,a=n.indexOf(" ",r);for(-1===a&&(a=n.length),t.lastIndex=s;o=t.exec(n);)if(o.index<=r&&t.lastIndex>=r)return{word:o[0],startColumn:i+1+o.index,endColumn:i+1+t.lastIndex};return null}(e,t,n,i);return t.lastIndex=0,r}},5439:(e,t,n)=>{"use strict";n.d(t,{iM:()=>A,Kj:()=>h,qh:()=>E,Yu:()=>z,UU:()=>D,NQ:()=>j,Kb:()=>d,UG:()=>x,CW:()=>O,Wd:()=>N,lO:()=>_,Z8:()=>W,r8:()=>I,Lh:()=>k,Aj:()=>m,N9:()=>P,x4:()=>R,aW:()=>M,rN:()=>C,An:()=>L,er:()=>S,tS:()=>c,v0:()=>f,xn:()=>v,dG:()=>F,ce:()=>T,Yg:()=>w,je:()=>b});var i=n(2213),o=n(6621),r=n(699);function s(e,t,n,i){if(Array.isArray(e)){for(var o=0,a=0,u=e;ao&&(o=l)}return o}if("string"==typeof e)return i?"*"===e?5:e===n?10:0:0;if(e){var c=e.language,h=e.pattern,d=e.scheme,f=e.hasAccessToAllModels;if(!i&&!f)return 0;if(o=0,d)if(d===t.scheme)o=10;else{if("*"!==d)return 0;o=5}if(c)if(c===n)o=10;else{if("*"!==c)return 0;o=Math.max(o,5)}if(h){if(h!==t.fsPath&&!(0,r.YW)(h,t.fsPath))return 0;o=10}return o}return 0}var a=n(3072);function u(e){return"string"!=typeof e&&(Array.isArray(e)?e.every(u):e.exclusive)}const l=function(){function e(){this._clock=0,this._entries=[],this._onDidChange=new i.vl}return Object.defineProperty(e.prototype,"onDidChange",{get:function(){return this._onDidChange.event},enumerable:!0,configurable:!0}),e.prototype.register=function(e,t){var n=this,i={selector:e,provider:t,_score:-1,_time:this._clock++};return this._entries.push(i),this._lastCandidate=void 0,this._onDidChange.fire(this._entries.length),(0,o.s)((function(){if(i){var e=n._entries.indexOf(i);e>=0&&(n._entries.splice(e,1),n._lastCandidate=void 0,n._onDidChange.fire(n._entries.length),i=void 0)}}))},e.prototype.has=function(e){return this.all(e).length>0},e.prototype.all=function(e){if(!e)return[];this._updateScores(e);for(var t=[],n=0,i=this._entries;n0&&t.push(o.provider)}return t},e.prototype.ordered=function(e){var t=[];return this._orderedForEach(e,(function(e){return t.push(e.provider)})),t},e.prototype.orderedGroups=function(e){var t,n,i=[];return this._orderedForEach(e,(function(e){t&&n===e._score?t.push(e.provider):(n=e._score,t=[e.provider],i.push(t))})),i},e.prototype._orderedForEach=function(e,t){if(e){this._updateScores(e);for(var n=0;n0&&t(i)}}},e.prototype._updateScores=function(t){var n={uri:t.uri.toString(),language:t.getLanguageIdentifier().language};if(!this._lastCandidate||this._lastCandidate.language!==n.language||this._lastCandidate.uri!==n.uri){this._lastCandidate=n;for(var i=0,o=this._entries;i0){for(var l=0,c=this._entries;lt._score?-1:e._timet._time?-1:0},e}();var c,h,d,f,p=function(){function e(){this._onDidChange=new i.vl,this.onDidChange=this._onDidChange.event,this._map=Object.create(null),this._colorMap=null}return e.prototype.fire=function(e){this._onDidChange.fire({changedLanguages:e,changedColorMap:!1})},e.prototype.register=function(e,t){var n=this;return this._map[e]=t,this.fire([e]),(0,o.s)((function(){n._map[e]===t&&(delete n._map[e],n.fire([e]))}))},e.prototype.get=function(e){return this._map[e]||null},e.prototype.setColorMap=function(e){this._colorMap=e,this._onDidChange.fire({changedLanguages:Object.keys(this._map),changedColorMap:!0})},e.prototype.getColorMap=function(){return this._colorMap},e.prototype.getDefaultBackground=function(){return this._colorMap[2]},e}(),g=n(1780),m=function(e,t){this.language=e,this.id=t},v=function(){function e(){}return e.getLanguageId=function(e){return(255&e)>>>0},e.getTokenType=function(e){return(1792&e)>>>8},e.getFontStyle=function(e){return(14336&e)>>>11},e.getForeground=function(e){return(8372224&e)>>>14},e.getBackground=function(e){return(4286578688&e)>>>23},e.getClassNameFromMetadata=function(e){var t="mtk"+this.getForeground(e),n=this.getFontStyle(e);return 1&n&&(t+=" mtki"),2&n&&(t+=" mtkb"),4&n&&(t+=" mtku"),t},e.getInlineStyleFromMetadata=function(e,t){var n=this.getForeground(e),i=this.getFontStyle(e),o="color: "+t[n]+";";return 1&i&&(o+="font-style: italic;"),2&i&&(o+="font-weight: bold;"),4&i&&(o+="text-decoration: underline;"),o},e}();!function(e){e[e.Invoke=0]="Invoke",e[e.TriggerCharacter=1]="TriggerCharacter",e[e.TriggerForIncompleteCompletions=2]="TriggerForIncompleteCompletions"}(c||(c={})),function(e){e[e.Automatic=1]="Automatic",e[e.Manual=2]="Manual"}(h||(h={})),function(e){e[e.Text=0]="Text",e[e.Read=1]="Read",e[e.Write=2]="Write"}(d||(d={})),function(e){e[e.File=0]="File",e[e.Module=1]="Module",e[e.Namespace=2]="Namespace",e[e.Package=3]="Package",e[e.Class=4]="Class",e[e.Method=5]="Method",e[e.Property=6]="Property",e[e.Field=7]="Field",e[e.Constructor=8]="Constructor",e[e.Enum=9]="Enum",e[e.Interface=10]="Interface",e[e.Function=11]="Function",e[e.Variable=12]="Variable",e[e.Constant=13]="Constant",e[e.String=14]="String",e[e.Number=15]="Number",e[e.Boolean=16]="Boolean",e[e.Array=17]="Array",e[e.Object=18]="Object",e[e.Key=19]="Key",e[e.Null=20]="Null",e[e.EnumMember=21]="EnumMember",e[e.Struct=22]="Struct",e[e.Event=23]="Event",e[e.Operator=24]="Operator",e[e.TypeParameter=25]="TypeParameter"}(f||(f={}));var y,b=((y=Object.create(null))[f.File]="file",y[f.Module]="module",y[f.Namespace]="namespace",y[f.Package]="package",y[f.Class]="class",y[f.Method]="method",y[f.Property]="property",y[f.Field]="field",y[f.Constructor]="constructor",y[f.Enum]="enum",y[f.Interface]="interface",y[f.Function]="function",y[f.Variable]="variable",y[f.Constant]="constant",y[f.String]="string",y[f.Number]="number",y[f.Boolean]="boolean",y[f.Array]="array",y[f.Object]="object",y[f.Key]="key",y[f.Null]="null",y[f.EnumMember]="enum-member",y[f.Struct]="struct",y[f.Event]="event",y[f.Operator]="operator",y[f.TypeParameter]="type-parameter",function(e){return"symbol-icon "+(y[e]||"property")}),_=function(){function e(e){this.value=e}return e.Comment=new e("comment"),e.Imports=new e("imports"),e.Region=new e("region"),e}();function w(e){return(0,g.Gv)(e)&&e.resource&&Array.isArray(e.edits)}var M=new l,C=new l,S=new l,L=new l,I=new l,N=new l,x=new l,D=new l,k=new l,T=new l,E=new l,A=new l,j=new l,O=new l,R=new l,P=new l,z=new l,W=new l,F=new p},5074:(e,t,n)=>{"use strict";var i;n.d(t,{i:()=>o,l:()=>i}),function(e){e[e.None=0]="None",e[e.Indent=1]="Indent",e[e.IndentOutdent=2]="IndentOutdent",e[e.Outdent=3]="Outdent"}(i||(i={}));var o=function(){function e(e){if(this.open=e.open,this.close=e.close,this._standardTokenMask=0,Array.isArray(e.notIn))for(var t=0,n=e.notIn.length;t{"use strict";n.d(t,{cx:()=>y});var i=n(5074),o=function(){function e(e){e.autoClosingPairs?this._autoClosingPairs=e.autoClosingPairs.map((function(e){return new i.i(e)})):e.brackets?this._autoClosingPairs=e.brackets.map((function(e){return new i.i({open:e[0],close:e[1]})})):this._autoClosingPairs=[],this._surroundingPairs=e.surroundingPairs||this._autoClosingPairs}return e.prototype.getAutoClosingPairs=function(){return this._autoClosingPairs},e.prototype.shouldAutoClosePair=function(e,t,n){if(0===t.getTokenCount())return!0;for(var i=t.findTokenIndexAtOffset(n-2),o=t.getStandardTokenType(i),r=0;r1&&!!e.close})).map((function(e){return new i.i(e)})),n.docComment&&this._complexAutoClosePairs.push(new i.i({open:n.docComment.open,close:n.docComment.close}))}return e.prototype.getElectricCharacters=function(){var e=[];if(this._richEditBrackets)for(var t=0,n=this._richEditBrackets.brackets.length;t=0))return{appendText:s.close}}}return null},e}(),u=n(5538),l=n(899),c=function(){function e(t){(t=t||{}).brackets=t.brackets||[["(",")"],["{","}"],["[","]"]],this._brackets=t.brackets.map((function(t){return{open:t[0],openRegExp:e._createOpenBracketRegExp(t[0]),close:t[1],closeRegExp:e._createCloseBracketRegExp(t[1])}})),this._regExpRules=t.regExpRules||[]}return e.prototype.onEnter=function(e,t,n){for(var o=0,r=this._regExpRules.length;o0&&n.length>0)for(o=0,r=this._brackets.length;o0)for(o=0,r=this._brackets.length;o1){var o=t-1,r=-1;for(o=t-1;o>=1;o--){if(e.getLanguageIdAtPosition(o,0)!==i)return r;var s=e.getLineContent(o);if(!n.shouldIgnore(s)&&!/^\s+$/.test(s)&&""!==s)return o;r=o}}return-1},e.prototype.getInheritIndentForLine=function(e,t,n){void 0===n&&(n=!0);var o=this.getIndentRulesSupport(e.getLanguageIdentifier().id);if(!o)return null;if(t<=1)return{indentation:"",action:null};var r=this.getPrecedingValidLine(e,t,o);if(r<0)return null;if(r<1)return{indentation:"",action:null};var s=e.getLineContent(r);if(o.shouldIncrease(s)||o.shouldIndentNextLine(s))return{indentation:l.getLeadingWhitespace(s),action:i.l.Indent,line:r};if(o.shouldDecrease(s))return{indentation:l.getLeadingWhitespace(s),action:null,line:r};if(1===r)return{indentation:l.getLeadingWhitespace(e.getLineContent(r)),action:null,line:r};var a=r-1,u=o.getIndentMetadata(e.getLineContent(a));if(!(3&u)&&4&u){for(var c=0,h=a-1;h>0;h--)if(!o.shouldIndentNextLine(e.getLineContent(h))){c=h;break}return{indentation:l.getLeadingWhitespace(e.getLineContent(c+1)),action:null,line:c+1}}if(n)return{indentation:l.getLeadingWhitespace(e.getLineContent(r)),action:null,line:r};for(h=r;h>0;h--){var d=e.getLineContent(h);if(o.shouldIncrease(d))return{indentation:l.getLeadingWhitespace(d),action:i.l.Indent,line:h};if(o.shouldIndentNextLine(d)){c=0;for(var f=h-1;f>0;f--)if(!o.shouldIndentNextLine(e.getLineContent(h))){c=f;break}return{indentation:l.getLeadingWhitespace(e.getLineContent(c+1)),action:null,line:c+1}}if(o.shouldDecrease(d))return{indentation:l.getLeadingWhitespace(d),action:null,line:h}}return{indentation:l.getLeadingWhitespace(e.getLineContent(1)),action:null,line:1}},e.prototype.getGoodIndentForLine=function(e,t,n,o){var r=this.getIndentRulesSupport(t);if(!r)return null;var s=this.getInheritIndentForLine(e,n),a=e.getLineContent(n);if(s){var c=s.line;if(void 0!==c){var h=this._getOnEnterSupport(t),d=null;try{d=h.onEnter("",e.getLineContent(c),"")}catch(e){(0,u.dz)(e)}if(d){var f=l.getLeadingWhitespace(e.getLineContent(c));return d.removeText&&(f=f.substring(0,f.length-d.removeText)),d.indentAction===i.l.Indent||d.indentAction===i.l.IndentOutdent?f=o.shiftIndent(f):d.indentAction===i.l.Outdent&&(f=o.unshiftIndent(f)),r.shouldDecrease(a)&&(f=o.unshiftIndent(f)),d.appendText&&(f+=d.appendText),l.getLeadingWhitespace(f)}}return r.shouldDecrease(a)?s.action===i.l.Indent?s.indentation:o.unshiftIndent(s.indentation):s.action===i.l.Indent?o.shiftIndent(s.indentation):s.indentation}return null},e.prototype.getIndentForEnter=function(e,t,n,o){e.forceTokenization(t.startLineNumber);var s,a,u=e.getLineTokens(t.startLineNumber),c=(0,r.BQ)(u,t.startColumn-1),h=c.getLineContent(),d=!1;c.firstCharOffset>0&&u.getLanguageId(0)!==c.languageId?(d=!0,s=h.substr(0,t.startColumn-1-c.firstCharOffset)):s=u.getLineContent().substring(0,t.startColumn-1),a=t.isEmpty()?h.substr(t.startColumn-1-c.firstCharOffset):this.getScopedLineTokens(e,t.endLineNumber,t.endColumn).getLineContent().substr(t.endColumn-1-c.firstCharOffset);var f=this.getIndentRulesSupport(c.languageId);if(!f)return null;var p=s,g=l.getLeadingWhitespace(s);if(!o&&!d){var m=this.getInheritIndentForLine(e,t.startLineNumber);f.shouldDecrease(s)&&m&&(g=m.indentation,m.action!==i.l.Indent&&(g=n.unshiftIndent(g))),p=g+l.ltrim(l.ltrim(s," "),"\t")}var v={getLineTokens:function(t){return e.getLineTokens(t)},getLanguageIdentifier:function(){return e.getLanguageIdentifier()},getLanguageIdAtPosition:function(t,n){return e.getLanguageIdAtPosition(t,n)},getLineContent:function(n){return n===t.startLineNumber?p:e.getLineContent(n)}},y=l.getLeadingWhitespace(u.getLineContent()),b=this.getInheritIndentForLine(v,t.startLineNumber+1);if(!b){var _=d?y:g;return{beforeEnter:_,afterEnter:_}}var w=d?y:b.indentation;return b.action===i.l.Indent&&(w=n.shiftIndent(w)),f.shouldDecrease(a)&&(w=n.unshiftIndent(w)),{beforeEnter:d?y:g,afterEnter:w}},e.prototype.getIndentActionForType=function(e,t,n,o){var r=this.getScopedLineTokens(e,t.startLineNumber,t.startColumn),s=this.getIndentRulesSupport(r.languageId);if(!s)return null;var a,u=r.getLineContent(),l=u.substr(0,t.startColumn-1-r.firstCharOffset);if(a=t.isEmpty()?u.substr(t.startColumn-1-r.firstCharOffset):this.getScopedLineTokens(e,t.endLineNumber,t.endColumn).getLineContent().substr(t.endColumn-1-r.firstCharOffset),!s.shouldDecrease(l+a)&&s.shouldDecrease(l+n+a)){var c=this.getInheritIndentForLine(e,t.startLineNumber,!1);if(!c)return null;var h=c.indentation;return c.action!==i.l.Indent&&(h=o.unshiftIndent(h)),h}return null},e.prototype.getIndentMetadata=function(e,t){var n=this.getIndentRulesSupport(e.getLanguageIdentifier().id);return n?t<1||t>e.getLineCount()?null:n.getIndentMetadata(e.getLineContent(t)):null},e.prototype._getOnEnterSupport=function(e){var t=this._getRichEditSupport(e);return t&&t.onEnter||null},e.prototype.getRawEnterActionAtPosition=function(e,t,n){var i=this.getEnterAction(e,new g.Q(t,n,t,n));return i?i.enterAction:null},e.prototype.getEnterAction=function(e,t){var n=this.getIndentationAtPosition(e,t.startLineNumber,t.startColumn),o=this.getScopedLineTokens(e,t.startLineNumber,t.startColumn),r=this._getOnEnterSupport(o.languageId);if(!r)return null;var s,a=o.getLineContent(),l=a.substr(0,t.startColumn-1-o.firstCharOffset);s=t.isEmpty()?a.substr(t.startColumn-1-o.firstCharOffset):this.getScopedLineTokens(e,t.endLineNumber,t.endColumn).getLineContent().substr(t.endColumn-1-o.firstCharOffset);var c=t.startLineNumber,h="";if(c>1&&0===o.firstCharOffset){var d=this.getScopedLineTokens(e,c-1);d.languageId===o.languageId&&(h=d.getLineContent())}var f=null;try{f=r.onEnter(h,l,s)}catch(e){(0,u.dz)(e)}return f?(f.appendText||(f.indentAction===i.l.Indent||f.indentAction===i.l.IndentOutdent?f.appendText="\t":f.appendText=""),f.removeText&&(n=n.substring(0,n.length-f.removeText)),{enterAction:f,indentation:n}):null},e.prototype.getIndentationAtPosition=function(e,t,n){var i=e.getLineContent(t),o=l.getLeadingWhitespace(i);return o.length>n-1&&(o=o.substring(0,n-1)),o},e.prototype.getScopedLineTokens=function(e,t,n){e.forceTokenization(t);var i=e.getLineTokens(t),o=isNaN(n)?e.getLineMaxColumn(t)-1:n-1;return(0,r.BQ)(i,o)},e.prototype.getBracketsSupport=function(e){var t=this._getRichEditSupport(e);return t&&t.brackets||null},e}(),y=new v},4998:(e,t,n)=>{"use strict";n.d(t,{$H:()=>u,I8:()=>s,T5:()=>l,oe:()=>r,z8:()=>a});var i=n(5439),o=n(5752),r=new(function(){function e(){}return e.prototype.clone=function(){return this},e.prototype.equals=function(e){return this===e},e}()),s="vs.editor.nullMode",a=new i.Aj(s,0);function u(e,t,n,i){return new o.$M([new o.ou(i,"",e)],n)}function l(e,t,n,i){var r=new Uint32Array(2);return r[0]=i,r[1]=(16384|e|2<<23)>>>0,new o.Zj(r,n)}},6804:(e,t,n)=>{"use strict";function i(e,t){for(var n=e.getCount(),i=e.findTokenIndexAtOffset(t),r=e.getLanguageId(i),s=i;s+10&&e.getLanguageId(a-1)===r;)a--;return new o(e,r,a,s+1,e.getStartOffset(a),e.getEndOffset(s))}n.d(t,{BQ:()=>i,Yo:()=>r});var o=function(){function e(e,t,n,i,o,r){this._actual=e,this.languageId=t,this._firstTokenIndex=n,this._lastTokenIndex=i,this.firstCharOffset=o,this._lastCharOffset=r}return e.prototype.getLineContent=function(){return this._actual.getLineContent().substring(this.firstCharOffset,this._lastCharOffset)},e.prototype.getTokenCount=function(){return this._lastTokenIndex-this._firstTokenIndex},e.prototype.findTokenIndexAtOffset=function(e){return this._actual.findTokenIndexAtOffset(e+this.firstCharOffset)-this._firstTokenIndex},e.prototype.getStandardTokenType=function(e){return this._actual.getStandardTokenType(e+this._firstTokenIndex)},e}();function r(e){return!!(7&e)}},6360:(e,t,n)=>{"use strict";n.d(t,{Fu:()=>v,az:()=>s});var i=n(899),o=n(1456),r=function(e,t,n,i,o){this.languageIdentifier=e,this.open=t,this.close=n,this.forwardRegex=i,this.reversedRegex=o},s=function(e,t){var n=this;this.brackets=t.map((function(t){return new r(e,t[0],t[1],u({open:t[0],close:t[1]}),l({open:t[0],close:t[1]}))})),this.forwardRegex=c(this.brackets),this.reversedRegex=h(this.brackets),this.textIsBracket={},this.textIsOpenBracket={};var i=0;this.brackets.forEach((function(e){n.textIsBracket[e.open.toLowerCase()]=e,n.textIsBracket[e.close.toLowerCase()]=e,n.textIsOpenBracket[e.open.toLowerCase()]=!0,n.textIsOpenBracket[e.close.toLowerCase()]=!1,i=Math.max(i,e.open.length),i=Math.max(i,e.close.length)})),this.maxBracketLength=i};function a(e,t){var n={};return function(i){var o=e(i);return n.hasOwnProperty(o)||(n[o]=t(i)),n[o]}}var u=a((function(e){return e.open+";"+e.close}),(function(e){return f([e.open,e.close])})),l=a((function(e){return e.open+";"+e.close}),(function(e){return f([m(e.open),m(e.close)])})),c=a((function(e){return e.map((function(e){return e.open+";"+e.close})).join(";")}),(function(e){var t=[];return e.forEach((function(e){t.push(e.open),t.push(e.close)})),f(t)})),h=a((function(e){return e.map((function(e){return e.open+";"+e.close})).join(";")}),(function(e){var t=[];return e.forEach((function(e){t.push(m(e.open)),t.push(m(e.close))})),f(t)}));function d(e){var t=/^[\w]+$/.test(e);return e=i.escapeRegExpCharacters(e),t?"\\b"+e+"\\b":e}function f(e){var t="("+e.map(d).join(")|(")+")";return i.createRegExp(t,!0)}var p,g,m=(p=null,g=null,function(e){return p!==e&&(g=function(e){for(var t="",n=e.length-1;n>=0;n--)t+=e.charAt(n);return t}(p=e)),g}),v=function(){function e(){}return e._findPrevBracketInText=function(e,t,n,i){var r=n.match(e);if(!r)return null;var s=n.length-r.index,a=r[0].length,u=i+s;return new o.Q(t,u-a+1,t,u+1)},e.findPrevBracketInToken=function(e,t,n,i,o){var r=m(n).substring(n.length-o,n.length-i);return this._findPrevBracketInText(e,t,r,i)},e.findNextBracketInText=function(e,t,n,i){var r=n.match(e);if(!r)return null;var s=r.index,a=r[0].length;if(0===a)return null;var u=i+s;return new o.Q(t,u+1,t,u+1+a)},e.findNextBracketInToken=function(e,t,n,i,o){var r=n.substring(i,o);return this.findNextBracketInText(e,t,r,i)},e}()},3072:(e,t,n)=>{"use strict";n.d(t,{S:()=>i,v:()=>o});var i=(0,n(4264).u1)("modelService");function o(e){return!e.isTooLargeForSyncing()&&!e.isForSimpleWidget}},6625:(e,t,n)=>{"use strict";n.r(t),n.d(t,{CancellationTokenSource:()=>mE,Emitter:()=>vE,KeyCode:()=>yE,KeyMod:()=>bE,MarkerSeverity:()=>SE,MarkerTag:()=>LE,Position:()=>_E,Promise:()=>IE,Range:()=>wE,Selection:()=>ME,SelectionDirection:()=>CE,Token:()=>xE,Uri:()=>NE,editor:()=>DE,languages:()=>kE});var i,o=n(486),r=n(386),s=n(1456),a={ICodeEditor:"vs.editor.ICodeEditor",IDiffEditor:"vs.editor.IDiffEditor"},u={ExecuteCommand:"executeCommand",ExecuteCommands:"executeCommands",Type:"type",ReplacePreviousChar:"replacePreviousChar",CompositionStart:"compositionStart",CompositionEnd:"compositionEnd",Paste:"paste",Cut:"cut",Undo:"undo",Redo:"redo"},l=n(1315);!function(e){e[e.NotSet=0]="NotSet",e[e.ContentFlush=1]="ContentFlush",e[e.RecoverFromMarkers=2]="RecoverFromMarkers",e[e.Explicit=3]="Explicit",e[e.Paste=4]="Paste",e[e.Undo=5]="Undo",e[e.Redo=6]="Redo"}(i||(i={}));var c,h=function(e,t,n){this.lineNumber=e,this.column=t,this.leftoverVisibleColumns=n},d=function(){function e(){}return e.left=function(e,t,n,i){return i>t.getLineMinColumn(n)?l.A_.isLowSurrogate(t,n,i-2)?i-=2:i-=1:n>1&&(n-=1,i=t.getLineMaxColumn(n)),new h(n,i,0)},e.moveLeft=function(t,n,i,o,r){var s,a;if(i.hasSelection()&&!o)s=i.selection.startLineNumber,a=i.selection.startColumn;else{var u=e.left(t,n,i.position.lineNumber,i.position.column-(r-1));s=u.lineNumber,a=u.column}return i.move(o,s,a,0)},e.right=function(e,t,n,i){return iu?(n=u,s?i=t.getLineMaxColumn(n):(i=Math.min(t.getLineMaxColumn(n),i),l.A_.isInsideSurrogatePair(t,n,i)&&(i-=1))):(i=l.A_.columnFromVisibleColumn2(e,t,n,a),l.A_.isInsideSurrogatePair(t,n,i)&&(i-=1)),o=a-l.A_.visibleColumnFromColumn(t.getLineContent(n),i,e.tabSize),new h(n,i,o)},e.moveDown=function(t,n,i,o,r){var s,a;i.hasSelection()&&!o?(s=i.selection.endLineNumber,a=i.selection.endColumn):(s=i.position.lineNumber,a=i.position.column);var u=e.down(t,n,s,a,i.leftoverVisibleColumns,r,!0);return i.move(o,u.lineNumber,u.column,u.leftoverVisibleColumns)},e.translateDown=function(t,n,i){var o=i.selection,a=e.down(t,n,o.selectionStartLineNumber,o.selectionStartColumn,i.selectionStartLeftoverVisibleColumns,1,!1),u=e.down(t,n,o.positionLineNumber,o.positionColumn,i.leftoverVisibleColumns,1,!1);return new l.mG(new s.Q(a.lineNumber,a.column,a.lineNumber,a.column),a.leftoverVisibleColumns,new r.y(u.lineNumber,u.column),u.leftoverVisibleColumns)},e.up=function(e,t,n,i,o,r,s){var a=l.A_.visibleColumnFromColumn(t.getLineContent(n),i,e.tabSize)+o;return(n-=r)<1?(n=1,s?i=t.getLineMinColumn(n):(i=Math.min(t.getLineMaxColumn(n),i),l.A_.isInsideSurrogatePair(t,n,i)&&(i-=1))):(i=l.A_.columnFromVisibleColumn2(e,t,n,a),l.A_.isInsideSurrogatePair(t,n,i)&&(i-=1)),o=a-l.A_.visibleColumnFromColumn(t.getLineContent(n),i,e.tabSize),new h(n,i,o)},e.moveUp=function(t,n,i,o,r){var s,a;i.hasSelection()&&!o?(s=i.selection.startLineNumber,a=i.selection.startColumn):(s=i.position.lineNumber,a=i.position.column);var u=e.up(t,n,s,a,i.leftoverVisibleColumns,r,!0);return i.move(o,u.lineNumber,u.column,u.leftoverVisibleColumns)},e.translateUp=function(t,n,i){var o=i.selection,a=e.up(t,n,o.selectionStartLineNumber,o.selectionStartColumn,i.selectionStartLeftoverVisibleColumns,1,!1),u=e.up(t,n,o.positionLineNumber,o.positionColumn,i.leftoverVisibleColumns,1,!1);return new l.mG(new s.Q(a.lineNumber,a.column,a.lineNumber,a.column),a.leftoverVisibleColumns,new r.y(u.lineNumber,u.column),u.leftoverVisibleColumns)},e.moveToBeginningOfLine=function(e,t,n,i){var o,r=n.position.lineNumber,s=t.getLineMinColumn(r),a=t.getLineFirstNonWhitespaceColumn(r)||s;return o=n.position.column===a?s:a,n.move(i,r,o,0)},e.moveToEndOfLine=function(e,t,n,i){var o=n.position.lineNumber,r=t.getLineMaxColumn(o);return n.move(i,o,r,0)},e.moveToBeginningOfBuffer=function(e,t,n,i){return n.move(i,1,1,0)},e.moveToEndOfBuffer=function(e,t,n,i){var o=t.getLineCount(),r=t.getLineMaxColumn(o);return n.move(i,o,r,0)},e}(),f=n(2040),p=n(899),g=(c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}c(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),m=function(){function e(){}return e._createWord=function(e,t,n,i,o){return{start:i,end:o,wordType:t,nextCharClass:n}},e._findPreviousWordOnLine=function(e,t,n){var i=t.getLineContent(n.lineNumber);return this._doFindPreviousWordOnLine(i,e,n)},e._doFindPreviousWordOnLine=function(e,t,n){for(var i=0,o=n.column-2;o>=0;o--){var r=e.charCodeAt(o),s=t.get(r);if(0===s){if(2===i)return this._createWord(e,i,s,o+1,this._findEndOfWord(e,t,i,o+1));i=1}else if(2===s){if(1===i)return this._createWord(e,i,s,o+1,this._findEndOfWord(e,t,i,o+1));i=2}else if(1===s&&0!==i)return this._createWord(e,i,s,o+1,this._findEndOfWord(e,t,i,o+1))}return 0!==i?this._createWord(e,i,1,0,this._findEndOfWord(e,t,i,0)):null},e._findEndOfWord=function(e,t,n,i){for(var o=e.length,r=i;r=0;o--){var r=e.charCodeAt(o),s=t.get(r);if(1===s)return o+1;if(1===n&&2===s)return o+1;if(2===n&&0===s)return o+1}return 0},e.moveWordLeft=function(t,n,i,o){var s=i.lineNumber,a=i.column;1===a&&s>1&&(s-=1,a=n.getLineMaxColumn(s));var u=e._findPreviousWordOnLine(t,n,new r.y(s,a));return 0===o?(u&&2===u.wordType&&u.end-u.start==1&&0===u.nextCharClass&&(u=e._findPreviousWordOnLine(t,n,new r.y(s,u.start+1))),a=u?u.start+1:1):(u&&a<=u.end+1&&(u=e._findPreviousWordOnLine(t,n,new r.y(s,u.start+1))),a=u?u.end+1:1),new r.y(s,a)},e.moveWordRight=function(t,n,i,o){var s=i.lineNumber,a=i.column;a===n.getLineMaxColumn(s)&&s=u.start+1&&(u=e._findNextWordOnLine(t,n,new r.y(s,u.end+1))),a=u?u.start+1:n.getLineMaxColumn(s)),new r.y(s,a)},e._deleteWordLeftWhitespace=function(e,t){var n=e.getLineContent(t.lineNumber),i=t.column-2,o=p.lastNonWhitespaceIndex(n,i);return o+11?c=1:(l--,c=n.getLineMaxColumn(l)):(d&&c<=d.end+1&&(d=e._findPreviousWordOnLine(t,n,new r.y(l,d.start+1))),d?c=d.end+1:c>1?c=1:(l--,c=n.getLineMaxColumn(l))),new s.Q(l,c,u.lineNumber,u.column)},e._findFirstNonWhitespaceChar=function(e,t){for(var n=e.length,i=t;i=p.start+1&&(p=e._findNextWordOnLine(t,n,new r.y(l,p.end+1))),p?c=p.start+1:c=0;i--){var o=e.charCodeAt(i);if(32===o||9===o||!n&&p.isUpperAsciiLetter(o)||95===o)return i-1;if(n&&i1?new r.y(o-1,t.getLineMaxColumn(o-1)):n;var a=m.moveWordLeft(e,t,n,i),u=v(t.getLineContent(o),s-2),l=new r.y(o,u+2);return l.isBeforeOrEqual(a)?a:l},t.moveWordPartRight=function(e,t,n,i){var o=n.lineNumber,s=n.column;if(s===t.getLineMaxColumn(o))return oc&&(h=c,d=e.model.getLineMaxColumn(h)),l.MF.fromModelState(new l.mG(new s.Q(a.lineNumber,1,h,d),0,new r.y(h,d),0))}var f=t.modelState.selectionStart.getStartPosition().lineNumber;if(a.lineNumberf){c=e.viewModel.getLineCount();var p=u.lineNumber+1,g=1;return p>c&&(p=c,g=e.viewModel.getLineMaxColumn(p)),l.MF.fromViewState(t.viewState.move(t.modelState.hasSelection(),p,g,0))}var m=t.modelState.selectionStart.getEndPosition();return l.MF.fromModelState(t.modelState.move(t.modelState.hasSelection(),m.lineNumber,m.column,0))},e.word=function(e,t,n,i){var o=e.model.validatePosition(i);return l.MF.fromModelState(m.word(e.config,e.model,t.modelState,n,o))},e.cancelSelection=function(e,t){if(!t.modelState.hasSelection())return new l.MF(t.modelState,t.viewState);var n=t.viewState.position.lineNumber,i=t.viewState.position.column;return l.MF.fromViewState(new l.mG(new s.Q(n,i,n,i),0,new r.y(n,i),0))},e.moveTo=function(e,t,n,i,o){var s=e.model.validatePosition(i),a=o?e.validateViewPosition(new r.y(o.lineNumber,o.column),s):e.convertModelPositionToViewPosition(s);return l.MF.fromViewState(t.viewState.move(n,a.lineNumber,a.column,0))},e.move=function(e,t,n){var i=n.select,o=n.value;switch(n.direction){case 0:return 4===n.unit?this._moveHalfLineLeft(e,t,i):this._moveLeft(e,t,i,o);case 1:return 4===n.unit?this._moveHalfLineRight(e,t,i):this._moveRight(e,t,i,o);case 2:return 2===n.unit?this._moveUpByViewLines(e,t,i,o):this._moveUpByModelLines(e,t,i,o);case 3:return 2===n.unit?this._moveDownByViewLines(e,t,i,o):this._moveDownByModelLines(e,t,i,o);case 4:return this._moveToViewMinColumn(e,t,i);case 5:return this._moveToViewFirstNonWhitespaceColumn(e,t,i);case 6:return this._moveToViewCenterColumn(e,t,i);case 7:return this._moveToViewMaxColumn(e,t,i);case 8:return this._moveToViewLastNonWhitespaceColumn(e,t,i);case 9:var r=t[0],s=e.getCompletelyVisibleModelRange(),a=this._firstLineNumberInRange(e.model,s,o),u=e.model.getLineFirstNonWhitespaceColumn(a);return[this._moveToModelPosition(e,r,i,a,u)];case 11:return r=t[0],s=e.getCompletelyVisibleModelRange(),a=this._lastLineNumberInRange(e.model,s,o),u=e.model.getLineFirstNonWhitespaceColumn(a),[this._moveToModelPosition(e,r,i,a,u)];case 10:return r=t[0],s=e.getCompletelyVisibleModelRange(),a=Math.round((s.startLineNumber+s.endLineNumber)/2),u=e.model.getLineFirstNonWhitespaceColumn(a),[this._moveToModelPosition(e,r,i,a,u)];case 12:for(var l=e.getCompletelyVisibleViewRange(),c=[],h=0,d=t.length;hn.endLineNumber-1&&(o=n.endLineNumber-1),o>>0)>>>0}function R(e,t){if(0===e)return null;var n=(65535&e)>>>0,i=(4294901760&e)>>>16;return 0!==i?new W(P(n,t),P(i,t)):P(n,t)}function P(e,t){var n=!!(2048&e),i=!!(256&e);return new z(2===t?i:n,!!(1024&e),!!(512&e),2===t?n:i,255&e)}!function(){function e(e,t,n,i){void 0===n&&(n=t),void 0===i&&(i=n),E.define(e,t),A.define(e,n),j.define(e,i)}e(0,"unknown"),e(1,"Backspace"),e(2,"Tab"),e(3,"Enter"),e(4,"Shift"),e(5,"Ctrl"),e(6,"Alt"),e(7,"PauseBreak"),e(8,"CapsLock"),e(9,"Escape"),e(10,"Space"),e(11,"PageUp"),e(12,"PageDown"),e(13,"End"),e(14,"Home"),e(15,"LeftArrow","Left"),e(16,"UpArrow","Up"),e(17,"RightArrow","Right"),e(18,"DownArrow","Down"),e(19,"Insert"),e(20,"Delete"),e(21,"0"),e(22,"1"),e(23,"2"),e(24,"3"),e(25,"4"),e(26,"5"),e(27,"6"),e(28,"7"),e(29,"8"),e(30,"9"),e(31,"A"),e(32,"B"),e(33,"C"),e(34,"D"),e(35,"E"),e(36,"F"),e(37,"G"),e(38,"H"),e(39,"I"),e(40,"J"),e(41,"K"),e(42,"L"),e(43,"M"),e(44,"N"),e(45,"O"),e(46,"P"),e(47,"Q"),e(48,"R"),e(49,"S"),e(50,"T"),e(51,"U"),e(52,"V"),e(53,"W"),e(54,"X"),e(55,"Y"),e(56,"Z"),e(57,"Meta"),e(58,"ContextMenu"),e(59,"F1"),e(60,"F2"),e(61,"F3"),e(62,"F4"),e(63,"F5"),e(64,"F6"),e(65,"F7"),e(66,"F8"),e(67,"F9"),e(68,"F10"),e(69,"F11"),e(70,"F12"),e(71,"F13"),e(72,"F14"),e(73,"F15"),e(74,"F16"),e(75,"F17"),e(76,"F18"),e(77,"F19"),e(78,"NumLock"),e(79,"ScrollLock"),e(80,";",";","OEM_1"),e(81,"=","=","OEM_PLUS"),e(82,",",",","OEM_COMMA"),e(83,"-","-","OEM_MINUS"),e(84,".",".","OEM_PERIOD"),e(85,"/","/","OEM_2"),e(86,"`","`","OEM_3"),e(110,"ABNT_C1"),e(111,"ABNT_C2"),e(87,"[","[","OEM_4"),e(88,"\\","\\","OEM_5"),e(89,"]","]","OEM_6"),e(90,"'","'","OEM_7"),e(91,"OEM_8"),e(92,"OEM_102"),e(93,"NumPad0"),e(94,"NumPad1"),e(95,"NumPad2"),e(96,"NumPad3"),e(97,"NumPad4"),e(98,"NumPad5"),e(99,"NumPad6"),e(100,"NumPad7"),e(101,"NumPad8"),e(102,"NumPad9"),e(103,"NumPad_Multiply"),e(104,"NumPad_Add"),e(105,"NumPad_Separator"),e(106,"NumPad_Subtract"),e(107,"NumPad_Decimal"),e(108,"NumPad_Divide")}(),function(e){e.toString=function(e){return E.keyCodeToStr(e)},e.fromString=function(e){return E.strToKeyCode(e)},e.toUserSettingsUS=function(e){return A.keyCodeToStr(e)},e.toUserSettingsGeneral=function(e){return j.keyCodeToStr(e)},e.fromUserSettings=function(e){return A.strToKeyCode(e)||j.strToKeyCode(e)}}(C||(C={}));var z=function(){function e(e,t,n,i,o){this.type=1,this.ctrlKey=e,this.shiftKey=t,this.altKey=n,this.metaKey=i,this.keyCode=o}return e.prototype.equals=function(e){return 1===e.type&&this.ctrlKey===e.ctrlKey&&this.shiftKey===e.shiftKey&&this.altKey===e.altKey&&this.metaKey===e.metaKey&&this.keyCode===e.keyCode},e.prototype.isModifierKey=function(){return 0===this.keyCode||5===this.keyCode||57===this.keyCode||6===this.keyCode||4===this.keyCode},e.prototype.isDuplicateModifierCase=function(){return this.ctrlKey&&5===this.keyCode||this.shiftKey&&4===this.keyCode||this.altKey&&6===this.keyCode||this.metaKey&&57===this.keyCode},e}(),W=function(e,t){this.type=2,this.firstPart=e,this.chordPart=t},F=function(e,t,n,i,o,r){this.ctrlKey=e,this.shiftKey=t,this.altKey=n,this.metaKey=i,this.keyLabel=o,this.keyAriaLabel=r},B=n(94);function H(e,t){if(!e||null===e)throw new Error(t?"Assertion failed ("+t+")":"Assertion Failed")}var V=function(){function e(){this.data={}}return e.prototype.add=function(e,t){H(w.Kg(e)),H(w.Gv(t)),H(!this.data.hasOwnProperty(e),"There is already an extension with this id"),this.data[e]=t},e.prototype.as=function(e){return this.data[e]||null},e}(),U=new V,Y=function(){function e(){this._keybindings=[],this._keybindingsSorted=!0}return e.bindToCurrentPlatform=function(e){if(1===B.OS){if(e&&e.win)return e.win}else if(2===B.OS){if(e&&e.mac)return e.mac}else if(e&&e.linux)return e.linux;return e},e.prototype.registerKeybindingRule=function(t,n){void 0===n&&(n=0);var i=e.bindToCurrentPlatform(t);if(i&&i.primary&&this._registerDefaultKeybinding(R(i.primary,B.OS),t.id,t.weight,0,t.when,n),i&&Array.isArray(i.secondary))for(var o=0,r=i.secondary.length;o=21&&e<=30||e>=31&&e<=56||80===e||81===e||82===e||83===e||84===e||85===e||86===e||110===e||111===e||87===e||88===e||89===e||90===e||91===e||92===e},e.prototype._assertNoCtrlAlt=function(t,n){t.ctrlKey&&t.altKey&&!t.metaKey&&e._mightProduceChar(t.keyCode)&&console.warn("Ctrl+Alt+ keybindings should not be used by default under Windows. Offender: ",t," for ",n)},e.prototype._registerDefaultKeybinding=function(e,t,n,i,o,r){0===r&&1===B.OS&&(2===e.type?this._assertNoCtrlAlt(e.firstPart,t):this._assertNoCtrlAlt(e,t)),this._keybindings.push({keybinding:e,command:t,commandArgs:void 0,when:o,weight1:n,weight2:i}),this._keybindingsSorted=!1},e.prototype.getDefaultKeybindings=function(){return this._keybindingsSorted||(this._keybindings.sort(G),this._keybindingsSorted=!0),this._keybindings.slice(0)},e}(),Z=new Y;function G(e,t){return e.weight1!==t.weight1?e.weight1-t.weight1:e.commandt.command?1:e.weight2-t.weight2}U.add("platform.keybindingsRegistry",Z);var Q,q=(0,N.u1)("telemetryService"),K=n(3072),J=n(2337),X=n(2213),$=function(){function e(e,t,n,i,o){void 0===t&&(t=""),void 0===n&&(n=""),void 0===i&&(i=!0),this._onDidChange=new X.vl,this._id=e,this._label=t,this._cssClass=n,this._enabled=i,this._actionCallback=o}return e.prototype.dispose=function(){this._onDidChange.dispose()},Object.defineProperty(e.prototype,"onDidChange",{get:function(){return this._onDidChange.event},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"id",{get:function(){return this._id},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"label",{get:function(){return this._label},set:function(e){this._setLabel(e)},enumerable:!0,configurable:!0}),e.prototype._setLabel=function(e){this._label!==e&&(this._label=e,this._onDidChange.fire({label:e}))},Object.defineProperty(e.prototype,"tooltip",{get:function(){return this._tooltip},set:function(e){this._setTooltip(e)},enumerable:!0,configurable:!0}),e.prototype._setTooltip=function(e){this._tooltip!==e&&(this._tooltip=e,this._onDidChange.fire({tooltip:e}))},Object.defineProperty(e.prototype,"class",{get:function(){return this._cssClass},set:function(e){this._setClass(e)},enumerable:!0,configurable:!0}),e.prototype._setClass=function(e){this._cssClass!==e&&(this._cssClass=e,this._onDidChange.fire({class:e}))},Object.defineProperty(e.prototype,"enabled",{get:function(){return this._enabled},set:function(e){this._setEnabled(e)},enumerable:!0,configurable:!0}),e.prototype._setEnabled=function(e){this._enabled!==e&&(this._enabled=e,this._onDidChange.fire({enabled:e}))},Object.defineProperty(e.prototype,"checked",{get:function(){return this._checked},set:function(e){this._setChecked(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"radio",{get:function(){return this._radio},set:function(e){this._setRadio(e)},enumerable:!0,configurable:!0}),e.prototype._setChecked=function(e){this._checked!==e&&(this._checked=e,this._onDidChange.fire({checked:e}))},e.prototype._setRadio=function(e){this._radio!==e&&(this._radio=e,this._onDidChange.fire({radio:e}))},Object.defineProperty(e.prototype,"order",{get:function(){return this._order},set:function(e){this._order=e},enumerable:!0,configurable:!0}),e.prototype.run=function(e,t){return void 0!==this._actionCallback?this._actionCallback(e):J.g3.as(!0)},e}(),ee=function(){function e(){this._onDidBeforeRun=new X.vl,this._onDidRun=new X.vl}return Object.defineProperty(e.prototype,"onDidRun",{get:function(){return this._onDidRun.event},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onDidBeforeRun",{get:function(){return this._onDidBeforeRun.event},enumerable:!0,configurable:!0}),e.prototype.run=function(e,t){var n=this;return e.enabled?(this._onDidBeforeRun.fire({action:e}),this.runAction(e,t).then((function(t){n._onDidRun.fire({action:e,result:t})}),(function(t){n._onDidRun.fire({action:e,error:t})}))):J.g3.as(null)},e.prototype.runAction=function(e,t){var n=t?e.run(t):e.run();return J.g3.is(n)?n:J.g3.wrap(n)},e.prototype.dispose=function(){this._onDidBeforeRun.dispose(),this._onDidRun.dispose()},e}(),te=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();!function(e){e[e.Defined=1]="Defined",e[e.Not=2]="Not",e[e.Equals=3]="Equals",e[e.NotEquals=4]="NotEquals",e[e.And=5]="And",e[e.Regex=6]="Regex"}(Q||(Q={}));var ne=function(){function e(){}return e.has=function(e){return new oe(e)},e.equals=function(e,t){return new re(e,t)},e.regex=function(e,t){return new ue(e,t)},e.not=function(e){return new ae(e)},e.and=function(){for(var e=[],t=0;t=0){var t=e.split("!=");return new se(t[0].trim(),this._deserializeValue(t[1]))}return e.indexOf("==")>=0?(t=e.split("=="),new re(t[0].trim(),this._deserializeValue(t[1]))):e.indexOf("=~")>=0?(t=e.split("=~"),new ue(t[0].trim(),this._deserializeRegexValue(t[1]))):/^\!\s*/.test(e)?new ae(e.substr(1).trim()):new oe(e)},e._deserializeValue=function(e){if("true"===(e=e.trim()))return!0;if("false"===e)return!1;var t=/^'([^']*)'$/.exec(e);return t?t[1].trim():e},e._deserializeRegexValue=function(e){if((0,p.isFalsyOrWhitespace)(e))return console.warn("missing regexp-value for =~-expression"),null;var t=e.indexOf("/"),n=e.lastIndexOf("/");if(t===n||t<0)return console.warn("bad regexp-value '"+e+"', missing /-enclosure"),null;var i=e.slice(t+1,n),o="i"===e[n+1]?"i":"";try{return new RegExp(i,o)}catch(t){return console.warn("bad regexp-value '"+e+"', parse error: "+t),null}},e}();function ie(e,t){var n=e.getType(),i=t.getType();if(n!==i)return n-i;switch(n){case Q.Defined:case Q.Not:case Q.Equals:case Q.NotEquals:case Q.Regex:return e.cmp(t);default:throw new Error("Unknown ContextKeyExpr!")}}var oe=function(){function e(e){this.key=e}return e.prototype.getType=function(){return Q.Defined},e.prototype.cmp=function(e){return this.keye.key?1:0},e.prototype.equals=function(t){return t instanceof e&&this.key===t.key},e.prototype.evaluate=function(e){return!!e.getValue(this.key)},e.prototype.normalize=function(){return this},e.prototype.keys=function(){return[this.key]},e}(),re=function(){function e(e,t){this.key=e,this.value=t}return e.prototype.getType=function(){return Q.Equals},e.prototype.cmp=function(e){return this.keye.key?1:this.valuee.value?1:0},e.prototype.equals=function(t){return t instanceof e&&this.key===t.key&&this.value===t.value},e.prototype.evaluate=function(e){return e.getValue(this.key)==this.value},e.prototype.normalize=function(){return"boolean"==typeof this.value?this.value?new oe(this.key):new ae(this.key):this},e.prototype.keys=function(){return[this.key]},e}(),se=function(){function e(e,t){this.key=e,this.value=t}return e.prototype.getType=function(){return Q.NotEquals},e.prototype.cmp=function(e){return this.keye.key?1:this.valuee.value?1:0},e.prototype.equals=function(t){return t instanceof e&&this.key===t.key&&this.value===t.value},e.prototype.evaluate=function(e){return e.getValue(this.key)!=this.value},e.prototype.normalize=function(){return"boolean"==typeof this.value?this.value?new ae(this.key):new oe(this.key):this},e.prototype.keys=function(){return[this.key]},e}(),ae=function(){function e(e){this.key=e}return e.prototype.getType=function(){return Q.Not},e.prototype.cmp=function(e){return this.keye.key?1:0},e.prototype.equals=function(t){return t instanceof e&&this.key===t.key},e.prototype.evaluate=function(e){return!e.getValue(this.key)},e.prototype.normalize=function(){return this},e.prototype.keys=function(){return[this.key]},e}(),ue=function(){function e(e,t){this.key=e,this.regexp=t}return e.prototype.getType=function(){return Q.Regex},e.prototype.cmp=function(e){if(this.keye.key)return 1;var t=this.regexp?this.regexp.source:void 0;return te.regexp.source?1:0},e.prototype.equals=function(t){if(t instanceof e){var n=this.regexp?this.regexp.source:void 0;return this.key===t.key&&n===t.regexp.source}return!1},e.prototype.evaluate=function(e){return!!this.regexp&&this.regexp.test(e.getValue(this.key))},e.prototype.normalize=function(){return this},e.prototype.keys=function(){return[this.key]},e}(),le=function(){function e(t){this.expr=e._normalizeArr(t)}return e.prototype.getType=function(){return Q.And},e.prototype.equals=function(t){if(t instanceof e){if(this.expr.length!==t.expr.length)return!1;for(var n=0,i=this.expr.length;n=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},pe=function(e,t){return function(n,i){t(n,i,e)}};function ge(e){return void 0!==e.command}var me,ve=function(){function e(){this.id=String(e.ID++)}return e.ID=1,e.EditorContext=new e,e.CommandPalette=new e,e.MenubarEditMenu=new e,e.MenubarSelectionMenu=new e,e}(),ye=(0,N.u1)("menuService"),be=new(function(){function e(){this._commands=Object.create(null),this._menuItems=Object.create(null)}return e.prototype.addCommand=function(e){var t=this._commands[e.id];return this._commands[e.id]=e,void 0!==t},e.prototype.getCommand=function(e){return this._commands[e]},e.prototype.appendMenuItem=function(e,t){var n=e.id,i=this._menuItems[n];return i?i.push(t):this._menuItems[n]=i=[t],{dispose:function(){var e=i.indexOf(t);e>=0&&i.splice(e,1)}}},e.prototype.getMenuItems=function(e){var t=e.id,n=this._menuItems[t]||[];return t===ve.CommandPalette.id&&this._appendImplicitItems(n),n},e.prototype._appendImplicitItems=function(e){for(var t=new Set,n=0,i=e.filter((function(e){return ge(e)}));no,h=i>a,d=ia)continue;if(bi)continue;if(y1&&o--,this.columnSelect(e,t,n.selection,i,o)},e.columnSelectRight=function(e,t,n,i,o){for(var s=0,a=Math.min(n.position.lineNumber,i),u=Math.max(n.position.lineNumber,i),c=a;c<=u;c++){var h=t.getLineMaxColumn(c),d=l.A_.visibleColumnFromColumn2(e,t,new r.y(c,h));s=Math.max(s,d)}return ot.getLineCount()&&(o=t.getLineCount()),this.columnSelect(e,t,n.selection,o,r)},e}();!function(e){e.editorTextFocus=new ce("editorTextFocus",!1),e.focus=new ce("editorFocus",!1),e.textInputFocus=new ce("textInputFocus",!1),e.readOnly=new ce("editorReadonly",!1),e.writable=e.readOnly.toNegated(),e.hasNonEmptySelection=new ce("editorHasSelection",!1),e.hasOnlyEmptySelection=e.hasNonEmptySelection.toNegated(),e.hasMultipleSelections=new ce("editorHasMultipleSelections",!1),e.hasSingleSelection=e.hasMultipleSelections.toNegated(),e.tabMovesFocus=new ce("editorTabMovesFocus",!1),e.tabDoesNotMoveFocus=e.tabMovesFocus.toNegated(),e.isInEmbeddedEditor=new ce("isInEmbeddedEditor",void 0),e.canUndo=new ce("canUndo",!1),e.canRedo=new ce("canRedo",!1),e.languageId=new ce("editorLangId",void 0),e.hasCompletionItemProvider=new ce("editorHasCompletionItemProvider",void 0),e.hasCodeActionsProvider=new ce("editorHasCodeActionsProvider",void 0),e.hasCodeLensProvider=new ce("editorHasCodeLensProvider",void 0),e.hasDefinitionProvider=new ce("editorHasDefinitionProvider",void 0),e.hasImplementationProvider=new ce("editorHasImplementationProvider",void 0),e.hasTypeDefinitionProvider=new ce("editorHasTypeDefinitionProvider",void 0),e.hasHoverProvider=new ce("editorHasHoverProvider",void 0),e.hasDocumentHighlightProvider=new ce("editorHasDocumentHighlightProvider",void 0),e.hasDocumentSymbolProvider=new ce("editorHasDocumentSymbolProvider",void 0),e.hasReferenceProvider=new ce("editorHasReferenceProvider",void 0),e.hasRenameProvider=new ce("editorHasRenameProvider",void 0),e.hasDocumentFormattingProvider=new ce("editorHasDocumentFormattingProvider",void 0),e.hasDocumentSelectionFormattingProvider=new ce("editorHasDocumentSelectionFormattingProvider",void 0),e.hasSignatureHelpProvider=new ce("editorHasSignatureHelpProvider",void 0)}(Oe||(Oe={}));var Pe,ze,We,Fe,Be=n(799),He=function(){function e(e,t,n){void 0===n&&(n=!1),this._range=e,this._text=t,this.insertsAutoWhitespace=n}return e.prototype.getEditOperations=function(e,t){t.addTrackedEditOperation(this._range,this._text)},e.prototype.computeCursorState=function(e,t){var n=t.getInverseEditOperations()[0].range;return new Be.L(n.endLineNumber,n.endColumn,n.endLineNumber,n.endColumn)},e}(),Ve=function(){function e(e,t,n){void 0===n&&(n=!1),this._range=e,this._text=t,this.insertsAutoWhitespace=n}return e.prototype.getEditOperations=function(e,t){t.addTrackedEditOperation(this._range,this._text)},e.prototype.computeCursorState=function(e,t){var n=t.getInverseEditOperations()[0].range;return new Be.L(n.startLineNumber,n.startColumn,n.startLineNumber,n.startColumn)},e}(),Ue=function(){function e(e,t,n,i,o){void 0===o&&(o=!1),this._range=e,this._text=t,this._columnDeltaOffset=i,this._lineNumberDeltaOffset=n,this.insertsAutoWhitespace=o}return e.prototype.getEditOperations=function(e,t){t.addTrackedEditOperation(this._range,this._text)},e.prototype.computeCursorState=function(e,t){var n=t.getInverseEditOperations()[0].range;return new Be.L(n.endLineNumber+this._lineNumberDeltaOffset,n.endColumn+this._columnDeltaOffset,n.endLineNumber+this._lineNumberDeltaOffset,n.endColumn+this._columnDeltaOffset)},e}(),Ye=function(){function e(e,t,n){this._range=e,this._text=t,this._initialSelection=n}return e.prototype.getEditOperations=function(e,t){t.addEditOperation(this._range,this._text),this._selectionId=t.trackSelection(this._initialSelection)},e.prototype.computeCursorState=function(e,t){return t.getTrackedSelection(this._selectionId)},e}(),Ze=n(99),Ge=n(7623),Qe=n(5074),qe=function(){function e(e,t,n){this._range=e,this._charBeforeSelection=t,this._charAfterSelection=n}return e.prototype.getEditOperations=function(e,t){t.addTrackedEditOperation(new s.Q(this._range.startLineNumber,this._range.startColumn,this._range.startLineNumber,this._range.startColumn),this._charBeforeSelection),t.addTrackedEditOperation(new s.Q(this._range.endLineNumber,this._range.endColumn,this._range.endLineNumber,this._range.endColumn),this._charAfterSelection)},e.prototype.computeCursorState=function(e,t){var n=t.getInverseEditOperations(),i=n[0].range,o=n[1].range;return new Be.L(i.endLineNumber,i.endColumn,o.endLineNumber,o.endColumn-this._charAfterSelection.length)},e}(),Ke=function(){function e(){}return e.indent=function(e,t,n){for(var i=[],o=0,r=n.length;o1){var u=i-1;for(u=i-1;u>=1;u--){var l=n.getLineContent(u);if(p.lastNonWhitespaceIndex(l)>=0)break}if(u<1)return null;var c=n.getLineMaxColumn(u),h=Ge.cx.getEnterAction(n,new s.Q(u,c,u,c));h&&(r=h.indentation,(o=h.enterAction)&&(r+=o.appendText))}return o&&(o===Qe.l.Indent&&(r=e.shiftIndent(t,r)),o===Qe.l.Outdent&&(r=e.unshiftIndent(t,r)),r=t.normalizeIndentation(r)),r||null},e._replaceJumpToNextIndent=function(e,t,n,i){var o="",r=n.getStartPosition();if(e.insertSpaces)for(var s=l.A_.visibleColumnFromColumn2(e,t,r),a=e.tabSize,u=a-s%a,c=0;c=0?o.setEndPosition(o.endLineNumber,Math.max(o.endColumn,I+1)):o.setEndPosition(o.endLineNumber,n.getLineMaxColumn(o.endLineNumber)),i)return new Ve(o,S+t.normalizeIndentation(b.afterEnter),!0);var N=0;return C<=I+1&&(t.insertSpaces||(M=Math.ceil(M/t.tabSize)),N=Math.min(M+1-t.normalizeIndentation(b.afterEnter).length-1,0)),new Ue(o,S+t.normalizeIndentation(b.afterEnter),0,N,!0)}return e._typeCommand(o,"\n"+t.normalizeIndentation(w),i)},e._isAutoIndentType=function(e,t,n){if(!e.autoIndent)return!1;for(var i=0,o=n.length;i1){var c=(0,f.i)(t.wordSeparators),h=l.charCodeAt(u.column-2);if(0===c.get(h))return!1}var d=l.charAt(u.column-1);if(d&&!e._isBeforeClosingBrace(t,o,d)&&!/\s/.test(d))return!1;if(!n.isCheapToTokenize(u.lineNumber))return!1;n.forceTokenization(u.lineNumber);var p=n.getLineTokens(u.lineNumber),g=!1;try{g=Ge.cx.shouldAutoClosePair(o,p,u.column)}catch(e){(0,S.dz)(e)}if(!g)return!1}return!0},e._runAutoClosingOpenCharType=function(e,t,n,i,o){for(var r=[],s=0,a=i.length;s2){var d=(0,f.i)(n.wordSeparators),p=u.charCodeAt(a.column-3);if(0===d.get(p))continue}var g=u.charAt(a.column-1);if(g&&!e._isBeforeClosingBrace(n,c,g)&&!/\s/.test(g))continue;if(!i.isCheapToTokenize(a.lineNumber))continue;i.forceTokenization(a.lineNumber);var m=i.getLineTokens(a.lineNumber),v=!1;try{v=Ge.cx.shouldAutoClosePair(c,m,a.column-1)}catch(e){(0,S.dz)(e)}if(v){var y=n.autoClosingPairsOpen[c];r[s]=new Ue(o[s],y,0,-y.length)}}}return new l.vY(1,r,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})},e.typeWithInterceptors=function(t,n,i,o,r){if("\n"===r){for(var s=[],a=0,u=o.length;a1){var g=n.getLineContent(f.lineNumber),m=p.firstNonWhitespaceIndex(g),v=-1===m?g.length+1:m+1;if(f.column<=v){var y=l.A_.visibleColumnFromColumn2(t,n,f),b=l.A_.prevTabStop(y,t.tabSize),_=l.A_.columnFromVisibleColumn2(t,n,f.lineNumber,b);h=new s.Q(f.lineNumber,_,f.lineNumber,f.column)}else h=new s.Q(f.lineNumber,f.column-1,f.lineNumber,f.column)}else{var w=d.left(t,n,f.lineNumber,f.column);h=new s.Q(w.lineNumber,w.column,f.lineNumber,f.column)}}h.isEmpty()?o[a]=null:(h.startLineNumber!==h.endLineNumber&&(r=!0),o[a]=new He(h,""))}return[r,o]},e.cut=function(e,t,n){for(var i=[],o=0,r=n.length;o1?(c=u.lineNumber-1,h=t.getLineMaxColumn(u.lineNumber-1),d=u.lineNumber,f=t.getLineMaxColumn(u.lineNumber)):(c=u.lineNumber,h=1,d=u.lineNumber,f=t.getLineMaxColumn(u.lineNumber));var p=new s.Q(c,h,d,f);p.isEmpty()?i[o]=null:i[o]=new He(p,"")}else i[o]=null;else i[o]=new He(a,"")}return new l.vY(0,i,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})},e}(),Xe=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),$e=u,et=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Xe(t,e),t.prototype.runEditorCommand=function(e,t,n){var i=t._getCursors();i&&this.runCoreEditorCommand(i,n||{})},t}(Ne);function tt(e){return e.get(Ce).getFocusedCodeEditor()}function nt(e){e.register()}!function(e){e.description={description:"Scroll editor in the given direction",args:[{name:"Editor scroll argument object",description:"Property-value pairs that can be passed through this argument:\n\t\t\t\t\t* 'to': A mandatory direction value.\n\t\t\t\t\t\t```\n\t\t\t\t\t\t'up', 'down'\n\t\t\t\t\t\t```\n\t\t\t\t\t* 'by': Unit to move. Default is computed based on 'to' value.\n\t\t\t\t\t\t```\n\t\t\t\t\t\t'line', 'wrappedLine', 'page', 'halfPage'\n\t\t\t\t\t\t```\n\t\t\t\t\t* 'value': Number of units to move. Default is '1'.\n\t\t\t\t\t* 'revealCursor': If 'true' reveals the cursor if it is outside view port.\n\t\t\t\t",constraint:function(e){if(!w.Gv(e))return!1;var t=e;return!(!w.Kg(t.to)||!w.b0(t.by)&&!w.Kg(t.by)||!w.b0(t.value)&&!w.Et(t.value)||!w.b0(t.revealCursor)&&!w.Lm(t.revealCursor))}}]},e.RawDirection={Up:"up",Down:"down"},e.RawUnit={Line:"line",WrappedLine:"wrappedLine",Page:"page",HalfPage:"halfPage"},e.parse=function(t){var n,i;switch(t.to){case e.RawDirection.Up:n=1;break;case e.RawDirection.Down:n=2;break;default:return null}switch(t.by){case e.RawUnit.Line:i=1;break;case e.RawUnit.WrappedLine:i=2;break;case e.RawUnit.Page:i=3;break;case e.RawUnit.HalfPage:i=4;break;default:i=2}return{direction:n,unit:i,value:Math.floor(t.value||1),revealCursor:!!t.revealCursor,select:!!t.select}}}(Pe||(Pe={})),function(e){e.description={description:"Reveal the given line at the given logical position",args:[{name:"Reveal line argument object",description:"Property-value pairs that can be passed through this argument:\n\t\t\t\t\t* 'lineNumber': A mandatory line number value.\n\t\t\t\t\t* 'at': Logical position at which line has to be revealed .\n\t\t\t\t\t\t```\n\t\t\t\t\t\t'top', 'center', 'bottom'\n\t\t\t\t\t\t```\n\t\t\t\t",constraint:function(e){if(!w.Gv(e))return!1;var t=e;return!(!w.Et(t.lineNumber)||!w.b0(t.at)&&!w.Kg(t.at))}}]},e.RawAtArgument={Top:"top",Center:"center",Bottom:"bottom"}}(ze||(ze={})),function(e){var t=function(e){function t(t){var n=e.call(this,t)||this;return n._inSelectionMode=t.inSelectionMode,n}return Xe(t,e),t.prototype.runCoreEditorCommand=function(e,t){e.context.model.pushStackElement(),e.setStates(t.source,i.Explicit,[M.moveTo(e.context,e.getPrimaryCursor(),this._inSelectionMode,t.position,t.viewPosition)]),e.reveal(!0,0,0)},t}(et);e.MoveTo=Te(new t({id:"_moveTo",inSelectionMode:!1,precondition:null})),e.MoveToSelect=Te(new t({id:"_moveToSelect",inSelectionMode:!0,precondition:null}));var n=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Xe(t,e),t.prototype.runCoreEditorCommand=function(e,t){e.context.model.pushStackElement();var n=this._getColumnSelectResult(e.context,e.getPrimaryCursor(),e.getColumnSelectData(),t);e.setStates(t.source,i.Explicit,n.viewStates.map((function(e){return l.MF.fromViewState(e)}))),e.setColumnSelectData({toViewLineNumber:n.toLineNumber,toViewVisualColumn:n.toVisualColumn}),e.reveal(!0,n.reversed?1:2,0)},t}(et);e.ColumnSelect=Te(new(function(e){function t(){return e.call(this,{id:"columnSelect",precondition:null})||this}return Xe(t,e),t.prototype._getColumnSelectResult=function(e,t,n,i){var o,s=e.model.validatePosition(i.position);return o=i.viewPosition?e.validateViewPosition(new r.y(i.viewPosition.lineNumber,i.viewPosition.column),s):e.convertModelPositionToViewPosition(s),Re.columnSelect(e.config,e.viewModel,t.viewState.selection,o.lineNumber,i.mouseColumn-1)},t}(n))),e.CursorColumnSelectLeft=Te(new(function(e){function t(){return e.call(this,{id:"cursorColumnSelectLeft",precondition:null,kbOpts:{weight:0,kbExpr:Oe.textInputFocus,primary:3599,linux:{primary:0}}})||this}return Xe(t,e),t.prototype._getColumnSelectResult=function(e,t,n,i){return Re.columnSelectLeft(e.config,e.viewModel,t.viewState,n.toViewLineNumber,n.toViewVisualColumn)},t}(n))),e.CursorColumnSelectRight=Te(new(function(e){function t(){return e.call(this,{id:"cursorColumnSelectRight",precondition:null,kbOpts:{weight:0,kbExpr:Oe.textInputFocus,primary:3601,linux:{primary:0}}})||this}return Xe(t,e),t.prototype._getColumnSelectResult=function(e,t,n,i){return Re.columnSelectRight(e.config,e.viewModel,t.viewState,n.toViewLineNumber,n.toViewVisualColumn)},t}(n)));var o=function(e){function t(t){var n=e.call(this,t)||this;return n._isPaged=t.isPaged,n}return Xe(t,e),t.prototype._getColumnSelectResult=function(e,t,n,i){return Re.columnSelectUp(e.config,e.viewModel,t.viewState,this._isPaged,n.toViewLineNumber,n.toViewVisualColumn)},t}(n);e.CursorColumnSelectUp=Te(new o({isPaged:!1,id:"cursorColumnSelectUp",precondition:null,kbOpts:{weight:0,kbExpr:Oe.textInputFocus,primary:3600,linux:{primary:0}}})),e.CursorColumnSelectPageUp=Te(new o({isPaged:!0,id:"cursorColumnSelectPageUp",precondition:null,kbOpts:{weight:0,kbExpr:Oe.textInputFocus,primary:3595,linux:{primary:0}}}));var a=function(e){function t(t){var n=e.call(this,t)||this;return n._isPaged=t.isPaged,n}return Xe(t,e),t.prototype._getColumnSelectResult=function(e,t,n,i){return Re.columnSelectDown(e.config,e.viewModel,t.viewState,this._isPaged,n.toViewLineNumber,n.toViewVisualColumn)},t}(n);e.CursorColumnSelectDown=Te(new a({isPaged:!1,id:"cursorColumnSelectDown",precondition:null,kbOpts:{weight:0,kbExpr:Oe.textInputFocus,primary:3602,linux:{primary:0}}})),e.CursorColumnSelectPageDown=Te(new a({isPaged:!0,id:"cursorColumnSelectPageDown",precondition:null,kbOpts:{weight:0,kbExpr:Oe.textInputFocus,primary:3596,linux:{primary:0}}}));var u=function(e){function t(){return e.call(this,{id:"cursorMove",precondition:null,description:b.description})||this}return Xe(t,e),t.prototype.runCoreEditorCommand=function(e,t){var n=b.parse(t);n&&this._runCursorMove(e,t.source,n)},t.prototype._runCursorMove=function(e,t,n){e.context.model.pushStackElement(),e.setStates(t,i.Explicit,M.move(e.context,e.getAll(),n)),e.reveal(!0,0,0)},t}(et);e.CursorMoveImpl=u,e.CursorMove=Te(new u);var c=function(t){function n(e){var n=t.call(this,e)||this;return n._staticArgs=e.args,n}return Xe(n,t),n.prototype.runCoreEditorCommand=function(t,n){var i=this._staticArgs;-1===this._staticArgs.value&&(i={direction:this._staticArgs.direction,unit:this._staticArgs.unit,select:this._staticArgs.select,value:t.context.config.pageSize}),e.CursorMove._runCursorMove(t,n.source,i)},n}(et);e.CursorLeft=Te(new c({args:{direction:0,unit:0,select:!1,value:1},id:"cursorLeft",precondition:null,kbOpts:{weight:0,kbExpr:Oe.textInputFocus,primary:15,mac:{primary:15,secondary:[288]}}})),e.CursorLeftSelect=Te(new c({args:{direction:0,unit:0,select:!0,value:1},id:"cursorLeftSelect",precondition:null,kbOpts:{weight:0,kbExpr:Oe.textInputFocus,primary:1039}})),e.CursorRight=Te(new c({args:{direction:1,unit:0,select:!1,value:1},id:"cursorRight",precondition:null,kbOpts:{weight:0,kbExpr:Oe.textInputFocus,primary:17,mac:{primary:17,secondary:[292]}}})),e.CursorRightSelect=Te(new c({args:{direction:1,unit:0,select:!0,value:1},id:"cursorRightSelect",precondition:null,kbOpts:{weight:0,kbExpr:Oe.textInputFocus,primary:1041}})),e.CursorUp=Te(new c({args:{direction:2,unit:2,select:!1,value:1},id:"cursorUp",precondition:null,kbOpts:{weight:0,kbExpr:Oe.textInputFocus,primary:16,mac:{primary:16,secondary:[302]}}})),e.CursorUpSelect=Te(new c({args:{direction:2,unit:2,select:!0,value:1},id:"cursorUpSelect",precondition:null,kbOpts:{weight:0,kbExpr:Oe.textInputFocus,primary:1040,secondary:[3088],mac:{primary:1040},linux:{primary:1040}}})),e.CursorPageUp=Te(new c({args:{direction:2,unit:2,select:!1,value:-1},id:"cursorPageUp",precondition:null,kbOpts:{weight:0,kbExpr:Oe.textInputFocus,primary:11}})),e.CursorPageUpSelect=Te(new c({args:{direction:2,unit:2,select:!0,value:-1},id:"cursorPageUpSelect",precondition:null,kbOpts:{weight:0,kbExpr:Oe.textInputFocus,primary:1035}})),e.CursorDown=Te(new c({args:{direction:3,unit:2,select:!1,value:1},id:"cursorDown",precondition:null,kbOpts:{weight:0,kbExpr:Oe.textInputFocus,primary:18,mac:{primary:18,secondary:[300]}}})),e.CursorDownSelect=Te(new c({args:{direction:3,unit:2,select:!0,value:1},id:"cursorDownSelect",precondition:null,kbOpts:{weight:0,kbExpr:Oe.textInputFocus,primary:1042,secondary:[3090],mac:{primary:1042},linux:{primary:1042}}})),e.CursorPageDown=Te(new c({args:{direction:3,unit:2,select:!1,value:-1},id:"cursorPageDown",precondition:null,kbOpts:{weight:0,kbExpr:Oe.textInputFocus,primary:12}})),e.CursorPageDownSelect=Te(new c({args:{direction:3,unit:2,select:!0,value:-1},id:"cursorPageDownSelect",precondition:null,kbOpts:{weight:0,kbExpr:Oe.textInputFocus,primary:1036}})),e.CreateCursor=Te(new(function(e){function t(){return e.call(this,{id:"createCursor",precondition:null})||this}return Xe(t,e),t.prototype.runCoreEditorCommand=function(e,t){var n,o=e.context;n=t.wholeLine?M.line(o,e.getPrimaryCursor(),!1,t.position,t.viewPosition):M.moveTo(o,e.getPrimaryCursor(),!1,t.position,t.viewPosition);var r=e.getAll();if(r.length>1)for(var s=n.modelState?n.modelState.position:null,a=n.viewState?n.viewState.position:null,u=0,l=r.length;uo&&(i=o);var r=new s.Q(i,1,i,e.context.model.getLineMaxColumn(i)),a=0;if(n.at)switch(n.at){case ze.RawAtArgument.Top:a=3;break;case ze.RawAtArgument.Center:a=1;break;case ze.RawAtArgument.Bottom:a=4}var u=e.context.convertModelRangeToViewRange(r);e.revealRange(!1,u,a,0)},t}(et))),e.SelectAll=Te(new(function(e){function t(){return e.call(this,{id:"selectAll",precondition:null})||this}return Xe(t,e),t.prototype.runCoreEditorCommand=function(e,t){e.context.model.pushStackElement(),e.setStates(t.source,i.Explicit,[M.selectAll(e.context,e.getPrimaryCursor())])},t}(et))),e.SetSelection=Te(new(function(e){function t(){return e.call(this,{id:"setSelection",precondition:null})||this}return Xe(t,e),t.prototype.runCoreEditorCommand=function(e,t){e.context.model.pushStackElement(),e.setStates(t.source,i.Explicit,[l.MF.fromModelSelection(t.selection)])},t}(et)))}(We||(We={})),function(e){e.LineBreakInsert=Te(new(function(e){function t(){return e.call(this,{id:"lineBreakInsert",precondition:Oe.writable,kbOpts:{weight:0,kbExpr:Oe.textInputFocus,primary:null,mac:{primary:301}}})||this}return Xe(t,e),t.prototype.runEditorCommand=function(e,t,n){t.pushUndoStop(),t.executeCommands(this.id,Ke.lineBreakInsert(t._getCursorConfiguration(),t.getModel(),t.getSelections()))},t}(Ne))),e.Outdent=Te(new(function(e){function t(){return e.call(this,{id:"outdent",precondition:Oe.writable,kbOpts:{weight:0,kbExpr:ne.and(Oe.editorTextFocus,Oe.tabDoesNotMoveFocus),primary:1026}})||this}return Xe(t,e),t.prototype.runEditorCommand=function(e,t,n){t.pushUndoStop(),t.executeCommands(this.id,Ke.outdent(t._getCursorConfiguration(),t.getModel(),t.getSelections())),t.pushUndoStop()},t}(Ne))),e.Tab=Te(new(function(e){function t(){return e.call(this,{id:"tab",precondition:Oe.writable,kbOpts:{weight:0,kbExpr:ne.and(Oe.editorTextFocus,Oe.tabDoesNotMoveFocus),primary:2}})||this}return Xe(t,e),t.prototype.runEditorCommand=function(e,t,n){t.pushUndoStop(),t.executeCommands(this.id,Ke.tab(t._getCursorConfiguration(),t.getModel(),t.getSelections())),t.pushUndoStop()},t}(Ne))),e.DeleteLeft=Te(new(function(e){function t(){return e.call(this,{id:"deleteLeft",precondition:Oe.writable,kbOpts:{weight:0,kbExpr:Oe.textInputFocus,primary:1,secondary:[1025],mac:{primary:1,secondary:[1025,294,257]}}})||this}return Xe(t,e),t.prototype.runEditorCommand=function(e,t,n){var i=t._getCursors(),o=Je.deleteLeft(i.getPrevEditOperationType(),t._getCursorConfiguration(),t.getModel(),t.getSelections()),r=o[0],s=o[1];r&&t.pushUndoStop(),t.executeCommands(this.id,s),i.setPrevEditOperationType(2)},t}(Ne))),e.DeleteRight=Te(new(function(e){function t(){return e.call(this,{id:"deleteRight",precondition:Oe.writable,kbOpts:{weight:0,kbExpr:Oe.textInputFocus,primary:20,mac:{primary:20,secondary:[290,276]}}})||this}return Xe(t,e),t.prototype.runEditorCommand=function(e,t,n){var i=t._getCursors(),o=Je.deleteRight(i.getPrevEditOperationType(),t._getCursorConfiguration(),t.getModel(),t.getSelections()),r=o[0],s=o[1];r&&t.pushUndoStop(),t.executeCommands(this.id,s),i.setPrevEditOperationType(3)},t}(Ne)))}(Fe||(Fe={}));var it=function(e){function t(t){var n=e.call(this,t)||this;return n._editorHandler=t.editorHandler,n._inputHandler=t.inputHandler,n}return Xe(t,e),t.prototype.runCommand=function(e,t){var n=tt(e);if(n&&n.hasTextFocus())return this._runEditorHandler(n,t);var i=document.activeElement;if(!(i&&["input","textarea"].indexOf(i.tagName.toLowerCase())>=0)){var o=e.get(Ce).getActiveCodeEditor();return o?(o.focus(),this._runEditorHandler(o,t)):void 0}document.execCommand(this._inputHandler)},t.prototype._runEditorHandler=function(e,t){var n=this._editorHandler;"string"==typeof n?e.trigger("keyboard",n,t):((t=t||{}).source="keyboard",n.runEditorCommand(null,e,t))},t}(Ie),ot=function(e){function t(t,n){var i=e.call(this,{id:t,precondition:null})||this;return i._handlerId=n,i}return Xe(t,e),t.prototype.runCommand=function(e,t){var n=tt(e);n&&n.trigger("keyboard",this._handlerId,t)},t}(Ie);function rt(e){nt(new ot("default:"+e,e)),nt(new ot(e,e))}nt(new it({editorHandler:We.SelectAll,inputHandler:"selectAll",id:"editor.action.selectAll",precondition:Oe.textInputFocus,kbOpts:{weight:0,kbExpr:null,primary:2079},menubarOpts:{menuId:ve.MenubarSelectionMenu,group:"1_basic",title:o.k({key:"miSelectAll",comment:["&& denotes a mnemonic"]},"&&Select All"),order:1}})),nt(new it({editorHandler:$e.Undo,inputHandler:"undo",id:$e.Undo,precondition:Oe.writable,kbOpts:{weight:0,kbExpr:Oe.textInputFocus,primary:2104},menubarOpts:{menuId:ve.MenubarEditMenu,group:"1_do",title:o.k({key:"miUndo",comment:["&& denotes a mnemonic"]},"&&Undo"),order:1}})),nt(new ot("default:"+$e.Undo,$e.Undo)),nt(new it({editorHandler:$e.Redo,inputHandler:"redo",id:$e.Redo,precondition:Oe.writable,kbOpts:{weight:0,kbExpr:Oe.textInputFocus,primary:2103,secondary:[3128],mac:{primary:3128}},menubarOpts:{menuId:ve.MenubarEditMenu,group:"1_do",title:o.k({key:"miRedo",comment:["&& denotes a mnemonic"]},"&&Redo"),order:2}})),nt(new ot("default:"+$e.Redo,$e.Redo)),rt($e.Type),rt($e.ReplacePreviousChar),rt($e.CompositionStart),rt($e.CompositionEnd),rt($e.Paste),rt($e.Cut),n(9268),n(8189);var st,at=Object.freeze((function(e,t){var n=setTimeout(e.bind(t),0);return{dispose:function(){clearTimeout(n)}}}));!function(e){e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:X.Jh.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:at})}(st||(st={}));var ut=function(){function e(){this._isCancelled=!1}return e.prototype.cancel=function(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))},Object.defineProperty(e.prototype,"isCancellationRequested",{get:function(){return this._isCancelled},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onCancellationRequested",{get:function(){return this._isCancelled?at:(this._emitter||(this._emitter=new X.vl),this._emitter.event)},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){this._emitter&&(this._emitter.dispose(),this._emitter=void 0)},e}(),lt=function(){function e(){}return Object.defineProperty(e.prototype,"token",{get:function(){return this._token||(this._token=new ut),this._token},enumerable:!0,configurable:!0}),e.prototype.cancel=function(){this._token?this._token instanceof ut&&this._token.cancel():this._token=st.Cancelled},e.prototype.dispose=function(){this._token?this._token instanceof ut&&this._token.dispose():this._token=st.None},e}(),ct=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();function ht(e){return e&&"function"==typeof e.then}function dt(e){return ht(e)?e:J.g3.as(e)}function ft(e){var t=new lt,n=e(t.token),i=new Promise((function(e,i){t.token.onCancellationRequested((function(){i(S.aD())})),Promise.resolve(n).then((function(n){t.dispose(),e(n)}),(function(e){t.dispose(),i(e)}))}));return new(function(){function e(){}return e.prototype.cancel=function(){t.cancel()},e.prototype.then=function(e,t){return i.then(e,t)},e.prototype.catch=function(e){return this.then(void 0,e)},e}())}function pt(e){var t=new lt;return new J.g3((function(n,i,o){var r=e(t.token);r instanceof J.g3?r.then((function(e){t.dispose(),n(e)}),(function(e){t.dispose(),i(e)}),o):ht(r)?r.then((function(e){t.dispose(),n(e)}),(function(e){t.dispose(),i(e)})):(t.dispose(),n(r))}),(function(){t.cancel()}))}var gt=function(){function e(){this.activePromise=null,this.queuedPromise=null,this.queuedPromiseFactory=null}return e.prototype.queue=function(e){var t=this;if(this.activePromise){if(this.queuedPromiseFactory=e,!this.queuedPromise){var n=function(){t.queuedPromise=null;var e=t.queue(t.queuedPromiseFactory);return t.queuedPromiseFactory=null,e};this.queuedPromise=new J.g3((function(e,i,o){t.activePromise.then(n,n,o).done(e)}),(function(){t.activePromise.cancel()}))}return new J.g3((function(e,n,i){t.queuedPromise.then(e,n,i)}),(function(){}))}return this.activePromise=e(),new J.g3((function(e,n,i){t.activePromise.done((function(n){t.activePromise=null,e(n)}),(function(e){t.activePromise=null,n(e)}),i)}),(function(){t.activePromise.cancel()}))},e}(),mt=function(){function e(e){this.defaultDelay=e,this.timeout=null,this.completionPromise=null,this.onSuccess=null,this.task=null}return e.prototype.trigger=function(e,t){var n=this;return void 0===t&&(t=this.defaultDelay),this.task=e,this.cancelTimeout(),this.completionPromise||(this.completionPromise=new J.g3((function(e){n.onSuccess=e}),(function(){})).then((function(){n.completionPromise=null,n.onSuccess=null;var e=n.task;return n.task=null,e()}))),this.timeout=setTimeout((function(){n.timeout=null,n.onSuccess(null)}),t),this.completionPromise},e.prototype.cancel=function(){this.cancelTimeout(),this.completionPromise&&(this.completionPromise.cancel(),this.completionPromise=null)},e.prototype.cancelTimeout=function(){null!==this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},e}(),vt=function(e){function t(t){var n,i,o,r;return n=e.call(this,(function(e,t,n){i=e,o=t,r=n}),(function(){o(S.aD())}))||this,t.then(i,o,r),n}return ct(t,e),t}(J.g3);function yt(e,t){return n=e,J.g3.is(n)&&"function"==typeof n.done?new J.g3((function(n,i,o){e.done((function(e){try{t(e)}catch(e){S.dz(e)}n(e)}),(function(e){try{t(e)}catch(e){S.dz(e)}i(e)}),(function(e){o(e)}))}),(function(){e.cancel()})):(e.then((function(e){return t()}),(function(e){return t()})),e);var n}function bt(e,t,n){void 0===t&&(t=function(e){return!!e}),void 0===n&&(n=null);var i=0,o=e.length,r=function(){return i>=o?Promise.resolve(n):(0,e[i++])().then((function(e){return t(e)?Promise.resolve(e):r()}))};return r()}function _t(e,t,n){void 0===t&&(t=function(e){return!!e}),void 0===n&&(n=null);var i=0,o=e.length,r=function(){return i>=o?J.g3.as(n):(0,e[i++])().then((function(e){return t(e)?J.g3.as(e):r()}))};return r()}var wt=function(e){function t(){var t=e.call(this)||this;return t._token=-1,t}return ct(t,e),t.prototype.dispose=function(){this.cancel(),e.prototype.dispose.call(this)},t.prototype.cancel=function(){-1!==this._token&&(clearTimeout(this._token),this._token=-1)},t.prototype.cancelAndSet=function(e,t){var n=this;this.cancel(),this._token=setTimeout((function(){n._token=-1,e()}),t)},t.prototype.setIfNotSet=function(e,t){var n=this;-1===this._token&&(this._token=setTimeout((function(){n._token=-1,e()}),t))},t}(I.jG),Mt=function(e){function t(){var t=e.call(this)||this;return t._token=-1,t}return ct(t,e),t.prototype.dispose=function(){this.cancel(),e.prototype.dispose.call(this)},t.prototype.cancel=function(){-1!==this._token&&(clearInterval(this._token),this._token=-1)},t.prototype.cancelAndSet=function(e,t){this.cancel(),this._token=setInterval((function(){e()}),t)},t}(I.jG),Ct=function(){function e(e,t){this.timeoutToken=-1,this.runner=e,this.timeout=t,this.timeoutHandler=this.onTimeout.bind(this)}return e.prototype.dispose=function(){this.cancel(),this.runner=null},e.prototype.cancel=function(){this.isScheduled()&&(clearTimeout(this.timeoutToken),this.timeoutToken=-1)},e.prototype.schedule=function(e){void 0===e&&(e=this.timeout),this.cancel(),this.timeoutToken=setTimeout(this.timeoutHandler,e)},e.prototype.isScheduled=function(){return-1!==this.timeoutToken},e.prototype.onTimeout=function(){this.timeoutToken=-1,this.runner&&this.doRun()},e.prototype.doRun=function(){this.runner()},e}(),St=function(){function e(){this._zoomLevel=0,this._lastZoomLevelChangeTime=0,this._onDidChangeZoomLevel=new X.vl,this.onDidChangeZoomLevel=this._onDidChangeZoomLevel.event,this._accessibilitySupport=0,this._onDidChangeAccessibilitySupport=new X.vl,this.onDidChangeAccessibilitySupport=this._onDidChangeAccessibilitySupport.event}return e.prototype.getZoomLevel=function(){return this._zoomLevel},e.prototype.getTimeSinceLastZoomLevelChanged=function(){return Date.now()-this._lastZoomLevelChangeTime},e.prototype.getPixelRatio=function(){var e=document.createElement("canvas").getContext("2d");return(window.devicePixelRatio||1)/(e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1)},e.prototype.getAccessibilitySupport=function(){return this._accessibilitySupport},e.INSTANCE=new e,e}();function Lt(){return St.INSTANCE.getZoomLevel()}function It(e){return St.INSTANCE.onDidChangeZoomLevel(e)}var Nt=navigator.userAgent,xt=Nt.indexOf("Trident")>=0,Dt=Nt.indexOf("Edge/")>=0,kt=xt||Dt,Tt=Nt.indexOf("Firefox")>=0,Et=Nt.indexOf("AppleWebKit")>=0,At=Nt.indexOf("Chrome")>=0,jt=-1===Nt.indexOf("Chrome")&&Nt.indexOf("Safari")>=0,Ot=Nt.indexOf("iPad")>=0,Rt=Dt&&Nt.indexOf("WebView/")>=0,Pt=new Array(230),zt=new Array(112);!function(){for(var e=0;e=0;){if(r=s+o,(0===s||32===n.charCodeAt(s-1))&&32===n.charCodeAt(r))return this._lastStart=s,void(this._lastEnd=r+1);if(s>0&&32===n.charCodeAt(s-1)&&r===i)return this._lastStart=s-1,void(this._lastEnd=r);if(0===s&&r===i)return this._lastStart=0,void(this._lastEnd=r)}this._lastStart=-1}else this._lastStart=-1}else this._lastStart=-1},e.prototype.hasClass=function(e,t){return this._findClassName(e,t),-1!==this._lastStart},e.prototype.addClasses=function(e){for(var t=this,n=[],i=1;i0;)mn.sort(wn.sort),mn.shift().execute();yn=!1},pn=function(e,t){void 0===t&&(t=0);var n,i=new wn(e,t);return gn.push(i),vn||(vn=!0,n=bn,_n||(_n=self.requestAnimationFrame||self.msRequestAnimationFrame||self.webkitRequestAnimationFrame||self.mozRequestAnimationFrame||self.oRequestAnimationFrame||function(e){return setTimeout((function(){return e((new Date).getTime())}),0)}),_n.call(self,n)),i},fn=function(e,t){if(yn){var n=new wn(e,t);return mn.push(n),n}return pn(e,t)};var Mn=function(e,t){return t},Cn=function(e){function t(t,n,i,o,r){void 0===o&&(o=Mn),void 0===r&&(r=16);var s=e.call(this)||this,a=null,u=0,l=s._register(new wt),c=function(){u=(new Date).getTime(),i(a),a=null};return s._register(cn(t,n,(function(e){a=o(a,e);var t=(new Date).getTime()-u;t>=r?(l.cancel(),c()):l.setIfNotSet(c,r-t)}))),s}return $t(t,e),t}(I.jG);function Sn(e,t,n,i,o){return new Cn(e,t,n,i,o)}function Ln(e){return document.defaultView.getComputedStyle(e,null)}function In(e,t,n){var i=Ln(e),o="0";return i&&(o=i.getPropertyValue?i.getPropertyValue(t):i.getAttribute(n)),function(e,t){return parseFloat(t)||0}(0,o)}var Nn=function(e){return In(e,"border-left-width","borderLeftWidth")},xn=function(e){return In(e,"border-top-width","borderTopWidth")},Dn=function(e,t){this.width=e,this.height=t};function kn(e){for(var t=e.offsetParent,n=e.offsetTop,i=e.offsetLeft;null!==(e=e.parentNode)&&e!==document.body&&e!==document.documentElement;){n-=e.scrollTop;var o=Ln(e);o&&(i-="rtl"!==o.direction?e.scrollLeft:-e.scrollLeft),e===t&&(i+=Nn(e),n+=xn(e),n+=e.offsetTop,i+=e.offsetLeft,t=e.offsetParent)}return{left:i,top:n}}function Tn(e){var t=e.getBoundingClientRect();return{left:t.left+En.scrollX,top:t.top+En.scrollY,width:t.width,height:t.height}}var En=new(function(){function e(){}return Object.defineProperty(e.prototype,"scrollX",{get:function(){return"number"==typeof window.scrollX?window.scrollX:document.body.scrollLeft+document.documentElement.scrollLeft},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"scrollY",{get:function(){return"number"==typeof window.scrollY?window.scrollY:document.body.scrollTop+document.documentElement.scrollTop},enumerable:!0,configurable:!0}),e}());function An(e){var t=function(e){return In(e,"margin-left","marginLeft")}(e)+function(e){return In(e,"margin-right","marginRight")}(e);return e.offsetWidth+t}function jn(e){var t=Nn(e)+function(e){return In(e,"border-right-width","borderRightWidth")}(e),n=function(e){return In(e,"padding-left","paddingLeft")}(e)+function(e){return In(e,"padding-right","paddingRight")}(e);return e.offsetWidth-t-n}function On(e){var t=xn(e)+function(e){return In(e,"border-bottom-width","borderBottomWidth")}(e),n=function(e){return In(e,"padding-top","paddingTop")}(e)+function(e){return In(e,"padding-bottom","paddingBottom")}(e);return e.offsetHeight-t-n}function Rn(e){var t=function(e){return In(e,"margin-top","marginTop")}(e)+function(e){return In(e,"margin-bottom","marginBottom")}(e);return e.offsetHeight+t}function Pn(e,t){for(;e;){if(e===t)return!0;e=e.parentNode}return!1}function zn(e,t,n){for(;e;){if(rn(e,t))return e;if(n)if("string"==typeof n){if(rn(e,n))return null}else if(e===n)return null;e=e.parentNode}return null}function Wn(e){void 0===e&&(e=document.getElementsByTagName("head")[0]);var t=document.createElement("style");return t.type="text/css",t.media="screen",e.appendChild(t),t}var Fn=null;function Bn(){return Fn||(Fn=Wn()),Fn}function Hn(e,t){if(void 0===t&&(t=Bn()),t){for(var n=function(e){return e&&e.sheet&&e.sheet.rules?e.sheet.rules:e&&e.sheet&&e.sheet.cssRules?e.sheet.cssRules:[]}(t),i=[],o=0;o=0;o--)t.sheet.deleteRule(i[o])}}function Vn(e){return"object"==typeof HTMLElement?e instanceof HTMLElement:e&&"object"==typeof e&&1===e.nodeType&&"string"==typeof e.nodeName}var Un={CLICK:"click",AUXCLICK:"auxclick",DBLCLICK:"dblclick",MOUSE_UP:"mouseup",MOUSE_DOWN:"mousedown",MOUSE_OVER:"mouseover",MOUSE_MOVE:"mousemove",MOUSE_OUT:"mouseout",MOUSE_ENTER:"mouseenter",MOUSE_LEAVE:"mouseleave",CONTEXT_MENU:"contextmenu",WHEEL:"wheel",KEY_DOWN:"keydown",KEY_PRESS:"keypress",KEY_UP:"keyup",LOAD:"load",UNLOAD:"unload",ABORT:"abort",ERROR:"error",RESIZE:"resize",SCROLL:"scroll",SELECT:"select",CHANGE:"change",SUBMIT:"submit",RESET:"reset",FOCUS:"focus",FOCUS_IN:"focusin",FOCUS_OUT:"focusout",BLUR:"blur",INPUT:"input",STORAGE:"storage",DRAG_START:"dragstart",DRAG:"drag",DRAG_ENTER:"dragenter",DRAG_LEAVE:"dragleave",DRAG_OVER:"dragover",DROP:"drop",DRAG_END:"dragend",ANIMATION_START:Et?"webkitAnimationStart":"animationstart",ANIMATION_END:Et?"webkitAnimationEnd":"animationend",ANIMATION_ITERATION:Et?"webkitAnimationIteration":"animationiteration"},Yn=function(e,t){e.preventDefault?e.preventDefault():e.returnValue=!1,t&&(e.stopPropagation?e.stopPropagation():e.cancelBubble=!0)},Zn=function(){function e(e){var t=this;this._onDidFocus=new X.vl,this.onDidFocus=this._onDidFocus.event,this._onDidBlur=new X.vl,this.onDidBlur=this._onDidBlur.event,this.disposables=[];var n=!1,i=!1;Jt(e,Un.FOCUS,!0)((function(){i=!1,n||(n=!0,t._onDidFocus.fire())}),null,this.disposables),Jt(e,Un.BLUR,!0)((function(){n&&(i=!0,window.setTimeout((function(){i&&(i=!1,n=!1,t._onDidBlur.fire())}),0))}),null,this.disposables)}return e.prototype.dispose=function(){this.disposables=(0,I.AS)(this.disposables),this._onDidFocus.dispose(),this._onDidBlur.dispose()},e}();function Gn(e){return new Zn(e)}function Qn(e){for(var t=[],n=1;n0&&"#"===n.charAt(n.length-1)?n.substring(0,n.length-1):n)]=t,this._onDidChangeSchema.fire(e)},e}());U.add(si,ai);var ui,li="base.contributions.configuration";!function(e){e[e.APPLICATION=1]="APPLICATION",e[e.WINDOW=2]="WINDOW",e[e.RESOURCE=3]="RESOURCE"}(ui||(ui={}));var ci={properties:{},patternProperties:{}},hi={properties:{},patternProperties:{}},di={properties:{},patternProperties:{}},fi={properties:{},patternProperties:{}},pi="vscode://schemas/settings/editor",gi=U.as(si),mi=function(){function e(){this.overrideIdentifiers=[],this._onDidSchemaChange=new X.vl,this._onDidRegisterConfiguration=new X.vl,this.configurationContributors=[],this.editorConfigurationSchema={properties:{},patternProperties:{},additionalProperties:!1,errorMessage:"Unknown editor configuration setting"},this.configurationProperties={},this.excludedConfigurationProperties={},this.computeOverridePropertyPattern(),gi.registerSchema(pi,this.editorConfigurationSchema)}return e.prototype.registerConfiguration=function(e,t){void 0===t&&(t=!0),this.registerConfigurations([e],[],t)},e.prototype.registerConfigurations=function(e,t,n){var i=this;void 0===n&&(n=!0);var o=this.toConfiguration(t);o&&e.push(o);var r=[];e.forEach((function(e){r.push.apply(r,i.validateAndRegisterProperties(e,n)),i.configurationContributors.push(e),i.registerJSONConfiguration(e),i.updateSchemaForOverrideSettingsConfiguration(e)})),this._onDidRegisterConfiguration.fire(r)},e.prototype.registerOverrideIdentifiers=function(e){var t;(t=this.overrideIdentifiers).push.apply(t,e),this.updateOverridePropertyPatternKey()},e.prototype.toConfiguration=function(e){for(var t={id:"defaultOverrides",title:o.k("defaultConfigurations.title","Default Configuration Overrides"),properties:{}},n=0,i=e;nn?n:e}function ki(e,t){return"string"!=typeof e?t:e}var Ti=function(){function e(e){this.zoomLevel=e.zoomLevel,this.fontFamily=String(e.fontFamily),this.fontWeight=String(e.fontWeight),this.fontSize=e.fontSize,this.lineHeight=0|e.lineHeight,this.letterSpacing=e.letterSpacing}return e.createFromRawSettings=function(t,n){var i=ki(t.fontFamily,Li.jU.fontFamily),o=ki(t.fontWeight,Li.jU.fontWeight),r=xi(t.fontSize,Li.jU.fontSize);0===(r=Di(r,0,100))?r=Li.jU.fontSize:r<8&&(r=8);var s=function(e,t){if("number"==typeof e)return Math.round(e);var n=parseInt(e);return isNaN(n)?0:n}(t.lineHeight);0===(s=Di(s,0,150))?s=Math.round(Ni*r):s<8&&(s=8);var a=xi(t.letterSpacing,0);a=Di(a,-5,20);var u=1+.1*Si.getZoomLevel();return new e({zoomLevel:n,fontFamily:i,fontWeight:o,fontSize:r*=u,lineHeight:s*=u,letterSpacing:a})},e.prototype.getId=function(){return this.zoomLevel+"-"+this.fontFamily+"-"+this.fontWeight+"-"+this.fontSize+"-"+this.lineHeight+"-"+this.letterSpacing},e}(),Ei=function(e){function t(t,n){var i=e.call(this,t)||this;return i.isTrusted=n,i.isMonospace=t.isMonospace,i.typicalHalfwidthCharacterWidth=t.typicalHalfwidthCharacterWidth,i.typicalFullwidthCharacterWidth=t.typicalFullwidthCharacterWidth,i.spaceWidth=t.spaceWidth,i.maxDigitWidth=t.maxDigitWidth,i}return Ii(t,e),t.prototype.equals=function(e){return this.fontFamily===e.fontFamily&&this.fontWeight===e.fontWeight&&this.fontSize===e.fontSize&&this.lineHeight===e.lineHeight&&this.letterSpacing===e.letterSpacing&&this.typicalHalfwidthCharacterWidth===e.typicalHalfwidthCharacterWidth&&this.typicalFullwidthCharacterWidth===e.typicalFullwidthCharacterWidth&&this.spaceWidth===e.spaceWidth&&this.maxDigitWidth===e.maxDigitWidth},t}(Ti),Ai=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),ji=Li.Pk,Oi=Li.jU,Ri=Li.Re,Pi=new(function(){function e(){this._tabFocus=!1,this._onDidChangeTabFocus=new X.vl,this.onDidChangeTabFocus=this._onDidChangeTabFocus.event}return e.prototype.getTabFocusMode=function(){return this._tabFocus},e.prototype.setTabFocusMode=function(e){this._tabFocus!==e&&(this._tabFocus=e,this._onDidChangeTabFocus.fire(this._tabFocus))},e}()),zi=Object.hasOwnProperty,Wi=function(e){function t(t){var n=e.call(this)||this;return n._onDidChange=n._register(new X.vl),n.onDidChange=n._onDidChange.event,n._rawOptions=ri.co({},t||{}),n._rawOptions.scrollbar=ri.co({},n._rawOptions.scrollbar||{}),n._rawOptions.minimap=ri.co({},n._rawOptions.minimap||{}),n._rawOptions.find=ri.co({},n._rawOptions.find||{}),n._rawOptions.hover=ri.co({},n._rawOptions.hover||{}),n._validatedOptions=Li.Wo.validate(n._rawOptions,ji),n.editor=null,n._isDominatedByLongLines=!1,n._lineNumbersDigitCount=1,n._register(Si.onDidChangeZoomLevel((function(e){return n._recomputeOptions()}))),n._register(Pi.onDidChangeTabFocus((function(e){return n._recomputeOptions()}))),n}return Ai(t,e),t.prototype.observeReferenceElement=function(e){},t.prototype.dispose=function(){e.prototype.dispose.call(this)},t.prototype._recomputeOptions=function(){var e=this.editor,t=this._computeInternalOptions();e&&e.equals(t)||(this.editor=t,e&&this._onDidChange.fire(e.createChangeEvent(t)))},t.prototype.getRawOptions=function(){return this._rawOptions},t.prototype._computeInternalOptions=function(){var e=this._validatedOptions,t=this._getEnvConfiguration(),n=Ti.createFromRawSettings(this._rawOptions,t.zoomLevel),i={outerWidth:t.outerWidth,outerHeight:t.outerHeight,fontInfo:this.readConfiguration(n),extraEditorClassName:t.extraEditorClassName,isDominatedByLongLines:this._isDominatedByLongLines,lineNumbersDigitCount:this._lineNumbersDigitCount,emptySelectionClipboard:t.emptySelectionClipboard,pixelRatio:t.pixelRatio,tabFocusMode:Pi.getTabFocusMode(),accessibilitySupport:t.accessibilitySupport};return Li.HF.createInternalEditorOptions(i,e)},t._primitiveArrayEquals=function(e,t){if(e.length!==t.length)return!1;for(var n=0;n console.log` because `log` has been completed recently."),o.k("suggestSelection.recentlyUsedByPrefix","Select suggestions based on previous prefixes that have completed those suggestions, e.g. `co -> console` and `con -> const`.")],default:"recentlyUsed",description:o.k("suggestSelection","Controls how suggestions are pre-selected when showing the suggest list.")},"editor.suggestFontSize":{type:"integer",default:0,minimum:0,description:o.k("suggestFontSize","Font size for the suggest widget.")},"editor.suggestLineHeight":{type:"integer",default:0,minimum:0,description:o.k("suggestLineHeight","Line height for the suggest widget.")},"editor.suggest.filterGraceful":{type:"boolean",default:!0,description:o.k("suggest.filterGraceful","Controls whether filtering and sorting suggestions accounts for small typos.")},"editor.suggest.snippetsPreventQuickSuggestions":{type:"boolean",default:!0,description:o.k("suggest.snippetsPreventQuickSuggestions","Control whether an active snippet prevents quick suggestions.")},"editor.selectionHighlight":{type:"boolean",default:ji.contribInfo.selectionHighlight,description:o.k("selectionHighlight","Controls whether the editor should highlight matches similar to the selection")},"editor.occurrencesHighlight":{type:"boolean",default:ji.contribInfo.occurrencesHighlight,description:o.k("occurrencesHighlight","Controls whether the editor should highlight semantic symbol occurrences.")},"editor.overviewRulerLanes":{type:"integer",default:3,description:o.k("overviewRulerLanes","Controls the number of decorations that can show up at the same position in the overview ruler.")},"editor.overviewRulerBorder":{type:"boolean",default:ji.viewInfo.overviewRulerBorder,description:o.k("overviewRulerBorder","Controls whether a border should be drawn around the overview ruler.")},"editor.cursorBlinking":{type:"string",enum:["blink","smooth","phase","expand","solid"],default:Li.a2(ji.viewInfo.cursorBlinking),description:o.k("cursorBlinking","Control the cursor animation style.")},"editor.mouseWheelZoom":{type:"boolean",default:ji.viewInfo.mouseWheelZoom,description:o.k("mouseWheelZoom","Zoom the font of the editor when using mouse wheel and holding `Ctrl`.")},"editor.cursorStyle":{type:"string",enum:["block","block-outline","line","line-thin","underline","underline-thin"],default:Li.wb(ji.viewInfo.cursorStyle),description:o.k("cursorStyle","Controls the cursor style.")},"editor.cursorWidth":{type:"integer",default:ji.viewInfo.cursorWidth,description:o.k("cursorWidth","Controls the width of the cursor when `#editor.cursorStyle#` is set to `line`.")},"editor.fontLigatures":{type:"boolean",default:ji.viewInfo.fontLigatures,description:o.k("fontLigatures","Enables/Disables font ligatures.")},"editor.hideCursorInOverviewRuler":{type:"boolean",default:ji.viewInfo.hideCursorInOverviewRuler,description:o.k("hideCursorInOverviewRuler","Controls whether the cursor should be hidden in the overview ruler.")},"editor.renderWhitespace":{type:"string",enum:["none","boundary","all"],enumDescriptions:["",o.k("renderWhiteSpace.boundary","Render whitespace characters except for single spaces between words."),""],default:ji.viewInfo.renderWhitespace,description:o.k("renderWhitespace","Controls how the editor should render whitespace characters.")},"editor.renderControlCharacters":{type:"boolean",default:ji.viewInfo.renderControlCharacters,description:o.k("renderControlCharacters","Controls whether the editor should render control characters.")},"editor.renderIndentGuides":{type:"boolean",default:ji.viewInfo.renderIndentGuides,description:o.k("renderIndentGuides","Controls whether the editor should render indent guides.")},"editor.highlightActiveIndentGuide":{type:"boolean",default:ji.viewInfo.highlightActiveIndentGuide,description:o.k("highlightActiveIndentGuide","Controls whether the editor should highlight the active indent guide.")},"editor.renderLineHighlight":{type:"string",enum:["none","gutter","line","all"],enumDescriptions:["","","",o.k("renderLineHighlight.all","Highlights both the gutter and the current line.")],default:ji.viewInfo.renderLineHighlight,description:o.k("renderLineHighlight","Controls how the editor should render the current line highlight.")},"editor.codeLens":{type:"boolean",default:ji.contribInfo.codeLens,description:o.k("codeLens","Controls whether the editor shows CodeLens")},"editor.folding":{type:"boolean",default:ji.contribInfo.folding,description:o.k("folding","Controls whether the editor has code folding enabled")},"editor.foldingStrategy":{type:"string",enum:["auto","indentation"],default:ji.contribInfo.foldingStrategy,description:o.k("foldingStrategy","Controls the strategy for computing folding ranges. `auto` uses a language specific folding strategy, if available. `indentation` uses the indentation based folding strategy.")},"editor.showFoldingControls":{type:"string",enum:["always","mouseover"],default:ji.contribInfo.showFoldingControls,description:o.k("showFoldingControls","Controls whether the fold controls on the gutter are automatically hidden.")},"editor.matchBrackets":{type:"boolean",default:ji.contribInfo.matchBrackets,description:o.k("matchBrackets","Highlight matching brackets when one of them is selected.")},"editor.glyphMargin":{type:"boolean",default:ji.viewInfo.glyphMargin,description:o.k("glyphMargin","Controls whether the editor should render the vertical glyph margin. Glyph margin is mostly used for debugging.")},"editor.useTabStops":{type:"boolean",default:ji.useTabStops,description:o.k("useTabStops","Inserting and deleting whitespace follows tab stops.")},"editor.trimAutoWhitespace":{type:"boolean",default:Ri.trimAutoWhitespace,description:o.k("trimAutoWhitespace","Remove trailing auto inserted whitespace.")},"editor.stablePeek":{type:"boolean",default:!1,description:o.k("stablePeek","Keep peek editors open even when double clicking their content or when hitting `Escape`.")},"editor.dragAndDrop":{type:"boolean",default:ji.dragAndDrop,description:o.k("dragAndDrop","Controls whether the editor should allow moving selections via drag and drop.")},"editor.accessibilitySupport":{type:"string",enum:["auto","on","off"],enumDescriptions:[o.k("accessibilitySupport.auto","The editor will use platform APIs to detect when a Screen Reader is attached."),o.k("accessibilitySupport.on","The editor will be permanently optimized for usage with a Screen Reader."),o.k("accessibilitySupport.off","The editor will never be optimized for usage with a Screen Reader.")],default:ji.accessibilitySupport,description:o.k("accessibilitySupport","Controls whether the editor should run in a mode where it is optimized for screen readers.")},"editor.showUnused":{type:"boolean",default:ji.showUnused,description:o.k("showUnused","Controls fading out of unused code.")},"editor.links":{type:"boolean",default:ji.contribInfo.links,description:o.k("links","Controls whether the editor should detect links and make them clickable.")},"editor.colorDecorators":{type:"boolean",default:ji.contribInfo.colorDecorators,description:o.k("colorDecorators","Controls whether the editor should render the inline color decorators and color picker.")},"editor.lightbulb.enabled":{type:"boolean",default:ji.contribInfo.lightbulbEnabled,description:o.k("codeActions","Enables the code action lightbulb in the editor.")},"editor.codeActionsOnSave":{type:"object",properties:{"source.organizeImports":{type:"boolean",description:o.k("codeActionsOnSave.organizeImports","Controls whether organize imports action should be run on file save.")}},additionalProperties:{type:"boolean"},default:ji.contribInfo.codeActionsOnSave,description:o.k("codeActionsOnSave","Code action kinds to be run on save.")},"editor.codeActionsOnSaveTimeout":{type:"number",default:ji.contribInfo.codeActionsOnSaveTimeout,description:o.k("codeActionsOnSaveTimeout","Timeout in milliseconds after which the code actions that are run on save are cancelled.")},"editor.selectionClipboard":{type:"boolean",default:ji.contribInfo.selectionClipboard,description:o.k("selectionClipboard","Controls whether the Linux primary clipboard should be supported."),included:B.j9},"diffEditor.renderSideBySide":{type:"boolean",default:!0,description:o.k("sideBySide","Controls whether the diff editor shows the diff side by side or inline.")},"diffEditor.ignoreTrimWhitespace":{type:"boolean",default:!0,description:o.k("ignoreTrimWhitespace","Controls whether the diff editor shows changes in leading or trailing whitespace as diffs.")},"editor.largeFileOptimizations":{type:"boolean",default:Ri.largeFileOptimizations,description:o.k("largeFileOptimizations","Special handling for large files to disable certain memory intensive features.")},"diffEditor.renderIndicators":{type:"boolean",default:!0,description:o.k("renderIndicators","Controls whether the diff editor shows +/- indicators for added/removed changes.")}}},Hi=null;function Vi(){return null===Hi&&(Hi=Object.create(null),Object.keys(Bi.properties).forEach((function(e){Hi[e]=!0}))),Hi}Fi.registerConfiguration(Bi);var Ui=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Yi=function(e){function t(t,n){var i=e.call(this)||this;return i.referenceDomElement=t,i.changeCallback=n,i.measureReferenceDomElementToken=-1,i.width=-1,i.height=-1,i.measureReferenceDomElement(!1),i}return Ui(t,e),t.prototype.dispose=function(){this.stopObserving(),e.prototype.dispose.call(this)},t.prototype.getWidth=function(){return this.width},t.prototype.getHeight=function(){return this.height},t.prototype.startObserving=function(){var e=this;-1===this.measureReferenceDomElementToken&&(this.measureReferenceDomElementToken=setInterval((function(){return e.measureReferenceDomElement(!0)}),100))},t.prototype.stopObserving=function(){-1!==this.measureReferenceDomElementToken&&(clearInterval(this.measureReferenceDomElementToken),this.measureReferenceDomElementToken=-1)},t.prototype.observe=function(e){this.measureReferenceDomElement(!0,e)},t.prototype.measureReferenceDomElement=function(e,t){var n=0,i=0;t?(n=t.width,i=t.height):this.referenceDomElement&&(n=this.referenceDomElement.clientWidth,i=this.referenceDomElement.clientHeight),n=Math.max(5,n),i=Math.max(5,i),this.width===n&&this.height===i||(this.width=n,this.height=i,e&&this.changeCallback())},t}(I.jG),Zi=function(){function e(e,t){this.chr=e,this.type=t,this.width=0}return e.prototype.fulfill=function(e){this.width=e},e}(),Gi=function(){function e(e,t){this._bareFontInfo=e,this._requests=t,this._container=null,this._testElements=null}return e.prototype.read=function(){this._createDomElements(),document.body.appendChild(this._container),this._readFromDomElements(),document.body.removeChild(this._container),this._container=null,this._testElements=null},e.prototype._createDomElements=function(){var t=document.createElement("div");t.style.position="absolute",t.style.top="-50000px",t.style.width="50000px";var n=document.createElement("div");n.style.fontFamily=this._bareFontInfo.fontFamily,n.style.fontWeight=this._bareFontInfo.fontWeight,n.style.fontSize=this._bareFontInfo.fontSize+"px",n.style.lineHeight=this._bareFontInfo.lineHeight+"px",n.style.letterSpacing=this._bareFontInfo.letterSpacing+"px",t.appendChild(n);var i=document.createElement("div");i.style.fontFamily=this._bareFontInfo.fontFamily,i.style.fontWeight="bold",i.style.fontSize=this._bareFontInfo.fontSize+"px",i.style.lineHeight=this._bareFontInfo.lineHeight+"px",i.style.letterSpacing=this._bareFontInfo.letterSpacing+"px",t.appendChild(i);var o=document.createElement("div");o.style.fontFamily=this._bareFontInfo.fontFamily,o.style.fontWeight=this._bareFontInfo.fontWeight,o.style.fontSize=this._bareFontInfo.fontSize+"px",o.style.lineHeight=this._bareFontInfo.lineHeight+"px",o.style.letterSpacing=this._bareFontInfo.letterSpacing+"px",o.style.fontStyle="italic",t.appendChild(o);for(var r=[],s=0,a=this._requests.length;s.001){v=!1;break}}var M=St.INSTANCE.getTimeSinceLastZoomLevelChanged()>2e3;return new Ei({zoomLevel:Lt(),fontFamily:e.fontFamily,fontWeight:e.fontWeight,fontSize:e.fontSize,lineHeight:e.lineHeight,letterSpacing:e.letterSpacing,isMonospace:v,typicalHalfwidthCharacterWidth:i.width,typicalFullwidthCharacterWidth:o.width,spaceWidth:r.width,maxDigitWidth:m},M)},t.INSTANCE=new t,t}(I.jG),Ji=function(e){function t(t,n){void 0===n&&(n=null);var i,o=e.call(this,t)||this;return o._elementSizeObserver=o._register(new Yi(n,(function(){return o._onReferenceDomElementSizeChanged()}))),o._register(Ki.INSTANCE.onDidChange((function(){return o._onCSSBasedConfigurationChanged()}))),o._validatedOptions.automaticLayout&&o._elementSizeObserver.startObserving(),o._register(It((function(e){return o._recomputeOptions()}))),o._register((i=function(){return o._recomputeOptions()},St.INSTANCE.onDidChangeAccessibilitySupport(i))),o._recomputeOptions(),o}return Qi(t,e),t._massageFontFamily=function(e){return/[,"']/.test(e)?e:/[+ ]/.test(e)?'"'+e+'"':e},t.applyFontInfoSlow=function(e,n){e.style.fontFamily=t._massageFontFamily(n.fontFamily),e.style.fontWeight=n.fontWeight,e.style.fontSize=n.fontSize+"px",e.style.lineHeight=n.lineHeight+"px",e.style.letterSpacing=n.letterSpacing+"px"},t.applyFontInfo=function(e,n){e.setFontFamily(t._massageFontFamily(n.fontFamily)),e.setFontWeight(n.fontWeight),e.setFontSize(n.fontSize),e.setLineHeight(n.lineHeight),e.setLetterSpacing(n.letterSpacing)},t.prototype._onReferenceDomElementSizeChanged=function(){this._recomputeOptions()},t.prototype._onCSSBasedConfigurationChanged=function(){this._recomputeOptions()},t.prototype.observeReferenceElement=function(e){this._elementSizeObserver.observe(e)},t.prototype.dispose=function(){e.prototype.dispose.call(this)},t.prototype._getExtraEditorClassName=function(){var e="";return xt?e+="ie ":Tt?e+="ff ":Dt?e+="edge ":jt&&(e+="safari "),B.zx&&(e+="mac "),e},t.prototype._getEnvConfiguration=function(){return{extraEditorClassName:this._getExtraEditorClassName(),outerWidth:this._elementSizeObserver.getWidth(),outerHeight:this._elementSizeObserver.getHeight(),emptySelectionClipboard:Et||Tt,pixelRatio:St.INSTANCE.getPixelRatio(),zoomLevel:Lt(),accessibilitySupport:St.INSTANCE.getAccessibilitySupport()}},t.prototype.readConfiguration=function(e){return Ki.INSTANCE.readConfiguration(e)},t}(Wi),Xi=n(4076),$i=function(){function e(e){this.modelState=null,this.viewState=null,this._selTrackedRange=null,this._trackSelection=!0,this._setState(e,new l.mG(new s.Q(1,1,1,1),0,new r.y(1,1),0),new l.mG(new s.Q(1,1,1,1),0,new r.y(1,1),0))}return e.prototype.dispose=function(e){this._removeTrackedRange(e)},e.prototype.startTrackingSelection=function(e){this._trackSelection=!0,this._updateTrackedRange(e)},e.prototype.stopTrackingSelection=function(e){this._trackSelection=!1,this._removeTrackedRange(e)},e.prototype._updateTrackedRange=function(e){this._trackSelection&&(this._selTrackedRange=e.model._setTrackedRange(this._selTrackedRange,this.modelState.selection,Xi.kK.AlwaysGrowsWhenTypingAtEdges))},e.prototype._removeTrackedRange=function(e){this._selTrackedRange=e.model._setTrackedRange(this._selTrackedRange,null,Xi.kK.AlwaysGrowsWhenTypingAtEdges)},e.prototype.asCursorState=function(){return new l.MF(this.modelState,this.viewState)},e.prototype.readSelectionFromMarkers=function(e){var t=e.model._getTrackedRange(this._selTrackedRange);return this.modelState.selection.getDirection()===Be.S.LTR?new Be.L(t.startLineNumber,t.startColumn,t.endLineNumber,t.endColumn):new Be.L(t.endLineNumber,t.endColumn,t.startLineNumber,t.startColumn)},e.prototype.ensureValidState=function(e){this._setState(e,this.modelState,this.viewState)},e.prototype.setState=function(e,t,n){this._setState(e,t,n)},e.prototype._setState=function(e,t,n){if(t){a=e.model.validateRange(t.selectionStart);var i=t.selectionStart.equalsRange(a)?t.selectionStartLeftoverVisibleColumns:0,o=(u=e.model.validatePosition(t.position),t.position.equals(u)?t.leftoverVisibleColumns:0);t=new l.mG(a,i,u,o)}else{var a=e.model.validateRange(e.convertViewRangeToModelRange(n.selectionStart)),u=e.model.validatePosition(e.convertViewPositionToModelPosition(n.position.lineNumber,n.position.column));t=new l.mG(a,n.selectionStartLeftoverVisibleColumns,u,n.leftoverVisibleColumns)}if(n)d=e.validateViewRange(n.selectionStart,t.selectionStart),f=e.validateViewPosition(n.position,t.position),n=new l.mG(d,t.selectionStartLeftoverVisibleColumns,f,t.leftoverVisibleColumns);else{var c=e.convertModelPositionToViewPosition(new r.y(t.selectionStart.startLineNumber,t.selectionStart.startColumn)),h=e.convertModelPositionToViewPosition(new r.y(t.selectionStart.endLineNumber,t.selectionStart.endColumn)),d=new s.Q(c.lineNumber,c.column,h.lineNumber,h.column),f=e.convertModelPositionToViewPosition(t.position);n=new l.mG(d,t.selectionStartLeftoverVisibleColumns,f,t.leftoverVisibleColumns)}this.modelState=t,this.viewState=n,this._updateTrackedRange(e)},e}(),eo=function(){function e(e){this.context=e,this.primaryCursor=new $i(e),this.secondaryCursors=[],this.lastAddedCursorIndex=0}return e.prototype.dispose=function(){this.primaryCursor.dispose(this.context),this.killSecondaryCursors()},e.prototype.startTrackingSelections=function(){this.primaryCursor.startTrackingSelection(this.context);for(var e=0,t=this.secondaryCursors.length;en){var r=t-n;for(o=0;o=e+1&&this.lastAddedCursorIndex--,this.secondaryCursors[e].dispose(this.context),this.secondaryCursors.splice(e,1)},e.prototype._getAll=function(){var e=[];e[0]=this.primaryCursor;for(var t=0,n=this.secondaryCursors.length;td&&t[M].index--;e.splice(d,1),t.splice(h,1),this._removeSecondaryCursor(d-1),o--}}}},e}(),to=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),no=function(e){this.type=1,this.canUseLayerHinting=e.canUseLayerHinting,this.pixelRatio=e.pixelRatio,this.editorClassName=e.editorClassName,this.lineHeight=e.lineHeight,this.readOnly=e.readOnly,this.accessibilitySupport=e.accessibilitySupport,this.emptySelectionClipboard=e.emptySelectionClipboard,this.layoutInfo=e.layoutInfo,this.fontInfo=e.fontInfo,this.viewInfo=e.viewInfo,this.wrappingInfo=e.wrappingInfo},io=function(e){this.type=2,this.selections=e},oo=function(){this.type=3},ro=function(){this.type=4},so=function(e){this.type=5,this.isFocused=e},ao=function(){this.type=6},uo=function(e,t){this.type=7,this.fromLineNumber=e,this.toLineNumber=t},lo=function(e,t){this.type=8,this.fromLineNumber=e,this.toLineNumber=t},co=function(e,t){this.type=9,this.fromLineNumber=e,this.toLineNumber=t},ho=function(e,t,n,i){this.type=10,this.range=e,this.verticalType=t,this.revealHorizontal=n,this.scrollType=i},fo=function(e){this.type=11,this.scrollWidth=e.scrollWidth,this.scrollLeft=e.scrollLeft,this.scrollHeight=e.scrollHeight,this.scrollTop=e.scrollTop,this.scrollWidthChanged=e.scrollWidthChanged,this.scrollLeftChanged=e.scrollLeftChanged,this.scrollHeightChanged=e.scrollHeightChanged,this.scrollTopChanged=e.scrollTopChanged},po=function(e){this.type=12,this.ranges=e},go=function(){this.type=15},mo=function(){this.type=13},vo=function(){this.type=14},yo=function(){this.type=16},bo=function(e){function t(){var t=e.call(this)||this;return t._listeners=[],t._collector=null,t._collectorCnt=0,t}return to(t,e),t.prototype.dispose=function(){this._listeners=[],e.prototype.dispose.call(this)},t.prototype._beginEmit=function(){return this._collectorCnt++,1===this._collectorCnt&&(this._collector=new _o),this._collector},t.prototype._endEmit=function(){if(this._collectorCnt--,0===this._collectorCnt){var e=this._collector.finalize();this._collector=null,e.length>0&&this._emit(e)}},t.prototype._emit=function(e){for(var t=this._listeners.slice(0),n=0,i=t.length;nt.MAX_CURSOR_COUNT&&(i=i.slice(0,t.MAX_CURSOR_COUNT),this._onDidReachMaxCursorCount.fire(void 0));var o=new So(this._model,this);this._cursors.setStates(i),this._cursors.normalize(),this._columnSelectData=null,this._emitStateChangedIfNecessary(e,n,o)},t.prototype.setColumnSelectData=function(e){this._columnSelectData=e},t.prototype.reveal=function(e,t,n){this._revealRange(t,0,e,n)},t.prototype.revealRange=function(e,t,n,i){this.emitCursorRevealRange(t,n,e,i)},t.prototype.scrollTo=function(e){this._viewModel.viewLayout.setScrollPositionSmooth({scrollTop:e})},t.prototype.saveState=function(){for(var e=[],t=this._cursors.getSelections(),n=0,i=t.length;n1)return;var u=new s.Q(r.lineNumber,r.column,r.lineNumber,r.column);this.emitCursorRevealRange(u,t,n,i)},t.prototype.emitCursorRevealRange=function(e,t,n,i){try{this._beginEmit().emit(new ho(e,t,n,i))}finally{this._endEmit()}},t.prototype.trigger=function(e,t,n){var o=u;if(t!==o.CompositionStart)if(t===o.CompositionEnd&&(this._isDoingComposition=!1),this._configuration.editor.readOnly)this._onDidAttemptReadOnlyEdit.fire(void 0);else{var r=new So(this._model,this),s=i.NotSet;t!==o.Undo&&t!==o.Redo&&this._cursors.stopTrackingSelections(),this._cursors.ensureValidState(),this._isHandling=!0;try{switch(t){case o.Type:this._type(e,n.text);break;case o.ReplacePreviousChar:this._replacePreviousChar(n.text,n.replaceCharCnt);break;case o.Paste:s=i.Paste,this._paste(n.text,n.pasteOnNewLine,n.multicursorText);break;case o.Cut:this._cut();break;case o.Undo:s=i.Undo,this._interpretCommandResult(this._model.undo());break;case o.Redo:s=i.Redo,this._interpretCommandResult(this._model.redo());break;case o.ExecuteCommand:this._externalExecuteCommand(n);break;case o.ExecuteCommands:this._externalExecuteCommands(n);break;case o.CompositionEnd:this._interpretCompositionEnd(e)}}catch(e){(0,S.dz)(e)}this._isHandling=!1,t!==o.Undo&&t!==o.Redo&&this._cursors.startTrackingSelections(),this._emitStateChangedIfNecessary(e,s,r)&&this._revealRange(0,0,!0,0)}else this._isDoingComposition=!0},t.prototype._interpretCompositionEnd=function(e){this._isDoingComposition||"keyboard"!==e||this._executeEditOperation(Ke.compositionEndWithInterceptors(this._prevEditOperationType,this.context.config,this.context.model,this.getSelections()))},t.prototype._type=function(e,t){if(this._isDoingComposition||"keyboard"!==e)this._executeEditOperation(Ke.typeWithoutInterceptors(this._prevEditOperationType,this.context.config,this.context.model,this.getSelections(),t));else for(var n=0,i=t.length;n0&&(r[0]._isTracked=!0);var u=e.model.pushEditOperations(e.selectionsBefore,r,(function(n){for(var i=[],o=0;o0?(i[n].sort(s),a[n]=t[n].computeCursorState(e.model,{getInverseEditOperations:function(){return i[n]},getTrackedSelection:function(t){var n=parseInt(t,10),i=e.model._getTrackedRange(e.trackedRanges[n]);return e.trackedRangesDirection[n]===Be.S.LTR?new Be.L(i.startLineNumber,i.startColumn,i.endLineNumber,i.endColumn):new Be.L(i.endLineNumber,i.endColumn,i.startLineNumber,i.startColumn)}})):a[n]=e.selectionsBefore[n]};for(o=0;oo.identifier.major?i.identifier.major:o.identifier.major).toString()]=!0;for(var a=0;a0&&n--}}return t},e}(),No=n(5439),xo=n(4998),Do=n(8953);function ko(e,t,n,i,o,r){for(var s="
    ",a=i,u=0,l=0,c=t.getCount();l0;)d+=" ",p--;break;case 60:d+="<";break;case 62:d+=">";break;case 38:d+="&";break;case 0:d+="�";break;case 65279:case 8232:d+="�";break;case 13:d+="​";break;default:d+=String.fromCharCode(f)}}if(s+=''+d+"",h>o||a>=o)break}}return s+"
    "}var To=function(e,t,n,i){this.top=0|e,this.left=0|t,this.width=0|n,this.height=0|i},Eo=function(e,t){this.tabSize=e,this.data=t},Ao=function(e,t,n,i,o){this.content=e,this.continuesWithWrappedLine=t,this.minColumn=n,this.maxColumn=i,this.tokens=o},jo=function(){function e(t,n,i,o,r,s,a,u,l){this.minColumn=t,this.maxColumn=n,this.content=i,this.continuesWithWrappedLine=o,this.isBasicASCII=e.isBasicASCII(i,s),this.containsRTL=e.containsRTL(i,this.isBasicASCII,r),this.tokens=a,this.inlineDecorations=u,this.tabSize=l}return e.isBasicASCII=function(e,t){return!t||p.isBasicASCII(e)},e.containsRTL=function(e,t,n){return!(t||!n)&&p.containsRTL(e)},e}(),Oo=function(e,t,n){this.range=e,this.inlineClassName=t,this.type=n},Ro=function(e,t){this.range=e,this.options=t},Po=function(){function e(e,t,n,i,o){this.editorId=e,this.model=t,this.configuration=n,this._linesCollection=i,this._coordinatesConverter=o,this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}return e.prototype._clearCachedModelDecorationsResolver=function(){this._cachedModelDecorationsResolver=null,this._cachedModelDecorationsResolverViewRange=null},e.prototype.dispose=function(){this._decorationsCache=null,this._clearCachedModelDecorationsResolver()},e.prototype.reset=function(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()},e.prototype.onModelDecorationsChanged=function(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()},e.prototype.onLineMappingChanged=function(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()},e.prototype._getOrCreateViewModelDecoration=function(e){var t=e.id,n=this._decorationsCache[t];if(!n){var i=e.range,o=e.options,a=void 0;if(o.isWholeLine){var u=this._coordinatesConverter.convertModelPositionToViewPosition(new r.y(i.startLineNumber,1)),l=this._coordinatesConverter.convertModelPositionToViewPosition(new r.y(i.endLineNumber,this.model.getLineMaxColumn(i.endLineNumber)));a=new s.Q(u.lineNumber,u.column,l.lineNumber,l.column)}else a=this._coordinatesConverter.convertModelRangeToViewRange(i);n=new Ro(a,o),this._decorationsCache[t]=n}return n},e.prototype.getDecorationsViewportData=function(e){var t=!0;return(t=(t=t&&null!==this._cachedModelDecorationsResolver)&&e.equalsRange(this._cachedModelDecorationsResolverViewRange))||(this._cachedModelDecorationsResolver=this._getDecorationsViewportData(e),this._cachedModelDecorationsResolverViewRange=e),this._cachedModelDecorationsResolver},e.prototype._getDecorationsViewportData=function(e){for(var t=this._linesCollection.getDecorationsInRange(e,this.editorId,this.configuration.editor.readOnly),n=e.startLineNumber,i=e.endLineNumber,o=[],r=0,a=[],u=n;u<=i;u++)a[u-n]=[];for(var l=0,c=t.length;l=0&&this.prefixSum.set(i.subarray(0,this.prefixSumValidIndex[0]+1)),!0)},e.prototype.changeValue=function(e,t){return e=(0,zo.jT)(e),t=(0,zo.jT)(t),this.values[e]!==t&&(this.values[e]=t,e-1=n.length)return!1;var o=n.length-e;return t>=o&&(t=o),0!==t&&(this.values=new Uint32Array(n.length-t),this.values.set(n.subarray(0,e),0),this.values.set(n.subarray(e+t),e),this.prefixSum=new Uint32Array(this.values.length),e-1=0&&this.prefixSum.set(i.subarray(0,this.prefixSumValidIndex[0]+1)),!0)},e.prototype.getTotalValue=function(){return 0===this.values.length?0:this._getAccumulatedValue(this.values.length-1)},e.prototype.getAccumulatedValue=function(e){return e<0?0:(e=(0,zo.jT)(e),this._getAccumulatedValue(e))},e.prototype._getAccumulatedValue=function(e){if(e<=this.prefixSumValidIndex[0])return this.prefixSum[e];var t=this.prefixSumValidIndex[0]+1;0===t&&(this.prefixSum[0]=this.values[0],t++),e>=this.values.length&&(e=this.values.length-1);for(var n=t;n<=e;n++)this.prefixSum[n]=this.prefixSum[n-1]+this.values[n];return this.prefixSumValidIndex[0]=Math.max(this.prefixSumValidIndex[0],e),this.prefixSum[e]},e.prototype.getIndexOf=function(e){e=Math.floor(e),this.getTotalValue();for(var t,n,i,o=0,r=this.values.length-1;o<=r;)if(t=o+(r-o)/2|0,e<(i=(n=this.prefixSum[t])-this.values[t]))r=t-1;else{if(!(e>=n))break;o=t+1}return new Wo(t,e-i)},e}(),Bo=function(){function e(e){this._cacheAccumulatedValueStart=0,this._cache=null,this._actual=new Fo(e),this._bustCache()}return e.prototype._bustCache=function(){this._cacheAccumulatedValueStart=0,this._cache=null},e.prototype.insertValues=function(e,t){this._actual.insertValues(e,t)&&this._bustCache()},e.prototype.changeValue=function(e,t){this._actual.changeValue(e,t)&&this._bustCache()},e.prototype.removeValues=function(e,t){this._actual.removeValues(e,t)&&this._bustCache()},e.prototype.getTotalValue=function(){return this._actual.getTotalValue()},e.prototype.getAccumulatedValue=function(e){return this._actual.getAccumulatedValue(e)},e.prototype.getIndexOf=function(e){if(e=Math.floor(e),null!==this._cache){var t=e-this._cacheAccumulatedValueStart;if(t>=0&&t0){switch(l=Math.min(c<=.5?h/(2*c):h/(2-2*c),1),s){case n:u=(i-o)/h+(i1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e},e.toRGBA=function(t){var n,i,o,r=t.h/360,s=t.s,a=t.l,u=t.a;if(0===s)n=i=o=a;else{var l=a<.5?a*(1+s):a+s-a*s,c=2*a-l;n=e._hue2rgb(c,l,r+1/3),i=e._hue2rgb(c,l,r),o=e._hue2rgb(c,l,r-1/3)}return new Uo(Math.round(255*n),Math.round(255*i),Math.round(255*o),u)},e}(),Zo=function(){function e(e,t,n,i){this.h=0|Math.max(Math.min(360,e),0),this.s=Vo(Math.max(Math.min(1,t),0),3),this.v=Vo(Math.max(Math.min(1,n),0),3),this.a=Vo(Math.max(Math.min(1,i),0),3)}return e.equals=function(e,t){return e.h===t.h&&e.s===t.s&&e.v===t.v&&e.a===t.a},e.fromRGBA=function(t){var n,i=t.r/255,o=t.g/255,r=t.b/255,s=Math.max(i,o,r),a=s-Math.min(i,o,r),u=0===s?0:a/s;return n=0===a?0:s===i?((o-r)/a%6+6)%6:s===o?(r-i)/a+2:(i-o)/a+4,new e(Math.round(60*n),u,s,t.a)},e.toRGBA=function(e){var t=e.h,n=e.s,i=e.v,o=e.a,r=i*n,s=r*(1-Math.abs(t/60%2-1)),a=i-r,u=[0,0,0],l=u[0],c=u[1],h=u[2];return t<60?(l=r,c=s):t<120?(l=s,c=r):t<180?(c=r,h=s):t<240?(c=s,h=r):t<300?(l=s,h=r):t<360&&(l=r,h=s),l=Math.round(255*(l+a)),c=Math.round(255*(c+a)),h=Math.round(255*(h+a)),new Uo(l,c,h,o)},e}(),Go=function(){function e(e){if(!e)throw new Error("Color needs a value");if(e instanceof Uo)this.rgba=e;else if(e instanceof Yo)this._hsla=e,this.rgba=Yo.toRGBA(e);else{if(!(e instanceof Zo))throw new Error("Invalid color ctor argument");this._hsva=e,this.rgba=Zo.toRGBA(e)}}return e.fromHex=function(t){return e.Format.CSS.parseHex(t)||e.red},Object.defineProperty(e.prototype,"hsla",{get:function(){return this._hsla?this._hsla:Yo.fromRGBA(this.rgba)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"hsva",{get:function(){return this._hsva?this._hsva:Zo.fromRGBA(this.rgba)},enumerable:!0,configurable:!0}),e.prototype.equals=function(e){return!!e&&Uo.equals(this.rgba,e.rgba)&&Yo.equals(this.hsla,e.hsla)&&Zo.equals(this.hsva,e.hsva)},e.prototype.getRelativeLuminance=function(){return Vo(.2126*e._relativeLuminanceForComponent(this.rgba.r)+.7152*e._relativeLuminanceForComponent(this.rgba.g)+.0722*e._relativeLuminanceForComponent(this.rgba.b),4)},e._relativeLuminanceForComponent=function(e){var t=e/255;return t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4)},e.prototype.isLighter=function(){return(299*this.rgba.r+587*this.rgba.g+114*this.rgba.b)/1e3>=128},e.prototype.isLighterThan=function(e){return this.getRelativeLuminance()>e.getRelativeLuminance()},e.prototype.isDarkerThan=function(e){return this.getRelativeLuminance()=a&&d<=u,p=er(this.linePositionMapperFactory,n[h],this.tabSize,this.wrappingColumn,this.columnsForFullWidthChar,this.wrappingIndent,!f);o[h]=p.getViewLineCount(),this.lines[h]=p}this._validModelVersionId=this.model.getVersionId(),this.prefixSumComputer=new Bo(o)},e.prototype.getHiddenAreas=function(){var e=this;return this.hiddenAreasIds.map((function(t){return e.model.getDecorationRange(t)}))},e.prototype._reduceRanges=function(e){var t=this;if(0===e.length)return[];for(var n=e.map((function(e){return t.model.validateRange(e)})).sort(s.Q.compareRangesUsingStarts),i=[],o=n[0].startLineNumber,r=n[0].endLineNumber,a=1,u=n.length;ar+1?(i.push(new s.Q(o,1,r,1)),o=l.startLineNumber,r=l.endLineNumber):l.endLineNumber>r&&(r=l.endLineNumber)}return i.push(new s.Q(o,1,r,1)),i},e.prototype.setHiddenAreas=function(e){var t=this,n=this._reduceRanges(e),i=this.hiddenAreasIds.map((function(e){return t.model.getDecorationRange(e)})).sort(s.Q.compareRangesUsingStarts);if(n.length===i.length){for(var o=!1,r=0;r=l&&p<=c?this.lines[r].isVisible()&&(this.lines[r]=this.lines[r].setVisible(!1),g=!0):(f=!0,this.lines[r].isVisible()||(this.lines[r]=this.lines[r].setVisible(!0),g=!0)),g){var m=this.lines[r].getViewLineCount();this.prefixSumComputer.changeValue(r,m)}}return f||this.setHiddenAreas([]),!0},e.prototype.modelPositionIsVisible=function(e,t){return!(e<1||e>this.lines.length)&&this.lines[e-1].isVisible()},e.prototype.setTabSize=function(e){return this.tabSize!==e&&(this.tabSize=e,this._constructLines(!1),!0)},e.prototype.setWrappingSettings=function(e,t,n){return(this.wrappingIndent!==e||this.wrappingColumn!==t||this.columnsForFullWidthChar!==n)&&(this.wrappingIndent=e,this.wrappingColumn=t,this.columnsForFullWidthChar=n,this._constructLines(!1),!0)},e.prototype.onModelFlushed=function(){this._constructLines(!0)},e.prototype.onModelLinesDeleted=function(e,t,n){if(e<=this._validModelVersionId)return null;var i=1===t?1:this.prefixSumComputer.getAccumulatedValue(t-2)+1,o=this.prefixSumComputer.getAccumulatedValue(n-1);return this.lines.splice(t-1,n-t+1),this.prefixSumComputer.removeValues(t-1,n-t+1),new lo(i,o)},e.prototype.onModelLinesInserted=function(e,t,n,i){if(e<=this._validModelVersionId)return null;for(var o=this.getHiddenAreas(),s=!1,a=new r.y(t,1),u=0;ua?(p=(f=1+(c=(l=1===t?1:this.prefixSumComputer.getAccumulatedValue(t-2)+1)+a-1))+(o-a)-1,u=!0):ot?t:e},e.prototype.warmUpLookupCache=function(e,t){this.prefixSumComputer.warmUpCache(e-1,t-1)},e.prototype.getActiveIndentGuide=function(e,t,n){this._ensureValidState(),e=this._toValidViewLineNumber(e),t=this._toValidViewLineNumber(t),n=this._toValidViewLineNumber(n);var i=this.convertViewPositionToModelPosition(e,this.getViewLineMinColumn(e)),o=this.convertViewPositionToModelPosition(t,this.getViewLineMinColumn(t)),r=this.convertViewPositionToModelPosition(n,this.getViewLineMinColumn(n)),s=this.model.getActiveIndentGuide(i.lineNumber,o.lineNumber,r.lineNumber),a=this.convertModelPositionToViewPosition(s.startLineNumber,1),u=this.convertModelPositionToViewPosition(s.endLineNumber,1);return{startLineNumber:a.lineNumber,endLineNumber:u.lineNumber,indent:s.indent}},e.prototype.getViewLinesIndentGuides=function(e,t){this._ensureValidState(),e=this._toValidViewLineNumber(e),t=this._toValidViewLineNumber(t);for(var n=this.convertViewPositionToModelPosition(e,this.getViewLineMinColumn(e)),i=this.convertViewPositionToModelPosition(t,this.getViewLineMaxColumn(t)),o=[],s=[],a=[],u=n.lineNumber-1,l=i.lineNumber-1,c=null,h=u;h<=l;h++){var d=this.lines[h];if(d.isVisible()){var f=d.getViewLineNumberOfModelPosition(0,h===u?n.column:1),p=d.getViewLineNumberOfModelPosition(0,this.model.getLineMaxColumn(h+1)),g=0;(C=p-f+1)>1&&1===d.getViewLineMinColumn(this.model,h+1,p)&&(g=0===f?1:2),s.push(C),a.push(g),null===c&&(c=new r.y(h+1,0))}else null!==c&&(o=o.concat(this.model.getLinesIndentGuides(c.lineNumber,h)),c=null)}null!==c&&(o=o.concat(this.model.getLinesIndentGuides(c.lineNumber,i.lineNumber)),c=null);for(var m=t-e+1,v=new Array(m),y=0,b=0,_=o.length;b<_;b++){var w,M=o[b],C=Math.min(m-y,s[b]);w=2===(g=a[b])?0:1===g?1:C;for(var S=0;St&&(f=!0,d=t-o+1);var p=h+d;if(c.getViewLinesData(this.model,u+1,h,p,o-e,n,a),o+=d,f)break}}return a},e.prototype.validateViewPosition=function(e,t,n){this._ensureValidState(),e=this._toValidViewLineNumber(e);var i=this.prefixSumComputer.getIndexOf(e-1),o=i.index,s=i.remainder,a=this.lines[o],u=a.getViewLineMinColumn(this.model,o+1,s),l=a.getViewLineMaxColumn(this.model,o+1,s);tl&&(t=l);var c=a.getModelColumnOfViewPosition(s,t);return this.model.validatePosition(new r.y(o+1,c)).equals(n)?new r.y(e,t):this.convertModelPositionToViewPosition(n.lineNumber,n.column)},e.prototype.convertViewPositionToModelPosition=function(e,t){this._ensureValidState(),e=this._toValidViewLineNumber(e);var n=this.prefixSumComputer.getIndexOf(e-1),i=n.index,o=n.remainder,s=this.lines[i].getModelColumnOfViewPosition(o,t);return this.model.validatePosition(new r.y(i+1,s))},e.prototype.convertModelPositionToViewPosition=function(e,t){this._ensureValidState();for(var n=this.model.validatePosition(new r.y(e,t)),i=n.lineNumber,o=n.column,s=i-1,a=!1;s>0&&!this.lines[s].isVisible();)s--,a=!0;if(0===s&&!this.lines[s].isVisible())return new r.y(1,1);var u=1+(0===s?0:this.prefixSumComputer.getAccumulatedValue(s-1));return a?this.lines[s].getViewPositionOfModelPosition(u,this.model.getLineMaxColumn(s+1)):this.lines[i-1].getViewPositionOfModelPosition(u,o)},e.prototype._getViewLineNumberForModelPosition=function(e,t){var n=e-1;if(this.lines[n].isVisible()){var i=1+(0===n?0:this.prefixSumComputer.getAccumulatedValue(n-1));return this.lines[n].getViewLineNumberOfModelPosition(i,t)}for(;n>0&&!this.lines[n].isVisible();)n--;if(0===n&&!this.lines[n].isVisible())return 1;var o=1+(0===n?0:this.prefixSumComputer.getAccumulatedValue(n-1));return this.lines[n].getViewLineNumberOfModelPosition(o,this.model.getLineMaxColumn(n+1))},e.prototype.getAllOverviewRulerDecorations=function(e,t,n){for(var i=this.model.getOverviewRulerDecorations(e,t),o=new ir,r=0,s=i.length;r0&&(r=this.wrappedIndent+r),r},e.prototype.getViewLineLength=function(e,t,n){if(!this._isVisible)throw new Error("Not supported");var i=this.getInputStartOffsetOfOutputLineIndex(n),o=this.getInputEndOffsetOfOutputLineIndex(e,t,n)-i;return n>0&&(o=this.wrappedIndent.length+o),o},e.prototype.getViewLineMinColumn=function(e,t,n){if(!this._isVisible)throw new Error("Not supported");return n>0?this.wrappedIndentLength+1:1},e.prototype.getViewLineMaxColumn=function(e,t,n){if(!this._isVisible)throw new Error("Not supported");return this.getViewLineContent(e,t,n).length+1},e.prototype.getViewLineData=function(e,t,n){if(!this._isVisible)throw new Error("Not supported");var i=this.getInputStartOffsetOfOutputLineIndex(n),o=this.getInputEndOffsetOfOutputLineIndex(e,t,n),r=e.getValueInRange({startLineNumber:t,startColumn:i+1,endLineNumber:t,endColumn:o+1});n>0&&(r=this.wrappedIndent+r);var s=n>0?this.wrappedIndentLength+1:1,a=r.length+1,u=n+10&&(l=this.wrappedIndentLength);var c=e.getLineTokens(t);return new Ao(r,u,s,a,c.sliceAndInflate(i,o,l))},e.prototype.getViewLinesData=function(e,t,n,i,o,r,s){if(!this._isVisible)throw new Error("Not supported");for(var a=n;a0&&(n0&&(o+=this.wrappedIndentLength),new r.y(e+i,o)},e.prototype.getViewLineNumberOfModelPosition=function(e,t){if(!this._isVisible)throw new Error("Not supported");return e+this.positionMapper.getOutputPositionOfInputOffset(t-1).outputLineIndex},e}();function er(e,t,n,i,o,r,s){var a=e.createLineMapping(t,n,i,o,r);return null===a?s?Jo.INSTANCE:Xo.INSTANCE:new $o(a,s)}var tr=function(){function e(e){this._lines=e}return e.prototype._validPosition=function(e){return this._lines.model.validatePosition(e)},e.prototype._validRange=function(e){return this._lines.model.validateRange(e)},e.prototype.convertViewPositionToModelPosition=function(e){return this._validPosition(e)},e.prototype.convertViewRangeToModelRange=function(e){return this._validRange(e)},e.prototype.validateViewPosition=function(e,t){return this._validPosition(t)},e.prototype.validateViewRange=function(e,t){return this._validRange(t)},e.prototype.convertModelPositionToViewPosition=function(e){return this._validPosition(e)},e.prototype.convertModelRangeToViewRange=function(e){return this._validRange(e)},e.prototype.modelPositionIsVisible=function(e){var t=this._lines.model.getLineCount();return!(e.lineNumber<1||e.lineNumber>t)},e}(),nr=function(){function e(e){this.model=e}return e.prototype.dispose=function(){},e.prototype.createCoordinatesConverter=function(){return new tr(this)},e.prototype.getHiddenAreas=function(){return[]},e.prototype.setHiddenAreas=function(e){return!1},e.prototype.setTabSize=function(e){return!1},e.prototype.setWrappingSettings=function(e,t,n){return!1},e.prototype.onModelFlushed=function(){},e.prototype.onModelLinesDeleted=function(e,t,n){return new lo(t,n)},e.prototype.onModelLinesInserted=function(e,t,n,i){return new co(t,n)},e.prototype.onModelLineChanged=function(e,t,n){return[!1,new uo(t,t),null,null]},e.prototype.acceptVersionId=function(e){},e.prototype.getViewLineCount=function(){return this.model.getLineCount()},e.prototype.warmUpLookupCache=function(e,t){},e.prototype.getActiveIndentGuide=function(e,t,n){return{startLineNumber:e,endLineNumber:e,indent:0}},e.prototype.getViewLinesIndentGuides=function(e,t){for(var n=t-e+1,i=new Array(n),o=0;o=t)return void(n>s&&(o[o.length-1]=n));o.push(i,t,n)}else this.result[e]=[i,t,n]},e}();function or(e,t){if(!e._resolvedColor){var n=t.type,i="dark"===n?e.darkColor:"light"===n?e.color:e.hcColor;e._resolvedColor=function(e,t){if("string"==typeof e)return e;var n=e?t.getColor(e.id):null;return n||(n=Go.transparent),n.toString()}(i,t)}return e._resolvedColor}var rr,sr,ar=function(){function e(t,n,i,o){this.r=e._clamp(t),this.g=e._clamp(n),this.b=e._clamp(i),this.a=e._clamp(o)}return e._clamp=function(e){return e<0?0:e>255?255:0|e},e}(),ur=function(){function e(){var e=this;this._onDidChange=new X.vl,this.onDidChange=this._onDidChange.event,this._updateColorMap(),No.dG.onDidChange((function(t){t.changedColorMap&&e._updateColorMap()}))}return e.getInstance=function(){return this._INSTANCE||(this._INSTANCE=new e),this._INSTANCE},e.prototype._updateColorMap=function(){var e=No.dG.getColorMap();if(!e)return this._colors=[null],void(this._backgroundIsLight=!0);this._colors=[null];for(var t=1;t=.5,this._onDidChange.fire(void 0)},e.prototype.getColor=function(e){return(e<1||e>=this._colors.length)&&(e=2),this._colors[e]},e.prototype.backgroundIsLight=function(){return this._backgroundIsLight},e._INSTANCE=null,e}(),lr=function(){function e(t,n){if(760!==t.length)throw new Error("Invalid x2CharData");if(190!==n.length)throw new Error("Invalid x1CharData");this.x2charData=t,this.x1charData=n,this.x2charDataLight=e.soften(t,.8),this.x1charDataLight=e.soften(n,50/60)}return e.soften=function(e,t){for(var n=new Uint8ClampedArray(e.length),i=0,o=e.length;it.width||i+4>t.height)console.warn("bad render request outside image data");else{var u=a?this.x2charDataLight:this.x2charData,l=e._getChIndex(o),c=4*t.width,h=s.r,d=s.g,f=s.b,p=r.r-h,g=r.g-d,m=r.b-f,v=t.data,y=4*l*2,b=i*c+4*n,_=u[y]/255;v[b+0]=h+p*_,v[b+1]=d+g*_,v[b+2]=f+m*_,_=u[y+1]/255,v[b+4]=h+p*_,v[b+5]=d+g*_,v[b+6]=f+m*_,b+=c,_=u[y+2]/255,v[b+0]=h+p*_,v[b+1]=d+g*_,v[b+2]=f+m*_,_=u[y+3]/255,v[b+4]=h+p*_,v[b+5]=d+g*_,v[b+6]=f+m*_,b+=c,_=u[y+4]/255,v[b+0]=h+p*_,v[b+1]=d+g*_,v[b+2]=f+m*_,_=u[y+5]/255,v[b+4]=h+p*_,v[b+5]=d+g*_,v[b+6]=f+m*_,b+=c,_=u[y+6]/255,v[b+0]=h+p*_,v[b+1]=d+g*_,v[b+2]=f+m*_,_=u[y+7]/255,v[b+4]=h+p*_,v[b+5]=d+g*_,v[b+6]=f+m*_}},e.prototype.x1RenderChar=function(t,n,i,o,r,s,a){if(n+1>t.width||i+2>t.height)console.warn("bad render request outside image data");else{var u=a?this.x1charDataLight:this.x1charData,l=e._getChIndex(o),c=4*t.width,h=s.r,d=s.g,f=s.b,p=r.r-h,g=r.g-d,m=r.b-f,v=t.data,y=2*l*1,b=i*c+4*n,_=u[y]/255;v[b+0]=h+p*_,v[b+1]=d+g*_,v[b+2]=f+m*_,b+=c,_=u[y+1]/255,v[b+0]=h+p*_,v[b+1]=d+g*_,v[b+2]=f+m*_}},e.prototype.x2BlockRenderChar=function(e,t,n,i,o,r){if(t+2>e.width||n+4>e.height)console.warn("bad render request outside image data");else{var s=4*e.width,a=o.r,u=o.g,l=o.b,c=a+.5*(i.r-a),h=u+.5*(i.g-u),d=l+.5*(i.b-l),f=e.data,p=n*s+4*t;f[p+0]=c,f[p+1]=h,f[p+2]=d,f[p+4]=c,f[p+5]=h,f[p+6]=d,f[(p+=s)+0]=c,f[p+1]=h,f[p+2]=d,f[p+4]=c,f[p+5]=h,f[p+6]=d,f[(p+=s)+0]=c,f[p+1]=h,f[p+2]=d,f[p+4]=c,f[p+5]=h,f[p+6]=d,f[(p+=s)+0]=c,f[p+1]=h,f[p+2]=d,f[p+4]=c,f[p+5]=h,f[p+6]=d}},e.prototype.x1BlockRenderChar=function(e,t,n,i,o,r){if(t+1>e.width||n+2>e.height)console.warn("bad render request outside image data");else{var s=4*e.width,a=o.r,u=o.g,l=o.b,c=a+.5*(i.r-a),h=u+.5*(i.g-u),d=l+.5*(i.b-l),f=e.data,p=n*s+4*t;f[p+0]=c,f[p+1]=h,f[p+2]=d,f[(p+=s)+0]=c,f[p+1]=h,f[p+2]=d}},e}(),cr=n(2879),hr=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),dr=function(e){function t(t,n,i){for(var o=e.call(this,0)||this,r=0;r=12352&&t<=12543||t>=13312&&t<=19903||t>=19968&&t<=40959?4:e.prototype.get.call(this,t)},t}(cr.V),fr=function(){function e(e,t,n){this.classifier=new dr(e,t,n)}return e.nextVisibleColumn=function(e,t,n,i){return e=+e,t=+t,i=+i,n?e+(t-e%t):e+i},e.prototype.createLineMapping=function(t,n,i,o,r){if(-1===i)return null;n=+n,i=+i,o=+o;var s=0,a="",u=-1;if((r=+r)!==Li.tJ.None&&-1!==(u=p.firstNonWhitespaceIndex(t))){a=t.substring(0,u);for(var l=0;li&&(a="",s=0)}var h=this.classifier,d=0,f=[],g=0,m=0,v=-1,y=0,b=-1,_=0,w=t.length;for(l=0;l0){var L=t.charCodeAt(l-1);1!==h.get(L)&&(v=l,y=s)}var I=1;if(p.isFullWidthCharacter(M)&&(I=o),(m=e.nextVisibleColumn(m,n,C,I))>i&&0!==l){var N=void 0,x=void 0;-1!==v&&y<=i?(N=v,x=y):-1!==b&&_<=i?(N=b,x=_):(N=l,x=s),f[g++]=N-d,d=N,m=e.nextVisibleColumn(x,n,C,I),v=-1,y=0,b=-1,_=0}if(-1!==v&&(y=e.nextVisibleColumn(y,n,C,I)),-1!==b&&(_=e.nextVisibleColumn(_,n,C,I)),2===S&&(r===Li.tJ.None||l>=u)&&(v=l+1,y=s),4===S&&l>>1;t===e[s]?i=t&&(this._whitespaceId2Index[l]=c+1)}this._whitespaceId2Index[e.toString()]=t,this._prefixSumValidIndex=Math.min(this._prefixSumValidIndex,t-1)},e.prototype.changeWhitespace=function(e,t,n){e|=0,t|=0,n|=0;var i=!1;return i=this.changeWhitespaceHeight(e,n)||i,this.changeWhitespaceAfterLineNumber(e,t)||i},e.prototype.changeWhitespaceHeight=function(e,t){t|=0;var n=(e|=0).toString();if(this._whitespaceId2Index.hasOwnProperty(n)){var i=this._whitespaceId2Index[n];if(this._heights[i]!==t)return this._heights[i]=t,this._prefixSumValidIndex=Math.min(this._prefixSumValidIndex,i-1),!0}return!1},e.prototype.changeWhitespaceAfterLineNumber=function(t,n){n|=0;var i=(t|=0).toString();if(this._whitespaceId2Index.hasOwnProperty(i)){var o=this._whitespaceId2Index[i];if(this._afterLineNumbers[o]!==n){var r=this._ordinals[o],s=this._heights[o],a=this._minWidths[o];this.removeWhitespace(t);var u=e.findInsertionIndex(this._afterLineNumbers,n,this._ordinals,r);return this._insertWhitespaceAtIndex(t,u,n,r,s,a),!0}}return!1},e.prototype.removeWhitespace=function(e){var t=(e|=0).toString();if(this._whitespaceId2Index.hasOwnProperty(t)){var n=this._whitespaceId2Index[t];return delete this._whitespaceId2Index[t],this._removeWhitespaceAtIndex(n),this._minWidth=-1,!0}return!1},e.prototype._removeWhitespaceAtIndex=function(e){e|=0,this._heights.splice(e,1),this._minWidths.splice(e,1),this._ids.splice(e,1),this._afterLineNumbers.splice(e,1),this._ordinals.splice(e,1),this._prefixSum.splice(e,1),this._prefixSumValidIndex=Math.min(this._prefixSumValidIndex,e-1);for(var t=Object.keys(this._whitespaceId2Index),n=0,i=t.length;n=e&&(this._whitespaceId2Index[o]=r-1)}},e.prototype.onLinesDeleted=function(e,t){e|=0,t|=0;for(var n=0,i=this._afterLineNumbers.length;nt&&(this._afterLineNumbers[n]-=t-e+1)}},e.prototype.onLinesInserted=function(e,t){e|=0,t|=0;for(var n=0,i=this._afterLineNumbers.length;n=t.length||t[o+1]>=e)return o;n=o+1|0}else i=o-1|0}return-1},e.prototype._findFirstWhitespaceAfterLineNumber=function(e){e|=0;var t=this._findLastWhitespaceBeforeLineNumber(e)+1;return t1?this._lineHeight*(e-1):0)+this._whitespaces.getAccumulatedHeightBeforeLineNumber(e)},e.prototype.getWhitespaceAccumulatedHeightBeforeLineNumber=function(e){return this._whitespaces.getAccumulatedHeightBeforeLineNumber(e)},e.prototype.getWhitespaceMinWidth=function(){return this._whitespaces.getMinWidth()},e.prototype.isAfterLines=function(e){return e>this.getLinesTotalHeight()},e.prototype.getLineNumberAtOrAfterVerticalOffset=function(e){if((e|=0)<0)return 1;for(var t=0|this._lineCount,n=this._lineHeight,i=1,o=t;i=s+n)i=r+1;else{if(e>=s)return r;o=r}}return i>t?t:i},e.prototype.getLinesViewportData=function(e,t){e|=0,t|=0;var n,i,o=this._lineHeight,r=0|this.getLineNumberAtOrAfterVerticalOffset(e),s=0|this.getVerticalOffsetForLineNumber(r),a=0|this._lineCount,u=0|this._whitespaces.getFirstWhitespaceIndexAfterLineNumber(r),l=0|this._whitespaces.getCount();-1===u?(u=l,i=a+1,n=0):(i=0|this._whitespaces.getAfterLineNumberForWhitespaceIndex(u),n=0|this._whitespaces.getHeightForWhitespaceIndex(u));var c=s,h=c,d=5e5,f=0;s>=d&&(f=Math.floor(s/d)*d,h-=f=Math.floor(f/o)*o);for(var p=[],g=e+(t-e)/2,m=-1,v=r;v<=a;v++){for(-1===m&&(c<=g&&gg)&&(m=v),c+=o,p[v-r]=h,h+=o;i===v;)h+=n,c+=n,++u>=l?i=a+1:(i=0|this._whitespaces.getAfterLineNumberForWhitespaceIndex(u),n=0|this._whitespaces.getHeightForWhitespaceIndex(u));if(c>=t){a=v;break}}-1===m&&(m=a);var y=0|this.getVerticalOffsetForLineNumber(a),b=r,_=a;return b<_&&st&&_--,{bigNumbersDelta:f,startLineNumber:r,endLineNumber:a,relativeVerticalOffset:p,centeredLineNumber:m,completelyVisibleStartLineNumber:b,completelyVisibleEndLineNumber:_}},e.prototype.getVerticalOffsetForWhitespaceIndex=function(e){e|=0;var t=this._whitespaces.getAfterLineNumberForWhitespaceIndex(e);return(t>=1?this._lineHeight*t:0)+(e>0?this._whitespaces.getAccumulatedHeight(e-1):0)},e.prototype.getWhitespaceIndexAtOrAfterVerticallOffset=function(e){e|=0;var t,n,i=0,o=this._whitespaces.getCount()-1;if(o<0)return-1;if(e>=this.getVerticalOffsetForWhitespaceIndex(o)+this._whitespaces.getHeightForWhitespaceIndex(o))return-1;for(;i=(n=this.getVerticalOffsetForWhitespaceIndex(t))+this._whitespaces.getHeightForWhitespaceIndex(t))i=t+1;else{if(e>=n)return t;o=t}return i},e.prototype.getWhitespaceAtVerticalOffset=function(e){e|=0;var t=this.getWhitespaceIndexAtOrAfterVerticallOffset(e);if(t<0)return null;if(t>=this._whitespaces.getCount())return null;var n=this.getVerticalOffsetForWhitespaceIndex(t);if(n>e)return null;var i=this._whitespaces.getHeightForWhitespaceIndex(t);return{id:this._whitespaces.getIdForWhitespaceIndex(t),afterLineNumber:this._whitespaces.getAfterLineNumberForWhitespaceIndex(t),verticalOffset:n,height:i}},e.prototype.getWhitespaceViewportData=function(e,t){e|=0,t|=0;var n=this.getWhitespaceIndexAtOrAfterVerticallOffset(e),i=this._whitespaces.getCount()-1;if(n<0)return[];for(var o=[],r=n;r<=i;r++){var s=this.getVerticalOffsetForWhitespaceIndex(r),a=this._whitespaces.getHeightForWhitespaceIndex(r);if(s>=t)break;o.push({id:this._whitespaces.getIdForWhitespaceIndex(r),afterLineNumber:this._whitespaces.getAfterLineNumberForWhitespaceIndex(r),verticalOffset:s,height:a})}return o},e.prototype.getWhitespaces=function(){return this._whitespaces.getWhitespaces(this._lineHeight)},e}(),yr=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),br=function(e){function t(t,n,i){var o=e.call(this)||this;return o._configuration=t,o._linesLayout=new vr(n,o._configuration.editor.lineHeight),o.scrollable=o._register(new gr.yE(0,i)),o._configureSmoothScrollDuration(),o.scrollable.setScrollDimensions({width:t.editor.layoutInfo.contentWidth,height:t.editor.layoutInfo.contentHeight}),o.onDidScroll=o.scrollable.onScroll,o._updateHeight(),o}return yr(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this)},t.prototype.onHeightMaybeChanged=function(){this._updateHeight()},t.prototype._configureSmoothScrollDuration=function(){this.scrollable.setSmoothScrollDuration(this._configuration.editor.viewInfo.smoothScrolling?125:0)},t.prototype.onConfigurationChanged=function(e){e.lineHeight&&this._linesLayout.setLineHeight(this._configuration.editor.lineHeight),e.layoutInfo&&this.scrollable.setScrollDimensions({width:this._configuration.editor.layoutInfo.contentWidth,height:this._configuration.editor.layoutInfo.contentHeight}),e.viewInfo&&this._configureSmoothScrollDuration(),this._updateHeight()},t.prototype.onFlushed=function(e){this._linesLayout.onFlushed(e)},t.prototype.onLinesDeleted=function(e,t){this._linesLayout.onLinesDeleted(e,t)},t.prototype.onLinesInserted=function(e,t){this._linesLayout.onLinesInserted(e,t)},t.prototype._getHorizontalScrollbarHeight=function(e){return this._configuration.editor.viewInfo.scrollbar.horizontal===gr.XR.Hidden||e.width>=e.scrollWidth?0:this._configuration.editor.viewInfo.scrollbar.horizontalScrollbarSize},t.prototype._getTotalHeight=function(){var e=this.scrollable.getScrollDimensions(),t=this._linesLayout.getLinesTotalHeight();return this._configuration.editor.viewInfo.scrollBeyondLastLine?t+=e.height-this._configuration.editor.lineHeight:t+=this._getHorizontalScrollbarHeight(e),Math.max(e.height,t)},t.prototype._updateHeight=function(){this.scrollable.setScrollDimensions({scrollHeight:this._getTotalHeight()})},t.prototype.getCurrentViewport=function(){var e=this.scrollable.getScrollDimensions(),t=this.scrollable.getCurrentScrollPosition();return new To(t.scrollTop,t.scrollLeft,e.width,e.height)},t.prototype.getFutureViewport=function(){var e=this.scrollable.getScrollDimensions(),t=this.scrollable.getFutureScrollPosition();return new To(t.scrollTop,t.scrollLeft,e.width,e.height)},t.prototype._computeScrollWidth=function(e,t){if(!this._configuration.editor.wrappingInfo.isViewportWrapping){var n=this._configuration.editor.viewInfo.scrollBeyondLastColumn*this._configuration.editor.fontInfo.typicalHalfwidthCharacterWidth,i=this._linesLayout.getWhitespaceMinWidth();return Math.max(e+n,t,i)}return Math.max(e,t)},t.prototype.onMaxLineWidthChanged=function(e){var t=this._computeScrollWidth(e,this.getCurrentViewport().width);this.scrollable.setScrollDimensions({scrollWidth:t}),this._updateHeight()},t.prototype.saveState=function(){var e=this.scrollable.getFutureScrollPosition(),t=e.scrollTop,n=this._linesLayout.getLineNumberAtOrAfterVerticalOffset(t);return{scrollTop:t,scrollTopWithoutViewZones:t-this._linesLayout.getWhitespaceAccumulatedHeightBeforeLineNumber(n),scrollLeft:e.scrollLeft}},t.prototype.addWhitespace=function(e,t,n,i){return this._linesLayout.insertWhitespace(e,t,n,i)},t.prototype.changeWhitespace=function(e,t,n){return this._linesLayout.changeWhitespace(e,t,n)},t.prototype.removeWhitespace=function(e){return this._linesLayout.removeWhitespace(e)},t.prototype.getVerticalOffsetForLineNumber=function(e){return this._linesLayout.getVerticalOffsetForLineNumber(e)},t.prototype.isAfterLines=function(e){return this._linesLayout.isAfterLines(e)},t.prototype.getLineNumberAtVerticalOffset=function(e){return this._linesLayout.getLineNumberAtOrAfterVerticalOffset(e)},t.prototype.getWhitespaceAtVerticalOffset=function(e){return this._linesLayout.getWhitespaceAtVerticalOffset(e)},t.prototype.getLinesViewportData=function(){var e=this.getCurrentViewport();return this._linesLayout.getLinesViewportData(e.top,e.top+e.height)},t.prototype.getLinesViewportDataAtScrollTop=function(e){var t=this.scrollable.getScrollDimensions();return e+t.height>t.scrollHeight&&(e=t.scrollHeight-t.height),e<0&&(e=0),this._linesLayout.getLinesViewportData(e,e+t.height)},t.prototype.getWhitespaceViewportData=function(){var e=this.getCurrentViewport();return this._linesLayout.getWhitespaceViewportData(e.top,e.top+e.height)},t.prototype.getWhitespaces=function(){return this._linesLayout.getWhitespaces()},t.prototype.getScrollWidth=function(){return this.scrollable.getScrollDimensions().scrollWidth},t.prototype.getScrollHeight=function(){return this.scrollable.getScrollDimensions().scrollHeight},t.prototype.getCurrentScrollLeft=function(){return this.scrollable.getCurrentScrollPosition().scrollLeft},t.prototype.getCurrentScrollTop=function(){return this.scrollable.getCurrentScrollPosition().scrollTop},t.prototype.validateScrollPosition=function(e){return this.scrollable.validateScrollPosition(e)},t.prototype.setScrollPositionNow=function(e){this.scrollable.setScrollPositionNow(e)},t.prototype.setScrollPositionSmooth=function(e){this.scrollable.setScrollPositionSmooth(e)},t.prototype.deltaScrollNow=function(e,t){var n=this.scrollable.getCurrentScrollPosition();this.scrollable.setScrollPositionNow({scrollLeft:n.scrollLeft+e,scrollTop:n.scrollTop+t})},t}(I.jG),_r=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),wr=function(e){function t(t,n,i,o){var r=e.call(this)||this;if(r.editorId=t,r.configuration=n,r.model=i,r.hasFocus=!1,r.viewportStartLine=-1,r.viewportStartLineTrackedRange=null,r.viewportStartLineTop=0,r.model.isTooLargeForTokenization())r.lines=new nr(r.model);else{var s=r.configuration.editor,a=new fr(s.wrappingInfo.wordWrapBreakBeforeCharacters,s.wrappingInfo.wordWrapBreakAfterCharacters,s.wrappingInfo.wordWrapBreakObtrusiveCharacters);r.lines=new Ko(r.model,a,r.model.getOptions().tabSize,s.wrappingInfo.wrappingColumn,s.fontInfo.typicalFullwidthCharacterWidth/s.fontInfo.typicalHalfwidthCharacterWidth,s.wrappingInfo.wrappingIndent)}return r.coordinatesConverter=r.lines.createCoordinatesConverter(),r.viewLayout=r._register(new br(r.configuration,r.getLineCount(),o)),r._register(r.viewLayout.onDidScroll((function(e){try{r._beginEmit().emit(new fo(e))}finally{r._endEmit()}}))),r.decorations=new Po(r.editorId,r.model,r.configuration,r.lines,r.coordinatesConverter),r._registerModelEvents(),r._register(r.configuration.onDidChange((function(e){try{var t=r._beginEmit();r._onConfigurationChanged(t,e)}finally{r._endEmit()}}))),r._register(ur.getInstance().onDidChange((function(){try{r._beginEmit().emit(new mo)}finally{r._endEmit()}}))),r}return _r(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this),this.decorations.dispose(),this.lines.dispose(),this.viewportStartLineTrackedRange=this.model._setTrackedRange(this.viewportStartLineTrackedRange,null,Xi.kK.NeverGrowsWhenTypingAtEdges)},t.prototype.setHasFocus=function(e){this.hasFocus=e},t.prototype._onConfigurationChanged=function(e,t){var n=null;if(-1!==this.viewportStartLine){var i=new r.y(this.viewportStartLine,this.getLineMinColumn(this.viewportStartLine));n=this.coordinatesConverter.convertViewPositionToModelPosition(i)}var o=!1,s=this.configuration.editor;if(this.lines.setWrappingSettings(s.wrappingInfo.wrappingIndent,s.wrappingInfo.wrappingColumn,s.fontInfo.typicalFullwidthCharacterWidth/s.fontInfo.typicalHalfwidthCharacterWidth)&&(e.emit(new ro),e.emit(new ao),e.emit(new oo),this.decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount()),0!==this.viewLayout.getCurrentScrollTop()&&(o=!0)),t.readOnly&&(this.decorations.reset(),e.emit(new oo)),e.emit(new no(t)),this.viewLayout.onConfigurationChanged(t),o&&n){var a=this.coordinatesConverter.convertModelPositionToViewPosition(n),u=this.viewLayout.getVerticalOffsetForLineNumber(a.lineNumber);this.viewLayout.deltaScrollNow(0,u-this.viewportStartLineTop)}},t.prototype._registerModelEvents=function(){var e=this;this._register(this.model.onDidChangeRawContentFast((function(t){try{for(var n=e._beginEmit(),i=!1,o=!1,r=t.changes,s=t.versionId,a=0,u=r.length;a=2&&e.viewportStartLineTrackedRange){var g=e.model._getTrackedRange(e.viewportStartLineTrackedRange);if(g){var m=e.coordinatesConverter.convertModelPositionToViewPosition(g.getStartPosition()),v=e.viewLayout.getVerticalOffsetForLineNumber(m.lineNumber);e.viewLayout.deltaScrollNow(0,v-e.viewportStartLineTop)}}}))),this._register(this.model.onDidChangeTokens((function(t){for(var n=[],i=0,o=t.ranges.length;iu||(r0&&u[c-1]===u[c]||(l+=this.model.getLineContent(u[c])+o);return l}var h=[];for(c=0;c'+this._getHTMLToCopy(n,r)+""},t.prototype._getHTMLToCopy=function(e,t){for(var n=e.startLineNumber,i=e.startColumn,o=e.endLineNumber,r=e.endColumn,s=this.getTabSize(),a="",u=n;u<=o;u++){var l=this.model.getLineTokens(u),c=l.getLineContent(),h=u===n?i-1:0,d=u===o?r-1:c.length;a+=""===c?"
    ":ko(c,l.inflate(),t,h,d,s)}return a},t.prototype._getColorMap=function(){for(var e=No.dG.getColorMap(),t=[null],n=1,i=e.length;n, selectionStart: "+this.selectionStart+", selectionEnd: "+this.selectionEnd+"]"},e.readFromTextArea=function(t){return new e(t.getValue(),t.getSelectionStart(),t.getSelectionEnd(),null,null)},e.prototype.collapseSelection=function(){return new e(this.value,this.value.length,this.value.length,null,null)},e.prototype.writeToTextArea=function(e,t,n){t.setValue(e,this.value),n&&t.setSelectionRange(e,this.selectionStart,this.selectionEnd)},e.prototype.deduceEditorPosition=function(e){if(e<=this.selectionStart){var t=this.value.substring(e,this.selectionStart);return this._finishDeduceEditorPosition(this.selectionStartPosition,t,-1)}if(e>=this.selectionEnd)return t=this.value.substring(this.selectionEnd,e),this._finishDeduceEditorPosition(this.selectionEndPosition,t,1);var n=this.value.substring(this.selectionStart,e);if(-1===n.indexOf(String.fromCharCode(8230)))return this._finishDeduceEditorPosition(this.selectionStartPosition,n,1);var i=this.value.substring(e,this.selectionEnd);return this._finishDeduceEditorPosition(this.selectionEndPosition,i,-1)},e.prototype._finishDeduceEditorPosition=function(e,t,n){for(var i=0,o=-1;-1!==(o=t.indexOf("\n",o+1));)i++;return[e,n*t.length,i]},e.selectedText=function(t){return new e(t,0,t.length,null,null)},e.deduceInput=function(e,t,n,i){if(!e)return{text:"",replaceCharCnt:0};var o=e.value,r=e.selectionStart,s=e.selectionEnd,a=t.value,u=t.selectionStart,l=t.selectionEnd;i&&o.length>0&&r===s&&u===l&&!p.startsWith(a,o)&&p.endsWith(a,o)&&(r=0,s=0);var c=o.substring(s),h=a.substring(l),d=p.commonSuffixLength(c,h);a=a.substring(0,a.length-d);var f=(o=o.substring(0,o.length-d)).substring(0,r),g=a.substring(0,u),m=p.commonPrefixLength(f,g);if(a=a.substring(m),o=o.substring(m),u-=m,r-=m,l-=m,s-=m,n&&u===l&&o.length>0){var v=null;if(u===a.length?p.startsWith(a,o)&&(v=a.substring(o.length)):p.endsWith(a,o)&&(v=a.substring(0,a.length-o.length)),null!==v&&v.length>0&&(/\uFE0F/.test(v)||p.containsEmoji(v)))return{text:v,replaceCharCnt:0}}return u===l?o===a&&0===r&&s===o.length&&u===a.length&&-1===a.indexOf("\n")&&p.containsFullWidthCharacter(a)?{text:"",replaceCharCnt:0}:{text:a,replaceCharCnt:f.length-m}:{text:a,replaceCharCnt:s-r}},e.EMPTY=new e("",0,0,null,null),e}()),Pr=function(){function e(){}return e._getPageOfLine=function(t){return Math.floor((t-1)/e._LINES_PER_PAGE)},e._getRangeForPage=function(t){var n=t*e._LINES_PER_PAGE,i=n+1,o=n+e._LINES_PER_PAGE;return new s.Q(i,1,o+1,1)},e.fromEditorSelection=function(t,n,i,o){var a=e._getPageOfLine(i.startLineNumber),u=e._getRangeForPage(a),l=e._getPageOfLine(i.endLineNumber),c=e._getRangeForPage(l),h=u.intersectRanges(new s.Q(1,1,i.startLineNumber,i.startColumn)),d=n.getValueInRange(h,Xi.kf.LF),f=n.getLineCount(),p=n.getLineMaxColumn(f),g=c.intersectRanges(new s.Q(i.endLineNumber,i.endColumn,f,p)),m=n.getValueInRange(g,Xi.kf.LF),v=null;if(a===l||a+1===l)v=n.getValueInRange(i,Xi.kf.LF);else{var y=u.intersectRanges(i),b=c.intersectRanges(i);v=n.getValueInRange(y,Xi.kf.LF)+String.fromCharCode(8230)+n.getValueInRange(b,Xi.kf.LF)}if(o){var _=500;d.length>_&&(d=d.substring(d.length-_,d.length)),m.length>_&&(m=m.substring(0,_)),v.length>1e3&&(v=v.substring(0,_)+String.fromCharCode(8230)+v.substring(v.length-_,v.length))}return new Rr(d+v+m,d.length,d.length+v.length,new r.y(i.startLineNumber,i.startColumn),new r.y(i.endLineNumber,i.endColumn))},e._LINES_PER_PAGE=10,e}(),zr=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Wr={forceCopyWithSyntaxHighlighting:!1},Fr=function(e){function t(t,n){var i=e.call(this)||this;i._onFocus=i._register(new X.vl),i.onFocus=i._onFocus.event,i._onBlur=i._register(new X.vl),i.onBlur=i._onBlur.event,i._onKeyDown=i._register(new X.vl),i.onKeyDown=i._onKeyDown.event,i._onKeyUp=i._register(new X.vl),i.onKeyUp=i._onKeyUp.event,i._onCut=i._register(new X.vl),i.onCut=i._onCut.event,i._onPaste=i._register(new X.vl),i.onPaste=i._onPaste.event,i._onType=i._register(new X.vl),i.onType=i._onType.event,i._onCompositionStart=i._register(new X.vl),i.onCompositionStart=i._onCompositionStart.event,i._onCompositionUpdate=i._register(new X.vl),i.onCompositionUpdate=i._onCompositionUpdate.event,i._onCompositionEnd=i._register(new X.vl),i.onCompositionEnd=i._onCompositionEnd.event,i._onSelectionChangeRequest=i._register(new X.vl),i.onSelectionChangeRequest=i._onSelectionChangeRequest.event,i._host=t,i._textArea=i._register(new Hr(n)),i._lastTextAreaEvent=0,i._asyncTriggerCut=i._register(new Ct((function(){return i._onCut.fire()}),0)),i._textAreaState=Rr.EMPTY,i.writeScreenReaderContent("ctor"),i._hasFocus=!1,i._isDoingComposition=!1,i._nextCommand=0,i._register(hn(n.domNode,"keydown",(function(e){!i._isDoingComposition||109!==e.keyCode&&1!==e.keyCode||e.stopPropagation(),e.equals(9)&&e.preventDefault(),i._onKeyDown.fire(e)}))),i._register(hn(n.domNode,"keyup",(function(e){i._onKeyUp.fire(e)}))),i._register(cn(n.domNode,"compositionstart",(function(e){i._lastTextAreaEvent=1,i._isDoingComposition||(i._isDoingComposition=!0,kt||i._setAndWriteTextAreaState("compositionstart",Rr.EMPTY),i._onCompositionStart.fire())})));var o=function(e,t){var n=i._textAreaState,o=Rr.readFromTextArea(i._textArea);return[o,Rr.deduceInput(n,o,e,t)]},r=function(e){var t=i._textAreaState,n=Rr.selectedText(e);return[n,{text:n.value,replaceCharCnt:t.selectionEnd-t.selectionStart}]},s=function(e){return!(!kt||"ja"!==e)||!(!xt||0!==e.indexOf("zh-Han"))};i._register(cn(n.domNode,"compositionupdate",(function(e){if(i._lastTextAreaEvent=2,s(e.locale)){var t=o(!1,!1),n=t[0],a=t[1];return i._textAreaState=n,i._onType.fire(a),void i._onCompositionUpdate.fire(e)}var u=r(e.data),l=u[0],c=u[1];i._textAreaState=l,i._onType.fire(c),i._onCompositionUpdate.fire(e)}))),i._register(cn(n.domNode,"compositionend",(function(e){if(i._lastTextAreaEvent=3,s(e.locale)){var t=o(!1,!1),n=t[0],a=t[1];i._textAreaState=n,i._onType.fire(a)}else{var u=r(e.data);n=u[0],a=u[1],i._textAreaState=n,i._onType.fire(a)}(kt||At)&&(i._textAreaState=Rr.readFromTextArea(i._textArea)),i._isDoingComposition&&(i._isDoingComposition=!1,i._onCompositionEnd.fire())}))),i._register(cn(n.domNode,"input",(function(){var e=8===i._lastTextAreaEvent;if(i._lastTextAreaEvent=4,i._textArea.setIgnoreSelectionChangeTime("received input event"),!i._isDoingComposition){var t=o(B.zx,e&&B.zx),n=t[0],r=t[1];0===r.replaceCharCnt&&1===r.text.length&&p.isHighSurrogate(r.text.charCodeAt(0))||(i._textAreaState=n,0===i._nextCommand?""!==r.text&&i._onType.fire(r):(""!==r.text&&i._onPaste.fire({text:r.text}),i._nextCommand=0))}}))),i._register(cn(n.domNode,"cut",(function(e){i._lastTextAreaEvent=5,i._textArea.setIgnoreSelectionChangeTime("received cut event"),i._ensureClipboardGetsEditorSelection(e),i._asyncTriggerCut.schedule()}))),i._register(cn(n.domNode,"copy",(function(e){i._lastTextAreaEvent=6,i._ensureClipboardGetsEditorSelection(e)}))),i._register(cn(n.domNode,"paste",(function(e){if(i._lastTextAreaEvent=7,i._textArea.setIgnoreSelectionChangeTime("received paste event"),Br.canUseTextData(e)){var t=Br.getTextData(e);""!==t&&i._onPaste.fire({text:t})}else i._textArea.getSelectionStart()!==i._textArea.getSelectionEnd()&&i._setAndWriteTextAreaState("paste",Rr.EMPTY),i._nextCommand=1}))),i._register(cn(n.domNode,"focus",(function(){i._lastTextAreaEvent=8,i._setHasFocus(!0)}))),i._register(cn(n.domNode,"blur",(function(){i._lastTextAreaEvent=9,i._setHasFocus(!1)})));var a=0;return i._register(cn(document,"selectionchange",(function(e){if(i._hasFocus&&!i._isDoingComposition&&At&&B.uF){var t=Date.now(),n=t-a;if(a=t,!(n<5)){var o=t-i._textArea.getIgnoreSelectionChangeTime();if(i._textArea.resetSelectionChangeTime(),!(o<100)&&i._textAreaState.selectionStartPosition&&i._textAreaState.selectionEndPosition){var r=i._textArea.getValue();if(i._textAreaState.value===r){var s=i._textArea.getSelectionStart(),u=i._textArea.getSelectionEnd();if(i._textAreaState.selectionStart!==s||i._textAreaState.selectionEnd!==u){var l=i._textAreaState.deduceEditorPosition(s),c=i._host.deduceModelPosition(l[0],l[1],l[2]),h=i._textAreaState.deduceEditorPosition(u),d=i._host.deduceModelPosition(h[0],h[1],h[2]),f=new Be.L(c.lineNumber,c.column,d.lineNumber,d.column);i._onSelectionChangeRequest.fire(f)}}}}}}))),i}return zr(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this)},t.prototype.focusTextArea=function(){this._setHasFocus(!0)},t.prototype.isFocused=function(){return this._hasFocus},t.prototype._setHasFocus=function(e){this._hasFocus!==e&&(this._hasFocus=e,this._hasFocus&&(Dt?this._setAndWriteTextAreaState("focusgain",Rr.EMPTY):this.writeScreenReaderContent("focusgain")),this._hasFocus?this._onFocus.fire():this._onBlur.fire())},t.prototype._setAndWriteTextAreaState=function(e,t){this._hasFocus||(t=t.collapseSelection()),t.writeToTextArea(e,this._textArea,this._hasFocus),this._textAreaState=t},t.prototype.writeScreenReaderContent=function(e){this._isDoingComposition||this._setAndWriteTextAreaState(e,this._host.getScreenReaderContent(this._textAreaState))},t.prototype._ensureClipboardGetsEditorSelection=function(e){var t=this._host.getPlainTextToCopy();if(Br.canUseTextData(e)){var n=null;(function(){if(xt)return!1;if(Dt){var e=Nt.indexOf("Edge/"),t=parseInt(Nt.substring(e+5,Nt.indexOf(".",e)),10);if(!t||t>=12&&t<=16)return!1}return!0})()&&(t.length<65536||Wr.forceCopyWithSyntaxHighlighting)&&(n=this._host.getHTMLToCopy()),Br.setTextData(e,t,n)}else this._setAndWriteTextAreaState("copy or cut",Rr.selectedText(t))},t}(I.jG),Br=function(){function e(){}return e.canUseTextData=function(e){return!!e.clipboardData||!!window.clipboardData},e.getTextData=function(e){if(e.clipboardData)return e.preventDefault(),e.clipboardData.getData("text/plain");if(window.clipboardData)return e.preventDefault(),window.clipboardData.getData("Text");throw new Error("ClipboardEventUtils.getTextData: Cannot use text data!")},e.setTextData=function(e,t,n){if(e.clipboardData)return e.clipboardData.setData("text/plain",t),null!==n&&e.clipboardData.setData("text/html",n),void e.preventDefault();if(window.clipboardData)return window.clipboardData.setData("Text",t),void e.preventDefault();throw new Error("ClipboardEventUtils.setTextData: Cannot use text data!")},e}(),Hr=function(e){function t(t){var n=e.call(this)||this;return n._actual=t,n._ignoreSelectionChangeTime=0,n}return zr(t,e),t.prototype.setIgnoreSelectionChangeTime=function(e){this._ignoreSelectionChangeTime=Date.now()},t.prototype.getIgnoreSelectionChangeTime=function(){return this._ignoreSelectionChangeTime},t.prototype.resetSelectionChangeTime=function(){this._ignoreSelectionChangeTime=0},t.prototype.getValue=function(){return this._actual.domNode.value},t.prototype.setValue=function(e,t){var n=this._actual.domNode;n.value!==t&&(this.setIgnoreSelectionChangeTime("setValue"),n.value=t)},t.prototype.getSelectionStart=function(){return this._actual.domNode.selectionStart},t.prototype.getSelectionEnd=function(){return this._actual.domNode.selectionEnd},t.prototype.setSelectionRange=function(e,t,n){var i=this._actual.domNode,o=document.activeElement===i,r=i.selectionStart,s=i.selectionEnd;if(o&&r===t&&s===n)Tt&&window.parent!==window&&i.focus();else{if(o)return this.setIgnoreSelectionChangeTime("setSelectionRange"),i.setSelectionRange(t,n),void(Tt&&window.parent!==window&&i.focus());try{var a=function(e){for(var t=[],n=0;e&&e.nodeType===e.ELEMENT_NODE;n++)t[n]=e.scrollTop,e=e.parentNode;return t}(i);this.setIgnoreSelectionChangeTime("setSelectionRange"),i.focus(),i.setSelectionRange(t,n),function(e,t){for(var n=0;e&&e.nodeType===e.ELEMENT_NODE;n++)e.scrollTop!==t[n]&&(e.scrollTop=t[n]),e=e.parentNode}(i,a)}catch(e){}}},t}(I.jG),Vr=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Ur=function(e){function t(t){var n=e.call(this)||this;return n._context=t,n._context.addEventHandler(n),n}return Vr(t,e),t.prototype.dispose=function(){this._context.removeEventHandler(this),this._context=null,e.prototype.dispose.call(this)},t}(Or),Yr=function(){function e(){}return e.write=function(e,t){e.setAttribute("data-mprt",String(t))},e.read=function(e){var t=e.getAttribute("data-mprt");return null===t?0:parseInt(t,10)},e.collect=function(e,t){for(var n=[],i=0;e&&e!==document.body&&e!==t;)e.nodeType===e.ELEMENT_NODE&&(n[i++]=this.read(e)),e=e.parentElement;for(var o=new Uint8Array(i),r=0;r'+n+"":String(i)}return 3===this._renderLineNumbers?this._lastCursorModelPosition.lineNumber===n||n%10==0?String(n):"":String(n)},t.prototype.prepareRender=function(e){if(0!==this._renderLineNumbers){for(var n=B.j9?this._lineHeight%2==0?" lh-even":" lh-odd":"",i=e.visibleRange.startLineNumber,o=e.visibleRange.endLineNumber,r='
    ',s=[],a=i;a<=o;a++){var u=a-i,l=this._getLineRenderLineNumber(a);s[u]=l?r+l+"
    ":""}this._renderResult=s}else this._renderResult=null},t.prototype.render=function(e,t){if(!this._renderResult)return"";var n=t-e;return n<0||n>=this._renderResult.length?"":this._renderResult[n]},t.CLASS_NAME="line-numbers",t}(Ga);Tr((function(e,t){var n=e.getColor(Sa);n&&t.addRule(".monaco-editor .line-numbers { color: "+n+"; }");var i=e.getColor(Ia);i&&t.addRule(".monaco-editor .current-line ~ .line-numbers { color: "+i+"; }")}));var Ka=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Ja=function(){function e(e,t,n){this.top=e,this.left=t,this.width=n}return e.prototype.setWidth=function(t){return new e(this.top,this.left,t)},e}(),Xa=kt||Tt,$a=function(){function e(){this._lastState=null}return e.prototype.set=function(e){this._lastState=e},e.prototype.get=function(e){return this._lastState&&this._lastState.lastCopiedValue===e?this._lastState:(this._lastState=null,null)},e.INSTANCE=new e,e}(),eu=function(e){function t(t,n,i){var o=e.call(this,t)||this;o._primaryCursorVisibleRange=null,o._viewController=n,o._viewHelper=i;var r=o._context.configuration.editor;o._accessibilitySupport=r.accessibilitySupport,o._contentLeft=r.layoutInfo.contentLeft,o._contentWidth=r.layoutInfo.contentWidth,o._contentHeight=r.layoutInfo.contentHeight,o._scrollLeft=0,o._scrollTop=0,o._fontInfo=r.fontInfo,o._lineHeight=r.lineHeight,o._emptySelectionClipboard=r.emptySelectionClipboard,o._visibleTextArea=null,o._selections=[new Be.L(1,1,1,1)],o.textArea=Ar(document.createElement("textarea")),Yr.write(o.textArea,6),o.textArea.setClassName("inputarea"),o.textArea.setAttribute("wrap","off"),o.textArea.setAttribute("autocorrect","off"),o.textArea.setAttribute("autocapitalize","off"),o.textArea.setAttribute("autocomplete","off"),o.textArea.setAttribute("spellcheck","false"),o.textArea.setAttribute("aria-label",r.viewInfo.ariaLabel),o.textArea.setAttribute("role","textbox"),o.textArea.setAttribute("aria-multiline","true"),o.textArea.setAttribute("aria-haspopup","false"),o.textArea.setAttribute("aria-autocomplete","both"),o.textAreaCover=Ar(document.createElement("div")),o.textAreaCover.setPosition("absolute");var a={getLineCount:function(){return o._context.model.getLineCount()},getLineMaxColumn:function(e){return o._context.model.getLineMaxColumn(e)},getValueInRange:function(e,t){return o._context.model.getValueInRange(e,t)}},u={getPlainTextToCopy:function(){var e=o._context.model.getPlainTextToCopy(o._selections,o._emptySelectionClipboard,B.uF),t=o._context.model.getEOL(),n=o._emptySelectionClipboard&&1===o._selections.length&&o._selections[0].isEmpty(),i=Array.isArray(e)?e:null,r=Array.isArray(e)?e.join(t):e,s=null;return(n||i)&&(s={lastCopiedValue:Tt?r.replace(/\r\n/g,"\n"):r,isFromEmptySelection:o._emptySelectionClipboard&&1===o._selections.length&&o._selections[0].isEmpty(),multicursorText:i}),$a.INSTANCE.set(s),r},getHTMLToCopy:function(){return o._context.model.getHTMLToCopy(o._selections,o._emptySelectionClipboard)},getScreenReaderContent:function(e){if(Ot)return Rr.EMPTY;if(1===o._accessibilitySupport){if(B.zx){var t=o._selections[0];if(t.isEmpty()){var n=t.getStartPosition(),i=o._getWordBeforePosition(n);if(0===i.length&&(i=o._getCharacterBeforePosition(n)),i.length>0)return new Rr(i,i.length,i.length,n,n)}}return Rr.EMPTY}return Pr.fromEditorSelection(e,a,o._selections[0],0===o._accessibilitySupport)},deduceModelPosition:function(e,t,n){return o._context.model.deduceModelPositionRelativeToViewPosition(e,t,n)}};return o._textAreaInput=o._register(new Fr(u,o.textArea)),o._register(o._textAreaInput.onKeyDown((function(e){o._viewController.emitKeyDown(e)}))),o._register(o._textAreaInput.onKeyUp((function(e){o._viewController.emitKeyUp(e)}))),o._register(o._textAreaInput.onPaste((function(e){var t=$a.INSTANCE.get(e.text),n=!1,i=null;t&&(n=o._emptySelectionClipboard&&t.isFromEmptySelection,i=t.multicursorText),o._viewController.paste("keyboard",e.text,n,i)}))),o._register(o._textAreaInput.onCut((function(){o._viewController.cut("keyboard")}))),o._register(o._textAreaInput.onType((function(e){e.replaceCharCnt?o._viewController.replacePreviousChar("keyboard",e.text,e.replaceCharCnt):o._viewController.type("keyboard",e.text)}))),o._register(o._textAreaInput.onSelectionChangeRequest((function(e){o._viewController.setSelection("keyboard",e)}))),o._register(o._textAreaInput.onCompositionStart((function(){var e=o._selections[0].startLineNumber,t=o._selections[0].startColumn;o._context.privateViewEventBus.emit(new ho(new s.Q(e,t,e,t),0,!0,1));var n=o._viewHelper.visibleRangeForPositionRelativeToEditor(e,t);n&&(o._visibleTextArea=new Ja(o._context.viewLayout.getVerticalOffsetForLineNumber(e),n.left,Xa?0:1),o._render()),o.textArea.setClassName("inputarea ime-input"),o._viewController.compositionStart("keyboard")}))),o._register(o._textAreaInput.onCompositionUpdate((function(e){o._visibleTextArea=kt?o._visibleTextArea.setWidth(0):o._visibleTextArea.setWidth(function(e,t){var n,i=document.createElement("canvas").getContext("2d");i.font=("normal","normal normal "+(n=t).fontWeight+" "+n.fontSize+"px / "+n.lineHeight+"px "+n.fontFamily);var o=i.measureText(e);return Tt?o.width+2:o.width}(e.data,o._fontInfo)),o._render()}))),o._register(o._textAreaInput.onCompositionEnd((function(){o._visibleTextArea=null,o._render(),o.textArea.setClassName("inputarea"),o._viewController.compositionEnd("keyboard")}))),o._register(o._textAreaInput.onFocus((function(){o._context.privateViewEventBus.emit(new so(!0))}))),o._register(o._textAreaInput.onBlur((function(){o._context.privateViewEventBus.emit(new so(!1))}))),o}return Ka(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this)},t.prototype._getWordBeforePosition=function(e){for(var t=this._context.model.getLineContent(e.lineNumber),n=(0,f.i)(this._context.configuration.editor.wordSeparators),i=e.column,o=0;i>1;){var r=t.charCodeAt(i-2);if(0!==n.get(r)||o>50)return t.substring(i-1,e.column-1);o++,i--}return t.substring(0,e.column-1)},t.prototype._getCharacterBeforePosition=function(e){if(e.column>1){var t=this._context.model.getLineContent(e.lineNumber).charAt(e.column-2);if(!p.isHighSurrogate(t.charCodeAt(0)))return t}return""},t.prototype.onConfigurationChanged=function(e){var t=this._context.configuration.editor;return e.fontInfo&&(this._fontInfo=t.fontInfo),e.viewInfo&&this.textArea.setAttribute("aria-label",t.viewInfo.ariaLabel),e.layoutInfo&&(this._contentLeft=t.layoutInfo.contentLeft,this._contentWidth=t.layoutInfo.contentWidth,this._contentHeight=t.layoutInfo.contentHeight),e.lineHeight&&(this._lineHeight=t.lineHeight),e.accessibilitySupport&&(this._accessibilitySupport=t.accessibilitySupport,this._textAreaInput.writeScreenReaderContent("strategy changed")),e.emptySelectionClipboard&&(this._emptySelectionClipboard=t.emptySelectionClipboard),!0},t.prototype.onCursorStateChanged=function(e){return this._selections=e.selections.slice(0),this._textAreaInput.writeScreenReaderContent("selection changed"),!0},t.prototype.onDecorationsChanged=function(e){return!0},t.prototype.onFlushed=function(e){return!0},t.prototype.onLinesChanged=function(e){return!0},t.prototype.onLinesDeleted=function(e){return!0},t.prototype.onLinesInserted=function(e){return!0},t.prototype.onScrollChanged=function(e){return this._scrollLeft=e.scrollLeft,this._scrollTop=e.scrollTop,!0},t.prototype.onZonesChanged=function(e){return!0},t.prototype.isFocused=function(){return this._textAreaInput.isFocused()},t.prototype.focusTextArea=function(){this._textAreaInput.focusTextArea()},t.prototype.prepareRender=function(e){if(2===this._accessibilitySupport)this._primaryCursorVisibleRange=null;else{var t=new r.y(this._selections[0].positionLineNumber,this._selections[0].positionColumn);this._primaryCursorVisibleRange=e.visibleRangeForPosition(t)}},t.prototype.render=function(e){this._textAreaInput.writeScreenReaderContent("render"),this._render()},t.prototype._render=function(){if(this._visibleTextArea)this._renderInsideEditor(this._visibleTextArea.top-this._scrollTop,this._contentLeft+this._visibleTextArea.left-this._scrollLeft,this._visibleTextArea.width,this._lineHeight,!0);else if(this._primaryCursorVisibleRange){var e=this._contentLeft+this._primaryCursorVisibleRange.left-this._scrollLeft;if(ethis._contentLeft+this._contentWidth)this._renderAtTopLeft();else{var t=this._context.viewLayout.getVerticalOffsetForLineNumber(this._selections[0].positionLineNumber)-this._scrollTop;t<0||t>this._contentHeight?this._renderAtTopLeft():this._renderInsideEditor(t,e,Xa?0:1,Xa?0:1,!1)}}else this._renderAtTopLeft()},t.prototype._renderInsideEditor=function(e,t,n,i,o){var r=this.textArea,s=this.textAreaCover;o?Ji.applyFontInfo(r,this._fontInfo):(r.setFontSize(1),r.setLineHeight(this._fontInfo.lineHeight)),r.setTop(e),r.setLeft(t),r.setWidth(n),r.setHeight(i),s.setTop(0),s.setLeft(0),s.setWidth(0),s.setHeight(0)},t.prototype._renderAtTopLeft=function(){var e=this.textArea,t=this.textAreaCover;if(Ji.applyFontInfo(e,this._fontInfo),e.setTop(0),e.setLeft(0),t.setTop(0),t.setLeft(0),Xa)return e.setWidth(0),e.setHeight(0),t.setWidth(0),void t.setHeight(0);e.setWidth(1),e.setHeight(1),t.setWidth(1),t.setHeight(1),this._context.configuration.editor.viewInfo.glyphMargin?t.setClassName("monaco-editor-background textAreaCover "+Gr.OUTER_CLASS_NAME):0!==this._context.configuration.editor.viewInfo.renderLineNumbers?t.setClassName("monaco-editor-background textAreaCover "+qa.CLASS_NAME):t.setClassName("monaco-editor-background textAreaCover")},t}(Ur),tu=n(7339);function nu(e,t,n){var i=null,o=null;if("function"==typeof n.value?(i="value",0!==(o=n.value).length&&console.warn("Memoize should only be used in functions with zero parameters")):"function"==typeof n.get&&(i="get",o=n.get),!o)throw new Error("not supported");var r="$memoize$"+t;n[i]=function(){for(var e=[],t=0;t0||window.navigator.msMaxTouchPoints>0},e.prototype.dispose=function(){this.handle&&(this.handle.dispose(),(0,I.AS)(this.toDispose),this.handle=null)},e.prototype.onTouchStart=function(e){var t=Date.now();this.handle&&(this.handle.dispose(),this.handle=null);for(var n=0,i=e.targetTouches.length;n=e.HOLD_DELAY&&Math.abs(u.initialPageX-tu.RT(u.rollingPageX))<30&&Math.abs(u.initialPageY-tu.RT(u.rollingPageY))<30){var c;(c=r.newGestureEvent(iu.Contextmenu,u.initialTarget)).pageX=tu.RT(u.rollingPageX),c.pageY=tu.RT(u.rollingPageY),r.dispatchEvent(c)}else if(1===i){var h=tu.RT(u.rollingPageX),d=tu.RT(u.rollingPageY),f=tu.RT(u.rollingTimestamps)-u.rollingTimestamps[0],p=h-u.rollingPageX[0],g=d-u.rollingPageY[0],m=r.targets.filter((function(e){return u.initialTarget instanceof Node&&e.contains(u.initialTarget)}));r.inertia(m,n,Math.abs(p)/f,p>0?1:-1,h,Math.abs(g)/f,g>0?1:-1,d)}r.dispatchEvent(r.newGestureEvent(iu.End,u.initialTarget)),delete r.activeTouches[a.identifier]},r=this,s=0,a=t.changedTouches.length;s0&&(p=!1,d=o*i*h),s>0&&(p=!1,f=a*s*h);var g=l.newGestureEvent(iu.Change);g.translationX=d,g.translationY=f,t.forEach((function(e){return e.dispatchEvent(g)})),p||l.inertia(t,c,i,o,r+d,s,a,u+f)}))},e.prototype.onTouchMove=function(e){for(var t=Date.now(),n=0,i=e.changedTouches.length;n3&&(r.rollingPageX.shift(),r.rollingPageY.shift(),r.rollingTimestamps.shift()),r.rollingPageX.push(o.pageX),r.rollingPageY.push(o.pageY),r.rollingTimestamps.push(t)}else console.warn("end of an UNKNOWN touch",o)}this.dispatched&&(e.preventDefault(),e.stopPropagation(),this.dispatched=!1)},e.SCROLL_FRICTION=-.005,e.HOLD_DELAY=700,function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);r>3&&s&&Object.defineProperty(t,n,s)}([nu],e,"isTouchDevice",null),e}();function uu(e){return!(!e||"function"!=typeof e.getEditorType)&&e.getEditorType()===a.ICodeEditor}!function(e){e[e.EXACT=0]="EXACT",e[e.ABOVE=1]="ABOVE",e[e.BELOW=2]="BELOW"}(ou||(ou={})),function(e){e[e.TOP_RIGHT_CORNER=0]="TOP_RIGHT_CORNER",e[e.BOTTOM_RIGHT_CORNER=1]="BOTTOM_RIGHT_CORNER",e[e.TOP_CENTER=2]="TOP_CENTER"}(ru||(ru={})),function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.TEXTAREA=1]="TEXTAREA",e[e.GUTTER_GLYPH_MARGIN=2]="GUTTER_GLYPH_MARGIN",e[e.GUTTER_LINE_NUMBERS=3]="GUTTER_LINE_NUMBERS",e[e.GUTTER_LINE_DECORATIONS=4]="GUTTER_LINE_DECORATIONS",e[e.GUTTER_VIEW_ZONE=5]="GUTTER_VIEW_ZONE",e[e.CONTENT_TEXT=6]="CONTENT_TEXT",e[e.CONTENT_EMPTY=7]="CONTENT_EMPTY",e[e.CONTENT_VIEW_ZONE=8]="CONTENT_VIEW_ZONE",e[e.CONTENT_WIDGET=9]="CONTENT_WIDGET",e[e.OVERVIEW_RULER=10]="OVERVIEW_RULER",e[e.SCROLLBAR=11]="SCROLLBAR",e[e.OVERLAY_WIDGET=12]="OVERLAY_WIDGET",e[e.OUTSIDE_EDITOR=13]="OUTSIDE_EDITOR"}(su||(su={}));var lu=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();function cu(e,t){var n=new Qt(t);return n.preventDefault(),{leftButton:n.leftButton,posx:n.posx,posy:n.posy}}var hu=function(e){function t(){var t=e.call(this)||this;return t.hooks=[],t.mouseMoveEventMerger=null,t.mouseMoveCallback=null,t.onStopCallback=null,t}return lu(t,e),t.prototype.dispose=function(){this.stopMonitoring(!1),e.prototype.dispose.call(this)},t.prototype.stopMonitoring=function(e){if(this.isMonitoring()){this.hooks=(0,I.AS)(this.hooks),this.mouseMoveEventMerger=null,this.mouseMoveCallback=null;var t=this.onStopCallback;this.onStopCallback=null,e&&t()}},t.prototype.isMonitoring=function(){return this.hooks.length>0},t.prototype.startMonitoring=function(e,t,n){var i=this;if(!this.isMonitoring()){this.mouseMoveEventMerger=e,this.mouseMoveCallback=t,this.onStopCallback=n;for(var o=Zt.getSameOriginWindowChain(),r=0;rn||c.isEmpty()&&(0===l.type||3===l.type))){var h=c.startLineNumber===n?c.startColumn:i,d=c.endLineNumber===n?c.endColumn:o;r[s++]=new e(h,d,l.inlineClassName,l.type)}}return r},e.compare=function(e,t){return e.startColumn===t.startColumn?e.endColumn===t.endColumn?e.classNamet.className?1:0:e.endColumn-t.endColumn:e.startColumn-t.startColumn},e}(),Mu=function(e,t,n){this.startOffset=e,this.endOffset=t,this.className=n},Cu=function(){function e(){this.stopOffsets=[],this.classNames=[],this.count=0}return e.prototype.consumeLowerThan=function(e,t,n){for(;this.count>0&&this.stopOffsets[0]0&&t=e){this.stopOffsets.splice(n,0,e),this.classNames.splice(n,0,t);break}this.count++},e}(),Su=function(){function e(){}return e.normalize=function(e,t){if(0===t.length)return[];for(var n=[],i=new Cu,o=0,r=0,s=t.length;r1){var h=e.charCodeAt(u-2);p.isHighSurrogate(h)&&u--}l>1&&(h=e.charCodeAt(l-2),p.isHighSurrogate(h)&&l--);var d=u-1,f=l-2;o=i.consumeLowerThan(d,o,n),0===i.count&&(o=d),i.insert(f,c)}return i.consumeLowerThan(1073741824,o,n),n},e}();vu="undefined"!=typeof TextDecoder?function(e){return new Lu(e)}:function(e){return new Iu};var Lu=function(){function e(e){this._decoder=new TextDecoder("UTF-16LE"),this._capacity=0|e,this._buffer=new Uint16Array(this._capacity),this._completedStrings=null,this._bufferLength=0}return e.prototype.reset=function(){this._completedStrings=null,this._bufferLength=0},e.prototype.build=function(){return null!==this._completedStrings?(this._flushBuffer(),this._completedStrings.join("")):this._buildBuffer()},e.prototype._buildBuffer=function(){if(0===this._bufferLength)return"";var e=new Uint16Array(this._buffer.buffer,0,this._bufferLength);return this._decoder.decode(e)},e.prototype._flushBuffer=function(){var e=this._buildBuffer();this._bufferLength=0,null===this._completedStrings?this._completedStrings=[e]:this._completedStrings[this._completedStrings.length]=e},e.prototype.write1=function(e){var t=this._capacity-this._bufferLength;t<=1&&(0===t||p.isHighSurrogate(e))&&this._flushBuffer(),this._buffer[this._bufferLength++]=e},e.prototype.appendASCII=function(e){this._bufferLength===this._capacity&&this._flushBuffer(),this._buffer[this._bufferLength++]=e},e.prototype.appendASCIIString=function(e){var t=e.length;if(this._bufferLength+t>=this._capacity)return this._flushBuffer(),void(this._completedStrings[this._completedStrings.length]=e);for(var n=0;n>>16},e.getCharIndex=function(e){return(65535&e)>>>0},e.prototype.setPartData=function(e,t,n,i){var o=(t<<16|n)>>>0;this._data[e]=o,this._absoluteOffsets[e]=i+n},e.prototype.getAbsoluteOffsets=function(){return this._absoluteOffsets},e.prototype.charOffsetToPartData=function(e){return 0===this.length?0:e<0?this._data[0]:e>=this.length?this._data[this.length-1]:this._data[e]},e.prototype.partDataToCharOffset=function(t,n,i){if(0===this.length)return 0;for(var o=(t<<16|i)>>>0,r=0,s=this.length-1;r+1>>1,u=this._data[a];if(u===o)return a;u>o?s=a:r=a}if(r===s)return r;var l=this._data[r],c=this._data[s];if(l===o)return r;if(c===o)return s;var h=e.getPartIndex(l);return i-e.getCharIndex(l)<=(h!==e.getPartIndex(c)?n:e.getCharIndex(c))-i?r:s},e}(),ku=function(e,t,n){this.characterMapping=e,this.containsRTL=t,this.containsForeignElements=n};function Tu(e,t){if(0===e.lineContent.length){var n=0,i=" ";if(e.lineDecorations.length>0){for(var o=[],r=0,s=e.lineDecorations.length;r')}return t.appendASCIIString(i),new ku(new Du(0,0),!1,n)}return function(e,t){var n=e.fontIsMonospace,i=e.containsForeignElements,o=e.lineContent,r=e.len,s=e.isOverflowing,a=e.parts,u=e.tabSize,l=e.containsRTL,c=e.spaceWidth,h=e.renderWhitespace,d=e.renderControlCharacters,f=new Du(r+1,a.length),g=0,m=0,v=0,y=0,b=0;t.appendASCIIString("");for(var _=0,w=a.length;_=0;if(v=0,t.appendASCIIString('0&&(k>1?t.write1(8594):t.write1(65515),k--);k>0;)t.write1(160),k--;else t.write1(183);v++}y=I}else{for(I=0,l&&t.appendASCIIString(' dir="ltr"'),t.appendASCII(62);g0;)t.write1(160),I++,k--;break;case 32:t.write1(160),I++;break;case 60:t.appendASCIIString("<"),I++;break;case 62:t.appendASCIIString(">"),I++;break;case 38:t.appendASCIIString("&"),I++;break;case 0:t.appendASCIIString("�"),I++;break;case 65279:case 8232:t.write1(65533),I++;break;default:p.isFullWidthCharacter(D)&&m++,d&&D<32?(t.write1(9216+D),I++):(t.write1(D),I++)}v++}y=I}t.appendASCIIString("")}return f.setPartData(r,a.length-1,v,b),s&&t.appendASCIIString(""),t.appendASCIIString(""),new ku(f,l,i)}(function(e){var t,n,i=e.useMonospaceOptimizations,o=e.lineContent;-1!==e.stopRenderingLineAfter&&e.stopRenderingLineAfter0&&(i[o++]=new Nu(t,""));for(var r=0,s=e.getCount();r=n){i[o++]=new Nu(n,u);break}i[o++]=new Nu(a,u)}}return i}(e.lineTokens,e.fauxIndentLength,n);2!==e.renderWhitespace&&1!==e.renderWhitespace||(r=function(e,t,n,i,o,r,s,a){var u,l=[],c=0,h=0,d=i[h].type,f=i[h].endIndex,g=p.firstNonWhitespaceIndex(e);-1===g?(g=t,u=t):u=p.lastNonWhitespaceIndex(e);for(var m=0,v=0;vu)_=!0;else if(9===b)_=!0;else if(32===b)if(a)if(y)_=!0;else{var w=v+1=r)&&(l[c++]=new Nu(v,"vs-whitespace"),m%=r):(v===f||_&&v>o)&&(l[c++]=new Nu(v,d),m%=r),9===b?m=r:p.isFullWidthCharacter(b)?m+=2:m++,y=_,v===f&&(d=i[++h].type,f=i[h].endIndex)}var M=!1;if(y)if(n&&a){var C=t>0?e.charCodeAt(t-1):0,S=t>1?e.charCodeAt(t-2):0;32===C&&32!==S&&9!==S||(M=!0)}else M=!0;return l[c++]=new Nu(t,M?"vs-whitespace":d),l}(o,n,e.continuesWithWrappedLine,r,e.fauxIndentLength,e.tabSize,i,1===e.renderWhitespace));var s=0;if(e.lineDecorations.length>0){for(var a=0,u=e.lineDecorations.length;al&&(l=g.startOffset,a[u++]=new Nu(l,p)),!(g.endOffset+1<=f)){l=f,a[u++]=new Nu(l,p+" "+g.className);break}l=g.endOffset+1,a[u++]=new Nu(l,p+" "+g.className),s++}f>l&&(l=f,a[u++]=new Nu(l,p))}var m=n[n.length-1].endIndex;if(s50){for(var c=a.type,h=Math.ceil(l/50),d=1;d=u?o=Math.max(o,u+l-i):(t[n++]=new zu(i,o),i=u,o=l)}return t[n++]=new zu(i,o),t},e._createHorizontalRangesFromClientRects=function(e,t){if(!e||0===e.length)return null;for(var n=[],i=0,o=e.length;ia)return null;(t=Math.min(a,Math.max(0,t)))!==(i=Math.min(a,Math.max(0,i)))&&i>0&&0===o&&(i--,o=Number.MAX_VALUE);var u=e.children[t].firstChild,l=e.children[i].firstChild;if(u&&l||(!u&&0===n&&t>0&&(u=e.children[t-1].firstChild,n=1073741824),!l&&0===o&&i>0&&(l=e.children[i-1].firstChild,o=1073741824)),!u||!l)return null;n=Math.min(u.textContent.length,Math.max(0,n)),o=Math.min(l.textContent.length,Math.max(0,o));var c=this._readClientRects(u,n,l,o,s);return this._createHorizontalRangesFromClientRects(c,r)},e}(),Bu=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Hu=!!B.ib||!(B.j9||Tt||jt),Vu=kt,Uu=function(){function e(e,t){this._domNode=e,this._clientRectDeltaLeft=0,this._clientRectDeltaLeftRead=!1,this.endNode=t}return Object.defineProperty(e.prototype,"clientRectDeltaLeft",{get:function(){return this._clientRectDeltaLeftRead||(this._clientRectDeltaLeftRead=!0,this._clientRectDeltaLeft=this._domNode.getBoundingClientRect().left),this._clientRectDeltaLeft},enumerable:!0,configurable:!0}),e}(),Yu=function(){function e(e,t){this.themeType=t,this.renderWhitespace=e.editor.viewInfo.renderWhitespace,this.renderControlCharacters=e.editor.viewInfo.renderControlCharacters,this.spaceWidth=e.editor.fontInfo.spaceWidth,this.useMonospaceOptimizations=e.editor.fontInfo.isMonospace&&!e.editor.viewInfo.disableMonospaceOptimizations,this.lineHeight=e.editor.lineHeight,this.stopRenderingLineAfter=e.editor.viewInfo.stopRenderingLineAfter,this.fontLigatures=e.editor.viewInfo.fontLigatures}return e.prototype.equals=function(e){return this.themeType===e.themeType&&this.renderWhitespace===e.renderWhitespace&&this.renderControlCharacters===e.renderControlCharacters&&this.spaceWidth===e.spaceWidth&&this.useMonospaceOptimizations===e.useMonospaceOptimizations&&this.lineHeight===e.lineHeight&&this.stopRenderingLineAfter===e.stopRenderingLineAfter&&this.fontLigatures===e.fontLigatures},e}(),Zu=function(){function e(e){this._options=e,this._isMaybeInvalid=!0,this._renderedViewLine=null}return e.prototype.getDomNode=function(){return this._renderedViewLine&&this._renderedViewLine.domNode?this._renderedViewLine.domNode.domNode:null},e.prototype.setDomNode=function(e){if(!this._renderedViewLine)throw new Error("I have no rendered view line to set the dom node to...");this._renderedViewLine.domNode=Ar(e)},e.prototype.onContentChanged=function(){this._isMaybeInvalid=!0},e.prototype.onTokensChanged=function(){this._isMaybeInvalid=!0},e.prototype.onDecorationsChanged=function(){this._isMaybeInvalid=!0},e.prototype.onOptionsChanged=function(e){this._isMaybeInvalid=!0,this._options=e},e.prototype.onSelectionChanged=function(){return!(!Vu&&this._options.themeType!==Nr||(this._isMaybeInvalid=!0,0))},e.prototype.renderLine=function(t,n,i,o){if(!1===this._isMaybeInvalid)return!1;this._isMaybeInvalid=!1;var r=i.getViewLineRenderingData(t),s=this._options,a=wu.filter(r.inlineDecorations,t,r.minColumn,r.maxColumn);if(Vu||s.themeType===Nr)for(var u=i.selections,l=0,c=u.length;lt)){var d=h.startLineNumber===t?h.startColumn:r.minColumn,f=h.endLineNumber===t?h.endColumn:r.maxColumn;d');var g=Tu(p,o);o.appendASCIIString("");var m=null;return Hu&&r.isBasicASCII&&s.useMonospaceOptimizations&&0===g.containsForeignElements&&r.content.length<300&&p.lineTokens.getCount()<100&&(m=new Gu(this._renderedViewLine?this._renderedViewLine.domNode:null,p,g.characterMapping)),m||(m=Ku(this._renderedViewLine?this._renderedViewLine.domNode:null,p,g.characterMapping,g.containsRTL,g.containsForeignElements)),this._renderedViewLine=m,!0},e.prototype.layoutLine=function(e,t){this._renderedViewLine&&this._renderedViewLine.domNode&&(this._renderedViewLine.domNode.setTop(t),this._renderedViewLine.domNode.setHeight(this._options.lineHeight))},e.prototype.getWidth=function(){return this._renderedViewLine?this._renderedViewLine.getWidth():0},e.prototype.getWidthIsFast=function(){return!this._renderedViewLine||this._renderedViewLine.getWidthIsFast()},e.prototype.getVisibleRangesForRange=function(e,t,n){e|=0,t|=0,e=Math.min(this._renderedViewLine.input.lineContent.length+1,Math.max(1,e)),t=Math.min(this._renderedViewLine.input.lineContent.length+1,Math.max(1,t));var i=0|this._renderedViewLine.input.stopRenderingLineAfter;return-1!==i&&e>i&&t>i?null:(-1!==i&&e>i&&(e=i),-1!==i&&t>i&&(t=i),this._renderedViewLine.getVisibleRangesForRange(e,t,n))},e.prototype.getColumnOfNodeOffset=function(e,t,n){return this._renderedViewLine.getColumnOfNodeOffset(e,t,n)},e.CLASS_NAME="view-line",e}(),Gu=function(){function e(e,t,n){this.domNode=e,this.input=t,this._characterMapping=n,this._charWidth=t.spaceWidth}return e.prototype.getWidth=function(){return this._getCharPosition(this._characterMapping.length)},e.prototype.getWidthIsFast=function(){return!0},e.prototype.getVisibleRangesForRange=function(e,t,n){var i=this._getCharPosition(e),o=this._getCharPosition(t);return[new zu(i,o-i)]},e.prototype._getCharPosition=function(e){var t=this._characterMapping.getAbsoluteOffsets();return 0===t.length?0:Math.round(this._charWidth*t[e-1])},e.prototype.getColumnOfNodeOffset=function(e,t,n){for(var i=t.textContent.length,o=-1;t;)t=t.previousSibling,o++;return this._characterMapping.partDataToCharOffset(o,i,n)+1},e}(),Qu=function(){function e(e,t,n,i,o){if(this.domNode=e,this.input=t,this._characterMapping=n,this._isWhitespaceOnly=/^\s*$/.test(t.lineContent),this._containsForeignElements=o,this._cachedWidth=-1,this._pixelOffsetCache=null,!i||0===this._characterMapping.length){this._pixelOffsetCache=new Int32Array(Math.max(2,this._characterMapping.length+1));for(var r=0,s=this._characterMapping.length;r<=s;r++)this._pixelOffsetCache[r]=-1}}return e.prototype._getReadingTarget=function(){return this.domNode.domNode.firstChild},e.prototype.getWidth=function(){return-1===this._cachedWidth&&(this._cachedWidth=this._getReadingTarget().offsetWidth),this._cachedWidth},e.prototype.getWidthIsFast=function(){return-1!==this._cachedWidth},e.prototype.getVisibleRangesForRange=function(e,t,n){if(null!==this._pixelOffsetCache){var i=this._readPixelOffset(e,n);if(-1===i)return null;var o=this._readPixelOffset(t,n);return-1===o?null:[new zu(i,o-i)]}return this._readVisibleRangesForRange(e,t,n)},e.prototype._readVisibleRangesForRange=function(e,t,n){if(e===t){var i=this._readPixelOffset(e,n);return-1===i?null:[new zu(i,0)]}return this._readRawVisibleRangesForRange(e,t,n)},e.prototype._readPixelOffset=function(e,t){if(0===this._characterMapping.length){if(0===this._containsForeignElements)return 0;if(2===this._containsForeignElements)return 0;if(1===this._containsForeignElements)return this.getWidth()}if(null!==this._pixelOffsetCache){var n=this._pixelOffsetCache[e];if(-1!==n)return n;var i=this._actualReadPixelOffset(e,t);return this._pixelOffsetCache[e]=i,i}return this._actualReadPixelOffset(e,t)},e.prototype._actualReadPixelOffset=function(e,t){if(0===this._characterMapping.length){var n=Fu.readHorizontalRanges(this._getReadingTarget(),0,0,0,0,t.clientRectDeltaLeft,t.endNode);return n&&0!==n.length?n[0].left:-1}if(e===this._characterMapping.length&&this._isWhitespaceOnly&&0===this._containsForeignElements)return this.getWidth();var i=this._characterMapping.charOffsetToPartData(e-1),o=Du.getPartIndex(i),r=Du.getCharIndex(i),s=Fu.readHorizontalRanges(this._getReadingTarget(),o,r,o,r,t.clientRectDeltaLeft,t.endNode);return s&&0!==s.length?s[0].left:-1},e.prototype._readRawVisibleRangesForRange=function(e,t,n){if(1===e&&t===this._characterMapping.length)return[new zu(0,this.getWidth())];var i=this._characterMapping.charOffsetToPartData(e-1),o=Du.getPartIndex(i),r=Du.getCharIndex(i),s=this._characterMapping.charOffsetToPartData(t-1),a=Du.getPartIndex(s),u=Du.getCharIndex(s);return Fu.readHorizontalRanges(this._getReadingTarget(),o,r,a,u,n.clientRectDeltaLeft,n.endNode)},e.prototype.getColumnOfNodeOffset=function(e,t,n){for(var i=t.textContent.length,o=-1;t;)t=t.previousSibling,o++;return this._characterMapping.partDataToCharOffset(o,i,n)+1},e}(),qu=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Bu(t,e),t.prototype._readVisibleRangesForRange=function(t,n,i){var o=e.prototype._readVisibleRangesForRange.call(this,t,n,i);if(!o||0===o.length||t===n||1===t&&n===this._characterMapping.length)return o;var r=this._readPixelOffset(n-1,i),s=this._readPixelOffset(n,i);if(-1!==r&&-1!==s){var a=r<=s,u=o[o.length-1];a&&u.left=4&&3===e[0]&&7===e[3]},e.isStrictChildOfViewLines=function(e){return e.length>4&&3===e[0]&&7===e[3]},e.isChildOfScrollableElement=function(e){return e.length>=2&&3===e[0]&&5===e[1]},e.isChildOfMinimap=function(e){return e.length>=2&&3===e[0]&&8===e[1]},e.isChildOfContentWidgets=function(e){return e.length>=4&&3===e[0]&&1===e[3]},e.isChildOfOverflowingContentWidgets=function(e){return e.length>=1&&2===e[0]},e.isChildOfOverlayWidgets=function(e){return e.length>=2&&3===e[0]&&4===e[1]},e}(),el=function(){function e(e,t,n){this.model=e.model,this.layoutInfo=e.configuration.editor.layoutInfo,this.viewDomNode=t.viewDomNode,this.lineHeight=e.configuration.editor.lineHeight,this.typicalHalfwidthCharacterWidth=e.configuration.editor.fontInfo.typicalHalfwidthCharacterWidth,this.lastViewCursorsRenderData=n,this._context=e,this._viewHelper=t}return e.prototype.getZoneAtCoord=function(t){return e.getZoneAtCoord(this._context,t)},e.getZoneAtCoord=function(e,t){var n=e.viewLayout.getWhitespaceAtVerticalOffset(t);if(n){var i,o=n.verticalOffset+n.height/2,s=e.model.getLineCount(),a=null,u=null;return n.afterLineNumber!==s&&(u=new r.y(n.afterLineNumber+1,1)),n.afterLineNumber>0&&(a=new r.y(n.afterLineNumber,e.model.getLineMaxColumn(n.afterLineNumber))),i=null===u?a:null===a?u:t=e.layoutInfo.glyphMarginLeft,this.isInContentArea=!this.isInMarginArea,this.mouseColumn=Math.max(0,ol._getMouseColumn(this.mouseContentHorizontalOffset,e.typicalHalfwidthCharacterWidth))})),nl={isAfterLines:!0};function il(e){return{isAfterLines:!1,horizontalDistanceToText:e}}var ol=function(){function e(e,t){this._context=e,this._viewHelper=t}return e.prototype.mouseTargetIsWidget=function(e){var t=e.target,n=Yr.collect(t,this._viewHelper.viewDomNode);return!(!$u.isChildOfContentWidgets(n)&&!$u.isChildOfOverflowingContentWidgets(n)&&!$u.isChildOfOverlayWidgets(n))},e.prototype.createMouseTarget=function(t,n,i,o){var r=new el(this._context,this._viewHelper,t),s=new tl(r,n,i,o);try{return e._createMouseTarget(r,s,!1)}catch(e){return s.fulfill(su.UNKNOWN)}},e._createMouseTarget=function(t,n,i){if(null===n.target){if(i)return n.fulfill(su.UNKNOWN);var o=e._doHitTest(t,n);return o.position?e.createMouseTargetFromHitTestPosition(t,n,o.position.lineNumber,o.position.column):this._createMouseTarget(t,n.withTarget(o.hitTarget),!0)}var r=null;return(r=(r=(r=(r=(r=(r=(r=(r=(r=(r=r||e._hitTestContentWidget(t,n))||e._hitTestOverlayWidget(t,n))||e._hitTestMinimap(t,n))||e._hitTestScrollbarSlider(t,n))||e._hitTestViewZone(t,n))||e._hitTestMargin(t,n))||e._hitTestViewCursor(t,n))||e._hitTestTextArea(t,n))||e._hitTestViewLines(t,n,i))||e._hitTestScrollbar(t,n))||n.fulfill(su.UNKNOWN)},e._hitTestContentWidget=function(e,t){if($u.isChildOfContentWidgets(t.targetPath)||$u.isChildOfOverflowingContentWidgets(t.targetPath)){var n=e.findAttribute(t.target,"widgetId");return n?t.fulfill(su.CONTENT_WIDGET,null,null,n):t.fulfill(su.UNKNOWN)}return null},e._hitTestOverlayWidget=function(e,t){if($u.isChildOfOverlayWidgets(t.targetPath)){var n=e.findAttribute(t.target,"widgetId");return n?t.fulfill(su.OVERLAY_WIDGET,null,null,n):t.fulfill(su.UNKNOWN)}return null},e._hitTestViewCursor=function(e,t){if(t.target)for(var n=0,i=(r=e.lastViewCursorsRenderData).length;no.contentLeft+o.width)){var u=e.getVerticalOffsetForLineNumber(o.position.lineNumber);if(u<=a&&a<=u+o.height)return t.fulfill(su.CONTENT_TEXT,o.position)}}return null},e._hitTestViewZone=function(e,t){var n=e.getZoneAtCoord(t.mouseVerticalOffset);if(n){var i=t.isInContentArea?su.CONTENT_VIEW_ZONE:su.GUTTER_VIEW_ZONE;return t.fulfill(i,n.position,null,n)}return null},e._hitTestTextArea=function(e,t){return $u.isTextArea(t.targetPath)?t.fulfill(su.TEXTAREA):null},e._hitTestMargin=function(e,t){if(t.isInMarginArea){var n=e.getFullLineRangeAtCoord(t.mouseVerticalOffset),i=n.range.getStartPosition(),o=Math.abs(t.pos.x-t.editorPos.x),r={isAfterLines:n.isAfterLines,glyphMarginLeft:e.layoutInfo.glyphMarginLeft,glyphMarginWidth:e.layoutInfo.glyphMarginWidth,lineNumbersWidth:e.layoutInfo.lineNumbersWidth,offsetX:o};return(o-=e.layoutInfo.glyphMarginLeft)<=e.layoutInfo.glyphMarginWidth?t.fulfill(su.GUTTER_GLYPH_MARGIN,i,n.range,r):(o-=e.layoutInfo.glyphMarginWidth)<=e.layoutInfo.lineNumbersWidth?t.fulfill(su.GUTTER_LINE_NUMBERS,i,n.range,r):(o-=e.layoutInfo.lineNumbersWidth,t.fulfill(su.GUTTER_LINE_DECORATIONS,i,n.range,r))}return null},e._hitTestViewLines=function(t,n,i){if(!$u.isChildOfViewLines(n.targetPath))return null;if(t.isAfterLines(n.mouseVerticalOffset)){var o=t.model.getLineCount(),s=t.model.getLineMaxColumn(o);return n.fulfill(su.CONTENT_EMPTY,new r.y(o,s),void 0,nl)}if(i){if($u.isStrictChildOfViewLines(n.targetPath)){var a=t.getLineNumberAtVerticalOffset(n.mouseVerticalOffset);if(0===t.model.getLineLength(a)){var u=t.getLineWidth(a),l=il(n.mouseContentHorizontalOffset-u);return n.fulfill(su.CONTENT_EMPTY,new r.y(a,1),void 0,l)}}return n.fulfill(su.UNKNOWN)}var c=e._doHitTest(t,n);return c.position?e.createMouseTargetFromHitTestPosition(t,n,c.position.lineNumber,c.position.column):this._createMouseTarget(t,n.withTarget(c.hitTarget),!0)},e._hitTestMinimap=function(e,t){if($u.isChildOfMinimap(t.targetPath)){var n=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),i=e.model.getLineMaxColumn(n);return t.fulfill(su.SCROLLBAR,new r.y(n,i))}return null},e._hitTestScrollbarSlider=function(e,t){if($u.isChildOfScrollableElement(t.targetPath)&&t.target&&1===t.target.nodeType){var n=t.target.className;if(n&&/\b(slider|scrollbar)\b/.test(n)){var i=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),o=e.model.getLineMaxColumn(i);return t.fulfill(su.SCROLLBAR,new r.y(i,o))}}return null},e._hitTestScrollbar=function(e,t){if($u.isChildOfScrollableElement(t.targetPath)){var n=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),i=e.model.getLineMaxColumn(n);return t.fulfill(su.SCROLLBAR,new r.y(n,i))}return null},e.prototype.getMouseColumn=function(t,n){var i=this._context.configuration.editor.layoutInfo,o=this._context.viewLayout.getCurrentScrollLeft()+n.x-t.x-i.contentLeft;return e._getMouseColumn(o,this._context.configuration.editor.fontInfo.typicalHalfwidthCharacterWidth)},e._getMouseColumn=function(e,t){return e<0?1:Math.round(e/t)+1},e.createMouseTargetFromHitTestPosition=function(e,t,n,i){var o=new r.y(n,i),a=e.getLineWidth(n);if(t.mouseContentHorizontalOffset>a){if(Dt&&1===o.column){var u=il(t.mouseContentHorizontalOffset-a);return t.fulfill(su.CONTENT_EMPTY,new r.y(n,e.model.getLineMaxColumn(n)),void 0,u)}var l=il(t.mouseContentHorizontalOffset-a);return t.fulfill(su.CONTENT_EMPTY,o,void 0,l)}var c=e.visibleRangeForPosition2(n,i);if(!c)return t.fulfill(su.UNKNOWN,o);var h=c.left;if(t.mouseContentHorizontalOffset===h)return t.fulfill(su.CONTENT_TEXT,o);var d=[];if(d.push({offset:c.left,column:i}),i>1){var f=e.visibleRangeForPosition2(n,i-1);f&&d.push({offset:f.left,column:i-1})}if(i=t.editorPos.y+e.layoutInfo.height&&(o=t.editorPos.y+e.layoutInfo.height-1);var r=new fu(t.pos.x,o),s=this._actualDoHitTestWithCaretRangeFromPoint(e,r.toClientCoordinates());return s.position?s:this._actualDoHitTestWithCaretRangeFromPoint(e,t.pos.toClientCoordinates())},e._actualDoHitTestWithCaretRangeFromPoint=function(e,t){var n=document.caretRangeFromPoint(t.clientX,t.clientY);if(!n||!n.startContainer)return{position:null,hitTarget:null};var i,o=n.startContainer;if(o.nodeType===o.TEXT_NODE){var r=(a=(s=o.parentNode)?s.parentNode:null)?a.parentNode:null;if((r&&r.nodeType===r.ELEMENT_NODE?r.className:null)===Zu.CLASS_NAME)return{position:e.getPositionFromDOMInfo(s,n.startOffset),hitTarget:null};i=o.parentNode}else if(o.nodeType===o.ELEMENT_NODE){var s,a;if(((a=(s=o.parentNode)?s.parentNode:null)&&a.nodeType===a.ELEMENT_NODE?a.className:null)===Zu.CLASS_NAME)return{position:e.getPositionFromDOMInfo(o,o.textContent.length),hitTarget:null};i=o}return{position:null,hitTarget:i}},e._doHitTestWithCaretPositionFromPoint=function(e,t){var n=document.caretPositionFromPoint(t.clientX,t.clientY);if(n.offsetNode.nodeType===n.offsetNode.TEXT_NODE){var i=n.offsetNode.parentNode,o=i?i.parentNode:null,r=o?o.parentNode:null;return(r&&r.nodeType===r.ELEMENT_NODE?r.className:null)===Zu.CLASS_NAME?{position:e.getPositionFromDOMInfo(n.offsetNode.parentNode,n.offset),hitTarget:null}:{position:null,hitTarget:n.offsetNode.parentNode}}return{position:null,hitTarget:n.offsetNode}},e._doHitTestWithMoveToPoint=function(e,t){var n=null,i=null,o=document.body.createTextRange();try{o.moveToPoint(t.clientX,t.clientY)}catch(e){return{position:null,hitTarget:null}}o.collapse(!0);var r=o?o.parentElement():null,s=r?r.parentNode:null,a=s?s.parentNode:null;if((a&&a.nodeType===a.ELEMENT_NODE?a.className:"")===Zu.CLASS_NAME){var u=o.duplicate();u.moveToElementText(r),u.setEndPoint("EndToStart",o),n=e.getPositionFromDOMInfo(r,u.text.length),u.moveToElementText(e.viewDomNode)}else i=r;return o.moveToElementText(e.viewDomNode),{position:n,hitTarget:i}},e._doHitTest=function(e,t){return document.caretRangeFromPoint?this._doHitTestWithCaretRangeFromPoint(e,t):document.caretPositionFromPoint?this._doHitTestWithCaretPositionFromPoint(e,t.pos.toClientCoordinates()):document.body.createTextRange?this._doHitTestWithMoveToPoint(e,t.pos.toClientCoordinates()):{position:null,hitTarget:null}},e}(),rl=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();function sl(e){return function(t,n){var i=!1;return e&&(i=e.mouseTargetIsWidget(n)),i||n.preventDefault(),n}}var al=function(e){function t(n,i,o){var r=e.call(this)||this;r._isFocused=!1,r._context=n,r.viewController=i,r.viewHelper=o,r.mouseTargetFactory=new ol(r._context,o),r._mouseDownOperation=r._register(new ul(r._context,r.viewController,r.viewHelper,(function(e,t){return r._createMouseTarget(e,t)}),(function(e){return r._getMouseColumn(e)}))),r._asyncFocus=r._register(new Ct((function(){return r.viewHelper.focusTextArea()}),0)),r.lastMouseLeaveTime=-1;var s=new bu(r.viewHelper.viewDomNode);r._register(s.onContextMenu(r.viewHelper.viewDomNode,(function(e){return r._onContextMenu(e,!0)}))),r._register(s.onMouseMoveThrottled(r.viewHelper.viewDomNode,(function(e){return r._onMouseMove(e)}),sl(r.mouseTargetFactory),t.MOUSE_MOVE_MINIMUM_TIME)),r._register(s.onMouseUp(r.viewHelper.viewDomNode,(function(e){return r._onMouseUp(e)}))),r._register(s.onMouseLeave(r.viewHelper.viewDomNode,(function(e){return r._onMouseLeave(e)}))),r._register(s.onMouseDown(r.viewHelper.viewDomNode,(function(e){return r._onMouseDown(e)})));var a=function(e){if(r._context.configuration.editor.viewInfo.mouseWheelZoom){var t=new Kt(e);if(t.browserEvent.ctrlKey||t.browserEvent.metaKey){var n=Si.getZoomLevel(),i=t.deltaY>0?1:-1;Si.setZoomLevel(n+i),t.preventDefault(),t.stopPropagation()}}};return r._register(cn(r.viewHelper.viewDomNode,"mousewheel",a,!0)),r._register(cn(r.viewHelper.viewDomNode,"DOMMouseScroll",a,!0)),r._context.addEventHandler(r),r}return rl(t,e),t.prototype.dispose=function(){this._context.removeEventHandler(this),e.prototype.dispose.call(this)},t.prototype.onCursorStateChanged=function(e){return this._mouseDownOperation.onCursorStateChanged(e),!1},t.prototype.onFocusChanged=function(e){return this._isFocused=e.isFocused,!1},t.prototype.onScrollChanged=function(e){return this._mouseDownOperation.onScrollChanged(),!1},t.prototype.getTargetAtClientPoint=function(e,t){var n=new pu(e,t).toPageCoordinates(),i=mu(this.viewHelper.viewDomNode);if(n.yi.y+i.height||n.xi.x+i.width)return null;var o=this.viewHelper.getLastViewCursorsRenderData();return this.mouseTargetFactory.createMouseTarget(o,i,n,null)},t.prototype._createMouseTarget=function(e,t){var n=this.viewHelper.getLastViewCursorsRenderData();return this.mouseTargetFactory.createMouseTarget(n,e.editorPos,e.pos,t?e.target:null)},t.prototype._getMouseColumn=function(e){return this.mouseTargetFactory.getMouseColumn(e.editorPos,e.pos)},t.prototype._onContextMenu=function(e,t){this.viewController.emitContextMenu({event:e,target:this._createMouseTarget(e,t)})},t.prototype._onMouseMove=function(e){this._mouseDownOperation.isActive()||e.timestampt.y+t.height){var u,l;if(s=i.getCurrentScrollTop()+(e.posy-t.y),(u=el.getZoneAtCoord(this._context,s))&&(l=this._helpPositionJumpOverViewZone(u)))return new Xu(null,su.OUTSIDE_EDITOR,o,l);var c=i.getLineNumberAtVerticalOffset(s);return new Xu(null,su.OUTSIDE_EDITOR,o,new r.y(c,n.getLineMaxColumn(c)))}var h=i.getLineNumberAtVerticalOffset(i.getCurrentScrollTop()+(e.posy-t.y));return e.posxt.x+t.width?new Xu(null,su.OUTSIDE_EDITOR,o,new r.y(h,n.getLineMaxColumn(h))):null},t.prototype._findMousePosition=function(e,t){var n=this._getPositionOutsideEditor(e);if(n)return n;var i=this._createMouseTarget(e,t);if(!i.position)return null;if(i.type===su.CONTENT_VIEW_ZONE||i.type===su.GUTTER_VIEW_ZONE){var o=this._helpPositionJumpOverViewZone(i.detail);if(o)return new Xu(i.element,i.type,i.mouseColumn,o,null,i.detail)}return i},t.prototype._helpPositionJumpOverViewZone=function(e){var t=new r.y(this._currentSelection.selectionStartLineNumber,this._currentSelection.selectionStartColumn),n=e.positionBefore,i=e.positionAfter;return n&&i?n.isBefore(t)?n:i:null},t.prototype._dispatchMouse=function(e,t){this._viewController.dispatchMouse({position:e.position,mouseColumn:e.mouseColumn,startedOnLineNumbers:this._mouseState.startedOnLineNumbers,inSelectionMode:t,mouseDownCount:this._mouseState.count,altKey:this._mouseState.altKey,ctrlKey:this._mouseState.ctrlKey,metaKey:this._mouseState.metaKey,shiftKey:this._mouseState.shiftKey,leftButton:this._mouseState.leftButton,middleButton:this._mouseState.middleButton})},t}(I.jG),ll=function(){function e(){this._altKey=!1,this._ctrlKey=!1,this._metaKey=!1,this._shiftKey=!1,this._leftButton=!1,this._middleButton=!1,this._startedOnLineNumbers=!1,this._lastMouseDownPosition=null,this._lastMouseDownPositionEqualCount=0,this._lastMouseDownCount=0,this._lastSetMouseDownCountTime=0,this.isDragAndDrop=!1}return Object.defineProperty(e.prototype,"altKey",{get:function(){return this._altKey},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"ctrlKey",{get:function(){return this._ctrlKey},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"metaKey",{get:function(){return this._metaKey},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"shiftKey",{get:function(){return this._shiftKey},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"leftButton",{get:function(){return this._leftButton},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"middleButton",{get:function(){return this._middleButton},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"startedOnLineNumbers",{get:function(){return this._startedOnLineNumbers},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"count",{get:function(){return this._lastMouseDownCount},enumerable:!0,configurable:!0}),e.prototype.setModifiers=function(e){this._altKey=e.altKey,this._ctrlKey=e.ctrlKey,this._metaKey=e.metaKey,this._shiftKey=e.shiftKey},e.prototype.setStartButtons=function(e){this._leftButton=e.leftButton,this._middleButton=e.middleButton},e.prototype.setStartedOnLineNumbers=function(e){this._startedOnLineNumbers=e},e.prototype.trySetCount=function(t,n){var i=(new Date).getTime();i-this._lastSetMouseDownCountTime>e.CLEAR_MOUSE_DOWN_COUNT_TIME&&(t=1),this._lastSetMouseDownCountTime=i,t>this._lastMouseDownCount+1&&(t=this._lastMouseDownCount+1),this._lastMouseDownPosition&&this._lastMouseDownPosition.equals(n)?this._lastMouseDownPositionEqualCount++:this._lastMouseDownPositionEqualCount=1,this._lastMouseDownPosition=n,this._lastMouseDownCount=Math.min(t,this._lastMouseDownPositionEqualCount)},e.CLEAR_MOUSE_DOWN_COUNT_TIME=400,e}(),cl=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();function hl(e,t){var n={translationY:t.translationY,translationX:t.translationX};return e&&(n.translationY+=e.translationY,n.translationX+=e.translationX),n}var dl=function(e){function t(t,n,i){var o=e.call(this,t,n,i)||this;return o.viewHelper.linesContentDomNode.style.msTouchAction="none",o.viewHelper.linesContentDomNode.style.msContentZooming="none",o._installGestureHandlerTimeout=window.setTimeout((function(){if(o._installGestureHandlerTimeout=-1,window.MSGesture){var e=new MSGesture,t=new MSGesture;e.target=o.viewHelper.linesContentDomNode,t.target=o.viewHelper.linesContentDomNode,o.viewHelper.linesContentDomNode.addEventListener("MSPointerDown",(function(n){var i=n.pointerType;i!==(n.MSPOINTER_TYPE_MOUSE||"mouse")?i===(n.MSPOINTER_TYPE_TOUCH||"touch")?(o._lastPointerType="touch",e.addPointer(n.pointerId)):(o._lastPointerType="pen",t.addPointer(n.pointerId)):o._lastPointerType="mouse"})),o._register(Sn(o.viewHelper.linesContentDomNode,"MSGestureChange",(function(e){return o._onGestureChange(e)}),hl)),o._register(cn(o.viewHelper.linesContentDomNode,"MSGestureTap",(function(e){return o._onCaptureGestureTap(e)}),!0))}}),100),o._lastPointerType="mouse",o}return cl(t,e),t.prototype._onMouseDown=function(t){"mouse"===this._lastPointerType&&e.prototype._onMouseDown.call(this,t)},t.prototype._onCaptureGestureTap=function(e){var t=this,n=new yu(e,this.viewHelper.viewDomNode),i=this._createMouseTarget(n,!1);i.position&&this.viewController.moveTo(i.position),n.browserEvent.fromElement?(n.preventDefault(),this.viewHelper.focusTextArea()):setTimeout((function(){t.viewHelper.focusTextArea()}))},t.prototype._onGestureChange=function(e){this._context.viewLayout.deltaScrollNow(-e.translationX,-e.translationY)},t.prototype.dispose=function(){window.clearTimeout(this._installGestureHandlerTimeout),e.prototype.dispose.call(this)},t}(al),fl=function(e){function t(t,n,i){var o=e.call(this,t,n,i)||this;return o.viewHelper.linesContentDomNode.style.touchAction="none",o._installGestureHandlerTimeout=window.setTimeout((function(){if(o._installGestureHandlerTimeout=-1,window.MSGesture){var e=new MSGesture,t=new MSGesture;e.target=o.viewHelper.linesContentDomNode,t.target=o.viewHelper.linesContentDomNode,o.viewHelper.linesContentDomNode.addEventListener("pointerdown",(function(n){var i=n.pointerType;"mouse"!==i?"touch"===i?(o._lastPointerType="touch",e.addPointer(n.pointerId)):(o._lastPointerType="pen",t.addPointer(n.pointerId)):o._lastPointerType="mouse"})),o._register(Sn(o.viewHelper.linesContentDomNode,"MSGestureChange",(function(e){return o._onGestureChange(e)}),hl)),o._register(cn(o.viewHelper.linesContentDomNode,"MSGestureTap",(function(e){return o._onCaptureGestureTap(e)}),!0))}}),100),o._lastPointerType="mouse",o}return cl(t,e),t.prototype._onMouseDown=function(t){"mouse"===this._lastPointerType&&e.prototype._onMouseDown.call(this,t)},t.prototype._onCaptureGestureTap=function(e){var t=this,n=new yu(e,this.viewHelper.viewDomNode),i=this._createMouseTarget(n,!1);i.position&&this.viewController.moveTo(i.position),n.browserEvent.fromElement?(n.preventDefault(),this.viewHelper.focusTextArea()):setTimeout((function(){t.viewHelper.focusTextArea()}))},t.prototype._onGestureChange=function(e){this._context.viewLayout.deltaScrollNow(-e.translationX,-e.translationY)},t.prototype.dispose=function(){window.clearTimeout(this._installGestureHandlerTimeout),e.prototype.dispose.call(this)},t}(al),pl=function(e){function t(t,n,i){var o=e.call(this,t,n,i)||this;return au.addTarget(o.viewHelper.linesContentDomNode),o._register(cn(o.viewHelper.linesContentDomNode,iu.Tap,(function(e){return o.onTap(e)}))),o._register(cn(o.viewHelper.linesContentDomNode,iu.Change,(function(e){return o.onChange(e)}))),o._register(cn(o.viewHelper.linesContentDomNode,iu.Contextmenu,(function(e){return o._onContextMenu(new yu(e,o.viewHelper.viewDomNode),!1)}))),o}return cl(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this)},t.prototype.onTap=function(e){e.preventDefault(),this.viewHelper.focusTextArea();var t=this._createMouseTarget(new yu(e,this.viewHelper.viewDomNode),!1);t.position&&this.viewController.moveTo(t.position)},t.prototype.onChange=function(e){this._context.viewLayout.deltaScrollNow(-e.translationX,-e.translationY)},t}(al),gl=function(){function e(e,t,n){window.navigator.msPointerEnabled?this.handler=new dl(e,t,n):window.TouchEvent?this.handler=new pl(e,t,n):window.navigator.pointerEnabled||window.PointerEvent?this.handler=new fl(e,t,n):this.handler=new al(e,t,n)}return e.prototype.getTargetAtClientPoint=function(e,t){return this.handler.getTargetAtClientPoint(e,t)},e.prototype.dispose=function(){this.handler.dispose()},e}(),ml=function(){function e(e,t,n,i,o){this.configuration=e,this.viewModel=t,this._execCoreEditorCommandFunc=n,this.outgoingEvents=i,this.commandDelegate=o}return e.prototype._execMouseCommand=function(e,t){t.source="mouse",this._execCoreEditorCommandFunc(e,t)},e.prototype.paste=function(e,t,n,i){this.commandDelegate.paste(e,t,n,i)},e.prototype.type=function(e,t){this.commandDelegate.type(e,t)},e.prototype.replacePreviousChar=function(e,t,n){this.commandDelegate.replacePreviousChar(e,t,n)},e.prototype.compositionStart=function(e){this.commandDelegate.compositionStart(e)},e.prototype.compositionEnd=function(e){this.commandDelegate.compositionEnd(e)},e.prototype.cut=function(e){this.commandDelegate.cut(e)},e.prototype.setSelection=function(e,t){this._execCoreEditorCommandFunc(We.SetSelection,{source:e,selection:t})},e.prototype._validateViewColumn=function(e){var t=this.viewModel.getLineMinColumn(e.lineNumber);return e.column=4?this.selectAll():3===e.mouseDownCount?this._hasMulticursorModifier(e)?e.inSelectionMode?this.lastCursorLineSelectDrag(e.position):this.lastCursorLineSelect(e.position):e.inSelectionMode?this.lineSelectDrag(e.position):this.lineSelect(e.position):2===e.mouseDownCount?this._hasMulticursorModifier(e)?this.lastCursorWordSelect(e.position):e.inSelectionMode?this.wordSelectDrag(e.position):this.wordSelect(e.position):this._hasMulticursorModifier(e)?this._hasNonMulticursorModifier(e)||(e.shiftKey?this.columnSelect(e.position,e.mouseColumn):e.inSelectionMode?this.lastCursorMoveToSelect(e.position):this.createCursor(e.position,!1)):e.inSelectionMode?this.moveToSelect(e.position):this.moveTo(e.position)},e.prototype._usualArgs=function(e){return e=this._validateViewColumn(e),{position:this.convertViewToModelPosition(e),viewPosition:e}},e.prototype.moveTo=function(e){this._execMouseCommand(We.MoveTo,this._usualArgs(e))},e.prototype.moveToSelect=function(e){this._execMouseCommand(We.MoveToSelect,this._usualArgs(e))},e.prototype.columnSelect=function(e,t){e=this._validateViewColumn(e),this._execMouseCommand(We.ColumnSelect,{position:this.convertViewToModelPosition(e),viewPosition:e,mouseColumn:t})},e.prototype.createCursor=function(e,t){e=this._validateViewColumn(e),this._execMouseCommand(We.CreateCursor,{position:this.convertViewToModelPosition(e),viewPosition:e,wholeLine:t})},e.prototype.lastCursorMoveToSelect=function(e){this._execMouseCommand(We.LastCursorMoveToSelect,this._usualArgs(e))},e.prototype.wordSelect=function(e){this._execMouseCommand(We.WordSelect,this._usualArgs(e))},e.prototype.wordSelectDrag=function(e){this._execMouseCommand(We.WordSelectDrag,this._usualArgs(e))},e.prototype.lastCursorWordSelect=function(e){this._execMouseCommand(We.LastCursorWordSelect,this._usualArgs(e))},e.prototype.lineSelect=function(e){this._execMouseCommand(We.LineSelect,this._usualArgs(e))},e.prototype.lineSelectDrag=function(e){this._execMouseCommand(We.LineSelectDrag,this._usualArgs(e))},e.prototype.lastCursorLineSelect=function(e){this._execMouseCommand(We.LastCursorLineSelect,this._usualArgs(e))},e.prototype.lastCursorLineSelectDrag=function(e){this._execMouseCommand(We.LastCursorLineSelectDrag,this._usualArgs(e))},e.prototype.selectAll=function(){this._execMouseCommand(We.SelectAll,{})},e.prototype.convertViewToModelPosition=function(e){return this.viewModel.coordinatesConverter.convertViewPositionToModelPosition(e)},e.prototype.emitKeyDown=function(e){this.outgoingEvents.emitKeyDown(e)},e.prototype.emitKeyUp=function(e){this.outgoingEvents.emitKeyUp(e)},e.prototype.emitContextMenu=function(e){this.outgoingEvents.emitContextMenu(e)},e.prototype.emitMouseMove=function(e){this.outgoingEvents.emitMouseMove(e)},e.prototype.emitMouseLeave=function(e){this.outgoingEvents.emitMouseLeave(e)},e.prototype.emitMouseUp=function(e){this.outgoingEvents.emitMouseUp(e)},e.prototype.emitMouseDown=function(e){this.outgoingEvents.emitMouseDown(e)},e.prototype.emitMouseDrag=function(e){this.outgoingEvents.emitMouseDrag(e)},e.prototype.emitMouseDrop=function(e){this.outgoingEvents.emitMouseDrop(e)},e}(),vl=function(){function e(e){this._eventHandlerGateKeeper=e,this._eventHandlers=[],this._eventQueue=null,this._isConsumingQueue=!1}return e.prototype.addEventHandler=function(e){for(var t=0,n=this._eventHandlers.length;t=this._lines.length)throw new Error("Illegal value for lineNumber");return this._lines[t]},e.prototype.onLinesDeleted=function(e,t){if(0===this.getCount())return null;var n=this.getStartLineNumber(),i=this.getEndLineNumber();if(ti)return null;for(var r=0,s=0,a=n;a<=i;a++){var u=a-this._rendLineNumberStart;e<=a&&a<=t&&(0===s?(r=u,s=1):s++)}if(e=n&&r<=i&&(this._lines[r-this._rendLineNumberStart].onContentChanged(),o=!0);return o},e.prototype.onLinesInserted=function(e,t){if(0===this.getCount())return null;var n=t-e+1,i=this.getStartLineNumber(),o=this.getEndLineNumber();if(e<=i)return this._rendLineNumberStart+=n,null;if(e>o)return null;if(n+e>o)return this._lines.splice(e-this._rendLineNumberStart,o-e+1);for(var r=[],s=0;sn))for(var a=Math.max(t,s.fromLineNumber),u=Math.min(n,s.toLineNumber),l=a;l<=u;l++){var c=l-this._rendLineNumberStart;this._lines[c].onTokensChanged(),i=!0}}return i},e}(),bl=function(){function e(e){var t=this;this._host=e,this.domNode=this._createDomNode(),this._linesCollection=new yl((function(){return t._host.createVisibleLine()}))}return e.prototype._createDomNode=function(){var e=Ar(document.createElement("div"));return e.setClassName("view-layer"),e.setPosition("absolute"),e.domNode.setAttribute("role","presentation"),e.domNode.setAttribute("aria-hidden","true"),e},e.prototype.onConfigurationChanged=function(e){return e.layoutInfo},e.prototype.onFlushed=function(e){return this._linesCollection.flush(),!0},e.prototype.onLinesChanged=function(e){return this._linesCollection.onLinesChanged(e.fromLineNumber,e.toLineNumber)},e.prototype.onLinesDeleted=function(e){var t=this._linesCollection.onLinesDeleted(e.fromLineNumber,e.toLineNumber);if(t)for(var n=0,i=t.length;nt?(u=t)<=(s=Math.min(n,o.rendLineNumberStart-1))&&(this._insertLinesBefore(o,u,s,i,t),o.linesLength+=s-u+1):o.rendLineNumberStart0&&(this._removeLinesBefore(o,a),o.linesLength-=a),o.rendLineNumberStart=t,o.rendLineNumberStart+o.linesLength-1n){var s,a,u=Math.max(0,n-o.rendLineNumberStart+1);(a=(s=o.linesLength-1)-u+1)>0&&(this._removeLinesAfter(o,a),o.linesLength-=a)}return this._finishRendering(o,!1,i),o},e.prototype._renderUntouchedLines=function(e,t,n,i,o){for(var r=e.rendLineNumberStart,s=e.lines,a=t;a<=n;a++){var u=r+a;s[a].layoutLine(u,i[u-o])}},e.prototype._insertLinesBefore=function(e,t,n,i,o){for(var r=[],s=0,a=t;a<=n;a++)r[s++]=this.host.createVisibleLine();e.lines=r.concat(e.lines)},e.prototype._removeLinesBefore=function(e,t){for(var n=0;n=0;s--){var a=e.lines[s];i[s]&&(a.setDomNode(r),r=r.previousSibling)}},e.prototype._finishRenderingInvalidLines=function(e,t,n){var i=document.createElement("div");i.innerHTML=t;for(var o=0;o'),i.appendASCIIString(o),i.appendASCIIString(""),!0)},e.prototype.layoutLine=function(e,t){this._domNode&&(this._domNode.setTop(t),this._domNode.setHeight(this._lineHeight))},e}(),Sl=function(e){function t(t){var n=e.call(this,t)||this;return n._contentWidth=n._context.configuration.editor.layoutInfo.contentWidth,n.domNode.setHeight(0),n}return wl(t,e),t.prototype.onConfigurationChanged=function(t){return t.layoutInfo&&(this._contentWidth=this._context.configuration.editor.layoutInfo.contentWidth),e.prototype.onConfigurationChanged.call(this,t)},t.prototype.onScrollChanged=function(t){return e.prototype.onScrollChanged.call(this,t)||t.scrollWidthChanged},t.prototype._viewOverlaysRender=function(t){e.prototype._viewOverlaysRender.call(this,t),this.domNode.setWidth(Math.max(t.scrollWidth,this._contentWidth))},t}(Ml),Ll=function(e){function t(t){var n=e.call(this,t)||this;return n._contentLeft=n._context.configuration.editor.layoutInfo.contentLeft,n.domNode.setClassName("margin-view-overlays"),n.domNode.setWidth(1),Ji.applyFontInfo(n.domNode,n._context.configuration.editor.fontInfo),n}return wl(t,e),t.prototype.onConfigurationChanged=function(t){var n=!1;return t.fontInfo&&(Ji.applyFontInfo(this.domNode,this._context.configuration.editor.fontInfo),n=!0),t.layoutInfo&&(this._contentLeft=this._context.configuration.editor.layoutInfo.contentLeft,n=!0),e.prototype.onConfigurationChanged.call(this,t)||n},t.prototype.onScrollChanged=function(t){return e.prototype.onScrollChanged.call(this,t)||t.scrollHeightChanged},t.prototype._viewOverlaysRender=function(t){e.prototype._viewOverlaysRender.call(this,t);var n=Math.min(t.scrollHeight,1e6);this.domNode.setHeight(n),this.domNode.setWidth(this._contentLeft)},t}(Ml),Il=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Nl=function(e,t){this.top=e,this.left=t},xl=function(e){function t(t,n){var i=e.call(this,t)||this;return i._viewDomNode=n,i._widgets={},i.domNode=Ar(document.createElement("div")),Yr.write(i.domNode,1),i.domNode.setClassName("contentWidgets"),i.domNode.setPosition("absolute"),i.domNode.setTop(0),i.overflowingContentWidgetsDomNode=Ar(document.createElement("div")),Yr.write(i.overflowingContentWidgetsDomNode,2),i.overflowingContentWidgetsDomNode.setClassName("overflowingContentWidgets"),i}return Il(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this),this._widgets=null,this.domNode=null},t.prototype.onConfigurationChanged=function(e){for(var t=Object.keys(this._widgets),n=0,i=t.length;n=n,l=s,c=i.viewportHeight-s>=n,h=e.left;return h+t>i.scrollLeft+i.viewportWidth&&(h=i.scrollLeft+i.viewportWidth-t),hthis._contentWidth)return null;var r,s=e.top-n,a=e.top+this._lineHeight,u=o+this._contentLeft,l=Tn(this._viewDomNode.domNode),c=l.top+s-En.scrollY,h=l.top+a-En.scrollY,d=l.left+u-En.scrollX,f=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,p=c>=22,g=h+n<=(window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight)-22;return d+t+20>f&&(d-=r=d-(f-t-20),u-=r),d<0&&(d-=r=d,u-=r),this._fixedOverflowWidgets&&(s=c,a=h,u=d),{aboveTop:s,fitsAbove:p,belowTop:a,fitsBelow:g,left:u}},e.prototype._prepareRenderWidgetAtExactPositionOverflowing=function(e){return new Nl(e.top,e.left+this._contentLeft)},e.prototype._getTopLeft=function(e){if(!this._viewPosition)return null;var t=e.visibleRangeForPosition(this._viewPosition);if(!t)return null;var n=e.getVerticalOffsetForLineNumber(this._viewPosition.lineNumber)-e.scrollTop;return new Nl(n,t.left)},e.prototype._prepareRenderWidget=function(e,t){var n=this;if(!e)return null;for(var i=null,o=function(){if(!i){if(-1===n._cachedDomNodeClientWidth||-1===n._cachedDomNodeClientHeight){var o=n.domNode.domNode;n._cachedDomNodeClientWidth=o.clientWidth,n._cachedDomNodeClientHeight=o.clientHeight}i=n.allowEditorOverflow?n._layoutBoxInPage(e,n._cachedDomNodeClientWidth,n._cachedDomNodeClientHeight,t):n._layoutBoxInViewport(e,n._cachedDomNodeClientWidth,n._cachedDomNodeClientHeight,t)}},r=1;r<=2;r++)for(var s=0;se.endLineNumber||this.domNode.setMaxWidth(this._maxWidth))},e.prototype.prepareRender=function(e){var t=this._getTopLeft(e);this._renderData=this._prepareRenderWidget(t,e)},e.prototype.render=function(e){this._renderData?(this.allowEditorOverflow?(this.domNode.setTop(this._renderData.top),this.domNode.setLeft(this._renderData.left)):(this.domNode.setTop(this._renderData.top+e.scrollTop-e.bigNumbersDelta),this.domNode.setLeft(this._renderData.left)),this._isVisible||(this.domNode.setVisibility("inherit"),this.domNode.setAttribute("monaco-visible-content-widget","true"),this._isVisible=!0)):this._isVisible&&(this.domNode.removeAttribute("monaco-visible-content-widget"),this._isVisible=!1,this.domNode.setVisibility("hidden"))},e}(),kl=(n(4188),function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}()),Tl=function(e){function t(t){var n=e.call(this)||this;return n._context=t,n._lineHeight=n._context.configuration.editor.lineHeight,n._renderLineHighlight=n._context.configuration.editor.viewInfo.renderLineHighlight,n._selectionIsEmpty=!0,n._primaryCursorLineNumber=1,n._scrollWidth=0,n._contentWidth=n._context.configuration.editor.layoutInfo.contentWidth,n._context.addEventHandler(n),n}return kl(t,e),t.prototype.dispose=function(){this._context.removeEventHandler(this),this._context=null,e.prototype.dispose.call(this)},t.prototype.onConfigurationChanged=function(e){return e.lineHeight&&(this._lineHeight=this._context.configuration.editor.lineHeight),e.viewInfo&&(this._renderLineHighlight=this._context.configuration.editor.viewInfo.renderLineHighlight),e.layoutInfo&&(this._contentWidth=this._context.configuration.editor.layoutInfo.contentWidth),!0},t.prototype.onCursorStateChanged=function(e){var t=!1,n=e.selections[0].positionLineNumber;this._primaryCursorLineNumber!==n&&(this._primaryCursorLineNumber=n,t=!0);var i=e.selections[0].isEmpty();return this._selectionIsEmpty!==i?(this._selectionIsEmpty=i,t=!0,!0):t},t.prototype.onFlushed=function(e){return!0},t.prototype.onLinesDeleted=function(e){return!0},t.prototype.onLinesInserted=function(e){return!0},t.prototype.onScrollChanged=function(e){return e.scrollWidthChanged},t.prototype.onZonesChanged=function(e){return!0},t.prototype.prepareRender=function(e){this._scrollWidth=e.scrollWidth},t.prototype.render=function(e,t){return t===this._primaryCursorLineNumber&&this._shouldShowCurrentLine()?'
    ':""},t.prototype._shouldShowCurrentLine=function(){return("line"===this._renderLineHighlight||"all"===this._renderLineHighlight)&&this._selectionIsEmpty},t.prototype._willRenderMarginCurrentLine=function(){return"gutter"===this._renderLineHighlight||"all"===this._renderLineHighlight},t}(Ga);Tr((function(e,t){var n=e.getColor(ga);if(n&&t.addRule(".monaco-editor .view-overlays .current-line { background-color: "+n+"; }"),!n||n.isTransparent()||e.defines(ma)){var i=e.getColor(ma);i&&(t.addRule(".monaco-editor .view-overlays .current-line { border: 2px solid "+i+"; }"),"hc"===e.type&&t.addRule(".monaco-editor .view-overlays .current-line { border-width: 1px; }"))}})),n(7052);var El=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Al=function(e){function t(t){var n=e.call(this)||this;return n._context=t,n._lineHeight=n._context.configuration.editor.lineHeight,n._renderLineHighlight=n._context.configuration.editor.viewInfo.renderLineHighlight,n._selectionIsEmpty=!0,n._primaryCursorLineNumber=1,n._contentLeft=n._context.configuration.editor.layoutInfo.contentLeft,n._context.addEventHandler(n),n}return El(t,e),t.prototype.dispose=function(){this._context.removeEventHandler(this),this._context=null,e.prototype.dispose.call(this)},t.prototype.onConfigurationChanged=function(e){return e.lineHeight&&(this._lineHeight=this._context.configuration.editor.lineHeight),e.viewInfo&&(this._renderLineHighlight=this._context.configuration.editor.viewInfo.renderLineHighlight),e.layoutInfo&&(this._contentLeft=this._context.configuration.editor.layoutInfo.contentLeft),!0},t.prototype.onCursorStateChanged=function(e){var t=!1,n=e.selections[0].positionLineNumber;this._primaryCursorLineNumber!==n&&(this._primaryCursorLineNumber=n,t=!0);var i=e.selections[0].isEmpty();return this._selectionIsEmpty!==i?(this._selectionIsEmpty=i,t=!0,!0):t},t.prototype.onFlushed=function(e){return!0},t.prototype.onLinesDeleted=function(e){return!0},t.prototype.onLinesInserted=function(e){return!0},t.prototype.onZonesChanged=function(e){return!0},t.prototype.prepareRender=function(e){},t.prototype.render=function(e,t){if(t===this._primaryCursorLineNumber){var n="current-line";return this._shouldShowCurrentLine()&&(n="current-line current-line-margin"+(this._willRenderContentCurrentLine()?" current-line-margin-both":"")),'
    '}return""},t.prototype._shouldShowCurrentLine=function(){return"gutter"===this._renderLineHighlight||"all"===this._renderLineHighlight},t.prototype._willRenderContentCurrentLine=function(){return("line"===this._renderLineHighlight||"all"===this._renderLineHighlight)&&this._selectionIsEmpty},t}(Ga);Tr((function(e,t){var n=e.getColor(ga);if(n)t.addRule(".monaco-editor .margin-view-overlays .current-line-margin { background-color: "+n+"; border: none; }");else{var i=e.getColor(ma);i&&t.addRule(".monaco-editor .margin-view-overlays .current-line-margin { border: 2px solid "+i+"; }"),"hc"===e.type&&t.addRule(".monaco-editor .margin-view-overlays .current-line-margin { border-width: 1px; }")}})),n(2612);var jl=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Ol=function(e){function t(t){var n=e.call(this)||this;return n._context=t,n._lineHeight=n._context.configuration.editor.lineHeight,n._typicalHalfwidthCharacterWidth=n._context.configuration.editor.fontInfo.typicalHalfwidthCharacterWidth,n._renderResult=null,n._context.addEventHandler(n),n}return jl(t,e),t.prototype.dispose=function(){this._context.removeEventHandler(this),this._context=null,this._renderResult=null,e.prototype.dispose.call(this)},t.prototype.onConfigurationChanged=function(e){return e.lineHeight&&(this._lineHeight=this._context.configuration.editor.lineHeight),e.fontInfo&&(this._typicalHalfwidthCharacterWidth=this._context.configuration.editor.fontInfo.typicalHalfwidthCharacterWidth),!0},t.prototype.onDecorationsChanged=function(e){return!0},t.prototype.onFlushed=function(e){return!0},t.prototype.onLinesChanged=function(e){return!0},t.prototype.onLinesDeleted=function(e){return!0},t.prototype.onLinesInserted=function(e){return!0},t.prototype.onScrollChanged=function(e){return e.scrollTopChanged||e.scrollWidthChanged},t.prototype.onZonesChanged=function(e){return!0},t.prototype.prepareRender=function(e){for(var t=e.getDecorationsInViewport(),n=[],i=0,o=0,r=t.length;ot.options.zIndex)return 1;var n=e.options.className,i=t.options.className;return ni?1:s.Q.compareRangesUsingStarts(e.range,t.range)}));for(var u=e.visibleRange.startLineNumber,l=e.visibleRange.endLineNumber,c=[],h=u;h<=l;h++)c[h-u]="";this._renderWholeLineDecorations(e,n,c),this._renderNormalDecorations(e,n,c),this._renderResult=c},t.prototype._renderWholeLineDecorations=function(e,t,n){for(var i=String(this._lineHeight),o=e.visibleRange.startLineNumber,r=e.visibleRange.endLineNumber,s=0,a=t.length;s',c=Math.max(u.range.startLineNumber,o),h=Math.min(u.range.endLineNumber,r),d=c;d<=h;d++)n[d-o]+=l}},t.prototype._renderNormalDecorations=function(e,t,n){for(var i=String(this._lineHeight),o=e.visibleRange.startLineNumber,r=null,a=!1,u=null,l=0,c=t.length;l';s[h]+=m}}},t.prototype.render=function(e,t){if(!this._renderResult)return"";var n=t-e;return n<0||n>=this._renderResult.length?"":this._renderResult[n]},t}(Ga),Rl=(n(9632),function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}()),Pl=function(e,t,n){this.startLineNumber=+e,this.endLineNumber=+t,this.className=String(n)},zl=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Rl(t,e),t.prototype._render=function(e,t,n){for(var i=[],o=e;o<=t;o++)i[o-e]=[];if(0===n.length)return i;n.sort((function(e,t){return e.className===t.className?e.startLineNumber===t.startLineNumber?e.endLineNumber-t.endLineNumber:e.startLineNumber-t.startLineNumber:e.className',s=[],a=t;a<=n;a++){var u=a-t,l=i[u];0===l.length?s[u]="":s[u]='
    =this._renderResult.length?"":this._renderResult[n]},t}(zl),Fl=(n(6452),function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}()),Bl=function(e){function t(t){var n=e.call(this)||this;return n._context=t,n._primaryLineNumber=0,n._lineHeight=n._context.configuration.editor.lineHeight,n._spaceWidth=n._context.configuration.editor.fontInfo.spaceWidth,n._enabled=n._context.configuration.editor.viewInfo.renderIndentGuides,n._activeIndentEnabled=n._context.configuration.editor.viewInfo.highlightActiveIndentGuide,n._renderResult=null,n._context.addEventHandler(n),n}return Fl(t,e),t.prototype.dispose=function(){this._context.removeEventHandler(this),this._context=null,this._renderResult=null,e.prototype.dispose.call(this)},t.prototype.onConfigurationChanged=function(e){return e.lineHeight&&(this._lineHeight=this._context.configuration.editor.lineHeight),e.fontInfo&&(this._spaceWidth=this._context.configuration.editor.fontInfo.spaceWidth),e.viewInfo&&(this._enabled=this._context.configuration.editor.viewInfo.renderIndentGuides,this._activeIndentEnabled=this._context.configuration.editor.viewInfo.highlightActiveIndentGuide),!0},t.prototype.onCursorStateChanged=function(e){var t=e.selections[0],n=t.isEmpty()?t.positionLineNumber:0;return this._primaryLineNumber!==n&&(this._primaryLineNumber=n,!0)},t.prototype.onDecorationsChanged=function(e){return!0},t.prototype.onFlushed=function(e){return!0},t.prototype.onLinesChanged=function(e){return!0},t.prototype.onLinesDeleted=function(e){return!0},t.prototype.onLinesInserted=function(e){return!0},t.prototype.onScrollChanged=function(e){return e.scrollTopChanged},t.prototype.onZonesChanged=function(e){return!0},t.prototype.onLanguageConfigurationChanged=function(e){return!0},t.prototype.prepareRender=function(e){if(this._enabled){var t=e.visibleRange.startLineNumber,n=e.visibleRange.endLineNumber,i=this._context.model.getTabSize()*this._spaceWidth,o=e.scrollWidth,s=this._lineHeight,a=i,u=this._context.model.getLinesIndentGuides(t,n),l=0,c=0,h=0;if(this._activeIndentEnabled&&this._primaryLineNumber){var d=this._context.model.getActiveIndentGuide(this._primaryLineNumber,t,n);l=d.startLineNumber,c=d.endLineNumber,h=d.indent}for(var f=[],p=t;p<=n;p++){for(var g=l<=p&&p<=c,m=p-t,v=u[m],y="",b=e.visibleRangeForPosition(new r.y(p,1)),_=b?b.left:0,w=1;w<=v&&(y+='
    ',!((_+=i)>o));w++);f[m]=y}this._renderResult=f}else this._renderResult=null},t.prototype.render=function(e,t){if(!this._renderResult)return"";var n=t-e;return n<0||n>=this._renderResult.length?"":this._renderResult[n]},t}(Ga);Tr((function(e,t){var n=e.getColor(Ma);n&&t.addRule(".monaco-editor .lines-content .cigr { box-shadow: 1px 0 0 0 "+n+" inset; }");var i=e.getColor(Ca)||n;i&&t.addRule(".monaco-editor .lines-content .cigra { box-shadow: 1px 0 0 0 "+i+" inset; }")})),n(3721);var Hl=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Vl=function(){function e(){this._currentVisibleRange=new s.Q(1,1,1,1)}return e.prototype.getCurrentVisibleRange=function(){return this._currentVisibleRange},e.prototype.setCurrentVisibleRange=function(e){this._currentVisibleRange=e},e}(),Ul=function(e,t,n,i,o,r){this.lineNumber=e,this.startColumn=t,this.endColumn=n,this.startScrollTop=i,this.stopScrollTop=o,this.scrollType=r},Yl=function(e){function t(t,n){var i=e.call(this,t)||this;i._linesContent=n,i._textRangeRestingSpot=document.createElement("div"),i._visibleLines=new bl(i),i.domNode=i._visibleLines.domNode;var o=i._context.configuration;return i._lineHeight=o.editor.lineHeight,i._typicalHalfwidthCharacterWidth=o.editor.fontInfo.typicalHalfwidthCharacterWidth,i._isViewportWrapping=o.editor.wrappingInfo.isViewportWrapping,i._revealHorizontalRightPadding=o.editor.viewInfo.revealHorizontalRightPadding,i._canUseLayerHinting=o.editor.canUseLayerHinting,i._viewLineOptions=new Yu(o,i._context.theme.type),Yr.write(i.domNode,7),i.domNode.setClassName("view-lines"),Ji.applyFontInfo(i.domNode,o.editor.fontInfo),i._maxLineWidth=0,i._asyncUpdateLineWidths=new Ct((function(){i._updateLineWidthsSlow()}),200),i._lastRenderedData=new Vl,i._horizontalRevealRequest=null,i}return Hl(t,e),t.prototype.dispose=function(){this._asyncUpdateLineWidths.dispose(),e.prototype.dispose.call(this)},t.prototype.getDomNode=function(){return this.domNode},t.prototype.createVisibleLine=function(){return new Zu(this._viewLineOptions)},t.prototype.onConfigurationChanged=function(e){this._visibleLines.onConfigurationChanged(e),e.wrappingInfo&&(this._maxLineWidth=0);var t=this._context.configuration;return e.lineHeight&&(this._lineHeight=t.editor.lineHeight),e.fontInfo&&(this._typicalHalfwidthCharacterWidth=t.editor.fontInfo.typicalHalfwidthCharacterWidth),e.wrappingInfo&&(this._isViewportWrapping=t.editor.wrappingInfo.isViewportWrapping),e.viewInfo&&(this._revealHorizontalRightPadding=t.editor.viewInfo.revealHorizontalRightPadding),e.canUseLayerHinting&&(this._canUseLayerHinting=t.editor.canUseLayerHinting),e.fontInfo&&Ji.applyFontInfo(this.domNode,t.editor.fontInfo),this._onOptionsMaybeChanged(),e.layoutInfo&&(this._maxLineWidth=0),!0},t.prototype._onOptionsMaybeChanged=function(){var e=this._context.configuration,t=new Yu(e,this._context.theme.type);if(!this._viewLineOptions.equals(t)){this._viewLineOptions=t;for(var n=this._visibleLines.getStartLineNumber(),i=this._visibleLines.getEndLineNumber(),o=n;o<=i;o++)this._visibleLines.getVisibleLine(o).onOptionsChanged(this._viewLineOptions);return!0}return!1},t.prototype.onCursorStateChanged=function(e){for(var t=this._visibleLines.getStartLineNumber(),n=this._visibleLines.getEndLineNumber(),i=!1,o=t;o<=n;o++)i=this._visibleLines.getVisibleLine(o).onSelectionChanged()||i;return i},t.prototype.onDecorationsChanged=function(e){for(var t=this._visibleLines.getStartLineNumber(),n=this._visibleLines.getEndLineNumber(),i=t;i<=n;i++)this._visibleLines.getVisibleLine(i).onDecorationsChanged();return!0},t.prototype.onFlushed=function(e){var t=this._visibleLines.onFlushed(e);return this._maxLineWidth=0,t},t.prototype.onLinesChanged=function(e){return this._visibleLines.onLinesChanged(e)},t.prototype.onLinesDeleted=function(e){return this._visibleLines.onLinesDeleted(e)},t.prototype.onLinesInserted=function(e){return this._visibleLines.onLinesInserted(e)},t.prototype.onRevealRangeRequest=function(e){var t=this._computeScrollTopToRevealRange(this._context.viewLayout.getFutureViewport(),e.range,e.verticalType),n=this._context.viewLayout.validateScrollPosition({scrollTop:t});e.revealHorizontal?e.range.startLineNumber!==e.range.endLineNumber?n={scrollTop:n.scrollTop,scrollLeft:0}:this._horizontalRevealRequest=new Ul(e.range.startLineNumber,e.range.startColumn,e.range.endColumn,this._context.viewLayout.getCurrentScrollTop(),n.scrollTop,e.scrollType):this._horizontalRevealRequest=null;var i=Math.abs(this._context.viewLayout.getCurrentScrollTop()-n.scrollTop);return 0===e.scrollType&&i>this._lineHeight?this._context.viewLayout.setScrollPositionSmooth(n):this._context.viewLayout.setScrollPositionNow(n),!0},t.prototype.onScrollChanged=function(e){if(this._horizontalRevealRequest&&e.scrollLeftChanged&&(this._horizontalRevealRequest=null),this._horizontalRevealRequest&&e.scrollTopChanged){var t=Math.min(this._horizontalRevealRequest.startScrollTop,this._horizontalRevealRequest.stopScrollTop),n=Math.max(this._horizontalRevealRequest.startScrollTop,this._horizontalRevealRequest.stopScrollTop);(e.scrollTopn)&&(this._horizontalRevealRequest=null)}return this.domNode.setWidth(e.scrollWidth),this._visibleLines.onScrollChanged(e)||!0},t.prototype.onTokensChanged=function(e){return this._visibleLines.onTokensChanged(e)},t.prototype.onZonesChanged=function(e){return this._context.viewLayout.onMaxLineWidthChanged(this._maxLineWidth),this._visibleLines.onZonesChanged(e)},t.prototype.onThemeChanged=function(e){return this._onOptionsMaybeChanged()},t.prototype.getPositionFromDOMInfo=function(e,t){var n=this._getViewLineDomNode(e);if(null===n)return null;var i=this._getLineNumberFor(n);if(-1===i)return null;if(i<1||i>this._context.model.getLineCount())return null;if(1===this._context.model.getLineMaxColumn(i))return new r.y(i,1);var o=this._visibleLines.getStartLineNumber(),s=this._visibleLines.getEndLineNumber();if(is)return null;var a=this._visibleLines.getVisibleLine(i).getColumnOfNodeOffset(i,e,t),u=this._context.model.getLineMinColumn(i);return an?-1:this._visibleLines.getVisibleLine(e).getWidth()},t.prototype.linesVisibleRangesForRange=function(e,t){if(this.shouldRender())return null;var n=e.endLineNumber;if(!(e=s.Q.intersectRanges(e,this._lastRenderedData.getCurrentVisibleRange())))return null;var i,o=[],a=0,u=new Uu(this.domNode.domNode,this._textRangeRestingSpot);t&&(i=this._context.model.coordinatesConverter.convertViewPositionToModelPosition(new r.y(e.startLineNumber,1)).lineNumber);for(var l=this._visibleLines.getStartLineNumber(),c=this._visibleLines.getEndLineNumber(),h=e.startLineNumber;h<=e.endLineNumber;h++)if(!(hc)){var d=h===e.startLineNumber?e.startColumn:1,f=h===e.endLineNumber?e.endColumn:this._context.model.getLineMaxColumn(h),p=this._visibleLines.getVisibleLine(h).getVisibleRangesForRange(d,f,u);p&&0!==p.length&&(t&&ho)){var a=r===e.startLineNumber?e.startColumn:1,u=r===e.endLineNumber?e.endColumn:this._context.model.getLineMaxColumn(r),l=this._visibleLines.getVisibleLine(r).getVisibleRangesForRange(a,u,n);l&&0!==l.length&&(t=t.concat(l))}return 0===t.length?null:t},t.prototype.updateLineWidths=function(){this._updateLineWidths(!1)},t.prototype._updateLineWidthsFast=function(){return this._updateLineWidths(!0)},t.prototype._updateLineWidthsSlow=function(){this._updateLineWidths(!1)},t.prototype._updateLineWidths=function(e){for(var t=this._visibleLines.getStartLineNumber(),n=this._visibleLines.getEndLineNumber(),i=1,o=!0,r=t;r<=n;r++){var s=this._visibleLines.getVisibleLine(r);!e||s.getWidthIsFast()?i=Math.max(i,s.getWidth()):o=!1}return o&&1===t&&n===this._context.model.getLineCount()&&(this._maxLineWidth=0),this._ensureMaxLineWidth(i),o},t.prototype.prepareRender=function(){throw new Error("Not supported")},t.prototype.render=function(){throw new Error("Not supported")},t.prototype.renderText=function(e){if(this._visibleLines.renderLines(e),this._lastRenderedData.setCurrentVisibleRange(e.visibleRange),this.domNode.setWidth(this._context.viewLayout.getScrollWidth()),this.domNode.setHeight(Math.min(this._context.viewLayout.getScrollHeight(),1e6)),this._horizontalRevealRequest){var t=this._horizontalRevealRequest.lineNumber,n=this._horizontalRevealRequest.startColumn,i=this._horizontalRevealRequest.endColumn,o=this._horizontalRevealRequest.scrollType;if(e.startLineNumber<=t&&t<=e.endLineNumber){this._horizontalRevealRequest=null,this.onDidRender();var r=this._computeScrollLeftToRevealRange(t,n,i);this._isViewportWrapping||this._ensureMaxLineWidth(r.maxHorizontalOffset),0===o?this._context.viewLayout.setScrollPositionSmooth({scrollLeft:r.scrollLeft}):this._context.viewLayout.setScrollPositionNow({scrollLeft:r.scrollLeft})}}this._updateLineWidthsFast()||this._asyncUpdateLineWidths.schedule(),this._linesContent.setLayerHinting(this._canUseLayerHinting);var s=this._context.viewLayout.getCurrentScrollTop()-e.bigNumbersDelta;this._linesContent.setTop(-s),this._linesContent.setLeft(-this._context.viewLayout.getCurrentScrollLeft())},t.prototype._ensureMaxLineWidth=function(e){var t=Math.ceil(e);this._maxLineWidthh&&(h=f.left+f.width)}return o=h,c=Math.max(0,c-t.HORIZONTAL_EXTRA_PX),h+=this._revealHorizontalRightPadding,{scrollLeft:this._computeMinimumScrolling(a,u,c,h),maxHorizontalOffset:o}},t.prototype._computeMinimumScrolling=function(e,t,n,i,o,r){o=!!o,r=!!r;var s=(t|=0)-(e|=0);return(i|=0)-(n|=0)t?Math.max(0,i-s):e:n},t.HORIZONTAL_EXTRA_PX=30,t}(Ur),Zl=(n(9062),function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}()),Gl=function(e){function t(t){var n=e.call(this)||this;return n._context=t,n._decorationsLeft=n._context.configuration.editor.layoutInfo.decorationsLeft,n._decorationsWidth=n._context.configuration.editor.layoutInfo.decorationsWidth,n._renderResult=null,n._context.addEventHandler(n),n}return Zl(t,e),t.prototype.dispose=function(){this._context.removeEventHandler(this),this._context=null,this._renderResult=null,e.prototype.dispose.call(this)},t.prototype.onConfigurationChanged=function(e){return e.layoutInfo&&(this._decorationsLeft=this._context.configuration.editor.layoutInfo.decorationsLeft,this._decorationsWidth=this._context.configuration.editor.layoutInfo.decorationsWidth),!0},t.prototype.onDecorationsChanged=function(e){return!0},t.prototype.onFlushed=function(e){return!0},t.prototype.onLinesChanged=function(e){return!0},t.prototype.onLinesDeleted=function(e){return!0},t.prototype.onLinesInserted=function(e){return!0},t.prototype.onScrollChanged=function(e){return e.scrollTopChanged},t.prototype.onZonesChanged=function(e){return!0},t.prototype._getDecorations=function(e){for(var t=e.getDecorationsInViewport(),n=[],i=0,o=0,r=t.length;o
    ',r=[],s=t;s<=n;s++){for(var a=s-t,u=i[a],l="",c=0,h=u.length;c';o[s]=u}this._renderResult=o},t.prototype.render=function(e,t){return this._renderResult?this._renderResult[t-e]:""},t}(zl),Kl=(n(4480),function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}()),Jl=function(e){function t(t){var n=e.call(this,t)||this;return n._widgets={},n._verticalScrollbarWidth=n._context.configuration.editor.layoutInfo.verticalScrollbarWidth,n._minimapWidth=n._context.configuration.editor.layoutInfo.minimapWidth,n._horizontalScrollbarHeight=n._context.configuration.editor.layoutInfo.horizontalScrollbarHeight,n._editorHeight=n._context.configuration.editor.layoutInfo.height,n._editorWidth=n._context.configuration.editor.layoutInfo.width,n._domNode=Ar(document.createElement("div")),Yr.write(n._domNode,4),n._domNode.setClassName("overlayWidgets"),n}return Kl(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this),this._widgets=null},t.prototype.getDomNode=function(){return this._domNode},t.prototype.onConfigurationChanged=function(e){return!!e.layoutInfo&&(this._verticalScrollbarWidth=this._context.configuration.editor.layoutInfo.verticalScrollbarWidth,this._minimapWidth=this._context.configuration.editor.layoutInfo.minimapWidth,this._horizontalScrollbarHeight=this._context.configuration.editor.layoutInfo.horizontalScrollbarHeight,this._editorHeight=this._context.configuration.editor.layoutInfo.height,this._editorWidth=this._context.configuration.editor.layoutInfo.width,!0)},t.prototype.addWidget=function(e){var t=Ar(e.getDomNode());this._widgets[e.getId()]={widget:e,preference:null,domNode:t},t.setPosition("absolute"),t.setAttribute("widgetId",e.getId()),this._domNode.appendChild(t),this.setShouldRender()},t.prototype.setWidgetPosition=function(e,t){var n=this._widgets[e.getId()];return n.preference!==t&&(n.preference=t,this.setShouldRender(),!0)},t.prototype.removeWidget=function(e){var t=e.getId();if(this._widgets.hasOwnProperty(t)){var n=this._widgets[t].domNode.domNode;delete this._widgets[t],n.parentNode.removeChild(n),this.setShouldRender()}},t.prototype._renderWidget=function(e){var t=e.domNode;if(null!==e.preference)if(e.preference===ru.TOP_RIGHT_CORNER)t.setTop(0),t.setRight(2*this._verticalScrollbarWidth+this._minimapWidth);else if(e.preference===ru.BOTTOM_RIGHT_CORNER){var n=t.domNode.clientHeight;t.setTop(this._editorHeight-n-2*this._horizontalScrollbarHeight),t.setRight(2*this._verticalScrollbarWidth+this._minimapWidth)}else e.preference===ru.TOP_CENTER&&(t.setTop(0),t.domNode.style.right="50%");else t.unsetTop()},t.prototype.prepareRender=function(e){},t.prototype.render=function(e){this._domNode.setWidth(this._editorWidth);for(var t=Object.keys(this._widgets),n=0,i=t.length;n=3){var o,r,s,a=i-(o=Math.floor(i/3))-(r=Math.floor(i/3)),u=(s=e)+o;return[[0,s,u,s,s+o+a,s,u,s],[0,o,a,o+a,r,o+a+r,a+r,o+a+r]]}return 2===n?[[0,s=e,s,s,s+(o=Math.floor(i/2)),s,s,s],[0,o,o,o,r=i-o,o+r,o+r,o+r]]:[[0,e,e,e,e,e,e,e],[0,i,i,i,i,i,i,i]]},e.prototype.equals=function(e){return this.lineHeight===e.lineHeight&&this.pixelRatio===e.pixelRatio&&this.overviewRulerLanes===e.overviewRulerLanes&&this.renderBorder===e.renderBorder&&this.borderColor===e.borderColor&&this.hideCursor===e.hideCursor&&this.cursorColor===e.cursorColor&&this.themeType===e.themeType&&this.backgroundColor===e.backgroundColor&&this.top===e.top&&this.right===e.right&&this.domWidth===e.domWidth&&this.domHeight===e.domHeight&&this.canvasWidth===e.canvasWidth&&this.canvasHeight===e.canvasHeight},e}(),ec=function(e){function t(t){var n=e.call(this,t)||this;return n._domNode=Ar(document.createElement("canvas")),n._domNode.setClassName("decorationsOverviewRuler"),n._domNode.setPosition("absolute"),n._domNode.setLayerHinting(!0),n._domNode.setAttribute("aria-hidden","true"),n._settings=null,n._updateSettings(!1),n._tokensColorTrackerListener=No.dG.onDidChange((function(e){e.changedColorMap&&n._updateSettings(!0)})),n._cursorPositions=[],n}return Xl(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this),this._tokensColorTrackerListener.dispose()},t.prototype._updateSettings=function(e){var t=new $l(this._context.configuration,this._context.theme);return!(null!==this._settings&&this._settings.equals(t)||(this._settings=t,this._domNode.setTop(this._settings.top),this._domNode.setRight(this._settings.right),this._domNode.setWidth(this._settings.domWidth),this._domNode.setHeight(this._settings.domHeight),this._domNode.domNode.width=this._settings.canvasWidth,this._domNode.domNode.height=this._settings.canvasHeight,e&&this._render(),0))},t.prototype.onConfigurationChanged=function(e){return this._updateSettings(!1)},t.prototype.onCursorStateChanged=function(e){this._cursorPositions=[];for(var t=0,n=e.selections.length;tt&&(D=t-a),S=D-a,T=D+a),S>y+1||w!==m?(0!==b&&u.fillRect(l[m],v,c[m],y-v),m=w,v=S,y=T):T>y&&(y=T)}u.fillRect(l[m],v,c[m],y-v)}if(!this._settings.hideCursor){var L=2*this._settings.pixelRatio|0,I=L/2|0,N=this._settings.x[7],x=this._settings.w[7];for(u.fillStyle=this._settings.cursorColor,v=-100,y=-100,b=0,_=this._cursorPositions.length;b<_;b++){var D,k=this._cursorPositions[b];(D=i.getVerticalOffsetForLineNumber(k.lineNumber)*o|0)t&&(D=t-I);var T=(S=D-I)+L;S>y+1?(0!==b&&u.fillRect(N,v,x,y-v),v=S,y=T):T>y&&(y=T)}u.fillRect(N,v,x,y-v)}this._settings.renderBorder&&this._settings.borderColor&&this._settings.overviewRulerLanes>0&&(u.beginPath(),u.lineWidth=1,u.strokeStyle=this._settings.borderColor,u.moveTo(0,0),u.lineTo(0,t),u.stroke(),u.moveTo(0,0),u.lineTo(e,0),u.stroke())},t}(Ur),tc=function(){function e(e,t,n){this.from=0|e,this.to=0|t,this.colorId=0|n}return e.compare=function(e,t){return e.colorId===t.colorId?e.from===t.from?e.to-t.to:e.from-t.from:e.colorId-t.colorId},e}(),nc=function(){function e(e,t,n){this.startLineNumber=e,this.endLineNumber=t,this.color=n,this._colorZone=null}return e.compare=function(e,t){return e.color===t.color?e.startLineNumber===t.startLineNumber?e.endLineNumber-t.endLineNumber:e.startLineNumber-t.startLineNumber:e.colorn&&(d=n-f);var p=u.color,g=this._color2Id[p];g||(g=++this._lastAssignedId,this._color2Id[p]=g,this._id2Color[g]=p);var m=new tc(d-f,d+f,g);u.setColorZone(m),r.push(m)}return this._colorZonesInvalid=!1,r.sort(tc.compare),r},e}(),oc=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),rc=function(e){function t(t,n){var i=e.call(this)||this;return i._context=t,i._domNode=Ar(document.createElement("canvas")),i._domNode.setClassName(n),i._domNode.setPosition("absolute"),i._domNode.setLayerHinting(!0),i._zoneManager=new ic((function(e){return i._context.viewLayout.getVerticalOffsetForLineNumber(e)})),i._zoneManager.setDOMWidth(0),i._zoneManager.setDOMHeight(0),i._zoneManager.setOuterHeight(i._context.viewLayout.getScrollHeight()),i._zoneManager.setLineHeight(i._context.configuration.editor.lineHeight),i._zoneManager.setPixelRatio(i._context.configuration.editor.pixelRatio),i._context.addEventHandler(i),i}return oc(t,e),t.prototype.dispose=function(){this._context.removeEventHandler(this),this._zoneManager=null,e.prototype.dispose.call(this)},t.prototype.onConfigurationChanged=function(e){return e.lineHeight&&(this._zoneManager.setLineHeight(this._context.configuration.editor.lineHeight),this._render()),e.pixelRatio&&(this._zoneManager.setPixelRatio(this._context.configuration.editor.pixelRatio),this._domNode.setWidth(this._zoneManager.getDOMWidth()),this._domNode.setHeight(this._zoneManager.getDOMHeight()),this._domNode.domNode.width=this._zoneManager.getCanvasWidth(),this._domNode.domNode.height=this._zoneManager.getCanvasHeight(),this._render()),!0},t.prototype.onFlushed=function(e){return this._render(),!0},t.prototype.onScrollChanged=function(e){return e.scrollHeightChanged&&(this._zoneManager.setOuterHeight(e.scrollHeight),this._render()),!0},t.prototype.onZonesChanged=function(e){return this._render(),!0},t.prototype.getDomNode=function(){return this._domNode.domNode},t.prototype.setLayout=function(e){this._domNode.setTop(e.top),this._domNode.setRight(e.right);var t=!1;t=this._zoneManager.setDOMWidth(e.width)||t,(t=this._zoneManager.setDOMHeight(e.height)||t)&&(this._domNode.setWidth(this._zoneManager.getDOMWidth()),this._domNode.setHeight(this._zoneManager.getDOMHeight()),this._domNode.domNode.width=this._zoneManager.getCanvasWidth(),this._domNode.domNode.height=this._zoneManager.getCanvasHeight(),this._render())},t.prototype.setZones=function(e){this._zoneManager.setZones(e),this._render()},t.prototype._render=function(){if(0===this._zoneManager.getOuterHeight())return!1;var e=this._zoneManager.getCanvasWidth(),t=this._zoneManager.getCanvasHeight(),n=this._zoneManager.resolveColorZones(),i=this._zoneManager.getId2Color(),o=this._domNode.domNode.getContext("2d");return o.clearRect(0,0,e,t),n.length>0&&this._renderOneLane(o,n,i,e),!0},t.prototype._renderOneLane=function(e,t,n,i){for(var o=0,r=0,s=0,a=0,u=t.length;a=h?s=Math.max(s,d):(e.fillRect(0,r,i,s-r),r=h,s=d)}e.fillRect(0,r,i,s-r)},t}(Or),sc=(n(9964),function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}()),ac=function(e){function t(t){var n=e.call(this,t)||this;return n.domNode=Ar(document.createElement("div")),n.domNode.setAttribute("role","presentation"),n.domNode.setAttribute("aria-hidden","true"),n.domNode.setClassName("view-rulers"),n._renderedRulers=[],n._rulers=n._context.configuration.editor.viewInfo.rulers,n._typicalHalfwidthCharacterWidth=n._context.configuration.editor.fontInfo.typicalHalfwidthCharacterWidth,n}return sc(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this)},t.prototype.onConfigurationChanged=function(e){return!!(e.viewInfo||e.layoutInfo||e.fontInfo)&&(this._rulers=this._context.configuration.editor.viewInfo.rulers,this._typicalHalfwidthCharacterWidth=this._context.configuration.editor.fontInfo.typicalHalfwidthCharacterWidth,!0)},t.prototype.onScrollChanged=function(e){return e.scrollHeightChanged},t.prototype.prepareRender=function(e){},t.prototype._ensureRulersCount=function(){var e=this._renderedRulers.length,t=this._rulers.length;if(e!==t)if(e0;)(r=Ar(document.createElement("div"))).setClassName("view-ruler"),r.setWidth(n),this.domNode.appendChild(r),this._renderedRulers.push(r),i--;else for(var o=e-t;o>0;){var r=this._renderedRulers.pop();this.domNode.removeChild(r),o--}},t.prototype.render=function(e){this._ensureRulersCount();for(var t=0,n=this._rulers.length;t0;return this._shouldShow!==e&&(this._shouldShow=e,!0)},t.prototype.getDomNode=function(){return this._domNode},t.prototype._updateWidth=function(){var e,t=this._context.configuration.editor.layoutInfo;return e=0===t.renderMinimap||t.minimapWidth>0&&0===t.minimapLeft?t.width:t.width-t.minimapWidth-t.verticalScrollbarWidth,this._width!==e&&(this._width=e,!0)},t.prototype.onConfigurationChanged=function(e){var t=!1;return e.viewInfo&&(this._useShadows=this._context.configuration.editor.viewInfo.scrollbar.useShadows),e.layoutInfo&&(t=this._updateWidth()),this._updateShouldShow()||t},t.prototype.onScrollChanged=function(e){return this._scrollTop=e.scrollTop,this._updateShouldShow()},t.prototype.prepareRender=function(e){},t.prototype.render=function(e){this._domNode.setWidth(this._width),this._domNode.setClassName(this._shouldShow?"scroll-decoration":"")},t}(Ur);Tr((function(e,t){var n=e.getColor(ks);n&&t.addRule(".monaco-editor .scroll-decoration { box-shadow: "+n+" 0 6px 6px -6px inset; }")})),n(2108);var cc=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),hc=function(e){this.left=e.left,this.width=e.width,this.startStyle=null,this.endStyle=null},dc=function(e,t){this.lineNumber=e,this.ranges=t};function fc(e){return new hc(e)}function pc(e){return new dc(e.lineNumber,e.ranges.map(fc))}var gc=kt,mc=function(e){function t(t){var n=e.call(this)||this;return n._previousFrameVisibleRangesWithStyle=[],n._context=t,n._lineHeight=n._context.configuration.editor.lineHeight,n._roundedSelection=n._context.configuration.editor.viewInfo.roundedSelection,n._typicalHalfwidthCharacterWidth=n._context.configuration.editor.fontInfo.typicalHalfwidthCharacterWidth,n._selections=[],n._renderResult=null,n._context.addEventHandler(n),n}return cc(t,e),t.prototype.dispose=function(){this._context.removeEventHandler(this),this._context=null,this._selections=null,this._renderResult=null,e.prototype.dispose.call(this)},t.prototype.onConfigurationChanged=function(e){return e.lineHeight&&(this._lineHeight=this._context.configuration.editor.lineHeight),e.viewInfo&&(this._roundedSelection=this._context.configuration.editor.viewInfo.roundedSelection),e.fontInfo&&(this._typicalHalfwidthCharacterWidth=this._context.configuration.editor.fontInfo.typicalHalfwidthCharacterWidth),!0},t.prototype.onCursorStateChanged=function(e){return this._selections=e.selections.slice(0),!0},t.prototype.onDecorationsChanged=function(e){return!0},t.prototype.onFlushed=function(e){return!0},t.prototype.onLinesChanged=function(e){return!0},t.prototype.onLinesDeleted=function(e){return!0},t.prototype.onLinesInserted=function(e){return!0},t.prototype.onScrollChanged=function(e){return e.scrollTopChanged},t.prototype.onZonesChanged=function(e){return!0},t.prototype._visibleRangesHaveGaps=function(e){for(var t=0,n=e.length;t1)return!0;return!1},t.prototype._enrichVisibleRangesWithStyle=function(e,t,n){var i=this._typicalHalfwidthCharacterWidth/4,o=null,r=null;if(n&&n.length>0&&t.length>0){var s=t[0].lineNumber;if(s===e.startLineNumber)for(var a=0;!o&&a=0;a--)n[a].lineNumber===u&&(r=n[a].ranges[0]);o&&!o.startStyle&&(o=null),r&&!r.startStyle&&(r=null)}a=0;for(var l=t.length;a0){var g=t[a-1].ranges[0].left,m=t[a-1].ranges[0].left+t[a-1].ranges[0].width;vc(h-g)g&&(f.top=1),vc(d-m)'},t.prototype._actualRenderOneSelection=function(e,n,i,o){for(var r=o.length>0&&o[0].ranges[0].startStyle,s=this._lineHeight.toString(),a=(this._lineHeight-1).toString(),u=o.length>0?o[0].lineNumber:0,l=o.length>0?o[o.length-1].lineNumber:0,c=0,h=o.length;c1,l)}}this._previousFrameVisibleRangesWithStyle=r,this._renderResult=t},t.prototype.render=function(e,t){if(!this._renderResult)return"";var n=t-e;return n<0||n>=this._renderResult.length?"":this._renderResult[n]},t.SELECTION_CLASS_NAME="selected-text",t.SELECTION_TOP_LEFT="top-left-radius",t.SELECTION_BOTTOM_LEFT="bottom-left-radius",t.SELECTION_TOP_RIGHT="top-right-radius",t.SELECTION_BOTTOM_RIGHT="bottom-right-radius",t.EDITOR_BACKGROUND_CLASS_NAME="monaco-editor-background",t.ROUNDED_PIECE_WIDTH=10,t}(Ga);function vc(e){return e<0?-e:e}Tr((function(e,t){var n=e.getColor(Fs);n&&t.addRule(".monaco-editor .focused .selected-text { background-color: "+n+"; }");var i=e.getColor(Hs);i&&t.addRule(".monaco-editor .selected-text { background-color: "+i+"; }");var o=e.getColor(Bs);o&&t.addRule(".monaco-editor .view-line span.inline-selected-text { color: "+o+"; }")})),n(4256);var yc=function(e,t,n,i,o,r){this.top=e,this.left=t,this.width=n,this.height=i,this.textContent=o,this.textContentClassName=r},bc=function(){function e(e){this._context=e,this._cursorStyle=this._context.configuration.editor.viewInfo.cursorStyle,this._lineHeight=this._context.configuration.editor.lineHeight,this._typicalHalfwidthCharacterWidth=this._context.configuration.editor.fontInfo.typicalHalfwidthCharacterWidth,this._lineCursorWidth=Math.min(this._context.configuration.editor.viewInfo.cursorWidth,this._typicalHalfwidthCharacterWidth),this._isVisible=!0,this._domNode=Ar(document.createElement("div")),this._domNode.setClassName("cursor"),this._domNode.setHeight(this._lineHeight),this._domNode.setTop(0),this._domNode.setLeft(0),Ji.applyFontInfo(this._domNode,this._context.configuration.editor.fontInfo),this._domNode.setDisplay("none"),this.updatePosition(new r.y(1,1)),this._lastRenderedContent="",this._renderData=null}return e.prototype.getDomNode=function(){return this._domNode},e.prototype.getPosition=function(){return this._position},e.prototype.show=function(){this._isVisible||(this._domNode.setVisibility("inherit"),this._isVisible=!0)},e.prototype.hide=function(){this._isVisible&&(this._domNode.setVisibility("hidden"),this._isVisible=!1)},e.prototype.onConfigurationChanged=function(e){return e.lineHeight&&(this._lineHeight=this._context.configuration.editor.lineHeight),e.fontInfo&&(Ji.applyFontInfo(this._domNode,this._context.configuration.editor.fontInfo),this._typicalHalfwidthCharacterWidth=this._context.configuration.editor.fontInfo.typicalHalfwidthCharacterWidth),e.viewInfo&&(this._cursorStyle=this._context.configuration.editor.viewInfo.cursorStyle,this._lineCursorWidth=Math.min(this._context.configuration.editor.viewInfo.cursorWidth,this._typicalHalfwidthCharacterWidth)),!0},e.prototype.onCursorPositionChanged=function(e){return this.updatePosition(e),!0},e.prototype._prepareRender=function(e){var t="",n="";if(this._cursorStyle===Li.m9.Line||this._cursorStyle===Li.m9.LineThin){var i,o=e.visibleRangeForPosition(this._position);if(!o)return null;this._cursorStyle===Li.m9.Line?(i=ni(this._lineCursorWidth>0?this._lineCursorWidth:2))>2&&(t=this._context.model.getLineContent(this._position.lineNumber).charAt(this._position.column-1)):i=ni(1);var r=e.getVerticalOffsetForLineNumber(this._position.lineNumber)-e.bigNumbersDelta;return new yc(r,o.left,i,this._lineHeight,t,n)}var a=e.linesVisibleRangesForRange(new s.Q(this._position.lineNumber,this._position.column,this._position.lineNumber,this._position.column+1),!1);if(!a||0===a.length||0===a[0].ranges.length)return null;var u=a[0].ranges[0],l=u.width<1?this._typicalHalfwidthCharacterWidth:u.width;if(this._cursorStyle===Li.m9.Block){var c=this._context.model.getViewLineData(this._position.lineNumber);t=c.content.charAt(this._position.column-1),p.isHighSurrogate(c.content.charCodeAt(this._position.column-1))&&(t+=c.content.charAt(this._position.column));var h=c.tokens.findTokenIndexAtOffset(this._position.column-1);n=c.tokens.getClassName(h)}var d=e.getVerticalOffsetForLineNumber(this._position.lineNumber)-e.bigNumbersDelta,f=this._lineHeight;return this._cursorStyle!==Li.m9.Underline&&this._cursorStyle!==Li.m9.UnderlineThin||(d+=this._lineHeight-2,f=2),new yc(d,u.left,l,f,t,n)},e.prototype.prepareRender=function(e){this._renderData=this._prepareRender(e)},e.prototype.render=function(e){return this._renderData?(this._lastRenderedContent!==this._renderData.textContent&&(this._lastRenderedContent=this._renderData.textContent,this._domNode.domNode.textContent=this._lastRenderedContent),this._domNode.setClassName("cursor "+this._renderData.textContentClassName),this._domNode.setDisplay("block"),this._domNode.setTop(this._renderData.top),this._domNode.setLeft(this._renderData.left),this._domNode.setWidth(this._renderData.width),this._domNode.setLineHeight(this._renderData.height),this._domNode.setHeight(this._renderData.height),{domNode:this._domNode.domNode,position:this._position,contentLeft:this._renderData.left,height:this._renderData.height,width:2}):(this._domNode.setDisplay("none"),null)},e.prototype.updatePosition=function(e){this._position=e},e}(),_c=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),wc=function(e){function t(t){var n=e.call(this,t)||this;return n._readOnly=n._context.configuration.editor.readOnly,n._cursorBlinking=n._context.configuration.editor.viewInfo.cursorBlinking,n._cursorStyle=n._context.configuration.editor.viewInfo.cursorStyle,n._selectionIsEmpty=!0,n._primaryCursor=new bc(n._context),n._secondaryCursors=[],n._renderData=[],n._domNode=Ar(document.createElement("div")),n._domNode.setAttribute("role","presentation"),n._domNode.setAttribute("aria-hidden","true"),n._updateDomClassName(),n._domNode.appendChild(n._primaryCursor.getDomNode()),n._startCursorBlinkAnimation=new wt,n._cursorFlatBlinkInterval=new Mt,n._blinkingEnabled=!1,n._editorHasFocus=!1,n._updateBlinking(),n}return _c(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this),this._startCursorBlinkAnimation.dispose(),this._cursorFlatBlinkInterval.dispose()},t.prototype.getDomNode=function(){return this._domNode},t.prototype.onConfigurationChanged=function(e){e.readOnly&&(this._readOnly=this._context.configuration.editor.readOnly),e.viewInfo&&(this._cursorBlinking=this._context.configuration.editor.viewInfo.cursorBlinking,this._cursorStyle=this._context.configuration.editor.viewInfo.cursorStyle),this._primaryCursor.onConfigurationChanged(e),this._updateBlinking(),e.viewInfo&&this._updateDomClassName();for(var t=0,n=this._secondaryCursors.length;tt.length){var r=this._secondaryCursors.length-t.length;for(i=0;i140)n._setDesiredScrollPositionNow(r.getScrollPosition());else{var a=n._sliderMousePosition(e)-i;n._setDesiredScrollPositionNow(r.getDesiredScrollPositionFromDelta(a))}}),(function(){n.slider.toggleClassName("active",!1),n._host.onDragEnd(),t()})),this._host.onDragStart()},t.prototype._setDesiredScrollPositionNow=function(e){var t={};this.writeScrollPosition(t,e),this._scrollable.setScrollPositionNow(t)},t}(kc),Pc=function(){function e(e,t,n){this._scrollbarSize=Math.round(t),this._oppositeScrollbarSize=Math.round(n),this._arrowSize=Math.round(e),this._visibleSize=0,this._scrollSize=0,this._scrollPosition=0,this._computedAvailableSize=0,this._computedIsNeeded=!1,this._computedSliderSize=0,this._computedSliderRatio=0,this._computedSliderPosition=0,this._refreshComputedValues()}return e.prototype.clone=function(){var t=new e(this._arrowSize,this._scrollbarSize,this._oppositeScrollbarSize);return t.setVisibleSize(this._visibleSize),t.setScrollSize(this._scrollSize),t.setScrollPosition(this._scrollPosition),t},e.prototype.setVisibleSize=function(e){var t=Math.round(e);return this._visibleSize!==t&&(this._visibleSize=t,this._refreshComputedValues(),!0)},e.prototype.setScrollSize=function(e){var t=Math.round(e);return this._scrollSize!==t&&(this._scrollSize=t,this._refreshComputedValues(),!0)},e.prototype.setScrollPosition=function(e){var t=Math.round(e);return this._scrollPosition!==t&&(this._scrollPosition=t,this._refreshComputedValues(),!0)},e._computeValues=function(e,t,n,i,o){var r=Math.max(0,n-e),s=Math.max(0,r-2*t),a=i>0&&i>n;if(!a)return{computedAvailableSize:Math.round(r),computedIsNeeded:a,computedSliderSize:Math.round(s),computedSliderRatio:0,computedSliderPosition:0};var u=Math.round(Math.max(20,Math.floor(n*s/i))),l=(s-u)/(i-n),c=o*l;return{computedAvailableSize:Math.round(r),computedIsNeeded:a,computedSliderSize:Math.round(u),computedSliderRatio:l,computedSliderPosition:Math.round(c)}},e.prototype._refreshComputedValues=function(){var t=e._computeValues(this._oppositeScrollbarSize,this._arrowSize,this._visibleSize,this._scrollSize,this._scrollPosition);this._computedAvailableSize=t.computedAvailableSize,this._computedIsNeeded=t.computedIsNeeded,this._computedSliderSize=t.computedSliderSize,this._computedSliderRatio=t.computedSliderRatio,this._computedSliderPosition=t.computedSliderPosition},e.prototype.getArrowSize=function(){return this._arrowSize},e.prototype.getScrollPosition=function(){return this._scrollPosition},e.prototype.getRectangleLargeSize=function(){return this._computedAvailableSize},e.prototype.getRectangleSmallSize=function(){return this._scrollbarSize},e.prototype.isNeeded=function(){return this._computedIsNeeded},e.prototype.getSliderSize=function(){return this._computedSliderSize},e.prototype.getSliderPosition=function(){return this._computedSliderPosition},e.prototype.getDesiredScrollPositionFromOffset=function(e){if(!this._computedIsNeeded)return 0;var t=e-this._arrowSize-this._computedSliderSize/2;return Math.round(t/this._computedSliderRatio)},e.prototype.getDesiredScrollPositionFromDelta=function(e){if(!this._computedIsNeeded)return 0;var t=this._computedSliderPosition+e;return Math.round(t/this._computedSliderRatio)},e}(),zc=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Wc=function(e){function t(t,n,i){var o=e.call(this,{lazyRender:n.lazyRender,host:i,scrollbarState:new Pc(n.horizontalHasArrows?n.arrowSize:0,n.horizontal===gr.XR.Hidden?0:n.horizontalScrollbarSize,n.vertical===gr.XR.Hidden?0:n.verticalScrollbarSize),visibility:n.horizontal,extraScrollbarClassName:"horizontal",scrollable:t})||this;if(n.horizontalHasArrows){var r=(n.arrowSize-11)/2,s=(n.horizontalScrollbarSize-11)/2;o._createArrow({className:"left-arrow",top:s,left:r,bottom:void 0,right:void 0,bgWidth:n.arrowSize,bgHeight:n.horizontalScrollbarSize,onActivate:function(){return o._host.onMouseWheel(new Kt(null,1,0))}}),o._createArrow({className:"right-arrow",top:s,left:void 0,bottom:void 0,right:r,bgWidth:n.arrowSize,bgHeight:n.horizontalScrollbarSize,onActivate:function(){return o._host.onMouseWheel(new Kt(null,-1,0))}})}return o._createSlider(Math.floor((n.horizontalScrollbarSize-n.horizontalSliderSize)/2),0,null,n.horizontalSliderSize),o}return zc(t,e),t.prototype._updateSlider=function(e,t){this.slider.setWidth(e),this.slider.setLeft(t)},t.prototype._renderDomNode=function(e,t){this.domNode.setWidth(e),this.domNode.setHeight(t),this.domNode.setLeft(0),this.domNode.setBottom(0)},t.prototype.onDidScroll=function(e){return this._shouldRender=this._onElementScrollSize(e.scrollWidth)||this._shouldRender,this._shouldRender=this._onElementScrollPosition(e.scrollLeft)||this._shouldRender,this._shouldRender=this._onElementSize(e.width)||this._shouldRender,this._shouldRender},t.prototype._mouseDownRelativePosition=function(e,t){return e},t.prototype._sliderMousePosition=function(e){return e.posx},t.prototype._sliderOrthogonalMousePosition=function(e){return e.posy},t.prototype.writeScrollPosition=function(e,t){e.scrollLeft=t},t}(Rc),Fc=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Bc=function(e){function t(t,n,i){var o=e.call(this,{lazyRender:n.lazyRender,host:i,scrollbarState:new Pc(n.verticalHasArrows?n.arrowSize:0,n.vertical===gr.XR.Hidden?0:n.verticalScrollbarSize,0),visibility:n.vertical,extraScrollbarClassName:"vertical",scrollable:t})||this;if(n.verticalHasArrows){var r=(n.arrowSize-11)/2,s=(n.verticalScrollbarSize-11)/2;o._createArrow({className:"up-arrow",top:r,left:s,bottom:void 0,right:void 0,bgWidth:n.verticalScrollbarSize,bgHeight:n.arrowSize,onActivate:function(){return o._host.onMouseWheel(new Kt(null,0,1))}}),o._createArrow({className:"down-arrow",top:void 0,left:s,bottom:r,right:void 0,bgWidth:n.verticalScrollbarSize,bgHeight:n.arrowSize,onActivate:function(){return o._host.onMouseWheel(new Kt(null,0,-1))}})}return o._createSlider(0,Math.floor((n.verticalScrollbarSize-n.verticalSliderSize)/2),n.verticalSliderSize,null),o}return Fc(t,e),t.prototype._updateSlider=function(e,t){this.slider.setHeight(e),this.slider.setTop(t)},t.prototype._renderDomNode=function(e,t){this.domNode.setWidth(t),this.domNode.setHeight(e),this.domNode.setRight(0),this.domNode.setTop(0)},t.prototype.onDidScroll=function(e){return this._shouldRender=this._onElementScrollSize(e.scrollHeight)||this._shouldRender,this._shouldRender=this._onElementScrollPosition(e.scrollTop)||this._shouldRender,this._shouldRender=this._onElementSize(e.height)||this._shouldRender,this._shouldRender},t.prototype._mouseDownRelativePosition=function(e,t){return t},t.prototype._sliderMousePosition=function(e){return e.posy},t.prototype._sliderOrthogonalMousePosition=function(e){return e.posx},t.prototype.writeScrollPosition=function(e,t){e.scrollTop=t},t}(Rc),Hc=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Vc=function(e,t,n){this.timestamp=e,this.deltaX=t,this.deltaY=n,this.score=0},Uc=function(){function e(){this._capacity=5,this._memory=[],this._front=-1,this._rear=-1}return e.prototype.isPhysicalMouseWheel=function(){if(-1===this._front&&-1===this._rear)return!1;for(var e=1,t=0,n=1,i=this._rear;;){var o=i===this._front?e:Math.pow(2,-n);if(e-=o,t+=this._memory[i].score*o,i===this._front)break;i=(this._capacity+i-1)%this._capacity,n++}return t<=.5},e.prototype.accept=function(e,t,n){var i=new Vc(e,t,n);i.score=this._computeScore(i),-1===this._front&&-1===this._rear?(this._memory[0]=i,this._front=0,this._rear=0):(this._rear=(this._rear+1)%this._capacity,this._rear===this._front&&(this._front=(this._front+1)%this._capacity),this._memory[this._rear]=i)},e.prototype._computeScore=function(e){if(Math.abs(e.deltaX)>0&&Math.abs(e.deltaY)>0)return 1;var t=.5;return-1===this._front&&-1===this._rear||this._memory[this._rear],(Math.abs(e.deltaX-Math.round(e.deltaX))>0||Math.abs(e.deltaY-Math.round(e.deltaY))>0)&&(t+=.25),Math.min(Math.max(t,0),1)},e.INSTANCE=new e,e}(),Yc=function(e){function t(t,n,i){var o=e.call(this)||this;o._onScroll=o._register(new X.vl),o.onScroll=o._onScroll.event,t.style.overflow="hidden",o._options=qc(n),o._scrollable=i,o._register(o._scrollable.onScroll((function(e){o._onDidScroll(e),o._onScroll.fire(e)})));var r={onMouseWheel:function(e){return o._onMouseWheel(e)},onDragStart:function(){return o._onDragStart()},onDragEnd:function(){return o._onDragEnd()}};return o._verticalScrollbar=o._register(new Bc(o._scrollable,o._options,r)),o._horizontalScrollbar=o._register(new Wc(o._scrollable,o._options,r)),o._domNode=document.createElement("div"),o._domNode.className="monaco-scrollable-element "+o._options.className,o._domNode.setAttribute("role","presentation"),o._domNode.style.position="relative",o._domNode.style.overflow="hidden",o._domNode.appendChild(t),o._domNode.appendChild(o._horizontalScrollbar.domNode.domNode),o._domNode.appendChild(o._verticalScrollbar.domNode.domNode),o._options.useShadows&&(o._leftShadowDomNode=Ar(document.createElement("div")),o._leftShadowDomNode.setClassName("shadow"),o._domNode.appendChild(o._leftShadowDomNode.domNode),o._topShadowDomNode=Ar(document.createElement("div")),o._topShadowDomNode.setClassName("shadow"),o._domNode.appendChild(o._topShadowDomNode.domNode),o._topLeftShadowDomNode=Ar(document.createElement("div")),o._topLeftShadowDomNode.setClassName("shadow top-left-corner"),o._domNode.appendChild(o._topLeftShadowDomNode.domNode)),o._listenOnDomNode=o._options.listenOnDomNode||o._domNode,o._mouseWheelToDispose=[],o._setListeningToMouseWheel(o._options.handleMouseWheel),o.onmouseover(o._listenOnDomNode,(function(e){return o._onMouseOver(e)})),o.onnonbubblingmouseout(o._listenOnDomNode,(function(e){return o._onMouseOut(e)})),o._hideTimeout=o._register(new wt),o._isDragging=!1,o._mouseIsOver=!1,o._shouldRender=!0,o._revealOnScroll=!0,o}return Hc(t,e),t.prototype.dispose=function(){this._mouseWheelToDispose=(0,I.AS)(this._mouseWheelToDispose),e.prototype.dispose.call(this)},t.prototype.getDomNode=function(){return this._domNode},t.prototype.getOverviewRulerLayoutInfo=function(){return{parent:this._domNode,insertBefore:this._verticalScrollbar.domNode.domNode}},t.prototype.delegateVerticalScrollbarMouseDown=function(e){this._verticalScrollbar.delegateMouseDown(e)},t.prototype.getScrollDimensions=function(){return this._scrollable.getScrollDimensions()},t.prototype.setScrollDimensions=function(e){this._scrollable.setScrollDimensions(e)},t.prototype.updateClassName=function(e){this._options.className=e,B.zx&&(this._options.className+=" mac"),this._domNode.className="monaco-scrollable-element "+this._options.className},t.prototype.updateOptions=function(e){var t=qc(e);this._options.handleMouseWheel=t.handleMouseWheel,this._options.mouseWheelScrollSensitivity=t.mouseWheelScrollSensitivity,this._setListeningToMouseWheel(this._options.handleMouseWheel),this._options.lazyRender||this._render()},t.prototype._setListeningToMouseWheel=function(e){var t=this;if(this._mouseWheelToDispose.length>0!==e&&(this._mouseWheelToDispose=(0,I.AS)(this._mouseWheelToDispose),e)){var n=function(e){var n=new Kt(e);t._onMouseWheel(n)};this._mouseWheelToDispose.push(cn(this._listenOnDomNode,"mousewheel",n)),this._mouseWheelToDispose.push(cn(this._listenOnDomNode,"DOMMouseScroll",n))}},t.prototype._onMouseWheel=function(e){var t,n=Uc.INSTANCE;if(n.accept(Date.now(),e.deltaX,e.deltaY),e.deltaY||e.deltaX){var i=e.deltaY*this._options.mouseWheelScrollSensitivity,o=e.deltaX*this._options.mouseWheelScrollSensitivity;this._options.flipAxes&&(i=(t=[o,i])[0],o=t[1]);var r=!B.zx&&e.browserEvent&&e.browserEvent.shiftKey;!this._options.scrollYToX&&!r||o||(o=i,i=0);var s=this._scrollable.getFutureScrollPosition(),a={};if(i){var u=s.scrollTop-50*i;this._verticalScrollbar.writeScrollPosition(a,u)}if(o){var l=s.scrollLeft-50*o;this._horizontalScrollbar.writeScrollPosition(a,l)}a=this._scrollable.validateScrollPosition(a),(s.scrollLeft!==a.scrollLeft||s.scrollTop!==a.scrollTop)&&(this._options.mouseWheelSmoothScroll&&n.isPhysicalMouseWheel()?this._scrollable.setScrollPositionSmooth(a):this._scrollable.setScrollPositionNow(a),this._shouldRender=!0)}(this._options.alwaysConsumeMouseWheel||this._shouldRender)&&(e.preventDefault(),e.stopPropagation())},t.prototype._onDidScroll=function(e){this._shouldRender=this._horizontalScrollbar.onDidScroll(e)||this._shouldRender,this._shouldRender=this._verticalScrollbar.onDidScroll(e)||this._shouldRender,this._options.useShadows&&(this._shouldRender=!0),this._revealOnScroll&&this._reveal(),this._options.lazyRender||this._render()},t.prototype.renderNow=function(){if(!this._options.lazyRender)throw new Error("Please use `lazyRender` together with `renderNow`!");this._render()},t.prototype._render=function(){if(this._shouldRender&&(this._shouldRender=!1,this._horizontalScrollbar.render(),this._verticalScrollbar.render(),this._options.useShadows)){var e=this._scrollable.getCurrentScrollPosition(),t=e.scrollTop>0,n=e.scrollLeft>0;this._leftShadowDomNode.setClassName("shadow"+(n?" left":"")),this._topShadowDomNode.setClassName("shadow"+(t?" top":"")),this._topLeftShadowDomNode.setClassName("shadow top-left-corner"+(t?" top":"")+(n?" left":""))}},t.prototype._onDragStart=function(){this._isDragging=!0,this._reveal()},t.prototype._onDragEnd=function(){this._isDragging=!1,this._hide()},t.prototype._onMouseOut=function(e){this._mouseIsOver=!1,this._hide()},t.prototype._onMouseOver=function(e){this._mouseIsOver=!0,this._reveal()},t.prototype._reveal=function(){this._verticalScrollbar.beginReveal(),this._horizontalScrollbar.beginReveal(),this._scheduleHide()},t.prototype._hide=function(){this._mouseIsOver||this._isDragging||(this._verticalScrollbar.beginHide(),this._horizontalScrollbar.beginHide())},t.prototype._scheduleHide=function(){var e=this;this._mouseIsOver||this._isDragging||this._hideTimeout.cancelAndSet((function(){return e._hide()}),500)},t}(kc),Zc=function(e){function t(t,n){var i=this;(n=n||{}).mouseWheelSmoothScroll=!1;var o=new gr.yE(0,(function(e){return pn(e)}));return(i=e.call(this,t,n,o)||this)._register(o),i}return Hc(t,e),t.prototype.setScrollPosition=function(e){this._scrollable.setScrollPositionNow(e)},t.prototype.getScrollPosition=function(){return this._scrollable.getCurrentScrollPosition()},t}(Yc),Gc=function(e){function t(t,n,i){return e.call(this,t,n,i)||this}return Hc(t,e),t}(Yc),Qc=function(e){function t(t,n){var i=e.call(this,t,n)||this;return i._element=t,i.onScroll((function(e){e.scrollTopChanged&&(i._element.scrollTop=e.scrollTop),e.scrollLeftChanged&&(i._element.scrollLeft=e.scrollLeft)})),i.scanDomNode(),i}return Hc(t,e),t.prototype.scanDomNode=function(){this.setScrollDimensions({width:this._element.clientWidth,scrollWidth:this._element.scrollWidth,height:this._element.clientHeight,scrollHeight:this._element.scrollHeight}),this.setScrollPosition({scrollLeft:this._element.scrollLeft,scrollTop:this._element.scrollTop})},t}(Zc);function qc(e){var t={lazyRender:void 0!==e.lazyRender&&e.lazyRender,className:void 0!==e.className?e.className:"",useShadows:void 0===e.useShadows||e.useShadows,handleMouseWheel:void 0===e.handleMouseWheel||e.handleMouseWheel,flipAxes:void 0!==e.flipAxes&&e.flipAxes,alwaysConsumeMouseWheel:void 0!==e.alwaysConsumeMouseWheel&&e.alwaysConsumeMouseWheel,scrollYToX:void 0!==e.scrollYToX&&e.scrollYToX,mouseWheelScrollSensitivity:void 0!==e.mouseWheelScrollSensitivity?e.mouseWheelScrollSensitivity:1,mouseWheelSmoothScroll:void 0===e.mouseWheelSmoothScroll||e.mouseWheelSmoothScroll,arrowSize:void 0!==e.arrowSize?e.arrowSize:11,listenOnDomNode:void 0!==e.listenOnDomNode?e.listenOnDomNode:null,horizontal:void 0!==e.horizontal?e.horizontal:gr.XR.Auto,horizontalScrollbarSize:void 0!==e.horizontalScrollbarSize?e.horizontalScrollbarSize:10,horizontalSliderSize:void 0!==e.horizontalSliderSize?e.horizontalSliderSize:0,horizontalHasArrows:void 0!==e.horizontalHasArrows&&e.horizontalHasArrows,vertical:void 0!==e.vertical?e.vertical:gr.XR.Auto,verticalScrollbarSize:void 0!==e.verticalScrollbarSize?e.verticalScrollbarSize:10,verticalHasArrows:void 0!==e.verticalHasArrows&&e.verticalHasArrows,verticalSliderSize:void 0!==e.verticalSliderSize?e.verticalSliderSize:0};return t.horizontalSliderSize=void 0!==e.horizontalSliderSize?e.horizontalSliderSize:t.horizontalScrollbarSize,t.verticalSliderSize=void 0!==e.verticalSliderSize?e.verticalSliderSize:t.verticalScrollbarSize,B.zx&&(t.className+=" mac"),t}var Kc=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Jc=function(e){function t(t,n,i,o){var r=e.call(this,t)||this,s=r._context.configuration.editor.viewInfo.scrollbar,a={listenOnDomNode:i.domNode,className:"editor-scrollable "+xr(t.theme.type),useShadows:!1,lazyRender:!0,vertical:s.vertical,horizontal:s.horizontal,verticalHasArrows:s.verticalHasArrows,horizontalHasArrows:s.horizontalHasArrows,verticalScrollbarSize:s.verticalScrollbarSize,verticalSliderSize:s.verticalSliderSize,horizontalScrollbarSize:s.horizontalScrollbarSize,horizontalSliderSize:s.horizontalSliderSize,handleMouseWheel:s.handleMouseWheel,arrowSize:s.arrowSize,mouseWheelScrollSensitivity:s.mouseWheelScrollSensitivity};r.scrollbar=r._register(new Gc(n.domNode,a,r._context.viewLayout.scrollable)),Yr.write(r.scrollbar.getDomNode(),5),r.scrollbarDomNode=Ar(r.scrollbar.getDomNode()),r.scrollbarDomNode.setPosition("absolute"),r._setLayout();var u=function(e,t,n){var i={};if(t){var o=e.scrollTop;o&&(i.scrollTop=r._context.viewLayout.getCurrentScrollTop()+o,e.scrollTop=0)}if(n){var s=e.scrollLeft;s&&(i.scrollLeft=r._context.viewLayout.getCurrentScrollLeft()+s,e.scrollLeft=0)}r._context.viewLayout.setScrollPositionNow(i)};return r._register(cn(i.domNode,"scroll",(function(e){return u(i.domNode,!0,!0)}))),r._register(cn(n.domNode,"scroll",(function(e){return u(n.domNode,!0,!1)}))),r._register(cn(o.domNode,"scroll",(function(e){return u(o.domNode,!0,!1)}))),r._register(cn(r.scrollbarDomNode.domNode,"scroll",(function(e){return u(r.scrollbarDomNode.domNode,!0,!1)}))),r}return Kc(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this)},t.prototype._setLayout=function(){var e=this._context.configuration.editor.layoutInfo;this.scrollbarDomNode.setLeft(e.contentLeft),"right"===this._context.configuration.editor.viewInfo.minimap.side?this.scrollbarDomNode.setWidth(e.contentWidth+e.minimapWidth):this.scrollbarDomNode.setWidth(e.contentWidth),this.scrollbarDomNode.setHeight(e.contentHeight)},t.prototype.getOverviewRulerLayoutInfo=function(){return this.scrollbar.getOverviewRulerLayoutInfo()},t.prototype.getDomNode=function(){return this.scrollbarDomNode},t.prototype.delegateVerticalScrollbarMouseDown=function(e){this.scrollbar.delegateVerticalScrollbarMouseDown(e)},t.prototype.onConfigurationChanged=function(e){if(e.viewInfo){var t=this._context.configuration.editor,n={handleMouseWheel:t.viewInfo.scrollbar.handleMouseWheel,mouseWheelScrollSensitivity:t.viewInfo.scrollbar.mouseWheelScrollSensitivity};this.scrollbar.updateOptions(n)}return e.layoutInfo&&this._setLayout(),!0},t.prototype.onScrollChanged=function(e){return!0},t.prototype.onThemeChanged=function(e){return this.scrollbar.updateClassName("editor-scrollable "+xr(this._context.theme.type)),!0},t.prototype.prepareRender=function(e){},t.prototype.render=function(e){this.scrollbar.renderNow()},t}(Ur);function Xc(e){for(var t=new Uint8ClampedArray(e.length),n=0,i=e.length;n=s)return new e(a,u,y,b,c,_=1,s);var _=Math.max(1,Math.floor(n-b*d/f));return l&&l.scrollHeight===u&&(l.scrollTop>a&&(_=Math.min(_,l.startLineNumber)),l.scrollTop140)n._context.viewLayout.setScrollPositionNow({scrollTop:o.scrollTop});else{var s=e.posy-t;n._context.viewLayout.setScrollPositionNow({scrollTop:o.getDesiredScrollTopFromDelta(s)})}}),(function(){n._slider.toggleClassName("active",!1)}))}})),n}return ih(t,e),t.prototype.dispose=function(){this._mouseDownListener.dispose(),this._sliderMouseMoveMonitor.dispose(),this._sliderMouseDownListener.dispose(),e.prototype.dispose.call(this)},t.prototype._getMinimapDomNodeClassName=function(){return"always"===this._options.showSlider?"minimap slider-always":"minimap slider-mouseover"},t.prototype.getDomNode=function(){return this._domNode},t.prototype._applyLayout=function(){this._domNode.setLeft(this._options.minimapLeft),this._domNode.setWidth(this._options.minimapWidth),this._domNode.setHeight(this._options.minimapHeight),this._shadow.setHeight(this._options.minimapHeight),this._canvas.setWidth(this._options.canvasOuterWidth),this._canvas.setHeight(this._options.canvasOuterHeight),this._canvas.domNode.width=this._options.canvasInnerWidth,this._canvas.domNode.height=this._options.canvasInnerHeight,this._slider.setWidth(this._options.minimapWidth)},t.prototype._getBuffer=function(){return this._buffers||(this._buffers=new ch(this._canvas.domNode.getContext("2d"),this._options.canvasInnerWidth,this._options.canvasInnerHeight,this._tokensColorTracker.getColor(2))),this._buffers.getBuffer()},t.prototype._onOptionsMaybeChanged=function(){var e=new sh(this._context.configuration);return!this._options.equals(e)&&(this._options=e,this._lastRenderData=null,this._buffers=null,this._applyLayout(),this._domNode.setClassName(this._getMinimapDomNodeClassName()),!0)},t.prototype.onConfigurationChanged=function(e){return this._onOptionsMaybeChanged()},t.prototype.onFlushed=function(e){return this._lastRenderData=null,!0},t.prototype.onLinesChanged=function(e){return!!this._lastRenderData&&this._lastRenderData.onLinesChanged(e)},t.prototype.onLinesDeleted=function(e){return this._lastRenderData&&this._lastRenderData.onLinesDeleted(e),!0},t.prototype.onLinesInserted=function(e){return this._lastRenderData&&this._lastRenderData.onLinesInserted(e),!0},t.prototype.onScrollChanged=function(e){return!0},t.prototype.onTokensChanged=function(e){return!!this._lastRenderData&&this._lastRenderData.onTokensChanged(e)},t.prototype.onTokensColorsChanged=function(e){return this._lastRenderData=null,this._buffers=null,!0},t.prototype.onZonesChanged=function(e){return this._lastRenderData=null,!0},t.prototype.prepareRender=function(e){},t.prototype.render=function(e){if(0===this._options.renderMinimap)return this._shadow.setClassName("minimap-shadow-hidden"),this._sliderHorizontal.setWidth(0),void this._sliderHorizontal.setHeight(0);e.scrollLeft+e.viewportWidth>=e.scrollWidth?this._shadow.setClassName("minimap-shadow-hidden"):this._shadow.setClassName("minimap-shadow-visible");var t=ah.create(this._options,e.visibleRange.startLineNumber,e.visibleRange.endLineNumber,e.viewportHeight,e.viewportData.whitespaceViewportData.length>0,this._context.model.getLineCount(),e.scrollTop,e.scrollHeight,this._lastRenderData?this._lastRenderData.renderedLayout:null);this._slider.setTop(t.sliderTop),this._slider.setHeight(t.sliderHeight);var n=e.scrollLeft/this._options.typicalHalfwidthCharacterWidth,i=Math.min(this._options.minimapWidth,Math.round(n*rh(this._options.renderMinimap)/this._options.pixelRatio));this._sliderHorizontal.setLeft(i),this._sliderHorizontal.setWidth(this._options.minimapWidth-i),this._sliderHorizontal.setTop(0),this._sliderHorizontal.setHeight(t.sliderHeight),this._lastRenderData=this.renderLines(t)},t.prototype.renderLines=function(e){var n=this._options.renderMinimap,i=e.startLineNumber,o=e.endLineNumber,r=oh(n);if(this._lastRenderData&&this._lastRenderData.linesEquals(e)){var s=this._lastRenderData._get();return new lh(e,s.imageData,s.lines)}for(var a=this._getBuffer(),u=t._renderUntouchedLines(a,i,o,r,this._lastRenderData),l=u[0],c=u[1],h=u[2],d=this._context.model.getMinimapLinesRenderingData(i,o,h),f=d.tabSize,p=this._tokensColorTracker.getColor(2),g=this._tokensColorTracker.backgroundIsLight(),m=0,v=[],y=0,b=o-i+1;y=0&&Ld)return;var M=l.charCodeAt(g);if(9===M){var C=a-(g+m)%a;m+=C-1,f+=C*h}else if(32===M)f+=h;else for(var S=p.isFullWidthCharacter(M)?2:1,L=0;Ld)return}},t}(Ur);Tr((function(e,t){var n=e.getColor(Ts);if(n){var i=n.transparent(.5);t.addRule(".monaco-editor .minimap-slider, .monaco-editor .minimap-slider .minimap-slider-horizontal { background: "+i+"; }")}var o=e.getColor(Es);if(o){var r=o.transparent(.5);t.addRule(".monaco-editor .minimap-slider:hover, .monaco-editor .minimap-slider:hover .minimap-slider-horizontal { background: "+r+"; }")}var s=e.getColor(As);if(s){var a=s.transparent(.5);t.addRule(".monaco-editor .minimap-slider.active, .monaco-editor .minimap-slider.active .minimap-slider-horizontal { background: "+a+"; }")}var u=e.getColor(ks);u&&t.addRule(".monaco-editor .minimap-shadow-visible { box-shadow: "+u+" -6px 0 6px -6px inset; }")}));var dh=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),fh=function(e){function t(t,n,i,o,r,s){var a=e.call(this)||this;a._cursor=r,a._renderAnimationFrame=null,a.outgoingEvents=new Ic(o);var u=new ml(n,o,s,a.outgoingEvents,t);return a.eventDispatcher=new vl((function(e){return a._renderOnce(e)})),a.eventDispatcher.addEventHandler(a),a._context=new Sc(n,i.getTheme(),o,a.eventDispatcher),a._register(i.onThemeChange((function(e){a._context.theme=e,a.eventDispatcher.emit(new go),a.render(!0,!1)}))),a.viewParts=[],a._textAreaHandler=new eu(a._context,u,a.createTextAreaHandlerHelper()),a.viewParts.push(a._textAreaHandler),a.createViewParts(),a._setLayout(),a.pointerHandler=new gl(a._context,u,a.createPointerHandlerHelper()),a._register(o.addEventListener((function(e){a.eventDispatcher.emitMany(e)}))),a._register(a._cursor.addEventListener((function(e){a.eventDispatcher.emitMany(e)}))),a}return dh(t,e),t.prototype.createViewParts=function(){this.linesContent=Ar(document.createElement("div")),this.linesContent.setClassName("lines-content monaco-editor-background"),this.linesContent.setPosition("absolute"),this.domNode=Ar(document.createElement("div")),this.domNode.setClassName(this.getEditorClassName()),this.overflowGuardContainer=Ar(document.createElement("div")),Yr.write(this.overflowGuardContainer,3),this.overflowGuardContainer.setClassName("overflow-guard"),this._scrollbar=new Jc(this._context,this.linesContent,this.domNode,this.overflowGuardContainer),this.viewParts.push(this._scrollbar),this.viewLines=new Yl(this._context,this.linesContent),this.viewZones=new Cc(this._context),this.viewParts.push(this.viewZones);var e=new ec(this._context);this.viewParts.push(e);var t=new lc(this._context);this.viewParts.push(t);var n=new Sl(this._context);this.viewParts.push(n),n.addDynamicOverlay(new Tl(this._context)),n.addDynamicOverlay(new mc(this._context)),n.addDynamicOverlay(new Bl(this._context)),n.addDynamicOverlay(new Ol(this._context));var i=new Ll(this._context);this.viewParts.push(i),i.addDynamicOverlay(new Al(this._context)),i.addDynamicOverlay(new Wl(this._context)),i.addDynamicOverlay(new ql(this._context)),i.addDynamicOverlay(new Gl(this._context)),i.addDynamicOverlay(new qa(this._context));var o=new Gr(this._context);o.getDomNode().appendChild(this.viewZones.marginDomNode),o.getDomNode().appendChild(i.getDomNode()),this.viewParts.push(o),this.contentWidgets=new xl(this._context,this.domNode),this.viewParts.push(this.contentWidgets),this.viewCursors=new wc(this._context),this.viewParts.push(this.viewCursors),this.overlayWidgets=new Jl(this._context),this.viewParts.push(this.overlayWidgets);var r=new ac(this._context);this.viewParts.push(r);var s=new hh(this._context);if(this.viewParts.push(s),e){var a=this._scrollbar.getOverviewRulerLayoutInfo();a.parent.insertBefore(e.getDomNode(),a.insertBefore)}this.linesContent.appendChild(n.getDomNode()),this.linesContent.appendChild(r.domNode),this.linesContent.appendChild(this.viewZones.domNode),this.linesContent.appendChild(this.viewLines.getDomNode()),this.linesContent.appendChild(this.contentWidgets.domNode),this.linesContent.appendChild(this.viewCursors.getDomNode()),this.overflowGuardContainer.appendChild(o.getDomNode()),this.overflowGuardContainer.appendChild(this._scrollbar.getDomNode()),this.overflowGuardContainer.appendChild(t.getDomNode()),this.overflowGuardContainer.appendChild(this._textAreaHandler.textArea),this.overflowGuardContainer.appendChild(this._textAreaHandler.textAreaCover),this.overflowGuardContainer.appendChild(this.overlayWidgets.getDomNode()),this.overflowGuardContainer.appendChild(s.getDomNode()),this.domNode.appendChild(this.overflowGuardContainer),this.domNode.appendChild(this.contentWidgets.overflowingContentWidgetsDomNode)},t.prototype._flushAccumulatedAndRenderNow=function(){this._renderNow()},t.prototype.createPointerHandlerHelper=function(){var e=this;return{viewDomNode:this.domNode.domNode,linesContentDomNode:this.linesContent.domNode,focusTextArea:function(){e.focus()},getLastViewCursorsRenderData:function(){return e.viewCursors.getLastRenderData()||[]},shouldSuppressMouseDownOnViewZone:function(t){return e.viewZones.shouldSuppressMouseDownOnViewZone(t)},shouldSuppressMouseDownOnWidget:function(t){return e.contentWidgets.shouldSuppressMouseDownOnWidget(t)},getPositionFromDOMInfo:function(t,n){return e._flushAccumulatedAndRenderNow(),e.viewLines.getPositionFromDOMInfo(t,n)},visibleRangeForPosition2:function(t,n){e._flushAccumulatedAndRenderNow();var i=e.viewLines.visibleRangesForRange2(new s.Q(t,n,t,n));return i?i[0]:null},getLineWidth:function(t){return e._flushAccumulatedAndRenderNow(),e.viewLines.getLineWidth(t)}}},t.prototype.createTextAreaHandlerHelper=function(){var e=this;return{visibleRangeForPositionRelativeToEditor:function(t,n){e._flushAccumulatedAndRenderNow();var i=e.viewLines.visibleRangesForRange2(new s.Q(t,n,t,n));return i?i[0]:null}}},t.prototype._setLayout=function(){var e=this._context.configuration.editor.layoutInfo;this.domNode.setWidth(e.width),this.domNode.setHeight(e.height),this.overflowGuardContainer.setWidth(e.width),this.overflowGuardContainer.setHeight(e.height),this.linesContent.setWidth(1e6),this.linesContent.setHeight(1e6)},t.prototype.getEditorClassName=function(){var e=this._textAreaHandler.isFocused()?" focused":"";return this._context.configuration.editor.editorClassName+" "+xr(this._context.theme.type)+e},t.prototype.onConfigurationChanged=function(e){return e.editorClassName&&this.domNode.setClassName(this.getEditorClassName()),e.layoutInfo&&this._setLayout(),!1},t.prototype.onFocusChanged=function(e){return this.domNode.setClassName(this.getEditorClassName()),this._context.model.setHasFocus(e.isFocused),e.isFocused?this.outgoingEvents.emitViewFocusGained():this.outgoingEvents.emitViewFocusLost(),!1},t.prototype.onScrollChanged=function(e){return this.outgoingEvents.emitScrollChanged(e),!1},t.prototype.onThemeChanged=function(e){return this.domNode.setClassName(this.getEditorClassName()),!1},t.prototype.dispose=function(){null!==this._renderAnimationFrame&&(this._renderAnimationFrame.dispose(),this._renderAnimationFrame=null),this.eventDispatcher.removeEventHandler(this),this.outgoingEvents.dispose(),this.pointerHandler.dispose(),this.viewLines.dispose();for(var t=0,n=this.viewParts.length;t=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([vh(3,N._Y),vh(4,Ce),vh(5,D),vh(6,he),vh(7,Lr),vh(8,Cr)],t)}(I.jG),wh=function(e){function t(){var t=e.call(this)||this;return t._onDidChangeToTrue=t._register(new X.vl),t.onDidChangeToTrue=t._onDidChangeToTrue.event,t._onDidChangeToFalse=t._register(new X.vl),t.onDidChangeToFalse=t._onDidChangeToFalse.event,t._value=0,t}return mh(t,e),t.prototype.setValue=function(e){var t=e?2:1;this._value!==t&&(this._value=t,2===this._value?this._onDidChangeToTrue.fire():1===this._value&&this._onDidChangeToFalse.fire())},t}(I.jG),Mh=function(e){function t(t,n){var i=e.call(this)||this;return i._editor=t,n.createKey("editorId",t.getId()),i._editorFocus=Oe.focus.bindTo(n),i._textInputFocus=Oe.textInputFocus.bindTo(n),i._editorTextFocus=Oe.editorTextFocus.bindTo(n),i._editorTabMovesFocus=Oe.tabMovesFocus.bindTo(n),i._editorReadonly=Oe.readOnly.bindTo(n),i._hasMultipleSelections=Oe.hasMultipleSelections.bindTo(n),i._hasNonEmptySelection=Oe.hasNonEmptySelection.bindTo(n),i._canUndo=Oe.canUndo.bindTo(n),i._canRedo=Oe.canRedo.bindTo(n),i._register(i._editor.onDidChangeConfiguration((function(){return i._updateFromConfig()}))),i._register(i._editor.onDidChangeCursorSelection((function(){return i._updateFromSelection()}))),i._register(i._editor.onDidFocusEditorWidget((function(){return i._updateFromFocus()}))),i._register(i._editor.onDidBlurEditorWidget((function(){return i._updateFromFocus()}))),i._register(i._editor.onDidFocusEditorText((function(){return i._updateFromFocus()}))),i._register(i._editor.onDidBlurEditorText((function(){return i._updateFromFocus()}))),i._register(i._editor.onDidChangeModel((function(){return i._updateFromModel()}))),i._register(i._editor.onDidChangeConfiguration((function(){return i._updateFromModel()}))),i._updateFromConfig(),i._updateFromSelection(),i._updateFromFocus(),i._updateFromModel(),i}return mh(t,e),t.prototype._updateFromConfig=function(){var e=this._editor.getConfiguration();this._editorTabMovesFocus.set(e.tabFocusMode),this._editorReadonly.set(e.readOnly)},t.prototype._updateFromSelection=function(){var e=this._editor.getSelections();e?(this._hasMultipleSelections.set(e.length>1),this._hasNonEmptySelection.set(e.some((function(e){return!e.isEmpty()})))):(this._hasMultipleSelections.reset(),this._hasNonEmptySelection.reset())},t.prototype._updateFromFocus=function(){this._editorFocus.set(this._editor.hasWidgetFocus()&&!this._editor.isSimpleWidget),this._editorTextFocus.set(this._editor.hasTextFocus()&&!this._editor.isSimpleWidget),this._textInputFocus.set(this._editor.hasTextFocus())},t.prototype._updateFromModel=function(){var e=this._editor.getModel();this._canUndo.set(e&&e.canUndo()),this._canRedo.set(e&&e.canRedo())},t}(I.jG),Ch=function(e){function t(t,n){var i=e.call(this)||this;i._editor=t,i._langId=Oe.languageId.bindTo(n),i._hasCompletionItemProvider=Oe.hasCompletionItemProvider.bindTo(n),i._hasCodeActionsProvider=Oe.hasCodeActionsProvider.bindTo(n),i._hasCodeLensProvider=Oe.hasCodeLensProvider.bindTo(n),i._hasDefinitionProvider=Oe.hasDefinitionProvider.bindTo(n),i._hasImplementationProvider=Oe.hasImplementationProvider.bindTo(n),i._hasTypeDefinitionProvider=Oe.hasTypeDefinitionProvider.bindTo(n),i._hasHoverProvider=Oe.hasHoverProvider.bindTo(n),i._hasDocumentHighlightProvider=Oe.hasDocumentHighlightProvider.bindTo(n),i._hasDocumentSymbolProvider=Oe.hasDocumentSymbolProvider.bindTo(n),i._hasReferenceProvider=Oe.hasReferenceProvider.bindTo(n),i._hasRenameProvider=Oe.hasRenameProvider.bindTo(n),i._hasDocumentFormattingProvider=Oe.hasDocumentFormattingProvider.bindTo(n),i._hasDocumentSelectionFormattingProvider=Oe.hasDocumentSelectionFormattingProvider.bindTo(n),i._hasSignatureHelpProvider=Oe.hasSignatureHelpProvider.bindTo(n),i._isInWalkThrough=Oe.isInEmbeddedEditor.bindTo(n);var o=function(){return i._update()};return i._register(t.onDidChangeModel(o)),i._register(t.onDidChangeModelLanguage(o)),i._register(No.er.onDidChange(o)),i._register(No.iM.onDidChange(o)),i._register(No.qh.onDidChange(o)),i._register(No.UU.onDidChange(o)),i._register(No.Lh.onDidChange(o)),i._register(No.ce.onDidChange(o)),i._register(No.r8.onDidChange(o)),i._register(No.UG.onDidChange(o)),i._register(No.Wd.onDidChange(o)),i._register(No.aW.onDidChange(o)),i._register(No.rN.onDidChange(o)),i._register(No.NQ.onDidChange(o)),i._register(No.CW.onDidChange(o)),i._register(No.An.onDidChange(o)),o(),i}return mh(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this)},t.prototype.reset=function(){this._langId.reset(),this._hasCompletionItemProvider.reset(),this._hasCodeActionsProvider.reset(),this._hasCodeLensProvider.reset(),this._hasDefinitionProvider.reset(),this._hasImplementationProvider.reset(),this._hasTypeDefinitionProvider.reset(),this._hasHoverProvider.reset(),this._hasDocumentHighlightProvider.reset(),this._hasDocumentSymbolProvider.reset(),this._hasReferenceProvider.reset(),this._hasRenameProvider.reset(),this._hasDocumentFormattingProvider.reset(),this._hasDocumentSelectionFormattingProvider.reset(),this._hasSignatureHelpProvider.reset(),this._isInWalkThrough.reset()},t.prototype._update=function(){var e=this._editor.getModel();e?(this._langId.set(e.getLanguageIdentifier().language),this._hasCompletionItemProvider.set(No.er.has(e)),this._hasCodeActionsProvider.set(No.iM.has(e)),this._hasCodeLensProvider.set(No.qh.has(e)),this._hasDefinitionProvider.set(No.UU.has(e)),this._hasImplementationProvider.set(No.Lh.has(e)),this._hasTypeDefinitionProvider.set(No.ce.has(e)),this._hasHoverProvider.set(No.r8.has(e)),this._hasDocumentHighlightProvider.set(No.UG.has(e)),this._hasDocumentSymbolProvider.set(No.Wd.has(e)),this._hasReferenceProvider.set(No.aW.has(e)),this._hasRenameProvider.set(No.rN.has(e)),this._hasSignatureHelpProvider.set(No.An.has(e)),this._hasDocumentFormattingProvider.set(No.NQ.has(e)||No.CW.has(e)),this._hasDocumentSelectionFormattingProvider.set(No.CW.has(e)),this._isInWalkThrough.set(e.uri.scheme===rr.walkThroughSnippet)):this.reset()},t}(I.jG),Sh=function(e){function t(t){var n=e.call(this)||this;return n._onChange=n._register(new X.vl),n.onChange=n._onChange.event,n._hasFocus=!1,n._domFocusTracker=n._register(Gn(t)),n._register(n._domFocusTracker.onDidFocus((function(){n._hasFocus=!0,n._onChange.fire(void 0)}))),n._register(n._domFocusTracker.onDidBlur((function(){n._hasFocus=!1,n._onChange.fire(void 0)}))),n}return mh(t,e),t.prototype.hasFocus=function(){return this._hasFocus},t}(I.jG),Lh=encodeURIComponent("");function Nh(e){return Lh+encodeURIComponent(e.toString())+Ih}var xh,Dh,kh=encodeURIComponent('');Tr((function(e,t){var n=e.getColor(ja);n&&t.addRule(".monaco-editor .squiggly-error { border-bottom: 4px double "+n+"; }");var i=e.getColor(Aa);i&&t.addRule('.monaco-editor .squiggly-error { background: url("data:image/svg+xml,'+Nh(i)+'") repeat-x bottom left; }');var o=e.getColor(Ra);o&&t.addRule(".monaco-editor .squiggly-warning { border-bottom: 4px double "+o+"; }");var r=e.getColor(Oa);r&&t.addRule('.monaco-editor .squiggly-warning { background: url("data:image/svg+xml,'+Nh(r)+'") repeat-x bottom left; }');var s=e.getColor(za);s&&t.addRule(".monaco-editor .squiggly-info { border-bottom: 4px double "+s+"; }");var a=e.getColor(Pa);a&&t.addRule('.monaco-editor .squiggly-info { background: url("data:image/svg+xml,'+Nh(a)+'") repeat-x bottom left; }');var u=e.getColor(Fa);u&&t.addRule(".monaco-editor .squiggly-hint { border-bottom: 2px dotted "+u+"; }");var l=e.getColor(Wa);l&&t.addRule('.monaco-editor .squiggly-hint { background: url("data:image/svg+xml,'+(kh+encodeURIComponent(l.toString())+Th)+'") no-repeat bottom left; }');var c=e.getColor(Ha);c&&t.addRule("."+bh+" .monaco-editor .squiggly-inline-unnecessary { opacity: "+c.rgba.a+"; will-change: opacity; }");var h=e.getColor(Ba);h&&t.addRule("."+bh+" .monaco-editor .squiggly-unnecessary { border-bottom: 2px dashed "+h+"; }")})),n(5549),n(7297),function(e){e[e.VERTICAL=0]="VERTICAL",e[e.HORIZONTAL=1]="HORIZONTAL"}(xh||(xh={})),function(e){e[e.Disabled=0]="Disabled",e[e.Minimum=1]="Minimum",e[e.Maximum=2]="Maximum",e[e.Enabled=3]="Enabled"}(Dh||(Dh={}));var Eh=function(){function e(e,t,n){void 0===n&&(n={}),this.disposables=[],this._state=Dh.Enabled,this._onDidEnablementChange=new X.vl,this.onDidEnablementChange=this._onDidEnablementChange.event,this._onDidStart=new X.vl,this.onDidStart=this._onDidStart.event,this._onDidChange=new X.vl,this.onDidChange=this._onDidChange.event,this._onDidReset=new X.vl,this.onDidReset=this._onDidReset.event,this._onDidEnd=new X.vl,this.onDidEnd=this._onDidEnd.event,this.linkedSash=void 0,this.orthogonalStartSashDisposables=[],this.orthogonalEndSashDisposables=[],this.el=Qn(e,Jn(".monaco-sash")),B.zx&&sn(this.el,"mac"),Jt(this.el,"mousedown")(this.onMouseDown,this,this.disposables),Jt(this.el,"dblclick")(this.onMouseDoubleClick,this,this.disposables),au.addTarget(this.el),Jt(this.el,iu.Start)(this.onTouchStart,this,this.disposables),Ot&&sn(this.el,"touch"),this.setOrientation(n.orientation||xh.VERTICAL),this.hidden=!1,this.layoutProvider=t,this.orthogonalStartSash=n.orthogonalStartSash,this.orthogonalEndSash=n.orthogonalEndSash,un(this.el,"debug",!1)}return Object.defineProperty(e.prototype,"state",{get:function(){return this._state},set:function(e){this._state!==e&&(un(this.el,"disabled",e===Dh.Disabled),un(this.el,"minimum",e===Dh.Minimum),un(this.el,"maximum",e===Dh.Maximum),this._state=e,this._onDidEnablementChange.fire(e))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"orthogonalStartSash",{get:function(){return this._orthogonalStartSash},set:function(e){this.orthogonalStartSashDisposables=(0,I.AS)(this.orthogonalStartSashDisposables),e?(e.onDidEnablementChange(this.onOrthogonalStartSashEnablementChange,this,this.orthogonalStartSashDisposables),this.onOrthogonalStartSashEnablementChange(e.state)):this.onOrthogonalStartSashEnablementChange(Dh.Disabled),this._orthogonalStartSash=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"orthogonalEndSash",{get:function(){return this._orthogonalEndSash},set:function(e){this.orthogonalEndSashDisposables=(0,I.AS)(this.orthogonalEndSashDisposables),e?(e.onDidEnablementChange(this.onOrthogonalEndSashEnablementChange,this,this.orthogonalEndSashDisposables),this.onOrthogonalEndSashEnablementChange(e.state)):this.onOrthogonalEndSashEnablementChange(Dh.Disabled),this._orthogonalEndSash=e},enumerable:!0,configurable:!0}),e.prototype.setOrientation=function(e){this.orientation=e,this.orientation===xh.HORIZONTAL?(sn(this.el,"horizontal"),an(this.el,"vertical")):(an(this.el,"horizontal"),sn(this.el,"vertical")),this.layoutProvider&&this.layout()},e.prototype.onMouseDown=function(e){var t=this;Yn(e,!1);var n=!1;if(this.linkedSash&&!e.__linkedSashEvent&&(e.__linkedSashEvent=!0,this.linkedSash.onMouseDown(e)),!e.__orthogonalSashEvent){var i=void 0;this.orientation===xh.VERTICAL?e.offsetY<=4?i=this.orthogonalStartSash:e.offsetY>=this.el.clientHeight-4&&(i=this.orthogonalEndSash):e.offsetX<=4?i=this.orthogonalStartSash:e.offsetX>=this.el.clientWidth-4&&(i=this.orthogonalEndSash),i&&(n=!0,e.__orthogonalSashEvent=!0,i.onMouseDown(e))}if(this.state){for(var o=0,r=ti("iframe");o=0){var n=e.split("-");e=n[0];for(var i=1;i=0){var t=e.split("-");e=t[0];for(var n=1;n=n.actionsList.children.length?(n.actionsList.appendChild(i),n.items.push(r)):(n.actionsList.insertBefore(i,n.actionsList.children[o]),n.items.splice(o,0,r),o++)}))},e.prototype.clear=function(){this.items=I.AS(this.items),Zh(this.actionsList).empty()},e.prototype.isEmpty=function(){return 0===this.items.length},e.prototype.focus=function(e){e&&void 0===this.focusedItem?(this.focusedItem=this.items.length-1,this.focusNext()):this.updateFocus()},e.prototype.focusNext=function(){void 0===this.focusedItem&&(this.focusedItem=this.items.length-1);var e,t=this.focusedItem;do{this.focusedItem=(this.focusedItem+1)%this.items.length,e=this.items[this.focusedItem]}while(this.focusedItem!==t&&!e.isEnabled());this.focusedItem!==t||e.isEnabled()||(this.focusedItem=void 0),this.updateFocus()},e.prototype.focusPrevious=function(){void 0===this.focusedItem&&(this.focusedItem=0);var e,t=this.focusedItem;do{this.focusedItem=this.focusedItem-1,this.focusedItem<0&&(this.focusedItem=this.items.length-1),e=this.items[this.focusedItem]}while(this.focusedItem!==t&&!e.isEnabled());this.focusedItem!==t||e.isEnabled()||(this.focusedItem=void 0),this.updateFocus(!0)},e.prototype.updateFocus=function(e){void 0===this.focusedItem&&this.domNode.focus();for(var t=0;t0){var y=e[r-1];m=0===y.originalEndLineNumber?y.originalStartLineNumber+1:y.originalEndLineNumber+1,v=0===y.modifiedEndLineNumber?y.modifiedStartLineNumber+1:y.modifiedEndLineNumber+1}var b=p-3+1,_=g-3+1;bC&&(N+=I=C-N,x+=I),x>S&&(N+=I=S-x,x+=I),d[f++]=new ed(w,N,M,x),i[o++]=new td(d)}var D=i[0].entries,k=[],T=0;for(r=1,s=i.length;rf)&&(f=b),0!==_&&(0===p||_g)&&(g=w)}var M=document.createElement("div");M.className="diff-review-row";var C=document.createElement("div");C.className="diff-review-cell diff-review-summary";var S=f-d+1,L=g-p+1;C.appendChild(document.createTextNode(l+1+"/"+this._diffs.length+": @@ -"+d+","+S+" +"+p+","+L+" @@")),M.setAttribute("data-line",String(p));var I=function(e){return 0===e?o.k("no_lines","no lines"):1===e?o.k("one_line","1 line"):o.k("more_lines","{0} lines",e)},N=I(S),x=I(L);M.setAttribute("aria-label",o.k({key:"header",comment:["This is the ARIA label for a git diff header.","A git diff header looks like this: @@ -154,12 +159,39 @@.","That encodes that at original line 154 (which is now line 159), 12 lines were removed/changed with 39 lines.","Variables 0 and 1 refer to the diff index out of total number of diffs.","Variables 2 and 4 will be numbers (a line number).",'Variables 3 and 5 will be "no lines", "1 line" or "X lines", localized separately.']},"Difference {0} of {1}: original {2}, {3}, modified {4}, {5}",l+1,this._diffs.length,d,N,p,x)),M.appendChild(C),M.setAttribute("role","listitem"),h.appendChild(M);var D=p;for(m=0,v=c.length;m0){n=o[0].getStartPosition();var r=t.getTopForPosition(n.lineNumber,n.column);i=t.getScrollTop()-r}}return new e(n,i)},e.prototype.restore=function(e){if(this._visiblePosition){var t=e.getTopForPosition(this._visiblePosition.lineNumber,this._visiblePosition.column);e.setScrollTop(t+this._visiblePositionScrollDelta)}},e}(),ud=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),ld=function(e,t){return function(n,i){t(n,i,e)}},cd=function(){function e(){this._zones=[],this._zonesMap={},this._decorations=[]}return e.prototype.getForeignViewZones=function(e){var t=this;return e.filter((function(e){return!t._zonesMap[String(e.id)]}))},e.prototype.clean=function(e){var t=this;this._zones.length>0&&e.changeViewZones((function(e){for(var n=0,i=t._zones.length;n0?o/n:0;return{height:Math.max(0,Math.floor(e.contentHeight*r)),top:Math.floor(t*r)}},t.prototype._createDataSource=function(){var e=this;return{getWidth:function(){return e._width},getHeight:function(){return e._height-e._reviewHeight},getContainerDomNode:function(){return e._containerDomElement},relayoutEditors:function(){e._doLayout()},getOriginalEditor:function(){return e.originalEditor},getModifiedEditor:function(){return e.modifiedEditor}}},t.prototype._setStrategy=function(e){this._strategy&&this._strategy.dispose(),this._strategy=e,e.applyColors(this._themeService.getTheme()),this._lineChanges&&this._updateDecorations(),this._measureDomElement(!0)},t.prototype._getLineChangeAtOrBeforeLineNumber=function(e,t){if(0===this._lineChanges.length||e=s?n=o+1:(n=o,i=o)}return this._lineChanges[n]},t.prototype._getEquivalentLineForOriginalLineNumber=function(e){var t=this._getLineChangeAtOrBeforeLineNumber(e,(function(e){return e.originalStartLineNumber}));if(!t)return e;var n=t.originalStartLineNumber+(t.originalEndLineNumber>0?-1:0),i=t.modifiedStartLineNumber+(t.modifiedEndLineNumber>0?-1:0),o=t.originalEndLineNumber>0?t.originalEndLineNumber-t.originalStartLineNumber+1:0,r=t.modifiedEndLineNumber>0?t.modifiedEndLineNumber-t.modifiedStartLineNumber+1:0,s=e-n;return s<=o?i+Math.min(s,r):i+r-o+s},t.prototype._getEquivalentLineForModifiedLineNumber=function(e){var t=this._getLineChangeAtOrBeforeLineNumber(e,(function(e){return e.modifiedStartLineNumber}));if(!t)return e;var n=t.originalStartLineNumber+(t.originalEndLineNumber>0?-1:0),i=t.modifiedStartLineNumber+(t.modifiedEndLineNumber>0?-1:0),o=t.originalEndLineNumber>0?t.originalEndLineNumber-t.originalStartLineNumber+1:0,r=t.modifiedEndLineNumber>0?t.modifiedEndLineNumber-t.modifiedStartLineNumber+1:0,s=e-i;return s<=r?n+Math.min(s,o):n+o-r+s},t.prototype.getDiffLineInformationForOriginal=function(e){return this._lineChanges?{equivalentLineNumber:this._getEquivalentLineForOriginalLineNumber(e)}:null},t.prototype.getDiffLineInformationForModified=function(e){return this._lineChanges?{equivalentLineNumber:this._getEquivalentLineForModifiedLineNumber(e)}:null},t.ONE_OVERVIEW_WIDTH=15,t.ENTIRE_DIFF_OVERVIEW_WIDTH=30,t.UPDATE_DIFF_DECORATIONS_DELAY=200,t=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([ld(2,Ah),ld(3,he),ld(4,N._Y),ld(5,Ce),ld(6,Lr),ld(7,Cr)],t)}(I.jG),fd=function(e){function t(t){var n=e.call(this)||this;return n._dataSource=t,n}return ud(t,e),t.prototype.applyColors=function(e){var t=(e.getColor(ia)||ta).transparent(2),n=(e.getColor(oa)||na).transparent(2),i=!t.equals(this._insertColor)||!n.equals(this._removeColor);return this._insertColor=t,this._removeColor=n,i},t.prototype.getEditorsDiffDecorations=function(e,t,n,i,o,r,s){o=o.sort((function(e,t){return e.afterLineNumber-t.afterLineNumber})),i=i.sort((function(e,t){return e.afterLineNumber-t.afterLineNumber}));var a=this._getViewZones(e,i,o,r,s,n),u=this._getOriginalEditorDecorations(e,t,n,r,s),l=this._getModifiedEditorDecorations(e,t,n,r,s);return{original:{decorations:u.decorations,overviewZones:u.overviewZones,zones:a.original},modified:{decorations:l.decorations,overviewZones:l.overviewZones,zones:a.modified}}},t}(I.jG),pd=function(){function e(e){this._source=e,this._index=-1,this.advance()}return e.prototype.advance=function(){this._index++,this._index0){var n=e[e.length-1];if(n.afterLineNumber===t.afterLineNumber&&null===n.domNode)return void(n.heightInLines+=t.heightInLines)}e.push(t)},l=new pd(this.modifiedForeignVZ),c=new pd(this.originalForeignVZ),h=0,d=this.lineChanges.length;h<=d;h++){var f=h0?-1:0),o=f.modifiedStartLineNumber+(f.modifiedEndLineNumber>0?-1:0),n=f.originalEndLineNumber>0?f.originalEndLineNumber-f.originalStartLineNumber+1:0,t=f.modifiedEndLineNumber>0?f.modifiedEndLineNumber-f.modifiedStartLineNumber+1:0,r=Math.max(f.originalStartLineNumber,f.originalEndLineNumber),s=Math.max(f.modifiedStartLineNumber,f.modifiedEndLineNumber)):(r=i+=1e7+n,s=o+=1e7+t);for(var p,g=[],m=[];l.current&&l.current.afterLineNumber<=s;){var v=void 0;v=l.current.afterLineNumber<=o?i-o+l.current.afterLineNumber:r,g.push({afterLineNumber:v,heightInLines:l.current.heightInLines,domNode:null}),l.advance()}for(;c.current&&c.current.afterLineNumber<=r;)v=void 0,v=c.current.afterLineNumber<=i?o-i+c.current.afterLineNumber:s,m.push({afterLineNumber:v,heightInLines:c.current.heightInLines,domNode:null}),c.advance();null!==f&&Md(f)&&(p=this._produceOriginalFromDiff(f,n,t))&&g.push(p),null!==f&&Cd(f)&&(p=this._produceModifiedFromDiff(f,n,t))&&m.push(p);var y=0,b=0;for(g=g.sort(a),m=m.sort(a);y=w.heightInLines?(_.heightInLines-=w.heightInLines,b++):(w.heightInLines-=_.heightInLines,y++)}for(;y2*t.MINIMUM_EDITOR_WIDTH?(in-t.MINIMUM_EDITOR_WIDTH&&(i=n-t.MINIMUM_EDITOR_WIDTH)):i=o,this._sashPosition!==i&&(this._sashPosition=i,this._sash.layout()),this._sashPosition},t.prototype.onSashDragStart=function(){this._startSashPosition=this._sashPosition},t.prototype.onSashDrag=function(e){var t=this._dataSource.getWidth()-dd.ENTIRE_DIFF_OVERVIEW_WIDTH,n=this.layout((this._startSashPosition+(e.currentX-e.startX))/t);this._sashRatio=n/t,this._dataSource.relayoutEditors()},t.prototype.onSashDragEnd=function(){this._sash.layout()},t.prototype.onSashReset=function(){this._sashRatio=.5,this._dataSource.relayoutEditors(),this._sash.layout()},t.prototype.getVerticalSashTop=function(e){return 0},t.prototype.getVerticalSashLeft=function(e){return this._sashPosition},t.prototype.getVerticalSashHeight=function(e){return this._dataSource.getHeight()},t.prototype._getViewZones=function(e,t,n,i,o){return new bd(e,t,n).getViewZones()},t.prototype._getOriginalEditorDecorations=function(e,t,n,i,o){for(var r=this._removeColor.toString(),a={decorations:[],overviewZones:[]},u=i.getModel(),l=0,c=e.length;lt?{afterLineNumber:Math.max(e.originalStartLineNumber,e.originalEndLineNumber),heightInLines:n-t,domNode:null}:null},t.prototype._produceModifiedFromDiff=function(e,t,n){return t>n?{afterLineNumber:Math.max(e.modifiedStartLineNumber,e.modifiedEndLineNumber),heightInLines:t-n,domNode:null}:null},t}(gd),_d=function(e){function t(t,n){var i=e.call(this,t)||this;return i.decorationsLeft=t.getOriginalEditor().getLayoutInfo().decorationsLeft,i._register(t.getOriginalEditor().onDidLayoutChange((function(e){i.decorationsLeft!==e.decorationsLeft&&(i.decorationsLeft=e.decorationsLeft,t.relayoutEditors())}))),i}return ud(t,e),t.prototype.setEnableSplitViewResizing=function(e){},t.prototype._getViewZones=function(e,t,n,i,o,r){return new wd(e,t,n,i,o,r).getViewZones()},t.prototype._getOriginalEditorDecorations=function(e,t,n,i,o){for(var r=this._removeColor.toString(),a={decorations:[],overviewZones:[]},u=0,l=e.length;u'])}f+=this.modifiedEditorConfiguration.viewInfo.scrollBeyondLastColumn;var m=document.createElement("div");m.className="view-lines line-delete",m.innerHTML=u.build(),Ji.applyFontInfoSlow(m,this.modifiedEditorConfiguration.fontInfo);var v=document.createElement("div");return v.className="inline-deleted-margin-view-zone",v.innerHTML=l.join(""),Ji.applyFontInfoSlow(v,this.modifiedEditorConfiguration.fontInfo),{shouldNotShrink:!0,afterLineNumber:0===e.modifiedEndLineNumber?e.modifiedStartLineNumber:e.modifiedStartLineNumber-1,heightInLines:t,minWidthInPx:f*d,domNode:m,marginDomNode:v}},t.prototype._renderOriginalLine=function(e,t,n,i,o,r,s){var a=t.getLineTokens(o),u=a.getLineContent(),l=wu.filter(r,o,1,u.length+1);s.appendASCIIString('
    ');var c=jo.isBasicASCII(u,t.mightContainNonBasicASCII()),h=jo.containsRTL(u,c,t.mightContainRTL()),d=Tu(new xu(n.fontInfo.isMonospace&&!n.viewInfo.disableMonospaceOptimizations,u,!1,c,h,0,a,l,i,n.fontInfo.spaceWidth,n.viewInfo.stopRenderingLineAfter,n.viewInfo.renderWhitespace,n.viewInfo.renderControlCharacters,n.viewInfo.fontLigatures),s);s.appendASCIIString("
    ");var f=d.characterMapping.getAbsoluteOffsets();return f.length>0?f[f.length-1]:0},t}(gd);function Md(e){return e.modifiedEndLineNumber>0}function Cd(e){return e.originalEndLineNumber>0}Tr((function(e,t){var n=e.getColor(ia);n&&(t.addRule(".monaco-editor .line-insert, .monaco-editor .char-insert { background-color: "+n+"; }"),t.addRule(".monaco-diff-editor .line-insert, .monaco-diff-editor .char-insert { background-color: "+n+"; }"),t.addRule(".monaco-editor .inline-added-margin-view-zone { background-color: "+n+"; }"));var i=e.getColor(oa);i&&(t.addRule(".monaco-editor .line-delete, .monaco-editor .char-delete { background-color: "+i+"; }"),t.addRule(".monaco-diff-editor .line-delete, .monaco-diff-editor .char-delete { background-color: "+i+"; }"),t.addRule(".monaco-editor .inline-deleted-margin-view-zone { background-color: "+i+"; }"));var o=e.getColor(ra);o&&t.addRule(".monaco-editor .line-insert, .monaco-editor .char-insert { border: 1px "+("hc"===e.type?"dashed":"solid")+" "+o+"; }");var r=e.getColor(sa);r&&t.addRule(".monaco-editor .line-delete, .monaco-editor .char-delete { border: 1px "+("hc"===e.type?"dashed":"solid")+" "+r+"; }");var s=e.getColor(ks);s&&t.addRule(".monaco-diff-editor.side-by-side .editor.modified { box-shadow: -6px 0 5px -5px "+s+"; }");var a=e.getColor(aa);a&&t.addRule(".monaco-diff-editor.side-by-side .editor.modified { border-left: 1px solid "+a+"; }")}));var Sd={followsCaret:!0,ignoreCharChanges:!0,alwaysRevealFirst:!0},Ld=function(){function e(e,t){void 0===t&&(t={});var n=this;this._onDidUpdate=new X.vl,this._editor=e,this._options=ri.co(t,Sd,!1),this.disposed=!1,this._disposables=[],this.nextIdx=-1,this.ranges=[],this.ignoreSelectionChange=!1,this.revealFirst=this._options.alwaysRevealFirst,this._disposables.push(this._editor.onDidDispose((function(){return n.dispose()}))),this._disposables.push(this._editor.onDidUpdateDiff((function(){return n._onDiffUpdated()}))),this._options.followsCaret&&this._disposables.push(this._editor.getModifiedEditor().onDidChangeCursorPosition((function(e){n.ignoreSelectionChange||(n.nextIdx=-1)}))),this._options.alwaysRevealFirst&&this._disposables.push(this._editor.getModifiedEditor().onDidChangeModel((function(e){n.revealFirst=!0}))),this._init()}return e.prototype._init=function(){this._editor.getLineChanges()},e.prototype._onDiffUpdated=function(){this._init(),this._compute(this._editor.getLineChanges()),this.revealFirst&&null!==this._editor.getLineChanges()&&(this.revealFirst=!1,this.nextIdx=-1,this.next(1))},e.prototype._compute=function(e){var t=this;this.ranges=[],e&&e.forEach((function(e){!t._options.ignoreCharChanges&&e.charChanges?e.charChanges.forEach((function(e){t.ranges.push({rhs:!0,range:new s.Q(e.modifiedStartLineNumber,e.modifiedStartColumn,e.modifiedEndLineNumber,e.modifiedEndColumn)})})):t.ranges.push({rhs:!0,range:new s.Q(e.modifiedStartLineNumber,1,e.modifiedStartLineNumber,1)})})),this.ranges.sort((function(e,t){return e.range.getStartPosition().isBeforeOrEqual(t.range.getStartPosition())?-1:t.range.getStartPosition().isBeforeOrEqual(e.range.getStartPosition())?1:0})),this._onDidUpdate.fire(this)},e.prototype._initIdx=function(e){for(var t=!1,n=this._editor.getPosition(),i=0,o=this.ranges.length;i=this.ranges.length&&(this.nextIdx=0)):(this.nextIdx-=1,this.nextIdx<0&&(this.nextIdx=this.ranges.length-1));var n=this.ranges[this.nextIdx];this.ignoreSelectionChange=!0;try{var i=n.range.getStartPosition();this._editor.setPosition(i),this._editor.revealPositionInCenter(i,t)}finally{this.ignoreSelectionChange=!1}}},e.prototype.canNavigate=function(){return this.ranges&&this.ranges.length>0},e.prototype.next=function(e){void 0===e&&(e=0),this._move(!0,e)},e.prototype.previous=function(e){void 0===e&&(e=0),this._move(!1,e)},e.prototype.dispose=function(){(0,I.AS)(this._disposables),this._disposables.length=0,this._onDidUpdate.dispose(),this.ranges=null,this.disposed=!0},e}(),Id=(n(8165),function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}()),Nd=Kr("editorOverviewRuler.bracketMatchForeground",{dark:"#A0A0A0",light:"#A0A0A0",hc:"#A0A0A0"},o.k("overviewRulerBracketMatchForeground","Overview ruler marker color for matching brackets.")),xd=function(e){function t(){return e.call(this,{id:"editor.action.jumpToBracket",label:o.k("smartSelect.jumpBracket","Go to Bracket"),alias:"Go to Bracket",precondition:null,kbOpts:{kbExpr:Oe.editorTextFocus,primary:3160,weight:100}})||this}return Id(t,e),t.prototype.run=function(e,t){var n=Td.get(t);n&&n.jumpToBracket()},t}(xe),Dd=function(e){function t(){return e.call(this,{id:"editor.action.selectToBracket",label:o.k("smartSelect.selectToBracket","Select to Bracket"),alias:"Select to Bracket",precondition:null})||this}return Id(t,e),t.prototype.run=function(e,t){var n=Td.get(t);n&&n.selectToBracket()},t}(xe),kd=function(e,t){this.position=e,this.brackets=t},Td=function(e){function t(t){var n=e.call(this)||this;return n._editor=t,n._lastBracketsData=[],n._lastVersionId=0,n._decorations=[],n._updateBracketsSoon=n._register(new Ct((function(){return n._updateBrackets()}),50)),n._matchBrackets=n._editor.getConfiguration().contribInfo.matchBrackets,n._updateBracketsSoon.schedule(),n._register(t.onDidChangeCursorPosition((function(e){n._matchBrackets&&n._updateBracketsSoon.schedule()}))),n._register(t.onDidChangeModelContent((function(e){n._updateBracketsSoon.schedule()}))),n._register(t.onDidChangeModel((function(e){n._decorations=[],n._updateBracketsSoon.schedule()}))),n._register(t.onDidChangeModelLanguageConfiguration((function(e){n._lastBracketsData=[],n._updateBracketsSoon.schedule()}))),n._register(t.onDidChangeConfiguration((function(e){n._matchBrackets=n._editor.getConfiguration().contribInfo.matchBrackets,!n._matchBrackets&&n._decorations.length>0&&(n._decorations=n._editor.deltaDecorations(n._decorations,[])),n._updateBracketsSoon.schedule()}))),n}return Id(t,e),t.get=function(e){return e.getContribution(t.ID)},t.prototype.getId=function(){return t.ID},t.prototype.jumpToBracket=function(){var e=this._editor.getModel();if(e){var t=this._editor.getSelections().map((function(t){var n=t.getStartPosition(),i=e.matchBracket(n),o=null;if(i)i[0].containsPosition(n)?o=i[1].getStartPosition():i[1].containsPosition(n)&&(o=i[0].getStartPosition());else{var r=e.findNextBracket(n);r&&r.range&&(o=r.range.getStartPosition())}return o?new Be.L(o.lineNumber,o.column,o.lineNumber,o.column):new Be.L(n.lineNumber,n.column,n.lineNumber,n.column)}));this._editor.setSelections(t),this._editor.revealRange(t[0])}},t.prototype.selectToBracket=function(){var e=this._editor.getModel();if(e){var t=[];this._editor.getSelections().forEach((function(n){var i=n.getStartPosition(),o=e.matchBracket(i),r=null,s=null;if(!o){var a=e.findNextBracket(i);a&&a.range&&(o=e.matchBracket(a.range.getStartPosition()))}o&&(o[0].startLineNumber===o[1].startLineNumber?(r=o[1].startColumn0&&(this._editor.setSelections(t),this._editor.revealRange(t[0]))}},t.prototype._updateBrackets=function(){if(this._matchBrackets){this._recomputeBrackets();for(var e=[],n=0,i=0,o=this._lastBracketsData.length;i1&&o.sort(r.y.compare);var c=[],h=0,d=0,f=n.length;for(a=0,u=o.length;at.getLineMinColumn(i)?(0,p.isLowSurrogate)(t.getLineContent(i).charCodeAt(n-2))?n-=2:n-=1:i>1&&(i-=1,n=t.getLineMaxColumn(i)),new r.y(i,n)},t.prototype.positionRightOf=function(e,t){var n=e.column,i=e.lineNumber;return n0&&(t.pushUndoStop(),t.executeCommands(this.id,i),t.pushUndoStop())},t}(xe)),n(8401);var zd=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Wd="9_cutcopypaste",Fd=B.ib||document.queryCommandSupported("cut"),Bd=B.ib||document.queryCommandSupported("copy"),Hd=Bd&&!kt,Vd=B.ib||!At&&document.queryCommandSupported("paste"),Ud=function(e){function t(t,n){var i=e.call(this,n)||this;return i.browserCommand=t,i}return zd(t,e),t.prototype.runCommand=function(e,t){var n=e.get(Ce).getFocusedCodeEditor();n&&n.hasTextFocus()?n.trigger("keyboard",this.id,t):document.execCommand(this.browserCommand)},t.prototype.run=function(e,t){t.focus(),document.execCommand(this.browserCommand)},t}(xe),Yd=function(e){function t(){var t={kbExpr:Oe.textInputFocus,primary:2102,win:{primary:2102,secondary:[1044]},weight:100};return B.ib||(t=null),e.call(this,"cut",{id:"editor.action.clipboardCutAction",label:o.k("actions.clipboard.cutLabel","Cut"),alias:"Cut",precondition:Oe.writable,kbOpts:t,menuOpts:{group:Wd,order:1},menubarOpts:{menuId:ve.MenubarEditMenu,group:"2_ccp",title:o.k({key:"miCut",comment:["&& denotes a mnemonic"]},"Cu&&t"),order:1}})||this}return zd(t,e),t.prototype.run=function(t,n){!n.getConfiguration().emptySelectionClipboard&&n.getSelection().isEmpty()||e.prototype.run.call(this,t,n)},t}(Ud),Zd=function(e){function t(){var t={kbExpr:Oe.textInputFocus,primary:2081,win:{primary:2081,secondary:[2067]},weight:100};return B.ib||(t=null),e.call(this,"copy",{id:"editor.action.clipboardCopyAction",label:o.k("actions.clipboard.copyLabel","Copy"),alias:"Copy",precondition:null,kbOpts:t,menuOpts:{group:Wd,order:2},menubarOpts:{menuId:ve.MenubarEditMenu,group:"2_ccp",title:o.k({key:"miCopy",comment:["&& denotes a mnemonic"]},"&&Copy"),order:2}})||this}return zd(t,e),t.prototype.run=function(t,n){!n.getConfiguration().emptySelectionClipboard&&n.getSelection().isEmpty()||e.prototype.run.call(this,t,n)},t}(Ud),Gd=function(e){function t(){var t={kbExpr:Oe.textInputFocus,primary:2100,win:{primary:2100,secondary:[1043]},weight:100};return B.ib||(t=null),e.call(this,"paste",{id:"editor.action.clipboardPasteAction",label:o.k("actions.clipboard.pasteLabel","Paste"),alias:"Paste",precondition:Oe.writable,kbOpts:t,menuOpts:{group:Wd,order:3},menubarOpts:{menuId:ve.MenubarEditMenu,group:"2_ccp",title:o.k({key:"miPaste",comment:["&& denotes a mnemonic"]},"&&Paste"),order:3}})||this}return zd(t,e),t}(Ud),Qd=function(e){function t(){return e.call(this,"copy",{id:"editor.action.clipboardCopyWithSyntaxHighlightingAction",label:o.k("actions.clipboard.copyWithSyntaxHighlightingLabel","Copy With Syntax Highlighting"),alias:"Copy With Syntax Highlighting",precondition:null,kbOpts:{kbExpr:Oe.textInputFocus,primary:null,weight:100}})||this}return zd(t,e),t.prototype.run=function(t,n){!n.getConfiguration().emptySelectionClipboard&&n.getSelection().isEmpty()||(Wr.forceCopyWithSyntaxHighlighting=!0,e.prototype.run.call(this,t,n),Wr.forceCopyWithSyntaxHighlighting=!1)},t}(Ud);Fd&&Ee(Yd),Bd&&Ee(Zd),Vd&&Ee(Gd),Hd&&Ee(Qd),n(3465);var qd=function(){function e(e,t){this.afterLineNumber=e,this._onHeight=t,this.heightInLines=1,this.suppressMouseDown=!0,this.domNode=document.createElement("div")}return e.prototype.onComputedHeight=function(e){void 0===this._lastHeight?this._lastHeight=e:this._lastHeight!==e&&(this._lastHeight=e,this._onHeight())},e}(),Kd=function(){function e(t,n,i,o){var r=this;this.allowEditorOverflow=!1,this.suppressMouseDown=!0,this._disposables=[],this._commands=Object.create(null),this._id="codeLensWidget"+ ++e._idPool,this._editor=t,this.setSymbolRange(n),this._domNode=document.createElement("span"),this._domNode.innerHTML=" ",sn(this._domNode,"codelens-decoration"),sn(this._domNode,"invisible-cl"),this._updateHeight(),this._disposables.push(this._editor.onDidChangeConfiguration((function(e){return e.fontInfo&&r._updateHeight()}))),this._disposables.push(cn(this._domNode,"click",(function(e){var n=e.target;if("A"===n.tagName&&n.id){var s=r._commands[n.id];s&&(t.focus(),i.executeCommand.apply(i,[s.id].concat(s.arguments)).done(void 0,(function(e){o.error(e)})))}}))),this.updateVisibility()}return e.prototype.dispose=function(){(0,I.AS)(this._disposables)},e.prototype._updateHeight=function(){var e=this._editor.getConfiguration(),t=e.fontInfo,n=e.lineHeight;this._domNode.style.height=Math.round(1.1*n)+"px",this._domNode.style.lineHeight=n+"px",this._domNode.style.fontSize=Math.round(.9*t.fontSize)+"px",this._domNode.innerHTML=" "},e.prototype.updateVisibility=function(){this.isVisible()&&(an(this._domNode,"invisible-cl"),sn(this._domNode,"fadein"))},e.prototype.withCommands=function(e){if(this._commands=Object.create(null),e&&e.length){for(var t=[],n=0;n{1}",n,o),this._commands[n]=i):r=(0,p.format)("{0}",o),t.push(r)}this._domNode.innerHTML=t.join(" | "),this._editor.layoutContentWidget(this)}else this._domNode.innerHTML="no commands"},e.prototype.getId=function(){return this._id},e.prototype.getDomNode=function(){return this._domNode},e.prototype.setSymbolRange=function(e){var t=e.startLineNumber,n=this._editor.getModel().getLineFirstNonWhitespaceColumn(t);this._widgetPosition={position:{lineNumber:t,column:n},preference:[ou.ABOVE]}},e.prototype.getPosition=function(){return this._widgetPosition},e.prototype.isVisible=function(){return this._domNode.hasAttribute("monaco-visible-content-widget")},e._idPool=0,e}(),Jd=function(){function e(){this._removeDecorations=[],this._addDecorations=[],this._addDecorationsCallbacks=[]}return e.prototype.addDecoration=function(e,t){this._addDecorations.push(e),this._addDecorationsCallbacks.push(t)},e.prototype.removeDecoration=function(e){this._removeDecorations.push(e)},e.prototype.commit=function(e){for(var t=e.deltaDecorations(this._removeDecorations,this._addDecorations),n=0,i=t.length;nt.symbol.range.startLineNumber?1:i.indexOf(e.provider)i.indexOf(t.provider)?1:e.symbol.range.startColumnt.symbol.range.startColumn?1:0}))}))}Tr((function(e,t){var n=e.getColor(xa);n&&t.addRule(".monaco-editor .codelens-decoration { color: "+n+"; }");var i=e.getColor(ea);i&&t.addRule(".monaco-editor .codelens-decoration > a:hover { color: "+i+" !important; }")})),De("_executeCodeLensProvider",(function(e,t){var n=t.resource,i=t.itemResolveCount;if(!(n instanceof L.A))throw(0,S.Qg)();var o=e.get(K.S).getModel(n);if(!o)throw(0,S.Qg)();var r=[];return $d(o,st.None).then((function(e){for(var t=[],n=0,s=e;n0&&t.push(Promise.resolve(a.provider.resolveCodeLens(o,a.symbol,st.None)).then((function(e){return r.push(e)})))}return Promise.all(t)})).then((function(){return r}))}));var ef=function(e,t){return function(n,i){t(n,i,e)}},tf=function(){function e(e,t,n){var i=this;this._editor=e,this._commandService=t,this._notificationService=n,this._isEnabled=this._editor.getConfiguration().contribInfo.codeLens,this._globalToDispose=[],this._localToDispose=[],this._lenses=[],this._currentFindCodeLensSymbolsPromise=null,this._modelChangeCounter=0,this._globalToDispose.push(this._editor.onDidChangeModel((function(){return i._onModelChange()}))),this._globalToDispose.push(this._editor.onDidChangeModelLanguage((function(){return i._onModelChange()}))),this._globalToDispose.push(this._editor.onDidChangeConfiguration((function(e){var t=i._isEnabled;i._isEnabled=i._editor.getConfiguration().contribInfo.codeLens,t!==i._isEnabled&&i._onModelChange()}))),this._globalToDispose.push(No.qh.onDidChange(this._onModelChange,this)),this._onModelChange()}return e.prototype.dispose=function(){this._localDispose(),this._globalToDispose=(0,I.AS)(this._globalToDispose)},e.prototype._localDispose=function(){this._currentFindCodeLensSymbolsPromise&&(this._currentFindCodeLensSymbolsPromise.cancel(),this._currentFindCodeLensSymbolsPromise=null,this._modelChangeCounter++),this._currentResolveCodeLensSymbolsPromise&&(this._currentResolveCodeLensSymbolsPromise.cancel(),this._currentResolveCodeLensSymbolsPromise=null),this._localToDispose=(0,I.AS)(this._localToDispose)},e.prototype.getId=function(){return e.ID},e.prototype._onModelChange=function(){var e=this;this._localDispose();var t=this._editor.getModel();if(t&&this._isEnabled&&No.qh.has(t)){for(var n=0,i=No.qh.all(t);n0&&e._detectVisibleLenses.schedule()}))),this._localToDispose.push(this._editor.onDidLayoutChange((function(t){e._detectVisibleLenses.schedule()}))),this._localToDispose.push((0,I.s)((function(){if(e._editor.getModel()){var t=ad.capture(e._editor);e._editor.changeDecorations((function(t){e._editor.changeViewZones((function(n){e._disposeAllLenses(t,n)}))})),t.restore(e._editor)}else e._disposeAllLenses(null,null)}))),s.schedule()}},e.prototype._disposeAllLenses=function(e,t){var n=new Jd;this._lenses.forEach((function(e){return e.dispose(n,t)})),e&&n.commit(e),this._lenses=[]},e.prototype._renderCodeLensSymbols=function(e){var t=this;if(this._editor.getModel()){for(var n,i=this._editor.getModel().getLineCount(),o=[],r=0,s=e;ri||(n&&n[n.length-1].symbol.range.startLineNumber===u?n.push(a):(n=[a],o.push(n)))}var l=ad.capture(this._editor);this._editor.changeDecorations((function(e){t._editor.changeViewZones((function(n){for(var i=0,r=0,s=new Jd;r=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([ef(1,D),ef(2,Cr)],e)}();function nf(e,t){switch(void 0===t&&(t=0),typeof e){case"object":return null===e?of(349,t):Array.isArray(e)?(n=e,i=of(104579,i=t),n.reduce((function(e,t){return nf(t,e)}),i)):function(e,t){return t=of(181387,t),Object.keys(e).sort().reduce((function(t,n){return t=rf(n,t),nf(e[n],t)}),t)}(e,t);case"string":return rf(e,t);case"boolean":return function(e,t){return of(e?433:863,t)}(e,t);case"number":return of(e,t);case"undefined":return of(e,937);default:return of(e,617)}var n,i}function of(e,t){return(t<<5)-t+e|0}function rf(e,t){t=of(149417,t);for(var n=0,i=e.length;n=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([pf(1,Ce),pf(2,uf)],e)}();Ae(gf);var mf=function(){function e(){}return e.insert=function(e,t){return{range:new s.Q(e.lineNumber,e.column,e.lineNumber,e.column),text:t,forceMoveMarkers:!0}},e.delete=function(e){return{range:e,text:null}},e.replace=function(e,t){return{range:e,text:t}},e.replaceMove=function(e,t){return{range:e,text:t,forceMoveMarkers:!0}},e}(),vf=function(){function e(e){this._selection=e,this._usedEndToken=null}return e._haystackHasNeedleAtOffset=function(e,t,n){if(n<0)return!1;var i=t.length;if(n+i>e.length)return!1;for(var o=0;o=65&&r<=90&&r+32===s||s>=65&&s<=90&&s+32===r))return!1}return!0},e.prototype._createOperationsForBlockComment=function(t,n,i,o){var r,a=t.startLineNumber,u=t.startColumn,l=t.endLineNumber,c=t.endColumn,h=i.getLineContent(a),d=i.getLineContent(l),f=n.blockCommentStartToken,p=n.blockCommentEndToken,g=h.lastIndexOf(f,u-1+f.length),m=d.indexOf(p,c-1-p.length);if(-1!==g&&-1!==m)if(a===l)h.substring(g+f.length,m).indexOf(p)>=0&&(g=-1,m=-1);else{var v=h.substring(g+f.length),y=d.substring(0,m);(v.indexOf(p)>=0||y.indexOf(p)>=0)&&(g=-1,m=-1)}-1!==g&&-1!==m?(g+f.length0&&32===d.charCodeAt(m-1)&&(p=" "+p,m-=1),r=e._createRemoveBlockCommentOperations(new s.Q(a,g+f.length+1,l,m+1),f,p)):(r=e._createAddBlockCommentOperations(t,f,p),this._usedEndToken=1===r.length?p:null);for(var b=0;ba?r-1:r}},e}(),bf=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),_f=function(e){function t(t,n){var i=e.call(this,n)||this;return i._type=t,i}return bf(t,e),t.prototype.run=function(e,t){var n=t.getModel();if(n){for(var i=[],o=t.getSelections(),r=n.getOptions(),s=0;s0&&s._contextViewService.hideContextView()}))),this._toDispose.push(this._editor.onKeyDown((function(e){58===e.keyCode&&(e.preventDefault(),e.stopPropagation(),s.showContextMenu())})))}return e.get=function(t){return t.getContribution(e.ID)},e.prototype._onContextMenu=function(e){if(!this._editor.getConfiguration().contribInfo.contextmenu)return this._editor.focus(),void(e.target.position&&!this._editor.getSelection().containsPosition(e.target.position)&&this._editor.setPosition(e.target.position));var t;e.target.type!==su.OVERLAY_WIDGET&&(e.event.preventDefault(),(e.target.type===su.CONTENT_TEXT||e.target.type===su.CONTENT_EMPTY||e.target.type===su.TEXTAREA)&&(this._editor.focus(),e.target.position&&!this._editor.getSelection().containsPosition(e.target.position)&&this._editor.setPosition(e.target.position),e.target.type!==su.TEXTAREA&&(t={x:e.event.posx,y:e.event.posy+1}),this.showContextMenu(t)))},e.prototype.showContextMenu=function(e){if(this._editor.getConfiguration().contribInfo.contextmenu)if(this._contextMenuService){var t=this._getMenuActions();t.length>0&&this._doShowContextMenu(t,e)}else this._editor.focus()},e.prototype._getMenuActions=function(){var e=[],t=this._menuService.createMenu(ve.EditorContext,this._contextKeyService),n=t.getActions({arg:this._editor.getModel().uri});t.dispose();for(var i=0,o=n;i0&&this._contextViewService.hideContextView(),this._toDispose=(0,I.AS)(this._toDispose)},e.ID="editor.contrib.contextmenu",e=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([kf(1,Nf),kf(2,If),kf(3,he),kf(4,xf),kf(5,ye)],e)}(),Ef=function(e){function t(){return e.call(this,{id:"editor.action.showContextMenu",label:o.k("action.showContextMenu.label","Show Editor Context Menu"),alias:"Show Editor Context Menu",precondition:null,kbOpts:{kbExpr:Oe.textInputFocus,primary:1092,weight:100}})||this}return Df(t,e),t.prototype.run=function(e,t){Tf.get(t).showContextMenu()},t}(xe);Ae(Tf),Ee(Ef);var Af=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),jf=function(){function e(e){this.selections=e}return e.prototype.equals=function(e){var t=this.selections.length;if(t!==e.selections.length)return!1;for(var n=0;n50&&n._undoStack.shift()),n._prevState=n._readState()}))),n}return Af(t,e),t.get=function(e){return e.getContribution(t.ID)},t.prototype._readState=function(){return this._editor.getModel()?new jf(this._editor.getSelections()):null},t.prototype.getId=function(){return t.ID},t.prototype.cursorUndo=function(){for(var e=new jf(this._editor.getSelections());this._undoStack.length>0;){var t=this._undoStack.pop();if(!t.equals(e))return this._isCursorUndo=!0,this._editor.setSelections(t.selections),this._editor.revealRangeInCenterIfOutsideViewport(t.selections[0],0),void(this._isCursorUndo=!1)}},t.ID="editor.contrib.cursorUndoController",t}(I.jG),Rf=function(e){function t(){return e.call(this,{id:"cursorUndo",label:o.k("cursor.undo","Soft Undo"),alias:"Soft Undo",precondition:null,kbOpts:{kbExpr:Oe.textInputFocus,primary:2099,weight:100}})||this}return Af(t,e),t.prototype.run=function(e,t,n){Of.get(t).cursorUndo()},t}(xe);Ae(Of),Ee(Rf),n(7853);var Pf=function(){function e(e,t,n){this.selection=e,this.targetPosition=t,this.copy=n}return e.prototype.getEditOperations=function(e,t){var n=e.getValueInRange(this.selection);this.copy||t.addEditOperation(this.selection,null),t.addEditOperation(new s.Q(this.targetPosition.lineNumber,this.targetPosition.column,this.targetPosition.lineNumber,this.targetPosition.column),n),!this.selection.containsPosition(this.targetPosition)||this.copy&&(this.selection.getEndPosition().equals(this.targetPosition)||this.selection.getStartPosition().equals(this.targetPosition))?this.copy?this.targetSelection=new Be.L(this.targetPosition.lineNumber,this.targetPosition.column,this.selection.endLineNumber-this.selection.startLineNumber+this.targetPosition.lineNumber,this.selection.startLineNumber===this.selection.endLineNumber?this.targetPosition.column+this.selection.endColumn-this.selection.startColumn:this.selection.endColumn):this.targetPosition.lineNumber>this.selection.endLineNumber?this.targetSelection=new Be.L(this.targetPosition.lineNumber-this.selection.endLineNumber+this.selection.startLineNumber,this.targetPosition.column,this.targetPosition.lineNumber,this.selection.startLineNumber===this.selection.endLineNumber?this.targetPosition.column+this.selection.endColumn-this.selection.startColumn:this.selection.endColumn):this.targetPosition.lineNumber0;){if(e=0?t+1:1},e.prototype.getCurrentMatchesPosition=function(t){for(var n=this._editor.getModel().getDecorationsInRange(t),i=0,o=n.length;i1e3){r=e._FIND_MATCH_NO_OVERVIEW_DECORATION;for(var u=i._editor.getModel().getLineCount(),l=i._editor.getLayoutInfo().height/u,c=Math.max(2,Math.ceil(3/l)),h=t[0].range.startLineNumber,d=t[0].range.endLineNumber,f=1,p=t.length;f=g.startLineNumber?g.endLineNumber>d&&(d=g.endLineNumber):(a.push({range:new s.Q(h,1,d,1),options:e._FIND_MATCH_ONLY_OVERVIEW_DECORATION}),h=g.startLineNumber,d=g.endLineNumber)}a.push({range:new s.Q(h,1,d,1),options:e._FIND_MATCH_ONLY_OVERVIEW_DECORATION})}var m=new Array(t.length);for(f=0,p=t.length;f=0;t--){var n=this._decorations[t],i=this._editor.getModel().getDecorationRange(n);if(i&&!(i.endLineNumber>e.lineNumber)){if(i.endLineNumbere.column))return i}}return this._editor.getModel().getDecorationRange(this._decorations[this._decorations.length-1])},e.prototype.matchAfterPosition=function(e){if(0===this._decorations.length)return null;for(var t=0,n=this._decorations.length;te.lineNumber)return o;if(!(o.startColumn0){for(var n=[],i=0;i0},e.prototype._cannotFind=function(){if(!this._hasMatches()){var e=this._decorations.getFindScope();return e&&this._editor.revealRangeInCenterIfOutsideViewport(e,0),!0}return!1},e.prototype._setCurrentFindMatch=function(e){var t=this._decorations.setCurrentFindMatch(e);this._state.changeMatchInfo(t,this._decorations.getCount(),e),this._editor.setSelection(e),this._editor.revealRangeInCenterIfOutsideViewport(e,0)},e.prototype._prevSearchPosition=function(e){var t=this._state.isRegex&&(this._state.searchString.indexOf("^")>=0||this._state.searchString.indexOf("$")>=0),n=e.lineNumber,i=e.column,o=this._editor.getModel();return t||1===i?(1===n?n=o.getLineCount():n--,i=o.getLineMaxColumn(n)):i--,new r.y(n,i)},e.prototype._moveToPrevMatch=function(t,n){if(void 0===n&&(n=!1),this._decorations.getCount()=0||this._state.searchString.indexOf("$")>=0),n=e.lineNumber,i=e.column,o=this._editor.getModel();return t||i===o.getLineMaxColumn(n)?(n===o.getLineCount()?n=1:n++,i=1):i++,new r.y(n,i)},e.prototype._moveToNextMatch=function(e){if(this._decorations.getCount()=i)break;if(36===(a=e.charCodeAt(n))){t.emitUnchanged(n-1),t.emitStatic("$",n+1);continue}if(48===a||38===a){t.emitUnchanged(n-1),t.emitMatchIndex(0,n+1);continue}if(49<=a&&a<=57){var r=a-48;if(n+1=i)break;var a;switch(a=e.charCodeAt(n)){case 92:t.emitUnchanged(n-1),t.emitStatic("\\",n+1);break;case 110:t.emitUnchanged(n-1),t.emitStatic("\n",n+1);break;case 116:t.emitUnchanged(n-1),t.emitStatic("\t",n+1)}}}return t.finalize()}(this._state.replaceString):Wf.fromStaticValue(this._state.replaceString)},e.prototype.replace=function(){if(this._hasMatches()){var e=this._getReplacePattern(),t=this._editor.getSelection(),n=this._getNextMatch(t.getStartPosition(),e.hasReplacementPatterns,!1);if(n)if(t.equalsRange(n.range)){var i=e.buildReplaceString(n.matches),o=new He(t,i);this._executeEditorCommand("replace",o),this._decorations.setStartPosition(new r.y(t.startLineNumber,t.startColumn+i.length)),this.research(!0)}else this._decorations.setStartPosition(this._editor.getPosition()),this._setCurrentFindMatch(n.range)}},e.prototype._findMatches=function(t,n,i){var o=e._getSearchRange(this._editor.getModel(),t);return this._editor.getModel().findMatches(this._state.searchString,o,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getConfiguration().wordSeparators:null,n,i)},e.prototype.replaceAll=function(){if(this._hasMatches()){var e=this._decorations.getFindScope();null===e&&this._state.matchesCount>=ap?this._largeReplaceAll():this._regularReplaceAll(e),this.research(!1)}},e.prototype._largeReplaceAll=function(){var e=new Uf.lt(this._state.searchString,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getConfiguration().wordSeparators:null).parseSearchRequest();if(e){var t=e.regex;if(!t.multiline){var n="m";t.ignoreCase&&(n+="i"),t.global&&(n+="g"),t=new RegExp(t.source,n)}var i,o=this._editor.getModel(),r=o.getValue(Xi.kf.LF),s=o.getFullModelRange(),a=this._getReplacePattern();i=a.hasReplacementPatterns?r.replace(t,(function(){return a.buildReplaceString(arguments)})):r.replace(t,a.buildReplaceString(null));var u=new Ye(s,i,this._editor.getSelection());this._executeEditorCommand("replaceAll",u)}},e.prototype._regularReplaceAll=function(e){for(var t=this._getReplacePattern(),n=this._findMatches(e,t.hasReplacementPatterns,1073741824),i=[],o=0,r=n.length;ot&&(e=t),this._matchesPosition!==e&&(this._matchesPosition=e,i.matchesPosition=!0,o=!0),this._matchesCount!==t&&(this._matchesCount=t,i.matchesCount=!0,o=!0),void 0!==n&&(s.Q.equalsRange(this._currentMatch,n)||(this._currentMatch=n,i.currentMatch=!0,o=!0)),o&&this._onFindReplaceStateChange.fire(i)},e.prototype.change=function(e,t,n){void 0===n&&(n=!0);var i={moveCursor:t,updateHistory:n,searchString:!1,replaceString:!1,isRevealed:!1,isReplaceRevealed:!1,isRegex:!1,wholeWord:!1,matchCase:!1,searchScope:!1,matchesPosition:!1,matchesCount:!1,currentMatch:!1},o=!1,r=this.isRegex,a=this.wholeWord,u=this.matchCase;void 0!==e.searchString&&this._searchString!==e.searchString&&(this._searchString=e.searchString,i.searchString=!0,o=!0),void 0!==e.replaceString&&this._replaceString!==e.replaceString&&(this._replaceString=e.replaceString,i.replaceString=!0,o=!0),void 0!==e.isRevealed&&this._isRevealed!==e.isRevealed&&(this._isRevealed=e.isRevealed,i.isRevealed=!0,o=!0),void 0!==e.isReplaceRevealed&&this._isReplaceRevealed!==e.isReplaceRevealed&&(this._isReplaceRevealed=e.isReplaceRevealed,i.isReplaceRevealed=!0,o=!0),void 0!==e.isRegex&&(this._isRegex=e.isRegex),void 0!==e.wholeWord&&(this._wholeWord=e.wholeWord),void 0!==e.matchCase&&(this._matchCase=e.matchCase),void 0!==e.searchScope&&(s.Q.equalsRange(this._searchScope,e.searchScope)||(this._searchScope=e.searchScope,i.searchScope=!0,o=!0)),this._isRegexOverride=void 0!==e.isRegexOverride?e.isRegexOverride:0,this._wholeWordOverride=void 0!==e.wholeWordOverride?e.wholeWordOverride:0,this._matchCaseOverride=void 0!==e.matchCaseOverride?e.matchCaseOverride:0,r!==this.isRegex&&(o=!0,i.isRegex=!0),a!==this.wholeWord&&(o=!0,i.wholeWord=!0),u!==this.matchCase&&(o=!0,i.matchCase=!0),o&&this._onFindReplaceStateChange.fire(i)},e}(),dp=(0,N.u1)("storageService");!function(e){e[e.GLOBAL=0]="GLOBAL",e[e.WORKSPACE=1]="WORKSPACE"}(cp||(cp={}));var fp,pp={_serviceBrand:void 0,store:function(){},remove:function(){},get:function(e,t,n){return n},getInteger:function(e,t,n){return n},getBoolean:function(e,t,n){return n}},gp=(0,N.u1)("clipboardService"),mp=(n(9925),n(2269),function(){function e(e){this._prefix=e,this._lastId=0}return e.prototype.nextId=function(){return this._prefix+ ++this._lastId},e}()),vp=new mp("id#"),yp=function(){function e(e){void 0===e&&(e=""),this.value=e}return e.prototype.appendText=function(e){return this.value+=e.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&"),this},e.prototype.appendMarkdown=function(e){return this.value+=e,this},e.prototype.appendCodeblock=function(e,t){return this.value+="\n```",this.value+=e,this.value+="\n",this.value+=t,this.value+="\n```\n",this},e}();function bp(e){return _p(e)?!e.value:!Array.isArray(e)||e.every(bp)}function _p(e){return e instanceof yp||!(!e||"object"!=typeof e)&&"string"==typeof e.value&&("boolean"==typeof e.isTrusted||void 0===e.isTrusted)}function wp(e,t){return e===t||!(!e||!t)&&e.value===t.value&&e.isTrusted===t.isTrusted}function Mp(e){return e?e.replace(/\\([\\`*_{}[\]()#+\-.!])/g,"$1"):e}(function(e){var t={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:p,hr:/^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/,nptable:p,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( *)(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:"^ {0,3}(?:<(script|pre|style)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?\\?>\\n*|\\n*|\\n*|)[\\s\\S]*?(?:\\n{2,}|$)|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=\\h*\\n)[\\s\\S]*?(?:\\n{2,}|$)|(?=\\h*\\n)[\\s\\S]*?(?:\\n{2,}|$))",def:/^ {0,3}\[(label)\]: *\n? *]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,table:p,lheading:/^([^\n]+)\n *(=|-){2,} *(?:\n+|$)/,paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading| {0,3}>|<\/?(?:tag)(?: +|\n|\/?>)|<(?:script|pre|style|!--))[^\n]+)*)/,text:/^[^\n]+/};function n(e){this.tokens=[],this.tokens.links={},this.options=e||y.defaults,this.rules=t.normal,this.options.pedantic?this.rules=t.pedantic:this.options.gfm&&(this.options.tables?this.rules=t.tables:this.rules=t.gfm)}t._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,t._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,t.def=c(t.def).replace("label",t._label).replace("title",t._title).getRegex(),t.bullet=/(?:[*+-]|\d+\.)/,t.item=/^( *)(bull) [^\n]*(?:\n(?!\1bull )[^\n]*)*/,t.item=c(t.item,"gm").replace(/bull/g,t.bullet).getRegex(),t.list=c(t.list).replace(/bull/g,t.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+t.def.source+")").getRegex(),t._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",t._comment=//,t.html=c(t.html,"i").replace("comment",t._comment).replace("tag",t._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),t.paragraph=c(t.paragraph).replace("hr",t.hr).replace("heading",t.heading).replace("lheading",t.lheading).replace("tag",t._tag).getRegex(),t.blockquote=c(t.blockquote).replace("paragraph",t.paragraph).getRegex(),t.normal=g({},t),t.gfm=g({},t.normal,{fences:/^ *(`{3,}|~{3,})[ \.]*(\S+)? *\n([\s\S]*?)\n? *\1 *(?:\n+|$)/,paragraph:/^/,heading:/^ *(#{1,6}) +([^\n]+?) *#* *(?:\n+|$)/}),t.gfm.paragraph=c(t.paragraph).replace("(?!","(?!"+t.gfm.fences.source.replace("\\1","\\2")+"|"+t.list.source.replace("\\1","\\3")+"|").getRegex(),t.tables=g({},t.gfm,{nptable:/^ *([^|\n ].*\|.*)\n *([-:]+ *\|[-| :]*)(?:\n((?:.*[^>\n ].*(?:\n|$))*)\n*|$)/,table:/^ *\|(.+)\n *\|?( *[-:]+[-| :]*)(?:\n((?: *[^>\n ].*(?:\n|$))*)\n*|$)/}),t.pedantic=g({},t.normal,{html:c("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",t._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/}),n.rules=t,n.lex=function(e,t){return new n(t).lex(e)},n.prototype.lex=function(e){return e=e.replace(/\r\n|\r/g,"\n").replace(/\t/g," ").replace(/\u00a0/g," ").replace(/\u2424/g,"\n"),this.token(e,!0)},n.prototype.token=function(e,n){var i,o,r,s,a,u,l,c,h,d,f,p,g;for(e=e.replace(/^ +$/gm,"");e;)if((r=this.rules.newline.exec(e))&&(e=e.substring(r[0].length),r[0].length>1&&this.tokens.push({type:"space"})),r=this.rules.code.exec(e))e=e.substring(r[0].length),r=r[0].replace(/^ {4}/gm,""),this.tokens.push({type:"code",text:this.options.pedantic?r:v(r,"\n")});else if(r=this.rules.fences.exec(e))e=e.substring(r[0].length),this.tokens.push({type:"code",lang:r[2],text:r[3]||""});else if(r=this.rules.heading.exec(e))e=e.substring(r[0].length),this.tokens.push({type:"heading",depth:r[1].length,text:r[2]});else if(n&&(r=this.rules.nptable.exec(e))&&(u={type:"table",header:m(r[1].replace(/^ *| *\| *$/g,"")),align:r[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:r[3]?r[3].replace(/\n$/,"").split("\n"):[]}).header.length===u.align.length){for(e=e.substring(r[0].length),c=0;c ?/gm,""),this.token(r,n),this.tokens.push({type:"blockquote_end"});else if(r=this.rules.list.exec(e)){for(e=e.substring(r[0].length),f=(s=r[2]).length>1,this.tokens.push({type:"list_start",ordered:f,start:f?+s:""}),i=!1,d=(r=r[0].match(this.rules.item)).length,c=0;c1&&a.length>1||(e=r.slice(c+1).join("\n")+e,c=d-1)),o=i||/\n\n(?!\s*$)/.test(u),c!==d-1&&(i="\n"===u.charAt(u.length-1),o||(o=i)),g=void 0,(p=/^\[[ xX]\] /.test(u))&&(g=" "!==u[1],u=u.replace(/^\[[ xX]\] +/,"")),this.tokens.push({type:o?"loose_item_start":"list_item_start",task:p,checked:g}),this.token(u,!1),this.tokens.push({type:"list_item_end"});this.tokens.push({type:"list_end"})}else if(r=this.rules.html.exec(e))e=e.substring(r[0].length),this.tokens.push({type:this.options.sanitize?"paragraph":"html",pre:!this.options.sanitizer&&("pre"===r[1]||"script"===r[1]||"style"===r[1]),text:r[0]});else if(n&&(r=this.rules.def.exec(e)))e=e.substring(r[0].length),r[3]&&(r[3]=r[3].substring(1,r[3].length-1)),h=r[1].toLowerCase().replace(/\s+/g," "),this.tokens.links[h]||(this.tokens.links[h]={href:r[2],title:r[3]});else if(n&&(r=this.rules.table.exec(e))&&(u={type:"table",header:m(r[1].replace(/^ *| *\| *$/g,"")),align:r[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:r[3]?r[3].replace(/(?: *\| *)?\n$/,"").split("\n"):[]}).header.length===u.align.length){for(e=e.substring(r[0].length),c=0;c?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:p,tag:"^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^",link:/^!?\[(label)\]\(href(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(?!\s*\])((?:\\[\[\]]?|[^\[\]\\])+)\]/,nolink:/^!?\[(?!\s*\])((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\](?:\[\])?/,strong:/^__([^\s][\s\S]*?[^\s])__(?!_)|^\*\*([^\s][\s\S]*?[^\s])\*\*(?!\*)|^__([^\s])__(?!_)|^\*\*([^\s])\*\*(?!\*)/,em:/^_([^\s][\s\S]*?[^\s_])_(?!_)|^_([^\s_][\s\S]*?[^\s])_(?!_)|^\*([^\s][\s\S]*?[^\s*])\*(?!\*)|^\*([^\s*][\s\S]*?[^\s])\*(?!\*)|^_([^\s_])_(?!_)|^\*([^\s*])\*(?!\*)/,code:/^(`+)\s*([\s\S]*?[^`]?)\s*\1(?!`)/,br:/^ {2,}\n(?!\s*$)/,del:p,text:/^[\s\S]+?(?=[\\/g,">").replace(/"/g,""").replace(/'/g,"'")}function l(e){return e.replace(/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi,(function(e,t){return"colon"===(t=t.toLowerCase())?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""}))}function c(e,t){return e=e.source||e,t=t||"",{replace:function(t,n){return n=(n=n.source||n).replace(/(^|[^\[])\^/g,"$1"),e=e.replace(t,n),this},getRegex:function(){return new RegExp(e,t)}}}function h(e,t){return d[" "+e]||(/^[^:]+:\/*[^/]*$/.test(e)?d[" "+e]=e+"/":d[" "+e]=v(e,"/",!0)),e=d[" "+e],"//"===t.slice(0,2)?e.replace(/:[\s\S]*/,":")+t:"/"===t.charAt(0)?e.replace(/(:\/*[^/]*)[\s\S]*/,"$1")+t:e+t}i._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,i._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,i._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,i.autolink=c(i.autolink).replace("scheme",i._scheme).replace("email",i._email).getRegex(),i._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,i.tag=c(i.tag).replace("comment",t._comment).replace("attribute",i._attribute).getRegex(),i._label=/(?:\[[^\[\]]*\]|\\[\[\]]?|`[^`]*`|[^\[\]\\])*?/,i._href=/\s*(<(?:\\[<>]?|[^\s<>\\])*>|(?:\\[()]?|\([^\s\x00-\x1f()\\]*\)|[^\s\x00-\x1f()\\])*?)/,i._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,i.link=c(i.link).replace("label",i._label).replace("href",i._href).replace("title",i._title).getRegex(),i.reflink=c(i.reflink).replace("label",i._label).getRegex(),i.normal=g({},i),i.pedantic=g({},i.normal,{strong:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,em:/^_(?=\S)([\s\S]*?\S)_(?!_)|^\*(?=\S)([\s\S]*?\S)\*(?!\*)/,link:c(/^!?\[(label)\]\((.*?)\)/).replace("label",i._label).getRegex(),reflink:c(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",i._label).getRegex()}),i.gfm=g({},i.normal,{escape:c(i.escape).replace("])","~|])").getRegex(),url:c(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("email",i._email).getRegex(),_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^~~(?=\S)([\s\S]*?\S)~~/,text:c(i.text).replace("]|","~]|").replace("|","|https?://|ftp://|www\\.|[a-zA-Z0-9.!#$%&'*+/=?^_`{\\|}~-]+@|").getRegex()}),i.breaks=g({},i.gfm,{br:c(i.br).replace("{2,}","*").getRegex(),text:c(i.gfm.text).replace("{2,}","*").getRegex()}),o.rules=i,o.output=function(e,t,n){return new o(t,n).output(e)},o.prototype.output=function(e){for(var t,n,i,r,s,a="";e;)if(s=this.rules.escape.exec(e))e=e.substring(s[0].length),a+=s[1];else if(s=this.rules.autolink.exec(e))e=e.substring(s[0].length),i="@"===s[2]?"mailto:"+(n=u(this.mangle(s[1]))):n=u(s[1]),a+=this.renderer.link(i,null,n);else if(this.inLink||!(s=this.rules.url.exec(e))){if(s=this.rules.tag.exec(e))!this.inLink&&/^/i.test(s[0])&&(this.inLink=!1),e=e.substring(s[0].length),a+=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(s[0]):u(s[0]):s[0];else if(s=this.rules.link.exec(e))e=e.substring(s[0].length),this.inLink=!0,i=s[2],this.options.pedantic?(t=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(i))?(i=t[1],r=t[3]):r="":r=s[3]?s[3].slice(1,-1):"",i=i.trim().replace(/^<([\s\S]*)>$/,"$1"),a+=this.outputLink(s,{href:o.escapes(i),title:o.escapes(r)}),this.inLink=!1;else if((s=this.rules.reflink.exec(e))||(s=this.rules.nolink.exec(e))){if(e=e.substring(s[0].length),t=(s[2]||s[1]).replace(/\s+/g," "),!(t=this.links[t.toLowerCase()])||!t.href){a+=s[0].charAt(0),e=s[0].substring(1)+e;continue}this.inLink=!0,a+=this.outputLink(s,t),this.inLink=!1}else if(s=this.rules.strong.exec(e))e=e.substring(s[0].length),a+=this.renderer.strong(this.output(s[4]||s[3]||s[2]||s[1]));else if(s=this.rules.em.exec(e))e=e.substring(s[0].length),a+=this.renderer.em(this.output(s[6]||s[5]||s[4]||s[3]||s[2]||s[1]));else if(s=this.rules.code.exec(e))e=e.substring(s[0].length),a+=this.renderer.codespan(u(s[2].trim(),!0));else if(s=this.rules.br.exec(e))e=e.substring(s[0].length),a+=this.renderer.br();else if(s=this.rules.del.exec(e))e=e.substring(s[0].length),a+=this.renderer.del(this.output(s[1]));else if(s=this.rules.text.exec(e))e=e.substring(s[0].length),a+=this.renderer.text(u(this.smartypants(s[0])));else if(e)throw new Error("Infinite loop on byte: "+e.charCodeAt(0))}else s[0]=this.rules._backpedal.exec(s[0])[0],e=e.substring(s[0].length),"@"===s[2]?i="mailto:"+(n=u(s[0])):(n=u(s[0]),i="www."===s[1]?"http://"+n:n),a+=this.renderer.link(i,null,n);return a},o.escapes=function(e){return e?e.replace(o.rules._escapes,"$1"):e},o.prototype.outputLink=function(e,t){var n=t.href,i=t.title?u(t.title):null;return"!"!==e[0].charAt(0)?this.renderer.link(n,i,this.output(e[1])):this.renderer.image(n,i,u(e[1]))},o.prototype.smartypants=function(e){return this.options.smartypants?e.replace(/---/g,"—").replace(/--/g,"–").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1‘").replace(/'/g,"’").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”").replace(/\.{3}/g,"…"):e},o.prototype.mangle=function(e){if(!this.options.mangle)return e;for(var t,n="",i=e.length,o=0;o.5&&(t="x"+t.toString(16)),n+="&#"+t+";";return n},r.prototype.code=function(e,t,n){if(this.options.highlight){var i=this.options.highlight(e,t);null!=i&&i!==e&&(n=!0,e=i)}return t?'
    '+(n?e:u(e,!0))+"
    \n":"
    "+(n?e:u(e,!0))+"
    "},r.prototype.blockquote=function(e){return"
    \n"+e+"
    \n"},r.prototype.html=function(e){return e},r.prototype.heading=function(e,t,n){return this.options.headerIds?"'+e+"\n":""+e+"\n"},r.prototype.hr=function(){return this.options.xhtml?"
    \n":"
    \n"},r.prototype.list=function(e,t,n){var i=t?"ol":"ul";return"<"+i+(t&&1!==n?' start="'+n+'"':"")+">\n"+e+"\n"},r.prototype.listitem=function(e){return"
  • "+e+"
  • \n"},r.prototype.checkbox=function(e){return" "},r.prototype.paragraph=function(e){return"

    "+e+"

    \n"},r.prototype.table=function(e,t){return t&&(t=""+t+""),"\n\n"+e+"\n"+t+"
    \n"},r.prototype.tablerow=function(e){return"\n"+e+"\n"},r.prototype.tablecell=function(e,t){var n=t.header?"th":"td";return(t.align?"<"+n+' align="'+t.align+'">':"<"+n+">")+e+"\n"},r.prototype.strong=function(e){return""+e+""},r.prototype.em=function(e){return""+e+""},r.prototype.codespan=function(e){return""+e+""},r.prototype.br=function(){return this.options.xhtml?"
    ":"
    "},r.prototype.del=function(e){return""+e+""},r.prototype.link=function(e,t,n){if(this.options.sanitize){try{var i=decodeURIComponent(l(e)).replace(/[^\w:]/g,"").toLowerCase()}catch(e){return n}if(0===i.indexOf("javascript:")||0===i.indexOf("vbscript:")||0===i.indexOf("data:"))return n}this.options.baseUrl&&!f.test(e)&&(e=h(this.options.baseUrl,e));try{e=encodeURI(e).replace(/%25/g,"%")}catch(e){return n}var o='
    "+n+""},r.prototype.image=function(e,t,n){this.options.baseUrl&&!f.test(e)&&(e=h(this.options.baseUrl,e));var i=''+n+'":">")},r.prototype.text=function(e){return e},s.prototype.strong=s.prototype.em=s.prototype.codespan=s.prototype.del=s.prototype.text=function(e){return e},s.prototype.link=s.prototype.image=function(e,t,n){return""+n},s.prototype.br=function(){return""},a.parse=function(e,t){return new a(t).parse(e)},a.prototype.parse=function(e){this.inline=new o(e.links,this.options),this.inlineText=new o(e.links,g({},this.options,{renderer:new s})),this.tokens=e.reverse();for(var t="";this.next();)t+=this.tok();return t},a.prototype.next=function(){return this.token=this.tokens.pop()},a.prototype.peek=function(){return this.tokens[this.tokens.length-1]||0},a.prototype.parseText=function(){for(var e=this.token.text;"text"===this.peek().type;)e+="\n"+this.next().text;return this.inline.output(e)},a.prototype.tok=function(){switch(this.token.type){case"space":return"";case"hr":return this.renderer.hr();case"heading":return this.renderer.heading(this.inline.output(this.token.text),this.token.depth,l(this.inlineText.output(this.token.text)));case"code":return this.renderer.code(this.token.text,this.token.lang,this.token.escaped);case"table":var e,t,n,i,o="",r="";for(n="",e=0;e=0&&"\\"===n[o];)i=!i;return i?"|":" |"})).split(/ \|/),i=0;if(n.length>t)n.splice(t);else for(;n.lengthAn error occurred:

    "+u(e.message+"",!0)+"
    ";throw e}}p.exec=p,y.options=y.setOptions=function(e){return g(y.defaults,e),y},y.getDefaults=function(){return{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:new r,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tables:!0,xhtml:!1}},y.defaults=y.getDefaults(),y.Parser=a,y.parser=a.parse,y.Renderer=r,y.TextRenderer=s,y.Lexer=n,y.lexer=n.lex,y.InlineLexer=o,y.inlineLexer=o.output,y.parse=y,fp=y}).call(void 0);var Cp=fp;function Sp(e){var t=e.inline?"span":"div",n=document.createElement(t);return e.className&&(n.className=e.className),n}function Lp(e,t){void 0===t&&(t={});var n=Sp(t);return kp(n,function(e){for(var t={type:1,children:[]},n=0,i=t,o=[],r=new Dp(e);!r.eos();){var s=r.next(),a="\\"===s&&0!==Tp(r.peek());if(a&&(s=r.next()),a||0===Tp(s)||s!==r.peek())if("\n"===s)2===i.type&&(i=o.pop()),i.children.push({type:7});else if(2!==i.type){var u={type:2,content:s};i.children.push(u),o.push(i),i=u}else i.content+=s;else{r.advance(),2===i.type&&(i=o.pop());var l=Tp(s);if(i.type===l||5===i.type&&6===l)i=o.pop();else{var c={type:l,children:[]};5===l&&(c.index=n,n++),i.children.push(c),o.push(i),i=c}}}return 2===i.type&&(i=o.pop()),o.length,t}(e),t.actionHandler),n}fp.Parser,fp.parser,fp.Renderer,fp.TextRenderer,fp.Lexer,fp.lexer,fp.InlineLexer,fp.inlineLexer,fp.parse;var Ip,Np,xp,Dp=function(){function e(e){this.source=e,this.index=0}return e.prototype.eos=function(){return this.index>=this.source.length},e.prototype.next=function(){var e=this.peek();return this.advance(),e},e.prototype.peek=function(){return this.source[this.index]},e.prototype.advance=function(){this.index++},e}();function kp(e,t,n){var i;if(2===t.type)i=document.createTextNode(t.content);else if(3===t.type)i=document.createElement("b");else if(4===t.type)i=document.createElement("i");else if(5===t.type&&n){var o=document.createElement("a");o.href="#",n.disposeables.push(hn(o,"click",(function(e){n.callback(String(t.index),e)}))),i=o}else 7===t.type?i=document.createElement("br"):1===t.type&&(i=e);e!==i&&e.appendChild(i),Array.isArray(t.children)&&t.children.forEach((function(e){kp(i,e,n)}))}function Tp(e){switch(e){case"*":return 3;case"_":return 4;case"[":return 5;case"]":return 6;default:return 0}}function Ep(e){Wp(Np,e)}function Ap(e){B.zx?Ep(e):Wp(xp,e)}n(7269);var jp,Op,Rp,Pp=0,zp=void 0;function Wp(e,t){if(Ip){switch(zp===t?Pp++:(zp=t,Pp=0),Pp){case 0:break;case 1:t=o.k("repeated","{0} (occurred again)",t);break;default:t=o.k("repeatedNtimes","{0} (occurred {1} times)",t,Pp)}en(e),e.textContent=t,e.style.visibility="hidden",e.style.visibility="visible"}}function Fp(e,t,n){var i=n.offset+n.size;return n.position===Rp.Before?t<=e-i?i:t<=n.offset?n.offset-t:Math.max(e-t,0):t<=n.offset?n.offset-t:t<=e-i?i:0}n(3009),function(e){e[e.LEFT=0]="LEFT",e[e.RIGHT=1]="RIGHT"}(jp||(jp={})),function(e){e[e.BELOW=0]="BELOW",e[e.ABOVE=1]="ABOVE"}(Op||(Op={})),function(e){e[e.Before=0]="Before",e[e.After=1]="After"}(Rp||(Rp={}));var Bp,Hp=function(){function e(e){var t=this;this.$view=Zh(".context-view").hide(),this.setContainer(e),this.toDispose=[(0,I.s)((function(){t.setContainer(null)}))],this.toDisposeOnClean=null}return e.prototype.setContainer=function(t){var n=this;this.$container&&(this.$container.getHTMLElement().removeChild(this.$view.getHTMLElement()),this.$container.off(e.BUBBLE_UP_EVENTS),this.$container.off(e.BUBBLE_DOWN_EVENTS,!0),this.$container=null),t&&(this.$container=Zh(t),this.$view.appendTo(this.$container),this.$container.on(e.BUBBLE_UP_EVENTS,(function(e){n.onDOMEvent(e,document.activeElement,!1)})),this.$container.on(e.BUBBLE_DOWN_EVENTS,(function(e){n.onDOMEvent(e,document.activeElement,!0)}),null,!0))},e.prototype.show=function(e){this.isVisible()&&this.hide(),this.$view.setClass("context-view").empty().style({top:"0px",left:"0px"}).show(),this.toDisposeOnClean=e.render(this.$view.getHTMLElement()),this.delegate=e,this.doLayout()},e.prototype.layout=function(){this.isVisible()&&(!1!==this.delegate.canRelayout?(this.delegate.layout&&this.delegate.layout(),this.doLayout()):this.hide())},e.prototype.doLayout=function(){var e,t=this.delegate.getAnchor();if(Vn(t)){var n=Tn(t);e={top:n.top,left:n.left,width:n.width,height:n.height}}else{var i=t;e={top:i.y,left:i.x,width:i.width||0,height:i.height||0}}var o,r=this.$view.getTotalSize(),s=this.delegate.anchorPosition||Op.BELOW,a=this.delegate.anchorAlignment||jp.LEFT,u={offset:e.top,size:e.height,position:s===Op.BELOW?Rp.Before:Rp.After};o=a===jp.LEFT?{offset:e.left,size:0,position:Rp.Before}:{offset:e.left+e.width,size:0,position:Rp.After};var l=Tn(this.$container.getHTMLElement()),c=Fp(window.innerHeight,r.height,u)-l.top,h=Fp(window.innerWidth,r.width,o)-l.left;this.$view.removeClass("top","bottom","left","right"),this.$view.addClass(s===Op.BELOW?"bottom":"top"),this.$view.addClass(a===jp.LEFT?"left":"right"),this.$view.style({top:c+"px",left:h+"px",width:"initial"})},e.prototype.hide=function(e){this.delegate&&this.delegate.onHide&&this.delegate.onHide(e),this.delegate=null,this.toDisposeOnClean&&(this.toDisposeOnClean.dispose(),this.toDisposeOnClean=null),this.$view.hide()},e.prototype.isVisible=function(){return!!this.delegate},e.prototype.onDOMEvent=function(e,t,n){this.delegate&&(this.delegate.onDOMEvent?this.delegate.onDOMEvent(e,document.activeElement):n&&!Pn(e.target,this.$container.getHTMLElement())&&this.hide())},e.prototype.dispose=function(){this.hide(),this.toDispose=(0,I.AS)(this.toDispose)},e.BUBBLE_UP_EVENTS=["click","keydown","focus","blur"],e.BUBBLE_DOWN_EVENTS=["click"],e}(),Vp=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();!function(e){var t={next:function(){return{done:!0,value:void 0}}};function n(e,t){for(var n=e.next();!n.done;n=e.next())t(n.value)}e.empty=function(){return t},e.iterate=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=e.length),{next:function(){return t>=n?{done:!0,value:void 0}:{done:!1,value:e[t++]}}}},e.map=function(e,t){return{next:function(){var n=e.next(),i=n.done,o=n.value;return{done:i,value:i?void 0:t(o)}}}},e.filter=function(e,t){return{next:function(){for(;;){var n=e.next(),i=n.done,o=n.value;if(i)return{done:i,value:void 0};if(t(o))return{done:i,value:o}}}}},e.forEach=n,e.collect=function(e){var t=[];return n(e,(function(e){return t.push(e)})),t}}(Bp||(Bp={}));var Up,Yp=function(){function e(e,t,n,i){void 0===t&&(t=0),void 0===n&&(n=e.length),void 0===i&&(i=t-1),this.items=e,this.start=t,this.end=n,this.index=i}return e.prototype.next=function(){return this.index=Math.min(this.index+1,this.end),this.current()},e.prototype.current=function(){return this.index===this.start-1||this.index===this.end?null:this.items[this.index]},e}(),Zp=function(e){function t(t,n,i,o){return void 0===n&&(n=0),void 0===i&&(i=t.length),void 0===o&&(o=n-1),e.call(this,t,n,i,o)||this}return Vp(t,e),t.prototype.current=function(){return e.prototype.current.call(this)},t.prototype.previous=function(){return this.index=Math.max(this.index-1,this.start-1),this.current()},t.prototype.first=function(){return this.index=this.start,this.current()},t.prototype.last=function(){return this.index=this.end-1,this.current()},t.prototype.parent=function(){return null},t}(Yp),Gp=function(){function e(e,t){this.iterator=e,this.fn=t}return e.prototype.next=function(){return this.fn(this.iterator.next())},e}(),Qp=function(){function e(e,t){void 0===e&&(e=[]),void 0===t&&(t=10),this._initialize(e),this._limit=t,this._onChange()}return e.prototype.add=function(e){this._history.delete(e),this._history.add(e),this._onChange()},e.prototype.next=function(){return this._navigator.next()},e.prototype.previous=function(){return this._navigator.previous()},e.prototype.current=function(){return this._navigator.current()},e.prototype.parent=function(){return null},e.prototype.first=function(){return this._navigator.first()},e.prototype.last=function(){return this._navigator.last()},e.prototype.has=function(e){return this._history.has(e)},e.prototype._onChange=function(){this._reduceToLimit(),this._navigator=new Zp(this._elements,0,this._elements.length,this._elements.length)},e.prototype._reduceToLimit=function(){var e=this._elements;e.length>this._limit&&this._initialize(e.slice(e.length-this._limit))},e.prototype._initialize=function(e){this._history=new Set;for(var t=0,n=e;t=0){var n=void 0;e.equals(17)?n=(t+1)%r.length:e.equals(15)&&(n=0===t?r.length-1:t-1),e.equals(9)?r[t].blur():n>=0&&r[n].focus(),Yn(e,!0)}}})),this.setInputWidth();var s=document.createElement("div");s.className="controls",s.appendChild(this.caseSensitive.domNode),s.appendChild(this.wholeWords.domNode),s.appendChild(this.regex.domNode),this.domNode.appendChild(s)},t.prototype.validate=function(){this.inputBox.validate()},t.prototype.dispose=function(){e.prototype.dispose.call(this)},t}(kc);function fg(e,t){return e.getContext(document.activeElement).getValue(t)}var pg=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),gg=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},mg=function(e,t){return function(n,i){t(n,i,e)}},vg="historyNavigationWidget",yg="historyNavigationEnabled";function bg(e,t){var n=function(e,t){return e.createScoped(t.target)}(e,t);return function(e,t,n){new ce(n,t).bindTo(e)}(n,t,vg),{scopedContextKeyService:n,historyNavigationEnablement:new ce(yg,!0).bindTo(n)}}var _g=function(e){function t(t,n,i,o){var r=e.call(this,t,n,i)||this;return r._register(bg(o,{target:r.element,historyNavigator:r}).scopedContextKeyService),r}return pg(t,e),gg([mg(3,he)],t)}($p),wg=function(e){function t(t,n,i,o){var r=e.call(this,t,n,i)||this;return r._register(bg(o,{target:r.inputBox.element,historyNavigator:r.inputBox}).scopedContextKeyService),r}return pg(t,e),gg([mg(3,he)],t)}(dg);Z.registerCommandAndKeybindingRule({id:"history.showPrevious",weight:200,when:ne.and(new oe(vg),new re(yg,!0)),primary:16,secondary:[528],handler:function(e,t){fg(e.get(he),vg).historyNavigator.showPreviousValue()}}),Z.registerCommandAndKeybindingRule({id:"history.showNext",weight:200,when:new le([new oe(vg),new re(yg,!0)]),primary:18,secondary:[530],handler:function(e,t){fg(e.get(he),vg).historyNavigator.showNextValue()}});var Mg=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Cg=o.k("label.find","Find"),Sg=o.k("placeholder.find","Find"),Lg=o.k("label.previousMatchButton","Previous match"),Ig=o.k("label.nextMatchButton","Next match"),Ng=o.k("label.toggleSelectionFind","Find in selection"),xg=o.k("label.closeButton","Close"),Dg=o.k("label.replace","Replace"),kg=o.k("placeholder.replace","Replace"),Tg=o.k("label.replaceButton","Replace"),Eg=o.k("label.replaceAllButton","Replace All"),Ag=o.k("label.toggleReplaceButton","Toggle Replace mode"),jg=o.k("title.matchesCountLimit","Only the first {0} results are highlighted, but all find operations work on the entire text.",ap),Og=o.k("label.matchesLocation","{0} of {1}"),Rg=o.k("label.noResults","No Results"),Pg=411,zg=69,Wg=17+(zg+3+1)+92+2,Fg=function(e){this.afterLineNumber=e,this.heightInPx=34,this.suppressMouseDown=!1,this.domNode=document.createElement("div"),this.domNode.className="dock-find-viewzone"},Bg=function(e){function t(t,n,i,o,r,s,a){var u=e.call(this)||this;return u._codeEditor=t,u._controller=n,u._state=i,u._contextViewProvider=o,u._keybindingService=r,u._contextKeyService=s,u._isVisible=!1,u._isReplaceVisible=!1,u._updateHistoryDelayer=new mt(500),u._register(u._state.onFindReplaceStateChange((function(e){return u._onStateChanged(e)}))),u._buildDomNode(),u._updateButtons(),u._tryUpdateWidgetWidth(),u._register(u._codeEditor.onDidChangeConfiguration((function(e){e.readOnly&&(u._codeEditor.getConfiguration().readOnly&&u._state.change({isReplaceRevealed:!1},!1),u._updateButtons()),e.layoutInfo&&u._tryUpdateWidgetWidth()}))),u._register(u._codeEditor.onDidChangeCursorSelection((function(){u._isVisible&&u._updateToggleSelectionFindButton()}))),u._register(u._codeEditor.onDidFocusEditorWidget((function(){if(u._isVisible){var e=u._controller.getGlobalBufferTerm();e&&e!==u._state.searchString&&(u._state.change({searchString:e},!0),u._findInput.select())}}))),u._findInputFocused=Zf.bindTo(s),u._findFocusTracker=u._register(Gn(u._findInput.inputBox.inputElement)),u._register(u._findFocusTracker.onDidFocus((function(){u._findInputFocused.set(!0),u._updateSearchScope()}))),u._register(u._findFocusTracker.onDidBlur((function(){u._findInputFocused.set(!1)}))),u._replaceInputFocused=Gf.bindTo(s),u._replaceFocusTracker=u._register(Gn(u._replaceInputBox.inputElement)),u._register(u._replaceFocusTracker.onDidFocus((function(){u._replaceInputFocused.set(!0),u._updateSearchScope()}))),u._register(u._replaceFocusTracker.onDidBlur((function(){u._replaceInputFocused.set(!1)}))),u._codeEditor.addOverlayWidget(u),u._viewZone=new Fg(0),u._applyTheme(a.getTheme()),u._register(a.onThemeChange(u._applyTheme.bind(u))),u._register(u._codeEditor.onDidChangeModel((function(e){u._isVisible&&void 0!==u._viewZoneId&&u._codeEditor.changeViewZones((function(e){e.removeZone(u._viewZoneId),u._viewZoneId=void 0}))}))),u._register(u._codeEditor.onDidScrollChange((function(e){e.scrollTopChanged?u._layoutViewZone():setTimeout((function(){u._layoutViewZone()}),0)}))),u}return Mg(t,e),t.prototype.getId=function(){return t.ID},t.prototype.getDomNode=function(){return this._domNode},t.prototype.getPosition=function(){return this._isVisible?{preference:ru.TOP_RIGHT_CORNER}:null},t.prototype._onStateChanged=function(e){if(e.searchString&&(this._findInput.setValue(this._state.searchString),this._updateButtons()),e.replaceString&&(this._replaceInputBox.value=this._state.replaceString),e.isRevealed&&(this._state.isRevealed?this._reveal(!0):this._hide(!0)),e.isReplaceRevealed&&(this._state.isReplaceRevealed?this._codeEditor.getConfiguration().readOnly||this._isReplaceVisible||(this._isReplaceVisible=!0,this._replaceInputBox.width=this._findInput.inputBox.width,this._updateButtons()):this._isReplaceVisible&&(this._isReplaceVisible=!1,this._updateButtons())),e.isRegex&&this._findInput.setRegex(this._state.isRegex),e.wholeWord&&this._findInput.setWholeWords(this._state.wholeWord),e.matchCase&&this._findInput.setCaseSensitive(this._state.matchCase),e.searchScope&&(this._state.searchScope?this._toggleSelectionFind.checked=!0:this._toggleSelectionFind.checked=!1,this._updateToggleSelectionFindButton()),e.searchString||e.matchesCount||e.matchesPosition){var t=this._state.searchString.length>0&&0===this._state.matchesCount;un(this._domNode,"no-results",t),this._updateMatchesCount()}(e.searchString||e.currentMatch)&&this._layoutViewZone(),e.updateHistory&&this._delayedUpdateHistory()},t.prototype._delayedUpdateHistory=function(){this._updateHistoryDelayer.trigger(this._updateHistory.bind(this))},t.prototype._updateHistory=function(){this._state.searchString&&this._findInput.inputBox.addToHistory(),this._state.replaceString&&this._replaceInputBox.addToHistory()},t.prototype._updateMatchesCount=function(){var e;if(this._matchesCount.style.minWidth=zg+"px",this._state.matchesCount>=ap?this._matchesCount.title=jg:this._matchesCount.title="",this._matchesCount.firstChild&&this._matchesCount.removeChild(this._matchesCount.firstChild),this._state.matchesCount>0){var t=String(this._state.matchesCount);this._state.matchesCount>=ap&&(t+="+");var n=String(this._state.matchesPosition);"0"===n&&(n="?"),e=p.format(Og,n,t)}else e=Rg;this._matchesCount.appendChild(document.createTextNode(e)),zg=Math.max(zg,this._matchesCount.clientWidth)},t.prototype._updateToggleSelectionFindButton=function(){var e=this._codeEditor.getSelection(),t=!!e&&(e.startLineNumber!==e.endLineNumber||e.startColumn!==e.endColumn),n=this._toggleSelectionFind.checked;this._toggleSelectionFind.setEnabled(this._isVisible&&(n||t))},t.prototype._updateButtons=function(){this._findInput.setEnabled(this._isVisible),this._replaceInputBox.setEnabled(this._isVisible&&this._isReplaceVisible),this._updateToggleSelectionFindButton(),this._closeBtn.setEnabled(this._isVisible);var e=this._state.searchString.length>0;this._prevBtn.setEnabled(this._isVisible&&e),this._nextBtn.setEnabled(this._isVisible&&e),this._replaceBtn.setEnabled(this._isVisible&&this._isReplaceVisible&&e),this._replaceAllBtn.setEnabled(this._isVisible&&this._isReplaceVisible&&e),un(this._domNode,"replaceToggled",this._isReplaceVisible),this._toggleReplaceBtn.toggleClass("collapse",!this._isReplaceVisible),this._toggleReplaceBtn.toggleClass("expand",this._isReplaceVisible),this._toggleReplaceBtn.setExpanded(this._isReplaceVisible);var t=!this._codeEditor.getConfiguration().readOnly;this._toggleReplaceBtn.setEnabled(this._isVisible&&t)},t.prototype._reveal=function(e){var t=this;if(!this._isVisible){this._isVisible=!0;var n=this._codeEditor.getSelection();n&&(n.startLineNumber!==n.endLineNumber||n.startColumn!==n.endColumn)&&this._codeEditor.getConfiguration().contribInfo.find.autoFindInSelection?this._toggleSelectionFind.checked=!0:this._toggleSelectionFind.checked=!1,this._tryUpdateWidgetWidth(),this._updateButtons(),setTimeout((function(){sn(t._domNode,"visible"),t._domNode.setAttribute("aria-hidden","false")}),0),this._codeEditor.layoutOverlayWidget(this);var i=!0;if(this._codeEditor.getConfiguration().contribInfo.find.seedSearchStringFromSelection&&n){var o=Tn(this._codeEditor.getDomNode()),r=this._codeEditor.getScrolledVisiblePosition(n.getStartPosition()),s=o.left+r.left;if(r.topn.startLineNumber&&(i=!1);var a=kn(this._domNode).left;s>a&&(i=!1);var u=this._codeEditor.getScrolledVisiblePosition(n.getEndPosition());o.left+u.left>a&&(i=!1)}}this._showViewZone(i)}},t.prototype._hide=function(e){var t=this;this._isVisible&&(this._isVisible=!1,this._updateButtons(),an(this._domNode,"visible"),this._domNode.setAttribute("aria-hidden","true"),e&&this._codeEditor.focus(),this._codeEditor.layoutOverlayWidget(this),this._codeEditor.changeViewZones((function(e){void 0!==t._viewZoneId&&(e.removeZone(t._viewZoneId),t._viewZoneId=void 0,t._codeEditor.setScrollTop(t._codeEditor.getScrollTop()-t._viewZone.heightInPx))})))},t.prototype._layoutViewZone=function(){var e=this;this._isVisible&&void 0===this._viewZoneId&&this._codeEditor.changeViewZones((function(t){e._state.isReplaceRevealed?e._viewZone.heightInPx=64:e._viewZone.heightInPx=34,e._viewZoneId=t.addZone(e._viewZone),e._codeEditor.setScrollTop(e._codeEditor.getScrollTop()+e._viewZone.heightInPx)}))},t.prototype._showViewZone=function(e){var t=this;void 0===e&&(e=!0),this._isVisible&&this._codeEditor.changeViewZones((function(n){var i=34;void 0!==t._viewZoneId?(t._state.isReplaceRevealed?(t._viewZone.heightInPx=64,i=30):(t._viewZone.heightInPx=34,i=-30),n.removeZone(t._viewZoneId)):t._viewZone.heightInPx=34,t._viewZoneId=n.addZone(t._viewZone),e&&t._codeEditor.setScrollTop(t._codeEditor.getScrollTop()+i)}))},t.prototype._applyTheme=function(e){var t={inputActiveOptionBorder:e.getColor(us),inputBackground:e.getColor(rs),inputForeground:e.getColor(ss),inputBorder:e.getColor(as),inputValidationInfoBackground:e.getColor(ls),inputValidationInfoBorder:e.getColor(cs),inputValidationWarningBackground:e.getColor(hs),inputValidationWarningBorder:e.getColor(ds),inputValidationErrorBackground:e.getColor(fs),inputValidationErrorBorder:e.getColor(ps)};this._findInput.style(t),this._replaceInputBox.style(t)},t.prototype._tryUpdateWidgetWidth=function(){if(this._isVisible){var e=this._codeEditor.getConfiguration().layoutInfo.width,t=this._codeEditor.getConfiguration().layoutInfo.minimapWidth,n=!1,i=!1,o=!1;if(this._resized&&An(this._domNode)>Pg)return this._domNode.style.maxWidth=e-28-t-15+"px",void(this._replaceInputBox.inputElement.style.width=An(this._findInput.inputBox.inputElement)+"px");if(439+t>=e&&(i=!0),439+t-zg>=e&&(o=!0),439+t-zg>=e+50&&(n=!0),un(this._domNode,"collapsed-find-widget",n),un(this._domNode,"narrow-find-widget",o),un(this._domNode,"reduced-find-widget",i),o||n||(this._domNode.style.maxWidth=e-28-t-15+"px"),this._resized){var r=An(this._findInput.inputBox.inputElement);r>0&&(this._replaceInputBox.inputElement.style.width=r+"px")}}},t.prototype.focusFindInput=function(){this._findInput.select(),this._findInput.focus()},t.prototype.focusReplaceInput=function(){this._replaceInputBox.select(),this._replaceInputBox.focus()},t.prototype.highlightFindOptions=function(){this._findInput.highlightFindOptions()},t.prototype._updateSearchScope=function(){if(this._toggleSelectionFind.checked){var e=this._codeEditor.getSelection();1===e.endColumn&&e.endLineNumber>e.startLineNumber&&(e=e.setEndPosition(e.endLineNumber-1,1));var t=this._state.currentMatch;e.startLineNumber!==e.endLineNumber&&(s.Q.equalsRange(e,t)||this._state.change({searchScope:e},!0))}},t.prototype._onFindInputMouseDown=function(e){e.middleButton&&e.stopPropagation()},t.prototype._onFindInputKeyDown=function(e){return e.equals(3)?(this._codeEditor.getAction(Xf).run().done(null,S.dz),void e.preventDefault()):e.equals(1027)?(this._codeEditor.getAction($f).run().done(null,S.dz),void e.preventDefault()):e.equals(2)?(this._isReplaceVisible?this._replaceInputBox.focus():this._findInput.focusOnCaseSensitive(),void e.preventDefault()):e.equals(2066)?(this._codeEditor.focus(),void e.preventDefault()):void 0},t.prototype._onReplaceInputKeyDown=function(e){return e.equals(3)?(this._controller.replace(),void e.preventDefault()):e.equals(2051)?(this._controller.replaceAll(),void e.preventDefault()):e.equals(2)?(this._findInput.focusOnCaseSensitive(),void e.preventDefault()):e.equals(1026)?(this._findInput.focus(),void e.preventDefault()):e.equals(2066)?(this._codeEditor.focus(),void e.preventDefault()):void 0},t.prototype.getHorizontalSashTop=function(e){return 0},t.prototype.getHorizontalSashLeft=function(e){return 0},t.prototype.getHorizontalSashWidth=function(e){return 500},t.prototype._keybindingLabelFor=function(e){var t=this._keybindingService.lookupKeybinding(e);return t?" ("+t.getLabel()+")":""},t.prototype._buildFindPart=function(){var e=this;this._findInput=this._register(new wg(null,this._contextViewProvider,{width:221,label:Cg,placeholder:Sg,appendCaseSensitiveLabel:this._keybindingLabelFor(tp),appendWholeWordsLabel:this._keybindingLabelFor(np),appendRegexLabel:this._keybindingLabelFor(ip),validation:function(t){if(0===t.length)return null;if(!e._findInput.getRegex())return null;try{return new RegExp(t),null}catch(e){return{content:e.message}}}},this._contextKeyService)),this._findInput.setRegex(!!this._state.isRegex),this._findInput.setCaseSensitive(!!this._state.matchCase),this._findInput.setWholeWords(!!this._state.wholeWord),this._register(this._findInput.onKeyDown((function(t){return e._onFindInputKeyDown(t)}))),this._register(this._findInput.inputBox.onDidChange((function(){e._state.change({searchString:e._findInput.getValue()},!0)}))),this._register(this._findInput.onDidOptionChange((function(){e._state.change({isRegex:e._findInput.getRegex(),wholeWord:e._findInput.getWholeWords(),matchCase:e._findInput.getCaseSensitive()},!0)}))),this._register(this._findInput.onCaseSensitiveKeyDown((function(t){t.equals(1026)&&e._isReplaceVisible&&(e._replaceInputBox.focus(),t.preventDefault())}))),B.j9&&this._register(this._findInput.onMouseDown((function(t){return e._onFindInputMouseDown(t)}))),this._matchesCount=document.createElement("div"),this._matchesCount.className="matchesCount",this._updateMatchesCount(),this._prevBtn=this._register(new Vg({label:Lg+this._keybindingLabelFor($f),className:"previous",onTrigger:function(){e._codeEditor.getAction($f).run().done(null,S.dz)}})),this._nextBtn=this._register(new Vg({label:Ig+this._keybindingLabelFor(Xf),className:"next",onTrigger:function(){e._codeEditor.getAction(Xf).run().done(null,S.dz)}}));var t=document.createElement("div");return t.className="find-part",t.appendChild(this._findInput.domNode),t.appendChild(this._matchesCount),t.appendChild(this._prevBtn.domNode),t.appendChild(this._nextBtn.domNode),this._toggleSelectionFind=this._register(new Hg({parent:t,title:Ng+this._keybindingLabelFor(op),onChange:function(){if(e._toggleSelectionFind.checked){var t=e._codeEditor.getSelection();1===t.endColumn&&t.endLineNumber>t.startLineNumber&&(t=t.setEndPosition(t.endLineNumber-1,1)),t.isEmpty()||e._state.change({searchScope:t},!0)}else e._state.change({searchScope:null},!0)}})),this._closeBtn=this._register(new Vg({label:xg+this._keybindingLabelFor(ep),className:"close-fw",onTrigger:function(){e._state.change({isRevealed:!1,searchScope:null},!1)},onKeyDown:function(t){t.equals(2)&&e._isReplaceVisible&&(e._replaceBtn.isEnabled()?e._replaceBtn.focus():e._codeEditor.focus(),t.preventDefault())}})),t.appendChild(this._closeBtn.domNode),t},t.prototype._buildReplacePart=function(){var e=this,t=document.createElement("div");t.className="replace-input",t.style.width="221px",this._replaceInputBox=this._register(new _g(t,null,{ariaLabel:Dg,placeholder:kg,history:[]},this._contextKeyService)),this._register(hn(this._replaceInputBox.inputElement,"keydown",(function(t){return e._onReplaceInputKeyDown(t)}))),this._register(hn(this._replaceInputBox.inputElement,"input",(function(t){e._state.change({replaceString:e._replaceInputBox.value},!1)}))),this._replaceBtn=this._register(new Vg({label:Tg+this._keybindingLabelFor(rp),className:"replace",onTrigger:function(){e._controller.replace()},onKeyDown:function(t){t.equals(1026)&&(e._closeBtn.focus(),t.preventDefault())}})),this._replaceAllBtn=this._register(new Vg({label:Eg+this._keybindingLabelFor(sp),className:"replace-all",onTrigger:function(){e._controller.replaceAll()}}));var n=document.createElement("div");return n.className="replace-part",n.appendChild(t),n.appendChild(this._replaceBtn.domNode),n.appendChild(this._replaceAllBtn.domNode),n},t.prototype._buildDomNode=function(){var e=this,t=this._buildFindPart(),n=this._buildReplacePart();this._toggleReplaceBtn=this._register(new Vg({label:Ag,className:"toggle left",onTrigger:function(){e._state.change({isReplaceRevealed:!e._isReplaceVisible},!1),e._isReplaceVisible&&(e._replaceInputBox.width=e._findInput.inputBox.width),e._showViewZone()}})),this._toggleReplaceBtn.toggleClass("expand",this._isReplaceVisible),this._toggleReplaceBtn.toggleClass("collapse",!this._isReplaceVisible),this._toggleReplaceBtn.setExpanded(this._isReplaceVisible),this._domNode=document.createElement("div"),this._domNode.className="editor-widget find-widget",this._domNode.setAttribute("aria-hidden","true"),this._domNode.style.width=Pg+"px",this._domNode.appendChild(this._toggleReplaceBtn.domNode),this._domNode.appendChild(t),this._domNode.appendChild(n),this._buildSash()},t.prototype._buildSash=function(){var e=this;this._resizeSash=new Eh(this._domNode,this,{orientation:xh.VERTICAL}),this._resized=!1;var t=Pg;this._register(this._resizeSash.onDidStart((function(n){t=An(e._domNode)}))),this._register(this._resizeSash.onDidChange((function(n){e._resized=!0;var i=t+n.startX-n.currentX;if(!(i(parseFloat(Ln(e._domNode).maxWidth)||0)||(e._domNode.style.width=i+"px",e._isReplaceVisible&&(e._replaceInputBox.width=o))}})))},t.ID="editor.contrib.findWidget",t}(kc),Hg=function(e){function t(n){var i=e.call(this)||this;return i._opts=n,i._domNode=document.createElement("div"),i._domNode.className="monaco-checkbox",i._domNode.title=i._opts.title,i._domNode.tabIndex=0,i._checkbox=document.createElement("input"),i._checkbox.type="checkbox",i._checkbox.className="checkbox",i._checkbox.id="checkbox-"+t._COUNTER++,i._checkbox.tabIndex=-1,i._label=document.createElement("label"),i._label.className="label",i._label.htmlFor=i._checkbox.id,i._label.tabIndex=-1,i._domNode.appendChild(i._checkbox),i._domNode.appendChild(i._label),i._opts.parent.appendChild(i._domNode),i.onchange(i._checkbox,(function(e){i._opts.onChange()})),i}return Mg(t,e),Object.defineProperty(t.prototype,"domNode",{get:function(){return this._domNode},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"checked",{get:function(){return this._checkbox.checked},set:function(e){this._checkbox.checked=e},enumerable:!0,configurable:!0}),t.prototype.enable=function(){this._checkbox.removeAttribute("disabled")},t.prototype.disable=function(){this._checkbox.disabled=!0},t.prototype.setEnabled=function(e){e?(this.enable(),this.domNode.tabIndex=0):(this.disable(),this.domNode.tabIndex=-1)},t._COUNTER=0,t}(kc),Vg=function(e){function t(t){var n=e.call(this)||this;return n._opts=t,n._domNode=document.createElement("div"),n._domNode.title=n._opts.label,n._domNode.tabIndex=0,n._domNode.className="button "+n._opts.className,n._domNode.setAttribute("role","button"),n._domNode.setAttribute("aria-label",n._opts.label),n.onclick(n._domNode,(function(e){n._opts.onTrigger(),e.preventDefault()})),n.onkeydown(n._domNode,(function(e){if(e.equals(10)||e.equals(3))return n._opts.onTrigger(),void e.preventDefault();n._opts.onKeyDown&&n._opts.onKeyDown(e)})),n}return Mg(t,e),Object.defineProperty(t.prototype,"domNode",{get:function(){return this._domNode},enumerable:!0,configurable:!0}),t.prototype.isEnabled=function(){return this._domNode.tabIndex>=0},t.prototype.focus=function(){this._domNode.focus()},t.prototype.setEnabled=function(e){un(this._domNode,"disabled",!e),this._domNode.setAttribute("aria-disabled",String(!e)),this._domNode.tabIndex=e?0:-1},t.prototype.setExpanded=function(e){this._domNode.setAttribute("aria-expanded",String(!!e))},t.prototype.toggleClass=function(e,t){un(this._domNode,e,t)},t}(kc);Tr((function(e,t){var n=function(e,n){n&&t.addRule(".monaco-editor "+e+" { background-color: "+n+"; }")};n(".findMatch",e.getColor(Zs)),n(".currentFindMatch",e.getColor(Ys)),n(".findScope",e.getColor(Gs)),n(".find-widget",e.getColor(Ps));var i=e.getColor(os);i&&t.addRule(".monaco-editor .find-widget { box-shadow: 0 2px 8px "+i+"; }");var o=e.getColor(qs);o&&t.addRule(".monaco-editor .findMatch { border: 1px "+("hc"===e.type?"dotted":"solid")+" "+o+"; box-sizing: border-box; }");var r=e.getColor(Qs);r&&t.addRule(".monaco-editor .currentFindMatch { border: 2px solid "+r+"; padding: 1px; box-sizing: border-box; }");var s=e.getColor(Ks);s&&t.addRule(".monaco-editor .findScope { border: 1px "+("hc"===e.type?"dashed":"solid")+" "+s+"; }");var a=e.getColor(es);a&&t.addRule(".monaco-editor .find-widget { border: 2px solid "+a+"; }");var u=e.getColor(Xr);u&&t.addRule(".monaco-editor .find-widget.no-results .matchesCount { color: "+u+"; }");var l=e.getColor(Ws);if(l)t.addRule(".monaco-editor .find-widget .monaco-sash { background-color: "+l+"; width: 3px !important; margin-left: -4px;}");else{var c=e.getColor(zs);c&&t.addRule(".monaco-editor .find-widget .monaco-sash { background-color: "+c+"; width: 3px !important; margin-left: -4px;}")}}));var Ug=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Yg=function(e){function t(t,n,i,o){var r=e.call(this)||this;r._hideSoon=r._register(new Ct((function(){return r._hide()}),2e3)),r._isVisible=!1,r._editor=t,r._state=n,r._keybindingService=i,r._domNode=document.createElement("div"),r._domNode.className="findOptionsWidget",r._domNode.style.display="none",r._domNode.style.top="10px",r._domNode.setAttribute("role","presentation"),r._domNode.setAttribute("aria-hidden","true");var s=o.getTheme().getColor(us);return r.caseSensitive=r._register(new ag({appendTitle:r._keybindingLabelFor(tp),isChecked:r._state.matchCase,inputActiveOptionBorder:s})),r._domNode.appendChild(r.caseSensitive.domNode),r._register(r.caseSensitive.onChange((function(){r._state.change({matchCase:r.caseSensitive.checked},!1)}))),r.wholeWords=r._register(new ug({appendTitle:r._keybindingLabelFor(np),isChecked:r._state.wholeWord,inputActiveOptionBorder:s})),r._domNode.appendChild(r.wholeWords.domNode),r._register(r.wholeWords.onChange((function(){r._state.change({wholeWord:r.wholeWords.checked},!1)}))),r.regex=r._register(new lg({appendTitle:r._keybindingLabelFor(ip),isChecked:r._state.isRegex,inputActiveOptionBorder:s})),r._domNode.appendChild(r.regex.domNode),r._register(r.regex.onChange((function(){r._state.change({isRegex:r.regex.checked},!1)}))),r._editor.addOverlayWidget(r),r._register(r._state.onFindReplaceStateChange((function(e){var t=!1;e.isRegex&&(r.regex.checked=r._state.isRegex,t=!0),e.wholeWord&&(r.wholeWords.checked=r._state.wholeWord,t=!0),e.matchCase&&(r.caseSensitive.checked=r._state.matchCase,t=!0),!r._state.isRevealed&&t&&r._revealTemporarily()}))),r._register(dn(r._domNode,(function(e){return r._onMouseOut()}))),r._register(cn(r._domNode,"mouseover",(function(e){return r._onMouseOver()}))),r._applyTheme(o.getTheme()),r._register(o.onThemeChange(r._applyTheme.bind(r))),r}return Ug(t,e),t.prototype._keybindingLabelFor=function(e){var t=this._keybindingService.lookupKeybinding(e);return t?" ("+t.getLabel()+")":""},t.prototype.dispose=function(){this._editor.removeOverlayWidget(this),e.prototype.dispose.call(this)},t.prototype.getId=function(){return t.ID},t.prototype.getDomNode=function(){return this._domNode},t.prototype.getPosition=function(){return{preference:ru.TOP_RIGHT_CORNER}},t.prototype.highlightFindOptions=function(){this._revealTemporarily()},t.prototype._revealTemporarily=function(){this._show(),this._hideSoon.schedule()},t.prototype._onMouseOut=function(){this._hideSoon.schedule()},t.prototype._onMouseOver=function(){this._hideSoon.cancel()},t.prototype._show=function(){this._isVisible||(this._isVisible=!0,this._domNode.style.display="block")},t.prototype._hide=function(){this._isVisible&&(this._isVisible=!1,this._domNode.style.display="none")},t.prototype._applyTheme=function(e){var t={inputActiveOptionBorder:e.getColor(us)};this.caseSensitive.style(t),this.wholeWords.style(t),this.regex.style(t)},t.ID="editor.contrib.findOptionsWidget",t}(kc);Tr((function(e,t){var n=e.getColor(Ps);n&&t.addRule(".monaco-editor .findOptionsWidget { background-color: "+n+"; }");var i=e.getColor(os);i&&t.addRule(".monaco-editor .findOptionsWidget { box-shadow: 0 2px 8px "+i+"; }");var o=e.getColor(es);o&&t.addRule(".monaco-editor .findOptionsWidget { border: 2px solid "+o+"; }")}));var Zg=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Gg=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},Qg=function(e,t){return function(n,i){t(n,i,e)}};function qg(e){var t=e.getSelection();if(t.startLineNumber===t.endLineNumber){if(!t.isEmpty())return e.getModel().getValueInRange(t);var n=e.getModel().getWordAtPosition(t.getStartPosition());if(n)return n.word}return null}var Kg=function(e){function t(t,n,i,o){var r=e.call(this)||this;return r._editor=t,r._findWidgetVisible=Yf.bindTo(n),r._storageService=i,r._clipboardService=o,r._updateHistoryDelayer=new mt(500),r._state=r._register(new hp),r.loadQueryState(),r._register(r._state.onFindReplaceStateChange((function(e){return r._onStateChanged(e)}))),r._model=null,r._register(r._editor.onDidChangeModel((function(){var e=r._editor.getModel()&&r._state.isRevealed;r.disposeModel(),r._state.change({searchScope:null,matchCase:r._storageService.getBoolean("editor.matchCase",cp.WORKSPACE,!1),wholeWord:r._storageService.getBoolean("editor.wholeWord",cp.WORKSPACE,!1),isRegex:r._storageService.getBoolean("editor.isRegex",cp.WORKSPACE,!1)},!1),e&&r._start({forceRevealReplace:!1,seedSearchStringFromSelection:!1,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!1})}))),r}return Zg(t,e),t.get=function(e){return e.getContribution(t.ID)},t.prototype.dispose=function(){this.disposeModel(),e.prototype.dispose.call(this)},t.prototype.disposeModel=function(){this._model&&(this._model.dispose(),this._model=null)},t.prototype.getId=function(){return t.ID},t.prototype._onStateChanged=function(e){this.saveQueryState(e),e.isRevealed&&(this._state.isRevealed?this._findWidgetVisible.set(!0):(this._findWidgetVisible.reset(),this.disposeModel())),e.searchString&&this.setGlobalBufferTerm(this._state.searchString)},t.prototype.saveQueryState=function(e){e.isRegex&&this._storageService.store("editor.isRegex",this._state.actualIsRegex,cp.WORKSPACE),e.wholeWord&&this._storageService.store("editor.wholeWord",this._state.actualWholeWord,cp.WORKSPACE),e.matchCase&&this._storageService.store("editor.matchCase",this._state.actualMatchCase,cp.WORKSPACE)},t.prototype.loadQueryState=function(){this._state.change({matchCase:this._storageService.getBoolean("editor.matchCase",cp.WORKSPACE,this._state.matchCase),wholeWord:this._storageService.getBoolean("editor.wholeWord",cp.WORKSPACE,this._state.wholeWord),isRegex:this._storageService.getBoolean("editor.isRegex",cp.WORKSPACE,this._state.isRegex)},!1)},t.prototype.getState=function(){return this._state},t.prototype.closeFindWidget=function(){this._state.change({isRevealed:!1,searchScope:null},!1),this._editor.focus()},t.prototype.toggleCaseSensitive=function(){this._state.change({matchCase:!this._state.matchCase},!1)},t.prototype.toggleWholeWords=function(){this._state.change({wholeWord:!this._state.wholeWord},!1)},t.prototype.toggleRegex=function(){this._state.change({isRegex:!this._state.isRegex},!1)},t.prototype.toggleSearchScope=function(){if(this._state.searchScope)this._state.change({searchScope:null},!0);else{var e=this._editor.getSelection();1===e.endColumn&&e.endLineNumber>e.startLineNumber&&(e=e.setEndPosition(e.endLineNumber-1,1)),e.isEmpty()||this._state.change({searchScope:e},!0)}},t.prototype.setSearchString=function(e){this._state.isRegex&&(e=p.escapeRegExpCharacters(e)),this._state.change({searchString:e},!1)},t.prototype.highlightFindOptions=function(){},t.prototype._start=function(e){if(this.disposeModel(),this._editor.getModel()){var t,n={isRevealed:!0};e.seedSearchStringFromSelection&&(t=qg(this._editor))&&(this._state.isRegex?n.searchString=p.escapeRegExpCharacters(t):n.searchString=t),!n.searchString&&e.seedSearchStringFromGlobalClipboard&&(t=this.getGlobalBufferTerm())&&(n.searchString=t),e.forceRevealReplace?n.isReplaceRevealed=!0:this._findWidgetVisible.get()||(n.isReplaceRevealed=!1),this._state.change(n,!1),this._model||(this._model=new up(this._editor,this._state))}},t.prototype.start=function(e){this._start(e)},t.prototype.moveToNextMatch=function(){return!!this._model&&(this._model.moveToNextMatch(),!0)},t.prototype.moveToPrevMatch=function(){return!!this._model&&(this._model.moveToPrevMatch(),!0)},t.prototype.replace=function(){return!!this._model&&(this._model.replace(),!0)},t.prototype.replaceAll=function(){return!!this._model&&(this._model.replaceAll(),!0)},t.prototype.selectAllMatches=function(){return!!this._model&&(this._model.selectAllMatches(),this._editor.focus(),!0)},t.prototype.getGlobalBufferTerm=function(){return this._editor.getConfiguration().contribInfo.find.globalFindClipboard&&this._clipboardService&&!this._editor.getModel().isTooLargeForSyncing()?this._clipboardService.readFindText():""},t.prototype.setGlobalBufferTerm=function(e){this._editor.getConfiguration().contribInfo.find.globalFindClipboard&&this._clipboardService&&!this._editor.getModel().isTooLargeForSyncing()&&this._clipboardService.writeFindText(e)},t.ID="editor.contrib.findController",t=Gg([Qg(1,he),Qg(2,dp),Qg(3,gp)],t)}(I.jG),Jg=function(e){function t(t,n,i,o,r,s,a){var u=e.call(this,t,i,s,a)||this;return u._contextViewService=n,u._contextKeyService=i,u._keybindingService=o,u._themeService=r,u}return Zg(t,e),t.prototype._start=function(t){this._widget||this._createFindWidget(),e.prototype._start.call(this,t),2===t.shouldFocus?this._widget.focusReplaceInput():1===t.shouldFocus&&this._widget.focusFindInput()},t.prototype.highlightFindOptions=function(){this._widget||this._createFindWidget(),this._state.isRevealed?this._widget.highlightFindOptions():this._findOptionsWidget.highlightFindOptions()},t.prototype._createFindWidget=function(){this._widget=this._register(new Bg(this._editor,this,this._state,this._contextViewService,this._keybindingService,this._contextKeyService,this._themeService)),this._findOptionsWidget=this._register(new Yg(this._editor,this._state,this._keybindingService,this._themeService))},Gg([Qg(1,If),Qg(2,he),Qg(3,xf),Qg(4,Lr),Qg(5,dp),Qg(6,(0,N.lq)(gp))],t)}(Kg),Xg=function(e){function t(){return e.call(this,{id:"actions.find",label:o.k("startFindAction","Find"),alias:"Find",precondition:null,kbOpts:{kbExpr:null,primary:2084,weight:100},menubarOpts:{menuId:ve.MenubarEditMenu,group:"3_find",title:o.k({key:"miFind",comment:["&& denotes a mnemonic"]},"&&Find"),order:1}})||this}return Zg(t,e),t.prototype.run=function(e,t){var n=Kg.get(t);n&&n.start({forceRevealReplace:!1,seedSearchStringFromSelection:t.getConfiguration().contribInfo.find.seedSearchStringFromSelection,seedSearchStringFromGlobalClipboard:t.getConfiguration().contribInfo.find.globalFindClipboard,shouldFocus:1,shouldAnimate:!0})},t}(xe),$g=function(e){function t(){return e.call(this,{id:"actions.findWithSelection",label:o.k("startFindWithSelectionAction","Find With Selection"),alias:"Find With Selection",precondition:null,kbOpts:{kbExpr:null,primary:null,mac:{primary:2083},weight:100}})||this}return Zg(t,e),t.prototype.run=function(e,t){var n=Kg.get(t);n&&(n.start({forceRevealReplace:!1,seedSearchStringFromSelection:!0,seedSearchStringFromGlobalClipboard:!1,shouldFocus:1,shouldAnimate:!0}),n.setGlobalBufferTerm(n.getState().searchString))},t}(xe),em=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Zg(t,e),t.prototype.run=function(e,t){var n=Kg.get(t);n&&!this._run(n)&&(n.start({forceRevealReplace:!1,seedSearchStringFromSelection:0===n.getState().searchString.length&&t.getConfiguration().contribInfo.find.seedSearchStringFromSelection,seedSearchStringFromGlobalClipboard:!0,shouldFocus:0,shouldAnimate:!0}),this._run(n))},t}(xe),tm=function(e){function t(){return e.call(this,{id:Xf,label:o.k("findNextMatchAction","Find Next"),alias:"Find Next",precondition:null,kbOpts:{kbExpr:Oe.focus,primary:61,mac:{primary:2085,secondary:[61]},weight:100}})||this}return Zg(t,e),t.prototype._run=function(e){return e.moveToNextMatch()},t}(em),nm=function(e){function t(){return e.call(this,{id:$f,label:o.k("findPreviousMatchAction","Find Previous"),alias:"Find Previous",precondition:null,kbOpts:{kbExpr:Oe.focus,primary:1085,mac:{primary:3109,secondary:[1085]},weight:100}})||this}return Zg(t,e),t.prototype._run=function(e){return e.moveToPrevMatch()},t}(em),im=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Zg(t,e),t.prototype.run=function(e,t){var n=Kg.get(t);if(n){var i=qg(t);i&&n.setSearchString(i),this._run(n)||(n.start({forceRevealReplace:!1,seedSearchStringFromSelection:t.getConfiguration().contribInfo.find.seedSearchStringFromSelection,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!0}),this._run(n))}},t}(xe),om=function(e){function t(){return e.call(this,{id:"editor.action.nextSelectionMatchFindAction",label:o.k("nextSelectionMatchFindAction","Find Next Selection"),alias:"Find Next Selection",precondition:null,kbOpts:{kbExpr:Oe.focus,primary:2109,weight:100}})||this}return Zg(t,e),t.prototype._run=function(e){return e.moveToNextMatch()},t}(im),rm=function(e){function t(){return e.call(this,{id:"editor.action.previousSelectionMatchFindAction",label:o.k("previousSelectionMatchFindAction","Find Previous Selection"),alias:"Find Previous Selection",precondition:null,kbOpts:{kbExpr:Oe.focus,primary:3133,weight:100}})||this}return Zg(t,e),t.prototype._run=function(e){return e.moveToPrevMatch()},t}(im),sm=function(e){function t(){return e.call(this,{id:"editor.action.startFindReplaceAction",label:o.k("startReplace","Replace"),alias:"Replace",precondition:null,kbOpts:{kbExpr:null,primary:2086,mac:{primary:2596},weight:100},menubarOpts:{menuId:ve.MenubarEditMenu,group:"3_find",title:o.k({key:"miReplace",comment:["&& denotes a mnemonic"]},"&&Replace"),order:2}})||this}return Zg(t,e),t.prototype.run=function(e,t){if(!t.getConfiguration().readOnly){var n=Kg.get(t),i=t.getSelection(),o=!i.isEmpty()&&i.startLineNumber===i.endLineNumber&&t.getConfiguration().contribInfo.find.seedSearchStringFromSelection,r=n.getState().searchString||o?2:1;n&&n.start({forceRevealReplace:!0,seedSearchStringFromSelection:o,seedSearchStringFromGlobalClipboard:t.getConfiguration().contribInfo.find.seedSearchStringFromSelection,shouldFocus:r,shouldAnimate:!0})}},t}(xe);Ae(Jg),Ee(Xg),Ee($g),Ee(tm),Ee(nm),Ee(om),Ee(rm),Ee(sm);var am=Ne.bindToContribution(Kg.get);Te(new am({id:ep,precondition:Yf,handler:function(e){return e.closeFindWidget()},kbOpts:{weight:105,kbExpr:Oe.focus,primary:9,secondary:[1033]}})),Te(new am({id:tp,precondition:null,handler:function(e){return e.toggleCaseSensitive()},kbOpts:{weight:105,kbExpr:Oe.focus,primary:Qf.primary,mac:Qf.mac,win:Qf.win,linux:Qf.linux}})),Te(new am({id:np,precondition:null,handler:function(e){return e.toggleWholeWords()},kbOpts:{weight:105,kbExpr:Oe.focus,primary:qf.primary,mac:qf.mac,win:qf.win,linux:qf.linux}})),Te(new am({id:ip,precondition:null,handler:function(e){return e.toggleRegex()},kbOpts:{weight:105,kbExpr:Oe.focus,primary:Kf.primary,mac:Kf.mac,win:Kf.win,linux:Kf.linux}})),Te(new am({id:op,precondition:null,handler:function(e){return e.toggleSearchScope()},kbOpts:{weight:105,kbExpr:Oe.focus,primary:Jf.primary,mac:Jf.mac,win:Jf.win,linux:Jf.linux}})),Te(new am({id:rp,precondition:Yf,handler:function(e){return e.replace()},kbOpts:{weight:105,kbExpr:Oe.focus,primary:3094}})),Te(new am({id:sp,precondition:Yf,handler:function(e){return e.replaceAll()},kbOpts:{weight:105,kbExpr:Oe.focus,primary:2563}})),Te(new am({id:"editor.action.selectAllMatches",precondition:Yf,handler:function(e){return e.selectAllMatches()},kbOpts:{weight:105,kbExpr:Oe.focus,primary:515}})),n(9501);var um=16777215,lm=4278190080,cm=function(){function e(e,t,n){if(e.length!==t.length||e.length>65535)throw new Error("invalid startIndexes or endIndexes size");this._startIndexes=e,this._endIndexes=t,this._collapseStates=new Uint32Array(Math.ceil(e.length/32)),this._types=n}return e.prototype.ensureParentIndices=function(){var e=this;if(!this._parentsComputed){this._parentsComputed=!0;for(var t=[],n=function(n,i){var o=t[t.length-1];return e.getStartLineNumber(o)<=n&&e.getEndLineNumber(o)>=i},i=0,o=this._startIndexes.length;ium||s>um)throw new Error("startLineNumber or endLineNumber must not exceed "+um);for(;t.length>0&&!n(r,s);)t.pop();var a=t.length>0?t[t.length-1]:-1;t.push(i),this._startIndexes[i]=r+((255&a)<<24),this._endIndexes[i]=s+((65280&a)<<16)}}},Object.defineProperty(e.prototype,"length",{get:function(){return this._startIndexes.length},enumerable:!0,configurable:!0}),e.prototype.getStartLineNumber=function(e){return this._startIndexes[e]&um},e.prototype.getEndLineNumber=function(e){return this._endIndexes[e]&um},e.prototype.getType=function(e){return this._types?this._types[e]:void 0},e.prototype.hasTypes=function(){return!!this._types},e.prototype.isCollapsed=function(e){var t=e/32|0,n=e%32;return!!(this._collapseStates[t]&1<>>24)+((this._endIndexes[e]&lm)>>>16);return 65535===t?-1:t},e.prototype.contains=function(e,t){return this.getStartLineNumber(e)<=t&&this.getEndLineNumber(e)>=t},e.prototype.findIndex=function(e){var t=0,n=this._startIndexes.length;if(0===n)return-1;for(;t=0){if(this.getEndLineNumber(t)>=e)return t;for(t=this.getParentIndex(t);-1!==t;){if(this.contains(t,e))return t;t=this.getParentIndex(t)}}return-1},e.prototype.toString=function(){for(var e=[],t=0;t=this.endLineNumber},e.prototype.containsLine=function(e){return this.startLineNumber<=e&&e<=this.endLineNumber},e}(),dm=function(){function e(e,t){this._updateEventEmitter=new X.vl,this._textModel=e,this._decorationProvider=t,this._regions=new cm(new Uint32Array(0),new Uint32Array(0)),this._editorDecorationIds=[],this._isInitialized=!1}return Object.defineProperty(e.prototype,"regions",{get:function(){return this._regions},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onDidChange",{get:function(){return this._updateEventEmitter.event},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"textModel",{get:function(){return this._textModel},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isInitialized",{get:function(){return this._isInitialized},enumerable:!0,configurable:!0}),e.prototype.toggleCollapseState=function(e){var t=this;if(e.length){var n={};this._decorationProvider.changeDecorations((function(i){for(var o=0,r=e;o=h))break;o(a,c===h),a++}}u=s()}for(;a0?e:null},e.prototype.applyMemento=function(e){if(Array.isArray(e)){for(var t=[],n=0,i=e;n=0;){var r=this._regions.toRegion(i);t&&!t(r,o)||n.push(r),o++,i=r.parentIndex}return n},e.prototype.getRegionAtLine=function(e){if(this._regions){var t=this._regions.findRange(e);if(t>=0)return this._regions.toRegion(t)}return null},e.prototype.getRegionsInside=function(e,t){for(var n=[],i=t&&2===t.length,o=i?[]:null,r=e?e.regionIndex+1:0,s=e?e.endLineNumber:Number.MAX_VALUE,a=r,u=this._regions.length;a0&&!l.containedBy(o[o.length-1]);)o.pop();o.push(l),t(l,o.length)&&n.push(l)}else t&&!t(l)||n.push(l)}return n},e}();function fm(e,t,n,i){void 0===n&&(n=Number.MAX_VALUE);var o=[];if(i&&i.length>0)for(var r=0,s=i;r1)){var l=e.getRegionsInside(u,(function(e,i){return e.isCollapsed!==t&&i=0;s--)if(n!==o.isCollapsed(s)){var a=o.getStartLineNumber(s);t.test(i.getLineContent(a))&&r.push(o.toRegion(s))}e.toggleCollapseState(r)}function mm(e,t,n){for(var i=e.regions,o=[],r=i.length-1;r>=0;r--)n!==i.isCollapsed(r)&&t===i.getType(r)&&o.push(i.toRegion(r));e.toggleCollapseState(o)}var vm=function(){function e(e){this.editor=e,this.autoHideFoldingControls=!0}return e.prototype.getDecorationOption=function(t){return t?e.COLLAPSED_VISUAL_DECORATION:this.autoHideFoldingControls?e.EXPANDED_AUTO_HIDE_VISUAL_DECORATION:e.EXPANDED_VISUAL_DECORATION},e.prototype.deltaDecorations=function(e,t){return this.editor.deltaDecorations(e,t)},e.prototype.changeDecorations=function(e){return this.editor.changeDecorations(e)},e.COLLAPSED_VISUAL_DECORATION=Ho.kI.register({stickiness:Xi.kK.NeverGrowsWhenTypingAtEdges,afterContentClassName:"inline-folded",linesDecorationsClassName:"folding collapsed"}),e.EXPANDED_AUTO_HIDE_VISUAL_DECORATION=Ho.kI.register({stickiness:Xi.kK.NeverGrowsWhenTypingAtEdges,linesDecorationsClassName:"folding"}),e.EXPANDED_VISUAL_DECORATION=Ho.kI.register({stickiness:Xi.kK.NeverGrowsWhenTypingAtEdges,linesDecorationsClassName:"folding alwaysShowFoldIcons"}),e}(),ym=function(){function e(e){var t=this;this._updateEventEmitter=new X.vl,this._foldingModel=e,this._foldingModelListener=e.onDidChange((function(e){return t.updateHiddenRanges()})),this._hiddenRanges=[],e.regions.length&&this.updateHiddenRanges()}return Object.defineProperty(e.prototype,"onDidChange",{get:function(){return this._updateEventEmitter.event},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"hiddenRanges",{get:function(){return this._hiddenRanges},enumerable:!0,configurable:!0}),e.prototype.updateHiddenRanges=function(){for(var e=!1,t=[],n=0,i=0,o=Number.MAX_VALUE,r=-1,a=this._foldingModel.regions;n0},e.prototype.isHidden=function(e){return null!==bm(this._hiddenRanges,e)},e.prototype.adjustSelections=function(e){for(var t=this,n=!1,i=this._foldingModel.textModel,o=null,r=function(e){return o&&function(e,t){return e>=t.startLineNumber&&e<=t.endLineNumber}(e,o)||(o=bm(t._hiddenRanges,e)),o?o.startLineNumber-1:null},s=0,a=e.length;s0&&(this._hiddenRanges=[],this._updateEventEmitter.fire(this._hiddenRanges)),this._foldingModelListener&&(this._foldingModelListener.dispose(),this._foldingModelListener=null)},e}();function bm(e,t){var n=(0,tu.aB)(e,(function(e){return t=0&&e[n].endLineNumber>=t?e[n]:null}var _m=function(){function e(e){this.editorModel=e,this.id="indent"}return e.prototype.dispose=function(){},e.prototype.compute=function(e){var t=Ge.cx.getFoldingRules(this.editorModel.getLanguageIdentifier().id),n=t&&t.offSide,i=t&&t.markers;return J.g3.as(function(e,t,n,i){void 0===i&&(i=5e3);var o=e.getOptions().tabSize,r=new wm(i),s=void 0;n&&(s=new RegExp("("+n.start.source+")|(?:"+n.end.source+")"));var a=[];a.push({indent:-1,line:e.getLineCount()+1,marker:!1});for(var u=e.getLineCount();u>0;u--){var l=e.getLineContent(u),c=Ho.Bz.computeIndentLevel(l,o),h=a[a.length-1];if(-1!==c){var d=void 0;if(s&&(d=l.match(s))){if(!d[1]){a.push({indent:-2,line:u,marker:!0});continue}for(var f=a.length-1;f>0&&!a[f].marker;)f--;if(f>0){a.length=f+1,h=a[f],r.insertFirst(u,h.line,c),h.marker=!1,h.indent=c,h.line=u;continue}}if(h.indent>c){do{a.pop(),h=a[a.length-1]}while(h.indent>c);var p=h.line-1;p-u>=1&&r.insertFirst(u,p,c)}h.indent===c?h.line=u:a.push({indent:c,line:u,marker:!1})}else t&&!h.marker&&(h.line=u)}return r.toIndentRanges(e)}(this.editorModel,n,i))},e}(),wm=function(){function e(e){this._startIndexes=[],this._endIndexes=[],this._indentOccurrences=[],this._length=0,this._foldingRangesLimit=e}return e.prototype.insertFirst=function(e,t,n){if(!(e>um||t>um)){var i=this._length;this._startIndexes[i]=e,this._endIndexes[i]=t,this._length++,n<1e3&&(this._indentOccurrences[n]=(this._indentOccurrences[n]||0)+1)}},e.prototype.toIndentRanges=function(e){if(this._length<=this._foldingRangesLimit){for(var t=new Uint32Array(this._length),n=new Uint32Array(this._length),i=this._length-1,o=0;i>=0;i--,o++)t[o]=this._startIndexes[i],n[o]=this._endIndexes[i];return new cm(t,n)}var r=0,s=this._indentOccurrences.length;for(i=0;ithis._foldingRangesLimit){s=i;break}r+=a}}var u=e.getOptions().tabSize;for(t=new Uint32Array(this._foldingRangesLimit),n=new Uint32Array(this._foldingRangesLimit),i=this._length-1,o=0;i>=0;i--){var l=this._startIndexes[i],c=e.getLineContent(l),h=Ho.Bz.computeIndentLevel(c,u);(h0&&u.end>u.start&&u.end<=r&&i.push({start:u.start,end:u.end,rank:o,kind:u.kind})}}}),S.M_)}));return J.g3.join(o).then((function(e){return i}))}(this.providers,this.editorModel,e).then((function(e){return e?Im(e,t.limit):null}))},e.prototype.dispose=function(){},e}(),Lm=function(){function e(e){this._startIndexes=[],this._endIndexes=[],this._nestingLevels=[],this._nestingLevelCounts=[],this._types=[],this._length=0,this._foldingRangesLimit=e}return e.prototype.add=function(e,t,n,i){if(!(e>um||t>um)){var o=this._length;this._startIndexes[o]=e,this._endIndexes[o]=t,this._nestingLevels[o]=i,this._types[o]=n,this._length++,i<30&&(this._nestingLevelCounts[i]=(this._nestingLevelCounts[i]||0)+1)}},e.prototype.toIndentRanges=function(){if(this._length<=this._foldingRangesLimit){for(var e=new Uint32Array(this._length),t=new Uint32Array(this._length),n=0;nthis._foldingRangesLimit){o=n;break}i+=r}}e=new Uint32Array(this._foldingRangesLimit),t=new Uint32Array(this._foldingRangesLimit);for(var s=[],a=(n=0,0);no.start)if(u.end<=o.end)r.push(o),o=u,i.add(u.start,u.end,u.kind&&u.kind.value,r.length);else{if(u.start>o.end){do{o=r.pop()}while(o&&u.start>o.end);o&&r.push(o),o=u}i.add(u.start,u.end,u.kind&&u.kind.value,r.length)}}else o=u,i.add(u.start,u.end,u.kind&&u.kind.value,r.length)}return i.toIndentRanges()}var Nm="init",xm=function(){function e(e,t,n,i){this.editorModel=e,this.id=Nm,t.length&&(this.decorationIds=e.deltaDecorations([],t.map((function(t){return{range:{startLineNumber:t.startLineNumber,startColumn:0,endLineNumber:t.endLineNumber,endColumn:e.getLineLength(t.endLineNumber)},options:{stickiness:Xi.kK.NeverGrowsWhenTypingAtEdges}}}))),this.timeout=setTimeout(n,i))}return e.prototype.dispose=function(){this.decorationIds&&(this.editorModel.deltaDecorations(this.decorationIds,[]),this.decorationIds=void 0),"number"==typeof this.timeout&&(clearTimeout(this.timeout),this.timeout=void 0)},e.prototype.compute=function(e){var t=[];if(this.decorationIds)for(var n=0,i=this.decorationIds;n0&&(this.rangeProvider=new Sm(e,n))}return this.foldingStateMemento=null,this.rangeProvider},e.prototype.getFoldingModel=function(){return this.foldingModelPromise},e.prototype.onModelContentChanged=function(){var e=this;this.updateScheduler&&(this.foldingRegionPromise&&(this.foldingRegionPromise.cancel(),this.foldingRegionPromise=null),this.foldingModelPromise=this.updateScheduler.trigger((function(){if(!e.foldingModel)return null;var t=e.foldingRegionPromise=ft((function(t){return e.getRangeProvider(e.foldingModel.textModel).compute(t)}));return J.g3.wrap(t.then((function(n){if(n&&t===e.foldingRegionPromise){var i=e.editor.getSelections(),o=i?i.map((function(e){return e.startLineNumber})):[];e.foldingModel.update(n,o)}return e.foldingModel})))})))},e.prototype.onHiddenRangesChanges=function(e){if(e.length){var t=this.editor.getSelections();t&&this.hiddenRangeModel.adjustSelections(t)&&this.editor.setSelections(t)}this.editor.setHiddenAreas(e)},e.prototype.onCursorPositionChanged=function(){this.hiddenRangeModel.hasRanges()&&this.cursorChangedScheduler.schedule()},e.prototype.revealCursor=function(){var e=this;this.getFoldingModel().then((function(t){if(t){var n=e.editor.getSelections();if(n&&n.length>0){for(var i=[],o=function(n){var o=n.selectionStartLineNumber;e.hiddenRangeModel.isHidden(o)&&i.push.apply(i,t.getAllRegionsAtLine(o,(function(e){return e.isCollapsed&&o>e.startLineNumber})))},r=0,s=n;r=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},ov=function(e,t){return function(n,i){t(n,i,e)}};function rv(e){if((e=e.filter((function(e){return e.range}))).length){for(var t=e[0].range,n=1;n1)){var n=this.editor.getModel(),i=this.editor.getPosition(),o=!1,r=this.editor.onDidChangeModelContent((function(e){if(e.isFlush)return o=!0,void r.dispose();for(var t=0,n=e.changes.length;t1)){var n=this.editor.getModel(),i=n.getOptions(),o=i.tabSize,r=i.insertSpaces,s=new sd(this.editor,5);Xm(n,e,{tabSize:o,insertSpaces:r}).then((function(e){return t.workerService.computeMoreMinimalEdits(n.uri,e)})).then((function(e){s.validate(t.editor)&&!(0,tu.Ct)(e)&&(tv.execute(t.editor,e),rv(e))}))}},e.prototype.getId=function(){return e.ID},e.prototype.dispose=function(){this.callOnDispose=(0,I.AS)(this.callOnDispose),this.callOnModel=(0,I.AS)(this.callOnModel)},e.ID="editor.contrib.formatOnPaste",e=iv([ov(1,Ah)],e)}(),uv=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return nv(t,e),t.prototype.run=function(e,t){var n=this,i=e.get(Ah),o=e.get(Cr),r=this._getFormattingEdits(t);if(!r)return J.g3.as(void 0);var s=new sd(t,5);return r.then((function(e){return i.computeMoreMinimalEdits(t.getModel().uri,e)})).then((function(e){s.validate(t)&&!(0,tu.Ct)(e)&&(tv.execute(t,e),rv(e),t.focus())}),(function(e){if(!(e instanceof Error&&e.name===Jm.Name))throw e;n._notifyNoProviderError(o,t.getModel().getLanguageIdentifier().language)}))},t.prototype._notifyNoProviderError=function(e,t){e.info(o.k("no.provider","There is no formatter for '{0}'-files installed.",t))},t}(xe),lv=function(e){function t(){return e.call(this,{id:"editor.action.formatDocument",label:o.k("formatDocument.label","Format Document"),alias:"Format Document",precondition:Oe.writable,kbOpts:{kbExpr:Oe.editorTextFocus,primary:1572,linux:{primary:3111},weight:100},menuOpts:{when:Oe.hasDocumentFormattingProvider,group:"1_modification",order:1.3}})||this}return nv(t,e),t.prototype._getFormattingEdits=function(e){var t=e.getModel(),n=t.getOptions();return $m(t,{tabSize:n.tabSize,insertSpaces:n.insertSpaces})},t.prototype._notifyNoProviderError=function(e,t){e.info(o.k("no.documentprovider","There is no document formatter for '{0}'-files installed.",t))},t}(uv),cv=function(e){function t(){return e.call(this,{id:"editor.action.formatSelection",label:o.k("formatSelection.label","Format Selection"),alias:"Format Code",precondition:ne.and(Oe.writable,Oe.hasNonEmptySelection),kbOpts:{kbExpr:Oe.editorTextFocus,primary:O(2089,2084),weight:100},menuOpts:{when:ne.and(Oe.hasDocumentSelectionFormattingProvider,Oe.hasNonEmptySelection),group:"1_modification",order:1.31}})||this}return nv(t,e),t.prototype._getFormattingEdits=function(e){var t=e.getModel(),n=t.getOptions(),i=n.tabSize,o=n.insertSpaces;return Xm(t,e.getSelection(),{tabSize:i,insertSpaces:o})},t.prototype._notifyNoProviderError=function(e,t){e.info(o.k("no.selectionprovider","There is no selection formatter for '{0}'-files installed.",t))},t}(uv);function hv(e,t,n,i){var o=n.ordered(e).map((function(n){return pt((function(o){return i(n,e,t,o)})).then(void 0,(function(e){return(0,S.M_)(e),null}))}));return J.g3.join(o).then(tu.Bq).then((function(e){return(0,tu.Yc)(e)}))}function dv(e,t){return hv(e,t,No.UU,(function(e,t,n,i){return e.provideDefinition(t,n,i)}))}function fv(e,t){return hv(e,t,No.Lh,(function(e,t,n,i){return e.provideImplementation(t,n,i)}))}function pv(e,t){return hv(e,t,No.ce,(function(e,t,n,i){return e.provideTypeDefinition(t,n,i)}))}Ae(sv),Ae(av),Ee(lv),Ee(cv),k.registerCommand("editor.action.format",(function(e){var t=e.get(Ce).getFocusedCodeEditor();if(t)return(new(function(e){function t(){return e.call(this,{})||this}return nv(t,e),t.prototype._getFormattingEdits=function(e){var t=e.getModel(),n=e.getSelection(),i=t.getOptions(),o=i.tabSize,r=i.insertSpaces;return n.isEmpty()?$m(t,{tabSize:o,insertSpaces:r}):Xm(t,n,{tabSize:o,insertSpaces:r})},t}(uv))).run(e,t)})),ke("_executeDefinitionProvider",dv),ke("_executeImplementationProvider",fv),ke("_executeTypeDefinitionProvider",pv),n(8605),n(2215);var gv={badgeBackground:Go.fromHex("#4D4D4D"),badgeForeground:Go.fromHex("#FFFFFF")},mv=function(){function e(e,t){this.options=t||Object.create(null),(0,ri.co)(this.options,gv,!1),this.badgeBackground=this.options.badgeBackground,this.badgeForeground=this.options.badgeForeground,this.badgeBorder=this.options.badgeBorder,this.element=Qn(e,Jn(".monaco-count-badge")),this.countFormat=this.options.countFormat||"{0}",this.titleFormat=this.options.titleFormat||"",this.setCount(this.options.count||0)}return e.prototype.setCount=function(e){this.count=e,this.render()},e.prototype.setTitleFormat=function(e){this.titleFormat=e,this.render()},e.prototype.render=function(){this.element.textContent=(0,p.format)(this.countFormat,this.count),this.element.title=(0,p.format)(this.titleFormat,this.count),this.applyStyles()},e.prototype.style=function(e){this.badgeBackground=e.badgeBackground,this.badgeForeground=e.badgeForeground,this.badgeBorder=e.badgeBorder,this.applyStyles()},e.prototype.applyStyles=function(){if(this.element){var e=this.badgeBackground?this.badgeBackground.toString():null,t=this.badgeForeground?this.badgeForeground.toString():null,n=this.badgeBorder?this.badgeBorder.toString():null;this.element.style.backgroundColor=e,this.element.style.color=t,this.element.style.borderWidth=n?"1px":null,this.element.style.borderStyle=n?"solid":null,this.element.style.borderColor=n}},e}();function vv(e){return(0,p.escape)(e)}n(4445);var yv=function(){function e(e){this.domNode=document.createElement("span"),this.domNode.className="monaco-highlighted-label",this.didEverRender=!1,e.appendChild(this.domNode)}return Object.defineProperty(e.prototype,"element",{get:function(){return this.domNode},enumerable:!0,configurable:!0}),e.prototype.set=function(t,n,i,o){void 0===n&&(n=[]),void 0===i&&(i=""),t||(t=""),o&&(t=e.escapeNewLines(t,n)),this.didEverRender&&this.text===t&&this.title===i&&ri.aI(this.highlights,n)||(Array.isArray(n)||(n=[]),this.text=t,this.title=i,this.highlights=n,this.render())},e.prototype.render=function(){en(this.domNode);for(var e,t=[],n=0,i=0;i"),t.push(vv(this.text.substring(n,e.start))),t.push(""),n=e.end),t.push(''),t.push(vv(this.text.substring(e.start,e.end))),t.push(""),n=e.end);n"),t.push(vv(this.text.substring(n))),t.push("")),this.domNode.innerHTML=t.join(""),this.domNode.title=this.title,this.didEverRender=!0},e.prototype.dispose=function(){this.text=null,this.highlights=null},e.escapeNewLines=function(e,t){var n=0,i=0;return e.replace(/\r\n|\r|\n/,(function(e,o){i="\r\n"===e?-1:0,o+=n;for(var r=0,s=t;r=o&&(a.start+=i),a.end>=o&&(a.end+=i))}return n+=i,"⏎"}))},e}(),bv=n(6973);function _v(e,t,n){if(!e)return null;"string"==typeof e&&(e=L.A.file(e));var i=n?n.getWorkspaceFolder(e):null;if(i){var o=n.getWorkspace().folders.length>1,r=void 0;if(r=function(e,t,n){return!(e!==t)||!(!e||!t)&&(n?(0,p.equalsIgnoreCase)(e.toString(),t.toString()):e.toString()===t.toString())}(i.uri,e,!B.j9)?"":(0,bv.S8)((0,p.ltrim)(e.path.substr(i.uri.path.length),bv.Vn),!0),o){var s=i&&i.name?i.name:(0,bv.P8)(i.uri.fsPath);r=r?s+" • "+r:s}return r}if(e.scheme!==rr.file&&e.scheme!==rr.untitled)return e.with({query:null,fragment:null}).toString(!0);if(Mv(e.fsPath))return(0,bv.S8)(Cv(e.fsPath),!0);var a=(0,bv.S8)(e.fsPath,!0);return!B.uF&&t&&(a=function(e,t){if(B.uF||!e||!t)return e;var n=Iv.original===t?Iv.normalized:void 0;return n||(n=""+(0,p.rtrim)(t,bv.Vn)+bv.Vn,Iv={original:t,normalized:n}),(B.j9?(0,p.startsWith)(e,n):(0,p.startsWithIgnoreCase)(e,n))&&(e="~/"+e.substr(n.length)),e}(a,t.userHome)),a}function wv(e){if(!e)return null;"string"==typeof e&&(e=L.A.file(e));var t=(0,bv.P8)(e.path)||(e.scheme===rr.file?e.fsPath:e.path);return Mv(t)?Cv(t):t}function Mv(e){return B.uF&&e&&":"===e[1]}function Cv(e){return Mv(e)?e.charAt(0).toUpperCase()+e.slice(1):e}var Sv,Lv,Iv=Object.create(null),Nv=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),xv=function(){function e(e){this._element=e}return Object.defineProperty(e.prototype,"element",{get:function(){return this._element},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"textContent",{set:function(e){this.disposed||e===this._textContent||(this._textContent=e,this._element.textContent=e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"className",{set:function(e){this.disposed||e===this._className||(this._className=e,this._element.className=e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"title",{set:function(e){this.disposed||e===this._title||(this._title=e,this._title?this._element.title=e:this._element.removeAttribute("title"))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"empty",{set:function(e){this.disposed||e===this._empty||(this._empty=e,this._element.style.marginLeft=e?"0":null)},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){this.disposed=!0},e}(),Dv=function(e){function t(t,n){var i=e.call(this)||this;return i.domNode=i._register(new xv(Qn(t,Jn(".monaco-icon-label")))),i.labelDescriptionContainer=i._register(new xv(Qn(i.domNode.element,Jn(".monaco-icon-label-description-container")))),n&&n.supportHighlights?i.labelNode=i._register(new yv(Qn(i.labelDescriptionContainer.element,Jn("a.label-name")))):i.labelNode=i._register(new xv(Qn(i.labelDescriptionContainer.element,Jn("a.label-name")))),n&&n.supportDescriptionHighlights?i.descriptionNodeFactory=function(){return i._register(new yv(Qn(i.labelDescriptionContainer.element,Jn("span.label-description"))))}:i.descriptionNodeFactory=function(){return i._register(new xv(Qn(i.labelDescriptionContainer.element,Jn("span.label-description"))))},i}return Nv(t,e),t.prototype.setValue=function(e,t,n){var i=["monaco-icon-label"];n&&(n.extraClasses&&i.push.apply(i,n.extraClasses),n.italic&&i.push("italic")),this.domNode.className=i.join(" "),this.domNode.title=n&&n.title?n.title:"",this.labelNode instanceof yv?this.labelNode.set(e||"",n?n.matches:void 0):this.labelNode.textContent=e||"",(t||this.descriptionNode)&&(this.descriptionNode||(this.descriptionNode=this.descriptionNodeFactory()),this.descriptionNode instanceof yv?(this.descriptionNode.set(t||"",n?n.descriptionMatches:void 0),n&&n.descriptionTitle?this.descriptionNode.element.title=n.descriptionTitle:this.descriptionNode.element.removeAttribute("title")):(this.descriptionNode.textContent=t||"",this.descriptionNode.title=n&&n.descriptionTitle?n.descriptionTitle:"",this.descriptionNode.empty=!t))},t}(I.jG),kv=function(e){function t(t,n,i,o){var r=e.call(this,t)||this;return r.setFile(n,i,o),r}return Nv(t,e),t.prototype.setFile=function(e,t,n){var i=bv.pD(e.fsPath);this.setValue(wv(e),i&&"."!==i?_v(i,n,t):"",{title:e.fsPath})},t}(Dv),Tv=n(5983),Ev=(0,N.u1)("contextService");!function(e){e.isIWorkspace=function(e){return e&&"object"==typeof e&&"string"==typeof e.id&&"string"==typeof e.name&&Array.isArray(e.folders)}}(Sv||(Sv={})),function(e){e.isIWorkspaceFolder=function(e){return e&&"object"==typeof e&&L.A.isUri(e.uri)&&"string"==typeof e.name&&"function"==typeof e.toResource}}(Lv||(Lv={})),function(){function e(e,t,n,i,o){void 0===t&&(t=""),void 0===n&&(n=[]),void 0===i&&(i=null),this._id=e,this._name=t,this._configuration=i,this._ctime=o,this._foldersMap=Tv.cB.forPaths(),this.folders=n}Object.defineProperty(e.prototype,"folders",{get:function(){return this._folders},set:function(e){this._folders=e,this.updateFoldersMap()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"id",{get:function(){return this._id},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"name",{get:function(){return this._name},set:function(e){this._name=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"configuration",{get:function(){return this._configuration},set:function(e){this._configuration=e},enumerable:!0,configurable:!0}),e.prototype.getFolder=function(e){return e?this._foldersMap.findSubstr(e.toString()):null},e.prototype.updateFoldersMap=function(){this._foldersMap=Tv.cB.forPaths();for(var e=0,t=this.folders;e=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([Rv(3,N._Y),Rv(4,Ce),Rv(5,D),Rv(6,he),Rv(7,Lr),Rv(8,Cr)],t)}(_h),zv=(n(2029),n(8523),new Go(new Uo(0,122,204))),Wv={showArrow:!0,showFrame:!0,className:"",frameColor:zv,arrowColor:zv,keepEditorSelection:!1},Fv=function(){function e(e,t,n,i,o,r){this.domNode=e,this.afterLineNumber=t,this.afterColumn=n,this.heightInLines=i,this._onDomNodeTop=o,this._onComputedHeight=r}return e.prototype.onDomNodeTop=function(e){this._onDomNodeTop(e)},e.prototype.onComputedHeight=function(e){this._onComputedHeight(e)},e}(),Bv=function(){function e(e,t){this._id=e,this._domNode=t}return e.prototype.getId=function(){return this._id},e.prototype.getDomNode=function(){return this._domNode},e.prototype.getPosition=function(){return null},e}(),Hv=function(){function e(t){this._editor=t,this._ruleName=e._IdGenerator.nextId(),this._decorations=[]}return e.prototype.dispose=function(){this.hide(),Hn(this._ruleName)},Object.defineProperty(e.prototype,"color",{set:function(e){this._color!==e&&(this._color=e,this._updateStyle())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"height",{set:function(e){this._height!==e&&(this._height=e,this._updateStyle())},enumerable:!0,configurable:!0}),e.prototype._updateStyle=function(){var e,t,n;Hn(this._ruleName),e=".monaco-editor "+this._ruleName,t="border-style: solid; border-color: transparent; border-bottom-color: "+this._color+"; border-width: "+this._height+"px; bottom: -"+this._height+"px; margin-left: -"+this._height+"px; ",void 0===n&&(n=Bn()),n&&t&&n.sheet.insertRule(e+"{"+t+"}",0)},e.prototype.show=function(e){this._decorations=this._editor.deltaDecorations(this._decorations,[{range:s.Q.fromPositions(e),options:{className:this._ruleName,stickiness:Xi.kK.NeverGrowsWhenTypingAtEdges}}])},e.prototype.hide=function(){this._editor.deltaDecorations(this._decorations,[])},e._IdGenerator=new mp(".arrow-decoration-"),e}(),Vv=function(){function e(e,t){void 0===t&&(t={});var n=this;this._positionMarkerId=[],this._disposables=[],this._isShowing=!1,this.editor=e,this.options=ri.Go(t),ri.co(this.options,Wv,!1),this.domNode=document.createElement("div"),this.options.isAccessible||(this.domNode.setAttribute("aria-hidden","true"),this.domNode.setAttribute("role","presentation")),this._disposables.push(this.editor.onDidLayoutChange((function(e){var t=n._getWidth(e);n.domNode.style.width=t+"px",n.domNode.style.left=n._getLeft(e)+"px",n._onWidth(t)})))}return e.prototype.dispose=function(){var e=this;(0,I.AS)(this._disposables),this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),this._viewZone&&this.editor.changeViewZones((function(t){t.removeZone(e._viewZone.id),e._viewZone=null})),this.editor.deltaDecorations(this._positionMarkerId,[]),this._positionMarkerId=[]},e.prototype.create=function(){sn(this.domNode,"zone-widget"),sn(this.domNode,this.options.className),this.container=document.createElement("div"),sn(this.container,"zone-widget-container"),this.domNode.appendChild(this.container),this.options.showArrow&&(this._arrow=new Hv(this.editor),this._disposables.push(this._arrow)),this._fillContainer(this.container),this._initSash(),this._applyStyles()},e.prototype.style=function(e){e.frameColor&&(this.options.frameColor=e.frameColor),e.arrowColor&&(this.options.arrowColor=e.arrowColor),this._applyStyles()},e.prototype._applyStyles=function(){if(this.container){var e=this.options.frameColor.toString();this.container.style.borderTopColor=e,this.container.style.borderBottomColor=e}if(this._arrow){var t=this.options.arrowColor.toString();this._arrow.color=t}},e.prototype._getWidth=function(e){return e.width-e.minimapWidth-e.verticalScrollbarWidth},e.prototype._getLeft=function(e){return e.minimapWidth>0&&0===e.minimapLeft?e.minimapWidth:0},e.prototype._onViewZoneTop=function(e){this.domNode.style.top=e+"px"},e.prototype._onViewZoneHeight=function(e){this.domNode.style.height=e+"px";var t=e-this._decoratingElementsHeight();this.container.style.height=t+"px";var n=this.editor.getLayoutInfo();this._doLayout(t,this._getWidth(n)),this._resizeSash.layout()},Object.defineProperty(e.prototype,"position",{get:function(){var e=this._positionMarkerId[0];if(e){var t=this.editor.getModel().getDecorationRange(e);if(t)return t.getStartPosition()}},enumerable:!0,configurable:!0}),e.prototype.show=function(e,t){var n=s.Q.isIRange(e)?e:new s.Q(e.lineNumber,e.column,e.lineNumber,e.column);this._isShowing=!0,this._showImpl(n,t),this._isShowing=!1,this._positionMarkerId=this.editor.deltaDecorations(this._positionMarkerId,[{range:n,options:Ho.kI.EMPTY}])},e.prototype.hide=function(){var e=this;this._viewZone&&(this.editor.changeViewZones((function(t){t.removeZone(e._viewZone.id)})),this._viewZone=null),this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),this._arrow&&this._arrow.hide()},e.prototype._decoratingElementsHeight=function(){var e=this.editor.getConfiguration().lineHeight,t=0;return this.options.showArrow&&(t+=2*Math.round(e/3)),this.options.showFrame&&(t+=2*Math.round(e/9)),t},e.prototype._showImpl=function(e,t){var n=this,i={lineNumber:e.startLineNumber,column:e.startColumn},o=this.editor.getLayoutInfo(),r=this._getWidth(o);this.domNode.style.width=r+"px",this.domNode.style.left=this._getLeft(o)+"px";var s=document.createElement("div");s.style.overflow="hidden";var a=this.editor.getConfiguration().lineHeight,u=this.editor.getLayoutInfo().height/a*.8;t>=u&&(t=u);var l=0,c=0;if(this.options.showArrow&&(l=Math.round(a/3),this._arrow.height=l,this._arrow.show(i)),this.options.showFrame&&(c=Math.round(a/9)),this.editor.changeViewZones((function(e){n._viewZone&&e.removeZone(n._viewZone.id),n._overlayWidget&&(n.editor.removeOverlayWidget(n._overlayWidget),n._overlayWidget=null),n.domNode.style.top="-1000px",n._viewZone=new Fv(s,i.lineNumber,i.column,t,(function(e){return n._onViewZoneTop(e)}),(function(e){return n._onViewZoneHeight(e)})),n._viewZone.id=e.addZone(n._viewZone),n._overlayWidget=new Bv("vs.editor.contrib.zoneWidget"+n._viewZone.id,n.domNode),n.editor.addOverlayWidget(n._overlayWidget)})),this.options.showFrame){var h=this.options.frameWidth?this.options.frameWidth:c;this.container.style.borderTopWidth=h+"px",this.container.style.borderBottomWidth=h+"px"}var d=t*a-this._decoratingElementsHeight();this.container.style.top=l+"px",this.container.style.height=d+"px",this.container.style.overflow="hidden",this._doLayout(d,r),this.options.keepEditorSelection||this.editor.setSelection(e);var f=Math.min(this.editor.getModel().getLineCount(),Math.max(1,e.endLineNumber+1));this.revealLine(f)},e.prototype.revealLine=function(e){this.editor.revealLine(e,0)},e.prototype.setCssClass=function(e,t){t&&this.container.classList.remove(t),sn(this.container,e)},e.prototype._onWidth=function(e){},e.prototype._doLayout=function(e,t){},e.prototype._relayout=function(e){var t=this;this._viewZone.heightInLines!==e&&this.editor.changeViewZones((function(n){t._viewZone.heightInLines=e,n.layoutZone(t._viewZone.id)}))},e.prototype._initSash=function(){var e,t=this;this._resizeSash=new Eh(this.domNode,this,{orientation:xh.HORIZONTAL}),this.options.isResizeable||(this._resizeSash.hide(),this._resizeSash.state=Dh.Disabled),this._disposables.push(this._resizeSash.onDidStart((function(n){t._viewZone&&(e={startY:n.startY,heightInLines:t._viewZone.heightInLines})}))),this._disposables.push(this._resizeSash.onDidEnd((function(){e=void 0}))),this._disposables.push(this._resizeSash.onDidChange((function(n){if(e){var i=(n.currentY-e.startY)/t.editor.getConfiguration().lineHeight,o=i<0?Math.ceil(i):Math.floor(i),r=e.heightInLines+o;r>5&&r<35&&t._relayout(r)}})))},e.prototype.getHorizontalSashLeft=function(){return 0},e.prototype.getHorizontalSashTop=function(){return parseInt(this.domNode.style.height)-this._decoratingElementsHeight()/2},e.prototype.getHorizontalSashWidth=function(){var e=this.editor.getLayoutInfo();return e.width-e.minimapWidth},e}(),Uv=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();!function(e){e.inPeekEditor=new ce("inReferenceSearchEditor",!0),e.notInPeekEditor=e.inPeekEditor.toNegated()}(Av||(Av={}));var Yv={headerBackgroundColor:Go.white,primaryHeadingColor:Go.fromHex("#333333"),secondaryHeadingColor:Go.fromHex("#6c6c6cb3")},Zv=function(e){function t(t,n){void 0===n&&(n={});var i=e.call(this,t,n)||this;return i._onDidClose=new X.vl,ri.co(i.options,Yv,!1),i}return Uv(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this),this._onDidClose.fire(this)},Object.defineProperty(t.prototype,"onDidClose",{get:function(){return this._onDidClose.event},enumerable:!0,configurable:!0}),t.prototype.style=function(t){var n=this.options;t.headerBackgroundColor&&(n.headerBackgroundColor=t.headerBackgroundColor),t.primaryHeadingColor&&(n.primaryHeadingColor=t.primaryHeadingColor),t.secondaryHeadingColor&&(n.secondaryHeadingColor=t.secondaryHeadingColor),e.prototype.style.call(this,t)},t.prototype._applyStyles=function(){e.prototype._applyStyles.call(this);var t=this.options;this._headElement&&(this._headElement.style.backgroundColor=t.headerBackgroundColor.toString()),this._primaryHeading&&(this._primaryHeading.style.color=t.primaryHeadingColor.toString()),this._secondaryHeading&&(this._secondaryHeading.style.color=t.secondaryHeadingColor.toString()),this._bodyElement&&(this._bodyElement.style.borderColor=t.frameColor.toString())},t.prototype._fillContainer=function(e){this.setCssClass("peekview-widget"),this._headElement=Zh(".head").getHTMLElement(),this._bodyElement=Zh(".body").getHTMLElement(),this._fillHead(this._headElement),this._fillBody(this._bodyElement),e.appendChild(this._headElement),e.appendChild(this._bodyElement)},t.prototype._fillHead=function(e){var t=this,n=Zh(".peekview-title").on(Un.CLICK,(function(e){return t._onTitleClick(e)})).appendTo(this._headElement).getHTMLElement();this._primaryHeading=Zh("span.filename").appendTo(n).getHTMLElement(),this._secondaryHeading=Zh("span.dirname").appendTo(n).getHTMLElement(),this._metaHeading=Zh("span.meta").appendTo(n).getHTMLElement();var i=Zh(".peekview-actions").appendTo(this._headElement),r=this._getActionBarOptions();this._actionbarWidget=new Xh(i.getHTMLElement(),r),this._disposables.push(this._actionbarWidget),this._actionbarWidget.push(new $("peekview.close",o.k("label.close","Close"),"close-peekview-action",!0,(function(){return t.dispose(),null})),{label:!1,icon:!0})},t.prototype._getActionBarOptions=function(){return{}},t.prototype._onTitleClick=function(e){},t.prototype.setTitle=function(e,t){Zh(this._primaryHeading).safeInnerHtml(e),this._primaryHeading.setAttribute("aria-label",e),t?Zh(this._secondaryHeading).safeInnerHtml(t):en(this._secondaryHeading)},t.prototype.setMetaTitle=function(e){e?Zh(this._metaHeading).safeInnerHtml(e):en(this._metaHeading)},t.prototype._doLayout=function(e,t){if(!this._isShowing&&e<0)this.dispose();else{var n=Math.ceil(1.2*this.editor.getConfiguration().lineHeight),i=e-(n+2);this._doLayoutHead(n,t),this._doLayoutBody(i,t)}},t.prototype._doLayoutHead=function(e,t){this._headElement.style.height=p.format("{0}px",e),this._headElement.style.lineHeight=this._headElement.style.height},t.prototype._doLayoutBody=function(e,t){this._bodyElement.style.height=p.format("{0}px",e)},t}(Vv),Gv=function(){function e(e,t){this._parent=e,this._range=t,this._onRefChanged=new X.vl,this.onRefChanged=this._onRefChanged.event,this._id=vp.nextId()}return Object.defineProperty(e.prototype,"id",{get:function(){return this._id},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"parent",{get:function(){return this._parent},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"uri",{get:function(){return this._parent.uri},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"range",{get:function(){return this._range},set:function(e){this._range=e,this._onRefChanged.fire(this)},enumerable:!0,configurable:!0}),e.prototype.getAriaMessage=function(){return(0,o.k)("aria.oneReference","symbol in {0} on line {1} at column {2}",(0,bv.P8)(this.uri.fsPath),this.range.startLineNumber,this.range.startColumn)},e}(),Qv=function(){function e(e){this._modelReference=e}return Object.defineProperty(e.prototype,"_model",{get:function(){return this._modelReference.object.textEditorModel},enumerable:!0,configurable:!0}),e.prototype.preview=function(e,t){void 0===t&&(t=8);var n=this._model;if(n){var i=e.startLineNumber,o=e.startColumn,r=e.endLineNumber,a=e.endColumn,u=n.getWordUntilPosition({lineNumber:i,column:o-t}),l=new s.Q(i,u.startColumn,i,o),c=new s.Q(r,a,r,Number.MAX_VALUE);return{before:n.getValueInRange(l).replace(/^\s+/,p.empty),inside:n.getValueInRange(e),after:n.getValueInRange(c).replace(/\s+$/,p.empty)}}},e.prototype.dispose=function(){this._modelReference&&(this._modelReference.dispose(),this._modelReference=null)},e}(),qv=function(){function e(e,t){this._parent=e,this._uri=t,this._children=[]}return Object.defineProperty(e.prototype,"id",{get:function(){return this._uri.toString()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"parent",{get:function(){return this._parent},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"children",{get:function(){return this._children},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"uri",{get:function(){return this._uri},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"preview",{get:function(){return this._preview},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"failure",{get:function(){return this._loadFailure},enumerable:!0,configurable:!0}),e.prototype.getAriaMessage=function(){var e=this.children.length;return 1===e?(0,o.k)("aria.fileReferences.1","1 symbol in {0}, full path {1}",(0,bv.P8)(this.uri.fsPath),this.uri.fsPath):(0,o.k)("aria.fileReferences.N","{0} symbols in {1}, full path {2}",e,(0,bv.P8)(this.uri.fsPath),this.uri.fsPath)},e.prototype.resolve=function(e){var t=this;return this._resolved?J.g3.as(this):e.createModelReference(this._uri).then((function(e){if(!e.object)throw e.dispose(),new Error;return t._preview=new Qv(e),t._resolved=!0,t}),(function(e){return t._children=[],t._resolved=!0,t._loadFailure=e,t}))},e.prototype.dispose=function(){this._preview&&(this._preview.dispose(),this._preview=null)},e}(),Kv=function(){function e(t){var n,i=this;this._groups=[],this._references=[],this._onDidChangeReferenceRange=new X.vl,this.onDidChangeReferenceRange=this._onDidChangeReferenceRange.event,this._disposables=[],t.sort(e._compareReferences);for(var o=0,r=t;o0?(i=t?(i+1)%o:(i+o-1)%o,n.children[i]):(i=n.parent.groups.indexOf(n),t?(i=(i+1)%r,n.parent.groups[i].children[0]):(i=(i+r-1)%r,n.parent.groups[i].children[n.parent.groups[i].children.length-1]))},e.prototype.nearestReference=function(e,t){var n=this._references.map((function(n,i){return{idx:i,prefixLen:p.commonPrefixLength(n.uri.toString(),e.toString()),offsetDist:100*Math.abs(n.range.startLineNumber-t.lineNumber)+Math.abs(n.range.startColumn-t.column)}})).sort((function(e,t){return e.prefixLen>t.prefixLen?-1:e.prefixLent.offsetDist?1:0}))[0];if(n)return this._references[n.idx]},e.prototype.dispose=function(){this._groups=(0,I.AS)(this._groups),(0,I.AS)(this._disposables),this._disposables.length=0},e._compareReferences=function(e,t){var n=e.uri.toString(),i=t.uri.toString();return ni?1:s.Q.compareRangesUsingStarts(e.range,t.range)},e}(),Jv=(0,N.u1)("textModelService");function Xv(e,t){var n=Object.create(null);for(var i in t){var o=t[i];"string"==typeof o?n[i]=e.getColor(o):"function"==typeof o&&(n[i]=o(e))}return n}function $v(e,t,n){function i(i){var o=Xv(e.getTheme(),t);"function"==typeof n?n(o):n.style(o)}return i(e.getTheme()),e.onThemeChange(i)}function ey(e,t,n){return $v(t,(0,ri.co)(n||Object.create(null),iy,!1),e)}var ty,ny,iy={listFocusBackground:gs,listFocusForeground:ms,listActiveSelectionBackground:vs,listActiveSelectionForeground:ys,listFocusAndSelectionBackground:vs,listFocusAndSelectionForeground:ys,listInactiveSelectionBackground:bs,listInactiveSelectionForeground:_s,listInactiveFocusBackground:ws,listHoverBackground:Ms,listHoverForeground:Cs,listDropBackground:Ss,listFocusOutline:ts,listSelectionOutline:ts,listHoverOutline:ts},oy=(0,N.u1)("environmentService");n(461),function(e){e[e.ON_MOUSE_DOWN=0]="ON_MOUSE_DOWN",e[e.ON_MOUSE_UP=1]="ON_MOUSE_UP"}(ty||(ty={})),function(e){e[e.SINGLE_CLICK=0]="SINGLE_CLICK",e[e.DOUBLE_CLICK=1]="DOUBLE_CLICK"}(ny||(ny={}));var ry=function(){function e(){this._arr=[]}return e.prototype.set=function(e,t){this._arr.push({keybinding:R(e,B.OS),callback:t})},e.prototype.dispatch=function(e){for(var t=this._arr.length-1;t>=0;t--){var n=this._arr[t];if(e.equals(n.keybinding))return n.callback}return null},e}(),sy=function(){function e(e){void 0===e&&(e={clickBehavior:ty.ON_MOUSE_DOWN,keyboardSupport:!0,openMode:ny.SINGLE_CLICK});var t=this;this.options=e,this.downKeyBindingDispatcher=new ry,this.upKeyBindingDispatcher=new ry,("boolean"!=typeof e.keyboardSupport||e.keyboardSupport)&&(this.downKeyBindingDispatcher.set(16,(function(e,n){return t.onUp(e,n)})),this.downKeyBindingDispatcher.set(18,(function(e,n){return t.onDown(e,n)})),this.downKeyBindingDispatcher.set(15,(function(e,n){return t.onLeft(e,n)})),this.downKeyBindingDispatcher.set(17,(function(e,n){return t.onRight(e,n)})),B.zx&&(this.downKeyBindingDispatcher.set(2064,(function(e,n){return t.onLeft(e,n)})),this.downKeyBindingDispatcher.set(300,(function(e,n){return t.onDown(e,n)})),this.downKeyBindingDispatcher.set(302,(function(e,n){return t.onUp(e,n)}))),this.downKeyBindingDispatcher.set(11,(function(e,n){return t.onPageUp(e,n)})),this.downKeyBindingDispatcher.set(12,(function(e,n){return t.onPageDown(e,n)})),this.downKeyBindingDispatcher.set(14,(function(e,n){return t.onHome(e,n)})),this.downKeyBindingDispatcher.set(13,(function(e,n){return t.onEnd(e,n)})),this.downKeyBindingDispatcher.set(10,(function(e,n){return t.onSpace(e,n)})),this.downKeyBindingDispatcher.set(9,(function(e,n){return t.onEscape(e,n)})),this.upKeyBindingDispatcher.set(3,this.onEnter.bind(this)),this.upKeyBindingDispatcher.set(2051,this.onEnter.bind(this)))}return e.prototype.onMouseDown=function(e,t,n,i){if(void 0===i&&(i="mouse"),this.options.clickBehavior===ty.ON_MOUSE_DOWN&&(n.leftButton||n.middleButton)){if(n.target){if(n.target.tagName&&"input"===n.target.tagName.toLowerCase())return!1;if(zn(n.target,"scrollbar","monaco-tree"))return!1;if(zn(n.target,"monaco-action-bar","row"))return!1}return this.onLeftClick(e,t,n,i)}return!1},e.prototype.onClick=function(e,t,n){return B.zx&&n.ctrlKey?(n.preventDefault(),n.stopPropagation(),!1):(!n.target||!n.target.tagName||"input"!==n.target.tagName.toLowerCase())&&(this.options.clickBehavior!==ty.ON_MOUSE_DOWN||!n.leftButton&&!n.middleButton)&&this.onLeftClick(e,t,n)},e.prototype.onLeftClick=function(e,t,n,i){void 0===i&&(i="mouse");var o=n,r={origin:i,originalEvent:n,didClickOnTwistie:this.isClickOnTwistie(o)};return e.getInput()===t?(e.clearFocus(r),e.clearSelection(r)):(n&&o.browserEvent&&"mousedown"===o.browserEvent.type&&1===o.browserEvent.detail||n.preventDefault(),n.stopPropagation(),e.domFocus(),e.setSelection([t],r),e.setFocus(t,r),this.shouldToggleExpansion(t,o,i)&&(e.isExpanded(t)?e.collapse(t).done(null,S.dz):e.expand(t).done(null,S.dz))),!0},e.prototype.shouldToggleExpansion=function(e,t,n){var i="mouse"===n&&2===t.detail;return this.openOnSingleClick||i||this.isClickOnTwistie(t)},e.prototype.setOpenMode=function(e){this.options.openMode=e},Object.defineProperty(e.prototype,"openOnSingleClick",{get:function(){return this.options.openMode===ny.SINGLE_CLICK},enumerable:!0,configurable:!0}),e.prototype.isClickOnTwistie=function(e){var t=e.target;if(!rn(t,"content"))return!1;var n=window.getComputedStyle(t,":before");if("none"===n.backgroundImage||"none"===n.display)return!1;var i=parseInt(n.width)+parseInt(n.paddingRight);return e.browserEvent.offsetX<=i},e.prototype.onContextMenu=function(e,t,n){return n.target&&n.target.tagName&&"input"===n.target.tagName.toLowerCase()||n&&(n.preventDefault(),n.stopPropagation()),!1},e.prototype.onTap=function(e,t,n){var i=n.initialTarget;return(!i||!i.tagName||"input"!==i.tagName.toLowerCase())&&this.onLeftClick(e,t,n,"touch")},e.prototype.onKeyDown=function(e,t){return this.onKey(this.downKeyBindingDispatcher,e,t)},e.prototype.onKeyUp=function(e,t){return this.onKey(this.upKeyBindingDispatcher,e,t)},e.prototype.onKey=function(e,t,n){var i=e.dispatch(n.toKeybinding());return!(!i||!i(t,n)||(n.preventDefault(),n.stopPropagation(),0))},e.prototype.onUp=function(e,t){var n={origin:"keyboard",originalEvent:t};return e.getHighlight()?e.clearHighlight(n):(e.focusPrevious(1,n),e.reveal(e.getFocus()).done(null,S.dz)),!0},e.prototype.onPageUp=function(e,t){var n={origin:"keyboard",originalEvent:t};return e.getHighlight()?e.clearHighlight(n):(e.focusPreviousPage(n),e.reveal(e.getFocus()).done(null,S.dz)),!0},e.prototype.onDown=function(e,t){var n={origin:"keyboard",originalEvent:t};return e.getHighlight()?e.clearHighlight(n):(e.focusNext(1,n),e.reveal(e.getFocus()).done(null,S.dz)),!0},e.prototype.onPageDown=function(e,t){var n={origin:"keyboard",originalEvent:t};return e.getHighlight()?e.clearHighlight(n):(e.focusNextPage(n),e.reveal(e.getFocus()).done(null,S.dz)),!0},e.prototype.onHome=function(e,t){var n={origin:"keyboard",originalEvent:t};return e.getHighlight()?e.clearHighlight(n):(e.focusFirst(n),e.reveal(e.getFocus()).done(null,S.dz)),!0},e.prototype.onEnd=function(e,t){var n={origin:"keyboard",originalEvent:t};return e.getHighlight()?e.clearHighlight(n):(e.focusLast(n),e.reveal(e.getFocus()).done(null,S.dz)),!0},e.prototype.onLeft=function(e,t){var n={origin:"keyboard",originalEvent:t};if(e.getHighlight())e.clearHighlight(n);else{var i=e.getFocus();e.collapse(i).then((function(t){if(i&&!t)return e.focusParent(n),e.reveal(e.getFocus())})).done(null,S.dz)}return!0},e.prototype.onRight=function(e,t){var n={origin:"keyboard",originalEvent:t};if(e.getHighlight())e.clearHighlight(n);else{var i=e.getFocus();e.expand(i).then((function(t){if(i&&!t)return e.focusFirstChild(n),e.reveal(e.getFocus())})).done(null,S.dz)}return!0},e.prototype.onEnter=function(e,t){var n={origin:"keyboard",originalEvent:t};if(e.getHighlight())return!1;var i=e.getFocus();return i&&e.setSelection([i],n),!0},e.prototype.onSpace=function(e,t){if(e.getHighlight())return!1;var n=e.getFocus();return n&&e.toggleExpansion(n),!0},e.prototype.onEscape=function(e,t){var n={origin:"keyboard",originalEvent:t};return e.getHighlight()?(e.clearHighlight(n),!0):e.getSelection().length?(e.clearSelection(n),!0):!!e.getFocus()&&(e.clearFocus(n),!0)},e}(),ay=function(){function e(){}return e.prototype.getDragURI=function(e,t){return null},e.prototype.onDragStart=function(e,t,n){},e.prototype.onDragOver=function(e,t,n,i){return null},e.prototype.drop=function(e,t,n,i){},e}(),uy=function(){function e(){}return e.prototype.isVisible=function(e,t){return!0},e}(),ly=function(){function e(){}return e.prototype.getAriaLabel=function(e,t){return null},e}(),cy=function(){function e(e,t){this.styleElement=e,this.selectorSuffix=t}return e.prototype.style=function(e){var t=this.selectorSuffix?"."+this.selectorSuffix:"",n=[];e.listFocusBackground&&n.push(".monaco-tree"+t+".focused .monaco-tree-rows > .monaco-tree-row.focused:not(.highlighted) { background-color: "+e.listFocusBackground+"; }"),e.listFocusForeground&&n.push(".monaco-tree"+t+".focused .monaco-tree-rows > .monaco-tree-row.focused:not(.highlighted) { color: "+e.listFocusForeground+"; }"),e.listActiveSelectionBackground&&n.push(".monaco-tree"+t+".focused .monaco-tree-rows > .monaco-tree-row.selected:not(.highlighted) { background-color: "+e.listActiveSelectionBackground+"; }"),e.listActiveSelectionForeground&&n.push(".monaco-tree"+t+".focused .monaco-tree-rows > .monaco-tree-row.selected:not(.highlighted) { color: "+e.listActiveSelectionForeground+"; }"),e.listFocusAndSelectionBackground&&n.push("\n\t\t\t\t.monaco-tree-drag-image,\n\t\t\t\t.monaco-tree"+t+".focused .monaco-tree-rows > .monaco-tree-row.focused.selected:not(.highlighted) { background-color: "+e.listFocusAndSelectionBackground+"; }\n\t\t\t"),e.listFocusAndSelectionForeground&&n.push("\n\t\t\t\t.monaco-tree-drag-image,\n\t\t\t\t.monaco-tree"+t+".focused .monaco-tree-rows > .monaco-tree-row.focused.selected:not(.highlighted) { color: "+e.listFocusAndSelectionForeground+"; }\n\t\t\t"),e.listInactiveSelectionBackground&&n.push(".monaco-tree"+t+" .monaco-tree-rows > .monaco-tree-row.selected:not(.highlighted) { background-color: "+e.listInactiveSelectionBackground+"; }"),e.listInactiveSelectionForeground&&n.push(".monaco-tree"+t+" .monaco-tree-rows > .monaco-tree-row.selected:not(.highlighted) { color: "+e.listInactiveSelectionForeground+"; }"),e.listHoverBackground&&n.push(".monaco-tree"+t+" .monaco-tree-rows > .monaco-tree-row:hover:not(.highlighted):not(.selected):not(.focused) { background-color: "+e.listHoverBackground+"; }"),e.listHoverForeground&&n.push(".monaco-tree"+t+" .monaco-tree-rows > .monaco-tree-row:hover:not(.highlighted):not(.selected):not(.focused) { color: "+e.listHoverForeground+"; }"),e.listDropBackground&&n.push("\n\t\t\t\t.monaco-tree"+t+" .monaco-tree-wrapper.drop-target,\n\t\t\t\t.monaco-tree"+t+" .monaco-tree-rows > .monaco-tree-row.drop-target { background-color: "+e.listDropBackground+" !important; color: inherit !important; }\n\t\t\t"),e.listFocusOutline&&n.push("\n\t\t\t\t.monaco-tree-drag-image\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{ border: 1px solid "+e.listFocusOutline+"; background: #000; }\n\t\t\t\t.monaco-tree"+t+" .monaco-tree-rows > .monaco-tree-row \t\t\t\t\t\t\t\t\t\t\t\t\t\t{ border: 1px solid transparent; }\n\t\t\t\t.monaco-tree"+t+".focused .monaco-tree-rows > .monaco-tree-row.focused:not(.highlighted) \t\t\t\t\t\t{ border: 1px dotted "+e.listFocusOutline+"; }\n\t\t\t\t.monaco-tree"+t+".focused .monaco-tree-rows > .monaco-tree-row.selected:not(.highlighted) \t\t\t\t\t\t{ border: 1px solid "+e.listFocusOutline+"; }\n\t\t\t\t.monaco-tree"+t+" .monaco-tree-rows > .monaco-tree-row.selected:not(.highlighted) \t\t\t\t\t\t\t{ border: 1px solid "+e.listFocusOutline+"; }\n\t\t\t\t.monaco-tree"+t+" .monaco-tree-rows > .monaco-tree-row:hover:not(.highlighted):not(.selected):not(.focused) \t{ border: 1px dashed "+e.listFocusOutline+"; }\n\t\t\t\t.monaco-tree"+t+" .monaco-tree-wrapper.drop-target,\n\t\t\t\t.monaco-tree"+t+" .monaco-tree-rows > .monaco-tree-row.drop-target\t\t\t\t\t\t\t\t\t\t\t\t{ border: 1px dashed "+e.listFocusOutline+"; }\n\t\t\t");var i=n.join("\n");i!==this.styleElement.innerHTML&&(this.styleElement.innerHTML=i)},e}(),hy=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),dy=function(){function e(e){this._onDispose=new X.vl,this.onDispose=this._onDispose.event,this._item=e}return Object.defineProperty(e.prototype,"item",{get:function(){return this._item},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){this._onDispose&&(this._onDispose.fire(),this._onDispose.dispose(),this._onDispose=null)},e}(),fy=function(){function e(){this.locks=Object.create({})}return e.prototype.isLocked=function(e){return!!this.locks[e.id]},e.prototype.run=function(e,t){var n,i,o=this,r=this.getLock(e);return r?new J.g3((function(i,s){n=(0,X.Oo)(r.onDispose)((function(){return o.run(e,t).then(i,s)}))}),(function(){n.dispose()})):new J.g3((function(n,r){if(e.isDisposed())return r(new Error("Item is disposed."));var s=o.locks[e.id]=new dy(e);return i=t().then((function(t){return delete o.locks[e.id],s.dispose(),t})).then(n,r)}),(function(){return i.cancel()}))},e.prototype.getLock=function(e){var t;for(t in this.locks){var n=this.locks[t];if(e.intersects(n.item))return n}return null},e}(),py=function(){function e(){this._isDisposed=!1,this._onDidRevealItem=new X._B,this.onDidRevealItem=this._onDidRevealItem.event,this._onExpandItem=new X._B,this.onExpandItem=this._onExpandItem.event,this._onDidExpandItem=new X._B,this.onDidExpandItem=this._onDidExpandItem.event,this._onCollapseItem=new X._B,this.onCollapseItem=this._onCollapseItem.event,this._onDidCollapseItem=new X._B,this.onDidCollapseItem=this._onDidCollapseItem.event,this._onDidAddTraitItem=new X._B,this.onDidAddTraitItem=this._onDidAddTraitItem.event,this._onDidRemoveTraitItem=new X._B,this.onDidRemoveTraitItem=this._onDidRemoveTraitItem.event,this._onDidRefreshItem=new X._B,this.onDidRefreshItem=this._onDidRefreshItem.event,this._onRefreshItemChildren=new X._B,this.onRefreshItemChildren=this._onRefreshItemChildren.event,this._onDidRefreshItemChildren=new X._B,this.onDidRefreshItemChildren=this._onDidRefreshItemChildren.event,this._onDidDisposeItem=new X._B,this.onDidDisposeItem=this._onDidDisposeItem.event,this.items={}}return e.prototype.register=function(e){H(!this.isRegistered(e.id),"item already registered: "+e.id);var t=(0,I.qE)([this._onDidRevealItem.add(e.onDidReveal),this._onExpandItem.add(e.onExpand),this._onDidExpandItem.add(e.onDidExpand),this._onCollapseItem.add(e.onCollapse),this._onDidCollapseItem.add(e.onDidCollapse),this._onDidAddTraitItem.add(e.onDidAddTrait),this._onDidRemoveTraitItem.add(e.onDidRemoveTrait),this._onDidRefreshItem.add(e.onDidRefresh),this._onRefreshItemChildren.add(e.onRefreshChildren),this._onDidRefreshItemChildren.add(e.onDidRefreshChildren),this._onDidDisposeItem.add(e.onDidDispose)]);this.items[e.id]={item:e,disposable:t}},e.prototype.deregister=function(e){H(this.isRegistered(e.id),"item not registered: "+e.id),this.items[e.id].disposable.dispose(),delete this.items[e.id]},e.prototype.isRegistered=function(e){return this.items.hasOwnProperty(e)},e.prototype.getItem=function(e){var t=this.items[e];return t?t.item:null},e.prototype.dispose=function(){this.items=null,this._onDidRevealItem.dispose(),this._onExpandItem.dispose(),this._onDidExpandItem.dispose(),this._onCollapseItem.dispose(),this._onDidCollapseItem.dispose(),this._onDidAddTraitItem.dispose(),this._onDidRemoveTraitItem.dispose(),this._onDidRefreshItem.dispose(),this._onRefreshItemChildren.dispose(),this._onDidRefreshItemChildren.dispose(),this._isDisposed=!0},e.prototype.isDisposed=function(){return this._isDisposed},e}(),gy=function(){function e(e,t,n,i,o){this._onDidCreate=new X.vl,this._onDidReveal=new X.vl,this.onDidReveal=this._onDidReveal.event,this._onExpand=new X.vl,this.onExpand=this._onExpand.event,this._onDidExpand=new X.vl,this.onDidExpand=this._onDidExpand.event,this._onCollapse=new X.vl,this.onCollapse=this._onCollapse.event,this._onDidCollapse=new X.vl,this.onDidCollapse=this._onDidCollapse.event,this._onDidAddTrait=new X.vl,this.onDidAddTrait=this._onDidAddTrait.event,this._onDidRemoveTrait=new X.vl,this.onDidRemoveTrait=this._onDidRemoveTrait.event,this._onDidRefresh=new X.vl,this.onDidRefresh=this._onDidRefresh.event,this._onRefreshChildren=new X.vl,this.onRefreshChildren=this._onRefreshChildren.event,this._onDidRefreshChildren=new X.vl,this.onDidRefreshChildren=this._onDidRefreshChildren.event,this._onDidDispose=new X.vl,this.onDidDispose=this._onDidDispose.event,this.registry=t,this.context=n,this.lock=i,this.element=o,this.id=e,this.registry.register(this),this.doesHaveChildren=this.context.dataSource.hasChildren(this.context.tree,this.element),this.needsChildrenRefresh=!0,this.parent=null,this.previous=null,this.next=null,this.firstChild=null,this.lastChild=null,this.traits={},this.depth=0,this.expanded=this.context.dataSource.shouldAutoexpand&&this.context.dataSource.shouldAutoexpand(this.context.tree,o),this._onDidCreate.fire(this),this.visible=this._isVisible(),this.height=this._getHeight(),this._isDisposed=!1}return e.prototype.getElement=function(){return this.element},e.prototype.hasChildren=function(){return this.doesHaveChildren},e.prototype.getDepth=function(){return this.depth},e.prototype.isVisible=function(){return this.visible},e.prototype.setVisible=function(e){this.visible=e},e.prototype.isExpanded=function(){return this.expanded},e.prototype._setExpanded=function(e){this.expanded=e},e.prototype.reveal=function(e){void 0===e&&(e=null);var t={item:this,relativeTop:e};this._onDidReveal.fire(t)},e.prototype.expand=function(){var e=this;return this.isExpanded()||!this.doesHaveChildren||this.lock.isLocked(this)?J.g3.as(!1):this.lock.run(this,(function(){var t={item:e};return e._onExpand.fire(t),(e.needsChildrenRefresh?e.refreshChildren(!1,!0,!0):J.g3.as(null)).then((function(){return e._setExpanded(!0),e._onDidExpand.fire(t),!0}))})).then((function(t){return!e.isDisposed()&&(e.context.options.autoExpandSingleChildren&&t&&null!==e.firstChild&&e.firstChild===e.lastChild&&e.firstChild.isVisible()?e.firstChild.expand().then((function(){return!0})):t)}))},e.prototype.collapse=function(e){var t=this;if(void 0===e&&(e=!1),e){var n=J.g3.as(null);return this.forEachChild((function(e){n=n.then((function(){return e.collapse(!0)}))})),n.then((function(){return t.collapse(!1)}))}return!this.isExpanded()||this.lock.isLocked(this)?J.g3.as(!1):this.lock.run(this,(function(){var e={item:t};return t._onCollapse.fire(e),t._setExpanded(!1),t._onDidCollapse.fire(e),J.g3.as(!0)}))},e.prototype.addTrait=function(e){var t={item:this,trait:e};this.traits[e]=!0,this._onDidAddTrait.fire(t)},e.prototype.removeTrait=function(e){var t={item:this,trait:e};delete this.traits[e],this._onDidRemoveTrait.fire(t)},e.prototype.hasTrait=function(e){return this.traits[e]||!1},e.prototype.getAllTraits=function(){var e,t=[];for(e in this.traits)this.traits.hasOwnProperty(e)&&this.traits[e]&&t.push(e);return t},e.prototype.getHeight=function(){return this.height},e.prototype.refreshChildren=function(t,n,i){var o=this;if(void 0===n&&(n=!1),void 0===i&&(i=!1),!i&&!this.isExpanded())return this.needsChildrenRefresh=!0,J.g3.as(this);this.needsChildrenRefresh=!1;var r=function(){var i={item:o,isNested:n};o._onRefreshChildren.fire(i);var r=(o.doesHaveChildren?o.context.dataSource.getChildren(o.context.tree,o.element):J.g3.as([])).then((function(n){if(o.isDisposed()||o.registry.isDisposed())return J.g3.as(null);if(!Array.isArray(n))return J.g3.wrapError(new Error("Please return an array of children."));n=n?n.slice(0):[],n=o.sort(n);for(var i={};null!==o.firstChild;)i[o.firstChild.id]=o.firstChild,o.removeChild(o.firstChild);for(var r=0,s=n.length;r0||this.m_modifiedCount>0)&&this.m_changes.push(new by(this.m_originalStart,this.m_originalCount,this.m_modifiedStart,this.m_modifiedCount)),this.m_originalCount=0,this.m_modifiedCount=0,this.m_originalStart=Number.MAX_VALUE,this.m_modifiedStart=Number.MAX_VALUE},e.prototype.AddOriginalElement=function(e,t){this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,t),this.m_originalCount++},e.prototype.AddModifiedElement=function(e,t){this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,t),this.m_modifiedCount++},e.prototype.getChanges=function(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes},e.prototype.getReverseChanges=function(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes.reverse(),this.m_changes},e}(),Ny=function(){function e(e,t,n){void 0===n&&(n=null),this.OriginalSequence=e,this.ModifiedSequence=t,this.ContinueProcessingPredicate=n,this.m_forwardHistory=[],this.m_reverseHistory=[]}return e.prototype.ElementsAreEqual=function(e,t){return this.OriginalSequence.getElementAtIndex(e)===this.ModifiedSequence.getElementAtIndex(t)},e.prototype.OriginalElementsAreEqual=function(e,t){return this.OriginalSequence.getElementAtIndex(e)===this.OriginalSequence.getElementAtIndex(t)},e.prototype.ModifiedElementsAreEqual=function(e,t){return this.ModifiedSequence.getElementAtIndex(e)===this.ModifiedSequence.getElementAtIndex(t)},e.prototype.ComputeDiff=function(e){return this._ComputeDiff(0,this.OriginalSequence.getLength()-1,0,this.ModifiedSequence.getLength()-1,e)},e.prototype._ComputeDiff=function(e,t,n,i,o){var r=this.ComputeDiffRecursive(e,t,n,i,[!1]);return o?this.ShiftChanges(r):r},e.prototype.ComputeDiffRecursive=function(e,t,n,i,o){for(o[0]=!1;e<=t&&n<=i&&this.ElementsAreEqual(e,n);)e++,n++;for(;t>=e&&i>=n&&this.ElementsAreEqual(t,i);)t--,i--;if(e>t||n>i){var r=void 0;return n<=i?(Sy.Assert(e===t+1,"originalStart should only be one more than originalEnd"),r=[new by(e,0,n,i-n+1)]):e<=t?(Sy.Assert(n===i+1,"modifiedStart should only be one more than modifiedEnd"),r=[new by(e,t-e+1,n,0)]):(Sy.Assert(e===t+1,"originalStart should only be one more than originalEnd"),Sy.Assert(n===i+1,"modifiedStart should only be one more than modifiedEnd"),r=[]),r}var s=[0],a=[0],u=this.ComputeRecursionPoint(e,t,n,i,s,a,o),l=s[0],c=a[0];if(null!==u)return u;if(!o[0]){var h,d=this.ComputeDiffRecursive(e,l,n,c,o);return h=o[0]?[new by(l+1,t-(l+1)+1,c+1,i-(c+1)+1)]:this.ComputeDiffRecursive(l+1,t,c+1,i,o),this.ConcatenateChanges(d,h)}return[new by(e,t-e+1,n,i-n+1)]},e.prototype.WALKTRACE=function(e,t,n,i,o,r,s,a,u,l,c,h,d,f,p,g,m,v){var y,b,_=null,w=new Iy,M=t,C=n,S=d[0]-g[0]-i,L=Number.MIN_VALUE,I=this.m_forwardHistory.length-1;do{(b=S+e)===M||b=0&&(e=(u=this.m_forwardHistory[I])[0],M=1,C=u.length-1)}while(--I>=-1);if(y=w.getReverseChanges(),v[0]){var N=d[0]+1,x=g[0]+1;if(null!==y&&y.length>0){var D=y[y.length-1];N=Math.max(N,D.getOriginalEnd()),x=Math.max(x,D.getModifiedEnd())}_=[new by(N,h-N+1,x,p-x+1)]}else{w=new Iy,M=r,C=s,S=d[0]-g[0]-a,L=Number.MAX_VALUE,I=m?this.m_reverseHistory.length-1:this.m_reverseHistory.length-2;do{(b=S+o)===M||b=l[b+1]?(f=(c=l[b+1]-1)-S-a,c>L&&w.MarkNextChange(),L=c+1,w.AddOriginalElement(c+1,f+1),S=b+1-o):(f=(c=l[b-1])-S-a,c>L&&w.MarkNextChange(),L=c,w.AddModifiedElement(c+1,f+1),S=b-1-o),I>=0&&(o=(l=this.m_reverseHistory[I])[0],M=1,C=l.length-1)}while(--I>=-1);_=w.getChanges()}return this.ConcatenateChanges(y,_)},e.prototype.ComputeRecursionPoint=function(e,t,n,i,o,r,s){var a,u,l,c=0,h=0,d=0,f=0;e--,n--,o[0]=0,r[0]=0,this.m_forwardHistory=[],this.m_reverseHistory=[];var p,g,m=t-e+(i-n),v=m+1,y=new Array(v),b=new Array(v),_=i-n,w=t-e,M=e-n,C=t-i,S=(w-_)%2==0;for(y[_]=e,b[w]=t,s[0]=!1,l=1;l<=m/2+1;l++){var L=0,I=0;for(c=this.ClipDiagonalBound(_-l,l,_,v),h=this.ClipDiagonalBound(_+l,l,_,v),p=c;p<=h;p+=2){for(u=(a=p===c||pL+I&&(L=a,I=u),!S&&Math.abs(p-w)<=l-1&&a>=b[p])return o[0]=a,r[0]=u,g<=b[p]&&l<=1448?this.WALKTRACE(_,c,h,M,w,d,f,C,y,b,a,t,o,u,i,r,S,s):null}var N=(L-e+(I-n)-l)/2;if(null!==this.ContinueProcessingPredicate&&!this.ContinueProcessingPredicate(L,this.OriginalSequence,N))return s[0]=!0,o[0]=L,r[0]=I,N>0&&l<=1448?this.WALKTRACE(_,c,h,M,w,d,f,C,y,b,a,t,o,u,i,r,S,s):(e++,n++,[new by(e,t-e+1,n,i-n+1)]);for(d=this.ClipDiagonalBound(w-l,l,w,v),f=this.ClipDiagonalBound(w+l,l,w,v),p=d;p<=f;p+=2){for(u=(a=p===d||p=b[p+1]?b[p+1]-1:b[p-1])-(p-w)-C,g=a;a>e&&u>n&&this.ElementsAreEqual(a,u);)a--,u--;if(b[p]=a,S&&Math.abs(p-_)<=l&&a<=y[p])return o[0]=a,r[0]=u,g>=y[p]&&l<=1448?this.WALKTRACE(_,c,h,M,w,d,f,C,y,b,a,t,o,u,i,r,S,s):null}if(l<=1447){var x=new Array(h-c+2);x[0]=_-c+1,Ly.Copy(y,c,x,1,h-c+1),this.m_forwardHistory.push(x),(x=new Array(f-d+2))[0]=w-d+1,Ly.Copy(b,d,x,1,f-d+1),this.m_reverseHistory.push(x)}}return this.WALKTRACE(_,c,h,M,w,d,f,C,y,b,a,t,o,u,i,r,S,s)},e.prototype.ShiftChanges=function(e){var t;do{t=!1;for(var n=0;n0,a=i.modifiedLength>0;i.originalStart+i.originalLength=0;n--){if(i=e[n],o=0,r=0,n>0){var c=e[n-1];c.originalLength>0&&(o=c.originalStart+c.originalLength),c.modifiedLength>0&&(r=c.modifiedStart+c.modifiedLength)}s=i.originalLength>0,a=i.modifiedLength>0;for(var h=0,d=this._boundaryScore(i.originalStart,i.originalLength,i.modifiedStart,i.modifiedLength),f=1;;f++){var p=i.originalStart-f,g=i.modifiedStart-f;if(pd&&(d=m,h=f)}i.originalStart-=h,i.modifiedStart-=h}return e},e.prototype._OriginalIsBoundary=function(e){if(e<=0||e>=this.OriginalSequence.getLength()-1)return!0;var t=this.OriginalSequence.getElementAtIndex(e);return"string"==typeof t&&/^\s*$/.test(t)},e.prototype._OriginalRegionIsBoundary=function(e,t){if(this._OriginalIsBoundary(e)||this._OriginalIsBoundary(e-1))return!0;if(t>0){var n=e+t;if(this._OriginalIsBoundary(n-1)||this._OriginalIsBoundary(n))return!0}return!1},e.prototype._ModifiedIsBoundary=function(e){if(e<=0||e>=this.ModifiedSequence.getLength()-1)return!0;var t=this.ModifiedSequence.getElementAtIndex(e);return"string"==typeof t&&/^\s*$/.test(t)},e.prototype._ModifiedRegionIsBoundary=function(e,t){if(this._ModifiedIsBoundary(e)||this._ModifiedIsBoundary(e-1))return!0;if(t>0){var n=e+t;if(this._ModifiedIsBoundary(n-1)||this._ModifiedIsBoundary(n))return!0}return!1},e.prototype._boundaryScore=function(e,t,n,i){return(this._OriginalRegionIsBoundary(e,t)?1:0)+(this._ModifiedRegionIsBoundary(n,i)?1:0)},e.prototype.ConcatenateChanges=function(e,t){var n=[],i=null;return 0===e.length||0===t.length?t.length>0?t:e:this.ChangesOverlap(e[e.length-1],t[0],n)?(i=new Array(e.length+t.length-1),Ly.Copy(e,0,i,0,e.length-1),i[e.length-1]=n[0],Ly.Copy(t,1,i,e.length,t.length-1),i):(i=new Array(e.length+t.length),Ly.Copy(e,0,i,0,e.length),Ly.Copy(t,0,i,e.length,t.length),i)},e.prototype.ChangesOverlap=function(e,t,n){if(Sy.Assert(e.originalStart<=t.originalStart,"Left change is not less than or equal to right change"),Sy.Assert(e.modifiedStart<=t.modifiedStart,"Left change is not less than or equal to right change"),e.originalStart+e.originalLength>=t.originalStart||e.modifiedStart+e.modifiedLength>=t.modifiedStart){var i=e.originalStart,o=e.originalLength,r=e.modifiedStart,s=e.modifiedLength;return e.originalStart+e.originalLength>=t.originalStart&&(o=t.originalStart+t.originalLength-e.originalStart),e.modifiedStart+e.modifiedLength>=t.modifiedStart&&(s=t.modifiedStart+t.modifiedLength-e.modifiedStart),n[0]=new by(i,o,r,s),!0}return n[0]=null,!1},e.prototype.ClipDiagonalBound=function(e,t,n,i){if(e>=0&&e=0;r--)this.onInsertItem(l[r]);for(r=this.heightMap.length-1;r>=o;r--)this.onRefreshItem(this.heightMap[r]);return a},e.prototype.onInsertItem=function(e){},e.prototype.onRemoveItems=function(e){for(var t,n,i,o=null,r=0;t=e.next();){if(i=this.indexes[t],!(n=this.heightMap[i]))return void console.error("view item doesnt exist");r-=n.height,delete this.indexes[t],this.onRemoveItem(n),null===o&&(o=i)}if(0!==r)for(this.heightMap.splice(o,i-o+1),i=o;i=n.top+n.height))return t;if(i===t)break;i=t}return this.heightMap.length},e.prototype.indexAfter=function(e){return Math.min(this.indexAt(e)+1,this.heightMap.length)},e.prototype.itemAtIndex=function(e){return this.heightMap[e]},e.prototype.itemAfter=function(e){return this.heightMap[this.indexes[e.model.id]+1]||null},e.prototype.createViewItem=function(e){throw new Error("not implemented")},e.prototype.dispose=function(){this.heightMap=null,this.indexes=null},e}(),Ey=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Ay=function(){function e(e,t,n){this._posx=e,this._posy=t,this._target=n}return e.prototype.preventDefault=function(){},e.prototype.stopPropagation=function(){},Object.defineProperty(e.prototype,"target",{get:function(){return this._target},enumerable:!0,configurable:!0}),e}(),jy=function(e){function t(t){var n=e.call(this,t.posx,t.posy,t.target)||this;return n.originalEvent=t,n}return Ey(t,e),t.prototype.preventDefault=function(){this.originalEvent.preventDefault()},t.prototype.stopPropagation=function(){this.originalEvent.stopPropagation()},t}(Ay),Oy=function(e){function t(t,n,i){var o=e.call(this,t,n,i.target)||this;return o.originalEvent=i,o}return Ey(t,e),t.prototype.preventDefault=function(){this.originalEvent.preventDefault()},t.prototype.stopPropagation=function(){this.originalEvent.stopPropagation()},t}(Ay);!function(e){e[e.COPY=0]="COPY",e[e.MOVE=1]="MOVE"}(My||(My={})),function(e){e[e.BUBBLE_DOWN=0]="BUBBLE_DOWN",e[e.BUBBLE_UP=1]="BUBBLE_UP"}(Cy||(Cy={}));var Ry,Py,zy=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Wy=function(){function e(e){this.context=e,this._cache={"":[]}}return e.prototype.alloc=function(e){var t=this.cache(e).pop();if(!t){var n=document.createElement("div");n.className="content";var i=document.createElement("div");i.appendChild(n),t={element:i,templateId:e,templateData:this.context.renderer.renderTemplate(this.context.tree,e,n)}}return t},e.prototype.release=function(e,t){!function(e){try{e.parentElement.removeChild(e)}catch(e){}}(t.element),this.cache(e).push(t)},e.prototype.cache=function(e){return this._cache[e]||(this._cache[e]=[])},e.prototype.garbageCollect=function(){var e=this;this._cache&&Object.keys(this._cache).forEach((function(t){e._cache[t].forEach((function(n){e.context.renderer.disposeTemplate(e.context.tree,t,n.templateData),n.element=null,n.templateData=null})),delete e._cache[t]}))},e.prototype.dispose=function(){this.garbageCollect(),this._cache=null,this.context=null},e}(),Fy=function(){function e(e,t){var n=this;this.width=0,this.context=e,this.model=t,this.id=this.model.id,this.row=null,this.top=0,this.height=t.getHeight(),this._styles={},t.getAllTraits().forEach((function(e){return n._styles[e]=!0})),t.isExpanded()&&this.addClass("expanded")}return Object.defineProperty(e.prototype,"expanded",{set:function(e){e?this.addClass("expanded"):this.removeClass("expanded")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"loading",{set:function(e){e?this.addClass("loading"):this.removeClass("loading")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"draggable",{get:function(){return this._draggable},set:function(e){this._draggable=e,this.render(!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"dropTarget",{set:function(e){e?this.addClass("drop-target"):this.removeClass("drop-target")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"element",{get:function(){return this.row&&this.row.element},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"templateId",{get:function(){return this._templateId||(this._templateId=this.context.renderer.getTemplateId&&this.context.renderer.getTemplateId(this.context.tree,this.model.getElement()))},enumerable:!0,configurable:!0}),e.prototype.addClass=function(e){this._styles[e]=!0,this.render(!0)},e.prototype.removeClass=function(e){delete this._styles[e],this.render(!0)},e.prototype.render=function(e){var t=this;if(void 0===e&&(e=!1),this.model&&this.element){var n=["monaco-tree-row"];n.push.apply(n,Object.keys(this._styles)),this.model.hasChildren()&&n.push("has-children"),this.element.className=n.join(" "),this.element.draggable=this.draggable,this.element.style.height=this.height+"px",this.element.setAttribute("role","treeitem");var i=this.context.accessibilityProvider,o=i.getAriaLabel(this.context.tree,this.model.getElement());if(o&&this.element.setAttribute("aria-label",o),i.getPosInSet&&i.getSetSize&&(this.element.setAttribute("aria-setsize",i.getSetSize()),this.element.setAttribute("aria-posinset",i.getPosInSet(this.context.tree,this.model.getElement()))),this.model.hasTrait("focused")){var r=p.safeBtoa(this.model.id);this.element.setAttribute("aria-selected","true"),this.element.setAttribute("id",r)}else this.element.setAttribute("aria-selected","false"),this.element.removeAttribute("id");this.model.hasChildren()?this.element.setAttribute("aria-expanded",String(!!this._styles.expanded)):this.element.removeAttribute("aria-expanded"),this.element.setAttribute("aria-level",String(this.model.getDepth())),this.context.options.paddingOnRow?this.element.style.paddingLeft=this.context.options.twistiePixels+(this.model.getDepth()-1)*this.context.options.indentPixels+"px":(this.element.style.paddingLeft=(this.model.getDepth()-1)*this.context.options.indentPixels+"px",this.row.element.firstElementChild.style.paddingLeft=this.context.options.twistiePixels+"px");var s=this.context.dnd.getDragURI(this.context.tree,this.model.getElement());if(s!==this.uri&&(this.unbindDragStart&&(this.unbindDragStart.dispose(),this.unbindDragStart=null),s?(this.uri=s,this.draggable=!0,this.unbindDragStart=cn(this.element,"dragstart",(function(e){t.onDragStart(e)}))):this.uri=null),!e&&this.element){var a=window.getComputedStyle(this.element),u=parseFloat(a.paddingLeft);this.context.horizontalScrolling&&(this.element.style.width="fit-content"),this.context.renderer.renderElement(this.context.tree,this.model.getElement(),this.templateId,this.row.templateData),this.context.horizontalScrolling&&(this.width=jn(this.element)+u,this.element.style.width="")}}},e.prototype.insertInDOM=function(e,t){if(this.row||(this.row=this.context.cache.alloc(this.templateId),this.element[Hy.BINDING]=this),!this.element.parentElement){if(null===t)e.appendChild(this.element);else try{e.insertBefore(this.element,t)}catch(t){console.warn("Failed to locate previous tree element"),e.appendChild(this.element)}this.render()}},e.prototype.removeFromDOM=function(){this.row&&(this.unbindDragStart&&(this.unbindDragStart.dispose(),this.unbindDragStart=null),this.uri=null,this.element[Hy.BINDING]=null,this.context.cache.release(this.templateId,this.row),this.row=null)},e.prototype.dispose=function(){this.row=null,this.model=null},e}(),By=function(e){function t(t,n,i){var o=e.call(this,t,n)||this;return o.row={element:i,templateData:null,templateId:null},o}return zy(t,e),t.prototype.render=function(){if(this.model&&this.element){var e=["monaco-tree-wrapper"];e.push.apply(e,Object.keys(this._styles)),this.model.hasChildren()&&e.push("has-children"),this.element.className=e.join(" ")}},t.prototype.insertInDOM=function(e,t){},t.prototype.removeFromDOM=function(){},t}(Fy),Hy=function(e){function t(n,i){var o=e.call(this)||this;o.lastClickTimeStamp=0,o.contentWidthUpdateDelayer=new mt(50),o.isRefreshing=!1,o.refreshingPreviousChildrenIds={},o._onDOMFocus=new X.vl,o._onDOMBlur=new X.vl,o._onDidScroll=new X.vl,t.counter++,o.instance=t.counter;var r=void 0===n.options.horizontalScrollMode?gr.XR.Hidden:n.options.horizontalScrollMode;o.horizontalScrolling=r!==gr.XR.Hidden,o.context={dataSource:n.dataSource,renderer:n.renderer,controller:n.controller,dnd:n.dnd,filter:n.filter,sorter:n.sorter,tree:n.tree,accessibilityProvider:n.accessibilityProvider,options:n.options,cache:new Wy(n),horizontalScrolling:o.horizontalScrolling},o.modelListeners=[],o.viewListeners=[],o.model=null,o.items={},o.domNode=document.createElement("div"),o.domNode.className="monaco-tree no-focused-item monaco-tree-instance-"+o.instance,o.domNode.tabIndex=n.options.preventRootFocus?-1:0,o.styleElement=Wn(o.domNode),o.treeStyler=n.styler,o.treeStyler||(o.treeStyler=new cy(o.styleElement,"monaco-tree-instance-"+o.instance)),o.domNode.setAttribute("role","tree"),o.context.options.ariaLabel&&o.domNode.setAttribute("aria-label",o.context.options.ariaLabel),o.context.options.alwaysFocused&&sn(o.domNode,"focused"),o.context.options.paddingOnRow||sn(o.domNode,"no-row-padding"),o.wrapper=document.createElement("div"),o.wrapper.className="monaco-tree-wrapper",o.scrollableElement=new Zc(o.wrapper,{alwaysConsumeMouseWheel:!0,horizontal:r,vertical:void 0!==n.options.verticalScrollMode?n.options.verticalScrollMode:gr.XR.Auto,useShadows:n.options.useShadows}),o.scrollableElement.onScroll((function(e){o.render(e.scrollTop,e.height,e.scrollLeft,e.width,e.scrollWidth),o._onDidScroll.fire()})),xt?(o.wrapper.style.msTouchAction="none",o.wrapper.style.msContentZooming="none"):au.addTarget(o.wrapper),o.rowsContainer=document.createElement("div"),o.rowsContainer.className="monaco-tree-rows",n.options.showTwistie&&(o.rowsContainer.className+=" show-twisties");var s=Gn(o.domNode);return o.viewListeners.push(s.onDidFocus((function(){return o.onFocus()}))),o.viewListeners.push(s.onDidBlur((function(){return o.onBlur()}))),o.viewListeners.push(s),o.viewListeners.push(cn(o.domNode,"keydown",(function(e){return o.onKeyDown(e)}))),o.viewListeners.push(cn(o.domNode,"keyup",(function(e){return o.onKeyUp(e)}))),o.viewListeners.push(cn(o.domNode,"mousedown",(function(e){return o.onMouseDown(e)}))),o.viewListeners.push(cn(o.domNode,"mouseup",(function(e){return o.onMouseUp(e)}))),o.viewListeners.push(cn(o.wrapper,"click",(function(e){return o.onClick(e)}))),o.viewListeners.push(cn(o.wrapper,"auxclick",(function(e){return o.onClick(e)}))),o.viewListeners.push(cn(o.domNode,"contextmenu",(function(e){return o.onContextMenu(e)}))),o.viewListeners.push(cn(o.wrapper,iu.Tap,(function(e){return o.onTap(e)}))),o.viewListeners.push(cn(o.wrapper,iu.Change,(function(e){return o.onTouchChange(e)}))),xt&&(o.viewListeners.push(cn(o.wrapper,"MSPointerDown",(function(e){return o.onMsPointerDown(e)}))),o.viewListeners.push(cn(o.wrapper,"MSGestureTap",(function(e){return o.onMsGestureTap(e)}))),o.viewListeners.push(Sn(o.wrapper,"MSGestureChange",(function(e){return o.onThrottledMsGestureChange(e)}),(function(e,t){t.stopPropagation(),t.preventDefault();var n={translationY:t.translationY,translationX:t.translationX};return e&&(n.translationY+=e.translationY,n.translationX+=e.translationX),n})))),o.viewListeners.push(cn(window,"dragover",(function(e){return o.onDragOver(e)}))),o.viewListeners.push(cn(o.wrapper,"drop",(function(e){return o.onDrop(e)}))),o.viewListeners.push(cn(window,"dragend",(function(e){return o.onDragEnd(e)}))),o.viewListeners.push(cn(window,"dragleave",(function(e){return o.onDragOver(e)}))),o.wrapper.appendChild(o.rowsContainer),o.domNode.appendChild(o.scrollableElement.getDomNode()),i.appendChild(o.domNode),o.lastRenderTop=0,o.lastRenderHeight=0,o.didJustPressContextMenuKey=!1,o.currentDropTarget=null,o.currentDropTargets=[],o.shouldInvalidateDropReaction=!1,o.dragAndDropScrollInterval=null,o.dragAndDropScrollTimeout=null,o.onHiddenScrollTop=null,o.onRowsChanged(),o.layout(),o.setupMSGesture(),o.applyStyles(n.options),o}return zy(t,e),Object.defineProperty(t.prototype,"onDOMFocus",{get:function(){return this._onDOMFocus.event},enumerable:!0,configurable:!0}),t.prototype.applyStyles=function(e){this.treeStyler.style(e)},t.prototype.createViewItem=function(e){return new Fy(this.context,e)},t.prototype.getHTMLElement=function(){return this.domNode},t.prototype.focus=function(){this.domNode.focus()},t.prototype.isFocused=function(){return document.activeElement===this.domNode},t.prototype.blur=function(){this.domNode.blur()},t.prototype.setupMSGesture=function(){var e=this;window.MSGesture&&(this.msGesture=new MSGesture,setTimeout((function(){return e.msGesture.target=e.wrapper}),100))},t.prototype.isTreeVisible=function(){return null===this.onHiddenScrollTop},t.prototype.layout=function(e,t){this.isTreeVisible()&&(this.viewHeight=e||On(this.wrapper),this.scrollHeight=this.getContentHeight(),this.horizontalScrolling&&(this.viewWidth=t||jn(this.wrapper)))},t.prototype.render=function(e,t,n,i,o){var r,s,a=e,u=e+t,l=this.lastRenderTop+this.lastRenderHeight;for(r=this.indexAfter(u)-1,s=this.indexAt(Math.max(l,a));r>=s;r--)this.insertItemInDOM(this.itemAtIndex(r));for(r=Math.min(this.indexAt(this.lastRenderTop),this.indexAfter(u))-1,s=this.indexAt(a);r>=s;r--)this.insertItemInDOM(this.itemAtIndex(r));for(r=this.indexAt(this.lastRenderTop),s=Math.min(this.indexAt(a),this.indexAfter(l));r1e3,l=void 0,c=void 0;if(!u){var h=new Ny({getLength:function(){return r.length},getElementAtIndex:function(e){return r[e]}},{getLength:function(){return s.length},getElementAtIndex:function(e){return s[e].id}},null);c=(l=h.ComputeDiff(!1)).some((function(e){if(e.modifiedLength>0)for(var n=e.modifiedStart,i=e.modifiedStart+e.modifiedLength;n0&&this.onRemoveItems(new Yp(r,p.originalStart,p.originalStart+p.originalLength)),p.modifiedLength>0){var g=s[p.modifiedStart-1]||n;g=g.getDepth()>0?g:null,this.onInsertItems(new Yp(s,p.modifiedStart,p.modifiedStart+p.modifiedLength),g?g.id:null)}}else(u||l.length)&&(this.onRemoveItems(new Yp(r)),this.onInsertItems(new Yp(s),n.getDepth()>0?n.id:null));(u||l.length)&&this.onRowsChanged()}},t.prototype.onItemRefresh=function(e){this.onItemsRefresh([e])},t.prototype.onItemsRefresh=function(e){var t=this;this.onRefreshItemSet(e.filter((function(e){return t.items.hasOwnProperty(e.id)}))),this.onRowsChanged()},t.prototype.onItemExpanding=function(e){var t=this.items[e.item.id];t&&(t.expanded=!0)},t.prototype.onItemExpanded=function(e){var t=e.item,n=this.items[t.id];if(n){n.expanded=!0;var i=this.onInsertItems(t.getNavigator(),t.id),o=this.scrollTop;n.top+n.height<=this.scrollTop&&(o+=i),this.onRowsChanged(o)}},t.prototype.onItemCollapsing=function(e){var t=e.item,n=this.items[t.id];n&&(n.expanded=!1,this.onRemoveItems(new Gp(t.getNavigator(),(function(e){return e&&e.id}))),this.onRowsChanged())},t.prototype.onItemReveal=function(e){var t=e.item,n=e.relativeTop,i=this.items[t.id];if(i)if(null!==n){n=(n=n<0?0:n)>1?1:n;var o=i.height-this.viewHeight;this.scrollTop=o*n+i.top}else{var r=i.top+i.height,s=this.scrollTop+this.viewHeight;i.top=s&&(this.scrollTop=r-this.viewHeight)}},t.prototype.onItemAddTrait=function(e){var t=e.item,n=e.trait,i=this.items[t.id];i&&i.addClass(n),"highlighted"===n&&(sn(this.domNode,n),i&&(this.highlightedItemWasDraggable=!!i.draggable,i.draggable&&(i.draggable=!1)))},t.prototype.onItemRemoveTrait=function(e){var t=e.item,n=e.trait,i=this.items[t.id];i&&i.removeClass(n),"highlighted"===n&&(an(this.domNode,n),this.highlightedItemWasDraggable&&(i.draggable=!0),this.highlightedItemWasDraggable=!1)},t.prototype.onModelFocusChange=function(){var e=this.model&&this.model.getFocus();un(this.domNode,"no-focused-item",!e),e?this.domNode.setAttribute("aria-activedescendant",p.safeBtoa(this.context.dataSource.getId(this.context.tree,e))):this.domNode.removeAttribute("aria-activedescendant")},t.prototype.onInsertItem=function(e){var t=this;e.onDragStart=function(n){t.onDragStart(e,n)},e.needsRender=!0,this.refreshViewItem(e),this.items[e.id]=e},t.prototype.onRefreshItem=function(e,t){void 0===t&&(t=!1),e.needsRender=e.needsRender||t,this.refreshViewItem(e)},t.prototype.onRemoveItem=function(e){this.removeItemFromDOM(e),e.dispose(),delete this.items[e.id]},t.prototype.refreshViewItem=function(e){e.render(),this.shouldBeRendered(e)?this.insertItemInDOM(e):this.removeItemFromDOM(e)},t.prototype.onClick=function(e){if(!this.lastPointerType||"mouse"===this.lastPointerType){var t=new Qt(e),n=this.getItemAround(t.target);n&&(xt&&Date.now()-this.lastClickTimeStamp<300&&(t.detail=2),this.lastClickTimeStamp=Date.now(),this.context.controller.onClick(this.context.tree,n.model.getElement(),t))}},t.prototype.onMouseDown=function(e){if(this.didJustPressContextMenuKey=!1,this.context.controller.onMouseDown&&(!this.lastPointerType||"mouse"===this.lastPointerType)){var t=new Qt(e);if(!(t.ctrlKey&&B.ib&&B.zx)){var n=this.getItemAround(t.target);n&&this.context.controller.onMouseDown(this.context.tree,n.model.getElement(),t)}}},t.prototype.onMouseUp=function(e){if(this.context.controller.onMouseUp&&(!this.lastPointerType||"mouse"===this.lastPointerType)){var t=new Qt(e);if(!(t.ctrlKey&&B.ib&&B.zx)){var n=this.getItemAround(t.target);n&&this.context.controller.onMouseUp(this.context.tree,n.model.getElement(),t)}}},t.prototype.onTap=function(e){var t=this.getItemAround(e.initialTarget);t&&this.context.controller.onTap(this.context.tree,t.model.getElement(),e)},t.prototype.onTouchChange=function(e){e.preventDefault(),e.stopPropagation(),this.scrollTop-=e.translationY},t.prototype.onContextMenu=function(e){var t,n;if(e instanceof KeyboardEvent||this.didJustPressContextMenuKey){this.didJustPressContextMenuKey=!1;var i,o=new Bt(e);if(n=this.model.getFocus()){var r=this.context.dataSource.getId(this.context.tree,n);i=Tn(this.items[r].element)}else n=this.model.getInput(),i=Tn(this.inputItem.element);t=new Oy(i.left+i.width,i.top,o)}else{var s=new Qt(e),a=this.getItemAround(s.target);if(!a)return;n=a.model.getElement(),t=new jy(s)}this.context.controller.onContextMenu(this.context.tree,n,t)},t.prototype.onKeyDown=function(e){var t=new Bt(e);this.didJustPressContextMenuKey=58===t.keyCode||t.shiftKey&&68===t.keyCode,this.didJustPressContextMenuKey&&(t.preventDefault(),t.stopPropagation()),t.target&&t.target.tagName&&"input"===t.target.tagName.toLowerCase()||this.context.controller.onKeyDown(this.context.tree,t)},t.prototype.onKeyUp=function(e){this.didJustPressContextMenuKey&&this.onContextMenu(e),this.didJustPressContextMenuKey=!1,this.context.controller.onKeyUp(this.context.tree,new Bt(e))},t.prototype.onDragStart=function(e,n){if(!this.model.getHighlight()){var i,o=e.model.getElement(),r=this.model.getSelection();if(i=r.indexOf(o)>-1?r:[o],n.dataTransfer.effectAllowed="copyMove",n.dataTransfer.setData("ResourceURLs",JSON.stringify([e.uri])),n.dataTransfer.setDragImage){var s;s=this.context.dnd.getDragLabel?this.context.dnd.getDragLabel(this.context.tree,i):String(i.length);var a=document.createElement("div");a.className="monaco-tree-drag-image",a.textContent=s,document.body.appendChild(a),n.dataTransfer.setDragImage(a,-10,-10),setTimeout((function(){return document.body.removeChild(a)}),0)}this.currentDragAndDropData=new xy(i),t.currentExternalDragAndDropData=new Dy(i),this.context.dnd.onDragStart(this.context.tree,this.currentDragAndDropData,new qt(n))}},t.prototype.setupDragAndDropScrollInterval=function(){var e=this,t=kn(this.wrapper).top;this.dragAndDropScrollInterval||(this.dragAndDropScrollInterval=window.setInterval((function(){if(void 0!==e.dragAndDropMouseY){var n=e.dragAndDropMouseY-t,i=0,o=e.viewHeight-35;n<35?i=Math.max(-14,.2*(n-35)):n>o&&(i=Math.min(14,.2*(n-o))),e.scrollTop+=i}}),10),this.cancelDragAndDropScrollTimeout(),this.dragAndDropScrollTimeout=window.setTimeout((function(){e.cancelDragAndDropScrollInterval(),e.dragAndDropScrollTimeout=null}),1e3))},t.prototype.cancelDragAndDropScrollInterval=function(){this.dragAndDropScrollInterval&&(window.clearInterval(this.dragAndDropScrollInterval),this.dragAndDropScrollInterval=null),this.cancelDragAndDropScrollTimeout()},t.prototype.cancelDragAndDropScrollTimeout=function(){this.dragAndDropScrollTimeout&&(window.clearTimeout(this.dragAndDropScrollTimeout),this.dragAndDropScrollTimeout=null)},t.prototype.onDragOver=function(e){var n,i=this,o=new qt(e),r=this.getItemAround(o.target);if(!r||0===o.posx&&0===o.posy&&o.browserEvent.type===Un.DRAG_LEAVE)return this.currentDropTarget&&(this.currentDropTargets.forEach((function(e){return e.dropTarget=!1})),this.currentDropTargets=[],this.currentDropPromise&&(this.currentDropPromise.cancel(),this.currentDropPromise=null)),this.cancelDragAndDropScrollInterval(),this.currentDropTarget=null,this.currentDropElement=null,this.dragAndDropMouseY=null,!1;if(this.setupDragAndDropScrollInterval(),this.dragAndDropMouseY=o.posy,!this.currentDragAndDropData)if(t.currentExternalDragAndDropData)this.currentDragAndDropData=t.currentExternalDragAndDropData;else{if(!o.dataTransfer.types)return!1;this.currentDragAndDropData=new ky}this.currentDragAndDropData.update(o);var s,a=r.model;do{if(n=a?a.getElement():this.model.getInput(),!(s=this.context.dnd.onDragOver(this.context.tree,this.currentDragAndDropData,n,o))||s.bubble!==Cy.BUBBLE_UP)break;a=a&&a.parent}while(a);if(!a)return this.currentDropElement=null,!1;var u=s&&s.accept;u?(this.currentDropElement=a.getElement(),o.preventDefault(),o.dataTransfer.dropEffect=s.effect===My.COPY?"copy":"move"):this.currentDropElement=null;var l,c,h=a.id===this.inputItem.id?this.inputItem:this.items[a.id];if((this.shouldInvalidateDropReaction||this.currentDropTarget!==h||(c=s,!(!(l=this.currentDropElementReaction)&&!c||l&&c&&l.accept===c.accept&&l.bubble===c.bubble&&l.effect===c.effect)))&&(this.shouldInvalidateDropReaction=!1,this.currentDropTarget&&(this.currentDropTargets.forEach((function(e){return e.dropTarget=!1})),this.currentDropTargets=[],this.currentDropPromise&&(this.currentDropPromise.cancel(),this.currentDropPromise=null)),this.currentDropTarget=h,this.currentDropElementReaction=s,u)){if(this.currentDropTarget&&(this.currentDropTarget.dropTarget=!0,this.currentDropTargets.push(this.currentDropTarget)),s.bubble===Cy.BUBBLE_DOWN)for(var d,f=a.getNavigator();d=f.next();)(r=this.items[d.id])&&(r.dropTarget=!0,this.currentDropTargets.push(r));s.autoExpand&&(this.currentDropPromise=J.g3.timeout(500).then((function(){return i.context.tree.expand(i.currentDropElement)})).then((function(){return i.shouldInvalidateDropReaction=!0})))}return!0},t.prototype.onDrop=function(e){if(this.currentDropElement){var t=new qt(e);t.preventDefault(),this.currentDragAndDropData.update(t),this.context.dnd.drop(this.context.tree,this.currentDragAndDropData,this.currentDropElement,t),this.onDragEnd(e)}this.cancelDragAndDropScrollInterval()},t.prototype.onDragEnd=function(e){this.currentDropTarget&&(this.currentDropTargets.forEach((function(e){return e.dropTarget=!1})),this.currentDropTargets=[]),this.currentDropPromise&&(this.currentDropPromise.cancel(),this.currentDropPromise=null),this.cancelDragAndDropScrollInterval(),this.currentDragAndDropData=null,t.currentExternalDragAndDropData=null,this.currentDropElement=null,this.currentDropTarget=null,this.dragAndDropMouseY=null},t.prototype.onFocus=function(){this.context.options.alwaysFocused||sn(this.domNode,"focused"),this._onDOMFocus.fire()},t.prototype.onBlur=function(){this.context.options.alwaysFocused||an(this.domNode,"focused"),this.domNode.removeAttribute("aria-activedescendant"),this._onDOMBlur.fire()},t.prototype.onMsPointerDown=function(e){if(this.msGesture){var t=e.pointerType;t!==(e.MSPOINTER_TYPE_MOUSE||"mouse")?t===(e.MSPOINTER_TYPE_TOUCH||"touch")&&(this.lastPointerType="touch",e.stopPropagation(),e.preventDefault(),this.msGesture.addPointer(e.pointerId)):this.lastPointerType="mouse"}},t.prototype.onThrottledMsGestureChange=function(e){this.scrollTop-=e.translationY},t.prototype.onMsGestureTap=function(e){e.initialTarget=document.elementFromPoint(e.clientX,e.clientY),this.onTap(e)},t.prototype.insertItemInDOM=function(e){var t=null,n=this.itemAfter(e);n&&n.element&&(t=n.element),e.insertInDOM(this.rowsContainer,t)},t.prototype.removeItemFromDOM=function(e){e&&e.removeFromDOM()},t.prototype.shouldBeRendered=function(e){return e.topthis.lastRenderTop},t.prototype.getItemAround=function(e){var n=this.inputItem;do{if(e[t.BINDING]&&(n=e[t.BINDING]),e===this.wrapper||e===this.domNode)return n;if(e===document.body)return null}while(e=e.parentElement)},t.prototype.releaseModel=function(){this.model&&(this.modelListeners=I.AS(this.modelListeners),this.model=null)},t.prototype.dispose=function(){var t=this;this.scrollableElement.dispose(),this.releaseModel(),this.modelListeners=null,this.viewListeners=I.AS(this.viewListeners),this._onDOMFocus.dispose(),this._onDOMBlur.dispose(),this.domNode.parentNode&&this.domNode.parentNode.removeChild(this.domNode),this.domNode=null,this.items&&(Object.keys(this.items).forEach((function(e){return t.items[e].removeFromDOM()})),this.items=null),this.context.cache&&(this.context.cache.dispose(),this.context.cache=null),e.prototype.dispose.call(this)},t.BINDING="monaco-tree-row",t.LOADING_DECORATION_DELAY=800,t.counter=0,t.currentExternalDragAndDropData=null,t}(Ty),Vy=function(e,t,n){if(void 0===n&&(n={}),this.tree=e,this.configuration=t,this.options=n,!t.dataSource)throw new Error("You must provide a Data Source to the tree.");this.dataSource=t.dataSource,this.renderer=t.renderer,this.controller=t.controller||new sy({clickBehavior:ty.ON_MOUSE_UP,keyboardSupport:"boolean"!=typeof n.keyboardSupport||n.keyboardSupport}),this.dnd=t.dnd||new ay,this.filter=t.filter||new uy,this.sorter=t.sorter||null,this.accessibilityProvider=t.accessibilityProvider||new ly,this.styler=t.styler||null},Uy={listFocusBackground:Go.fromHex("#073655"),listActiveSelectionBackground:Go.fromHex("#0E639C"),listActiveSelectionForeground:Go.fromHex("#FFFFFF"),listFocusAndSelectionBackground:Go.fromHex("#094771"),listFocusAndSelectionForeground:Go.fromHex("#FFFFFF"),listInactiveSelectionBackground:Go.fromHex("#3F3F46"),listHoverBackground:Go.fromHex("#2A2D2E"),listDropBackground:Go.fromHex("#383B3D")},Yy=function(){function e(e,t,n){void 0===n&&(n={}),this._onDidChangeFocus=new X.Wj,this.onDidChangeFocus=this._onDidChangeFocus.event,this._onDidChangeSelection=new X.Wj,this.onDidChangeSelection=this._onDidChangeSelection.event,this._onHighlightChange=new X.Wj,this._onDidExpandItem=new X.Wj,this._onDidCollapseItem=new X.Wj,this._onDispose=new X.vl,this.onDidDispose=this._onDispose.event,this.container=e,(0,ri.co)(n,Uy,!1),n.twistiePixels="number"==typeof n.twistiePixels?n.twistiePixels:32,n.showTwistie=!1!==n.showTwistie,n.indentPixels="number"==typeof n.indentPixels?n.indentPixels:12,n.alwaysFocused=!0===n.alwaysFocused,n.useShadows=!1!==n.useShadows,n.paddingOnRow=!1!==n.paddingOnRow,n.showLoading=!1!==n.showLoading,this.context=new Vy(this,t,n),this.model=new yy(this.context),this.view=new Hy(this.context,this.container),this.view.setModel(this.model),this._onDidChangeFocus.input=this.model.onDidFocus,this._onDidChangeSelection.input=this.model.onDidSelect,this._onHighlightChange.input=this.model.onDidHighlight,this._onDidExpandItem.input=this.model.onDidExpandItem,this._onDidCollapseItem.input=this.model.onDidCollapseItem}return e.prototype.style=function(e){this.view.applyStyles(e)},Object.defineProperty(e.prototype,"onDidFocus",{get:function(){return this.view&&this.view.onDOMFocus},enumerable:!0,configurable:!0}),e.prototype.getHTMLElement=function(){return this.view.getHTMLElement()},e.prototype.layout=function(e,t){this.view.layout(e,t)},e.prototype.domFocus=function(){this.view.focus()},e.prototype.isDOMFocused=function(){return this.view.isFocused()},e.prototype.domBlur=function(){this.view.blur()},e.prototype.setInput=function(e){return this.model.setInput(e)},e.prototype.getInput=function(){return this.model.getInput()},e.prototype.refresh=function(e,t){return void 0===e&&(e=null),void 0===t&&(t=!0),this.model.refresh(e,t)},e.prototype.expand=function(e){return this.model.expand(e)},e.prototype.collapse=function(e,t){return void 0===t&&(t=!1),this.model.collapse(e,t)},e.prototype.toggleExpansion=function(e,t){return void 0===t&&(t=!1),this.model.toggleExpansion(e,t)},e.prototype.isExpanded=function(e){return this.model.isExpanded(e)},e.prototype.reveal=function(e,t){return void 0===t&&(t=null),this.model.reveal(e,t)},e.prototype.getHighlight=function(){return this.model.getHighlight()},e.prototype.clearHighlight=function(e){this.model.setHighlight(null,e)},e.prototype.setSelection=function(e,t){this.model.setSelection(e,t)},e.prototype.getSelection=function(){return this.model.getSelection()},e.prototype.clearSelection=function(e){this.model.setSelection([],e)},e.prototype.setFocus=function(e,t){this.model.setFocus(e,t)},e.prototype.getFocus=function(){return this.model.getFocus()},e.prototype.focusNext=function(e,t){this.model.focusNext(e,t)},e.prototype.focusPrevious=function(e,t){this.model.focusPrevious(e,t)},e.prototype.focusParent=function(e){this.model.focusParent(e)},e.prototype.focusFirstChild=function(e){this.model.focusFirstChild(e)},e.prototype.focusFirst=function(e,t){this.model.focusFirst(e,t)},e.prototype.focusNth=function(e,t){this.model.focusNth(e,t)},e.prototype.focusLast=function(e,t){this.model.focusLast(e,t)},e.prototype.focusNextPage=function(e){this.view.focusNextPage(e)},e.prototype.focusPreviousPage=function(e){this.view.focusPreviousPage(e)},e.prototype.clearFocus=function(e){this.model.setFocus(null,e)},e.prototype.dispose=function(){this._onDispose.fire(),null!==this.model&&(this.model.dispose(),this.model=null),null!==this.view&&(this.view.dispose(),this.view=null),this._onDidChangeFocus.dispose(),this._onDidChangeSelection.dispose(),this._onHighlightChange.dispose(),this._onDidExpandItem.dispose(),this._onDidCollapseItem.dispose(),this._onDispose.dispose()},e}(),Zy=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Gy=Object.assign||function(e){for(var t,n=1,i=arguments.length;n=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},qy=function(e,t){return function(n,i){t(n,i,e)}},Ky=(0,N.u1)("listService"),Jy=function(){function e(e){this.lists=[],this._lastFocusedWidget=void 0}return Object.defineProperty(e.prototype,"lastFocusedList",{get:function(){return this._lastFocusedWidget},enumerable:!0,configurable:!0}),e.prototype.register=function(e,t){var n=this;if(this.lists.some((function(t){return t.widget===e})))throw new Error("Cannot register the same widget multiple times");var i={widget:e,extraContextKeys:t};return this.lists.push(i),e.isDOMFocused()&&(this._lastFocusedWidget=e),(0,I.qE)([e.onDidFocus((function(){return n._lastFocusedWidget=e})),(0,I.s)((function(){return n.lists.splice(n.lists.indexOf(i),1)})),e.onDidDispose((function(){n.lists=n.lists.filter((function(e){return e!==i})),n._lastFocusedWidget===e&&(n._lastFocusedWidget=void 0)}))])},Qy([qy(0,he)],e)}(),Xy=new ce("listFocus",!0),$y=new ce("listSupportsMultiselect",!0),eb=new ce("listHasSelectionOrFocus",!1),tb=new ce("listDoubleSelection",!1),nb=new ce("listMultiSelection",!1),ib="workbench.list.multiSelectModifier",ob="workbench.list.openMode",rb="workbench.tree.horizontalScrolling";function sb(e){return"alt"===e.getValue(ib)}function ab(e){return"doubleClick"!==e.getValue(ob)}var ub=function(e){function t(t,n,i,o,r,s,a,u){var l=this,c=function(e,t){return e.controller||(e.controller=t.createInstance(lb,{})),e.styler||(e.styler=new cy((Py||(Py=Wn()),Py))),e}(n,a),h=u.getValue(rb)?gr.XR.Auto:gr.XR.Hidden,d=Gy({horizontalScrollMode:h,keyboardSupport:!1},Xv(s.getTheme(),iy),i);return(l=e.call(this,t,c,d)||this).disposables=[],l.contextKeyService=function(e,t){var n=e.createScoped(t.getHTMLElement());return Xy.bindTo(n),n}(o,l),$y.bindTo(l.contextKeyService),l.listHasSelectionOrFocus=eb.bindTo(l.contextKeyService),l.listDoubleSelection=tb.bindTo(l.contextKeyService),l.listMultiSelection=nb.bindTo(l.contextKeyService),l._openOnSingleClick=ab(u),l._useAltAsMultipleSelectionModifier=sb(u),l.disposables.push(l.contextKeyService,r.register(l),ey(l,s)),l.disposables.push(l.onDidChangeSelection((function(){var e=l.getSelection(),t=l.getFocus();l.listHasSelectionOrFocus.set(e&&e.length>0||!!t),l.listDoubleSelection.set(e&&2===e.length),l.listMultiSelection.set(e&&e.length>1)}))),l.disposables.push(l.onDidChangeFocus((function(){var e=l.getSelection(),t=l.getFocus();l.listHasSelectionOrFocus.set(e&&e.length>0||!!t)}))),l.disposables.push(u.onDidChangeConfiguration((function(e){e.affectsConfiguration(ob)&&(l._openOnSingleClick=ab(u)),e.affectsConfiguration(ib)&&(l._useAltAsMultipleSelectionModifier=sb(u))}))),l}return Zy(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this),this.disposables=(0,I.AS)(this.disposables)},Qy([qy(3,he),qy(4,Ky),qy(5,Lr),qy(6,N._Y),qy(7,uf)],t)}(Yy),lb=function(e){function t(t,n){var i=e.call(this,function(e){return"boolean"!=typeof e.keyboardSupport&&(e.keyboardSupport=!1),"number"!=typeof e.clickBehavior&&(e.clickBehavior=ty.ON_MOUSE_DOWN),e}(t))||this;return i.configurationService=n,i.disposables=[],(0,w.z)(t.openMode)&&(i.setOpenMode(i.getOpenModeSetting()),i.registerListeners()),i}return Zy(t,e),t.prototype.registerListeners=function(){var e=this;this.disposables.push(this.configurationService.onDidChangeConfiguration((function(t){t.affectsConfiguration(ob)&&e.setOpenMode(e.getOpenModeSetting())})))},t.prototype.getOpenModeSetting=function(){return ab(this.configurationService)?ny.SINGLE_CLICK:ny.DOUBLE_CLICK},t.prototype.dispose=function(){this.disposables=(0,I.AS)(this.disposables)},Qy([qy(1,uf)],t)}(sy);U.as(li).registerConfiguration({id:"workbench",order:7,title:(0,o.k)("workbenchConfigurationTitle","Workbench"),type:"object",properties:(Ry={},Ry[ib]={type:"string",enum:["ctrlCmd","alt"],enumDescriptions:[(0,o.k)("multiSelectModifier.ctrlCmd","Maps to `Control` on Windows and Linux and to `Command` on macOS."),(0,o.k)("multiSelectModifier.alt","Maps to `Alt` on Windows and Linux and to `Option` on macOS.")],default:"ctrlCmd",description:(0,o.k)({key:"multiSelectModifier",comment:["- `ctrlCmd` refers to a value the setting can take and should not be localized.","- `Control` and `Command` refer to the modifier keys Ctrl or Cmd on the keyboard and can be localized."]},"The modifier to be used to add an item in trees and lists to a multi-selection with the mouse (for example in the explorer, open editors and scm view). The 'Open to Side' mouse gestures - if supported - will adapt such that they do not conflict with the multiselect modifier.")},Ry[ob]={type:"string",enum:["singleClick","doubleClick"],default:"singleClick",description:(0,o.k)({key:"openModeModifier",comment:["`singleClick` and `doubleClick` refers to a value the setting can take and should not be localized."]},"Controls how to open items in trees and lists using the mouse (if supported). For parents with children in trees, this setting will control if a single click expands the parent or a double click. Note that some trees and lists might choose to ignore this setting if it is not applicable. ")},Ry[rb]={type:"boolean",default:!1,description:(0,o.k)("horizontalScrolling setting","Controls whether trees support horizontal scrolling in the workbench.")},Ry)});var cb=(0,N.u1)("uriDisplay"),hb=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),db=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},fb=function(e,t){return function(n,i){t(n,i,e)}},pb=function(){function e(e,t){var n=this;this._editor=e,this._model=t,this._decorations=new Map,this._decorationIgnoreSet=new Set,this._callOnDispose=[],this._callOnModelChange=[],this._callOnDispose.push(this._editor.onDidChangeModel((function(){return n._onModelChanged()}))),this._onModelChanged()}return e.prototype.dispose=function(){this._callOnModelChange=(0,I.AS)(this._callOnModelChange),this._callOnDispose=(0,I.AS)(this._callOnDispose),this.removeDecorations()},e.prototype._onModelChanged=function(){this._callOnModelChange=(0,I.AS)(this._callOnModelChange);var e=this._editor.getModel();if(e)for(var t=0,n=this._model.groups;t1?this.badge.setTitleFormat(o.k("referencesCount","{0} references",t)):this.badge.setTitleFormat(o.k("referenceCount","{0} reference",t))},db([fb(1,Ev),fb(2,(0,N.lq)(oy)),fb(3,Lr)],e)}(),yb=function(){function e(e){var t=document.createElement("div");this.before=document.createElement("span"),this.inside=document.createElement("span"),this.after=document.createElement("span"),sn(this.inside,"referenceMatch"),sn(t,"reference"),t.appendChild(this.before),t.appendChild(this.inside),t.appendChild(this.after),e.appendChild(t)}return e.prototype.set=function(e){var t=e.parent.preview.preview(e.range),n=t.before,i=t.inside,o=t.after;this.before.innerHTML=p.escape(n),this.inside.innerHTML=p.escape(i),this.after.innerHTML=p.escape(o)},e}(),bb=function(){function e(e,t,n){this._contextService=e,this._themeService=t,this._environmentService=n}return e.prototype.getHeight=function(e,t){return 23},e.prototype.getTemplateId=function(t,n){if(n instanceof qv)return e._ids.FileReferences;if(n instanceof Gv)return e._ids.OneReference;throw n},e.prototype.renderTemplate=function(t,n,i){if(n===e._ids.FileReferences)return new vb(i,this._contextService,this._environmentService,this._themeService);if(n===e._ids.OneReference)return new yb(i);throw n},e.prototype.renderElement=function(e,t,n,i){if(t instanceof qv)i.set(t);else{if(!(t instanceof Gv))throw n;i.set(t)}},e.prototype.disposeTemplate=function(e,t,n){n instanceof vb&&n.dispose()},e._ids={FileReferences:"FileReferences",OneReference:"OneReference"},e=db([fb(0,Ev),fb(1,Lr),fb(2,(0,N.lq)(oy))],e)}(),_b=function(){function e(){}return e.prototype.getAriaLabel=function(e,t){return t instanceof qv||t instanceof Gv?t.getAriaMessage():void 0},e}(),wb=function(){function e(e,t){var n,i=this;this._disposables=[],this._onDidChangePercentages=new X.vl,this._ratio=t,this._sash=new Eh(e,{getVerticalSashLeft:function(){return i._width*i._ratio},getVerticalSashHeight:function(){return i._height}}),this._disposables.push(this._sash.onDidStart((function(e){n=e.startX-i._width*i.ratio}))),this._disposables.push(this._sash.onDidChange((function(e){var t=e.currentX-n;t>20&&t+200?e.children[0]:void 0},t.prototype._revealReference=function(e,t){return n=this,i=void 0,a=function(){var n,i=this;return function(e,t){var n,i,o,r,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return r={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function a(r){return function(a){return function(r){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,i&&(o=2&r[0]?i.return:r[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,r[1])).done)return o;switch(i=0,o&&(r=[2&r[0],o.value]),r[0]){case 0:case 1:o=r;break;case 4:return s.label++,{value:r[1],done:!1};case 5:s.label++,i=r[1],r=[0];continue;case 7:r=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==r[0]&&2!==r[0])){s=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1] .monaco-tree-row.selected:not(.highlighted) { background-color: "+l+"; }");var c=e.getColor(Eb);c&&t.addRule(".monaco-editor .reference-zone-widget .ref-tree .monaco-tree.focused .monaco-tree-rows > .monaco-tree-row.selected:not(.highlighted) { color: "+c+" !important; }");var h=e.getColor(Ab);h&&t.addRule(".monaco-editor .reference-zone-widget .preview .monaco-editor .monaco-editor-background,.monaco-editor .reference-zone-widget .preview .monaco-editor .inputarea.ime-input {\tbackground-color: "+h+";}");var d=e.getColor(jb);d&&t.addRule(".monaco-editor .reference-zone-widget .preview .monaco-editor .margin {\tbackground-color: "+d+";}")}));var zb=function(e,t){return function(n,i){t(n,i,e)}},Wb=new ce("referenceSearchVisible",!1),Fb=function(){function e(e,t,n,i,o,r,s,a){this._defaultTreeKeyboardSupport=e,this._editorService=i,this._notificationService=o,this._instantiationService=r,this._storageService=s,this._configurationService=a,this._requestIdPool=0,this._disposables=[],this._ignoreModelChangeEvent=!1,this._editor=t,this._referenceSearchVisible=Wb.bindTo(n)}return e.get=function(t){return t.getContribution(e.ID)},e.prototype.getId=function(){return e.ID},e.prototype.dispose=function(){this._referenceSearchVisible.reset(),(0,I.AS)(this._disposables),(0,I.AS)(this._widget),(0,I.AS)(this._model),this._widget=null,this._model=null,this._editor=null},e.prototype.toggleWidget=function(e,t,n){var i,s=this;if(this._widget&&(i=this._widget.position),this.closeWidget(),i&&e.containsPosition(i))return null;this._referenceSearchVisible.set(!0),this._disposables.push(this._editor.onDidChangeModelLanguage((function(){s.closeWidget()}))),this._disposables.push(this._editor.onDidChangeModel((function(){s._ignoreModelChangeEvent||s.closeWidget()})));var a="peekViewLayout",u=JSON.parse(this._storageService.get(a,void 0,"{}"));this._widget=this._instantiationService.createInstance(Cb,this._editor,this._defaultTreeKeyboardSupport,u),this._widget.setTitle(o.k("labelLoading","Loading...")),this._widget.show(e),this._disposables.push(this._widget.onDidClose((function(){t.cancel(),s._storageService.store(a,JSON.stringify(s._widget.layoutData)),s._widget=null,s.closeWidget()}))),this._disposables.push(this._widget.onDidSelectReference((function(e){var t=e.element,i=e.kind;switch(i){case"open":if("editor"===e.source&&s._configurationService.getValue("editor.stablePeek"))break;case"side":s.openReference(t,"side"===i);break;case"goto":n.onGoto?n.onGoto(t):s._gotoReference(t)}})));var l=++this._requestIdPool;t.then((function(t){if(l===s._requestIdPool&&s._widget)return s._model&&s._model.dispose(),s._model=t,s._widget.setModel(s._model).then((function(){if(s._widget){s._widget.setMetaTitle(n.getMetaTitle(s._model));var t=s._editor.getModel().uri,i=new r.y(e.startLineNumber,e.startColumn),o=s._model.nearestReference(t,i);if(o)return s._widget.setSelection(o)}}))}),(function(e){s._notificationService.error(e)}))},e.prototype.goToNextOrPreviousReference=function(e){return t=this,n=void 0,o=function(){var t,n,i;return function(e,t){var n,i,o,r,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return r={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function a(r){return function(a){return function(r){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,i&&(o=2&r[0]?i.return:r[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,r[1])).done)return o;switch(i=0,o&&(r=[2&r[0],o.value]),r[0]){case 0:case 1:o=r;break;case 4:return s.label++,{value:r[1],done:!1};case 5:s.label++,i=r[1],r=[0];continue;case 7:r=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==r[0]&&2!==r[0])){s=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([zb(2,he),zb(3,Ce),zb(4,Cr),zb(5,N._Y),zb(6,dp),zb(7,uf)],e)}(),Bb=(n(7445),function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}()),Hb=function(e){function t(n,i){var o=e.call(this)||this;return o._messageListeners=[],o._editor=n,o._visible=t.MESSAGE_VISIBLE.bindTo(i),o._register(o._editor.onDidAttemptReadOnlyEdit((function(){return o._onDidAttemptReadOnlyEdit()}))),o}return Bb(t,e),t.get=function(e){return e.getContribution(t._id)},t.prototype.getId=function(){return t._id},t.prototype.dispose=function(){e.prototype.dispose.call(this),this._visible.reset()},t.prototype.showMessage=function(e,t){var n,i=this;Ep(e),this._visible.set(!0),(0,I.AS)(this._messageWidget),this._messageListeners=(0,I.AS)(this._messageListeners),this._messageWidget=new Vb(this._editor,t,e),this._messageListeners.push(this._editor.onDidBlurEditorText((function(){return i.closeMessage()}))),this._messageListeners.push(this._editor.onDidChangeCursorPosition((function(){return i.closeMessage()}))),this._messageListeners.push(this._editor.onDidDispose((function(){return i.closeMessage()}))),this._messageListeners.push(this._editor.onDidChangeModel((function(){return i.closeMessage()}))),this._messageListeners.push(function(e,t){for(var n=[],i=2;i=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([(n=1,i=he,function(e,t){i(e,t,n)})],t);var n,i}(I.jG);Te(new(Ne.bindToContribution(Hb.get))({id:"leaveEditorMessage",precondition:Hb.MESSAGE_VISIBLE,handler:function(e){return e.closeMessage()},kbOpts:{weight:130,primary:9}}));var Vb=function(){function e(e,t,n){var i=t.lineNumber,o=t.column;this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this._editor=e,this._editor.revealLinesInCenterIfOutsideViewport(i,i,0),this._position={lineNumber:i,column:o-1},this._domNode=document.createElement("div"),this._domNode.classList.add("monaco-editor-overlaymessage");var r=document.createElement("div");r.classList.add("message"),r.textContent=n,this._domNode.appendChild(r);var s=document.createElement("div");s.classList.add("anchor"),this._domNode.appendChild(s),this._editor.addContentWidget(this),this._domNode.classList.add("fadeIn")}return e.fadeOut=function(e){var t,n=function(){e.dispose(),clearTimeout(t),e.getDomNode().removeEventListener("animationend",n)};return t=setTimeout(n,110),e.getDomNode().addEventListener("animationend",n),e.getDomNode().classList.add("fadeOut"),{dispose:n}},e.prototype.dispose=function(){this._editor.removeContentWidget(this)},e.prototype.getId=function(){return"messageoverlay"},e.prototype.getDomNode=function(){return this._domNode},e.prototype.getPosition=function(){return{position:this._position,preference:[ou.ABOVE]}},e}();Ae(Hb),Tr((function(e,t){var n=e.getColor(cs);if(n){var i=e.type===Nr?2:1;t.addRule(".monaco-editor .monaco-editor-overlaymessage .anchor { border-top-color: "+n+"; }"),t.addRule(".monaco-editor .monaco-editor-overlaymessage .message { border: "+i+"px solid "+n+"; }")}var o=e.getColor(ls);o&&t.addRule(".monaco-editor .monaco-editor-overlaymessage .message { background-color: "+o+"; }")}));var Ub=(0,N.u1)("progressService"),Yb=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Zb=function(e,t,n,i){void 0===e&&(e=!1),void 0===t&&(t=!1),void 0===n&&(n=!0),void 0===i&&(i=!0),this.openToSide=e,this.openInPeek=t,this.filterCurrent=n,this.showMessage=i},Gb=function(e){function t(t,n){var i=e.call(this,n)||this;return i._configuration=t,i}return Yb(t,e),t.prototype.run=function(e,t){var n=this,i=e.get(Cr),o=e.get(Ce),r=e.get(Ub),a=t.getModel(),u=t.getPosition(),l=this._getDeclarationsAtPosition(a,u).then((function(e){if(!a.isDisposed()&&t.getModel()===a){for(var i=-1,r=[],l=0;l1&&o.k("meta.title"," – {0} definitions",e.references.length)},t.prototype._onResult=function(e,t,n){var i=this;if(Ep(n.getAriaMessage()),this._configuration.openInPeek)this._openInPeek(e,t,n);else{var o=n.nearestReference(t.getModel().uri,t.getPosition());this._openReference(t,e,o,this._configuration.openToSide).then((function(t){t&&n.references.length>1?i._openInPeek(e,t,n):n.dispose()}))}},t.prototype._openReference=function(e,t,n,i){var o=n.uri,r=n.range;return t.openCodeEditor({resource:o,options:{selection:s.Q.collapseToStart(r),revealIfOpened:!0,revealInCenterIfOutsideViewport:!0}},e,i)},t.prototype._openInPeek=function(e,t,n){var i=this,o=Fb.get(t);o?o.toggleWidget(t.getSelection(),ft((function(e){return Promise.resolve(n)})),{getMetaTitle:function(e){return i._getMetaTitle(e)},onGoto:function(n){return o.closeWidget(),i._openReference(t,e,n,!1)}}):n.dispose()},t}(xe),Qb=B.HZ?2118:70,qb=function(e){function t(){return e.call(this,new Zb,{id:t.ID,label:o.k("actions.goToDecl.label","Go to Definition"),alias:"Go to Definition",precondition:ne.and(Oe.hasDefinitionProvider,Oe.isInEmbeddedEditor.toNegated()),kbOpts:{kbExpr:Oe.editorTextFocus,primary:Qb,weight:100},menuOpts:{group:"navigation",order:1.1}})||this}return Yb(t,e),t.ID="editor.action.goToDeclaration",t}(Gb),Kb=function(e){function t(){return e.call(this,new Zb(!0),{id:t.ID,label:o.k("actions.goToDeclToSide.label","Open Definition to the Side"),alias:"Open Definition to the Side",precondition:ne.and(Oe.hasDefinitionProvider,Oe.isInEmbeddedEditor.toNegated()),kbOpts:{kbExpr:Oe.editorTextFocus,primary:O(2089,Qb),weight:100}})||this}return Yb(t,e),t.ID="editor.action.openDeclarationToTheSide",t}(Gb),Jb=function(e){function t(){return e.call(this,new Zb(void 0,!0,!1),{id:"editor.action.previewDeclaration",label:o.k("actions.previewDecl.label","Peek Definition"),alias:"Peek Definition",precondition:ne.and(Oe.hasDefinitionProvider,Av.notInPeekEditor,Oe.isInEmbeddedEditor.toNegated()),kbOpts:{kbExpr:Oe.editorTextFocus,primary:582,linux:{primary:3140},weight:100},menuOpts:{group:"navigation",order:1.2}})||this}return Yb(t,e),t}(Gb),Xb=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Yb(t,e),t.prototype._getDeclarationsAtPosition=function(e,t){return fv(e,t)},t.prototype._getNoResultFoundMessage=function(e){return e&&e.word?o.k("goToImplementation.noResultWord","No implementation found for '{0}'",e.word):o.k("goToImplementation.generic.noResults","No implementation found")},t.prototype._getMetaTitle=function(e){return e.references.length>1&&o.k("meta.implementations.title"," – {0} implementations",e.references.length)},t}(Gb),$b=function(e){function t(){return e.call(this,new Zb,{id:t.ID,label:o.k("actions.goToImplementation.label","Go to Implementation"),alias:"Go to Implementation",precondition:ne.and(Oe.hasImplementationProvider,Oe.isInEmbeddedEditor.toNegated()),kbOpts:{kbExpr:Oe.editorTextFocus,primary:2118,weight:100}})||this}return Yb(t,e),t.ID="editor.action.goToImplementation",t}(Xb),e_=function(e){function t(){return e.call(this,new Zb(!1,!0,!1),{id:t.ID,label:o.k("actions.peekImplementation.label","Peek Implementation"),alias:"Peek Implementation",precondition:ne.and(Oe.hasImplementationProvider,Oe.isInEmbeddedEditor.toNegated()),kbOpts:{kbExpr:Oe.editorTextFocus,primary:3142,weight:100}})||this}return Yb(t,e),t.ID="editor.action.peekImplementation",t}(Xb),t_=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Yb(t,e),t.prototype._getDeclarationsAtPosition=function(e,t){return pv(e,t)},t.prototype._getNoResultFoundMessage=function(e){return e&&e.word?o.k("goToTypeDefinition.noResultWord","No type definition found for '{0}'",e.word):o.k("goToTypeDefinition.generic.noResults","No type definition found")},t.prototype._getMetaTitle=function(e){return e.references.length>1&&o.k("meta.typeDefinitions.title"," – {0} type definitions",e.references.length)},t}(Gb),n_=function(e){function t(){return e.call(this,new Zb,{id:t.ID,label:o.k("actions.goToTypeDefinition.label","Go to Type Definition"),alias:"Go to Type Definition",precondition:ne.and(Oe.hasTypeDefinitionProvider,Oe.isInEmbeddedEditor.toNegated()),kbOpts:{kbExpr:Oe.editorTextFocus,primary:0,weight:100},menuOpts:{group:"navigation",order:1.4}})||this}return Yb(t,e),t.ID="editor.action.goToTypeDefinition",t}(t_),i_=function(e){function t(){return e.call(this,new Zb(!1,!0,!1),{id:t.ID,label:o.k("actions.peekTypeDefinition.label","Peek Type Definition"),alias:"Peek Type Definition",precondition:ne.and(Oe.hasTypeDefinitionProvider,Oe.isInEmbeddedEditor.toNegated()),kbOpts:{kbExpr:Oe.editorTextFocus,primary:0,weight:100}})||this}return Yb(t,e),t.ID="editor.action.peekTypeDefinition",t}(t_);Ee(qb),Ee(Kb),Ee(Jb),Ee($b),Ee(e_),Ee(n_),Ee(i_),n(9114);var o_=(0,N.u1)("modeService"),r_=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();function s_(e,t){return!!e[t]}var a_=function(e,t){this.target=e.target,this.hasTriggerModifier=s_(e.event,t.triggerModifier),this.hasSideBySideModifier=s_(e.event,t.triggerSideBySideModifier),this.isNoneOrSingleMouseDown=xt||e.event.detail<=1},u_=function(e,t){this.keyCodeIsTriggerKey=e.keyCode===t.triggerKey,this.keyCodeIsSideBySideKey=e.keyCode===t.triggerSideBySideKey,this.hasTriggerModifier=s_(e,t.triggerModifier)},l_=function(){function e(e,t,n,i){this.triggerKey=e,this.triggerModifier=t,this.triggerSideBySideKey=n,this.triggerSideBySideModifier=i}return e.prototype.equals=function(e){return this.triggerKey===e.triggerKey&&this.triggerModifier===e.triggerModifier&&this.triggerSideBySideKey===e.triggerSideBySideKey&&this.triggerSideBySideModifier===e.triggerSideBySideModifier},e}();function c_(e){return"altKey"===e?B.zx?new l_(57,"metaKey",6,"altKey"):new l_(5,"ctrlKey",6,"altKey"):B.zx?new l_(6,"altKey",57,"metaKey"):new l_(6,"altKey",5,"ctrlKey")}var h_,d_,f_,p_=function(e){function t(t){var n=e.call(this)||this;return n._onMouseMoveOrRelevantKeyDown=n._register(new X.vl),n.onMouseMoveOrRelevantKeyDown=n._onMouseMoveOrRelevantKeyDown.event,n._onExecute=n._register(new X.vl),n.onExecute=n._onExecute.event,n._onCancel=n._register(new X.vl),n.onCancel=n._onCancel.event,n._editor=t,n._opts=c_(n._editor.getConfiguration().multiCursorModifier),n.lastMouseMoveEvent=null,n.hasTriggerKeyOnMouseDown=!1,n._register(n._editor.onDidChangeConfiguration((function(e){if(e.multiCursorModifier){var t=c_(n._editor.getConfiguration().multiCursorModifier);if(n._opts.equals(t))return;n._opts=t,n.lastMouseMoveEvent=null,n.hasTriggerKeyOnMouseDown=!1,n._onCancel.fire()}}))),n._register(n._editor.onMouseMove((function(e){return n.onEditorMouseMove(new a_(e,n._opts))}))),n._register(n._editor.onMouseDown((function(e){return n.onEditorMouseDown(new a_(e,n._opts))}))),n._register(n._editor.onMouseUp((function(e){return n.onEditorMouseUp(new a_(e,n._opts))}))),n._register(n._editor.onKeyDown((function(e){return n.onEditorKeyDown(new u_(e,n._opts))}))),n._register(n._editor.onKeyUp((function(e){return n.onEditorKeyUp(new u_(e,n._opts))}))),n._register(n._editor.onMouseDrag((function(){return n.resetHandler()}))),n._register(n._editor.onDidChangeCursorSelection((function(e){return n.onDidChangeCursorSelection(e)}))),n._register(n._editor.onDidChangeModel((function(e){return n.resetHandler()}))),n._register(n._editor.onDidChangeModelContent((function(){return n.resetHandler()}))),n._register(n._editor.onDidScrollChange((function(e){(e.scrollTopChanged||e.scrollLeftChanged)&&n.resetHandler()}))),n}return r_(t,e),t.prototype.onDidChangeCursorSelection=function(e){e.selection&&e.selection.startColumn!==e.selection.endColumn&&this.resetHandler()},t.prototype.onEditorMouseMove=function(e){this.lastMouseMoveEvent=e,this._onMouseMoveOrRelevantKeyDown.fire([e,null])},t.prototype.onEditorMouseDown=function(e){this.hasTriggerKeyOnMouseDown=e.hasTriggerModifier},t.prototype.onEditorMouseUp=function(e){this.hasTriggerKeyOnMouseDown&&this._onExecute.fire(e)},t.prototype.onEditorKeyDown=function(e){this.lastMouseMoveEvent&&(e.keyCodeIsTriggerKey||e.keyCodeIsSideBySideKey&&e.hasTriggerModifier)?this._onMouseMoveOrRelevantKeyDown.fire([this.lastMouseMoveEvent,e]):e.hasTriggerModifier&&this._onCancel.fire()},t.prototype.onEditorKeyUp=function(e){e.keyCodeIsTriggerKey&&this._onCancel.fire()},t.prototype.resetHandler=function(){this.lastMouseMoveEvent=null,this.hasTriggerKeyOnMouseDown=!1,this._onCancel.fire()},t}(I.jG),g_=function(e,t){return function(n,i){t(n,i,e)}},m_=function(){function e(e,t,n){var i=this;this.textModelResolverService=t,this.modeService=n,this.toUnhook=[],this.decorations=[],this.editor=e,this.throttler=new gt;var o=new p_(e);this.toUnhook.push(o),this.toUnhook.push(o.onMouseMoveOrRelevantKeyDown((function(e){var t=e[0],n=e[1];i.startFindDefinition(t,n)}))),this.toUnhook.push(o.onExecute((function(e){i.isEnabled(e)&&i.gotoDefinition(e.target,e.hasSideBySideModifier).done((function(){i.removeDecorations()}),(function(e){i.removeDecorations(),(0,S.dz)(e)}))}))),this.toUnhook.push(o.onCancel((function(){i.removeDecorations(),i.currentWordUnderMouse=null})))}return e.prototype.startFindDefinition=function(e,t){var n=this;if(!this.isEnabled(e,t))return this.currentWordUnderMouse=null,void this.removeDecorations();var i=e.target.position,r=i?this.editor.getModel().getWordAtPosition(i):null;if(!r)return this.currentWordUnderMouse=null,void this.removeDecorations();if(!this.currentWordUnderMouse||this.currentWordUnderMouse.startColumn!==r.startColumn||this.currentWordUnderMouse.endColumn!==r.endColumn||this.currentWordUnderMouse.word!==r.word){this.currentWordUnderMouse=r;var a=new sd(this.editor,15);this.throttler.queue((function(){return a.validate(n.editor)?n.findDefinition(e.target):J.g3.wrap(null)})).then((function(e){if(e&&e.length&&a.validate(n.editor))if(e.length>1)n.addDecoration(new s.Q(i.lineNumber,r.startColumn,i.lineNumber,r.endColumn),(new yp).appendText(o.k("multipleResults","Click to show {0} definitions.",e.length)));else{var t=e[0];if(!t.uri)return;n.textModelResolverService.createModelReference(t.uri).then((function(e){if(e.object&&e.object.textEditorModel){var o=e.object.textEditorModel,a=t.range.startLineNumber;if(0!==o.getLineMaxColumn(a)){var u,l=n.getPreviewValue(o,a);u=t.origin?s.Q.lift(t.origin):new s.Q(i.lineNumber,r.startColumn,i.lineNumber,r.endColumn),n.addDecoration(u,(new yp).appendCodeblock(n.modeService.getModeIdByFilenameOrFirstLine(o.uri.fsPath),l)),e.dispose()}else e.dispose()}else e.dispose()}))}else n.removeDecorations()})).done(void 0,S.dz)}},e.prototype.getPreviewValue=function(t,n){var i=this.getPreviewRangeBasedOnBrackets(t,n);return i.endLineNumber-i.startLineNumber>=e.MAX_SOURCE_PREVIEW_LINES&&(i=this.getPreviewRangeBasedOnIndentation(t,n)),this.stripIndentationFromPreviewRange(t,n,i)},e.prototype.stripIndentationFromPreviewRange=function(e,t,n){for(var i=e.getLineFirstNonWhitespaceColumn(t),o=t+1;oi)return new s.Q(n,1,i+1,1);u=t.findNextBracket(new r.y(h,d))}return new s.Q(n,1,i+1,1)},e.prototype.addDecoration=function(e,t){var n={range:e,options:{inlineClassName:"goto-definition-link",hoverMessage:t}};this.decorations=this.editor.deltaDecorations(this.decorations,[n])},e.prototype.removeDecorations=function(){this.decorations.length>0&&(this.decorations=this.editor.deltaDecorations(this.decorations,[]))},e.prototype.isEnabled=function(e,t){return this.editor.getModel()&&e.isNoneOrSingleMouseDown&&e.target.type===su.CONTENT_TEXT&&(e.hasTriggerModifier||t&&t.keyCodeIsTriggerKey)&&No.UU.has(this.editor.getModel())},e.prototype.findDefinition=function(e){var t=this.editor.getModel();return t?dv(t,e.position):J.g3.as(null)},e.prototype.gotoDefinition=function(e,t){var n=this;this.editor.setPosition(e.position);var i=new Gb(new Zb(t,!1,!0,!1),{alias:void 0,label:void 0,id:void 0,precondition:void 0});return this.editor.invokeWithinContext((function(e){return i.run(e,n.editor)}))},e.prototype.getId=function(){return e.ID},e.prototype.dispose=function(){this.toUnhook=(0,I.AS)(this.toUnhook)},e.ID="editor.contrib.gotodefinitionwithmouse",e.MAX_SOURCE_PREVIEW_LINES=8,e=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([g_(1,Jv),g_(2,o_)],e)}();Ae(m_),Tr((function(e,t){var n=e.getColor(ea);n&&t.addRule(".monaco-editor .goto-definition-link { color: "+n+" !important; }")})),function(e){e[e.Unnecessary=1]="Unnecessary"}(h_||(h_={})),function(e){e[e.Hint=1]="Hint",e[e.Info=2]="Info",e[e.Warning=4]="Warning",e[e.Error=8]="Error"}(d_||(d_={})),function(e){e.compare=function(e,t){return t-e};var t=Object.create(null);t[e.Error]=(0,o.k)("sev.error","Error"),t[e.Warning]=(0,o.k)("sev.warning","Warning"),t[e.Info]=(0,o.k)("sev.info","Info"),e.toString=function(e){return t[e]||""},e.fromSeverity=function(t){switch(t){case Mr.Error:return e.Error;case Mr.Warning:return e.Warning;case Mr.Info:return e.Info;case Mr.Ignore:return e.Hint}}}(d_||(d_={})),function(e){var t="";e.makeKey=function(e){var n=[t];return e.source?n.push(e.source.replace("¦","¦")):n.push(t),e.code?n.push(e.code.replace("¦","¦")):n.push(t),void 0!==e.severity&&null!==e.severity?n.push(d_.toString(e.severity)):n.push(t),e.message?n.push(e.message.replace("¦","¦")):n.push(t),void 0!==e.startLineNumber&&null!==e.startLineNumber?n.push(e.startLineNumber.toString()):n.push(t),void 0!==e.startColumn&&null!==e.startColumn?n.push(e.startColumn.toString()):n.push(t),void 0!==e.endLineNumber&&null!==e.endLineNumber?n.push(e.endLineNumber.toString()):n.push(t),void 0!==e.endColumn&&null!==e.endColumn?n.push(e.endColumn.toString()):n.push(t),n.push(t),n.join("¦")}}(f_||(f_={}));var v_=(0,N.u1)("markerService"),y_=(n(7609),function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}()),b_=function(){function e(e,t,n){var i=this;this._lines=0,this._longestLineLength=0,this._relatedDiagnostics=new WeakMap,this._disposables=[],this._editor=t;var o=document.createElement("div");o.className="descriptioncontainer",o.setAttribute("aria-live","assertive"),o.setAttribute("role","alert"),this._messageBlock=document.createElement("div"),o.appendChild(this._messageBlock),this._relatedBlock=document.createElement("div"),o.appendChild(this._relatedBlock),this._disposables.push(hn(this._relatedBlock,"click",(function(e){e.preventDefault();var t=i._relatedDiagnostics.get(e.target);t&&n(t)}))),this._scrollable=new Zc(o,{horizontal:gr.XR.Auto,vertical:gr.XR.Auto,useShadows:!1,horizontalScrollbarSize:3,verticalScrollbarSize:3}),sn(this._scrollable.getDomNode(),"block"),e.appendChild(this._scrollable.getDomNode()),this._disposables.push(this._scrollable.onScroll((function(e){o.style.left="-"+e.scrollLeft+"px",o.style.top="-"+e.scrollTop+"px"}))),this._disposables.push(this._scrollable)}return e.prototype.dispose=function(){(0,I.AS)(this._disposables)},e.prototype.update=function(e){var t=e.source,n=e.message,i=e.relatedInformation;if(t){this._lines=0,this._longestLineLength=0;for(var o=new Array(t.length+3+1).join(" "),r=n.split(/\r\n|\r|\n/g),s=0;s=0?this._markers[this._nextIdx]:void 0;this._markers=e||[],this._markers.sort(E_.compareMarker),this._nextIdx=t?Math.max(-1,(0,tu.El)(this._markers,t,E_.compareMarker)):-1,this._onMarkerSetChanged.fire(this)},e.prototype.withoutWatchingEditorPosition=function(e){this._ignoreSelectionChange=!0;try{e()}finally{this._ignoreSelectionChange=!1}},e.prototype._initIdx=function(e){for(var t=!1,n=this._editor.getPosition(),i=0;i0?this._nextIdx=(this._nextIdx-1+this._markers.length)%this._markers.length:i=!0),n!==this._nextIdx){var o=this._markers[this._nextIdx];this._onCurrentMarkerChanged.fire(o)}return i},e.prototype.canNavigate=function(){return this._markers.length>0},e.prototype.findMarkerAtPosition=function(e){for(var t=0,n=this._markers;t=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([D_(1,v_),D_(2,he),D_(3,Lr),D_(4,Ce)],e)}(),E_=function(e){function t(t,n,i){var o=e.call(this,i)||this;return o._isNext=t,o._multiFile=n,o}return x_(t,e),t.prototype.run=function(e,n){var i=this,o=e.get(v_),r=e.get(Ce),s=T_.get(n);if(s){var a=s.getOrCreateModel();if(a.move(this._isNext,!this._multiFile)&&this._multiFile){var u=o.read({severities:d_.Error|d_.Warning|d_.Info}).sort(t.compareMarker);if(0!==u.length){var l=a.currentMarker||{resource:n.getModel().uri,severity:d_.Error,startLineNumber:1,startColumn:1,endLineNumber:1,endColumn:1},c=(0,tu.El)(u,l,t.compareMarker);c<0?(c=~c,c%=u.length):c=this._isNext?(c+1)%u.length:(c+u.length-1)%u.length;var h=u[c];if(h.resource.toString()!==n.getModel().uri.toString())return s.closeMarkersNavigation(),r.openCodeEditor({resource:h.resource,options:{pinned:!1,revealIfOpened:!0,revealInCenterIfOutsideViewport:!0,selection:h}},n).then((function(e){if(e)return e.getAction(i.id).run()}));a.move(this._isNext,!0)}}}},t.compareMarker=function(e,t){var n=(0,p.compare)(e.resource.toString(),t.resource.toString());return 0===n&&(n=d_.compare(e.severity,t.severity)),0===n&&(n=s.Q.compareRangesUsingStarts(e,t)),n},t}(xe),A_=function(e){function t(){return e.call(this,!0,!1,{id:"editor.action.marker.next",label:o.k("markerAction.next.label","Go to Next Problem (Error, Warning, Info)"),alias:"Go to Next Error or Warning",precondition:Oe.writable})||this}return x_(t,e),t}(E_),j_=function(e){function t(){return e.call(this,!1,!1,{id:"editor.action.marker.prev",label:o.k("markerAction.previous.label","Go to Previous Problem (Error, Warning, Info)"),alias:"Go to Previous Error or Warning",precondition:Oe.writable})||this}return x_(t,e),t}(E_),O_=function(e){function t(){return e.call(this,!0,!0,{id:"editor.action.marker.nextInFiles",label:o.k("markerAction.nextInFiles.label","Go to Next Problem in Files (Error, Warning, Info)"),alias:"Go to Next Error or Warning in Files",precondition:Oe.writable,kbOpts:{kbExpr:Oe.focus,primary:66,weight:100}})||this}return x_(t,e),t}(E_),R_=function(e){function t(){return e.call(this,!1,!0,{id:"editor.action.marker.prevInFiles",label:o.k("markerAction.previousInFiles.label","Go to Previous Problem in Files (Error, Warning, Info)"),alias:"Go to Previous Error or Warning in Files",precondition:Oe.writable,kbOpts:{kbExpr:Oe.focus,primary:1090,weight:100}})||this}return x_(t,e),t}(E_);Ae(T_),Ee(A_),Ee(j_),Ee(O_),Ee(R_);var P_=new ce("markersNavigationVisible",!1);Te(new(Ne.bindToContribution(T_.get))({id:"closeMarkersNavigation",precondition:P_,handler:function(e){return e.closeMarkersNavigation()},kbOpts:{weight:150,kbExpr:Oe.focus,primary:9,secondary:[1033]}})),n(541);var z_=(0,N.u1)("openerService"),W_=Object.freeze({_serviceBrand:void 0,open:function(){return J.g3.as(void 0)}});function F_(e,t,n){var i=No.r8.ordered(e).map((function(i){return Promise.resolve(i.provideHover(e,t,n)).then((function(e){return e&&(n=void 0!==(t=e).range,i=void 0!==t.contents&&t.contents&&t.contents.length>0,n&&i)?e:void 0;var t,n,i}),(function(e){(0,S.M_)(e)}))}));return Promise.all(i).then((function(e){return(0,tu.Yc)(e)}))}ke("_executeHoverProvider",(function(e,t){return F_(e,t,st.None)}));var B_=function(){function e(t,n,i,o){var r=this;this._computer=t,this._state=0,this._hoverTime=e.HOVER_TIME,this._firstWaitScheduler=new Ct((function(){return r._triggerAsyncComputation()}),0),this._secondWaitScheduler=new Ct((function(){return r._triggerSyncComputation()}),0),this._loadingMessageScheduler=new Ct((function(){return r._showLoadingMessage()}),0),this._asyncComputationPromise=null,this._asyncComputationPromiseDone=!1,this._completeCallback=n,this._errorCallback=i,this._progressCallback=o}return e.prototype.setHoverTime=function(e){this._hoverTime=e},e.prototype._firstWaitTime=function(){return this._hoverTime/2},e.prototype._secondWaitTime=function(){return this._hoverTime/2},e.prototype._loadingMessageTime=function(){return 3*this._hoverTime},e.prototype._triggerAsyncComputation=function(){var e=this;this._state=2,this._secondWaitScheduler.schedule(this._secondWaitTime()),this._computer.computeAsync?(this._asyncComputationPromiseDone=!1,this._asyncComputationPromise=ft((function(t){return e._computer.computeAsync(t)})),this._asyncComputationPromise.then((function(t){e._asyncComputationPromiseDone=!0,e._withAsyncResult(t)}),(function(t){return e._onError(t)}))):this._asyncComputationPromiseDone=!0},e.prototype._triggerSyncComputation=function(){this._computer.computeSync&&this._computer.onResult(this._computer.computeSync(),!0),this._asyncComputationPromiseDone?(this._state=0,this._onComplete(this._computer.getResult())):(this._state=3,this._onProgress(this._computer.getResult()))},e.prototype._showLoadingMessage=function(){3===this._state&&this._onProgress(this._computer.getResultWithLoadingMessage())},e.prototype._withAsyncResult=function(e){e&&this._computer.onResult(e,!1),3===this._state&&(this._state=0,this._onComplete(this._computer.getResult()))},e.prototype._onComplete=function(e){this._completeCallback&&this._completeCallback(e)},e.prototype._onError=function(e){this._errorCallback?this._errorCallback(e):(0,S.dz)(e)},e.prototype._onProgress=function(e){this._progressCallback&&this._progressCallback(e)},e.prototype.start=function(e){if(0===e)0===this._state&&(this._state=1,this._firstWaitScheduler.schedule(this._firstWaitTime()),this._loadingMessageScheduler.schedule(this._loadingMessageTime()));else switch(this._state){case 0:this._triggerAsyncComputation(),this._secondWaitScheduler.cancel(),this._triggerSyncComputation();break;case 2:this._secondWaitScheduler.cancel(),this._triggerSyncComputation()}},e.prototype.cancel=function(){this._loadingMessageScheduler.cancel(),1===this._state&&this._firstWaitScheduler.cancel(),2===this._state&&(this._secondWaitScheduler.cancel(),this._asyncComputationPromise&&(this._asyncComputationPromise.cancel(),this._asyncComputationPromise=null)),3===this._state&&this._asyncComputationPromise&&(this._asyncComputationPromise.cancel(),this._asyncComputationPromise=null),this._state=0},e.HOVER_TIME=300,e}(),H_=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),V_=function(e){function t(t,n){var i=e.call(this)||this;return i.disposables=[],i.allowEditorOverflow=!0,i._id=t,i._editor=n,i._isVisible=!1,i._containerDomNode=document.createElement("div"),i._containerDomNode.className="monaco-editor-hover hidden",i._containerDomNode.tabIndex=0,i._domNode=document.createElement("div"),i._domNode.className="monaco-editor-hover-content",i.scrollbar=new Qc(i._domNode,{}),i.disposables.push(i.scrollbar),i._containerDomNode.appendChild(i.scrollbar.getDomNode()),i.onkeydown(i._containerDomNode,(function(e){e.equals(9)&&i.hide()})),i._register(i._editor.onDidChangeConfiguration((function(e){e.fontInfo&&i.updateFont()}))),i._editor.onDidLayoutChange((function(e){return i.updateMaxHeight()})),i.updateMaxHeight(),i._editor.addContentWidget(i),i._showAtPosition=null,i}return H_(t,e),Object.defineProperty(t.prototype,"isVisible",{get:function(){return this._isVisible},set:function(e){this._isVisible=e,un(this._containerDomNode,"hidden",!this._isVisible)},enumerable:!0,configurable:!0}),t.prototype.getId=function(){return this._id},t.prototype.getDomNode=function(){return this._containerDomNode},t.prototype.showAt=function(e,t){this._showAtPosition=new r.y(e.lineNumber,e.column),this.isVisible=!0,this._editor.layoutContentWidget(this),this._editor.render(),this._stoleFocus=t,t&&this._containerDomNode.focus()},t.prototype.hide=function(){this.isVisible&&(this.isVisible=!1,this._editor.layoutContentWidget(this),this._stoleFocus&&this._editor.focus())},t.prototype.getPosition=function(){return this.isVisible?{position:this._showAtPosition,preference:[ou.ABOVE,ou.BELOW]}:null},t.prototype.dispose=function(){this._editor.removeContentWidget(this),this.disposables=(0,I.AS)(this.disposables),e.prototype.dispose.call(this)},t.prototype.updateFont=function(){var e=this;Array.prototype.slice.call(this._domNode.getElementsByClassName("code")).forEach((function(t){return e._editor.applyFontInfo(t)}))},t.prototype.updateContents=function(e){this._domNode.textContent="",this._domNode.appendChild(e),this.updateFont(),this._editor.layoutContentWidget(this),this.onContentsChange()},t.prototype.onContentsChange=function(){this.scrollbar.scanDomNode()},t.prototype.updateMaxHeight=function(){var e=Math.max(this._editor.getLayoutInfo().height/4,250),t=this._editor.getConfiguration().fontInfo,n=t.fontSize,i=t.lineHeight;this._domNode.style.fontSize=n+"px",this._domNode.style.lineHeight=i+"px",this._domNode.style.maxHeight=e+"px"},t}(kc),U_=function(e){function t(t,n){var i=e.call(this)||this;return i._id=t,i._editor=n,i._isVisible=!1,i._domNode=document.createElement("div"),i._domNode.className="monaco-editor-hover hidden",i._domNode.setAttribute("aria-hidden","true"),i._domNode.setAttribute("role","presentation"),i._showAtLineNumber=-1,i._register(i._editor.onDidChangeConfiguration((function(e){e.fontInfo&&i.updateFont()}))),i._editor.addOverlayWidget(i),i}return H_(t,e),Object.defineProperty(t.prototype,"isVisible",{get:function(){return this._isVisible},set:function(e){this._isVisible=e,un(this._domNode,"hidden",!this._isVisible)},enumerable:!0,configurable:!0}),t.prototype.getId=function(){return this._id},t.prototype.getDomNode=function(){return this._domNode},t.prototype.showAt=function(e){this._showAtLineNumber=e,this.isVisible||(this.isVisible=!0);var t=this._editor.getLayoutInfo(),n=this._editor.getTopForLineNumber(this._showAtLineNumber),i=this._editor.getScrollTop(),o=this._editor.getConfiguration().lineHeight,r=n-i-(this._domNode.clientHeight-o)/2;this._domNode.style.left=t.glyphMarginLeft+t.glyphMarginWidth+"px",this._domNode.style.top=Math.max(Math.round(r),0)+"px"},t.prototype.hide=function(){this.isVisible&&(this.isVisible=!1)},t.prototype.getPosition=function(){return null},t.prototype.dispose=function(){this._editor.removeOverlayWidget(this),e.prototype.dispose.call(this)},t.prototype.updateFont=function(){var e=this,t=Array.prototype.slice.call(this._domNode.getElementsByTagName("code")),n=Array.prototype.slice.call(this._domNode.getElementsByClassName("code"));t.concat(n).forEach((function(t){return e._editor.applyFontInfo(t)}))},t.prototype.updateContents=function(e){this._domNode.textContent="",this._domNode.appendChild(e),this.updateFont()},t}(kc),Y_=function(){function e(e,t,n){this.presentationIndex=n,this._onColorFlushed=new X.vl,this.onColorFlushed=this._onColorFlushed.event,this._onDidChangeColor=new X.vl,this.onDidChangeColor=this._onDidChangeColor.event,this._onDidChangePresentation=new X.vl,this.onDidChangePresentation=this._onDidChangePresentation.event,this.originalColor=e,this._color=e,this._colorPresentations=t}return Object.defineProperty(e.prototype,"color",{get:function(){return this._color},set:function(e){this._color.equals(e)||(this._color=e,this._onDidChangeColor.fire(e))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"presentation",{get:function(){return this.colorPresentations[this.presentationIndex]},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"colorPresentations",{get:function(){return this._colorPresentations},set:function(e){this._colorPresentations=e,this.presentationIndex>e.length-1&&(this.presentationIndex=0),this._onDidChangePresentation.fire(this.presentation)},enumerable:!0,configurable:!0}),e.prototype.selectNextColorPresentation=function(){this.presentationIndex=(this.presentationIndex+1)%this.colorPresentations.length,this.flushColor(),this._onDidChangePresentation.fire(this.presentation)},e.prototype.guessColorPresentation=function(e,t){for(var n=0;nthis._editor.getModel().getLineCount())return[];var n=gf.get(this._editor),i=this._editor.getModel().getLineMaxColumn(t),o=this._editor.getLineDecorations(t),r=!1,a=o.map((function(o){var a=o.range.startLineNumber===t?o.range.startColumn:1,u=o.range.endLineNumber===t?o.range.endColumn:i;if(a>e._range.startColumn||e._range.endColumn>u)return null;var l=new s.Q(e._range.startLineNumber,a,e._range.startLineNumber,u),c=n.getColorData(o.range.getStartPosition());if(!r&&c){r=!0;var h=c.colorInfo,d=h.color,f=h.range;return new iw(f,d,c.provider)}if(bp(o.options.hoverMessage))return null;var p=void 0;return o.options.hoverMessage&&(p=Array.isArray(o.options.hoverMessage)?o.options.hoverMessage.slice():[o.options.hoverMessage]),{contents:p,range:l}}));return a.filter((function(e){return!!e}))},e.prototype.onResult=function(e,t){this._result=t?e.concat(this._result.sort((function(e,t){return e instanceof iw?-1:t instanceof iw?1:0}))):this._result.concat(e)},e.prototype.getResult=function(){return this._result.slice(0)},e.prototype.getResultWithLoadingMessage=function(){return this._result.slice(0).concat([this._getLoadingMessage()])},e.prototype._getLoadingMessage=function(){return{range:this._range,contents:[(new yp).appendText(o.k("modesContentHover.loading","Loading..."))]}},e}(),rw=function(e){function t(n,i,o){var r=e.call(this,t.ID,n)||this;return r._themeService=o,r.renderDisposable=I.jG.None,r._computer=new ow(r._editor),r._highlightDecorations=[],r._isChangingDecorations=!1,r._markdownRenderer=i,r._register(i.onDidRenderCodeBlock(r.onContentsChange,r)),r._hoverOperation=new B_(r._computer,(function(e){return r._withResult(e,!0)}),null,(function(e){return r._withResult(e,!1)})),r._register(hn(r.getDomNode(),Un.FOCUS,(function(){r._colorPicker&&sn(r.getDomNode(),"colorpicker-hover")}))),r._register(hn(r.getDomNode(),Un.BLUR,(function(){an(r.getDomNode(),"colorpicker-hover")}))),r._register(n.onDidChangeConfiguration((function(e){r._hoverOperation.setHoverTime(r._editor.getConfiguration().contribInfo.hover.delay)}))),r}return tw(t,e),t.prototype.dispose=function(){this.renderDisposable.dispose(),this.renderDisposable=I.jG.None,this._hoverOperation.cancel(),e.prototype.dispose.call(this)},t.prototype.onModelDecorationsChanged=function(){this._isChangingDecorations||this.isVisible&&(this._hoverOperation.cancel(),this._computer.clearResult(),this._colorPicker||this._hoverOperation.start(0))},t.prototype.startShowingAt=function(e,t,n){if(!this._lastRange||!this._lastRange.equalsRange(e)){if(this._hoverOperation.cancel(),this.isVisible)if(this._showAtPosition.lineNumber!==e.startLineNumber)this.hide();else{for(var i=[],o=0,r=this._messages.length;o=e.endColumn&&i.push(s)}if(i.length>0){if(function(e,t){if(!e&&t||e&&!t||e.length!==t.length)return!1;for(var n=0;n0?this._renderMessages(this._lastRange,this._messages):t&&this.hide()},t.prototype._renderMessages=function(e,n){var i=this;this.renderDisposable.dispose(),this._colorPicker=null;var o,a=Number.MAX_VALUE,u=n[0].range,l=document.createDocumentFragment(),c=!0,h=!1;n.forEach((function(t){if(t.range)if(a=Math.min(a,t.range.startColumn),u=s.Q.plusRange(u,t.range),t instanceof iw){h=!0;var n=t.color,d=n.red,f=n.green,p=n.blue,g=n.alpha,m=new Uo(255*d,255*f,255*p,g),v=new Go(m),y=i._editor.getModel(),b=new s.Q(t.range.startLineNumber,t.range.startColumn,t.range.endLineNumber,t.range.endColumn),_={range:t.range,color:t.color},w=new Y_(v,[],0),M=new ew(l,w,i._editor.getConfiguration().pixelRatio,i._themeService);sf(y,_,t.provider,st.None).then((function(n){w.colorPresentations=n;var u=i._editor.getModel().getValueInRange(t.range);w.guessColorPresentation(v,u);var c=function(){var e,t;w.presentation.textEdit?(e=[w.presentation.textEdit],t=(t=new s.Q(w.presentation.textEdit.range.startLineNumber,w.presentation.textEdit.range.startColumn,w.presentation.textEdit.range.endLineNumber,w.presentation.textEdit.range.endColumn)).setEndPosition(t.endLineNumber,t.startColumn+w.presentation.textEdit.text.length)):(e=[{identifier:null,range:b,text:w.presentation.label,forceMoveMarkers:!1}],t=b.setEndPosition(b.endLineNumber,b.startColumn+w.presentation.label.length)),i._editor.executeEdits("colorpicker",e),w.presentation.additionalTextEdits&&(e=w.presentation.additionalTextEdits.slice(),i._editor.executeEdits("colorpicker",e),i.hide()),i._editor.pushUndoStop(),b=t},h=function(e){return sf(y,{range:b,color:{red:e.rgba.r/255,green:e.rgba.g/255,blue:e.rgba.b/255,alpha:e.rgba.a}},t.provider,st.None).then((function(e){w.colorPresentations=e}))},d=w.onColorFlushed((function(e){h(e).then(c)})),f=w.onDidChangeColor(h);i._colorPicker=M,i.showAt(new r.y(e.startLineNumber,a),i._shouldFocus),i.updateContents(l),i._colorPicker.layout(),i.renderDisposable=(0,I.qE)([d,f,M,o])}))}else t.contents.filter((function(e){return!bp(e)})).forEach((function(e){var t=i._markdownRenderer.render(e);o=t,l.appendChild(nw("div.hover-row",null,t.element)),c=!1}))})),h||c||(this.showAt(new r.y(e.startLineNumber,a),this._shouldFocus),this.updateContents(l)),this._isChangingDecorations=!0,this._highlightDecorations=this._editor.deltaDecorations(this._highlightDecorations,[{range:u,options:t._DECORATION_OPTIONS}]),this._isChangingDecorations=!1},t.ID="editor.contrib.modesContentHoverWidget",t._DECORATION_OPTIONS=Ho.kI.register({className:"hoverHighlight"}),t}(V_),sw=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),aw=function(){function e(e){this._editor=e,this._lineNumber=-1}return e.prototype.setLineNumber=function(e){this._lineNumber=e,this._result=[]},e.prototype.clearResult=function(){this._result=[]},e.prototype.computeSync=function(){for(var e=function(e){return{value:e}},t=this._editor.getLineDecorations(this._lineNumber),n=[],i=0,o=t.length;i0?this._renderMessages(this._lastLineNumber,this._messages):this.hide()},t.prototype._renderMessages=function(e,t){var n=this;(0,I.AS)(this._renderDisposeables),this._renderDisposeables=[];var i=document.createDocumentFragment();t.forEach((function(e){var t=n._markdownRenderer.render(e.value);n._renderDisposeables.push(t),i.appendChild(Jn("div.hover-row",null,t.element))})),this.updateContents(i),this.showAt(e)},t.ID="editor.contrib.modesGlyphHoverWidget",t}(U_),lw=function(e,t){return function(n,i){t(n,i,e)}},cw=function(){function e(e,t,n){void 0===n&&(n=W_),this._editor=e,this._modeService=t,this._openerService=n,this._onDidRenderCodeBlock=new X.vl,this.onDidRenderCodeBlock=this._onDidRenderCodeBlock.event}return e.prototype.getOptions=function(e){var t=this;return{codeBlockRenderer:function(e,n){var i=e?t._modeService.getModeIdForLanguageName(e):t._editor.getModel().getLanguageIdentifier().language;return t._modeService.getOrCreateMode(i).then((function(e){return function(e,t){for(var n='
    ',i=e.split(/\r\n|\r|\n/),o=t.getInitialState(),r=0,s=i.length;r0&&(n+="
    ");var u=t.tokenize2(a,o,0);Do.f.convertToEndOffset(u.tokens,a.length);for(var l=new Do.f(u.tokens,a).inflate(),c=0,h=0,d=l.getCount();h'+p.escape(a.substring(c,g))+"",c=g}o=u.endState}return n+"
    "}(n,function(e){return No.dG.get(e)||{getInitialState:function(){return xo.oe},tokenize:void 0,tokenize2:function(e,t,n){return(0,xo.T5)(0,e,t,n)}}}(i))})).then((function(e){return''+e+""}))},codeBlockRenderCallback:function(){return t._onDidRenderCodeBlock.fire()},actionHandler:{callback:function(e){t._openerService.open(L.A.parse(e)).then(void 0,S.dz)},disposeables:e}}},e.prototype.render=function(e){var t,n=[];return t=e?function(e,t){void 0===t&&(t={});var n,i=Sp(t),o=new Promise((function(e){return n=e})),r=new Cp.Renderer;r.image=function(e,t,n){var i=[];if(e){var o=e.split("|").map((function(e){return e.trim()}));e=o[0];var r=o[1];if(r){var s=/height=(\d+)/.exec(r),a=/width=(\d+)/.exec(r),u=s&&s[1],l=a&&a[1],c=isFinite(parseInt(l)),h=isFinite(parseInt(u));c&&i.push('width="'+l+'"'),h&&i.push('height="'+u+'"')}}var d=[];return e&&d.push('src="'+e+'"'),n&&d.push('alt="'+n+'"'),t&&d.push('title="'+t+'"'),i.length&&(d=d.concat(i)),""},r.link=function(t,n,i){return t===i&&(i=Mp(i)),n=Mp(n),!(t=Mp(t))||t.match(/^data:|javascript:/i)||t.match(/^command:/i)&&!e.isTrusted?i:''+i+""},r.paragraph=function(e){return"

    "+e+"

    "},t.codeBlockRenderer&&(r.code=function(e,n){var r=t.codeBlockRenderer(n,e),s=vp.nextId(),a=Promise.all([r,o]).then((function(e){var t=e[0],n=i.querySelector('div[data-code="'+s+'"]');n&&(n.innerHTML=t)})).catch((function(e){}));return t.codeBlockRenderCallback&&a.then(t.codeBlockRenderCallback),'
    '+(0,p.escape)(e)+"
    "}),t.actionHandler&&t.actionHandler.disposeables.push(hn(i,"click",(function(e){var n=e.target;if("A"===n.tagName||(n=n.parentElement)&&"A"===n.tagName){var i=n.dataset.href;i&&t.actionHandler.callback(i,e)}})));var s={sanitize:!0,renderer:r};return i.innerHTML=Cp(e.value,s),n(),i}(e,this.getOptions(n)):document.createElement("span"),{element:t,dispose:function(){return(0,I.AS)(n)}}},function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([lw(1,o_),lw(2,(0,N.lq)(z_))],e)}(),hw=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),dw=function(e,t){return function(n,i){t(n,i,e)}},fw=function(){function e(e,t,n,i){var o=this;this._editor=e,this._openerService=t,this._modeService=n,this._themeService=i,this._toUnhook=[],this._isMouseDown=!1,this._hoverClicked=!1,this._hookEvents(),this._didChangeConfigurationHandler=this._editor.onDidChangeConfiguration((function(e){e.contribInfo&&(o._hideWidgets(),o._unhookEvents(),o._hookEvents())}))}return Object.defineProperty(e.prototype,"contentWidget",{get:function(){return this._contentWidget||this._createHoverWidget(),this._contentWidget},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"glyphWidget",{get:function(){return this._glyphWidget||this._createHoverWidget(),this._glyphWidget},enumerable:!0,configurable:!0}),e.get=function(t){return t.getContribution(e.ID)},e.prototype._hookEvents=function(){var e=this,t=function(){return e._hideWidgets()},n=this._editor.getConfiguration().contribInfo.hover;this._isHoverEnabled=n.enabled,this._isHoverSticky=n.sticky,this._isHoverEnabled?(this._toUnhook.push(this._editor.onMouseDown((function(t){return e._onEditorMouseDown(t)}))),this._toUnhook.push(this._editor.onMouseUp((function(t){return e._onEditorMouseUp(t)}))),this._toUnhook.push(this._editor.onMouseMove((function(t){return e._onEditorMouseMove(t)}))),this._toUnhook.push(this._editor.onKeyDown((function(t){return e._onKeyDown(t)}))),this._toUnhook.push(this._editor.onDidChangeModelDecorations((function(){return e._onModelDecorationsChanged()})))):this._toUnhook.push(this._editor.onMouseMove(t)),this._toUnhook.push(this._editor.onMouseLeave(t)),this._toUnhook.push(this._editor.onDidChangeModel(t)),this._toUnhook.push(this._editor.onDidScrollChange((function(t){return e._onEditorScrollChanged(t)})))},e.prototype._unhookEvents=function(){this._toUnhook=(0,I.AS)(this._toUnhook)},e.prototype._onModelDecorationsChanged=function(){this.contentWidget.onModelDecorationsChanged(),this.glyphWidget.onModelDecorationsChanged()},e.prototype._onEditorScrollChanged=function(e){(e.scrollTopChanged||e.scrollLeftChanged)&&this._hideWidgets()},e.prototype._onEditorMouseDown=function(e){this._isMouseDown=!0;var t=e.target.type;t!==su.CONTENT_WIDGET||e.target.detail!==rw.ID?t===su.OVERLAY_WIDGET&&e.target.detail===uw.ID||(t!==su.OVERLAY_WIDGET&&e.target.detail!==uw.ID&&(this._hoverClicked=!1),this._hideWidgets()):this._hoverClicked=!0},e.prototype._onEditorMouseUp=function(e){this._isMouseDown=!1},e.prototype._onEditorMouseMove=function(e){var t=e.target.type,n=B.zx?e.event.metaKey:e.event.ctrlKey;if(!(this._isMouseDown&&this._hoverClicked&&this.contentWidget.isColorPickerVisible())&&(!this._isHoverSticky||t!==su.CONTENT_WIDGET||e.target.detail!==rw.ID||n)&&(!this._isHoverSticky||t!==su.OVERLAY_WIDGET||e.target.detail!==uw.ID||n)){if(t===su.CONTENT_EMPTY){var i=this._editor.getConfiguration().fontInfo.typicalHalfwidthCharacterWidth/2,o=e.target.detail;o&&!o.isAfterLines&&"number"==typeof o.horizontalDistanceToText&&o.horizontalDistanceToText=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([dw(1,z_),dw(2,o_),dw(3,Lr)],e)}(),pw=function(e){function t(){return e.call(this,{id:"editor.action.showHover",label:o.k({key:"showHover",comment:["Label for action that will trigger the showing of a hover in the editor.","This allows for users to show the hover without using the mouse."]},"Show Hover"),alias:"Show Hover",precondition:null,kbOpts:{kbExpr:Oe.editorTextFocus,primary:O(2089,2087),weight:100}})||this}return hw(t,e),t.prototype.run=function(e,t){var n=fw.get(t);if(n){var i=t.getPosition(),o=new s.Q(i.lineNumber,i.column,i.lineNumber,i.column);n.showContentHover(o,1,!0)}},t}(xe);Ae(fw),Ee(pw),Tr((function(e,t){var n=e.getColor(Js);n&&t.addRule(".monaco-editor .hoverHighlight { background-color: "+n+"; }");var i=e.getColor(Xs);i&&t.addRule(".monaco-editor .monaco-editor-hover { background-color: "+i+"; }");var o=e.getColor($s);o&&(t.addRule(".monaco-editor .monaco-editor-hover { border: 1px solid "+o+"; }"),t.addRule(".monaco-editor .monaco-editor-hover .hover-row:not(:first-child):not(:empty) { border-top: 1px solid "+o.transparent(.5)+"; }"));var r=e.getColor(ns);r&&t.addRule(".monaco-editor .monaco-editor-hover a { color: "+r+"; }");var s=e.getColor(is);s&&t.addRule(".monaco-editor .monaco-editor-hover code { background-color: "+s+"; }")}));var gw=function(){function e(e,t,n){this._editRange=e,this._originalSelection=t,this._text=n}return e.prototype.getEditOperations=function(e,t){t.addTrackedEditOperation(this._editRange,this._text)},e.prototype.computeCursorState=function(e,t){var n=t.getInverseEditOperations()[0].range;return this._originalSelection.isEmpty()?new Be.L(n.endLineNumber,Math.min(this._originalSelection.positionColumn,n.endColumn),n.endLineNumber,Math.min(this._originalSelection.positionColumn,n.endColumn)):new Be.L(n.endLineNumber,n.endColumn-this._text.length,n.endLineNumber,n.endColumn)},e}(),mw=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),vw=function(){function e(e,t){this.decorationIds=[],this.editor=e,this.editorWorkerService=t}return e.get=function(t){return t.getContribution(e.ID)},e.prototype.dispose=function(){},e.prototype.getId=function(){return e.ID},e.prototype.run=function(t,n){var i=this;this.currentRequest&&this.currentRequest.cancel();var o=this.editor.getSelection(),r=this.editor.getModel().uri;if(o.startLineNumber!==o.endLineNumber)return null;var a=new sd(this.editor,5);return this.editorWorkerService.canNavigateValueSet(r)?(this.currentRequest=ft((function(e){return i.editorWorkerService.navigateValueSet(r,o,n)})),this.currentRequest.then((function(n){if(n&&n.range&&n.value&&a.validate(i.editor)){var r=s.Q.lift(n.range),u=n.range,l=n.value.length-(o.endColumn-o.startColumn);u={startLineNumber:u.startLineNumber,startColumn:u.startColumn,endLineNumber:u.endLineNumber,endColumn:u.startColumn+n.value.length},l>1&&(o=new Be.L(o.startLineNumber,o.startColumn,o.endLineNumber,o.endColumn+l-1));var c=new gw(r,o,n.value);i.editor.pushUndoStop(),i.editor.executeCommand(t,c),i.editor.pushUndoStop(),i.decorationIds=i.editor.deltaDecorations(i.decorationIds,[{range:u,options:e.DECORATION}]),i.decorationRemover&&i.decorationRemover.cancel(),i.decorationRemover=(350,ft((function(e){return new Promise((function(t,n){var i=setTimeout(t,350);e.onCancellationRequested((function(e){clearTimeout(i),n(S.aD())}))}))}))),i.decorationRemover.then((function(){return i.decorationIds=i.editor.deltaDecorations(i.decorationIds,[])})).catch(S.dz)}})).catch(S.dz)):void 0},e.ID="editor.contrib.inPlaceReplaceController",e.DECORATION=Ho.kI.register({className:"valueSetReplacement"}),e=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([(t=1,n=Ah,function(e,i){n(e,i,t)})],e);var t,n}(),yw=function(e){function t(){return e.call(this,{id:"editor.action.inPlaceReplace.up",label:o.k("InPlaceReplaceAction.previous.label","Replace with Previous Value"),alias:"Replace with Previous Value",precondition:Oe.writable,kbOpts:{kbExpr:Oe.editorTextFocus,primary:3154,weight:100}})||this}return mw(t,e),t.prototype.run=function(e,t){var n=vw.get(t);if(n)return J.g3.wrap(n.run(this.id,!0))},t}(xe),bw=function(e){function t(){return e.call(this,{id:"editor.action.inPlaceReplace.down",label:o.k("InPlaceReplaceAction.next.label","Replace with Next Value"),alias:"Replace with Next Value",precondition:Oe.writable,kbOpts:{kbExpr:Oe.editorTextFocus,primary:3156,weight:100}})||this}return mw(t,e),t.prototype.run=function(e,t){var n=vw.get(t);if(n)return J.g3.wrap(n.run(this.id,!1))},t}(xe);Ae(vw),Ee(yw),Ee(bw),Tr((function(e,t){var n=e.getColor(ka);n&&t.addRule(".monaco-editor.vs .valueSetReplacement { outline: solid 2px "+n+"; }")}));var _w=function(){function e(e,t){this.selection=e,this.descending=t}return e.prototype.getEditOperations=function(e,t){var n=function(e,t,n){var i=ww(e,t,n);return i?mf.replace(new s.Q(i.startLineNumber,1,i.endLineNumber,e.getLineMaxColumn(i.endLineNumber)),i.after.join("\n")):null}(e,this.selection,this.descending);n&&t.addEditOperation(n.range,n.text),this.selectionId=t.trackSelection(this.selection)},e.prototype.computeCursorState=function(e,t){return t.getTrackedSelection(this.selectionId)},e.canRun=function(e,t,n){var i=ww(e,t,n);if(!i)return!1;for(var o=0,r=i.before.length;o=o)return null;for(var r=[],s=i;s<=o;s++)r.push(e.getLineContent(s));var a=r.slice(0);return a.sort((function(e,t){return e.toLowerCase().localeCompare(t.toLowerCase())})),!0===n&&(a=a.reverse()),{startLineNumber:i,endLineNumber:o,before:r,after:a}}var Mw=function(){function e(e,t){this.selection=e,this.cursors=t}return e.prototype.getEditOperations=function(e,t){for(var n=function(e,t){t.sort((function(e,t){return e.lineNumber===t.lineNumber?e.column-t.column:e.lineNumber-t.lineNumber}));for(var n=t.length-2;n>=0;n--)t[n].lineNumber===t[n+1].lineNumber&&t.splice(n,1);for(var i=[],o=0,r=0,a=t.length,u=1,l=e.getLineCount();u<=l;u++){var c=e.getLineContent(u),h=c.length+1,d=0;if(!(r1&&(n-=1,o=e.getLineMaxColumn(n)),t.addTrackedEditOperation(new s.Q(n,o,i,r),null)}},e.prototype.computeCursorState=function(e,t){var n=t.getInverseEditOperations()[0].range;return new Be.L(n.endLineNumber,this.restoreCursorToColumn,n.endLineNumber,this.restoreCursorToColumn)},e}();function Lw(e,t){for(var n=0,i=0;i=i.startLineNumber+1&&t<=i.endLineNumber+1?e.getLineContent(t-1):e.getLineContent(t)};var b=Ge.cx.getGoodIndentForLine(u,e.getLanguageIdAtPosition(h,1),i.startLineNumber+1,a);if(null!==b&&(y=p.getLeadingWhitespace(e.getLineContent(i.startLineNumber)),(C=Lw(b,o))!==(S=Lw(y,o)))){var _=C-S;this.getIndentEditsOfMovingBlock(e,t,i,o,r,_)}}}else t.addEditOperation(new s.Q(i.startLineNumber,1,i.startLineNumber,1),f+"\n")}else{var w;if(h=i.startLineNumber-1,d=e.getLineContent(h),t.addEditOperation(new s.Q(h,1,h+1,1),null),t.addEditOperation(new s.Q(i.endLineNumber,e.getLineMaxColumn(i.endLineNumber),i.endLineNumber,e.getLineMaxColumn(i.endLineNumber)),"\n"+d),this.shouldAutoIndent(e,i))if(u.getLineContent=function(t){return t===h?e.getLineContent(i.startLineNumber):e.getLineContent(t)},null!==(w=this.matchEnterRule(e,a,o,i.startLineNumber,i.startLineNumber-2)))0!==w&&this.getIndentEditsOfMovingBlock(e,t,i,o,r,w);else{var M=Ge.cx.getGoodIndentForLine(u,e.getLanguageIdAtPosition(i.startLineNumber,1),h,a);if(null!==M){var C,S,L=p.getLeadingWhitespace(e.getLineContent(i.startLineNumber));(C=Lw(M,o))!==(S=Lw(L,o))&&(_=C-S,this.getIndentEditsOfMovingBlock(e,t,i,o,r,_))}}}}this._selectionId=t.trackSelection(i)}},e.prototype.buildIndentConverter=function(e){return{shiftIndent:function(t){for(var n=Ze.ShiftCommand.shiftIndentCount(t,t.length+1,e),i="",o=0;o=1;){var u;if(u=a===o&&void 0!==r?r:e.getLineContent(a),p.lastNonWhitespaceIndex(u)>=0)break;a--}if(a<1||i>e.getLineCount())return null;var l=e.getLineMaxColumn(a),c=Ge.cx.getEnterAction(e,new s.Q(a,l,a,l));if(c){var h=c.indentation,d=c.enterAction;d.indentAction===Qe.l.None||d.indentAction===Qe.l.Indent?h=c.indentation+d.appendText:d.indentAction===Qe.l.IndentOutdent?h=c.indentation:d.indentAction===Qe.l.Outdent&&(h=t.unshiftIndent(c.indentation)+d.appendText);var f=e.getLineContent(i);if(this.trimLeft(f).indexOf(this.trimLeft(h))>=0){var g=p.getLeadingWhitespace(e.getLineContent(i)),m=p.getLeadingWhitespace(h);return 2&Ge.cx.getIndentMetadata(e,i)&&(m=t.unshiftIndent(m)),Lw(m,n)-Lw(g,n)}}return null},e.prototype.trimLeft=function(e){return e.replace(/^\s+/,"")},e.prototype.shouldAutoIndent=function(e,t){if(!this._autoIndent)return!1;if(!e.isCheapToTokenize(t.startLineNumber))return!1;var n=e.getLanguageIdAtPosition(t.startLineNumber,1);return n===e.getLanguageIdAtPosition(t.endLineNumber,1)&&null!==Ge.cx.getIndentRulesSupport(n)},e.prototype.getIndentEditsOfMovingBlock=function(e,t,n,i,o,r){for(var a=n.startLineNumber;a<=n.endLineNumber;a++){var u=e.getLineContent(a),l=p.getLeadingWhitespace(u),c=Iw(Lw(l,i)+r,i,o);c!==l&&(t.addEditOperation(new s.Q(a,1,a,l.length+1),c),a===n.endLineNumber&&n.endColumn<=l.length+1&&""===c&&(this._moveEndLineSelectionShrink=!0))}},e.prototype.computeCursorState=function(e,t){var n=t.getTrackedSelection(this._selectionId);return this._moveEndPositionDown&&(n=n.setEndPosition(n.endLineNumber+1,1)),this._moveEndLineSelectionShrink&&n.startLineNumber0){var s=t.startLineNumber-o;r=new Be.L(s,t.startColumn,s,t.startColumn)}else r=new Be.L(t.startLineNumber,t.startColumn,t.startLineNumber,t.startColumn);o+=t.endLineNumber-t.startLineNumber,t.intersectRanges(e)?n=r:i.push(r)})),n&&i.unshift(n),i},t.prototype._getRangesToDelete=function(e){var t=e.getSelections(),n=e.getModel();return t.sort(s.Q.compareRangesUsingStarts),t.map((function(e){if(e.isEmpty()){if(1===e.startColumn){var t=Math.max(1,e.startLineNumber-1),i=1===e.startLineNumber?1:n.getLineContent(t).length+1;return new s.Q(t,i,e.startLineNumber,1)}return new s.Q(e.startLineNumber,1,e.startLineNumber,e.startColumn)}return e}))},t}(Uw),Zw=function(e){function t(){return e.call(this,{id:"deleteAllRight",label:o.k("lines.deleteAllRight","Delete All Right"),alias:"Delete All Right",precondition:Oe.writable,kbOpts:{kbExpr:Oe.textInputFocus,primary:null,mac:{primary:297,secondary:[2068]},weight:100}})||this}return xw(t,e),t.prototype._getEndCursorState=function(e,t){for(var n,i=[],o=0,r=t.length;oe.endLineNumber+1?(o.push(e),t):new Be.L(e.startLineNumber,e.startColumn,t.endLineNumber,t.endColumn):t.startLineNumber>e.endLineNumber?(o.push(e),t):new Be.L(e.startLineNumber,e.startColumn,t.endLineNumber,t.endColumn)}));o.push(r);for(var a=t.getModel(),u=[],l=[],c=i,h=0,d=0,f=o.length;d=1){var L=!0;""===w&&(L=!1),!L||" "!==w.charAt(w.length-1)&&"\t"!==w.charAt(w.length-1)||(L=!1,w=w.replace(/[\s\uFEFF\xA0]+$/g," "));var I=C.substr(S-1);w+=(L?" ":"")+I,m=L?I.length+1:I.length}else m=0}var N=new s.Q(g,1,v,y);if(!N.isEmpty()){var x=void 0;p.isEmpty()?(u.push(mf.replace(N,w)),x=new Be.L(N.startLineNumber-h,w.length-m+1,g-h,w.length-m+1)):p.startLineNumber===p.endLineNumber?(u.push(mf.replace(N,w)),x=new Be.L(p.startLineNumber-h,p.startColumn,p.endLineNumber-h,p.endColumn)):(u.push(mf.replace(N,w)),x=new Be.L(p.startLineNumber-h,p.startColumn,p.startLineNumber-h,w.length-b)),null!==s.Q.intersectRanges(N,i)?c=x:l.push(x)}h+=N.endLineNumber-N.startLineNumber}l.unshift(c),t.pushUndoStop(),t.executeEdits(this.id,u,l),t.pushUndoStop()},t}(xe),Qw=function(e){function t(){return e.call(this,{id:"editor.action.transpose",label:o.k("editor.transpose","Transpose characters around the cursor"),alias:"Transpose characters around the cursor",precondition:Oe.writable})||this}return xw(t,e),t.prototype.run=function(e,t){for(var n=t.getSelections(),i=t.getModel(),o=[],r=0,a=n.length;r=c){if(l.lineNumber===i.getLineCount())continue;var h=new s.Q(l.lineNumber,Math.max(1,l.column-1),l.lineNumber+1,1),d=i.getValueInRange(h).split("").reverse().join("");o.push(new He(new Be.L(l.lineNumber,Math.max(1,l.column-1),l.lineNumber+1,1),d))}else h=new s.Q(l.lineNumber,Math.max(1,l.column-1),l.lineNumber,l.column+1),d=i.getValueInRange(h).split("").reverse().join(""),o.push(new Ye(h,d,new Be.L(l.lineNumber,l.column+1,l.lineNumber,l.column+1)))}}t.pushUndoStop(),t.executeCommands(this.id,o),t.pushUndoStop()},t}(xe),qw=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return xw(t,e),t.prototype.run=function(e,t){for(var n=t.getSelections(),i=t.getModel(),o=[],r=0,a=n.length;r0&&o[o.length-1])||6!==r[0]&&2!==r[0])){s=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([tM(1,z_),tM(2,Cr)],e)}(),lM=function(e){function t(){return e.call(this,{id:"editor.action.openLink",label:o.k("label","Open Link"),alias:"Open Link",precondition:null})||this}return eM(t,e),t.prototype.run=function(e,t){var n=uM.get(t);if(n)for(var i=0,o=t.getSelections();i1&&n.push(new Be.L(e.endLineNumber,e.endColumn,e.endLineNumber,e.endColumn))}},t.prototype.run=function(e,t){var n=this,i=t.getModel(),o=t.getSelections(),r=[];o.forEach((function(e){return n.getCursorsForSelection(e,i,r)})),r.length>0&&t.setSelections(r)},t}(xe),pM=function(e,t,n){this.selections=e,this.revealRange=t,this.revealScrollType=n},gM=function(){function e(e,t,n,i,o,r,s){this._editor=e,this.findController=t,this.isDisconnectedFromFindController=n,this.searchText=i,this.wholeWord=o,this.matchCase=r,this.currentMatch=s}return e.create=function(t,n){var i=n.getState();if(!t.hasTextFocus()&&i.isRevealed&&i.searchString.length>0)return new e(t,n,!1,i.searchString,i.wholeWord,i.matchCase,null);var o,r,s=!1,a=t.getSelections();1===a.length&&a[0].isEmpty()?(s=!0,o=!0,r=!0):(o=i.wholeWord,r=i.matchCase);var u,l=t.getSelection(),c=null;if(l.isEmpty()){var h=t.getModel().getWordAtPosition(l.getStartPosition());if(!h)return null;u=h.word,c=new Be.L(l.startLineNumber,h.startColumn,l.startLineNumber,h.endColumn)}else u=t.getModel().getValueInRange(l).replace(/\r\n/g,"\n");return new e(t,n,s,u,o,r,c)},e.prototype.addSelectionToNextFindMatch=function(){var e=this._getNextMatch();if(!e)return null;var t=this._editor.getSelections();return new pM(t.concat(e),e,0)},e.prototype.moveSelectionToNextFindMatch=function(){var e=this._getNextMatch();if(!e)return null;var t=this._editor.getSelections();return new pM(t.slice(0,t.length-1).concat(e),e,0)},e.prototype._getNextMatch=function(){if(this.currentMatch){var e=this.currentMatch;return this.currentMatch=null,e}this.findController.highlightFindOptions();var t=this._editor.getSelections(),n=t[t.length-1],i=this._editor.getModel().findNextMatch(this.searchText,n.getEndPosition(),!1,this.matchCase,this.wholeWord?this._editor.getConfiguration().wordSeparators:null,!1);return i?new Be.L(i.range.startLineNumber,i.range.startColumn,i.range.endLineNumber,i.range.endColumn):null},e.prototype.addSelectionToPreviousFindMatch=function(){var e=this._getPreviousMatch();if(!e)return null;var t=this._editor.getSelections();return new pM(t.concat(e),e,0)},e.prototype.moveSelectionToPreviousFindMatch=function(){var e=this._getPreviousMatch();if(!e)return null;var t=this._editor.getSelections();return new pM(t.slice(0,t.length-1).concat(e),e,0)},e.prototype._getPreviousMatch=function(){if(this.currentMatch){var e=this.currentMatch;return this.currentMatch=null,e}this.findController.highlightFindOptions();var t=this._editor.getSelections(),n=t[t.length-1],i=this._editor.getModel().findPreviousMatch(this.searchText,n.getStartPosition(),!1,this.matchCase,this.wholeWord?this._editor.getConfiguration().wordSeparators:null,!1);return i?new Be.L(i.range.startLineNumber,i.range.startColumn,i.range.endLineNumber,i.range.endColumn):null},e.prototype.selectAll=function(){return this.findController.highlightFindOptions(),this._editor.getModel().findMatches(this.searchText,!0,!1,this.matchCase,this.wholeWord?this._editor.getConfiguration().wordSeparators:null,!1,1073741824)},e}(),mM=function(e){function t(t){var n=e.call(this)||this;return n._editor=t,n._ignoreSelectionChange=!1,n._session=null,n._sessionDispose=[],n}return cM(t,e),t.get=function(e){return e.getContribution(t.ID)},t.prototype.dispose=function(){this._endSession(),e.prototype.dispose.call(this)},t.prototype.getId=function(){return t.ID},t.prototype._beginSessionIfNeeded=function(e){var t=this;if(!this._session){var n=gM.create(this._editor,e);if(!n)return;this._session=n;var i={searchString:this._session.searchText};this._session.isDisconnectedFromFindController&&(i.wholeWordOverride=1,i.matchCaseOverride=1,i.isRegexOverride=2),e.getState().change(i,!1),this._sessionDispose=[this._editor.onDidChangeCursorSelection((function(e){t._ignoreSelectionChange||t._endSession()})),this._editor.onDidBlurEditorText((function(){t._endSession()})),e.getState().onFindReplaceStateChange((function(e){(e.matchCase||e.wholeWord)&&t._endSession()}))]}},t.prototype._endSession=function(){this._sessionDispose=(0,I.AS)(this._sessionDispose),this._session&&this._session.isDisconnectedFromFindController&&this._session.findController.getState().change({wholeWordOverride:0,matchCaseOverride:0,isRegexOverride:0},!1),this._session=null},t.prototype._setSelections=function(e){this._ignoreSelectionChange=!0,this._editor.setSelections(e),this._ignoreSelectionChange=!1},t.prototype._expandEmptyToWord=function(e,t){if(!t.isEmpty())return t;var n=e.getWordAtPosition(t.getStartPosition());return n?new Be.L(t.startLineNumber,n.startColumn,t.startLineNumber,n.endColumn):t},t.prototype._applySessionResult=function(e){e&&(this._setSelections(e.selections),e.revealRange&&this._editor.revealRangeInCenterIfOutsideViewport(e.revealRange,e.revealScrollType))},t.prototype.getSession=function(e){return this._session},t.prototype.addSelectionToNextFindMatch=function(e){if(!this._session){var t=this._editor.getSelections();if(t.length>1){var n=e.getState().matchCase;if(!IM(this._editor.getModel(),t,n)){for(var i=this._editor.getModel(),o=[],r=0,s=t.length;r0&&n.isRegex)t=this._editor.getModel().findMatches(n.searchString,!0,n.isRegex,n.matchCase,n.wholeWord?this._editor.getConfiguration().wordSeparators:null,!1,1073741824);else{if(this._beginSessionIfNeeded(e),!this._session)return;t=this._session.selectAll()}if(t.length>0){for(var i=this._editor.getSelection(),o=0,r=t.length;o1){var u=r.getState().matchCase;if(!IM(t.getModel(),a,u))return null}s=gM.create(t,r)}if(!s)return null;var l=null,c=No.UG.has(n);if(s.currentMatch){if(c)return null;if(!t.getConfiguration().contribInfo.occurrencesHighlight)return null;l=s.currentMatch}if(/^[ \t]+$/.test(s.searchText))return null;if(s.searchText.length>200)return null;var h=r.getState(),d=h.matchCase;if(h.isRevealed){var f=h.searchString;d||(f=f.toLowerCase());var p=s.searchText;if(d||(p=p.toLowerCase()),f===p&&s.matchCase===h.matchCase&&s.wholeWord===h.wholeWord&&!h.isRegex)return null}return new SM(l,s.searchText,s.matchCase,s.wholeWord?t.getConfiguration().wordSeparators:null)},t.prototype._setState=function(e){if(SM.softEquals(this.state,e))this.state=e;else if(this.state=e,this.state){var n=this.editor.getModel();if(!n.isTooLargeForTokenization()){var i=No.UG.has(n),o=n.findMatches(this.state.searchText,!0,!1,this.state.matchCase,this.state.wordSeparators,!1).map((function(e){return e.range}));o.sort(s.Q.compareRangesUsingStarts);var r=this.editor.getSelections();r.sort(s.Q.compareRangesUsingStarts);for(var a=[],u=0,l=0,c=o.length,h=r.length;u=h)a.push(d),u++;else{var f=s.Q.compareRangesUsingStarts(d,r[l]);f<0?(!r[l].isEmpty()&&s.Q.areIntersecting(d,r[l])||a.push(d),u++):(f>0||u++,l++)}}var p=a.map((function(e){return{range:e,options:i?t._SELECTION_HIGHLIGHT:t._SELECTION_HIGHLIGHT_OVERVIEW}}));this.decorations=this.editor.deltaDecorations(this.decorations,p)}}else this.decorations=this.editor.deltaDecorations(this.decorations,[])},t.prototype.dispose=function(){this._setState(null),e.prototype.dispose.call(this)},t.ID="editor.contrib.selectionHighlighter",t._SELECTION_HIGHLIGHT_OVERVIEW=Ho.kI.register({stickiness:Xi.kK.NeverGrowsWhenTypingAtEdges,className:"selectionHighlight",overviewRuler:{color:Ir(ca),darkColor:Ir(ca),position:Xi.A5.Center}}),t._SELECTION_HIGHLIGHT=Ho.kI.register({stickiness:Xi.kK.NeverGrowsWhenTypingAtEdges,className:"selectionHighlight"}),t}(I.jG);function IM(e,t,n){for(var i=NM(e,t[0],!n),o=1,r=t.length;o1;un(this.element,"multiple",e),this.keyMultipleSignatures.set(e),this.signature.innerHTML="",this.docs.innerHTML="";var t=this.hints.signatures[this.currentSignature];if(t){var n=Qn(this.signature,EM(".code")),i=t.parameters.length>0,r=this.editor.getConfiguration().fontInfo;n.style.fontSize=r.fontSize+"px",n.style.fontFamily=r.fontFamily,i?this.renderParameters(n,t,this.hints.activeParameter):Qn(n,EM("span")).textContent=t.label,(0,I.AS)(this.renderDisposeables),this.renderDisposeables=[];var s=t.parameters[this.hints.activeParameter];if(s&&s.documentation){var a=EM("span.documentation");if("string"==typeof s.documentation)a.textContent=s.documentation;else{var u=this.markdownRenderer.render(s.documentation);sn(u.element,"markdown-docs"),this.renderDisposeables.push(u),a.appendChild(u.element)}Qn(this.docs,EM("p",null,a))}un(this.signature,"has-docs",!!t.documentation),"string"==typeof t.documentation?Qn(this.docs,EM("p",null,t.documentation)):(u=this.markdownRenderer.render(t.documentation),sn(u.element,"markdown-docs"),this.renderDisposeables.push(u),Qn(this.docs,u.element));var l=String(this.currentSignature+1);if(this.hints.signatures.length<10&&(l+="/"+this.hints.signatures.length),this.overloads.textContent=l,s){var c=s.label;this.announcedLabel!==c&&(Ep(o.k("hint","{0}, hint",c)),this.announcedLabel=c)}this.editor.layoutContentWidget(this),this.scrollbar.scanDomNode()}},e.prototype.renderParameters=function(e,t,n){for(var i,o=t.label.length,r=0,s=t.parameters.length-1;s>=0;s--){var a=t.parameters[s],u=0,l=0;(r=t.label.lastIndexOf(a.label,o-1))>=0&&(u=r,l=r+a.label.length),(i=document.createElement("span")).textContent=t.label.substring(l,o),qn(e,i),(i=document.createElement("span")).className="parameter "+(s===n?"active":""),i.textContent=t.label.substring(u,l),qn(e,i),o=u}(i=document.createElement("span")).textContent=t.label.substring(0,o),qn(e,i)},e.prototype.next=function(){var e=this.hints.signatures.length,t=this.currentSignature%e==e-1;return e<2||t?(this.cancel(),!1):(this.currentSignature++,this.render(),!0)},e.prototype.previous=function(){var e=this.hints.signatures.length,t=0===this.currentSignature;return e<2||t?(this.cancel(),!1):(this.currentSignature--,this.render(),!0)},e.prototype.cancel=function(){this.model.cancel()},e.prototype.getDomNode=function(){return this.element},e.prototype.getId=function(){return e.ID},e.prototype.trigger=function(){this.model.trigger(0)},e.prototype.updateMaxHeight=function(){var e=Math.max(this.editor.getLayoutInfo().height/4,250);this.element.style.maxHeight=e+"px"},e.prototype.dispose=function(){this.disposables=(0,I.AS)(this.disposables),this.renderDisposeables=(0,I.AS)(this.renderDisposeables),this.model&&(this.model.dispose(),this.model=null)},e.ID="editor.widget.parameterHintsWidget",e=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([TM(1,he),TM(2,z_),TM(3,o_)],e)}();Tr((function(e,t){var n=e.getColor($s);if(n){var i=e.type===Nr?2:1;t.addRule(".monaco-editor .parameter-hints-widget { border: "+i+"px solid "+n+"; }"),t.addRule(".monaco-editor .parameter-hints-widget.multiple .body { border-left: 1px solid "+n.transparent(.5)+"; }"),t.addRule(".monaco-editor .parameter-hints-widget .signature.has-docs { border-bottom: 1px solid "+n.transparent(.5)+"; }")}var o=e.getColor(Xs);o&&t.addRule(".monaco-editor .parameter-hints-widget { background-color: "+o+"; }");var r=e.getColor(ns);r&&t.addRule(".monaco-editor .parameter-hints-widget a { color: "+r+"; }");var s=e.getColor(is);s&&t.addRule(".monaco-editor .parameter-hints-widget code { background-color: "+s+"; }")}));var OM=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),RM=function(){function e(e,t){this.editor=e,this.widget=t.createInstance(jM,this.editor)}return e.get=function(t){return t.getContribution(e.ID)},e.prototype.getId=function(){return e.ID},e.prototype.cancel=function(){this.widget.cancel()},e.prototype.previous=function(){this.widget.previous()},e.prototype.next=function(){this.widget.next()},e.prototype.trigger=function(){this.widget.trigger()},e.prototype.dispose=function(){this.widget=(0,I.AS)(this.widget)},e.ID="editor.controller.parameterHints",e=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([(t=1,n=N._Y,function(e,i){n(e,i,t)})],e);var t,n}(),PM=function(e){function t(){return e.call(this,{id:"editor.action.triggerParameterHints",label:o.k("parameterHints.trigger.label","Trigger Parameter Hints"),alias:"Trigger Parameter Hints",precondition:Oe.hasSignatureHelpProvider,kbOpts:{kbExpr:Oe.editorTextFocus,primary:3082,weight:100}})||this}return OM(t,e),t.prototype.run=function(e,t){var n=RM.get(t);n&&n.trigger()},t}(xe);Ae(RM),Ee(PM);var zM=Ne.bindToContribution(RM.get);Te(new zM({id:"closeParameterHints",precondition:xM.Visible,handler:function(e){return e.cancel()},kbOpts:{weight:175,kbExpr:Oe.editorTextFocus,primary:9,secondary:[1033]}})),Te(new zM({id:"showPrevParameterHint",precondition:ne.and(xM.Visible,xM.MultipleSignatures),handler:function(e){return e.previous()},kbOpts:{weight:175,kbExpr:Oe.editorTextFocus,primary:16,secondary:[528],mac:{primary:16,secondary:[528,302]}}})),Te(new zM({id:"showNextParameterHint",precondition:ne.and(xM.Visible,xM.MultipleSignatures),handler:function(e){return e.next()},kbOpts:{weight:175,kbExpr:Oe.editorTextFocus,primary:18,secondary:[530],mac:{primary:18,secondary:[530,300]}}}));var WM,FM=(0,N.u1)("IWorkspaceEditService"),BM=function(){function e(e){this.value=e}return e.prototype.contains=function(t){return this.value===t||(0,p.startsWith)(t,this.value+e.sep)},e.sep=".",e.Empty=new e(""),e.Refactor=new e("refactor"),e.Source=new e("source"),e.SourceOrganizeImports=new e("source.organizeImports"),e}();function HM(e,t,n,i){void 0===i&&(i=st.None);var o={only:n&&n.filter&&n.filter.kind?n.filter.kind.value:void 0,trigger:n&&"manual"===n.type?No.Kj.Manual:No.Kj.Automatic},r=No.iM.all(e).map((function(i){return pt((function(n){return i.provideCodeActions(e,t,o,n)})).then((function(e){return Array.isArray(e)?e.filter((function(e){return function(e,t){return!!t&&(!(e&&e.kind&&(!t.kind||!e.kind.contains(t.kind)))&&!(t.kind&&BM.Source.contains(t.kind)&&(!e||!e.includeSourceActions)))}(n&&n.filter,e)})):[]}),(function(e){if((0,S.D7)(e))throw e;return(0,S.M_)(e),[]}))}));return Promise.all(r).then(tu.Bq).then((function(e){return(0,tu.ZN)(e,VM)}))}function VM(e,t){var n=!(0,tu.Ct)(e.diagnostics),i=!(0,tu.Ct)(t.diagnostics);return n?i?e.diagnostics[0].message.localeCompare(t.diagnostics[0].message):-1:i?1:0}!function(e){e[e.IfSingle=1]="IfSingle",e[e.First=2]="First",e[e.Never=3]="Never"}(WM||(WM={})),De("_executeCodeActionProvider",(function(e,t){var n=t.resource,i=t.range;if(!(n instanceof L.A&&s.Q.isIRange(i)))throw(0,S.Qg)();var o=e.get(K.S).getModel(n);if(!o)throw(0,S.Qg)();return HM(o,o.validateRange(i),{type:"manual",filter:{includeSourceActions:!0}})}));var UM=new ce("supportedCodeAction",""),YM=function(){function e(e,t,n,i,o){void 0===i&&(i=250);var r=this;this._editor=e,this._markerService=t,this._signalChange=n,this._progressService=o,this._disposables=[],this._disposables.push((0,X.IC)(this._markerService.onMarkerChanged,(function(e,t){return e?e.concat(t):t}),i/2)((function(e){return r._onMarkerChanges(e)})),(0,X.IC)(this._editor.onDidChangeCursorPosition,(function(e,t){return t}),i)((function(e){return r._onCursorChange()})))}return e.prototype.dispose=function(){this._disposables=(0,I.AS)(this._disposables)},e.prototype.trigger=function(e){var t=this._getRangeOfSelectionUnlessWhitespaceEnclosed(e);return this._createEventAndSignalChange(e,t)},e.prototype._onMarkerChanges=function(e){for(var t=this._editor.getModel().uri,n=0,i=e;n=t._editor.getModel().getLineCount()&&t._futureFixes.cancel()}))),this._disposables.push(hn(this._domNode,"click",(function(e){t._editor.focus();var n=Tn(t._domNode),i=n.top,o=n.height,r=t._editor.getConfiguration().lineHeight,s=Math.floor(r/3);t._position&&t._position.position.lineNumber0?i.isEmpty()&&e.every((function(e){return e.kind&&BM.Refactor.contains(e.kind)}))?t.hide():t._show():t.hide()})).catch((function(e){t.hide()}))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"title",{get:function(){return this._domNode.title},set:function(e){this._domNode.title=e},enumerable:!0,configurable:!0}),e.prototype._show=function(){var t=this._editor.getConfiguration();if(t.contribInfo.lightbulbEnabled){var n=this._model.position.lineNumber,i=this._editor.getModel();if(i){var o=i.getOptions().tabSize,r=i.getLineContent(n),s=Ho.Bz.computeIndentLevel(r,o),a=n;t.fontInfo.spaceWidth*s>22||(n>1?a-=1:a+=1),this._position={position:{lineNumber:a,column:1},preference:e._posPref},this._editor.layoutContentWidget(this)}}},e.prototype.hide=function(){this._position=null,this._model=null,this._futureFixes.cancel(),this._editor.layoutContentWidget(this)},e._posPref=[ou.EXACT],e}()),qM=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),KM=function(e,t){return function(n,i){t(n,i,e)}};function JM(e){return ne.regex(UM.keys()[0],new RegExp("(\\s|^)"+(0,p.escapeRegExpCharacters)(e.value)+"\\b"))}var XM=function(){function e(e,t,n,i,o,r,s,a){var u=this;this._commandService=r,this._keybindingService=s,this._bulkEditService=a,this._disposables=[],this._editor=e,this._model=new ZM(this._editor,t,n,i),this._codeActionContextMenu=new GM(e,o,(function(e){return u._onApplyCodeAction(e)})),this._lightBulbWidget=new QM(e),this._updateLightBulbTitle(),this._disposables.push(this._codeActionContextMenu.onDidExecuteCodeAction((function(e){return u._model.trigger({type:"auto",filter:{}})})),this._lightBulbWidget.onClick(this._handleLightBulbSelect,this),this._model.onDidChangeFixes((function(e){return u._onCodeActionsEvent(e)})),this._keybindingService.onDidUpdateKeybindings(this._updateLightBulbTitle,this))}return e.get=function(t){return t.getContribution(e.ID)},e.prototype.dispose=function(){this._model.dispose(),(0,I.AS)(this._disposables)},e.prototype._onCodeActionsEvent=function(e){var t=this;this._activeRequest&&(this._activeRequest.cancel(),this._activeRequest=void 0),e&&e.actions&&(this._activeRequest=e.actions),e&&e.actions&&e.trigger.filter&&e.trigger.filter.kind?e.actions.then((function(n){e.trigger.autoApply===WM.First||e.trigger.autoApply===WM.IfSingle&&1===n.length?t._onApplyCodeAction(n[0]):t._codeActionContextMenu.show(e.actions,e.position)})).catch(S.dz):e&&"manual"===e.trigger.type?this._codeActionContextMenu.show(e.actions,e.position):e&&e.actions?this._codeActionContextMenu.isVisible?this._codeActionContextMenu.show(e.actions,e.position):this._lightBulbWidget.model=e:this._lightBulbWidget.hide()},e.prototype.getId=function(){return e.ID},e.prototype._handleLightBulbSelect=function(e){this._lightBulbWidget.model.actions&&this._codeActionContextMenu.show(this._lightBulbWidget.model.actions,e)},e.prototype.triggerFromEditorSelection=function(e,t){return this._model.trigger({type:"manual",filter:e,autoApply:t})},e.prototype._updateLightBulbTitle=function(){var e,t=this._keybindingService.lookupKeybinding(eC.Id);e=t?o.k("quickFixWithKb","Show Fixes ({0})",t.getLabel()):o.k("quickFix","Show Fixes"),this._lightBulbWidget.title=e},e.prototype._onApplyCodeAction=function(e){return J.g3.wrap(function(e,t,n,i){return o=this,r=void 0,a=function(){return function(e,t){var n,i,o,r,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return r={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function a(r){return function(a){return function(r){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,i&&(o=2&r[0]?i.return:r[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,r[1])).done)return o;switch(i=0,o&&(r=[2&r[0],o.value]),r[0]){case 0:case 1:o=r;break;case 4:return s.label++,{value:r[1],done:!1};case 5:s.label++,i=r[1],r=[0];continue;case 7:r=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==r[0]&&2!==r[0])){s=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([KM(1,v_),KM(2,he),KM(3,Ub),KM(4,Nf),KM(5,D),KM(6,xf),KM(7,FM)],e)}();function $M(e,t,n,i){var o=XM.get(e);if(o){var r=e.getPosition();o.triggerFromEditorSelection(n,i).then((function(n){n&&n.length||Hb.get(e).showMessage(t,r)}))}}var eC=function(e){function t(){return e.call(this,{id:t.Id,label:o.k("quickfix.trigger.label","Quick Fix..."),alias:"Quick Fix",precondition:ne.and(Oe.writable,Oe.hasCodeActionsProvider),kbOpts:{kbExpr:Oe.editorTextFocus,primary:2132,weight:100}})||this}return qM(t,e),t.prototype.run=function(e,t){return $M(t,o.k("editor.action.quickFix.noneMessage","No code actions available"))},t.Id="editor.action.quickFix",t}(xe),tC=function(){function e(e,t){this.kind=e,this.apply=t}return e.fromUser=function(t){return t&&"object"==typeof t?new e(e.getKindFromUser(t),e.getApplyFromUser(t)):new e(BM.Empty,WM.IfSingle)},e.getApplyFromUser=function(e){switch("string"==typeof e.apply?e.apply.toLowerCase():""){case"first":return WM.First;case"never":return WM.Never;default:return WM.IfSingle}},e.getKindFromUser=function(e){return"string"==typeof e.kind?new BM(e.kind):BM.Empty},e}(),nC=function(e){function t(){return e.call(this,{id:t.Id,precondition:ne.and(Oe.writable,Oe.hasCodeActionsProvider)})||this}return qM(t,e),t.prototype.runEditorCommand=function(e,t,n){var i=tC.fromUser(n);return $M(t,o.k("editor.action.quickFix.noneMessage","No code actions available"),{kind:i.kind,includeSourceActions:!0},i.apply)},t.Id="editor.action.codeAction",t}(Ne),iC=function(e){function t(){return e.call(this,{id:t.Id,label:o.k("refactor.label","Refactor..."),alias:"Refactor",precondition:ne.and(Oe.writable,Oe.hasCodeActionsProvider),kbOpts:{kbExpr:Oe.editorTextFocus,primary:3120,mac:{primary:1328},weight:100},menuOpts:{group:"1_modification",order:2,when:ne.and(Oe.writable,JM(BM.Refactor))}})||this}return qM(t,e),t.prototype.run=function(e,t){return $M(t,o.k("editor.action.refactor.noneMessage","No refactorings available"),{kind:BM.Refactor},WM.Never)},t.Id="editor.action.refactor",t}(xe),oC=function(e){function t(){return e.call(this,{id:t.Id,label:o.k("source.label","Source Action..."),alias:"Source Action",precondition:ne.and(Oe.writable,Oe.hasCodeActionsProvider),menuOpts:{group:"1_modification",order:2.1,when:ne.and(Oe.writable,JM(BM.Source))}})||this}return qM(t,e),t.prototype.run=function(e,t){return $M(t,o.k("editor.action.source.noneMessage","No source actions available"),{kind:BM.Source,includeSourceActions:!0},WM.Never)},t.Id="editor.action.sourceAction",t}(xe),rC=function(e){function t(){return e.call(this,{id:t.Id,label:o.k("organizeImports.label","Organize Imports"),alias:"Organize Imports",precondition:ne.and(Oe.writable,JM(BM.SourceOrganizeImports)),kbOpts:{kbExpr:Oe.editorTextFocus,primary:1581,weight:100}})||this}return qM(t,e),t.prototype.run=function(e,t){return $M(t,o.k("editor.action.organize.noneMessage","No organize imports action available"),{kind:BM.SourceOrganizeImports,includeSourceActions:!0},WM.IfSingle)},t.Id="editor.action.organizeImports",t}(xe);Ae(XM),Ee(eC),Ee(iC),Ee(oC),Ee(rC),Te(new nC);var sC=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),aC={getMetaTitle:function(e){return e.references.length>1&&o.k("meta.titleReference"," – {0} references",e.references.length)}},uC=function(){function e(e,t){e instanceof Pv&&Av.inPeekEditor.bindTo(t)}return e.prototype.dispose=function(){},e.prototype.getId=function(){return e.ID},e.ID="editor.contrib.referenceController",e=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([(t=1,n=he,function(e,i){n(e,i,t)})],e);var t,n}(),lC=function(e){function t(){return e.call(this,{id:"editor.action.referenceSearch.trigger",label:o.k("references.action.label","Find All References"),alias:"Find All References",precondition:ne.and(Oe.hasReferenceProvider,Av.notInPeekEditor,Oe.isInEmbeddedEditor.toNegated()),kbOpts:{kbExpr:Oe.editorTextFocus,primary:1094,weight:100},menuOpts:{group:"navigation",order:1.5}})||this}return sC(t,e),t.prototype.run=function(e,t){var n=Fb.get(t);if(n){var i=t.getSelection(),o=t.getModel(),r=ft((function(e){return dC(o,i.getStartPosition()).then((function(e){return new Kv(e)}))}));n.toggleWidget(i,r,aC)}},t}(xe);function cC(e,t){hC(e,(function(e){return e.closeWidget()}))}function hC(e,t){var n=function(e){var t=e.get(Ce).getFocusedCodeEditor();return t instanceof Pv?t.getParentEditor():t}(e);if(n){var i=Fb.get(n);i&&t(i)}}function dC(e,t,n){var i=No.aW.ordered(e).map((function(n){return pt((function(i){return n.provideReferences(e,t,{includeDeclaration:!0},i)})).then((function(e){if(Array.isArray(e))return e}),(function(e){(0,S.M_)(e)}))}));return Promise.all(i).then((function(e){for(var t=[],n=0,i=e;n=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([(t=1,n=Lr,function(e,i){n(e,i,t)})],e);var t,n}();const pC=fC;var gC=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),mC=function(e,t){return function(n,i){t(n,i,e)}},vC=function(e,t,n,i){return new(n||(n=Promise))((function(o,r){function s(e){try{u(i.next(e))}catch(e){r(e)}}function a(e){try{u(i.throw(e))}catch(e){r(e)}}function u(e){e.done?o(e.value):new n((function(t){t(e.value)})).then(s,a)}u((i=i.apply(e,t||[])).next())}))},yC=function(e,t){var n,i,o,r,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return r={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function a(r){return function(a){return function(r){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,i&&(o=2&r[0]?i.return:r[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,r[1])).done)return o;switch(i=0,o&&(r=[2&r[0],o.value]),r[0]){case 0:case 1:o=r;break;case 4:return s.label++,{value:r[1],done:!1};case 5:s.label++,i=r[1],r=[0];continue;case 7:r=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==r[0]&&2!==r[0])){s=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]0},e.prototype.resolveRenameLocation=function(){return vC(this,void 0,void 0,(function(){var e,t,n,i=this;return yC(this,(function(o){switch(o.label){case 0:return(e=this._provider[0]).resolveRenameLocation?[4,pt((function(t){return e.resolveRenameLocation(i.model,i.position,t)}))]:[3,2];case 1:t=o.sent(),o.label=2;case 2:return t||(n=this.model.getWordAtPosition(this.position))&&(t={range:new s.Q(this.position.lineNumber,n.startColumn,this.position.lineNumber,n.endColumn),text:n.word}),[2,t]}}))}))},e.prototype.provideRenameEdits=function(e,t,n,i){return void 0===t&&(t=0),void 0===n&&(n=[]),void 0===i&&(i=this.position),vC(this,void 0,void 0,(function(){var i,r,s=this;return yC(this,(function(a){switch(a.label){case 0:return t>=this._provider.length?[2,{edits:void 0,rejectReason:n.join("\n")}]:(i=this._provider[t],[4,pt((function(t){return i.provideRenameEdits(s.model,s.position,e,t)}))]);case 1:return(r=a.sent())?r.rejectReason?[2,this.provideRenameEdits(e,t+1,n.concat(r.rejectReason))]:[2,r]:[2,this.provideRenameEdits(e,t+1,n.concat(o.k("no result","No result.")))]}}))}))},e}(),_C=new ce("renameInputVisible",!1),wC=function(){function e(e,t,n,i,o,r){this.editor=e,this._notificationService=t,this._bulkEditService=n,this._progressService=i,this._renameInputField=new pC(e,r),this._renameInputVisible=_C.bindTo(o)}return e.get=function(t){return t.getContribution(e.ID)},e.prototype.dispose=function(){this._renameInputField.dispose()},e.prototype.getId=function(){return e.ID},e.prototype.run=function(){return vC(this,void 0,void 0,(function(){var e,t,n,i,r,a,u,l=this;return yC(this,(function(c){switch(c.label){case 0:if(e=this.editor.getPosition(),!(t=new bC(this.editor.getModel(),e)).hasProvider())return[2,void 0];c.label=1;case 1:return c.trys.push([1,3,,4]),[4,t.resolveRenameLocation()];case 2:return n=c.sent(),[3,4];case 3:return i=c.sent(),Hb.get(this.editor).showMessage(i,e),[2,void 0];case 4:return n?(r=this.editor.getSelection(),a=0,u=n.text.length,s.Q.isEmpty(r)||s.Q.spansMultipleLines(r)||!s.Q.containsRange(n.range,r)||(a=Math.max(0,r.startColumn-n.range.startColumn),u=Math.min(n.range.endColumn,r.endColumn)-n.range.startColumn),this._renameInputVisible.set(!0),[2,this._renameInputField.getInput(n.range,n.text,a,u).then((function(e){if(l._renameInputVisible.reset(),"boolean"!=typeof e){l.editor.focus();var i=new sd(l.editor,15),r=J.g3.wrap(t.provideRenameEdits(e,0,[],s.Q.lift(n.range).getStartPosition()).then((function(t){if(!t.rejectReason)return l._bulkEditService.apply(t,{editor:l.editor}).then((function(t){t.ariaSummary&&Ep(o.k("aria","Successfully renamed '{0}' to '{1}'. Summary: {2}",n.text,e,t.ariaSummary))}));i.validate(l.editor)?Hb.get(l.editor).showMessage(t.rejectReason,l.editor.getPosition()):l._notificationService.info(t.rejectReason)}),(function(e){return l._notificationService.error(o.k("rename.failed","Rename failed to execute.")),J.g3.wrapError(e)})));return l._progressService.showWhile(r,250),r}e&&l.editor.focus()}),(function(e){return l._renameInputVisible.reset(),J.g3.wrapError(e)}))]):[2,void 0]}}))}))},e.prototype.acceptRenameInput=function(){this._renameInputField.acceptInput()},e.prototype.cancelRenameInput=function(){this._renameInputField.cancelInput(!0)},e.ID="editor.contrib.renameController",e=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([mC(1,Cr),mC(2,FM),mC(3,Ub),mC(4,he),mC(5,Lr)],e)}(),MC=function(e){function t(){return e.call(this,{id:"editor.action.rename",label:o.k("rename.label","Rename Symbol"),alias:"Rename Symbol",precondition:ne.and(Oe.writable,Oe.hasRenameProvider),kbOpts:{kbExpr:Oe.editorTextFocus,primary:60,weight:100},menuOpts:{group:"1_modification",order:1.1}})||this}return gC(t,e),t.prototype.runCommand=function(t,n){var i=this,o=t.get(Ce),s=n||[void 0,void 0],a=s[0],u=s[1];return L.A.isUri(a)&&r.y.isIPosition(u)?o.openCodeEditor({resource:a},o.getActiveCodeEditor()).then((function(e){e.setPosition(u),e.invokeWithinContext((function(t){return i.reportTelemetry(t,e),i.run(t,e)}))}),S.dz):e.prototype.runCommand.call(this,t,n)},t.prototype.run=function(e,t){var n=wC.get(t);if(n)return J.g3.wrap(n.run())},t}(xe);Ae(wC),Ee(MC);var CC=Ne.bindToContribution(wC.get);Te(new CC({id:"acceptRenameInput",precondition:_C,handler:function(e){return e.acceptRenameInput()},kbOpts:{weight:199,kbExpr:Oe.focus,primary:3}})),Te(new CC({id:"cancelRenameInput",precondition:_C,handler:function(e){return e.cancelRenameInput()},kbOpts:{weight:199,kbExpr:Oe.focus,primary:9,secondary:[1033]}})),ke("_executeDocumentRenameProvider",(function(e,t,n){var i=n.newName;if("string"!=typeof i)throw(0,S.Qg)("newName");return function(e,t,n){return vC(this,void 0,void 0,(function(){return yC(this,(function(i){return[2,new bC(e,t).provideRenameEdits(n)]}))}))}(e,t,i)}));var SC=n(6804),LC=n(6360),IC=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),NC=function(){function e(){}return Object.defineProperty(e.prototype,"range",{get:function(){return new s.Q(this.start.lineNumber,this.start.column,this.end.lineNumber,this.end.column)},enumerable:!0,configurable:!0}),e}(),xC=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return IC(t,e),Object.defineProperty(t.prototype,"hasChildren",{get:function(){return this.children&&this.children.length>0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isEmpty",{get:function(){return!this.hasChildren&&!this.parent},enumerable:!0,configurable:!0}),t.prototype.append=function(e){return!!e&&(e.parent=this,this.children||(this.children=[]),e instanceof t?e.children&&this.children.push.apply(this.children,e.children):this.children.push(e),!0)},t}(NC),DC=function(e){function t(){var t=e.call(this)||this;return t.elements=new xC,t.elements.parent=t,t}return IC(t,e),t}(NC),kC=function(e,t,n){this.range=e,this.bracket=t,this.bracketType=n};function TC(e){var t=new NC;return t.start=e.range.getStartPosition(),t.end=e.range.getEndPosition(),t}var EC=function(e,t,n){this.lineNumber=n,this.lineText=e.getLineContent(),this.startOffset=e.getStartOffset(t),this.endOffset=e.getEndOffset(t),this.type=e.getStandardTokenType(t),this.languageId=e.getLanguageId(t)},AC=function(){function e(e){this._model=e,this._lineCount=this._model.getLineCount(),this._versionId=this._model.getVersionId(),this._lineNumber=0,this._tokenIndex=0,this._lineTokens=null,this._advance()}return e.prototype._advance=function(){for(this._lineTokens&&(this._tokenIndex++,this._tokenIndex>=this._lineTokens.getCount()&&(this._lineTokens=null));this._lineNumber0)return this._nextBuff.shift();var e=this._rawTokenScanner.next();if(!e)return null;var t=e.lineNumber,n=e.lineText,i=e.type,o=e.startOffset,r=e.endOffset;this._cachedLanguageId!==e.languageId&&(this._cachedLanguageId=e.languageId,this._cachedLanguageBrackets=Ge.cx.getBracketsSupport(this._cachedLanguageId));var a,u=this._cachedLanguageBrackets;if(!u||(0,SC.Yo)(i))return new kC(new s.Q(t,o+1,t,r+1),0,null);do{if(a=LC.Fu.findNextBracketInToken(u.forwardRegex,t,n,o,r)){var l=a.startColumn-1,c=a.endColumn-1;o=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([(t=0,n=K.S,function(e,i){n(e,i,t)})],e);var t,n}(),zC=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),WC=function(e){this.editor=e,this.next=null,this.previous=null,this.selection=e.getSelection()},FC=function(){function e(e,t){this.editor=e,this._tokenSelectionSupport=t.createInstance(PC),this._state=null,this._ignoreSelection=!1}return e.get=function(t){return t.getContribution(e.ID)},e.prototype.dispose=function(){},e.prototype.getId=function(){return e.ID},e.prototype.run=function(e){var t=this,n=this.editor.getSelection(),i=this.editor.getModel();this._state&&this._state.editor!==this.editor&&(this._state=null);var o=J.g3.as(null);return this._state||(o=this._tokenSelectionSupport.getRangesToPosition(i.uri,n.getStartPosition()).then((function(e){if(!tu.Ct(e)){var n;e.filter((function(e){var n=t.editor.getSelection(),i=new s.Q(e.range.startLineNumber,e.range.startColumn,e.range.endLineNumber,e.range.endColumn);return i.containsPosition(n.getStartPosition())&&i.containsPosition(n.getEndPosition())})).forEach((function(e){var i=e.range,o=new WC(t.editor);o.selection=new s.Q(i.startLineNumber,i.startColumn,i.endLineNumber,i.endColumn),n&&(o.next=n,n.previous=o),n=o}));var i=new WC(t.editor);i.next=n,n&&(n.previous=i),t._state=i;var o=t.editor.onDidChangeCursorPosition((function(e){t._ignoreSelection||(t._state=null,o.dispose())}))}}))),o.then((function(){if(t._state&&(t._state=e?t._state.next:t._state.previous,t._state)){t._ignoreSelection=!0;try{t.editor.setSelection(t._state.selection)}finally{t._ignoreSelection=!1}}}))},e.ID="editor.contrib.smartSelectController",e=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([(t=1,n=N._Y,function(e,i){n(e,i,t)})],e);var t,n}(),BC=function(e){function t(t,n){var i=e.call(this,n)||this;return i._forward=t,i}return zC(t,e),t.prototype.run=function(e,t){var n=FC.get(t);if(n)return n.run(this._forward)},t}(xe),HC=function(e){function t(){return e.call(this,!0,{id:"editor.action.smartSelect.grow",label:o.k("smartSelect.grow","Expand Select"),alias:"Expand Select",precondition:null,kbOpts:{kbExpr:Oe.editorTextFocus,primary:1553,mac:{primary:3345},weight:100},menubarOpts:{menuId:ve.MenubarSelectionMenu,group:"1_basic",title:o.k({key:"miSmartSelectGrow",comment:["&& denotes a mnemonic"]},"&&Expand Selection"),order:2}})||this}return zC(t,e),t}(BC),VC=function(e){function t(){return e.call(this,!1,{id:"editor.action.smartSelect.shrink",label:o.k("smartSelect.shrink","Shrink Select"),alias:"Shrink Select",precondition:null,kbOpts:{kbExpr:Oe.editorTextFocus,primary:1551,mac:{primary:3343},weight:100},menubarOpts:{menuId:ve.MenubarSelectionMenu,group:"1_basic",title:o.k({key:"miSmartSelectShrink",comment:["&& denotes a mnemonic"]},"&&Shrink Selection"),order:3}})||this}return zC(t,e),t}(BC);Ae(FC),Ee(HC),Ee(VC),n(1417);var UC,YC=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),ZC=function(){function e(){this.text("")}return e.isDigitCharacter=function(e){return e>=48&&e<=57},e.isVariableCharacter=function(e){return 95===e||e>=97&&e<=122||e>=65&&e<=90},e.prototype.text=function(e){this.value=e,this.pos=0},e.prototype.tokenText=function(e){return this.value.substr(e.pos,e.len)},e.prototype.next=function(){if(this.pos>=this.value.length)return{type:14,pos:this.pos,len:0};var t,n=this.pos,i=0,o=this.value.charCodeAt(n);if("number"==typeof(t=e._table[o]))return this.pos+=1,{type:t,pos:n,len:1};if(e.isDigitCharacter(o)){t=8;do{i+=1,o=this.value.charCodeAt(n+i)}while(e.isDigitCharacter(o));return this.pos+=i,{type:t,pos:n,len:i}}if(e.isVariableCharacter(o)){t=9;do{o=this.value.charCodeAt(n+ ++i)}while(e.isVariableCharacter(o)||e.isDigitCharacter(o));return this.pos+=i,{type:t,pos:n,len:i}}t=10;do{i+=1,o=this.value.charCodeAt(n+i)}while(!isNaN(o)&&void 0===e._table[o]&&!e.isDigitCharacter(o)&&!e.isVariableCharacter(o));return this.pos+=i,{type:t,pos:n,len:i}},e._table=((UC={})[36]=0,UC[58]=1,UC[44]=2,UC[123]=3,UC[125]=4,UC[92]=5,UC[47]=6,UC[124]=7,UC[43]=11,UC[45]=12,UC[63]=13,UC),e}(),GC=function(){function e(){this._children=[]}return e.prototype.appendChild=function(e){return e instanceof QC&&this._children[this._children.length-1]instanceof QC?this._children[this._children.length-1].value+=e.value:(e.parent=this,this._children.push(e)),this},e.prototype.replace=function(e,t){var n=e.parent,i=n.children.indexOf(e),o=n.children.slice(0);o.splice.apply(o,[i,1].concat(t)),n._children=o,t.forEach((function(e){return e.parent=n}))},Object.defineProperty(e.prototype,"children",{get:function(){return this._children},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"snippet",{get:function(){for(var e=this;;){if(!e)return;if(e instanceof iS)return e;e=e.parent}},enumerable:!0,configurable:!0}),e.prototype.toString=function(){return this.children.reduce((function(e,t){return e+t.toString()}),"")},e.prototype.len=function(){return 0},e}(),QC=function(e){function t(t){var n=e.call(this)||this;return n.value=t,n}return YC(t,e),t.prototype.toString=function(){return this.value},t.prototype.len=function(){return this.value.length},t.prototype.clone=function(){return new t(this.value)},t}(GC),qC=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return YC(t,e),t}(GC),KC=function(e){function t(t){var n=e.call(this)||this;return n.index=t,n}return YC(t,e),t.compareByIndex=function(e,t){return e.index===t.index?0:e.isFinalTabstop?1:t.isFinalTabstop||e.indext.index?1:0},Object.defineProperty(t.prototype,"isFinalTabstop",{get:function(){return 0===this.index},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"choice",{get:function(){return 1===this._children.length&&this._children[0]instanceof JC?this._children[0]:void 0},enumerable:!0,configurable:!0}),t.prototype.clone=function(){var e=new t(this.index);return this.transform&&(e.transform=this.transform.clone()),e._children=this.children.map((function(e){return e.clone()})),e},t}(qC),JC=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.options=[],t}return YC(t,e),t.prototype.appendChild=function(e){return e instanceof QC&&(e.parent=this,this.options.push(e)),this},t.prototype.toString=function(){return this.options[0].value},t.prototype.len=function(){return this.options[0].len()},t.prototype.clone=function(){var e=new t;return this.options.forEach(e.appendChild,e),e},t}(GC),XC=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return YC(t,e),t.prototype.resolve=function(e){var t=this;return e.replace(this.regexp,(function(){for(var e="",n=0,i=t._children;no.index?arguments[o.index]:"";e+=r=o.resolve(r)}else e+=o.toString()}return e}))},t.prototype.toString=function(){return""},t.prototype.clone=function(){var e=new t;return e.regexp=new RegExp(this.regexp.source,(this.regexp.ignoreCase?"i":"")+(this.regexp.global?"g":"")),e._children=this.children.map((function(e){return e.clone()})),e},t}(GC),$C=function(e){function t(t,n,i,o){var r=e.call(this)||this;return r.index=t,r.shorthandName=n,r.ifValue=i,r.elseValue=o,r}return YC(t,e),t.prototype.resolve=function(e){return"upcase"===this.shorthandName?e?e.toLocaleUpperCase():"":"downcase"===this.shorthandName?e?e.toLocaleLowerCase():"":"capitalize"===this.shorthandName?e?e[0].toLocaleUpperCase()+e.substr(1):"":Boolean(e)&&"string"==typeof this.ifValue?this.ifValue:Boolean(e)||"string"!=typeof this.elseValue?e||"":this.elseValue},t.prototype.clone=function(){return new t(this.index,this.shorthandName,this.ifValue,this.elseValue)},t}(GC),eS=function(e){function t(t){var n=e.call(this)||this;return n.name=t,n}return YC(t,e),t.prototype.resolve=function(e){var t=e.resolve(this);return this.transform&&(t=this.transform.resolve(t||"")),void 0!==t&&(this._children=[new QC(t)],!0)},t.prototype.clone=function(){var e=new t(this.name);return this.transform&&(e.transform=this.transform.clone()),e._children=this.children.map((function(e){return e.clone()})),e},t}(qC);function tS(e,t){for(var n=e.slice();n.length>0;){var i=n.shift();if(!t(i))break;n.unshift.apply(n,i.children)}}var nS,iS=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return YC(t,e),Object.defineProperty(t.prototype,"placeholderInfo",{get:function(){if(!this._placeholders){var e,t=[];this.walk((function(n){return n instanceof KC&&(t.push(n),e=!e||e.index0?o.set(e.index,e.children):r.push(e)),!0}));for(var a=0,u=r;a0&&t),!o.has(0)&&n&&i.appendChild(new KC(0)),i},e.prototype._accept=function(e,t){if(void 0===e||this._token.type===e){var n=!t||this._scanner.tokenText(this._token);return this._token=this._scanner.next(),n}return!1},e.prototype._backTo=function(e){return this._scanner.pos=e.pos+e.len,this._token=e,!1},e.prototype._until=function(e){if(14===this._token.type)return!1;for(var t=this._token;this._token.type!==e;)if(this._token=this._scanner.next(),14===this._token.type)return!1;var n=this._scanner.value.substring(t.pos,this._token.pos);return this._token=this._scanner.next(),n},e.prototype._parse=function(e){return this._parseEscaped(e)||this._parseTabstopOrVariableName(e)||this._parseComplexPlaceholder(e)||this._parseComplexVariable(e)||this._parseAnything(e)},e.prototype._parseEscaped=function(e){var t;return!!(t=this._accept(5,!0))&&(t=this._accept(0,!0)||this._accept(4,!0)||this._accept(5,!0)||t,e.appendChild(new QC(t)),!0)},e.prototype._parseTabstopOrVariableName=function(e){var t,n=this._token;return this._accept(0)&&(t=this._accept(9,!0)||this._accept(8,!0))?(e.appendChild(/^\d+$/.test(t)?new KC(Number(t)):new eS(t)),!0):this._backTo(n)},e.prototype._parseComplexPlaceholder=function(e){var t,n=this._token;if(!(this._accept(0)&&this._accept(3)&&(t=this._accept(8,!0))))return this._backTo(n);var i=new KC(Number(t));if(this._accept(1))for(;;){if(this._accept(4))return e.appendChild(i),!0;if(!this._parse(i))return e.appendChild(new QC("${"+t+":")),i.children.forEach(e.appendChild,e),!0}else{if(!(i.index>0&&this._accept(7)))return this._accept(6)?this._parseTransform(i)?(e.appendChild(i),!0):(this._backTo(n),!1):this._accept(4)?(e.appendChild(i),!0):this._backTo(n);for(var o=new JC;;){if(this._parseChoiceElement(o)){if(this._accept(2))continue;if(this._accept(7)&&(i.appendChild(o),this._accept(4)))return e.appendChild(i),!0}return this._backTo(n),!1}}},e.prototype._parseChoiceElement=function(e){for(var t=this._token,n=[];2!==this._token.type&&7!==this._token.type;){var i=void 0;if(!(i=(i=this._accept(5,!0))?this._accept(2,!0)||this._accept(7,!0)||i:this._accept(void 0,!0)))return this._backTo(t),!1;n.push(i)}return 0===n.length?(this._backTo(t),!1):(e.appendChild(new QC(n.join(""))),!0)},e.prototype._parseComplexVariable=function(e){var t,n=this._token;if(!(this._accept(0)&&this._accept(3)&&(t=this._accept(9,!0))))return this._backTo(n);var i=new eS(t);if(!this._accept(1))return this._accept(6)?this._parseTransform(i)?(e.appendChild(i),!0):(this._backTo(n),!1):this._accept(4)?(e.appendChild(i),!0):this._backTo(n);for(;;){if(this._accept(4))return e.appendChild(i),!0;if(!this._parse(i))return e.appendChild(new QC("${"+t+":")),i.children.forEach(e.appendChild,e),!0}},e.prototype._parseTransform=function(e){for(var t=new XC,n="",i="";!this._accept(6);){var o=void 0;if(o=this._accept(5,!0))n+=o=this._accept(6,!0)||o;else{if(14===this._token.type)return!1;n+=this._accept(void 0,!0)}}for(;!this._accept(6);)if(o=void 0,o=this._accept(5,!0))o=this._accept(6,!0)||o,t.appendChild(new QC(o));else if(!this._parseFormatString(t)&&!this._parseAnything(t))return!1;for(;!this._accept(4);){if(14===this._token.type)return!1;i+=this._accept(void 0,!0)}try{t.regexp=new RegExp(n,i)}catch(e){return!1}return e.transform=t,!0},e.prototype._parseFormatString=function(e){var t=this._token;if(!this._accept(0))return!1;var n=!1;this._accept(3)&&(n=!0);var i=this._accept(8,!0);if(!i)return this._backTo(t),!1;if(!n)return e.appendChild(new $C(Number(i))),!0;if(this._accept(4))return e.appendChild(new $C(Number(i))),!0;if(!this._accept(1))return this._backTo(t),!1;if(this._accept(6)){var o=this._accept(9,!0);return o&&this._accept(4)?(e.appendChild(new $C(Number(i),o)),!0):(this._backTo(t),!1)}if(this._accept(11)){if(r=this._until(4))return e.appendChild(new $C(Number(i),void 0,r,void 0)),!0}else if(this._accept(12)){if(s=this._until(4))return e.appendChild(new $C(Number(i),void 0,void 0,s)),!0}else if(this._accept(13)){var r;if((r=this._until(1))&&(s=this._until(4)))return e.appendChild(new $C(Number(i),void 0,r,s)),!0}else{var s;if(s=this._until(4))return e.appendChild(new $C(Number(i),void 0,void 0,s)),!0}return this._backTo(t),!1},e.prototype._parseAnything=function(e){return 14!==this._token.type&&(e.appendChild(new QC(this._scanner.tokenText(this._token))),this._accept(void 0),!0)},e}(),rS=function(){function e(e){this._delegates=e}return e.prototype.resolve=function(e){for(var t=0,n=this._delegates;t=0){for(var i=[],o=0,r=this._placeholderGroups[this._placeholderGroupsIdx];o0&&this._editor.executeEdits("snippet.placeholderTransform",i)}return!0===t&&this._placeholderGroupsIdx0&&(this._placeholderGroupsIdx-=1),this._editor.getModel().changeDecorations((function(t){for(var i=new Set,o=[],r=0,s=n._placeholderGroups[n._placeholderGroupsIdx];r0},enumerable:!0,configurable:!0}),e.prototype.computePossibleSelections=function(){for(var e=new Map,t=0,n=this._placeholderGroups;t ")+'"'},e.prototype.insert=function(){var t=this,n=this._editor.getModel(),i=e.createEditsAndSnippets(this._editor,this._template,this._overwriteBefore,this._overwriteAfter,!1),o=i.edits,r=i.snippets;this._snippets=r;var s=n.pushEditOperations(this._editor.getSelections(),o,(function(e){return t._snippets[0].hasPlaceholder?t._move(!0):e.map((function(e){return Be.L.fromPositions(e.range.getEndPosition())}))}));this._editor.setSelections(s),this._editor.revealRange(s[0])},e.prototype.merge=function(t,n,i){var o=this;void 0===n&&(n=0),void 0===i&&(i=0),this._templateMerges.push([this._snippets[0]._nestingLevel,this._snippets[0]._placeholderGroupsIdx,t]);var r=e.createEditsAndSnippets(this._editor,t,n,i,!0),s=r.edits,a=r.snippets;this._editor.setSelections(this._editor.getModel().pushEditOperations(this._editor.getSelections(),s,(function(e){for(var t=0,n=o._snippets;t0},e}(),dS={Visible:new ce("suggestWidgetVisible",!1),MultipleSuggestions:new ce("suggestWidgetMultipleSuggestions",!1),MakesTextEdit:new ce("suggestionMakesTextEdit",!0),AcceptOnKey:new ce("suggestionSupportsAcceptOnKey",!0),AcceptSuggestionsOnEnter:new ce("acceptSuggestionOnEnter",!0)};function fS(e,t,n,i,o,r){void 0===n&&(n="bottom"),void 0===r&&(r=st.None);var s=[],a=function(e){return"none"===e?function(e){return"snippet"!==e.type}:function(){return!0}}(n);t=t.clone();var u=No.er.orderedGroups(e),l=o||{triggerKind:No.tS.Invoke},c=!1,h=u.map((function(n){return function(){return Promise.all(n.map((function(n){if((0,tu.Ct)(i)||!(i.indexOf(n)<0))return Promise.resolve(n.provideCompletionItems(e,t,l,r)).then((function(i){var o=s.length;if(i&&!(0,tu.Ct)(i.suggestions))for(var r=0,u=i.suggestions;r")}},e.prototype._doInsert=function(e,t,n,i,o){var r=this;void 0===t&&(t=0),void 0===n&&(n=0),void 0===i&&(i=!0),void 0===o&&(o=!0),this._snippetListener=(0,I.AS)(this._snippetListener),i&&this._editor.getModel().pushStackElement(),this._session?this._session.merge(e,t,n):(this._modelVersionId=this._editor.getModel().getAlternativeVersionId(),this._session=new hS(this._editor,e,t,n),this._session.insert()),o&&this._editor.getModel().pushStackElement(),this._updateState(),this._snippetListener=[this._editor.onDidChangeModelContent((function(e){return e.isFlush&&r.cancel()})),this._editor.onDidChangeModel((function(){return r.cancel()})),this._editor.onDidChangeCursorSelection((function(){return r._updateState()}))]},e.prototype._updateState=function(){if(this._session){if(this._modelVersionId===this._editor.getModel().getAlternativeVersionId())return this.cancel();if(!this._session.hasPlaceholder)return this.cancel();if(this._session.isAtLastPlaceholder||!this._session.isSelectionWithinPlaceholders())return this.cancel();this._inSnippet.set(!0),this._hasPrevTabstop.set(!this._session.isAtFirstPlaceholder),this._hasNextTabstop.set(!this._session.isAtLastPlaceholder),this._handleChoice()}},e.prototype._handleChoice=function(){var e,t,n=this._session.choice;if(n){if(this._currentChoice!==n){this._currentChoice=n,this._editor.setSelections(this._editor.getSelections().map((function(e){return Be.L.fromPositions(e.getStartPosition())})));var i=n.options[0];e=this._editor,t=n.options.map((function(e,t){return{type:"value",label:e.value,insertText:e.value,sortText:(0,p.repeat)("a",t),overwriteAfter:i.value.length}})),setTimeout((function(){var n;(n=_S.onlyOnceSuggestions).push.apply(n,t),e.getContribution("editor.contrib.suggestController").triggerSuggest([_S])}),0)}}else this._currentChoice=void 0},e.prototype.finish=function(){for(;this._inSnippet.get();)this.next()},e.prototype.cancel=function(){this._inSnippet.reset(),this._hasPrevTabstop.reset(),this._hasNextTabstop.reset(),(0,I.AS)(this._snippetListener),(0,I.AS)(this._session),this._session=void 0,this._modelVersionId=-1},e.prototype.prev=function(){this._session.prev(),this._updateState()},e.prototype.next=function(){this._session.next(),this._updateState()},e.prototype.isInSnippet=function(){return this._inSnippet.get()},e.InSnippetMode=new ce("inSnippetMode",!1),e.HasNextTabstop=new ce("hasNextTabstop",!1),e.HasPrevTabstop=new ce("hasPrevTabstop",!1),e=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([CS(1,wS),CS(2,he)],e)}();Ae(SS);var LS=Ne.bindToContribution(SS.get);function IS(){for(var e=[],t=0;t0?[{start:0,end:t.length}]:[]:null}.bind(void 0,!0);function xS(e,t,n,i){return n===e.length?[]:i===t.length?null:e[n]===t[i]?(o=xS(e,t,n+1,i+1))?jS({start:i,end:i+1},o):null:xS(e,t,n,i+1);var o}function DS(e){return 97<=e&&e<=122}function kS(e){return 65<=e&&e<=90}function TS(e){return 48<=e&&e<=57}function ES(e){return 32===e||9===e||10===e||13===e}function AS(e){return DS(e)||kS(e)||TS(e)}function jS(e,t){return 0===t.length?t=[e]:e.end===t[0].start?t[0].start=e.start:t.unshift(e),t}function OS(e,t){for(var n=t;n0&&!AS(e.charCodeAt(n-1)))return n}return e.length}function RS(e,t,n,i){if(n===e.length)return[];if(i===t.length)return null;if(e[n]!==t[i].toLowerCase())return null;var o=null,r=i+1;for(o=RS(e,t,n+1,i+1);!o&&(r=OS(t,r))60)return null;var n=function(e){for(var t=0,n=0,i=0,o=0,r=0,s=0;s.2&&t<.8&&i>.6&&o<.2}(n)){if(!function(e){var t=e.upperPercent;return 0===e.lowerPercent&&t>.6}(n))return null;t=t.toLowerCase()}var i=null,o=0;for(e=e.toLowerCase();o=0&&(i.push(s),o=s+1)}return[i.length,i]}function VS(){for(var e=[],t=[0],n=1;n<=100;n++)t.push(-n);for(n=0;n<=100;n++){var i=t.slice(0);i[0]=-n,e.push(i)}return e}var US=VS(),YS=VS(),ZS=VS(),GS=!1;function QS(e,t,n,i,o){function r(e,t,n){for(void 0===n&&(n=" ");e.length=e.length)return!1;switch(e.charCodeAt(t)){case 95:case 45:case 46:case 32:case 47:case 92:case 39:case 34:case 58:return!0;default:return!1}}function KS(e,t){if(t<0||t>=e.length)return!1;switch(e.charCodeAt(t)){case 32:case 9:return!0;default:return!1}}function JS(e,t,n,i){var o=e.length>100?100:e.length,r=t.length>100?100:t.length,s=0;for(void 0===n&&(n=o);sr)){for(var a=e.toLowerCase(),u=t.toLowerCase(),l=s,c=0;l1?1:h),p=US[l-1][c]+-1,g=US[l][c-1]+-1;g>=p?g>f?(US[l][c]=g,ZS[l][c]=4):g===f?(US[l][c]=g,ZS[l][c]=6):(US[l][c]=f,ZS[l][c]=2):p>f?(US[l][c]=p,ZS[l][c]=1):p===f?(US[l][c]=p,ZS[l][c]=3):(US[l][c]=f,ZS[l][c]=2)}if(GS&&(console.log(QS(US,e,o,t,r)),console.log(QS(ZS,e,o,t,r)),console.log(QS(YS,e,o,t,r))),$S=0,eL=-100,tL=s,nL=i,iL(o,r,o===r?1:0,new oL,!1),0!==$S)return[eL,XS.toArray()]}}}var XS,$S=0,eL=0,tL=0,nL=!1;function iL(e,t,n,i,o){if(!($S>=10||n<-25)){for(var r=0;e>tL&&t>0;){var s=YS[e][t],a=ZS[e][t];if(4===a)t-=1,o?n-=5:i.isEmpty()||(n-=1),o=!1,r=0;else{if(!(2&a))return;if(4&a&&iL(e,t-1,i.isEmpty()?n:n-1,i.slice(),o),n+=s,e-=1,t-=1,i.unshift(t),o=!0,1===s){if(r+=1,e===tL&&!nL)return}else n+=1+r*(s-1),r=0}}$S+=1,(n-=t>=3?9:3*t)>eL&&(eL=n,XS=i)}}var oL=function(){function e(){}return e.prototype.isEmpty=function(){return!this._data&&(!this._parent||this._parent.isEmpty())},e.prototype.unshift=function(e){this._data?this._data.unshift(e):this._data=[e]},e.prototype.slice=function(){var t=new e;return t._parent=this,t._parentLen=this._data?this._data.length:0,t},e.prototype.toArray=function(){if(!this._data)return this._parent.toArray();for(var e=[],t=this;t;)t._parent&&t._parent._data&&e.push(t._parent._data.slice(t._parent._data.length-t._parentLen)),t=t._parent;return Array.prototype.concat.apply(this._data,e)},e}();function rL(e,t,n){return function(e,t,n,i){var o=JS(e,t,i);if(e.length>=3)for(var r=Math.min(7,e.length-1),s=1;so[0])&&(o=u))}}return o}(e,t,0,n)}function sL(e,t){if(!(t+1>=e.length)){var n=e[t],i=e[t+1];if(n!==i)return e.slice(0,t)+i+n+e.slice(t+2)}}var aL=function(){function e(t,n,i,o){void 0===o&&(o=Li.Pk.contribInfo.suggest),this._snippetCompareFn=e._compareCompletionItems,this._items=t,this._column=n,this._options=o,this._refilterKind=1,this._lineContext=i,"top"===o.snippets?this._snippetCompareFn=e._compareCompletionItemsSnippetsUp:"bottom"===o.snippets&&(this._snippetCompareFn=e._compareCompletionItemsSnippetsDown)}return e.prototype.dispose=function(){for(var e=new Set,t=0,n=this._items;t2e3?JS:rL,a=0;at.score?-1:e.scoret.idx?1:0},e._compareCompletionItemsSnippetsDown=function(t,n){if(t.suggestion.type!==n.suggestion.type){if("snippet"===t.suggestion.type)return 1;if("snippet"===n.suggestion.type)return-1}return e._compareCompletionItems(t,n)},e._compareCompletionItemsSnippetsUp=function(t,n){if(t.suggestion.type!==n.suggestion.type){if("snippet"===t.suggestion.type)return-1;if("snippet"===n.suggestion.type)return 1}return e._compareCompletionItems(t,n)},e}(),uL=function(){function e(e,t,n){this.leadingLineContent=e.getLineContent(t.lineNumber).substr(0,t.column-1),this.leadingWord=e.getWordUntilPosition(t),this.lineNumber=t.lineNumber,this.column=t.column,this.auto=n}return e.shouldAutoTrigger=function(e){var t=e.getModel();if(!t)return!1;var n=e.getPosition();t.tokenizeIfCheap(n.lineNumber);var i=t.getWordAtPosition(n);return!!i&&i.endColumn===n.column&&!!isNaN(Number(i.word))},e}(),lL=function(){function e(e){var t=this;this._toDispose=[],this._triggerQuickSuggest=new wt,this._triggerRefilter=new wt,this._onDidCancel=new X.vl,this._onDidTrigger=new X.vl,this._onDidSuggest=new X.vl,this.onDidCancel=this._onDidCancel.event,this.onDidTrigger=this._onDidTrigger.event,this.onDidSuggest=this._onDidSuggest.event,this._editor=e,this._state=0,this._requestPromise=null,this._completionModel=null,this._context=null,this._currentSelection=this._editor.getSelection()||new Be.L(1,1,1,1),this._toDispose.push(this._editor.onDidChangeModel((function(){t._updateTriggerCharacters(),t.cancel()}))),this._toDispose.push(this._editor.onDidChangeModelLanguage((function(){t._updateTriggerCharacters(),t.cancel()}))),this._toDispose.push(this._editor.onDidChangeConfiguration((function(){t._updateTriggerCharacters(),t._updateQuickSuggest()}))),this._toDispose.push(No.er.onDidChange((function(){t._updateTriggerCharacters(),t._updateActiveSuggestSession()}))),this._toDispose.push(this._editor.onDidChangeCursorSelection((function(e){t._onCursorChange(e)}))),this._toDispose.push(this._editor.onDidChangeModelContent((function(e){t._refilterCompletionItems()}))),this._updateTriggerCharacters(),this._updateQuickSuggest()}return e.prototype.dispose=function(){(0,I.AS)([this._onDidCancel,this._onDidSuggest,this._onDidTrigger,this._triggerCharacterListener,this._triggerQuickSuggest,this._triggerRefilter]),this._toDispose=(0,I.AS)(this._toDispose),(0,I.AS)(this._completionModel),this.cancel()},e.prototype._updateQuickSuggest=function(){this._quickSuggestDelay=this._editor.getConfiguration().contribInfo.quickSuggestionsDelay,(isNaN(this._quickSuggestDelay)||!this._quickSuggestDelay&&0!==this._quickSuggestDelay||this._quickSuggestDelay<0)&&(this._quickSuggestDelay=10)},e.prototype._updateTriggerCharacters=function(){var e=this;if((0,I.AS)(this._triggerCharacterListener),!this._editor.getConfiguration().readOnly&&this._editor.getModel()&&this._editor.getConfiguration().contribInfo.suggestOnTriggerCharacters){for(var t=Object.create(null),n=0,i=No.er.all(this._editor.getModel());nthis._context.column&&this._completionModel.incomplete.size>0&&0!==e.leadingWord.word.length){var t=this._completionModel.incomplete,n=this._completionModel.adopt(t);this.trigger({auto:2===this._state},!0,(0,Tv.zu)(t),n)}else{var i=this._completionModel.lineContext,o=!1;if(this._completionModel.lineContext={leadingLineContent:e.leadingLineContent,characterCountDelta:e.column-this._context.column},0===this._completionModel.items.length){if(uL.shouldAutoTrigger(this._editor)&&this._context.leadingWord.endColumn0)&&0===e.leadingWord.word.length)return void this.cancel()}this._onDidSuggest.fire({completionModel:this._completionModel,auto:this._context.auto,isFrozen:o})}}else this.cancel()},e}();function cL(e,t){if(e.start>=t.end||t.start>=e.end)return{start:0,end:0};var n=Math.max(e.start,t.start),i=Math.min(e.end,t.end);return i-n<=0?{start:0,end:0}:{start:n,end:i}}function hL(e){return e.end-e.start<=0}function dL(e,t){var n=[],i={start:e.start,end:Math.min(t.start,e.end)},o={start:Math.max(t.end,e.start),end:e.end};return hL(i)||n.push(i),hL(o)||n.push(o),n}function fL(e,t){for(var n=[],i=0,o=t;i=r.range.end)){if(e.end=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},yL={useShadows:!0,verticalScrollMode:gr.XR.Auto},bL=function(){function e(e,t,n,i){void 0===i&&(i=yL),this.virtualDelegate=t,this.renderers=new Map,this.splicing=!1,this.items=[],this.itemId=0,this.rangeMap=new gL;for(var o=0,r=n;o=0}))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onMouseDblClick",{get:function(){var e=this;return(0,X.Zs)((0,X.B5)(Jt(this.domNode,"dblclick"),(function(t){return e.toMouseEvent(t)})),(function(e){return e.index>=0}))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onMouseDown",{get:function(){var e=this;return(0,X.Zs)((0,X.B5)(Jt(this.domNode,"mousedown"),(function(t){return e.toMouseEvent(t)})),(function(e){return e.index>=0}))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onContextMenu",{get:function(){var e=this;return(0,X.Zs)((0,X.B5)(Jt(this.domNode,"contextmenu"),(function(t){return e.toMouseEvent(t)})),(function(e){return e.index>=0}))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onTouchStart",{get:function(){var e=this;return(0,X.Zs)((0,X.B5)(Jt(this.domNode,"touchstart"),(function(t){return e.toTouchEvent(t)})),(function(e){return e.index>=0}))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onTap",{get:function(){var e=this;return(0,X.Zs)((0,X.B5)(Jt(this.rowsContainer,iu.Tap),(function(t){return e.toGestureEvent(t)})),(function(e){return e.index>=0}))},enumerable:!0,configurable:!0}),e.prototype.toMouseEvent=function(e){var t=this.getItemIndexFromEventTarget(e.target),n=t<0?void 0:this.items[t];return{browserEvent:e,index:t,element:n&&n.element}},e.prototype.toTouchEvent=function(e){var t=this.getItemIndexFromEventTarget(e.target),n=t<0?void 0:this.items[t];return{browserEvent:e,index:t,element:n&&n.element}},e.prototype.toGestureEvent=function(e){var t=this.getItemIndexFromEventTarget(e.initialTarget),n=t<0?void 0:this.items[t];return{browserEvent:e,index:t,element:n&&n.element}},e.prototype.onScroll=function(e){try{this.render(e.scrollTop,e.height)}catch(t){throw console.log("Got bad scroll event:",e),t}},e.prototype.onTouchChange=function(e){e.preventDefault(),e.stopPropagation(),this.scrollTop-=e.translationY},e.prototype.onDragOver=function(e){this.setupDragAndDropScrollInterval(),this.dragAndDropMouseY=e.posy},e.prototype.setupDragAndDropScrollInterval=function(){var e=this,t=kn(this._domNode).top;this.dragAndDropScrollInterval||(this.dragAndDropScrollInterval=window.setInterval((function(){if(void 0!==e.dragAndDropMouseY){var n=e.dragAndDropMouseY-t,i=0,o=e.renderHeight-35;n<35?i=Math.max(-14,.2*(n-35)):n>o&&(i=Math.min(14,.2*(n-o))),e.scrollTop+=i}}),10),this.cancelDragAndDropScrollTimeout(),this.dragAndDropScrollTimeout=window.setTimeout((function(){e.cancelDragAndDropScrollInterval(),e.dragAndDropScrollTimeout=null}),1e3))},e.prototype.cancelDragAndDropScrollInterval=function(){this.dragAndDropScrollInterval&&(window.clearInterval(this.dragAndDropScrollInterval),this.dragAndDropScrollInterval=null),this.cancelDragAndDropScrollTimeout()},e.prototype.cancelDragAndDropScrollTimeout=function(){this.dragAndDropScrollTimeout&&(window.clearTimeout(this.dragAndDropScrollTimeout),this.dragAndDropScrollTimeout=null)},e.prototype.getItemIndexFromEventTarget=function(e){for(;e instanceof HTMLElement&&e!==this.rowsContainer;){var t=e,n=t.getAttribute("data-index");if(n){var i=Number(n);if(!isNaN(i))return i}e=t.parentElement}return-1},e.prototype.getRenderRange=function(e,t){return{start:this.rangeMap.indexAt(e),end:this.rangeMap.indexAfter(e+t-1)}},e.prototype.getNextToLastElement=function(e){var t=e[e.length-1];if(!t)return null;var n=this.items[t.end];return n&&n.row?n.row.domNode:null},e.prototype.dispose=function(){if(this.items){for(var e=0,t=this.items;e=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},CL=function(){function e(e){this.trait=e,this.renderedElements=[]}return Object.defineProperty(e.prototype,"templateId",{get:function(){return"template:"+this.trait.trait},enumerable:!0,configurable:!0}),e.prototype.renderTemplate=function(e){return e},e.prototype.renderElement=function(e,t,n){var i=(0,tu.v4)(this.renderedElements,(function(e){return e.templateData===n}));if(i>=0){var o=this.renderedElements[i];this.trait.unrender(n),o.index=t}else o={index:t,templateData:n},this.renderedElements.push(o);this.trait.renderIndex(t,n)},e.prototype.disposeElement=function(){},e.prototype.splice=function(e,t,n){for(var i=[],o=0;o=e+t&&i.push({index:r.index+n-t,templateData:r.templateData})}this.renderedElements=i},e.prototype.renderIndexes=function(e){for(var t=0,n=this.renderedElements;t-1&&this.trait.renderIndex(o,r)}},e.prototype.disposeTemplate=function(e){var t=(0,tu.v4)(this.renderedElements,(function(t){return t.templateData===e}));t<0||this.renderedElements.splice(t,1)},e}(),SL=function(){function e(e){this._trait=e,this._onChange=new X.vl,this.indexes=[]}return Object.defineProperty(e.prototype,"onChange",{get:function(){return this._onChange.event},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"trait",{get:function(){return this._trait},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"renderer",{get:function(){return new CL(this)},enumerable:!0,configurable:!0}),e.prototype.splice=function(e,t,n){var i=n.length-t,o=e+t,r=this.indexes.filter((function(t){return t=o})).map((function(e){return e+i})));this.renderer.splice(e,t,n.length),this.set(r)},e.prototype.renderIndex=function(e,t){un(t,this._trait,this.contains(e))},e.prototype.unrender=function(e){an(e,this._trait)},e.prototype.set=function(e){var t=this.indexes;this.indexes=e;var n=PL(t,e);return this.renderer.renderIndexes(n),this._onChange.fire({indexes:e}),t},e.prototype.get=function(){return this.indexes},e.prototype.contains=function(e){return this.indexes.some((function(t){return t===e}))},e.prototype.dispose=function(){this.indexes=null,this._onChange=(0,I.AS)(this._onChange)},ML([nu],e.prototype,"renderer",null),e}(),LL=function(e){function t(t){var n=e.call(this,"focused")||this;return n.getDomId=t,n}return wL(t,e),t.prototype.renderIndex=function(t,n){e.prototype.renderIndex.call(this,t,n),n.setAttribute("role","treeitem"),n.setAttribute("id",this.getDomId(t))},t}(SL),IL=function(){function e(e,t,n){this.trait=e,this.view=t,this.getId=n}return e.prototype.splice=function(e,t,n){var i=this;if(!this.getId)return this.trait.splice(e,t,n.map((function(e){return!1})));var o=this.trait.get().map((function(e){return i.getId(i.view.element(e))})),r=n.map((function(e){return o.indexOf(i.getId(e))>-1}));this.trait.splice(e,t,r)},e}();function NL(e){return"INPUT"===e.tagName||"TEXTAREA"===e.tagName}var xL=function(){function e(e,t,n){this.list=e,this.view=t;var i=!(!1===n.multipleSelectionSupport);this.disposables=[],this.openController=n.openController||EL;var o=(0,X.cy)(Jt(t.domNode,"keydown")).filter((function(e){return!NL(e.target)})).map((function(e){return new Bt(e)}));o.filter((function(e){return 3===e.keyCode})).on(this.onEnter,this,this.disposables),o.filter((function(e){return 16===e.keyCode})).on(this.onUpArrow,this,this.disposables),o.filter((function(e){return 18===e.keyCode})).on(this.onDownArrow,this,this.disposables),o.filter((function(e){return 11===e.keyCode})).on(this.onPageUpArrow,this,this.disposables),o.filter((function(e){return 12===e.keyCode})).on(this.onPageDownArrow,this,this.disposables),o.filter((function(e){return 9===e.keyCode})).on(this.onEscape,this,this.disposables),i&&o.filter((function(e){return(B.zx?e.metaKey:e.ctrlKey)&&31===e.keyCode})).on(this.onCtrlA,this,this.disposables)}return e.prototype.onEnter=function(e){e.preventDefault(),e.stopPropagation(),this.list.setSelection(this.list.getFocus()),this.openController.shouldOpen(e.browserEvent)&&this.list.open(this.list.getFocus(),e.browserEvent)},e.prototype.onUpArrow=function(e){e.preventDefault(),e.stopPropagation(),this.list.focusPrevious(),this.list.reveal(this.list.getFocus()[0]),this.view.domNode.focus()},e.prototype.onDownArrow=function(e){e.preventDefault(),e.stopPropagation(),this.list.focusNext(),this.list.reveal(this.list.getFocus()[0]),this.view.domNode.focus()},e.prototype.onPageUpArrow=function(e){e.preventDefault(),e.stopPropagation(),this.list.focusPreviousPage(),this.list.reveal(this.list.getFocus()[0]),this.view.domNode.focus()},e.prototype.onPageDownArrow=function(e){e.preventDefault(),e.stopPropagation(),this.list.focusNextPage(),this.list.reveal(this.list.getFocus()[0]),this.view.domNode.focus()},e.prototype.onCtrlA=function(e){e.preventDefault(),e.stopPropagation(),this.list.setSelection((0,tu.y1)(this.list.length)),this.view.domNode.focus()},e.prototype.onEscape=function(e){e.preventDefault(),e.stopPropagation(),this.list.setSelection([]),this.view.domNode.focus()},e.prototype.dispose=function(){this.disposables=(0,I.AS)(this.disposables)},e}(),DL=function(){function e(e,t){this.list=e,this.view=t,this.disposables=[],this.disposables=[],(0,X.cy)(Jt(t.domNode,"keydown")).filter((function(e){return!NL(e.target)})).map((function(e){return new Bt(e)})).filter((function(e){return!(2!==e.keyCode||e.ctrlKey||e.metaKey||e.shiftKey||e.altKey)})).on(this.onTab,this,this.disposables)}return e.prototype.onTab=function(e){if(e.target===this.view.domNode){var t=this.list.getFocus();if(0!==t.length){var n=this.view.domElement(t[0]).querySelector("[tabIndex]");if(n&&n instanceof HTMLElement){var i=window.getComputedStyle(n);"hidden"!==i.visibility&&"none"!==i.display&&(e.preventDefault(),e.stopPropagation(),n.focus())}}}},e.prototype.dispose=function(){this.disposables=(0,I.AS)(this.disposables)},e}();function kL(e){return e instanceof MouseEvent&&2===e.button}var TL={isSelectionSingleChangeEvent:function(e){return B.zx?e.browserEvent.metaKey:e.browserEvent.ctrlKey},isSelectionRangeChangeEvent:function(e){return e.browserEvent.shiftKey}},EL={shouldOpen:function(e){return!(e instanceof MouseEvent&&kL(e))}},AL=function(){function e(e,t,n){void 0===n&&(n={}),this.list=e,this.view=t,this.options=n,this.didJustPressContextMenuKey=!1,this.disposables=[],this.multipleSelectionSupport=!(!1===n.multipleSelectionSupport),this.multipleSelectionSupport&&(this.multipleSelectionController=n.multipleSelectionController||TL),this.openController=n.openController||EL,t.onMouseDown(this.onMouseDown,this,this.disposables),t.onMouseClick(this.onPointer,this,this.disposables),t.onMouseDblClick(this.onDoubleClick,this,this.disposables),t.onTouchStart(this.onMouseDown,this,this.disposables),t.onTap(this.onPointer,this,this.disposables),au.addTarget(t.domNode)}return Object.defineProperty(e.prototype,"onContextMenu",{get:function(){var e=this,t=(0,X.cy)(Jt(this.view.domNode,"keydown")).map((function(e){return new Bt(e)})).filter((function(t){return e.didJustPressContextMenuKey=58===t.keyCode||t.shiftKey&&68===t.keyCode})).filter((function(e){return e.preventDefault(),e.stopPropagation(),!1})).event,n=(0,X.cy)(Jt(this.view.domNode,"keyup")).filter((function(){var t=e.didJustPressContextMenuKey;return e.didJustPressContextMenuKey=!1,t})).filter((function(){return e.list.getFocus().length>0})).map((function(){var t=e.list.getFocus()[0];return{index:t,element:e.view.element(t),anchor:e.view.domElement(t)}})).filter((function(e){return!!e.anchor})).event,i=(0,X.cy)(this.view.onContextMenu).filter((function(){return!e.didJustPressContextMenuKey})).map((function(e){var t=e.element,n=e.index,i=e.browserEvent;return{element:t,index:n,anchor:{x:i.clientX+1,y:i.clientY}}})).event;return(0,X.Pc)(t,n,i)},enumerable:!0,configurable:!0}),e.prototype.isSelectionSingleChangeEvent=function(e){return this.multipleSelectionController?this.multipleSelectionController.isSelectionSingleChangeEvent(e):B.zx?e.browserEvent.metaKey:e.browserEvent.ctrlKey},e.prototype.isSelectionRangeChangeEvent=function(e){return this.multipleSelectionController?this.multipleSelectionController.isSelectionRangeChangeEvent(e):e.browserEvent.shiftKey},e.prototype.isSelectionChangeEvent=function(e){return this.isSelectionSingleChangeEvent(e)||this.isSelectionRangeChangeEvent(e)},e.prototype.onMouseDown=function(e){!1===this.options.focusOnMouseDown?(e.browserEvent.preventDefault(),e.browserEvent.stopPropagation()):document.activeElement!==e.browserEvent.target&&this.view.domNode.focus();var t=this.list.getFocus()[0],n=this.list.getSelection();if(t=void 0===t?n[0]:t,this.multipleSelectionSupport&&this.isSelectionRangeChangeEvent(e))return this.changeSelection(e,t);var i=e.index;if(n.every((function(e){return e!==i}))&&this.list.setFocus([i]),this.multipleSelectionSupport&&this.isSelectionChangeEvent(e))return this.changeSelection(e,t);this.options.selectOnMouseDown&&!kL(e.browserEvent)&&(this.list.setSelection([i]),this.openController.shouldOpen(e.browserEvent)&&this.list.open([i],e.browserEvent))},e.prototype.onPointer=function(e){if(!(this.multipleSelectionSupport&&this.isSelectionChangeEvent(e)||this.options.selectOnMouseDown)){var t=this.list.getFocus();this.list.setSelection(t),this.openController.shouldOpen(e.browserEvent)&&this.list.open(t,e.browserEvent)}},e.prototype.onDoubleClick=function(e){if(!this.multipleSelectionSupport||!this.isSelectionChangeEvent(e)){var t=this.list.getFocus();this.list.setSelection(t),this.list.pin(t)}},e.prototype.changeSelection=function(e,t){var n=e.index;if(this.isSelectionRangeChangeEvent(e)&&void 0!==t){var i=Math.min(t,n),o=Math.max(t,n),r=(0,tu.y1)(i,o+1),s=function(e,t){var n=e.indexOf(t);if(-1===n)return[];for(var i=[],o=n-1;o>=0&&e[o]===t-(n-o);)i.push(e[o--]);for(i.reverse(),o=n;o=e.length)n.push(t[o++]);else if(o>=t.length)n.push(e[i++]);else{if(e[i]===t[o]){i++,o++;continue}e[i]=e.length)n.push(t[o++]);else if(o>=t.length)n.push(e[i++]);else{if(e[i]===t[o]){n.push(e[i]),i++,o++;continue}e[i]this.view.length)throw new Error("Invalid start index: "+e);if(t<0)throw new Error("Invalid delete count: "+t);0===t&&0===n.length||this.eventBufferer.bufferEvents((function(){return i.spliceable.splice(e,t,n)}))},Object.defineProperty(e.prototype,"length",{get:function(){return this.view.length},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"contentHeight",{get:function(){return this.view.getContentHeight()},enumerable:!0,configurable:!0}),e.prototype.layout=function(e){this.view.layout(e)},e.prototype.setSelection=function(e){for(var t=0,n=e;t=this.length)throw new Error("Invalid index "+i)}e=e.sort(zL),this.selection.set(e)},e.prototype.getSelection=function(){return this.selection.get()},e.prototype.setFocus=function(e){for(var t=0,n=e;t=this.length)throw new Error("Invalid index "+i)}e=e.sort(zL),this.focus.set(e)},e.prototype.focusNext=function(e,t){if(void 0===e&&(e=1),void 0===t&&(t=!1),0!==this.length){var n=this.focus.get(),i=n.length>0?n[0]+e:0;this.setFocus(t?[i%this.length]:[Math.min(i,this.length-1)])}},e.prototype.focusPrevious=function(e,t){if(void 0===e&&(e=1),void 0===t&&(t=!1),0!==this.length){var n=this.focus.get(),i=n.length>0?n[0]-e:0;t&&i<0&&(i=(this.length+i%this.length)%this.length),this.setFocus([Math.max(i,0)])}},e.prototype.focusNextPage=function(){var e=this,t=this.view.indexAt(this.view.getScrollTop()+this.view.renderHeight);t=0===t?0:t-1;var n=this.view.element(t);if(this.getFocusedElements()[0]!==n)this.setFocus([t]);else{var i=this.view.getScrollTop();this.view.setScrollTop(i+this.view.renderHeight-this.view.elementHeight(t)),this.view.getScrollTop()!==i&&setTimeout((function(){return e.focusNextPage()}),0)}},e.prototype.focusPreviousPage=function(){var e,t=this,n=this.view.getScrollTop();e=0===n?this.view.indexAt(n):this.view.indexAfter(n-1);var i=this.view.element(e);if(this.getFocusedElements()[0]!==i)this.setFocus([e]);else{var o=n;this.view.setScrollTop(n-this.view.renderHeight),this.view.getScrollTop()!==o&&setTimeout((function(){return t.focusPreviousPage()}),0)}},e.prototype.focusLast=function(){0!==this.length&&this.setFocus([this.length-1])},e.prototype.focusFirst=function(){0!==this.length&&this.setFocus([0])},e.prototype.getFocus=function(){return this.focus.get()},e.prototype.getFocusedElements=function(){var e=this;return this.getFocus().map((function(t){return e.view.element(t)}))},e.prototype.reveal=function(e,t){if(e<0||e>=this.length)throw new Error("Invalid index "+e);var n,i=this.view.getScrollTop(),o=this.view.elementTop(e),r=this.view.elementHeight(e);if((0,w.Et)(t)){var s=r-this.view.renderHeight;this.view.setScrollTop(s*(n=t,0,1,Math.min(Math.max(n,0),1))+o)}else{var a=o+r,u=i+this.view.renderHeight;o=u&&this.view.setScrollTop(a-this.view.renderHeight)}},e.prototype.getElementDomId=function(e){return this.idPrefix+"_"+e},e.prototype.isDOMFocused=function(){return this.view.domNode===document.activeElement},e.prototype.getHTMLElement=function(){return this.view.domNode},e.prototype.open=function(e,t){for(var n=this,i=0,o=e;i=this.length)throw new Error("Invalid index "+r)}this._onOpen.fire({indexes:e,elements:e.map((function(e){return n.view.element(e)})),browserEvent:t})},e.prototype.pin=function(e){for(var t=0,n=e;t=this.length)throw new Error("Invalid index "+i)}this._onPin.fire(e)},e.prototype.style=function(e){this.styleController.style(e)},e.prototype.toListEvent=function(e){var t=this,n=e.indexes;return{indexes:n,elements:n.map((function(e){return t.view.element(e)}))}},e.prototype._onFocusChange=function(){var e=this.focus.get();e.length>0?this.view.domNode.setAttribute("aria-activedescendant",this.getElementDomId(e[0])):this.view.domNode.removeAttribute("aria-activedescendant"),this.view.domNode.setAttribute("role","tree"),un(this.view.domNode,"element-focused",e.length>0)},e.prototype._onSelectionChange=function(){var e=this.selection.get();un(this.view.domNode,"selection-none",0===e.length),un(this.view.domNode,"selection-single",1===e.length),un(this.view.domNode,"selection-multiple",e.length>1)},e.prototype.dispose=function(){this._onDidDispose.fire(),this.disposables=(0,I.AS)(this.disposables)},e.InstanceCount=0,ML([nu],e.prototype,"onFocusChange",null),ML([nu],e.prototype,"onSelectionChange",null),e}(),BL=Object.assign||function(e){for(var t,n=1,i=arguments.length;n1),r)i?this.setState(0):this.setState(2),this.completionModel=null;else{var s=this.completionModel.stats;s.wasAutomaticallyTriggered=!!i,this.telemetryService.publicLog("suggestWidget",BL({},s,this.editor.getTelemetryData())),this.list.splice(0,this.list.length,this.completionModel.items),n?this.setState(4):this.setState(3),this.list.reveal(t,t),this.list.setFocus([t]),this.detailsBorderColor&&(this.details.element.style.borderColor=this.detailsBorderColor)}}},e.prototype.selectNextPage=function(){switch(this.state){case 0:return!1;case 5:return this.details.pageDown(),!0;case 1:return!this.isAuto;default:return this.list.focusNextPage(),!0}},e.prototype.selectNext=function(){switch(this.state){case 0:return!1;case 1:return!this.isAuto;default:return this.list.focusNext(1,!0),!0}},e.prototype.selectLast=function(){switch(this.state){case 0:return!1;case 5:return this.details.scrollBottom(),!0;case 1:return!this.isAuto;default:return this.list.focusLast(),!0}},e.prototype.selectPreviousPage=function(){switch(this.state){case 0:return!1;case 5:return this.details.pageUp(),!0;case 1:return!this.isAuto;default:return this.list.focusPreviousPage(),!0}},e.prototype.selectPrevious=function(){switch(this.state){case 0:return!1;case 1:return!this.isAuto;default:return this.list.focusPrevious(1,!0),!1}},e.prototype.selectFirst=function(){switch(this.state){case 0:return!1;case 5:return this.details.scrollTop(),!0;case 1:return!this.isAuto;default:return this.list.focusFirst(),!0}},e.prototype.getFocusedItem=function(){if(0!==this.state&&2!==this.state&&1!==this.state)return{item:this.list.getFocusedElements()[0],index:this.list.getFocus()[0],model:this.completionModel}},e.prototype.toggleDetailsFocus=function(){5===this.state?(this.setState(3),this.detailsBorderColor&&(this.details.element.style.borderColor=this.detailsBorderColor)):3===this.state&&this.expandDocsSettingFromStorage()&&(this.setState(5),this.detailsFocusBorderColor&&(this.details.element.style.borderColor=this.detailsFocusBorderColor)),this.telemetryService.publicLog("suggestWidget:toggleDetailsFocus",this.editor.getTelemetryData())},e.prototype.toggleDetails=function(){if(KL(this.list.getFocusedElements()[0]))if(this.expandDocsSettingFromStorage())this.updateExpandDocsSetting(!1),$n(this.details.element),an(this.element,"docs-side"),an(this.element,"docs-below"),this.editor.layoutContentWidget(this),this.telemetryService.publicLog("suggestWidget:collapseDetails",this.editor.getTelemetryData());else{if(3!==this.state&&5!==this.state&&4!==this.state)return;this.updateExpandDocsSetting(!0),this.showDetails(),this.telemetryService.publicLog("suggestWidget:expandDetails",this.editor.getTelemetryData())}},e.prototype.showDetails=function(){this.expandSideOrBelow(),Xn(this.details.element),this.details.render(this.list.getFocusedElements()[0]),this.details.element.style.maxHeight=this.maxWidgetHeight+"px",this.listElement.style.marginTop="0px",this.editor.layoutContentWidget(this),this.adjustDocsPosition(),this.editor.focus(),this._ariaAlert(this.details.getAriaLabel())},e.prototype.show=function(){var e=this,t=this.updateListHeight();t!==this.listHeight&&(this.editor.layoutContentWidget(this),this.listHeight=t),this.suggestWidgetVisible.set(!0),this.showTimeout.cancelAndSet((function(){sn(e.element,"visible"),e.onDidShowEmitter.fire(e)}),100)},e.prototype.hide=function(){this.suggestWidgetVisible.reset(),this.suggestWidgetMultipleSuggestions.reset(),an(this.element,"visible")},e.prototype.hideWidget=function(){clearTimeout(this.loadingTimeout),this.setState(0),this.onDidHideEmitter.fire(this)},e.prototype.getPosition=function(){return 0===this.state?null:{position:this.editor.getPosition(),preference:[ou.BELOW,ou.ABOVE]}},e.prototype.getDomNode=function(){return this.element},e.prototype.getId=function(){return e.ID},e.prototype.updateListHeight=function(){var e=0;if(2===this.state||1===this.state)e=this.unfocusedHeight;else{var t=this.list.contentHeight/this.unfocusedHeight;e=Math.min(t,12)*this.unfocusedHeight}return this.element.style.lineHeight=this.unfocusedHeight+"px",this.listElement.style.height=e+"px",this.list.layout(e),e},e.prototype.adjustDocsPosition=function(){var e=this.editor.getConfiguration().fontInfo.lineHeight,t=this.editor.getScrolledVisiblePosition(this.editor.getPosition()),n=Tn(this.editor.getDomNode()),i=n.left+t.left,o=n.top+t.top+t.height,r=Tn(this.element),s=r.left,a=r.top;sa&&this.details.element.offsetHeight>this.listElement.offsetHeight&&(this.listElement.style.marginTop=this.details.element.offsetHeight-this.listElement.offsetHeight+"px")},e.prototype.expandSideOrBelow=function(){if(!KL(this.focusedItem)&&this.firstFocusInCurrentList)return an(this.element,"docs-side"),void an(this.element,"docs-below");var e=this.element.style.maxWidth.match(/(\d+)px/);!e||Number(e[1])=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([HL(1,q),HL(2,he),HL(3,Lr),HL(4,dp),HL(5,xf),HL(6,o_),HL(7,z_)],e)}();Tr((function(e,t){var n=e.getColor(GL);n&&t.addRule(".monaco-editor .suggest-widget .monaco-list .monaco-list-row .monaco-highlighted-label .highlight { color: "+n+"; }");var i=e.getColor(YL);i&&t.addRule(".monaco-editor .suggest-widget { color: "+i+"; }");var o=e.getColor(ns);o&&t.addRule(".monaco-editor .suggest-widget a { color: "+o+"; }");var r=e.getColor(is);r&&t.addRule(".monaco-editor .suggest-widget code { background-color: "+r+"; }")}));var eI=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),tI=function(){function e(){}return e.prototype.select=function(e,t,n){if(0===n.length)return 0;for(var i=n[0].score,o=1;os&&c.type===u.type&&c.insertText===u.insertText&&(s=c.touch,r=a)}return-1===r?e.prototype.select.call(this,t,n,i):r},t.prototype.toJSON=function(){var e=[];return this._cache.forEach((function(t,n){e.push([n,t])})),e},t.prototype.fromJSON=function(e){this._cache.clear();for(var t=0,n=e;t0){this._seq=e[0][1].touch+1;for(var t=0,n=e;t=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([(t=1,n=dp,function(e,i){n(e,i,t)})],e);var t,n}(),sI=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),aI=function(e,t){return function(n,i){t(n,i,e)}},uI=function(){function e(e,t,n){var i=this;this._disposables=[],this._activeAcceptCharacters=new Set,this._disposables.push(t.onDidShow((function(){return i._onItem(t.getFocusedItem())}))),this._disposables.push(t.onDidFocus(this._onItem,this)),this._disposables.push(t.onDidHide(this.reset,this)),this._disposables.push(e.onWillType((function(t){if(i._activeItem){var o=t[t.length-1];i._activeAcceptCharacters.has(o)&&e.getConfiguration().contribInfo.acceptSuggestionOnCommitCharacter&&n(i._activeItem)}})))}return e.prototype._onItem=function(e){if(e&&!(0,tu.Ct)(e.item.suggestion.commitCharacters)){this._activeItem=e,this._activeAcceptCharacters.clear();for(var t=0,n=e.item.suggestion.commitCharacters;t0&&this._activeAcceptCharacters.add(i[0])}}else this.reset()},e.prototype.reset=function(){this._activeItem=void 0},e.prototype.dispose=function(){(0,I.AS)(this._disposables)},e}(),lI=function(){function e(e,t,n,i){var o=this;this._editor=e,this._commandService=t,this._contextKeyService=n,this._instantiationService=i,this._toDispose=[],this._model=new lL(this._editor),this._memory=i.createInstance(rI,this._editor.getConfiguration().contribInfo.suggestSelection),this._toDispose.push(this._model.onDidTrigger((function(e){o._widget||o._createSuggestWidget(),o._widget.showTriggered(e.auto)}))),this._toDispose.push(this._model.onDidSuggest((function(e){var t=o._memory.select(o._editor.getModel(),o._editor.getPosition(),e.completionModel.items);o._widget.showSuggestions(e.completionModel,t,e.isFrozen,e.auto)}))),this._toDispose.push(this._model.onDidCancel((function(e){o._widget&&!e.retrigger&&o._widget.hideWidget()})));var r=dS.AcceptSuggestionsOnEnter.bindTo(n),s=function(){var e=o._editor.getConfiguration().contribInfo,t=e.acceptSuggestionOnEnter,n=e.suggestSelection;r.set("on"===t||"smart"===t),o._memory.setMode(n)};this._toDispose.push(this._editor.onDidChangeConfiguration((function(e){return s()}))),s()}return e.get=function(t){return t.getContribution(e.ID)},e.prototype._createSuggestWidget=function(){var e=this;this._widget=this._instantiationService.createInstance($L,this._editor),this._toDispose.push(this._widget.onDidSelect(this._onDidSelectItem,this));var t=new uI(this._editor,this._widget,(function(t){return e._onDidSelectItem(t)}));this._toDispose.push(t,this._model.onDidSuggest((function(e){0===e.completionModel.items.length&&t.reset()})));var n=dS.MakesTextEdit.bindTo(this._contextKeyService);this._toDispose.push(this._widget.onDidFocus((function(t){var i=t.item,o=e._editor.getPosition(),r=i.position.column-i.suggestion.overwriteBefore,s=o.column,a=!0;"smart"!==e._editor.getConfiguration().contribInfo.acceptSuggestionOnEnter||2!==e._model.state||i.suggestion.command||i.suggestion.additionalTextEdits||"textmate"===i.suggestion.snippetType||s-r!==i.suggestion.insertText.length||(a=e._editor.getModel().getValueInRange({startLineNumber:o.lineNumber,startColumn:r,endLineNumber:o.lineNumber,endColumn:s})!==i.suggestion.insertText),n.set(a)}))),this._toDispose.push({dispose:function(){n.reset()}})},e.prototype.getId=function(){return e.ID},e.prototype.dispose=function(){this._toDispose=(0,I.AS)(this._toDispose),this._widget&&(this._widget.dispose(),this._widget=null),this._model&&(this._model.dispose(),this._model=null)},e.prototype._onDidSelectItem=function(e){var t;if(e&&e.item){var n=e.item,i=n.suggestion,o=n.position,r=this._editor.getPosition().column-o.column;this._editor.pushUndoStop(),Array.isArray(i.additionalTextEdits)&&this._editor.executeEdits("suggestController.additionalTextEdits",i.additionalTextEdits.map((function(e){return mf.replace(s.Q.lift(e.range),e.text)}))),this._memory.memorize(this._editor.getModel(),this._editor.getPosition(),e.item);var a=i.insertText;"textmate"!==i.snippetType&&(a=oS.escape(a)),SS.get(this._editor).insert(a,i.overwriteBefore+r,i.overwriteAfter,!1,!1),this._editor.pushUndoStop(),i.command?i.command.id===cI.id?this._model.trigger({auto:!0},!0):((t=this._commandService).executeCommand.apply(t,[i.command.id].concat(i.command.arguments)).done(void 0,S.dz),this._model.cancel()):this._model.cancel(),this._alertCompletionItem(e.item)}else this._model.cancel()},e.prototype._alertCompletionItem=function(e){var t=e.suggestion;Ep(o.k("arai.alert.snippet","Accepting '{0}' did insert the following text: {1}",t.label,t.insertText))},e.prototype.triggerSuggest=function(e){this._model.trigger({auto:!1},!1,e),this._editor.revealLine(this._editor.getPosition().lineNumber,0),this._editor.focus()},e.prototype.acceptSelectedSuggestion=function(){if(this._widget){var e=this._widget.getFocusedItem();this._onDidSelectItem(e)}},e.prototype.cancelSuggestWidget=function(){this._widget&&(this._model.cancel(),this._widget.hideWidget())},e.prototype.selectNextSuggestion=function(){this._widget&&this._widget.selectNext()},e.prototype.selectNextPageSuggestion=function(){this._widget&&this._widget.selectNextPage()},e.prototype.selectLastSuggestion=function(){this._widget&&this._widget.selectLast()},e.prototype.selectPrevSuggestion=function(){this._widget&&this._widget.selectPrevious()},e.prototype.selectPrevPageSuggestion=function(){this._widget&&this._widget.selectPreviousPage()},e.prototype.selectFirstSuggestion=function(){this._widget&&this._widget.selectFirst()},e.prototype.toggleSuggestionDetails=function(){this._widget&&this._widget.toggleDetails()},e.prototype.toggleSuggestionFocus=function(){this._widget&&this._widget.toggleDetailsFocus()},e.ID="editor.contrib.suggestController",e=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([aI(1,D),aI(2,he),aI(3,N._Y)],e)}(),cI=function(e){function t(){return e.call(this,{id:t.id,label:o.k("suggest.trigger.label","Trigger Suggest"),alias:"Trigger Suggest",precondition:ne.and(Oe.writable,Oe.hasCompletionItemProvider),kbOpts:{kbExpr:Oe.textInputFocus,primary:2058,mac:{primary:266},weight:100}})||this}return sI(t,e),t.prototype.run=function(e,t){var n=lI.get(t);n&&n.triggerSuggest()},t.id="editor.action.triggerSuggest",t}(xe);Ae(lI),Ee(cI);var hI=190,dI=Ne.bindToContribution(lI.get);Te(new dI({id:"acceptSelectedSuggestion",precondition:dS.Visible,handler:function(e){return e.acceptSelectedSuggestion()},kbOpts:{weight:hI,kbExpr:Oe.textInputFocus,primary:2}})),Te(new dI({id:"acceptSelectedSuggestionOnEnter",precondition:dS.Visible,handler:function(e){return e.acceptSelectedSuggestion()},kbOpts:{weight:hI,kbExpr:ne.and(Oe.textInputFocus,dS.AcceptSuggestionsOnEnter,dS.MakesTextEdit),primary:3}})),Te(new dI({id:"hideSuggestWidget",precondition:dS.Visible,handler:function(e){return e.cancelSuggestWidget()},kbOpts:{weight:hI,kbExpr:Oe.textInputFocus,primary:9,secondary:[1033]}})),Te(new dI({id:"selectNextSuggestion",precondition:ne.and(dS.Visible,dS.MultipleSuggestions),handler:function(e){return e.selectNextSuggestion()},kbOpts:{weight:hI,kbExpr:Oe.textInputFocus,primary:18,secondary:[2066],mac:{primary:18,secondary:[2066,300]}}})),Te(new dI({id:"selectNextPageSuggestion",precondition:ne.and(dS.Visible,dS.MultipleSuggestions),handler:function(e){return e.selectNextPageSuggestion()},kbOpts:{weight:hI,kbExpr:Oe.textInputFocus,primary:12,secondary:[2060]}})),Te(new dI({id:"selectLastSuggestion",precondition:ne.and(dS.Visible,dS.MultipleSuggestions),handler:function(e){return e.selectLastSuggestion()}})),Te(new dI({id:"selectPrevSuggestion",precondition:ne.and(dS.Visible,dS.MultipleSuggestions),handler:function(e){return e.selectPrevSuggestion()},kbOpts:{weight:hI,kbExpr:Oe.textInputFocus,primary:16,secondary:[2064],mac:{primary:16,secondary:[2064,302]}}})),Te(new dI({id:"selectPrevPageSuggestion",precondition:ne.and(dS.Visible,dS.MultipleSuggestions),handler:function(e){return e.selectPrevPageSuggestion()},kbOpts:{weight:hI,kbExpr:Oe.textInputFocus,primary:11,secondary:[2059]}})),Te(new dI({id:"selectFirstSuggestion",precondition:ne.and(dS.Visible,dS.MultipleSuggestions),handler:function(e){return e.selectFirstSuggestion()}})),Te(new dI({id:"toggleSuggestionDetails",precondition:dS.Visible,handler:function(e){return e.toggleSuggestionDetails()},kbOpts:{weight:hI,kbExpr:Oe.textInputFocus,primary:2058,mac:{primary:266}}})),Te(new dI({id:"toggleSuggestionFocus",precondition:dS.Visible,handler:function(e){return e.toggleSuggestionFocus()},kbOpts:{weight:hI,kbExpr:Oe.textInputFocus,primary:2570,mac:{primary:778}}}));var fI=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),pI=function(e){function t(){return e.call(this,{id:t.ID,label:o.k({key:"toggle.tabMovesFocus",comment:["Turn on/off use of tab key for moving focus around VS Code"]},"Toggle Tab Key Moves Focus"),alias:"Toggle Tab Key Moves Focus",precondition:null,kbOpts:{kbExpr:null,primary:2091,mac:{primary:1323},weight:100}})||this}return fI(t,e),t.prototype.run=function(e,t){var n=Pi.getTabFocusMode();Pi.setTabFocusMode(!n)},t.ID="editor.action.toggleTabFocusMode",t}(xe);Ee(pI);var gI=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),mI=Kr("editor.wordHighlightBackground",{dark:"#575757B8",light:"#57575740",hc:null},o.k("wordHighlight","Background color of a symbol during read-access, like reading a variable. The color must not be opaque to not hide underlying decorations."),!0),vI=Kr("editor.wordHighlightStrongBackground",{dark:"#004972B8",light:"#0e639c40",hc:null},o.k("wordHighlightStrong","Background color of a symbol during write-access, like writing to a variable. The color must not be opaque to not hide underlying decorations."),!0),yI=Kr("editor.wordHighlightBorder",{light:null,dark:null,hc:ts},o.k("wordHighlightBorder","Border color of a symbol during read-access, like reading a variable.")),bI=Kr("editor.wordHighlightStrongBorder",{light:null,dark:null,hc:ts},o.k("wordHighlightStrongBorder","Border color of a symbol during write-access, like writing to a variable.")),_I=Kr("editorOverviewRuler.wordHighlightForeground",{dark:"#A0A0A0CC",light:"#A0A0A0CC",hc:"#A0A0A0CC"},o.k("overviewRulerWordHighlightForeground","Overview ruler marker color for symbol highlights. The color must not be opaque to not hide underlying decorations."),!0),wI=Kr("editorOverviewRuler.wordHighlightStrongForeground",{dark:"#C0A0C0CC",light:"#C0A0C0CC",hc:"#C0A0C0CC"},o.k("overviewRulerWordHighlightStrongForeground","Overview ruler marker color for write-access symbol highlights. The color must not be opaque to not hide underlying decorations."),!0),MI=new ce("hasWordHighlights",!1);function CI(e,t,n){return bt(No.UG.ordered(e).map((function(i){return function(){return Promise.resolve(i.provideDocumentHighlights(e,t,n)).then(void 0,S.M_)}})),(function(e){return!(0,tu.Ct)(e)}))}ke("_executeDocumentHighlights",(function(e,t){return CI(e,t,st.None)}));var SI=function(){function e(e,t){var n=this;this.workerRequestTokenId=0,this.workerRequest=null,this.workerRequestCompleted=!1,this.workerRequestValue=[],this.lastCursorPositionChangeTime=0,this.renderDecorationsTimer=-1,this.editor=e,this._hasWordHighlights=MI.bindTo(t),this._ignorePositionChangeEvent=!1,this.occurrencesHighlight=this.editor.getConfiguration().contribInfo.occurrencesHighlight,this.model=this.editor.getModel(),this.toUnhook=[],this.toUnhook.push(e.onDidChangeCursorPosition((function(e){n._ignorePositionChangeEvent||n.occurrencesHighlight&&n._onPositionChanged(e)}))),this.toUnhook.push(e.onDidChangeModel((function(e){n._stopAll(),n.model=n.editor.getModel()}))),this.toUnhook.push(e.onDidChangeModelContent((function(e){n._stopAll()}))),this.toUnhook.push(e.onDidChangeConfiguration((function(e){var t=n.editor.getConfiguration().contribInfo.occurrencesHighlight;n.occurrencesHighlight!==t&&(n.occurrencesHighlight=t,n._stopAll())}))),this._lastWordRange=null,this._decorationIds=[],this.workerRequestTokenId=0,this.workerRequest=null,this.workerRequestCompleted=!1,this.lastCursorPositionChangeTime=0,this.renderDecorationsTimer=-1}return e.prototype.hasDecorations=function(){return this._decorationIds.length>0},e.prototype.restore=function(){this.occurrencesHighlight&&this._run()},e.prototype._getSortedHighlights=function(){var e=this;return this._decorationIds.map((function(t){return e.model.getDecorationRange(t)})).sort(s.Q.compareRangesUsingStarts)},e.prototype.moveNext=function(){var e=this,t=this._getSortedHighlights(),n=t[((0,tu.v4)(t,(function(t){return t.containsPosition(e.editor.getPosition())}))+1)%t.length];try{this._ignorePositionChangeEvent=!0,this.editor.setPosition(n.getStartPosition()),this.editor.revealRangeInCenterIfOutsideViewport(n)}finally{this._ignorePositionChangeEvent=!1}},e.prototype.moveBack=function(){var e=this,t=this._getSortedHighlights(),n=t[((0,tu.v4)(t,(function(t){return t.containsPosition(e.editor.getPosition())}))-1+t.length)%t.length];try{this._ignorePositionChangeEvent=!0,this.editor.setPosition(n.getStartPosition()),this.editor.revealRangeInCenterIfOutsideViewport(n)}finally{this._ignorePositionChangeEvent=!1}},e.prototype._removeDecorations=function(){this._decorationIds.length>0&&(this._decorationIds=this.editor.deltaDecorations(this._decorationIds,[]),this._hasWordHighlights.set(!1))},e.prototype._stopAll=function(){this._lastWordRange=null,this._removeDecorations(),-1!==this.renderDecorationsTimer&&(clearTimeout(this.renderDecorationsTimer),this.renderDecorationsTimer=-1),null!==this.workerRequest&&(this.workerRequest.cancel(),this.workerRequest=null),this.workerRequestCompleted||(this.workerRequestTokenId++,this.workerRequestCompleted=!0)},e.prototype._onPositionChanged=function(e){this.occurrencesHighlight&&e.reason===i.Explicit?this._run():this._stopAll()},e.prototype._run=function(){var e=this;if(No.UG.has(this.model)){var t=this.editor.getSelection();if(t.startLineNumber===t.endLineNumber){var n=t.startLineNumber,i=t.startColumn,o=t.endColumn,r=this.model.getWordAtPosition({lineNumber:n,column:i});if(!r||r.startColumn>i||r.endColumn=o&&(u=!0)}if(this.lastCursorPositionChangeTime=(new Date).getTime(),u)this.workerRequestCompleted&&-1!==this.renderDecorationsTimer&&(clearTimeout(this.renderDecorationsTimer),this.renderDecorationsTimer=-1,this._beginRenderDecorations());else{this._stopAll();var d=++this.workerRequestTokenId;this.workerRequestCompleted=!1,this.workerRequest=ft((function(t){return CI(e.model,e.editor.getPosition(),t)})),this.workerRequest.then((function(t){d===e.workerRequestTokenId&&(e.workerRequestCompleted=!0,e.workerRequestValue=t||[],e._beginRenderDecorations())}),S.dz)}this._lastWordRange=a}}else this._stopAll()}else this._stopAll()},e.prototype._beginRenderDecorations=function(){var e=this,t=(new Date).getTime(),n=this.lastCursorPositionChangeTime+250;t>=n?(this.renderDecorationsTimer=-1,this.renderDecorations()):this.renderDecorationsTimer=setTimeout((function(){e.renderDecorations()}),n-t)},e.prototype.renderDecorations=function(){this.renderDecorationsTimer=-1;for(var t=[],n=0,i=this.workerRequestValue.length;n=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([(t=1,n=he,function(e,i){n(e,i,t)})],e);var t,n}(),II=function(e){function t(t,n){var i=e.call(this,n)||this;return i._isNext=t,i}return gI(t,e),t.prototype.run=function(e,t){var n=LI.get(t);n&&(this._isNext?n.moveNext():n.moveBack())},t}(xe),NI=function(e){function t(){return e.call(this,!0,{id:"editor.action.wordHighlight.next",label:o.k("wordHighlight.next.label","Go to Next Symbol Highlight"),alias:"Go to Next Symbol Highlight",precondition:MI,kbOpts:{kbExpr:Oe.editorTextFocus,primary:65,weight:100}})||this}return gI(t,e),t}(II),xI=function(e){function t(){return e.call(this,!1,{id:"editor.action.wordHighlight.prev",label:o.k("wordHighlight.previous.label","Go to Previous Symbol Highlight"),alias:"Go to Previous Symbol Highlight",precondition:MI,kbOpts:{kbExpr:Oe.editorTextFocus,primary:1089,weight:100}})||this}return gI(t,e),t}(II);Ae(LI),Ee(NI),Ee(xI),Tr((function(e,t){var n=e.getColor(Vs);n&&(t.addRule(".monaco-editor .focused .selectionHighlight { background-color: "+n+"; }"),t.addRule(".monaco-editor .selectionHighlight { background-color: "+n.transparent(.5)+"; }"));var i=e.getColor(mI);i&&t.addRule(".monaco-editor .wordHighlight { background-color: "+i+"; }");var o=e.getColor(vI);o&&t.addRule(".monaco-editor .wordHighlightStrong { background-color: "+o+"; }");var r=e.getColor(Us);r&&t.addRule(".monaco-editor .selectionHighlight { border: 1px "+("hc"===e.type?"dotted":"solid")+" "+r+"; box-sizing: border-box; }");var s=e.getColor(yI);s&&t.addRule(".monaco-editor .wordHighlight { border: 1px "+("hc"===e.type?"dashed":"solid")+" "+s+"; box-sizing: border-box; }");var a=e.getColor(bI);a&&t.addRule(".monaco-editor .wordHighlightStrong { border: 1px "+("hc"===e.type?"dashed":"solid")+" "+a+"; box-sizing: border-box; }")}));var DI=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),kI=function(e){function t(t){var n=e.call(this,t)||this;return n._inSelectionMode=t.inSelectionMode,n._wordNavigationType=t.wordNavigationType,n}return DI(t,e),t.prototype.runEditorCommand=function(e,t,n){var o=this,s=t.getConfiguration(),a=(0,f.i)(s.wordSeparators),u=t.getModel(),c=t.getSelections().map((function(e){var t=new r.y(e.positionLineNumber,e.positionColumn),n=o._move(a,u,t,o._wordNavigationType);return o._moveTo(e,n,o._inSelectionMode)}));if(t._getCursors().setStates("moveWordCommand",i.NotSet,c.map((function(e){return l.MF.fromModelSelection(e)}))),1===c.length){var h=new r.y(c[0].positionLineNumber,c[0].positionColumn);t.revealPosition(h,0)}},t.prototype._moveTo=function(e,t,n){return n?new Be.L(e.selectionStartLineNumber,e.selectionStartColumn,t.lineNumber,t.column):new Be.L(t.lineNumber,t.column,t.lineNumber,t.column)},t}(Ne),TI=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return DI(t,e),t.prototype._move=function(e,t,n,i){return m.moveWordLeft(e,t,n,i)},t}(kI),EI=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return DI(t,e),t.prototype._move=function(e,t,n,i){return m.moveWordRight(e,t,n,i)},t}(kI),AI=function(e){function t(){return e.call(this,{inSelectionMode:!1,wordNavigationType:0,id:"cursorWordStartLeft",precondition:null,kbOpts:{kbExpr:Oe.textInputFocus,primary:2063,mac:{primary:527},weight:100}})||this}return DI(t,e),t}(TI),jI=function(e){function t(){return e.call(this,{inSelectionMode:!1,wordNavigationType:1,id:"cursorWordEndLeft",precondition:null})||this}return DI(t,e),t}(TI),OI=function(e){function t(){return e.call(this,{inSelectionMode:!1,wordNavigationType:0,id:"cursorWordLeft",precondition:null})||this}return DI(t,e),t}(TI),RI=function(e){function t(){return e.call(this,{inSelectionMode:!0,wordNavigationType:0,id:"cursorWordStartLeftSelect",precondition:null,kbOpts:{kbExpr:Oe.textInputFocus,primary:3087,mac:{primary:1551},weight:100}})||this}return DI(t,e),t}(TI),PI=function(e){function t(){return e.call(this,{inSelectionMode:!0,wordNavigationType:1,id:"cursorWordEndLeftSelect",precondition:null})||this}return DI(t,e),t}(TI),zI=function(e){function t(){return e.call(this,{inSelectionMode:!0,wordNavigationType:0,id:"cursorWordLeftSelect",precondition:null})||this}return DI(t,e),t}(TI),WI=function(e){function t(){return e.call(this,{inSelectionMode:!1,wordNavigationType:0,id:"cursorWordStartRight",precondition:null})||this}return DI(t,e),t}(EI),FI=function(e){function t(){return e.call(this,{inSelectionMode:!1,wordNavigationType:1,id:"cursorWordEndRight",precondition:null,kbOpts:{kbExpr:Oe.textInputFocus,primary:2065,mac:{primary:529},weight:100}})||this}return DI(t,e),t}(EI),BI=function(e){function t(){return e.call(this,{inSelectionMode:!1,wordNavigationType:1,id:"cursorWordRight",precondition:null})||this}return DI(t,e),t}(EI),HI=function(e){function t(){return e.call(this,{inSelectionMode:!0,wordNavigationType:0,id:"cursorWordStartRightSelect",precondition:null})||this}return DI(t,e),t}(EI),VI=function(e){function t(){return e.call(this,{inSelectionMode:!0,wordNavigationType:1,id:"cursorWordEndRightSelect",precondition:null,kbOpts:{kbExpr:Oe.textInputFocus,primary:3089,mac:{primary:1553},weight:100}})||this}return DI(t,e),t}(EI),UI=function(e){function t(){return e.call(this,{inSelectionMode:!0,wordNavigationType:1,id:"cursorWordRightSelect",precondition:null})||this}return DI(t,e),t}(EI),YI=function(e){function t(t){var n=e.call(this,t)||this;return n._whitespaceHeuristics=t.whitespaceHeuristics,n._wordNavigationType=t.wordNavigationType,n}return DI(t,e),t.prototype.runEditorCommand=function(e,t,n){var i=this,o=t.getConfiguration(),r=(0,f.i)(o.wordSeparators),s=t.getModel(),a=t.getSelections().map((function(e){var t=i._delete(r,s,e,i._whitespaceHeuristics,i._wordNavigationType);return new He(t,"")}));t.pushUndoStop(),t.executeCommands(this.id,a),t.pushUndoStop()},t}(Ne),ZI=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return DI(t,e),t.prototype._delete=function(e,t,n,i,o){return m.deleteWordLeft(e,t,n,i,o)||new s.Q(1,1,1,1)},t}(YI),GI=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return DI(t,e),t.prototype._delete=function(e,t,n,i,o){var r=m.deleteWordRight(e,t,n,i,o);if(r)return r;var a=t.getLineCount(),u=t.getLineMaxColumn(a);return new s.Q(a,u,a,u)},t}(YI),QI=function(e){function t(){return e.call(this,{whitespaceHeuristics:!1,wordNavigationType:0,id:"deleteWordStartLeft",precondition:Oe.writable})||this}return DI(t,e),t}(ZI),qI=function(e){function t(){return e.call(this,{whitespaceHeuristics:!1,wordNavigationType:1,id:"deleteWordEndLeft",precondition:Oe.writable})||this}return DI(t,e),t}(ZI),KI=function(e){function t(){return e.call(this,{whitespaceHeuristics:!0,wordNavigationType:0,id:"deleteWordLeft",precondition:Oe.writable,kbOpts:{kbExpr:Oe.textInputFocus,primary:2049,mac:{primary:513},weight:100}})||this}return DI(t,e),t}(ZI),JI=function(e){function t(){return e.call(this,{whitespaceHeuristics:!1,wordNavigationType:0,id:"deleteWordStartRight",precondition:Oe.writable})||this}return DI(t,e),t}(GI),XI=function(e){function t(){return e.call(this,{whitespaceHeuristics:!1,wordNavigationType:1,id:"deleteWordEndRight",precondition:Oe.writable})||this}return DI(t,e),t}(GI),$I=function(e){function t(){return e.call(this,{whitespaceHeuristics:!0,wordNavigationType:1,id:"deleteWordRight",precondition:Oe.writable,kbOpts:{kbExpr:Oe.textInputFocus,primary:2068,mac:{primary:532},weight:100}})||this}return DI(t,e),t}(GI);Te(new AI),Te(new jI),Te(new OI),Te(new RI),Te(new PI),Te(new zI),Te(new WI),Te(new FI),Te(new BI),Te(new HI),Te(new VI),Te(new UI),Te(new QI),Te(new qI),Te(new KI),Te(new JI),Te(new XI),Te(new $I);var eN=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),tN=function(e){function t(){return e.call(this,{whitespaceHeuristics:!0,wordNavigationType:0,id:"deleteWordPartLeft",precondition:Oe.writable,kbOpts:{kbExpr:Oe.textInputFocus,primary:0,mac:{primary:769},weight:100}})||this}return eN(t,e),t.prototype._delete=function(e,t,n,i,o){return _.deleteWordPartLeft(e,t,n,i,o)||new s.Q(1,1,1,1)},t}(YI),nN=function(e){function t(){return e.call(this,{whitespaceHeuristics:!0,wordNavigationType:1,id:"deleteWordPartRight",precondition:Oe.writable,kbOpts:{kbExpr:Oe.textInputFocus,primary:0,mac:{primary:788},weight:100}})||this}return eN(t,e),t.prototype._delete=function(e,t,n,i,o){var r=_.deleteWordPartRight(e,t,n,i,o);if(r)return r;var a=t.getLineCount(),u=t.getLineMaxColumn(a);return new s.Q(a,u,a,u)},t}(YI),iN=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return eN(t,e),t.prototype._move=function(e,t,n,i){return _.moveWordPartLeft(e,t,n,i)},t}(kI),oN=function(e){function t(){return e.call(this,{inSelectionMode:!1,wordNavigationType:0,id:"cursorWordPartLeft",precondition:null,kbOpts:{kbExpr:Oe.textInputFocus,primary:0,mac:{primary:783},weight:100}})||this}return eN(t,e),t}(iN);k.registerCommandAlias("cursorWordPartStartLeft","cursorWordPartLeft");var rN=function(e){function t(){return e.call(this,{inSelectionMode:!0,wordNavigationType:0,id:"cursorWordPartLeftSelect",precondition:null,kbOpts:{kbExpr:Oe.textInputFocus,primary:0,mac:{primary:1807},weight:100}})||this}return eN(t,e),t}(iN);k.registerCommandAlias("cursorWordPartStartLeftSelect","cursorWordPartLeftSelect");var sN=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return eN(t,e),t.prototype._move=function(e,t,n,i){return _.moveWordPartRight(e,t,n,i)},t}(kI),aN=function(e){function t(){return e.call(this,{inSelectionMode:!1,wordNavigationType:1,id:"cursorWordPartRight",precondition:null,kbOpts:{kbExpr:Oe.textInputFocus,primary:0,mac:{primary:785},weight:100}})||this}return eN(t,e),t}(sN),uN=function(e){function t(){return e.call(this,{inSelectionMode:!0,wordNavigationType:1,id:"cursorWordPartRightSelect",precondition:null,kbOpts:{kbExpr:Oe.textInputFocus,primary:0,mac:{primary:1809},weight:100}})||this}return eN(t,e),t}(sN);Te(new tN),Te(new nN),Te(new oN),Te(new rN),Te(new aN),Te(new uN),n(5676);var lN=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),cN=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},hN=function(e,t){return function(n,i){t(n,i,e)}},dN=new ce("accessibilityHelpWidgetVisible",!1),fN=function(e){function t(t,n){var i=e.call(this)||this;return i._editor=t,i._widget=i._register(n.createInstance(bN,i._editor)),i}return lN(t,e),t.get=function(e){return e.getContribution(t.ID)},t.prototype.getId=function(){return t.ID},t.prototype.show=function(){this._widget.show()},t.prototype.hide=function(){this._widget.hide()},t.ID="editor.contrib.accessibilityHelpController",t=cN([hN(1,N._Y)],t)}(I.jG),pN=o.k("noSelection","No selection"),gN=o.k("singleSelectionRange","Line {0}, Column {1} ({2} selected)"),mN=o.k("singleSelection","Line {0}, Column {1}"),vN=o.k("multiSelectionRange","{0} selections ({1} characters selected)"),yN=o.k("multiSelection","{0} selections"),bN=function(e){function t(t,n,i,r){var s=e.call(this)||this;return s._contextKeyService=n,s._keybindingService=i,s._openerService=r,s._editor=t,s._isVisibleKey=dN.bindTo(s._contextKeyService),s._domNode=Ar(document.createElement("div")),s._domNode.setClassName("accessibilityHelpWidget"),s._domNode.setDisplay("none"),s._domNode.setAttribute("role","dialog"),s._domNode.setAttribute("aria-hidden","true"),s._contentDomNode=Ar(document.createElement("div")),s._contentDomNode.setAttribute("role","document"),s._domNode.appendChild(s._contentDomNode),s._isVisible=!1,s._register(s._editor.onDidLayoutChange((function(){s._isVisible&&s._layout()}))),s._register(hn(s._contentDomNode.domNode,"keydown",(function(e){if(s._isVisible&&(e.equals(2083)&&(Ep(o.k("emergencyConfOn","Now changing the setting `accessibilitySupport` to 'on'.")),s._editor.updateOptions({accessibilitySupport:"on"}),en(s._contentDomNode.domNode),s._buildContent(),s._contentDomNode.domNode.focus(),e.preventDefault(),e.stopPropagation()),e.equals(2086))){Ep(o.k("openingDocs","Now opening the Editor Accessibility documentation page."));var t=s._editor.getRawConfiguration().accessibilityHelpUrl;void 0===t&&(t="https://go.microsoft.com/fwlink/?linkid=852450"),s._openerService.open(L.A.parse(t)),e.preventDefault(),e.stopPropagation()}}))),s.onblur(s._contentDomNode.domNode,(function(){s.hide()})),s._editor.addOverlayWidget(s),s}return lN(t,e),t.prototype.dispose=function(){this._editor.removeOverlayWidget(this),e.prototype.dispose.call(this)},t.prototype.getId=function(){return t.ID},t.prototype.getDomNode=function(){return this._domNode.domNode},t.prototype.getPosition=function(){return{preference:null}},t.prototype.show=function(){this._isVisible||(this._isVisible=!0,this._isVisibleKey.set(!0),this._layout(),this._domNode.setDisplay("block"),this._domNode.setAttribute("aria-hidden","false"),this._contentDomNode.domNode.tabIndex=0,this._buildContent(),this._contentDomNode.domNode.focus())},t.prototype._descriptionForCommand=function(e,t,n){var i=this._keybindingService.lookupKeybinding(e);return i?p.format(t,i.getAriaLabel()):p.format(n,e)},t.prototype._buildContent=function(){var e=this._editor.getConfiguration(),t=this._editor.getSelections(),n=0;if(t){var i=this._editor.getModel();i&&t.forEach((function(e){n+=i.getValueLengthInRange(e)}))}var r=function(e,t){return e&&0!==e.length?1===e.length?t?p.format(gN,e[0].positionLineNumber,e[0].positionColumn,t):p.format(mN,e[0].positionLineNumber,e[0].positionColumn):t?p.format(vN,e.length,t):e.length>0?p.format(yN,e.length):null:pN}(t,n);switch(e.wrappingInfo.inDiffEditor?e.readOnly?r+=o.k("readonlyDiffEditor"," in a read-only pane of a diff editor."):r+=o.k("editableDiffEditor"," in a pane of a diff editor."):e.readOnly?r+=o.k("readonlyEditor"," in a read-only code editor"):r+=o.k("editableEditor"," in a code editor"),e.accessibilitySupport){case 0:var s=B.zx?o.k("changeConfigToOnMac","To configure the editor to be optimized for usage with a Screen Reader press Command+E now."):o.k("changeConfigToOnWinLinux","To configure the editor to be optimized for usage with a Screen Reader press Control+E now.");r+="\n\n - "+s;break;case 2:r+="\n\n - "+o.k("auto_on","The editor is configured to be optimized for usage with a Screen Reader.");break;case 1:r+="\n\n - "+o.k("auto_off","The editor is configured to never be optimized for usage with a Screen Reader, which is not the case at this time."),r+=" "+s}var a=o.k("tabFocusModeOnMsg","Pressing Tab in the current editor will move focus to the next focusable element. Toggle this behavior by pressing {0}."),u=o.k("tabFocusModeOnMsgNoKb","Pressing Tab in the current editor will move focus to the next focusable element. The command {0} is currently not triggerable by a keybinding."),l=o.k("tabFocusModeOffMsg","Pressing Tab in the current editor will insert the tab character. Toggle this behavior by pressing {0}."),c=o.k("tabFocusModeOffMsgNoKb","Pressing Tab in the current editor will insert the tab character. The command {0} is currently not triggerable by a keybinding.");e.tabFocusMode?r+="\n\n - "+this._descriptionForCommand(pI.ID,a,u):r+="\n\n - "+this._descriptionForCommand(pI.ID,l,c),r+="\n\n - "+(B.zx?o.k("openDocMac","Press Command+H now to open a browser window with more information related to editor accessibility."):o.k("openDocWinLinux","Press Control+H now to open a browser window with more information related to editor accessibility.")),r+="\n\n"+o.k("outroMsg","You can dismiss this tooltip and return to the editor by pressing Escape or Shift+Escape."),this._contentDomNode.domNode.appendChild(Lp(r)),this._contentDomNode.domNode.setAttribute("aria-label",r)},t.prototype.hide=function(){this._isVisible&&(this._isVisible=!1,this._isVisibleKey.reset(),this._domNode.setDisplay("none"),this._domNode.setAttribute("aria-hidden","true"),this._contentDomNode.domNode.tabIndex=-1,en(this._contentDomNode.domNode),this._editor.focus())},t.prototype._layout=function(){var e=this._editor.getLayoutInfo(),n=Math.max(5,Math.min(t.WIDTH,e.width-40)),i=Math.max(5,Math.min(t.HEIGHT,e.height-40));this._domNode.setWidth(n),this._domNode.setHeight(i);var o=Math.round((e.height-i)/2);this._domNode.setTop(o);var r=Math.round((e.width-n)/2);this._domNode.setLeft(r)},t.ID="editor.contrib.accessibilityHelpWidget",t.WIDTH=500,t.HEIGHT=300,t=cN([hN(1,he),hN(2,xf),hN(3,z_)],t)}(kc),_N=function(e){function t(){return e.call(this,{id:"editor.action.showAccessibilityHelp",label:o.k("ShowAccessibilityHelpAction","Show Accessibility Help"),alias:"Show Accessibility Help",precondition:null,kbOpts:{kbExpr:Oe.focus,primary:xt?2107:571,weight:100}})||this}return lN(t,e),t.prototype.run=function(e,t){var n=fN.get(t);n&&n.show()},t}(xe);Ae(fN),Ee(_N),Te(new(Ne.bindToContribution(fN.get))({id:"closeAccessibilityHelp",precondition:dN,handler:function(e){return e.hide()},kbOpts:{weight:200,kbExpr:Oe.focus,primary:9,secondary:[1033]}})),Tr((function(e,t){var n=e.getColor(Ps);n&&t.addRule(".monaco-editor .accessibilityHelpWidget { background-color: "+n+"; }");var i=e.getColor(os);i&&t.addRule(".monaco-editor .accessibilityHelpWidget { box-shadow: 0 2px 8px "+i+"; }");var o=e.getColor(es);o&&t.addRule(".monaco-editor .accessibilityHelpWidget { border: 2px solid "+o+"; }")})),n(6336);var wN=(0,N.u1)("themeService"),MN=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),CN=function(e,t){return function(n,i){t(n,i,e)}},SN=function(e){function t(t,n,i){var o=e.call(this)||this;return o._editor=t,o._standaloneThemeService=n,o._modeService=i,o._widget=null,o._register(o._editor.onDidChangeModel((function(e){return o.stop()}))),o._register(o._editor.onDidChangeModelLanguage((function(e){return o.stop()}))),o._register(No.dG.onDidChange((function(e){return o.stop()}))),o}return MN(t,e),t.get=function(e){return e.getContribution(t.ID)},t.prototype.getId=function(){return t.ID},t.prototype.dispose=function(){this.stop(),e.prototype.dispose.call(this)},t.prototype.launch=function(){this._widget||this._editor.getModel()&&(this._widget=new IN(this._editor,this._standaloneThemeService,this._modeService))},t.prototype.stop=function(){this._widget&&(this._widget.dispose(),this._widget=null)},t.ID="editor.contrib.inspectTokens",t=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([CN(1,wN),CN(2,o_)],t)}(I.jG),LN=function(e){function t(){return e.call(this,{id:"editor.action.inspectTokens",label:o.k("inspectTokens","Developer: Inspect Tokens"),alias:"Developer: Inspect Tokens",precondition:null})||this}return MN(t,e),t.prototype.run=function(e,t){var n=SN.get(t);n&&n.launch()},t}(xe),IN=function(e){function t(t,n,i){var o,r=e.call(this)||this;return r.allowEditorOverflow=!0,r._editor=t,r._modeService=i,r._model=r._editor.getModel(),r._domNode=document.createElement("div"),r._domNode.className="tokens-inspect-widget",r._tokenizationSupport=(o=r._model.getLanguageIdentifier(),No.dG.get(o.language)||{getInitialState:function(){return xo.oe},tokenize:function(e,t,n){return(0,xo.$H)(o.language,e,t,n)},tokenize2:function(e,t,n){return(0,xo.T5)(o.id,e,t,n)}}),r._compute(r._editor.getPosition()),r._register(r._editor.onDidChangeCursorPosition((function(e){return r._compute(r._editor.getPosition())}))),r._editor.addContentWidget(r),r}return MN(t,e),t.prototype.dispose=function(){this._editor.removeContentWidget(this),e.prototype.dispose.call(this)},t.prototype.getId=function(){return t._ID},t.prototype._compute=function(e){for(var t=this._getTokensAtLine(e.lineNumber),n=0,i=t.tokens1.length-1;i>=0;i--){var o=t.tokens1[i];if(e.column-1>=o.offset){n=i;break}}var r=0;for(i=t.tokens2.length>>>1;i>=0;i--)if(e.column-1>=t.tokens2[i<<1]){r=i;break}var s="",a=this._model.getLineContent(e.lineNumber),u="";if(n'+function(e){for(var t="",n=0,i=e.length;n('+u.length+" "+(1===u.length?"char":"chars")+")",s+='
    ';var h=this._decodeMetadata(t.tokens2[1+(r<<1)]);s+='',s+='",s+='",s+='",s+='",s+='",s+="",s+='
    ',n'+(0,p.escape)(t.tokens1[n].type)+""),this._domNode.innerHTML=s,this._editor.layoutContentWidget(this)},t.prototype._decodeMetadata=function(e){var t=No.dG.getColorMap(),n=No.xn.getLanguageId(e),i=No.xn.getTokenType(e),o=No.xn.getFontStyle(e),r=No.xn.getForeground(e),s=No.xn.getBackground(e);return{languageIdentifier:this._modeService.getLanguageIdentifier(n),tokenType:i,fontStyle:o,foreground:t[r],background:t[s]}},t.prototype._tokenTypeToString=function(e){switch(e){case 0:return"Other";case 1:return"Comment";case 2:return"String";case 4:return"RegEx"}return"??"},t.prototype._fontStyleToString=function(e){var t="";return 1&e&&(t+="italic "),2&e&&(t+="bold "),4&e&&(t+="underline "),0===t.length&&(t="---"),t},t.prototype._getTokensAtLine=function(e){var t=this._getStateBeforeLine(e),n=this._tokenizationSupport.tokenize(this._model.getLineContent(e),t,0),i=this._tokenizationSupport.tokenize2(this._model.getLineContent(e),t,0);return{startState:t,tokens1:n.tokens,tokens2:i.tokens,endState:n.endState}},t.prototype._getStateBeforeLine=function(e){for(var t=this._tokenizationSupport.getInitialState(),n=1;n0?n.actionBar.push(e,{icon:!0,label:!1}):n.actionBar.isEmpty()||e&&0!==e.length||n.actionBar.clear()})),e instanceof WN&&e.getGroupLabel()?sn(n.container,"has-group-label"):an(n.container,"has-group-label"),e instanceof WN){var o=e,r=n;o.showBorder()?(sn(r.container,"results-group-separator"),r.container.style.borderTopColor=i.pickerGroupBorder.toString()):(an(r.container,"results-group-separator"),r.container.style.borderTopColor=null);var s=o.getGroupLabel()||"";r.group.textContent=s,r.group.style.color=i.pickerGroupForeground.toString()}if(e instanceof zN){var a=e.getHighlights(),u=a[0],l=a[1],c=a[2],h=e.getIcon()?"quick-open-entry-icon "+e.getIcon():"";n.icon.className=h;var d=e.getLabelOptions()||Object.create(null);d.matches=u||[],d.title=e.getTooltip(),d.descriptionTitle=e.getDescriptionTooltip()||e.getDescription(),d.descriptionMatches=l||[],n.label.setValue(e.getLabel(),e.getDescription(),d),n.detail.set(e.getDetail(),c),n.keybinding.set(e.getKeybinding(),null)}},e.prototype.disposeTemplate=function(e,t){var n=t;n.actionBar.dispose(),n.actionBar=null,n.container=null,n.entry=null,n.keybinding.dispose(),n.keybinding=null,n.detail.dispose(),n.detail=null,n.group=null,n.icon=null,n.label.dispose(),n.label=null},e}(),VN=function(){function e(e,t){void 0===e&&(e=[]),void 0===t&&(t=new FN),this._entries=e,this._dataSource=this,this._renderer=new HN(t),this._filter=this,this._runner=this,this._accessibilityProvider=this}return Object.defineProperty(e.prototype,"entries",{get:function(){return this._entries},set:function(e){this._entries=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"dataSource",{get:function(){return this._dataSource},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"renderer",{get:function(){return this._renderer},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"filter",{get:function(){return this._filter},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"runner",{get:function(){return this._runner},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"accessibilityProvider",{get:function(){return this._accessibilityProvider},enumerable:!0,configurable:!0}),e.prototype.getId=function(e){return e.getId()},e.prototype.getLabel=function(e){return e.getLabel()},e.prototype.getAriaLabel=function(e){return e.getAriaLabel()?o.k("quickOpenAriaLabelEntry","{0}, picker",e.getAriaLabel()):o.k("quickOpenAriaLabel","picker")},e.prototype.isVisible=function(e){return!e.isHidden()},e.prototype.run=function(e,t,n){return e.run(t,n)},e}();!function(e){e[e.PREVIEW=0]="PREVIEW",e[e.OPEN=1]="OPEN",e[e.OPEN_IN_BACKGROUND=2]="OPEN_IN_BACKGROUND"}(AN||(AN={})),n(6173);var UN,YN=function(){function e(e){this.modelProvider=(0,w.Tn)(e.getModel)?e:{getModel:function(){return e}}}return e.prototype.getId=function(e,t){if(!t)return null;var n=this.modelProvider.getModel();return n===t?"__root__":n.dataSource.getId(t)},e.prototype.hasChildren=function(e,t){var n=this.modelProvider.getModel();return n&&n===t&&n.entries.length>0},e.prototype.getChildren=function(e,t){var n=this.modelProvider.getModel();return J.g3.as(n===t?n.entries:[])},e.prototype.getParent=function(e,t){return J.g3.as(null)},e}(),ZN=function(){function e(e){this.modelProvider=e}return e.prototype.getAriaLabel=function(e,t){var n=this.modelProvider.getModel();return n.accessibilityProvider&&n.accessibilityProvider.getAriaLabel(t)},e.prototype.getPosInSet=function(e,t){var n=this.modelProvider.getModel();return String(n.entries.indexOf(t)+1)},e.prototype.getSetSize=function(){var e=this.modelProvider.getModel();return String(e.entries.length)},e}(),GN=function(){function e(e){this.modelProvider=e}return e.prototype.isVisible=function(e,t){var n=this.modelProvider.getModel();return!n.filter||n.filter.isVisible(t)},e}(),QN=function(){function e(e,t){this.modelProvider=e,this.styles=t}return e.prototype.updateStyles=function(e){this.styles=e},e.prototype.getHeight=function(e,t){return this.modelProvider.getModel().renderer.getHeight(t)},e.prototype.getTemplateId=function(e,t){return this.modelProvider.getModel().renderer.getTemplateId(t)},e.prototype.renderTemplate=function(e,t,n){return this.modelProvider.getModel().renderer.renderTemplate(t,n,this.styles)},e.prototype.renderElement=function(e,t,n,i){this.modelProvider.getModel().renderer.renderElement(t,n,i,this.styles)},e.prototype.disposeTemplate=function(e,t,n){this.modelProvider.getModel().renderer.disposeTemplate(t,n)},e}(),qN=(n(1825),function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}()),KN="infinite",JN={progressBarBackground:Go.fromHex("#0E70C0")},XN=function(e){function t(t,n){var i=e.call(this)||this;return i.options=n||Object.create(null),(0,ri.co)(i.options,JN,!1),i.workedVal=0,i.progressBarBackground=i.options.progressBarBackground,i.create(t),i}return qN(t,e),t.prototype.create=function(e){var t=this;Zh(e).div({class:"monaco-progress-container"},(function(e){t.element=e.clone(),e.div({class:"progress-bit"}).on([Un.ANIMATION_START,Un.ANIMATION_END,Un.ANIMATION_ITERATION],(function(e){e.type===Un.ANIMATION_ITERATION&&t.animationStopToken&&t.animationStopToken(null)}),t.toDispose),t.bit=e.getHTMLElement()})),this.applyStyles()},t.prototype.off=function(){this.bit.style.width="inherit",this.bit.style.opacity="1",this.element.removeClass("active"),this.element.removeClass(KN),this.element.removeClass("discrete"),this.workedVal=0,this.totalWork=void 0},t.prototype.stop=function(){return this.doDone(!1)},t.prototype.doDone=function(e){var t=this;return this.element.addClass("done"),this.element.hasClass(KN)?(this.bit.style.opacity="0",e?J.g3.timeout(200).then((function(){return t.off()})):this.off()):(this.bit.style.width="inherit",e?J.g3.timeout(200).then((function(){return t.off()})):this.off()),this},t.prototype.hide=function(){this.element.hide()},t.prototype.style=function(e){this.progressBarBackground=e.progressBarBackground,this.applyStyles()},t.prototype.applyStyles=function(){if(this.bit){var e=this.progressBarBackground?this.progressBarBackground.toString():null;this.bit.style.backgroundColor=e}},t}(I.jG),$N=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),ex=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return $N(t,e),t.prototype.onContextMenu=function(t,n,i){return B.zx?this.onLeftClick(t,n,i):e.prototype.onContextMenu.call(this,t,n,i)},t}(sy);!function(e){e[e.ELEMENT_SELECTED=0]="ELEMENT_SELECTED",e[e.FOCUS_LOST=1]="FOCUS_LOST",e[e.CANCELED=2]="CANCELED"}(UN||(UN={}));var tx={background:Go.fromHex("#1E1E1E"),foreground:Go.fromHex("#CCCCCC"),pickerGroupForeground:Go.fromHex("#0097FB"),pickerGroupBorder:Go.fromHex("#3F3F46"),widgetShadow:Go.fromHex("#000000"),progressBarBackground:Go.fromHex("#0E70C0")},nx=o.k("quickOpenAriaLabel","Quick picker. Type to narrow down results."),ix=function(e){function t(t,n,i){var o=e.call(this)||this;return o.isDisposed=!1,o.container=t,o.callbacks=n,o.options=i,o.styles=i||Object.create(null),(0,ri.co)(o.styles,tx,!1),o.model=null,o}return $N(t,e),t.prototype.getModel=function(){return this.model},t.prototype.create=function(){var e=this;return this.builder=Zh().div((function(t){t.on(Un.KEY_DOWN,(function(t){var n=new Bt(t);if(9===n.keyCode)Yn(t,!0),e.hide(UN.CANCELED);else if(2===n.keyCode&&!n.altKey&&!n.ctrlKey&&!n.metaKey){var i=t.currentTarget.querySelectorAll("input, .monaco-tree, .monaco-tree-row.focused .action-label.icon");n.shiftKey&&n.target===i[0]?(Yn(t,!0),i[i.length-1].focus()):n.shiftKey||n.target!==i[i.length-1]||(Yn(t,!0),i[0].focus())}})).on(Un.CONTEXT_MENU,(function(e){return Yn(e,!0)})).on(Un.FOCUS,(function(t){return e.gainingFocus()}),null,!0).on(Un.BLUR,(function(t){return e.loosingFocus(t)}),null,!0),e.progressBar=e._register(new XN(t.clone(),{progressBarBackground:e.styles.progressBarBackground})),e.progressBar.hide(),t.div({class:"quick-open-input"},(function(t){e.inputContainer=t,e.inputBox=e._register(new Xp(t.getHTMLElement(),null,{placeholder:e.options.inputPlaceHolder||"",ariaLabel:nx,inputBackground:e.styles.inputBackground,inputForeground:e.styles.inputForeground,inputBorder:e.styles.inputBorder,inputValidationInfoBackground:e.styles.inputValidationInfoBackground,inputValidationInfoBorder:e.styles.inputValidationInfoBorder,inputValidationWarningBackground:e.styles.inputValidationWarningBackground,inputValidationWarningBorder:e.styles.inputValidationWarningBorder,inputValidationErrorBackground:e.styles.inputValidationErrorBackground,inputValidationErrorBorder:e.styles.inputValidationErrorBorder})),e.inputElement=e.inputBox.inputElement,e.inputElement.setAttribute("role","combobox"),e.inputElement.setAttribute("aria-haspopup","false"),e.inputElement.setAttribute("aria-autocomplete","list"),cn(e.inputBox.inputElement,Un.KEY_DOWN,(function(t){var n=new Bt(t),i=e.shouldOpenInBackground(n);if(2!==n.keyCode)if(18===n.keyCode||16===n.keyCode||12===n.keyCode||11===n.keyCode)Yn(t,!0),e.navigateInTree(n.keyCode,n.shiftKey),e.inputBox.inputElement.selectionStart===e.inputBox.inputElement.selectionEnd&&(e.inputBox.inputElement.selectionStart=e.inputBox.value.length);else if(3===n.keyCode||i){Yn(t,!0);var o=e.tree.getFocus();o&&e.elementSelected(o,t,i?AN.OPEN_IN_BACKGROUND:AN.OPEN)}})),cn(e.inputBox.inputElement,Un.INPUT,(function(t){e.onType()}))})),e.resultCount=t.div({class:"quick-open-result-count","aria-live":"polite"}).clone(),e.treeContainer=t.div({class:"quick-open-tree"},(function(t){var n=e.options.treeCreator||function(e,t,n){return new Yy(e,t,n)};e.tree=e._register(n(t.getHTMLElement(),{dataSource:new YN(e),controller:new ex({clickBehavior:ty.ON_MOUSE_UP,keyboardSupport:e.options.keyboardSupport}),renderer:e.renderer=new QN(e,e.styles),filter:new GN(e),accessibilityProvider:new ZN(e)},{twistiePixels:11,indentPixels:0,alwaysFocused:!0,verticalScrollMode:gr.XR.Visible,horizontalScrollMode:gr.XR.Hidden,ariaLabel:o.k("treeAriaLabel","Quick Picker"),keyboardSupport:e.options.keyboardSupport,preventRootFocus:!1})),e.treeElement=e.tree.getHTMLElement(),e._register(e.tree.onDidChangeFocus((function(t){e.elementFocused(t.focus,t)}))),e._register(e.tree.onDidChangeSelection((function(t){if(t.selection&&t.selection.length>0){var n=t.payload&&t.payload.originalEvent instanceof Qt?t.payload.originalEvent:void 0,i=!!n&&e.shouldOpenInBackground(n);e.elementSelected(t.selection[0],t,i?AN.OPEN_IN_BACKGROUND:AN.OPEN)}})))})).on(Un.KEY_DOWN,(function(t){var n=new Bt(t);e.quickNavigateConfiguration&&(18!==n.keyCode&&16!==n.keyCode&&12!==n.keyCode&&11!==n.keyCode||(Yn(t,!0),e.navigateInTree(n.keyCode)))})).on(Un.KEY_UP,(function(t){var n=new Bt(t),i=n.keyCode;if(e.quickNavigateConfiguration){var o=e.quickNavigateConfiguration.keybindings,r=3===i||o.some((function(e){var t=e.getParts(),o=t[0];return!(t[1]||(o.shiftKey&&4===i?n.ctrlKey||n.altKey||n.metaKey:!(o.altKey&&6===i||o.ctrlKey&&5===i||o.metaKey&&57===i)))}));if(r){var s=e.tree.getFocus();s&&e.elementSelected(s,t)}}})).clone()})).addClass("monaco-quick-open-widget").build(this.container),this.layoutDimensions&&this.layout(this.layoutDimensions),this.applyStyles(),cn(this.treeContainer.getHTMLElement(),Un.KEY_DOWN,(function(t){var n=new Bt(t);e.quickNavigateConfiguration||18!==n.keyCode&&16!==n.keyCode&&12!==n.keyCode&&11!==n.keyCode||(Yn(t,!0),e.navigateInTree(n.keyCode,n.shiftKey),e.treeElement.focus())})),this.builder.getHTMLElement()},t.prototype.style=function(e){this.styles=e,this.applyStyles()},t.prototype.applyStyles=function(){if(this.builder){var e=this.styles.foreground?this.styles.foreground.toString():null,t=this.styles.background?this.styles.background.toString():null,n=this.styles.borderColor?this.styles.borderColor.toString():null,i=this.styles.widgetShadow?this.styles.widgetShadow.toString():null;this.builder.style("color",e),this.builder.style("background-color",t),this.builder.style("border-color",n),this.builder.style("border-width",n?"1px":null),this.builder.style("border-style",n?"solid":null),this.builder.style("box-shadow",i?"0 5px 8px "+i:null)}this.progressBar&&this.progressBar.style({progressBarBackground:this.styles.progressBarBackground}),this.inputBox&&this.inputBox.style({inputBackground:this.styles.inputBackground,inputForeground:this.styles.inputForeground,inputBorder:this.styles.inputBorder,inputValidationInfoBackground:this.styles.inputValidationInfoBackground,inputValidationInfoBorder:this.styles.inputValidationInfoBorder,inputValidationWarningBackground:this.styles.inputValidationWarningBackground,inputValidationWarningBorder:this.styles.inputValidationWarningBorder,inputValidationErrorBackground:this.styles.inputValidationErrorBackground,inputValidationErrorBorder:this.styles.inputValidationErrorBorder}),this.tree&&!this.options.treeCreator&&this.tree.style(this.styles),this.renderer&&this.renderer.updateStyles(this.styles)},t.prototype.shouldOpenInBackground=function(e){if(e instanceof Bt){if(17!==e.keyCode)return!1;if(e.metaKey||e.ctrlKey||e.shiftKey||e.altKey)return!1;var t=this.inputBox.inputElement;return t.selectionEnd===this.inputBox.value.length&&t.selectionStart===t.selectionEnd}return e.middleButton},t.prototype.onType=function(){var e=this.inputBox.value;this.helpText&&(e?this.helpText.hide():this.helpText.show()),this.callbacks.onType(e)},t.prototype.navigateInTree=function(e,t){var n=this.tree.getInput(),i=n?n.entries:[],o=this.tree.getFocus();switch(e){case 18:this.tree.focusNext();break;case 16:this.tree.focusPrevious();break;case 12:this.tree.focusNextPage();break;case 11:this.tree.focusPreviousPage();break;case 2:t?this.tree.focusPrevious():this.tree.focusNext()}var r=this.tree.getFocus();i.length>1&&o===r&&(16===e||2===e&&t?this.tree.focusLast():(18===e||2===e&&!t)&&this.tree.focusFirst()),(r=this.tree.getFocus())&&this.tree.reveal(r).done(null,S.dz)},t.prototype.elementFocused=function(e,t){if(e&&this.isVisible()){this.inputElement.setAttribute("aria-activedescendant",this.treeElement.getAttribute("aria-activedescendant"));var n={event:t,keymods:this.extractKeyMods(t),quickNavigateConfiguration:this.quickNavigateConfiguration};this.model.runner.run(e,AN.PREVIEW,n)}},t.prototype.elementSelected=function(e,t,n){var i=!0;if(this.isVisible()){var o=n||AN.OPEN,r={event:t,keymods:this.extractKeyMods(t),quickNavigateConfiguration:this.quickNavigateConfiguration};i=this.model.runner.run(e,o,r)}i&&this.hide(UN.ELEMENT_SELECTED)},t.prototype.extractKeyMods=function(e){return{ctrlCmd:e&&(e.ctrlKey||e.metaKey||e.payload&&e.payload.originalEvent&&(e.payload.originalEvent.ctrlKey||e.payload.originalEvent.metaKey)),alt:e&&(e.altKey||e.payload&&e.payload.originalEvent&&e.payload.originalEvent.altKey)}},t.prototype.show=function(e,t){this.visible=!0,this.isLoosingFocus=!1,this.quickNavigateConfiguration=t?t.quickNavigateConfiguration:void 0,this.quickNavigateConfiguration?(this.inputContainer.hide(),this.builder.show(),this.tree.domFocus()):(this.inputContainer.show(),this.builder.show(),this.inputBox.focus()),this.helpText&&(this.quickNavigateConfiguration||w.Kg(e)?this.helpText.hide():this.helpText.show()),w.Kg(e)?this.doShowWithPrefix(e):this.doShowWithInput(e,t&&t.autoFocus?t.autoFocus:{}),t&&t.inputSelection&&!this.quickNavigateConfiguration&&this.inputBox.select(t.inputSelection),this.callbacks.onShow&&this.callbacks.onShow()},t.prototype.doShowWithPrefix=function(e){this.inputBox.value=e,this.callbacks.onType(e)},t.prototype.doShowWithInput=function(e,t){this.setInput(e,t)},t.prototype.setInputAndLayout=function(e,t){var n=this;this.treeContainer.style({height:this.getHeight(e)+"px"}),this.tree.setInput(null).then((function(){return n.model=e,n.inputElement.setAttribute("aria-haspopup",String(e&&e.entries&&e.entries.length>0)),n.tree.setInput(e)})).done((function(){n.tree.layout();var i=e?e.entries.filter((function(t){return n.isElementVisible(e,t)})):[];n.updateResultCount(i.length),i.length&&n.autoFocus(e,i,t)}),S.dz)},t.prototype.isElementVisible=function(e,t){return!e.filter||e.filter.isVisible(t)},t.prototype.autoFocus=function(e,t,n){if(void 0===n&&(n={}),n.autoFocusPrefixMatch){for(var i=void 0,o=void 0,r=n.autoFocusPrefixMatch,s=r.toLowerCase(),a=0;an.autoFocusIndex&&(this.tree.focusNth(n.autoFocusIndex),this.tree.reveal(this.tree.getFocus()).done(null,S.dz)):n.autoFocusSecondEntry?t.length>1&&this.tree.focusNth(1):n.autoFocusLastEntry&&t.length>1&&this.tree.focusLast()},t.prototype.getHeight=function(e){var n=this,i=e.renderer;if(!e){var o=i.getHeight(null);return this.options.minItemsToShow?this.options.minItemsToShow*o:0}var r,s=0;this.layoutDimensions&&this.layoutDimensions.height&&(r=.4*(this.layoutDimensions.height-50)),(!r||r>t.MAX_ITEMS_HEIGHT)&&(r=t.MAX_ITEMS_HEIGHT);for(var a=e.entries.filter((function(t){return n.isElementVisible(e,t)})),u=this.options.maxItemsToShow||a.length,l=0;l=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([(t=1,n=Lr,function(e,i){n(e,i,t)})],e);var t,n}(),ax=function(e){function t(t,n){var i=e.call(this,n)||this;return i._inputAriaLabel=t,i}return rx(t,e),t.prototype.getController=function(e){return sx.get(e)},t.prototype._show=function(e,t){e.run({inputAriaLabel:this._inputAriaLabel,getModel:function(e){return t.getModel(e)},getAutoFocus:function(e){return t.getAutoFocus(e)}})},t}(xe);function ux(e){var t=[],n=No.Wd.all(e).map((function(n){return pt((function(t){return n.provideDocumentSymbols(e,t)})).then((function(e){Array.isArray(e)&&t.push.apply(t,e)}),(function(e){(0,S.M_)(e)}))}));return J.g3.join(n).then((function(){var e=[];return cx(e,t,""),e.sort(lx),e}))}function lx(e,t){return s.Q.compareRangesUsingStarts(e.range,t.range)}function cx(e,t,n){for(var i=0,o=t;i0&&0===n.indexOf(dx)){var d=null,f=null,g=0;for(a=0;a0)):g++}f&&f.setGroupLabel(this.typeToLabel(d,g))}else r.length>0&&r[0].setGroupLabel(o.k("symbols","symbols ({0})",r.length));return r},t.prototype.typeToLabel=function(e,t){switch(e){case"module":return o.k("modules","modules ({0})",t);case"class":return o.k("class","classes ({0})",t);case"interface":return o.k("interface","interfaces ({0})",t);case"method":return o.k("method","methods ({0})",t);case"function":return o.k("function","functions ({0})",t);case"property":return o.k("property","properties ({0})",t);case"variable":return o.k("variable","variables ({0})",t);case"var":return o.k("variable2","variables ({0})",t);case"constructor":return o.k("_constructor","constructors ({0})",t);case"call":return o.k("call","calls ({0})",t)}return e},t.prototype.sortNormal=function(e,t,n){var i=t.getLabel().toLowerCase(),o=n.getLabel().toLowerCase(),r=i.localeCompare(o);if(0!==r)return r;var s=t.getRange(),a=n.getRange();return s.startLineNumber-a.startLineNumber},t.prototype.sortScoped=function(e,t,n){e=e.substr(1);var i=t.getType(),o=n.getType(),r=i.localeCompare(o);if(0!==r)return r;if(e){var s=t.getLabel().toLowerCase(),a=n.getLabel().toLowerCase(),u=s.localeCompare(a);if(0!==u)return u}var l=t.getRange(),c=n.getRange();return l.startLineNumber-c.startLineNumber},t}(ax);Ee(px),n(2114);var gx=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),mx=function(e){function t(t,n,i){var o=e.call(this)||this;return o.editor=n,o.decorator=i,o._parseResult=o._parseInput(t),o}return gx(t,e),t.prototype._parseInput=function(e){var t,n,i=e.split(",").map((function(e){return parseInt(e,10)})).filter((function(e){return!isNaN(e)}));t=0===i.length?new r.y(-1,-1):1===i.length?new r.y(i[0],1):new r.y(i[0],i[1]);var s=(n=uu(this.editor)?this.editor.getModel():this.editor.getModel().modified).validatePosition(t).equals(t);return{position:t,isValid:s,label:s?t.column&&t.column>1?o.k("gotoLineLabelValidLineAndColumn","Go to line {0} and character {1}",t.lineNumber,t.column):o.k("gotoLineLabelValidLine","Go to line {0}",t.lineNumber,t.column):t.lineNumber<1||t.lineNumber>n.getLineCount()?o.k("gotoLineLabelEmptyWithLineLimit","Type a line number between 1 and {0} to navigate to",n.getLineCount()):o.k("gotoLineLabelEmptyWithLineAndColumnLimit","Type a character between 1 and {0} to navigate to",n.getLineMaxColumn(t.lineNumber))}},t.prototype.getLabel=function(){return this._parseResult.label},t.prototype.getAriaLabel=function(){return o.k("gotoLineAriaLabel","Go to line {0}",this._parseResult.label)},t.prototype.run=function(e,t){return e===AN.OPEN?this.runOpen():this.runPreview()},t.prototype.runOpen=function(){if(!this._parseResult.isValid)return!1;var e=this.toSelection();return this.editor.setSelection(e),this.editor.revealRangeInCenter(e,0),this.editor.focus(),!0},t.prototype.runPreview=function(){if(!this._parseResult.isValid)return this.decorator.clearDecorations(),!1;var e=this.toSelection();return this.editor.revealRangeInCenter(e,0),this.decorator.decorateLine(e,this.editor),!1},t.prototype.toSelection=function(){return new s.Q(this._parseResult.position.lineNumber,this._parseResult.position.column,this._parseResult.position.lineNumber,this._parseResult.position.column)},t}(zN);Ee(function(e){function t(){return e.call(this,o.k("gotoLineActionInput","Type a line number, followed by an optional colon and a character number to navigate to"),{id:"editor.action.gotoLine",label:o.k("GotoLineAction.label","Go to Line..."),alias:"Go to Line...",precondition:null,kbOpts:{kbExpr:Oe.focus,primary:2085,mac:{primary:293},weight:100}})||this}return gx(t,e),t.prototype.run=function(e,t){var n=this;this._show(this.getController(t),{getModel:function(e){return new VN([new mx(e,t,n.getController(t))])},getAutoFocus:function(e){return{autoFocusFirstEntry:e.length>0}}})},t}(ax));var vx=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),yx=function(e){function t(t,n,i,o){var r=e.call(this)||this;return r.key=t,r.setHighlights(n),r.action=i,r.editor=o,r}return vx(t,e),t.prototype.getLabel=function(){return this.action.label},t.prototype.getAriaLabel=function(){return o.k("ariaLabelEntry","{0}, commands",this.getLabel())},t.prototype.getGroupLabel=function(){return this.key},t.prototype.run=function(e,t){var n=this;return e===AN.OPEN&&(J.g3.timeout(50).done((function(){n.editor.focus();try{(n.action.run()||J.g3.as(null)).done(null,S.dz)}catch(e){(0,S.dz)(e)}}),S.dz),!0)},t}(WN),bx=function(e){function t(){return e.call(this,o.k("quickCommandActionInput","Type the name of an action you want to execute"),{id:"editor.action.quickCommand",label:o.k("QuickCommandAction.label","Command Palette"),alias:"Command Palette",precondition:null,kbOpts:{kbExpr:Oe.focus,primary:xt?571:59,weight:100},menuOpts:{group:"z_commands",order:1}})||this}return vx(t,e),t.prototype.run=function(e,t){var n=this,i=e.get(xf);this._show(this.getController(t),{getModel:function(e){return new VN(n._editorActionsToEntries(i,t,e))},getAutoFocus:function(e){return{autoFocusFirstEntry:!0,autoFocusPrefixMatch:e}}})},t.prototype._sort=function(e,t){var n=e.getLabel().toLowerCase(),i=t.getLabel().toLowerCase();return n.localeCompare(i)},t.prototype._editorActionsToEntries=function(e,t,n){for(var i=t.getSupportedActions(),o=[],r=0;r=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([Mx(1,he),Mx(2,Ce),Mx(3,Cr),Mx(4,N._Y),Mx(5,dp),Mx(6,uf)],t)}(Fb);Ae(Cx);var Sx,Lx,Ix=n(5752);!function(e){e[e.Unnecessary=1]="Unnecessary"}(Sx||(Sx={})),function(e){e[e.Hint=1]="Hint",e[e.Info=2]="Info",e[e.Warning=4]="Warning",e[e.Error=8]="Error"}(Lx||(Lx={}));var Nx,xx=function(){function e(){}return e.chord=function(e,t){return O(e,t)},e.CtrlCmd=2048,e.Shift=1024,e.Alt=512,e.WinCtrl=256,e}();function Dx(){return{editor:void 0,languages:void 0,CancellationTokenSource:lt,Emitter:X.vl,KeyCode:Nx,KeyMod:xx,Position:r.y,Range:s.Q,Selection:Be.L,SelectionDirection:Be.S,MarkerSeverity:Lx,MarkerTag:Sx,Promise:J.g3,Uri:L.A,Token:Ix.ou}}!function(e){e[e.Unknown=0]="Unknown",e[e.Backspace=1]="Backspace",e[e.Tab=2]="Tab",e[e.Enter=3]="Enter",e[e.Shift=4]="Shift",e[e.Ctrl=5]="Ctrl",e[e.Alt=6]="Alt",e[e.PauseBreak=7]="PauseBreak",e[e.CapsLock=8]="CapsLock",e[e.Escape=9]="Escape",e[e.Space=10]="Space",e[e.PageUp=11]="PageUp",e[e.PageDown=12]="PageDown",e[e.End=13]="End",e[e.Home=14]="Home",e[e.LeftArrow=15]="LeftArrow",e[e.UpArrow=16]="UpArrow",e[e.RightArrow=17]="RightArrow",e[e.DownArrow=18]="DownArrow",e[e.Insert=19]="Insert",e[e.Delete=20]="Delete",e[e.KEY_0=21]="KEY_0",e[e.KEY_1=22]="KEY_1",e[e.KEY_2=23]="KEY_2",e[e.KEY_3=24]="KEY_3",e[e.KEY_4=25]="KEY_4",e[e.KEY_5=26]="KEY_5",e[e.KEY_6=27]="KEY_6",e[e.KEY_7=28]="KEY_7",e[e.KEY_8=29]="KEY_8",e[e.KEY_9=30]="KEY_9",e[e.KEY_A=31]="KEY_A",e[e.KEY_B=32]="KEY_B",e[e.KEY_C=33]="KEY_C",e[e.KEY_D=34]="KEY_D",e[e.KEY_E=35]="KEY_E",e[e.KEY_F=36]="KEY_F",e[e.KEY_G=37]="KEY_G",e[e.KEY_H=38]="KEY_H",e[e.KEY_I=39]="KEY_I",e[e.KEY_J=40]="KEY_J",e[e.KEY_K=41]="KEY_K",e[e.KEY_L=42]="KEY_L",e[e.KEY_M=43]="KEY_M",e[e.KEY_N=44]="KEY_N",e[e.KEY_O=45]="KEY_O",e[e.KEY_P=46]="KEY_P",e[e.KEY_Q=47]="KEY_Q",e[e.KEY_R=48]="KEY_R",e[e.KEY_S=49]="KEY_S",e[e.KEY_T=50]="KEY_T",e[e.KEY_U=51]="KEY_U",e[e.KEY_V=52]="KEY_V",e[e.KEY_W=53]="KEY_W",e[e.KEY_X=54]="KEY_X",e[e.KEY_Y=55]="KEY_Y",e[e.KEY_Z=56]="KEY_Z",e[e.Meta=57]="Meta",e[e.ContextMenu=58]="ContextMenu",e[e.F1=59]="F1",e[e.F2=60]="F2",e[e.F3=61]="F3",e[e.F4=62]="F4",e[e.F5=63]="F5",e[e.F6=64]="F6",e[e.F7=65]="F7",e[e.F8=66]="F8",e[e.F9=67]="F9",e[e.F10=68]="F10",e[e.F11=69]="F11",e[e.F12=70]="F12",e[e.F13=71]="F13",e[e.F14=72]="F14",e[e.F15=73]="F15",e[e.F16=74]="F16",e[e.F17=75]="F17",e[e.F18=76]="F18",e[e.F19=77]="F19",e[e.NumLock=78]="NumLock",e[e.ScrollLock=79]="ScrollLock",e[e.US_SEMICOLON=80]="US_SEMICOLON",e[e.US_EQUAL=81]="US_EQUAL",e[e.US_COMMA=82]="US_COMMA",e[e.US_MINUS=83]="US_MINUS",e[e.US_DOT=84]="US_DOT",e[e.US_SLASH=85]="US_SLASH",e[e.US_BACKTICK=86]="US_BACKTICK",e[e.US_OPEN_SQUARE_BRACKET=87]="US_OPEN_SQUARE_BRACKET",e[e.US_BACKSLASH=88]="US_BACKSLASH",e[e.US_CLOSE_SQUARE_BRACKET=89]="US_CLOSE_SQUARE_BRACKET",e[e.US_QUOTE=90]="US_QUOTE",e[e.OEM_8=91]="OEM_8",e[e.OEM_102=92]="OEM_102",e[e.NUMPAD_0=93]="NUMPAD_0",e[e.NUMPAD_1=94]="NUMPAD_1",e[e.NUMPAD_2=95]="NUMPAD_2",e[e.NUMPAD_3=96]="NUMPAD_3",e[e.NUMPAD_4=97]="NUMPAD_4",e[e.NUMPAD_5=98]="NUMPAD_5",e[e.NUMPAD_6=99]="NUMPAD_6",e[e.NUMPAD_7=100]="NUMPAD_7",e[e.NUMPAD_8=101]="NUMPAD_8",e[e.NUMPAD_9=102]="NUMPAD_9",e[e.NUMPAD_MULTIPLY=103]="NUMPAD_MULTIPLY",e[e.NUMPAD_ADD=104]="NUMPAD_ADD",e[e.NUMPAD_SEPARATOR=105]="NUMPAD_SEPARATOR",e[e.NUMPAD_SUBTRACT=106]="NUMPAD_SUBTRACT",e[e.NUMPAD_DECIMAL=107]="NUMPAD_DECIMAL",e[e.NUMPAD_DIVIDE=108]="NUMPAD_DIVIDE",e[e.KEY_IN_COMPOSITION=109]="KEY_IN_COMPOSITION",e[e.ABNT_C1=110]="ABNT_C1",e[e.ABNT_C2=111]="ABNT_C2",e[e.MAX_VALUE=112]="MAX_VALUE"}(Nx||(Nx={})),n(1121);var kx=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Tx=function(e){function t(t,n,i,o,r){var s=e.call(this)||this;return s._contextKeyService=t,s._commandService=n,s._telemetryService=i,s._statusService=r,s._notificationService=o,s._currentChord=null,s._currentChordChecker=new Mt,s._currentChordStatusMessage=null,s._onDidUpdateKeybindings=s._register(new X.vl),s}return kx(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this)},Object.defineProperty(t.prototype,"onDidUpdateKeybindings",{get:function(){return this._onDidUpdateKeybindings?this._onDidUpdateKeybindings.event:X.Jh.None},enumerable:!0,configurable:!0}),t.prototype.lookupKeybinding=function(e){var t=this._getResolver().lookupPrimaryKeybinding(e);return t?t.resolvedKeybinding:null},t.prototype._enterChordMode=function(e,t){var n=this;this._currentChord={keypress:e,label:t},this._statusService&&(this._currentChordStatusMessage=this._statusService.setStatusMessage(o.k("first.chord","({0}) was pressed. Waiting for second key of chord...",t)));var i=Date.now();this._currentChordChecker.cancelAndSet((function(){n._documentHasFocus()?Date.now()-i>5e3&&n._leaveChordMode():n._leaveChordMode()}),500)},t.prototype._leaveChordMode=function(){this._currentChordStatusMessage&&(this._currentChordStatusMessage.dispose(),this._currentChordStatusMessage=null),this._currentChordChecker.cancel(),this._currentChord=null},t.prototype._dispatch=function(e,t){var n=this,i=!1,r=this.resolveKeyboardEvent(e);if(r.isChord())return console.warn("Unexpected keyboard event mapped to a chord"),null;var s=r.getDispatchParts()[0];if(null===s)return i;var a=this._contextKeyService.getContext(t),u=this._currentChord?this._currentChord.keypress:null,l=r.getLabel(),c=this._getResolver().resolve(a,u,s);return c&&c.enterChord?(i=!0,this._enterChordMode(s,l),i):(this._statusService&&this._currentChord&&(c&&c.commandId||(this._statusService.setStatusMessage(o.k("missing.chord","The key combination ({0}, {1}) is not a command.",this._currentChord.label,l),1e4),i=!0)),this._leaveChordMode(),c&&c.commandId&&(c.bubble||(i=!0),void 0===c.commandArgs?this._commandService.executeCommand(c.commandId).done(void 0,(function(e){return n._notificationService.warn(e)})):this._commandService.executeCommand(c.commandId,c.commandArgs).done(void 0,(function(e){return n._notificationService.warn(e)})),this._telemetryService.publicLog("workbenchActionExecuted",{id:c.commandId,from:"keybinding"})),i)},t}(I.jG),Ex=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Ax=function(e){function t(t,n){var i=e.call(this)||this;if(i._os=n,null===t)throw new Error("Invalid USLayoutResolvedKeybinding");return 2===t.type?(i._firstPart=t.firstPart,i._chordPart=t.chordPart):(i._firstPart=t,i._chordPart=null),i}return Ex(t,e),t.prototype._keyCodeToUILabel=function(e){if(2===this._os)switch(e){case 15:return"←";case 16:return"↑";case 17:return"→";case 18:return"↓"}return C.toString(e)},t.prototype._getUILabelForKeybinding=function(e){return e?e.isDuplicateModifierCase()?"":this._keyCodeToUILabel(e.keyCode):null},t.prototype.getLabel=function(){var e=this._getUILabelForKeybinding(this._firstPart),t=this._getUILabelForKeybinding(this._chordPart);return kN.toLabel(this._firstPart,e,this._chordPart,t,this._os)},t.prototype._getAriaLabelForKeybinding=function(e){return e?e.isDuplicateModifierCase()?"":C.toString(e.keyCode):null},t.prototype.getAriaLabel=function(){var e=this._getAriaLabelForKeybinding(this._firstPart),t=this._getAriaLabelForKeybinding(this._chordPart);return TN.toLabel(this._firstPart,e,this._chordPart,t,this._os)},t.prototype.isChord=function(){return!!this._chordPart},t.prototype.getParts=function(){return[this._toResolvedKeybindingPart(this._firstPart),this._toResolvedKeybindingPart(this._chordPart)]},t.prototype._toResolvedKeybindingPart=function(e){return e?new F(e.ctrlKey,e.shiftKey,e.altKey,e.metaKey,this._getUILabelForKeybinding(e),this._getAriaLabelForKeybinding(e)):null},t.prototype.getDispatchParts=function(){return[this._firstPart?t.getDispatchStr(this._firstPart):null,this._chordPart?t.getDispatchStr(this._chordPart):null]},t.getDispatchStr=function(e){if(e.isModifierKey())return null;var t="";return e.ctrlKey&&(t+="ctrl+"),e.shiftKey&&(t+="shift+"),e.altKey&&(t+="alt+"),e.metaKey&&(t+="meta+"),t+C.toString(e.keyCode)},t}((function(){})),jx=function(){function e(t,n){this._defaultKeybindings=t,this._defaultBoundCommands=new Map;for(var i=0,o=t.length;i=0;c--)this._isTargetedForRemoval(e[c],a,u,s,l)&&e.splice(c,1);else n.push(r)}return e.concat(n)},e.prototype._addKeyPress=function(t,n){var i=this._map.get(t);if(void 0===i)return this._map.set(t,[n]),void this._addToLookupMap(n);for(var o=i.length-1;o>=0;o--){var r=i[o];if(r.command!==n.command){var s=null!==r.keypressChordPart,a=null!==n.keypressChordPart;s&&a&&r.keypressChordPart!==n.keypressChordPart||e.whenIsEntirelyIncluded(r.when,n.when)&&this._removeFromLookupMap(r)}}i.push(n),this._addToLookupMap(n)},e.prototype._addToLookupMap=function(e){if(e.command){var t=this._lookupMap.get(e.command);void 0===t?(t=[e],this._lookupMap.set(e.command,t)):t.push(e)}},e.prototype._removeFromLookupMap=function(e){var t=this._lookupMap.get(e.command);if(void 0!==t)for(var n=0,i=t.length;n=0;i--){var o=n[i];if(e.contextMatchesRules(t,o.when))return o}return null},e.contextMatchesRules=function(e,t){return!t||t.evaluate(e)},e}(),Ox=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Rx=function(){function e(e,t,n){void 0===e&&(e={}),void 0===t&&(t=[]),void 0===n&&(n=[]),this._contents=e,this._keys=t,this._overrides=n,this.isFrozen=!1}return Object.defineProperty(e.prototype,"contents",{get:function(){return this.checkAndFreeze(this._contents)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"overrides",{get:function(){return this.checkAndFreeze(this._overrides)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"keys",{get:function(){return this.checkAndFreeze(this._keys)},enumerable:!0,configurable:!0}),e.prototype.getValue=function(e){return e?(t=function(e,t){for(var n=e,i=0;i0&&t.push([r,s])}return t},e._fillInKbExprKeys=function(e,t){if(e)for(var n=0,i=e.keys();ns)return 1;var a="string"==typeof e.command.title?e.command.title:e.command.title.value,u="string"==typeof t.command.title?t.command.title:t.command.title.value;return a.localeCompare(u)},e=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([Wx(2,D),Wx(3,he)],e)}(),Bx=function(e,t,n,i,o){if(this.resolvedKeybinding=e,e){var r=e.getDispatchParts(),s=r[0],a=r[1];this.keypressFirstPart=s,this.keypressChordPart=a}else this.keypressFirstPart=null,this.keypressChordPart=null;this.bubble=!!t&&94===t.charCodeAt(0),this.command=this.bubble?t.substr(1):t,this.commandArgs=n,this.when=i,this.isDefault=o},Hx=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Vx=function(){function e(e){this.model=e,this._onDispose=new X.vl}return Object.defineProperty(e.prototype,"textEditorModel",{get:function(){return this.model},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){this._onDispose.fire()},e}(),Ux=function(){function e(){}return e.prototype.setEditor=function(e){this.editor=e},e.prototype.createModelReference=function(e){var t,n,i,o,r=this;return i=function(t){return r.findModel(t,e)},o=function(t){return r.findModel(t.getOriginalEditor(),e)||r.findModel(t.getModifiedEditor(),e)},(t=uu(n=this.editor)?i(n):o(n))?J.g3.as(new I.BO(new Vx(t))):J.g3.as(new I.BO(null))},e.prototype.findModel=function(e,t){var n=e.getModel();return n.uri.toString()!==t.toString()?null:n},e}(),Yx=function(){function e(){}return e.prototype.showWhile=function(e,t){return null},e}(),Zx=function(){},Gx=function(){function e(){}return e.prototype.info=function(e){return this.notify({severity:Mr.Info,message:e})},e.prototype.warn=function(e){return this.notify({severity:Mr.Warning,message:e})},e.prototype.error=function(e){return this.notify({severity:Mr.Error,message:e})},e.prototype.notify=function(t){switch(t.severity){case Mr.Error:console.error(t.message);break;case Mr.Warning:console.warn(t.message);break;default:console.log(t.message)}return e.NO_OP},e.NO_OP=new Sr,e}(),Qx=function(){function e(e){this._onWillExecuteCommand=new X.vl,this._instantiationService=e,this._dynamicCommands=Object.create(null)}return e.prototype.addCommand=function(e){var t=this,n=e.id;return this._dynamicCommands[n]=e,(0,I.s)((function(){delete t._dynamicCommands[n]}))},e.prototype.executeCommand=function(e){for(var t=[],n=1;n=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},aD=function(e,t){return function(n,i){t(n,i,e)}},uD=0,lD=!1;var cD=function(e){function t(t,n,i,r,s,a,u,l,c){var h,d=this;return(n=n||{}).ariaLabel=n.ariaLabel||o.k("editorViewAccessibleLabel","Editor content"),n.ariaLabel=n.ariaLabel+";"+(xt?o.k("accessibilityHelpMessageIE","Press Ctrl+F1 for Accessibility Options."):o.k("accessibilityHelpMessage","Press Alt+F1 for Accessibility Options.")),d=e.call(this,t,n,{},i,r,s,a,l,c)||this,u instanceof qx&&(d._standaloneKeybindingService=u),lD||(lD=!0,h=document.body,(Ip=document.createElement("div")).className="monaco-aria-container",(Np=document.createElement("div")).className="monaco-alert",Np.setAttribute("role","alert"),Np.setAttribute("aria-atomic","true"),Ip.appendChild(Np),(xp=document.createElement("div")).className="monaco-status",xp.setAttribute("role","status"),xp.setAttribute("aria-atomic","true"),Ip.appendChild(xp),h.appendChild(Ip)),d}return rD(t,e),t.prototype.addCommand=function(e,t,n){if(!this._standaloneKeybindingService)return console.warn("Cannot add command because the editor is configured with an unrecognized KeybindingService"),null;var i="DYNAMIC_"+ ++uD,o=ne.deserialize(n);return this._standaloneKeybindingService.addDynamicKeybinding(i,e,t,o),i},t.prototype.createContextKey=function(e,t){return this._contextKeyService.createKey(e,t)},t.prototype.addAction=function(e){var t=this;if("string"!=typeof e.id||"string"!=typeof e.label||"function"!=typeof e.run)throw new Error("Invalid action descriptor, `id`, `label` and `run` are required properties!");if(!this._standaloneKeybindingService)return console.warn("Cannot add keybinding because the editor is configured with an unrecognized KeybindingService"),I.jG.None;var n=e.id,i=e.label,o=ne.and(ne.equals("editorId",this.getId()),ne.deserialize(e.precondition)),r=e.keybindings,s=ne.and(o,ne.deserialize(e.keybindingContext)),a=e.contextMenuGroupId||null,u=e.contextMenuOrder||0,l=function(){return e.run(t)||J.g3.as(void 0)},c=[],h=this.getId()+":"+n;if(c.push(k.registerCommand(h,l)),a){var d={command:{id:h,title:i},when:o,group:a,order:u};c.push(be.appendMenuItem(ve.EditorContext,d))}Array.isArray(r)&&(c=c.concat(r.map((function(e){return t._standaloneKeybindingService.addDynamicKeybinding(h,e,l,s)}))));var f=new gh(h,i,i,o,l,this._contextKeyService);return this._actions[n]=f,c.push((0,I.s)((function(){delete t._actions[n]}))),(0,I.qE)(c)},sD([aD(2,N._Y),aD(3,Ce),aD(4,D),aD(5,he),aD(6,xf),aD(7,Lr),aD(8,Cr)],t)}(_h),hD=function(e){function t(t,n,i,o,r,s,a,u,l,c,h,d){var f=this;nD(d,n,!1),"string"==typeof(n=n||{}).theme&&c.setTheme(n.theme);var p=n.model;if(delete n.model,(f=e.call(this,t,n,o,r,s,a,u,c,h)||this)._contextViewService=l,f._configurationService=d,f._register(i),void 0===p?(p=self.monaco.editor.createModel(n.value||"",n.language||"text/plain"),f._ownsModel=!0):f._ownsModel=!1,f._attachModel(p),p){var g={oldModelUrl:null,newModelUrl:p.uri};f._onDidChangeModel.fire(g)}return f}return rD(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this)},t.prototype.updateOptions=function(t){nD(this._configurationService,t,!1),e.prototype.updateOptions.call(this,t)},t.prototype._attachModel=function(t){e.prototype._attachModel.call(this,t),this._view&&this._contextViewService.setContainer(this._view.domNode.domNode)},t.prototype._postDetachModelCleanup=function(t){e.prototype._postDetachModelCleanup.call(this,t),t&&this._ownsModel&&(t.dispose(),this._ownsModel=!1)},sD([aD(3,N._Y),aD(4,Ce),aD(5,D),aD(6,he),aD(7,xf),aD(8,If),aD(9,wN),aD(10,Cr),aD(11,uf)],t)}(cD),dD=function(e){function t(t,n,i,o,r,s,a,u,l,c,h,d){var f=this;return nD(d,n,!0),"string"==typeof(n=n||{}).theme&&(n.theme=c.setTheme(n.theme)),(f=e.call(this,t,n,u,r,o,l,c,h)||this)._contextViewService=a,f._configurationService=d,f._register(i),f._contextViewService.setContainer(f._containerDomElement),f}return rD(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this)},t.prototype.updateOptions=function(t){nD(this._configurationService,t,!0),e.prototype.updateOptions.call(this,t)},t.prototype._createInnerEditor=function(e,t,n){return e.createInstance(cD,t,n)},t.prototype.getOriginalEditor=function(){return e.prototype.getOriginalEditor.call(this)},t.prototype.getModifiedEditor=function(){return e.prototype.getModifiedEditor.call(this)},t.prototype.addCommand=function(e,t,n){return this.getModifiedEditor().addCommand(e,t,n)},t.prototype.createContextKey=function(e,t){return this.getModifiedEditor().createContextKey(e,t)},t.prototype.addAction=function(e){return this.getModifiedEditor().addAction(e)},sD([aD(3,N._Y),aD(4,he),aD(5,xf),aD(6,If),aD(7,Ah),aD(8,Ce),aD(9,wN),aD(10,Cr),aD(11,uf)],t)}(dd),fD=(n(7512),n(437),function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}()),pD=function(e){function t(t,n,i){var o=e.call(this,i||"submenu",t,"",!0)||this;return o.entries=n,o}return fD(t,e),t}($),gD=function(){function e(e,t,n){void 0===n&&(n={});var i=this;sn(e,"monaco-menu-container"),e.setAttribute("role","presentation");var o=document.createElement("div");sn(o,"monaco-menu"),o.setAttribute("role","presentation"),e.appendChild(o);var r={parent:this};this.actionBar=new Xh(o,{orientation:Uh.VERTICAL,actionItemProvider:function(e){return i.doGetActionItem(e,n,r)},context:n.context,actionRunner:n.actionRunner,isMenu:!0,ariaLabel:n.ariaLabel}),this.actionBar.push(t,{icon:!0,label:!0,isMenu:!0})}return e.prototype.doGetActionItem=function(e,t,n){if(e instanceof qh)return new Kh(t.context,e,{icon:!0});if(e instanceof pD)return new vD(e,e.entries,n,t);var i={};if(t.getKeyBinding){var o=t.getKeyBinding(e);o&&(i.keybinding=o.getLabel())}return new mD(t.context,e,i)},Object.defineProperty(e.prototype,"onDidCancel",{get:function(){return this.actionBar.onDidCancel},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onDidBlur",{get:function(){return this.actionBar.onDidBlur},enumerable:!0,configurable:!0}),e.prototype.focus=function(e){void 0===e&&(e=!0),this.actionBar&&this.actionBar.focus(e)},e.prototype.dispose=function(){this.actionBar&&(this.actionBar.dispose(),this.actionBar=null),this.listener&&(this.listener.dispose(),this.listener=null)},e}(),mD=function(e){function t(t,n,i){void 0===i&&(i={});var o=this;return i.isMenu=!0,(o=e.call(this,n,n,i)||this).options=i,o.options.icon=void 0!==i.icon&&i.icon,o.options.label=void 0===i.label||i.label,o.cssClass="",o}return fD(t,e),t.prototype.render=function(t){e.prototype.render.call(this,t),this.$e=Zh("a.action-menu-item").appendTo(this.builder),this._action.id===qh.ID?this.$e.attr({role:"presentation"}):this.$e.attr({role:"menuitem"}),this.$label=Zh("span.action-label").appendTo(this.$e),this.options.label&&this.options.keybinding&&Zh("span.keybinding").text(this.options.keybinding).appendTo(this.$e),this._updateClass(),this._updateLabel(),this._updateTooltip(),this._updateEnabled(),this._updateChecked()},t.prototype._updateLabel=function(){if(this.options.label){var e=this.getAction().label;if(e){var n=t.MNEMONIC_REGEX.exec(e);if(n&&2===n.length){var i=n[1],o=e.replace(t.MNEMONIC_REGEX,i);this.$e.getHTMLElement().accessKey=i.toLocaleLowerCase(),this.$label.attr("aria-label",o)}else this.$label.attr("aria-label",e);e=e.replace(t.MNEMONIC_REGEX,"$1̲")}this.$label.text(e)}},t.prototype._updateTooltip=function(){var e=null;this.getAction().tooltip?e=this.getAction().tooltip:!this.options.label&&this.getAction().label&&this.options.icon&&(e=this.getAction().label,this.options.keybinding&&(e=o.k({key:"titleLabel",comment:["action title","action keybinding"]},"{0} ({1})",e,this.options.keybinding))),e&&this.$e.attr({title:e})},t.prototype._updateClass=function(){this.cssClass&&this.$e.removeClass(this.cssClass),this.options.icon?(this.cssClass=this.getAction().class,this.$label.addClass("icon"),this.cssClass&&this.$label.addClass(this.cssClass),this._updateEnabled()):this.$label.removeClass("icon")},t.prototype._updateEnabled=function(){this.getAction().enabled?(this.builder.removeClass("disabled"),this.$e.removeClass("disabled"),this.$e.attr({tabindex:0})):(this.builder.addClass("disabled"),this.$e.addClass("disabled"),ei(this.$e.getHTMLElement()))},t.prototype._updateChecked=function(){this.getAction().checked?this.$label.addClass("checked"):this.$label.removeClass("checked")},t.MNEMONIC_REGEX=/&&(.)/g,t}(Qh),vD=function(e){function t(t,n,i,o){var r=e.call(this,t,t,{label:!0,isMenu:!0})||this;return r.submenuActions=n,r.parentData=i,r.submenuOptions=o,r.showScheduler=new Ct((function(){r.mouseOver&&(r.cleanupExistingSubmenu(!1),r.createSubmenu(!1))}),250),r.hideScheduler=new Ct((function(){Pn(document.activeElement,r.builder.getHTMLElement())||r.parentData.submenu!==r.mysubmenu||(r.parentData.parent.focus(!1),r.cleanupExistingSubmenu(!0))}),750),r}return fD(t,e),t.prototype.render=function(t){var n=this;e.prototype.render.call(this,t),this.$e.addClass("monaco-submenu-item"),this.$e.attr("aria-haspopup","true"),Zh("span.submenu-indicator").text("▶").appendTo(this.$e),Zh(this.builder).on(Un.KEY_UP,(function(e){new Bt(e).equals(17)&&(Yn(e,!0),n.createSubmenu(!0))})),Zh(this.builder).on(Un.KEY_DOWN,(function(e){new Bt(e).equals(17)&&Yn(e,!0)})),Zh(this.builder).on(Un.MOUSE_OVER,(function(e){n.mouseOver||(n.mouseOver=!0,n.showScheduler.schedule())})),Zh(this.builder).on(Un.MOUSE_LEAVE,(function(e){n.mouseOver=!1})),Zh(this.builder).on(Un.FOCUS_OUT,(function(e){Pn(document.activeElement,n.builder.getHTMLElement())||n.hideScheduler.schedule()}))},t.prototype.onClick=function(e){Yn(e,!0),this.createSubmenu(!1)},t.prototype.cleanupExistingSubmenu=function(e){this.parentData.submenu&&(e||this.parentData.submenu!==this.mysubmenu)&&(this.parentData.submenu.dispose(),this.parentData.submenu=null,this.submenuContainer&&(this.submenuContainer.dispose(),this.submenuContainer=null))},t.prototype.createSubmenu=function(e){var t=this;void 0===e&&(e=!0),this.parentData.submenu?this.parentData.submenu.focus(!1):(this.submenuContainer=Zh(this.builder).div({class:"monaco-submenu menubar-menu-items-holder context-view"}),Zh(this.submenuContainer).style({left:Zh(this.builder).getClientArea().width+"px"}),Zh(this.submenuContainer).on(Un.KEY_UP,(function(e){new Bt(e).equals(15)&&(Yn(e,!0),t.parentData.parent.focus(),t.parentData.submenu.dispose(),t.parentData.submenu=null,t.submenuContainer.dispose(),t.submenuContainer=null)})),Zh(this.submenuContainer).on(Un.KEY_DOWN,(function(e){new Bt(e).equals(15)&&Yn(e,!0)})),this.parentData.submenu=new gD(this.submenuContainer.getHTMLElement(),this.submenuActions,this.submenuOptions),this.parentData.submenu.focus(e),this.mysubmenu=this.parentData.submenu)},t.prototype.dispose=function(){e.prototype.dispose.call(this),this.hideScheduler.dispose(),this.mysubmenu&&(this.mysubmenu.dispose(),this.mysubmenu=null),this.submenuContainer&&(this.submenuContainer.dispose(),this.submenuContainer=null)},t}(mD),yD=function(){function e(e,t,n,i){this.setContainer(e),this.contextViewService=t,this.telemetryService=n,this.notificationService=i,this.menuContainerElement=null}return e.prototype.setContainer=function(e){var t=this;this.$el&&(this.$el.off(["click","mousedown"]),this.$el=null),e&&(this.$el=Zh(e),this.$el.on("mousedown",(function(e){return t.onMouseDown(e)})))},e.prototype.showContextMenu=function(e){var t=this;e.getActions().done((function(n){n.length&&t.contextViewService.showContextView({getAnchor:function(){return e.getAnchor()},canRelayout:!1,render:function(i){t.menuContainerElement=i;var o=e.getMenuClassName?e.getMenuClassName():"";o&&(i.className+=" "+o);var r=[],s=e.actionRunner||new ee;s.onDidBeforeRun(t.onActionRun,t,r),s.onDidRun(t.onDidActionRun,t,r);var a=new gD(i,n,{actionItemProvider:e.getActionItem,context:e.getActionsContext?e.getActionsContext():null,actionRunner:s,getKeyBinding:e.getKeyBinding});return a.onDidCancel((function(){return t.contextViewService.hideContextView(!0)}),null,r),a.onDidBlur((function(){return t.contextViewService.hideContextView(!0)}),null,r),a.focus(!!e.autoSelectFirstItem),(0,I.qE)(r.concat([a]))},onHide:function(n){e.onHide&&e.onHide(n),t.menuContainerElement=null}})}))},e.prototype.onActionRun=function(e){this.telemetryService&&this.telemetryService.publicLog("workbenchActionExecuted",{id:e.action.id,from:"contextMenu"}),this.contextViewService.hideContextView(!1)},e.prototype.onDidActionRun=function(e){e.error&&this.notificationService&&this.notificationService.error(e.error)},e.prototype.onMouseDown=function(e){if(this.menuContainerElement){for(var t=new Qt(e).target;t;){if(t===this.menuContainerElement)return;t=t.parentElement}this.contextViewService.hideContextView()}},e.prototype.dispose=function(){this.setContainer(null)},e}(),bD=function(){function e(e,t,n,i){this._onDidContextMenu=new X.vl,this.contextMenuHandler=new yD(e,i,t,n)}return e.prototype.dispose=function(){this.contextMenuHandler.dispose()},e.prototype.showContextMenu=function(e){this.contextMenuHandler.showContextMenu(e),this._onDidContextMenu.fire()},e}(),_D=function(e,t){return function(n,i){t(n,i,e)}},wD=function(){function e(e,t,n){this.logService=n,this.contextView=new Hp(e)}return e.prototype.dispose=function(){this.contextView.dispose()},e.prototype.setContainer=function(e){this.logService.trace("ContextViewService#setContainer"),this.contextView.setContainer(e)},e.prototype.showContextView=function(e){this.logService.trace("ContextViewService#showContextView"),this.contextView.show(e)},e.prototype.layout=function(){this.contextView.layout()},e.prototype.hideContextView=function(e){this.logService.trace("ContextViewService#hideContextView"),this.contextView.hide(e)},function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([_D(1,q),_D(2,wS)],e)}(),MD=Object.prototype.hasOwnProperty;function CD(e,t){var n=function(n){if(MD.call(e,n)&&!1===t({key:n,value:e[n]},(function(){delete e[n]})))return{value:void 0}};for(var i in e){var o=n(i);if("object"==typeof o)return o.value}}var SD,LD=function(){function e(e){this._hashFn=e,this._nodes=Object.create(null)}return e.prototype.roots=function(){var e=[];return CD(this._nodes,(function(t){(0,w.RI)(t.value.outgoing)&&e.push(t.value)})),e},e.prototype.insertEdge=function(e,t){var n=this.lookupOrInsertNode(e),i=this.lookupOrInsertNode(t);n.outgoing[this._hashFn(t)]=i,i.incoming[this._hashFn(e)]=n},e.prototype.removeNode=function(e){var t=this._hashFn(e);delete this._nodes[t],CD(this._nodes,(function(e){delete e.value.outgoing[t],delete e.value.incoming[t]}))},e.prototype.lookupOrInsertNode=function(e){var t=this._hashFn(e),n=this._nodes[t];return n||(n=function(e){return{data:e,incoming:Object.create(null),outgoing:Object.create(null)}}(e),this._nodes[t]=n),n},Object.defineProperty(e.prototype,"length",{get:function(){return Object.keys(this._nodes).length},enumerable:!0,configurable:!0}),e.prototype.toString=function(){var e=[];return CD(this._nodes,(function(t){e.push(t.key+", (incoming)["+Object.keys(t.value.incoming).join(", ")+"], (outgoing)["+Object.keys(t.value.outgoing).join(",")+"]")})),e.join("\n")},e}(),ID=function(e){for(var t=[],n=1;n0?i[0].index:n.length;if(n.length!==l){console.warn("[createInstance] First service dependency of "+e.ctor.name+" at position "+(l+1)+" conflicts with "+n.length+" static arguments");var c=l-n.length;n=c>0?n.concat(new Array(c)):n.slice(0,l)}var h=[e.ctor];return h.push.apply(h,n),h.push.apply(h,o),w.vt.apply(null,h)},e.prototype._getOrCreateServiceInstance=function(e){var t=this._services.get(e);return t instanceof ID?this._createAndCacheServiceInstance(e,t):t},e.prototype._createAndCacheServiceInstance=function(e,t){H(this._services.get(e)instanceof ID);var n=new LD((function(e){return e.id.toString()}));function i(){var e=new Error("[createInstance] cyclic dependency between services");throw e.message=n.toString(),e}for(var o=0,r=[{id:e,desc:t}];r.length;){var s=r.pop();n.lookupOrInsertNode(s),o++>100&&i();for(var a=0,u=N._$.getServiceDependencies(s.desc.ctor);a0?a:1,startColumn:u=u>0?u:1,endLineNumber:l=l>=a?l:a,endColumn:c=c>0?c:u,relatedInformation:h,tags:d}},e.prototype.read=function(t){void 0===t&&(t=Object.create(null));var n=t.owner,i=t.resource,o=t.severities,r=t.take;if((!r||r<0)&&(r=-1),n&&i){if(b=SD.get(this._byResource,i.toString(),n)){for(var s=[],a=0,u=b;a0&&c===r)break}}return s}return[]}if(n||i){var h=n?this._byOwner[n]:this._byResource[i.toString()];if(!h)return[];for(var d in s=[],h)for(var f=0,p=h[d];f0&&c===r))return s;return s}s=[];for(var g in this._byResource)for(var m in this._byResource[g])for(var v=0,y=this._byResource[g][m];v0&&c===r)return s}}return s},e._accept=function(e,t){return void 0===t||(t&e.severity)===e.severity},e._debouncer=function(t,n){t||(e._dedupeMap=Object.create(null),t=[]);for(var i=0,o=n;i1&&p>1&&h.charCodeAt(f-2)===d.charCodeAt(p-2);)f--,p--;(f>1||p>1)&&this._pushTrimWhitespaceCharChange(o,r+1,1,f,s+1,1,p);for(var g=WD._getLastNonBlankColumn(h,1),m=WD._getLastNonBlankColumn(d,1),v=h.length+1,y=d.length+1;gt&&(t=l),s>n&&(n=s),(c=r[2])>n&&(n=c)}t++,n++;var a=new zo.Ie(n,t,0);for(i=0,o=e.length;i=this._maxCharCode?0:this._states.get(e,t)},e}(),ZD=null,GD=null,QD=function(){function e(){}return e._createLink=function(e,t,n,i,o){var r=o-1;do{var s=t.charCodeAt(r);if(2!==e.get(s))break;r--}while(r>i);if(i>0){var a=t.charCodeAt(i-1),u=t.charCodeAt(r);(40===a&&41===u||91===a&&93===u||123===a&&125===u)&&r--}return{range:{startLineNumber:n,startColumn:i+1,endLineNumber:n,endColumn:r+2},url:t.substring(i,r+1)}},e.computeLinks=function(t){for(var n=(null===ZD&&(ZD=new YD([[1,104,2],[1,72,2],[1,102,6],[1,70,6],[2,116,3],[2,84,3],[3,116,4],[3,84,4],[4,112,5],[4,80,5],[5,115,9],[5,83,9],[5,58,10],[6,105,7],[6,73,7],[7,108,8],[7,76,8],[8,101,9],[8,69,9],[9,58,10],[10,47,11],[11,47,12]])),ZD),i=function(){if(null===GD){GD=new cr.V(0);for(var e=0;e<49;e++)GD.set(" \t<>'\"、。。、,.:;?!@#$%&*‘“〈《「『【〔([{「」}])〕】』」》〉”’`~…".charCodeAt(e),1);for(e=0;e<3;e++)GD.set(".,;".charCodeAt(e),2)}return GD}(),o=[],r=1,s=t.getLineCount();r<=s;r++){for(var a=t.getLineContent(r),u=a.length,l=0,c=0,h=0,d=1,f=!1,p=!1,g=!1;l=0?((i+=n?1:-1)<0?i=e.length-1:i%=e.length,e[i]):null},e.INSTANCE=new e,e}(),KD=n(1279),JD=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),XD=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return JD(t,e),Object.defineProperty(t.prototype,"uri",{get:function(){return this._uri},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"version",{get:function(){return this._versionId},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"eol",{get:function(){return this._eol},enumerable:!0,configurable:!0}),t.prototype.getValue=function(){return this.getText()},t.prototype.getLinesContent=function(){return this._lines.slice(0)},t.prototype.getLineCount=function(){return this._lines.length},t.prototype.getLineContent=function(e){return this._lines[e-1]},t.prototype.getWordAtPosition=function(e,t){var n=(0,KD.Th)(e.column,(0,KD.Io)(t),this._lines[e.lineNumber-1],0);return n?new s.Q(e.lineNumber,n.startColumn,e.lineNumber,n.endColumn):null},t.prototype.getWordUntilPosition=function(e,t){var n=this.getWordAtPosition(e,t);return n?{word:this._lines[e.lineNumber-1].substring(n.startColumn-1,e.column-1),startColumn:n.startColumn,endColumn:e.column}:{word:"",startColumn:e.column,endColumn:e.column}},t.prototype.createWordIterator=function(e){var t,n=this,i={done:!1,value:""},o=0,r=0,s=[],a=function(){if(r=n._lines.length))return t=n._lines[o],s=n._wordenize(t,e),r=0,o+=1,a();i.done=!0,i.value=void 0}return i};return{next:a}},t.prototype._wordenize=function(e,t){var n,i=[];for(t.lastIndex=0;(n=t.exec(e))&&0!==n[0].length;)i.push({start:n.index,end:n.index+n[0].length});return i},t.prototype.getValueInRange=function(e){if((e=this._validateRange(e)).startLineNumber===e.endLineNumber)return this._lines[e.startLineNumber-1].substring(e.startColumn-1,e.endColumn-1);var t=this._eol,n=e.startLineNumber-1,i=e.endLineNumber-1,o=[];o.push(this._lines[n].substring(e.startColumn-1));for(var r=n+1;rthis._lines.length)t=this._lines.length,n=this._lines[t-1].length+1,i=!0;else{var o=this._lines[t-1].length+1;n<1?(n=1,i=!0):n>o&&(n=o,i=!0)}return i?{lineNumber:t,column:n}:e},t}(UD),$D=function(){function e(e){this._foreignModuleFactory=e,this._foreignModule=null}return e.prototype.computeDiff=function(e,t,n){var i=this._getModel(e),o=this._getModel(t);if(!i||!o)return null;var r=i.getLinesContent(),s=o.getLinesContent(),a=new VD(r,s,{shouldComputeCharChanges:!0,shouldPostProcessCharChanges:!0,shouldIgnoreTrimWhitespace:n,shouldMakePrettyDiff:!0});return J.g3.as(a.computeDiff())},e.prototype.computeMoreMinimalEdits=function(t,n){var i=this._getModel(t);if(!i)return J.g3.as(n);for(var o,r=[],a=0,u=n;ae._diffLimit)r.push({range:c,text:h});else for(var p=wy(f,h,!1),g=i.offsetAt(s.Q.lift(c).getStartPosition()),m=0,v=p;m=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([ik(0,K.S),ik(1,tk)],t)}(I.jG),sk=function(){function e(e,t,n){this._workerManager=e,this._configurationService=t,this._modelService=n}return e.prototype.provideCompletionItems=function(e,t){if(this._configurationService.getValue(e.uri,t,"editor").wordBasedSuggestions&&ok(this._modelService,e.uri))return this._workerManager.withWorker().then((function(n){return n.textualSuggest(e.uri,t)}))},e}(),ak=function(e){function t(t){var n=e.call(this)||this;return n._modelService=t,n._editorWorkerClient=null,n._register(new Mt).cancelAndSet((function(){return n._checkStopIdleWorker()}),Math.round(15e4)),n._register(n._modelService.onModelRemoved((function(e){return n._checkStopEmptyWorker()}))),n}return nk(t,e),t.prototype.dispose=function(){this._editorWorkerClient&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null),e.prototype.dispose.call(this)},t.prototype._checkStopEmptyWorker=function(){this._editorWorkerClient&&0===this._modelService.getModels().length&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null)},t.prototype._checkStopIdleWorker=function(){this._editorWorkerClient&&(new Date).getTime()-this._lastWorkerUsedTime>3e5&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null)},t.prototype.withWorker=function(){return this._lastWorkerUsedTime=(new Date).getTime(),this._editorWorkerClient||(this._editorWorkerClient=new ck(this._modelService,"editorWorkerService")),J.g3.as(this._editorWorkerClient)},t}(I.jG),uk=function(e){function t(t,n,i){var o=e.call(this)||this;if(o._syncedModels=Object.create(null),o._syncedModelsLastUsedTime=Object.create(null),o._proxy=t,o._modelService=n,!i){var r=new Mt;r.cancelAndSet((function(){return o._checkStopModelSync()}),Math.round(3e4)),o._register(r)}return o}return nk(t,e),t.prototype.dispose=function(){for(var t in this._syncedModels)(0,I.AS)(this._syncedModels[t]);this._syncedModels=Object.create(null),this._syncedModelsLastUsedTime=Object.create(null),e.prototype.dispose.call(this)},t.prototype.esureSyncedResources=function(e){for(var t=0;t6e4&&t.push(n);for(var i=0;i=0}}(e);gk.push(n),n.userConfigured?vk.push(n):mk.push(n),t&&!n.userConfigured&&gk.forEach((function(e){e.mime===n.mime||e.userConfigured||(n.extension&&e.extension===n.extension&&console.warn("Overwriting extension <<"+n.extension+">> to now point to mime <<"+n.mime+">>"),n.filename&&e.filename===n.filename&&console.warn("Overwriting filename <<"+n.filename+">> to now point to mime <<"+n.mime+">>"),n.filepattern&&e.filepattern===n.filepattern&&console.warn("Overwriting filepattern <<"+n.filepattern+">> to now point to mime <<"+n.mime+">>"),n.firstline&&e.firstline===n.firstline&&console.warn("Overwriting firstline <<"+n.firstline+">> to now point to mime <<"+n.mime+">>"))}))}function bk(e,t,n){for(var i,o,r,s=n.length-1;s>=0;s--){var a=n[s];if(t===a.filenameLowercase){i=a;break}if(a.filepattern&&(!o||a.filepattern.length>o.filepattern.length)){var u=a.filepatternOnPath?e:t;(0,dk.YW)(a.filepatternLowercase,u)&&(o=a)}a.extension&&(!r||a.extension.length>r.extension.length)&&p.endsWith(t,a.extensionLowercase)&&(r=a)}return i?i.mime:o?o.mime:r?r.mime:null}var _k=new(function(){function e(){this._onDidAddLanguages=new X.vl,this.onDidAddLanguages=this._onDidAddLanguages.event,this._languages=[]}return e.prototype.registerLanguage=function(e){this._languages.push(e),this._onDidAddLanguages.fire([e])},e.prototype.getLanguages=function(){return this._languages.slice(0)},e}());U.add("editor.modesRegistry",_k);var wk="plaintext",Mk=new No.Aj(wk,1);_k.registerLanguage({id:wk,extensions:[".txt",".gitignore"],aliases:[o.k("plainText.alias","Plain Text"),"text"],mimetypes:["text/plain"]}),Ge.cx.register(Mk,{brackets:[["(",")"],["[","]"],["{","}"]]});var Ck=Object.prototype.hasOwnProperty,Sk=function(){function e(e,t){void 0===e&&(e=!0),void 0===t&&(t=!1);var n=this;this._nextLanguageId=1,this._languages={},this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},this._languageIds=[],this._warnOnOverwrite=t,e&&(this._registerLanguages(_k.getLanguages()),_k.onDidAddLanguages((function(e){return n._registerLanguages(e)})))}return e.prototype._registerLanguages=function(e){var t=this;if(0!==e.length){for(var n=0;n0&&((n=e.mimetypes).push.apply(n,t.mimetypes),o=t.mimetypes[0]),o||(o="text/x-"+i,e.mimetypes.push(o)),Array.isArray(t.extensions))for(var r=0,s=t.extensions;r0){var f=t.firstLine;"^"!==f.charAt(0)&&(f="^"+f);try{var g=new RegExp(f);p.regExpLeadsToEndlessLoop(g)||yk({id:i,mime:o,firstline:g},this._warnOnOverwrite)}catch(e){(0,S.dz)(e)}}e.aliases.push(i);var m=null;if(void 0!==t.aliases&&Array.isArray(t.aliases)&&(m=0===t.aliases.length?[null]:t.aliases),null!==m)for(var v=0;v0;if(y&&null===m[0]);else{var b=(y?m[0]:null)||i;!y&&e.name||(e.name=b)}t.configuration&&e.configurationFiles.push(t.configuration)},e.prototype.isRegisteredMode=function(e){return!!Ck.call(this._mimeTypesMap,e)||Ck.call(this._languages,e)},e.prototype.getModeIdForLanguageNameLowercase=function(e){return Ck.call(this._lowercaseNameMap,e)?this._lowercaseNameMap[e].language:null},e.prototype.extractModeIds=function(e){var t=this;return e?e.split(",").map((function(e){return e.trim()})).map((function(e){return Ck.call(t._mimeTypesMap,e)?t._mimeTypesMap[e].language:e})).filter((function(e){return Ck.call(t._languages,e)})):[]},e.prototype.getLanguageIdentifier=function(e){if(e===xo.I8||0===e)return xo.z8;var t;if("string"==typeof e)t=e;else if(!(t=this._languageIds[e]))return null;return Ck.call(this._languages,t)?this._languages[t].identifier:null},e.prototype.getModeIdsFromFilenameOrFirstLine=function(e,t){if(!e&&!t)return[];var n=function(e,t){if(!e)return[pk];e=e.toLowerCase();var n=bv.P8(e),i=bk(e,n,vk);if(i)return[i,fk];var o=bk(e,n,mk);if(o)return[o,fk];if(t){var r=function(e){if(p.startsWithUTF8BOM(e)&&(e=e.substr(1)),e.length>0)for(var t=0;t0)return n.mime}}return null}(t);if(r)return[r,fk]}return[pk]}(e,t);return this.extractModeIds(n.join(","))},e}(),Lk=function(){function e(e){void 0===e&&(e=!1),this._onDidCreateMode=new X.vl,this.onDidCreateMode=this._onDidCreateMode.event,this._instantiatedModes={},this._registry=new Sk(!0,e)}return e.prototype._onReady=function(){return J.g3.as(!0)},e.prototype.isRegisteredMode=function(e){return this._registry.isRegisteredMode(e)},e.prototype.getModeIdForLanguageName=function(e){return this._registry.getModeIdForLanguageNameLowercase(e)},e.prototype.getModeIdByFilenameOrFirstLine=function(e,t){var n=this._registry.getModeIdsFromFilenameOrFirstLine(e,t);return n.length>0?n[0]:null},e.prototype.getModeId=function(e){var t=this._registry.extractModeIds(e);return t.length>0?t[0]:null},e.prototype.getLanguageIdentifier=function(e){return this._registry.getLanguageIdentifier(e)},e.prototype.getMode=function(e){for(var t=this._registry.extractModeIds(e),n=!1,i=0;i=o?new s.Q(n.startLineNumber,o-1,n.endLineNumber,o):new s.Q(n.startLineNumber,n.startColumn,n.endLineNumber,n.endColumn+1))}}else if(t.endColumn===Number.MAX_VALUE&&1===t.startColumn&&n.startLineNumber===n.endLineNumber){var r=e.getLineFirstNonWhitespaceColumn(t.startLineNumber);r=0?"squiggly-unnecessary":"squiggly-hint",r=0;break;case d_.Warning:t="squiggly-warning",n=Ir(Ua),i=Ir(Ua),r=20;break;case d_.Info:t="squiggly-info",n=Ir(Ya),i=Ir(Ya),r=10;break;case d_.Error:default:t="squiggly-error",n=Ir(Va),i=Ir(Va),r=30}e.tags&&-1!==e.tags.indexOf(h_.Unnecessary)&&(s="squiggly-inline-unnecessary");var a=null,u=e.message,l=e.source,c=e.relatedInformation;if("string"==typeof u&&(u=u.trim(),l&&(u=/\n/g.test(u)?o.k("diagAndSourceMultiline","[{0}]\n{1}",l,u):o.k("diagAndSource","[{0}] {1}",l,u)),a=(new yp).appendCodeblock("_",u),!(0,tu.Ct)(c))){a.appendMarkdown("\n");for(var h=0,d=c;h=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([Ik(0,v_),Ik(1,uf)],e)}(),Ek=function(){function e(){this._codeEditors=Object.create(null),this._diffEditors=Object.create(null),this._onCodeEditorAdd=new X.vl,this._onCodeEditorRemove=new X.vl,this._onDiffEditorAdd=new X.vl,this._onDiffEditorRemove=new X.vl}return e.prototype.addCodeEditor=function(e){this._codeEditors[e.getId()]=e,this._onCodeEditorAdd.fire(e)},Object.defineProperty(e.prototype,"onCodeEditorAdd",{get:function(){return this._onCodeEditorAdd.event},enumerable:!0,configurable:!0}),e.prototype.removeCodeEditor=function(e){delete this._codeEditors[e.getId()]&&this._onCodeEditorRemove.fire(e)},e.prototype.listCodeEditors=function(){var e=this;return Object.keys(this._codeEditors).map((function(t){return e._codeEditors[t]}))},e.prototype.addDiffEditor=function(e){this._diffEditors[e.getId()]=e,this._onDiffEditorAdd.fire(e)},e.prototype.removeDiffEditor=function(e){delete this._diffEditors[e.getId()]&&this._onDiffEditorRemove.fire(e)},e.prototype.listDiffEditors=function(){var e=this;return Object.keys(this._diffEditors).map((function(t){return e._diffEditors[t]}))},e.prototype.getFocusedCodeEditor=function(){for(var e=null,t=this.listCodeEditors(),n=0;n=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([(n=0,i=Lr,function(e,t){i(e,t,n)})],t);var n,i}(Ek),Ok=function(){function e(e,t){this._parentTypeKey=t.parentTypeKey,this.refCount=0,this._beforeContentRules=new zk(3,t,e),this._afterContentRules=new zk(4,t,e)}return e.prototype.getOptions=function(e,t){var n=e.resolveDecorationOptions(this._parentTypeKey,!0);return this._beforeContentRules&&(n.beforeContentClassName=this._beforeContentRules.className),this._afterContentRules&&(n.afterContentClassName=this._afterContentRules.className),n},e.prototype.dispose=function(){this._beforeContentRules&&(this._beforeContentRules.dispose(),this._beforeContentRules=null),this._afterContentRules&&(this._afterContentRules.dispose(),this._afterContentRules=null)},e}(),Rk=function(){function e(e,t){var n=this;this.refCount=0,this._disposables=[];var i=function(i){var o=new zk(i,t,e);if(o.hasContent)return n._disposables.push(o),o.className};this.className=i(0);var o,r=(o=new zk(1,t,e)).hasContent?(n._disposables.push(o),{className:o.className,hasLetterSpacing:o.hasLetterSpacing}):null;r&&(this.inlineClassName=r.className,this.inlineClassNameAffectsLetterSpacing=r.hasLetterSpacing),this.beforeContentClassName=i(3),this.afterContentClassName=i(4),this.glyphMarginClassName=i(2);var s=t.options;this.isWholeLine=Boolean(s.isWholeLine),this.stickiness=s.rangeBehavior;var a=s.light&&s.light.overviewRulerColor||s.overviewRulerColor,u=s.dark&&s.dark.overviewRulerColor||s.overviewRulerColor;void 0===a&&void 0===u||(this.overviewRuler={color:a||u,darkColor:u||a,position:s.overviewRulerLane||Xi.A5.Center})}return e.prototype.getOptions=function(e,t){return t?{inlineClassName:this.inlineClassName,beforeContentClassName:this.beforeContentClassName,afterContentClassName:this.afterContentClassName,className:this.className,glyphMarginClassName:this.glyphMarginClassName,isWholeLine:this.isWholeLine,overviewRuler:this.overviewRuler,stickiness:this.stickiness}:this},e.prototype.dispose=function(){this._disposables=(0,I.AS)(this._disposables)},e}(),Pk={color:"color:{0} !important;",opacity:"opacity:{0}; will-change: opacity;",backgroundColor:"background-color:{0};",outline:"outline:{0};",outlineColor:"outline-color:{0};",outlineStyle:"outline-style:{0};",outlineWidth:"outline-width:{0};",border:"border:{0};",borderColor:"border-color:{0};",borderRadius:"border-radius:{0};",borderSpacing:"border-spacing:{0};",borderStyle:"border-style:{0};",borderWidth:"border-width:{0};",fontStyle:"font-style:{0};",fontWeight:"font-weight:{0};",textDecoration:"text-decoration:{0};",cursor:"cursor:{0};",letterSpacing:"letter-spacing:{0};",gutterIconPath:"background:url('{0}') center center no-repeat;",gutterIconSize:"background-size:{0};",contentText:"content:'{0}';",contentIconPath:"content:url('{0}');",margin:"margin:{0};",width:"width:{0};",height:"height:{0};"},zk=function(){function e(e,t,n){var i=this;this._theme=n.getTheme(),this._ruleType=e,this._providerArgs=t,this._usesThemeColors=!1,this._hasContent=!1,this._hasLetterSpacing=!1;var o=Wk.getClassName(this._providerArgs.key,e);this._providerArgs.parentTypeKey&&(o=o+" "+Wk.getClassName(this._providerArgs.parentTypeKey,e)),this._className=o,this._unThemedSelector=Wk.getSelector(this._providerArgs.key,this._providerArgs.parentTypeKey,e),this._buildCSS(),this._usesThemeColors&&(this._themeListener=n.onThemeChange((function(e){i._theme=n.getTheme(),i._removeCSS(),i._buildCSS()})))}return e.prototype.dispose=function(){this._hasContent&&(this._removeCSS(),this._hasContent=!1),this._themeListener&&(this._themeListener.dispose(),this._themeListener=null)},Object.defineProperty(e.prototype,"hasContent",{get:function(){return this._hasContent},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"hasLetterSpacing",{get:function(){return this._hasLetterSpacing},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"className",{get:function(){return this._className},enumerable:!0,configurable:!0}),e.prototype._buildCSS=function(){var e,t,n,i=this._providerArgs.options;switch(this._ruleType){case 0:e=this.getCSSTextForModelDecorationClassName(i),t=this.getCSSTextForModelDecorationClassName(i.light),n=this.getCSSTextForModelDecorationClassName(i.dark);break;case 1:e=this.getCSSTextForModelDecorationInlineClassName(i),t=this.getCSSTextForModelDecorationInlineClassName(i.light),n=this.getCSSTextForModelDecorationInlineClassName(i.dark);break;case 2:e=this.getCSSTextForModelDecorationGlyphMarginClassName(i),t=this.getCSSTextForModelDecorationGlyphMarginClassName(i.light),n=this.getCSSTextForModelDecorationGlyphMarginClassName(i.dark);break;case 3:e=this.getCSSTextForModelDecorationContentClassName(i.before),t=this.getCSSTextForModelDecorationContentClassName(i.light&&i.light.before),n=this.getCSSTextForModelDecorationContentClassName(i.dark&&i.dark.before);break;case 4:e=this.getCSSTextForModelDecorationContentClassName(i.after),t=this.getCSSTextForModelDecorationContentClassName(i.light&&i.light.after),n=this.getCSSTextForModelDecorationContentClassName(i.dark&&i.dark.after);break;default:throw new Error("Unknown rule type: "+this._ruleType)}var o=this._providerArgs.styleSheet.sheet,r=!1;e.length>0&&(o.insertRule(this._unThemedSelector+" {"+e+"}",0),r=!0),t.length>0&&(o.insertRule(".vs"+this._unThemedSelector+" {"+t+"}",0),r=!0),n.length>0&&(o.insertRule(".vs-dark"+this._unThemedSelector+", .hc-black"+this._unThemedSelector+" {"+n+"}",0),r=!0),this._hasContent=r},e.prototype._removeCSS=function(){Hn(this._unThemedSelector,this._providerArgs.styleSheet)},e.prototype.getCSSTextForModelDecorationClassName=function(e){if(!e)return"";var t=[];return this.collectCSSText(e,["backgroundColor"],t),this.collectCSSText(e,["outline","outlineColor","outlineStyle","outlineWidth"],t),this.collectBorderSettingsCSSText(e,t),t.join("")},e.prototype.getCSSTextForModelDecorationInlineClassName=function(e){if(!e)return"";var t=[];return this.collectCSSText(e,["fontStyle","fontWeight","textDecoration","cursor","color","opacity","letterSpacing"],t),e.letterSpacing&&(this._hasLetterSpacing=!0),t.join("")},e.prototype.getCSSTextForModelDecorationContentClassName=function(e){if(!e)return"";var t=[];if(void 0!==e){if(this.collectBorderSettingsCSSText(e,t),void 0!==e.contentIconPath&&("string"==typeof e.contentIconPath?t.push(p.format(Pk.contentIconPath,L.A.file(e.contentIconPath).toString().replace(/'/g,"%27"))):t.push(p.format(Pk.contentIconPath,L.A.revive(e.contentIconPath).toString(!0).replace(/'/g,"%27")))),"string"==typeof e.contentText){var n=e.contentText.match(/^.*$/m)[0].replace(/['\\]/g,"\\$&");t.push(p.format(Pk.contentText,n))}this.collectCSSText(e,["fontStyle","fontWeight","textDecoration","color","opacity","backgroundColor","margin"],t),this.collectCSSText(e,["width","height"],t)&&t.push("display:inline-block;")}return t.join("")},e.prototype.getCSSTextForModelDecorationGlyphMarginClassName=function(e){if(!e)return"";var t=[];return void 0!==e.gutterIconPath&&("string"==typeof e.gutterIconPath?t.push(p.format(Pk.gutterIconPath,L.A.file(e.gutterIconPath).toString())):t.push(p.format(Pk.gutterIconPath,L.A.revive(e.gutterIconPath).toString(!0).replace(/'/g,"%27"))),void 0!==e.gutterIconSize&&t.push(p.format(Pk.gutterIconSize,e.gutterIconSize))),t.join("")},e.prototype.collectBorderSettingsCSSText=function(e,t){return!!this.collectCSSText(e,["border","borderColor","borderRadius","borderSpacing","borderStyle","borderWidth"],t)&&(t.push(p.format("box-sizing: border-box;")),!0)},e.prototype.collectCSSText=function(e,t,n){for(var i=n.length,o=0,r=t;o=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([(n=0,i=uf,function(e,t){i(e,t,n)})],t);var n,i}(Qk),Kk=function(e){function t(t,n,i){var o=e.call(this,t.createChildContext())||this;return o._parent=t,o._onDidChangeContextKey=n,i&&(o._domNode=i,o._domNode.setAttribute(Vk,String(o._myContextId))),o}return Hk(t,e),t.prototype.dispose=function(){this._parent.disposeContext(this._myContextId),this._domNode&&(this._domNode.removeAttribute(Vk),this._domNode=void 0)},Object.defineProperty(t.prototype,"onDidChangeContext",{get:function(){return this._parent.onDidChangeContext},enumerable:!0,configurable:!0}),t.prototype.getContextValuesContainer=function(e){return this._parent.getContextValuesContainer(e)},t.prototype.createChildContext=function(e){return void 0===e&&(e=this._myContextId),this._parent.createChildContext(e)},t.prototype.disposeContext=function(e){this._parent.disposeContext(e)},t}(Qk);k.registerCommand("setContext",(function(e,t,n){e.get(he).createKey(String(t),n)}));var Jk=function(e,t,n,i,o){this.token=e,this.index=t,this.fontStyle=n,this.foreground=i,this.background=o};function Xk(e,t){e.sort((function(e,t){var n=function(e,t){return et?1:0}(e.token,t.token);return 0!==n?n:e.index-t.index}));for(var n=0,i="000000",o="ffffff";e.length>=1&&""===e[0].token;){var r=e.shift();-1!==r.fontStyle&&(n=r.fontStyle),null!==r.foreground&&(i=r.foreground),null!==r.background&&(o=r.background)}for(var s=new iT,a=0,u=t;a>>0,this._cache.set(t,n)}return(n|e)>>>0},e}(),rT=/\b(comment|string|regex)\b/,sT=function(){function e(e,t,n){this._fontStyle=e,this._foreground=t,this._background=n,this.metadata=(this._fontStyle<<11|this._foreground<<14|this._background<<23)>>>0}return e.prototype.clone=function(){return new e(this._fontStyle,this._foreground,this._background)},e.prototype.acceptOverwrite=function(e,t,n){-1!==e&&(this._fontStyle=e),0!==t&&(this._foreground=t),0!==n&&(this._background=n),this.metadata=(this._fontStyle<<11|this._foreground<<14|this._background<<23)>>>0},e}(),aT=function(){function e(e){this._mainRule=e,this._children=new Map}return e.prototype.match=function(e){if(""===e)return this._mainRule;var t,n,i=e.indexOf(".");-1===i?(t=e,n=""):(t=e.substring(0,i),n=e.substring(i+1));var o=this._children.get(t);return void 0!==o?o.match(n):this._mainRule},e.prototype.insert=function(t,n,i,o){if(""!==t){var r,s,a=t.indexOf(".");-1===a?(r=t,s=""):(r=t.substring(0,a),s=t.substring(a+1));var u=this._children.get(r);void 0===u&&(u=new e(this._mainRule.clone()),this._children.set(r,u)),u.insert(s,n,i,o)}else this._mainRule.acceptOverwrite(n,i,o)},e}(),uT={base:"vs",inherit:!1,rules:[{token:"",foreground:"000000",background:"fffffe"},{token:"invalid",foreground:"cd3131"},{token:"emphasis",fontStyle:"italic"},{token:"strong",fontStyle:"bold"},{token:"variable",foreground:"001188"},{token:"variable.predefined",foreground:"4864AA"},{token:"constant",foreground:"dd0000"},{token:"comment",foreground:"008000"},{token:"number",foreground:"09885A"},{token:"number.hex",foreground:"3030c0"},{token:"regexp",foreground:"800000"},{token:"annotation",foreground:"808080"},{token:"type",foreground:"008080"},{token:"delimiter",foreground:"000000"},{token:"delimiter.html",foreground:"383838"},{token:"delimiter.xml",foreground:"0000FF"},{token:"tag",foreground:"800000"},{token:"tag.id.pug",foreground:"4F76AC"},{token:"tag.class.pug",foreground:"4F76AC"},{token:"meta.scss",foreground:"800000"},{token:"metatag",foreground:"e00000"},{token:"metatag.content.html",foreground:"FF0000"},{token:"metatag.html",foreground:"808080"},{token:"metatag.xml",foreground:"808080"},{token:"metatag.php",fontStyle:"bold"},{token:"key",foreground:"863B00"},{token:"string.key.json",foreground:"A31515"},{token:"string.value.json",foreground:"0451A5"},{token:"attribute.name",foreground:"FF0000"},{token:"attribute.value",foreground:"0451A5"},{token:"attribute.value.number",foreground:"09885A"},{token:"attribute.value.unit",foreground:"09885A"},{token:"attribute.value.html",foreground:"0000FF"},{token:"attribute.value.xml",foreground:"0000FF"},{token:"string",foreground:"A31515"},{token:"string.html",foreground:"0000FF"},{token:"string.sql",foreground:"FF0000"},{token:"string.yaml",foreground:"0451A5"},{token:"keyword",foreground:"0000FF"},{token:"keyword.json",foreground:"0451A5"},{token:"keyword.flow",foreground:"AF00DB"},{token:"keyword.flow.scss",foreground:"0000FF"},{token:"operator.scss",foreground:"666666"},{token:"operator.sql",foreground:"778899"},{token:"operator.swift",foreground:"666666"},{token:"predefined.sql",foreground:"FF00FF"}],colors:($k={},$k[Os]="#FFFFFE",$k[Rs]="#000000",$k[Hs]="#E5EBF1",$k[Ma]="#D3D3D3",$k[Ca]="#939393",$k[Vs]="#ADD6FF4D",$k)},lT={base:"vs-dark",inherit:!1,rules:[{token:"",foreground:"D4D4D4",background:"1E1E1E"},{token:"invalid",foreground:"f44747"},{token:"emphasis",fontStyle:"italic"},{token:"strong",fontStyle:"bold"},{token:"variable",foreground:"74B0DF"},{token:"variable.predefined",foreground:"4864AA"},{token:"variable.parameter",foreground:"9CDCFE"},{token:"constant",foreground:"569CD6"},{token:"comment",foreground:"608B4E"},{token:"number",foreground:"B5CEA8"},{token:"number.hex",foreground:"5BB498"},{token:"regexp",foreground:"B46695"},{token:"annotation",foreground:"cc6666"},{token:"type",foreground:"3DC9B0"},{token:"delimiter",foreground:"DCDCDC"},{token:"delimiter.html",foreground:"808080"},{token:"delimiter.xml",foreground:"808080"},{token:"tag",foreground:"569CD6"},{token:"tag.id.pug",foreground:"4F76AC"},{token:"tag.class.pug",foreground:"4F76AC"},{token:"meta.scss",foreground:"A79873"},{token:"meta.tag",foreground:"CE9178"},{token:"metatag",foreground:"DD6A6F"},{token:"metatag.content.html",foreground:"9CDCFE"},{token:"metatag.html",foreground:"569CD6"},{token:"metatag.xml",foreground:"569CD6"},{token:"metatag.php",fontStyle:"bold"},{token:"key",foreground:"9CDCFE"},{token:"string.key.json",foreground:"9CDCFE"},{token:"string.value.json",foreground:"CE9178"},{token:"attribute.name",foreground:"9CDCFE"},{token:"attribute.value",foreground:"CE9178"},{token:"attribute.value.number.css",foreground:"B5CEA8"},{token:"attribute.value.unit.css",foreground:"B5CEA8"},{token:"attribute.value.hex.css",foreground:"D4D4D4"},{token:"string",foreground:"CE9178"},{token:"string.sql",foreground:"FF0000"},{token:"keyword",foreground:"569CD6"},{token:"keyword.flow",foreground:"C586C0"},{token:"keyword.json",foreground:"CE9178"},{token:"keyword.flow.scss",foreground:"569CD6"},{token:"operator.scss",foreground:"909090"},{token:"operator.sql",foreground:"778899"},{token:"operator.swift",foreground:"909090"},{token:"predefined.sql",foreground:"FF00FF"}],colors:(eT={},eT[Os]="#1E1E1E",eT[Rs]="#D4D4D4",eT[Hs]="#3A3D41",eT[Ma]="#404040",eT[Ca]="#707070",eT[Vs]="#ADD6FF26",eT)},cT={base:"hc-black",inherit:!1,rules:[{token:"",foreground:"FFFFFF",background:"000000"},{token:"invalid",foreground:"f44747"},{token:"emphasis",fontStyle:"italic"},{token:"strong",fontStyle:"bold"},{token:"variable",foreground:"1AEBFF"},{token:"variable.parameter",foreground:"9CDCFE"},{token:"constant",foreground:"569CD6"},{token:"comment",foreground:"608B4E"},{token:"number",foreground:"FFFFFF"},{token:"regexp",foreground:"C0C0C0"},{token:"annotation",foreground:"569CD6"},{token:"type",foreground:"3DC9B0"},{token:"delimiter",foreground:"FFFF00"},{token:"delimiter.html",foreground:"FFFF00"},{token:"tag",foreground:"569CD6"},{token:"tag.id.pug",foreground:"4F76AC"},{token:"tag.class.pug",foreground:"4F76AC"},{token:"meta",foreground:"D4D4D4"},{token:"meta.tag",foreground:"CE9178"},{token:"metatag",foreground:"569CD6"},{token:"metatag.content.html",foreground:"1AEBFF"},{token:"metatag.html",foreground:"569CD6"},{token:"metatag.xml",foreground:"569CD6"},{token:"metatag.php",fontStyle:"bold"},{token:"key",foreground:"9CDCFE"},{token:"string.key",foreground:"9CDCFE"},{token:"string.value",foreground:"CE9178"},{token:"attribute.name",foreground:"569CD6"},{token:"attribute.value",foreground:"3FF23F"},{token:"string",foreground:"CE9178"},{token:"string.sql",foreground:"FF0000"},{token:"keyword",foreground:"569CD6"},{token:"keyword.flow",foreground:"C586C0"},{token:"operator.sql",foreground:"778899"},{token:"operator.swift",foreground:"909090"},{token:"predefined.sql",foreground:"FF00FF"}],colors:(tT={},tT[Os]="#000000",tT[Rs]="#FFFFFF",tT[Ma]="#FFFFFF",tT[Ca]="#FFFFFF",tT)},hT="vs",dT="vs-dark",fT="hc-black",pT=U.as(Qr),gT=U.as(Dr),mT=function(){function e(e,t){this.themeData=t;var n=t.base;e.length>0?(this.id=n+" "+e,this.themeName=e):(this.id=n,this.themeName=n),this.colors=null,this.defaultColors=Object.create(null),this._tokenTheme=null}return Object.defineProperty(e.prototype,"base",{get:function(){return this.themeData.base},enumerable:!0,configurable:!0}),e.prototype.notifyBaseUpdated=function(){this.themeData.inherit&&(this.colors=null,this._tokenTheme=null)},e.prototype.getColors=function(){if(!this.colors){var e=Object.create(null);for(var t in this.themeData.colors)e[t]=Go.fromHex(this.themeData.colors[t]);if(this.themeData.inherit){var n=yT(this.themeData.base);for(var t in n.colors)e[t]||(e[t]=Go.fromHex(n.colors[t]))}this.colors=e}return this.colors},e.prototype.getColor=function(e,t){return this.getColors()[e]||(!1!==t?this.getDefault(e):null)},e.prototype.getDefault=function(e){var t=this.defaultColors[e];return t||(t=pT.resolveDefaultColor(e,this),this.defaultColors[e]=t,t)},e.prototype.defines=function(e){return Object.prototype.hasOwnProperty.call(this.getColors(),e)},Object.defineProperty(e.prototype,"type",{get:function(){switch(this.base){case hT:return"light";case fT:return"hc";default:return"dark"}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"tokenTheme",{get:function(){if(!this._tokenTheme){var e=[],t=[];if(this.themeData.inherit){var n=yT(this.themeData.base);e=n.rules,n.encodedTokensColors&&(t=n.encodedTokensColors)}e=e.concat(this.themeData.rules),this.themeData.encodedTokensColors&&(t=this.themeData.encodedTokensColors),this._tokenTheme=oT.createFromRawTokenTheme(e,t)}return this._tokenTheme},enumerable:!0,configurable:!0}),e}();function vT(e){return e===hT||e===dT||e===fT}function yT(e){switch(e){case hT:return uT;case dT:return lT;case fT:return cT}}function bT(e){var t=yT(e);return new mT(e,t)}var _T,wT=function(){function e(){this.environment=Object.create(null),this._onThemeChange=new X.vl,this._knownThemes=new Map,this._knownThemes.set(hT,bT(hT)),this._knownThemes.set(dT,bT(dT)),this._knownThemes.set(fT,bT(fT)),this._styleElement=Wn(),this._styleElement.className="monaco-colors",this.setTheme(hT)}return Object.defineProperty(e.prototype,"onThemeChange",{get:function(){return this._onThemeChange.event},enumerable:!0,configurable:!0}),e.prototype.defineTheme=function(e,t){if(!/^[a-z0-9\-]+$/i.test(e))throw new Error("Illegal theme name!");if(!vT(t.base)&&!vT(e))throw new Error("Illegal theme base!");this._knownThemes.set(e,new mT(e,t)),vT(e)&&this._knownThemes.forEach((function(t){t.base===e&&t.notifyBaseUpdated()})),this._theme&&this._theme.themeName===e&&this.setTheme(e)},e.prototype.getTheme=function(){return this._theme},e.prototype.setTheme=function(e){var t,n=this;t=this._knownThemes.has(e)?this._knownThemes.get(e):this._knownThemes.get(hT),this._theme=t;var i=[],o={},r={addRule:function(e){o[e]||(i.push(e),o[e]=!0)}};gT.getThemingParticipants().forEach((function(e){return e(t,r,n.environment)}));var s=t.tokenTheme.getColorMap();return r.addRule(function(e){for(var t=[],n=1,i=e.length;n200)return e;if("object"==typeof e){switch(e.$mid){case 1:return L.A.revive(e);case 2:return new RegExp(e.source,e.flags)}for(var n in e)Object.hasOwnProperty.call(e,n)&&(e[n]=IT(e[n],t+1))}return e}var NT=new(function(){function e(){}return e.prototype.publicLog=function(e,t){return J.g3.wrap(null)},e.prototype.getTelemetryInfo=function(){return J.g3.wrap({instanceId:"someValue.instanceId",sessionId:"someValue.sessionId",machineId:"someValue.machineId"})},e}()),xT=function(e,t){return function(n,i){t(n,i,e)}},DT=function(){function e(e,t,n){void 0===n&&(n=NT),this._editorService=e,this._commandService=t,this._telemetryService=n}return e.prototype.open=function(e,t){var n;this._telemetryService.publicLog("openerService",{scheme:e.scheme});var i=e.scheme,o=e.path,r=e.query,s=e.fragment,a=J.g3.wrap(void 0);if(i===rr.http||i===rr.https||i===rr.mailto)ii(e.toString(!0));else if("command"===i&&k.getCommand(o)){var u=[];try{u=LT(r),Array.isArray(u)||(u=[u])}catch(e){}a=(n=this._commandService).executeCommand.apply(n,[o].concat(u))}else{var l=void 0,c=/^L?(\d+)(?:,(\d+))?/.exec(s);if(c&&(l={startLineNumber:parseInt(c[1]),startColumn:c[2]?parseInt(c[2]):1},e=e.with({fragment:""})),!e.scheme)return J.g3.as(void 0);e.scheme===rr.file&&(e=e.with({path:(0,bv.S8)(e.path)})),a=this._editorService.openCodeEditor({resource:e,options:{selection:l}},this._editorService.getFocusedCodeEditor(),t&&t.openToSide)}return a},function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([xT(0,Ce),xT(1,D),xT(2,(0,N.lq)(q))],e)}(),kT=function(){function e(){}return e.colorizeElement=function(e,t,n,i){var o=(i=i||{}).theme||"vs",r=i.mimeType||n.getAttribute("lang")||n.getAttribute("data-lang");if(r){e.setTheme(o);var s=n.firstChild.nodeValue;return n.className+=" "+o,this.colorize(t,s,r,i).then((function(e){n.innerHTML=e}),(function(e){return console.error(e)}))}console.error("Mode not detected")},e._tokenizationSupportChangedPromise=function(e){var t=null,n=function(){t&&(t.dispose(),t=null)};return new J.g3((function(i,o){t=No.dG.onDidChange((function(t){t.changedLanguages.indexOf(e)>=0&&(n(),i(void 0))}))}),n)},e.colorize=function(e,t,n,i){p.startsWithUTF8BOM(t)&&(t=t.substr(1));var o=t.split(/\r\n|\r|\n/),r=e.getModeId(n);void 0===(i=i||{}).tabSize&&(i.tabSize=4),e.getOrCreateMode(r);var s=No.dG.get(r);return s?J.g3.as(TT(o,i.tabSize,s)):J.g3.any([this._tokenizationSupportChangedPromise(r),J.g3.timeout(500)]).then((function(e){var t=No.dG.get(r);return t?TT(o,i.tabSize,t):function(e,t){var n=[],i=new Uint32Array(2);i[0]=0,i[1]=16793600;for(var o=0,r=e.length;o")}return n.join("")}(o,i.tabSize)}))},e.colorizeLine=function(e,t,n,i,o){void 0===o&&(o=4);var r=jo.isBasicASCII(e,t),s=jo.containsRTL(e,r,n);return Au(new xu(!1,e,!1,r,s,0,i,[],o,0,-1,"none",!1,!1)).html},e.colorizeModelLine=function(e,t,n){void 0===n&&(n=4);var i=e.getLineContent(t);e.forceTokenization(t);var o=e.getLineTokens(t).inflate();return this.colorizeLine(i,e.mightContainNonBasicASCII(),e.mightContainRTL(),o,n)},e}();function TT(e,t,n){return function(e,t,n){for(var i=[],o=n.getInitialState(),r=0,s=e.length;r"),o=u.endState}return i.join("")}(e,t,n)}var ET,AT,jT=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),OT=function(e){function t(t,n){var i=e.call(this,t,n.label)||this;return i._foreignModuleId=n.moduleId,i._foreignModuleCreateData=n.createData||null,i._foreignProxy=null,i}return jT(t,e),t.prototype._getForeignProxy=function(){var e=this;return this._foreignProxy||(this._foreignProxy=new vt(this._getProxy().then((function(t){return t.loadForeignModule(e._foreignModuleId,e._foreignModuleCreateData).then((function(n){e._foreignModuleId=null,e._foreignModuleCreateData=null;for(var i=function(e,n){return t.fmr(e,n)},o=function(e,t){return function(){var n=Array.prototype.slice.call(arguments,0);return t(e,n)}},r={},s=0;s'"_]/g,"-")}function VT(e,t){throw new Error(e.languageId+": "+t)}function UT(e,t,n,i,o){var r=null;return t.replace(/\$((\$)|(#)|(\d\d?)|[sS](\d\d?)|@(\w+))/g,(function(t,s,a,u,l,c,h,d,f){return FT(a)?FT(u)?!FT(l)&&l0;){var n=e.tokenizer[t];if(n)return n;var i=t.lastIndexOf(".");t=i<0?null:t.substr(0,i)}return null}function ZT(e,t,n){return"boolean"==typeof e?e:(n&&(e||void 0===t)&&n(),void 0===t?null:t)}function GT(e,t,n){return"string"==typeof e?e:(n&&(e||void 0===t)&&n(),void 0===t?null:t)}function QT(e,t){if("string"!=typeof t)return null;for(var n=0;t.indexOf("@")>=0&&n<5;)n++,t=t.replace(/@(\w+)/g,(function(n,i){var o="";return"string"==typeof e[i]?o=e[i]:e[i]&&e[i]instanceof RegExp?o=e[i].source:void 0===e[i]?VT(e,"language definition does not contain attribute '"+i+"', used at: "+t):VT(e,"attribute reference '"+i+"' must be a string, used at: "+t),FT(o)?"":"(?:"+o+")"}));return new RegExp(t,e.ignoreCase?"i":"")}function qT(e,t,n,i){var o=-1,r=n,s=n.match(/^\$(([sS]?)(\d\d?)|#)(.*)$/);s&&(s[3]&&(o=parseInt(s[3]),s[2]&&(o+=100)),r=s[4]);var a,u="~",l=r;if(r&&0!==r.length?/^\w*$/.test(l)?u="==":(s=r.match(/^(@|!@|~|!~|==|!=)(.*)$/))&&(u=s[1],l=s[2]):(u="!=",l=""),"~"!==u&&"!~"!==u||!/^(\w|\|)*$/.test(l))if("@"===u||"!@"===u){var c=e[l];c||VT(e,"the @ match target '"+l+"' is not defined, in rule: "+t),function(e,t){if(!t)return!1;if(!Array.isArray(t))return!1;for(var n in t)if(t.hasOwnProperty(n)&&"string"!=typeof t[n])return!1;return!0}(0,c)||VT(e,"the @ match target '"+l+"' must be an array of strings, in rule: "+t);var h=ri.qt(c,e.ignoreCase);a=function(e){return"@"===u?h(e):!h(e)}}else if("~"===u||"!~"===u)if(l.indexOf("$")<0){var d=QT(e,"^"+l+"$");a=function(e){return"~"===u?d.test(e):!d.test(e)}}else a=function(t,n,i,o){return QT(e,"^"+UT(e,l,n,i,o)+"$").test(t)};else if(l.indexOf("$")<0){var f=BT(e,l);a=function(e){return"=="===u?e===f:e!==f}}else{var p=BT(e,l);a=function(t,n,i,o,r){var s=UT(e,p,n,i,o);return"=="===u?t===s:t!==s}}else{var g=ri.qt(l.split("|"),e.ignoreCase);a=function(e){return"~"===u?g(e):!g(e)}}return-1===o?{name:n,value:i,test:function(e,t,n,i){return a(e,e,t,n,i)}}:{name:n,value:i,test:function(e,t,n,i){var r=function(e,t,n,i){if(i<0)return e;if(i=100){i-=100;var o=n.split(".");if(o.unshift(n),i=0&&(i.tokenSubst=!0),"string"==typeof n.bracket&&("@open"===n.bracket?i.bracket=1:"@close"===n.bracket?i.bracket=-1:VT(e,"a 'bracket' attribute must be either '@open' or '@close', in rule: "+t)),n.next)if("string"!=typeof n.next)VT(e,"the next state must be a string value in rule: "+t);else{var o=n.next;/^(@pop|@push|@popall)$/.test(o)||("@"===o[0]&&(o=o.substr(1)),o.indexOf("$")<0&&(function(e,t){for(;t&&t.length>0;){if(e.stateNames[t])return!0;var n=t.lastIndexOf(".");t=n<0?null:t.substr(0,n)}return!1}(e,UT(e,o,"",[],""))||VT(e,"the next state '"+n.next+"' is not defined in rule: "+t))),i.next=o}return"number"==typeof n.goBack&&(i.goBack=n.goBack),"string"==typeof n.switchTo&&(i.switchTo=n.switchTo),"string"==typeof n.log&&(i.log=n.log),"string"==typeof n.nextEmbedded&&(i.nextEmbedded=n.nextEmbedded,e.usesEmbedded=!0),i}if(Array.isArray(n)){var r=[];for(var s in n)n.hasOwnProperty(s)&&(r[s]=KT(e,t,n[s]));return{group:r}}if(n.cases){var a=[];for(var u in n.cases)if(n.cases.hasOwnProperty(u)){var l=KT(e,t,n.cases[u]);"@default"===u||"@"===u||""===u?a.push({test:null,value:l,name:u}):"@eos"===u?a.push({test:function(e,t,n,i){return i},value:l,name:u}):a.push(qT(e,t,u,l))}var c=e.defaultToken;return{test:function(e,t,n,i){for(var o in a)if(a.hasOwnProperty(o)&&(!a[o].test||a[o].test(e,t,n,i)))return a[o].value;return c}}}return VT(e,"an action must be a string, an object with a 'token' or 'cases' attribute, or an array of actions; in rule: "+t),""}return{token:""}}!function(e){e[e.Smooth=0]="Smooth",e[e.Immediate=1]="Immediate"}(ET||(ET={})),function(e){e[e.Off=0]="Off",e[e.On=1]="On",e[e.Relative=2]="Relative",e[e.Interval=3]="Interval",e[e.Custom=4]="Custom"}(AT||(AT={}));var JT=function(){function e(e){this.regex=new RegExp(""),this.action={token:""},this.matchOnlyAtLineStart=!1,this.name="",this.name=e}return e.prototype.setRegex=function(e,t){var n;"string"==typeof t?n=t:t instanceof RegExp?n=t.source:VT(e,"rules must start with a match string or regular expression: "+this.name),this.matchOnlyAtLineStart=n.length>0&&"^"===n[0],this.name=this.name+": "+n,this.regex=QT(e,"^(?:"+(this.matchOnlyAtLineStart?n.substr(1):n)+")")},e.prototype.setAction=function(e,t){this.action=KT(e,this.name,t)},e}(),XT=function(){function e(e){this._maxCacheDepth=e,this._entries=Object.create(null)}return e.create=function(e,t){return this._INSTANCE.create(e,t)},e.prototype.create=function(e,t){if(null!==e&&e.depth>=this._maxCacheDepth)return new $T(e,t);var n=$T.getStackElementId(e);n.length>0&&(n+="|"),n+=t;var i=this._entries[n];return i||(i=new $T(e,t),this._entries[n]=i,i)},e._INSTANCE=new e(5),e}(),$T=function(){function e(e,t){this.parent=e,this.state=t,this.depth=(this.parent?this.parent.depth:0)+1}return e.getStackElementId=function(e){for(var t="";null!==e;)t.length>0&&(t+="|"),t+=e.state,e=e.parent;return t},e._equals=function(e,t){for(;null!==e&&null!==t;){if(e===t)return!0;if(e.state!==t.state)return!1;e=e.parent,t=t.parent}return null===e&&null===t},e.prototype.equals=function(t){return e._equals(this,t)},e.prototype.push=function(e){return XT.create(this,e)},e.prototype.pop=function(){return this.parent},e.prototype.popall=function(){for(var e=this;e.parent;)e=e.parent;return e},e.prototype.switchTo=function(e){return XT.create(this.parent,e)},e}(),eE=function(){function e(e,t){this.modeId=e,this.state=t}return e.prototype.equals=function(e){return this.modeId===e.modeId&&this.state.equals(e.state)},e.prototype.clone=function(){return this.state.clone()===this.state?this:new e(this.modeId,this.state)},e}(),tE=function(){function e(e){this._maxCacheDepth=e,this._entries=Object.create(null)}return e.create=function(e,t){return this._INSTANCE.create(e,t)},e.prototype.create=function(e,t){if(null!==t)return new nE(e,t);if(null!==e&&e.depth>=this._maxCacheDepth)return new nE(e,t);var n=$T.getStackElementId(e),i=this._entries[n];return i||(i=new nE(e,null),this._entries[n]=i,i)},e._INSTANCE=new e(5),e}(),nE=function(){function e(e,t){this.stack=e,this.embeddedModeData=t}return e.prototype.clone=function(){return(this.embeddedModeData?this.embeddedModeData.clone():null)===this.embeddedModeData?this:tE.create(this.stack,this.embeddedModeData)},e.prototype.equals=function(t){return t instanceof e&&!!this.stack.equals(t.stack)&&(null===this.embeddedModeData&&null===t.embeddedModeData||null!==this.embeddedModeData&&null!==t.embeddedModeData&&this.embeddedModeData.equals(t.embeddedModeData))},e}(),iE=Object.hasOwnProperty,oE=function(){function e(){this._tokens=[],this._language=null,this._lastTokenType=null,this._lastTokenLanguage=null}return e.prototype.enterMode=function(e,t){this._language=t},e.prototype.emit=function(e,t){this._lastTokenType===t&&this._lastTokenLanguage===this._language||(this._lastTokenType=t,this._lastTokenLanguage=this._language,this._tokens.push(new Ix.ou(e,t,this._language)))},e.prototype.nestedModeTokenize=function(e,t,n){var i=t.modeId,o=t.state,r=No.dG.get(i);if(!r)return this.enterMode(n,i),this.emit(n,""),o;var s=r.tokenize(e,o,n);return this._tokens=this._tokens.concat(s.tokens),this._lastTokenType=null,this._lastTokenLanguage=null,this._language=null,s.endState},e.prototype.finalize=function(e){return new Ix.$M(this._tokens,e)},e}(),rE=function(){function e(e,t){this._modeService=e,this._theme=t,this._prependTokens=null,this._tokens=[],this._currentLanguageId=0,this._lastTokenMetadata=0}return e.prototype.enterMode=function(e,t){this._currentLanguageId=this._modeService.getLanguageIdentifier(t).id},e.prototype.emit=function(e,t){var n=this._theme.match(this._currentLanguageId,t);this._lastTokenMetadata!==n&&(this._lastTokenMetadata=n,this._tokens.push(e),this._tokens.push(n))},e._merge=function(e,t,n){var i=null!==e?e.length:0,o=t.length,r=null!==n?n.length:0;if(0===i&&0===o&&0===r)return new Uint32Array(0);if(0===i&&0===o)return n;if(0===o&&0===r)return e;var s=new Uint32Array(i+o+r);null!==e&&s.set(e);for(var a=0;a0&&i.nestedModeTokenize(s,t.embeddedModeData,n);var a=e.substring(o);return this._myTokenize(a,t,n+o,i)},e.prototype._myTokenize=function(e,t,n,i){i.enterMode(n,this._modeId);for(var o=e.length,r=t.embeddedModeData,s=t.stack,a=0,u=null,l=null,c=null,h=null;a=o)break;var w=this._lexer.tokenizer[g];w||(w=YT(this._lexer,g))||VT(this._lexer,"tokenizer state is not defined: "+g);var M=e.substr(a);for(var C in w)if(iE.call(w,C)){var S=w[C];if((0===a||!S.matchOnlyAtLineStart)&&(m=M.match(S.regex))){v=m[0],y=S.action;break}}}for(m||(m=[""],v=""),y||(a=this._lexer.maxStack?VT(this._lexer,"maximum tokenizer stack size reached: ["+s.state+","+s.parent.state+",...]"):s=s.push(g);else if("@pop"===y.next)s.depth<=1?VT(this._lexer,"trying to pop an empty stack in rule: "+b.name):s=s.pop();else if("@popall"===y.next)s=s.popall();else{var I;"@"===(I=UT(this._lexer,y.next,v,m,g))[0]&&(I=I.substr(1)),YT(this._lexer,I)?s=s.push(I):VT(this._lexer,"trying to set a next state '"+I+"' that is undefined in rule: "+b.name)}y.log&&"string"==typeof y.log&&(j=this._lexer,O=this._lexer.languageId+": "+UT(this._lexer,y.log,v,m,g),console.log(j.languageId+": "+O))}if(null===L&&VT(this._lexer,"lexer rule has no well-defined action in rule: "+b.name),Array.isArray(L)){u&&u.length>0&&VT(this._lexer,"groups cannot be nested: "+b.name),m.length!==L.length+1&&VT(this._lexer,"matched number of groups does not match the number of actions in rule: "+b.name);for(var N=0,x=1;x0&&o[r-1]===c)){var h=l.startIndex;0===a?h=0:h=1&&u.length<=3)if(c.setRegex(i,u[0]),u.length>=3)if("string"==typeof u[1])c.setAction(i,{token:u[1],next:u[2]});else if("object"==typeof u[1]){var h=u[1];h.next=u[2],c.setAction(i,h)}else VT(n,"a next state as the last element of a rule can only be given if the action is either an object or a string, at: "+e);else c.setAction(i,u[1]);else u.regex||VT(n,"a rule must either be an array, or an object with a 'regex' or 'include' field at: "+e),u.name&&(c.name=GT(u.name)),u.matchOnlyAtStart&&(c.matchOnlyAtLineStart=ZT(u.matchOnlyAtLineStart)),c.setRegex(i,u.regex),c.setAction(i,u.action);r.push(c)}}}for(var r in i.languageId=e,i.ignoreCase=n.ignoreCase,i.noThrow=n.noThrow,i.usesEmbedded=n.usesEmbedded,i.stateNames=t.tokenizer,i.defaultToken=n.defaultToken,t.tokenizer&&"object"==typeof t.tokenizer||VT(n,"a language definition must define the 'tokenizer' attribute as an object"),n.tokenizer=[],t.tokenizer)if(t.tokenizer.hasOwnProperty(r)){n.start||(n.start=r);var s=t.tokenizer[r];n.tokenizer[r]=new Array,o("tokenizer."+r,n.tokenizer[r],s)}n.usesEmbedded=i.usesEmbedded,t.brackets?Array.isArray(t.brackets)||VT(n,"the 'brackets' attribute must be defined as an array"):t.brackets=[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}];var a=[];for(var u in t.brackets)if(t.brackets.hasOwnProperty(u)){var l=t.brackets[u];l&&Array.isArray(l)&&3===l.length&&(l={token:l[2],open:l[0],close:l[1]}),l.open===l.close&&VT(n,"open and close brackets in a 'brackets' attribute must be different: "+l.open+"\n hint: use the 'bracket' attribute if matching on equal brackets is required."),"string"==typeof l.open&&"string"==typeof l.token?a.push({token:GT(l.token)+n.tokenPostfix,open:BT(n,GT(l.open)),close:BT(n,GT(l.close))}):VT(n,"every element in the 'brackets' array must be a '{open,close,token}' object or array")}return n.brackets=a,n.noThrow=!0,n}(e,t),i=function(e,t,n,i){return new sE(e,t,n,i)}(_T.modeService.get(),_T.standaloneThemeService.get(),e,n);return No.dG.register(e,i)},registerReferenceProvider:function(e,t){return No.aW.register(e,t)},registerRenameProvider:function(e,t){return No.rN.register(e,t)},registerCompletionItemProvider:function(e,t){var n=new dE(t);return No.er.register(e,{triggerCharacters:t.triggerCharacters,provideCompletionItems:function(e,t,i,o){return n.provideCompletionItems(e,t,i,o)},resolveCompletionItem:function(e,t,i,o){return n.resolveCompletionItem(e,t,i,o)}})},registerSignatureHelpProvider:function(e,t){return No.An.register(e,t)},registerHoverProvider:function(e,t){return No.r8.register(e,{provideHover:function(e,n,i){var o=e.getWordAtPosition(n);return dt(t.provideHover(e,n,i)).then((function(e){if(e)return!e.range&&o&&(e.range=new s.Q(n.lineNumber,o.startColumn,n.lineNumber,o.endColumn)),e.range||(e.range=new s.Q(n.lineNumber,n.column,n.lineNumber,n.column)),e}))}})},registerDocumentSymbolProvider:function(e,t){return No.Wd.register(e,t)},registerDocumentHighlightProvider:function(e,t){return No.UG.register(e,t)},registerDefinitionProvider:function(e,t){return No.UU.register(e,t)},registerImplementationProvider:function(e,t){return No.Lh.register(e,t)},registerTypeDefinitionProvider:function(e,t){return No.ce.register(e,t)},registerCodeLensProvider:function(e,t){return No.qh.register(e,t)},registerCodeActionProvider:function(e,t){return No.iM.register(e,{provideCodeActions:function(e,n,i,o){var r=_T.markerService.get().read({resource:e.uri}).filter((function(e){return s.Q.areIntersectingOrTouching(e,n)}));return t.provideCodeActions(e,n,{markers:r,only:i.only},o)}})},registerDocumentFormattingEditProvider:function(e,t){return No.NQ.register(e,t)},registerDocumentRangeFormattingEditProvider:function(e,t){return No.CW.register(e,t)},registerOnTypeFormattingEditProvider:function(e,t){return No.x4.register(e,t)},registerLinkProvider:function(e,t){return No.N9.register(e,t)},registerColorProvider:function(e,t){return No.Yu.register(e,t)},registerFoldingRangeProvider:function(e,t){return No.Z8.register(e,t)},DocumentHighlightKind:No.Kb,CompletionItemKind:uE,SymbolKind:No.v0,IndentAction:Qe.l,SuggestTriggerKind:No.tS,FoldingRangeKind:No.lO};var mE=gE.CancellationTokenSource,vE=gE.Emitter,yE=gE.KeyCode,bE=gE.KeyMod,_E=gE.Position,wE=gE.Range,ME=gE.Selection,CE=gE.SelectionDirection,SE=gE.MarkerSeverity,LE=gE.MarkerTag,IE=gE.Promise,NE=gE.Uri,xE=gE.Token,DE=gE.editor,kE=gE.languages;pE.monaco=gE,void 0!==pE.require&&"function"==typeof pE.require.config&&pE.require.config({ignoreDuplicateModules:["vscode-languageserver-types","vscode-languageserver-types/main","vscode-nls","vscode-nls/vscode-nls","jsonc-parser","jsonc-parser/main","vscode-uri","vscode-uri/index"]})},486:(e,t,n)=>{"use strict";function i(e,t){for(var n=[],i=2;ii})},4264:(e,t,n)=>{"use strict";var i;n.d(t,{_$:()=>i,_Y:()=>o,lq:()=>a,u1:()=>s}),function(e){e.serviceIds=new Map,e.DI_TARGET="$di$target",e.DI_DEPENDENCIES="$di$dependencies",e.getServiceDependencies=function(t){return t[e.DI_DEPENDENCIES]||[]}}(i||(i={}));var o=s("instantiationService");function r(e,t,n,o){t[i.DI_TARGET]===t?t[i.DI_DEPENDENCIES].push({id:e,index:n,optional:o}):(t[i.DI_DEPENDENCIES]=[{id:e,index:n,optional:o}],t[i.DI_TARGET]=t)}function s(e){if(i.serviceIds.has(e))return i.serviceIds.get(e);var t=function(e,n,i){if(3!==arguments.length)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");r(t,e,i,!1)};return t.toString=function(){return e},i.serviceIds.set(e,t),t}function a(e){return function(t,n,i){if(3!==arguments.length)throw new Error("@optional-decorator can only be used to decorate a parameter");r(e,t,i,!0)}}},7999:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(7850),o=n(8361);t.createConnection=function(e,t,n){return e.onError((function(e){t(e[0],e[1],e[2])})),e.onClose(n),{listen:function(){return e.listen()},sendRequest:function(t){for(var n=[],i=1;i{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(1175),o=function(){function e(){this.channels=new Map}return e.prototype.showMessage=function(e,t){for(var n=[],o=2;o{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(1175);t.Disposable=i.Disposable;var o=function(){function e(){this.disposables=[]}return e.prototype.dispose=function(){for(;0!==this.disposables.length;)this.disposables.pop().dispose()},e.prototype.push=function(e){var t=this.disposables;return t.push(e),{dispose:function(){var n=t.indexOf(e);-1!==n&&t.splice(n,1)}}},e}();t.DisposableCollection=o},9891:(e,t,n)=>{"use strict";function i(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}Object.defineProperty(t,"__esModule",{value:!0}),i(n(7861)),i(n(1175)),i(n(7999)),i(n(1871)),i(n(2239)),i(n(2407)),i(n(8130)),i(n(4960)),i(n(9209)),i(n(6877))},2239:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e){this.editor=e}return e.prototype.registerCommand=function(e,t,n){return this.editor._commandService.addCommand({id:e,handler:function(e){for(var n=[],i=1;i{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(7861),o=function(){function e(e,t){this.name=e,this.p2m=t,this.diagnostics=new Map,this.toDispose=new i.DisposableCollection}return e.prototype.dispose=function(){this.toDispose.dispose()},e.prototype.get=function(e){var t=this.diagnostics.get(e);return t?t.diagnostics:[]},e.prototype.set=function(e,t){var n=this,o=this.diagnostics.get(e);if(o)o.diagnostics=t;else{var s=new r(e,t,this.name,this.p2m);this.diagnostics.set(e,s),this.toDispose.push(i.Disposable.create((function(){n.diagnostics.delete(e),s.dispose()})))}},e}();t.MonacoDiagnosticCollection=o;var r=function(){function e(e,t,n,i){var o=this;this.owner=n,this.p2m=i,this._markers=[],this._diagnostics=[],this.uri=monaco.Uri.parse(e),this.diagnostics=t,monaco.editor.onDidCreateModel((function(e){return o.doUpdateModelMarkers(e)}))}return Object.defineProperty(e.prototype,"diagnostics",{get:function(){return this._diagnostics},set:function(e){this._diagnostics=e,this._markers=this.p2m.asDiagnostics(e),this.updateModelMarkers()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"markers",{get:function(){return this._markers},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){this._markers=[],this.updateModelMarkers()},e.prototype.updateModelMarkers=function(){var e=monaco.editor.getModel(this.uri);this.doUpdateModelMarkers(e)},e.prototype.doUpdateModelMarkers=function(e){e&&this.uri.toString()===e.uri.toString()&&monaco.editor.setModelMarkers(e,this.owner,this._markers)},e}();t.MonacoModelDiagnostics=r},1871:function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=function(e,t){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},i(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var r=n(2947),s=n(1585),a=n(2117),u=n(4868),l=n(8822),c=n(222);!function(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}(n(2947));var h=function(e){function t(n){var i=n.id,o=n.name,r=n.clientOptions,s=n.connectionProvider,a=e.call(this,i||o.toLowerCase(),o,r)||this;a.connectionProvider=s,a.createConnection=a.doCreateConnection.bind(a);var u=a;return u._p2c=new Proxy(u._p2c,{get:function(e,n){return"asUri"===n?e[n]:t.bypassConversion}}),u._c2p=new Proxy(u._c2p,{get:function(e,n){return"asUri"===n?e[n]:"asCompletionParams"===n?function(t,n,i){return{textDocument:e.asTextDocumentIdentifier(t),position:n,context:i}}:"asWillSaveTextDocumentParams"===n?function(t){return{textDocument:e.asTextDocumentIdentifier(t.document),reason:t.reason}}:n.endsWith("Params")?e[n]:t.bypassConversion}}),a}return o(t,e),t.prototype.doCreateConnection=function(){var e=this.handleConnectionError.bind(this),t=this.handleConnectionClosed.bind(this);return this.connectionProvider.get(e,t,this.outputChannel)},t.prototype.createMessageTransports=function(e){throw new Error("Unsupported")},t.prototype.registerBuiltinFeatures=function(){e.prototype.registerBuiltinFeatures.call(this),this.registerFeature(new s.TypeDefinitionFeature(this)),this.registerFeature(new a.ImplementationFeature(this)),this.registerFeature(new u.ColorProviderFeature(this)),this.registerFeature(new l.WorkspaceFoldersFeature(this));var n=new c.FoldingRangeFeature(this);n.asFoldingRanges=t.bypassConversion,this.registerFeature(n)},t.bypassConversion=function(e){return e||void 0},t}(r.BaseLanguageClient);t.MonacoLanguageClient=h},8130:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i,o=n(4922),r=n(1175),s=n(459),a=n(7861);function u(e,t){return o(e,{extended:!0,globstar:!0}).test(t)}function l(){for(var e=[],t=0,n=monaco.languages.getLanguages().map((function(e){return e.id}));t{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(6877),o=n(2239),r=n(8130),s=n(4960),a=n(2407),u=n(1175);!function(e){function t(e,t){void 0===t&&(t={});var n=new i.MonacoToProtocolConverter,u=new i.ProtocolToMonacoConverter;return{commands:new o.MonacoCommands(e),languages:new r.MonacoLanguages(u,n),workspace:new s.MonacoWorkspace(u,n,t.rootUri),window:new a.ConsoleWindow}}e.create=t,e.install=function(e,n){void 0===n&&(n={});var i=t(e,n);return u.Services.install(i),i},e.get=function(){return u.Services.get()}}(t.MonacoServices||(t.MonacoServices={}))},4960:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(1175),o=function(){function e(e,t,n){void 0===n&&(n=null);var o=this;this.p2m=e,this.m2p=t,this._rootUri=n,this.documents=new Map,this.onDidOpenTextDocumentEmitter=new i.Emitter,this.onDidCloseTextDocumentEmitter=new i.Emitter,this.onDidChangeTextDocumentEmitter=new i.Emitter;for(var r=0,s=monaco.editor.getModels();r{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i,o=n(7850),r=n(9204);t.Disposable=r.Disposable,t.CancellationToken=r.CancellationToken,t.Event=r.Event,t.Emitter=r.Emitter,function(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}(n(7850)),function(e){var t=window,n=Symbol("Services");e.get=function(){var e=t[n];if(!e)throw new Error("Language Client services has not been installed");return e},e.install=function(e){t[n]&&console.error(new Error("Language Client services has been overriden")),t[n]=e}}(t.Services||(t.Services={})),t.isDocumentSelector=function(e){return!(!e||!Array.isArray(e))&&e.every((function(e){return"string"==typeof e||o.DocumentFilter.is(e)}))},(t.DocumentIdentifier||(t.DocumentIdentifier={})).is=function(e){return!!e&&"uri"in e&&"languageId"in e},(i=t.ConfigurationTarget||(t.ConfigurationTarget={}))[i.Global=1]="Global",i[i.Workspace=2]="Workspace",i[i.WorkspaceFolder=3]="WorkspaceFolder"},8316:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(o,r){function s(e){try{u(i.next(e))}catch(e){r(e)}}function a(e){try{u(i.throw(e))}catch(e){r(e)}}function u(e){e.done?o(e.value):new n((function(t){t(e.value)})).then(s,a)}u((i=i.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,i,o,r,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return r={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function a(r){return function(a){return function(r){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,i&&(o=2&r[0]?i.return:r[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,r[1])).done)return o;switch(i=0,o&&(r=[2&r[0],o.value]),r[0]){case 0:case 1:o=r;break;case 4:return s.label++,{value:r[1],done:!1};case 5:s.label++,i=r[1],r=[0];continue;case 7:r=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==r[0]&&2!==r[0])){s=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]{"use strict";var i=n(8316),o=n(1175);e.exports=i.createVSCodeApi(o.Services.get)},1134:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i,o=n(712),r=n(3717);!function(e){e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:o.Event.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:o.Event.None}),e.is=function(t){var n=t;return n&&(n===e.None||n===e.Cancelled||r.boolean(n.isCancellationRequested)&&!!n.onCancellationRequested)}}(i=t.CancellationToken||(t.CancellationToken={}));var s=Object.freeze((function(e,t){var n=setTimeout(e.bind(t),0);return{dispose:function(){clearTimeout(n)}}})),a=function(){function e(){this._isCancelled=!1}return e.prototype.cancel=function(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this._emitter=void 0))},Object.defineProperty(e.prototype,"isCancellationRequested",{get:function(){return this._isCancelled},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onCancellationRequested",{get:function(){return this._isCancelled?s:(this._emitter||(this._emitter=new o.Emitter),this._emitter.event)},enumerable:!0,configurable:!0}),e}(),u=function(){function e(){}return Object.defineProperty(e.prototype,"token",{get:function(){return this._token||(this._token=new a),this._token},enumerable:!0,configurable:!0}),e.prototype.cancel=function(){this._token?this._token.cancel():this._token=i.Cancelled},e.prototype.dispose=function(){this.cancel()},e}();t.CancellationTokenSource=u},712:(e,t)=>{"use strict";var n,i;Object.defineProperty(t,"__esModule",{value:!0}),(t.Disposable||(t.Disposable={})).create=function(e){return{dispose:e}},n=t.Event||(t.Event={}),i={dispose:function(){}},n.None=function(){return i};var o=function(){function e(){}return e.prototype.add=function(e,t,n){var i=this;void 0===t&&(t=null),this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(e),this._contexts.push(t),Array.isArray(n)&&n.push({dispose:function(){return i.remove(e,t)}})},e.prototype.remove=function(e,t){if(void 0===t&&(t=null),this._callbacks){for(var n=!1,i=0,o=this._callbacks.length;i{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=Object.prototype.toString;function i(e){return"[object String]"===n.call(e)}function o(e){return Array.isArray(e)}t.boolean=function(e){return!0===e||!1===e},t.string=i,t.number=function(e){return"[object Number]"===n.call(e)},t.error=function(e){return"[object Error]"===n.call(e)},t.func=function(e){return"[object Function]"===n.call(e)},t.array=o,t.stringArray=function(e){return o(e)&&e.every((function(e){return i(e)}))}},9316:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.None=0,e.First=1,e.Last=2}(n=t.Touch||(t.Touch={}));var i=function(){function e(){this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0}return e.prototype.clear=function(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0},e.prototype.isEmpty=function(){return!this._head&&!this._tail},Object.defineProperty(e.prototype,"size",{get:function(){return this._size},enumerable:!0,configurable:!0}),e.prototype.has=function(e){return this._map.has(e)},e.prototype.get=function(e){var t=this._map.get(e);if(t)return t.value},e.prototype.set=function(e,t,i){void 0===i&&(i=n.None);var o=this._map.get(e);if(o)o.value=t,i!==n.None&&this.touch(o,i);else{switch(o={key:e,value:t,next:void 0,previous:void 0},i){case n.None:this.addItemLast(o);break;case n.First:this.addItemFirst(o);break;case n.Last:default:this.addItemLast(o)}this._map.set(e,o),this._size++}},e.prototype.delete=function(e){var t=this._map.get(e);return!!t&&(this._map.delete(e),this.removeItem(t),this._size--,!0)},e.prototype.shift=function(){if(this._head||this._tail){if(!this._head||!this._tail)throw new Error("Invalid list");var e=this._head;return this._map.delete(e.key),this.removeItem(e),this._size--,e.value}},e.prototype.forEach=function(e,t){for(var n=this._head;n;)t?e.bind(t)(n.value,n.key,this):e(n.value,n.key,this),n=n.next},e.prototype.forEachReverse=function(e,t){for(var n=this._tail;n;)t?e.bind(t)(n.value,n.key,this):e(n.value,n.key,this),n=n.previous},e.prototype.values=function(){for(var e=[],t=this._head;t;)e.push(t.value),t=t.next;return e},e.prototype.keys=function(){for(var e=[],t=this._head;t;)e.push(t.key),t=t.next;return e},e.prototype.addItemFirst=function(e){if(this._head||this._tail){if(!this._head)throw new Error("Invalid list");e.next=this._head,this._head.previous=e}else this._tail=e;this._head=e},e.prototype.addItemLast=function(e){if(this._head||this._tail){if(!this._tail)throw new Error("Invalid list");e.previous=this._tail,this._tail.next=e}else this._head=e;this._tail=e},e.prototype.removeItem=function(e){if(e===this._head&&e===this._tail)this._head=void 0,this._tail=void 0;else if(e===this._head)this._head=e.next;else if(e===this._tail)this._tail=e.previous;else{var t=e.next,n=e.previous;if(!t||!n)throw new Error("Invalid list");t.previous=n,n.next=t}},e.prototype.touch=function(e,t){if(!this._head||!this._tail)throw new Error("Invalid list");if(t===n.First||t===n.Last)if(t===n.First){if(e===this._head)return;var i=e.next,o=e.previous;e===this._tail?(o.next=void 0,this._tail=o):(i.previous=o,o.next=i),e.previous=void 0,e.next=this._head,this._head.previous=e,this._head=e}else if(t===n.Last){if(e===this._tail)return;i=e.next,o=e.previous,e===this._head?(i.previous=void 0,this._head=i):(i.previous=o,o.next=i),e.next=void 0,e.previous=this._tail,this._tail.next=e,this._tail=e}},e}();t.LinkedMap=i},9204:function(e,t,n){"use strict";var i,o=n(7188).setImmedate,r=this&&this.__extends||(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});function s(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}Object.defineProperty(t,"__esModule",{value:!0});var a=n(3717),u=n(3997);t.RequestType=u.RequestType,t.RequestType0=u.RequestType0,t.RequestType1=u.RequestType1,t.RequestType2=u.RequestType2,t.RequestType3=u.RequestType3,t.RequestType4=u.RequestType4,t.RequestType5=u.RequestType5,t.RequestType6=u.RequestType6,t.RequestType7=u.RequestType7,t.RequestType8=u.RequestType8,t.RequestType9=u.RequestType9,t.ResponseError=u.ResponseError,t.ErrorCodes=u.ErrorCodes,t.NotificationType=u.NotificationType,t.NotificationType0=u.NotificationType0,t.NotificationType1=u.NotificationType1,t.NotificationType2=u.NotificationType2,t.NotificationType3=u.NotificationType3,t.NotificationType4=u.NotificationType4,t.NotificationType5=u.NotificationType5,t.NotificationType6=u.NotificationType6,t.NotificationType7=u.NotificationType7,t.NotificationType8=u.NotificationType8,t.NotificationType9=u.NotificationType9;var l=n(9177);t.MessageReader=l.MessageReader,t.StreamMessageReader=l.StreamMessageReader,t.IPCMessageReader=l.IPCMessageReader,t.SocketMessageReader=l.SocketMessageReader;var c=n(2677);t.MessageWriter=c.MessageWriter,t.StreamMessageWriter=c.StreamMessageWriter,t.IPCMessageWriter=c.IPCMessageWriter,t.SocketMessageWriter=c.SocketMessageWriter;var h=n(712);t.Disposable=h.Disposable,t.Event=h.Event,t.Emitter=h.Emitter;var d=n(1134);t.CancellationTokenSource=d.CancellationTokenSource,t.CancellationToken=d.CancellationToken;var f,p,g,m,v,y=n(9316);s(n(7706)),s(n(8578)),function(e){e.type=new u.NotificationType("$/cancelRequest")}(f||(f={})),t.NullLogger=Object.freeze({error:function(){},warn:function(){},info:function(){},log:function(){}}),function(e){e[e.Off=0]="Off",e[e.Messages=1]="Messages",e[e.Verbose=2]="Verbose"}(p=t.Trace||(t.Trace={})),function(e){e.fromString=function(t){switch(t=t.toLowerCase()){case"off":default:return e.Off;case"messages":return e.Messages;case"verbose":return e.Verbose}},e.toString=function(t){switch(t){case e.Off:return"off";case e.Messages:return"messages";case e.Verbose:return"verbose";default:return"off"}}}(p=t.Trace||(t.Trace={})),function(e){e.type=new u.NotificationType("$/setTraceNotification")}(g=t.SetTraceNotification||(t.SetTraceNotification={})),function(e){e.type=new u.NotificationType("$/logTraceNotification")}(m=t.LogTraceNotification||(t.LogTraceNotification={})),function(e){e[e.Closed=1]="Closed",e[e.Disposed=2]="Disposed",e[e.AlreadyListening=3]="AlreadyListening"}(v=t.ConnectionErrors||(t.ConnectionErrors={}));var b,_=function(e){function t(n,i){var o=e.call(this,i)||this;return o.code=n,Object.setPrototypeOf(o,t.prototype),o}return r(t,e),t}(Error);function w(e,t,n,i){var r,s,l=0,c=0,w=0,M="2.0",C=void 0,S=Object.create(null),L=void 0,I=Object.create(null),N=new y.LinkedMap,x=Object.create(null),D=Object.create(null),k=p.Off,T=b.New,E=new h.Emitter,A=new h.Emitter,j=new h.Emitter,O=new h.Emitter;function R(e){return"req-"+e.toString()}function P(e){}function z(){return T===b.Listening}function W(){return T===b.Closed}function F(){return T===b.Disposed}function B(){T!==b.New&&T!==b.Listening||(T=b.Closed,A.fire(void 0))}function H(){r||0===N.size||(r=o((function(){r=void 0,function(){if(0!==N.size){var e=N.shift();try{u.isRequestMessage(e)?function(e){if(!F()){!function(e){if(k!==p.Off&&s){var t=void 0;k===p.Verbose&&e.params&&(t="Params: "+JSON.stringify(e.params,null,4)+"\n\n"),s.log("Received request '"+e.method+" - ("+e.id+")'.",t)}}(e);var n,i,o=S[e.method];o&&(n=o.type,i=o.handler);var r=Date.now();if(i||C){var l=new d.CancellationTokenSource,c=String(e.id);D[c]=l;try{var h,f=h=void 0===e.params||void 0!==n&&0===n.numberOfParams?i?i(l.token):C(e.method,l.token):a.array(e.params)&&(void 0===n||n.numberOfParams>1)?i?i.apply(void 0,e.params.concat([l.token])):C.apply(void 0,[e.method].concat(e.params,[l.token])):i?i(e.params,l.token):C(e.method,e.params,l.token);h?f.then?f.then((function(t){delete D[c],g(t,e.method,r)}),(function(t){delete D[c],t instanceof u.ResponseError?m(t,e.method,r):t&&a.string(t.message)?m(new u.ResponseError(u.ErrorCodes.InternalError,"Request "+e.method+" failed with message: "+t.message),e.method,r):m(new u.ResponseError(u.ErrorCodes.InternalError,"Request "+e.method+" failed unexpectedly without providing any details."),e.method,r)})):(delete D[c],g(h,e.method,r)):(delete D[c],function(n,i,o){void 0===n&&(n=null);var r={jsonrpc:M,id:e.id,result:n};U(r,i,o),t.write(r)}(h,e.method,r))}catch(t){delete D[c],t instanceof u.ResponseError?g(t,e.method,r):t&&a.string(t.message)?m(new u.ResponseError(u.ErrorCodes.InternalError,"Request "+e.method+" failed with message: "+t.message),e.method,r):m(new u.ResponseError(u.ErrorCodes.InternalError,"Request "+e.method+" failed unexpectedly without providing any details."),e.method,r)}}else m(new u.ResponseError(u.ErrorCodes.MethodNotFound,"Unhandled method "+e.method),e.method,r)}function g(n,i,o){var r={jsonrpc:M,id:e.id};n instanceof u.ResponseError?r.error=n.toJson():r.result=void 0===n?null:n,U(r,i,o),t.write(r)}function m(n,i,o){var r={jsonrpc:M,id:e.id,error:n.toJson()};U(r,i,o),t.write(r)}}(e):u.isNotificationMessage(e)?function(e){if(!F()){var t,i=void 0;if(e.method===f.type.method)t=function(e){var t=e.id,n=D[String(t)];n&&n.cancel()};else{var o=I[e.method];o&&(t=o.handler,i=o.type)}if(t||L)try{!function(e){if(k!==p.Off&&s&&e.method!==m.type.method){var t=void 0;k===p.Verbose&&(t=e.params?"Params: "+JSON.stringify(e.params,null,4)+"\n\n":"No parameters provided.\n\n"),s.log("Received notification '"+e.method+"'.",t)}}(e),void 0===e.params||void 0!==i&&0===i.numberOfParams?t?t():L(e.method):a.array(e.params)&&(void 0===i||i.numberOfParams>1)?t?t.apply(void 0,e.params):L.apply(void 0,[e.method].concat(e.params)):t?t(e.params):L(e.method,e.params)}catch(t){t.message?n.error("Notification handler '"+e.method+"' failed with message: "+t.message):n.error("Notification handler '"+e.method+"' failed unexpectedly.")}else j.fire(e)}}(e):u.isResponseMessage(e)?function(e){if(!F())if(null===e.id)e.error?n.error("Received response message without id: Error is: \n"+JSON.stringify(e.error,void 0,4)):n.error("Received response message without id. No further error information provided.");else{var t=String(e.id),i=x[t];if(function(e,t){if(k!==p.Off&&s){var n=void 0;if(k===p.Verbose&&(e.error&&e.error.data?n="Error data: "+JSON.stringify(e.error.data,null,4)+"\n\n":e.result?n="Result: "+JSON.stringify(e.result,null,4)+"\n\n":void 0===e.error&&(n="No result returned.\n\n")),t){var i=e.error?" Request failed: "+e.error.message+" ("+e.error.code+").":"";s.log("Received response '"+t.method+" - ("+e.id+")' in "+(Date.now()-t.timerStart)+"ms."+i,n)}else s.log("Received response "+e.id+" without active response promise.",n)}}(e,i),i){delete x[t];try{if(e.error){var o=e.error;i.reject(new u.ResponseError(o.code,o.message,o.data))}else{if(void 0===e.result)throw new Error("Should never happen.");i.resolve(e.result)}}catch(o){o.message?n.error("Response handler '"+i.method+"' failed with message: "+o.message):n.error("Response handler '"+i.method+"' failed unexpectedly.")}}}}(e):function(e){if(e){n.error("Received message which is neither a response nor a notification message:\n"+JSON.stringify(e,null,4));var t=e;if(a.string(t.id)||a.number(t.id)){var i=String(t.id),o=x[i];o&&o.reject(new Error("The received response has neither a result nor an error property."))}}else n.error("Received empty message.")}(e)}finally{H()}}}()})))}e.onClose(B),e.onError((function(e){E.fire([e,void 0,void 0])})),t.onClose(B),t.onError((function(e){E.fire(e)}));var V=function(e){try{if(u.isNotificationMessage(e)&&e.method===f.type.method){var n=R(e.params.id),o=N.get(n);if(u.isRequestMessage(o)){var r=i&&i.cancelUndispatched?i.cancelUndispatched(o,P):void 0;if(r&&(void 0!==r.error||void 0!==r.result))return N.delete(n),r.id=o.id,U(r,e.method,Date.now()),void t.write(r)}}!function(e,t){var n;u.isRequestMessage(t)?e.set(R(t.id),t):u.isResponseMessage(t)?e.set(null===(n=t.id)?"res-unknown-"+(++w).toString():"res-"+n.toString(),t):e.set("not-"+(++c).toString(),t)}(N,e)}finally{H()}};function U(e,t,n){if(k!==p.Off&&s){var i=void 0;k===p.Verbose&&(e.error&&e.error.data?i="Error data: "+JSON.stringify(e.error.data,null,4)+"\n\n":e.result?i="Result: "+JSON.stringify(e.result,null,4)+"\n\n":void 0===e.error&&(i="No result returned.\n\n")),s.log("Sending response '"+t+" - ("+e.id+")'. Processing request took "+(Date.now()-n)+"ms",i)}}function Y(){if(W())throw new _(v.Closed,"Connection is closed.");if(F())throw new _(v.Disposed,"Connection is disposed.")}function Z(e){return void 0===e?null:e}function G(e,t){var n,i=e.numberOfParams;switch(i){case 0:n=null;break;case 1:n=Z(t[0]);break;default:n=[];for(var o=0;o=t.length)t.copy(this.buffer,this.index,0,t.length);else{var r=(Math.ceil((this.index+t.length)/u)+1)*u;0===this.index?(this.buffer=new o(r),t.copy(this.buffer,0,0,t.length)):this.buffer=o.concat([this.buffer.slice(0,this.index),t],r)}this.index+=t.length},e.prototype.tryReadHeaders=function(){for(var e=void 0,t=0;t+3=this.index)return e;e=Object.create(null),this.buffer.toString("ascii",0,t).split("\r\n").forEach((function(t){var n=t.indexOf(":");if(-1===n)throw new Error("Message header must separate key and value using :");var i=t.substr(0,n),o=t.substr(n+1).trim();e[i]=o}));var n=t+4;return this.buffer=this.buffer.slice(n),this.index=this.index-n,e},e.prototype.tryReadContent=function(e){if(this.index0&&t.doWriteMessage(t.queue.shift())})))}catch(t){this.errorCount++,this.fireError(t,e,this.errorCount)}},t}(c);t.IPCMessageWriter=d;var f=function(e){function t(t,n){void 0===n&&(n="utf8");var i=e.call(this)||this;return i.socket=t,i.queue=[],i.sending=!1,i.encoding=n,i.errorCount=0,i.socket.on("error",(function(e){return i.fireError(e)})),i.socket.on("close",(function(){return i.fireClose()})),i}return r(t,e),t.prototype.write=function(e){this.sending||0!==this.queue.length?this.queue.push(e):this.doWriteMessage(e)},t.prototype.doWriteMessage=function(e){var t=this,n=JSON.stringify(e),i=o.byteLength(n,this.encoding),r=[u,i.toString(),l,l];try{this.sending=!0,this.socket.write(r.join(""),"ascii",(function(i){i&&t.handleError(i,e);try{t.socket.write(n,t.encoding,(function(n){t.sending=!1,n?t.handleError(n,e):t.errorCount=0,t.queue.length>0&&t.doWriteMessage(t.queue.shift())}))}catch(i){t.handleError(i,e)}}))}catch(t){this.handleError(t,e)}},t.prototype.handleError=function(e,t){this.errorCount++,this.fireError(e,t,this.errorCount)},t}(c);t.SocketMessageWriter=f},3997:function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var r,s=n(3717);!function(e){e.ParseError=-32700,e.InvalidRequest=-32600,e.MethodNotFound=-32601,e.InvalidParams=-32602,e.InternalError=-32603,e.serverErrorStart=-32099,e.serverErrorEnd=-32e3,e.ServerNotInitialized=-32002,e.UnknownErrorCode=-32001,e.RequestCancelled=-32800,e.MessageWriteError=1,e.MessageReadError=2}(r=t.ErrorCodes||(t.ErrorCodes={}));var a=function(e){function t(n,i,o){var a=e.call(this,i)||this;return a.code=s.number(n)?n:r.UnknownErrorCode,a.data=o,Object.setPrototypeOf(a,t.prototype),a}return o(t,e),t.prototype.toJson=function(){return{code:this.code,message:this.message,data:this.data}},t}(Error);t.ResponseError=a;var u=function(){function e(e,t){this._method=e,this._numberOfParams=t}return Object.defineProperty(e.prototype,"method",{get:function(){return this._method},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"numberOfParams",{get:function(){return this._numberOfParams},enumerable:!0,configurable:!0}),e}();t.AbstractMessageType=u;var l=function(e){function t(t){var n=e.call(this,t,0)||this;return n._=void 0,n}return o(t,e),t}(u);t.RequestType0=l;var c=function(e){function t(t){var n=e.call(this,t,1)||this;return n._=void 0,n}return o(t,e),t}(u);t.RequestType=c;var h=function(e){function t(t){var n=e.call(this,t,1)||this;return n._=void 0,n}return o(t,e),t}(u);t.RequestType1=h;var d=function(e){function t(t){var n=e.call(this,t,2)||this;return n._=void 0,n}return o(t,e),t}(u);t.RequestType2=d;var f=function(e){function t(t){var n=e.call(this,t,3)||this;return n._=void 0,n}return o(t,e),t}(u);t.RequestType3=f;var p=function(e){function t(t){var n=e.call(this,t,4)||this;return n._=void 0,n}return o(t,e),t}(u);t.RequestType4=p;var g=function(e){function t(t){var n=e.call(this,t,5)||this;return n._=void 0,n}return o(t,e),t}(u);t.RequestType5=g;var m=function(e){function t(t){var n=e.call(this,t,6)||this;return n._=void 0,n}return o(t,e),t}(u);t.RequestType6=m;var v=function(e){function t(t){var n=e.call(this,t,7)||this;return n._=void 0,n}return o(t,e),t}(u);t.RequestType7=v;var y=function(e){function t(t){var n=e.call(this,t,8)||this;return n._=void 0,n}return o(t,e),t}(u);t.RequestType8=y;var b=function(e){function t(t){var n=e.call(this,t,9)||this;return n._=void 0,n}return o(t,e),t}(u);t.RequestType9=b;var _=function(e){function t(t){var n=e.call(this,t,1)||this;return n._=void 0,n}return o(t,e),t}(u);t.NotificationType=_;var w=function(e){function t(t){var n=e.call(this,t,0)||this;return n._=void 0,n}return o(t,e),t}(u);t.NotificationType0=w;var M=function(e){function t(t){var n=e.call(this,t,1)||this;return n._=void 0,n}return o(t,e),t}(u);t.NotificationType1=M;var C=function(e){function t(t){var n=e.call(this,t,2)||this;return n._=void 0,n}return o(t,e),t}(u);t.NotificationType2=C;var S=function(e){function t(t){var n=e.call(this,t,3)||this;return n._=void 0,n}return o(t,e),t}(u);t.NotificationType3=S;var L=function(e){function t(t){var n=e.call(this,t,4)||this;return n._=void 0,n}return o(t,e),t}(u);t.NotificationType4=L;var I=function(e){function t(t){var n=e.call(this,t,5)||this;return n._=void 0,n}return o(t,e),t}(u);t.NotificationType5=I;var N=function(e){function t(t){var n=e.call(this,t,6)||this;return n._=void 0,n}return o(t,e),t}(u);t.NotificationType6=N;var x=function(e){function t(t){var n=e.call(this,t,7)||this;return n._=void 0,n}return o(t,e),t}(u);t.NotificationType7=x;var D=function(e){function t(t){var n=e.call(this,t,8)||this;return n._=void 0,n}return o(t,e),t}(u);t.NotificationType8=D;var k=function(e){function t(t){var n=e.call(this,t,9)||this;return n._=void 0,n}return o(t,e),t}(u);t.NotificationType9=k,t.isRequestMessage=function(e){var t=e;return t&&s.string(t.method)&&(s.string(t.id)||s.number(t.id))},t.isNotificationMessage=function(e){var t=e;return t&&s.string(t.method)&&void 0===e.id},t.isResponseMessage=function(e){var t=e;return t&&(void 0!==t.result||!!t.error)&&(s.string(t.id)||s.number(t.id)||null===t.id)}},7706:(e,t,n)=>{"use strict";var i=n(8957);Object.defineProperty(t,"__esModule",{value:!0});var o=n(4708),r=n(2935),s=n(5314),a=n(8489),u=n(9177),l=n(2677);t.generateRandomPipeName=function(){var e=s.randomBytes(21).toString("hex");return"win32"===i.platform?"\\\\.\\pipe\\vscode-jsonrpc-"+e+"-sock":o.join(r.tmpdir(),"vscode-"+e+".sock")},t.createClientPipeTransport=function(e,t){var n;void 0===t&&(t="utf-8");var i=new Promise((function(e,t){n=e}));return new Promise((function(o,r){var s=a.createServer((function(e){s.close(),n([new u.SocketMessageReader(e,t),new l.SocketMessageWriter(e,t)])}));s.on("error",r),s.listen(e,(function(){s.removeListener("error",r),o({onConnected:function(){return i}})}))}))},t.createServerPipeTransport=function(e,t){void 0===t&&(t="utf-8");var n=a.createConnection(e);return[new u.SocketMessageReader(n,t),new l.SocketMessageWriter(n,t)]}},8578:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(8489),o=n(9177),r=n(2677);t.createClientSocketTransport=function(e,t){var n;void 0===t&&(t="utf-8");var s=new Promise((function(e,t){n=e}));return new Promise((function(a,u){var l=i.createServer((function(e){l.close(),n([new o.SocketMessageReader(e,t),new r.SocketMessageWriter(e,t)])}));l.on("error",u),l.listen(e,"127.0.0.1",(function(){l.removeListener("error",u),a({onConnected:function(){return s}})}))}))},t.createServerSocketTransport=function(e,t){void 0===t&&(t="utf-8");var n=i.createConnection(e,"127.0.0.1");return[new o.SocketMessageReader(n,t),new r.SocketMessageWriter(n,t)]}},1655:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Vim=void 0;var i,o=(i=n(5408))&&i.__esModule?i:{default:i};function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}var s=o.default.Pos;function a(e,t){var n=e.state.vim;if(!n||n.insertMode)return t.head;var i=n.sel.head;return i?n.visualBlock&&t.head.line!=i.line?void 0:t.from()!=t.anchor||t.empty()||t.head.line!=i.line||t.head.ch==i.ch?t.head:new s(t.head.line,t.head.ch-1):t.head}var u=[{keys:"",type:"keyToKey",toKeys:"h"},{keys:"",type:"keyToKey",toKeys:"l"},{keys:"",type:"keyToKey",toKeys:"k"},{keys:"",type:"keyToKey",toKeys:"j"},{keys:"g",type:"keyToKey",toKeys:"gk"},{keys:"g",type:"keyToKey",toKeys:"gj"},{keys:"",type:"keyToKey",toKeys:"l"},{keys:"",type:"keyToKey",toKeys:"h",context:"normal"},{keys:"",type:"keyToKey",toKeys:"x",context:"normal"},{keys:"",type:"keyToKey",toKeys:"W"},{keys:"",type:"keyToKey",toKeys:"B",context:"normal"},{keys:"",type:"keyToKey",toKeys:"w"},{keys:"",type:"keyToKey",toKeys:"b",context:"normal"},{keys:"",type:"keyToKey",toKeys:"j"},{keys:"",type:"keyToKey",toKeys:"k"},{keys:"",type:"keyToKey",toKeys:""},{keys:"",type:"keyToKey",toKeys:""},{keys:"",type:"keyToKey",toKeys:"",context:"insert"},{keys:"",type:"keyToKey",toKeys:"",context:"insert"},{keys:"s",type:"keyToKey",toKeys:"cl",context:"normal"},{keys:"s",type:"keyToKey",toKeys:"c",context:"visual"},{keys:"S",type:"keyToKey",toKeys:"cc",context:"normal"},{keys:"S",type:"keyToKey",toKeys:"VdO",context:"visual"},{keys:"",type:"keyToKey",toKeys:"0"},{keys:"",type:"keyToKey",toKeys:"$"},{keys:"",type:"keyToKey",toKeys:""},{keys:"",type:"keyToKey",toKeys:""},{keys:"",type:"keyToKey",toKeys:"j^",context:"normal"},{keys:"",type:"keyToKey",toKeys:"i",context:"normal"},{keys:"",type:"action",action:"toggleOverwrite",context:"insert"},{keys:"H",type:"motion",motion:"moveToTopLine",motionArgs:{linewise:!0,toJumplist:!0}},{keys:"M",type:"motion",motion:"moveToMiddleLine",motionArgs:{linewise:!0,toJumplist:!0}},{keys:"L",type:"motion",motion:"moveToBottomLine",motionArgs:{linewise:!0,toJumplist:!0}},{keys:"h",type:"motion",motion:"moveByCharacters",motionArgs:{forward:!1}},{keys:"l",type:"motion",motion:"moveByCharacters",motionArgs:{forward:!0}},{keys:"j",type:"motion",motion:"moveByLines",motionArgs:{forward:!0,linewise:!0}},{keys:"k",type:"motion",motion:"moveByLines",motionArgs:{forward:!1,linewise:!0}},{keys:"gj",type:"motion",motion:"moveByDisplayLines",motionArgs:{forward:!0}},{keys:"gk",type:"motion",motion:"moveByDisplayLines",motionArgs:{forward:!1}},{keys:"w",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!1}},{keys:"W",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!1,bigWord:!0}},{keys:"e",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!0,inclusive:!0}},{keys:"E",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!0,bigWord:!0,inclusive:!0}},{keys:"b",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1}},{keys:"B",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1,bigWord:!0}},{keys:"ge",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!0,inclusive:!0}},{keys:"gE",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!0,bigWord:!0,inclusive:!0}},{keys:"{",type:"motion",motion:"moveByParagraph",motionArgs:{forward:!1,toJumplist:!0}},{keys:"}",type:"motion",motion:"moveByParagraph",motionArgs:{forward:!0,toJumplist:!0}},{keys:"(",type:"motion",motion:"moveBySentence",motionArgs:{forward:!1}},{keys:")",type:"motion",motion:"moveBySentence",motionArgs:{forward:!0}},{keys:"",type:"motion",motion:"moveByPage",motionArgs:{forward:!0}},{keys:"",type:"motion",motion:"moveByPage",motionArgs:{forward:!1}},{keys:"",type:"motion",motion:"moveByScroll",motionArgs:{forward:!0,explicitRepeat:!0}},{keys:"",type:"motion",motion:"moveByScroll",motionArgs:{forward:!1,explicitRepeat:!0}},{keys:"gg",type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!1,explicitRepeat:!0,linewise:!0,toJumplist:!0}},{keys:"G",type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!0,explicitRepeat:!0,linewise:!0,toJumplist:!0}},{keys:"g$",type:"motion",motion:"moveToEndOfDisplayLine"},{keys:"g^",type:"motion",motion:"moveToStartOfDisplayLine"},{keys:"g0",type:"motion",motion:"moveToStartOfDisplayLine"},{keys:"0",type:"motion",motion:"moveToStartOfLine"},{keys:"^",type:"motion",motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:"+",type:"motion",motion:"moveByLines",motionArgs:{forward:!0,toFirstChar:!0}},{keys:"-",type:"motion",motion:"moveByLines",motionArgs:{forward:!1,toFirstChar:!0}},{keys:"_",type:"motion",motion:"moveByLines",motionArgs:{forward:!0,toFirstChar:!0,repeatOffset:-1}},{keys:"$",type:"motion",motion:"moveToEol",motionArgs:{inclusive:!0}},{keys:"%",type:"motion",motion:"moveToMatchedSymbol",motionArgs:{inclusive:!0,toJumplist:!0}},{keys:"f",type:"motion",motion:"moveToCharacter",motionArgs:{forward:!0,inclusive:!0}},{keys:"F",type:"motion",motion:"moveToCharacter",motionArgs:{forward:!1}},{keys:"t",type:"motion",motion:"moveTillCharacter",motionArgs:{forward:!0,inclusive:!0}},{keys:"T",type:"motion",motion:"moveTillCharacter",motionArgs:{forward:!1}},{keys:";",type:"motion",motion:"repeatLastCharacterSearch",motionArgs:{forward:!0}},{keys:",",type:"motion",motion:"repeatLastCharacterSearch",motionArgs:{forward:!1}},{keys:"'",type:"motion",motion:"goToMark",motionArgs:{toJumplist:!0,linewise:!0}},{keys:"`",type:"motion",motion:"goToMark",motionArgs:{toJumplist:!0}},{keys:"]`",type:"motion",motion:"jumpToMark",motionArgs:{forward:!0}},{keys:"[`",type:"motion",motion:"jumpToMark",motionArgs:{forward:!1}},{keys:"]'",type:"motion",motion:"jumpToMark",motionArgs:{forward:!0,linewise:!0}},{keys:"['",type:"motion",motion:"jumpToMark",motionArgs:{forward:!1,linewise:!0}},{keys:"]p",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!0,isEdit:!0,matchIndent:!0}},{keys:"[p",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!1,isEdit:!0,matchIndent:!0}},{keys:"]",type:"motion",motion:"moveToSymbol",motionArgs:{forward:!0,toJumplist:!0}},{keys:"[",type:"motion",motion:"moveToSymbol",motionArgs:{forward:!1,toJumplist:!0}},{keys:"|",type:"motion",motion:"moveToColumn"},{keys:"o",type:"motion",motion:"moveToOtherHighlightedEnd",context:"visual"},{keys:"O",type:"motion",motion:"moveToOtherHighlightedEnd",motionArgs:{sameLine:!0},context:"visual"},{keys:"d",type:"operator",operator:"delete"},{keys:"y",type:"operator",operator:"yank"},{keys:"c",type:"operator",operator:"change"},{keys:"=",type:"operator",operator:"indentAuto"},{keys:">",type:"operator",operator:"indent",operatorArgs:{indentRight:!0}},{keys:"<",type:"operator",operator:"indent",operatorArgs:{indentRight:!1}},{keys:"g~",type:"operator",operator:"changeCase"},{keys:"gu",type:"operator",operator:"changeCase",operatorArgs:{toLower:!0},isEdit:!0},{keys:"gU",type:"operator",operator:"changeCase",operatorArgs:{toLower:!1},isEdit:!0},{keys:"n",type:"motion",motion:"findNext",motionArgs:{forward:!0,toJumplist:!0}},{keys:"N",type:"motion",motion:"findNext",motionArgs:{forward:!1,toJumplist:!0}},{keys:"gn",type:"motion",motion:"findAndSelectNextInclusive",motionArgs:{forward:!0}},{keys:"gN",type:"motion",motion:"findAndSelectNextInclusive",motionArgs:{forward:!1}},{keys:"x",type:"operatorMotion",operator:"delete",motion:"moveByCharacters",motionArgs:{forward:!0},operatorMotionArgs:{visualLine:!1}},{keys:"X",type:"operatorMotion",operator:"delete",motion:"moveByCharacters",motionArgs:{forward:!1},operatorMotionArgs:{visualLine:!0}},{keys:"D",type:"operatorMotion",operator:"delete",motion:"moveToEol",motionArgs:{inclusive:!0},context:"normal"},{keys:"D",type:"operator",operator:"delete",operatorArgs:{linewise:!0},context:"visual"},{keys:"Y",type:"operatorMotion",operator:"yank",motion:"expandToLine",motionArgs:{linewise:!0},context:"normal"},{keys:"Y",type:"operator",operator:"yank",operatorArgs:{linewise:!0},context:"visual"},{keys:"C",type:"operatorMotion",operator:"change",motion:"moveToEol",motionArgs:{inclusive:!0},context:"normal"},{keys:"C",type:"operator",operator:"change",operatorArgs:{linewise:!0},context:"visual"},{keys:"~",type:"operatorMotion",operator:"changeCase",motion:"moveByCharacters",motionArgs:{forward:!0},operatorArgs:{shouldMoveCursor:!0},context:"normal"},{keys:"~",type:"operator",operator:"changeCase",context:"visual"},{keys:"",type:"operatorMotion",operator:"delete",motion:"moveToStartOfLine",context:"insert"},{keys:"",type:"operatorMotion",operator:"delete",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1},context:"insert"},{keys:"",type:"idle",context:"normal"},{keys:"",type:"action",action:"jumpListWalk",actionArgs:{forward:!0}},{keys:"",type:"action",action:"jumpListWalk",actionArgs:{forward:!1}},{keys:"",type:"action",action:"scroll",actionArgs:{forward:!0,linewise:!0}},{keys:"",type:"action",action:"scroll",actionArgs:{forward:!1,linewise:!0}},{keys:"a",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"charAfter"},context:"normal"},{keys:"A",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"eol"},context:"normal"},{keys:"A",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"endOfSelectedArea"},context:"visual"},{keys:"i",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"inplace"},context:"normal"},{keys:"gi",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"lastEdit"},context:"normal"},{keys:"I",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"firstNonBlank"},context:"normal"},{keys:"gI",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"bol"},context:"normal"},{keys:"I",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"startOfSelectedArea"},context:"visual"},{keys:"o",type:"action",action:"newLineAndEnterInsertMode",isEdit:!0,interlaceInsertRepeat:!0,actionArgs:{after:!0},context:"normal"},{keys:"O",type:"action",action:"newLineAndEnterInsertMode",isEdit:!0,interlaceInsertRepeat:!0,actionArgs:{after:!1},context:"normal"},{keys:"v",type:"action",action:"toggleVisualMode"},{keys:"V",type:"action",action:"toggleVisualMode",actionArgs:{linewise:!0}},{keys:"",type:"action",action:"toggleVisualMode",actionArgs:{blockwise:!0}},{keys:"",type:"action",action:"toggleVisualMode",actionArgs:{blockwise:!0}},{keys:"gv",type:"action",action:"reselectLastSelection"},{keys:"J",type:"action",action:"joinLines",isEdit:!0},{keys:"gJ",type:"action",action:"joinLines",actionArgs:{keepSpaces:!0},isEdit:!0},{keys:"p",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!0,isEdit:!0}},{keys:"P",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!1,isEdit:!0}},{keys:"r",type:"action",action:"replace",isEdit:!0},{keys:"@",type:"action",action:"replayMacro"},{keys:"q",type:"action",action:"enterMacroRecordMode"},{keys:"R",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{replace:!0},context:"normal"},{keys:"R",type:"operator",operator:"change",operatorArgs:{linewise:!0,fullLine:!0},context:"visual",exitVisualBlock:!0},{keys:"u",type:"action",action:"undo",context:"normal"},{keys:"u",type:"operator",operator:"changeCase",operatorArgs:{toLower:!0},context:"visual",isEdit:!0},{keys:"U",type:"operator",operator:"changeCase",operatorArgs:{toLower:!1},context:"visual",isEdit:!0},{keys:"",type:"action",action:"redo"},{keys:"m",type:"action",action:"setMark"},{keys:'"',type:"action",action:"setRegister"},{keys:"zz",type:"action",action:"scrollToCursor",actionArgs:{position:"center"}},{keys:"z.",type:"action",action:"scrollToCursor",actionArgs:{position:"center"},motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:"zt",type:"action",action:"scrollToCursor",actionArgs:{position:"top"}},{keys:"z",type:"action",action:"scrollToCursor",actionArgs:{position:"top"},motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:"z-",type:"action",action:"scrollToCursor",actionArgs:{position:"bottom"}},{keys:"zb",type:"action",action:"scrollToCursor",actionArgs:{position:"bottom"},motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:".",type:"action",action:"repeatLastEdit"},{keys:"",type:"action",action:"incrementNumberToken",isEdit:!0,actionArgs:{increase:!0,backtrack:!1}},{keys:"",type:"action",action:"incrementNumberToken",isEdit:!0,actionArgs:{increase:!1,backtrack:!1}},{keys:"",type:"action",action:"indent",actionArgs:{indentRight:!0},context:"insert"},{keys:"",type:"action",action:"indent",actionArgs:{indentRight:!1},context:"insert"},{keys:"a",type:"motion",motion:"textObjectManipulation"},{keys:"i",type:"motion",motion:"textObjectManipulation",motionArgs:{textObjectInner:!0}},{keys:"/",type:"search",searchArgs:{forward:!0,querySrc:"prompt",toJumplist:!0}},{keys:"?",type:"search",searchArgs:{forward:!1,querySrc:"prompt",toJumplist:!0}},{keys:"*",type:"search",searchArgs:{forward:!0,querySrc:"wordUnderCursor",wholeWordOnly:!0,toJumplist:!0}},{keys:"#",type:"search",searchArgs:{forward:!1,querySrc:"wordUnderCursor",wholeWordOnly:!0,toJumplist:!0}},{keys:"g*",type:"search",searchArgs:{forward:!0,querySrc:"wordUnderCursor",toJumplist:!0}},{keys:"g#",type:"search",searchArgs:{forward:!1,querySrc:"wordUnderCursor",toJumplist:!0}},{keys:":",type:"ex"}],l=u.length,c=[{name:"colorscheme",shortName:"colo"},{name:"map"},{name:"imap",shortName:"im"},{name:"nmap",shortName:"nm"},{name:"vmap",shortName:"vm"},{name:"unmap"},{name:"write",shortName:"w"},{name:"undo",shortName:"u"},{name:"redo",shortName:"red"},{name:"set",shortName:"se"},{name:"setlocal",shortName:"setl"},{name:"setglobal",shortName:"setg"},{name:"sort",shortName:"sor"},{name:"substitute",shortName:"s",possiblyAsync:!0},{name:"nohlsearch",shortName:"noh"},{name:"yank",shortName:"y"},{name:"delmarks",shortName:"delm"},{name:"registers",shortName:"reg",excludeFromCommandHistory:!0},{name:"vglobal",shortName:"v"},{name:"global",shortName:"g"}],h=function(){function e(e,n){e.attached=!1,this==o.default.keyMap.vim&&(e.options.$customCursor=null),n&&n.attach==t||function(e){e.setOption("disableInput",!1),e.off("cursorActivity",Xe),e.state.vim=null,ze&&clearTimeout(ze),e.leaveVimMode()}(e)}function t(e,n){this==o.default.keyMap.vim&&(e.attached=!0,e.curOp&&(e.curOp.selectionChanged=!0),e.options.$customCursor=a),n&&n.attach==t||function(e){e.setOption("disableInput",!0),e.setOption("showCursorWhenSelecting",!1),o.default.signal(e,"vim-mode-change",{mode:"normal"}),e.on("cursorActivity",Xe),P(e),e.enterVimMode()}(e)}function n(e,t){if(t){if(this[e])return this[e];var n=function(e){if("'"==e.charAt(0))return e.charAt(1);if("AltGraph"===e)return!1;var t=e.split(/-(?!$)/),n=t[t.length-1];if(1==t.length&&1==t[0].length)return!1;if(2==t.length&&"Shift"==t[0]&&1==n.length)return!1;for(var o=!1,r=0;r")}(e);if(!n)return!1;var r=W.findKey(t,n);return"function"==typeof r&&o.default.signal(t,"vim-keypress",n),r}}o.default.defineOption("vimMode",!1,(function(e,t,n){t&&"vim"!=e.getOption("keyMap")?e.setOption("keyMap","vim"):!t&&n!=o.default.Init&&/^vim/.test(e.getOption("keyMap"))&&e.setOption("keyMap","default")}));var i={Shift:"S",Ctrl:"C",Alt:"A",Cmd:"D",Mod:"A",CapsLock:""},h={Enter:"CR",Backspace:"BS",Delete:"Del",Insert:"Ins"},d=/[\d]/,f=[o.default.isWordChar,function(e){return e&&!o.default.isWordChar(e)&&!/\s/.test(e)}],p=[function(e){return/\S/.test(e)}];function g(e,t){for(var n=[],i=e;i"]),w=[].concat(v,y,b,["-",'"',".",":","_","/"]);try{m=new RegExp("^[\\p{Lu}]$","u")}catch(e){m=/^[A-Z]$/}function M(e,t){return t>=e.firstLine()&&t<=e.lastLine()}function C(e){return/^[a-z]$/.test(e)}function S(e){return m.test(e)}function L(e){return/^\s*$/.test(e)}function I(e){return-1!=".?!".indexOf(e)}function N(e,t){for(var n=0;nn?t=n:t0?1:-1,c=r.getCursor();do{if((a=o[(e+(t+=l))%e])&&(u=a.find())&&!ne(c,u))break}while(ti)}return a}return{cachedCursor:void 0,add:function(r,s,a){var u=o[t%e];function l(n){var i=++t%e,s=o[i];s&&s.clear(),o[i]=r.setBookmark(n)}if(u){var c=u.find();c&&!ne(c,s)&&l(s)}else l(s);l(a),n=t,(i=t-e+1)<0&&(i=0)},find:function(e,n){var i=t,o=r(e,n);return t=i,o&&o.find()},move:r}},O=function(e){return e?{changes:e.changes,expectCursorActivityForChange:e.expectCursorActivityForChange}:{changes:[],expectCursorActivityForChange:!1}};function R(){this.latestRegister=void 0,this.isPlaying=!1,this.isRecording=!1,this.replaySearchQueries=[],this.onRecordingDone=void 0,this.lastInsertModeChanges=O()}function P(e){return e.state.vim||(e.state.vim={inputState:new F,lastEditInputState:void 0,lastEditActionCommand:void 0,lastHPos:-1,lastHSPos:-1,lastMotion:null,marks:{},insertMode:!1,insertModeRepeat:void 0,visualMode:!1,visualLine:!1,visualBlock:!1,lastSelection:null,lastPastedText:null,sel:{},options:{}}),e.state.vim}function z(){for(var e in E={searchQuery:null,searchIsReversed:!1,lastSubstituteReplacePart:void 0,jumpList:j(),macroModeState:new R,lastCharacterSearch:{increment:0,forward:!0,selectedCharacter:""},registerController:new V({}),searchHistoryController:new U,exCommandHistoryController:new U},x){var t=x[e];t.value=t.defaultValue}}R.prototype={exitMacroRecordMode:function(){var e=E.macroModeState;e.onRecordingDone&&e.onRecordingDone(),e.onRecordingDone=void 0,e.isRecording=!1},enterMacroRecordMode:function(e,t){var n=E.registerController.getRegister(t);n&&(n.clear(),this.latestRegister=t,e.openDialog&&(this.onRecordingDone=e.openDialog(document.createTextNode("(recording)["+t+"]"),null,{bottom:!0})),this.isRecording=!0)}};var W={buildKeyMap:function(){},getRegisterController:function(){return E.registerController},resetVimGlobalState_:z,getVimGlobalState_:function(){return E},maybeInitVimState_:P,suppressErrorLogging:!1,InsertModeKey:$e,map:function(e,t,n){Ge.map(e,t,n)},unmap:function(e,t){return Ge.unmap(e,t)},noremap:function(e,t,n){function i(e){return e?[e]:["normal","insert","visual"]}for(var o=i(n),r=u.length,s=r-l;s=0;o--){var r=i[o];if(e!==r.context)if(r.context)this._mapCommand(r);else{var s=["normal","insert","visual"];for(var a in s)if(s[a]!==e){var c={};for(var h in r)c[h]=r[h];c.context=s[a],this._mapCommand(c)}}}},setOption:k,getOption:T,defineOption:D,defineEx:function(e,t,n){if(t){if(0!==e.indexOf(t))throw new Error('(Vim.defineEx) "'+t+'" is not a prefix of "'+e+'", command not registered')}else t=e;Ze[e]=n,Ge.commandMap_[t]={name:e,shortName:t,type:"api"}},handleKey:function(e,t,n){var i=this.findKey(e,t,n);if("function"==typeof i)return i()},findKey:function(e,t,n){var i,o=P(e);function r(){if(""==t){if(o.visualMode)ge(e);else{if(!o.insertMode)return;Qe(e)}return B(e),!0}}return!1===(i=o.insertMode?function(){if(r())return!0;for(var n=o.inputState.keyBuffer=o.inputState.keyBuffer+t,i=1==t.length,s=Y.matchCommand(n,u,o.inputState,"insert");n.length>1&&"full"!=s.type;){n=o.inputState.keyBuffer=n.slice(1);var a=Y.matchCommand(n,u,o.inputState,"insert");"none"!=a.type&&(s=a)}if("none"==s.type)return B(e),!1;if("partial"==s.type)return A&&window.clearTimeout(A),A=window.setTimeout((function(){o.insertMode&&o.inputState.keyBuffer&&B(e)}),T("insertModeEscKeysTimeout")),!i;if(A&&window.clearTimeout(A),i){for(var l=e.listSelections(),c=0;c|<\w+>|./.exec(n),t=i[0],n=n.substring(i.index+t.length),W.handleKey(e,t,"mapping")}(i.toKeys):Y.processCommand(e,o,i)}catch(t){throw e.state.vim=void 0,P(e),W.suppressErrorLogging||console.log(t),t}return!0}))}},handleEx:function(e,t){Ge.processCommand(e,t)},defineMotion:function(e,t){Z[e]=t},defineAction:function(e,t){q[e]=t},defineOperator:function(e,t){Q[e]=t},mapCommand:function(e,t,n,i,o){var r={keys:e,type:t};for(var s in r[t]=n,r[t+"Args"]=i,o)r[s]=o[s];qe(r)},_mapCommand:qe,defineRegister:function(e,t){var n=E.registerController.registers;if(!e||1!=e.length)throw Error("Register name must be 1 character");if(n[e])throw Error("Register already defined "+e);n[e]=t,w.push(e)},exitVisualMode:ge,exitInsertMode:Qe};function F(){this.prefixRepeat=[],this.motionRepeat=[],this.operator=null,this.operatorArgs=null,this.motion=null,this.motionArgs=null,this.keyBuffer=[],this.registerName=null}function B(e,t){e.state.vim.inputState=new F,o.default.signal(e,"vim-command-done",t)}function H(e,t,n){this.clear(),this.keyBuffer=[e||""],this.insertModeChanges=[],this.searchQueries=[],this.linewise=!!t,this.blockwise=!!n}function V(e){this.registers=e,this.unnamedRegister=e['"']=new H,e["."]=new H,e[":"]=new H,e["/"]=new H}function U(){this.historyBuffer=[],this.iterator=0,this.initialPrefix=null}F.prototype.pushRepeatDigit=function(e){this.operator?this.motionRepeat=this.motionRepeat.concat(e):this.prefixRepeat=this.prefixRepeat.concat(e)},F.prototype.getRepeat=function(){var e=0;return(this.prefixRepeat.length>0||this.motionRepeat.length>0)&&(e=1,this.prefixRepeat.length>0&&(e*=parseInt(this.prefixRepeat.join(""),10)),this.motionRepeat.length>0&&(e*=parseInt(this.motionRepeat.join(""),10))),e},H.prototype={setText:function(e,t,n){this.keyBuffer=[e||""],this.linewise=!!t,this.blockwise=!!n},pushText:function(e,t){t&&(this.linewise||this.keyBuffer.push("\n"),this.linewise=!0),this.keyBuffer.push(e)},pushInsertModeChanges:function(e){this.insertModeChanges.push(O(e))},pushSearchQuery:function(e){this.searchQueries.push(e)},clear:function(){this.keyBuffer=[],this.insertModeChanges=[],this.searchQueries=[],this.linewise=!1},toString:function(){return this.keyBuffer.join("")}},V.prototype={pushText:function(e,t,n,i,o){if("_"!==e){i&&"\n"!==n.charAt(n.length-1)&&(n+="\n");var r=this.isValidRegister(e)?this.getRegister(e):null;if(r)S(e)?r.pushText(n,i):r.setText(n,i,o),this.unnamedRegister.setText(r.toString(),i);else{switch(t){case"yank":this.registers[0]=new H(n,i,o);break;case"delete":case"change":-1==n.indexOf("\n")?this.registers["-"]=new H(n,i):(this.shiftNumericRegisters_(),this.registers[1]=new H(n,i))}this.unnamedRegister.setText(n,i,o)}}},getRegister:function(e){return this.isValidRegister(e)?(e=e.toLowerCase(),this.registers[e]||(this.registers[e]=new H),this.registers[e]):this.unnamedRegister},isValidRegister:function(e){return e&&N(e,w)},shiftNumericRegisters_:function(){for(var e=9;e>=2;e--)this.registers[e]=this.getRegister(""+(e-1))}},U.prototype={nextMatch:function(e,t){var n=this.historyBuffer,i=t?-1:1;null===this.initialPrefix&&(this.initialPrefix=e);for(var o=this.iterator+i;t?o>=0:o=n.length?(this.iterator=n.length,this.initialPrefix):o<0?e:void 0},pushInput:function(e){var t=this.historyBuffer.indexOf(e);t>-1&&this.historyBuffer.splice(t,1),e.length&&this.historyBuffer.push(e)},reset:function(){this.initialPrefix=null,this.iterator=this.historyBuffer.length}};var Y={matchCommand:function(e,t,n,i){var o,r=function(e,t,n,i){for(var o,r=[],s=[],a=0;a"==o.keys.slice(-11)){var u=function(e){var t=/^.*(<[^>]+>)$/.exec(e),n=t?t[1]:e.slice(-1);if(n.length>1)switch(n){case"":n="\n";break;case"":n=" ";break;default:n=""}return n}(e);if(!u)return{type:"none"};n.selectedCharacter=u}return{type:"full",command:o}},processCommand:function(e,t,n){switch(t.inputState.repeatOverride=n.repeatOverride,n.type){case"motion":this.processMotion(e,t,n);break;case"operator":this.processOperator(e,t,n);break;case"operatorMotion":this.processOperatorMotion(e,t,n);break;case"action":this.processAction(e,t,n);break;case"search":this.processSearch(e,t,n);break;case"ex":case"keyToEx":this.processEx(e,t,n)}},processMotion:function(e,t,n){t.inputState.motion=n.motion,t.inputState.motionArgs=J(n.motionArgs),this.evalInput(e,t)},processOperator:function(e,t,n){var i=t.inputState;if(i.operator){if(i.operator==n.operator)return i.motion="expandToLine",i.motionArgs={linewise:!0},void this.evalInput(e,t);B(e)}i.operator=n.operator,i.operatorArgs=J(n.operatorArgs),n.keys.length>1&&(i.operatorShortcut=n.keys),n.exitVisualBlock&&(t.visualBlock=!1,fe(e)),t.visualMode&&this.evalInput(e,t)},processOperatorMotion:function(e,t,n){var i=t.visualMode,o=J(n.operatorMotionArgs);o&&i&&o.visualLine&&(t.visualLine=!0),this.processOperator(e,t,n),i||this.processMotion(e,t,n)},processAction:function(e,t,n){var i=t.inputState,o=i.getRepeat(),r=!!o,s=J(n.actionArgs)||{};i.selectedCharacter&&(s.selectedCharacter=i.selectedCharacter),n.operator&&this.processOperator(e,t,n),n.motion&&this.processMotion(e,t,n),(n.motion||n.operator)&&this.evalInput(e,t),s.repeat=o||1,s.repeatIsExplicit=r,s.registerName=i.registerName,B(e),t.lastMotion=null,n.isEdit&&this.recordLastEdit(t,i,n),q[n.action](e,s,t)},processSearch:function(e,t,n){if(e.getSearchCursor){var i=n.searchArgs.forward,r=n.searchArgs.wholeWordOnly;De(e).setReversed(!i);var s=i?"/":"?",a=De(e).getQuery(),u=e.getScrollInfo();switch(n.searchArgs.querySrc){case"prompt":var l=E.macroModeState;l.isPlaying?f(d=l.replaySearchQueries.shift(),!0,!1):Re(e,{onClose:function(t){e.scrollTo(u.left,u.top),f(t,!0,!0);var n=E.macroModeState;n.isRecording&&function(e,t){if(!e.isPlaying){var n=e.latestRegister,i=E.registerController.getRegister(n);i&&i.pushSearchQuery&&i.pushSearchQuery(t)}}(n,t)},prefix:s,desc:"(JavaScript regexp)",onKeyUp:function(t,n,r){var s,a,l,c=o.default.keyName(t);"Up"==c||"Down"==c?(s="Up"==c,a=t.target?t.target.selectionEnd:0,r(n=E.searchHistoryController.nextMatch(n,s)||""),a&&t.target&&(t.target.selectionEnd=t.target.selectionStart=Math.min(a,t.target.value.length))):"Left"!=c&&"Right"!=c&&"Ctrl"!=c&&"Alt"!=c&&"Shift"!=c&&E.searchHistoryController.reset();try{l=Pe(e,n,!0,!0)}catch(t){}l?e.scrollIntoView(Fe(e,!i,l),30):(Be(e),e.scrollTo(u.left,u.top))},onKeyDown:function(t,n,i){var r=o.default.keyName(t);"Esc"==r||"Ctrl-C"==r||"Ctrl-["==r||"Backspace"==r&&""==n?(E.searchHistoryController.pushInput(n),E.searchHistoryController.reset(),Pe(e,a),Be(e),e.scrollTo(u.left,u.top),o.default.e_stop(t),B(e),i(),e.focus()):"Up"==r||"Down"==r?o.default.e_stop(t):"Ctrl-U"==r&&(o.default.e_stop(t),i(""))}});break;case"wordUnderCursor":var c=ve(e,!1,0,!1,!0),h=!0;if(c||(c=ve(e,!1,0,!1,!1),h=!1),!c)return;var d=e.getLine(c.start.line).substring(c.start.ch,c.end.ch);d=h&&r?"\\b"+d+"\\b":d.replace(/([.?*+$\[\]\/\\(){}|\-])/g,"\\$1"),E.jumpList.cachedCursor=e.getCursor(),e.setCursor(c.start),f(d,!0,!1)}}function f(i,o,r){E.searchHistoryController.pushInput(i),E.searchHistoryController.reset();try{Pe(e,i,o,r)}catch(t){return Oe(e,"Invalid regex: "+i),void B(e)}Y.processMotion(e,t,{type:"motion",motion:"findNext",motionArgs:{forward:!0,toJumplist:n.searchArgs.toJumplist}})}},processEx:function(e,t,n){function i(t){E.exCommandHistoryController.pushInput(t),E.exCommandHistoryController.reset(),Ge.processCommand(e,t)}function r(t,n,i){var r,s,a=o.default.keyName(t);("Esc"==a||"Ctrl-C"==a||"Ctrl-["==a||"Backspace"==a&&""==n)&&(E.exCommandHistoryController.pushInput(n),E.exCommandHistoryController.reset(),o.default.e_stop(t),B(e),i(),e.focus()),"Up"==a||"Down"==a?(o.default.e_stop(t),r="Up"==a,s=t.target?t.target.selectionEnd:0,i(n=E.exCommandHistoryController.nextMatch(n,r)||""),s&&t.target&&(t.target.selectionEnd=t.target.selectionStart=Math.min(s,t.target.value.length))):"Ctrl-U"==a?(o.default.e_stop(t),i("")):"Left"!=a&&"Right"!=a&&"Ctrl"!=a&&"Alt"!=a&&"Shift"!=a&&E.exCommandHistoryController.reset()}"keyToEx"==n.type?Ge.processCommand(e,n.exArgs.input):t.visualMode?Re(e,{onClose:i,prefix:":",value:"'<,'>",onKeyDown:r,selectValueOnOpen:!1}):Re(e,{onClose:i,prefix:":",onKeyDown:r})},evalInput:function(e,t){var n,i,o,r=t.inputState,a=r.motion,u=r.motionArgs||{},l=r.operator,c=r.operatorArgs||{},h=r.registerName,d=t.sel,f=te(t.visualMode?K(e,d.head):e.getCursor("head")),p=te(t.visualMode?K(e,d.anchor):e.getCursor("anchor")),g=te(f),m=te(p);if(l&&this.recordLastEdit(t,r),(o=void 0!==r.repeatOverride?r.repeatOverride:r.getRepeat())>0&&u.explicitRepeat?u.repeatIsExplicit=!0:(u.noRepeat||!u.explicitRepeat&&0===o)&&(o=1,u.repeatIsExplicit=!1),r.selectedCharacter&&(u.selectedCharacter=c.selectedCharacter=r.selectedCharacter),u.repeat=o,B(e),a){var v=Z[a](e,f,u,t,r);if(t.lastMotion=Z[a],!v)return;if(u.toJumplist){var y=E.jumpList,b=y.cachedCursor;b?(ye(e,b,v),delete y.cachedCursor):ye(e,f,v)}v instanceof Array?(i=v[0],n=v[1]):n=v,n||(n=te(f)),t.visualMode?(t.visualBlock&&n.ch===1/0||(n=K(e,n)),i&&(i=K(e,i)),i=i||m,d.anchor=i,d.head=n,fe(e),Le(e,t,"<",ie(i,n)?i:n),Le(e,t,">",ie(i,n)?n:i)):l||(n=K(e,n),e.setCursor(n.line,n.ch))}if(l){if(c.lastSel){i=m;var _=c.lastSel,w=Math.abs(_.head.line-_.anchor.line),M=Math.abs(_.head.ch-_.anchor.ch);n=_.visualLine?new s(m.line+w,m.ch):_.visualBlock?new s(m.line+w,m.ch+M):_.head.line==_.anchor.line?new s(m.line,m.ch+M):new s(m.line+w,m.ch),t.visualMode=!0,t.visualLine=_.visualLine,t.visualBlock=_.visualBlock,d=t.sel={anchor:i,head:n},fe(e)}else t.visualMode&&(c.lastSel={anchor:te(d.anchor),head:te(d.head),visualBlock:t.visualBlock,visualLine:t.visualLine});var C,S,I,N,x;if(t.visualMode){if(C=oe(d.head,d.anchor),S=re(d.head,d.anchor),I=t.visualLine||c.linewise,x=pe(e,{anchor:C,head:S},N=t.visualBlock?"block":I?"line":"char"),I){var D=x.ranges;if("block"==N)for(var k=0;k0&&r&&L(r);r=o.pop())n.line--,n.ch=0;r?(n.line--,n.ch=ae(e,n.line)):n.ch=0}}(e,C,S),x=pe(e,{anchor:C,head:S},N="char",!u.inclusive||I)}e.setSelections(x.ranges,x.primary),t.lastMotion=null,c.repeat=o,c.registerName=h,c.linewise=I;var A=Q[l](e,c,x.ranges,m,n);t.visualMode&&ge(e,null!=A),A&&e.setCursor(A)}},recordLastEdit:function(e,t,n){var i=E.macroModeState;i.isPlaying||(e.lastEditInputState=t,e.lastEditActionCommand=n,i.lastInsertModeChanges.changes=[],i.lastInsertModeChanges.expectCursorActivityForChange=!1,i.lastInsertModeChanges.visualBlock=e.visualBlock?e.sel.head.line-e.sel.anchor.line:0)}},Z={moveToTopLine:function(e,t,n){var i=He(e).top+n.repeat-1;return new s(i,me(e.getLine(i)))},moveToMiddleLine:function(e){var t=He(e),n=Math.floor(.5*(t.top+t.bottom));return new s(n,me(e.getLine(n)))},moveToBottomLine:function(e,t,n){var i=He(e).bottom-n.repeat+1;return new s(i,me(e.getLine(i)))},expandToLine:function(e,t,n){return new s(t.line+n.repeat-1,1/0)},findNext:function(e,t,n){var i=De(e),o=i.getQuery();if(o){var r=!n.forward;return r=i.isReversed()?!r:r,We(e,o),Fe(e,r,o,n.repeat)}},findAndSelectNextInclusive:function(e,t,n,i,r){var a=De(e),u=a.getQuery();if(u){var l=!n.forward,c=function(e,t,n,i,o){return void 0===i&&(i=1),e.operation((function(){var r=e.getCursor(),a=e.getSearchCursor(n,r),u=a.find(!t);!o.visualMode&&u&&ne(a.from(),r)&&a.find(!t);for(var l=0;lu:h.linec&&o.line==c?Ce(e,t,n,i,!0):(n.toFirstChar&&(r=me(e.getLine(u)),i.lastHPos=r),i.lastHSPos=e.charCoords(new s(u,r),"div").left,new s(u,r))},moveByDisplayLines:function(e,t,n,i){var o=t;switch(i.lastMotion){case this.moveByDisplayLines:case this.moveByScroll:case this.moveByLines:case this.moveToColumn:case this.moveToEol:break;default:i.lastHSPos=e.charCoords(o,"div").left}var r=n.repeat;if((u=e.findPosV(o,n.forward?r:-r,"line",i.lastHSPos)).hitSide)if(n.forward)var a={top:e.charCoords(u,"div").top+8,left:i.lastHSPos},u=e.coordsChar(a,"div");else{var l=e.charCoords(new s(e.firstLine(),0),"div");l.left=i.lastHSPos,u=e.coordsChar(l,"div")}return i.lastHPos=u.ch,u},moveByPage:function(e,t,n){var i=t,o=n.repeat;return e.findPosV(i,n.forward?o:-o,"page")},moveByParagraph:function(e,t,n){var i=n.forward?1:-1;return Ne(e,t,n.repeat,i)},moveBySentence:function(e,t,n){var i=n.forward?1:-1;return function(e,t,n,i){function o(e,t){if(t.pos+t.dir<0||t.pos+t.dir>=t.line.length){if(t.ln+=t.dir,!M(e,t.ln))return t.line=null,t.ln=null,void(t.pos=null);t.line=e.getLine(t.ln),t.pos=t.dir>0?0:t.line.length-1}else t.pos+=t.dir}function r(e,t,n,i){var r=""===(l=e.getLine(t)),s={line:l,ln:t,pos:n,dir:i},a={ln:s.ln,pos:s.pos},u=""===s.line;for(o(e,s);null!==s.line;){if(a.ln=s.ln,a.pos=s.pos,""===s.line&&!u)return{ln:s.ln,pos:s.pos};if(r&&""!==s.line&&!L(s.line[s.pos]))return{ln:s.ln,pos:s.pos};!I(s.line[s.pos])||r||s.pos!==s.line.length-1&&!L(s.line[s.pos+1])||(r=!0),o(e,s)}var l=e.getLine(a.ln);a.pos=0;for(var c=l.length-1;c>=0;--c)if(!L(l[c])){a.pos=c;break}return a}function a(e,t,n,i){var r={line:e.getLine(t),ln:t,pos:n,dir:i},s={ln:r.ln,pos:null},a=""===r.line;for(o(e,r);null!==r.line;){if(""===r.line&&!a)return null!==s.pos?s:{ln:r.ln,pos:r.pos};if(I(r.line[r.pos])&&null!==s.pos&&(r.ln!==s.ln||r.pos+1!==s.pos))return s;""===r.line||L(r.line[r.pos])||(a=!1,s={ln:r.ln,pos:r.pos}),o(e,r)}var u=e.getLine(s.ln);s.pos=0;for(var l=0;l0;)u=i<0?a(e,u.ln,u.pos,i):r(e,u.ln,u.pos,i),n--;return new s(u.ln,u.pos)}(e,t,n.repeat,i)},moveByScroll:function(e,t,n,i){var o,r=e.getScrollInfo(),s=n.repeat;s||(s=r.clientHeight/(2*e.defaultTextHeight()));var a=e.charCoords(t,"local");if(n.repeat=s,!(o=Z.moveByDisplayLines(e,t,n,i)))return null;var u=e.charCoords(o,"local");return e.scrollTo(null,r.top+u.top-a.top),o},moveByWords:function(e,t,n){return function(e,t,n,i,o,r){var a=te(t),u=[];(i&&!o||!i&&o)&&n++;for(var l=!(i&&o),c=0;c0)h.index=0;else{var g=h.lineText.length;h.index=g>0?g-1:0}h.nextCh=h.lineText.charAt(h.index)}p(h)&&(o.line=l,o.ch=h.index,t--)}return h.nextCh||h.curMoveThrough?new s(l,h.index):o}(e,n.repeat,n.forward,n.selectedCharacter)||t},moveToColumn:function(e,t,n,i){var o=n.repeat;return i.lastHPos=o-1,i.lastHSPos=e.charCoords(t,"div").left,function(e,t){var n=e.getCursor().line;return K(e,new s(n,t-1))}(e,o)},moveToEol:function(e,t,n,i){return Ce(e,t,n,i,!1)},moveToFirstNonWhiteSpaceCharacter:function(e,t){var n=t;return new s(n.line,me(e.getLine(n.line)))},moveToMatchedSymbol:function(e,t){var n=t,i=n.line,o=n.ch;if(o"===o?/[(){}[\]<>]/:/[(){}[\]]/;return e.findMatchingBracket(new s(i,o),{bracketRegex:r}).to}return n},moveToStartOfLine:function(e,t){return new s(t.line,0)},moveToLineOrEdgeOfDocument:function(e,t,n){var i=n.forward?e.lastLine():e.firstLine();return n.repeatIsExplicit&&(i=n.repeat-e.getOption("firstLineNumber")),new s(i,me(e.getLine(i)))},moveToStartOfDisplayLine:function(e){return e.execCommand("goLineLeft"),e.getCursor()},moveToEndOfDisplayLine:function(e){e.execCommand("goLineRight");var t=e.getCursor();return"before"==t.sticky&&t.ch--,t},textObjectManipulation:function(e,t,n,i){var r=n.selectedCharacter;"b"==r?r="(":"B"==r&&(r="{");var a,u=!n.textObjectInner;if({"(":")",")":"(","{":"}","}":"{","[":"]","]":"[","<":">",">":"<"}[r])a=function(e,t,n,i){var o,r,a=t,u={"(":/[()]/,")":/[()]/,"[":/[[\]]/,"]":/[[\]]/,"{":/[{}]/,"}":/[{}]/,"<":/[<>]/,">":/[<>]/}[n],l={"(":"(",")":"(","[":"[","]":"[","{":"{","}":"{","<":"<",">":"<"}[n],c=e.getLine(a.line).charAt(a.ch)===l?1:0;if(o=e.scanForBracket(new s(a.line,a.ch+c),-1,void 0,{bracketRegex:u}),r=e.scanForBracket(new s(a.line,a.ch+c),1,void 0,{bracketRegex:u}),!o||!r)return{start:a,end:a};if(o=o.pos,r=r.pos,o.line==r.line&&o.ch>r.ch||o.line>r.line){var h=o;o=r,r=h}return i?r.ch+=1:o.ch+=1,{start:o,end:r}}(e,t,r,u);else if({"'":!0,'"':!0,"`":!0}[r])a=function(e,t,n,i){var o,r,a,u,l=te(t),c=e.getLine(l.line).split(""),h=c.indexOf(n);if(l.ch-1&&!o;a--)c[a]==n&&(o=a+1);else o=l.ch+1;if(o&&!r)for(a=o,u=c.length;ae.lastLine()&&t.linewise&&!p?e.replaceRange("",f,l):e.replaceRange("",u,l),t.linewise&&(p||(e.setCursor(f),o.default.commands.newlineAndIndent(e)),u.ch=Number.MAX_VALUE),i=u}E.registerController.pushText(t.registerName,"change",r,t.linewise,n.length>1),q.enterInsertMode(e,{head:i},e.state.vim)},delete:function(e,t,n){var i,o;e.pushUndoStop();var r=e.state.vim;if(r.visualBlock){o=e.getSelection();var a=G("",n.length);e.replaceSelections(a),i=oe(n[0].head,n[0].anchor)}else{var u=n[0].anchor,l=n[0].head;t.linewise&&l.line!=e.firstLine()&&u.line==e.lastLine()&&u.line==l.line-1&&(u.line==e.firstLine()?u.ch=0:u=new s(u.line-1,ae(e,u.line-1))),o=e.getRange(u,l),e.replaceRange("",u,l),i=u,t.linewise&&(i=Z.moveToFirstNonWhiteSpaceCharacter(e,u))}return E.registerController.pushText(t.registerName,"delete",o,t.linewise,r.visualBlock),K(e,i)},indent:function(e,t,n){var i=e.state.vim,o=n[0].anchor.line,r=i.visualBlock?n[n.length-1].anchor.line:n[0].head.line,s=i.visualMode?t.repeat:1;t.linewise&&r--,e.pushUndoStop();for(var a=o;a<=r;a++)for(var u=0;ul.top?(u.line+=(a-l.top)/o,u.line=Math.ceil(u.line),e.setCursor(u),l=e.charCoords(u,"local"),e.scrollTo(null,l.top)):e.scrollTo(null,a);else{var c=a+e.getScrollInfo().clientHeight;c=r.anchor.line?X(r.head,0,1):new s(r.anchor.line,0)}else if("inplace"==i){if(n.visualMode)return}else"lastEdit"==i&&(a=Ue(e)||a);e.setOption("disableInput",!1),t&&t.replace?(e.toggleOverwrite(!0),e.setOption("keyMap","vim-replace"),o.default.signal(e,"vim-mode-change",{mode:"replace"})):(e.toggleOverwrite(!1),e.setOption("keyMap","vim-insert"),o.default.signal(e,"vim-mode-change",{mode:"insert"})),E.macroModeState.isPlaying||(e.on("change",Je),o.default.on(e.getInputField(),"keydown",et)),n.visualMode&&ge(e),he(e,a,u)}},toggleVisualMode:function(e,t,n){var i,r=t.repeat,a=e.getCursor();n.visualMode?n.visualLine^t.linewise||n.visualBlock^t.blockwise?(n.visualLine=!!t.linewise,n.visualBlock=!!t.blockwise,o.default.signal(e,"vim-mode-change",{mode:"visual",subMode:n.visualLine?"linewise":n.visualBlock?"blockwise":""}),fe(e)):ge(e):(n.visualMode=!0,n.visualLine=!!t.linewise,n.visualBlock=!!t.blockwise,i=K(e,new s(a.line,a.ch+r-1)),n.sel={anchor:a,head:i},o.default.signal(e,"vim-mode-change",{mode:"visual",subMode:n.visualLine?"linewise":n.visualBlock?"blockwise":""}),fe(e),Le(e,n,"<",oe(a,i)),Le(e,n,">",re(a,i)))},reselectLastSelection:function(e,t,n){var i=n.lastSelection;if(n.visualMode&&de(e,n),i){var r=i.anchorMark.find(),s=i.headMark.find();if(!r||!s)return;n.sel={anchor:r,head:s},n.visualMode=!0,n.visualLine=i.visualLine,n.visualBlock=i.visualBlock,fe(e),Le(e,n,"<",oe(r,s)),Le(e,n,">",re(r,s)),o.default.signal(e,"vim-mode-change",{mode:"visual",subMode:n.visualLine?"linewise":n.visualBlock?"blockwise":""})}},joinLines:function(e,t,n){var i,o;if(n.visualMode){if(i=e.getCursor("anchor"),ie(o=e.getCursor("head"),i)){var r=o;o=i,i=r}o.ch=ae(e,o.line)-1}else{var a=Math.max(t.repeat,2);i=e.getCursor(),o=K(e,new s(i.line+a-1,1/0))}for(var u=0,l=i.line;l1&&(f=Array(t.repeat+1).join(f));var p,g,m=o.linewise,v=o.blockwise;if(v){f=f.split("\n"),m&&f.pop();for(var y=0;ye.lastLine()&&e.replaceRange("\n",new s(I,0)),ae(e,I)c.length&&(i=c.length),r=new s(u.line,i)}if("\n"==a)n.visualMode||e.replaceRange("",u,r),(o.default.commands.newlineAndIndentContinueComment||o.default.commands.newlineAndIndent)(e);else{var h=e.getRange(u,r);if(h=h.replace(/[^\n]/g,a),n.visualBlock){var d=new Array(e.getOption("tabSize")+1).join(" ");h=(h=e.getSelection()).replace(/\t/g,d).replace(/[^\n]/g,a).split("\n"),e.replaceSelections(h)}else e.replaceRange(h,u,r);n.visualMode?(u=ie(l[0].anchor,l[0].head)?l[0].anchor:l[0].head,e.setCursor(u),ge(e,!1)):e.setCursor(X(r,0,-1))}},incrementNumberToken:function(e,t){for(var n,i,o,r,a=e.getCursor(),u=e.getLine(a.line),l=/(-?)(?:(0x)([\da-f]+)|(0b|0|)(\d+))/gi;null!==(n=l.exec(u))&&(o=(i=n.index)+n[0].length,!(a.ch"==t.slice(-11)){var n=t.length-11,i=e.slice(0,n),o=t.slice(0,n);return i==o&&e.length>n?"full":0==o.indexOf(i)&&"partial"}return e==t?"full":0==t.indexOf(e)&&"partial"}function ee(e,t,n){return function(){for(var i=0;i2&&(t=oe.apply(void 0,Array.prototype.slice.call(arguments,1))),ie(e,t)?e:t}function re(e,t){return arguments.length>2&&(t=re.apply(void 0,Array.prototype.slice.call(arguments,1))),ie(e,t)?t:e}function se(e,t,n){var i=ie(e,t),o=ie(t,n);return i&&o}function ae(e,t){return e.getLine(t).length}function ue(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function le(e,t,n){var i=ae(e,t),o=new Array(n-i+1).join(" ");e.setCursor(new s(t,i)),e.replaceRange(o,e.getCursor())}function ce(e,t){var n=[],i=e.listSelections(),o=te(e.clipPos(t)),r=!ne(t,o),a=function(e,t,n){for(var i=0;ia?l:0,h=i[c].anchor,d=Math.min(h.line,o.line),f=Math.max(h.line,o.line),p=h.ch,g=o.ch,m=i[c].head.ch-p,v=g-p;m>0&&v<=0?(p++,r||g--):m<0&&v>=0?(p--,u||g++):m<0&&-1==v&&(p--,g++);for(var y=d;y<=f;y++){var b={anchor:new s(y,p),head:new s(y,g)};n.push(b)}return e.setSelections(n),t.ch=g,h.ch=p,h}function he(e,t,n){for(var i=[],o=0;ol&&(o.line=l),o.ch=ae(e,o.line)}return{ranges:[{anchor:r,head:o}],primary:0}}if("block"==n){var c=Math.min(r.line,o.line),h=r.ch,d=Math.max(r.line,o.line),f=o.ch;h=a.length)return null;i?l=p[0]:(l=f[0])(a.charAt(u))||(l=f[1]);for(var c=u,h=u;l(a.charAt(c))&&c=0;)h--;if(h++,t){for(var d=c;/\s/.test(a.charAt(c))&&c0;)h--;h||(h=g)}}return{start:new s(r.line,h),end:new s(r.line,c)}}function ye(e,t,n){ne(t,n)||E.jumpList.add(e,t,n)}function be(e,t){E.lastCharacterSearch.increment=e,E.lastCharacterSearch.forward=t.forward,E.lastCharacterSearch.selectedCharacter=t.selectedCharacter}var _e={"(":"bracket",")":"bracket","{":"bracket","}":"bracket","[":"section","]":"section","*":"comment","/":"comment",m:"method",M:"method","#":"preprocess"},we={bracket:{isComplete:function(e){if(e.nextCh===e.symb){if(e.depth++,e.depth>=1)return!0}else e.nextCh===e.reverseSymb&&e.depth--;return!1}},section:{init:function(e){e.curMoveThrough=!0,e.symb=(e.forward?"]":"[")===e.symb?"{":"}"},isComplete:function(e){return 0===e.index&&e.nextCh===e.symb}},comment:{isComplete:function(e){var t="*"===e.lastCh&&"/"===e.nextCh;return e.lastCh=e.nextCh,t}},method:{init:function(e){e.symb="m"===e.symb?"{":"}",e.reverseSymb="{"===e.symb?"}":"{"},isComplete:function(e){return e.nextCh===e.symb}},preprocess:{init:function(e){e.index=0},isComplete:function(e){if("#"===e.nextCh){var t=e.lineText.match(/^#(\w+)/)[1];if("endif"===t){if(e.forward&&0===e.depth)return!0;e.depth++}else if("if"===t){if(!e.forward&&0===e.depth)return!0;e.depth--}if("else"===t&&0===e.depth)return!0}return!1}}};function Me(e,t,n,i,o){var r=t.line,s=t.ch,a=e.getLine(r),u=n?1:-1,l=i?p:f;if(o&&""==a){if(r+=u,a=e.getLine(r),!M(e,r))return null;s=n?0:a.length}for(;;){if(o&&""==a)return{from:0,to:0,line:r};for(var c=u>0?a.length:-1,h=c,d=c;s!=c;){for(var g=!1,m=0;m0?0:a.length}}function Ce(e,t,n,i,o){var r=new s(t.line+n.repeat-1,1/0),a=e.clipPos(r);return a.ch--,o||(i.lastHPos=1/0,i.lastHSPos=e.charCoords(a,"div").left),r}function Se(e,t,n,i){for(var o,r=e.getCursor(),a=r.ch,u=0;u0;)d(c,i)&&n--,c+=i;return new s(c,0)}var f=e.state.vim;if(f.visualLine&&d(a,1,!0)){var p=f.sel.anchor;d(p.line,-1,!0)&&(o&&p.line==a||(a+=1))}var g=h(a);for(c=a;c<=l&&n;c++)d(c,1,!0)&&(o&&h(c)==g||n--);for(r=new s(c,0),c>l&&!g?g=!0:o=!1,c=a;c>u&&(o&&h(c)!=g&&c!=a||!d(c,-1,!0));c--);return{start:new s(c,0),end:r}}function xe(){}function De(e){var t=e.state.vim;return t.searchState_||(t.searchState_=new xe)}function ke(e,t){var n=Te(e,t)||[];if(!n.length)return[];var i=[];if(0===n[0]){for(var o=0;o@~])/);return n.commandName=i?i[1]:t.match(/.*/)[0],n},parseLineSpec_:function(e,t){var n=t.match(/^(\d+)/);if(n)return parseInt(n[1],10)-1;switch(t.next()){case".":return this.parseLineSpecOffset_(t,e.getCursor().line);case"$":return this.parseLineSpecOffset_(t,e.lastLine());case"'":var i=t.next(),o=Ve(e,e.state.vim,i);if(!o)throw new Error("Mark not set");return this.parseLineSpecOffset_(t,o.line);case"-":case"+":return t.backUp(1),this.parseLineSpecOffset_(t,e.getCursor().line);default:return void t.backUp(1)}},parseLineSpecOffset_:function(e,t){var n=e.match(/^([+-])?(\d+)/);if(n){var i=parseInt(n[2],10);"-"==n[1]?t-=i:t+=i}return t},parseCommandArgs_:function(e,t,n){if(!e.eol()){t.argString=e.match(/.*/)[0];var i=n.argDelimiter||/\s+/,o=ue(t.argString).split(i);o.length&&o[0]&&(t.args=o)}},matchCommand_:function(e){for(var t=e.length;t>0;t--){var n=e.substring(0,t);if(this.commandMap_[n]){var i=this.commandMap_[n];if(0===i.name.indexOf(e))return i}}return null},buildCommandMap_:function(){this.commandMap_={};for(var e=0;e1)return"Invalid arguments";a=(l?"decimal":c&&"hex")||h&&"octal"}s[2]&&(u=new RegExp(s[2].substr(1,s[2].length-2),i?"i":""))}}();if(l)Oe(e,l+": "+t.argString);else{var c=t.line||e.firstLine(),h=t.lineEnd||t.line||e.lastLine();if(c!=h){var d=new s(c,0),f=new s(h,ae(e,h)),p=e.getRange(d,f).split("\n"),g=u||("decimal"==a?/(-?)([\d]+)/:"hex"==a?/(-?)(?:0x)?([0-9a-f]+)/i:"octal"==a?/([0-7]+)/:null),m="decimal"==a?10:"hex"==a?16:"octal"==a?8:null,v=[],y=[];if(a||u)for(var b=0;b=o&&t<=a:t==o);)if(n||s.from().line!=h||d)return e.scrollIntoView(s.from(),30),e.setSelection(s.from(),s.to()),c=s.from(),void(f=!1);var t,o,a,u,l;f=!0}function v(t){if(t&&t(),e.focus(),c){e.setCursor(c);var n=e.state.vim;n.exMode=!1,n.lastHPos=n.lastHSPos=c.ch}l&&l()}if(m(),!f)return t?void Re(e,{prefix:je("span","replace with ",je("strong",u)," (y/n/a/q/l)"),onKeyDown:function(t,n,i){switch(o.default.e_stop(t),o.default.keyName(t)){case"Y":g(),m();break;case"N":m();break;case"A":var r=l;l=void 0,e.operation(p),l=r;break;case"L":g();case"Q":case"Esc":case"Ctrl-C":case"Ctrl-[":v(i)}return f&&v(i),!0}}):(p(),void(l&&l()));Oe(e,"No matches for "+a.source)}(e,h,f,g,m,y,p,c,t.callback)}else Oe(e,"No previous substitute regular expression")},redo:o.default.commands.redo,undo:o.default.commands.undo,write:function(e){o.default.commands.save?o.default.commands.save(e):e.save&&e.save()},nohlsearch:function(e){Be(e)},yank:function(e){var t=te(e.getCursor()).line,n=e.getLine(t);E.registerController.pushText("0","yank",n,!0,!0)},delmarks:function(e,t){if(t.argString&&ue(t.argString))for(var n=e.state.vim,i=new o.default.StringStream(ue(t.argString));!i.eol();){i.eatSpace();var r=i.pos;if(!i.match(/[a-zA-Z]/,!1))return void Oe(e,"Invalid argument: "+t.argString.substring(r));var s=i.next();if(i.match("-",!0)){if(!i.match(/[a-zA-Z]/,!1))return void Oe(e,"Invalid argument: "+t.argString.substring(r));var a=s,u=i.next();if(!(C(a)&&C(u)||S(a)&&S(u)))return void Oe(e,"Invalid argument: "+a+"-");var l=a.charCodeAt(0),c=u.charCodeAt(0);if(l>=c)return void Oe(e,"Invalid argument: "+t.argString.substring(r));for(var h=0;h<=c-l;h++){var d=String.fromCharCode(l+h);delete n.marks[d]}}else delete n.marks[s]}else Oe(e,"Argument required")}},Ge=new Ye;function Qe(e){var t=e.state.vim,n=E.macroModeState,i=E.registerController.getRegister("."),r=n.isPlaying,s=n.lastInsertModeChanges;r||(e.off("change",Je),o.default.off(e.getInputField(),"keydown",et)),!r&&t.insertModeRepeat>1&&(tt(e,t,t.insertModeRepeat-1,!0),t.lastEditInputState.repeatOverride=t.insertModeRepeat),delete t.insertModeRepeat,t.insertMode=!1,e.setCursor(e.getCursor().line,e.getCursor().ch-1),e.setOption("keyMap","vim"),e.setOption("disableInput",!0),e.toggleOverwrite(!1),i.setText(s.changes.join("")),o.default.signal(e,"vim-mode-change",{mode:"normal"}),n.isRecording&&function(e){if(!e.isPlaying){var t=e.latestRegister,n=E.registerController.getRegister(t);n&&n.pushInsertModeChanges&&n.pushInsertModeChanges(e.lastInsertModeChanges)}}(n),e.enterVimMode()}function qe(e){u.unshift(e)}function Ke(e,t,n,i){var o=E.registerController.getRegister(i);if(":"==i)return o.keyBuffer[0]&&Ge.processCommand(e,o.keyBuffer[0]),void(n.isPlaying=!1);var r=o.keyBuffer,s=0;n.isPlaying=!0,n.replaySearchQueries=o.searchQueries.slice(0);for(var a=0;a|<\w+>|./.exec(c))[0],c=c.substring(u.index+l.length),W.handleKey(e,l,"macro"),t.insertMode){var h=o.insertModeChanges[s++].changes;E.macroModeState.lastInsertModeChanges.changes=h,nt(e,h,1),Qe(e)}n.isPlaying=!1}function Je(e,t){var n=E.macroModeState,i=n.lastInsertModeChanges;if(!n.isPlaying)for(;t;){if(i.expectCursorActivityForChange=!0,i.ignoreCount>1)i.ignoreCount--;else if("+input"==t.origin||"paste"==t.origin||void 0===t.origin){var o=e.listSelections().length;o>1&&(i.ignoreCount=o);var r=t.text.join("\n");i.maybeReset&&(i.changes=[],i.maybeReset=!1),r&&(e.state.overwrite&&!/\n/.test(r)?i.changes.push([r]):i.changes.push(r))}t=t.next}}function Xe(e){var t=e.state.vim;if(t.insertMode){var n=E.macroModeState;if(n.isPlaying)return;var i=n.lastInsertModeChanges;i.expectCursorActivityForChange?i.expectCursorActivityForChange=!1:i.maybeReset=!0}else e.curOp.isVimOp||function(e,t){var n=e.getCursor("anchor"),i=e.getCursor("head");if(t.visualMode&&!e.somethingSelected()?ge(e,!1):t.visualMode||t.insertMode||!e.somethingSelected()||(t.visualMode=!0,t.visualLine=!1,o.default.signal(e,"vim-mode-change",{mode:"visual"})),t.visualMode){var r=ie(i,n)?0:-1,s=ie(i,n)?-1:0;i=X(i,0,r),n=X(n,0,s),t.sel={anchor:n,head:i},Le(e,t,"<",oe(i,n)),Le(e,t,">",re(i,n))}else t.insertMode||(t.lastHPos=e.getCursor().ch)}(e,t)}function $e(e){this.keyName=e}function et(e){var t=E.macroModeState.lastInsertModeChanges,n=o.default.keyName(e);n&&(-1==n.indexOf("Delete")&&-1==n.indexOf("Backspace")||o.default.lookupKey(n,"vim-insert",(function(){return t.maybeReset&&(t.changes=[],t.maybeReset=!1),t.changes.push(new $e(n)),!0})))}function tt(e,t,n,i){var o=E.macroModeState;o.isPlaying=!0;var r=!!t.lastEditActionCommand,s=t.inputState;function a(){r?Y.processAction(e,t,t.lastEditActionCommand):Y.evalInput(e,t)}function u(n){if(o.lastInsertModeChanges.changes.length>0){n=t.lastEditActionCommand?n:1;var i=o.lastInsertModeChanges;nt(e,i.changes,n)}}if(t.inputState=t.lastEditInputState,r&&t.lastEditActionCommand.interlaceInsertRepeat)for(var l=0;l{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=n(6625),o=n(99);function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n=this.string.length},sol:function(){return this.pos==this.lineStart},peek:function(){return this.string.charAt(this.pos)||void 0},next:function(){if(this.post},eatSpace:function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},skipToEnd:function(){this.pos=this.string.length},skipTo:function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},backUp:function(e){this.pos-=e},column:function(){throw"not implemented"},indentation:function(){throw"not implemented"},match:function(e,t,n){if("string"!=typeof e){var i=this.string.slice(this.pos).match(e);return i&&i.index>0?null:(i&&!1!==t&&(this.pos+=i[0].length),i)}var o=function(e){return n?e.toLowerCase():e};if(o(this.string.substr(this.pos,e.length))==o(e))return!1!==t&&(this.pos+=e.length),!0},current:function(){return this.string.slice(this.start,this.pos)},hideFirstChars:function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}}};var m=function(){function e(t,n,i,o){a(this,e),this.cm=t,this.id=n,this.lineNumber=i+1,this.column=o+1,t.marks[this.id]=this}return l(e,[{key:"clear",value:function(){delete this.cm.marks[this.id]}},{key:"find",value:function(){return p(this)}}]),e}();function v(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=!0,o=i.KeyCode[e.keyCode];e.key&&(o=e.key,n=!1);var r=o,s=t;switch(e.keyCode){case i.KeyCode.Shift:case i.KeyCode.Meta:case i.KeyCode.Alt:case i.KeyCode.Ctrl:return r;case i.KeyCode.Escape:s=!0,r="Esc";break;case i.KeyCode.Space:s=!0}return o.startsWith("Key")||o.startsWith("KEY_")?r=o[o.length-1].toLowerCase():o.startsWith("Digit")?r=o.slice(5,6):o.startsWith("Numpad")?r=o.slice(6,7):o.endsWith("Arrow")?(s=!0,r=o.substring(0,o.length-5)):(o.startsWith("US_")||o.startsWith("Bracket")||!r)&&(r=e.browserEvent.key),s||e.altKey||e.ctrlKey||e.metaKey?(e.altKey&&(r="Alt-".concat(r)),e.ctrlKey&&(r="Ctrl-".concat(r)),e.metaKey&&(r="Meta-".concat(r)),e.shiftKey&&(r="Shift-".concat(r))):r=e.key||e.browserEvent.key,1===r.length&&n&&(r="'".concat(r,"'")),r}var y=function(){function e(t){a(this,e),b.call(this),this.editor=t,this.state={keyMap:"vim"},this.marks={},this.$uid=0,this.disposables=[],this.listeners={},this.curOp={},this.attached=!1,this.statusBar=null,this.options={},this.addLocalListeners(),this.ctxInsert=this.editor.createContextKey("insertMode",!0)}return l(e,[{key:"attach",value:function(){e.keyMap.vim.attach(this)}},{key:"addLocalListeners",value:function(){this.disposables.push(this.editor.onDidChangeCursorPosition(this.handleCursorChange),this.editor.onDidChangeModelContent(this.handleChange),this.editor.onKeyDown(this.handleKeyDown))}},{key:"handleReplaceMode",value:function(e,t){var n=!1,o=e,r=this.editor.getPosition(),s=new i.Range(r.lineNumber,r.column,r.lineNumber,r.column+1);if(e.startsWith("'"))o=e[1];else if("Enter"===o)o="\n";else{if("Backspace"!==o)return;var a=this.replaceStack.pop();if(!a)return;n=!0,o=a,s=new i.Range(r.lineNumber,r.column,r.lineNumber,r.column-1)}t.preventDefault(),t.stopPropagation(),this.replaceStack||(this.replaceStack=[]),n||this.replaceStack.push(this.editor.getModel().getValueInRange(s)),this.editor.executeEdits("vim",[{text:o,range:s,forceMoveMarkers:!0}]),n&&this.editor.setPosition(s.getStartPosition())}},{key:"setOption",value:function(e,t){this.state[e]=t,"theme"===e&&i.editor.setTheme(t)}},{key:"getConfiguration",value:function(){var e=this.editor,t=c;return"function"==typeof e.getConfiguration?e.getConfiguration():("EditorOption"in i.editor&&(t=i.editor.EditorOption),{readOnly:e.getOption(t.readOnly),viewInfo:{cursorWidth:e.getOption(t.cursorWidth)},fontInfo:e.getOption(t.fontInfo)})}},{key:"getOption",value:function(e){return"readOnly"===e?this.getConfiguration().readOnly:"firstLineNumber"===e?this.firstLine()+1:"indentWithTabs"===e?!this.editor.getModel().getOptions().insertSpaces:"function"==typeof this.editor.getConfiguration?this.editor.getRawConfiguration()[e]:this.editor.getRawOptions()[e]}},{key:"dispatch",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;it&&(e=t-1),this.editor.getModel().getLineContent(e+1)}},{key:"getAnchorForSelection",value:function(e){return e.isEmpty()?e.getPosition():e.getDirection()===i.SelectionDirection.LTR?e.getStartPosition():e.getEndPosition()}},{key:"getHeadForSelection",value:function(e){return e.isEmpty()?e.getPosition():e.getDirection()===i.SelectionDirection.LTR?e.getEndPosition():e.getStartPosition()}},{key:"getCursor",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;if(!e)return p(this.editor.getPosition());var t=this.editor.getSelection();return p(t.isEmpty()?t.getPosition():"anchor"===e?this.getAnchorForSelection(t):this.getHeadForSelection(t))}},{key:"getRange",value:function(e,t){var n=g(e),o=g(t);return this.editor.getModel().getValueInRange(i.Range.fromPositions(n,o))}},{key:"getSelection",value:function(){var e=[],t=this.editor;return t.getSelections().map((function(n){e.push(t.getModel().getValueInRange(n))})),e.join("\n")}},{key:"replaceRange",value:function(e,t,n){var o=g(t),r=n?g(n):o;this.editor.executeEdits("vim",[{text:e,range:i.Range.fromPositions(o,r)}]),this.pushUndoStop()}},{key:"pushUndoStop",value:function(){this.editor.pushUndoStop()}},{key:"setCursor",value:function(e,t){var n=e;"object"!==s(e)&&((n={}).line=e,n.ch=t);var i=this.editor.getModel().validatePosition(g(n));this.editor.setPosition(g(n)),this.editor.revealPosition(i)}},{key:"somethingSelected",value:function(){return!this.editor.getSelection().isEmpty()}},{key:"operation",value:function(e,t){return e()}},{key:"listSelections",value:function(){var e=this,t=this.editor.getSelections();return!t.length||this.inVirtualSelectionMode?[{anchor:this.getCursor("anchor"),head:this.getCursor("head")}]:t.map((function(t){return t.getPosition(),t.getStartPosition(),t.getEndPosition(),{anchor:e.clipPos(p(e.getAnchorForSelection(t))),head:e.clipPos(p(e.getHeadForSelection(t)))}}))}},{key:"focus",value:function(){this.editor.focus()}},{key:"setSelections",value:function(e,t){var n=!!this.editor.getSelections().length,o=e.map((function(e,t){var o=e.anchor,r=e.head;return n?i.Selection.fromPositions(g(o),g(r)):i.Selection.fromPositions(g(r),g(o))}));if(t&&o[t]&&o.push(o.splice(t,1)[0]),o.length){var r,s=o[0];r=s.getDirection()===i.SelectionDirection.LTR?s.getEndPosition():s.getStartPosition(),this.editor.setSelections(o),this.editor.revealPosition(r)}}},{key:"setSelection",value:function(e,t){var n=i.Range.fromPositions(g(e),g(t));this.editor.setSelection(n)}},{key:"getSelections",value:function(){var e=this.editor;return e.getSelections().map((function(t){return e.getModel().getValueInRange(t)}))}},{key:"replaceSelections",value:function(e){var t=this.editor;t.getSelections().forEach((function(n,i){t.executeEdits("vim",[{range:n,text:e[i],forceMoveMarkers:!1}])}))}},{key:"toggleOverwrite",value:function(e){e?(this.enterVimMode(),this.replaceMode=!0):(this.leaveVimMode(),this.replaceMode=!1,this.replaceStack=[])}},{key:"charCoords",value:function(e,t){return{top:e.line,left:e.ch}}},{key:"coordsChar",value:function(e,t){}},{key:"clipPos",value:function(e){return p(this.editor.getModel().validatePosition(g(e)))}},{key:"setBookmark",value:function(e,t){var n=new m(this,this.$uid++,e.line,e.ch);return t&&t.insertLeft||(n.$insertRight=!0),this.marks[n.id]=n,n}},{key:"getScrollInfo",value:function(){var e,t,n=this.editor,i=(e=n.getVisibleRanges(),t=1,function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var i,o,r=[],s=!0,a=!1;try{for(n=n.call(e);!(s=(i=n.next()).done)&&(r.push(i.value),!t||r.length!==t);s=!0);}catch(e){a=!0,o=e}finally{try{s||null==n.return||n.return()}finally{if(a)throw o}}return r}}(e,t)||function(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())[0];return{left:0,top:i.startLineNumber-1,height:n.getModel().getLineCount(),clientHeight:i.endLineNumber-i.startLineNumber+1}}},{key:"triggerEditorAction",value:function(e){this.editor.trigger("vim",e)}},{key:"dispose",value:function(){this.dispatch("dispose"),this.removeOverlay(),e.keyMap.vim&&e.keyMap.vim.detach(this),this.disposables.forEach((function(e){return e.dispose()}))}},{key:"getInputField",value:function(){}},{key:"getWrapperElement",value:function(){}},{key:"enterVimMode",value:function(){this.ctxInsert.set(!1);var e=this.getConfiguration();this.initialCursorWidth=e.viewInfo.cursorWidth||0,this.editor.updateOptions({cursorWidth:e.fontInfo.typicalFullwidthCharacterWidth,cursorBlinking:"solid"})}},{key:"leaveVimMode",value:function(){this.ctxInsert.set(!0),this.editor.updateOptions({cursorWidth:this.initialCursorWidth||0,cursorBlinking:"blink"})}},{key:"virtualSelectionMode",value:function(){return this.inVirtualSelectionMode}},{key:"markText",value:function(){return{clear:function(){},find:function(){}}}},{key:"getUserVisibleLines",value:function(){var e=this.editor.getVisibleRanges();if(!e.length)return{top:0,bottom:0};var t={top:1/0,bottom:0};return e.reduce((function(e,t){return t.startLineNumbere.bottom&&(e.bottom=t.endLineNumber),e}),t),t.top-=1,t.bottom-=1,t}},{key:"findPosV",value:function(e,t,n){var i=this.editor,o=t,r=n,s=g(e);if("page"===n){var a=i.getLayoutInfo().height,u=this.getConfiguration().fontInfo.lineHeight;o*=Math.floor(a/u),r="line"}return"line"===r&&(s.lineNumber+=o),p(s)}},{key:"findMatchingBracket",value:function(e){var t,n,i=g(e),o=this.editor.getModel();return(t=o.bracketPairs?o.bracketPairs.matchBracket(i):null===(n=o.matchBracket)||void 0===n?void 0:n.call(o,i))&&2===t.length?{to:p(t[1].getStartPosition())}:{to:null}}},{key:"findFirstNonWhiteSpaceCharacter",value:function(e){return this.editor.getModel().getLineFirstNonWhitespaceColumn(e+1)-1}},{key:"scrollTo",value:function(e,t){(e||t)&&(e||(t<0&&(t=this.editor.getPosition().lineNumber-t),this.editor.setScrollTop(this.editor.getTopForLineNumber(t+1))))}},{key:"moveCurrentLineTo",value:function(e){var t,n=this.editor,o=n.getPosition(),r=i.Range.fromPositions(o,o);switch(e){case"top":return void n.revealRangeAtTop(r);case"center":return void n.revealRangeInCenter(r);case"bottom":return void(null===(t=n._revealRange)||void 0===t||t.call(n,r,4))}}},{key:"getSearchCursor",value:function(e,t){var n=!1,i=!1;e instanceof RegExp&&!e.global&&(n=!e.ignoreCase,e=e.source,i=!0),null==t.ch&&(t.ch=Number.MAX_VALUE);var o=g(t),r=this,s=this.editor,a=null,u=s.getModel(),l=u.findMatches(e,!1,i,n)||[];return{getMatches:function(){return l},findNext:function(){return this.find(!1)},findPrevious:function(){return this.find(!0)},jumpTo:function(e){if(!l||!l.length)return!1;var t=l[e];return a=t.range,r.highlightRanges([a],"currentFindMatch"),r.highlightRanges(l.map((function(e){return e.range})).filter((function(e){return!e.equalsRange(a)}))),a},find:function(t){if(!l||!l.length)return!1;var s;if(t){var c=a?a.getStartPosition():o;if(!(s=u.findPreviousMatch(e,c,i,n))||!s.range.getStartPosition().isBeforeOrEqual(c))return!1}else{var h=a?u.getPositionAt(u.getOffsetAt(a.getStartPosition())+1):o;if(!(s=u.findNextMatch(e,h,i,n))||!h.isBeforeOrEqual(s.range.getStartPosition()))return!1}return a=s.range,r.highlightRanges([a],"currentFindMatch"),r.highlightRanges(l.map((function(e){return e.range})).filter((function(e){return!e.equalsRange(a)}))),a},from:function(){return a&&p(a.getStartPosition())},to:function(){return a&&p(a.getEndPosition())},replace:function(e){a&&(s.executeEdits("vim",[{range:a,text:e,forceMoveMarkers:!0}]),a.setEndPosition(s.getPosition()),s.setPosition(a.getStartPosition()))}}}},{key:"highlightRanges",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"findMatch",n="decoration".concat(t);return this[n]=this.editor.deltaDecorations(this[n]||[],e.map((function(e){return{range:e,options:{stickiness:i.editor.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges,zIndex:13,className:t,showIfCollapsed:!0}}}))),this[n]}},{key:"addOverlay",value:function(e,t,n){var i=e.query,o=!1,r=!1;i&&i instanceof RegExp&&!i.global&&(r=!0,o=!i.ignoreCase,i=i.source);var s=this.editor.getModel().findNextMatch(i,this.editor.getPosition(),r,o);s&&s.range&&this.highlightRanges([s.range])}},{key:"removeOverlay",value:function(){var e=this;["currentFindMatch","findMatch"].forEach((function(t){e.editor.deltaDecorations(e["decoration".concat(t)]||[],[])}))}},{key:"scrollIntoView",value:function(e){e&&this.editor.revealPosition(g(e))}},{key:"moveH",value:function(e,t){if("char"===t){var n=this.editor.getPosition();this.editor.setPosition(new i.Position(n.lineNumber,n.column+e))}}},{key:"scanForBracket",value:function(t,n,i,o){for(var r=o.bracketRegex,s=g(t),a=this.editor.getModel(),u=(-1===n?a.findPreviousMatch:a.findNextMatch).bind(a),l=[],c=0;;){if(c>10)return;var h=u(r.source,s,!0,!0,null,!0),d=h.matches[0];if(void 0===h)return;var f=e.matchingBrackets[d];if(f&&">"===f.charAt(1)==n>0)l.push(d);else{if(0===l.length)return{pos:p(h.range.getStartPosition())};l.pop()}s=a.getPositionAt(a.getOffsetAt(h.range.getStartPosition())+n),c+=1}}},{key:"indexFromPos",value:function(e){return this.editor.getModel().getOffsetAt(g(e))}},{key:"posFromIndex",value:function(e){return p(this.editor.getModel().getPositionAt(e))}},{key:"indentLine",value:function(e){var t,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=this.editor;t=r._getViewModel?r._getViewModel().cursorConfig:r._getCursors().context.config;var s=new i.Position(e+1,1),a=i.Selection.fromPositions(s,s);r.executeCommand("vim",new o.ShiftCommand(a,{isUnshift:!n,tabSize:t.tabSize,indentSize:t.indentSize,insertSpaces:t.insertSpaces,useTabStops:t.useTabStops,autoIndent:t.autoIndent}))}},{key:"setStatusBar",value:function(e){this.statusBar=e}},{key:"openDialog",value:function(e,t,n){if(this.statusBar)return this.statusBar.setSec(e,t,n)}},{key:"openNotification",value:function(e){this.statusBar&&this.statusBar.showNotification(e)}},{key:"smartIndent",value:function(){this.editor.getAction("editor.action.formatSelection").run()}},{key:"moveCursorTo",value:function(e){var t=this.editor.getPosition();"start"===e?t.column=1:"end"===e&&(t.column=this.editor.getModel().getLineMaxColumn(t.lineNumber)),this.editor.setPosition(t)}},{key:"execCommand",value:function(e){switch(e){case"goLineLeft":this.moveCursorTo("start");break;case"goLineRight":this.moveCursorTo("end");break;case"indentAuto":this.smartIndent()}}}]),e}();y.Pos=d,y.signal=function(e,t,n){e.dispatch(t,n)},y.on=function(){},y.off=function(){},y.addClass=function(){},y.rmClass=function(){},y.defineOption=function(){},y.keyMap={default:function(e){return function(e){return!0}}},y.matchingBrackets={"(":")>",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<","<":">>",">":"<<"},y.isWordChar=function(e){return/\w/.test(e)||e>"€"&&(e.toUpperCase()!=e.toLowerCase()||h.test(e))},y.keyName=v,y.StringStream=f,y.e_stop=function(e){return e.stopPropagation?e.stopPropagation():e.cancelBubble=!0,y.e_preventDefault(e),!1},y.e_preventDefault=function(e){return e.preventDefault?(e.preventDefault(),e.browserEvent&&e.browserEvent.preventDefault()):e.returnValue=!1,!1},y.commands={redo:function(e){e.editor.getModel().redo()},undo:function(e){e.editor.getModel().undo()},newlineAndIndent:function(e){e.triggerEditorAction("editor.action.insertLineAfter")}},y.lookupKey=function e(t,n,i){"string"==typeof n&&(n=y.keyMap[n]);var o="function"==typeof n?n(t):n[t];if(!1===o)return"nothing";if("..."===o)return"multi";if(null!=o&&i(o))return"handled";if(n.fallthrough){if(!Array.isArray(n.fallthrough))return e(t,n.fallthrough,i);for(var r=0;r{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"StatusBar",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"VimMode",{enumerable:!0,get:function(){return i.default}}),t.initVimMode=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:o.default,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,s=new i.default(e);if(!t)return s.attach(),s;var a=new n(t,e,r),u="";return s.on("vim-mode-change",(function(e){a.setMode(e)})),s.on("vim-keypress",(function(e){":"===e?u="":u+=e,a.setKeyBuffer(u)})),s.on("vim-command-done",(function(){u="",a.setKeyBuffer(u)})),s.on("dispose",(function(){a.toggleVisibility(!1),a.closeInput(),a.clear()})),a.toggleVisibility(!0),s.setStatusBar(a),s.attach(),s};var i=r(n(1655)),o=r(n(6817));function r(e){return e&&e.__esModule?e:{default:e}}},6817:(e,t)=>{"use strict";function n(e,t){for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:null;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.closeInput=function(){i.removeInputListeners(),i.input=null,i.setSec(""),i.editor&&i.editor.focus()},this.clear=function(){i.setInnerHtml_(i.node,"")},this.inputKeyUp=function(e){var t=i.input.options;t&&t.onKeyUp&&t.onKeyUp(e,e.target.value,i.closeInput)},this.inputKeyInput=function(e){var t=i.input.options;t&&t.onKeyInput&&t.onKeyUp(e,e.target.value,i.closeInput)},this.inputBlur=function(){i.input.options.closeOnBlur&&i.closeInput()},this.inputKeyDown=function(e){var t=i.input,n=t.options,o=t.callback;n&&n.onKeyDown&&n.onKeyDown(e,e.target.value,i.closeInput)||((27===e.keyCode||n&&!1!==n.closeOnEnter&&13==e.keyCode)&&(i.input.node.blur(),e.stopPropagation(),i.closeInput()),13===e.keyCode&&o&&(e.stopPropagation(),e.preventDefault(),o(e.target.value)))},this.node=t,this.modeInfoNode=document.createElement("span"),this.secInfoNode=document.createElement("span"),this.notifNode=document.createElement("span"),this.notifNode.className="vim-notification",this.keyInfoNode=document.createElement("span"),this.keyInfoNode.setAttribute("style","float: right"),this.node.appendChild(this.modeInfoNode),this.node.appendChild(this.secInfoNode),this.node.appendChild(this.notifNode),this.node.appendChild(this.keyInfoNode),this.toggleVisibility(!1),this.editor=n,this.sanitizer=o}var t,i;return t=e,(i=[{key:"setMode",value:function(e){"visual"!==e.mode?this.setText("--".concat(e.mode.toUpperCase(),"--")):"linewise"===e.subMode?this.setText("--VISUAL LINE--"):"blockwise"===e.subMode?this.setText("--VISUAL BLOCK--"):this.setText("--VISUAL--")}},{key:"setKeyBuffer",value:function(e){this.keyInfoNode.textContent=e}},{key:"setSec",value:function(e,t,n){if(this.notifNode.textContent="",void 0===e)return this.closeInput;this.setInnerHtml_(this.secInfoNode,e);var i=this.secInfoNode.querySelector("input");return i&&(i.focus(),this.input={callback:t,options:n,node:i},n&&(n.selectValueOnOpen&&i.select(),n.value&&(i.value=n.value)),this.addInputListeners()),this.closeInput}},{key:"setText",value:function(e){this.modeInfoNode.textContent=e}},{key:"toggleVisibility",value:function(e){this.node.style.display=e?"block":"none",this.input&&this.removeInputListeners(),clearInterval(this.notifTimeout)}},{key:"addInputListeners",value:function(){var e=this.input.node;e.addEventListener("keyup",this.inputKeyUp),e.addEventListener("keydown",this.inputKeyDown),e.addEventListener("input",this.inputKeyInput),e.addEventListener("blur",this.inputBlur)}},{key:"removeInputListeners",value:function(){if(this.input&&this.input.node){var e=this.input.node;e.removeEventListener("keyup",this.inputKeyUp),e.removeEventListener("keydown",this.inputKeyDown),e.removeEventListener("input",this.inputKeyInput),e.removeEventListener("blur",this.inputBlur)}}},{key:"showNotification",value:function(e){var t=this,n=document.createElement("span");this.setInnerHtml_(n,e),this.notifNode.textContent=n.textContent,this.notifTimeout=setTimeout((function(){t.notifNode.textContent=""}),5e3)}},{key:"setInnerHtml_",value:function(e,t){for(;e.childNodes.length;)e.removeChild(e.childNodes[0]);t&&(this.sanitizer?e.appendChild(this.sanitizer(t)):e.appendChild(t))}}])&&n(t.prototype,i),Object.defineProperty(t,"prototype",{writable:!1}),e}();t.default=i},2935:(e,t)=>{t.endianness=function(){return"LE"},t.hostname=function(){return"undefined"!=typeof location?location.hostname:""},t.loadavg=function(){return[]},t.uptime=function(){return 0},t.freemem=function(){return Number.MAX_VALUE},t.totalmem=function(){return Number.MAX_VALUE},t.cpus=function(){return[]},t.type=function(){return"Browser"},t.release=function(){return"undefined"!=typeof navigator?navigator.appVersion:""},t.networkInterfaces=t.getNetworkInterfaces=function(){return{}},t.arch=function(){return"javascript"},t.platform=function(){return"browser"},t.tmpdir=t.tmpDir=function(){return"/tmp"},t.EOL="\n",t.homedir=function(){return"/"}},2082:(e,t,n)=>{"use strict";var i=n(3529);t.certificate=n(8244);var o=i.define("RSAPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("modulus").int(),this.key("publicExponent").int(),this.key("privateExponent").int(),this.key("prime1").int(),this.key("prime2").int(),this.key("exponent1").int(),this.key("exponent2").int(),this.key("coefficient").int())}));t.RSAPrivateKey=o;var r=i.define("RSAPublicKey",(function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())}));t.RSAPublicKey=r;var s=i.define("AlgorithmIdentifier",(function(){this.seq().obj(this.key("algorithm").objid(),this.key("none").null_().optional(),this.key("curve").objid().optional(),this.key("params").seq().obj(this.key("p").int(),this.key("q").int(),this.key("g").int()).optional())})),a=i.define("SubjectPublicKeyInfo",(function(){this.seq().obj(this.key("algorithm").use(s),this.key("subjectPublicKey").bitstr())}));t.PublicKey=a;var u=i.define("PrivateKeyInfo",(function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(s),this.key("subjectPrivateKey").octstr())}));t.PrivateKey=u;var l=i.define("EncryptedPrivateKeyInfo",(function(){this.seq().obj(this.key("algorithm").seq().obj(this.key("id").objid(),this.key("decrypt").seq().obj(this.key("kde").seq().obj(this.key("id").objid(),this.key("kdeparams").seq().obj(this.key("salt").octstr(),this.key("iters").int())),this.key("cipher").seq().obj(this.key("algo").objid(),this.key("iv").octstr()))),this.key("subjectPrivateKey").octstr())}));t.EncryptedPrivateKey=l;var c=i.define("DSAPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("p").int(),this.key("q").int(),this.key("g").int(),this.key("pub_key").int(),this.key("priv_key").int())}));t.DSAPrivateKey=c,t.DSAparam=i.define("DSAparam",(function(){this.int()}));var h=i.define("ECParameters",(function(){this.choice({namedCurve:this.objid()})})),d=i.define("ECPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(h),this.key("publicKey").optional().explicit(1).bitstr())}));t.ECPrivateKey=d,t.signature=i.define("signature",(function(){this.seq().obj(this.key("r").int(),this.key("s").int())}))},8244:(e,t,n)=>{"use strict";var i=n(3529),o=i.define("Time",(function(){this.choice({utcTime:this.utctime(),generalTime:this.gentime()})})),r=i.define("AttributeTypeValue",(function(){this.seq().obj(this.key("type").objid(),this.key("value").any())})),s=i.define("AlgorithmIdentifier",(function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional(),this.key("curve").objid().optional())})),a=i.define("SubjectPublicKeyInfo",(function(){this.seq().obj(this.key("algorithm").use(s),this.key("subjectPublicKey").bitstr())})),u=i.define("RelativeDistinguishedName",(function(){this.setof(r)})),l=i.define("RDNSequence",(function(){this.seqof(u)})),c=i.define("Name",(function(){this.choice({rdnSequence:this.use(l)})})),h=i.define("Validity",(function(){this.seq().obj(this.key("notBefore").use(o),this.key("notAfter").use(o))})),d=i.define("Extension",(function(){this.seq().obj(this.key("extnID").objid(),this.key("critical").bool().def(!1),this.key("extnValue").octstr())})),f=i.define("TBSCertificate",(function(){this.seq().obj(this.key("version").explicit(0).int().optional(),this.key("serialNumber").int(),this.key("signature").use(s),this.key("issuer").use(c),this.key("validity").use(h),this.key("subject").use(c),this.key("subjectPublicKeyInfo").use(a),this.key("issuerUniqueID").implicit(1).bitstr().optional(),this.key("subjectUniqueID").implicit(2).bitstr().optional(),this.key("extensions").explicit(3).seqof(d).optional())})),p=i.define("X509Certificate",(function(){this.seq().obj(this.key("tbsCertificate").use(f),this.key("signatureAlgorithm").use(s),this.key("signatureValue").bitstr())}));e.exports=p},272:(e,t,n)=>{"use strict";var i=/Proc-Type: 4,ENCRYPTED[\n\r]+DEK-Info: AES-((?:128)|(?:192)|(?:256))-CBC,([0-9A-H]+)[\n\r]+([0-9A-z\n\r+/=]+)[\n\r]+/m,o=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----/m,r=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----([0-9A-z\n\r+/=]+)-----END \1-----$/m,s=n(8819),a=n(8668),u=n(1059).Buffer;e.exports=function(e,t){var n,l=e.toString(),c=l.match(i);if(c){var h="aes"+c[1],d=u.from(c[2],"hex"),f=u.from(c[3].replace(/[\r\n]/g,""),"base64"),p=s(t,d.slice(0,8),parseInt(c[1],10)).key,g=[],m=a.createDecipheriv(h,p,d);g.push(m.update(f)),g.push(m.final()),n=u.concat(g)}else{var v=l.match(r);n=u.from(v[2].replace(/[\r\n]/g,""),"base64")}return{tag:l.match(o)[1],data:n}}},5891:(e,t,n)=>{"use strict";var i=n(2082),o=n(5579),r=n(272),s=n(8668),a=n(853),u=n(1059).Buffer;function l(e){var t;"object"!=typeof e||u.isBuffer(e)||(t=e.passphrase,e=e.key),"string"==typeof e&&(e=u.from(e));var n,l,c=r(e,t),h=c.tag,d=c.data;switch(h){case"CERTIFICATE":l=i.certificate.decode(d,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":switch(l||(l=i.PublicKey.decode(d,"der")),n=l.algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return i.RSAPublicKey.decode(l.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return l.subjectPrivateKey=l.subjectPublicKey,{type:"ec",data:l};case"1.2.840.10040.4.1":return l.algorithm.params.pub_key=i.DSAparam.decode(l.subjectPublicKey.data,"der"),{type:"dsa",data:l.algorithm.params};default:throw new Error("unknown key id "+n)}case"ENCRYPTED PRIVATE KEY":d=function(e,t){var n=e.algorithm.decrypt.kde.kdeparams.salt,i=parseInt(e.algorithm.decrypt.kde.kdeparams.iters.toString(),10),r=o[e.algorithm.decrypt.cipher.algo.join(".")],l=e.algorithm.decrypt.cipher.iv,c=e.subjectPrivateKey,h=parseInt(r.split("-")[1],10)/8,d=a.pbkdf2Sync(t,n,i,h,"sha1"),f=s.createDecipheriv(r,d,l),p=[];return p.push(f.update(c)),p.push(f.final()),u.concat(p)}(d=i.EncryptedPrivateKey.decode(d,"der"),t);case"PRIVATE KEY":switch(n=(l=i.PrivateKey.decode(d,"der")).algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return i.RSAPrivateKey.decode(l.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:l.algorithm.curve,privateKey:i.ECPrivateKey.decode(l.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return l.algorithm.params.priv_key=i.DSAparam.decode(l.subjectPrivateKey,"der"),{type:"dsa",params:l.algorithm.params};default:throw new Error("unknown key id "+n)}case"RSA PUBLIC KEY":return i.RSAPublicKey.decode(d,"der");case"RSA PRIVATE KEY":return i.RSAPrivateKey.decode(d,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:i.DSAPrivateKey.decode(d,"der")};case"EC PRIVATE KEY":return{curve:(d=i.ECPrivateKey.decode(d,"der")).parameters.value,privateKey:d.privateKey};default:throw new Error("unknown key type "+h)}}l.signature=i.signature,e.exports=l},1059:(e,t,n)=>{var i=n(1278),o=i.Buffer;function r(e,t){for(var n in e)t[n]=e[n]}function s(e,t,n){return o(e,t,n)}o.from&&o.alloc&&o.allocUnsafe&&o.allocUnsafeSlow?e.exports=i:(r(i,t),t.Buffer=s),s.prototype=Object.create(o.prototype),r(o,s),s.from=function(e,t,n){if("number"==typeof e)throw new TypeError("Argument must not be a number");return o(e,t,n)},s.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError("Argument must be a number");var i=o(e);return void 0!==t?"string"==typeof n?i.fill(t,n):i.fill(t):i.fill(0),i},s.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return o(e)},s.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i.SlowBuffer(e)}},4708:(e,t,n)=>{"use strict";var i=n(8957);function o(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}function r(e,t){for(var n,i="",o=0,r=-1,s=0,a=0;a<=e.length;++a){if(a2){var u=i.lastIndexOf("/");if(u!==i.length-1){-1===u?(i="",o=0):o=(i=i.slice(0,u)).length-1-i.lastIndexOf("/"),r=a,s=0;continue}}else if(2===i.length||1===i.length){i="",o=0,r=a,s=0;continue}t&&(i.length>0?i+="/..":i="..",o=2)}else i.length>0?i+="/"+e.slice(r+1,a):i=e.slice(r+1,a),o=a-r-1;r=a,s=0}else 46===n&&-1!==s?++s:s=-1}return i}var s={resolve:function(){for(var e,t="",n=!1,s=arguments.length-1;s>=-1&&!n;s--){var a;s>=0?a=arguments[s]:(void 0===e&&(e=i.cwd()),a=e),o(a),0!==a.length&&(t=a+"/"+t,n=47===a.charCodeAt(0))}return t=r(t,!n),n?t.length>0?"/"+t:"/":t.length>0?t:"."},normalize:function(e){if(o(e),0===e.length)return".";var t=47===e.charCodeAt(0),n=47===e.charCodeAt(e.length-1);return 0!==(e=r(e,!t)).length||t||(e="."),e.length>0&&n&&(e+="/"),t?"/"+e:e},isAbsolute:function(e){return o(e),e.length>0&&47===e.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var e,t=0;t0&&(void 0===e?e=n:e+="/"+n)}return void 0===e?".":s.normalize(e)},relative:function(e,t){if(o(e),o(t),e===t)return"";if((e=s.resolve(e))===(t=s.resolve(t)))return"";for(var n=1;nl){if(47===t.charCodeAt(a+h))return t.slice(a+h+1);if(0===h)return t.slice(a+h)}else r>l&&(47===e.charCodeAt(n+h)?c=h:0===h&&(c=0));break}var d=e.charCodeAt(n+h);if(d!==t.charCodeAt(a+h))break;47===d&&(c=h)}var f="";for(h=n+c+1;h<=i;++h)h!==i&&47!==e.charCodeAt(h)||(0===f.length?f+="..":f+="/..");return f.length>0?f+t.slice(a+c):(a+=c,47===t.charCodeAt(a)&&++a,t.slice(a))},_makeLong:function(e){return e},dirname:function(e){if(o(e),0===e.length)return".";for(var t=e.charCodeAt(0),n=47===t,i=-1,r=!0,s=e.length-1;s>=1;--s)if(47===(t=e.charCodeAt(s))){if(!r){i=s;break}}else r=!1;return-1===i?n?"/":".":n&&1===i?"//":e.slice(0,i)},basename:function(e,t){if(void 0!==t&&"string"!=typeof t)throw new TypeError('"ext" argument must be a string');o(e);var n,i=0,r=-1,s=!0;if(void 0!==t&&t.length>0&&t.length<=e.length){if(t.length===e.length&&t===e)return"";var a=t.length-1,u=-1;for(n=e.length-1;n>=0;--n){var l=e.charCodeAt(n);if(47===l){if(!s){i=n+1;break}}else-1===u&&(s=!1,u=n+1),a>=0&&(l===t.charCodeAt(a)?-1==--a&&(r=n):(a=-1,r=u))}return i===r?r=u:-1===r&&(r=e.length),e.slice(i,r)}for(n=e.length-1;n>=0;--n)if(47===e.charCodeAt(n)){if(!s){i=n+1;break}}else-1===r&&(s=!1,r=n+1);return-1===r?"":e.slice(i,r)},extname:function(e){o(e);for(var t=-1,n=0,i=-1,r=!0,s=0,a=e.length-1;a>=0;--a){var u=e.charCodeAt(a);if(47!==u)-1===i&&(r=!1,i=a+1),46===u?-1===t?t=a:1!==s&&(s=1):-1!==t&&(s=-1);else if(!r){n=a+1;break}}return-1===t||-1===i||0===s||1===s&&t===i-1&&t===n+1?"":e.slice(t,i)},format:function(e){if(null===e||"object"!=typeof e)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return function(e,t){var n=t.dir||t.root,i=t.base||(t.name||"")+(t.ext||"");return n?n===t.root?n+i:n+"/"+i:i}(0,e)},parse:function(e){o(e);var t={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return t;var n,i=e.charCodeAt(0),r=47===i;r?(t.root="/",n=1):n=0;for(var s=-1,a=0,u=-1,l=!0,c=e.length-1,h=0;c>=n;--c)if(47!==(i=e.charCodeAt(c)))-1===u&&(l=!1,u=c+1),46===i?-1===s?s=c:1!==h&&(h=1):-1!==s&&(h=-1);else if(!l){a=c+1;break}return-1===s||-1===u||0===h||1===h&&s===u-1&&s===a+1?-1!==u&&(t.base=t.name=0===a&&r?e.slice(1,u):e.slice(a,u)):(0===a&&r?(t.name=e.slice(1,s),t.base=e.slice(1,u)):(t.name=e.slice(a,s),t.base=e.slice(a,u)),t.ext=e.slice(s,u)),a>0?t.dir=e.slice(0,a-1):r&&(t.dir="/"),t},sep:"/",delimiter:":",win32:null,posix:null};s.posix=s,e.exports=s},853:(e,t,n)=>{t.pbkdf2=n(285),t.pbkdf2Sync=n(1895)},285:(e,t,n)=>{var i,o,r=n(2238).Buffer,s=n(399),a=n(7424),u=n(1895),l=n(2483),c=n.g.crypto&&n.g.crypto.subtle,h={sha:"SHA-1","sha-1":"SHA-1",sha1:"SHA-1",sha256:"SHA-256","sha-256":"SHA-256",sha384:"SHA-384","sha-384":"SHA-384","sha-512":"SHA-512",sha512:"SHA-512"},d=[];function f(){return o||(o=n.g.process&&n.g.process.nextTick?n.g.process.nextTick:n.g.queueMicrotask?n.g.queueMicrotask:n.g.setImmediate?n.g.setImmediate:n.g.setTimeout)}function p(e,t,n,i,o){return c.importKey("raw",e,{name:"PBKDF2"},!1,["deriveBits"]).then((function(e){return c.deriveBits({name:"PBKDF2",salt:t,iterations:n,hash:{name:o}},e,i<<3)})).then((function(e){return r.from(e)}))}e.exports=function(e,t,o,g,m,v){"function"==typeof m&&(v=m,m=void 0);var y=h[(m=m||"sha1").toLowerCase()];if(y&&"function"==typeof n.g.Promise){if(s(o,g),e=l(e,a,"Password"),t=l(t,a,"Salt"),"function"!=typeof v)throw new Error("No callback provided to pbkdf2");!function(e,t){e.then((function(e){f()((function(){t(null,e)}))}),(function(e){f()((function(){t(e)}))}))}(function(e){if(n.g.process&&!n.g.process.browser)return Promise.resolve(!1);if(!c||!c.importKey||!c.deriveBits)return Promise.resolve(!1);if(void 0!==d[e])return d[e];var t=p(i=i||r.alloc(8),i,10,128,e).then((function(){return!0})).catch((function(){return!1}));return d[e]=t,t}(y).then((function(n){return n?p(e,t,o,g,y):u(e,t,o,g,m)})),v)}else f()((function(){var n;try{n=u(e,t,o,g,m)}catch(e){return v(e)}v(null,n)}))}},7424:(e,t,n)=>{var i,o=n(8957);i=n.g.process&&n.g.process.browser?"utf-8":n.g.process&&n.g.process.version?parseInt(o.version.split(".")[0].slice(1),10)>=6?"utf-8":"binary":"utf-8",e.exports=i},399:e=>{var t=Math.pow(2,30)-1;e.exports=function(e,n){if("number"!=typeof e)throw new TypeError("Iterations not a number");if(e<0)throw new TypeError("Bad iterations");if("number"!=typeof n)throw new TypeError("Key length not a number");if(n<0||n>t||n!=n)throw new TypeError("Bad key length")}},1895:(e,t,n)=>{var i=n(4159),o=n(2428),r=n(5203),s=n(2238).Buffer,a=n(399),u=n(7424),l=n(2483),c=s.alloc(128),h={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};function d(e,t,n){var a=function(e){return"rmd160"===e||"ripemd160"===e?function(e){return(new o).update(e).digest()}:"md5"===e?i:function(t){return r(e).update(t).digest()}}(e),u="sha512"===e||"sha384"===e?128:64;t.length>u?t=a(t):t.length{var i=n(2238).Buffer;e.exports=function(e,t,n){if(i.isBuffer(e))return e;if("string"==typeof e)return i.from(e,t);if(ArrayBuffer.isView(e))return i.from(e.buffer);throw new TypeError(n+" must be a string, a Buffer, a typed array or a DataView")}},2808:(e,t,n)=>{"use strict";var i=n(8957);void 0===i||!i.version||0===i.version.indexOf("v0.")||0===i.version.indexOf("v1.")&&0!==i.version.indexOf("v1.8.")?e.exports={nextTick:function(e,t,n,o){if("function"!=typeof e)throw new TypeError('"callback" argument must be a function');var r,s,a=arguments.length;switch(a){case 0:case 1:return i.nextTick(e);case 2:return i.nextTick((function(){e.call(null,t)}));case 3:return i.nextTick((function(){e.call(null,t,n)}));case 4:return i.nextTick((function(){e.call(null,t,n,o)}));default:for(r=new Array(a-1),s=0;s{var t,n,i=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function r(){throw new Error("clearTimeout has not been defined")}function s(e){if(t===setTimeout)return setTimeout(e,0);if((t===o||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(n){try{return t.call(null,e,0)}catch(n){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:o}catch(e){t=o}try{n="function"==typeof clearTimeout?clearTimeout:r}catch(e){n=r}}();var a,u=[],l=!1,c=-1;function h(){l&&a&&(l=!1,a.length?u=a.concat(u):c=-1,u.length&&d())}function d(){if(!l){var e=s(h);l=!0;for(var t=u.length;t;){for(a=u,u=[];++c1)for(var n=1;n{t.publicEncrypt=n(3347),t.privateDecrypt=n(2965),t.privateEncrypt=function(e,n){return t.publicEncrypt(e,n,!0)},t.publicDecrypt=function(e,n){return t.privateDecrypt(e,n,!0)}},9643:(e,t,n)=>{var i=n(2059),o=n(2238).Buffer;function r(e){var t=o.allocUnsafe(4);return t.writeUInt32BE(e,0),t}e.exports=function(e,t){for(var n,s=o.alloc(0),a=0;s.length=65&&n<=70?n-55:n>=97&&n<=102?n-87:n-48&15}function u(e,t,n){var i=a(e,n);return n-1>=t&&(i|=a(e,n-1)<<4),i}function l(e,t,n,i){for(var o=0,r=Math.min(e.length,n),s=t;s=49?a-49+10:a>=17?a-17+10:a}return o}r.isBN=function(e){return e instanceof r||null!==e&&"object"==typeof e&&e.constructor.wordSize===r.wordSize&&Array.isArray(e.words)},r.max=function(e,t){return e.cmp(t)>0?e:t},r.min=function(e,t){return e.cmp(t)<0?e:t},r.prototype._init=function(e,t,n){if("number"==typeof e)return this._initNumber(e,t,n);if("object"==typeof e)return this._initArray(e,t,n);"hex"===t&&(t=16),i(t===(0|t)&&t>=2&&t<=36);var o=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(o++,this.negative=1),o=0;o-=3)s=e[o]|e[o-1]<<8|e[o-2]<<16,this.words[r]|=s<>>26-a&67108863,(a+=24)>=26&&(a-=26,r++);else if("le"===n)for(o=0,r=0;o>>26-a&67108863,(a+=24)>=26&&(a-=26,r++);return this.strip()},r.prototype._parseHex=function(e,t,n){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var i=0;i=t;i-=2)o=u(e,t,i)<=18?(r-=18,s+=1,this.words[s]|=o>>>26):r+=8;else for(i=(e.length-t)%2==0?t+1:t;i=18?(r-=18,s+=1,this.words[s]|=o>>>26):r+=8;this.strip()},r.prototype._parseBase=function(e,t,n){this.words=[0],this.length=1;for(var i=0,o=1;o<=67108863;o*=t)i++;i--,o=o/t|0;for(var r=e.length-n,s=r%i,a=Math.min(r,r-s)+n,u=0,c=n;c1&&0===this.words[this.length-1];)this.length--;return this._normSign()},r.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},r.prototype.inspect=function(){return(this.red?""};var c=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],h=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],d=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function f(e,t,n){n.negative=t.negative^e.negative;var i=e.length+t.length|0;n.length=i,i=i-1|0;var o=0|e.words[0],r=0|t.words[0],s=o*r,a=67108863&s,u=s/67108864|0;n.words[0]=a;for(var l=1;l>>26,h=67108863&u,d=Math.min(l,t.length-1),f=Math.max(0,l-e.length+1);f<=d;f++){var p=l-f|0;c+=(s=(o=0|e.words[p])*(r=0|t.words[f])+h)/67108864|0,h=67108863&s}n.words[l]=0|h,u=0|c}return 0!==u?n.words[l]=0|u:n.length--,n.strip()}r.prototype.toString=function(e,t){var n;if(t=0|t||1,16===(e=e||10)||"hex"===e){n="";for(var o=0,r=0,s=0;s>>24-o&16777215)||s!==this.length-1?c[6-u.length]+u+n:u+n,(o+=2)>=26&&(o-=26,s--)}for(0!==r&&(n=r.toString(16)+n);n.length%t!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(e===(0|e)&&e>=2&&e<=36){var l=h[e],f=d[e];n="";var p=this.clone();for(p.negative=0;!p.isZero();){var g=p.modn(f).toString(e);n=(p=p.idivn(f)).isZero()?g+n:c[l-g.length]+g+n}for(this.isZero()&&(n="0"+n);n.length%t!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}i(!1,"Base should be between 2 and 36")},r.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&i(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},r.prototype.toJSON=function(){return this.toString(16)},r.prototype.toBuffer=function(e,t){return i(void 0!==s),this.toArrayLike(s,e,t)},r.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},r.prototype.toArrayLike=function(e,t,n){var o=this.byteLength(),r=n||Math.max(1,o);i(o<=r,"byte array longer than desired length"),i(r>0,"Requested array length <= 0"),this.strip();var s,a,u="le"===t,l=new e(r),c=this.clone();if(u){for(a=0;!c.isZero();a++)s=c.andln(255),c.iushrn(8),l[a]=s;for(;a=4096&&(n+=13,t>>>=13),t>=64&&(n+=7,t>>>=7),t>=8&&(n+=4,t>>>=4),t>=2&&(n+=2,t>>>=2),n+t},r.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,n=0;return 8191&t||(n+=13,t>>>=13),127&t||(n+=7,t>>>=7),15&t||(n+=4,t>>>=4),3&t||(n+=2,t>>>=2),1&t||n++,n},r.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},r.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},r.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},r.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var n=0;ne.length?this.clone().iand(e):e.clone().iand(this)},r.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},r.prototype.iuxor=function(e){var t,n;this.length>e.length?(t=this,n=e):(t=e,n=this);for(var i=0;ie.length?this.clone().ixor(e):e.clone().ixor(this)},r.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},r.prototype.inotn=function(e){i("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),n=e%26;this._expand(t),n>0&&t--;for(var o=0;o0&&(this.words[o]=~this.words[o]&67108863>>26-n),this.strip()},r.prototype.notn=function(e){return this.clone().inotn(e)},r.prototype.setn=function(e,t){i("number"==typeof e&&e>=0);var n=e/26|0,o=e%26;return this._expand(n+1),this.words[n]=t?this.words[n]|1<e.length?(n=this,i=e):(n=e,i=this);for(var o=0,r=0;r>>26;for(;0!==o&&r>>26;if(this.length=n.length,0!==o)this.words[this.length]=o,this.length++;else if(n!==this)for(;re.length?this.clone().iadd(e):e.clone().iadd(this)},r.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var n,i,o=this.cmp(e);if(0===o)return this.negative=0,this.length=1,this.words[0]=0,this;o>0?(n=this,i=e):(n=e,i=this);for(var r=0,s=0;s>26,this.words[s]=67108863&t;for(;0!==r&&s>26,this.words[s]=67108863&t;if(0===r&&s>>13,f=0|s[1],p=8191&f,g=f>>>13,m=0|s[2],v=8191&m,y=m>>>13,b=0|s[3],_=8191&b,w=b>>>13,M=0|s[4],C=8191&M,S=M>>>13,L=0|s[5],I=8191&L,N=L>>>13,x=0|s[6],D=8191&x,k=x>>>13,T=0|s[7],E=8191&T,A=T>>>13,j=0|s[8],O=8191&j,R=j>>>13,P=0|s[9],z=8191&P,W=P>>>13,F=0|a[0],B=8191&F,H=F>>>13,V=0|a[1],U=8191&V,Y=V>>>13,Z=0|a[2],G=8191&Z,Q=Z>>>13,q=0|a[3],K=8191&q,J=q>>>13,X=0|a[4],$=8191&X,ee=X>>>13,te=0|a[5],ne=8191&te,ie=te>>>13,oe=0|a[6],re=8191&oe,se=oe>>>13,ae=0|a[7],ue=8191&ae,le=ae>>>13,ce=0|a[8],he=8191&ce,de=ce>>>13,fe=0|a[9],pe=8191&fe,ge=fe>>>13;n.negative=e.negative^t.negative,n.length=19;var me=(l+(i=Math.imul(h,B))|0)+((8191&(o=(o=Math.imul(h,H))+Math.imul(d,B)|0))<<13)|0;l=((r=Math.imul(d,H))+(o>>>13)|0)+(me>>>26)|0,me&=67108863,i=Math.imul(p,B),o=(o=Math.imul(p,H))+Math.imul(g,B)|0,r=Math.imul(g,H);var ve=(l+(i=i+Math.imul(h,U)|0)|0)+((8191&(o=(o=o+Math.imul(h,Y)|0)+Math.imul(d,U)|0))<<13)|0;l=((r=r+Math.imul(d,Y)|0)+(o>>>13)|0)+(ve>>>26)|0,ve&=67108863,i=Math.imul(v,B),o=(o=Math.imul(v,H))+Math.imul(y,B)|0,r=Math.imul(y,H),i=i+Math.imul(p,U)|0,o=(o=o+Math.imul(p,Y)|0)+Math.imul(g,U)|0,r=r+Math.imul(g,Y)|0;var ye=(l+(i=i+Math.imul(h,G)|0)|0)+((8191&(o=(o=o+Math.imul(h,Q)|0)+Math.imul(d,G)|0))<<13)|0;l=((r=r+Math.imul(d,Q)|0)+(o>>>13)|0)+(ye>>>26)|0,ye&=67108863,i=Math.imul(_,B),o=(o=Math.imul(_,H))+Math.imul(w,B)|0,r=Math.imul(w,H),i=i+Math.imul(v,U)|0,o=(o=o+Math.imul(v,Y)|0)+Math.imul(y,U)|0,r=r+Math.imul(y,Y)|0,i=i+Math.imul(p,G)|0,o=(o=o+Math.imul(p,Q)|0)+Math.imul(g,G)|0,r=r+Math.imul(g,Q)|0;var be=(l+(i=i+Math.imul(h,K)|0)|0)+((8191&(o=(o=o+Math.imul(h,J)|0)+Math.imul(d,K)|0))<<13)|0;l=((r=r+Math.imul(d,J)|0)+(o>>>13)|0)+(be>>>26)|0,be&=67108863,i=Math.imul(C,B),o=(o=Math.imul(C,H))+Math.imul(S,B)|0,r=Math.imul(S,H),i=i+Math.imul(_,U)|0,o=(o=o+Math.imul(_,Y)|0)+Math.imul(w,U)|0,r=r+Math.imul(w,Y)|0,i=i+Math.imul(v,G)|0,o=(o=o+Math.imul(v,Q)|0)+Math.imul(y,G)|0,r=r+Math.imul(y,Q)|0,i=i+Math.imul(p,K)|0,o=(o=o+Math.imul(p,J)|0)+Math.imul(g,K)|0,r=r+Math.imul(g,J)|0;var _e=(l+(i=i+Math.imul(h,$)|0)|0)+((8191&(o=(o=o+Math.imul(h,ee)|0)+Math.imul(d,$)|0))<<13)|0;l=((r=r+Math.imul(d,ee)|0)+(o>>>13)|0)+(_e>>>26)|0,_e&=67108863,i=Math.imul(I,B),o=(o=Math.imul(I,H))+Math.imul(N,B)|0,r=Math.imul(N,H),i=i+Math.imul(C,U)|0,o=(o=o+Math.imul(C,Y)|0)+Math.imul(S,U)|0,r=r+Math.imul(S,Y)|0,i=i+Math.imul(_,G)|0,o=(o=o+Math.imul(_,Q)|0)+Math.imul(w,G)|0,r=r+Math.imul(w,Q)|0,i=i+Math.imul(v,K)|0,o=(o=o+Math.imul(v,J)|0)+Math.imul(y,K)|0,r=r+Math.imul(y,J)|0,i=i+Math.imul(p,$)|0,o=(o=o+Math.imul(p,ee)|0)+Math.imul(g,$)|0,r=r+Math.imul(g,ee)|0;var we=(l+(i=i+Math.imul(h,ne)|0)|0)+((8191&(o=(o=o+Math.imul(h,ie)|0)+Math.imul(d,ne)|0))<<13)|0;l=((r=r+Math.imul(d,ie)|0)+(o>>>13)|0)+(we>>>26)|0,we&=67108863,i=Math.imul(D,B),o=(o=Math.imul(D,H))+Math.imul(k,B)|0,r=Math.imul(k,H),i=i+Math.imul(I,U)|0,o=(o=o+Math.imul(I,Y)|0)+Math.imul(N,U)|0,r=r+Math.imul(N,Y)|0,i=i+Math.imul(C,G)|0,o=(o=o+Math.imul(C,Q)|0)+Math.imul(S,G)|0,r=r+Math.imul(S,Q)|0,i=i+Math.imul(_,K)|0,o=(o=o+Math.imul(_,J)|0)+Math.imul(w,K)|0,r=r+Math.imul(w,J)|0,i=i+Math.imul(v,$)|0,o=(o=o+Math.imul(v,ee)|0)+Math.imul(y,$)|0,r=r+Math.imul(y,ee)|0,i=i+Math.imul(p,ne)|0,o=(o=o+Math.imul(p,ie)|0)+Math.imul(g,ne)|0,r=r+Math.imul(g,ie)|0;var Me=(l+(i=i+Math.imul(h,re)|0)|0)+((8191&(o=(o=o+Math.imul(h,se)|0)+Math.imul(d,re)|0))<<13)|0;l=((r=r+Math.imul(d,se)|0)+(o>>>13)|0)+(Me>>>26)|0,Me&=67108863,i=Math.imul(E,B),o=(o=Math.imul(E,H))+Math.imul(A,B)|0,r=Math.imul(A,H),i=i+Math.imul(D,U)|0,o=(o=o+Math.imul(D,Y)|0)+Math.imul(k,U)|0,r=r+Math.imul(k,Y)|0,i=i+Math.imul(I,G)|0,o=(o=o+Math.imul(I,Q)|0)+Math.imul(N,G)|0,r=r+Math.imul(N,Q)|0,i=i+Math.imul(C,K)|0,o=(o=o+Math.imul(C,J)|0)+Math.imul(S,K)|0,r=r+Math.imul(S,J)|0,i=i+Math.imul(_,$)|0,o=(o=o+Math.imul(_,ee)|0)+Math.imul(w,$)|0,r=r+Math.imul(w,ee)|0,i=i+Math.imul(v,ne)|0,o=(o=o+Math.imul(v,ie)|0)+Math.imul(y,ne)|0,r=r+Math.imul(y,ie)|0,i=i+Math.imul(p,re)|0,o=(o=o+Math.imul(p,se)|0)+Math.imul(g,re)|0,r=r+Math.imul(g,se)|0;var Ce=(l+(i=i+Math.imul(h,ue)|0)|0)+((8191&(o=(o=o+Math.imul(h,le)|0)+Math.imul(d,ue)|0))<<13)|0;l=((r=r+Math.imul(d,le)|0)+(o>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,i=Math.imul(O,B),o=(o=Math.imul(O,H))+Math.imul(R,B)|0,r=Math.imul(R,H),i=i+Math.imul(E,U)|0,o=(o=o+Math.imul(E,Y)|0)+Math.imul(A,U)|0,r=r+Math.imul(A,Y)|0,i=i+Math.imul(D,G)|0,o=(o=o+Math.imul(D,Q)|0)+Math.imul(k,G)|0,r=r+Math.imul(k,Q)|0,i=i+Math.imul(I,K)|0,o=(o=o+Math.imul(I,J)|0)+Math.imul(N,K)|0,r=r+Math.imul(N,J)|0,i=i+Math.imul(C,$)|0,o=(o=o+Math.imul(C,ee)|0)+Math.imul(S,$)|0,r=r+Math.imul(S,ee)|0,i=i+Math.imul(_,ne)|0,o=(o=o+Math.imul(_,ie)|0)+Math.imul(w,ne)|0,r=r+Math.imul(w,ie)|0,i=i+Math.imul(v,re)|0,o=(o=o+Math.imul(v,se)|0)+Math.imul(y,re)|0,r=r+Math.imul(y,se)|0,i=i+Math.imul(p,ue)|0,o=(o=o+Math.imul(p,le)|0)+Math.imul(g,ue)|0,r=r+Math.imul(g,le)|0;var Se=(l+(i=i+Math.imul(h,he)|0)|0)+((8191&(o=(o=o+Math.imul(h,de)|0)+Math.imul(d,he)|0))<<13)|0;l=((r=r+Math.imul(d,de)|0)+(o>>>13)|0)+(Se>>>26)|0,Se&=67108863,i=Math.imul(z,B),o=(o=Math.imul(z,H))+Math.imul(W,B)|0,r=Math.imul(W,H),i=i+Math.imul(O,U)|0,o=(o=o+Math.imul(O,Y)|0)+Math.imul(R,U)|0,r=r+Math.imul(R,Y)|0,i=i+Math.imul(E,G)|0,o=(o=o+Math.imul(E,Q)|0)+Math.imul(A,G)|0,r=r+Math.imul(A,Q)|0,i=i+Math.imul(D,K)|0,o=(o=o+Math.imul(D,J)|0)+Math.imul(k,K)|0,r=r+Math.imul(k,J)|0,i=i+Math.imul(I,$)|0,o=(o=o+Math.imul(I,ee)|0)+Math.imul(N,$)|0,r=r+Math.imul(N,ee)|0,i=i+Math.imul(C,ne)|0,o=(o=o+Math.imul(C,ie)|0)+Math.imul(S,ne)|0,r=r+Math.imul(S,ie)|0,i=i+Math.imul(_,re)|0,o=(o=o+Math.imul(_,se)|0)+Math.imul(w,re)|0,r=r+Math.imul(w,se)|0,i=i+Math.imul(v,ue)|0,o=(o=o+Math.imul(v,le)|0)+Math.imul(y,ue)|0,r=r+Math.imul(y,le)|0,i=i+Math.imul(p,he)|0,o=(o=o+Math.imul(p,de)|0)+Math.imul(g,he)|0,r=r+Math.imul(g,de)|0;var Le=(l+(i=i+Math.imul(h,pe)|0)|0)+((8191&(o=(o=o+Math.imul(h,ge)|0)+Math.imul(d,pe)|0))<<13)|0;l=((r=r+Math.imul(d,ge)|0)+(o>>>13)|0)+(Le>>>26)|0,Le&=67108863,i=Math.imul(z,U),o=(o=Math.imul(z,Y))+Math.imul(W,U)|0,r=Math.imul(W,Y),i=i+Math.imul(O,G)|0,o=(o=o+Math.imul(O,Q)|0)+Math.imul(R,G)|0,r=r+Math.imul(R,Q)|0,i=i+Math.imul(E,K)|0,o=(o=o+Math.imul(E,J)|0)+Math.imul(A,K)|0,r=r+Math.imul(A,J)|0,i=i+Math.imul(D,$)|0,o=(o=o+Math.imul(D,ee)|0)+Math.imul(k,$)|0,r=r+Math.imul(k,ee)|0,i=i+Math.imul(I,ne)|0,o=(o=o+Math.imul(I,ie)|0)+Math.imul(N,ne)|0,r=r+Math.imul(N,ie)|0,i=i+Math.imul(C,re)|0,o=(o=o+Math.imul(C,se)|0)+Math.imul(S,re)|0,r=r+Math.imul(S,se)|0,i=i+Math.imul(_,ue)|0,o=(o=o+Math.imul(_,le)|0)+Math.imul(w,ue)|0,r=r+Math.imul(w,le)|0,i=i+Math.imul(v,he)|0,o=(o=o+Math.imul(v,de)|0)+Math.imul(y,he)|0,r=r+Math.imul(y,de)|0;var Ie=(l+(i=i+Math.imul(p,pe)|0)|0)+((8191&(o=(o=o+Math.imul(p,ge)|0)+Math.imul(g,pe)|0))<<13)|0;l=((r=r+Math.imul(g,ge)|0)+(o>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,i=Math.imul(z,G),o=(o=Math.imul(z,Q))+Math.imul(W,G)|0,r=Math.imul(W,Q),i=i+Math.imul(O,K)|0,o=(o=o+Math.imul(O,J)|0)+Math.imul(R,K)|0,r=r+Math.imul(R,J)|0,i=i+Math.imul(E,$)|0,o=(o=o+Math.imul(E,ee)|0)+Math.imul(A,$)|0,r=r+Math.imul(A,ee)|0,i=i+Math.imul(D,ne)|0,o=(o=o+Math.imul(D,ie)|0)+Math.imul(k,ne)|0,r=r+Math.imul(k,ie)|0,i=i+Math.imul(I,re)|0,o=(o=o+Math.imul(I,se)|0)+Math.imul(N,re)|0,r=r+Math.imul(N,se)|0,i=i+Math.imul(C,ue)|0,o=(o=o+Math.imul(C,le)|0)+Math.imul(S,ue)|0,r=r+Math.imul(S,le)|0,i=i+Math.imul(_,he)|0,o=(o=o+Math.imul(_,de)|0)+Math.imul(w,he)|0,r=r+Math.imul(w,de)|0;var Ne=(l+(i=i+Math.imul(v,pe)|0)|0)+((8191&(o=(o=o+Math.imul(v,ge)|0)+Math.imul(y,pe)|0))<<13)|0;l=((r=r+Math.imul(y,ge)|0)+(o>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,i=Math.imul(z,K),o=(o=Math.imul(z,J))+Math.imul(W,K)|0,r=Math.imul(W,J),i=i+Math.imul(O,$)|0,o=(o=o+Math.imul(O,ee)|0)+Math.imul(R,$)|0,r=r+Math.imul(R,ee)|0,i=i+Math.imul(E,ne)|0,o=(o=o+Math.imul(E,ie)|0)+Math.imul(A,ne)|0,r=r+Math.imul(A,ie)|0,i=i+Math.imul(D,re)|0,o=(o=o+Math.imul(D,se)|0)+Math.imul(k,re)|0,r=r+Math.imul(k,se)|0,i=i+Math.imul(I,ue)|0,o=(o=o+Math.imul(I,le)|0)+Math.imul(N,ue)|0,r=r+Math.imul(N,le)|0,i=i+Math.imul(C,he)|0,o=(o=o+Math.imul(C,de)|0)+Math.imul(S,he)|0,r=r+Math.imul(S,de)|0;var xe=(l+(i=i+Math.imul(_,pe)|0)|0)+((8191&(o=(o=o+Math.imul(_,ge)|0)+Math.imul(w,pe)|0))<<13)|0;l=((r=r+Math.imul(w,ge)|0)+(o>>>13)|0)+(xe>>>26)|0,xe&=67108863,i=Math.imul(z,$),o=(o=Math.imul(z,ee))+Math.imul(W,$)|0,r=Math.imul(W,ee),i=i+Math.imul(O,ne)|0,o=(o=o+Math.imul(O,ie)|0)+Math.imul(R,ne)|0,r=r+Math.imul(R,ie)|0,i=i+Math.imul(E,re)|0,o=(o=o+Math.imul(E,se)|0)+Math.imul(A,re)|0,r=r+Math.imul(A,se)|0,i=i+Math.imul(D,ue)|0,o=(o=o+Math.imul(D,le)|0)+Math.imul(k,ue)|0,r=r+Math.imul(k,le)|0,i=i+Math.imul(I,he)|0,o=(o=o+Math.imul(I,de)|0)+Math.imul(N,he)|0,r=r+Math.imul(N,de)|0;var De=(l+(i=i+Math.imul(C,pe)|0)|0)+((8191&(o=(o=o+Math.imul(C,ge)|0)+Math.imul(S,pe)|0))<<13)|0;l=((r=r+Math.imul(S,ge)|0)+(o>>>13)|0)+(De>>>26)|0,De&=67108863,i=Math.imul(z,ne),o=(o=Math.imul(z,ie))+Math.imul(W,ne)|0,r=Math.imul(W,ie),i=i+Math.imul(O,re)|0,o=(o=o+Math.imul(O,se)|0)+Math.imul(R,re)|0,r=r+Math.imul(R,se)|0,i=i+Math.imul(E,ue)|0,o=(o=o+Math.imul(E,le)|0)+Math.imul(A,ue)|0,r=r+Math.imul(A,le)|0,i=i+Math.imul(D,he)|0,o=(o=o+Math.imul(D,de)|0)+Math.imul(k,he)|0,r=r+Math.imul(k,de)|0;var ke=(l+(i=i+Math.imul(I,pe)|0)|0)+((8191&(o=(o=o+Math.imul(I,ge)|0)+Math.imul(N,pe)|0))<<13)|0;l=((r=r+Math.imul(N,ge)|0)+(o>>>13)|0)+(ke>>>26)|0,ke&=67108863,i=Math.imul(z,re),o=(o=Math.imul(z,se))+Math.imul(W,re)|0,r=Math.imul(W,se),i=i+Math.imul(O,ue)|0,o=(o=o+Math.imul(O,le)|0)+Math.imul(R,ue)|0,r=r+Math.imul(R,le)|0,i=i+Math.imul(E,he)|0,o=(o=o+Math.imul(E,de)|0)+Math.imul(A,he)|0,r=r+Math.imul(A,de)|0;var Te=(l+(i=i+Math.imul(D,pe)|0)|0)+((8191&(o=(o=o+Math.imul(D,ge)|0)+Math.imul(k,pe)|0))<<13)|0;l=((r=r+Math.imul(k,ge)|0)+(o>>>13)|0)+(Te>>>26)|0,Te&=67108863,i=Math.imul(z,ue),o=(o=Math.imul(z,le))+Math.imul(W,ue)|0,r=Math.imul(W,le),i=i+Math.imul(O,he)|0,o=(o=o+Math.imul(O,de)|0)+Math.imul(R,he)|0,r=r+Math.imul(R,de)|0;var Ee=(l+(i=i+Math.imul(E,pe)|0)|0)+((8191&(o=(o=o+Math.imul(E,ge)|0)+Math.imul(A,pe)|0))<<13)|0;l=((r=r+Math.imul(A,ge)|0)+(o>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,i=Math.imul(z,he),o=(o=Math.imul(z,de))+Math.imul(W,he)|0,r=Math.imul(W,de);var Ae=(l+(i=i+Math.imul(O,pe)|0)|0)+((8191&(o=(o=o+Math.imul(O,ge)|0)+Math.imul(R,pe)|0))<<13)|0;l=((r=r+Math.imul(R,ge)|0)+(o>>>13)|0)+(Ae>>>26)|0,Ae&=67108863;var je=(l+(i=Math.imul(z,pe))|0)+((8191&(o=(o=Math.imul(z,ge))+Math.imul(W,pe)|0))<<13)|0;return l=((r=Math.imul(W,ge))+(o>>>13)|0)+(je>>>26)|0,je&=67108863,u[0]=me,u[1]=ve,u[2]=ye,u[3]=be,u[4]=_e,u[5]=we,u[6]=Me,u[7]=Ce,u[8]=Se,u[9]=Le,u[10]=Ie,u[11]=Ne,u[12]=xe,u[13]=De,u[14]=ke,u[15]=Te,u[16]=Ee,u[17]=Ae,u[18]=je,0!==l&&(u[19]=l,n.length++),n};function g(e,t,n){return(new m).mulp(e,t,n)}function m(e,t){this.x=e,this.y=t}Math.imul||(p=f),r.prototype.mulTo=function(e,t){var n,i=this.length+e.length;return n=10===this.length&&10===e.length?p(this,e,t):i<63?f(this,e,t):i<1024?function(e,t,n){n.negative=t.negative^e.negative,n.length=e.length+t.length;for(var i=0,o=0,r=0;r>>26)|0)>>>26,s&=67108863}n.words[r]=a,i=s,s=o}return 0!==i?n.words[r]=i:n.length--,n.strip()}(this,e,t):g(this,e,t),n},m.prototype.makeRBT=function(e){for(var t=new Array(e),n=r.prototype._countBits(e)-1,i=0;i>=1;return i},m.prototype.permute=function(e,t,n,i,o,r){for(var s=0;s>>=1)o++;return 1<>>=13,n[2*s+1]=8191&r,r>>>=13;for(s=2*t;s>=26,t+=o/67108864|0,t+=r>>>26,this.words[n]=67108863&r}return 0!==t&&(this.words[n]=t,this.length++),this},r.prototype.muln=function(e){return this.clone().imuln(e)},r.prototype.sqr=function(){return this.mul(this)},r.prototype.isqr=function(){return this.imul(this.clone())},r.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),n=0;n>>o}return t}(e);if(0===t.length)return new r(1);for(var n=this,i=0;i=0);var t,n=e%26,o=(e-n)/26,r=67108863>>>26-n<<26-n;if(0!==n){var s=0;for(t=0;t>>26-n}s&&(this.words[t]=s,this.length++)}if(0!==o){for(t=this.length-1;t>=0;t--)this.words[t+o]=this.words[t];for(t=0;t=0),o=t?(t-t%26)/26:0;var r=e%26,s=Math.min((e-r)/26,this.length),a=67108863^67108863>>>r<s)for(this.length-=s,l=0;l=0&&(0!==c||l>=o);l--){var h=0|this.words[l];this.words[l]=c<<26-r|h>>>r,c=h&a}return u&&0!==c&&(u.words[u.length++]=c),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},r.prototype.ishrn=function(e,t,n){return i(0===this.negative),this.iushrn(e,t,n)},r.prototype.shln=function(e){return this.clone().ishln(e)},r.prototype.ushln=function(e){return this.clone().iushln(e)},r.prototype.shrn=function(e){return this.clone().ishrn(e)},r.prototype.ushrn=function(e){return this.clone().iushrn(e)},r.prototype.testn=function(e){i("number"==typeof e&&e>=0);var t=e%26,n=(e-t)/26,o=1<=0);var t=e%26,n=(e-t)/26;if(i(0===this.negative,"imaskn works only with positive numbers"),this.length<=n)return this;if(0!==t&&n++,this.length=Math.min(n,this.length),0!==t){var o=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},r.prototype.isubn=function(e){if(i("number"==typeof e),i(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(u/67108864|0),this.words[o+n]=67108863&r}for(;o>26,this.words[o+n]=67108863&r;if(0===a)return this.strip();for(i(-1===a),a=0,o=0;o>26,this.words[o]=67108863&r;return this.negative=1,this.strip()},r.prototype._wordDiv=function(e,t){var n=(this.length,e.length),i=this.clone(),o=e,s=0|o.words[o.length-1];0!=(n=26-this._countBits(s))&&(o=o.ushln(n),i.iushln(n),s=0|o.words[o.length-1]);var a,u=i.length-o.length;if("mod"!==t){(a=new r(null)).length=u+1,a.words=new Array(a.length);for(var l=0;l=0;h--){var d=67108864*(0|i.words[o.length+h])+(0|i.words[o.length+h-1]);for(d=Math.min(d/s|0,67108863),i._ishlnsubmul(o,d,h);0!==i.negative;)d--,i.negative=0,i._ishlnsubmul(o,1,h),i.isZero()||(i.negative^=1);a&&(a.words[h]=d)}return a&&a.strip(),i.strip(),"div"!==t&&0!==n&&i.iushrn(n),{div:a||null,mod:i}},r.prototype.divmod=function(e,t,n){return i(!e.isZero()),this.isZero()?{div:new r(0),mod:new r(0)}:0!==this.negative&&0===e.negative?(a=this.neg().divmod(e,t),"mod"!==t&&(o=a.div.neg()),"div"!==t&&(s=a.mod.neg(),n&&0!==s.negative&&s.iadd(e)),{div:o,mod:s}):0===this.negative&&0!==e.negative?(a=this.divmod(e.neg(),t),"mod"!==t&&(o=a.div.neg()),{div:o,mod:a.mod}):this.negative&e.negative?(a=this.neg().divmod(e.neg(),t),"div"!==t&&(s=a.mod.neg(),n&&0!==s.negative&&s.isub(e)),{div:a.div,mod:s}):e.length>this.length||this.cmp(e)<0?{div:new r(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new r(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new r(this.modn(e.words[0]))}:this._wordDiv(e,t);var o,s,a},r.prototype.div=function(e){return this.divmod(e,"div",!1).div},r.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},r.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},r.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var n=0!==t.div.negative?t.mod.isub(e):t.mod,i=e.ushrn(1),o=e.andln(1),r=n.cmp(i);return r<0||1===o&&0===r?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},r.prototype.modn=function(e){i(e<=67108863);for(var t=(1<<26)%e,n=0,o=this.length-1;o>=0;o--)n=(t*n+(0|this.words[o]))%e;return n},r.prototype.idivn=function(e){i(e<=67108863);for(var t=0,n=this.length-1;n>=0;n--){var o=(0|this.words[n])+67108864*t;this.words[n]=o/e|0,t=o%e}return this.strip()},r.prototype.divn=function(e){return this.clone().idivn(e)},r.prototype.egcd=function(e){i(0===e.negative),i(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var o=new r(1),s=new r(0),a=new r(0),u=new r(1),l=0;t.isEven()&&n.isEven();)t.iushrn(1),n.iushrn(1),++l;for(var c=n.clone(),h=t.clone();!t.isZero();){for(var d=0,f=1;!(t.words[0]&f)&&d<26;++d,f<<=1);if(d>0)for(t.iushrn(d);d-- >0;)(o.isOdd()||s.isOdd())&&(o.iadd(c),s.isub(h)),o.iushrn(1),s.iushrn(1);for(var p=0,g=1;!(n.words[0]&g)&&p<26;++p,g<<=1);if(p>0)for(n.iushrn(p);p-- >0;)(a.isOdd()||u.isOdd())&&(a.iadd(c),u.isub(h)),a.iushrn(1),u.iushrn(1);t.cmp(n)>=0?(t.isub(n),o.isub(a),s.isub(u)):(n.isub(t),a.isub(o),u.isub(s))}return{a,b:u,gcd:n.iushln(l)}},r.prototype._invmp=function(e){i(0===e.negative),i(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var o,s=new r(1),a=new r(0),u=n.clone();t.cmpn(1)>0&&n.cmpn(1)>0;){for(var l=0,c=1;!(t.words[0]&c)&&l<26;++l,c<<=1);if(l>0)for(t.iushrn(l);l-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);for(var h=0,d=1;!(n.words[0]&d)&&h<26;++h,d<<=1);if(h>0)for(n.iushrn(h);h-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);t.cmp(n)>=0?(t.isub(n),s.isub(a)):(n.isub(t),a.isub(s))}return(o=0===t.cmpn(1)?s:a).cmpn(0)<0&&o.iadd(e),o},r.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),n=e.clone();t.negative=0,n.negative=0;for(var i=0;t.isEven()&&n.isEven();i++)t.iushrn(1),n.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;n.isEven();)n.iushrn(1);var o=t.cmp(n);if(o<0){var r=t;t=n,n=r}else if(0===o||0===n.cmpn(1))break;t.isub(n)}return n.iushln(i)},r.prototype.invm=function(e){return this.egcd(e).a.umod(e)},r.prototype.isEven=function(){return!(1&this.words[0])},r.prototype.isOdd=function(){return!(1&~this.words[0])},r.prototype.andln=function(e){return this.words[0]&e},r.prototype.bincn=function(e){i("number"==typeof e);var t=e%26,n=(e-t)/26,o=1<>>26,a&=67108863,this.words[s]=a}return 0!==r&&(this.words[s]=r,this.length++),this},r.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},r.prototype.cmpn=function(e){var t,n=e<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this.strip(),this.length>1)t=1;else{n&&(e=-e),i(e<=67108863,"Number is too big");var o=0|this.words[0];t=o===e?0:oe.length)return 1;if(this.length=0;n--){var i=0|this.words[n],o=0|e.words[n];if(i!==o){io&&(t=1);break}}return t},r.prototype.gtn=function(e){return 1===this.cmpn(e)},r.prototype.gt=function(e){return 1===this.cmp(e)},r.prototype.gten=function(e){return this.cmpn(e)>=0},r.prototype.gte=function(e){return this.cmp(e)>=0},r.prototype.ltn=function(e){return-1===this.cmpn(e)},r.prototype.lt=function(e){return-1===this.cmp(e)},r.prototype.lten=function(e){return this.cmpn(e)<=0},r.prototype.lte=function(e){return this.cmp(e)<=0},r.prototype.eqn=function(e){return 0===this.cmpn(e)},r.prototype.eq=function(e){return 0===this.cmp(e)},r.red=function(e){return new C(e)},r.prototype.toRed=function(e){return i(!this.red,"Already a number in reduction context"),i(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},r.prototype.fromRed=function(){return i(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},r.prototype._forceRed=function(e){return this.red=e,this},r.prototype.forceRed=function(e){return i(!this.red,"Already a number in reduction context"),this._forceRed(e)},r.prototype.redAdd=function(e){return i(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},r.prototype.redIAdd=function(e){return i(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},r.prototype.redSub=function(e){return i(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},r.prototype.redISub=function(e){return i(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},r.prototype.redShl=function(e){return i(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},r.prototype.redMul=function(e){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},r.prototype.redIMul=function(e){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},r.prototype.redSqr=function(){return i(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},r.prototype.redISqr=function(){return i(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},r.prototype.redSqrt=function(){return i(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},r.prototype.redInvm=function(){return i(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},r.prototype.redNeg=function(){return i(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},r.prototype.redPow=function(e){return i(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var v={k256:null,p224:null,p192:null,p25519:null};function y(e,t){this.name=e,this.p=new r(t,16),this.n=this.p.bitLength(),this.k=new r(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function b(){y.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function _(){y.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){y.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function M(){y.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function C(e){if("string"==typeof e){var t=r._prime(e);this.m=t.p,this.prime=t}else i(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function S(e){C.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new r(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}y.prototype._tmp=function(){var e=new r(null);return e.words=new Array(Math.ceil(this.n/13)),e},y.prototype.ireduce=function(e){var t,n=e;do{this.split(n,this.tmp),t=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(t>this.n);var i=t0?n.isub(this.p):void 0!==n.strip?n.strip():n._strip(),n},y.prototype.split=function(e,t){e.iushrn(this.n,0,t)},y.prototype.imulK=function(e){return e.imul(this.k)},o(b,y),b.prototype.split=function(e,t){for(var n=4194303,i=Math.min(e.length,9),o=0;o>>22,r=s}r>>>=22,e.words[o-10]=r,0===r&&e.length>10?e.length-=10:e.length-=9},b.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,n=0;n>>=26,e.words[n]=o,t=i}return 0!==t&&(e.words[e.length++]=t),e},r._prime=function(e){if(v[e])return v[e];var t;if("k256"===e)t=new b;else if("p224"===e)t=new _;else if("p192"===e)t=new w;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new M}return v[e]=t,t},C.prototype._verify1=function(e){i(0===e.negative,"red works only with positives"),i(e.red,"red works only with red numbers")},C.prototype._verify2=function(e,t){i(!(e.negative|t.negative),"red works only with positives"),i(e.red&&e.red===t.red,"red works only with red numbers")},C.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},C.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},C.prototype.add=function(e,t){this._verify2(e,t);var n=e.add(t);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},C.prototype.iadd=function(e,t){this._verify2(e,t);var n=e.iadd(t);return n.cmp(this.m)>=0&&n.isub(this.m),n},C.prototype.sub=function(e,t){this._verify2(e,t);var n=e.sub(t);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},C.prototype.isub=function(e,t){this._verify2(e,t);var n=e.isub(t);return n.cmpn(0)<0&&n.iadd(this.m),n},C.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},C.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},C.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},C.prototype.isqr=function(e){return this.imul(e,e.clone())},C.prototype.sqr=function(e){return this.mul(e,e)},C.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(i(t%2==1),3===t){var n=this.m.add(new r(1)).iushrn(2);return this.pow(e,n)}for(var o=this.m.subn(1),s=0;!o.isZero()&&0===o.andln(1);)s++,o.iushrn(1);i(!o.isZero());var a=new r(1).toRed(this),u=a.redNeg(),l=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new r(2*c*c).toRed(this);0!==this.pow(c,l).cmp(u);)c.redIAdd(u);for(var h=this.pow(c,o),d=this.pow(e,o.addn(1).iushrn(1)),f=this.pow(e,o),p=s;0!==f.cmp(a);){for(var g=f,m=0;0!==g.cmp(a);m++)g=g.redSqr();i(m=0;i--){for(var l=t.words[i],c=u-1;c>=0;c--){var h=l>>c&1;o!==n[0]&&(o=this.sqr(o)),0!==h||0!==s?(s<<=1,s|=h,(4==++a||0===i&&0===c)&&(o=this.mul(o,n[s]),a=0,s=0)):a=0}u=26}return o},C.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},C.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},r.mont=function(e){return new S(e)},o(S,C),S.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},S.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},S.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var n=e.imul(t),i=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=n.isub(i).iushrn(this.shift),r=o;return o.cmp(this.m)>=0?r=o.isub(this.m):o.cmpn(0)<0&&(r=o.iadd(this.m)),r._forceRed(this)},S.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new r(0)._forceRed(this);var n=e.mul(t),i=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=n.isub(i).iushrn(this.shift),s=o;return o.cmp(this.m)>=0?s=o.isub(this.m):o.cmpn(0)<0&&(s=o.iadd(this.m)),s._forceRed(this)},S.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=n.nmd(e),this)},2965:(e,t,n)=>{var i=n(5891),o=n(9643),r=n(5292),s=n(5532),a=n(8470),u=n(2059),l=n(8232),c=n(2238).Buffer;e.exports=function(e,t,n){var h;h=e.padding?e.padding:n?1:4;var d,f=i(e),p=f.modulus.byteLength();if(t.length>p||new s(t).cmp(f.modulus)>=0)throw new Error("decryption error");d=n?l(new s(t),f):a(t,f);var g=c.alloc(p-d.length);if(d=c.concat([g,d],p),4===h)return function(e,t){var n=e.modulus.byteLength(),i=u("sha1").update(c.alloc(0)).digest(),s=i.length;if(0!==t[0])throw new Error("decryption error");var a=t.slice(1,s+1),l=t.slice(s+1),h=r(a,o(l,s)),d=r(l,o(h,n-s-1));if(function(e,t){e=c.from(e),t=c.from(t);var n=0,i=e.length;e.length!==t.length&&(n++,i=Math.min(e.length,t.length));for(var o=-1;++o=t.length){r++;break}var s=t.slice(2,o-1);if(("0002"!==i.toString("hex")&&!n||"0001"!==i.toString("hex")&&n)&&r++,s.length<8&&r++,r)throw new Error("decryption error");return t.slice(o)}(0,d,n);if(3===h)return d;throw new Error("unknown padding")}},3347:(e,t,n)=>{var i=n(5891),o=n(8190),r=n(2059),s=n(9643),a=n(5292),u=n(5532),l=n(8232),c=n(8470),h=n(2238).Buffer;e.exports=function(e,t,n){var d;d=e.padding?e.padding:n?1:4;var f,p=i(e);if(4===d)f=function(e,t){var n=e.modulus.byteLength(),i=t.length,l=r("sha1").update(h.alloc(0)).digest(),c=l.length,d=2*c;if(i>n-d-2)throw new Error("message too long");var f=h.alloc(n-i-d-2),p=n-c-1,g=o(c),m=a(h.concat([l,f,h.alloc(1,1),t],p),s(g,p)),v=a(g,s(m,c));return new u(h.concat([h.alloc(1),v,m],n))}(p,t);else if(1===d)f=function(e,t,n){var i,r=t.length,s=e.modulus.byteLength();if(r>s-11)throw new Error("message too long");return i=n?h.alloc(s-r-3,255):function(e){for(var t,n=h.allocUnsafe(e),i=0,r=o(2*e),s=0;i=0)throw new Error("data too long for modulus")}return n?c(f,p):l(f,p)}},8232:(e,t,n)=>{var i=n(5532),o=n(2238).Buffer;e.exports=function(e,t){return o.from(e.toRed(i.mont(t.modulus)).redPow(new i(t.publicExponent)).fromRed().toArray())}},5292:e=>{e.exports=function(e,t){for(var n=e.length,i=-1;++i{"use strict";var i=n(8957),o=65536,r=n(2238).Buffer,s=n.g.crypto||n.g.msCrypto;s&&s.getRandomValues?e.exports=function(e,t){if(e>4294967295)throw new RangeError("requested too many random bytes");var n=r.allocUnsafe(e);if(e>0)if(e>o)for(var a=0;a{"use strict";var i=n(8957);function o(){throw new Error("secure random number generation not supported by this browser\nuse chrome, FireFox or Internet Explorer 11")}var r=n(2238),s=n(8190),a=r.Buffer,u=r.kMaxLength,l=n.g.crypto||n.g.msCrypto,c=Math.pow(2,32)-1;function h(e,t){if("number"!=typeof e||e!=e)throw new TypeError("offset must be a number");if(e>c||e<0)throw new TypeError("offset must be a uint32");if(e>u||e>t)throw new RangeError("offset out of range")}function d(e,t,n){if("number"!=typeof e||e!=e)throw new TypeError("size must be a number");if(e>c||e<0)throw new TypeError("size must be a uint32");if(e+t>n||e>u)throw new RangeError("buffer too small")}function f(e,t,n,o){if(i.browser){var r=e.buffer,a=new Uint8Array(r,t,n);return l.getRandomValues(a),o?void i.nextTick((function(){o(null,e)})):e}if(!o)return s(n).copy(e,t),e;s(n,(function(n,i){if(n)return o(n);i.copy(e,t),o(null,e)}))}l&&l.getRandomValues||!i.browser?(t.randomFill=function(e,t,i,o){if(!(a.isBuffer(e)||e instanceof n.g.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');if("function"==typeof t)o=t,t=0,i=e.length;else if("function"==typeof i)o=i,i=e.length-t;else if("function"!=typeof o)throw new TypeError('"cb" argument must be a function');return h(t,e.length),d(i,t,e.length),f(e,t,i,o)},t.randomFillSync=function(e,t,i){if(void 0===t&&(t=0),!(a.isBuffer(e)||e instanceof n.g.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');return h(t,e.length),void 0===i&&(i=e.length-t),d(i,t,e.length),f(e,t,i)}):(t.randomFill=o,t.randomFillSync=o)},2443:(e,t,n)=>{"use strict";var i=n(2808),o=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};e.exports=h;var r=Object.create(n(8565));r.inherits=n(9385);var s=n(6102),a=n(217);r.inherits(h,s);for(var u=o(a.prototype),l=0;l{"use strict";e.exports=r;var i=n(7517),o=Object.create(n(8565));function r(e){if(!(this instanceof r))return new r(e);i.call(this,e)}o.inherits=n(9385),o.inherits(r,i),r.prototype._transform=function(e,t,n){n(null,e)}},6102:(e,t,n)=>{"use strict";var i=n(8957),o=n(2808);e.exports=b;var r,s=n(7045);b.ReadableState=y,n(3188).EventEmitter;var a=function(e,t){return e.listeners(t).length},u=n(4486),l=n(2238).Buffer,c=(void 0!==n.g?n.g:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){},h=Object.create(n(8565));h.inherits=n(9385);var d=n(9838),f=void 0;f=d&&d.debuglog?d.debuglog("stream"):function(){};var p,g=n(8961),m=n(6613);h.inherits(b,u);var v=["error","close","destroy","pause","resume"];function y(e,t){e=e||{};var i=t instanceof(r=r||n(2443));this.objectMode=!!e.objectMode,i&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var o=e.highWaterMark,s=e.readableHighWaterMark,a=this.objectMode?16:16384;this.highWaterMark=o||0===o?o:i&&(s||0===s)?s:a,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new g,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(p||(p=n(203).I),this.decoder=new p(e.encoding),this.encoding=e.encoding)}function b(e){if(r=r||n(2443),!(this instanceof b))return new b(e);this._readableState=new y(e,this),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),u.call(this)}function _(e,t,n,i,o){var r,s=e._readableState;return null===t?(s.reading=!1,function(e,t){if(!t.ended){if(t.decoder){var n=t.decoder.end();n&&n.length&&(t.buffer.push(n),t.length+=t.objectMode?1:n.length)}t.ended=!0,S(e)}}(e,s)):(o||(r=function(e,t){var n,i;return i=t,l.isBuffer(i)||i instanceof c||"string"==typeof t||void 0===t||e.objectMode||(n=new TypeError("Invalid non-string/buffer chunk")),n}(s,t)),r?e.emit("error",r):s.objectMode||t&&t.length>0?("string"==typeof t||s.objectMode||Object.getPrototypeOf(t)===l.prototype||(t=function(e){return l.from(e)}(t)),i?s.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):w(e,s,t,!0):s.ended?e.emit("error",new Error("stream.push() after EOF")):(s.reading=!1,s.decoder&&!n?(t=s.decoder.write(t),s.objectMode||0!==t.length?w(e,s,t,!1):I(e,s)):w(e,s,t,!1))):i||(s.reading=!1)),function(e){return!e.ended&&(e.needReadable||e.lengtht.highWaterMark&&(t.highWaterMark=function(e){return e>=M?e=M:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function S(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(f("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?o.nextTick(L,e):L(e))}function L(e){f("emit readable"),e.emit("readable"),k(e)}function I(e,t){t.readingMore||(t.readingMore=!0,o.nextTick(N,e,t))}function N(e,t){for(var n=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length=t.length?(n=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):n=function(e,t,n){var i;return er.length?r.length:e;if(s===r.length?o+=r:o+=r.slice(0,e),0==(e-=s)){s===r.length?(++i,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=r.slice(s));break}++i}return t.length-=i,o}(e,t):function(e,t){var n=l.allocUnsafe(e),i=t.head,o=1;for(i.data.copy(n),e-=i.data.length;i=i.next;){var r=i.data,s=e>r.length?r.length:e;if(r.copy(n,n.length-e,0,s),0==(e-=s)){s===r.length?(++o,i.next?t.head=i.next:t.head=t.tail=null):(t.head=i,i.data=r.slice(s));break}++o}return t.length-=o,n}(e,t),i}(e,t.buffer,t.decoder),n);var n}function E(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,o.nextTick(A,t,e))}function A(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function j(e,t){for(var n=0,i=e.length;n=t.highWaterMark||t.ended))return f("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?E(this):S(this),null;if(0===(e=C(e,t))&&t.ended)return 0===t.length&&E(this),null;var i,o=t.needReadable;return f("need readable",o),(0===t.length||t.length-e0?T(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&E(this)),null!==i&&this.emit("data",i),i},b.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},b.prototype.pipe=function(e,t){var n=this,r=this._readableState;switch(r.pipesCount){case 0:r.pipes=e;break;case 1:r.pipes=[r.pipes,e];break;default:r.pipes.push(e)}r.pipesCount+=1,f("pipe count=%d opts=%j",r.pipesCount,t);var u=t&&!1===t.end||e===i.stdout||e===i.stderr?y:l;function l(){f("onend"),e.end()}r.endEmitted?o.nextTick(u):n.once("end",u),e.on("unpipe",(function t(i,o){f("onunpipe"),i===n&&o&&!1===o.hasUnpiped&&(o.hasUnpiped=!0,f("cleanup"),e.removeListener("close",m),e.removeListener("finish",v),e.removeListener("drain",c),e.removeListener("error",g),e.removeListener("unpipe",t),n.removeListener("end",l),n.removeListener("end",y),n.removeListener("data",p),h=!0,!r.awaitDrain||e._writableState&&!e._writableState.needDrain||c())}));var c=function(e){return function(){var t=e._readableState;f("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&a(e,"data")&&(t.flowing=!0,k(e))}}(n);e.on("drain",c);var h=!1,d=!1;function p(t){f("ondata"),d=!1,!1!==e.write(t)||d||((1===r.pipesCount&&r.pipes===e||r.pipesCount>1&&-1!==j(r.pipes,e))&&!h&&(f("false write response, pause",r.awaitDrain),r.awaitDrain++,d=!0),n.pause())}function g(t){f("onerror",t),y(),e.removeListener("error",g),0===a(e,"error")&&e.emit("error",t)}function m(){e.removeListener("finish",v),y()}function v(){f("onfinish"),e.removeListener("close",m),y()}function y(){f("unpipe"),n.unpipe(e)}return n.on("data",p),function(e,t,n){if("function"==typeof e.prependListener)return e.prependListener(t,n);e._events&&e._events[t]?s(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]:e.on(t,n)}(e,"error",g),e.once("close",m),e.once("finish",v),e.emit("pipe",n),r.flowing||(f("pipe resume"),n.resume()),e},b.prototype.unpipe=function(e){var t=this._readableState,n={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,n)),this;if(!e){var i=t.pipes,o=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var r=0;r{"use strict";e.exports=s;var i=n(2443),o=Object.create(n(8565));function r(e,t){var n=this._transformState;n.transforming=!1;var i=n.writecb;if(!i)return this.emit("error",new Error("write callback called multiple times"));n.writechunk=null,n.writecb=null,null!=t&&this.push(t),i(e);var o=this._readableState;o.reading=!1,(o.needReadable||o.length{"use strict";var i=n(8957),o=n(7188).setImmedate,r=n(2808);function s(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,n){var i=e.entry;for(e.entry=null;i;){var o=i.callback;t.pendingcb--,o(undefined),i=i.next}t.corkedRequestsFree.next=e}(t,e)}}e.exports=y;var a,u=!i.browser&&["v0.10","v0.9."].indexOf(i.version.slice(0,5))>-1?o:r.nextTick;y.WritableState=v;var l=Object.create(n(8565));l.inherits=n(9385);var c,h={deprecate:n(4982)},d=n(4486),f=n(2238).Buffer,p=(void 0!==n.g?n.g:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){},g=n(6613);function m(){}function v(e,t){a=a||n(2443),e=e||{};var i=t instanceof a;this.objectMode=!!e.objectMode,i&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var o=e.highWaterMark,l=e.writableHighWaterMark,c=this.objectMode?16:16384;this.highWaterMark=o||0===o?o:i&&(l||0===l)?l:c,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var h=!1===e.decodeStrings;this.decodeStrings=!h,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var n=e._writableState,i=n.sync,o=n.writecb;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(n),t)!function(e,t,n,i,o){--t.pendingcb,n?(r.nextTick(o,i),r.nextTick(S,e,t),e._writableState.errorEmitted=!0,e.emit("error",i)):(o(i),e._writableState.errorEmitted=!0,e.emit("error",i),S(e,t))}(e,n,i,t,o);else{var s=M(n);s||n.corked||n.bufferProcessing||!n.bufferedRequest||w(e,n),i?u(_,e,n,s,o):_(e,n,s,o)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new s(this)}function y(e){if(a=a||n(2443),!(c.call(y,this)||this instanceof a))return new y(e);this._writableState=new v(e,this),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),d.call(this)}function b(e,t,n,i,o,r,s){t.writelen=i,t.writecb=s,t.writing=!0,t.sync=!0,n?e._writev(o,t.onwrite):e._write(o,r,t.onwrite),t.sync=!1}function _(e,t,n,i){n||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,i(),S(e,t)}function w(e,t){t.bufferProcessing=!0;var n=t.bufferedRequest;if(e._writev&&n&&n.next){var i=t.bufferedRequestCount,o=new Array(i),r=t.corkedRequestsFree;r.entry=n;for(var a=0,u=!0;n;)o[a]=n,n.isBuf||(u=!1),n=n.next,a+=1;o.allBuffers=u,b(e,t,!0,t.length,o,"",r.finish),t.pendingcb++,t.lastBufferedRequest=null,r.next?(t.corkedRequestsFree=r.next,r.next=null):t.corkedRequestsFree=new s(t),t.bufferedRequestCount=0}else{for(;n;){var l=n.chunk,c=n.encoding,h=n.callback;if(b(e,t,!1,t.objectMode?1:l.length,l,c,h),n=n.next,t.bufferedRequestCount--,t.writing)break}null===n&&(t.lastBufferedRequest=null)}t.bufferedRequest=n,t.bufferProcessing=!1}function M(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function C(e,t){e._final((function(n){t.pendingcb--,n&&e.emit("error",n),t.prefinished=!0,e.emit("prefinish"),S(e,t)}))}function S(e,t){var n=M(t);return n&&(function(e,t){t.prefinished||t.finalCalled||("function"==typeof e._final?(t.pendingcb++,t.finalCalled=!0,r.nextTick(C,e,t)):(t.prefinished=!0,e.emit("prefinish")))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"))),n}l.inherits(y,d),v.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(v.prototype,"buffer",{get:h.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(c=Function.prototype[Symbol.hasInstance],Object.defineProperty(y,Symbol.hasInstance,{value:function(e){return!!c.call(this,e)||this===y&&e&&e._writableState instanceof v}})):c=function(e){return e instanceof this},y.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},y.prototype.write=function(e,t,n){var i,o=this._writableState,s=!1,a=!o.objectMode&&(i=e,f.isBuffer(i)||i instanceof p);return a&&!f.isBuffer(e)&&(e=function(e){return f.from(e)}(e)),"function"==typeof t&&(n=t,t=null),a?t="buffer":t||(t=o.defaultEncoding),"function"!=typeof n&&(n=m),o.ended?function(e,t){var n=new Error("write after end");e.emit("error",n),r.nextTick(t,n)}(this,n):(a||function(e,t,n,i){var o=!0,s=!1;return null===n?s=new TypeError("May not write null values to stream"):"string"==typeof n||void 0===n||t.objectMode||(s=new TypeError("Invalid non-string/buffer chunk")),s&&(e.emit("error",s),r.nextTick(i,s),o=!1),o}(this,o,e,n))&&(o.pendingcb++,s=function(e,t,n,i,o,r){if(!n){var s=function(e,t,n){return e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=f.from(t,n)),t}(t,i,o);i!==s&&(n=!0,o="buffer",i=s)}var a=t.objectMode?1:i.length;t.length+=a;var u=t.length-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(y.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),y.prototype._write=function(e,t,n){n(new Error("_write() is not implemented"))},y.prototype._writev=null,y.prototype.end=function(e,t,n){var i=this._writableState;"function"==typeof e?(n=e,e=null,t=null):"function"==typeof t&&(n=t,t=null),null!=e&&this.write(e,t),i.corked&&(i.corked=1,this.uncork()),i.ending||function(e,t,n){t.ending=!0,S(e,t),n&&(t.finished?r.nextTick(n):e.once("finish",n)),t.ended=!0,e.writable=!1}(this,i,n)},Object.defineProperty(y.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),y.prototype.destroy=g.destroy,y.prototype._undestroy=g.undestroy,y.prototype._destroy=function(e,t){this.end(),t(e)}},8961:(e,t,n)=>{"use strict";var i=n(2238).Buffer,o=n(5340);e.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}return e.prototype.push=function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},e.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},e.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},e.prototype.clear=function(){this.head=this.tail=null,this.length=0},e.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,n=""+t.data;t=t.next;)n+=e+t.data;return n},e.prototype.concat=function(e){if(0===this.length)return i.alloc(0);for(var t,n,o=i.allocUnsafe(e>>>0),r=this.head,s=0;r;)t=o,n=s,r.data.copy(t,n),s+=r.data.length,r=r.next;return o},e}(),o&&o.inspect&&o.inspect.custom&&(e.exports.prototype[o.inspect.custom]=function(){var e=o.inspect({length:this.length});return this.constructor.name+" "+e})},6613:(e,t,n)=>{"use strict";var i=n(2808);function o(e,t){e.emit("error",t)}e.exports={destroy:function(e,t){var n=this,r=this._readableState&&this._readableState.destroyed,s=this._writableState&&this._writableState.destroyed;return r||s?(t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,i.nextTick(o,this,e)):i.nextTick(o,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,(function(e){!t&&e?n._writableState?n._writableState.errorEmitted||(n._writableState.errorEmitted=!0,i.nextTick(o,n,e)):i.nextTick(o,n,e):t&&t(e)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}},4486:(e,t,n)=>{e.exports=n(3188).EventEmitter},203:(e,t,n)=>{"use strict";var i=n(2238).Buffer,o=i.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function r(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(i.isEncoding===o||!o(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=u,this.end=l,t=4;break;case"utf8":this.fillLast=a,t=4;break;case"base64":this.text=c,this.end=h,t=3;break;default:return this.write=d,void(this.end=f)}this.lastNeed=0,this.lastTotal=0,this.lastChar=i.allocUnsafe(t)}function s(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function a(e){var t=this.lastTotal-this.lastNeed,n=function(e,t,n){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==n?n:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function u(e,t){if((e.length-t)%2==0){var n=e.toString("utf16le",t);if(n){var i=n.charCodeAt(n.length-1);if(i>=55296&&i<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function l(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,n)}return t}function c(e,t){var n=(e.length-t)%3;return 0===n?e.toString("base64",t):(this.lastNeed=3-n,this.lastTotal=3,1===n?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-n))}function h(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function d(e){return e.toString(this.encoding)}function f(e){return e&&e.length?this.write(e):""}t.I=r,r.prototype.write=function(e){if(0===e.length)return"";var t,n;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";n=this.lastNeed,this.lastNeed=0}else n=0;return n=0?(o>0&&(e.lastNeed=o-1),o):--i=0?(o>0&&(e.lastNeed=o-2),o):--i=0?(o>0&&(2===o?o=0:e.lastNeed=o-3),o):0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=n;var i=e.length-(n-this.lastNeed);return e.copy(this.lastChar,0,i),e.toString("utf8",t,i)},r.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},7462:(e,t,n)=>{(t=e.exports=n(6102)).Stream=t,t.Readable=t,t.Writable=n(217),t.Duplex=n(2443),t.Transform=n(7517),t.PassThrough=n(6071)},2428:(e,t,n)=>{"use strict";var i=n(1278).Buffer,o=n(9385),r=n(9558),s=new Array(16),a=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],u=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],l=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],c=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],h=[0,1518500249,1859775393,2400959708,2840853838],d=[1352829926,1548603684,1836072691,2053994217,0];function f(){r.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}function p(e,t){return e<>>32-t}function g(e,t,n,i,o,r,s,a){return p(e+(t^n^i)+r+s|0,a)+o|0}function m(e,t,n,i,o,r,s,a){return p(e+(t&n|~t&i)+r+s|0,a)+o|0}function v(e,t,n,i,o,r,s,a){return p(e+((t|~n)^i)+r+s|0,a)+o|0}function y(e,t,n,i,o,r,s,a){return p(e+(t&i|n&~i)+r+s|0,a)+o|0}function b(e,t,n,i,o,r,s,a){return p(e+(t^(n|~i))+r+s|0,a)+o|0}o(f,r),f.prototype._update=function(){for(var e=s,t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t);for(var n=0|this._a,i=0|this._b,o=0|this._c,r=0|this._d,f=0|this._e,_=0|this._a,w=0|this._b,M=0|this._c,C=0|this._d,S=0|this._e,L=0;L<80;L+=1){var I,N;L<16?(I=g(n,i,o,r,f,e[a[L]],h[0],l[L]),N=b(_,w,M,C,S,e[u[L]],d[0],c[L])):L<32?(I=m(n,i,o,r,f,e[a[L]],h[1],l[L]),N=y(_,w,M,C,S,e[u[L]],d[1],c[L])):L<48?(I=v(n,i,o,r,f,e[a[L]],h[2],l[L]),N=v(_,w,M,C,S,e[u[L]],d[2],c[L])):L<64?(I=y(n,i,o,r,f,e[a[L]],h[3],l[L]),N=m(_,w,M,C,S,e[u[L]],d[3],c[L])):(I=b(n,i,o,r,f,e[a[L]],h[4],l[L]),N=g(_,w,M,C,S,e[u[L]],d[4],c[L])),n=f,f=r,r=p(o,10),o=i,i=I,_=S,S=C,C=p(M,10),M=w,w=N}var x=this._b+o+C|0;this._b=this._c+r+S|0,this._c=this._d+f+_|0,this._d=this._e+n+w|0,this._e=this._a+i+M|0,this._a=x},f.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var e=i.alloc?i.alloc(20):new i(20);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e.writeInt32LE(this._e,16),e},e.exports=f},2238:(e,t,n)=>{var i=n(1278),o=i.Buffer;function r(e,t){for(var n in e)t[n]=e[n]}function s(e,t,n){return o(e,t,n)}o.from&&o.alloc&&o.allocUnsafe&&o.allocUnsafeSlow?e.exports=i:(r(i,t),t.Buffer=s),r(o,s),s.from=function(e,t,n){if("number"==typeof e)throw new TypeError("Argument must not be a number");return o(e,t,n)},s.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError("Argument must be a number");var i=o(e);return void 0!==t?"string"==typeof n?i.fill(t,n):i.fill(t):i.fill(0),i},s.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return o(e)},s.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i.SlowBuffer(e)}},7188:function(e,t,n){var i=n(8957);!function(e,t){"use strict";if(!e.setImmediate){var n,o,r,s,a,u=1,l={},c=!1,h=e.document,d=Object.getPrototypeOf&&Object.getPrototypeOf(e);d=d&&d.setTimeout?d:e,"[object process]"==={}.toString.call(e.process)?n=function(e){i.nextTick((function(){p(e)}))}:function(){if(e.postMessage&&!e.importScripts){var t=!0,n=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=n,t}}()?(s="setImmediate$"+Math.random()+"$",a=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(s)&&p(+t.data.slice(s.length))},e.addEventListener?e.addEventListener("message",a,!1):e.attachEvent("onmessage",a),n=function(t){e.postMessage(s+t,"*")}):e.MessageChannel?((r=new MessageChannel).port1.onmessage=function(e){p(e.data)},n=function(e){r.port2.postMessage(e)}):h&&"onreadystatechange"in h.createElement("script")?(o=h.documentElement,n=function(e){var t=h.createElement("script");t.onreadystatechange=function(){p(e),t.onreadystatechange=null,o.removeChild(t),t=null},o.appendChild(t)}):n=function(e){setTimeout(p,0,e)},d.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),i=0;i{var i=n(2238).Buffer;function o(e,t){this._block=i.alloc(e),this._finalSize=t,this._blockSize=e,this._len=0}o.prototype.update=function(e,t){"string"==typeof e&&(t=t||"utf8",e=i.from(e,t));for(var n=this._block,o=this._blockSize,r=e.length,s=this._len,a=0;a=this._finalSize&&(this._update(this._block),this._block.fill(0));var n=8*this._len;if(n<=4294967295)this._block.writeUInt32BE(n,this._blockSize-4);else{var i=(4294967295&n)>>>0,o=(n-i)/4294967296;this._block.writeUInt32BE(o,this._blockSize-8),this._block.writeUInt32BE(i,this._blockSize-4)}this._update(this._block);var r=this._hash();return e?r.toString(e):r},o.prototype._update=function(){throw new Error("_update must be implemented by subclass")},e.exports=o},5203:(e,t,n)=>{var i=e.exports=function(e){e=e.toLowerCase();var t=i[e];if(!t)throw new Error(e+" is not supported (we accept pull requests)");return new t};i.sha=n(8313),i.sha1=n(6534),i.sha224=n(7093),i.sha256=n(1444),i.sha384=n(7152),i.sha512=n(3073)},8313:(e,t,n)=>{var i=n(9385),o=n(351),r=n(2238).Buffer,s=[1518500249,1859775393,-1894007588,-899497514],a=new Array(80);function u(){this.init(),this._w=a,o.call(this,64,56)}function l(e){return e<<30|e>>>2}function c(e,t,n,i){return 0===e?t&n|~t&i:2===e?t&n|t&i|n&i:t^n^i}i(u,o),u.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},u.prototype._update=function(e){for(var t,n=this._w,i=0|this._a,o=0|this._b,r=0|this._c,a=0|this._d,u=0|this._e,h=0;h<16;++h)n[h]=e.readInt32BE(4*h);for(;h<80;++h)n[h]=n[h-3]^n[h-8]^n[h-14]^n[h-16];for(var d=0;d<80;++d){var f=~~(d/20),p=0|((t=i)<<5|t>>>27)+c(f,o,r,a)+u+n[d]+s[f];u=a,a=r,r=l(o),o=i,i=p}this._a=i+this._a|0,this._b=o+this._b|0,this._c=r+this._c|0,this._d=a+this._d|0,this._e=u+this._e|0},u.prototype._hash=function(){var e=r.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},e.exports=u},6534:(e,t,n)=>{var i=n(9385),o=n(351),r=n(2238).Buffer,s=[1518500249,1859775393,-1894007588,-899497514],a=new Array(80);function u(){this.init(),this._w=a,o.call(this,64,56)}function l(e){return e<<5|e>>>27}function c(e){return e<<30|e>>>2}function h(e,t,n,i){return 0===e?t&n|~t&i:2===e?t&n|t&i|n&i:t^n^i}i(u,o),u.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},u.prototype._update=function(e){for(var t,n=this._w,i=0|this._a,o=0|this._b,r=0|this._c,a=0|this._d,u=0|this._e,d=0;d<16;++d)n[d]=e.readInt32BE(4*d);for(;d<80;++d)n[d]=(t=n[d-3]^n[d-8]^n[d-14]^n[d-16])<<1|t>>>31;for(var f=0;f<80;++f){var p=~~(f/20),g=l(i)+h(p,o,r,a)+u+n[f]+s[p]|0;u=a,a=r,r=c(o),o=i,i=g}this._a=i+this._a|0,this._b=o+this._b|0,this._c=r+this._c|0,this._d=a+this._d|0,this._e=u+this._e|0},u.prototype._hash=function(){var e=r.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},e.exports=u},7093:(e,t,n)=>{var i=n(9385),o=n(1444),r=n(351),s=n(2238).Buffer,a=new Array(64);function u(){this.init(),this._w=a,r.call(this,64,56)}i(u,o),u.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},u.prototype._hash=function(){var e=s.allocUnsafe(28);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e},e.exports=u},1444:(e,t,n)=>{var i=n(9385),o=n(351),r=n(2238).Buffer,s=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],a=new Array(64);function u(){this.init(),this._w=a,o.call(this,64,56)}function l(e,t,n){return n^e&(t^n)}function c(e,t,n){return e&t|n&(e|t)}function h(e){return(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10)}function d(e){return(e>>>6|e<<26)^(e>>>11|e<<21)^(e>>>25|e<<7)}function f(e){return(e>>>7|e<<25)^(e>>>18|e<<14)^e>>>3}i(u,o),u.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},u.prototype._update=function(e){for(var t,n=this._w,i=0|this._a,o=0|this._b,r=0|this._c,a=0|this._d,u=0|this._e,p=0|this._f,g=0|this._g,m=0|this._h,v=0;v<16;++v)n[v]=e.readInt32BE(4*v);for(;v<64;++v)n[v]=0|(((t=n[v-2])>>>17|t<<15)^(t>>>19|t<<13)^t>>>10)+n[v-7]+f(n[v-15])+n[v-16];for(var y=0;y<64;++y){var b=m+d(u)+l(u,p,g)+s[y]+n[y]|0,_=h(i)+c(i,o,r)|0;m=g,g=p,p=u,u=a+b|0,a=r,r=o,o=i,i=b+_|0}this._a=i+this._a|0,this._b=o+this._b|0,this._c=r+this._c|0,this._d=a+this._d|0,this._e=u+this._e|0,this._f=p+this._f|0,this._g=g+this._g|0,this._h=m+this._h|0},u.prototype._hash=function(){var e=r.allocUnsafe(32);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e.writeInt32BE(this._h,28),e},e.exports=u},7152:(e,t,n)=>{var i=n(9385),o=n(3073),r=n(351),s=n(2238).Buffer,a=new Array(160);function u(){this.init(),this._w=a,r.call(this,128,112)}i(u,o),u.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},u.prototype._hash=function(){var e=s.allocUnsafe(48);function t(t,n,i){e.writeInt32BE(t,i),e.writeInt32BE(n,i+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),e},e.exports=u},3073:(e,t,n)=>{var i=n(9385),o=n(351),r=n(2238).Buffer,s=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],a=new Array(160);function u(){this.init(),this._w=a,o.call(this,128,112)}function l(e,t,n){return n^e&(t^n)}function c(e,t,n){return e&t|n&(e|t)}function h(e,t){return(e>>>28|t<<4)^(t>>>2|e<<30)^(t>>>7|e<<25)}function d(e,t){return(e>>>14|t<<18)^(e>>>18|t<<14)^(t>>>9|e<<23)}function f(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^e>>>7}function p(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^(e>>>7|t<<25)}function g(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^e>>>6}function m(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^(e>>>6|t<<26)}function v(e,t){return e>>>0>>0?1:0}i(u,o),u.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this},u.prototype._update=function(e){for(var t=this._w,n=0|this._ah,i=0|this._bh,o=0|this._ch,r=0|this._dh,a=0|this._eh,u=0|this._fh,y=0|this._gh,b=0|this._hh,_=0|this._al,w=0|this._bl,M=0|this._cl,C=0|this._dl,S=0|this._el,L=0|this._fl,I=0|this._gl,N=0|this._hl,x=0;x<32;x+=2)t[x]=e.readInt32BE(4*x),t[x+1]=e.readInt32BE(4*x+4);for(;x<160;x+=2){var D=t[x-30],k=t[x-30+1],T=f(D,k),E=p(k,D),A=g(D=t[x-4],k=t[x-4+1]),j=m(k,D),O=t[x-14],R=t[x-14+1],P=t[x-32],z=t[x-32+1],W=E+R|0,F=T+O+v(W,E)|0;F=(F=F+A+v(W=W+j|0,j)|0)+P+v(W=W+z|0,z)|0,t[x]=F,t[x+1]=W}for(var B=0;B<160;B+=2){F=t[B],W=t[B+1];var H=c(n,i,o),V=c(_,w,M),U=h(n,_),Y=h(_,n),Z=d(a,S),G=d(S,a),Q=s[B],q=s[B+1],K=l(a,u,y),J=l(S,L,I),X=N+G|0,$=b+Z+v(X,N)|0;$=($=($=$+K+v(X=X+J|0,J)|0)+Q+v(X=X+q|0,q)|0)+F+v(X=X+W|0,W)|0;var ee=Y+V|0,te=U+H+v(ee,Y)|0;b=y,N=I,y=u,I=L,u=a,L=S,a=r+$+v(S=C+X|0,C)|0,r=o,C=M,o=i,M=w,i=n,w=_,n=$+te+v(_=X+ee|0,X)|0}this._al=this._al+_|0,this._bl=this._bl+w|0,this._cl=this._cl+M|0,this._dl=this._dl+C|0,this._el=this._el+S|0,this._fl=this._fl+L|0,this._gl=this._gl+I|0,this._hl=this._hl+N|0,this._ah=this._ah+n+v(this._al,_)|0,this._bh=this._bh+i+v(this._bl,w)|0,this._ch=this._ch+o+v(this._cl,M)|0,this._dh=this._dh+r+v(this._dl,C)|0,this._eh=this._eh+a+v(this._el,S)|0,this._fh=this._fh+u+v(this._fl,L)|0,this._gh=this._gh+y+v(this._gl,I)|0,this._hh=this._hh+b+v(this._hl,N)|0},u.prototype._hash=function(){var e=r.allocUnsafe(64);function t(t,n,i){e.writeInt32BE(t,i),e.writeInt32BE(n,i+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),t(this._gh,this._gl,48),t(this._hh,this._hl,56),e},e.exports=u},8741:(e,t,n)=>{e.exports=o;var i=n(3188).EventEmitter;function o(){i.call(this)}n(1322)(o,i),o.Readable=n(3284),o.Writable=n(5828),o.Duplex=n(3030),o.Transform=n(5154),o.PassThrough=n(3488),o.finished=n(9262),o.pipeline=n(4030),o.Stream=o,o.prototype.pipe=function(e,t){var n=this;function o(t){e.writable&&!1===e.write(t)&&n.pause&&n.pause()}function r(){n.readable&&n.resume&&n.resume()}n.on("data",o),e.on("drain",r),e._isStdio||t&&!1===t.end||(n.on("end",a),n.on("close",u));var s=!1;function a(){s||(s=!0,e.end())}function u(){s||(s=!0,"function"==typeof e.destroy&&e.destroy())}function l(e){if(c(),0===i.listenerCount(this,"error"))throw e}function c(){n.removeListener("data",o),e.removeListener("drain",r),n.removeListener("end",a),n.removeListener("close",u),n.removeListener("error",l),e.removeListener("error",l),n.removeListener("end",c),n.removeListener("close",c),e.removeListener("close",c)}return n.on("error",l),e.on("error",l),n.on("end",c),n.on("close",c),e.on("close",c),e.emit("pipe",n),e}},1322:e=>{"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}},368:e=>{"use strict";var t={};function n(e,n,i){i||(i=Error);var o=function(e){var t,i;function o(t,i,o){return e.call(this,function(e,t,i){return"string"==typeof n?n:n(e,t,i)}(t,i,o))||this}return i=e,(t=o).prototype=Object.create(i.prototype),t.prototype.constructor=t,t.__proto__=i,o}(i);o.prototype.name=i.name,o.prototype.code=e,t[e]=o}function i(e,t){if(Array.isArray(e)){var n=e.length;return e=e.map((function(e){return String(e)})),n>2?"one of ".concat(t," ").concat(e.slice(0,n-1).join(", "),", or ")+e[n-1]:2===n?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}n("ERR_INVALID_OPT_VALUE",(function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'}),TypeError),n("ERR_INVALID_ARG_TYPE",(function(e,t,n){var o,r,s,a,u;if("string"==typeof t&&(r="not ",t.substr(0,4)===r)?(o="must not be",t=t.replace(/^not /,"")):o="must be",function(e,t,n){return(void 0===n||n>e.length)&&(n=e.length),e.substring(n-9,n)===t}(e," argument"))s="The ".concat(e," ").concat(o," ").concat(i(t,"type"));else{var l=("number"!=typeof u&&(u=0),u+1>(a=e).length||-1===a.indexOf(".",u)?"argument":"property");s='The "'.concat(e,'" ').concat(l," ").concat(o," ").concat(i(t,"type"))}return s+". Received type ".concat(typeof n)}),TypeError),n("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),n("ERR_METHOD_NOT_IMPLEMENTED",(function(e){return"The "+e+" method is not implemented"})),n("ERR_STREAM_PREMATURE_CLOSE","Premature close"),n("ERR_STREAM_DESTROYED",(function(e){return"Cannot call "+e+" after a stream was destroyed"})),n("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),n("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),n("ERR_STREAM_WRITE_AFTER_END","write after end"),n("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),n("ERR_UNKNOWN_ENCODING",(function(e){return"Unknown encoding: "+e}),TypeError),n("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),e.exports.F=t},3030:(e,t,n)=>{"use strict";var i=n(8957),o=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};e.exports=c;var r=n(3284),s=n(5828);n(1322)(c,r);for(var a=o(s.prototype),u=0;u{"use strict";e.exports=o;var i=n(5154);function o(e){if(!(this instanceof o))return new o(e);i.call(this,e)}n(1322)(o,i),o.prototype._transform=function(e,t,n){n(null,e)}},3284:(e,t,n)=>{"use strict";var i,o=n(8957);e.exports=L,L.ReadableState=S,n(3188).EventEmitter;var r,s=function(e,t){return e.listeners(t).length},a=n(8137),u=n(1278).Buffer,l=(void 0!==n.g?n.g:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){},c=n(9580);r=c&&c.debuglog?c.debuglog("stream"):function(){};var h,d,f,p=n(5081),g=n(9944),m=n(7403).getHighWaterMark,v=n(368).F,y=v.ERR_INVALID_ARG_TYPE,b=v.ERR_STREAM_PUSH_AFTER_EOF,_=v.ERR_METHOD_NOT_IMPLEMENTED,w=v.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;n(1322)(L,a);var M=g.errorOrDestroy,C=["error","close","destroy","pause","resume"];function S(e,t,o){i=i||n(3030),e=e||{},"boolean"!=typeof o&&(o=t instanceof i),this.objectMode=!!e.objectMode,o&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=m(this,e,"readableHighWaterMark",o),this.buffer=new p,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(h||(h=n(230).I),this.decoder=new h(e.encoding),this.encoding=e.encoding)}function L(e){if(i=i||n(3030),!(this instanceof L))return new L(e);var t=this instanceof i;this._readableState=new S(e,this,t),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),a.call(this)}function I(e,t,n,i,o){r("readableAddChunk",t);var s,a=e._readableState;if(null===t)a.reading=!1,function(e,t){if(r("onEofChunk"),!t.ended){if(t.decoder){var n=t.decoder.end();n&&n.length&&(t.buffer.push(n),t.length+=t.objectMode?1:n.length)}t.ended=!0,t.sync?k(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,T(e)))}}(e,a);else if(o||(s=function(e,t){var n,i;return i=t,u.isBuffer(i)||i instanceof l||"string"==typeof t||void 0===t||e.objectMode||(n=new y("chunk",["string","Buffer","Uint8Array"],t)),n}(a,t)),s)M(e,s);else if(a.objectMode||t&&t.length>0)if("string"==typeof t||a.objectMode||Object.getPrototypeOf(t)===u.prototype||(t=function(e){return u.from(e)}(t)),i)a.endEmitted?M(e,new w):N(e,a,t,!0);else if(a.ended)M(e,new b);else{if(a.destroyed)return!1;a.reading=!1,a.decoder&&!n?(t=a.decoder.write(t),a.objectMode||0!==t.length?N(e,a,t,!1):E(e,a)):N(e,a,t,!1)}else i||(a.reading=!1,E(e,a));return!a.ended&&(a.lengtht.highWaterMark&&(t.highWaterMark=function(e){return e>=x?e=x:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function k(e){var t=e._readableState;r("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(r("emitReadable",t.flowing),t.emittedReadable=!0,o.nextTick(T,e))}function T(e){var t=e._readableState;r("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,P(e)}function E(e,t){t.readingMore||(t.readingMore=!0,o.nextTick(A,e,t))}function A(e,t){for(;!t.reading&&!t.ended&&(t.length0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function O(e){r("readable nexttick read 0"),e.read(0)}function R(e,t){r("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),P(e),t.flowing&&!t.reading&&e.read(0)}function P(e){var t=e._readableState;for(r("flow",t.flowing);t.flowing&&null!==e.read(););}function z(e,t){return 0===t.length?null:(t.objectMode?n=t.buffer.shift():!e||e>=t.length?(n=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):n=t.buffer.consume(e,t.decoder),n);var n}function W(e){var t=e._readableState;r("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,o.nextTick(F,t,e))}function F(e,t){if(r("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var n=t._writableState;(!n||n.autoDestroy&&n.finished)&&t.destroy()}}function B(e,t){for(var n=0,i=e.length;n=t.highWaterMark:t.length>0)||t.ended))return r("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?W(this):k(this),null;if(0===(e=D(e,t))&&t.ended)return 0===t.length&&W(this),null;var i,o=t.needReadable;return r("need readable",o),(0===t.length||t.length-e0?z(e,t):null)?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&W(this)),null!==i&&this.emit("data",i),i},L.prototype._read=function(e){M(this,new _("_read()"))},L.prototype.pipe=function(e,t){var n=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=e;break;case 1:i.pipes=[i.pipes,e];break;default:i.pipes.push(e)}i.pipesCount+=1,r("pipe count=%d opts=%j",i.pipesCount,t);var a=t&&!1===t.end||e===o.stdout||e===o.stderr?g:u;function u(){r("onend"),e.end()}i.endEmitted?o.nextTick(a):n.once("end",a),e.on("unpipe",(function t(o,s){r("onunpipe"),o===n&&s&&!1===s.hasUnpiped&&(s.hasUnpiped=!0,r("cleanup"),e.removeListener("close",f),e.removeListener("finish",p),e.removeListener("drain",l),e.removeListener("error",d),e.removeListener("unpipe",t),n.removeListener("end",u),n.removeListener("end",g),n.removeListener("data",h),c=!0,!i.awaitDrain||e._writableState&&!e._writableState.needDrain||l())}));var l=function(e){return function(){var t=e._readableState;r("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&s(e,"data")&&(t.flowing=!0,P(e))}}(n);e.on("drain",l);var c=!1;function h(t){r("ondata");var o=e.write(t);r("dest.write",o),!1===o&&((1===i.pipesCount&&i.pipes===e||i.pipesCount>1&&-1!==B(i.pipes,e))&&!c&&(r("false write response, pause",i.awaitDrain),i.awaitDrain++),n.pause())}function d(t){r("onerror",t),g(),e.removeListener("error",d),0===s(e,"error")&&M(e,t)}function f(){e.removeListener("finish",p),g()}function p(){r("onfinish"),e.removeListener("close",f),g()}function g(){r("unpipe"),n.unpipe(e)}return n.on("data",h),function(e,t,n){if("function"==typeof e.prependListener)return e.prependListener(t,n);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]:e.on(t,n)}(e,"error",d),e.once("close",f),e.once("finish",p),e.emit("pipe",n),i.flowing||(r("pipe resume"),n.resume()),e},L.prototype.unpipe=function(e){var t=this._readableState,n={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,n)),this;if(!e){var i=t.pipes,o=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var r=0;r0,!1!==i.flowing&&this.resume()):"readable"===e&&(i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,r("on readable",i.length,i.reading),i.length?k(this):i.reading||o.nextTick(O,this))),n},L.prototype.addListener=L.prototype.on,L.prototype.removeListener=function(e,t){var n=a.prototype.removeListener.call(this,e,t);return"readable"===e&&o.nextTick(j,this),n},L.prototype.removeAllListeners=function(e){var t=a.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||o.nextTick(j,this),t},L.prototype.resume=function(){var e=this._readableState;return e.flowing||(r("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,o.nextTick(R,e,t))}(this,e)),e.paused=!1,this},L.prototype.pause=function(){return r("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(r("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},L.prototype.wrap=function(e){var t=this,n=this._readableState,i=!1;for(var o in e.on("end",(function(){if(r("wrapped end"),n.decoder&&!n.ended){var e=n.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(o){r("wrapped data"),n.decoder&&(o=n.decoder.write(o)),n.objectMode&&null==o||(n.objectMode||o&&o.length)&&(t.push(o)||(i=!0,e.pause()))})),e)void 0===this[o]&&"function"==typeof e[o]&&(this[o]=function(t){return function(){return e[t].apply(e,arguments)}}(o));for(var s=0;s{"use strict";e.exports=c;var i=n(368).F,o=i.ERR_METHOD_NOT_IMPLEMENTED,r=i.ERR_MULTIPLE_CALLBACK,s=i.ERR_TRANSFORM_ALREADY_TRANSFORMING,a=i.ERR_TRANSFORM_WITH_LENGTH_0,u=n(3030);function l(e,t){var n=this._transformState;n.transforming=!1;var i=n.writecb;if(null===i)return this.emit("error",new r);n.writechunk=null,n.writecb=null,null!=t&&this.push(t),i(e);var o=this._readableState;o.reading=!1,(o.needReadable||o.length{"use strict";var i,o=n(8957);function r(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,n){var i=e.entry;for(e.entry=null;i;){var o=i.callback;t.pendingcb--,o(undefined),i=i.next}t.corkedRequestsFree.next=e}(t,e)}}e.exports=L,L.WritableState=S;var s,a={deprecate:n(4982)},u=n(8137),l=n(1278).Buffer,c=(void 0!==n.g?n.g:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){},h=n(9944),d=n(7403).getHighWaterMark,f=n(368).F,p=f.ERR_INVALID_ARG_TYPE,g=f.ERR_METHOD_NOT_IMPLEMENTED,m=f.ERR_MULTIPLE_CALLBACK,v=f.ERR_STREAM_CANNOT_PIPE,y=f.ERR_STREAM_DESTROYED,b=f.ERR_STREAM_NULL_VALUES,_=f.ERR_STREAM_WRITE_AFTER_END,w=f.ERR_UNKNOWN_ENCODING,M=h.errorOrDestroy;function C(){}function S(e,t,s){i=i||n(3030),e=e||{},"boolean"!=typeof s&&(s=t instanceof i),this.objectMode=!!e.objectMode,s&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=d(this,e,"writableHighWaterMark",s),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var a=!1===e.decodeStrings;this.decodeStrings=!a,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var n=e._writableState,i=n.sync,r=n.writecb;if("function"!=typeof r)throw new m;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(n),t)!function(e,t,n,i,r){--t.pendingcb,n?(o.nextTick(r,i),o.nextTick(T,e,t),e._writableState.errorEmitted=!0,M(e,i)):(r(i),e._writableState.errorEmitted=!0,M(e,i),T(e,t))}(e,n,i,t,r);else{var s=D(n)||e.destroyed;s||n.corked||n.bufferProcessing||!n.bufferedRequest||x(e,n),i?o.nextTick(N,e,n,s,r):N(e,n,s,r)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new r(this)}function L(e){var t=this instanceof(i=i||n(3030));if(!t&&!s.call(L,this))return new L(e);this._writableState=new S(e,this,t),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),u.call(this)}function I(e,t,n,i,o,r,s){t.writelen=i,t.writecb=s,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new y("write")):n?e._writev(o,t.onwrite):e._write(o,r,t.onwrite),t.sync=!1}function N(e,t,n,i){n||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,i(),T(e,t)}function x(e,t){t.bufferProcessing=!0;var n=t.bufferedRequest;if(e._writev&&n&&n.next){var i=t.bufferedRequestCount,o=new Array(i),s=t.corkedRequestsFree;s.entry=n;for(var a=0,u=!0;n;)o[a]=n,n.isBuf||(u=!1),n=n.next,a+=1;o.allBuffers=u,I(e,t,!0,t.length,o,"",s.finish),t.pendingcb++,t.lastBufferedRequest=null,s.next?(t.corkedRequestsFree=s.next,s.next=null):t.corkedRequestsFree=new r(t),t.bufferedRequestCount=0}else{for(;n;){var l=n.chunk,c=n.encoding,h=n.callback;if(I(e,t,!1,t.objectMode?1:l.length,l,c,h),n=n.next,t.bufferedRequestCount--,t.writing)break}null===n&&(t.lastBufferedRequest=null)}t.bufferedRequest=n,t.bufferProcessing=!1}function D(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function k(e,t){e._final((function(n){t.pendingcb--,n&&M(e,n),t.prefinished=!0,e.emit("prefinish"),T(e,t)}))}function T(e,t){var n=D(t);if(n&&(function(e,t){t.prefinished||t.finalCalled||("function"!=typeof e._final||t.destroyed?(t.prefinished=!0,e.emit("prefinish")):(t.pendingcb++,t.finalCalled=!0,o.nextTick(k,e,t)))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"),t.autoDestroy))){var i=e._readableState;(!i||i.autoDestroy&&i.endEmitted)&&e.destroy()}return n}n(1322)(L,u),S.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(S.prototype,"buffer",{get:a.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(s=Function.prototype[Symbol.hasInstance],Object.defineProperty(L,Symbol.hasInstance,{value:function(e){return!!s.call(this,e)||this===L&&e&&e._writableState instanceof S}})):s=function(e){return e instanceof this},L.prototype.pipe=function(){M(this,new v)},L.prototype.write=function(e,t,n){var i,r=this._writableState,s=!1,a=!r.objectMode&&(i=e,l.isBuffer(i)||i instanceof c);return a&&!l.isBuffer(e)&&(e=function(e){return l.from(e)}(e)),"function"==typeof t&&(n=t,t=null),a?t="buffer":t||(t=r.defaultEncoding),"function"!=typeof n&&(n=C),r.ending?function(e,t){var n=new _;M(e,n),o.nextTick(t,n)}(this,n):(a||function(e,t,n,i){var r;return null===n?r=new b:"string"==typeof n||t.objectMode||(r=new p("chunk",["string","Buffer"],n)),!r||(M(e,r),o.nextTick(i,r),!1)}(this,r,e,n))&&(r.pendingcb++,s=function(e,t,n,i,o,r){if(!n){var s=function(e,t,n){return e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=l.from(t,n)),t}(t,i,o);i!==s&&(n=!0,o="buffer",i=s)}var a=t.objectMode?1:i.length;t.length+=a;var u=t.length-1))throw new w(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(L.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(L.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),L.prototype._write=function(e,t,n){n(new g("_write()"))},L.prototype._writev=null,L.prototype.end=function(e,t,n){var i=this._writableState;return"function"==typeof e?(n=e,e=null,t=null):"function"==typeof t&&(n=t,t=null),null!=e&&this.write(e,t),i.corked&&(i.corked=1,this.uncork()),i.ending||function(e,t,n){t.ending=!0,T(e,t),n&&(t.finished?o.nextTick(n):e.once("finish",n)),t.ended=!0,e.writable=!1}(this,i,n),this},Object.defineProperty(L.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(L.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),L.prototype.destroy=h.destroy,L.prototype._undestroy=h.undestroy,L.prototype._destroy=function(e,t){t(e)}},1339:(e,t,n)=>{"use strict";var i,o=n(8957);function r(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,"string");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var s=n(9262),a=Symbol("lastResolve"),u=Symbol("lastReject"),l=Symbol("error"),c=Symbol("ended"),h=Symbol("lastPromise"),d=Symbol("handlePromise"),f=Symbol("stream");function p(e,t){return{value:e,done:t}}function g(e){var t=e[a];if(null!==t){var n=e[f].read();null!==n&&(e[h]=null,e[a]=null,e[u]=null,t(p(n,!1)))}}function m(e){o.nextTick(g,e)}var v=Object.getPrototypeOf((function(){})),y=Object.setPrototypeOf((r(i={get stream(){return this[f]},next:function(){var e=this,t=this[l];if(null!==t)return Promise.reject(t);if(this[c])return Promise.resolve(p(void 0,!0));if(this[f].destroyed)return new Promise((function(t,n){o.nextTick((function(){e[l]?n(e[l]):t(p(void 0,!0))}))}));var n,i=this[h];if(i)n=new Promise(function(e,t){return function(n,i){e.then((function(){t[c]?n(p(void 0,!0)):t[d](n,i)}),i)}}(i,this));else{var r=this[f].read();if(null!==r)return Promise.resolve(p(r,!1));n=new Promise(this[d])}return this[h]=n,n}},Symbol.asyncIterator,(function(){return this})),r(i,"return",(function(){var e=this;return new Promise((function(t,n){e[f].destroy(null,(function(e){e?n(e):t(p(void 0,!0))}))}))})),i),v);e.exports=function(e){var t,n=Object.create(y,(r(t={},f,{value:e,writable:!0}),r(t,a,{value:null,writable:!0}),r(t,u,{value:null,writable:!0}),r(t,l,{value:null,writable:!0}),r(t,c,{value:e._readableState.endEmitted,writable:!0}),r(t,d,{value:function(e,t){var i=n[f].read();i?(n[h]=null,n[a]=null,n[u]=null,e(p(i,!1))):(n[a]=e,n[u]=t)},writable:!0}),t));return n[h]=null,s(e,(function(e){if(e&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code){var t=n[u];return null!==t&&(n[h]=null,n[a]=null,n[u]=null,t(e)),void(n[l]=e)}var i=n[a];null!==i&&(n[h]=null,n[a]=null,n[u]=null,i(p(void 0,!0))),n[c]=!0})),e.on("readable",m.bind(null,n)),n}},5081:(e,t,n)=>{"use strict";function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function o(e){for(var t=1;t0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:"unshift",value:function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}},{key:"shift",value:function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(e){if(0===this.length)return"";for(var t=this.head,n=""+t.data;t=t.next;)n+=e+t.data;return n}},{key:"concat",value:function(e){if(0===this.length)return u.alloc(0);for(var t,n,i,o=u.allocUnsafe(e>>>0),r=this.head,s=0;r;)t=r.data,n=o,i=s,u.prototype.copy.call(t,n,i),s+=r.data.length,r=r.next;return o}},{key:"consume",value:function(e,t){var n;return eo.length?o.length:e;if(r===o.length?i+=o:i+=o.slice(0,e),0==(e-=r)){r===o.length?(++n,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=o.slice(r));break}++n}return this.length-=n,i}},{key:"_getBuffer",value:function(e){var t=u.allocUnsafe(e),n=this.head,i=1;for(n.data.copy(t),e-=n.data.length;n=n.next;){var o=n.data,r=e>o.length?o.length:e;if(o.copy(t,t.length-e,0,r),0==(e-=r)){r===o.length?(++i,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=o.slice(r));break}++i}return this.length-=i,t}},{key:c,value:function(e,t){return l(this,o(o({},t),{},{depth:0,customInspect:!1}))}}])&&s(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}()},9944:(e,t,n)=>{"use strict";var i=n(8957);function o(e,t){s(e,t),r(e)}function r(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function s(e,t){e.emit("error",t)}e.exports={destroy:function(e,t){var n=this,a=this._readableState&&this._readableState.destroyed,u=this._writableState&&this._writableState.destroyed;return a||u?(t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,i.nextTick(s,this,e)):i.nextTick(s,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,(function(e){!t&&e?n._writableState?n._writableState.errorEmitted?i.nextTick(r,n):(n._writableState.errorEmitted=!0,i.nextTick(o,n,e)):i.nextTick(o,n,e):t?(i.nextTick(r,n),t(e)):i.nextTick(r,n)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(e,t){var n=e._readableState,i=e._writableState;n&&n.autoDestroy||i&&i.autoDestroy?e.destroy(t):e.emit("error",t)}}},9262:(e,t,n)=>{"use strict";var i=n(368).F.ERR_STREAM_PREMATURE_CLOSE;function o(){}e.exports=function e(t,n,r){if("function"==typeof n)return e(t,null,n);n||(n={}),r=function(e){var t=!1;return function(){if(!t){t=!0;for(var n=arguments.length,i=new Array(n),o=0;o{e.exports=function(){throw new Error("Readable.from is not available in the browser")}},4030:(e,t,n)=>{"use strict";var i,o=n(368).F,r=o.ERR_MISSING_ARGS,s=o.ERR_STREAM_DESTROYED;function a(e){if(e)throw e}function u(e){e()}function l(e,t){return e.pipe(t)}e.exports=function(){for(var e=arguments.length,t=new Array(e),o=0;o0,(function(e){c||(c=e),e&&d.forEach(u),r||(d.forEach(u),h(c))}))}));return t.reduce(l)}},7403:(e,t,n)=>{"use strict";var i=n(368).F.ERR_INVALID_OPT_VALUE;e.exports={getHighWaterMark:function(e,t,n,o){var r=function(e,t,n){return null!=e.highWaterMark?e.highWaterMark:t?e[n]:null}(t,o,n);if(null!=r){if(!isFinite(r)||Math.floor(r)!==r||r<0)throw new i(o?n:"highWaterMark",r);return Math.floor(r)}return e.objectMode?16:16384}}},8137:(e,t,n)=>{e.exports=n(3188).EventEmitter},230:(e,t,n)=>{"use strict";var i=n(9600).Buffer,o=i.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function r(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(i.isEncoding===o||!o(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=u,this.end=l,t=4;break;case"utf8":this.fillLast=a,t=4;break;case"base64":this.text=c,this.end=h,t=3;break;default:return this.write=d,void(this.end=f)}this.lastNeed=0,this.lastTotal=0,this.lastChar=i.allocUnsafe(t)}function s(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function a(e){var t=this.lastTotal-this.lastNeed,n=function(e,t,n){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==n?n:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function u(e,t){if((e.length-t)%2==0){var n=e.toString("utf16le",t);if(n){var i=n.charCodeAt(n.length-1);if(i>=55296&&i<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function l(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,n)}return t}function c(e,t){var n=(e.length-t)%3;return 0===n?e.toString("base64",t):(this.lastNeed=3-n,this.lastTotal=3,1===n?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-n))}function h(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function d(e){return e.toString(this.encoding)}function f(e){return e&&e.length?this.write(e):""}t.I=r,r.prototype.write=function(e){if(0===e.length)return"";var t,n;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";n=this.lastNeed,this.lastNeed=0}else n=0;return n=0?(o>0&&(e.lastNeed=o-1),o):--i=0?(o>0&&(e.lastNeed=o-2),o):--i=0?(o>0&&(2===o?o=0:e.lastNeed=o-3),o):0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=n;var i=e.length-(n-this.lastNeed);return e.copy(this.lastChar,0,i),e.toString("utf8",t,i)},r.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},9600:(e,t,n)=>{var i=n(1278),o=i.Buffer;function r(e,t){for(var n in e)t[n]=e[n]}function s(e,t,n){return o(e,t,n)}o.from&&o.alloc&&o.allocUnsafe&&o.allocUnsafeSlow?e.exports=i:(r(i,t),t.Buffer=s),s.prototype=Object.create(o.prototype),r(o,s),s.from=function(e,t,n){if("number"==typeof e)throw new TypeError("Argument must not be a number");return o(e,t,n)},s.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError("Argument must be a number");var i=o(e);return void 0!==t?"string"==typeof n?i.fill(t,n):i.fill(t):i.fill(0),i},s.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return o(e)},s.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i.SlowBuffer(e)}},650:(e,t,n)=>{var i,o,r={},s=(i=function(){return window&&document&&document.all&&!window.atob},function(){return void 0===o&&(o=i.apply(this,arguments)),o}),a=function(e){return document.querySelector(e)},u=function(e){var t={};return function(e){if("function"==typeof e)return e();if(void 0===t[e]){var n=a.call(this,e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}t[e]=n}return t[e]}}(),l=null,c=0,h=[],d=n(2693);function f(e,t){for(var n=0;n=0&&h.splice(t,1)}function v(e){var t=document.createElement("style");return e.attrs.type="text/css",y(t,e.attrs),g(e,t),t}function y(e,t){Object.keys(t).forEach((function(n){e.setAttribute(n,t[n])}))}function b(e,t){var n,i,o,r;if(t.transform&&e.css){if(!(r=t.transform(e.css)))return function(){};e.css=r}if(t.singleton){var s=c++;n=l||(l=v(t)),i=M.bind(null,n,s,!1),o=M.bind(null,n,s,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=function(e){var t=document.createElement("link");return e.attrs.type="text/css",e.attrs.rel="stylesheet",y(t,e.attrs),g(e,t),t}(t),i=S.bind(null,n,t),o=function(){m(n),n.href&&URL.revokeObjectURL(n.href)}):(n=v(t),i=C.bind(null,n),o=function(){m(n)});return i(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;i(e=t)}else o()}}e.exports=function(e,t){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(t=t||{}).attrs="object"==typeof t.attrs?t.attrs:{},t.singleton||"boolean"==typeof t.singleton||(t.singleton=s()),t.insertInto||(t.insertInto="head"),t.insertAt||(t.insertAt="bottom");var n=p(e,t);return f(n,t),function(e){for(var i=[],o=0;o{e.exports=function(e){var t="undefined"!=typeof window&&window.location;if(!t)throw new Error("fixUrls requires window.location");if(!e||"string"!=typeof e)return e;var n=t.protocol+"//"+t.host,i=n+t.pathname.replace(/\/[^\/]*$/,"/");return e.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,(function(e,t){var o,r=t.trim().replace(/^"(.*)"$/,(function(e,t){return t})).replace(/^'(.*)'$/,(function(e,t){return t}));return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(r)?e:(o=0===r.indexOf("//")?r:0===r.indexOf("/")?n+r:i+r.replace(/^\.\//,""),"url("+JSON.stringify(o)+")")}))}},4982:(e,t,n)=>{function i(e){try{if(!n.g.localStorage)return!1}catch(e){return!1}var t=n.g.localStorage[e];return null!=t&&"true"===String(t).toLowerCase()}e.exports=function(e,t){if(i("noDeprecation"))return e;var n=!1;return function(){if(!n){if(i("throwDeprecation"))throw new Error(t);i("traceDeprecation")?console.trace(t):console.warn(t),n=!0}return e.apply(this,arguments)}}},7190:(__unused_webpack_module,exports)=>{var indexOf=function(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0;n0)&&!(i=r.next()).done;)s.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return s},a=this&&this.__spread||function(){for(var e=[],t=0;t=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}};Object.defineProperty(t,"__esModule",{value:!0});var l=n(9120),c=n(7850),h=n(3450),d=n(9950),f=n(8330),p=n(5200),g=n(6297);!function(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}(n(7850));var m,v,y=function(){function e(){}return e.prototype.error=function(e){console.error(e)},e.prototype.warn=function(e){console.warn(e)},e.prototype.info=function(e){console.info(e)},e.prototype.log=function(e){console.log(e)},e}();!function(e){e[e.Continue=1]="Continue",e[e.Shutdown=2]="Shutdown"}(m=t.ErrorAction||(t.ErrorAction={})),function(e){e[e.DoNotRestart=1]="DoNotRestart",e[e.Restart=2]="Restart"}(v=t.CloseAction||(t.CloseAction={}));var b,_,w,M=function(){function e(e){this.name=e,this.restarts=[]}return e.prototype.error=function(e,t,n){return n&&n<=3?m.Continue:m.Shutdown},e.prototype.closed=function(){return this.restarts.push(Date.now()),this.restarts.length<5?v.Restart:this.restarts[this.restarts.length-1]-this.restarts[0]<=18e4?(l.window.showErrorMessage("The "+this.name+" server crashed 5 times in the last 3 minutes. The server will not be restarted."),v.DoNotRestart):(this.restarts.shift(),v.Restart)},e}();!function(e){e[e.Info=1]="Info",e[e.Warn=2]="Warn",e[e.Error=3]="Error",e[e.Never=4]="Never"}(b=t.RevealOutputChannelOn||(t.RevealOutputChannelOn={})),function(e){e[e.Stopped=1]="Stopped",e[e.Running=2]="Running"}(_=t.State||(t.State={})),function(e){e[e.Initial=0]="Initial",e[e.Starting=1]="Starting",e[e.StartFailed=2]="StartFailed",e[e.Running=3]="Running",e[e.Stopping=4]="Stopping",e[e.Stopped=5]="Stopped"}(w||(w={}));var C,S=[c.SymbolKind.File,c.SymbolKind.Module,c.SymbolKind.Namespace,c.SymbolKind.Package,c.SymbolKind.Class,c.SymbolKind.Method,c.SymbolKind.Property,c.SymbolKind.Field,c.SymbolKind.Constructor,c.SymbolKind.Enum,c.SymbolKind.Interface,c.SymbolKind.Function,c.SymbolKind.Variable,c.SymbolKind.Constant,c.SymbolKind.String,c.SymbolKind.Number,c.SymbolKind.Boolean,c.SymbolKind.Array,c.SymbolKind.Object,c.SymbolKind.Key,c.SymbolKind.Null,c.SymbolKind.EnumMember,c.SymbolKind.Struct,c.SymbolKind.Event,c.SymbolKind.Operator,c.SymbolKind.TypeParameter],L=[c.CompletionItemKind.Text,c.CompletionItemKind.Method,c.CompletionItemKind.Function,c.CompletionItemKind.Constructor,c.CompletionItemKind.Field,c.CompletionItemKind.Variable,c.CompletionItemKind.Class,c.CompletionItemKind.Interface,c.CompletionItemKind.Module,c.CompletionItemKind.Property,c.CompletionItemKind.Unit,c.CompletionItemKind.Value,c.CompletionItemKind.Enum,c.CompletionItemKind.Keyword,c.CompletionItemKind.Snippet,c.CompletionItemKind.Color,c.CompletionItemKind.File,c.CompletionItemKind.Reference,c.CompletionItemKind.Folder,c.CompletionItemKind.EnumMember,c.CompletionItemKind.Constant,c.CompletionItemKind.Struct,c.CompletionItemKind.Event,c.CompletionItemKind.Operator,c.CompletionItemKind.TypeParameter];function I(e,t){return void 0===e[t]&&(e[t]={}),e[t]}!function(e){e.is=function(e){var t=e;return t&&f.func(t.register)&&f.func(t.unregister)&&f.func(t.dispose)&&void 0!==t.messages}}(C||(C={}));var N=function(){function e(e,t,n,i,o,r){this._client=e,this._event=t,this._type=n,this._middleware=i,this._createParams=o,this._selectorFilter=r,this._selectors=new Map}return e.textDocumentFilter=function(e,t){var n,i;try{for(var o=u(e),r=o.next();!r.done;r=o.next()){var s=r.value;if(l.languages.match(s,t))return!0}}catch(e){n={error:e}}finally{try{r&&!r.done&&(i=o.return)&&i.call(o)}finally{if(n)throw n.error}}return!1},e.prototype.register=function(e,t){t.registerOptions.documentSelector&&(this._listener||(this._listener=this._event(this.callback,this)),this._selectors.set(t.id,t.registerOptions.documentSelector))},e.prototype.callback=function(e){var t=this;this._selectorFilter&&!this._selectorFilter(this._selectors.values(),e)||(this._middleware?this._middleware(e,(function(e){return t._client.sendNotification(t._type,t._createParams(e))})):this._client.sendNotification(this._type,this._createParams(e)),this.notificationSent(e))},e.prototype.notificationSent=function(e){},e.prototype.unregister=function(e){this._selectors.delete(e),0===this._selectors.size&&this._listener&&(this._listener.dispose(),this._listener=void 0)},e.prototype.dispose=function(){this._selectors.clear(),this._listener&&this._listener.dispose()},e}(),x=function(e){function t(t,n){var i=e.call(this,t,l.workspace.onDidOpenTextDocument,c.DidOpenTextDocumentNotification.type,t.clientOptions.middleware.didOpen,(function(e){return t.code2ProtocolConverter.asOpenTextDocumentParams(e)}),N.textDocumentFilter)||this;return i._syncedDocuments=n,i}return r(t,e),Object.defineProperty(t.prototype,"messages",{get:function(){return c.DidOpenTextDocumentNotification.type},enumerable:!0,configurable:!0}),t.prototype.fillClientCapabilities=function(e){I(I(e,"textDocument"),"synchronization").dynamicRegistration=!0},t.prototype.initialize=function(e,t){var n=e.resolvedTextDocumentSync;t&&n&&n.openClose&&this.register(this.messages,{id:g.generateUuid(),registerOptions:{documentSelector:t}})},t.prototype.register=function(t,n){var i=this;if(e.prototype.register.call(this,t,n),n.registerOptions.documentSelector){var o=n.registerOptions.documentSelector;l.workspace.textDocuments.forEach((function(e){var t=e.uri.toString();if(!i._syncedDocuments.has(t)&&l.languages.match(o,e)){var n=i._client.clientOptions.middleware,r=function(e){i._client.sendNotification(i._type,i._createParams(e))};n.didOpen?n.didOpen(e,r):r(e),i._syncedDocuments.set(t,e)}}))}},t.prototype.notificationSent=function(t){e.prototype.notificationSent.call(this,t),this._syncedDocuments.set(t.uri.toString(),t)},t}(N),D=function(e){function t(t,n){var i=e.call(this,t,l.workspace.onDidCloseTextDocument,c.DidCloseTextDocumentNotification.type,t.clientOptions.middleware.didClose,(function(e){return t.code2ProtocolConverter.asCloseTextDocumentParams(e)}),N.textDocumentFilter)||this;return i._syncedDocuments=n,i}return r(t,e),Object.defineProperty(t.prototype,"messages",{get:function(){return c.DidCloseTextDocumentNotification.type},enumerable:!0,configurable:!0}),t.prototype.fillClientCapabilities=function(e){I(I(e,"textDocument"),"synchronization").dynamicRegistration=!0},t.prototype.initialize=function(e,t){var n=e.resolvedTextDocumentSync;t&&n&&n.openClose&&this.register(this.messages,{id:g.generateUuid(),registerOptions:{documentSelector:t}})},t.prototype.notificationSent=function(t){e.prototype.notificationSent.call(this,t),this._syncedDocuments.delete(t.uri.toString())},t.prototype.unregister=function(t){var n=this,i=this._selectors.get(t);e.prototype.unregister.call(this,t);var o=this._selectors.values();this._syncedDocuments.forEach((function(e){if(l.languages.match(i,e)&&!n._selectorFilter(o,e)){var t=n._client.clientOptions.middleware,r=function(e){n._client.sendNotification(n._type,n._createParams(e))};n._syncedDocuments.delete(e.uri.toString()),t.didClose?t.didClose(e,r):r(e)}}))},t}(N),k=function(){function e(e){this._client=e,this._changeData=new Map,this._forcingDelivery=!1}return Object.defineProperty(e.prototype,"messages",{get:function(){return c.DidChangeTextDocumentNotification.type},enumerable:!0,configurable:!0}),e.prototype.fillClientCapabilities=function(e){I(I(e,"textDocument"),"synchronization").dynamicRegistration=!0},e.prototype.initialize=function(e,t){var n=e.resolvedTextDocumentSync;t&&n&&void 0!==n.change&&n.change!==c.TextDocumentSyncKind.None&&this.register(this.messages,{id:g.generateUuid(),registerOptions:Object.assign({},{documentSelector:t},{syncKind:n.change})})},e.prototype.register=function(e,t){t.registerOptions.documentSelector&&(this._listener||(this._listener=l.workspace.onDidChangeTextDocument(this.callback,this)),this._changeData.set(t.id,{documentSelector:t.registerOptions.documentSelector,syncKind:t.registerOptions.syncKind}))},e.prototype.callback=function(e){var t,n,i=this;if(0!==e.contentChanges.length){var o=function(t){if(l.languages.match(t.documentSelector,e.document)){var n=r._client.clientOptions.middleware;if(t.syncKind===c.TextDocumentSyncKind.Incremental){var o=r._client.code2ProtocolConverter.asChangeTextDocumentParams(e);n.didChange?n.didChange(e,(function(){return i._client.sendNotification(c.DidChangeTextDocumentNotification.type,o)})):r._client.sendNotification(c.DidChangeTextDocumentNotification.type,o)}else if(t.syncKind===c.TextDocumentSyncKind.Full){var s=function(e){i._changeDelayer?(i._changeDelayer.uri!==e.document.uri.toString()&&(i.forceDelivery(),i._changeDelayer.uri=e.document.uri.toString()),i._changeDelayer.delayer.trigger((function(){i._client.sendNotification(c.DidChangeTextDocumentNotification.type,i._client.code2ProtocolConverter.asChangeTextDocumentParams(e.document))}))):(i._changeDelayer={uri:e.document.uri.toString(),delayer:new p.Delayer(200)},i._changeDelayer.delayer.trigger((function(){i._client.sendNotification(c.DidChangeTextDocumentNotification.type,i._client.code2ProtocolConverter.asChangeTextDocumentParams(e.document))}),-1))};n.didChange?n.didChange(e,s):s(e)}}},r=this;try{for(var s=u(this._changeData.values()),a=s.next();!a.done;a=s.next())o(a.value)}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}}},e.prototype.unregister=function(e){this._changeData.delete(e),0===this._changeData.size&&this._listener&&(this._listener.dispose(),this._listener=void 0)},e.prototype.dispose=function(){this._changeDelayer=void 0,this._forcingDelivery=!1,this._changeData.clear(),this._listener&&(this._listener.dispose(),this._listener=void 0)},e.prototype.forceDelivery=function(){if(!this._forcingDelivery&&this._changeDelayer)try{this._forcingDelivery=!0,this._changeDelayer.delayer.forceDelivery()}finally{this._forcingDelivery=!1}},e}(),T=function(e){function t(t){return e.call(this,t,l.workspace.onWillSaveTextDocument,c.WillSaveTextDocumentNotification.type,t.clientOptions.middleware.willSave,(function(e){return t.code2ProtocolConverter.asWillSaveTextDocumentParams(e)}),(function(e,t){return N.textDocumentFilter(e,t.document)}))||this}return r(t,e),Object.defineProperty(t.prototype,"messages",{get:function(){return c.WillSaveTextDocumentNotification.type},enumerable:!0,configurable:!0}),t.prototype.fillClientCapabilities=function(e){I(I(e,"textDocument"),"synchronization").willSave=!0},t.prototype.initialize=function(e,t){var n=e.resolvedTextDocumentSync;t&&n&&n.willSave&&this.register(this.messages,{id:g.generateUuid(),registerOptions:{documentSelector:t}})},t}(N),E=function(){function e(e){this._client=e,this._selectors=new Map}return Object.defineProperty(e.prototype,"messages",{get:function(){return c.WillSaveTextDocumentWaitUntilRequest.type},enumerable:!0,configurable:!0}),e.prototype.fillClientCapabilities=function(e){I(I(e,"textDocument"),"synchronization").willSaveWaitUntil=!0},e.prototype.initialize=function(e,t){var n=e.resolvedTextDocumentSync;t&&n&&n.willSaveWaitUntil&&this.register(this.messages,{id:g.generateUuid(),registerOptions:{documentSelector:t}})},e.prototype.register=function(e,t){t.registerOptions.documentSelector&&(this._listener||(this._listener=l.workspace.onWillSaveTextDocument(this.callback,this)),this._selectors.set(t.id,t.registerOptions.documentSelector))},e.prototype.callback=function(e){var t=this;if(N.textDocumentFilter(this._selectors.values(),e.document)){var n=this._client.clientOptions.middleware,i=function(e){return t._client.sendRequest(c.WillSaveTextDocumentWaitUntilRequest.type,t._client.code2ProtocolConverter.asWillSaveTextDocumentParams(e)).then((function(e){var n=t._client.protocol2CodeConverter.asTextEdits(e);return void 0===n?[]:n}))};e.waitUntil(n.willSaveWaitUntil?n.willSaveWaitUntil(e,i):i(e))}},e.prototype.unregister=function(e){this._selectors.delete(e),0===this._selectors.size&&this._listener&&(this._listener.dispose(),this._listener=void 0)},e.prototype.dispose=function(){this._selectors.clear(),this._listener&&(this._listener.dispose(),this._listener=void 0)},e}(),A=function(e){function t(t){var n=e.call(this,t,l.workspace.onDidSaveTextDocument,c.DidSaveTextDocumentNotification.type,t.clientOptions.middleware.didSave,(function(e){return t.code2ProtocolConverter.asSaveTextDocumentParams(e,n._includeText)}),N.textDocumentFilter)||this;return n}return r(t,e),Object.defineProperty(t.prototype,"messages",{get:function(){return c.DidSaveTextDocumentNotification.type},enumerable:!0,configurable:!0}),t.prototype.fillClientCapabilities=function(e){I(I(e,"textDocument"),"synchronization").didSave=!0},t.prototype.initialize=function(e,t){var n=e.resolvedTextDocumentSync;t&&n&&n.save&&this.register(this.messages,{id:g.generateUuid(),registerOptions:Object.assign({},{documentSelector:t},{includeText:!!n.save.includeText})})},t.prototype.register=function(t,n){this._includeText=!!n.registerOptions.includeText,e.prototype.register.call(this,t,n)},t}(N),j=function(){function e(e,t){this._client=e,this._notifyFileEvent=t,this._watchers=new Map}return Object.defineProperty(e.prototype,"messages",{get:function(){return c.DidChangeWatchedFilesNotification.type},enumerable:!0,configurable:!0}),e.prototype.fillClientCapabilities=function(e){I(I(e,"workspace"),"didChangeWatchedFiles").dynamicRegistration=!0},e.prototype.initialize=function(e,t){},e.prototype.register=function(e,t){var n,i;if(Array.isArray(t.registerOptions.watchers)){var o=[];try{for(var r=u(t.registerOptions.watchers),s=r.next();!s.done;s=r.next()){var a=s.value;if(f.string(a.globPattern)){var h=!0,d=!0,p=!0;void 0!==a.kind&&null!==a.kind&&(h=!!(a.kind&c.WatchKind.Create),d=!!(a.kind&c.WatchKind.Change),p=!!(a.kind&c.WatchKind.Delete));var g=l.workspace.createFileSystemWatcher(a.globPattern,!h,!d,!p);this.hookListeners(g,h,d,p),o.push(g)}}}catch(e){n={error:e}}finally{try{s&&!s.done&&(i=r.return)&&i.call(r)}finally{if(n)throw n.error}}this._watchers.set(t.id,o)}},e.prototype.registerRaw=function(e,t){var n,i,o=[];try{for(var r=u(t),s=r.next();!s.done;s=r.next()){var a=s.value;this.hookListeners(a,!0,!0,!0,o)}}catch(e){n={error:e}}finally{try{s&&!s.done&&(i=r.return)&&i.call(r)}finally{if(n)throw n.error}}this._watchers.set(e,o)},e.prototype.hookListeners=function(e,t,n,i,o){var r=this;t&&e.onDidCreate((function(e){return r._notifyFileEvent({uri:r._client.code2ProtocolConverter.asUri(e),type:c.FileChangeType.Created})}),null,o),n&&e.onDidChange((function(e){return r._notifyFileEvent({uri:r._client.code2ProtocolConverter.asUri(e),type:c.FileChangeType.Changed})}),null,o),i&&e.onDidDelete((function(e){return r._notifyFileEvent({uri:r._client.code2ProtocolConverter.asUri(e),type:c.FileChangeType.Deleted})}),null,o)},e.prototype.unregister=function(e){var t,n,i=this._watchers.get(e);if(i)try{for(var o=u(i),r=o.next();!r.done;r=o.next())r.value.dispose()}catch(e){t={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}},e.prototype.dispose=function(){this._watchers.forEach((function(e){var t,n;try{for(var i=u(e),o=i.next();!o.done;o=i.next())o.value.dispose()}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}})),this._watchers.clear()},e}(),O=function(){function e(e,t){this._client=e,this._message=t,this._providers=new Map}return Object.defineProperty(e.prototype,"messages",{get:function(){return this._message},enumerable:!0,configurable:!0}),e.prototype.register=function(e,t){if(e.method!==this.messages.method)throw new Error("Register called on wrong feature. Requested "+e.method+" but reached feature "+this.messages.method);if(t.registerOptions.documentSelector){var n=this.registerLanguageProvider(t.registerOptions);n&&this._providers.set(t.id,n)}},e.prototype.unregister=function(e){var t=this._providers.get(e);t&&t.dispose()},e.prototype.dispose=function(){this._providers.forEach((function(e){e.dispose()})),this._providers.clear()},e}();t.TextDocumentFeature=O;var R=function(){function e(e,t){this._client=e,this._message=t,this._providers=new Map}return Object.defineProperty(e.prototype,"messages",{get:function(){return this._message},enumerable:!0,configurable:!0}),e.prototype.register=function(e,t){if(e.method!==this.messages.method)throw new Error("Register called on wron feature. Requested "+e.method+" but reached feature "+this.messages.method);var n=this.registerLanguageProvider(t.registerOptions);n&&this._providers.set(t.id,n)},e.prototype.unregister=function(e){var t=this._providers.get(e);t&&t.dispose()},e.prototype.dispose=function(){this._providers.forEach((function(e){e.dispose()})),this._providers.clear()},e}(),P=function(e){function t(t){return e.call(this,t,c.CompletionRequest.type)||this}return r(t,e),t.prototype.fillClientCapabilities=function(e){var t=I(I(e,"textDocument"),"completion");t.dynamicRegistration=!0,t.contextSupport=!0,t.completionItem={snippetSupport:!0,commitCharactersSupport:!0,documentationFormat:[c.MarkupKind.Markdown,c.MarkupKind.PlainText],deprecatedSupport:!0,preselectSupport:!0},t.completionItemKind={valueSet:L}},t.prototype.initialize=function(e,t){e.completionProvider&&t&&this.register(this.messages,{id:g.generateUuid(),registerOptions:Object.assign({},{documentSelector:t},e.completionProvider)})},t.prototype.registerLanguageProvider=function(e){var t=e.triggerCharacters||[],n=this._client,i=function(e,t,i,o){return n.sendRequest(c.CompletionRequest.type,n.code2ProtocolConverter.asCompletionParams(e,t,i),o).then(n.protocol2CodeConverter.asCompletionResult,(function(e){return n.logFailedRequest(c.CompletionRequest.type,e),Promise.resolve([])}))},o=function(e,t){return n.sendRequest(c.CompletionResolveRequest.type,n.code2ProtocolConverter.asCompletionItem(e),t).then(n.protocol2CodeConverter.asCompletionItem,(function(t){return n.logFailedRequest(c.CompletionResolveRequest.type,t),Promise.resolve(e)}))},r=this._client.clientOptions.middleware;return l.languages.registerCompletionItemProvider.apply(l.languages,a([e.documentSelector,{provideCompletionItems:function(e,t,n,o){return r.provideCompletionItem?r.provideCompletionItem(e,t,o,n,i):i(e,t,o,n)},resolveCompletionItem:e.resolveProvider?function(e,t){return r.resolveCompletionItem?r.resolveCompletionItem(e,t,o):o(e,t)}:void 0}],t))},t}(O),z=function(e){function t(t){return e.call(this,t,c.HoverRequest.type)||this}return r(t,e),t.prototype.fillClientCapabilities=function(e){var t=I(I(e,"textDocument"),"hover");t.dynamicRegistration=!0,t.contentFormat=[c.MarkupKind.Markdown,c.MarkupKind.PlainText]},t.prototype.initialize=function(e,t){e.hoverProvider&&t&&this.register(this.messages,{id:g.generateUuid(),registerOptions:Object.assign({},{documentSelector:t})})},t.prototype.registerLanguageProvider=function(e){var t=this._client,n=function(e,n,i){return t.sendRequest(c.HoverRequest.type,t.code2ProtocolConverter.asTextDocumentPositionParams(e,n),i).then(t.protocol2CodeConverter.asHover,(function(e){return t.logFailedRequest(c.HoverRequest.type,e),Promise.resolve(null)}))},i=t.clientOptions.middleware;return l.languages.registerHoverProvider(e.documentSelector,{provideHover:function(e,t,o){return i.provideHover?i.provideHover(e,t,o,n):n(e,t,o)}})},t}(O),W=function(e){function t(t){return e.call(this,t,c.SignatureHelpRequest.type)||this}return r(t,e),t.prototype.fillClientCapabilities=function(e){var t=I(I(e,"textDocument"),"signatureHelp");t.dynamicRegistration=!0,t.signatureInformation={documentationFormat:[c.MarkupKind.Markdown,c.MarkupKind.PlainText]}},t.prototype.initialize=function(e,t){e.signatureHelpProvider&&t&&this.register(this.messages,{id:g.generateUuid(),registerOptions:Object.assign({},{documentSelector:t},e.signatureHelpProvider)})},t.prototype.registerLanguageProvider=function(e){var t=this._client,n=function(e,n,i){return t.sendRequest(c.SignatureHelpRequest.type,t.code2ProtocolConverter.asTextDocumentPositionParams(e,n),i).then(t.protocol2CodeConverter.asSignatureHelp,(function(e){return t.logFailedRequest(c.SignatureHelpRequest.type,e),Promise.resolve(null)}))},i=t.clientOptions.middleware,o=e.triggerCharacters||[];return l.languages.registerSignatureHelpProvider.apply(l.languages,a([e.documentSelector,{provideSignatureHelp:function(e,t,o){return i.provideSignatureHelp?i.provideSignatureHelp(e,t,o,n):n(e,t,o)}}],o))},t}(O),F=function(e){function t(t){return e.call(this,t,c.DefinitionRequest.type)||this}return r(t,e),t.prototype.fillClientCapabilities=function(e){I(I(e,"textDocument"),"definition").dynamicRegistration=!0},t.prototype.initialize=function(e,t){e.definitionProvider&&t&&this.register(this.messages,{id:g.generateUuid(),registerOptions:Object.assign({},{documentSelector:t})})},t.prototype.registerLanguageProvider=function(e){var t=this._client,n=function(e,n,i){return t.sendRequest(c.DefinitionRequest.type,t.code2ProtocolConverter.asTextDocumentPositionParams(e,n),i).then(t.protocol2CodeConverter.asDefinitionResult,(function(e){return t.logFailedRequest(c.DefinitionRequest.type,e),Promise.resolve(null)}))},i=t.clientOptions.middleware;return l.languages.registerDefinitionProvider(e.documentSelector,{provideDefinition:function(e,t,o){return i.provideDefinition?i.provideDefinition(e,t,o,n):n(e,t,o)}})},t}(O),B=function(e){function t(t){return e.call(this,t,c.ReferencesRequest.type)||this}return r(t,e),t.prototype.fillClientCapabilities=function(e){I(I(e,"textDocument"),"references").dynamicRegistration=!0},t.prototype.initialize=function(e,t){e.referencesProvider&&t&&this.register(this.messages,{id:g.generateUuid(),registerOptions:Object.assign({},{documentSelector:t})})},t.prototype.registerLanguageProvider=function(e){var t=this._client,n=function(e,n,i,o){return t.sendRequest(c.ReferencesRequest.type,t.code2ProtocolConverter.asReferenceParams(e,n,i),o).then(t.protocol2CodeConverter.asReferences,(function(e){return t.logFailedRequest(c.ReferencesRequest.type,e),Promise.resolve([])}))},i=t.clientOptions.middleware;return l.languages.registerReferenceProvider(e.documentSelector,{provideReferences:function(e,t,o,r){return i.provideReferences?i.provideReferences(e,t,o,r,n):n(e,t,o,r)}})},t}(O),H=function(e){function t(t){return e.call(this,t,c.DocumentHighlightRequest.type)||this}return r(t,e),t.prototype.fillClientCapabilities=function(e){I(I(e,"textDocument"),"documentHighlight").dynamicRegistration=!0},t.prototype.initialize=function(e,t){e.documentHighlightProvider&&t&&this.register(this.messages,{id:g.generateUuid(),registerOptions:Object.assign({},{documentSelector:t})})},t.prototype.registerLanguageProvider=function(e){var t=this._client,n=function(e,n,i){return t.sendRequest(c.DocumentHighlightRequest.type,t.code2ProtocolConverter.asTextDocumentPositionParams(e,n),i).then(t.protocol2CodeConverter.asDocumentHighlights,(function(e){return t.logFailedRequest(c.DocumentHighlightRequest.type,e),Promise.resolve([])}))},i=t.clientOptions.middleware;return l.languages.registerDocumentHighlightProvider(e.documentSelector,{provideDocumentHighlights:function(e,t,o){return i.provideDocumentHighlights?i.provideDocumentHighlights(e,t,o,n):n(e,t,o)}})},t}(O),V=function(e){function t(t){return e.call(this,t,c.DocumentSymbolRequest.type)||this}return r(t,e),t.prototype.fillClientCapabilities=function(e){var t=I(I(e,"textDocument"),"documentSymbol");t.dynamicRegistration=!0,t.symbolKind={valueSet:S},t.hierarchicalDocumentSymbolSupport=!0},t.prototype.initialize=function(e,t){e.documentSymbolProvider&&t&&this.register(this.messages,{id:g.generateUuid(),registerOptions:Object.assign({},{documentSelector:t})})},t.prototype.registerLanguageProvider=function(e){var t=this._client,n=function(e,n){return t.sendRequest(c.DocumentSymbolRequest.type,t.code2ProtocolConverter.asDocumentSymbolParams(e),n).then((function(e){if(null!==e){if(0===e.length)return[];var n=e[0];return c.DocumentSymbol.is(n)?t.protocol2CodeConverter.asDocumentSymbols(e):t.protocol2CodeConverter.asSymbolInformations(e)}}),(function(e){return t.logFailedRequest(c.DocumentSymbolRequest.type,e),Promise.resolve([])}))},i=t.clientOptions.middleware;return l.languages.registerDocumentSymbolProvider(e.documentSelector,{provideDocumentSymbols:function(e,t){return i.provideDocumentSymbols?i.provideDocumentSymbols(e,t,n):n(e,t)}})},t}(O),U=function(e){function t(t){return e.call(this,t,c.WorkspaceSymbolRequest.type)||this}return r(t,e),t.prototype.fillClientCapabilities=function(e){var t=I(I(e,"workspace"),"symbol");t.dynamicRegistration=!0,t.symbolKind={valueSet:S}},t.prototype.initialize=function(e){e.workspaceSymbolProvider&&this.register(this.messages,{id:g.generateUuid(),registerOptions:void 0})},t.prototype.registerLanguageProvider=function(e){var t=this._client,n=function(e,n){return t.sendRequest(c.WorkspaceSymbolRequest.type,{query:e},n).then(t.protocol2CodeConverter.asSymbolInformations,(function(e){return t.logFailedRequest(c.WorkspaceSymbolRequest.type,e),Promise.resolve([])}))},i=t.clientOptions.middleware;return l.languages.registerWorkspaceSymbolProvider({provideWorkspaceSymbols:function(e,t){return i.provideWorkspaceSymbols?i.provideWorkspaceSymbols(e,t,n):n(e,t)}})},t}(R),Y=function(e){function t(t){return e.call(this,t,c.CodeActionRequest.type)||this}return r(t,e),t.prototype.fillClientCapabilities=function(e){var t=I(I(e,"textDocument"),"codeAction");t.dynamicRegistration=!0,t.codeActionLiteralSupport={codeActionKind:{valueSet:["",c.CodeActionKind.QuickFix,c.CodeActionKind.Refactor,c.CodeActionKind.RefactorExtract,c.CodeActionKind.RefactorInline,c.CodeActionKind.RefactorRewrite,c.CodeActionKind.Source,c.CodeActionKind.SourceOrganizeImports]}}},t.prototype.initialize=function(e,t){e.codeActionProvider&&t&&this.register(this.messages,{id:g.generateUuid(),registerOptions:Object.assign({},{documentSelector:t})})},t.prototype.registerLanguageProvider=function(e){var t=this._client,n=function(e,n,i,o){var r={textDocument:t.code2ProtocolConverter.asTextDocumentIdentifier(e),range:t.code2ProtocolConverter.asRange(n),context:t.code2ProtocolConverter.asCodeActionContext(i)};return t.sendRequest(c.CodeActionRequest.type,r,o).then((function(e){var n,i;if(null!==e){var o=[];try{for(var r=u(e),s=r.next();!s.done;s=r.next()){var a=s.value;c.Command.is(a)?o.push(t.protocol2CodeConverter.asCommand(a)):o.push(t.protocol2CodeConverter.asCodeAction(a))}}catch(e){n={error:e}}finally{try{s&&!s.done&&(i=r.return)&&i.call(r)}finally{if(n)throw n.error}}return o}}),(function(e){return t.logFailedRequest(c.CodeActionRequest.type,e),Promise.resolve([])}))},i=t.clientOptions.middleware;return l.languages.registerCodeActionsProvider(e.documentSelector,{provideCodeActions:function(e,t,o,r){return i.provideCodeActions?i.provideCodeActions(e,t,o,r,n):n(e,t,o,r)}})},t}(O),Z=function(e){function t(t){return e.call(this,t,c.CodeLensRequest.type)||this}return r(t,e),t.prototype.fillClientCapabilities=function(e){I(I(e,"textDocument"),"codeLens").dynamicRegistration=!0},t.prototype.initialize=function(e,t){e.codeLensProvider&&t&&this.register(this.messages,{id:g.generateUuid(),registerOptions:Object.assign({},{documentSelector:t},e.codeLensProvider)})},t.prototype.registerLanguageProvider=function(e){var t=this._client,n=function(e,n){return t.sendRequest(c.CodeLensRequest.type,t.code2ProtocolConverter.asCodeLensParams(e),n).then(t.protocol2CodeConverter.asCodeLenses,(function(e){return t.logFailedRequest(c.CodeLensRequest.type,e),Promise.resolve([])}))},i=function(e,n){return t.sendRequest(c.CodeLensResolveRequest.type,t.code2ProtocolConverter.asCodeLens(e),n).then(t.protocol2CodeConverter.asCodeLens,(function(n){return t.logFailedRequest(c.CodeLensResolveRequest.type,n),e}))},o=t.clientOptions.middleware;return l.languages.registerCodeLensProvider(e.documentSelector,{provideCodeLenses:function(e,t){return o.provideCodeLenses?o.provideCodeLenses(e,t,n):n(e,t)},resolveCodeLens:e.resolveProvider?function(e,t){return o.resolveCodeLens?o.resolveCodeLens(e,t,i):i(e,t)}:void 0})},t}(O),G=function(e){function t(t){return e.call(this,t,c.DocumentFormattingRequest.type)||this}return r(t,e),t.prototype.fillClientCapabilities=function(e){I(I(e,"textDocument"),"formatting").dynamicRegistration=!0},t.prototype.initialize=function(e,t){e.documentFormattingProvider&&t&&this.register(this.messages,{id:g.generateUuid(),registerOptions:Object.assign({},{documentSelector:t})})},t.prototype.registerLanguageProvider=function(e){var t=this._client,n=function(e,n,i){var o={textDocument:t.code2ProtocolConverter.asTextDocumentIdentifier(e),options:t.code2ProtocolConverter.asFormattingOptions(n)};return t.sendRequest(c.DocumentFormattingRequest.type,o,i).then(t.protocol2CodeConverter.asTextEdits,(function(e){return t.logFailedRequest(c.DocumentFormattingRequest.type,e),Promise.resolve([])}))},i=t.clientOptions.middleware;return l.languages.registerDocumentFormattingEditProvider(e.documentSelector,{provideDocumentFormattingEdits:function(e,t,o){return i.provideDocumentFormattingEdits?i.provideDocumentFormattingEdits(e,t,o,n):n(e,t,o)}})},t}(O),Q=function(e){function t(t){return e.call(this,t,c.DocumentRangeFormattingRequest.type)||this}return r(t,e),t.prototype.fillClientCapabilities=function(e){I(I(e,"textDocument"),"rangeFormatting").dynamicRegistration=!0},t.prototype.initialize=function(e,t){e.documentRangeFormattingProvider&&t&&this.register(this.messages,{id:g.generateUuid(),registerOptions:Object.assign({},{documentSelector:t})})},t.prototype.registerLanguageProvider=function(e){var t=this._client,n=function(e,n,i,o){var r={textDocument:t.code2ProtocolConverter.asTextDocumentIdentifier(e),range:t.code2ProtocolConverter.asRange(n),options:t.code2ProtocolConverter.asFormattingOptions(i)};return t.sendRequest(c.DocumentRangeFormattingRequest.type,r,o).then(t.protocol2CodeConverter.asTextEdits,(function(e){return t.logFailedRequest(c.DocumentRangeFormattingRequest.type,e),Promise.resolve([])}))},i=t.clientOptions.middleware;return l.languages.registerDocumentRangeFormattingEditProvider(e.documentSelector,{provideDocumentRangeFormattingEdits:function(e,t,o,r){return i.provideDocumentRangeFormattingEdits?i.provideDocumentRangeFormattingEdits(e,t,o,r,n):n(e,t,o,r)}})},t}(O),q=function(e){function t(t){return e.call(this,t,c.DocumentOnTypeFormattingRequest.type)||this}return r(t,e),t.prototype.fillClientCapabilities=function(e){I(I(e,"textDocument"),"onTypeFormatting").dynamicRegistration=!0},t.prototype.initialize=function(e,t){e.documentOnTypeFormattingProvider&&t&&this.register(this.messages,{id:g.generateUuid(),registerOptions:Object.assign({},{documentSelector:t},e.documentOnTypeFormattingProvider)})},t.prototype.registerLanguageProvider=function(e){var t=this._client,n=e.moreTriggerCharacter||[],i=function(e,n,i,o,r){var s={textDocument:t.code2ProtocolConverter.asTextDocumentIdentifier(e),position:t.code2ProtocolConverter.asPosition(n),ch:i,options:t.code2ProtocolConverter.asFormattingOptions(o)};return t.sendRequest(c.DocumentOnTypeFormattingRequest.type,s,r).then(t.protocol2CodeConverter.asTextEdits,(function(e){return t.logFailedRequest(c.DocumentOnTypeFormattingRequest.type,e),Promise.resolve([])}))},o=t.clientOptions.middleware;return l.languages.registerOnTypeFormattingEditProvider.apply(l.languages,a([e.documentSelector,{provideOnTypeFormattingEdits:function(e,t,n,r,s){return o.provideOnTypeFormattingEdits?o.provideOnTypeFormattingEdits(e,t,n,r,s,i):i(e,t,n,r,s)}},e.firstTriggerCharacter],n))},t}(O),K=function(e){function t(t){return e.call(this,t,c.RenameRequest.type)||this}return r(t,e),t.prototype.fillClientCapabilities=function(e){I(I(e,"textDocument"),"rename").dynamicRegistration=!0},t.prototype.initialize=function(e,t){e.renameProvider&&t&&this.register(this.messages,{id:g.generateUuid(),registerOptions:Object.assign({},{documentSelector:t})})},t.prototype.registerLanguageProvider=function(e){var t=this._client,n=function(e,n,i,o){var r={textDocument:t.code2ProtocolConverter.asTextDocumentIdentifier(e),position:t.code2ProtocolConverter.asPosition(n),newName:i};return t.sendRequest(c.RenameRequest.type,r,o).then(t.protocol2CodeConverter.asWorkspaceEdit,(function(e){return t.logFailedRequest(c.RenameRequest.type,e),Promise.reject(new Error(e.message))}))},i=t.clientOptions.middleware;return l.languages.registerRenameProvider(e.documentSelector,{provideRenameEdits:function(e,t,o,r){return i.provideRenameEdits?i.provideRenameEdits(e,t,o,r,n):n(e,t,o,r)}})},t}(O),J=function(e){function t(t){return e.call(this,t,c.DocumentLinkRequest.type)||this}return r(t,e),t.prototype.fillClientCapabilities=function(e){I(I(e,"textDocument"),"documentLink").dynamicRegistration=!0},t.prototype.initialize=function(e,t){e.documentLinkProvider&&t&&this.register(this.messages,{id:g.generateUuid(),registerOptions:Object.assign({},{documentSelector:t},e.documentLinkProvider)})},t.prototype.registerLanguageProvider=function(e){var t=this._client,n=function(e,n){return t.sendRequest(c.DocumentLinkRequest.type,t.code2ProtocolConverter.asDocumentLinkParams(e),n).then(t.protocol2CodeConverter.asDocumentLinks,(function(e){t.logFailedRequest(c.DocumentLinkRequest.type,e),Promise.resolve(new Error(e.message))}))},i=function(e,n){return t.sendRequest(c.DocumentLinkResolveRequest.type,t.code2ProtocolConverter.asDocumentLink(e),n).then(t.protocol2CodeConverter.asDocumentLink,(function(e){t.logFailedRequest(c.DocumentLinkResolveRequest.type,e),Promise.resolve(new Error(e.message))}))},o=t.clientOptions.middleware;return l.languages.registerDocumentLinkProvider(e.documentSelector,{provideDocumentLinks:function(e,t){return o.provideDocumentLinks?o.provideDocumentLinks(e,t,n):n(e,t)},resolveDocumentLink:e.resolveProvider?function(e,t){return o.resolveDocumentLink?o.resolveDocumentLink(e,t,i):i(e,t)}:void 0})},t}(O),X=function(){function e(e){this._client=e,this._listeners=new Map}return Object.defineProperty(e.prototype,"messages",{get:function(){return c.DidChangeConfigurationNotification.type},enumerable:!0,configurable:!0}),e.prototype.fillClientCapabilities=function(e){I(I(e,"workspace"),"didChangeConfiguration").dynamicRegistration=!0},e.prototype.initialize=function(){var e=this._client.clientOptions.synchronize.configurationSection;void 0!==e&&this.register(this.messages,{id:g.generateUuid(),registerOptions:{section:e}})},e.prototype.register=function(e,t){var n=this,i=l.workspace.onDidChangeConfiguration((function(e){n.onDidChangeConfiguration(t.registerOptions.section,e)}));this._listeners.set(t.id,i),void 0!==t.registerOptions.section&&this.onDidChangeConfiguration(t.registerOptions.section,void 0)},e.prototype.unregister=function(e){var t=this._listeners.get(e);t&&(this._listeners.delete(e),t.dispose())},e.prototype.dispose=function(){var e,t;try{for(var n=u(this._listeners.values()),i=n.next();!i.done;i=n.next())i.value.dispose()}catch(t){e={error:t}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}}this._listeners.clear()},e.prototype.onDidChangeConfiguration=function(e,t){var n,i=this;if(void 0===(n=f.string(e)?[e]:e)||void 0===t||n.some((function(e){return t.affectsConfiguration(e)}))){var o=function(e){void 0!==e?i._client.sendNotification(c.DidChangeConfigurationNotification.type,{settings:i.extractSettingsInformation(e)}):i._client.sendNotification(c.DidChangeConfigurationNotification.type,{settings:null})},r=this.getMiddleware();r?r(n,o):o(n)}},e.prototype.extractSettingsInformation=function(e){function t(e,t){for(var n=e,i=0;i=0?l.workspace.getConfiguration(s.substr(0,a),n).get(s.substr(a+1)):l.workspace.getConfiguration(s,n)){var u=e[o].split(".");t(i,u)[u[u.length-1]]=r}}return i},e.prototype.getMiddleware=function(){var e=this._client.clientOptions.middleware;return e.workspace&&e.workspace.didChangeConfiguration?e.workspace.didChangeConfiguration:void 0},e}(),$=function(){function e(e){this._client=e,this._commands=new Map}return Object.defineProperty(e.prototype,"messages",{get:function(){return c.ExecuteCommandRequest.type},enumerable:!0,configurable:!0}),e.prototype.fillClientCapabilities=function(e){I(I(e,"workspace"),"executeCommand").dynamicRegistration=!0},e.prototype.initialize=function(e){e.executeCommandProvider&&this.register(this.messages,{id:g.generateUuid(),registerOptions:Object.assign({},e.executeCommandProvider)})},e.prototype.register=function(e,t){var n,i,o=this._client;if(t.registerOptions.commands){var r=[],s=function(e){r.push(l.commands.registerCommand(e,(function(){for(var t=[],n=0;n=0){var h=o.get(c.textDocument.uri);if(h&&h.version!==c.textDocument.version){r=!0;break}}}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}return r?Promise.resolve({applied:!1}):l.workspace.applyEdit(this._p2c.asWorkspaceEdit(e.edit)).then((function(e){return{applied:e}}))},e.prototype.logFailedRequest=function(e,t){t instanceof c.ResponseError&&t.code===c.ErrorCodes.RequestCancelled||this.error("Request "+e.method+" failed.",t)},e}();t.BaseLanguageClient=ee},3450:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(9120),o=n(7850),r=n(8330),s=n(9653),a=n(237),u=n(1269);t.createConverter=function(e){var t=e||function(e){return e.toString()};function n(e){return t(e)}function l(e){return{uri:t(e.uri)}}function c(e){return{uri:t(e.uri),version:e.version}}function h(e){switch(e){case i.TextDocumentSaveReason.Manual:return o.TextDocumentSaveReason.Manual;case i.TextDocumentSaveReason.AfterDelay:return o.TextDocumentSaveReason.AfterDelay;case i.TextDocumentSaveReason.FocusOut:return o.TextDocumentSaveReason.FocusOut}return o.TextDocumentSaveReason.Manual}function d(e){switch(e){case i.CompletionTriggerKind.TriggerCharacter:return o.CompletionTriggerKind.TriggerCharacter;case i.CompletionTriggerKind.TriggerForIncompleteCompletions:return o.CompletionTriggerKind.TriggerForIncompleteCompletions;default:return o.CompletionTriggerKind.Invoked}}function f(e){return{line:e.line,character:e.character}}function p(e){if(void 0!==e)return null===e?null:{line:e.line,character:e.character}}function g(e){return null==e?e:{start:p(e.start),end:p(e.end)}}function m(e){switch(e){case i.DiagnosticSeverity.Error:return o.DiagnosticSeverity.Error;case i.DiagnosticSeverity.Warning:return o.DiagnosticSeverity.Warning;case i.DiagnosticSeverity.Information:return o.DiagnosticSeverity.Information;case i.DiagnosticSeverity.Hint:return o.DiagnosticSeverity.Hint}}function v(e){var t=o.Diagnostic.create(g(e.range),e.message);return r.number(e.severity)&&(t.severity=m(e.severity)),(r.number(e.code)||r.string(e.code))&&(t.code=e.code),e.source&&(t.source=e.source),t}function y(e){return null==e?e:e.map(v)}function b(e){return{range:g(e.range),newText:e.newText}}function _(e){var t=o.Command.create(e.title,e.command);return e.arguments&&(t.arguments=e.arguments),t}return{asUri:n,asTextDocumentIdentifier:l,asOpenTextDocumentParams:function(e){return{textDocument:{uri:t(e.uri),languageId:e.languageId,version:e.version,text:e.getText()}}},asChangeTextDocumentParams:function(e){var n;if((n=e).uri&&n.version)return{textDocument:{uri:t(e.uri),version:e.version},contentChanges:[{text:e.getText()}]};if(function(e){var t=e;return!!t.document&&!!t.contentChanges}(e)){var i=e.document;return{textDocument:{uri:t(i.uri),version:i.version},contentChanges:e.contentChanges.map((function(e){var t=e.range;return{range:{start:{line:t.start.line,character:t.start.character},end:{line:t.end.line,character:t.end.character}},rangeLength:e.rangeLength,text:e.text}}))}}throw Error("Unsupported text document change parameter")},asCloseTextDocumentParams:function(e){return{textDocument:l(e)}},asSaveTextDocumentParams:function(e,t){void 0===t&&(t=!1);var n={textDocument:c(e)};return t&&(n.text=e.getText()),n},asWillSaveTextDocumentParams:function(e){return{textDocument:l(e.document),reason:h(e.reason)}},asTextDocumentPositionParams:function(e,t){return{textDocument:l(e),position:f(t)}},asCompletionParams:function(e,t,n){return{textDocument:l(e),position:f(t),context:{triggerKind:d(n.triggerKind),triggerCharacter:n.triggerCharacter}}},asWorkerPosition:f,asRange:g,asPosition:p,asDiagnosticSeverity:m,asDiagnostic:v,asDiagnostics:y,asCompletionItem:function(e){var t,n,a,u,l,c,h,d,f={label:e.label},p=e instanceof s.default?e:void 0;return e.detail&&(f.detail=e.detail),e.documentation&&(p&&"$string"!==p.documentationFormat?f.documentation=function(e,t){switch(e){case"$string":return t;case o.MarkupKind.PlainText:return{kind:e,value:t};case o.MarkupKind.Markdown:return{kind:e,value:t.value};default:return"Unsupported Markup content received. Kind is: "+e}}(p.documentationFormat,e.documentation):f.documentation=e.documentation),e.filterText&&(f.filterText=e.filterText),u=f,l=e,h=o.InsertTextFormat.PlainText,d=void 0,l.textEdit?(c=l.textEdit.newText,d=g(l.textEdit.range)):l.insertText instanceof i.SnippetString?(h=o.InsertTextFormat.Snippet,c=l.insertText.value):c=l.insertText,l.range&&(d=g(l.range)),u.insertTextFormat=h,l.fromEdit&&c&&d?u.textEdit={newText:c,range:d}:u.insertText=c,r.number(e.kind)&&(f.kind=(t=e.kind,void 0!==(n=p&&p.originalItemKind)?n:t+1)),e.sortText&&(f.sortText=e.sortText),e.additionalTextEdits&&(f.additionalTextEdits=null==(a=e.additionalTextEdits)?a:a.map(b)),e.commitCharacters&&(f.commitCharacters=e.commitCharacters.slice()),e.command&&(f.command=_(e.command)),!0!==e.preselect&&!1!==e.preselect||(f.preselect=e.preselect),p&&(void 0!==p.data&&(f.data=p.data),!0!==p.deprecated&&!1!==p.deprecated||(f.deprecated=p.deprecated)),f},asTextEdit:b,asReferenceParams:function(e,t,n){return{textDocument:l(e),position:f(t),context:{includeDeclaration:n.includeDeclaration}}},asCodeActionContext:function(e){return null==e?e:o.CodeActionContext.create(y(e.diagnostics),r.string(e.only)?[e.only]:void 0)},asCommand:_,asCodeLens:function(e){var t=o.CodeLens.create(g(e.range));return e.command&&(t.command=_(e.command)),e instanceof a.default&&e.data&&(t.data=e.data),t},asFormattingOptions:function(e){return{tabSize:e.tabSize,insertSpaces:e.insertSpaces}},asDocumentSymbolParams:function(e){return{textDocument:l(e)}},asCodeLensParams:function(e){return{textDocument:l(e)}},asDocumentLink:function(e){var t=o.DocumentLink.create(g(e.range));e.target&&(t.target=n(e.target));var i=e instanceof u.default?e:void 0;return i&&i.data&&(t.data=i.data),t},asDocumentLinkParams:function(e){return{textDocument:l(e)}}}}},4868:function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var r=n(6297),s=n(8330),a=n(9120),u=n(7850);function l(e,t){return void 0===e[t]&&(e[t]={}),e[t]}var c=function(e){function t(t){return e.call(this,t,u.DocumentColorRequest.type)||this}return o(t,e),t.prototype.fillClientCapabilities=function(e){l(l(e,"textDocument"),"colorProvider").dynamicRegistration=!0},t.prototype.initialize=function(e,t){if(e.colorProvider){var n=e.colorProvider,i=s.string(n.id)&&n.id.length>0?n.id:r.generateUuid(),o=n.documentSelector||t;o&&this.register(this.messages,{id:i,registerOptions:Object.assign({},{documentSelector:o})})}},t.prototype.registerLanguageProvider=function(e){var t=this,n=this._client,i=function(e,i,o){var r={color:e,textDocument:n.code2ProtocolConverter.asTextDocumentIdentifier(i.document),range:n.code2ProtocolConverter.asRange(i.range)};return n.sendRequest(u.ColorPresentationRequest.type,r,o).then(t.asColorPresentations.bind(t),(function(e){return n.logFailedRequest(u.ColorPresentationRequest.type,e),Promise.resolve(null)}))},o=function(e,i){var o={textDocument:n.code2ProtocolConverter.asTextDocumentIdentifier(e)};return n.sendRequest(u.DocumentColorRequest.type,o,i).then(t.asColorInformations.bind(t),(function(e){return n.logFailedRequest(u.ColorPresentationRequest.type,e),Promise.resolve(null)}))},r=n.clientOptions.middleware;return a.languages.registerColorProvider(e.documentSelector,{provideColorPresentations:function(e,t,n){return r.provideColorPresentations?r.provideColorPresentations(e,t,n,i):i(e,t,n)},provideDocumentColors:function(e,t){return r.provideDocumentColors?r.provideDocumentColors(e,t,o):o(e,t)}})},t.prototype.asColor=function(e){return new a.Color(e.red,e.green,e.blue,e.alpha)},t.prototype.asColorInformations=function(e){var t=this;return Array.isArray(e)?e.map((function(e){return new a.ColorInformation(t._client.protocol2CodeConverter.asRange(e.range),t.asColor(e.color))})):[]},t.prototype.asColorPresentations=function(e){var t=this;return Array.isArray(e)?e.map((function(e){var n=new a.ColorPresentation(e.label);return n.additionalTextEdits=t._client.protocol2CodeConverter.asTextEdits(e.additionalTextEdits),n.textEdit=t._client.protocol2CodeConverter.asTextEdit(e.textEdit),n})):[]},t}(n(2947).TextDocumentFeature);t.ColorProviderFeature=c},222:function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var r=n(6297),s=n(8330),a=n(9120),u=n(7850);function l(e,t){return void 0===e[t]&&(e[t]={}),e[t]}var c=function(e){function t(t){return e.call(this,t,u.FoldingRangeRequest.type)||this}return o(t,e),t.prototype.fillClientCapabilities=function(e){var t=l(l(e,"textDocument"),"foldingRange");t.dynamicRegistration=!0,t.rangeLimit=5e3,t.lineFoldingOnly=!0},t.prototype.initialize=function(e,t){if(e.foldingRangeProvider){var n=e.foldingRangeProvider,i=s.string(n.id)&&n.id.length>0?n.id:r.generateUuid(),o=n.documentSelector||t;o&&this.register(this.messages,{id:i,registerOptions:Object.assign({},{documentSelector:o})})}},t.prototype.registerLanguageProvider=function(e){var t=this,n=this._client,i=function(e,i,o){var r={textDocument:n.code2ProtocolConverter.asTextDocumentIdentifier(e)};return n.sendRequest(u.FoldingRangeRequest.type,r,o).then(t.asFoldingRanges.bind(t),(function(e){return n.logFailedRequest(u.FoldingRangeRequest.type,e),Promise.resolve(null)}))},o=n.clientOptions.middleware;return a.languages.registerFoldingRangeProvider(e.documentSelector,{provideFoldingRanges:function(e,t,n){return o.provideFoldingRanges?o.provideFoldingRanges(e,t,n,i):i(e,0,n)}})},t.prototype.asFoldingRangeKind=function(e){if(e)switch(e){case u.FoldingRangeKind.Comment:return a.FoldingRangeKind.Comment;case u.FoldingRangeKind.Imports:return a.FoldingRangeKind.Imports;case u.FoldingRangeKind.Region:return a.FoldingRangeKind.Region}},t.prototype.asFoldingRanges=function(e){var t=this;return Array.isArray(e)?e.map((function(e){return new a.FoldingRange(e.startLine,e.endLine,t.asFoldingRangeKind(e.kind))})):[]},t}(n(2947).TextDocumentFeature);t.FoldingRangeFeature=c},2117:function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var r=n(6297),s=n(8330),a=n(9120),u=n(7850);function l(e,t){return void 0===e[t]&&(e[t]={}),e[t]}var c=function(e){function t(t){return e.call(this,t,u.ImplementationRequest.type)||this}return o(t,e),t.prototype.fillClientCapabilities=function(e){l(l(e,"textDocument"),"implementation").dynamicRegistration=!0},t.prototype.initialize=function(e,t){if(e.implementationProvider)if(!0===e.implementationProvider){if(!t)return;this.register(this.messages,{id:r.generateUuid(),registerOptions:Object.assign({},{documentSelector:t})})}else{var n=e.implementationProvider,i=s.string(n.id)&&n.id.length>0?n.id:r.generateUuid(),o=n.documentSelector||t;o&&this.register(this.messages,{id:i,registerOptions:Object.assign({},{documentSelector:o})})}},t.prototype.registerLanguageProvider=function(e){var t=this._client,n=function(e,n,i){return t.sendRequest(u.ImplementationRequest.type,t.code2ProtocolConverter.asTextDocumentPositionParams(e,n),i).then(t.protocol2CodeConverter.asDefinitionResult,(function(e){return t.logFailedRequest(u.ImplementationRequest.type,e),Promise.resolve(null)}))},i=t.clientOptions.middleware;return a.languages.registerImplementationProvider(e.documentSelector,{provideImplementation:function(e,t,o){return i.provideImplementation?i.provideImplementation(e,t,o,n):n(e,t,o)}})},t}(n(2947).TextDocumentFeature);t.ImplementationFeature=c},237:function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){function t(t){return e.call(this,t)||this}return o(t,e),t}(n(9120).CodeLens);t.default=r},9653:function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){function t(t){return e.call(this,t)||this}return o(t,e),t}(n(9120).CompletionItem);t.default=r},9950:function(e,t,n){"use strict";var i=this&&this.__values||function(e){var t="function"==typeof Symbol&&e[Symbol.iterator],n=0;return t?t.call(e):{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}},o=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var i,o,r=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(i=r.next()).done;)s.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return s};Object.defineProperty(t,"__esModule",{value:!0});var r,s=n(9120),a=n(7850),u=n(8330),l=n(9653),c=n(237),h=n(1269);!function(e){e.is=function(e){var t=e;return t&&u.string(t.language)&&u.string(t.value)}}(r||(r={})),t.createConverter=function(e){var t=e||function(e){return s.Uri.parse(e)};function n(e){return t(e)}function d(e){return e.map(f)}function f(e){var t=new s.Diagnostic(m(e.range),e.message,v(e.severity));return(u.number(e.code)||u.string(e.code))&&(t.code=e.code),e.source&&(t.source=e.source),e.relatedInformation&&(t.relatedInformation=e.relatedInformation.map(p)),t}function p(e){return new s.DiagnosticRelatedInformation(I(e.location),e.message)}function g(e){if(e)return new s.Position(e.line,e.character)}function m(e){if(e)return new s.Range(g(e.start),g(e.end))}function v(e){if(null==e)return s.DiagnosticSeverity.Error;switch(e){case a.DiagnosticSeverity.Error:return s.DiagnosticSeverity.Error;case a.DiagnosticSeverity.Warning:return s.DiagnosticSeverity.Warning;case a.DiagnosticSeverity.Information:return s.DiagnosticSeverity.Information;case a.DiagnosticSeverity.Hint:return s.DiagnosticSeverity.Hint}return s.DiagnosticSeverity.Error}function y(e){if(u.string(e))return e;switch(e.kind){case a.MarkupKind.Markdown:return new s.MarkdownString(e.value);case a.MarkupKind.PlainText:return e.value;default:return"Unsupported Markup content received. Kind is: "+e.kind}}function b(e){var t=new l.default(e.label);e.detail&&(t.detail=e.detail),e.documentation&&(t.documentation=y(e.documentation),t.documentationFormat=u.string(e.documentation)?"$string":e.documentation.kind),e.filterText&&(t.filterText=e.filterText);var n,i=function(e){return e.textEdit?e.insertTextFormat===a.InsertTextFormat.Snippet?{text:new s.SnippetString(e.textEdit.newText),range:m(e.textEdit.range),fromEdit:!0}:{text:e.textEdit.newText,range:m(e.textEdit.range),fromEdit:!0}:e.insertText?e.insertTextFormat===a.InsertTextFormat.Snippet?{text:new s.SnippetString(e.insertText),fromEdit:!1}:{text:e.insertText,fromEdit:!1}:void 0}(e);if(i&&(t.insertText=i.text,t.range=i.range,t.fromEdit=i.fromEdit),u.number(e.kind)){var r=o((n=e.kind,a.CompletionItemKind.Text<=n&&n<=a.CompletionItemKind.TypeParameter?[n-1,void 0]:[s.CompletionItemKind.Text,n]),2),c=r[0],h=r[1];t.kind=c,h&&(t.originalItemKind=h)}return e.sortText&&(t.sortText=e.sortText),e.additionalTextEdits&&(t.additionalTextEdits=w(e.additionalTextEdits)),u.stringArray(e.commitCharacters)&&(t.commitCharacters=e.commitCharacters.slice()),e.command&&(t.command=E(e.command)),!0!==e.deprecated&&!1!==e.deprecated||(t.deprecated=e.deprecated),!0!==e.preselect&&!1!==e.preselect||(t.preselect=e.preselect),void 0!==e.data&&(t.data=e.data),t}function _(e){if(e)return new s.TextEdit(m(e.range),e.newText)}function w(e){if(e)return e.map(_)}function M(e){return e.map(C)}function C(e){var t=new s.SignatureInformation(e.label);return e.documentation&&(t.documentation=y(e.documentation)),e.parameters&&(t.parameters=S(e.parameters)),t}function S(e){return e.map(L)}function L(e){var t=new s.ParameterInformation(e.label);return e.documentation&&(t.documentation=y(e.documentation)),t}function I(e){if(e)return new s.Location(t(e.uri),m(e.range))}function N(e){var t=new s.DocumentHighlight(m(e.range));return u.number(e.kind)&&(t.kind=x(e.kind)),t}function x(e){switch(e){case a.DocumentHighlightKind.Text:return s.DocumentHighlightKind.Text;case a.DocumentHighlightKind.Read:return s.DocumentHighlightKind.Read;case a.DocumentHighlightKind.Write:return s.DocumentHighlightKind.Write}return s.DocumentHighlightKind.Text}function D(e){return e<=a.SymbolKind.TypeParameter?e-1:s.SymbolKind.Property}function k(e,n){var i=new s.SymbolInformation(e.name,D(e.kind),m(e.location.range),e.location.uri?t(e.location.uri):n);return e.containerName&&(i.containerName=e.containerName),i}function T(e){var t,n,o=new s.DocumentSymbol(e.name,void 0!==e.detail?e.detail:e.name,D(e.kind),m(e.range),m(e.selectionRange));if(void 0!==e.children&&e.children.length>0){var r=[];try{for(var a=i(e.children),u=a.next();!u.done;u=a.next()){var l=u.value;r.push(T(l))}}catch(e){t={error:e}}finally{try{u&&!u.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}o.children=r}return o}function E(e){var t={title:e.title,command:e.command};return e.arguments&&(t.arguments=e.arguments),t}var A=new Map;function j(e){if(e){var t=new c.default(m(e.range));return e.command&&(t.command=E(e.command)),void 0!==e.data&&null!==e.data&&(t.data=e.data),t}}function O(e){if(e){var n=new s.WorkspaceEdit;return e.documentChanges?e.documentChanges.forEach((function(e){n.set(t(e.textDocument.uri),w(e.edits))})):e.changes&&Object.keys(e.changes).forEach((function(i){n.set(t(i),w(e.changes[i]))})),n}}function R(e){var t=m(e.range),i=e.target?n(e.target):void 0,o=new h.default(t,i);return void 0!==e.data&&null!==e.data&&(o.data=e.data),o}function P(e){return new s.Color(e.red,e.green,e.blue,e.alpha)}function z(e){return new s.ColorInformation(m(e.range),P(e.color))}function W(e){var t=new s.ColorPresentation(e.label);return t.additionalTextEdits=w(e.additionalTextEdits),e.textEdit&&(t.textEdit=_(e.textEdit)),t}function F(e){if(e)switch(e){case a.FoldingRangeKind.Comment:return s.FoldingRangeKind.Comment;case a.FoldingRangeKind.Imports:return s.FoldingRangeKind.Imports;case a.FoldingRangeKind.Region:return s.FoldingRangeKind.Region}}function B(e){return new s.FoldingRange(e.startLine,e.endLine,F(e.kind))}return A.set("",s.CodeActionKind.Empty),A.set(a.CodeActionKind.QuickFix,s.CodeActionKind.QuickFix),A.set(a.CodeActionKind.Refactor,s.CodeActionKind.Refactor),A.set(a.CodeActionKind.RefactorExtract,s.CodeActionKind.RefactorExtract),A.set(a.CodeActionKind.RefactorInline,s.CodeActionKind.RefactorInline),A.set(a.CodeActionKind.RefactorRewrite,s.CodeActionKind.RefactorRewrite),A.set(a.CodeActionKind.Source,s.CodeActionKind.Source),A.set(a.CodeActionKind.SourceOrganizeImports,s.CodeActionKind.SourceOrganizeImports),{asUri:n,asDiagnostics:d,asDiagnostic:f,asRange:m,asPosition:g,asDiagnosticSeverity:v,asHover:function(e){if(e)return new s.Hover(function(e){var t,n;if(u.string(e))return new s.MarkdownString(e);if(r.is(e))return(o=new s.MarkdownString).appendCodeblock(e.value,e.language);if(Array.isArray(e)){var o=[];try{for(var l=i(e),c=l.next();!c.done;c=l.next()){var h=c.value,d=new s.MarkdownString;r.is(h)?d.appendCodeblock(h.value,h.language):d.appendMarkdown(h),o.push(d)}}catch(e){t={error:e}}finally{try{c&&!c.done&&(n=l.return)&&n.call(l)}finally{if(t)throw t.error}}return o}switch(o=void 0,e.kind){case a.MarkupKind.Markdown:return new s.MarkdownString(e.value);case a.MarkupKind.PlainText:return(o=new s.MarkdownString).appendText(e.value),o;default:return(o=new s.MarkdownString).appendText("Unsupported Markup content received. Kind is: "+e.kind),o}}(e.contents),m(e.range))},asCompletionResult:function(e){if(e){if(Array.isArray(e))return e.map(b);var t=e;return new s.CompletionList(t.items.map(b),t.isIncomplete)}},asCompletionItem:b,asTextEdit:_,asTextEdits:w,asSignatureHelp:function(e){if(e){var t=new s.SignatureHelp;return u.number(e.activeSignature)?t.activeSignature=e.activeSignature:t.activeSignature=0,u.number(e.activeParameter)?t.activeParameter=e.activeParameter:t.activeParameter=0,e.signatures&&(t.signatures=M(e.signatures)),t}},asSignatureInformations:M,asSignatureInformation:C,asParameterInformations:S,asParameterInformation:L,asDefinitionResult:function(e){if(e)return u.array(e)?e.map((function(e){return I(e)})):I(e)},asLocation:I,asReferences:function(e){if(e)return e.map((function(e){return I(e)}))},asDocumentHighlights:function(e){if(e)return e.map(N)},asDocumentHighlight:N,asDocumentHighlightKind:x,asSymbolInformations:function(e,t){if(e)return e.map((function(e){return k(e,t)}))},asSymbolInformation:k,asDocumentSymbols:function(e){if(null!=e)return e.map(T)},asDocumentSymbol:T,asCommand:E,asCommands:function(e){if(e)return e.map(E)},asCodeAction:function(e){if(null!=e){var t=new s.CodeAction(e.title);return void 0!==e.kind&&(t.kind=function(e){var t,n;if(null!=e){var o=A.get(e);if(o)return o;var r=e.split(".");o=s.CodeActionKind.Empty;try{for(var a=i(r),u=a.next();!u.done;u=a.next()){var l=u.value;o=o.append(l)}}catch(e){t={error:e}}finally{try{u&&!u.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}return o}}(e.kind)),e.diagnostics&&(t.diagnostics=d(e.diagnostics)),e.edit&&(t.edit=O(e.edit)),e.command&&(t.command=E(e.command)),t}},asCodeLens:j,asCodeLenses:function(e){if(e)return e.map((function(e){return j(e)}))},asWorkspaceEdit:O,asDocumentLink:R,asDocumentLinks:function(e){if(e)return e.map(R)},asFoldingRangeKind:F,asFoldingRange:B,asFoldingRanges:function(e){if(Array.isArray(e))return e.map(B)},asColor:P,asColorInformation:z,asColorInformations:function(e){if(Array.isArray(e))return e.map(z)},asColorPresentation:W,asColorPresentations:function(e){if(Array.isArray(e))return e.map(W)}}}},1269:function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){function t(t,n){return e.call(this,t,n)||this}return o(t,e),t}(n(9120).DocumentLink);t.default=r},1585:function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var r=n(6297),s=n(8330),a=n(9120),u=n(7850);function l(e,t){return void 0===e[t]&&(e[t]={}),e[t]}var c=function(e){function t(t){return e.call(this,t,u.TypeDefinitionRequest.type)||this}return o(t,e),t.prototype.fillClientCapabilities=function(e){l(l(e,"textDocument"),"typeDefinition").dynamicRegistration=!0},t.prototype.initialize=function(e,t){if(e.typeDefinitionProvider)if(!0===e.typeDefinitionProvider){if(!t)return;this.register(this.messages,{id:r.generateUuid(),registerOptions:Object.assign({},{documentSelector:t})})}else{var n=e.typeDefinitionProvider,i=s.string(n.id)&&n.id.length>0?n.id:r.generateUuid(),o=n.documentSelector||t;o&&this.register(this.messages,{id:i,registerOptions:Object.assign({},{documentSelector:o})})}},t.prototype.registerLanguageProvider=function(e){var t=this._client,n=function(e,n,i){return t.sendRequest(u.TypeDefinitionRequest.type,t.code2ProtocolConverter.asTextDocumentPositionParams(e,n),i).then(t.protocol2CodeConverter.asDefinitionResult,(function(e){return t.logFailedRequest(u.TypeDefinitionRequest.type,e),Promise.resolve(null)}))},i=t.clientOptions.middleware;return a.languages.registerTypeDefinitionProvider(e.documentSelector,{provideTypeDefinition:function(e,t,o){return i.provideTypeDefinition?i.provideTypeDefinition(e,t,o,n):n(e,t,o)}})},t}(n(2947).TextDocumentFeature);t.TypeDefinitionFeature=c},5200:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e){this.defaultDelay=e,this.timeout=void 0,this.completionPromise=void 0,this.onSuccess=void 0,this.task=void 0}return e.prototype.trigger=function(e,t){var n=this;return void 0===t&&(t=this.defaultDelay),this.task=e,t>=0&&this.cancelTimeout(),this.completionPromise||(this.completionPromise=new Promise((function(e){n.onSuccess=e})).then((function(){n.completionPromise=void 0,n.onSuccess=void 0;var e=n.task();return n.task=void 0,e}))),(t>=0||void 0===this.timeout)&&(this.timeout=setTimeout((function(){n.timeout=void 0,n.onSuccess(void 0)}),t>=0?t:this.defaultDelay)),this.completionPromise},e.prototype.forceDelivery=function(){if(this.completionPromise){this.cancelTimeout();var e=this.task();return this.completionPromise=void 0,this.onSuccess=void 0,this.task=void 0,e}},e.prototype.isTriggered=function(){return void 0!==this.timeout},e.prototype.cancel=function(){this.cancelTimeout(),this.completionPromise=void 0},e.prototype.cancelTimeout=function(){void 0!==this.timeout&&(clearTimeout(this.timeout),this.timeout=void 0)},e}();t.Delayer=n},8330:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=Object.prototype.toString;function i(e){return"[object String]"===n.call(e)}function o(e){return"[object Function]"===n.call(e)}function r(e){return Array.isArray(e)}t.boolean=function(e){return!0===e||!1===e},t.string=i,t.number=function(e){return"[object Number]"===n.call(e)},t.error=function(e){return"[object Error]"===n.call(e)},t.func=o,t.array=r,t.stringArray=function(e){return r(e)&&e.every((function(e){return i(e)}))},t.typedArray=function(e,t){return Array.isArray(e)&&e.every(t)},t.thenable=function(e){return e&&o(e.then)}},6297:function(e,t){"use strict";var n,i=this&&this.__extends||(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function i(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)});Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e){this._value=e}return e.prototype.asHex=function(){return this._value},e.prototype.equals=function(e){return this.asHex()===e.asHex()},e}(),r=function(e){function t(){return e.call(this,[t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),"-",t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),"-","4",t._randomHex(),t._randomHex(),t._randomHex(),"-",t._oneOf(t._timeHighBits),t._randomHex(),t._randomHex(),t._randomHex(),"-",t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex()].join(""))||this}return i(t,e),t._oneOf=function(e){return e[Math.floor(e.length*Math.random())]},t._randomHex=function(){return t._oneOf(t._chars)},t._chars=["0","1","2","3","4","5","6","6","7","8","9","a","b","c","d","e","f"],t._timeHighBits=["8","9","a","b"],t}(o);function s(){return new r}t.empty=new o("00000000-0000-0000-0000-000000000000"),t.v4=s;var a=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function u(e){return a.test(e)}t.isUUID=u,t.parse=function(e){if(!u(e))throw new Error("invalid uuid");return new o(e)},t.generateUuid=function(){return s().asHex()}},8822:function(e,t,n){"use strict";var i=this&&this.__values||function(e){var t="function"==typeof Symbol&&e[Symbol.iterator],n=0;return t?t.call(e):{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}};Object.defineProperty(t,"__esModule",{value:!0});var o=n(6297),r=n(9120),s=n(7850);function a(e,t){if(void 0!==e)return e[t]}var u=function(){function e(e){this._client=e,this._listeners=new Map}return Object.defineProperty(e.prototype,"messages",{get:function(){return s.DidChangeWorkspaceFoldersNotification.type},enumerable:!0,configurable:!0}),e.prototype.fillInitializeParams=function(e){var t=this,n=r.workspace.workspaceFolders;e.workspaceFolders=void 0===n?null:n.map((function(e){return t.asProtocol(e)}))},e.prototype.fillClientCapabilities=function(e){e.workspace=e.workspace||{},e.workspace.workspaceFolders=!0},e.prototype.initialize=function(e){var t=this,n=this._client;n.onRequest(s.WorkspaceFoldersRequest.type,(function(e){var i=function(){var e=r.workspace.workspaceFolders;return void 0===e?null:e.map((function(e){return t.asProtocol(e)}))},o=n.clientOptions.middleware.workspace;return o&&o.workspaceFolders?o.workspaceFolders(e,i):i()}));var i,u=a(a(a(e,"workspace"),"workspaceFolders"),"changeNotifications");"string"==typeof u?i=u:!0===u&&(i=o.generateUuid()),i&&this.register(this.messages,{id:i,registerOptions:void 0})},e.prototype.register=function(e,t){var n=this,i=t.id,o=this._client,a=r.workspace.onDidChangeWorkspaceFolders((function(e){var t=function(e){var t={event:{added:e.added.map((function(e){return n.asProtocol(e)})),removed:e.removed.map((function(e){return n.asProtocol(e)}))}};n._client.sendNotification(s.DidChangeWorkspaceFoldersNotification.type,t)},i=o.clientOptions.middleware.workspace;i&&i.didChangeWorkspaceFolders?i.didChangeWorkspaceFolders(e,t):t(e)}));this._listeners.set(i,a)},e.prototype.unregister=function(e){var t=this._listeners.get(e);void 0!==t&&(this._listeners.delete(e),t.dispose())},e.prototype.dispose=function(){var e,t;try{for(var n=i(this._listeners.values()),o=n.next();!o.done;o=n.next())o.value.dispose()}catch(t){e={error:t}}finally{try{o&&!o.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}}this._listeners.clear()},e.prototype.asProtocol=function(e){return void 0===e?null:{uri:this._client.code2ProtocolConverter.asUri(e.uri),name:e.name}},e}();t.WorkspaceFoldersFeature=u},1875:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(2149),o=n(5704);var r;!function(e){e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:i.Event.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:i.Event.None}),e.is=function(t){let n=t;return n&&(n===e.None||n===e.Cancelled||o.boolean(n.isCancellationRequested)&&!!n.onCancellationRequested)}}(r=t.CancellationToken||(t.CancellationToken={}));const s=Object.freeze((function(e,t){let n=setTimeout(e.bind(t),0);return{dispose(){clearTimeout(n)}}}));class a{constructor(){this._isCancelled=!1}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this._emitter=void 0))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?s:(this._emitter||(this._emitter=new i.Emitter),this._emitter.event)}}t.CancellationTokenSource=class{get token(){return this._token||(this._token=new a),this._token}cancel(){this._token?this._token.cancel():this._token=r.Cancelled}dispose(){this.cancel()}}},2149:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),(t.Disposable||(t.Disposable={})).create=function(e){return{dispose:e}},function(e){const t={dispose(){}};e.None=function(){return t}}(t.Event||(t.Event={}));class n{add(e,t=null,n){this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(e),this._contexts.push(t),Array.isArray(n)&&n.push({dispose:()=>this.remove(e,t)})}remove(e,t=null){if(this._callbacks){for(var n=!1,i=0,o=this._callbacks.length;i{let r;return this._callbacks||(this._callbacks=new n),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(e,t),r={dispose:()=>{this._callbacks.remove(e,t),r.dispose=i._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this)}},Array.isArray(o)&&o.push(r),r}),this._event}fire(e){this._callbacks&&this._callbacks.invoke.call(this._callbacks,e)}dispose(){this._callbacks&&(this._callbacks.dispose(),this._callbacks=void 0)}}i._noop=function(){},t.Emitter=i},5704:(e,t)=>{"use strict";function n(e){return"string"==typeof e||e instanceof String}function i(e){return Array.isArray(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.boolean=function(e){return!0===e||!1===e},t.string=n,t.number=function(e){return"number"==typeof e||e instanceof Number},t.error=function(e){return e instanceof Error},t.func=function(e){return"function"==typeof e},t.array=i,t.stringArray=function(e){return i(e)&&e.every((e=>n(e)))}},8003:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.None=0,e.First=1,e.Last=2}(n=t.Touch||(t.Touch={})),t.LinkedMap=class{constructor(){this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}has(e){return this._map.has(e)}get(e){const t=this._map.get(e);if(t)return t.value}set(e,t,i=n.None){let o=this._map.get(e);if(o)o.value=t,i!==n.None&&this.touch(o,i);else{switch(o={key:e,value:t,next:void 0,previous:void 0},i){case n.None:this.addItemLast(o);break;case n.First:this.addItemFirst(o);break;case n.Last:default:this.addItemLast(o)}this._map.set(e,o),this._size++}}delete(e){const t=this._map.get(e);return!!t&&(this._map.delete(e),this.removeItem(t),this._size--,!0)}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");const e=this._head;return this._map.delete(e.key),this.removeItem(e),this._size--,e.value}forEach(e,t){let n=this._head;for(;n;)t?e.bind(t)(n.value,n.key,this):e(n.value,n.key,this),n=n.next}forEachReverse(e,t){let n=this._tail;for(;n;)t?e.bind(t)(n.value,n.key,this):e(n.value,n.key,this),n=n.previous}values(){let e=[],t=this._head;for(;t;)e.push(t.value),t=t.next;return e}keys(){let e=[],t=this._head;for(;t;)e.push(t.key),t=t.next;return e}addItemFirst(e){if(this._head||this._tail){if(!this._head)throw new Error("Invalid list");e.next=this._head,this._head.previous=e}else this._tail=e;this._head=e}addItemLast(e){if(this._head||this._tail){if(!this._tail)throw new Error("Invalid list");e.previous=this._tail,this._tail.next=e}else this._head=e;this._tail=e}removeItem(e){if(e===this._head&&e===this._tail)this._head=void 0,this._tail=void 0;else if(e===this._head)this._head=e.next;else if(e===this._tail)this._tail=e.previous;else{const t=e.next,n=e.previous;if(!t||!n)throw new Error("Invalid list");t.previous=n,n.next=t}}touch(e,t){if(!this._head||!this._tail)throw new Error("Invalid list");if(t===n.First||t===n.Last)if(t===n.First){if(e===this._head)return;const t=e.next,n=e.previous;e===this._tail?(n.next=void 0,this._tail=n):(t.previous=n,n.next=t),e.previous=void 0,e.next=this._head,this._head.previous=e,this._head=e}else if(t===n.Last){if(e===this._tail)return;const t=e.next,n=e.previous;e===this._head?(t.previous=void 0,this._head=t):(t.previous=n,n.next=t),e.next=void 0,e.previous=this._tail,this._tail.next=e,this._tail=e}}}},9449:(e,t,n)=>{"use strict";var i=n(7188).setImmedate;function o(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}Object.defineProperty(t,"__esModule",{value:!0});const r=n(5704),s=n(8420);t.RequestType=s.RequestType,t.RequestType0=s.RequestType0,t.RequestType1=s.RequestType1,t.RequestType2=s.RequestType2,t.RequestType3=s.RequestType3,t.RequestType4=s.RequestType4,t.RequestType5=s.RequestType5,t.RequestType6=s.RequestType6,t.RequestType7=s.RequestType7,t.RequestType8=s.RequestType8,t.RequestType9=s.RequestType9,t.ResponseError=s.ResponseError,t.ErrorCodes=s.ErrorCodes,t.NotificationType=s.NotificationType,t.NotificationType0=s.NotificationType0,t.NotificationType1=s.NotificationType1,t.NotificationType2=s.NotificationType2,t.NotificationType3=s.NotificationType3,t.NotificationType4=s.NotificationType4,t.NotificationType5=s.NotificationType5,t.NotificationType6=s.NotificationType6,t.NotificationType7=s.NotificationType7,t.NotificationType8=s.NotificationType8,t.NotificationType9=s.NotificationType9;const a=n(9722);t.MessageReader=a.MessageReader,t.StreamMessageReader=a.StreamMessageReader,t.IPCMessageReader=a.IPCMessageReader,t.SocketMessageReader=a.SocketMessageReader;const u=n(2794);t.MessageWriter=u.MessageWriter,t.StreamMessageWriter=u.StreamMessageWriter,t.IPCMessageWriter=u.IPCMessageWriter,t.SocketMessageWriter=u.SocketMessageWriter;const l=n(2149);t.Disposable=l.Disposable,t.Event=l.Event,t.Emitter=l.Emitter;const c=n(1875);t.CancellationTokenSource=c.CancellationTokenSource,t.CancellationToken=c.CancellationToken;const h=n(8003);var d,f,p,g,m,v,y;o(n(6849)),o(n(5134)),function(e){e.type=new s.NotificationType("$/cancelRequest")}(d||(d={})),t.NullLogger=Object.freeze({error:()=>{},warn:()=>{},info:()=>{},log:()=>{}}),function(e){e[e.Off=0]="Off",e[e.Messages=1]="Messages",e[e.Verbose=2]="Verbose"}(f=t.Trace||(t.Trace={})),function(e){e.fromString=function(t){switch(t=t.toLowerCase()){case"off":default:return e.Off;case"messages":return e.Messages;case"verbose":return e.Verbose}},e.toString=function(t){switch(t){case e.Off:return"off";case e.Messages:return"messages";case e.Verbose:return"verbose";default:return"off"}}}(f=t.Trace||(t.Trace={})),function(e){e.Text="text",e.JSON="json"}(t.TraceFormat||(t.TraceFormat={})),function(e){e.fromString=function(t){return"json"===(t=t.toLowerCase())?e.JSON:e.Text}}(p=t.TraceFormat||(t.TraceFormat={})),function(e){e.type=new s.NotificationType("$/setTraceNotification")}(g=t.SetTraceNotification||(t.SetTraceNotification={})),function(e){e.type=new s.NotificationType("$/logTraceNotification")}(m=t.LogTraceNotification||(t.LogTraceNotification={})),function(e){e[e.Closed=1]="Closed",e[e.Disposed=2]="Disposed",e[e.AlreadyListening=3]="AlreadyListening"}(v=t.ConnectionErrors||(t.ConnectionErrors={}));class b extends Error{constructor(e,t){super(t),this.code=e,Object.setPrototypeOf(this,b.prototype)}}function _(e,t,n,o){let a=0,u=0,_=0;const w="2.0";let M,C,S,L,I=Object.create(null),N=Object.create(null),x=new h.LinkedMap,D=Object.create(null),k=Object.create(null),T=f.Off,E=p.Text,A=y.New,j=new l.Emitter,O=new l.Emitter,R=new l.Emitter,P=new l.Emitter;function z(e){return"req-"+e.toString()}function W(e){}function F(){return A===y.Listening}function B(){return A===y.Closed}function H(){return A===y.Disposed}function V(){A!==y.New&&A!==y.Listening||(A=y.Closed,O.fire(void 0))}function U(){S||0===x.size||(S=i((()=>{S=void 0,function(){if(0===x.size)return;let e=x.shift();try{s.isRequestMessage(e)?function(e){if(H())return;function n(n,i,o){let r={jsonrpc:w,id:e.id};n instanceof s.ResponseError?r.error=n.toJson():r.result=void 0===n?null:n,Z(r,i,o),t.write(r)}function i(n,i,o){let r={jsonrpc:w,id:e.id,error:n.toJson()};Z(r,i,o),t.write(r)}!function(e){if(T!==f.Off&&L)if(E===p.Text){let t;T===f.Verbose&&e.params&&(t=`Params: ${JSON.stringify(e.params,null,4)}\n\n`),L.log(`Received request '${e.method} - (${e.id})'.`,t)}else G("receive-request",e)}(e);let o,a,u=I[e.method];u&&(o=u.type,a=u.handler);let l=Date.now();if(a||M){let u=new c.CancellationTokenSource,h=String(e.id);k[h]=u;try{let c;c=void 0===e.params||void 0!==o&&0===o.numberOfParams?a?a(u.token):M(e.method,u.token):r.array(e.params)&&(void 0===o||o.numberOfParams>1)?a?a(...e.params,u.token):M(e.method,...e.params,u.token):a?a(e.params,u.token):M(e.method,e.params,u.token);let d=c;c?d.then?d.then((t=>{delete k[h],n(t,e.method,l)}),(t=>{delete k[h],t instanceof s.ResponseError?i(t,e.method,l):t&&r.string(t.message)?i(new s.ResponseError(s.ErrorCodes.InternalError,`Request ${e.method} failed with message: ${t.message}`),e.method,l):i(new s.ResponseError(s.ErrorCodes.InternalError,`Request ${e.method} failed unexpectedly without providing any details.`),e.method,l)})):(delete k[h],n(c,e.method,l)):(delete k[h],function(n,i,o){void 0===n&&(n=null);let r={jsonrpc:w,id:e.id,result:n};Z(r,i,o),t.write(r)}(c,e.method,l))}catch(t){delete k[h],t instanceof s.ResponseError?n(t,e.method,l):t&&r.string(t.message)?i(new s.ResponseError(s.ErrorCodes.InternalError,`Request ${e.method} failed with message: ${t.message}`),e.method,l):i(new s.ResponseError(s.ErrorCodes.InternalError,`Request ${e.method} failed unexpectedly without providing any details.`),e.method,l)}}else i(new s.ResponseError(s.ErrorCodes.MethodNotFound,`Unhandled method ${e.method}`),e.method,l)}(e):s.isNotificationMessage(e)?function(e){if(H())return;let t,i;if(e.method===d.type.method)i=e=>{let t=e.id,n=k[String(t)];n&&n.cancel()};else{let n=N[e.method];n&&(i=n.handler,t=n.type)}if(i||C)try{!function(e){if(T!==f.Off&&L&&e.method!==m.type.method)if(E===p.Text){let t;T===f.Verbose&&(t=e.params?`Params: ${JSON.stringify(e.params,null,4)}\n\n`:"No parameters provided.\n\n"),L.log(`Received notification '${e.method}'.`,t)}else G("receive-notification",e)}(e),void 0===e.params||void 0!==t&&0===t.numberOfParams?i?i():C(e.method):r.array(e.params)&&(void 0===t||t.numberOfParams>1)?i?i(...e.params):C(e.method,...e.params):i?i(e.params):C(e.method,e.params)}catch(t){t.message?n.error(`Notification handler '${e.method}' failed with message: ${t.message}`):n.error(`Notification handler '${e.method}' failed unexpectedly.`)}else R.fire(e)}(e):s.isResponseMessage(e)?function(e){if(!H())if(null===e.id)e.error?n.error(`Received response message without id: Error is: \n${JSON.stringify(e.error,void 0,4)}`):n.error("Received response message without id. No further error information provided.");else{let t=String(e.id),i=D[t];if(function(e,t){if(T!==f.Off&&L)if(E===p.Text){let n;if(T===f.Verbose&&(e.error&&e.error.data?n=`Error data: ${JSON.stringify(e.error.data,null,4)}\n\n`:e.result?n=`Result: ${JSON.stringify(e.result,null,4)}\n\n`:void 0===e.error&&(n="No result returned.\n\n")),t){let i=e.error?` Request failed: ${e.error.message} (${e.error.code}).`:"";L.log(`Received response '${t.method} - (${e.id})' in ${Date.now()-t.timerStart}ms.${i}`,n)}else L.log(`Received response ${e.id} without active response promise.`,n)}else G("receive-response",e)}(e,i),i){delete D[t];try{if(e.error){let t=e.error;i.reject(new s.ResponseError(t.code,t.message,t.data))}else{if(void 0===e.result)throw new Error("Should never happen.");i.resolve(e.result)}}catch(e){e.message?n.error(`Response handler '${i.method}' failed with message: ${e.message}`):n.error(`Response handler '${i.method}' failed unexpectedly.`)}}}}(e):function(e){if(!e)return void n.error("Received empty message.");n.error(`Received message which is neither a response nor a notification message:\n${JSON.stringify(e,null,4)}`);let t=e;if(r.string(t.id)||r.number(t.id)){let e=String(t.id),n=D[e];n&&n.reject(new Error("The received response has neither a result nor an error property."))}}(e)}finally{U()}}()})))}e.onClose(V),e.onError((function(e){j.fire([e,void 0,void 0])})),t.onClose(V),t.onError((function(e){j.fire(e)}));let Y=e=>{try{if(s.isNotificationMessage(e)&&e.method===d.type.method){let n=z(e.params.id),i=x.get(n);if(s.isRequestMessage(i)){let r=o&&o.cancelUndispatched?o.cancelUndispatched(i,W):void 0;if(r&&(void 0!==r.error||void 0!==r.result))return x.delete(n),r.id=i.id,Z(r,e.method,Date.now()),void t.write(r)}}!function(e,t){var n;s.isRequestMessage(t)?e.set(z(t.id),t):s.isResponseMessage(t)?e.set(null===(n=t.id)?"res-unknown-"+(++_).toString():"res-"+n.toString(),t):e.set("not-"+(++u).toString(),t)}(x,e)}finally{U()}};function Z(e,t,n){if(T!==f.Off&&L)if(E===p.Text){let i;T===f.Verbose&&(e.error&&e.error.data?i=`Error data: ${JSON.stringify(e.error.data,null,4)}\n\n`:e.result?i=`Result: ${JSON.stringify(e.result,null,4)}\n\n`:void 0===e.error&&(i="No result returned.\n\n")),L.log(`Sending response '${t} - (${e.id})'. Processing request took ${Date.now()-n}ms`,i)}else G("send-response",e)}function G(e,t){if(!L||T===f.Off)return;const n={isLSPMessage:!0,type:e,message:t,timestamp:Date.now()};L.log(n)}function Q(){if(B())throw new b(v.Closed,"Connection is closed.");if(H())throw new b(v.Disposed,"Connection is disposed.")}function q(e){return void 0===e?null:e}function K(e,t){let n,i=e.numberOfParams;switch(i){case 0:n=null;break;case 1:n=q(t[0]);break;default:n=[];for(let e=0;e{let i,o;if(Q(),r.string(e))switch(i=e,n.length){case 0:o=null;break;case 1:o=n[0];break;default:o=n}else i=e.method,o=K(e,n);let s={jsonrpc:w,method:i,params:o};!function(e){if(T!==f.Off&&L)if(E===p.Text){let t;T===f.Verbose&&(t=e.params?`Params: ${JSON.stringify(e.params,null,4)}\n\n`:"No parameters provided.\n\n"),L.log(`Sending notification '${e.method}'.`,t)}else G("send-notification",e)}(s),t.write(s)},onNotification:(e,t)=>{Q(),r.func(e)?C=e:t&&(r.string(e)?N[e]={type:void 0,handler:t}:N[e.method]={type:e,handler:t})},sendRequest:(e,...n)=>{let i,o,u;if(Q(),function(){if(!F())throw new Error("Call listen() first.")}(),r.string(e))switch(i=e,n.length){case 0:o=null;break;case 1:c.CancellationToken.is(n[0])?(o=null,u=n[0]):o=q(n[0]);break;default:const e=n.length-1;c.CancellationToken.is(n[e])?(u=n[e],o=2===n.length?q(n[0]):n.slice(0,e).map((e=>q(e)))):o=n.map((e=>q(e)))}else{i=e.method,o=K(e,n);let t=e.numberOfParams;u=c.CancellationToken.is(n[t])?n[t]:void 0}let l=a++,h=new Promise(((e,n)=>{let r={jsonrpc:w,id:l,method:i,params:o},a={method:i,timerStart:Date.now(),resolve:e,reject:n};!function(e){if(T!==f.Off&&L)if(E===p.Text){let t;T===f.Verbose&&e.params&&(t=`Params: ${JSON.stringify(e.params,null,4)}\n\n`),L.log(`Sending request '${e.method} - (${e.id})'.`,t)}else G("send-request",e)}(r);try{t.write(r)}catch(e){a.reject(new s.ResponseError(s.ErrorCodes.MessageWriteError,e.message?e.message:"Unknown reason")),a=null}a&&(D[String(l)]=a)}));return u&&u.onCancellationRequested((()=>{J.sendNotification(d.type,{id:l})})),h},onRequest:(e,t)=>{Q(),r.func(e)?M=e:t&&(r.string(e)?I[e]={type:void 0,handler:t}:I[e.method]={type:e,handler:t})},trace:(e,t,n)=>{let i=!1,o=p.Text;void 0!==n&&(r.boolean(n)?i=n:(i=n.sendNotification||!1,o=n.traceFormat||p.Text)),T=e,E=o,L=T===f.Off?void 0:t,!i||B()||H()||J.sendNotification(g.type,{value:f.toString(e)})},onError:j.event,onClose:O.event,onUnhandledNotification:R.event,onDispose:P.event,dispose:()=>{if(H())return;A=y.Disposed,P.fire(void 0);let n=new Error("Connection got disposed.");Object.keys(D).forEach((e=>{D[e].reject(n)})),D=Object.create(null),k=Object.create(null),x=new h.LinkedMap,r.func(t.dispose)&&t.dispose(),r.func(e.dispose)&&e.dispose()},listen:()=>{Q(),function(){if(F())throw new b(v.AlreadyListening,"Connection is already listening")}(),A=y.Listening,e.listen(Y)},inspect:()=>{console.log("inspect")}};return J.onNotification(m.type,(e=>{T!==f.Off&&L&&L.log(e.message,T===f.Verbose?e.verbose:void 0)})),J}t.ConnectionError=b,(t.ConnectionStrategy||(t.ConnectionStrategy={})).is=function(e){let t=e;return t&&r.func(t.cancelUndispatched)},function(e){e[e.New=1]="New",e[e.Listening=2]="Listening",e[e.Closed=3]="Closed",e[e.Disposed=4]="Disposed"}(y||(y={})),t.createMessageConnection=function(e,n,i,o){i||(i=t.NullLogger);let r=void 0!==(s=e).listen&&void 0===s.read?e:new a.StreamMessageReader(e);var s;let l=function(e){return void 0!==e.write&&void 0===e.end}(n)?n:new u.StreamMessageWriter(n);return _(r,l,i,o)}},9722:(e,t,n)=>{"use strict";var i=n(1278).Buffer;Object.defineProperty(t,"__esModule",{value:!0});const o=n(2149),r=n(5704);let s=8192,a=i.from("\r","ascii")[0],u=i.from("\n","ascii")[0];class l{constructor(e="utf8"){this.encoding=e,this.index=0,this.buffer=i.allocUnsafe(s)}append(e){var t=e;if("string"==typeof e){var n=e,o=i.byteLength(n,this.encoding);(t=i.allocUnsafe(o)).write(n,0,o,this.encoding)}if(this.buffer.length-this.index>=t.length)t.copy(this.buffer,this.index,0,t.length);else{var r=(Math.ceil((this.index+t.length)/s)+1)*s;0===this.index?(this.buffer=i.allocUnsafe(r),t.copy(this.buffer,0,0,t.length)):this.buffer=i.concat([this.buffer.slice(0,this.index),t],r)}this.index+=t.length}tryReadHeaders(){let e,t=0;for(;t+3=this.index)return e;e=Object.create(null),this.buffer.toString("ascii",0,t).split("\r\n").forEach((t=>{let n=t.indexOf(":");if(-1===n)throw new Error("Message header must separate key and value using :");let i=t.substr(0,n),o=t.substr(n+1).trim();e[i]=o}));let n=t+4;return this.buffer=this.buffer.slice(n),this.index=this.index-n,e}tryReadContent(e){if(this.index{this.onData(e)})),this.readable.on("error",(e=>this.fireError(e))),this.readable.on("close",(()=>this.fireClose()))}onData(e){for(this.buffer.append(e);;){if(-1===this.nextMessageLength){let e=this.buffer.tryReadHeaders();if(!e)return;let t=e["Content-Length"];if(!t)throw new Error("Header must provide a Content-Length property.");let n=parseInt(t);if(isNaN(n))throw new Error("Content-Length value must be a number.");this.nextMessageLength=n}var t=this.buffer.tryReadContent(this.nextMessageLength);if(null===t)return void this.setPartialMessageTimer();this.clearPartialMessageTimer(),this.nextMessageLength=-1,this.messageToken++;var n=JSON.parse(t);this.callback(n)}}clearPartialMessageTimer(){this.partialMessageTimer&&(clearTimeout(this.partialMessageTimer),this.partialMessageTimer=void 0)}setPartialMessageTimer(){this.clearPartialMessageTimer(),this._partialMessageTimeout<=0||(this.partialMessageTimer=setTimeout(((e,t)=>{this.partialMessageTimer=void 0,e===this.messageToken&&(this.firePartialMessage({messageToken:e,waitingTime:t}),this.setPartialMessageTimer())}),this._partialMessageTimeout,this.messageToken,this._partialMessageTimeout))}}t.StreamMessageReader=h,t.IPCMessageReader=class extends c{constructor(e){super(),this.process=e;let t=this.process;t.on("error",(e=>this.fireError(e))),t.on("close",(()=>this.fireClose()))}listen(e){this.process.on("message",e)}},t.SocketMessageReader=class extends h{constructor(e,t="utf-8"){super(e,t)}}},2794:(e,t,n)=>{"use strict";var i=n(1278).Buffer;Object.defineProperty(t,"__esModule",{value:!0});const o=n(2149),r=n(5704);let s="Content-Length: ",a="\r\n";(t.MessageWriter||(t.MessageWriter={})).is=function(e){let t=e;return t&&r.func(t.dispose)&&r.func(t.onClose)&&r.func(t.onError)&&r.func(t.write)};class u{constructor(){this.errorEmitter=new o.Emitter,this.closeEmitter=new o.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(e,t,n){this.errorEmitter.fire([this.asError(e),t,n])}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}asError(e){return e instanceof Error?e:new Error(`Writer recevied error. Reason: ${r.string(e.message)?e.message:"unknown"}`)}}t.AbstractMessageWriter=u,t.StreamMessageWriter=class extends u{constructor(e,t="utf8"){super(),this.writable=e,this.encoding=t,this.errorCount=0,this.writable.on("error",(e=>this.fireError(e))),this.writable.on("close",(()=>this.fireClose()))}write(e){let t=JSON.stringify(e),n=i.byteLength(t,this.encoding),o=[s,n.toString(),a,a];try{this.writable.write(o.join(""),"ascii"),this.writable.write(t,this.encoding),this.errorCount=0}catch(t){this.errorCount++,this.fireError(t,e,this.errorCount)}}},t.IPCMessageWriter=class extends u{constructor(e){super(),this.process=e,this.errorCount=0,this.queue=[],this.sending=!1;let t=this.process;t.on("error",(e=>this.fireError(e))),t.on("close",(()=>this.fireClose))}write(e){this.sending||0!==this.queue.length?this.queue.push(e):this.doWriteMessage(e)}doWriteMessage(e){try{this.process.send&&(this.sending=!0,this.process.send(e,void 0,void 0,(t=>{this.sending=!1,t?(this.errorCount++,this.fireError(t,e,this.errorCount)):this.errorCount=0,this.queue.length>0&&this.doWriteMessage(this.queue.shift())})))}catch(t){this.errorCount++,this.fireError(t,e,this.errorCount)}}},t.SocketMessageWriter=class extends u{constructor(e,t="utf8"){super(),this.socket=e,this.queue=[],this.sending=!1,this.encoding=t,this.errorCount=0,this.socket.on("error",(e=>this.fireError(e))),this.socket.on("close",(()=>this.fireClose()))}write(e){this.sending||0!==this.queue.length?this.queue.push(e):this.doWriteMessage(e)}doWriteMessage(e){let t=JSON.stringify(e),n=i.byteLength(t,this.encoding),o=[s,n.toString(),a,a];try{this.sending=!0,this.socket.write(o.join(""),"ascii",(n=>{n&&this.handleError(n,e);try{this.socket.write(t,this.encoding,(t=>{this.sending=!1,t?this.handleError(t,e):this.errorCount=0,this.queue.length>0&&this.doWriteMessage(this.queue.shift())}))}catch(n){this.handleError(n,e)}}))}catch(t){this.handleError(t,e)}}handleError(e,t){this.errorCount++,this.fireError(e,t,this.errorCount)}}},8420:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(5704);var o;!function(e){e.ParseError=-32700,e.InvalidRequest=-32600,e.MethodNotFound=-32601,e.InvalidParams=-32602,e.InternalError=-32603,e.serverErrorStart=-32099,e.serverErrorEnd=-32e3,e.ServerNotInitialized=-32002,e.UnknownErrorCode=-32001,e.RequestCancelled=-32800,e.MessageWriteError=1,e.MessageReadError=2}(o=t.ErrorCodes||(t.ErrorCodes={}));class r extends Error{constructor(e,t,n){super(t),this.code=i.number(e)?e:o.UnknownErrorCode,this.data=n,Object.setPrototypeOf(this,r.prototype)}toJson(){return{code:this.code,message:this.message,data:this.data}}}t.ResponseError=r;class s{constructor(e,t){this._method=e,this._numberOfParams=t}get method(){return this._method}get numberOfParams(){return this._numberOfParams}}t.AbstractMessageType=s,t.RequestType0=class extends s{constructor(e){super(e,0),this._=void 0}},t.RequestType=class extends s{constructor(e){super(e,1),this._=void 0}},t.RequestType1=class extends s{constructor(e){super(e,1),this._=void 0}},t.RequestType2=class extends s{constructor(e){super(e,2),this._=void 0}},t.RequestType3=class extends s{constructor(e){super(e,3),this._=void 0}},t.RequestType4=class extends s{constructor(e){super(e,4),this._=void 0}},t.RequestType5=class extends s{constructor(e){super(e,5),this._=void 0}},t.RequestType6=class extends s{constructor(e){super(e,6),this._=void 0}},t.RequestType7=class extends s{constructor(e){super(e,7),this._=void 0}},t.RequestType8=class extends s{constructor(e){super(e,8),this._=void 0}},t.RequestType9=class extends s{constructor(e){super(e,9),this._=void 0}},t.NotificationType=class extends s{constructor(e){super(e,1),this._=void 0}},t.NotificationType0=class extends s{constructor(e){super(e,0),this._=void 0}},t.NotificationType1=class extends s{constructor(e){super(e,1),this._=void 0}},t.NotificationType2=class extends s{constructor(e){super(e,2),this._=void 0}},t.NotificationType3=class extends s{constructor(e){super(e,3),this._=void 0}},t.NotificationType4=class extends s{constructor(e){super(e,4),this._=void 0}},t.NotificationType5=class extends s{constructor(e){super(e,5),this._=void 0}},t.NotificationType6=class extends s{constructor(e){super(e,6),this._=void 0}},t.NotificationType7=class extends s{constructor(e){super(e,7),this._=void 0}},t.NotificationType8=class extends s{constructor(e){super(e,8),this._=void 0}},t.NotificationType9=class extends s{constructor(e){super(e,9),this._=void 0}},t.isRequestMessage=function(e){let t=e;return t&&i.string(t.method)&&(i.string(t.id)||i.number(t.id))},t.isNotificationMessage=function(e){let t=e;return t&&i.string(t.method)&&void 0===e.id},t.isResponseMessage=function(e){let t=e;return t&&(void 0!==t.result||!!t.error)&&(i.string(t.id)||i.number(t.id)||null===t.id)}},6849:(e,t,n)=>{"use strict";var i=n(8957);Object.defineProperty(t,"__esModule",{value:!0});const o=n(4708),r=n(2935),s=n(5314),a=n(2922),u=n(9722),l=n(2794);t.generateRandomPipeName=function(){const e=s.randomBytes(21).toString("hex");return"win32"===i.platform?`\\\\.\\pipe\\vscode-jsonrpc-${e}-sock`:o.join(r.tmpdir(),`vscode-${e}.sock`)},t.createClientPipeTransport=function(e,t="utf-8"){let n,i=new Promise(((e,t)=>{n=e}));return new Promise(((o,r)=>{let s=a.createServer((e=>{s.close(),n([new u.SocketMessageReader(e,t),new l.SocketMessageWriter(e,t)])}));s.on("error",r),s.listen(e,(()=>{s.removeListener("error",r),o({onConnected:()=>i})}))}))},t.createServerPipeTransport=function(e,t="utf-8"){const n=a.createConnection(e);return[new u.SocketMessageReader(n,t),new l.SocketMessageWriter(n,t)]}},5134:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(2922),o=n(9722),r=n(2794);t.createClientSocketTransport=function(e,t="utf-8"){let n,s=new Promise(((e,t)=>{n=e}));return new Promise(((a,u)=>{let l=i.createServer((e=>{l.close(),n([new o.SocketMessageReader(e,t),new r.SocketMessageWriter(e,t)])}));l.on("error",u),l.listen(e,"127.0.0.1",(()=>{l.removeListener("error",u),a({onConnected:()=>s})}))}))},t.createServerSocketTransport=function(e,t="utf-8"){const n=i.createConnection(e,"127.0.0.1");return[new o.SocketMessageReader(n,t),new r.SocketMessageWriter(n,t)]}},7850:(e,t,n)=>{"use strict";function i(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}Object.defineProperty(t,"__esModule",{value:!0});const o=n(9449);t.ErrorCodes=o.ErrorCodes,t.ResponseError=o.ResponseError,t.CancellationToken=o.CancellationToken,t.CancellationTokenSource=o.CancellationTokenSource,t.Disposable=o.Disposable,t.Event=o.Event,t.Emitter=o.Emitter,t.Trace=o.Trace,t.TraceFormat=o.TraceFormat,t.SetTraceNotification=o.SetTraceNotification,t.LogTraceNotification=o.LogTraceNotification,t.RequestType=o.RequestType,t.RequestType0=o.RequestType0,t.NotificationType=o.NotificationType,t.NotificationType0=o.NotificationType0,t.MessageReader=o.MessageReader,t.MessageWriter=o.MessageWriter,t.ConnectionStrategy=o.ConnectionStrategy,t.StreamMessageReader=o.StreamMessageReader,t.StreamMessageWriter=o.StreamMessageWriter,t.IPCMessageReader=o.IPCMessageReader,t.IPCMessageWriter=o.IPCMessageWriter,t.createClientPipeTransport=o.createClientPipeTransport,t.createServerPipeTransport=o.createServerPipeTransport,t.generateRandomPipeName=o.generateRandomPipeName,t.createClientSocketTransport=o.createClientSocketTransport,t.createServerSocketTransport=o.createServerSocketTransport,i(n(1579)),i(n(4583)),t.createProtocolConnection=function(e,t,n,i){return o.createMessageConnection(e,t,n,i)}},3203:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(9449);(t.DocumentColorRequest||(t.DocumentColorRequest={})).type=new i.RequestType("textDocument/documentColor"),(t.ColorPresentationRequest||(t.ColorPresentationRequest={})).type=new i.RequestType("textDocument/colorPresentation")},2615:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(9449);(t.ConfigurationRequest||(t.ConfigurationRequest={})).type=new i.RequestType("workspace/configuration")},1411:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(9449);var o;(o=t.FoldingRangeKind||(t.FoldingRangeKind={})).Comment="comment",o.Imports="imports",o.Region="region",(t.FoldingRangeRequest||(t.FoldingRangeRequest={})).type=new i.RequestType("textDocument/foldingRange")},8391:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(9449);(t.ImplementationRequest||(t.ImplementationRequest={})).type=new i.RequestType("textDocument/implementation")},4583:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(8361),o=n(9449),r=n(8391);t.ImplementationRequest=r.ImplementationRequest;const s=n(2544);t.TypeDefinitionRequest=s.TypeDefinitionRequest;const a=n(8291);t.WorkspaceFoldersRequest=a.WorkspaceFoldersRequest,t.DidChangeWorkspaceFoldersNotification=a.DidChangeWorkspaceFoldersNotification;const u=n(2615);t.ConfigurationRequest=u.ConfigurationRequest;const l=n(3203);t.DocumentColorRequest=l.DocumentColorRequest,t.ColorPresentationRequest=l.ColorPresentationRequest;const c=n(1411);var h,d,f,p,g,m,v;t.FoldingRangeRequest=c.FoldingRangeRequest,(t.DocumentFilter||(t.DocumentFilter={})).is=function(e){let t=e;return i.string(t.language)||i.string(t.scheme)||i.string(t.pattern)},(t.RegistrationRequest||(t.RegistrationRequest={})).type=new o.RequestType("client/registerCapability"),(t.UnregistrationRequest||(t.UnregistrationRequest={})).type=new o.RequestType("client/unregisterCapability"),(v=t.ResourceOperationKind||(t.ResourceOperationKind={})).Create="create",v.Rename="rename",v.Delete="delete",(m=t.FailureHandlingKind||(t.FailureHandlingKind={})).Abort="abort",m.Transactional="transactional",m.TextOnlyTransactional="textOnlyTransactional",m.Undo="undo",(g=t.TextDocumentSyncKind||(t.TextDocumentSyncKind={})).None=0,g.Full=1,g.Incremental=2,(t.InitializeRequest||(t.InitializeRequest={})).type=new o.RequestType("initialize"),(t.InitializeError||(t.InitializeError={})).unknownProtocolVersion=1,(t.InitializedNotification||(t.InitializedNotification={})).type=new o.NotificationType("initialized"),(t.ShutdownRequest||(t.ShutdownRequest={})).type=new o.RequestType0("shutdown"),(t.ExitNotification||(t.ExitNotification={})).type=new o.NotificationType0("exit"),(t.DidChangeConfigurationNotification||(t.DidChangeConfigurationNotification={})).type=new o.NotificationType("workspace/didChangeConfiguration"),(p=t.MessageType||(t.MessageType={})).Error=1,p.Warning=2,p.Info=3,p.Log=4,(t.ShowMessageNotification||(t.ShowMessageNotification={})).type=new o.NotificationType("window/showMessage"),(t.ShowMessageRequest||(t.ShowMessageRequest={})).type=new o.RequestType("window/showMessageRequest"),(t.LogMessageNotification||(t.LogMessageNotification={})).type=new o.NotificationType("window/logMessage"),(t.TelemetryEventNotification||(t.TelemetryEventNotification={})).type=new o.NotificationType("telemetry/event"),(t.DidOpenTextDocumentNotification||(t.DidOpenTextDocumentNotification={})).type=new o.NotificationType("textDocument/didOpen"),(t.DidChangeTextDocumentNotification||(t.DidChangeTextDocumentNotification={})).type=new o.NotificationType("textDocument/didChange"),(t.DidCloseTextDocumentNotification||(t.DidCloseTextDocumentNotification={})).type=new o.NotificationType("textDocument/didClose"),(t.DidSaveTextDocumentNotification||(t.DidSaveTextDocumentNotification={})).type=new o.NotificationType("textDocument/didSave"),(t.WillSaveTextDocumentNotification||(t.WillSaveTextDocumentNotification={})).type=new o.NotificationType("textDocument/willSave"),(t.WillSaveTextDocumentWaitUntilRequest||(t.WillSaveTextDocumentWaitUntilRequest={})).type=new o.RequestType("textDocument/willSaveWaitUntil"),(t.DidChangeWatchedFilesNotification||(t.DidChangeWatchedFilesNotification={})).type=new o.NotificationType("workspace/didChangeWatchedFiles"),(f=t.FileChangeType||(t.FileChangeType={})).Created=1,f.Changed=2,f.Deleted=3,(d=t.WatchKind||(t.WatchKind={})).Create=1,d.Change=2,d.Delete=4,(t.PublishDiagnosticsNotification||(t.PublishDiagnosticsNotification={})).type=new o.NotificationType("textDocument/publishDiagnostics"),(h=t.CompletionTriggerKind||(t.CompletionTriggerKind={})).Invoked=1,h.TriggerCharacter=2,h.TriggerForIncompleteCompletions=3,(t.CompletionRequest||(t.CompletionRequest={})).type=new o.RequestType("textDocument/completion"),(t.CompletionResolveRequest||(t.CompletionResolveRequest={})).type=new o.RequestType("completionItem/resolve"),(t.HoverRequest||(t.HoverRequest={})).type=new o.RequestType("textDocument/hover"),(t.SignatureHelpRequest||(t.SignatureHelpRequest={})).type=new o.RequestType("textDocument/signatureHelp"),(t.DefinitionRequest||(t.DefinitionRequest={})).type=new o.RequestType("textDocument/definition"),(t.ReferencesRequest||(t.ReferencesRequest={})).type=new o.RequestType("textDocument/references"),(t.DocumentHighlightRequest||(t.DocumentHighlightRequest={})).type=new o.RequestType("textDocument/documentHighlight"),(t.DocumentSymbolRequest||(t.DocumentSymbolRequest={})).type=new o.RequestType("textDocument/documentSymbol"),(t.WorkspaceSymbolRequest||(t.WorkspaceSymbolRequest={})).type=new o.RequestType("workspace/symbol"),(t.CodeActionRequest||(t.CodeActionRequest={})).type=new o.RequestType("textDocument/codeAction"),(t.CodeLensRequest||(t.CodeLensRequest={})).type=new o.RequestType("textDocument/codeLens"),(t.CodeLensResolveRequest||(t.CodeLensResolveRequest={})).type=new o.RequestType("codeLens/resolve"),(t.DocumentFormattingRequest||(t.DocumentFormattingRequest={})).type=new o.RequestType("textDocument/formatting"),(t.DocumentRangeFormattingRequest||(t.DocumentRangeFormattingRequest={})).type=new o.RequestType("textDocument/rangeFormatting"),(t.DocumentOnTypeFormattingRequest||(t.DocumentOnTypeFormattingRequest={})).type=new o.RequestType("textDocument/onTypeFormatting"),(t.RenameRequest||(t.RenameRequest={})).type=new o.RequestType("textDocument/rename"),(t.PrepareRenameRequest||(t.PrepareRenameRequest={})).type=new o.RequestType("textDocument/prepareRename"),(t.DocumentLinkRequest||(t.DocumentLinkRequest={})).type=new o.RequestType("textDocument/documentLink"),(t.DocumentLinkResolveRequest||(t.DocumentLinkResolveRequest={})).type=new o.RequestType("documentLink/resolve"),(t.ExecuteCommandRequest||(t.ExecuteCommandRequest={})).type=new o.RequestType("workspace/executeCommand"),(t.ApplyWorkspaceEditRequest||(t.ApplyWorkspaceEditRequest={})).type=new o.RequestType("workspace/applyEdit")},2544:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(9449);(t.TypeDefinitionRequest||(t.TypeDefinitionRequest={})).type=new i.RequestType("textDocument/typeDefinition")},8291:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(9449);(t.WorkspaceFoldersRequest||(t.WorkspaceFoldersRequest={})).type=new i.RequestType0("workspace/workspaceFolders"),(t.DidChangeWorkspaceFoldersNotification||(t.DidChangeWorkspaceFoldersNotification={})).type=new i.NotificationType("workspace/didChangeWorkspaceFolders")},8361:(e,t)=>{"use strict";function n(e){return"string"==typeof e||e instanceof String}function i(e){return"function"==typeof e}function o(e){return Array.isArray(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.boolean=function(e){return!0===e||!1===e},t.string=n,t.number=function(e){return"number"==typeof e||e instanceof Number},t.error=function(e){return e instanceof Error},t.func=i,t.array=o,t.stringArray=function(e){return o(e)&&e.every((e=>n(e)))},t.typedArray=function(e,t){return Array.isArray(e)&&e.every(t)},t.thenable=function(e){return e&&i(e.then)}},1579:(e,t,n)=>{"use strict";var i,o,r,s,a,u,l,c,h,d,f,p,g,m,v,y,b,_;n.r(t),n.d(t,{CodeAction:()=>H,CodeActionContext:()=>B,CodeActionKind:()=>F,CodeLens:()=>V,Color:()=>s,ColorInformation:()=>a,ColorPresentation:()=>u,Command:()=>p,CompletionItem:()=>x,CompletionItemKind:()=>I,CompletionList:()=>D,CreateFile:()=>v,DeleteFile:()=>b,Diagnostic:()=>f,DiagnosticRelatedInformation:()=>h,DiagnosticSeverity:()=>d,DocumentHighlight:()=>O,DocumentHighlightKind:()=>j,DocumentLink:()=>Z,DocumentSymbol:()=>Y,EOL:()=>q,FoldingRange:()=>c,FoldingRangeKind:()=>l,FormattingOptions:()=>U,Hover:()=>T,InsertTextFormat:()=>N,Location:()=>r,MarkedString:()=>k,MarkupContent:()=>L,MarkupKind:()=>S,ParameterInformation:()=>E,Position:()=>i,Range:()=>o,RenameFile:()=>y,SignatureInformation:()=>A,SymbolInformation:()=>P,SymbolKind:()=>R,TextDocument:()=>G,TextDocumentEdit:()=>m,TextDocumentIdentifier:()=>w,TextDocumentItem:()=>C,TextDocumentSaveReason:()=>Q,TextEdit:()=>g,VersionedTextDocumentIdentifier:()=>M,WorkspaceChange:()=>W,WorkspaceEdit:()=>_}),function(e){e.create=function(e,t){return{line:e,character:t}},e.is=function(e){var t=e;return K.objectLiteral(t)&&K.number(t.line)&&K.number(t.character)}}(i||(i={})),function(e){e.create=function(e,t,n,o){if(K.number(e)&&K.number(t)&&K.number(n)&&K.number(o))return{start:i.create(e,t),end:i.create(n,o)};if(i.is(e)&&i.is(t))return{start:e,end:t};throw new Error("Range#create called with invalid arguments["+e+", "+t+", "+n+", "+o+"]")},e.is=function(e){var t=e;return K.objectLiteral(t)&&i.is(t.start)&&i.is(t.end)}}(o||(o={})),function(e){e.create=function(e,t){return{uri:e,range:t}},e.is=function(e){var t=e;return K.defined(t)&&o.is(t.range)&&(K.string(t.uri)||K.undefined(t.uri))}}(r||(r={})),function(e){e.create=function(e,t,n,i){return{red:e,green:t,blue:n,alpha:i}},e.is=function(e){var t=e;return K.number(t.red)&&K.number(t.green)&&K.number(t.blue)&&K.number(t.alpha)}}(s||(s={})),function(e){e.create=function(e,t){return{range:e,color:t}},e.is=function(e){var t=e;return o.is(t.range)&&s.is(t.color)}}(a||(a={})),function(e){e.create=function(e,t,n){return{label:e,textEdit:t,additionalTextEdits:n}},e.is=function(e){var t=e;return K.string(t.label)&&(K.undefined(t.textEdit)||g.is(t))&&(K.undefined(t.additionalTextEdits)||K.typedArray(t.additionalTextEdits,g.is))}}(u||(u={})),function(e){e.Comment="comment",e.Imports="imports",e.Region="region"}(l||(l={})),function(e){e.create=function(e,t,n,i,o){var r={startLine:e,endLine:t};return K.defined(n)&&(r.startCharacter=n),K.defined(i)&&(r.endCharacter=i),K.defined(o)&&(r.kind=o),r},e.is=function(e){var t=e;return K.number(t.startLine)&&K.number(t.startLine)&&(K.undefined(t.startCharacter)||K.number(t.startCharacter))&&(K.undefined(t.endCharacter)||K.number(t.endCharacter))&&(K.undefined(t.kind)||K.string(t.kind))}}(c||(c={})),function(e){e.create=function(e,t){return{location:e,message:t}},e.is=function(e){var t=e;return K.defined(t)&&r.is(t.location)&&K.string(t.message)}}(h||(h={})),function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4}(d||(d={})),function(e){e.create=function(e,t,n,i,o,r){var s={range:e,message:t};return K.defined(n)&&(s.severity=n),K.defined(i)&&(s.code=i),K.defined(o)&&(s.source=o),K.defined(r)&&(s.relatedInformation=r),s},e.is=function(e){var t=e;return K.defined(t)&&o.is(t.range)&&K.string(t.message)&&(K.number(t.severity)||K.undefined(t.severity))&&(K.number(t.code)||K.string(t.code)||K.undefined(t.code))&&(K.string(t.source)||K.undefined(t.source))&&(K.undefined(t.relatedInformation)||K.typedArray(t.relatedInformation,h.is))}}(f||(f={})),function(e){e.create=function(e,t){for(var n=[],i=2;i0&&(o.arguments=n),o},e.is=function(e){var t=e;return K.defined(t)&&K.string(t.title)&&K.string(t.command)}}(p||(p={})),function(e){e.replace=function(e,t){return{range:e,newText:t}},e.insert=function(e,t){return{range:{start:e,end:e},newText:t}},e.del=function(e){return{range:e,newText:""}},e.is=function(e){var t=e;return K.objectLiteral(t)&&K.string(t.newText)&&o.is(t.range)}}(g||(g={})),function(e){e.create=function(e,t){return{textDocument:e,edits:t}},e.is=function(e){var t=e;return K.defined(t)&&M.is(t.textDocument)&&Array.isArray(t.edits)}}(m||(m={})),function(e){e.create=function(e,t){var n={kind:"create",uri:e};return void 0===t||void 0===t.overwrite&&void 0===t.ignoreIfExists||(n.options=t),n},e.is=function(e){var t=e;return t&&"create"===t.kind&&K.string(t.uri)&&(void 0===t.options||(void 0===t.options.overwrite||K.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||K.boolean(t.options.ignoreIfExists)))}}(v||(v={})),function(e){e.create=function(e,t,n){var i={kind:"rename",oldUri:e,newUri:t};return void 0===n||void 0===n.overwrite&&void 0===n.ignoreIfExists||(i.options=n),i},e.is=function(e){var t=e;return t&&"rename"===t.kind&&K.string(t.oldUri)&&K.string(t.newUri)&&(void 0===t.options||(void 0===t.options.overwrite||K.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||K.boolean(t.options.ignoreIfExists)))}}(y||(y={})),function(e){e.create=function(e,t){var n={kind:"delete",uri:e};return void 0===t||void 0===t.recursive&&void 0===t.ignoreIfNotExists||(n.options=t),n},e.is=function(e){var t=e;return t&&"delete"===t.kind&&K.string(t.uri)&&(void 0===t.options||(void 0===t.options.recursive||K.boolean(t.options.recursive))&&(void 0===t.options.ignoreIfNotExists||K.boolean(t.options.ignoreIfNotExists)))}}(b||(b={})),function(e){e.is=function(e){var t=e;return t&&(void 0!==t.changes||void 0!==t.documentChanges)&&(void 0===t.documentChanges||t.documentChanges.every((function(e){return K.string(e.kind)?v.is(e)||y.is(e)||b.is(e):m.is(e)})))}}(_||(_={}));var w,M,C,S,L,I,N,x,D,k,T,E,A,j,O,R,P,z=function(){function e(e){this.edits=e}return e.prototype.insert=function(e,t){this.edits.push(g.insert(e,t))},e.prototype.replace=function(e,t){this.edits.push(g.replace(e,t))},e.prototype.delete=function(e){this.edits.push(g.del(e))},e.prototype.add=function(e){this.edits.push(e)},e.prototype.all=function(){return this.edits},e.prototype.clear=function(){this.edits.splice(0,this.edits.length)},e}(),W=function(){function e(e){var t=this;this._textEditChanges=Object.create(null),e&&(this._workspaceEdit=e,e.documentChanges?e.documentChanges.forEach((function(e){if(m.is(e)){var n=new z(e.edits);t._textEditChanges[e.textDocument.uri]=n}})):e.changes&&Object.keys(e.changes).forEach((function(n){var i=new z(e.changes[n]);t._textEditChanges[n]=i})))}return Object.defineProperty(e.prototype,"edit",{get:function(){return this._workspaceEdit},enumerable:!0,configurable:!0}),e.prototype.getTextEditChange=function(e){if(M.is(e)){if(this._workspaceEdit||(this._workspaceEdit={documentChanges:[]}),!this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");var t=e;if(!(i=this._textEditChanges[t.uri])){var n={textDocument:t,edits:o=[]};this._workspaceEdit.documentChanges.push(n),i=new z(o),this._textEditChanges[t.uri]=i}return i}if(this._workspaceEdit||(this._workspaceEdit={changes:Object.create(null)}),!this._workspaceEdit.changes)throw new Error("Workspace edit is not configured for normal text edit changes.");var i;if(!(i=this._textEditChanges[e])){var o=[];this._workspaceEdit.changes[e]=o,i=new z(o),this._textEditChanges[e]=i}return i},e.prototype.createFile=function(e,t){this.checkDocumentChanges(),this._workspaceEdit.documentChanges.push(v.create(e,t))},e.prototype.renameFile=function(e,t,n){this.checkDocumentChanges(),this._workspaceEdit.documentChanges.push(y.create(e,t,n))},e.prototype.deleteFile=function(e,t){this.checkDocumentChanges(),this._workspaceEdit.documentChanges.push(b.create(e,t))},e.prototype.checkDocumentChanges=function(){if(!this._workspaceEdit||!this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.")},e}();!function(e){e.create=function(e){return{uri:e}},e.is=function(e){var t=e;return K.defined(t)&&K.string(t.uri)}}(w||(w={})),function(e){e.create=function(e,t){return{uri:e,version:t}},e.is=function(e){var t=e;return K.defined(t)&&K.string(t.uri)&&(null===t.version||K.number(t.version))}}(M||(M={})),function(e){e.create=function(e,t,n,i){return{uri:e,languageId:t,version:n,text:i}},e.is=function(e){var t=e;return K.defined(t)&&K.string(t.uri)&&K.string(t.languageId)&&K.number(t.version)&&K.string(t.text)}}(C||(C={})),function(e){e.PlainText="plaintext",e.Markdown="markdown"}(S||(S={})),function(e){e.is=function(t){var n=t;return n===e.PlainText||n===e.Markdown}}(S||(S={})),function(e){e.is=function(e){var t=e;return K.objectLiteral(e)&&S.is(t.kind)&&K.string(t.value)}}(L||(L={})),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}(I||(I={})),function(e){e.PlainText=1,e.Snippet=2}(N||(N={})),function(e){e.create=function(e){return{label:e}}}(x||(x={})),function(e){e.create=function(e,t){return{items:e||[],isIncomplete:!!t}}}(D||(D={})),function(e){e.fromPlainText=function(e){return e.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")},e.is=function(e){var t=e;return K.string(t)||K.objectLiteral(t)&&K.string(t.language)&&K.string(t.value)}}(k||(k={})),function(e){e.is=function(e){var t=e;return K.objectLiteral(t)&&(L.is(t.contents)||k.is(t.contents)||K.typedArray(t.contents,k.is))&&(void 0===e.range||o.is(e.range))}}(T||(T={})),function(e){e.create=function(e,t){return t?{label:e,documentation:t}:{label:e}}}(E||(E={})),function(e){e.create=function(e,t){for(var n=[],i=2;i=0;s--){var a=o[s],u=e.offsetAt(a.range.start),l=e.offsetAt(a.range.end);if(!(l<=r))throw new Error("Ovelapping edit");i=i.substring(0,u)+a.newText+i.substring(l,i.length),r=u}return i}}(G||(G={})),function(e){e.Manual=1,e.AfterDelay=2,e.FocusOut=3}(Q||(Q={}));var K,J=function(){function e(e,t,n,i){this._uri=e,this._languageId=t,this._version=n,this._content=i,this._lineOffsets=null}return Object.defineProperty(e.prototype,"uri",{get:function(){return this._uri},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"languageId",{get:function(){return this._languageId},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"version",{get:function(){return this._version},enumerable:!0,configurable:!0}),e.prototype.getText=function(e){if(e){var t=this.offsetAt(e.start),n=this.offsetAt(e.end);return this._content.substring(t,n)}return this._content},e.prototype.update=function(e,t){this._content=e.text,this._version=t,this._lineOffsets=null},e.prototype.getLineOffsets=function(){if(null===this._lineOffsets){for(var e=[],t=this._content,n=!0,i=0;i0&&e.push(t.length),this._lineOffsets=e}return this._lineOffsets},e.prototype.positionAt=function(e){e=Math.max(Math.min(e,this._content.length),0);var t=this.getLineOffsets(),n=0,o=t.length;if(0===o)return i.create(0,e);for(;ne?o=r:n=r+1}var s=n-1;return i.create(s,e-t[s])},e.prototype.offsetAt=function(e){var t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;var n=t[e.line],i=e.line+1{"use strict";n.r(t),n.d(t,{default:()=>g});var i,o,r=n(8957),s=(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});if("object"==typeof r)o="win32"===r.platform;else if("object"==typeof navigator){var a=navigator.userAgent;o=a.indexOf("Windows")>=0}var u=/^\w[\w\d+.-]*$/,l=/^\//,c=/^\/\//,h="",d="/",f=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/,p=function(){function e(e,t,n,i,o){"object"==typeof e?(this.scheme=e.scheme||h,this.authority=e.authority||h,this.path=e.path||h,this.query=e.query||h,this.fragment=e.fragment||h):(this.scheme=e||h,this.authority=t||h,this.path=function(e,t){switch(e){case"https":case"http":case"file":t?t[0]!==d&&(t=d+t):t=d}return t}(this.scheme,n||h),this.query=i||h,this.fragment=o||h,function(e){if(e.scheme&&!u.test(e.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(e.path)if(e.authority){if(!l.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(c.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 ("//")')}(this))}return e.isUri=function(t){return t instanceof e||!!t&&"string"==typeof t.authority&&"string"==typeof t.fragment&&"string"==typeof t.path&&"string"==typeof t.query&&"string"==typeof t.scheme},Object.defineProperty(e.prototype,"fsPath",{get:function(){return w(this)},enumerable:!0,configurable:!0}),e.prototype.with=function(e){if(!e)return this;var t=e.scheme,n=e.authority,i=e.path,o=e.query,r=e.fragment;return void 0===t?t=this.scheme:null===t&&(t=h),void 0===n?n=this.authority:null===n&&(n=h),void 0===i?i=this.path:null===i&&(i=h),void 0===o?o=this.query:null===o&&(o=h),void 0===r?r=this.fragment:null===r&&(r=h),t===this.scheme&&n===this.authority&&i===this.path&&o===this.query&&r===this.fragment?this:new v(t,n,i,o,r)},e.parse=function(e){var t=f.exec(e);return t?new v(t[2]||h,decodeURIComponent(t[4]||h),decodeURIComponent(t[5]||h),decodeURIComponent(t[7]||h),decodeURIComponent(t[9]||h)):new v(h,h,h,h,h)},e.file=function(e){var t=h;if(o&&(e=e.replace(/\\/g,d)),e[0]===d&&e[1]===d){var n=e.indexOf(d,2);-1===n?(t=e.substring(2),e=d):(t=e.substring(2,n),e=e.substring(n)||d)}return new v("file",t,e,h,h)},e.from=function(e){return new v(e.scheme,e.authority,e.path,e.query,e.fragment)},e.prototype.toString=function(e){return void 0===e&&(e=!1),M(this,e)},e.prototype.toJSON=function(){return this},e.revive=function(t){if(t){if(t instanceof e)return t;var n=new v(t);return n._fsPath=t.fsPath,n._formatted=t.external,n}return t},e}();const g=p;var m,v=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._formatted=null,t._fsPath=null,t}return s(t,e),Object.defineProperty(t.prototype,"fsPath",{get:function(){return this._fsPath||(this._fsPath=w(this)),this._fsPath},enumerable:!0,configurable:!0}),t.prototype.toString=function(e){return void 0===e&&(e=!1),e?M(this,!0):(this._formatted||(this._formatted=M(this,!1)),this._formatted)},t.prototype.toJSON=function(){var e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath),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},t}(p),y=((m={})[58]="%3A",m[47]="%2F",m[63]="%3F",m[35]="%23",m[91]="%5B",m[93]="%5D",m[64]="%40",m[33]="%21",m[36]="%24",m[38]="%26",m[39]="%27",m[40]="%28",m[41]="%29",m[42]="%2A",m[43]="%2B",m[44]="%2C",m[59]="%3B",m[61]="%3D",m[32]="%20",m);function b(e,t){for(var n=void 0,i=-1,o=0;o=97&&r<=122||r>=65&&r<=90||r>=48&&r<=57||45===r||46===r||95===r||126===r||t&&47===r)-1!==i&&(n+=encodeURIComponent(e.substring(i,o)),i=-1),void 0!==n&&(n+=e.charAt(o));else{void 0===n&&(n=e.substr(0,o));var s=y[r];void 0!==s?(-1!==i&&(n+=encodeURIComponent(e.substring(i,o)),i=-1),n+=s):-1===i&&(i=o)}}return-1!==i&&(n+=encodeURIComponent(e.substring(i))),void 0!==n?n:e}function _(e){for(var t=void 0,n=0;n1&&"file"===e.scheme?"//"+e.authority+e.path:47===e.path.charCodeAt(0)&&(e.path.charCodeAt(1)>=65&&e.path.charCodeAt(1)<=90||e.path.charCodeAt(1)>=97&&e.path.charCodeAt(1)<=122)&&58===e.path.charCodeAt(2)?e.path[1].toLowerCase()+e.path.substr(2):e.path,o&&(t=t.replace(/\//g,"\\")),t}function M(e,t){var n=t?_:b,i="",o=e.scheme,r=e.authority,s=e.path,a=e.query,u=e.fragment;if(o&&(i+=o,i+=":"),(r||"file"===o)&&(i+=d,i+=d),r){var l=r.indexOf("@");if(-1!==l){var c=r.substr(0,l);r=r.substr(l+1),-1===(l=c.indexOf(":"))?i+=n(c,!1):(i+=n(c.substr(0,l),!1),i+=":",i+=n(c.substr(l+1),!1)),i+="@"}-1===(l=(r=r.toLowerCase()).indexOf(":"))?i+=n(r,!1):(i+=n(r.substr(0,l),!1),i+=r.substr(l))}if(s){if(s.length>=3&&47===s.charCodeAt(0)&&58===s.charCodeAt(2))(h=s.charCodeAt(1))>=65&&h<=90&&(s="/"+String.fromCharCode(h+32)+":"+s.substr(3));else if(s.length>=2&&58===s.charCodeAt(1)){var h;(h=s.charCodeAt(0))>=65&&h<=90&&(s=String.fromCharCode(h+32)+":"+s.substr(2))}i+=n(s,!0)}return a&&(i+="?",i+=n(a,!1)),u&&(i+="#",i+=t?u:b(u,!1)),i}},987:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(3397),o=n(3839);function r(e){return{send:function(t){return e.send(t)},onMessage:function(t){return e.onmessage=function(e){return t(e.data)}},onError:function(t){return e.onerror=function(e){"message"in e&&t(e.message)}},onClose:function(t){return e.onclose=function(e){return t(e.code,e.reason)}},dispose:function(){return e.close()}}}t.listen=function(e){var t=e.webSocket,n=e.onConnection,s=e.logger||new o.ConsoleLogger;t.onopen=function(){var e=r(t),o=i.createWebSocketConnection(e,s);n(o)}},t.toSocket=r},8217:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(5924);t.Disposable=i.Disposable;var o=function(){function e(){this.disposables=[]}return e.prototype.dispose=function(){for(;0!==this.disposables.length;)this.disposables.pop().dispose()},e.prototype.push=function(e){var t=this.disposables;return t.push(e),{dispose:function(){var n=t.indexOf(e);-1!==n&&t.splice(n,1)}}},e}();t.DisposableCollection=o},4823:(e,t,n)=>{"use strict";function i(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}Object.defineProperty(t,"__esModule",{value:!0}),i(n(9192)),i(n(7633)),i(n(8217)),i(n(3397)),i(n(3839)),i(n(987))},3839:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(){}return e.prototype.error=function(e){console.error(e)},e.prototype.warn=function(e){console.warn(e)},e.prototype.info=function(e){console.info(e)},e.prototype.log=function(e){console.log(e)},e.prototype.debug=function(e){console.debug(e)},e}();t.ConsoleLogger=n},4645:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(9192),o=n(6450),r=n(8434);t.createWebSocketConnection=function(e,t){var n=new o.WebSocketMessageReader(e),s=new r.WebSocketMessageWriter(e),a=i.createMessageConnection(n,s,t);return a.onClose((function(){return a.dispose()})),a}},3397:(e,t,n)=>{"use strict";function i(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}Object.defineProperty(t,"__esModule",{value:!0}),i(n(6450)),i(n(8434)),i(n(4645))},6450:function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){function t(t){var n=e.call(this)||this;return n.socket=t,n.state="initial",n.events=[],n.socket.onMessage((function(e){return n.readMessage(e)})),n.socket.onError((function(e){return n.fireError(e)})),n.socket.onClose((function(e,t){if(1e3!==e){var i={name:""+e,message:"Error during socket reconnect: code = "+e+", reason = "+t};n.fireError(i)}n.fireClose()})),n}return o(t,e),t.prototype.listen=function(e){if("initial"===this.state)for(this.state="listening",this.callback=e;0!==this.events.length;){var t=this.events.pop();t.message?this.readMessage(t.message):t.error?this.fireError(t.error):this.fireClose()}},t.prototype.readMessage=function(e){if("initial"===this.state)this.events.splice(0,0,{message:e});else if("listening"===this.state){var t=JSON.parse(e);this.callback(t)}},t.prototype.fireError=function(t){"initial"===this.state?this.events.splice(0,0,{error:t}):"listening"===this.state&&e.prototype.fireError.call(this,t)},t.prototype.fireClose=function(){"initial"===this.state?this.events.splice(0,0,{}):"listening"===this.state&&e.prototype.fireClose.call(this),this.state="closed"},t}(n(8125).AbstractMessageReader);t.WebSocketMessageReader=r},8434:function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){function t(t){var n=e.call(this)||this;return n.socket=t,n.errorCount=0,n}return o(t,e),t.prototype.write=function(e){try{var t=JSON.stringify(e);this.socket.send(t)}catch(t){this.errorCount++,this.fireError(t,e,this.errorCount)}},t}(n(5417).AbstractMessageWriter);t.WebSocketMessageWriter=r},5114:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i,o=n(5924),r=n(7145);!function(e){e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:o.Event.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:o.Event.None}),e.is=function(t){var n=t;return n&&(n===e.None||n===e.Cancelled||r.boolean(n.isCancellationRequested)&&!!n.onCancellationRequested)}}(i=t.CancellationToken||(t.CancellationToken={}));var s=Object.freeze((function(e,t){var n=setTimeout(e.bind(t),0);return{dispose:function(){clearTimeout(n)}}})),a=function(){function e(){this._isCancelled=!1}return e.prototype.cancel=function(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this._emitter=void 0))},Object.defineProperty(e.prototype,"isCancellationRequested",{get:function(){return this._isCancelled},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onCancellationRequested",{get:function(){return this._isCancelled?s:(this._emitter||(this._emitter=new o.Emitter),this._emitter.event)},enumerable:!0,configurable:!0}),e}(),u=function(){function e(){}return Object.defineProperty(e.prototype,"token",{get:function(){return this._token||(this._token=new a),this._token},enumerable:!0,configurable:!0}),e.prototype.cancel=function(){this._token?this._token.cancel():this._token=i.Cancelled},e.prototype.dispose=function(){this.cancel()},e}();t.CancellationTokenSource=u},5924:(e,t)=>{"use strict";var n,i;Object.defineProperty(t,"__esModule",{value:!0}),(t.Disposable||(t.Disposable={})).create=function(e){return{dispose:e}},n=t.Event||(t.Event={}),i={dispose:function(){}},n.None=function(){return i};var o=function(){function e(){}return e.prototype.add=function(e,t,n){var i=this;void 0===t&&(t=null),this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(e),this._contexts.push(t),Array.isArray(n)&&n.push({dispose:function(){return i.remove(e,t)}})},e.prototype.remove=function(e,t){if(void 0===t&&(t=null),this._callbacks){for(var n=!1,i=0,o=this._callbacks.length;i{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=Object.prototype.toString;function i(e){return"[object String]"===n.call(e)}function o(e){return Array.isArray(e)}t.boolean=function(e){return!0===e||!1===e},t.string=i,t.number=function(e){return"[object Number]"===n.call(e)},t.error=function(e){return"[object Error]"===n.call(e)},t.func=function(e){return"[object Function]"===n.call(e)},t.array=o,t.stringArray=function(e){return o(e)&&e.every((function(e){return i(e)}))}},7688:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.None=0,e.First=1,e.Last=2}(n=t.Touch||(t.Touch={}));var i=function(){function e(){this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0}return e.prototype.clear=function(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0},e.prototype.isEmpty=function(){return!this._head&&!this._tail},Object.defineProperty(e.prototype,"size",{get:function(){return this._size},enumerable:!0,configurable:!0}),e.prototype.has=function(e){return this._map.has(e)},e.prototype.get=function(e){var t=this._map.get(e);if(t)return t.value},e.prototype.set=function(e,t,i){void 0===i&&(i=n.None);var o=this._map.get(e);if(o)o.value=t,i!==n.None&&this.touch(o,i);else{switch(o={key:e,value:t,next:void 0,previous:void 0},i){case n.None:this.addItemLast(o);break;case n.First:this.addItemFirst(o);break;case n.Last:default:this.addItemLast(o)}this._map.set(e,o),this._size++}},e.prototype.delete=function(e){var t=this._map.get(e);return!!t&&(this._map.delete(e),this.removeItem(t),this._size--,!0)},e.prototype.shift=function(){if(this._head||this._tail){if(!this._head||!this._tail)throw new Error("Invalid list");var e=this._head;return this._map.delete(e.key),this.removeItem(e),this._size--,e.value}},e.prototype.forEach=function(e,t){for(var n=this._head;n;)t?e.bind(t)(n.value,n.key,this):e(n.value,n.key,this),n=n.next},e.prototype.forEachReverse=function(e,t){for(var n=this._tail;n;)t?e.bind(t)(n.value,n.key,this):e(n.value,n.key,this),n=n.previous},e.prototype.values=function(){for(var e=[],t=this._head;t;)e.push(t.value),t=t.next;return e},e.prototype.keys=function(){for(var e=[],t=this._head;t;)e.push(t.key),t=t.next;return e},e.prototype.addItemFirst=function(e){if(this._head||this._tail){if(!this._head)throw new Error("Invalid list");e.next=this._head,this._head.previous=e}else this._tail=e;this._head=e},e.prototype.addItemLast=function(e){if(this._head||this._tail){if(!this._tail)throw new Error("Invalid list");e.previous=this._tail,this._tail.next=e}else this._head=e;this._tail=e},e.prototype.removeItem=function(e){if(e===this._head&&e===this._tail)this._head=void 0,this._tail=void 0;else if(e===this._head)this._head=e.next;else if(e===this._tail)this._tail=e.previous;else{var t=e.next,n=e.previous;if(!t||!n)throw new Error("Invalid list");t.previous=n,n.next=t}},e.prototype.touch=function(e,t){if(!this._head||!this._tail)throw new Error("Invalid list");if(t===n.First||t===n.Last)if(t===n.First){if(e===this._head)return;var i=e.next,o=e.previous;e===this._tail?(o.next=void 0,this._tail=o):(i.previous=o,o.next=i),e.previous=void 0,e.next=this._head,this._head.previous=e,this._head=e}else if(t===n.Last){if(e===this._tail)return;i=e.next,o=e.previous,e===this._head?(i.previous=void 0,this._head=i):(i.previous=o,o.next=i),e.next=void 0,e.previous=this._tail,this._tail.next=e,this._tail=e}},e}();t.LinkedMap=i},9192:function(e,t,n){"use strict";var i,o=n(7188).setImmedate,r=this&&this.__extends||(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});function s(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}Object.defineProperty(t,"__esModule",{value:!0});var a=n(7145),u=n(7633);t.RequestType=u.RequestType,t.RequestType0=u.RequestType0,t.RequestType1=u.RequestType1,t.RequestType2=u.RequestType2,t.RequestType3=u.RequestType3,t.RequestType4=u.RequestType4,t.RequestType5=u.RequestType5,t.RequestType6=u.RequestType6,t.RequestType7=u.RequestType7,t.RequestType8=u.RequestType8,t.RequestType9=u.RequestType9,t.ResponseError=u.ResponseError,t.ErrorCodes=u.ErrorCodes,t.NotificationType=u.NotificationType,t.NotificationType0=u.NotificationType0,t.NotificationType1=u.NotificationType1,t.NotificationType2=u.NotificationType2,t.NotificationType3=u.NotificationType3,t.NotificationType4=u.NotificationType4,t.NotificationType5=u.NotificationType5,t.NotificationType6=u.NotificationType6,t.NotificationType7=u.NotificationType7,t.NotificationType8=u.NotificationType8,t.NotificationType9=u.NotificationType9;var l=n(8125);t.MessageReader=l.MessageReader,t.StreamMessageReader=l.StreamMessageReader,t.IPCMessageReader=l.IPCMessageReader,t.SocketMessageReader=l.SocketMessageReader;var c=n(5417);t.MessageWriter=c.MessageWriter,t.StreamMessageWriter=c.StreamMessageWriter,t.IPCMessageWriter=c.IPCMessageWriter,t.SocketMessageWriter=c.SocketMessageWriter;var h=n(5924);t.Disposable=h.Disposable,t.Event=h.Event,t.Emitter=h.Emitter;var d=n(5114);t.CancellationTokenSource=d.CancellationTokenSource,t.CancellationToken=d.CancellationToken;var f,p,g,m,v,y=n(7688);s(n(2262)),s(n(2081)),function(e){e.type=new u.NotificationType("$/cancelRequest")}(f||(f={})),t.NullLogger=Object.freeze({error:function(){},warn:function(){},info:function(){},log:function(){}}),function(e){e[e.Off=0]="Off",e[e.Messages=1]="Messages",e[e.Verbose=2]="Verbose"}(p=t.Trace||(t.Trace={})),function(e){e.fromString=function(t){switch(t=t.toLowerCase()){case"off":default:return e.Off;case"messages":return e.Messages;case"verbose":return e.Verbose}},e.toString=function(t){switch(t){case e.Off:return"off";case e.Messages:return"messages";case e.Verbose:return"verbose";default:return"off"}}}(p=t.Trace||(t.Trace={})),function(e){e.type=new u.NotificationType("$/setTraceNotification")}(g=t.SetTraceNotification||(t.SetTraceNotification={})),function(e){e.type=new u.NotificationType("$/logTraceNotification")}(m=t.LogTraceNotification||(t.LogTraceNotification={})),function(e){e[e.Closed=1]="Closed",e[e.Disposed=2]="Disposed",e[e.AlreadyListening=3]="AlreadyListening"}(v=t.ConnectionErrors||(t.ConnectionErrors={}));var b,_=function(e){function t(n,i){var o=e.call(this,i)||this;return o.code=n,Object.setPrototypeOf(o,t.prototype),o}return r(t,e),t}(Error);function w(e,t,n,i){var r,s,l=0,c=0,w=0,M="2.0",C=void 0,S=Object.create(null),L=void 0,I=Object.create(null),N=new y.LinkedMap,x=Object.create(null),D=Object.create(null),k=p.Off,T=b.New,E=new h.Emitter,A=new h.Emitter,j=new h.Emitter,O=new h.Emitter;function R(e){return"req-"+e.toString()}function P(e){}function z(){return T===b.Listening}function W(){return T===b.Closed}function F(){return T===b.Disposed}function B(){T!==b.New&&T!==b.Listening||(T=b.Closed,A.fire(void 0))}function H(){r||0===N.size||(r=o((function(){r=void 0,function(){if(0!==N.size){var e=N.shift();try{u.isRequestMessage(e)?function(e){if(!F()){!function(e){if(k!==p.Off&&s){var t=void 0;k===p.Verbose&&e.params&&(t="Params: "+JSON.stringify(e.params,null,4)+"\n\n"),s.log("Received request '"+e.method+" - ("+e.id+")'.",t)}}(e);var n,i,o=S[e.method];o&&(n=o.type,i=o.handler);var r=Date.now();if(i||C){var l=new d.CancellationTokenSource,c=String(e.id);D[c]=l;try{var h,f=h=void 0===e.params||void 0!==n&&0===n.numberOfParams?i?i(l.token):C(e.method,l.token):a.array(e.params)&&(void 0===n||n.numberOfParams>1)?i?i.apply(void 0,e.params.concat([l.token])):C.apply(void 0,[e.method].concat(e.params,[l.token])):i?i(e.params,l.token):C(e.method,e.params,l.token);h?f.then?f.then((function(t){delete D[c],g(t,e.method,r)}),(function(t){delete D[c],t instanceof u.ResponseError?m(t,e.method,r):t&&a.string(t.message)?m(new u.ResponseError(u.ErrorCodes.InternalError,"Request "+e.method+" failed with message: "+t.message),e.method,r):m(new u.ResponseError(u.ErrorCodes.InternalError,"Request "+e.method+" failed unexpectedly without providing any details."),e.method,r)})):(delete D[c],g(h,e.method,r)):(delete D[c],function(n,i,o){void 0===n&&(n=null);var r={jsonrpc:M,id:e.id,result:n};U(r,i,o),t.write(r)}(h,e.method,r))}catch(t){delete D[c],t instanceof u.ResponseError?g(t,e.method,r):t&&a.string(t.message)?m(new u.ResponseError(u.ErrorCodes.InternalError,"Request "+e.method+" failed with message: "+t.message),e.method,r):m(new u.ResponseError(u.ErrorCodes.InternalError,"Request "+e.method+" failed unexpectedly without providing any details."),e.method,r)}}else m(new u.ResponseError(u.ErrorCodes.MethodNotFound,"Unhandled method "+e.method),e.method,r)}function g(n,i,o){var r={jsonrpc:M,id:e.id};n instanceof u.ResponseError?r.error=n.toJson():r.result=void 0===n?null:n,U(r,i,o),t.write(r)}function m(n,i,o){var r={jsonrpc:M,id:e.id,error:n.toJson()};U(r,i,o),t.write(r)}}(e):u.isNotificationMessage(e)?function(e){if(!F()){var t,i=void 0;if(e.method===f.type.method)t=function(e){var t=e.id,n=D[String(t)];n&&n.cancel()};else{var o=I[e.method];o&&(t=o.handler,i=o.type)}if(t||L)try{!function(e){if(k!==p.Off&&s&&e.method!==m.type.method){var t=void 0;k===p.Verbose&&(t=e.params?"Params: "+JSON.stringify(e.params,null,4)+"\n\n":"No parameters provided.\n\n"),s.log("Received notification '"+e.method+"'.",t)}}(e),void 0===e.params||void 0!==i&&0===i.numberOfParams?t?t():L(e.method):a.array(e.params)&&(void 0===i||i.numberOfParams>1)?t?t.apply(void 0,e.params):L.apply(void 0,[e.method].concat(e.params)):t?t(e.params):L(e.method,e.params)}catch(t){t.message?n.error("Notification handler '"+e.method+"' failed with message: "+t.message):n.error("Notification handler '"+e.method+"' failed unexpectedly.")}else j.fire(e)}}(e):u.isResponseMessage(e)?function(e){if(!F())if(null===e.id)e.error?n.error("Received response message without id: Error is: \n"+JSON.stringify(e.error,void 0,4)):n.error("Received response message without id. No further error information provided.");else{var t=String(e.id),i=x[t];if(function(e,t){if(k!==p.Off&&s){var n=void 0;if(k===p.Verbose&&(e.error&&e.error.data?n="Error data: "+JSON.stringify(e.error.data,null,4)+"\n\n":e.result?n="Result: "+JSON.stringify(e.result,null,4)+"\n\n":void 0===e.error&&(n="No result returned.\n\n")),t){var i=e.error?" Request failed: "+e.error.message+" ("+e.error.code+").":"";s.log("Received response '"+t.method+" - ("+e.id+")' in "+(Date.now()-t.timerStart)+"ms."+i,n)}else s.log("Received response "+e.id+" without active response promise.",n)}}(e,i),i){delete x[t];try{if(e.error){var o=e.error;i.reject(new u.ResponseError(o.code,o.message,o.data))}else{if(void 0===e.result)throw new Error("Should never happen.");i.resolve(e.result)}}catch(o){o.message?n.error("Response handler '"+i.method+"' failed with message: "+o.message):n.error("Response handler '"+i.method+"' failed unexpectedly.")}}}}(e):function(e){if(e){n.error("Received message which is neither a response nor a notification message:\n"+JSON.stringify(e,null,4));var t=e;if(a.string(t.id)||a.number(t.id)){var i=String(t.id),o=x[i];o&&o.reject(new Error("The received response has neither a result nor an error property."))}}else n.error("Received empty message.")}(e)}finally{H()}}}()})))}e.onClose(B),e.onError((function(e){E.fire([e,void 0,void 0])})),t.onClose(B),t.onError((function(e){E.fire(e)}));var V=function(e){try{if(u.isNotificationMessage(e)&&e.method===f.type.method){var n=R(e.params.id),o=N.get(n);if(u.isRequestMessage(o)){var r=i&&i.cancelUndispatched?i.cancelUndispatched(o,P):void 0;if(r&&(void 0!==r.error||void 0!==r.result))return N.delete(n),r.id=o.id,U(r,e.method,Date.now()),void t.write(r)}}!function(e,t){var n;u.isRequestMessage(t)?e.set(R(t.id),t):u.isResponseMessage(t)?e.set(null===(n=t.id)?"res-unknown-"+(++w).toString():"res-"+n.toString(),t):e.set("not-"+(++c).toString(),t)}(N,e)}finally{H()}};function U(e,t,n){if(k!==p.Off&&s){var i=void 0;k===p.Verbose&&(e.error&&e.error.data?i="Error data: "+JSON.stringify(e.error.data,null,4)+"\n\n":e.result?i="Result: "+JSON.stringify(e.result,null,4)+"\n\n":void 0===e.error&&(i="No result returned.\n\n")),s.log("Sending response '"+t+" - ("+e.id+")'. Processing request took "+(Date.now()-n)+"ms",i)}}function Y(){if(W())throw new _(v.Closed,"Connection is closed.");if(F())throw new _(v.Disposed,"Connection is disposed.")}function Z(e){return void 0===e?null:e}function G(e,t){var n,i=e.numberOfParams;switch(i){case 0:n=null;break;case 1:n=Z(t[0]);break;default:n=[];for(var o=0;o=t.length)t.copy(this.buffer,this.index,0,t.length);else{var r=(Math.ceil((this.index+t.length)/u)+1)*u;0===this.index?(this.buffer=new o(r),t.copy(this.buffer,0,0,t.length)):this.buffer=o.concat([this.buffer.slice(0,this.index),t],r)}this.index+=t.length},e.prototype.tryReadHeaders=function(){for(var e=void 0,t=0;t+3=this.index)return e;e=Object.create(null),this.buffer.toString("ascii",0,t).split("\r\n").forEach((function(t){var n=t.indexOf(":");if(-1===n)throw new Error("Message header must separate key and value using :");var i=t.substr(0,n),o=t.substr(n+1).trim();e[i]=o}));var n=t+4;return this.buffer=this.buffer.slice(n),this.index=this.index-n,e},e.prototype.tryReadContent=function(e){if(this.index0&&t.doWriteMessage(t.queue.shift())})))}catch(t){this.errorCount++,this.fireError(t,e,this.errorCount)}},t}(c);t.IPCMessageWriter=d;var f=function(e){function t(t,n){void 0===n&&(n="utf8");var i=e.call(this)||this;return i.socket=t,i.queue=[],i.sending=!1,i.encoding=n,i.errorCount=0,i.socket.on("error",(function(e){return i.fireError(e)})),i.socket.on("close",(function(){return i.fireClose()})),i}return r(t,e),t.prototype.write=function(e){this.sending||0!==this.queue.length?this.queue.push(e):this.doWriteMessage(e)},t.prototype.doWriteMessage=function(e){var t=this,n=JSON.stringify(e),i=o.byteLength(n,this.encoding),r=[u,i.toString(),l,l];try{this.sending=!0,this.socket.write(r.join(""),"ascii",(function(i){i&&t.handleError(i,e);try{t.socket.write(n,t.encoding,(function(n){t.sending=!1,n?t.handleError(n,e):t.errorCount=0,t.queue.length>0&&t.doWriteMessage(t.queue.shift())}))}catch(i){t.handleError(i,e)}}))}catch(t){this.handleError(t,e)}},t.prototype.handleError=function(e,t){this.errorCount++,this.fireError(e,t,this.errorCount)},t}(c);t.SocketMessageWriter=f},7633:function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var r,s=n(7145);!function(e){e.ParseError=-32700,e.InvalidRequest=-32600,e.MethodNotFound=-32601,e.InvalidParams=-32602,e.InternalError=-32603,e.serverErrorStart=-32099,e.serverErrorEnd=-32e3,e.ServerNotInitialized=-32002,e.UnknownErrorCode=-32001,e.RequestCancelled=-32800,e.MessageWriteError=1,e.MessageReadError=2}(r=t.ErrorCodes||(t.ErrorCodes={}));var a=function(e){function t(n,i,o){var a=e.call(this,i)||this;return a.code=s.number(n)?n:r.UnknownErrorCode,a.data=o,Object.setPrototypeOf(a,t.prototype),a}return o(t,e),t.prototype.toJson=function(){return{code:this.code,message:this.message,data:this.data}},t}(Error);t.ResponseError=a;var u=function(){function e(e,t){this._method=e,this._numberOfParams=t}return Object.defineProperty(e.prototype,"method",{get:function(){return this._method},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"numberOfParams",{get:function(){return this._numberOfParams},enumerable:!0,configurable:!0}),e}();t.AbstractMessageType=u;var l=function(e){function t(t){var n=e.call(this,t,0)||this;return n._=void 0,n}return o(t,e),t}(u);t.RequestType0=l;var c=function(e){function t(t){var n=e.call(this,t,1)||this;return n._=void 0,n}return o(t,e),t}(u);t.RequestType=c;var h=function(e){function t(t){var n=e.call(this,t,1)||this;return n._=void 0,n}return o(t,e),t}(u);t.RequestType1=h;var d=function(e){function t(t){var n=e.call(this,t,2)||this;return n._=void 0,n}return o(t,e),t}(u);t.RequestType2=d;var f=function(e){function t(t){var n=e.call(this,t,3)||this;return n._=void 0,n}return o(t,e),t}(u);t.RequestType3=f;var p=function(e){function t(t){var n=e.call(this,t,4)||this;return n._=void 0,n}return o(t,e),t}(u);t.RequestType4=p;var g=function(e){function t(t){var n=e.call(this,t,5)||this;return n._=void 0,n}return o(t,e),t}(u);t.RequestType5=g;var m=function(e){function t(t){var n=e.call(this,t,6)||this;return n._=void 0,n}return o(t,e),t}(u);t.RequestType6=m;var v=function(e){function t(t){var n=e.call(this,t,7)||this;return n._=void 0,n}return o(t,e),t}(u);t.RequestType7=v;var y=function(e){function t(t){var n=e.call(this,t,8)||this;return n._=void 0,n}return o(t,e),t}(u);t.RequestType8=y;var b=function(e){function t(t){var n=e.call(this,t,9)||this;return n._=void 0,n}return o(t,e),t}(u);t.RequestType9=b;var _=function(e){function t(t){var n=e.call(this,t,1)||this;return n._=void 0,n}return o(t,e),t}(u);t.NotificationType=_;var w=function(e){function t(t){var n=e.call(this,t,0)||this;return n._=void 0,n}return o(t,e),t}(u);t.NotificationType0=w;var M=function(e){function t(t){var n=e.call(this,t,1)||this;return n._=void 0,n}return o(t,e),t}(u);t.NotificationType1=M;var C=function(e){function t(t){var n=e.call(this,t,2)||this;return n._=void 0,n}return o(t,e),t}(u);t.NotificationType2=C;var S=function(e){function t(t){var n=e.call(this,t,3)||this;return n._=void 0,n}return o(t,e),t}(u);t.NotificationType3=S;var L=function(e){function t(t){var n=e.call(this,t,4)||this;return n._=void 0,n}return o(t,e),t}(u);t.NotificationType4=L;var I=function(e){function t(t){var n=e.call(this,t,5)||this;return n._=void 0,n}return o(t,e),t}(u);t.NotificationType5=I;var N=function(e){function t(t){var n=e.call(this,t,6)||this;return n._=void 0,n}return o(t,e),t}(u);t.NotificationType6=N;var x=function(e){function t(t){var n=e.call(this,t,7)||this;return n._=void 0,n}return o(t,e),t}(u);t.NotificationType7=x;var D=function(e){function t(t){var n=e.call(this,t,8)||this;return n._=void 0,n}return o(t,e),t}(u);t.NotificationType8=D;var k=function(e){function t(t){var n=e.call(this,t,9)||this;return n._=void 0,n}return o(t,e),t}(u);t.NotificationType9=k,t.isRequestMessage=function(e){var t=e;return t&&s.string(t.method)&&(s.string(t.id)||s.number(t.id))},t.isNotificationMessage=function(e){var t=e;return t&&s.string(t.method)&&void 0===e.id},t.isResponseMessage=function(e){var t=e;return t&&(void 0!==t.result||!!t.error)&&(s.string(t.id)||s.number(t.id)||null===t.id)}},2262:(e,t,n)=>{"use strict";var i=n(8957);Object.defineProperty(t,"__esModule",{value:!0});var o=n(4708),r=n(2935),s=n(5314),a=n(8849),u=n(8125),l=n(5417);t.generateRandomPipeName=function(){var e=s.randomBytes(21).toString("hex");return"win32"===i.platform?"\\\\.\\pipe\\vscode-jsonrpc-"+e+"-sock":o.join(r.tmpdir(),"vscode-"+e+".sock")},t.createClientPipeTransport=function(e,t){var n;void 0===t&&(t="utf-8");var i=new Promise((function(e,t){n=e}));return new Promise((function(o,r){var s=a.createServer((function(e){s.close(),n([new u.SocketMessageReader(e,t),new l.SocketMessageWriter(e,t)])}));s.on("error",r),s.listen(e,(function(){s.removeListener("error",r),o({onConnected:function(){return i}})}))}))},t.createServerPipeTransport=function(e,t){void 0===t&&(t="utf-8");var n=a.createConnection(e);return[new u.SocketMessageReader(n,t),new l.SocketMessageWriter(n,t)]}},2081:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(8849),o=n(8125),r=n(5417);t.createClientSocketTransport=function(e,t){var n;void 0===t&&(t="utf-8");var s=new Promise((function(e,t){n=e}));return new Promise((function(a,u){var l=i.createServer((function(e){l.close(),n([new o.SocketMessageReader(e,t),new r.SocketMessageWriter(e,t)])}));l.on("error",u),l.listen(e,"127.0.0.1",(function(){l.removeListener("error",u),a({onConnected:function(){return s}})}))}))},t.createServerSocketTransport=function(e,t){void 0===t&&(t="utf-8");var n=i.createConnection(e,"127.0.0.1");return[new o.SocketMessageReader(n,t),new r.SocketMessageWriter(n,t)]}},918:(e,t,n)=>{var i=n(5358);"string"==typeof i&&(i=[[e.id,i,""]]);n(650)(i,{hmr:!0,transform:void 0,insertInto:void 0}),i.locals&&(e.exports=i.locals)},3021:(e,t,n)=>{var i=n(7461);"string"==typeof i&&(i=[[e.id,i,""]]);n(650)(i,{hmr:!0,transform:void 0,insertInto:void 0}),i.locals&&(e.exports=i.locals)},7269:(e,t,n)=>{var i=n(6909);"string"==typeof i&&(i=[[e.id,i,""]]);n(650)(i,{hmr:!0,transform:void 0,insertInto:void 0}),i.locals&&(e.exports=i.locals)},2773:(e,t,n)=>{var i=n(7213);"string"==typeof i&&(i=[[e.id,i,""]]);n(650)(i,{hmr:!0,transform:void 0,insertInto:void 0}),i.locals&&(e.exports=i.locals)},3009:(e,t,n)=>{var i=n(5865);"string"==typeof i&&(i=[[e.id,i,""]]);n(650)(i,{hmr:!0,transform:void 0,insertInto:void 0}),i.locals&&(e.exports=i.locals)},2215:(e,t,n)=>{var i=n(7519);"string"==typeof i&&(i=[[e.id,i,""]]);n(650)(i,{hmr:!0,transform:void 0,insertInto:void 0}),i.locals&&(e.exports=i.locals)},4065:(e,t,n)=>{var i=n(7801);"string"==typeof i&&(i=[[e.id,i,""]]);n(650)(i,{hmr:!0,transform:void 0,insertInto:void 0}),i.locals&&(e.exports=i.locals)},4954:(e,t,n)=>{var i=n(6930);"string"==typeof i&&(i=[[e.id,i,""]]);n(650)(i,{hmr:!0,transform:void 0,insertInto:void 0}),i.locals&&(e.exports=i.locals)},4445:(e,t,n)=>{var i=n(8197);"string"==typeof i&&(i=[[e.id,i,""]]);n(650)(i,{hmr:!0,transform:void 0,insertInto:void 0}),i.locals&&(e.exports=i.locals)},2269:(e,t,n)=>{var i=n(8757);"string"==typeof i&&(i=[[e.id,i,""]]);n(650)(i,{hmr:!0,transform:void 0,insertInto:void 0}),i.locals&&(e.exports=i.locals)},2701:(e,t,n)=>{var i=n(8389);"string"==typeof i&&(i=[[e.id,i,""]]);n(650)(i,{hmr:!0,transform:void 0,insertInto:void 0}),i.locals&&(e.exports=i.locals)},9087:(e,t,n)=>{var i=n(5799);"string"==typeof i&&(i=[[e.id,i,""]]);n(650)(i,{hmr:!0,transform:void 0,insertInto:void 0}),i.locals&&(e.exports=i.locals)},437:(e,t,n)=>{var i=n(5245);"string"==typeof i&&(i=[[e.id,i,""]]);n(650)(i,{hmr:!0,transform:void 0,insertInto:void 0}),i.locals&&(e.exports=i.locals)},1825:(e,t,n)=>{var i=n(6953);"string"==typeof i&&(i=[[e.id,i,""]]);n(650)(i,{hmr:!0,transform:void 0,insertInto:void 0}),i.locals&&(e.exports=i.locals)},7297:(e,t,n)=>{var i=n(297);"string"==typeof i&&(i=[[e.id,i,""]]);n(650)(i,{hmr:!0,transform:void 0,insertInto:void 0}),i.locals&&(e.exports=i.locals)},1189:(e,t,n)=>{var i=n(9453);"string"==typeof i&&(i=[[e.id,i,""]]);n(650)(i,{hmr:!0,transform:void 0,insertInto:void 0}),i.locals&&(e.exports=i.locals)},6173:(e,t,n)=>{var i=n(6565);"string"==typeof i&&(i=[[e.id,i,""]]);n(650)(i,{hmr:!0,transform:void 0,insertInto:void 0}),i.locals&&(e.exports=i.locals)},461:(e,t,n)=>{var i=n(7653);"string"==typeof i&&(i=[[e.id,i,""]]);n(650)(i,{hmr:!0,transform:void 0,insertInto:void 0}),i.locals&&(e.exports=i.locals)},1848:(e,t,n)=>{var i=n(5728);"string"==typeof i&&(i=[[e.id,i,""]]);n(650)(i,{hmr:!0,transform:void 0,insertInto:void 0}),i.locals&&(e.exports=i.locals)},4188:(e,t,n)=>{var i=n(5700);"string"==typeof i&&(i=[[e.id,i,""]]);n(650)(i,{hmr:!0,transform:void 0,insertInto:void 0}),i.locals&&(e.exports=i.locals)},7052:(e,t,n)=>{var i=n(3956);"string"==typeof i&&(i=[[e.id,i,""]]);n(650)(i,{hmr:!0,transform:void 0,insertInto:void 0}),i.locals&&(e.exports=i.locals)},2612:(e,t,n)=>{var i=n(780);"string"==typeof i&&(i=[[e.id,i,""]]);n(650)(i,{hmr:!0,transform:void 0,insertInto:void 0}),i.locals&&(e.exports=i.locals)},9632:(e,t,n)=>{var i=n(4488);"string"==typeof i&&(i=[[e.id,i,""]]);n(650)(i,{hmr:!0,transform:void 0,insertInto:void 0}),i.locals&&(e.exports=i.locals)},6452:(e,t,n)=>{var i=n(4796);"string"==typeof i&&(i=[[e.id,i,""]]);n(650)(i,{hmr:!0,transform:void 0,insertInto:void 0}),i.locals&&(e.exports=i.locals)},1192:(e,t,n)=>{var i=n(704);"string"==typeof i&&(i=[[e.id,i,""]]);n(650)(i,{hmr:!0,transform:void 0,insertInto:void 0}),i.locals&&(e.exports=i.locals)},3721:(e,t,n)=>{var i=n(9425);"string"==typeof i&&(i=[[e.id,i,""]]);n(650)(i,{hmr:!0,transform:void 0,insertInto:void 0}),i.locals&&(e.exports=i.locals)},9062:(e,t,n)=>{var i=n(2270);"string"==typeof i&&(i=[[e.id,i,""]]);n(650)(i,{hmr:!0,transform:void 0,insertInto:void 0}),i.locals&&(e.exports=i.locals)},4504:(e,t,n)=>{var i=n(4464);"string"==typeof i&&(i=[[e.id,i,""]]);n(650)(i,{hmr:!0,transform:void 0,insertInto:void 0}),i.locals&&(e.exports=i.locals)},5620:(e,t,n)=>{var i=n(8444);"string"==typeof i&&(i=[[e.id,i,""]]);n(650)(i,{hmr:!0,transform:void 0,insertInto:void 0}),i.locals&&(e.exports=i.locals)},4480:(e,t,n)=>{var i=n(9512);"string"==typeof i&&(i=[[e.id,i,""]]);n(650)(i,{hmr:!0,transform:void 0,insertInto:void 0}),i.locals&&(e.exports=i.locals)},9964:(e,t,n)=>{var i=n(7508);"string"==typeof i&&(i=[[e.id,i,""]]);n(650)(i,{hmr:!0,transform:void 0,insertInto:void 0}),i.locals&&(e.exports=i.locals)},1492:(e,t,n)=>{var i=n(6044);"string"==typeof i&&(i=[[e.id,i,""]]);n(650)(i,{hmr:!0,transform:void 0,insertInto:void 0}),i.locals&&(e.exports=i.locals)},2108:(e,t,n)=>{var i=n(9412);"string"==typeof i&&(i=[[e.id,i,""]]);n(650)(i,{hmr:!0,transform:void 0,insertInto:void 0}),i.locals&&(e.exports=i.locals)},4256:(e,t,n)=>{var i=n(9432);"string"==typeof i&&(i=[[e.id,i,""]]);n(650)(i,{hmr:!0,transform:void 0,insertInto:void 0}),i.locals&&(e.exports=i.locals)},5549:(e,t,n)=>{var i=n(6117);"string"==typeof i&&(i=[[e.id,i,""]]);n(650)(i,{hmr:!0,transform:void 0,insertInto:void 0}),i.locals&&(e.exports=i.locals)},4374:(e,t,n)=>{var i=n(4238);"string"==typeof i&&(i=[[e.id,i,""]]);n(650)(i,{hmr:!0,transform:void 0,insertInto:void 0}),i.locals&&(e.exports=i.locals)},9268:(e,t,n)=>{var i=n(2076);"string"==typeof i&&(i=[[e.id,i,""]]);n(650)(i,{hmr:!0,transform:void 0,insertInto:void 0}),i.locals&&(e.exports=i.locals)},8189:(e,t,n)=>{var i=n(5701);"string"==typeof i&&(i=[[e.id,i,""]]);n(650)(i,{hmr:!0,transform:void 0,insertInto:void 0}),i.locals&&(e.exports=i.locals)},8165:(e,t,n)=>{var i=n(8845);"string"==typeof i&&(i=[[e.id,i,""]]);n(650)(i,{hmr:!0,transform:void 0,insertInto:void 0}),i.locals&&(e.exports=i.locals)},8401:(e,t,n)=>{var i=n(7753);"string"==typeof i&&(i=[[e.id,i,""]]);n(650)(i,{hmr:!0,transform:void 0,insertInto:void 0}),i.locals&&(e.exports=i.locals)},6315:(e,t,n)=>{var i=n(531);"string"==typeof i&&(i=[[e.id,i,""]]);n(650)(i,{hmr:!0,transform:void 0,insertInto:void 0}),i.locals&&(e.exports=i.locals)},3465:(e,t,n)=>{var i=n(6897);"string"==typeof i&&(i=[[e.id,i,""]]);n(650)(i,{hmr:!0,transform:void 0,insertInto:void 0}),i.locals&&(e.exports=i.locals)},729:(e,t,n)=>{var i=n(4945);"string"==typeof i&&(i=[[e.id,i,""]]);n(650)(i,{hmr:!0,transform:void 0,insertInto:void 0}),i.locals&&(e.exports=i.locals)},7853:(e,t,n)=>{var i=n(9957);"string"==typeof i&&(i=[[e.id,i,""]]);n(650)(i,{hmr:!0,transform:void 0,insertInto:void 0}),i.locals&&(e.exports=i.locals)},9925:(e,t,n)=>{var i=n(4701);"string"==typeof i&&(i=[[e.id,i,""]]);n(650)(i,{hmr:!0,transform:void 0,insertInto:void 0}),i.locals&&(e.exports=i.locals)},9501:(e,t,n)=>{var i=n(9333);"string"==typeof i&&(i=[[e.id,i,""]]);n(650)(i,{hmr:!0,transform:void 0,insertInto:void 0}),i.locals&&(e.exports=i.locals)},9114:(e,t,n)=>{var i=n(7490);"string"==typeof i&&(i=[[e.id,i,""]]);n(650)(i,{hmr:!0,transform:void 0,insertInto:void 0}),i.locals&&(e.exports=i.locals)},7609:(e,t,n)=>{var i=n(561);"string"==typeof i&&(i=[[e.id,i,""]]);n(650)(i,{hmr:!0,transform:void 0,insertInto:void 0}),i.locals&&(e.exports=i.locals)},541:(e,t,n)=>{var i=n(4053);"string"==typeof i&&(i=[[e.id,i,""]]);n(650)(i,{hmr:!0,transform:void 0,insertInto:void 0}),i.locals&&(e.exports=i.locals)},7313:(e,t,n)=>{var i=n(7913);"string"==typeof i&&(i=[[e.id,i,""]]);n(650)(i,{hmr:!0,transform:void 0,insertInto:void 0}),i.locals&&(e.exports=i.locals)},7445:(e,t,n)=>{var i=n(7181);"string"==typeof i&&(i=[[e.id,i,""]]);n(650)(i,{hmr:!0,transform:void 0,insertInto:void 0}),i.locals&&(e.exports=i.locals)},8521:(e,t,n)=>{var i=n(4737);"string"==typeof i&&(i=[[e.id,i,""]]);n(650)(i,{hmr:!0,transform:void 0,insertInto:void 0}),i.locals&&(e.exports=i.locals)},2029:(e,t,n)=>{var i=n(1445);"string"==typeof i&&(i=[[e.id,i,""]]);n(650)(i,{hmr:!0,transform:void 0,insertInto:void 0}),i.locals&&(e.exports=i.locals)},8605:(e,t,n)=>{var i=n(293);"string"==typeof i&&(i=[[e.id,i,""]]);n(650)(i,{hmr:!0,transform:void 0,insertInto:void 0}),i.locals&&(e.exports=i.locals)},4175:(e,t,n)=>{var i=n(3159);"string"==typeof i&&(i=[[e.id,i,""]]);n(650)(i,{hmr:!0,transform:void 0,insertInto:void 0}),i.locals&&(e.exports=i.locals)},1417:(e,t,n)=>{var i=n(6993);"string"==typeof i&&(i=[[e.id,i,""]]);n(650)(i,{hmr:!0,transform:void 0,insertInto:void 0}),i.locals&&(e.exports=i.locals)},9928:(e,t,n)=>{var i=n(3376);"string"==typeof i&&(i=[[e.id,i,""]]);n(650)(i,{hmr:!0,transform:void 0,insertInto:void 0}),i.locals&&(e.exports=i.locals)},8523:(e,t,n)=>{var i=n(579);"string"==typeof i&&(i=[[e.id,i,""]]);n(650)(i,{hmr:!0,transform:void 0,insertInto:void 0}),i.locals&&(e.exports=i.locals)},5676:(e,t,n)=>{var i=n(4900);"string"==typeof i&&(i=[[e.id,i,""]]);n(650)(i,{hmr:!0,transform:void 0,insertInto:void 0}),i.locals&&(e.exports=i.locals)},7946:(e,t,n)=>{var i=n(5762);"string"==typeof i&&(i=[[e.id,i,""]]);n(650)(i,{hmr:!0,transform:void 0,insertInto:void 0}),i.locals&&(e.exports=i.locals)},6336:(e,t,n)=>{var i=n(9528);"string"==typeof i&&(i=[[e.id,i,""]]);n(650)(i,{hmr:!0,transform:void 0,insertInto:void 0}),i.locals&&(e.exports=i.locals)},2114:(e,t,n)=>{var i=n(6394);"string"==typeof i&&(i=[[e.id,i,""]]);n(650)(i,{hmr:!0,transform:void 0,insertInto:void 0}),i.locals&&(e.exports=i.locals)},9176:(e,t,n)=>{var i=n(4576);"string"==typeof i&&(i=[[e.id,i,""]]);n(650)(i,{hmr:!0,transform:void 0,insertInto:void 0}),i.locals&&(e.exports=i.locals)},1121:(e,t,n)=>{var i=n(1129);"string"==typeof i&&(i=[[e.id,i,""]]);n(650)(i,{hmr:!0,transform:void 0,insertInto:void 0}),i.locals&&(e.exports=i.locals)},7512:(e,t,n)=>{var i=n(2368);"string"==typeof i&&(i=[[e.id,i,""]]);n(650)(i,{hmr:!0,transform:void 0,insertInto:void 0}),i.locals&&(e.exports=i.locals)},8982:()=>{},5409:()=>{},3776:()=>{},7965:()=>{},6089:()=>{},9368:()=>{},4688:()=>{},8489:()=>{},1069:()=>{},5340:()=>{},9838:()=>{},3779:()=>{},9580:()=>{},2922:()=>{},8849:()=>{},873:(e,t,n)=>{"use strict";n.r(t),n.d(t,{DefaultRubyVM:()=>T});class i{static read_bytes(e,t){const n=new i;return n.buf=e.getUint32(t,!0),n.buf_len=e.getUint32(t+4,!0),n}static read_bytes_array(e,t,n){const o=[];for(let r=0;r{}}(void 0===e||e,this.prefix)}get enabled(){return this.isEnabled}constructor(e){this.isEnabled=e,this.prefix="wasi:",this.enable(e)}}(!1);class s extends Error{constructor(e){super("exit with exit code "+e),this.code=e}}let a=class{start(e){this.inst=e;try{return e.exports._start(),0}catch(e){if(e instanceof s)return e.code;throw e}}initialize(e){this.inst=e,e.exports._initialize&&e.exports._initialize()}constructor(e,t,n,a={}){this.args=[],this.env=[],this.fds=[],r.enable(a.debug),this.args=e,this.env=t,this.fds=n;const u=this;this.wasiImport={args_sizes_get(e,t){const n=new DataView(u.inst.exports.memory.buffer);n.setUint32(e,u.args.length,!0);let i=0;for(const e of u.args)i+=e.length+1;return n.setUint32(t,i,!0),r.log(n.getUint32(e,!0),n.getUint32(t,!0)),0},args_get(e,t){const n=new DataView(u.inst.exports.memory.buffer),i=new Uint8Array(u.inst.exports.memory.buffer),o=t;for(let o=0;onull!=u.fds[e]?0:8,fd_allocate:(e,t,n)=>null!=u.fds[e]?u.fds[e].fd_allocate(t,n):8,fd_close(e){if(null!=u.fds[e]){const t=u.fds[e].fd_close();return u.fds[e]=void 0,t}return 8},fd_datasync:e=>null!=u.fds[e]?u.fds[e].fd_sync():8,fd_fdstat_get(e,t){if(null!=u.fds[e]){const{ret:n,fdstat:i}=u.fds[e].fd_fdstat_get();return null!=i&&i.write_bytes(new DataView(u.inst.exports.memory.buffer),t),n}return 8},fd_fdstat_set_flags:(e,t)=>null!=u.fds[e]?u.fds[e].fd_fdstat_set_flags(t):8,fd_fdstat_set_rights:(e,t,n)=>null!=u.fds[e]?u.fds[e].fd_fdstat_set_rights(t,n):8,fd_filestat_get(e,t){if(null!=u.fds[e]){const{ret:n,filestat:i}=u.fds[e].fd_filestat_get();return null!=i&&i.write_bytes(new DataView(u.inst.exports.memory.buffer),t),n}return 8},fd_filestat_set_size:(e,t)=>null!=u.fds[e]?u.fds[e].fd_filestat_set_size(t):8,fd_filestat_set_times:(e,t,n,i)=>null!=u.fds[e]?u.fds[e].fd_filestat_set_times(t,n,i):8,fd_pread(e,t,n,o,r){const s=new DataView(u.inst.exports.memory.buffer),a=new Uint8Array(u.inst.exports.memory.buffer);if(null!=u.fds[e]){const l=i.read_bytes_array(s,t,n);let c=0;for(const t of l){const{ret:n,data:i}=u.fds[e].fd_pread(t.buf_len,o);if(0!=n)return s.setUint32(r,c,!0),n;if(a.set(i,t.buf),c+=i.length,o+=BigInt(i.length),i.length!=t.buf_len)break}return s.setUint32(r,c,!0),0}return 8},fd_prestat_get(e,t){const n=new DataView(u.inst.exports.memory.buffer);if(null!=u.fds[e]){const{ret:i,prestat:o}=u.fds[e].fd_prestat_get();return null!=o&&o.write_bytes(n,t),i}return 8},fd_prestat_dir_name(e,t,n){if(null!=u.fds[e]){const{ret:i,prestat:o}=u.fds[e].fd_prestat_get();if(null==o)return i;const r=o.inner.pr_name;return new Uint8Array(u.inst.exports.memory.buffer).set(r.slice(0,n),t),r.byteLength>n?37:0}return 8},fd_pwrite(e,t,n,i,r){const s=new DataView(u.inst.exports.memory.buffer),a=new Uint8Array(u.inst.exports.memory.buffer);if(null!=u.fds[e]){const l=o.read_bytes_array(s,t,n);let c=0;for(const t of l){const n=a.slice(t.buf,t.buf+t.buf_len),{ret:o,nwritten:l}=u.fds[e].fd_pwrite(n,i);if(0!=o)return s.setUint32(r,c,!0),o;if(c+=l,i+=BigInt(l),l!=n.byteLength)break}return s.setUint32(r,c,!0),0}return 8},fd_read(e,t,n,o){const r=new DataView(u.inst.exports.memory.buffer),s=new Uint8Array(u.inst.exports.memory.buffer);if(null!=u.fds[e]){const a=i.read_bytes_array(r,t,n);let l=0;for(const t of a){const{ret:n,data:i}=u.fds[e].fd_read(t.buf_len);if(0!=n)return r.setUint32(o,l,!0),n;if(s.set(i,t.buf),l+=i.length,i.length!=t.buf_len)break}return r.setUint32(o,l,!0),0}return 8},fd_readdir(e,t,n,i,o){const r=new DataView(u.inst.exports.memory.buffer),s=new Uint8Array(u.inst.exports.memory.buffer);if(null!=u.fds[e]){let a=0;for(;;){const{ret:l,dirent:c}=u.fds[e].fd_readdir_single(i);if(0!=l)return r.setUint32(o,a,!0),l;if(null==c)break;if(n-anull!=u.fds[e]?u.fds[e].fd_sync():8,fd_tell(e,t){const n=new DataView(u.inst.exports.memory.buffer);if(null!=u.fds[e]){const{ret:i,offset:o}=u.fds[e].fd_tell();return n.setBigUint64(t,o,!0),i}return 8},fd_write(e,t,n,i){const r=new DataView(u.inst.exports.memory.buffer),s=new Uint8Array(u.inst.exports.memory.buffer);if(null!=u.fds[e]){const a=o.read_bytes_array(r,t,n);let l=0;for(const t of a){const n=s.slice(t.buf,t.buf+t.buf_len),{ret:o,nwritten:a}=u.fds[e].fd_write(n);if(0!=o)return r.setUint32(i,l,!0),o;if(l+=a,a!=n.byteLength)break}return r.setUint32(i,l,!0),0}return 8},path_create_directory(e,t,n){const i=new Uint8Array(u.inst.exports.memory.buffer);if(null!=u.fds[e]){const o=new TextDecoder("utf-8").decode(i.slice(t,t+n));return u.fds[e].path_create_directory(o)}return 8},path_filestat_get(e,t,n,i,o){const r=new DataView(u.inst.exports.memory.buffer),s=new Uint8Array(u.inst.exports.memory.buffer);if(null!=u.fds[e]){const a=new TextDecoder("utf-8").decode(s.slice(n,n+i)),{ret:l,filestat:c}=u.fds[e].path_filestat_get(t,a);return null!=c&&c.write_bytes(r,o),l}return 8},path_filestat_set_times(e,t,n,i,o,r,s){const a=new Uint8Array(u.inst.exports.memory.buffer);if(null!=u.fds[e]){const l=new TextDecoder("utf-8").decode(a.slice(n,n+i));return u.fds[e].path_filestat_set_times(t,l,o,r,s)}return 8},path_link(e,t,n,i,o,r,s){const a=new Uint8Array(u.inst.exports.memory.buffer);if(null!=u.fds[e]&&null!=u.fds[o]){const l=new TextDecoder("utf-8").decode(a.slice(n,n+i)),c=new TextDecoder("utf-8").decode(a.slice(r,r+s)),{ret:h,inode_obj:d}=u.fds[e].path_lookup(l,t);return null==d?h:u.fds[o].path_link(c,d,!1)}return 8},path_open(e,t,n,i,o,s,a,l,c){const h=new DataView(u.inst.exports.memory.buffer),d=new Uint8Array(u.inst.exports.memory.buffer);if(null!=u.fds[e]){const f=new TextDecoder("utf-8").decode(d.slice(n,n+i));r.log(f);const{ret:p,fd_obj:g}=u.fds[e].path_open(t,f,o,s,a,l);if(0!=p)return p;u.fds.push(g);const m=u.fds.length-1;return h.setUint32(c,m,!0),0}return 8},path_readlink(e,t,n,i,o,s){const a=new DataView(u.inst.exports.memory.buffer),l=new Uint8Array(u.inst.exports.memory.buffer);if(null!=u.fds[e]){const c=new TextDecoder("utf-8").decode(l.slice(t,t+n));r.log(c);const{ret:h,data:d}=u.fds[e].path_readlink(c);if(null!=d){const e=(new TextEncoder).encode(d);if(e.length>o)return a.setUint32(s,0,!0),8;l.set(e,i),a.setUint32(s,e.length,!0)}return h}return 8},path_remove_directory(e,t,n){const i=new Uint8Array(u.inst.exports.memory.buffer);if(null!=u.fds[e]){const o=new TextDecoder("utf-8").decode(i.slice(t,t+n));return u.fds[e].path_remove_directory(o)}return 8},path_rename(e,t,n,i,o,r){const s=new Uint8Array(u.inst.exports.memory.buffer);if(null!=u.fds[e]&&null!=u.fds[i]){const a=new TextDecoder("utf-8").decode(s.slice(t,t+n)),l=new TextDecoder("utf-8").decode(s.slice(o,o+r));let{ret:c,inode_obj:h}=u.fds[e].path_unlink(a);if(null==h)return c;if(c=u.fds[i].path_link(l,h,!0),0!=c&&0!=u.fds[e].path_link(a,h,!0))throw"path_link should always return success when relinking an inode back to the original place";return c}return 8},path_symlink(e,t,n,i,o){const r=new Uint8Array(u.inst.exports.memory.buffer);return null!=u.fds[n]?(new TextDecoder("utf-8").decode(r.slice(e,e+t)),new TextDecoder("utf-8").decode(r.slice(i,i+o)),58):8},path_unlink_file(e,t,n){const i=new Uint8Array(u.inst.exports.memory.buffer);if(null!=u.fds[e]){const o=new TextDecoder("utf-8").decode(i.slice(t,t+n));return u.fds[e].path_unlink_file(o)}return 8},poll_oneoff(e,t,n){throw"async io not supported"},proc_exit(e){throw new s(e)},proc_raise(e){throw"raised signal "+e},sched_yield(){},random_get(e,t){const n=new Uint8Array(u.inst.exports.memory.buffer);for(let i=0;i0;){o=t(o,i,1,i+e.length),i+=e.length;const{read:s,written:a}=h.encodeInto(e,new Uint8Array(n.buffer,o+r,i-r));r+=a,e=e.slice(s)}return i>r&&(o=t(o,i,1,r)),f=r,o}let f=0;class p{constructor(){this.list=[],this.head=0}insert(e){this.head>=this.list.length&&this.list.push({next:this.list.length+1,val:void 0});const t=this.head,n=this.list[t];return this.head=n.next,n.next=-1,n.val=e,t}get(e){if(e>=this.list.length)throw new RangeError("handle index not valid");const t=this.list[e];if(-1===t.next)return t.val;throw new RangeError("handle index not valid")}remove(e){const t=this.get(e),n=this.list[e];return n.val=void 0,n.next=this.head,this.head=e,t}}function g(){throw new RangeError("invalid variant discriminant for bool")}class m{constructor(){this._resource0_slab=new p,this._resource1_slab=new p}addToImports(e){"canonical_abi"in e||(e.canonical_abi={}),e.canonical_abi["resource_drop_rb-iseq"]=e=>{this._resource0_slab.remove(e).drop()},e.canonical_abi["resource_clone_rb-iseq"]=e=>{const t=this._resource0_slab.get(e);return this._resource0_slab.insert(t.clone())},e.canonical_abi["resource_get_rb-iseq"]=e=>this._resource0_slab.get(e)._wasm_val,e.canonical_abi["resource_new_rb-iseq"]=e=>(this._registry0,this._resource0_slab.insert(new v(e,this))),e.canonical_abi["resource_drop_rb-abi-value"]=e=>{this._resource1_slab.remove(e).drop()},e.canonical_abi["resource_clone_rb-abi-value"]=e=>{const t=this._resource1_slab.get(e);return this._resource1_slab.insert(t.clone())},e.canonical_abi["resource_get_rb-abi-value"]=e=>this._resource1_slab.get(e)._wasm_val,e.canonical_abi["resource_new_rb-abi-value"]=e=>(this._registry1,this._resource1_slab.insert(new y(e,this)))}async instantiate(e,t){if(t=t||{},this.addToImports(t),e instanceof WebAssembly.Instance)this.instance=e;else if(e instanceof WebAssembly.Module)this.instance=await WebAssembly.instantiate(e,t);else if(e instanceof ArrayBuffer||e instanceof Uint8Array){const{instance:n}=await WebAssembly.instantiate(e,t);this.instance=n}else{const{instance:n}=await WebAssembly.instantiateStreaming(e,t);this.instance=n}this._exports=this.instance.exports,this._registry0=new FinalizationRegistry(this._exports["canonical_abi_drop_rb-iseq"]),this._registry1=new FinalizationRegistry(this._exports["canonical_abi_drop_rb-abi-value"])}rubyShowVersion(){this._exports["ruby-show-version: func() -> ()"]()}rubyInit(){this._exports["ruby-init: func() -> ()"]()}rubySysinit(e){const t=this._exports.memory,n=this._exports.cabi_realloc,i=e,o=i.length,r=n(0,0,4,8*o);for(let e=0;e) -> ()"](r,o)}rubyOptions(e){const t=this._exports.memory,n=this._exports.cabi_realloc,i=e,o=i.length,r=n(0,0,4,8*o);for(let e=0;e) -> handle"](r,o);return this._resource0_slab.remove(s)}rubyScript(e){const t=this._exports.memory,n=d(e,this._exports.cabi_realloc,t),i=f;this._exports["ruby-script: func(name: string) -> ()"](n,i)}rubyInitLoadpath(){this._exports["ruby-init-loadpath: func() -> ()"]()}rbEvalStringProtect(e){const t=this._exports.memory,n=d(e,this._exports.cabi_realloc,t),i=f,o=this._exports["rb-eval-string-protect: func(str: string) -> tuple, s32>"](n,i);return[this._resource1_slab.remove(l(t).getInt32(o+0,!0)),l(t).getInt32(o+4,!0)]}rbFuncallvProtect(e,t,n){const i=this._exports.memory,o=this._exports.cabi_realloc,r=e;if(!(r instanceof y))throw new TypeError("expected instance of RbAbiValue");const s=n,a=s.length,u=o(0,0,4,4*a);for(let e=0;e, mid: u32, args: list>) -> tuple, s32>"](this._resource1_slab.insert(r.clone()),t>>>0,u,a);return[this._resource1_slab.remove(l(i).getInt32(c+0,!0)),l(i).getInt32(c+4,!0)]}rbIntern(e){const t=this._exports.memory,n=d(e,this._exports.cabi_realloc,t),i=f;return this._exports["rb-intern: func(name: string) -> u32"](n,i)>>>0}rbErrinfo(){const e=this._exports["rb-errinfo: func() -> handle"]();return this._resource1_slab.remove(e)}rbClearErrinfo(){this._exports["rb-clear-errinfo: func() -> ()"]()}rstringPtr(e){const t=this._exports.memory,n=e;if(!(n instanceof y))throw new TypeError("expected instance of RbAbiValue");const i=this._exports["rstring-ptr: func(value: handle) -> string"](this._resource1_slab.insert(n.clone())),o=l(t).getInt32(i+0,!0),r=l(t).getInt32(i+4,!0),s=c.decode(new Uint8Array(t.buffer,o,r));return this._exports["cabi_post_rstring-ptr"](i),s}rbVmBugreport(){this._exports["rb-vm-bugreport: func() -> ()"]()}rbGcEnable(){const e=this._exports["rb-gc-enable: func() -> bool"]();return 0!=e&&(1==e||g())}rbGcDisable(){const e=this._exports["rb-gc-disable: func() -> bool"]();return 0!=e&&(1==e||g())}rbSetShouldProhibitRewind(e){const t=this._exports["rb-set-should-prohibit-rewind: func(new-value: bool) -> bool"](e?1:0);return 0!=t&&(1==t||g())}}class v{constructor(e,t){this._wasm_val=e,this._obj=t,this._refcnt=1,t._registry0.register(this,e,this)}clone(){return this._refcnt+=1,this}drop(){if(this._refcnt-=1,0!==this._refcnt)return;this._obj._registry0.unregister(this);const e=this._obj._exports["canonical_abi_drop_rb-iseq"],t=this._wasm_val;delete this._obj,delete this._refcnt,delete this._wasm_val,e(t)}}class y{constructor(e,t){this._wasm_val=e,this._obj=t,this._refcnt=1,t._registry1.register(this,e,this)}clone(){return this._refcnt+=1,this}drop(){if(this._refcnt-=1,0!==this._refcnt)return;this._obj._registry1.unregister(this);const e=this._obj._exports["canonical_abi_drop_rb-abi-value"],t=this._wasm_val;delete this._obj,delete this._refcnt,delete this._wasm_val,e(t)}}class b{constructor(){this.instance=null,this.interfaceState={hasJSFrameAfterRbFrame:!1},this.guest=(e=>{const t=["constructor"].concat(["addToImports","instantiate","rbSetShouldProhibitRewind","rbGcDisable","rbGcEnable"]);for(const n of Object.getOwnPropertyNames(m.prototype)){if(t.includes(n))continue;const i=e[n];"function"==typeof i&&(e[n]=(...t)=>{if(this.interfaceState.hasJSFrameAfterRbFrame){const n=this.guest.rbSetShouldProhibitRewind(!0),o=this.guest.rbGcDisable(),r=Reflect.apply(i,e,t);return this.guest.rbSetShouldProhibitRewind(n),o||this.guest.rbGcEnable(),r}return Reflect.apply(i,e,t)})}return e})(new m),this.transport=new _,this.exceptionFormatter=new C}initialize(e=["ruby.wasm","-EUTF-8","-e_=0"]){const t=e.map((e=>e+"\0"));this.guest.rubyInit(),this.guest.rubySysinit(t),this.guest.rubyOptions(t),this.eval('require "/bundle/setup"')}async setInstance(e){this.instance=e,await this.guest.instantiate(e)}addToImports(e){function t(e){return(...t)=>{try{return{tag:"success",val:e(...t)}}catch(e){if(e instanceof k)throw e;return{tag:"failure",val:e}}}}this.guest.addToImports(e),e["rb-js-abi-host"]={rb_wasm_throw_prohibit_rewind_exception:(e,t)=>{const n=this.instance.exports.memory;let i=`Ruby APIs that may rewind the VM stack are prohibited under nested VM operation (${(new TextDecoder).decode(new Uint8Array(n.buffer,e,t))})\nNested VM operation means that the call stack has sandwitched JS frames like JS -> Ruby -> JS -> Ruby caused by something like \`window.rubyVM.eval("JS.global[:rubyVM].eval('Fiber.yield')")\`\n\nPlease check your call stack and make sure that you are **not** doing any of the following inside the nested Ruby frame:\n 1. Switching fibers (e.g. Fiber#resume, Fiber.yield, and Fiber#transfer)\n Note that \`evalAsync\` JS API switches fibers internally\n 2. Raising uncaught exceptions\n Please catch all exceptions inside the nested operation\n 3. Calling Continuation APIs\n`;const o=new w(this.guest.rbErrinfo(),this,this.privateObject());throw"false"===o.call("nil?").toString()&&(i+="\n"+this.exceptionFormatter.format(o,this,this.privateObject())),new k(i)}},function(e,t,n){"rb-js-abi-host"in e||(e["rb-js-abi-host"]={}),e["rb-js-abi-host"]["eval-js: func(code: string) -> variant { success(handle), failure(handle) }"]=function(e,o,r){const s=n("memory"),a=e,u=o,h=c.decode(new Uint8Array(s.buffer,a,u)),d=t.evalJs(h);switch(d.tag){case"success":{const e=d.val;l(s).setInt8(r+0,0,!0),l(s).setInt32(r+4,i.insert(e),!0);break}case"failure":{const e=d.val;l(s).setInt8(r+0,1,!0),l(s).setInt32(r+4,i.insert(e),!0);break}default:throw new RangeError("invalid variant specified for JsAbiResult")}},e["rb-js-abi-host"]["is-js: func(value: handle) -> bool"]=function(e){return t.isJs(i.get(e))?1:0},e["rb-js-abi-host"]["instance-of: func(value: handle, klass: handle) -> bool"]=function(e,n){return t.instanceOf(i.get(e),i.get(n))?1:0},e["rb-js-abi-host"]["global-this: func() -> handle"]=function(){const e=t.globalThis();return i.insert(e)},e["rb-js-abi-host"]["int-to-js-number: func(value: s32) -> handle"]=function(e){const n=t.intToJsNumber(e);return i.insert(n)},e["rb-js-abi-host"]["float-to-js-number: func(value: float64) -> handle"]=function(e){const n=t.floatToJsNumber(e);return i.insert(n)},e["rb-js-abi-host"]["string-to-js-string: func(value: string) -> handle"]=function(e,o){const r=n("memory"),s=e,a=o,u=c.decode(new Uint8Array(r.buffer,s,a)),l=t.stringToJsString(u);return i.insert(l)},e["rb-js-abi-host"]["bool-to-js-bool: func(value: bool) -> handle"]=function(e){const n=e,o=t.boolToJsBool(0!=n&&(1==n||g()));return i.insert(o)},e["rb-js-abi-host"]["proc-to-js-function: func(value: u32) -> handle"]=function(e){const n=t.procToJsFunction(e>>>0);return i.insert(n)},e["rb-js-abi-host"]["rb-object-to-js-rb-value: func(raw-rb-abi-value: u32) -> handle"]=function(e){const n=t.rbObjectToJsRbValue(e>>>0);return i.insert(n)},e["rb-js-abi-host"]["js-value-to-string: func(value: handle) -> string"]=function(e,o){const r=n("memory"),s=n("cabi_realloc"),a=d(t.jsValueToString(i.get(e)),s,r),u=f;l(r).setInt32(o+4,u,!0),l(r).setInt32(o+0,a,!0)},e["rb-js-abi-host"]["js-value-to-integer: func(value: handle) -> variant { f64(float64), bignum(string) }"]=function(e,o){const r=n("memory"),s=n("cabi_realloc"),a=t.jsValueToInteger(i.get(e));switch(a.tag){case"f64":{const e=a.val;l(r).setInt8(o+0,0,!0),l(r).setFloat64(o+8,+e,!0);break}case"bignum":{const e=a.val;l(r).setInt8(o+0,1,!0);const t=d(e,s,r),n=f;l(r).setInt32(o+12,n,!0),l(r).setInt32(o+8,t,!0);break}default:throw new RangeError("invalid variant specified for RawInteger")}},e["rb-js-abi-host"]["export-js-value-to-host: func(value: handle) -> ()"]=function(e){t.exportJsValueToHost(i.get(e))},e["rb-js-abi-host"]["import-js-value-from-host: func() -> handle"]=function(){const e=t.importJsValueFromHost();return i.insert(e)},e["rb-js-abi-host"]["js-value-typeof: func(value: handle) -> string"]=function(e,o){const r=n("memory"),s=n("cabi_realloc"),a=d(t.jsValueTypeof(i.get(e)),s,r),u=f;l(r).setInt32(o+4,u,!0),l(r).setInt32(o+0,a,!0)},e["rb-js-abi-host"]["js-value-equal: func(lhs: handle, rhs: handle) -> bool"]=function(e,n){return t.jsValueEqual(i.get(e),i.get(n))?1:0},e["rb-js-abi-host"]["js-value-strictly-equal: func(lhs: handle, rhs: handle) -> bool"]=function(e,n){return t.jsValueStrictlyEqual(i.get(e),i.get(n))?1:0},e["rb-js-abi-host"]["reflect-apply: func(target: handle, this-argument: handle, arguments: list>) -> variant { success(handle), failure(handle) }"]=function(e,o,r,s,a){const u=n("memory"),c=s,h=r,d=[];for(let e=0;e, arguments: list>) -> handle"]=function(e,o,r){const s=n("memory"),a=r,u=o,c=[];for(let e=0;e, property-key: string) -> bool"]=function(e,o,r){const s=n("memory"),a=o,u=r,l=c.decode(new Uint8Array(s.buffer,a,u));return t.reflectDeleteProperty(i.get(e),l)?1:0},e["rb-js-abi-host"]["reflect-get: func(target: handle, property-key: string) -> variant { success(handle), failure(handle) }"]=function(e,o,r,s){const a=n("memory"),u=o,h=r,d=c.decode(new Uint8Array(a.buffer,u,h)),f=t.reflectGet(i.get(e),d);switch(f.tag){case"success":{const e=f.val;l(a).setInt8(s+0,0,!0),l(a).setInt32(s+4,i.insert(e),!0);break}case"failure":{const e=f.val;l(a).setInt8(s+0,1,!0),l(a).setInt32(s+4,i.insert(e),!0);break}default:throw new RangeError("invalid variant specified for JsAbiResult")}},e["rb-js-abi-host"]["reflect-get-own-property-descriptor: func(target: handle, property-key: string) -> handle"]=function(e,o,r){const s=n("memory"),a=o,u=r,l=c.decode(new Uint8Array(s.buffer,a,u)),h=t.reflectGetOwnPropertyDescriptor(i.get(e),l);return i.insert(h)},e["rb-js-abi-host"]["reflect-get-prototype-of: func(target: handle) -> handle"]=function(e){const n=t.reflectGetPrototypeOf(i.get(e));return i.insert(n)},e["rb-js-abi-host"]["reflect-has: func(target: handle, property-key: string) -> bool"]=function(e,o,r){const s=n("memory"),a=o,u=r,l=c.decode(new Uint8Array(s.buffer,a,u));return t.reflectHas(i.get(e),l)?1:0},e["rb-js-abi-host"]["reflect-is-extensible: func(target: handle) -> bool"]=function(e){return t.reflectIsExtensible(i.get(e))?1:0},e["rb-js-abi-host"]["reflect-own-keys: func(target: handle) -> list>"]=function(e,o){const r=n("memory"),s=n("cabi_realloc"),a=t.reflectOwnKeys(i.get(e)),u=a.length,c=s(0,0,4,4*u);for(let e=0;e) -> bool"]=function(e){return t.reflectPreventExtensions(i.get(e))?1:0},e["rb-js-abi-host"]["reflect-set: func(target: handle, property-key: string, value: handle) -> variant { success(handle), failure(handle) }"]=function(e,o,r,s,a){const u=n("memory"),h=o,d=r,f=c.decode(new Uint8Array(u.buffer,h,d)),p=t.reflectSet(i.get(e),f,i.get(s));switch(p.tag){case"success":{const e=p.val;l(u).setInt8(a+0,0,!0),l(u).setInt32(a+4,i.insert(e),!0);break}case"failure":{const e=p.val;l(u).setInt8(a+0,1,!0),l(u).setInt32(a+4,i.insert(e),!0);break}default:throw new RangeError("invalid variant specified for JsAbiResult")}},e["rb-js-abi-host"]["reflect-set-prototype-of: func(target: handle, prototype: handle) -> bool"]=function(e,n){return t.reflectSetPrototypeOf(i.get(e),i.get(n))?1:0},"canonical_abi"in e||(e.canonical_abi={});const i=new p;e.canonical_abi["resource_drop_js-abi-value"]=e=>{const n=i.remove(e);t.dropJsAbiValue&&t.dropJsAbiValue(n)}}(e,(e=>{for(const[t,n]of Object.entries(e))"function"==typeof n&&(e[t]=(...t)=>{const i=this.interfaceState.hasJSFrameAfterRbFrame;this.interfaceState.hasJSFrameAfterRbFrame=!0;const o=Reflect.apply(n,e,t);return this.interfaceState.hasJSFrameAfterRbFrame=i,o});return e})({evalJs:t((e=>Function(e)())),isJs:e=>!0,globalThis:()=>{if("undefined"!=typeof globalThis)return globalThis;if("undefined"!=typeof global)return global;if("undefined"!=typeof window)return window;throw new Error("unable to locate global object")},intToJsNumber:e=>e,floatToJsNumber:e=>e,stringToJsString:e=>e,boolToJsBool:e=>e,procToJsFunction:e=>{const t=this.rbValueOfPointer(e);return(...e)=>t.call("call",...e.map((e=>this.wrap(e)))).toJS()},rbObjectToJsRbValue:e=>this.rbValueOfPointer(e),jsValueToString:e=>String(e),jsValueToInteger:e=>"number"==typeof e?{tag:"f64",val:e}:"bigint"==typeof e?{tag:"bignum",val:BigInt(e).toString(10)+"\0"}:"string"==typeof e?{tag:"bignum",val:e+"\0"}:void 0===e?{tag:"f64",val:0}:{tag:"f64",val:Number(e)},exportJsValueToHost:e=>{this.transport.takeJsValue(e)},importJsValueFromHost:()=>this.transport.consumeJsValue(),instanceOf:(e,t)=>"function"==typeof t&&e instanceof t,jsValueTypeof:e=>typeof e,jsValueEqual:(e,t)=>e==t,jsValueStrictlyEqual:(e,t)=>e===t,reflectApply:t(((e,t,n)=>Reflect.apply(e,t,n))),reflectConstruct:function(e,t){throw new Error("Function not implemented.")},reflectDeleteProperty:function(e,t){throw new Error("Function not implemented.")},reflectGet:t(((e,t)=>e[t])),reflectGetOwnPropertyDescriptor:function(e,t){throw new Error("Function not implemented.")},reflectGetPrototypeOf:function(e){throw new Error("Function not implemented.")},reflectHas:function(e,t){throw new Error("Function not implemented.")},reflectIsExtensible:function(e){throw new Error("Function not implemented.")},reflectOwnKeys:function(e){throw new Error("Function not implemented.")},reflectPreventExtensions:function(e){throw new Error("Function not implemented.")},reflectSet:t(((e,t,n)=>Reflect.set(e,t,n))),reflectSetPrototypeOf:function(e,t){throw new Error("Function not implemented.")}}),(e=>this.instance.exports[e]))}printVersion(){this.guest.rubyShowVersion()}eval(e){return N(this,this.privateObject(),e)}evalAsync(e){const t=this.eval("require 'js'; JS");return x(this,this.privateObject(),(n=>{t.call("__eval_async_rb",this.wrap(e),n)}))}wrap(e){return this.transport.importJsValue(e,this)}privateObject(){return{transport:this.transport,exceptionFormatter:this.exceptionFormatter}}rbValueOfPointer(e){const t=new y(e,this.guest);return new w(t,this,this.privateObject())}}class _{constructor(){this._takenJsValue=null}takeJsValue(e){this._takenJsValue=e}consumeJsValue(){return this._takenJsValue}exportJsValue(e){return e.call("__export_to_js"),this._takenJsValue}importJsValue(e,t){return this._takenJsValue=e,t.eval('require "js"; JS::Object').call("__import_from_js")}}class w{constructor(e,t,n){this.inner=e,this.vm=t,this.privateObject=n}call(e,...t){const n=t.map((e=>e.inner));return new w(I(this.vm,this.privateObject,this.inner,e,n),this.vm,this.privateObject)}callAsync(e,...t){const n=this.vm.eval("require 'js'; JS");return x(this.vm,this.privateObject,(i=>{n.call("__call_async_method",this,this.vm.wrap(e),i,...t)}))}[Symbol.toPrimitive](e){return"string"===e||"default"===e?this.toString():null}toString(){const e=I(this.vm,this.privateObject,this.inner,"to_s",[]);return this.vm.guest.rstringPtr(e)}toJS(){const e=this.vm.eval("JS").call("try_convert",this);return"true"===e.call("nil?").toString()?null:this.privateObject.transport.exportJsValue(e)}}var M;!function(e){e[e.None=0]="None",e[e.Return=1]="Return",e[e.Break=2]="Break",e[e.Next=3]="Next",e[e.Retry=4]="Retry",e[e.Redo=5]="Redo",e[e.Raise=6]="Raise",e[e.Throw=7]="Throw",e[e.Fatal=8]="Fatal",e[e.Mask=15]="Mask"}(M||(M={}));class C{constructor(){this.literalsCache=null,this.isFormmatting=!1}format(e,t,n){class i extends Error{}if(this.isFormmatting)throw new i("Unexpected exception occurred during formatting exception message");this.isFormmatting=!0;try{return this._format(e,t,n)}finally{this.isFormmatting=!1}}_format(e,t,n){const[i,o,r]=(()=>{if(null==this.literalsCache){const e=[N(t,n,"0"),N(t,n,"1"),N(t,n,'"\n"')];return this.literalsCache=e,e}return this.literalsCache})();let s,a,u;try{s=e.call("class").toString()}catch(e){s="unknown"}try{u=e.call("message").toString()}catch(e){u="unknown"}try{a=e.call("backtrace")}catch(e){return this.formatString(s,u)}if("true"===a.call("nil?").toString())return this.formatString(s,u);try{const e=a.call("at",i),t=a.call("drop",o).call("join",r);return this.formatString(s,u,[e.toString(),t.toString()])}catch(e){return this.formatString(s,u)}}formatString(e,t,n){return n?`${n[0]}: ${t} (${e})\n${n[1]}`:`${e}: ${t}`}}const S=(e,t,n)=>{switch(e&M.Mask){case M.None:break;case M.Return:throw new D("unexpected return");case M.Next:throw new D("unexpected next");case M.Break:throw new D("unexpected break");case M.Redo:throw new D("unexpected redo");case M.Retry:throw new D("retry outside of rescue clause");case M.Throw:throw new D("unexpected throw");case M.Raise:case M.Fatal:const i=new w(t.guest.rbErrinfo(),t,n);if("true"===i.call("nil?").toString())throw new D("no exception object");throw t.guest.rbClearErrinfo(),new D(n.exceptionFormatter.format(i,t,n));default:throw new D(`unknown error tag: ${e}`)}};function L(e,t){try{return t()}catch(t){if(t instanceof D)throw t;if(e.guest.rbVmBugreport(),t instanceof WebAssembly.RuntimeError&&"unreachable"===t.message){const e=new D(`Something went wrong in Ruby VM: ${t}`);throw e.stack=t.stack,e}throw t}}const I=(e,t,n,i,o)=>{const r=e.guest.rbIntern(i+"\0");return L(e,(()=>{const[i,s]=e.guest.rbFuncallvProtect(n,r,o);return S(s,e,t),i}))},N=(e,t,n)=>L(e,(()=>{const[i,o]=e.guest.rbEvalStringProtect(n+"\0");return S(o,e,t),new w(i,e,t)}));function x(e,t,n){return new Promise(((i,o)=>{const r=e.wrap({resolve:i,reject:n=>{const i=new D(t.exceptionFormatter.format(n,e,t));o(i)}});n(r)}))}class D extends Error{constructor(e){super(e)}}class k extends D{constructor(e){super("Ruby Fatal Error: "+e)}}const T=async(e,t={})=>{var n,i;const o=Object.entries(null!==(n=t.env)&&void 0!==n?n:{}).map((([e,t])=>`${e}=${t}`)),r=new a([],o,[],{debug:!1}),s=new b,u={wasi_snapshot_preview1:r.wasiImport};s.addToImports(u);const l=null===(i=t.consolePrint)||void 0===i||i?function({stdout:e,stderr:t}={stdout:console.log,stderr:console.warn}){let n,i;function o(){if(void 0===n)throw new Error("Memory is not set");return void 0!==i&&0!==i.buffer.byteLength||(i=new DataView(n.buffer)),i}const r=new TextDecoder;return{addToImports(i){const s=i.wasi_snapshot_preview1,a=s.fd_write;s.fd_write=(i,s,u,l)=>{if(1!==i&&2!==i)return a(i,s,u,l);const c=o(),h=Array.from({length:u},((e,t)=>{const i=s+8*t,o=c.getUint32(i,!0),r=c.getUint32(i+4,!0);return new Uint8Array(n.buffer,o,r)}));let d=0,f="";for(const e of h)f+=r.decode(e),d+=e.byteLength;return c.setUint32(l,d,!0),(1===i?e:t)(f),0};const u=s.fd_filestat_get;s.fd_filestat_get=(e,t)=>{if(1!==e&&2!==e)return u(e,t);const n=o(),i=u(e,t);if(0!==i)return i;const r=t+0;return n.setUint8(r,2),0};const l=s.fd_fdstat_get;s.fd_fdstat_get=(e,t)=>{if(1!==e&&2!==e)return l(e,t);const n=o(),i=t+0;n.setUint8(i,2);const r=t+8;return n.setBigUint64(r,BigInt(1)),0}},setMemory(e){n=e}}}():void 0;null==l||l.addToImports(u);const c=await WebAssembly.instantiate(e,u);return await s.setInstance(c),null==l||l.setMemory(c.exports.memory),r.initialize(c),s.initialize(),{vm:s,wasi:r,instance:c}}},3219:e=>{"use strict";e.exports=JSON.parse('{"aes-128-ecb":{"cipher":"AES","key":128,"iv":0,"mode":"ECB","type":"block"},"aes-192-ecb":{"cipher":"AES","key":192,"iv":0,"mode":"ECB","type":"block"},"aes-256-ecb":{"cipher":"AES","key":256,"iv":0,"mode":"ECB","type":"block"},"aes-128-cbc":{"cipher":"AES","key":128,"iv":16,"mode":"CBC","type":"block"},"aes-192-cbc":{"cipher":"AES","key":192,"iv":16,"mode":"CBC","type":"block"},"aes-256-cbc":{"cipher":"AES","key":256,"iv":16,"mode":"CBC","type":"block"},"aes128":{"cipher":"AES","key":128,"iv":16,"mode":"CBC","type":"block"},"aes192":{"cipher":"AES","key":192,"iv":16,"mode":"CBC","type":"block"},"aes256":{"cipher":"AES","key":256,"iv":16,"mode":"CBC","type":"block"},"aes-128-cfb":{"cipher":"AES","key":128,"iv":16,"mode":"CFB","type":"stream"},"aes-192-cfb":{"cipher":"AES","key":192,"iv":16,"mode":"CFB","type":"stream"},"aes-256-cfb":{"cipher":"AES","key":256,"iv":16,"mode":"CFB","type":"stream"},"aes-128-cfb8":{"cipher":"AES","key":128,"iv":16,"mode":"CFB8","type":"stream"},"aes-192-cfb8":{"cipher":"AES","key":192,"iv":16,"mode":"CFB8","type":"stream"},"aes-256-cfb8":{"cipher":"AES","key":256,"iv":16,"mode":"CFB8","type":"stream"},"aes-128-cfb1":{"cipher":"AES","key":128,"iv":16,"mode":"CFB1","type":"stream"},"aes-192-cfb1":{"cipher":"AES","key":192,"iv":16,"mode":"CFB1","type":"stream"},"aes-256-cfb1":{"cipher":"AES","key":256,"iv":16,"mode":"CFB1","type":"stream"},"aes-128-ofb":{"cipher":"AES","key":128,"iv":16,"mode":"OFB","type":"stream"},"aes-192-ofb":{"cipher":"AES","key":192,"iv":16,"mode":"OFB","type":"stream"},"aes-256-ofb":{"cipher":"AES","key":256,"iv":16,"mode":"OFB","type":"stream"},"aes-128-ctr":{"cipher":"AES","key":128,"iv":16,"mode":"CTR","type":"stream"},"aes-192-ctr":{"cipher":"AES","key":192,"iv":16,"mode":"CTR","type":"stream"},"aes-256-ctr":{"cipher":"AES","key":256,"iv":16,"mode":"CTR","type":"stream"},"aes-128-gcm":{"cipher":"AES","key":128,"iv":12,"mode":"GCM","type":"auth"},"aes-192-gcm":{"cipher":"AES","key":192,"iv":12,"mode":"GCM","type":"auth"},"aes-256-gcm":{"cipher":"AES","key":256,"iv":12,"mode":"GCM","type":"auth"}}')},2951:e=>{"use strict";e.exports=JSON.parse('{"sha224WithRSAEncryption":{"sign":"rsa","hash":"sha224","id":"302d300d06096086480165030402040500041c"},"RSA-SHA224":{"sign":"ecdsa/rsa","hash":"sha224","id":"302d300d06096086480165030402040500041c"},"sha256WithRSAEncryption":{"sign":"rsa","hash":"sha256","id":"3031300d060960864801650304020105000420"},"RSA-SHA256":{"sign":"ecdsa/rsa","hash":"sha256","id":"3031300d060960864801650304020105000420"},"sha384WithRSAEncryption":{"sign":"rsa","hash":"sha384","id":"3041300d060960864801650304020205000430"},"RSA-SHA384":{"sign":"ecdsa/rsa","hash":"sha384","id":"3041300d060960864801650304020205000430"},"sha512WithRSAEncryption":{"sign":"rsa","hash":"sha512","id":"3051300d060960864801650304020305000440"},"RSA-SHA512":{"sign":"ecdsa/rsa","hash":"sha512","id":"3051300d060960864801650304020305000440"},"RSA-SHA1":{"sign":"rsa","hash":"sha1","id":"3021300906052b0e03021a05000414"},"ecdsa-with-SHA1":{"sign":"ecdsa","hash":"sha1","id":""},"sha256":{"sign":"ecdsa","hash":"sha256","id":""},"sha224":{"sign":"ecdsa","hash":"sha224","id":""},"sha384":{"sign":"ecdsa","hash":"sha384","id":""},"sha512":{"sign":"ecdsa","hash":"sha512","id":""},"DSA-SHA":{"sign":"dsa","hash":"sha1","id":""},"DSA-SHA1":{"sign":"dsa","hash":"sha1","id":""},"DSA":{"sign":"dsa","hash":"sha1","id":""},"DSA-WITH-SHA224":{"sign":"dsa","hash":"sha224","id":""},"DSA-SHA224":{"sign":"dsa","hash":"sha224","id":""},"DSA-WITH-SHA256":{"sign":"dsa","hash":"sha256","id":""},"DSA-SHA256":{"sign":"dsa","hash":"sha256","id":""},"DSA-WITH-SHA384":{"sign":"dsa","hash":"sha384","id":""},"DSA-SHA384":{"sign":"dsa","hash":"sha384","id":""},"DSA-WITH-SHA512":{"sign":"dsa","hash":"sha512","id":""},"DSA-SHA512":{"sign":"dsa","hash":"sha512","id":""},"DSA-RIPEMD160":{"sign":"dsa","hash":"rmd160","id":""},"ripemd160WithRSA":{"sign":"rsa","hash":"rmd160","id":"3021300906052b2403020105000414"},"RSA-RIPEMD160":{"sign":"rsa","hash":"rmd160","id":"3021300906052b2403020105000414"},"md5WithRSAEncryption":{"sign":"rsa","hash":"md5","id":"3020300c06082a864886f70d020505000410"},"RSA-MD5":{"sign":"rsa","hash":"md5","id":"3020300c06082a864886f70d020505000410"}}')},4589:e=>{"use strict";e.exports=JSON.parse('{"1.3.132.0.10":"secp256k1","1.3.132.0.33":"p224","1.2.840.10045.3.1.1":"p192","1.2.840.10045.3.1.7":"p256","1.3.132.0.34":"p384","1.3.132.0.35":"p521"}')},3241:e=>{"use strict";e.exports=JSON.parse('{"modp1":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a3620ffffffffffffffff"},"modp2":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece65381ffffffffffffffff"},"modp5":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca237327ffffffffffffffff"},"modp14":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aacaa68ffffffffffffffff"},"modp15":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a93ad2caffffffffffffffff"},"modp16":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199ffffffffffffffff"},"modp17":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff"},"modp18":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff"}}')},1636:e=>{"use strict";e.exports={rE:"6.5.5"}},5579:e=>{"use strict";e.exports=JSON.parse('{"2.16.840.1.101.3.4.1.1":"aes-128-ecb","2.16.840.1.101.3.4.1.2":"aes-128-cbc","2.16.840.1.101.3.4.1.3":"aes-128-ofb","2.16.840.1.101.3.4.1.4":"aes-128-cfb","2.16.840.1.101.3.4.1.21":"aes-192-ecb","2.16.840.1.101.3.4.1.22":"aes-192-cbc","2.16.840.1.101.3.4.1.23":"aes-192-ofb","2.16.840.1.101.3.4.1.24":"aes-192-cfb","2.16.840.1.101.3.4.1.41":"aes-256-ecb","2.16.840.1.101.3.4.1.42":"aes-256-cbc","2.16.840.1.101.3.4.1.43":"aes-256-ofb","2.16.840.1.101.3.4.1.44":"aes-256-cfb"}')}},__webpack_module_cache__={};function __webpack_require__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var n=__webpack_module_cache__[e]={id:e,loaded:!1,exports:{}};return __webpack_modules__[e].call(n.exports,n,n.exports,__webpack_require__),n.loaded=!0,n.exports}__webpack_require__.d=(e,t)=>{for(var n in t)__webpack_require__.o(t,n)&&!__webpack_require__.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},__webpack_require__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),__webpack_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),__webpack_require__.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},__webpack_require__.nmd=e=>(e.paths=[],e.children||(e.children=[]),e);var __webpack_exports__={};(()=>{"use strict";__webpack_require__(5609),__webpack_require__(6625),__webpack_require__(7188),self.MonacoEnvironment={getWorkerUrl:function(){return"./monaco/lib/editor.worker.bundle.js"}},__webpack_require__(4081)})()})(); //# sourceMappingURL=main.bundle.js.map \ No newline at end of file diff --git a/docs/monaco/lib/main.bundle.js.map b/docs/monaco/lib/main.bundle.js.map index e73115a2..aa1e8e25 100644 --- a/docs/monaco/lib/main.bundle.js.map +++ b/docs/monaco/lib/main.bundle.js.map @@ -1 +1 @@ -{"version":3,"file":"main.bundle.js","mappings":";+CAAUA,EAAOC,QAAU,EAAQ,KAAR,EAAqD,IAKxEC,KAAK,CAACF,EAAOG,GAAI,iaAAka,sBCLjbH,EAAOC,QAAU,EAAQ,KAAR,EAA2D,IAK9EC,KAAK,CAACF,EAAOG,GAAI,+4FAAg5F,sBCL/5FH,EAAOC,QAAU,EAAQ,KAAR,EAA2D,IAK9EC,KAAK,CAACF,EAAOG,GAAI,qeAAse,sBCLrfH,EAAOC,QAAU,EAAQ,KAAR,EAA2D,IAK9EC,KAAK,CAACF,EAAOG,GAAI,8lCAA+lC,sBCL9mCH,EAAOC,QAAU,EAAQ,KAAR,EAA2D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AC,SAAU,SACtDC,SAAU,CAAC,CAAC,IAAK,KAAM,CAAC,IAAK,KAAM,CAAC,IAAK,MACzCC,iBAAkB,CAChB,CAACC,KAAM,IAAKjE,MAAO,KACnB,CAACiE,KAAM,IAAKjE,MAAO,KACnB,CAACiE,KAAM,IAAKjE,MAAO,KACnB,CAACiE,KAAM,IAAKjE,MAAO,KACnB,CAACiE,KAAM,IAAKjE,MAAO,MAErBkE,iBAAkB,CAChB,CAACD,KAAM,IAAKjE,MAAO,KACnB,CAACiE,KAAM,IAAKjE,MAAO,KACnB,CAACiE,KAAM,IAAKjE,MAAO,KACnB,CAACiE,KAAM,IAAKjE,MAAO,KACnB,CAACiE,KAAM,IAAKjE,MAAO,MAErBmE,iBAAkB,CAChBC,sBAAuB,IAAIC,OACzB,2MAEFC,sBAAuB,IAAID,OACzB,8FAIAE,EAAiB,CACrBC,aAAc,QACdC,SAAU,CACR,WACA,eACA,WACA,QACA,MACA,QACA,MACA,QACA,QACA,OACA,QACA,MACA,WACA,KACA,OACA,QACA,MACA,SACA,MACA,QACA,KACA,KACA,SACA,OACA,MACA,MACA,KACA,OACA,SACA,QACA,SACA,OACA,QACA,OACA,OACA,QACA,SACA,QACA,OACA,QACA,SAEFC,WAAY,CAAC,KAAM,KAAM,MAAO,IAAK,IAAK,MAC1CC,SAAU,CACR,UACA,SACA,UACA,UACA,SACA,cACA,YACA,uBACA,yBACA,OAEFC,aAAc,CACZ,SACA,QACA,MACA,OACA,KACA,QACA,MACA,KACA,QACA,QACA,UAEFC,UAAW,CACT,MACA,OACA,KACA,QACA,MACA,KACA,QACA,QACA,UAEFC,UAAW,CACT,IACA,IACA,IACA,MACA,KACA,MACA,KACA,KACA,IACA,KACA,IACA,KACA,KACA,KACA,IACA,IACA,IACA,IACA,IACA,KACA,IACA,KACA,KACA,KACA,MACA,IACA,KACA,KACA,KACA,MACA,KACA,KACA,KACA,MACA,MACA,KACA,MACA,MACA,MAEFf,SAAU,CACR,CAACE,KAAM,IAAKj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KkxC,MAAMkP,YAAYpgD,KAAKkgD,IACrC,IAEAgB,EAAerE,EAAW,YAAY,WACpC,OAAO78C,KAAKkxC,MAAM6P,UAAU/gD,KAAKugD,IACnC,IAEA1D,EAAUl8C,UAAUihD,QAAU,WAC5B,OAAO5hD,KAAKmgD,WAAW58C,OAAOvD,KAAK2hD,WACrC,EAEA9E,EAAUl8C,UAAUkhD,MAAQ,WAC1B,OAAOrW,EAAMhqC,OAAOxB,KAAK4hD,UAAW,OAAO70C,aAC7C,EAEAhc,EAAOC,QAAU6rD,YChEjB9rD,EAAOC,QAAU,CACfshD,QAAS,CACPI,KAAM,EACNK,OAAQ,CACN,CACE,mEACA,oEAEF,CACE,mEACA,oEAEF,CACE,mEACA,oEAEF,CACE,mEACA,mEAEF,CACE,mEACA,oEAEF,CACE,mEACA,oEAEF,CACE,mEACA,oEAEF,CACE,mEACA,oEAEF,CACE,mEACA,oEAEF,CACE,mEACA,oEAEF,CACE,mEACA,oEAEF,CACE,mEACA,oEAEF,CACE,mEACA,oEAEF,CACE,mEACA,oEAEF,CACE,kEACA,oEAEF,CACE,mEACA,oEAEF,CACE,mEACA,oEAEF,CACE,kEACA,oEAEF,CACE,mEACA,oEAEF,CACE,mEACA,oEAEF,CACE,mEACA,oEAEF,CACE,mEACA,oEAEF,CACE,mEACA,oEAEF,CACE,mEACA,oEAEF,CACE,mEACA,oEAEF,CACE,mEACA,oEAEF,CACE,mEACA,oEAEF,CACE,mEACA,oEAEF,CACE,mEACA,oEAEF,CACE,mEACA,oEAEF,CACE,mEACA,mEAEF,CACE,mEACA,oEAEF,CACE,mEACA,oEAEF,CACE,mEACA,oEAEF,CACE,mEACA,oEAEF,CACE,mEACA,mEAEF,CACE,mEACA,oEAEF,CACE,mEACA,oEAEF,CACE,mEACA,kEAEF,CACE,mEACA,oEAEF,CACE,mEACA,oEAEF,CACE,mEACA,oEAEF,CACE,mEACA,oEAEF,CACE,kEACA,oEAEF,CACE,mEACA,oEAEF,CACE,mEACA,oEAEF,CACE,mEACA,oEAEF,CACE,mEACA,oEAEF,CACE,mEACA,oEAEF,CACE,mEACA,oEAEF,CACE,mEACA,oEAEF,CACE,mEACA,oEAEF,CACE,mEACA,oEAEF,CACE,mEACA,oEAEF,CACE,mEACA,oEAEF,CACE,mEACA,oEAEF,CACE,mEACA,oEAEF,CACE,mEACA,oEAEF,CACE,mEACA,oEAEF,CACE,mEACA,oEAEF,CACE,mEACA,mEAEF,CACE,mEACA,oEAEF,CACE,kEACA,oEAEF,CACE,mEACA,oEAEF,CACE,mEACA,sEAINP,IAAK,CACHxsB,IAAK,EACL+sB,OAAQ,CACN,CACE,mEACA,oEAEF,CACE,mEACA,oEAEF,CACE,mEACA,oEAEF,CACE,mEACA,oEAEF,CACE,mEACA,oEAEF,CACE,mEACA,mEAEF,CACE,mEACA,oEAEF,CACE,mEACA,oEAEF,CACE,mEACA,oEAEF,CACE,mEACA,oEAEF,CACE,mEACA,mEAEF,CACE,mEACA,oEAEF,CACE,mEACA,oEAEF,CACE,mEACA,oEAEF,CACE,mEACA,oEAEF,CACE,mEACA,oEAEF,CACE,mEACA,mEAEF,CACE,mEACA,oEAEF,CACE,mEACA,oEAEF,CACE,mEACA,mEAEF,CACE,mEACA,oEAEF,CACE,kEACA,oEAEF,CACE,mEACA,oEAEF,CACE,mEACA,oEAEF,CACE,mEACA,oEAEF,CACE,mEACA,oEAEF,CACE,mEACA,oEAEF,CACE,mEACA,oEAEF,CACE,mEACA,mEAEF,CACE,mEACA,mEAEF,CACE,mEACA,oEAEF,CACE,mEACA,oEAEF,CACE,mEACA,oEAEF,CACE,mEACA,oEAEF,CACE,mEACA,oEAEF,CACE,mEACA,oEAEF,CACE,mEACA,oEAEF,CACE,mEACA,oEAEF,CACE,mEACA,oEAEF,CACE,mEACA,oEAEF,CACE,mEACA,oEAEF,CACE,mEACA,oEAEF,CACE,mEACA,oEAEF,CACE,mEACA,oEAEF,CACE,mEACA,oEAEF,CACE,mEACA,oEAEF,CACE,mEACA,oEAEF,CACE,mEACA,oEAEF,CACE,mEACA,mEAEF,CACE,mEACA,oEAEF,CACE,mEACA,mEAEF,CACE,mEACA,oEAEF,CACE,mEACA,oEAEF,CACE,mEACA,oEAEF,CACE,mEACA,oEAEF,CACE,mEACA,oEAEF,CACE,mEACA,oEAEF,CACE,mEACA,oEAEF,CACE,kEACA,oEAEF,CACE,mEACA,oEAEF,CACE,mEACA,oEAEF,CACE,mEACA,mEAEF,CACE,mEACA,mEAEF,CACE,mEACA,oEAEF,CACE,mEACA,oEAEF,CACE,kEACA,oEAEF,CACE,mEACA,oEAEF,CACE,mEACA,mEAEF,CACE,mEACA,oEAEF,CACE,mEACA,mEAEF,CACE,mEACA,oEAEF,CACE,kEACA,oEAEF,CACE,mEACA,oEAEF,CACE,mEACA,oEAEF,CACE,mEACA,oEAEF,CACE,iEACA,oEAEF,CACE,mEACA,oEAEF,CACE,mEACA,oEAEF,CACE,mEACA,oEAEF,CACE,mEACA,oEAEF,CACE,mEACA,oEAEF,CACE,kEACA,oEAEF,CACE,mEACA,mEAEF,CACE,mEACA,oEAEF,CACE,mEACA,oEAEF,CACE,mEACA,oEAEF,CACE,mEACA,oEAEF,CACE,mEACA,oEAEF,CACE,mEACA,oEAEF,CACE,mEACA,oEAEF,CACE,mEACA,oEAEF,CACE,mEACA,oEAEF,CACE,mEACA,oEAEF,CACE,mEACA,oEAEF,CACE,mEACA,oEAEF,CACE,mEACA,oEAEF,CACE,mEACA,oEAEF,CACE,mEACA,oEAEF,CACE,mEACA,oEAEF,CACE,mEACA,oEAEF,CACE,mEACA,oEAEF,CACE,mEACA,mEAEF,CACE,mEACA,oEAEF,CACE,mEACA,oEAEF,CACE,mEACA,mEAEF,CACE,mEACA,oEAEF,CACE,mEACA,oEAEF,CACE,mEACA,oEAEF,CACE,mEACA,oEAEF,CACE,mEACA,mEAEF,CACE,mEACA,oEAEF,CACE,mEACA,oEAEF,CACE,mEACA,oEAEF,CACE,mEACA,oEAEF,CACE,mEACA,oEAEF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,EACTu/E,SAAU,SACV5B,YAAY,IAEb,CACDlqb,KAAM,IACNqC,KAAM,SACNwpb,WAAY,CACVt/E,SAAS,EACTu/E,SAAU,SACV5B,YAAY,IAEb,CACDlqb,KAAM,IACNqC,KAAM,SACNwpb,WAAY,CACVt/E,SAAS,EACTu/E,SAAU,kBACVC,eAAe,EACf7B,YAAY,IAEb,CACDlqb,KAAM,IACNqC,KAAM,SACNwpb,WAAY,CACVt/E,SAAS,EACTu/E,SAAU,kBACVC,eAAe,EACf7B,YAAY,IAEb,CACDlqb,KAAM,KACNqC,KAAM,SACNwpb,WAAY,CACVt/E,SAAS,EACTu/E,SAAU,kBACV5B,YAAY,IAEb,CACDlqb,KAAM,KACNqC,KAAM,SACNwpb,WAAY,CACVt/E,SAAS,EACTu/E,SAAU,kBACV5B,YAAY,IAGhB,CACElqb,KAAM,IACNqC,KAAM,OAEJ2pb,EAAsBnC,EAAcp1b,OAQpCw3b,EAAsB,CAAC,CACzB75b,KAAM,cACN85b,UAAW,QACV,CACD95b,KAAM,OACL,CACDA,KAAM,OACN85b,UAAW,MACV,CACD95b,KAAM,OACN85b,UAAW,MACV,CACD95b,KAAM,OACN85b,UAAW,MACV,CACD95b,KAAM,SACL,CACDA,KAAM,QACN85b,UAAW,KACV,CACD95b,KAAM,OACN85b,UAAW,KACV,CACD95b,KAAM,OACN85b,UAAW,OACV,CACD95b,KAAM,MACN85b,UAAW,MACV,CACD95b,KAAM,WACN85b,UAAW,QACV,CACD95b,KAAM,YACN85b,UAAW,QACV,CACD95b,KAAM,OACN85b,UAAW,OACV,CACD95b,KAAM,aACN85b,UAAW,IACXC,eAAe,GACd,CACD/5b,KAAM,aACN85b,UAAW,OACV,CACD95b,KAAM,OACN85b,UAAW,KACV,CACD95b,KAAM,WACN85b,UAAW,QACV,CACD95b,KAAM,YACN85b,UAAW,MACXE,2BAA2B,GAC1B,CACDh6b,KAAM,UACN85b,UAAW,KACV,CACD95b,KAAM,SACN85b,UAAW,MAGT9C,EA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aco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/base/browser/builder.css","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/base/browser/ui/actionbar/actionbar.css","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/base/browser/ui/aria/aria.css","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/base/browser/ui/checkbox/checkbox.css","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/base/browser/ui/contextview/contextview.css","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/base/browser/ui/countBadge/countBadge.css","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/base/browser/ui/findinput/findInput.css","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/base/browser/ui/findinput/findInputCheckboxes.css","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/base/browser/ui/iconLabel/iconlabel.css","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/base/browser/ui/inputbox/inputBox.css","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/base/browser/ui/keybindingLabel/keybindingLabel.css","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/base/browser/ui/list/list.css","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/base/browser/ui/menu/menu.css","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/base/browser/ui/progressbar/progressbar.css","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/base/browser/ui/sash/sash.css","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/base/browser/ui/scrollbar/media/scrollbars.css","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/base/parts/quickopen/browser/quickopen.css","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/base/parts/tree/browser/tree.css","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/browser/controller/textAreaHandler.css","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/browser/viewParts/currentLineHighlight/currentLineHighlight.css","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/browser/viewParts/currentLineMarginHighlight/currentLineMarginHighlight.css","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/browser/viewParts/decorations/decorations.css","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/browser/viewParts/glyphMargin/glyphMargin.css","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/browser/viewParts/indentGuides/indentGuides.css","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/browser/viewParts/lineNumbers/lineNumbers.css","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/browser/viewParts/lines/viewLines.css","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/browser/viewParts/linesDecorations/linesDecorations.css","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/browser/viewParts/marginDecorations/marginDecorations.css","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/browser/viewParts/minimap/minimap.css","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/browser/viewParts/overlayWidgets/overlayWidgets.css","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/browser/viewParts/rulers/rulers.css","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/browser/viewParts/scrollDecoration/scrollDecoration.css","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/browser/viewParts/selections/selections.css","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/browser/viewParts/viewCursors/viewCursors.css","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/browser/widget/media/diffEditor.css","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/browser/widget/media/diffReview.css","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/browser/widget/media/editor.css","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/browser/widget/media/tokens.css","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/contrib/bracketMatching/bracketMatching.css","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/contrib/clipboard/clipboard.css","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/contrib/codeAction/lightBulbWidget.css","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/contrib/codelens/codelensWidget.css","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/contrib/colorPicker/colorPicker.css","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/contrib/dnd/dnd.css","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/contrib/find/findWidget.css","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/contrib/folding/folding.css","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/contrib/goToDefinition/goToDefinitionMouse.css","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/contrib/gotoError/gotoErrorWidget.css","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/contrib/hover/hover.css","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/contrib/links/links.css","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/contrib/message/messageController.css","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/contrib/parameterHints/parameterHints.css","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/contrib/referenceSearch/media/peekViewWidget.css","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/contrib/referenceSearch/media/referencesWidget.css","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/contrib/rename/renameInputField.css","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/contrib/snippet/snippetSession.css","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/contrib/suggest/media/suggest.css","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/contrib/zoneWidget/zoneWidget.css","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.css","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/standalone/browser/iPadShowKeyboard/iPadShowKeyboard.css","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/standalone/browser/inspectTokens/inspectTokens.css","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/standalone/browser/quickOpen/gotoLine.css","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/standalone/browser/quickOpen/quickOutline.css","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/standalone/browser/standalone-tokens.css","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/platform/contextview/browser/contextMenuHandler.css","webpack://@monaco-languageclient/example/./src/client.ts","webpack://@monaco-languageclient/example/./src/output.ts","webpack://@monaco-languageclient/example/./src/page.ts","webpack://@monaco-languageclient/example/./src/ruby.ts","webpack://@monaco-languageclient/example/./src/sorbet.ts","webpack://@monaco-languageclient/example/./node_modules/ansi_up/ansi_up.ts","webpack://@monaco-languageclient/example/./node_modules/asn1.js/lib/asn1.js","webpack://@monaco-languageclient/example/./node_modules/asn1.js/lib/asn1/api.js","webpack://@monaco-languageclient/example/./node_modules/asn1.js/lib/asn1/base/buffer.js","webpack://@monaco-languageclient/example/./node_modules/asn1.js/lib/asn1/base/index.js","webpack://@monaco-languageclient/example/./node_modules/asn1.js/lib/asn1/base/node.js","webpack://@monaco-languageclient/example/./node_modules/asn1.js/lib/asn1/base/reporter.js","webpack://@monaco-languageclient/example/./node_modules/asn1.js/lib/asn1/constants/der.js","webpack://@monaco-languageclient/example/./node_modules/asn1.js/lib/asn1/constants/index.js","webpack://@monaco-languageclient/example/./node_modules/asn1.js/lib/asn1/decoders/der.js","webpack://@monaco-languageclient/example/./node_modules/asn1.js/lib/asn1/decoders/index.js","webpack://@monaco-languageclient/example/./node_modules/asn1.js/lib/asn1/decoders/pem.js","webpack://@monaco-languageclient/example/./node_modules/asn1.js/lib/asn1/encoders/der.js","webpack://@monaco-languageclient/example/./node_modules/asn1.js/lib/asn1/encoders/index.js","webpack://@monaco-languageclient/example/./node_modules/asn1.js/lib/asn1/encoders/pem.js","webpack://@monaco-languageclient/example/./node_modules/asn1.js/node_modules/bn.js/lib/bn.js","webpack://@monaco-languageclient/example/./node_modules/base64-js/index.js","webpack://@monaco-languageclient/example/./node_modules/bn.js/lib/bn.js","webpack://@monaco-languageclient/example/./node_modules/brorand/index.js","webpack://@monaco-languageclient/example/./node_modules/browserify-aes/aes.js","webpack://@monaco-languageclient/example/./node_modules/browserify-aes/authCipher.js","webpack://@monaco-languageclient/example/./node_modules/browserify-aes/browser.js","webpack://@monaco-languageclient/example/./node_modules/browserify-aes/decrypter.js","webpack://@monaco-languageclient/example/./node_modules/browserify-aes/encrypter.js","webpack://@monaco-languageclient/example/./node_modules/browserify-aes/ghash.js","webpack://@monaco-languageclient/example/./node_modules/browserify-aes/incr32.js","webpack://@monaco-languageclient/example/./node_modules/browserify-aes/modes/cbc.js","webpack://@monaco-languageclient/example/./node_modules/browserify-aes/modes/cfb.js","webpack://@monaco-languageclient/example/./node_modules/browserify-aes/modes/cfb1.js","webpack://@monaco-languageclient/example/./node_modules/browserify-aes/modes/cfb8.js","webpack://@monaco-languageclient/example/./node_modules/browserify-aes/modes/ctr.js","webpack://@monaco-languageclient/example/./node_modules/browserify-aes/modes/ecb.js","webpack://@monaco-languageclient/example/./node_modules/browserify-aes/modes/index.js","webpack://@monaco-languageclient/example/./node_modules/browserify-aes/modes/ofb.js","webpack://@monaco-languageclient/example/./node_modules/browserify-aes/streamCipher.js","webpack://@monaco-languageclient/example/./node_modules/browserify-cipher/browser.js","webpack://@monaco-languageclient/example/./node_modules/browserify-des/index.js","webpack://@monaco-languageclient/example/./node_modules/browserify-des/modes.js","webpack://@monaco-languageclient/example/./node_modules/browserify-rsa/index.js","webpack://@monaco-languageclient/example/./node_modules/browserify-sign/algos.js","webpack://@monaco-languageclient/example/./node_modules/browserify-sign/browser/index.js","webpack://@monaco-languageclient/example/./node_modules/browserify-sign/browser/sign.js","webpack://@monaco-languageclient/example/./node_modules/browserify-sign/browser/verify.js","webpack://@monaco-languageclient/example/./node_modules/browserify-sign/node_modules/inherits/inherits_browser.js","webpack://@monaco-languageclient/example/./node_modules/browserify-sign/node_modules/safe-buffer/index.js","webpack://@monaco-languageclient/example/./node_modules/buffer-xor/index.js","webpack://@monaco-languageclient/example/./node_modules/buffer/index.js","webpack://@monaco-languageclient/example/./node_modules/cipher-base/index.js","webpack://@monaco-languageclient/example/./node_modules/core-util-is/lib/util.js","webpack://@monaco-languageclient/example/./node_modules/create-ecdh/browser.js","webpack://@monaco-languageclient/example/./node_modules/create-ecdh/node_modules/bn.js/lib/bn.js","webpack://@monaco-languageclient/example/./node_modules/create-hash/browser.js","webpack://@monaco-languageclient/example/./node_modules/create-hash/md5.js","webpack://@monaco-languageclient/example/./node_modules/create-hmac/browser.js","webpack://@monaco-languageclient/example/./node_modules/create-hmac/legacy.js","webpack://@monaco-languageclient/example/./node_modules/crypto-browserify/index.js","webpack://@monaco-languageclient/example/./node_modules/css-loader/lib/css-base.js","webpack://@monaco-languageclient/example/./node_modules/des.js/lib/des.js","webpack://@monaco-languageclient/example/./node_modules/des.js/lib/des/cbc.js","webpack://@monaco-languageclient/example/./node_modules/des.js/lib/des/cipher.js","webpack://@monaco-languageclient/example/./node_modules/des.js/lib/des/des.js","webpack://@monaco-languageclient/example/./node_modules/des.js/lib/des/ede.js","webpack://@monaco-languageclient/example/./node_modules/des.js/lib/des/utils.js","webpack://@monaco-languageclient/example/./node_modules/diffie-hellman/browser.js","webpack://@monaco-languageclient/example/./node_modules/diffie-hellman/lib/dh.js","webpack://@monaco-languageclient/example/./node_modules/diffie-hellman/lib/generatePrime.js","webpack://@monaco-languageclient/example/./node_modules/diffie-hellman/node_modules/bn.js/lib/bn.js","webpack://@monaco-languageclient/example/./node_modules/elliptic/lib/elliptic.js","webpack://@monaco-languageclient/example/./node_modules/elliptic/lib/elliptic/curve/base.js","webpack://@monaco-languageclient/example/./node_modules/elliptic/lib/elliptic/curve/edwards.js","webpack://@monaco-languageclient/example/./node_modules/elliptic/lib/elliptic/curve/index.js","webpack://@monaco-languageclient/example/./node_modules/elliptic/lib/elliptic/curve/mont.js","webpack://@monaco-languageclient/example/./node_modules/elliptic/lib/elliptic/curve/short.js","webpack://@monaco-languageclient/example/./node_modules/elliptic/lib/elliptic/curves.js","webpack://@monaco-languageclient/example/./node_modules/elliptic/lib/elliptic/ec/index.js","webpack://@monaco-languageclient/example/./node_modules/elliptic/lib/elliptic/ec/key.js","webpack://@monaco-languageclient/example/./node_modules/elliptic/lib/elliptic/ec/signature.js","webpack://@monaco-languageclient/example/./node_modules/elliptic/lib/elliptic/eddsa/index.js","webpack://@monaco-languageclient/example/./node_modules/elliptic/lib/elliptic/eddsa/key.js","webpack://@monaco-languageclient/example/./node_modules/elliptic/lib/elliptic/eddsa/signature.js","webpack://@monaco-languageclient/example/./node_modules/elliptic/lib/elliptic/precomputed/secp256k1.js","webpack://@monaco-languageclient/example/./node_modules/elliptic/lib/elliptic/utils.js","webpack://@monaco-languageclient/example/./node_modules/elliptic/node_modules/bn.js/lib/bn.js","webpack://@monaco-languageclient/example/./node_modules/elliptic/node_modules/inherits/inherits_browser.js","webpack://@monaco-languageclient/example/./node_modules/events/events.js","webpack://@monaco-languageclient/example/./node_modules/evp_bytestokey/index.js","webpack://@monaco-languageclient/example/./node_modules/glob-to-regexp/index.js","webpack://@monaco-languageclient/example/./node_modules/hash-base/index.js","webpack://@monaco-languageclient/example/./node_modules/hash.js/lib/hash.js","webpack://@monaco-languageclient/example/./node_modules/hash.js/lib/hash/common.js","webpack://@monaco-languageclient/example/./node_modules/hash.js/lib/hash/hmac.js","webpack://@monaco-languageclient/example/./node_modules/hash.js/lib/hash/ripemd.js","webpack://@monaco-languageclient/example/./node_modules/hash.js/lib/hash/sha.js","webpack://@monaco-languageclient/example/./node_modules/hash.js/lib/hash/sha/1.js","webpack://@monaco-languageclient/example/./node_modules/hash.js/lib/hash/sha/224.js","webpack://@monaco-languageclient/example/./node_modules/hash.js/lib/hash/sha/256.js","webpack://@monaco-languageclient/example/./node_modules/hash.js/lib/hash/sha/384.js","webpack://@monaco-languageclient/example/./node_modules/hash.js/lib/hash/sha/512.js","webpack://@monaco-languageclient/example/./node_modules/hash.js/lib/hash/sha/common.js","webpack://@monaco-languageclient/example/./node_modules/hash.js/lib/hash/utils.js","webpack://@monaco-languageclient/example/./node_modules/hmac-drbg/lib/hmac-drbg.js","webpack://@monaco-languageclient/example/./node_modules/ieee754/index.js","webpack://@monaco-languageclient/example/./node_modules/inherits/inherits_browser.js","webpack://@monaco-languageclient/example/./node_modules/isarray/index.js","webpack://@monaco-languageclient/example/./node_modules/md5.js/index.js","webpack://@monaco-languageclient/example/./node_modules/miller-rabin/lib/mr.js","webpack://@monaco-languageclient/example/./node_modules/miller-rabin/node_modules/bn.js/lib/bn.js","webpack://@monaco-languageclient/example/./node_modules/minimalistic-assert/index.js","webpack://@monaco-languageclient/example/./node_modules/minimalistic-crypto-utils/lib/utils.js","webpack://@monaco-languageclient/example/../node_modules/requires-port/index.js","webpack://@monaco-languageclient/example/../node_modules/querystringify/index.js","webpack://@monaco-languageclient/example/../node_modules/url-parse/index.js","webpack://@monaco-languageclient/example/../src/helpers/delay.js","webpack://@monaco-languageclient/example/../src/helpers/logger.js","webpack://@monaco-languageclient/example/../src/helpers/array-helpers.js","webpack://@monaco-languageclient/example/../src/event/target.js","webpack://@monaco-languageclient/example/../src/network-bridge.js","webpack://@monaco-languageclient/example/../src/constants.js","webpack://@monaco-languageclient/example/../src/event/prototype.js","webpack://@monaco-languageclient/example/../src/event/event.js","webpack://@monaco-languageclient/example/../src/event/message.js","webpack://@monaco-languageclient/example/../src/event/close.js","webpack://@monaco-languageclient/example/../src/event/factory.js","webpack://@monaco-languageclient/example/../src/algorithms/close.js","webpack://@monaco-languageclient/example/../src/helpers/normalize-send.js","webpack://@monaco-languageclient/example/../src/websocket.js","webpack://@monaco-languageclient/example/../src/helpers/url-verification.js","webpack://@monaco-languageclient/example/../src/helpers/protocol-verification.js","webpack://@monaco-languageclient/example/../src/helpers/proxy-factory.js","webpack://@monaco-languageclient/example/../src/helpers/byte-length.js","webpack://@monaco-languageclient/example/../src/helpers/global-object.js","webpack://@monaco-languageclient/example/../src/server.js","webpack://@monaco-languageclient/example/../src/helpers/dedupe.js","webpack://@monaco-languageclient/example/../src/socket-io.js","webpack://@monaco-languageclient/example/../src/index.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/base/common/arrays.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/base/common/errors.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/base/common/event.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/base/common/functional.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/base/common/glob.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/base/common/lifecycle.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/base/common/linkedList.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/base/common/map.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/base/common/objects.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/base/common/paths.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/base/common/platform.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/base/common/scrollable.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/base/common/strings.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/base/common/types.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/base/common/uri.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/base/common/winjs.base.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/common/commands/shiftCommand.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/common/config/editorOptions.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/common/controller/cursorCommon.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/common/controller/wordCharacterClassifier.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/common/core/characterClassifier.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/common/core/lineTokens.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/common/core/position.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/common/core/range.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/common/core/selection.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/common/core/token.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/common/core/uint.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/common/model.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/common/model/editStack.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/common/model/textModelEvents.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/common/model/intervalTree.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/base/common/stopwatch.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/common/model/textModelTokens.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/common/model/indentationGuesser.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/common/model/pieceTreeTextBuffer/rbTreeBase.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/common/model/pieceTreeTextBuffer/pieceTreeBase.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/common/model/textModel.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/common/model/pieceTreeTextBuffer/pieceTreeTextBuffer.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/common/model/pieceTreeTextBuffer/pieceTreeTextBufferBuilder.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/common/model/textModelSearch.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/common/model/wordHelper.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/common/modes/languageSelector.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/common/modes/languageFeatureRegistry.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/common/modes/tokenizationRegistry.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/common/modes.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/common/modes/languageConfiguration.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/common/modes/supports/characterPair.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/common/modes/supports/electricCharacter.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/common/modes/supports/onEnter.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/common/modes/supports/indentRules.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/common/modes/languageConfigurationRegistry.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/common/modes/nullMode.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/common/modes/supports.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/common/modes/supports/richEditBrackets.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/common/services/modelService.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/common/controller/cursorEvents.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/common/editorCommon.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/common/controller/cursorMoveOperations.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/common/controller/cursorWordOperations.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/common/controller/cursorMoveCommands.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/base/common/keyCodes.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/platform/commands/common/commands.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/base/common/assert.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/platform/registry/common/platform.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/platform/keybinding/common/keybindingsRegistry.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/platform/telemetry/common/telemetry.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/platform/contextkey/common/contextkey.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/base/common/actions.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/platform/actions/common/actions.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/browser/editorExtensions.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/browser/services/codeEditorService.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/common/controller/cursorColumnSelection.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/common/editorContextKeys.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/browser/controller/coreCommands.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/common/commands/replaceCommand.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/common/commands/surroundSelectionCommand.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/common/controller/cursorTypeOperations.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/common/controller/cursorDeleteOperations.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/base/common/cancellation.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/base/common/async.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/base/browser/browser.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/base/browser/keyboardEvent.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/base/browser/iframe.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/base/browser/mouseEvent.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/base/browser/event.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/base/browser/dom.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/platform/instantiation/common/serviceCollection.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/platform/jsonschemas/common/jsonContributionRegistry.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/platform/configuration/common/configurationRegistry.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/common/config/editorZoom.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/common/config/fontInfo.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/common/config/commonEditorConfig.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/browser/config/elementSizeObserver.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/browser/config/charWidthReader.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/browser/config/configuration.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/common/controller/oneCursor.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/common/controller/cursorCollection.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/common/view/viewEvents.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/common/controller/cursor.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/common/modes/textToHtmlTokenizer.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/common/viewModel/viewModel.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/common/viewModel/viewModelDecorations.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/common/viewModel/prefixSumComputer.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/base/common/color.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/common/viewModel/splitLinesCollection.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/common/core/rgba.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/base/common/network.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/base/common/severity.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/common/view/minimapCharRenderer.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/common/viewModel/characterHardWrappingLineMapper.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/common/viewLayout/whitespaceComputer.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/common/viewLayout/linesLayout.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/common/viewLayout/viewLayout.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/common/viewModel/viewModelImpl.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/platform/notification/common/notification.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/platform/theme/common/themeService.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/base/browser/fastDomNode.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/common/viewModel/viewEventHandler.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/browser/controller/textAreaState.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/browser/controller/textAreaInput.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/browser/view/viewPart.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/browser/viewParts/margin/margin.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/platform/theme/common/colorRegistry.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/common/view/editorColorRegistry.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/browser/view/dynamicViewOverlay.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/browser/viewParts/lineNumbers/lineNumbers.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/browser/controller/textAreaHandler.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/base/common/decorators.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/base/browser/touch.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/browser/editorBrowser.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/base/browser/globalMouseMoveMonitor.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/browser/editorDom.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/common/core/stringBuilder.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/common/viewLayout/lineDecorations.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/common/viewLayout/viewLineRenderer.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/common/view/renderingContext.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/browser/viewParts/lines/rangeUtil.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/browser/viewParts/lines/viewLine.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/browser/controller/mouseTarget.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/browser/controller/mouseHandler.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/browser/controller/pointerHandler.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/browser/view/viewController.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/common/view/viewEventDispatcher.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/browser/view/viewLayer.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/browser/view/viewOverlays.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/browser/viewParts/contentWidgets/contentWidgets.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/browser/viewParts/currentLineHighlight/currentLineHighlight.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/browser/viewParts/currentLineMarginHighlight/currentLineMarginHighlight.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/browser/viewParts/decorations/decorations.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/browser/viewParts/glyphMargin/glyphMargin.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/browser/viewParts/indentGuides/indentGuides.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/browser/viewParts/lines/viewLines.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/browser/viewParts/linesDecorations/linesDecorations.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/browser/viewParts/marginDecorations/marginDecorations.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/browser/viewParts/overlayWidgets/overlayWidgets.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/browser/viewParts/overviewRuler/decorationsOverviewRuler.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/common/view/overviewZoneManager.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/browser/viewParts/overviewRuler/overviewRuler.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/browser/viewParts/rulers/rulers.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/browser/viewParts/scrollDecoration/scrollDecoration.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/browser/viewParts/selections/selections.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/browser/viewParts/viewCursors/viewCursor.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/browser/viewParts/viewCursors/viewCursors.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/browser/viewParts/viewZones/viewZones.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/common/view/viewContext.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/browser/view/viewOutgoingEvents.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/common/viewLayout/viewLinesViewportData.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/base/browser/ui/widget.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/base/browser/ui/scrollbar/scrollbarArrow.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/base/browser/ui/scrollbar/scrollbarVisibilityController.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/base/browser/ui/scrollbar/abstractScrollbar.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/base/browser/ui/scrollbar/scrollbarState.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/base/browser/ui/scrollbar/horizontalScrollbar.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/base/browser/ui/scrollbar/verticalScrollbar.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/base/browser/ui/scrollbar/scrollableElement.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/browser/viewParts/editorScrollbar/editorScrollbar.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/common/view/runtimeMinimapCharRenderer.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/browser/viewParts/minimap/minimap.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/browser/view/viewImpl.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/common/editorAction.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/browser/widget/codeEditorWidget.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/base/browser/ui/sash/sash.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/common/services/editorWorkerService.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/base/browser/builder.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/base/browser/ui/actionbar/actionbar.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/browser/widget/diffReview.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/browser/core/editorState.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/browser/widget/diffEditorWidget.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/browser/widget/diffNavigator.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/contrib/bracketMatching/bracketMatching.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/contrib/caretOperations/moveCaretCommand.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/contrib/caretOperations/caretOperations.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/contrib/caretOperations/transpose.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/contrib/clipboard/clipboard.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/contrib/codelens/codelensWidget.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/contrib/codelens/codelens.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/contrib/codelens/codelensController.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/base/common/hash.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/contrib/colorPicker/color.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/platform/configuration/common/configuration.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/contrib/colorPicker/colorDetector.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/common/core/editOperation.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/contrib/comment/blockCommentCommand.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/contrib/comment/lineCommentCommand.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/contrib/comment/comment.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/platform/contextview/browser/contextView.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/platform/keybinding/common/keybinding.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/contrib/contextmenu/contextmenu.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/contrib/cursorUndo/cursorUndo.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/contrib/dnd/dragAndDropCommand.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/contrib/dnd/dnd.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/contrib/find/replacePattern.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/contrib/find/findDecorations.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/contrib/find/replaceAllCommand.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/contrib/find/findModel.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/contrib/find/findState.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/platform/storage/common/storage.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/base/common/marked/marked.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/platform/clipboard/common/clipboardService.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/base/common/idGenerator.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/base/common/htmlContent.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/base/browser/htmlContentRenderer.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/base/browser/ui/aria/aria.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/base/browser/ui/contextview/contextview.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/base/common/iterator.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/base/browser/ui/inputbox/inputBox.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/base/common/history.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/base/browser/ui/checkbox/checkbox.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/base/browser/ui/findinput/findInputCheckboxes.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/base/browser/ui/findinput/findInput.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/platform/widget/common/contextScopedWidget.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/platform/widget/browser/contextScopedHistoryWidget.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/contrib/find/findWidget.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/contrib/find/findOptionsWidget.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/contrib/find/findController.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/contrib/folding/foldingRanges.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/contrib/folding/foldingModel.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/contrib/folding/foldingDecorations.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/contrib/folding/hiddenRangeModel.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/contrib/folding/indentRangeProvider.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/contrib/folding/syntaxRangeProvider.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/contrib/folding/intializingRangeProvider.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/contrib/folding/folding.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/contrib/fontZoom/fontZoom.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/contrib/format/format.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/contrib/format/formattingEdit.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/contrib/format/formatActions.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/contrib/goToDefinition/goToDefinition.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/base/browser/ui/countBadge/countBadge.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/base/browser/ui/octiconLabel/octiconLabel.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/base/browser/ui/highlightedlabel/highlightedLabel.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/base/common/labels.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/base/common/resources.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/platform/workspace/common/workspace.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/base/browser/ui/iconLabel/iconLabel.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/contrib/referenceSearch/peekViewWidget.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/browser/widget/embeddedCodeEditorWidget.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/contrib/zoneWidget/zoneWidget.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/contrib/referenceSearch/referencesModel.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/common/services/resolverService.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/platform/theme/common/styler.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/base/parts/tree/browser/treeDefaults.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/platform/environment/common/environment.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/base/parts/tree/browser/treeModel.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/base/common/diff/diffChange.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/base/common/diff/diff.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/base/parts/tree/browser/tree.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/base/parts/tree/browser/treeDnd.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/base/parts/tree/browser/treeViewModel.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/base/browser/dnd.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/platform/list/browser/listService.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/base/parts/tree/browser/treeView.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/base/parts/tree/browser/treeImpl.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/platform/uriDisplay/common/uriDisplay.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/contrib/referenceSearch/referencesWidget.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/contrib/referenceSearch/referencesController.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/contrib/message/messageController.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/platform/progress/common/progress.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/contrib/goToDefinition/goToDefinitionCommands.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/common/services/modeService.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/contrib/goToDefinition/clickLinkGesture.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/platform/markers/common/markers.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/contrib/goToDefinition/goToDefinitionMouse.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/contrib/gotoError/gotoErrorWidget.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/contrib/gotoError/gotoError.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/platform/opener/common/opener.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/contrib/hover/getHover.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/contrib/hover/hoverOperation.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/contrib/hover/hoverWidgets.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/contrib/colorPicker/colorPickerModel.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/contrib/colorPicker/colorPickerWidget.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/contrib/hover/modesContentHover.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/contrib/hover/modesGlyphHover.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/contrib/markdown/markdownRenderer.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/contrib/hover/hover.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/contrib/inPlaceReplace/inPlaceReplaceCommand.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/contrib/inPlaceReplace/inPlaceReplace.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/contrib/linesOperations/sortLinesCommand.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/common/commands/trimTrailingWhitespaceCommand.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/contrib/linesOperations/copyLinesCommand.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/contrib/linesOperations/deleteLinesCommand.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/contrib/indentation/indentUtils.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/contrib/linesOperations/moveLinesCommand.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/contrib/linesOperations/linesOperations.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/contrib/links/getLinks.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/contrib/links/links.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/contrib/multicursor/multicursor.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/contrib/parameterHints/provideSignatureHelp.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/contrib/parameterHints/parameterHintsWidget.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/contrib/parameterHints/parameterHints.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/browser/services/bulkEditService.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/contrib/codeAction/codeActionTrigger.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/contrib/codeAction/codeAction.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/contrib/codeAction/codeActionModel.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/contrib/codeAction/codeActionWidget.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/contrib/codeAction/lightBulbWidget.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/contrib/codeAction/codeActionCommands.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/contrib/codeAction/codeActionContributions.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/contrib/referenceSearch/referenceSearch.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/contrib/rename/renameInputField.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/contrib/rename/rename.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/contrib/smartSelect/tokenTree.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/contrib/smartSelect/tokenSelectionSupport.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/contrib/smartSelect/smartSelect.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/contrib/snippet/snippetParser.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/contrib/suggest/suggest.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/contrib/snippet/snippetVariables.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/contrib/snippet/snippetSession.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/platform/log/common/log.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/contrib/snippet/snippetController2.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/base/common/filters.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/contrib/suggest/completionModel.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/contrib/suggest/suggestModel.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/base/browser/ui/list/rangeMap.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/base/browser/ui/list/rowCache.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/base/browser/ui/list/listView.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/base/browser/ui/list/splice.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/base/browser/ui/list/listWidget.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/base/common/numbers.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/contrib/suggest/suggestWidget.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/contrib/suggest/suggestMemory.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/contrib/suggest/suggestController.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/contrib/toggleTabFocusMode/toggleTabFocusMode.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/contrib/wordHighlighter/wordHighlighter.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/contrib/wordOperations/wordOperations.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/contrib/wordPartOperations/wordPartOperations.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/standalone/common/standaloneThemeService.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/standalone/browser/inspectTokens/inspectTokens.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/standalone/browser/iPadShowKeyboard/iPadShowKeyboard.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/base/common/keybindingLabels.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/base/browser/ui/keybindingLabel/keybindingLabel.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/base/parts/quickopen/common/quickOpen.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/base/parts/quickopen/browser/quickOpenModel.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/base/parts/quickopen/browser/quickOpenWidget.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/base/parts/quickopen/browser/quickOpenViewer.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/base/browser/ui/progressbar/progressbar.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/standalone/browser/quickOpen/quickOpenEditorWidget.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/standalone/browser/quickOpen/editorQuickOpen.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/contrib/quickOpen/quickOpen.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/standalone/browser/quickOpen/quickOutline.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/standalone/browser/quickOpen/gotoLine.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/standalone/browser/quickOpen/quickCommand.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/standalone/browser/toggleHighContrast/toggleHighContrast.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/standalone/browser/referenceSearch/standaloneReferenceSearch.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/common/standalone/standaloneBase.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/platform/keybinding/common/abstractKeybindingService.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/platform/keybinding/common/usLayoutResolvedKeybinding.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/platform/keybinding/common/keybindingResolver.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/platform/configuration/common/configurationModels.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/platform/actions/common/menu.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/platform/keybinding/common/resolvedKeybindingItem.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/standalone/browser/simpleServices.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/standalone/browser/standaloneCodeEditor.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/base/browser/ui/menu/menu.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/platform/contextview/browser/contextMenuHandler.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/platform/contextview/browser/contextMenuService.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/platform/contextview/browser/contextViewService.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/base/common/collections.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/base/common/graph.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/platform/markers/common/markerService.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/platform/instantiation/common/descriptors.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/platform/instantiation/common/instantiationService.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/base/common/worker/simpleWorker.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/base/worker/defaultWorkerFactory.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/common/diff/diffComputer.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/common/model/mirrorTextModel.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/common/modes/linkComputer.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/common/modes/supports/inplaceReplaceSupport.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/common/services/editorSimpleWorker.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/common/services/resourceConfiguration.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/common/services/editorWorkerServiceImpl.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/common/modes/abstractMode.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/base/common/mime.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/common/modes/modesRegistry.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/common/services/languagesRegistry.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/common/services/modeServiceImpl.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/common/services/modelServiceImpl.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/browser/services/abstractCodeEditorService.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/browser/services/codeEditorServiceImpl.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/standalone/browser/standaloneCodeServiceImpl.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/platform/contextkey/browser/contextKeyService.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/common/modes/supports/tokenization.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/standalone/common/themes.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/standalone/browser/standaloneThemeServiceImpl.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/standalone/browser/standaloneServices.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/platform/dialogs/common/dialogs.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/base/common/marshalling.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/platform/telemetry/common/telemetryUtils.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/browser/services/openerService.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/standalone/browser/colorizer.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/common/services/webWorker.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/standalone/browser/standaloneEditor.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/standalone/common/monarch/monarchCommon.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/standalone/common/monarch/monarchCompile.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/standalone/common/monarch/monarchLexer.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/standalone/browser/standaloneLanguages.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/base/common/winjs.polyfill.promise.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/editor.api.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/nls.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/platform/instantiation/common/instantiation.js","webpack://@monaco-languageclient/example/./node_modules/monaco-languageclient/src/connection.ts","webpack://@monaco-languageclient/example/./node_modules/monaco-languageclient/src/console-window.ts","webpack://@monaco-languageclient/example/./node_modules/monaco-languageclient/src/disposable.ts","webpack://@monaco-languageclient/example/./node_modules/monaco-languageclient/src/index.ts","webpack://@monaco-languageclient/example/./node_modules/monaco-languageclient/src/monaco-commands.ts","webpack://@monaco-languageclient/example/./node_modules/monaco-languageclient/src/monaco-converter.ts","webpack://@monaco-languageclient/example/./node_modules/monaco-languageclient/src/monaco-diagnostic-collection.ts","webpack://@monaco-languageclient/example/./node_modules/monaco-languageclient/src/monaco-language-client.ts","webpack://@monaco-languageclient/example/./node_modules/monaco-languageclient/src/monaco-languages.ts","webpack://@monaco-languageclient/example/./node_modules/monaco-languageclient/src/monaco-services.ts","webpack://@monaco-languageclient/example/./node_modules/monaco-languageclient/src/monaco-workspace.ts","webpack://@monaco-languageclient/example/./node_modules/monaco-languageclient/src/services.ts","webpack://@monaco-languageclient/example/./node_modules/monaco-languageclient/src/vscode-api.ts","webpack://@monaco-languageclient/example/./node_modules/monaco-languageclient/src/vscode-compatibility.ts","webpack://@monaco-languageclient/example/./node_modules/monaco-languageclient/node_modules/vscode-jsonrpc/lib/cancellation.js","webpack://@monaco-languageclient/example/./node_modules/monaco-languageclient/node_modules/vscode-jsonrpc/lib/events.js","webpack://@monaco-languageclient/example/./node_modules/monaco-languageclient/node_modules/vscode-jsonrpc/lib/is.js","webpack://@monaco-languageclient/example/./node_modules/monaco-languageclient/node_modules/vscode-jsonrpc/lib/linkedMap.js","webpack://@monaco-languageclient/example/./node_modules/monaco-languageclient/node_modules/vscode-jsonrpc/lib/main.js","webpack://@monaco-languageclient/example/./node_modules/monaco-languageclient/node_modules/vscode-jsonrpc/lib/messageReader.js","webpack://@monaco-languageclient/example/./node_modules/monaco-languageclient/node_modules/vscode-jsonrpc/lib/messageWriter.js","webpack://@monaco-languageclient/example/./node_modules/monaco-languageclient/node_modules/vscode-jsonrpc/lib/messages.js","webpack://@monaco-languageclient/example/./node_modules/monaco-languageclient/node_modules/vscode-jsonrpc/lib/pipeSupport.js","webpack://@monaco-languageclient/example/./node_modules/monaco-languageclient/node_modules/vscode-jsonrpc/lib/socketSupport.js","webpack://@monaco-languageclient/example/./node_modules/monaco-vim/lib/cm/keymap_vim.js","webpack://@monaco-languageclient/example/./node_modules/monaco-vim/lib/cm_adapter.js","webpack://@monaco-languageclient/example/./node_modules/monaco-vim/lib/index.js","webpack://@monaco-languageclient/example/./node_modules/monaco-vim/lib/statusbar.js","webpack://@monaco-languageclient/example/./node_modules/os-browserify/browser.js","webpack://@monaco-languageclient/example/./node_modules/parse-asn1/asn1.js","webpack://@monaco-languageclient/example/./node_modules/parse-asn1/certificate.js","webpack://@monaco-languageclient/example/./node_modules/parse-asn1/fixProc.js","webpack://@monaco-languageclient/example/./node_modules/parse-asn1/index.js","webpack://@monaco-languageclient/example/./node_modules/parse-asn1/node_modules/safe-buffer/index.js","webpack://@monaco-languageclient/example/./node_modules/path-browserify/index.js","webpack://@monaco-languageclient/example/./node_modules/pbkdf2/browser.js","webpack://@monaco-languageclient/example/./node_modules/pbkdf2/lib/async.js","webpack://@monaco-languageclient/example/./node_modules/pbkdf2/lib/default-encoding.js","webpack://@monaco-languageclient/example/./node_modules/pbkdf2/lib/precondition.js","webpack://@monaco-languageclient/example/./node_modules/pbkdf2/lib/sync-browser.js","webpack://@monaco-languageclient/example/./node_modules/pbkdf2/lib/to-buffer.js","webpack://@monaco-languageclient/example/./node_modules/process-nextick-args/index.js","webpack://@monaco-languageclient/example/./node_modules/process/browser.js","webpack://@monaco-languageclient/example/./node_modules/public-encrypt/browser.js","webpack://@monaco-languageclient/example/./node_modules/public-encrypt/mgf.js","webpack://@monaco-languageclient/example/./node_modules/public-encrypt/node_modules/bn.js/lib/bn.js","webpack://@monaco-languageclient/example/./node_modules/public-encrypt/privateDecrypt.js","webpack://@monaco-languageclient/example/./node_modules/public-encrypt/publicEncrypt.js","webpack://@monaco-languageclient/example/./node_modules/public-encrypt/withPublic.js","webpack://@monaco-languageclient/example/./node_modules/public-encrypt/xor.js","webpack://@monaco-languageclient/example/./node_modules/randombytes/browser.js","webpack://@monaco-languageclient/example/./node_modules/randomfill/browser.js","webpack://@monaco-languageclient/example/./node_modules/readable-stream/lib/_stream_duplex.js","webpack://@monaco-languageclient/example/./node_modules/readable-stream/lib/_stream_passthrough.js","webpack://@monaco-languageclient/example/./node_modules/readable-stream/lib/_stream_readable.js","webpack://@monaco-languageclient/example/./node_modules/readable-stream/lib/_stream_transform.js","webpack://@monaco-languageclient/example/./node_modules/readable-stream/lib/_stream_writable.js","webpack://@monaco-languageclient/example/./node_modules/readable-stream/lib/internal/streams/BufferList.js","webpack://@monaco-languageclient/example/./node_modules/readable-stream/lib/internal/streams/destroy.js","webpack://@monaco-languageclient/example/./node_modules/readable-stream/lib/internal/streams/stream-browser.js","webpack://@monaco-languageclient/example/./node_modules/readable-stream/node_modules/string_decoder/lib/string_decoder.js","webpack://@monaco-languageclient/example/./node_modules/readable-stream/readable-browser.js","webpack://@monaco-languageclient/example/./node_modules/ripemd160/index.js","webpack://@monaco-languageclient/example/./node_modules/safe-buffer/index.js","webpack://@monaco-languageclient/example/./node_modules/setimmediate/setImmediate.js","webpack://@monaco-languageclient/example/./node_modules/sha.js/hash.js","webpack://@monaco-languageclient/example/./node_modules/sha.js/index.js","webpack://@monaco-languageclient/example/./node_modules/sha.js/sha.js","webpack://@monaco-languageclient/example/./node_modules/sha.js/sha1.js","webpack://@monaco-languageclient/example/./node_modules/sha.js/sha224.js","webpack://@monaco-languageclient/example/./node_modules/sha.js/sha256.js","webpack://@monaco-languageclient/example/./node_modules/sha.js/sha384.js","webpack://@monaco-languageclient/example/./node_modules/sha.js/sha512.js","webpack://@monaco-languageclient/example/./node_modules/stream-browserify/index.js","webpack://@monaco-languageclient/example/./node_modules/stream-browserify/node_modules/inherits/inherits_browser.js","webpack://@monaco-languageclient/example/./node_modules/stream-browserify/node_modules/readable-stream/errors-browser.js","webpack://@monaco-languageclient/example/./node_modules/stream-browserify/node_modules/readable-stream/lib/_stream_duplex.js","webpack://@monaco-languageclient/example/./node_modules/stream-browserify/node_modules/readable-stream/lib/_stream_passthrough.js","webpack://@monaco-languageclient/example/./node_modules/stream-browserify/node_modules/readable-stream/lib/_stream_readable.js","webpack://@monaco-languageclient/example/./node_modules/stream-browserify/node_modules/readable-stream/lib/_stream_transform.js","webpack://@monaco-languageclient/example/./node_modules/stream-browserify/node_modules/readable-stream/lib/_stream_writable.js","webpack://@monaco-languageclient/example/./node_modules/stream-browserify/node_modules/readable-stream/lib/internal/streams/async_iterator.js","webpack://@monaco-languageclient/example/./node_modules/stream-browserify/node_modules/readable-stream/lib/internal/streams/buffer_list.js","webpack://@monaco-languageclient/example/./node_modules/stream-browserify/node_modules/readable-stream/lib/internal/streams/destroy.js","webpack://@monaco-languageclient/example/./node_modules/stream-browserify/node_modules/readable-stream/lib/internal/streams/end-of-stream.js","webpack://@monaco-languageclient/example/./node_modules/stream-browserify/node_modules/readable-stream/lib/internal/streams/from-browser.js","webpack://@monaco-languageclient/example/./node_modules/stream-browserify/node_modules/readable-stream/lib/internal/streams/pipeline.js","webpack://@monaco-languageclient/example/./node_modules/stream-browserify/node_modules/readable-stream/lib/internal/streams/state.js","webpack://@monaco-languageclient/example/./node_modules/stream-browserify/node_modules/readable-stream/lib/internal/streams/stream-browser.js","webpack://@monaco-languageclient/example/./node_modules/string_decoder/lib/string_decoder.js","webpack://@monaco-languageclient/example/./node_modules/string_decoder/node_modules/safe-buffer/index.js","webpack://@monaco-languageclient/example/./node_modules/style-loader/lib/addStyles.js","webpack://@monaco-languageclient/example/./node_modules/style-loader/lib/urls.js","webpack://@monaco-languageclient/example/./node_modules/util-deprecate/browser.js","webpack://@monaco-languageclient/example/./node_modules/vm-browserify/index.js","webpack://@monaco-languageclient/example/./node_modules/vscode-base-languageclient/lib/client.js","webpack://@monaco-languageclient/example/./node_modules/vscode-base-languageclient/lib/codeConverter.js","webpack://@monaco-languageclient/example/./node_modules/vscode-base-languageclient/lib/colorProvider.js","webpack://@monaco-languageclient/example/./node_modules/vscode-base-languageclient/lib/foldingRange.js","webpack://@monaco-languageclient/example/./node_modules/vscode-base-languageclient/lib/implementation.js","webpack://@monaco-languageclient/example/./node_modules/vscode-base-languageclient/lib/protocolCodeLens.js","webpack://@monaco-languageclient/example/./node_modules/vscode-base-languageclient/lib/protocolCompletionItem.js","webpack://@monaco-languageclient/example/./node_modules/vscode-base-languageclient/lib/protocolConverter.js","webpack://@monaco-languageclient/example/./node_modules/vscode-base-languageclient/lib/protocolDocumentLink.js","webpack://@monaco-languageclient/example/./node_modules/vscode-base-languageclient/lib/typeDefinition.js","webpack://@monaco-languageclient/example/./node_modules/vscode-base-languageclient/lib/utils/async.js","webpack://@monaco-languageclient/example/./node_modules/vscode-base-languageclient/lib/utils/is.js","webpack://@monaco-languageclient/example/./node_modules/vscode-base-languageclient/lib/utils/uuid.js","webpack://@monaco-languageclient/example/./node_modules/vscode-base-languageclient/lib/workspaceFolders.js","webpack://@monaco-languageclient/example/./node_modules/vscode-jsonrpc/lib/cancellation.js","webpack://@monaco-languageclient/example/./node_modules/vscode-jsonrpc/lib/events.js","webpack://@monaco-languageclient/example/./node_modules/vscode-jsonrpc/lib/is.js","webpack://@monaco-languageclient/example/./node_modules/vscode-jsonrpc/lib/linkedMap.js","webpack://@monaco-languageclient/example/./node_modules/vscode-jsonrpc/lib/main.js","webpack://@monaco-languageclient/example/./node_modules/vscode-jsonrpc/lib/messageReader.js","webpack://@monaco-languageclient/example/./node_modules/vscode-jsonrpc/lib/messageWriter.js","webpack://@monaco-languageclient/example/./node_modules/vscode-jsonrpc/lib/messages.js","webpack://@monaco-languageclient/example/./node_modules/vscode-jsonrpc/lib/pipeSupport.js","webpack://@monaco-languageclient/example/./node_modules/vscode-jsonrpc/lib/socketSupport.js","webpack://@monaco-languageclient/example/./node_modules/vscode-languageserver-protocol/lib/main.js","webpack://@monaco-languageclient/example/./node_modules/vscode-languageserver-protocol/lib/protocol.colorProvider.js","webpack://@monaco-languageclient/example/./node_modules/vscode-languageserver-protocol/lib/protocol.configuration.js","webpack://@monaco-languageclient/example/./node_modules/vscode-languageserver-protocol/lib/protocol.foldingRange.js","webpack://@monaco-languageclient/example/./node_modules/vscode-languageserver-protocol/lib/protocol.implementation.js","webpack://@monaco-languageclient/example/./node_modules/vscode-languageserver-protocol/lib/protocol.js","webpack://@monaco-languageclient/example/./node_modules/vscode-languageserver-protocol/lib/protocol.typeDefinition.js","webpack://@monaco-languageclient/example/./node_modules/vscode-languageserver-protocol/lib/protocol.workspaceFolders.js","webpack://@monaco-languageclient/example/./node_modules/vscode-languageserver-protocol/lib/utils/is.js","webpack://@monaco-languageclient/example/./node_modules/vscode-languageserver-types/lib/esm/main.js","webpack://@monaco-languageclient/example/./node_modules/vscode-uri/lib/esm/index.js","webpack://@monaco-languageclient/example/./node_modules/vscode-ws-jsonrpc/src/connection.ts","webpack://@monaco-languageclient/example/./node_modules/vscode-ws-jsonrpc/src/disposable.ts","webpack://@monaco-languageclient/example/./node_modules/vscode-ws-jsonrpc/src/index.ts","webpack://@monaco-languageclient/example/./node_modules/vscode-ws-jsonrpc/src/logger.ts","webpack://@monaco-languageclient/example/./node_modules/vscode-ws-jsonrpc/src/socket/connection.ts","webpack://@monaco-languageclient/example/./node_modules/vscode-ws-jsonrpc/src/socket/index.ts","webpack://@monaco-languageclient/example/./node_modules/vscode-ws-jsonrpc/src/socket/reader.ts","webpack://@monaco-languageclient/example/./node_modules/vscode-ws-jsonrpc/src/socket/writer.ts","webpack://@monaco-languageclient/example/./node_modules/vscode-ws-jsonrpc/node_modules/vscode-jsonrpc/lib/cancellation.js","webpack://@monaco-languageclient/example/./node_modules/vscode-ws-jsonrpc/node_modules/vscode-jsonrpc/lib/events.js","webpack://@monaco-languageclient/example/./node_modules/vscode-ws-jsonrpc/node_modules/vscode-jsonrpc/lib/is.js","webpack://@monaco-languageclient/example/./node_modules/vscode-ws-jsonrpc/node_modules/vscode-jsonrpc/lib/linkedMap.js","webpack://@monaco-languageclient/example/./node_modules/vscode-ws-jsonrpc/node_modules/vscode-jsonrpc/lib/main.js","webpack://@monaco-languageclient/example/./node_modules/vscode-ws-jsonrpc/node_modules/vscode-jsonrpc/lib/messageReader.js","webpack://@monaco-languageclient/example/./node_modules/vscode-ws-jsonrpc/node_modules/vscode-jsonrpc/lib/messageWriter.js","webpack://@monaco-languageclient/example/./node_modules/vscode-ws-jsonrpc/node_modules/vscode-jsonrpc/lib/messages.js","webpack://@monaco-languageclient/example/./node_modules/vscode-ws-jsonrpc/node_modules/vscode-jsonrpc/lib/pipeSupport.js","webpack://@monaco-languageclient/example/./node_modules/vscode-ws-jsonrpc/node_modules/vscode-jsonrpc/lib/socketSupport.js","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/base/browser/builder.css?2ad2","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/base/browser/ui/actionbar/actionbar.css?5cb4","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/base/browser/ui/aria/aria.css?376d","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/base/browser/ui/checkbox/checkbox.css?3f57","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/base/browser/ui/contextview/contextview.css?dbd3","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/base/browser/ui/countBadge/countBadge.css?31be","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/base/browser/ui/findinput/findInput.css?290f","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/base/browser/ui/findinput/findInputCheckboxes.css?f7ae","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/base/browser/ui/iconLabel/iconlabel.css?ebc4","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/base/browser/ui/inputbox/inputBox.css?b52f","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/base/browser/ui/keybindingLabel/keybindingLabel.css?d93e","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/base/browser/ui/list/list.css?2814","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/base/browser/ui/menu/menu.css?295d","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/base/browser/ui/progressbar/progressbar.css?b10b","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/base/browser/ui/sash/sash.css?449b","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/base/browser/ui/scrollbar/media/scrollbars.css?b6cf","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/base/parts/quickopen/browser/quickopen.css?0bac","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/base/parts/tree/browser/tree.css?4649","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/browser/controller/textAreaHandler.css?301a","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/browser/viewParts/currentLineHighlight/currentLineHighlight.css?652f","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/browser/viewParts/currentLineMarginHighlight/currentLineMarginHighlight.css?dd3e","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/browser/viewParts/decorations/decorations.css?6bfe","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/browser/viewParts/glyphMargin/glyphMargin.css?51a2","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/browser/viewParts/indentGuides/indentGuides.css?3584","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/browser/viewParts/lineNumbers/lineNumbers.css?e88e","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/browser/viewParts/lines/viewLines.css?743a","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/browser/viewParts/linesDecorations/linesDecorations.css?7a07","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/browser/viewParts/marginDecorations/marginDecorations.css?e793","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/browser/viewParts/minimap/minimap.css?ca37","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/browser/viewParts/overlayWidgets/overlayWidgets.css?16da","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/browser/viewParts/rulers/rulers.css?bc15","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/browser/viewParts/scrollDecoration/scrollDecoration.css?c446","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/browser/viewParts/selections/selections.css?bff4","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/browser/viewParts/viewCursors/viewCursors.css?2a18","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/browser/widget/media/diffEditor.css?a185","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/browser/widget/media/diffReview.css?4984","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/browser/widget/media/editor.css?4ca6","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/browser/widget/media/tokens.css?e4cf","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/contrib/bracketMatching/bracketMatching.css?541d","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/contrib/clipboard/clipboard.css?b29b","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/contrib/codeAction/lightBulbWidget.css?0013","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/contrib/codelens/codelensWidget.css?93fd","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/contrib/colorPicker/colorPicker.css?e9cd","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/contrib/dnd/dnd.css?f83d","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/contrib/find/findWidget.css?9604","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/contrib/folding/folding.css?1dc4","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/contrib/goToDefinition/goToDefinitionMouse.css?a6c9","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/contrib/gotoError/gotoErrorWidget.css?d632","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/contrib/hover/hover.css?305a","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/contrib/links/links.css?5275","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/contrib/message/messageController.css?59da","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/contrib/parameterHints/parameterHints.css?4d58","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/contrib/referenceSearch/media/peekViewWidget.css?7ff6","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/contrib/referenceSearch/media/referencesWidget.css?5782","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/contrib/rename/renameInputField.css?3f86","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/contrib/snippet/snippetSession.css?73a9","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/contrib/suggest/media/suggest.css?2968","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/contrib/zoneWidget/zoneWidget.css?1ca2","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.css?703c","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/standalone/browser/iPadShowKeyboard/iPadShowKeyboard.css?3418","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/standalone/browser/inspectTokens/inspectTokens.css?b079","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/standalone/browser/quickOpen/gotoLine.css?cec2","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/standalone/browser/quickOpen/quickOutline.css?e17f","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/editor/standalone/browser/standalone-tokens.css?483a","webpack://@monaco-languageclient/example/./node_modules/monaco-editor-core/esm/vs/platform/contextview/browser/contextMenuHandler.css?e7e9","webpack://@monaco-languageclient/example/./node_modules/@bjorn3/browser_wasi_shim/dist/wasi_defs.js","webpack://@monaco-languageclient/example/./node_modules/@bjorn3/browser_wasi_shim/dist/debug.js","webpack://@monaco-languageclient/example/./node_modules/@bjorn3/browser_wasi_shim/dist/wasi.js","webpack://@monaco-languageclient/example/./node_modules/@ruby/wasm-wasi/dist/esm/bindgen/intrinsics.js","webpack://@monaco-languageclient/example/./node_modules/@ruby/wasm-wasi/dist/esm/bindgen/rb-abi-guest.js","webpack://@monaco-languageclient/example/./node_modules/@ruby/wasm-wasi/dist/esm/vm.js","webpack://@monaco-languageclient/example/./node_modules/@ruby/wasm-wasi/dist/esm/bindgen/rb-js-abi-host.js","webpack://@monaco-languageclient/example/./node_modules/@ruby/wasm-wasi/dist/esm/browser.js","webpack://@monaco-languageclient/example/./node_modules/@ruby/wasm-wasi/dist/esm/console.js","webpack://@monaco-languageclient/example/webpack/bootstrap","webpack://@monaco-languageclient/example/webpack/runtime/define property getters","webpack://@monaco-languageclient/example/webpack/runtime/global","webpack://@monaco-languageclient/example/webpack/runtime/hasOwnProperty shorthand","webpack://@monaco-languageclient/example/webpack/runtime/make namespace object","webpack://@monaco-languageclient/example/webpack/runtime/node module decorator","webpack://@monaco-languageclient/example/./src/main.ts"],"sourcesContent":["exports = module.exports = require(\"../../../../../css-loader/lib/css-base.js\")(false);\n// imports\n\n\n// module\nexports.push([module.id, \"/*---------------------------------------------------------------------------------------------\\n * Copyright (c) Microsoft Corporation. All rights reserved.\\n * Licensed under the MIT License. See License.txt in the project root for license information.\\n *--------------------------------------------------------------------------------------------*/\\n\\n.monaco-builder-hidden {\\n\\tdisplay: none !important;\\n}\", \"\"]);\n\n// exports\n","exports = module.exports = require(\"../../../../../../../css-loader/lib/css-base.js\")(false);\n// imports\n\n\n// module\nexports.push([module.id, \"/*---------------------------------------------------------------------------------------------\\n * Copyright (c) Microsoft Corporation. All rights reserved.\\n * Licensed under the MIT License. See License.txt in the project root for license information.\\n *--------------------------------------------------------------------------------------------*/\\n\\n.monaco-action-bar {\\n\\ttext-align: right;\\n\\toverflow: hidden;\\n\\twhite-space: nowrap;\\n}\\n\\n.monaco-action-bar .actions-container {\\n\\tdisplay: flex;\\n\\tmargin: 0 auto;\\n\\tpadding: 0;\\n\\twidth: 100%;\\n\\tjustify-content: flex-end;\\n}\\n\\n.monaco-action-bar.vertical .actions-container {\\n\\tdisplay: inline-block;\\n}\\n\\n.monaco-action-bar.reverse .actions-container {\\n\\tflex-direction: row-reverse;\\n}\\n\\n.monaco-action-bar .action-item {\\n\\tcursor: pointer;\\n\\tdisplay: inline-block;\\n\\t-ms-transition: -ms-transform 50ms ease;\\n\\t-webkit-transition: -webkit-transform 50ms ease;\\n\\t-moz-transition: -moz-transform 50ms ease;\\n\\t-o-transition: -o-transform 50ms ease;\\n\\ttransition: transform 50ms ease;\\n\\tposition: relative; /* DO NOT REMOVE - this is the key to preventing the ghosting icon bug in Chrome 42 */\\n}\\n\\n.monaco-action-bar .action-item.disabled {\\n\\tcursor: default;\\n}\\n\\n.monaco-action-bar.animated .action-item.active {\\n\\t-ms-transform: scale(1.272019649, 1.272019649); /* 1.272019649 = √φ */\\n\\t-webkit-transform: scale(1.272019649, 1.272019649);\\n\\t-moz-transform: scale(1.272019649, 1.272019649);\\n\\t-o-transform: scale(1.272019649, 1.272019649);\\n\\ttransform: scale(1.272019649, 1.272019649);\\n}\\n\\n.monaco-action-bar .action-item .icon {\\n\\tdisplay: inline-block;\\n}\\n\\n.monaco-action-bar .action-label {\\n\\tfont-size: 11px;\\n\\tmargin-right: 4px;\\n}\\n\\n.monaco-action-bar .action-label.octicon {\\n\\tfont-size: 15px;\\n\\tline-height: 35px;\\n\\ttext-align: center;\\n}\\n\\n.monaco-action-bar .action-item.disabled .action-label,\\n.monaco-action-bar .action-item.disabled .action-label:hover {\\n\\topacity: 0.4;\\n}\\n\\n/* Vertical actions */\\n\\n.monaco-action-bar.vertical {\\n\\ttext-align: left;\\n}\\n\\n.monaco-action-bar.vertical .action-item {\\n\\tdisplay: block;\\n}\\n\\n.monaco-action-bar.vertical .action-label.separator {\\n\\tdisplay: block;\\n\\tborder-bottom: 1px solid #bbb;\\n\\tpadding-top: 1px;\\n\\tmargin-left: .8em;\\n\\tmargin-right: .8em;\\n}\\n\\n.monaco-action-bar.animated.vertical .action-item.active {\\n\\t-ms-transform: translate(5px, 0);\\n\\t-webkit-transform: translate(5px, 0);\\n\\t-moz-transform: translate(5px, 0);\\n\\t-o-transform: translate(5px, 0);\\n\\ttransform: translate(5px, 0);\\n}\\n\\n.secondary-actions .monaco-action-bar .action-label {\\n\\tmargin-left: 6px;\\n}\\n\\n/* Action Items */\\n.monaco-action-bar .action-item.select-container {\\n\\toverflow: hidden; /* somehow the dropdown overflows its container, we prevent it here to not push */\\n\\tflex: 1;\\n\\tmax-width: 170px;\\n\\tmin-width: 60px;\\n\\tdisplay: flex;\\n\\talign-items: center;\\n\\tjustify-content: center;\\n}\", \"\"]);\n\n// exports\n","exports = module.exports = require(\"../../../../../../../css-loader/lib/css-base.js\")(false);\n// imports\n\n\n// module\nexports.push([module.id, \"/*---------------------------------------------------------------------------------------------\\n * Copyright (c) Microsoft Corporation. All rights reserved.\\n * Licensed under the MIT License. See License.txt in the project root for license information.\\n *--------------------------------------------------------------------------------------------*/\\n\\n.monaco-aria-container {\\n\\tposition: absolute; /* try to hide from window but not from screen readers */\\n\\tleft:-999em;\\n}\", \"\"]);\n\n// exports\n","exports = module.exports = require(\"../../../../../../../css-loader/lib/css-base.js\")(false);\n// imports\n\n\n// module\nexports.push([module.id, \"/*---------------------------------------------------------------------------------------------\\n * Copyright (c) Microsoft Corporation. All rights reserved.\\n * Licensed under the MIT License. See License.txt in the project root for license information.\\n *--------------------------------------------------------------------------------------------*/\\n\\n.monaco-custom-checkbox {\\n\\tmargin-left: 2px;\\n\\tfloat: left;\\n\\tcursor: pointer;\\n\\toverflow: hidden;\\n\\topacity: 0.7;\\n\\twidth: 20px;\\n\\theight: 20px;\\n\\tborder: 1px solid transparent;\\n\\tpadding: 1px;\\n\\n\\t-webkit-box-sizing:\\tborder-box;\\n\\t-o-box-sizing:\\t\\tborder-box;\\n\\t-moz-box-sizing:\\tborder-box;\\n\\t-ms-box-sizing:\\t\\tborder-box;\\n\\tbox-sizing:\\t\\t\\tborder-box;\\n\\n\\t-webkit-user-select: none;\\n\\t-khtml-user-select: none;\\n\\t-moz-user-select: none;\\n\\t-o-user-select: none;\\n\\t-ms-user-select: none;\\n\\tuser-select: none;\\n}\\n\\n.monaco-custom-checkbox:hover,\\n.monaco-custom-checkbox.checked {\\n\\topacity: 1;\\n}\\n\\n.hc-black .monaco-custom-checkbox {\\n\\tbackground: none;\\n}\\n\\n.hc-black .monaco-custom-checkbox:hover {\\n\\tbackground: none;\\n}\", \"\"]);\n\n// exports\n","exports = module.exports = require(\"../../../../../../../css-loader/lib/css-base.js\")(false);\n// imports\n\n\n// module\nexports.push([module.id, \"/*---------------------------------------------------------------------------------------------\\n * Copyright (c) Microsoft Corporation. All rights reserved.\\n * Licensed under the MIT License. See License.txt in the project root for license information.\\n *--------------------------------------------------------------------------------------------*/\\n\\n.context-view {\\n\\tposition: absolute;\\n\\tz-index: 2000;\\n}\", \"\"]);\n\n// exports\n","exports = module.exports = require(\"../../../../../../../css-loader/lib/css-base.js\")(false);\n// imports\n\n\n// module\nexports.push([module.id, \"/*---------------------------------------------------------------------------------------------\\n * Copyright (c) Microsoft Corporation. All rights reserved.\\n * Licensed under the MIT License. See License.txt in the project root for license information.\\n *--------------------------------------------------------------------------------------------*/\\n\\n.monaco-count-badge {\\n\\tpadding: 0.3em 0.5em;\\n\\tborder-radius: 1em;\\n\\tfont-size: 85%;\\n\\tmin-width: 1.6em;\\n\\tline-height: 1em;\\n\\tfont-weight: normal;\\n\\ttext-align: center;\\n\\tdisplay: inline-block;\\n\\tbox-sizing: border-box;\\n}\", \"\"]);\n\n// exports\n","exports = module.exports = require(\"../../../../../../../css-loader/lib/css-base.js\")(false);\n// imports\n\n\n// module\nexports.push([module.id, \"/*---------------------------------------------------------------------------------------------\\n * Copyright (c) Microsoft Corporation. All rights reserved.\\n * Licensed under the MIT License. See License.txt in the project root for license information.\\n *--------------------------------------------------------------------------------------------*/\\n/* ---------- Find input ---------- */\\n\\n.monaco-findInput {\\n\\tposition: relative;\\n}\\n\\n.monaco-findInput .monaco-inputbox {\\n\\tfont-size: 13px;\\n\\twidth: 100%;\\n\\theight: 25px;\\n}\\n\\n.monaco-findInput > .controls {\\n\\tposition: absolute;\\n\\ttop: 3px;\\n\\tright: 2px;\\n}\\n\\n.vs .monaco-findInput.disabled {\\n\\tbackground-color: #E1E1E1;\\n}\\n\\n/* Theming */\\n.vs-dark .monaco-findInput.disabled {\\n\\tbackground-color: #333;\\n}\\n\\n/* Highlighting */\\n.monaco-findInput.highlight-0 .controls {\\n\\tanimation: monaco-findInput-highlight-0 100ms linear 0s;\\n}\\n.monaco-findInput.highlight-1 .controls {\\n\\tanimation: monaco-findInput-highlight-1 100ms linear 0s;\\n}\\n.hc-black .monaco-findInput.highlight-0 .controls,\\n.vs-dark .monaco-findInput.highlight-0 .controls {\\n\\tanimation: monaco-findInput-highlight-dark-0 100ms linear 0s;\\n}\\n.hc-black .monaco-findInput.highlight-1 .controls,\\n.vs-dark .monaco-findInput.highlight-1 .controls {\\n\\tanimation: monaco-findInput-highlight-dark-1 100ms linear 0s;\\n}\\n\\n@keyframes monaco-findInput-highlight-0 {\\n\\t0% { background: rgba(253, 255, 0, 0.8); }\\n\\t100% { background: transparent; }\\n}\\n@keyframes monaco-findInput-highlight-1 {\\n\\t0% { background: rgba(253, 255, 0, 0.8); }\\n\\t/* Made intentionally different such that the CSS minifier does not collapse the two animations into a single one*/\\n\\t99% { background: transparent; }\\n}\\n\\n@keyframes monaco-findInput-highlight-dark-0 {\\n\\t0% { background: rgba(255, 255, 255, 0.44); }\\n\\t100% { background: transparent; }\\n}\\n@keyframes monaco-findInput-highlight-dark-1 {\\n\\t0% { background: rgba(255, 255, 255, 0.44); }\\n\\t/* Made intentionally different such that the CSS minifier does not collapse the two animations into a single one*/\\n\\t99% { background: transparent; }\\n}\", \"\"]);\n\n// exports\n","exports = module.exports = require(\"../../../../../../../css-loader/lib/css-base.js\")(false);\n// imports\n\n\n// module\nexports.push([module.id, \"/*---------------------------------------------------------------------------------------------\\n * Copyright (c) Microsoft Corporation. All rights reserved.\\n * Licensed under the MIT License. See License.txt in the project root for license information.\\n *--------------------------------------------------------------------------------------------*/\\n\\n.vs .monaco-custom-checkbox.monaco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LjMxNi4yMTUuMTYuMzU3LjIxMS4zMDguMDc2LjQ5NS4wNzZjLjI0MiAwIC40NjUtLjA0NS42NjgtLjEzNXMuMzc4LS4yMTQuNTI0LS4zNzIuMjYxLS4zNDQuMzQzLS41NTcuMTIzLS40NDIuMTIzLS42ODh2LS42MDlsLTEuNDY1LjIwNXoiLz48L2c+PC9zdmc+\\\") center center no-repeat;\\n}\\n.hc-black .monaco-custom-checkbox.monaco-case-sensitive,\\n.hc-black .monaco-custom-checkbox.monaco-case-sensitive:hover,\\n.vs-dark .monaco-custom-checkbox.monaco-case-sensitive {\\n\\tbackground: url(\\\"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+PHN0eWxlIHR5cGU9InRleHQvY3NzIj4uc3Qwe29wYWNpdHk6MDtmaWxsOiMyNjI2MjY7fSAuc3Qxe2ZpbGw6IzI2MjYyNjt9IC5zdDJ7ZmlsbDojQzVDNUM1O308L3N0eWxlPjxnIGlkPSJvdXRsaW5lIj48cmVjdCBjbGFzcz0ic3QwIiB3aWR0aD0iMTYiIGhlaWdodD0iMTYiLz48cGF0aCBjbGFzcz0ic3QxIiBkPSJNMTQuMTc2IDUuNTkyYy0uNTU1LS42LTEuMzM2LS45MDQtMi4zMjItLjkwNC0uMjU4IDAtLjUyMS4wMjQtLjc4NC4wNzItLjI0Ni4wNDQtLjQ3OS4xMDEtLjcuMTY5LS4yMjguMDctLjQzMi4xNDctLjYxMy4yMjktLjIyLjA5OS0uMzg5LjE5Ni0uNTEyLjI4NGwtLjQxOS4yOTl2Mi43MDFjLS4wODYuMTA4LS4xNjIuMjIzLS4yMjkuMzQ0bC0yLjQ1LTYuMzU0aC0yLjM5NGwtMy43NTMgOS44MDR2LjU5OGgzLjAyNWwuODM4LTIuMzVoMi4xNjdsLjg5MSAyLjM1aDMuMjM3bC0uMDAxLS4wMDNjLjMwNS4wOTIu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k0MWwtMi40NDEgNy4wODYtLjAyNS4wNzJoMS4wODV6bTEuODI3LTUuNjA5aC4wMjJsLjkxNCAyLjc1M2gtMS44NDFsLjkwNS0yLjc1M3oiLz48L2c+PC9zdmc+\\\") center center no-repeat;\\n}\\n.hc-black .monaco-custom-checkbox.monaco-whole-word,\\n.hc-black .monaco-custom-checkbox.monaco-whole-word:hover,\\n.vs-dark .monaco-custom-checkbox.monaco-whole-word {\\n\\tbackground: url(\\\"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+PHN0eWxlIHR5cGU9InRleHQvY3NzIj4uc3Qwe29wYWNpdHk6MDtmaWxsOiMyNjI2MjY7fSAuc3Qxe2ZpbGw6IzI2MjYyNjt9IC5zdDJ7ZmlsbDojQzVDNUM1O308L3N0eWxlPjxnIGlkPSJvdXRsaW5lIj48cmVjdCBjbGFzcz0ic3QwIiB3aWR0aD0iMTYiIGhlaWdodD0iMTYiLz48cGF0aCBjbGFzcz0ic3QxIiBkPSJNMTYgNC4wMjJ2LTMuMDIyaC0xNi4wMTR2My4wMjJoMy4wNDZsLTMuMDQzIDcuOTQ1aC0uMDA0di4wMWwuMDE1IDEuMDIzaC0uMDE0djEuOTkxaDE2LjAxNHYtMy4wMjNoLTF2LTcuOTQ2aDF6bS01LjkxNCA1LjMwMWMwIC4yMzMtLjAyMy40NDEtLjA2Ni41OTUtLjA0Ny4xNjQtLjA5OS4yNDctLjEyNy4yODRsLS4wNzguMDY5LS4xNTEuMDI2LS4xMTUtLjAxNy0uMTM5LS4xMzdjLS4wMzEtLjA3OC0uMTEyLS4zMzItLjExMi0uNTY2IDAtLjI1NC4wOTEtLjU2MS4xMjYtLjY1NmwuMDY5LS4xNDEuMTA5LS4wODIuMTc4LS4wMjdjLjA3NyAwIC4xMTcuMDE0LjE3Ny4wNTZsLjA4Ny4xNzkuMDUxLjIzNy0uMDA5L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bnRzPSIxMy42NCw3LjM5NiAxMi4xNjksMi44OTggMTAuNzA2LDMuNzYxIDExLjA4NywyIDYuNTU3LDIgNi45MzYsMy43NjIgNS40NzMsMi44OTggNCw3LjM5NiA1LjY4Miw3LjU1NCA0LjUxMyw4LjU2MSA1LjAxMyw5IDIsOSAyLDE0IDcsMTQgNywxMC43NDcgNy45NzgsMTEuNjA2IDguODIsOS43MjUgOS42NjEsMTEuNjAyIDEzLjE0NCw4LjU2MiAxMS45NjgsNy41NTQiLz48ZyBmaWxsPSIjNDI0MjQyIj48cGF0aCBkPSJNMTIuMzAxIDYuNTE4bC0yLjc3Mi4yNjIgMi4wODYgMS43ODgtMS41OTQgMS4zOTItMS4yMDEtMi42ODItMS4yMDEgMi42ODItMS41ODMtMS4zOTIgMi4wNzUtMS43ODgtMi43NzEtLjI2Mi42OTYtMi4xMjYgMi4zNTggMS4zOTItLjU5OS0yLjc4NGgyLjA1M2wtLjYwMiAyLjc4MyAyLjM1OS0xLjM5Mi42OTYgMi4xMjd6Ii8+PHJlY3QgeD0iMyIgeT0iMTAiIHdpZHRoPSIzIiBoZWlnaHQ9IjMiLz48L2c+PC9zdmc+\\\") center center no-repeat;\\n}\\n.hc-black .monaco-custom-checkbox.monaco-regex,\\n.hc-black .monaco-custom-checkbox.monaco-regex:hover,\\n.vs-dark .monaco-custom-checkbox.monaco-regex {\\n\\tbackground: url(\\\"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+PHBvbHlnb24gZmlsbD0iIzJkMmQzMCIgcG9pbnRzPSIxMy42NCw3LjM5NiAxMi4xNjksMi44OTggMTAuNzA2LDMuNzYxIDExLjA4NywyIDYuNTU3LDIgNi45MzYsMy43NjIgNS40NzMsMi44OTggNCw3LjM5NiA1LjY4Miw3LjU1NCA0LjUxMyw4LjU2MSA1LjAxMyw5IDIsOSAyLDE0IDcsMTQgNywxMC43NDcgNy45NzgsMTEuNjA2IDguODIsOS43MjUgOS42NjEsMTEuNjAyIDEzLjE0NCw4LjU2MiAxMS45NjgsNy41NTQiLz48ZyBmaWxsPSIjQzVDNUM1Ij48cGF0aCBkPSJNMTIuMzAxIDYuNTE4bC0yLjc3Mi4yNjIgMi4wODYgMS43ODgtMS41OTQgMS4zOTItMS4yMDEtMi42ODItMS4yMDEgMi42ODItMS41ODMtMS4zOTIgMi4wNzUtMS43ODgtMi43NzEtLjI2Mi42OTYtMi4xMjYgMi4zNTggMS4zOTItLjU5OS0yLjc4NGgyLjA1M2wtLjYwMiAyLjc4MyAyLjM1OS0xLjM5Mi42OTYgMi4xMjd6Ii8+PHJlY3QgeD0iMyIgeT0iMTAiIHdpZHRoPSIzIiBoZWlnaHQ9IjMiLz48L2c+PC9zdmc+\\\") center center no-repeat;\\n}\\n\", \"\"]);\n\n// exports\n","exports = module.exports = require(\"../../../../../../../css-loader/lib/css-base.js\")(false);\n// imports\n\n\n// module\nexports.push([module.id, \"/*---------------------------------------------------------------------------------------------\\n * Copyright (c) Microsoft Corporation. All rights reserved.\\n * Licensed under the MIT License. See License.txt in the project root for license information.\\n *--------------------------------------------------------------------------------------------*/\\n\\n/* ---------- Icon label ---------- */\\n\\n.monaco-icon-label {\\n\\tdisplay: flex; /* required for icons support :before rule */\\n\\toverflow: hidden;\\n\\ttext-overflow: ellipsis;\\n}\\n\\n.monaco-icon-label::before {\\n\\n\\t/* svg icons rendered as background image */\\n\\tbackground-size: 16px;\\n\\tbackground-position: left center;\\n\\tbackground-repeat: no-repeat;\\n\\tpadding-right: 6px;\\n\\twidth: 16px;\\n\\theight: 22px;\\n\\tdisplay: inline-block;\\n\\n\\t/* fonts icons */\\n\\t-webkit-font-smoothing: antialiased;\\n\\tvertical-align: top;\\n\\n\\tflex-shrink: 0; /* fix for https://github.com/Microsoft/vscode/issues/13787 */\\n}\\n\\n.monaco-icon-label > .monaco-icon-label-description-container {\\n\\toverflow: hidden; /* this causes the label/description to shrink first if decorations are enabled */\\n\\ttext-overflow: ellipsis;\\n}\\n\\n.monaco-icon-label > .monaco-icon-label-description-container > .label-name {\\n\\tcolor: inherit;\\n\\twhite-space: pre; /* enable to show labels that include multiple whitespaces */\\n}\\n\\n.monaco-icon-label > .monaco-icon-label-description-container > .label-description {\\n\\tmargin-left: 0.5em;\\n\\tfont-size: 0.9em;\\n\\twhite-space: pre; /* enable to show labels that include multiple whitespaces */\\n}\\n\\n.monaco-icon-label.italic > .monaco-icon-label-description-container > .label-name,\\n.monaco-icon-label.italic > .monaco-icon-label-description-container > .label-description {\\n\\tfont-style: italic;\\n}\\n\\n.monaco-icon-label::after {\\n\\topacity: 0.75;\\n\\tfont-size: 90%;\\n\\tfont-weight: 600;\\n\\tpadding: 0 12px 0 5px;\\n\\tmargin-left: auto;\\n\\ttext-align: center;\\n}\\n\\n/* make sure selection color wins when a label is being selected */\\n.monaco-tree.focused .selected .monaco-icon-label, /* tree */\\n.monaco-tree.focused .selected .monaco-icon-label::after,\\n.monaco-list:focus .selected .monaco-icon-label, /* list */\\n.monaco-list:focus .selected .monaco-icon-label::after\\n{\\n\\tcolor: inherit !important;\\n}\\n\", \"\"]);\n\n// exports\n","exports = module.exports = require(\"../../../../../../../css-loader/lib/css-base.js\")(false);\n// imports\n\n\n// module\nexports.push([module.id, \"/*---------------------------------------------------------------------------------------------\\n * Copyright (c) Microsoft Corporation. All rights reserved.\\n * Licensed under the MIT License. See License.txt in the project root for license information.\\n *--------------------------------------------------------------------------------------------*/\\n\\n.monaco-inputbox {\\n\\tposition: relative;\\n\\tdisplay: block;\\n\\tpadding: 0;\\n\\t-webkit-box-sizing:\\tborder-box;\\n\\t-o-box-sizing:\\t\\tborder-box;\\n\\t-moz-box-sizing:\\tborder-box;\\n\\t-ms-box-sizing:\\t\\tborder-box;\\n\\tbox-sizing:\\t\\t\\tborder-box;\\n\\tline-height: auto !important;\\n\\n\\t/* Customizable */\\n\\tfont-size: inherit;\\n}\\n\\n.monaco-inputbox.idle {\\n\\tborder: 1px solid transparent;\\n}\\n\\n.monaco-inputbox > .wrapper > .input,\\n.monaco-inputbox > .wrapper > .mirror {\\n\\n\\t/* Customizable */\\n\\tpadding: 4px;\\n}\\n\\n.monaco-inputbox > .wrapper {\\n\\tposition: relative;\\n\\twidth: 100%;\\n\\theight: 100%;\\n}\\n\\n.monaco-inputbox > .wrapper > .input {\\n\\tdisplay: inline-block;\\n\\t-webkit-box-sizing:\\tborder-box;\\n\\t-o-box-sizing:\\t\\tborder-box;\\n\\t-moz-box-sizing:\\tborder-box;\\n\\t-ms-box-sizing:\\t\\tborder-box;\\n\\tbox-sizing:\\t\\t\\tborder-box;\\n\\twidth: 100%;\\n\\theight: 100%;\\n\\tline-height: inherit;\\n\\tborder: none;\\n\\tfont-family: inherit;\\n\\tfont-size: inherit;\\n\\tresize: none;\\n\\tcolor: inherit;\\n}\\n\\n.monaco-inputbox > .wrapper > input {\\n\\ttext-overflow: ellipsis;\\n}\\n\\n.monaco-inputbox > .wrapper > textarea.input {\\n\\tdisplay: block;\\n\\toverflow: hidden;\\n}\\n\\n.monaco-inputbox > .wrapper > .mirror {\\n\\tposition: absolute;\\n\\tdisplay: inline-block;\\n\\twidth: 100%;\\n\\ttop: 0;\\n\\tleft: 0;\\n\\t-webkit-box-sizing:\\tborder-box;\\n\\t-o-box-sizing:\\t\\tborder-box;\\n\\t-moz-box-sizing:\\tborder-box;\\n\\t-ms-box-sizing:\\t\\tborder-box;\\n\\tbox-sizing:\\t\\t\\tborder-box;\\n\\twhite-space: pre-wrap;\\n\\tvisibility: hidden;\\n\\tmin-height: 26px;\\n\\tword-wrap: break-word;\\n}\\n\\n/* Context view */\\n\\n.monaco-inputbox-container {\\n\\ttext-align: right;\\n}\\n\\n.monaco-inputbox-container .monaco-inputbox-message {\\n\\tdisplay: inline-block;\\n\\toverflow: hidden;\\n\\ttext-align: left;\\n\\twidth: 100%;\\n\\t-webkit-box-sizing:\\tborder-box;\\n\\t-o-box-sizing:\\t\\tborder-box;\\n\\t-moz-box-sizing:\\tborder-box;\\n\\t-ms-box-sizing:\\t\\tborder-box;\\n\\tbox-sizing:\\t\\t\\tborder-box;\\n\\tpadding: 0.4em;\\n\\tfont-size: 12px;\\n\\tline-height: 17px;\\n\\tmin-height: 34px;\\n\\tmargin-top: -1px;\\n\\tword-wrap: break-word;\\n}\\n\\n/* Action bar support */\\n.monaco-inputbox .monaco-action-bar {\\n\\tposition: absolute;\\n\\tright: 2px;\\n\\ttop: 4px;\\n}\\n\\n.monaco-inputbox .monaco-action-bar .action-item {\\n\\tmargin-left: 2px;\\n}\\n\\n.monaco-inputbox .monaco-action-bar .action-item .icon {\\n\\tbackground-repeat: no-repeat;\\n\\twidth: 16px;\\n\\theight: 16px;\\n}\", \"\"]);\n\n// exports\n","exports = module.exports = require(\"../../../../../../../css-loader/lib/css-base.js\")(false);\n// imports\n\n\n// module\nexports.push([module.id, \"/*---------------------------------------------------------------------------------------------\\n * Copyright (c) Microsoft Corporation. All rights reserved.\\n * Licensed under the MIT License. See License.txt in the project root for license information.\\n *--------------------------------------------------------------------------------------------*/\\n\\n.monaco-keybinding {\\n\\tdisplay: flex;\\n\\talign-items: center;\\n\\tline-height: 10px;\\n}\\n\\n.monaco-keybinding > .monaco-keybinding-key {\\n\\tdisplay: inline-block;\\n\\tborder: solid 1px rgba(204, 204, 204, 0.4);\\n\\tborder-bottom-color: rgba(187, 187, 187, 0.4);\\n\\tborder-radius: 3px;\\n\\tbox-shadow: inset 0 -1px 0 rgba(187, 187, 187, 0.4);\\n\\tbackground-color: rgba(221, 221, 221, 0.4);\\n\\tvertical-align: middle;\\n\\tcolor: #555;\\n\\tfont-size: 11px;\\n\\tpadding: 3px 5px;\\n}\\n\\n.hc-black .monaco-keybinding > .monaco-keybinding-key,\\n.vs-dark .monaco-keybinding > .monaco-keybinding-key {\\n\\tbackground-color: rgba(128, 128, 128, 0.17);\\n\\tcolor: #ccc;\\n\\tborder: solid 1px rgba(51, 51, 51, 0.6);\\n\\tborder-bottom-color: rgba(68, 68, 68, 0.6);\\n\\tbox-shadow: inset 0 -1px 0 rgba(68, 68, 68, 0.6);\\n}\\n\\n.monaco-keybinding > .monaco-keybinding-key-separator {\\n\\tdisplay: inline-block;\\n}\\n\\n.monaco-keybinding > .monaco-keybinding-key-chord-separator {\\n\\twidth: 2px;\\n}\", \"\"]);\n\n// exports\n","exports = module.exports = require(\"../../../../../../../css-loader/lib/css-base.js\")(false);\n// imports\n\n\n// module\nexports.push([module.id, \"/*---------------------------------------------------------------------------------------------\\n * Copyright (c) Microsoft Corporation. All rights reserved.\\n * Licensed under the MIT License. See License.txt in the project root for license information.\\n *--------------------------------------------------------------------------------------------*/\\n\\n.monaco-list {\\n\\tposition: relative;\\n\\theight: 100%;\\n\\twidth: 100%;\\n\\twhite-space: nowrap;\\n\\t-webkit-user-select: none;\\n\\t-khtml-user-select: none;\\n\\t-moz-user-select: -moz-none;\\n\\t-ms-user-select: none;\\n\\t-o-user-select: none;\\n\\tuser-select: none;\\n}\\n\\n.monaco-list > .monaco-scrollable-element {\\n\\theight: 100%;\\n}\\n\\n.monaco-list-rows {\\n\\tposition: relative;\\n\\twidth: 100%;\\n\\theight: 100%;\\n}\\n\\n.monaco-list-row {\\n\\tposition: absolute;\\n\\t-moz-box-sizing:\\tborder-box;\\n\\t-o-box-sizing:\\t\\tborder-box;\\n\\t-ms-box-sizing:\\t\\tborder-box;\\n\\tbox-sizing:\\t\\t\\tborder-box;\\n\\tcursor: pointer;\\n\\toverflow: hidden;\\n\\twidth: 100%;\\n\\ttouch-action: none;\\n}\\n\\n/* for OS X ballistic scrolling */\\n.monaco-list-row.scrolling {\\n\\tdisplay: none !important;\\n}\\n\\n/* Focus */\\n.monaco-list.element-focused, .monaco-list.selection-single, .monaco-list.selection-multiple {\\n\\toutline: 0 !important;\\n}\", \"\"]);\n\n// exports\n","exports = module.exports = require(\"../../../../../../../css-loader/lib/css-base.js\")(false);\n// imports\n\n\n// module\nexports.push([module.id, \"/*---------------------------------------------------------------------------------------------\\n * Copyright (c) Microsoft Corporation. All rights reserved.\\n * Licensed under the MIT License. See License.txt in the project root for license information.\\n *--------------------------------------------------------------------------------------------*/\\n\\n.monaco-menu .monaco-action-bar.vertical {\\n\\tmargin-left: 0;\\n\\toverflow: visible;\\n}\\n\\n.monaco-menu .monaco-action-bar.vertical .actions-container {\\n\\tdisplay: block;\\n}\\n\\n.monaco-menu .monaco-action-bar.vertical .action-item {\\n\\tpadding: 0;\\n\\t-ms-transform: none;\\n\\t-webkit-transform: none;\\n\\t-moz-transform: none;\\n\\t-o-transform: none;\\n\\ttransform: none;\\n\\tdisplay: -ms-flexbox;\\n\\tdisplay: flex;\\n}\\n\\n.monaco-menu .monaco-action-bar.vertical .action-item.active {\\n\\t-ms-transform: none;\\n\\t-webkit-transform: none;\\n\\t-moz-transform: none;\\n\\t-o-transform: none;\\n\\ttransform: none;\\n}\\n\\n.monaco-menu .monaco-action-bar.vertical .action-item.focused {\\n\\tbackground-color: #E4E4E4;\\n}\\n\\n.monaco-menu .monaco-action-bar.vertical .action-menu-item {\\n\\t-ms-flex: 1 1 auto;\\n\\tflex: 1 1 auto;\\n\\tdisplay: -ms-flexbox;\\n\\tdisplay: flex;\\n\\theight: 2em;\\n\\talign-items: center;\\n}\\n\\n.monaco-menu .monaco-action-bar.vertical .action-label {\\n\\t-ms-flex: 1 1 auto;\\n\\tflex: 1 1 auto;\\n\\ttext-decoration: none;\\n\\tpadding: 0 1em;\\n\\tbackground: none;\\n\\tfont-size: 12px;\\n\\tline-height: 1;\\n}\\n\\n.monaco-menu .monaco-action-bar.vertical .keybinding,\\n.monaco-menu .monaco-action-bar.vertical .submenu-indicator {\\n\\tdisplay: inline-block;\\n\\t-ms-flex: 2 1 auto;\\n\\tflex: 2 1 auto;\\n\\tpadding: 0 1em;\\n\\ttext-align: right;\\n\\tfont-size: 12px;\\n\\tline-height: 1;\\n}\\n\\n\\n.monaco-menu .monaco-action-bar.vertical .action-item.disabled .keybinding,\\n.monaco-menu .monaco-action-bar.vertical .action-item.disabled .submenu-indicator {\\n\\topacity: 0.4;\\n}\\n\\n.monaco-menu .monaco-action-bar.vertical .action-label:not(.separator) {\\n\\tdisplay: inline-block;\\n\\t-webkit-box-sizing:\\tborder-box;\\n\\t-o-box-sizing:\\t\\tborder-box;\\n\\t-moz-box-sizing:\\tborder-box;\\n\\t-ms-box-sizing:\\t\\tborder-box;\\n\\tbox-sizing:\\t\\t\\tborder-box;\\n\\tmargin: 0;\\n}\\n\\n.monaco-menu .monaco-action-bar.vertical .action-label.separator {\\n\\tpadding: 0.5em 0 0 0;\\n\\tmargin-bottom: 0.5em;\\n\\twidth: 100%;\\n}\\n\\n.monaco-menu .monaco-action-bar.vertical .action-label.separator.text {\\n\\tpadding: 0.7em 1em 0.1em 1em;\\n\\tfont-weight: bold;\\n\\topacity: 1;\\n}\\n\\n.monaco-menu .monaco-action-bar.vertical .action-label:hover {\\n\\tcolor: inherit;\\n}\\n\\n.monaco-menu .monaco-action-bar.vertical .action-label.checked:after {\\n\\tcontent: ' \\\\2713';\\n}\\n\\n/* Context Menu */\\n\\n.context-view.monaco-menu-container {\\n\\tfont-family: \\\"Segoe WPC\\\", \\\"Segoe UI\\\", \\\".SFNSDisplay-Light\\\", \\\"SFUIText-Light\\\", \\\"HelveticaNeue-Light\\\", sans-serif, \\\"Droid Sans Fallback\\\";\\n\\toutline: 0;\\n\\tbox-shadow: 0 2px 8px #A8A8A8;\\n\\tborder: none;\\n\\tcolor: #646465;\\n\\tbackground-color: white;\\n\\t-webkit-animation: fadeIn 0.083s linear;\\n\\t-o-animation: fadeIn 0.083s linear;\\n\\t-moz-animation: fadeIn 0.083s linear;\\n\\t-ms-animation: fadeIn 0.083s linear;\\n\\tanimation: fadeIn 0.083s linear;\\n}\\n\\n.context-view.monaco-menu-container :focus,\\n.context-view.monaco-menu-container .monaco-action-bar.vertical:focus,\\n.context-view.monaco-menu-container .monaco-action-bar.vertical :focus {\\n\\toutline: 0;\\n}\\n\\n.monaco-menu .monaco-action-bar.vertical .action-item {\\n\\tborder: 1px solid transparent; /* prevents jumping behaviour on hover or focus */\\n}\\n\\n/* Dark theme */\\n.vs-dark .monaco-menu .monaco-action-bar.vertical .action-item.focused {\\n\\tbackground-color: #4B4C4D;\\n}\\n\\n.vs-dark .context-view.monaco-menu-container {\\n\\tbox-shadow: 0 2px 8px #000;\\n\\tcolor: #BBB;\\n\\tbackground-color: #2D2F31;\\n}\\n\\n/* High Contrast Theming */\\n.hc-black .context-view.monaco-menu-container {\\n\\tborder: 2px solid #6FC3DF;\\n\\tcolor: white;\\n\\tbackground-color: #0C141F;\\n\\tbox-shadow: none;\\n}\\n\\n.hc-black .monaco-menu .monaco-action-bar.vertical .action-item.focused {\\n\\tbackground: none;\\n\\tborder: 1px dotted #f38518;\\n}\", \"\"]);\n\n// exports\n","exports = module.exports = require(\"../../../../../../../css-loader/lib/css-base.js\")(false);\n// imports\n\n\n// module\nexports.push([module.id, \"/*---------------------------------------------------------------------------------------------\\n * Copyright (c) Microsoft Corporation. All rights reserved.\\n * Licensed under the MIT License. See License.txt in the project root for license information.\\n *--------------------------------------------------------------------------------------------*/\\n\\n.monaco-progress-container {\\n\\twidth: 100%;\\n\\theight: 5px;\\n\\toverflow: hidden; /* keep progress bit in bounds */\\n}\\n\\n.monaco-progress-container .progress-bit {\\n\\twidth: 2%;\\n\\theight: 5px;\\n\\tposition: absolute;\\n\\tleft: 0;\\n\\tdisplay: none;\\n}\\n\\n.monaco-progress-container.active .progress-bit {\\n\\tdisplay: inherit;\\n}\\n\\n.monaco-progress-container.discrete .progress-bit {\\n\\tleft: 0;\\n\\ttransition: width 100ms linear;\\n\\t-webkit-transition: width 100ms linear;\\n\\t-o-transition: width 100ms linear;\\n\\t-moz-transition: width 100ms linear;\\n\\t-ms-transition: width 100ms linear;\\n}\\n\\n.monaco-progress-container.discrete.done .progress-bit {\\n\\twidth: 100%;\\n}\\n\\n.monaco-progress-container.infinite .progress-bit {\\n\\tanimation-name: progress;\\n\\tanimation-duration: 4s;\\n\\tanimation-iteration-count: infinite;\\n\\tanimation-timing-function: linear;\\n\\t-ms-animation-name: progress;\\n\\t-ms-animation-duration: 4s;\\n\\t-ms-animation-iteration-count: infinite;\\n\\t-ms-animation-timing-function: linear;\\n\\t-webkit-animation-name: progress;\\n\\t-webkit-animation-duration: 4s;\\n\\t-webkit-animation-iteration-count: infinite;\\n\\t-webkit-animation-timing-function: linear;\\n\\t-moz-animation-name: progress;\\n\\t-moz-animation-duration: 4s;\\n\\t-moz-animation-iteration-count: infinite;\\n\\t-moz-animation-timing-function: linear;\\n\\twill-change: transform;\\n}\\n\\n/**\\n * The progress bit has a width: 2% (1/50) of the parent container. The animation moves it from 0% to 100% of\\n * that container. Since translateX is relative to the progress bit size, we have to multiple it with\\n * its relative size to the parent container:\\n * 50%: 50 * 50 = 2500%\\n * 100%: 50 * 100 - 50 (do not overflow): 4950%\\n */\\n@keyframes progress { from { transform: translateX(0%) scaleX(1) } 50% { transform: translateX(2500%) scaleX(3) } to { transform: translateX(4950%) scaleX(1) } }\\n@-ms-keyframes progress { from { transform: translateX(0%) scaleX(1) }\\t50% { transform: translateX(2500%) scaleX(3) } to { transform: translateX(4950%) scaleX(1) } }\\n@-webkit-keyframes progress { from { transform: translateX(0%) scaleX(1) }\\t50% { transform: translateX(2500%) scaleX(3) } to { transform: translateX(4950%) scaleX(1) } }\\n@-moz-keyframes progress { from { transform: translateX(0%) scaleX(1) }\\t50% { transform: translateX(2500%) scaleX(3) } to { transform: translateX(4950%) scaleX(1) } }\", \"\"]);\n\n// exports\n","exports = module.exports = require(\"../../../../../../../css-loader/lib/css-base.js\")(false);\n// imports\n\n\n// module\nexports.push([module.id, \"/*---------------------------------------------------------------------------------------------\\n * Copyright (c) Microsoft Corporation. All rights reserved.\\n * Licensed under the MIT License. See License.txt in the project root for license information.\\n *--------------------------------------------------------------------------------------------*/\\n\\n.monaco-sash {\\n\\tposition: absolute;\\n\\tz-index: 90;\\n\\ttouch-action: none;\\n}\\n\\n.monaco-sash.disabled {\\n\\tpointer-events: none;\\n}\\n\\n.monaco-sash.vertical {\\n\\tcursor: ew-resize;\\n\\ttop: 0;\\n\\twidth: 4px;\\n\\theight: 100%;\\n}\\n\\n.monaco-sash.mac.vertical {\\n\\tcursor: col-resize;\\n}\\n\\n.monaco-sash.vertical.minimum {\\n\\tcursor: e-resize;\\n}\\n\\n.monaco-sash.vertical.maximum {\\n\\tcursor: w-resize;\\n}\\n\\n.monaco-sash.horizontal {\\n\\tcursor: ns-resize;\\n\\tleft: 0;\\n\\twidth: 100%;\\n\\theight: 4px;\\n}\\n\\n.monaco-sash.mac.horizontal {\\n\\tcursor: row-resize;\\n}\\n\\n.monaco-sash.horizontal.minimum {\\n\\tcursor: s-resize;\\n}\\n\\n.monaco-sash.horizontal.maximum {\\n\\tcursor: n-resize;\\n}\\n\\n.monaco-sash:not(.disabled).orthogonal-start::before,\\n.monaco-sash:not(.disabled).orthogonal-end::after {\\n\\tcontent: ' ';\\n\\theight: 8px;\\n\\twidth: 8px;\\n\\tz-index: 100;\\n\\tdisplay: block;\\n\\tcursor: all-scroll;\\n\\tposition: absolute;\\n}\\n\\n.monaco-sash.orthogonal-start.vertical::before {\\n\\tleft: -2px;\\n\\ttop: -4px;\\n}\\n\\n.monaco-sash.orthogonal-end.vertical::after {\\n\\tleft: -2px;\\n\\tbottom: -4px;\\n}\\n\\n.monaco-sash.orthogonal-start.horizontal::before {\\n\\ttop: -2px;\\n\\tleft: -4px;\\n}\\n\\n.monaco-sash.orthogonal-end.horizontal::after {\\n\\ttop: -2px;\\n\\tright: -4px;\\n}\\n\\n.monaco-sash.disabled {\\n\\tcursor: default !important;\\n}\\n\\n/** Touch **/\\n\\n.monaco-sash.touch.vertical {\\n\\twidth: 20px;\\n}\\n\\n.monaco-sash.touch.horizontal {\\n\\theight: 20px;\\n}\\n\\n/** Debug **/\\n\\n.monaco-sash.debug:not(.disabled) {\\n\\tbackground: cyan;\\n}\\n\\n.monaco-sash.debug:not(.disabled).orthogonal-start::before,\\n.monaco-sash.debug:not(.disabled).orthogonal-end::after {\\n\\tbackground: red;\\n}\", \"\"]);\n\n// exports\n","exports = module.exports = require(\"../../../../../../../../css-loader/lib/css-base.js\")(false);\n// imports\n\n\n// module\nexports.push([module.id, \"/*---------------------------------------------------------------------------------------------\\n * Copyright (c) Microsoft Corporation. All rights reserved.\\n * Licensed under the MIT License. See License.txt in the project root for license information.\\n *--------------------------------------------------------------------------------------------*/\\n\\n/* Arrows */\\n.monaco-scrollable-element > .scrollbar > .up-arrow {\\n\\tbackground: url(\\\"data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMTEgMTEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0ibTkuNDgwNDYsOC45NjE1bDEuMjYsLTEuMjZsLTUuMDQsLTUuMDRsLTUuNDYsNS4wNGwxLjI2LDEuMjZsNC4yLC0zLjc4bDMuNzgsMy43OHoiIGZpbGw9IiM0MjQyNDIiLz48L3N2Zz4=\\\");\\n\\tcursor: pointer;\\n}\\n.monaco-scrollable-element > .scrollbar > .down-arrow {\\n\\tbackground: url(\\\"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMSAxMSI+PHBhdGggdHJhbnNmb3JtPSJyb3RhdGUoLTE4MCA1LjQ5MDQ1OTkxODk3NTgzLDUuODExNTAwMDcyNDc5MjQ4KSIgZmlsbD0iIzQyNDI0MiIgZD0ibTkuNDgwNDYsOC45NjE1bDEuMjYsLTEuMjZsLTUuMDQsLTUuMDRsLTUuNDYsNS4wNGwxLjI2LDEuMjZsNC4yLC0zLjc4bDMuNzgsMy43OHoiLz48L3N2Zz4=\\\");\\n\\tcursor: pointer;\\n}\\n.monaco-scrollable-element > .scrollbar > .left-arrow {\\n\\tbackground: url(\\\"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMSAxMSI+PHBhdGggdHJhbnNmb3JtPSJyb3RhdGUoLTkwIDUuNDkwNDU5OTE4OTc1ODMxLDUuNDMxMzgyMTc5MjYwMjU0KSIgZmlsbD0iIzQyNDI0MiIgZD0ibTkuNDgwNDYsOC41ODEzOGwxLjI2LC0xLjI2bC01LjA0LC01LjA0bC01LjQ2LDUuMDRsMS4yNiwxLjI2bDQuMiwtMy43OGwzLjc4LDMuNzh6Ii8+PC9zdmc+\\\");\\n\\tcursor: pointer;\\n}\\n.monaco-scrollable-element > .scrollbar > .right-arrow {\\n\\tbackground: url(\\\"data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMTEgMTEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggdHJhbnNmb3JtPSJyb3RhdGUoOTAgNS42MTcxNjUwODg2NTM1NjQ1LDUuNTU4MDg5NzMzMTIzNzgpICIgZmlsbD0iIzQyNDI0MiIgZD0ibTkuNjA3MTcsOC43MDgwOWwxLjI2LC0xLjI2bC01LjA0LC01LjA0bC01LjQ2LDUuMDRsMS4yNiwxLjI2bDQuMiwtMy43OGwzLjc4LDMuNzh6Ii8+PC9zdmc+\\\");\\n\\tcursor: pointer;\\n}\\n\\n.hc-black .monaco-scrollable-element > .scrollbar > .up-arrow,\\n.vs-dark .monaco-scrollable-element > .scrollbar > .up-arrow {\\n\\tbackground: url(\\\"data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMTEgMTEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0ibTkuNDgwNDYsOC45NjE1bDEuMjYsLTEuMjZsLTUuMDQsLTUuMDRsLTUuNDYsNS4wNGwxLjI2LDEuMjZsNC4yLC0zLjc4bDMuNzgsMy43OHoiIGZpbGw9IiNFOEU4RTgiLz48L3N2Zz4=\\\");\\n}\\n.hc-black .monaco-scrollable-element > .scrollbar > .down-arrow,\\n.vs-dark .monaco-scrollable-element > .scrollbar > .down-arrow {\\n\\tbackground: url(\\\"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMSAxMSI+PHBhdGggdHJhbnNmb3JtPSJyb3RhdGUoLTE4MCA1LjQ5MDQ1OTkxODk3NTgzLDUuODExNTAwMDcyNDc5MjQ4KSIgZmlsbD0iI0U4RThFOCIgZD0ibTkuNDgwNDYsOC45NjE1bDEuMjYsLTEuMjZsLTUuMDQsLTUuMDRsLTUuNDYsNS4wNGwxLjI2LDEuMjZsNC4yLC0zLjc4bDMuNzgsMy43OHoiLz48L3N2Zz4=\\\");\\n}\\n.hc-black .monaco-scrollable-element > .scrollbar > .left-arrow,\\n.vs-dark .monaco-scrollable-element > .scrollbar > .left-arrow {\\n\\tbackground: url(\\\"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMSAxMSI+PHBhdGggdHJhbnNmb3JtPSJyb3RhdGUoLTkwIDUuNDkwNDU5OTE4OTc1ODMxLDUuNDMxMzgyMTc5MjYwMjU0KSIgZmlsbD0iI0U4RThFOCIgZD0ibTkuNDgwNDYsOC41ODEzOGwxLjI2LC0xLjI2bC01LjA0LC01LjA0bC01LjQ2LDUuMDRsMS4yNiwxLjI2bDQuMiwtMy43OGwzLjc4LDMuNzh6Ii8+PC9zdmc+\\\");\\n}\\n.hc-black .monaco-scrollable-element > .scrollbar > .right-arrow,\\n.vs-dark .monaco-scrollable-element > .scrollbar > .right-arrow {\\n\\tbackground: url(\\\"data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMTEgMTEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggdHJhbnNmb3JtPSJyb3RhdGUoOTAgNS42MTcxNjUwODg2NTM1NjQ1LDUuNTU4MDg5NzMzMTIzNzgpICIgZmlsbD0iI0U4RThFOCIgZD0ibTkuNjA3MTcsOC43MDgwOWwxLjI2LC0xLjI2bC01LjA0LC01LjA0bC01LjQ2LDUuMDRsMS4yNiwxLjI2bDQuMiwtMy43OGwzLjc4LDMuNzh6Ii8+PC9zdmc+\\\");\\n}\\n\\n.monaco-scrollable-element > .visible {\\n\\topacity: 1;\\n\\n\\t/* Background rule added for IE9 - to allow clicks on dom node */\\n\\tbackground:rgba(0,0,0,0);\\n\\n\\t-webkit-transition: opacity 100ms linear;\\n\\t-o-transition: opacity 100ms linear;\\n\\t-moz-transition: opacity 100ms linear;\\n\\t-ms-transition: opacity 100ms linear;\\n\\ttransition: opacity 100ms linear;\\n}\\n.monaco-scrollable-element > .invisible {\\n\\topacity: 0;\\n\\tpointer-events: none;\\n}\\n.monaco-scrollable-element > .invisible.fade {\\n\\t-webkit-transition: opacity 800ms linear;\\n\\t-o-transition: opacity 800ms linear;\\n\\t-moz-transition: opacity 800ms linear;\\n\\t-ms-transition: opacity 800ms linear;\\n\\ttransition: opacity 800ms linear;\\n}\\n\\n/* Scrollable Content Inset Shadow */\\n.monaco-scrollable-element > .shadow {\\n\\tposition: absolute;\\n\\tdisplay: none;\\n}\\n.monaco-scrollable-element > .shadow.top {\\n\\tdisplay: block;\\n\\ttop: 0;\\n\\tleft: 3px;\\n\\theight: 3px;\\n\\twidth: 100%;\\n\\tbox-shadow: #DDD 0 6px 6px -6px inset;\\n}\\n.monaco-scrollable-element > .shadow.left {\\n\\tdisplay: block;\\n\\ttop: 3px;\\n\\tleft: 0;\\n\\theight: 100%;\\n\\twidth: 3px;\\n\\tbox-shadow: #DDD 6px 0 6px -6px inset;\\n}\\n.monaco-scrollable-element > .shadow.top-left-corner {\\n\\tdisplay: block;\\n\\ttop: 0;\\n\\tleft: 0;\\n\\theight: 3px;\\n\\twidth: 3px;\\n}\\n.monaco-scrollable-element > .shadow.top.left {\\n\\tbox-shadow: #DDD 6px 6px 6px -6px inset;\\n}\\n\\n/* ---------- Default Style ---------- */\\n\\n.vs .monaco-scrollable-element > .scrollbar > .slider {\\n\\tbackground: rgba(100, 100, 100, .4);\\n}\\n.vs-dark .monaco-scrollable-element > .scrollbar > .slider {\\n\\tbackground: rgba(121, 121, 121, .4);\\n}\\n.hc-black .monaco-scrollable-element > .scrollbar > .slider {\\n\\tbackground: rgba(111, 195, 223, .6);\\n}\\n\\n.monaco-scrollable-element > .scrollbar > .slider:hover {\\n\\tbackground: rgba(100, 100, 100, .7);\\n}\\n.hc-black .monaco-scrollable-element > .scrollbar > .slider:hover {\\n\\tbackground: rgba(111, 195, 223, .8);\\n}\\n\\n.monaco-scrollable-element > .scrollbar > .slider.active {\\n\\tbackground: rgba(0, 0, 0, .6);\\n}\\n.vs-dark .monaco-scrollable-element > .scrollbar > .slider.active {\\n\\tbackground: rgba(191, 191, 191, .4);\\n}\\n.hc-black .monaco-scrollable-element > .scrollbar > .slider.active {\\n\\tbackground: rgba(111, 195, 223, 1);\\n}\\n\\n.vs-dark .monaco-scrollable-element .shadow.top {\\n\\tbox-shadow: none;\\n}\\n\\n.vs-dark .monaco-scrollable-element .shadow.left {\\n\\tbox-shadow: #000 6px 0 6px -6px inset;\\n}\\n\\n.vs-dark .monaco-scrollable-element .shadow.top.left {\\n\\tbox-shadow: #000 6px 6px 6px -6px inset;\\n}\\n\\n.hc-black .monaco-scrollable-element .shadow.top {\\n\\tbox-shadow: none;\\n}\\n\\n.hc-black .monaco-scrollable-element .shadow.left {\\n\\tbox-shadow: none;\\n}\\n\\n.hc-black .monaco-scrollable-element .shadow.top.left {\\n\\tbox-shadow: none;\\n}\", \"\"]);\n\n// exports\n","exports = module.exports = require(\"../../../../../../../css-loader/lib/css-base.js\")(false);\n// imports\n\n\n// module\nexports.push([module.id, \"/*---------------------------------------------------------------------------------------------\\n * Copyright (c) Microsoft Corporation. All rights reserved.\\n * Licensed under the MIT License. See License.txt in the project root for license information.\\n *--------------------------------------------------------------------------------------------*/\\n\\n.monaco-quick-open-widget {\\n\\tposition: absolute;\\n\\twidth: 600px;\\n\\tz-index: 2000;\\n\\tpadding-bottom: 6px;\\n\\tleft: 50%;\\n\\tmargin-left: -300px;\\n}\\n\\n.monaco-quick-open-widget .monaco-progress-container {\\n\\tposition: absolute;\\n\\tleft: 0;\\n\\ttop: 38px;\\n\\tz-index: 1;\\n\\theight: 2px;\\n}\\n\\n.monaco-quick-open-widget .monaco-progress-container .progress-bit {\\n\\theight: 2px;\\n}\\n\\n.monaco-quick-open-widget .quick-open-input {\\n\\twidth: 588px;\\n\\tborder: none;\\n\\tmargin: 6px;\\n}\\n\\n.monaco-quick-open-widget .quick-open-input .monaco-inputbox {\\n\\twidth: 100%;\\n\\theight: 25px;\\n}\\n\\n.monaco-quick-open-widget .quick-open-result-count {\\n\\tposition: absolute;\\n\\tleft: -10000px;\\n}\\n\\n.monaco-quick-open-widget .quick-open-tree {\\n\\tline-height: 22px;\\n}\\n\\n.monaco-quick-open-widget .quick-open-tree .monaco-tree-row > .content > .sub-content {\\n\\toverflow: hidden;\\n}\\n\\n.monaco-quick-open-widget.content-changing .quick-open-tree .monaco-scrollable-element .slider {\\n\\tdisplay: none; /* scrollbar slider causes some hectic updates when input changes quickly, so hide it while quick open changes */\\n}\\n\\n.monaco-quick-open-widget .quick-open-tree .quick-open-entry {\\n\\toverflow: hidden;\\n\\ttext-overflow: ellipsis;\\n\\tdisplay: flex;\\n\\tflex-direction: column;\\n\\theight: 100%;\\n}\\n\\n.monaco-quick-open-widget .quick-open-tree .quick-open-entry > .quick-open-row {\\n\\tdisplay: flex;\\n\\talign-items: center;\\n}\\n\\n.monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon {\\n\\toverflow: hidden;\\n\\twidth: 16px;\\n\\theight: 16px;\\n\\tmargin-right: 4px;\\n\\tdisplay: inline-block;\\n\\tvertical-align: middle;\\n\\tflex-shrink: 0;\\n}\\n\\n.monaco-quick-open-widget .quick-open-tree .monaco-icon-label,\\n.monaco-quick-open-widget .quick-open-tree .monaco-icon-label .monaco-icon-label-description-container {\\n\\tflex: 1; /* make sure the icon label grows within the row */\\n}\\n\\n.monaco-quick-open-widget .quick-open-tree .quick-open-entry .monaco-highlighted-label span {\\n\\topacity: 1;\\n}\\n\\n.monaco-quick-open-widget .quick-open-tree .quick-open-entry-meta {\\n\\topacity: 0.7;\\n\\tline-height: normal;\\n}\\n\\n.monaco-quick-open-widget .quick-open-tree .content.has-group-label .quick-open-entry-keybinding {\\n\\tmargin-right: 8px;\\n}\\n\\n.monaco-quick-open-widget .quick-open-tree .quick-open-entry-keybinding .monaco-keybinding-key {\\n\\tvertical-align: text-bottom;\\n}\\n\\n.monaco-quick-open-widget .quick-open-tree .results-group {\\n\\tmargin-right: 18px;\\n}\\n\\n.monaco-quick-open-widget .quick-open-tree .monaco-tree-row.focused > .content.has-actions > .results-group,\\n.monaco-quick-open-widget .quick-open-tree .monaco-tree-row:hover:not(.highlighted) > .content.has-actions > .results-group,\\n.monaco-quick-open-widget .quick-open-tree .focused .monaco-tree-row.focused > .content.has-actions > .results-group {\\n\\tmargin-right: 0px;\\n}\\n\\n.monaco-quick-open-widget .quick-open-tree .results-group-separator {\\n\\tborder-top-width: 1px;\\n\\tborder-top-style: solid;\\n\\tbox-sizing: border-box;\\n\\tmargin-left: -11px;\\n\\tpadding-left: 11px;\\n}\\n\\n/* Actions in Quick Open Items */\\n\\n.monaco-tree .monaco-tree-row > .content.actions {\\n\\tposition: relative;\\n\\tdisplay: flex;\\n}\\n\\n.monaco-tree .monaco-tree-row > .content.actions > .sub-content {\\n\\tflex: 1;\\n}\\n\\n.monaco-tree .monaco-tree-row > .content.actions .action-item {\\n\\tmargin: 0;\\n}\\n\\n.monaco-tree .monaco-tree-row > .content.actions > .primary-action-bar {\\n\\tline-height: 22px;\\n}\\n\\n.monaco-tree .monaco-tree-row > .content.actions > .primary-action-bar {\\n\\tdisplay: none;\\n\\tpadding: 0 0.8em 0 0.4em;\\n}\\n\\n.monaco-tree .monaco-tree-row.focused > .content.has-actions > .primary-action-bar {\\n\\twidth: 0; /* in order to support a11y with keyboard, we use width: 0 to hide the actions, which still allows to \\\"Tab\\\" into the actions */\\n\\tdisplay: block;\\n}\\n\\n.monaco-tree .monaco-tree-row:hover:not(.highlighted) > .content.has-actions > .primary-action-bar,\\n.monaco-tree.focused .monaco-tree-row.focused > .content.has-actions > .primary-action-bar,\\n.monaco-tree .monaco-tree-row > .content.has-actions.more > .primary-action-bar {\\n\\twidth: inherit;\\n\\tdisplay: block;\\n}\\n\\n.monaco-tree .monaco-tree-row > .content.actions > .primary-action-bar .action-label {\\n\\tmargin-right: 0.4em;\\n\\tmargin-top: 4px;\\n\\tbackground-repeat: no-repeat;\\n\\twidth: 16px;\\n\\theight: 16px;\\n}\\n\\n.monaco-quick-open-widget .quick-open-tree .monaco-highlighted-label .highlight {\\n\\tfont-weight: bold;\\n}\", \"\"]);\n\n// exports\n","exports = module.exports = require(\"../../../../../../../css-loader/lib/css-base.js\")(false);\n// imports\n\n\n// module\nexports.push([module.id, \"/*---------------------------------------------------------------------------------------------\\n * Copyright (c) Microsoft Corporation. All rights reserved.\\n * Licensed under the MIT License. See License.txt in the project root for license information.\\n *--------------------------------------------------------------------------------------------*/\\n.monaco-tree {\\n\\theight: 100%;\\n\\twidth: 100%;\\n\\twhite-space: nowrap;\\n\\t-webkit-user-select: none;\\n\\t-khtml-user-select: none;\\n\\t-moz-user-select: -moz-none;\\n\\t-ms-user-select: none;\\n\\t-o-user-select: none;\\n\\tuser-select: none;\\n\\tposition: relative;\\n}\\n\\n.monaco-tree > .monaco-scrollable-element {\\n\\theight: 100%;\\n}\\n\\n.monaco-tree > .monaco-scrollable-element > .monaco-tree-wrapper {\\n\\theight: 100%;\\n\\twidth: 100%;\\n\\tposition: relative;\\n}\\n\\n.monaco-tree .monaco-tree-rows {\\n\\tposition: absolute;\\n\\twidth: 100%;\\n\\theight: 100%;\\n}\\n\\n.monaco-tree .monaco-tree-rows > .monaco-tree-row {\\n\\t-moz-box-sizing:\\tborder-box;\\n\\t-o-box-sizing:\\t\\tborder-box;\\n\\t-ms-box-sizing:\\t\\tborder-box;\\n\\tbox-sizing:\\t\\t\\tborder-box;\\n\\tcursor: pointer;\\n\\toverflow: hidden;\\n\\twidth: 100%;\\n\\ttouch-action: none;\\n}\\n\\n.monaco-tree .monaco-tree-rows > .monaco-tree-row > .content {\\n\\tposition: relative;\\n\\theight: 100%;\\n}\\n\\n.monaco-tree-drag-image {\\n\\tdisplay: inline-block;\\n\\tpadding: 1px 7px;\\n\\tborder-radius: 10px;\\n\\tfont-size: 12px;\\n\\tposition: absolute;\\n}\\n\\n/* for OS X ballistic scrolling */\\n.monaco-tree .monaco-tree-rows > .monaco-tree-row.scrolling {\\n\\tdisplay: none;\\n}\\n\\n/* Expansion */\\n\\n.monaco-tree .monaco-tree-rows.show-twisties > .monaco-tree-row.has-children > .content:before {\\n\\tcontent: ' ';\\n\\tposition: absolute;\\n\\tdisplay: block;\\n\\tbackground: url(\\\"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiI+PHBhdGggZmlsbD0iIzY0NjQ2NSIgZD0iTTYgNHY4bDQtNC00LTR6bTEgMi40MTRMOC41ODYgOCA3IDkuNTg2VjYuNDE0eiIvPjwvc3ZnPg==\\\") 50% 50% no-repeat;\\n\\twidth: 16px;\\n\\theight: 100%;\\n\\ttop: 0;\\n\\tleft: -16px;\\n}\\n\\n.monaco-tree .monaco-tree-rows.show-twisties > .monaco-tree-row.expanded > .content:before {\\n\\tbackground-image: url(\\\"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiI+PHBhdGggZmlsbD0iIzY0NjQ2NSIgZD0iTTExIDEwSDUuMzQ0TDExIDQuNDE0VjEweiIvPjwvc3ZnPg==\\\");\\n}\\n\\n.monaco-tree .monaco-tree-rows > .monaco-tree-row.has-children.loading > .content:before {\\n\\tbackground-image: url(\\\"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0nMS4wJyBzdGFuZGFsb25lPSdubycgPz4KPHN2ZyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnIHZlcnNpb249JzEuMScgd2lkdGg9JzEwcHgnIGhlaWdodD0nMTBweCc+Cgk8c3R5bGU+CiAgICBjaXJjbGUgewogICAgICBhbmltYXRpb246IGJhbGwgMC42cyBsaW5lYXIgaW5maW5pdGU7CiAgICB9CgogICAgY2lyY2xlOm50aC1jaGlsZCgyKSB7IGFuaW1hdGlvbi1kZWxheTogMC4wNzVzOyB9CiAgICBjaXJjbGU6bnRoLWNoaWxkKDMpIHsgYW5pbWF0aW9uLWRlbGF5OiAwLjE1czsgfQogICAgY2lyY2xlOm50aC1jaGlsZCg0KSB7IGFuaW1hdGlvbi1kZWxheTogMC4yMjVzOyB9CiAgICBjaXJjbGU6bnRoLWNoaWxkKDUpIHsgYW5pbWF0aW9uLWRlbGF5OiAwLjNzOyB9CiAgICBjaXJjbGU6bnRoLWNoaWxkKDYpIHsgYW5pbWF0aW9uLWRlbGF5OiAwLjM3NXM7IH0KICAgIGNpcmNsZTpudGgtY2hpbGQoNykgeyBhbmltYXRpb24tZGVsYXk6IDAuNDVzOyB9CiAgICBjaXJjbGU6bnRoLWNoaWxkKDgpIHsgYW5pbWF0aW9uLWRlbGF5OiAwLjUyNXM7IH0KCiAgICBAa2V5ZnJhbWVzIGJhbGwgewogICAgICBmcm9tIHsgb3BhY2l0eTogMTsgfQogICAgICB0byB7IG9wYWNpdHk6IDAuMzsgfQogICAgfQoJPC9zdHlsZT4KCTxnPgoJCTxjaXJjbGUgY3g9JzUnIGN5PScxJyByPScxJyBzdHlsZT0nb3BhY2l0eTowLjM7JyAvPgoJCTxjaXJjbGUgY3g9JzcuODI4NCcgY3k9JzIuMTcxNicgcj0nMScgc3R5bGU9J29wYWNpdHk6MC4zOycgLz4KCQk8Y2lyY2xlIGN4PSc5JyBjeT0nNScgcj0nMScgc3R5bGU9J29wYWNpdHk6MC4zOycgLz4KCQk8Y2lyY2xlIGN4PSc3LjgyODQnIGN5PSc3LjgyODQnIHI9JzEnIHN0eWxlPSdvcGFjaXR5OjAuMzsnIC8+CgkJPGNpcmNsZSBjeD0nNScgY3k9JzknIHI9JzEnIHN0eWxlPSdvcGFjaXR5OjAuMzsnIC8+CgkJPGNpcmNsZSBjeD0nMi4xNzE2JyBjeT0nNy44Mjg0JyByPScxJyBzdHlsZT0nb3BhY2l0eTowLjM7JyAvPgoJCTxjaXJjbGUgY3g9JzEnIGN5PSc1JyByPScxJyBzdHlsZT0nb3BhY2l0eTowLjM7JyAvPgoJCTxjaXJjbGUgY3g9JzIuMTcxNicgY3k9JzIuMTcxNicgcj0nMScgc3R5bGU9J29wYWNpdHk6MC4zOycgLz4KCTwvZz4KPC9zdmc+Cg==\\\");\\n}\\n\\n/* Highlighted */\\n\\n.monaco-tree.highlighted .monaco-tree-rows > .monaco-tree-row:not(.highlighted) {\\n\\topacity: 0.3;\\n}\\n\\n.vs-dark .monaco-tree .monaco-tree-rows.show-twisties > .monaco-tree-row.has-children > .content:before {\\n\\tbackground-image: url(\\\"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiI+PHBhdGggZmlsbD0iI0U4RThFOCIgZD0iTTYgNHY4bDQtNC00LTR6bTEgMi40MTRMOC41ODYgOCA3IDkuNTg2VjYuNDE0eiIvPjwvc3ZnPg==\\\");\\n}\\n\\n.vs-dark .monaco-tree .monaco-tree-rows.show-twisties > .monaco-tree-row.expanded > .content:before {\\n\\tbackground-image: url(\\\"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiI+PHBhdGggZmlsbD0iI0U4RThFOCIgZD0iTTExIDEwSDUuMzQ0TDExIDQuNDE0VjEweiIvPjwvc3ZnPg==\\\");\\n}\\n\\n.vs-dark .monaco-tree .monaco-tree-rows > .monaco-tree-row.has-children.loading > .content:before {\\n\\tbackground-image: url(\\\"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0nMS4wJyBzdGFuZGFsb25lPSdubycgPz4KPHN2ZyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnIHZlcnNpb249JzEuMScgd2lkdGg9JzEwcHgnIGhlaWdodD0nMTBweCc+Cgk8c3R5bGU+CiAgICBjaXJjbGUgewogICAgICBhbmltYXRpb246IGJhbGwgMC42cyBsaW5lYXIgaW5maW5pdGU7CiAgICB9CgogICAgY2lyY2xlOm50aC1jaGlsZCgyKSB7IGFuaW1hdGlvbi1kZWxheTogMC4wNzVzOyB9CiAgICBjaXJjbGU6bnRoLWNoaWxkKDMpIHsgYW5pbWF0aW9uLWRlbGF5OiAwLjE1czsgfQogICAgY2lyY2xlOm50aC1jaGlsZCg0KSB7IGFuaW1hdGlvbi1kZWxheTogMC4yMjVzOyB9CiAgICBjaXJjbGU6bnRoLWNoaWxkKDUpIHsgYW5pbWF0aW9uLWRlbGF5OiAwLjNzOyB9CiAgICBjaXJjbGU6bnRoLWNoaWxkKDYpIHsgYW5pbWF0aW9uLWRlbGF5OiAwLjM3NXM7IH0KICAgIGNpcmNsZTpudGgtY2hpbGQoNykgeyBhbmltYXRpb24tZGVsYXk6IDAuNDVzOyB9CiAgICBjaXJjbGU6bnRoLWNoaWxkKDgpIHsgYW5pbWF0aW9uLWRlbGF5OiAwLjUyNXM7IH0KCiAgICBAa2V5ZnJhbWVzIGJhbGwgewogICAgICBmcm9tIHsgb3BhY2l0eTogMTsgfQogICAgICB0byB7IG9wYWNpdHk6IDAuMzsgfQogICAgfQoJPC9zdHlsZT4KCTxnIHN0eWxlPSJmaWxsOmdyZXk7Ij4KCQk8Y2lyY2xlIGN4PSc1JyBjeT0nMScgcj0nMScgc3R5bGU9J29wYWNpdHk6MC4zOycgLz4KCQk8Y2lyY2xlIGN4PSc3LjgyODQnIGN5PScyLjE3MTYnIHI9JzEnIHN0eWxlPSdvcGFjaXR5OjAuMzsnIC8+CgkJPGNpcmNsZSBjeD0nOScgY3k9JzUnIHI9JzEnIHN0eWxlPSdvcGFjaXR5OjAuMzsnIC8+CgkJPGNpcmNsZSBjeD0nNy44Mjg0JyBjeT0nNy44Mjg0JyByPScxJyBzdHlsZT0nb3BhY2l0eTowLjM7JyAvPgoJCTxjaXJjbGUgY3g9JzUnIGN5PSc5JyByPScxJyBzdHlsZT0nb3BhY2l0eTowLjM7JyAvPgoJCTxjaXJjbGUgY3g9JzIuMTcxNicgY3k9JzcuODI4NCcgcj0nMScgc3R5bGU9J29wYWNpdHk6MC4zOycgLz4KCQk8Y2lyY2xlIGN4PScxJyBjeT0nNScgcj0nMScgc3R5bGU9J29wYWNpdHk6MC4zOycgLz4KCQk8Y2lyY2xlIGN4PScyLjE3MTYnIGN5PScyLjE3MTYnIHI9JzEnIHN0eWxlPSdvcGFjaXR5OjAuMzsnIC8+Cgk8L2c+Cjwvc3ZnPgo=\\\");\\n}\\n\\n.hc-black .monaco-tree .monaco-tree-rows.show-twisties > .monaco-tree-row.has-children > .content:before\\t{\\n\\tbackground-image: url(\\\"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+PHBhdGggZmlsbD0iI2ZmZiIgZD0iTTYgNHY4bDQtNC00LTR6bTEgMi40MTRsMS41ODYgMS41ODYtMS41ODYgMS41ODZ2LTMuMTcyeiIvPjwvc3ZnPg==\\\");\\n}\\n\\n.hc-black .monaco-tree .monaco-tree-rows.show-twisties > .monaco-tree-row.expanded > .content:before {\\n\\tbackground-image: url(\\\"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+PHBhdGggZmlsbD0iI2ZmZiIgZD0iTTExIDEwLjA3aC01LjY1Nmw1LjY1Ni01LjY1NnY1LjY1NnoiLz48L3N2Zz4=\\\");\\n}\\n\\n.hc-black .monaco-tree .monaco-tree-rows > .monaco-tree-row.has-children.loading > .content:before {\\n\\tbackground-image: url(\\\"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0nMS4wJyBzdGFuZGFsb25lPSdubycgPz4KPHN2ZyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnIHZlcnNpb249JzEuMScgd2lkdGg9JzEwcHgnIGhlaWdodD0nMTBweCc+Cgk8c3R5bGU+CiAgICBjaXJjbGUgewogICAgICBhbmltYXRpb246IGJhbGwgMC42cyBsaW5lYXIgaW5maW5pdGU7CiAgICB9CgogICAgY2lyY2xlOm50aC1jaGlsZCgyKSB7IGFuaW1hdGlvbi1kZWxheTogMC4wNzVzOyB9CiAgICBjaXJjbGU6bnRoLWNoaWxkKDMpIHsgYW5pbWF0aW9uLWRlbGF5OiAwLjE1czsgfQogICAgY2lyY2xlOm50aC1jaGlsZCg0KSB7IGFuaW1hdGlvbi1kZWxheTogMC4yMjVzOyB9CiAgICBjaXJjbGU6bnRoLWNoaWxkKDUpIHsgYW5pbWF0aW9uLWRlbGF5OiAwLjNzOyB9CiAgICBjaXJjbGU6bnRoLWNoaWxkKDYpIHsgYW5pbWF0aW9uLWRlbGF5OiAwLjM3NXM7IH0KICAgIGNpcmNsZTpudGgtY2hpbGQoNykgeyBhbmltYXRpb24tZGVsYXk6IDAuNDVzOyB9CiAgICBjaXJjbGU6bnRoLWNoaWxkKDgpIHsgYW5pbWF0aW9uLWRlbGF5OiAwLjUyNXM7IH0KCiAgICBAa2V5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di0xaDl6bS0xMSAydjFoOHY4aDF2LTloLTl6bTcgMnY5aC05di05aDl6bS0yIDJoLTV2NWg1di01eiIvPjxyZWN0IHg9IjQiIHk9IjkiIGZpbGw9IiMwMDUzOUMiIHdpZHRoPSIzIiBoZWlnaHQ9IjEiLz48L3N2Zz4=\\\") center center no-repeat;\\n}\\n\\n.hc-black .monaco-tree-action.collapse-all,\\n.vs-dark .monaco-tree-action.collapse-all {\\n\\tbackground: url(\\\"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgdmlld0JveD0iLTEgMCAxNiAxNiIgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAtMSAwIDE2IDE2Ij48cGF0aCBmaWxsPSIjQzVDNUM1IiBkPSJNMTQgMXY5aC0xdi04aC04di0xaDl6bS0xMSAydjFoOHY4aDF2LTloLTl6bTcgMnY5aC05di05aDl6bS0yIDJoLTV2NWg1di01eiIvPjxyZWN0IHg9IjQiIHk9IjkiIGZpbGw9IiM3NUJFRkYiIHdpZHRoPSIzIiBoZWlnaHQ9IjEiLz48L3N2Zz4=\\\") center center no-repeat;\\n}\\n\", \"\"]);\n\n// exports\n","exports = module.exports = require(\"../../../../../../css-loader/lib/css-base.js\")(false);\n// imports\n\n\n// module\nexports.push([module.id, \"/*---------------------------------------------------------------------------------------------\\n * Copyright (c) Microsoft Corporation. All rights reserved.\\n * Licensed under the MIT License. See License.txt in the project root for license information.\\n *--------------------------------------------------------------------------------------------*/\\n\\n.monaco-editor .inputarea {\\n\\tmin-width: 0;\\n\\tmin-height: 0;\\n\\tmargin: 0;\\n\\tpadding: 0;\\n\\tposition: absolute;\\n\\toutline: none !important;\\n\\tresize: none;\\n\\tborder: none;\\n\\toverflow: hidden;\\n\\tcolor: transparent;\\n\\tbackground-color: transparent;\\n}\\n/*.monaco-editor .inputarea {\\n\\tposition: fixed !important;\\n\\twidth: 800px !important;\\n\\theight: 500px !important;\\n\\ttop: initial !important;\\n\\tleft: initial !important;\\n\\tbottom: 0 !important;\\n\\tright: 0 !important;\\n\\tcolor: black !important;\\n\\tbackground: white !important;\\n\\tline-height: 15px !important;\\n\\tfont-size: 14px !important;\\n}*/\\n.monaco-editor .inputarea.ime-input {\\n\\tz-index: 10;\\n}\\n\", \"\"]);\n\n// exports\n","exports = module.exports = require(\"../../../../../../../css-loader/lib/css-base.js\")(false);\n// imports\n\n\n// module\nexports.push([module.id, \"/*---------------------------------------------------------------------------------------------\\n * Copyright (c) Microsoft Corporation. All rights reserved.\\n * Licensed under the MIT License. See License.txt in the project root for license information.\\n *--------------------------------------------------------------------------------------------*/\\n\\n.monaco-editor .view-overlays .current-line {\\n\\tdisplay: block;\\n\\tposition: absolute;\\n\\tleft: 0;\\n\\ttop: 0;\\n\\tbox-sizing: border-box;\\n}\", \"\"]);\n\n// exports\n","exports = module.exports = require(\"../../../../../../../css-loader/lib/css-base.js\")(false);\n// imports\n\n\n// module\nexports.push([module.id, \"/*---------------------------------------------------------------------------------------------\\n * Copyright (c) Microsoft Corporation. All rights reserved.\\n * Licensed under the MIT License. See License.txt in the project root for license information.\\n *--------------------------------------------------------------------------------------------*/\\n\\n.monaco-editor .margin-view-overlays .current-line {\\n\\tdisplay: block;\\n\\tposition: absolute;\\n\\tleft: 0;\\n\\ttop: 0;\\n\\tbox-sizing: border-box;\\n}\\n\\n.monaco-editor .margin-view-overlays .current-line.current-line-margin.current-line-margin-both {\\n\\tborder-right: 0;\\n}\", \"\"]);\n\n// exports\n","exports = module.exports = require(\"../../../../../../../css-loader/lib/css-base.js\")(false);\n// imports\n\n\n// module\nexports.push([module.id, \"/*---------------------------------------------------------------------------------------------\\n * Copyright (c) Microsoft Corporation. All rights reserved.\\n * Licensed under the MIT License. See License.txt in the project root for license information.\\n *--------------------------------------------------------------------------------------------*/\\n\\n/*\\n\\tKeeping name short for faster parsing.\\n\\tcdr = core decorations rendering (div)\\n*/\\n.monaco-editor .lines-content .cdr {\\n\\tposition: absolute;\\n}\", \"\"]);\n\n// exports\n","exports = module.exports = require(\"../../../../../../../css-loader/lib/css-base.js\")(false);\n// imports\n\n\n// module\nexports.push([module.id, \"/*---------------------------------------------------------------------------------------------\\n * Copyright (c) Microsoft Corporation. All rights reserved.\\n * Licensed under the MIT License. See License.txt in the project root for license information.\\n *--------------------------------------------------------------------------------------------*/\\n\\n.monaco-editor .glyph-margin {\\n\\tposition: absolute;\\n\\ttop: 0;\\n}\\n\\n/*\\n\\tKeeping name short for faster parsing.\\n\\tcgmr = core glyph margin rendering (div)\\n*/\\n.monaco-editor .margin-view-overlays .cgmr {\\n\\tposition: absolute;\\n}\\n\", \"\"]);\n\n// exports\n","exports = module.exports = require(\"../../../../../../../css-loader/lib/css-base.js\")(false);\n// imports\n\n\n// module\nexports.push([module.id, \"/*---------------------------------------------------------------------------------------------\\n * Copyright (c) Microsoft Corporation. All rights reserved.\\n * Licensed under the MIT License. See License.txt in the project root for license information.\\n *--------------------------------------------------------------------------------------------*/\\n\\n/*\\n\\tKeeping name short for faster parsing.\\n\\tcigr = core ident guides rendering (div)\\n*/\\n.monaco-editor .lines-content .cigr {\\n\\tposition: absolute;\\n}\\n.monaco-editor .lines-content .cigra {\\n\\tposition: absolute;\\n}\\n\", \"\"]);\n\n// exports\n","exports = module.exports = require(\"../../../../../../../css-loader/lib/css-base.js\")(false);\n// imports\n\n\n// module\nexports.push([module.id, \"/*---------------------------------------------------------------------------------------------\\n * Copyright (c) Microsoft Corporation. All rights reserved.\\n * Licensed under the MIT License. See License.txt in the project root for license information.\\n *--------------------------------------------------------------------------------------------*/\\n\\n.monaco-editor .margin-view-overlays .line-numbers {\\n\\tposition: absolute;\\n\\ttext-align: right;\\n\\tdisplay: inline-block;\\n\\tvertical-align: middle;\\n\\tbox-sizing: border-box;\\n\\tcursor: default;\\n\\theight: 100%;\\n}\\n\\n.monaco-editor .relative-current-line-number {\\n\\ttext-align: left;\\n\\tdisplay: inline-block;\\n\\twidth: 100%;\\n}\\n\\n.monaco-editor .margin-view-overlays .line-numbers {\\n\\tcursor: -webkit-image-set(\\n\\t\\turl(\\\"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNSIgaGVpZ2h0PSIyMSIgeD0iMHB4IiB5PSIwcHgiIHZpZXdCb3g9IjAgMCAxNSAyMSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgMTUgMjE7Ij48cG9seWdvbiBzdHlsZT0iZmlsbDojRkZGRkZGO3N0cm9rZTojMDAwMDAwIiBwb2ludHM9IjE0LjUsMS4yIDEuOSwxMy44IDcuMSwxMy44IDQuNSwxOS4xIDcuNywyMC4xIDEwLjMsMTQuOSAxNC41LDE4Ii8+PC9zdmc+\\\") 1x,\\n\\t\\turl(\\\"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHg9IjBweCIgeT0iMHB4IiB3aWR0aD0iMzAiIGhlaWdodD0iNDIiIHZpZXdCb3g9IjAgMCAzMCA0MiIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgMzAgNDI7Ij48cG9seWdvbiBzdHlsZT0iZmlsbDojRkZGRkZGO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyOyIgcG9pbnRzPSIyOSwyLjQgMy44LDI3LjYgMTQuMywyNy42IDksMzguMSAxNS40LDQwLjIgMjAuNiwyOS43IDI5LDM2Ii8+PC9zdmc+Cg==\\\") 2x\\n\\t) 30 0, default;\\n}\\n\\n.monaco-editor.mac .margin-view-overlays .line-numbers {\\n\\tcursor: -webkit-image-set(\\n\\t\\turl(\\\"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMiIgaGVpZ2h0PSIxOCIgdmlld0JveD0iMCAwIDEyIDE4Ij48c3R5bGU+LnN0MHtmaWxsOiNmZmZ9PC9zdHlsZT48dGl0bGU+ZmxpcHBlZC1jdXJzb3ItbWFjPC90aXRsZT48cGF0aCBkPSJNNC4zIDE2LjVsMS42LTQuNkgxLjFMMTEuNSAxLjJ2MTQuNEw4LjcgMTNsLTEuNiA0LjV6Ii8+PHBhdGggY2xhc3M9InN0MCIgZD0iTTExIDE0LjVsLTIuNS0yLjNMNyAxNi43IDUgMTZsMS42LTQuNWgtNGw4LjUtOU0wIDEyLjVoNS4ybC0xLjUgNC4xTDcuNSAxOCA5IDE0LjJsMi45IDIuM1YwTDAgMTIuNXoiLz48L3N2Zz4=\\\") 1x,\\n\\t\\turl(\\\"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIzNiIgdmlld0JveD0iMCAwIDI0IDM2LjEiPjxkZWZzPjxzdHlsZT4uYXtmaWxsOiNmZmY7fTwvc3R5bGU+PC9kZWZzPjx0aXRsZT5mbGlwcGVkLWN1cnNvci1tYWMtMng8L3RpdGxlPjxwb2x5Z29uIHBvaW50cz0iOC42IDMzLjEgMTEuOCAyMy45IDIuMiAyMy45IDIzIDIuNSAyMyAzMS4zIDE3LjQgMjYuMSAxNC4yIDM1LjEgOC42IDMzLjEiLz48cGF0aCBjbGFzcz0iYSIgZD0iTTIyLDI5LjFsLTUtNC42LTMuMDYyLDguOTM4LTQuMDYyLTEuNUwxMywyM0g1TDIyLDVNMCwyNUgxMC40bC0zLDguM0wxNSwzNi4xbDMuMTI1LTcuNjYyTDI0LDMzVjBaIi8+PC9zdmc+\\\") 2x\\n\\t) 24 3, default;\\n}\\n\\n.monaco-editor .margin-view-overlays .line-numbers.lh-odd {\\n\\tmargin-top: 1px;\\n}\\n\", \"\"]);\n\n// exports\n","exports = module.exports = require(\"../../../../../../../css-loader/lib/css-base.js\")(false);\n// imports\n\n\n// module\nexports.push([module.id, \"/*---------------------------------------------------------------------------------------------\\n * Copyright (c) Microsoft Corporation. All rights reserved.\\n * Licensed under the MIT License. See License.txt in the project root for license information.\\n *--------------------------------------------------------------------------------------------*/\\n\\n/* Uncomment to see lines flashing when they're painted */\\n/*.monaco-editor .view-lines > .view-line {\\n\\tbackground-color: none;\\n\\tanimation-name: flash-background;\\n\\tanimation-duration: 800ms;\\n}\\n@keyframes flash-background {\\n\\t0% { background-color: lightgreen; }\\n\\t100% { background-color: none }\\n}*/\\n\\n.monaco-editor.safari .lines-content,\\n.monaco-editor.safari .view-line,\\n.monaco-editor.safari .view-lines {\\n\\t-webkit-user-select: text;\\n\\tuser-select: text;\\n}\\n\\n.monaco-editor .lines-content,\\n.monaco-editor .view-line,\\n.monaco-editor .view-lines {\\n\\t-webkit-user-select: none;\\n\\t-ms-user-select: none;\\n\\t-khtml-user-select: none;\\n\\t-moz-user-select: none;\\n\\t-o-user-select: none;\\n\\tuser-select: none;\\n}\\n\\n.monaco-editor .view-lines {\\n\\tcursor: text;\\n\\twhite-space: nowrap;\\n}\\n\\n.monaco-editor.vs-dark.mac .view-lines,\\n.monaco-editor.hc-black.mac .view-lines {\\n\\tcursor: -webkit-image-set(url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAQAAAC1+jfqAAAAL0lEQVQoz2NgCD3x//9/BhBYBWdhgFVAiVW4JBFKGIa4AqD0//9D3pt4I4tAdAMAHTQ/j5Zom30AAAAASUVORK5CYII=) 1x, url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAQAAADZc7J/AAAAz0lEQVRIx2NgYGBY/R8I/vx5eelX3n82IJ9FxGf6tksvf/8FiTMQAcAGQMDvSwu09abffY8QYSAScNk45G198eX//yev73/4///701eh//kZSARckrNBRvz//+8+6ZohwCzjGNjdgQxkAg7B9WADeBjIBqtJCbhRA0YNoIkBSNmaPEMoNmA0FkYNoFKhapJ6FGyAH3nauaSmPfwI0v/3OukVi0CIZ+F25KrtYcx/CTIy0e+rC7R1Z4KMICVTQQ14feVXIbR695u14+Ir4gwAAD49E54wc1kWAAAAAElFTkSuQmCC) 2x) 5 8, text;\\n}\\n\\n.monaco-editor .view-line {\\n\\tposition: absolute;\\n\\twidth: 100%;\\n}\\n\\n/* TODO@tokenization bootstrap fix */\\n/*.monaco-editor .view-line > span > span {\\n\\tfloat: none;\\n\\tmin-height: inherit;\\n\\tmargin-left: inherit;\\n}*/\", \"\"]);\n\n// exports\n","exports = module.exports = require(\"../../../../../../../css-loader/lib/css-base.js\")(false);\n// imports\n\n\n// module\nexports.push([module.id, \"/*---------------------------------------------------------------------------------------------\\n * Copyright (c) Microsoft Corporation. All rights reserved.\\n * Licensed under the MIT License. See License.txt in the project root for license information.\\n *--------------------------------------------------------------------------------------------*/\\n.monaco-editor .lines-decorations {\\n\\tposition: absolute;\\n\\ttop: 0;\\n\\tbackground: white;\\n}\\n\\n/*\\n\\tKeeping name short for faster parsing.\\n\\tcldr = core lines decorations rendering (div)\\n*/\\n.monaco-editor .margin-view-overlays .cldr {\\n\\tposition: absolute;\\n\\theight: 100%;\\n}\", \"\"]);\n\n// exports\n","exports = module.exports = require(\"../../../../../../../css-loader/lib/css-base.js\")(false);\n// imports\n\n\n// module\nexports.push([module.id, \"/*---------------------------------------------------------------------------------------------\\n * Copyright (c) Microsoft Corporation. All rights reserved.\\n * Licensed under the MIT License. See License.txt in the project root for license information.\\n *--------------------------------------------------------------------------------------------*/\\n\\n/*\\n\\tKeeping name short for faster parsing.\\n\\tcmdr = core margin decorations rendering (div)\\n*/\\n.monaco-editor .margin-view-overlays .cmdr {\\n\\tposition: absolute;\\n\\tleft: 0;\\n\\twidth: 100%;\\n\\theight: 100%;\\n}\", \"\"]);\n\n// exports\n","exports = module.exports = require(\"../../../../../../../css-loader/lib/css-base.js\")(false);\n// imports\n\n\n// module\nexports.push([module.id, \"/*---------------------------------------------------------------------------------------------\\n * Copyright (c) Microsoft Corporation. All rights reserved.\\n * Licensed under the MIT License. See License.txt in the project root for license information.\\n *--------------------------------------------------------------------------------------------*/\\n\\n/* START cover the case that slider is visible on mouseover */\\n.monaco-editor .minimap.slider-mouseover .minimap-slider {\\n\\topacity: 0;\\n\\ttransition: opacity 100ms linear;\\n}\\n.monaco-editor .minimap.slider-mouseover:hover .minimap-slider {\\n\\topacity: 1;\\n}\\n.monaco-editor .minimap.slider-mouseover .minimap-slider.active {\\n\\topacity: 1;\\n}\\n/* END cover the case that slider is visible on mouseover */\\n\\n.monaco-editor .minimap-shadow-hidden {\\n\\tposition: absolute;\\n\\twidth: 0;\\n}\\n.monaco-editor .minimap-shadow-visible {\\n\\tposition: absolute;\\n\\tleft: -6px;\\n\\twidth: 6px;\\n}\\n\", \"\"]);\n\n// exports\n","exports = module.exports = require(\"../../../../../../../css-loader/lib/css-base.js\")(false);\n// imports\n\n\n// module\nexports.push([module.id, \"/*---------------------------------------------------------------------------------------------\\n * Copyright (c) Microsoft Corporation. All rights reserved.\\n * Licensed under the MIT License. See License.txt in the project root for license information.\\n *--------------------------------------------------------------------------------------------*/\\n.monaco-editor .overlayWidgets {\\n\\tposition: absolute;\\n\\ttop: 0;\\n\\tleft:0;\\n}\", \"\"]);\n\n// exports\n","exports = module.exports = require(\"../../../../../../../css-loader/lib/css-base.js\")(false);\n// imports\n\n\n// module\nexports.push([module.id, \"/*---------------------------------------------------------------------------------------------\\n * Copyright (c) Microsoft Corporation. All rights reserved.\\n * Licensed under the MIT License. See License.txt in the project root for license information.\\n *--------------------------------------------------------------------------------------------*/\\n\\n.monaco-editor .view-ruler {\\n\\tposition: absolute;\\n\\ttop: 0;\\n}\", \"\"]);\n\n// exports\n","exports = module.exports = require(\"../../../../../../../css-loader/lib/css-base.js\")(false);\n// imports\n\n\n// module\nexports.push([module.id, \"/*---------------------------------------------------------------------------------------------\\n * Copyright (c) Microsoft Corporation. All rights reserved.\\n * Licensed under the MIT License. See License.txt in the project root for license information.\\n *--------------------------------------------------------------------------------------------*/\\n\\n.monaco-editor .scroll-decoration {\\n\\tposition: absolute;\\n\\ttop: 0;\\n\\tleft: 0;\\n\\theight: 6px;\\n}\", \"\"]);\n\n// exports\n","exports = module.exports = require(\"../../../../../../../css-loader/lib/css-base.js\")(false);\n// imports\n\n\n// module\nexports.push([module.id, \"/*---------------------------------------------------------------------------------------------\\n * Copyright (c) Microsoft Corporation. All rights reserved.\\n * Licensed under the MIT License. See License.txt in the project root for license information.\\n *--------------------------------------------------------------------------------------------*/\\n\\n/*\\n\\tKeeping name short for faster parsing.\\n\\tcslr = core selections layer rendering (div)\\n*/\\n.monaco-editor .lines-content .cslr {\\n\\tposition: absolute;\\n}\\n\\n.monaco-editor\\t\\t\\t.top-left-radius\\t\\t{ border-top-left-radius: 3px; }\\n.monaco-editor\\t\\t\\t.bottom-left-radius\\t\\t{ border-bottom-left-radius: 3px; }\\n.monaco-editor\\t\\t\\t.top-right-radius\\t\\t{ border-top-right-radius: 3px; }\\n.monaco-editor\\t\\t\\t.bottom-right-radius\\t{ border-bottom-right-radius: 3px; }\\n\\n.monaco-editor.hc-black .top-left-radius\\t\\t{ border-top-left-radius: 0; }\\n.monaco-editor.hc-black .bottom-left-radius\\t\\t{ border-bottom-left-radius: 0; }\\n.monaco-editor.hc-black .top-right-radius\\t\\t{ border-top-right-radius: 0; }\\n.monaco-editor.hc-black .bottom-right-radius\\t{ border-bottom-right-radius: 0; }\\n\", \"\"]);\n\n// exports\n","exports = module.exports = require(\"../../../../../../../css-loader/lib/css-base.js\")(false);\n// imports\n\n\n// module\nexports.push([module.id, \"/*---------------------------------------------------------------------------------------------\\n * Copyright (c) Microsoft Corporation. All rights reserved.\\n * Licensed under the MIT License. See License.txt in the project root for license information.\\n *--------------------------------------------------------------------------------------------*/\\n.monaco-editor .cursors-layer {\\n\\tposition: absolute;\\n\\ttop: 0;\\n}\\n\\n.monaco-editor .cursors-layer > .cursor {\\n\\tposition: absolute;\\n\\tcursor: text;\\n\\toverflow: hidden;\\n}\\n\\n/* -- block-outline-style -- */\\n.monaco-editor .cursors-layer.cursor-block-outline-style > .cursor {\\n\\tbox-sizing: border-box;\\n\\tbackground: transparent !important;\\n\\tborder-style: solid;\\n\\tborder-width: 1px;\\n}\\n\\n/* -- underline-style -- */\\n.monaco-editor .cursors-layer.cursor-underline-style > .cursor {\\n\\tborder-bottom-width: 2px;\\n\\tborder-bottom-style: solid;\\n\\tbackground: transparent !important;\\n\\tbox-sizing: border-box;\\n}\\n\\n/* -- underline-thin-style -- */\\n.monaco-editor .cursors-layer.cursor-underline-thin-style > .cursor {\\n\\tborder-bottom-width: 1px;\\n\\tborder-bottom-style: solid;\\n\\tbackground: transparent !important;\\n\\tbox-sizing: border-box;\\n}\\n\\n@keyframes monaco-cursor-smooth {\\n\\t0%,\\n\\t20% {\\n\\t\\topacity: 1;\\n\\t}\\n\\t60%,\\n\\t100% {\\n\\t\\topacity: 0;\\n\\t}\\n}\\n\\n@keyframes monaco-cursor-phase {\\n\\t0%,\\n\\t20% {\\n\\t\\topacity: 1;\\n\\t}\\n\\t90%,\\n\\t100% {\\n\\t\\topacity: 0;\\n\\t}\\n}\\n\\n@keyframes monaco-cursor-expand {\\n\\t0%,\\n\\t20% {\\n\\t\\ttransform: scaleY(1);\\n\\t}\\n\\t80%,\\n\\t100% {\\n\\t\\ttransform: scaleY(0);\\n\\t}\\n}\\n\\n.cursor-smooth {\\n\\tanimation: monaco-cursor-smooth 0.5s ease-in-out 0s 20 alternate;\\n}\\n\\n.cursor-phase {\\n\\tanimation: monaco-cursor-phase 0.5s ease-in-out 0s 20 alternate;\\n}\\n\\n.cursor-expand > .cursor {\\n\\tanimation: monaco-cursor-expand 0.5s ease-in-out 0s 20 alternate;\\n}\", \"\"]);\n\n// exports\n","exports = module.exports = require(\"../../../../../../../css-loader/lib/css-base.js\")(false);\n// imports\n\n\n// module\nexports.push([module.id, \"/*---------------------------------------------------------------------------------------------\\n * Copyright (c) Microsoft Corporation. All rights reserved.\\n * Licensed under the MIT License. See License.txt in the project root for license information.\\n *--------------------------------------------------------------------------------------------*/\\n/* ---------- DiffEditor ---------- */\\n\\n.monaco-diff-editor .diffOverview {\\n\\tz-index: 9;\\n}\\n\\n/* colors not externalized: using transparancy on background */\\n.monaco-diff-editor.vs\\t\\t\\t.diffOverview { background: rgba(0, 0, 0, 0.03); }\\n.monaco-diff-editor.vs-dark\\t\\t.diffOverview { background: rgba(255, 255, 255, 0.01); }\\n\\n.monaco-diff-editor .diffViewport {\\n\\tbox-shadow: inset 0px 0px 1px 0px #B9B9B9;\\n\\tbackground: rgba(0, 0, 0, 0.10);\\n}\\n\\n.monaco-diff-editor.vs-dark .diffViewport,\\n.monaco-diff-editor.hc-black .diffViewport {\\n\\tbackground: rgba(255, 255, 255, 0.10);\\n}\\n.monaco-scrollable-element.modified-in-monaco-diff-editor.vs\\t\\t.scrollbar { background: rgba(0,0,0,0); }\\n.monaco-scrollable-element.modified-in-monaco-diff-editor.vs-dark\\t.scrollbar { background: rgba(0,0,0,0); }\\n.monaco-scrollable-element.modified-in-monaco-diff-editor.hc-black\\t.scrollbar { background: none; }\\n\\n.monaco-scrollable-element.modified-in-monaco-diff-editor .slider {\\n\\tz-index: 10;\\n}\\n.modified-in-monaco-diff-editor\\t\\t\\t\\t.slider.active { background: rgba(171, 171, 171, .4); }\\n.modified-in-monaco-diff-editor.hc-black\\t.slider.active { background: none; }\\n\\n/* ---------- Diff ---------- */\\n\\n.monaco-editor .insert-sign,\\n.monaco-diff-editor .insert-sign,\\n.monaco-editor .delete-sign,\\n.monaco-diff-editor .delete-sign {\\n\\tbackground-size: 60%;\\n\\topacity: 0.7;\\n\\tbackground-repeat: no-repeat;\\n\\tbackground-position: 50% 50%;\\n}\\n.monaco-editor.hc-black .insert-sign,\\n.monaco-diff-editor.hc-black .insert-sign,\\n.monaco-editor.hc-black .delete-sign,\\n.monaco-diff-editor.hc-black .delete-sign {\\n\\topacity: 1;\\n}\\n.monaco-editor .insert-sign,\\n.monaco-diff-editor .insert-sign {\\n\\tbackground-image: url(\\\"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHRpdGxlPkxheWVyIDE8L3RpdGxlPjxyZWN0IGhlaWdodD0iMTEiIHdpZHRoPSIzIiB5PSIzIiB4PSI3IiBmaWxsPSIjNDI0MjQyIi8+PHJlY3QgaGVpZ2h0PSIzIiB3aWR0aD0iMTEiIHk9IjciIHg9IjMiIGZpbGw9IiM0MjQyNDIiLz48L3N2Zz4=\\\");\\n}\\n.monaco-editor .delete-sign,\\n.monaco-diff-editor .delete-sign {\\n\\tbackground-image: url(\\\"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHRpdGxlPkxheWVyIDE8L3RpdGxlPjxyZWN0IGhlaWdodD0iMyIgd2lkdGg9IjExIiB5PSI3IiB4PSIzIiBmaWxsPSIjNDI0MjQyIi8+PC9zdmc+\\\");\\n}\\n\\n.monaco-editor.vs-dark .insert-sign,\\n.monaco-diff-editor.vs-dark .insert-sign,\\n.monaco-editor.hc-black .insert-sign,\\n.monaco-diff-editor.hc-black .insert-sign {\\n\\tbackground-image: url(\\\"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHRpdGxlPkxheWVyIDE8L3RpdGxlPjxyZWN0IGhlaWdodD0iMTEiIHdpZHRoPSIzIiB5PSIzIiB4PSI3IiBmaWxsPSIjQzVDNUM1Ii8+PHJlY3QgaGVpZ2h0PSIzIiB3aWR0aD0iMTEiIHk9IjciIHg9IjMiIGZpbGw9IiNDNUM1QzUiLz48L3N2Zz4=\\\");\\n}\\n.monaco-editor.vs-dark .delete-sign,\\n.monaco-diff-editor.vs-dark .delete-sign,\\n.monaco-editor.hc-black .delete-sign,\\n.monaco-diff-editor.hc-black .delete-sign {\\n\\tbackground-image: url(\\\"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHRpdGxlPkxheWVyIDE8L3RpdGxlPjxyZWN0IGhlaWdodD0iMyIgd2lkdGg9IjExIiB5PSI3IiB4PSIzIiBmaWxsPSIjQzVDNUM1Ii8+PC9zdmc+\\\");\\n}\\n\\n.monaco-editor .inline-deleted-margin-view-zone {\\n\\ttext-align: right;\\n}\\n.monaco-editor .inline-added-margin-view-zone {\\n\\ttext-align: right;\\n}\\n\\n.monaco-editor .diagonal-fill {\\n\\tbackground: url(\\\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJCAYAAADgkQYQAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjEwMPRyoQAAAChJREFUKFNjOH/+fAMDDgCSu3Dhwn9c8gwwBTgNGR4KQP4HhQOhsAIAZCBTkhtqePcAAAAASUVORK5CYII=\\\");\\n}\\n.monaco-editor.vs-dark .diagonal-fill {\\n\\topacity: 0.2;\\n}\\n.monaco-editor.hc-black .diagonal-fill {\\n\\tbackground: none;\\n}\\n\\n/* ---------- Inline Diff ---------- */\\n\\n.monaco-editor .view-zones .view-lines .view-line span {\\n\\tdisplay: inline-block;\\n}\\n\", \"\"]);\n\n// exports\n","exports = module.exports = require(\"../../../../../../../css-loader/lib/css-base.js\")(false);\n// imports\n\n\n// module\nexports.push([module.id, \"/*---------------------------------------------------------------------------------------------\\n * Copyright (c) Microsoft Corporation. All rights reserved.\\n * Licensed under the MIT License. See License.txt in the project root for license information.\\n *--------------------------------------------------------------------------------------------*/\\n\\n.monaco-diff-editor .diff-review-line-number {\\n\\ttext-align: right;\\n\\tdisplay: inline-block;\\n}\\n\\n.monaco-diff-editor .diff-review {\\n\\tposition: absolute;\\n\\t-webkit-user-select: none;\\n\\t-ms-user-select: none;\\n\\t-khtml-user-select: none;\\n\\t-moz-user-select: none;\\n\\t-o-user-select: none;\\n\\tuser-select: none;\\n}\\n\\n.monaco-diff-editor .diff-review-summary {\\n\\tpadding-left: 10px;\\n}\\n\\n.monaco-diff-editor .diff-review-shadow {\\n\\tposition: absolute;\\n}\\n\\n.monaco-diff-editor .diff-review-row {\\n\\twhite-space: pre;\\n}\\n\\n.monaco-diff-editor .diff-review-table {\\n\\tdisplay: table;\\n\\tmin-width: 100%;\\n}\\n\\n.monaco-diff-editor .diff-review-row {\\n\\tdisplay: table-row;\\n\\twidth: 100%;\\n}\\n\\n.monaco-diff-editor .diff-review-cell {\\n\\tdisplay: table-cell;\\n}\\n\\n.monaco-diff-editor .diff-review-spacer {\\n\\tdisplay: inline-block;\\n\\twidth: 10px;\\n}\\n\\n.monaco-diff-editor .diff-review-actions {\\n\\tdisplay: inline-block;\\n\\tposition: absolute;\\n\\tright: 10px;\\n\\ttop: 2px;\\n}\\n\\n.monaco-diff-editor .diff-review-actions .action-label {\\n\\twidth: 16px;\\n\\theight: 16px;\\n\\tmargin: 2px 0;\\n}\\n.monaco-diff-editor .action-label.icon.close-diff-review {\\n\\tbackground: url(\\\"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgdmlld0JveD0iMyAzIDE2IDE2IiBlbmFibGUtYmFja2dyb3VuZD0ibmV3IDMgMyAxNiAxNiI+PHBvbHlnb24gZmlsbD0iIzQyNDI0MiIgcG9pbnRzPSIxMi41OTcsMTEuMDQyIDE1LjQsMTMuODQ1IDEzLjg0NCwxNS40IDExLjA0MiwxMi41OTggOC4yMzksMTUuNCA2LjY4MywxMy44NDUgOS40ODUsMTEuMDQyIDYuNjgzLDguMjM5IDguMjM4LDYuNjgzIDExLjA0Miw5LjQ4NiAxMy44NDUsNi42ODMgMTUuNCw4LjIzOSIvPjwvc3ZnPg==\\\") center center no-repeat;\\n}\\n.monaco-diff-editor.hc-black .action-label.icon.close-diff-review,\\n.monaco-diff-editor.vs-dark .action-label.icon.close-diff-review {\\n\\tbackground: url(\\\"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgdmlld0JveD0iMyAzIDE2IDE2IiBlbmFibGUtYmFja2dyb3VuZD0ibmV3IDMgMyAxNiAxNiI+PHBvbHlnb24gZmlsbD0iI2U4ZThlOCIgcG9pbnRzPSIxMi41OTcsMTEuMDQyIDE1LjQsMTMuODQ1IDEzLjg0NCwxNS40IDExLjA0MiwxMi41OTggOC4yMzksMTUuNCA2LjY4MywxMy44NDUgOS40ODUsMTEuMDQyIDYuNjgzLDguMjM5IDguMjM4LDYuNjgzIDExLjA0Miw5LjQ4NiAxMy44NDUsNi42ODMgMTUuNCw4LjIzOSIvPjwvc3ZnPg==\\\") center center no-repeat;\\n}\", \"\"]);\n\n// exports\n","exports = module.exports = require(\"../../../../../../../css-loader/lib/css-base.js\")(false);\n// imports\n\n\n// module\nexports.push([module.id, \"/*---------------------------------------------------------------------------------------------\\n * Copyright (c) Microsoft Corporation. All rights reserved.\\n * Licensed under the MIT License. See License.txt in the project root for license information.\\n *--------------------------------------------------------------------------------------------*/\\n\\n/* -------------------- IE10 remove auto clear button -------------------- */\\n\\n::-ms-clear {\\n\\tdisplay: none;\\n}\\n\\n/* All widgets */\\n/* I am not a big fan of this rule */\\n.monaco-editor .editor-widget input {\\n\\tcolor: inherit;\\n}\\n\\n/* -------------------- Editor -------------------- */\\n\\n.monaco-editor {\\n\\tposition: relative;\\n\\toverflow: visible;\\n\\t-webkit-text-size-adjust: 100%;\\n\\t-webkit-font-feature-settings: \\\"liga\\\" off, \\\"calt\\\" off;\\n\\tfont-feature-settings: \\\"liga\\\" off, \\\"calt\\\" off;\\n}\\n.monaco-editor.enable-ligatures {\\n\\t-webkit-font-feature-settings: \\\"liga\\\" on, \\\"calt\\\" on;\\n\\tfont-feature-settings: \\\"liga\\\" on, \\\"calt\\\" on;\\n}\\n\\n/* -------------------- Misc -------------------- */\\n\\n.monaco-editor .overflow-guard {\\n\\tposition: relative;\\n\\toverflow: hidden;\\n}\\n\\n.monaco-editor .view-overlays {\\n\\tposition: absolute;\\n\\ttop: 0;\\n}\", \"\"]);\n\n// exports\n","exports = module.exports = require(\"../../../../../../../css-loader/lib/css-base.js\")(false);\n// imports\n\n\n// module\nexports.push([module.id, \"/*---------------------------------------------------------------------------------------------\\n * Copyright (c) Microsoft Corporation. All rights reserved.\\n * Licensed under the MIT License. See License.txt in the project root for license information.\\n *--------------------------------------------------------------------------------------------*/\\n\\n.monaco-editor .vs-whitespace {\\n\\tdisplay:inline-block;\\n}\\n\\n\", \"\"]);\n\n// exports\n","exports = module.exports = require(\"../../../../../../css-loader/lib/css-base.js\")(false);\n// imports\n\n\n// module\nexports.push([module.id, \"/*---------------------------------------------------------------------------------------------\\n * Copyright (c) Microsoft Corporation. All rights reserved.\\n * Licensed under the MIT License. See License.txt in the project root for license information.\\n *--------------------------------------------------------------------------------------------*/\\n\\n.monaco-editor .bracket-match {\\n\\tbox-sizing: border-box;\\n}\\n\", \"\"]);\n\n// exports\n","exports = module.exports = require(\"../../../../../../css-loader/lib/css-base.js\")(false);\n// imports\n\n\n// module\nexports.push([module.id, \"/*---------------------------------------------------------------------------------------------\\n * Copyright (c) Microsoft Corporation. All rights reserved.\\n * Licensed under the MIT License. See License.txt in the project root for license information.\\n *--------------------------------------------------------------------------------------------*/\\n\\n.monaco-menu .monaco-action-bar.vertical .action-label.hover {\\n\\tbackground-color: #EEE;\\n}\", \"\"]);\n\n// exports\n","exports = module.exports = require(\"../../../../../../css-loader/lib/css-base.js\")(false);\n// imports\n\n\n// module\nexports.push([module.id, \"/*---------------------------------------------------------------------------------------------\\n * Copyright (c) Microsoft Corporation. All rights reserved.\\n * Licensed under the MIT License. See License.txt in the project root for license information.\\n *--------------------------------------------------------------------------------------------*/\\n\\n.monaco-editor .lightbulb-glyph {\\n\\tdisplay: flex;\\n\\talign-items: center;\\n\\tjustify-content: center;\\n\\theight: 16px;\\n\\twidth: 20px;\\n\\tpadding-left: 2px;\\n}\\n\\n.monaco-editor .lightbulb-glyph:hover {\\n\\tcursor: pointer;\\n\\t/* transform: scale(1.3, 1.3); */\\n}\\n\\n.monaco-editor.vs .lightbulb-glyph {\\n\\tbackground: url(\\\"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiIgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgMTYgMTYiIGhlaWdodD0iMTYiIHdpZHRoPSIxNiI+PHBhdGggZmlsbD0iI0Y2RjZGNiIgZD0iTTEzLjUgNC4yQzEzLjEgMi4xIDEwLjggMCA5LjMgMEg2LjdjLS40IDAtLjYuMi0uNi4yQzQgLjggMi41IDIuNyAyLjUgNC45YzAgLjUtLjEgMi4zIDEuNyAzLjguNS41IDEuMiAyIDEuMyAyLjR2My4zTDcuMSAxNmgybDEuNS0xLjZWMTFjLjEtLjQuOC0xLjkgMS4zLTIuMyAxLjEtLjkgMS41LTEuOSAxLjYtMi43VjQuMnoiLz48Zz48ZyBmaWxsPSIjODQ4NDg0Ij48cGF0aCBkPSJNNi41IDEyaDN2MWgtM3pNNy41IDE1aDEuMWwuOS0xaC0zeiIvPjwvZz48cGF0aCBmaWxsPSIjZmMwIiBkPSJNMTIuNiA1YzAtMi4zLTEuOC00LjEtNC4xLTQuMS0uMSAwLTEuNC4xLTEuNC4xLTIuMS4zLTMuNyAyLTMuNyA0IDAgLjEtLjIgMS42IDEuNCAzIC43LjcgMS41IDIuNCAxLjYgMi45bC4xLjFoM2wuMS0uMmMuMS0uNS45LTIuMiAxLjYtMi45IDEuNi0xLjMgMS40LTIuOCAxLjQtMi45em0tMyAxbC0uNSAzaC0uNlY2YzEuMSAwIC45LTEgLjktMUg2LjV2LjFjMCAuMi4xLjkgMSAuOXYzSDdsLS4yLS43TDYuNSA2Yy0uNyAwLS45LS40LTEtLjd2LS40YzAtLjguOS0uOS45LS45aDMuMXMxIC4xIDEgMWMwIDAgLjEgMS0uOSAxeiIvPjwvZz48cGF0aCBmaWxsPSIjRjBFRkYxIiBkPSJNMTAuNSA1YzAtLjktMS0xLTEtMUg2LjRzLS45LjEtLjkuOXYuNGMwIC4zLjMuNy45LjdsLjQgMi4zLjIuN2guNVY2Yy0xIDAtMS0uNy0xLS45VjVoM3MuMSAxLS45IDF2M2guNmwuNS0zYy45IDAgLjgtMSAuOC0xeiIvPjwvc3ZnPg==\\\") center center no-repeat;\\n}\\n\\n.monaco-editor.vs-dark .lightbulb-glyph,\\n.monaco-editor.hc-black .lightbulb-glyph {\\n\\tbackground: url(\\\"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiIgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgMTYgMTYiIGhlaWdodD0iMTYiIHdpZHRoPSIxNiI+PHBhdGggZmlsbD0iIzFFMUUxRSIgZD0iTTEzLjUgNC4yQzEzLjEgMi4xIDEwLjggMCA5LjMgMEg2LjdjLS40IDAtLjYuMi0uNi4yQzQgLjggMi41IDIuNyAyLjUgNC45YzAgLjUtLjEgMi4zIDEuNyAzLjguNS41IDEuMiAyIDEuMyAyLjR2My4zTDcuMSAxNmgybDEuNS0xLjZWMTFjLjEtLjQuOC0xLjkgMS4zLTIuMyAxLjEtLjkgMS41LTEuOSAxLjYtMi43VjQuMnoiLz48Zz48ZyBmaWxsPSIjQzVDNUM1Ij48cGF0aCBkPSJNNi41IDEyaDN2MWgtM3pNNy41IDE1aDEuMWwuOS0xaC0zeiIvPjwvZz48cGF0aCBmaWxsPSIjRERCMjA0IiBkPSJNMTIuNiA1YzAtMi4zLTEuOC00LjEtNC4xLTQuMS0uMSAwLTEuNC4xLTEuNC4xLTIuMS4zLTMuNyAyLTMuNyA0IDAgLjEtLjIgMS42IDEuNCAzIC43LjcgMS41IDIuNCAxLjYgMi45bC4xLjFoM2wuMS0uMmMuMS0uNS45LTIuMiAxLjYtMi45IDEuNi0xLjMgMS40LTIuOCAxLjQtMi45em0tMyAxbC0uNSAzaC0uNlY2YzEuMSAwIC45LTEgLjktMUg2LjV2LjFjMCAuMi4xLjkgMSAuOXYzSDdsLS4yLS43TDYuNSA2Yy0uNyAwLS45LS40LTEtLjd2LS40YzAtLjguOS0uOS45LS45aDMuMXMxIC4xIDEgMWMwIDAgLjEgMS0uOSAxeiIvPjwvZz48cGF0aCBmaWxsPSIjMjUyNTI2IiBkPSJNMTAuNSA1YzAtLjktMS0xLTEtMUg2LjRzLS45LjEtLjkuOXYuNGMwIC4zLjMuNy45LjdsLjQgMi4zLjIuN2guNVY2Yy0xIDAtMS0uNy0xLS45VjVoM3MuMSAxLS45IDF2M2guNmwuNS0zYy45IDAgLjgtMSAuOC0xeiIvPjwvc3ZnPg==\\\") center center no-repeat;\\n}\\n\", \"\"]);\n\n// exports\n","exports = module.exports = require(\"../../../../../../css-loader/lib/css-base.js\")(false);\n// imports\n\n\n// module\nexports.push([module.id, \"/*---------------------------------------------------------------------------------------------\\n * Copyright (c) Microsoft Corporation. All rights reserved.\\n * Licensed under the MIT License. See License.txt in the project root for license information.\\n *--------------------------------------------------------------------------------------------*/\\n\\n.monaco-editor .codelens-decoration {\\n\\toverflow: hidden;\\n\\tdisplay: inline-block;\\n\\ttext-overflow: ellipsis;\\n}\\n\\n.monaco-editor .codelens-decoration > span,\\n.monaco-editor .codelens-decoration > a {\\n\\t-moz-user-select: none;\\n\\t-webkit-user-select: none;\\n\\t-ms-user-select: none;\\n\\tuser-select: none;\\n\\twhite-space: nowrap;\\n\\tvertical-align: sub;\\n}\\n\\n.monaco-editor .codelens-decoration > a {\\n\\ttext-decoration: none;\\n}\\n\\n.monaco-editor .codelens-decoration > a:hover {\\n\\ttext-decoration: underline;\\n\\tcursor: pointer;\\n}\\n\\n.monaco-editor .codelens-decoration.invisible-cl {\\n\\topacity: 0;\\n}\\n\\n@keyframes fadein { 0% { opacity:0; visibility:visible;} 100% { opacity:1; } }\\n@-moz-keyframes fadein { 0% { opacity:0; visibility:visible;} 100% { opacity:1; } }\\n@-o-keyframes fadein { 0% { opacity:0; visibility:visible;} 100% { opacity:1; } }\\n@-webkit-keyframes fadein { 0% { opacity:0; visibility:visible;} 100% { opacity:1; } }\\n\\n.monaco-editor .codelens-decoration.fadein {\\n\\t-webkit-animation: fadein 0.5s linear;\\n\\t-moz-animation: fadein 0.5s linear;\\n\\t-o-animation: fadein 0.5s linear;\\n\\tanimation: fadein 0.5s linear;\\n}\\n\", \"\"]);\n\n// exports\n","exports = module.exports = require(\"../../../../../../css-loader/lib/css-base.js\")(false);\n// imports\n\n\n// module\nexports.push([module.id, \"/*---------------------------------------------------------------------------------------------\\n * Copyright (c) Microsoft Corporation. All rights reserved.\\n * Licensed under the MIT License. See License.txt in the project root for license information.\\n *--------------------------------------------------------------------------------------------*/\\n\\n.colorpicker-widget {\\n\\theight: 190px;\\n\\tuser-select: none;\\n}\\n\\n.monaco-editor .colorpicker-hover:focus {\\n\\toutline: none;\\n}\\n\\n\\n/* Header */\\n\\n.colorpicker-header {\\n\\tdisplay: flex;\\n\\theight: 24px;\\n\\tposition: relative;\\n\\tbackground: url(\\\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAYAAACp8Z5+AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAZdEVYdFNvZnR3YXJlAHBhaW50Lm5ldCA0LjAuMTZEaa/1AAAAHUlEQVQYV2PYvXu3JAi7uLiAMaYAjAGTQBPYLQkAa/0Zef3qRswAAAAASUVORK5CYII=\\\");\\n\\tbackground-size: 9px 9px;\\n\\timage-rendering: pixelated;\\n}\\n\\n.colorpicker-header .picked-color {\\n\\twidth: 216px;\\n\\ttext-align: center;\\n\\tline-height: 24px;\\n\\tcursor: pointer;\\n\\tcolor: white;\\n\\tflex: 1;\\n\\ttext-align: center;\\n}\\n\\n.colorpicker-header .picked-color.light {\\n\\tcolor: black;\\n}\\n\\n.colorpicker-header .original-color {\\n\\twidth: 74px;\\n\\tz-index: inherit;\\n\\tcursor: pointer;\\n}\\n\\n\\n/* Body */\\n\\n.colorpicker-body {\\n\\tdisplay: flex;\\n\\tpadding: 8px;\\n\\tposition: relative;\\n}\\n\\n.colorpicker-body .saturation-wrap {\\n\\toverflow: hidden;\\n\\theight: 150px;\\n\\tposition: relative;\\n\\tmin-width: 220px;\\n\\tflex: 1;\\n}\\n\\n.colorpicker-body .saturation-box {\\n\\theight: 150px;\\n\\tposition: absolute;\\n}\\n\\n.colorpicker-body .saturation-selection {\\n\\twidth: 9px;\\n\\theight: 9px;\\n\\tmargin: -5px 0 0 -5px;\\n\\tborder: 1px solid rgb(255, 255, 255);\\n\\tborder-radius: 100%;\\n\\tbox-shadow: 0px 0px 2px rgba(0, 0, 0, 0.8);\\n\\tposition: absolute;\\n}\\n\\n.colorpicker-body .strip {\\n\\twidth: 25px;\\n\\theight: 150px;\\n}\\n\\n.colorpicker-body .hue-strip {\\n\\tposition: relative;\\n\\tmargin-left: 8px;\\n\\tcursor: -webkit-grab;\\n\\tbackground: linear-gradient(to bottom, #ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%);\\n}\\n\\n.colorpicker-body .opacity-strip {\\n\\tposition: relative;\\n\\tmargin-left: 8px;\\n\\tcursor: -webkit-grab;\\n\\tbackground: url(\\\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAYAAACp8Z5+AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAZdEVYdFNvZnR3YXJlAHBhaW50Lm5ldCA0LjAuMTZEaa/1AAAAHUlEQVQYV2PYvXu3JAi7uLiAMaYAjAGTQBPYLQkAa/0Zef3qRswAAAAASUVORK5CYII=\\\");\\n\\tbackground-size: 9px 9px;\\n\\timage-rendering: pixelated;\\n}\\n\\n.colorpicker-body .strip.grabbing {\\n\\tcursor: -webkit-grabbing;\\n}\\n\\n.colorpicker-body .slider {\\n\\tposition: absolute;\\n\\ttop: 0;\\n\\tleft: -2px;\\n\\twidth: calc(100% + 4px);\\n\\theight: 4px;\\n\\tbox-sizing: border-box;\\n\\tborder: 1px solid rgba(255, 255, 255, 0.71);\\n\\tbox-shadow: 0px 0px 1px rgba(0, 0, 0, 0.85);\\n}\\n\\n.colorpicker-body .strip .overlay {\\n\\theight: 150px;\\n\\tpointer-events: none;\\n}\", \"\"]);\n\n// exports\n","exports = module.exports = require(\"../../../../../../css-loader/lib/css-base.js\")(false);\n// imports\n\n\n// module\nexports.push([module.id, \"/*---------------------------------------------------------------------------------------------\\n * Copyright (c) Microsoft Corporation. All rights reserved.\\n * Licensed under the MIT License. See License.txt in the project root for license information.\\n *--------------------------------------------------------------------------------------------*/\\n\\n.monaco-editor.vs .dnd-target {\\n\\tborder-right: 2px dotted black;\\n\\tcolor: white; /* opposite of black */\\n}\\n.monaco-editor.vs-dark .dnd-target {\\n\\tborder-right: 2px dotted #AEAFAD;\\n\\tcolor: #51504f; /* opposite of #AEAFAD */\\n}\\n.monaco-editor.hc-black .dnd-target {\\n\\tborder-right: 2px dotted #fff;\\n\\tcolor: #000; /* opposite of #fff */\\n}\\n\\n.monaco-editor.mouse-default .view-lines,\\n.monaco-editor.vs-dark.mac.mouse-default .view-lines,\\n.monaco-editor.hc-black.mac.mouse-default .view-lines {\\n\\tcursor: default;\\n}\\n.monaco-editor.mouse-copy .view-lines,\\n.monaco-editor.vs-dark.mac.mouse-copy .view-lines,\\n.monaco-editor.hc-black.mac.mouse-copy .view-lines {\\n\\tcursor: copy;\\n}\", \"\"]);\n\n// exports\n","exports = module.exports = require(\"../../../../../../css-loader/lib/css-base.js\")(false);\n// imports\n\n\n// module\nexports.push([module.id, \"/*---------------------------------------------------------------------------------------------\\n * Copyright (c) Microsoft Corporation. All rights reserved.\\n * Licensed under the MIT License. See License.txt in the project root for license information.\\n *--------------------------------------------------------------------------------------------*/\\n\\n/* Checkbox */\\n\\n.monaco-checkbox .label {\\n\\twidth: 12px;\\n\\theight: 12px;\\n\\tborder: 1px solid black;\\n\\tbackground-color: transparent;\\n\\tdisplay: inline-block;\\n}\\n\\n.monaco-checkbox .checkbox {\\n\\tposition: absolute;\\n\\toverflow: hidden;\\n\\tclip: rect(0 0 0 0);\\n\\theight: 1px;\\n\\twidth: 1px;\\n\\tmargin: -1px;\\n\\tpadding: 0;\\n\\tborder: 0;\\n}\\n\\n.monaco-checkbox .checkbox:checked + .label {\\n\\tbackground-color: black;\\n}\\n\\n/* Find widget */\\n.monaco-editor .find-widget {\\n\\tposition: absolute;\\n\\tz-index: 10;\\n\\ttop: -44px; /* find input height + shadow (10px) */\\n\\theight: 34px; /* find input height */\\n\\toverflow: hidden;\\n\\tline-height: 19px;\\n\\n\\t-webkit-transition: top 200ms linear;\\n\\t-o-transition: top 200ms linear;\\n\\t-moz-transition: top 200ms linear;\\n\\t-ms-transition: top 200ms linear;\\n\\ttransition: top 200ms linear;\\n\\n\\tpadding: 0 4px;\\n}\\n/* Find widget when replace is toggled on */\\n.monaco-editor .find-widget.replaceToggled {\\n\\ttop: -74px; /* find input height + replace input height + shadow (10px) */\\n\\theight: 64px; /* find input height + replace input height */\\n}\\n.monaco-editor .find-widget.replaceToggled > .replace-part {\\n\\tdisplay: flex;\\n\\tdisplay: -webkit-flex;\\n\\talign-items: center;\\n}\\n\\n.monaco-editor .find-widget.visible,\\n.monaco-editor .find-widget.replaceToggled.visible {\\n\\ttop: 0;\\n}\\n\\n.monaco-editor .find-widget .monaco-inputbox .input {\\n\\tbackground-color: transparent;\\n\\t/* Style to compensate for //winjs */\\n\\tmin-height: 0;\\n}\\n\\n.monaco-editor .find-widget .replace-input .input {\\n\\tfont-size: 13px;\\n}\\n\\n.monaco-editor .find-widget > .find-part,\\n.monaco-editor .find-widget > .replace-part {\\n\\tmargin: 4px 0 0 17px;\\n\\tfont-size: 12px;\\n\\tdisplay: flex;\\n\\tdisplay: -webkit-flex;\\n\\talign-items: center;\\n}\\n\\n.monaco-editor .find-widget > .find-part .monaco-inputbox,\\n.monaco-editor .find-widget > .replace-part .monaco-inputbox {\\n\\theight: 25px;\\n}\\n\\n.monaco-editor .find-widget > .find-part .monaco-inputbox > .wrapper > .input {\\n\\twidth: 100% !important;\\n\\tpadding-right: 66px;\\n}\\n.monaco-editor .find-widget > .find-part .monaco-inputbox > .wrapper > .input,\\n.monaco-editor .find-widget > .replace-part .monaco-inputbox > .wrapper > .input {\\n\\tpadding-top: 2px;\\n\\tpadding-bottom: 2px;\\n}\\n\\n.monaco-editor .find-widget .monaco-findInput {\\n\\tvertical-align: middle;\\n\\tdisplay: flex;\\n\\tdisplay: -webkit-flex;\\n\\tflex:1;\\n}\\n\\n.monaco-editor .find-widget .matchesCount {\\n\\tdisplay: flex;\\n\\tdisplay: -webkit-flex;\\n\\tflex: initial;\\n\\tmargin: 0 1px 0 3px;\\n\\tpadding: 2px 2px 0 2px;\\n\\theight: 25px;\\n\\tvertical-align: middle;\\n\\tbox-sizing: border-box;\\n\\ttext-align: center;\\n\\tline-height: 23px;\\n}\\n\\n.monaco-editor .find-widget .button {\\n\\tmin-width: 20px;\\n\\twidth: 20px;\\n\\theight: 20px;\\n\\tdisplay: flex;\\n\\tdisplay: -webkit-flex;\\n\\tflex: initial;\\n\\tmargin-left: 3px;\\n\\tbackground-position: center center;\\n\\tbackground-repeat: no-repeat;\\n\\tcursor: pointer;\\n}\\n\\n.monaco-editor .find-widget .button:not(.disabled):hover {\\n\\tbackground-color: rgba(0, 0, 0, 0.1);\\n}\\n\\n.monaco-editor .find-widget .button.left {\\n\\tmargin-left: 0;\\n\\tmargin-right: 3px;\\n}\\n\\n.monaco-editor .find-widget .button.wide {\\n\\twidth: auto;\\n\\tpadding: 1px 6px;\\n\\ttop: -1px;\\n}\\n\\n.monaco-editor .find-widget .button.toggle {\\n\\tposition: absolute;\\n\\ttop: 0;\\n\\tleft: 0;\\n\\twidth: 18px;\\n\\theight: 100%;\\n\\t-webkit-box-sizing:\\tborder-box;\\n\\t-o-box-sizing:\\t\\tborder-box;\\n\\t-moz-box-sizing:\\tborder-box;\\n\\t-ms-box-sizing:\\t\\tborder-box;\\n\\tbox-sizing:\\t\\t\\tborder-box;\\n}\\n\\n.monaco-editor .find-widget .button.toggle.disabled {\\n\\tdisplay: none;\\n}\\n\\n.monaco-editor .find-widget .previous {\\n\\tbackground-image: url(\\\"data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiCgkgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIKCSB4PSIwcHgiIHk9IjBweCIgd2lkdGg9IjE2cHgiIGhlaWdodD0iMTZweCIgdmlld0JveD0iLTEgLTMgMTYgMTYiIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgLTEgLTMgMTYgMTYiIHhtbDpzcGFjZT0icHJlc2VydmUiPgo8cG9seWdvbiBmaWxsPSIjNDI0MjQyIiBwb2ludHM9IjEzLDQgNiw0IDksMSA2LDEgMiw1IDYsOSA5LDkgNiw2IDEzLDYgIi8+Cjwvc3ZnPgo=\\\");\\n}\\n\\n.monaco-editor .find-widget .next {\\n\\tbackground-image: url(\\\"data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiCgkgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIKCSB4PSIwcHgiIHk9IjBweCIgd2lkdGg9IjE2cHgiIGhlaWdodD0iMTZweCIgdmlld0JveD0iLTEgLTMgMTYgMTYiIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgLTEgLTMgMTYgMTYiIHhtbDpzcGFjZT0icHJlc2VydmUiPgo8cGF0aCBmaWxsPSIjNDI0MjQyIiBkPSJNMSw0aDdMNSwxaDNsNCw0TDgsOUg1bDMtM0gxVjR6Ii8+Cjwvc3ZnPgo=\\\");\\n}\\n\\n.monaco-editor .find-widget .disabled {\\n\\topacity: 0.3;\\n\\tcursor: default;\\n}\\n\\n.monaco-editor .find-widget .monaco-checkbox {\\n\\twidth: 20px;\\n\\theight: 20px;\\n\\tdisplay: inline-block;\\n\\tvertical-align: middle;\\n\\tmargin-left: 3px;\\n}\\n\\n.monaco-editor .find-widget .monaco-checkbox .label {\\n\\tcontent: '';\\n\\tdisplay: inline-block;\\n\\tbackground-repeat: no-repeat;\\n\\tbackground-position: 0 0;\\n\\tbackground-image: url(\\\"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCI+CjxnIHRyYW5zZm9ybT0idHJhbnNsYXRlKDAsLTEwMzIuMzYyMikiPgogIDxyZWN0IHdpZHRoPSI5IiBoZWlnaHQ9IjIiIHg9IjIiIHk9IjEwNDYuMzYyMiIgc3R5bGU9ImZpbGw6IzQyNDI0MjtmaWxsLW9wYWNpdHk6MTtzdHJva2U6bm9uZSIgLz4KICA8cmVjdCB3aWR0aD0iMTMiIGhlaWdodD0iMiIgeD0iMiIgeT0iMTA0My4zNjIyIiBzdHlsZT0iZmlsbDojNDI0MjQyO2ZpbGwtb3BhY2l0eToxO3N0cm9rZTpub25lIiAvPgogIDxyZWN0IHdpZHRoPSI2IiBoZWlnaHQ9IjIiIHg9IjIiIHk9IjEwNDAuMzYyMiIgc3R5bGU9ImZpbGw6IzQyNDI0MjtmaWxsLW9wYWNpdHk6MTtzdHJva2U6bm9uZSIgLz4KICA8cmVjdCB3aWR0aD0iMTIiIGhlaWdodD0iMiIgeD0iMiIgeT0iMTAzNy4zNjIyIiBzdHlsZT0iZmlsbDojNDI0MjQyO2ZpbGwtb3BhY2l0eToxO3N0cm9rZTpub25lIiAvPgo8L2c+Cjwvc3ZnPg==\\\");\\n\\twidth: 20px;\\n\\theight: 20px;\\n\\tborder: none;\\n}\\n\\n.monaco-editor .find-widget .monaco-checkbox .checkbox:disabled + .label {\\n\\topacity: 0.3;\\n\\tcursor: default;\\n}\\n\\n.monaco-editor .find-widget .monaco-checkbox .checkbox:not(:disabled) + .label {\\n\\tcursor: pointer;\\n}\\n\\n.monaco-editor .find-widget .monaco-checkbox .checkbox:not(:disabled):hover:before + .label {\\n\\tbackground-color: #DDD;\\n}\\n\\n.monaco-editor .find-widget .monaco-checkbox .checkbox:checked + .label {\\n\\tbackground-color: rgba(100, 100, 100, 0.2);\\n}\\n\\n.monaco-editor .find-widget .close-fw {\\n\\tbackground-image: url(\\\"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgdmlld0JveD0iMyAzIDE2IDE2IiBlbmFibGUtYmFja2dyb3VuZD0ibmV3IDMgMyAxNiAxNiI+PHBvbHlnb24gZmlsbD0iIzQyNDI0MiIgcG9pbnRzPSIxMi41OTcsMTEuMDQyIDE1LjQsMTMuODQ1IDEzLjg0NCwxNS40IDExLjA0MiwxMi41OTggOC4yMzksMTUuNCA2LjY4MywxMy44NDUgOS40ODUsMTEuMDQyIDYuNjgzLDguMjM5IDguMjM4LDYuNjgzIDExLjA0Miw5LjQ4NiAxMy44NDUsNi42ODMgMTUuNCw4LjIzOSIvPjwvc3ZnPg==\\\");\\n}\\n\\n.monaco-editor .find-widget .expand {\\n\\tbackground-image: url(\\\"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+PHBhdGggZmlsbD0iIzY0NjQ2NSIgZD0iTTExIDEwLjA3aC01LjY1Nmw1LjY1Ni01LjY1NnY1LjY1NnoiLz48L3N2Zz4=\\\");\\n}\\n\\n.monaco-editor .find-widget .collapse {\\n\\tbackground-image: url(\\\"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+PHBhdGggZmlsbD0iIzY0NjQ2NSIgZD0iTTYgNHY4bDQtNC00LTR6bTEgMi40MTRsMS41ODYgMS41ODYtMS41ODYgMS41ODZ2LTMuMTcyeiIvPjwvc3ZnPg==\\\");\\n}\\n\\n.monaco-editor .find-widget .replace {\\n\\tbackground-image: url(\\\"data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IiB3aWR0aD0iMTZweCIKCSBoZWlnaHQ9IjE2cHgiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgMTYgMTYiIHhtbDpzcGFjZT0icHJlc2VydmUiPgo8ZyBpZD0iaWNvbl94NUZfYmciPgoJPGc+CgkJPHBhdGggZmlsbD0iIzQyNDI0MiIgZD0iTTExLDNWMWgtMXY1djFoMWgyaDFWNFYzSDExeiBNMTMsNmgtMlY0aDJWNnoiLz4KCQk8cGF0aCBmaWxsPSIjNDI0MjQyIiBkPSJNMiwxNWg3VjlIMlYxNXogTTQsMTBoM3YxSDV2Mmgyd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w1djEuNUwyLjUsOEw0LDYuNVY1TDMsNkwyLjk3OSwzLjVjMC0wLjI3NSwwLjIyNS0wLjUsMC41LTAuNUg3VjJIMy40NzkKCQlDMi42NTEsMiwxLjk3OSwyLjY3MywxLjk3OSwzLjV6Ii8+CjwvZz4KPC9zdmc+Cg==\\\");\\n}\\n\\n.monaco-editor .find-widget > .replace-part {\\n\\tdisplay: none;\\n}\\n\\n.monaco-editor .find-widget > .replace-part > .replace-input {\\n\\tdisplay: flex;\\n\\tdisplay: -webkit-flex;\\n\\tvertical-align: middle;\\n\\twidth: auto !important;\\n}\\n\\n/* REDUCED */\\n.monaco-editor .find-widget.reduced-find-widget .matchesCount,\\n.monaco-editor .find-widget.reduced-find-widget .monaco-checkbox {\\n\\tdisplay:none;\\n}\\n\\n/* NARROW (SMALLER THAN REDUCED) */\\n.monaco-editor .find-widget.narrow-find-widget {\\n\\tmax-width: 257px !important;\\n}\\n\\n/* COLLAPSED (SMALLER THAN NARROW) */\\n.monaco-editor .find-widget.collapsed-find-widget {\\n\\tmax-width: 111px !important;\\n}\\n\\n.monaco-editor .find-widget.collapsed-find-widget .button.previous,\\n.monaco-editor .find-widget.collapsed-find-widget .button.next,\\n.monaco-editor .find-widget.collapsed-find-widget .button.replace,\\n.monaco-editor .find-widget.collapsed-find-widget .button.replace-all,\\n.monaco-editor .find-widget.collapsed-find-widget > .find-part .monaco-findInput .controls {\\n\\tdisplay:none;\\n}\\n\\n.monaco-editor .find-widget.collapsed-find-widget > .find-part .monaco-inputbox > .wrapper > .input {\\n\\tpadding-right: 0px;\\n}\\n\\n.monaco-editor .findMatch {\\n\\t-webkit-animation-duration: 0;\\n\\t-webkit-animation-name: inherit !important;\\n\\t-moz-animation-duration: 0;\\n\\t-moz-animation-name: inherit !important;\\n\\t-ms-animation-duration: 0;\\n\\t-ms-animation-name: inherit !important;\\n\\tanimation-duration: 0;\\n\\tanimation-name: inherit !important;\\n}\\n\\n.monaco-editor .find-widget .monaco-sash {\\n\\twidth: 2px !important;\\n\\tmargin-left: -4px;\\n}\\n\\n.monaco-editor.hc-black .find-widget .previous,\\n.monaco-editor.vs-dark .find-widget .previous {\\n\\tbackground-image: url(\\\"data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiCgkgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIKCSB4PSIwcHgiIHk9IjBweCIgd2lkdGg9IjE2cHgiIGhlaWdodD0iMTZweCIgdmlld0JveD0iLTEgLTMgMTYgMTYiIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgLTEgLTMgMTYgMTYiIHhtbDpzcGFjZT0icHJlc2VydmUiPgo8cG9seWdvbiBmaWxsPSIjQzVDNUM1IiBwb2ludHM9IjEzLDQgNiw0IDksMSA2LDEgMiw1IDYsOSA5LDkgNiw2IDEzLDYgIi8+Cjwvc3ZnPgo=\\\");\\n}\\n\\n.monaco-editor.hc-black .find-widget .next,\\n.monaco-editor.vs-dark .find-widget .next {\\n\\tbackground-image: url(\\\"data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiCgkgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIKCSB4PSIwcHgiIHk9IjBweCIgd2lkdGg9IjE2cHgiIGhlaWdodD0iMTZweCIgdmlld0JveD0iLTEgLTMgMTYgMTYiIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgLTEgLTMgMTYgMTYiIHhtbDpzcGFjZT0icHJlc2VydmUiPgo8cGF0aCBmaWxsPSIjQzVDNUM1IiBkPSJNMSw0aDdMNSwxaDNsNCw0TDgsOUg1bDMtM0gxVjR6Ii8+Cjwvc3ZnPgo=\\\");\\n}\\n\\n.monaco-editor.hc-black .find-widget .monaco-checkbox .label,\\n.monaco-editor.vs-dark .find-widget .monaco-checkbox .label {\\n\\tbackground-image: url(\\\"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCI+CjxnIHRyYW5zZm9ybT0idHJhbnNsYXRlKDAsLTEwMzIuMzYyMikiPgogIDxyZWN0IHdpZHRoPSI5IiBoZWlnaHQ9IjIiIHg9IjIiIHk9IjEwNDYuMzYyMiIgc3R5bGU9ImZpbGw6I0M1QzVDNTtmaWxsLW9wYWNpdHk6MTtzdHJva2U6bm9uZSIgLz4KICA8cmVjdCB3aWR0aD0iMTMiIGhlaWdodD0iMiIgeD0iMiIgeT0iMTA0My4zNjIyIiBzdHlsZT0iZmlsbDojQzVDNUM1O2ZpbGwtb3BhY2l0eToxO3N0cm9rZTpub25lIiAvPgogIDxyZWN0IHdpZHRoPSI2IiBoZWlnaHQ9IjIiIHg9IjIiIHk9IjEwNDAuMzYyMiIgc3R5bGU9ImZpbGw6I0M1QzVDNTtmaWxsLW9wYWNpdHk6MTtzdHJva2U6bm9uZSIgLz4KICA8cmVjdCB3aWR0aD0iMTIiIGhlaWdodD0iMiIgeD0iMiIgeT0iMTAzNy4zNjIyIiBzdHlsZT0iZmlsbDojQzVDNUM1O2ZpbGwtb3BhY2l0eToxO3N0cm9rZTpub25lIiAvPgo8L2c+Cjwvc3ZnPg==\\\");\\n}\\n\\n.monaco-editor.vs-dark .find-widget .monaco-checkbox .checkbox:not(:disabled):hover:before + .label {\\n\\tbackground-color: rgba(255, 255, 255, 0.1);\\n}\\n\\n.monaco-editor.vs-dark .find-widget .monaco-checkbox .checkbox:checked + .label {\\n\\tbackground-color: rgba(255, 255, 255, 0.1);\\n}\\n\\n.monaco-editor.hc-black .find-widget .close-fw,\\n.monaco-editor.vs-dark .find-widget .close-fw {\\n\\tbackground-image: url(\\\"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgdmlld0JveD0iMyAzIDE2IDE2IiBlbmFibGUtYmFja2dyb3VuZD0ibmV3IDMgMyAxNiAxNiI+PHBvbHlnb24gZmlsbD0iI2U4ZThlOCIgcG9pbnRzPSIxMi41OTcsMTEuMDQyIDE1LjQsMTMuODQ1IDEzLjg0NCwxNS40IDExLjA0MiwxMi41OTggOC4yMzksMTUuNCA2LjY4MywxMy44NDUgOS40ODUsMTEuMDQyIDYuNjgzLDguMjM5IDguMjM4LDYuNjgzIDExLjA0Miw5LjQ4NiAxMy44NDUsNi42ODMgMTUuNCw4LjIzOSIvPjwvc3ZnPg==\\\");\\n}\\n\\n.monaco-editor.hc-black .find-widget .replace,\\n.monaco-editor.vs-dark .find-widget .replace {\\n\\tbackground-image: url(\\\"data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IiB3aWR0aD0iMTZweCIKCSBoZWlnaHQ9IjE2cHgiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgMTYgMTYiIHhtbDpzcGFjZT0icHJlc2VydmUiPgo8ZyBpZD0iaWNvbl94NUZfYmciPgoJPGc+CgkJPHBhdGggZmlsbD0iI0M1QzVDNSIgZD0iTTExLDNWMWgtMXY1djFoMWgyaDFWNFYzSDExeiBNMTMsNmgtMlY0aDJWNnoiLz4KCQk8cGF0aCBmaWxsPSIjQzVDNUM1IiBkPSJNMiwxNWg3VjlIMlYxNXogTTQsMTBoM3YxSDV2MmgydjFINFYxMHoiLz4KCTwvZz4KPC9nPgo8ZyBpZD0iY29sb3JfeDVGX2ltcG9ydGFuY2UiPgoJPHBhdGggZmlsbD0iIzc1Q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jIyNS0wLjUsMC41LTAuNUg3VjJIMy40NzkKCQlDMi42NTEsMiwxLjk3OSwyLjY3MywxLjk3OSwzLjV6Ii8+CjwvZz4KPC9zdmc+Cg==\\\");\\n}\\n\\n.monaco-editor.hc-black .find-widget .expand,\\n.monaco-editor.vs-dark .find-widget .expand {\\n\\tbackground-image: url(\\\"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+PHBhdGggZmlsbD0iI2U4ZThlOCIgZD0iTTExIDEwLjA3aC01LjY1Nmw1LjY1Ni01LjY1NnY1LjY1NnoiLz48L3N2Zz4=\\\");\\n}\\n\\n.monaco-editor.hc-black .find-widget .collapse,\\n.monaco-editor.vs-dark .find-widget .collapse {\\n\\tbackground-image: url(\\\"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+PHBhdGggZmlsbD0iI2U4ZThlOCIgZD0iTTYgNHY4bDQtNC00LTR6bTEgMi40MTRsMS41ODYgMS41ODYtMS41ODYgMS41ODZ2LTMuMTcyeiIvPjwvc3ZnPg==\\\");\\n}\\n\\n.monaco-editor.hc-black .find-widget .button:not(.disabled):hover,\\n.monaco-editor.vs-dark .find-widget .button:not(.disabled):hover {\\n\\tbackground-color: rgba(255, 255, 255, 0.1);\\n}\\n\\n.monaco-editor.hc-black .find-widget .button:before {\\n\\tposition: relative;\\n\\ttop: 1px;\\n\\tleft: 2px;\\n}\\n\\n.monaco-editor.hc-black .find-widget .monaco-checkbox .checkbox:checked + .label {\\n\\tbackground-color: rgba(255, 255, 255, 0.1);\\n}\\n\", \"\"]);\n\n// exports\n","exports = module.exports = require(\"../../../../../../css-loader/lib/css-base.js\")(false);\n// imports\n\n\n// module\nexports.push([module.id, \"/*---------------------------------------------------------------------------------------------\\n * Copyright (c) Microsoft Corporation. All rights reserved.\\n * Licensed under the MIT License. See License.txt in the project root for license information.\\n *--------------------------------------------------------------------------------------------*/\\n\\n.monaco-editor .margin-view-overlays .folding {\\n\\tmargin-left: 5px;\\n\\tcursor: pointer;\\n\\tbackground-repeat: no-repeat;\\n\\tbackground-origin: border-box;\\n\\tbackground-position: 3px center;\\n\\tbackground-size: 15px;\\n\\topacity: 0;\\n\\ttransition: opacity 0.5s;\\n}\\n\\n.monaco-editor .margin-view-overlays .folding {\\n\\tbackground-image: url(\\\"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgMTUgMTUiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDE1IDE1OyI+CjxwYXRoIHN0eWxlPSJmaWxsOiNCNkI2QjYiIGQ9Ik0xMSw0djdINFY0SDExIE0xMiwzSDN2OWg5VjNMMTIsM3oiLz4KPGxpbmUgc3R5bGU9ImZpbGw6bm9uZTtzdHJva2U6IzZCNkI2QjtzdHJva2UtbWl0ZXJsaW1pdDoxMCIgeDE9IjEwIiB5MT0iNy41IiB4Mj0iNSIgeTI9IjcuNSIvPgo8L3N2Zz4=\\\");\\n}\\n\\n.monaco-editor.hc-black .margin-view-overlays .folding,\\n.monaco-editor.vs-dark .margin-view-overlays .folding {\\n\\tbackground-image: url(\\\"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgMTUgMTUiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDE1IDE1OyI+CjxwYXRoIHN0eWxlPSJmaWxsOiM1QTVBNUEiIGQ9Ik0xMSw0djdINFY0SDExIE0xMiwzSDN2OWg5VjNMMTIsM3oiLz4KPGxpbmUgc3R5bGU9ImZpbGw6bm9uZTtzdHJva2U6I0M1QzVDNTtzdHJva2UtbWl0ZXJsaW1pdDoxMCIgeDE9IjEwIiB5MT0iNy41IiB4Mj0iNSIgeTI9IjcuNSIvPgo8L3N2Zz4=\\\");\\n}\\n\\n.monaco-editor .margin-view-overlays:hover .folding,\\n.monaco-editor .margin-view-overlays .folding.alwaysShowFoldIcons {\\n\\topacity: 1;\\n}\\n\\n.monaco-editor .margin-view-overlays .folding.collapsed {\\n\\tbackground-image: url(\\\"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgMTUgMTUiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDE1IDE1OyI+CjxyZWN0IHg9IjMiIHk9IjMiIHN0eWxlPSJmaWxsOiNFOEU4RTgiIHdpZHRoPSI5IiBoZWlnaHQ9IjkiLz4KPHBhdGggc3R5bGU9ImZpbGw6I0I2QjZCNiIgZD0iTTExLDR2N0g0VjRIMTEgTTEyLDNIM3Y5aDlWM0wxMiwzeiIvPgo8bGluZSBzdHlsZT0iZmlsbDpub25lO3N0cm9rZTojNkI2QjZCO3N0cm9rZS1taXRlcmxpbWl0OjEwIiB4MT0iMTAiIHkxPSI3LjUiIHgyPSI1IiB5Mj0iNy41Ii8+CjxsaW5lIHN0eWxlPSJmaWxsOm5vbmU7c3Ryb2tlOiM2QjZCNkI7c3Ryb2tlLW1pdGVybGltaXQ6MTAiIHgxPSI3LjUiIHkxPSI1IiB4Mj0iNy41IiB5Mj0iMTAiLz4KPC9zdmc+\\\");\\n\\topacity: 1;\\n}\\n\\n.monaco-editor.hc-black .margin-view-overlays .folding.collapsed,\\n.monaco-editor.vs-dark .margin-view-overlays .folding.collapsed {\\n\\tbackground-image: url(\\\"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgMTUgMTUiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDE1IDE1OyI+CjxyZWN0IHg9IjMiIHk9IjMiIHN0eWxlPSJvcGFjaXR5OjAuMTtmaWxsOiNGRkZGRkYiIHdpZHRoPSI5IiBoZWlnaHQ9IjkiLz4KPHBhdGggc3R5bGU9ImZpbGw6IzVBNUE1QSIgZD0iTTExLDR2N0g0VjRIMTEgTTEyLDNIM3Y5aDlWM0wxMiwzeiIvPgo8bGluZSBzdHlsZT0iZmlsbDpub25lO3N0cm9rZTojQzVDNUM1O3N0cm9rZS1taXRlcmxpbWl0OjEwIiB4MT0iMTAiIHkxPSI3LjUiIHgyPSI1IiB5Mj0iNy41Ii8+CjxsaW5lIHN0eWxlPSJmaWxsOm5vbmU7c3Ryb2tlOiNDNUM1QzU7c3Ryb2tlLW1pdGVybGltaXQ6MTAiIHgxPSI3LjUiIHkxPSI1IiB4Mj0iNy41IiB5Mj0iMTAiLz4KPC9zdmc+\\\");\\n}\\n\\n.monaco-editor .inline-folded:after {\\n\\tcolor: grey;\\n\\tmargin: 0.1em 0.2em 0 0.2em;\\n\\tcontent: \\\"\\\\22EF\\\";\\n\\tdisplay: inline;\\n\\tline-height: 1em;\\n\\tcursor: pointer;\\n}\\n\\n\", \"\"]);\n\n// exports\n","exports = module.exports = require(\"../../../../../../css-loader/lib/css-base.js\")(false);\n// imports\n\n\n// module\nexports.push([module.id, \"/*---------------------------------------------------------------------------------------------\\n * Copyright (c) Microsoft Corporation. All rights reserved.\\n * Licensed under the MIT License. See License.txt in the project root for license information.\\n *--------------------------------------------------------------------------------------------*/\\n\\n.monaco-editor .goto-definition-link {\\n\\ttext-decoration: underline;\\n\\tcursor: pointer;\\n}\", \"\"]);\n\n// exports\n","exports = module.exports = require(\"../../../../../../css-loader/lib/css-base.js\")(false);\n// imports\n\n\n// module\nexports.push([module.id, \"/*---------------------------------------------------------------------------------------------\\n * Copyright (c) Microsoft Corporation. All rights reserved.\\n * Licensed under the MIT License. See License.txt in the project root for license information.\\n *--------------------------------------------------------------------------------------------*/\\n\\n/* marker zone */\\n\\n.monaco-editor .marker-widget {\\n\\tpadding-left: 2px;\\n\\ttext-overflow: ellipsis;\\n\\twhite-space: nowrap;\\n}\\n\\n.monaco-editor .marker-widget > .stale {\\n\\topacity: 0.6;\\n\\tfont-style: italic;\\n}\\n\\n.monaco-editor .marker-widget div.block {\\n\\tdisplay: inline-block;\\n\\tvertical-align: top;\\n}\\n\\n.monaco-editor .marker-widget .title {\\n\\tdisplay: inline-block;\\n\\tpadding-right: 5px;\\n}\\n\\n.monaco-editor .marker-widget .descriptioncontainer {\\n\\tposition: relative;\\n\\twhite-space: pre;\\n\\t-webkit-user-select: text;\\n\\tuser-select: text;\\n}\\n\\n.monaco-editor .marker-widget .descriptioncontainer .filename {\\n\\tcursor: pointer;\\n\\topacity: 0.6;\\n}\\n\", \"\"]);\n\n// exports\n","exports = module.exports = require(\"../../../../../../css-loader/lib/css-base.js\")(false);\n// imports\n\n\n// module\nexports.push([module.id, \"/*---------------------------------------------------------------------------------------------\\n * Copyright (c) Microsoft Corporation. All rights reserved.\\n * Licensed under the MIT License. See License.txt in the project root for license information.\\n *--------------------------------------------------------------------------------------------*/\\n\\n.monaco-editor-hover {\\n\\tcursor: default;\\n\\tposition: absolute;\\n\\toverflow: hidden;\\n\\tz-index: 50;\\n\\t-webkit-user-select: text;\\n\\t-ms-user-select: text;\\n\\t-khtml-user-select: text;\\n\\t-moz-user-select: text;\\n\\t-o-user-select: text;\\n\\tuser-select: text;\\n\\tbox-sizing: initial;\\n\\tanimation: fadein 100ms linear;\\n\\tline-height: 1.5em;\\n}\\n\\n.monaco-editor-hover.hidden {\\n\\tdisplay: none;\\n}\\n\\n.monaco-editor-hover .monaco-editor-hover-content {\\n\\tmax-width: 500px;\\n}\\n\\n.monaco-editor-hover .hover-row {\\n\\tpadding: 4px 5px;\\n}\\n\\n.monaco-editor-hover p,\\n.monaco-editor-hover ul {\\n\\tmargin: 8px 0;\\n}\\n\\n.monaco-editor-hover p:first-child,\\n.monaco-editor-hover ul:first-child {\\n\\tmargin-top: 0;\\n}\\n\\n.monaco-editor-hover p:last-child,\\n.monaco-editor-hover ul:last-child {\\n\\tmargin-bottom: 0;\\n}\\n\\n.monaco-editor-hover ul {\\n\\tpadding-left: 20px;\\n}\\n\\n.monaco-editor-hover li > p {\\n\\tmargin-bottom: 0;\\n}\\n\\n.monaco-editor-hover li > ul {\\n\\tmargin-top: 0;\\n}\\n\\n.monaco-editor-hover code {\\n\\tborder-radius: 3px;\\n\\tpadding: 0 0.4em;\\n}\\n\\n.monaco-editor-hover .monaco-tokenized-source {\\n\\twhite-space: pre-wrap;\\n\\tword-break: break-all;\\n}\\n\", \"\"]);\n\n// exports\n","exports = module.exports = require(\"../../../../../../css-loader/lib/css-base.js\")(false);\n// imports\n\n\n// module\nexports.push([module.id, \"/*---------------------------------------------------------------------------------------------\\n * Copyright (c) Microsoft Corporation. All rights reserved.\\n * Licensed under the MIT License. See License.txt in the project root for license information.\\n *--------------------------------------------------------------------------------------------*/\\n.monaco-editor .detected-link,\\n.monaco-editor .detected-link-active {\\n\\ttext-decoration: underline;\\n\\ttext-underline-position: under;\\n}\\n\\n.monaco-editor .detected-link-active {\\n\\tcursor: pointer;\\n}\\n\", \"\"]);\n\n// exports\n","exports = module.exports = require(\"../../../../../../css-loader/lib/css-base.js\")(false);\n// imports\n\n\n// module\nexports.push([module.id, \"/*---------------------------------------------------------------------------------------------\\n * Copyright (c) Microsoft Corporation. All rights reserved.\\n * Licensed under the MIT License. See License.txt in the project root for license information.\\n *--------------------------------------------------------------------------------------------*/\\n\\n.monaco-editor .monaco-editor-overlaymessage {\\n\\tpadding-bottom: 8px;\\n}\\n\\n@keyframes fadeIn {\\n\\tfrom { opacity: 0; }\\n\\tto { opacity: 1; }\\n}\\n.monaco-editor .monaco-editor-overlaymessage.fadeIn {\\n\\tanimation: fadeIn 150ms ease-out;\\n}\\n\\n@keyframes fadeOut {\\n\\tfrom { opacity: 1; }\\n\\tto { opacity: 0; }\\n}\\n.monaco-editor .monaco-editor-overlaymessage.fadeOut {\\n\\tanimation: fadeOut 100ms ease-out;\\n}\\n\\n.monaco-editor .monaco-editor-overlaymessage .message {\\n\\tpadding: 1px 4px;\\n}\\n\\n.monaco-editor .monaco-editor-overlaymessage .anchor {\\n\\twidth: 0 !important;\\n\\theight: 0 !important;\\n\\tborder-color: transparent;\\n\\tborder-style: solid;\\n\\tz-index: 1000;\\n\\tborder-width: 8px;\\n\\tposition: absolute;\\n}\\n\", \"\"]);\n\n// exports\n","exports = module.exports = require(\"../../../../../../css-loader/lib/css-base.js\")(false);\n// imports\n\n\n// module\nexports.push([module.id, \"/*---------------------------------------------------------------------------------------------\\n * Copyright (c) Microsoft Corporation. All rights reserved.\\n * Licensed under the MIT License. See License.txt in the project root for license information.\\n *--------------------------------------------------------------------------------------------*/\\n\\n.monaco-editor .parameter-hints-widget {\\n\\tz-index: 10;\\n\\tdisplay: flex;\\n\\tflex-direction: column;\\n\\tline-height: 1.5em;\\n}\\n\\n.monaco-editor .parameter-hints-widget > .wrapper {\\n\\tmax-width: 440px;\\n\\tdisplay: flex;\\n\\tflex-direction: column;\\n}\\n\\n.monaco-editor .parameter-hints-widget.multiple {\\n\\tmin-height: 3.3em;\\n\\tpadding: 0 0 0 1.9em;\\n}\\n\\n.monaco-editor .parameter-hints-widget.visible {\\n\\t-webkit-transition: left .05s ease-in-out;\\n\\t-moz-transition: left .05s ease-in-out;\\n\\t-o-transition: left .05s ease-in-out;\\n\\ttransition: left .05s ease-in-out;\\n}\\n\\n.monaco-editor .parameter-hints-widget p,\\n.monaco-editor .parameter-hints-widget ul {\\n\\tmargin: 8px 0;\\n}\\n\\n.monaco-editor .parameter-hints-widget .monaco-scrollable-element,\\n.monaco-editor .parameter-hints-widget .body {\\n\\tdisplay: flex;\\n\\tflex-direction: column;\\n}\\n\\n.monaco-editor .parameter-hints-widget .signature {\\n\\tpadding: 4px 5px;\\n}\\n\\n.monaco-editor .parameter-hints-widget .docs {\\n\\tpadding: 0 10px 0 5px;\\n\\twhite-space: pre-wrap;\\n}\\n\\n.monaco-editor .parameter-hints-widget .docs .markdown-docs {\\n\\twhite-space: initial;\\n}\\n\\n.monaco-editor .parameter-hints-widget .docs .code {\\n\\twhite-space: pre-wrap;\\n}\\n\\n.monaco-editor .parameter-hints-widget .docs code {\\n\\tborder-radius: 3px;\\n\\tpadding: 0 0.4em;\\n}\\n\\n.monaco-editor .parameter-hints-widget .buttons {\\n\\tposition: absolute;\\n\\tdisplay: none;\\n\\tbottom: 0;\\n\\tleft: 0;\\n}\\n\\n.monaco-editor .parameter-hints-widget.multiple .buttons {\\n\\tdisplay: block;\\n}\\n\\n.monaco-editor .parameter-hints-widget.multiple .button {\\n\\tposition: absolute;\\n\\tleft: 2px;\\n\\twidth: 16px;\\n\\theight: 16px;\\n\\tbackground-repeat: no-repeat;\\n\\tcursor: pointer;\\n}\\n\\n.monaco-editor .parameter-hints-widget .button.previous {\\n\\tbottom: 24px;\\n\\tbackground-image: url(\\\"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiI+PHBhdGggZmlsbD0iIzQyNDI0MiIgZD0iTTEwLjggOS41bC45LS45TDguMSA1IDQuMiA4LjZsLjkuOSAzLTIuNyAyLjcgMi43eiIvPjwvc3ZnPg==\\\");\\n}\\n\\n.monaco-editor .parameter-hints-widget .button.next {\\n\\tbottom: 0;\\n\\tbackground-image: url(\\\"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiI+PHBhdGggZmlsbD0iIzQyNDI0MiIgZD0iTTUuMSA1bC0uOS45IDMuNiAzLjYgMy45LTMuNi0xLS45LTMgMi43TDUuMSA1eiIvPjwvc3ZnPg==\\\");\\n}\\n\\n.monaco-editor .parameter-hints-widget .overloads {\\n\\tposition: absolute;\\n\\tdisplay: none;\\n\\ttext-align: center;\\n\\tbottom: 14px;\\n\\tleft: 0;\\n\\twidth: 22px;\\n\\theight: 12px;\\n\\tline-height: 12px;\\n\\topacity: 0.5;\\n}\\n\\n.monaco-editor .parameter-hints-widget.multiple .overloads {\\n\\tdisplay: block;\\n}\\n\\n.monaco-editor .parameter-hints-widget .signature .parameter {\\n\\tdisplay: inline-block;\\n}\\n\\n.monaco-editor .parameter-hints-widget .signature .parameter.active {\\n\\tfont-weight: bold;\\n\\ttext-decoration: underline;\\n}\\n\\n.monaco-editor .parameter-hints-widget .documentation-parameter > .parameter {\\n\\tfont-weight: bold;\\n\\tmargin-right: 0.5em;\\n}\\n\\n/*** VS Dark & High Contrast*/\\n\\n.monaco-editor.hc-black .parameter-hints-widget .button.previous,\\n.monaco-editor.vs-dark .parameter-hints-widget .button.previous {\\n\\tbackground-image: url(\\\"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiI+PHBhdGggZmlsbD0iI0U4RThFOCIgZD0iTTEwLjggOS41bC45LS45TDguMSA1IDQuMiA4LjZsLjkuOSAzLTIuNyAyLjcgMi43eiIvPjwvc3ZnPg==\\\");\\n}\\n\\n.monaco-editor.hc-black .parameter-hints-widget .button.next,\\n.monaco-editor.vs-dark .parameter-hints-widget .button.next {\\n\\tbackground-image: url(\\\"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiI+PHBhdGggZmlsbD0iI0U4RThFOCIgZD0iTTUuMSA1bC0uOS45IDMuNiAzLjYgMy45LTMuNi0xLS45LTMgMi43TDUuMSA1eiIvPjwvc3ZnPg==\\\");\\n}\", \"\"]);\n\n// exports\n","exports = module.exports = require(\"../../../../../../../css-loader/lib/css-base.js\")(false);\n// imports\n\n\n// module\nexports.push([module.id, \"/*---------------------------------------------------------------------------------------------\\n * Copyright (c) Microsoft Corporation. All rights reserved.\\n * Licensed under the MIT License. See License.txt in the project root for license information.\\n *--------------------------------------------------------------------------------------------*/\\n\\n.monaco-editor .peekview-widget .head {\\n\\t-webkit-box-sizing:\\tborder-box;\\n\\t-o-box-sizing: border-box;\\n\\t-moz-box-sizing: border-box;\\n\\t-ms-box-sizing: border-box;\\n\\tbox-sizing:\\tborder-box;\\n\\tdisplay: flex;\\n}\\n\\n.monaco-editor .peekview-widget .head .peekview-title {\\n\\tdisplay: inline-block;\\n\\tfont-size: 13px;\\n\\tmargin-left: 20px;\\n\\tcursor: pointer;\\n}\\n\\n.monaco-editor .peekview-widget .head .peekview-title .dirname:not(:empty) {\\n\\tfont-size: 0.9em;\\n\\tmargin-left: 0.5em;\\n}\\n\\n.monaco-editor .peekview-widget .head .peekview-actions {\\n\\tflex: 1;\\n\\ttext-align: right;\\n\\tpadding-right: 2px;\\n}\\n\\n.monaco-editor .peekview-widget .head .peekview-actions > .monaco-action-bar {\\n\\tdisplay: inline-block;\\n}\\n\\n.monaco-editor .peekview-widget .head .peekview-actions > .monaco-action-bar,\\n.monaco-editor .peekview-widget .head .peekview-actions > .monaco-action-bar > .actions-container {\\n\\theight: 100%;\\n}\\n\\n.monaco-editor .peekview-widget .head .peekview-actions > .monaco-action-bar .action-item {\\n\\tmargin-left: 4px;\\n}\\n\\n.monaco-editor .peekview-widget .head .peekview-actions > .monaco-action-bar .action-label {\\n\\twidth: 16px;\\n\\theight: 100%;\\n\\tmargin: 0;\\n\\tline-height: inherit;\\n\\tbackground-repeat: no-repeat;\\n\\tbackground-position: center center;\\n}\\n\\n.monaco-editor .peekview-widget .head .peekview-actions > .monaco-action-bar .action-label.octicon {\\n\\tmargin: 0;\\n}\\n\\n.monaco-editor .peekview-widget .head .peekview-actions .action-label.icon.close-peekview-action {\\n\\tbackground: url(\\\"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgdmlld0JveD0iMyAzIDE2IDE2IiBlbmFibGUtYmFja2dyb3VuZD0ibmV3IDMgMyAxNiAxNiI+PHBvbHlnb24gZmlsbD0iIzQyNDI0MiIgcG9pbnRzPSIxMi41OTcsMTEuMDQyIDE1LjQsMTMuODQ1IDEzLjg0NCwxNS40IDExLjA0MiwxMi41OTggOC4yMzksMTUuNCA2LjY4MywxMy44NDUgOS40ODUsMTEuMDQyIDYuNjgzLDguMjM5IDguMjM4LDYuNjgzIDExLjA0Miw5LjQ4NiAxMy44NDUsNi42ODMgMTUuNCw4LjIzOSIvPjwvc3ZnPg==\\\") center center no-repeat;\\n}\\n\\n.monaco-editor .peekview-widget > .body {\\n\\tborder-top: 1px solid;\\n\\tposition: relative;\\n}\\n\\n/* Dark Theme */\\n/* High Contrast Theme */\\n\\n.monaco-editor.hc-black .peekview-widget .head .peekview-actions .action-label.icon.close-peekview-action,\\n.monaco-editor.vs-dark .peekview-widget .head .peekview-actions .action-label.icon.close-peekview-action {\\n\\tbackground: url(\\\"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgdmlld0JveD0iMyAzIDE2IDE2IiBlbmFibGUtYmFja2dyb3VuZD0ibmV3IDMgMyAxNiAxNiI+PHBvbHlnb24gZmlsbD0iI2U4ZThlOCIgcG9pbnRzPSIxMi41OTcsMTEuMDQyIDE1LjQsMTMuODQ1IDEzLjg0NCwxNS40IDExLjA0MiwxMi41OTggOC4yMzksMTUuNCA2LjY4MywxMy44NDUgOS40ODUsMTEuMDQyIDYuNjgzLDguMjM5IDguMjM4LDYuNjgzIDExLjA0Miw5LjQ4NiAxMy44NDUsNi42ODMgMTUuNCw4LjIzOSIvPjwvc3ZnPg==\\\") center center no-repeat;\\n}\\n\\n\", \"\"]);\n\n// exports\n","exports = module.exports = require(\"../../../../../../../css-loader/lib/css-base.js\")(false);\n// imports\n\n\n// module\nexports.push([module.id, \"/*---------------------------------------------------------------------------------------------\\n * Copyright (c) Microsoft Corporation. All rights reserved.\\n * Licensed under the MIT License. See License.txt in the project root for license information.\\n *--------------------------------------------------------------------------------------------*/\\n\\n/* -- zone widget */\\n.monaco-editor .zone-widget .zone-widget-container.reference-zone-widget {\\n\\tborder-top-width: 1px;\\n\\tborder-bottom-width: 1px;\\n}\\n\\n.monaco-editor .reference-zone-widget .inline {\\n\\tdisplay: inline-block;\\n\\tvertical-align: top;\\n}\\n\\n.monaco-editor .reference-zone-widget .messages {\\n\\theight: 100%;\\n\\twidth: 100%;\\n\\ttext-align: center;\\n\\tpadding: 3em 0;\\n}\\n\\n.monaco-editor .reference-zone-widget .ref-tree {\\n\\tline-height: 23px;\\n}\\n\\n.monaco-editor .reference-zone-widget .ref-tree .reference {\\n\\ttext-overflow: ellipsis;\\n\\toverflow: hidden;\\n}\\n\\n.monaco-editor .reference-zone-widget .ref-tree .reference-file {\\n\\tdisplay: inline-flex;\\n\\twidth: 100%;\\n\\theight: 100%;\\n}\\n\\n.monaco-editor .reference-zone-widget .ref-tree .reference-file .count {\\n\\tmargin-right: 12px;\\n\\tmargin-left: auto;\\n}\\n\\n/* High Contrast Theming */\\n\\n.monaco-editor.hc-black .reference-zone-widget .ref-tree .reference-file {\\n\\tfont-weight: bold;\\n}\\n\", \"\"]);\n\n// exports\n","exports = module.exports = require(\"../../../../../../css-loader/lib/css-base.js\")(false);\n// imports\n\n\n// module\nexports.push([module.id, \"/*---------------------------------------------------------------------------------------------\\n * Copyright (c) Microsoft Corporation. All rights reserved.\\n * Licensed under the MIT License. See License.txt in the project root for license information.\\n *--------------------------------------------------------------------------------------------*/\\n\\n.monaco-editor .rename-box {\\n\\tz-index: 100;\\n\\tcolor: inherit;\\n}\\n\\n.monaco-editor .rename-box .rename-input {\\n\\tpadding: 4px;\\n}\\n\", \"\"]);\n\n// exports\n","exports = module.exports = require(\"../../../../../../css-loader/lib/css-base.js\")(false);\n// imports\n\n\n// module\nexports.push([module.id, \"/*---------------------------------------------------------------------------------------------\\n * Copyright (c) Microsoft Corporation. All rights reserved.\\n * Licensed under the MIT License. See License.txt in the project root for license information.\\n *--------------------------------------------------------------------------------------------*/\\n\\n.monaco-editor.vs\\t\\t.snippet-placeholder { background-color: rgba(10, 50, 100, 0.2); min-width: 2px; }\\n.monaco-editor.vs-dark\\t.snippet-placeholder { background-color: rgba(124, 124, 124, 0.3); min-width: 2px; }\\n.monaco-editor.hc-black\\t.snippet-placeholder { background-color: rgba(124, 124, 124, 0.3); min-width: 2px; }\\n\\n.monaco-editor.vs\\t\\t.finish-snippet-placeholder { outline: rgba(10, 50, 100, 0.5) solid 1px; }\\n.monaco-editor.vs-dark\\t.finish-snippet-placeholder\\t{ outline: #525252 solid 1px; }\\n.monaco-editor.hc-black\\t.finish-snippet-placeholder\\t{ outline: #525252 solid 1px; }\\n\", \"\"]);\n\n// exports\n","exports = module.exports = require(\"../../../../../../../css-loader/lib/css-base.js\")(false);\n// imports\n\n\n// module\nexports.push([module.id, \"/*---------------------------------------------------------------------------------------------\\n * Copyright (c) Microsoft Corporation. All rights reserved.\\n * Licensed under the MIT License. See License.txt in the project root for license information.\\n *--------------------------------------------------------------------------------------------*/\\n\\n/* Suggest widget*/\\n.monaco-editor .suggest-widget {\\n\\tz-index: 40;\\n}\\n\\n/** Initial widths **/\\n\\n.monaco-editor .suggest-widget {\\n\\twidth: 430px;\\n}\\n\\n.monaco-editor .suggest-widget > .message,\\n.monaco-editor .suggest-widget > .tree,\\n.monaco-editor .suggest-widget > .details {\\n\\twidth: 100%;\\n\\tborder-style: solid;\\n\\tborder-width: 1px;\\n\\tbox-sizing: border-box;\\n}\\n\\n.monaco-editor.hc-black .suggest-widget > .message,\\n.monaco-editor.hc-black .suggest-widget > .tree,\\n.monaco-editor.hc-black .suggest-widget > .details {\\n\\tborder-width: 2px;\\n}\\n\\n/** Adjust width when docs are expanded to the side **/\\n.monaco-editor .suggest-widget.docs-side {\\n\\twidth: 660px;\\n}\\n\\n.monaco-editor .suggest-widget.docs-side > .tree,\\n.monaco-editor .suggest-widget.docs-side > .details {\\n\\twidth: 50%;\\n\\tfloat: left;\\n}\\n\\n.monaco-editor .suggest-widget.docs-side.list-right > .tree,\\n.monaco-editor .suggest-widget.docs-side.list-right > .details {\\n\\tfloat: right;\\n}\\n\\n\\n/* Styles for Message element for when widget is loading or is empty */\\n.monaco-editor .suggest-widget > .message {\\n\\tpadding-left: 22px;\\n}\\n\\n/** Styles for the list element **/\\n.monaco-editor .suggest-widget > .tree {\\n\\theight: 100%;\\n}\\n\\n\\n\\n/** Styles for each row in the list element **/\\n\\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row {\\n\\tdisplay: flex;\\n\\t-mox-box-sizing: border-box;\\n\\tbox-sizing: border-box;\\n\\tpadding-right: 10px;\\n\\tbackground-repeat: no-repeat;\\n\\tbackground-position: 2px 2px;\\n\\twhite-space: nowrap;\\n}\\n\\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row > .contents {\\n\\tflex: 1;\\n\\theight: 100%;\\n\\toverflow: hidden;\\n\\tpadding-left: 2px;\\n}\\n\\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row > .contents > .main {\\n\\tdisplay: flex;\\n\\toverflow: hidden;\\n\\ttext-overflow: ellipsis;\\n\\twhite-space: pre;\\n}\\n\\n.monaco-editor .suggest-widget:not(.frozen) .monaco-highlighted-label .highlight {\\n\\tfont-weight: bold;\\n}\\n\\n/** Icon styles **/\\n\\n.monaco-editor .suggest-widget .details > .monaco-scrollable-element > .body > .header > .close,\\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row > .contents > .main > .readMore {\\n\\topacity: 0.6;\\n\\tbackground-position: center center;\\n\\tbackground-repeat: no-repeat;\\n\\tbackground-size: 70%;\\n\\tcursor: pointer;\\n}\\n\\n.monaco-editor .suggest-widget .details > .monaco-scrollable-element > .body > .header > .close {\\n\\tbackground-image: url(\\\"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgdmlld0JveD0iMyAzIDE2IDE2IiBlbmFibGUtYmFja2dyb3VuZD0ibmV3IDMgMyAxNiAxNiI+PHBvbHlnb24gZmlsbD0iIzQyNDI0MiIgcG9pbnRzPSIxMi41OTcsMTEuMDQyIDE1LjQsMTMuODQ1IDEzLjg0NCwxNS40IDExLjA0MiwxMi41OTggOC4yMzksMTUuNCA2LjY4MywxMy44NDUgOS40ODUsMTEuMDQyIDYuNjgzLDguMjM5IDguMjM4LDYuNjgzIDExLjA0Miw5LjQ4NiAxMy44NDUsNi42ODMgMTUuNCw4LjIzOSIvPjwvc3ZnPg==\\\");\\n\\tfloat: right;\\n\\tmargin-right: 5px;\\n}\\n\\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row > .contents > .main > .readMore {\\n\\tbackground-image: url(\\\"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+PHBhdGggZD0iTTggMWMtMy44NjUgMC03IDMuMTM1LTcgN3MzLjEzNSA3IDcgNyA3LTMuMTM1IDctNy0zLjEzNS03LTctN3ptMSAxMmgtMnYtN2gydjd6bTAtOGgtMnYtMmgydjJ6IiBmaWxsPSIjMUJBMUUyIi8+PHBhdGggZD0iTTcgNmgydjdoLTJ2LTd6bTAtMWgydi0yaC0ydjJ6IiBmaWxsPSIjZmZmIi8+PC9zdmc+\\\");\\n}\\n\\n.monaco-editor .suggest-widget .details > .monaco-scrollable-element > .body > .header > .close:hover,\\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row > .contents > .main > .readMore:hover {\\n\\topacity: 1;\\n}\\n\\n/** Type Info and icon next to the label in the focused completion item **/\\n\\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row > .contents > .main > .type-label {\\n\\tmargin-left: 0.8em;\\n\\tflex: 1;\\n\\ttext-align: right;\\n\\toverflow: hidden;\\n\\ttext-overflow: ellipsis;\\n\\topacity: 0.7;\\n}\\n\\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row > .contents > .main > .type-label > .monaco-tokenized-source {\\n\\tdisplay: inline;\\n}\\n\\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row > .contents > .main > .readMore,\\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row > .contents > .main > .type-label,\\n.monaco-editor .suggest-widget.docs-side .monaco-list .monaco-list-row.focused > .contents > .main > .readMore,\\n.monaco-editor .suggest-widget.docs-side .monaco-list .monaco-list-row.focused > .contents > .main > .type-label,\\n.monaco-editor .suggest-widget.docs-below .monaco-list .monaco-list-row.focused > .contents > .main > .readMore {\\n\\tdisplay: none;\\n}\\n\\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row.focused > .contents > .main > .readMore,\\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row.focused > .contents > .main > .type-label {\\n\\tdisplay: inline;\\n}\\n\\n/** Styles for each row in the list **/\\n\\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row .icon {\\n\\tdisplay: block;\\n\\theight: 16px;\\n\\twidth: 16px;\\n\\tbackground-repeat: no-repeat;\\n\\tbackground-size: 80%;\\n\\tbackground-position: center;\\n}\\n\\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row .icon { background-image: url(\\\"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiI+PHN0eWxlPi5pY29uLWNhbnZhcy10cmFuc3BhcmVudHtvcGFjaXR5OjA7ZmlsbDojZjZmNmY2fS5pY29uLXZzLW91dHtmaWxsOiNmNmY2ZjZ9Lmljb24tdnMtYmd7ZmlsbDojNDI0MjQyfTwvc3R5bGU+PHBhdGggY2xhc3M9Imljb24tY2FudmFzLXRyYW5zcGFyZW50IiBkPSJNMTYgMTZIMFYwaDE2djE2eiIgaWQ9ImNhbnZhcyIvPjxwYXRoIGNsYXNzPSJpY29uLXZzLW91dCIgZD0iTTE2IDEwYzAgMi4yMDUtMS43OTQgNC00IDQtMS44NTggMC0zLjQxMS0xLjI3OS0zLjg1OC0zaC0uOTc4bDIuMzE4IDRIMHYtMS43MDNsMi0zLjQwOFYwaDExdjYuMTQyYzEuNzIxLjQ0NyAzIDIgMyAzLjg1OHoiIGlkPSJvdXRsaW5lIi8+PHBhdGggY2xhc3M9Imljb24tdnMtYmciIGQ9Ik0xMiAxdjQuNzVBNC4yNTUgNC4yNTUgMCAwIDAgNy43NSAxMGgtLjczMkw0LjI3NSA1LjI2OSAzIDcuNDQyVjFoOXpNNy43NDcgMTRMNC4yNjkgOCAuNzQ4IDE0aDYuOTk5ek0xNSAxMGEzIDMgMCAxIDEtNiAwIDMgMyAwIDAgMSA2IDB6IiBpZD0iaWNvbkJnIi8+PC9zdmc+\\\"); }\\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row .icon.method,\\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row .icon.function,\\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row .icon.constructor { background-image: url(\\\"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiI+PHN0eWxlPi5pY29uLWNhbnZhcy10cmFuc3BhcmVudHtvcGFjaXR5OjA7ZmlsbDojZjZmNmY2fS5pY29uLXZzLW91dHtmaWxsOiNmNmY2ZjZ9Lmljb24tdnMtZmd7ZmlsbDojZjBlZmYxfS5pY29uLXZzLWFjdGlvbi1wdXJwbGV7ZmlsbDojNjUyZDkwfTwvc3R5bGU+PHBhdGggY2xhc3M9Imljb24tY2FudmFzLXRyYW5zcGFyZW50IiBkPSJNMTYgMTZIMFYwaDE2djE2eiIgaWQ9ImNhbnZhcyIvPjxwYXRoIGNsYXNzPSJpY29uLXZzLW91dCIgZD0iTTE1IDMuMzQ5djguNDAzTDguOTc1IDE2SDguMDdMMSAxMS41ODJWMy4zMjdMNy41OTUgMGgxLjExOEwxNSAzLjM0OXoiIGlkPSJvdXRsaW5lIi8+PHBhdGggY2xhc3M9Imljb24tdnMtZmciIGQ9Ik0xMi43MTUgNC4zOThMOC40ODcgNy4wMiAzLjU2NSA0LjI3Mmw0LjU3OC0yLjMwOSA0LjU3MiAyLjQzNXpNMyA1LjEwMmw1IDIuNzkydjUuNzA1bC01LTMuMTI1VjUuMTAyem02IDguNDM0VjcuODc4bDQtMi40OHY1LjMxN2wtNCAyLjgyMXoiIGlkPSJpY29uRmciLz48cGF0aCBjbGFzcz0iaWNvbi12cy1hY3Rpb24tcHVycGxlIiBkPSJNOC4xNTYuODM3TDIgMy45NDJ2Ny4wODVMOC41MTcgMTUuMSAxNCAxMS4yMzNWMy45NUw4LjE1Ni44Mzd6bTQuNTU5IDMuNTYxTDguNDg3IDcuMDIgMy41NjUgNC4yNzJsNC41NzgtMi4zMDkgNC41NzIgMi40MzV6TTMgNS4xMDJsNSAyLjc5MnY1LjcwNWwtNS0zLjEyNVY1LjEwMnptNiA4LjQzNFY3Ljg3OGw0LTIuNDh2NS4zMTdsLTQgMi44MjF6IiBpZD0iaWNvbkJnIi8+PC9zdmc+\\\"); }\\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row .icon.field { background-image: url(\\\"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiI+PHN0eWxlPi5pY29uLWNhbnZhcy10cmFuc3BhcmVudHtvcGFjaXR5OjA7ZmlsbDojZjZmNmY2fS5pY29uLXZzLW91dHtmaWxsOiNmNmY2ZjZ9Lmljb24tdnMtZmd7ZmlsbDojZj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kgzdi0xLjIzNEw1LjM3MSAxMEgyVjguNzY0TDYuMzgyIDBIMTR2MS40MTR6IiBpZD0ib3V0bGluZSIgc3R5bGU9ImRpc3BsYXk6IG5vbmU7Ii8+PHBhdGggY2xhc3M9Imljb24tdnMtYWN0aW9uLW9yYW5nZSIgZD0iTTcgN2g2bC04IDhINGwyLjk4NS02SDNsNC04aDZMNyA3eiIgaWQ9Imljb25CZyIvPjwvc3ZnPg==\\\"); }\\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row .icon.operator { background-image: url(\\\"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiI+PHN0eWxlPi5pY29uLWNhbnZhcy10cmFuc3BhcmVudHtvcGFjaXR5OjA7ZmlsbDojZjZmNmY2fS5pY29uLXZzLW91dHtmaWxsOiNmNmY2ZjZ9Lmljb24tdnMtZmd7ZmlsbDojZjBlZmYxfS5pY29uLXZzLWFjdGlvbi1ibHVle2ZpbGw6IzAwNTM5Y308L3N0eWxlPjxwYXRoIGNsYXNzPSJpY29uLWNhbnZhcy10cmFuc3BhcmVudCIgZD0iTTE2IDE2SDBWMGgxNnYxNnoiIGlkPSJjYW52YXMiLz48cGF0aCBjbGFzcz0iaWNvbi12cy1vdXQiIGQ9Ik0xNiAxNkgwVjBoMTZ2MTZ6IiBpZD0ib3V0bGluZSIgc3R5bGU9ImRpc3BsYXk6IG5vbmU7Ii8+PHBhdGggY2xhc3M9Imljb24tdnMtYWN0aW9uLWJsdWUiIGQ9Ik0xIDF2MTRoMTRWMUgxem02IDEySDN2LTFoNHYxem0wLTNIM1Y5aDR2MXptMC01SDV2Mkg0VjVIMlY0aDJWMmgxdjJoMnYxem0zLjI4MSA4SDguNzE5bDMtNGgxLjU2M2wtMy4wMDEgNHpNMTQgNUg5VjRoNXYxeiIgaWQ9Imljb25CZyIvPjxwYXRoIGNsYXNzPSJpY29uLXZzLWZnI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OC0uNzg5IDMuMTU2LTEuNTc4IDEuNTc4Ljc4OS0zLjE1NiAxLjU3OHoiIGlkPSJpY29uRmciIHN0eWxlPSJkaXNwbGF5OiBub25lOyIvPjxwYXRoIGNsYXNzPSJpY29uLXZzLWFjdGlvbi1ibHVlIiBkPSJNOC43MzMgNEw0IDYuMzY3djMuMTU2TDcuMTU2IDExLjFsNC43MzMtMi4zNjdWNS41NzhMOC43MzMgNHpNNy4xNTYgNy4xNTZsLTEuNTc4LS43ODkgMy4xNTYtMS41NzggMS41NzguNzg5LTMuMTU2IDEuNTc4eiIgaWQ9ImNvbG9ySW1wb3J0YW5jZSIvPjwvc3ZnPg==\\\"); }\\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row .icon.class { background-image: url(\\\"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiI+PHN0eWxlPi5pY29uLWNhbnZhcy10cmFuc3BhcmVudHtvcGFjaXR5OjA7ZmlsbDojZjZmNmY2fS5pY29uLXZzLW91dHtmaWxsOiNmNmY2ZjZ9Lmljb24tdnMtYWN0aW9uLW9yYW5nZXtmaWxsOiNjMjdkMWF9PC9zdHlsZT48cGF0aCBjbGFzcz0iaWNvbi1jYW52YXMtdHJhbnNwYXJlbnQiIGQ9Ik0xNiAxNkgwVjBoMTZ2MTZ6IiBpZD0iY2FudmFzIi8+PHBhdGggY2xhc3M9Imljb24tdnMtb3V0IiBkPSJNMTYgNi41ODZsLTMtM0wxMS41ODYgNUg5LjQxNGwxLTEtNC00aC0uODI4TDAgNS41ODZ2LjgyOGw0IDRMNi40MTQgOEg3djVoMS41ODZsMyAzaC44MjhMMTYgMTIuNDE0di0uODI4TDEzLjkxNCA5LjUgMTYgNy40MTR2LS44Mjh6IiBpZD0ib3V0bGluZSIvPjxwYXRoIGNsYXNzPSJpY29uLXZzLWFjdGlvbi1vcmFuZ2UiIGQ9Ik0xMyAxMGwyIDItMyAzLTItMiAxLTFIOFY3SDZMNCA5IDEgNmw1LTUgMyAzLTIgMmg1bDEtMSAyIDItMyAzLTItMiAxLTFIOXY0bDIuOTk5LjAwMkwxMyAxMHoiIGlkPSJpY29uQmciLz48L3N2Zz4=\\\"); }\\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row .icon.interface { background-image: url(\\\"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiI+PHN0eWxlPi5pY29uLWNhbnZhcy10cmFuc3BhcmVudHtvcGFjaXR5OjA7ZmlsbDojZjZmNmY2fS5pY29uLXZzLW91dHtmaWxsOiNmNmY2ZjZ9Lmljb24tdnMtZmd7ZmlsbDojZjBlZmYxfS5pY29uLXZzLWFjdGlvbi1ibHVle2ZpbGw6IzAwNTM5Y308L3N0eWxlPjxwYXRoIGNsYXNzPSJpY29uLWNhbnZhcy10cmFuc3BhcmVudCIgZD0iTTE2IDE2SDBWMGgxNnYxNnoiIGlkPSJjYW52YXMiLz48cGF0aCBjbGFzcz0iaWNvbi12cy1vdXQiIGQ9Ik0xMS41IDEyYy0xLjkxNSAwLTMuNjAyLTEuMjQxLTQuMjI4LTNoLTEuNDFhMy4xMSAzLjExIDAgMCAxLTIuNzM3IDEuNjI1QzEuNDAyIDEwLjYyNSAwIDkuMjIzIDAgNy41czEuNDAyLTMuMTI1IDMuMTI1LTMuMTI1YzEuMTY1IDAgMi4yMDEuNjM5IDIuNzM3IDEuNjI1aDEuNDFjLjYyNi0xLjc1OSAyLjMxMy0zIDQuMjI4LTNDMTMuOTgxIDMgMTYgNS4wMTkgMTYgNy41UzEzLjk4MSAxMiAxMS41IDEyeiIgaWQ9Im91dGxpbmUiLz48cGF0aCBjbGFzcz0iaWNvbi12cy1mZyIgZD0iTTExLjUgOUExLjUwMSAxLjUwMSAwIDEgMSAxMyA3LjVjMCAuODI2LS42NzMgMS41LTEuNSAxLjV6IiBpZD0iaWNvbkZnIi8+PHBhdGggY2xhc3M9Imljb24tdnMtYWN0aW9uLWJsdWUiIGQ9Ik0xMS41IDRhMy40OSAzLjQ5IDAgMCAwLTMuNDUgM0g1LjE4NUEyLjEyMiAyLjEyMiAwIDAgMCAxIDcuNWEyLjEyMyAyLjEyMyAwIDEgMCA0LjE4NS41SDguMDVhMy40OSAzLjQ5IDAgMCAwIDMuNDUgMyAzLjUgMy41IDAgMSAwIDAtN3ptMCA1Yy0uODI3IDAtMS41LS42NzMtMS41LTEuNVMxMC42NzMgNiAxMS41IDZzMS41LjY3MyAxLjUgMS41UzEyLjMyNyA5IDExLjUgOXoiIGlkPSJpY29uQmciLz48L3N2Zz4=\\\"); }\\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row .icon.struct { background-image: url(\\\"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiI+PHN0eWxlPi5pY29uLWNhbnZhcy10cmFuc3BhcmVudHtvcGFjaXR5OjA7ZmlsbDojZjZmNmY2fS5pY29uLXZzLW91dHtmaWxsOiNmNmY2ZjZ9Lmljb24tdnMtYWN0aW9uLWJsdWV7ZmlsbDojMDA1MzljfTwvc3R5bGU+PHBhdGggY2xhc3M9Imljb24tY2FudmFzLXRyYW5zcGFyZW50IiBkPSJNMTYgMTZIMFYwaDE2djE2eiIgaWQ9ImNhbnZhcyIvPjxwYXRoIGNsYXNzPSJpY29uLXZzLW91dCIgZD0iTTkgMTRWOEg3djZIMVYyaDE0djEySDl6IiBpZD0ib3V0bGluZSIgc3R5bGU9ImRpc3BsYXk6IG5vbmU7Ii8+PHBhdGggY2xhc3M9Imljb24tdnMtYWN0aW9uLWJsdWUiIGQ9Ik0xMCA5aDR2NGgtNFY5em0tOCA0aDRWOUgydjR6TTIgM3Y0aDEyVjNIMnoiIGlkPSJpY29uQmciLz48L3N2Zz4=\\\"); }\\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row .icon.type-parameter { background-image: url(\\\"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiI+PHN0eWxlPi5pY29uLWNhbnZhcy10cmFuc3BhcmVudHtvcGFjaXR5OjA7ZmlsbDojZjZmNmY2fS5pY29uLXZzLW91dHtmaWxsOiNmNmY2ZjZ9Lmljb24tdnMtYmd7ZmlsbDojNDI0MjQyfTwvc3R5bGU+PHBhdGggY2xhc3M9Imljb24tY2FudmFzLXRyYW5zcGFyZW50IiBkPSJNMTYgMTZIMFYwaDE2djE2eiIgaWQ9ImNhbnZhcyIvPjxwYXRoIGNsYXNzPSJpY29uLXZzLW91dCIgZD0iTTEwLjcwMiAxMC41bDItMi0yLTIgLjUtLjVIMTB2NWgxdjNINXYtM2gxVjZINC43OThsLjUuNS0yIDIgMiAyTDMgMTIuNzk3bC0zLTNWNy4yMDFsMy0zVjJoMTB2Mi4yMDFsMyAzdjIuNTk2bC0zIDMtMi4yOTgtMi4yOTd6IiBpZD0ib3V0bGluZSIgc3R5bGU9ImRpc3BsYXk6IG5vbmU7Ii8+PHBhdGggY2xhc3M9Imljb24tdnMtYmciIGQ9Ik00IDNoOHYyaC0xdi0uNWMwLS4yNzctLjIyNC0uNS0uNS0uNUg5djcuNWMwIC4yNzUuMjI0LjUuNS41aC41djFINnYtMWguNWEuNS41IDAgMCAwIC41LS41VjRINS41YS41LjUgMCAwIDAtLjUuNVY1SDRWM3pNMyA1LjYxNUwuMTE2IDguNSAzIDExLjM4M2wuODg0LS44ODMtMi0yIDItMkwzIDUuNjE1em0xMCAwbC0uODg0Ljg4NSAyIDItMiAyIC44ODQuODgzTDE1Ljg4NCA4LjUgMTMgNS42MTV6IiBpZD0iaWNvbkJnIi8+PC9zdmc+\\\"); }\\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row .icon.module { background-image: url(\\\"data:image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0g4djJ6TTQgN2gxdjJoMVY2SDN2M2gxVjd6bTggMGgxdjJoMVY2aC0zdjNoMVY3eiIgaWQ9Imljb25GZyIvPjxwYXRoIGNsYXNzPSJpY29uLXZzLWJnIiBkPSJNMiA1djVoMTNWNUgyem00IDRINVY3SDR2MkgzVjZoM3Yzem00IDBIOVY3SDh2Mkg3VjZoM3Yzem00IDBoLTFWN2gtMXYyaC0xVjZoM3YzeiIgaWQ9Imljb25CZyIvPjwvc3ZnPg==\\\"); }\\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row .icon.constant { background-image: url(\\\"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiI+PHN0eWxlPi5pY29uLWNhbnZhcy10cmFuc3BhcmVudHtvcGFjaXR5OjA7ZmlsbDojZjZmNmY2fS5pY29uLXZzLW91dHtmaWxsOiNmNmY2ZjZ9Lmljb24tdnMtYmd7ZmlsbDojNDI0MjQyfS5pY29uLXZzLWZne2ZpbGw6I2YwZWZmMX0uaWNvbi12cy1hY3Rpb24tYmx1ZXtmaWxsOiMwMDUzOWN9PC9zdHlsZT48cGF0aCBjbGFzcz0iaWNvbi1jYW52YXMtdHJhbnNwYXJlbnQiIGQ9Ik0xNiAxNkgwVjBoMTZ2MTZ6IiBpZD0iY2FudmFzIi8+PHBhdGggY2xhc3M9Imljb24tdnMtb3V0IiBkPSJNMi44NzkgMTRMMSAxMi4xMjFWMy44NzlMMi44NzkgMmgxMC4yNDJMMTUgMy44Nzl2OC4yNDJMMTMuMTIxIDE0SDIuODc5eiIgaWQ9Im91dGxpbmUiLz48cGF0aCBjbGFzcz0iaWNvbi12cy1mZyIgZD0iTTEyLjI5MyA0SDMuNzA3TDMgNC43MDd2Ni41ODZsLjcwNy43MDdoOC41ODZsLjcwNy0uNzA3VjQuNzA3TDEyLjI5MyA0ek0xMSAxMEg1VjloNnYxem0wLTNINVY2aDZ2MXoiIGlkPSJpY29uRmciLz48ZyBpZD0iaWNvbkJnIj48cGF0aCBjbGFzcz0iaWNvbi12cy1iZyIgZD0iTTEyLjcwNyAxM0gzLjI5M0wyIDExLjcwN1Y0LjI5M0wzLjI5MyAzaDkuNDE0TDE0IDQuMjkzdjcuNDE0TDEyLjcwNyAxM3ptLTktMWg4LjU4NmwuNzA3LS43MDdWNC43MDdMMTIuMjkzIDRIMy43MDdMMyA0LjcwN3Y2LjU4NmwuNzA3LjcwN3oiLz48cGF0aCBjbGFzcz0iaWNvbi12cy1hY3Rpb24tYmx1ZSIgZD0iTTExIDdINVY2aDZ2MXptMCAySDV2MWg2Vjl6Ii8+PC9nPjwvc3ZnPg==\\\"); }\\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row .icon.value,\\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row .icon.enum { background-image: url(\\\"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiI+PHN0eWxlPi5pY29uLWNhbnZhcy10cmFuc3BhcmVudHtvcGFjaXR5OjA7ZmlsbDojZjZmNmY2fS5pY29uLXZzLW91dHtmaWxsOiNmNmY2ZjZ9Lmljb24tdnMtZmd7ZmlsbDojZjBlZmYxfS5pY29uLXZzLWFjdGlvbi1vcmFuZ2V7ZmlsbDojYzI3ZDFhfTwvc3R5bGU+PHBhdGggY2xhc3M9Imljb24tY2FudmFzLXRyYW5zcGFyZW50IiBkPSJNMTYgMTZIMFYwaDE2djE2eiIgaWQ9ImNhbnZhcyIvPjxwYXRoIGNsYXNzPSJpY29uLXZzLW91dCIgZD0iTTE0LjQxNCAxTDE2IDIuNTg2djUuODI4TDE0LjQxNCAxMEgxMHYzLjQxNkw4LjQxNCAxNUgxLjU4NkwwIDEzLjQxNnYtNS44M0wxLjU4NiA2SDZWMi41ODZMNy41ODYgMWg2LjgyOHoiIGlkPSJvdXRsaW5lIi8+PHBhdGggY2xhc3M9Imljb24tdnMtZmciIGQ9Ik0yIDEzaDZWOEgydjV6bTEtNGg0djFIM1Y5em0wIDJoNHYxSDN2LTF6bTExLTVWM0g4djNoLjQxNEw5IDYuNTg2VjZoNHYxSDkuNDE0bC41ODYuNTg2VjhoNFY2em0tMS0xSDlWNGg0djF6IiBpZD0iaWNvbkZnIi8+PHBhdGggY2xhc3M9Imljb24tdnMtYWN0aW9uLW9yYW5nZSIgZD0iTTMgMTFoNC4wMDF2MUgzdi0xem0wLTFoNC4wMDFWOUgzdjF6bTYtMnY1bC0xIDFIMmwtMS0xVjhsMS0xaDZsMSAxek04IDhIMnY1aDZWOHptMS0ybDEgMWgzVjZIOXptMC0xaDRWNEg5djF6bTUtM0g4TDcgM3YzaDFWM2g2djVoLTR2MWg0bDEtMVYzbC0xLTF6IiBpZD0iaWNvbkJnIi8+PC9zdmc+\\\"); }\\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row .icon.enum-member { background-image: url(\\\"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiI+PHN0eWxlPi5pY29uLWNhbnZhcy10cmFuc3BhcmVudHtvcGFjaXR5OjA7ZmlsbDojZjZmNmY2fS5pY29uLXZzLW91dHtmaWxsOiNmNmY2ZjZ9Lmljb24tdnMtZmd7ZmlsbDojZjBlZmYxfS5pY29uLXZzLWFjdGlvbi1ibHVle2ZpbGw6IzAwNTM5Y308L3N0eWxlPjxwYXRoIGNsYXNzPSJpY29uLWNhbnZhcy10cmFuc3BhcmVudCIgZD0iTTE2IDE2SDBWMGgxNnYxNnoiIGlkPSJjYW52YXMiLz48cGF0aCBjbGFzcz0iaWNvbi12cy1vdXQiIGQ9Ik0wIDE1VjZoNlYyLjU4Nkw3LjU4NSAxaDYuODI5TDE2IDIuNTg2djUuODI5TDE0LjQxNCAxMEgxMHY1SDB6bTMtNnoiIGlkPSJvdXRsaW5lIi8+PHBhdGggY2xhc3M9Imljb24tdnMtZmciIGQ9Ik04IDN2M2g1djFoLTN2MWg0VjNIOHptNSAySDlWNGg0djF6TTIgOHY1aDZWOEgyem01IDNIM3YtMWg0djF6IiBpZD0iaWNvbkZnIi8+PHBhdGggY2xhc3M9Imljb24tdnMtYWN0aW9uLWJsdWUiIGQ9Ik0xMCA2aDN2MWgtM1Y2ek05IDR2MWg0VjRIOXptNS0ySDhMNyAzdjNoMVYzaDZ2NWgtNHYxaDRsMS0xVjNsLTEtMXptLTcgOEgzdjFoNHYtMXptMi0zdjdIMVY3aDh6TTggOEgydjVoNlY4eiIgaWQ9Imljb25CZyIvPjwvc3ZnPg==\\\"); }\\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row .icon.keyword { background-image: url(\\\"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiI+PHN0eWxlPi5pY29uLWNhbnZhcy10cmFuc3BhcmVudHtvcGFjaXR5OjA7ZmlsbDojZjZmNmY2fS5pY29uLXZzLW91dHtmaWxsOiNmNmY2ZjZ9Lmljb24tdnMtYmd7ZmlsbDojNDI0MjQyfS5pY29uLXZzLWZne2ZpbGw6I2YwZWZmMX08L3N0eWxlPjxwYXRoIGNsYXNzPSJpY29uLWNhbnZhcy10cmFuc3BhcmVudCIgZD0iTTE2IDE2SDBWMGgxNnYxNnoiIGlkPSJjYW52YXMiLz48cGF0aCBjbGFzcz0iaWNvbi12cy1vdXQiIGQ9Ik0xNiA1VjJIOVYxSDB2MTRoMTN2LTNoM1Y5aC0xVjZIOVY1aDd6bS04IDdWOWgxdjNIOHoiIGlkPSJvdXRsaW5lIi8+PHBhdGggY2xhc3M9Imljb24tdnMtZmciIGQ9Ik0yIDNoNXYxSDJWM3oiIGlkPSJpY29uRmciLz48cGF0aCBjbGFzcz0iaWNvbi12cy1iZyIgZD0iTTE1IDRoLTVWM2g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CAxLS4zOTYtLjM5NiAyLjA5OCAyLjA5OCAwIDAgMS0uMjUyLS42MDIgMy4xMTggMy4xMTggMCAwIDEtLjA4OC0uNzU0YzAtLjMxNi4wMzItLjYwNC4wOTYtLjg2MS4wNjMtLjI1OC4xNTUtLjQ3OS4yNzMtLjY2LjExOS0uMTgyLjI2NS0uMzIyLjQzMy0uNDI0YTEuMTAyIDEuMTAyIDAgMCAxIDEuMDczLS4wMjN6IiBpZD0iaWNvbkJnIi8+PC9zdmc+\\\"); }\\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row .icon.color { background-image: url(\\\"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiI+PHN0eWxlPi5pY29uLWNhbnZhcy10cmFuc3BhcmVudHtvcGFjaXR5OjA7ZmlsbDojZjZmNmY2fS5pY29uLXZzLW91dHtmaWxsOiNmNmY2ZjZ9Lmljb24tdnMtYmd7ZmlsbDojNDI0MjQyfS5pY29uLXZzLXJlZHtmaWxsOiNlNTE0MDB9Lmljb24tdnMteWVsbG93e2ZpbGw6I2ZmY2MwMH0uaWNvbi12cy1ncmVlbntmaWxsOiMzMzk5MzN9Lmljb24tdnMtYmx1ZXtmaWxsOiMxYmExZTJ9Lmljb24tdnMtYWN0aW9uLXB1cnBsZXtmaWxsOiM2NTJkOTB9Lmljb24td2hpdGV7ZmlsbDojZmZmZmZmfTwvc3R5bGU+PHBhdGggY2xhc3M9Imljb24tY2FudmFzLXRyYW5zcGFyZW50IiBkPSJNMTYgMTZIMFYwaDE2djE2eiIgaWQ9ImNhbnZhcyIvPjxwYXRoIGNsYXNzPSJpY29uLXZzLW91dCIgZD0iTTE2IDhjMCA0LjQxMS0zLjU4OSA4LTggOGEyLjgwMyAyLjgwMyAwIDAgMS0yLjgtMi44YzAtLjgzMy4yNzItMS42MjkuNzY2LTIuMjQxYS41OTYuNTk2IDAgMCAwIC4xMDE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A5IDAgNi0yLjY5MSA2LTZzLTIuNjkxLTYtNi02LTYgMi42OTEtNiA2YzAgLjQ0MS4zNTkuOC44LjguMzc4IDAgLjcyOS0uMTE0Ljk4Ni0uMzIyQTIuNTY4IDIuNTY4IDAgMCAxIDUuNCA3LjkzM3oiLz48cGF0aCBjbGFzcz0iaWNvbi12cy1hY3Rpb24tcHVycGxlIiBkPSJNNC41IDUuMzc1YS44NzUuODc1IDAgMSAwIDAgMS43NS44NzUuODc1IDAgMCAwIDAtMS43NXoiLz48cGF0aCBjbGFzcz0iaWNvbi12cy1ibHVlIiBkPSJNNy4xMjUgMy42MjVhLjg3NS44NzUgMCAxIDAgMCAxLjc1Ljg3NS44NzUgMCAwIDAgMC0xLjc1eiIvPjxwYXRoIGNsYXNzPSJpY29uLXZzLWdyZWVuIiBkPSJNMTAuNjI1IDQuNWEuODc1Ljg3NSAwIDEgMCAwIDEuNzUuODc1Ljg3NSAwIDAgMCAwLTEuNzV6Ii8+PHBhdGggY2xhc3M9Imljb24tdnMteWVsbG93IiBkPSJNMTEuNSA4YS44NzUuODc1IDAgMSAwIDAgMS43NS44NzUuODc1IDAgMCAwIDAtMS43NXoiLz48cGF0aCBjbGFzcz0iaWNvbi12cy1yZWQiIGQ9Ik05Ljc1IDEwLjYyNWEuODc1Ljg3NSAwIDEgMCAwIDEuNzUuODc1Ljg3NSAwIDAgMCAwLTEuNzV6Ii8+PC9nPjwvc3ZnPg==\\\"); }\\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row .icon.file { background-image: url(\\\"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiI+PHN0eWxlPi5pY29uLWNhbnZhcy10cmFuc3BhcmVudHtvcGFjaXR5OjA7ZmlsbDojZjZmNmY2fS5pY29uLXZzLW91dHtmaWxsOiNmNmY2ZjZ9Lmljb24tdnMtYmd7ZmlsbDojNDI0MjQyfS5pY29uLXZzLWZne2ZpbGw6I2YwZWZmMX08L3N0eWxlPjxwYXRoIGNsYXNzPSJpY29uLWNhbnZhcy10cmFuc3BhcmVudCIgZD0iTTE2IDE2SDBWMGgxNnYxNnoiIGlkPSJjYW52YXMiLz48cGF0aCBjbGFzcz0iaWNvbi12cy1vdXQiIGQ9Ik0xNSAxNkgyVjBoOC42MjFMMTUgNC4zNzlWMTZ6IiBpZD0ib3V0bGluZSIvPjxwYXRoIGNsYXNzPSJpY29uLXZzLWZnIiBkPSJNMTMgMTRINFYyaDV2NGg0djh6bS0zLTlWMi4yMDdMMTIuNzkzIDVIMTB6IiBpZD0iaWNvbkZnIi8+PHBhdGggY2xhc3M9Imljb24tdnMtYmciIGQ9Ik0zIDF2MTRoMTFWNC43OTNMMTAuMjA3IDFIM3ptMTAgMTNINFYyaDV2NGg0djh6bS0zLTlWMi4yMDdMMTIuNzkzIDVIMTB6IiBpZD0iaWNvbkJnIi8+PC9zdmc+\\\"); }\\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row .icon.reference { background-image: url(\\\"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiI+PHN0eWxlPi5pY29uLWNhbnZhcy10cmFuc3BhcmVudHtvcGFjaXR5OjA7ZmlsbDojZjZmNmY2fS5pY29uLXZzLW91dHtmaWxsOiNmNmY2ZjZ9Lmljb24tdnMtYmd7ZmlsbDojNDI0MjQyfS5pY29uLXZzLWZne2ZpbGw6I2YwZWZmMX0uaWNvbi12cy1hY3Rpb24tYmx1ZXtmaWxsOiMwMDUzOWN9PC9zdHlsZT48cGF0aCBjbGFzcz0iaWNvbi1jYW52YXMtdHJhbnNwYXJlbnQiIGQ9Ik0xNiAxNkgwVjBoMTZ2MTZ6IiBpZD0iY2FudmFzIi8+PHBhdGggY2xhc3M9Imljb24tdnMtb3V0IiBkPSJNMTQgNC41NTZWMTNjMCAuOTctLjcwMSAyLTIgMkg0Yy0uOTcgMC0yLS43MDEtMi0yVjYuNjQ5QTMuNDk1IDMuNDk1IDAgMCAxIDAgMy41QzAgMS41NyAxLjU3IDAgMy41IDBINXYxaDUuMDYxTDE0IDQuNTU2eiIgaWQ9Im91dGxpbmUiIHN0eWxlPSJkaXNwbGF5OiBub25lOyIvPjxwYXRoIGNsYXNzPSJpY29uLXZzLWJnIiBkPSJNMTMgNXY4cy0uMDM1IDEtMS4wMzUgMWgtOFMzIDE0IDMgMTNWOWgxdjRoOFY2SDkuMzk3bC41MTctLjUyTDkgNC41NzJWM0g3LjQxOUw2LjQxMyAyaDMuMjI4TDEzIDV6IiBpZD0iaWNvbkJnIi8+PHBhdGggY2xhc3M9Imljb24tdnMtZmciIGQ9Ik03LjQxOSAzSDl2MS41NzJMNy40MTkgM3ptMS45NzggM0w2LjQxNiA5SDR2NGg4VjZIOS4zOTd6IiBpZD0iaWNvbkZnIiBzdHlsZT0iZGlzcGxheTogbm9uZTsiLz48cGF0aCBjbGFzcz0iaWNvbi12cy1hY3Rpb24tYmx1ZSIgZD0iTTUuOTg4IDZIMy41YTIuNSAyLjUgMCAxIDEgMC01SDR2MWgtLjVDMi42NzMgMiAyIDIuNjczIDIgMy41UzIuNjczIDUgMy41IDVoMi41MTNMNCAzaDJsMi41IDIuNDg0TDYgOEg0bDEuOTg4LTJ6IiBpZD0iY29sb3JBY3Rpb24iLz48L3N2Zz4=\\\"); }\\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row .icon.snippet { background-image: url(\\\"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjxzdmcKICAgeG1sbnM6ZGM9Imh0dHA6Ly9wdXJsLm9yZy9kYy9lbGVtZW50cy8xLjEvIgogICB4bWxuczpjYz0iaHR0cDovL2NyZWF0aXZlY29tbW9ucy5vcmcvbnMjIgogICB4bWxuczpyZGY9Imh0dHA6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ICAgc3R5bGU9ImZpbGw6I2Y2ZjZmNiIgLz4KICAgIDxwYXRoCiAgICAgICBkPSJtIDE5NCwxMyAwLC03IC03LDAgMCw3IC0xLDAgMCwtOCA5LDAgMCw4IC0xLDAgeiBtIC03LDIgLTEsMCAwLC0xIDEsMCAwLDEgeiBtIDIsLTEgLTEsMCAwLDEgMSwwIDAsLTEgeiBtIDIsMCAtMSwwIDAsMSAxLDAgMCwtMSB6IG0gMiwxIC0xLDAgMCwtMSAxLDAgMCwxIHogbSAyLC0xIC0xLDAgMCwxIDEsMCAwLC0xIHoiCiAgICAgICBpZD0icGF0aDQ1MzYiCiAgICAgICBzdHlsZT0iZmlsbDojNDI0MjQyIiAvPgogICAgPHBhdGgKICAgICAgIGQ9Im0gMTg3LDEzIDAsLTcgNywwIDAsNyAtNywwIHoiCiAgICAgICBpZD0icGF0aDQ1MzgiCiAgICAgICBzdHlsZT0iZmlsbDojZjBlZmYxIiAvPgogIDwvZz4KICA8cGF0aAogICAgIGlkPSJjYW52YXMiCiAgICAgZD0iTTE2IDE2SDBWMGgxNnYxNnoiCiAgICAgY2xhc3M9Imljb24tY2FudmFzLXRyYW5zcGFyZW50IiAvPgo8L3N2Zz4K\\\"); }\\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row .icon.customcolor { background-image: none; }\\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row .icon.folder { background-image: url(\\\"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+PHN0eWxlIHR5cGU9InRleHQvY3NzIj4uaWNvbi1jYW52YXMtdHJhbnNwYXJlbnR7b3BhY2l0eTowO2ZpbGw6I0Y2RjZGNjt9IC5pY29uLXZzLW91dHtvcGFjaXR5OjA7ZmlsbDojRjZGNkY2O30gLmljb24tdnMtZmd7ZmlsbDojRjBFRkYxO30gLmljb24tZm9sZGVye2ZpbGw6IzY1NjU2NTt9PC9zdHlsZT48cGF0aCBjbGFzcz0iaWNvbi1jYW52YXMtdHJhbnNwYXJlbnQiIGQ9Ik0xNiAxNmgtMTZ2LTE2aDE2djE2eiIgaWQ9ImNhbnZhcyIvPjxwYXRoIGNsYXNzPSJpY29uLXZzLW91dCIgZD0iTTE2IDIuNXYxMGMwIC44MjctLjY3MyAxLjUtMS41IDEuNWgtMTEuOTk2Yy0uODI3IDAtMS41LS42NzMtMS41LTEuNXYtOGMwLS44MjcuNjczLTEuNSAxLjUtMS41aDIuODg2bDEtMmg4LjExYy44MjcgMCAxLjUuNjczIDEuNSAxLjV6IiBpZD0ib3V0bGluZSIvPjxwYXRoIGNsYXNzPSJpY29uLWZvbGRlciIgZD0iTTE0LjUgMmgtNy40OTJsLTEgMmgtMy41MDRjLS4yNzcgMC0uNS4yMjQtLjUuNXY4YzAgLjI3Ni4yMjMuNS41LjVoMTEuOTk2Yy4yNzUgMCAuNS0uMjI0LjUtLjV2LTEwYzAtLjI3Ni0uMjI1LS41LS41LS41em0tLjQ5NiAyaC02LjQ5NmwuNS0xaDUuOTk2djF6IiBpZD0iaWNvbkJnIi8+PHBhdGggY2xhc3M9Imljb24tdnMtZmciIGQ9Ik0xNCAzdjFoLTYuNWwuNS0xaDZ6IiBpZD0iaWNvbkZnIi8+PC9zdmc+\\\"); }\\n\\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row .icon.customcolor .colorspan {\\n\\tmargin: 0 0 0 0.3em;\\n\\tborder: 0.1em solid #000;\\n\\twidth: 0.7em;\\n\\theight: 0.7em;\\n\\tdisplay: inline-block;\\n}\\n\\n/** Styles for the docs of the completion item in focus **/\\n.monaco-editor .suggest-widget .details {\\n\\tdisplay: flex;\\n\\tflex-direction: column;\\n\\tcursor: default;\\n}\\n\\n.monaco-editor .suggest-widget .details.no-docs {\\n\\tdisplay: none;\\n}\\n\\n.monaco-editor .suggest-widget.docs-below .details {\\n\\tborder-top-width: 0px;\\n}\\n\\n.monaco-editor .suggest-widget .details > .monaco-scrollable-element {\\n\\tflex: 1;\\n}\\n\\n.monaco-editor .suggest-widget .details > .monaco-scrollable-element > .body {\\n\\tposition: absolute;\\n\\tbox-sizing: border-box;\\n\\theight: 100%;\\n\\twidth: 100%;\\n}\\n\\n.monaco-editor .suggest-widget .details > .monaco-scrollable-element > .body > .header > .type {\\n\\tflex: 2;\\n\\toverflow: hidden;\\n\\ttext-overflow: ellipsis;\\n\\topacity: 0.7;\\n\\tword-break: break-all;\\n\\tmargin: 0;\\n\\tpadding: 4px 0 4px 5px;\\n}\\n\\n.monaco-editor .suggest-widget .details > .monaco-scrollable-element > .body > .docs {\\n\\tmargin: 0;\\n\\tpadding: 4px 5px;\\n\\twhite-space: pre-wrap;\\n}\\n\\n.monaco-editor .suggest-widget .details > .monaco-scrollable-element > .body > .docs.markdown-docs {\\n\\twhite-space: initial;\\n}\\n\\n.monaco-editor .suggest-widget .details > .monaco-scrollable-element > .body > .docs .code {\\n\\twhite-space: pre-wrap;\\n\\tword-wrap: break-word;\\n}\\n\\n.monaco-editor .suggest-widget .details > .monaco-scrollable-element > .body > p:empty {\\n\\tdisplay: none;\\n}\\n\\n.monaco-editor .suggest-widget .details code {\\n\\tborder-radius: 3px;\\n\\tpadding: 0 0.4em;\\n}\\n\\n/* High Contrast and Dark Theming */\\n\\n.monaco-editor.vs-dark .suggest-widget .details > .monaco-scrollable-element > .body > .header > .close,\\n.monaco-editor.hc-black .suggest-widget .details > .monaco-scrollable-element > .body > .header > .close {\\n\\tbackground-image: url(\\\"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgdmlld0JveD0iMyAzIDE2IDE2IiBlbmFibGUtYmFja2dyb3VuZD0ibmV3IDMgMyAxNiAxNiI+PHBvbHlnb24gZmlsbD0iI2U4ZThlOCIgcG9pbnRzPSIxMi41OTcsMTEuMDQyIDE1LjQsMTMuODQ1IDEzLjg0NCwxNS40IDExLjA0MiwxMi41OTggOC4yMzksMTUuNCA2LjY4MywxMy44NDUgOS40ODUsMTEuMDQyIDYuNjgzLDguMjM5IDguMjM4LDYuNjgzIDExLjA0Miw5LjQ4NiAxMy44NDUsNi42ODMgMTUuNCw4LjIzOSIvPjwvc3ZnPg==\\\");\\n}\\n\\n.monaco-editor.vs-dark .suggest-widget .monaco-list .monaco-list-row .icon,\\n.monaco-editor.hc-black .suggest-widget .monaco-list .monaco-list-row .icon { background-image: url(\\\"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiI+PHN0eWxlPi5pY29uLWNhbnZhcy10cmFuc3BhcmVudHtvcGFjaXR5OjA7ZmlsbDojMmQyZDMwfS5pY29uLXZzLW91dHtmaWxsOiMyZDJkMzB9Lmljb24tdnMtYmd7ZmlsbDojYzVjNWM1fTwvc3R5bGU+PHBhdGggY2xhc3M9Imljb24tY2FudmFzLXRyYW5zcGFyZW50IiBkPSJNMTYgMTZIMFYwaDE2djE2eiIgaWQ9ImNhbnZhcyIvPjxwYXRoIGNsYXNzPSJpY29uLXZzLW91dCIgZD0iTTE2IDEwYzAgMi4yMDUtMS43OTQgNC00IDQtMS44NTggMC0zLjQxMS0xLjI3OS0zLjg1OC0zaC0uOTc4bDIuMzE4IDRIMHYtMS43MDNsMi0zLjQwOFYwaDExdjYuMTQyYzEuNzIxLjQ0NyAzIDIgMyAzLjg1OHoiIGlkPSJvdXRsaW5lIi8+PHBhdGggY2xhc3M9Imljb24tdnMtYmciIGQ9Ik0xMiAxdjQuNzVBNC4yNTUgNC4yNTUgMCAwIDAgNy43NSAxMGgtLjczMkw0LjI3NSA1LjI2OSAzIDcuNDQyVjFoOXpNNy43NDcgMTRMNC4yNjkgOCAuNzQ4IDE0aDYuOTk5ek0xNSAxMGEzIDMgMCAxIDEtNiAwIDMgMyAwIDAgMSA2IDB6IiBpZD0iaWNvbkJnIi8+PC9zdmc+\\\"); }\\n\\n.monaco-editor.vs-dark .suggest-widget .monaco-list .monaco-list-row .icon.method,\\n.monaco-editor.hc-black .suggest-widget .monaco-list .monaco-list-row .icon.method,\\n.monaco-editor.vs-dark .suggest-widget .monaco-list .monaco-list-row .icon.function,\\n.monaco-editor.hc-black .suggest-widget .monaco-list .monaco-list-row .icon.function,\\n.monaco-editor.vs-dark .suggest-widget .monaco-list .monaco-list-row .icon.constructor,\\n.monaco-editor.hc-black .suggest-widget .monaco-list .monaco-list-row .icon.constructor { background-image: url(\\\"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiI+PHN0eWxlPi5pY29uLWNhbnZhcy10cmFuc3BhcmVudHtvcGFjaXR5OjA7ZmlsbDojMmQyZDMwfS5pY29uLXZzLW91dHtmaWxsOiMyZDJkMzB9Lmljb24tdnMtZmd7ZmlsbDojMmIyODJlfS5pY29uLXZzLWFjdGlvbi1wdXJwbGV7ZmlsbDojYjE4MGQ3fTwvc3R5bGU+PHBhdGggY2xhc3M9Imljb24tY2FudmFzLXRyYW5zcGFyZW50IiBkPSJNMTYgMTZIMFYwaDE2djE2eiIgaWQ9ImNhbnZhcyIvPjxwYXRoIGNsYXNzPSJpY29uLXZzLW91dCIgZD0iTTE1IDMuMzQ5djguNDAzTDguOTc1IDE2SDguMDdMMSAxMS41ODJWMy4zMjdMNy41OTUgMGgxLjExOEwxNSAzLjM0OXoiIGlkPSJvdXRsaW5lIi8+PHBhdGggY2xhc3M9Imljb24tdnMtZmciIGQ9Ik0xMi43MTUgNC4zOThMOC40ODcgNy4wMiAzLjU2NSA0LjI3Mmw0LjU3OC0yLjMwOSA0LjU3MiAyLjQzNXpNMyA1LjEwMmw1IDIuNzkydjUuNzA1bC01LTMuMTI1VjUuMTAyem02IDguNDM0VjcuODc4bDQtMi40OHY1LjMxN2wtNCAyLjgyMXoiIGlkPSJpY29uRmciLz48cGF0aCBjbGFzcz0iaWNvbi12cy1hY3Rpb24tcHVycGxlIiBkPSJNOC4xNTYuODM3TDIgMy45NDJ2Ny4wODVMOC41MTcgMTUuMSAxNCAxMS4yMzNWMy45NUw4LjE1Ni44Mzd6bTQuNTU5IDMuNTYxTDguNDg3IDcuMDIgMy41NjUgNC4yNzJsNC41NzgtMi4zMDkgNC41NzIgMi40MzV6TTMgNS4xMDJsNSAyLjc5MnY1LjcwNWwtNS0zLjEyNVY1LjEwMnptNiA4LjQzNFY3Ljg3OGw0LTIuNDh2NS4zMTdsLTQgMi44MjF6IiBpZD0iaWNvbkJnIi8+PC9zdmc+\\\"); }\\n\\n.monaco-editor.vs-dark .suggest-widget .monaco-list .monaco-list-row .icon.field,\\n.monaco-editor.hc-black .suggest-widget .monaco-list .monaco-list-row .icon.field { background-image: url(\\\"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiI+PHN0eWxlPi5pY29uLWNhbnZhcy10cmFuc3BhcmVudHtvcGFjaXR5OjA7ZmlsbDojMmQyZDMwfS5pY29uLXZzLW91dHtmaWxsOiMyZDJkMzB9Lmljb24tdnMtZmd7ZmlsbDojMmIyODJlfS5pY29uLXZzLWFjdGlvbi1ibHVle2ZpbGw6Izc1YmVmZn08L3N0eWxlPjxwYXRoIGNsYXNzPSJpY29uLWNhbnZhcy10cmFuc3BhcmVudCIgZD0iTTE2IDE2SDBWMGgxNnYxNnoiIGlkPSJjYW52YXMiLz48cGF0aCBjbGFzcz0iaWNvbi12cy1vdXQiIGQ9Ik0wIDEwLjczNlY0LjVMOSAwbDcgMy41djYuMjM2bC05IDQuNS03LTMuNXoiIGlkPSJvdXRsaW5lIi8+PHBhdGggY2xhc3M9Imljb24tdnMtYWN0aW9uLWJsdWUiIGQ9Ik05IDFMMSA1djVsNiAzIDgtNFY0TDkgMXpNNyA2Ljg4MkwzLjIzNiA1IDkgMi4xMTggMTIuNzY0IDQgNyA2Ljg4MnoiIGlkPSJpY29uQmciLz48cGF0aCBjbGFzcz0iaWNvbi12cy1mZyIgZD0iTTkgMi4xMThMMTIuNzY0IDQgNyA2Ljg4MiAzLjIzNiA1IDkgMi4xMTh6IiBpZD0iaWNvbkZnIi8+PC9zdmc+\\\"); }\\n\\n.monaco-editor.vs-dark .suggest-widget .monaco-list .monaco-list-row .icon.event,\\n.monaco-editor.hc-black .suggest-widget .monaco-list .monaco-list-row .icon.event { background-image: url(\\\"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiI+PHN0eWxlPi5pY29uLWNhbnZhcy10cmFuc3BhcmVudHtvcGFjaXR5OjA7ZmlsbDojMmQyZDMwfS5pY29uLXZzLW91dHtmaWxsOiMyZDJkMzB9Lmljb24tdnMtYWN0aW9uLW9yYW5nZXtmaWxsOiNlOGFiNTN9PC9zdHlsZT48cGF0aCBjbGFzcz0iaWNvbi1jYW52YXMtdHJhbnNwYXJlbnQiIGQ9Ik0xNiAxNkgwVjBoMTZ2MTZ6IiBpZD0iY2FudmFzIi8+PHBhdGggY2xhc3M9Imljb24tdnMtb3V0IiBkPSJNMTQgMS40MTRMOS40MTQgNkgxNHYxLjQxNEw1LjQxNCAxNkgzdi0xLjIzNEw1LjM3MSAxMEgyVjguNzY0TDYuMzgyIDBIMTR2MS40MTR6IiBpZD0ib3V0bGluZSIgc3R5bGU9ImRpc3BsYXk6IG5vbmU7Ii8+PHBhdGggY2xhc3M9Imljb24tdnMtYWN0aW9uLW9yYW5nZSIgZD0iTTcgN2g2bC04IDhINGwyLjk4NS02SDNsNC04aDZMNyA3eiIgaWQ9Imljb25CZyIvPjwvc3ZnPg==\\\"); }\\n\\n.monaco-editor.vs-dark .suggest-widget .monaco-list .monaco-list-row .icon.operator,\\n.monaco-editor.hc-black .suggest-widget .monaco-list .monaco-list-row .icon.operator { background-image: url(\\\"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiI+PHN0eWxlPi5pY29uLWNhbnZhcy10cmFuc3BhcmVudHtvcGFjaXR5OjA7ZmlsbDojMmQyZDMwfS5pY29uLXZzLW91dHtmaWxsOiMyZDJkMzB9Lmljb24tdnMtZmd7ZmlsbDojMmIyODJlfS5pY29uLXZzLWFjdGlvbi1ibHVle2ZpbGw6Izc1YmVmZn08L3N0eWxlPjxwYXRoIGNsYXNzPSJpY29uLWNhbnZhcy10cmFuc3BhcmVudCIgZD0iTTE2IDE2SDBWMGgxNnYxNnoiIGlkPSJjYW52YXMiLz48cGF0aCBjbGFzcz0iaWNvbi12cy1vdXQiIGQ9Ik0xNiAxNkgwVjBoMTZ2MTZ6IiBpZD0ib3V0bGluZSIgc3R5bGU9ImRpc3BsYXk6IG5vbmU7Ii8+PHBhdGggY2xhc3M9Imljb24tdnMtYWN0aW9uLWJsdWUiIGQ9Ik0xIDF2MTRoMTRWMUgxem02IDEySDN2LTFoNHYxem0wLTNIM1Y5aDR2MXptMC01SDV2Mkg0VjVIMlY0aDJWMmgxdjJoMnYxem0zLjI4MSA4SDguNzE5bDMtNGgxLjU2M2wtMy4wMDEgNHpNMTQgNUg5VjRoNXYxeiIgaWQ9Imljb25CZyIvPjxwYXRoIGNsYXNzPSJpY29uLXZzLWZnIiBkPSJNNyA1SDV2Mkg0VjVIMlY0aDJWMmgxdjJoMnYxem03LTFIOXYxaDVWNHpNNyA5SDN2MWg0Vjl6bTAgM0gzdjFoNHYtMXptMy4yODEgMWwzLTRoLTEuNTYzbC0zIDRoMS41NjN6IiBpZD0iaWNvbkZnIiBzdHlsZT0iZGlzcGxheTogbm9uZTsiLz48L3N2Zz4=\\\"); }\\n\\n.monaco-editor.vs-dark .suggest-widget .monaco-list .monaco-list-row .icon.variable,\\n.monaco-editor.h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NS41NzhMOC43MzMgNHpNNy4xNTYgNy4xNTZsLTEuNTc4LS43ODkgMy4xNTYtMS41NzggMS41NzguNzg5LTMuMTU2IDEuNTc4eiIgaWQ9ImNvbG9ySW1wb3J0YW5jZSIvPjwvc3ZnPg==\\\"); }\\n\\n.monaco-editor.vs-dark .suggest-widget .monaco-list .monaco-list-row .icon.class,\\n.monaco-editor.hc-black .suggest-widget .monaco-list .monaco-list-row .icon.class { background-image: url(\\\"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiI+PHN0eWxlPi5pY29uLWNhbnZhcy10cmFuc3BhcmVudHtvcGFjaXR5OjA7ZmlsbDojMmQyZDMwfS5pY29uLXZzLW91dHtmaWxsOiMyZDJkMzB9Lmljb24tdnMtYWN0aW9uLW9yYW5nZXtmaWxsOiNlOGFiNTN9PC9zdHlsZT48cGF0aCBjbGFzcz0iaWNvbi1jYW52YXMtdHJhbnNwYXJlbnQiIGQ9Ik0xNiAxNkgwVjBoMTZ2MTZ6IiBpZD0iY2FudmFzIi8+PHBhdGggY2xhc3M9Imljb24tdnMtb3V0IiBkPSJNMTYgNi41ODZsLTMtM0wxMS41ODYgNUg5LjQxNGwxLTEtNC00aC0uODI4TDAgNS41ODZ2LjgyOGw0IDRMNi40MTQgOEg3djVoMS41ODZsMyAzaC44MjhMMTYgMTIuNDE0di0uODI4TDEzLjkxNCA5LjUgMTYgNy40MTR2LS44Mjh6IiBpZD0ib3V0bGluZSIvPjxwYXRoIGNsYXNzPSJpY29uLXZzLWFjdGlvbi1vcmFuZ2UiIGQ9Ik0xMyAxMGwyIDItMyAzLTItMiAxLTFIOFY3SDZMNCA5IDEgNmw1LTUgMyAzLTIgMmg1bDEtMSAyIDItMyAzLTItMiAxLTFIOXY0bDIuOTk5LjAwMkwxMyAxMHoiIGlkPSJpY29uQmciLz48L3N2Zz4=\\\"); }\\n\\n.monaco-editor.vs-dark .suggest-widget .monaco-list .monaco-list-row .icon.interface,\\n.monaco-editor.hc-black .suggest-widget .monaco-list .monaco-list-row .icon.interface { background-image: url(\\\"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiI+PHN0eWxlPi5pY29uLWNhbnZhcy10cmFuc3BhcmVudHtvcGFjaXR5OjA7ZmlsbDojMmQyZDMwfS5pY29uLXZzLW91dHtmaWxsOiMyZDJkMzB9Lmljb24tdnMtZmd7ZmlsbDojMmIyODJlfS5pY29uLXZzLWFjdGlvbi1ibHVle2ZpbGw6Izc1YmVmZn08L3N0eWxlPjxwYXRoIGNsYXNzPSJpY29uLWNhbnZhcy10cmFuc3BhcmVudCIgZD0iTTE2IDE2SDBWMGgxNnYxNnoiIGlkPSJjYW52YXMiLz48cGF0aCBjbGFzcz0iaWNvbi12cy1vdXQiIGQ9Ik0xMS41IDEyYy0xLjkxNSAwLTMuNjAyLTEuMjQxLTQuMjI4LTNoLTEuNDFhMy4xMSAzLjExIDAgMCAxLTIuNzM3IDEuNjI1QzEuNDAyIDEwLjYyNSAwIDkuMjIzIDAgNy41czEuNDAyLTMuMTI1IDMuMTI1LTMuMTI1YzEuMTY1IDAgMi4yMDEuNjM5IDIuNzM3IDEuNjI1aDEuNDFjLjYyNi0xLjc1OSAyLjMxMy0zIDQuMjI4LTNDMTMuOTgxIDMgMTYgNS4wMTkgMTYgNy41UzEzLjk4MSAxMiAxMS41IDEyeiIgaWQ9Im91dGxpbmUiLz48cGF0aCBjbGFzcz0iaWNvbi12cy1mZyIgZD0iTTExLjUgOUExLjUwMSAxLjUwMSAwIDEgMSAxMyA3LjVjMCAuODI2LS42NzMgMS41LTEuNSAxLjV6IiBpZD0iaWNvbkZnIi8+PHBhdGggY2xhc3M9Imljb24tdnMtYWN0aW9uLWJsdWUiIGQ9Ik0xMS41IDRhMy40OSAzLjQ5IDAgMCAwLTMuNDUgM0g1LjE4NUEyLjEyMiAyLjEyMiAwIDAgMCAxIDcuNWEyLjEyMyAyLjEyMyAwIDEgMCA0LjE4NS41SDguMDVhMy40OSAzLjQ5IDAgMCAwIDMuNDUgMyAzLjUgMy41IDAgMSAwIDAtN3ptMCA1Yy0uODI3IDAtMS41LS42NzMtMS41LTEuNVMxMC42NzMgNiAxMS41IDZzMS41LjY3MyAxLjUgMS41UzEyLjMyNyA5IDExLjUgOXoiIGlkPSJpY29uQmciLz48L3N2Zz4=\\\"); }\\n\\n.monaco-editor.vs-dark .suggest-widget .monaco-list .monaco-list-row .icon.struct,\\n.monaco-editor.hc-black .suggest-widget .monaco-list .monaco-list-row .icon.struct { background-image: url(\\\"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiI+PHN0eWxlPi5pY29uLWNhbnZhcy10cmFuc3BhcmVudHtvcGFjaXR5OjA7ZmlsbDojMmQyZDMwfS5pY29uLXZzLW91dHtmaWxsOiMyZDJkMzB9Lmljb24tdnMtYWN0aW9uLWJsdWV7ZmlsbDojNzViZWZmfTwvc3R5bGU+PHBhdGggY2xhc3M9Imljb24tY2FudmFzLXRyYW5zcGFyZW50IiBkPSJNMTYgMTZIMFYwaDE2djE2eiIgaWQ9ImNhbnZhcyIvPjxwYXRoIGNsYXNzPSJpY29uLXZzLW91dCIgZD0iTTkgMTRWOEg3djZIMVYyaDE0djEySDl6IiBpZD0ib3V0bGluZSIgc3R5bGU9ImRpc3BsYXk6IG5vbmU7Ii8+PHBhdGggY2xhc3M9Imljb24tdnMtYWN0aW9uLWJsdWUiIGQ9Ik0xMCA5aDR2NGgtNFY5em0tOCA0aDRWOUgydjR6TTIgM3Y0aDEyVjNIMnoiIGlkPSJpY29uQmciLz48L3N2Zz4=\\\"); }\\n\\n.monaco-editor.vs-dark .suggest-widget .monaco-list .monaco-list-row .icon.type-parameter,\\n.monaco-editor.hc-black .suggest-widget .monaco-list .monaco-list-row .icon.type-parameter { background-image: url(\\\"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiI+PHN0eWxlPi5pY29uLWNhbnZhcy10cmFuc3BhcmVudHtvcGFjaXR5OjA7ZmlsbDojMmQyZDMwfS5pY29uLXZzLW91dHtmaWxsOiMyZDJkMzB9Lmljb24tdnMtYmd7ZmlsbDojYzVjNWM1fTwvc3R5bGU+PHBhdGggY2xhc3M9Imljb24tY2FudmFzLXRyYW5zcGFyZW50IiBkPSJNMTYgMTZIMFYwaDE2djE2eiIgaWQ9ImNhbnZhcyIvPjxwYXRoIGNsYXNzPSJpY29uLXZzLW91dCIgZD0iTTEwLjcwMiAxMC41bDItMi0yLTIgLjUtLjVIMTB2NWgxdjNINXYtM2gxVjZINC43OThsLjUuNS0yIDIgMiAyTDMgMTIuNzk3bC0zLTNWNy4yMDFsMy0zVjJoMTB2Mi4yMDFsMyAzdjIuNTk2bC0zIDMtMi4yOTgtMi4yOTd6IiBpZD0ib3V0bGluZSIgc3R5bGU9ImRpc3BsYXk6IG5vbmU7Ii8+PHBhdGggY2xhc3M9Imljb24tdnMtYmciIGQ9Ik00IDNoOHYyaC0xdi0uNWMwLS4yNzctLjIyNC0uNS0uNS0uNUg5djcuNWMwIC4yNzUuMjI0LjUuNS41aC41djFINnYtMWguNWEuNS41IDAgMCAwIC41LS41VjRINS41YS41LjUgMCAwIDAtLjUuNVY1SDRWM3pNMyA1LjYxNUwuMTE2IDguNSAzIDExLjM4M2wuODg0LS44ODMtMi0yIDItMkwzIDUuNjE1em0xMCAwbC0uODg0Ljg4NSAyIDItMiAyIC44ODQuODgzTDE1Ljg4NCA4LjUgMTMgNS42MTV6IiBpZD0iaWNvbkJnIi8+PC9zdmc+\\\"); }\\n\\n.monaco-editor.vs-dark .suggest-widget .monaco-list .monaco-list-row .icon.module,\\n.monaco-editor.hc-black .suggest-widget .monaco-list .monaco-list-row .icon.module { background-image: url(\\\"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiI+PHN0eWxlPi5pY29uLWNhbnZhcy10cmFuc3BhcmVudHtvcGFjaXR5OjA7ZmlsbDojMmQyZDMwfS5pY29uLXZzLW91dHtmaWxsOiMyZDJkMzB9Lmljb24tdnMtYmd7ZmlsbDojYzVjNWM1fTwvc3R5bGU+PHBhdGggY2xhc3M9Imljb24tY2FudmFzLXRyYW5zcGFyZW50IiBkPSJNMTYgMTZIMFYwaDE2djE2eiIgaWQ9ImNhbnZhcyIvPjxwYXRoIGNsYXNzPSJpY29uLXZzLW91dCIgZD0iTTkuMjYgMTEuOTg0bC45NzgtLjAyMWEuOTYyLjk2MiAwIDAgMCAuMDktLjAwNmMuMDExLS4wNjMuMDI2LS4xNzkuMDI2LS4zNjFWOS42ODhjMC0uNjc5LjE4NS0xLjI1Ny41My0xLjcwNy0uMzQ2LS40NTItLjUzLTEuMDMtLjUzLTEuNzA1VjQuMzVjMC0uMTY3LS4wMjEtLjI1OS0uMDM0LS4zMDJMOS4yNiA0LjAyVi45NzNsMS4wMTEuMDExYzIuMTY3LjAyNCAzLjQwOSAxLjE1NiAzLjQwOSAzLjEwNXYxLjk2MmMwIC4zNTEuMDcxLjQ2MS4wNzIuNDYybC45MzYuMDYuMDUzLjkyN3YxLjkzNmwtLjkzNi4wNjFjLS4wNzYuMDE2LS4xMjUuMTQ2LS4xMjUuNDI0djIuMDE3YzAgLjkxNC0uMzMyIDMuMDQzLTMuNDA4IDMuMDc4bC0xLjAxMi4wMTF2LTMuMDQzem0tMy41MjEgMy4wMzJjLTMuMDg5LS4wMzUtMy40MjItMi4xNjQtMy40MjItMy4wNzhWOS45MjFjMC0uMzI3LS4wNjYtLjQzMi0uMDY3LS40MzNsLS45MzctLjA2LS4wNjMtLjkyOVY2LjU2M2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Njg4YzAtLjkyNS40NDktMS40ODggMS4zNDctMS42ODh2LS4wMjFjLS44OTgtLjIxNC0xLjM0Ny0uNzgyLTEuMzQ3LTEuNzAyVjQuMzVjMC0uODUyLS4zNjQtMS4yODgtMS4wOTQtMS4zMDZ2LTEuMDZjMS42MTMuMDE4IDIuNDIuNzIgMi40MiAyLjEwNXYxLjk2MmMwIC45Mi4zNTQgMS40MDQgMS4wNiAxLjQ0OXYuOTk5eiIgaWQ9Imljb25CZyIvPjwvc3ZnPg==\\\"); }\\n\\n.monaco-editor.vs-dark .suggest-widget .monaco-list .monaco-list-row .icon.property,\\n.monaco-editor.hc-black .suggest-widget .monaco-list .monaco-list-row .icon.property { background-image: url(\\\"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiI+PHN0eWxlPi5pY29uLWNhbnZhcy10cmFuc3BhcmVudHtvcGFjaXR5OjA7ZmlsbDojMmQyZDMwfS5pY29uLXZzLW91dHtmaWxsOiMyZDJkMzB9Lmljb24tdnMtYmd7ZmlsbDojYzVjNWM1fTwvc3R5bGU+PHBhdGggY2xhc3M9Imljb24tY2FudmFzLXRyYW5zcGFyZW50IiBkPSJNMTYgMTZIMFYwaDE2djE2eiIgaWQ9ImNhbnZhcyIvPjxwYXRoIGNsYXNzPSJpY29uLXZzLW91dCIgZD0iTTE2IDUuNWE1LjUgNS41IDAgMCAxLTUuNSA1LjVjLS4yNzUgMC0uNTQzLS4wMjctLjgwNy0uMDY2bC0uMDc5LS4wMTJhNS40MjkgNS40MjkgMCAwIDEtLjgxLS4xOTJsLTQuNTM3IDQuNTM3Yy0uNDcyLjQ3My0xLjEuNzMzLTEuNzY3LjczM3MtMS4yOTUtLjI2LTEuNzY4LS43MzJhMi41MDIgMi41MDIgMCAwIDEgMC0zLjUzNWw0LjUzNy00LjUzN2E1LjQ1MiA1LjQ1MiAwIDAgMS0uMTkxLS44MTJjLS4wMDUtLjAyNS0uMDA4LS4wNTEtLjAxMi0uMDc3QTUuNTAzIDUuNTAzIDAgMCAxIDUgNS41YTUuNSA1LjUgMCAxIDEgMTEgMHoiIGlkPSJvdXRsaW5lIi8+PHBhdGggY2xhc3M9Imljb24tdnMtYmciIGQ9Ik0xNSA1LjVhNC41IDQuNSAwIDAgMS00LjUgNC41Yy0uNjkzIDAtMS4zNDItLjE3LTEuOTI5LS40NWwtNS4wMSA1LjAxYy0uMjkzLjI5NC0uNjc3LjQ0LTEuMDYxLjQ0cy0uNzY4LS4xNDYtMS4wNjEtLjQzOWExLjUgMS41IDAgMCAxIDAtMi4xMjFsNS4wMS01LjAxQTQuNDgzIDQuNDgzIDAgMCAxIDYgNS41IDQuNSA0LjUgMCAwIDEgMTAuNSAxYy42OTMgMCAxLjM0Mi4xNyAxLjkyOS40NUw5LjYzNiA0LjI0M2wyLjEyMSAyLjEyMSAyLjc5My0yLjc5M2MuMjguNTg3LjQ1IDEuMjM2LjQ1IDEuOTI5eiIgaWQ9Imljb25CZyIvPjwvc3ZnPg==\\\"); }\\n\\n.monaco-editor.vs-dark .suggest-widget .monaco-list .monaco-list-row .icon.unit,\\n.monaco-editor.hc-black .suggest-widget .monaco-list .monaco-list-row .icon.unit { background-image: url(\\\"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiI+PHN0eWxlPi5pY29uLWNhbnZhcy10cmFuc3BhcmVudHtvcGFjaXR5OjA7ZmlsbDojMmQyZDMwfS5pY29uLXZzLW91dHtmaWxsOiMyZDJkMzB9Lmljb24tdnMtYmd7ZmlsbDojYzVjNWM1fS5pY29uLXZzLWZne2ZpbGw6IzJiMjgyZX08L3N0eWxlPjxwYXRoIGNsYXNzPSJpY29uLWNhbnZhcy10cmFuc3BhcmVudCIgZD0iTTE2IDE2SDBWMGgxNnYxNnoiIGlkPSJjYW52YXMiLz48cGF0aCBjbGFzcz0iaWNvbi12cy1vdXQiIGQ9Ik0xNiAxMS4wMTNIMVY0aDE1djcuMDEzeiIgaWQ9Im91dGxpbmUiLz48cGF0aCBjbGFzcz0iaWNvbi12cy1mZyIgZD0iTTggOUg3VjZoM3YzSDlWN0g4djJ6TTQgN2gxdjJoMVY2SDN2M2gxVjd6bTggMGgxdjJoMVY2aC0zdjNoMVY3eiIgaWQ9Imljb25GZyIvPjxwYXRoIGNsYXNzPSJpY29uLXZzLWJnIiBkPSJNMiA1djVoMTNWNUgyem00IDRINVY3SDR2MkgzVjZoM3Yzem00IDBIOVY3SDh2Mkg3VjZoM3Yzem00IDBoLTFWN2gtMXYyaC0xVjZoM3YzeiIgaWQ9Imljb25CZyIvPjwvc3ZnPg==\\\"); }\\n\\n.monaco-editor.vs-dark .suggest-widget .monaco-list .monaco-list-row .icon.constant,\\n.monaco-editor.hc-black .suggest-widget .monaco-list .monaco-list-row .icon.constant { background-image: url(\\\"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiI+PHN0eWxlPi5pY29uLWNhbnZhcy10cmFuc3BhcmVudHtvcGFjaXR5OjA7ZmlsbDojMjUyNTI2fS5pY29uLXZzLW91dHtmaWxsOiMyNTI1MjZ9Lmljb24tdnMtYmd7ZmlsbDojYzVjNWM1fS5pY29uLXZzLWZne2ZpbGw6IzJiMjgyZX0uaWNvbi12cy1hY3Rpb24tYmx1ZXtmaWxsOiM3NWJlZmZ9PC9zdHlsZT48cGF0aCBjbGFzcz0iaWNvbi1jYW52YXMtdHJhbnNwYXJlbnQiIGQ9Ik0xNiAxNkgwVjBoMTZ2MTZ6IiBpZD0iY2FudmFzIi8+PHBhdGggY2xhc3M9Imljb24tdnMtb3V0IiBkPSJNMi44NzkgMTRMMSAxMi4xMjFWMy44NzlMMi44NzkgMmgxMC4yNDJMMTUgMy44Nzl2OC4yNDJMMTMuMTIxIDE0SDIuODc5eiIgaWQ9Im91dGxpbmUiLz48cGF0aCBjbGFzcz0iaWNvbi12cy1mZyIgZD0iTTEyLjI5MyA0SDMuNzA3TDMgNC43MDd2Ni41ODZsLjcwNy43MDdoOC41ODZsLjcwNy0uNzA3VjQuNzA3TDEyLjI5MyA0ek0xMSAxMEg1VjloNnYxem0wLTNINVY2aDZ2MXoiIGlkPSJpY29uRmciLz48ZyBpZD0iaWNvbkJnIj48cGF0aCBjbGFzcz0iaWNvbi12cy1iZyIgZD0iTTEyLjcwNyAxM0gzLjI5M0wyIDExLjcwN1Y0LjI5M0wzLjI5MyAzaDkuNDE0TDE0IDQuMjkzdjcuNDE0TDEyLjcwNyAxM3ptLTktMWg4LjU4NmwuNzA3LS43MDdWNC43MDdMMTIuMjkzIDRIMy43MDdMMyA0LjcwN3Y2LjU4NmwuNzA3LjcwN3oiLz48cGF0aCBjbGFzcz0iaWNvbi12cy1hY3Rpb24tYmx1ZSIgZD0iTTExIDdINVY2aDZ2MXptMCAySDV2MWg2Vjl6Ii8+PC9nPjwvc3ZnPg==\\\"); }\\n\\n.monaco-editor.vs-dark .suggest-widget .monaco-list .monaco-list-row .icon.value,\\n.monaco-editor.hc-black .suggest-widget .monaco-list .monaco-list-row .icon.value,\\n.monaco-editor.vs-dark .suggest-widget .monaco-list .monaco-list-row .icon.enum,\\n.monaco-editor.hc-black .suggest-widget .monaco-list .monaco-list-row .icon.enum { background-image: url(\\\"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiI+PHN0eWxlPi5pY29uLWNhbnZhcy10cmFuc3BhcmVudHtvcGFjaXR5OjA7ZmlsbDojMmQyZDMwfS5pY29uLXZzLW91dHtmaWxsOiMyZDJkMzB9Lmljb24tdnMtZmd7ZmlsbDojMmIyODJlfS5pY29uLXZzLWFjdGlvbi1vcmFuZ2V7ZmlsbDojZThhYjUzfTwvc3R5bGU+PHBhdGggY2xhc3M9Imljb24tY2FudmFzLXRyYW5zcGFyZW50IiBkPSJNMTYgMTZIMFYwaDE2djE2eiIgaWQ9ImNhbnZhcyIvPjxwYXRoIGNsYXNzPSJpY29uLXZzLW91dCIgZD0iTTE0LjQxNCAxTDE2IDIuNTg2djUuODI4TDE0LjQxNCAxMEgxMHYzLjQxNkw4LjQxNCAxNUgxLjU4NkwwIDEzLjQxNnYtNS44M0wxLjU4NiA2SDZWMi41ODZMNy41ODYgMWg2LjgyOHoiIGlkPSJvdXRsaW5lIi8+PHBhdGggY2xhc3M9Imljb24tdnMtZmciIGQ9Ik0yIDEzaDZWOEgydjV6bTEtNGg0djFIM1Y5em0wIDJoNHYxSDN2LTF6bTExLTVWM0g4djNoLjQxNEw5IDYuNTg2VjZoNHYxSDkuNDE0bC41ODYuNTg2VjhoNFY2em0tMS0xSDlWNGg0djF6IiBpZD0iaWNvbkZnIi8+PHBhdGggY2xhc3M9Imljb24tdnMtYWN0aW9uLW9yYW5nZSIgZD0iTTMgMTFoNC4wMDF2MUgzdi0xem0wLTFoNC4wMDFWOUgzdjF6bTYtMnY1bC0xIDFIMmwtMS0xVjhsMS0xaDZsMSAxek04IDhIMnY1aDZWOHptMS0ybDEgMWgzVjZIOXptMC0xaDRWNEg5djF6bTUtM0g4TDcgM3YzaDFWM2g2djVoLTR2MWg0bDEtMVYzbC0xLTF6IiBpZD0iaWNvbkJnIi8+PC9zdmc+\\\"); }\\n\\n.monaco-editor.vs-dark .suggest-widget .monaco-list .monaco-list-row .icon.enum-member,\\n.monaco-editor.hc-black .suggest-widget .monaco-list .monaco-list-row .icon.enum-member { background-image: url(\\\"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiI+PHN0eWxlPi5pY29uLWNhbnZhcy10cmFuc3BhcmVudHtvcGFjaXR5OjA7ZmlsbDojMmQyZDMwfS5pY29uLXZzLW91dHtmaWxsOiMyZDJkMzB9Lmljb24tdnMtZmd7ZmlsbDojMmIyODJlfS5pY29uLXZzLWFjdGlvbi1ibHVle2ZpbGw6Izc1YmVmZn08L3N0eWxlPjxwYXRoIGNsYXNzPSJpY29uLWNhbnZhcy10cmFuc3BhcmVudCIgZD0iTTE2IDE2SDBWMGgxNnYxNnoiIGlkPSJjYW52YXMiLz48cGF0aCBjbGFzcz0iaWNvbi12cy1vdXQiIGQ9Ik0wIDE1VjZoNlYyLjU4Nkw3LjU4NSAxaDYuODI5TDE2IDIuNTg2djUuODI5TDE0LjQxNCAxMEgxMHY1SDB6bTMtNnoiIGlkPSJvdXRsaW5lIi8+PHBhdGggY2xhc3M9Imljb24tdnMtZmciIGQ9Ik04IDN2M2g1djFoLTN2MWg0VjNIOHptNSAySDlWNGg0djF6TTIgOHY1aDZWOEgyem01IDNIM3YtMWg0djF6IiBpZD0iaWNvbkZnIi8+PHBhdGggY2xhc3M9Imljb24tdnMtYWN0aW9uLWJsdWUiIGQ9Ik0xMCA2aDN2MWgtM1Y2ek05IDR2MWg0VjRIOXptNS0ySDhMNyAzdjNoMVYzaDZ2NWgtNHYxaDRsMS0xVjNsLTEtMXptLTcgOEgzdjFoNHYtMXptMi0zdjdIMVY3aDh6TTggOEgydjVoNlY4eiIgaWQ9Imljb25CZyIvPjwvc3ZnPg==\\\"); }\\n\\n.monaco-editor.vs-dark .suggest-widget .monaco-list .monaco-list-row .icon.keyword,\\n.monaco-editor.hc-black .suggest-widget .monaco-list .monaco-list-row .icon.keyword { background-image: url(\\\"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiI+PHN0eWxlPi5pY29uLWNhbnZhcy10cmFuc3BhcmVudHtvcGFjaXR5OjA7ZmlsbDojMmQyZDMwfS5pY29uLXZzLW91dHtmaWxsOiMyZDJkMzB9Lmljb24tdnMtYmd7ZmlsbDojYzVjNWM1fS5pY29uLXZzLWZne2ZpbGw6IzJiMjgyZX08L3N0eWxlPjxwYXRoIGNsYXNzPSJpY29uLWNhbnZhcy10cmFuc3BhcmVudCIgZD0iTTE2IDE2SDBWMGgxNnYxNnoiIGlkPSJjYW52YXMiLz48cGF0aCBjbGFzcz0iaWNvbi12cy1vdXQiIGQ9Ik0xNiA1VjJIOVYxSDB2MTRoMTN2LTNoM1Y5aC0xVjZIOVY1aDd6bS04IDdWOWgxdjNIOHoiIGlkPSJvdXRsaW5lIi8+PHBhdGggY2xhc3M9Imljb24tdnMtZmciIGQ9Ik0yIDNoNXYxSDJWM3oiIGlkPSJpY29uRmciLz48cGF0aCBjbGFzcz0iaWNvbi12cy1iZyIgZD0iTTE1IDRoLTVWM2g1djF6bS0xIDNoLTJ2MWgyVjd6bS00IDBIMXYxaDlWN3ptMiA2SDF2MWgxMXYtMXptLTUtM0gxdjFoNnYtMXptOCAwaC01djFoNXYtMXpNOCAydjNIMVYyaDd6TTcgM0gydjFoNVYzeiIgaWQ9Imljb25CZyIvPjwvc3ZnPg==\\\"); }\\n\\n.monaco-editor.vs-dark .suggest-widget .monaco-list .monaco-list-row .icon.text,\\n.monaco-editor.hc-black .suggest-widget .monaco-list .monaco-list-row .icon.text { background-image: url(\\\"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiI+PHN0eWxlPi5pY29uLWNhbnZhcy10cmFuc3BhcmVudHtvcGFjaXR5OjA7ZmlsbDojMmQyZDMwfS5pY29uLXZzLW91dHtmaWxsOiMyZDJkMzB9Lmljb24tdnMtYmd7ZmlsbDojYzVjNWM1fS5pY29uLXZzLWZne2ZpbGw6IzJiMjgyZX08L3N0eWxlPjxwYXRoIGNsYXNzPSJpY29uLWNhbnZhcy10cmFuc3BhcmVudCIgZD0iTTE2IDE2SDBWMGgxNnYxNnoiIGlkPSJjYW52YXMiLz48cGF0aCBjb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ExLjE3OCAxLjE3OCAwIDAgMC0uMjczLS4yMjMuNjQ1LjY0NSAwIDAgMC0uMzE3LS4wODFjLS4wODUgMC0uMTYxLjAzMi0uMjM4LjA2NC0uMjYzLjE4MS0uNDY5LjU4Ni0uNDY5IDEuMzAxIDAgLjY2OC4xODIgMS4wMTEuNDIzIDEuMTQ2LjA4NC4wNC4xNzEuMDc0LjI3NC4wNzQuMDQ5IDAgLjEwMS0uMDEuMTUzLS4wMjdhLjg1Ni44NTYgMCAwIDAgLjE1OC0uMDY4IDEuMTYgMS4xNiAwIDAgMCAuMjg4LS4yMjV2Ljc3Yy0uMDkuMDc2LS4xOTIuMTM5LS4zMDkuMTg0YTEuMDk4IDEuMDk4IDAgMCAxLS40MTIuMDY4Ljk3NC45NzQgMCAwIDEtLjUyMy0uMTQzIDEuMjU3IDEuMjU3IDAgMCAxLS4zOTYtLjM5NiAyLjA5OCAyLjA5OCAwIDAgMS0uMjUyLS42MDIgMy4xMTggMy4xMTggMCAwIDEtLjA4OC0uNzU0YzAtLjMxNi4wMzItLjYwNC4wOTYtLjg2MS4wNjMtLjI1OC4xNTUtLjQ3OS4yNzMtLjY2LjExOS0uMTgyLjI2NS0uMzIyLjQzMy0uNDI0YTEuMTAyIDEuMTAyIDAgMCAxIDEuMDczLS4wMjN6IiBpZD0iaWNvbkJnIi8+PC9zdmc+\\\"); }\\n\\n.monaco-editor.vs-dark .suggest-widget .monaco-list .monaco-list-row .icon.color,\\n.monaco-editor.hc-black .suggest-widget .monaco-list .monaco-list-row .icon.color { background-image: url(\\\"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiI+PHN0eWxlPi5pY29uLWNhbnZhcy10cmFuc3BhcmVudHtvcGFjaXR5OjA7ZmlsbDojMmQyZDMwfS5pY29uLXZzLW91dHtmaWxsOiMyZDJkMzB9Lmljb24tdnMtYmd7ZmlsbDojYzVjNWM1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BkPSJNMTEuNSA4YS44NzUuODc1IDAgMSAwIDAgMS43NS44NzUuODc1IDAgMCAwIDAtMS43NXoiLz48cGF0aCBjbGFzcz0iaWNvbi12cy1yZWQiIGQ9Ik05Ljc1IDEwLjYyNWEuODc1Ljg3NSAwIDEgMCAwIDEuNzUuODc1Ljg3NSAwIDAgMCAwLTEuNzV6Ii8+PC9nPjwvc3ZnPg==\\\"); }\\n\\n.monaco-editor.vs-dark .suggest-widget .monaco-list .monaco-list-row .icon.file,\\n.monaco-editor.hc-black .suggest-widget .monaco-list .monaco-list-row .icon.file { background-image: url(\\\"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiI+PHN0eWxlPi5pY29uLWNhbnZhcy10cmFuc3BhcmVudHtvcGFjaXR5OjA7ZmlsbDojMmQyZDMwfS5pY29uLXZzLW91dHtmaWxsOiMyZDJkMzB9Lmljb24tdnMtYmd7ZmlsbDojYzVjNWM1fS5pY29uLXZzLWZne2ZpbGw6IzJiMjgyZX08L3N0eWxlPjxwYXRoIGNsYXNzPSJpY29uLWNhbnZhcy10cmFuc3BhcmVudCIgZD0iTTE2IDE2SDBWMGgxNnYxNnoiIGlkPSJjYW52YXMiLz48cGF0aCBjbGFzcz0iaWNvbi12cy1vdXQiIGQ9Ik0xNSAxNkgyVjBoOC42MjFMMTUgNC4zNzlWMTZ6IiBpZD0ib3V0bGluZSIvPjxwYXRoIGNsYXNzPSJpY29uLXZzLWZnIiBkPSJNMTMgMTRINFYyaDV2NGg0djh6bS0zLTlWMi4yMDdMMTIuNzkzIDVIMTB6IiBpZD0iaWNvbkZnIi8+PHBhdGggY2xhc3M9Imljb24tdnMtYmciIGQ9Ik0zIDF2MTRoMTFWNC43OTNMMTAuMjA3IDFIM3ptMTAgMTNINFYyaDV2NGg0djh6bS0zLTlWMi4yMDdMMTIuNzkzIDVIMTB6IiBpZD0iaWNvbkJnIi8+PC9zdmc+\\\"); }\\n\\n.monaco-editor.vs-dark .suggest-widget .monaco-list .monaco-list-row .icon.reference,\\n.monaco-editor.hc-black .suggest-widget .monaco-list .monaco-list-row .icon.reference { background-image: url(\\\"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiI+PHN0eWxlPi5pY29uLWNhbnZhcy10cmFuc3BhcmVudHtvcGFjaXR5OjA7ZmlsbDojMmQyZDMwfS5pY29uLXZzLW91dHtmaWxsOiMyZDJkMzB9Lmljb24tdnMtYmd7ZmlsbDojYzVjNWM1fS5pY29uLXZzLWZne2ZpbGw6IzJiMjgyZX0uaWNvbi12cy1hY3Rpb24tYmx1ZXtmaWxsOiM3NWJlZmZ9PC9zdHlsZT48cGF0aCBjbGFzcz0iaWNvbi1jYW52YXMtdHJhbnNwYXJlbnQiIGQ9Ik0xNiAxNkgwVjBoMTZ2MTZ6IiBpZD0iY2FudmFzIi8+PHBhdGggY2xhc3M9Imljb24tdnMtb3V0IiBkPSJNMTQgNC41NTZWMTNjMCAuOTctLjcwMSAyLTIgMkg0Yy0uOTcgMC0yLS43MDEtMi0yVjYuNjQ5QTMuNDk1IDMuNDk1IDAgMCAxIDAgMy41QzAgMS41NyAxLjU3IDAgMy41IDBINXYxaDUuMDYxTDE0IDQuNTU2eiIgaWQ9Im91dGxpbmUiIHN0eWxlPSJkaXNwbGF5OiBub25lOyIvPjxwYXRoIGNsYXNzPSJpY29uLXZzLWJnIiBkPSJNMTMgNXY4cy0uMDM1IDEtMS4wMzUgMWgtOFMzIDE0IDMgMTNWOWgxdjRoOFY2SDkuMzk3bC41MTctLjUyTDkgNC41NzJWM0g3LjQxOUw2LjQxMyAyaDMuMjI4TDEzIDV6IiBpZD0iaWNvbkJnIi8+PHBhdGggY2xhc3M9Imljb24tdnMtZmciIGQ9Ik03LjQxOSAzSDl2MS41NzJMNy40MTkgM3ptMS45NzggM0w2LjQxNiA5SDR2NGg4VjZIOS4zOTd6IiBpZD0iaWNvbkZnIiBzdHlsZT0iZGlzcGxheTogbm9uZTsiLz48cGF0aCBjbGFzcz0iaWNvbi12cy1hY3Rpb24tYmx1ZSIgZD0iTTUuOTg4IDZIMy41YTIuNSAyLjUgMCAxIDEgMC01SDR2MWgtLjVDMi42NzMgMiAyIDIuNjczIDIgMy41UzIuNjczIDUgMy41IDVoMi41MTNMNCAzaDJsMi41IDIuNDg0TDYgOEg0bDEuOTg4LTJ6IiBpZD0iY29sb3JBY3Rpb24iLz48L3N2Zz4=\\\"); }\\n\\n.monaco-editor.vs-dark .suggest-widget .monaco-list .monaco-list-row .icon.snippet,\\n.monaco-editor.hc-black .suggest-widget .monaco-list .monaco-list-row .icon.snippet { background-image: url(\\\"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjxzdmcKICAgeG1sbnM6ZGM9Imh0dHA6Ly9wdXJsLm9yZy9kYy9lbGVtZW50cy8xLjEvIgogICB4bWxuczpjYz0iaHR0cDovL2NyZWF0aXZlY29tbW9ucy5vcmcvbnMjIgogICB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiCiAgIHhtbG5zOnN2Zz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciCiAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgdmVyc2lvbj0iMS4xIgogICBpZD0ic3ZnNDY5NCIKICAgdmlld0JveD0iMCAwIDE2IDE2Ij4KICA8bWV0YWRhdGEKICAgICBpZD0ibWV0YWRhdGE0NzA1Ij4KICAgIDxyZGY6UkRGPgogICAgICA8Y2M6V29yawogICAgICAgICByZGY6YWJvdXQ9IiI+CiAgICAgICAgPGRjOmZvcm1hdD5pbWFnZS9zdmcreG1sPC9kYzpmb3JtY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WQ9InBhdGg0NTMyIgogICAgICAgc3R5bGU9ImZpbGw6IzJiMjgyZSIgLz4KICA8L2c+Cjwvc3ZnPgo=\\\"); }\\n\\n.monaco-editor.vs-dark .suggest-widget .monaco-list .monaco-list-row .icon.customcolor,\\n.monaco-editor.hc-black .suggest-widget .monaco-list .monaco-list-row .icon.customcolor { background-image: none; }\\n\\n.monaco-editor.vs-dark .suggest-widget .monaco-list .monaco-list-row .icon.folder,\\n.monaco-editor.hc-black .suggest-widget .monaco-list .monaco-list-row .icon.folder { background-image: url(\\\"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+PHN0eWxlIHR5cGU9InRleHQvY3NzIj4uaWNvbi1jYW52YXMtdHJhbnNwYXJlbnR7b3BhY2l0eTowO2ZpbGw6I0Y2RjZGNjt9IC5pY29uLXZzLW91dHtvcGFjaXR5OjA7ZmlsbDojRjZGNkY2O30gLmljb24tdnMtZmd7b3BhY2l0eTowO2ZpbGw6I0YwRUZGMTt9IC5pY29uLWZvbGRlcntmaWxsOiNDNUM1QzU7fTwvc3R5bGU+PHBhdGggY2xhc3M9Imljb24tY2FudmFzLXRyYW5zcGFyZW50IiBkPSJNMTYgMTZoLTE2di0xNmgxNnYxNnoiIGlkPSJjYW52YXMiLz48cGF0aCBjbGFzcz0iaWNvbi12cy1vdXQiIGQ9Ik0xNiAyLjV2MTBjMCAuODI3LS42NzMgMS41LTEuNSAxLjVoLTExLjk5NmMtLjgyNyAwLTEuNS0uNjczLTEuNS0xLjV2LThjMC0uODI3LjY3My0xLjUgMS41LTEuNWgyLjg4NmwxLTJoOC4xMWMuODI3IDAgMS41LjY3MyAxLjUgMS41eiIgaWQ9Im91dGxpbmUiLz48cGF0aCBjbGFzcz0iaWNvbi1mb2xkZXIiIGQ9Ik0xNC41IDJoLTcuNDkybC0xIDJoLTMuNTA0Yy0uMjc3IDAtLjUuMjI0LS41LjV2OGMwIC4yNzYuMjIzLjUuNS41aDExLjk5NmMuMjc1IDAgLjUtLjIyNC41LS41di0xMGMwLS4yNzYtLjIyNS0uNS0uNS0uNXptLS40OTYgMmgtNi40OTZsLjUtMWg1Ljk5NnYxeiIgaWQ9Imljb25CZyIvPjxwYXRoIGNsYXNzPSJpY29uLXZzLWZnIiBkPSJNMTQgM3YxaC02LjVsLjUtMWg2eiIgaWQ9Imljb25GZyIvPjwvc3ZnPg==\\\"); }\\n\", \"\"]);\n\n// exports\n","exports = module.exports = require(\"../../../../../../css-loader/lib/css-base.js\")(false);\n// imports\n\n\n// module\nexports.push([module.id, \"/*---------------------------------------------------------------------------------------------\\n * Copyright (c) Microsoft Corporation. All rights reserved.\\n * Licensed under the MIT License. See License.txt in the project root for license information.\\n *--------------------------------------------------------------------------------------------*/\\n.monaco-editor .zone-widget {\\n\\tposition: absolute;\\n\\tz-index: 10;\\n}\\n\\n\\n.monaco-editor .zone-widget .zone-widget-container {\\n\\tborder-top-style: solid;\\n\\tborder-bottom-style: solid;\\n\\tborder-top-width: 0;\\n\\tborder-bottom-width: 0;\\n\\tposition: relative;\\n}\\n\", \"\"]);\n\n// exports\n","exports = module.exports = require(\"../../../../../../../css-loader/lib/css-base.js\")(false);\n// imports\n\n\n// module\nexports.push([module.id, \"/*---------------------------------------------------------------------------------------------\\n * Copyright (c) Microsoft Corporation. All rights reserved.\\n * Licensed under the MIT License. See License.txt in the project root for license information.\\n *--------------------------------------------------------------------------------------------*/\\n\\n.monaco-editor .accessibilityHelpWidget {\\n\\tpadding: 10px;\\n\\tvertical-align: middle;\\n\\toverflow: scroll;\\n}\", \"\"]);\n\n// exports\n","exports = module.exports = require(\"../../../../../../../css-loader/lib/css-base.js\")(false);\n// imports\n\n\n// module\nexports.push([module.id, \"/*---------------------------------------------------------------------------------------------\\n * Copyright (c) Microsoft Corporation. All rights reserved.\\n * Licensed under the MIT License. See License.txt in the project root for license information.\\n *--------------------------------------------------------------------------------------------*/\\n\\n.monaco-editor .iPadShowKeyboard {\\n\\twidth: 58px;\\n\\tmin-width: 0;\\n\\theight: 36px;\\n\\tmin-height: 0;\\n\\tmargin: 0;\\n\\tpadding: 0;\\n\\tposition: absolute;\\n\\tresize: none;\\n\\toverflow: hidden;\\n\\tbackground: url(\\\"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI1OCIgaGVpZ2h0PSIzNiI+PHBhdGggZmlsbD0iI0YwRUZGMSIgZD0iTTU0IDMydi0yOGgtNTB2MjhoNTB6bS0xNi0yaC0xOHYtNmgxOHY2em02IDBoLTR2LTZoNHY2em04IDBoLTZ2LTZoNnY2em0tNC0yNGg0djRoLTR2LTR6bTAgNmg0djRoLTR2LTR6bTAgNmg0djRoLTR2LTR6bS02LTEyaDR2NGgtNHYtNHptMCA2aDR2NGgtNHYtNHptMCA2aDR2NGgtNHYtNHptLTYtMTJoNHY0aC00di00em0wIDZoNHY0aC00di00em0wIDZoNHY0aC00di00em0tNi0xMmg0djRoLTR2LTR6bTAgNmg0djRoLTR2LTR6bTAgNmg0djRoLTR2LTR6bS02LTEyaDR2NGgtNHYtNHptMCA2aDR2NGgtNHYtNHptMCA2aDR2NGgtNHYtNHptLTYtMTJoNHY0aC00di00em0wIDZoNHY0aC00di00em0wIDZoNHY0aC00di00em0wIDEyaC00di02aDR2NnptLTYtMjRoNHY0aC00di00em0wIDZoNHY0aC00di00em0wIDZoNHY0aC00di00em0tNi0xMmg0djRoLTR2LTR6bTAgNmg0djRoLTR2LTR6bTAgNmg0djRoLTR2LTR6bTAgNmg2djZoLTZ2LTZ6Ii8+PHBhdGggZmlsbD0iIzQyNDI0MiIgZD0iTTU1LjMzNiAwaC01My4yODVjLTEuMzQ0IDAtMi4wNTEuNjU2LTIuMDUxIDJ2MzJjMCAxLjM0NC43MDcgMS45NjUgMi4wNTEgMS45NjVsNTMuOTQ5LjAzNWMxLjM0NCAwIDItLjY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GhlaWdodD0iNiIvPjxyZWN0IHg9IjIwIiB5PSIyNCIgZmlsbD0iIzQyNDI0MiIgd2lkdGg9IjE4IiBoZWlnaHQ9IjYiLz48cmVjdCB4PSIxNCIgeT0iMjQiIGZpbGw9IiM0MjQyNDIiIHdpZHRoPSI0IiBoZWlnaHQ9IjYiLz48cmVjdCB4PSI0MCIgeT0iMjQiIGZpbGw9IiM0MjQyNDIiIHdpZHRoPSI0IiBoZWlnaHQ9IjYiLz48L3N2Zz4=\\\") center center no-repeat;\\n\\tborder: 4px solid #F6F6F6;\\n\\tborder-radius: 4px;\\n}\\n\\n.monaco-editor.vs-dark .iPadShowKeyboard {\\n\\tbackground: url(\\\"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI1OCIgaGVpZ2h0PSIzNiI+PHBhdGggZmlsbD0iIzJCMjgyRSIgZD0iTTU0IDMydi0yOGgtNTB2MjhoNTB6bS0xNi0yaC0xOHYtNmgxOHY2em02IDBoLTR2LTZoNHY2em04IDBoLTZ2LTZoNnY2em0tNC0yNGg0djRoLTR2LTR6bTAgNmg0djRoLTR2LTR6bTAgNmg0djRoLTR2LTR6bS02LTEyaDR2NGgtNHYtNHptMCA2aDR2NGgtNHYtNHptMCA2aDR2NGgtNHYtNHptLTYtMTJoNHY0aC00di00em0wIDZoNHY0aC00di00em0wIDZoNHY0aC00di00em0tNi0xMmg0djRoLTR2LTR6bTAgNmg0djRoLTR2LTR6bTAgNmg0djRoLTR2LTR6bS02LTEyaDR2NGgtNHYtNHptMCA2aDR2NGgtNHYtNHptMCA2aDR2NGgtNHYtNHptLTYtMTJoNHY0aC00di00em0wIDZoNHY0aC00di00em0wIDZoNHY0aC00di00em0wIDEyaC00di02aDR2NnptLTYtMjRoNHY0aC00di00em0wIDZoNHY0aC00di00em0wIDZoNHY0aC00di00em0tNi0xMmg0djRoLTR2LTR6bTAgNmg0djRoLTR2LTR6bTAgNmg0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I0OCIgeT0iMTgiIGZpbGw9IiNDNUM1QzUiIHdpZHRoPSI0IiBoZWlnaHQ9IjQiLz48cmVjdCB4PSI2IiB5PSIyNCIgZmlsbD0iI0M1QzVDNSIgd2lkdGg9IjYiIGhlaWdodD0iNiIvPjxyZWN0IHg9IjQ2IiB5PSIyNCIgZmlsbD0iI0M1QzVDNSIgd2lkdGg9IjYiIGhlaWdodD0iNiIvPjxyZWN0IHg9IjIwIiB5PSIyNCIgZmlsbD0iI0M1QzVDNSIgd2lkdGg9IjE4IiBoZWlnaHQ9IjYiLz48cmVjdCB4PSIxNCIgeT0iMjQiIGZpbGw9IiNDNUM1QzUiIHdpZHRoPSI0IiBoZWlnaHQ9IjYiLz48cmVjdCB4PSI0MCIgeT0iMjQiIGZpbGw9IiNDNUM1QzUiIHdpZHRoPSI0IiBoZWlnaHQ9IjYiLz48L3N2Zz4=\\\") center center no-repeat;\\n\\tborder: 4px solid #252526;\\n}\", \"\"]);\n\n// exports\n","exports = module.exports = require(\"../../../../../../../css-loader/lib/css-base.js\")(false);\n// imports\n\n\n// module\nexports.push([module.id, \"/*---------------------------------------------------------------------------------------------\\n * Copyright (c) Microsoft Corporation. All rights reserved.\\n * Licensed under the MIT License. See License.txt in the project root for license information.\\n *--------------------------------------------------------------------------------------------*/\\n\\n.monaco-editor .tokens-inspect-widget {\\n\\tz-index: 50;\\n\\t-webkit-user-select: text;\\n\\t-ms-user-select: text;\\n\\t-khtml-user-select: text;\\n\\t-moz-user-select: text;\\n\\t-o-user-select: text;\\n\\tuser-select: text;\\n\\tpadding: 10px;\\n}\\n\\n.tokens-inspect-separator {\\n\\theight: 1px;\\n\\tborder: 0;\\n}\\n\\n.monaco-editor .tokens-inspect-widget .tm-token {\\n\\tfont-family: monospace;\\n}\\n\\n.monaco-editor .tokens-inspect-widget .tm-token-length {\\n\\tfont-weight: normal;\\n\\tfont-size: 60%;\\n\\tfloat: right;\\n}\\n\\n.monaco-editor .tokens-inspect-widget .tm-metadata-table {\\n\\twidth: 100%;\\n}\\n\\n.monaco-editor .tokens-inspect-widget .tm-metadata-value {\\n\\tfont-family: monospace;\\n\\ttext-align: right;\\n}\\n\\n.monaco-editor .tokens-inspect-widget .tm-token-type {\\n\\tfont-family: monospace;\\n}\\n\", \"\"]);\n\n// exports\n","exports = module.exports = require(\"../../../../../../../css-loader/lib/css-base.js\")(false);\n// imports\n\n\n// module\nexports.push([module.id, \"/*---------------------------------------------------------------------------------------------\\n * Copyright (c) Microsoft Corporation. All rights reserved.\\n * Licensed under the MIT License. See License.txt in the project root for license information.\\n *--------------------------------------------------------------------------------------------*/\\n\\n.monaco-quick-open-widget {\\n\\tfont-size: 13px;\\n}\", \"\"]);\n\n// exports\n","exports = module.exports = require(\"../../../../../../../css-loader/lib/css-base.js\")(false);\n// imports\n\n\n// module\nexports.push([module.id, \"/*---------------------------------------------------------------------------------------------\\n * Copyright (c) Microsoft Corporation. All rights reserved.\\n * Licensed under the MIT License. See License.txt in the project root for license information.\\n *--------------------------------------------------------------------------------------------*/\\n\\n.monaco-quick-open-widget {\\n\\tfont-size: 13px;\\n}\\n\\n.monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon,\\n.vs-dark .monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon {\\n\\tbackground-image: url(\\\"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIzMDAiIGhlaWdodD0iNDAiPjxwYXRoIGQ9Ik0yODguNDgzIDMzYy0uNzcyIDAtMS40OTctLjEyMy0yLjE1My0uMzY1LS42NzgtLjI1My0xLjI3LS42MTctMS43Ni0xLjA4NC0uNS0uNDc1LS44OTItMS4wNDktMS4xNjMtMS43MDQtLjI3LS42NDQtLjQwNy0xLjM3MS0uNDA3LTIuMTU4IDAtLjUxNy4wNjEtMS4wMTguMTc4LTEuNDkuMTE2LS40Ny4yOS0uOTI1LjUxNi0xLjM0OC4yMjU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uMTg1IiBmaWxsPSIjMkQyRDJEIi8+PHBvbHlnb24gcG9pbnRzPSI0LDI4Ljc3NyA3LDMwLjY4MyA3LDMzLjQ5OCA0LDMxLjU5MyIgZmlsbD0iIzJEMkQyRCIvPjxwb2x5Z29uIHBvaW50cz0iOCwzMy40OTggOCwzMC42ODMgMTEsMjguNzc3IDExLDMxLjU5MyIgZmlsbD0iIzJEMkQyRCIvPjxwb2x5Z29uIHBvaW50cz0iMiw3LjMwOCAyLDEyLjY5MiA3LjIwOSwxNiA3Ljc5MSwxNiAxMywxMi42OTIgMTMsNy4zMDggNy43OTEsNCA3LjIwOSw0IiBmaWxsPSIjRjNGM0YzIi8+PHBhdGggZD0iTTcuNSA1bC00LjUgMi44NTd2NC4yODVsNC41IDIuODU4IDQuNS0yLjg1N3YtNC4yODZsLTQuNS0yLjg1N3ptLS41IDguNDk4bC0zLTEuOTA1di0yLjgxNmwzIDEuOTA1djIuODE2em0tMi4zNTgtNS40OThsMi44NTgtMS44MTUgMi44NTggMS44MTUtMi44NTggMS44MTUtMi44NTgtMS44MTV6bTYuMzU4IDMuNTkzbC0zIDEuOTA1di0yLjgxNWwzLTEuOTA1djIuODE1eiIgZmlsbD0iIzY1MkQ5MCIvPjxwb2x5Z29uIHBvaW50cz0iMTAuMzU4LDggNy41LDkuODE1IDQuNjQyLDggNy41LDYuMTg1IiBmaWxsPSIjRjBFRkYxIi8+PHBvbHlnb24gcG9pbnRzPSI0LDguNzc3IDcsMTAuNjgzIDcsMTMuNDk4IDQsMTEuNTkzIiBmaWxsPSIjRjBFRkYxIi8+PHBvbHlnb24gcG9pbnRzPSI4LDEzLjQ5OCA4LDEwLjY4MyAxMSw4Ljc3NyAxMSwxMS41OTMiIGZpbGw9IiNGMEVGRjEiLz48L3N2Zz4=\\\");\\n\\tbackground-repeat: no-repeat;\\n}\\n\\n.monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.method,\\n.monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.function,\\n.monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.constructor\\t\\t{ background-position: 0 -4px; }\\n.monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.field,\\n.monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.variable \\t\\t\\t{ background-position: -22px -4px; }\\n.monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.class \\t\\t\\t\\t{ background-position: -43px -3px; }\\n.monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.interface \\t\\t\\t{ background-position: -63px -4px; }\\n.monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.module \\t\\t\\t{ background-position: -82px -4px; }\\n.monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.property \\t\\t\\t{ background-position: -102px -3px; }\\n.monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.enum\\t\\t \\t\\t{ background-position: -122px -3px; }\\n.monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.rule\\t\\t \\t\\t{ background-position: -242px -4px; }\\n.monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.file\\t\\t \\t\\t{ background-position: -262px -4px; }\\n\\n.vs-dark .monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.method,\\n.vs-dark .monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.function,\\n.vs-dark .monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.constructor \\t{ background-position: 0 -24px; }\\n.vs-dark .monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.field,\\n.vs-dark .monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.variable \\t\\t{ background-position: -22px -24px; }\\n.vs-dark .monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.class \\t\\t{ background-position: -43px -23px; }\\n.vs-dark .monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.interface \\t{ background-position: -63px -24px; }\\n.vs-dark .monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.module \\t\\t{ background-position: -82px -24px; }\\n.vs-dark .monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.property \\t\\t{ background-position: -102px -23px; }\\n.vs-dark .monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.enum\\t\\t \\t{ background-position: -122px -23px; }\\n.vs-dark .monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.rule\\t\\t \\t{ background-position: -242px -24px; }\\n.vs-dark .monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.file\\t\\t \\t{ background-position: -262px -24px; }\\n\\n.hc-black .monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon {\\n\\tbackground: none;\\n\\tdisplay: inline;\\n}\\n\\n.hc-black .monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon:before {\\n\\theight: 16px;\\n\\twidth: 16px;\\n\\tdisplay: inline-block;\\n}\\n\\n.hc-black .monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.method:before,\\n.hc-black .monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.function:before,\\n.hc-black .monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.constructor:before {\\n\\tcontent: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+PHBhdGggZmlsbD0iI0IxODBENyIgZD0iTTUuNSAzbC00LjUgMi44NTd2NC4yODVsNC41IDIuODU4IDQuNS0yLjg1N3YtNC4yODZsLTQuNS0yLjg1N3ptLS41IDguNDk4bC0zLTEuOTA1di0yLjgxNmwzIDEuOTA1djIuODE2em0tMi4zNTgtNS40OThsMi44NTgtMS44MTUgMi44NTggMS44MTUtMi44NTggMS44MTUtMi44NTgtMS44MTV6bTYuMzU4IDMuNTkzbC0zIDEuOTA1di0yLjgxNWwzLTEuOTA1djIuODE1eiIvPjwvc3ZnPg==);\\n\\tmargin-left: 2px;\\n}\\n\\n.hc-black .monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.field:before,\\n.hc-black .monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.variable:before {\\n\\tcontent: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+PHBhdGggZmlsbD0iIzc1QkVGRiIgZD0iTTEgNnY0bDQgMiA2LTN2LTRsLTQtMi02IDN6bTQgMWwtMi0xIDQtMiAyIDEtNCAyeiIvPjwvc3ZnPg==);\\n\\tmargin-left: 2px;\\n}\\n\\n.hc-black .monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.class:before {\\n\\tcontent: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+PHBvbHlnb24gZmlsbD0iI0U4QUI1MyIgcG9pbnRzPSIxMS45OTgsMTEuMDAyIDksMTEgOSw3IDExLDcgMTAsOCAxMiwxMCAxNSw3IDEzLDUgMTIsNiA3LDYgOSw0IDYsMSAxLDYgNCw5IDYsNyA4LDcgOCwxMiAxMSwxMiAxMCwxMyAxMiwxNSAxNSwxMiAxMywxMCIvPjwvc3ZnPg==);\\n}\\n\\n.hc-black .monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.interface:before {\\n\\tcontent: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+PHBhdGggZmlsbD0iIzc1QkVGRiIgZD0iTTExLjUgNGMtMS43NTkgMC0zLjIwNCAxLjMwOC0zLjQ0OSAzaC0zLjEyMmMtLjIyMy0uODYxLS45OTgtMS41LTEuOTI5LTEuNS0xLjEwNCAwLTIgLjg5NS0yIDIgMCAxLjEwNC44OTYgMiAyIDIgLjkzMSAwIDEuNzA2LS42MzkgMS45MjktMS41aDMuMTIyYy4yNDUgMS42OTEgMS42OSAzIDMuNDQ5IDMgMS45MyAwIDMuNS0xLjU3IDMuNS0zLjUgMC0xLjkzMS0xLjU3LTMuNS0zLjUtMy41em0wIDVjLS44MjcgMC0xLjUtLjY3NC0xLjUtMS41IDAtLjgyOC42NzMtMS41IDEuNS0xLjVzMS41LjY3MiAxLjUgMS41YzAgLjgyNi0uNjczIDEuNS0xLjUgMS41eiIvPjwvc3ZnPg==);\\n}\\n\\n.hc-black .monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.module:before {\\n\\tcontent: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+PHBhdGggZmlsbD0iI0M1QzVDNSIgZD0iTTkgMTF2LTFjMC0uODM0LjQ5Ni0xLjczOCAxLTItLjUwNC0uMjctMS0xLjE2OC0xLTJ2LTFjMC0uODQtLjU4NC0xLTEtMXYtMWMyLjA4MyAwIDIgMS4xNjYgMiAydjFjMCAuOTY5LjcwMy45OCAxIDF2MmMtLjMyMi4wMi0xIC4wNTMtMSAxdjFjMCAuODM0LjA4MyAyLTIgMnYtMWMuODMzIDAgMS0xIDEtMXptLTYgMHYtMWMwLS44MzQtLjQ5Ni0xLjczOC0xLTIgLjUwNC0uMjcgMS0xLjE2OCAxLTJ2LTFjMC0uODQuNTg0LTEgMS0xdi0xYy0yLjA4MyAwLTIgMS4xNjYtMiAydjFjMCAuOTY5LS43MDMuOTgtMSAxdjJjLjMyMi4wMiAxIC4wNTMgMSAxdjFjMCAuODM0LS4wODMgMiAyIDJ2LTFjLS44MzMgMC0xLTEtMS0xeiIvPjwvc3ZnPg==);\\n\\tmargin-left: 2px;\\n}\\n\\n.hc-black .monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.property:before\\t{\\n\\tcontent: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+PHBhdGggZmlsbD0iI0M1QzVDNSIgZD0iTTEyLjA5IDQuMzU5bC0yLjY0MSAyLjY0MS0yLTIgMi42NDEtMi42NDFjLS41MDItLjIyNi0xLjA1NS0uMzU5LTEuNjQxLS4zNTktMi4yMDkgMC00IDEuNzkxLTQgNCAwIC41ODYuMTMzIDEuMTM5LjM1OSAxLjY0bC0zLjM1OSAzLjM2cy0xIDEgMCAyaDJsMy4zNTktMy4zNmMuNTAzLjIyNiAxLjA1NS4zNiAxLjY0MS4zNiAyLjIwOSAwIDQtMS43OTEgNC00IDAtLjU4Ni0uMTMzLTEuMTM5LS4zNTktMS42NDF6Ii8+PC9zdmc+);\\n\\tmargin-left: 1px;\\n}\\n\\n.hc-black .monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.value:before,\\n.hc-black .monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.enum:before\\t{\\n\\tcontent: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+PGcgZmlsbD0iIzc1QkVGRiI+PHBhdGggZD0iTTEyIDNoLTRsLTEgMXYyaDV2MWgtMnYxaDJsMS0xdi0zbC0xLTF6bTAgMmgtNHYtMWg0djF6TTMgMTJoNnYtNWgtNnY1em0xLTNoNHYxaC00di0xeiIvPjwvZz48L3N2Zz4=);\\n}\\n\\n.hc-black .monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.rule:before {\\n\\tcontent: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMiIgaGVpZ2h0PSIxMiI+PHBhdGggZmlsbD0iI0M1QzVDNSIgZD0iTTEwIDVoLTh2LTJoOHYyem0wIDFoLTZ2MWg2di0xem0wIDJoLTZ2MWg2di0xeiIvPjwvc3ZnPg==);\\n}\\n\\n.hc-black .monaco-quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.file:before {\\n\\tcontent: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+PHBhdGggZmlsbD0iI0M1QzVDNSIgZD0iTTkuNjc2IDJoLTYuNjc2djEyaDEwdi05bC0zLjMyNC0zem0yLjMyNCAxMWgtOHYtMTBoNXYzaDN2N3oiLz48L3N2Zz4=);\\n}\", \"\"]);\n\n// exports\n","exports = module.exports = require(\"../../../../../../css-loader/lib/css-base.js\")(false);\n// imports\n\n\n// module\nexports.push([module.id, \"/*---------------------------------------------------------------------------------------------\\n * Copyright (c) Microsoft Corporation. All rights reserved.\\n * Licensed under the MIT License. See License.txt in the project root for license information.\\n *--------------------------------------------------------------------------------------------*/\\n\\n\\n/* Default standalone editor font */\\n.monaco-editor {\\n\\tfont-family: -apple-system, BlinkMacSystemFont, \\\"Segoe WPC\\\", \\\"Segoe UI\\\", \\\"HelveticaNeue-Light\\\", \\\"Ubuntu\\\", \\\"Droid Sans\\\", sans-serif;\\n}\\n\\n.monaco-menu .monaco-action-bar.vertical .action-item .action-menu-item:focus .action-label {\\n\\tcolor: #0059AC;\\n\\tstroke-width: 1.2px;\\n\\ttext-shadow: 0px 0px 0.15px #0059AC;\\n}\\n\\n.monaco-editor.vs-dark .monaco-menu .monaco-action-bar.vertical .action-menu-item:focus .action-label,\\n.monaco-editor.hc-black .monaco-menu .monaco-action-bar.vertical .action-menu-item:focus .action-label {\\n\\tcolor: #ACDDFF;\\n\\tstroke-width: 1.2px;\\n\\ttext-shadow: 0px 0px 0.15px #ACDDFF;\\n}\\n\\n.monaco-editor-hover p {\\n\\tmargin: 0;\\n}\\n\\n/* The hc-black theme is already high contrast optimized */\\n.monaco-editor.hc-black {\\n\\t-ms-high-contrast-adjust: none;\\n}\\n/* In case the browser goes into high contrast mode and the editor is not configured with the hc-black theme */\\n@media screen and (-ms-high-contrast:active) {\\n\\n\\t/* current line highlight */\\n\\t.monaco-editor.vs .view-overlays .current-line,\\n\\t.monaco-editor.vs-dark .view-overlays .current-line {\\n\\t\\tborder-color: windowtext !important;\\n\\t\\tborder-left: 0;\\n\\t\\tborder-right: 0;\\n\\t}\\n\\n\\t/* view cursors */\\n\\t.monaco-editor.vs .cursor,\\n\\t.monaco-editor.vs-dark .cursor {\\n\\t\\tbackground-color: windowtext !important;\\n\\t}\\n\\t/* dnd target */\\n\\t.monaco-editor.vs .dnd-target,\\n\\t.monaco-editor.vs-dark .dnd-target {\\n\\t\\tborder-color: windowtext !important;\\n\\t}\\n\\n\\t/* selected text background */\\n\\t.monaco-editor.vs .selected-text,\\n\\t.monaco-editor.vs-dark .selected-text {\\n\\t\\tbackground-color: highlight !important;\\n\\t}\\n\\n\\t/* allow the text to have a transparent background. */\\n\\t.monaco-editor.vs .view-line,\\n\\t.monaco-editor.vs-dark .view-line {\\n\\t\\t-ms-high-contrast-adjust: none;\\n\\t}\\n\\n\\t/* text color */\\n\\t.monaco-editor.vs .view-line span,\\n\\t.monaco-editor.vs-dark .view-line span {\\n\\t\\tcolor: windowtext !important;\\n\\t}\\n\\t/* selected text color */\\n\\t.monaco-editor.vs .view-line span.inline-selected-text,\\n\\t.monaco-editor.vs-dark .view-line span.inline-selected-text {\\n\\t\\tcolor: highlighttext !important;\\n\\t}\\n\\n\\t/* allow decorations */\\n\\t.monaco-editor.vs .view-overlays,\\n\\t.monaco-editor.vs-dark .view-overlays {\\n\\t\\t-ms-high-contrast-adjust: none;\\n\\t}\\n\\n\\t/* various decorations */\\n\\t.monaco-editor.vs .selectionHighlight,\\n\\t.monaco-editor.vs-dark .selectionHighlight,\\n\\t.monaco-editor.vs .wordHighlight,\\n\\t.monaco-editor.vs-dark .wordHighlight,\\n\\t.monaco-editor.vs .wordHighlightStrong,\\n\\t.monaco-editor.vs-dark .wordHighlightStrong,\\n\\t.monaco-editor.vs .reference-decoration,\\n\\t.monaco-editor.vs-dark .reference-decoration {\\n\\t\\tborder: 2px dotted highlight !important;\\n\\t\\tbackground: transparent !important;\\n\\t\\tbox-sizing: border-box;\\n\\t}\\n\\t.monaco-editor.vs .rangeHighlight,\\n\\t.monaco-editor.vs-dark .rangeHighlight {\\n\\t\\tbackground: transparent !important;\\n\\t\\tborder: 1px dotted activeborder !important;\\n\\t\\tbox-sizing: border-box;\\n\\t}\\n\\t.monaco-editor.vs .bracket-match,\\n\\t.monaco-editor.vs-dark .bracket-match {\\n\\t\\tborder-color: windowtext !important;\\n\\t\\tbackground: transparent !important;\\n\\t}\\n\\n\\t/* find widget */\\n\\t.monaco-editor.vs .findMatch,\\n\\t.monaco-editor.vs-dark .findMatch,\\n\\t.monaco-editor.vs .currentFindMatch,\\n\\t.monaco-editor.vs-dark .currentFindMatch {\\n\\t\\tborder: 2px dotted activeborder !important;\\n\\t\\tbackground: transparent !important;\\n\\t\\tbox-sizing: border-box;\\n\\t}\\n\\t.monaco-editor.vs .find-widget,\\n\\t.monaco-editor.vs-dark .find-widget {\\n\\t\\tborder: 1px solid windowtext;\\n\\t}\\n\\n\\t/* list - used by suggest widget */\\n\\t.monaco-editor.vs .monaco-list .monaco-list-row,\\n\\t.monaco-editor.vs-dark .monaco-list .monaco-list-row {\\n\\t\\t-ms-high-contrast-adjust: none;\\n\\t\\tcolor: windowtext !important;\\n\\t}\\n\\t.monaco-editor.vs .monaco-list .monaco-list-row.focused,\\n\\t.monaco-editor.vs-dark .monaco-list .monaco-list-row.focused {\\n\\t\\tcolor: highlighttext !important;\\n\\t\\tbackground-color: highlight !important;\\n\\t}\\n\\t.monaco-editor.vs .monaco-list .monaco-list-row:hover,\\n\\t.monaco-editor.vs-dark .monaco-list .monaco-list-row:hover {\\n\\t\\tbackground: transparent !important;\\n\\t\\tborder: 1px solid highlight;\\n\\t\\tbox-sizing: border-box;\\n\\t}\\n\\n\\t/* tree */\\n\\t.monaco-editor.vs .monaco-tree .monaco-tree-row,\\n\\t.monaco-editor.vs-dark .monaco-tree .monaco-tree-row {\\n\\t\\t-ms-high-contrast-adjust: none;\\n\\t\\tcolor: windowtext !important;\\n\\t}\\n\\t.monaco-editor.vs .monaco-tree .monaco-tree-row.selected,\\n\\t.monaco-editor.vs-dark .monaco-tree .monaco-tree-row.selected,\\n\\t.monaco-editor.vs .monaco-tree .monaco-tree-row.focused,\\n\\t.monaco-editor.vs-dark .monaco-tree .monaco-tree-row.focused {\\n\\t\\tcolor: highlighttext !important;\\n\\t\\tbackground-color: highlight !important;\\n\\t}\\n\\t.monaco-editor.vs .monaco-tree .monaco-tree-row:hover,\\n\\t.monaco-editor.vs-dark .monaco-tree .monaco-tree-row:hover {\\n\\t\\tbackground: transparent !important;\\n\\t\\tborder: 1px solid highlight;\\n\\t\\tbox-sizing: border-box;\\n\\t}\\n\\n\\t/* scrollbars */\\n\\t.monaco-editor.vs .monaco-scrollable-element > .scrollbar,\\n\\t.monaco-editor.vs-dark .monaco-scrollable-element > .scrollbar {\\n\\t\\t-ms-high-contrast-adjust: none;\\n\\t\\tbackground: background !important;\\n\\t\\tborder: 1px solid windowtext;\\n\\t\\tbox-sizing: border-box;\\n\\t}\\n\\t.monaco-editor.vs .monaco-scrollable-element > .scrollbar > .slider,\\n\\t.monaco-editor.vs-dark .monaco-scrollable-element > .scrollbar > .slider {\\n\\t\\tbackground: windowtext !important;\\n\\t}\\n\\t.monaco-editor.vs .monaco-scrollable-element > .scrollbar > .slider:hover,\\n\\t.monaco-editor.vs-dark .monaco-scrollable-element > .scrollbar > .slider:hover {\\n\\t\\tbackground: highlight !important;\\n\\t}\\n\\t.monaco-editor.vs .monaco-scrollable-element > .scrollbar > .slider.active,\\n\\t.monaco-editor.vs-dark .monaco-scrollable-element > .scrollbar > .slider.active {\\n\\t\\tbackground: highlight !important;\\n\\t}\\n\\n\\t/* overview ruler */\\n\\t.monaco-editor.vs .decorationsOverviewRuler,\\n\\t.monaco-editor.vs-dark .decorationsOverviewRuler {\\n\\t\\topacity: 0;\\n\\t}\\n\\n\\t/* minimap */\\n\\t.monaco-editor.vs .minimap,\\n\\t.monaco-editor.vs-dark .minimap {\\n\\t\\tdisplay: none;\\n\\t}\\n\\n\\t/* squiggles */\\n\\t.monaco-editor.vs .squiggly-d-error,\\n\\t.monaco-editor.vs-dark .squiggly-d-error {\\n\\t\\tbackground: transparent !important;\\n\\t\\tborder-bottom: 4px double #E47777;\\n\\t}\\n\\t.monaco-editor.vs .squiggly-c-warning,\\n\\t.monaco-editor.vs-dark .squiggly-c-warning {\\n\\t\\tborder-bottom: 4px double #71B771;\\n\\t}\\n\\t.monaco-editor.vs .squiggly-b-info,\\n\\t.monaco-editor.vs-dark .squiggly-b-info {\\n\\t\\tborder-bottom: 4px double #71B771;\\n\\t}\\n\\t.monaco-editor.vs .squiggly-a-hint,\\n\\t.monaco-editor.vs-dark .squiggly-a-hint {\\n\\t\\tborder-bottom: 4px double #6c6c6c;\\n\\t}\\n\\n\\t/* contextmenu */\\n\\t.monaco-editor.vs .monaco-menu .monaco-action-bar.vertical .action-menu-item:focus .action-label,\\n\\t.monaco-editor.vs-dark .monaco-menu .monaco-action-bar.vertical .action-menu-item:focus .action-label {\\n\\t\\t-ms-high-contrast-adjust: none;\\n\\t\\tcolor: highlighttext !important;\\n\\t\\tbackground-color: highlight !important;\\n\\t}\\n\\t.monaco-editor.vs .monaco-menu .monaco-action-bar.vertical .action-menu-item:hover .action-label,\\n\\t.monaco-editor.vs-dark .monaco-menu .monaco-action-bar.vertical .action-menu-item:hover .action-label {\\n\\t\\t-ms-high-contrast-adjust: none;\\n\\t\\tbackground: transparent !important;\\n\\t\\tborder: 1px solid highlight;\\n\\t\\tbox-sizing: border-box;\\n\\t}\\n\\n\\t/* diff editor */\\n\\t.monaco-diff-editor.vs .diffOverviewRuler,\\n\\t.monaco-diff-editor.vs-dark .diffOverviewRuler {\\n\\t\\tdisplay: none;\\n\\t}\\n\\t.monaco-editor.vs .line-insert,\\n\\t.monaco-editor.vs-dark .line-insert,\\n\\t.monaco-editor.vs .line-delete,\\n\\t.monaco-editor.vs-dark .line-delete {\\n\\t\\tbackground: transparent !important;\\n\\t\\tborder: 1px solid highlight !important;\\n\\t\\tbox-sizing: border-box;\\n\\t}\\n\\t.monaco-editor.vs .char-insert,\\n\\t.monaco-editor.vs-dark .char-insert,\\n\\t.monaco-editor.vs .char-delete,\\n\\t.monaco-editor.vs-dark .char-delete {\\n\\t\\tbackground: transparent !important;\\n\\t}\\n}\\n\\n/*.monaco-editor.vs [tabindex=\\\"0\\\"]:focus {\\n\\toutline: 1px solid rgba(0, 122, 204, 0.4);\\n\\toutline-offset: -1px;\\n\\topacity: 1 !important;\\n}\\n\\n.monaco-editor.vs-dark [tabindex=\\\"0\\\"]:focus {\\n\\toutline: 1px solid rgba(14, 99, 156, 0.6);\\n\\toutline-offset: -1px;\\n\\topacity: 1 !important;\\n}*/\\n\", \"\"]);\n\n// exports\n","exports = module.exports = require(\"../../../../../../css-loader/lib/css-base.js\")(false);\n// imports\n\n\n// module\nexports.push([module.id, \"/*---------------------------------------------------------------------------------------------\\n * Copyright (c) Microsoft Corporation. All rights reserved.\\n * Licensed under the MIT License. See License.txt in the project root for license information.\\n *--------------------------------------------------------------------------------------------*/\\n\\n.context-view .monaco-menu {\\n\\tmin-width: 130px;\\n}\\n\", \"\"]);\n\n// exports\n","import {Server, WebSocket} from 'mock-socket';\nimport {\n createConnection,\n MonacoLanguageClient,\n MonacoServices,\n} from 'monaco-languageclient';\nimport {initVimMode} from 'monaco-vim';\nimport {listen, MessageConnection} from 'vscode-ws-jsonrpc';\n\nimport {createSorbet} from './sorbet';\n\nimport {register} from './ruby';\nimport {typecheck} from './output';\n// @ts-ignore\nimport {DefaultRubyVM} from '@ruby/wasm-wasi/dist/browser';\n// import {File, WASI, OpenFile, ConsoleStdout} from '@bjorn3/browser_wasi_shim';\nregister();\n\nconst element = document.getElementById('editor')!;\nelement.addEventListener('click', (e) => {\n // Markdown links in editor tooltips use `#` as their target and use JS to open the actual link target,\n // so clicking them will clear window.location.hash and thus the editor.\n // Prevent that from happening.\n e.preventDefault();\n});\n\n// Remove leading '#'\nconst hash = window.location.hash.slice(1);\nconst initialValue = hash\n ? decodeURIComponent(hash)\n : `# typed: true\nextend T::Sig\n\nsig {params(x: Integer).void}\ndef foo(x)\n puts(x + 1)\nend\n\nffoo(0)\nfoo(\"not an int\")`;\n\n// create Monaco editor\nconst model = monaco.editor.createModel(\n initialValue,\n 'ruby',\n monaco.Uri.parse('inmemory://model/default')\n);\nconst editor = monaco.editor.create(element, {\n model: model,\n theme: 'vs-dark',\n scrollBeyondLastLine: false,\n formatOnType: true,\n autoIndent: true,\n fontSize: 16,\n minimap: {enabled: false},\n automaticLayout: true,\n lineNumbersMinChars: 0,\n wordBasedSuggestions: false,\n acceptSuggestionOnCommitCharacter: false,\n});\n(window as any).editor = editor; // Useful for prototyping in dev tools\neditor.focus();\n\nconst useVimKeybindings = () => {\n const stored = window.localStorage.getItem('useVimKeybindings');\n if (stored == null) {\n return null;\n } else {\n return JSON.parse(stored) as boolean;\n }\n};\n\nlet vimMode: any = null;\nconst toggleVimKeybindings = () => {\n const current = useVimKeybindings();\n window.localStorage.setItem('useVimKeybindings', '' + !current);\n // document.querySelector('html').classList.toggle('stripe-light');\n if (current) {\n vimMode.dispose();\n } else {\n vimMode = initVimMode(editor, document.getElementById('editor-statusbar'));\n }\n};\n\n// First load\nconst initialUseVimKeybindings = useVimKeybindings();\nif (initialUseVimKeybindings === true) {\n vimMode = initVimMode(editor, document.getElementById('editor-statusbar'));\n} else {\n window.localStorage.setItem('useVimKeybindings', 'false');\n}\n\ndocument.getElementById('vim-button')!.addEventListener('click', (ev) => {\n ev.preventDefault();\n toggleVimKeybindings();\n});\n\nwindow.addEventListener('hashchange', () => {\n // Remove leading '#'\n const hash = window.location.hash.substr(1);\n const ruby = decodeURIComponent(hash);\n if (editor.getValue() !== ruby) {\n editor.setValue(ruby);\n }\n});\n\nconst createIssueButton = document.getElementById('create-issue-from-example');\ncreateIssueButton!.addEventListener('click', function(ev) {\n const template = `\n#### Input\n\n[→ View on sorbet.run](${window.location.href})\n\n\\`\\`\\`ruby\n${editor.getValue()}\n\\`\\`\\`\n\n#### Observed output\n\n\\`\\`\\`\n${(document.querySelector('#output') as HTMLPreElement).innerText}\n\\`\\`\\`\n\n\n\n#### Expected behavior\n\n\n\n- - -\n\n\n`;\n\n const body = encodeURIComponent(template);\n (ev.target as HTMLAnchorElement).href = `https://github.com/sorbet/sorbet/issues/new?body=${body}&labels=bug,unconfirmed&template=bug.md`;\n});\n\nlet vm: any = null;\nasync function vminit() {\n const response = await fetch('./ruby-web.wasm');\n console.log(response);\n const module = await WebAssembly.compileStreaming(response);\n console.log(module);\n ({vm} = await DefaultRubyVM(module));\n console.log(vm);\n}\nvminit();\n\nfunction surround(s: string): string {\n let program = `\n require \"js\"\n require \"/bundle/setup\"\n require \"sorbet-runtime\"\n extend T::Sig\n div = JS.global[:document].getElementById(\"rubyoutput\")\n def div.write(s)\n self[:innerText] = self[:innerText].to_s + s\n end\n $stdout = div\n begin\n ${s}\n rescue => e\n puts e.to_s\n end\n `;\n return program;\n}\n\neditor.onDidChangeModelContent((event: any) => {\n const contents = editor.getValue();\n window.location.hash = `#${encodeURIComponent(contents)\n .replace(/\\(/g, '%28')\n .replace(/\\)/g, '%29')}`;\n typecheck(\n contents,\n new URLSearchParams(window.location.search).getAll('arg')\n );\n\n let prog = surround(contents);\n console.log('evaluation', prog);\n\n document.getElementById('rubyoutput')!.innerText = '';\n vm.eval(surround(contents));\n});\nlet lastValue = editor.getValue();\ntypecheck(lastValue, new URLSearchParams(window.location.search).getAll('arg'));\nlet prog = surround(lastValue);\nconsole.log('evaluation', prog);\nvm.eval(prog);\n\n// install Monaco language client services\nMonacoServices.install(editor);\n\nfunction startLanguageServer() {\n console.log('Starting language server.');\n // create the web socket\n const webSocket = createFakeWebSocket();\n // listen when the web socket is opened\n listen({\n webSocket,\n onConnection: (connection) => {\n // create and start the language client\n const languageClient = createLanguageClient(connection);\n const disposable = languageClient.start();\n connection.onClose(() => {\n // vscode-ws-jsonrpc will try to re-connect to the server,\n // but it tries to talk over the closed WebSocket and fails.\n // Thus, we dispose of the language client, and let `instantiateSorbet`\n // (below) create a new language client.\n disposable.dispose();\n });\n },\n });\n}\n\nfunction createLanguageClient(\n connection: MessageConnection\n): MonacoLanguageClient {\n return new MonacoLanguageClient({\n name: 'Sample Language Client',\n clientOptions: {\n // use a language id as a document selector\n documentSelector: ['ruby'],\n },\n // create a language client connection from the JSON RPC connection on\n // demand\n connectionProvider: {\n get: (errorHandler, closeHandler) => {\n return Promise.resolve(\n createConnection(connection, errorHandler, closeHandler)\n );\n },\n },\n });\n}\n\nconst url = 'ws://sorbet.run:8080';\nfunction createFakeWebSocket(): WebSocket {\n return new WebSocket(url);\n}\n\n/**\n * Main procedure:\n * 1. Create mock server.\n * 2. Create Sorbet instance.\n * 3. Create language server and client.\n * If Sorbet crashes, close the socket to dispose of the language server and\n * client and repeat 2 and 3.\n */\nconst mockServer = new Server(url);\n// Sorbet singleton.\nlet sorbet: any = null;\n// Active socket. The language server communicates to the client via the\n// socket. Only one socket is active at a time.\nlet socket: any = null;\n\nasync function instantiateSorbet() {\n let errorCalled = false;\n const onPrint = (msg: string) => console.log(msg);\n const onError = (event: any) => {\n console.log({event});\n // If Sorbet crashes, try creating Sorbet again.\n // Avoid acting on multiple errors from the same Sorbet instance.\n if (errorCalled) {\n return;\n }\n\n errorCalled = true;\n if (socket) {\n // Tell the language client + server to shut down.\n socket.close();\n socket = null;\n }\n sorbet = null;\n instantiateSorbet();\n };\n ({sorbet} = await createSorbet(onPrint, onError));\n startLanguageServer();\n}\n\nmockServer.on('connection', (s: any) => {\n socket = s;\n\n const processLSPResponse = sorbet.addFunction((arg: any) => {\n const message = sorbet.Pointer_stringify(arg);\n console.log('Write: ' + message);\n socket.send(message);\n }, 'vi');\n\n socket.on('message', (message: string) => {\n console.log('Read: ' + message);\n sorbet.ccall(\n 'lsp',\n null,\n ['number', 'string'],\n [processLSPResponse, message]\n );\n });\n});\n\ninstantiateSorbet();\n","import {createSorbet} from './sorbet';\nimport AnsiUp from 'ansi_up';\n\ndeclare var gtag: any;\n\nconst output = document.getElementById('output')!;\nconst ansiUp = new AnsiUp();\nansiUp.use_classes = true;\n\nlet runId = 0;\nlet curId = 0;\nlet stdout:string[] = [];\nconst flush = () => {\n gtag('event', 'typecheck', {\n event_category: 'error_lines',\n event_label: stdout.length,\n });\n const errorLines = stdout.join('\\n').match(/^[^ ]/gm);\n gtag('event', 'typecheck', {\n event_category: 'errors',\n event_label: errorLines ? errorLines.length : 0,\n });\n output.innerHTML = ansiUp.ansi_to_html(stdout.join('\\n'));\n stdout = [];\n};\n\nlet lastRuby = '';\nconst runCpp = (Module: any, ruby: string, extraArgs: string[]) => {\n if (lastRuby === ruby) {\n return;\n }\n lastRuby = ruby;\n runId += 1;\n curId = runId;\n\n const t0 = performance.now();\n const f = Module.cwrap('typecheck', null, ['string']);\n const argv = ['sorbet', '--color=always', '--silence-dev-message', ...extraArgs, '-e', `${ruby}\\n`]\n f(JSON.stringify(argv));\n const t1 = performance.now();\n\n gtag('event', 'timing_complete', {\n event_category: 'typecheck_time',\n event_label: t1 - t0,\n name: 'typecheck_time',\n value: t1 - t0,\n });\n\n flush();\n};\n\nexport const typecheck = (ruby: string, extraArgs: string[]) => {\n setTimeout(() => {\n if (sorbet) {\n runCpp(sorbet, ruby, extraArgs)\n }\n }, 1);\n};\n\n// Sorbet singleton.\nlet sorbet: any = null;\nasync function instantiateSorbet() {\n let errorCalled = false;\n const onError = (event: any) => {\n console.log(event);\n // If Sorbet crashes, try creating Sorbet again.\n // Avoid acting on multiple errors from the same Sorbet instance.\n if (errorCalled) {\n return;\n }\n\n errorCalled = true;\n sorbet = null;\n instantiateSorbet();\n };\n const onPrint = (line: string) => {\n if (runId !== curId) {\n return;\n }\n const replaced = line\n .replace(/http:\\/\\/[^ ]*/, '')\n .replace('git.corp.stripe.com/stripe-internal', 'github.com/stripe')\n .replace('-e:', 'editor.rb:');\n stdout.push(replaced);\n };\n ({sorbet} = await createSorbet(onPrint, onError));\n typecheck(\n monaco.editor.getModels()[0].getValue(),\n (new URLSearchParams(window.location.search)).getAll('arg')\n );\n}\ninstantiateSorbet();\n","document.getElementById('menu')!.addEventListener('click', (ev: any) => {\n ev.target.classList.toggle('is-showing');\n});\n","const conf : any = {\n comments: {lineComment: '#', blockComment: ['=begin', '=end']},\n brackets: [['(', ')'], ['{', '}'], ['[', ']']],\n autoClosingPairs: [\n {open: '{', close: '}'},\n {open: '[', close: ']'},\n {open: '(', close: ')'},\n {open: '\"', close: '\"'},\n {open: \"'\", close: \"'\"},\n ],\n surroundingPairs: [\n {open: '{', close: '}'},\n {open: '[', close: ']'},\n {open: '(', close: ')'},\n {open: '\"', close: '\"'},\n {open: \"'\", close: \"'\"},\n ],\n indentationRules: {\n increaseIndentPattern: new RegExp(\n '^\\\\s*((begin|class|(private|protected)\\\\s+def|def|else|elsif|ensure|for|if|module|rescue|unless|until|when|while|case)|([^#]*\\\\sdo\\\\b)|([^#]*=\\\\s*(case|if|unless)))\\\\b([^#\\\\{;]|(\"|\\'|/).*\\\\4)*(#.*)?$'\n ),\n decreaseIndentPattern: new RegExp(\n '^\\\\s*([}\\\\]]([,)]?\\\\s*(#|$)|\\\\.[a-zA-Z_]\\\\w*\\\\b)|(end|rescue|ensure|else|elsif|when)\\\\b)'\n ),\n },\n};\nconst language : any = {\n tokenPostfix: '.ruby',\n keywords: [\n '__LINE__',\n '__ENCODING__',\n '__FILE__',\n 'BEGIN',\n 'END',\n 'alias',\n 'and',\n 'begin',\n 'break',\n 'case',\n 'class',\n 'def',\n 'defined?',\n 'do',\n 'else',\n 'elsif',\n 'end',\n 'ensure',\n 'for',\n 'false',\n 'if',\n 'in',\n 'module',\n 'next',\n 'nil',\n 'not',\n 'or',\n 'redo',\n 'rescue',\n 'retry',\n 'return',\n 'self',\n 'super',\n 'then',\n 'true',\n 'undef',\n 'unless',\n 'until',\n 'when',\n 'while',\n 'yield',\n ],\n keywordops: ['::', '..', '...', '?', ':', '=>'],\n builtins: [\n 'require',\n 'public',\n 'private',\n 'include',\n 'extend',\n 'attr_reader',\n 'protected',\n 'private_class_method',\n 'protected_class_method',\n 'new',\n ],\n declarations: [\n 'module',\n 'class',\n 'def',\n 'case',\n 'do',\n 'begin',\n 'for',\n 'if',\n 'while',\n 'until',\n 'unless',\n ],\n linedecls: [\n 'def',\n 'case',\n 'do',\n 'begin',\n 'for',\n 'if',\n 'while',\n 'until',\n 'unless',\n ],\n operators: [\n '^',\n '&',\n '|',\n '<=>',\n '==',\n '===',\n '!~',\n '=~',\n '>',\n '>=',\n '<',\n '<=',\n '<<',\n '>>',\n '+',\n '-',\n '*',\n '/',\n '%',\n '**',\n '~',\n '+@',\n '-@',\n '[]',\n '[]=',\n '`',\n '+=',\n '-=',\n '*=',\n '**=',\n '/=',\n '^=',\n '%=',\n '<<=',\n '>>=',\n '&=',\n '&&=',\n '||=',\n '|=',\n ],\n brackets: [\n {open: '(', close: ')', token: 'delimiter.parenthesis'},\n {open: '{', close: '}', token: 'delimiter.curly'},\n {open: '[', close: ']', token: 'delimiter.square'},\n ],\n symbols: /[=>'},\n ],\n [\n /%([qws])(@delim)/,\n {token: 'string.$1.delim', switchTo: '@qstring.$1.$2.$2'},\n ],\n [/%r\\(/, {token: 'regexp.delim', switchTo: '@pregexp.(.)'}],\n [/%r\\[/, {token: 'regexp.delim', switchTo: '@pregexp.[.]'}],\n [/%r\\{/, {token: 'regexp.delim', switchTo: '@pregexp.{.}'}],\n [/%r'}],\n [/%r(@delim)/, {token: 'regexp.delim', switchTo: '@pregexp.$1.$1'}],\n [\n /%(x|W|Q?)\\(/,\n {token: 'string.$1.delim', switchTo: '@qqstring.$1.(.)'},\n ],\n [\n /%(x|W|Q?)\\[/,\n {token: 'string.$1.delim', switchTo: '@qqstring.$1.[.]'},\n ],\n [\n /%(x|W|Q?)\\{/,\n {token: 'string.$1.delim', switchTo: '@qqstring.$1.{.}'},\n ],\n [\n /%(x|W|Q?)'},\n ],\n [\n /%(x|W|Q?)(@delim)/,\n {token: 'string.$1.delim', switchTo: '@qqstring.$1.$2.$2'},\n ],\n [/%([rqwsxW]|Q?)./, {token: 'invalid', next: '@pop'}],\n [/./, {token: 'invalid', next: '@pop'}],\n ],\n qstring: [\n [/\\\\$/, 'string.$S2.escape'],\n [/\\\\./, 'string.$S2.escape'],\n [\n /./,\n {\n cases: {\n '$#==$S4': {token: 'string.$S2.delim', next: '@pop'},\n '$#==$S3': {token: 'string.$S2.delim', next: '@push'},\n '@default': 'string.$S2',\n },\n },\n ],\n ],\n qqstring: [\n [/#/, 'string.$S2.escape', '@interpolated'],\n {include: '@qstring'},\n ],\n whitespace: [\n [/[ \\t\\r\\n]+/, ''],\n [/^\\s*=begin\\b/, 'comment', '@comment'],\n [/#.*$/, 'comment'],\n ],\n comment: [\n [/[^=]+/, 'comment'],\n [/^\\s*=begin\\b/, 'comment.invalid'],\n [/^\\s*=end\\b.*/, 'comment', '@pop'],\n [/[=]/, 'comment'],\n ],\n },\n};\n\nexport function register() {\n monaco.languages.register({\n id: 'ruby',\n extensions: ['.rb', '.rbi'],\n aliases: ['Ruby', 'rb', 'sorbet', 'srb'],\n mimetypes: ['text/plain'],\n });\n monaco.languages.setMonarchTokensProvider('ruby', language);\n monaco.languages.setLanguageConfiguration('ruby', conf);\n}\n","declare var WebAssembly: any;\ndeclare var Sorbet: any;\n\nconst sorbetWasmFile = fetch('../sorbet-wasm.wasm');\n\nconst sorbetWasmModule = (typeof WebAssembly.compileStreaming == 'function') ?\n WebAssembly.compileStreaming(sorbetWasmFile) :\n sorbetWasmFile.then((response) => response.arrayBuffer())\n .then((bytes) => WebAssembly.compile(bytes));\n\n// Since instantiateWasm requires an empty object as a return value,\n// we can't make it async. So, instead, we put the async stuff here\n// so we can use nice async/await syntax.\nasync function instantiateWasmImpl(\n info: any, realReceiveInstanceCallBack: any): Promise {\n try {\n const mod = await sorbetWasmModule;\n const instance = await WebAssembly.instantiate(mod, info);\n realReceiveInstanceCallBack(instance, mod);\n } catch (error) {\n console.log(\n 'Error loading sorbet.wasm. Maybe your adblock blocked it? Some of them are pretty aggressive on github.io domains. We promise we aren\\'t mining crypto currencies on your computer.\\n' +\n error);\n throw error;\n }\n}\n\n/**\n * Creates a new Sorbet instances. Calls errorCallback if Sorbet quits or\n * fails to start up.\n */\nexport function createSorbet(onPrint: (line: string) => void, onError: (error: any) => void):\n Promise<{sorbet: any}> {\n let sorbet: any;\n return new Promise((resolve) => {\n const opts = {\n print: (line: string) => {\n onPrint(line);\n },\n printErr: (line: string) => {\n onPrint(line);\n },\n // On abort, throw away our WebAssembly instance and create a\n // new one. This can happen due to out-of-memory, C++ exceptions,\n // or other reasons; Throwing away and restarting should get us to a\n // healthy state.\n onAbort: onError,\n instantiateWasm: (info: any, realReceiveInstanceCallBack: any) => {\n instantiateWasmImpl(info, realReceiveInstanceCallBack)\n .catch(onError);\n return {}; // indicates lazy initialization\n },\n onRuntimeInitialized: () => {\n // NOTE: DO *NOT* `resolve(sorbet)`!\n // You will cause an infinite asynchronous loop. It will not be\n // debuggable, and will lock up the browser. See:\n // https://github.com/emscripten-core/emscripten/issues/5820\n // We wrap it in an object to be safe.\n resolve({sorbet: sorbet});\n }\n };\n\n sorbet = Sorbet(opts);\n });\n}\n","/* ansi_up.js\n * author : Dru Nelson\n * license : MIT\n * http://github.com/drudru/ansi_up\n */\n\n\"use strict\";\n\n//\n// INTERFACES\n//\n\ninterface AU_Color\n{\n rgb:number[];\n class_name:string;\n}\n\n// Represents the output of process_ansi(): a snapshot of the AnsiUp state machine\n// at a given point in time, which wraps a fragment of text. This would allow deferred\n// processing of text fragments and colors, if ever needed.\ninterface TextWithAttr {\n fg:AU_Color;\n bg:AU_Color;\n bold:boolean;\n text:string;\n}\n\n// Used internally when breaking up the raw text into packets\n\nenum PacketKind {\n EOS,\n Text,\n Incomplete, // An Incomplete ESC sequence\n ESC, // A single ESC char - random\n Unknown, // A valid CSI but not an SGR code\n SGR, // Select Graphic Rendition\n OSCURL, // Operating System Command\n}\n\ninterface TextPacket {\n kind:PacketKind;\n text:string;\n url:string;\n}\n\n//\n// MAIN CLASS\n//\n\nclass AnsiUp\n{\n VERSION = \"5.0.0\";\n\n //\n // *** SEE README ON GITHUB FOR PUBLIC API ***\n //\n\n // 256 Colors Palette\n // CSS RGB strings - ex. \"255, 255, 255\"\n private ansi_colors:AU_Color[][];\n private palette_256:AU_Color[];\n\n private fg:AU_Color;\n private bg:AU_Color;\n private bold:boolean;\n\n private _use_classes:boolean;\n\n private _csi_regex:RegExp;\n\n private _osc_st:RegExp;\n private _osc_regex:RegExp;\n\n private _url_whitelist:{};\n\n private _buffer:string;\n\n constructor()\n {\n // All construction occurs here\n this.setup_palettes();\n this._use_classes = false;\n\n this.bold = false;\n this.fg = this.bg = null;\n\n this._buffer = '';\n\n this._url_whitelist = { 'http':1, 'https':1 };\n }\n\n set use_classes(arg:boolean)\n {\n this._use_classes = arg;\n }\n\n get use_classes():boolean\n {\n return this._use_classes;\n }\n\n set url_whitelist(arg:{})\n {\n this._url_whitelist = arg;\n }\n\n get url_whitelist():{}\n {\n return this._url_whitelist;\n }\n\n\n private setup_palettes():void\n {\n this.ansi_colors =\n [\n // Normal colors\n [\n { rgb: [ 0, 0, 0], class_name: \"ansi-black\" },\n { rgb: [187, 0, 0], class_name: \"ansi-red\" },\n { rgb: [ 0, 187, 0], class_name: \"ansi-green\" },\n { rgb: [187, 187, 0], class_name: \"ansi-yellow\" },\n { rgb: [ 0, 0, 187], class_name: \"ansi-blue\" },\n { rgb: [187, 0, 187], class_name: \"ansi-magenta\" },\n { rgb: [ 0, 187, 187], class_name: \"ansi-cyan\" },\n { rgb: [255, 255, 255], class_name: \"ansi-white\" }\n ],\n\n // Bright colors\n [\n { rgb: [ 85, 85, 85], class_name: \"ansi-bright-black\" },\n { rgb: [255, 85, 85], class_name: \"ansi-bright-red\" },\n { rgb: [ 0, 255, 0], class_name: \"ansi-bright-green\" },\n { rgb: [255, 255, 85], class_name: \"ansi-bright-yellow\" },\n { rgb: [ 85, 85, 255], class_name: \"ansi-bright-blue\" },\n { rgb: [255, 85, 255], class_name: \"ansi-bright-magenta\" },\n { rgb: [ 85, 255, 255], class_name: \"ansi-bright-cyan\" },\n { rgb: [255, 255, 255], class_name: \"ansi-bright-white\" }\n ]\n ];\n\n this.palette_256 = [];\n\n // Index 0..15 : Ansi-Colors\n this.ansi_colors.forEach( palette => {\n palette.forEach( rec => {\n this.palette_256.push(rec);\n });\n });\n\n // Index 16..231 : RGB 6x6x6\n // https://gist.github.com/jasonm23/2868981#file-xterm-256color-yaml\n let levels = [0, 95, 135, 175, 215, 255];\n for (let r = 0; r < 6; ++r) {\n for (let g = 0; g < 6; ++g) {\n for (let b = 0; b < 6; ++b) {\n let col = {rgb:[levels[r], levels[g], levels[b]], class_name:'truecolor'};\n this.palette_256.push(col);\n }\n }\n }\n\n // Index 232..255 : Grayscale\n let grey_level = 8;\n for (let i = 0; i < 24; ++i, grey_level += 10) {\n let gry = {rgb:[grey_level, grey_level, grey_level], class_name:'truecolor'};\n this.palette_256.push(gry);\n }\n }\n\n private escape_txt_for_html(txt:string):string\n {\n return txt.replace(/[&<>\"']/gm, (str) => {\n if (str === \"&\") return \"&\";\n if (str === \"<\") return \"<\";\n if (str === \">\") return \">\";\n if (str === \"\\\"\") return \""\";\n if (str === \"'\") return \"'\";\n });\n }\n\n private append_buffer(txt:string) {\n\n var str = this._buffer + txt;\n this._buffer = str;\n }\n\n private get_next_packet():TextPacket {\n\n var pkt =\n {\n kind: PacketKind.EOS,\n text: '',\n url: ''\n } ;\n\n var len = this._buffer.length;\n if (len == 0)\n return pkt;\n\n var pos = this._buffer.indexOf(\"\\x1B\");\n\n // The most common case, no ESC codes\n if (pos == -1)\n {\n pkt.kind = PacketKind.Text;\n pkt.text = this._buffer;\n this._buffer = '';\n return pkt;\n }\n\n if (pos > 0)\n {\n pkt.kind = PacketKind.Text;\n pkt.text = this._buffer.slice(0, pos);\n this._buffer = this._buffer.slice(pos);\n return pkt;\n }\n\n // NOW WE HANDLE ESCAPES\n if (pos == 0)\n {\n\n if (len == 1) // Lone ESC in Buffer, We don't know yet\n {\n pkt.kind = PacketKind.Incomplete;\n return pkt;\n }\n\n var next_char = this._buffer.charAt(1);\n\n // We treat this as a single ESC\n // Which effecitvely shows\n if ((next_char != '[') && (next_char != ']')) // DeMorgan\n {\n pkt.kind = PacketKind.ESC;\n pkt.text = this._buffer.slice(0, 1);\n this._buffer = this._buffer.slice(1);\n return pkt;\n }\n\n // OK is this an SGR or OSC that we handle\n\n // SGR CHECK\n if (next_char == '[')\n {\n // We do this regex initialization here so\n // we can keep the regex close to its use (Readability)\n\n // All ansi codes are typically in the following format.\n // We parse it and focus specifically on the\n // graphics commands (SGR)\n //\n // CONTROL-SEQUENCE-INTRODUCER CSI (ESC, '[')\n // PRIVATE-MODE-CHAR (!, <, >, ?)\n // Numeric parameters separated by semicolons ('0' - '9', ';')\n // Intermediate-modifiers (0x20 - 0x2f)\n // COMMAND-CHAR (0x40 - 0x7e)\n //\n\n if (!this._csi_regex) {\n\n this._csi_regex = rgx`\n ^ # beginning of line\n #\n # First attempt\n (?: # legal sequence\n \\x1b\\[ # CSI\n ([\\x3c-\\x3f]?) # private-mode char\n ([\\d;]*) # any digits or semicolons\n ([\\x20-\\x2f]? # an intermediate modifier\n [\\x40-\\x7e]) # the command\n )\n | # alternate (second attempt)\n (?: # illegal sequence\n \\x1b\\[ # CSI\n [\\x20-\\x7e]* # anything legal\n ([\\x00-\\x1f:]) # anything illegal\n )\n `;\n }\n\n let match = this._buffer.match(this._csi_regex);\n\n // This match is guaranteed to terminate (even on\n // invalid input). The key is to match on legal and\n // illegal sequences.\n // The first alternate matches everything legal and\n // the second matches everything illegal.\n //\n // If it doesn't match, then we have not received\n // either the full sequence or an illegal sequence.\n // If it does match, the presence of field 4 tells\n // us whether it was legal or illegal.\n\n if (match === null)\n {\n pkt.kind = PacketKind.Incomplete;\n return pkt;\n }\n\n // match is an array\n // 0 - total match\n // 1 - private mode chars group\n // 2 - digits and semicolons group\n // 3 - command\n // 4 - illegal char\n\n if (match[4])\n {\n // Illegal sequence, just remove the ESC\n pkt.kind = PacketKind.ESC;\n pkt.text = this._buffer.slice(0, 1);\n this._buffer = this._buffer.slice(1);\n return pkt;\n }\n\n // If not a valid SGR, we don't handle\n if ( (match[1] != '') || (match[3] != 'm'))\n pkt.kind = PacketKind.Unknown;\n else\n pkt.kind = PacketKind.SGR;\n\n pkt.text = match[2] // Just the parameters\n\n var rpos = match[0].length;\n this._buffer = this._buffer.slice(rpos);\n return pkt;\n }\n\n // OSC CHECK\n if (next_char == ']')\n {\n if (len < 4)\n {\n pkt.kind = PacketKind.Incomplete;\n return pkt;\n }\n\n if ( (this._buffer.charAt(2) != '8')\n || (this._buffer.charAt(3) != ';') )\n {\n // This is not a match, so we'll just treat it as ESC\n pkt.kind = PacketKind.ESC;\n pkt.text = this._buffer.slice(0, 1);\n this._buffer = this._buffer.slice(1);\n return pkt;\n }\n\n // We do this regex initialization here so\n // we can keep the regex close to its use (Readability)\n\n // Matching a Hyperlink OSC with a regex is difficult\n // because Javascript's regex engine doesn't support\n // 'partial match' support.\n //\n // Therefore, we require the system to match the\n // string-terminator(ST) before attempting a match.\n // Once we find it, we attempt the Hyperlink-Begin\n // match.\n // If that goes ok, we scan forward for the next\n // ST.\n // Finally, we try to match it all and return\n // the sequence.\n // Also, it is important to note that we consider\n // certain control characters as an invalidation of\n // the entire sequence.\n\n // We do regex initializations here so\n // we can keep the regex close to its use (Readability)\n\n\n // STRING-TERMINATOR\n // This is likely to terminate in most scenarios\n // because it will terminate on a newline\n\n if (!this._osc_st) {\n\n this._osc_st = rgxG`\n (?: # legal sequence\n (\\x1b\\\\) # ESC \\\n | # alternate\n (\\x07) # BEL (what xterm did)\n )\n | # alternate (second attempt)\n ( # illegal sequence\n [\\x00-\\x06] # anything illegal\n | # alternate\n [\\x08-\\x1a] # anything illegal\n | # alternate\n [\\x1c-\\x1f] # anything illegal\n )\n `;\n }\n\n // VERY IMPORTANT\n // We do a stateful regex match with exec.\n // If the regex is global, and it used with 'exec',\n // then it will search starting at the 'lastIndex'\n // If it matches, the regex can be used again to\n // find the next match.\n this._osc_st.lastIndex = 0;\n\n\n {\n let match = this._osc_st.exec( this._buffer );\n\n if (match === null)\n {\n pkt.kind = PacketKind.Incomplete;\n return pkt;\n }\n\n // If an illegal character was found, bail on the match\n if (match[3])\n {\n // Illegal sequence, just remove the ESC\n pkt.kind = PacketKind.ESC;\n pkt.text = this._buffer.slice(0, 1);\n this._buffer = this._buffer.slice(1);\n return pkt;\n }\n }\n\n\n\n // OK - we might have the prefix and URI\n // Lets start our search for the next ST\n // past this index\n\n {\n let match = this._osc_st.exec( this._buffer );\n\n if (match === null)\n {\n pkt.kind = PacketKind.Incomplete;\n return pkt;\n }\n\n // If an illegal character was found, bail on the match\n if (match[3])\n {\n // Illegal sequence, just remove the ESC\n pkt.kind = PacketKind.ESC;\n pkt.text = this._buffer.slice(0, 1);\n this._buffer = this._buffer.slice(1);\n return pkt;\n }\n }\n\n // OK, at this point we should have a FULL match!\n //\n // Lets try to match that now\n\n if (!this._osc_regex) {\n\n this._osc_regex = rgx`\n ^ # beginning of line\n #\n \\x1b\\]8; # OSC Hyperlink\n [\\x20-\\x3a\\x3c-\\x7e]* # params (excluding ;)\n ; # end of params\n ([\\x21-\\x7e]{0,512}) # URL capture\n (?: # ST\n (?:\\x1b\\\\) # ESC \\\n | # alternate\n (?:\\x07) # BEL (what xterm did)\n )\n ([\\x21-\\x7e]+) # TEXT capture\n \\x1b\\]8;; # OSC Hyperlink End\n (?: # ST\n (?:\\x1b\\\\) # ESC \\\n | # alternate\n (?:\\x07) # BEL (what xterm did)\n )\n `;\n }\n\n let match = this._buffer.match(this._osc_regex);\n\n if (match === null)\n {\n // Illegal sequence, just remove the ESC\n pkt.kind = PacketKind.ESC;\n pkt.text = this._buffer.slice(0, 1);\n this._buffer = this._buffer.slice(1);\n return pkt;\n }\n\n // match is an array\n // 0 - total match\n // 1 - URL\n // 2 - Text\n\n // If a valid SGR\n pkt.kind = PacketKind.OSCURL;\n pkt.url = match[1];\n pkt.text = match[2];\n\n var rpos = match[0].length;\n this._buffer = this._buffer.slice(rpos);\n return pkt;\n }\n }\n }\n\n ansi_to_html(txt:string):string {\n\n this.append_buffer(txt);\n\n var blocks:string[] = [];\n\n while (true)\n {\n var packet = this.get_next_packet();\n\n if ( (packet.kind == PacketKind.EOS)\n || (packet.kind == PacketKind.Incomplete) )\n break;\n\n //Drop single ESC or Unknown CSI\n if ( (packet.kind == PacketKind.ESC)\n || (packet.kind == PacketKind.Unknown) )\n continue;\n\n if (packet.kind == PacketKind.Text)\n blocks.push( this.transform_to_html(this.with_state(packet)) );\n else\n if (packet.kind == PacketKind.SGR)\n this.process_ansi(packet);\n else\n if (packet.kind == PacketKind.OSCURL)\n blocks.push( this.process_hyperlink(packet) );\n }\n\n return blocks.join(\"\");\n }\n\n private with_state(pkt:TextPacket):TextWithAttr {\n return { bold: this.bold, fg: this.fg, bg: this.bg, text: pkt.text };\n }\n\n private process_ansi(pkt:TextPacket)\n {\n // Ok - we have a valid \"SGR\" (Select Graphic Rendition)\n\n let sgr_cmds = pkt.text.split(';');\n\n // Each of these params affects the SGR state\n\n // Why do we shift through the array instead of a forEach??\n // ... because some commands consume the params that follow !\n while (sgr_cmds.length > 0) {\n let sgr_cmd_str = sgr_cmds.shift();\n let num = parseInt(sgr_cmd_str, 10);\n\n if (isNaN(num) || num === 0) {\n this.fg = this.bg = null;\n this.bold = false;\n } else if (num === 1) {\n this.bold = true;\n } else if (num === 22) {\n this.bold = false;\n } else if (num === 39) {\n this.fg = null;\n } else if (num === 49) {\n this.bg = null;\n } else if ((num >= 30) && (num < 38)) {\n this.fg = this.ansi_colors[0][(num - 30)];\n } else if ((num >= 40) && (num < 48)) {\n this.bg = this.ansi_colors[0][(num - 40)];\n } else if ((num >= 90) && (num < 98)) {\n this.fg = this.ansi_colors[1][(num - 90)];\n } else if ((num >= 100) && (num < 108)) {\n this.bg = this.ansi_colors[1][(num - 100)];\n } else if (num === 38 || num === 48) {\n\n // extended set foreground/background color\n\n // validate that param exists\n if (sgr_cmds.length > 0) {\n // extend color (38=fg, 48=bg)\n let is_foreground = (num === 38);\n\n let mode_cmd = sgr_cmds.shift();\n\n // MODE '5' - 256 color palette\n if (mode_cmd === '5' && sgr_cmds.length > 0) {\n let palette_index = parseInt(sgr_cmds.shift(), 10);\n if (palette_index >= 0 && palette_index <= 255) {\n if (is_foreground)\n this.fg = this.palette_256[palette_index];\n else\n this.bg = this.palette_256[palette_index];\n }\n }\n\n // MODE '2' - True Color\n if (mode_cmd === '2' && sgr_cmds.length > 2) {\n let r = parseInt(sgr_cmds.shift(), 10);\n let g = parseInt(sgr_cmds.shift(), 10);\n let b = parseInt(sgr_cmds.shift(), 10);\n\n if ((r >= 0 && r <= 255) && (g >= 0 && g <= 255) && (b >= 0 && b <= 255)) {\n let c = { rgb: [r,g,b], class_name: 'truecolor'};\n if (is_foreground)\n this.fg = c;\n else\n this.bg = c;\n }\n }\n }\n }\n }\n }\n\n private transform_to_html(fragment:TextWithAttr):string {\n let txt = fragment.text;\n\n if (txt.length === 0)\n return txt;\n\n txt = this.escape_txt_for_html(txt);\n\n // If colors not set, default style is used\n if (!fragment.bold && fragment.fg === null && fragment.bg === null)\n return txt;\n\n let styles:string[] = [];\n let classes:string[] = [];\n\n let fg = fragment.fg;\n let bg = fragment.bg;\n\n // Note on bold: https://stackoverflow.com/questions/6737005/what-are-some-advantages-to-using-span-style-font-weightbold-rather-than-b?rq=1\n if (fragment.bold)\n styles.push('font-weight:bold')\n\n if (!this._use_classes) {\n // USE INLINE STYLES\n if (fg)\n styles.push(`color:rgb(${fg.rgb.join(',')})`);\n if (bg)\n styles.push(`background-color:rgb(${bg.rgb})`);\n } else {\n // USE CLASSES\n if (fg) {\n if (fg.class_name !== 'truecolor') {\n classes.push(`${fg.class_name}-fg`);\n } else {\n styles.push(`color:rgb(${fg.rgb.join(',')})`);\n }\n }\n if (bg) {\n if (bg.class_name !== 'truecolor') {\n classes.push(`${bg.class_name}-bg`);\n } else {\n styles.push(`background-color:rgb(${bg.rgb.join(',')})`);\n }\n }\n }\n\n let class_string = '';\n let style_string = '';\n\n if (classes.length)\n class_string = ` class=\"${classes.join(' ')}\"`;\n\n if (styles.length)\n style_string = ` style=\"${styles.join(';')}\"`;\n\n return `${txt}`;\n };\n\n private process_hyperlink(pkt:TextPacket):string\n {\n // Check URL scheme\n let parts = pkt.url.split(':');\n if (parts.length < 1)\n return '';\n\n if (! this._url_whitelist[parts[0]])\n return '';\n\n let result = `${this.escape_txt_for_html(pkt.text)}`;\n return result;\n }\n}\n\n//\n// PRIVATE FUNCTIONS\n//\n\n// ES5 template string transformer\nfunction rgx(tmplObj, ...subst) {\n // Use the 'raw' value so we don't have to double backslash in a template string\n let regexText:string = tmplObj.raw[0];\n\n // Remove white-space and comments\n let wsrgx = /^\\s+|\\s+\\n|\\s*#[\\s\\S]*?\\n|\\n/gm;\n let txt2 = regexText.replace(wsrgx, '');\n return new RegExp(txt2);\n}\n\n// ES5 template string transformer\n// Multi-Line On\nfunction rgxG(tmplObj, ...subst) {\n // Use the 'raw' value so we don't have to double backslash in a template string\n let regexText:string = tmplObj.raw[0];\n\n // Remove white-space and comments\n let wsrgx = /^\\s+|\\s+\\n|\\s*#[\\s\\S]*?\\n|\\n/gm;\n let txt2 = regexText.replace(wsrgx, '');\n return new RegExp(txt2, 'g');\n}\n\n","var asn1 = exports;\n\nasn1.bignum = require('bn.js');\n\nasn1.define = require('./asn1/api').define;\nasn1.base = require('./asn1/base');\nasn1.constants = require('./asn1/constants');\nasn1.decoders = require('./asn1/decoders');\nasn1.encoders = require('./asn1/encoders');\n","var asn1 = require('../asn1');\nvar inherits = require('inherits');\n\nvar api = exports;\n\napi.define = function define(name, body) {\n return new Entity(name, body);\n};\n\nfunction Entity(name, body) {\n this.name = name;\n this.body = body;\n\n this.decoders = {};\n this.encoders = {};\n};\n\nEntity.prototype._createNamed = function createNamed(base) {\n var named;\n try {\n named = require('vm').runInThisContext(\n '(function ' + this.name + '(entity) {\\n' +\n ' this._initNamed(entity);\\n' +\n '})'\n );\n } catch (e) {\n named = function (entity) {\n this._initNamed(entity);\n };\n }\n inherits(named, base);\n named.prototype._initNamed = function initnamed(entity) {\n base.call(this, entity);\n };\n\n return new named(this);\n};\n\nEntity.prototype._getDecoder = function _getDecoder(enc) {\n enc = enc || 'der';\n // Lazily create decoder\n if (!this.decoders.hasOwnProperty(enc))\n this.decoders[enc] = this._createNamed(asn1.decoders[enc]);\n return this.decoders[enc];\n};\n\nEntity.prototype.decode = function decode(data, enc, options) {\n return this._getDecoder(enc).decode(data, options);\n};\n\nEntity.prototype._getEncoder = function _getEncoder(enc) {\n enc = enc || 'der';\n // Lazily create encoder\n if (!this.encoders.hasOwnProperty(enc))\n this.encoders[enc] = this._createNamed(asn1.encoders[enc]);\n return this.encoders[enc];\n};\n\nEntity.prototype.encode = function encode(data, enc, /* internal */ reporter) {\n return this._getEncoder(enc).encode(data, reporter);\n};\n","var inherits = require('inherits');\nvar Reporter = require('../base').Reporter;\nvar Buffer = require('buffer').Buffer;\n\nfunction DecoderBuffer(base, options) {\n Reporter.call(this, options);\n if (!Buffer.isBuffer(base)) {\n this.error('Input not Buffer');\n return;\n }\n\n this.base = base;\n this.offset = 0;\n this.length = base.length;\n}\ninherits(DecoderBuffer, Reporter);\nexports.DecoderBuffer = DecoderBuffer;\n\nDecoderBuffer.prototype.save = function save() {\n return { offset: this.offset, reporter: Reporter.prototype.save.call(this) };\n};\n\nDecoderBuffer.prototype.restore = function restore(save) {\n // Return skipped data\n var res = new DecoderBuffer(this.base);\n res.offset = save.offset;\n res.length = this.offset;\n\n this.offset = save.offset;\n Reporter.prototype.restore.call(this, save.reporter);\n\n return res;\n};\n\nDecoderBuffer.prototype.isEmpty = function isEmpty() {\n return this.offset === this.length;\n};\n\nDecoderBuffer.prototype.readUInt8 = function readUInt8(fail) {\n if (this.offset + 1 <= this.length)\n return this.base.readUInt8(this.offset++, true);\n else\n return this.error(fail || 'DecoderBuffer overrun');\n}\n\nDecoderBuffer.prototype.skip = function skip(bytes, fail) {\n if (!(this.offset + bytes <= this.length))\n return this.error(fail || 'DecoderBuffer overrun');\n\n var res = new DecoderBuffer(this.base);\n\n // Share reporter state\n res._reporterState = this._reporterState;\n\n res.offset = this.offset;\n res.length = this.offset + bytes;\n this.offset += bytes;\n return res;\n}\n\nDecoderBuffer.prototype.raw = function raw(save) {\n return this.base.slice(save ? save.offset : this.offset, this.length);\n}\n\nfunction EncoderBuffer(value, reporter) {\n if (Array.isArray(value)) {\n this.length = 0;\n this.value = value.map(function(item) {\n if (!(item instanceof EncoderBuffer))\n item = new EncoderBuffer(item, reporter);\n this.length += item.length;\n return item;\n }, this);\n } else if (typeof value === 'number') {\n if (!(0 <= value && value <= 0xff))\n return reporter.error('non-byte EncoderBuffer value');\n this.value = value;\n this.length = 1;\n } else if (typeof value === 'string') {\n this.value = value;\n this.length = Buffer.byteLength(value);\n } else if (Buffer.isBuffer(value)) {\n this.value = value;\n this.length = value.length;\n } else {\n return reporter.error('Unsupported type: ' + typeof value);\n }\n}\nexports.EncoderBuffer = EncoderBuffer;\n\nEncoderBuffer.prototype.join = function join(out, offset) {\n if (!out)\n out = new Buffer(this.length);\n if (!offset)\n offset = 0;\n\n if (this.length === 0)\n return out;\n\n if (Array.isArray(this.value)) {\n this.value.forEach(function(item) {\n item.join(out, offset);\n offset += item.length;\n });\n } else {\n if (typeof this.value === 'number')\n out[offset] = this.value;\n else if (typeof this.value === 'string')\n out.write(this.value, offset);\n else if (Buffer.isBuffer(this.value))\n this.value.copy(out, offset);\n offset += this.length;\n }\n\n return out;\n};\n","var base = exports;\n\nbase.Reporter = require('./reporter').Reporter;\nbase.DecoderBuffer = require('./buffer').DecoderBuffer;\nbase.EncoderBuffer = require('./buffer').EncoderBuffer;\nbase.Node = require('./node');\n","var Reporter = require('../base').Reporter;\nvar EncoderBuffer = require('../base').EncoderBuffer;\nvar DecoderBuffer = require('../base').DecoderBuffer;\nvar assert = require('minimalistic-assert');\n\n// Supported tags\nvar tags = [\n 'seq', 'seqof', 'set', 'setof', 'objid', 'bool',\n 'gentime', 'utctime', 'null_', 'enum', 'int', 'objDesc',\n 'bitstr', 'bmpstr', 'charstr', 'genstr', 'graphstr', 'ia5str', 'iso646str',\n 'numstr', 'octstr', 'printstr', 't61str', 'unistr', 'utf8str', 'videostr'\n];\n\n// Public methods list\nvar methods = [\n 'key', 'obj', 'use', 'optional', 'explicit', 'implicit', 'def', 'choice',\n 'any', 'contains'\n].concat(tags);\n\n// Overrided methods list\nvar overrided = [\n '_peekTag', '_decodeTag', '_use',\n '_decodeStr', '_decodeObjid', '_decodeTime',\n '_decodeNull', '_decodeInt', '_decodeBool', '_decodeList',\n\n '_encodeComposite', '_encodeStr', '_encodeObjid', '_encodeTime',\n '_encodeNull', '_encodeInt', '_encodeBool'\n];\n\nfunction Node(enc, parent) {\n var state = {};\n this._baseState = state;\n\n state.enc = enc;\n\n state.parent = parent || null;\n state.children = null;\n\n // State\n state.tag = null;\n state.args = null;\n state.reverseArgs = null;\n state.choice = null;\n state.optional = false;\n state.any = false;\n state.obj = false;\n state.use = null;\n state.useDecoder = null;\n state.key = null;\n state['default'] = null;\n state.explicit = null;\n state.implicit = null;\n state.contains = null;\n\n // Should create new instance on each method\n if (!state.parent) {\n state.children = [];\n this._wrap();\n }\n}\nmodule.exports = Node;\n\nvar stateProps = [\n 'enc', 'parent', 'children', 'tag', 'args', 'reverseArgs', 'choice',\n 'optional', 'any', 'obj', 'use', 'alteredUse', 'key', 'default', 'explicit',\n 'implicit', 'contains'\n];\n\nNode.prototype.clone = function clone() {\n var state = this._baseState;\n var cstate = {};\n stateProps.forEach(function(prop) {\n cstate[prop] = state[prop];\n });\n var res = new this.constructor(cstate.parent);\n res._baseState = cstate;\n return res;\n};\n\nNode.prototype._wrap = function wrap() {\n var state = this._baseState;\n methods.forEach(function(method) {\n this[method] = function _wrappedMethod() {\n var clone = new this.constructor(this);\n state.children.push(clone);\n return clone[method].apply(clone, arguments);\n };\n }, this);\n};\n\nNode.prototype._init = function init(body) {\n var state = this._baseState;\n\n assert(state.parent === null);\n body.call(this);\n\n // Filter children\n state.children = state.children.filter(function(child) {\n return child._baseState.parent === this;\n }, this);\n assert.equal(state.children.length, 1, 'Root node can have only one child');\n};\n\nNode.prototype._useArgs = function useArgs(args) {\n var state = this._baseState;\n\n // Filter children and args\n var children = args.filter(function(arg) {\n return arg instanceof this.constructor;\n }, this);\n args = args.filter(function(arg) {\n return !(arg instanceof this.constructor);\n }, this);\n\n if (children.length !== 0) {\n assert(state.children === null);\n state.children = children;\n\n // Replace parent to maintain backward link\n children.forEach(function(child) {\n child._baseState.parent = this;\n }, this);\n }\n if (args.length !== 0) {\n assert(state.args === null);\n state.args = args;\n state.reverseArgs = args.map(function(arg) {\n if (typeof arg !== 'object' || arg.constructor !== Object)\n return arg;\n\n var res = {};\n Object.keys(arg).forEach(function(key) {\n if (key == (key | 0))\n key |= 0;\n var value = arg[key];\n res[value] = key;\n });\n return res;\n });\n }\n};\n\n//\n// Overrided methods\n//\n\noverrided.forEach(function(method) {\n Node.prototype[method] = function _overrided() {\n var state = this._baseState;\n throw new Error(method + ' not implemented for encoding: ' + state.enc);\n };\n});\n\n//\n// Public methods\n//\n\ntags.forEach(function(tag) {\n Node.prototype[tag] = function _tagMethod() {\n var state = this._baseState;\n var args = Array.prototype.slice.call(arguments);\n\n assert(state.tag === null);\n state.tag = tag;\n\n this._useArgs(args);\n\n return this;\n };\n});\n\nNode.prototype.use = function use(item) {\n assert(item);\n var state = this._baseState;\n\n assert(state.use === null);\n state.use = item;\n\n return this;\n};\n\nNode.prototype.optional = function optional() {\n var state = this._baseState;\n\n state.optional = true;\n\n return this;\n};\n\nNode.prototype.def = function def(val) {\n var state = this._baseState;\n\n assert(state['default'] === null);\n state['default'] = val;\n state.optional = true;\n\n return this;\n};\n\nNode.prototype.explicit = function explicit(num) {\n var state = this._baseState;\n\n assert(state.explicit === null && state.implicit === null);\n state.explicit = num;\n\n return this;\n};\n\nNode.prototype.implicit = function implicit(num) {\n var state = this._baseState;\n\n assert(state.explicit === null && state.implicit === null);\n state.implicit = num;\n\n return this;\n};\n\nNode.prototype.obj = function obj() {\n var state = this._baseState;\n var args = Array.prototype.slice.call(arguments);\n\n state.obj = true;\n\n if (args.length !== 0)\n this._useArgs(args);\n\n return this;\n};\n\nNode.prototype.key = function key(newKey) {\n var state = this._baseState;\n\n assert(state.key === null);\n state.key = newKey;\n\n return this;\n};\n\nNode.prototype.any = function any() {\n var state = this._baseState;\n\n state.any = true;\n\n return this;\n};\n\nNode.prototype.choice = function choice(obj) {\n var state = this._baseState;\n\n assert(state.choice === null);\n state.choice = obj;\n this._useArgs(Object.keys(obj).map(function(key) {\n return obj[key];\n }));\n\n return this;\n};\n\nNode.prototype.contains = function contains(item) {\n var state = this._baseState;\n\n assert(state.use === null);\n state.contains = item;\n\n return this;\n};\n\n//\n// Decoding\n//\n\nNode.prototype._decode = function decode(input, options) {\n var state = this._baseState;\n\n // Decode root node\n if (state.parent === null)\n return input.wrapResult(state.children[0]._decode(input, options));\n\n var result = state['default'];\n var present = true;\n\n var prevKey = null;\n if (state.key !== null)\n prevKey = input.enterKey(state.key);\n\n // Check if tag is there\n if (state.optional) {\n var tag = null;\n if (state.explicit !== null)\n tag = state.explicit;\n else if (state.implicit !== null)\n tag = state.implicit;\n else if (state.tag !== null)\n tag = state.tag;\n\n if (tag === null && !state.any) {\n // Trial and Error\n var save = input.save();\n try {\n if (state.choice === null)\n this._decodeGeneric(state.tag, input, options);\n else\n this._decodeChoice(input, options);\n present = true;\n } catch (e) {\n present = false;\n }\n input.restore(save);\n } else {\n present = this._peekTag(input, tag, state.any);\n\n if (input.isError(present))\n return present;\n }\n }\n\n // Push object on stack\n var prevObj;\n if (state.obj && present)\n prevObj = input.enterObject();\n\n if (present) {\n // Unwrap explicit values\n if (state.explicit !== null) {\n var explicit = this._decodeTag(input, state.explicit);\n if (input.isError(explicit))\n return explicit;\n input = explicit;\n }\n\n var start = input.offset;\n\n // Unwrap implicit and normal values\n if (state.use === null && state.choice === null) {\n if (state.any)\n var save = input.save();\n var body = this._decodeTag(\n input,\n state.implicit !== null ? state.implicit : state.tag,\n state.any\n );\n if (input.isError(body))\n return body;\n\n if (state.any)\n result = input.raw(save);\n else\n input = body;\n }\n\n if (options && options.track && state.tag !== null)\n options.track(input.path(), start, input.length, 'tagged');\n\n if (options && options.track && state.tag !== null)\n options.track(input.path(), input.offset, input.length, 'content');\n\n // Select proper method for tag\n if (state.any)\n result = result;\n else if (state.choice === null)\n result = this._decodeGeneric(state.tag, input, options);\n else\n result = this._decodeChoice(input, options);\n\n if (input.isError(result))\n return result;\n\n // Decode children\n if (!state.any && state.choice === null && state.children !== null) {\n state.children.forEach(function decodeChildren(child) {\n // NOTE: We are ignoring errors here, to let parser continue with other\n // parts of encoded data\n child._decode(input, options);\n });\n }\n\n // Decode contained/encoded by schema, only in bit or octet strings\n if (state.contains && (state.tag === 'octstr' || state.tag === 'bitstr')) {\n var data = new DecoderBuffer(result);\n result = this._getUse(state.contains, input._reporterState.obj)\n ._decode(data, options);\n }\n }\n\n // Pop object\n if (state.obj && present)\n result = input.leaveObject(prevObj);\n\n // Set key\n if (state.key !== null && (result !== null || present === true))\n input.leaveKey(prevKey, state.key, result);\n else if (prevKey !== null)\n input.exitKey(prevKey);\n\n return result;\n};\n\nNode.prototype._decodeGeneric = function decodeGeneric(tag, input, options) {\n var state = this._baseState;\n\n if (tag === 'seq' || tag === 'set')\n return null;\n if (tag === 'seqof' || tag === 'setof')\n return this._decodeList(input, tag, state.args[0], options);\n else if (/str$/.test(tag))\n return this._decodeStr(input, tag, options);\n else if (tag === 'objid' && state.args)\n return this._decodeObjid(input, state.args[0], state.args[1], options);\n else if (tag === 'objid')\n return this._decodeObjid(input, null, null, options);\n else if (tag === 'gentime' || tag === 'utctime')\n return this._decodeTime(input, tag, options);\n else if (tag === 'null_')\n return this._decodeNull(input, options);\n else if (tag === 'bool')\n return this._decodeBool(input, options);\n else if (tag === 'objDesc')\n return this._decodeStr(input, tag, options);\n else if (tag === 'int' || tag === 'enum')\n return this._decodeInt(input, state.args && state.args[0], options);\n\n if (state.use !== null) {\n return this._getUse(state.use, input._reporterState.obj)\n ._decode(input, options);\n } else {\n return input.error('unknown tag: ' + tag);\n }\n};\n\nNode.prototype._getUse = function _getUse(entity, obj) {\n\n var state = this._baseState;\n // Create altered use decoder if implicit is set\n state.useDecoder = this._use(entity, obj);\n assert(state.useDecoder._baseState.parent === null);\n state.useDecoder = state.useDecoder._baseState.children[0];\n if (state.implicit !== state.useDecoder._baseState.implicit) {\n state.useDecoder = state.useDecoder.clone();\n state.useDecoder._baseState.implicit = state.implicit;\n }\n return state.useDecoder;\n};\n\nNode.prototype._decodeChoice = function decodeChoice(input, options) {\n var state = this._baseState;\n var result = null;\n var match = false;\n\n Object.keys(state.choice).some(function(key) {\n var save = input.save();\n var node = state.choice[key];\n try {\n var value = node._decode(input, options);\n if (input.isError(value))\n return false;\n\n result = { type: key, value: value };\n match = true;\n } catch (e) {\n input.restore(save);\n return false;\n }\n return true;\n }, this);\n\n if (!match)\n return input.error('Choice not matched');\n\n return result;\n};\n\n//\n// Encoding\n//\n\nNode.prototype._createEncoderBuffer = function createEncoderBuffer(data) {\n return new EncoderBuffer(data, this.reporter);\n};\n\nNode.prototype._encode = function encode(data, reporter, parent) {\n var state = this._baseState;\n if (state['default'] !== null && state['default'] === data)\n return;\n\n var result = this._encodeValue(data, reporter, parent);\n if (result === undefined)\n return;\n\n if (this._skipDefault(result, reporter, parent))\n return;\n\n return result;\n};\n\nNode.prototype._encodeValue = function encode(data, reporter, parent) {\n var state = this._baseState;\n\n // Decode root node\n if (state.parent === null)\n return state.children[0]._encode(data, reporter || new Reporter());\n\n var result = null;\n\n // Set reporter to share it with a child class\n this.reporter = reporter;\n\n // Check if data is there\n if (state.optional && data === undefined) {\n if (state['default'] !== null)\n data = state['default']\n else\n return;\n }\n\n // Encode children first\n var content = null;\n var primitive = false;\n if (state.any) {\n // Anything that was given is translated to buffer\n result = this._createEncoderBuffer(data);\n } else if (state.choice) {\n result = this._encodeChoice(data, reporter);\n } else if (state.contains) {\n content = this._getUse(state.contains, parent)._encode(data, reporter);\n primitive = true;\n } else if (state.children) {\n content = state.children.map(function(child) {\n if (child._baseState.tag === 'null_')\n return child._encode(null, reporter, data);\n\n if (child._baseState.key === null)\n return reporter.error('Child should have a key');\n var prevKey = reporter.enterKey(child._baseState.key);\n\n if (typeof data !== 'object')\n return reporter.error('Child expected, but input is not object');\n\n var res = child._encode(data[child._baseState.key], reporter, data);\n reporter.leaveKey(prevKey);\n\n return res;\n }, this).filter(function(child) {\n return child;\n });\n content = this._createEncoderBuffer(content);\n } else {\n if (state.tag === 'seqof' || state.tag === 'setof') {\n // TODO(indutny): this should be thrown on DSL level\n if (!(state.args && state.args.length === 1))\n return reporter.error('Too many args for : ' + state.tag);\n\n if (!Array.isArray(data))\n return reporter.error('seqof/setof, but data is not Array');\n\n var child = this.clone();\n child._baseState.implicit = null;\n content = this._createEncoderBuffer(data.map(function(item) {\n var state = this._baseState;\n\n return this._getUse(state.args[0], data)._encode(item, reporter);\n }, child));\n } else if (state.use !== null) {\n result = this._getUse(state.use, parent)._encode(data, reporter);\n } else {\n content = this._encodePrimitive(state.tag, data);\n primitive = true;\n }\n }\n\n // Encode data itself\n var result;\n if (!state.any && state.choice === null) {\n var tag = state.implicit !== null ? state.implicit : state.tag;\n var cls = state.implicit === null ? 'universal' : 'context';\n\n if (tag === null) {\n if (state.use === null)\n reporter.error('Tag could be omitted only for .use()');\n } else {\n if (state.use === null)\n result = this._encodeComposite(tag, primitive, cls, content);\n }\n }\n\n // Wrap in explicit\n if (state.explicit !== null)\n result = this._encodeComposite(state.explicit, false, 'context', result);\n\n return result;\n};\n\nNode.prototype._encodeChoice = function encodeChoice(data, reporter) {\n var state = this._baseState;\n\n var node = state.choice[data.type];\n if (!node) {\n assert(\n false,\n data.type + ' not found in ' +\n JSON.stringify(Object.keys(state.choice)));\n }\n return node._encode(data.value, reporter);\n};\n\nNode.prototype._encodePrimitive = function encodePrimitive(tag, data) {\n var state = this._baseState;\n\n if (/str$/.test(tag))\n return this._encodeStr(data, tag);\n else if (tag === 'objid' && state.args)\n return this._encodeObjid(data, state.reverseArgs[0], state.args[1]);\n else if (tag === 'objid')\n return this._encodeObjid(data, null, null);\n else if (tag === 'gentime' || tag === 'utctime')\n return this._encodeTime(data, tag);\n else if (tag === 'null_')\n return this._encodeNull();\n else if (tag === 'int' || tag === 'enum')\n return this._encodeInt(data, state.args && state.reverseArgs[0]);\n else if (tag === 'bool')\n return this._encodeBool(data);\n else if (tag === 'objDesc')\n return this._encodeStr(data, tag);\n else\n throw new Error('Unsupported tag: ' + tag);\n};\n\nNode.prototype._isNumstr = function isNumstr(str) {\n return /^[0-9 ]*$/.test(str);\n};\n\nNode.prototype._isPrintstr = function isPrintstr(str) {\n return /^[A-Za-z0-9 '\\(\\)\\+,\\-\\.\\/:=\\?]*$/.test(str);\n};\n","var inherits = require('inherits');\n\nfunction Reporter(options) {\n this._reporterState = {\n obj: null,\n path: [],\n options: options || {},\n errors: []\n };\n}\nexports.Reporter = Reporter;\n\nReporter.prototype.isError = function isError(obj) {\n return obj instanceof ReporterError;\n};\n\nReporter.prototype.save = function save() {\n var state = this._reporterState;\n\n return { obj: state.obj, pathLen: state.path.length };\n};\n\nReporter.prototype.restore = function restore(data) {\n var state = this._reporterState;\n\n state.obj = data.obj;\n state.path = state.path.slice(0, data.pathLen);\n};\n\nReporter.prototype.enterKey = function enterKey(key) {\n return this._reporterState.path.push(key);\n};\n\nReporter.prototype.exitKey = function exitKey(index) {\n var state = this._reporterState;\n\n state.path = state.path.slice(0, index - 1);\n};\n\nReporter.prototype.leaveKey = function leaveKey(index, key, value) {\n var state = this._reporterState;\n\n this.exitKey(index);\n if (state.obj !== null)\n state.obj[key] = value;\n};\n\nReporter.prototype.path = function path() {\n return this._reporterState.path.join('/');\n};\n\nReporter.prototype.enterObject = function enterObject() {\n var state = this._reporterState;\n\n var prev = state.obj;\n state.obj = {};\n return prev;\n};\n\nReporter.prototype.leaveObject = function leaveObject(prev) {\n var state = this._reporterState;\n\n var now = state.obj;\n state.obj = prev;\n return now;\n};\n\nReporter.prototype.error = function error(msg) {\n var err;\n var state = this._reporterState;\n\n var inherited = msg instanceof ReporterError;\n if (inherited) {\n err = msg;\n } else {\n err = new ReporterError(state.path.map(function(elem) {\n return '[' + JSON.stringify(elem) + ']';\n }).join(''), msg.message || msg, msg.stack);\n }\n\n if (!state.options.partial)\n throw err;\n\n if (!inherited)\n state.errors.push(err);\n\n return err;\n};\n\nReporter.prototype.wrapResult = function wrapResult(result) {\n var state = this._reporterState;\n if (!state.options.partial)\n return result;\n\n return {\n result: this.isError(result) ? null : result,\n errors: state.errors\n };\n};\n\nfunction ReporterError(path, msg) {\n this.path = path;\n this.rethrow(msg);\n};\ninherits(ReporterError, Error);\n\nReporterError.prototype.rethrow = function rethrow(msg) {\n this.message = msg + ' at: ' + (this.path || '(shallow)');\n if (Error.captureStackTrace)\n Error.captureStackTrace(this, ReporterError);\n\n if (!this.stack) {\n try {\n // IE only adds stack when thrown\n throw new Error(this.message);\n } catch (e) {\n this.stack = e.stack;\n }\n }\n return this;\n};\n","var constants = require('../constants');\n\nexports.tagClass = {\n 0: 'universal',\n 1: 'application',\n 2: 'context',\n 3: 'private'\n};\nexports.tagClassByName = constants._reverse(exports.tagClass);\n\nexports.tag = {\n 0x00: 'end',\n 0x01: 'bool',\n 0x02: 'int',\n 0x03: 'bitstr',\n 0x04: 'octstr',\n 0x05: 'null_',\n 0x06: 'objid',\n 0x07: 'objDesc',\n 0x08: 'external',\n 0x09: 'real',\n 0x0a: 'enum',\n 0x0b: 'embed',\n 0x0c: 'utf8str',\n 0x0d: 'relativeOid',\n 0x10: 'seq',\n 0x11: 'set',\n 0x12: 'numstr',\n 0x13: 'printstr',\n 0x14: 't61str',\n 0x15: 'videostr',\n 0x16: 'ia5str',\n 0x17: 'utctime',\n 0x18: 'gentime',\n 0x19: 'graphstr',\n 0x1a: 'iso646str',\n 0x1b: 'genstr',\n 0x1c: 'unistr',\n 0x1d: 'charstr',\n 0x1e: 'bmpstr'\n};\nexports.tagByName = constants._reverse(exports.tag);\n","var constants = exports;\n\n// Helper\nconstants._reverse = function reverse(map) {\n var res = {};\n\n Object.keys(map).forEach(function(key) {\n // Convert key to integer if it is stringified\n if ((key | 0) == key)\n key = key | 0;\n\n var value = map[key];\n res[value] = key;\n });\n\n return res;\n};\n\nconstants.der = require('./der');\n","var inherits = require('inherits');\n\nvar asn1 = require('../../asn1');\nvar base = asn1.base;\nvar bignum = asn1.bignum;\n\n// Import DER constants\nvar der = asn1.constants.der;\n\nfunction DERDecoder(entity) {\n this.enc = 'der';\n this.name = entity.name;\n this.entity = entity;\n\n // Construct base tree\n this.tree = new DERNode();\n this.tree._init(entity.body);\n};\nmodule.exports = DERDecoder;\n\nDERDecoder.prototype.decode = function decode(data, options) {\n if (!(data instanceof base.DecoderBuffer))\n data = new base.DecoderBuffer(data, options);\n\n return this.tree._decode(data, options);\n};\n\n// Tree methods\n\nfunction DERNode(parent) {\n base.Node.call(this, 'der', parent);\n}\ninherits(DERNode, base.Node);\n\nDERNode.prototype._peekTag = function peekTag(buffer, tag, any) {\n if (buffer.isEmpty())\n return false;\n\n var state = buffer.save();\n var decodedTag = derDecodeTag(buffer, 'Failed to peek tag: \"' + tag + '\"');\n if (buffer.isError(decodedTag))\n return decodedTag;\n\n buffer.restore(state);\n\n return decodedTag.tag === tag || decodedTag.tagStr === tag ||\n (decodedTag.tagStr + 'of') === tag || any;\n};\n\nDERNode.prototype._decodeTag = function decodeTag(buffer, tag, any) {\n var decodedTag = derDecodeTag(buffer,\n 'Failed to decode tag of \"' + tag + '\"');\n if (buffer.isError(decodedTag))\n return decodedTag;\n\n var len = derDecodeLen(buffer,\n decodedTag.primitive,\n 'Failed to get length of \"' + tag + '\"');\n\n // Failure\n if (buffer.isError(len))\n return len;\n\n if (!any &&\n decodedTag.tag !== tag &&\n decodedTag.tagStr !== tag &&\n decodedTag.tagStr + 'of' !== tag) {\n return buffer.error('Failed to match tag: \"' + tag + '\"');\n }\n\n if (decodedTag.primitive || len !== null)\n return buffer.skip(len, 'Failed to match body of: \"' + tag + '\"');\n\n // Indefinite length... find END tag\n var state = buffer.save();\n var res = this._skipUntilEnd(\n buffer,\n 'Failed to skip indefinite length body: \"' + this.tag + '\"');\n if (buffer.isError(res))\n return res;\n\n len = buffer.offset - state.offset;\n buffer.restore(state);\n return buffer.skip(len, 'Failed to match body of: \"' + tag + '\"');\n};\n\nDERNode.prototype._skipUntilEnd = function skipUntilEnd(buffer, fail) {\n while (true) {\n var tag = derDecodeTag(buffer, fail);\n if (buffer.isError(tag))\n return tag;\n var len = derDecodeLen(buffer, tag.primitive, fail);\n if (buffer.isError(len))\n return len;\n\n var res;\n if (tag.primitive || len !== null)\n res = buffer.skip(len)\n else\n res = this._skipUntilEnd(buffer, fail);\n\n // Failure\n if (buffer.isError(res))\n return res;\n\n if (tag.tagStr === 'end')\n break;\n }\n};\n\nDERNode.prototype._decodeList = function decodeList(buffer, tag, decoder,\n options) {\n var result = [];\n while (!buffer.isEmpty()) {\n var possibleEnd = this._peekTag(buffer, 'end');\n if (buffer.isError(possibleEnd))\n return possibleEnd;\n\n var res = decoder.decode(buffer, 'der', options);\n if (buffer.isError(res) && possibleEnd)\n break;\n result.push(res);\n }\n return result;\n};\n\nDERNode.prototype._decodeStr = function decodeStr(buffer, tag) {\n if (tag === 'bitstr') {\n var unused = buffer.readUInt8();\n if (buffer.isError(unused))\n return unused;\n return { unused: unused, data: buffer.raw() };\n } else if (tag === 'bmpstr') {\n var raw = buffer.raw();\n if (raw.length % 2 === 1)\n return buffer.error('Decoding of string type: bmpstr length mismatch');\n\n var str = '';\n for (var i = 0; i < raw.length / 2; i++) {\n str += String.fromCharCode(raw.readUInt16BE(i * 2));\n }\n return str;\n } else if (tag === 'numstr') {\n var numstr = buffer.raw().toString('ascii');\n if (!this._isNumstr(numstr)) {\n return buffer.error('Decoding of string type: ' +\n 'numstr unsupported characters');\n }\n return numstr;\n } else if (tag === 'octstr') {\n return buffer.raw();\n } else if (tag === 'objDesc') {\n return buffer.raw();\n } else if (tag === 'printstr') {\n var printstr = buffer.raw().toString('ascii');\n if (!this._isPrintstr(printstr)) {\n return buffer.error('Decoding of string type: ' +\n 'printstr unsupported characters');\n }\n return printstr;\n } else if (/str$/.test(tag)) {\n return buffer.raw().toString();\n } else {\n return buffer.error('Decoding of string type: ' + tag + ' unsupported');\n }\n};\n\nDERNode.prototype._decodeObjid = function decodeObjid(buffer, values, relative) {\n var result;\n var identifiers = [];\n var ident = 0;\n while (!buffer.isEmpty()) {\n var subident = buffer.readUInt8();\n ident <<= 7;\n ident |= subident & 0x7f;\n if ((subident & 0x80) === 0) {\n identifiers.push(ident);\n ident = 0;\n }\n }\n if (subident & 0x80)\n identifiers.push(ident);\n\n var first = (identifiers[0] / 40) | 0;\n var second = identifiers[0] % 40;\n\n if (relative)\n result = identifiers;\n else\n result = [first, second].concat(identifiers.slice(1));\n\n if (values) {\n var tmp = values[result.join(' ')];\n if (tmp === undefined)\n tmp = values[result.join('.')];\n if (tmp !== undefined)\n result = tmp;\n }\n\n return result;\n};\n\nDERNode.prototype._decodeTime = function decodeTime(buffer, tag) {\n var str = buffer.raw().toString();\n if (tag === 'gentime') {\n var year = str.slice(0, 4) | 0;\n var mon = str.slice(4, 6) | 0;\n var day = str.slice(6, 8) | 0;\n var hour = str.slice(8, 10) | 0;\n var min = str.slice(10, 12) | 0;\n var sec = str.slice(12, 14) | 0;\n } else if (tag === 'utctime') {\n var year = str.slice(0, 2) | 0;\n var mon = str.slice(2, 4) | 0;\n var day = str.slice(4, 6) | 0;\n var hour = str.slice(6, 8) | 0;\n var min = str.slice(8, 10) | 0;\n var sec = str.slice(10, 12) | 0;\n if (year < 70)\n year = 2000 + year;\n else\n year = 1900 + year;\n } else {\n return buffer.error('Decoding ' + tag + ' time is not supported yet');\n }\n\n return Date.UTC(year, mon - 1, day, hour, min, sec, 0);\n};\n\nDERNode.prototype._decodeNull = function decodeNull(buffer) {\n return null;\n};\n\nDERNode.prototype._decodeBool = function decodeBool(buffer) {\n var res = buffer.readUInt8();\n if (buffer.isError(res))\n return res;\n else\n return res !== 0;\n};\n\nDERNode.prototype._decodeInt = function decodeInt(buffer, values) {\n // Bigint, return as it is (assume big endian)\n var raw = buffer.raw();\n var res = new bignum(raw);\n\n if (values)\n res = values[res.toString(10)] || res;\n\n return res;\n};\n\nDERNode.prototype._use = function use(entity, obj) {\n if (typeof entity === 'function')\n entity = entity(obj);\n return entity._getDecoder('der').tree;\n};\n\n// Utility methods\n\nfunction derDecodeTag(buf, fail) {\n var tag = buf.readUInt8(fail);\n if (buf.isError(tag))\n return tag;\n\n var cls = der.tagClass[tag >> 6];\n var primitive = (tag & 0x20) === 0;\n\n // Multi-octet tag - load\n if ((tag & 0x1f) === 0x1f) {\n var oct = tag;\n tag = 0;\n while ((oct & 0x80) === 0x80) {\n oct = buf.readUInt8(fail);\n if (buf.isError(oct))\n return oct;\n\n tag <<= 7;\n tag |= oct & 0x7f;\n }\n } else {\n tag &= 0x1f;\n }\n var tagStr = der.tag[tag];\n\n return {\n cls: cls,\n primitive: primitive,\n tag: tag,\n tagStr: tagStr\n };\n}\n\nfunction derDecodeLen(buf, primitive, fail) {\n var len = buf.readUInt8(fail);\n if (buf.isError(len))\n return len;\n\n // Indefinite form\n if (!primitive && len === 0x80)\n return null;\n\n // Definite form\n if ((len & 0x80) === 0) {\n // Short form\n return len;\n }\n\n // Long form\n var num = len & 0x7f;\n if (num > 4)\n return buf.error('length octect is too long');\n\n len = 0;\n for (var i = 0; i < num; i++) {\n len <<= 8;\n var j = buf.readUInt8(fail);\n if (buf.isError(j))\n return j;\n len |= j;\n }\n\n return len;\n}\n","var decoders = exports;\n\ndecoders.der = require('./der');\ndecoders.pem = require('./pem');\n","var inherits = require('inherits');\nvar Buffer = require('buffer').Buffer;\n\nvar DERDecoder = require('./der');\n\nfunction PEMDecoder(entity) {\n DERDecoder.call(this, entity);\n this.enc = 'pem';\n};\ninherits(PEMDecoder, DERDecoder);\nmodule.exports = PEMDecoder;\n\nPEMDecoder.prototype.decode = function decode(data, options) {\n var lines = data.toString().split(/[\\r\\n]+/g);\n\n var label = options.label.toUpperCase();\n\n var re = /^-----(BEGIN|END) ([^-]+)-----$/;\n var start = -1;\n var end = -1;\n for (var i = 0; i < lines.length; i++) {\n var match = lines[i].match(re);\n if (match === null)\n continue;\n\n if (match[2] !== label)\n continue;\n\n if (start === -1) {\n if (match[1] !== 'BEGIN')\n break;\n start = i;\n } else {\n if (match[1] !== 'END')\n break;\n end = i;\n break;\n }\n }\n if (start === -1 || end === -1)\n throw new Error('PEM section not found for: ' + label);\n\n var base64 = lines.slice(start + 1, end).join('');\n // Remove excessive symbols\n base64.replace(/[^a-z0-9\\+\\/=]+/gi, '');\n\n var input = new Buffer(base64, 'base64');\n return DERDecoder.prototype.decode.call(this, input, options);\n};\n","var inherits = require('inherits');\nvar Buffer = require('buffer').Buffer;\n\nvar asn1 = require('../../asn1');\nvar base = asn1.base;\n\n// Import DER constants\nvar der = asn1.constants.der;\n\nfunction DEREncoder(entity) {\n this.enc = 'der';\n this.name = entity.name;\n this.entity = entity;\n\n // Construct base tree\n this.tree = new DERNode();\n this.tree._init(entity.body);\n};\nmodule.exports = DEREncoder;\n\nDEREncoder.prototype.encode = function encode(data, reporter) {\n return this.tree._encode(data, reporter).join();\n};\n\n// Tree methods\n\nfunction DERNode(parent) {\n base.Node.call(this, 'der', parent);\n}\ninherits(DERNode, base.Node);\n\nDERNode.prototype._encodeComposite = function encodeComposite(tag,\n primitive,\n cls,\n content) {\n var encodedTag = encodeTag(tag, primitive, cls, this.reporter);\n\n // Short form\n if (content.length < 0x80) {\n var header = new Buffer(2);\n header[0] = encodedTag;\n header[1] = content.length;\n return this._createEncoderBuffer([ header, content ]);\n }\n\n // Long form\n // Count octets required to store length\n var lenOctets = 1;\n for (var i = content.length; i >= 0x100; i >>= 8)\n lenOctets++;\n\n var header = new Buffer(1 + 1 + lenOctets);\n header[0] = encodedTag;\n header[1] = 0x80 | lenOctets;\n\n for (var i = 1 + lenOctets, j = content.length; j > 0; i--, j >>= 8)\n header[i] = j & 0xff;\n\n return this._createEncoderBuffer([ header, content ]);\n};\n\nDERNode.prototype._encodeStr = function encodeStr(str, tag) {\n if (tag === 'bitstr') {\n return this._createEncoderBuffer([ str.unused | 0, str.data ]);\n } else if (tag === 'bmpstr') {\n var buf = new Buffer(str.length * 2);\n for (var i = 0; i < str.length; i++) {\n buf.writeUInt16BE(str.charCodeAt(i), i * 2);\n }\n return this._createEncoderBuffer(buf);\n } else if (tag === 'numstr') {\n if (!this._isNumstr(str)) {\n return this.reporter.error('Encoding of string type: numstr supports ' +\n 'only digits and space');\n }\n return this._createEncoderBuffer(str);\n } else if (tag === 'printstr') {\n if (!this._isPrintstr(str)) {\n return this.reporter.error('Encoding of string type: printstr supports ' +\n 'only latin upper and lower case letters, ' +\n 'digits, space, apostrophe, left and rigth ' +\n 'parenthesis, plus sign, comma, hyphen, ' +\n 'dot, slash, colon, equal sign, ' +\n 'question mark');\n }\n return this._createEncoderBuffer(str);\n } else if (/str$/.test(tag)) {\n return this._createEncoderBuffer(str);\n } else if (tag === 'objDesc') {\n return this._createEncoderBuffer(str);\n } else {\n return this.reporter.error('Encoding of string type: ' + tag +\n ' unsupported');\n }\n};\n\nDERNode.prototype._encodeObjid = function encodeObjid(id, values, relative) {\n if (typeof id === 'string') {\n if (!values)\n return this.reporter.error('string objid given, but no values map found');\n if (!values.hasOwnProperty(id))\n return this.reporter.error('objid not found in values map');\n id = values[id].split(/[\\s\\.]+/g);\n for (var i = 0; i < id.length; i++)\n id[i] |= 0;\n } else if (Array.isArray(id)) {\n id = id.slice();\n for (var i = 0; i < id.length; i++)\n id[i] |= 0;\n }\n\n if (!Array.isArray(id)) {\n return this.reporter.error('objid() should be either array or string, ' +\n 'got: ' + JSON.stringify(id));\n }\n\n if (!relative) {\n if (id[1] >= 40)\n return this.reporter.error('Second objid identifier OOB');\n id.splice(0, 2, id[0] * 40 + id[1]);\n }\n\n // Count number of octets\n var size = 0;\n for (var i = 0; i < id.length; i++) {\n var ident = id[i];\n for (size++; ident >= 0x80; ident >>= 7)\n size++;\n }\n\n var objid = new Buffer(size);\n var offset = objid.length - 1;\n for (var i = id.length - 1; i >= 0; i--) {\n var ident = id[i];\n objid[offset--] = ident & 0x7f;\n while ((ident >>= 7) > 0)\n objid[offset--] = 0x80 | (ident & 0x7f);\n }\n\n return this._createEncoderBuffer(objid);\n};\n\nfunction two(num) {\n if (num < 10)\n return '0' + num;\n else\n return num;\n}\n\nDERNode.prototype._encodeTime = function encodeTime(time, tag) {\n var str;\n var date = new Date(time);\n\n if (tag === 'gentime') {\n str = [\n two(date.getFullYear()),\n two(date.getUTCMonth() + 1),\n two(date.getUTCDate()),\n two(date.getUTCHours()),\n two(date.getUTCMinutes()),\n two(date.getUTCSeconds()),\n 'Z'\n ].join('');\n } else if (tag === 'utctime') {\n str = [\n two(date.getFullYear() % 100),\n two(date.getUTCMonth() + 1),\n two(date.getUTCDate()),\n two(date.getUTCHours()),\n two(date.getUTCMinutes()),\n two(date.getUTCSeconds()),\n 'Z'\n ].join('');\n } else {\n this.reporter.error('Encoding ' + tag + ' time is not supported yet');\n }\n\n return this._encodeStr(str, 'octstr');\n};\n\nDERNode.prototype._encodeNull = function encodeNull() {\n return this._createEncoderBuffer('');\n};\n\nDERNode.prototype._encodeInt = function encodeInt(num, values) {\n if (typeof num === 'string') {\n if (!values)\n return this.reporter.error('String int or enum given, but no values map');\n if (!values.hasOwnProperty(num)) {\n return this.reporter.error('Values map doesn\\'t contain: ' +\n JSON.stringify(num));\n }\n num = values[num];\n }\n\n // Bignum, assume big endian\n if (typeof num !== 'number' && !Buffer.isBuffer(num)) {\n var numArray = num.toArray();\n if (!num.sign && numArray[0] & 0x80) {\n numArray.unshift(0);\n }\n num = new Buffer(numArray);\n }\n\n if (Buffer.isBuffer(num)) {\n var size = num.length;\n if (num.length === 0)\n size++;\n\n var out = new Buffer(size);\n num.copy(out);\n if (num.length === 0)\n out[0] = 0\n return this._createEncoderBuffer(out);\n }\n\n if (num < 0x80)\n return this._createEncoderBuffer(num);\n\n if (num < 0x100)\n return this._createEncoderBuffer([0, num]);\n\n var size = 1;\n for (var i = num; i >= 0x100; i >>= 8)\n size++;\n\n var out = new Array(size);\n for (var i = out.length - 1; i >= 0; i--) {\n out[i] = num & 0xff;\n num >>= 8;\n }\n if(out[0] & 0x80) {\n out.unshift(0);\n }\n\n return this._createEncoderBuffer(new Buffer(out));\n};\n\nDERNode.prototype._encodeBool = function encodeBool(value) {\n return this._createEncoderBuffer(value ? 0xff : 0);\n};\n\nDERNode.prototype._use = function use(entity, obj) {\n if (typeof entity === 'function')\n entity = entity(obj);\n return entity._getEncoder('der').tree;\n};\n\nDERNode.prototype._skipDefault = function skipDefault(dataBuffer, reporter, parent) {\n var state = this._baseState;\n var i;\n if (state['default'] === null)\n return false;\n\n var data = dataBuffer.join();\n if (state.defaultBuffer === undefined)\n state.defaultBuffer = this._encodeValue(state['default'], reporter, parent).join();\n\n if (data.length !== state.defaultBuffer.length)\n return false;\n\n for (i=0; i < data.length; i++)\n if (data[i] !== state.defaultBuffer[i])\n return false;\n\n return true;\n};\n\n// Utility methods\n\nfunction encodeTag(tag, primitive, cls, reporter) {\n var res;\n\n if (tag === 'seqof')\n tag = 'seq';\n else if (tag === 'setof')\n tag = 'set';\n\n if (der.tagByName.hasOwnProperty(tag))\n res = der.tagByName[tag];\n else if (typeof tag === 'number' && (tag | 0) === tag)\n res = tag;\n else\n return reporter.error('Unknown tag: ' + tag);\n\n if (res >= 0x1f)\n return reporter.error('Multi-octet tag encoding unsupported');\n\n if (!primitive)\n res |= 0x20;\n\n res |= (der.tagClassByName[cls || 'universal'] << 6);\n\n return res;\n}\n","var encoders = exports;\n\nencoders.der = require('./der');\nencoders.pem = require('./pem');\n","var inherits = require('inherits');\n\nvar DEREncoder = require('./der');\n\nfunction PEMEncoder(entity) {\n DEREncoder.call(this, entity);\n this.enc = 'pem';\n};\ninherits(PEMEncoder, DEREncoder);\nmodule.exports = PEMEncoder;\n\nPEMEncoder.prototype.encode = function encode(data, options) {\n var buf = DEREncoder.prototype.encode.call(this, data);\n\n var p = buf.toString('base64');\n var out = [ '-----BEGIN ' + options.label + '-----' ];\n for (var i = 0; i < p.length; i += 64)\n out.push(p.slice(i, i + 64));\n out.push('-----END ' + options.label + '-----');\n return out.join('\\n');\n};\n","(function (module, exports) {\n 'use strict';\n\n // Utils\n function assert (val, msg) {\n if (!val) throw new Error(msg || 'Assertion failed');\n }\n\n // Could use `inherits` module, but don't want to move from single file\n // architecture yet.\n function inherits (ctor, superCtor) {\n ctor.super_ = superCtor;\n var TempCtor = function () {};\n TempCtor.prototype = superCtor.prototype;\n ctor.prototype = new TempCtor();\n ctor.prototype.constructor = ctor;\n }\n\n // BN\n\n function BN (number, base, endian) {\n if (BN.isBN(number)) {\n return number;\n }\n\n this.negative = 0;\n this.words = null;\n this.length = 0;\n\n // Reduction context\n this.red = null;\n\n if (number !== null) {\n if (base === 'le' || base === 'be') {\n endian = base;\n base = 10;\n }\n\n this._init(number || 0, base || 10, endian || 'be');\n }\n }\n if (typeof module === 'object') {\n module.exports = BN;\n } else {\n exports.BN = BN;\n }\n\n BN.BN = BN;\n BN.wordSize = 26;\n\n var Buffer;\n try {\n if (typeof window !== 'undefined' && typeof window.Buffer !== 'undefined') {\n Buffer = window.Buffer;\n } else {\n Buffer = require('buffer').Buffer;\n }\n } catch (e) {\n }\n\n BN.isBN = function isBN (num) {\n if (num instanceof BN) {\n return true;\n }\n\n return num !== null && typeof num === 'object' &&\n num.constructor.wordSize === BN.wordSize && Array.isArray(num.words);\n };\n\n BN.max = function max (left, right) {\n if (left.cmp(right) > 0) return left;\n return right;\n };\n\n BN.min = function min (left, right) {\n if (left.cmp(right) < 0) return left;\n return right;\n };\n\n BN.prototype._init = function init (number, base, endian) {\n if (typeof number === 'number') {\n return this._initNumber(number, base, endian);\n }\n\n if (typeof number === 'object') {\n return this._initArray(number, base, endian);\n }\n\n if (base === 'hex') {\n base = 16;\n }\n assert(base === (base | 0) && base >= 2 && base <= 36);\n\n number = number.toString().replace(/\\s+/g, '');\n var start = 0;\n if (number[0] === '-') {\n start++;\n this.negative = 1;\n }\n\n if (start < number.length) {\n if (base === 16) {\n this._parseHex(number, start, endian);\n } else {\n this._parseBase(number, base, start);\n if (endian === 'le') {\n this._initArray(this.toArray(), base, endian);\n }\n }\n }\n };\n\n BN.prototype._initNumber = function _initNumber (number, base, endian) {\n if (number < 0) {\n this.negative = 1;\n number = -number;\n }\n if (number < 0x4000000) {\n this.words = [ number & 0x3ffffff ];\n this.length = 1;\n } else if (number < 0x10000000000000) {\n this.words = [\n number & 0x3ffffff,\n (number / 0x4000000) & 0x3ffffff\n ];\n this.length = 2;\n } else {\n assert(number < 0x20000000000000); // 2 ^ 53 (unsafe)\n this.words = [\n number & 0x3ffffff,\n (number / 0x4000000) & 0x3ffffff,\n 1\n ];\n this.length = 3;\n }\n\n if (endian !== 'le') return;\n\n // Reverse the bytes\n this._initArray(this.toArray(), base, endian);\n };\n\n BN.prototype._initArray = function _initArray (number, base, endian) {\n // Perhaps a Uint8Array\n assert(typeof number.length === 'number');\n if (number.length <= 0) {\n this.words = [ 0 ];\n this.length = 1;\n return this;\n }\n\n this.length = Math.ceil(number.length / 3);\n this.words = new Array(this.length);\n for (var i = 0; i < this.length; i++) {\n this.words[i] = 0;\n }\n\n var j, w;\n var off = 0;\n if (endian === 'be') {\n for (i = number.length - 1, j = 0; i >= 0; i -= 3) {\n w = number[i] | (number[i - 1] << 8) | (number[i - 2] << 16);\n this.words[j] |= (w << off) & 0x3ffffff;\n this.words[j + 1] = (w >>> (26 - off)) & 0x3ffffff;\n off += 24;\n if (off >= 26) {\n off -= 26;\n j++;\n }\n }\n } else if (endian === 'le') {\n for (i = 0, j = 0; i < number.length; i += 3) {\n w = number[i] | (number[i + 1] << 8) | (number[i + 2] << 16);\n this.words[j] |= (w << off) & 0x3ffffff;\n this.words[j + 1] = (w >>> (26 - off)) & 0x3ffffff;\n off += 24;\n if (off >= 26) {\n off -= 26;\n j++;\n }\n }\n }\n return this.strip();\n };\n\n function parseHex4Bits (string, index) {\n var c = string.charCodeAt(index);\n // 'A' - 'F'\n if (c >= 65 && c <= 70) {\n return c - 55;\n // 'a' - 'f'\n } else if (c >= 97 && c <= 102) {\n return c - 87;\n // '0' - '9'\n } else {\n return (c - 48) & 0xf;\n }\n }\n\n function parseHexByte (string, lowerBound, index) {\n var r = parseHex4Bits(string, index);\n if (index - 1 >= lowerBound) {\n r |= parseHex4Bits(string, index - 1) << 4;\n }\n return r;\n }\n\n BN.prototype._parseHex = function _parseHex (number, start, endian) {\n // Create possibly bigger array to ensure that it fits the number\n this.length = Math.ceil((number.length - start) / 6);\n this.words = new Array(this.length);\n for (var i = 0; i < this.length; i++) {\n this.words[i] = 0;\n }\n\n // 24-bits chunks\n var off = 0;\n var j = 0;\n\n var w;\n if (endian === 'be') {\n for (i = number.length - 1; i >= start; i -= 2) {\n w = parseHexByte(number, start, i) << off;\n this.words[j] |= w & 0x3ffffff;\n if (off >= 18) {\n off -= 18;\n j += 1;\n this.words[j] |= w >>> 26;\n } else {\n off += 8;\n }\n }\n } else {\n var parseLength = number.length - start;\n for (i = parseLength % 2 === 0 ? start + 1 : start; i < number.length; i += 2) {\n w = parseHexByte(number, start, i) << off;\n this.words[j] |= w & 0x3ffffff;\n if (off >= 18) {\n off -= 18;\n j += 1;\n this.words[j] |= w >>> 26;\n } else {\n off += 8;\n }\n }\n }\n\n this.strip();\n };\n\n function parseBase (str, start, end, mul) {\n var r = 0;\n var len = Math.min(str.length, end);\n for (var i = start; i < len; i++) {\n var c = str.charCodeAt(i) - 48;\n\n r *= mul;\n\n // 'a'\n if (c >= 49) {\n r += c - 49 + 0xa;\n\n // 'A'\n } else if (c >= 17) {\n r += c - 17 + 0xa;\n\n // '0' - '9'\n } else {\n r += c;\n }\n }\n return r;\n }\n\n BN.prototype._parseBase = function _parseBase (number, base, start) {\n // Initialize as zero\n this.words = [ 0 ];\n this.length = 1;\n\n // Find length of limb in base\n for (var limbLen = 0, limbPow = 1; limbPow <= 0x3ffffff; limbPow *= base) {\n limbLen++;\n }\n limbLen--;\n limbPow = (limbPow / base) | 0;\n\n var total = number.length - start;\n var mod = total % limbLen;\n var end = Math.min(total, total - mod) + start;\n\n var word = 0;\n for (var i = start; i < end; i += limbLen) {\n word = parseBase(number, i, i + limbLen, base);\n\n this.imuln(limbPow);\n if (this.words[0] + word < 0x4000000) {\n this.words[0] += word;\n } else {\n this._iaddn(word);\n }\n }\n\n if (mod !== 0) {\n var pow = 1;\n word = parseBase(number, i, number.length, base);\n\n for (i = 0; i < mod; i++) {\n pow *= base;\n }\n\n this.imuln(pow);\n if (this.words[0] + word < 0x4000000) {\n this.words[0] += word;\n } else {\n this._iaddn(word);\n }\n }\n\n this.strip();\n };\n\n BN.prototype.copy = function copy (dest) {\n dest.words = new Array(this.length);\n for (var i = 0; i < this.length; i++) {\n dest.words[i] = this.words[i];\n }\n dest.length = this.length;\n dest.negative = this.negative;\n dest.red = this.red;\n };\n\n BN.prototype.clone = function clone () {\n var r = new BN(null);\n this.copy(r);\n return r;\n };\n\n BN.prototype._expand = function _expand (size) {\n while (this.length < size) {\n this.words[this.length++] = 0;\n }\n return this;\n };\n\n // Remove leading `0` from `this`\n BN.prototype.strip = function strip () {\n while (this.length > 1 && this.words[this.length - 1] === 0) {\n this.length--;\n }\n return this._normSign();\n };\n\n BN.prototype._normSign = function _normSign () {\n // -0 = 0\n if (this.length === 1 && this.words[0] === 0) {\n this.negative = 0;\n }\n return this;\n };\n\n BN.prototype.inspect = function inspect () {\n return (this.red ? '';\n };\n\n /*\n\n var zeros = [];\n var groupSizes = [];\n var groupBases = [];\n\n var s = '';\n var i = -1;\n while (++i < BN.wordSize) {\n zeros[i] = s;\n s += '0';\n }\n groupSizes[0] = 0;\n groupSizes[1] = 0;\n groupBases[0] = 0;\n groupBases[1] = 0;\n var base = 2 - 1;\n while (++base < 36 + 1) {\n var groupSize = 0;\n var groupBase = 1;\n while (groupBase < (1 << BN.wordSize) / base) {\n groupBase *= base;\n groupSize += 1;\n }\n groupSizes[base] = groupSize;\n groupBases[base] = groupBase;\n }\n\n */\n\n var zeros = [\n '',\n '0',\n '00',\n '000',\n '0000',\n '00000',\n '000000',\n '0000000',\n '00000000',\n '000000000',\n '0000000000',\n '00000000000',\n '000000000000',\n '0000000000000',\n '00000000000000',\n '000000000000000',\n '0000000000000000',\n '00000000000000000',\n '000000000000000000',\n '0000000000000000000',\n '00000000000000000000',\n '000000000000000000000',\n '0000000000000000000000',\n '00000000000000000000000',\n '000000000000000000000000',\n '0000000000000000000000000'\n ];\n\n var groupSizes = [\n 0, 0,\n 25, 16, 12, 11, 10, 9, 8,\n 8, 7, 7, 7, 7, 6, 6,\n 6, 6, 6, 6, 6, 5, 5,\n 5, 5, 5, 5, 5, 5, 5,\n 5, 5, 5, 5, 5, 5, 5\n ];\n\n var groupBases = [\n 0, 0,\n 33554432, 43046721, 16777216, 48828125, 60466176, 40353607, 16777216,\n 43046721, 10000000, 19487171, 35831808, 62748517, 7529536, 11390625,\n 16777216, 24137569, 34012224, 47045881, 64000000, 4084101, 5153632,\n 6436343, 7962624, 9765625, 11881376, 14348907, 17210368, 20511149,\n 24300000, 28629151, 33554432, 39135393, 45435424, 52521875, 60466176\n ];\n\n BN.prototype.toString = function toString (base, padding) {\n base = base || 10;\n padding = padding | 0 || 1;\n\n var out;\n if (base === 16 || base === 'hex') {\n out = '';\n var off = 0;\n var carry = 0;\n for (var i = 0; i < this.length; i++) {\n var w = this.words[i];\n var word = (((w << off) | carry) & 0xffffff).toString(16);\n carry = (w >>> (24 - off)) & 0xffffff;\n if (carry !== 0 || i !== this.length - 1) {\n out = zeros[6 - word.length] + word + out;\n } else {\n out = word + out;\n }\n off += 2;\n if (off >= 26) {\n off -= 26;\n i--;\n }\n }\n if (carry !== 0) {\n out = carry.toString(16) + out;\n }\n while (out.length % padding !== 0) {\n out = '0' + out;\n }\n if (this.negative !== 0) {\n out = '-' + out;\n }\n return out;\n }\n\n if (base === (base | 0) && base >= 2 && base <= 36) {\n // var groupSize = Math.floor(BN.wordSize * Math.LN2 / Math.log(base));\n var groupSize = groupSizes[base];\n // var groupBase = Math.pow(base, groupSize);\n var groupBase = groupBases[base];\n out = '';\n var c = this.clone();\n c.negative = 0;\n while (!c.isZero()) {\n var r = c.modn(groupBase).toString(base);\n c = c.idivn(groupBase);\n\n if (!c.isZero()) {\n out = zeros[groupSize - r.length] + r + out;\n } else {\n out = r + out;\n }\n }\n if (this.isZero()) {\n out = '0' + out;\n }\n while (out.length % padding !== 0) {\n out = '0' + out;\n }\n if (this.negative !== 0) {\n out = '-' + out;\n }\n return out;\n }\n\n assert(false, 'Base should be between 2 and 36');\n };\n\n BN.prototype.toNumber = function toNumber () {\n var ret = this.words[0];\n if (this.length === 2) {\n ret += this.words[1] * 0x4000000;\n } else if (this.length === 3 && this.words[2] === 0x01) {\n // NOTE: at this stage it is known that the top bit is set\n ret += 0x10000000000000 + (this.words[1] * 0x4000000);\n } else if (this.length > 2) {\n assert(false, 'Number can only safely store up to 53 bits');\n }\n return (this.negative !== 0) ? -ret : ret;\n };\n\n BN.prototype.toJSON = function toJSON () {\n return this.toString(16);\n };\n\n BN.prototype.toBuffer = function toBuffer (endian, length) {\n assert(typeof Buffer !== 'undefined');\n return this.toArrayLike(Buffer, endian, length);\n };\n\n BN.prototype.toArray = function toArray (endian, length) {\n return this.toArrayLike(Array, endian, length);\n };\n\n BN.prototype.toArrayLike = function toArrayLike (ArrayType, endian, length) {\n var byteLength = this.byteLength();\n var reqLength = length || Math.max(1, byteLength);\n assert(byteLength <= reqLength, 'byte array longer than desired length');\n assert(reqLength > 0, 'Requested array length <= 0');\n\n this.strip();\n var littleEndian = endian === 'le';\n var res = new ArrayType(reqLength);\n\n var b, i;\n var q = this.clone();\n if (!littleEndian) {\n // Assume big-endian\n for (i = 0; i < reqLength - byteLength; i++) {\n res[i] = 0;\n }\n\n for (i = 0; !q.isZero(); i++) {\n b = q.andln(0xff);\n q.iushrn(8);\n\n res[reqLength - i - 1] = b;\n }\n } else {\n for (i = 0; !q.isZero(); i++) {\n b = q.andln(0xff);\n q.iushrn(8);\n\n res[i] = b;\n }\n\n for (; i < reqLength; i++) {\n res[i] = 0;\n }\n }\n\n return res;\n };\n\n if (Math.clz32) {\n BN.prototype._countBits = function _countBits (w) {\n return 32 - Math.clz32(w);\n };\n } else {\n BN.prototype._countBits = function _countBits (w) {\n var t = w;\n var r = 0;\n if (t >= 0x1000) {\n r += 13;\n t >>>= 13;\n }\n if (t >= 0x40) {\n r += 7;\n t >>>= 7;\n }\n if (t >= 0x8) {\n r += 4;\n t >>>= 4;\n }\n if (t >= 0x02) {\n r += 2;\n t >>>= 2;\n }\n return r + t;\n };\n }\n\n BN.prototype._zeroBits = function _zeroBits (w) {\n // Short-cut\n if (w === 0) return 26;\n\n var t = w;\n var r = 0;\n if ((t & 0x1fff) === 0) {\n r += 13;\n t >>>= 13;\n }\n if ((t & 0x7f) === 0) {\n r += 7;\n t >>>= 7;\n }\n if ((t & 0xf) === 0) {\n r += 4;\n t >>>= 4;\n }\n if ((t & 0x3) === 0) {\n r += 2;\n t >>>= 2;\n }\n if ((t & 0x1) === 0) {\n r++;\n }\n return r;\n };\n\n // Return number of used bits in a BN\n BN.prototype.bitLength = function bitLength () {\n var w = this.words[this.length - 1];\n var hi = this._countBits(w);\n return (this.length - 1) * 26 + hi;\n };\n\n function toBitArray (num) {\n var w = new Array(num.bitLength());\n\n for (var bit = 0; bit < w.length; bit++) {\n var off = (bit / 26) | 0;\n var wbit = bit % 26;\n\n w[bit] = (num.words[off] & (1 << wbit)) >>> wbit;\n }\n\n return w;\n }\n\n // Number of trailing zero bits\n BN.prototype.zeroBits = function zeroBits () {\n if (this.isZero()) return 0;\n\n var r = 0;\n for (var i = 0; i < this.length; i++) {\n var b = this._zeroBits(this.words[i]);\n r += b;\n if (b !== 26) break;\n }\n return r;\n };\n\n BN.prototype.byteLength = function byteLength () {\n return Math.ceil(this.bitLength() / 8);\n };\n\n BN.prototype.toTwos = function toTwos (width) {\n if (this.negative !== 0) {\n return this.abs().inotn(width).iaddn(1);\n }\n return this.clone();\n };\n\n BN.prototype.fromTwos = function fromTwos (width) {\n if (this.testn(width - 1)) {\n return this.notn(width).iaddn(1).ineg();\n }\n return this.clone();\n };\n\n BN.prototype.isNeg = function isNeg () {\n return this.negative !== 0;\n };\n\n // Return negative clone of `this`\n BN.prototype.neg = function neg () {\n return this.clone().ineg();\n };\n\n BN.prototype.ineg = function ineg () {\n if (!this.isZero()) {\n this.negative ^= 1;\n }\n\n return this;\n };\n\n // Or `num` with `this` in-place\n BN.prototype.iuor = function iuor (num) {\n while (this.length < num.length) {\n this.words[this.length++] = 0;\n }\n\n for (var i = 0; i < num.length; i++) {\n this.words[i] = this.words[i] | num.words[i];\n }\n\n return this.strip();\n };\n\n BN.prototype.ior = function ior (num) {\n assert((this.negative | num.negative) === 0);\n return this.iuor(num);\n };\n\n // Or `num` with `this`\n BN.prototype.or = function or (num) {\n if (this.length > num.length) return this.clone().ior(num);\n return num.clone().ior(this);\n };\n\n BN.prototype.uor = function uor (num) {\n if (this.length > num.length) return this.clone().iuor(num);\n return num.clone().iuor(this);\n };\n\n // And `num` with `this` in-place\n BN.prototype.iuand = function iuand (num) {\n // b = min-length(num, this)\n var b;\n if (this.length > num.length) {\n b = num;\n } else {\n b = this;\n }\n\n for (var i = 0; i < b.length; i++) {\n this.words[i] = this.words[i] & num.words[i];\n }\n\n this.length = b.length;\n\n return this.strip();\n };\n\n BN.prototype.iand = function iand (num) {\n assert((this.negative | num.negative) === 0);\n return this.iuand(num);\n };\n\n // And `num` with `this`\n BN.prototype.and = function and (num) {\n if (this.length > num.length) return this.clone().iand(num);\n return num.clone().iand(this);\n };\n\n BN.prototype.uand = function uand (num) {\n if (this.length > num.length) return this.clone().iuand(num);\n return num.clone().iuand(this);\n };\n\n // Xor `num` with `this` in-place\n BN.prototype.iuxor = function iuxor (num) {\n // a.length > b.length\n var a;\n var b;\n if (this.length > num.length) {\n a = this;\n b = num;\n } else {\n a = num;\n b = this;\n }\n\n for (var i = 0; i < b.length; i++) {\n this.words[i] = a.words[i] ^ b.words[i];\n }\n\n if (this !== a) {\n for (; i < a.length; i++) {\n this.words[i] = a.words[i];\n }\n }\n\n this.length = a.length;\n\n return this.strip();\n };\n\n BN.prototype.ixor = function ixor (num) {\n assert((this.negative | num.negative) === 0);\n return this.iuxor(num);\n };\n\n // Xor `num` with `this`\n BN.prototype.xor = function xor (num) {\n if (this.length > num.length) return this.clone().ixor(num);\n return num.clone().ixor(this);\n };\n\n BN.prototype.uxor = function uxor (num) {\n if (this.length > num.length) return this.clone().iuxor(num);\n return num.clone().iuxor(this);\n };\n\n // Not ``this`` with ``width`` bitwidth\n BN.prototype.inotn = function inotn (width) {\n assert(typeof width === 'number' && width >= 0);\n\n var bytesNeeded = Math.ceil(width / 26) | 0;\n var bitsLeft = width % 26;\n\n // Extend the buffer with leading zeroes\n this._expand(bytesNeeded);\n\n if (bitsLeft > 0) {\n bytesNeeded--;\n }\n\n // Handle complete words\n for (var i = 0; i < bytesNeeded; i++) {\n this.words[i] = ~this.words[i] & 0x3ffffff;\n }\n\n // Handle the residue\n if (bitsLeft > 0) {\n this.words[i] = ~this.words[i] & (0x3ffffff >> (26 - bitsLeft));\n }\n\n // And remove leading zeroes\n return this.strip();\n };\n\n BN.prototype.notn = function notn (width) {\n return this.clone().inotn(width);\n };\n\n // Set `bit` of `this`\n BN.prototype.setn = function setn (bit, val) {\n assert(typeof bit === 'number' && bit >= 0);\n\n var off = (bit / 26) | 0;\n var wbit = bit % 26;\n\n this._expand(off + 1);\n\n if (val) {\n this.words[off] = this.words[off] | (1 << wbit);\n } else {\n this.words[off] = this.words[off] & ~(1 << wbit);\n }\n\n return this.strip();\n };\n\n // Add `num` to `this` in-place\n BN.prototype.iadd = function iadd (num) {\n var r;\n\n // negative + positive\n if (this.negative !== 0 && num.negative === 0) {\n this.negative = 0;\n r = this.isub(num);\n this.negative ^= 1;\n return this._normSign();\n\n // positive + negative\n } else if (this.negative === 0 && num.negative !== 0) {\n num.negative = 0;\n r = this.isub(num);\n num.negative = 1;\n return r._normSign();\n }\n\n // a.length > b.length\n var a, b;\n if (this.length > num.length) {\n a = this;\n b = num;\n } else {\n a = num;\n b = this;\n }\n\n var carry = 0;\n for (var i = 0; i < b.length; i++) {\n r = (a.words[i] | 0) + (b.words[i] | 0) + carry;\n this.words[i] = r & 0x3ffffff;\n carry = r >>> 26;\n }\n for (; carry !== 0 && i < a.length; i++) {\n r = (a.words[i] | 0) + carry;\n this.words[i] = r & 0x3ffffff;\n carry = r >>> 26;\n }\n\n this.length = a.length;\n if (carry !== 0) {\n this.words[this.length] = carry;\n this.length++;\n // Copy the rest of the words\n } else if (a !== this) {\n for (; i < a.length; i++) {\n this.words[i] = a.words[i];\n }\n }\n\n return this;\n };\n\n // Add `num` to `this`\n BN.prototype.add = function add (num) {\n var res;\n if (num.negative !== 0 && this.negative === 0) {\n num.negative = 0;\n res = this.sub(num);\n num.negative ^= 1;\n return res;\n } else if (num.negative === 0 && this.negative !== 0) {\n this.negative = 0;\n res = num.sub(this);\n this.negative = 1;\n return res;\n }\n\n if (this.length > num.length) return this.clone().iadd(num);\n\n return num.clone().iadd(this);\n };\n\n // Subtract `num` from `this` in-place\n BN.prototype.isub = function isub (num) {\n // this - (-num) = this + num\n if (num.negative !== 0) {\n num.negative = 0;\n var r = this.iadd(num);\n num.negative = 1;\n return r._normSign();\n\n // -this - num = -(this + num)\n } else if (this.negative !== 0) {\n this.negative = 0;\n this.iadd(num);\n this.negative = 1;\n return this._normSign();\n }\n\n // At this point both numbers are positive\n var cmp = this.cmp(num);\n\n // Optimization - zeroify\n if (cmp === 0) {\n this.negative = 0;\n this.length = 1;\n this.words[0] = 0;\n return this;\n }\n\n // a > b\n var a, b;\n if (cmp > 0) {\n a = this;\n b = num;\n } else {\n a = num;\n b = this;\n }\n\n var carry = 0;\n for (var i = 0; i < b.length; i++) {\n r = (a.words[i] | 0) - (b.words[i] | 0) + carry;\n carry = r >> 26;\n this.words[i] = r & 0x3ffffff;\n }\n for (; carry !== 0 && i < a.length; i++) {\n r = (a.words[i] | 0) + carry;\n carry = r >> 26;\n this.words[i] = r & 0x3ffffff;\n }\n\n // Copy rest of the words\n if (carry === 0 && i < a.length && a !== this) {\n for (; i < a.length; i++) {\n this.words[i] = a.words[i];\n }\n }\n\n this.length = Math.max(this.length, i);\n\n if (a !== this) {\n this.negative = 1;\n }\n\n return this.strip();\n };\n\n // Subtract `num` from `this`\n BN.prototype.sub = function sub (num) {\n return this.clone().isub(num);\n };\n\n function smallMulTo (self, num, out) {\n out.negative = num.negative ^ self.negative;\n var len = (self.length + num.length) | 0;\n out.length = len;\n len = (len - 1) | 0;\n\n // Peel one iteration (compiler can't do it, because of code complexity)\n var a = self.words[0] | 0;\n var b = num.words[0] | 0;\n var r = a * b;\n\n var lo = r & 0x3ffffff;\n var carry = (r / 0x4000000) | 0;\n out.words[0] = lo;\n\n for (var k = 1; k < len; k++) {\n // Sum all words with the same `i + j = k` and accumulate `ncarry`,\n // note that ncarry could be >= 0x3ffffff\n var ncarry = carry >>> 26;\n var rword = carry & 0x3ffffff;\n var maxJ = Math.min(k, num.length - 1);\n for (var j = Math.max(0, k - self.length + 1); j <= maxJ; j++) {\n var i = (k - j) | 0;\n a = self.words[i] | 0;\n b = num.words[j] | 0;\n r = a * b + rword;\n ncarry += (r / 0x4000000) | 0;\n rword = r & 0x3ffffff;\n }\n out.words[k] = rword | 0;\n carry = ncarry | 0;\n }\n if (carry !== 0) {\n out.words[k] = carry | 0;\n } else {\n out.length--;\n }\n\n return out.strip();\n }\n\n // TODO(indutny): it may be reasonable to omit it for users who don't need\n // to work with 256-bit numbers, otherwise it gives 20% improvement for 256-bit\n // multiplication (like elliptic secp256k1).\n var comb10MulTo = function comb10MulTo (self, num, out) {\n var a = self.words;\n var b = num.words;\n var o = out.words;\n var c = 0;\n var lo;\n var mid;\n var hi;\n var a0 = a[0] | 0;\n var al0 = a0 & 0x1fff;\n var ah0 = a0 >>> 13;\n var a1 = a[1] | 0;\n var al1 = a1 & 0x1fff;\n var ah1 = a1 >>> 13;\n var a2 = a[2] | 0;\n var al2 = a2 & 0x1fff;\n var ah2 = a2 >>> 13;\n var a3 = a[3] | 0;\n var al3 = a3 & 0x1fff;\n var ah3 = a3 >>> 13;\n var a4 = a[4] | 0;\n var al4 = a4 & 0x1fff;\n var ah4 = a4 >>> 13;\n var a5 = a[5] | 0;\n var al5 = a5 & 0x1fff;\n var ah5 = a5 >>> 13;\n var a6 = a[6] | 0;\n var al6 = a6 & 0x1fff;\n var ah6 = a6 >>> 13;\n var a7 = a[7] | 0;\n var al7 = a7 & 0x1fff;\n var ah7 = a7 >>> 13;\n var a8 = a[8] | 0;\n var al8 = a8 & 0x1fff;\n var ah8 = a8 >>> 13;\n var a9 = a[9] | 0;\n var al9 = a9 & 0x1fff;\n var ah9 = a9 >>> 13;\n var b0 = b[0] | 0;\n var bl0 = b0 & 0x1fff;\n var bh0 = b0 >>> 13;\n var b1 = b[1] | 0;\n var bl1 = b1 & 0x1fff;\n var bh1 = b1 >>> 13;\n var b2 = b[2] | 0;\n var bl2 = b2 & 0x1fff;\n var bh2 = b2 >>> 13;\n var b3 = b[3] | 0;\n var bl3 = b3 & 0x1fff;\n var bh3 = b3 >>> 13;\n var b4 = b[4] | 0;\n var bl4 = b4 & 0x1fff;\n var bh4 = b4 >>> 13;\n var b5 = b[5] | 0;\n var bl5 = b5 & 0x1fff;\n var bh5 = b5 >>> 13;\n var b6 = b[6] | 0;\n var bl6 = b6 & 0x1fff;\n var bh6 = b6 >>> 13;\n var b7 = b[7] | 0;\n var bl7 = b7 & 0x1fff;\n var bh7 = b7 >>> 13;\n var b8 = b[8] | 0;\n var bl8 = b8 & 0x1fff;\n var bh8 = b8 >>> 13;\n var b9 = b[9] | 0;\n var bl9 = b9 & 0x1fff;\n var bh9 = b9 >>> 13;\n\n out.negative = self.negative ^ num.negative;\n out.length = 19;\n /* k = 0 */\n lo = Math.imul(al0, bl0);\n mid = Math.imul(al0, bh0);\n mid = (mid + Math.imul(ah0, bl0)) | 0;\n hi = Math.imul(ah0, bh0);\n var w0 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w0 >>> 26)) | 0;\n w0 &= 0x3ffffff;\n /* k = 1 */\n lo = Math.imul(al1, bl0);\n mid = Math.imul(al1, bh0);\n mid = (mid + Math.imul(ah1, bl0)) | 0;\n hi = Math.imul(ah1, bh0);\n lo = (lo + Math.imul(al0, bl1)) | 0;\n mid = (mid + Math.imul(al0, bh1)) | 0;\n mid = (mid + Math.imul(ah0, bl1)) | 0;\n hi = (hi + Math.imul(ah0, bh1)) | 0;\n var w1 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w1 >>> 26)) | 0;\n w1 &= 0x3ffffff;\n /* k = 2 */\n lo = Math.imul(al2, bl0);\n mid = Math.imul(al2, bh0);\n mid = (mid + Math.imul(ah2, bl0)) | 0;\n hi = Math.imul(ah2, bh0);\n lo = (lo + Math.imul(al1, bl1)) | 0;\n mid = (mid + Math.imul(al1, bh1)) | 0;\n mid = (mid + Math.imul(ah1, bl1)) | 0;\n hi = (hi + Math.imul(ah1, bh1)) | 0;\n lo = (lo + Math.imul(al0, bl2)) | 0;\n mid = (mid + Math.imul(al0, bh2)) | 0;\n mid = (mid + Math.imul(ah0, bl2)) | 0;\n hi = (hi + Math.imul(ah0, bh2)) | 0;\n var w2 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w2 >>> 26)) | 0;\n w2 &= 0x3ffffff;\n /* k = 3 */\n lo = Math.imul(al3, bl0);\n mid = Math.imul(al3, bh0);\n mid = (mid + Math.imul(ah3, bl0)) | 0;\n hi = Math.imul(ah3, bh0);\n lo = (lo + Math.imul(al2, bl1)) | 0;\n mid = (mid + Math.imul(al2, bh1)) | 0;\n mid = (mid + Math.imul(ah2, bl1)) | 0;\n hi = (hi + Math.imul(ah2, bh1)) | 0;\n lo = (lo + Math.imul(al1, bl2)) | 0;\n mid = (mid + Math.imul(al1, bh2)) | 0;\n mid = (mid + Math.imul(ah1, bl2)) | 0;\n hi = (hi + Math.imul(ah1, bh2)) | 0;\n lo = (lo + Math.imul(al0, bl3)) | 0;\n mid = (mid + Math.imul(al0, bh3)) | 0;\n mid = (mid + Math.imul(ah0, bl3)) | 0;\n hi = (hi + Math.imul(ah0, bh3)) | 0;\n var w3 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w3 >>> 26)) | 0;\n w3 &= 0x3ffffff;\n /* k = 4 */\n lo = Math.imul(al4, bl0);\n mid = Math.imul(al4, bh0);\n mid = (mid + Math.imul(ah4, bl0)) | 0;\n hi = Math.imul(ah4, bh0);\n lo = (lo + Math.imul(al3, bl1)) | 0;\n mid = (mid + Math.imul(al3, bh1)) | 0;\n mid = (mid + Math.imul(ah3, bl1)) | 0;\n hi = (hi + Math.imul(ah3, bh1)) | 0;\n lo = (lo + Math.imul(al2, bl2)) | 0;\n mid = (mid + Math.imul(al2, bh2)) | 0;\n mid = (mid + Math.imul(ah2, bl2)) | 0;\n hi = (hi + Math.imul(ah2, bh2)) | 0;\n lo = (lo + Math.imul(al1, bl3)) | 0;\n mid = (mid + Math.imul(al1, bh3)) | 0;\n mid = (mid + Math.imul(ah1, bl3)) | 0;\n hi = (hi + Math.imul(ah1, bh3)) | 0;\n lo = (lo + Math.imul(al0, bl4)) | 0;\n mid = (mid + Math.imul(al0, bh4)) | 0;\n mid = (mid + Math.imul(ah0, bl4)) | 0;\n hi = (hi + Math.imul(ah0, bh4)) | 0;\n var w4 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w4 >>> 26)) | 0;\n w4 &= 0x3ffffff;\n /* k = 5 */\n lo = Math.imul(al5, bl0);\n mid = Math.imul(al5, bh0);\n mid = (mid + Math.imul(ah5, bl0)) | 0;\n hi = Math.imul(ah5, bh0);\n lo = (lo + Math.imul(al4, bl1)) | 0;\n mid = (mid + Math.imul(al4, bh1)) | 0;\n mid = (mid + Math.imul(ah4, bl1)) | 0;\n hi = (hi + Math.imul(ah4, bh1)) | 0;\n lo = (lo + Math.imul(al3, bl2)) | 0;\n mid = (mid + Math.imul(al3, bh2)) | 0;\n mid = (mid + Math.imul(ah3, bl2)) | 0;\n hi = (hi + Math.imul(ah3, bh2)) | 0;\n lo = (lo + Math.imul(al2, bl3)) | 0;\n mid = (mid + Math.imul(al2, bh3)) | 0;\n mid = (mid + Math.imul(ah2, bl3)) | 0;\n hi = (hi + Math.imul(ah2, bh3)) | 0;\n lo = (lo + Math.imul(al1, bl4)) | 0;\n mid = (mid + Math.imul(al1, bh4)) | 0;\n mid = (mid + Math.imul(ah1, bl4)) | 0;\n hi = (hi + Math.imul(ah1, bh4)) | 0;\n lo = (lo + Math.imul(al0, bl5)) | 0;\n mid = (mid + Math.imul(al0, bh5)) | 0;\n mid = (mid + Math.imul(ah0, bl5)) | 0;\n hi = (hi + Math.imul(ah0, bh5)) | 0;\n var w5 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w5 >>> 26)) | 0;\n w5 &= 0x3ffffff;\n /* k = 6 */\n lo = Math.imul(al6, bl0);\n mid = Math.imul(al6, bh0);\n mid = (mid + Math.imul(ah6, bl0)) | 0;\n hi = Math.imul(ah6, bh0);\n lo = (lo + Math.imul(al5, bl1)) | 0;\n mid = (mid + Math.imul(al5, bh1)) | 0;\n mid = (mid + Math.imul(ah5, bl1)) | 0;\n hi = (hi + Math.imul(ah5, bh1)) | 0;\n lo = (lo + Math.imul(al4, bl2)) | 0;\n mid = (mid + Math.imul(al4, bh2)) | 0;\n mid = (mid + Math.imul(ah4, bl2)) | 0;\n hi = (hi + Math.imul(ah4, bh2)) | 0;\n lo = (lo + Math.imul(al3, bl3)) | 0;\n mid = (mid + Math.imul(al3, bh3)) | 0;\n mid = (mid + Math.imul(ah3, bl3)) | 0;\n hi = (hi + Math.imul(ah3, bh3)) | 0;\n lo = (lo + Math.imul(al2, bl4)) | 0;\n mid = (mid + Math.imul(al2, bh4)) | 0;\n mid = (mid + Math.imul(ah2, bl4)) | 0;\n hi = (hi + Math.imul(ah2, bh4)) | 0;\n lo = (lo + Math.imul(al1, bl5)) | 0;\n mid = (mid + Math.imul(al1, bh5)) | 0;\n mid = (mid + Math.imul(ah1, bl5)) | 0;\n hi = (hi + Math.imul(ah1, bh5)) | 0;\n lo = (lo + Math.imul(al0, bl6)) | 0;\n mid = (mid + Math.imul(al0, bh6)) | 0;\n mid = (mid + Math.imul(ah0, bl6)) | 0;\n hi = (hi + Math.imul(ah0, bh6)) | 0;\n var w6 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w6 >>> 26)) | 0;\n w6 &= 0x3ffffff;\n /* k = 7 */\n lo = Math.imul(al7, bl0);\n mid = Math.imul(al7, bh0);\n mid = (mid + Math.imul(ah7, bl0)) | 0;\n hi = Math.imul(ah7, bh0);\n lo = (lo + Math.imul(al6, bl1)) | 0;\n mid = (mid + Math.imul(al6, bh1)) | 0;\n mid = (mid + Math.imul(ah6, bl1)) | 0;\n hi = (hi + Math.imul(ah6, bh1)) | 0;\n lo = (lo + Math.imul(al5, bl2)) | 0;\n mid = (mid + Math.imul(al5, bh2)) | 0;\n mid = (mid + Math.imul(ah5, bl2)) | 0;\n hi = (hi + Math.imul(ah5, bh2)) | 0;\n lo = (lo + Math.imul(al4, bl3)) | 0;\n mid = (mid + Math.imul(al4, bh3)) | 0;\n mid = (mid + Math.imul(ah4, bl3)) | 0;\n hi = (hi + Math.imul(ah4, bh3)) | 0;\n lo = (lo + Math.imul(al3, bl4)) | 0;\n mid = (mid + Math.imul(al3, bh4)) | 0;\n mid = (mid + Math.imul(ah3, bl4)) | 0;\n hi = (hi + Math.imul(ah3, bh4)) | 0;\n lo = (lo + Math.imul(al2, bl5)) | 0;\n mid = (mid + Math.imul(al2, bh5)) | 0;\n mid = (mid + Math.imul(ah2, bl5)) | 0;\n hi = (hi + Math.imul(ah2, bh5)) | 0;\n lo = (lo + Math.imul(al1, bl6)) | 0;\n mid = (mid + Math.imul(al1, bh6)) | 0;\n mid = (mid + Math.imul(ah1, bl6)) | 0;\n hi = (hi + Math.imul(ah1, bh6)) | 0;\n lo = (lo + Math.imul(al0, bl7)) | 0;\n mid = (mid + Math.imul(al0, bh7)) | 0;\n mid = (mid + Math.imul(ah0, bl7)) | 0;\n hi = (hi + Math.imul(ah0, bh7)) | 0;\n var w7 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w7 >>> 26)) | 0;\n w7 &= 0x3ffffff;\n /* k = 8 */\n lo = Math.imul(al8, bl0);\n mid = Math.imul(al8, bh0);\n mid = (mid + Math.imul(ah8, bl0)) | 0;\n hi = Math.imul(ah8, bh0);\n lo = (lo + Math.imul(al7, bl1)) | 0;\n mid = (mid + Math.imul(al7, bh1)) | 0;\n mid = (mid + Math.imul(ah7, bl1)) | 0;\n hi = (hi + Math.imul(ah7, bh1)) | 0;\n lo = (lo + Math.imul(al6, bl2)) | 0;\n mid = (mid + Math.imul(al6, bh2)) | 0;\n mid = (mid + Math.imul(ah6, bl2)) | 0;\n hi = (hi + Math.imul(ah6, bh2)) | 0;\n lo = (lo + Math.imul(al5, bl3)) | 0;\n mid = (mid + Math.imul(al5, bh3)) | 0;\n mid = (mid + Math.imul(ah5, bl3)) | 0;\n hi = (hi + Math.imul(ah5, bh3)) | 0;\n lo = (lo + Math.imul(al4, bl4)) | 0;\n mid = (mid + Math.imul(al4, bh4)) | 0;\n mid = (mid + Math.imul(ah4, bl4)) | 0;\n hi = (hi + Math.imul(ah4, bh4)) | 0;\n lo = (lo + Math.imul(al3, bl5)) | 0;\n mid = (mid + Math.imul(al3, bh5)) | 0;\n mid = (mid + Math.imul(ah3, bl5)) | 0;\n hi = (hi + Math.imul(ah3, bh5)) | 0;\n lo = (lo + Math.imul(al2, bl6)) | 0;\n mid = (mid + Math.imul(al2, bh6)) | 0;\n mid = (mid + Math.imul(ah2, bl6)) | 0;\n hi = (hi + Math.imul(ah2, bh6)) | 0;\n lo = (lo + Math.imul(al1, bl7)) | 0;\n mid = (mid + Math.imul(al1, bh7)) | 0;\n mid = (mid + Math.imul(ah1, bl7)) | 0;\n hi = (hi + Math.imul(ah1, bh7)) | 0;\n lo = (lo + Math.imul(al0, bl8)) | 0;\n mid = (mid + Math.imul(al0, bh8)) | 0;\n mid = (mid + Math.imul(ah0, bl8)) | 0;\n hi = (hi + Math.imul(ah0, bh8)) | 0;\n var w8 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w8 >>> 26)) | 0;\n w8 &= 0x3ffffff;\n /* k = 9 */\n lo = Math.imul(al9, bl0);\n mid = Math.imul(al9, bh0);\n mid = (mid + Math.imul(ah9, bl0)) | 0;\n hi = Math.imul(ah9, bh0);\n lo = (lo + Math.imul(al8, bl1)) | 0;\n mid = (mid + Math.imul(al8, bh1)) | 0;\n mid = (mid + Math.imul(ah8, bl1)) | 0;\n hi = (hi + Math.imul(ah8, bh1)) | 0;\n lo = (lo + Math.imul(al7, bl2)) | 0;\n mid = (mid + Math.imul(al7, bh2)) | 0;\n mid = (mid + Math.imul(ah7, bl2)) | 0;\n hi = (hi + Math.imul(ah7, bh2)) | 0;\n lo = (lo + Math.imul(al6, bl3)) | 0;\n mid = (mid + Math.imul(al6, bh3)) | 0;\n mid = (mid + Math.imul(ah6, bl3)) | 0;\n hi = (hi + Math.imul(ah6, bh3)) | 0;\n lo = (lo + Math.imul(al5, bl4)) | 0;\n mid = (mid + Math.imul(al5, bh4)) | 0;\n mid = (mid + Math.imul(ah5, bl4)) | 0;\n hi = (hi + Math.imul(ah5, bh4)) | 0;\n lo = (lo + Math.imul(al4, bl5)) | 0;\n mid = (mid + Math.imul(al4, bh5)) | 0;\n mid = (mid + Math.imul(ah4, bl5)) | 0;\n hi = (hi + Math.imul(ah4, bh5)) | 0;\n lo = (lo + Math.imul(al3, bl6)) | 0;\n mid = (mid + Math.imul(al3, bh6)) | 0;\n mid = (mid + Math.imul(ah3, bl6)) | 0;\n hi = (hi + Math.imul(ah3, bh6)) | 0;\n lo = (lo + Math.imul(al2, bl7)) | 0;\n mid = (mid + Math.imul(al2, bh7)) | 0;\n mid = (mid + Math.imul(ah2, bl7)) | 0;\n hi = (hi + Math.imul(ah2, bh7)) | 0;\n lo = (lo + Math.imul(al1, bl8)) | 0;\n mid = (mid + Math.imul(al1, bh8)) | 0;\n mid = (mid + Math.imul(ah1, bl8)) | 0;\n hi = (hi + Math.imul(ah1, bh8)) | 0;\n lo = (lo + Math.imul(al0, bl9)) | 0;\n mid = (mid + Math.imul(al0, bh9)) | 0;\n mid = (mid + Math.imul(ah0, bl9)) | 0;\n hi = (hi + Math.imul(ah0, bh9)) | 0;\n var w9 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w9 >>> 26)) | 0;\n w9 &= 0x3ffffff;\n /* k = 10 */\n lo = Math.imul(al9, bl1);\n mid = Math.imul(al9, bh1);\n mid = (mid + Math.imul(ah9, bl1)) | 0;\n hi = Math.imul(ah9, bh1);\n lo = (lo + Math.imul(al8, bl2)) | 0;\n mid = (mid + Math.imul(al8, bh2)) | 0;\n mid = (mid + Math.imul(ah8, bl2)) | 0;\n hi = (hi + Math.imul(ah8, bh2)) | 0;\n lo = (lo + Math.imul(al7, bl3)) | 0;\n mid = (mid + Math.imul(al7, bh3)) | 0;\n mid = (mid + Math.imul(ah7, bl3)) | 0;\n hi = (hi + Math.imul(ah7, bh3)) | 0;\n lo = (lo + Math.imul(al6, bl4)) | 0;\n mid = (mid + Math.imul(al6, bh4)) | 0;\n mid = (mid + Math.imul(ah6, bl4)) | 0;\n hi = (hi + Math.imul(ah6, bh4)) | 0;\n lo = (lo + Math.imul(al5, bl5)) | 0;\n mid = (mid + Math.imul(al5, bh5)) | 0;\n mid = (mid + Math.imul(ah5, bl5)) | 0;\n hi = (hi + Math.imul(ah5, bh5)) | 0;\n lo = (lo + Math.imul(al4, bl6)) | 0;\n mid = (mid + Math.imul(al4, bh6)) | 0;\n mid = (mid + Math.imul(ah4, bl6)) | 0;\n hi = (hi + Math.imul(ah4, bh6)) | 0;\n lo = (lo + Math.imul(al3, bl7)) | 0;\n mid = (mid + Math.imul(al3, bh7)) | 0;\n mid = (mid + Math.imul(ah3, bl7)) | 0;\n hi = (hi + Math.imul(ah3, bh7)) | 0;\n lo = (lo + Math.imul(al2, bl8)) | 0;\n mid = (mid + Math.imul(al2, bh8)) | 0;\n mid = (mid + Math.imul(ah2, bl8)) | 0;\n hi = (hi + Math.imul(ah2, bh8)) | 0;\n lo = (lo + Math.imul(al1, bl9)) | 0;\n mid = (mid + Math.imul(al1, bh9)) | 0;\n mid = (mid + Math.imul(ah1, bl9)) | 0;\n hi = (hi + Math.imul(ah1, bh9)) | 0;\n var w10 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w10 >>> 26)) | 0;\n w10 &= 0x3ffffff;\n /* k = 11 */\n lo = Math.imul(al9, bl2);\n mid = Math.imul(al9, bh2);\n mid = (mid + Math.imul(ah9, bl2)) | 0;\n hi = Math.imul(ah9, bh2);\n lo = (lo + Math.imul(al8, bl3)) | 0;\n mid = (mid + Math.imul(al8, bh3)) | 0;\n mid = (mid + Math.imul(ah8, bl3)) | 0;\n hi = (hi + Math.imul(ah8, bh3)) | 0;\n lo = (lo + Math.imul(al7, bl4)) | 0;\n mid = (mid + Math.imul(al7, bh4)) | 0;\n mid = (mid + Math.imul(ah7, bl4)) | 0;\n hi = (hi + Math.imul(ah7, bh4)) | 0;\n lo = (lo + Math.imul(al6, bl5)) | 0;\n mid = (mid + Math.imul(al6, bh5)) | 0;\n mid = (mid + Math.imul(ah6, bl5)) | 0;\n hi = (hi + Math.imul(ah6, bh5)) | 0;\n lo = (lo + Math.imul(al5, bl6)) | 0;\n mid = (mid + Math.imul(al5, bh6)) | 0;\n mid = (mid + Math.imul(ah5, bl6)) | 0;\n hi = (hi + Math.imul(ah5, bh6)) | 0;\n lo = (lo + Math.imul(al4, bl7)) | 0;\n mid = (mid + Math.imul(al4, bh7)) | 0;\n mid = (mid + Math.imul(ah4, bl7)) | 0;\n hi = (hi + Math.imul(ah4, bh7)) | 0;\n lo = (lo + Math.imul(al3, bl8)) | 0;\n mid = (mid + Math.imul(al3, bh8)) | 0;\n mid = (mid + Math.imul(ah3, bl8)) | 0;\n hi = (hi + Math.imul(ah3, bh8)) | 0;\n lo = (lo + Math.imul(al2, bl9)) | 0;\n mid = (mid + Math.imul(al2, bh9)) | 0;\n mid = (mid + Math.imul(ah2, bl9)) | 0;\n hi = (hi + Math.imul(ah2, bh9)) | 0;\n var w11 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w11 >>> 26)) | 0;\n w11 &= 0x3ffffff;\n /* k = 12 */\n lo = Math.imul(al9, bl3);\n mid = Math.imul(al9, bh3);\n mid = (mid + Math.imul(ah9, bl3)) | 0;\n hi = Math.imul(ah9, bh3);\n lo = (lo + Math.imul(al8, bl4)) | 0;\n mid = (mid + Math.imul(al8, bh4)) | 0;\n mid = (mid + Math.imul(ah8, bl4)) | 0;\n hi = (hi + Math.imul(ah8, bh4)) | 0;\n lo = (lo + Math.imul(al7, bl5)) | 0;\n mid = (mid + Math.imul(al7, bh5)) | 0;\n mid = (mid + Math.imul(ah7, bl5)) | 0;\n hi = (hi + Math.imul(ah7, bh5)) | 0;\n lo = (lo + Math.imul(al6, bl6)) | 0;\n mid = (mid + Math.imul(al6, bh6)) | 0;\n mid = (mid + Math.imul(ah6, bl6)) | 0;\n hi = (hi + Math.imul(ah6, bh6)) | 0;\n lo = (lo + Math.imul(al5, bl7)) | 0;\n mid = (mid + Math.imul(al5, bh7)) | 0;\n mid = (mid + Math.imul(ah5, bl7)) | 0;\n hi = (hi + Math.imul(ah5, bh7)) | 0;\n lo = (lo + Math.imul(al4, bl8)) | 0;\n mid = (mid + Math.imul(al4, bh8)) | 0;\n mid = (mid + Math.imul(ah4, bl8)) | 0;\n hi = (hi + Math.imul(ah4, bh8)) | 0;\n lo = (lo + Math.imul(al3, bl9)) | 0;\n mid = (mid + Math.imul(al3, bh9)) | 0;\n mid = (mid + Math.imul(ah3, bl9)) | 0;\n hi = (hi + Math.imul(ah3, bh9)) | 0;\n var w12 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w12 >>> 26)) | 0;\n w12 &= 0x3ffffff;\n /* k = 13 */\n lo = Math.imul(al9, bl4);\n mid = Math.imul(al9, bh4);\n mid = (mid + Math.imul(ah9, bl4)) | 0;\n hi = Math.imul(ah9, bh4);\n lo = (lo + Math.imul(al8, bl5)) | 0;\n mid = (mid + Math.imul(al8, bh5)) | 0;\n mid = (mid + Math.imul(ah8, bl5)) | 0;\n hi = (hi + Math.imul(ah8, bh5)) | 0;\n lo = (lo + Math.imul(al7, bl6)) | 0;\n mid = (mid + Math.imul(al7, bh6)) | 0;\n mid = (mid + Math.imul(ah7, bl6)) | 0;\n hi = (hi + Math.imul(ah7, bh6)) | 0;\n lo = (lo + Math.imul(al6, bl7)) | 0;\n mid = (mid + Math.imul(al6, bh7)) | 0;\n mid = (mid + Math.imul(ah6, bl7)) | 0;\n hi = (hi + Math.imul(ah6, bh7)) | 0;\n lo = (lo + Math.imul(al5, bl8)) | 0;\n mid = (mid + Math.imul(al5, bh8)) | 0;\n mid = (mid + Math.imul(ah5, bl8)) | 0;\n hi = (hi + Math.imul(ah5, bh8)) | 0;\n lo = (lo + Math.imul(al4, bl9)) | 0;\n mid = (mid + Math.imul(al4, bh9)) | 0;\n mid = (mid + Math.imul(ah4, bl9)) | 0;\n hi = (hi + Math.imul(ah4, bh9)) | 0;\n var w13 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w13 >>> 26)) | 0;\n w13 &= 0x3ffffff;\n /* k = 14 */\n lo = Math.imul(al9, bl5);\n mid = Math.imul(al9, bh5);\n mid = (mid + Math.imul(ah9, bl5)) | 0;\n hi = Math.imul(ah9, bh5);\n lo = (lo + Math.imul(al8, bl6)) | 0;\n mid = (mid + Math.imul(al8, bh6)) | 0;\n mid = (mid + Math.imul(ah8, bl6)) | 0;\n hi = (hi + Math.imul(ah8, bh6)) | 0;\n lo = (lo + Math.imul(al7, bl7)) | 0;\n mid = (mid + Math.imul(al7, bh7)) | 0;\n mid = (mid + Math.imul(ah7, bl7)) | 0;\n hi = (hi + Math.imul(ah7, bh7)) | 0;\n lo = (lo + Math.imul(al6, bl8)) | 0;\n mid = (mid + Math.imul(al6, bh8)) | 0;\n mid = (mid + Math.imul(ah6, bl8)) | 0;\n hi = (hi + Math.imul(ah6, bh8)) | 0;\n lo = (lo + Math.imul(al5, bl9)) | 0;\n mid = (mid + Math.imul(al5, bh9)) | 0;\n mid = (mid + Math.imul(ah5, bl9)) | 0;\n hi = (hi + Math.imul(ah5, bh9)) | 0;\n var w14 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w14 >>> 26)) | 0;\n w14 &= 0x3ffffff;\n /* k = 15 */\n lo = Math.imul(al9, bl6);\n mid = Math.imul(al9, bh6);\n mid = (mid + Math.imul(ah9, bl6)) | 0;\n hi = Math.imul(ah9, bh6);\n lo = (lo + Math.imul(al8, bl7)) | 0;\n mid = (mid + Math.imul(al8, bh7)) | 0;\n mid = (mid + Math.imul(ah8, bl7)) | 0;\n hi = (hi + Math.imul(ah8, bh7)) | 0;\n lo = (lo + Math.imul(al7, bl8)) | 0;\n mid = (mid + Math.imul(al7, bh8)) | 0;\n mid = (mid + Math.imul(ah7, bl8)) | 0;\n hi = (hi + Math.imul(ah7, bh8)) | 0;\n lo = (lo + Math.imul(al6, bl9)) | 0;\n mid = (mid + Math.imul(al6, bh9)) | 0;\n mid = (mid + Math.imul(ah6, bl9)) | 0;\n hi = (hi + Math.imul(ah6, bh9)) | 0;\n var w15 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w15 >>> 26)) | 0;\n w15 &= 0x3ffffff;\n /* k = 16 */\n lo = Math.imul(al9, bl7);\n mid = Math.imul(al9, bh7);\n mid = (mid + Math.imul(ah9, bl7)) | 0;\n hi = Math.imul(ah9, bh7);\n lo = (lo + Math.imul(al8, bl8)) | 0;\n mid = (mid + Math.imul(al8, bh8)) | 0;\n mid = (mid + Math.imul(ah8, bl8)) | 0;\n hi = (hi + Math.imul(ah8, bh8)) | 0;\n lo = (lo + Math.imul(al7, bl9)) | 0;\n mid = (mid + Math.imul(al7, bh9)) | 0;\n mid = (mid + Math.imul(ah7, bl9)) | 0;\n hi = (hi + Math.imul(ah7, bh9)) | 0;\n var w16 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w16 >>> 26)) | 0;\n w16 &= 0x3ffffff;\n /* k = 17 */\n lo = Math.imul(al9, bl8);\n mid = Math.imul(al9, bh8);\n mid = (mid + Math.imul(ah9, bl8)) | 0;\n hi = Math.imul(ah9, bh8);\n lo = (lo + Math.imul(al8, bl9)) | 0;\n mid = (mid + Math.imul(al8, bh9)) | 0;\n mid = (mid + Math.imul(ah8, bl9)) | 0;\n hi = (hi + Math.imul(ah8, bh9)) | 0;\n var w17 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w17 >>> 26)) | 0;\n w17 &= 0x3ffffff;\n /* k = 18 */\n lo = Math.imul(al9, bl9);\n mid = Math.imul(al9, bh9);\n mid = (mid + Math.imul(ah9, bl9)) | 0;\n hi = Math.imul(ah9, bh9);\n var w18 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w18 >>> 26)) | 0;\n w18 &= 0x3ffffff;\n o[0] = w0;\n o[1] = w1;\n o[2] = w2;\n o[3] = w3;\n o[4] = w4;\n o[5] = w5;\n o[6] = w6;\n o[7] = w7;\n o[8] = w8;\n o[9] = w9;\n o[10] = w10;\n o[11] = w11;\n o[12] = w12;\n o[13] = w13;\n o[14] = w14;\n o[15] = w15;\n o[16] = w16;\n o[17] = w17;\n o[18] = w18;\n if (c !== 0) {\n o[19] = c;\n out.length++;\n }\n return out;\n };\n\n // Polyfill comb\n if (!Math.imul) {\n comb10MulTo = smallMulTo;\n }\n\n function bigMulTo (self, num, out) {\n out.negative = num.negative ^ self.negative;\n out.length = self.length + num.length;\n\n var carry = 0;\n var hncarry = 0;\n for (var k = 0; k < out.length - 1; k++) {\n // Sum all words with the same `i + j = k` and accumulate `ncarry`,\n // note that ncarry could be >= 0x3ffffff\n var ncarry = hncarry;\n hncarry = 0;\n var rword = carry & 0x3ffffff;\n var maxJ = Math.min(k, num.length - 1);\n for (var j = Math.max(0, k - self.length + 1); j <= maxJ; j++) {\n var i = k - j;\n var a = self.words[i] | 0;\n var b = num.words[j] | 0;\n var r = a * b;\n\n var lo = r & 0x3ffffff;\n ncarry = (ncarry + ((r / 0x4000000) | 0)) | 0;\n lo = (lo + rword) | 0;\n rword = lo & 0x3ffffff;\n ncarry = (ncarry + (lo >>> 26)) | 0;\n\n hncarry += ncarry >>> 26;\n ncarry &= 0x3ffffff;\n }\n out.words[k] = rword;\n carry = ncarry;\n ncarry = hncarry;\n }\n if (carry !== 0) {\n out.words[k] = carry;\n } else {\n out.length--;\n }\n\n return out.strip();\n }\n\n function jumboMulTo (self, num, out) {\n var fftm = new FFTM();\n return fftm.mulp(self, num, out);\n }\n\n BN.prototype.mulTo = function mulTo (num, out) {\n var res;\n var len = this.length + num.length;\n if (this.length === 10 && num.length === 10) {\n res = comb10MulTo(this, num, out);\n } else if (len < 63) {\n res = smallMulTo(this, num, out);\n } else if (len < 1024) {\n res = bigMulTo(this, num, out);\n } else {\n res = jumboMulTo(this, num, out);\n }\n\n return res;\n };\n\n // Cooley-Tukey algorithm for FFT\n // slightly revisited to rely on looping instead of recursion\n\n function FFTM (x, y) {\n this.x = x;\n this.y = y;\n }\n\n FFTM.prototype.makeRBT = function makeRBT (N) {\n var t = new Array(N);\n var l = BN.prototype._countBits(N) - 1;\n for (var i = 0; i < N; i++) {\n t[i] = this.revBin(i, l, N);\n }\n\n return t;\n };\n\n // Returns binary-reversed representation of `x`\n FFTM.prototype.revBin = function revBin (x, l, N) {\n if (x === 0 || x === N - 1) return x;\n\n var rb = 0;\n for (var i = 0; i < l; i++) {\n rb |= (x & 1) << (l - i - 1);\n x >>= 1;\n }\n\n return rb;\n };\n\n // Performs \"tweedling\" phase, therefore 'emulating'\n // behaviour of the recursive algorithm\n FFTM.prototype.permute = function permute (rbt, rws, iws, rtws, itws, N) {\n for (var i = 0; i < N; i++) {\n rtws[i] = rws[rbt[i]];\n itws[i] = iws[rbt[i]];\n }\n };\n\n FFTM.prototype.transform = function transform (rws, iws, rtws, itws, N, rbt) {\n this.permute(rbt, rws, iws, rtws, itws, N);\n\n for (var s = 1; s < N; s <<= 1) {\n var l = s << 1;\n\n var rtwdf = Math.cos(2 * Math.PI / l);\n var itwdf = Math.sin(2 * Math.PI / l);\n\n for (var p = 0; p < N; p += l) {\n var rtwdf_ = rtwdf;\n var itwdf_ = itwdf;\n\n for (var j = 0; j < s; j++) {\n var re = rtws[p + j];\n var ie = itws[p + j];\n\n var ro = rtws[p + j + s];\n var io = itws[p + j + s];\n\n var rx = rtwdf_ * ro - itwdf_ * io;\n\n io = rtwdf_ * io + itwdf_ * ro;\n ro = rx;\n\n rtws[p + j] = re + ro;\n itws[p + j] = ie + io;\n\n rtws[p + j + s] = re - ro;\n itws[p + j + s] = ie - io;\n\n /* jshint maxdepth : false */\n if (j !== l) {\n rx = rtwdf * rtwdf_ - itwdf * itwdf_;\n\n itwdf_ = rtwdf * itwdf_ + itwdf * rtwdf_;\n rtwdf_ = rx;\n }\n }\n }\n }\n };\n\n FFTM.prototype.guessLen13b = function guessLen13b (n, m) {\n var N = Math.max(m, n) | 1;\n var odd = N & 1;\n var i = 0;\n for (N = N / 2 | 0; N; N = N >>> 1) {\n i++;\n }\n\n return 1 << i + 1 + odd;\n };\n\n FFTM.prototype.conjugate = function conjugate (rws, iws, N) {\n if (N <= 1) return;\n\n for (var i = 0; i < N / 2; i++) {\n var t = rws[i];\n\n rws[i] = rws[N - i - 1];\n rws[N - i - 1] = t;\n\n t = iws[i];\n\n iws[i] = -iws[N - i - 1];\n iws[N - i - 1] = -t;\n }\n };\n\n FFTM.prototype.normalize13b = function normalize13b (ws, N) {\n var carry = 0;\n for (var i = 0; i < N / 2; i++) {\n var w = Math.round(ws[2 * i + 1] / N) * 0x2000 +\n Math.round(ws[2 * i] / N) +\n carry;\n\n ws[i] = w & 0x3ffffff;\n\n if (w < 0x4000000) {\n carry = 0;\n } else {\n carry = w / 0x4000000 | 0;\n }\n }\n\n return ws;\n };\n\n FFTM.prototype.convert13b = function convert13b (ws, len, rws, N) {\n var carry = 0;\n for (var i = 0; i < len; i++) {\n carry = carry + (ws[i] | 0);\n\n rws[2 * i] = carry & 0x1fff; carry = carry >>> 13;\n rws[2 * i + 1] = carry & 0x1fff; carry = carry >>> 13;\n }\n\n // Pad with zeroes\n for (i = 2 * len; i < N; ++i) {\n rws[i] = 0;\n }\n\n assert(carry === 0);\n assert((carry & ~0x1fff) === 0);\n };\n\n FFTM.prototype.stub = function stub (N) {\n var ph = new Array(N);\n for (var i = 0; i < N; i++) {\n ph[i] = 0;\n }\n\n return ph;\n };\n\n FFTM.prototype.mulp = function mulp (x, y, out) {\n var N = 2 * this.guessLen13b(x.length, y.length);\n\n var rbt = this.makeRBT(N);\n\n var _ = this.stub(N);\n\n var rws = new Array(N);\n var rwst = new Array(N);\n var iwst = new Array(N);\n\n var nrws = new Array(N);\n var nrwst = new Array(N);\n var niwst = new Array(N);\n\n var rmws = out.words;\n rmws.length = N;\n\n this.convert13b(x.words, x.length, rws, N);\n this.convert13b(y.words, y.length, nrws, N);\n\n this.transform(rws, _, rwst, iwst, N, rbt);\n this.transform(nrws, _, nrwst, niwst, N, rbt);\n\n for (var i = 0; i < N; i++) {\n var rx = rwst[i] * nrwst[i] - iwst[i] * niwst[i];\n iwst[i] = rwst[i] * niwst[i] + iwst[i] * nrwst[i];\n rwst[i] = rx;\n }\n\n this.conjugate(rwst, iwst, N);\n this.transform(rwst, iwst, rmws, _, N, rbt);\n this.conjugate(rmws, _, N);\n this.normalize13b(rmws, N);\n\n out.negative = x.negative ^ y.negative;\n out.length = x.length + y.length;\n return out.strip();\n };\n\n // Multiply `this` by `num`\n BN.prototype.mul = function mul (num) {\n var out = new BN(null);\n out.words = new Array(this.length + num.length);\n return this.mulTo(num, out);\n };\n\n // Multiply employing FFT\n BN.prototype.mulf = function mulf (num) {\n var out = new BN(null);\n out.words = new Array(this.length + num.length);\n return jumboMulTo(this, num, out);\n };\n\n // In-place Multiplication\n BN.prototype.imul = function imul (num) {\n return this.clone().mulTo(num, this);\n };\n\n BN.prototype.imuln = function imuln (num) {\n assert(typeof num === 'number');\n assert(num < 0x4000000);\n\n // Carry\n var carry = 0;\n for (var i = 0; i < this.length; i++) {\n var w = (this.words[i] | 0) * num;\n var lo = (w & 0x3ffffff) + (carry & 0x3ffffff);\n carry >>= 26;\n carry += (w / 0x4000000) | 0;\n // NOTE: lo is 27bit maximum\n carry += lo >>> 26;\n this.words[i] = lo & 0x3ffffff;\n }\n\n if (carry !== 0) {\n this.words[i] = carry;\n this.length++;\n }\n\n return this;\n };\n\n BN.prototype.muln = function muln (num) {\n return this.clone().imuln(num);\n };\n\n // `this` * `this`\n BN.prototype.sqr = function sqr () {\n return this.mul(this);\n };\n\n // `this` * `this` in-place\n BN.prototype.isqr = function isqr () {\n return this.imul(this.clone());\n };\n\n // Math.pow(`this`, `num`)\n BN.prototype.pow = function pow (num) {\n var w = toBitArray(num);\n if (w.length === 0) return new BN(1);\n\n // Skip leading zeroes\n var res = this;\n for (var i = 0; i < w.length; i++, res = res.sqr()) {\n if (w[i] !== 0) break;\n }\n\n if (++i < w.length) {\n for (var q = res.sqr(); i < w.length; i++, q = q.sqr()) {\n if (w[i] === 0) continue;\n\n res = res.mul(q);\n }\n }\n\n return res;\n };\n\n // Shift-left in-place\n BN.prototype.iushln = function iushln (bits) {\n assert(typeof bits === 'number' && bits >= 0);\n var r = bits % 26;\n var s = (bits - r) / 26;\n var carryMask = (0x3ffffff >>> (26 - r)) << (26 - r);\n var i;\n\n if (r !== 0) {\n var carry = 0;\n\n for (i = 0; i < this.length; i++) {\n var newCarry = this.words[i] & carryMask;\n var c = ((this.words[i] | 0) - newCarry) << r;\n this.words[i] = c | carry;\n carry = newCarry >>> (26 - r);\n }\n\n if (carry) {\n this.words[i] = carry;\n this.length++;\n }\n }\n\n if (s !== 0) {\n for (i = this.length - 1; i >= 0; i--) {\n this.words[i + s] = this.words[i];\n }\n\n for (i = 0; i < s; i++) {\n this.words[i] = 0;\n }\n\n this.length += s;\n }\n\n return this.strip();\n };\n\n BN.prototype.ishln = function ishln (bits) {\n // TODO(indutny): implement me\n assert(this.negative === 0);\n return this.iushln(bits);\n };\n\n // Shift-right in-place\n // NOTE: `hint` is a lowest bit before trailing zeroes\n // NOTE: if `extended` is present - it will be filled with destroyed bits\n BN.prototype.iushrn = function iushrn (bits, hint, extended) {\n assert(typeof bits === 'number' && bits >= 0);\n var h;\n if (hint) {\n h = (hint - (hint % 26)) / 26;\n } else {\n h = 0;\n }\n\n var r = bits % 26;\n var s = Math.min((bits - r) / 26, this.length);\n var mask = 0x3ffffff ^ ((0x3ffffff >>> r) << r);\n var maskedWords = extended;\n\n h -= s;\n h = Math.max(0, h);\n\n // Extended mode, copy masked part\n if (maskedWords) {\n for (var i = 0; i < s; i++) {\n maskedWords.words[i] = this.words[i];\n }\n maskedWords.length = s;\n }\n\n if (s === 0) {\n // No-op, we should not move anything at all\n } else if (this.length > s) {\n this.length -= s;\n for (i = 0; i < this.length; i++) {\n this.words[i] = this.words[i + s];\n }\n } else {\n this.words[0] = 0;\n this.length = 1;\n }\n\n var carry = 0;\n for (i = this.length - 1; i >= 0 && (carry !== 0 || i >= h); i--) {\n var word = this.words[i] | 0;\n this.words[i] = (carry << (26 - r)) | (word >>> r);\n carry = word & mask;\n }\n\n // Push carried bits as a mask\n if (maskedWords && carry !== 0) {\n maskedWords.words[maskedWords.length++] = carry;\n }\n\n if (this.length === 0) {\n this.words[0] = 0;\n this.length = 1;\n }\n\n return this.strip();\n };\n\n BN.prototype.ishrn = function ishrn (bits, hint, extended) {\n // TODO(indutny): implement me\n assert(this.negative === 0);\n return this.iushrn(bits, hint, extended);\n };\n\n // Shift-left\n BN.prototype.shln = function shln (bits) {\n return this.clone().ishln(bits);\n };\n\n BN.prototype.ushln = function ushln (bits) {\n return this.clone().iushln(bits);\n };\n\n // Shift-right\n BN.prototype.shrn = function shrn (bits) {\n return this.clone().ishrn(bits);\n };\n\n BN.prototype.ushrn = function ushrn (bits) {\n return this.clone().iushrn(bits);\n };\n\n // Test if n bit is set\n BN.prototype.testn = function testn (bit) {\n assert(typeof bit === 'number' && bit >= 0);\n var r = bit % 26;\n var s = (bit - r) / 26;\n var q = 1 << r;\n\n // Fast case: bit is much higher than all existing words\n if (this.length <= s) return false;\n\n // Check bit and return\n var w = this.words[s];\n\n return !!(w & q);\n };\n\n // Return only lowers bits of number (in-place)\n BN.prototype.imaskn = function imaskn (bits) {\n assert(typeof bits === 'number' && bits >= 0);\n var r = bits % 26;\n var s = (bits - r) / 26;\n\n assert(this.negative === 0, 'imaskn works only with positive numbers');\n\n if (this.length <= s) {\n return this;\n }\n\n if (r !== 0) {\n s++;\n }\n this.length = Math.min(s, this.length);\n\n if (r !== 0) {\n var mask = 0x3ffffff ^ ((0x3ffffff >>> r) << r);\n this.words[this.length - 1] &= mask;\n }\n\n return this.strip();\n };\n\n // Return only lowers bits of number\n BN.prototype.maskn = function maskn (bits) {\n return this.clone().imaskn(bits);\n };\n\n // Add plain number `num` to `this`\n BN.prototype.iaddn = function iaddn (num) {\n assert(typeof num === 'number');\n assert(num < 0x4000000);\n if (num < 0) return this.isubn(-num);\n\n // Possible sign change\n if (this.negative !== 0) {\n if (this.length === 1 && (this.words[0] | 0) < num) {\n this.words[0] = num - (this.words[0] | 0);\n this.negative = 0;\n return this;\n }\n\n this.negative = 0;\n this.isubn(num);\n this.negative = 1;\n return this;\n }\n\n // Add without checks\n return this._iaddn(num);\n };\n\n BN.prototype._iaddn = function _iaddn (num) {\n this.words[0] += num;\n\n // Carry\n for (var i = 0; i < this.length && this.words[i] >= 0x4000000; i++) {\n this.words[i] -= 0x4000000;\n if (i === this.length - 1) {\n this.words[i + 1] = 1;\n } else {\n this.words[i + 1]++;\n }\n }\n this.length = Math.max(this.length, i + 1);\n\n return this;\n };\n\n // Subtract plain number `num` from `this`\n BN.prototype.isubn = function isubn (num) {\n assert(typeof num === 'number');\n assert(num < 0x4000000);\n if (num < 0) return this.iaddn(-num);\n\n if (this.negative !== 0) {\n this.negative = 0;\n this.iaddn(num);\n this.negative = 1;\n return this;\n }\n\n this.words[0] -= num;\n\n if (this.length === 1 && this.words[0] < 0) {\n this.words[0] = -this.words[0];\n this.negative = 1;\n } else {\n // Carry\n for (var i = 0; i < this.length && this.words[i] < 0; i++) {\n this.words[i] += 0x4000000;\n this.words[i + 1] -= 1;\n }\n }\n\n return this.strip();\n };\n\n BN.prototype.addn = function addn (num) {\n return this.clone().iaddn(num);\n };\n\n BN.prototype.subn = function subn (num) {\n return this.clone().isubn(num);\n };\n\n BN.prototype.iabs = function iabs () {\n this.negative = 0;\n\n return this;\n };\n\n BN.prototype.abs = function abs () {\n return this.clone().iabs();\n };\n\n BN.prototype._ishlnsubmul = function _ishlnsubmul (num, mul, shift) {\n var len = num.length + shift;\n var i;\n\n this._expand(len);\n\n var w;\n var carry = 0;\n for (i = 0; i < num.length; i++) {\n w = (this.words[i + shift] | 0) + carry;\n var right = (num.words[i] | 0) * mul;\n w -= right & 0x3ffffff;\n carry = (w >> 26) - ((right / 0x4000000) | 0);\n this.words[i + shift] = w & 0x3ffffff;\n }\n for (; i < this.length - shift; i++) {\n w = (this.words[i + shift] | 0) + carry;\n carry = w >> 26;\n this.words[i + shift] = w & 0x3ffffff;\n }\n\n if (carry === 0) return this.strip();\n\n // Subtraction overflow\n assert(carry === -1);\n carry = 0;\n for (i = 0; i < this.length; i++) {\n w = -(this.words[i] | 0) + carry;\n carry = w >> 26;\n this.words[i] = w & 0x3ffffff;\n }\n this.negative = 1;\n\n return this.strip();\n };\n\n BN.prototype._wordDiv = function _wordDiv (num, mode) {\n var shift = this.length - num.length;\n\n var a = this.clone();\n var b = num;\n\n // Normalize\n var bhi = b.words[b.length - 1] | 0;\n var bhiBits = this._countBits(bhi);\n shift = 26 - bhiBits;\n if (shift !== 0) {\n b = b.ushln(shift);\n a.iushln(shift);\n bhi = b.words[b.length - 1] | 0;\n }\n\n // Initialize quotient\n var m = a.length - b.length;\n var q;\n\n if (mode !== 'mod') {\n q = new BN(null);\n q.length = m + 1;\n q.words = new Array(q.length);\n for (var i = 0; i < q.length; i++) {\n q.words[i] = 0;\n }\n }\n\n var diff = a.clone()._ishlnsubmul(b, 1, m);\n if (diff.negative === 0) {\n a = diff;\n if (q) {\n q.words[m] = 1;\n }\n }\n\n for (var j = m - 1; j >= 0; j--) {\n var qj = (a.words[b.length + j] | 0) * 0x4000000 +\n (a.words[b.length + j - 1] | 0);\n\n // NOTE: (qj / bhi) is (0x3ffffff * 0x4000000 + 0x3ffffff) / 0x2000000 max\n // (0x7ffffff)\n qj = Math.min((qj / bhi) | 0, 0x3ffffff);\n\n a._ishlnsubmul(b, qj, j);\n while (a.negative !== 0) {\n qj--;\n a.negative = 0;\n a._ishlnsubmul(b, 1, j);\n if (!a.isZero()) {\n a.negative ^= 1;\n }\n }\n if (q) {\n q.words[j] = qj;\n }\n }\n if (q) {\n q.strip();\n }\n a.strip();\n\n // Denormalize\n if (mode !== 'div' && shift !== 0) {\n a.iushrn(shift);\n }\n\n return {\n div: q || null,\n mod: a\n };\n };\n\n // NOTE: 1) `mode` can be set to `mod` to request mod only,\n // to `div` to request div only, or be absent to\n // request both div & mod\n // 2) `positive` is true if unsigned mod is requested\n BN.prototype.divmod = function divmod (num, mode, positive) {\n assert(!num.isZero());\n\n if (this.isZero()) {\n return {\n div: new BN(0),\n mod: new BN(0)\n };\n }\n\n var div, mod, res;\n if (this.negative !== 0 && num.negative === 0) {\n res = this.neg().divmod(num, mode);\n\n if (mode !== 'mod') {\n div = res.div.neg();\n }\n\n if (mode !== 'div') {\n mod = res.mod.neg();\n if (positive && mod.negative !== 0) {\n mod.iadd(num);\n }\n }\n\n return {\n div: div,\n mod: mod\n };\n }\n\n if (this.negative === 0 && num.negative !== 0) {\n res = this.divmod(num.neg(), mode);\n\n if (mode !== 'mod') {\n div = res.div.neg();\n }\n\n return {\n div: div,\n mod: res.mod\n };\n }\n\n if ((this.negative & num.negative) !== 0) {\n res = this.neg().divmod(num.neg(), mode);\n\n if (mode !== 'div') {\n mod = res.mod.neg();\n if (positive && mod.negative !== 0) {\n mod.isub(num);\n }\n }\n\n return {\n div: res.div,\n mod: mod\n };\n }\n\n // Both numbers are positive at this point\n\n // Strip both numbers to approximate shift value\n if (num.length > this.length || this.cmp(num) < 0) {\n return {\n div: new BN(0),\n mod: this\n };\n }\n\n // Very short reduction\n if (num.length === 1) {\n if (mode === 'div') {\n return {\n div: this.divn(num.words[0]),\n mod: null\n };\n }\n\n if (mode === 'mod') {\n return {\n div: null,\n mod: new BN(this.modn(num.words[0]))\n };\n }\n\n return {\n div: this.divn(num.words[0]),\n mod: new BN(this.modn(num.words[0]))\n };\n }\n\n return this._wordDiv(num, mode);\n };\n\n // Find `this` / `num`\n BN.prototype.div = function div (num) {\n return this.divmod(num, 'div', false).div;\n };\n\n // Find `this` % `num`\n BN.prototype.mod = function mod (num) {\n return this.divmod(num, 'mod', false).mod;\n };\n\n BN.prototype.umod = function umod (num) {\n return this.divmod(num, 'mod', true).mod;\n };\n\n // Find Round(`this` / `num`)\n BN.prototype.divRound = function divRound (num) {\n var dm = this.divmod(num);\n\n // Fast case - exact division\n if (dm.mod.isZero()) return dm.div;\n\n var mod = dm.div.negative !== 0 ? dm.mod.isub(num) : dm.mod;\n\n var half = num.ushrn(1);\n var r2 = num.andln(1);\n var cmp = mod.cmp(half);\n\n // Round down\n if (cmp < 0 || r2 === 1 && cmp === 0) return dm.div;\n\n // Round up\n return dm.div.negative !== 0 ? dm.div.isubn(1) : dm.div.iaddn(1);\n };\n\n BN.prototype.modn = function modn (num) {\n assert(num <= 0x3ffffff);\n var p = (1 << 26) % num;\n\n var acc = 0;\n for (var i = this.length - 1; i >= 0; i--) {\n acc = (p * acc + (this.words[i] | 0)) % num;\n }\n\n return acc;\n };\n\n // In-place division by number\n BN.prototype.idivn = function idivn (num) {\n assert(num <= 0x3ffffff);\n\n var carry = 0;\n for (var i = this.length - 1; i >= 0; i--) {\n var w = (this.words[i] | 0) + carry * 0x4000000;\n this.words[i] = (w / num) | 0;\n carry = w % num;\n }\n\n return this.strip();\n };\n\n BN.prototype.divn = function divn (num) {\n return this.clone().idivn(num);\n };\n\n BN.prototype.egcd = function egcd (p) {\n assert(p.negative === 0);\n assert(!p.isZero());\n\n var x = this;\n var y = p.clone();\n\n if (x.negative !== 0) {\n x = x.umod(p);\n } else {\n x = x.clone();\n }\n\n // A * x + B * y = x\n var A = new BN(1);\n var B = new BN(0);\n\n // C * x + D * y = y\n var C = new BN(0);\n var D = new BN(1);\n\n var g = 0;\n\n while (x.isEven() && y.isEven()) {\n x.iushrn(1);\n y.iushrn(1);\n ++g;\n }\n\n var yp = y.clone();\n var xp = x.clone();\n\n while (!x.isZero()) {\n for (var i = 0, im = 1; (x.words[0] & im) === 0 && i < 26; ++i, im <<= 1);\n if (i > 0) {\n x.iushrn(i);\n while (i-- > 0) {\n if (A.isOdd() || B.isOdd()) {\n A.iadd(yp);\n B.isub(xp);\n }\n\n A.iushrn(1);\n B.iushrn(1);\n }\n }\n\n for (var j = 0, jm = 1; (y.words[0] & jm) === 0 && j < 26; ++j, jm <<= 1);\n if (j > 0) {\n y.iushrn(j);\n while (j-- > 0) {\n if (C.isOdd() || D.isOdd()) {\n C.iadd(yp);\n D.isub(xp);\n }\n\n C.iushrn(1);\n D.iushrn(1);\n }\n }\n\n if (x.cmp(y) >= 0) {\n x.isub(y);\n A.isub(C);\n B.isub(D);\n } else {\n y.isub(x);\n C.isub(A);\n D.isub(B);\n }\n }\n\n return {\n a: C,\n b: D,\n gcd: y.iushln(g)\n };\n };\n\n // This is reduced incarnation of the binary EEA\n // above, designated to invert members of the\n // _prime_ fields F(p) at a maximal speed\n BN.prototype._invmp = function _invmp (p) {\n assert(p.negative === 0);\n assert(!p.isZero());\n\n var a = this;\n var b = p.clone();\n\n if (a.negative !== 0) {\n a = a.umod(p);\n } else {\n a = a.clone();\n }\n\n var x1 = new BN(1);\n var x2 = new BN(0);\n\n var delta = b.clone();\n\n while (a.cmpn(1) > 0 && b.cmpn(1) > 0) {\n for (var i = 0, im = 1; (a.words[0] & im) === 0 && i < 26; ++i, im <<= 1);\n if (i > 0) {\n a.iushrn(i);\n while (i-- > 0) {\n if (x1.isOdd()) {\n x1.iadd(delta);\n }\n\n x1.iushrn(1);\n }\n }\n\n for (var j = 0, jm = 1; (b.words[0] & jm) === 0 && j < 26; ++j, jm <<= 1);\n if (j > 0) {\n b.iushrn(j);\n while (j-- > 0) {\n if (x2.isOdd()) {\n x2.iadd(delta);\n }\n\n x2.iushrn(1);\n }\n }\n\n if (a.cmp(b) >= 0) {\n a.isub(b);\n x1.isub(x2);\n } else {\n b.isub(a);\n x2.isub(x1);\n }\n }\n\n var res;\n if (a.cmpn(1) === 0) {\n res = x1;\n } else {\n res = x2;\n }\n\n if (res.cmpn(0) < 0) {\n res.iadd(p);\n }\n\n return res;\n };\n\n BN.prototype.gcd = function gcd (num) {\n if (this.isZero()) return num.abs();\n if (num.isZero()) return this.abs();\n\n var a = this.clone();\n var b = num.clone();\n a.negative = 0;\n b.negative = 0;\n\n // Remove common factor of two\n for (var shift = 0; a.isEven() && b.isEven(); shift++) {\n a.iushrn(1);\n b.iushrn(1);\n }\n\n do {\n while (a.isEven()) {\n a.iushrn(1);\n }\n while (b.isEven()) {\n b.iushrn(1);\n }\n\n var r = a.cmp(b);\n if (r < 0) {\n // Swap `a` and `b` to make `a` always bigger than `b`\n var t = a;\n a = b;\n b = t;\n } else if (r === 0 || b.cmpn(1) === 0) {\n break;\n }\n\n a.isub(b);\n } while (true);\n\n return b.iushln(shift);\n };\n\n // Invert number in the field F(num)\n BN.prototype.invm = function invm (num) {\n return this.egcd(num).a.umod(num);\n };\n\n BN.prototype.isEven = function isEven () {\n return (this.words[0] & 1) === 0;\n };\n\n BN.prototype.isOdd = function isOdd () {\n return (this.words[0] & 1) === 1;\n };\n\n // And first word and num\n BN.prototype.andln = function andln (num) {\n return this.words[0] & num;\n };\n\n // Increment at the bit position in-line\n BN.prototype.bincn = function bincn (bit) {\n assert(typeof bit === 'number');\n var r = bit % 26;\n var s = (bit - r) / 26;\n var q = 1 << r;\n\n // Fast case: bit is much higher than all existing words\n if (this.length <= s) {\n this._expand(s + 1);\n this.words[s] |= q;\n return this;\n }\n\n // Add bit and propagate, if needed\n var carry = q;\n for (var i = s; carry !== 0 && i < this.length; i++) {\n var w = this.words[i] | 0;\n w += carry;\n carry = w >>> 26;\n w &= 0x3ffffff;\n this.words[i] = w;\n }\n if (carry !== 0) {\n this.words[i] = carry;\n this.length++;\n }\n return this;\n };\n\n BN.prototype.isZero = function isZero () {\n return this.length === 1 && this.words[0] === 0;\n };\n\n BN.prototype.cmpn = function cmpn (num) {\n var negative = num < 0;\n\n if (this.negative !== 0 && !negative) return -1;\n if (this.negative === 0 && negative) return 1;\n\n this.strip();\n\n var res;\n if (this.length > 1) {\n res = 1;\n } else {\n if (negative) {\n num = -num;\n }\n\n assert(num <= 0x3ffffff, 'Number is too big');\n\n var w = this.words[0] | 0;\n res = w === num ? 0 : w < num ? -1 : 1;\n }\n if (this.negative !== 0) return -res | 0;\n return res;\n };\n\n // Compare two numbers and return:\n // 1 - if `this` > `num`\n // 0 - if `this` == `num`\n // -1 - if `this` < `num`\n BN.prototype.cmp = function cmp (num) {\n if (this.negative !== 0 && num.negative === 0) return -1;\n if (this.negative === 0 && num.negative !== 0) return 1;\n\n var res = this.ucmp(num);\n if (this.negative !== 0) return -res | 0;\n return res;\n };\n\n // Unsigned comparison\n BN.prototype.ucmp = function ucmp (num) {\n // At this point both numbers have the same sign\n if (this.length > num.length) return 1;\n if (this.length < num.length) return -1;\n\n var res = 0;\n for (var i = this.length - 1; i >= 0; i--) {\n var a = this.words[i] | 0;\n var b = num.words[i] | 0;\n\n if (a === b) continue;\n if (a < b) {\n res = -1;\n } else if (a > b) {\n res = 1;\n }\n break;\n }\n return res;\n };\n\n BN.prototype.gtn = function gtn (num) {\n return this.cmpn(num) === 1;\n };\n\n BN.prototype.gt = function gt (num) {\n return this.cmp(num) === 1;\n };\n\n BN.prototype.gten = function gten (num) {\n return this.cmpn(num) >= 0;\n };\n\n BN.prototype.gte = function gte (num) {\n return this.cmp(num) >= 0;\n };\n\n BN.prototype.ltn = function ltn (num) {\n return this.cmpn(num) === -1;\n };\n\n BN.prototype.lt = function lt (num) {\n return this.cmp(num) === -1;\n };\n\n BN.prototype.lten = function lten (num) {\n return this.cmpn(num) <= 0;\n };\n\n BN.prototype.lte = function lte (num) {\n return this.cmp(num) <= 0;\n };\n\n BN.prototype.eqn = function eqn (num) {\n return this.cmpn(num) === 0;\n };\n\n BN.prototype.eq = function eq (num) {\n return this.cmp(num) === 0;\n };\n\n //\n // A reduce context, could be using montgomery or something better, depending\n // on the `m` itself.\n //\n BN.red = function red (num) {\n return new Red(num);\n };\n\n BN.prototype.toRed = function toRed (ctx) {\n assert(!this.red, 'Already a number in reduction context');\n assert(this.negative === 0, 'red works only with positives');\n return ctx.convertTo(this)._forceRed(ctx);\n };\n\n BN.prototype.fromRed = function fromRed () {\n assert(this.red, 'fromRed works only with numbers in reduction context');\n return this.red.convertFrom(this);\n };\n\n BN.prototype._forceRed = function _forceRed (ctx) {\n this.red = ctx;\n return this;\n };\n\n BN.prototype.forceRed = function forceRed (ctx) {\n assert(!this.red, 'Already a number in reduction context');\n return this._forceRed(ctx);\n };\n\n BN.prototype.redAdd = function redAdd (num) {\n assert(this.red, 'redAdd works only with red numbers');\n return this.red.add(this, num);\n };\n\n BN.prototype.redIAdd = function redIAdd (num) {\n assert(this.red, 'redIAdd works only with red numbers');\n return this.red.iadd(this, num);\n };\n\n BN.prototype.redSub = function redSub (num) {\n assert(this.red, 'redSub works only with red numbers');\n return this.red.sub(this, num);\n };\n\n BN.prototype.redISub = function redISub (num) {\n assert(this.red, 'redISub works only with red numbers');\n return this.red.isub(this, num);\n };\n\n BN.prototype.redShl = function redShl (num) {\n assert(this.red, 'redShl works only with red numbers');\n return this.red.shl(this, num);\n };\n\n BN.prototype.redMul = function redMul (num) {\n assert(this.red, 'redMul works only with red numbers');\n this.red._verify2(this, num);\n return this.red.mul(this, num);\n };\n\n BN.prototype.redIMul = function redIMul (num) {\n assert(this.red, 'redMul works only with red numbers');\n this.red._verify2(this, num);\n return this.red.imul(this, num);\n };\n\n BN.prototype.redSqr = function redSqr () {\n assert(this.red, 'redSqr works only with red numbers');\n this.red._verify1(this);\n return this.red.sqr(this);\n };\n\n BN.prototype.redISqr = function redISqr () {\n assert(this.red, 'redISqr works only with red numbers');\n this.red._verify1(this);\n return this.red.isqr(this);\n };\n\n // Square root over p\n BN.prototype.redSqrt = function redSqrt () {\n assert(this.red, 'redSqrt works only with red numbers');\n this.red._verify1(this);\n return this.red.sqrt(this);\n };\n\n BN.prototype.redInvm = function redInvm () {\n assert(this.red, 'redInvm works only with red numbers');\n this.red._verify1(this);\n return this.red.invm(this);\n };\n\n // Return negative clone of `this` % `red modulo`\n BN.prototype.redNeg = function redNeg () {\n assert(this.red, 'redNeg works only with red numbers');\n this.red._verify1(this);\n return this.red.neg(this);\n };\n\n BN.prototype.redPow = function redPow (num) {\n assert(this.red && !num.red, 'redPow(normalNum)');\n this.red._verify1(this);\n return this.red.pow(this, num);\n };\n\n // Prime numbers with efficient reduction\n var primes = {\n k256: null,\n p224: null,\n p192: null,\n p25519: null\n };\n\n // Pseudo-Mersenne prime\n function MPrime (name, p) {\n // P = 2 ^ N - K\n this.name = name;\n this.p = new BN(p, 16);\n this.n = this.p.bitLength();\n this.k = new BN(1).iushln(this.n).isub(this.p);\n\n this.tmp = this._tmp();\n }\n\n MPrime.prototype._tmp = function _tmp () {\n var tmp = new BN(null);\n tmp.words = new Array(Math.ceil(this.n / 13));\n return tmp;\n };\n\n MPrime.prototype.ireduce = function ireduce (num) {\n // Assumes that `num` is less than `P^2`\n // num = HI * (2 ^ N - K) + HI * K + LO = HI * K + LO (mod P)\n var r = num;\n var rlen;\n\n do {\n this.split(r, this.tmp);\n r = this.imulK(r);\n r = r.iadd(this.tmp);\n rlen = r.bitLength();\n } while (rlen > this.n);\n\n var cmp = rlen < this.n ? -1 : r.ucmp(this.p);\n if (cmp === 0) {\n r.words[0] = 0;\n r.length = 1;\n } else if (cmp > 0) {\n r.isub(this.p);\n } else {\n if (r.strip !== undefined) {\n // r is BN v4 instance\n r.strip();\n } else {\n // r is BN v5 instance\n r._strip();\n }\n }\n\n return r;\n };\n\n MPrime.prototype.split = function split (input, out) {\n input.iushrn(this.n, 0, out);\n };\n\n MPrime.prototype.imulK = function imulK (num) {\n return num.imul(this.k);\n };\n\n function K256 () {\n MPrime.call(\n this,\n 'k256',\n 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f');\n }\n inherits(K256, MPrime);\n\n K256.prototype.split = function split (input, output) {\n // 256 = 9 * 26 + 22\n var mask = 0x3fffff;\n\n var outLen = Math.min(input.length, 9);\n for (var i = 0; i < outLen; i++) {\n output.words[i] = input.words[i];\n }\n output.length = outLen;\n\n if (input.length <= 9) {\n input.words[0] = 0;\n input.length = 1;\n return;\n }\n\n // Shift by 9 limbs\n var prev = input.words[9];\n output.words[output.length++] = prev & mask;\n\n for (i = 10; i < input.length; i++) {\n var next = input.words[i] | 0;\n input.words[i - 10] = ((next & mask) << 4) | (prev >>> 22);\n prev = next;\n }\n prev >>>= 22;\n input.words[i - 10] = prev;\n if (prev === 0 && input.length > 10) {\n input.length -= 10;\n } else {\n input.length -= 9;\n }\n };\n\n K256.prototype.imulK = function imulK (num) {\n // K = 0x1000003d1 = [ 0x40, 0x3d1 ]\n num.words[num.length] = 0;\n num.words[num.length + 1] = 0;\n num.length += 2;\n\n // bounded at: 0x40 * 0x3ffffff + 0x3d0 = 0x100000390\n var lo = 0;\n for (var i = 0; i < num.length; i++) {\n var w = num.words[i] | 0;\n lo += w * 0x3d1;\n num.words[i] = lo & 0x3ffffff;\n lo = w * 0x40 + ((lo / 0x4000000) | 0);\n }\n\n // Fast length reduction\n if (num.words[num.length - 1] === 0) {\n num.length--;\n if (num.words[num.length - 1] === 0) {\n num.length--;\n }\n }\n return num;\n };\n\n function P224 () {\n MPrime.call(\n this,\n 'p224',\n 'ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001');\n }\n inherits(P224, MPrime);\n\n function P192 () {\n MPrime.call(\n this,\n 'p192',\n 'ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff');\n }\n inherits(P192, MPrime);\n\n function P25519 () {\n // 2 ^ 255 - 19\n MPrime.call(\n this,\n '25519',\n '7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed');\n }\n inherits(P25519, MPrime);\n\n P25519.prototype.imulK = function imulK (num) {\n // K = 0x13\n var carry = 0;\n for (var i = 0; i < num.length; i++) {\n var hi = (num.words[i] | 0) * 0x13 + carry;\n var lo = hi & 0x3ffffff;\n hi >>>= 26;\n\n num.words[i] = lo;\n carry = hi;\n }\n if (carry !== 0) {\n num.words[num.length++] = carry;\n }\n return num;\n };\n\n // Exported mostly for testing purposes, use plain name instead\n BN._prime = function prime (name) {\n // Cached version of prime\n if (primes[name]) return primes[name];\n\n var prime;\n if (name === 'k256') {\n prime = new K256();\n } else if (name === 'p224') {\n prime = new P224();\n } else if (name === 'p192') {\n prime = new P192();\n } else if (name === 'p25519') {\n prime = new P25519();\n } else {\n throw new Error('Unknown prime ' + name);\n }\n primes[name] = prime;\n\n return prime;\n };\n\n //\n // Base reduction engine\n //\n function Red (m) {\n if (typeof m === 'string') {\n var prime = BN._prime(m);\n this.m = prime.p;\n this.prime = prime;\n } else {\n assert(m.gtn(1), 'modulus must be greater than 1');\n this.m = m;\n this.prime = null;\n }\n }\n\n Red.prototype._verify1 = function _verify1 (a) {\n assert(a.negative === 0, 'red works only with positives');\n assert(a.red, 'red works only with red numbers');\n };\n\n Red.prototype._verify2 = function _verify2 (a, b) {\n assert((a.negative | b.negative) === 0, 'red works only with positives');\n assert(a.red && a.red === b.red,\n 'red works only with red numbers');\n };\n\n Red.prototype.imod = function imod (a) {\n if (this.prime) return this.prime.ireduce(a)._forceRed(this);\n return a.umod(this.m)._forceRed(this);\n };\n\n Red.prototype.neg = function neg (a) {\n if (a.isZero()) {\n return a.clone();\n }\n\n return this.m.sub(a)._forceRed(this);\n };\n\n Red.prototype.add = function add (a, b) {\n this._verify2(a, b);\n\n var res = a.add(b);\n if (res.cmp(this.m) >= 0) {\n res.isub(this.m);\n }\n return res._forceRed(this);\n };\n\n Red.prototype.iadd = function iadd (a, b) {\n this._verify2(a, b);\n\n var res = a.iadd(b);\n if (res.cmp(this.m) >= 0) {\n res.isub(this.m);\n }\n return res;\n };\n\n Red.prototype.sub = function sub (a, b) {\n this._verify2(a, b);\n\n var res = a.sub(b);\n if (res.cmpn(0) < 0) {\n res.iadd(this.m);\n }\n return res._forceRed(this);\n };\n\n Red.prototype.isub = function isub (a, b) {\n this._verify2(a, b);\n\n var res = a.isub(b);\n if (res.cmpn(0) < 0) {\n res.iadd(this.m);\n }\n return res;\n };\n\n Red.prototype.shl = function shl (a, num) {\n this._verify1(a);\n return this.imod(a.ushln(num));\n };\n\n Red.prototype.imul = function imul (a, b) {\n this._verify2(a, b);\n return this.imod(a.imul(b));\n };\n\n Red.prototype.mul = function mul (a, b) {\n this._verify2(a, b);\n return this.imod(a.mul(b));\n };\n\n Red.prototype.isqr = function isqr (a) {\n return this.imul(a, a.clone());\n };\n\n Red.prototype.sqr = function sqr (a) {\n return this.mul(a, a);\n };\n\n Red.prototype.sqrt = function sqrt (a) {\n if (a.isZero()) return a.clone();\n\n var mod3 = this.m.andln(3);\n assert(mod3 % 2 === 1);\n\n // Fast case\n if (mod3 === 3) {\n var pow = this.m.add(new BN(1)).iushrn(2);\n return this.pow(a, pow);\n }\n\n // Tonelli-Shanks algorithm (Totally unoptimized and slow)\n //\n // Find Q and S, that Q * 2 ^ S = (P - 1)\n var q = this.m.subn(1);\n var s = 0;\n while (!q.isZero() && q.andln(1) === 0) {\n s++;\n q.iushrn(1);\n }\n assert(!q.isZero());\n\n var one = new BN(1).toRed(this);\n var nOne = one.redNeg();\n\n // Find quadratic non-residue\n // NOTE: Max is such because of generalized Riemann hypothesis.\n var lpow = this.m.subn(1).iushrn(1);\n var z = this.m.bitLength();\n z = new BN(2 * z * z).toRed(this);\n\n while (this.pow(z, lpow).cmp(nOne) !== 0) {\n z.redIAdd(nOne);\n }\n\n var c = this.pow(z, q);\n var r = this.pow(a, q.addn(1).iushrn(1));\n var t = this.pow(a, q);\n var m = s;\n while (t.cmp(one) !== 0) {\n var tmp = t;\n for (var i = 0; tmp.cmp(one) !== 0; i++) {\n tmp = tmp.redSqr();\n }\n assert(i < m);\n var b = this.pow(c, new BN(1).iushln(m - i - 1));\n\n r = r.redMul(b);\n c = b.redSqr();\n t = t.redMul(c);\n m = i;\n }\n\n return r;\n };\n\n Red.prototype.invm = function invm (a) {\n var inv = a._invmp(this.m);\n if (inv.negative !== 0) {\n inv.negative = 0;\n return this.imod(inv).redNeg();\n } else {\n return this.imod(inv);\n }\n };\n\n Red.prototype.pow = function pow (a, num) {\n if (num.isZero()) return new BN(1).toRed(this);\n if (num.cmpn(1) === 0) return a.clone();\n\n var windowSize = 4;\n var wnd = new Array(1 << windowSize);\n wnd[0] = new BN(1).toRed(this);\n wnd[1] = a;\n for (var i = 2; i < wnd.length; i++) {\n wnd[i] = this.mul(wnd[i - 1], a);\n }\n\n var res = wnd[0];\n var current = 0;\n var currentLen = 0;\n var start = num.bitLength() % 26;\n if (start === 0) {\n start = 26;\n }\n\n for (i = num.length - 1; i >= 0; i--) {\n var word = num.words[i];\n for (var j = start - 1; j >= 0; j--) {\n var bit = (word >> j) & 1;\n if (res !== wnd[0]) {\n res = this.sqr(res);\n }\n\n if (bit === 0 && current === 0) {\n currentLen = 0;\n continue;\n }\n\n current <<= 1;\n current |= bit;\n currentLen++;\n if (currentLen !== windowSize && (i !== 0 || j !== 0)) continue;\n\n res = this.mul(res, wnd[current]);\n currentLen = 0;\n current = 0;\n }\n start = 26;\n }\n\n return res;\n };\n\n Red.prototype.convertTo = function convertTo (num) {\n var r = num.umod(this.m);\n\n return r === num ? r.clone() : r;\n };\n\n Red.prototype.convertFrom = function convertFrom (num) {\n var res = num.clone();\n res.red = null;\n return res;\n };\n\n //\n // Montgomery method engine\n //\n\n BN.mont = function mont (num) {\n return new Mont(num);\n };\n\n function Mont (m) {\n Red.call(this, m);\n\n this.shift = this.m.bitLength();\n if (this.shift % 26 !== 0) {\n this.shift += 26 - (this.shift % 26);\n }\n\n this.r = new BN(1).iushln(this.shift);\n this.r2 = this.imod(this.r.sqr());\n this.rinv = this.r._invmp(this.m);\n\n this.minv = this.rinv.mul(this.r).isubn(1).div(this.m);\n this.minv = this.minv.umod(this.r);\n this.minv = this.r.sub(this.minv);\n }\n inherits(Mont, Red);\n\n Mont.prototype.convertTo = function convertTo (num) {\n return this.imod(num.ushln(this.shift));\n };\n\n Mont.prototype.convertFrom = function convertFrom (num) {\n var r = this.imod(num.mul(this.rinv));\n r.red = null;\n return r;\n };\n\n Mont.prototype.imul = function imul (a, b) {\n if (a.isZero() || b.isZero()) {\n a.words[0] = 0;\n a.length = 1;\n return a;\n }\n\n var t = a.imul(b);\n var c = t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m);\n var u = t.isub(c).iushrn(this.shift);\n var res = u;\n\n if (u.cmp(this.m) >= 0) {\n res = u.isub(this.m);\n } else if (u.cmpn(0) < 0) {\n res = u.iadd(this.m);\n }\n\n return res._forceRed(this);\n };\n\n Mont.prototype.mul = function mul (a, b) {\n if (a.isZero() || b.isZero()) return new BN(0)._forceRed(this);\n\n var t = a.mul(b);\n var c = t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m);\n var u = t.isub(c).iushrn(this.shift);\n var res = u;\n if (u.cmp(this.m) >= 0) {\n res = u.isub(this.m);\n } else if (u.cmpn(0) < 0) {\n res = u.iadd(this.m);\n }\n\n return res._forceRed(this);\n };\n\n Mont.prototype.invm = function invm (a) {\n // (AR)^-1 * R^2 = (A^-1 * R^-1) * R^2 = A^-1 * R\n var res = this.imod(a._invmp(this.m).mul(this.r2));\n return res._forceRed(this);\n };\n})(typeof module === 'undefined' || module, this);\n","'use strict'\n\nexports.byteLength = byteLength\nexports.toByteArray = toByteArray\nexports.fromByteArray = fromByteArray\n\nvar lookup = []\nvar revLookup = []\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array\n\nvar code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'\nfor (var i = 0, len = code.length; i < len; ++i) {\n lookup[i] = code[i]\n revLookup[code.charCodeAt(i)] = i\n}\n\n// Support decoding URL-safe base64 strings, as Node.js does.\n// See: https://en.wikipedia.org/wiki/Base64#URL_applications\nrevLookup['-'.charCodeAt(0)] = 62\nrevLookup['_'.charCodeAt(0)] = 63\n\nfunction getLens (b64) {\n var len = b64.length\n\n if (len % 4 > 0) {\n throw new Error('Invalid string. Length must be a multiple of 4')\n }\n\n // Trim off extra bytes after placeholder bytes are found\n // See: https://github.com/beatgammit/base64-js/issues/42\n var validLen = b64.indexOf('=')\n if (validLen === -1) validLen = len\n\n var placeHoldersLen = validLen === len\n ? 0\n : 4 - (validLen % 4)\n\n return [validLen, placeHoldersLen]\n}\n\n// base64 is 4/3 + up to two characters of the original data\nfunction byteLength (b64) {\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction _byteLength (b64, validLen, placeHoldersLen) {\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction toByteArray (b64) {\n var tmp\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n\n var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))\n\n var curByte = 0\n\n // if there are placeholders, only get up to the last complete 4 chars\n var len = placeHoldersLen > 0\n ? validLen - 4\n : validLen\n\n var i\n for (i = 0; i < len; i += 4) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 18) |\n (revLookup[b64.charCodeAt(i + 1)] << 12) |\n (revLookup[b64.charCodeAt(i + 2)] << 6) |\n revLookup[b64.charCodeAt(i + 3)]\n arr[curByte++] = (tmp >> 16) & 0xFF\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 2) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 2) |\n (revLookup[b64.charCodeAt(i + 1)] >> 4)\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 1) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 10) |\n (revLookup[b64.charCodeAt(i + 1)] << 4) |\n (revLookup[b64.charCodeAt(i + 2)] >> 2)\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n return arr\n}\n\nfunction tripletToBase64 (num) {\n return lookup[num >> 18 & 0x3F] +\n lookup[num >> 12 & 0x3F] +\n lookup[num >> 6 & 0x3F] +\n lookup[num & 0x3F]\n}\n\nfunction encodeChunk (uint8, start, end) {\n var tmp\n var output = []\n for (var i = start; i < end; i += 3) {\n tmp =\n ((uint8[i] << 16) & 0xFF0000) +\n ((uint8[i + 1] << 8) & 0xFF00) +\n (uint8[i + 2] & 0xFF)\n output.push(tripletToBase64(tmp))\n }\n return output.join('')\n}\n\nfunction fromByteArray (uint8) {\n var tmp\n var len = uint8.length\n var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes\n var parts = []\n var maxChunkLength = 16383 // must be multiple of 3\n\n // go through the array every three bytes, we'll deal with trailing stuff later\n for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\n parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)))\n }\n\n // pad the end with zeros, but make sure to not forget the extra bytes\n if (extraBytes === 1) {\n tmp = uint8[len - 1]\n parts.push(\n lookup[tmp >> 2] +\n lookup[(tmp << 4) & 0x3F] +\n '=='\n )\n } else if (extraBytes === 2) {\n tmp = (uint8[len - 2] << 8) + uint8[len - 1]\n parts.push(\n lookup[tmp >> 10] +\n lookup[(tmp >> 4) & 0x3F] +\n lookup[(tmp << 2) & 0x3F] +\n '='\n )\n }\n\n return parts.join('')\n}\n","(function (module, exports) {\n 'use strict';\n\n // Utils\n function assert (val, msg) {\n if (!val) throw new Error(msg || 'Assertion failed');\n }\n\n // Could use `inherits` module, but don't want to move from single file\n // architecture yet.\n function inherits (ctor, superCtor) {\n ctor.super_ = superCtor;\n var TempCtor = function () {};\n TempCtor.prototype = superCtor.prototype;\n ctor.prototype = new TempCtor();\n ctor.prototype.constructor = ctor;\n }\n\n // BN\n\n function BN (number, base, endian) {\n if (BN.isBN(number)) {\n return number;\n }\n\n this.negative = 0;\n this.words = null;\n this.length = 0;\n\n // Reduction context\n this.red = null;\n\n if (number !== null) {\n if (base === 'le' || base === 'be') {\n endian = base;\n base = 10;\n }\n\n this._init(number || 0, base || 10, endian || 'be');\n }\n }\n if (typeof module === 'object') {\n module.exports = BN;\n } else {\n exports.BN = BN;\n }\n\n BN.BN = BN;\n BN.wordSize = 26;\n\n var Buffer;\n try {\n if (typeof window !== 'undefined' && typeof window.Buffer !== 'undefined') {\n Buffer = window.Buffer;\n } else {\n Buffer = require('buffer').Buffer;\n }\n } catch (e) {\n }\n\n BN.isBN = function isBN (num) {\n if (num instanceof BN) {\n return true;\n }\n\n return num !== null && typeof num === 'object' &&\n num.constructor.wordSize === BN.wordSize && Array.isArray(num.words);\n };\n\n BN.max = function max (left, right) {\n if (left.cmp(right) > 0) return left;\n return right;\n };\n\n BN.min = function min (left, right) {\n if (left.cmp(right) < 0) return left;\n return right;\n };\n\n BN.prototype._init = function init (number, base, endian) {\n if (typeof number === 'number') {\n return this._initNumber(number, base, endian);\n }\n\n if (typeof number === 'object') {\n return this._initArray(number, base, endian);\n }\n\n if (base === 'hex') {\n base = 16;\n }\n assert(base === (base | 0) && base >= 2 && base <= 36);\n\n number = number.toString().replace(/\\s+/g, '');\n var start = 0;\n if (number[0] === '-') {\n start++;\n this.negative = 1;\n }\n\n if (start < number.length) {\n if (base === 16) {\n this._parseHex(number, start, endian);\n } else {\n this._parseBase(number, base, start);\n if (endian === 'le') {\n this._initArray(this.toArray(), base, endian);\n }\n }\n }\n };\n\n BN.prototype._initNumber = function _initNumber (number, base, endian) {\n if (number < 0) {\n this.negative = 1;\n number = -number;\n }\n if (number < 0x4000000) {\n this.words = [number & 0x3ffffff];\n this.length = 1;\n } else if (number < 0x10000000000000) {\n this.words = [\n number & 0x3ffffff,\n (number / 0x4000000) & 0x3ffffff\n ];\n this.length = 2;\n } else {\n assert(number < 0x20000000000000); // 2 ^ 53 (unsafe)\n this.words = [\n number & 0x3ffffff,\n (number / 0x4000000) & 0x3ffffff,\n 1\n ];\n this.length = 3;\n }\n\n if (endian !== 'le') return;\n\n // Reverse the bytes\n this._initArray(this.toArray(), base, endian);\n };\n\n BN.prototype._initArray = function _initArray (number, base, endian) {\n // Perhaps a Uint8Array\n assert(typeof number.length === 'number');\n if (number.length <= 0) {\n this.words = [0];\n this.length = 1;\n return this;\n }\n\n this.length = Math.ceil(number.length / 3);\n this.words = new Array(this.length);\n for (var i = 0; i < this.length; i++) {\n this.words[i] = 0;\n }\n\n var j, w;\n var off = 0;\n if (endian === 'be') {\n for (i = number.length - 1, j = 0; i >= 0; i -= 3) {\n w = number[i] | (number[i - 1] << 8) | (number[i - 2] << 16);\n this.words[j] |= (w << off) & 0x3ffffff;\n this.words[j + 1] = (w >>> (26 - off)) & 0x3ffffff;\n off += 24;\n if (off >= 26) {\n off -= 26;\n j++;\n }\n }\n } else if (endian === 'le') {\n for (i = 0, j = 0; i < number.length; i += 3) {\n w = number[i] | (number[i + 1] << 8) | (number[i + 2] << 16);\n this.words[j] |= (w << off) & 0x3ffffff;\n this.words[j + 1] = (w >>> (26 - off)) & 0x3ffffff;\n off += 24;\n if (off >= 26) {\n off -= 26;\n j++;\n }\n }\n }\n return this._strip();\n };\n\n function parseHex4Bits (string, index) {\n var c = string.charCodeAt(index);\n // '0' - '9'\n if (c >= 48 && c <= 57) {\n return c - 48;\n // 'A' - 'F'\n } else if (c >= 65 && c <= 70) {\n return c - 55;\n // 'a' - 'f'\n } else if (c >= 97 && c <= 102) {\n return c - 87;\n } else {\n assert(false, 'Invalid character in ' + string);\n }\n }\n\n function parseHexByte (string, lowerBound, index) {\n var r = parseHex4Bits(string, index);\n if (index - 1 >= lowerBound) {\n r |= parseHex4Bits(string, index - 1) << 4;\n }\n return r;\n }\n\n BN.prototype._parseHex = function _parseHex (number, start, endian) {\n // Create possibly bigger array to ensure that it fits the number\n this.length = Math.ceil((number.length - start) / 6);\n this.words = new Array(this.length);\n for (var i = 0; i < this.length; i++) {\n this.words[i] = 0;\n }\n\n // 24-bits chunks\n var off = 0;\n var j = 0;\n\n var w;\n if (endian === 'be') {\n for (i = number.length - 1; i >= start; i -= 2) {\n w = parseHexByte(number, start, i) << off;\n this.words[j] |= w & 0x3ffffff;\n if (off >= 18) {\n off -= 18;\n j += 1;\n this.words[j] |= w >>> 26;\n } else {\n off += 8;\n }\n }\n } else {\n var parseLength = number.length - start;\n for (i = parseLength % 2 === 0 ? start + 1 : start; i < number.length; i += 2) {\n w = parseHexByte(number, start, i) << off;\n this.words[j] |= w & 0x3ffffff;\n if (off >= 18) {\n off -= 18;\n j += 1;\n this.words[j] |= w >>> 26;\n } else {\n off += 8;\n }\n }\n }\n\n this._strip();\n };\n\n function parseBase (str, start, end, mul) {\n var r = 0;\n var b = 0;\n var len = Math.min(str.length, end);\n for (var i = start; i < len; i++) {\n var c = str.charCodeAt(i) - 48;\n\n r *= mul;\n\n // 'a'\n if (c >= 49) {\n b = c - 49 + 0xa;\n\n // 'A'\n } else if (c >= 17) {\n b = c - 17 + 0xa;\n\n // '0' - '9'\n } else {\n b = c;\n }\n assert(c >= 0 && b < mul, 'Invalid character');\n r += b;\n }\n return r;\n }\n\n BN.prototype._parseBase = function _parseBase (number, base, start) {\n // Initialize as zero\n this.words = [0];\n this.length = 1;\n\n // Find length of limb in base\n for (var limbLen = 0, limbPow = 1; limbPow <= 0x3ffffff; limbPow *= base) {\n limbLen++;\n }\n limbLen--;\n limbPow = (limbPow / base) | 0;\n\n var total = number.length - start;\n var mod = total % limbLen;\n var end = Math.min(total, total - mod) + start;\n\n var word = 0;\n for (var i = start; i < end; i += limbLen) {\n word = parseBase(number, i, i + limbLen, base);\n\n this.imuln(limbPow);\n if (this.words[0] + word < 0x4000000) {\n this.words[0] += word;\n } else {\n this._iaddn(word);\n }\n }\n\n if (mod !== 0) {\n var pow = 1;\n word = parseBase(number, i, number.length, base);\n\n for (i = 0; i < mod; i++) {\n pow *= base;\n }\n\n this.imuln(pow);\n if (this.words[0] + word < 0x4000000) {\n this.words[0] += word;\n } else {\n this._iaddn(word);\n }\n }\n\n this._strip();\n };\n\n BN.prototype.copy = function copy (dest) {\n dest.words = new Array(this.length);\n for (var i = 0; i < this.length; i++) {\n dest.words[i] = this.words[i];\n }\n dest.length = this.length;\n dest.negative = this.negative;\n dest.red = this.red;\n };\n\n function move (dest, src) {\n dest.words = src.words;\n dest.length = src.length;\n dest.negative = src.negative;\n dest.red = src.red;\n }\n\n BN.prototype._move = function _move (dest) {\n move(dest, this);\n };\n\n BN.prototype.clone = function clone () {\n var r = new BN(null);\n this.copy(r);\n return r;\n };\n\n BN.prototype._expand = function _expand (size) {\n while (this.length < size) {\n this.words[this.length++] = 0;\n }\n return this;\n };\n\n // Remove leading `0` from `this`\n BN.prototype._strip = function strip () {\n while (this.length > 1 && this.words[this.length - 1] === 0) {\n this.length--;\n }\n return this._normSign();\n };\n\n BN.prototype._normSign = function _normSign () {\n // -0 = 0\n if (this.length === 1 && this.words[0] === 0) {\n this.negative = 0;\n }\n return this;\n };\n\n // Check Symbol.for because not everywhere where Symbol defined\n // See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol#Browser_compatibility\n if (typeof Symbol !== 'undefined' && typeof Symbol.for === 'function') {\n try {\n BN.prototype[Symbol.for('nodejs.util.inspect.custom')] = inspect;\n } catch (e) {\n BN.prototype.inspect = inspect;\n }\n } else {\n BN.prototype.inspect = inspect;\n }\n\n function inspect () {\n return (this.red ? '';\n }\n\n /*\n\n var zeros = [];\n var groupSizes = [];\n var groupBases = [];\n\n var s = '';\n var i = -1;\n while (++i < BN.wordSize) {\n zeros[i] = s;\n s += '0';\n }\n groupSizes[0] = 0;\n groupSizes[1] = 0;\n groupBases[0] = 0;\n groupBases[1] = 0;\n var base = 2 - 1;\n while (++base < 36 + 1) {\n var groupSize = 0;\n var groupBase = 1;\n while (groupBase < (1 << BN.wordSize) / base) {\n groupBase *= base;\n groupSize += 1;\n }\n groupSizes[base] = groupSize;\n groupBases[base] = groupBase;\n }\n\n */\n\n var zeros = [\n '',\n '0',\n '00',\n '000',\n '0000',\n '00000',\n '000000',\n '0000000',\n '00000000',\n '000000000',\n '0000000000',\n '00000000000',\n '000000000000',\n '0000000000000',\n '00000000000000',\n '000000000000000',\n '0000000000000000',\n '00000000000000000',\n '000000000000000000',\n '0000000000000000000',\n '00000000000000000000',\n '000000000000000000000',\n '0000000000000000000000',\n '00000000000000000000000',\n '000000000000000000000000',\n '0000000000000000000000000'\n ];\n\n var groupSizes = [\n 0, 0,\n 25, 16, 12, 11, 10, 9, 8,\n 8, 7, 7, 7, 7, 6, 6,\n 6, 6, 6, 6, 6, 5, 5,\n 5, 5, 5, 5, 5, 5, 5,\n 5, 5, 5, 5, 5, 5, 5\n ];\n\n var groupBases = [\n 0, 0,\n 33554432, 43046721, 16777216, 48828125, 60466176, 40353607, 16777216,\n 43046721, 10000000, 19487171, 35831808, 62748517, 7529536, 11390625,\n 16777216, 24137569, 34012224, 47045881, 64000000, 4084101, 5153632,\n 6436343, 7962624, 9765625, 11881376, 14348907, 17210368, 20511149,\n 24300000, 28629151, 33554432, 39135393, 45435424, 52521875, 60466176\n ];\n\n BN.prototype.toString = function toString (base, padding) {\n base = base || 10;\n padding = padding | 0 || 1;\n\n var out;\n if (base === 16 || base === 'hex') {\n out = '';\n var off = 0;\n var carry = 0;\n for (var i = 0; i < this.length; i++) {\n var w = this.words[i];\n var word = (((w << off) | carry) & 0xffffff).toString(16);\n carry = (w >>> (24 - off)) & 0xffffff;\n off += 2;\n if (off >= 26) {\n off -= 26;\n i--;\n }\n if (carry !== 0 || i !== this.length - 1) {\n out = zeros[6 - word.length] + word + out;\n } else {\n out = word + out;\n }\n }\n if (carry !== 0) {\n out = carry.toString(16) + out;\n }\n while (out.length % padding !== 0) {\n out = '0' + out;\n }\n if (this.negative !== 0) {\n out = '-' + out;\n }\n return out;\n }\n\n if (base === (base | 0) && base >= 2 && base <= 36) {\n // var groupSize = Math.floor(BN.wordSize * Math.LN2 / Math.log(base));\n var groupSize = groupSizes[base];\n // var groupBase = Math.pow(base, groupSize);\n var groupBase = groupBases[base];\n out = '';\n var c = this.clone();\n c.negative = 0;\n while (!c.isZero()) {\n var r = c.modrn(groupBase).toString(base);\n c = c.idivn(groupBase);\n\n if (!c.isZero()) {\n out = zeros[groupSize - r.length] + r + out;\n } else {\n out = r + out;\n }\n }\n if (this.isZero()) {\n out = '0' + out;\n }\n while (out.length % padding !== 0) {\n out = '0' + out;\n }\n if (this.negative !== 0) {\n out = '-' + out;\n }\n return out;\n }\n\n assert(false, 'Base should be between 2 and 36');\n };\n\n BN.prototype.toNumber = function toNumber () {\n var ret = this.words[0];\n if (this.length === 2) {\n ret += this.words[1] * 0x4000000;\n } else if (this.length === 3 && this.words[2] === 0x01) {\n // NOTE: at this stage it is known that the top bit is set\n ret += 0x10000000000000 + (this.words[1] * 0x4000000);\n } else if (this.length > 2) {\n assert(false, 'Number can only safely store up to 53 bits');\n }\n return (this.negative !== 0) ? -ret : ret;\n };\n\n BN.prototype.toJSON = function toJSON () {\n return this.toString(16, 2);\n };\n\n if (Buffer) {\n BN.prototype.toBuffer = function toBuffer (endian, length) {\n return this.toArrayLike(Buffer, endian, length);\n };\n }\n\n BN.prototype.toArray = function toArray (endian, length) {\n return this.toArrayLike(Array, endian, length);\n };\n\n var allocate = function allocate (ArrayType, size) {\n if (ArrayType.allocUnsafe) {\n return ArrayType.allocUnsafe(size);\n }\n return new ArrayType(size);\n };\n\n BN.prototype.toArrayLike = function toArrayLike (ArrayType, endian, length) {\n this._strip();\n\n var byteLength = this.byteLength();\n var reqLength = length || Math.max(1, byteLength);\n assert(byteLength <= reqLength, 'byte array longer than desired length');\n assert(reqLength > 0, 'Requested array length <= 0');\n\n var res = allocate(ArrayType, reqLength);\n var postfix = endian === 'le' ? 'LE' : 'BE';\n this['_toArrayLike' + postfix](res, byteLength);\n return res;\n };\n\n BN.prototype._toArrayLikeLE = function _toArrayLikeLE (res, byteLength) {\n var position = 0;\n var carry = 0;\n\n for (var i = 0, shift = 0; i < this.length; i++) {\n var word = (this.words[i] << shift) | carry;\n\n res[position++] = word & 0xff;\n if (position < res.length) {\n res[position++] = (word >> 8) & 0xff;\n }\n if (position < res.length) {\n res[position++] = (word >> 16) & 0xff;\n }\n\n if (shift === 6) {\n if (position < res.length) {\n res[position++] = (word >> 24) & 0xff;\n }\n carry = 0;\n shift = 0;\n } else {\n carry = word >>> 24;\n shift += 2;\n }\n }\n\n if (position < res.length) {\n res[position++] = carry;\n\n while (position < res.length) {\n res[position++] = 0;\n }\n }\n };\n\n BN.prototype._toArrayLikeBE = function _toArrayLikeBE (res, byteLength) {\n var position = res.length - 1;\n var carry = 0;\n\n for (var i = 0, shift = 0; i < this.length; i++) {\n var word = (this.words[i] << shift) | carry;\n\n res[position--] = word & 0xff;\n if (position >= 0) {\n res[position--] = (word >> 8) & 0xff;\n }\n if (position >= 0) {\n res[position--] = (word >> 16) & 0xff;\n }\n\n if (shift === 6) {\n if (position >= 0) {\n res[position--] = (word >> 24) & 0xff;\n }\n carry = 0;\n shift = 0;\n } else {\n carry = word >>> 24;\n shift += 2;\n }\n }\n\n if (position >= 0) {\n res[position--] = carry;\n\n while (position >= 0) {\n res[position--] = 0;\n }\n }\n };\n\n if (Math.clz32) {\n BN.prototype._countBits = function _countBits (w) {\n return 32 - Math.clz32(w);\n };\n } else {\n BN.prototype._countBits = function _countBits (w) {\n var t = w;\n var r = 0;\n if (t >= 0x1000) {\n r += 13;\n t >>>= 13;\n }\n if (t >= 0x40) {\n r += 7;\n t >>>= 7;\n }\n if (t >= 0x8) {\n r += 4;\n t >>>= 4;\n }\n if (t >= 0x02) {\n r += 2;\n t >>>= 2;\n }\n return r + t;\n };\n }\n\n BN.prototype._zeroBits = function _zeroBits (w) {\n // Short-cut\n if (w === 0) return 26;\n\n var t = w;\n var r = 0;\n if ((t & 0x1fff) === 0) {\n r += 13;\n t >>>= 13;\n }\n if ((t & 0x7f) === 0) {\n r += 7;\n t >>>= 7;\n }\n if ((t & 0xf) === 0) {\n r += 4;\n t >>>= 4;\n }\n if ((t & 0x3) === 0) {\n r += 2;\n t >>>= 2;\n }\n if ((t & 0x1) === 0) {\n r++;\n }\n return r;\n };\n\n // Return number of used bits in a BN\n BN.prototype.bitLength = function bitLength () {\n var w = this.words[this.length - 1];\n var hi = this._countBits(w);\n return (this.length - 1) * 26 + hi;\n };\n\n function toBitArray (num) {\n var w = new Array(num.bitLength());\n\n for (var bit = 0; bit < w.length; bit++) {\n var off = (bit / 26) | 0;\n var wbit = bit % 26;\n\n w[bit] = (num.words[off] >>> wbit) & 0x01;\n }\n\n return w;\n }\n\n // Number of trailing zero bits\n BN.prototype.zeroBits = function zeroBits () {\n if (this.isZero()) return 0;\n\n var r = 0;\n for (var i = 0; i < this.length; i++) {\n var b = this._zeroBits(this.words[i]);\n r += b;\n if (b !== 26) break;\n }\n return r;\n };\n\n BN.prototype.byteLength = function byteLength () {\n return Math.ceil(this.bitLength() / 8);\n };\n\n BN.prototype.toTwos = function toTwos (width) {\n if (this.negative !== 0) {\n return this.abs().inotn(width).iaddn(1);\n }\n return this.clone();\n };\n\n BN.prototype.fromTwos = function fromTwos (width) {\n if (this.testn(width - 1)) {\n return this.notn(width).iaddn(1).ineg();\n }\n return this.clone();\n };\n\n BN.prototype.isNeg = function isNeg () {\n return this.negative !== 0;\n };\n\n // Return negative clone of `this`\n BN.prototype.neg = function neg () {\n return this.clone().ineg();\n };\n\n BN.prototype.ineg = function ineg () {\n if (!this.isZero()) {\n this.negative ^= 1;\n }\n\n return this;\n };\n\n // Or `num` with `this` in-place\n BN.prototype.iuor = function iuor (num) {\n while (this.length < num.length) {\n this.words[this.length++] = 0;\n }\n\n for (var i = 0; i < num.length; i++) {\n this.words[i] = this.words[i] | num.words[i];\n }\n\n return this._strip();\n };\n\n BN.prototype.ior = function ior (num) {\n assert((this.negative | num.negative) === 0);\n return this.iuor(num);\n };\n\n // Or `num` with `this`\n BN.prototype.or = function or (num) {\n if (this.length > num.length) return this.clone().ior(num);\n return num.clone().ior(this);\n };\n\n BN.prototype.uor = function uor (num) {\n if (this.length > num.length) return this.clone().iuor(num);\n return num.clone().iuor(this);\n };\n\n // And `num` with `this` in-place\n BN.prototype.iuand = function iuand (num) {\n // b = min-length(num, this)\n var b;\n if (this.length > num.length) {\n b = num;\n } else {\n b = this;\n }\n\n for (var i = 0; i < b.length; i++) {\n this.words[i] = this.words[i] & num.words[i];\n }\n\n this.length = b.length;\n\n return this._strip();\n };\n\n BN.prototype.iand = function iand (num) {\n assert((this.negative | num.negative) === 0);\n return this.iuand(num);\n };\n\n // And `num` with `this`\n BN.prototype.and = function and (num) {\n if (this.length > num.length) return this.clone().iand(num);\n return num.clone().iand(this);\n };\n\n BN.prototype.uand = function uand (num) {\n if (this.length > num.length) return this.clone().iuand(num);\n return num.clone().iuand(this);\n };\n\n // Xor `num` with `this` in-place\n BN.prototype.iuxor = function iuxor (num) {\n // a.length > b.length\n var a;\n var b;\n if (this.length > num.length) {\n a = this;\n b = num;\n } else {\n a = num;\n b = this;\n }\n\n for (var i = 0; i < b.length; i++) {\n this.words[i] = a.words[i] ^ b.words[i];\n }\n\n if (this !== a) {\n for (; i < a.length; i++) {\n this.words[i] = a.words[i];\n }\n }\n\n this.length = a.length;\n\n return this._strip();\n };\n\n BN.prototype.ixor = function ixor (num) {\n assert((this.negative | num.negative) === 0);\n return this.iuxor(num);\n };\n\n // Xor `num` with `this`\n BN.prototype.xor = function xor (num) {\n if (this.length > num.length) return this.clone().ixor(num);\n return num.clone().ixor(this);\n };\n\n BN.prototype.uxor = function uxor (num) {\n if (this.length > num.length) return this.clone().iuxor(num);\n return num.clone().iuxor(this);\n };\n\n // Not ``this`` with ``width`` bitwidth\n BN.prototype.inotn = function inotn (width) {\n assert(typeof width === 'number' && width >= 0);\n\n var bytesNeeded = Math.ceil(width / 26) | 0;\n var bitsLeft = width % 26;\n\n // Extend the buffer with leading zeroes\n this._expand(bytesNeeded);\n\n if (bitsLeft > 0) {\n bytesNeeded--;\n }\n\n // Handle complete words\n for (var i = 0; i < bytesNeeded; i++) {\n this.words[i] = ~this.words[i] & 0x3ffffff;\n }\n\n // Handle the residue\n if (bitsLeft > 0) {\n this.words[i] = ~this.words[i] & (0x3ffffff >> (26 - bitsLeft));\n }\n\n // And remove leading zeroes\n return this._strip();\n };\n\n BN.prototype.notn = function notn (width) {\n return this.clone().inotn(width);\n };\n\n // Set `bit` of `this`\n BN.prototype.setn = function setn (bit, val) {\n assert(typeof bit === 'number' && bit >= 0);\n\n var off = (bit / 26) | 0;\n var wbit = bit % 26;\n\n this._expand(off + 1);\n\n if (val) {\n this.words[off] = this.words[off] | (1 << wbit);\n } else {\n this.words[off] = this.words[off] & ~(1 << wbit);\n }\n\n return this._strip();\n };\n\n // Add `num` to `this` in-place\n BN.prototype.iadd = function iadd (num) {\n var r;\n\n // negative + positive\n if (this.negative !== 0 && num.negative === 0) {\n this.negative = 0;\n r = this.isub(num);\n this.negative ^= 1;\n return this._normSign();\n\n // positive + negative\n } else if (this.negative === 0 && num.negative !== 0) {\n num.negative = 0;\n r = this.isub(num);\n num.negative = 1;\n return r._normSign();\n }\n\n // a.length > b.length\n var a, b;\n if (this.length > num.length) {\n a = this;\n b = num;\n } else {\n a = num;\n b = this;\n }\n\n var carry = 0;\n for (var i = 0; i < b.length; i++) {\n r = (a.words[i] | 0) + (b.words[i] | 0) + carry;\n this.words[i] = r & 0x3ffffff;\n carry = r >>> 26;\n }\n for (; carry !== 0 && i < a.length; i++) {\n r = (a.words[i] | 0) + carry;\n this.words[i] = r & 0x3ffffff;\n carry = r >>> 26;\n }\n\n this.length = a.length;\n if (carry !== 0) {\n this.words[this.length] = carry;\n this.length++;\n // Copy the rest of the words\n } else if (a !== this) {\n for (; i < a.length; i++) {\n this.words[i] = a.words[i];\n }\n }\n\n return this;\n };\n\n // Add `num` to `this`\n BN.prototype.add = function add (num) {\n var res;\n if (num.negative !== 0 && this.negative === 0) {\n num.negative = 0;\n res = this.sub(num);\n num.negative ^= 1;\n return res;\n } else if (num.negative === 0 && this.negative !== 0) {\n this.negative = 0;\n res = num.sub(this);\n this.negative = 1;\n return res;\n }\n\n if (this.length > num.length) return this.clone().iadd(num);\n\n return num.clone().iadd(this);\n };\n\n // Subtract `num` from `this` in-place\n BN.prototype.isub = function isub (num) {\n // this - (-num) = this + num\n if (num.negative !== 0) {\n num.negative = 0;\n var r = this.iadd(num);\n num.negative = 1;\n return r._normSign();\n\n // -this - num = -(this + num)\n } else if (this.negative !== 0) {\n this.negative = 0;\n this.iadd(num);\n this.negative = 1;\n return this._normSign();\n }\n\n // At this point both numbers are positive\n var cmp = this.cmp(num);\n\n // Optimization - zeroify\n if (cmp === 0) {\n this.negative = 0;\n this.length = 1;\n this.words[0] = 0;\n return this;\n }\n\n // a > b\n var a, b;\n if (cmp > 0) {\n a = this;\n b = num;\n } else {\n a = num;\n b = this;\n }\n\n var carry = 0;\n for (var i = 0; i < b.length; i++) {\n r = (a.words[i] | 0) - (b.words[i] | 0) + carry;\n carry = r >> 26;\n this.words[i] = r & 0x3ffffff;\n }\n for (; carry !== 0 && i < a.length; i++) {\n r = (a.words[i] | 0) + carry;\n carry = r >> 26;\n this.words[i] = r & 0x3ffffff;\n }\n\n // Copy rest of the words\n if (carry === 0 && i < a.length && a !== this) {\n for (; i < a.length; i++) {\n this.words[i] = a.words[i];\n }\n }\n\n this.length = Math.max(this.length, i);\n\n if (a !== this) {\n this.negative = 1;\n }\n\n return this._strip();\n };\n\n // Subtract `num` from `this`\n BN.prototype.sub = function sub (num) {\n return this.clone().isub(num);\n };\n\n function smallMulTo (self, num, out) {\n out.negative = num.negative ^ self.negative;\n var len = (self.length + num.length) | 0;\n out.length = len;\n len = (len - 1) | 0;\n\n // Peel one iteration (compiler can't do it, because of code complexity)\n var a = self.words[0] | 0;\n var b = num.words[0] | 0;\n var r = a * b;\n\n var lo = r & 0x3ffffff;\n var carry = (r / 0x4000000) | 0;\n out.words[0] = lo;\n\n for (var k = 1; k < len; k++) {\n // Sum all words with the same `i + j = k` and accumulate `ncarry`,\n // note that ncarry could be >= 0x3ffffff\n var ncarry = carry >>> 26;\n var rword = carry & 0x3ffffff;\n var maxJ = Math.min(k, num.length - 1);\n for (var j = Math.max(0, k - self.length + 1); j <= maxJ; j++) {\n var i = (k - j) | 0;\n a = self.words[i] | 0;\n b = num.words[j] | 0;\n r = a * b + rword;\n ncarry += (r / 0x4000000) | 0;\n rword = r & 0x3ffffff;\n }\n out.words[k] = rword | 0;\n carry = ncarry | 0;\n }\n if (carry !== 0) {\n out.words[k] = carry | 0;\n } else {\n out.length--;\n }\n\n return out._strip();\n }\n\n // TODO(indutny): it may be reasonable to omit it for users who don't need\n // to work with 256-bit numbers, otherwise it gives 20% improvement for 256-bit\n // multiplication (like elliptic secp256k1).\n var comb10MulTo = function comb10MulTo (self, num, out) {\n var a = self.words;\n var b = num.words;\n var o = out.words;\n var c = 0;\n var lo;\n var mid;\n var hi;\n var a0 = a[0] | 0;\n var al0 = a0 & 0x1fff;\n var ah0 = a0 >>> 13;\n var a1 = a[1] | 0;\n var al1 = a1 & 0x1fff;\n var ah1 = a1 >>> 13;\n var a2 = a[2] | 0;\n var al2 = a2 & 0x1fff;\n var ah2 = a2 >>> 13;\n var a3 = a[3] | 0;\n var al3 = a3 & 0x1fff;\n var ah3 = a3 >>> 13;\n var a4 = a[4] | 0;\n var al4 = a4 & 0x1fff;\n var ah4 = a4 >>> 13;\n var a5 = a[5] | 0;\n var al5 = a5 & 0x1fff;\n var ah5 = a5 >>> 13;\n var a6 = a[6] | 0;\n var al6 = a6 & 0x1fff;\n var ah6 = a6 >>> 13;\n var a7 = a[7] | 0;\n var al7 = a7 & 0x1fff;\n var ah7 = a7 >>> 13;\n var a8 = a[8] | 0;\n var al8 = a8 & 0x1fff;\n var ah8 = a8 >>> 13;\n var a9 = a[9] | 0;\n var al9 = a9 & 0x1fff;\n var ah9 = a9 >>> 13;\n var b0 = b[0] | 0;\n var bl0 = b0 & 0x1fff;\n var bh0 = b0 >>> 13;\n var b1 = b[1] | 0;\n var bl1 = b1 & 0x1fff;\n var bh1 = b1 >>> 13;\n var b2 = b[2] | 0;\n var bl2 = b2 & 0x1fff;\n var bh2 = b2 >>> 13;\n var b3 = b[3] | 0;\n var bl3 = b3 & 0x1fff;\n var bh3 = b3 >>> 13;\n var b4 = b[4] | 0;\n var bl4 = b4 & 0x1fff;\n var bh4 = b4 >>> 13;\n var b5 = b[5] | 0;\n var bl5 = b5 & 0x1fff;\n var bh5 = b5 >>> 13;\n var b6 = b[6] | 0;\n var bl6 = b6 & 0x1fff;\n var bh6 = b6 >>> 13;\n var b7 = b[7] | 0;\n var bl7 = b7 & 0x1fff;\n var bh7 = b7 >>> 13;\n var b8 = b[8] | 0;\n var bl8 = b8 & 0x1fff;\n var bh8 = b8 >>> 13;\n var b9 = b[9] | 0;\n var bl9 = b9 & 0x1fff;\n var bh9 = b9 >>> 13;\n\n out.negative = self.negative ^ num.negative;\n out.length = 19;\n /* k = 0 */\n lo = Math.imul(al0, bl0);\n mid = Math.imul(al0, bh0);\n mid = (mid + Math.imul(ah0, bl0)) | 0;\n hi = Math.imul(ah0, bh0);\n var w0 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w0 >>> 26)) | 0;\n w0 &= 0x3ffffff;\n /* k = 1 */\n lo = Math.imul(al1, bl0);\n mid = Math.imul(al1, bh0);\n mid = (mid + Math.imul(ah1, bl0)) | 0;\n hi = Math.imul(ah1, bh0);\n lo = (lo + Math.imul(al0, bl1)) | 0;\n mid = (mid + Math.imul(al0, bh1)) | 0;\n mid = (mid + Math.imul(ah0, bl1)) | 0;\n hi = (hi + Math.imul(ah0, bh1)) | 0;\n var w1 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w1 >>> 26)) | 0;\n w1 &= 0x3ffffff;\n /* k = 2 */\n lo = Math.imul(al2, bl0);\n mid = Math.imul(al2, bh0);\n mid = (mid + Math.imul(ah2, bl0)) | 0;\n hi = Math.imul(ah2, bh0);\n lo = (lo + Math.imul(al1, bl1)) | 0;\n mid = (mid + Math.imul(al1, bh1)) | 0;\n mid = (mid + Math.imul(ah1, bl1)) | 0;\n hi = (hi + Math.imul(ah1, bh1)) | 0;\n lo = (lo + Math.imul(al0, bl2)) | 0;\n mid = (mid + Math.imul(al0, bh2)) | 0;\n mid = (mid + Math.imul(ah0, bl2)) | 0;\n hi = (hi + Math.imul(ah0, bh2)) | 0;\n var w2 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w2 >>> 26)) | 0;\n w2 &= 0x3ffffff;\n /* k = 3 */\n lo = Math.imul(al3, bl0);\n mid = Math.imul(al3, bh0);\n mid = (mid + Math.imul(ah3, bl0)) | 0;\n hi = Math.imul(ah3, bh0);\n lo = (lo + Math.imul(al2, bl1)) | 0;\n mid = (mid + Math.imul(al2, bh1)) | 0;\n mid = (mid + Math.imul(ah2, bl1)) | 0;\n hi = (hi + Math.imul(ah2, bh1)) | 0;\n lo = (lo + Math.imul(al1, bl2)) | 0;\n mid = (mid + Math.imul(al1, bh2)) | 0;\n mid = (mid + Math.imul(ah1, bl2)) | 0;\n hi = (hi + Math.imul(ah1, bh2)) | 0;\n lo = (lo + Math.imul(al0, bl3)) | 0;\n mid = (mid + Math.imul(al0, bh3)) | 0;\n mid = (mid + Math.imul(ah0, bl3)) | 0;\n hi = (hi + Math.imul(ah0, bh3)) | 0;\n var w3 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w3 >>> 26)) | 0;\n w3 &= 0x3ffffff;\n /* k = 4 */\n lo = Math.imul(al4, bl0);\n mid = Math.imul(al4, bh0);\n mid = (mid + Math.imul(ah4, bl0)) | 0;\n hi = Math.imul(ah4, bh0);\n lo = (lo + Math.imul(al3, bl1)) | 0;\n mid = (mid + Math.imul(al3, bh1)) | 0;\n mid = (mid + Math.imul(ah3, bl1)) | 0;\n hi = (hi + Math.imul(ah3, bh1)) | 0;\n lo = (lo + Math.imul(al2, bl2)) | 0;\n mid = (mid + Math.imul(al2, bh2)) | 0;\n mid = (mid + Math.imul(ah2, bl2)) | 0;\n hi = (hi + Math.imul(ah2, bh2)) | 0;\n lo = (lo + Math.imul(al1, bl3)) | 0;\n mid = (mid + Math.imul(al1, bh3)) | 0;\n mid = (mid + Math.imul(ah1, bl3)) | 0;\n hi = (hi + Math.imul(ah1, bh3)) | 0;\n lo = (lo + Math.imul(al0, bl4)) | 0;\n mid = (mid + Math.imul(al0, bh4)) | 0;\n mid = (mid + Math.imul(ah0, bl4)) | 0;\n hi = (hi + Math.imul(ah0, bh4)) | 0;\n var w4 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w4 >>> 26)) | 0;\n w4 &= 0x3ffffff;\n /* k = 5 */\n lo = Math.imul(al5, bl0);\n mid = Math.imul(al5, bh0);\n mid = (mid + Math.imul(ah5, bl0)) | 0;\n hi = Math.imul(ah5, bh0);\n lo = (lo + Math.imul(al4, bl1)) | 0;\n mid = (mid + Math.imul(al4, bh1)) | 0;\n mid = (mid + Math.imul(ah4, bl1)) | 0;\n hi = (hi + Math.imul(ah4, bh1)) | 0;\n lo = (lo + Math.imul(al3, bl2)) | 0;\n mid = (mid + Math.imul(al3, bh2)) | 0;\n mid = (mid + Math.imul(ah3, bl2)) | 0;\n hi = (hi + Math.imul(ah3, bh2)) | 0;\n lo = (lo + Math.imul(al2, bl3)) | 0;\n mid = (mid + Math.imul(al2, bh3)) | 0;\n mid = (mid + Math.imul(ah2, bl3)) | 0;\n hi = (hi + Math.imul(ah2, bh3)) | 0;\n lo = (lo + Math.imul(al1, bl4)) | 0;\n mid = (mid + Math.imul(al1, bh4)) | 0;\n mid = (mid + Math.imul(ah1, bl4)) | 0;\n hi = (hi + Math.imul(ah1, bh4)) | 0;\n lo = (lo + Math.imul(al0, bl5)) | 0;\n mid = (mid + Math.imul(al0, bh5)) | 0;\n mid = (mid + Math.imul(ah0, bl5)) | 0;\n hi = (hi + Math.imul(ah0, bh5)) | 0;\n var w5 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w5 >>> 26)) | 0;\n w5 &= 0x3ffffff;\n /* k = 6 */\n lo = Math.imul(al6, bl0);\n mid = Math.imul(al6, bh0);\n mid = (mid + Math.imul(ah6, bl0)) | 0;\n hi = Math.imul(ah6, bh0);\n lo = (lo + Math.imul(al5, bl1)) | 0;\n mid = (mid + Math.imul(al5, bh1)) | 0;\n mid = (mid + Math.imul(ah5, bl1)) | 0;\n hi = (hi + Math.imul(ah5, bh1)) | 0;\n lo = (lo + Math.imul(al4, bl2)) | 0;\n mid = (mid + Math.imul(al4, bh2)) | 0;\n mid = (mid + Math.imul(ah4, bl2)) | 0;\n hi = (hi + Math.imul(ah4, bh2)) | 0;\n lo = (lo + Math.imul(al3, bl3)) | 0;\n mid = (mid + Math.imul(al3, bh3)) | 0;\n mid = (mid + Math.imul(ah3, bl3)) | 0;\n hi = (hi + Math.imul(ah3, bh3)) | 0;\n lo = (lo + Math.imul(al2, bl4)) | 0;\n mid = (mid + Math.imul(al2, bh4)) | 0;\n mid = (mid + Math.imul(ah2, bl4)) | 0;\n hi = (hi + Math.imul(ah2, bh4)) | 0;\n lo = (lo + Math.imul(al1, bl5)) | 0;\n mid = (mid + Math.imul(al1, bh5)) | 0;\n mid = (mid + Math.imul(ah1, bl5)) | 0;\n hi = (hi + Math.imul(ah1, bh5)) | 0;\n lo = (lo + Math.imul(al0, bl6)) | 0;\n mid = (mid + Math.imul(al0, bh6)) | 0;\n mid = (mid + Math.imul(ah0, bl6)) | 0;\n hi = (hi + Math.imul(ah0, bh6)) | 0;\n var w6 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w6 >>> 26)) | 0;\n w6 &= 0x3ffffff;\n /* k = 7 */\n lo = Math.imul(al7, bl0);\n mid = Math.imul(al7, bh0);\n mid = (mid + Math.imul(ah7, bl0)) | 0;\n hi = Math.imul(ah7, bh0);\n lo = (lo + Math.imul(al6, bl1)) | 0;\n mid = (mid + Math.imul(al6, bh1)) | 0;\n mid = (mid + Math.imul(ah6, bl1)) | 0;\n hi = (hi + Math.imul(ah6, bh1)) | 0;\n lo = (lo + Math.imul(al5, bl2)) | 0;\n mid = (mid + Math.imul(al5, bh2)) | 0;\n mid = (mid + Math.imul(ah5, bl2)) | 0;\n hi = (hi + Math.imul(ah5, bh2)) | 0;\n lo = (lo + Math.imul(al4, bl3)) | 0;\n mid = (mid + Math.imul(al4, bh3)) | 0;\n mid = (mid + Math.imul(ah4, bl3)) | 0;\n hi = (hi + Math.imul(ah4, bh3)) | 0;\n lo = (lo + Math.imul(al3, bl4)) | 0;\n mid = (mid + Math.imul(al3, bh4)) | 0;\n mid = (mid + Math.imul(ah3, bl4)) | 0;\n hi = (hi + Math.imul(ah3, bh4)) | 0;\n lo = (lo + Math.imul(al2, bl5)) | 0;\n mid = (mid + Math.imul(al2, bh5)) | 0;\n mid = (mid + Math.imul(ah2, bl5)) | 0;\n hi = (hi + Math.imul(ah2, bh5)) | 0;\n lo = (lo + Math.imul(al1, bl6)) | 0;\n mid = (mid + Math.imul(al1, bh6)) | 0;\n mid = (mid + Math.imul(ah1, bl6)) | 0;\n hi = (hi + Math.imul(ah1, bh6)) | 0;\n lo = (lo + Math.imul(al0, bl7)) | 0;\n mid = (mid + Math.imul(al0, bh7)) | 0;\n mid = (mid + Math.imul(ah0, bl7)) | 0;\n hi = (hi + Math.imul(ah0, bh7)) | 0;\n var w7 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w7 >>> 26)) | 0;\n w7 &= 0x3ffffff;\n /* k = 8 */\n lo = Math.imul(al8, bl0);\n mid = Math.imul(al8, bh0);\n mid = (mid + Math.imul(ah8, bl0)) | 0;\n hi = Math.imul(ah8, bh0);\n lo = (lo + Math.imul(al7, bl1)) | 0;\n mid = (mid + Math.imul(al7, bh1)) | 0;\n mid = (mid + Math.imul(ah7, bl1)) | 0;\n hi = (hi + Math.imul(ah7, bh1)) | 0;\n lo = (lo + Math.imul(al6, bl2)) | 0;\n mid = (mid + Math.imul(al6, bh2)) | 0;\n mid = (mid + Math.imul(ah6, bl2)) | 0;\n hi = (hi + Math.imul(ah6, bh2)) | 0;\n lo = (lo + Math.imul(al5, bl3)) | 0;\n mid = (mid + Math.imul(al5, bh3)) | 0;\n mid = (mid + Math.imul(ah5, bl3)) | 0;\n hi = (hi + Math.imul(ah5, bh3)) | 0;\n lo = (lo + Math.imul(al4, bl4)) | 0;\n mid = (mid + Math.imul(al4, bh4)) | 0;\n mid = (mid + Math.imul(ah4, bl4)) | 0;\n hi = (hi + Math.imul(ah4, bh4)) | 0;\n lo = (lo + Math.imul(al3, bl5)) | 0;\n mid = (mid + Math.imul(al3, bh5)) | 0;\n mid = (mid + Math.imul(ah3, bl5)) | 0;\n hi = (hi + Math.imul(ah3, bh5)) | 0;\n lo = (lo + Math.imul(al2, bl6)) | 0;\n mid = (mid + Math.imul(al2, bh6)) | 0;\n mid = (mid + Math.imul(ah2, bl6)) | 0;\n hi = (hi + Math.imul(ah2, bh6)) | 0;\n lo = (lo + Math.imul(al1, bl7)) | 0;\n mid = (mid + Math.imul(al1, bh7)) | 0;\n mid = (mid + Math.imul(ah1, bl7)) | 0;\n hi = (hi + Math.imul(ah1, bh7)) | 0;\n lo = (lo + Math.imul(al0, bl8)) | 0;\n mid = (mid + Math.imul(al0, bh8)) | 0;\n mid = (mid + Math.imul(ah0, bl8)) | 0;\n hi = (hi + Math.imul(ah0, bh8)) | 0;\n var w8 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w8 >>> 26)) | 0;\n w8 &= 0x3ffffff;\n /* k = 9 */\n lo = Math.imul(al9, bl0);\n mid = Math.imul(al9, bh0);\n mid = (mid + Math.imul(ah9, bl0)) | 0;\n hi = Math.imul(ah9, bh0);\n lo = (lo + Math.imul(al8, bl1)) | 0;\n mid = (mid + Math.imul(al8, bh1)) | 0;\n mid = (mid + Math.imul(ah8, bl1)) | 0;\n hi = (hi + Math.imul(ah8, bh1)) | 0;\n lo = (lo + Math.imul(al7, bl2)) | 0;\n mid = (mid + Math.imul(al7, bh2)) | 0;\n mid = (mid + Math.imul(ah7, bl2)) | 0;\n hi = (hi + Math.imul(ah7, bh2)) | 0;\n lo = (lo + Math.imul(al6, bl3)) | 0;\n mid = (mid + Math.imul(al6, bh3)) | 0;\n mid = (mid + Math.imul(ah6, bl3)) | 0;\n hi = (hi + Math.imul(ah6, bh3)) | 0;\n lo = (lo + Math.imul(al5, bl4)) | 0;\n mid = (mid + Math.imul(al5, bh4)) | 0;\n mid = (mid + Math.imul(ah5, bl4)) | 0;\n hi = (hi + Math.imul(ah5, bh4)) | 0;\n lo = (lo + Math.imul(al4, bl5)) | 0;\n mid = (mid + Math.imul(al4, bh5)) | 0;\n mid = (mid + Math.imul(ah4, bl5)) | 0;\n hi = (hi + Math.imul(ah4, bh5)) | 0;\n lo = (lo + Math.imul(al3, bl6)) | 0;\n mid = (mid + Math.imul(al3, bh6)) | 0;\n mid = (mid + Math.imul(ah3, bl6)) | 0;\n hi = (hi + Math.imul(ah3, bh6)) | 0;\n lo = (lo + Math.imul(al2, bl7)) | 0;\n mid = (mid + Math.imul(al2, bh7)) | 0;\n mid = (mid + Math.imul(ah2, bl7)) | 0;\n hi = (hi + Math.imul(ah2, bh7)) | 0;\n lo = (lo + Math.imul(al1, bl8)) | 0;\n mid = (mid + Math.imul(al1, bh8)) | 0;\n mid = (mid + Math.imul(ah1, bl8)) | 0;\n hi = (hi + Math.imul(ah1, bh8)) | 0;\n lo = (lo + Math.imul(al0, bl9)) | 0;\n mid = (mid + Math.imul(al0, bh9)) | 0;\n mid = (mid + Math.imul(ah0, bl9)) | 0;\n hi = (hi + Math.imul(ah0, bh9)) | 0;\n var w9 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w9 >>> 26)) | 0;\n w9 &= 0x3ffffff;\n /* k = 10 */\n lo = Math.imul(al9, bl1);\n mid = Math.imul(al9, bh1);\n mid = (mid + Math.imul(ah9, bl1)) | 0;\n hi = Math.imul(ah9, bh1);\n lo = (lo + Math.imul(al8, bl2)) | 0;\n mid = (mid + Math.imul(al8, bh2)) | 0;\n mid = (mid + Math.imul(ah8, bl2)) | 0;\n hi = (hi + Math.imul(ah8, bh2)) | 0;\n lo = (lo + Math.imul(al7, bl3)) | 0;\n mid = (mid + Math.imul(al7, bh3)) | 0;\n mid = (mid + Math.imul(ah7, bl3)) | 0;\n hi = (hi + Math.imul(ah7, bh3)) | 0;\n lo = (lo + Math.imul(al6, bl4)) | 0;\n mid = (mid + Math.imul(al6, bh4)) | 0;\n mid = (mid + Math.imul(ah6, bl4)) | 0;\n hi = (hi + Math.imul(ah6, bh4)) | 0;\n lo = (lo + Math.imul(al5, bl5)) | 0;\n mid = (mid + Math.imul(al5, bh5)) | 0;\n mid = (mid + Math.imul(ah5, bl5)) | 0;\n hi = (hi + Math.imul(ah5, bh5)) | 0;\n lo = (lo + Math.imul(al4, bl6)) | 0;\n mid = (mid + Math.imul(al4, bh6)) | 0;\n mid = (mid + Math.imul(ah4, bl6)) | 0;\n hi = (hi + Math.imul(ah4, bh6)) | 0;\n lo = (lo + Math.imul(al3, bl7)) | 0;\n mid = (mid + Math.imul(al3, bh7)) | 0;\n mid = (mid + Math.imul(ah3, bl7)) | 0;\n hi = (hi + Math.imul(ah3, bh7)) | 0;\n lo = (lo + Math.imul(al2, bl8)) | 0;\n mid = (mid + Math.imul(al2, bh8)) | 0;\n mid = (mid + Math.imul(ah2, bl8)) | 0;\n hi = (hi + Math.imul(ah2, bh8)) | 0;\n lo = (lo + Math.imul(al1, bl9)) | 0;\n mid = (mid + Math.imul(al1, bh9)) | 0;\n mid = (mid + Math.imul(ah1, bl9)) | 0;\n hi = (hi + Math.imul(ah1, bh9)) | 0;\n var w10 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w10 >>> 26)) | 0;\n w10 &= 0x3ffffff;\n /* k = 11 */\n lo = Math.imul(al9, bl2);\n mid = Math.imul(al9, bh2);\n mid = (mid + Math.imul(ah9, bl2)) | 0;\n hi = Math.imul(ah9, bh2);\n lo = (lo + Math.imul(al8, bl3)) | 0;\n mid = (mid + Math.imul(al8, bh3)) | 0;\n mid = (mid + Math.imul(ah8, bl3)) | 0;\n hi = (hi + Math.imul(ah8, bh3)) | 0;\n lo = (lo + Math.imul(al7, bl4)) | 0;\n mid = (mid + Math.imul(al7, bh4)) | 0;\n mid = (mid + Math.imul(ah7, bl4)) | 0;\n hi = (hi + Math.imul(ah7, bh4)) | 0;\n lo = (lo + Math.imul(al6, bl5)) | 0;\n mid = (mid + Math.imul(al6, bh5)) | 0;\n mid = (mid + Math.imul(ah6, bl5)) | 0;\n hi = (hi + Math.imul(ah6, bh5)) | 0;\n lo = (lo + Math.imul(al5, bl6)) | 0;\n mid = (mid + Math.imul(al5, bh6)) | 0;\n mid = (mid + Math.imul(ah5, bl6)) | 0;\n hi = (hi + Math.imul(ah5, bh6)) | 0;\n lo = (lo + Math.imul(al4, bl7)) | 0;\n mid = (mid + Math.imul(al4, bh7)) | 0;\n mid = (mid + Math.imul(ah4, bl7)) | 0;\n hi = (hi + Math.imul(ah4, bh7)) | 0;\n lo = (lo + Math.imul(al3, bl8)) | 0;\n mid = (mid + Math.imul(al3, bh8)) | 0;\n mid = (mid + Math.imul(ah3, bl8)) | 0;\n hi = (hi + Math.imul(ah3, bh8)) | 0;\n lo = (lo + Math.imul(al2, bl9)) | 0;\n mid = (mid + Math.imul(al2, bh9)) | 0;\n mid = (mid + Math.imul(ah2, bl9)) | 0;\n hi = (hi + Math.imul(ah2, bh9)) | 0;\n var w11 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w11 >>> 26)) | 0;\n w11 &= 0x3ffffff;\n /* k = 12 */\n lo = Math.imul(al9, bl3);\n mid = Math.imul(al9, bh3);\n mid = (mid + Math.imul(ah9, bl3)) | 0;\n hi = Math.imul(ah9, bh3);\n lo = (lo + Math.imul(al8, bl4)) | 0;\n mid = (mid + Math.imul(al8, bh4)) | 0;\n mid = (mid + Math.imul(ah8, bl4)) | 0;\n hi = (hi + Math.imul(ah8, bh4)) | 0;\n lo = (lo + Math.imul(al7, bl5)) | 0;\n mid = (mid + Math.imul(al7, bh5)) | 0;\n mid = (mid + Math.imul(ah7, bl5)) | 0;\n hi = (hi + Math.imul(ah7, bh5)) | 0;\n lo = (lo + Math.imul(al6, bl6)) | 0;\n mid = (mid + Math.imul(al6, bh6)) | 0;\n mid = (mid + Math.imul(ah6, bl6)) | 0;\n hi = (hi + Math.imul(ah6, bh6)) | 0;\n lo = (lo + Math.imul(al5, bl7)) | 0;\n mid = (mid + Math.imul(al5, bh7)) | 0;\n mid = (mid + Math.imul(ah5, bl7)) | 0;\n hi = (hi + Math.imul(ah5, bh7)) | 0;\n lo = (lo + Math.imul(al4, bl8)) | 0;\n mid = (mid + Math.imul(al4, bh8)) | 0;\n mid = (mid + Math.imul(ah4, bl8)) | 0;\n hi = (hi + Math.imul(ah4, bh8)) | 0;\n lo = (lo + Math.imul(al3, bl9)) | 0;\n mid = (mid + Math.imul(al3, bh9)) | 0;\n mid = (mid + Math.imul(ah3, bl9)) | 0;\n hi = (hi + Math.imul(ah3, bh9)) | 0;\n var w12 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w12 >>> 26)) | 0;\n w12 &= 0x3ffffff;\n /* k = 13 */\n lo = Math.imul(al9, bl4);\n mid = Math.imul(al9, bh4);\n mid = (mid + Math.imul(ah9, bl4)) | 0;\n hi = Math.imul(ah9, bh4);\n lo = (lo + Math.imul(al8, bl5)) | 0;\n mid = (mid + Math.imul(al8, bh5)) | 0;\n mid = (mid + Math.imul(ah8, bl5)) | 0;\n hi = (hi + Math.imul(ah8, bh5)) | 0;\n lo = (lo + Math.imul(al7, bl6)) | 0;\n mid = (mid + Math.imul(al7, bh6)) | 0;\n mid = (mid + Math.imul(ah7, bl6)) | 0;\n hi = (hi + Math.imul(ah7, bh6)) | 0;\n lo = (lo + Math.imul(al6, bl7)) | 0;\n mid = (mid + Math.imul(al6, bh7)) | 0;\n mid = (mid + Math.imul(ah6, bl7)) | 0;\n hi = (hi + Math.imul(ah6, bh7)) | 0;\n lo = (lo + Math.imul(al5, bl8)) | 0;\n mid = (mid + Math.imul(al5, bh8)) | 0;\n mid = (mid + Math.imul(ah5, bl8)) | 0;\n hi = (hi + Math.imul(ah5, bh8)) | 0;\n lo = (lo + Math.imul(al4, bl9)) | 0;\n mid = (mid + Math.imul(al4, bh9)) | 0;\n mid = (mid + Math.imul(ah4, bl9)) | 0;\n hi = (hi + Math.imul(ah4, bh9)) | 0;\n var w13 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w13 >>> 26)) | 0;\n w13 &= 0x3ffffff;\n /* k = 14 */\n lo = Math.imul(al9, bl5);\n mid = Math.imul(al9, bh5);\n mid = (mid + Math.imul(ah9, bl5)) | 0;\n hi = Math.imul(ah9, bh5);\n lo = (lo + Math.imul(al8, bl6)) | 0;\n mid = (mid + Math.imul(al8, bh6)) | 0;\n mid = (mid + Math.imul(ah8, bl6)) | 0;\n hi = (hi + Math.imul(ah8, bh6)) | 0;\n lo = (lo + Math.imul(al7, bl7)) | 0;\n mid = (mid + Math.imul(al7, bh7)) | 0;\n mid = (mid + Math.imul(ah7, bl7)) | 0;\n hi = (hi + Math.imul(ah7, bh7)) | 0;\n lo = (lo + Math.imul(al6, bl8)) | 0;\n mid = (mid + Math.imul(al6, bh8)) | 0;\n mid = (mid + Math.imul(ah6, bl8)) | 0;\n hi = (hi + Math.imul(ah6, bh8)) | 0;\n lo = (lo + Math.imul(al5, bl9)) | 0;\n mid = (mid + Math.imul(al5, bh9)) | 0;\n mid = (mid + Math.imul(ah5, bl9)) | 0;\n hi = (hi + Math.imul(ah5, bh9)) | 0;\n var w14 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w14 >>> 26)) | 0;\n w14 &= 0x3ffffff;\n /* k = 15 */\n lo = Math.imul(al9, bl6);\n mid = Math.imul(al9, bh6);\n mid = (mid + Math.imul(ah9, bl6)) | 0;\n hi = Math.imul(ah9, bh6);\n lo = (lo + Math.imul(al8, bl7)) | 0;\n mid = (mid + Math.imul(al8, bh7)) | 0;\n mid = (mid + Math.imul(ah8, bl7)) | 0;\n hi = (hi + Math.imul(ah8, bh7)) | 0;\n lo = (lo + Math.imul(al7, bl8)) | 0;\n mid = (mid + Math.imul(al7, bh8)) | 0;\n mid = (mid + Math.imul(ah7, bl8)) | 0;\n hi = (hi + Math.imul(ah7, bh8)) | 0;\n lo = (lo + Math.imul(al6, bl9)) | 0;\n mid = (mid + Math.imul(al6, bh9)) | 0;\n mid = (mid + Math.imul(ah6, bl9)) | 0;\n hi = (hi + Math.imul(ah6, bh9)) | 0;\n var w15 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w15 >>> 26)) | 0;\n w15 &= 0x3ffffff;\n /* k = 16 */\n lo = Math.imul(al9, bl7);\n mid = Math.imul(al9, bh7);\n mid = (mid + Math.imul(ah9, bl7)) | 0;\n hi = Math.imul(ah9, bh7);\n lo = (lo + Math.imul(al8, bl8)) | 0;\n mid = (mid + Math.imul(al8, bh8)) | 0;\n mid = (mid + Math.imul(ah8, bl8)) | 0;\n hi = (hi + Math.imul(ah8, bh8)) | 0;\n lo = (lo + Math.imul(al7, bl9)) | 0;\n mid = (mid + Math.imul(al7, bh9)) | 0;\n mid = (mid + Math.imul(ah7, bl9)) | 0;\n hi = (hi + Math.imul(ah7, bh9)) | 0;\n var w16 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w16 >>> 26)) | 0;\n w16 &= 0x3ffffff;\n /* k = 17 */\n lo = Math.imul(al9, bl8);\n mid = Math.imul(al9, bh8);\n mid = (mid + Math.imul(ah9, bl8)) | 0;\n hi = Math.imul(ah9, bh8);\n lo = (lo + Math.imul(al8, bl9)) | 0;\n mid = (mid + Math.imul(al8, bh9)) | 0;\n mid = (mid + Math.imul(ah8, bl9)) | 0;\n hi = (hi + Math.imul(ah8, bh9)) | 0;\n var w17 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w17 >>> 26)) | 0;\n w17 &= 0x3ffffff;\n /* k = 18 */\n lo = Math.imul(al9, bl9);\n mid = Math.imul(al9, bh9);\n mid = (mid + Math.imul(ah9, bl9)) | 0;\n hi = Math.imul(ah9, bh9);\n var w18 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w18 >>> 26)) | 0;\n w18 &= 0x3ffffff;\n o[0] = w0;\n o[1] = w1;\n o[2] = w2;\n o[3] = w3;\n o[4] = w4;\n o[5] = w5;\n o[6] = w6;\n o[7] = w7;\n o[8] = w8;\n o[9] = w9;\n o[10] = w10;\n o[11] = w11;\n o[12] = w12;\n o[13] = w13;\n o[14] = w14;\n o[15] = w15;\n o[16] = w16;\n o[17] = w17;\n o[18] = w18;\n if (c !== 0) {\n o[19] = c;\n out.length++;\n }\n return out;\n };\n\n // Polyfill comb\n if (!Math.imul) {\n comb10MulTo = smallMulTo;\n }\n\n function bigMulTo (self, num, out) {\n out.negative = num.negative ^ self.negative;\n out.length = self.length + num.length;\n\n var carry = 0;\n var hncarry = 0;\n for (var k = 0; k < out.length - 1; k++) {\n // Sum all words with the same `i + j = k` and accumulate `ncarry`,\n // note that ncarry could be >= 0x3ffffff\n var ncarry = hncarry;\n hncarry = 0;\n var rword = carry & 0x3ffffff;\n var maxJ = Math.min(k, num.length - 1);\n for (var j = Math.max(0, k - self.length + 1); j <= maxJ; j++) {\n var i = k - j;\n var a = self.words[i] | 0;\n var b = num.words[j] | 0;\n var r = a * b;\n\n var lo = r & 0x3ffffff;\n ncarry = (ncarry + ((r / 0x4000000) | 0)) | 0;\n lo = (lo + rword) | 0;\n rword = lo & 0x3ffffff;\n ncarry = (ncarry + (lo >>> 26)) | 0;\n\n hncarry += ncarry >>> 26;\n ncarry &= 0x3ffffff;\n }\n out.words[k] = rword;\n carry = ncarry;\n ncarry = hncarry;\n }\n if (carry !== 0) {\n out.words[k] = carry;\n } else {\n out.length--;\n }\n\n return out._strip();\n }\n\n function jumboMulTo (self, num, out) {\n // Temporary disable, see https://github.com/indutny/bn.js/issues/211\n // var fftm = new FFTM();\n // return fftm.mulp(self, num, out);\n return bigMulTo(self, num, out);\n }\n\n BN.prototype.mulTo = function mulTo (num, out) {\n var res;\n var len = this.length + num.length;\n if (this.length === 10 && num.length === 10) {\n res = comb10MulTo(this, num, out);\n } else if (len < 63) {\n res = smallMulTo(this, num, out);\n } else if (len < 1024) {\n res = bigMulTo(this, num, out);\n } else {\n res = jumboMulTo(this, num, out);\n }\n\n return res;\n };\n\n // Cooley-Tukey algorithm for FFT\n // slightly revisited to rely on looping instead of recursion\n\n function FFTM (x, y) {\n this.x = x;\n this.y = y;\n }\n\n FFTM.prototype.makeRBT = function makeRBT (N) {\n var t = new Array(N);\n var l = BN.prototype._countBits(N) - 1;\n for (var i = 0; i < N; i++) {\n t[i] = this.revBin(i, l, N);\n }\n\n return t;\n };\n\n // Returns binary-reversed representation of `x`\n FFTM.prototype.revBin = function revBin (x, l, N) {\n if (x === 0 || x === N - 1) return x;\n\n var rb = 0;\n for (var i = 0; i < l; i++) {\n rb |= (x & 1) << (l - i - 1);\n x >>= 1;\n }\n\n return rb;\n };\n\n // Performs \"tweedling\" phase, therefore 'emulating'\n // behaviour of the recursive algorithm\n FFTM.prototype.permute = function permute (rbt, rws, iws, rtws, itws, N) {\n for (var i = 0; i < N; i++) {\n rtws[i] = rws[rbt[i]];\n itws[i] = iws[rbt[i]];\n }\n };\n\n FFTM.prototype.transform = function transform (rws, iws, rtws, itws, N, rbt) {\n this.permute(rbt, rws, iws, rtws, itws, N);\n\n for (var s = 1; s < N; s <<= 1) {\n var l = s << 1;\n\n var rtwdf = Math.cos(2 * Math.PI / l);\n var itwdf = Math.sin(2 * Math.PI / l);\n\n for (var p = 0; p < N; p += l) {\n var rtwdf_ = rtwdf;\n var itwdf_ = itwdf;\n\n for (var j = 0; j < s; j++) {\n var re = rtws[p + j];\n var ie = itws[p + j];\n\n var ro = rtws[p + j + s];\n var io = itws[p + j + s];\n\n var rx = rtwdf_ * ro - itwdf_ * io;\n\n io = rtwdf_ * io + itwdf_ * ro;\n ro = rx;\n\n rtws[p + j] = re + ro;\n itws[p + j] = ie + io;\n\n rtws[p + j + s] = re - ro;\n itws[p + j + s] = ie - io;\n\n /* jshint maxdepth : false */\n if (j !== l) {\n rx = rtwdf * rtwdf_ - itwdf * itwdf_;\n\n itwdf_ = rtwdf * itwdf_ + itwdf * rtwdf_;\n rtwdf_ = rx;\n }\n }\n }\n }\n };\n\n FFTM.prototype.guessLen13b = function guessLen13b (n, m) {\n var N = Math.max(m, n) | 1;\n var odd = N & 1;\n var i = 0;\n for (N = N / 2 | 0; N; N = N >>> 1) {\n i++;\n }\n\n return 1 << i + 1 + odd;\n };\n\n FFTM.prototype.conjugate = function conjugate (rws, iws, N) {\n if (N <= 1) return;\n\n for (var i = 0; i < N / 2; i++) {\n var t = rws[i];\n\n rws[i] = rws[N - i - 1];\n rws[N - i - 1] = t;\n\n t = iws[i];\n\n iws[i] = -iws[N - i - 1];\n iws[N - i - 1] = -t;\n }\n };\n\n FFTM.prototype.normalize13b = function normalize13b (ws, N) {\n var carry = 0;\n for (var i = 0; i < N / 2; i++) {\n var w = Math.round(ws[2 * i + 1] / N) * 0x2000 +\n Math.round(ws[2 * i] / N) +\n carry;\n\n ws[i] = w & 0x3ffffff;\n\n if (w < 0x4000000) {\n carry = 0;\n } else {\n carry = w / 0x4000000 | 0;\n }\n }\n\n return ws;\n };\n\n FFTM.prototype.convert13b = function convert13b (ws, len, rws, N) {\n var carry = 0;\n for (var i = 0; i < len; i++) {\n carry = carry + (ws[i] | 0);\n\n rws[2 * i] = carry & 0x1fff; carry = carry >>> 13;\n rws[2 * i + 1] = carry & 0x1fff; carry = carry >>> 13;\n }\n\n // Pad with zeroes\n for (i = 2 * len; i < N; ++i) {\n rws[i] = 0;\n }\n\n assert(carry === 0);\n assert((carry & ~0x1fff) === 0);\n };\n\n FFTM.prototype.stub = function stub (N) {\n var ph = new Array(N);\n for (var i = 0; i < N; i++) {\n ph[i] = 0;\n }\n\n return ph;\n };\n\n FFTM.prototype.mulp = function mulp (x, y, out) {\n var N = 2 * this.guessLen13b(x.length, y.length);\n\n var rbt = this.makeRBT(N);\n\n var _ = this.stub(N);\n\n var rws = new Array(N);\n var rwst = new Array(N);\n var iwst = new Array(N);\n\n var nrws = new Array(N);\n var nrwst = new Array(N);\n var niwst = new Array(N);\n\n var rmws = out.words;\n rmws.length = N;\n\n this.convert13b(x.words, x.length, rws, N);\n this.convert13b(y.words, y.length, nrws, N);\n\n this.transform(rws, _, rwst, iwst, N, rbt);\n this.transform(nrws, _, nrwst, niwst, N, rbt);\n\n for (var i = 0; i < N; i++) {\n var rx = rwst[i] * nrwst[i] - iwst[i] * niwst[i];\n iwst[i] = rwst[i] * niwst[i] + iwst[i] * nrwst[i];\n rwst[i] = rx;\n }\n\n this.conjugate(rwst, iwst, N);\n this.transform(rwst, iwst, rmws, _, N, rbt);\n this.conjugate(rmws, _, N);\n this.normalize13b(rmws, N);\n\n out.negative = x.negative ^ y.negative;\n out.length = x.length + y.length;\n return out._strip();\n };\n\n // Multiply `this` by `num`\n BN.prototype.mul = function mul (num) {\n var out = new BN(null);\n out.words = new Array(this.length + num.length);\n return this.mulTo(num, out);\n };\n\n // Multiply employing FFT\n BN.prototype.mulf = function mulf (num) {\n var out = new BN(null);\n out.words = new Array(this.length + num.length);\n return jumboMulTo(this, num, out);\n };\n\n // In-place Multiplication\n BN.prototype.imul = function imul (num) {\n return this.clone().mulTo(num, this);\n };\n\n BN.prototype.imuln = function imuln (num) {\n var isNegNum = num < 0;\n if (isNegNum) num = -num;\n\n assert(typeof num === 'number');\n assert(num < 0x4000000);\n\n // Carry\n var carry = 0;\n for (var i = 0; i < this.length; i++) {\n var w = (this.words[i] | 0) * num;\n var lo = (w & 0x3ffffff) + (carry & 0x3ffffff);\n carry >>= 26;\n carry += (w / 0x4000000) | 0;\n // NOTE: lo is 27bit maximum\n carry += lo >>> 26;\n this.words[i] = lo & 0x3ffffff;\n }\n\n if (carry !== 0) {\n this.words[i] = carry;\n this.length++;\n }\n\n return isNegNum ? this.ineg() : this;\n };\n\n BN.prototype.muln = function muln (num) {\n return this.clone().imuln(num);\n };\n\n // `this` * `this`\n BN.prototype.sqr = function sqr () {\n return this.mul(this);\n };\n\n // `this` * `this` in-place\n BN.prototype.isqr = function isqr () {\n return this.imul(this.clone());\n };\n\n // Math.pow(`this`, `num`)\n BN.prototype.pow = function pow (num) {\n var w = toBitArray(num);\n if (w.length === 0) return new BN(1);\n\n // Skip leading zeroes\n var res = this;\n for (var i = 0; i < w.length; i++, res = res.sqr()) {\n if (w[i] !== 0) break;\n }\n\n if (++i < w.length) {\n for (var q = res.sqr(); i < w.length; i++, q = q.sqr()) {\n if (w[i] === 0) continue;\n\n res = res.mul(q);\n }\n }\n\n return res;\n };\n\n // Shift-left in-place\n BN.prototype.iushln = function iushln (bits) {\n assert(typeof bits === 'number' && bits >= 0);\n var r = bits % 26;\n var s = (bits - r) / 26;\n var carryMask = (0x3ffffff >>> (26 - r)) << (26 - r);\n var i;\n\n if (r !== 0) {\n var carry = 0;\n\n for (i = 0; i < this.length; i++) {\n var newCarry = this.words[i] & carryMask;\n var c = ((this.words[i] | 0) - newCarry) << r;\n this.words[i] = c | carry;\n carry = newCarry >>> (26 - r);\n }\n\n if (carry) {\n this.words[i] = carry;\n this.length++;\n }\n }\n\n if (s !== 0) {\n for (i = this.length - 1; i >= 0; i--) {\n this.words[i + s] = this.words[i];\n }\n\n for (i = 0; i < s; i++) {\n this.words[i] = 0;\n }\n\n this.length += s;\n }\n\n return this._strip();\n };\n\n BN.prototype.ishln = function ishln (bits) {\n // TODO(indutny): implement me\n assert(this.negative === 0);\n return this.iushln(bits);\n };\n\n // Shift-right in-place\n // NOTE: `hint` is a lowest bit before trailing zeroes\n // NOTE: if `extended` is present - it will be filled with destroyed bits\n BN.prototype.iushrn = function iushrn (bits, hint, extended) {\n assert(typeof bits === 'number' && bits >= 0);\n var h;\n if (hint) {\n h = (hint - (hint % 26)) / 26;\n } else {\n h = 0;\n }\n\n var r = bits % 26;\n var s = Math.min((bits - r) / 26, this.length);\n var mask = 0x3ffffff ^ ((0x3ffffff >>> r) << r);\n var maskedWords = extended;\n\n h -= s;\n h = Math.max(0, h);\n\n // Extended mode, copy masked part\n if (maskedWords) {\n for (var i = 0; i < s; i++) {\n maskedWords.words[i] = this.words[i];\n }\n maskedWords.length = s;\n }\n\n if (s === 0) {\n // No-op, we should not move anything at all\n } else if (this.length > s) {\n this.length -= s;\n for (i = 0; i < this.length; i++) {\n this.words[i] = this.words[i + s];\n }\n } else {\n this.words[0] = 0;\n this.length = 1;\n }\n\n var carry = 0;\n for (i = this.length - 1; i >= 0 && (carry !== 0 || i >= h); i--) {\n var word = this.words[i] | 0;\n this.words[i] = (carry << (26 - r)) | (word >>> r);\n carry = word & mask;\n }\n\n // Push carried bits as a mask\n if (maskedWords && carry !== 0) {\n maskedWords.words[maskedWords.length++] = carry;\n }\n\n if (this.length === 0) {\n this.words[0] = 0;\n this.length = 1;\n }\n\n return this._strip();\n };\n\n BN.prototype.ishrn = function ishrn (bits, hint, extended) {\n // TODO(indutny): implement me\n assert(this.negative === 0);\n return this.iushrn(bits, hint, extended);\n };\n\n // Shift-left\n BN.prototype.shln = function shln (bits) {\n return this.clone().ishln(bits);\n };\n\n BN.prototype.ushln = function ushln (bits) {\n return this.clone().iushln(bits);\n };\n\n // Shift-right\n BN.prototype.shrn = function shrn (bits) {\n return this.clone().ishrn(bits);\n };\n\n BN.prototype.ushrn = function ushrn (bits) {\n return this.clone().iushrn(bits);\n };\n\n // Test if n bit is set\n BN.prototype.testn = function testn (bit) {\n assert(typeof bit === 'number' && bit >= 0);\n var r = bit % 26;\n var s = (bit - r) / 26;\n var q = 1 << r;\n\n // Fast case: bit is much higher than all existing words\n if (this.length <= s) return false;\n\n // Check bit and return\n var w = this.words[s];\n\n return !!(w & q);\n };\n\n // Return only lowers bits of number (in-place)\n BN.prototype.imaskn = function imaskn (bits) {\n assert(typeof bits === 'number' && bits >= 0);\n var r = bits % 26;\n var s = (bits - r) / 26;\n\n assert(this.negative === 0, 'imaskn works only with positive numbers');\n\n if (this.length <= s) {\n return this;\n }\n\n if (r !== 0) {\n s++;\n }\n this.length = Math.min(s, this.length);\n\n if (r !== 0) {\n var mask = 0x3ffffff ^ ((0x3ffffff >>> r) << r);\n this.words[this.length - 1] &= mask;\n }\n\n return this._strip();\n };\n\n // Return only lowers bits of number\n BN.prototype.maskn = function maskn (bits) {\n return this.clone().imaskn(bits);\n };\n\n // Add plain number `num` to `this`\n BN.prototype.iaddn = function iaddn (num) {\n assert(typeof num === 'number');\n assert(num < 0x4000000);\n if (num < 0) return this.isubn(-num);\n\n // Possible sign change\n if (this.negative !== 0) {\n if (this.length === 1 && (this.words[0] | 0) <= num) {\n this.words[0] = num - (this.words[0] | 0);\n this.negative = 0;\n return this;\n }\n\n this.negative = 0;\n this.isubn(num);\n this.negative = 1;\n return this;\n }\n\n // Add without checks\n return this._iaddn(num);\n };\n\n BN.prototype._iaddn = function _iaddn (num) {\n this.words[0] += num;\n\n // Carry\n for (var i = 0; i < this.length && this.words[i] >= 0x4000000; i++) {\n this.words[i] -= 0x4000000;\n if (i === this.length - 1) {\n this.words[i + 1] = 1;\n } else {\n this.words[i + 1]++;\n }\n }\n this.length = Math.max(this.length, i + 1);\n\n return this;\n };\n\n // Subtract plain number `num` from `this`\n BN.prototype.isubn = function isubn (num) {\n assert(typeof num === 'number');\n assert(num < 0x4000000);\n if (num < 0) return this.iaddn(-num);\n\n if (this.negative !== 0) {\n this.negative = 0;\n this.iaddn(num);\n this.negative = 1;\n return this;\n }\n\n this.words[0] -= num;\n\n if (this.length === 1 && this.words[0] < 0) {\n this.words[0] = -this.words[0];\n this.negative = 1;\n } else {\n // Carry\n for (var i = 0; i < this.length && this.words[i] < 0; i++) {\n this.words[i] += 0x4000000;\n this.words[i + 1] -= 1;\n }\n }\n\n return this._strip();\n };\n\n BN.prototype.addn = function addn (num) {\n return this.clone().iaddn(num);\n };\n\n BN.prototype.subn = function subn (num) {\n return this.clone().isubn(num);\n };\n\n BN.prototype.iabs = function iabs () {\n this.negative = 0;\n\n return this;\n };\n\n BN.prototype.abs = function abs () {\n return this.clone().iabs();\n };\n\n BN.prototype._ishlnsubmul = function _ishlnsubmul (num, mul, shift) {\n var len = num.length + shift;\n var i;\n\n this._expand(len);\n\n var w;\n var carry = 0;\n for (i = 0; i < num.length; i++) {\n w = (this.words[i + shift] | 0) + carry;\n var right = (num.words[i] | 0) * mul;\n w -= right & 0x3ffffff;\n carry = (w >> 26) - ((right / 0x4000000) | 0);\n this.words[i + shift] = w & 0x3ffffff;\n }\n for (; i < this.length - shift; i++) {\n w = (this.words[i + shift] | 0) + carry;\n carry = w >> 26;\n this.words[i + shift] = w & 0x3ffffff;\n }\n\n if (carry === 0) return this._strip();\n\n // Subtraction overflow\n assert(carry === -1);\n carry = 0;\n for (i = 0; i < this.length; i++) {\n w = -(this.words[i] | 0) + carry;\n carry = w >> 26;\n this.words[i] = w & 0x3ffffff;\n }\n this.negative = 1;\n\n return this._strip();\n };\n\n BN.prototype._wordDiv = function _wordDiv (num, mode) {\n var shift = this.length - num.length;\n\n var a = this.clone();\n var b = num;\n\n // Normalize\n var bhi = b.words[b.length - 1] | 0;\n var bhiBits = this._countBits(bhi);\n shift = 26 - bhiBits;\n if (shift !== 0) {\n b = b.ushln(shift);\n a.iushln(shift);\n bhi = b.words[b.length - 1] | 0;\n }\n\n // Initialize quotient\n var m = a.length - b.length;\n var q;\n\n if (mode !== 'mod') {\n q = new BN(null);\n q.length = m + 1;\n q.words = new Array(q.length);\n for (var i = 0; i < q.length; i++) {\n q.words[i] = 0;\n }\n }\n\n var diff = a.clone()._ishlnsubmul(b, 1, m);\n if (diff.negative === 0) {\n a = diff;\n if (q) {\n q.words[m] = 1;\n }\n }\n\n for (var j = m - 1; j >= 0; j--) {\n var qj = (a.words[b.length + j] | 0) * 0x4000000 +\n (a.words[b.length + j - 1] | 0);\n\n // NOTE: (qj / bhi) is (0x3ffffff * 0x4000000 + 0x3ffffff) / 0x2000000 max\n // (0x7ffffff)\n qj = Math.min((qj / bhi) | 0, 0x3ffffff);\n\n a._ishlnsubmul(b, qj, j);\n while (a.negative !== 0) {\n qj--;\n a.negative = 0;\n a._ishlnsubmul(b, 1, j);\n if (!a.isZero()) {\n a.negative ^= 1;\n }\n }\n if (q) {\n q.words[j] = qj;\n }\n }\n if (q) {\n q._strip();\n }\n a._strip();\n\n // Denormalize\n if (mode !== 'div' && shift !== 0) {\n a.iushrn(shift);\n }\n\n return {\n div: q || null,\n mod: a\n };\n };\n\n // NOTE: 1) `mode` can be set to `mod` to request mod only,\n // to `div` to request div only, or be absent to\n // request both div & mod\n // 2) `positive` is true if unsigned mod is requested\n BN.prototype.divmod = function divmod (num, mode, positive) {\n assert(!num.isZero());\n\n if (this.isZero()) {\n return {\n div: new BN(0),\n mod: new BN(0)\n };\n }\n\n var div, mod, res;\n if (this.negative !== 0 && num.negative === 0) {\n res = this.neg().divmod(num, mode);\n\n if (mode !== 'mod') {\n div = res.div.neg();\n }\n\n if (mode !== 'div') {\n mod = res.mod.neg();\n if (positive && mod.negative !== 0) {\n mod.iadd(num);\n }\n }\n\n return {\n div: div,\n mod: mod\n };\n }\n\n if (this.negative === 0 && num.negative !== 0) {\n res = this.divmod(num.neg(), mode);\n\n if (mode !== 'mod') {\n div = res.div.neg();\n }\n\n return {\n div: div,\n mod: res.mod\n };\n }\n\n if ((this.negative & num.negative) !== 0) {\n res = this.neg().divmod(num.neg(), mode);\n\n if (mode !== 'div') {\n mod = res.mod.neg();\n if (positive && mod.negative !== 0) {\n mod.isub(num);\n }\n }\n\n return {\n div: res.div,\n mod: mod\n };\n }\n\n // Both numbers are positive at this point\n\n // Strip both numbers to approximate shift value\n if (num.length > this.length || this.cmp(num) < 0) {\n return {\n div: new BN(0),\n mod: this\n };\n }\n\n // Very short reduction\n if (num.length === 1) {\n if (mode === 'div') {\n return {\n div: this.divn(num.words[0]),\n mod: null\n };\n }\n\n if (mode === 'mod') {\n return {\n div: null,\n mod: new BN(this.modrn(num.words[0]))\n };\n }\n\n return {\n div: this.divn(num.words[0]),\n mod: new BN(this.modrn(num.words[0]))\n };\n }\n\n return this._wordDiv(num, mode);\n };\n\n // Find `this` / `num`\n BN.prototype.div = function div (num) {\n return this.divmod(num, 'div', false).div;\n };\n\n // Find `this` % `num`\n BN.prototype.mod = function mod (num) {\n return this.divmod(num, 'mod', false).mod;\n };\n\n BN.prototype.umod = function umod (num) {\n return this.divmod(num, 'mod', true).mod;\n };\n\n // Find Round(`this` / `num`)\n BN.prototype.divRound = function divRound (num) {\n var dm = this.divmod(num);\n\n // Fast case - exact division\n if (dm.mod.isZero()) return dm.div;\n\n var mod = dm.div.negative !== 0 ? dm.mod.isub(num) : dm.mod;\n\n var half = num.ushrn(1);\n var r2 = num.andln(1);\n var cmp = mod.cmp(half);\n\n // Round down\n if (cmp < 0 || (r2 === 1 && cmp === 0)) return dm.div;\n\n // Round up\n return dm.div.negative !== 0 ? dm.div.isubn(1) : dm.div.iaddn(1);\n };\n\n BN.prototype.modrn = function modrn (num) {\n var isNegNum = num < 0;\n if (isNegNum) num = -num;\n\n assert(num <= 0x3ffffff);\n var p = (1 << 26) % num;\n\n var acc = 0;\n for (var i = this.length - 1; i >= 0; i--) {\n acc = (p * acc + (this.words[i] | 0)) % num;\n }\n\n return isNegNum ? -acc : acc;\n };\n\n // WARNING: DEPRECATED\n BN.prototype.modn = function modn (num) {\n return this.modrn(num);\n };\n\n // In-place division by number\n BN.prototype.idivn = function idivn (num) {\n var isNegNum = num < 0;\n if (isNegNum) num = -num;\n\n assert(num <= 0x3ffffff);\n\n var carry = 0;\n for (var i = this.length - 1; i >= 0; i--) {\n var w = (this.words[i] | 0) + carry * 0x4000000;\n this.words[i] = (w / num) | 0;\n carry = w % num;\n }\n\n this._strip();\n return isNegNum ? this.ineg() : this;\n };\n\n BN.prototype.divn = function divn (num) {\n return this.clone().idivn(num);\n };\n\n BN.prototype.egcd = function egcd (p) {\n assert(p.negative === 0);\n assert(!p.isZero());\n\n var x = this;\n var y = p.clone();\n\n if (x.negative !== 0) {\n x = x.umod(p);\n } else {\n x = x.clone();\n }\n\n // A * x + B * y = x\n var A = new BN(1);\n var B = new BN(0);\n\n // C * x + D * y = y\n var C = new BN(0);\n var D = new BN(1);\n\n var g = 0;\n\n while (x.isEven() && y.isEven()) {\n x.iushrn(1);\n y.iushrn(1);\n ++g;\n }\n\n var yp = y.clone();\n var xp = x.clone();\n\n while (!x.isZero()) {\n for (var i = 0, im = 1; (x.words[0] & im) === 0 && i < 26; ++i, im <<= 1);\n if (i > 0) {\n x.iushrn(i);\n while (i-- > 0) {\n if (A.isOdd() || B.isOdd()) {\n A.iadd(yp);\n B.isub(xp);\n }\n\n A.iushrn(1);\n B.iushrn(1);\n }\n }\n\n for (var j = 0, jm = 1; (y.words[0] & jm) === 0 && j < 26; ++j, jm <<= 1);\n if (j > 0) {\n y.iushrn(j);\n while (j-- > 0) {\n if (C.isOdd() || D.isOdd()) {\n C.iadd(yp);\n D.isub(xp);\n }\n\n C.iushrn(1);\n D.iushrn(1);\n }\n }\n\n if (x.cmp(y) >= 0) {\n x.isub(y);\n A.isub(C);\n B.isub(D);\n } else {\n y.isub(x);\n C.isub(A);\n D.isub(B);\n }\n }\n\n return {\n a: C,\n b: D,\n gcd: y.iushln(g)\n };\n };\n\n // This is reduced incarnation of the binary EEA\n // above, designated to invert members of the\n // _prime_ fields F(p) at a maximal speed\n BN.prototype._invmp = function _invmp (p) {\n assert(p.negative === 0);\n assert(!p.isZero());\n\n var a = this;\n var b = p.clone();\n\n if (a.negative !== 0) {\n a = a.umod(p);\n } else {\n a = a.clone();\n }\n\n var x1 = new BN(1);\n var x2 = new BN(0);\n\n var delta = b.clone();\n\n while (a.cmpn(1) > 0 && b.cmpn(1) > 0) {\n for (var i = 0, im = 1; (a.words[0] & im) === 0 && i < 26; ++i, im <<= 1);\n if (i > 0) {\n a.iushrn(i);\n while (i-- > 0) {\n if (x1.isOdd()) {\n x1.iadd(delta);\n }\n\n x1.iushrn(1);\n }\n }\n\n for (var j = 0, jm = 1; (b.words[0] & jm) === 0 && j < 26; ++j, jm <<= 1);\n if (j > 0) {\n b.iushrn(j);\n while (j-- > 0) {\n if (x2.isOdd()) {\n x2.iadd(delta);\n }\n\n x2.iushrn(1);\n }\n }\n\n if (a.cmp(b) >= 0) {\n a.isub(b);\n x1.isub(x2);\n } else {\n b.isub(a);\n x2.isub(x1);\n }\n }\n\n var res;\n if (a.cmpn(1) === 0) {\n res = x1;\n } else {\n res = x2;\n }\n\n if (res.cmpn(0) < 0) {\n res.iadd(p);\n }\n\n return res;\n };\n\n BN.prototype.gcd = function gcd (num) {\n if (this.isZero()) return num.abs();\n if (num.isZero()) return this.abs();\n\n var a = this.clone();\n var b = num.clone();\n a.negative = 0;\n b.negative = 0;\n\n // Remove common factor of two\n for (var shift = 0; a.isEven() && b.isEven(); shift++) {\n a.iushrn(1);\n b.iushrn(1);\n }\n\n do {\n while (a.isEven()) {\n a.iushrn(1);\n }\n while (b.isEven()) {\n b.iushrn(1);\n }\n\n var r = a.cmp(b);\n if (r < 0) {\n // Swap `a` and `b` to make `a` always bigger than `b`\n var t = a;\n a = b;\n b = t;\n } else if (r === 0 || b.cmpn(1) === 0) {\n break;\n }\n\n a.isub(b);\n } while (true);\n\n return b.iushln(shift);\n };\n\n // Invert number in the field F(num)\n BN.prototype.invm = function invm (num) {\n return this.egcd(num).a.umod(num);\n };\n\n BN.prototype.isEven = function isEven () {\n return (this.words[0] & 1) === 0;\n };\n\n BN.prototype.isOdd = function isOdd () {\n return (this.words[0] & 1) === 1;\n };\n\n // And first word and num\n BN.prototype.andln = function andln (num) {\n return this.words[0] & num;\n };\n\n // Increment at the bit position in-line\n BN.prototype.bincn = function bincn (bit) {\n assert(typeof bit === 'number');\n var r = bit % 26;\n var s = (bit - r) / 26;\n var q = 1 << r;\n\n // Fast case: bit is much higher than all existing words\n if (this.length <= s) {\n this._expand(s + 1);\n this.words[s] |= q;\n return this;\n }\n\n // Add bit and propagate, if needed\n var carry = q;\n for (var i = s; carry !== 0 && i < this.length; i++) {\n var w = this.words[i] | 0;\n w += carry;\n carry = w >>> 26;\n w &= 0x3ffffff;\n this.words[i] = w;\n }\n if (carry !== 0) {\n this.words[i] = carry;\n this.length++;\n }\n return this;\n };\n\n BN.prototype.isZero = function isZero () {\n return this.length === 1 && this.words[0] === 0;\n };\n\n BN.prototype.cmpn = function cmpn (num) {\n var negative = num < 0;\n\n if (this.negative !== 0 && !negative) return -1;\n if (this.negative === 0 && negative) return 1;\n\n this._strip();\n\n var res;\n if (this.length > 1) {\n res = 1;\n } else {\n if (negative) {\n num = -num;\n }\n\n assert(num <= 0x3ffffff, 'Number is too big');\n\n var w = this.words[0] | 0;\n res = w === num ? 0 : w < num ? -1 : 1;\n }\n if (this.negative !== 0) return -res | 0;\n return res;\n };\n\n // Compare two numbers and return:\n // 1 - if `this` > `num`\n // 0 - if `this` == `num`\n // -1 - if `this` < `num`\n BN.prototype.cmp = function cmp (num) {\n if (this.negative !== 0 && num.negative === 0) return -1;\n if (this.negative === 0 && num.negative !== 0) return 1;\n\n var res = this.ucmp(num);\n if (this.negative !== 0) return -res | 0;\n return res;\n };\n\n // Unsigned comparison\n BN.prototype.ucmp = function ucmp (num) {\n // At this point both numbers have the same sign\n if (this.length > num.length) return 1;\n if (this.length < num.length) return -1;\n\n var res = 0;\n for (var i = this.length - 1; i >= 0; i--) {\n var a = this.words[i] | 0;\n var b = num.words[i] | 0;\n\n if (a === b) continue;\n if (a < b) {\n res = -1;\n } else if (a > b) {\n res = 1;\n }\n break;\n }\n return res;\n };\n\n BN.prototype.gtn = function gtn (num) {\n return this.cmpn(num) === 1;\n };\n\n BN.prototype.gt = function gt (num) {\n return this.cmp(num) === 1;\n };\n\n BN.prototype.gten = function gten (num) {\n return this.cmpn(num) >= 0;\n };\n\n BN.prototype.gte = function gte (num) {\n return this.cmp(num) >= 0;\n };\n\n BN.prototype.ltn = function ltn (num) {\n return this.cmpn(num) === -1;\n };\n\n BN.prototype.lt = function lt (num) {\n return this.cmp(num) === -1;\n };\n\n BN.prototype.lten = function lten (num) {\n return this.cmpn(num) <= 0;\n };\n\n BN.prototype.lte = function lte (num) {\n return this.cmp(num) <= 0;\n };\n\n BN.prototype.eqn = function eqn (num) {\n return this.cmpn(num) === 0;\n };\n\n BN.prototype.eq = function eq (num) {\n return this.cmp(num) === 0;\n };\n\n //\n // A reduce context, could be using montgomery or something better, depending\n // on the `m` itself.\n //\n BN.red = function red (num) {\n return new Red(num);\n };\n\n BN.prototype.toRed = function toRed (ctx) {\n assert(!this.red, 'Already a number in reduction context');\n assert(this.negative === 0, 'red works only with positives');\n return ctx.convertTo(this)._forceRed(ctx);\n };\n\n BN.prototype.fromRed = function fromRed () {\n assert(this.red, 'fromRed works only with numbers in reduction context');\n return this.red.convertFrom(this);\n };\n\n BN.prototype._forceRed = function _forceRed (ctx) {\n this.red = ctx;\n return this;\n };\n\n BN.prototype.forceRed = function forceRed (ctx) {\n assert(!this.red, 'Already a number in reduction context');\n return this._forceRed(ctx);\n };\n\n BN.prototype.redAdd = function redAdd (num) {\n assert(this.red, 'redAdd works only with red numbers');\n return this.red.add(this, num);\n };\n\n BN.prototype.redIAdd = function redIAdd (num) {\n assert(this.red, 'redIAdd works only with red numbers');\n return this.red.iadd(this, num);\n };\n\n BN.prototype.redSub = function redSub (num) {\n assert(this.red, 'redSub works only with red numbers');\n return this.red.sub(this, num);\n };\n\n BN.prototype.redISub = function redISub (num) {\n assert(this.red, 'redISub works only with red numbers');\n return this.red.isub(this, num);\n };\n\n BN.prototype.redShl = function redShl (num) {\n assert(this.red, 'redShl works only with red numbers');\n return this.red.shl(this, num);\n };\n\n BN.prototype.redMul = function redMul (num) {\n assert(this.red, 'redMul works only with red numbers');\n this.red._verify2(this, num);\n return this.red.mul(this, num);\n };\n\n BN.prototype.redIMul = function redIMul (num) {\n assert(this.red, 'redMul works only with red numbers');\n this.red._verify2(this, num);\n return this.red.imul(this, num);\n };\n\n BN.prototype.redSqr = function redSqr () {\n assert(this.red, 'redSqr works only with red numbers');\n this.red._verify1(this);\n return this.red.sqr(this);\n };\n\n BN.prototype.redISqr = function redISqr () {\n assert(this.red, 'redISqr works only with red numbers');\n this.red._verify1(this);\n return this.red.isqr(this);\n };\n\n // Square root over p\n BN.prototype.redSqrt = function redSqrt () {\n assert(this.red, 'redSqrt works only with red numbers');\n this.red._verify1(this);\n return this.red.sqrt(this);\n };\n\n BN.prototype.redInvm = function redInvm () {\n assert(this.red, 'redInvm works only with red numbers');\n this.red._verify1(this);\n return this.red.invm(this);\n };\n\n // Return negative clone of `this` % `red modulo`\n BN.prototype.redNeg = function redNeg () {\n assert(this.red, 'redNeg works only with red numbers');\n this.red._verify1(this);\n return this.red.neg(this);\n };\n\n BN.prototype.redPow = function redPow (num) {\n assert(this.red && !num.red, 'redPow(normalNum)');\n this.red._verify1(this);\n return this.red.pow(this, num);\n };\n\n // Prime numbers with efficient reduction\n var primes = {\n k256: null,\n p224: null,\n p192: null,\n p25519: null\n };\n\n // Pseudo-Mersenne prime\n function MPrime (name, p) {\n // P = 2 ^ N - K\n this.name = name;\n this.p = new BN(p, 16);\n this.n = this.p.bitLength();\n this.k = new BN(1).iushln(this.n).isub(this.p);\n\n this.tmp = this._tmp();\n }\n\n MPrime.prototype._tmp = function _tmp () {\n var tmp = new BN(null);\n tmp.words = new Array(Math.ceil(this.n / 13));\n return tmp;\n };\n\n MPrime.prototype.ireduce = function ireduce (num) {\n // Assumes that `num` is less than `P^2`\n // num = HI * (2 ^ N - K) + HI * K + LO = HI * K + LO (mod P)\n var r = num;\n var rlen;\n\n do {\n this.split(r, this.tmp);\n r = this.imulK(r);\n r = r.iadd(this.tmp);\n rlen = r.bitLength();\n } while (rlen > this.n);\n\n var cmp = rlen < this.n ? -1 : r.ucmp(this.p);\n if (cmp === 0) {\n r.words[0] = 0;\n r.length = 1;\n } else if (cmp > 0) {\n r.isub(this.p);\n } else {\n if (r.strip !== undefined) {\n // r is a BN v4 instance\n r.strip();\n } else {\n // r is a BN v5 instance\n r._strip();\n }\n }\n\n return r;\n };\n\n MPrime.prototype.split = function split (input, out) {\n input.iushrn(this.n, 0, out);\n };\n\n MPrime.prototype.imulK = function imulK (num) {\n return num.imul(this.k);\n };\n\n function K256 () {\n MPrime.call(\n this,\n 'k256',\n 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f');\n }\n inherits(K256, MPrime);\n\n K256.prototype.split = function split (input, output) {\n // 256 = 9 * 26 + 22\n var mask = 0x3fffff;\n\n var outLen = Math.min(input.length, 9);\n for (var i = 0; i < outLen; i++) {\n output.words[i] = input.words[i];\n }\n output.length = outLen;\n\n if (input.length <= 9) {\n input.words[0] = 0;\n input.length = 1;\n return;\n }\n\n // Shift by 9 limbs\n var prev = input.words[9];\n output.words[output.length++] = prev & mask;\n\n for (i = 10; i < input.length; i++) {\n var next = input.words[i] | 0;\n input.words[i - 10] = ((next & mask) << 4) | (prev >>> 22);\n prev = next;\n }\n prev >>>= 22;\n input.words[i - 10] = prev;\n if (prev === 0 && input.length > 10) {\n input.length -= 10;\n } else {\n input.length -= 9;\n }\n };\n\n K256.prototype.imulK = function imulK (num) {\n // K = 0x1000003d1 = [ 0x40, 0x3d1 ]\n num.words[num.length] = 0;\n num.words[num.length + 1] = 0;\n num.length += 2;\n\n // bounded at: 0x40 * 0x3ffffff + 0x3d0 = 0x100000390\n var lo = 0;\n for (var i = 0; i < num.length; i++) {\n var w = num.words[i] | 0;\n lo += w * 0x3d1;\n num.words[i] = lo & 0x3ffffff;\n lo = w * 0x40 + ((lo / 0x4000000) | 0);\n }\n\n // Fast length reduction\n if (num.words[num.length - 1] === 0) {\n num.length--;\n if (num.words[num.length - 1] === 0) {\n num.length--;\n }\n }\n return num;\n };\n\n function P224 () {\n MPrime.call(\n this,\n 'p224',\n 'ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001');\n }\n inherits(P224, MPrime);\n\n function P192 () {\n MPrime.call(\n this,\n 'p192',\n 'ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff');\n }\n inherits(P192, MPrime);\n\n function P25519 () {\n // 2 ^ 255 - 19\n MPrime.call(\n this,\n '25519',\n '7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed');\n }\n inherits(P25519, MPrime);\n\n P25519.prototype.imulK = function imulK (num) {\n // K = 0x13\n var carry = 0;\n for (var i = 0; i < num.length; i++) {\n var hi = (num.words[i] | 0) * 0x13 + carry;\n var lo = hi & 0x3ffffff;\n hi >>>= 26;\n\n num.words[i] = lo;\n carry = hi;\n }\n if (carry !== 0) {\n num.words[num.length++] = carry;\n }\n return num;\n };\n\n // Exported mostly for testing purposes, use plain name instead\n BN._prime = function prime (name) {\n // Cached version of prime\n if (primes[name]) return primes[name];\n\n var prime;\n if (name === 'k256') {\n prime = new K256();\n } else if (name === 'p224') {\n prime = new P224();\n } else if (name === 'p192') {\n prime = new P192();\n } else if (name === 'p25519') {\n prime = new P25519();\n } else {\n throw new Error('Unknown prime ' + name);\n }\n primes[name] = prime;\n\n return prime;\n };\n\n //\n // Base reduction engine\n //\n function Red (m) {\n if (typeof m === 'string') {\n var prime = BN._prime(m);\n this.m = prime.p;\n this.prime = prime;\n } else {\n assert(m.gtn(1), 'modulus must be greater than 1');\n this.m = m;\n this.prime = null;\n }\n }\n\n Red.prototype._verify1 = function _verify1 (a) {\n assert(a.negative === 0, 'red works only with positives');\n assert(a.red, 'red works only with red numbers');\n };\n\n Red.prototype._verify2 = function _verify2 (a, b) {\n assert((a.negative | b.negative) === 0, 'red works only with positives');\n assert(a.red && a.red === b.red,\n 'red works only with red numbers');\n };\n\n Red.prototype.imod = function imod (a) {\n if (this.prime) return this.prime.ireduce(a)._forceRed(this);\n\n move(a, a.umod(this.m)._forceRed(this));\n return a;\n };\n\n Red.prototype.neg = function neg (a) {\n if (a.isZero()) {\n return a.clone();\n }\n\n return this.m.sub(a)._forceRed(this);\n };\n\n Red.prototype.add = function add (a, b) {\n this._verify2(a, b);\n\n var res = a.add(b);\n if (res.cmp(this.m) >= 0) {\n res.isub(this.m);\n }\n return res._forceRed(this);\n };\n\n Red.prototype.iadd = function iadd (a, b) {\n this._verify2(a, b);\n\n var res = a.iadd(b);\n if (res.cmp(this.m) >= 0) {\n res.isub(this.m);\n }\n return res;\n };\n\n Red.prototype.sub = function sub (a, b) {\n this._verify2(a, b);\n\n var res = a.sub(b);\n if (res.cmpn(0) < 0) {\n res.iadd(this.m);\n }\n return res._forceRed(this);\n };\n\n Red.prototype.isub = function isub (a, b) {\n this._verify2(a, b);\n\n var res = a.isub(b);\n if (res.cmpn(0) < 0) {\n res.iadd(this.m);\n }\n return res;\n };\n\n Red.prototype.shl = function shl (a, num) {\n this._verify1(a);\n return this.imod(a.ushln(num));\n };\n\n Red.prototype.imul = function imul (a, b) {\n this._verify2(a, b);\n return this.imod(a.imul(b));\n };\n\n Red.prototype.mul = function mul (a, b) {\n this._verify2(a, b);\n return this.imod(a.mul(b));\n };\n\n Red.prototype.isqr = function isqr (a) {\n return this.imul(a, a.clone());\n };\n\n Red.prototype.sqr = function sqr (a) {\n return this.mul(a, a);\n };\n\n Red.prototype.sqrt = function sqrt (a) {\n if (a.isZero()) return a.clone();\n\n var mod3 = this.m.andln(3);\n assert(mod3 % 2 === 1);\n\n // Fast case\n if (mod3 === 3) {\n var pow = this.m.add(new BN(1)).iushrn(2);\n return this.pow(a, pow);\n }\n\n // Tonelli-Shanks algorithm (Totally unoptimized and slow)\n //\n // Find Q and S, that Q * 2 ^ S = (P - 1)\n var q = this.m.subn(1);\n var s = 0;\n while (!q.isZero() && q.andln(1) === 0) {\n s++;\n q.iushrn(1);\n }\n assert(!q.isZero());\n\n var one = new BN(1).toRed(this);\n var nOne = one.redNeg();\n\n // Find quadratic non-residue\n // NOTE: Max is such because of generalized Riemann hypothesis.\n var lpow = this.m.subn(1).iushrn(1);\n var z = this.m.bitLength();\n z = new BN(2 * z * z).toRed(this);\n\n while (this.pow(z, lpow).cmp(nOne) !== 0) {\n z.redIAdd(nOne);\n }\n\n var c = this.pow(z, q);\n var r = this.pow(a, q.addn(1).iushrn(1));\n var t = this.pow(a, q);\n var m = s;\n while (t.cmp(one) !== 0) {\n var tmp = t;\n for (var i = 0; tmp.cmp(one) !== 0; i++) {\n tmp = tmp.redSqr();\n }\n assert(i < m);\n var b = this.pow(c, new BN(1).iushln(m - i - 1));\n\n r = r.redMul(b);\n c = b.redSqr();\n t = t.redMul(c);\n m = i;\n }\n\n return r;\n };\n\n Red.prototype.invm = function invm (a) {\n var inv = a._invmp(this.m);\n if (inv.negative !== 0) {\n inv.negative = 0;\n return this.imod(inv).redNeg();\n } else {\n return this.imod(inv);\n }\n };\n\n Red.prototype.pow = function pow (a, num) {\n if (num.isZero()) return new BN(1).toRed(this);\n if (num.cmpn(1) === 0) return a.clone();\n\n var windowSize = 4;\n var wnd = new Array(1 << windowSize);\n wnd[0] = new BN(1).toRed(this);\n wnd[1] = a;\n for (var i = 2; i < wnd.length; i++) {\n wnd[i] = this.mul(wnd[i - 1], a);\n }\n\n var res = wnd[0];\n var current = 0;\n var currentLen = 0;\n var start = num.bitLength() % 26;\n if (start === 0) {\n start = 26;\n }\n\n for (i = num.length - 1; i >= 0; i--) {\n var word = num.words[i];\n for (var j = start - 1; j >= 0; j--) {\n var bit = (word >> j) & 1;\n if (res !== wnd[0]) {\n res = this.sqr(res);\n }\n\n if (bit === 0 && current === 0) {\n currentLen = 0;\n continue;\n }\n\n current <<= 1;\n current |= bit;\n currentLen++;\n if (currentLen !== windowSize && (i !== 0 || j !== 0)) continue;\n\n res = this.mul(res, wnd[current]);\n currentLen = 0;\n current = 0;\n }\n start = 26;\n }\n\n return res;\n };\n\n Red.prototype.convertTo = function convertTo (num) {\n var r = num.umod(this.m);\n\n return r === num ? r.clone() : r;\n };\n\n Red.prototype.convertFrom = function convertFrom (num) {\n var res = num.clone();\n res.red = null;\n return res;\n };\n\n //\n // Montgomery method engine\n //\n\n BN.mont = function mont (num) {\n return new Mont(num);\n };\n\n function Mont (m) {\n Red.call(this, m);\n\n this.shift = this.m.bitLength();\n if (this.shift % 26 !== 0) {\n this.shift += 26 - (this.shift % 26);\n }\n\n this.r = new BN(1).iushln(this.shift);\n this.r2 = this.imod(this.r.sqr());\n this.rinv = this.r._invmp(this.m);\n\n this.minv = this.rinv.mul(this.r).isubn(1).div(this.m);\n this.minv = this.minv.umod(this.r);\n this.minv = this.r.sub(this.minv);\n }\n inherits(Mont, Red);\n\n Mont.prototype.convertTo = function convertTo (num) {\n return this.imod(num.ushln(this.shift));\n };\n\n Mont.prototype.convertFrom = function convertFrom (num) {\n var r = this.imod(num.mul(this.rinv));\n r.red = null;\n return r;\n };\n\n Mont.prototype.imul = function imul (a, b) {\n if (a.isZero() || b.isZero()) {\n a.words[0] = 0;\n a.length = 1;\n return a;\n }\n\n var t = a.imul(b);\n var c = t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m);\n var u = t.isub(c).iushrn(this.shift);\n var res = u;\n\n if (u.cmp(this.m) >= 0) {\n res = u.isub(this.m);\n } else if (u.cmpn(0) < 0) {\n res = u.iadd(this.m);\n }\n\n return res._forceRed(this);\n };\n\n Mont.prototype.mul = function mul (a, b) {\n if (a.isZero() || b.isZero()) return new BN(0)._forceRed(this);\n\n var t = a.mul(b);\n var c = t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m);\n var u = t.isub(c).iushrn(this.shift);\n var res = u;\n if (u.cmp(this.m) >= 0) {\n res = u.isub(this.m);\n } else if (u.cmpn(0) < 0) {\n res = u.iadd(this.m);\n }\n\n return res._forceRed(this);\n };\n\n Mont.prototype.invm = function invm (a) {\n // (AR)^-1 * R^2 = (A^-1 * R^-1) * R^2 = A^-1 * R\n var res = this.imod(a._invmp(this.m).mul(this.r2));\n return res._forceRed(this);\n };\n})(typeof module === 'undefined' || module, this);\n","var r;\n\nmodule.exports = function rand(len) {\n if (!r)\n r = new Rand(null);\n\n return r.generate(len);\n};\n\nfunction Rand(rand) {\n this.rand = rand;\n}\nmodule.exports.Rand = Rand;\n\nRand.prototype.generate = function generate(len) {\n return this._rand(len);\n};\n\n// Emulate crypto API using randy\nRand.prototype._rand = function _rand(n) {\n if (this.rand.getBytes)\n return this.rand.getBytes(n);\n\n var res = new Uint8Array(n);\n for (var i = 0; i < res.length; i++)\n res[i] = this.rand.getByte();\n return res;\n};\n\nif (typeof self === 'object') {\n if (self.crypto && self.crypto.getRandomValues) {\n // Modern browsers\n Rand.prototype._rand = function _rand(n) {\n var arr = new Uint8Array(n);\n self.crypto.getRandomValues(arr);\n return arr;\n };\n } else if (self.msCrypto && self.msCrypto.getRandomValues) {\n // IE\n Rand.prototype._rand = function _rand(n) {\n var arr = new Uint8Array(n);\n self.msCrypto.getRandomValues(arr);\n return arr;\n };\n\n // Safari's WebWorkers do not have `crypto`\n } else if (typeof window === 'object') {\n // Old junk\n Rand.prototype._rand = function() {\n throw new Error('Not implemented yet');\n };\n }\n} else {\n // Node.js or Web worker with no crypto support\n try {\n var crypto = require('crypto');\n if (typeof crypto.randomBytes !== 'function')\n throw new Error('Not supported');\n\n Rand.prototype._rand = function _rand(n) {\n return crypto.randomBytes(n);\n };\n } catch (e) {\n }\n}\n","// based on the aes implimentation in triple sec\n// https://github.com/keybase/triplesec\n// which is in turn based on the one from crypto-js\n// https://code.google.com/p/crypto-js/\n\nvar Buffer = require('safe-buffer').Buffer\n\nfunction asUInt32Array (buf) {\n if (!Buffer.isBuffer(buf)) buf = Buffer.from(buf)\n\n var len = (buf.length / 4) | 0\n var out = new Array(len)\n\n for (var i = 0; i < len; i++) {\n out[i] = buf.readUInt32BE(i * 4)\n }\n\n return out\n}\n\nfunction scrubVec (v) {\n for (var i = 0; i < v.length; v++) {\n v[i] = 0\n }\n}\n\nfunction cryptBlock (M, keySchedule, SUB_MIX, SBOX, nRounds) {\n var SUB_MIX0 = SUB_MIX[0]\n var SUB_MIX1 = SUB_MIX[1]\n var SUB_MIX2 = SUB_MIX[2]\n var SUB_MIX3 = SUB_MIX[3]\n\n var s0 = M[0] ^ keySchedule[0]\n var s1 = M[1] ^ keySchedule[1]\n var s2 = M[2] ^ keySchedule[2]\n var s3 = M[3] ^ keySchedule[3]\n var t0, t1, t2, t3\n var ksRow = 4\n\n for (var round = 1; round < nRounds; round++) {\n t0 = SUB_MIX0[s0 >>> 24] ^ SUB_MIX1[(s1 >>> 16) & 0xff] ^ SUB_MIX2[(s2 >>> 8) & 0xff] ^ SUB_MIX3[s3 & 0xff] ^ keySchedule[ksRow++]\n t1 = SUB_MIX0[s1 >>> 24] ^ SUB_MIX1[(s2 >>> 16) & 0xff] ^ SUB_MIX2[(s3 >>> 8) & 0xff] ^ SUB_MIX3[s0 & 0xff] ^ keySchedule[ksRow++]\n t2 = SUB_MIX0[s2 >>> 24] ^ SUB_MIX1[(s3 >>> 16) & 0xff] ^ SUB_MIX2[(s0 >>> 8) & 0xff] ^ SUB_MIX3[s1 & 0xff] ^ keySchedule[ksRow++]\n t3 = SUB_MIX0[s3 >>> 24] ^ SUB_MIX1[(s0 >>> 16) & 0xff] ^ SUB_MIX2[(s1 >>> 8) & 0xff] ^ SUB_MIX3[s2 & 0xff] ^ keySchedule[ksRow++]\n s0 = t0\n s1 = t1\n s2 = t2\n s3 = t3\n }\n\n t0 = ((SBOX[s0 >>> 24] << 24) | (SBOX[(s1 >>> 16) & 0xff] << 16) | (SBOX[(s2 >>> 8) & 0xff] << 8) | SBOX[s3 & 0xff]) ^ keySchedule[ksRow++]\n t1 = ((SBOX[s1 >>> 24] << 24) | (SBOX[(s2 >>> 16) & 0xff] << 16) | (SBOX[(s3 >>> 8) & 0xff] << 8) | SBOX[s0 & 0xff]) ^ keySchedule[ksRow++]\n t2 = ((SBOX[s2 >>> 24] << 24) | (SBOX[(s3 >>> 16) & 0xff] << 16) | (SBOX[(s0 >>> 8) & 0xff] << 8) | SBOX[s1 & 0xff]) ^ keySchedule[ksRow++]\n t3 = ((SBOX[s3 >>> 24] << 24) | (SBOX[(s0 >>> 16) & 0xff] << 16) | (SBOX[(s1 >>> 8) & 0xff] << 8) | SBOX[s2 & 0xff]) ^ keySchedule[ksRow++]\n t0 = t0 >>> 0\n t1 = t1 >>> 0\n t2 = t2 >>> 0\n t3 = t3 >>> 0\n\n return [t0, t1, t2, t3]\n}\n\n// AES constants\nvar RCON = [0x00, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36]\nvar G = (function () {\n // Compute double table\n var d = new Array(256)\n for (var j = 0; j < 256; j++) {\n if (j < 128) {\n d[j] = j << 1\n } else {\n d[j] = (j << 1) ^ 0x11b\n }\n }\n\n var SBOX = []\n var INV_SBOX = []\n var SUB_MIX = [[], [], [], []]\n var INV_SUB_MIX = [[], [], [], []]\n\n // Walk GF(2^8)\n var x = 0\n var xi = 0\n for (var i = 0; i < 256; ++i) {\n // Compute sbox\n var sx = xi ^ (xi << 1) ^ (xi << 2) ^ (xi << 3) ^ (xi << 4)\n sx = (sx >>> 8) ^ (sx & 0xff) ^ 0x63\n SBOX[x] = sx\n INV_SBOX[sx] = x\n\n // Compute multiplication\n var x2 = d[x]\n var x4 = d[x2]\n var x8 = d[x4]\n\n // Compute sub bytes, mix columns tables\n var t = (d[sx] * 0x101) ^ (sx * 0x1010100)\n SUB_MIX[0][x] = (t << 24) | (t >>> 8)\n SUB_MIX[1][x] = (t << 16) | (t >>> 16)\n SUB_MIX[2][x] = (t << 8) | (t >>> 24)\n SUB_MIX[3][x] = t\n\n // Compute inv sub bytes, inv mix columns tables\n t = (x8 * 0x1010101) ^ (x4 * 0x10001) ^ (x2 * 0x101) ^ (x * 0x1010100)\n INV_SUB_MIX[0][sx] = (t << 24) | (t >>> 8)\n INV_SUB_MIX[1][sx] = (t << 16) | (t >>> 16)\n INV_SUB_MIX[2][sx] = (t << 8) | (t >>> 24)\n INV_SUB_MIX[3][sx] = t\n\n if (x === 0) {\n x = xi = 1\n } else {\n x = x2 ^ d[d[d[x8 ^ x2]]]\n xi ^= d[d[xi]]\n }\n }\n\n return {\n SBOX: SBOX,\n INV_SBOX: INV_SBOX,\n SUB_MIX: SUB_MIX,\n INV_SUB_MIX: INV_SUB_MIX\n }\n})()\n\nfunction AES (key) {\n this._key = asUInt32Array(key)\n this._reset()\n}\n\nAES.blockSize = 4 * 4\nAES.keySize = 256 / 8\nAES.prototype.blockSize = AES.blockSize\nAES.prototype.keySize = AES.keySize\nAES.prototype._reset = function () {\n var keyWords = this._key\n var keySize = keyWords.length\n var nRounds = keySize + 6\n var ksRows = (nRounds + 1) * 4\n\n var keySchedule = []\n for (var k = 0; k < keySize; k++) {\n keySchedule[k] = keyWords[k]\n }\n\n for (k = keySize; k < ksRows; k++) {\n var t = keySchedule[k - 1]\n\n if (k % keySize === 0) {\n t = (t << 8) | (t >>> 24)\n t =\n (G.SBOX[t >>> 24] << 24) |\n (G.SBOX[(t >>> 16) & 0xff] << 16) |\n (G.SBOX[(t >>> 8) & 0xff] << 8) |\n (G.SBOX[t & 0xff])\n\n t ^= RCON[(k / keySize) | 0] << 24\n } else if (keySize > 6 && k % keySize === 4) {\n t =\n (G.SBOX[t >>> 24] << 24) |\n (G.SBOX[(t >>> 16) & 0xff] << 16) |\n (G.SBOX[(t >>> 8) & 0xff] << 8) |\n (G.SBOX[t & 0xff])\n }\n\n keySchedule[k] = keySchedule[k - keySize] ^ t\n }\n\n var invKeySchedule = []\n for (var ik = 0; ik < ksRows; ik++) {\n var ksR = ksRows - ik\n var tt = keySchedule[ksR - (ik % 4 ? 0 : 4)]\n\n if (ik < 4 || ksR <= 4) {\n invKeySchedule[ik] = tt\n } else {\n invKeySchedule[ik] =\n G.INV_SUB_MIX[0][G.SBOX[tt >>> 24]] ^\n G.INV_SUB_MIX[1][G.SBOX[(tt >>> 16) & 0xff]] ^\n G.INV_SUB_MIX[2][G.SBOX[(tt >>> 8) & 0xff]] ^\n G.INV_SUB_MIX[3][G.SBOX[tt & 0xff]]\n }\n }\n\n this._nRounds = nRounds\n this._keySchedule = keySchedule\n this._invKeySchedule = invKeySchedule\n}\n\nAES.prototype.encryptBlockRaw = function (M) {\n M = asUInt32Array(M)\n return cryptBlock(M, this._keySchedule, G.SUB_MIX, G.SBOX, this._nRounds)\n}\n\nAES.prototype.encryptBlock = function (M) {\n var out = this.encryptBlockRaw(M)\n var buf = Buffer.allocUnsafe(16)\n buf.writeUInt32BE(out[0], 0)\n buf.writeUInt32BE(out[1], 4)\n buf.writeUInt32BE(out[2], 8)\n buf.writeUInt32BE(out[3], 12)\n return buf\n}\n\nAES.prototype.decryptBlock = function (M) {\n M = asUInt32Array(M)\n\n // swap\n var m1 = M[1]\n M[1] = M[3]\n M[3] = m1\n\n var out = cryptBlock(M, this._invKeySchedule, G.INV_SUB_MIX, G.INV_SBOX, this._nRounds)\n var buf = Buffer.allocUnsafe(16)\n buf.writeUInt32BE(out[0], 0)\n buf.writeUInt32BE(out[3], 4)\n buf.writeUInt32BE(out[2], 8)\n buf.writeUInt32BE(out[1], 12)\n return buf\n}\n\nAES.prototype.scrub = function () {\n scrubVec(this._keySchedule)\n scrubVec(this._invKeySchedule)\n scrubVec(this._key)\n}\n\nmodule.exports.AES = AES\n","var aes = require('./aes')\nvar Buffer = require('safe-buffer').Buffer\nvar Transform = require('cipher-base')\nvar inherits = require('inherits')\nvar GHASH = require('./ghash')\nvar xor = require('buffer-xor')\nvar incr32 = require('./incr32')\n\nfunction xorTest (a, b) {\n var out = 0\n if (a.length !== b.length) out++\n\n var len = Math.min(a.length, b.length)\n for (var i = 0; i < len; ++i) {\n out += (a[i] ^ b[i])\n }\n\n return out\n}\n\nfunction calcIv (self, iv, ck) {\n if (iv.length === 12) {\n self._finID = Buffer.concat([iv, Buffer.from([0, 0, 0, 1])])\n return Buffer.concat([iv, Buffer.from([0, 0, 0, 2])])\n }\n var ghash = new GHASH(ck)\n var len = iv.length\n var toPad = len % 16\n ghash.update(iv)\n if (toPad) {\n toPad = 16 - toPad\n ghash.update(Buffer.alloc(toPad, 0))\n }\n ghash.update(Buffer.alloc(8, 0))\n var ivBits = len * 8\n var tail = Buffer.alloc(8)\n tail.writeUIntBE(ivBits, 0, 8)\n ghash.update(tail)\n self._finID = ghash.state\n var out = Buffer.from(self._finID)\n incr32(out)\n return out\n}\nfunction StreamCipher (mode, key, iv, decrypt) {\n Transform.call(this)\n\n var h = Buffer.alloc(4, 0)\n\n this._cipher = new aes.AES(key)\n var ck = this._cipher.encryptBlock(h)\n this._ghash = new GHASH(ck)\n iv = calcIv(this, iv, ck)\n\n this._prev = Buffer.from(iv)\n this._cache = Buffer.allocUnsafe(0)\n this._secCache = Buffer.allocUnsafe(0)\n this._decrypt = decrypt\n this._alen = 0\n this._len = 0\n this._mode = mode\n\n this._authTag = null\n this._called = false\n}\n\ninherits(StreamCipher, Transform)\n\nStreamCipher.prototype._update = function (chunk) {\n if (!this._called && this._alen) {\n var rump = 16 - (this._alen % 16)\n if (rump < 16) {\n rump = Buffer.alloc(rump, 0)\n this._ghash.update(rump)\n }\n }\n\n this._called = true\n var out = this._mode.encrypt(this, chunk)\n if (this._decrypt) {\n this._ghash.update(chunk)\n } else {\n this._ghash.update(out)\n }\n this._len += chunk.length\n return out\n}\n\nStreamCipher.prototype._final = function () {\n if (this._decrypt && !this._authTag) throw new Error('Unsupported state or unable to authenticate data')\n\n var tag = xor(this._ghash.final(this._alen * 8, this._len * 8), this._cipher.encryptBlock(this._finID))\n if (this._decrypt && xorTest(tag, this._authTag)) throw new Error('Unsupported state or unable to authenticate data')\n\n this._authTag = tag\n this._cipher.scrub()\n}\n\nStreamCipher.prototype.getAuthTag = function getAuthTag () {\n if (this._decrypt || !Buffer.isBuffer(this._authTag)) throw new Error('Attempting to get auth tag in unsupported state')\n\n return this._authTag\n}\n\nStreamCipher.prototype.setAuthTag = function setAuthTag (tag) {\n if (!this._decrypt) throw new Error('Attempting to set auth tag in unsupported state')\n\n this._authTag = tag\n}\n\nStreamCipher.prototype.setAAD = function setAAD (buf) {\n if (this._called) throw new Error('Attempting to set AAD in unsupported state')\n\n this._ghash.update(buf)\n this._alen += buf.length\n}\n\nmodule.exports = StreamCipher\n","var ciphers = require('./encrypter')\nvar deciphers = require('./decrypter')\nvar modes = require('./modes/list.json')\n\nfunction getCiphers () {\n return Object.keys(modes)\n}\n\nexports.createCipher = exports.Cipher = ciphers.createCipher\nexports.createCipheriv = exports.Cipheriv = ciphers.createCipheriv\nexports.createDecipher = exports.Decipher = deciphers.createDecipher\nexports.createDecipheriv = exports.Decipheriv = deciphers.createDecipheriv\nexports.listCiphers = exports.getCiphers = getCiphers\n","var AuthCipher = require('./authCipher')\nvar Buffer = require('safe-buffer').Buffer\nvar MODES = require('./modes')\nvar StreamCipher = require('./streamCipher')\nvar Transform = require('cipher-base')\nvar aes = require('./aes')\nvar ebtk = require('evp_bytestokey')\nvar inherits = require('inherits')\n\nfunction Decipher (mode, key, iv) {\n Transform.call(this)\n\n this._cache = new Splitter()\n this._last = void 0\n this._cipher = new aes.AES(key)\n this._prev = Buffer.from(iv)\n this._mode = mode\n this._autopadding = true\n}\n\ninherits(Decipher, Transform)\n\nDecipher.prototype._update = function (data) {\n this._cache.add(data)\n var chunk\n var thing\n var out = []\n while ((chunk = this._cache.get(this._autopadding))) {\n thing = this._mode.decrypt(this, chunk)\n out.push(thing)\n }\n return Buffer.concat(out)\n}\n\nDecipher.prototype._final = function () {\n var chunk = this._cache.flush()\n if (this._autopadding) {\n return unpad(this._mode.decrypt(this, chunk))\n } else if (chunk) {\n throw new Error('data not multiple of block length')\n }\n}\n\nDecipher.prototype.setAutoPadding = function (setTo) {\n this._autopadding = !!setTo\n return this\n}\n\nfunction Splitter () {\n this.cache = Buffer.allocUnsafe(0)\n}\n\nSplitter.prototype.add = function (data) {\n this.cache = Buffer.concat([this.cache, data])\n}\n\nSplitter.prototype.get = function (autoPadding) {\n var out\n if (autoPadding) {\n if (this.cache.length > 16) {\n out = this.cache.slice(0, 16)\n this.cache = this.cache.slice(16)\n return out\n }\n } else {\n if (this.cache.length >= 16) {\n out = this.cache.slice(0, 16)\n this.cache = this.cache.slice(16)\n return out\n }\n }\n\n return null\n}\n\nSplitter.prototype.flush = function () {\n if (this.cache.length) return this.cache\n}\n\nfunction unpad (last) {\n var padded = last[15]\n if (padded < 1 || padded > 16) {\n throw new Error('unable to decrypt data')\n }\n var i = -1\n while (++i < padded) {\n if (last[(i + (16 - padded))] !== padded) {\n throw new Error('unable to decrypt data')\n }\n }\n if (padded === 16) return\n\n return last.slice(0, 16 - padded)\n}\n\nfunction createDecipheriv (suite, password, iv) {\n var config = MODES[suite.toLowerCase()]\n if (!config) throw new TypeError('invalid suite type')\n\n if (typeof iv === 'string') iv = Buffer.from(iv)\n if (config.mode !== 'GCM' && iv.length !== config.iv) throw new TypeError('invalid iv length ' + iv.length)\n\n if (typeof password === 'string') password = Buffer.from(password)\n if (password.length !== config.key / 8) throw new TypeError('invalid key length ' + password.length)\n\n if (config.type === 'stream') {\n return new StreamCipher(config.module, password, iv, true)\n } else if (config.type === 'auth') {\n return new AuthCipher(config.module, password, iv, true)\n }\n\n return new Decipher(config.module, password, iv)\n}\n\nfunction createDecipher (suite, password) {\n var config = MODES[suite.toLowerCase()]\n if (!config) throw new TypeError('invalid suite type')\n\n var keys = ebtk(password, false, config.key, config.iv)\n return createDecipheriv(suite, keys.key, keys.iv)\n}\n\nexports.createDecipher = createDecipher\nexports.createDecipheriv = createDecipheriv\n","var MODES = require('./modes')\nvar AuthCipher = require('./authCipher')\nvar Buffer = require('safe-buffer').Buffer\nvar StreamCipher = require('./streamCipher')\nvar Transform = require('cipher-base')\nvar aes = require('./aes')\nvar ebtk = require('evp_bytestokey')\nvar inherits = require('inherits')\n\nfunction Cipher (mode, key, iv) {\n Transform.call(this)\n\n this._cache = new Splitter()\n this._cipher = new aes.AES(key)\n this._prev = Buffer.from(iv)\n this._mode = mode\n this._autopadding = true\n}\n\ninherits(Cipher, Transform)\n\nCipher.prototype._update = function (data) {\n this._cache.add(data)\n var chunk\n var thing\n var out = []\n\n while ((chunk = this._cache.get())) {\n thing = this._mode.encrypt(this, chunk)\n out.push(thing)\n }\n\n return Buffer.concat(out)\n}\n\nvar PADDING = Buffer.alloc(16, 0x10)\n\nCipher.prototype._final = function () {\n var chunk = this._cache.flush()\n if (this._autopadding) {\n chunk = this._mode.encrypt(this, chunk)\n this._cipher.scrub()\n return chunk\n }\n\n if (!chunk.equals(PADDING)) {\n this._cipher.scrub()\n throw new Error('data not multiple of block length')\n }\n}\n\nCipher.prototype.setAutoPadding = function (setTo) {\n this._autopadding = !!setTo\n return this\n}\n\nfunction Splitter () {\n this.cache = Buffer.allocUnsafe(0)\n}\n\nSplitter.prototype.add = function (data) {\n this.cache = Buffer.concat([this.cache, data])\n}\n\nSplitter.prototype.get = function () {\n if (this.cache.length > 15) {\n var out = this.cache.slice(0, 16)\n this.cache = this.cache.slice(16)\n return out\n }\n return null\n}\n\nSplitter.prototype.flush = function () {\n var len = 16 - this.cache.length\n var padBuff = Buffer.allocUnsafe(len)\n\n var i = -1\n while (++i < len) {\n padBuff.writeUInt8(len, i)\n }\n\n return Buffer.concat([this.cache, padBuff])\n}\n\nfunction createCipheriv (suite, password, iv) {\n var config = MODES[suite.toLowerCase()]\n if (!config) throw new TypeError('invalid suite type')\n\n if (typeof password === 'string') password = Buffer.from(password)\n if (password.length !== config.key / 8) throw new TypeError('invalid key length ' + password.length)\n\n if (typeof iv === 'string') iv = Buffer.from(iv)\n if (config.mode !== 'GCM' && iv.length !== config.iv) throw new TypeError('invalid iv length ' + iv.length)\n\n if (config.type === 'stream') {\n return new StreamCipher(config.module, password, iv)\n } else if (config.type === 'auth') {\n return new AuthCipher(config.module, password, iv)\n }\n\n return new Cipher(config.module, password, iv)\n}\n\nfunction createCipher (suite, password) {\n var config = MODES[suite.toLowerCase()]\n if (!config) throw new TypeError('invalid suite type')\n\n var keys = ebtk(password, false, config.key, config.iv)\n return createCipheriv(suite, keys.key, keys.iv)\n}\n\nexports.createCipheriv = createCipheriv\nexports.createCipher = createCipher\n","var Buffer = require('safe-buffer').Buffer\nvar ZEROES = Buffer.alloc(16, 0)\n\nfunction toArray (buf) {\n return [\n buf.readUInt32BE(0),\n buf.readUInt32BE(4),\n buf.readUInt32BE(8),\n buf.readUInt32BE(12)\n ]\n}\n\nfunction fromArray (out) {\n var buf = Buffer.allocUnsafe(16)\n buf.writeUInt32BE(out[0] >>> 0, 0)\n buf.writeUInt32BE(out[1] >>> 0, 4)\n buf.writeUInt32BE(out[2] >>> 0, 8)\n buf.writeUInt32BE(out[3] >>> 0, 12)\n return buf\n}\n\nfunction GHASH (key) {\n this.h = key\n this.state = Buffer.alloc(16, 0)\n this.cache = Buffer.allocUnsafe(0)\n}\n\n// from http://bitwiseshiftleft.github.io/sjcl/doc/symbols/src/core_gcm.js.html\n// by Juho Vähä-Herttua\nGHASH.prototype.ghash = function (block) {\n var i = -1\n while (++i < block.length) {\n this.state[i] ^= block[i]\n }\n this._multiply()\n}\n\nGHASH.prototype._multiply = function () {\n var Vi = toArray(this.h)\n var Zi = [0, 0, 0, 0]\n var j, xi, lsbVi\n var i = -1\n while (++i < 128) {\n xi = (this.state[~~(i / 8)] & (1 << (7 - (i % 8)))) !== 0\n if (xi) {\n // Z_i+1 = Z_i ^ V_i\n Zi[0] ^= Vi[0]\n Zi[1] ^= Vi[1]\n Zi[2] ^= Vi[2]\n Zi[3] ^= Vi[3]\n }\n\n // Store the value of LSB(V_i)\n lsbVi = (Vi[3] & 1) !== 0\n\n // V_i+1 = V_i >> 1\n for (j = 3; j > 0; j--) {\n Vi[j] = (Vi[j] >>> 1) | ((Vi[j - 1] & 1) << 31)\n }\n Vi[0] = Vi[0] >>> 1\n\n // If LSB(V_i) is 1, V_i+1 = (V_i >> 1) ^ R\n if (lsbVi) {\n Vi[0] = Vi[0] ^ (0xe1 << 24)\n }\n }\n this.state = fromArray(Zi)\n}\n\nGHASH.prototype.update = function (buf) {\n this.cache = Buffer.concat([this.cache, buf])\n var chunk\n while (this.cache.length >= 16) {\n chunk = this.cache.slice(0, 16)\n this.cache = this.cache.slice(16)\n this.ghash(chunk)\n }\n}\n\nGHASH.prototype.final = function (abl, bl) {\n if (this.cache.length) {\n this.ghash(Buffer.concat([this.cache, ZEROES], 16))\n }\n\n this.ghash(fromArray([0, abl, 0, bl]))\n return this.state\n}\n\nmodule.exports = GHASH\n","function incr32 (iv) {\n var len = iv.length\n var item\n while (len--) {\n item = iv.readUInt8(len)\n if (item === 255) {\n iv.writeUInt8(0, len)\n } else {\n item++\n iv.writeUInt8(item, len)\n break\n }\n }\n}\nmodule.exports = incr32\n","var xor = require('buffer-xor')\n\nexports.encrypt = function (self, block) {\n var data = xor(block, self._prev)\n\n self._prev = self._cipher.encryptBlock(data)\n return self._prev\n}\n\nexports.decrypt = function (self, block) {\n var pad = self._prev\n\n self._prev = block\n var out = self._cipher.decryptBlock(block)\n\n return xor(out, pad)\n}\n","var Buffer = require('safe-buffer').Buffer\nvar xor = require('buffer-xor')\n\nfunction encryptStart (self, data, decrypt) {\n var len = data.length\n var out = xor(data, self._cache)\n self._cache = self._cache.slice(len)\n self._prev = Buffer.concat([self._prev, decrypt ? data : out])\n return out\n}\n\nexports.encrypt = function (self, data, decrypt) {\n var out = Buffer.allocUnsafe(0)\n var len\n\n while (data.length) {\n if (self._cache.length === 0) {\n self._cache = self._cipher.encryptBlock(self._prev)\n self._prev = Buffer.allocUnsafe(0)\n }\n\n if (self._cache.length <= data.length) {\n len = self._cache.length\n out = Buffer.concat([out, encryptStart(self, data.slice(0, len), decrypt)])\n data = data.slice(len)\n } else {\n out = Buffer.concat([out, encryptStart(self, data, decrypt)])\n break\n }\n }\n\n return out\n}\n","var Buffer = require('safe-buffer').Buffer\n\nfunction encryptByte (self, byteParam, decrypt) {\n var pad\n var i = -1\n var len = 8\n var out = 0\n var bit, value\n while (++i < len) {\n pad = self._cipher.encryptBlock(self._prev)\n bit = (byteParam & (1 << (7 - i))) ? 0x80 : 0\n value = pad[0] ^ bit\n out += ((value & 0x80) >> (i % 8))\n self._prev = shiftIn(self._prev, decrypt ? bit : value)\n }\n return out\n}\n\nfunction shiftIn (buffer, value) {\n var len = buffer.length\n var i = -1\n var out = Buffer.allocUnsafe(buffer.length)\n buffer = Buffer.concat([buffer, Buffer.from([value])])\n\n while (++i < len) {\n out[i] = buffer[i] << 1 | buffer[i + 1] >> (7)\n }\n\n return out\n}\n\nexports.encrypt = function (self, chunk, decrypt) {\n var len = chunk.length\n var out = Buffer.allocUnsafe(len)\n var i = -1\n\n while (++i < len) {\n out[i] = encryptByte(self, chunk[i], decrypt)\n }\n\n return out\n}\n","var Buffer = require('safe-buffer').Buffer\n\nfunction encryptByte (self, byteParam, decrypt) {\n var pad = self._cipher.encryptBlock(self._prev)\n var out = pad[0] ^ byteParam\n\n self._prev = Buffer.concat([\n self._prev.slice(1),\n Buffer.from([decrypt ? byteParam : out])\n ])\n\n return out\n}\n\nexports.encrypt = function (self, chunk, decrypt) {\n var len = chunk.length\n var out = Buffer.allocUnsafe(len)\n var i = -1\n\n while (++i < len) {\n out[i] = encryptByte(self, chunk[i], decrypt)\n }\n\n return out\n}\n","var xor = require('buffer-xor')\nvar Buffer = require('safe-buffer').Buffer\nvar incr32 = require('../incr32')\n\nfunction getBlock (self) {\n var out = self._cipher.encryptBlockRaw(self._prev)\n incr32(self._prev)\n return out\n}\n\nvar blockSize = 16\nexports.encrypt = function (self, chunk) {\n var chunkNum = Math.ceil(chunk.length / blockSize)\n var start = self._cache.length\n self._cache = Buffer.concat([\n self._cache,\n Buffer.allocUnsafe(chunkNum * blockSize)\n ])\n for (var i = 0; i < chunkNum; i++) {\n var out = getBlock(self)\n var offset = start + i * blockSize\n self._cache.writeUInt32BE(out[0], offset + 0)\n self._cache.writeUInt32BE(out[1], offset + 4)\n self._cache.writeUInt32BE(out[2], offset + 8)\n self._cache.writeUInt32BE(out[3], offset + 12)\n }\n var pad = self._cache.slice(0, chunk.length)\n self._cache = self._cache.slice(chunk.length)\n return xor(chunk, pad)\n}\n","exports.encrypt = function (self, block) {\n return self._cipher.encryptBlock(block)\n}\n\nexports.decrypt = function (self, block) {\n return self._cipher.decryptBlock(block)\n}\n","var modeModules = {\n ECB: require('./ecb'),\n CBC: require('./cbc'),\n CFB: require('./cfb'),\n CFB8: require('./cfb8'),\n CFB1: require('./cfb1'),\n OFB: require('./ofb'),\n CTR: require('./ctr'),\n GCM: require('./ctr')\n}\n\nvar modes = require('./list.json')\n\nfor (var key in modes) {\n modes[key].module = modeModules[modes[key].mode]\n}\n\nmodule.exports = modes\n","var xor = require('buffer-xor')\n\nfunction getBlock (self) {\n self._prev = self._cipher.encryptBlock(self._prev)\n return self._prev\n}\n\nexports.encrypt = function (self, chunk) {\n while (self._cache.length < chunk.length) {\n self._cache = Buffer.concat([self._cache, getBlock(self)])\n }\n\n var pad = self._cache.slice(0, chunk.length)\n self._cache = self._cache.slice(chunk.length)\n return xor(chunk, pad)\n}\n","var aes = require('./aes')\nvar Buffer = require('safe-buffer').Buffer\nvar Transform = require('cipher-base')\nvar inherits = require('inherits')\n\nfunction StreamCipher (mode, key, iv, decrypt) {\n Transform.call(this)\n\n this._cipher = new aes.AES(key)\n this._prev = Buffer.from(iv)\n this._cache = Buffer.allocUnsafe(0)\n this._secCache = Buffer.allocUnsafe(0)\n this._decrypt = decrypt\n this._mode = mode\n}\n\ninherits(StreamCipher, Transform)\n\nStreamCipher.prototype._update = function (chunk) {\n return this._mode.encrypt(this, chunk, this._decrypt)\n}\n\nStreamCipher.prototype._final = function () {\n this._cipher.scrub()\n}\n\nmodule.exports = StreamCipher\n","var DES = require('browserify-des')\nvar aes = require('browserify-aes/browser')\nvar aesModes = require('browserify-aes/modes')\nvar desModes = require('browserify-des/modes')\nvar ebtk = require('evp_bytestokey')\n\nfunction createCipher (suite, password) {\n suite = suite.toLowerCase()\n\n var keyLen, ivLen\n if (aesModes[suite]) {\n keyLen = aesModes[suite].key\n ivLen = aesModes[suite].iv\n } else if (desModes[suite]) {\n keyLen = desModes[suite].key * 8\n ivLen = desModes[suite].iv\n } else {\n throw new TypeError('invalid suite type')\n }\n\n var keys = ebtk(password, false, keyLen, ivLen)\n return createCipheriv(suite, keys.key, keys.iv)\n}\n\nfunction createDecipher (suite, password) {\n suite = suite.toLowerCase()\n\n var keyLen, ivLen\n if (aesModes[suite]) {\n keyLen = aesModes[suite].key\n ivLen = aesModes[suite].iv\n } else if (desModes[suite]) {\n keyLen = desModes[suite].key * 8\n ivLen = desModes[suite].iv\n } else {\n throw new TypeError('invalid suite type')\n }\n\n var keys = ebtk(password, false, keyLen, ivLen)\n return createDecipheriv(suite, keys.key, keys.iv)\n}\n\nfunction createCipheriv (suite, key, iv) {\n suite = suite.toLowerCase()\n if (aesModes[suite]) return aes.createCipheriv(suite, key, iv)\n if (desModes[suite]) return new DES({ key: key, iv: iv, mode: suite })\n\n throw new TypeError('invalid suite type')\n}\n\nfunction createDecipheriv (suite, key, iv) {\n suite = suite.toLowerCase()\n if (aesModes[suite]) return aes.createDecipheriv(suite, key, iv)\n if (desModes[suite]) return new DES({ key: key, iv: iv, mode: suite, decrypt: true })\n\n throw new TypeError('invalid suite type')\n}\n\nfunction getCiphers () {\n return Object.keys(desModes).concat(aes.getCiphers())\n}\n\nexports.createCipher = exports.Cipher = createCipher\nexports.createCipheriv = exports.Cipheriv = createCipheriv\nexports.createDecipher = exports.Decipher = createDecipher\nexports.createDecipheriv = exports.Decipheriv = createDecipheriv\nexports.listCiphers = exports.getCiphers = getCiphers\n","var CipherBase = require('cipher-base')\nvar des = require('des.js')\nvar inherits = require('inherits')\nvar Buffer = require('safe-buffer').Buffer\n\nvar modes = {\n 'des-ede3-cbc': des.CBC.instantiate(des.EDE),\n 'des-ede3': des.EDE,\n 'des-ede-cbc': des.CBC.instantiate(des.EDE),\n 'des-ede': des.EDE,\n 'des-cbc': des.CBC.instantiate(des.DES),\n 'des-ecb': des.DES\n}\nmodes.des = modes['des-cbc']\nmodes.des3 = modes['des-ede3-cbc']\nmodule.exports = DES\ninherits(DES, CipherBase)\nfunction DES (opts) {\n CipherBase.call(this)\n var modeName = opts.mode.toLowerCase()\n var mode = modes[modeName]\n var type\n if (opts.decrypt) {\n type = 'decrypt'\n } else {\n type = 'encrypt'\n }\n var key = opts.key\n if (!Buffer.isBuffer(key)) {\n key = Buffer.from(key)\n }\n if (modeName === 'des-ede' || modeName === 'des-ede-cbc') {\n key = Buffer.concat([key, key.slice(0, 8)])\n }\n var iv = opts.iv\n if (!Buffer.isBuffer(iv)) {\n iv = Buffer.from(iv)\n }\n this._des = mode.create({\n key: key,\n iv: iv,\n type: type\n })\n}\nDES.prototype._update = function (data) {\n return Buffer.from(this._des.update(data))\n}\nDES.prototype._final = function () {\n return Buffer.from(this._des.final())\n}\n","exports['des-ecb'] = {\n key: 8,\n iv: 0\n}\nexports['des-cbc'] = exports.des = {\n key: 8,\n iv: 8\n}\nexports['des-ede3-cbc'] = exports.des3 = {\n key: 24,\n iv: 8\n}\nexports['des-ede3'] = {\n key: 24,\n iv: 0\n}\nexports['des-ede-cbc'] = {\n key: 16,\n iv: 8\n}\nexports['des-ede'] = {\n key: 16,\n iv: 0\n}\n","var BN = require('bn.js')\nvar randomBytes = require('randombytes')\n\nfunction blind (priv) {\n var r = getr(priv)\n var blinder = r.toRed(BN.mont(priv.modulus)).redPow(new BN(priv.publicExponent)).fromRed()\n return { blinder: blinder, unblinder: r.invm(priv.modulus) }\n}\n\nfunction getr (priv) {\n var len = priv.modulus.byteLength()\n var r\n do {\n r = new BN(randomBytes(len))\n } while (r.cmp(priv.modulus) >= 0 || !r.umod(priv.prime1) || !r.umod(priv.prime2))\n return r\n}\n\nfunction crt (msg, priv) {\n var blinds = blind(priv)\n var len = priv.modulus.byteLength()\n var blinded = new BN(msg).mul(blinds.blinder).umod(priv.modulus)\n var c1 = blinded.toRed(BN.mont(priv.prime1))\n var c2 = blinded.toRed(BN.mont(priv.prime2))\n var qinv = priv.coefficient\n var p = priv.prime1\n var q = priv.prime2\n var m1 = c1.redPow(priv.exponent1).fromRed()\n var m2 = c2.redPow(priv.exponent2).fromRed()\n var h = m1.isub(m2).imul(qinv).umod(p).imul(q)\n return m2.iadd(h).imul(blinds.unblinder).umod(priv.modulus).toArrayLike(Buffer, 'be', len)\n}\ncrt.getr = getr\n\nmodule.exports = crt\n","'use strict';\n\nmodule.exports = require('./browser/algorithms.json');\n","'use strict';\n\nvar Buffer = require('safe-buffer').Buffer;\nvar createHash = require('create-hash');\nvar stream = require('readable-stream');\nvar inherits = require('inherits');\nvar sign = require('./sign');\nvar verify = require('./verify');\n\nvar algorithms = require('./algorithms.json');\nObject.keys(algorithms).forEach(function (key) {\n algorithms[key].id = Buffer.from(algorithms[key].id, 'hex');\n algorithms[key.toLowerCase()] = algorithms[key];\n});\n\nfunction Sign(algorithm) {\n stream.Writable.call(this);\n\n var data = algorithms[algorithm];\n if (!data) { throw new Error('Unknown message digest'); }\n\n this._hashType = data.hash;\n this._hash = createHash(data.hash);\n this._tag = data.id;\n this._signType = data.sign;\n}\ninherits(Sign, stream.Writable);\n\nSign.prototype._write = function _write(data, _, done) {\n this._hash.update(data);\n done();\n};\n\nSign.prototype.update = function update(data, enc) {\n this._hash.update(typeof data === 'string' ? Buffer.from(data, enc) : data);\n\n return this;\n};\n\nSign.prototype.sign = function signMethod(key, enc) {\n this.end();\n var hash = this._hash.digest();\n var sig = sign(hash, key, this._hashType, this._signType, this._tag);\n\n return enc ? sig.toString(enc) : sig;\n};\n\nfunction Verify(algorithm) {\n stream.Writable.call(this);\n\n var data = algorithms[algorithm];\n if (!data) { throw new Error('Unknown message digest'); }\n\n this._hash = createHash(data.hash);\n this._tag = data.id;\n this._signType = data.sign;\n}\ninherits(Verify, stream.Writable);\n\nVerify.prototype._write = function _write(data, _, done) {\n this._hash.update(data);\n done();\n};\n\nVerify.prototype.update = function update(data, enc) {\n this._hash.update(typeof data === 'string' ? Buffer.from(data, enc) : data);\n\n return this;\n};\n\nVerify.prototype.verify = function verifyMethod(key, sig, enc) {\n var sigBuffer = typeof sig === 'string' ? Buffer.from(sig, enc) : sig;\n\n this.end();\n var hash = this._hash.digest();\n return verify(sigBuffer, hash, key, this._signType, this._tag);\n};\n\nfunction createSign(algorithm) {\n return new Sign(algorithm);\n}\n\nfunction createVerify(algorithm) {\n return new Verify(algorithm);\n}\n\nmodule.exports = {\n Sign: createSign,\n Verify: createVerify,\n createSign: createSign,\n createVerify: createVerify\n};\n","'use strict';\n\n// much of this based on https://github.com/indutny/self-signed/blob/gh-pages/lib/rsa.js\nvar Buffer = require('safe-buffer').Buffer;\nvar createHmac = require('create-hmac');\nvar crt = require('browserify-rsa');\nvar EC = require('elliptic').ec;\nvar BN = require('bn.js');\nvar parseKeys = require('parse-asn1');\nvar curves = require('./curves.json');\n\nvar RSA_PKCS1_PADDING = 1;\n\nfunction sign(hash, key, hashType, signType, tag) {\n var priv = parseKeys(key);\n if (priv.curve) {\n // rsa keys can be interpreted as ecdsa ones in openssl\n if (signType !== 'ecdsa' && signType !== 'ecdsa/rsa') { throw new Error('wrong private key type'); }\n return ecSign(hash, priv);\n } else if (priv.type === 'dsa') {\n if (signType !== 'dsa') { throw new Error('wrong private key type'); }\n return dsaSign(hash, priv, hashType);\n }\n if (signType !== 'rsa' && signType !== 'ecdsa/rsa') { throw new Error('wrong private key type'); }\n if (key.padding !== undefined && key.padding !== RSA_PKCS1_PADDING) { throw new Error('illegal or unsupported padding mode'); }\n\n hash = Buffer.concat([tag, hash]);\n var len = priv.modulus.byteLength();\n var pad = [0, 1];\n while (hash.length + pad.length + 1 < len) { pad.push(0xff); }\n pad.push(0x00);\n var i = -1;\n while (++i < hash.length) { pad.push(hash[i]); }\n\n var out = crt(pad, priv);\n return out;\n}\n\nfunction ecSign(hash, priv) {\n var curveId = curves[priv.curve.join('.')];\n if (!curveId) { throw new Error('unknown curve ' + priv.curve.join('.')); }\n\n var curve = new EC(curveId);\n var key = curve.keyFromPrivate(priv.privateKey);\n var out = key.sign(hash);\n\n return Buffer.from(out.toDER());\n}\n\nfunction dsaSign(hash, priv, algo) {\n var x = priv.params.priv_key;\n var p = priv.params.p;\n var q = priv.params.q;\n var g = priv.params.g;\n var r = new BN(0);\n var k;\n var H = bits2int(hash, q).mod(q);\n var s = false;\n var kv = getKey(x, q, hash, algo);\n while (s === false) {\n k = makeKey(q, kv, algo);\n r = makeR(g, k, p, q);\n s = k.invm(q).imul(H.add(x.mul(r))).mod(q);\n if (s.cmpn(0) === 0) {\n s = false;\n r = new BN(0);\n }\n }\n return toDER(r, s);\n}\n\nfunction toDER(r, s) {\n r = r.toArray();\n s = s.toArray();\n\n // Pad values\n if (r[0] & 0x80) { r = [0].concat(r); }\n if (s[0] & 0x80) { s = [0].concat(s); }\n\n var total = r.length + s.length + 4;\n var res = [\n 0x30, total, 0x02, r.length\n ];\n res = res.concat(r, [0x02, s.length], s);\n return Buffer.from(res);\n}\n\nfunction getKey(x, q, hash, algo) {\n x = Buffer.from(x.toArray());\n if (x.length < q.byteLength()) {\n var zeros = Buffer.alloc(q.byteLength() - x.length);\n x = Buffer.concat([zeros, x]);\n }\n var hlen = hash.length;\n var hbits = bits2octets(hash, q);\n var v = Buffer.alloc(hlen);\n v.fill(1);\n var k = Buffer.alloc(hlen);\n k = createHmac(algo, k).update(v).update(Buffer.from([0])).update(x).update(hbits).digest();\n v = createHmac(algo, k).update(v).digest();\n k = createHmac(algo, k).update(v).update(Buffer.from([1])).update(x).update(hbits).digest();\n v = createHmac(algo, k).update(v).digest();\n return { k: k, v: v };\n}\n\nfunction bits2int(obits, q) {\n var bits = new BN(obits);\n var shift = (obits.length << 3) - q.bitLength();\n if (shift > 0) { bits.ishrn(shift); }\n return bits;\n}\n\nfunction bits2octets(bits, q) {\n bits = bits2int(bits, q);\n bits = bits.mod(q);\n var out = Buffer.from(bits.toArray());\n if (out.length < q.byteLength()) {\n var zeros = Buffer.alloc(q.byteLength() - out.length);\n out = Buffer.concat([zeros, out]);\n }\n return out;\n}\n\nfunction makeKey(q, kv, algo) {\n var t;\n var k;\n\n do {\n t = Buffer.alloc(0);\n\n while (t.length * 8 < q.bitLength()) {\n kv.v = createHmac(algo, kv.k).update(kv.v).digest();\n t = Buffer.concat([t, kv.v]);\n }\n\n k = bits2int(t, q);\n kv.k = createHmac(algo, kv.k).update(kv.v).update(Buffer.from([0])).digest();\n kv.v = createHmac(algo, kv.k).update(kv.v).digest();\n } while (k.cmp(q) !== -1);\n\n return k;\n}\n\nfunction makeR(g, k, p, q) {\n return g.toRed(BN.mont(p)).redPow(k).fromRed().mod(q);\n}\n\nmodule.exports = sign;\nmodule.exports.getKey = getKey;\nmodule.exports.makeKey = makeKey;\n","'use strict';\n\n// much of this based on https://github.com/indutny/self-signed/blob/gh-pages/lib/rsa.js\nvar Buffer = require('safe-buffer').Buffer;\nvar BN = require('bn.js');\nvar EC = require('elliptic').ec;\nvar parseKeys = require('parse-asn1');\nvar curves = require('./curves.json');\n\nfunction verify(sig, hash, key, signType, tag) {\n var pub = parseKeys(key);\n if (pub.type === 'ec') {\n // rsa keys can be interpreted as ecdsa ones in openssl\n if (signType !== 'ecdsa' && signType !== 'ecdsa/rsa') { throw new Error('wrong public key type'); }\n return ecVerify(sig, hash, pub);\n } else if (pub.type === 'dsa') {\n if (signType !== 'dsa') { throw new Error('wrong public key type'); }\n return dsaVerify(sig, hash, pub);\n }\n if (signType !== 'rsa' && signType !== 'ecdsa/rsa') { throw new Error('wrong public key type'); }\n\n hash = Buffer.concat([tag, hash]);\n var len = pub.modulus.byteLength();\n var pad = [1];\n var padNum = 0;\n while (hash.length + pad.length + 2 < len) {\n pad.push(0xff);\n padNum += 1;\n }\n pad.push(0x00);\n var i = -1;\n while (++i < hash.length) {\n pad.push(hash[i]);\n }\n pad = Buffer.from(pad);\n var red = BN.mont(pub.modulus);\n sig = new BN(sig).toRed(red);\n\n sig = sig.redPow(new BN(pub.publicExponent));\n sig = Buffer.from(sig.fromRed().toArray());\n var out = padNum < 8 ? 1 : 0;\n len = Math.min(sig.length, pad.length);\n if (sig.length !== pad.length) { out = 1; }\n\n i = -1;\n while (++i < len) { out |= sig[i] ^ pad[i]; }\n return out === 0;\n}\n\nfunction ecVerify(sig, hash, pub) {\n var curveId = curves[pub.data.algorithm.curve.join('.')];\n if (!curveId) { throw new Error('unknown curve ' + pub.data.algorithm.curve.join('.')); }\n\n var curve = new EC(curveId);\n var pubkey = pub.data.subjectPrivateKey.data;\n\n return curve.verify(hash, sig, pubkey);\n}\n\nfunction dsaVerify(sig, hash, pub) {\n var p = pub.data.p;\n var q = pub.data.q;\n var g = pub.data.g;\n var y = pub.data.pub_key;\n var unpacked = parseKeys.signature.decode(sig, 'der');\n var s = unpacked.s;\n var r = unpacked.r;\n checkValue(s, q);\n checkValue(r, q);\n var montp = BN.mont(p);\n var w = s.invm(q);\n var v = g.toRed(montp)\n .redPow(new BN(hash).mul(w).mod(q))\n .fromRed()\n .mul(y.toRed(montp).redPow(r.mul(w).mod(q)).fromRed())\n .mod(p)\n .mod(q);\n return v.cmp(r) === 0;\n}\n\nfunction checkValue(b, q) {\n if (b.cmpn(0) <= 0) { throw new Error('invalid sig'); }\n if (b.cmp(q) >= 0) { throw new Error('invalid sig'); }\n}\n\nmodule.exports = verify;\n","if (typeof Object.create === 'function') {\n // implementation from standard node.js 'util' module\n module.exports = function inherits(ctor, superCtor) {\n if (superCtor) {\n ctor.super_ = superCtor\n ctor.prototype = Object.create(superCtor.prototype, {\n constructor: {\n value: ctor,\n enumerable: false,\n writable: true,\n configurable: true\n }\n })\n }\n };\n} else {\n // old school shim for old browsers\n module.exports = function inherits(ctor, superCtor) {\n if (superCtor) {\n ctor.super_ = superCtor\n var TempCtor = function () {}\n TempCtor.prototype = superCtor.prototype\n ctor.prototype = new TempCtor()\n ctor.prototype.constructor = ctor\n }\n }\n}\n","/*! safe-buffer. MIT License. Feross Aboukhadijeh */\n/* eslint-disable node/no-deprecated-api */\nvar buffer = require('buffer')\nvar Buffer = buffer.Buffer\n\n// alternative to using Object.keys for old browsers\nfunction copyProps (src, dst) {\n for (var key in src) {\n dst[key] = src[key]\n }\n}\nif (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) {\n module.exports = buffer\n} else {\n // Copy properties from require('buffer')\n copyProps(buffer, exports)\n exports.Buffer = SafeBuffer\n}\n\nfunction SafeBuffer (arg, encodingOrOffset, length) {\n return Buffer(arg, encodingOrOffset, length)\n}\n\nSafeBuffer.prototype = Object.create(Buffer.prototype)\n\n// Copy static methods from Buffer\ncopyProps(Buffer, SafeBuffer)\n\nSafeBuffer.from = function (arg, encodingOrOffset, length) {\n if (typeof arg === 'number') {\n throw new TypeError('Argument must not be a number')\n }\n return Buffer(arg, encodingOrOffset, length)\n}\n\nSafeBuffer.alloc = function (size, fill, encoding) {\n if (typeof size !== 'number') {\n throw new TypeError('Argument must be a number')\n }\n var buf = Buffer(size)\n if (fill !== undefined) {\n if (typeof encoding === 'string') {\n buf.fill(fill, encoding)\n } else {\n buf.fill(fill)\n }\n } else {\n buf.fill(0)\n }\n return buf\n}\n\nSafeBuffer.allocUnsafe = function (size) {\n if (typeof size !== 'number') {\n throw new TypeError('Argument must be a number')\n }\n return Buffer(size)\n}\n\nSafeBuffer.allocUnsafeSlow = function (size) {\n if (typeof size !== 'number') {\n throw new TypeError('Argument must be a number')\n }\n return buffer.SlowBuffer(size)\n}\n","module.exports = function xor (a, b) {\n var length = Math.min(a.length, b.length)\n var buffer = new Buffer(length)\n\n for (var i = 0; i < length; ++i) {\n buffer[i] = a[i] ^ b[i]\n }\n\n return buffer\n}\n","/*!\n * The buffer module from node.js, for the browser.\n *\n * @author Feross Aboukhadijeh \n * @license MIT\n */\n/* eslint-disable no-proto */\n\n'use strict'\n\nconst base64 = require('base64-js')\nconst ieee754 = require('ieee754')\nconst customInspectSymbol =\n (typeof Symbol === 'function' && typeof Symbol['for'] === 'function') // eslint-disable-line dot-notation\n ? Symbol['for']('nodejs.util.inspect.custom') // eslint-disable-line dot-notation\n : null\n\nexports.Buffer = Buffer\nexports.SlowBuffer = SlowBuffer\nexports.INSPECT_MAX_BYTES = 50\n\nconst K_MAX_LENGTH = 0x7fffffff\nexports.kMaxLength = K_MAX_LENGTH\n\n/**\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\n * === true Use Uint8Array implementation (fastest)\n * === false Print warning and recommend using `buffer` v4.x which has an Object\n * implementation (most compatible, even IE6)\n *\n * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\n * Opera 11.6+, iOS 4.2+.\n *\n * We report that the browser does not support typed arrays if the are not subclassable\n * using __proto__. Firefox 4-29 lacks support for adding new properties to `Uint8Array`\n * (See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438). IE 10 lacks support\n * for __proto__ and has a buggy typed array implementation.\n */\nBuffer.TYPED_ARRAY_SUPPORT = typedArraySupport()\n\nif (!Buffer.TYPED_ARRAY_SUPPORT && typeof console !== 'undefined' &&\n typeof console.error === 'function') {\n console.error(\n 'This browser lacks typed array (Uint8Array) support which is required by ' +\n '`buffer` v5.x. Use `buffer` v4.x if you require old browser support.'\n )\n}\n\nfunction typedArraySupport () {\n // Can typed array instances can be augmented?\n try {\n const arr = new Uint8Array(1)\n const proto = { foo: function () { return 42 } }\n Object.setPrototypeOf(proto, Uint8Array.prototype)\n Object.setPrototypeOf(arr, proto)\n return arr.foo() === 42\n } catch (e) {\n return false\n }\n}\n\nObject.defineProperty(Buffer.prototype, 'parent', {\n enumerable: true,\n get: function () {\n if (!Buffer.isBuffer(this)) return undefined\n return this.buffer\n }\n})\n\nObject.defineProperty(Buffer.prototype, 'offset', {\n enumerable: true,\n get: function () {\n if (!Buffer.isBuffer(this)) return undefined\n return this.byteOffset\n }\n})\n\nfunction createBuffer (length) {\n if (length > K_MAX_LENGTH) {\n throw new RangeError('The value \"' + length + '\" is invalid for option \"size\"')\n }\n // Return an augmented `Uint8Array` instance\n const buf = new Uint8Array(length)\n Object.setPrototypeOf(buf, Buffer.prototype)\n return buf\n}\n\n/**\n * The Buffer constructor returns instances of `Uint8Array` that have their\n * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of\n * `Uint8Array`, so the returned instances will have all the node `Buffer` methods\n * and the `Uint8Array` methods. Square bracket notation works as expected -- it\n * returns a single octet.\n *\n * The `Uint8Array` prototype remains unmodified.\n */\n\nfunction Buffer (arg, encodingOrOffset, length) {\n // Common case.\n if (typeof arg === 'number') {\n if (typeof encodingOrOffset === 'string') {\n throw new TypeError(\n 'The \"string\" argument must be of type string. Received type number'\n )\n }\n return allocUnsafe(arg)\n }\n return from(arg, encodingOrOffset, length)\n}\n\nBuffer.poolSize = 8192 // not used by this implementation\n\nfunction from (value, encodingOrOffset, length) {\n if (typeof value === 'string') {\n return fromString(value, encodingOrOffset)\n }\n\n if (ArrayBuffer.isView(value)) {\n return fromArrayView(value)\n }\n\n if (value == null) {\n throw new TypeError(\n 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n 'or Array-like Object. Received type ' + (typeof value)\n )\n }\n\n if (isInstance(value, ArrayBuffer) ||\n (value && isInstance(value.buffer, ArrayBuffer))) {\n return fromArrayBuffer(value, encodingOrOffset, length)\n }\n\n if (typeof SharedArrayBuffer !== 'undefined' &&\n (isInstance(value, SharedArrayBuffer) ||\n (value && isInstance(value.buffer, SharedArrayBuffer)))) {\n return fromArrayBuffer(value, encodingOrOffset, length)\n }\n\n if (typeof value === 'number') {\n throw new TypeError(\n 'The \"value\" argument must not be of type number. Received type number'\n )\n }\n\n const valueOf = value.valueOf && value.valueOf()\n if (valueOf != null && valueOf !== value) {\n return Buffer.from(valueOf, encodingOrOffset, length)\n }\n\n const b = fromObject(value)\n if (b) return b\n\n if (typeof Symbol !== 'undefined' && Symbol.toPrimitive != null &&\n typeof value[Symbol.toPrimitive] === 'function') {\n return Buffer.from(value[Symbol.toPrimitive]('string'), encodingOrOffset, length)\n }\n\n throw new TypeError(\n 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n 'or Array-like Object. Received type ' + (typeof value)\n )\n}\n\n/**\n * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError\n * if value is a number.\n * Buffer.from(str[, encoding])\n * Buffer.from(array)\n * Buffer.from(buffer)\n * Buffer.from(arrayBuffer[, byteOffset[, length]])\n **/\nBuffer.from = function (value, encodingOrOffset, length) {\n return from(value, encodingOrOffset, length)\n}\n\n// Note: Change prototype *after* Buffer.from is defined to workaround Chrome bug:\n// https://github.com/feross/buffer/pull/148\nObject.setPrototypeOf(Buffer.prototype, Uint8Array.prototype)\nObject.setPrototypeOf(Buffer, Uint8Array)\n\nfunction assertSize (size) {\n if (typeof size !== 'number') {\n throw new TypeError('\"size\" argument must be of type number')\n } else if (size < 0) {\n throw new RangeError('The value \"' + size + '\" is invalid for option \"size\"')\n }\n}\n\nfunction alloc (size, fill, encoding) {\n assertSize(size)\n if (size <= 0) {\n return createBuffer(size)\n }\n if (fill !== undefined) {\n // Only pay attention to encoding if it's a string. This\n // prevents accidentally sending in a number that would\n // be interpreted as a start offset.\n return typeof encoding === 'string'\n ? createBuffer(size).fill(fill, encoding)\n : createBuffer(size).fill(fill)\n }\n return createBuffer(size)\n}\n\n/**\n * Creates a new filled Buffer instance.\n * alloc(size[, fill[, encoding]])\n **/\nBuffer.alloc = function (size, fill, encoding) {\n return alloc(size, fill, encoding)\n}\n\nfunction allocUnsafe (size) {\n assertSize(size)\n return createBuffer(size < 0 ? 0 : checked(size) | 0)\n}\n\n/**\n * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.\n * */\nBuffer.allocUnsafe = function (size) {\n return allocUnsafe(size)\n}\n/**\n * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.\n */\nBuffer.allocUnsafeSlow = function (size) {\n return allocUnsafe(size)\n}\n\nfunction fromString (string, encoding) {\n if (typeof encoding !== 'string' || encoding === '') {\n encoding = 'utf8'\n }\n\n if (!Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n\n const length = byteLength(string, encoding) | 0\n let buf = createBuffer(length)\n\n const actual = buf.write(string, encoding)\n\n if (actual !== length) {\n // Writing a hex string, for example, that contains invalid characters will\n // cause everything after the first invalid character to be ignored. (e.g.\n // 'abxxcd' will be treated as 'ab')\n buf = buf.slice(0, actual)\n }\n\n return buf\n}\n\nfunction fromArrayLike (array) {\n const length = array.length < 0 ? 0 : checked(array.length) | 0\n const buf = createBuffer(length)\n for (let i = 0; i < length; i += 1) {\n buf[i] = array[i] & 255\n }\n return buf\n}\n\nfunction fromArrayView (arrayView) {\n if (isInstance(arrayView, Uint8Array)) {\n const copy = new Uint8Array(arrayView)\n return fromArrayBuffer(copy.buffer, copy.byteOffset, copy.byteLength)\n }\n return fromArrayLike(arrayView)\n}\n\nfunction fromArrayBuffer (array, byteOffset, length) {\n if (byteOffset < 0 || array.byteLength < byteOffset) {\n throw new RangeError('\"offset\" is outside of buffer bounds')\n }\n\n if (array.byteLength < byteOffset + (length || 0)) {\n throw new RangeError('\"length\" is outside of buffer bounds')\n }\n\n let buf\n if (byteOffset === undefined && length === undefined) {\n buf = new Uint8Array(array)\n } else if (length === undefined) {\n buf = new Uint8Array(array, byteOffset)\n } else {\n buf = new Uint8Array(array, byteOffset, length)\n }\n\n // Return an augmented `Uint8Array` instance\n Object.setPrototypeOf(buf, Buffer.prototype)\n\n return buf\n}\n\nfunction fromObject (obj) {\n if (Buffer.isBuffer(obj)) {\n const len = checked(obj.length) | 0\n const buf = createBuffer(len)\n\n if (buf.length === 0) {\n return buf\n }\n\n obj.copy(buf, 0, 0, len)\n return buf\n }\n\n if (obj.length !== undefined) {\n if (typeof obj.length !== 'number' || numberIsNaN(obj.length)) {\n return createBuffer(0)\n }\n return fromArrayLike(obj)\n }\n\n if (obj.type === 'Buffer' && Array.isArray(obj.data)) {\n return fromArrayLike(obj.data)\n }\n}\n\nfunction checked (length) {\n // Note: cannot use `length < K_MAX_LENGTH` here because that fails when\n // length is NaN (which is otherwise coerced to zero.)\n if (length >= K_MAX_LENGTH) {\n throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n 'size: 0x' + K_MAX_LENGTH.toString(16) + ' bytes')\n }\n return length | 0\n}\n\nfunction SlowBuffer (length) {\n if (+length != length) { // eslint-disable-line eqeqeq\n length = 0\n }\n return Buffer.alloc(+length)\n}\n\nBuffer.isBuffer = function isBuffer (b) {\n return b != null && b._isBuffer === true &&\n b !== Buffer.prototype // so Buffer.isBuffer(Buffer.prototype) will be false\n}\n\nBuffer.compare = function compare (a, b) {\n if (isInstance(a, Uint8Array)) a = Buffer.from(a, a.offset, a.byteLength)\n if (isInstance(b, Uint8Array)) b = Buffer.from(b, b.offset, b.byteLength)\n if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {\n throw new TypeError(\n 'The \"buf1\", \"buf2\" arguments must be one of type Buffer or Uint8Array'\n )\n }\n\n if (a === b) return 0\n\n let x = a.length\n let y = b.length\n\n for (let i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i]\n y = b[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\nBuffer.isEncoding = function isEncoding (encoding) {\n switch (String(encoding).toLowerCase()) {\n case 'hex':\n case 'utf8':\n case 'utf-8':\n case 'ascii':\n case 'latin1':\n case 'binary':\n case 'base64':\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return true\n default:\n return false\n }\n}\n\nBuffer.concat = function concat (list, length) {\n if (!Array.isArray(list)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n\n if (list.length === 0) {\n return Buffer.alloc(0)\n }\n\n let i\n if (length === undefined) {\n length = 0\n for (i = 0; i < list.length; ++i) {\n length += list[i].length\n }\n }\n\n const buffer = Buffer.allocUnsafe(length)\n let pos = 0\n for (i = 0; i < list.length; ++i) {\n let buf = list[i]\n if (isInstance(buf, Uint8Array)) {\n if (pos + buf.length > buffer.length) {\n if (!Buffer.isBuffer(buf)) buf = Buffer.from(buf)\n buf.copy(buffer, pos)\n } else {\n Uint8Array.prototype.set.call(\n buffer,\n buf,\n pos\n )\n }\n } else if (!Buffer.isBuffer(buf)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n } else {\n buf.copy(buffer, pos)\n }\n pos += buf.length\n }\n return buffer\n}\n\nfunction byteLength (string, encoding) {\n if (Buffer.isBuffer(string)) {\n return string.length\n }\n if (ArrayBuffer.isView(string) || isInstance(string, ArrayBuffer)) {\n return string.byteLength\n }\n if (typeof string !== 'string') {\n throw new TypeError(\n 'The \"string\" argument must be one of type string, Buffer, or ArrayBuffer. ' +\n 'Received type ' + typeof string\n )\n }\n\n const len = string.length\n const mustMatch = (arguments.length > 2 && arguments[2] === true)\n if (!mustMatch && len === 0) return 0\n\n // Use a for loop to avoid recursion\n let loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'ascii':\n case 'latin1':\n case 'binary':\n return len\n case 'utf8':\n case 'utf-8':\n return utf8ToBytes(string).length\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return len * 2\n case 'hex':\n return len >>> 1\n case 'base64':\n return base64ToBytes(string).length\n default:\n if (loweredCase) {\n return mustMatch ? -1 : utf8ToBytes(string).length // assume utf8\n }\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\nBuffer.byteLength = byteLength\n\nfunction slowToString (encoding, start, end) {\n let loweredCase = false\n\n // No need to verify that \"this.length <= MAX_UINT32\" since it's a read-only\n // property of a typed array.\n\n // This behaves neither like String nor Uint8Array in that we set start/end\n // to their upper/lower bounds if the value passed is out of range.\n // undefined is handled specially as per ECMA-262 6th Edition,\n // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.\n if (start === undefined || start < 0) {\n start = 0\n }\n // Return early if start > this.length. Done here to prevent potential uint32\n // coercion fail below.\n if (start > this.length) {\n return ''\n }\n\n if (end === undefined || end > this.length) {\n end = this.length\n }\n\n if (end <= 0) {\n return ''\n }\n\n // Force coercion to uint32. This will also coerce falsey/NaN values to 0.\n end >>>= 0\n start >>>= 0\n\n if (end <= start) {\n return ''\n }\n\n if (!encoding) encoding = 'utf8'\n\n while (true) {\n switch (encoding) {\n case 'hex':\n return hexSlice(this, start, end)\n\n case 'utf8':\n case 'utf-8':\n return utf8Slice(this, start, end)\n\n case 'ascii':\n return asciiSlice(this, start, end)\n\n case 'latin1':\n case 'binary':\n return latin1Slice(this, start, end)\n\n case 'base64':\n return base64Slice(this, start, end)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return utf16leSlice(this, start, end)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = (encoding + '').toLowerCase()\n loweredCase = true\n }\n }\n}\n\n// This property is used by `Buffer.isBuffer` (and the `is-buffer` npm package)\n// to detect a Buffer instance. It's not possible to use `instanceof Buffer`\n// reliably in a browserify context because there could be multiple different\n// copies of the 'buffer' package in use. This method works even for Buffer\n// instances that were created from another copy of the `buffer` package.\n// See: https://github.com/feross/buffer/issues/154\nBuffer.prototype._isBuffer = true\n\nfunction swap (b, n, m) {\n const i = b[n]\n b[n] = b[m]\n b[m] = i\n}\n\nBuffer.prototype.swap16 = function swap16 () {\n const len = this.length\n if (len % 2 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 16-bits')\n }\n for (let i = 0; i < len; i += 2) {\n swap(this, i, i + 1)\n }\n return this\n}\n\nBuffer.prototype.swap32 = function swap32 () {\n const len = this.length\n if (len % 4 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 32-bits')\n }\n for (let i = 0; i < len; i += 4) {\n swap(this, i, i + 3)\n swap(this, i + 1, i + 2)\n }\n return this\n}\n\nBuffer.prototype.swap64 = function swap64 () {\n const len = this.length\n if (len % 8 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 64-bits')\n }\n for (let i = 0; i < len; i += 8) {\n swap(this, i, i + 7)\n swap(this, i + 1, i + 6)\n swap(this, i + 2, i + 5)\n swap(this, i + 3, i + 4)\n }\n return this\n}\n\nBuffer.prototype.toString = function toString () {\n const length = this.length\n if (length === 0) return ''\n if (arguments.length === 0) return utf8Slice(this, 0, length)\n return slowToString.apply(this, arguments)\n}\n\nBuffer.prototype.toLocaleString = Buffer.prototype.toString\n\nBuffer.prototype.equals = function equals (b) {\n if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')\n if (this === b) return true\n return Buffer.compare(this, b) === 0\n}\n\nBuffer.prototype.inspect = function inspect () {\n let str = ''\n const max = exports.INSPECT_MAX_BYTES\n str = this.toString('hex', 0, max).replace(/(.{2})/g, '$1 ').trim()\n if (this.length > max) str += ' ... '\n return ''\n}\nif (customInspectSymbol) {\n Buffer.prototype[customInspectSymbol] = Buffer.prototype.inspect\n}\n\nBuffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {\n if (isInstance(target, Uint8Array)) {\n target = Buffer.from(target, target.offset, target.byteLength)\n }\n if (!Buffer.isBuffer(target)) {\n throw new TypeError(\n 'The \"target\" argument must be one of type Buffer or Uint8Array. ' +\n 'Received type ' + (typeof target)\n )\n }\n\n if (start === undefined) {\n start = 0\n }\n if (end === undefined) {\n end = target ? target.length : 0\n }\n if (thisStart === undefined) {\n thisStart = 0\n }\n if (thisEnd === undefined) {\n thisEnd = this.length\n }\n\n if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n throw new RangeError('out of range index')\n }\n\n if (thisStart >= thisEnd && start >= end) {\n return 0\n }\n if (thisStart >= thisEnd) {\n return -1\n }\n if (start >= end) {\n return 1\n }\n\n start >>>= 0\n end >>>= 0\n thisStart >>>= 0\n thisEnd >>>= 0\n\n if (this === target) return 0\n\n let x = thisEnd - thisStart\n let y = end - start\n const len = Math.min(x, y)\n\n const thisCopy = this.slice(thisStart, thisEnd)\n const targetCopy = target.slice(start, end)\n\n for (let i = 0; i < len; ++i) {\n if (thisCopy[i] !== targetCopy[i]) {\n x = thisCopy[i]\n y = targetCopy[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\n// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,\n// OR the last index of `val` in `buffer` at offset <= `byteOffset`.\n//\n// Arguments:\n// - buffer - a Buffer to search\n// - val - a string, Buffer, or number\n// - byteOffset - an index into `buffer`; will be clamped to an int32\n// - encoding - an optional encoding, relevant is val is a string\n// - dir - true for indexOf, false for lastIndexOf\nfunction bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (numberIsNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [val], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}\n\nfunction arrayIndexOf (arr, val, byteOffset, encoding, dir) {\n let indexSize = 1\n let arrLength = arr.length\n let valLength = val.length\n\n if (encoding !== undefined) {\n encoding = String(encoding).toLowerCase()\n if (encoding === 'ucs2' || encoding === 'ucs-2' ||\n encoding === 'utf16le' || encoding === 'utf-16le') {\n if (arr.length < 2 || val.length < 2) {\n return -1\n }\n indexSize = 2\n arrLength /= 2\n valLength /= 2\n byteOffset /= 2\n }\n }\n\n function read (buf, i) {\n if (indexSize === 1) {\n return buf[i]\n } else {\n return buf.readUInt16BE(i * indexSize)\n }\n }\n\n let i\n if (dir) {\n let foundIndex = -1\n for (i = byteOffset; i < arrLength; i++) {\n if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n if (foundIndex === -1) foundIndex = i\n if (i - foundIndex + 1 === valLength) return foundIndex * indexSize\n } else {\n if (foundIndex !== -1) i -= i - foundIndex\n foundIndex = -1\n }\n }\n } else {\n if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength\n for (i = byteOffset; i >= 0; i--) {\n let found = true\n for (let j = 0; j < valLength; j++) {\n if (read(arr, i + j) !== read(val, j)) {\n found = false\n break\n }\n }\n if (found) return i\n }\n }\n\n return -1\n}\n\nBuffer.prototype.includes = function includes (val, byteOffset, encoding) {\n return this.indexOf(val, byteOffset, encoding) !== -1\n}\n\nBuffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, true)\n}\n\nBuffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, false)\n}\n\nfunction hexWrite (buf, string, offset, length) {\n offset = Number(offset) || 0\n const remaining = buf.length - offset\n if (!length) {\n length = remaining\n } else {\n length = Number(length)\n if (length > remaining) {\n length = remaining\n }\n }\n\n const strLen = string.length\n\n if (length > strLen / 2) {\n length = strLen / 2\n }\n let i\n for (i = 0; i < length; ++i) {\n const parsed = parseInt(string.substr(i * 2, 2), 16)\n if (numberIsNaN(parsed)) return i\n buf[offset + i] = parsed\n }\n return i\n}\n\nfunction utf8Write (buf, string, offset, length) {\n return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nfunction asciiWrite (buf, string, offset, length) {\n return blitBuffer(asciiToBytes(string), buf, offset, length)\n}\n\nfunction base64Write (buf, string, offset, length) {\n return blitBuffer(base64ToBytes(string), buf, offset, length)\n}\n\nfunction ucs2Write (buf, string, offset, length) {\n return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nBuffer.prototype.write = function write (string, offset, length, encoding) {\n // Buffer#write(string)\n if (offset === undefined) {\n encoding = 'utf8'\n length = this.length\n offset = 0\n // Buffer#write(string, encoding)\n } else if (length === undefined && typeof offset === 'string') {\n encoding = offset\n length = this.length\n offset = 0\n // Buffer#write(string, offset[, length][, encoding])\n } else if (isFinite(offset)) {\n offset = offset >>> 0\n if (isFinite(length)) {\n length = length >>> 0\n if (encoding === undefined) encoding = 'utf8'\n } else {\n encoding = length\n length = undefined\n }\n } else {\n throw new Error(\n 'Buffer.write(string, encoding, offset[, length]) is no longer supported'\n )\n }\n\n const remaining = this.length - offset\n if (length === undefined || length > remaining) length = remaining\n\n if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {\n throw new RangeError('Attempt to write outside buffer bounds')\n }\n\n if (!encoding) encoding = 'utf8'\n\n let loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'hex':\n return hexWrite(this, string, offset, length)\n\n case 'utf8':\n case 'utf-8':\n return utf8Write(this, string, offset, length)\n\n case 'ascii':\n case 'latin1':\n case 'binary':\n return asciiWrite(this, string, offset, length)\n\n case 'base64':\n // Warning: maxLength not taken into account in base64Write\n return base64Write(this, string, offset, length)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return ucs2Write(this, string, offset, length)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\n\nBuffer.prototype.toJSON = function toJSON () {\n return {\n type: 'Buffer',\n data: Array.prototype.slice.call(this._arr || this, 0)\n }\n}\n\nfunction base64Slice (buf, start, end) {\n if (start === 0 && end === buf.length) {\n return base64.fromByteArray(buf)\n } else {\n return base64.fromByteArray(buf.slice(start, end))\n }\n}\n\nfunction utf8Slice (buf, start, end) {\n end = Math.min(buf.length, end)\n const res = []\n\n let i = start\n while (i < end) {\n const firstByte = buf[i]\n let codePoint = null\n let bytesPerSequence = (firstByte > 0xEF)\n ? 4\n : (firstByte > 0xDF)\n ? 3\n : (firstByte > 0xBF)\n ? 2\n : 1\n\n if (i + bytesPerSequence <= end) {\n let secondByte, thirdByte, fourthByte, tempCodePoint\n\n switch (bytesPerSequence) {\n case 1:\n if (firstByte < 0x80) {\n codePoint = firstByte\n }\n break\n case 2:\n secondByte = buf[i + 1]\n if ((secondByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)\n if (tempCodePoint > 0x7F) {\n codePoint = tempCodePoint\n }\n }\n break\n case 3:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)\n if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {\n codePoint = tempCodePoint\n }\n }\n break\n case 4:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n fourthByte = buf[i + 3]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)\n if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {\n codePoint = tempCodePoint\n }\n }\n }\n }\n\n if (codePoint === null) {\n // we did not generate a valid codePoint so insert a\n // replacement char (U+FFFD) and advance only 1 byte\n codePoint = 0xFFFD\n bytesPerSequence = 1\n } else if (codePoint > 0xFFFF) {\n // encode to utf16 (surrogate pair dance)\n codePoint -= 0x10000\n res.push(codePoint >>> 10 & 0x3FF | 0xD800)\n codePoint = 0xDC00 | codePoint & 0x3FF\n }\n\n res.push(codePoint)\n i += bytesPerSequence\n }\n\n return decodeCodePointsArray(res)\n}\n\n// Based on http://stackoverflow.com/a/22747272/680742, the browser with\n// the lowest limit is Chrome, with 0x10000 args.\n// We go 1 magnitude less, for safety\nconst MAX_ARGUMENTS_LENGTH = 0x1000\n\nfunction decodeCodePointsArray (codePoints) {\n const len = codePoints.length\n if (len <= MAX_ARGUMENTS_LENGTH) {\n return String.fromCharCode.apply(String, codePoints) // avoid extra slice()\n }\n\n // Decode in chunks to avoid \"call stack size exceeded\".\n let res = ''\n let i = 0\n while (i < len) {\n res += String.fromCharCode.apply(\n String,\n codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)\n )\n }\n return res\n}\n\nfunction asciiSlice (buf, start, end) {\n let ret = ''\n end = Math.min(buf.length, end)\n\n for (let i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i] & 0x7F)\n }\n return ret\n}\n\nfunction latin1Slice (buf, start, end) {\n let ret = ''\n end = Math.min(buf.length, end)\n\n for (let i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i])\n }\n return ret\n}\n\nfunction hexSlice (buf, start, end) {\n const len = buf.length\n\n if (!start || start < 0) start = 0\n if (!end || end < 0 || end > len) end = len\n\n let out = ''\n for (let i = start; i < end; ++i) {\n out += hexSliceLookupTable[buf[i]]\n }\n return out\n}\n\nfunction utf16leSlice (buf, start, end) {\n const bytes = buf.slice(start, end)\n let res = ''\n // If bytes.length is odd, the last 8 bits must be ignored (same as node.js)\n for (let i = 0; i < bytes.length - 1; i += 2) {\n res += String.fromCharCode(bytes[i] + (bytes[i + 1] * 256))\n }\n return res\n}\n\nBuffer.prototype.slice = function slice (start, end) {\n const len = this.length\n start = ~~start\n end = end === undefined ? len : ~~end\n\n if (start < 0) {\n start += len\n if (start < 0) start = 0\n } else if (start > len) {\n start = len\n }\n\n if (end < 0) {\n end += len\n if (end < 0) end = 0\n } else if (end > len) {\n end = len\n }\n\n if (end < start) end = start\n\n const newBuf = this.subarray(start, end)\n // Return an augmented `Uint8Array` instance\n Object.setPrototypeOf(newBuf, Buffer.prototype)\n\n return newBuf\n}\n\n/*\n * Need to make sure that buffer isn't trying to write out of bounds.\n */\nfunction checkOffset (offset, ext, length) {\n if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n}\n\nBuffer.prototype.readUintLE =\nBuffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let val = this[offset]\n let mul = 1\n let i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUintBE =\nBuffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n checkOffset(offset, byteLength, this.length)\n }\n\n let val = this[offset + --byteLength]\n let mul = 1\n while (byteLength > 0 && (mul *= 0x100)) {\n val += this[offset + --byteLength] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUint8 =\nBuffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 1, this.length)\n return this[offset]\n}\n\nBuffer.prototype.readUint16LE =\nBuffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n return this[offset] | (this[offset + 1] << 8)\n}\n\nBuffer.prototype.readUint16BE =\nBuffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n return (this[offset] << 8) | this[offset + 1]\n}\n\nBuffer.prototype.readUint32LE =\nBuffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return ((this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16)) +\n (this[offset + 3] * 0x1000000)\n}\n\nBuffer.prototype.readUint32BE =\nBuffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] * 0x1000000) +\n ((this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n this[offset + 3])\n}\n\nBuffer.prototype.readBigUInt64LE = defineBigIntMethod(function readBigUInt64LE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const lo = first +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 24\n\n const hi = this[++offset] +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n last * 2 ** 24\n\n return BigInt(lo) + (BigInt(hi) << BigInt(32))\n})\n\nBuffer.prototype.readBigUInt64BE = defineBigIntMethod(function readBigUInt64BE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const hi = first * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n this[++offset]\n\n const lo = this[++offset] * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n last\n\n return (BigInt(hi) << BigInt(32)) + BigInt(lo)\n})\n\nBuffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let val = this[offset]\n let mul = 1\n let i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let i = byteLength\n let mul = 1\n let val = this[offset + --i]\n while (i > 0 && (mul *= 0x100)) {\n val += this[offset + --i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readInt8 = function readInt8 (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 1, this.length)\n if (!(this[offset] & 0x80)) return (this[offset])\n return ((0xff - this[offset] + 1) * -1)\n}\n\nBuffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n const val = this[offset] | (this[offset + 1] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n const val = this[offset + 1] | (this[offset] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16) |\n (this[offset + 3] << 24)\n}\n\nBuffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] << 24) |\n (this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n (this[offset + 3])\n}\n\nBuffer.prototype.readBigInt64LE = defineBigIntMethod(function readBigInt64LE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const val = this[offset + 4] +\n this[offset + 5] * 2 ** 8 +\n this[offset + 6] * 2 ** 16 +\n (last << 24) // Overflow\n\n return (BigInt(val) << BigInt(32)) +\n BigInt(first +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 24)\n})\n\nBuffer.prototype.readBigInt64BE = defineBigIntMethod(function readBigInt64BE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const val = (first << 24) + // Overflow\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n this[++offset]\n\n return (BigInt(val) << BigInt(32)) +\n BigInt(this[++offset] * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n last)\n})\n\nBuffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, true, 23, 4)\n}\n\nBuffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, false, 23, 4)\n}\n\nBuffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, true, 52, 8)\n}\n\nBuffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, false, 52, 8)\n}\n\nfunction checkInt (buf, value, offset, ext, max, min) {\n if (!Buffer.isBuffer(buf)) throw new TypeError('\"buffer\" argument must be a Buffer instance')\n if (value > max || value < min) throw new RangeError('\"value\" argument is out of bounds')\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n}\n\nBuffer.prototype.writeUintLE =\nBuffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n const maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n let mul = 1\n let i = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUintBE =\nBuffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n const maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n let i = byteLength - 1\n let mul = 1\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUint8 =\nBuffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeUint16LE =\nBuffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n return offset + 2\n}\n\nBuffer.prototype.writeUint16BE =\nBuffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n return offset + 2\n}\n\nBuffer.prototype.writeUint32LE =\nBuffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n this[offset + 3] = (value >>> 24)\n this[offset + 2] = (value >>> 16)\n this[offset + 1] = (value >>> 8)\n this[offset] = (value & 0xff)\n return offset + 4\n}\n\nBuffer.prototype.writeUint32BE =\nBuffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n return offset + 4\n}\n\nfunction wrtBigUInt64LE (buf, value, offset, min, max) {\n checkIntBI(value, min, max, buf, offset, 7)\n\n let lo = Number(value & BigInt(0xffffffff))\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n let hi = Number(value >> BigInt(32) & BigInt(0xffffffff))\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n return offset\n}\n\nfunction wrtBigUInt64BE (buf, value, offset, min, max) {\n checkIntBI(value, min, max, buf, offset, 7)\n\n let lo = Number(value & BigInt(0xffffffff))\n buf[offset + 7] = lo\n lo = lo >> 8\n buf[offset + 6] = lo\n lo = lo >> 8\n buf[offset + 5] = lo\n lo = lo >> 8\n buf[offset + 4] = lo\n let hi = Number(value >> BigInt(32) & BigInt(0xffffffff))\n buf[offset + 3] = hi\n hi = hi >> 8\n buf[offset + 2] = hi\n hi = hi >> 8\n buf[offset + 1] = hi\n hi = hi >> 8\n buf[offset] = hi\n return offset + 8\n}\n\nBuffer.prototype.writeBigUInt64LE = defineBigIntMethod(function writeBigUInt64LE (value, offset = 0) {\n return wrtBigUInt64LE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'))\n})\n\nBuffer.prototype.writeBigUInt64BE = defineBigIntMethod(function writeBigUInt64BE (value, offset = 0) {\n return wrtBigUInt64BE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'))\n})\n\nBuffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n const limit = Math.pow(2, (8 * byteLength) - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n let i = 0\n let mul = 1\n let sub = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n const limit = Math.pow(2, (8 * byteLength) - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n let i = byteLength - 1\n let mul = 1\n let sub = 0\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)\n if (value < 0) value = 0xff + value + 1\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n return offset + 2\n}\n\nBuffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n return offset + 2\n}\n\nBuffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n this[offset + 2] = (value >>> 16)\n this[offset + 3] = (value >>> 24)\n return offset + 4\n}\n\nBuffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (value < 0) value = 0xffffffff + value + 1\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n return offset + 4\n}\n\nBuffer.prototype.writeBigInt64LE = defineBigIntMethod(function writeBigInt64LE (value, offset = 0) {\n return wrtBigUInt64LE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'))\n})\n\nBuffer.prototype.writeBigInt64BE = defineBigIntMethod(function writeBigInt64BE (value, offset = 0) {\n return wrtBigUInt64BE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'))\n})\n\nfunction checkIEEE754 (buf, value, offset, ext, max, min) {\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n if (offset < 0) throw new RangeError('Index out of range')\n}\n\nfunction writeFloat (buf, value, offset, littleEndian, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)\n }\n ieee754.write(buf, value, offset, littleEndian, 23, 4)\n return offset + 4\n}\n\nBuffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {\n return writeFloat(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {\n return writeFloat(this, value, offset, false, noAssert)\n}\n\nfunction writeDouble (buf, value, offset, littleEndian, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)\n }\n ieee754.write(buf, value, offset, littleEndian, 52, 8)\n return offset + 8\n}\n\nBuffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {\n return writeDouble(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {\n return writeDouble(this, value, offset, false, noAssert)\n}\n\n// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\nBuffer.prototype.copy = function copy (target, targetStart, start, end) {\n if (!Buffer.isBuffer(target)) throw new TypeError('argument should be a Buffer')\n if (!start) start = 0\n if (!end && end !== 0) end = this.length\n if (targetStart >= target.length) targetStart = target.length\n if (!targetStart) targetStart = 0\n if (end > 0 && end < start) end = start\n\n // Copy 0 bytes; we're done\n if (end === start) return 0\n if (target.length === 0 || this.length === 0) return 0\n\n // Fatal error conditions\n if (targetStart < 0) {\n throw new RangeError('targetStart out of bounds')\n }\n if (start < 0 || start >= this.length) throw new RangeError('Index out of range')\n if (end < 0) throw new RangeError('sourceEnd out of bounds')\n\n // Are we oob?\n if (end > this.length) end = this.length\n if (target.length - targetStart < end - start) {\n end = target.length - targetStart + start\n }\n\n const len = end - start\n\n if (this === target && typeof Uint8Array.prototype.copyWithin === 'function') {\n // Use built-in when available, missing from IE11\n this.copyWithin(targetStart, start, end)\n } else {\n Uint8Array.prototype.set.call(\n target,\n this.subarray(start, end),\n targetStart\n )\n }\n\n return len\n}\n\n// Usage:\n// buffer.fill(number[, offset[, end]])\n// buffer.fill(buffer[, offset[, end]])\n// buffer.fill(string[, offset[, end]][, encoding])\nBuffer.prototype.fill = function fill (val, start, end, encoding) {\n // Handle string cases:\n if (typeof val === 'string') {\n if (typeof start === 'string') {\n encoding = start\n start = 0\n end = this.length\n } else if (typeof end === 'string') {\n encoding = end\n end = this.length\n }\n if (encoding !== undefined && typeof encoding !== 'string') {\n throw new TypeError('encoding must be a string')\n }\n if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n if (val.length === 1) {\n const code = val.charCodeAt(0)\n if ((encoding === 'utf8' && code < 128) ||\n encoding === 'latin1') {\n // Fast path: If `val` fits into a single byte, use that numeric value.\n val = code\n }\n }\n } else if (typeof val === 'number') {\n val = val & 255\n } else if (typeof val === 'boolean') {\n val = Number(val)\n }\n\n // Invalid ranges are not set to a default, so can range check early.\n if (start < 0 || this.length < start || this.length < end) {\n throw new RangeError('Out of range index')\n }\n\n if (end <= start) {\n return this\n }\n\n start = start >>> 0\n end = end === undefined ? this.length : end >>> 0\n\n if (!val) val = 0\n\n let i\n if (typeof val === 'number') {\n for (i = start; i < end; ++i) {\n this[i] = val\n }\n } else {\n const bytes = Buffer.isBuffer(val)\n ? val\n : Buffer.from(val, encoding)\n const len = bytes.length\n if (len === 0) {\n throw new TypeError('The value \"' + val +\n '\" is invalid for argument \"value\"')\n }\n for (i = 0; i < end - start; ++i) {\n this[i + start] = bytes[i % len]\n }\n }\n\n return this\n}\n\n// CUSTOM ERRORS\n// =============\n\n// Simplified versions from Node, changed for Buffer-only usage\nconst errors = {}\nfunction E (sym, getMessage, Base) {\n errors[sym] = class NodeError extends Base {\n constructor () {\n super()\n\n Object.defineProperty(this, 'message', {\n value: getMessage.apply(this, arguments),\n writable: true,\n configurable: true\n })\n\n // Add the error code to the name to include it in the stack trace.\n this.name = `${this.name} [${sym}]`\n // Access the stack to generate the error message including the error code\n // from the name.\n this.stack // eslint-disable-line no-unused-expressions\n // Reset the name to the actual name.\n delete this.name\n }\n\n get code () {\n return sym\n }\n\n set code (value) {\n Object.defineProperty(this, 'code', {\n configurable: true,\n enumerable: true,\n value,\n writable: true\n })\n }\n\n toString () {\n return `${this.name} [${sym}]: ${this.message}`\n }\n }\n}\n\nE('ERR_BUFFER_OUT_OF_BOUNDS',\n function (name) {\n if (name) {\n return `${name} is outside of buffer bounds`\n }\n\n return 'Attempt to access memory outside buffer bounds'\n }, RangeError)\nE('ERR_INVALID_ARG_TYPE',\n function (name, actual) {\n return `The \"${name}\" argument must be of type number. Received type ${typeof actual}`\n }, TypeError)\nE('ERR_OUT_OF_RANGE',\n function (str, range, input) {\n let msg = `The value of \"${str}\" is out of range.`\n let received = input\n if (Number.isInteger(input) && Math.abs(input) > 2 ** 32) {\n received = addNumericalSeparator(String(input))\n } else if (typeof input === 'bigint') {\n received = String(input)\n if (input > BigInt(2) ** BigInt(32) || input < -(BigInt(2) ** BigInt(32))) {\n received = addNumericalSeparator(received)\n }\n received += 'n'\n }\n msg += ` It must be ${range}. Received ${received}`\n return msg\n }, RangeError)\n\nfunction addNumericalSeparator (val) {\n let res = ''\n let i = val.length\n const start = val[0] === '-' ? 1 : 0\n for (; i >= start + 4; i -= 3) {\n res = `_${val.slice(i - 3, i)}${res}`\n }\n return `${val.slice(0, i)}${res}`\n}\n\n// CHECK FUNCTIONS\n// ===============\n\nfunction checkBounds (buf, offset, byteLength) {\n validateNumber(offset, 'offset')\n if (buf[offset] === undefined || buf[offset + byteLength] === undefined) {\n boundsError(offset, buf.length - (byteLength + 1))\n }\n}\n\nfunction checkIntBI (value, min, max, buf, offset, byteLength) {\n if (value > max || value < min) {\n const n = typeof min === 'bigint' ? 'n' : ''\n let range\n if (byteLength > 3) {\n if (min === 0 || min === BigInt(0)) {\n range = `>= 0${n} and < 2${n} ** ${(byteLength + 1) * 8}${n}`\n } else {\n range = `>= -(2${n} ** ${(byteLength + 1) * 8 - 1}${n}) and < 2 ** ` +\n `${(byteLength + 1) * 8 - 1}${n}`\n }\n } else {\n range = `>= ${min}${n} and <= ${max}${n}`\n }\n throw new errors.ERR_OUT_OF_RANGE('value', range, value)\n }\n checkBounds(buf, offset, byteLength)\n}\n\nfunction validateNumber (value, name) {\n if (typeof value !== 'number') {\n throw new errors.ERR_INVALID_ARG_TYPE(name, 'number', value)\n }\n}\n\nfunction boundsError (value, length, type) {\n if (Math.floor(value) !== value) {\n validateNumber(value, type)\n throw new errors.ERR_OUT_OF_RANGE(type || 'offset', 'an integer', value)\n }\n\n if (length < 0) {\n throw new errors.ERR_BUFFER_OUT_OF_BOUNDS()\n }\n\n throw new errors.ERR_OUT_OF_RANGE(type || 'offset',\n `>= ${type ? 1 : 0} and <= ${length}`,\n value)\n}\n\n// HELPER FUNCTIONS\n// ================\n\nconst INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g\n\nfunction base64clean (str) {\n // Node takes equal signs as end of the Base64 encoding\n str = str.split('=')[0]\n // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n str = str.trim().replace(INVALID_BASE64_RE, '')\n // Node converts strings with length < 2 to ''\n if (str.length < 2) return ''\n // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\n while (str.length % 4 !== 0) {\n str = str + '='\n }\n return str\n}\n\nfunction utf8ToBytes (string, units) {\n units = units || Infinity\n let codePoint\n const length = string.length\n let leadSurrogate = null\n const bytes = []\n\n for (let i = 0; i < length; ++i) {\n codePoint = string.charCodeAt(i)\n\n // is surrogate component\n if (codePoint > 0xD7FF && codePoint < 0xE000) {\n // last char was a lead\n if (!leadSurrogate) {\n // no lead yet\n if (codePoint > 0xDBFF) {\n // unexpected trail\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n } else if (i + 1 === length) {\n // unpaired lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n }\n\n // valid lead\n leadSurrogate = codePoint\n\n continue\n }\n\n // 2 leads in a row\n if (codePoint < 0xDC00) {\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n leadSurrogate = codePoint\n continue\n }\n\n // valid surrogate pair\n codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000\n } else if (leadSurrogate) {\n // valid bmp char, but last char was a lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n }\n\n leadSurrogate = null\n\n // encode utf8\n if (codePoint < 0x80) {\n if ((units -= 1) < 0) break\n bytes.push(codePoint)\n } else if (codePoint < 0x800) {\n if ((units -= 2) < 0) break\n bytes.push(\n codePoint >> 0x6 | 0xC0,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x10000) {\n if ((units -= 3) < 0) break\n bytes.push(\n codePoint >> 0xC | 0xE0,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x110000) {\n if ((units -= 4) < 0) break\n bytes.push(\n codePoint >> 0x12 | 0xF0,\n codePoint >> 0xC & 0x3F | 0x80,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else {\n throw new Error('Invalid code point')\n }\n }\n\n return bytes\n}\n\nfunction asciiToBytes (str) {\n const byteArray = []\n for (let i = 0; i < str.length; ++i) {\n // Node's code seems to be doing this and not & 0x7F..\n byteArray.push(str.charCodeAt(i) & 0xFF)\n }\n return byteArray\n}\n\nfunction utf16leToBytes (str, units) {\n let c, hi, lo\n const byteArray = []\n for (let i = 0; i < str.length; ++i) {\n if ((units -= 2) < 0) break\n\n c = str.charCodeAt(i)\n hi = c >> 8\n lo = c % 256\n byteArray.push(lo)\n byteArray.push(hi)\n }\n\n return byteArray\n}\n\nfunction base64ToBytes (str) {\n return base64.toByteArray(base64clean(str))\n}\n\nfunction blitBuffer (src, dst, offset, length) {\n let i\n for (i = 0; i < length; ++i) {\n if ((i + offset >= dst.length) || (i >= src.length)) break\n dst[i + offset] = src[i]\n }\n return i\n}\n\n// ArrayBuffer or Uint8Array objects from other contexts (i.e. iframes) do not pass\n// the `instanceof` check but they should be treated as of that type.\n// See: https://github.com/feross/buffer/issues/166\nfunction isInstance (obj, type) {\n return obj instanceof type ||\n (obj != null && obj.constructor != null && obj.constructor.name != null &&\n obj.constructor.name === type.name)\n}\nfunction numberIsNaN (obj) {\n // For IE11 support\n return obj !== obj // eslint-disable-line no-self-compare\n}\n\n// Create lookup table for `toString('hex')`\n// See: https://github.com/feross/buffer/issues/219\nconst hexSliceLookupTable = (function () {\n const alphabet = '0123456789abcdef'\n const table = new Array(256)\n for (let i = 0; i < 16; ++i) {\n const i16 = i * 16\n for (let j = 0; j < 16; ++j) {\n table[i16 + j] = alphabet[i] + alphabet[j]\n }\n }\n return table\n})()\n\n// Return not function with Error if BigInt not supported\nfunction defineBigIntMethod (fn) {\n return typeof BigInt === 'undefined' ? BufferBigIntNotDefined : fn\n}\n\nfunction BufferBigIntNotDefined () {\n throw new Error('BigInt not supported')\n}\n","var Buffer = require('safe-buffer').Buffer\nvar Transform = require('stream').Transform\nvar StringDecoder = require('string_decoder').StringDecoder\nvar inherits = require('inherits')\n\nfunction CipherBase (hashMode) {\n Transform.call(this)\n this.hashMode = typeof hashMode === 'string'\n if (this.hashMode) {\n this[hashMode] = this._finalOrDigest\n } else {\n this.final = this._finalOrDigest\n }\n if (this._final) {\n this.__final = this._final\n this._final = null\n }\n this._decoder = null\n this._encoding = null\n}\ninherits(CipherBase, Transform)\n\nCipherBase.prototype.update = function (data, inputEnc, outputEnc) {\n if (typeof data === 'string') {\n data = Buffer.from(data, inputEnc)\n }\n\n var outData = this._update(data)\n if (this.hashMode) return this\n\n if (outputEnc) {\n outData = this._toString(outData, outputEnc)\n }\n\n return outData\n}\n\nCipherBase.prototype.setAutoPadding = function () {}\nCipherBase.prototype.getAuthTag = function () {\n throw new Error('trying to get auth tag in unsupported state')\n}\n\nCipherBase.prototype.setAuthTag = function () {\n throw new Error('trying to set auth tag in unsupported state')\n}\n\nCipherBase.prototype.setAAD = function () {\n throw new Error('trying to set aad in unsupported state')\n}\n\nCipherBase.prototype._transform = function (data, _, next) {\n var err\n try {\n if (this.hashMode) {\n this._update(data)\n } else {\n this.push(this._update(data))\n }\n } catch (e) {\n err = e\n } finally {\n next(err)\n }\n}\nCipherBase.prototype._flush = function (done) {\n var err\n try {\n this.push(this.__final())\n } catch (e) {\n err = e\n }\n\n done(err)\n}\nCipherBase.prototype._finalOrDigest = function (outputEnc) {\n var outData = this.__final() || Buffer.alloc(0)\n if (outputEnc) {\n outData = this._toString(outData, outputEnc, true)\n }\n return outData\n}\n\nCipherBase.prototype._toString = function (value, enc, fin) {\n if (!this._decoder) {\n this._decoder = new StringDecoder(enc)\n this._encoding = enc\n }\n\n if (this._encoding !== enc) throw new Error('can\\'t switch encodings')\n\n var out = this._decoder.write(value)\n if (fin) {\n out += this._decoder.end()\n }\n\n return out\n}\n\nmodule.exports = CipherBase\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n// NOTE: These type checking functions intentionally don't use `instanceof`\n// because it is fragile and can be easily faked with `Object.create()`.\n\nfunction isArray(arg) {\n if (Array.isArray) {\n return Array.isArray(arg);\n }\n return objectToString(arg) === '[object Array]';\n}\nexports.isArray = isArray;\n\nfunction isBoolean(arg) {\n return typeof arg === 'boolean';\n}\nexports.isBoolean = isBoolean;\n\nfunction isNull(arg) {\n return arg === null;\n}\nexports.isNull = isNull;\n\nfunction isNullOrUndefined(arg) {\n return arg == null;\n}\nexports.isNullOrUndefined = isNullOrUndefined;\n\nfunction isNumber(arg) {\n return typeof arg === 'number';\n}\nexports.isNumber = isNumber;\n\nfunction isString(arg) {\n return typeof arg === 'string';\n}\nexports.isString = isString;\n\nfunction isSymbol(arg) {\n return typeof arg === 'symbol';\n}\nexports.isSymbol = isSymbol;\n\nfunction isUndefined(arg) {\n return arg === void 0;\n}\nexports.isUndefined = isUndefined;\n\nfunction isRegExp(re) {\n return objectToString(re) === '[object RegExp]';\n}\nexports.isRegExp = isRegExp;\n\nfunction isObject(arg) {\n return typeof arg === 'object' && arg !== null;\n}\nexports.isObject = isObject;\n\nfunction isDate(d) {\n return objectToString(d) === '[object Date]';\n}\nexports.isDate = isDate;\n\nfunction isError(e) {\n return (objectToString(e) === '[object Error]' || e instanceof Error);\n}\nexports.isError = isError;\n\nfunction isFunction(arg) {\n return typeof arg === 'function';\n}\nexports.isFunction = isFunction;\n\nfunction isPrimitive(arg) {\n return arg === null ||\n typeof arg === 'boolean' ||\n typeof arg === 'number' ||\n typeof arg === 'string' ||\n typeof arg === 'symbol' || // ES6 symbol\n typeof arg === 'undefined';\n}\nexports.isPrimitive = isPrimitive;\n\nexports.isBuffer = require('buffer').Buffer.isBuffer;\n\nfunction objectToString(o) {\n return Object.prototype.toString.call(o);\n}\n","var elliptic = require('elliptic')\nvar BN = require('bn.js')\n\nmodule.exports = function createECDH (curve) {\n return new ECDH(curve)\n}\n\nvar aliases = {\n secp256k1: {\n name: 'secp256k1',\n byteLength: 32\n },\n secp224r1: {\n name: 'p224',\n byteLength: 28\n },\n prime256v1: {\n name: 'p256',\n byteLength: 32\n },\n prime192v1: {\n name: 'p192',\n byteLength: 24\n },\n ed25519: {\n name: 'ed25519',\n byteLength: 32\n },\n secp384r1: {\n name: 'p384',\n byteLength: 48\n },\n secp521r1: {\n name: 'p521',\n byteLength: 66\n }\n}\n\naliases.p224 = aliases.secp224r1\naliases.p256 = aliases.secp256r1 = aliases.prime256v1\naliases.p192 = aliases.secp192r1 = aliases.prime192v1\naliases.p384 = aliases.secp384r1\naliases.p521 = aliases.secp521r1\n\nfunction ECDH (curve) {\n this.curveType = aliases[curve]\n if (!this.curveType) {\n this.curveType = {\n name: curve\n }\n }\n this.curve = new elliptic.ec(this.curveType.name) // eslint-disable-line new-cap\n this.keys = void 0\n}\n\nECDH.prototype.generateKeys = function (enc, format) {\n this.keys = this.curve.genKeyPair()\n return this.getPublicKey(enc, format)\n}\n\nECDH.prototype.computeSecret = function (other, inenc, enc) {\n inenc = inenc || 'utf8'\n if (!Buffer.isBuffer(other)) {\n other = new Buffer(other, inenc)\n }\n var otherPub = this.curve.keyFromPublic(other).getPublic()\n var out = otherPub.mul(this.keys.getPrivate()).getX()\n return formatReturnValue(out, enc, this.curveType.byteLength)\n}\n\nECDH.prototype.getPublicKey = function (enc, format) {\n var key = this.keys.getPublic(format === 'compressed', true)\n if (format === 'hybrid') {\n if (key[key.length - 1] % 2) {\n key[0] = 7\n } else {\n key[0] = 6\n }\n }\n return formatReturnValue(key, enc)\n}\n\nECDH.prototype.getPrivateKey = function (enc) {\n return formatReturnValue(this.keys.getPrivate(), enc)\n}\n\nECDH.prototype.setPublicKey = function (pub, enc) {\n enc = enc || 'utf8'\n if (!Buffer.isBuffer(pub)) {\n pub = new Buffer(pub, enc)\n }\n this.keys._importPublic(pub)\n return this\n}\n\nECDH.prototype.setPrivateKey = function (priv, enc) {\n enc = enc || 'utf8'\n if (!Buffer.isBuffer(priv)) {\n priv = new Buffer(priv, enc)\n }\n\n var _priv = new BN(priv)\n _priv = _priv.toString(16)\n this.keys = this.curve.genKeyPair()\n this.keys._importPrivate(_priv)\n return this\n}\n\nfunction formatReturnValue (bn, enc, len) {\n if (!Array.isArray(bn)) {\n bn = bn.toArray()\n }\n var buf = new Buffer(bn)\n if (len && buf.length < len) {\n var zeros = new Buffer(len - buf.length)\n zeros.fill(0)\n buf = Buffer.concat([zeros, buf])\n }\n if (!enc) {\n return buf\n } else {\n return buf.toString(enc)\n }\n}\n","(function (module, exports) {\n 'use strict';\n\n // Utils\n function assert (val, msg) {\n if (!val) throw new Error(msg || 'Assertion failed');\n }\n\n // Could use `inherits` module, but don't want to move from single file\n // architecture yet.\n function inherits (ctor, superCtor) {\n ctor.super_ = superCtor;\n var TempCtor = function () {};\n TempCtor.prototype = superCtor.prototype;\n ctor.prototype = new TempCtor();\n ctor.prototype.constructor = ctor;\n }\n\n // BN\n\n function BN (number, base, endian) {\n if (BN.isBN(number)) {\n return number;\n }\n\n this.negative = 0;\n this.words = null;\n this.length = 0;\n\n // Reduction context\n this.red = null;\n\n if (number !== null) {\n if (base === 'le' || base === 'be') {\n endian = base;\n base = 10;\n }\n\n this._init(number || 0, base || 10, endian || 'be');\n }\n }\n if (typeof module === 'object') {\n module.exports = BN;\n } else {\n exports.BN = BN;\n }\n\n BN.BN = BN;\n BN.wordSize = 26;\n\n var Buffer;\n try {\n if (typeof window !== 'undefined' && typeof window.Buffer !== 'undefined') {\n Buffer = window.Buffer;\n } else {\n Buffer = require('buffer').Buffer;\n }\n } catch (e) {\n }\n\n BN.isBN = function isBN (num) {\n if (num instanceof BN) {\n return true;\n }\n\n return num !== null && typeof num === 'object' &&\n num.constructor.wordSize === BN.wordSize && Array.isArray(num.words);\n };\n\n BN.max = function max (left, right) {\n if (left.cmp(right) > 0) return left;\n return right;\n };\n\n BN.min = function min (left, right) {\n if (left.cmp(right) < 0) return left;\n return right;\n };\n\n BN.prototype._init = function init (number, base, endian) {\n if (typeof number === 'number') {\n return this._initNumber(number, base, endian);\n }\n\n if (typeof number === 'object') {\n return this._initArray(number, base, endian);\n }\n\n if (base === 'hex') {\n base = 16;\n }\n assert(base === (base | 0) && base >= 2 && base <= 36);\n\n number = number.toString().replace(/\\s+/g, '');\n var start = 0;\n if (number[0] === '-') {\n start++;\n this.negative = 1;\n }\n\n if (start < number.length) {\n if (base === 16) {\n this._parseHex(number, start, endian);\n } else {\n this._parseBase(number, base, start);\n if (endian === 'le') {\n this._initArray(this.toArray(), base, endian);\n }\n }\n }\n };\n\n BN.prototype._initNumber = function _initNumber (number, base, endian) {\n if (number < 0) {\n this.negative = 1;\n number = -number;\n }\n if (number < 0x4000000) {\n this.words = [ number & 0x3ffffff ];\n this.length = 1;\n } else if (number < 0x10000000000000) {\n this.words = [\n number & 0x3ffffff,\n (number / 0x4000000) & 0x3ffffff\n ];\n this.length = 2;\n } else {\n assert(number < 0x20000000000000); // 2 ^ 53 (unsafe)\n this.words = [\n number & 0x3ffffff,\n (number / 0x4000000) & 0x3ffffff,\n 1\n ];\n this.length = 3;\n }\n\n if (endian !== 'le') return;\n\n // Reverse the bytes\n this._initArray(this.toArray(), base, endian);\n };\n\n BN.prototype._initArray = function _initArray (number, base, endian) {\n // Perhaps a Uint8Array\n assert(typeof number.length === 'number');\n if (number.length <= 0) {\n this.words = [ 0 ];\n this.length = 1;\n return this;\n }\n\n this.length = Math.ceil(number.length / 3);\n this.words = new Array(this.length);\n for (var i = 0; i < this.length; i++) {\n this.words[i] = 0;\n }\n\n var j, w;\n var off = 0;\n if (endian === 'be') {\n for (i = number.length - 1, j = 0; i >= 0; i -= 3) {\n w = number[i] | (number[i - 1] << 8) | (number[i - 2] << 16);\n this.words[j] |= (w << off) & 0x3ffffff;\n this.words[j + 1] = (w >>> (26 - off)) & 0x3ffffff;\n off += 24;\n if (off >= 26) {\n off -= 26;\n j++;\n }\n }\n } else if (endian === 'le') {\n for (i = 0, j = 0; i < number.length; i += 3) {\n w = number[i] | (number[i + 1] << 8) | (number[i + 2] << 16);\n this.words[j] |= (w << off) & 0x3ffffff;\n this.words[j + 1] = (w >>> (26 - off)) & 0x3ffffff;\n off += 24;\n if (off >= 26) {\n off -= 26;\n j++;\n }\n }\n }\n return this.strip();\n };\n\n function parseHex4Bits (string, index) {\n var c = string.charCodeAt(index);\n // 'A' - 'F'\n if (c >= 65 && c <= 70) {\n return c - 55;\n // 'a' - 'f'\n } else if (c >= 97 && c <= 102) {\n return c - 87;\n // '0' - '9'\n } else {\n return (c - 48) & 0xf;\n }\n }\n\n function parseHexByte (string, lowerBound, index) {\n var r = parseHex4Bits(string, index);\n if (index - 1 >= lowerBound) {\n r |= parseHex4Bits(string, index - 1) << 4;\n }\n return r;\n }\n\n BN.prototype._parseHex = function _parseHex (number, start, endian) {\n // Create possibly bigger array to ensure that it fits the number\n this.length = Math.ceil((number.length - start) / 6);\n this.words = new Array(this.length);\n for (var i = 0; i < this.length; i++) {\n this.words[i] = 0;\n }\n\n // 24-bits chunks\n var off = 0;\n var j = 0;\n\n var w;\n if (endian === 'be') {\n for (i = number.length - 1; i >= start; i -= 2) {\n w = parseHexByte(number, start, i) << off;\n this.words[j] |= w & 0x3ffffff;\n if (off >= 18) {\n off -= 18;\n j += 1;\n this.words[j] |= w >>> 26;\n } else {\n off += 8;\n }\n }\n } else {\n var parseLength = number.length - start;\n for (i = parseLength % 2 === 0 ? start + 1 : start; i < number.length; i += 2) {\n w = parseHexByte(number, start, i) << off;\n this.words[j] |= w & 0x3ffffff;\n if (off >= 18) {\n off -= 18;\n j += 1;\n this.words[j] |= w >>> 26;\n } else {\n off += 8;\n }\n }\n }\n\n this.strip();\n };\n\n function parseBase (str, start, end, mul) {\n var r = 0;\n var len = Math.min(str.length, end);\n for (var i = start; i < len; i++) {\n var c = str.charCodeAt(i) - 48;\n\n r *= mul;\n\n // 'a'\n if (c >= 49) {\n r += c - 49 + 0xa;\n\n // 'A'\n } else if (c >= 17) {\n r += c - 17 + 0xa;\n\n // '0' - '9'\n } else {\n r += c;\n }\n }\n return r;\n }\n\n BN.prototype._parseBase = function _parseBase (number, base, start) {\n // Initialize as zero\n this.words = [ 0 ];\n this.length = 1;\n\n // Find length of limb in base\n for (var limbLen = 0, limbPow = 1; limbPow <= 0x3ffffff; limbPow *= base) {\n limbLen++;\n }\n limbLen--;\n limbPow = (limbPow / base) | 0;\n\n var total = number.length - start;\n var mod = total % limbLen;\n var end = Math.min(total, total - mod) + start;\n\n var word = 0;\n for (var i = start; i < end; i += limbLen) {\n word = parseBase(number, i, i + limbLen, base);\n\n this.imuln(limbPow);\n if (this.words[0] + word < 0x4000000) {\n this.words[0] += word;\n } else {\n this._iaddn(word);\n }\n }\n\n if (mod !== 0) {\n var pow = 1;\n word = parseBase(number, i, number.length, base);\n\n for (i = 0; i < mod; i++) {\n pow *= base;\n }\n\n this.imuln(pow);\n if (this.words[0] + word < 0x4000000) {\n this.words[0] += word;\n } else {\n this._iaddn(word);\n }\n }\n\n this.strip();\n };\n\n BN.prototype.copy = function copy (dest) {\n dest.words = new Array(this.length);\n for (var i = 0; i < this.length; i++) {\n dest.words[i] = this.words[i];\n }\n dest.length = this.length;\n dest.negative = this.negative;\n dest.red = this.red;\n };\n\n BN.prototype.clone = function clone () {\n var r = new BN(null);\n this.copy(r);\n return r;\n };\n\n BN.prototype._expand = function _expand (size) {\n while (this.length < size) {\n this.words[this.length++] = 0;\n }\n return this;\n };\n\n // Remove leading `0` from `this`\n BN.prototype.strip = function strip () {\n while (this.length > 1 && this.words[this.length - 1] === 0) {\n this.length--;\n }\n return this._normSign();\n };\n\n BN.prototype._normSign = function _normSign () {\n // -0 = 0\n if (this.length === 1 && this.words[0] === 0) {\n this.negative = 0;\n }\n return this;\n };\n\n BN.prototype.inspect = function inspect () {\n return (this.red ? '';\n };\n\n /*\n\n var zeros = [];\n var groupSizes = [];\n var groupBases = [];\n\n var s = '';\n var i = -1;\n while (++i < BN.wordSize) {\n zeros[i] = s;\n s += '0';\n }\n groupSizes[0] = 0;\n groupSizes[1] = 0;\n groupBases[0] = 0;\n groupBases[1] = 0;\n var base = 2 - 1;\n while (++base < 36 + 1) {\n var groupSize = 0;\n var groupBase = 1;\n while (groupBase < (1 << BN.wordSize) / base) {\n groupBase *= base;\n groupSize += 1;\n }\n groupSizes[base] = groupSize;\n groupBases[base] = groupBase;\n }\n\n */\n\n var zeros = [\n '',\n '0',\n '00',\n '000',\n '0000',\n '00000',\n '000000',\n '0000000',\n '00000000',\n '000000000',\n '0000000000',\n '00000000000',\n '000000000000',\n '0000000000000',\n '00000000000000',\n '000000000000000',\n '0000000000000000',\n '00000000000000000',\n '000000000000000000',\n '0000000000000000000',\n '00000000000000000000',\n '000000000000000000000',\n '0000000000000000000000',\n '00000000000000000000000',\n '000000000000000000000000',\n '0000000000000000000000000'\n ];\n\n var groupSizes = [\n 0, 0,\n 25, 16, 12, 11, 10, 9, 8,\n 8, 7, 7, 7, 7, 6, 6,\n 6, 6, 6, 6, 6, 5, 5,\n 5, 5, 5, 5, 5, 5, 5,\n 5, 5, 5, 5, 5, 5, 5\n ];\n\n var groupBases = [\n 0, 0,\n 33554432, 43046721, 16777216, 48828125, 60466176, 40353607, 16777216,\n 43046721, 10000000, 19487171, 35831808, 62748517, 7529536, 11390625,\n 16777216, 24137569, 34012224, 47045881, 64000000, 4084101, 5153632,\n 6436343, 7962624, 9765625, 11881376, 14348907, 17210368, 20511149,\n 24300000, 28629151, 33554432, 39135393, 45435424, 52521875, 60466176\n ];\n\n BN.prototype.toString = function toString (base, padding) {\n base = base || 10;\n padding = padding | 0 || 1;\n\n var out;\n if (base === 16 || base === 'hex') {\n out = '';\n var off = 0;\n var carry = 0;\n for (var i = 0; i < this.length; i++) {\n var w = this.words[i];\n var word = (((w << off) | carry) & 0xffffff).toString(16);\n carry = (w >>> (24 - off)) & 0xffffff;\n if (carry !== 0 || i !== this.length - 1) {\n out = zeros[6 - word.length] + word + out;\n } else {\n out = word + out;\n }\n off += 2;\n if (off >= 26) {\n off -= 26;\n i--;\n }\n }\n if (carry !== 0) {\n out = carry.toString(16) + out;\n }\n while (out.length % padding !== 0) {\n out = '0' + out;\n }\n if (this.negative !== 0) {\n out = '-' + out;\n }\n return out;\n }\n\n if (base === (base | 0) && base >= 2 && base <= 36) {\n // var groupSize = Math.floor(BN.wordSize * Math.LN2 / Math.log(base));\n var groupSize = groupSizes[base];\n // var groupBase = Math.pow(base, groupSize);\n var groupBase = groupBases[base];\n out = '';\n var c = this.clone();\n c.negative = 0;\n while (!c.isZero()) {\n var r = c.modn(groupBase).toString(base);\n c = c.idivn(groupBase);\n\n if (!c.isZero()) {\n out = zeros[groupSize - r.length] + r + out;\n } else {\n out = r + out;\n }\n }\n if (this.isZero()) {\n out = '0' + out;\n }\n while (out.length % padding !== 0) {\n out = '0' + out;\n }\n if (this.negative !== 0) {\n out = '-' + out;\n }\n return out;\n }\n\n assert(false, 'Base should be between 2 and 36');\n };\n\n BN.prototype.toNumber = function toNumber () {\n var ret = this.words[0];\n if (this.length === 2) {\n ret += this.words[1] * 0x4000000;\n } else if (this.length === 3 && this.words[2] === 0x01) {\n // NOTE: at this stage it is known that the top bit is set\n ret += 0x10000000000000 + (this.words[1] * 0x4000000);\n } else if (this.length > 2) {\n assert(false, 'Number can only safely store up to 53 bits');\n }\n return (this.negative !== 0) ? -ret : ret;\n };\n\n BN.prototype.toJSON = function toJSON () {\n return this.toString(16);\n };\n\n BN.prototype.toBuffer = function toBuffer (endian, length) {\n assert(typeof Buffer !== 'undefined');\n return this.toArrayLike(Buffer, endian, length);\n };\n\n BN.prototype.toArray = function toArray (endian, length) {\n return this.toArrayLike(Array, endian, length);\n };\n\n BN.prototype.toArrayLike = function toArrayLike (ArrayType, endian, length) {\n var byteLength = this.byteLength();\n var reqLength = length || Math.max(1, byteLength);\n assert(byteLength <= reqLength, 'byte array longer than desired length');\n assert(reqLength > 0, 'Requested array length <= 0');\n\n this.strip();\n var littleEndian = endian === 'le';\n var res = new ArrayType(reqLength);\n\n var b, i;\n var q = this.clone();\n if (!littleEndian) {\n // Assume big-endian\n for (i = 0; i < reqLength - byteLength; i++) {\n res[i] = 0;\n }\n\n for (i = 0; !q.isZero(); i++) {\n b = q.andln(0xff);\n q.iushrn(8);\n\n res[reqLength - i - 1] = b;\n }\n } else {\n for (i = 0; !q.isZero(); i++) {\n b = q.andln(0xff);\n q.iushrn(8);\n\n res[i] = b;\n }\n\n for (; i < reqLength; i++) {\n res[i] = 0;\n }\n }\n\n return res;\n };\n\n if (Math.clz32) {\n BN.prototype._countBits = function _countBits (w) {\n return 32 - Math.clz32(w);\n };\n } else {\n BN.prototype._countBits = function _countBits (w) {\n var t = w;\n var r = 0;\n if (t >= 0x1000) {\n r += 13;\n t >>>= 13;\n }\n if (t >= 0x40) {\n r += 7;\n t >>>= 7;\n }\n if (t >= 0x8) {\n r += 4;\n t >>>= 4;\n }\n if (t >= 0x02) {\n r += 2;\n t >>>= 2;\n }\n return r + t;\n };\n }\n\n BN.prototype._zeroBits = function _zeroBits (w) {\n // Short-cut\n if (w === 0) return 26;\n\n var t = w;\n var r = 0;\n if ((t & 0x1fff) === 0) {\n r += 13;\n t >>>= 13;\n }\n if ((t & 0x7f) === 0) {\n r += 7;\n t >>>= 7;\n }\n if ((t & 0xf) === 0) {\n r += 4;\n t >>>= 4;\n }\n if ((t & 0x3) === 0) {\n r += 2;\n t >>>= 2;\n }\n if ((t & 0x1) === 0) {\n r++;\n }\n return r;\n };\n\n // Return number of used bits in a BN\n BN.prototype.bitLength = function bitLength () {\n var w = this.words[this.length - 1];\n var hi = this._countBits(w);\n return (this.length - 1) * 26 + hi;\n };\n\n function toBitArray (num) {\n var w = new Array(num.bitLength());\n\n for (var bit = 0; bit < w.length; bit++) {\n var off = (bit / 26) | 0;\n var wbit = bit % 26;\n\n w[bit] = (num.words[off] & (1 << wbit)) >>> wbit;\n }\n\n return w;\n }\n\n // Number of trailing zero bits\n BN.prototype.zeroBits = function zeroBits () {\n if (this.isZero()) return 0;\n\n var r = 0;\n for (var i = 0; i < this.length; i++) {\n var b = this._zeroBits(this.words[i]);\n r += b;\n if (b !== 26) break;\n }\n return r;\n };\n\n BN.prototype.byteLength = function byteLength () {\n return Math.ceil(this.bitLength() / 8);\n };\n\n BN.prototype.toTwos = function toTwos (width) {\n if (this.negative !== 0) {\n return this.abs().inotn(width).iaddn(1);\n }\n return this.clone();\n };\n\n BN.prototype.fromTwos = function fromTwos (width) {\n if (this.testn(width - 1)) {\n return this.notn(width).iaddn(1).ineg();\n }\n return this.clone();\n };\n\n BN.prototype.isNeg = function isNeg () {\n return this.negative !== 0;\n };\n\n // Return negative clone of `this`\n BN.prototype.neg = function neg () {\n return this.clone().ineg();\n };\n\n BN.prototype.ineg = function ineg () {\n if (!this.isZero()) {\n this.negative ^= 1;\n }\n\n return this;\n };\n\n // Or `num` with `this` in-place\n BN.prototype.iuor = function iuor (num) {\n while (this.length < num.length) {\n this.words[this.length++] = 0;\n }\n\n for (var i = 0; i < num.length; i++) {\n this.words[i] = this.words[i] | num.words[i];\n }\n\n return this.strip();\n };\n\n BN.prototype.ior = function ior (num) {\n assert((this.negative | num.negative) === 0);\n return this.iuor(num);\n };\n\n // Or `num` with `this`\n BN.prototype.or = function or (num) {\n if (this.length > num.length) return this.clone().ior(num);\n return num.clone().ior(this);\n };\n\n BN.prototype.uor = function uor (num) {\n if (this.length > num.length) return this.clone().iuor(num);\n return num.clone().iuor(this);\n };\n\n // And `num` with `this` in-place\n BN.prototype.iuand = function iuand (num) {\n // b = min-length(num, this)\n var b;\n if (this.length > num.length) {\n b = num;\n } else {\n b = this;\n }\n\n for (var i = 0; i < b.length; i++) {\n this.words[i] = this.words[i] & num.words[i];\n }\n\n this.length = b.length;\n\n return this.strip();\n };\n\n BN.prototype.iand = function iand (num) {\n assert((this.negative | num.negative) === 0);\n return this.iuand(num);\n };\n\n // And `num` with `this`\n BN.prototype.and = function and (num) {\n if (this.length > num.length) return this.clone().iand(num);\n return num.clone().iand(this);\n };\n\n BN.prototype.uand = function uand (num) {\n if (this.length > num.length) return this.clone().iuand(num);\n return num.clone().iuand(this);\n };\n\n // Xor `num` with `this` in-place\n BN.prototype.iuxor = function iuxor (num) {\n // a.length > b.length\n var a;\n var b;\n if (this.length > num.length) {\n a = this;\n b = num;\n } else {\n a = num;\n b = this;\n }\n\n for (var i = 0; i < b.length; i++) {\n this.words[i] = a.words[i] ^ b.words[i];\n }\n\n if (this !== a) {\n for (; i < a.length; i++) {\n this.words[i] = a.words[i];\n }\n }\n\n this.length = a.length;\n\n return this.strip();\n };\n\n BN.prototype.ixor = function ixor (num) {\n assert((this.negative | num.negative) === 0);\n return this.iuxor(num);\n };\n\n // Xor `num` with `this`\n BN.prototype.xor = function xor (num) {\n if (this.length > num.length) return this.clone().ixor(num);\n return num.clone().ixor(this);\n };\n\n BN.prototype.uxor = function uxor (num) {\n if (this.length > num.length) return this.clone().iuxor(num);\n return num.clone().iuxor(this);\n };\n\n // Not ``this`` with ``width`` bitwidth\n BN.prototype.inotn = function inotn (width) {\n assert(typeof width === 'number' && width >= 0);\n\n var bytesNeeded = Math.ceil(width / 26) | 0;\n var bitsLeft = width % 26;\n\n // Extend the buffer with leading zeroes\n this._expand(bytesNeeded);\n\n if (bitsLeft > 0) {\n bytesNeeded--;\n }\n\n // Handle complete words\n for (var i = 0; i < bytesNeeded; i++) {\n this.words[i] = ~this.words[i] & 0x3ffffff;\n }\n\n // Handle the residue\n if (bitsLeft > 0) {\n this.words[i] = ~this.words[i] & (0x3ffffff >> (26 - bitsLeft));\n }\n\n // And remove leading zeroes\n return this.strip();\n };\n\n BN.prototype.notn = function notn (width) {\n return this.clone().inotn(width);\n };\n\n // Set `bit` of `this`\n BN.prototype.setn = function setn (bit, val) {\n assert(typeof bit === 'number' && bit >= 0);\n\n var off = (bit / 26) | 0;\n var wbit = bit % 26;\n\n this._expand(off + 1);\n\n if (val) {\n this.words[off] = this.words[off] | (1 << wbit);\n } else {\n this.words[off] = this.words[off] & ~(1 << wbit);\n }\n\n return this.strip();\n };\n\n // Add `num` to `this` in-place\n BN.prototype.iadd = function iadd (num) {\n var r;\n\n // negative + positive\n if (this.negative !== 0 && num.negative === 0) {\n this.negative = 0;\n r = this.isub(num);\n this.negative ^= 1;\n return this._normSign();\n\n // positive + negative\n } else if (this.negative === 0 && num.negative !== 0) {\n num.negative = 0;\n r = this.isub(num);\n num.negative = 1;\n return r._normSign();\n }\n\n // a.length > b.length\n var a, b;\n if (this.length > num.length) {\n a = this;\n b = num;\n } else {\n a = num;\n b = this;\n }\n\n var carry = 0;\n for (var i = 0; i < b.length; i++) {\n r = (a.words[i] | 0) + (b.words[i] | 0) + carry;\n this.words[i] = r & 0x3ffffff;\n carry = r >>> 26;\n }\n for (; carry !== 0 && i < a.length; i++) {\n r = (a.words[i] | 0) + carry;\n this.words[i] = r & 0x3ffffff;\n carry = r >>> 26;\n }\n\n this.length = a.length;\n if (carry !== 0) {\n this.words[this.length] = carry;\n this.length++;\n // Copy the rest of the words\n } else if (a !== this) {\n for (; i < a.length; i++) {\n this.words[i] = a.words[i];\n }\n }\n\n return this;\n };\n\n // Add `num` to `this`\n BN.prototype.add = function add (num) {\n var res;\n if (num.negative !== 0 && this.negative === 0) {\n num.negative = 0;\n res = this.sub(num);\n num.negative ^= 1;\n return res;\n } else if (num.negative === 0 && this.negative !== 0) {\n this.negative = 0;\n res = num.sub(this);\n this.negative = 1;\n return res;\n }\n\n if (this.length > num.length) return this.clone().iadd(num);\n\n return num.clone().iadd(this);\n };\n\n // Subtract `num` from `this` in-place\n BN.prototype.isub = function isub (num) {\n // this - (-num) = this + num\n if (num.negative !== 0) {\n num.negative = 0;\n var r = this.iadd(num);\n num.negative = 1;\n return r._normSign();\n\n // -this - num = -(this + num)\n } else if (this.negative !== 0) {\n this.negative = 0;\n this.iadd(num);\n this.negative = 1;\n return this._normSign();\n }\n\n // At this point both numbers are positive\n var cmp = this.cmp(num);\n\n // Optimization - zeroify\n if (cmp === 0) {\n this.negative = 0;\n this.length = 1;\n this.words[0] = 0;\n return this;\n }\n\n // a > b\n var a, b;\n if (cmp > 0) {\n a = this;\n b = num;\n } else {\n a = num;\n b = this;\n }\n\n var carry = 0;\n for (var i = 0; i < b.length; i++) {\n r = (a.words[i] | 0) - (b.words[i] | 0) + carry;\n carry = r >> 26;\n this.words[i] = r & 0x3ffffff;\n }\n for (; carry !== 0 && i < a.length; i++) {\n r = (a.words[i] | 0) + carry;\n carry = r >> 26;\n this.words[i] = r & 0x3ffffff;\n }\n\n // Copy rest of the words\n if (carry === 0 && i < a.length && a !== this) {\n for (; i < a.length; i++) {\n this.words[i] = a.words[i];\n }\n }\n\n this.length = Math.max(this.length, i);\n\n if (a !== this) {\n this.negative = 1;\n }\n\n return this.strip();\n };\n\n // Subtract `num` from `this`\n BN.prototype.sub = function sub (num) {\n return this.clone().isub(num);\n };\n\n function smallMulTo (self, num, out) {\n out.negative = num.negative ^ self.negative;\n var len = (self.length + num.length) | 0;\n out.length = len;\n len = (len - 1) | 0;\n\n // Peel one iteration (compiler can't do it, because of code complexity)\n var a = self.words[0] | 0;\n var b = num.words[0] | 0;\n var r = a * b;\n\n var lo = r & 0x3ffffff;\n var carry = (r / 0x4000000) | 0;\n out.words[0] = lo;\n\n for (var k = 1; k < len; k++) {\n // Sum all words with the same `i + j = k` and accumulate `ncarry`,\n // note that ncarry could be >= 0x3ffffff\n var ncarry = carry >>> 26;\n var rword = carry & 0x3ffffff;\n var maxJ = Math.min(k, num.length - 1);\n for (var j = Math.max(0, k - self.length + 1); j <= maxJ; j++) {\n var i = (k - j) | 0;\n a = self.words[i] | 0;\n b = num.words[j] | 0;\n r = a * b + rword;\n ncarry += (r / 0x4000000) | 0;\n rword = r & 0x3ffffff;\n }\n out.words[k] = rword | 0;\n carry = ncarry | 0;\n }\n if (carry !== 0) {\n out.words[k] = carry | 0;\n } else {\n out.length--;\n }\n\n return out.strip();\n }\n\n // TODO(indutny): it may be reasonable to omit it for users who don't need\n // to work with 256-bit numbers, otherwise it gives 20% improvement for 256-bit\n // multiplication (like elliptic secp256k1).\n var comb10MulTo = function comb10MulTo (self, num, out) {\n var a = self.words;\n var b = num.words;\n var o = out.words;\n var c = 0;\n var lo;\n var mid;\n var hi;\n var a0 = a[0] | 0;\n var al0 = a0 & 0x1fff;\n var ah0 = a0 >>> 13;\n var a1 = a[1] | 0;\n var al1 = a1 & 0x1fff;\n var ah1 = a1 >>> 13;\n var a2 = a[2] | 0;\n var al2 = a2 & 0x1fff;\n var ah2 = a2 >>> 13;\n var a3 = a[3] | 0;\n var al3 = a3 & 0x1fff;\n var ah3 = a3 >>> 13;\n var a4 = a[4] | 0;\n var al4 = a4 & 0x1fff;\n var ah4 = a4 >>> 13;\n var a5 = a[5] | 0;\n var al5 = a5 & 0x1fff;\n var ah5 = a5 >>> 13;\n var a6 = a[6] | 0;\n var al6 = a6 & 0x1fff;\n var ah6 = a6 >>> 13;\n var a7 = a[7] | 0;\n var al7 = a7 & 0x1fff;\n var ah7 = a7 >>> 13;\n var a8 = a[8] | 0;\n var al8 = a8 & 0x1fff;\n var ah8 = a8 >>> 13;\n var a9 = a[9] | 0;\n var al9 = a9 & 0x1fff;\n var ah9 = a9 >>> 13;\n var b0 = b[0] | 0;\n var bl0 = b0 & 0x1fff;\n var bh0 = b0 >>> 13;\n var b1 = b[1] | 0;\n var bl1 = b1 & 0x1fff;\n var bh1 = b1 >>> 13;\n var b2 = b[2] | 0;\n var bl2 = b2 & 0x1fff;\n var bh2 = b2 >>> 13;\n var b3 = b[3] | 0;\n var bl3 = b3 & 0x1fff;\n var bh3 = b3 >>> 13;\n var b4 = b[4] | 0;\n var bl4 = b4 & 0x1fff;\n var bh4 = b4 >>> 13;\n var b5 = b[5] | 0;\n var bl5 = b5 & 0x1fff;\n var bh5 = b5 >>> 13;\n var b6 = b[6] | 0;\n var bl6 = b6 & 0x1fff;\n var bh6 = b6 >>> 13;\n var b7 = b[7] | 0;\n var bl7 = b7 & 0x1fff;\n var bh7 = b7 >>> 13;\n var b8 = b[8] | 0;\n var bl8 = b8 & 0x1fff;\n var bh8 = b8 >>> 13;\n var b9 = b[9] | 0;\n var bl9 = b9 & 0x1fff;\n var bh9 = b9 >>> 13;\n\n out.negative = self.negative ^ num.negative;\n out.length = 19;\n /* k = 0 */\n lo = Math.imul(al0, bl0);\n mid = Math.imul(al0, bh0);\n mid = (mid + Math.imul(ah0, bl0)) | 0;\n hi = Math.imul(ah0, bh0);\n var w0 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w0 >>> 26)) | 0;\n w0 &= 0x3ffffff;\n /* k = 1 */\n lo = Math.imul(al1, bl0);\n mid = Math.imul(al1, bh0);\n mid = (mid + Math.imul(ah1, bl0)) | 0;\n hi = Math.imul(ah1, bh0);\n lo = (lo + Math.imul(al0, bl1)) | 0;\n mid = (mid + Math.imul(al0, bh1)) | 0;\n mid = (mid + Math.imul(ah0, bl1)) | 0;\n hi = (hi + Math.imul(ah0, bh1)) | 0;\n var w1 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w1 >>> 26)) | 0;\n w1 &= 0x3ffffff;\n /* k = 2 */\n lo = Math.imul(al2, bl0);\n mid = Math.imul(al2, bh0);\n mid = (mid + Math.imul(ah2, bl0)) | 0;\n hi = Math.imul(ah2, bh0);\n lo = (lo + Math.imul(al1, bl1)) | 0;\n mid = (mid + Math.imul(al1, bh1)) | 0;\n mid = (mid + Math.imul(ah1, bl1)) | 0;\n hi = (hi + Math.imul(ah1, bh1)) | 0;\n lo = (lo + Math.imul(al0, bl2)) | 0;\n mid = (mid + Math.imul(al0, bh2)) | 0;\n mid = (mid + Math.imul(ah0, bl2)) | 0;\n hi = (hi + Math.imul(ah0, bh2)) | 0;\n var w2 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w2 >>> 26)) | 0;\n w2 &= 0x3ffffff;\n /* k = 3 */\n lo = Math.imul(al3, bl0);\n mid = Math.imul(al3, bh0);\n mid = (mid + Math.imul(ah3, bl0)) | 0;\n hi = Math.imul(ah3, bh0);\n lo = (lo + Math.imul(al2, bl1)) | 0;\n mid = (mid + Math.imul(al2, bh1)) | 0;\n mid = (mid + Math.imul(ah2, bl1)) | 0;\n hi = (hi + Math.imul(ah2, bh1)) | 0;\n lo = (lo + Math.imul(al1, bl2)) | 0;\n mid = (mid + Math.imul(al1, bh2)) | 0;\n mid = (mid + Math.imul(ah1, bl2)) | 0;\n hi = (hi + Math.imul(ah1, bh2)) | 0;\n lo = (lo + Math.imul(al0, bl3)) | 0;\n mid = (mid + Math.imul(al0, bh3)) | 0;\n mid = (mid + Math.imul(ah0, bl3)) | 0;\n hi = (hi + Math.imul(ah0, bh3)) | 0;\n var w3 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w3 >>> 26)) | 0;\n w3 &= 0x3ffffff;\n /* k = 4 */\n lo = Math.imul(al4, bl0);\n mid = Math.imul(al4, bh0);\n mid = (mid + Math.imul(ah4, bl0)) | 0;\n hi = Math.imul(ah4, bh0);\n lo = (lo + Math.imul(al3, bl1)) | 0;\n mid = (mid + Math.imul(al3, bh1)) | 0;\n mid = (mid + Math.imul(ah3, bl1)) | 0;\n hi = (hi + Math.imul(ah3, bh1)) | 0;\n lo = (lo + Math.imul(al2, bl2)) | 0;\n mid = (mid + Math.imul(al2, bh2)) | 0;\n mid = (mid + Math.imul(ah2, bl2)) | 0;\n hi = (hi + Math.imul(ah2, bh2)) | 0;\n lo = (lo + Math.imul(al1, bl3)) | 0;\n mid = (mid + Math.imul(al1, bh3)) | 0;\n mid = (mid + Math.imul(ah1, bl3)) | 0;\n hi = (hi + Math.imul(ah1, bh3)) | 0;\n lo = (lo + Math.imul(al0, bl4)) | 0;\n mid = (mid + Math.imul(al0, bh4)) | 0;\n mid = (mid + Math.imul(ah0, bl4)) | 0;\n hi = (hi + Math.imul(ah0, bh4)) | 0;\n var w4 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w4 >>> 26)) | 0;\n w4 &= 0x3ffffff;\n /* k = 5 */\n lo = Math.imul(al5, bl0);\n mid = Math.imul(al5, bh0);\n mid = (mid + Math.imul(ah5, bl0)) | 0;\n hi = Math.imul(ah5, bh0);\n lo = (lo + Math.imul(al4, bl1)) | 0;\n mid = (mid + Math.imul(al4, bh1)) | 0;\n mid = (mid + Math.imul(ah4, bl1)) | 0;\n hi = (hi + Math.imul(ah4, bh1)) | 0;\n lo = (lo + Math.imul(al3, bl2)) | 0;\n mid = (mid + Math.imul(al3, bh2)) | 0;\n mid = (mid + Math.imul(ah3, bl2)) | 0;\n hi = (hi + Math.imul(ah3, bh2)) | 0;\n lo = (lo + Math.imul(al2, bl3)) | 0;\n mid = (mid + Math.imul(al2, bh3)) | 0;\n mid = (mid + Math.imul(ah2, bl3)) | 0;\n hi = (hi + Math.imul(ah2, bh3)) | 0;\n lo = (lo + Math.imul(al1, bl4)) | 0;\n mid = (mid + Math.imul(al1, bh4)) | 0;\n mid = (mid + Math.imul(ah1, bl4)) | 0;\n hi = (hi + Math.imul(ah1, bh4)) | 0;\n lo = (lo + Math.imul(al0, bl5)) | 0;\n mid = (mid + Math.imul(al0, bh5)) | 0;\n mid = (mid + Math.imul(ah0, bl5)) | 0;\n hi = (hi + Math.imul(ah0, bh5)) | 0;\n var w5 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w5 >>> 26)) | 0;\n w5 &= 0x3ffffff;\n /* k = 6 */\n lo = Math.imul(al6, bl0);\n mid = Math.imul(al6, bh0);\n mid = (mid + Math.imul(ah6, bl0)) | 0;\n hi = Math.imul(ah6, bh0);\n lo = (lo + Math.imul(al5, bl1)) | 0;\n mid = (mid + Math.imul(al5, bh1)) | 0;\n mid = (mid + Math.imul(ah5, bl1)) | 0;\n hi = (hi + Math.imul(ah5, bh1)) | 0;\n lo = (lo + Math.imul(al4, bl2)) | 0;\n mid = (mid + Math.imul(al4, bh2)) | 0;\n mid = (mid + Math.imul(ah4, bl2)) | 0;\n hi = (hi + Math.imul(ah4, bh2)) | 0;\n lo = (lo + Math.imul(al3, bl3)) | 0;\n mid = (mid + Math.imul(al3, bh3)) | 0;\n mid = (mid + Math.imul(ah3, bl3)) | 0;\n hi = (hi + Math.imul(ah3, bh3)) | 0;\n lo = (lo + Math.imul(al2, bl4)) | 0;\n mid = (mid + Math.imul(al2, bh4)) | 0;\n mid = (mid + Math.imul(ah2, bl4)) | 0;\n hi = (hi + Math.imul(ah2, bh4)) | 0;\n lo = (lo + Math.imul(al1, bl5)) | 0;\n mid = (mid + Math.imul(al1, bh5)) | 0;\n mid = (mid + Math.imul(ah1, bl5)) | 0;\n hi = (hi + Math.imul(ah1, bh5)) | 0;\n lo = (lo + Math.imul(al0, bl6)) | 0;\n mid = (mid + Math.imul(al0, bh6)) | 0;\n mid = (mid + Math.imul(ah0, bl6)) | 0;\n hi = (hi + Math.imul(ah0, bh6)) | 0;\n var w6 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w6 >>> 26)) | 0;\n w6 &= 0x3ffffff;\n /* k = 7 */\n lo = Math.imul(al7, bl0);\n mid = Math.imul(al7, bh0);\n mid = (mid + Math.imul(ah7, bl0)) | 0;\n hi = Math.imul(ah7, bh0);\n lo = (lo + Math.imul(al6, bl1)) | 0;\n mid = (mid + Math.imul(al6, bh1)) | 0;\n mid = (mid + Math.imul(ah6, bl1)) | 0;\n hi = (hi + Math.imul(ah6, bh1)) | 0;\n lo = (lo + Math.imul(al5, bl2)) | 0;\n mid = (mid + Math.imul(al5, bh2)) | 0;\n mid = (mid + Math.imul(ah5, bl2)) | 0;\n hi = (hi + Math.imul(ah5, bh2)) | 0;\n lo = (lo + Math.imul(al4, bl3)) | 0;\n mid = (mid + Math.imul(al4, bh3)) | 0;\n mid = (mid + Math.imul(ah4, bl3)) | 0;\n hi = (hi + Math.imul(ah4, bh3)) | 0;\n lo = (lo + Math.imul(al3, bl4)) | 0;\n mid = (mid + Math.imul(al3, bh4)) | 0;\n mid = (mid + Math.imul(ah3, bl4)) | 0;\n hi = (hi + Math.imul(ah3, bh4)) | 0;\n lo = (lo + Math.imul(al2, bl5)) | 0;\n mid = (mid + Math.imul(al2, bh5)) | 0;\n mid = (mid + Math.imul(ah2, bl5)) | 0;\n hi = (hi + Math.imul(ah2, bh5)) | 0;\n lo = (lo + Math.imul(al1, bl6)) | 0;\n mid = (mid + Math.imul(al1, bh6)) | 0;\n mid = (mid + Math.imul(ah1, bl6)) | 0;\n hi = (hi + Math.imul(ah1, bh6)) | 0;\n lo = (lo + Math.imul(al0, bl7)) | 0;\n mid = (mid + Math.imul(al0, bh7)) | 0;\n mid = (mid + Math.imul(ah0, bl7)) | 0;\n hi = (hi + Math.imul(ah0, bh7)) | 0;\n var w7 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w7 >>> 26)) | 0;\n w7 &= 0x3ffffff;\n /* k = 8 */\n lo = Math.imul(al8, bl0);\n mid = Math.imul(al8, bh0);\n mid = (mid + Math.imul(ah8, bl0)) | 0;\n hi = Math.imul(ah8, bh0);\n lo = (lo + Math.imul(al7, bl1)) | 0;\n mid = (mid + Math.imul(al7, bh1)) | 0;\n mid = (mid + Math.imul(ah7, bl1)) | 0;\n hi = (hi + Math.imul(ah7, bh1)) | 0;\n lo = (lo + Math.imul(al6, bl2)) | 0;\n mid = (mid + Math.imul(al6, bh2)) | 0;\n mid = (mid + Math.imul(ah6, bl2)) | 0;\n hi = (hi + Math.imul(ah6, bh2)) | 0;\n lo = (lo + Math.imul(al5, bl3)) | 0;\n mid = (mid + Math.imul(al5, bh3)) | 0;\n mid = (mid + Math.imul(ah5, bl3)) | 0;\n hi = (hi + Math.imul(ah5, bh3)) | 0;\n lo = (lo + Math.imul(al4, bl4)) | 0;\n mid = (mid + Math.imul(al4, bh4)) | 0;\n mid = (mid + Math.imul(ah4, bl4)) | 0;\n hi = (hi + Math.imul(ah4, bh4)) | 0;\n lo = (lo + Math.imul(al3, bl5)) | 0;\n mid = (mid + Math.imul(al3, bh5)) | 0;\n mid = (mid + Math.imul(ah3, bl5)) | 0;\n hi = (hi + Math.imul(ah3, bh5)) | 0;\n lo = (lo + Math.imul(al2, bl6)) | 0;\n mid = (mid + Math.imul(al2, bh6)) | 0;\n mid = (mid + Math.imul(ah2, bl6)) | 0;\n hi = (hi + Math.imul(ah2, bh6)) | 0;\n lo = (lo + Math.imul(al1, bl7)) | 0;\n mid = (mid + Math.imul(al1, bh7)) | 0;\n mid = (mid + Math.imul(ah1, bl7)) | 0;\n hi = (hi + Math.imul(ah1, bh7)) | 0;\n lo = (lo + Math.imul(al0, bl8)) | 0;\n mid = (mid + Math.imul(al0, bh8)) | 0;\n mid = (mid + Math.imul(ah0, bl8)) | 0;\n hi = (hi + Math.imul(ah0, bh8)) | 0;\n var w8 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w8 >>> 26)) | 0;\n w8 &= 0x3ffffff;\n /* k = 9 */\n lo = Math.imul(al9, bl0);\n mid = Math.imul(al9, bh0);\n mid = (mid + Math.imul(ah9, bl0)) | 0;\n hi = Math.imul(ah9, bh0);\n lo = (lo + Math.imul(al8, bl1)) | 0;\n mid = (mid + Math.imul(al8, bh1)) | 0;\n mid = (mid + Math.imul(ah8, bl1)) | 0;\n hi = (hi + Math.imul(ah8, bh1)) | 0;\n lo = (lo + Math.imul(al7, bl2)) | 0;\n mid = (mid + Math.imul(al7, bh2)) | 0;\n mid = (mid + Math.imul(ah7, bl2)) | 0;\n hi = (hi + Math.imul(ah7, bh2)) | 0;\n lo = (lo + Math.imul(al6, bl3)) | 0;\n mid = (mid + Math.imul(al6, bh3)) | 0;\n mid = (mid + Math.imul(ah6, bl3)) | 0;\n hi = (hi + Math.imul(ah6, bh3)) | 0;\n lo = (lo + Math.imul(al5, bl4)) | 0;\n mid = (mid + Math.imul(al5, bh4)) | 0;\n mid = (mid + Math.imul(ah5, bl4)) | 0;\n hi = (hi + Math.imul(ah5, bh4)) | 0;\n lo = (lo + Math.imul(al4, bl5)) | 0;\n mid = (mid + Math.imul(al4, bh5)) | 0;\n mid = (mid + Math.imul(ah4, bl5)) | 0;\n hi = (hi + Math.imul(ah4, bh5)) | 0;\n lo = (lo + Math.imul(al3, bl6)) | 0;\n mid = (mid + Math.imul(al3, bh6)) | 0;\n mid = (mid + Math.imul(ah3, bl6)) | 0;\n hi = (hi + Math.imul(ah3, bh6)) | 0;\n lo = (lo + Math.imul(al2, bl7)) | 0;\n mid = (mid + Math.imul(al2, bh7)) | 0;\n mid = (mid + Math.imul(ah2, bl7)) | 0;\n hi = (hi + Math.imul(ah2, bh7)) | 0;\n lo = (lo + Math.imul(al1, bl8)) | 0;\n mid = (mid + Math.imul(al1, bh8)) | 0;\n mid = (mid + Math.imul(ah1, bl8)) | 0;\n hi = (hi + Math.imul(ah1, bh8)) | 0;\n lo = (lo + Math.imul(al0, bl9)) | 0;\n mid = (mid + Math.imul(al0, bh9)) | 0;\n mid = (mid + Math.imul(ah0, bl9)) | 0;\n hi = (hi + Math.imul(ah0, bh9)) | 0;\n var w9 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w9 >>> 26)) | 0;\n w9 &= 0x3ffffff;\n /* k = 10 */\n lo = Math.imul(al9, bl1);\n mid = Math.imul(al9, bh1);\n mid = (mid + Math.imul(ah9, bl1)) | 0;\n hi = Math.imul(ah9, bh1);\n lo = (lo + Math.imul(al8, bl2)) | 0;\n mid = (mid + Math.imul(al8, bh2)) | 0;\n mid = (mid + Math.imul(ah8, bl2)) | 0;\n hi = (hi + Math.imul(ah8, bh2)) | 0;\n lo = (lo + Math.imul(al7, bl3)) | 0;\n mid = (mid + Math.imul(al7, bh3)) | 0;\n mid = (mid + Math.imul(ah7, bl3)) | 0;\n hi = (hi + Math.imul(ah7, bh3)) | 0;\n lo = (lo + Math.imul(al6, bl4)) | 0;\n mid = (mid + Math.imul(al6, bh4)) | 0;\n mid = (mid + Math.imul(ah6, bl4)) | 0;\n hi = (hi + Math.imul(ah6, bh4)) | 0;\n lo = (lo + Math.imul(al5, bl5)) | 0;\n mid = (mid + Math.imul(al5, bh5)) | 0;\n mid = (mid + Math.imul(ah5, bl5)) | 0;\n hi = (hi + Math.imul(ah5, bh5)) | 0;\n lo = (lo + Math.imul(al4, bl6)) | 0;\n mid = (mid + Math.imul(al4, bh6)) | 0;\n mid = (mid + Math.imul(ah4, bl6)) | 0;\n hi = (hi + Math.imul(ah4, bh6)) | 0;\n lo = (lo + Math.imul(al3, bl7)) | 0;\n mid = (mid + Math.imul(al3, bh7)) | 0;\n mid = (mid + Math.imul(ah3, bl7)) | 0;\n hi = (hi + Math.imul(ah3, bh7)) | 0;\n lo = (lo + Math.imul(al2, bl8)) | 0;\n mid = (mid + Math.imul(al2, bh8)) | 0;\n mid = (mid + Math.imul(ah2, bl8)) | 0;\n hi = (hi + Math.imul(ah2, bh8)) | 0;\n lo = (lo + Math.imul(al1, bl9)) | 0;\n mid = (mid + Math.imul(al1, bh9)) | 0;\n mid = (mid + Math.imul(ah1, bl9)) | 0;\n hi = (hi + Math.imul(ah1, bh9)) | 0;\n var w10 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w10 >>> 26)) | 0;\n w10 &= 0x3ffffff;\n /* k = 11 */\n lo = Math.imul(al9, bl2);\n mid = Math.imul(al9, bh2);\n mid = (mid + Math.imul(ah9, bl2)) | 0;\n hi = Math.imul(ah9, bh2);\n lo = (lo + Math.imul(al8, bl3)) | 0;\n mid = (mid + Math.imul(al8, bh3)) | 0;\n mid = (mid + Math.imul(ah8, bl3)) | 0;\n hi = (hi + Math.imul(ah8, bh3)) | 0;\n lo = (lo + Math.imul(al7, bl4)) | 0;\n mid = (mid + Math.imul(al7, bh4)) | 0;\n mid = (mid + Math.imul(ah7, bl4)) | 0;\n hi = (hi + Math.imul(ah7, bh4)) | 0;\n lo = (lo + Math.imul(al6, bl5)) | 0;\n mid = (mid + Math.imul(al6, bh5)) | 0;\n mid = (mid + Math.imul(ah6, bl5)) | 0;\n hi = (hi + Math.imul(ah6, bh5)) | 0;\n lo = (lo + Math.imul(al5, bl6)) | 0;\n mid = (mid + Math.imul(al5, bh6)) | 0;\n mid = (mid + Math.imul(ah5, bl6)) | 0;\n hi = (hi + Math.imul(ah5, bh6)) | 0;\n lo = (lo + Math.imul(al4, bl7)) | 0;\n mid = (mid + Math.imul(al4, bh7)) | 0;\n mid = (mid + Math.imul(ah4, bl7)) | 0;\n hi = (hi + Math.imul(ah4, bh7)) | 0;\n lo = (lo + Math.imul(al3, bl8)) | 0;\n mid = (mid + Math.imul(al3, bh8)) | 0;\n mid = (mid + Math.imul(ah3, bl8)) | 0;\n hi = (hi + Math.imul(ah3, bh8)) | 0;\n lo = (lo + Math.imul(al2, bl9)) | 0;\n mid = (mid + Math.imul(al2, bh9)) | 0;\n mid = (mid + Math.imul(ah2, bl9)) | 0;\n hi = (hi + Math.imul(ah2, bh9)) | 0;\n var w11 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w11 >>> 26)) | 0;\n w11 &= 0x3ffffff;\n /* k = 12 */\n lo = Math.imul(al9, bl3);\n mid = Math.imul(al9, bh3);\n mid = (mid + Math.imul(ah9, bl3)) | 0;\n hi = Math.imul(ah9, bh3);\n lo = (lo + Math.imul(al8, bl4)) | 0;\n mid = (mid + Math.imul(al8, bh4)) | 0;\n mid = (mid + Math.imul(ah8, bl4)) | 0;\n hi = (hi + Math.imul(ah8, bh4)) | 0;\n lo = (lo + Math.imul(al7, bl5)) | 0;\n mid = (mid + Math.imul(al7, bh5)) | 0;\n mid = (mid + Math.imul(ah7, bl5)) | 0;\n hi = (hi + Math.imul(ah7, bh5)) | 0;\n lo = (lo + Math.imul(al6, bl6)) | 0;\n mid = (mid + Math.imul(al6, bh6)) | 0;\n mid = (mid + Math.imul(ah6, bl6)) | 0;\n hi = (hi + Math.imul(ah6, bh6)) | 0;\n lo = (lo + Math.imul(al5, bl7)) | 0;\n mid = (mid + Math.imul(al5, bh7)) | 0;\n mid = (mid + Math.imul(ah5, bl7)) | 0;\n hi = (hi + Math.imul(ah5, bh7)) | 0;\n lo = (lo + Math.imul(al4, bl8)) | 0;\n mid = (mid + Math.imul(al4, bh8)) | 0;\n mid = (mid + Math.imul(ah4, bl8)) | 0;\n hi = (hi + Math.imul(ah4, bh8)) | 0;\n lo = (lo + Math.imul(al3, bl9)) | 0;\n mid = (mid + Math.imul(al3, bh9)) | 0;\n mid = (mid + Math.imul(ah3, bl9)) | 0;\n hi = (hi + Math.imul(ah3, bh9)) | 0;\n var w12 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w12 >>> 26)) | 0;\n w12 &= 0x3ffffff;\n /* k = 13 */\n lo = Math.imul(al9, bl4);\n mid = Math.imul(al9, bh4);\n mid = (mid + Math.imul(ah9, bl4)) | 0;\n hi = Math.imul(ah9, bh4);\n lo = (lo + Math.imul(al8, bl5)) | 0;\n mid = (mid + Math.imul(al8, bh5)) | 0;\n mid = (mid + Math.imul(ah8, bl5)) | 0;\n hi = (hi + Math.imul(ah8, bh5)) | 0;\n lo = (lo + Math.imul(al7, bl6)) | 0;\n mid = (mid + Math.imul(al7, bh6)) | 0;\n mid = (mid + Math.imul(ah7, bl6)) | 0;\n hi = (hi + Math.imul(ah7, bh6)) | 0;\n lo = (lo + Math.imul(al6, bl7)) | 0;\n mid = (mid + Math.imul(al6, bh7)) | 0;\n mid = (mid + Math.imul(ah6, bl7)) | 0;\n hi = (hi + Math.imul(ah6, bh7)) | 0;\n lo = (lo + Math.imul(al5, bl8)) | 0;\n mid = (mid + Math.imul(al5, bh8)) | 0;\n mid = (mid + Math.imul(ah5, bl8)) | 0;\n hi = (hi + Math.imul(ah5, bh8)) | 0;\n lo = (lo + Math.imul(al4, bl9)) | 0;\n mid = (mid + Math.imul(al4, bh9)) | 0;\n mid = (mid + Math.imul(ah4, bl9)) | 0;\n hi = (hi + Math.imul(ah4, bh9)) | 0;\n var w13 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w13 >>> 26)) | 0;\n w13 &= 0x3ffffff;\n /* k = 14 */\n lo = Math.imul(al9, bl5);\n mid = Math.imul(al9, bh5);\n mid = (mid + Math.imul(ah9, bl5)) | 0;\n hi = Math.imul(ah9, bh5);\n lo = (lo + Math.imul(al8, bl6)) | 0;\n mid = (mid + Math.imul(al8, bh6)) | 0;\n mid = (mid + Math.imul(ah8, bl6)) | 0;\n hi = (hi + Math.imul(ah8, bh6)) | 0;\n lo = (lo + Math.imul(al7, bl7)) | 0;\n mid = (mid + Math.imul(al7, bh7)) | 0;\n mid = (mid + Math.imul(ah7, bl7)) | 0;\n hi = (hi + Math.imul(ah7, bh7)) | 0;\n lo = (lo + Math.imul(al6, bl8)) | 0;\n mid = (mid + Math.imul(al6, bh8)) | 0;\n mid = (mid + Math.imul(ah6, bl8)) | 0;\n hi = (hi + Math.imul(ah6, bh8)) | 0;\n lo = (lo + Math.imul(al5, bl9)) | 0;\n mid = (mid + Math.imul(al5, bh9)) | 0;\n mid = (mid + Math.imul(ah5, bl9)) | 0;\n hi = (hi + Math.imul(ah5, bh9)) | 0;\n var w14 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w14 >>> 26)) | 0;\n w14 &= 0x3ffffff;\n /* k = 15 */\n lo = Math.imul(al9, bl6);\n mid = Math.imul(al9, bh6);\n mid = (mid + Math.imul(ah9, bl6)) | 0;\n hi = Math.imul(ah9, bh6);\n lo = (lo + Math.imul(al8, bl7)) | 0;\n mid = (mid + Math.imul(al8, bh7)) | 0;\n mid = (mid + Math.imul(ah8, bl7)) | 0;\n hi = (hi + Math.imul(ah8, bh7)) | 0;\n lo = (lo + Math.imul(al7, bl8)) | 0;\n mid = (mid + Math.imul(al7, bh8)) | 0;\n mid = (mid + Math.imul(ah7, bl8)) | 0;\n hi = (hi + Math.imul(ah7, bh8)) | 0;\n lo = (lo + Math.imul(al6, bl9)) | 0;\n mid = (mid + Math.imul(al6, bh9)) | 0;\n mid = (mid + Math.imul(ah6, bl9)) | 0;\n hi = (hi + Math.imul(ah6, bh9)) | 0;\n var w15 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w15 >>> 26)) | 0;\n w15 &= 0x3ffffff;\n /* k = 16 */\n lo = Math.imul(al9, bl7);\n mid = Math.imul(al9, bh7);\n mid = (mid + Math.imul(ah9, bl7)) | 0;\n hi = Math.imul(ah9, bh7);\n lo = (lo + Math.imul(al8, bl8)) | 0;\n mid = (mid + Math.imul(al8, bh8)) | 0;\n mid = (mid + Math.imul(ah8, bl8)) | 0;\n hi = (hi + Math.imul(ah8, bh8)) | 0;\n lo = (lo + Math.imul(al7, bl9)) | 0;\n mid = (mid + Math.imul(al7, bh9)) | 0;\n mid = (mid + Math.imul(ah7, bl9)) | 0;\n hi = (hi + Math.imul(ah7, bh9)) | 0;\n var w16 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w16 >>> 26)) | 0;\n w16 &= 0x3ffffff;\n /* k = 17 */\n lo = Math.imul(al9, bl8);\n mid = Math.imul(al9, bh8);\n mid = (mid + Math.imul(ah9, bl8)) | 0;\n hi = Math.imul(ah9, bh8);\n lo = (lo + Math.imul(al8, bl9)) | 0;\n mid = (mid + Math.imul(al8, bh9)) | 0;\n mid = (mid + Math.imul(ah8, bl9)) | 0;\n hi = (hi + Math.imul(ah8, bh9)) | 0;\n var w17 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w17 >>> 26)) | 0;\n w17 &= 0x3ffffff;\n /* k = 18 */\n lo = Math.imul(al9, bl9);\n mid = Math.imul(al9, bh9);\n mid = (mid + Math.imul(ah9, bl9)) | 0;\n hi = Math.imul(ah9, bh9);\n var w18 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w18 >>> 26)) | 0;\n w18 &= 0x3ffffff;\n o[0] = w0;\n o[1] = w1;\n o[2] = w2;\n o[3] = w3;\n o[4] = w4;\n o[5] = w5;\n o[6] = w6;\n o[7] = w7;\n o[8] = w8;\n o[9] = w9;\n o[10] = w10;\n o[11] = w11;\n o[12] = w12;\n o[13] = w13;\n o[14] = w14;\n o[15] = w15;\n o[16] = w16;\n o[17] = w17;\n o[18] = w18;\n if (c !== 0) {\n o[19] = c;\n out.length++;\n }\n return out;\n };\n\n // Polyfill comb\n if (!Math.imul) {\n comb10MulTo = smallMulTo;\n }\n\n function bigMulTo (self, num, out) {\n out.negative = num.negative ^ self.negative;\n out.length = self.length + num.length;\n\n var carry = 0;\n var hncarry = 0;\n for (var k = 0; k < out.length - 1; k++) {\n // Sum all words with the same `i + j = k` and accumulate `ncarry`,\n // note that ncarry could be >= 0x3ffffff\n var ncarry = hncarry;\n hncarry = 0;\n var rword = carry & 0x3ffffff;\n var maxJ = Math.min(k, num.length - 1);\n for (var j = Math.max(0, k - self.length + 1); j <= maxJ; j++) {\n var i = k - j;\n var a = self.words[i] | 0;\n var b = num.words[j] | 0;\n var r = a * b;\n\n var lo = r & 0x3ffffff;\n ncarry = (ncarry + ((r / 0x4000000) | 0)) | 0;\n lo = (lo + rword) | 0;\n rword = lo & 0x3ffffff;\n ncarry = (ncarry + (lo >>> 26)) | 0;\n\n hncarry += ncarry >>> 26;\n ncarry &= 0x3ffffff;\n }\n out.words[k] = rword;\n carry = ncarry;\n ncarry = hncarry;\n }\n if (carry !== 0) {\n out.words[k] = carry;\n } else {\n out.length--;\n }\n\n return out.strip();\n }\n\n function jumboMulTo (self, num, out) {\n var fftm = new FFTM();\n return fftm.mulp(self, num, out);\n }\n\n BN.prototype.mulTo = function mulTo (num, out) {\n var res;\n var len = this.length + num.length;\n if (this.length === 10 && num.length === 10) {\n res = comb10MulTo(this, num, out);\n } else if (len < 63) {\n res = smallMulTo(this, num, out);\n } else if (len < 1024) {\n res = bigMulTo(this, num, out);\n } else {\n res = jumboMulTo(this, num, out);\n }\n\n return res;\n };\n\n // Cooley-Tukey algorithm for FFT\n // slightly revisited to rely on looping instead of recursion\n\n function FFTM (x, y) {\n this.x = x;\n this.y = y;\n }\n\n FFTM.prototype.makeRBT = function makeRBT (N) {\n var t = new Array(N);\n var l = BN.prototype._countBits(N) - 1;\n for (var i = 0; i < N; i++) {\n t[i] = this.revBin(i, l, N);\n }\n\n return t;\n };\n\n // Returns binary-reversed representation of `x`\n FFTM.prototype.revBin = function revBin (x, l, N) {\n if (x === 0 || x === N - 1) return x;\n\n var rb = 0;\n for (var i = 0; i < l; i++) {\n rb |= (x & 1) << (l - i - 1);\n x >>= 1;\n }\n\n return rb;\n };\n\n // Performs \"tweedling\" phase, therefore 'emulating'\n // behaviour of the recursive algorithm\n FFTM.prototype.permute = function permute (rbt, rws, iws, rtws, itws, N) {\n for (var i = 0; i < N; i++) {\n rtws[i] = rws[rbt[i]];\n itws[i] = iws[rbt[i]];\n }\n };\n\n FFTM.prototype.transform = function transform (rws, iws, rtws, itws, N, rbt) {\n this.permute(rbt, rws, iws, rtws, itws, N);\n\n for (var s = 1; s < N; s <<= 1) {\n var l = s << 1;\n\n var rtwdf = Math.cos(2 * Math.PI / l);\n var itwdf = Math.sin(2 * Math.PI / l);\n\n for (var p = 0; p < N; p += l) {\n var rtwdf_ = rtwdf;\n var itwdf_ = itwdf;\n\n for (var j = 0; j < s; j++) {\n var re = rtws[p + j];\n var ie = itws[p + j];\n\n var ro = rtws[p + j + s];\n var io = itws[p + j + s];\n\n var rx = rtwdf_ * ro - itwdf_ * io;\n\n io = rtwdf_ * io + itwdf_ * ro;\n ro = rx;\n\n rtws[p + j] = re + ro;\n itws[p + j] = ie + io;\n\n rtws[p + j + s] = re - ro;\n itws[p + j + s] = ie - io;\n\n /* jshint maxdepth : false */\n if (j !== l) {\n rx = rtwdf * rtwdf_ - itwdf * itwdf_;\n\n itwdf_ = rtwdf * itwdf_ + itwdf * rtwdf_;\n rtwdf_ = rx;\n }\n }\n }\n }\n };\n\n FFTM.prototype.guessLen13b = function guessLen13b (n, m) {\n var N = Math.max(m, n) | 1;\n var odd = N & 1;\n var i = 0;\n for (N = N / 2 | 0; N; N = N >>> 1) {\n i++;\n }\n\n return 1 << i + 1 + odd;\n };\n\n FFTM.prototype.conjugate = function conjugate (rws, iws, N) {\n if (N <= 1) return;\n\n for (var i = 0; i < N / 2; i++) {\n var t = rws[i];\n\n rws[i] = rws[N - i - 1];\n rws[N - i - 1] = t;\n\n t = iws[i];\n\n iws[i] = -iws[N - i - 1];\n iws[N - i - 1] = -t;\n }\n };\n\n FFTM.prototype.normalize13b = function normalize13b (ws, N) {\n var carry = 0;\n for (var i = 0; i < N / 2; i++) {\n var w = Math.round(ws[2 * i + 1] / N) * 0x2000 +\n Math.round(ws[2 * i] / N) +\n carry;\n\n ws[i] = w & 0x3ffffff;\n\n if (w < 0x4000000) {\n carry = 0;\n } else {\n carry = w / 0x4000000 | 0;\n }\n }\n\n return ws;\n };\n\n FFTM.prototype.convert13b = function convert13b (ws, len, rws, N) {\n var carry = 0;\n for (var i = 0; i < len; i++) {\n carry = carry + (ws[i] | 0);\n\n rws[2 * i] = carry & 0x1fff; carry = carry >>> 13;\n rws[2 * i + 1] = carry & 0x1fff; carry = carry >>> 13;\n }\n\n // Pad with zeroes\n for (i = 2 * len; i < N; ++i) {\n rws[i] = 0;\n }\n\n assert(carry === 0);\n assert((carry & ~0x1fff) === 0);\n };\n\n FFTM.prototype.stub = function stub (N) {\n var ph = new Array(N);\n for (var i = 0; i < N; i++) {\n ph[i] = 0;\n }\n\n return ph;\n };\n\n FFTM.prototype.mulp = function mulp (x, y, out) {\n var N = 2 * this.guessLen13b(x.length, y.length);\n\n var rbt = this.makeRBT(N);\n\n var _ = this.stub(N);\n\n var rws = new Array(N);\n var rwst = new Array(N);\n var iwst = new Array(N);\n\n var nrws = new Array(N);\n var nrwst = new Array(N);\n var niwst = new Array(N);\n\n var rmws = out.words;\n rmws.length = N;\n\n this.convert13b(x.words, x.length, rws, N);\n this.convert13b(y.words, y.length, nrws, N);\n\n this.transform(rws, _, rwst, iwst, N, rbt);\n this.transform(nrws, _, nrwst, niwst, N, rbt);\n\n for (var i = 0; i < N; i++) {\n var rx = rwst[i] * nrwst[i] - iwst[i] * niwst[i];\n iwst[i] = rwst[i] * niwst[i] + iwst[i] * nrwst[i];\n rwst[i] = rx;\n }\n\n this.conjugate(rwst, iwst, N);\n this.transform(rwst, iwst, rmws, _, N, rbt);\n this.conjugate(rmws, _, N);\n this.normalize13b(rmws, N);\n\n out.negative = x.negative ^ y.negative;\n out.length = x.length + y.length;\n return out.strip();\n };\n\n // Multiply `this` by `num`\n BN.prototype.mul = function mul (num) {\n var out = new BN(null);\n out.words = new Array(this.length + num.length);\n return this.mulTo(num, out);\n };\n\n // Multiply employing FFT\n BN.prototype.mulf = function mulf (num) {\n var out = new BN(null);\n out.words = new Array(this.length + num.length);\n return jumboMulTo(this, num, out);\n };\n\n // In-place Multiplication\n BN.prototype.imul = function imul (num) {\n return this.clone().mulTo(num, this);\n };\n\n BN.prototype.imuln = function imuln (num) {\n assert(typeof num === 'number');\n assert(num < 0x4000000);\n\n // Carry\n var carry = 0;\n for (var i = 0; i < this.length; i++) {\n var w = (this.words[i] | 0) * num;\n var lo = (w & 0x3ffffff) + (carry & 0x3ffffff);\n carry >>= 26;\n carry += (w / 0x4000000) | 0;\n // NOTE: lo is 27bit maximum\n carry += lo >>> 26;\n this.words[i] = lo & 0x3ffffff;\n }\n\n if (carry !== 0) {\n this.words[i] = carry;\n this.length++;\n }\n\n return this;\n };\n\n BN.prototype.muln = function muln (num) {\n return this.clone().imuln(num);\n };\n\n // `this` * `this`\n BN.prototype.sqr = function sqr () {\n return this.mul(this);\n };\n\n // `this` * `this` in-place\n BN.prototype.isqr = function isqr () {\n return this.imul(this.clone());\n };\n\n // Math.pow(`this`, `num`)\n BN.prototype.pow = function pow (num) {\n var w = toBitArray(num);\n if (w.length === 0) return new BN(1);\n\n // Skip leading zeroes\n var res = this;\n for (var i = 0; i < w.length; i++, res = res.sqr()) {\n if (w[i] !== 0) break;\n }\n\n if (++i < w.length) {\n for (var q = res.sqr(); i < w.length; i++, q = q.sqr()) {\n if (w[i] === 0) continue;\n\n res = res.mul(q);\n }\n }\n\n return res;\n };\n\n // Shift-left in-place\n BN.prototype.iushln = function iushln (bits) {\n assert(typeof bits === 'number' && bits >= 0);\n var r = bits % 26;\n var s = (bits - r) / 26;\n var carryMask = (0x3ffffff >>> (26 - r)) << (26 - r);\n var i;\n\n if (r !== 0) {\n var carry = 0;\n\n for (i = 0; i < this.length; i++) {\n var newCarry = this.words[i] & carryMask;\n var c = ((this.words[i] | 0) - newCarry) << r;\n this.words[i] = c | carry;\n carry = newCarry >>> (26 - r);\n }\n\n if (carry) {\n this.words[i] = carry;\n this.length++;\n }\n }\n\n if (s !== 0) {\n for (i = this.length - 1; i >= 0; i--) {\n this.words[i + s] = this.words[i];\n }\n\n for (i = 0; i < s; i++) {\n this.words[i] = 0;\n }\n\n this.length += s;\n }\n\n return this.strip();\n };\n\n BN.prototype.ishln = function ishln (bits) {\n // TODO(indutny): implement me\n assert(this.negative === 0);\n return this.iushln(bits);\n };\n\n // Shift-right in-place\n // NOTE: `hint` is a lowest bit before trailing zeroes\n // NOTE: if `extended` is present - it will be filled with destroyed bits\n BN.prototype.iushrn = function iushrn (bits, hint, extended) {\n assert(typeof bits === 'number' && bits >= 0);\n var h;\n if (hint) {\n h = (hint - (hint % 26)) / 26;\n } else {\n h = 0;\n }\n\n var r = bits % 26;\n var s = Math.min((bits - r) / 26, this.length);\n var mask = 0x3ffffff ^ ((0x3ffffff >>> r) << r);\n var maskedWords = extended;\n\n h -= s;\n h = Math.max(0, h);\n\n // Extended mode, copy masked part\n if (maskedWords) {\n for (var i = 0; i < s; i++) {\n maskedWords.words[i] = this.words[i];\n }\n maskedWords.length = s;\n }\n\n if (s === 0) {\n // No-op, we should not move anything at all\n } else if (this.length > s) {\n this.length -= s;\n for (i = 0; i < this.length; i++) {\n this.words[i] = this.words[i + s];\n }\n } else {\n this.words[0] = 0;\n this.length = 1;\n }\n\n var carry = 0;\n for (i = this.length - 1; i >= 0 && (carry !== 0 || i >= h); i--) {\n var word = this.words[i] | 0;\n this.words[i] = (carry << (26 - r)) | (word >>> r);\n carry = word & mask;\n }\n\n // Push carried bits as a mask\n if (maskedWords && carry !== 0) {\n maskedWords.words[maskedWords.length++] = carry;\n }\n\n if (this.length === 0) {\n this.words[0] = 0;\n this.length = 1;\n }\n\n return this.strip();\n };\n\n BN.prototype.ishrn = function ishrn (bits, hint, extended) {\n // TODO(indutny): implement me\n assert(this.negative === 0);\n return this.iushrn(bits, hint, extended);\n };\n\n // Shift-left\n BN.prototype.shln = function shln (bits) {\n return this.clone().ishln(bits);\n };\n\n BN.prototype.ushln = function ushln (bits) {\n return this.clone().iushln(bits);\n };\n\n // Shift-right\n BN.prototype.shrn = function shrn (bits) {\n return this.clone().ishrn(bits);\n };\n\n BN.prototype.ushrn = function ushrn (bits) {\n return this.clone().iushrn(bits);\n };\n\n // Test if n bit is set\n BN.prototype.testn = function testn (bit) {\n assert(typeof bit === 'number' && bit >= 0);\n var r = bit % 26;\n var s = (bit - r) / 26;\n var q = 1 << r;\n\n // Fast case: bit is much higher than all existing words\n if (this.length <= s) return false;\n\n // Check bit and return\n var w = this.words[s];\n\n return !!(w & q);\n };\n\n // Return only lowers bits of number (in-place)\n BN.prototype.imaskn = function imaskn (bits) {\n assert(typeof bits === 'number' && bits >= 0);\n var r = bits % 26;\n var s = (bits - r) / 26;\n\n assert(this.negative === 0, 'imaskn works only with positive numbers');\n\n if (this.length <= s) {\n return this;\n }\n\n if (r !== 0) {\n s++;\n }\n this.length = Math.min(s, this.length);\n\n if (r !== 0) {\n var mask = 0x3ffffff ^ ((0x3ffffff >>> r) << r);\n this.words[this.length - 1] &= mask;\n }\n\n return this.strip();\n };\n\n // Return only lowers bits of number\n BN.prototype.maskn = function maskn (bits) {\n return this.clone().imaskn(bits);\n };\n\n // Add plain number `num` to `this`\n BN.prototype.iaddn = function iaddn (num) {\n assert(typeof num === 'number');\n assert(num < 0x4000000);\n if (num < 0) return this.isubn(-num);\n\n // Possible sign change\n if (this.negative !== 0) {\n if (this.length === 1 && (this.words[0] | 0) < num) {\n this.words[0] = num - (this.words[0] | 0);\n this.negative = 0;\n return this;\n }\n\n this.negative = 0;\n this.isubn(num);\n this.negative = 1;\n return this;\n }\n\n // Add without checks\n return this._iaddn(num);\n };\n\n BN.prototype._iaddn = function _iaddn (num) {\n this.words[0] += num;\n\n // Carry\n for (var i = 0; i < this.length && this.words[i] >= 0x4000000; i++) {\n this.words[i] -= 0x4000000;\n if (i === this.length - 1) {\n this.words[i + 1] = 1;\n } else {\n this.words[i + 1]++;\n }\n }\n this.length = Math.max(this.length, i + 1);\n\n return this;\n };\n\n // Subtract plain number `num` from `this`\n BN.prototype.isubn = function isubn (num) {\n assert(typeof num === 'number');\n assert(num < 0x4000000);\n if (num < 0) return this.iaddn(-num);\n\n if (this.negative !== 0) {\n this.negative = 0;\n this.iaddn(num);\n this.negative = 1;\n return this;\n }\n\n this.words[0] -= num;\n\n if (this.length === 1 && this.words[0] < 0) {\n this.words[0] = -this.words[0];\n this.negative = 1;\n } else {\n // Carry\n for (var i = 0; i < this.length && this.words[i] < 0; i++) {\n this.words[i] += 0x4000000;\n this.words[i + 1] -= 1;\n }\n }\n\n return this.strip();\n };\n\n BN.prototype.addn = function addn (num) {\n return this.clone().iaddn(num);\n };\n\n BN.prototype.subn = function subn (num) {\n return this.clone().isubn(num);\n };\n\n BN.prototype.iabs = function iabs () {\n this.negative = 0;\n\n return this;\n };\n\n BN.prototype.abs = function abs () {\n return this.clone().iabs();\n };\n\n BN.prototype._ishlnsubmul = function _ishlnsubmul (num, mul, shift) {\n var len = num.length + shift;\n var i;\n\n this._expand(len);\n\n var w;\n var carry = 0;\n for (i = 0; i < num.length; i++) {\n w = (this.words[i + shift] | 0) + carry;\n var right = (num.words[i] | 0) * mul;\n w -= right & 0x3ffffff;\n carry = (w >> 26) - ((right / 0x4000000) | 0);\n this.words[i + shift] = w & 0x3ffffff;\n }\n for (; i < this.length - shift; i++) {\n w = (this.words[i + shift] | 0) + carry;\n carry = w >> 26;\n this.words[i + shift] = w & 0x3ffffff;\n }\n\n if (carry === 0) return this.strip();\n\n // Subtraction overflow\n assert(carry === -1);\n carry = 0;\n for (i = 0; i < this.length; i++) {\n w = -(this.words[i] | 0) + carry;\n carry = w >> 26;\n this.words[i] = w & 0x3ffffff;\n }\n this.negative = 1;\n\n return this.strip();\n };\n\n BN.prototype._wordDiv = function _wordDiv (num, mode) {\n var shift = this.length - num.length;\n\n var a = this.clone();\n var b = num;\n\n // Normalize\n var bhi = b.words[b.length - 1] | 0;\n var bhiBits = this._countBits(bhi);\n shift = 26 - bhiBits;\n if (shift !== 0) {\n b = b.ushln(shift);\n a.iushln(shift);\n bhi = b.words[b.length - 1] | 0;\n }\n\n // Initialize quotient\n var m = a.length - b.length;\n var q;\n\n if (mode !== 'mod') {\n q = new BN(null);\n q.length = m + 1;\n q.words = new Array(q.length);\n for (var i = 0; i < q.length; i++) {\n q.words[i] = 0;\n }\n }\n\n var diff = a.clone()._ishlnsubmul(b, 1, m);\n if (diff.negative === 0) {\n a = diff;\n if (q) {\n q.words[m] = 1;\n }\n }\n\n for (var j = m - 1; j >= 0; j--) {\n var qj = (a.words[b.length + j] | 0) * 0x4000000 +\n (a.words[b.length + j - 1] | 0);\n\n // NOTE: (qj / bhi) is (0x3ffffff * 0x4000000 + 0x3ffffff) / 0x2000000 max\n // (0x7ffffff)\n qj = Math.min((qj / bhi) | 0, 0x3ffffff);\n\n a._ishlnsubmul(b, qj, j);\n while (a.negative !== 0) {\n qj--;\n a.negative = 0;\n a._ishlnsubmul(b, 1, j);\n if (!a.isZero()) {\n a.negative ^= 1;\n }\n }\n if (q) {\n q.words[j] = qj;\n }\n }\n if (q) {\n q.strip();\n }\n a.strip();\n\n // Denormalize\n if (mode !== 'div' && shift !== 0) {\n a.iushrn(shift);\n }\n\n return {\n div: q || null,\n mod: a\n };\n };\n\n // NOTE: 1) `mode` can be set to `mod` to request mod only,\n // to `div` to request div only, or be absent to\n // request both div & mod\n // 2) `positive` is true if unsigned mod is requested\n BN.prototype.divmod = function divmod (num, mode, positive) {\n assert(!num.isZero());\n\n if (this.isZero()) {\n return {\n div: new BN(0),\n mod: new BN(0)\n };\n }\n\n var div, mod, res;\n if (this.negative !== 0 && num.negative === 0) {\n res = this.neg().divmod(num, mode);\n\n if (mode !== 'mod') {\n div = res.div.neg();\n }\n\n if (mode !== 'div') {\n mod = res.mod.neg();\n if (positive && mod.negative !== 0) {\n mod.iadd(num);\n }\n }\n\n return {\n div: div,\n mod: mod\n };\n }\n\n if (this.negative === 0 && num.negative !== 0) {\n res = this.divmod(num.neg(), mode);\n\n if (mode !== 'mod') {\n div = res.div.neg();\n }\n\n return {\n div: div,\n mod: res.mod\n };\n }\n\n if ((this.negative & num.negative) !== 0) {\n res = this.neg().divmod(num.neg(), mode);\n\n if (mode !== 'div') {\n mod = res.mod.neg();\n if (positive && mod.negative !== 0) {\n mod.isub(num);\n }\n }\n\n return {\n div: res.div,\n mod: mod\n };\n }\n\n // Both numbers are positive at this point\n\n // Strip both numbers to approximate shift value\n if (num.length > this.length || this.cmp(num) < 0) {\n return {\n div: new BN(0),\n mod: this\n };\n }\n\n // Very short reduction\n if (num.length === 1) {\n if (mode === 'div') {\n return {\n div: this.divn(num.words[0]),\n mod: null\n };\n }\n\n if (mode === 'mod') {\n return {\n div: null,\n mod: new BN(this.modn(num.words[0]))\n };\n }\n\n return {\n div: this.divn(num.words[0]),\n mod: new BN(this.modn(num.words[0]))\n };\n }\n\n return this._wordDiv(num, mode);\n };\n\n // Find `this` / `num`\n BN.prototype.div = function div (num) {\n return this.divmod(num, 'div', false).div;\n };\n\n // Find `this` % `num`\n BN.prototype.mod = function mod (num) {\n return this.divmod(num, 'mod', false).mod;\n };\n\n BN.prototype.umod = function umod (num) {\n return this.divmod(num, 'mod', true).mod;\n };\n\n // Find Round(`this` / `num`)\n BN.prototype.divRound = function divRound (num) {\n var dm = this.divmod(num);\n\n // Fast case - exact division\n if (dm.mod.isZero()) return dm.div;\n\n var mod = dm.div.negative !== 0 ? dm.mod.isub(num) : dm.mod;\n\n var half = num.ushrn(1);\n var r2 = num.andln(1);\n var cmp = mod.cmp(half);\n\n // Round down\n if (cmp < 0 || r2 === 1 && cmp === 0) return dm.div;\n\n // Round up\n return dm.div.negative !== 0 ? dm.div.isubn(1) : dm.div.iaddn(1);\n };\n\n BN.prototype.modn = function modn (num) {\n assert(num <= 0x3ffffff);\n var p = (1 << 26) % num;\n\n var acc = 0;\n for (var i = this.length - 1; i >= 0; i--) {\n acc = (p * acc + (this.words[i] | 0)) % num;\n }\n\n return acc;\n };\n\n // In-place division by number\n BN.prototype.idivn = function idivn (num) {\n assert(num <= 0x3ffffff);\n\n var carry = 0;\n for (var i = this.length - 1; i >= 0; i--) {\n var w = (this.words[i] | 0) + carry * 0x4000000;\n this.words[i] = (w / num) | 0;\n carry = w % num;\n }\n\n return this.strip();\n };\n\n BN.prototype.divn = function divn (num) {\n return this.clone().idivn(num);\n };\n\n BN.prototype.egcd = function egcd (p) {\n assert(p.negative === 0);\n assert(!p.isZero());\n\n var x = this;\n var y = p.clone();\n\n if (x.negative !== 0) {\n x = x.umod(p);\n } else {\n x = x.clone();\n }\n\n // A * x + B * y = x\n var A = new BN(1);\n var B = new BN(0);\n\n // C * x + D * y = y\n var C = new BN(0);\n var D = new BN(1);\n\n var g = 0;\n\n while (x.isEven() && y.isEven()) {\n x.iushrn(1);\n y.iushrn(1);\n ++g;\n }\n\n var yp = y.clone();\n var xp = x.clone();\n\n while (!x.isZero()) {\n for (var i = 0, im = 1; (x.words[0] & im) === 0 && i < 26; ++i, im <<= 1);\n if (i > 0) {\n x.iushrn(i);\n while (i-- > 0) {\n if (A.isOdd() || B.isOdd()) {\n A.iadd(yp);\n B.isub(xp);\n }\n\n A.iushrn(1);\n B.iushrn(1);\n }\n }\n\n for (var j = 0, jm = 1; (y.words[0] & jm) === 0 && j < 26; ++j, jm <<= 1);\n if (j > 0) {\n y.iushrn(j);\n while (j-- > 0) {\n if (C.isOdd() || D.isOdd()) {\n C.iadd(yp);\n D.isub(xp);\n }\n\n C.iushrn(1);\n D.iushrn(1);\n }\n }\n\n if (x.cmp(y) >= 0) {\n x.isub(y);\n A.isub(C);\n B.isub(D);\n } else {\n y.isub(x);\n C.isub(A);\n D.isub(B);\n }\n }\n\n return {\n a: C,\n b: D,\n gcd: y.iushln(g)\n };\n };\n\n // This is reduced incarnation of the binary EEA\n // above, designated to invert members of the\n // _prime_ fields F(p) at a maximal speed\n BN.prototype._invmp = function _invmp (p) {\n assert(p.negative === 0);\n assert(!p.isZero());\n\n var a = this;\n var b = p.clone();\n\n if (a.negative !== 0) {\n a = a.umod(p);\n } else {\n a = a.clone();\n }\n\n var x1 = new BN(1);\n var x2 = new BN(0);\n\n var delta = b.clone();\n\n while (a.cmpn(1) > 0 && b.cmpn(1) > 0) {\n for (var i = 0, im = 1; (a.words[0] & im) === 0 && i < 26; ++i, im <<= 1);\n if (i > 0) {\n a.iushrn(i);\n while (i-- > 0) {\n if (x1.isOdd()) {\n x1.iadd(delta);\n }\n\n x1.iushrn(1);\n }\n }\n\n for (var j = 0, jm = 1; (b.words[0] & jm) === 0 && j < 26; ++j, jm <<= 1);\n if (j > 0) {\n b.iushrn(j);\n while (j-- > 0) {\n if (x2.isOdd()) {\n x2.iadd(delta);\n }\n\n x2.iushrn(1);\n }\n }\n\n if (a.cmp(b) >= 0) {\n a.isub(b);\n x1.isub(x2);\n } else {\n b.isub(a);\n x2.isub(x1);\n }\n }\n\n var res;\n if (a.cmpn(1) === 0) {\n res = x1;\n } else {\n res = x2;\n }\n\n if (res.cmpn(0) < 0) {\n res.iadd(p);\n }\n\n return res;\n };\n\n BN.prototype.gcd = function gcd (num) {\n if (this.isZero()) return num.abs();\n if (num.isZero()) return this.abs();\n\n var a = this.clone();\n var b = num.clone();\n a.negative = 0;\n b.negative = 0;\n\n // Remove common factor of two\n for (var shift = 0; a.isEven() && b.isEven(); shift++) {\n a.iushrn(1);\n b.iushrn(1);\n }\n\n do {\n while (a.isEven()) {\n a.iushrn(1);\n }\n while (b.isEven()) {\n b.iushrn(1);\n }\n\n var r = a.cmp(b);\n if (r < 0) {\n // Swap `a` and `b` to make `a` always bigger than `b`\n var t = a;\n a = b;\n b = t;\n } else if (r === 0 || b.cmpn(1) === 0) {\n break;\n }\n\n a.isub(b);\n } while (true);\n\n return b.iushln(shift);\n };\n\n // Invert number in the field F(num)\n BN.prototype.invm = function invm (num) {\n return this.egcd(num).a.umod(num);\n };\n\n BN.prototype.isEven = function isEven () {\n return (this.words[0] & 1) === 0;\n };\n\n BN.prototype.isOdd = function isOdd () {\n return (this.words[0] & 1) === 1;\n };\n\n // And first word and num\n BN.prototype.andln = function andln (num) {\n return this.words[0] & num;\n };\n\n // Increment at the bit position in-line\n BN.prototype.bincn = function bincn (bit) {\n assert(typeof bit === 'number');\n var r = bit % 26;\n var s = (bit - r) / 26;\n var q = 1 << r;\n\n // Fast case: bit is much higher than all existing words\n if (this.length <= s) {\n this._expand(s + 1);\n this.words[s] |= q;\n return this;\n }\n\n // Add bit and propagate, if needed\n var carry = q;\n for (var i = s; carry !== 0 && i < this.length; i++) {\n var w = this.words[i] | 0;\n w += carry;\n carry = w >>> 26;\n w &= 0x3ffffff;\n this.words[i] = w;\n }\n if (carry !== 0) {\n this.words[i] = carry;\n this.length++;\n }\n return this;\n };\n\n BN.prototype.isZero = function isZero () {\n return this.length === 1 && this.words[0] === 0;\n };\n\n BN.prototype.cmpn = function cmpn (num) {\n var negative = num < 0;\n\n if (this.negative !== 0 && !negative) return -1;\n if (this.negative === 0 && negative) return 1;\n\n this.strip();\n\n var res;\n if (this.length > 1) {\n res = 1;\n } else {\n if (negative) {\n num = -num;\n }\n\n assert(num <= 0x3ffffff, 'Number is too big');\n\n var w = this.words[0] | 0;\n res = w === num ? 0 : w < num ? -1 : 1;\n }\n if (this.negative !== 0) return -res | 0;\n return res;\n };\n\n // Compare two numbers and return:\n // 1 - if `this` > `num`\n // 0 - if `this` == `num`\n // -1 - if `this` < `num`\n BN.prototype.cmp = function cmp (num) {\n if (this.negative !== 0 && num.negative === 0) return -1;\n if (this.negative === 0 && num.negative !== 0) return 1;\n\n var res = this.ucmp(num);\n if (this.negative !== 0) return -res | 0;\n return res;\n };\n\n // Unsigned comparison\n BN.prototype.ucmp = function ucmp (num) {\n // At this point both numbers have the same sign\n if (this.length > num.length) return 1;\n if (this.length < num.length) return -1;\n\n var res = 0;\n for (var i = this.length - 1; i >= 0; i--) {\n var a = this.words[i] | 0;\n var b = num.words[i] | 0;\n\n if (a === b) continue;\n if (a < b) {\n res = -1;\n } else if (a > b) {\n res = 1;\n }\n break;\n }\n return res;\n };\n\n BN.prototype.gtn = function gtn (num) {\n return this.cmpn(num) === 1;\n };\n\n BN.prototype.gt = function gt (num) {\n return this.cmp(num) === 1;\n };\n\n BN.prototype.gten = function gten (num) {\n return this.cmpn(num) >= 0;\n };\n\n BN.prototype.gte = function gte (num) {\n return this.cmp(num) >= 0;\n };\n\n BN.prototype.ltn = function ltn (num) {\n return this.cmpn(num) === -1;\n };\n\n BN.prototype.lt = function lt (num) {\n return this.cmp(num) === -1;\n };\n\n BN.prototype.lten = function lten (num) {\n return this.cmpn(num) <= 0;\n };\n\n BN.prototype.lte = function lte (num) {\n return this.cmp(num) <= 0;\n };\n\n BN.prototype.eqn = function eqn (num) {\n return this.cmpn(num) === 0;\n };\n\n BN.prototype.eq = function eq (num) {\n return this.cmp(num) === 0;\n };\n\n //\n // A reduce context, could be using montgomery or something better, depending\n // on the `m` itself.\n //\n BN.red = function red (num) {\n return new Red(num);\n };\n\n BN.prototype.toRed = function toRed (ctx) {\n assert(!this.red, 'Already a number in reduction context');\n assert(this.negative === 0, 'red works only with positives');\n return ctx.convertTo(this)._forceRed(ctx);\n };\n\n BN.prototype.fromRed = function fromRed () {\n assert(this.red, 'fromRed works only with numbers in reduction context');\n return this.red.convertFrom(this);\n };\n\n BN.prototype._forceRed = function _forceRed (ctx) {\n this.red = ctx;\n return this;\n };\n\n BN.prototype.forceRed = function forceRed (ctx) {\n assert(!this.red, 'Already a number in reduction context');\n return this._forceRed(ctx);\n };\n\n BN.prototype.redAdd = function redAdd (num) {\n assert(this.red, 'redAdd works only with red numbers');\n return this.red.add(this, num);\n };\n\n BN.prototype.redIAdd = function redIAdd (num) {\n assert(this.red, 'redIAdd works only with red numbers');\n return this.red.iadd(this, num);\n };\n\n BN.prototype.redSub = function redSub (num) {\n assert(this.red, 'redSub works only with red numbers');\n return this.red.sub(this, num);\n };\n\n BN.prototype.redISub = function redISub (num) {\n assert(this.red, 'redISub works only with red numbers');\n return this.red.isub(this, num);\n };\n\n BN.prototype.redShl = function redShl (num) {\n assert(this.red, 'redShl works only with red numbers');\n return this.red.shl(this, num);\n };\n\n BN.prototype.redMul = function redMul (num) {\n assert(this.red, 'redMul works only with red numbers');\n this.red._verify2(this, num);\n return this.red.mul(this, num);\n };\n\n BN.prototype.redIMul = function redIMul (num) {\n assert(this.red, 'redMul works only with red numbers');\n this.red._verify2(this, num);\n return this.red.imul(this, num);\n };\n\n BN.prototype.redSqr = function redSqr () {\n assert(this.red, 'redSqr works only with red numbers');\n this.red._verify1(this);\n return this.red.sqr(this);\n };\n\n BN.prototype.redISqr = function redISqr () {\n assert(this.red, 'redISqr works only with red numbers');\n this.red._verify1(this);\n return this.red.isqr(this);\n };\n\n // Square root over p\n BN.prototype.redSqrt = function redSqrt () {\n assert(this.red, 'redSqrt works only with red numbers');\n this.red._verify1(this);\n return this.red.sqrt(this);\n };\n\n BN.prototype.redInvm = function redInvm () {\n assert(this.red, 'redInvm works only with red numbers');\n this.red._verify1(this);\n return this.red.invm(this);\n };\n\n // Return negative clone of `this` % `red modulo`\n BN.prototype.redNeg = function redNeg () {\n assert(this.red, 'redNeg works only with red numbers');\n this.red._verify1(this);\n return this.red.neg(this);\n };\n\n BN.prototype.redPow = function redPow (num) {\n assert(this.red && !num.red, 'redPow(normalNum)');\n this.red._verify1(this);\n return this.red.pow(this, num);\n };\n\n // Prime numbers with efficient reduction\n var primes = {\n k256: null,\n p224: null,\n p192: null,\n p25519: null\n };\n\n // Pseudo-Mersenne prime\n function MPrime (name, p) {\n // P = 2 ^ N - K\n this.name = name;\n this.p = new BN(p, 16);\n this.n = this.p.bitLength();\n this.k = new BN(1).iushln(this.n).isub(this.p);\n\n this.tmp = this._tmp();\n }\n\n MPrime.prototype._tmp = function _tmp () {\n var tmp = new BN(null);\n tmp.words = new Array(Math.ceil(this.n / 13));\n return tmp;\n };\n\n MPrime.prototype.ireduce = function ireduce (num) {\n // Assumes that `num` is less than `P^2`\n // num = HI * (2 ^ N - K) + HI * K + LO = HI * K + LO (mod P)\n var r = num;\n var rlen;\n\n do {\n this.split(r, this.tmp);\n r = this.imulK(r);\n r = r.iadd(this.tmp);\n rlen = r.bitLength();\n } while (rlen > this.n);\n\n var cmp = rlen < this.n ? -1 : r.ucmp(this.p);\n if (cmp === 0) {\n r.words[0] = 0;\n r.length = 1;\n } else if (cmp > 0) {\n r.isub(this.p);\n } else {\n if (r.strip !== undefined) {\n // r is BN v4 instance\n r.strip();\n } else {\n // r is BN v5 instance\n r._strip();\n }\n }\n\n return r;\n };\n\n MPrime.prototype.split = function split (input, out) {\n input.iushrn(this.n, 0, out);\n };\n\n MPrime.prototype.imulK = function imulK (num) {\n return num.imul(this.k);\n };\n\n function K256 () {\n MPrime.call(\n this,\n 'k256',\n 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f');\n }\n inherits(K256, MPrime);\n\n K256.prototype.split = function split (input, output) {\n // 256 = 9 * 26 + 22\n var mask = 0x3fffff;\n\n var outLen = Math.min(input.length, 9);\n for (var i = 0; i < outLen; i++) {\n output.words[i] = input.words[i];\n }\n output.length = outLen;\n\n if (input.length <= 9) {\n input.words[0] = 0;\n input.length = 1;\n return;\n }\n\n // Shift by 9 limbs\n var prev = input.words[9];\n output.words[output.length++] = prev & mask;\n\n for (i = 10; i < input.length; i++) {\n var next = input.words[i] | 0;\n input.words[i - 10] = ((next & mask) << 4) | (prev >>> 22);\n prev = next;\n }\n prev >>>= 22;\n input.words[i - 10] = prev;\n if (prev === 0 && input.length > 10) {\n input.length -= 10;\n } else {\n input.length -= 9;\n }\n };\n\n K256.prototype.imulK = function imulK (num) {\n // K = 0x1000003d1 = [ 0x40, 0x3d1 ]\n num.words[num.length] = 0;\n num.words[num.length + 1] = 0;\n num.length += 2;\n\n // bounded at: 0x40 * 0x3ffffff + 0x3d0 = 0x100000390\n var lo = 0;\n for (var i = 0; i < num.length; i++) {\n var w = num.words[i] | 0;\n lo += w * 0x3d1;\n num.words[i] = lo & 0x3ffffff;\n lo = w * 0x40 + ((lo / 0x4000000) | 0);\n }\n\n // Fast length reduction\n if (num.words[num.length - 1] === 0) {\n num.length--;\n if (num.words[num.length - 1] === 0) {\n num.length--;\n }\n }\n return num;\n };\n\n function P224 () {\n MPrime.call(\n this,\n 'p224',\n 'ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001');\n }\n inherits(P224, MPrime);\n\n function P192 () {\n MPrime.call(\n this,\n 'p192',\n 'ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff');\n }\n inherits(P192, MPrime);\n\n function P25519 () {\n // 2 ^ 255 - 19\n MPrime.call(\n this,\n '25519',\n '7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed');\n }\n inherits(P25519, MPrime);\n\n P25519.prototype.imulK = function imulK (num) {\n // K = 0x13\n var carry = 0;\n for (var i = 0; i < num.length; i++) {\n var hi = (num.words[i] | 0) * 0x13 + carry;\n var lo = hi & 0x3ffffff;\n hi >>>= 26;\n\n num.words[i] = lo;\n carry = hi;\n }\n if (carry !== 0) {\n num.words[num.length++] = carry;\n }\n return num;\n };\n\n // Exported mostly for testing purposes, use plain name instead\n BN._prime = function prime (name) {\n // Cached version of prime\n if (primes[name]) return primes[name];\n\n var prime;\n if (name === 'k256') {\n prime = new K256();\n } else if (name === 'p224') {\n prime = new P224();\n } else if (name === 'p192') {\n prime = new P192();\n } else if (name === 'p25519') {\n prime = new P25519();\n } else {\n throw new Error('Unknown prime ' + name);\n }\n primes[name] = prime;\n\n return prime;\n };\n\n //\n // Base reduction engine\n //\n function Red (m) {\n if (typeof m === 'string') {\n var prime = BN._prime(m);\n this.m = prime.p;\n this.prime = prime;\n } else {\n assert(m.gtn(1), 'modulus must be greater than 1');\n this.m = m;\n this.prime = null;\n }\n }\n\n Red.prototype._verify1 = function _verify1 (a) {\n assert(a.negative === 0, 'red works only with positives');\n assert(a.red, 'red works only with red numbers');\n };\n\n Red.prototype._verify2 = function _verify2 (a, b) {\n assert((a.negative | b.negative) === 0, 'red works only with positives');\n assert(a.red && a.red === b.red,\n 'red works only with red numbers');\n };\n\n Red.prototype.imod = function imod (a) {\n if (this.prime) return this.prime.ireduce(a)._forceRed(this);\n return a.umod(this.m)._forceRed(this);\n };\n\n Red.prototype.neg = function neg (a) {\n if (a.isZero()) {\n return a.clone();\n }\n\n return this.m.sub(a)._forceRed(this);\n };\n\n Red.prototype.add = function add (a, b) {\n this._verify2(a, b);\n\n var res = a.add(b);\n if (res.cmp(this.m) >= 0) {\n res.isub(this.m);\n }\n return res._forceRed(this);\n };\n\n Red.prototype.iadd = function iadd (a, b) {\n this._verify2(a, b);\n\n var res = a.iadd(b);\n if (res.cmp(this.m) >= 0) {\n res.isub(this.m);\n }\n return res;\n };\n\n Red.prototype.sub = function sub (a, b) {\n this._verify2(a, b);\n\n var res = a.sub(b);\n if (res.cmpn(0) < 0) {\n res.iadd(this.m);\n }\n return res._forceRed(this);\n };\n\n Red.prototype.isub = function isub (a, b) {\n this._verify2(a, b);\n\n var res = a.isub(b);\n if (res.cmpn(0) < 0) {\n res.iadd(this.m);\n }\n return res;\n };\n\n Red.prototype.shl = function shl (a, num) {\n this._verify1(a);\n return this.imod(a.ushln(num));\n };\n\n Red.prototype.imul = function imul (a, b) {\n this._verify2(a, b);\n return this.imod(a.imul(b));\n };\n\n Red.prototype.mul = function mul (a, b) {\n this._verify2(a, b);\n return this.imod(a.mul(b));\n };\n\n Red.prototype.isqr = function isqr (a) {\n return this.imul(a, a.clone());\n };\n\n Red.prototype.sqr = function sqr (a) {\n return this.mul(a, a);\n };\n\n Red.prototype.sqrt = function sqrt (a) {\n if (a.isZero()) return a.clone();\n\n var mod3 = this.m.andln(3);\n assert(mod3 % 2 === 1);\n\n // Fast case\n if (mod3 === 3) {\n var pow = this.m.add(new BN(1)).iushrn(2);\n return this.pow(a, pow);\n }\n\n // Tonelli-Shanks algorithm (Totally unoptimized and slow)\n //\n // Find Q and S, that Q * 2 ^ S = (P - 1)\n var q = this.m.subn(1);\n var s = 0;\n while (!q.isZero() && q.andln(1) === 0) {\n s++;\n q.iushrn(1);\n }\n assert(!q.isZero());\n\n var one = new BN(1).toRed(this);\n var nOne = one.redNeg();\n\n // Find quadratic non-residue\n // NOTE: Max is such because of generalized Riemann hypothesis.\n var lpow = this.m.subn(1).iushrn(1);\n var z = this.m.bitLength();\n z = new BN(2 * z * z).toRed(this);\n\n while (this.pow(z, lpow).cmp(nOne) !== 0) {\n z.redIAdd(nOne);\n }\n\n var c = this.pow(z, q);\n var r = this.pow(a, q.addn(1).iushrn(1));\n var t = this.pow(a, q);\n var m = s;\n while (t.cmp(one) !== 0) {\n var tmp = t;\n for (var i = 0; tmp.cmp(one) !== 0; i++) {\n tmp = tmp.redSqr();\n }\n assert(i < m);\n var b = this.pow(c, new BN(1).iushln(m - i - 1));\n\n r = r.redMul(b);\n c = b.redSqr();\n t = t.redMul(c);\n m = i;\n }\n\n return r;\n };\n\n Red.prototype.invm = function invm (a) {\n var inv = a._invmp(this.m);\n if (inv.negative !== 0) {\n inv.negative = 0;\n return this.imod(inv).redNeg();\n } else {\n return this.imod(inv);\n }\n };\n\n Red.prototype.pow = function pow (a, num) {\n if (num.isZero()) return new BN(1).toRed(this);\n if (num.cmpn(1) === 0) return a.clone();\n\n var windowSize = 4;\n var wnd = new Array(1 << windowSize);\n wnd[0] = new BN(1).toRed(this);\n wnd[1] = a;\n for (var i = 2; i < wnd.length; i++) {\n wnd[i] = this.mul(wnd[i - 1], a);\n }\n\n var res = wnd[0];\n var current = 0;\n var currentLen = 0;\n var start = num.bitLength() % 26;\n if (start === 0) {\n start = 26;\n }\n\n for (i = num.length - 1; i >= 0; i--) {\n var word = num.words[i];\n for (var j = start - 1; j >= 0; j--) {\n var bit = (word >> j) & 1;\n if (res !== wnd[0]) {\n res = this.sqr(res);\n }\n\n if (bit === 0 && current === 0) {\n currentLen = 0;\n continue;\n }\n\n current <<= 1;\n current |= bit;\n currentLen++;\n if (currentLen !== windowSize && (i !== 0 || j !== 0)) continue;\n\n res = this.mul(res, wnd[current]);\n currentLen = 0;\n current = 0;\n }\n start = 26;\n }\n\n return res;\n };\n\n Red.prototype.convertTo = function convertTo (num) {\n var r = num.umod(this.m);\n\n return r === num ? r.clone() : r;\n };\n\n Red.prototype.convertFrom = function convertFrom (num) {\n var res = num.clone();\n res.red = null;\n return res;\n };\n\n //\n // Montgomery method engine\n //\n\n BN.mont = function mont (num) {\n return new Mont(num);\n };\n\n function Mont (m) {\n Red.call(this, m);\n\n this.shift = this.m.bitLength();\n if (this.shift % 26 !== 0) {\n this.shift += 26 - (this.shift % 26);\n }\n\n this.r = new BN(1).iushln(this.shift);\n this.r2 = this.imod(this.r.sqr());\n this.rinv = this.r._invmp(this.m);\n\n this.minv = this.rinv.mul(this.r).isubn(1).div(this.m);\n this.minv = this.minv.umod(this.r);\n this.minv = this.r.sub(this.minv);\n }\n inherits(Mont, Red);\n\n Mont.prototype.convertTo = function convertTo (num) {\n return this.imod(num.ushln(this.shift));\n };\n\n Mont.prototype.convertFrom = function convertFrom (num) {\n var r = this.imod(num.mul(this.rinv));\n r.red = null;\n return r;\n };\n\n Mont.prototype.imul = function imul (a, b) {\n if (a.isZero() || b.isZero()) {\n a.words[0] = 0;\n a.length = 1;\n return a;\n }\n\n var t = a.imul(b);\n var c = t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m);\n var u = t.isub(c).iushrn(this.shift);\n var res = u;\n\n if (u.cmp(this.m) >= 0) {\n res = u.isub(this.m);\n } else if (u.cmpn(0) < 0) {\n res = u.iadd(this.m);\n }\n\n return res._forceRed(this);\n };\n\n Mont.prototype.mul = function mul (a, b) {\n if (a.isZero() || b.isZero()) return new BN(0)._forceRed(this);\n\n var t = a.mul(b);\n var c = t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m);\n var u = t.isub(c).iushrn(this.shift);\n var res = u;\n if (u.cmp(this.m) >= 0) {\n res = u.isub(this.m);\n } else if (u.cmpn(0) < 0) {\n res = u.iadd(this.m);\n }\n\n return res._forceRed(this);\n };\n\n Mont.prototype.invm = function invm (a) {\n // (AR)^-1 * R^2 = (A^-1 * R^-1) * R^2 = A^-1 * R\n var res = this.imod(a._invmp(this.m).mul(this.r2));\n return res._forceRed(this);\n };\n})(typeof module === 'undefined' || module, this);\n","'use strict'\nvar inherits = require('inherits')\nvar MD5 = require('md5.js')\nvar RIPEMD160 = require('ripemd160')\nvar sha = require('sha.js')\nvar Base = require('cipher-base')\n\nfunction Hash (hash) {\n Base.call(this, 'digest')\n\n this._hash = hash\n}\n\ninherits(Hash, Base)\n\nHash.prototype._update = function (data) {\n this._hash.update(data)\n}\n\nHash.prototype._final = function () {\n return this._hash.digest()\n}\n\nmodule.exports = function createHash (alg) {\n alg = alg.toLowerCase()\n if (alg === 'md5') return new MD5()\n if (alg === 'rmd160' || alg === 'ripemd160') return new RIPEMD160()\n\n return new Hash(sha(alg))\n}\n","var MD5 = require('md5.js')\n\nmodule.exports = function (buffer) {\n return new MD5().update(buffer).digest()\n}\n","'use strict'\nvar inherits = require('inherits')\nvar Legacy = require('./legacy')\nvar Base = require('cipher-base')\nvar Buffer = require('safe-buffer').Buffer\nvar md5 = require('create-hash/md5')\nvar RIPEMD160 = require('ripemd160')\n\nvar sha = require('sha.js')\n\nvar ZEROS = Buffer.alloc(128)\n\nfunction Hmac (alg, key) {\n Base.call(this, 'digest')\n if (typeof key === 'string') {\n key = Buffer.from(key)\n }\n\n var blocksize = (alg === 'sha512' || alg === 'sha384') ? 128 : 64\n\n this._alg = alg\n this._key = key\n if (key.length > blocksize) {\n var hash = alg === 'rmd160' ? new RIPEMD160() : sha(alg)\n key = hash.update(key).digest()\n } else if (key.length < blocksize) {\n key = Buffer.concat([key, ZEROS], blocksize)\n }\n\n var ipad = this._ipad = Buffer.allocUnsafe(blocksize)\n var opad = this._opad = Buffer.allocUnsafe(blocksize)\n\n for (var i = 0; i < blocksize; i++) {\n ipad[i] = key[i] ^ 0x36\n opad[i] = key[i] ^ 0x5C\n }\n this._hash = alg === 'rmd160' ? new RIPEMD160() : sha(alg)\n this._hash.update(ipad)\n}\n\ninherits(Hmac, Base)\n\nHmac.prototype._update = function (data) {\n this._hash.update(data)\n}\n\nHmac.prototype._final = function () {\n var h = this._hash.digest()\n var hash = this._alg === 'rmd160' ? new RIPEMD160() : sha(this._alg)\n return hash.update(this._opad).update(h).digest()\n}\n\nmodule.exports = function createHmac (alg, key) {\n alg = alg.toLowerCase()\n if (alg === 'rmd160' || alg === 'ripemd160') {\n return new Hmac('rmd160', key)\n }\n if (alg === 'md5') {\n return new Legacy(md5, key)\n }\n return new Hmac(alg, key)\n}\n","'use strict'\nvar inherits = require('inherits')\nvar Buffer = require('safe-buffer').Buffer\n\nvar Base = require('cipher-base')\n\nvar ZEROS = Buffer.alloc(128)\nvar blocksize = 64\n\nfunction Hmac (alg, key) {\n Base.call(this, 'digest')\n if (typeof key === 'string') {\n key = Buffer.from(key)\n }\n\n this._alg = alg\n this._key = key\n\n if (key.length > blocksize) {\n key = alg(key)\n } else if (key.length < blocksize) {\n key = Buffer.concat([key, ZEROS], blocksize)\n }\n\n var ipad = this._ipad = Buffer.allocUnsafe(blocksize)\n var opad = this._opad = Buffer.allocUnsafe(blocksize)\n\n for (var i = 0; i < blocksize; i++) {\n ipad[i] = key[i] ^ 0x36\n opad[i] = key[i] ^ 0x5C\n }\n\n this._hash = [ipad]\n}\n\ninherits(Hmac, Base)\n\nHmac.prototype._update = function (data) {\n this._hash.push(data)\n}\n\nHmac.prototype._final = function () {\n var h = this._alg(Buffer.concat(this._hash))\n return this._alg(Buffer.concat([this._opad, h]))\n}\nmodule.exports = Hmac\n","'use strict'\n\nexports.randomBytes = exports.rng = exports.pseudoRandomBytes = exports.prng = require('randombytes')\nexports.createHash = exports.Hash = require('create-hash')\nexports.createHmac = exports.Hmac = require('create-hmac')\n\nvar algos = require('browserify-sign/algos')\nvar algoKeys = Object.keys(algos)\nvar hashes = ['sha1', 'sha224', 'sha256', 'sha384', 'sha512', 'md5', 'rmd160'].concat(algoKeys)\nexports.getHashes = function () {\n return hashes\n}\n\nvar p = require('pbkdf2')\nexports.pbkdf2 = p.pbkdf2\nexports.pbkdf2Sync = p.pbkdf2Sync\n\nvar aes = require('browserify-cipher')\n\nexports.Cipher = aes.Cipher\nexports.createCipher = aes.createCipher\nexports.Cipheriv = aes.Cipheriv\nexports.createCipheriv = aes.createCipheriv\nexports.Decipher = aes.Decipher\nexports.createDecipher = aes.createDecipher\nexports.Decipheriv = aes.Decipheriv\nexports.createDecipheriv = aes.createDecipheriv\nexports.getCiphers = aes.getCiphers\nexports.listCiphers = aes.listCiphers\n\nvar dh = require('diffie-hellman')\n\nexports.DiffieHellmanGroup = dh.DiffieHellmanGroup\nexports.createDiffieHellmanGroup = dh.createDiffieHellmanGroup\nexports.getDiffieHellman = dh.getDiffieHellman\nexports.createDiffieHellman = dh.createDiffieHellman\nexports.DiffieHellman = dh.DiffieHellman\n\nvar sign = require('browserify-sign')\n\nexports.createSign = sign.createSign\nexports.Sign = sign.Sign\nexports.createVerify = sign.createVerify\nexports.Verify = sign.Verify\n\nexports.createECDH = require('create-ecdh')\n\nvar publicEncrypt = require('public-encrypt')\n\nexports.publicEncrypt = publicEncrypt.publicEncrypt\nexports.privateEncrypt = publicEncrypt.privateEncrypt\nexports.publicDecrypt = publicEncrypt.publicDecrypt\nexports.privateDecrypt = publicEncrypt.privateDecrypt\n\n// the least I can do is make error messages for the rest of the node.js/crypto api.\n// ;[\n// 'createCredentials'\n// ].forEach(function (name) {\n// exports[name] = function () {\n// throw new Error([\n// 'sorry, ' + name + ' is not implemented yet',\n// 'we accept pull requests',\n// 'https://github.com/crypto-browserify/crypto-browserify'\n// ].join('\\n'))\n// }\n// })\n\nvar rf = require('randomfill')\n\nexports.randomFill = rf.randomFill\nexports.randomFillSync = rf.randomFillSync\n\nexports.createCredentials = function () {\n throw new Error([\n 'sorry, createCredentials is not implemented yet',\n 'we accept pull requests',\n 'https://github.com/crypto-browserify/crypto-browserify'\n ].join('\\n'))\n}\n\nexports.constants = {\n 'DH_CHECK_P_NOT_SAFE_PRIME': 2,\n 'DH_CHECK_P_NOT_PRIME': 1,\n 'DH_UNABLE_TO_CHECK_GENERATOR': 4,\n 'DH_NOT_SUITABLE_GENERATOR': 8,\n 'NPN_ENABLED': 1,\n 'ALPN_ENABLED': 1,\n 'RSA_PKCS1_PADDING': 1,\n 'RSA_SSLV23_PADDING': 2,\n 'RSA_NO_PADDING': 3,\n 'RSA_PKCS1_OAEP_PADDING': 4,\n 'RSA_X931_PADDING': 5,\n 'RSA_PKCS1_PSS_PADDING': 6,\n 'POINT_CONVERSION_COMPRESSED': 2,\n 'POINT_CONVERSION_UNCOMPRESSED': 4,\n 'POINT_CONVERSION_HYBRID': 6\n}\n","/*\n\tMIT License http://www.opensource.org/licenses/mit-license.php\n\tAuthor Tobias Koppers @sokra\n*/\n// css base code, injected by the css-loader\nmodule.exports = function(useSourceMap) {\n\tvar list = [];\n\n\t// return the list of modules as css string\n\tlist.toString = function toString() {\n\t\treturn this.map(function (item) {\n\t\t\tvar content = cssWithMappingToString(item, useSourceMap);\n\t\t\tif(item[2]) {\n\t\t\t\treturn \"@media \" + item[2] + \"{\" + content + \"}\";\n\t\t\t} else {\n\t\t\t\treturn content;\n\t\t\t}\n\t\t}).join(\"\");\n\t};\n\n\t// import a list of modules into the list\n\tlist.i = function(modules, mediaQuery) {\n\t\tif(typeof modules === \"string\")\n\t\t\tmodules = [[null, modules, \"\"]];\n\t\tvar alreadyImportedModules = {};\n\t\tfor(var i = 0; i < this.length; i++) {\n\t\t\tvar id = this[i][0];\n\t\t\tif(typeof id === \"number\")\n\t\t\t\talreadyImportedModules[id] = true;\n\t\t}\n\t\tfor(i = 0; i < modules.length; i++) {\n\t\t\tvar item = modules[i];\n\t\t\t// skip already imported module\n\t\t\t// this implementation is not 100% perfect for weird media query combinations\n\t\t\t// when a module is imported multiple times with different media queries.\n\t\t\t// I hope this will never occur (Hey this way we have smaller bundles)\n\t\t\tif(typeof item[0] !== \"number\" || !alreadyImportedModules[item[0]]) {\n\t\t\t\tif(mediaQuery && !item[2]) {\n\t\t\t\t\titem[2] = mediaQuery;\n\t\t\t\t} else if(mediaQuery) {\n\t\t\t\t\titem[2] = \"(\" + item[2] + \") and (\" + mediaQuery + \")\";\n\t\t\t\t}\n\t\t\t\tlist.push(item);\n\t\t\t}\n\t\t}\n\t};\n\treturn list;\n};\n\nfunction cssWithMappingToString(item, useSourceMap) {\n\tvar content = item[1] || '';\n\tvar cssMapping = item[3];\n\tif (!cssMapping) {\n\t\treturn content;\n\t}\n\n\tif (useSourceMap && typeof btoa === 'function') {\n\t\tvar sourceMapping = toComment(cssMapping);\n\t\tvar sourceURLs = cssMapping.sources.map(function (source) {\n\t\t\treturn '/*# sourceURL=' + cssMapping.sourceRoot + source + ' */'\n\t\t});\n\n\t\treturn [content].concat(sourceURLs).concat([sourceMapping]).join('\\n');\n\t}\n\n\treturn [content].join('\\n');\n}\n\n// Adapted from convert-source-map (MIT)\nfunction toComment(sourceMap) {\n\t// eslint-disable-next-line no-undef\n\tvar base64 = btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap))));\n\tvar data = 'sourceMappingURL=data:application/json;charset=utf-8;base64,' + base64;\n\n\treturn '/*# ' + data + ' */';\n}\n","'use strict';\n\nexports.utils = require('./des/utils');\nexports.Cipher = require('./des/cipher');\nexports.DES = require('./des/des');\nexports.CBC = require('./des/cbc');\nexports.EDE = require('./des/ede');\n","'use strict';\n\nvar assert = require('minimalistic-assert');\nvar inherits = require('inherits');\n\nvar proto = {};\n\nfunction CBCState(iv) {\n assert.equal(iv.length, 8, 'Invalid IV length');\n\n this.iv = new Array(8);\n for (var i = 0; i < this.iv.length; i++)\n this.iv[i] = iv[i];\n}\n\nfunction instantiate(Base) {\n function CBC(options) {\n Base.call(this, options);\n this._cbcInit();\n }\n inherits(CBC, Base);\n\n var keys = Object.keys(proto);\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n CBC.prototype[key] = proto[key];\n }\n\n CBC.create = function create(options) {\n return new CBC(options);\n };\n\n return CBC;\n}\n\nexports.instantiate = instantiate;\n\nproto._cbcInit = function _cbcInit() {\n var state = new CBCState(this.options.iv);\n this._cbcState = state;\n};\n\nproto._update = function _update(inp, inOff, out, outOff) {\n var state = this._cbcState;\n var superProto = this.constructor.super_.prototype;\n\n var iv = state.iv;\n if (this.type === 'encrypt') {\n for (var i = 0; i < this.blockSize; i++)\n iv[i] ^= inp[inOff + i];\n\n superProto._update.call(this, iv, 0, out, outOff);\n\n for (var i = 0; i < this.blockSize; i++)\n iv[i] = out[outOff + i];\n } else {\n superProto._update.call(this, inp, inOff, out, outOff);\n\n for (var i = 0; i < this.blockSize; i++)\n out[outOff + i] ^= iv[i];\n\n for (var i = 0; i < this.blockSize; i++)\n iv[i] = inp[inOff + i];\n }\n};\n","'use strict';\n\nvar assert = require('minimalistic-assert');\n\nfunction Cipher(options) {\n this.options = options;\n\n this.type = this.options.type;\n this.blockSize = 8;\n this._init();\n\n this.buffer = new Array(this.blockSize);\n this.bufferOff = 0;\n this.padding = options.padding !== false\n}\nmodule.exports = Cipher;\n\nCipher.prototype._init = function _init() {\n // Might be overrided\n};\n\nCipher.prototype.update = function update(data) {\n if (data.length === 0)\n return [];\n\n if (this.type === 'decrypt')\n return this._updateDecrypt(data);\n else\n return this._updateEncrypt(data);\n};\n\nCipher.prototype._buffer = function _buffer(data, off) {\n // Append data to buffer\n var min = Math.min(this.buffer.length - this.bufferOff, data.length - off);\n for (var i = 0; i < min; i++)\n this.buffer[this.bufferOff + i] = data[off + i];\n this.bufferOff += min;\n\n // Shift next\n return min;\n};\n\nCipher.prototype._flushBuffer = function _flushBuffer(out, off) {\n this._update(this.buffer, 0, out, off);\n this.bufferOff = 0;\n return this.blockSize;\n};\n\nCipher.prototype._updateEncrypt = function _updateEncrypt(data) {\n var inputOff = 0;\n var outputOff = 0;\n\n var count = ((this.bufferOff + data.length) / this.blockSize) | 0;\n var out = new Array(count * this.blockSize);\n\n if (this.bufferOff !== 0) {\n inputOff += this._buffer(data, inputOff);\n\n if (this.bufferOff === this.buffer.length)\n outputOff += this._flushBuffer(out, outputOff);\n }\n\n // Write blocks\n var max = data.length - ((data.length - inputOff) % this.blockSize);\n for (; inputOff < max; inputOff += this.blockSize) {\n this._update(data, inputOff, out, outputOff);\n outputOff += this.blockSize;\n }\n\n // Queue rest\n for (; inputOff < data.length; inputOff++, this.bufferOff++)\n this.buffer[this.bufferOff] = data[inputOff];\n\n return out;\n};\n\nCipher.prototype._updateDecrypt = function _updateDecrypt(data) {\n var inputOff = 0;\n var outputOff = 0;\n\n var count = Math.ceil((this.bufferOff + data.length) / this.blockSize) - 1;\n var out = new Array(count * this.blockSize);\n\n // TODO(indutny): optimize it, this is far from optimal\n for (; count > 0; count--) {\n inputOff += this._buffer(data, inputOff);\n outputOff += this._flushBuffer(out, outputOff);\n }\n\n // Buffer rest of the input\n inputOff += this._buffer(data, inputOff);\n\n return out;\n};\n\nCipher.prototype.final = function final(buffer) {\n var first;\n if (buffer)\n first = this.update(buffer);\n\n var last;\n if (this.type === 'encrypt')\n last = this._finalEncrypt();\n else\n last = this._finalDecrypt();\n\n if (first)\n return first.concat(last);\n else\n return last;\n};\n\nCipher.prototype._pad = function _pad(buffer, off) {\n if (off === 0)\n return false;\n\n while (off < buffer.length)\n buffer[off++] = 0;\n\n return true;\n};\n\nCipher.prototype._finalEncrypt = function _finalEncrypt() {\n if (!this._pad(this.buffer, this.bufferOff))\n return [];\n\n var out = new Array(this.blockSize);\n this._update(this.buffer, 0, out, 0);\n return out;\n};\n\nCipher.prototype._unpad = function _unpad(buffer) {\n return buffer;\n};\n\nCipher.prototype._finalDecrypt = function _finalDecrypt() {\n assert.equal(this.bufferOff, this.blockSize, 'Not enough data to decrypt');\n var out = new Array(this.blockSize);\n this._flushBuffer(out, 0);\n\n return this._unpad(out);\n};\n","'use strict';\n\nvar assert = require('minimalistic-assert');\nvar inherits = require('inherits');\n\nvar utils = require('./utils');\nvar Cipher = require('./cipher');\n\nfunction DESState() {\n this.tmp = new Array(2);\n this.keys = null;\n}\n\nfunction DES(options) {\n Cipher.call(this, options);\n\n var state = new DESState();\n this._desState = state;\n\n this.deriveKeys(state, options.key);\n}\ninherits(DES, Cipher);\nmodule.exports = DES;\n\nDES.create = function create(options) {\n return new DES(options);\n};\n\nvar shiftTable = [\n 1, 1, 2, 2, 2, 2, 2, 2,\n 1, 2, 2, 2, 2, 2, 2, 1\n];\n\nDES.prototype.deriveKeys = function deriveKeys(state, key) {\n state.keys = new Array(16 * 2);\n\n assert.equal(key.length, this.blockSize, 'Invalid key length');\n\n var kL = utils.readUInt32BE(key, 0);\n var kR = utils.readUInt32BE(key, 4);\n\n utils.pc1(kL, kR, state.tmp, 0);\n kL = state.tmp[0];\n kR = state.tmp[1];\n for (var i = 0; i < state.keys.length; i += 2) {\n var shift = shiftTable[i >>> 1];\n kL = utils.r28shl(kL, shift);\n kR = utils.r28shl(kR, shift);\n utils.pc2(kL, kR, state.keys, i);\n }\n};\n\nDES.prototype._update = function _update(inp, inOff, out, outOff) {\n var state = this._desState;\n\n var l = utils.readUInt32BE(inp, inOff);\n var r = utils.readUInt32BE(inp, inOff + 4);\n\n // Initial Permutation\n utils.ip(l, r, state.tmp, 0);\n l = state.tmp[0];\n r = state.tmp[1];\n\n if (this.type === 'encrypt')\n this._encrypt(state, l, r, state.tmp, 0);\n else\n this._decrypt(state, l, r, state.tmp, 0);\n\n l = state.tmp[0];\n r = state.tmp[1];\n\n utils.writeUInt32BE(out, l, outOff);\n utils.writeUInt32BE(out, r, outOff + 4);\n};\n\nDES.prototype._pad = function _pad(buffer, off) {\n if (this.padding === false) {\n return false;\n }\n\n var value = buffer.length - off;\n for (var i = off; i < buffer.length; i++)\n buffer[i] = value;\n\n return true;\n};\n\nDES.prototype._unpad = function _unpad(buffer) {\n if (this.padding === false) {\n return buffer;\n }\n\n var pad = buffer[buffer.length - 1];\n for (var i = buffer.length - pad; i < buffer.length; i++)\n assert.equal(buffer[i], pad);\n\n return buffer.slice(0, buffer.length - pad);\n};\n\nDES.prototype._encrypt = function _encrypt(state, lStart, rStart, out, off) {\n var l = lStart;\n var r = rStart;\n\n // Apply f() x16 times\n for (var i = 0; i < state.keys.length; i += 2) {\n var keyL = state.keys[i];\n var keyR = state.keys[i + 1];\n\n // f(r, k)\n utils.expand(r, state.tmp, 0);\n\n keyL ^= state.tmp[0];\n keyR ^= state.tmp[1];\n var s = utils.substitute(keyL, keyR);\n var f = utils.permute(s);\n\n var t = r;\n r = (l ^ f) >>> 0;\n l = t;\n }\n\n // Reverse Initial Permutation\n utils.rip(r, l, out, off);\n};\n\nDES.prototype._decrypt = function _decrypt(state, lStart, rStart, out, off) {\n var l = rStart;\n var r = lStart;\n\n // Apply f() x16 times\n for (var i = state.keys.length - 2; i >= 0; i -= 2) {\n var keyL = state.keys[i];\n var keyR = state.keys[i + 1];\n\n // f(r, k)\n utils.expand(l, state.tmp, 0);\n\n keyL ^= state.tmp[0];\n keyR ^= state.tmp[1];\n var s = utils.substitute(keyL, keyR);\n var f = utils.permute(s);\n\n var t = l;\n l = (r ^ f) >>> 0;\n r = t;\n }\n\n // Reverse Initial Permutation\n utils.rip(l, r, out, off);\n};\n","'use strict';\n\nvar assert = require('minimalistic-assert');\nvar inherits = require('inherits');\n\nvar Cipher = require('./cipher');\nvar DES = require('./des');\n\nfunction EDEState(type, key) {\n assert.equal(key.length, 24, 'Invalid key length');\n\n var k1 = key.slice(0, 8);\n var k2 = key.slice(8, 16);\n var k3 = key.slice(16, 24);\n\n if (type === 'encrypt') {\n this.ciphers = [\n DES.create({ type: 'encrypt', key: k1 }),\n DES.create({ type: 'decrypt', key: k2 }),\n DES.create({ type: 'encrypt', key: k3 })\n ];\n } else {\n this.ciphers = [\n DES.create({ type: 'decrypt', key: k3 }),\n DES.create({ type: 'encrypt', key: k2 }),\n DES.create({ type: 'decrypt', key: k1 })\n ];\n }\n}\n\nfunction EDE(options) {\n Cipher.call(this, options);\n\n var state = new EDEState(this.type, this.options.key);\n this._edeState = state;\n}\ninherits(EDE, Cipher);\n\nmodule.exports = EDE;\n\nEDE.create = function create(options) {\n return new EDE(options);\n};\n\nEDE.prototype._update = function _update(inp, inOff, out, outOff) {\n var state = this._edeState;\n\n state.ciphers[0]._update(inp, inOff, out, outOff);\n state.ciphers[1]._update(out, outOff, out, outOff);\n state.ciphers[2]._update(out, outOff, out, outOff);\n};\n\nEDE.prototype._pad = DES.prototype._pad;\nEDE.prototype._unpad = DES.prototype._unpad;\n","'use strict';\n\nexports.readUInt32BE = function readUInt32BE(bytes, off) {\n var res = (bytes[0 + off] << 24) |\n (bytes[1 + off] << 16) |\n (bytes[2 + off] << 8) |\n bytes[3 + off];\n return res >>> 0;\n};\n\nexports.writeUInt32BE = function writeUInt32BE(bytes, value, off) {\n bytes[0 + off] = value >>> 24;\n bytes[1 + off] = (value >>> 16) & 0xff;\n bytes[2 + off] = (value >>> 8) & 0xff;\n bytes[3 + off] = value & 0xff;\n};\n\nexports.ip = function ip(inL, inR, out, off) {\n var outL = 0;\n var outR = 0;\n\n for (var i = 6; i >= 0; i -= 2) {\n for (var j = 0; j <= 24; j += 8) {\n outL <<= 1;\n outL |= (inR >>> (j + i)) & 1;\n }\n for (var j = 0; j <= 24; j += 8) {\n outL <<= 1;\n outL |= (inL >>> (j + i)) & 1;\n }\n }\n\n for (var i = 6; i >= 0; i -= 2) {\n for (var j = 1; j <= 25; j += 8) {\n outR <<= 1;\n outR |= (inR >>> (j + i)) & 1;\n }\n for (var j = 1; j <= 25; j += 8) {\n outR <<= 1;\n outR |= (inL >>> (j + i)) & 1;\n }\n }\n\n out[off + 0] = outL >>> 0;\n out[off + 1] = outR >>> 0;\n};\n\nexports.rip = function rip(inL, inR, out, off) {\n var outL = 0;\n var outR = 0;\n\n for (var i = 0; i < 4; i++) {\n for (var j = 24; j >= 0; j -= 8) {\n outL <<= 1;\n outL |= (inR >>> (j + i)) & 1;\n outL <<= 1;\n outL |= (inL >>> (j + i)) & 1;\n }\n }\n for (var i = 4; i < 8; i++) {\n for (var j = 24; j >= 0; j -= 8) {\n outR <<= 1;\n outR |= (inR >>> (j + i)) & 1;\n outR <<= 1;\n outR |= (inL >>> (j + i)) & 1;\n }\n }\n\n out[off + 0] = outL >>> 0;\n out[off + 1] = outR >>> 0;\n};\n\nexports.pc1 = function pc1(inL, inR, out, off) {\n var outL = 0;\n var outR = 0;\n\n // 7, 15, 23, 31, 39, 47, 55, 63\n // 6, 14, 22, 30, 39, 47, 55, 63\n // 5, 13, 21, 29, 39, 47, 55, 63\n // 4, 12, 20, 28\n for (var i = 7; i >= 5; i--) {\n for (var j = 0; j <= 24; j += 8) {\n outL <<= 1;\n outL |= (inR >> (j + i)) & 1;\n }\n for (var j = 0; j <= 24; j += 8) {\n outL <<= 1;\n outL |= (inL >> (j + i)) & 1;\n }\n }\n for (var j = 0; j <= 24; j += 8) {\n outL <<= 1;\n outL |= (inR >> (j + i)) & 1;\n }\n\n // 1, 9, 17, 25, 33, 41, 49, 57\n // 2, 10, 18, 26, 34, 42, 50, 58\n // 3, 11, 19, 27, 35, 43, 51, 59\n // 36, 44, 52, 60\n for (var i = 1; i <= 3; i++) {\n for (var j = 0; j <= 24; j += 8) {\n outR <<= 1;\n outR |= (inR >> (j + i)) & 1;\n }\n for (var j = 0; j <= 24; j += 8) {\n outR <<= 1;\n outR |= (inL >> (j + i)) & 1;\n }\n }\n for (var j = 0; j <= 24; j += 8) {\n outR <<= 1;\n outR |= (inL >> (j + i)) & 1;\n }\n\n out[off + 0] = outL >>> 0;\n out[off + 1] = outR >>> 0;\n};\n\nexports.r28shl = function r28shl(num, shift) {\n return ((num << shift) & 0xfffffff) | (num >>> (28 - shift));\n};\n\nvar pc2table = [\n // inL => outL\n 14, 11, 17, 4, 27, 23, 25, 0,\n 13, 22, 7, 18, 5, 9, 16, 24,\n 2, 20, 12, 21, 1, 8, 15, 26,\n\n // inR => outR\n 15, 4, 25, 19, 9, 1, 26, 16,\n 5, 11, 23, 8, 12, 7, 17, 0,\n 22, 3, 10, 14, 6, 20, 27, 24\n];\n\nexports.pc2 = function pc2(inL, inR, out, off) {\n var outL = 0;\n var outR = 0;\n\n var len = pc2table.length >>> 1;\n for (var i = 0; i < len; i++) {\n outL <<= 1;\n outL |= (inL >>> pc2table[i]) & 0x1;\n }\n for (var i = len; i < pc2table.length; i++) {\n outR <<= 1;\n outR |= (inR >>> pc2table[i]) & 0x1;\n }\n\n out[off + 0] = outL >>> 0;\n out[off + 1] = outR >>> 0;\n};\n\nexports.expand = function expand(r, out, off) {\n var outL = 0;\n var outR = 0;\n\n outL = ((r & 1) << 5) | (r >>> 27);\n for (var i = 23; i >= 15; i -= 4) {\n outL <<= 6;\n outL |= (r >>> i) & 0x3f;\n }\n for (var i = 11; i >= 3; i -= 4) {\n outR |= (r >>> i) & 0x3f;\n outR <<= 6;\n }\n outR |= ((r & 0x1f) << 1) | (r >>> 31);\n\n out[off + 0] = outL >>> 0;\n out[off + 1] = outR >>> 0;\n};\n\nvar sTable = [\n 14, 0, 4, 15, 13, 7, 1, 4, 2, 14, 15, 2, 11, 13, 8, 1,\n 3, 10, 10, 6, 6, 12, 12, 11, 5, 9, 9, 5, 0, 3, 7, 8,\n 4, 15, 1, 12, 14, 8, 8, 2, 13, 4, 6, 9, 2, 1, 11, 7,\n 15, 5, 12, 11, 9, 3, 7, 14, 3, 10, 10, 0, 5, 6, 0, 13,\n\n 15, 3, 1, 13, 8, 4, 14, 7, 6, 15, 11, 2, 3, 8, 4, 14,\n 9, 12, 7, 0, 2, 1, 13, 10, 12, 6, 0, 9, 5, 11, 10, 5,\n 0, 13, 14, 8, 7, 10, 11, 1, 10, 3, 4, 15, 13, 4, 1, 2,\n 5, 11, 8, 6, 12, 7, 6, 12, 9, 0, 3, 5, 2, 14, 15, 9,\n\n 10, 13, 0, 7, 9, 0, 14, 9, 6, 3, 3, 4, 15, 6, 5, 10,\n 1, 2, 13, 8, 12, 5, 7, 14, 11, 12, 4, 11, 2, 15, 8, 1,\n 13, 1, 6, 10, 4, 13, 9, 0, 8, 6, 15, 9, 3, 8, 0, 7,\n 11, 4, 1, 15, 2, 14, 12, 3, 5, 11, 10, 5, 14, 2, 7, 12,\n\n 7, 13, 13, 8, 14, 11, 3, 5, 0, 6, 6, 15, 9, 0, 10, 3,\n 1, 4, 2, 7, 8, 2, 5, 12, 11, 1, 12, 10, 4, 14, 15, 9,\n 10, 3, 6, 15, 9, 0, 0, 6, 12, 10, 11, 1, 7, 13, 13, 8,\n 15, 9, 1, 4, 3, 5, 14, 11, 5, 12, 2, 7, 8, 2, 4, 14,\n\n 2, 14, 12, 11, 4, 2, 1, 12, 7, 4, 10, 7, 11, 13, 6, 1,\n 8, 5, 5, 0, 3, 15, 15, 10, 13, 3, 0, 9, 14, 8, 9, 6,\n 4, 11, 2, 8, 1, 12, 11, 7, 10, 1, 13, 14, 7, 2, 8, 13,\n 15, 6, 9, 15, 12, 0, 5, 9, 6, 10, 3, 4, 0, 5, 14, 3,\n\n 12, 10, 1, 15, 10, 4, 15, 2, 9, 7, 2, 12, 6, 9, 8, 5,\n 0, 6, 13, 1, 3, 13, 4, 14, 14, 0, 7, 11, 5, 3, 11, 8,\n 9, 4, 14, 3, 15, 2, 5, 12, 2, 9, 8, 5, 12, 15, 3, 10,\n 7, 11, 0, 14, 4, 1, 10, 7, 1, 6, 13, 0, 11, 8, 6, 13,\n\n 4, 13, 11, 0, 2, 11, 14, 7, 15, 4, 0, 9, 8, 1, 13, 10,\n 3, 14, 12, 3, 9, 5, 7, 12, 5, 2, 10, 15, 6, 8, 1, 6,\n 1, 6, 4, 11, 11, 13, 13, 8, 12, 1, 3, 4, 7, 10, 14, 7,\n 10, 9, 15, 5, 6, 0, 8, 15, 0, 14, 5, 2, 9, 3, 2, 12,\n\n 13, 1, 2, 15, 8, 13, 4, 8, 6, 10, 15, 3, 11, 7, 1, 4,\n 10, 12, 9, 5, 3, 6, 14, 11, 5, 0, 0, 14, 12, 9, 7, 2,\n 7, 2, 11, 1, 4, 14, 1, 7, 9, 4, 12, 10, 14, 8, 2, 13,\n 0, 15, 6, 12, 10, 9, 13, 0, 15, 3, 3, 5, 5, 6, 8, 11\n];\n\nexports.substitute = function substitute(inL, inR) {\n var out = 0;\n for (var i = 0; i < 4; i++) {\n var b = (inL >>> (18 - i * 6)) & 0x3f;\n var sb = sTable[i * 0x40 + b];\n\n out <<= 4;\n out |= sb;\n }\n for (var i = 0; i < 4; i++) {\n var b = (inR >>> (18 - i * 6)) & 0x3f;\n var sb = sTable[4 * 0x40 + i * 0x40 + b];\n\n out <<= 4;\n out |= sb;\n }\n return out >>> 0;\n};\n\nvar permuteTable = [\n 16, 25, 12, 11, 3, 20, 4, 15, 31, 17, 9, 6, 27, 14, 1, 22,\n 30, 24, 8, 18, 0, 5, 29, 23, 13, 19, 2, 26, 10, 21, 28, 7\n];\n\nexports.permute = function permute(num) {\n var out = 0;\n for (var i = 0; i < permuteTable.length; i++) {\n out <<= 1;\n out |= (num >>> permuteTable[i]) & 0x1;\n }\n return out >>> 0;\n};\n\nexports.padSplit = function padSplit(num, size, group) {\n var str = num.toString(2);\n while (str.length < size)\n str = '0' + str;\n\n var out = [];\n for (var i = 0; i < size; i += group)\n out.push(str.slice(i, i + group));\n return out.join(' ');\n};\n","var generatePrime = require('./lib/generatePrime')\nvar primes = require('./lib/primes.json')\n\nvar DH = require('./lib/dh')\n\nfunction getDiffieHellman (mod) {\n var prime = new Buffer(primes[mod].prime, 'hex')\n var gen = new Buffer(primes[mod].gen, 'hex')\n\n return new DH(prime, gen)\n}\n\nvar ENCODINGS = {\n 'binary': true, 'hex': true, 'base64': true\n}\n\nfunction createDiffieHellman (prime, enc, generator, genc) {\n if (Buffer.isBuffer(enc) || ENCODINGS[enc] === undefined) {\n return createDiffieHellman(prime, 'binary', enc, generator)\n }\n\n enc = enc || 'binary'\n genc = genc || 'binary'\n generator = generator || new Buffer([2])\n\n if (!Buffer.isBuffer(generator)) {\n generator = new Buffer(generator, genc)\n }\n\n if (typeof prime === 'number') {\n return new DH(generatePrime(prime, generator), generator, true)\n }\n\n if (!Buffer.isBuffer(prime)) {\n prime = new Buffer(prime, enc)\n }\n\n return new DH(prime, generator, true)\n}\n\nexports.DiffieHellmanGroup = exports.createDiffieHellmanGroup = exports.getDiffieHellman = getDiffieHellman\nexports.createDiffieHellman = exports.DiffieHellman = createDiffieHellman\n","var BN = require('bn.js');\nvar MillerRabin = require('miller-rabin');\nvar millerRabin = new MillerRabin();\nvar TWENTYFOUR = new BN(24);\nvar ELEVEN = new BN(11);\nvar TEN = new BN(10);\nvar THREE = new BN(3);\nvar SEVEN = new BN(7);\nvar primes = require('./generatePrime');\nvar randomBytes = require('randombytes');\nmodule.exports = DH;\n\nfunction setPublicKey(pub, enc) {\n enc = enc || 'utf8';\n if (!Buffer.isBuffer(pub)) {\n pub = new Buffer(pub, enc);\n }\n this._pub = new BN(pub);\n return this;\n}\n\nfunction setPrivateKey(priv, enc) {\n enc = enc || 'utf8';\n if (!Buffer.isBuffer(priv)) {\n priv = new Buffer(priv, enc);\n }\n this._priv = new BN(priv);\n return this;\n}\n\nvar primeCache = {};\nfunction checkPrime(prime, generator) {\n var gen = generator.toString('hex');\n var hex = [gen, prime.toString(16)].join('_');\n if (hex in primeCache) {\n return primeCache[hex];\n }\n var error = 0;\n\n if (prime.isEven() ||\n !primes.simpleSieve ||\n !primes.fermatTest(prime) ||\n !millerRabin.test(prime)) {\n //not a prime so +1\n error += 1;\n\n if (gen === '02' || gen === '05') {\n // we'd be able to check the generator\n // it would fail so +8\n error += 8;\n } else {\n //we wouldn't be able to test the generator\n // so +4\n error += 4;\n }\n primeCache[hex] = error;\n return error;\n }\n if (!millerRabin.test(prime.shrn(1))) {\n //not a safe prime\n error += 2;\n }\n var rem;\n switch (gen) {\n case '02':\n if (prime.mod(TWENTYFOUR).cmp(ELEVEN)) {\n // unsuidable generator\n error += 8;\n }\n break;\n case '05':\n rem = prime.mod(TEN);\n if (rem.cmp(THREE) && rem.cmp(SEVEN)) {\n // prime mod 10 needs to equal 3 or 7\n error += 8;\n }\n break;\n default:\n error += 4;\n }\n primeCache[hex] = error;\n return error;\n}\n\nfunction DH(prime, generator, malleable) {\n this.setGenerator(generator);\n this.__prime = new BN(prime);\n this._prime = BN.mont(this.__prime);\n this._primeLen = prime.length;\n this._pub = undefined;\n this._priv = undefined;\n this._primeCode = undefined;\n if (malleable) {\n this.setPublicKey = setPublicKey;\n this.setPrivateKey = setPrivateKey;\n } else {\n this._primeCode = 8;\n }\n}\nObject.defineProperty(DH.prototype, 'verifyError', {\n enumerable: true,\n get: function () {\n if (typeof this._primeCode !== 'number') {\n this._primeCode = checkPrime(this.__prime, this.__gen);\n }\n return this._primeCode;\n }\n});\nDH.prototype.generateKeys = function () {\n if (!this._priv) {\n this._priv = new BN(randomBytes(this._primeLen));\n }\n this._pub = this._gen.toRed(this._prime).redPow(this._priv).fromRed();\n return this.getPublicKey();\n};\n\nDH.prototype.computeSecret = function (other) {\n other = new BN(other);\n other = other.toRed(this._prime);\n var secret = other.redPow(this._priv).fromRed();\n var out = new Buffer(secret.toArray());\n var prime = this.getPrime();\n if (out.length < prime.length) {\n var front = new Buffer(prime.length - out.length);\n front.fill(0);\n out = Buffer.concat([front, out]);\n }\n return out;\n};\n\nDH.prototype.getPublicKey = function getPublicKey(enc) {\n return formatReturnValue(this._pub, enc);\n};\n\nDH.prototype.getPrivateKey = function getPrivateKey(enc) {\n return formatReturnValue(this._priv, enc);\n};\n\nDH.prototype.getPrime = function (enc) {\n return formatReturnValue(this.__prime, enc);\n};\n\nDH.prototype.getGenerator = function (enc) {\n return formatReturnValue(this._gen, enc);\n};\n\nDH.prototype.setGenerator = function (gen, enc) {\n enc = enc || 'utf8';\n if (!Buffer.isBuffer(gen)) {\n gen = new Buffer(gen, enc);\n }\n this.__gen = gen;\n this._gen = new BN(gen);\n return this;\n};\n\nfunction formatReturnValue(bn, enc) {\n var buf = new Buffer(bn.toArray());\n if (!enc) {\n return buf;\n } else {\n return buf.toString(enc);\n }\n}\n","var randomBytes = require('randombytes');\nmodule.exports = findPrime;\nfindPrime.simpleSieve = simpleSieve;\nfindPrime.fermatTest = fermatTest;\nvar BN = require('bn.js');\nvar TWENTYFOUR = new BN(24);\nvar MillerRabin = require('miller-rabin');\nvar millerRabin = new MillerRabin();\nvar ONE = new BN(1);\nvar TWO = new BN(2);\nvar FIVE = new BN(5);\nvar SIXTEEN = new BN(16);\nvar EIGHT = new BN(8);\nvar TEN = new BN(10);\nvar THREE = new BN(3);\nvar SEVEN = new BN(7);\nvar ELEVEN = new BN(11);\nvar FOUR = new BN(4);\nvar TWELVE = new BN(12);\nvar primes = null;\n\nfunction _getPrimes() {\n if (primes !== null)\n return primes;\n\n var limit = 0x100000;\n var res = [];\n res[0] = 2;\n for (var i = 1, k = 3; k < limit; k += 2) {\n var sqrt = Math.ceil(Math.sqrt(k));\n for (var j = 0; j < i && res[j] <= sqrt; j++)\n if (k % res[j] === 0)\n break;\n\n if (i !== j && res[j] <= sqrt)\n continue;\n\n res[i++] = k;\n }\n primes = res;\n return res;\n}\n\nfunction simpleSieve(p) {\n var primes = _getPrimes();\n\n for (var i = 0; i < primes.length; i++)\n if (p.modn(primes[i]) === 0) {\n if (p.cmpn(primes[i]) === 0) {\n return true;\n } else {\n return false;\n }\n }\n\n return true;\n}\n\nfunction fermatTest(p) {\n var red = BN.mont(p);\n return TWO.toRed(red).redPow(p.subn(1)).fromRed().cmpn(1) === 0;\n}\n\nfunction findPrime(bits, gen) {\n if (bits < 16) {\n // this is what openssl does\n if (gen === 2 || gen === 5) {\n return new BN([0x8c, 0x7b]);\n } else {\n return new BN([0x8c, 0x27]);\n }\n }\n gen = new BN(gen);\n\n var num, n2;\n\n while (true) {\n num = new BN(randomBytes(Math.ceil(bits / 8)));\n while (num.bitLength() > bits) {\n num.ishrn(1);\n }\n if (num.isEven()) {\n num.iadd(ONE);\n }\n if (!num.testn(1)) {\n num.iadd(TWO);\n }\n if (!gen.cmp(TWO)) {\n while (num.mod(TWENTYFOUR).cmp(ELEVEN)) {\n num.iadd(FOUR);\n }\n } else if (!gen.cmp(FIVE)) {\n while (num.mod(TEN).cmp(THREE)) {\n num.iadd(FOUR);\n }\n }\n n2 = num.shrn(1);\n if (simpleSieve(n2) && simpleSieve(num) &&\n fermatTest(n2) && fermatTest(num) &&\n millerRabin.test(n2) && millerRabin.test(num)) {\n return num;\n }\n }\n\n}\n","(function (module, exports) {\n 'use strict';\n\n // Utils\n function assert (val, msg) {\n if (!val) throw new Error(msg || 'Assertion failed');\n }\n\n // Could use `inherits` module, but don't want to move from single file\n // architecture yet.\n function inherits (ctor, superCtor) {\n ctor.super_ = superCtor;\n var TempCtor = function () {};\n TempCtor.prototype = superCtor.prototype;\n ctor.prototype = new TempCtor();\n ctor.prototype.constructor = ctor;\n }\n\n // BN\n\n function BN (number, base, endian) {\n if (BN.isBN(number)) {\n return number;\n }\n\n this.negative = 0;\n this.words = null;\n this.length = 0;\n\n // Reduction context\n this.red = null;\n\n if (number !== null) {\n if (base === 'le' || base === 'be') {\n endian = base;\n base = 10;\n }\n\n this._init(number || 0, base || 10, endian || 'be');\n }\n }\n if (typeof module === 'object') {\n module.exports = BN;\n } else {\n exports.BN = BN;\n }\n\n BN.BN = BN;\n BN.wordSize = 26;\n\n var Buffer;\n try {\n if (typeof window !== 'undefined' && typeof window.Buffer !== 'undefined') {\n Buffer = window.Buffer;\n } else {\n Buffer = require('buffer').Buffer;\n }\n } catch (e) {\n }\n\n BN.isBN = function isBN (num) {\n if (num instanceof BN) {\n return true;\n }\n\n return num !== null && typeof num === 'object' &&\n num.constructor.wordSize === BN.wordSize && Array.isArray(num.words);\n };\n\n BN.max = function max (left, right) {\n if (left.cmp(right) > 0) return left;\n return right;\n };\n\n BN.min = function min (left, right) {\n if (left.cmp(right) < 0) return left;\n return right;\n };\n\n BN.prototype._init = function init (number, base, endian) {\n if (typeof number === 'number') {\n return this._initNumber(number, base, endian);\n }\n\n if (typeof number === 'object') {\n return this._initArray(number, base, endian);\n }\n\n if (base === 'hex') {\n base = 16;\n }\n assert(base === (base | 0) && base >= 2 && base <= 36);\n\n number = number.toString().replace(/\\s+/g, '');\n var start = 0;\n if (number[0] === '-') {\n start++;\n this.negative = 1;\n }\n\n if (start < number.length) {\n if (base === 16) {\n this._parseHex(number, start, endian);\n } else {\n this._parseBase(number, base, start);\n if (endian === 'le') {\n this._initArray(this.toArray(), base, endian);\n }\n }\n }\n };\n\n BN.prototype._initNumber = function _initNumber (number, base, endian) {\n if (number < 0) {\n this.negative = 1;\n number = -number;\n }\n if (number < 0x4000000) {\n this.words = [ number & 0x3ffffff ];\n this.length = 1;\n } else if (number < 0x10000000000000) {\n this.words = [\n number & 0x3ffffff,\n (number / 0x4000000) & 0x3ffffff\n ];\n this.length = 2;\n } else {\n assert(number < 0x20000000000000); // 2 ^ 53 (unsafe)\n this.words = [\n number & 0x3ffffff,\n (number / 0x4000000) & 0x3ffffff,\n 1\n ];\n this.length = 3;\n }\n\n if (endian !== 'le') return;\n\n // Reverse the bytes\n this._initArray(this.toArray(), base, endian);\n };\n\n BN.prototype._initArray = function _initArray (number, base, endian) {\n // Perhaps a Uint8Array\n assert(typeof number.length === 'number');\n if (number.length <= 0) {\n this.words = [ 0 ];\n this.length = 1;\n return this;\n }\n\n this.length = Math.ceil(number.length / 3);\n this.words = new Array(this.length);\n for (var i = 0; i < this.length; i++) {\n this.words[i] = 0;\n }\n\n var j, w;\n var off = 0;\n if (endian === 'be') {\n for (i = number.length - 1, j = 0; i >= 0; i -= 3) {\n w = number[i] | (number[i - 1] << 8) | (number[i - 2] << 16);\n this.words[j] |= (w << off) & 0x3ffffff;\n this.words[j + 1] = (w >>> (26 - off)) & 0x3ffffff;\n off += 24;\n if (off >= 26) {\n off -= 26;\n j++;\n }\n }\n } else if (endian === 'le') {\n for (i = 0, j = 0; i < number.length; i += 3) {\n w = number[i] | (number[i + 1] << 8) | (number[i + 2] << 16);\n this.words[j] |= (w << off) & 0x3ffffff;\n this.words[j + 1] = (w >>> (26 - off)) & 0x3ffffff;\n off += 24;\n if (off >= 26) {\n off -= 26;\n j++;\n }\n }\n }\n return this.strip();\n };\n\n function parseHex4Bits (string, index) {\n var c = string.charCodeAt(index);\n // 'A' - 'F'\n if (c >= 65 && c <= 70) {\n return c - 55;\n // 'a' - 'f'\n } else if (c >= 97 && c <= 102) {\n return c - 87;\n // '0' - '9'\n } else {\n return (c - 48) & 0xf;\n }\n }\n\n function parseHexByte (string, lowerBound, index) {\n var r = parseHex4Bits(string, index);\n if (index - 1 >= lowerBound) {\n r |= parseHex4Bits(string, index - 1) << 4;\n }\n return r;\n }\n\n BN.prototype._parseHex = function _parseHex (number, start, endian) {\n // Create possibly bigger array to ensure that it fits the number\n this.length = Math.ceil((number.length - start) / 6);\n this.words = new Array(this.length);\n for (var i = 0; i < this.length; i++) {\n this.words[i] = 0;\n }\n\n // 24-bits chunks\n var off = 0;\n var j = 0;\n\n var w;\n if (endian === 'be') {\n for (i = number.length - 1; i >= start; i -= 2) {\n w = parseHexByte(number, start, i) << off;\n this.words[j] |= w & 0x3ffffff;\n if (off >= 18) {\n off -= 18;\n j += 1;\n this.words[j] |= w >>> 26;\n } else {\n off += 8;\n }\n }\n } else {\n var parseLength = number.length - start;\n for (i = parseLength % 2 === 0 ? start + 1 : start; i < number.length; i += 2) {\n w = parseHexByte(number, start, i) << off;\n this.words[j] |= w & 0x3ffffff;\n if (off >= 18) {\n off -= 18;\n j += 1;\n this.words[j] |= w >>> 26;\n } else {\n off += 8;\n }\n }\n }\n\n this.strip();\n };\n\n function parseBase (str, start, end, mul) {\n var r = 0;\n var len = Math.min(str.length, end);\n for (var i = start; i < len; i++) {\n var c = str.charCodeAt(i) - 48;\n\n r *= mul;\n\n // 'a'\n if (c >= 49) {\n r += c - 49 + 0xa;\n\n // 'A'\n } else if (c >= 17) {\n r += c - 17 + 0xa;\n\n // '0' - '9'\n } else {\n r += c;\n }\n }\n return r;\n }\n\n BN.prototype._parseBase = function _parseBase (number, base, start) {\n // Initialize as zero\n this.words = [ 0 ];\n this.length = 1;\n\n // Find length of limb in base\n for (var limbLen = 0, limbPow = 1; limbPow <= 0x3ffffff; limbPow *= base) {\n limbLen++;\n }\n limbLen--;\n limbPow = (limbPow / base) | 0;\n\n var total = number.length - start;\n var mod = total % limbLen;\n var end = Math.min(total, total - mod) + start;\n\n var word = 0;\n for (var i = start; i < end; i += limbLen) {\n word = parseBase(number, i, i + limbLen, base);\n\n this.imuln(limbPow);\n if (this.words[0] + word < 0x4000000) {\n this.words[0] += word;\n } else {\n this._iaddn(word);\n }\n }\n\n if (mod !== 0) {\n var pow = 1;\n word = parseBase(number, i, number.length, base);\n\n for (i = 0; i < mod; i++) {\n pow *= base;\n }\n\n this.imuln(pow);\n if (this.words[0] + word < 0x4000000) {\n this.words[0] += word;\n } else {\n this._iaddn(word);\n }\n }\n\n this.strip();\n };\n\n BN.prototype.copy = function copy (dest) {\n dest.words = new Array(this.length);\n for (var i = 0; i < this.length; i++) {\n dest.words[i] = this.words[i];\n }\n dest.length = this.length;\n dest.negative = this.negative;\n dest.red = this.red;\n };\n\n BN.prototype.clone = function clone () {\n var r = new BN(null);\n this.copy(r);\n return r;\n };\n\n BN.prototype._expand = function _expand (size) {\n while (this.length < size) {\n this.words[this.length++] = 0;\n }\n return this;\n };\n\n // Remove leading `0` from `this`\n BN.prototype.strip = function strip () {\n while (this.length > 1 && this.words[this.length - 1] === 0) {\n this.length--;\n }\n return this._normSign();\n };\n\n BN.prototype._normSign = function _normSign () {\n // -0 = 0\n if (this.length === 1 && this.words[0] === 0) {\n this.negative = 0;\n }\n return this;\n };\n\n BN.prototype.inspect = function inspect () {\n return (this.red ? '';\n };\n\n /*\n\n var zeros = [];\n var groupSizes = [];\n var groupBases = [];\n\n var s = '';\n var i = -1;\n while (++i < BN.wordSize) {\n zeros[i] = s;\n s += '0';\n }\n groupSizes[0] = 0;\n groupSizes[1] = 0;\n groupBases[0] = 0;\n groupBases[1] = 0;\n var base = 2 - 1;\n while (++base < 36 + 1) {\n var groupSize = 0;\n var groupBase = 1;\n while (groupBase < (1 << BN.wordSize) / base) {\n groupBase *= base;\n groupSize += 1;\n }\n groupSizes[base] = groupSize;\n groupBases[base] = groupBase;\n }\n\n */\n\n var zeros = [\n '',\n '0',\n '00',\n '000',\n '0000',\n '00000',\n '000000',\n '0000000',\n '00000000',\n '000000000',\n '0000000000',\n '00000000000',\n '000000000000',\n '0000000000000',\n '00000000000000',\n '000000000000000',\n '0000000000000000',\n '00000000000000000',\n '000000000000000000',\n '0000000000000000000',\n '00000000000000000000',\n '000000000000000000000',\n '0000000000000000000000',\n '00000000000000000000000',\n '000000000000000000000000',\n '0000000000000000000000000'\n ];\n\n var groupSizes = [\n 0, 0,\n 25, 16, 12, 11, 10, 9, 8,\n 8, 7, 7, 7, 7, 6, 6,\n 6, 6, 6, 6, 6, 5, 5,\n 5, 5, 5, 5, 5, 5, 5,\n 5, 5, 5, 5, 5, 5, 5\n ];\n\n var groupBases = [\n 0, 0,\n 33554432, 43046721, 16777216, 48828125, 60466176, 40353607, 16777216,\n 43046721, 10000000, 19487171, 35831808, 62748517, 7529536, 11390625,\n 16777216, 24137569, 34012224, 47045881, 64000000, 4084101, 5153632,\n 6436343, 7962624, 9765625, 11881376, 14348907, 17210368, 20511149,\n 24300000, 28629151, 33554432, 39135393, 45435424, 52521875, 60466176\n ];\n\n BN.prototype.toString = function toString (base, padding) {\n base = base || 10;\n padding = padding | 0 || 1;\n\n var out;\n if (base === 16 || base === 'hex') {\n out = '';\n var off = 0;\n var carry = 0;\n for (var i = 0; i < this.length; i++) {\n var w = this.words[i];\n var word = (((w << off) | carry) & 0xffffff).toString(16);\n carry = (w >>> (24 - off)) & 0xffffff;\n if (carry !== 0 || i !== this.length - 1) {\n out = zeros[6 - word.length] + word + out;\n } else {\n out = word + out;\n }\n off += 2;\n if (off >= 26) {\n off -= 26;\n i--;\n }\n }\n if (carry !== 0) {\n out = carry.toString(16) + out;\n }\n while (out.length % padding !== 0) {\n out = '0' + out;\n }\n if (this.negative !== 0) {\n out = '-' + out;\n }\n return out;\n }\n\n if (base === (base | 0) && base >= 2 && base <= 36) {\n // var groupSize = Math.floor(BN.wordSize * Math.LN2 / Math.log(base));\n var groupSize = groupSizes[base];\n // var groupBase = Math.pow(base, groupSize);\n var groupBase = groupBases[base];\n out = '';\n var c = this.clone();\n c.negative = 0;\n while (!c.isZero()) {\n var r = c.modn(groupBase).toString(base);\n c = c.idivn(groupBase);\n\n if (!c.isZero()) {\n out = zeros[groupSize - r.length] + r + out;\n } else {\n out = r + out;\n }\n }\n if (this.isZero()) {\n out = '0' + out;\n }\n while (out.length % padding !== 0) {\n out = '0' + out;\n }\n if (this.negative !== 0) {\n out = '-' + out;\n }\n return out;\n }\n\n assert(false, 'Base should be between 2 and 36');\n };\n\n BN.prototype.toNumber = function toNumber () {\n var ret = this.words[0];\n if (this.length === 2) {\n ret += this.words[1] * 0x4000000;\n } else if (this.length === 3 && this.words[2] === 0x01) {\n // NOTE: at this stage it is known that the top bit is set\n ret += 0x10000000000000 + (this.words[1] * 0x4000000);\n } else if (this.length > 2) {\n assert(false, 'Number can only safely store up to 53 bits');\n }\n return (this.negative !== 0) ? -ret : ret;\n };\n\n BN.prototype.toJSON = function toJSON () {\n return this.toString(16);\n };\n\n BN.prototype.toBuffer = function toBuffer (endian, length) {\n assert(typeof Buffer !== 'undefined');\n return this.toArrayLike(Buffer, endian, length);\n };\n\n BN.prototype.toArray = function toArray (endian, length) {\n return this.toArrayLike(Array, endian, length);\n };\n\n BN.prototype.toArrayLike = function toArrayLike (ArrayType, endian, length) {\n var byteLength = this.byteLength();\n var reqLength = length || Math.max(1, byteLength);\n assert(byteLength <= reqLength, 'byte array longer than desired length');\n assert(reqLength > 0, 'Requested array length <= 0');\n\n this.strip();\n var littleEndian = endian === 'le';\n var res = new ArrayType(reqLength);\n\n var b, i;\n var q = this.clone();\n if (!littleEndian) {\n // Assume big-endian\n for (i = 0; i < reqLength - byteLength; i++) {\n res[i] = 0;\n }\n\n for (i = 0; !q.isZero(); i++) {\n b = q.andln(0xff);\n q.iushrn(8);\n\n res[reqLength - i - 1] = b;\n }\n } else {\n for (i = 0; !q.isZero(); i++) {\n b = q.andln(0xff);\n q.iushrn(8);\n\n res[i] = b;\n }\n\n for (; i < reqLength; i++) {\n res[i] = 0;\n }\n }\n\n return res;\n };\n\n if (Math.clz32) {\n BN.prototype._countBits = function _countBits (w) {\n return 32 - Math.clz32(w);\n };\n } else {\n BN.prototype._countBits = function _countBits (w) {\n var t = w;\n var r = 0;\n if (t >= 0x1000) {\n r += 13;\n t >>>= 13;\n }\n if (t >= 0x40) {\n r += 7;\n t >>>= 7;\n }\n if (t >= 0x8) {\n r += 4;\n t >>>= 4;\n }\n if (t >= 0x02) {\n r += 2;\n t >>>= 2;\n }\n return r + t;\n };\n }\n\n BN.prototype._zeroBits = function _zeroBits (w) {\n // Short-cut\n if (w === 0) return 26;\n\n var t = w;\n var r = 0;\n if ((t & 0x1fff) === 0) {\n r += 13;\n t >>>= 13;\n }\n if ((t & 0x7f) === 0) {\n r += 7;\n t >>>= 7;\n }\n if ((t & 0xf) === 0) {\n r += 4;\n t >>>= 4;\n }\n if ((t & 0x3) === 0) {\n r += 2;\n t >>>= 2;\n }\n if ((t & 0x1) === 0) {\n r++;\n }\n return r;\n };\n\n // Return number of used bits in a BN\n BN.prototype.bitLength = function bitLength () {\n var w = this.words[this.length - 1];\n var hi = this._countBits(w);\n return (this.length - 1) * 26 + hi;\n };\n\n function toBitArray (num) {\n var w = new Array(num.bitLength());\n\n for (var bit = 0; bit < w.length; bit++) {\n var off = (bit / 26) | 0;\n var wbit = bit % 26;\n\n w[bit] = (num.words[off] & (1 << wbit)) >>> wbit;\n }\n\n return w;\n }\n\n // Number of trailing zero bits\n BN.prototype.zeroBits = function zeroBits () {\n if (this.isZero()) return 0;\n\n var r = 0;\n for (var i = 0; i < this.length; i++) {\n var b = this._zeroBits(this.words[i]);\n r += b;\n if (b !== 26) break;\n }\n return r;\n };\n\n BN.prototype.byteLength = function byteLength () {\n return Math.ceil(this.bitLength() / 8);\n };\n\n BN.prototype.toTwos = function toTwos (width) {\n if (this.negative !== 0) {\n return this.abs().inotn(width).iaddn(1);\n }\n return this.clone();\n };\n\n BN.prototype.fromTwos = function fromTwos (width) {\n if (this.testn(width - 1)) {\n return this.notn(width).iaddn(1).ineg();\n }\n return this.clone();\n };\n\n BN.prototype.isNeg = function isNeg () {\n return this.negative !== 0;\n };\n\n // Return negative clone of `this`\n BN.prototype.neg = function neg () {\n return this.clone().ineg();\n };\n\n BN.prototype.ineg = function ineg () {\n if (!this.isZero()) {\n this.negative ^= 1;\n }\n\n return this;\n };\n\n // Or `num` with `this` in-place\n BN.prototype.iuor = function iuor (num) {\n while (this.length < num.length) {\n this.words[this.length++] = 0;\n }\n\n for (var i = 0; i < num.length; i++) {\n this.words[i] = this.words[i] | num.words[i];\n }\n\n return this.strip();\n };\n\n BN.prototype.ior = function ior (num) {\n assert((this.negative | num.negative) === 0);\n return this.iuor(num);\n };\n\n // Or `num` with `this`\n BN.prototype.or = function or (num) {\n if (this.length > num.length) return this.clone().ior(num);\n return num.clone().ior(this);\n };\n\n BN.prototype.uor = function uor (num) {\n if (this.length > num.length) return this.clone().iuor(num);\n return num.clone().iuor(this);\n };\n\n // And `num` with `this` in-place\n BN.prototype.iuand = function iuand (num) {\n // b = min-length(num, this)\n var b;\n if (this.length > num.length) {\n b = num;\n } else {\n b = this;\n }\n\n for (var i = 0; i < b.length; i++) {\n this.words[i] = this.words[i] & num.words[i];\n }\n\n this.length = b.length;\n\n return this.strip();\n };\n\n BN.prototype.iand = function iand (num) {\n assert((this.negative | num.negative) === 0);\n return this.iuand(num);\n };\n\n // And `num` with `this`\n BN.prototype.and = function and (num) {\n if (this.length > num.length) return this.clone().iand(num);\n return num.clone().iand(this);\n };\n\n BN.prototype.uand = function uand (num) {\n if (this.length > num.length) return this.clone().iuand(num);\n return num.clone().iuand(this);\n };\n\n // Xor `num` with `this` in-place\n BN.prototype.iuxor = function iuxor (num) {\n // a.length > b.length\n var a;\n var b;\n if (this.length > num.length) {\n a = this;\n b = num;\n } else {\n a = num;\n b = this;\n }\n\n for (var i = 0; i < b.length; i++) {\n this.words[i] = a.words[i] ^ b.words[i];\n }\n\n if (this !== a) {\n for (; i < a.length; i++) {\n this.words[i] = a.words[i];\n }\n }\n\n this.length = a.length;\n\n return this.strip();\n };\n\n BN.prototype.ixor = function ixor (num) {\n assert((this.negative | num.negative) === 0);\n return this.iuxor(num);\n };\n\n // Xor `num` with `this`\n BN.prototype.xor = function xor (num) {\n if (this.length > num.length) return this.clone().ixor(num);\n return num.clone().ixor(this);\n };\n\n BN.prototype.uxor = function uxor (num) {\n if (this.length > num.length) return this.clone().iuxor(num);\n return num.clone().iuxor(this);\n };\n\n // Not ``this`` with ``width`` bitwidth\n BN.prototype.inotn = function inotn (width) {\n assert(typeof width === 'number' && width >= 0);\n\n var bytesNeeded = Math.ceil(width / 26) | 0;\n var bitsLeft = width % 26;\n\n // Extend the buffer with leading zeroes\n this._expand(bytesNeeded);\n\n if (bitsLeft > 0) {\n bytesNeeded--;\n }\n\n // Handle complete words\n for (var i = 0; i < bytesNeeded; i++) {\n this.words[i] = ~this.words[i] & 0x3ffffff;\n }\n\n // Handle the residue\n if (bitsLeft > 0) {\n this.words[i] = ~this.words[i] & (0x3ffffff >> (26 - bitsLeft));\n }\n\n // And remove leading zeroes\n return this.strip();\n };\n\n BN.prototype.notn = function notn (width) {\n return this.clone().inotn(width);\n };\n\n // Set `bit` of `this`\n BN.prototype.setn = function setn (bit, val) {\n assert(typeof bit === 'number' && bit >= 0);\n\n var off = (bit / 26) | 0;\n var wbit = bit % 26;\n\n this._expand(off + 1);\n\n if (val) {\n this.words[off] = this.words[off] | (1 << wbit);\n } else {\n this.words[off] = this.words[off] & ~(1 << wbit);\n }\n\n return this.strip();\n };\n\n // Add `num` to `this` in-place\n BN.prototype.iadd = function iadd (num) {\n var r;\n\n // negative + positive\n if (this.negative !== 0 && num.negative === 0) {\n this.negative = 0;\n r = this.isub(num);\n this.negative ^= 1;\n return this._normSign();\n\n // positive + negative\n } else if (this.negative === 0 && num.negative !== 0) {\n num.negative = 0;\n r = this.isub(num);\n num.negative = 1;\n return r._normSign();\n }\n\n // a.length > b.length\n var a, b;\n if (this.length > num.length) {\n a = this;\n b = num;\n } else {\n a = num;\n b = this;\n }\n\n var carry = 0;\n for (var i = 0; i < b.length; i++) {\n r = (a.words[i] | 0) + (b.words[i] | 0) + carry;\n this.words[i] = r & 0x3ffffff;\n carry = r >>> 26;\n }\n for (; carry !== 0 && i < a.length; i++) {\n r = (a.words[i] | 0) + carry;\n this.words[i] = r & 0x3ffffff;\n carry = r >>> 26;\n }\n\n this.length = a.length;\n if (carry !== 0) {\n this.words[this.length] = carry;\n this.length++;\n // Copy the rest of the words\n } else if (a !== this) {\n for (; i < a.length; i++) {\n this.words[i] = a.words[i];\n }\n }\n\n return this;\n };\n\n // Add `num` to `this`\n BN.prototype.add = function add (num) {\n var res;\n if (num.negative !== 0 && this.negative === 0) {\n num.negative = 0;\n res = this.sub(num);\n num.negative ^= 1;\n return res;\n } else if (num.negative === 0 && this.negative !== 0) {\n this.negative = 0;\n res = num.sub(this);\n this.negative = 1;\n return res;\n }\n\n if (this.length > num.length) return this.clone().iadd(num);\n\n return num.clone().iadd(this);\n };\n\n // Subtract `num` from `this` in-place\n BN.prototype.isub = function isub (num) {\n // this - (-num) = this + num\n if (num.negative !== 0) {\n num.negative = 0;\n var r = this.iadd(num);\n num.negative = 1;\n return r._normSign();\n\n // -this - num = -(this + num)\n } else if (this.negative !== 0) {\n this.negative = 0;\n this.iadd(num);\n this.negative = 1;\n return this._normSign();\n }\n\n // At this point both numbers are positive\n var cmp = this.cmp(num);\n\n // Optimization - zeroify\n if (cmp === 0) {\n this.negative = 0;\n this.length = 1;\n this.words[0] = 0;\n return this;\n }\n\n // a > b\n var a, b;\n if (cmp > 0) {\n a = this;\n b = num;\n } else {\n a = num;\n b = this;\n }\n\n var carry = 0;\n for (var i = 0; i < b.length; i++) {\n r = (a.words[i] | 0) - (b.words[i] | 0) + carry;\n carry = r >> 26;\n this.words[i] = r & 0x3ffffff;\n }\n for (; carry !== 0 && i < a.length; i++) {\n r = (a.words[i] | 0) + carry;\n carry = r >> 26;\n this.words[i] = r & 0x3ffffff;\n }\n\n // Copy rest of the words\n if (carry === 0 && i < a.length && a !== this) {\n for (; i < a.length; i++) {\n this.words[i] = a.words[i];\n }\n }\n\n this.length = Math.max(this.length, i);\n\n if (a !== this) {\n this.negative = 1;\n }\n\n return this.strip();\n };\n\n // Subtract `num` from `this`\n BN.prototype.sub = function sub (num) {\n return this.clone().isub(num);\n };\n\n function smallMulTo (self, num, out) {\n out.negative = num.negative ^ self.negative;\n var len = (self.length + num.length) | 0;\n out.length = len;\n len = (len - 1) | 0;\n\n // Peel one iteration (compiler can't do it, because of code complexity)\n var a = self.words[0] | 0;\n var b = num.words[0] | 0;\n var r = a * b;\n\n var lo = r & 0x3ffffff;\n var carry = (r / 0x4000000) | 0;\n out.words[0] = lo;\n\n for (var k = 1; k < len; k++) {\n // Sum all words with the same `i + j = k` and accumulate `ncarry`,\n // note that ncarry could be >= 0x3ffffff\n var ncarry = carry >>> 26;\n var rword = carry & 0x3ffffff;\n var maxJ = Math.min(k, num.length - 1);\n for (var j = Math.max(0, k - self.length + 1); j <= maxJ; j++) {\n var i = (k - j) | 0;\n a = self.words[i] | 0;\n b = num.words[j] | 0;\n r = a * b + rword;\n ncarry += (r / 0x4000000) | 0;\n rword = r & 0x3ffffff;\n }\n out.words[k] = rword | 0;\n carry = ncarry | 0;\n }\n if (carry !== 0) {\n out.words[k] = carry | 0;\n } else {\n out.length--;\n }\n\n return out.strip();\n }\n\n // TODO(indutny): it may be reasonable to omit it for users who don't need\n // to work with 256-bit numbers, otherwise it gives 20% improvement for 256-bit\n // multiplication (like elliptic secp256k1).\n var comb10MulTo = function comb10MulTo (self, num, out) {\n var a = self.words;\n var b = num.words;\n var o = out.words;\n var c = 0;\n var lo;\n var mid;\n var hi;\n var a0 = a[0] | 0;\n var al0 = a0 & 0x1fff;\n var ah0 = a0 >>> 13;\n var a1 = a[1] | 0;\n var al1 = a1 & 0x1fff;\n var ah1 = a1 >>> 13;\n var a2 = a[2] | 0;\n var al2 = a2 & 0x1fff;\n var ah2 = a2 >>> 13;\n var a3 = a[3] | 0;\n var al3 = a3 & 0x1fff;\n var ah3 = a3 >>> 13;\n var a4 = a[4] | 0;\n var al4 = a4 & 0x1fff;\n var ah4 = a4 >>> 13;\n var a5 = a[5] | 0;\n var al5 = a5 & 0x1fff;\n var ah5 = a5 >>> 13;\n var a6 = a[6] | 0;\n var al6 = a6 & 0x1fff;\n var ah6 = a6 >>> 13;\n var a7 = a[7] | 0;\n var al7 = a7 & 0x1fff;\n var ah7 = a7 >>> 13;\n var a8 = a[8] | 0;\n var al8 = a8 & 0x1fff;\n var ah8 = a8 >>> 13;\n var a9 = a[9] | 0;\n var al9 = a9 & 0x1fff;\n var ah9 = a9 >>> 13;\n var b0 = b[0] | 0;\n var bl0 = b0 & 0x1fff;\n var bh0 = b0 >>> 13;\n var b1 = b[1] | 0;\n var bl1 = b1 & 0x1fff;\n var bh1 = b1 >>> 13;\n var b2 = b[2] | 0;\n var bl2 = b2 & 0x1fff;\n var bh2 = b2 >>> 13;\n var b3 = b[3] | 0;\n var bl3 = b3 & 0x1fff;\n var bh3 = b3 >>> 13;\n var b4 = b[4] | 0;\n var bl4 = b4 & 0x1fff;\n var bh4 = b4 >>> 13;\n var b5 = b[5] | 0;\n var bl5 = b5 & 0x1fff;\n var bh5 = b5 >>> 13;\n var b6 = b[6] | 0;\n var bl6 = b6 & 0x1fff;\n var bh6 = b6 >>> 13;\n var b7 = b[7] | 0;\n var bl7 = b7 & 0x1fff;\n var bh7 = b7 >>> 13;\n var b8 = b[8] | 0;\n var bl8 = b8 & 0x1fff;\n var bh8 = b8 >>> 13;\n var b9 = b[9] | 0;\n var bl9 = b9 & 0x1fff;\n var bh9 = b9 >>> 13;\n\n out.negative = self.negative ^ num.negative;\n out.length = 19;\n /* k = 0 */\n lo = Math.imul(al0, bl0);\n mid = Math.imul(al0, bh0);\n mid = (mid + Math.imul(ah0, bl0)) | 0;\n hi = Math.imul(ah0, bh0);\n var w0 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w0 >>> 26)) | 0;\n w0 &= 0x3ffffff;\n /* k = 1 */\n lo = Math.imul(al1, bl0);\n mid = Math.imul(al1, bh0);\n mid = (mid + Math.imul(ah1, bl0)) | 0;\n hi = Math.imul(ah1, bh0);\n lo = (lo + Math.imul(al0, bl1)) | 0;\n mid = (mid + Math.imul(al0, bh1)) | 0;\n mid = (mid + Math.imul(ah0, bl1)) | 0;\n hi = (hi + Math.imul(ah0, bh1)) | 0;\n var w1 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w1 >>> 26)) | 0;\n w1 &= 0x3ffffff;\n /* k = 2 */\n lo = Math.imul(al2, bl0);\n mid = Math.imul(al2, bh0);\n mid = (mid + Math.imul(ah2, bl0)) | 0;\n hi = Math.imul(ah2, bh0);\n lo = (lo + Math.imul(al1, bl1)) | 0;\n mid = (mid + Math.imul(al1, bh1)) | 0;\n mid = (mid + Math.imul(ah1, bl1)) | 0;\n hi = (hi + Math.imul(ah1, bh1)) | 0;\n lo = (lo + Math.imul(al0, bl2)) | 0;\n mid = (mid + Math.imul(al0, bh2)) | 0;\n mid = (mid + Math.imul(ah0, bl2)) | 0;\n hi = (hi + Math.imul(ah0, bh2)) | 0;\n var w2 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w2 >>> 26)) | 0;\n w2 &= 0x3ffffff;\n /* k = 3 */\n lo = Math.imul(al3, bl0);\n mid = Math.imul(al3, bh0);\n mid = (mid + Math.imul(ah3, bl0)) | 0;\n hi = Math.imul(ah3, bh0);\n lo = (lo + Math.imul(al2, bl1)) | 0;\n mid = (mid + Math.imul(al2, bh1)) | 0;\n mid = (mid + Math.imul(ah2, bl1)) | 0;\n hi = (hi + Math.imul(ah2, bh1)) | 0;\n lo = (lo + Math.imul(al1, bl2)) | 0;\n mid = (mid + Math.imul(al1, bh2)) | 0;\n mid = (mid + Math.imul(ah1, bl2)) | 0;\n hi = (hi + Math.imul(ah1, bh2)) | 0;\n lo = (lo + Math.imul(al0, bl3)) | 0;\n mid = (mid + Math.imul(al0, bh3)) | 0;\n mid = (mid + Math.imul(ah0, bl3)) | 0;\n hi = (hi + Math.imul(ah0, bh3)) | 0;\n var w3 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w3 >>> 26)) | 0;\n w3 &= 0x3ffffff;\n /* k = 4 */\n lo = Math.imul(al4, bl0);\n mid = Math.imul(al4, bh0);\n mid = (mid + Math.imul(ah4, bl0)) | 0;\n hi = Math.imul(ah4, bh0);\n lo = (lo + Math.imul(al3, bl1)) | 0;\n mid = (mid + Math.imul(al3, bh1)) | 0;\n mid = (mid + Math.imul(ah3, bl1)) | 0;\n hi = (hi + Math.imul(ah3, bh1)) | 0;\n lo = (lo + Math.imul(al2, bl2)) | 0;\n mid = (mid + Math.imul(al2, bh2)) | 0;\n mid = (mid + Math.imul(ah2, bl2)) | 0;\n hi = (hi + Math.imul(ah2, bh2)) | 0;\n lo = (lo + Math.imul(al1, bl3)) | 0;\n mid = (mid + Math.imul(al1, bh3)) | 0;\n mid = (mid + Math.imul(ah1, bl3)) | 0;\n hi = (hi + Math.imul(ah1, bh3)) | 0;\n lo = (lo + Math.imul(al0, bl4)) | 0;\n mid = (mid + Math.imul(al0, bh4)) | 0;\n mid = (mid + Math.imul(ah0, bl4)) | 0;\n hi = (hi + Math.imul(ah0, bh4)) | 0;\n var w4 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w4 >>> 26)) | 0;\n w4 &= 0x3ffffff;\n /* k = 5 */\n lo = Math.imul(al5, bl0);\n mid = Math.imul(al5, bh0);\n mid = (mid + Math.imul(ah5, bl0)) | 0;\n hi = Math.imul(ah5, bh0);\n lo = (lo + Math.imul(al4, bl1)) | 0;\n mid = (mid + Math.imul(al4, bh1)) | 0;\n mid = (mid + Math.imul(ah4, bl1)) | 0;\n hi = (hi + Math.imul(ah4, bh1)) | 0;\n lo = (lo + Math.imul(al3, bl2)) | 0;\n mid = (mid + Math.imul(al3, bh2)) | 0;\n mid = (mid + Math.imul(ah3, bl2)) | 0;\n hi = (hi + Math.imul(ah3, bh2)) | 0;\n lo = (lo + Math.imul(al2, bl3)) | 0;\n mid = (mid + Math.imul(al2, bh3)) | 0;\n mid = (mid + Math.imul(ah2, bl3)) | 0;\n hi = (hi + Math.imul(ah2, bh3)) | 0;\n lo = (lo + Math.imul(al1, bl4)) | 0;\n mid = (mid + Math.imul(al1, bh4)) | 0;\n mid = (mid + Math.imul(ah1, bl4)) | 0;\n hi = (hi + Math.imul(ah1, bh4)) | 0;\n lo = (lo + Math.imul(al0, bl5)) | 0;\n mid = (mid + Math.imul(al0, bh5)) | 0;\n mid = (mid + Math.imul(ah0, bl5)) | 0;\n hi = (hi + Math.imul(ah0, bh5)) | 0;\n var w5 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w5 >>> 26)) | 0;\n w5 &= 0x3ffffff;\n /* k = 6 */\n lo = Math.imul(al6, bl0);\n mid = Math.imul(al6, bh0);\n mid = (mid + Math.imul(ah6, bl0)) | 0;\n hi = Math.imul(ah6, bh0);\n lo = (lo + Math.imul(al5, bl1)) | 0;\n mid = (mid + Math.imul(al5, bh1)) | 0;\n mid = (mid + Math.imul(ah5, bl1)) | 0;\n hi = (hi + Math.imul(ah5, bh1)) | 0;\n lo = (lo + Math.imul(al4, bl2)) | 0;\n mid = (mid + Math.imul(al4, bh2)) | 0;\n mid = (mid + Math.imul(ah4, bl2)) | 0;\n hi = (hi + Math.imul(ah4, bh2)) | 0;\n lo = (lo + Math.imul(al3, bl3)) | 0;\n mid = (mid + Math.imul(al3, bh3)) | 0;\n mid = (mid + Math.imul(ah3, bl3)) | 0;\n hi = (hi + Math.imul(ah3, bh3)) | 0;\n lo = (lo + Math.imul(al2, bl4)) | 0;\n mid = (mid + Math.imul(al2, bh4)) | 0;\n mid = (mid + Math.imul(ah2, bl4)) | 0;\n hi = (hi + Math.imul(ah2, bh4)) | 0;\n lo = (lo + Math.imul(al1, bl5)) | 0;\n mid = (mid + Math.imul(al1, bh5)) | 0;\n mid = (mid + Math.imul(ah1, bl5)) | 0;\n hi = (hi + Math.imul(ah1, bh5)) | 0;\n lo = (lo + Math.imul(al0, bl6)) | 0;\n mid = (mid + Math.imul(al0, bh6)) | 0;\n mid = (mid + Math.imul(ah0, bl6)) | 0;\n hi = (hi + Math.imul(ah0, bh6)) | 0;\n var w6 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w6 >>> 26)) | 0;\n w6 &= 0x3ffffff;\n /* k = 7 */\n lo = Math.imul(al7, bl0);\n mid = Math.imul(al7, bh0);\n mid = (mid + Math.imul(ah7, bl0)) | 0;\n hi = Math.imul(ah7, bh0);\n lo = (lo + Math.imul(al6, bl1)) | 0;\n mid = (mid + Math.imul(al6, bh1)) | 0;\n mid = (mid + Math.imul(ah6, bl1)) | 0;\n hi = (hi + Math.imul(ah6, bh1)) | 0;\n lo = (lo + Math.imul(al5, bl2)) | 0;\n mid = (mid + Math.imul(al5, bh2)) | 0;\n mid = (mid + Math.imul(ah5, bl2)) | 0;\n hi = (hi + Math.imul(ah5, bh2)) | 0;\n lo = (lo + Math.imul(al4, bl3)) | 0;\n mid = (mid + Math.imul(al4, bh3)) | 0;\n mid = (mid + Math.imul(ah4, bl3)) | 0;\n hi = (hi + Math.imul(ah4, bh3)) | 0;\n lo = (lo + Math.imul(al3, bl4)) | 0;\n mid = (mid + Math.imul(al3, bh4)) | 0;\n mid = (mid + Math.imul(ah3, bl4)) | 0;\n hi = (hi + Math.imul(ah3, bh4)) | 0;\n lo = (lo + Math.imul(al2, bl5)) | 0;\n mid = (mid + Math.imul(al2, bh5)) | 0;\n mid = (mid + Math.imul(ah2, bl5)) | 0;\n hi = (hi + Math.imul(ah2, bh5)) | 0;\n lo = (lo + Math.imul(al1, bl6)) | 0;\n mid = (mid + Math.imul(al1, bh6)) | 0;\n mid = (mid + Math.imul(ah1, bl6)) | 0;\n hi = (hi + Math.imul(ah1, bh6)) | 0;\n lo = (lo + Math.imul(al0, bl7)) | 0;\n mid = (mid + Math.imul(al0, bh7)) | 0;\n mid = (mid + Math.imul(ah0, bl7)) | 0;\n hi = (hi + Math.imul(ah0, bh7)) | 0;\n var w7 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w7 >>> 26)) | 0;\n w7 &= 0x3ffffff;\n /* k = 8 */\n lo = Math.imul(al8, bl0);\n mid = Math.imul(al8, bh0);\n mid = (mid + Math.imul(ah8, bl0)) | 0;\n hi = Math.imul(ah8, bh0);\n lo = (lo + Math.imul(al7, bl1)) | 0;\n mid = (mid + Math.imul(al7, bh1)) | 0;\n mid = (mid + Math.imul(ah7, bl1)) | 0;\n hi = (hi + Math.imul(ah7, bh1)) | 0;\n lo = (lo + Math.imul(al6, bl2)) | 0;\n mid = (mid + Math.imul(al6, bh2)) | 0;\n mid = (mid + Math.imul(ah6, bl2)) | 0;\n hi = (hi + Math.imul(ah6, bh2)) | 0;\n lo = (lo + Math.imul(al5, bl3)) | 0;\n mid = (mid + Math.imul(al5, bh3)) | 0;\n mid = (mid + Math.imul(ah5, bl3)) | 0;\n hi = (hi + Math.imul(ah5, bh3)) | 0;\n lo = (lo + Math.imul(al4, bl4)) | 0;\n mid = (mid + Math.imul(al4, bh4)) | 0;\n mid = (mid + Math.imul(ah4, bl4)) | 0;\n hi = (hi + Math.imul(ah4, bh4)) | 0;\n lo = (lo + Math.imul(al3, bl5)) | 0;\n mid = (mid + Math.imul(al3, bh5)) | 0;\n mid = (mid + Math.imul(ah3, bl5)) | 0;\n hi = (hi + Math.imul(ah3, bh5)) | 0;\n lo = (lo + Math.imul(al2, bl6)) | 0;\n mid = (mid + Math.imul(al2, bh6)) | 0;\n mid = (mid + Math.imul(ah2, bl6)) | 0;\n hi = (hi + Math.imul(ah2, bh6)) | 0;\n lo = (lo + Math.imul(al1, bl7)) | 0;\n mid = (mid + Math.imul(al1, bh7)) | 0;\n mid = (mid + Math.imul(ah1, bl7)) | 0;\n hi = (hi + Math.imul(ah1, bh7)) | 0;\n lo = (lo + Math.imul(al0, bl8)) | 0;\n mid = (mid + Math.imul(al0, bh8)) | 0;\n mid = (mid + Math.imul(ah0, bl8)) | 0;\n hi = (hi + Math.imul(ah0, bh8)) | 0;\n var w8 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w8 >>> 26)) | 0;\n w8 &= 0x3ffffff;\n /* k = 9 */\n lo = Math.imul(al9, bl0);\n mid = Math.imul(al9, bh0);\n mid = (mid + Math.imul(ah9, bl0)) | 0;\n hi = Math.imul(ah9, bh0);\n lo = (lo + Math.imul(al8, bl1)) | 0;\n mid = (mid + Math.imul(al8, bh1)) | 0;\n mid = (mid + Math.imul(ah8, bl1)) | 0;\n hi = (hi + Math.imul(ah8, bh1)) | 0;\n lo = (lo + Math.imul(al7, bl2)) | 0;\n mid = (mid + Math.imul(al7, bh2)) | 0;\n mid = (mid + Math.imul(ah7, bl2)) | 0;\n hi = (hi + Math.imul(ah7, bh2)) | 0;\n lo = (lo + Math.imul(al6, bl3)) | 0;\n mid = (mid + Math.imul(al6, bh3)) | 0;\n mid = (mid + Math.imul(ah6, bl3)) | 0;\n hi = (hi + Math.imul(ah6, bh3)) | 0;\n lo = (lo + Math.imul(al5, bl4)) | 0;\n mid = (mid + Math.imul(al5, bh4)) | 0;\n mid = (mid + Math.imul(ah5, bl4)) | 0;\n hi = (hi + Math.imul(ah5, bh4)) | 0;\n lo = (lo + Math.imul(al4, bl5)) | 0;\n mid = (mid + Math.imul(al4, bh5)) | 0;\n mid = (mid + Math.imul(ah4, bl5)) | 0;\n hi = (hi + Math.imul(ah4, bh5)) | 0;\n lo = (lo + Math.imul(al3, bl6)) | 0;\n mid = (mid + Math.imul(al3, bh6)) | 0;\n mid = (mid + Math.imul(ah3, bl6)) | 0;\n hi = (hi + Math.imul(ah3, bh6)) | 0;\n lo = (lo + Math.imul(al2, bl7)) | 0;\n mid = (mid + Math.imul(al2, bh7)) | 0;\n mid = (mid + Math.imul(ah2, bl7)) | 0;\n hi = (hi + Math.imul(ah2, bh7)) | 0;\n lo = (lo + Math.imul(al1, bl8)) | 0;\n mid = (mid + Math.imul(al1, bh8)) | 0;\n mid = (mid + Math.imul(ah1, bl8)) | 0;\n hi = (hi + Math.imul(ah1, bh8)) | 0;\n lo = (lo + Math.imul(al0, bl9)) | 0;\n mid = (mid + Math.imul(al0, bh9)) | 0;\n mid = (mid + Math.imul(ah0, bl9)) | 0;\n hi = (hi + Math.imul(ah0, bh9)) | 0;\n var w9 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w9 >>> 26)) | 0;\n w9 &= 0x3ffffff;\n /* k = 10 */\n lo = Math.imul(al9, bl1);\n mid = Math.imul(al9, bh1);\n mid = (mid + Math.imul(ah9, bl1)) | 0;\n hi = Math.imul(ah9, bh1);\n lo = (lo + Math.imul(al8, bl2)) | 0;\n mid = (mid + Math.imul(al8, bh2)) | 0;\n mid = (mid + Math.imul(ah8, bl2)) | 0;\n hi = (hi + Math.imul(ah8, bh2)) | 0;\n lo = (lo + Math.imul(al7, bl3)) | 0;\n mid = (mid + Math.imul(al7, bh3)) | 0;\n mid = (mid + Math.imul(ah7, bl3)) | 0;\n hi = (hi + Math.imul(ah7, bh3)) | 0;\n lo = (lo + Math.imul(al6, bl4)) | 0;\n mid = (mid + Math.imul(al6, bh4)) | 0;\n mid = (mid + Math.imul(ah6, bl4)) | 0;\n hi = (hi + Math.imul(ah6, bh4)) | 0;\n lo = (lo + Math.imul(al5, bl5)) | 0;\n mid = (mid + Math.imul(al5, bh5)) | 0;\n mid = (mid + Math.imul(ah5, bl5)) | 0;\n hi = (hi + Math.imul(ah5, bh5)) | 0;\n lo = (lo + Math.imul(al4, bl6)) | 0;\n mid = (mid + Math.imul(al4, bh6)) | 0;\n mid = (mid + Math.imul(ah4, bl6)) | 0;\n hi = (hi + Math.imul(ah4, bh6)) | 0;\n lo = (lo + Math.imul(al3, bl7)) | 0;\n mid = (mid + Math.imul(al3, bh7)) | 0;\n mid = (mid + Math.imul(ah3, bl7)) | 0;\n hi = (hi + Math.imul(ah3, bh7)) | 0;\n lo = (lo + Math.imul(al2, bl8)) | 0;\n mid = (mid + Math.imul(al2, bh8)) | 0;\n mid = (mid + Math.imul(ah2, bl8)) | 0;\n hi = (hi + Math.imul(ah2, bh8)) | 0;\n lo = (lo + Math.imul(al1, bl9)) | 0;\n mid = (mid + Math.imul(al1, bh9)) | 0;\n mid = (mid + Math.imul(ah1, bl9)) | 0;\n hi = (hi + Math.imul(ah1, bh9)) | 0;\n var w10 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w10 >>> 26)) | 0;\n w10 &= 0x3ffffff;\n /* k = 11 */\n lo = Math.imul(al9, bl2);\n mid = Math.imul(al9, bh2);\n mid = (mid + Math.imul(ah9, bl2)) | 0;\n hi = Math.imul(ah9, bh2);\n lo = (lo + Math.imul(al8, bl3)) | 0;\n mid = (mid + Math.imul(al8, bh3)) | 0;\n mid = (mid + Math.imul(ah8, bl3)) | 0;\n hi = (hi + Math.imul(ah8, bh3)) | 0;\n lo = (lo + Math.imul(al7, bl4)) | 0;\n mid = (mid + Math.imul(al7, bh4)) | 0;\n mid = (mid + Math.imul(ah7, bl4)) | 0;\n hi = (hi + Math.imul(ah7, bh4)) | 0;\n lo = (lo + Math.imul(al6, bl5)) | 0;\n mid = (mid + Math.imul(al6, bh5)) | 0;\n mid = (mid + Math.imul(ah6, bl5)) | 0;\n hi = (hi + Math.imul(ah6, bh5)) | 0;\n lo = (lo + Math.imul(al5, bl6)) | 0;\n mid = (mid + Math.imul(al5, bh6)) | 0;\n mid = (mid + Math.imul(ah5, bl6)) | 0;\n hi = (hi + Math.imul(ah5, bh6)) | 0;\n lo = (lo + Math.imul(al4, bl7)) | 0;\n mid = (mid + Math.imul(al4, bh7)) | 0;\n mid = (mid + Math.imul(ah4, bl7)) | 0;\n hi = (hi + Math.imul(ah4, bh7)) | 0;\n lo = (lo + Math.imul(al3, bl8)) | 0;\n mid = (mid + Math.imul(al3, bh8)) | 0;\n mid = (mid + Math.imul(ah3, bl8)) | 0;\n hi = (hi + Math.imul(ah3, bh8)) | 0;\n lo = (lo + Math.imul(al2, bl9)) | 0;\n mid = (mid + Math.imul(al2, bh9)) | 0;\n mid = (mid + Math.imul(ah2, bl9)) | 0;\n hi = (hi + Math.imul(ah2, bh9)) | 0;\n var w11 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w11 >>> 26)) | 0;\n w11 &= 0x3ffffff;\n /* k = 12 */\n lo = Math.imul(al9, bl3);\n mid = Math.imul(al9, bh3);\n mid = (mid + Math.imul(ah9, bl3)) | 0;\n hi = Math.imul(ah9, bh3);\n lo = (lo + Math.imul(al8, bl4)) | 0;\n mid = (mid + Math.imul(al8, bh4)) | 0;\n mid = (mid + Math.imul(ah8, bl4)) | 0;\n hi = (hi + Math.imul(ah8, bh4)) | 0;\n lo = (lo + Math.imul(al7, bl5)) | 0;\n mid = (mid + Math.imul(al7, bh5)) | 0;\n mid = (mid + Math.imul(ah7, bl5)) | 0;\n hi = (hi + Math.imul(ah7, bh5)) | 0;\n lo = (lo + Math.imul(al6, bl6)) | 0;\n mid = (mid + Math.imul(al6, bh6)) | 0;\n mid = (mid + Math.imul(ah6, bl6)) | 0;\n hi = (hi + Math.imul(ah6, bh6)) | 0;\n lo = (lo + Math.imul(al5, bl7)) | 0;\n mid = (mid + Math.imul(al5, bh7)) | 0;\n mid = (mid + Math.imul(ah5, bl7)) | 0;\n hi = (hi + Math.imul(ah5, bh7)) | 0;\n lo = (lo + Math.imul(al4, bl8)) | 0;\n mid = (mid + Math.imul(al4, bh8)) | 0;\n mid = (mid + Math.imul(ah4, bl8)) | 0;\n hi = (hi + Math.imul(ah4, bh8)) | 0;\n lo = (lo + Math.imul(al3, bl9)) | 0;\n mid = (mid + Math.imul(al3, bh9)) | 0;\n mid = (mid + Math.imul(ah3, bl9)) | 0;\n hi = (hi + Math.imul(ah3, bh9)) | 0;\n var w12 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w12 >>> 26)) | 0;\n w12 &= 0x3ffffff;\n /* k = 13 */\n lo = Math.imul(al9, bl4);\n mid = Math.imul(al9, bh4);\n mid = (mid + Math.imul(ah9, bl4)) | 0;\n hi = Math.imul(ah9, bh4);\n lo = (lo + Math.imul(al8, bl5)) | 0;\n mid = (mid + Math.imul(al8, bh5)) | 0;\n mid = (mid + Math.imul(ah8, bl5)) | 0;\n hi = (hi + Math.imul(ah8, bh5)) | 0;\n lo = (lo + Math.imul(al7, bl6)) | 0;\n mid = (mid + Math.imul(al7, bh6)) | 0;\n mid = (mid + Math.imul(ah7, bl6)) | 0;\n hi = (hi + Math.imul(ah7, bh6)) | 0;\n lo = (lo + Math.imul(al6, bl7)) | 0;\n mid = (mid + Math.imul(al6, bh7)) | 0;\n mid = (mid + Math.imul(ah6, bl7)) | 0;\n hi = (hi + Math.imul(ah6, bh7)) | 0;\n lo = (lo + Math.imul(al5, bl8)) | 0;\n mid = (mid + Math.imul(al5, bh8)) | 0;\n mid = (mid + Math.imul(ah5, bl8)) | 0;\n hi = (hi + Math.imul(ah5, bh8)) | 0;\n lo = (lo + Math.imul(al4, bl9)) | 0;\n mid = (mid + Math.imul(al4, bh9)) | 0;\n mid = (mid + Math.imul(ah4, bl9)) | 0;\n hi = (hi + Math.imul(ah4, bh9)) | 0;\n var w13 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w13 >>> 26)) | 0;\n w13 &= 0x3ffffff;\n /* k = 14 */\n lo = Math.imul(al9, bl5);\n mid = Math.imul(al9, bh5);\n mid = (mid + Math.imul(ah9, bl5)) | 0;\n hi = Math.imul(ah9, bh5);\n lo = (lo + Math.imul(al8, bl6)) | 0;\n mid = (mid + Math.imul(al8, bh6)) | 0;\n mid = (mid + Math.imul(ah8, bl6)) | 0;\n hi = (hi + Math.imul(ah8, bh6)) | 0;\n lo = (lo + Math.imul(al7, bl7)) | 0;\n mid = (mid + Math.imul(al7, bh7)) | 0;\n mid = (mid + Math.imul(ah7, bl7)) | 0;\n hi = (hi + Math.imul(ah7, bh7)) | 0;\n lo = (lo + Math.imul(al6, bl8)) | 0;\n mid = (mid + Math.imul(al6, bh8)) | 0;\n mid = (mid + Math.imul(ah6, bl8)) | 0;\n hi = (hi + Math.imul(ah6, bh8)) | 0;\n lo = (lo + Math.imul(al5, bl9)) | 0;\n mid = (mid + Math.imul(al5, bh9)) | 0;\n mid = (mid + Math.imul(ah5, bl9)) | 0;\n hi = (hi + Math.imul(ah5, bh9)) | 0;\n var w14 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w14 >>> 26)) | 0;\n w14 &= 0x3ffffff;\n /* k = 15 */\n lo = Math.imul(al9, bl6);\n mid = Math.imul(al9, bh6);\n mid = (mid + Math.imul(ah9, bl6)) | 0;\n hi = Math.imul(ah9, bh6);\n lo = (lo + Math.imul(al8, bl7)) | 0;\n mid = (mid + Math.imul(al8, bh7)) | 0;\n mid = (mid + Math.imul(ah8, bl7)) | 0;\n hi = (hi + Math.imul(ah8, bh7)) | 0;\n lo = (lo + Math.imul(al7, bl8)) | 0;\n mid = (mid + Math.imul(al7, bh8)) | 0;\n mid = (mid + Math.imul(ah7, bl8)) | 0;\n hi = (hi + Math.imul(ah7, bh8)) | 0;\n lo = (lo + Math.imul(al6, bl9)) | 0;\n mid = (mid + Math.imul(al6, bh9)) | 0;\n mid = (mid + Math.imul(ah6, bl9)) | 0;\n hi = (hi + Math.imul(ah6, bh9)) | 0;\n var w15 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w15 >>> 26)) | 0;\n w15 &= 0x3ffffff;\n /* k = 16 */\n lo = Math.imul(al9, bl7);\n mid = Math.imul(al9, bh7);\n mid = (mid + Math.imul(ah9, bl7)) | 0;\n hi = Math.imul(ah9, bh7);\n lo = (lo + Math.imul(al8, bl8)) | 0;\n mid = (mid + Math.imul(al8, bh8)) | 0;\n mid = (mid + Math.imul(ah8, bl8)) | 0;\n hi = (hi + Math.imul(ah8, bh8)) | 0;\n lo = (lo + Math.imul(al7, bl9)) | 0;\n mid = (mid + Math.imul(al7, bh9)) | 0;\n mid = (mid + Math.imul(ah7, bl9)) | 0;\n hi = (hi + Math.imul(ah7, bh9)) | 0;\n var w16 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w16 >>> 26)) | 0;\n w16 &= 0x3ffffff;\n /* k = 17 */\n lo = Math.imul(al9, bl8);\n mid = Math.imul(al9, bh8);\n mid = (mid + Math.imul(ah9, bl8)) | 0;\n hi = Math.imul(ah9, bh8);\n lo = (lo + Math.imul(al8, bl9)) | 0;\n mid = (mid + Math.imul(al8, bh9)) | 0;\n mid = (mid + Math.imul(ah8, bl9)) | 0;\n hi = (hi + Math.imul(ah8, bh9)) | 0;\n var w17 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w17 >>> 26)) | 0;\n w17 &= 0x3ffffff;\n /* k = 18 */\n lo = Math.imul(al9, bl9);\n mid = Math.imul(al9, bh9);\n mid = (mid + Math.imul(ah9, bl9)) | 0;\n hi = Math.imul(ah9, bh9);\n var w18 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w18 >>> 26)) | 0;\n w18 &= 0x3ffffff;\n o[0] = w0;\n o[1] = w1;\n o[2] = w2;\n o[3] = w3;\n o[4] = w4;\n o[5] = w5;\n o[6] = w6;\n o[7] = w7;\n o[8] = w8;\n o[9] = w9;\n o[10] = w10;\n o[11] = w11;\n o[12] = w12;\n o[13] = w13;\n o[14] = w14;\n o[15] = w15;\n o[16] = w16;\n o[17] = w17;\n o[18] = w18;\n if (c !== 0) {\n o[19] = c;\n out.length++;\n }\n return out;\n };\n\n // Polyfill comb\n if (!Math.imul) {\n comb10MulTo = smallMulTo;\n }\n\n function bigMulTo (self, num, out) {\n out.negative = num.negative ^ self.negative;\n out.length = self.length + num.length;\n\n var carry = 0;\n var hncarry = 0;\n for (var k = 0; k < out.length - 1; k++) {\n // Sum all words with the same `i + j = k` and accumulate `ncarry`,\n // note that ncarry could be >= 0x3ffffff\n var ncarry = hncarry;\n hncarry = 0;\n var rword = carry & 0x3ffffff;\n var maxJ = Math.min(k, num.length - 1);\n for (var j = Math.max(0, k - self.length + 1); j <= maxJ; j++) {\n var i = k - j;\n var a = self.words[i] | 0;\n var b = num.words[j] | 0;\n var r = a * b;\n\n var lo = r & 0x3ffffff;\n ncarry = (ncarry + ((r / 0x4000000) | 0)) | 0;\n lo = (lo + rword) | 0;\n rword = lo & 0x3ffffff;\n ncarry = (ncarry + (lo >>> 26)) | 0;\n\n hncarry += ncarry >>> 26;\n ncarry &= 0x3ffffff;\n }\n out.words[k] = rword;\n carry = ncarry;\n ncarry = hncarry;\n }\n if (carry !== 0) {\n out.words[k] = carry;\n } else {\n out.length--;\n }\n\n return out.strip();\n }\n\n function jumboMulTo (self, num, out) {\n var fftm = new FFTM();\n return fftm.mulp(self, num, out);\n }\n\n BN.prototype.mulTo = function mulTo (num, out) {\n var res;\n var len = this.length + num.length;\n if (this.length === 10 && num.length === 10) {\n res = comb10MulTo(this, num, out);\n } else if (len < 63) {\n res = smallMulTo(this, num, out);\n } else if (len < 1024) {\n res = bigMulTo(this, num, out);\n } else {\n res = jumboMulTo(this, num, out);\n }\n\n return res;\n };\n\n // Cooley-Tukey algorithm for FFT\n // slightly revisited to rely on looping instead of recursion\n\n function FFTM (x, y) {\n this.x = x;\n this.y = y;\n }\n\n FFTM.prototype.makeRBT = function makeRBT (N) {\n var t = new Array(N);\n var l = BN.prototype._countBits(N) - 1;\n for (var i = 0; i < N; i++) {\n t[i] = this.revBin(i, l, N);\n }\n\n return t;\n };\n\n // Returns binary-reversed representation of `x`\n FFTM.prototype.revBin = function revBin (x, l, N) {\n if (x === 0 || x === N - 1) return x;\n\n var rb = 0;\n for (var i = 0; i < l; i++) {\n rb |= (x & 1) << (l - i - 1);\n x >>= 1;\n }\n\n return rb;\n };\n\n // Performs \"tweedling\" phase, therefore 'emulating'\n // behaviour of the recursive algorithm\n FFTM.prototype.permute = function permute (rbt, rws, iws, rtws, itws, N) {\n for (var i = 0; i < N; i++) {\n rtws[i] = rws[rbt[i]];\n itws[i] = iws[rbt[i]];\n }\n };\n\n FFTM.prototype.transform = function transform (rws, iws, rtws, itws, N, rbt) {\n this.permute(rbt, rws, iws, rtws, itws, N);\n\n for (var s = 1; s < N; s <<= 1) {\n var l = s << 1;\n\n var rtwdf = Math.cos(2 * Math.PI / l);\n var itwdf = Math.sin(2 * Math.PI / l);\n\n for (var p = 0; p < N; p += l) {\n var rtwdf_ = rtwdf;\n var itwdf_ = itwdf;\n\n for (var j = 0; j < s; j++) {\n var re = rtws[p + j];\n var ie = itws[p + j];\n\n var ro = rtws[p + j + s];\n var io = itws[p + j + s];\n\n var rx = rtwdf_ * ro - itwdf_ * io;\n\n io = rtwdf_ * io + itwdf_ * ro;\n ro = rx;\n\n rtws[p + j] = re + ro;\n itws[p + j] = ie + io;\n\n rtws[p + j + s] = re - ro;\n itws[p + j + s] = ie - io;\n\n /* jshint maxdepth : false */\n if (j !== l) {\n rx = rtwdf * rtwdf_ - itwdf * itwdf_;\n\n itwdf_ = rtwdf * itwdf_ + itwdf * rtwdf_;\n rtwdf_ = rx;\n }\n }\n }\n }\n };\n\n FFTM.prototype.guessLen13b = function guessLen13b (n, m) {\n var N = Math.max(m, n) | 1;\n var odd = N & 1;\n var i = 0;\n for (N = N / 2 | 0; N; N = N >>> 1) {\n i++;\n }\n\n return 1 << i + 1 + odd;\n };\n\n FFTM.prototype.conjugate = function conjugate (rws, iws, N) {\n if (N <= 1) return;\n\n for (var i = 0; i < N / 2; i++) {\n var t = rws[i];\n\n rws[i] = rws[N - i - 1];\n rws[N - i - 1] = t;\n\n t = iws[i];\n\n iws[i] = -iws[N - i - 1];\n iws[N - i - 1] = -t;\n }\n };\n\n FFTM.prototype.normalize13b = function normalize13b (ws, N) {\n var carry = 0;\n for (var i = 0; i < N / 2; i++) {\n var w = Math.round(ws[2 * i + 1] / N) * 0x2000 +\n Math.round(ws[2 * i] / N) +\n carry;\n\n ws[i] = w & 0x3ffffff;\n\n if (w < 0x4000000) {\n carry = 0;\n } else {\n carry = w / 0x4000000 | 0;\n }\n }\n\n return ws;\n };\n\n FFTM.prototype.convert13b = function convert13b (ws, len, rws, N) {\n var carry = 0;\n for (var i = 0; i < len; i++) {\n carry = carry + (ws[i] | 0);\n\n rws[2 * i] = carry & 0x1fff; carry = carry >>> 13;\n rws[2 * i + 1] = carry & 0x1fff; carry = carry >>> 13;\n }\n\n // Pad with zeroes\n for (i = 2 * len; i < N; ++i) {\n rws[i] = 0;\n }\n\n assert(carry === 0);\n assert((carry & ~0x1fff) === 0);\n };\n\n FFTM.prototype.stub = function stub (N) {\n var ph = new Array(N);\n for (var i = 0; i < N; i++) {\n ph[i] = 0;\n }\n\n return ph;\n };\n\n FFTM.prototype.mulp = function mulp (x, y, out) {\n var N = 2 * this.guessLen13b(x.length, y.length);\n\n var rbt = this.makeRBT(N);\n\n var _ = this.stub(N);\n\n var rws = new Array(N);\n var rwst = new Array(N);\n var iwst = new Array(N);\n\n var nrws = new Array(N);\n var nrwst = new Array(N);\n var niwst = new Array(N);\n\n var rmws = out.words;\n rmws.length = N;\n\n this.convert13b(x.words, x.length, rws, N);\n this.convert13b(y.words, y.length, nrws, N);\n\n this.transform(rws, _, rwst, iwst, N, rbt);\n this.transform(nrws, _, nrwst, niwst, N, rbt);\n\n for (var i = 0; i < N; i++) {\n var rx = rwst[i] * nrwst[i] - iwst[i] * niwst[i];\n iwst[i] = rwst[i] * niwst[i] + iwst[i] * nrwst[i];\n rwst[i] = rx;\n }\n\n this.conjugate(rwst, iwst, N);\n this.transform(rwst, iwst, rmws, _, N, rbt);\n this.conjugate(rmws, _, N);\n this.normalize13b(rmws, N);\n\n out.negative = x.negative ^ y.negative;\n out.length = x.length + y.length;\n return out.strip();\n };\n\n // Multiply `this` by `num`\n BN.prototype.mul = function mul (num) {\n var out = new BN(null);\n out.words = new Array(this.length + num.length);\n return this.mulTo(num, out);\n };\n\n // Multiply employing FFT\n BN.prototype.mulf = function mulf (num) {\n var out = new BN(null);\n out.words = new Array(this.length + num.length);\n return jumboMulTo(this, num, out);\n };\n\n // In-place Multiplication\n BN.prototype.imul = function imul (num) {\n return this.clone().mulTo(num, this);\n };\n\n BN.prototype.imuln = function imuln (num) {\n assert(typeof num === 'number');\n assert(num < 0x4000000);\n\n // Carry\n var carry = 0;\n for (var i = 0; i < this.length; i++) {\n var w = (this.words[i] | 0) * num;\n var lo = (w & 0x3ffffff) + (carry & 0x3ffffff);\n carry >>= 26;\n carry += (w / 0x4000000) | 0;\n // NOTE: lo is 27bit maximum\n carry += lo >>> 26;\n this.words[i] = lo & 0x3ffffff;\n }\n\n if (carry !== 0) {\n this.words[i] = carry;\n this.length++;\n }\n\n return this;\n };\n\n BN.prototype.muln = function muln (num) {\n return this.clone().imuln(num);\n };\n\n // `this` * `this`\n BN.prototype.sqr = function sqr () {\n return this.mul(this);\n };\n\n // `this` * `this` in-place\n BN.prototype.isqr = function isqr () {\n return this.imul(this.clone());\n };\n\n // Math.pow(`this`, `num`)\n BN.prototype.pow = function pow (num) {\n var w = toBitArray(num);\n if (w.length === 0) return new BN(1);\n\n // Skip leading zeroes\n var res = this;\n for (var i = 0; i < w.length; i++, res = res.sqr()) {\n if (w[i] !== 0) break;\n }\n\n if (++i < w.length) {\n for (var q = res.sqr(); i < w.length; i++, q = q.sqr()) {\n if (w[i] === 0) continue;\n\n res = res.mul(q);\n }\n }\n\n return res;\n };\n\n // Shift-left in-place\n BN.prototype.iushln = function iushln (bits) {\n assert(typeof bits === 'number' && bits >= 0);\n var r = bits % 26;\n var s = (bits - r) / 26;\n var carryMask = (0x3ffffff >>> (26 - r)) << (26 - r);\n var i;\n\n if (r !== 0) {\n var carry = 0;\n\n for (i = 0; i < this.length; i++) {\n var newCarry = this.words[i] & carryMask;\n var c = ((this.words[i] | 0) - newCarry) << r;\n this.words[i] = c | carry;\n carry = newCarry >>> (26 - r);\n }\n\n if (carry) {\n this.words[i] = carry;\n this.length++;\n }\n }\n\n if (s !== 0) {\n for (i = this.length - 1; i >= 0; i--) {\n this.words[i + s] = this.words[i];\n }\n\n for (i = 0; i < s; i++) {\n this.words[i] = 0;\n }\n\n this.length += s;\n }\n\n return this.strip();\n };\n\n BN.prototype.ishln = function ishln (bits) {\n // TODO(indutny): implement me\n assert(this.negative === 0);\n return this.iushln(bits);\n };\n\n // Shift-right in-place\n // NOTE: `hint` is a lowest bit before trailing zeroes\n // NOTE: if `extended` is present - it will be filled with destroyed bits\n BN.prototype.iushrn = function iushrn (bits, hint, extended) {\n assert(typeof bits === 'number' && bits >= 0);\n var h;\n if (hint) {\n h = (hint - (hint % 26)) / 26;\n } else {\n h = 0;\n }\n\n var r = bits % 26;\n var s = Math.min((bits - r) / 26, this.length);\n var mask = 0x3ffffff ^ ((0x3ffffff >>> r) << r);\n var maskedWords = extended;\n\n h -= s;\n h = Math.max(0, h);\n\n // Extended mode, copy masked part\n if (maskedWords) {\n for (var i = 0; i < s; i++) {\n maskedWords.words[i] = this.words[i];\n }\n maskedWords.length = s;\n }\n\n if (s === 0) {\n // No-op, we should not move anything at all\n } else if (this.length > s) {\n this.length -= s;\n for (i = 0; i < this.length; i++) {\n this.words[i] = this.words[i + s];\n }\n } else {\n this.words[0] = 0;\n this.length = 1;\n }\n\n var carry = 0;\n for (i = this.length - 1; i >= 0 && (carry !== 0 || i >= h); i--) {\n var word = this.words[i] | 0;\n this.words[i] = (carry << (26 - r)) | (word >>> r);\n carry = word & mask;\n }\n\n // Push carried bits as a mask\n if (maskedWords && carry !== 0) {\n maskedWords.words[maskedWords.length++] = carry;\n }\n\n if (this.length === 0) {\n this.words[0] = 0;\n this.length = 1;\n }\n\n return this.strip();\n };\n\n BN.prototype.ishrn = function ishrn (bits, hint, extended) {\n // TODO(indutny): implement me\n assert(this.negative === 0);\n return this.iushrn(bits, hint, extended);\n };\n\n // Shift-left\n BN.prototype.shln = function shln (bits) {\n return this.clone().ishln(bits);\n };\n\n BN.prototype.ushln = function ushln (bits) {\n return this.clone().iushln(bits);\n };\n\n // Shift-right\n BN.prototype.shrn = function shrn (bits) {\n return this.clone().ishrn(bits);\n };\n\n BN.prototype.ushrn = function ushrn (bits) {\n return this.clone().iushrn(bits);\n };\n\n // Test if n bit is set\n BN.prototype.testn = function testn (bit) {\n assert(typeof bit === 'number' && bit >= 0);\n var r = bit % 26;\n var s = (bit - r) / 26;\n var q = 1 << r;\n\n // Fast case: bit is much higher than all existing words\n if (this.length <= s) return false;\n\n // Check bit and return\n var w = this.words[s];\n\n return !!(w & q);\n };\n\n // Return only lowers bits of number (in-place)\n BN.prototype.imaskn = function imaskn (bits) {\n assert(typeof bits === 'number' && bits >= 0);\n var r = bits % 26;\n var s = (bits - r) / 26;\n\n assert(this.negative === 0, 'imaskn works only with positive numbers');\n\n if (this.length <= s) {\n return this;\n }\n\n if (r !== 0) {\n s++;\n }\n this.length = Math.min(s, this.length);\n\n if (r !== 0) {\n var mask = 0x3ffffff ^ ((0x3ffffff >>> r) << r);\n this.words[this.length - 1] &= mask;\n }\n\n return this.strip();\n };\n\n // Return only lowers bits of number\n BN.prototype.maskn = function maskn (bits) {\n return this.clone().imaskn(bits);\n };\n\n // Add plain number `num` to `this`\n BN.prototype.iaddn = function iaddn (num) {\n assert(typeof num === 'number');\n assert(num < 0x4000000);\n if (num < 0) return this.isubn(-num);\n\n // Possible sign change\n if (this.negative !== 0) {\n if (this.length === 1 && (this.words[0] | 0) < num) {\n this.words[0] = num - (this.words[0] | 0);\n this.negative = 0;\n return this;\n }\n\n this.negative = 0;\n this.isubn(num);\n this.negative = 1;\n return this;\n }\n\n // Add without checks\n return this._iaddn(num);\n };\n\n BN.prototype._iaddn = function _iaddn (num) {\n this.words[0] += num;\n\n // Carry\n for (var i = 0; i < this.length && this.words[i] >= 0x4000000; i++) {\n this.words[i] -= 0x4000000;\n if (i === this.length - 1) {\n this.words[i + 1] = 1;\n } else {\n this.words[i + 1]++;\n }\n }\n this.length = Math.max(this.length, i + 1);\n\n return this;\n };\n\n // Subtract plain number `num` from `this`\n BN.prototype.isubn = function isubn (num) {\n assert(typeof num === 'number');\n assert(num < 0x4000000);\n if (num < 0) return this.iaddn(-num);\n\n if (this.negative !== 0) {\n this.negative = 0;\n this.iaddn(num);\n this.negative = 1;\n return this;\n }\n\n this.words[0] -= num;\n\n if (this.length === 1 && this.words[0] < 0) {\n this.words[0] = -this.words[0];\n this.negative = 1;\n } else {\n // Carry\n for (var i = 0; i < this.length && this.words[i] < 0; i++) {\n this.words[i] += 0x4000000;\n this.words[i + 1] -= 1;\n }\n }\n\n return this.strip();\n };\n\n BN.prototype.addn = function addn (num) {\n return this.clone().iaddn(num);\n };\n\n BN.prototype.subn = function subn (num) {\n return this.clone().isubn(num);\n };\n\n BN.prototype.iabs = function iabs () {\n this.negative = 0;\n\n return this;\n };\n\n BN.prototype.abs = function abs () {\n return this.clone().iabs();\n };\n\n BN.prototype._ishlnsubmul = function _ishlnsubmul (num, mul, shift) {\n var len = num.length + shift;\n var i;\n\n this._expand(len);\n\n var w;\n var carry = 0;\n for (i = 0; i < num.length; i++) {\n w = (this.words[i + shift] | 0) + carry;\n var right = (num.words[i] | 0) * mul;\n w -= right & 0x3ffffff;\n carry = (w >> 26) - ((right / 0x4000000) | 0);\n this.words[i + shift] = w & 0x3ffffff;\n }\n for (; i < this.length - shift; i++) {\n w = (this.words[i + shift] | 0) + carry;\n carry = w >> 26;\n this.words[i + shift] = w & 0x3ffffff;\n }\n\n if (carry === 0) return this.strip();\n\n // Subtraction overflow\n assert(carry === -1);\n carry = 0;\n for (i = 0; i < this.length; i++) {\n w = -(this.words[i] | 0) + carry;\n carry = w >> 26;\n this.words[i] = w & 0x3ffffff;\n }\n this.negative = 1;\n\n return this.strip();\n };\n\n BN.prototype._wordDiv = function _wordDiv (num, mode) {\n var shift = this.length - num.length;\n\n var a = this.clone();\n var b = num;\n\n // Normalize\n var bhi = b.words[b.length - 1] | 0;\n var bhiBits = this._countBits(bhi);\n shift = 26 - bhiBits;\n if (shift !== 0) {\n b = b.ushln(shift);\n a.iushln(shift);\n bhi = b.words[b.length - 1] | 0;\n }\n\n // Initialize quotient\n var m = a.length - b.length;\n var q;\n\n if (mode !== 'mod') {\n q = new BN(null);\n q.length = m + 1;\n q.words = new Array(q.length);\n for (var i = 0; i < q.length; i++) {\n q.words[i] = 0;\n }\n }\n\n var diff = a.clone()._ishlnsubmul(b, 1, m);\n if (diff.negative === 0) {\n a = diff;\n if (q) {\n q.words[m] = 1;\n }\n }\n\n for (var j = m - 1; j >= 0; j--) {\n var qj = (a.words[b.length + j] | 0) * 0x4000000 +\n (a.words[b.length + j - 1] | 0);\n\n // NOTE: (qj / bhi) is (0x3ffffff * 0x4000000 + 0x3ffffff) / 0x2000000 max\n // (0x7ffffff)\n qj = Math.min((qj / bhi) | 0, 0x3ffffff);\n\n a._ishlnsubmul(b, qj, j);\n while (a.negative !== 0) {\n qj--;\n a.negative = 0;\n a._ishlnsubmul(b, 1, j);\n if (!a.isZero()) {\n a.negative ^= 1;\n }\n }\n if (q) {\n q.words[j] = qj;\n }\n }\n if (q) {\n q.strip();\n }\n a.strip();\n\n // Denormalize\n if (mode !== 'div' && shift !== 0) {\n a.iushrn(shift);\n }\n\n return {\n div: q || null,\n mod: a\n };\n };\n\n // NOTE: 1) `mode` can be set to `mod` to request mod only,\n // to `div` to request div only, or be absent to\n // request both div & mod\n // 2) `positive` is true if unsigned mod is requested\n BN.prototype.divmod = function divmod (num, mode, positive) {\n assert(!num.isZero());\n\n if (this.isZero()) {\n return {\n div: new BN(0),\n mod: new BN(0)\n };\n }\n\n var div, mod, res;\n if (this.negative !== 0 && num.negative === 0) {\n res = this.neg().divmod(num, mode);\n\n if (mode !== 'mod') {\n div = res.div.neg();\n }\n\n if (mode !== 'div') {\n mod = res.mod.neg();\n if (positive && mod.negative !== 0) {\n mod.iadd(num);\n }\n }\n\n return {\n div: div,\n mod: mod\n };\n }\n\n if (this.negative === 0 && num.negative !== 0) {\n res = this.divmod(num.neg(), mode);\n\n if (mode !== 'mod') {\n div = res.div.neg();\n }\n\n return {\n div: div,\n mod: res.mod\n };\n }\n\n if ((this.negative & num.negative) !== 0) {\n res = this.neg().divmod(num.neg(), mode);\n\n if (mode !== 'div') {\n mod = res.mod.neg();\n if (positive && mod.negative !== 0) {\n mod.isub(num);\n }\n }\n\n return {\n div: res.div,\n mod: mod\n };\n }\n\n // Both numbers are positive at this point\n\n // Strip both numbers to approximate shift value\n if (num.length > this.length || this.cmp(num) < 0) {\n return {\n div: new BN(0),\n mod: this\n };\n }\n\n // Very short reduction\n if (num.length === 1) {\n if (mode === 'div') {\n return {\n div: this.divn(num.words[0]),\n mod: null\n };\n }\n\n if (mode === 'mod') {\n return {\n div: null,\n mod: new BN(this.modn(num.words[0]))\n };\n }\n\n return {\n div: this.divn(num.words[0]),\n mod: new BN(this.modn(num.words[0]))\n };\n }\n\n return this._wordDiv(num, mode);\n };\n\n // Find `this` / `num`\n BN.prototype.div = function div (num) {\n return this.divmod(num, 'div', false).div;\n };\n\n // Find `this` % `num`\n BN.prototype.mod = function mod (num) {\n return this.divmod(num, 'mod', false).mod;\n };\n\n BN.prototype.umod = function umod (num) {\n return this.divmod(num, 'mod', true).mod;\n };\n\n // Find Round(`this` / `num`)\n BN.prototype.divRound = function divRound (num) {\n var dm = this.divmod(num);\n\n // Fast case - exact division\n if (dm.mod.isZero()) return dm.div;\n\n var mod = dm.div.negative !== 0 ? dm.mod.isub(num) : dm.mod;\n\n var half = num.ushrn(1);\n var r2 = num.andln(1);\n var cmp = mod.cmp(half);\n\n // Round down\n if (cmp < 0 || r2 === 1 && cmp === 0) return dm.div;\n\n // Round up\n return dm.div.negative !== 0 ? dm.div.isubn(1) : dm.div.iaddn(1);\n };\n\n BN.prototype.modn = function modn (num) {\n assert(num <= 0x3ffffff);\n var p = (1 << 26) % num;\n\n var acc = 0;\n for (var i = this.length - 1; i >= 0; i--) {\n acc = (p * acc + (this.words[i] | 0)) % num;\n }\n\n return acc;\n };\n\n // In-place division by number\n BN.prototype.idivn = function idivn (num) {\n assert(num <= 0x3ffffff);\n\n var carry = 0;\n for (var i = this.length - 1; i >= 0; i--) {\n var w = (this.words[i] | 0) + carry * 0x4000000;\n this.words[i] = (w / num) | 0;\n carry = w % num;\n }\n\n return this.strip();\n };\n\n BN.prototype.divn = function divn (num) {\n return this.clone().idivn(num);\n };\n\n BN.prototype.egcd = function egcd (p) {\n assert(p.negative === 0);\n assert(!p.isZero());\n\n var x = this;\n var y = p.clone();\n\n if (x.negative !== 0) {\n x = x.umod(p);\n } else {\n x = x.clone();\n }\n\n // A * x + B * y = x\n var A = new BN(1);\n var B = new BN(0);\n\n // C * x + D * y = y\n var C = new BN(0);\n var D = new BN(1);\n\n var g = 0;\n\n while (x.isEven() && y.isEven()) {\n x.iushrn(1);\n y.iushrn(1);\n ++g;\n }\n\n var yp = y.clone();\n var xp = x.clone();\n\n while (!x.isZero()) {\n for (var i = 0, im = 1; (x.words[0] & im) === 0 && i < 26; ++i, im <<= 1);\n if (i > 0) {\n x.iushrn(i);\n while (i-- > 0) {\n if (A.isOdd() || B.isOdd()) {\n A.iadd(yp);\n B.isub(xp);\n }\n\n A.iushrn(1);\n B.iushrn(1);\n }\n }\n\n for (var j = 0, jm = 1; (y.words[0] & jm) === 0 && j < 26; ++j, jm <<= 1);\n if (j > 0) {\n y.iushrn(j);\n while (j-- > 0) {\n if (C.isOdd() || D.isOdd()) {\n C.iadd(yp);\n D.isub(xp);\n }\n\n C.iushrn(1);\n D.iushrn(1);\n }\n }\n\n if (x.cmp(y) >= 0) {\n x.isub(y);\n A.isub(C);\n B.isub(D);\n } else {\n y.isub(x);\n C.isub(A);\n D.isub(B);\n }\n }\n\n return {\n a: C,\n b: D,\n gcd: y.iushln(g)\n };\n };\n\n // This is reduced incarnation of the binary EEA\n // above, designated to invert members of the\n // _prime_ fields F(p) at a maximal speed\n BN.prototype._invmp = function _invmp (p) {\n assert(p.negative === 0);\n assert(!p.isZero());\n\n var a = this;\n var b = p.clone();\n\n if (a.negative !== 0) {\n a = a.umod(p);\n } else {\n a = a.clone();\n }\n\n var x1 = new BN(1);\n var x2 = new BN(0);\n\n var delta = b.clone();\n\n while (a.cmpn(1) > 0 && b.cmpn(1) > 0) {\n for (var i = 0, im = 1; (a.words[0] & im) === 0 && i < 26; ++i, im <<= 1);\n if (i > 0) {\n a.iushrn(i);\n while (i-- > 0) {\n if (x1.isOdd()) {\n x1.iadd(delta);\n }\n\n x1.iushrn(1);\n }\n }\n\n for (var j = 0, jm = 1; (b.words[0] & jm) === 0 && j < 26; ++j, jm <<= 1);\n if (j > 0) {\n b.iushrn(j);\n while (j-- > 0) {\n if (x2.isOdd()) {\n x2.iadd(delta);\n }\n\n x2.iushrn(1);\n }\n }\n\n if (a.cmp(b) >= 0) {\n a.isub(b);\n x1.isub(x2);\n } else {\n b.isub(a);\n x2.isub(x1);\n }\n }\n\n var res;\n if (a.cmpn(1) === 0) {\n res = x1;\n } else {\n res = x2;\n }\n\n if (res.cmpn(0) < 0) {\n res.iadd(p);\n }\n\n return res;\n };\n\n BN.prototype.gcd = function gcd (num) {\n if (this.isZero()) return num.abs();\n if (num.isZero()) return this.abs();\n\n var a = this.clone();\n var b = num.clone();\n a.negative = 0;\n b.negative = 0;\n\n // Remove common factor of two\n for (var shift = 0; a.isEven() && b.isEven(); shift++) {\n a.iushrn(1);\n b.iushrn(1);\n }\n\n do {\n while (a.isEven()) {\n a.iushrn(1);\n }\n while (b.isEven()) {\n b.iushrn(1);\n }\n\n var r = a.cmp(b);\n if (r < 0) {\n // Swap `a` and `b` to make `a` always bigger than `b`\n var t = a;\n a = b;\n b = t;\n } else if (r === 0 || b.cmpn(1) === 0) {\n break;\n }\n\n a.isub(b);\n } while (true);\n\n return b.iushln(shift);\n };\n\n // Invert number in the field F(num)\n BN.prototype.invm = function invm (num) {\n return this.egcd(num).a.umod(num);\n };\n\n BN.prototype.isEven = function isEven () {\n return (this.words[0] & 1) === 0;\n };\n\n BN.prototype.isOdd = function isOdd () {\n return (this.words[0] & 1) === 1;\n };\n\n // And first word and num\n BN.prototype.andln = function andln (num) {\n return this.words[0] & num;\n };\n\n // Increment at the bit position in-line\n BN.prototype.bincn = function bincn (bit) {\n assert(typeof bit === 'number');\n var r = bit % 26;\n var s = (bit - r) / 26;\n var q = 1 << r;\n\n // Fast case: bit is much higher than all existing words\n if (this.length <= s) {\n this._expand(s + 1);\n this.words[s] |= q;\n return this;\n }\n\n // Add bit and propagate, if needed\n var carry = q;\n for (var i = s; carry !== 0 && i < this.length; i++) {\n var w = this.words[i] | 0;\n w += carry;\n carry = w >>> 26;\n w &= 0x3ffffff;\n this.words[i] = w;\n }\n if (carry !== 0) {\n this.words[i] = carry;\n this.length++;\n }\n return this;\n };\n\n BN.prototype.isZero = function isZero () {\n return this.length === 1 && this.words[0] === 0;\n };\n\n BN.prototype.cmpn = function cmpn (num) {\n var negative = num < 0;\n\n if (this.negative !== 0 && !negative) return -1;\n if (this.negative === 0 && negative) return 1;\n\n this.strip();\n\n var res;\n if (this.length > 1) {\n res = 1;\n } else {\n if (negative) {\n num = -num;\n }\n\n assert(num <= 0x3ffffff, 'Number is too big');\n\n var w = this.words[0] | 0;\n res = w === num ? 0 : w < num ? -1 : 1;\n }\n if (this.negative !== 0) return -res | 0;\n return res;\n };\n\n // Compare two numbers and return:\n // 1 - if `this` > `num`\n // 0 - if `this` == `num`\n // -1 - if `this` < `num`\n BN.prototype.cmp = function cmp (num) {\n if (this.negative !== 0 && num.negative === 0) return -1;\n if (this.negative === 0 && num.negative !== 0) return 1;\n\n var res = this.ucmp(num);\n if (this.negative !== 0) return -res | 0;\n return res;\n };\n\n // Unsigned comparison\n BN.prototype.ucmp = function ucmp (num) {\n // At this point both numbers have the same sign\n if (this.length > num.length) return 1;\n if (this.length < num.length) return -1;\n\n var res = 0;\n for (var i = this.length - 1; i >= 0; i--) {\n var a = this.words[i] | 0;\n var b = num.words[i] | 0;\n\n if (a === b) continue;\n if (a < b) {\n res = -1;\n } else if (a > b) {\n res = 1;\n }\n break;\n }\n return res;\n };\n\n BN.prototype.gtn = function gtn (num) {\n return this.cmpn(num) === 1;\n };\n\n BN.prototype.gt = function gt (num) {\n return this.cmp(num) === 1;\n };\n\n BN.prototype.gten = function gten (num) {\n return this.cmpn(num) >= 0;\n };\n\n BN.prototype.gte = function gte (num) {\n return this.cmp(num) >= 0;\n };\n\n BN.prototype.ltn = function ltn (num) {\n return this.cmpn(num) === -1;\n };\n\n BN.prototype.lt = function lt (num) {\n return this.cmp(num) === -1;\n };\n\n BN.prototype.lten = function lten (num) {\n return this.cmpn(num) <= 0;\n };\n\n BN.prototype.lte = function lte (num) {\n return this.cmp(num) <= 0;\n };\n\n BN.prototype.eqn = function eqn (num) {\n return this.cmpn(num) === 0;\n };\n\n BN.prototype.eq = function eq (num) {\n return this.cmp(num) === 0;\n };\n\n //\n // A reduce context, could be using montgomery or something better, depending\n // on the `m` itself.\n //\n BN.red = function red (num) {\n return new Red(num);\n };\n\n BN.prototype.toRed = function toRed (ctx) {\n assert(!this.red, 'Already a number in reduction context');\n assert(this.negative === 0, 'red works only with positives');\n return ctx.convertTo(this)._forceRed(ctx);\n };\n\n BN.prototype.fromRed = function fromRed () {\n assert(this.red, 'fromRed works only with numbers in reduction context');\n return this.red.convertFrom(this);\n };\n\n BN.prototype._forceRed = function _forceRed (ctx) {\n this.red = ctx;\n return this;\n };\n\n BN.prototype.forceRed = function forceRed (ctx) {\n assert(!this.red, 'Already a number in reduction context');\n return this._forceRed(ctx);\n };\n\n BN.prototype.redAdd = function redAdd (num) {\n assert(this.red, 'redAdd works only with red numbers');\n return this.red.add(this, num);\n };\n\n BN.prototype.redIAdd = function redIAdd (num) {\n assert(this.red, 'redIAdd works only with red numbers');\n return this.red.iadd(this, num);\n };\n\n BN.prototype.redSub = function redSub (num) {\n assert(this.red, 'redSub works only with red numbers');\n return this.red.sub(this, num);\n };\n\n BN.prototype.redISub = function redISub (num) {\n assert(this.red, 'redISub works only with red numbers');\n return this.red.isub(this, num);\n };\n\n BN.prototype.redShl = function redShl (num) {\n assert(this.red, 'redShl works only with red numbers');\n return this.red.shl(this, num);\n };\n\n BN.prototype.redMul = function redMul (num) {\n assert(this.red, 'redMul works only with red numbers');\n this.red._verify2(this, num);\n return this.red.mul(this, num);\n };\n\n BN.prototype.redIMul = function redIMul (num) {\n assert(this.red, 'redMul works only with red numbers');\n this.red._verify2(this, num);\n return this.red.imul(this, num);\n };\n\n BN.prototype.redSqr = function redSqr () {\n assert(this.red, 'redSqr works only with red numbers');\n this.red._verify1(this);\n return this.red.sqr(this);\n };\n\n BN.prototype.redISqr = function redISqr () {\n assert(this.red, 'redISqr works only with red numbers');\n this.red._verify1(this);\n return this.red.isqr(this);\n };\n\n // Square root over p\n BN.prototype.redSqrt = function redSqrt () {\n assert(this.red, 'redSqrt works only with red numbers');\n this.red._verify1(this);\n return this.red.sqrt(this);\n };\n\n BN.prototype.redInvm = function redInvm () {\n assert(this.red, 'redInvm works only with red numbers');\n this.red._verify1(this);\n return this.red.invm(this);\n };\n\n // Return negative clone of `this` % `red modulo`\n BN.prototype.redNeg = function redNeg () {\n assert(this.red, 'redNeg works only with red numbers');\n this.red._verify1(this);\n return this.red.neg(this);\n };\n\n BN.prototype.redPow = function redPow (num) {\n assert(this.red && !num.red, 'redPow(normalNum)');\n this.red._verify1(this);\n return this.red.pow(this, num);\n };\n\n // Prime numbers with efficient reduction\n var primes = {\n k256: null,\n p224: null,\n p192: null,\n p25519: null\n };\n\n // Pseudo-Mersenne prime\n function MPrime (name, p) {\n // P = 2 ^ N - K\n this.name = name;\n this.p = new BN(p, 16);\n this.n = this.p.bitLength();\n this.k = new BN(1).iushln(this.n).isub(this.p);\n\n this.tmp = this._tmp();\n }\n\n MPrime.prototype._tmp = function _tmp () {\n var tmp = new BN(null);\n tmp.words = new Array(Math.ceil(this.n / 13));\n return tmp;\n };\n\n MPrime.prototype.ireduce = function ireduce (num) {\n // Assumes that `num` is less than `P^2`\n // num = HI * (2 ^ N - K) + HI * K + LO = HI * K + LO (mod P)\n var r = num;\n var rlen;\n\n do {\n this.split(r, this.tmp);\n r = this.imulK(r);\n r = r.iadd(this.tmp);\n rlen = r.bitLength();\n } while (rlen > this.n);\n\n var cmp = rlen < this.n ? -1 : r.ucmp(this.p);\n if (cmp === 0) {\n r.words[0] = 0;\n r.length = 1;\n } else if (cmp > 0) {\n r.isub(this.p);\n } else {\n if (r.strip !== undefined) {\n // r is BN v4 instance\n r.strip();\n } else {\n // r is BN v5 instance\n r._strip();\n }\n }\n\n return r;\n };\n\n MPrime.prototype.split = function split (input, out) {\n input.iushrn(this.n, 0, out);\n };\n\n MPrime.prototype.imulK = function imulK (num) {\n return num.imul(this.k);\n };\n\n function K256 () {\n MPrime.call(\n this,\n 'k256',\n 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f');\n }\n inherits(K256, MPrime);\n\n K256.prototype.split = function split (input, output) {\n // 256 = 9 * 26 + 22\n var mask = 0x3fffff;\n\n var outLen = Math.min(input.length, 9);\n for (var i = 0; i < outLen; i++) {\n output.words[i] = input.words[i];\n }\n output.length = outLen;\n\n if (input.length <= 9) {\n input.words[0] = 0;\n input.length = 1;\n return;\n }\n\n // Shift by 9 limbs\n var prev = input.words[9];\n output.words[output.length++] = prev & mask;\n\n for (i = 10; i < input.length; i++) {\n var next = input.words[i] | 0;\n input.words[i - 10] = ((next & mask) << 4) | (prev >>> 22);\n prev = next;\n }\n prev >>>= 22;\n input.words[i - 10] = prev;\n if (prev === 0 && input.length > 10) {\n input.length -= 10;\n } else {\n input.length -= 9;\n }\n };\n\n K256.prototype.imulK = function imulK (num) {\n // K = 0x1000003d1 = [ 0x40, 0x3d1 ]\n num.words[num.length] = 0;\n num.words[num.length + 1] = 0;\n num.length += 2;\n\n // bounded at: 0x40 * 0x3ffffff + 0x3d0 = 0x100000390\n var lo = 0;\n for (var i = 0; i < num.length; i++) {\n var w = num.words[i] | 0;\n lo += w * 0x3d1;\n num.words[i] = lo & 0x3ffffff;\n lo = w * 0x40 + ((lo / 0x4000000) | 0);\n }\n\n // Fast length reduction\n if (num.words[num.length - 1] === 0) {\n num.length--;\n if (num.words[num.length - 1] === 0) {\n num.length--;\n }\n }\n return num;\n };\n\n function P224 () {\n MPrime.call(\n this,\n 'p224',\n 'ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001');\n }\n inherits(P224, MPrime);\n\n function P192 () {\n MPrime.call(\n this,\n 'p192',\n 'ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff');\n }\n inherits(P192, MPrime);\n\n function P25519 () {\n // 2 ^ 255 - 19\n MPrime.call(\n this,\n '25519',\n '7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed');\n }\n inherits(P25519, MPrime);\n\n P25519.prototype.imulK = function imulK (num) {\n // K = 0x13\n var carry = 0;\n for (var i = 0; i < num.length; i++) {\n var hi = (num.words[i] | 0) * 0x13 + carry;\n var lo = hi & 0x3ffffff;\n hi >>>= 26;\n\n num.words[i] = lo;\n carry = hi;\n }\n if (carry !== 0) {\n num.words[num.length++] = carry;\n }\n return num;\n };\n\n // Exported mostly for testing purposes, use plain name instead\n BN._prime = function prime (name) {\n // Cached version of prime\n if (primes[name]) return primes[name];\n\n var prime;\n if (name === 'k256') {\n prime = new K256();\n } else if (name === 'p224') {\n prime = new P224();\n } else if (name === 'p192') {\n prime = new P192();\n } else if (name === 'p25519') {\n prime = new P25519();\n } else {\n throw new Error('Unknown prime ' + name);\n }\n primes[name] = prime;\n\n return prime;\n };\n\n //\n // Base reduction engine\n //\n function Red (m) {\n if (typeof m === 'string') {\n var prime = BN._prime(m);\n this.m = prime.p;\n this.prime = prime;\n } else {\n assert(m.gtn(1), 'modulus must be greater than 1');\n this.m = m;\n this.prime = null;\n }\n }\n\n Red.prototype._verify1 = function _verify1 (a) {\n assert(a.negative === 0, 'red works only with positives');\n assert(a.red, 'red works only with red numbers');\n };\n\n Red.prototype._verify2 = function _verify2 (a, b) {\n assert((a.negative | b.negative) === 0, 'red works only with positives');\n assert(a.red && a.red === b.red,\n 'red works only with red numbers');\n };\n\n Red.prototype.imod = function imod (a) {\n if (this.prime) return this.prime.ireduce(a)._forceRed(this);\n return a.umod(this.m)._forceRed(this);\n };\n\n Red.prototype.neg = function neg (a) {\n if (a.isZero()) {\n return a.clone();\n }\n\n return this.m.sub(a)._forceRed(this);\n };\n\n Red.prototype.add = function add (a, b) {\n this._verify2(a, b);\n\n var res = a.add(b);\n if (res.cmp(this.m) >= 0) {\n res.isub(this.m);\n }\n return res._forceRed(this);\n };\n\n Red.prototype.iadd = function iadd (a, b) {\n this._verify2(a, b);\n\n var res = a.iadd(b);\n if (res.cmp(this.m) >= 0) {\n res.isub(this.m);\n }\n return res;\n };\n\n Red.prototype.sub = function sub (a, b) {\n this._verify2(a, b);\n\n var res = a.sub(b);\n if (res.cmpn(0) < 0) {\n res.iadd(this.m);\n }\n return res._forceRed(this);\n };\n\n Red.prototype.isub = function isub (a, b) {\n this._verify2(a, b);\n\n var res = a.isub(b);\n if (res.cmpn(0) < 0) {\n res.iadd(this.m);\n }\n return res;\n };\n\n Red.prototype.shl = function shl (a, num) {\n this._verify1(a);\n return this.imod(a.ushln(num));\n };\n\n Red.prototype.imul = function imul (a, b) {\n this._verify2(a, b);\n return this.imod(a.imul(b));\n };\n\n Red.prototype.mul = function mul (a, b) {\n this._verify2(a, b);\n return this.imod(a.mul(b));\n };\n\n Red.prototype.isqr = function isqr (a) {\n return this.imul(a, a.clone());\n };\n\n Red.prototype.sqr = function sqr (a) {\n return this.mul(a, a);\n };\n\n Red.prototype.sqrt = function sqrt (a) {\n if (a.isZero()) return a.clone();\n\n var mod3 = this.m.andln(3);\n assert(mod3 % 2 === 1);\n\n // Fast case\n if (mod3 === 3) {\n var pow = this.m.add(new BN(1)).iushrn(2);\n return this.pow(a, pow);\n }\n\n // Tonelli-Shanks algorithm (Totally unoptimized and slow)\n //\n // Find Q and S, that Q * 2 ^ S = (P - 1)\n var q = this.m.subn(1);\n var s = 0;\n while (!q.isZero() && q.andln(1) === 0) {\n s++;\n q.iushrn(1);\n }\n assert(!q.isZero());\n\n var one = new BN(1).toRed(this);\n var nOne = one.redNeg();\n\n // Find quadratic non-residue\n // NOTE: Max is such because of generalized Riemann hypothesis.\n var lpow = this.m.subn(1).iushrn(1);\n var z = this.m.bitLength();\n z = new BN(2 * z * z).toRed(this);\n\n while (this.pow(z, lpow).cmp(nOne) !== 0) {\n z.redIAdd(nOne);\n }\n\n var c = this.pow(z, q);\n var r = this.pow(a, q.addn(1).iushrn(1));\n var t = this.pow(a, q);\n var m = s;\n while (t.cmp(one) !== 0) {\n var tmp = t;\n for (var i = 0; tmp.cmp(one) !== 0; i++) {\n tmp = tmp.redSqr();\n }\n assert(i < m);\n var b = this.pow(c, new BN(1).iushln(m - i - 1));\n\n r = r.redMul(b);\n c = b.redSqr();\n t = t.redMul(c);\n m = i;\n }\n\n return r;\n };\n\n Red.prototype.invm = function invm (a) {\n var inv = a._invmp(this.m);\n if (inv.negative !== 0) {\n inv.negative = 0;\n return this.imod(inv).redNeg();\n } else {\n return this.imod(inv);\n }\n };\n\n Red.prototype.pow = function pow (a, num) {\n if (num.isZero()) return new BN(1).toRed(this);\n if (num.cmpn(1) === 0) return a.clone();\n\n var windowSize = 4;\n var wnd = new Array(1 << windowSize);\n wnd[0] = new BN(1).toRed(this);\n wnd[1] = a;\n for (var i = 2; i < wnd.length; i++) {\n wnd[i] = this.mul(wnd[i - 1], a);\n }\n\n var res = wnd[0];\n var current = 0;\n var currentLen = 0;\n var start = num.bitLength() % 26;\n if (start === 0) {\n start = 26;\n }\n\n for (i = num.length - 1; i >= 0; i--) {\n var word = num.words[i];\n for (var j = start - 1; j >= 0; j--) {\n var bit = (word >> j) & 1;\n if (res !== wnd[0]) {\n res = this.sqr(res);\n }\n\n if (bit === 0 && current === 0) {\n currentLen = 0;\n continue;\n }\n\n current <<= 1;\n current |= bit;\n currentLen++;\n if (currentLen !== windowSize && (i !== 0 || j !== 0)) continue;\n\n res = this.mul(res, wnd[current]);\n currentLen = 0;\n current = 0;\n }\n start = 26;\n }\n\n return res;\n };\n\n Red.prototype.convertTo = function convertTo (num) {\n var r = num.umod(this.m);\n\n return r === num ? r.clone() : r;\n };\n\n Red.prototype.convertFrom = function convertFrom (num) {\n var res = num.clone();\n res.red = null;\n return res;\n };\n\n //\n // Montgomery method engine\n //\n\n BN.mont = function mont (num) {\n return new Mont(num);\n };\n\n function Mont (m) {\n Red.call(this, m);\n\n this.shift = this.m.bitLength();\n if (this.shift % 26 !== 0) {\n this.shift += 26 - (this.shift % 26);\n }\n\n this.r = new BN(1).iushln(this.shift);\n this.r2 = this.imod(this.r.sqr());\n this.rinv = this.r._invmp(this.m);\n\n this.minv = this.rinv.mul(this.r).isubn(1).div(this.m);\n this.minv = this.minv.umod(this.r);\n this.minv = this.r.sub(this.minv);\n }\n inherits(Mont, Red);\n\n Mont.prototype.convertTo = function convertTo (num) {\n return this.imod(num.ushln(this.shift));\n };\n\n Mont.prototype.convertFrom = function convertFrom (num) {\n var r = this.imod(num.mul(this.rinv));\n r.red = null;\n return r;\n };\n\n Mont.prototype.imul = function imul (a, b) {\n if (a.isZero() || b.isZero()) {\n a.words[0] = 0;\n a.length = 1;\n return a;\n }\n\n var t = a.imul(b);\n var c = t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m);\n var u = t.isub(c).iushrn(this.shift);\n var res = u;\n\n if (u.cmp(this.m) >= 0) {\n res = u.isub(this.m);\n } else if (u.cmpn(0) < 0) {\n res = u.iadd(this.m);\n }\n\n return res._forceRed(this);\n };\n\n Mont.prototype.mul = function mul (a, b) {\n if (a.isZero() || b.isZero()) return new BN(0)._forceRed(this);\n\n var t = a.mul(b);\n var c = t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m);\n var u = t.isub(c).iushrn(this.shift);\n var res = u;\n if (u.cmp(this.m) >= 0) {\n res = u.isub(this.m);\n } else if (u.cmpn(0) < 0) {\n res = u.iadd(this.m);\n }\n\n return res._forceRed(this);\n };\n\n Mont.prototype.invm = function invm (a) {\n // (AR)^-1 * R^2 = (A^-1 * R^-1) * R^2 = A^-1 * R\n var res = this.imod(a._invmp(this.m).mul(this.r2));\n return res._forceRed(this);\n };\n})(typeof module === 'undefined' || module, this);\n","'use strict';\n\nvar elliptic = exports;\n\nelliptic.version = require('../package.json').version;\nelliptic.utils = require('./elliptic/utils');\nelliptic.rand = require('brorand');\nelliptic.curve = require('./elliptic/curve');\nelliptic.curves = require('./elliptic/curves');\n\n// Protocols\nelliptic.ec = require('./elliptic/ec');\nelliptic.eddsa = require('./elliptic/eddsa');\n","'use strict';\n\nvar BN = require('bn.js');\nvar utils = require('../utils');\nvar getNAF = utils.getNAF;\nvar getJSF = utils.getJSF;\nvar assert = utils.assert;\n\nfunction BaseCurve(type, conf) {\n this.type = type;\n this.p = new BN(conf.p, 16);\n\n // Use Montgomery, when there is no fast reduction for the prime\n this.red = conf.prime ? BN.red(conf.prime) : BN.mont(this.p);\n\n // Useful for many curves\n this.zero = new BN(0).toRed(this.red);\n this.one = new BN(1).toRed(this.red);\n this.two = new BN(2).toRed(this.red);\n\n // Curve configuration, optional\n this.n = conf.n && new BN(conf.n, 16);\n this.g = conf.g && this.pointFromJSON(conf.g, conf.gRed);\n\n // Temporary arrays\n this._wnafT1 = new Array(4);\n this._wnafT2 = new Array(4);\n this._wnafT3 = new Array(4);\n this._wnafT4 = new Array(4);\n\n this._bitLength = this.n ? this.n.bitLength() : 0;\n\n // Generalized Greg Maxwell's trick\n var adjustCount = this.n && this.p.div(this.n);\n if (!adjustCount || adjustCount.cmpn(100) > 0) {\n this.redN = null;\n } else {\n this._maxwellTrick = true;\n this.redN = this.n.toRed(this.red);\n }\n}\nmodule.exports = BaseCurve;\n\nBaseCurve.prototype.point = function point() {\n throw new Error('Not implemented');\n};\n\nBaseCurve.prototype.validate = function validate() {\n throw new Error('Not implemented');\n};\n\nBaseCurve.prototype._fixedNafMul = function _fixedNafMul(p, k) {\n assert(p.precomputed);\n var doubles = p._getDoubles();\n\n var naf = getNAF(k, 1, this._bitLength);\n var I = (1 << (doubles.step + 1)) - (doubles.step % 2 === 0 ? 2 : 1);\n I /= 3;\n\n // Translate into more windowed form\n var repr = [];\n var j;\n var nafW;\n for (j = 0; j < naf.length; j += doubles.step) {\n nafW = 0;\n for (var l = j + doubles.step - 1; l >= j; l--)\n nafW = (nafW << 1) + naf[l];\n repr.push(nafW);\n }\n\n var a = this.jpoint(null, null, null);\n var b = this.jpoint(null, null, null);\n for (var i = I; i > 0; i--) {\n for (j = 0; j < repr.length; j++) {\n nafW = repr[j];\n if (nafW === i)\n b = b.mixedAdd(doubles.points[j]);\n else if (nafW === -i)\n b = b.mixedAdd(doubles.points[j].neg());\n }\n a = a.add(b);\n }\n return a.toP();\n};\n\nBaseCurve.prototype._wnafMul = function _wnafMul(p, k) {\n var w = 4;\n\n // Precompute window\n var nafPoints = p._getNAFPoints(w);\n w = nafPoints.wnd;\n var wnd = nafPoints.points;\n\n // Get NAF form\n var naf = getNAF(k, w, this._bitLength);\n\n // Add `this`*(N+1) for every w-NAF index\n var acc = this.jpoint(null, null, null);\n for (var i = naf.length - 1; i >= 0; i--) {\n // Count zeroes\n for (var l = 0; i >= 0 && naf[i] === 0; i--)\n l++;\n if (i >= 0)\n l++;\n acc = acc.dblp(l);\n\n if (i < 0)\n break;\n var z = naf[i];\n assert(z !== 0);\n if (p.type === 'affine') {\n // J +- P\n if (z > 0)\n acc = acc.mixedAdd(wnd[(z - 1) >> 1]);\n else\n acc = acc.mixedAdd(wnd[(-z - 1) >> 1].neg());\n } else {\n // J +- J\n if (z > 0)\n acc = acc.add(wnd[(z - 1) >> 1]);\n else\n acc = acc.add(wnd[(-z - 1) >> 1].neg());\n }\n }\n return p.type === 'affine' ? acc.toP() : acc;\n};\n\nBaseCurve.prototype._wnafMulAdd = function _wnafMulAdd(defW,\n points,\n coeffs,\n len,\n jacobianResult) {\n var wndWidth = this._wnafT1;\n var wnd = this._wnafT2;\n var naf = this._wnafT3;\n\n // Fill all arrays\n var max = 0;\n var i;\n var j;\n var p;\n for (i = 0; i < len; i++) {\n p = points[i];\n var nafPoints = p._getNAFPoints(defW);\n wndWidth[i] = nafPoints.wnd;\n wnd[i] = nafPoints.points;\n }\n\n // Comb small window NAFs\n for (i = len - 1; i >= 1; i -= 2) {\n var a = i - 1;\n var b = i;\n if (wndWidth[a] !== 1 || wndWidth[b] !== 1) {\n naf[a] = getNAF(coeffs[a], wndWidth[a], this._bitLength);\n naf[b] = getNAF(coeffs[b], wndWidth[b], this._bitLength);\n max = Math.max(naf[a].length, max);\n max = Math.max(naf[b].length, max);\n continue;\n }\n\n var comb = [\n points[a], /* 1 */\n null, /* 3 */\n null, /* 5 */\n points[b], /* 7 */\n ];\n\n // Try to avoid Projective points, if possible\n if (points[a].y.cmp(points[b].y) === 0) {\n comb[1] = points[a].add(points[b]);\n comb[2] = points[a].toJ().mixedAdd(points[b].neg());\n } else if (points[a].y.cmp(points[b].y.redNeg()) === 0) {\n comb[1] = points[a].toJ().mixedAdd(points[b]);\n comb[2] = points[a].add(points[b].neg());\n } else {\n comb[1] = points[a].toJ().mixedAdd(points[b]);\n comb[2] = points[a].toJ().mixedAdd(points[b].neg());\n }\n\n var index = [\n -3, /* -1 -1 */\n -1, /* -1 0 */\n -5, /* -1 1 */\n -7, /* 0 -1 */\n 0, /* 0 0 */\n 7, /* 0 1 */\n 5, /* 1 -1 */\n 1, /* 1 0 */\n 3, /* 1 1 */\n ];\n\n var jsf = getJSF(coeffs[a], coeffs[b]);\n max = Math.max(jsf[0].length, max);\n naf[a] = new Array(max);\n naf[b] = new Array(max);\n for (j = 0; j < max; j++) {\n var ja = jsf[0][j] | 0;\n var jb = jsf[1][j] | 0;\n\n naf[a][j] = index[(ja + 1) * 3 + (jb + 1)];\n naf[b][j] = 0;\n wnd[a] = comb;\n }\n }\n\n var acc = this.jpoint(null, null, null);\n var tmp = this._wnafT4;\n for (i = max; i >= 0; i--) {\n var k = 0;\n\n while (i >= 0) {\n var zero = true;\n for (j = 0; j < len; j++) {\n tmp[j] = naf[j][i] | 0;\n if (tmp[j] !== 0)\n zero = false;\n }\n if (!zero)\n break;\n k++;\n i--;\n }\n if (i >= 0)\n k++;\n acc = acc.dblp(k);\n if (i < 0)\n break;\n\n for (j = 0; j < len; j++) {\n var z = tmp[j];\n p;\n if (z === 0)\n continue;\n else if (z > 0)\n p = wnd[j][(z - 1) >> 1];\n else if (z < 0)\n p = wnd[j][(-z - 1) >> 1].neg();\n\n if (p.type === 'affine')\n acc = acc.mixedAdd(p);\n else\n acc = acc.add(p);\n }\n }\n // Zeroify references\n for (i = 0; i < len; i++)\n wnd[i] = null;\n\n if (jacobianResult)\n return acc;\n else\n return acc.toP();\n};\n\nfunction BasePoint(curve, type) {\n this.curve = curve;\n this.type = type;\n this.precomputed = null;\n}\nBaseCurve.BasePoint = BasePoint;\n\nBasePoint.prototype.eq = function eq(/*other*/) {\n throw new Error('Not implemented');\n};\n\nBasePoint.prototype.validate = function validate() {\n return this.curve.validate(this);\n};\n\nBaseCurve.prototype.decodePoint = function decodePoint(bytes, enc) {\n bytes = utils.toArray(bytes, enc);\n\n var len = this.p.byteLength();\n\n // uncompressed, hybrid-odd, hybrid-even\n if ((bytes[0] === 0x04 || bytes[0] === 0x06 || bytes[0] === 0x07) &&\n bytes.length - 1 === 2 * len) {\n if (bytes[0] === 0x06)\n assert(bytes[bytes.length - 1] % 2 === 0);\n else if (bytes[0] === 0x07)\n assert(bytes[bytes.length - 1] % 2 === 1);\n\n var res = this.point(bytes.slice(1, 1 + len),\n bytes.slice(1 + len, 1 + 2 * len));\n\n return res;\n } else if ((bytes[0] === 0x02 || bytes[0] === 0x03) &&\n bytes.length - 1 === len) {\n return this.pointFromX(bytes.slice(1, 1 + len), bytes[0] === 0x03);\n }\n throw new Error('Unknown point format');\n};\n\nBasePoint.prototype.encodeCompressed = function encodeCompressed(enc) {\n return this.encode(enc, true);\n};\n\nBasePoint.prototype._encode = function _encode(compact) {\n var len = this.curve.p.byteLength();\n var x = this.getX().toArray('be', len);\n\n if (compact)\n return [ this.getY().isEven() ? 0x02 : 0x03 ].concat(x);\n\n return [ 0x04 ].concat(x, this.getY().toArray('be', len));\n};\n\nBasePoint.prototype.encode = function encode(enc, compact) {\n return utils.encode(this._encode(compact), enc);\n};\n\nBasePoint.prototype.precompute = function precompute(power) {\n if (this.precomputed)\n return this;\n\n var precomputed = {\n doubles: null,\n naf: null,\n beta: null,\n };\n precomputed.naf = this._getNAFPoints(8);\n precomputed.doubles = this._getDoubles(4, power);\n precomputed.beta = this._getBeta();\n this.precomputed = precomputed;\n\n return this;\n};\n\nBasePoint.prototype._hasDoubles = function _hasDoubles(k) {\n if (!this.precomputed)\n return false;\n\n var doubles = this.precomputed.doubles;\n if (!doubles)\n return false;\n\n return doubles.points.length >= Math.ceil((k.bitLength() + 1) / doubles.step);\n};\n\nBasePoint.prototype._getDoubles = function _getDoubles(step, power) {\n if (this.precomputed && this.precomputed.doubles)\n return this.precomputed.doubles;\n\n var doubles = [ this ];\n var acc = this;\n for (var i = 0; i < power; i += step) {\n for (var j = 0; j < step; j++)\n acc = acc.dbl();\n doubles.push(acc);\n }\n return {\n step: step,\n points: doubles,\n };\n};\n\nBasePoint.prototype._getNAFPoints = function _getNAFPoints(wnd) {\n if (this.precomputed && this.precomputed.naf)\n return this.precomputed.naf;\n\n var res = [ this ];\n var max = (1 << wnd) - 1;\n var dbl = max === 1 ? null : this.dbl();\n for (var i = 1; i < max; i++)\n res[i] = res[i - 1].add(dbl);\n return {\n wnd: wnd,\n points: res,\n };\n};\n\nBasePoint.prototype._getBeta = function _getBeta() {\n return null;\n};\n\nBasePoint.prototype.dblp = function dblp(k) {\n var r = this;\n for (var i = 0; i < k; i++)\n r = r.dbl();\n return r;\n};\n","'use strict';\n\nvar utils = require('../utils');\nvar BN = require('bn.js');\nvar inherits = require('inherits');\nvar Base = require('./base');\n\nvar assert = utils.assert;\n\nfunction EdwardsCurve(conf) {\n // NOTE: Important as we are creating point in Base.call()\n this.twisted = (conf.a | 0) !== 1;\n this.mOneA = this.twisted && (conf.a | 0) === -1;\n this.extended = this.mOneA;\n\n Base.call(this, 'edwards', conf);\n\n this.a = new BN(conf.a, 16).umod(this.red.m);\n this.a = this.a.toRed(this.red);\n this.c = new BN(conf.c, 16).toRed(this.red);\n this.c2 = this.c.redSqr();\n this.d = new BN(conf.d, 16).toRed(this.red);\n this.dd = this.d.redAdd(this.d);\n\n assert(!this.twisted || this.c.fromRed().cmpn(1) === 0);\n this.oneC = (conf.c | 0) === 1;\n}\ninherits(EdwardsCurve, Base);\nmodule.exports = EdwardsCurve;\n\nEdwardsCurve.prototype._mulA = function _mulA(num) {\n if (this.mOneA)\n return num.redNeg();\n else\n return this.a.redMul(num);\n};\n\nEdwardsCurve.prototype._mulC = function _mulC(num) {\n if (this.oneC)\n return num;\n else\n return this.c.redMul(num);\n};\n\n// Just for compatibility with Short curve\nEdwardsCurve.prototype.jpoint = function jpoint(x, y, z, t) {\n return this.point(x, y, z, t);\n};\n\nEdwardsCurve.prototype.pointFromX = function pointFromX(x, odd) {\n x = new BN(x, 16);\n if (!x.red)\n x = x.toRed(this.red);\n\n var x2 = x.redSqr();\n var rhs = this.c2.redSub(this.a.redMul(x2));\n var lhs = this.one.redSub(this.c2.redMul(this.d).redMul(x2));\n\n var y2 = rhs.redMul(lhs.redInvm());\n var y = y2.redSqrt();\n if (y.redSqr().redSub(y2).cmp(this.zero) !== 0)\n throw new Error('invalid point');\n\n var isOdd = y.fromRed().isOdd();\n if (odd && !isOdd || !odd && isOdd)\n y = y.redNeg();\n\n return this.point(x, y);\n};\n\nEdwardsCurve.prototype.pointFromY = function pointFromY(y, odd) {\n y = new BN(y, 16);\n if (!y.red)\n y = y.toRed(this.red);\n\n // x^2 = (y^2 - c^2) / (c^2 d y^2 - a)\n var y2 = y.redSqr();\n var lhs = y2.redSub(this.c2);\n var rhs = y2.redMul(this.d).redMul(this.c2).redSub(this.a);\n var x2 = lhs.redMul(rhs.redInvm());\n\n if (x2.cmp(this.zero) === 0) {\n if (odd)\n throw new Error('invalid point');\n else\n return this.point(this.zero, y);\n }\n\n var x = x2.redSqrt();\n if (x.redSqr().redSub(x2).cmp(this.zero) !== 0)\n throw new Error('invalid point');\n\n if (x.fromRed().isOdd() !== odd)\n x = x.redNeg();\n\n return this.point(x, y);\n};\n\nEdwardsCurve.prototype.validate = function validate(point) {\n if (point.isInfinity())\n return true;\n\n // Curve: A * X^2 + Y^2 = C^2 * (1 + D * X^2 * Y^2)\n point.normalize();\n\n var x2 = point.x.redSqr();\n var y2 = point.y.redSqr();\n var lhs = x2.redMul(this.a).redAdd(y2);\n var rhs = this.c2.redMul(this.one.redAdd(this.d.redMul(x2).redMul(y2)));\n\n return lhs.cmp(rhs) === 0;\n};\n\nfunction Point(curve, x, y, z, t) {\n Base.BasePoint.call(this, curve, 'projective');\n if (x === null && y === null && z === null) {\n this.x = this.curve.zero;\n this.y = this.curve.one;\n this.z = this.curve.one;\n this.t = this.curve.zero;\n this.zOne = true;\n } else {\n this.x = new BN(x, 16);\n this.y = new BN(y, 16);\n this.z = z ? new BN(z, 16) : this.curve.one;\n this.t = t && new BN(t, 16);\n if (!this.x.red)\n this.x = this.x.toRed(this.curve.red);\n if (!this.y.red)\n this.y = this.y.toRed(this.curve.red);\n if (!this.z.red)\n this.z = this.z.toRed(this.curve.red);\n if (this.t && !this.t.red)\n this.t = this.t.toRed(this.curve.red);\n this.zOne = this.z === this.curve.one;\n\n // Use extended coordinates\n if (this.curve.extended && !this.t) {\n this.t = this.x.redMul(this.y);\n if (!this.zOne)\n this.t = this.t.redMul(this.z.redInvm());\n }\n }\n}\ninherits(Point, Base.BasePoint);\n\nEdwardsCurve.prototype.pointFromJSON = function pointFromJSON(obj) {\n return Point.fromJSON(this, obj);\n};\n\nEdwardsCurve.prototype.point = function point(x, y, z, t) {\n return new Point(this, x, y, z, t);\n};\n\nPoint.fromJSON = function fromJSON(curve, obj) {\n return new Point(curve, obj[0], obj[1], obj[2]);\n};\n\nPoint.prototype.inspect = function inspect() {\n if (this.isInfinity())\n return '';\n return '';\n};\n\nPoint.prototype.isInfinity = function isInfinity() {\n // XXX This code assumes that zero is always zero in red\n return this.x.cmpn(0) === 0 &&\n (this.y.cmp(this.z) === 0 ||\n (this.zOne && this.y.cmp(this.curve.c) === 0));\n};\n\nPoint.prototype._extDbl = function _extDbl() {\n // hyperelliptic.org/EFD/g1p/auto-twisted-extended-1.html\n // #doubling-dbl-2008-hwcd\n // 4M + 4S\n\n // A = X1^2\n var a = this.x.redSqr();\n // B = Y1^2\n var b = this.y.redSqr();\n // C = 2 * Z1^2\n var c = this.z.redSqr();\n c = c.redIAdd(c);\n // D = a * A\n var d = this.curve._mulA(a);\n // E = (X1 + Y1)^2 - A - B\n var e = this.x.redAdd(this.y).redSqr().redISub(a).redISub(b);\n // G = D + B\n var g = d.redAdd(b);\n // F = G - C\n var f = g.redSub(c);\n // H = D - B\n var h = d.redSub(b);\n // X3 = E * F\n var nx = e.redMul(f);\n // Y3 = G * H\n var ny = g.redMul(h);\n // T3 = E * H\n var nt = e.redMul(h);\n // Z3 = F * G\n var nz = f.redMul(g);\n return this.curve.point(nx, ny, nz, nt);\n};\n\nPoint.prototype._projDbl = function _projDbl() {\n // hyperelliptic.org/EFD/g1p/auto-twisted-projective.html\n // #doubling-dbl-2008-bbjlp\n // #doubling-dbl-2007-bl\n // and others\n // Generally 3M + 4S or 2M + 4S\n\n // B = (X1 + Y1)^2\n var b = this.x.redAdd(this.y).redSqr();\n // C = X1^2\n var c = this.x.redSqr();\n // D = Y1^2\n var d = this.y.redSqr();\n\n var nx;\n var ny;\n var nz;\n var e;\n var h;\n var j;\n if (this.curve.twisted) {\n // E = a * C\n e = this.curve._mulA(c);\n // F = E + D\n var f = e.redAdd(d);\n if (this.zOne) {\n // X3 = (B - C - D) * (F - 2)\n nx = b.redSub(c).redSub(d).redMul(f.redSub(this.curve.two));\n // Y3 = F * (E - D)\n ny = f.redMul(e.redSub(d));\n // Z3 = F^2 - 2 * F\n nz = f.redSqr().redSub(f).redSub(f);\n } else {\n // H = Z1^2\n h = this.z.redSqr();\n // J = F - 2 * H\n j = f.redSub(h).redISub(h);\n // X3 = (B-C-D)*J\n nx = b.redSub(c).redISub(d).redMul(j);\n // Y3 = F * (E - D)\n ny = f.redMul(e.redSub(d));\n // Z3 = F * J\n nz = f.redMul(j);\n }\n } else {\n // E = C + D\n e = c.redAdd(d);\n // H = (c * Z1)^2\n h = this.curve._mulC(this.z).redSqr();\n // J = E - 2 * H\n j = e.redSub(h).redSub(h);\n // X3 = c * (B - E) * J\n nx = this.curve._mulC(b.redISub(e)).redMul(j);\n // Y3 = c * E * (C - D)\n ny = this.curve._mulC(e).redMul(c.redISub(d));\n // Z3 = E * J\n nz = e.redMul(j);\n }\n return this.curve.point(nx, ny, nz);\n};\n\nPoint.prototype.dbl = function dbl() {\n if (this.isInfinity())\n return this;\n\n // Double in extended coordinates\n if (this.curve.extended)\n return this._extDbl();\n else\n return this._projDbl();\n};\n\nPoint.prototype._extAdd = function _extAdd(p) {\n // hyperelliptic.org/EFD/g1p/auto-twisted-extended-1.html\n // #addition-add-2008-hwcd-3\n // 8M\n\n // A = (Y1 - X1) * (Y2 - X2)\n var a = this.y.redSub(this.x).redMul(p.y.redSub(p.x));\n // B = (Y1 + X1) * (Y2 + X2)\n var b = this.y.redAdd(this.x).redMul(p.y.redAdd(p.x));\n // C = T1 * k * T2\n var c = this.t.redMul(this.curve.dd).redMul(p.t);\n // D = Z1 * 2 * Z2\n var d = this.z.redMul(p.z.redAdd(p.z));\n // E = B - A\n var e = b.redSub(a);\n // F = D - C\n var f = d.redSub(c);\n // G = D + C\n var g = d.redAdd(c);\n // H = B + A\n var h = b.redAdd(a);\n // X3 = E * F\n var nx = e.redMul(f);\n // Y3 = G * H\n var ny = g.redMul(h);\n // T3 = E * H\n var nt = e.redMul(h);\n // Z3 = F * G\n var nz = f.redMul(g);\n return this.curve.point(nx, ny, nz, nt);\n};\n\nPoint.prototype._projAdd = function _projAdd(p) {\n // hyperelliptic.org/EFD/g1p/auto-twisted-projective.html\n // #addition-add-2008-bbjlp\n // #addition-add-2007-bl\n // 10M + 1S\n\n // A = Z1 * Z2\n var a = this.z.redMul(p.z);\n // B = A^2\n var b = a.redSqr();\n // C = X1 * X2\n var c = this.x.redMul(p.x);\n // D = Y1 * Y2\n var d = this.y.redMul(p.y);\n // E = d * C * D\n var e = this.curve.d.redMul(c).redMul(d);\n // F = B - E\n var f = b.redSub(e);\n // G = B + E\n var g = b.redAdd(e);\n // X3 = A * F * ((X1 + Y1) * (X2 + Y2) - C - D)\n var tmp = this.x.redAdd(this.y).redMul(p.x.redAdd(p.y)).redISub(c).redISub(d);\n var nx = a.redMul(f).redMul(tmp);\n var ny;\n var nz;\n if (this.curve.twisted) {\n // Y3 = A * G * (D - a * C)\n ny = a.redMul(g).redMul(d.redSub(this.curve._mulA(c)));\n // Z3 = F * G\n nz = f.redMul(g);\n } else {\n // Y3 = A * G * (D - C)\n ny = a.redMul(g).redMul(d.redSub(c));\n // Z3 = c * F * G\n nz = this.curve._mulC(f).redMul(g);\n }\n return this.curve.point(nx, ny, nz);\n};\n\nPoint.prototype.add = function add(p) {\n if (this.isInfinity())\n return p;\n if (p.isInfinity())\n return this;\n\n if (this.curve.extended)\n return this._extAdd(p);\n else\n return this._projAdd(p);\n};\n\nPoint.prototype.mul = function mul(k) {\n if (this._hasDoubles(k))\n return this.curve._fixedNafMul(this, k);\n else\n return this.curve._wnafMul(this, k);\n};\n\nPoint.prototype.mulAdd = function mulAdd(k1, p, k2) {\n return this.curve._wnafMulAdd(1, [ this, p ], [ k1, k2 ], 2, false);\n};\n\nPoint.prototype.jmulAdd = function jmulAdd(k1, p, k2) {\n return this.curve._wnafMulAdd(1, [ this, p ], [ k1, k2 ], 2, true);\n};\n\nPoint.prototype.normalize = function normalize() {\n if (this.zOne)\n return this;\n\n // Normalize coordinates\n var zi = this.z.redInvm();\n this.x = this.x.redMul(zi);\n this.y = this.y.redMul(zi);\n if (this.t)\n this.t = this.t.redMul(zi);\n this.z = this.curve.one;\n this.zOne = true;\n return this;\n};\n\nPoint.prototype.neg = function neg() {\n return this.curve.point(this.x.redNeg(),\n this.y,\n this.z,\n this.t && this.t.redNeg());\n};\n\nPoint.prototype.getX = function getX() {\n this.normalize();\n return this.x.fromRed();\n};\n\nPoint.prototype.getY = function getY() {\n this.normalize();\n return this.y.fromRed();\n};\n\nPoint.prototype.eq = function eq(other) {\n return this === other ||\n this.getX().cmp(other.getX()) === 0 &&\n this.getY().cmp(other.getY()) === 0;\n};\n\nPoint.prototype.eqXToP = function eqXToP(x) {\n var rx = x.toRed(this.curve.red).redMul(this.z);\n if (this.x.cmp(rx) === 0)\n return true;\n\n var xc = x.clone();\n var t = this.curve.redN.redMul(this.z);\n for (;;) {\n xc.iadd(this.curve.n);\n if (xc.cmp(this.curve.p) >= 0)\n return false;\n\n rx.redIAdd(t);\n if (this.x.cmp(rx) === 0)\n return true;\n }\n};\n\n// Compatibility with BaseCurve\nPoint.prototype.toP = Point.prototype.normalize;\nPoint.prototype.mixedAdd = Point.prototype.add;\n","'use strict';\n\nvar curve = exports;\n\ncurve.base = require('./base');\ncurve.short = require('./short');\ncurve.mont = require('./mont');\ncurve.edwards = require('./edwards');\n","'use strict';\n\nvar BN = require('bn.js');\nvar inherits = require('inherits');\nvar Base = require('./base');\n\nvar utils = require('../utils');\n\nfunction MontCurve(conf) {\n Base.call(this, 'mont', conf);\n\n this.a = new BN(conf.a, 16).toRed(this.red);\n this.b = new BN(conf.b, 16).toRed(this.red);\n this.i4 = new BN(4).toRed(this.red).redInvm();\n this.two = new BN(2).toRed(this.red);\n this.a24 = this.i4.redMul(this.a.redAdd(this.two));\n}\ninherits(MontCurve, Base);\nmodule.exports = MontCurve;\n\nMontCurve.prototype.validate = function validate(point) {\n var x = point.normalize().x;\n var x2 = x.redSqr();\n var rhs = x2.redMul(x).redAdd(x2.redMul(this.a)).redAdd(x);\n var y = rhs.redSqrt();\n\n return y.redSqr().cmp(rhs) === 0;\n};\n\nfunction Point(curve, x, z) {\n Base.BasePoint.call(this, curve, 'projective');\n if (x === null && z === null) {\n this.x = this.curve.one;\n this.z = this.curve.zero;\n } else {\n this.x = new BN(x, 16);\n this.z = new BN(z, 16);\n if (!this.x.red)\n this.x = this.x.toRed(this.curve.red);\n if (!this.z.red)\n this.z = this.z.toRed(this.curve.red);\n }\n}\ninherits(Point, Base.BasePoint);\n\nMontCurve.prototype.decodePoint = function decodePoint(bytes, enc) {\n return this.point(utils.toArray(bytes, enc), 1);\n};\n\nMontCurve.prototype.point = function point(x, z) {\n return new Point(this, x, z);\n};\n\nMontCurve.prototype.pointFromJSON = function pointFromJSON(obj) {\n return Point.fromJSON(this, obj);\n};\n\nPoint.prototype.precompute = function precompute() {\n // No-op\n};\n\nPoint.prototype._encode = function _encode() {\n return this.getX().toArray('be', this.curve.p.byteLength());\n};\n\nPoint.fromJSON = function fromJSON(curve, obj) {\n return new Point(curve, obj[0], obj[1] || curve.one);\n};\n\nPoint.prototype.inspect = function inspect() {\n if (this.isInfinity())\n return '';\n return '';\n};\n\nPoint.prototype.isInfinity = function isInfinity() {\n // XXX This code assumes that zero is always zero in red\n return this.z.cmpn(0) === 0;\n};\n\nPoint.prototype.dbl = function dbl() {\n // http://hyperelliptic.org/EFD/g1p/auto-montgom-xz.html#doubling-dbl-1987-m-3\n // 2M + 2S + 4A\n\n // A = X1 + Z1\n var a = this.x.redAdd(this.z);\n // AA = A^2\n var aa = a.redSqr();\n // B = X1 - Z1\n var b = this.x.redSub(this.z);\n // BB = B^2\n var bb = b.redSqr();\n // C = AA - BB\n var c = aa.redSub(bb);\n // X3 = AA * BB\n var nx = aa.redMul(bb);\n // Z3 = C * (BB + A24 * C)\n var nz = c.redMul(bb.redAdd(this.curve.a24.redMul(c)));\n return this.curve.point(nx, nz);\n};\n\nPoint.prototype.add = function add() {\n throw new Error('Not supported on Montgomery curve');\n};\n\nPoint.prototype.diffAdd = function diffAdd(p, diff) {\n // http://hyperelliptic.org/EFD/g1p/auto-montgom-xz.html#diffadd-dadd-1987-m-3\n // 4M + 2S + 6A\n\n // A = X2 + Z2\n var a = this.x.redAdd(this.z);\n // B = X2 - Z2\n var b = this.x.redSub(this.z);\n // C = X3 + Z3\n var c = p.x.redAdd(p.z);\n // D = X3 - Z3\n var d = p.x.redSub(p.z);\n // DA = D * A\n var da = d.redMul(a);\n // CB = C * B\n var cb = c.redMul(b);\n // X5 = Z1 * (DA + CB)^2\n var nx = diff.z.redMul(da.redAdd(cb).redSqr());\n // Z5 = X1 * (DA - CB)^2\n var nz = diff.x.redMul(da.redISub(cb).redSqr());\n return this.curve.point(nx, nz);\n};\n\nPoint.prototype.mul = function mul(k) {\n var t = k.clone();\n var a = this; // (N / 2) * Q + Q\n var b = this.curve.point(null, null); // (N / 2) * Q\n var c = this; // Q\n\n for (var bits = []; t.cmpn(0) !== 0; t.iushrn(1))\n bits.push(t.andln(1));\n\n for (var i = bits.length - 1; i >= 0; i--) {\n if (bits[i] === 0) {\n // N * Q + Q = ((N / 2) * Q + Q)) + (N / 2) * Q\n a = a.diffAdd(b, c);\n // N * Q = 2 * ((N / 2) * Q + Q))\n b = b.dbl();\n } else {\n // N * Q = ((N / 2) * Q + Q) + ((N / 2) * Q)\n b = a.diffAdd(b, c);\n // N * Q + Q = 2 * ((N / 2) * Q + Q)\n a = a.dbl();\n }\n }\n return b;\n};\n\nPoint.prototype.mulAdd = function mulAdd() {\n throw new Error('Not supported on Montgomery curve');\n};\n\nPoint.prototype.jumlAdd = function jumlAdd() {\n throw new Error('Not supported on Montgomery curve');\n};\n\nPoint.prototype.eq = function eq(other) {\n return this.getX().cmp(other.getX()) === 0;\n};\n\nPoint.prototype.normalize = function normalize() {\n this.x = this.x.redMul(this.z.redInvm());\n this.z = this.curve.one;\n return this;\n};\n\nPoint.prototype.getX = function getX() {\n // Normalize coordinates\n this.normalize();\n\n return this.x.fromRed();\n};\n","'use strict';\n\nvar utils = require('../utils');\nvar BN = require('bn.js');\nvar inherits = require('inherits');\nvar Base = require('./base');\n\nvar assert = utils.assert;\n\nfunction ShortCurve(conf) {\n Base.call(this, 'short', conf);\n\n this.a = new BN(conf.a, 16).toRed(this.red);\n this.b = new BN(conf.b, 16).toRed(this.red);\n this.tinv = this.two.redInvm();\n\n this.zeroA = this.a.fromRed().cmpn(0) === 0;\n this.threeA = this.a.fromRed().sub(this.p).cmpn(-3) === 0;\n\n // If the curve is endomorphic, precalculate beta and lambda\n this.endo = this._getEndomorphism(conf);\n this._endoWnafT1 = new Array(4);\n this._endoWnafT2 = new Array(4);\n}\ninherits(ShortCurve, Base);\nmodule.exports = ShortCurve;\n\nShortCurve.prototype._getEndomorphism = function _getEndomorphism(conf) {\n // No efficient endomorphism\n if (!this.zeroA || !this.g || !this.n || this.p.modn(3) !== 1)\n return;\n\n // Compute beta and lambda, that lambda * P = (beta * Px; Py)\n var beta;\n var lambda;\n if (conf.beta) {\n beta = new BN(conf.beta, 16).toRed(this.red);\n } else {\n var betas = this._getEndoRoots(this.p);\n // Choose the smallest beta\n beta = betas[0].cmp(betas[1]) < 0 ? betas[0] : betas[1];\n beta = beta.toRed(this.red);\n }\n if (conf.lambda) {\n lambda = new BN(conf.lambda, 16);\n } else {\n // Choose the lambda that is matching selected beta\n var lambdas = this._getEndoRoots(this.n);\n if (this.g.mul(lambdas[0]).x.cmp(this.g.x.redMul(beta)) === 0) {\n lambda = lambdas[0];\n } else {\n lambda = lambdas[1];\n assert(this.g.mul(lambda).x.cmp(this.g.x.redMul(beta)) === 0);\n }\n }\n\n // Get basis vectors, used for balanced length-two representation\n var basis;\n if (conf.basis) {\n basis = conf.basis.map(function(vec) {\n return {\n a: new BN(vec.a, 16),\n b: new BN(vec.b, 16),\n };\n });\n } else {\n basis = this._getEndoBasis(lambda);\n }\n\n return {\n beta: beta,\n lambda: lambda,\n basis: basis,\n };\n};\n\nShortCurve.prototype._getEndoRoots = function _getEndoRoots(num) {\n // Find roots of for x^2 + x + 1 in F\n // Root = (-1 +- Sqrt(-3)) / 2\n //\n var red = num === this.p ? this.red : BN.mont(num);\n var tinv = new BN(2).toRed(red).redInvm();\n var ntinv = tinv.redNeg();\n\n var s = new BN(3).toRed(red).redNeg().redSqrt().redMul(tinv);\n\n var l1 = ntinv.redAdd(s).fromRed();\n var l2 = ntinv.redSub(s).fromRed();\n return [ l1, l2 ];\n};\n\nShortCurve.prototype._getEndoBasis = function _getEndoBasis(lambda) {\n // aprxSqrt >= sqrt(this.n)\n var aprxSqrt = this.n.ushrn(Math.floor(this.n.bitLength() / 2));\n\n // 3.74\n // Run EGCD, until r(L + 1) < aprxSqrt\n var u = lambda;\n var v = this.n.clone();\n var x1 = new BN(1);\n var y1 = new BN(0);\n var x2 = new BN(0);\n var y2 = new BN(1);\n\n // NOTE: all vectors are roots of: a + b * lambda = 0 (mod n)\n var a0;\n var b0;\n // First vector\n var a1;\n var b1;\n // Second vector\n var a2;\n var b2;\n\n var prevR;\n var i = 0;\n var r;\n var x;\n while (u.cmpn(0) !== 0) {\n var q = v.div(u);\n r = v.sub(q.mul(u));\n x = x2.sub(q.mul(x1));\n var y = y2.sub(q.mul(y1));\n\n if (!a1 && r.cmp(aprxSqrt) < 0) {\n a0 = prevR.neg();\n b0 = x1;\n a1 = r.neg();\n b1 = x;\n } else if (a1 && ++i === 2) {\n break;\n }\n prevR = r;\n\n v = u;\n u = r;\n x2 = x1;\n x1 = x;\n y2 = y1;\n y1 = y;\n }\n a2 = r.neg();\n b2 = x;\n\n var len1 = a1.sqr().add(b1.sqr());\n var len2 = a2.sqr().add(b2.sqr());\n if (len2.cmp(len1) >= 0) {\n a2 = a0;\n b2 = b0;\n }\n\n // Normalize signs\n if (a1.negative) {\n a1 = a1.neg();\n b1 = b1.neg();\n }\n if (a2.negative) {\n a2 = a2.neg();\n b2 = b2.neg();\n }\n\n return [\n { a: a1, b: b1 },\n { a: a2, b: b2 },\n ];\n};\n\nShortCurve.prototype._endoSplit = function _endoSplit(k) {\n var basis = this.endo.basis;\n var v1 = basis[0];\n var v2 = basis[1];\n\n var c1 = v2.b.mul(k).divRound(this.n);\n var c2 = v1.b.neg().mul(k).divRound(this.n);\n\n var p1 = c1.mul(v1.a);\n var p2 = c2.mul(v2.a);\n var q1 = c1.mul(v1.b);\n var q2 = c2.mul(v2.b);\n\n // Calculate answer\n var k1 = k.sub(p1).sub(p2);\n var k2 = q1.add(q2).neg();\n return { k1: k1, k2: k2 };\n};\n\nShortCurve.prototype.pointFromX = function pointFromX(x, odd) {\n x = new BN(x, 16);\n if (!x.red)\n x = x.toRed(this.red);\n\n var y2 = x.redSqr().redMul(x).redIAdd(x.redMul(this.a)).redIAdd(this.b);\n var y = y2.redSqrt();\n if (y.redSqr().redSub(y2).cmp(this.zero) !== 0)\n throw new Error('invalid point');\n\n // XXX Is there any way to tell if the number is odd without converting it\n // to non-red form?\n var isOdd = y.fromRed().isOdd();\n if (odd && !isOdd || !odd && isOdd)\n y = y.redNeg();\n\n return this.point(x, y);\n};\n\nShortCurve.prototype.validate = function validate(point) {\n if (point.inf)\n return true;\n\n var x = point.x;\n var y = point.y;\n\n var ax = this.a.redMul(x);\n var rhs = x.redSqr().redMul(x).redIAdd(ax).redIAdd(this.b);\n return y.redSqr().redISub(rhs).cmpn(0) === 0;\n};\n\nShortCurve.prototype._endoWnafMulAdd =\n function _endoWnafMulAdd(points, coeffs, jacobianResult) {\n var npoints = this._endoWnafT1;\n var ncoeffs = this._endoWnafT2;\n for (var i = 0; i < points.length; i++) {\n var split = this._endoSplit(coeffs[i]);\n var p = points[i];\n var beta = p._getBeta();\n\n if (split.k1.negative) {\n split.k1.ineg();\n p = p.neg(true);\n }\n if (split.k2.negative) {\n split.k2.ineg();\n beta = beta.neg(true);\n }\n\n npoints[i * 2] = p;\n npoints[i * 2 + 1] = beta;\n ncoeffs[i * 2] = split.k1;\n ncoeffs[i * 2 + 1] = split.k2;\n }\n var res = this._wnafMulAdd(1, npoints, ncoeffs, i * 2, jacobianResult);\n\n // Clean-up references to points and coefficients\n for (var j = 0; j < i * 2; j++) {\n npoints[j] = null;\n ncoeffs[j] = null;\n }\n return res;\n };\n\nfunction Point(curve, x, y, isRed) {\n Base.BasePoint.call(this, curve, 'affine');\n if (x === null && y === null) {\n this.x = null;\n this.y = null;\n this.inf = true;\n } else {\n this.x = new BN(x, 16);\n this.y = new BN(y, 16);\n // Force redgomery representation when loading from JSON\n if (isRed) {\n this.x.forceRed(this.curve.red);\n this.y.forceRed(this.curve.red);\n }\n if (!this.x.red)\n this.x = this.x.toRed(this.curve.red);\n if (!this.y.red)\n this.y = this.y.toRed(this.curve.red);\n this.inf = false;\n }\n}\ninherits(Point, Base.BasePoint);\n\nShortCurve.prototype.point = function point(x, y, isRed) {\n return new Point(this, x, y, isRed);\n};\n\nShortCurve.prototype.pointFromJSON = function pointFromJSON(obj, red) {\n return Point.fromJSON(this, obj, red);\n};\n\nPoint.prototype._getBeta = function _getBeta() {\n if (!this.curve.endo)\n return;\n\n var pre = this.precomputed;\n if (pre && pre.beta)\n return pre.beta;\n\n var beta = this.curve.point(this.x.redMul(this.curve.endo.beta), this.y);\n if (pre) {\n var curve = this.curve;\n var endoMul = function(p) {\n return curve.point(p.x.redMul(curve.endo.beta), p.y);\n };\n pre.beta = beta;\n beta.precomputed = {\n beta: null,\n naf: pre.naf && {\n wnd: pre.naf.wnd,\n points: pre.naf.points.map(endoMul),\n },\n doubles: pre.doubles && {\n step: pre.doubles.step,\n points: pre.doubles.points.map(endoMul),\n },\n };\n }\n return beta;\n};\n\nPoint.prototype.toJSON = function toJSON() {\n if (!this.precomputed)\n return [ this.x, this.y ];\n\n return [ this.x, this.y, this.precomputed && {\n doubles: this.precomputed.doubles && {\n step: this.precomputed.doubles.step,\n points: this.precomputed.doubles.points.slice(1),\n },\n naf: this.precomputed.naf && {\n wnd: this.precomputed.naf.wnd,\n points: this.precomputed.naf.points.slice(1),\n },\n } ];\n};\n\nPoint.fromJSON = function fromJSON(curve, obj, red) {\n if (typeof obj === 'string')\n obj = JSON.parse(obj);\n var res = curve.point(obj[0], obj[1], red);\n if (!obj[2])\n return res;\n\n function obj2point(obj) {\n return curve.point(obj[0], obj[1], red);\n }\n\n var pre = obj[2];\n res.precomputed = {\n beta: null,\n doubles: pre.doubles && {\n step: pre.doubles.step,\n points: [ res ].concat(pre.doubles.points.map(obj2point)),\n },\n naf: pre.naf && {\n wnd: pre.naf.wnd,\n points: [ res ].concat(pre.naf.points.map(obj2point)),\n },\n };\n return res;\n};\n\nPoint.prototype.inspect = function inspect() {\n if (this.isInfinity())\n return '';\n return '';\n};\n\nPoint.prototype.isInfinity = function isInfinity() {\n return this.inf;\n};\n\nPoint.prototype.add = function add(p) {\n // O + P = P\n if (this.inf)\n return p;\n\n // P + O = P\n if (p.inf)\n return this;\n\n // P + P = 2P\n if (this.eq(p))\n return this.dbl();\n\n // P + (-P) = O\n if (this.neg().eq(p))\n return this.curve.point(null, null);\n\n // P + Q = O\n if (this.x.cmp(p.x) === 0)\n return this.curve.point(null, null);\n\n var c = this.y.redSub(p.y);\n if (c.cmpn(0) !== 0)\n c = c.redMul(this.x.redSub(p.x).redInvm());\n var nx = c.redSqr().redISub(this.x).redISub(p.x);\n var ny = c.redMul(this.x.redSub(nx)).redISub(this.y);\n return this.curve.point(nx, ny);\n};\n\nPoint.prototype.dbl = function dbl() {\n if (this.inf)\n return this;\n\n // 2P = O\n var ys1 = this.y.redAdd(this.y);\n if (ys1.cmpn(0) === 0)\n return this.curve.point(null, null);\n\n var a = this.curve.a;\n\n var x2 = this.x.redSqr();\n var dyinv = ys1.redInvm();\n var c = x2.redAdd(x2).redIAdd(x2).redIAdd(a).redMul(dyinv);\n\n var nx = c.redSqr().redISub(this.x.redAdd(this.x));\n var ny = c.redMul(this.x.redSub(nx)).redISub(this.y);\n return this.curve.point(nx, ny);\n};\n\nPoint.prototype.getX = function getX() {\n return this.x.fromRed();\n};\n\nPoint.prototype.getY = function getY() {\n return this.y.fromRed();\n};\n\nPoint.prototype.mul = function mul(k) {\n k = new BN(k, 16);\n if (this.isInfinity())\n return this;\n else if (this._hasDoubles(k))\n return this.curve._fixedNafMul(this, k);\n else if (this.curve.endo)\n return this.curve._endoWnafMulAdd([ this ], [ k ]);\n else\n return this.curve._wnafMul(this, k);\n};\n\nPoint.prototype.mulAdd = function mulAdd(k1, p2, k2) {\n var points = [ this, p2 ];\n var coeffs = [ k1, k2 ];\n if (this.curve.endo)\n return this.curve._endoWnafMulAdd(points, coeffs);\n else\n return this.curve._wnafMulAdd(1, points, coeffs, 2);\n};\n\nPoint.prototype.jmulAdd = function jmulAdd(k1, p2, k2) {\n var points = [ this, p2 ];\n var coeffs = [ k1, k2 ];\n if (this.curve.endo)\n return this.curve._endoWnafMulAdd(points, coeffs, true);\n else\n return this.curve._wnafMulAdd(1, points, coeffs, 2, true);\n};\n\nPoint.prototype.eq = function eq(p) {\n return this === p ||\n this.inf === p.inf &&\n (this.inf || this.x.cmp(p.x) === 0 && this.y.cmp(p.y) === 0);\n};\n\nPoint.prototype.neg = function neg(_precompute) {\n if (this.inf)\n return this;\n\n var res = this.curve.point(this.x, this.y.redNeg());\n if (_precompute && this.precomputed) {\n var pre = this.precomputed;\n var negate = function(p) {\n return p.neg();\n };\n res.precomputed = {\n naf: pre.naf && {\n wnd: pre.naf.wnd,\n points: pre.naf.points.map(negate),\n },\n doubles: pre.doubles && {\n step: pre.doubles.step,\n points: pre.doubles.points.map(negate),\n },\n };\n }\n return res;\n};\n\nPoint.prototype.toJ = function toJ() {\n if (this.inf)\n return this.curve.jpoint(null, null, null);\n\n var res = this.curve.jpoint(this.x, this.y, this.curve.one);\n return res;\n};\n\nfunction JPoint(curve, x, y, z) {\n Base.BasePoint.call(this, curve, 'jacobian');\n if (x === null && y === null && z === null) {\n this.x = this.curve.one;\n this.y = this.curve.one;\n this.z = new BN(0);\n } else {\n this.x = new BN(x, 16);\n this.y = new BN(y, 16);\n this.z = new BN(z, 16);\n }\n if (!this.x.red)\n this.x = this.x.toRed(this.curve.red);\n if (!this.y.red)\n this.y = this.y.toRed(this.curve.red);\n if (!this.z.red)\n this.z = this.z.toRed(this.curve.red);\n\n this.zOne = this.z === this.curve.one;\n}\ninherits(JPoint, Base.BasePoint);\n\nShortCurve.prototype.jpoint = function jpoint(x, y, z) {\n return new JPoint(this, x, y, z);\n};\n\nJPoint.prototype.toP = function toP() {\n if (this.isInfinity())\n return this.curve.point(null, null);\n\n var zinv = this.z.redInvm();\n var zinv2 = zinv.redSqr();\n var ax = this.x.redMul(zinv2);\n var ay = this.y.redMul(zinv2).redMul(zinv);\n\n return this.curve.point(ax, ay);\n};\n\nJPoint.prototype.neg = function neg() {\n return this.curve.jpoint(this.x, this.y.redNeg(), this.z);\n};\n\nJPoint.prototype.add = function add(p) {\n // O + P = P\n if (this.isInfinity())\n return p;\n\n // P + O = P\n if (p.isInfinity())\n return this;\n\n // 12M + 4S + 7A\n var pz2 = p.z.redSqr();\n var z2 = this.z.redSqr();\n var u1 = this.x.redMul(pz2);\n var u2 = p.x.redMul(z2);\n var s1 = this.y.redMul(pz2.redMul(p.z));\n var s2 = p.y.redMul(z2.redMul(this.z));\n\n var h = u1.redSub(u2);\n var r = s1.redSub(s2);\n if (h.cmpn(0) === 0) {\n if (r.cmpn(0) !== 0)\n return this.curve.jpoint(null, null, null);\n else\n return this.dbl();\n }\n\n var h2 = h.redSqr();\n var h3 = h2.redMul(h);\n var v = u1.redMul(h2);\n\n var nx = r.redSqr().redIAdd(h3).redISub(v).redISub(v);\n var ny = r.redMul(v.redISub(nx)).redISub(s1.redMul(h3));\n var nz = this.z.redMul(p.z).redMul(h);\n\n return this.curve.jpoint(nx, ny, nz);\n};\n\nJPoint.prototype.mixedAdd = function mixedAdd(p) {\n // O + P = P\n if (this.isInfinity())\n return p.toJ();\n\n // P + O = P\n if (p.isInfinity())\n return this;\n\n // 8M + 3S + 7A\n var z2 = this.z.redSqr();\n var u1 = this.x;\n var u2 = p.x.redMul(z2);\n var s1 = this.y;\n var s2 = p.y.redMul(z2).redMul(this.z);\n\n var h = u1.redSub(u2);\n var r = s1.redSub(s2);\n if (h.cmpn(0) === 0) {\n if (r.cmpn(0) !== 0)\n return this.curve.jpoint(null, null, null);\n else\n return this.dbl();\n }\n\n var h2 = h.redSqr();\n var h3 = h2.redMul(h);\n var v = u1.redMul(h2);\n\n var nx = r.redSqr().redIAdd(h3).redISub(v).redISub(v);\n var ny = r.redMul(v.redISub(nx)).redISub(s1.redMul(h3));\n var nz = this.z.redMul(h);\n\n return this.curve.jpoint(nx, ny, nz);\n};\n\nJPoint.prototype.dblp = function dblp(pow) {\n if (pow === 0)\n return this;\n if (this.isInfinity())\n return this;\n if (!pow)\n return this.dbl();\n\n var i;\n if (this.curve.zeroA || this.curve.threeA) {\n var r = this;\n for (i = 0; i < pow; i++)\n r = r.dbl();\n return r;\n }\n\n // 1M + 2S + 1A + N * (4S + 5M + 8A)\n // N = 1 => 6M + 6S + 9A\n var a = this.curve.a;\n var tinv = this.curve.tinv;\n\n var jx = this.x;\n var jy = this.y;\n var jz = this.z;\n var jz4 = jz.redSqr().redSqr();\n\n // Reuse results\n var jyd = jy.redAdd(jy);\n for (i = 0; i < pow; i++) {\n var jx2 = jx.redSqr();\n var jyd2 = jyd.redSqr();\n var jyd4 = jyd2.redSqr();\n var c = jx2.redAdd(jx2).redIAdd(jx2).redIAdd(a.redMul(jz4));\n\n var t1 = jx.redMul(jyd2);\n var nx = c.redSqr().redISub(t1.redAdd(t1));\n var t2 = t1.redISub(nx);\n var dny = c.redMul(t2);\n dny = dny.redIAdd(dny).redISub(jyd4);\n var nz = jyd.redMul(jz);\n if (i + 1 < pow)\n jz4 = jz4.redMul(jyd4);\n\n jx = nx;\n jz = nz;\n jyd = dny;\n }\n\n return this.curve.jpoint(jx, jyd.redMul(tinv), jz);\n};\n\nJPoint.prototype.dbl = function dbl() {\n if (this.isInfinity())\n return this;\n\n if (this.curve.zeroA)\n return this._zeroDbl();\n else if (this.curve.threeA)\n return this._threeDbl();\n else\n return this._dbl();\n};\n\nJPoint.prototype._zeroDbl = function _zeroDbl() {\n var nx;\n var ny;\n var nz;\n // Z = 1\n if (this.zOne) {\n // hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-0.html\n // #doubling-mdbl-2007-bl\n // 1M + 5S + 14A\n\n // XX = X1^2\n var xx = this.x.redSqr();\n // YY = Y1^2\n var yy = this.y.redSqr();\n // YYYY = YY^2\n var yyyy = yy.redSqr();\n // S = 2 * ((X1 + YY)^2 - XX - YYYY)\n var s = this.x.redAdd(yy).redSqr().redISub(xx).redISub(yyyy);\n s = s.redIAdd(s);\n // M = 3 * XX + a; a = 0\n var m = xx.redAdd(xx).redIAdd(xx);\n // T = M ^ 2 - 2*S\n var t = m.redSqr().redISub(s).redISub(s);\n\n // 8 * YYYY\n var yyyy8 = yyyy.redIAdd(yyyy);\n yyyy8 = yyyy8.redIAdd(yyyy8);\n yyyy8 = yyyy8.redIAdd(yyyy8);\n\n // X3 = T\n nx = t;\n // Y3 = M * (S - T) - 8 * YYYY\n ny = m.redMul(s.redISub(t)).redISub(yyyy8);\n // Z3 = 2*Y1\n nz = this.y.redAdd(this.y);\n } else {\n // hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-0.html\n // #doubling-dbl-2009-l\n // 2M + 5S + 13A\n\n // A = X1^2\n var a = this.x.redSqr();\n // B = Y1^2\n var b = this.y.redSqr();\n // C = B^2\n var c = b.redSqr();\n // D = 2 * ((X1 + B)^2 - A - C)\n var d = this.x.redAdd(b).redSqr().redISub(a).redISub(c);\n d = d.redIAdd(d);\n // E = 3 * A\n var e = a.redAdd(a).redIAdd(a);\n // F = E^2\n var f = e.redSqr();\n\n // 8 * C\n var c8 = c.redIAdd(c);\n c8 = c8.redIAdd(c8);\n c8 = c8.redIAdd(c8);\n\n // X3 = F - 2 * D\n nx = f.redISub(d).redISub(d);\n // Y3 = E * (D - X3) - 8 * C\n ny = e.redMul(d.redISub(nx)).redISub(c8);\n // Z3 = 2 * Y1 * Z1\n nz = this.y.redMul(this.z);\n nz = nz.redIAdd(nz);\n }\n\n return this.curve.jpoint(nx, ny, nz);\n};\n\nJPoint.prototype._threeDbl = function _threeDbl() {\n var nx;\n var ny;\n var nz;\n // Z = 1\n if (this.zOne) {\n // hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-3.html\n // #doubling-mdbl-2007-bl\n // 1M + 5S + 15A\n\n // XX = X1^2\n var xx = this.x.redSqr();\n // YY = Y1^2\n var yy = this.y.redSqr();\n // YYYY = YY^2\n var yyyy = yy.redSqr();\n // S = 2 * ((X1 + YY)^2 - XX - YYYY)\n var s = this.x.redAdd(yy).redSqr().redISub(xx).redISub(yyyy);\n s = s.redIAdd(s);\n // M = 3 * XX + a\n var m = xx.redAdd(xx).redIAdd(xx).redIAdd(this.curve.a);\n // T = M^2 - 2 * S\n var t = m.redSqr().redISub(s).redISub(s);\n // X3 = T\n nx = t;\n // Y3 = M * (S - T) - 8 * YYYY\n var yyyy8 = yyyy.redIAdd(yyyy);\n yyyy8 = yyyy8.redIAdd(yyyy8);\n yyyy8 = yyyy8.redIAdd(yyyy8);\n ny = m.redMul(s.redISub(t)).redISub(yyyy8);\n // Z3 = 2 * Y1\n nz = this.y.redAdd(this.y);\n } else {\n // hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-3.html#doubling-dbl-2001-b\n // 3M + 5S\n\n // delta = Z1^2\n var delta = this.z.redSqr();\n // gamma = Y1^2\n var gamma = this.y.redSqr();\n // beta = X1 * gamma\n var beta = this.x.redMul(gamma);\n // alpha = 3 * (X1 - delta) * (X1 + delta)\n var alpha = this.x.redSub(delta).redMul(this.x.redAdd(delta));\n alpha = alpha.redAdd(alpha).redIAdd(alpha);\n // X3 = alpha^2 - 8 * beta\n var beta4 = beta.redIAdd(beta);\n beta4 = beta4.redIAdd(beta4);\n var beta8 = beta4.redAdd(beta4);\n nx = alpha.redSqr().redISub(beta8);\n // Z3 = (Y1 + Z1)^2 - gamma - delta\n nz = this.y.redAdd(this.z).redSqr().redISub(gamma).redISub(delta);\n // Y3 = alpha * (4 * beta - X3) - 8 * gamma^2\n var ggamma8 = gamma.redSqr();\n ggamma8 = ggamma8.redIAdd(ggamma8);\n ggamma8 = ggamma8.redIAdd(ggamma8);\n ggamma8 = ggamma8.redIAdd(ggamma8);\n ny = alpha.redMul(beta4.redISub(nx)).redISub(ggamma8);\n }\n\n return this.curve.jpoint(nx, ny, nz);\n};\n\nJPoint.prototype._dbl = function _dbl() {\n var a = this.curve.a;\n\n // 4M + 6S + 10A\n var jx = this.x;\n var jy = this.y;\n var jz = this.z;\n var jz4 = jz.redSqr().redSqr();\n\n var jx2 = jx.redSqr();\n var jy2 = jy.redSqr();\n\n var c = jx2.redAdd(jx2).redIAdd(jx2).redIAdd(a.redMul(jz4));\n\n var jxd4 = jx.redAdd(jx);\n jxd4 = jxd4.redIAdd(jxd4);\n var t1 = jxd4.redMul(jy2);\n var nx = c.redSqr().redISub(t1.redAdd(t1));\n var t2 = t1.redISub(nx);\n\n var jyd8 = jy2.redSqr();\n jyd8 = jyd8.redIAdd(jyd8);\n jyd8 = jyd8.redIAdd(jyd8);\n jyd8 = jyd8.redIAdd(jyd8);\n var ny = c.redMul(t2).redISub(jyd8);\n var nz = jy.redAdd(jy).redMul(jz);\n\n return this.curve.jpoint(nx, ny, nz);\n};\n\nJPoint.prototype.trpl = function trpl() {\n if (!this.curve.zeroA)\n return this.dbl().add(this);\n\n // hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-0.html#tripling-tpl-2007-bl\n // 5M + 10S + ...\n\n // XX = X1^2\n var xx = this.x.redSqr();\n // YY = Y1^2\n var yy = this.y.redSqr();\n // ZZ = Z1^2\n var zz = this.z.redSqr();\n // YYYY = YY^2\n var yyyy = yy.redSqr();\n // M = 3 * XX + a * ZZ2; a = 0\n var m = xx.redAdd(xx).redIAdd(xx);\n // MM = M^2\n var mm = m.redSqr();\n // E = 6 * ((X1 + YY)^2 - XX - YYYY) - MM\n var e = this.x.redAdd(yy).redSqr().redISub(xx).redISub(yyyy);\n e = e.redIAdd(e);\n e = e.redAdd(e).redIAdd(e);\n e = e.redISub(mm);\n // EE = E^2\n var ee = e.redSqr();\n // T = 16*YYYY\n var t = yyyy.redIAdd(yyyy);\n t = t.redIAdd(t);\n t = t.redIAdd(t);\n t = t.redIAdd(t);\n // U = (M + E)^2 - MM - EE - T\n var u = m.redIAdd(e).redSqr().redISub(mm).redISub(ee).redISub(t);\n // X3 = 4 * (X1 * EE - 4 * YY * U)\n var yyu4 = yy.redMul(u);\n yyu4 = yyu4.redIAdd(yyu4);\n yyu4 = yyu4.redIAdd(yyu4);\n var nx = this.x.redMul(ee).redISub(yyu4);\n nx = nx.redIAdd(nx);\n nx = nx.redIAdd(nx);\n // Y3 = 8 * Y1 * (U * (T - U) - E * EE)\n var ny = this.y.redMul(u.redMul(t.redISub(u)).redISub(e.redMul(ee)));\n ny = ny.redIAdd(ny);\n ny = ny.redIAdd(ny);\n ny = ny.redIAdd(ny);\n // Z3 = (Z1 + E)^2 - ZZ - EE\n var nz = this.z.redAdd(e).redSqr().redISub(zz).redISub(ee);\n\n return this.curve.jpoint(nx, ny, nz);\n};\n\nJPoint.prototype.mul = function mul(k, kbase) {\n k = new BN(k, kbase);\n\n return this.curve._wnafMul(this, k);\n};\n\nJPoint.prototype.eq = function eq(p) {\n if (p.type === 'affine')\n return this.eq(p.toJ());\n\n if (this === p)\n return true;\n\n // x1 * z2^2 == x2 * z1^2\n var z2 = this.z.redSqr();\n var pz2 = p.z.redSqr();\n if (this.x.redMul(pz2).redISub(p.x.redMul(z2)).cmpn(0) !== 0)\n return false;\n\n // y1 * z2^3 == y2 * z1^3\n var z3 = z2.redMul(this.z);\n var pz3 = pz2.redMul(p.z);\n return this.y.redMul(pz3).redISub(p.y.redMul(z3)).cmpn(0) === 0;\n};\n\nJPoint.prototype.eqXToP = function eqXToP(x) {\n var zs = this.z.redSqr();\n var rx = x.toRed(this.curve.red).redMul(zs);\n if (this.x.cmp(rx) === 0)\n return true;\n\n var xc = x.clone();\n var t = this.curve.redN.redMul(zs);\n for (;;) {\n xc.iadd(this.curve.n);\n if (xc.cmp(this.curve.p) >= 0)\n return false;\n\n rx.redIAdd(t);\n if (this.x.cmp(rx) === 0)\n return true;\n }\n};\n\nJPoint.prototype.inspect = function inspect() {\n if (this.isInfinity())\n return '';\n return '';\n};\n\nJPoint.prototype.isInfinity = function isInfinity() {\n // XXX This code assumes that zero is always zero in red\n return this.z.cmpn(0) === 0;\n};\n","'use strict';\n\nvar curves = exports;\n\nvar hash = require('hash.js');\nvar curve = require('./curve');\nvar utils = require('./utils');\n\nvar assert = utils.assert;\n\nfunction PresetCurve(options) {\n if (options.type === 'short')\n this.curve = new curve.short(options);\n else if (options.type === 'edwards')\n this.curve = new curve.edwards(options);\n else\n this.curve = new curve.mont(options);\n this.g = this.curve.g;\n this.n = this.curve.n;\n this.hash = options.hash;\n\n assert(this.g.validate(), 'Invalid curve');\n assert(this.g.mul(this.n).isInfinity(), 'Invalid curve, G*N != O');\n}\ncurves.PresetCurve = PresetCurve;\n\nfunction defineCurve(name, options) {\n Object.defineProperty(curves, name, {\n configurable: true,\n enumerable: true,\n get: function() {\n var curve = new PresetCurve(options);\n Object.defineProperty(curves, name, {\n configurable: true,\n enumerable: true,\n value: curve,\n });\n return curve;\n },\n });\n}\n\ndefineCurve('p192', {\n type: 'short',\n prime: 'p192',\n p: 'ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff',\n a: 'ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc',\n b: '64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1',\n n: 'ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831',\n hash: hash.sha256,\n gRed: false,\n g: [\n '188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012',\n '07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811',\n ],\n});\n\ndefineCurve('p224', {\n type: 'short',\n prime: 'p224',\n p: 'ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001',\n a: 'ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe',\n b: 'b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4',\n n: 'ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d',\n hash: hash.sha256,\n gRed: false,\n g: [\n 'b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21',\n 'bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34',\n ],\n});\n\ndefineCurve('p256', {\n type: 'short',\n prime: null,\n p: 'ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff',\n a: 'ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc',\n b: '5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b',\n n: 'ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551',\n hash: hash.sha256,\n gRed: false,\n g: [\n '6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296',\n '4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5',\n ],\n});\n\ndefineCurve('p384', {\n type: 'short',\n prime: null,\n p: 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ' +\n 'fffffffe ffffffff 00000000 00000000 ffffffff',\n a: 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ' +\n 'fffffffe ffffffff 00000000 00000000 fffffffc',\n b: 'b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f ' +\n '5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef',\n n: 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 ' +\n 'f4372ddf 581a0db2 48b0a77a ecec196a ccc52973',\n hash: hash.sha384,\n gRed: false,\n g: [\n 'aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 ' +\n '5502f25d bf55296c 3a545e38 72760ab7',\n '3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 ' +\n '0a60b1ce 1d7e819d 7a431d7c 90ea0e5f',\n ],\n});\n\ndefineCurve('p521', {\n type: 'short',\n prime: null,\n p: '000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ' +\n 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ' +\n 'ffffffff ffffffff ffffffff ffffffff ffffffff',\n a: '000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ' +\n 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ' +\n 'ffffffff ffffffff ffffffff ffffffff fffffffc',\n b: '00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b ' +\n '99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd ' +\n '3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00',\n n: '000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ' +\n 'ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 ' +\n 'f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409',\n hash: hash.sha512,\n gRed: false,\n g: [\n '000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 ' +\n '053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 ' +\n 'a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66',\n '00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 ' +\n '579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 ' +\n '3fad0761 353c7086 a272c240 88be9476 9fd16650',\n ],\n});\n\ndefineCurve('curve25519', {\n type: 'mont',\n prime: 'p25519',\n p: '7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed',\n a: '76d06',\n b: '1',\n n: '1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed',\n hash: hash.sha256,\n gRed: false,\n g: [\n '9',\n ],\n});\n\ndefineCurve('ed25519', {\n type: 'edwards',\n prime: 'p25519',\n p: '7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed',\n a: '-1',\n c: '1',\n // -121665 * (121666^(-1)) (mod P)\n d: '52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3',\n n: '1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed',\n hash: hash.sha256,\n gRed: false,\n g: [\n '216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a',\n\n // 4/5\n '6666666666666666666666666666666666666666666666666666666666666658',\n ],\n});\n\nvar pre;\ntry {\n pre = require('./precomputed/secp256k1');\n} catch (e) {\n pre = undefined;\n}\n\ndefineCurve('secp256k1', {\n type: 'short',\n prime: 'k256',\n p: 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f',\n a: '0',\n b: '7',\n n: 'ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141',\n h: '1',\n hash: hash.sha256,\n\n // Precomputed endomorphism\n beta: '7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee',\n lambda: '5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72',\n basis: [\n {\n a: '3086d221a7d46bcde86c90e49284eb15',\n b: '-e4437ed6010e88286f547fa90abfe4c3',\n },\n {\n a: '114ca50f7a8e2f3f657c1108d9d44cfd8',\n b: '3086d221a7d46bcde86c90e49284eb15',\n },\n ],\n\n gRed: false,\n g: [\n '79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798',\n '483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8',\n pre,\n ],\n});\n","'use strict';\n\nvar BN = require('bn.js');\nvar HmacDRBG = require('hmac-drbg');\nvar utils = require('../utils');\nvar curves = require('../curves');\nvar rand = require('brorand');\nvar assert = utils.assert;\n\nvar KeyPair = require('./key');\nvar Signature = require('./signature');\n\nfunction EC(options) {\n if (!(this instanceof EC))\n return new EC(options);\n\n // Shortcut `elliptic.ec(curve-name)`\n if (typeof options === 'string') {\n assert(Object.prototype.hasOwnProperty.call(curves, options),\n 'Unknown curve ' + options);\n\n options = curves[options];\n }\n\n // Shortcut for `elliptic.ec(elliptic.curves.curveName)`\n if (options instanceof curves.PresetCurve)\n options = { curve: options };\n\n this.curve = options.curve.curve;\n this.n = this.curve.n;\n this.nh = this.n.ushrn(1);\n this.g = this.curve.g;\n\n // Point on curve\n this.g = options.curve.g;\n this.g.precompute(options.curve.n.bitLength() + 1);\n\n // Hash for function for DRBG\n this.hash = options.hash || options.curve.hash;\n}\nmodule.exports = EC;\n\nEC.prototype.keyPair = function keyPair(options) {\n return new KeyPair(this, options);\n};\n\nEC.prototype.keyFromPrivate = function keyFromPrivate(priv, enc) {\n return KeyPair.fromPrivate(this, priv, enc);\n};\n\nEC.prototype.keyFromPublic = function keyFromPublic(pub, enc) {\n return KeyPair.fromPublic(this, pub, enc);\n};\n\nEC.prototype.genKeyPair = function genKeyPair(options) {\n if (!options)\n options = {};\n\n // Instantiate Hmac_DRBG\n var drbg = new HmacDRBG({\n hash: this.hash,\n pers: options.pers,\n persEnc: options.persEnc || 'utf8',\n entropy: options.entropy || rand(this.hash.hmacStrength),\n entropyEnc: options.entropy && options.entropyEnc || 'utf8',\n nonce: this.n.toArray(),\n });\n\n var bytes = this.n.byteLength();\n var ns2 = this.n.sub(new BN(2));\n for (;;) {\n var priv = new BN(drbg.generate(bytes));\n if (priv.cmp(ns2) > 0)\n continue;\n\n priv.iaddn(1);\n return this.keyFromPrivate(priv);\n }\n};\n\nEC.prototype._truncateToN = function _truncateToN(msg, truncOnly) {\n var delta = msg.byteLength() * 8 - this.n.bitLength();\n if (delta > 0)\n msg = msg.ushrn(delta);\n if (!truncOnly && msg.cmp(this.n) >= 0)\n return msg.sub(this.n);\n else\n return msg;\n};\n\nEC.prototype.sign = function sign(msg, key, enc, options) {\n if (typeof enc === 'object') {\n options = enc;\n enc = null;\n }\n if (!options)\n options = {};\n\n key = this.keyFromPrivate(key, enc);\n msg = this._truncateToN(new BN(msg, 16));\n\n // Zero-extend key to provide enough entropy\n var bytes = this.n.byteLength();\n var bkey = key.getPrivate().toArray('be', bytes);\n\n // Zero-extend nonce to have the same byte size as N\n var nonce = msg.toArray('be', bytes);\n\n // Instantiate Hmac_DRBG\n var drbg = new HmacDRBG({\n hash: this.hash,\n entropy: bkey,\n nonce: nonce,\n pers: options.pers,\n persEnc: options.persEnc || 'utf8',\n });\n\n // Number of bytes to generate\n var ns1 = this.n.sub(new BN(1));\n\n for (var iter = 0; ; iter++) {\n var k = options.k ?\n options.k(iter) :\n new BN(drbg.generate(this.n.byteLength()));\n k = this._truncateToN(k, true);\n if (k.cmpn(1) <= 0 || k.cmp(ns1) >= 0)\n continue;\n\n var kp = this.g.mul(k);\n if (kp.isInfinity())\n continue;\n\n var kpX = kp.getX();\n var r = kpX.umod(this.n);\n if (r.cmpn(0) === 0)\n continue;\n\n var s = k.invm(this.n).mul(r.mul(key.getPrivate()).iadd(msg));\n s = s.umod(this.n);\n if (s.cmpn(0) === 0)\n continue;\n\n var recoveryParam = (kp.getY().isOdd() ? 1 : 0) |\n (kpX.cmp(r) !== 0 ? 2 : 0);\n\n // Use complement of `s`, if it is > `n / 2`\n if (options.canonical && s.cmp(this.nh) > 0) {\n s = this.n.sub(s);\n recoveryParam ^= 1;\n }\n\n return new Signature({ r: r, s: s, recoveryParam: recoveryParam });\n }\n};\n\nEC.prototype.verify = function verify(msg, signature, key, enc) {\n msg = this._truncateToN(new BN(msg, 16));\n key = this.keyFromPublic(key, enc);\n signature = new Signature(signature, 'hex');\n\n // Perform primitive values validation\n var r = signature.r;\n var s = signature.s;\n if (r.cmpn(1) < 0 || r.cmp(this.n) >= 0)\n return false;\n if (s.cmpn(1) < 0 || s.cmp(this.n) >= 0)\n return false;\n\n // Validate signature\n var sinv = s.invm(this.n);\n var u1 = sinv.mul(msg).umod(this.n);\n var u2 = sinv.mul(r).umod(this.n);\n var p;\n\n if (!this.curve._maxwellTrick) {\n p = this.g.mulAdd(u1, key.getPublic(), u2);\n if (p.isInfinity())\n return false;\n\n return p.getX().umod(this.n).cmp(r) === 0;\n }\n\n // NOTE: Greg Maxwell's trick, inspired by:\n // https://git.io/vad3K\n\n p = this.g.jmulAdd(u1, key.getPublic(), u2);\n if (p.isInfinity())\n return false;\n\n // Compare `p.x` of Jacobian point with `r`,\n // this will do `p.x == r * p.z^2` instead of multiplying `p.x` by the\n // inverse of `p.z^2`\n return p.eqXToP(r);\n};\n\nEC.prototype.recoverPubKey = function(msg, signature, j, enc) {\n assert((3 & j) === j, 'The recovery param is more than two bits');\n signature = new Signature(signature, enc);\n\n var n = this.n;\n var e = new BN(msg);\n var r = signature.r;\n var s = signature.s;\n\n // A set LSB signifies that the y-coordinate is odd\n var isYOdd = j & 1;\n var isSecondKey = j >> 1;\n if (r.cmp(this.curve.p.umod(this.curve.n)) >= 0 && isSecondKey)\n throw new Error('Unable to find sencond key candinate');\n\n // 1.1. Let x = r + jn.\n if (isSecondKey)\n r = this.curve.pointFromX(r.add(this.curve.n), isYOdd);\n else\n r = this.curve.pointFromX(r, isYOdd);\n\n var rInv = signature.r.invm(n);\n var s1 = n.sub(e).mul(rInv).umod(n);\n var s2 = s.mul(rInv).umod(n);\n\n // 1.6.1 Compute Q = r^-1 (sR - eG)\n // Q = r^-1 (sR + -eG)\n return this.g.mulAdd(s1, r, s2);\n};\n\nEC.prototype.getKeyRecoveryParam = function(e, signature, Q, enc) {\n signature = new Signature(signature, enc);\n if (signature.recoveryParam !== null)\n return signature.recoveryParam;\n\n for (var i = 0; i < 4; i++) {\n var Qprime;\n try {\n Qprime = this.recoverPubKey(e, signature, i);\n } catch (e) {\n continue;\n }\n\n if (Qprime.eq(Q))\n return i;\n }\n throw new Error('Unable to find valid recovery factor');\n};\n","'use strict';\n\nvar BN = require('bn.js');\nvar utils = require('../utils');\nvar assert = utils.assert;\n\nfunction KeyPair(ec, options) {\n this.ec = ec;\n this.priv = null;\n this.pub = null;\n\n // KeyPair(ec, { priv: ..., pub: ... })\n if (options.priv)\n this._importPrivate(options.priv, options.privEnc);\n if (options.pub)\n this._importPublic(options.pub, options.pubEnc);\n}\nmodule.exports = KeyPair;\n\nKeyPair.fromPublic = function fromPublic(ec, pub, enc) {\n if (pub instanceof KeyPair)\n return pub;\n\n return new KeyPair(ec, {\n pub: pub,\n pubEnc: enc,\n });\n};\n\nKeyPair.fromPrivate = function fromPrivate(ec, priv, enc) {\n if (priv instanceof KeyPair)\n return priv;\n\n return new KeyPair(ec, {\n priv: priv,\n privEnc: enc,\n });\n};\n\nKeyPair.prototype.validate = function validate() {\n var pub = this.getPublic();\n\n if (pub.isInfinity())\n return { result: false, reason: 'Invalid public key' };\n if (!pub.validate())\n return { result: false, reason: 'Public key is not a point' };\n if (!pub.mul(this.ec.curve.n).isInfinity())\n return { result: false, reason: 'Public key * N != O' };\n\n return { result: true, reason: null };\n};\n\nKeyPair.prototype.getPublic = function getPublic(compact, enc) {\n // compact is optional argument\n if (typeof compact === 'string') {\n enc = compact;\n compact = null;\n }\n\n if (!this.pub)\n this.pub = this.ec.g.mul(this.priv);\n\n if (!enc)\n return this.pub;\n\n return this.pub.encode(enc, compact);\n};\n\nKeyPair.prototype.getPrivate = function getPrivate(enc) {\n if (enc === 'hex')\n return this.priv.toString(16, 2);\n else\n return this.priv;\n};\n\nKeyPair.prototype._importPrivate = function _importPrivate(key, enc) {\n this.priv = new BN(key, enc || 16);\n\n // Ensure that the priv won't be bigger than n, otherwise we may fail\n // in fixed multiplication method\n this.priv = this.priv.umod(this.ec.curve.n);\n};\n\nKeyPair.prototype._importPublic = function _importPublic(key, enc) {\n if (key.x || key.y) {\n // Montgomery points only have an `x` coordinate.\n // Weierstrass/Edwards points on the other hand have both `x` and\n // `y` coordinates.\n if (this.ec.curve.type === 'mont') {\n assert(key.x, 'Need x coordinate');\n } else if (this.ec.curve.type === 'short' ||\n this.ec.curve.type === 'edwards') {\n assert(key.x && key.y, 'Need both x and y coordinate');\n }\n this.pub = this.ec.curve.point(key.x, key.y);\n return;\n }\n this.pub = this.ec.curve.decodePoint(key, enc);\n};\n\n// ECDH\nKeyPair.prototype.derive = function derive(pub) {\n if(!pub.validate()) {\n assert(pub.validate(), 'public point not validated');\n }\n return pub.mul(this.priv).getX();\n};\n\n// ECDSA\nKeyPair.prototype.sign = function sign(msg, enc, options) {\n return this.ec.sign(msg, this, enc, options);\n};\n\nKeyPair.prototype.verify = function verify(msg, signature) {\n return this.ec.verify(msg, signature, this);\n};\n\nKeyPair.prototype.inspect = function inspect() {\n return '';\n};\n","'use strict';\n\nvar BN = require('bn.js');\n\nvar utils = require('../utils');\nvar assert = utils.assert;\n\nfunction Signature(options, enc) {\n if (options instanceof Signature)\n return options;\n\n if (this._importDER(options, enc))\n return;\n\n assert(options.r && options.s, 'Signature without r or s');\n this.r = new BN(options.r, 16);\n this.s = new BN(options.s, 16);\n if (options.recoveryParam === undefined)\n this.recoveryParam = null;\n else\n this.recoveryParam = options.recoveryParam;\n}\nmodule.exports = Signature;\n\nfunction Position() {\n this.place = 0;\n}\n\nfunction getLength(buf, p) {\n var initial = buf[p.place++];\n if (!(initial & 0x80)) {\n return initial;\n }\n var octetLen = initial & 0xf;\n\n // Indefinite length or overflow\n if (octetLen === 0 || octetLen > 4) {\n return false;\n }\n\n var val = 0;\n for (var i = 0, off = p.place; i < octetLen; i++, off++) {\n val <<= 8;\n val |= buf[off];\n val >>>= 0;\n }\n\n // Leading zeroes\n if (val <= 0x7f) {\n return false;\n }\n\n p.place = off;\n return val;\n}\n\nfunction rmPadding(buf) {\n var i = 0;\n var len = buf.length - 1;\n while (!buf[i] && !(buf[i + 1] & 0x80) && i < len) {\n i++;\n }\n if (i === 0) {\n return buf;\n }\n return buf.slice(i);\n}\n\nSignature.prototype._importDER = function _importDER(data, enc) {\n data = utils.toArray(data, enc);\n var p = new Position();\n if (data[p.place++] !== 0x30) {\n return false;\n }\n var len = getLength(data, p);\n if (len === false) {\n return false;\n }\n if ((len + p.place) !== data.length) {\n return false;\n }\n if (data[p.place++] !== 0x02) {\n return false;\n }\n var rlen = getLength(data, p);\n if (rlen === false) {\n return false;\n }\n var r = data.slice(p.place, rlen + p.place);\n p.place += rlen;\n if (data[p.place++] !== 0x02) {\n return false;\n }\n var slen = getLength(data, p);\n if (slen === false) {\n return false;\n }\n if (data.length !== slen + p.place) {\n return false;\n }\n var s = data.slice(p.place, slen + p.place);\n if (r[0] === 0) {\n if (r[1] & 0x80) {\n r = r.slice(1);\n } else {\n // Leading zeroes\n return false;\n }\n }\n if (s[0] === 0) {\n if (s[1] & 0x80) {\n s = s.slice(1);\n } else {\n // Leading zeroes\n return false;\n }\n }\n\n this.r = new BN(r);\n this.s = new BN(s);\n this.recoveryParam = null;\n\n return true;\n};\n\nfunction constructLength(arr, len) {\n if (len < 0x80) {\n arr.push(len);\n return;\n }\n var octets = 1 + (Math.log(len) / Math.LN2 >>> 3);\n arr.push(octets | 0x80);\n while (--octets) {\n arr.push((len >>> (octets << 3)) & 0xff);\n }\n arr.push(len);\n}\n\nSignature.prototype.toDER = function toDER(enc) {\n var r = this.r.toArray();\n var s = this.s.toArray();\n\n // Pad values\n if (r[0] & 0x80)\n r = [ 0 ].concat(r);\n // Pad values\n if (s[0] & 0x80)\n s = [ 0 ].concat(s);\n\n r = rmPadding(r);\n s = rmPadding(s);\n\n while (!s[0] && !(s[1] & 0x80)) {\n s = s.slice(1);\n }\n var arr = [ 0x02 ];\n constructLength(arr, r.length);\n arr = arr.concat(r);\n arr.push(0x02);\n constructLength(arr, s.length);\n var backHalf = arr.concat(s);\n var res = [ 0x30 ];\n constructLength(res, backHalf.length);\n res = res.concat(backHalf);\n return utils.encode(res, enc);\n};\n","'use strict';\n\nvar hash = require('hash.js');\nvar curves = require('../curves');\nvar utils = require('../utils');\nvar assert = utils.assert;\nvar parseBytes = utils.parseBytes;\nvar KeyPair = require('./key');\nvar Signature = require('./signature');\n\nfunction EDDSA(curve) {\n assert(curve === 'ed25519', 'only tested with ed25519 so far');\n\n if (!(this instanceof EDDSA))\n return new EDDSA(curve);\n\n curve = curves[curve].curve;\n this.curve = curve;\n this.g = curve.g;\n this.g.precompute(curve.n.bitLength() + 1);\n\n this.pointClass = curve.point().constructor;\n this.encodingLength = Math.ceil(curve.n.bitLength() / 8);\n this.hash = hash.sha512;\n}\n\nmodule.exports = EDDSA;\n\n/**\n* @param {Array|String} message - message bytes\n* @param {Array|String|KeyPair} secret - secret bytes or a keypair\n* @returns {Signature} - signature\n*/\nEDDSA.prototype.sign = function sign(message, secret) {\n message = parseBytes(message);\n var key = this.keyFromSecret(secret);\n var r = this.hashInt(key.messagePrefix(), message);\n var R = this.g.mul(r);\n var Rencoded = this.encodePoint(R);\n var s_ = this.hashInt(Rencoded, key.pubBytes(), message)\n .mul(key.priv());\n var S = r.add(s_).umod(this.curve.n);\n return this.makeSignature({ R: R, S: S, Rencoded: Rencoded });\n};\n\n/**\n* @param {Array} message - message bytes\n* @param {Array|String|Signature} sig - sig bytes\n* @param {Array|String|Point|KeyPair} pub - public key\n* @returns {Boolean} - true if public key matches sig of message\n*/\nEDDSA.prototype.verify = function verify(message, sig, pub) {\n message = parseBytes(message);\n sig = this.makeSignature(sig);\n var key = this.keyFromPublic(pub);\n var h = this.hashInt(sig.Rencoded(), key.pubBytes(), message);\n var SG = this.g.mul(sig.S());\n var RplusAh = sig.R().add(key.pub().mul(h));\n return RplusAh.eq(SG);\n};\n\nEDDSA.prototype.hashInt = function hashInt() {\n var hash = this.hash();\n for (var i = 0; i < arguments.length; i++)\n hash.update(arguments[i]);\n return utils.intFromLE(hash.digest()).umod(this.curve.n);\n};\n\nEDDSA.prototype.keyFromPublic = function keyFromPublic(pub) {\n return KeyPair.fromPublic(this, pub);\n};\n\nEDDSA.prototype.keyFromSecret = function keyFromSecret(secret) {\n return KeyPair.fromSecret(this, secret);\n};\n\nEDDSA.prototype.makeSignature = function makeSignature(sig) {\n if (sig instanceof Signature)\n return sig;\n return new Signature(this, sig);\n};\n\n/**\n* * https://tools.ietf.org/html/draft-josefsson-eddsa-ed25519-03#section-5.2\n*\n* EDDSA defines methods for encoding and decoding points and integers. These are\n* helper convenience methods, that pass along to utility functions implied\n* parameters.\n*\n*/\nEDDSA.prototype.encodePoint = function encodePoint(point) {\n var enc = point.getY().toArray('le', this.encodingLength);\n enc[this.encodingLength - 1] |= point.getX().isOdd() ? 0x80 : 0;\n return enc;\n};\n\nEDDSA.prototype.decodePoint = function decodePoint(bytes) {\n bytes = utils.parseBytes(bytes);\n\n var lastIx = bytes.length - 1;\n var normed = bytes.slice(0, lastIx).concat(bytes[lastIx] & ~0x80);\n var xIsOdd = (bytes[lastIx] & 0x80) !== 0;\n\n var y = utils.intFromLE(normed);\n return this.curve.pointFromY(y, xIsOdd);\n};\n\nEDDSA.prototype.encodeInt = function encodeInt(num) {\n return num.toArray('le', this.encodingLength);\n};\n\nEDDSA.prototype.decodeInt = function decodeInt(bytes) {\n return utils.intFromLE(bytes);\n};\n\nEDDSA.prototype.isPoint = function isPoint(val) {\n return val instanceof this.pointClass;\n};\n","'use strict';\n\nvar utils = require('../utils');\nvar assert = utils.assert;\nvar parseBytes = utils.parseBytes;\nvar cachedProperty = utils.cachedProperty;\n\n/**\n* @param {EDDSA} eddsa - instance\n* @param {Object} params - public/private key parameters\n*\n* @param {Array} [params.secret] - secret seed bytes\n* @param {Point} [params.pub] - public key point (aka `A` in eddsa terms)\n* @param {Array} [params.pub] - public key point encoded as bytes\n*\n*/\nfunction KeyPair(eddsa, params) {\n this.eddsa = eddsa;\n this._secret = parseBytes(params.secret);\n if (eddsa.isPoint(params.pub))\n this._pub = params.pub;\n else\n this._pubBytes = parseBytes(params.pub);\n}\n\nKeyPair.fromPublic = function fromPublic(eddsa, pub) {\n if (pub instanceof KeyPair)\n return pub;\n return new KeyPair(eddsa, { pub: pub });\n};\n\nKeyPair.fromSecret = function fromSecret(eddsa, secret) {\n if (secret instanceof KeyPair)\n return secret;\n return new KeyPair(eddsa, { secret: secret });\n};\n\nKeyPair.prototype.secret = function secret() {\n return this._secret;\n};\n\ncachedProperty(KeyPair, 'pubBytes', function pubBytes() {\n return this.eddsa.encodePoint(this.pub());\n});\n\ncachedProperty(KeyPair, 'pub', function pub() {\n if (this._pubBytes)\n return this.eddsa.decodePoint(this._pubBytes);\n return this.eddsa.g.mul(this.priv());\n});\n\ncachedProperty(KeyPair, 'privBytes', function privBytes() {\n var eddsa = this.eddsa;\n var hash = this.hash();\n var lastIx = eddsa.encodingLength - 1;\n\n var a = hash.slice(0, eddsa.encodingLength);\n a[0] &= 248;\n a[lastIx] &= 127;\n a[lastIx] |= 64;\n\n return a;\n});\n\ncachedProperty(KeyPair, 'priv', function priv() {\n return this.eddsa.decodeInt(this.privBytes());\n});\n\ncachedProperty(KeyPair, 'hash', function hash() {\n return this.eddsa.hash().update(this.secret()).digest();\n});\n\ncachedProperty(KeyPair, 'messagePrefix', function messagePrefix() {\n return this.hash().slice(this.eddsa.encodingLength);\n});\n\nKeyPair.prototype.sign = function sign(message) {\n assert(this._secret, 'KeyPair can only verify');\n return this.eddsa.sign(message, this);\n};\n\nKeyPair.prototype.verify = function verify(message, sig) {\n return this.eddsa.verify(message, sig, this);\n};\n\nKeyPair.prototype.getSecret = function getSecret(enc) {\n assert(this._secret, 'KeyPair is public only');\n return utils.encode(this.secret(), enc);\n};\n\nKeyPair.prototype.getPublic = function getPublic(enc) {\n return utils.encode(this.pubBytes(), enc);\n};\n\nmodule.exports = KeyPair;\n","'use strict';\n\nvar BN = require('bn.js');\nvar utils = require('../utils');\nvar assert = utils.assert;\nvar cachedProperty = utils.cachedProperty;\nvar parseBytes = utils.parseBytes;\n\n/**\n* @param {EDDSA} eddsa - eddsa instance\n* @param {Array|Object} sig -\n* @param {Array|Point} [sig.R] - R point as Point or bytes\n* @param {Array|bn} [sig.S] - S scalar as bn or bytes\n* @param {Array} [sig.Rencoded] - R point encoded\n* @param {Array} [sig.Sencoded] - S scalar encoded\n*/\nfunction Signature(eddsa, sig) {\n this.eddsa = eddsa;\n\n if (typeof sig !== 'object')\n sig = parseBytes(sig);\n\n if (Array.isArray(sig)) {\n sig = {\n R: sig.slice(0, eddsa.encodingLength),\n S: sig.slice(eddsa.encodingLength),\n };\n }\n\n assert(sig.R && sig.S, 'Signature without R or S');\n\n if (eddsa.isPoint(sig.R))\n this._R = sig.R;\n if (sig.S instanceof BN)\n this._S = sig.S;\n\n this._Rencoded = Array.isArray(sig.R) ? sig.R : sig.Rencoded;\n this._Sencoded = Array.isArray(sig.S) ? sig.S : sig.Sencoded;\n}\n\ncachedProperty(Signature, 'S', function S() {\n return this.eddsa.decodeInt(this.Sencoded());\n});\n\ncachedProperty(Signature, 'R', function R() {\n return this.eddsa.decodePoint(this.Rencoded());\n});\n\ncachedProperty(Signature, 'Rencoded', function Rencoded() {\n return this.eddsa.encodePoint(this.R());\n});\n\ncachedProperty(Signature, 'Sencoded', function Sencoded() {\n return this.eddsa.encodeInt(this.S());\n});\n\nSignature.prototype.toBytes = function toBytes() {\n return this.Rencoded().concat(this.Sencoded());\n};\n\nSignature.prototype.toHex = function toHex() {\n return utils.encode(this.toBytes(), 'hex').toUpperCase();\n};\n\nmodule.exports = Signature;\n","module.exports = {\n doubles: {\n step: 4,\n points: [\n [\n 'e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a',\n 'f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821',\n ],\n [\n '8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508',\n '11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf',\n ],\n [\n '175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739',\n 'd3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695',\n ],\n [\n '363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640',\n '4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9',\n ],\n [\n '8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c',\n '4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36',\n ],\n [\n '723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda',\n '96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f',\n ],\n [\n 'eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa',\n '5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999',\n ],\n [\n '100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0',\n 'cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09',\n ],\n [\n 'e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d',\n '9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d',\n ],\n [\n 'feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d',\n 'e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088',\n ],\n [\n 'da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1',\n '9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d',\n ],\n [\n '53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0',\n '5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8',\n ],\n [\n '8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047',\n '10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a',\n ],\n [\n '385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862',\n '283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453',\n ],\n [\n '6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7',\n '7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160',\n ],\n [\n '3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd',\n '56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0',\n ],\n [\n '85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83',\n '7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6',\n ],\n [\n '948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a',\n '53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589',\n ],\n [\n '6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8',\n 'bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17',\n ],\n [\n 'e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d',\n '4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda',\n ],\n [\n 'e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725',\n '7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd',\n ],\n [\n '213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754',\n '4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2',\n ],\n [\n '4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c',\n '17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6',\n ],\n [\n 'fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6',\n '6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f',\n ],\n [\n '76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39',\n 'c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01',\n ],\n [\n 'c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891',\n '893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3',\n ],\n [\n 'd895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b',\n 'febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f',\n ],\n [\n 'b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03',\n '2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7',\n ],\n [\n 'e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d',\n 'eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78',\n ],\n [\n 'a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070',\n '7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1',\n ],\n [\n '90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4',\n 'e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150',\n ],\n [\n '8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da',\n '662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82',\n ],\n [\n 'e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11',\n '1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc',\n ],\n [\n '8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e',\n 'efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b',\n ],\n [\n 'e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41',\n '2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51',\n ],\n [\n 'b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef',\n '67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45',\n ],\n [\n 'd68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8',\n 'db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120',\n ],\n [\n '324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d',\n '648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84',\n ],\n [\n '4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96',\n '35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d',\n ],\n [\n '9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd',\n 'ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d',\n ],\n [\n '6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5',\n '9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8',\n ],\n [\n 'a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266',\n '40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8',\n ],\n [\n '7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71',\n '34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac',\n ],\n [\n '928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac',\n 'c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f',\n ],\n [\n '85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751',\n '1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962',\n ],\n [\n 'ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e',\n '493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907',\n ],\n [\n '827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241',\n 'c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec',\n ],\n [\n 'eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3',\n 'be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d',\n ],\n [\n 'e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f',\n '4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414',\n ],\n [\n '1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19',\n 'aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd',\n ],\n [\n '146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be',\n 'b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0',\n ],\n [\n 'fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9',\n '6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811',\n ],\n [\n 'da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2',\n '8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1',\n ],\n [\n 'a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13',\n '7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c',\n ],\n [\n '174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c',\n 'ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73',\n ],\n [\n '959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba',\n '2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd',\n ],\n [\n 'd2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151',\n 'e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405',\n ],\n [\n '64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073',\n 'd99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589',\n ],\n [\n '8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458',\n '38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e',\n ],\n [\n '13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b',\n '69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27',\n ],\n [\n 'bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366',\n 'd3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1',\n ],\n [\n '8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa',\n '40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482',\n ],\n [\n '8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0',\n '620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945',\n ],\n [\n 'dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787',\n '7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573',\n ],\n [\n 'f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e',\n 'ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82',\n ],\n ],\n },\n naf: {\n wnd: 7,\n points: [\n [\n 'f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9',\n '388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672',\n ],\n [\n '2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4',\n 'd8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6',\n ],\n [\n '5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc',\n '6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da',\n ],\n [\n 'acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe',\n 'cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37',\n ],\n [\n '774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb',\n 'd984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b',\n ],\n [\n 'f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8',\n 'ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81',\n ],\n [\n 'd7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e',\n '581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58',\n ],\n [\n 'defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34',\n '4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77',\n ],\n [\n '2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c',\n '85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a',\n ],\n [\n '352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5',\n '321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c',\n ],\n [\n '2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f',\n '2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67',\n ],\n [\n '9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714',\n '73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402',\n ],\n [\n 'daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729',\n 'a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55',\n ],\n [\n 'c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db',\n '2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482',\n ],\n [\n '6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4',\n 'e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82',\n ],\n [\n '1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5',\n 'b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396',\n ],\n [\n '605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479',\n '2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49',\n ],\n [\n '62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d',\n '80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf',\n ],\n [\n '80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f',\n '1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a',\n ],\n [\n '7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb',\n 'd0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7',\n ],\n [\n 'd528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9',\n 'eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933',\n ],\n [\n '49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963',\n '758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a',\n ],\n [\n '77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74',\n '958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6',\n ],\n [\n 'f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530',\n 'e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37',\n ],\n [\n '463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b',\n '5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e',\n ],\n [\n 'f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247',\n 'cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6',\n ],\n [\n 'caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1',\n 'cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476',\n ],\n [\n '2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120',\n '4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40',\n ],\n [\n '7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435',\n '91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61',\n ],\n [\n '754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18',\n '673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683',\n ],\n [\n 'e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8',\n '59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5',\n ],\n [\n '186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb',\n '3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b',\n ],\n [\n 'df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f',\n '55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417',\n ],\n [\n '5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143',\n 'efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868',\n ],\n [\n '290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba',\n 'e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a',\n ],\n [\n 'af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45',\n 'f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6',\n ],\n [\n '766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a',\n '744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996',\n ],\n [\n '59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e',\n 'c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e',\n ],\n [\n 'f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8',\n 'e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d',\n ],\n [\n '7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c',\n '30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2',\n ],\n [\n '948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519',\n 'e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e',\n ],\n [\n '7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab',\n '100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437',\n ],\n [\n '3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca',\n 'ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311',\n ],\n [\n 'd3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf',\n '8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4',\n ],\n [\n '1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610',\n '68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575',\n ],\n [\n '733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4',\n 'f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d',\n ],\n [\n '15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c',\n 'd56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d',\n ],\n [\n 'a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940',\n 'edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629',\n ],\n [\n 'e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980',\n 'a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06',\n ],\n [\n '311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3',\n '66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374',\n ],\n [\n '34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf',\n '9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee',\n ],\n [\n 'f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63',\n '4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1',\n ],\n [\n 'd7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448',\n 'fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b',\n ],\n [\n '32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf',\n '5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661',\n ],\n [\n '7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5',\n '8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6',\n ],\n [\n 'ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6',\n '8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e',\n ],\n [\n '16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5',\n '5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d',\n ],\n [\n 'eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99',\n 'f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc',\n ],\n [\n '78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51',\n 'f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4',\n ],\n [\n '494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5',\n '42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c',\n ],\n [\n 'a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5',\n '204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b',\n ],\n [\n 'c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997',\n '4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913',\n ],\n [\n '841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881',\n '73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154',\n ],\n [\n '5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5',\n '39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865',\n ],\n [\n '36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66',\n 'd2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc',\n ],\n [\n '336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726',\n 'ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224',\n ],\n [\n '8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede',\n '6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e',\n ],\n [\n '1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94',\n '60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6',\n ],\n [\n '85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31',\n '3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511',\n ],\n [\n '29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51',\n 'b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b',\n ],\n [\n 'a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252',\n 'ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2',\n ],\n [\n '4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5',\n 'cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c',\n ],\n [\n 'd24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b',\n '6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3',\n ],\n [\n 'ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4',\n '322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d',\n ],\n [\n 'af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f',\n '6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700',\n ],\n [\n 'e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889',\n '2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4',\n ],\n [\n '591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246',\n 'b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196',\n ],\n [\n '11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984',\n '998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4',\n ],\n [\n '3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a',\n 'b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257',\n ],\n [\n 'cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030',\n 'bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13',\n ],\n [\n 'c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197',\n '6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096',\n ],\n [\n 'c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593',\n 'c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38',\n ],\n [\n 'a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef',\n '21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f',\n ],\n [\n '347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38',\n '60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448',\n ],\n [\n 'da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a',\n '49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a',\n ],\n [\n 'c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111',\n '5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4',\n ],\n [\n '4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502',\n '7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437',\n ],\n [\n '3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea',\n 'be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7',\n ],\n [\n 'cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26',\n '8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d',\n ],\n [\n 'b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986',\n '39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a',\n ],\n [\n 'd4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e',\n '62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54',\n ],\n [\n '48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4',\n '25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77',\n ],\n [\n 'dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda',\n 'ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517',\n ],\n [\n '6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859',\n 'cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10',\n ],\n [\n 'e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f',\n 'f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125',\n ],\n [\n 'eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c',\n '6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e',\n ],\n [\n '13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942',\n 'fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1',\n ],\n [\n 'ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a',\n '1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2',\n ],\n [\n 'b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80',\n '5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423',\n ],\n [\n 'ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d',\n '438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8',\n ],\n [\n '8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1',\n 'cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758',\n ],\n [\n '52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63',\n 'c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375',\n ],\n [\n 'e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352',\n '6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d',\n ],\n [\n '7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193',\n 'ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec',\n ],\n [\n '5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00',\n '9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0',\n ],\n [\n '32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58',\n 'ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c',\n ],\n [\n 'e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7',\n 'd3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4',\n ],\n [\n '8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8',\n 'c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f',\n ],\n [\n '4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e',\n '67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649',\n ],\n [\n '3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d',\n 'cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826',\n ],\n [\n '674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b',\n '299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5',\n ],\n [\n 'd32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f',\n 'f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87',\n ],\n [\n '30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6',\n '462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b',\n ],\n [\n 'be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297',\n '62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc',\n ],\n [\n '93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a',\n '7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c',\n ],\n [\n 'b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c',\n 'ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f',\n ],\n [\n 'd5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52',\n '4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a',\n ],\n [\n 'd3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb',\n 'bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46',\n ],\n [\n '463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065',\n 'bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f',\n ],\n [\n '7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917',\n '603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03',\n ],\n [\n '74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9',\n 'cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08',\n ],\n [\n '30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3',\n '553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8',\n ],\n [\n '9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57',\n '712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373',\n ],\n [\n '176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66',\n 'ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3',\n ],\n [\n '75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8',\n '9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8',\n ],\n [\n '809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721',\n '9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1',\n ],\n [\n '1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180',\n '4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9',\n ],\n ],\n },\n};\n","'use strict';\n\nvar utils = exports;\nvar BN = require('bn.js');\nvar minAssert = require('minimalistic-assert');\nvar minUtils = require('minimalistic-crypto-utils');\n\nutils.assert = minAssert;\nutils.toArray = minUtils.toArray;\nutils.zero2 = minUtils.zero2;\nutils.toHex = minUtils.toHex;\nutils.encode = minUtils.encode;\n\n// Represent num in a w-NAF form\nfunction getNAF(num, w, bits) {\n var naf = new Array(Math.max(num.bitLength(), bits) + 1);\n var i;\n for (i = 0; i < naf.length; i += 1) {\n naf[i] = 0;\n }\n\n var ws = 1 << (w + 1);\n var k = num.clone();\n\n for (i = 0; i < naf.length; i++) {\n var z;\n var mod = k.andln(ws - 1);\n if (k.isOdd()) {\n if (mod > (ws >> 1) - 1)\n z = (ws >> 1) - mod;\n else\n z = mod;\n k.isubn(z);\n } else {\n z = 0;\n }\n\n naf[i] = z;\n k.iushrn(1);\n }\n\n return naf;\n}\nutils.getNAF = getNAF;\n\n// Represent k1, k2 in a Joint Sparse Form\nfunction getJSF(k1, k2) {\n var jsf = [\n [],\n [],\n ];\n\n k1 = k1.clone();\n k2 = k2.clone();\n var d1 = 0;\n var d2 = 0;\n var m8;\n while (k1.cmpn(-d1) > 0 || k2.cmpn(-d2) > 0) {\n // First phase\n var m14 = (k1.andln(3) + d1) & 3;\n var m24 = (k2.andln(3) + d2) & 3;\n if (m14 === 3)\n m14 = -1;\n if (m24 === 3)\n m24 = -1;\n var u1;\n if ((m14 & 1) === 0) {\n u1 = 0;\n } else {\n m8 = (k1.andln(7) + d1) & 7;\n if ((m8 === 3 || m8 === 5) && m24 === 2)\n u1 = -m14;\n else\n u1 = m14;\n }\n jsf[0].push(u1);\n\n var u2;\n if ((m24 & 1) === 0) {\n u2 = 0;\n } else {\n m8 = (k2.andln(7) + d2) & 7;\n if ((m8 === 3 || m8 === 5) && m14 === 2)\n u2 = -m24;\n else\n u2 = m24;\n }\n jsf[1].push(u2);\n\n // Second phase\n if (2 * d1 === u1 + 1)\n d1 = 1 - d1;\n if (2 * d2 === u2 + 1)\n d2 = 1 - d2;\n k1.iushrn(1);\n k2.iushrn(1);\n }\n\n return jsf;\n}\nutils.getJSF = getJSF;\n\nfunction cachedProperty(obj, name, computer) {\n var key = '_' + name;\n obj.prototype[name] = function cachedProperty() {\n return this[key] !== undefined ? this[key] :\n this[key] = computer.call(this);\n };\n}\nutils.cachedProperty = cachedProperty;\n\nfunction parseBytes(bytes) {\n return typeof bytes === 'string' ? utils.toArray(bytes, 'hex') :\n bytes;\n}\nutils.parseBytes = parseBytes;\n\nfunction intFromLE(bytes) {\n return new BN(bytes, 'hex', 'le');\n}\nutils.intFromLE = intFromLE;\n\n","(function (module, exports) {\n 'use strict';\n\n // Utils\n function assert (val, msg) {\n if (!val) throw new Error(msg || 'Assertion failed');\n }\n\n // Could use `inherits` module, but don't want to move from single file\n // architecture yet.\n function inherits (ctor, superCtor) {\n ctor.super_ = superCtor;\n var TempCtor = function () {};\n TempCtor.prototype = superCtor.prototype;\n ctor.prototype = new TempCtor();\n ctor.prototype.constructor = ctor;\n }\n\n // BN\n\n function BN (number, base, endian) {\n if (BN.isBN(number)) {\n return number;\n }\n\n this.negative = 0;\n this.words = null;\n this.length = 0;\n\n // Reduction context\n this.red = null;\n\n if (number !== null) {\n if (base === 'le' || base === 'be') {\n endian = base;\n base = 10;\n }\n\n this._init(number || 0, base || 10, endian || 'be');\n }\n }\n if (typeof module === 'object') {\n module.exports = BN;\n } else {\n exports.BN = BN;\n }\n\n BN.BN = BN;\n BN.wordSize = 26;\n\n var Buffer;\n try {\n if (typeof window !== 'undefined' && typeof window.Buffer !== 'undefined') {\n Buffer = window.Buffer;\n } else {\n Buffer = require('buffer').Buffer;\n }\n } catch (e) {\n }\n\n BN.isBN = function isBN (num) {\n if (num instanceof BN) {\n return true;\n }\n\n return num !== null && typeof num === 'object' &&\n num.constructor.wordSize === BN.wordSize && Array.isArray(num.words);\n };\n\n BN.max = function max (left, right) {\n if (left.cmp(right) > 0) return left;\n return right;\n };\n\n BN.min = function min (left, right) {\n if (left.cmp(right) < 0) return left;\n return right;\n };\n\n BN.prototype._init = function init (number, base, endian) {\n if (typeof number === 'number') {\n return this._initNumber(number, base, endian);\n }\n\n if (typeof number === 'object') {\n return this._initArray(number, base, endian);\n }\n\n if (base === 'hex') {\n base = 16;\n }\n assert(base === (base | 0) && base >= 2 && base <= 36);\n\n number = number.toString().replace(/\\s+/g, '');\n var start = 0;\n if (number[0] === '-') {\n start++;\n this.negative = 1;\n }\n\n if (start < number.length) {\n if (base === 16) {\n this._parseHex(number, start, endian);\n } else {\n this._parseBase(number, base, start);\n if (endian === 'le') {\n this._initArray(this.toArray(), base, endian);\n }\n }\n }\n };\n\n BN.prototype._initNumber = function _initNumber (number, base, endian) {\n if (number < 0) {\n this.negative = 1;\n number = -number;\n }\n if (number < 0x4000000) {\n this.words = [ number & 0x3ffffff ];\n this.length = 1;\n } else if (number < 0x10000000000000) {\n this.words = [\n number & 0x3ffffff,\n (number / 0x4000000) & 0x3ffffff\n ];\n this.length = 2;\n } else {\n assert(number < 0x20000000000000); // 2 ^ 53 (unsafe)\n this.words = [\n number & 0x3ffffff,\n (number / 0x4000000) & 0x3ffffff,\n 1\n ];\n this.length = 3;\n }\n\n if (endian !== 'le') return;\n\n // Reverse the bytes\n this._initArray(this.toArray(), base, endian);\n };\n\n BN.prototype._initArray = function _initArray (number, base, endian) {\n // Perhaps a Uint8Array\n assert(typeof number.length === 'number');\n if (number.length <= 0) {\n this.words = [ 0 ];\n this.length = 1;\n return this;\n }\n\n this.length = Math.ceil(number.length / 3);\n this.words = new Array(this.length);\n for (var i = 0; i < this.length; i++) {\n this.words[i] = 0;\n }\n\n var j, w;\n var off = 0;\n if (endian === 'be') {\n for (i = number.length - 1, j = 0; i >= 0; i -= 3) {\n w = number[i] | (number[i - 1] << 8) | (number[i - 2] << 16);\n this.words[j] |= (w << off) & 0x3ffffff;\n this.words[j + 1] = (w >>> (26 - off)) & 0x3ffffff;\n off += 24;\n if (off >= 26) {\n off -= 26;\n j++;\n }\n }\n } else if (endian === 'le') {\n for (i = 0, j = 0; i < number.length; i += 3) {\n w = number[i] | (number[i + 1] << 8) | (number[i + 2] << 16);\n this.words[j] |= (w << off) & 0x3ffffff;\n this.words[j + 1] = (w >>> (26 - off)) & 0x3ffffff;\n off += 24;\n if (off >= 26) {\n off -= 26;\n j++;\n }\n }\n }\n return this.strip();\n };\n\n function parseHex4Bits (string, index) {\n var c = string.charCodeAt(index);\n // 'A' - 'F'\n if (c >= 65 && c <= 70) {\n return c - 55;\n // 'a' - 'f'\n } else if (c >= 97 && c <= 102) {\n return c - 87;\n // '0' - '9'\n } else {\n return (c - 48) & 0xf;\n }\n }\n\n function parseHexByte (string, lowerBound, index) {\n var r = parseHex4Bits(string, index);\n if (index - 1 >= lowerBound) {\n r |= parseHex4Bits(string, index - 1) << 4;\n }\n return r;\n }\n\n BN.prototype._parseHex = function _parseHex (number, start, endian) {\n // Create possibly bigger array to ensure that it fits the number\n this.length = Math.ceil((number.length - start) / 6);\n this.words = new Array(this.length);\n for (var i = 0; i < this.length; i++) {\n this.words[i] = 0;\n }\n\n // 24-bits chunks\n var off = 0;\n var j = 0;\n\n var w;\n if (endian === 'be') {\n for (i = number.length - 1; i >= start; i -= 2) {\n w = parseHexByte(number, start, i) << off;\n this.words[j] |= w & 0x3ffffff;\n if (off >= 18) {\n off -= 18;\n j += 1;\n this.words[j] |= w >>> 26;\n } else {\n off += 8;\n }\n }\n } else {\n var parseLength = number.length - start;\n for (i = parseLength % 2 === 0 ? start + 1 : start; i < number.length; i += 2) {\n w = parseHexByte(number, start, i) << off;\n this.words[j] |= w & 0x3ffffff;\n if (off >= 18) {\n off -= 18;\n j += 1;\n this.words[j] |= w >>> 26;\n } else {\n off += 8;\n }\n }\n }\n\n this.strip();\n };\n\n function parseBase (str, start, end, mul) {\n var r = 0;\n var len = Math.min(str.length, end);\n for (var i = start; i < len; i++) {\n var c = str.charCodeAt(i) - 48;\n\n r *= mul;\n\n // 'a'\n if (c >= 49) {\n r += c - 49 + 0xa;\n\n // 'A'\n } else if (c >= 17) {\n r += c - 17 + 0xa;\n\n // '0' - '9'\n } else {\n r += c;\n }\n }\n return r;\n }\n\n BN.prototype._parseBase = function _parseBase (number, base, start) {\n // Initialize as zero\n this.words = [ 0 ];\n this.length = 1;\n\n // Find length of limb in base\n for (var limbLen = 0, limbPow = 1; limbPow <= 0x3ffffff; limbPow *= base) {\n limbLen++;\n }\n limbLen--;\n limbPow = (limbPow / base) | 0;\n\n var total = number.length - start;\n var mod = total % limbLen;\n var end = Math.min(total, total - mod) + start;\n\n var word = 0;\n for (var i = start; i < end; i += limbLen) {\n word = parseBase(number, i, i + limbLen, base);\n\n this.imuln(limbPow);\n if (this.words[0] + word < 0x4000000) {\n this.words[0] += word;\n } else {\n this._iaddn(word);\n }\n }\n\n if (mod !== 0) {\n var pow = 1;\n word = parseBase(number, i, number.length, base);\n\n for (i = 0; i < mod; i++) {\n pow *= base;\n }\n\n this.imuln(pow);\n if (this.words[0] + word < 0x4000000) {\n this.words[0] += word;\n } else {\n this._iaddn(word);\n }\n }\n\n this.strip();\n };\n\n BN.prototype.copy = function copy (dest) {\n dest.words = new Array(this.length);\n for (var i = 0; i < this.length; i++) {\n dest.words[i] = this.words[i];\n }\n dest.length = this.length;\n dest.negative = this.negative;\n dest.red = this.red;\n };\n\n BN.prototype.clone = function clone () {\n var r = new BN(null);\n this.copy(r);\n return r;\n };\n\n BN.prototype._expand = function _expand (size) {\n while (this.length < size) {\n this.words[this.length++] = 0;\n }\n return this;\n };\n\n // Remove leading `0` from `this`\n BN.prototype.strip = function strip () {\n while (this.length > 1 && this.words[this.length - 1] === 0) {\n this.length--;\n }\n return this._normSign();\n };\n\n BN.prototype._normSign = function _normSign () {\n // -0 = 0\n if (this.length === 1 && this.words[0] === 0) {\n this.negative = 0;\n }\n return this;\n };\n\n BN.prototype.inspect = function inspect () {\n return (this.red ? '';\n };\n\n /*\n\n var zeros = [];\n var groupSizes = [];\n var groupBases = [];\n\n var s = '';\n var i = -1;\n while (++i < BN.wordSize) {\n zeros[i] = s;\n s += '0';\n }\n groupSizes[0] = 0;\n groupSizes[1] = 0;\n groupBases[0] = 0;\n groupBases[1] = 0;\n var base = 2 - 1;\n while (++base < 36 + 1) {\n var groupSize = 0;\n var groupBase = 1;\n while (groupBase < (1 << BN.wordSize) / base) {\n groupBase *= base;\n groupSize += 1;\n }\n groupSizes[base] = groupSize;\n groupBases[base] = groupBase;\n }\n\n */\n\n var zeros = [\n '',\n '0',\n '00',\n '000',\n '0000',\n '00000',\n '000000',\n '0000000',\n '00000000',\n '000000000',\n '0000000000',\n '00000000000',\n '000000000000',\n '0000000000000',\n '00000000000000',\n '000000000000000',\n '0000000000000000',\n '00000000000000000',\n '000000000000000000',\n '0000000000000000000',\n '00000000000000000000',\n '000000000000000000000',\n '0000000000000000000000',\n '00000000000000000000000',\n '000000000000000000000000',\n '0000000000000000000000000'\n ];\n\n var groupSizes = [\n 0, 0,\n 25, 16, 12, 11, 10, 9, 8,\n 8, 7, 7, 7, 7, 6, 6,\n 6, 6, 6, 6, 6, 5, 5,\n 5, 5, 5, 5, 5, 5, 5,\n 5, 5, 5, 5, 5, 5, 5\n ];\n\n var groupBases = [\n 0, 0,\n 33554432, 43046721, 16777216, 48828125, 60466176, 40353607, 16777216,\n 43046721, 10000000, 19487171, 35831808, 62748517, 7529536, 11390625,\n 16777216, 24137569, 34012224, 47045881, 64000000, 4084101, 5153632,\n 6436343, 7962624, 9765625, 11881376, 14348907, 17210368, 20511149,\n 24300000, 28629151, 33554432, 39135393, 45435424, 52521875, 60466176\n ];\n\n BN.prototype.toString = function toString (base, padding) {\n base = base || 10;\n padding = padding | 0 || 1;\n\n var out;\n if (base === 16 || base === 'hex') {\n out = '';\n var off = 0;\n var carry = 0;\n for (var i = 0; i < this.length; i++) {\n var w = this.words[i];\n var word = (((w << off) | carry) & 0xffffff).toString(16);\n carry = (w >>> (24 - off)) & 0xffffff;\n if (carry !== 0 || i !== this.length - 1) {\n out = zeros[6 - word.length] + word + out;\n } else {\n out = word + out;\n }\n off += 2;\n if (off >= 26) {\n off -= 26;\n i--;\n }\n }\n if (carry !== 0) {\n out = carry.toString(16) + out;\n }\n while (out.length % padding !== 0) {\n out = '0' + out;\n }\n if (this.negative !== 0) {\n out = '-' + out;\n }\n return out;\n }\n\n if (base === (base | 0) && base >= 2 && base <= 36) {\n // var groupSize = Math.floor(BN.wordSize * Math.LN2 / Math.log(base));\n var groupSize = groupSizes[base];\n // var groupBase = Math.pow(base, groupSize);\n var groupBase = groupBases[base];\n out = '';\n var c = this.clone();\n c.negative = 0;\n while (!c.isZero()) {\n var r = c.modn(groupBase).toString(base);\n c = c.idivn(groupBase);\n\n if (!c.isZero()) {\n out = zeros[groupSize - r.length] + r + out;\n } else {\n out = r + out;\n }\n }\n if (this.isZero()) {\n out = '0' + out;\n }\n while (out.length % padding !== 0) {\n out = '0' + out;\n }\n if (this.negative !== 0) {\n out = '-' + out;\n }\n return out;\n }\n\n assert(false, 'Base should be between 2 and 36');\n };\n\n BN.prototype.toNumber = function toNumber () {\n var ret = this.words[0];\n if (this.length === 2) {\n ret += this.words[1] * 0x4000000;\n } else if (this.length === 3 && this.words[2] === 0x01) {\n // NOTE: at this stage it is known that the top bit is set\n ret += 0x10000000000000 + (this.words[1] * 0x4000000);\n } else if (this.length > 2) {\n assert(false, 'Number can only safely store up to 53 bits');\n }\n return (this.negative !== 0) ? -ret : ret;\n };\n\n BN.prototype.toJSON = function toJSON () {\n return this.toString(16);\n };\n\n BN.prototype.toBuffer = function toBuffer (endian, length) {\n assert(typeof Buffer !== 'undefined');\n return this.toArrayLike(Buffer, endian, length);\n };\n\n BN.prototype.toArray = function toArray (endian, length) {\n return this.toArrayLike(Array, endian, length);\n };\n\n BN.prototype.toArrayLike = function toArrayLike (ArrayType, endian, length) {\n var byteLength = this.byteLength();\n var reqLength = length || Math.max(1, byteLength);\n assert(byteLength <= reqLength, 'byte array longer than desired length');\n assert(reqLength > 0, 'Requested array length <= 0');\n\n this.strip();\n var littleEndian = endian === 'le';\n var res = new ArrayType(reqLength);\n\n var b, i;\n var q = this.clone();\n if (!littleEndian) {\n // Assume big-endian\n for (i = 0; i < reqLength - byteLength; i++) {\n res[i] = 0;\n }\n\n for (i = 0; !q.isZero(); i++) {\n b = q.andln(0xff);\n q.iushrn(8);\n\n res[reqLength - i - 1] = b;\n }\n } else {\n for (i = 0; !q.isZero(); i++) {\n b = q.andln(0xff);\n q.iushrn(8);\n\n res[i] = b;\n }\n\n for (; i < reqLength; i++) {\n res[i] = 0;\n }\n }\n\n return res;\n };\n\n if (Math.clz32) {\n BN.prototype._countBits = function _countBits (w) {\n return 32 - Math.clz32(w);\n };\n } else {\n BN.prototype._countBits = function _countBits (w) {\n var t = w;\n var r = 0;\n if (t >= 0x1000) {\n r += 13;\n t >>>= 13;\n }\n if (t >= 0x40) {\n r += 7;\n t >>>= 7;\n }\n if (t >= 0x8) {\n r += 4;\n t >>>= 4;\n }\n if (t >= 0x02) {\n r += 2;\n t >>>= 2;\n }\n return r + t;\n };\n }\n\n BN.prototype._zeroBits = function _zeroBits (w) {\n // Short-cut\n if (w === 0) return 26;\n\n var t = w;\n var r = 0;\n if ((t & 0x1fff) === 0) {\n r += 13;\n t >>>= 13;\n }\n if ((t & 0x7f) === 0) {\n r += 7;\n t >>>= 7;\n }\n if ((t & 0xf) === 0) {\n r += 4;\n t >>>= 4;\n }\n if ((t & 0x3) === 0) {\n r += 2;\n t >>>= 2;\n }\n if ((t & 0x1) === 0) {\n r++;\n }\n return r;\n };\n\n // Return number of used bits in a BN\n BN.prototype.bitLength = function bitLength () {\n var w = this.words[this.length - 1];\n var hi = this._countBits(w);\n return (this.length - 1) * 26 + hi;\n };\n\n function toBitArray (num) {\n var w = new Array(num.bitLength());\n\n for (var bit = 0; bit < w.length; bit++) {\n var off = (bit / 26) | 0;\n var wbit = bit % 26;\n\n w[bit] = (num.words[off] & (1 << wbit)) >>> wbit;\n }\n\n return w;\n }\n\n // Number of trailing zero bits\n BN.prototype.zeroBits = function zeroBits () {\n if (this.isZero()) return 0;\n\n var r = 0;\n for (var i = 0; i < this.length; i++) {\n var b = this._zeroBits(this.words[i]);\n r += b;\n if (b !== 26) break;\n }\n return r;\n };\n\n BN.prototype.byteLength = function byteLength () {\n return Math.ceil(this.bitLength() / 8);\n };\n\n BN.prototype.toTwos = function toTwos (width) {\n if (this.negative !== 0) {\n return this.abs().inotn(width).iaddn(1);\n }\n return this.clone();\n };\n\n BN.prototype.fromTwos = function fromTwos (width) {\n if (this.testn(width - 1)) {\n return this.notn(width).iaddn(1).ineg();\n }\n return this.clone();\n };\n\n BN.prototype.isNeg = function isNeg () {\n return this.negative !== 0;\n };\n\n // Return negative clone of `this`\n BN.prototype.neg = function neg () {\n return this.clone().ineg();\n };\n\n BN.prototype.ineg = function ineg () {\n if (!this.isZero()) {\n this.negative ^= 1;\n }\n\n return this;\n };\n\n // Or `num` with `this` in-place\n BN.prototype.iuor = function iuor (num) {\n while (this.length < num.length) {\n this.words[this.length++] = 0;\n }\n\n for (var i = 0; i < num.length; i++) {\n this.words[i] = this.words[i] | num.words[i];\n }\n\n return this.strip();\n };\n\n BN.prototype.ior = function ior (num) {\n assert((this.negative | num.negative) === 0);\n return this.iuor(num);\n };\n\n // Or `num` with `this`\n BN.prototype.or = function or (num) {\n if (this.length > num.length) return this.clone().ior(num);\n return num.clone().ior(this);\n };\n\n BN.prototype.uor = function uor (num) {\n if (this.length > num.length) return this.clone().iuor(num);\n return num.clone().iuor(this);\n };\n\n // And `num` with `this` in-place\n BN.prototype.iuand = function iuand (num) {\n // b = min-length(num, this)\n var b;\n if (this.length > num.length) {\n b = num;\n } else {\n b = this;\n }\n\n for (var i = 0; i < b.length; i++) {\n this.words[i] = this.words[i] & num.words[i];\n }\n\n this.length = b.length;\n\n return this.strip();\n };\n\n BN.prototype.iand = function iand (num) {\n assert((this.negative | num.negative) === 0);\n return this.iuand(num);\n };\n\n // And `num` with `this`\n BN.prototype.and = function and (num) {\n if (this.length > num.length) return this.clone().iand(num);\n return num.clone().iand(this);\n };\n\n BN.prototype.uand = function uand (num) {\n if (this.length > num.length) return this.clone().iuand(num);\n return num.clone().iuand(this);\n };\n\n // Xor `num` with `this` in-place\n BN.prototype.iuxor = function iuxor (num) {\n // a.length > b.length\n var a;\n var b;\n if (this.length > num.length) {\n a = this;\n b = num;\n } else {\n a = num;\n b = this;\n }\n\n for (var i = 0; i < b.length; i++) {\n this.words[i] = a.words[i] ^ b.words[i];\n }\n\n if (this !== a) {\n for (; i < a.length; i++) {\n this.words[i] = a.words[i];\n }\n }\n\n this.length = a.length;\n\n return this.strip();\n };\n\n BN.prototype.ixor = function ixor (num) {\n assert((this.negative | num.negative) === 0);\n return this.iuxor(num);\n };\n\n // Xor `num` with `this`\n BN.prototype.xor = function xor (num) {\n if (this.length > num.length) return this.clone().ixor(num);\n return num.clone().ixor(this);\n };\n\n BN.prototype.uxor = function uxor (num) {\n if (this.length > num.length) return this.clone().iuxor(num);\n return num.clone().iuxor(this);\n };\n\n // Not ``this`` with ``width`` bitwidth\n BN.prototype.inotn = function inotn (width) {\n assert(typeof width === 'number' && width >= 0);\n\n var bytesNeeded = Math.ceil(width / 26) | 0;\n var bitsLeft = width % 26;\n\n // Extend the buffer with leading zeroes\n this._expand(bytesNeeded);\n\n if (bitsLeft > 0) {\n bytesNeeded--;\n }\n\n // Handle complete words\n for (var i = 0; i < bytesNeeded; i++) {\n this.words[i] = ~this.words[i] & 0x3ffffff;\n }\n\n // Handle the residue\n if (bitsLeft > 0) {\n this.words[i] = ~this.words[i] & (0x3ffffff >> (26 - bitsLeft));\n }\n\n // And remove leading zeroes\n return this.strip();\n };\n\n BN.prototype.notn = function notn (width) {\n return this.clone().inotn(width);\n };\n\n // Set `bit` of `this`\n BN.prototype.setn = function setn (bit, val) {\n assert(typeof bit === 'number' && bit >= 0);\n\n var off = (bit / 26) | 0;\n var wbit = bit % 26;\n\n this._expand(off + 1);\n\n if (val) {\n this.words[off] = this.words[off] | (1 << wbit);\n } else {\n this.words[off] = this.words[off] & ~(1 << wbit);\n }\n\n return this.strip();\n };\n\n // Add `num` to `this` in-place\n BN.prototype.iadd = function iadd (num) {\n var r;\n\n // negative + positive\n if (this.negative !== 0 && num.negative === 0) {\n this.negative = 0;\n r = this.isub(num);\n this.negative ^= 1;\n return this._normSign();\n\n // positive + negative\n } else if (this.negative === 0 && num.negative !== 0) {\n num.negative = 0;\n r = this.isub(num);\n num.negative = 1;\n return r._normSign();\n }\n\n // a.length > b.length\n var a, b;\n if (this.length > num.length) {\n a = this;\n b = num;\n } else {\n a = num;\n b = this;\n }\n\n var carry = 0;\n for (var i = 0; i < b.length; i++) {\n r = (a.words[i] | 0) + (b.words[i] | 0) + carry;\n this.words[i] = r & 0x3ffffff;\n carry = r >>> 26;\n }\n for (; carry !== 0 && i < a.length; i++) {\n r = (a.words[i] | 0) + carry;\n this.words[i] = r & 0x3ffffff;\n carry = r >>> 26;\n }\n\n this.length = a.length;\n if (carry !== 0) {\n this.words[this.length] = carry;\n this.length++;\n // Copy the rest of the words\n } else if (a !== this) {\n for (; i < a.length; i++) {\n this.words[i] = a.words[i];\n }\n }\n\n return this;\n };\n\n // Add `num` to `this`\n BN.prototype.add = function add (num) {\n var res;\n if (num.negative !== 0 && this.negative === 0) {\n num.negative = 0;\n res = this.sub(num);\n num.negative ^= 1;\n return res;\n } else if (num.negative === 0 && this.negative !== 0) {\n this.negative = 0;\n res = num.sub(this);\n this.negative = 1;\n return res;\n }\n\n if (this.length > num.length) return this.clone().iadd(num);\n\n return num.clone().iadd(this);\n };\n\n // Subtract `num` from `this` in-place\n BN.prototype.isub = function isub (num) {\n // this - (-num) = this + num\n if (num.negative !== 0) {\n num.negative = 0;\n var r = this.iadd(num);\n num.negative = 1;\n return r._normSign();\n\n // -this - num = -(this + num)\n } else if (this.negative !== 0) {\n this.negative = 0;\n this.iadd(num);\n this.negative = 1;\n return this._normSign();\n }\n\n // At this point both numbers are positive\n var cmp = this.cmp(num);\n\n // Optimization - zeroify\n if (cmp === 0) {\n this.negative = 0;\n this.length = 1;\n this.words[0] = 0;\n return this;\n }\n\n // a > b\n var a, b;\n if (cmp > 0) {\n a = this;\n b = num;\n } else {\n a = num;\n b = this;\n }\n\n var carry = 0;\n for (var i = 0; i < b.length; i++) {\n r = (a.words[i] | 0) - (b.words[i] | 0) + carry;\n carry = r >> 26;\n this.words[i] = r & 0x3ffffff;\n }\n for (; carry !== 0 && i < a.length; i++) {\n r = (a.words[i] | 0) + carry;\n carry = r >> 26;\n this.words[i] = r & 0x3ffffff;\n }\n\n // Copy rest of the words\n if (carry === 0 && i < a.length && a !== this) {\n for (; i < a.length; i++) {\n this.words[i] = a.words[i];\n }\n }\n\n this.length = Math.max(this.length, i);\n\n if (a !== this) {\n this.negative = 1;\n }\n\n return this.strip();\n };\n\n // Subtract `num` from `this`\n BN.prototype.sub = function sub (num) {\n return this.clone().isub(num);\n };\n\n function smallMulTo (self, num, out) {\n out.negative = num.negative ^ self.negative;\n var len = (self.length + num.length) | 0;\n out.length = len;\n len = (len - 1) | 0;\n\n // Peel one iteration (compiler can't do it, because of code complexity)\n var a = self.words[0] | 0;\n var b = num.words[0] | 0;\n var r = a * b;\n\n var lo = r & 0x3ffffff;\n var carry = (r / 0x4000000) | 0;\n out.words[0] = lo;\n\n for (var k = 1; k < len; k++) {\n // Sum all words with the same `i + j = k` and accumulate `ncarry`,\n // note that ncarry could be >= 0x3ffffff\n var ncarry = carry >>> 26;\n var rword = carry & 0x3ffffff;\n var maxJ = Math.min(k, num.length - 1);\n for (var j = Math.max(0, k - self.length + 1); j <= maxJ; j++) {\n var i = (k - j) | 0;\n a = self.words[i] | 0;\n b = num.words[j] | 0;\n r = a * b + rword;\n ncarry += (r / 0x4000000) | 0;\n rword = r & 0x3ffffff;\n }\n out.words[k] = rword | 0;\n carry = ncarry | 0;\n }\n if (carry !== 0) {\n out.words[k] = carry | 0;\n } else {\n out.length--;\n }\n\n return out.strip();\n }\n\n // TODO(indutny): it may be reasonable to omit it for users who don't need\n // to work with 256-bit numbers, otherwise it gives 20% improvement for 256-bit\n // multiplication (like elliptic secp256k1).\n var comb10MulTo = function comb10MulTo (self, num, out) {\n var a = self.words;\n var b = num.words;\n var o = out.words;\n var c = 0;\n var lo;\n var mid;\n var hi;\n var a0 = a[0] | 0;\n var al0 = a0 & 0x1fff;\n var ah0 = a0 >>> 13;\n var a1 = a[1] | 0;\n var al1 = a1 & 0x1fff;\n var ah1 = a1 >>> 13;\n var a2 = a[2] | 0;\n var al2 = a2 & 0x1fff;\n var ah2 = a2 >>> 13;\n var a3 = a[3] | 0;\n var al3 = a3 & 0x1fff;\n var ah3 = a3 >>> 13;\n var a4 = a[4] | 0;\n var al4 = a4 & 0x1fff;\n var ah4 = a4 >>> 13;\n var a5 = a[5] | 0;\n var al5 = a5 & 0x1fff;\n var ah5 = a5 >>> 13;\n var a6 = a[6] | 0;\n var al6 = a6 & 0x1fff;\n var ah6 = a6 >>> 13;\n var a7 = a[7] | 0;\n var al7 = a7 & 0x1fff;\n var ah7 = a7 >>> 13;\n var a8 = a[8] | 0;\n var al8 = a8 & 0x1fff;\n var ah8 = a8 >>> 13;\n var a9 = a[9] | 0;\n var al9 = a9 & 0x1fff;\n var ah9 = a9 >>> 13;\n var b0 = b[0] | 0;\n var bl0 = b0 & 0x1fff;\n var bh0 = b0 >>> 13;\n var b1 = b[1] | 0;\n var bl1 = b1 & 0x1fff;\n var bh1 = b1 >>> 13;\n var b2 = b[2] | 0;\n var bl2 = b2 & 0x1fff;\n var bh2 = b2 >>> 13;\n var b3 = b[3] | 0;\n var bl3 = b3 & 0x1fff;\n var bh3 = b3 >>> 13;\n var b4 = b[4] | 0;\n var bl4 = b4 & 0x1fff;\n var bh4 = b4 >>> 13;\n var b5 = b[5] | 0;\n var bl5 = b5 & 0x1fff;\n var bh5 = b5 >>> 13;\n var b6 = b[6] | 0;\n var bl6 = b6 & 0x1fff;\n var bh6 = b6 >>> 13;\n var b7 = b[7] | 0;\n var bl7 = b7 & 0x1fff;\n var bh7 = b7 >>> 13;\n var b8 = b[8] | 0;\n var bl8 = b8 & 0x1fff;\n var bh8 = b8 >>> 13;\n var b9 = b[9] | 0;\n var bl9 = b9 & 0x1fff;\n var bh9 = b9 >>> 13;\n\n out.negative = self.negative ^ num.negative;\n out.length = 19;\n /* k = 0 */\n lo = Math.imul(al0, bl0);\n mid = Math.imul(al0, bh0);\n mid = (mid + Math.imul(ah0, bl0)) | 0;\n hi = Math.imul(ah0, bh0);\n var w0 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w0 >>> 26)) | 0;\n w0 &= 0x3ffffff;\n /* k = 1 */\n lo = Math.imul(al1, bl0);\n mid = Math.imul(al1, bh0);\n mid = (mid + Math.imul(ah1, bl0)) | 0;\n hi = Math.imul(ah1, bh0);\n lo = (lo + Math.imul(al0, bl1)) | 0;\n mid = (mid + Math.imul(al0, bh1)) | 0;\n mid = (mid + Math.imul(ah0, bl1)) | 0;\n hi = (hi + Math.imul(ah0, bh1)) | 0;\n var w1 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w1 >>> 26)) | 0;\n w1 &= 0x3ffffff;\n /* k = 2 */\n lo = Math.imul(al2, bl0);\n mid = Math.imul(al2, bh0);\n mid = (mid + Math.imul(ah2, bl0)) | 0;\n hi = Math.imul(ah2, bh0);\n lo = (lo + Math.imul(al1, bl1)) | 0;\n mid = (mid + Math.imul(al1, bh1)) | 0;\n mid = (mid + Math.imul(ah1, bl1)) | 0;\n hi = (hi + Math.imul(ah1, bh1)) | 0;\n lo = (lo + Math.imul(al0, bl2)) | 0;\n mid = (mid + Math.imul(al0, bh2)) | 0;\n mid = (mid + Math.imul(ah0, bl2)) | 0;\n hi = (hi + Math.imul(ah0, bh2)) | 0;\n var w2 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w2 >>> 26)) | 0;\n w2 &= 0x3ffffff;\n /* k = 3 */\n lo = Math.imul(al3, bl0);\n mid = Math.imul(al3, bh0);\n mid = (mid + Math.imul(ah3, bl0)) | 0;\n hi = Math.imul(ah3, bh0);\n lo = (lo + Math.imul(al2, bl1)) | 0;\n mid = (mid + Math.imul(al2, bh1)) | 0;\n mid = (mid + Math.imul(ah2, bl1)) | 0;\n hi = (hi + Math.imul(ah2, bh1)) | 0;\n lo = (lo + Math.imul(al1, bl2)) | 0;\n mid = (mid + Math.imul(al1, bh2)) | 0;\n mid = (mid + Math.imul(ah1, bl2)) | 0;\n hi = (hi + Math.imul(ah1, bh2)) | 0;\n lo = (lo + Math.imul(al0, bl3)) | 0;\n mid = (mid + Math.imul(al0, bh3)) | 0;\n mid = (mid + Math.imul(ah0, bl3)) | 0;\n hi = (hi + Math.imul(ah0, bh3)) | 0;\n var w3 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w3 >>> 26)) | 0;\n w3 &= 0x3ffffff;\n /* k = 4 */\n lo = Math.imul(al4, bl0);\n mid = Math.imul(al4, bh0);\n mid = (mid + Math.imul(ah4, bl0)) | 0;\n hi = Math.imul(ah4, bh0);\n lo = (lo + Math.imul(al3, bl1)) | 0;\n mid = (mid + Math.imul(al3, bh1)) | 0;\n mid = (mid + Math.imul(ah3, bl1)) | 0;\n hi = (hi + Math.imul(ah3, bh1)) | 0;\n lo = (lo + Math.imul(al2, bl2)) | 0;\n mid = (mid + Math.imul(al2, bh2)) | 0;\n mid = (mid + Math.imul(ah2, bl2)) | 0;\n hi = (hi + Math.imul(ah2, bh2)) | 0;\n lo = (lo + Math.imul(al1, bl3)) | 0;\n mid = (mid + Math.imul(al1, bh3)) | 0;\n mid = (mid + Math.imul(ah1, bl3)) | 0;\n hi = (hi + Math.imul(ah1, bh3)) | 0;\n lo = (lo + Math.imul(al0, bl4)) | 0;\n mid = (mid + Math.imul(al0, bh4)) | 0;\n mid = (mid + Math.imul(ah0, bl4)) | 0;\n hi = (hi + Math.imul(ah0, bh4)) | 0;\n var w4 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w4 >>> 26)) | 0;\n w4 &= 0x3ffffff;\n /* k = 5 */\n lo = Math.imul(al5, bl0);\n mid = Math.imul(al5, bh0);\n mid = (mid + Math.imul(ah5, bl0)) | 0;\n hi = Math.imul(ah5, bh0);\n lo = (lo + Math.imul(al4, bl1)) | 0;\n mid = (mid + Math.imul(al4, bh1)) | 0;\n mid = (mid + Math.imul(ah4, bl1)) | 0;\n hi = (hi + Math.imul(ah4, bh1)) | 0;\n lo = (lo + Math.imul(al3, bl2)) | 0;\n mid = (mid + Math.imul(al3, bh2)) | 0;\n mid = (mid + Math.imul(ah3, bl2)) | 0;\n hi = (hi + Math.imul(ah3, bh2)) | 0;\n lo = (lo + Math.imul(al2, bl3)) | 0;\n mid = (mid + Math.imul(al2, bh3)) | 0;\n mid = (mid + Math.imul(ah2, bl3)) | 0;\n hi = (hi + Math.imul(ah2, bh3)) | 0;\n lo = (lo + Math.imul(al1, bl4)) | 0;\n mid = (mid + Math.imul(al1, bh4)) | 0;\n mid = (mid + Math.imul(ah1, bl4)) | 0;\n hi = (hi + Math.imul(ah1, bh4)) | 0;\n lo = (lo + Math.imul(al0, bl5)) | 0;\n mid = (mid + Math.imul(al0, bh5)) | 0;\n mid = (mid + Math.imul(ah0, bl5)) | 0;\n hi = (hi + Math.imul(ah0, bh5)) | 0;\n var w5 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w5 >>> 26)) | 0;\n w5 &= 0x3ffffff;\n /* k = 6 */\n lo = Math.imul(al6, bl0);\n mid = Math.imul(al6, bh0);\n mid = (mid + Math.imul(ah6, bl0)) | 0;\n hi = Math.imul(ah6, bh0);\n lo = (lo + Math.imul(al5, bl1)) | 0;\n mid = (mid + Math.imul(al5, bh1)) | 0;\n mid = (mid + Math.imul(ah5, bl1)) | 0;\n hi = (hi + Math.imul(ah5, bh1)) | 0;\n lo = (lo + Math.imul(al4, bl2)) | 0;\n mid = (mid + Math.imul(al4, bh2)) | 0;\n mid = (mid + Math.imul(ah4, bl2)) | 0;\n hi = (hi + Math.imul(ah4, bh2)) | 0;\n lo = (lo + Math.imul(al3, bl3)) | 0;\n mid = (mid + Math.imul(al3, bh3)) | 0;\n mid = (mid + Math.imul(ah3, bl3)) | 0;\n hi = (hi + Math.imul(ah3, bh3)) | 0;\n lo = (lo + Math.imul(al2, bl4)) | 0;\n mid = (mid + Math.imul(al2, bh4)) | 0;\n mid = (mid + Math.imul(ah2, bl4)) | 0;\n hi = (hi + Math.imul(ah2, bh4)) | 0;\n lo = (lo + Math.imul(al1, bl5)) | 0;\n mid = (mid + Math.imul(al1, bh5)) | 0;\n mid = (mid + Math.imul(ah1, bl5)) | 0;\n hi = (hi + Math.imul(ah1, bh5)) | 0;\n lo = (lo + Math.imul(al0, bl6)) | 0;\n mid = (mid + Math.imul(al0, bh6)) | 0;\n mid = (mid + Math.imul(ah0, bl6)) | 0;\n hi = (hi + Math.imul(ah0, bh6)) | 0;\n var w6 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w6 >>> 26)) | 0;\n w6 &= 0x3ffffff;\n /* k = 7 */\n lo = Math.imul(al7, bl0);\n mid = Math.imul(al7, bh0);\n mid = (mid + Math.imul(ah7, bl0)) | 0;\n hi = Math.imul(ah7, bh0);\n lo = (lo + Math.imul(al6, bl1)) | 0;\n mid = (mid + Math.imul(al6, bh1)) | 0;\n mid = (mid + Math.imul(ah6, bl1)) | 0;\n hi = (hi + Math.imul(ah6, bh1)) | 0;\n lo = (lo + Math.imul(al5, bl2)) | 0;\n mid = (mid + Math.imul(al5, bh2)) | 0;\n mid = (mid + Math.imul(ah5, bl2)) | 0;\n hi = (hi + Math.imul(ah5, bh2)) | 0;\n lo = (lo + Math.imul(al4, bl3)) | 0;\n mid = (mid + Math.imul(al4, bh3)) | 0;\n mid = (mid + Math.imul(ah4, bl3)) | 0;\n hi = (hi + Math.imul(ah4, bh3)) | 0;\n lo = (lo + Math.imul(al3, bl4)) | 0;\n mid = (mid + Math.imul(al3, bh4)) | 0;\n mid = (mid + Math.imul(ah3, bl4)) | 0;\n hi = (hi + Math.imul(ah3, bh4)) | 0;\n lo = (lo + Math.imul(al2, bl5)) | 0;\n mid = (mid + Math.imul(al2, bh5)) | 0;\n mid = (mid + Math.imul(ah2, bl5)) | 0;\n hi = (hi + Math.imul(ah2, bh5)) | 0;\n lo = (lo + Math.imul(al1, bl6)) | 0;\n mid = (mid + Math.imul(al1, bh6)) | 0;\n mid = (mid + Math.imul(ah1, bl6)) | 0;\n hi = (hi + Math.imul(ah1, bh6)) | 0;\n lo = (lo + Math.imul(al0, bl7)) | 0;\n mid = (mid + Math.imul(al0, bh7)) | 0;\n mid = (mid + Math.imul(ah0, bl7)) | 0;\n hi = (hi + Math.imul(ah0, bh7)) | 0;\n var w7 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w7 >>> 26)) | 0;\n w7 &= 0x3ffffff;\n /* k = 8 */\n lo = Math.imul(al8, bl0);\n mid = Math.imul(al8, bh0);\n mid = (mid + Math.imul(ah8, bl0)) | 0;\n hi = Math.imul(ah8, bh0);\n lo = (lo + Math.imul(al7, bl1)) | 0;\n mid = (mid + Math.imul(al7, bh1)) | 0;\n mid = (mid + Math.imul(ah7, bl1)) | 0;\n hi = (hi + Math.imul(ah7, bh1)) | 0;\n lo = (lo + Math.imul(al6, bl2)) | 0;\n mid = (mid + Math.imul(al6, bh2)) | 0;\n mid = (mid + Math.imul(ah6, bl2)) | 0;\n hi = (hi + Math.imul(ah6, bh2)) | 0;\n lo = (lo + Math.imul(al5, bl3)) | 0;\n mid = (mid + Math.imul(al5, bh3)) | 0;\n mid = (mid + Math.imul(ah5, bl3)) | 0;\n hi = (hi + Math.imul(ah5, bh3)) | 0;\n lo = (lo + Math.imul(al4, bl4)) | 0;\n mid = (mid + Math.imul(al4, bh4)) | 0;\n mid = (mid + Math.imul(ah4, bl4)) | 0;\n hi = (hi + Math.imul(ah4, bh4)) | 0;\n lo = (lo + Math.imul(al3, bl5)) | 0;\n mid = (mid + Math.imul(al3, bh5)) | 0;\n mid = (mid + Math.imul(ah3, bl5)) | 0;\n hi = (hi + Math.imul(ah3, bh5)) | 0;\n lo = (lo + Math.imul(al2, bl6)) | 0;\n mid = (mid + Math.imul(al2, bh6)) | 0;\n mid = (mid + Math.imul(ah2, bl6)) | 0;\n hi = (hi + Math.imul(ah2, bh6)) | 0;\n lo = (lo + Math.imul(al1, bl7)) | 0;\n mid = (mid + Math.imul(al1, bh7)) | 0;\n mid = (mid + Math.imul(ah1, bl7)) | 0;\n hi = (hi + Math.imul(ah1, bh7)) | 0;\n lo = (lo + Math.imul(al0, bl8)) | 0;\n mid = (mid + Math.imul(al0, bh8)) | 0;\n mid = (mid + Math.imul(ah0, bl8)) | 0;\n hi = (hi + Math.imul(ah0, bh8)) | 0;\n var w8 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w8 >>> 26)) | 0;\n w8 &= 0x3ffffff;\n /* k = 9 */\n lo = Math.imul(al9, bl0);\n mid = Math.imul(al9, bh0);\n mid = (mid + Math.imul(ah9, bl0)) | 0;\n hi = Math.imul(ah9, bh0);\n lo = (lo + Math.imul(al8, bl1)) | 0;\n mid = (mid + Math.imul(al8, bh1)) | 0;\n mid = (mid + Math.imul(ah8, bl1)) | 0;\n hi = (hi + Math.imul(ah8, bh1)) | 0;\n lo = (lo + Math.imul(al7, bl2)) | 0;\n mid = (mid + Math.imul(al7, bh2)) | 0;\n mid = (mid + Math.imul(ah7, bl2)) | 0;\n hi = (hi + Math.imul(ah7, bh2)) | 0;\n lo = (lo + Math.imul(al6, bl3)) | 0;\n mid = (mid + Math.imul(al6, bh3)) | 0;\n mid = (mid + Math.imul(ah6, bl3)) | 0;\n hi = (hi + Math.imul(ah6, bh3)) | 0;\n lo = (lo + Math.imul(al5, bl4)) | 0;\n mid = (mid + Math.imul(al5, bh4)) | 0;\n mid = (mid + Math.imul(ah5, bl4)) | 0;\n hi = (hi + Math.imul(ah5, bh4)) | 0;\n lo = (lo + Math.imul(al4, bl5)) | 0;\n mid = (mid + Math.imul(al4, bh5)) | 0;\n mid = (mid + Math.imul(ah4, bl5)) | 0;\n hi = (hi + Math.imul(ah4, bh5)) | 0;\n lo = (lo + Math.imul(al3, bl6)) | 0;\n mid = (mid + Math.imul(al3, bh6)) | 0;\n mid = (mid + Math.imul(ah3, bl6)) | 0;\n hi = (hi + Math.imul(ah3, bh6)) | 0;\n lo = (lo + Math.imul(al2, bl7)) | 0;\n mid = (mid + Math.imul(al2, bh7)) | 0;\n mid = (mid + Math.imul(ah2, bl7)) | 0;\n hi = (hi + Math.imul(ah2, bh7)) | 0;\n lo = (lo + Math.imul(al1, bl8)) | 0;\n mid = (mid + Math.imul(al1, bh8)) | 0;\n mid = (mid + Math.imul(ah1, bl8)) | 0;\n hi = (hi + Math.imul(ah1, bh8)) | 0;\n lo = (lo + Math.imul(al0, bl9)) | 0;\n mid = (mid + Math.imul(al0, bh9)) | 0;\n mid = (mid + Math.imul(ah0, bl9)) | 0;\n hi = (hi + Math.imul(ah0, bh9)) | 0;\n var w9 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w9 >>> 26)) | 0;\n w9 &= 0x3ffffff;\n /* k = 10 */\n lo = Math.imul(al9, bl1);\n mid = Math.imul(al9, bh1);\n mid = (mid + Math.imul(ah9, bl1)) | 0;\n hi = Math.imul(ah9, bh1);\n lo = (lo + Math.imul(al8, bl2)) | 0;\n mid = (mid + Math.imul(al8, bh2)) | 0;\n mid = (mid + Math.imul(ah8, bl2)) | 0;\n hi = (hi + Math.imul(ah8, bh2)) | 0;\n lo = (lo + Math.imul(al7, bl3)) | 0;\n mid = (mid + Math.imul(al7, bh3)) | 0;\n mid = (mid + Math.imul(ah7, bl3)) | 0;\n hi = (hi + Math.imul(ah7, bh3)) | 0;\n lo = (lo + Math.imul(al6, bl4)) | 0;\n mid = (mid + Math.imul(al6, bh4)) | 0;\n mid = (mid + Math.imul(ah6, bl4)) | 0;\n hi = (hi + Math.imul(ah6, bh4)) | 0;\n lo = (lo + Math.imul(al5, bl5)) | 0;\n mid = (mid + Math.imul(al5, bh5)) | 0;\n mid = (mid + Math.imul(ah5, bl5)) | 0;\n hi = (hi + Math.imul(ah5, bh5)) | 0;\n lo = (lo + Math.imul(al4, bl6)) | 0;\n mid = (mid + Math.imul(al4, bh6)) | 0;\n mid = (mid + Math.imul(ah4, bl6)) | 0;\n hi = (hi + Math.imul(ah4, bh6)) | 0;\n lo = (lo + Math.imul(al3, bl7)) | 0;\n mid = (mid + Math.imul(al3, bh7)) | 0;\n mid = (mid + Math.imul(ah3, bl7)) | 0;\n hi = (hi + Math.imul(ah3, bh7)) | 0;\n lo = (lo + Math.imul(al2, bl8)) | 0;\n mid = (mid + Math.imul(al2, bh8)) | 0;\n mid = (mid + Math.imul(ah2, bl8)) | 0;\n hi = (hi + Math.imul(ah2, bh8)) | 0;\n lo = (lo + Math.imul(al1, bl9)) | 0;\n mid = (mid + Math.imul(al1, bh9)) | 0;\n mid = (mid + Math.imul(ah1, bl9)) | 0;\n hi = (hi + Math.imul(ah1, bh9)) | 0;\n var w10 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w10 >>> 26)) | 0;\n w10 &= 0x3ffffff;\n /* k = 11 */\n lo = Math.imul(al9, bl2);\n mid = Math.imul(al9, bh2);\n mid = (mid + Math.imul(ah9, bl2)) | 0;\n hi = Math.imul(ah9, bh2);\n lo = (lo + Math.imul(al8, bl3)) | 0;\n mid = (mid + Math.imul(al8, bh3)) | 0;\n mid = (mid + Math.imul(ah8, bl3)) | 0;\n hi = (hi + Math.imul(ah8, bh3)) | 0;\n lo = (lo + Math.imul(al7, bl4)) | 0;\n mid = (mid + Math.imul(al7, bh4)) | 0;\n mid = (mid + Math.imul(ah7, bl4)) | 0;\n hi = (hi + Math.imul(ah7, bh4)) | 0;\n lo = (lo + Math.imul(al6, bl5)) | 0;\n mid = (mid + Math.imul(al6, bh5)) | 0;\n mid = (mid + Math.imul(ah6, bl5)) | 0;\n hi = (hi + Math.imul(ah6, bh5)) | 0;\n lo = (lo + Math.imul(al5, bl6)) | 0;\n mid = (mid + Math.imul(al5, bh6)) | 0;\n mid = (mid + Math.imul(ah5, bl6)) | 0;\n hi = (hi + Math.imul(ah5, bh6)) | 0;\n lo = (lo + Math.imul(al4, bl7)) | 0;\n mid = (mid + Math.imul(al4, bh7)) | 0;\n mid = (mid + Math.imul(ah4, bl7)) | 0;\n hi = (hi + Math.imul(ah4, bh7)) | 0;\n lo = (lo + Math.imul(al3, bl8)) | 0;\n mid = (mid + Math.imul(al3, bh8)) | 0;\n mid = (mid + Math.imul(ah3, bl8)) | 0;\n hi = (hi + Math.imul(ah3, bh8)) | 0;\n lo = (lo + Math.imul(al2, bl9)) | 0;\n mid = (mid + Math.imul(al2, bh9)) | 0;\n mid = (mid + Math.imul(ah2, bl9)) | 0;\n hi = (hi + Math.imul(ah2, bh9)) | 0;\n var w11 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w11 >>> 26)) | 0;\n w11 &= 0x3ffffff;\n /* k = 12 */\n lo = Math.imul(al9, bl3);\n mid = Math.imul(al9, bh3);\n mid = (mid + Math.imul(ah9, bl3)) | 0;\n hi = Math.imul(ah9, bh3);\n lo = (lo + Math.imul(al8, bl4)) | 0;\n mid = (mid + Math.imul(al8, bh4)) | 0;\n mid = (mid + Math.imul(ah8, bl4)) | 0;\n hi = (hi + Math.imul(ah8, bh4)) | 0;\n lo = (lo + Math.imul(al7, bl5)) | 0;\n mid = (mid + Math.imul(al7, bh5)) | 0;\n mid = (mid + Math.imul(ah7, bl5)) | 0;\n hi = (hi + Math.imul(ah7, bh5)) | 0;\n lo = (lo + Math.imul(al6, bl6)) | 0;\n mid = (mid + Math.imul(al6, bh6)) | 0;\n mid = (mid + Math.imul(ah6, bl6)) | 0;\n hi = (hi + Math.imul(ah6, bh6)) | 0;\n lo = (lo + Math.imul(al5, bl7)) | 0;\n mid = (mid + Math.imul(al5, bh7)) | 0;\n mid = (mid + Math.imul(ah5, bl7)) | 0;\n hi = (hi + Math.imul(ah5, bh7)) | 0;\n lo = (lo + Math.imul(al4, bl8)) | 0;\n mid = (mid + Math.imul(al4, bh8)) | 0;\n mid = (mid + Math.imul(ah4, bl8)) | 0;\n hi = (hi + Math.imul(ah4, bh8)) | 0;\n lo = (lo + Math.imul(al3, bl9)) | 0;\n mid = (mid + Math.imul(al3, bh9)) | 0;\n mid = (mid + Math.imul(ah3, bl9)) | 0;\n hi = (hi + Math.imul(ah3, bh9)) | 0;\n var w12 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w12 >>> 26)) | 0;\n w12 &= 0x3ffffff;\n /* k = 13 */\n lo = Math.imul(al9, bl4);\n mid = Math.imul(al9, bh4);\n mid = (mid + Math.imul(ah9, bl4)) | 0;\n hi = Math.imul(ah9, bh4);\n lo = (lo + Math.imul(al8, bl5)) | 0;\n mid = (mid + Math.imul(al8, bh5)) | 0;\n mid = (mid + Math.imul(ah8, bl5)) | 0;\n hi = (hi + Math.imul(ah8, bh5)) | 0;\n lo = (lo + Math.imul(al7, bl6)) | 0;\n mid = (mid + Math.imul(al7, bh6)) | 0;\n mid = (mid + Math.imul(ah7, bl6)) | 0;\n hi = (hi + Math.imul(ah7, bh6)) | 0;\n lo = (lo + Math.imul(al6, bl7)) | 0;\n mid = (mid + Math.imul(al6, bh7)) | 0;\n mid = (mid + Math.imul(ah6, bl7)) | 0;\n hi = (hi + Math.imul(ah6, bh7)) | 0;\n lo = (lo + Math.imul(al5, bl8)) | 0;\n mid = (mid + Math.imul(al5, bh8)) | 0;\n mid = (mid + Math.imul(ah5, bl8)) | 0;\n hi = (hi + Math.imul(ah5, bh8)) | 0;\n lo = (lo + Math.imul(al4, bl9)) | 0;\n mid = (mid + Math.imul(al4, bh9)) | 0;\n mid = (mid + Math.imul(ah4, bl9)) | 0;\n hi = (hi + Math.imul(ah4, bh9)) | 0;\n var w13 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w13 >>> 26)) | 0;\n w13 &= 0x3ffffff;\n /* k = 14 */\n lo = Math.imul(al9, bl5);\n mid = Math.imul(al9, bh5);\n mid = (mid + Math.imul(ah9, bl5)) | 0;\n hi = Math.imul(ah9, bh5);\n lo = (lo + Math.imul(al8, bl6)) | 0;\n mid = (mid + Math.imul(al8, bh6)) | 0;\n mid = (mid + Math.imul(ah8, bl6)) | 0;\n hi = (hi + Math.imul(ah8, bh6)) | 0;\n lo = (lo + Math.imul(al7, bl7)) | 0;\n mid = (mid + Math.imul(al7, bh7)) | 0;\n mid = (mid + Math.imul(ah7, bl7)) | 0;\n hi = (hi + Math.imul(ah7, bh7)) | 0;\n lo = (lo + Math.imul(al6, bl8)) | 0;\n mid = (mid + Math.imul(al6, bh8)) | 0;\n mid = (mid + Math.imul(ah6, bl8)) | 0;\n hi = (hi + Math.imul(ah6, bh8)) | 0;\n lo = (lo + Math.imul(al5, bl9)) | 0;\n mid = (mid + Math.imul(al5, bh9)) | 0;\n mid = (mid + Math.imul(ah5, bl9)) | 0;\n hi = (hi + Math.imul(ah5, bh9)) | 0;\n var w14 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w14 >>> 26)) | 0;\n w14 &= 0x3ffffff;\n /* k = 15 */\n lo = Math.imul(al9, bl6);\n mid = Math.imul(al9, bh6);\n mid = (mid + Math.imul(ah9, bl6)) | 0;\n hi = Math.imul(ah9, bh6);\n lo = (lo + Math.imul(al8, bl7)) | 0;\n mid = (mid + Math.imul(al8, bh7)) | 0;\n mid = (mid + Math.imul(ah8, bl7)) | 0;\n hi = (hi + Math.imul(ah8, bh7)) | 0;\n lo = (lo + Math.imul(al7, bl8)) | 0;\n mid = (mid + Math.imul(al7, bh8)) | 0;\n mid = (mid + Math.imul(ah7, bl8)) | 0;\n hi = (hi + Math.imul(ah7, bh8)) | 0;\n lo = (lo + Math.imul(al6, bl9)) | 0;\n mid = (mid + Math.imul(al6, bh9)) | 0;\n mid = (mid + Math.imul(ah6, bl9)) | 0;\n hi = (hi + Math.imul(ah6, bh9)) | 0;\n var w15 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w15 >>> 26)) | 0;\n w15 &= 0x3ffffff;\n /* k = 16 */\n lo = Math.imul(al9, bl7);\n mid = Math.imul(al9, bh7);\n mid = (mid + Math.imul(ah9, bl7)) | 0;\n hi = Math.imul(ah9, bh7);\n lo = (lo + Math.imul(al8, bl8)) | 0;\n mid = (mid + Math.imul(al8, bh8)) | 0;\n mid = (mid + Math.imul(ah8, bl8)) | 0;\n hi = (hi + Math.imul(ah8, bh8)) | 0;\n lo = (lo + Math.imul(al7, bl9)) | 0;\n mid = (mid + Math.imul(al7, bh9)) | 0;\n mid = (mid + Math.imul(ah7, bl9)) | 0;\n hi = (hi + Math.imul(ah7, bh9)) | 0;\n var w16 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w16 >>> 26)) | 0;\n w16 &= 0x3ffffff;\n /* k = 17 */\n lo = Math.imul(al9, bl8);\n mid = Math.imul(al9, bh8);\n mid = (mid + Math.imul(ah9, bl8)) | 0;\n hi = Math.imul(ah9, bh8);\n lo = (lo + Math.imul(al8, bl9)) | 0;\n mid = (mid + Math.imul(al8, bh9)) | 0;\n mid = (mid + Math.imul(ah8, bl9)) | 0;\n hi = (hi + Math.imul(ah8, bh9)) | 0;\n var w17 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w17 >>> 26)) | 0;\n w17 &= 0x3ffffff;\n /* k = 18 */\n lo = Math.imul(al9, bl9);\n mid = Math.imul(al9, bh9);\n mid = (mid + Math.imul(ah9, bl9)) | 0;\n hi = Math.imul(ah9, bh9);\n var w18 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w18 >>> 26)) | 0;\n w18 &= 0x3ffffff;\n o[0] = w0;\n o[1] = w1;\n o[2] = w2;\n o[3] = w3;\n o[4] = w4;\n o[5] = w5;\n o[6] = w6;\n o[7] = w7;\n o[8] = w8;\n o[9] = w9;\n o[10] = w10;\n o[11] = w11;\n o[12] = w12;\n o[13] = w13;\n o[14] = w14;\n o[15] = w15;\n o[16] = w16;\n o[17] = w17;\n o[18] = w18;\n if (c !== 0) {\n o[19] = c;\n out.length++;\n }\n return out;\n };\n\n // Polyfill comb\n if (!Math.imul) {\n comb10MulTo = smallMulTo;\n }\n\n function bigMulTo (self, num, out) {\n out.negative = num.negative ^ self.negative;\n out.length = self.length + num.length;\n\n var carry = 0;\n var hncarry = 0;\n for (var k = 0; k < out.length - 1; k++) {\n // Sum all words with the same `i + j = k` and accumulate `ncarry`,\n // note that ncarry could be >= 0x3ffffff\n var ncarry = hncarry;\n hncarry = 0;\n var rword = carry & 0x3ffffff;\n var maxJ = Math.min(k, num.length - 1);\n for (var j = Math.max(0, k - self.length + 1); j <= maxJ; j++) {\n var i = k - j;\n var a = self.words[i] | 0;\n var b = num.words[j] | 0;\n var r = a * b;\n\n var lo = r & 0x3ffffff;\n ncarry = (ncarry + ((r / 0x4000000) | 0)) | 0;\n lo = (lo + rword) | 0;\n rword = lo & 0x3ffffff;\n ncarry = (ncarry + (lo >>> 26)) | 0;\n\n hncarry += ncarry >>> 26;\n ncarry &= 0x3ffffff;\n }\n out.words[k] = rword;\n carry = ncarry;\n ncarry = hncarry;\n }\n if (carry !== 0) {\n out.words[k] = carry;\n } else {\n out.length--;\n }\n\n return out.strip();\n }\n\n function jumboMulTo (self, num, out) {\n var fftm = new FFTM();\n return fftm.mulp(self, num, out);\n }\n\n BN.prototype.mulTo = function mulTo (num, out) {\n var res;\n var len = this.length + num.length;\n if (this.length === 10 && num.length === 10) {\n res = comb10MulTo(this, num, out);\n } else if (len < 63) {\n res = smallMulTo(this, num, out);\n } else if (len < 1024) {\n res = bigMulTo(this, num, out);\n } else {\n res = jumboMulTo(this, num, out);\n }\n\n return res;\n };\n\n // Cooley-Tukey algorithm for FFT\n // slightly revisited to rely on looping instead of recursion\n\n function FFTM (x, y) {\n this.x = x;\n this.y = y;\n }\n\n FFTM.prototype.makeRBT = function makeRBT (N) {\n var t = new Array(N);\n var l = BN.prototype._countBits(N) - 1;\n for (var i = 0; i < N; i++) {\n t[i] = this.revBin(i, l, N);\n }\n\n return t;\n };\n\n // Returns binary-reversed representation of `x`\n FFTM.prototype.revBin = function revBin (x, l, N) {\n if (x === 0 || x === N - 1) return x;\n\n var rb = 0;\n for (var i = 0; i < l; i++) {\n rb |= (x & 1) << (l - i - 1);\n x >>= 1;\n }\n\n return rb;\n };\n\n // Performs \"tweedling\" phase, therefore 'emulating'\n // behaviour of the recursive algorithm\n FFTM.prototype.permute = function permute (rbt, rws, iws, rtws, itws, N) {\n for (var i = 0; i < N; i++) {\n rtws[i] = rws[rbt[i]];\n itws[i] = iws[rbt[i]];\n }\n };\n\n FFTM.prototype.transform = function transform (rws, iws, rtws, itws, N, rbt) {\n this.permute(rbt, rws, iws, rtws, itws, N);\n\n for (var s = 1; s < N; s <<= 1) {\n var l = s << 1;\n\n var rtwdf = Math.cos(2 * Math.PI / l);\n var itwdf = Math.sin(2 * Math.PI / l);\n\n for (var p = 0; p < N; p += l) {\n var rtwdf_ = rtwdf;\n var itwdf_ = itwdf;\n\n for (var j = 0; j < s; j++) {\n var re = rtws[p + j];\n var ie = itws[p + j];\n\n var ro = rtws[p + j + s];\n var io = itws[p + j + s];\n\n var rx = rtwdf_ * ro - itwdf_ * io;\n\n io = rtwdf_ * io + itwdf_ * ro;\n ro = rx;\n\n rtws[p + j] = re + ro;\n itws[p + j] = ie + io;\n\n rtws[p + j + s] = re - ro;\n itws[p + j + s] = ie - io;\n\n /* jshint maxdepth : false */\n if (j !== l) {\n rx = rtwdf * rtwdf_ - itwdf * itwdf_;\n\n itwdf_ = rtwdf * itwdf_ + itwdf * rtwdf_;\n rtwdf_ = rx;\n }\n }\n }\n }\n };\n\n FFTM.prototype.guessLen13b = function guessLen13b (n, m) {\n var N = Math.max(m, n) | 1;\n var odd = N & 1;\n var i = 0;\n for (N = N / 2 | 0; N; N = N >>> 1) {\n i++;\n }\n\n return 1 << i + 1 + odd;\n };\n\n FFTM.prototype.conjugate = function conjugate (rws, iws, N) {\n if (N <= 1) return;\n\n for (var i = 0; i < N / 2; i++) {\n var t = rws[i];\n\n rws[i] = rws[N - i - 1];\n rws[N - i - 1] = t;\n\n t = iws[i];\n\n iws[i] = -iws[N - i - 1];\n iws[N - i - 1] = -t;\n }\n };\n\n FFTM.prototype.normalize13b = function normalize13b (ws, N) {\n var carry = 0;\n for (var i = 0; i < N / 2; i++) {\n var w = Math.round(ws[2 * i + 1] / N) * 0x2000 +\n Math.round(ws[2 * i] / N) +\n carry;\n\n ws[i] = w & 0x3ffffff;\n\n if (w < 0x4000000) {\n carry = 0;\n } else {\n carry = w / 0x4000000 | 0;\n }\n }\n\n return ws;\n };\n\n FFTM.prototype.convert13b = function convert13b (ws, len, rws, N) {\n var carry = 0;\n for (var i = 0; i < len; i++) {\n carry = carry + (ws[i] | 0);\n\n rws[2 * i] = carry & 0x1fff; carry = carry >>> 13;\n rws[2 * i + 1] = carry & 0x1fff; carry = carry >>> 13;\n }\n\n // Pad with zeroes\n for (i = 2 * len; i < N; ++i) {\n rws[i] = 0;\n }\n\n assert(carry === 0);\n assert((carry & ~0x1fff) === 0);\n };\n\n FFTM.prototype.stub = function stub (N) {\n var ph = new Array(N);\n for (var i = 0; i < N; i++) {\n ph[i] = 0;\n }\n\n return ph;\n };\n\n FFTM.prototype.mulp = function mulp (x, y, out) {\n var N = 2 * this.guessLen13b(x.length, y.length);\n\n var rbt = this.makeRBT(N);\n\n var _ = this.stub(N);\n\n var rws = new Array(N);\n var rwst = new Array(N);\n var iwst = new Array(N);\n\n var nrws = new Array(N);\n var nrwst = new Array(N);\n var niwst = new Array(N);\n\n var rmws = out.words;\n rmws.length = N;\n\n this.convert13b(x.words, x.length, rws, N);\n this.convert13b(y.words, y.length, nrws, N);\n\n this.transform(rws, _, rwst, iwst, N, rbt);\n this.transform(nrws, _, nrwst, niwst, N, rbt);\n\n for (var i = 0; i < N; i++) {\n var rx = rwst[i] * nrwst[i] - iwst[i] * niwst[i];\n iwst[i] = rwst[i] * niwst[i] + iwst[i] * nrwst[i];\n rwst[i] = rx;\n }\n\n this.conjugate(rwst, iwst, N);\n this.transform(rwst, iwst, rmws, _, N, rbt);\n this.conjugate(rmws, _, N);\n this.normalize13b(rmws, N);\n\n out.negative = x.negative ^ y.negative;\n out.length = x.length + y.length;\n return out.strip();\n };\n\n // Multiply `this` by `num`\n BN.prototype.mul = function mul (num) {\n var out = new BN(null);\n out.words = new Array(this.length + num.length);\n return this.mulTo(num, out);\n };\n\n // Multiply employing FFT\n BN.prototype.mulf = function mulf (num) {\n var out = new BN(null);\n out.words = new Array(this.length + num.length);\n return jumboMulTo(this, num, out);\n };\n\n // In-place Multiplication\n BN.prototype.imul = function imul (num) {\n return this.clone().mulTo(num, this);\n };\n\n BN.prototype.imuln = function imuln (num) {\n assert(typeof num === 'number');\n assert(num < 0x4000000);\n\n // Carry\n var carry = 0;\n for (var i = 0; i < this.length; i++) {\n var w = (this.words[i] | 0) * num;\n var lo = (w & 0x3ffffff) + (carry & 0x3ffffff);\n carry >>= 26;\n carry += (w / 0x4000000) | 0;\n // NOTE: lo is 27bit maximum\n carry += lo >>> 26;\n this.words[i] = lo & 0x3ffffff;\n }\n\n if (carry !== 0) {\n this.words[i] = carry;\n this.length++;\n }\n\n return this;\n };\n\n BN.prototype.muln = function muln (num) {\n return this.clone().imuln(num);\n };\n\n // `this` * `this`\n BN.prototype.sqr = function sqr () {\n return this.mul(this);\n };\n\n // `this` * `this` in-place\n BN.prototype.isqr = function isqr () {\n return this.imul(this.clone());\n };\n\n // Math.pow(`this`, `num`)\n BN.prototype.pow = function pow (num) {\n var w = toBitArray(num);\n if (w.length === 0) return new BN(1);\n\n // Skip leading zeroes\n var res = this;\n for (var i = 0; i < w.length; i++, res = res.sqr()) {\n if (w[i] !== 0) break;\n }\n\n if (++i < w.length) {\n for (var q = res.sqr(); i < w.length; i++, q = q.sqr()) {\n if (w[i] === 0) continue;\n\n res = res.mul(q);\n }\n }\n\n return res;\n };\n\n // Shift-left in-place\n BN.prototype.iushln = function iushln (bits) {\n assert(typeof bits === 'number' && bits >= 0);\n var r = bits % 26;\n var s = (bits - r) / 26;\n var carryMask = (0x3ffffff >>> (26 - r)) << (26 - r);\n var i;\n\n if (r !== 0) {\n var carry = 0;\n\n for (i = 0; i < this.length; i++) {\n var newCarry = this.words[i] & carryMask;\n var c = ((this.words[i] | 0) - newCarry) << r;\n this.words[i] = c | carry;\n carry = newCarry >>> (26 - r);\n }\n\n if (carry) {\n this.words[i] = carry;\n this.length++;\n }\n }\n\n if (s !== 0) {\n for (i = this.length - 1; i >= 0; i--) {\n this.words[i + s] = this.words[i];\n }\n\n for (i = 0; i < s; i++) {\n this.words[i] = 0;\n }\n\n this.length += s;\n }\n\n return this.strip();\n };\n\n BN.prototype.ishln = function ishln (bits) {\n // TODO(indutny): implement me\n assert(this.negative === 0);\n return this.iushln(bits);\n };\n\n // Shift-right in-place\n // NOTE: `hint` is a lowest bit before trailing zeroes\n // NOTE: if `extended` is present - it will be filled with destroyed bits\n BN.prototype.iushrn = function iushrn (bits, hint, extended) {\n assert(typeof bits === 'number' && bits >= 0);\n var h;\n if (hint) {\n h = (hint - (hint % 26)) / 26;\n } else {\n h = 0;\n }\n\n var r = bits % 26;\n var s = Math.min((bits - r) / 26, this.length);\n var mask = 0x3ffffff ^ ((0x3ffffff >>> r) << r);\n var maskedWords = extended;\n\n h -= s;\n h = Math.max(0, h);\n\n // Extended mode, copy masked part\n if (maskedWords) {\n for (var i = 0; i < s; i++) {\n maskedWords.words[i] = this.words[i];\n }\n maskedWords.length = s;\n }\n\n if (s === 0) {\n // No-op, we should not move anything at all\n } else if (this.length > s) {\n this.length -= s;\n for (i = 0; i < this.length; i++) {\n this.words[i] = this.words[i + s];\n }\n } else {\n this.words[0] = 0;\n this.length = 1;\n }\n\n var carry = 0;\n for (i = this.length - 1; i >= 0 && (carry !== 0 || i >= h); i--) {\n var word = this.words[i] | 0;\n this.words[i] = (carry << (26 - r)) | (word >>> r);\n carry = word & mask;\n }\n\n // Push carried bits as a mask\n if (maskedWords && carry !== 0) {\n maskedWords.words[maskedWords.length++] = carry;\n }\n\n if (this.length === 0) {\n this.words[0] = 0;\n this.length = 1;\n }\n\n return this.strip();\n };\n\n BN.prototype.ishrn = function ishrn (bits, hint, extended) {\n // TODO(indutny): implement me\n assert(this.negative === 0);\n return this.iushrn(bits, hint, extended);\n };\n\n // Shift-left\n BN.prototype.shln = function shln (bits) {\n return this.clone().ishln(bits);\n };\n\n BN.prototype.ushln = function ushln (bits) {\n return this.clone().iushln(bits);\n };\n\n // Shift-right\n BN.prototype.shrn = function shrn (bits) {\n return this.clone().ishrn(bits);\n };\n\n BN.prototype.ushrn = function ushrn (bits) {\n return this.clone().iushrn(bits);\n };\n\n // Test if n bit is set\n BN.prototype.testn = function testn (bit) {\n assert(typeof bit === 'number' && bit >= 0);\n var r = bit % 26;\n var s = (bit - r) / 26;\n var q = 1 << r;\n\n // Fast case: bit is much higher than all existing words\n if (this.length <= s) return false;\n\n // Check bit and return\n var w = this.words[s];\n\n return !!(w & q);\n };\n\n // Return only lowers bits of number (in-place)\n BN.prototype.imaskn = function imaskn (bits) {\n assert(typeof bits === 'number' && bits >= 0);\n var r = bits % 26;\n var s = (bits - r) / 26;\n\n assert(this.negative === 0, 'imaskn works only with positive numbers');\n\n if (this.length <= s) {\n return this;\n }\n\n if (r !== 0) {\n s++;\n }\n this.length = Math.min(s, this.length);\n\n if (r !== 0) {\n var mask = 0x3ffffff ^ ((0x3ffffff >>> r) << r);\n this.words[this.length - 1] &= mask;\n }\n\n return this.strip();\n };\n\n // Return only lowers bits of number\n BN.prototype.maskn = function maskn (bits) {\n return this.clone().imaskn(bits);\n };\n\n // Add plain number `num` to `this`\n BN.prototype.iaddn = function iaddn (num) {\n assert(typeof num === 'number');\n assert(num < 0x4000000);\n if (num < 0) return this.isubn(-num);\n\n // Possible sign change\n if (this.negative !== 0) {\n if (this.length === 1 && (this.words[0] | 0) < num) {\n this.words[0] = num - (this.words[0] | 0);\n this.negative = 0;\n return this;\n }\n\n this.negative = 0;\n this.isubn(num);\n this.negative = 1;\n return this;\n }\n\n // Add without checks\n return this._iaddn(num);\n };\n\n BN.prototype._iaddn = function _iaddn (num) {\n this.words[0] += num;\n\n // Carry\n for (var i = 0; i < this.length && this.words[i] >= 0x4000000; i++) {\n this.words[i] -= 0x4000000;\n if (i === this.length - 1) {\n this.words[i + 1] = 1;\n } else {\n this.words[i + 1]++;\n }\n }\n this.length = Math.max(this.length, i + 1);\n\n return this;\n };\n\n // Subtract plain number `num` from `this`\n BN.prototype.isubn = function isubn (num) {\n assert(typeof num === 'number');\n assert(num < 0x4000000);\n if (num < 0) return this.iaddn(-num);\n\n if (this.negative !== 0) {\n this.negative = 0;\n this.iaddn(num);\n this.negative = 1;\n return this;\n }\n\n this.words[0] -= num;\n\n if (this.length === 1 && this.words[0] < 0) {\n this.words[0] = -this.words[0];\n this.negative = 1;\n } else {\n // Carry\n for (var i = 0; i < this.length && this.words[i] < 0; i++) {\n this.words[i] += 0x4000000;\n this.words[i + 1] -= 1;\n }\n }\n\n return this.strip();\n };\n\n BN.prototype.addn = function addn (num) {\n return this.clone().iaddn(num);\n };\n\n BN.prototype.subn = function subn (num) {\n return this.clone().isubn(num);\n };\n\n BN.prototype.iabs = function iabs () {\n this.negative = 0;\n\n return this;\n };\n\n BN.prototype.abs = function abs () {\n return this.clone().iabs();\n };\n\n BN.prototype._ishlnsubmul = function _ishlnsubmul (num, mul, shift) {\n var len = num.length + shift;\n var i;\n\n this._expand(len);\n\n var w;\n var carry = 0;\n for (i = 0; i < num.length; i++) {\n w = (this.words[i + shift] | 0) + carry;\n var right = (num.words[i] | 0) * mul;\n w -= right & 0x3ffffff;\n carry = (w >> 26) - ((right / 0x4000000) | 0);\n this.words[i + shift] = w & 0x3ffffff;\n }\n for (; i < this.length - shift; i++) {\n w = (this.words[i + shift] | 0) + carry;\n carry = w >> 26;\n this.words[i + shift] = w & 0x3ffffff;\n }\n\n if (carry === 0) return this.strip();\n\n // Subtraction overflow\n assert(carry === -1);\n carry = 0;\n for (i = 0; i < this.length; i++) {\n w = -(this.words[i] | 0) + carry;\n carry = w >> 26;\n this.words[i] = w & 0x3ffffff;\n }\n this.negative = 1;\n\n return this.strip();\n };\n\n BN.prototype._wordDiv = function _wordDiv (num, mode) {\n var shift = this.length - num.length;\n\n var a = this.clone();\n var b = num;\n\n // Normalize\n var bhi = b.words[b.length - 1] | 0;\n var bhiBits = this._countBits(bhi);\n shift = 26 - bhiBits;\n if (shift !== 0) {\n b = b.ushln(shift);\n a.iushln(shift);\n bhi = b.words[b.length - 1] | 0;\n }\n\n // Initialize quotient\n var m = a.length - b.length;\n var q;\n\n if (mode !== 'mod') {\n q = new BN(null);\n q.length = m + 1;\n q.words = new Array(q.length);\n for (var i = 0; i < q.length; i++) {\n q.words[i] = 0;\n }\n }\n\n var diff = a.clone()._ishlnsubmul(b, 1, m);\n if (diff.negative === 0) {\n a = diff;\n if (q) {\n q.words[m] = 1;\n }\n }\n\n for (var j = m - 1; j >= 0; j--) {\n var qj = (a.words[b.length + j] | 0) * 0x4000000 +\n (a.words[b.length + j - 1] | 0);\n\n // NOTE: (qj / bhi) is (0x3ffffff * 0x4000000 + 0x3ffffff) / 0x2000000 max\n // (0x7ffffff)\n qj = Math.min((qj / bhi) | 0, 0x3ffffff);\n\n a._ishlnsubmul(b, qj, j);\n while (a.negative !== 0) {\n qj--;\n a.negative = 0;\n a._ishlnsubmul(b, 1, j);\n if (!a.isZero()) {\n a.negative ^= 1;\n }\n }\n if (q) {\n q.words[j] = qj;\n }\n }\n if (q) {\n q.strip();\n }\n a.strip();\n\n // Denormalize\n if (mode !== 'div' && shift !== 0) {\n a.iushrn(shift);\n }\n\n return {\n div: q || null,\n mod: a\n };\n };\n\n // NOTE: 1) `mode` can be set to `mod` to request mod only,\n // to `div` to request div only, or be absent to\n // request both div & mod\n // 2) `positive` is true if unsigned mod is requested\n BN.prototype.divmod = function divmod (num, mode, positive) {\n assert(!num.isZero());\n\n if (this.isZero()) {\n return {\n div: new BN(0),\n mod: new BN(0)\n };\n }\n\n var div, mod, res;\n if (this.negative !== 0 && num.negative === 0) {\n res = this.neg().divmod(num, mode);\n\n if (mode !== 'mod') {\n div = res.div.neg();\n }\n\n if (mode !== 'div') {\n mod = res.mod.neg();\n if (positive && mod.negative !== 0) {\n mod.iadd(num);\n }\n }\n\n return {\n div: div,\n mod: mod\n };\n }\n\n if (this.negative === 0 && num.negative !== 0) {\n res = this.divmod(num.neg(), mode);\n\n if (mode !== 'mod') {\n div = res.div.neg();\n }\n\n return {\n div: div,\n mod: res.mod\n };\n }\n\n if ((this.negative & num.negative) !== 0) {\n res = this.neg().divmod(num.neg(), mode);\n\n if (mode !== 'div') {\n mod = res.mod.neg();\n if (positive && mod.negative !== 0) {\n mod.isub(num);\n }\n }\n\n return {\n div: res.div,\n mod: mod\n };\n }\n\n // Both numbers are positive at this point\n\n // Strip both numbers to approximate shift value\n if (num.length > this.length || this.cmp(num) < 0) {\n return {\n div: new BN(0),\n mod: this\n };\n }\n\n // Very short reduction\n if (num.length === 1) {\n if (mode === 'div') {\n return {\n div: this.divn(num.words[0]),\n mod: null\n };\n }\n\n if (mode === 'mod') {\n return {\n div: null,\n mod: new BN(this.modn(num.words[0]))\n };\n }\n\n return {\n div: this.divn(num.words[0]),\n mod: new BN(this.modn(num.words[0]))\n };\n }\n\n return this._wordDiv(num, mode);\n };\n\n // Find `this` / `num`\n BN.prototype.div = function div (num) {\n return this.divmod(num, 'div', false).div;\n };\n\n // Find `this` % `num`\n BN.prototype.mod = function mod (num) {\n return this.divmod(num, 'mod', false).mod;\n };\n\n BN.prototype.umod = function umod (num) {\n return this.divmod(num, 'mod', true).mod;\n };\n\n // Find Round(`this` / `num`)\n BN.prototype.divRound = function divRound (num) {\n var dm = this.divmod(num);\n\n // Fast case - exact division\n if (dm.mod.isZero()) return dm.div;\n\n var mod = dm.div.negative !== 0 ? dm.mod.isub(num) : dm.mod;\n\n var half = num.ushrn(1);\n var r2 = num.andln(1);\n var cmp = mod.cmp(half);\n\n // Round down\n if (cmp < 0 || r2 === 1 && cmp === 0) return dm.div;\n\n // Round up\n return dm.div.negative !== 0 ? dm.div.isubn(1) : dm.div.iaddn(1);\n };\n\n BN.prototype.modn = function modn (num) {\n assert(num <= 0x3ffffff);\n var p = (1 << 26) % num;\n\n var acc = 0;\n for (var i = this.length - 1; i >= 0; i--) {\n acc = (p * acc + (this.words[i] | 0)) % num;\n }\n\n return acc;\n };\n\n // In-place division by number\n BN.prototype.idivn = function idivn (num) {\n assert(num <= 0x3ffffff);\n\n var carry = 0;\n for (var i = this.length - 1; i >= 0; i--) {\n var w = (this.words[i] | 0) + carry * 0x4000000;\n this.words[i] = (w / num) | 0;\n carry = w % num;\n }\n\n return this.strip();\n };\n\n BN.prototype.divn = function divn (num) {\n return this.clone().idivn(num);\n };\n\n BN.prototype.egcd = function egcd (p) {\n assert(p.negative === 0);\n assert(!p.isZero());\n\n var x = this;\n var y = p.clone();\n\n if (x.negative !== 0) {\n x = x.umod(p);\n } else {\n x = x.clone();\n }\n\n // A * x + B * y = x\n var A = new BN(1);\n var B = new BN(0);\n\n // C * x + D * y = y\n var C = new BN(0);\n var D = new BN(1);\n\n var g = 0;\n\n while (x.isEven() && y.isEven()) {\n x.iushrn(1);\n y.iushrn(1);\n ++g;\n }\n\n var yp = y.clone();\n var xp = x.clone();\n\n while (!x.isZero()) {\n for (var i = 0, im = 1; (x.words[0] & im) === 0 && i < 26; ++i, im <<= 1);\n if (i > 0) {\n x.iushrn(i);\n while (i-- > 0) {\n if (A.isOdd() || B.isOdd()) {\n A.iadd(yp);\n B.isub(xp);\n }\n\n A.iushrn(1);\n B.iushrn(1);\n }\n }\n\n for (var j = 0, jm = 1; (y.words[0] & jm) === 0 && j < 26; ++j, jm <<= 1);\n if (j > 0) {\n y.iushrn(j);\n while (j-- > 0) {\n if (C.isOdd() || D.isOdd()) {\n C.iadd(yp);\n D.isub(xp);\n }\n\n C.iushrn(1);\n D.iushrn(1);\n }\n }\n\n if (x.cmp(y) >= 0) {\n x.isub(y);\n A.isub(C);\n B.isub(D);\n } else {\n y.isub(x);\n C.isub(A);\n D.isub(B);\n }\n }\n\n return {\n a: C,\n b: D,\n gcd: y.iushln(g)\n };\n };\n\n // This is reduced incarnation of the binary EEA\n // above, designated to invert members of the\n // _prime_ fields F(p) at a maximal speed\n BN.prototype._invmp = function _invmp (p) {\n assert(p.negative === 0);\n assert(!p.isZero());\n\n var a = this;\n var b = p.clone();\n\n if (a.negative !== 0) {\n a = a.umod(p);\n } else {\n a = a.clone();\n }\n\n var x1 = new BN(1);\n var x2 = new BN(0);\n\n var delta = b.clone();\n\n while (a.cmpn(1) > 0 && b.cmpn(1) > 0) {\n for (var i = 0, im = 1; (a.words[0] & im) === 0 && i < 26; ++i, im <<= 1);\n if (i > 0) {\n a.iushrn(i);\n while (i-- > 0) {\n if (x1.isOdd()) {\n x1.iadd(delta);\n }\n\n x1.iushrn(1);\n }\n }\n\n for (var j = 0, jm = 1; (b.words[0] & jm) === 0 && j < 26; ++j, jm <<= 1);\n if (j > 0) {\n b.iushrn(j);\n while (j-- > 0) {\n if (x2.isOdd()) {\n x2.iadd(delta);\n }\n\n x2.iushrn(1);\n }\n }\n\n if (a.cmp(b) >= 0) {\n a.isub(b);\n x1.isub(x2);\n } else {\n b.isub(a);\n x2.isub(x1);\n }\n }\n\n var res;\n if (a.cmpn(1) === 0) {\n res = x1;\n } else {\n res = x2;\n }\n\n if (res.cmpn(0) < 0) {\n res.iadd(p);\n }\n\n return res;\n };\n\n BN.prototype.gcd = function gcd (num) {\n if (this.isZero()) return num.abs();\n if (num.isZero()) return this.abs();\n\n var a = this.clone();\n var b = num.clone();\n a.negative = 0;\n b.negative = 0;\n\n // Remove common factor of two\n for (var shift = 0; a.isEven() && b.isEven(); shift++) {\n a.iushrn(1);\n b.iushrn(1);\n }\n\n do {\n while (a.isEven()) {\n a.iushrn(1);\n }\n while (b.isEven()) {\n b.iushrn(1);\n }\n\n var r = a.cmp(b);\n if (r < 0) {\n // Swap `a` and `b` to make `a` always bigger than `b`\n var t = a;\n a = b;\n b = t;\n } else if (r === 0 || b.cmpn(1) === 0) {\n break;\n }\n\n a.isub(b);\n } while (true);\n\n return b.iushln(shift);\n };\n\n // Invert number in the field F(num)\n BN.prototype.invm = function invm (num) {\n return this.egcd(num).a.umod(num);\n };\n\n BN.prototype.isEven = function isEven () {\n return (this.words[0] & 1) === 0;\n };\n\n BN.prototype.isOdd = function isOdd () {\n return (this.words[0] & 1) === 1;\n };\n\n // And first word and num\n BN.prototype.andln = function andln (num) {\n return this.words[0] & num;\n };\n\n // Increment at the bit position in-line\n BN.prototype.bincn = function bincn (bit) {\n assert(typeof bit === 'number');\n var r = bit % 26;\n var s = (bit - r) / 26;\n var q = 1 << r;\n\n // Fast case: bit is much higher than all existing words\n if (this.length <= s) {\n this._expand(s + 1);\n this.words[s] |= q;\n return this;\n }\n\n // Add bit and propagate, if needed\n var carry = q;\n for (var i = s; carry !== 0 && i < this.length; i++) {\n var w = this.words[i] | 0;\n w += carry;\n carry = w >>> 26;\n w &= 0x3ffffff;\n this.words[i] = w;\n }\n if (carry !== 0) {\n this.words[i] = carry;\n this.length++;\n }\n return this;\n };\n\n BN.prototype.isZero = function isZero () {\n return this.length === 1 && this.words[0] === 0;\n };\n\n BN.prototype.cmpn = function cmpn (num) {\n var negative = num < 0;\n\n if (this.negative !== 0 && !negative) return -1;\n if (this.negative === 0 && negative) return 1;\n\n this.strip();\n\n var res;\n if (this.length > 1) {\n res = 1;\n } else {\n if (negative) {\n num = -num;\n }\n\n assert(num <= 0x3ffffff, 'Number is too big');\n\n var w = this.words[0] | 0;\n res = w === num ? 0 : w < num ? -1 : 1;\n }\n if (this.negative !== 0) return -res | 0;\n return res;\n };\n\n // Compare two numbers and return:\n // 1 - if `this` > `num`\n // 0 - if `this` == `num`\n // -1 - if `this` < `num`\n BN.prototype.cmp = function cmp (num) {\n if (this.negative !== 0 && num.negative === 0) return -1;\n if (this.negative === 0 && num.negative !== 0) return 1;\n\n var res = this.ucmp(num);\n if (this.negative !== 0) return -res | 0;\n return res;\n };\n\n // Unsigned comparison\n BN.prototype.ucmp = function ucmp (num) {\n // At this point both numbers have the same sign\n if (this.length > num.length) return 1;\n if (this.length < num.length) return -1;\n\n var res = 0;\n for (var i = this.length - 1; i >= 0; i--) {\n var a = this.words[i] | 0;\n var b = num.words[i] | 0;\n\n if (a === b) continue;\n if (a < b) {\n res = -1;\n } else if (a > b) {\n res = 1;\n }\n break;\n }\n return res;\n };\n\n BN.prototype.gtn = function gtn (num) {\n return this.cmpn(num) === 1;\n };\n\n BN.prototype.gt = function gt (num) {\n return this.cmp(num) === 1;\n };\n\n BN.prototype.gten = function gten (num) {\n return this.cmpn(num) >= 0;\n };\n\n BN.prototype.gte = function gte (num) {\n return this.cmp(num) >= 0;\n };\n\n BN.prototype.ltn = function ltn (num) {\n return this.cmpn(num) === -1;\n };\n\n BN.prototype.lt = function lt (num) {\n return this.cmp(num) === -1;\n };\n\n BN.prototype.lten = function lten (num) {\n return this.cmpn(num) <= 0;\n };\n\n BN.prototype.lte = function lte (num) {\n return this.cmp(num) <= 0;\n };\n\n BN.prototype.eqn = function eqn (num) {\n return this.cmpn(num) === 0;\n };\n\n BN.prototype.eq = function eq (num) {\n return this.cmp(num) === 0;\n };\n\n //\n // A reduce context, could be using montgomery or something better, depending\n // on the `m` itself.\n //\n BN.red = function red (num) {\n return new Red(num);\n };\n\n BN.prototype.toRed = function toRed (ctx) {\n assert(!this.red, 'Already a number in reduction context');\n assert(this.negative === 0, 'red works only with positives');\n return ctx.convertTo(this)._forceRed(ctx);\n };\n\n BN.prototype.fromRed = function fromRed () {\n assert(this.red, 'fromRed works only with numbers in reduction context');\n return this.red.convertFrom(this);\n };\n\n BN.prototype._forceRed = function _forceRed (ctx) {\n this.red = ctx;\n return this;\n };\n\n BN.prototype.forceRed = function forceRed (ctx) {\n assert(!this.red, 'Already a number in reduction context');\n return this._forceRed(ctx);\n };\n\n BN.prototype.redAdd = function redAdd (num) {\n assert(this.red, 'redAdd works only with red numbers');\n return this.red.add(this, num);\n };\n\n BN.prototype.redIAdd = function redIAdd (num) {\n assert(this.red, 'redIAdd works only with red numbers');\n return this.red.iadd(this, num);\n };\n\n BN.prototype.redSub = function redSub (num) {\n assert(this.red, 'redSub works only with red numbers');\n return this.red.sub(this, num);\n };\n\n BN.prototype.redISub = function redISub (num) {\n assert(this.red, 'redISub works only with red numbers');\n return this.red.isub(this, num);\n };\n\n BN.prototype.redShl = function redShl (num) {\n assert(this.red, 'redShl works only with red numbers');\n return this.red.shl(this, num);\n };\n\n BN.prototype.redMul = function redMul (num) {\n assert(this.red, 'redMul works only with red numbers');\n this.red._verify2(this, num);\n return this.red.mul(this, num);\n };\n\n BN.prototype.redIMul = function redIMul (num) {\n assert(this.red, 'redMul works only with red numbers');\n this.red._verify2(this, num);\n return this.red.imul(this, num);\n };\n\n BN.prototype.redSqr = function redSqr () {\n assert(this.red, 'redSqr works only with red numbers');\n this.red._verify1(this);\n return this.red.sqr(this);\n };\n\n BN.prototype.redISqr = function redISqr () {\n assert(this.red, 'redISqr works only with red numbers');\n this.red._verify1(this);\n return this.red.isqr(this);\n };\n\n // Square root over p\n BN.prototype.redSqrt = function redSqrt () {\n assert(this.red, 'redSqrt works only with red numbers');\n this.red._verify1(this);\n return this.red.sqrt(this);\n };\n\n BN.prototype.redInvm = function redInvm () {\n assert(this.red, 'redInvm works only with red numbers');\n this.red._verify1(this);\n return this.red.invm(this);\n };\n\n // Return negative clone of `this` % `red modulo`\n BN.prototype.redNeg = function redNeg () {\n assert(this.red, 'redNeg works only with red numbers');\n this.red._verify1(this);\n return this.red.neg(this);\n };\n\n BN.prototype.redPow = function redPow (num) {\n assert(this.red && !num.red, 'redPow(normalNum)');\n this.red._verify1(this);\n return this.red.pow(this, num);\n };\n\n // Prime numbers with efficient reduction\n var primes = {\n k256: null,\n p224: null,\n p192: null,\n p25519: null\n };\n\n // Pseudo-Mersenne prime\n function MPrime (name, p) {\n // P = 2 ^ N - K\n this.name = name;\n this.p = new BN(p, 16);\n this.n = this.p.bitLength();\n this.k = new BN(1).iushln(this.n).isub(this.p);\n\n this.tmp = this._tmp();\n }\n\n MPrime.prototype._tmp = function _tmp () {\n var tmp = new BN(null);\n tmp.words = new Array(Math.ceil(this.n / 13));\n return tmp;\n };\n\n MPrime.prototype.ireduce = function ireduce (num) {\n // Assumes that `num` is less than `P^2`\n // num = HI * (2 ^ N - K) + HI * K + LO = HI * K + LO (mod P)\n var r = num;\n var rlen;\n\n do {\n this.split(r, this.tmp);\n r = this.imulK(r);\n r = r.iadd(this.tmp);\n rlen = r.bitLength();\n } while (rlen > this.n);\n\n var cmp = rlen < this.n ? -1 : r.ucmp(this.p);\n if (cmp === 0) {\n r.words[0] = 0;\n r.length = 1;\n } else if (cmp > 0) {\n r.isub(this.p);\n } else {\n if (r.strip !== undefined) {\n // r is BN v4 instance\n r.strip();\n } else {\n // r is BN v5 instance\n r._strip();\n }\n }\n\n return r;\n };\n\n MPrime.prototype.split = function split (input, out) {\n input.iushrn(this.n, 0, out);\n };\n\n MPrime.prototype.imulK = function imulK (num) {\n return num.imul(this.k);\n };\n\n function K256 () {\n MPrime.call(\n this,\n 'k256',\n 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f');\n }\n inherits(K256, MPrime);\n\n K256.prototype.split = function split (input, output) {\n // 256 = 9 * 26 + 22\n var mask = 0x3fffff;\n\n var outLen = Math.min(input.length, 9);\n for (var i = 0; i < outLen; i++) {\n output.words[i] = input.words[i];\n }\n output.length = outLen;\n\n if (input.length <= 9) {\n input.words[0] = 0;\n input.length = 1;\n return;\n }\n\n // Shift by 9 limbs\n var prev = input.words[9];\n output.words[output.length++] = prev & mask;\n\n for (i = 10; i < input.length; i++) {\n var next = input.words[i] | 0;\n input.words[i - 10] = ((next & mask) << 4) | (prev >>> 22);\n prev = next;\n }\n prev >>>= 22;\n input.words[i - 10] = prev;\n if (prev === 0 && input.length > 10) {\n input.length -= 10;\n } else {\n input.length -= 9;\n }\n };\n\n K256.prototype.imulK = function imulK (num) {\n // K = 0x1000003d1 = [ 0x40, 0x3d1 ]\n num.words[num.length] = 0;\n num.words[num.length + 1] = 0;\n num.length += 2;\n\n // bounded at: 0x40 * 0x3ffffff + 0x3d0 = 0x100000390\n var lo = 0;\n for (var i = 0; i < num.length; i++) {\n var w = num.words[i] | 0;\n lo += w * 0x3d1;\n num.words[i] = lo & 0x3ffffff;\n lo = w * 0x40 + ((lo / 0x4000000) | 0);\n }\n\n // Fast length reduction\n if (num.words[num.length - 1] === 0) {\n num.length--;\n if (num.words[num.length - 1] === 0) {\n num.length--;\n }\n }\n return num;\n };\n\n function P224 () {\n MPrime.call(\n this,\n 'p224',\n 'ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001');\n }\n inherits(P224, MPrime);\n\n function P192 () {\n MPrime.call(\n this,\n 'p192',\n 'ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff');\n }\n inherits(P192, MPrime);\n\n function P25519 () {\n // 2 ^ 255 - 19\n MPrime.call(\n this,\n '25519',\n '7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed');\n }\n inherits(P25519, MPrime);\n\n P25519.prototype.imulK = function imulK (num) {\n // K = 0x13\n var carry = 0;\n for (var i = 0; i < num.length; i++) {\n var hi = (num.words[i] | 0) * 0x13 + carry;\n var lo = hi & 0x3ffffff;\n hi >>>= 26;\n\n num.words[i] = lo;\n carry = hi;\n }\n if (carry !== 0) {\n num.words[num.length++] = carry;\n }\n return num;\n };\n\n // Exported mostly for testing purposes, use plain name instead\n BN._prime = function prime (name) {\n // Cached version of prime\n if (primes[name]) return primes[name];\n\n var prime;\n if (name === 'k256') {\n prime = new K256();\n } else if (name === 'p224') {\n prime = new P224();\n } else if (name === 'p192') {\n prime = new P192();\n } else if (name === 'p25519') {\n prime = new P25519();\n } else {\n throw new Error('Unknown prime ' + name);\n }\n primes[name] = prime;\n\n return prime;\n };\n\n //\n // Base reduction engine\n //\n function Red (m) {\n if (typeof m === 'string') {\n var prime = BN._prime(m);\n this.m = prime.p;\n this.prime = prime;\n } else {\n assert(m.gtn(1), 'modulus must be greater than 1');\n this.m = m;\n this.prime = null;\n }\n }\n\n Red.prototype._verify1 = function _verify1 (a) {\n assert(a.negative === 0, 'red works only with positives');\n assert(a.red, 'red works only with red numbers');\n };\n\n Red.prototype._verify2 = function _verify2 (a, b) {\n assert((a.negative | b.negative) === 0, 'red works only with positives');\n assert(a.red && a.red === b.red,\n 'red works only with red numbers');\n };\n\n Red.prototype.imod = function imod (a) {\n if (this.prime) return this.prime.ireduce(a)._forceRed(this);\n return a.umod(this.m)._forceRed(this);\n };\n\n Red.prototype.neg = function neg (a) {\n if (a.isZero()) {\n return a.clone();\n }\n\n return this.m.sub(a)._forceRed(this);\n };\n\n Red.prototype.add = function add (a, b) {\n this._verify2(a, b);\n\n var res = a.add(b);\n if (res.cmp(this.m) >= 0) {\n res.isub(this.m);\n }\n return res._forceRed(this);\n };\n\n Red.prototype.iadd = function iadd (a, b) {\n this._verify2(a, b);\n\n var res = a.iadd(b);\n if (res.cmp(this.m) >= 0) {\n res.isub(this.m);\n }\n return res;\n };\n\n Red.prototype.sub = function sub (a, b) {\n this._verify2(a, b);\n\n var res = a.sub(b);\n if (res.cmpn(0) < 0) {\n res.iadd(this.m);\n }\n return res._forceRed(this);\n };\n\n Red.prototype.isub = function isub (a, b) {\n this._verify2(a, b);\n\n var res = a.isub(b);\n if (res.cmpn(0) < 0) {\n res.iadd(this.m);\n }\n return res;\n };\n\n Red.prototype.shl = function shl (a, num) {\n this._verify1(a);\n return this.imod(a.ushln(num));\n };\n\n Red.prototype.imul = function imul (a, b) {\n this._verify2(a, b);\n return this.imod(a.imul(b));\n };\n\n Red.prototype.mul = function mul (a, b) {\n this._verify2(a, b);\n return this.imod(a.mul(b));\n };\n\n Red.prototype.isqr = function isqr (a) {\n return this.imul(a, a.clone());\n };\n\n Red.prototype.sqr = function sqr (a) {\n return this.mul(a, a);\n };\n\n Red.prototype.sqrt = function sqrt (a) {\n if (a.isZero()) return a.clone();\n\n var mod3 = this.m.andln(3);\n assert(mod3 % 2 === 1);\n\n // Fast case\n if (mod3 === 3) {\n var pow = this.m.add(new BN(1)).iushrn(2);\n return this.pow(a, pow);\n }\n\n // Tonelli-Shanks algorithm (Totally unoptimized and slow)\n //\n // Find Q and S, that Q * 2 ^ S = (P - 1)\n var q = this.m.subn(1);\n var s = 0;\n while (!q.isZero() && q.andln(1) === 0) {\n s++;\n q.iushrn(1);\n }\n assert(!q.isZero());\n\n var one = new BN(1).toRed(this);\n var nOne = one.redNeg();\n\n // Find quadratic non-residue\n // NOTE: Max is such because of generalized Riemann hypothesis.\n var lpow = this.m.subn(1).iushrn(1);\n var z = this.m.bitLength();\n z = new BN(2 * z * z).toRed(this);\n\n while (this.pow(z, lpow).cmp(nOne) !== 0) {\n z.redIAdd(nOne);\n }\n\n var c = this.pow(z, q);\n var r = this.pow(a, q.addn(1).iushrn(1));\n var t = this.pow(a, q);\n var m = s;\n while (t.cmp(one) !== 0) {\n var tmp = t;\n for (var i = 0; tmp.cmp(one) !== 0; i++) {\n tmp = tmp.redSqr();\n }\n assert(i < m);\n var b = this.pow(c, new BN(1).iushln(m - i - 1));\n\n r = r.redMul(b);\n c = b.redSqr();\n t = t.redMul(c);\n m = i;\n }\n\n return r;\n };\n\n Red.prototype.invm = function invm (a) {\n var inv = a._invmp(this.m);\n if (inv.negative !== 0) {\n inv.negative = 0;\n return this.imod(inv).redNeg();\n } else {\n return this.imod(inv);\n }\n };\n\n Red.prototype.pow = function pow (a, num) {\n if (num.isZero()) return new BN(1).toRed(this);\n if (num.cmpn(1) === 0) return a.clone();\n\n var windowSize = 4;\n var wnd = new Array(1 << windowSize);\n wnd[0] = new BN(1).toRed(this);\n wnd[1] = a;\n for (var i = 2; i < wnd.length; i++) {\n wnd[i] = this.mul(wnd[i - 1], a);\n }\n\n var res = wnd[0];\n var current = 0;\n var currentLen = 0;\n var start = num.bitLength() % 26;\n if (start === 0) {\n start = 26;\n }\n\n for (i = num.length - 1; i >= 0; i--) {\n var word = num.words[i];\n for (var j = start - 1; j >= 0; j--) {\n var bit = (word >> j) & 1;\n if (res !== wnd[0]) {\n res = this.sqr(res);\n }\n\n if (bit === 0 && current === 0) {\n currentLen = 0;\n continue;\n }\n\n current <<= 1;\n current |= bit;\n currentLen++;\n if (currentLen !== windowSize && (i !== 0 || j !== 0)) continue;\n\n res = this.mul(res, wnd[current]);\n currentLen = 0;\n current = 0;\n }\n start = 26;\n }\n\n return res;\n };\n\n Red.prototype.convertTo = function convertTo (num) {\n var r = num.umod(this.m);\n\n return r === num ? r.clone() : r;\n };\n\n Red.prototype.convertFrom = function convertFrom (num) {\n var res = num.clone();\n res.red = null;\n return res;\n };\n\n //\n // Montgomery method engine\n //\n\n BN.mont = function mont (num) {\n return new Mont(num);\n };\n\n function Mont (m) {\n Red.call(this, m);\n\n this.shift = this.m.bitLength();\n if (this.shift % 26 !== 0) {\n this.shift += 26 - (this.shift % 26);\n }\n\n this.r = new BN(1).iushln(this.shift);\n this.r2 = this.imod(this.r.sqr());\n this.rinv = this.r._invmp(this.m);\n\n this.minv = this.rinv.mul(this.r).isubn(1).div(this.m);\n this.minv = this.minv.umod(this.r);\n this.minv = this.r.sub(this.minv);\n }\n inherits(Mont, Red);\n\n Mont.prototype.convertTo = function convertTo (num) {\n return this.imod(num.ushln(this.shift));\n };\n\n Mont.prototype.convertFrom = function convertFrom (num) {\n var r = this.imod(num.mul(this.rinv));\n r.red = null;\n return r;\n };\n\n Mont.prototype.imul = function imul (a, b) {\n if (a.isZero() || b.isZero()) {\n a.words[0] = 0;\n a.length = 1;\n return a;\n }\n\n var t = a.imul(b);\n var c = t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m);\n var u = t.isub(c).iushrn(this.shift);\n var res = u;\n\n if (u.cmp(this.m) >= 0) {\n res = u.isub(this.m);\n } else if (u.cmpn(0) < 0) {\n res = u.iadd(this.m);\n }\n\n return res._forceRed(this);\n };\n\n Mont.prototype.mul = function mul (a, b) {\n if (a.isZero() || b.isZero()) return new BN(0)._forceRed(this);\n\n var t = a.mul(b);\n var c = t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m);\n var u = t.isub(c).iushrn(this.shift);\n var res = u;\n if (u.cmp(this.m) >= 0) {\n res = u.isub(this.m);\n } else if (u.cmpn(0) < 0) {\n res = u.iadd(this.m);\n }\n\n return res._forceRed(this);\n };\n\n Mont.prototype.invm = function invm (a) {\n // (AR)^-1 * R^2 = (A^-1 * R^-1) * R^2 = A^-1 * R\n var res = this.imod(a._invmp(this.m).mul(this.r2));\n return res._forceRed(this);\n };\n})(typeof module === 'undefined' || module, this);\n","if (typeof Object.create === 'function') {\n // implementation from standard node.js 'util' module\n module.exports = function inherits(ctor, superCtor) {\n if (superCtor) {\n ctor.super_ = superCtor\n ctor.prototype = Object.create(superCtor.prototype, {\n constructor: {\n value: ctor,\n enumerable: false,\n writable: true,\n configurable: true\n }\n })\n }\n };\n} else {\n // old school shim for old browsers\n module.exports = function inherits(ctor, superCtor) {\n if (superCtor) {\n ctor.super_ = superCtor\n var TempCtor = function () {}\n TempCtor.prototype = superCtor.prototype\n ctor.prototype = new TempCtor()\n ctor.prototype.constructor = ctor\n }\n }\n}\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\nvar R = typeof Reflect === 'object' ? Reflect : null\nvar ReflectApply = R && typeof R.apply === 'function'\n ? R.apply\n : function ReflectApply(target, receiver, args) {\n return Function.prototype.apply.call(target, receiver, args);\n }\n\nvar ReflectOwnKeys\nif (R && typeof R.ownKeys === 'function') {\n ReflectOwnKeys = R.ownKeys\n} else if (Object.getOwnPropertySymbols) {\n ReflectOwnKeys = function ReflectOwnKeys(target) {\n return Object.getOwnPropertyNames(target)\n .concat(Object.getOwnPropertySymbols(target));\n };\n} else {\n ReflectOwnKeys = function ReflectOwnKeys(target) {\n return Object.getOwnPropertyNames(target);\n };\n}\n\nfunction ProcessEmitWarning(warning) {\n if (console && console.warn) console.warn(warning);\n}\n\nvar NumberIsNaN = Number.isNaN || function NumberIsNaN(value) {\n return value !== value;\n}\n\nfunction EventEmitter() {\n EventEmitter.init.call(this);\n}\nmodule.exports = EventEmitter;\nmodule.exports.once = once;\n\n// Backwards-compat with node 0.10.x\nEventEmitter.EventEmitter = EventEmitter;\n\nEventEmitter.prototype._events = undefined;\nEventEmitter.prototype._eventsCount = 0;\nEventEmitter.prototype._maxListeners = undefined;\n\n// By default EventEmitters will print a warning if more than 10 listeners are\n// added to it. This is a useful default which helps finding memory leaks.\nvar defaultMaxListeners = 10;\n\nfunction checkListener(listener) {\n if (typeof listener !== 'function') {\n throw new TypeError('The \"listener\" argument must be of type Function. Received type ' + typeof listener);\n }\n}\n\nObject.defineProperty(EventEmitter, 'defaultMaxListeners', {\n enumerable: true,\n get: function() {\n return defaultMaxListeners;\n },\n set: function(arg) {\n if (typeof arg !== 'number' || arg < 0 || NumberIsNaN(arg)) {\n throw new RangeError('The value of \"defaultMaxListeners\" is out of range. It must be a non-negative number. Received ' + arg + '.');\n }\n defaultMaxListeners = arg;\n }\n});\n\nEventEmitter.init = function() {\n\n if (this._events === undefined ||\n this._events === Object.getPrototypeOf(this)._events) {\n this._events = Object.create(null);\n this._eventsCount = 0;\n }\n\n this._maxListeners = this._maxListeners || undefined;\n};\n\n// Obviously not all Emitters should be limited to 10. This function allows\n// that to be increased. Set to zero for unlimited.\nEventEmitter.prototype.setMaxListeners = function setMaxListeners(n) {\n if (typeof n !== 'number' || n < 0 || NumberIsNaN(n)) {\n throw new RangeError('The value of \"n\" is out of range. It must be a non-negative number. Received ' + n + '.');\n }\n this._maxListeners = n;\n return this;\n};\n\nfunction _getMaxListeners(that) {\n if (that._maxListeners === undefined)\n return EventEmitter.defaultMaxListeners;\n return that._maxListeners;\n}\n\nEventEmitter.prototype.getMaxListeners = function getMaxListeners() {\n return _getMaxListeners(this);\n};\n\nEventEmitter.prototype.emit = function emit(type) {\n var args = [];\n for (var i = 1; i < arguments.length; i++) args.push(arguments[i]);\n var doError = (type === 'error');\n\n var events = this._events;\n if (events !== undefined)\n doError = (doError && events.error === undefined);\n else if (!doError)\n return false;\n\n // If there is no 'error' event listener then throw.\n if (doError) {\n var er;\n if (args.length > 0)\n er = args[0];\n if (er instanceof Error) {\n // Note: The comments on the `throw` lines are intentional, they show\n // up in Node's output if this results in an unhandled exception.\n throw er; // Unhandled 'error' event\n }\n // At least give some kind of context to the user\n var err = new Error('Unhandled error.' + (er ? ' (' + er.message + ')' : ''));\n err.context = er;\n throw err; // Unhandled 'error' event\n }\n\n var handler = events[type];\n\n if (handler === undefined)\n return false;\n\n if (typeof handler === 'function') {\n ReflectApply(handler, this, args);\n } else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n ReflectApply(listeners[i], this, args);\n }\n\n return true;\n};\n\nfunction _addListener(target, type, listener, prepend) {\n var m;\n var events;\n var existing;\n\n checkListener(listener);\n\n events = target._events;\n if (events === undefined) {\n events = target._events = Object.create(null);\n target._eventsCount = 0;\n } else {\n // To avoid recursion in the case that type === \"newListener\"! Before\n // adding it to the listeners, first emit \"newListener\".\n if (events.newListener !== undefined) {\n target.emit('newListener', type,\n listener.listener ? listener.listener : listener);\n\n // Re-assign `events` because a newListener handler could have caused the\n // this._events to be assigned to a new object\n events = target._events;\n }\n existing = events[type];\n }\n\n if (existing === undefined) {\n // Optimize the case of one listener. Don't need the extra array object.\n existing = events[type] = listener;\n ++target._eventsCount;\n } else {\n if (typeof existing === 'function') {\n // Adding the second element, need to change to array.\n existing = events[type] =\n prepend ? [listener, existing] : [existing, listener];\n // If we've already got an array, just append.\n } else if (prepend) {\n existing.unshift(listener);\n } else {\n existing.push(listener);\n }\n\n // Check for listener leak\n m = _getMaxListeners(target);\n if (m > 0 && existing.length > m && !existing.warned) {\n existing.warned = true;\n // No error code for this since it is a Warning\n // eslint-disable-next-line no-restricted-syntax\n var w = new Error('Possible EventEmitter memory leak detected. ' +\n existing.length + ' ' + String(type) + ' listeners ' +\n 'added. Use emitter.setMaxListeners() to ' +\n 'increase limit');\n w.name = 'MaxListenersExceededWarning';\n w.emitter = target;\n w.type = type;\n w.count = existing.length;\n ProcessEmitWarning(w);\n }\n }\n\n return target;\n}\n\nEventEmitter.prototype.addListener = function addListener(type, listener) {\n return _addListener(this, type, listener, false);\n};\n\nEventEmitter.prototype.on = EventEmitter.prototype.addListener;\n\nEventEmitter.prototype.prependListener =\n function prependListener(type, listener) {\n return _addListener(this, type, listener, true);\n };\n\nfunction onceWrapper() {\n if (!this.fired) {\n this.target.removeListener(this.type, this.wrapFn);\n this.fired = true;\n if (arguments.length === 0)\n return this.listener.call(this.target);\n return this.listener.apply(this.target, arguments);\n }\n}\n\nfunction _onceWrap(target, type, listener) {\n var state = { fired: false, wrapFn: undefined, target: target, type: type, listener: listener };\n var wrapped = onceWrapper.bind(state);\n wrapped.listener = listener;\n state.wrapFn = wrapped;\n return wrapped;\n}\n\nEventEmitter.prototype.once = function once(type, listener) {\n checkListener(listener);\n this.on(type, _onceWrap(this, type, listener));\n return this;\n};\n\nEventEmitter.prototype.prependOnceListener =\n function prependOnceListener(type, listener) {\n checkListener(listener);\n this.prependListener(type, _onceWrap(this, type, listener));\n return this;\n };\n\n// Emits a 'removeListener' event if and only if the listener was removed.\nEventEmitter.prototype.removeListener =\n function removeListener(type, listener) {\n var list, events, position, i, originalListener;\n\n checkListener(listener);\n\n events = this._events;\n if (events === undefined)\n return this;\n\n list = events[type];\n if (list === undefined)\n return this;\n\n if (list === listener || list.listener === listener) {\n if (--this._eventsCount === 0)\n this._events = Object.create(null);\n else {\n delete events[type];\n if (events.removeListener)\n this.emit('removeListener', type, list.listener || listener);\n }\n } else if (typeof list !== 'function') {\n position = -1;\n\n for (i = list.length - 1; i >= 0; i--) {\n if (list[i] === listener || list[i].listener === listener) {\n originalListener = list[i].listener;\n position = i;\n break;\n }\n }\n\n if (position < 0)\n return this;\n\n if (position === 0)\n list.shift();\n else {\n spliceOne(list, position);\n }\n\n if (list.length === 1)\n events[type] = list[0];\n\n if (events.removeListener !== undefined)\n this.emit('removeListener', type, originalListener || listener);\n }\n\n return this;\n };\n\nEventEmitter.prototype.off = EventEmitter.prototype.removeListener;\n\nEventEmitter.prototype.removeAllListeners =\n function removeAllListeners(type) {\n var listeners, events, i;\n\n events = this._events;\n if (events === undefined)\n return this;\n\n // not listening for removeListener, no need to emit\n if (events.removeListener === undefined) {\n if (arguments.length === 0) {\n this._events = Object.create(null);\n this._eventsCount = 0;\n } else if (events[type] !== undefined) {\n if (--this._eventsCount === 0)\n this._events = Object.create(null);\n else\n delete events[type];\n }\n return this;\n }\n\n // emit removeListener for all listeners on all events\n if (arguments.length === 0) {\n var keys = Object.keys(events);\n var key;\n for (i = 0; i < keys.length; ++i) {\n key = keys[i];\n if (key === 'removeListener') continue;\n this.removeAllListeners(key);\n }\n this.removeAllListeners('removeListener');\n this._events = Object.create(null);\n this._eventsCount = 0;\n return this;\n }\n\n listeners = events[type];\n\n if (typeof listeners === 'function') {\n this.removeListener(type, listeners);\n } else if (listeners !== undefined) {\n // LIFO order\n for (i = listeners.length - 1; i >= 0; i--) {\n this.removeListener(type, listeners[i]);\n }\n }\n\n return this;\n };\n\nfunction _listeners(target, type, unwrap) {\n var events = target._events;\n\n if (events === undefined)\n return [];\n\n var evlistener = events[type];\n if (evlistener === undefined)\n return [];\n\n if (typeof evlistener === 'function')\n return unwrap ? [evlistener.listener || evlistener] : [evlistener];\n\n return unwrap ?\n unwrapListeners(evlistener) : arrayClone(evlistener, evlistener.length);\n}\n\nEventEmitter.prototype.listeners = function listeners(type) {\n return _listeners(this, type, true);\n};\n\nEventEmitter.prototype.rawListeners = function rawListeners(type) {\n return _listeners(this, type, false);\n};\n\nEventEmitter.listenerCount = function(emitter, type) {\n if (typeof emitter.listenerCount === 'function') {\n return emitter.listenerCount(type);\n } else {\n return listenerCount.call(emitter, type);\n }\n};\n\nEventEmitter.prototype.listenerCount = listenerCount;\nfunction listenerCount(type) {\n var events = this._events;\n\n if (events !== undefined) {\n var evlistener = events[type];\n\n if (typeof evlistener === 'function') {\n return 1;\n } else if (evlistener !== undefined) {\n return evlistener.length;\n }\n }\n\n return 0;\n}\n\nEventEmitter.prototype.eventNames = function eventNames() {\n return this._eventsCount > 0 ? ReflectOwnKeys(this._events) : [];\n};\n\nfunction arrayClone(arr, n) {\n var copy = new Array(n);\n for (var i = 0; i < n; ++i)\n copy[i] = arr[i];\n return copy;\n}\n\nfunction spliceOne(list, index) {\n for (; index + 1 < list.length; index++)\n list[index] = list[index + 1];\n list.pop();\n}\n\nfunction unwrapListeners(arr) {\n var ret = new Array(arr.length);\n for (var i = 0; i < ret.length; ++i) {\n ret[i] = arr[i].listener || arr[i];\n }\n return ret;\n}\n\nfunction once(emitter, name) {\n return new Promise(function (resolve, reject) {\n function errorListener(err) {\n emitter.removeListener(name, resolver);\n reject(err);\n }\n\n function resolver() {\n if (typeof emitter.removeListener === 'function') {\n emitter.removeListener('error', errorListener);\n }\n resolve([].slice.call(arguments));\n };\n\n eventTargetAgnosticAddListener(emitter, name, resolver, { once: true });\n if (name !== 'error') {\n addErrorHandlerIfEventEmitter(emitter, errorListener, { once: true });\n }\n });\n}\n\nfunction addErrorHandlerIfEventEmitter(emitter, handler, flags) {\n if (typeof emitter.on === 'function') {\n eventTargetAgnosticAddListener(emitter, 'error', handler, flags);\n }\n}\n\nfunction eventTargetAgnosticAddListener(emitter, name, listener, flags) {\n if (typeof emitter.on === 'function') {\n if (flags.once) {\n emitter.once(name, listener);\n } else {\n emitter.on(name, listener);\n }\n } else if (typeof emitter.addEventListener === 'function') {\n // EventTarget does not have `error` event semantics like Node\n // EventEmitters, we do not listen for `error` events here.\n emitter.addEventListener(name, function wrapListener(arg) {\n // IE does not have builtin `{ once: true }` support so we\n // have to do it manually.\n if (flags.once) {\n emitter.removeEventListener(name, wrapListener);\n }\n listener(arg);\n });\n } else {\n throw new TypeError('The \"emitter\" argument must be of type EventEmitter. Received type ' + typeof emitter);\n }\n}\n","var Buffer = require('safe-buffer').Buffer\nvar MD5 = require('md5.js')\n\n/* eslint-disable camelcase */\nfunction EVP_BytesToKey (password, salt, keyBits, ivLen) {\n if (!Buffer.isBuffer(password)) password = Buffer.from(password, 'binary')\n if (salt) {\n if (!Buffer.isBuffer(salt)) salt = Buffer.from(salt, 'binary')\n if (salt.length !== 8) throw new RangeError('salt should be Buffer with 8 byte length')\n }\n\n var keyLen = keyBits / 8\n var key = Buffer.alloc(keyLen)\n var iv = Buffer.alloc(ivLen || 0)\n var tmp = Buffer.alloc(0)\n\n while (keyLen > 0 || ivLen > 0) {\n var hash = new MD5()\n hash.update(tmp)\n hash.update(password)\n if (salt) hash.update(salt)\n tmp = hash.digest()\n\n var used = 0\n\n if (keyLen > 0) {\n var keyStart = key.length - keyLen\n used = Math.min(keyLen, tmp.length)\n tmp.copy(key, keyStart, 0, used)\n keyLen -= used\n }\n\n if (used < tmp.length && ivLen > 0) {\n var ivStart = iv.length - ivLen\n var length = Math.min(ivLen, tmp.length - used)\n tmp.copy(iv, ivStart, used, used + length)\n ivLen -= length\n }\n }\n\n tmp.fill(0)\n return { key: key, iv: iv }\n}\n\nmodule.exports = EVP_BytesToKey\n","module.exports = function (glob, opts) {\n if (typeof glob !== 'string') {\n throw new TypeError('Expected a string');\n }\n\n var str = String(glob);\n\n // The regexp we are building, as a string.\n var reStr = \"\";\n\n // Whether we are matching so called \"extended\" globs (like bash) and should\n // support single character matching, matching ranges of characters, group\n // matching, etc.\n var extended = opts ? !!opts.extended : false;\n\n // When globstar is _false_ (default), '/foo/*' is translated a regexp like\n // '^\\/foo\\/.*$' which will match any string beginning with '/foo/'\n // When globstar is _true_, '/foo/*' is translated to regexp like\n // '^\\/foo\\/[^/]*$' which will match any string beginning with '/foo/' BUT\n // which does not have a '/' to the right of it.\n // E.g. with '/foo/*' these will match: '/foo/bar', '/foo/bar.txt' but\n // these will not '/foo/bar/baz', '/foo/bar/baz.txt'\n // Lastely, when globstar is _true_, '/foo/**' is equivelant to '/foo/*' when\n // globstar is _false_\n var globstar = opts ? !!opts.globstar : false;\n\n // If we are doing extended matching, this boolean is true when we are inside\n // a group (eg {*.html,*.js}), and false otherwise.\n var inGroup = false;\n\n // RegExp flags (eg \"i\" ) to pass in to RegExp constructor.\n var flags = opts && typeof( opts.flags ) === \"string\" ? opts.flags : \"\";\n\n var c;\n for (var i = 0, len = str.length; i < len; i++) {\n c = str[i];\n\n switch (c) {\n case \"\\\\\":\n case \"/\":\n case \"$\":\n case \"^\":\n case \"+\":\n case \".\":\n case \"(\":\n case \")\":\n case \"=\":\n case \"!\":\n case \"|\":\n reStr += \"\\\\\" + c;\n break;\n\n case \"?\":\n if (extended) {\n reStr += \".\";\n\t break;\n }\n\n case \"[\":\n case \"]\":\n if (extended) {\n reStr += c;\n\t break;\n }\n\n case \"{\":\n if (extended) {\n inGroup = true;\n\t reStr += \"(\";\n\t break;\n }\n\n case \"}\":\n if (extended) {\n inGroup = false;\n\t reStr += \")\";\n\t break;\n }\n\n case \",\":\n if (inGroup) {\n reStr += \"|\";\n\t break;\n }\n reStr += \"\\\\\" + c;\n break;\n\n case \"*\":\n // Move over all consecutive \"*\"'s.\n // Also store the previous and next characters\n var prevChar = str[i - 1];\n var starCount = 1;\n while(str[i + 1] === \"*\") {\n starCount++;\n i++;\n }\n var nextChar = str[i + 1];\n\n if (!globstar) {\n // globstar is disabled, so treat any number of \"*\" as one\n reStr += \".*\";\n } else {\n // globstar is enabled, so determine if this is a globstar segment\n var isGlobstar = starCount > 1 // multiple \"*\"'s\n && (prevChar === \"/\" || prevChar === undefined) // from the start of the segment\n && (nextChar === \"/\" || nextChar === undefined) // to the end of the segment\n\n if (isGlobstar) {\n // it's a globstar, so match zero or more path segments\n reStr += \"(?:[^/]*(?:\\/|$))*\";\n i++; // move over the \"/\"\n } else {\n // it's not a globstar, so only match one path segment\n reStr += \"[^/]*\";\n }\n }\n break;\n\n default:\n reStr += c;\n }\n }\n\n // When regexp 'g' flag is specified don't\n // constrain the regular expression with ^ & $\n if (!flags || !~flags.indexOf('g')) {\n reStr = \"^\" + reStr + \"$\";\n }\n\n return new RegExp(reStr, flags);\n};\n","'use strict'\nvar Buffer = require('safe-buffer').Buffer\nvar Transform = require('stream').Transform\nvar inherits = require('inherits')\n\nfunction throwIfNotStringOrBuffer (val, prefix) {\n if (!Buffer.isBuffer(val) && typeof val !== 'string') {\n throw new TypeError(prefix + ' must be a string or a buffer')\n }\n}\n\nfunction HashBase (blockSize) {\n Transform.call(this)\n\n this._block = Buffer.allocUnsafe(blockSize)\n this._blockSize = blockSize\n this._blockOffset = 0\n this._length = [0, 0, 0, 0]\n\n this._finalized = false\n}\n\ninherits(HashBase, Transform)\n\nHashBase.prototype._transform = function (chunk, encoding, callback) {\n var error = null\n try {\n this.update(chunk, encoding)\n } catch (err) {\n error = err\n }\n\n callback(error)\n}\n\nHashBase.prototype._flush = function (callback) {\n var error = null\n try {\n this.push(this.digest())\n } catch (err) {\n error = err\n }\n\n callback(error)\n}\n\nHashBase.prototype.update = function (data, encoding) {\n throwIfNotStringOrBuffer(data, 'Data')\n if (this._finalized) throw new Error('Digest already called')\n if (!Buffer.isBuffer(data)) data = Buffer.from(data, encoding)\n\n // consume data\n var block = this._block\n var offset = 0\n while (this._blockOffset + data.length - offset >= this._blockSize) {\n for (var i = this._blockOffset; i < this._blockSize;) block[i++] = data[offset++]\n this._update()\n this._blockOffset = 0\n }\n while (offset < data.length) block[this._blockOffset++] = data[offset++]\n\n // update length\n for (var j = 0, carry = data.length * 8; carry > 0; ++j) {\n this._length[j] += carry\n carry = (this._length[j] / 0x0100000000) | 0\n if (carry > 0) this._length[j] -= 0x0100000000 * carry\n }\n\n return this\n}\n\nHashBase.prototype._update = function () {\n throw new Error('_update is not implemented')\n}\n\nHashBase.prototype.digest = function (encoding) {\n if (this._finalized) throw new Error('Digest already called')\n this._finalized = true\n\n var digest = this._digest()\n if (encoding !== undefined) digest = digest.toString(encoding)\n\n // reset state\n this._block.fill(0)\n this._blockOffset = 0\n for (var i = 0; i < 4; ++i) this._length[i] = 0\n\n return digest\n}\n\nHashBase.prototype._digest = function () {\n throw new Error('_digest is not implemented')\n}\n\nmodule.exports = HashBase\n","var hash = exports;\n\nhash.utils = require('./hash/utils');\nhash.common = require('./hash/common');\nhash.sha = require('./hash/sha');\nhash.ripemd = require('./hash/ripemd');\nhash.hmac = require('./hash/hmac');\n\n// Proxy hash functions to the main object\nhash.sha1 = hash.sha.sha1;\nhash.sha256 = hash.sha.sha256;\nhash.sha224 = hash.sha.sha224;\nhash.sha384 = hash.sha.sha384;\nhash.sha512 = hash.sha.sha512;\nhash.ripemd160 = hash.ripemd.ripemd160;\n","'use strict';\n\nvar utils = require('./utils');\nvar assert = require('minimalistic-assert');\n\nfunction BlockHash() {\n this.pending = null;\n this.pendingTotal = 0;\n this.blockSize = this.constructor.blockSize;\n this.outSize = this.constructor.outSize;\n this.hmacStrength = this.constructor.hmacStrength;\n this.padLength = this.constructor.padLength / 8;\n this.endian = 'big';\n\n this._delta8 = this.blockSize / 8;\n this._delta32 = this.blockSize / 32;\n}\nexports.BlockHash = BlockHash;\n\nBlockHash.prototype.update = function update(msg, enc) {\n // Convert message to array, pad it, and join into 32bit blocks\n msg = utils.toArray(msg, enc);\n if (!this.pending)\n this.pending = msg;\n else\n this.pending = this.pending.concat(msg);\n this.pendingTotal += msg.length;\n\n // Enough data, try updating\n if (this.pending.length >= this._delta8) {\n msg = this.pending;\n\n // Process pending data in blocks\n var r = msg.length % this._delta8;\n this.pending = msg.slice(msg.length - r, msg.length);\n if (this.pending.length === 0)\n this.pending = null;\n\n msg = utils.join32(msg, 0, msg.length - r, this.endian);\n for (var i = 0; i < msg.length; i += this._delta32)\n this._update(msg, i, i + this._delta32);\n }\n\n return this;\n};\n\nBlockHash.prototype.digest = function digest(enc) {\n this.update(this._pad());\n assert(this.pending === null);\n\n return this._digest(enc);\n};\n\nBlockHash.prototype._pad = function pad() {\n var len = this.pendingTotal;\n var bytes = this._delta8;\n var k = bytes - ((len + this.padLength) % bytes);\n var res = new Array(k + this.padLength);\n res[0] = 0x80;\n for (var i = 1; i < k; i++)\n res[i] = 0;\n\n // Append length\n len <<= 3;\n if (this.endian === 'big') {\n for (var t = 8; t < this.padLength; t++)\n res[i++] = 0;\n\n res[i++] = 0;\n res[i++] = 0;\n res[i++] = 0;\n res[i++] = 0;\n res[i++] = (len >>> 24) & 0xff;\n res[i++] = (len >>> 16) & 0xff;\n res[i++] = (len >>> 8) & 0xff;\n res[i++] = len & 0xff;\n } else {\n res[i++] = len & 0xff;\n res[i++] = (len >>> 8) & 0xff;\n res[i++] = (len >>> 16) & 0xff;\n res[i++] = (len >>> 24) & 0xff;\n res[i++] = 0;\n res[i++] = 0;\n res[i++] = 0;\n res[i++] = 0;\n\n for (t = 8; t < this.padLength; t++)\n res[i++] = 0;\n }\n\n return res;\n};\n","'use strict';\n\nvar utils = require('./utils');\nvar assert = require('minimalistic-assert');\n\nfunction Hmac(hash, key, enc) {\n if (!(this instanceof Hmac))\n return new Hmac(hash, key, enc);\n this.Hash = hash;\n this.blockSize = hash.blockSize / 8;\n this.outSize = hash.outSize / 8;\n this.inner = null;\n this.outer = null;\n\n this._init(utils.toArray(key, enc));\n}\nmodule.exports = Hmac;\n\nHmac.prototype._init = function init(key) {\n // Shorten key, if needed\n if (key.length > this.blockSize)\n key = new this.Hash().update(key).digest();\n assert(key.length <= this.blockSize);\n\n // Add padding to key\n for (var i = key.length; i < this.blockSize; i++)\n key.push(0);\n\n for (i = 0; i < key.length; i++)\n key[i] ^= 0x36;\n this.inner = new this.Hash().update(key);\n\n // 0x36 ^ 0x5c = 0x6a\n for (i = 0; i < key.length; i++)\n key[i] ^= 0x6a;\n this.outer = new this.Hash().update(key);\n};\n\nHmac.prototype.update = function update(msg, enc) {\n this.inner.update(msg, enc);\n return this;\n};\n\nHmac.prototype.digest = function digest(enc) {\n this.outer.update(this.inner.digest());\n return this.outer.digest(enc);\n};\n","'use strict';\n\nvar utils = require('./utils');\nvar common = require('./common');\n\nvar rotl32 = utils.rotl32;\nvar sum32 = utils.sum32;\nvar sum32_3 = utils.sum32_3;\nvar sum32_4 = utils.sum32_4;\nvar BlockHash = common.BlockHash;\n\nfunction RIPEMD160() {\n if (!(this instanceof RIPEMD160))\n return new RIPEMD160();\n\n BlockHash.call(this);\n\n this.h = [ 0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0 ];\n this.endian = 'little';\n}\nutils.inherits(RIPEMD160, BlockHash);\nexports.ripemd160 = RIPEMD160;\n\nRIPEMD160.blockSize = 512;\nRIPEMD160.outSize = 160;\nRIPEMD160.hmacStrength = 192;\nRIPEMD160.padLength = 64;\n\nRIPEMD160.prototype._update = function update(msg, start) {\n var A = this.h[0];\n var B = this.h[1];\n var C = this.h[2];\n var D = this.h[3];\n var E = this.h[4];\n var Ah = A;\n var Bh = B;\n var Ch = C;\n var Dh = D;\n var Eh = E;\n for (var j = 0; j < 80; j++) {\n var T = sum32(\n rotl32(\n sum32_4(A, f(j, B, C, D), msg[r[j] + start], K(j)),\n s[j]),\n E);\n A = E;\n E = D;\n D = rotl32(C, 10);\n C = B;\n B = T;\n T = sum32(\n rotl32(\n sum32_4(Ah, f(79 - j, Bh, Ch, Dh), msg[rh[j] + start], Kh(j)),\n sh[j]),\n Eh);\n Ah = Eh;\n Eh = Dh;\n Dh = rotl32(Ch, 10);\n Ch = Bh;\n Bh = T;\n }\n T = sum32_3(this.h[1], C, Dh);\n this.h[1] = sum32_3(this.h[2], D, Eh);\n this.h[2] = sum32_3(this.h[3], E, Ah);\n this.h[3] = sum32_3(this.h[4], A, Bh);\n this.h[4] = sum32_3(this.h[0], B, Ch);\n this.h[0] = T;\n};\n\nRIPEMD160.prototype._digest = function digest(enc) {\n if (enc === 'hex')\n return utils.toHex32(this.h, 'little');\n else\n return utils.split32(this.h, 'little');\n};\n\nfunction f(j, x, y, z) {\n if (j <= 15)\n return x ^ y ^ z;\n else if (j <= 31)\n return (x & y) | ((~x) & z);\n else if (j <= 47)\n return (x | (~y)) ^ z;\n else if (j <= 63)\n return (x & z) | (y & (~z));\n else\n return x ^ (y | (~z));\n}\n\nfunction K(j) {\n if (j <= 15)\n return 0x00000000;\n else if (j <= 31)\n return 0x5a827999;\n else if (j <= 47)\n return 0x6ed9eba1;\n else if (j <= 63)\n return 0x8f1bbcdc;\n else\n return 0xa953fd4e;\n}\n\nfunction Kh(j) {\n if (j <= 15)\n return 0x50a28be6;\n else if (j <= 31)\n return 0x5c4dd124;\n else if (j <= 47)\n return 0x6d703ef3;\n else if (j <= 63)\n return 0x7a6d76e9;\n else\n return 0x00000000;\n}\n\nvar r = [\n 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,\n 7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8,\n 3, 10, 14, 4, 9, 15, 8, 1, 2, 7, 0, 6, 13, 11, 5, 12,\n 1, 9, 11, 10, 0, 8, 12, 4, 13, 3, 7, 15, 14, 5, 6, 2,\n 4, 0, 5, 9, 7, 12, 2, 10, 14, 1, 3, 8, 11, 6, 15, 13\n];\n\nvar rh = [\n 5, 14, 7, 0, 9, 2, 11, 4, 13, 6, 15, 8, 1, 10, 3, 12,\n 6, 11, 3, 7, 0, 13, 5, 10, 14, 15, 8, 12, 4, 9, 1, 2,\n 15, 5, 1, 3, 7, 14, 6, 9, 11, 8, 12, 2, 10, 0, 4, 13,\n 8, 6, 4, 1, 3, 11, 15, 0, 5, 12, 2, 13, 9, 7, 10, 14,\n 12, 15, 10, 4, 1, 5, 8, 7, 6, 2, 13, 14, 0, 3, 9, 11\n];\n\nvar s = [\n 11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8,\n 7, 6, 8, 13, 11, 9, 7, 15, 7, 12, 15, 9, 11, 7, 13, 12,\n 11, 13, 6, 7, 14, 9, 13, 15, 14, 8, 13, 6, 5, 12, 7, 5,\n 11, 12, 14, 15, 14, 15, 9, 8, 9, 14, 5, 6, 8, 6, 5, 12,\n 9, 15, 5, 11, 6, 8, 13, 12, 5, 12, 13, 14, 11, 8, 5, 6\n];\n\nvar sh = [\n 8, 9, 9, 11, 13, 15, 15, 5, 7, 7, 8, 11, 14, 14, 12, 6,\n 9, 13, 15, 7, 12, 8, 9, 11, 7, 7, 12, 7, 6, 15, 13, 11,\n 9, 7, 15, 11, 8, 6, 6, 14, 12, 13, 5, 14, 13, 13, 7, 5,\n 15, 5, 8, 11, 14, 14, 6, 14, 6, 9, 12, 9, 12, 5, 15, 8,\n 8, 5, 12, 9, 12, 5, 14, 6, 8, 13, 6, 5, 15, 13, 11, 11\n];\n","'use strict';\n\nexports.sha1 = require('./sha/1');\nexports.sha224 = require('./sha/224');\nexports.sha256 = require('./sha/256');\nexports.sha384 = require('./sha/384');\nexports.sha512 = require('./sha/512');\n","'use strict';\n\nvar utils = require('../utils');\nvar common = require('../common');\nvar shaCommon = require('./common');\n\nvar rotl32 = utils.rotl32;\nvar sum32 = utils.sum32;\nvar sum32_5 = utils.sum32_5;\nvar ft_1 = shaCommon.ft_1;\nvar BlockHash = common.BlockHash;\n\nvar sha1_K = [\n 0x5A827999, 0x6ED9EBA1,\n 0x8F1BBCDC, 0xCA62C1D6\n];\n\nfunction SHA1() {\n if (!(this instanceof SHA1))\n return new SHA1();\n\n BlockHash.call(this);\n this.h = [\n 0x67452301, 0xefcdab89, 0x98badcfe,\n 0x10325476, 0xc3d2e1f0 ];\n this.W = new Array(80);\n}\n\nutils.inherits(SHA1, BlockHash);\nmodule.exports = SHA1;\n\nSHA1.blockSize = 512;\nSHA1.outSize = 160;\nSHA1.hmacStrength = 80;\nSHA1.padLength = 64;\n\nSHA1.prototype._update = function _update(msg, start) {\n var W = this.W;\n\n for (var i = 0; i < 16; i++)\n W[i] = msg[start + i];\n\n for(; i < W.length; i++)\n W[i] = rotl32(W[i - 3] ^ W[i - 8] ^ W[i - 14] ^ W[i - 16], 1);\n\n var a = this.h[0];\n var b = this.h[1];\n var c = this.h[2];\n var d = this.h[3];\n var e = this.h[4];\n\n for (i = 0; i < W.length; i++) {\n var s = ~~(i / 20);\n var t = sum32_5(rotl32(a, 5), ft_1(s, b, c, d), e, W[i], sha1_K[s]);\n e = d;\n d = c;\n c = rotl32(b, 30);\n b = a;\n a = t;\n }\n\n this.h[0] = sum32(this.h[0], a);\n this.h[1] = sum32(this.h[1], b);\n this.h[2] = sum32(this.h[2], c);\n this.h[3] = sum32(this.h[3], d);\n this.h[4] = sum32(this.h[4], e);\n};\n\nSHA1.prototype._digest = function digest(enc) {\n if (enc === 'hex')\n return utils.toHex32(this.h, 'big');\n else\n return utils.split32(this.h, 'big');\n};\n","'use strict';\n\nvar utils = require('../utils');\nvar SHA256 = require('./256');\n\nfunction SHA224() {\n if (!(this instanceof SHA224))\n return new SHA224();\n\n SHA256.call(this);\n this.h = [\n 0xc1059ed8, 0x367cd507, 0x3070dd17, 0xf70e5939,\n 0xffc00b31, 0x68581511, 0x64f98fa7, 0xbefa4fa4 ];\n}\nutils.inherits(SHA224, SHA256);\nmodule.exports = SHA224;\n\nSHA224.blockSize = 512;\nSHA224.outSize = 224;\nSHA224.hmacStrength = 192;\nSHA224.padLength = 64;\n\nSHA224.prototype._digest = function digest(enc) {\n // Just truncate output\n if (enc === 'hex')\n return utils.toHex32(this.h.slice(0, 7), 'big');\n else\n return utils.split32(this.h.slice(0, 7), 'big');\n};\n\n","'use strict';\n\nvar utils = require('../utils');\nvar common = require('../common');\nvar shaCommon = require('./common');\nvar assert = require('minimalistic-assert');\n\nvar sum32 = utils.sum32;\nvar sum32_4 = utils.sum32_4;\nvar sum32_5 = utils.sum32_5;\nvar ch32 = shaCommon.ch32;\nvar maj32 = shaCommon.maj32;\nvar s0_256 = shaCommon.s0_256;\nvar s1_256 = shaCommon.s1_256;\nvar g0_256 = shaCommon.g0_256;\nvar g1_256 = shaCommon.g1_256;\n\nvar BlockHash = common.BlockHash;\n\nvar sha256_K = [\n 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5,\n 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5,\n 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3,\n 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174,\n 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc,\n 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da,\n 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7,\n 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967,\n 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13,\n 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85,\n 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3,\n 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070,\n 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5,\n 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3,\n 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208,\n 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2\n];\n\nfunction SHA256() {\n if (!(this instanceof SHA256))\n return new SHA256();\n\n BlockHash.call(this);\n this.h = [\n 0x6a09e667, 0xbb67ae85, 0x3c6ef372, 0xa54ff53a,\n 0x510e527f, 0x9b05688c, 0x1f83d9ab, 0x5be0cd19\n ];\n this.k = sha256_K;\n this.W = new Array(64);\n}\nutils.inherits(SHA256, BlockHash);\nmodule.exports = SHA256;\n\nSHA256.blockSize = 512;\nSHA256.outSize = 256;\nSHA256.hmacStrength = 192;\nSHA256.padLength = 64;\n\nSHA256.prototype._update = function _update(msg, start) {\n var W = this.W;\n\n for (var i = 0; i < 16; i++)\n W[i] = msg[start + i];\n for (; i < W.length; i++)\n W[i] = sum32_4(g1_256(W[i - 2]), W[i - 7], g0_256(W[i - 15]), W[i - 16]);\n\n var a = this.h[0];\n var b = this.h[1];\n var c = this.h[2];\n var d = this.h[3];\n var e = this.h[4];\n var f = this.h[5];\n var g = this.h[6];\n var h = this.h[7];\n\n assert(this.k.length === W.length);\n for (i = 0; i < W.length; i++) {\n var T1 = sum32_5(h, s1_256(e), ch32(e, f, g), this.k[i], W[i]);\n var T2 = sum32(s0_256(a), maj32(a, b, c));\n h = g;\n g = f;\n f = e;\n e = sum32(d, T1);\n d = c;\n c = b;\n b = a;\n a = sum32(T1, T2);\n }\n\n this.h[0] = sum32(this.h[0], a);\n this.h[1] = sum32(this.h[1], b);\n this.h[2] = sum32(this.h[2], c);\n this.h[3] = sum32(this.h[3], d);\n this.h[4] = sum32(this.h[4], e);\n this.h[5] = sum32(this.h[5], f);\n this.h[6] = sum32(this.h[6], g);\n this.h[7] = sum32(this.h[7], h);\n};\n\nSHA256.prototype._digest = function digest(enc) {\n if (enc === 'hex')\n return utils.toHex32(this.h, 'big');\n else\n return utils.split32(this.h, 'big');\n};\n","'use strict';\n\nvar utils = require('../utils');\n\nvar SHA512 = require('./512');\n\nfunction SHA384() {\n if (!(this instanceof SHA384))\n return new SHA384();\n\n SHA512.call(this);\n this.h = [\n 0xcbbb9d5d, 0xc1059ed8,\n 0x629a292a, 0x367cd507,\n 0x9159015a, 0x3070dd17,\n 0x152fecd8, 0xf70e5939,\n 0x67332667, 0xffc00b31,\n 0x8eb44a87, 0x68581511,\n 0xdb0c2e0d, 0x64f98fa7,\n 0x47b5481d, 0xbefa4fa4 ];\n}\nutils.inherits(SHA384, SHA512);\nmodule.exports = SHA384;\n\nSHA384.blockSize = 1024;\nSHA384.outSize = 384;\nSHA384.hmacStrength = 192;\nSHA384.padLength = 128;\n\nSHA384.prototype._digest = function digest(enc) {\n if (enc === 'hex')\n return utils.toHex32(this.h.slice(0, 12), 'big');\n else\n return utils.split32(this.h.slice(0, 12), 'big');\n};\n","'use strict';\n\nvar utils = require('../utils');\nvar common = require('../common');\nvar assert = require('minimalistic-assert');\n\nvar rotr64_hi = utils.rotr64_hi;\nvar rotr64_lo = utils.rotr64_lo;\nvar shr64_hi = utils.shr64_hi;\nvar shr64_lo = utils.shr64_lo;\nvar sum64 = utils.sum64;\nvar sum64_hi = utils.sum64_hi;\nvar sum64_lo = utils.sum64_lo;\nvar sum64_4_hi = utils.sum64_4_hi;\nvar sum64_4_lo = utils.sum64_4_lo;\nvar sum64_5_hi = utils.sum64_5_hi;\nvar sum64_5_lo = utils.sum64_5_lo;\n\nvar BlockHash = common.BlockHash;\n\nvar sha512_K = [\n 0x428a2f98, 0xd728ae22, 0x71374491, 0x23ef65cd,\n 0xb5c0fbcf, 0xec4d3b2f, 0xe9b5dba5, 0x8189dbbc,\n 0x3956c25b, 0xf348b538, 0x59f111f1, 0xb605d019,\n 0x923f82a4, 0xaf194f9b, 0xab1c5ed5, 0xda6d8118,\n 0xd807aa98, 0xa3030242, 0x12835b01, 0x45706fbe,\n 0x243185be, 0x4ee4b28c, 0x550c7dc3, 0xd5ffb4e2,\n 0x72be5d74, 0xf27b896f, 0x80deb1fe, 0x3b1696b1,\n 0x9bdc06a7, 0x25c71235, 0xc19bf174, 0xcf692694,\n 0xe49b69c1, 0x9ef14ad2, 0xefbe4786, 0x384f25e3,\n 0x0fc19dc6, 0x8b8cd5b5, 0x240ca1cc, 0x77ac9c65,\n 0x2de92c6f, 0x592b0275, 0x4a7484aa, 0x6ea6e483,\n 0x5cb0a9dc, 0xbd41fbd4, 0x76f988da, 0x831153b5,\n 0x983e5152, 0xee66dfab, 0xa831c66d, 0x2db43210,\n 0xb00327c8, 0x98fb213f, 0xbf597fc7, 0xbeef0ee4,\n 0xc6e00bf3, 0x3da88fc2, 0xd5a79147, 0x930aa725,\n 0x06ca6351, 0xe003826f, 0x14292967, 0x0a0e6e70,\n 0x27b70a85, 0x46d22ffc, 0x2e1b2138, 0x5c26c926,\n 0x4d2c6dfc, 0x5ac42aed, 0x53380d13, 0x9d95b3df,\n 0x650a7354, 0x8baf63de, 0x766a0abb, 0x3c77b2a8,\n 0x81c2c92e, 0x47edaee6, 0x92722c85, 0x1482353b,\n 0xa2bfe8a1, 0x4cf10364, 0xa81a664b, 0xbc423001,\n 0xc24b8b70, 0xd0f89791, 0xc76c51a3, 0x0654be30,\n 0xd192e819, 0xd6ef5218, 0xd6990624, 0x5565a910,\n 0xf40e3585, 0x5771202a, 0x106aa070, 0x32bbd1b8,\n 0x19a4c116, 0xb8d2d0c8, 0x1e376c08, 0x5141ab53,\n 0x2748774c, 0xdf8eeb99, 0x34b0bcb5, 0xe19b48a8,\n 0x391c0cb3, 0xc5c95a63, 0x4ed8aa4a, 0xe3418acb,\n 0x5b9cca4f, 0x7763e373, 0x682e6ff3, 0xd6b2b8a3,\n 0x748f82ee, 0x5defb2fc, 0x78a5636f, 0x43172f60,\n 0x84c87814, 0xa1f0ab72, 0x8cc70208, 0x1a6439ec,\n 0x90befffa, 0x23631e28, 0xa4506ceb, 0xde82bde9,\n 0xbef9a3f7, 0xb2c67915, 0xc67178f2, 0xe372532b,\n 0xca273ece, 0xea26619c, 0xd186b8c7, 0x21c0c207,\n 0xeada7dd6, 0xcde0eb1e, 0xf57d4f7f, 0xee6ed178,\n 0x06f067aa, 0x72176fba, 0x0a637dc5, 0xa2c898a6,\n 0x113f9804, 0xbef90dae, 0x1b710b35, 0x131c471b,\n 0x28db77f5, 0x23047d84, 0x32caab7b, 0x40c72493,\n 0x3c9ebe0a, 0x15c9bebc, 0x431d67c4, 0x9c100d4c,\n 0x4cc5d4be, 0xcb3e42b6, 0x597f299c, 0xfc657e2a,\n 0x5fcb6fab, 0x3ad6faec, 0x6c44198c, 0x4a475817\n];\n\nfunction SHA512() {\n if (!(this instanceof SHA512))\n return new SHA512();\n\n BlockHash.call(this);\n this.h = [\n 0x6a09e667, 0xf3bcc908,\n 0xbb67ae85, 0x84caa73b,\n 0x3c6ef372, 0xfe94f82b,\n 0xa54ff53a, 0x5f1d36f1,\n 0x510e527f, 0xade682d1,\n 0x9b05688c, 0x2b3e6c1f,\n 0x1f83d9ab, 0xfb41bd6b,\n 0x5be0cd19, 0x137e2179 ];\n this.k = sha512_K;\n this.W = new Array(160);\n}\nutils.inherits(SHA512, BlockHash);\nmodule.exports = SHA512;\n\nSHA512.blockSize = 1024;\nSHA512.outSize = 512;\nSHA512.hmacStrength = 192;\nSHA512.padLength = 128;\n\nSHA512.prototype._prepareBlock = function _prepareBlock(msg, start) {\n var W = this.W;\n\n // 32 x 32bit words\n for (var i = 0; i < 32; i++)\n W[i] = msg[start + i];\n for (; i < W.length; i += 2) {\n var c0_hi = g1_512_hi(W[i - 4], W[i - 3]); // i - 2\n var c0_lo = g1_512_lo(W[i - 4], W[i - 3]);\n var c1_hi = W[i - 14]; // i - 7\n var c1_lo = W[i - 13];\n var c2_hi = g0_512_hi(W[i - 30], W[i - 29]); // i - 15\n var c2_lo = g0_512_lo(W[i - 30], W[i - 29]);\n var c3_hi = W[i - 32]; // i - 16\n var c3_lo = W[i - 31];\n\n W[i] = sum64_4_hi(\n c0_hi, c0_lo,\n c1_hi, c1_lo,\n c2_hi, c2_lo,\n c3_hi, c3_lo);\n W[i + 1] = sum64_4_lo(\n c0_hi, c0_lo,\n c1_hi, c1_lo,\n c2_hi, c2_lo,\n c3_hi, c3_lo);\n }\n};\n\nSHA512.prototype._update = function _update(msg, start) {\n this._prepareBlock(msg, start);\n\n var W = this.W;\n\n var ah = this.h[0];\n var al = this.h[1];\n var bh = this.h[2];\n var bl = this.h[3];\n var ch = this.h[4];\n var cl = this.h[5];\n var dh = this.h[6];\n var dl = this.h[7];\n var eh = this.h[8];\n var el = this.h[9];\n var fh = this.h[10];\n var fl = this.h[11];\n var gh = this.h[12];\n var gl = this.h[13];\n var hh = this.h[14];\n var hl = this.h[15];\n\n assert(this.k.length === W.length);\n for (var i = 0; i < W.length; i += 2) {\n var c0_hi = hh;\n var c0_lo = hl;\n var c1_hi = s1_512_hi(eh, el);\n var c1_lo = s1_512_lo(eh, el);\n var c2_hi = ch64_hi(eh, el, fh, fl, gh, gl);\n var c2_lo = ch64_lo(eh, el, fh, fl, gh, gl);\n var c3_hi = this.k[i];\n var c3_lo = this.k[i + 1];\n var c4_hi = W[i];\n var c4_lo = W[i + 1];\n\n var T1_hi = sum64_5_hi(\n c0_hi, c0_lo,\n c1_hi, c1_lo,\n c2_hi, c2_lo,\n c3_hi, c3_lo,\n c4_hi, c4_lo);\n var T1_lo = sum64_5_lo(\n c0_hi, c0_lo,\n c1_hi, c1_lo,\n c2_hi, c2_lo,\n c3_hi, c3_lo,\n c4_hi, c4_lo);\n\n c0_hi = s0_512_hi(ah, al);\n c0_lo = s0_512_lo(ah, al);\n c1_hi = maj64_hi(ah, al, bh, bl, ch, cl);\n c1_lo = maj64_lo(ah, al, bh, bl, ch, cl);\n\n var T2_hi = sum64_hi(c0_hi, c0_lo, c1_hi, c1_lo);\n var T2_lo = sum64_lo(c0_hi, c0_lo, c1_hi, c1_lo);\n\n hh = gh;\n hl = gl;\n\n gh = fh;\n gl = fl;\n\n fh = eh;\n fl = el;\n\n eh = sum64_hi(dh, dl, T1_hi, T1_lo);\n el = sum64_lo(dl, dl, T1_hi, T1_lo);\n\n dh = ch;\n dl = cl;\n\n ch = bh;\n cl = bl;\n\n bh = ah;\n bl = al;\n\n ah = sum64_hi(T1_hi, T1_lo, T2_hi, T2_lo);\n al = sum64_lo(T1_hi, T1_lo, T2_hi, T2_lo);\n }\n\n sum64(this.h, 0, ah, al);\n sum64(this.h, 2, bh, bl);\n sum64(this.h, 4, ch, cl);\n sum64(this.h, 6, dh, dl);\n sum64(this.h, 8, eh, el);\n sum64(this.h, 10, fh, fl);\n sum64(this.h, 12, gh, gl);\n sum64(this.h, 14, hh, hl);\n};\n\nSHA512.prototype._digest = function digest(enc) {\n if (enc === 'hex')\n return utils.toHex32(this.h, 'big');\n else\n return utils.split32(this.h, 'big');\n};\n\nfunction ch64_hi(xh, xl, yh, yl, zh) {\n var r = (xh & yh) ^ ((~xh) & zh);\n if (r < 0)\n r += 0x100000000;\n return r;\n}\n\nfunction ch64_lo(xh, xl, yh, yl, zh, zl) {\n var r = (xl & yl) ^ ((~xl) & zl);\n if (r < 0)\n r += 0x100000000;\n return r;\n}\n\nfunction maj64_hi(xh, xl, yh, yl, zh) {\n var r = (xh & yh) ^ (xh & zh) ^ (yh & zh);\n if (r < 0)\n r += 0x100000000;\n return r;\n}\n\nfunction maj64_lo(xh, xl, yh, yl, zh, zl) {\n var r = (xl & yl) ^ (xl & zl) ^ (yl & zl);\n if (r < 0)\n r += 0x100000000;\n return r;\n}\n\nfunction s0_512_hi(xh, xl) {\n var c0_hi = rotr64_hi(xh, xl, 28);\n var c1_hi = rotr64_hi(xl, xh, 2); // 34\n var c2_hi = rotr64_hi(xl, xh, 7); // 39\n\n var r = c0_hi ^ c1_hi ^ c2_hi;\n if (r < 0)\n r += 0x100000000;\n return r;\n}\n\nfunction s0_512_lo(xh, xl) {\n var c0_lo = rotr64_lo(xh, xl, 28);\n var c1_lo = rotr64_lo(xl, xh, 2); // 34\n var c2_lo = rotr64_lo(xl, xh, 7); // 39\n\n var r = c0_lo ^ c1_lo ^ c2_lo;\n if (r < 0)\n r += 0x100000000;\n return r;\n}\n\nfunction s1_512_hi(xh, xl) {\n var c0_hi = rotr64_hi(xh, xl, 14);\n var c1_hi = rotr64_hi(xh, xl, 18);\n var c2_hi = rotr64_hi(xl, xh, 9); // 41\n\n var r = c0_hi ^ c1_hi ^ c2_hi;\n if (r < 0)\n r += 0x100000000;\n return r;\n}\n\nfunction s1_512_lo(xh, xl) {\n var c0_lo = rotr64_lo(xh, xl, 14);\n var c1_lo = rotr64_lo(xh, xl, 18);\n var c2_lo = rotr64_lo(xl, xh, 9); // 41\n\n var r = c0_lo ^ c1_lo ^ c2_lo;\n if (r < 0)\n r += 0x100000000;\n return r;\n}\n\nfunction g0_512_hi(xh, xl) {\n var c0_hi = rotr64_hi(xh, xl, 1);\n var c1_hi = rotr64_hi(xh, xl, 8);\n var c2_hi = shr64_hi(xh, xl, 7);\n\n var r = c0_hi ^ c1_hi ^ c2_hi;\n if (r < 0)\n r += 0x100000000;\n return r;\n}\n\nfunction g0_512_lo(xh, xl) {\n var c0_lo = rotr64_lo(xh, xl, 1);\n var c1_lo = rotr64_lo(xh, xl, 8);\n var c2_lo = shr64_lo(xh, xl, 7);\n\n var r = c0_lo ^ c1_lo ^ c2_lo;\n if (r < 0)\n r += 0x100000000;\n return r;\n}\n\nfunction g1_512_hi(xh, xl) {\n var c0_hi = rotr64_hi(xh, xl, 19);\n var c1_hi = rotr64_hi(xl, xh, 29); // 61\n var c2_hi = shr64_hi(xh, xl, 6);\n\n var r = c0_hi ^ c1_hi ^ c2_hi;\n if (r < 0)\n r += 0x100000000;\n return r;\n}\n\nfunction g1_512_lo(xh, xl) {\n var c0_lo = rotr64_lo(xh, xl, 19);\n var c1_lo = rotr64_lo(xl, xh, 29); // 61\n var c2_lo = shr64_lo(xh, xl, 6);\n\n var r = c0_lo ^ c1_lo ^ c2_lo;\n if (r < 0)\n r += 0x100000000;\n return r;\n}\n","'use strict';\n\nvar utils = require('../utils');\nvar rotr32 = utils.rotr32;\n\nfunction ft_1(s, x, y, z) {\n if (s === 0)\n return ch32(x, y, z);\n if (s === 1 || s === 3)\n return p32(x, y, z);\n if (s === 2)\n return maj32(x, y, z);\n}\nexports.ft_1 = ft_1;\n\nfunction ch32(x, y, z) {\n return (x & y) ^ ((~x) & z);\n}\nexports.ch32 = ch32;\n\nfunction maj32(x, y, z) {\n return (x & y) ^ (x & z) ^ (y & z);\n}\nexports.maj32 = maj32;\n\nfunction p32(x, y, z) {\n return x ^ y ^ z;\n}\nexports.p32 = p32;\n\nfunction s0_256(x) {\n return rotr32(x, 2) ^ rotr32(x, 13) ^ rotr32(x, 22);\n}\nexports.s0_256 = s0_256;\n\nfunction s1_256(x) {\n return rotr32(x, 6) ^ rotr32(x, 11) ^ rotr32(x, 25);\n}\nexports.s1_256 = s1_256;\n\nfunction g0_256(x) {\n return rotr32(x, 7) ^ rotr32(x, 18) ^ (x >>> 3);\n}\nexports.g0_256 = g0_256;\n\nfunction g1_256(x) {\n return rotr32(x, 17) ^ rotr32(x, 19) ^ (x >>> 10);\n}\nexports.g1_256 = g1_256;\n","'use strict';\n\nvar assert = require('minimalistic-assert');\nvar inherits = require('inherits');\n\nexports.inherits = inherits;\n\nfunction isSurrogatePair(msg, i) {\n if ((msg.charCodeAt(i) & 0xFC00) !== 0xD800) {\n return false;\n }\n if (i < 0 || i + 1 >= msg.length) {\n return false;\n }\n return (msg.charCodeAt(i + 1) & 0xFC00) === 0xDC00;\n}\n\nfunction toArray(msg, enc) {\n if (Array.isArray(msg))\n return msg.slice();\n if (!msg)\n return [];\n var res = [];\n if (typeof msg === 'string') {\n if (!enc) {\n // Inspired by stringToUtf8ByteArray() in closure-library by Google\n // https://github.com/google/closure-library/blob/8598d87242af59aac233270742c8984e2b2bdbe0/closure/goog/crypt/crypt.js#L117-L143\n // Apache License 2.0\n // https://github.com/google/closure-library/blob/master/LICENSE\n var p = 0;\n for (var i = 0; i < msg.length; i++) {\n var c = msg.charCodeAt(i);\n if (c < 128) {\n res[p++] = c;\n } else if (c < 2048) {\n res[p++] = (c >> 6) | 192;\n res[p++] = (c & 63) | 128;\n } else if (isSurrogatePair(msg, i)) {\n c = 0x10000 + ((c & 0x03FF) << 10) + (msg.charCodeAt(++i) & 0x03FF);\n res[p++] = (c >> 18) | 240;\n res[p++] = ((c >> 12) & 63) | 128;\n res[p++] = ((c >> 6) & 63) | 128;\n res[p++] = (c & 63) | 128;\n } else {\n res[p++] = (c >> 12) | 224;\n res[p++] = ((c >> 6) & 63) | 128;\n res[p++] = (c & 63) | 128;\n }\n }\n } else if (enc === 'hex') {\n msg = msg.replace(/[^a-z0-9]+/ig, '');\n if (msg.length % 2 !== 0)\n msg = '0' + msg;\n for (i = 0; i < msg.length; i += 2)\n res.push(parseInt(msg[i] + msg[i + 1], 16));\n }\n } else {\n for (i = 0; i < msg.length; i++)\n res[i] = msg[i] | 0;\n }\n return res;\n}\nexports.toArray = toArray;\n\nfunction toHex(msg) {\n var res = '';\n for (var i = 0; i < msg.length; i++)\n res += zero2(msg[i].toString(16));\n return res;\n}\nexports.toHex = toHex;\n\nfunction htonl(w) {\n var res = (w >>> 24) |\n ((w >>> 8) & 0xff00) |\n ((w << 8) & 0xff0000) |\n ((w & 0xff) << 24);\n return res >>> 0;\n}\nexports.htonl = htonl;\n\nfunction toHex32(msg, endian) {\n var res = '';\n for (var i = 0; i < msg.length; i++) {\n var w = msg[i];\n if (endian === 'little')\n w = htonl(w);\n res += zero8(w.toString(16));\n }\n return res;\n}\nexports.toHex32 = toHex32;\n\nfunction zero2(word) {\n if (word.length === 1)\n return '0' + word;\n else\n return word;\n}\nexports.zero2 = zero2;\n\nfunction zero8(word) {\n if (word.length === 7)\n return '0' + word;\n else if (word.length === 6)\n return '00' + word;\n else if (word.length === 5)\n return '000' + word;\n else if (word.length === 4)\n return '0000' + word;\n else if (word.length === 3)\n return '00000' + word;\n else if (word.length === 2)\n return '000000' + word;\n else if (word.length === 1)\n return '0000000' + word;\n else\n return word;\n}\nexports.zero8 = zero8;\n\nfunction join32(msg, start, end, endian) {\n var len = end - start;\n assert(len % 4 === 0);\n var res = new Array(len / 4);\n for (var i = 0, k = start; i < res.length; i++, k += 4) {\n var w;\n if (endian === 'big')\n w = (msg[k] << 24) | (msg[k + 1] << 16) | (msg[k + 2] << 8) | msg[k + 3];\n else\n w = (msg[k + 3] << 24) | (msg[k + 2] << 16) | (msg[k + 1] << 8) | msg[k];\n res[i] = w >>> 0;\n }\n return res;\n}\nexports.join32 = join32;\n\nfunction split32(msg, endian) {\n var res = new Array(msg.length * 4);\n for (var i = 0, k = 0; i < msg.length; i++, k += 4) {\n var m = msg[i];\n if (endian === 'big') {\n res[k] = m >>> 24;\n res[k + 1] = (m >>> 16) & 0xff;\n res[k + 2] = (m >>> 8) & 0xff;\n res[k + 3] = m & 0xff;\n } else {\n res[k + 3] = m >>> 24;\n res[k + 2] = (m >>> 16) & 0xff;\n res[k + 1] = (m >>> 8) & 0xff;\n res[k] = m & 0xff;\n }\n }\n return res;\n}\nexports.split32 = split32;\n\nfunction rotr32(w, b) {\n return (w >>> b) | (w << (32 - b));\n}\nexports.rotr32 = rotr32;\n\nfunction rotl32(w, b) {\n return (w << b) | (w >>> (32 - b));\n}\nexports.rotl32 = rotl32;\n\nfunction sum32(a, b) {\n return (a + b) >>> 0;\n}\nexports.sum32 = sum32;\n\nfunction sum32_3(a, b, c) {\n return (a + b + c) >>> 0;\n}\nexports.sum32_3 = sum32_3;\n\nfunction sum32_4(a, b, c, d) {\n return (a + b + c + d) >>> 0;\n}\nexports.sum32_4 = sum32_4;\n\nfunction sum32_5(a, b, c, d, e) {\n return (a + b + c + d + e) >>> 0;\n}\nexports.sum32_5 = sum32_5;\n\nfunction sum64(buf, pos, ah, al) {\n var bh = buf[pos];\n var bl = buf[pos + 1];\n\n var lo = (al + bl) >>> 0;\n var hi = (lo < al ? 1 : 0) + ah + bh;\n buf[pos] = hi >>> 0;\n buf[pos + 1] = lo;\n}\nexports.sum64 = sum64;\n\nfunction sum64_hi(ah, al, bh, bl) {\n var lo = (al + bl) >>> 0;\n var hi = (lo < al ? 1 : 0) + ah + bh;\n return hi >>> 0;\n}\nexports.sum64_hi = sum64_hi;\n\nfunction sum64_lo(ah, al, bh, bl) {\n var lo = al + bl;\n return lo >>> 0;\n}\nexports.sum64_lo = sum64_lo;\n\nfunction sum64_4_hi(ah, al, bh, bl, ch, cl, dh, dl) {\n var carry = 0;\n var lo = al;\n lo = (lo + bl) >>> 0;\n carry += lo < al ? 1 : 0;\n lo = (lo + cl) >>> 0;\n carry += lo < cl ? 1 : 0;\n lo = (lo + dl) >>> 0;\n carry += lo < dl ? 1 : 0;\n\n var hi = ah + bh + ch + dh + carry;\n return hi >>> 0;\n}\nexports.sum64_4_hi = sum64_4_hi;\n\nfunction sum64_4_lo(ah, al, bh, bl, ch, cl, dh, dl) {\n var lo = al + bl + cl + dl;\n return lo >>> 0;\n}\nexports.sum64_4_lo = sum64_4_lo;\n\nfunction sum64_5_hi(ah, al, bh, bl, ch, cl, dh, dl, eh, el) {\n var carry = 0;\n var lo = al;\n lo = (lo + bl) >>> 0;\n carry += lo < al ? 1 : 0;\n lo = (lo + cl) >>> 0;\n carry += lo < cl ? 1 : 0;\n lo = (lo + dl) >>> 0;\n carry += lo < dl ? 1 : 0;\n lo = (lo + el) >>> 0;\n carry += lo < el ? 1 : 0;\n\n var hi = ah + bh + ch + dh + eh + carry;\n return hi >>> 0;\n}\nexports.sum64_5_hi = sum64_5_hi;\n\nfunction sum64_5_lo(ah, al, bh, bl, ch, cl, dh, dl, eh, el) {\n var lo = al + bl + cl + dl + el;\n\n return lo >>> 0;\n}\nexports.sum64_5_lo = sum64_5_lo;\n\nfunction rotr64_hi(ah, al, num) {\n var r = (al << (32 - num)) | (ah >>> num);\n return r >>> 0;\n}\nexports.rotr64_hi = rotr64_hi;\n\nfunction rotr64_lo(ah, al, num) {\n var r = (ah << (32 - num)) | (al >>> num);\n return r >>> 0;\n}\nexports.rotr64_lo = rotr64_lo;\n\nfunction shr64_hi(ah, al, num) {\n return ah >>> num;\n}\nexports.shr64_hi = shr64_hi;\n\nfunction shr64_lo(ah, al, num) {\n var r = (ah << (32 - num)) | (al >>> num);\n return r >>> 0;\n}\nexports.shr64_lo = shr64_lo;\n","'use strict';\n\nvar hash = require('hash.js');\nvar utils = require('minimalistic-crypto-utils');\nvar assert = require('minimalistic-assert');\n\nfunction HmacDRBG(options) {\n if (!(this instanceof HmacDRBG))\n return new HmacDRBG(options);\n this.hash = options.hash;\n this.predResist = !!options.predResist;\n\n this.outLen = this.hash.outSize;\n this.minEntropy = options.minEntropy || this.hash.hmacStrength;\n\n this._reseed = null;\n this.reseedInterval = null;\n this.K = null;\n this.V = null;\n\n var entropy = utils.toArray(options.entropy, options.entropyEnc || 'hex');\n var nonce = utils.toArray(options.nonce, options.nonceEnc || 'hex');\n var pers = utils.toArray(options.pers, options.persEnc || 'hex');\n assert(entropy.length >= (this.minEntropy / 8),\n 'Not enough entropy. Minimum is: ' + this.minEntropy + ' bits');\n this._init(entropy, nonce, pers);\n}\nmodule.exports = HmacDRBG;\n\nHmacDRBG.prototype._init = function init(entropy, nonce, pers) {\n var seed = entropy.concat(nonce).concat(pers);\n\n this.K = new Array(this.outLen / 8);\n this.V = new Array(this.outLen / 8);\n for (var i = 0; i < this.V.length; i++) {\n this.K[i] = 0x00;\n this.V[i] = 0x01;\n }\n\n this._update(seed);\n this._reseed = 1;\n this.reseedInterval = 0x1000000000000; // 2^48\n};\n\nHmacDRBG.prototype._hmac = function hmac() {\n return new hash.hmac(this.hash, this.K);\n};\n\nHmacDRBG.prototype._update = function update(seed) {\n var kmac = this._hmac()\n .update(this.V)\n .update([ 0x00 ]);\n if (seed)\n kmac = kmac.update(seed);\n this.K = kmac.digest();\n this.V = this._hmac().update(this.V).digest();\n if (!seed)\n return;\n\n this.K = this._hmac()\n .update(this.V)\n .update([ 0x01 ])\n .update(seed)\n .digest();\n this.V = this._hmac().update(this.V).digest();\n};\n\nHmacDRBG.prototype.reseed = function reseed(entropy, entropyEnc, add, addEnc) {\n // Optional entropy enc\n if (typeof entropyEnc !== 'string') {\n addEnc = add;\n add = entropyEnc;\n entropyEnc = null;\n }\n\n entropy = utils.toArray(entropy, entropyEnc);\n add = utils.toArray(add, addEnc);\n\n assert(entropy.length >= (this.minEntropy / 8),\n 'Not enough entropy. Minimum is: ' + this.minEntropy + ' bits');\n\n this._update(entropy.concat(add || []));\n this._reseed = 1;\n};\n\nHmacDRBG.prototype.generate = function generate(len, enc, add, addEnc) {\n if (this._reseed > this.reseedInterval)\n throw new Error('Reseed is required');\n\n // Optional encoding\n if (typeof enc !== 'string') {\n addEnc = add;\n add = enc;\n enc = null;\n }\n\n // Optional additional data\n if (add) {\n add = utils.toArray(add, addEnc || 'hex');\n this._update(add);\n }\n\n var temp = [];\n while (temp.length < len) {\n this.V = this._hmac().update(this.V).digest();\n temp = temp.concat(this.V);\n }\n\n var res = temp.slice(0, len);\n this._update(add);\n this._reseed++;\n return utils.encode(res, enc);\n};\n","/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */\nexports.read = function (buffer, offset, isLE, mLen, nBytes) {\n var e, m\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var nBits = -7\n var i = isLE ? (nBytes - 1) : 0\n var d = isLE ? -1 : 1\n var s = buffer[offset + i]\n\n i += d\n\n e = s & ((1 << (-nBits)) - 1)\n s >>= (-nBits)\n nBits += eLen\n for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n m = e & ((1 << (-nBits)) - 1)\n e >>= (-nBits)\n nBits += mLen\n for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n if (e === 0) {\n e = 1 - eBias\n } else if (e === eMax) {\n return m ? NaN : ((s ? -1 : 1) * Infinity)\n } else {\n m = m + Math.pow(2, mLen)\n e = e - eBias\n }\n return (s ? -1 : 1) * m * Math.pow(2, e - mLen)\n}\n\nexports.write = function (buffer, value, offset, isLE, mLen, nBytes) {\n var e, m, c\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)\n var i = isLE ? 0 : (nBytes - 1)\n var d = isLE ? 1 : -1\n var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0\n\n value = Math.abs(value)\n\n if (isNaN(value) || value === Infinity) {\n m = isNaN(value) ? 1 : 0\n e = eMax\n } else {\n e = Math.floor(Math.log(value) / Math.LN2)\n if (value * (c = Math.pow(2, -e)) < 1) {\n e--\n c *= 2\n }\n if (e + eBias >= 1) {\n value += rt / c\n } else {\n value += rt * Math.pow(2, 1 - eBias)\n }\n if (value * c >= 2) {\n e++\n c /= 2\n }\n\n if (e + eBias >= eMax) {\n m = 0\n e = eMax\n } else if (e + eBias >= 1) {\n m = ((value * c) - 1) * Math.pow(2, mLen)\n e = e + eBias\n } else {\n m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)\n e = 0\n }\n }\n\n for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\n\n e = (e << mLen) | m\n eLen += mLen\n for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\n\n buffer[offset + i - d] |= s * 128\n}\n","if (typeof Object.create === 'function') {\n // implementation from standard node.js 'util' module\n module.exports = function inherits(ctor, superCtor) {\n ctor.super_ = superCtor\n ctor.prototype = Object.create(superCtor.prototype, {\n constructor: {\n value: ctor,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n };\n} else {\n // old school shim for old browsers\n module.exports = function inherits(ctor, superCtor) {\n ctor.super_ = superCtor\n var TempCtor = function () {}\n TempCtor.prototype = superCtor.prototype\n ctor.prototype = new TempCtor()\n ctor.prototype.constructor = ctor\n }\n}\n","var toString = {}.toString;\n\nmodule.exports = Array.isArray || function (arr) {\n return toString.call(arr) == '[object Array]';\n};\n","'use strict'\nvar inherits = require('inherits')\nvar HashBase = require('hash-base')\nvar Buffer = require('safe-buffer').Buffer\n\nvar ARRAY16 = new Array(16)\n\nfunction MD5 () {\n HashBase.call(this, 64)\n\n // state\n this._a = 0x67452301\n this._b = 0xefcdab89\n this._c = 0x98badcfe\n this._d = 0x10325476\n}\n\ninherits(MD5, HashBase)\n\nMD5.prototype._update = function () {\n var M = ARRAY16\n for (var i = 0; i < 16; ++i) M[i] = this._block.readInt32LE(i * 4)\n\n var a = this._a\n var b = this._b\n var c = this._c\n var d = this._d\n\n a = fnF(a, b, c, d, M[0], 0xd76aa478, 7)\n d = fnF(d, a, b, c, M[1], 0xe8c7b756, 12)\n c = fnF(c, d, a, b, M[2], 0x242070db, 17)\n b = fnF(b, c, d, a, M[3], 0xc1bdceee, 22)\n a = fnF(a, b, c, d, M[4], 0xf57c0faf, 7)\n d = fnF(d, a, b, c, M[5], 0x4787c62a, 12)\n c = fnF(c, d, a, b, M[6], 0xa8304613, 17)\n b = fnF(b, c, d, a, M[7], 0xfd469501, 22)\n a = fnF(a, b, c, d, M[8], 0x698098d8, 7)\n d = fnF(d, a, b, c, M[9], 0x8b44f7af, 12)\n c = fnF(c, d, a, b, M[10], 0xffff5bb1, 17)\n b = fnF(b, c, d, a, M[11], 0x895cd7be, 22)\n a = fnF(a, b, c, d, M[12], 0x6b901122, 7)\n d = fnF(d, a, b, c, M[13], 0xfd987193, 12)\n c = fnF(c, d, a, b, M[14], 0xa679438e, 17)\n b = fnF(b, c, d, a, M[15], 0x49b40821, 22)\n\n a = fnG(a, b, c, d, M[1], 0xf61e2562, 5)\n d = fnG(d, a, b, c, M[6], 0xc040b340, 9)\n c = fnG(c, d, a, b, M[11], 0x265e5a51, 14)\n b = fnG(b, c, d, a, M[0], 0xe9b6c7aa, 20)\n a = fnG(a, b, c, d, M[5], 0xd62f105d, 5)\n d = fnG(d, a, b, c, M[10], 0x02441453, 9)\n c = fnG(c, d, a, b, M[15], 0xd8a1e681, 14)\n b = fnG(b, c, d, a, M[4], 0xe7d3fbc8, 20)\n a = fnG(a, b, c, d, M[9], 0x21e1cde6, 5)\n d = fnG(d, a, b, c, M[14], 0xc33707d6, 9)\n c = fnG(c, d, a, b, M[3], 0xf4d50d87, 14)\n b = fnG(b, c, d, a, M[8], 0x455a14ed, 20)\n a = fnG(a, b, c, d, M[13], 0xa9e3e905, 5)\n d = fnG(d, a, b, c, M[2], 0xfcefa3f8, 9)\n c = fnG(c, d, a, b, M[7], 0x676f02d9, 14)\n b = fnG(b, c, d, a, M[12], 0x8d2a4c8a, 20)\n\n a = fnH(a, b, c, d, M[5], 0xfffa3942, 4)\n d = fnH(d, a, b, c, M[8], 0x8771f681, 11)\n c = fnH(c, d, a, b, M[11], 0x6d9d6122, 16)\n b = fnH(b, c, d, a, M[14], 0xfde5380c, 23)\n a = fnH(a, b, c, d, M[1], 0xa4beea44, 4)\n d = fnH(d, a, b, c, M[4], 0x4bdecfa9, 11)\n c = fnH(c, d, a, b, M[7], 0xf6bb4b60, 16)\n b = fnH(b, c, d, a, M[10], 0xbebfbc70, 23)\n a = fnH(a, b, c, d, M[13], 0x289b7ec6, 4)\n d = fnH(d, a, b, c, M[0], 0xeaa127fa, 11)\n c = fnH(c, d, a, b, M[3], 0xd4ef3085, 16)\n b = fnH(b, c, d, a, M[6], 0x04881d05, 23)\n a = fnH(a, b, c, d, M[9], 0xd9d4d039, 4)\n d = fnH(d, a, b, c, M[12], 0xe6db99e5, 11)\n c = fnH(c, d, a, b, M[15], 0x1fa27cf8, 16)\n b = fnH(b, c, d, a, M[2], 0xc4ac5665, 23)\n\n a = fnI(a, b, c, d, M[0], 0xf4292244, 6)\n d = fnI(d, a, b, c, M[7], 0x432aff97, 10)\n c = fnI(c, d, a, b, M[14], 0xab9423a7, 15)\n b = fnI(b, c, d, a, M[5], 0xfc93a039, 21)\n a = fnI(a, b, c, d, M[12], 0x655b59c3, 6)\n d = fnI(d, a, b, c, M[3], 0x8f0ccc92, 10)\n c = fnI(c, d, a, b, M[10], 0xffeff47d, 15)\n b = fnI(b, c, d, a, M[1], 0x85845dd1, 21)\n a = fnI(a, b, c, d, M[8], 0x6fa87e4f, 6)\n d = fnI(d, a, b, c, M[15], 0xfe2ce6e0, 10)\n c = fnI(c, d, a, b, M[6], 0xa3014314, 15)\n b = fnI(b, c, d, a, M[13], 0x4e0811a1, 21)\n a = fnI(a, b, c, d, M[4], 0xf7537e82, 6)\n d = fnI(d, a, b, c, M[11], 0xbd3af235, 10)\n c = fnI(c, d, a, b, M[2], 0x2ad7d2bb, 15)\n b = fnI(b, c, d, a, M[9], 0xeb86d391, 21)\n\n this._a = (this._a + a) | 0\n this._b = (this._b + b) | 0\n this._c = (this._c + c) | 0\n this._d = (this._d + d) | 0\n}\n\nMD5.prototype._digest = function () {\n // create padding and handle blocks\n this._block[this._blockOffset++] = 0x80\n if (this._blockOffset > 56) {\n this._block.fill(0, this._blockOffset, 64)\n this._update()\n this._blockOffset = 0\n }\n\n this._block.fill(0, this._blockOffset, 56)\n this._block.writeUInt32LE(this._length[0], 56)\n this._block.writeUInt32LE(this._length[1], 60)\n this._update()\n\n // produce result\n var buffer = Buffer.allocUnsafe(16)\n buffer.writeInt32LE(this._a, 0)\n buffer.writeInt32LE(this._b, 4)\n buffer.writeInt32LE(this._c, 8)\n buffer.writeInt32LE(this._d, 12)\n return buffer\n}\n\nfunction rotl (x, n) {\n return (x << n) | (x >>> (32 - n))\n}\n\nfunction fnF (a, b, c, d, m, k, s) {\n return (rotl((a + ((b & c) | ((~b) & d)) + m + k) | 0, s) + b) | 0\n}\n\nfunction fnG (a, b, c, d, m, k, s) {\n return (rotl((a + ((b & d) | (c & (~d))) + m + k) | 0, s) + b) | 0\n}\n\nfunction fnH (a, b, c, d, m, k, s) {\n return (rotl((a + (b ^ c ^ d) + m + k) | 0, s) + b) | 0\n}\n\nfunction fnI (a, b, c, d, m, k, s) {\n return (rotl((a + ((c ^ (b | (~d)))) + m + k) | 0, s) + b) | 0\n}\n\nmodule.exports = MD5\n","var bn = require('bn.js');\nvar brorand = require('brorand');\n\nfunction MillerRabin(rand) {\n this.rand = rand || new brorand.Rand();\n}\nmodule.exports = MillerRabin;\n\nMillerRabin.create = function create(rand) {\n return new MillerRabin(rand);\n};\n\nMillerRabin.prototype._randbelow = function _randbelow(n) {\n var len = n.bitLength();\n var min_bytes = Math.ceil(len / 8);\n\n // Generage random bytes until a number less than n is found.\n // This ensures that 0..n-1 have an equal probability of being selected.\n do\n var a = new bn(this.rand.generate(min_bytes));\n while (a.cmp(n) >= 0);\n\n return a;\n};\n\nMillerRabin.prototype._randrange = function _randrange(start, stop) {\n // Generate a random number greater than or equal to start and less than stop.\n var size = stop.sub(start);\n return start.add(this._randbelow(size));\n};\n\nMillerRabin.prototype.test = function test(n, k, cb) {\n var len = n.bitLength();\n var red = bn.mont(n);\n var rone = new bn(1).toRed(red);\n\n if (!k)\n k = Math.max(1, (len / 48) | 0);\n\n // Find d and s, (n - 1) = (2 ^ s) * d;\n var n1 = n.subn(1);\n for (var s = 0; !n1.testn(s); s++) {}\n var d = n.shrn(s);\n\n var rn1 = n1.toRed(red);\n\n var prime = true;\n for (; k > 0; k--) {\n var a = this._randrange(new bn(2), n1);\n if (cb)\n cb(a);\n\n var x = a.toRed(red).redPow(d);\n if (x.cmp(rone) === 0 || x.cmp(rn1) === 0)\n continue;\n\n for (var i = 1; i < s; i++) {\n x = x.redSqr();\n\n if (x.cmp(rone) === 0)\n return false;\n if (x.cmp(rn1) === 0)\n break;\n }\n\n if (i === s)\n return false;\n }\n\n return prime;\n};\n\nMillerRabin.prototype.getDivisor = function getDivisor(n, k) {\n var len = n.bitLength();\n var red = bn.mont(n);\n var rone = new bn(1).toRed(red);\n\n if (!k)\n k = Math.max(1, (len / 48) | 0);\n\n // Find d and s, (n - 1) = (2 ^ s) * d;\n var n1 = n.subn(1);\n for (var s = 0; !n1.testn(s); s++) {}\n var d = n.shrn(s);\n\n var rn1 = n1.toRed(red);\n\n for (; k > 0; k--) {\n var a = this._randrange(new bn(2), n1);\n\n var g = n.gcd(a);\n if (g.cmpn(1) !== 0)\n return g;\n\n var x = a.toRed(red).redPow(d);\n if (x.cmp(rone) === 0 || x.cmp(rn1) === 0)\n continue;\n\n for (var i = 1; i < s; i++) {\n x = x.redSqr();\n\n if (x.cmp(rone) === 0)\n return x.fromRed().subn(1).gcd(n);\n if (x.cmp(rn1) === 0)\n break;\n }\n\n if (i === s) {\n x = x.redSqr();\n return x.fromRed().subn(1).gcd(n);\n }\n }\n\n return false;\n};\n","(function (module, exports) {\n 'use strict';\n\n // Utils\n function assert (val, msg) {\n if (!val) throw new Error(msg || 'Assertion failed');\n }\n\n // Could use `inherits` module, but don't want to move from single file\n // architecture yet.\n function inherits (ctor, superCtor) {\n ctor.super_ = superCtor;\n var TempCtor = function () {};\n TempCtor.prototype = superCtor.prototype;\n ctor.prototype = new TempCtor();\n ctor.prototype.constructor = ctor;\n }\n\n // BN\n\n function BN (number, base, endian) {\n if (BN.isBN(number)) {\n return number;\n }\n\n this.negative = 0;\n this.words = null;\n this.length = 0;\n\n // Reduction context\n this.red = null;\n\n if (number !== null) {\n if (base === 'le' || base === 'be') {\n endian = base;\n base = 10;\n }\n\n this._init(number || 0, base || 10, endian || 'be');\n }\n }\n if (typeof module === 'object') {\n module.exports = BN;\n } else {\n exports.BN = BN;\n }\n\n BN.BN = BN;\n BN.wordSize = 26;\n\n var Buffer;\n try {\n if (typeof window !== 'undefined' && typeof window.Buffer !== 'undefined') {\n Buffer = window.Buffer;\n } else {\n Buffer = require('buffer').Buffer;\n }\n } catch (e) {\n }\n\n BN.isBN = function isBN (num) {\n if (num instanceof BN) {\n return true;\n }\n\n return num !== null && typeof num === 'object' &&\n num.constructor.wordSize === BN.wordSize && Array.isArray(num.words);\n };\n\n BN.max = function max (left, right) {\n if (left.cmp(right) > 0) return left;\n return right;\n };\n\n BN.min = function min (left, right) {\n if (left.cmp(right) < 0) return left;\n return right;\n };\n\n BN.prototype._init = function init (number, base, endian) {\n if (typeof number === 'number') {\n return this._initNumber(number, base, endian);\n }\n\n if (typeof number === 'object') {\n return this._initArray(number, base, endian);\n }\n\n if (base === 'hex') {\n base = 16;\n }\n assert(base === (base | 0) && base >= 2 && base <= 36);\n\n number = number.toString().replace(/\\s+/g, '');\n var start = 0;\n if (number[0] === '-') {\n start++;\n this.negative = 1;\n }\n\n if (start < number.length) {\n if (base === 16) {\n this._parseHex(number, start, endian);\n } else {\n this._parseBase(number, base, start);\n if (endian === 'le') {\n this._initArray(this.toArray(), base, endian);\n }\n }\n }\n };\n\n BN.prototype._initNumber = function _initNumber (number, base, endian) {\n if (number < 0) {\n this.negative = 1;\n number = -number;\n }\n if (number < 0x4000000) {\n this.words = [ number & 0x3ffffff ];\n this.length = 1;\n } else if (number < 0x10000000000000) {\n this.words = [\n number & 0x3ffffff,\n (number / 0x4000000) & 0x3ffffff\n ];\n this.length = 2;\n } else {\n assert(number < 0x20000000000000); // 2 ^ 53 (unsafe)\n this.words = [\n number & 0x3ffffff,\n (number / 0x4000000) & 0x3ffffff,\n 1\n ];\n this.length = 3;\n }\n\n if (endian !== 'le') return;\n\n // Reverse the bytes\n this._initArray(this.toArray(), base, endian);\n };\n\n BN.prototype._initArray = function _initArray (number, base, endian) {\n // Perhaps a Uint8Array\n assert(typeof number.length === 'number');\n if (number.length <= 0) {\n this.words = [ 0 ];\n this.length = 1;\n return this;\n }\n\n this.length = Math.ceil(number.length / 3);\n this.words = new Array(this.length);\n for (var i = 0; i < this.length; i++) {\n this.words[i] = 0;\n }\n\n var j, w;\n var off = 0;\n if (endian === 'be') {\n for (i = number.length - 1, j = 0; i >= 0; i -= 3) {\n w = number[i] | (number[i - 1] << 8) | (number[i - 2] << 16);\n this.words[j] |= (w << off) & 0x3ffffff;\n this.words[j + 1] = (w >>> (26 - off)) & 0x3ffffff;\n off += 24;\n if (off >= 26) {\n off -= 26;\n j++;\n }\n }\n } else if (endian === 'le') {\n for (i = 0, j = 0; i < number.length; i += 3) {\n w = number[i] | (number[i + 1] << 8) | (number[i + 2] << 16);\n this.words[j] |= (w << off) & 0x3ffffff;\n this.words[j + 1] = (w >>> (26 - off)) & 0x3ffffff;\n off += 24;\n if (off >= 26) {\n off -= 26;\n j++;\n }\n }\n }\n return this.strip();\n };\n\n function parseHex4Bits (string, index) {\n var c = string.charCodeAt(index);\n // 'A' - 'F'\n if (c >= 65 && c <= 70) {\n return c - 55;\n // 'a' - 'f'\n } else if (c >= 97 && c <= 102) {\n return c - 87;\n // '0' - '9'\n } else {\n return (c - 48) & 0xf;\n }\n }\n\n function parseHexByte (string, lowerBound, index) {\n var r = parseHex4Bits(string, index);\n if (index - 1 >= lowerBound) {\n r |= parseHex4Bits(string, index - 1) << 4;\n }\n return r;\n }\n\n BN.prototype._parseHex = function _parseHex (number, start, endian) {\n // Create possibly bigger array to ensure that it fits the number\n this.length = Math.ceil((number.length - start) / 6);\n this.words = new Array(this.length);\n for (var i = 0; i < this.length; i++) {\n this.words[i] = 0;\n }\n\n // 24-bits chunks\n var off = 0;\n var j = 0;\n\n var w;\n if (endian === 'be') {\n for (i = number.length - 1; i >= start; i -= 2) {\n w = parseHexByte(number, start, i) << off;\n this.words[j] |= w & 0x3ffffff;\n if (off >= 18) {\n off -= 18;\n j += 1;\n this.words[j] |= w >>> 26;\n } else {\n off += 8;\n }\n }\n } else {\n var parseLength = number.length - start;\n for (i = parseLength % 2 === 0 ? start + 1 : start; i < number.length; i += 2) {\n w = parseHexByte(number, start, i) << off;\n this.words[j] |= w & 0x3ffffff;\n if (off >= 18) {\n off -= 18;\n j += 1;\n this.words[j] |= w >>> 26;\n } else {\n off += 8;\n }\n }\n }\n\n this.strip();\n };\n\n function parseBase (str, start, end, mul) {\n var r = 0;\n var len = Math.min(str.length, end);\n for (var i = start; i < len; i++) {\n var c = str.charCodeAt(i) - 48;\n\n r *= mul;\n\n // 'a'\n if (c >= 49) {\n r += c - 49 + 0xa;\n\n // 'A'\n } else if (c >= 17) {\n r += c - 17 + 0xa;\n\n // '0' - '9'\n } else {\n r += c;\n }\n }\n return r;\n }\n\n BN.prototype._parseBase = function _parseBase (number, base, start) {\n // Initialize as zero\n this.words = [ 0 ];\n this.length = 1;\n\n // Find length of limb in base\n for (var limbLen = 0, limbPow = 1; limbPow <= 0x3ffffff; limbPow *= base) {\n limbLen++;\n }\n limbLen--;\n limbPow = (limbPow / base) | 0;\n\n var total = number.length - start;\n var mod = total % limbLen;\n var end = Math.min(total, total - mod) + start;\n\n var word = 0;\n for (var i = start; i < end; i += limbLen) {\n word = parseBase(number, i, i + limbLen, base);\n\n this.imuln(limbPow);\n if (this.words[0] + word < 0x4000000) {\n this.words[0] += word;\n } else {\n this._iaddn(word);\n }\n }\n\n if (mod !== 0) {\n var pow = 1;\n word = parseBase(number, i, number.length, base);\n\n for (i = 0; i < mod; i++) {\n pow *= base;\n }\n\n this.imuln(pow);\n if (this.words[0] + word < 0x4000000) {\n this.words[0] += word;\n } else {\n this._iaddn(word);\n }\n }\n\n this.strip();\n };\n\n BN.prototype.copy = function copy (dest) {\n dest.words = new Array(this.length);\n for (var i = 0; i < this.length; i++) {\n dest.words[i] = this.words[i];\n }\n dest.length = this.length;\n dest.negative = this.negative;\n dest.red = this.red;\n };\n\n BN.prototype.clone = function clone () {\n var r = new BN(null);\n this.copy(r);\n return r;\n };\n\n BN.prototype._expand = function _expand (size) {\n while (this.length < size) {\n this.words[this.length++] = 0;\n }\n return this;\n };\n\n // Remove leading `0` from `this`\n BN.prototype.strip = function strip () {\n while (this.length > 1 && this.words[this.length - 1] === 0) {\n this.length--;\n }\n return this._normSign();\n };\n\n BN.prototype._normSign = function _normSign () {\n // -0 = 0\n if (this.length === 1 && this.words[0] === 0) {\n this.negative = 0;\n }\n return this;\n };\n\n BN.prototype.inspect = function inspect () {\n return (this.red ? '';\n };\n\n /*\n\n var zeros = [];\n var groupSizes = [];\n var groupBases = [];\n\n var s = '';\n var i = -1;\n while (++i < BN.wordSize) {\n zeros[i] = s;\n s += '0';\n }\n groupSizes[0] = 0;\n groupSizes[1] = 0;\n groupBases[0] = 0;\n groupBases[1] = 0;\n var base = 2 - 1;\n while (++base < 36 + 1) {\n var groupSize = 0;\n var groupBase = 1;\n while (groupBase < (1 << BN.wordSize) / base) {\n groupBase *= base;\n groupSize += 1;\n }\n groupSizes[base] = groupSize;\n groupBases[base] = groupBase;\n }\n\n */\n\n var zeros = [\n '',\n '0',\n '00',\n '000',\n '0000',\n '00000',\n '000000',\n '0000000',\n '00000000',\n '000000000',\n '0000000000',\n '00000000000',\n '000000000000',\n '0000000000000',\n '00000000000000',\n '000000000000000',\n '0000000000000000',\n '00000000000000000',\n '000000000000000000',\n '0000000000000000000',\n '00000000000000000000',\n '000000000000000000000',\n '0000000000000000000000',\n '00000000000000000000000',\n '000000000000000000000000',\n '0000000000000000000000000'\n ];\n\n var groupSizes = [\n 0, 0,\n 25, 16, 12, 11, 10, 9, 8,\n 8, 7, 7, 7, 7, 6, 6,\n 6, 6, 6, 6, 6, 5, 5,\n 5, 5, 5, 5, 5, 5, 5,\n 5, 5, 5, 5, 5, 5, 5\n ];\n\n var groupBases = [\n 0, 0,\n 33554432, 43046721, 16777216, 48828125, 60466176, 40353607, 16777216,\n 43046721, 10000000, 19487171, 35831808, 62748517, 7529536, 11390625,\n 16777216, 24137569, 34012224, 47045881, 64000000, 4084101, 5153632,\n 6436343, 7962624, 9765625, 11881376, 14348907, 17210368, 20511149,\n 24300000, 28629151, 33554432, 39135393, 45435424, 52521875, 60466176\n ];\n\n BN.prototype.toString = function toString (base, padding) {\n base = base || 10;\n padding = padding | 0 || 1;\n\n var out;\n if (base === 16 || base === 'hex') {\n out = '';\n var off = 0;\n var carry = 0;\n for (var i = 0; i < this.length; i++) {\n var w = this.words[i];\n var word = (((w << off) | carry) & 0xffffff).toString(16);\n carry = (w >>> (24 - off)) & 0xffffff;\n if (carry !== 0 || i !== this.length - 1) {\n out = zeros[6 - word.length] + word + out;\n } else {\n out = word + out;\n }\n off += 2;\n if (off >= 26) {\n off -= 26;\n i--;\n }\n }\n if (carry !== 0) {\n out = carry.toString(16) + out;\n }\n while (out.length % padding !== 0) {\n out = '0' + out;\n }\n if (this.negative !== 0) {\n out = '-' + out;\n }\n return out;\n }\n\n if (base === (base | 0) && base >= 2 && base <= 36) {\n // var groupSize = Math.floor(BN.wordSize * Math.LN2 / Math.log(base));\n var groupSize = groupSizes[base];\n // var groupBase = Math.pow(base, groupSize);\n var groupBase = groupBases[base];\n out = '';\n var c = this.clone();\n c.negative = 0;\n while (!c.isZero()) {\n var r = c.modn(groupBase).toString(base);\n c = c.idivn(groupBase);\n\n if (!c.isZero()) {\n out = zeros[groupSize - r.length] + r + out;\n } else {\n out = r + out;\n }\n }\n if (this.isZero()) {\n out = '0' + out;\n }\n while (out.length % padding !== 0) {\n out = '0' + out;\n }\n if (this.negative !== 0) {\n out = '-' + out;\n }\n return out;\n }\n\n assert(false, 'Base should be between 2 and 36');\n };\n\n BN.prototype.toNumber = function toNumber () {\n var ret = this.words[0];\n if (this.length === 2) {\n ret += this.words[1] * 0x4000000;\n } else if (this.length === 3 && this.words[2] === 0x01) {\n // NOTE: at this stage it is known that the top bit is set\n ret += 0x10000000000000 + (this.words[1] * 0x4000000);\n } else if (this.length > 2) {\n assert(false, 'Number can only safely store up to 53 bits');\n }\n return (this.negative !== 0) ? -ret : ret;\n };\n\n BN.prototype.toJSON = function toJSON () {\n return this.toString(16);\n };\n\n BN.prototype.toBuffer = function toBuffer (endian, length) {\n assert(typeof Buffer !== 'undefined');\n return this.toArrayLike(Buffer, endian, length);\n };\n\n BN.prototype.toArray = function toArray (endian, length) {\n return this.toArrayLike(Array, endian, length);\n };\n\n BN.prototype.toArrayLike = function toArrayLike (ArrayType, endian, length) {\n var byteLength = this.byteLength();\n var reqLength = length || Math.max(1, byteLength);\n assert(byteLength <= reqLength, 'byte array longer than desired length');\n assert(reqLength > 0, 'Requested array length <= 0');\n\n this.strip();\n var littleEndian = endian === 'le';\n var res = new ArrayType(reqLength);\n\n var b, i;\n var q = this.clone();\n if (!littleEndian) {\n // Assume big-endian\n for (i = 0; i < reqLength - byteLength; i++) {\n res[i] = 0;\n }\n\n for (i = 0; !q.isZero(); i++) {\n b = q.andln(0xff);\n q.iushrn(8);\n\n res[reqLength - i - 1] = b;\n }\n } else {\n for (i = 0; !q.isZero(); i++) {\n b = q.andln(0xff);\n q.iushrn(8);\n\n res[i] = b;\n }\n\n for (; i < reqLength; i++) {\n res[i] = 0;\n }\n }\n\n return res;\n };\n\n if (Math.clz32) {\n BN.prototype._countBits = function _countBits (w) {\n return 32 - Math.clz32(w);\n };\n } else {\n BN.prototype._countBits = function _countBits (w) {\n var t = w;\n var r = 0;\n if (t >= 0x1000) {\n r += 13;\n t >>>= 13;\n }\n if (t >= 0x40) {\n r += 7;\n t >>>= 7;\n }\n if (t >= 0x8) {\n r += 4;\n t >>>= 4;\n }\n if (t >= 0x02) {\n r += 2;\n t >>>= 2;\n }\n return r + t;\n };\n }\n\n BN.prototype._zeroBits = function _zeroBits (w) {\n // Short-cut\n if (w === 0) return 26;\n\n var t = w;\n var r = 0;\n if ((t & 0x1fff) === 0) {\n r += 13;\n t >>>= 13;\n }\n if ((t & 0x7f) === 0) {\n r += 7;\n t >>>= 7;\n }\n if ((t & 0xf) === 0) {\n r += 4;\n t >>>= 4;\n }\n if ((t & 0x3) === 0) {\n r += 2;\n t >>>= 2;\n }\n if ((t & 0x1) === 0) {\n r++;\n }\n return r;\n };\n\n // Return number of used bits in a BN\n BN.prototype.bitLength = function bitLength () {\n var w = this.words[this.length - 1];\n var hi = this._countBits(w);\n return (this.length - 1) * 26 + hi;\n };\n\n function toBitArray (num) {\n var w = new Array(num.bitLength());\n\n for (var bit = 0; bit < w.length; bit++) {\n var off = (bit / 26) | 0;\n var wbit = bit % 26;\n\n w[bit] = (num.words[off] & (1 << wbit)) >>> wbit;\n }\n\n return w;\n }\n\n // Number of trailing zero bits\n BN.prototype.zeroBits = function zeroBits () {\n if (this.isZero()) return 0;\n\n var r = 0;\n for (var i = 0; i < this.length; i++) {\n var b = this._zeroBits(this.words[i]);\n r += b;\n if (b !== 26) break;\n }\n return r;\n };\n\n BN.prototype.byteLength = function byteLength () {\n return Math.ceil(this.bitLength() / 8);\n };\n\n BN.prototype.toTwos = function toTwos (width) {\n if (this.negative !== 0) {\n return this.abs().inotn(width).iaddn(1);\n }\n return this.clone();\n };\n\n BN.prototype.fromTwos = function fromTwos (width) {\n if (this.testn(width - 1)) {\n return this.notn(width).iaddn(1).ineg();\n }\n return this.clone();\n };\n\n BN.prototype.isNeg = function isNeg () {\n return this.negative !== 0;\n };\n\n // Return negative clone of `this`\n BN.prototype.neg = function neg () {\n return this.clone().ineg();\n };\n\n BN.prototype.ineg = function ineg () {\n if (!this.isZero()) {\n this.negative ^= 1;\n }\n\n return this;\n };\n\n // Or `num` with `this` in-place\n BN.prototype.iuor = function iuor (num) {\n while (this.length < num.length) {\n this.words[this.length++] = 0;\n }\n\n for (var i = 0; i < num.length; i++) {\n this.words[i] = this.words[i] | num.words[i];\n }\n\n return this.strip();\n };\n\n BN.prototype.ior = function ior (num) {\n assert((this.negative | num.negative) === 0);\n return this.iuor(num);\n };\n\n // Or `num` with `this`\n BN.prototype.or = function or (num) {\n if (this.length > num.length) return this.clone().ior(num);\n return num.clone().ior(this);\n };\n\n BN.prototype.uor = function uor (num) {\n if (this.length > num.length) return this.clone().iuor(num);\n return num.clone().iuor(this);\n };\n\n // And `num` with `this` in-place\n BN.prototype.iuand = function iuand (num) {\n // b = min-length(num, this)\n var b;\n if (this.length > num.length) {\n b = num;\n } else {\n b = this;\n }\n\n for (var i = 0; i < b.length; i++) {\n this.words[i] = this.words[i] & num.words[i];\n }\n\n this.length = b.length;\n\n return this.strip();\n };\n\n BN.prototype.iand = function iand (num) {\n assert((this.negative | num.negative) === 0);\n return this.iuand(num);\n };\n\n // And `num` with `this`\n BN.prototype.and = function and (num) {\n if (this.length > num.length) return this.clone().iand(num);\n return num.clone().iand(this);\n };\n\n BN.prototype.uand = function uand (num) {\n if (this.length > num.length) return this.clone().iuand(num);\n return num.clone().iuand(this);\n };\n\n // Xor `num` with `this` in-place\n BN.prototype.iuxor = function iuxor (num) {\n // a.length > b.length\n var a;\n var b;\n if (this.length > num.length) {\n a = this;\n b = num;\n } else {\n a = num;\n b = this;\n }\n\n for (var i = 0; i < b.length; i++) {\n this.words[i] = a.words[i] ^ b.words[i];\n }\n\n if (this !== a) {\n for (; i < a.length; i++) {\n this.words[i] = a.words[i];\n }\n }\n\n this.length = a.length;\n\n return this.strip();\n };\n\n BN.prototype.ixor = function ixor (num) {\n assert((this.negative | num.negative) === 0);\n return this.iuxor(num);\n };\n\n // Xor `num` with `this`\n BN.prototype.xor = function xor (num) {\n if (this.length > num.length) return this.clone().ixor(num);\n return num.clone().ixor(this);\n };\n\n BN.prototype.uxor = function uxor (num) {\n if (this.length > num.length) return this.clone().iuxor(num);\n return num.clone().iuxor(this);\n };\n\n // Not ``this`` with ``width`` bitwidth\n BN.prototype.inotn = function inotn (width) {\n assert(typeof width === 'number' && width >= 0);\n\n var bytesNeeded = Math.ceil(width / 26) | 0;\n var bitsLeft = width % 26;\n\n // Extend the buffer with leading zeroes\n this._expand(bytesNeeded);\n\n if (bitsLeft > 0) {\n bytesNeeded--;\n }\n\n // Handle complete words\n for (var i = 0; i < bytesNeeded; i++) {\n this.words[i] = ~this.words[i] & 0x3ffffff;\n }\n\n // Handle the residue\n if (bitsLeft > 0) {\n this.words[i] = ~this.words[i] & (0x3ffffff >> (26 - bitsLeft));\n }\n\n // And remove leading zeroes\n return this.strip();\n };\n\n BN.prototype.notn = function notn (width) {\n return this.clone().inotn(width);\n };\n\n // Set `bit` of `this`\n BN.prototype.setn = function setn (bit, val) {\n assert(typeof bit === 'number' && bit >= 0);\n\n var off = (bit / 26) | 0;\n var wbit = bit % 26;\n\n this._expand(off + 1);\n\n if (val) {\n this.words[off] = this.words[off] | (1 << wbit);\n } else {\n this.words[off] = this.words[off] & ~(1 << wbit);\n }\n\n return this.strip();\n };\n\n // Add `num` to `this` in-place\n BN.prototype.iadd = function iadd (num) {\n var r;\n\n // negative + positive\n if (this.negative !== 0 && num.negative === 0) {\n this.negative = 0;\n r = this.isub(num);\n this.negative ^= 1;\n return this._normSign();\n\n // positive + negative\n } else if (this.negative === 0 && num.negative !== 0) {\n num.negative = 0;\n r = this.isub(num);\n num.negative = 1;\n return r._normSign();\n }\n\n // a.length > b.length\n var a, b;\n if (this.length > num.length) {\n a = this;\n b = num;\n } else {\n a = num;\n b = this;\n }\n\n var carry = 0;\n for (var i = 0; i < b.length; i++) {\n r = (a.words[i] | 0) + (b.words[i] | 0) + carry;\n this.words[i] = r & 0x3ffffff;\n carry = r >>> 26;\n }\n for (; carry !== 0 && i < a.length; i++) {\n r = (a.words[i] | 0) + carry;\n this.words[i] = r & 0x3ffffff;\n carry = r >>> 26;\n }\n\n this.length = a.length;\n if (carry !== 0) {\n this.words[this.length] = carry;\n this.length++;\n // Copy the rest of the words\n } else if (a !== this) {\n for (; i < a.length; i++) {\n this.words[i] = a.words[i];\n }\n }\n\n return this;\n };\n\n // Add `num` to `this`\n BN.prototype.add = function add (num) {\n var res;\n if (num.negative !== 0 && this.negative === 0) {\n num.negative = 0;\n res = this.sub(num);\n num.negative ^= 1;\n return res;\n } else if (num.negative === 0 && this.negative !== 0) {\n this.negative = 0;\n res = num.sub(this);\n this.negative = 1;\n return res;\n }\n\n if (this.length > num.length) return this.clone().iadd(num);\n\n return num.clone().iadd(this);\n };\n\n // Subtract `num` from `this` in-place\n BN.prototype.isub = function isub (num) {\n // this - (-num) = this + num\n if (num.negative !== 0) {\n num.negative = 0;\n var r = this.iadd(num);\n num.negative = 1;\n return r._normSign();\n\n // -this - num = -(this + num)\n } else if (this.negative !== 0) {\n this.negative = 0;\n this.iadd(num);\n this.negative = 1;\n return this._normSign();\n }\n\n // At this point both numbers are positive\n var cmp = this.cmp(num);\n\n // Optimization - zeroify\n if (cmp === 0) {\n this.negative = 0;\n this.length = 1;\n this.words[0] = 0;\n return this;\n }\n\n // a > b\n var a, b;\n if (cmp > 0) {\n a = this;\n b = num;\n } else {\n a = num;\n b = this;\n }\n\n var carry = 0;\n for (var i = 0; i < b.length; i++) {\n r = (a.words[i] | 0) - (b.words[i] | 0) + carry;\n carry = r >> 26;\n this.words[i] = r & 0x3ffffff;\n }\n for (; carry !== 0 && i < a.length; i++) {\n r = (a.words[i] | 0) + carry;\n carry = r >> 26;\n this.words[i] = r & 0x3ffffff;\n }\n\n // Copy rest of the words\n if (carry === 0 && i < a.length && a !== this) {\n for (; i < a.length; i++) {\n this.words[i] = a.words[i];\n }\n }\n\n this.length = Math.max(this.length, i);\n\n if (a !== this) {\n this.negative = 1;\n }\n\n return this.strip();\n };\n\n // Subtract `num` from `this`\n BN.prototype.sub = function sub (num) {\n return this.clone().isub(num);\n };\n\n function smallMulTo (self, num, out) {\n out.negative = num.negative ^ self.negative;\n var len = (self.length + num.length) | 0;\n out.length = len;\n len = (len - 1) | 0;\n\n // Peel one iteration (compiler can't do it, because of code complexity)\n var a = self.words[0] | 0;\n var b = num.words[0] | 0;\n var r = a * b;\n\n var lo = r & 0x3ffffff;\n var carry = (r / 0x4000000) | 0;\n out.words[0] = lo;\n\n for (var k = 1; k < len; k++) {\n // Sum all words with the same `i + j = k` and accumulate `ncarry`,\n // note that ncarry could be >= 0x3ffffff\n var ncarry = carry >>> 26;\n var rword = carry & 0x3ffffff;\n var maxJ = Math.min(k, num.length - 1);\n for (var j = Math.max(0, k - self.length + 1); j <= maxJ; j++) {\n var i = (k - j) | 0;\n a = self.words[i] | 0;\n b = num.words[j] | 0;\n r = a * b + rword;\n ncarry += (r / 0x4000000) | 0;\n rword = r & 0x3ffffff;\n }\n out.words[k] = rword | 0;\n carry = ncarry | 0;\n }\n if (carry !== 0) {\n out.words[k] = carry | 0;\n } else {\n out.length--;\n }\n\n return out.strip();\n }\n\n // TODO(indutny): it may be reasonable to omit it for users who don't need\n // to work with 256-bit numbers, otherwise it gives 20% improvement for 256-bit\n // multiplication (like elliptic secp256k1).\n var comb10MulTo = function comb10MulTo (self, num, out) {\n var a = self.words;\n var b = num.words;\n var o = out.words;\n var c = 0;\n var lo;\n var mid;\n var hi;\n var a0 = a[0] | 0;\n var al0 = a0 & 0x1fff;\n var ah0 = a0 >>> 13;\n var a1 = a[1] | 0;\n var al1 = a1 & 0x1fff;\n var ah1 = a1 >>> 13;\n var a2 = a[2] | 0;\n var al2 = a2 & 0x1fff;\n var ah2 = a2 >>> 13;\n var a3 = a[3] | 0;\n var al3 = a3 & 0x1fff;\n var ah3 = a3 >>> 13;\n var a4 = a[4] | 0;\n var al4 = a4 & 0x1fff;\n var ah4 = a4 >>> 13;\n var a5 = a[5] | 0;\n var al5 = a5 & 0x1fff;\n var ah5 = a5 >>> 13;\n var a6 = a[6] | 0;\n var al6 = a6 & 0x1fff;\n var ah6 = a6 >>> 13;\n var a7 = a[7] | 0;\n var al7 = a7 & 0x1fff;\n var ah7 = a7 >>> 13;\n var a8 = a[8] | 0;\n var al8 = a8 & 0x1fff;\n var ah8 = a8 >>> 13;\n var a9 = a[9] | 0;\n var al9 = a9 & 0x1fff;\n var ah9 = a9 >>> 13;\n var b0 = b[0] | 0;\n var bl0 = b0 & 0x1fff;\n var bh0 = b0 >>> 13;\n var b1 = b[1] | 0;\n var bl1 = b1 & 0x1fff;\n var bh1 = b1 >>> 13;\n var b2 = b[2] | 0;\n var bl2 = b2 & 0x1fff;\n var bh2 = b2 >>> 13;\n var b3 = b[3] | 0;\n var bl3 = b3 & 0x1fff;\n var bh3 = b3 >>> 13;\n var b4 = b[4] | 0;\n var bl4 = b4 & 0x1fff;\n var bh4 = b4 >>> 13;\n var b5 = b[5] | 0;\n var bl5 = b5 & 0x1fff;\n var bh5 = b5 >>> 13;\n var b6 = b[6] | 0;\n var bl6 = b6 & 0x1fff;\n var bh6 = b6 >>> 13;\n var b7 = b[7] | 0;\n var bl7 = b7 & 0x1fff;\n var bh7 = b7 >>> 13;\n var b8 = b[8] | 0;\n var bl8 = b8 & 0x1fff;\n var bh8 = b8 >>> 13;\n var b9 = b[9] | 0;\n var bl9 = b9 & 0x1fff;\n var bh9 = b9 >>> 13;\n\n out.negative = self.negative ^ num.negative;\n out.length = 19;\n /* k = 0 */\n lo = Math.imul(al0, bl0);\n mid = Math.imul(al0, bh0);\n mid = (mid + Math.imul(ah0, bl0)) | 0;\n hi = Math.imul(ah0, bh0);\n var w0 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w0 >>> 26)) | 0;\n w0 &= 0x3ffffff;\n /* k = 1 */\n lo = Math.imul(al1, bl0);\n mid = Math.imul(al1, bh0);\n mid = (mid + Math.imul(ah1, bl0)) | 0;\n hi = Math.imul(ah1, bh0);\n lo = (lo + Math.imul(al0, bl1)) | 0;\n mid = (mid + Math.imul(al0, bh1)) | 0;\n mid = (mid + Math.imul(ah0, bl1)) | 0;\n hi = (hi + Math.imul(ah0, bh1)) | 0;\n var w1 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w1 >>> 26)) | 0;\n w1 &= 0x3ffffff;\n /* k = 2 */\n lo = Math.imul(al2, bl0);\n mid = Math.imul(al2, bh0);\n mid = (mid + Math.imul(ah2, bl0)) | 0;\n hi = Math.imul(ah2, bh0);\n lo = (lo + Math.imul(al1, bl1)) | 0;\n mid = (mid + Math.imul(al1, bh1)) | 0;\n mid = (mid + Math.imul(ah1, bl1)) | 0;\n hi = (hi + Math.imul(ah1, bh1)) | 0;\n lo = (lo + Math.imul(al0, bl2)) | 0;\n mid = (mid + Math.imul(al0, bh2)) | 0;\n mid = (mid + Math.imul(ah0, bl2)) | 0;\n hi = (hi + Math.imul(ah0, bh2)) | 0;\n var w2 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w2 >>> 26)) | 0;\n w2 &= 0x3ffffff;\n /* k = 3 */\n lo = Math.imul(al3, bl0);\n mid = Math.imul(al3, bh0);\n mid = (mid + Math.imul(ah3, bl0)) | 0;\n hi = Math.imul(ah3, bh0);\n lo = (lo + Math.imul(al2, bl1)) | 0;\n mid = (mid + Math.imul(al2, bh1)) | 0;\n mid = (mid + Math.imul(ah2, bl1)) | 0;\n hi = (hi + Math.imul(ah2, bh1)) | 0;\n lo = (lo + Math.imul(al1, bl2)) | 0;\n mid = (mid + Math.imul(al1, bh2)) | 0;\n mid = (mid + Math.imul(ah1, bl2)) | 0;\n hi = (hi + Math.imul(ah1, bh2)) | 0;\n lo = (lo + Math.imul(al0, bl3)) | 0;\n mid = (mid + Math.imul(al0, bh3)) | 0;\n mid = (mid + Math.imul(ah0, bl3)) | 0;\n hi = (hi + Math.imul(ah0, bh3)) | 0;\n var w3 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w3 >>> 26)) | 0;\n w3 &= 0x3ffffff;\n /* k = 4 */\n lo = Math.imul(al4, bl0);\n mid = Math.imul(al4, bh0);\n mid = (mid + Math.imul(ah4, bl0)) | 0;\n hi = Math.imul(ah4, bh0);\n lo = (lo + Math.imul(al3, bl1)) | 0;\n mid = (mid + Math.imul(al3, bh1)) | 0;\n mid = (mid + Math.imul(ah3, bl1)) | 0;\n hi = (hi + Math.imul(ah3, bh1)) | 0;\n lo = (lo + Math.imul(al2, bl2)) | 0;\n mid = (mid + Math.imul(al2, bh2)) | 0;\n mid = (mid + Math.imul(ah2, bl2)) | 0;\n hi = (hi + Math.imul(ah2, bh2)) | 0;\n lo = (lo + Math.imul(al1, bl3)) | 0;\n mid = (mid + Math.imul(al1, bh3)) | 0;\n mid = (mid + Math.imul(ah1, bl3)) | 0;\n hi = (hi + Math.imul(ah1, bh3)) | 0;\n lo = (lo + Math.imul(al0, bl4)) | 0;\n mid = (mid + Math.imul(al0, bh4)) | 0;\n mid = (mid + Math.imul(ah0, bl4)) | 0;\n hi = (hi + Math.imul(ah0, bh4)) | 0;\n var w4 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w4 >>> 26)) | 0;\n w4 &= 0x3ffffff;\n /* k = 5 */\n lo = Math.imul(al5, bl0);\n mid = Math.imul(al5, bh0);\n mid = (mid + Math.imul(ah5, bl0)) | 0;\n hi = Math.imul(ah5, bh0);\n lo = (lo + Math.imul(al4, bl1)) | 0;\n mid = (mid + Math.imul(al4, bh1)) | 0;\n mid = (mid + Math.imul(ah4, bl1)) | 0;\n hi = (hi + Math.imul(ah4, bh1)) | 0;\n lo = (lo + Math.imul(al3, bl2)) | 0;\n mid = (mid + Math.imul(al3, bh2)) | 0;\n mid = (mid + Math.imul(ah3, bl2)) | 0;\n hi = (hi + Math.imul(ah3, bh2)) | 0;\n lo = (lo + Math.imul(al2, bl3)) | 0;\n mid = (mid + Math.imul(al2, bh3)) | 0;\n mid = (mid + Math.imul(ah2, bl3)) | 0;\n hi = (hi + Math.imul(ah2, bh3)) | 0;\n lo = (lo + Math.imul(al1, bl4)) | 0;\n mid = (mid + Math.imul(al1, bh4)) | 0;\n mid = (mid + Math.imul(ah1, bl4)) | 0;\n hi = (hi + Math.imul(ah1, bh4)) | 0;\n lo = (lo + Math.imul(al0, bl5)) | 0;\n mid = (mid + Math.imul(al0, bh5)) | 0;\n mid = (mid + Math.imul(ah0, bl5)) | 0;\n hi = (hi + Math.imul(ah0, bh5)) | 0;\n var w5 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w5 >>> 26)) | 0;\n w5 &= 0x3ffffff;\n /* k = 6 */\n lo = Math.imul(al6, bl0);\n mid = Math.imul(al6, bh0);\n mid = (mid + Math.imul(ah6, bl0)) | 0;\n hi = Math.imul(ah6, bh0);\n lo = (lo + Math.imul(al5, bl1)) | 0;\n mid = (mid + Math.imul(al5, bh1)) | 0;\n mid = (mid + Math.imul(ah5, bl1)) | 0;\n hi = (hi + Math.imul(ah5, bh1)) | 0;\n lo = (lo + Math.imul(al4, bl2)) | 0;\n mid = (mid + Math.imul(al4, bh2)) | 0;\n mid = (mid + Math.imul(ah4, bl2)) | 0;\n hi = (hi + Math.imul(ah4, bh2)) | 0;\n lo = (lo + Math.imul(al3, bl3)) | 0;\n mid = (mid + Math.imul(al3, bh3)) | 0;\n mid = (mid + Math.imul(ah3, bl3)) | 0;\n hi = (hi + Math.imul(ah3, bh3)) | 0;\n lo = (lo + Math.imul(al2, bl4)) | 0;\n mid = (mid + Math.imul(al2, bh4)) | 0;\n mid = (mid + Math.imul(ah2, bl4)) | 0;\n hi = (hi + Math.imul(ah2, bh4)) | 0;\n lo = (lo + Math.imul(al1, bl5)) | 0;\n mid = (mid + Math.imul(al1, bh5)) | 0;\n mid = (mid + Math.imul(ah1, bl5)) | 0;\n hi = (hi + Math.imul(ah1, bh5)) | 0;\n lo = (lo + Math.imul(al0, bl6)) | 0;\n mid = (mid + Math.imul(al0, bh6)) | 0;\n mid = (mid + Math.imul(ah0, bl6)) | 0;\n hi = (hi + Math.imul(ah0, bh6)) | 0;\n var w6 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w6 >>> 26)) | 0;\n w6 &= 0x3ffffff;\n /* k = 7 */\n lo = Math.imul(al7, bl0);\n mid = Math.imul(al7, bh0);\n mid = (mid + Math.imul(ah7, bl0)) | 0;\n hi = Math.imul(ah7, bh0);\n lo = (lo + Math.imul(al6, bl1)) | 0;\n mid = (mid + Math.imul(al6, bh1)) | 0;\n mid = (mid + Math.imul(ah6, bl1)) | 0;\n hi = (hi + Math.imul(ah6, bh1)) | 0;\n lo = (lo + Math.imul(al5, bl2)) | 0;\n mid = (mid + Math.imul(al5, bh2)) | 0;\n mid = (mid + Math.imul(ah5, bl2)) | 0;\n hi = (hi + Math.imul(ah5, bh2)) | 0;\n lo = (lo + Math.imul(al4, bl3)) | 0;\n mid = (mid + Math.imul(al4, bh3)) | 0;\n mid = (mid + Math.imul(ah4, bl3)) | 0;\n hi = (hi + Math.imul(ah4, bh3)) | 0;\n lo = (lo + Math.imul(al3, bl4)) | 0;\n mid = (mid + Math.imul(al3, bh4)) | 0;\n mid = (mid + Math.imul(ah3, bl4)) | 0;\n hi = (hi + Math.imul(ah3, bh4)) | 0;\n lo = (lo + Math.imul(al2, bl5)) | 0;\n mid = (mid + Math.imul(al2, bh5)) | 0;\n mid = (mid + Math.imul(ah2, bl5)) | 0;\n hi = (hi + Math.imul(ah2, bh5)) | 0;\n lo = (lo + Math.imul(al1, bl6)) | 0;\n mid = (mid + Math.imul(al1, bh6)) | 0;\n mid = (mid + Math.imul(ah1, bl6)) | 0;\n hi = (hi + Math.imul(ah1, bh6)) | 0;\n lo = (lo + Math.imul(al0, bl7)) | 0;\n mid = (mid + Math.imul(al0, bh7)) | 0;\n mid = (mid + Math.imul(ah0, bl7)) | 0;\n hi = (hi + Math.imul(ah0, bh7)) | 0;\n var w7 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w7 >>> 26)) | 0;\n w7 &= 0x3ffffff;\n /* k = 8 */\n lo = Math.imul(al8, bl0);\n mid = Math.imul(al8, bh0);\n mid = (mid + Math.imul(ah8, bl0)) | 0;\n hi = Math.imul(ah8, bh0);\n lo = (lo + Math.imul(al7, bl1)) | 0;\n mid = (mid + Math.imul(al7, bh1)) | 0;\n mid = (mid + Math.imul(ah7, bl1)) | 0;\n hi = (hi + Math.imul(ah7, bh1)) | 0;\n lo = (lo + Math.imul(al6, bl2)) | 0;\n mid = (mid + Math.imul(al6, bh2)) | 0;\n mid = (mid + Math.imul(ah6, bl2)) | 0;\n hi = (hi + Math.imul(ah6, bh2)) | 0;\n lo = (lo + Math.imul(al5, bl3)) | 0;\n mid = (mid + Math.imul(al5, bh3)) | 0;\n mid = (mid + Math.imul(ah5, bl3)) | 0;\n hi = (hi + Math.imul(ah5, bh3)) | 0;\n lo = (lo + Math.imul(al4, bl4)) | 0;\n mid = (mid + Math.imul(al4, bh4)) | 0;\n mid = (mid + Math.imul(ah4, bl4)) | 0;\n hi = (hi + Math.imul(ah4, bh4)) | 0;\n lo = (lo + Math.imul(al3, bl5)) | 0;\n mid = (mid + Math.imul(al3, bh5)) | 0;\n mid = (mid + Math.imul(ah3, bl5)) | 0;\n hi = (hi + Math.imul(ah3, bh5)) | 0;\n lo = (lo + Math.imul(al2, bl6)) | 0;\n mid = (mid + Math.imul(al2, bh6)) | 0;\n mid = (mid + Math.imul(ah2, bl6)) | 0;\n hi = (hi + Math.imul(ah2, bh6)) | 0;\n lo = (lo + Math.imul(al1, bl7)) | 0;\n mid = (mid + Math.imul(al1, bh7)) | 0;\n mid = (mid + Math.imul(ah1, bl7)) | 0;\n hi = (hi + Math.imul(ah1, bh7)) | 0;\n lo = (lo + Math.imul(al0, bl8)) | 0;\n mid = (mid + Math.imul(al0, bh8)) | 0;\n mid = (mid + Math.imul(ah0, bl8)) | 0;\n hi = (hi + Math.imul(ah0, bh8)) | 0;\n var w8 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w8 >>> 26)) | 0;\n w8 &= 0x3ffffff;\n /* k = 9 */\n lo = Math.imul(al9, bl0);\n mid = Math.imul(al9, bh0);\n mid = (mid + Math.imul(ah9, bl0)) | 0;\n hi = Math.imul(ah9, bh0);\n lo = (lo + Math.imul(al8, bl1)) | 0;\n mid = (mid + Math.imul(al8, bh1)) | 0;\n mid = (mid + Math.imul(ah8, bl1)) | 0;\n hi = (hi + Math.imul(ah8, bh1)) | 0;\n lo = (lo + Math.imul(al7, bl2)) | 0;\n mid = (mid + Math.imul(al7, bh2)) | 0;\n mid = (mid + Math.imul(ah7, bl2)) | 0;\n hi = (hi + Math.imul(ah7, bh2)) | 0;\n lo = (lo + Math.imul(al6, bl3)) | 0;\n mid = (mid + Math.imul(al6, bh3)) | 0;\n mid = (mid + Math.imul(ah6, bl3)) | 0;\n hi = (hi + Math.imul(ah6, bh3)) | 0;\n lo = (lo + Math.imul(al5, bl4)) | 0;\n mid = (mid + Math.imul(al5, bh4)) | 0;\n mid = (mid + Math.imul(ah5, bl4)) | 0;\n hi = (hi + Math.imul(ah5, bh4)) | 0;\n lo = (lo + Math.imul(al4, bl5)) | 0;\n mid = (mid + Math.imul(al4, bh5)) | 0;\n mid = (mid + Math.imul(ah4, bl5)) | 0;\n hi = (hi + Math.imul(ah4, bh5)) | 0;\n lo = (lo + Math.imul(al3, bl6)) | 0;\n mid = (mid + Math.imul(al3, bh6)) | 0;\n mid = (mid + Math.imul(ah3, bl6)) | 0;\n hi = (hi + Math.imul(ah3, bh6)) | 0;\n lo = (lo + Math.imul(al2, bl7)) | 0;\n mid = (mid + Math.imul(al2, bh7)) | 0;\n mid = (mid + Math.imul(ah2, bl7)) | 0;\n hi = (hi + Math.imul(ah2, bh7)) | 0;\n lo = (lo + Math.imul(al1, bl8)) | 0;\n mid = (mid + Math.imul(al1, bh8)) | 0;\n mid = (mid + Math.imul(ah1, bl8)) | 0;\n hi = (hi + Math.imul(ah1, bh8)) | 0;\n lo = (lo + Math.imul(al0, bl9)) | 0;\n mid = (mid + Math.imul(al0, bh9)) | 0;\n mid = (mid + Math.imul(ah0, bl9)) | 0;\n hi = (hi + Math.imul(ah0, bh9)) | 0;\n var w9 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w9 >>> 26)) | 0;\n w9 &= 0x3ffffff;\n /* k = 10 */\n lo = Math.imul(al9, bl1);\n mid = Math.imul(al9, bh1);\n mid = (mid + Math.imul(ah9, bl1)) | 0;\n hi = Math.imul(ah9, bh1);\n lo = (lo + Math.imul(al8, bl2)) | 0;\n mid = (mid + Math.imul(al8, bh2)) | 0;\n mid = (mid + Math.imul(ah8, bl2)) | 0;\n hi = (hi + Math.imul(ah8, bh2)) | 0;\n lo = (lo + Math.imul(al7, bl3)) | 0;\n mid = (mid + Math.imul(al7, bh3)) | 0;\n mid = (mid + Math.imul(ah7, bl3)) | 0;\n hi = (hi + Math.imul(ah7, bh3)) | 0;\n lo = (lo + Math.imul(al6, bl4)) | 0;\n mid = (mid + Math.imul(al6, bh4)) | 0;\n mid = (mid + Math.imul(ah6, bl4)) | 0;\n hi = (hi + Math.imul(ah6, bh4)) | 0;\n lo = (lo + Math.imul(al5, bl5)) | 0;\n mid = (mid + Math.imul(al5, bh5)) | 0;\n mid = (mid + Math.imul(ah5, bl5)) | 0;\n hi = (hi + Math.imul(ah5, bh5)) | 0;\n lo = (lo + Math.imul(al4, bl6)) | 0;\n mid = (mid + Math.imul(al4, bh6)) | 0;\n mid = (mid + Math.imul(ah4, bl6)) | 0;\n hi = (hi + Math.imul(ah4, bh6)) | 0;\n lo = (lo + Math.imul(al3, bl7)) | 0;\n mid = (mid + Math.imul(al3, bh7)) | 0;\n mid = (mid + Math.imul(ah3, bl7)) | 0;\n hi = (hi + Math.imul(ah3, bh7)) | 0;\n lo = (lo + Math.imul(al2, bl8)) | 0;\n mid = (mid + Math.imul(al2, bh8)) | 0;\n mid = (mid + Math.imul(ah2, bl8)) | 0;\n hi = (hi + Math.imul(ah2, bh8)) | 0;\n lo = (lo + Math.imul(al1, bl9)) | 0;\n mid = (mid + Math.imul(al1, bh9)) | 0;\n mid = (mid + Math.imul(ah1, bl9)) | 0;\n hi = (hi + Math.imul(ah1, bh9)) | 0;\n var w10 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w10 >>> 26)) | 0;\n w10 &= 0x3ffffff;\n /* k = 11 */\n lo = Math.imul(al9, bl2);\n mid = Math.imul(al9, bh2);\n mid = (mid + Math.imul(ah9, bl2)) | 0;\n hi = Math.imul(ah9, bh2);\n lo = (lo + Math.imul(al8, bl3)) | 0;\n mid = (mid + Math.imul(al8, bh3)) | 0;\n mid = (mid + Math.imul(ah8, bl3)) | 0;\n hi = (hi + Math.imul(ah8, bh3)) | 0;\n lo = (lo + Math.imul(al7, bl4)) | 0;\n mid = (mid + Math.imul(al7, bh4)) | 0;\n mid = (mid + Math.imul(ah7, bl4)) | 0;\n hi = (hi + Math.imul(ah7, bh4)) | 0;\n lo = (lo + Math.imul(al6, bl5)) | 0;\n mid = (mid + Math.imul(al6, bh5)) | 0;\n mid = (mid + Math.imul(ah6, bl5)) | 0;\n hi = (hi + Math.imul(ah6, bh5)) | 0;\n lo = (lo + Math.imul(al5, bl6)) | 0;\n mid = (mid + Math.imul(al5, bh6)) | 0;\n mid = (mid + Math.imul(ah5, bl6)) | 0;\n hi = (hi + Math.imul(ah5, bh6)) | 0;\n lo = (lo + Math.imul(al4, bl7)) | 0;\n mid = (mid + Math.imul(al4, bh7)) | 0;\n mid = (mid + Math.imul(ah4, bl7)) | 0;\n hi = (hi + Math.imul(ah4, bh7)) | 0;\n lo = (lo + Math.imul(al3, bl8)) | 0;\n mid = (mid + Math.imul(al3, bh8)) | 0;\n mid = (mid + Math.imul(ah3, bl8)) | 0;\n hi = (hi + Math.imul(ah3, bh8)) | 0;\n lo = (lo + Math.imul(al2, bl9)) | 0;\n mid = (mid + Math.imul(al2, bh9)) | 0;\n mid = (mid + Math.imul(ah2, bl9)) | 0;\n hi = (hi + Math.imul(ah2, bh9)) | 0;\n var w11 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w11 >>> 26)) | 0;\n w11 &= 0x3ffffff;\n /* k = 12 */\n lo = Math.imul(al9, bl3);\n mid = Math.imul(al9, bh3);\n mid = (mid + Math.imul(ah9, bl3)) | 0;\n hi = Math.imul(ah9, bh3);\n lo = (lo + Math.imul(al8, bl4)) | 0;\n mid = (mid + Math.imul(al8, bh4)) | 0;\n mid = (mid + Math.imul(ah8, bl4)) | 0;\n hi = (hi + Math.imul(ah8, bh4)) | 0;\n lo = (lo + Math.imul(al7, bl5)) | 0;\n mid = (mid + Math.imul(al7, bh5)) | 0;\n mid = (mid + Math.imul(ah7, bl5)) | 0;\n hi = (hi + Math.imul(ah7, bh5)) | 0;\n lo = (lo + Math.imul(al6, bl6)) | 0;\n mid = (mid + Math.imul(al6, bh6)) | 0;\n mid = (mid + Math.imul(ah6, bl6)) | 0;\n hi = (hi + Math.imul(ah6, bh6)) | 0;\n lo = (lo + Math.imul(al5, bl7)) | 0;\n mid = (mid + Math.imul(al5, bh7)) | 0;\n mid = (mid + Math.imul(ah5, bl7)) | 0;\n hi = (hi + Math.imul(ah5, bh7)) | 0;\n lo = (lo + Math.imul(al4, bl8)) | 0;\n mid = (mid + Math.imul(al4, bh8)) | 0;\n mid = (mid + Math.imul(ah4, bl8)) | 0;\n hi = (hi + Math.imul(ah4, bh8)) | 0;\n lo = (lo + Math.imul(al3, bl9)) | 0;\n mid = (mid + Math.imul(al3, bh9)) | 0;\n mid = (mid + Math.imul(ah3, bl9)) | 0;\n hi = (hi + Math.imul(ah3, bh9)) | 0;\n var w12 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w12 >>> 26)) | 0;\n w12 &= 0x3ffffff;\n /* k = 13 */\n lo = Math.imul(al9, bl4);\n mid = Math.imul(al9, bh4);\n mid = (mid + Math.imul(ah9, bl4)) | 0;\n hi = Math.imul(ah9, bh4);\n lo = (lo + Math.imul(al8, bl5)) | 0;\n mid = (mid + Math.imul(al8, bh5)) | 0;\n mid = (mid + Math.imul(ah8, bl5)) | 0;\n hi = (hi + Math.imul(ah8, bh5)) | 0;\n lo = (lo + Math.imul(al7, bl6)) | 0;\n mid = (mid + Math.imul(al7, bh6)) | 0;\n mid = (mid + Math.imul(ah7, bl6)) | 0;\n hi = (hi + Math.imul(ah7, bh6)) | 0;\n lo = (lo + Math.imul(al6, bl7)) | 0;\n mid = (mid + Math.imul(al6, bh7)) | 0;\n mid = (mid + Math.imul(ah6, bl7)) | 0;\n hi = (hi + Math.imul(ah6, bh7)) | 0;\n lo = (lo + Math.imul(al5, bl8)) | 0;\n mid = (mid + Math.imul(al5, bh8)) | 0;\n mid = (mid + Math.imul(ah5, bl8)) | 0;\n hi = (hi + Math.imul(ah5, bh8)) | 0;\n lo = (lo + Math.imul(al4, bl9)) | 0;\n mid = (mid + Math.imul(al4, bh9)) | 0;\n mid = (mid + Math.imul(ah4, bl9)) | 0;\n hi = (hi + Math.imul(ah4, bh9)) | 0;\n var w13 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w13 >>> 26)) | 0;\n w13 &= 0x3ffffff;\n /* k = 14 */\n lo = Math.imul(al9, bl5);\n mid = Math.imul(al9, bh5);\n mid = (mid + Math.imul(ah9, bl5)) | 0;\n hi = Math.imul(ah9, bh5);\n lo = (lo + Math.imul(al8, bl6)) | 0;\n mid = (mid + Math.imul(al8, bh6)) | 0;\n mid = (mid + Math.imul(ah8, bl6)) | 0;\n hi = (hi + Math.imul(ah8, bh6)) | 0;\n lo = (lo + Math.imul(al7, bl7)) | 0;\n mid = (mid + Math.imul(al7, bh7)) | 0;\n mid = (mid + Math.imul(ah7, bl7)) | 0;\n hi = (hi + Math.imul(ah7, bh7)) | 0;\n lo = (lo + Math.imul(al6, bl8)) | 0;\n mid = (mid + Math.imul(al6, bh8)) | 0;\n mid = (mid + Math.imul(ah6, bl8)) | 0;\n hi = (hi + Math.imul(ah6, bh8)) | 0;\n lo = (lo + Math.imul(al5, bl9)) | 0;\n mid = (mid + Math.imul(al5, bh9)) | 0;\n mid = (mid + Math.imul(ah5, bl9)) | 0;\n hi = (hi + Math.imul(ah5, bh9)) | 0;\n var w14 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w14 >>> 26)) | 0;\n w14 &= 0x3ffffff;\n /* k = 15 */\n lo = Math.imul(al9, bl6);\n mid = Math.imul(al9, bh6);\n mid = (mid + Math.imul(ah9, bl6)) | 0;\n hi = Math.imul(ah9, bh6);\n lo = (lo + Math.imul(al8, bl7)) | 0;\n mid = (mid + Math.imul(al8, bh7)) | 0;\n mid = (mid + Math.imul(ah8, bl7)) | 0;\n hi = (hi + Math.imul(ah8, bh7)) | 0;\n lo = (lo + Math.imul(al7, bl8)) | 0;\n mid = (mid + Math.imul(al7, bh8)) | 0;\n mid = (mid + Math.imul(ah7, bl8)) | 0;\n hi = (hi + Math.imul(ah7, bh8)) | 0;\n lo = (lo + Math.imul(al6, bl9)) | 0;\n mid = (mid + Math.imul(al6, bh9)) | 0;\n mid = (mid + Math.imul(ah6, bl9)) | 0;\n hi = (hi + Math.imul(ah6, bh9)) | 0;\n var w15 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w15 >>> 26)) | 0;\n w15 &= 0x3ffffff;\n /* k = 16 */\n lo = Math.imul(al9, bl7);\n mid = Math.imul(al9, bh7);\n mid = (mid + Math.imul(ah9, bl7)) | 0;\n hi = Math.imul(ah9, bh7);\n lo = (lo + Math.imul(al8, bl8)) | 0;\n mid = (mid + Math.imul(al8, bh8)) | 0;\n mid = (mid + Math.imul(ah8, bl8)) | 0;\n hi = (hi + Math.imul(ah8, bh8)) | 0;\n lo = (lo + Math.imul(al7, bl9)) | 0;\n mid = (mid + Math.imul(al7, bh9)) | 0;\n mid = (mid + Math.imul(ah7, bl9)) | 0;\n hi = (hi + Math.imul(ah7, bh9)) | 0;\n var w16 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w16 >>> 26)) | 0;\n w16 &= 0x3ffffff;\n /* k = 17 */\n lo = Math.imul(al9, bl8);\n mid = Math.imul(al9, bh8);\n mid = (mid + Math.imul(ah9, bl8)) | 0;\n hi = Math.imul(ah9, bh8);\n lo = (lo + Math.imul(al8, bl9)) | 0;\n mid = (mid + Math.imul(al8, bh9)) | 0;\n mid = (mid + Math.imul(ah8, bl9)) | 0;\n hi = (hi + Math.imul(ah8, bh9)) | 0;\n var w17 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w17 >>> 26)) | 0;\n w17 &= 0x3ffffff;\n /* k = 18 */\n lo = Math.imul(al9, bl9);\n mid = Math.imul(al9, bh9);\n mid = (mid + Math.imul(ah9, bl9)) | 0;\n hi = Math.imul(ah9, bh9);\n var w18 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w18 >>> 26)) | 0;\n w18 &= 0x3ffffff;\n o[0] = w0;\n o[1] = w1;\n o[2] = w2;\n o[3] = w3;\n o[4] = w4;\n o[5] = w5;\n o[6] = w6;\n o[7] = w7;\n o[8] = w8;\n o[9] = w9;\n o[10] = w10;\n o[11] = w11;\n o[12] = w12;\n o[13] = w13;\n o[14] = w14;\n o[15] = w15;\n o[16] = w16;\n o[17] = w17;\n o[18] = w18;\n if (c !== 0) {\n o[19] = c;\n out.length++;\n }\n return out;\n };\n\n // Polyfill comb\n if (!Math.imul) {\n comb10MulTo = smallMulTo;\n }\n\n function bigMulTo (self, num, out) {\n out.negative = num.negative ^ self.negative;\n out.length = self.length + num.length;\n\n var carry = 0;\n var hncarry = 0;\n for (var k = 0; k < out.length - 1; k++) {\n // Sum all words with the same `i + j = k` and accumulate `ncarry`,\n // note that ncarry could be >= 0x3ffffff\n var ncarry = hncarry;\n hncarry = 0;\n var rword = carry & 0x3ffffff;\n var maxJ = Math.min(k, num.length - 1);\n for (var j = Math.max(0, k - self.length + 1); j <= maxJ; j++) {\n var i = k - j;\n var a = self.words[i] | 0;\n var b = num.words[j] | 0;\n var r = a * b;\n\n var lo = r & 0x3ffffff;\n ncarry = (ncarry + ((r / 0x4000000) | 0)) | 0;\n lo = (lo + rword) | 0;\n rword = lo & 0x3ffffff;\n ncarry = (ncarry + (lo >>> 26)) | 0;\n\n hncarry += ncarry >>> 26;\n ncarry &= 0x3ffffff;\n }\n out.words[k] = rword;\n carry = ncarry;\n ncarry = hncarry;\n }\n if (carry !== 0) {\n out.words[k] = carry;\n } else {\n out.length--;\n }\n\n return out.strip();\n }\n\n function jumboMulTo (self, num, out) {\n var fftm = new FFTM();\n return fftm.mulp(self, num, out);\n }\n\n BN.prototype.mulTo = function mulTo (num, out) {\n var res;\n var len = this.length + num.length;\n if (this.length === 10 && num.length === 10) {\n res = comb10MulTo(this, num, out);\n } else if (len < 63) {\n res = smallMulTo(this, num, out);\n } else if (len < 1024) {\n res = bigMulTo(this, num, out);\n } else {\n res = jumboMulTo(this, num, out);\n }\n\n return res;\n };\n\n // Cooley-Tukey algorithm for FFT\n // slightly revisited to rely on looping instead of recursion\n\n function FFTM (x, y) {\n this.x = x;\n this.y = y;\n }\n\n FFTM.prototype.makeRBT = function makeRBT (N) {\n var t = new Array(N);\n var l = BN.prototype._countBits(N) - 1;\n for (var i = 0; i < N; i++) {\n t[i] = this.revBin(i, l, N);\n }\n\n return t;\n };\n\n // Returns binary-reversed representation of `x`\n FFTM.prototype.revBin = function revBin (x, l, N) {\n if (x === 0 || x === N - 1) return x;\n\n var rb = 0;\n for (var i = 0; i < l; i++) {\n rb |= (x & 1) << (l - i - 1);\n x >>= 1;\n }\n\n return rb;\n };\n\n // Performs \"tweedling\" phase, therefore 'emulating'\n // behaviour of the recursive algorithm\n FFTM.prototype.permute = function permute (rbt, rws, iws, rtws, itws, N) {\n for (var i = 0; i < N; i++) {\n rtws[i] = rws[rbt[i]];\n itws[i] = iws[rbt[i]];\n }\n };\n\n FFTM.prototype.transform = function transform (rws, iws, rtws, itws, N, rbt) {\n this.permute(rbt, rws, iws, rtws, itws, N);\n\n for (var s = 1; s < N; s <<= 1) {\n var l = s << 1;\n\n var rtwdf = Math.cos(2 * Math.PI / l);\n var itwdf = Math.sin(2 * Math.PI / l);\n\n for (var p = 0; p < N; p += l) {\n var rtwdf_ = rtwdf;\n var itwdf_ = itwdf;\n\n for (var j = 0; j < s; j++) {\n var re = rtws[p + j];\n var ie = itws[p + j];\n\n var ro = rtws[p + j + s];\n var io = itws[p + j + s];\n\n var rx = rtwdf_ * ro - itwdf_ * io;\n\n io = rtwdf_ * io + itwdf_ * ro;\n ro = rx;\n\n rtws[p + j] = re + ro;\n itws[p + j] = ie + io;\n\n rtws[p + j + s] = re - ro;\n itws[p + j + s] = ie - io;\n\n /* jshint maxdepth : false */\n if (j !== l) {\n rx = rtwdf * rtwdf_ - itwdf * itwdf_;\n\n itwdf_ = rtwdf * itwdf_ + itwdf * rtwdf_;\n rtwdf_ = rx;\n }\n }\n }\n }\n };\n\n FFTM.prototype.guessLen13b = function guessLen13b (n, m) {\n var N = Math.max(m, n) | 1;\n var odd = N & 1;\n var i = 0;\n for (N = N / 2 | 0; N; N = N >>> 1) {\n i++;\n }\n\n return 1 << i + 1 + odd;\n };\n\n FFTM.prototype.conjugate = function conjugate (rws, iws, N) {\n if (N <= 1) return;\n\n for (var i = 0; i < N / 2; i++) {\n var t = rws[i];\n\n rws[i] = rws[N - i - 1];\n rws[N - i - 1] = t;\n\n t = iws[i];\n\n iws[i] = -iws[N - i - 1];\n iws[N - i - 1] = -t;\n }\n };\n\n FFTM.prototype.normalize13b = function normalize13b (ws, N) {\n var carry = 0;\n for (var i = 0; i < N / 2; i++) {\n var w = Math.round(ws[2 * i + 1] / N) * 0x2000 +\n Math.round(ws[2 * i] / N) +\n carry;\n\n ws[i] = w & 0x3ffffff;\n\n if (w < 0x4000000) {\n carry = 0;\n } else {\n carry = w / 0x4000000 | 0;\n }\n }\n\n return ws;\n };\n\n FFTM.prototype.convert13b = function convert13b (ws, len, rws, N) {\n var carry = 0;\n for (var i = 0; i < len; i++) {\n carry = carry + (ws[i] | 0);\n\n rws[2 * i] = carry & 0x1fff; carry = carry >>> 13;\n rws[2 * i + 1] = carry & 0x1fff; carry = carry >>> 13;\n }\n\n // Pad with zeroes\n for (i = 2 * len; i < N; ++i) {\n rws[i] = 0;\n }\n\n assert(carry === 0);\n assert((carry & ~0x1fff) === 0);\n };\n\n FFTM.prototype.stub = function stub (N) {\n var ph = new Array(N);\n for (var i = 0; i < N; i++) {\n ph[i] = 0;\n }\n\n return ph;\n };\n\n FFTM.prototype.mulp = function mulp (x, y, out) {\n var N = 2 * this.guessLen13b(x.length, y.length);\n\n var rbt = this.makeRBT(N);\n\n var _ = this.stub(N);\n\n var rws = new Array(N);\n var rwst = new Array(N);\n var iwst = new Array(N);\n\n var nrws = new Array(N);\n var nrwst = new Array(N);\n var niwst = new Array(N);\n\n var rmws = out.words;\n rmws.length = N;\n\n this.convert13b(x.words, x.length, rws, N);\n this.convert13b(y.words, y.length, nrws, N);\n\n this.transform(rws, _, rwst, iwst, N, rbt);\n this.transform(nrws, _, nrwst, niwst, N, rbt);\n\n for (var i = 0; i < N; i++) {\n var rx = rwst[i] * nrwst[i] - iwst[i] * niwst[i];\n iwst[i] = rwst[i] * niwst[i] + iwst[i] * nrwst[i];\n rwst[i] = rx;\n }\n\n this.conjugate(rwst, iwst, N);\n this.transform(rwst, iwst, rmws, _, N, rbt);\n this.conjugate(rmws, _, N);\n this.normalize13b(rmws, N);\n\n out.negative = x.negative ^ y.negative;\n out.length = x.length + y.length;\n return out.strip();\n };\n\n // Multiply `this` by `num`\n BN.prototype.mul = function mul (num) {\n var out = new BN(null);\n out.words = new Array(this.length + num.length);\n return this.mulTo(num, out);\n };\n\n // Multiply employing FFT\n BN.prototype.mulf = function mulf (num) {\n var out = new BN(null);\n out.words = new Array(this.length + num.length);\n return jumboMulTo(this, num, out);\n };\n\n // In-place Multiplication\n BN.prototype.imul = function imul (num) {\n return this.clone().mulTo(num, this);\n };\n\n BN.prototype.imuln = function imuln (num) {\n assert(typeof num === 'number');\n assert(num < 0x4000000);\n\n // Carry\n var carry = 0;\n for (var i = 0; i < this.length; i++) {\n var w = (this.words[i] | 0) * num;\n var lo = (w & 0x3ffffff) + (carry & 0x3ffffff);\n carry >>= 26;\n carry += (w / 0x4000000) | 0;\n // NOTE: lo is 27bit maximum\n carry += lo >>> 26;\n this.words[i] = lo & 0x3ffffff;\n }\n\n if (carry !== 0) {\n this.words[i] = carry;\n this.length++;\n }\n\n return this;\n };\n\n BN.prototype.muln = function muln (num) {\n return this.clone().imuln(num);\n };\n\n // `this` * `this`\n BN.prototype.sqr = function sqr () {\n return this.mul(this);\n };\n\n // `this` * `this` in-place\n BN.prototype.isqr = function isqr () {\n return this.imul(this.clone());\n };\n\n // Math.pow(`this`, `num`)\n BN.prototype.pow = function pow (num) {\n var w = toBitArray(num);\n if (w.length === 0) return new BN(1);\n\n // Skip leading zeroes\n var res = this;\n for (var i = 0; i < w.length; i++, res = res.sqr()) {\n if (w[i] !== 0) break;\n }\n\n if (++i < w.length) {\n for (var q = res.sqr(); i < w.length; i++, q = q.sqr()) {\n if (w[i] === 0) continue;\n\n res = res.mul(q);\n }\n }\n\n return res;\n };\n\n // Shift-left in-place\n BN.prototype.iushln = function iushln (bits) {\n assert(typeof bits === 'number' && bits >= 0);\n var r = bits % 26;\n var s = (bits - r) / 26;\n var carryMask = (0x3ffffff >>> (26 - r)) << (26 - r);\n var i;\n\n if (r !== 0) {\n var carry = 0;\n\n for (i = 0; i < this.length; i++) {\n var newCarry = this.words[i] & carryMask;\n var c = ((this.words[i] | 0) - newCarry) << r;\n this.words[i] = c | carry;\n carry = newCarry >>> (26 - r);\n }\n\n if (carry) {\n this.words[i] = carry;\n this.length++;\n }\n }\n\n if (s !== 0) {\n for (i = this.length - 1; i >= 0; i--) {\n this.words[i + s] = this.words[i];\n }\n\n for (i = 0; i < s; i++) {\n this.words[i] = 0;\n }\n\n this.length += s;\n }\n\n return this.strip();\n };\n\n BN.prototype.ishln = function ishln (bits) {\n // TODO(indutny): implement me\n assert(this.negative === 0);\n return this.iushln(bits);\n };\n\n // Shift-right in-place\n // NOTE: `hint` is a lowest bit before trailing zeroes\n // NOTE: if `extended` is present - it will be filled with destroyed bits\n BN.prototype.iushrn = function iushrn (bits, hint, extended) {\n assert(typeof bits === 'number' && bits >= 0);\n var h;\n if (hint) {\n h = (hint - (hint % 26)) / 26;\n } else {\n h = 0;\n }\n\n var r = bits % 26;\n var s = Math.min((bits - r) / 26, this.length);\n var mask = 0x3ffffff ^ ((0x3ffffff >>> r) << r);\n var maskedWords = extended;\n\n h -= s;\n h = Math.max(0, h);\n\n // Extended mode, copy masked part\n if (maskedWords) {\n for (var i = 0; i < s; i++) {\n maskedWords.words[i] = this.words[i];\n }\n maskedWords.length = s;\n }\n\n if (s === 0) {\n // No-op, we should not move anything at all\n } else if (this.length > s) {\n this.length -= s;\n for (i = 0; i < this.length; i++) {\n this.words[i] = this.words[i + s];\n }\n } else {\n this.words[0] = 0;\n this.length = 1;\n }\n\n var carry = 0;\n for (i = this.length - 1; i >= 0 && (carry !== 0 || i >= h); i--) {\n var word = this.words[i] | 0;\n this.words[i] = (carry << (26 - r)) | (word >>> r);\n carry = word & mask;\n }\n\n // Push carried bits as a mask\n if (maskedWords && carry !== 0) {\n maskedWords.words[maskedWords.length++] = carry;\n }\n\n if (this.length === 0) {\n this.words[0] = 0;\n this.length = 1;\n }\n\n return this.strip();\n };\n\n BN.prototype.ishrn = function ishrn (bits, hint, extended) {\n // TODO(indutny): implement me\n assert(this.negative === 0);\n return this.iushrn(bits, hint, extended);\n };\n\n // Shift-left\n BN.prototype.shln = function shln (bits) {\n return this.clone().ishln(bits);\n };\n\n BN.prototype.ushln = function ushln (bits) {\n return this.clone().iushln(bits);\n };\n\n // Shift-right\n BN.prototype.shrn = function shrn (bits) {\n return this.clone().ishrn(bits);\n };\n\n BN.prototype.ushrn = function ushrn (bits) {\n return this.clone().iushrn(bits);\n };\n\n // Test if n bit is set\n BN.prototype.testn = function testn (bit) {\n assert(typeof bit === 'number' && bit >= 0);\n var r = bit % 26;\n var s = (bit - r) / 26;\n var q = 1 << r;\n\n // Fast case: bit is much higher than all existing words\n if (this.length <= s) return false;\n\n // Check bit and return\n var w = this.words[s];\n\n return !!(w & q);\n };\n\n // Return only lowers bits of number (in-place)\n BN.prototype.imaskn = function imaskn (bits) {\n assert(typeof bits === 'number' && bits >= 0);\n var r = bits % 26;\n var s = (bits - r) / 26;\n\n assert(this.negative === 0, 'imaskn works only with positive numbers');\n\n if (this.length <= s) {\n return this;\n }\n\n if (r !== 0) {\n s++;\n }\n this.length = Math.min(s, this.length);\n\n if (r !== 0) {\n var mask = 0x3ffffff ^ ((0x3ffffff >>> r) << r);\n this.words[this.length - 1] &= mask;\n }\n\n return this.strip();\n };\n\n // Return only lowers bits of number\n BN.prototype.maskn = function maskn (bits) {\n return this.clone().imaskn(bits);\n };\n\n // Add plain number `num` to `this`\n BN.prototype.iaddn = function iaddn (num) {\n assert(typeof num === 'number');\n assert(num < 0x4000000);\n if (num < 0) return this.isubn(-num);\n\n // Possible sign change\n if (this.negative !== 0) {\n if (this.length === 1 && (this.words[0] | 0) < num) {\n this.words[0] = num - (this.words[0] | 0);\n this.negative = 0;\n return this;\n }\n\n this.negative = 0;\n this.isubn(num);\n this.negative = 1;\n return this;\n }\n\n // Add without checks\n return this._iaddn(num);\n };\n\n BN.prototype._iaddn = function _iaddn (num) {\n this.words[0] += num;\n\n // Carry\n for (var i = 0; i < this.length && this.words[i] >= 0x4000000; i++) {\n this.words[i] -= 0x4000000;\n if (i === this.length - 1) {\n this.words[i + 1] = 1;\n } else {\n this.words[i + 1]++;\n }\n }\n this.length = Math.max(this.length, i + 1);\n\n return this;\n };\n\n // Subtract plain number `num` from `this`\n BN.prototype.isubn = function isubn (num) {\n assert(typeof num === 'number');\n assert(num < 0x4000000);\n if (num < 0) return this.iaddn(-num);\n\n if (this.negative !== 0) {\n this.negative = 0;\n this.iaddn(num);\n this.negative = 1;\n return this;\n }\n\n this.words[0] -= num;\n\n if (this.length === 1 && this.words[0] < 0) {\n this.words[0] = -this.words[0];\n this.negative = 1;\n } else {\n // Carry\n for (var i = 0; i < this.length && this.words[i] < 0; i++) {\n this.words[i] += 0x4000000;\n this.words[i + 1] -= 1;\n }\n }\n\n return this.strip();\n };\n\n BN.prototype.addn = function addn (num) {\n return this.clone().iaddn(num);\n };\n\n BN.prototype.subn = function subn (num) {\n return this.clone().isubn(num);\n };\n\n BN.prototype.iabs = function iabs () {\n this.negative = 0;\n\n return this;\n };\n\n BN.prototype.abs = function abs () {\n return this.clone().iabs();\n };\n\n BN.prototype._ishlnsubmul = function _ishlnsubmul (num, mul, shift) {\n var len = num.length + shift;\n var i;\n\n this._expand(len);\n\n var w;\n var carry = 0;\n for (i = 0; i < num.length; i++) {\n w = (this.words[i + shift] | 0) + carry;\n var right = (num.words[i] | 0) * mul;\n w -= right & 0x3ffffff;\n carry = (w >> 26) - ((right / 0x4000000) | 0);\n this.words[i + shift] = w & 0x3ffffff;\n }\n for (; i < this.length - shift; i++) {\n w = (this.words[i + shift] | 0) + carry;\n carry = w >> 26;\n this.words[i + shift] = w & 0x3ffffff;\n }\n\n if (carry === 0) return this.strip();\n\n // Subtraction overflow\n assert(carry === -1);\n carry = 0;\n for (i = 0; i < this.length; i++) {\n w = -(this.words[i] | 0) + carry;\n carry = w >> 26;\n this.words[i] = w & 0x3ffffff;\n }\n this.negative = 1;\n\n return this.strip();\n };\n\n BN.prototype._wordDiv = function _wordDiv (num, mode) {\n var shift = this.length - num.length;\n\n var a = this.clone();\n var b = num;\n\n // Normalize\n var bhi = b.words[b.length - 1] | 0;\n var bhiBits = this._countBits(bhi);\n shift = 26 - bhiBits;\n if (shift !== 0) {\n b = b.ushln(shift);\n a.iushln(shift);\n bhi = b.words[b.length - 1] | 0;\n }\n\n // Initialize quotient\n var m = a.length - b.length;\n var q;\n\n if (mode !== 'mod') {\n q = new BN(null);\n q.length = m + 1;\n q.words = new Array(q.length);\n for (var i = 0; i < q.length; i++) {\n q.words[i] = 0;\n }\n }\n\n var diff = a.clone()._ishlnsubmul(b, 1, m);\n if (diff.negative === 0) {\n a = diff;\n if (q) {\n q.words[m] = 1;\n }\n }\n\n for (var j = m - 1; j >= 0; j--) {\n var qj = (a.words[b.length + j] | 0) * 0x4000000 +\n (a.words[b.length + j - 1] | 0);\n\n // NOTE: (qj / bhi) is (0x3ffffff * 0x4000000 + 0x3ffffff) / 0x2000000 max\n // (0x7ffffff)\n qj = Math.min((qj / bhi) | 0, 0x3ffffff);\n\n a._ishlnsubmul(b, qj, j);\n while (a.negative !== 0) {\n qj--;\n a.negative = 0;\n a._ishlnsubmul(b, 1, j);\n if (!a.isZero()) {\n a.negative ^= 1;\n }\n }\n if (q) {\n q.words[j] = qj;\n }\n }\n if (q) {\n q.strip();\n }\n a.strip();\n\n // Denormalize\n if (mode !== 'div' && shift !== 0) {\n a.iushrn(shift);\n }\n\n return {\n div: q || null,\n mod: a\n };\n };\n\n // NOTE: 1) `mode` can be set to `mod` to request mod only,\n // to `div` to request div only, or be absent to\n // request both div & mod\n // 2) `positive` is true if unsigned mod is requested\n BN.prototype.divmod = function divmod (num, mode, positive) {\n assert(!num.isZero());\n\n if (this.isZero()) {\n return {\n div: new BN(0),\n mod: new BN(0)\n };\n }\n\n var div, mod, res;\n if (this.negative !== 0 && num.negative === 0) {\n res = this.neg().divmod(num, mode);\n\n if (mode !== 'mod') {\n div = res.div.neg();\n }\n\n if (mode !== 'div') {\n mod = res.mod.neg();\n if (positive && mod.negative !== 0) {\n mod.iadd(num);\n }\n }\n\n return {\n div: div,\n mod: mod\n };\n }\n\n if (this.negative === 0 && num.negative !== 0) {\n res = this.divmod(num.neg(), mode);\n\n if (mode !== 'mod') {\n div = res.div.neg();\n }\n\n return {\n div: div,\n mod: res.mod\n };\n }\n\n if ((this.negative & num.negative) !== 0) {\n res = this.neg().divmod(num.neg(), mode);\n\n if (mode !== 'div') {\n mod = res.mod.neg();\n if (positive && mod.negative !== 0) {\n mod.isub(num);\n }\n }\n\n return {\n div: res.div,\n mod: mod\n };\n }\n\n // Both numbers are positive at this point\n\n // Strip both numbers to approximate shift value\n if (num.length > this.length || this.cmp(num) < 0) {\n return {\n div: new BN(0),\n mod: this\n };\n }\n\n // Very short reduction\n if (num.length === 1) {\n if (mode === 'div') {\n return {\n div: this.divn(num.words[0]),\n mod: null\n };\n }\n\n if (mode === 'mod') {\n return {\n div: null,\n mod: new BN(this.modn(num.words[0]))\n };\n }\n\n return {\n div: this.divn(num.words[0]),\n mod: new BN(this.modn(num.words[0]))\n };\n }\n\n return this._wordDiv(num, mode);\n };\n\n // Find `this` / `num`\n BN.prototype.div = function div (num) {\n return this.divmod(num, 'div', false).div;\n };\n\n // Find `this` % `num`\n BN.prototype.mod = function mod (num) {\n return this.divmod(num, 'mod', false).mod;\n };\n\n BN.prototype.umod = function umod (num) {\n return this.divmod(num, 'mod', true).mod;\n };\n\n // Find Round(`this` / `num`)\n BN.prototype.divRound = function divRound (num) {\n var dm = this.divmod(num);\n\n // Fast case - exact division\n if (dm.mod.isZero()) return dm.div;\n\n var mod = dm.div.negative !== 0 ? dm.mod.isub(num) : dm.mod;\n\n var half = num.ushrn(1);\n var r2 = num.andln(1);\n var cmp = mod.cmp(half);\n\n // Round down\n if (cmp < 0 || r2 === 1 && cmp === 0) return dm.div;\n\n // Round up\n return dm.div.negative !== 0 ? dm.div.isubn(1) : dm.div.iaddn(1);\n };\n\n BN.prototype.modn = function modn (num) {\n assert(num <= 0x3ffffff);\n var p = (1 << 26) % num;\n\n var acc = 0;\n for (var i = this.length - 1; i >= 0; i--) {\n acc = (p * acc + (this.words[i] | 0)) % num;\n }\n\n return acc;\n };\n\n // In-place division by number\n BN.prototype.idivn = function idivn (num) {\n assert(num <= 0x3ffffff);\n\n var carry = 0;\n for (var i = this.length - 1; i >= 0; i--) {\n var w = (this.words[i] | 0) + carry * 0x4000000;\n this.words[i] = (w / num) | 0;\n carry = w % num;\n }\n\n return this.strip();\n };\n\n BN.prototype.divn = function divn (num) {\n return this.clone().idivn(num);\n };\n\n BN.prototype.egcd = function egcd (p) {\n assert(p.negative === 0);\n assert(!p.isZero());\n\n var x = this;\n var y = p.clone();\n\n if (x.negative !== 0) {\n x = x.umod(p);\n } else {\n x = x.clone();\n }\n\n // A * x + B * y = x\n var A = new BN(1);\n var B = new BN(0);\n\n // C * x + D * y = y\n var C = new BN(0);\n var D = new BN(1);\n\n var g = 0;\n\n while (x.isEven() && y.isEven()) {\n x.iushrn(1);\n y.iushrn(1);\n ++g;\n }\n\n var yp = y.clone();\n var xp = x.clone();\n\n while (!x.isZero()) {\n for (var i = 0, im = 1; (x.words[0] & im) === 0 && i < 26; ++i, im <<= 1);\n if (i > 0) {\n x.iushrn(i);\n while (i-- > 0) {\n if (A.isOdd() || B.isOdd()) {\n A.iadd(yp);\n B.isub(xp);\n }\n\n A.iushrn(1);\n B.iushrn(1);\n }\n }\n\n for (var j = 0, jm = 1; (y.words[0] & jm) === 0 && j < 26; ++j, jm <<= 1);\n if (j > 0) {\n y.iushrn(j);\n while (j-- > 0) {\n if (C.isOdd() || D.isOdd()) {\n C.iadd(yp);\n D.isub(xp);\n }\n\n C.iushrn(1);\n D.iushrn(1);\n }\n }\n\n if (x.cmp(y) >= 0) {\n x.isub(y);\n A.isub(C);\n B.isub(D);\n } else {\n y.isub(x);\n C.isub(A);\n D.isub(B);\n }\n }\n\n return {\n a: C,\n b: D,\n gcd: y.iushln(g)\n };\n };\n\n // This is reduced incarnation of the binary EEA\n // above, designated to invert members of the\n // _prime_ fields F(p) at a maximal speed\n BN.prototype._invmp = function _invmp (p) {\n assert(p.negative === 0);\n assert(!p.isZero());\n\n var a = this;\n var b = p.clone();\n\n if (a.negative !== 0) {\n a = a.umod(p);\n } else {\n a = a.clone();\n }\n\n var x1 = new BN(1);\n var x2 = new BN(0);\n\n var delta = b.clone();\n\n while (a.cmpn(1) > 0 && b.cmpn(1) > 0) {\n for (var i = 0, im = 1; (a.words[0] & im) === 0 && i < 26; ++i, im <<= 1);\n if (i > 0) {\n a.iushrn(i);\n while (i-- > 0) {\n if (x1.isOdd()) {\n x1.iadd(delta);\n }\n\n x1.iushrn(1);\n }\n }\n\n for (var j = 0, jm = 1; (b.words[0] & jm) === 0 && j < 26; ++j, jm <<= 1);\n if (j > 0) {\n b.iushrn(j);\n while (j-- > 0) {\n if (x2.isOdd()) {\n x2.iadd(delta);\n }\n\n x2.iushrn(1);\n }\n }\n\n if (a.cmp(b) >= 0) {\n a.isub(b);\n x1.isub(x2);\n } else {\n b.isub(a);\n x2.isub(x1);\n }\n }\n\n var res;\n if (a.cmpn(1) === 0) {\n res = x1;\n } else {\n res = x2;\n }\n\n if (res.cmpn(0) < 0) {\n res.iadd(p);\n }\n\n return res;\n };\n\n BN.prototype.gcd = function gcd (num) {\n if (this.isZero()) return num.abs();\n if (num.isZero()) return this.abs();\n\n var a = this.clone();\n var b = num.clone();\n a.negative = 0;\n b.negative = 0;\n\n // Remove common factor of two\n for (var shift = 0; a.isEven() && b.isEven(); shift++) {\n a.iushrn(1);\n b.iushrn(1);\n }\n\n do {\n while (a.isEven()) {\n a.iushrn(1);\n }\n while (b.isEven()) {\n b.iushrn(1);\n }\n\n var r = a.cmp(b);\n if (r < 0) {\n // Swap `a` and `b` to make `a` always bigger than `b`\n var t = a;\n a = b;\n b = t;\n } else if (r === 0 || b.cmpn(1) === 0) {\n break;\n }\n\n a.isub(b);\n } while (true);\n\n return b.iushln(shift);\n };\n\n // Invert number in the field F(num)\n BN.prototype.invm = function invm (num) {\n return this.egcd(num).a.umod(num);\n };\n\n BN.prototype.isEven = function isEven () {\n return (this.words[0] & 1) === 0;\n };\n\n BN.prototype.isOdd = function isOdd () {\n return (this.words[0] & 1) === 1;\n };\n\n // And first word and num\n BN.prototype.andln = function andln (num) {\n return this.words[0] & num;\n };\n\n // Increment at the bit position in-line\n BN.prototype.bincn = function bincn (bit) {\n assert(typeof bit === 'number');\n var r = bit % 26;\n var s = (bit - r) / 26;\n var q = 1 << r;\n\n // Fast case: bit is much higher than all existing words\n if (this.length <= s) {\n this._expand(s + 1);\n this.words[s] |= q;\n return this;\n }\n\n // Add bit and propagate, if needed\n var carry = q;\n for (var i = s; carry !== 0 && i < this.length; i++) {\n var w = this.words[i] | 0;\n w += carry;\n carry = w >>> 26;\n w &= 0x3ffffff;\n this.words[i] = w;\n }\n if (carry !== 0) {\n this.words[i] = carry;\n this.length++;\n }\n return this;\n };\n\n BN.prototype.isZero = function isZero () {\n return this.length === 1 && this.words[0] === 0;\n };\n\n BN.prototype.cmpn = function cmpn (num) {\n var negative = num < 0;\n\n if (this.negative !== 0 && !negative) return -1;\n if (this.negative === 0 && negative) return 1;\n\n this.strip();\n\n var res;\n if (this.length > 1) {\n res = 1;\n } else {\n if (negative) {\n num = -num;\n }\n\n assert(num <= 0x3ffffff, 'Number is too big');\n\n var w = this.words[0] | 0;\n res = w === num ? 0 : w < num ? -1 : 1;\n }\n if (this.negative !== 0) return -res | 0;\n return res;\n };\n\n // Compare two numbers and return:\n // 1 - if `this` > `num`\n // 0 - if `this` == `num`\n // -1 - if `this` < `num`\n BN.prototype.cmp = function cmp (num) {\n if (this.negative !== 0 && num.negative === 0) return -1;\n if (this.negative === 0 && num.negative !== 0) return 1;\n\n var res = this.ucmp(num);\n if (this.negative !== 0) return -res | 0;\n return res;\n };\n\n // Unsigned comparison\n BN.prototype.ucmp = function ucmp (num) {\n // At this point both numbers have the same sign\n if (this.length > num.length) return 1;\n if (this.length < num.length) return -1;\n\n var res = 0;\n for (var i = this.length - 1; i >= 0; i--) {\n var a = this.words[i] | 0;\n var b = num.words[i] | 0;\n\n if (a === b) continue;\n if (a < b) {\n res = -1;\n } else if (a > b) {\n res = 1;\n }\n break;\n }\n return res;\n };\n\n BN.prototype.gtn = function gtn (num) {\n return this.cmpn(num) === 1;\n };\n\n BN.prototype.gt = function gt (num) {\n return this.cmp(num) === 1;\n };\n\n BN.prototype.gten = function gten (num) {\n return this.cmpn(num) >= 0;\n };\n\n BN.prototype.gte = function gte (num) {\n return this.cmp(num) >= 0;\n };\n\n BN.prototype.ltn = function ltn (num) {\n return this.cmpn(num) === -1;\n };\n\n BN.prototype.lt = function lt (num) {\n return this.cmp(num) === -1;\n };\n\n BN.prototype.lten = function lten (num) {\n return this.cmpn(num) <= 0;\n };\n\n BN.prototype.lte = function lte (num) {\n return this.cmp(num) <= 0;\n };\n\n BN.prototype.eqn = function eqn (num) {\n return this.cmpn(num) === 0;\n };\n\n BN.prototype.eq = function eq (num) {\n return this.cmp(num) === 0;\n };\n\n //\n // A reduce context, could be using montgomery or something better, depending\n // on the `m` itself.\n //\n BN.red = function red (num) {\n return new Red(num);\n };\n\n BN.prototype.toRed = function toRed (ctx) {\n assert(!this.red, 'Already a number in reduction context');\n assert(this.negative === 0, 'red works only with positives');\n return ctx.convertTo(this)._forceRed(ctx);\n };\n\n BN.prototype.fromRed = function fromRed () {\n assert(this.red, 'fromRed works only with numbers in reduction context');\n return this.red.convertFrom(this);\n };\n\n BN.prototype._forceRed = function _forceRed (ctx) {\n this.red = ctx;\n return this;\n };\n\n BN.prototype.forceRed = function forceRed (ctx) {\n assert(!this.red, 'Already a number in reduction context');\n return this._forceRed(ctx);\n };\n\n BN.prototype.redAdd = function redAdd (num) {\n assert(this.red, 'redAdd works only with red numbers');\n return this.red.add(this, num);\n };\n\n BN.prototype.redIAdd = function redIAdd (num) {\n assert(this.red, 'redIAdd works only with red numbers');\n return this.red.iadd(this, num);\n };\n\n BN.prototype.redSub = function redSub (num) {\n assert(this.red, 'redSub works only with red numbers');\n return this.red.sub(this, num);\n };\n\n BN.prototype.redISub = function redISub (num) {\n assert(this.red, 'redISub works only with red numbers');\n return this.red.isub(this, num);\n };\n\n BN.prototype.redShl = function redShl (num) {\n assert(this.red, 'redShl works only with red numbers');\n return this.red.shl(this, num);\n };\n\n BN.prototype.redMul = function redMul (num) {\n assert(this.red, 'redMul works only with red numbers');\n this.red._verify2(this, num);\n return this.red.mul(this, num);\n };\n\n BN.prototype.redIMul = function redIMul (num) {\n assert(this.red, 'redMul works only with red numbers');\n this.red._verify2(this, num);\n return this.red.imul(this, num);\n };\n\n BN.prototype.redSqr = function redSqr () {\n assert(this.red, 'redSqr works only with red numbers');\n this.red._verify1(this);\n return this.red.sqr(this);\n };\n\n BN.prototype.redISqr = function redISqr () {\n assert(this.red, 'redISqr works only with red numbers');\n this.red._verify1(this);\n return this.red.isqr(this);\n };\n\n // Square root over p\n BN.prototype.redSqrt = function redSqrt () {\n assert(this.red, 'redSqrt works only with red numbers');\n this.red._verify1(this);\n return this.red.sqrt(this);\n };\n\n BN.prototype.redInvm = function redInvm () {\n assert(this.red, 'redInvm works only with red numbers');\n this.red._verify1(this);\n return this.red.invm(this);\n };\n\n // Return negative clone of `this` % `red modulo`\n BN.prototype.redNeg = function redNeg () {\n assert(this.red, 'redNeg works only with red numbers');\n this.red._verify1(this);\n return this.red.neg(this);\n };\n\n BN.prototype.redPow = function redPow (num) {\n assert(this.red && !num.red, 'redPow(normalNum)');\n this.red._verify1(this);\n return this.red.pow(this, num);\n };\n\n // Prime numbers with efficient reduction\n var primes = {\n k256: null,\n p224: null,\n p192: null,\n p25519: null\n };\n\n // Pseudo-Mersenne prime\n function MPrime (name, p) {\n // P = 2 ^ N - K\n this.name = name;\n this.p = new BN(p, 16);\n this.n = this.p.bitLength();\n this.k = new BN(1).iushln(this.n).isub(this.p);\n\n this.tmp = this._tmp();\n }\n\n MPrime.prototype._tmp = function _tmp () {\n var tmp = new BN(null);\n tmp.words = new Array(Math.ceil(this.n / 13));\n return tmp;\n };\n\n MPrime.prototype.ireduce = function ireduce (num) {\n // Assumes that `num` is less than `P^2`\n // num = HI * (2 ^ N - K) + HI * K + LO = HI * K + LO (mod P)\n var r = num;\n var rlen;\n\n do {\n this.split(r, this.tmp);\n r = this.imulK(r);\n r = r.iadd(this.tmp);\n rlen = r.bitLength();\n } while (rlen > this.n);\n\n var cmp = rlen < this.n ? -1 : r.ucmp(this.p);\n if (cmp === 0) {\n r.words[0] = 0;\n r.length = 1;\n } else if (cmp > 0) {\n r.isub(this.p);\n } else {\n if (r.strip !== undefined) {\n // r is BN v4 instance\n r.strip();\n } else {\n // r is BN v5 instance\n r._strip();\n }\n }\n\n return r;\n };\n\n MPrime.prototype.split = function split (input, out) {\n input.iushrn(this.n, 0, out);\n };\n\n MPrime.prototype.imulK = function imulK (num) {\n return num.imul(this.k);\n };\n\n function K256 () {\n MPrime.call(\n this,\n 'k256',\n 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f');\n }\n inherits(K256, MPrime);\n\n K256.prototype.split = function split (input, output) {\n // 256 = 9 * 26 + 22\n var mask = 0x3fffff;\n\n var outLen = Math.min(input.length, 9);\n for (var i = 0; i < outLen; i++) {\n output.words[i] = input.words[i];\n }\n output.length = outLen;\n\n if (input.length <= 9) {\n input.words[0] = 0;\n input.length = 1;\n return;\n }\n\n // Shift by 9 limbs\n var prev = input.words[9];\n output.words[output.length++] = prev & mask;\n\n for (i = 10; i < input.length; i++) {\n var next = input.words[i] | 0;\n input.words[i - 10] = ((next & mask) << 4) | (prev >>> 22);\n prev = next;\n }\n prev >>>= 22;\n input.words[i - 10] = prev;\n if (prev === 0 && input.length > 10) {\n input.length -= 10;\n } else {\n input.length -= 9;\n }\n };\n\n K256.prototype.imulK = function imulK (num) {\n // K = 0x1000003d1 = [ 0x40, 0x3d1 ]\n num.words[num.length] = 0;\n num.words[num.length + 1] = 0;\n num.length += 2;\n\n // bounded at: 0x40 * 0x3ffffff + 0x3d0 = 0x100000390\n var lo = 0;\n for (var i = 0; i < num.length; i++) {\n var w = num.words[i] | 0;\n lo += w * 0x3d1;\n num.words[i] = lo & 0x3ffffff;\n lo = w * 0x40 + ((lo / 0x4000000) | 0);\n }\n\n // Fast length reduction\n if (num.words[num.length - 1] === 0) {\n num.length--;\n if (num.words[num.length - 1] === 0) {\n num.length--;\n }\n }\n return num;\n };\n\n function P224 () {\n MPrime.call(\n this,\n 'p224',\n 'ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001');\n }\n inherits(P224, MPrime);\n\n function P192 () {\n MPrime.call(\n this,\n 'p192',\n 'ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff');\n }\n inherits(P192, MPrime);\n\n function P25519 () {\n // 2 ^ 255 - 19\n MPrime.call(\n this,\n '25519',\n '7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed');\n }\n inherits(P25519, MPrime);\n\n P25519.prototype.imulK = function imulK (num) {\n // K = 0x13\n var carry = 0;\n for (var i = 0; i < num.length; i++) {\n var hi = (num.words[i] | 0) * 0x13 + carry;\n var lo = hi & 0x3ffffff;\n hi >>>= 26;\n\n num.words[i] = lo;\n carry = hi;\n }\n if (carry !== 0) {\n num.words[num.length++] = carry;\n }\n return num;\n };\n\n // Exported mostly for testing purposes, use plain name instead\n BN._prime = function prime (name) {\n // Cached version of prime\n if (primes[name]) return primes[name];\n\n var prime;\n if (name === 'k256') {\n prime = new K256();\n } else if (name === 'p224') {\n prime = new P224();\n } else if (name === 'p192') {\n prime = new P192();\n } else if (name === 'p25519') {\n prime = new P25519();\n } else {\n throw new Error('Unknown prime ' + name);\n }\n primes[name] = prime;\n\n return prime;\n };\n\n //\n // Base reduction engine\n //\n function Red (m) {\n if (typeof m === 'string') {\n var prime = BN._prime(m);\n this.m = prime.p;\n this.prime = prime;\n } else {\n assert(m.gtn(1), 'modulus must be greater than 1');\n this.m = m;\n this.prime = null;\n }\n }\n\n Red.prototype._verify1 = function _verify1 (a) {\n assert(a.negative === 0, 'red works only with positives');\n assert(a.red, 'red works only with red numbers');\n };\n\n Red.prototype._verify2 = function _verify2 (a, b) {\n assert((a.negative | b.negative) === 0, 'red works only with positives');\n assert(a.red && a.red === b.red,\n 'red works only with red numbers');\n };\n\n Red.prototype.imod = function imod (a) {\n if (this.prime) return this.prime.ireduce(a)._forceRed(this);\n return a.umod(this.m)._forceRed(this);\n };\n\n Red.prototype.neg = function neg (a) {\n if (a.isZero()) {\n return a.clone();\n }\n\n return this.m.sub(a)._forceRed(this);\n };\n\n Red.prototype.add = function add (a, b) {\n this._verify2(a, b);\n\n var res = a.add(b);\n if (res.cmp(this.m) >= 0) {\n res.isub(this.m);\n }\n return res._forceRed(this);\n };\n\n Red.prototype.iadd = function iadd (a, b) {\n this._verify2(a, b);\n\n var res = a.iadd(b);\n if (res.cmp(this.m) >= 0) {\n res.isub(this.m);\n }\n return res;\n };\n\n Red.prototype.sub = function sub (a, b) {\n this._verify2(a, b);\n\n var res = a.sub(b);\n if (res.cmpn(0) < 0) {\n res.iadd(this.m);\n }\n return res._forceRed(this);\n };\n\n Red.prototype.isub = function isub (a, b) {\n this._verify2(a, b);\n\n var res = a.isub(b);\n if (res.cmpn(0) < 0) {\n res.iadd(this.m);\n }\n return res;\n };\n\n Red.prototype.shl = function shl (a, num) {\n this._verify1(a);\n return this.imod(a.ushln(num));\n };\n\n Red.prototype.imul = function imul (a, b) {\n this._verify2(a, b);\n return this.imod(a.imul(b));\n };\n\n Red.prototype.mul = function mul (a, b) {\n this._verify2(a, b);\n return this.imod(a.mul(b));\n };\n\n Red.prototype.isqr = function isqr (a) {\n return this.imul(a, a.clone());\n };\n\n Red.prototype.sqr = function sqr (a) {\n return this.mul(a, a);\n };\n\n Red.prototype.sqrt = function sqrt (a) {\n if (a.isZero()) return a.clone();\n\n var mod3 = this.m.andln(3);\n assert(mod3 % 2 === 1);\n\n // Fast case\n if (mod3 === 3) {\n var pow = this.m.add(new BN(1)).iushrn(2);\n return this.pow(a, pow);\n }\n\n // Tonelli-Shanks algorithm (Totally unoptimized and slow)\n //\n // Find Q and S, that Q * 2 ^ S = (P - 1)\n var q = this.m.subn(1);\n var s = 0;\n while (!q.isZero() && q.andln(1) === 0) {\n s++;\n q.iushrn(1);\n }\n assert(!q.isZero());\n\n var one = new BN(1).toRed(this);\n var nOne = one.redNeg();\n\n // Find quadratic non-residue\n // NOTE: Max is such because of generalized Riemann hypothesis.\n var lpow = this.m.subn(1).iushrn(1);\n var z = this.m.bitLength();\n z = new BN(2 * z * z).toRed(this);\n\n while (this.pow(z, lpow).cmp(nOne) !== 0) {\n z.redIAdd(nOne);\n }\n\n var c = this.pow(z, q);\n var r = this.pow(a, q.addn(1).iushrn(1));\n var t = this.pow(a, q);\n var m = s;\n while (t.cmp(one) !== 0) {\n var tmp = t;\n for (var i = 0; tmp.cmp(one) !== 0; i++) {\n tmp = tmp.redSqr();\n }\n assert(i < m);\n var b = this.pow(c, new BN(1).iushln(m - i - 1));\n\n r = r.redMul(b);\n c = b.redSqr();\n t = t.redMul(c);\n m = i;\n }\n\n return r;\n };\n\n Red.prototype.invm = function invm (a) {\n var inv = a._invmp(this.m);\n if (inv.negative !== 0) {\n inv.negative = 0;\n return this.imod(inv).redNeg();\n } else {\n return this.imod(inv);\n }\n };\n\n Red.prototype.pow = function pow (a, num) {\n if (num.isZero()) return new BN(1).toRed(this);\n if (num.cmpn(1) === 0) return a.clone();\n\n var windowSize = 4;\n var wnd = new Array(1 << windowSize);\n wnd[0] = new BN(1).toRed(this);\n wnd[1] = a;\n for (var i = 2; i < wnd.length; i++) {\n wnd[i] = this.mul(wnd[i - 1], a);\n }\n\n var res = wnd[0];\n var current = 0;\n var currentLen = 0;\n var start = num.bitLength() % 26;\n if (start === 0) {\n start = 26;\n }\n\n for (i = num.length - 1; i >= 0; i--) {\n var word = num.words[i];\n for (var j = start - 1; j >= 0; j--) {\n var bit = (word >> j) & 1;\n if (res !== wnd[0]) {\n res = this.sqr(res);\n }\n\n if (bit === 0 && current === 0) {\n currentLen = 0;\n continue;\n }\n\n current <<= 1;\n current |= bit;\n currentLen++;\n if (currentLen !== windowSize && (i !== 0 || j !== 0)) continue;\n\n res = this.mul(res, wnd[current]);\n currentLen = 0;\n current = 0;\n }\n start = 26;\n }\n\n return res;\n };\n\n Red.prototype.convertTo = function convertTo (num) {\n var r = num.umod(this.m);\n\n return r === num ? r.clone() : r;\n };\n\n Red.prototype.convertFrom = function convertFrom (num) {\n var res = num.clone();\n res.red = null;\n return res;\n };\n\n //\n // Montgomery method engine\n //\n\n BN.mont = function mont (num) {\n return new Mont(num);\n };\n\n function Mont (m) {\n Red.call(this, m);\n\n this.shift = this.m.bitLength();\n if (this.shift % 26 !== 0) {\n this.shift += 26 - (this.shift % 26);\n }\n\n this.r = new BN(1).iushln(this.shift);\n this.r2 = this.imod(this.r.sqr());\n this.rinv = this.r._invmp(this.m);\n\n this.minv = this.rinv.mul(this.r).isubn(1).div(this.m);\n this.minv = this.minv.umod(this.r);\n this.minv = this.r.sub(this.minv);\n }\n inherits(Mont, Red);\n\n Mont.prototype.convertTo = function convertTo (num) {\n return this.imod(num.ushln(this.shift));\n };\n\n Mont.prototype.convertFrom = function convertFrom (num) {\n var r = this.imod(num.mul(this.rinv));\n r.red = null;\n return r;\n };\n\n Mont.prototype.imul = function imul (a, b) {\n if (a.isZero() || b.isZero()) {\n a.words[0] = 0;\n a.length = 1;\n return a;\n }\n\n var t = a.imul(b);\n var c = t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m);\n var u = t.isub(c).iushrn(this.shift);\n var res = u;\n\n if (u.cmp(this.m) >= 0) {\n res = u.isub(this.m);\n } else if (u.cmpn(0) < 0) {\n res = u.iadd(this.m);\n }\n\n return res._forceRed(this);\n };\n\n Mont.prototype.mul = function mul (a, b) {\n if (a.isZero() || b.isZero()) return new BN(0)._forceRed(this);\n\n var t = a.mul(b);\n var c = t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m);\n var u = t.isub(c).iushrn(this.shift);\n var res = u;\n if (u.cmp(this.m) >= 0) {\n res = u.isub(this.m);\n } else if (u.cmpn(0) < 0) {\n res = u.iadd(this.m);\n }\n\n return res._forceRed(this);\n };\n\n Mont.prototype.invm = function invm (a) {\n // (AR)^-1 * R^2 = (A^-1 * R^-1) * R^2 = A^-1 * R\n var res = this.imod(a._invmp(this.m).mul(this.r2));\n return res._forceRed(this);\n };\n})(typeof module === 'undefined' || module, this);\n","module.exports = assert;\n\nfunction assert(val, msg) {\n if (!val)\n throw new Error(msg || 'Assertion failed');\n}\n\nassert.equal = function assertEqual(l, r, msg) {\n if (l != r)\n throw new Error(msg || ('Assertion failed: ' + l + ' != ' + r));\n};\n","'use strict';\n\nvar utils = exports;\n\nfunction toArray(msg, enc) {\n if (Array.isArray(msg))\n return msg.slice();\n if (!msg)\n return [];\n var res = [];\n if (typeof msg !== 'string') {\n for (var i = 0; i < msg.length; i++)\n res[i] = msg[i] | 0;\n return res;\n }\n if (enc === 'hex') {\n msg = msg.replace(/[^a-z0-9]+/ig, '');\n if (msg.length % 2 !== 0)\n msg = '0' + msg;\n for (var i = 0; i < msg.length; i += 2)\n res.push(parseInt(msg[i] + msg[i + 1], 16));\n } else {\n for (var i = 0; i < msg.length; i++) {\n var c = msg.charCodeAt(i);\n var hi = c >> 8;\n var lo = c & 0xff;\n if (hi)\n res.push(hi, lo);\n else\n res.push(lo);\n }\n }\n return res;\n}\nutils.toArray = toArray;\n\nfunction zero2(word) {\n if (word.length === 1)\n return '0' + word;\n else\n return word;\n}\nutils.zero2 = zero2;\n\nfunction toHex(msg) {\n var res = '';\n for (var i = 0; i < msg.length; i++)\n res += zero2(msg[i].toString(16));\n return res;\n}\nutils.toHex = toHex;\n\nutils.encode = function encode(arr, enc) {\n if (enc === 'hex')\n return toHex(arr);\n else\n return arr;\n};\n","'use strict';\n\n/**\n * Check if we're required to add a port number.\n *\n * @see https://url.spec.whatwg.org/#default-port\n * @param {Number|String} port Port number we need to check\n * @param {String} protocol Protocol we need to check against.\n * @returns {Boolean} Is it a default port for the given protocol\n * @api private\n */\nmodule.exports = function required(port, protocol) {\n protocol = protocol.split(':')[0];\n port = +port;\n\n if (!port) return false;\n\n switch (protocol) {\n case 'http':\n case 'ws':\n return port !== 80;\n\n case 'https':\n case 'wss':\n return port !== 443;\n\n case 'ftp':\n return port !== 21;\n\n case 'gopher':\n return port !== 70;\n\n case 'file':\n return false;\n }\n\n return port !== 0;\n};\n","'use strict';\n\nvar has = Object.prototype.hasOwnProperty;\n\n/**\n * Decode a URI encoded string.\n *\n * @param {String} input The URI encoded string.\n * @returns {String} The decoded string.\n * @api private\n */\nfunction decode(input) {\n return decodeURIComponent(input.replace(/\\+/g, ' '));\n}\n\n/**\n * Simple query string parser.\n *\n * @param {String} query The query string that needs to be parsed.\n * @returns {Object}\n * @api public\n */\nfunction querystring(query) {\n var parser = /([^=?&]+)=?([^&]*)/g\n , result = {}\n , part;\n\n while (part = parser.exec(query)) {\n var key = decode(part[1])\n , value = decode(part[2]);\n\n //\n // Prevent overriding of existing properties. This ensures that build-in\n // methods like `toString` or __proto__ are not overriden by malicious\n // querystrings.\n //\n if (key in result) continue;\n result[key] = value;\n }\n\n return result;\n}\n\n/**\n * Transform a query string to an object.\n *\n * @param {Object} obj Object that should be transformed.\n * @param {String} prefix Optional prefix.\n * @returns {String}\n * @api public\n */\nfunction querystringify(obj, prefix) {\n prefix = prefix || '';\n\n var pairs = [];\n\n //\n // Optionally prefix with a '?' if needed\n //\n if ('string' !== typeof prefix) prefix = '?';\n\n for (var key in obj) {\n if (has.call(obj, key)) {\n pairs.push(encodeURIComponent(key) +'='+ encodeURIComponent(obj[key]));\n }\n }\n\n return pairs.length ? prefix + pairs.join('&') : '';\n}\n\n//\n// Expose the module.\n//\nexports.stringify = querystringify;\nexports.parse = querystring;\n","'use strict';\n\nvar required = require('requires-port')\n , qs = require('querystringify')\n , protocolre = /^([a-z][a-z0-9.+-]*:)?(\\/\\/)?([\\S\\s]*)/i\n , slashes = /^[A-Za-z][A-Za-z0-9+-.]*:\\/\\//;\n\n/**\n * These are the parse rules for the URL parser, it informs the parser\n * about:\n *\n * 0. The char it Needs to parse, if it's a string it should be done using\n * indexOf, RegExp using exec and NaN means set as current value.\n * 1. The property we should set when parsing this value.\n * 2. Indication if it's backwards or forward parsing, when set as number it's\n * the value of extra chars that should be split off.\n * 3. Inherit from location if non existing in the parser.\n * 4. `toLowerCase` the resulting value.\n */\nvar rules = [\n ['#', 'hash'], // Extract from the back.\n ['?', 'query'], // Extract from the back.\n ['/', 'pathname'], // Extract from the back.\n ['@', 'auth', 1], // Extract from the front.\n [NaN, 'host', undefined, 1, 1], // Set left over value.\n [/:(\\d+)$/, 'port', undefined, 1], // RegExp the back.\n [NaN, 'hostname', undefined, 1, 1] // Set left over.\n];\n\n/**\n * These properties should not be copied or inherited from. This is only needed\n * for all non blob URL's as a blob URL does not include a hash, only the\n * origin.\n *\n * @type {Object}\n * @private\n */\nvar ignore = { hash: 1, query: 1 };\n\n/**\n * The location object differs when your code is loaded through a normal page,\n * Worker or through a worker using a blob. And with the blobble begins the\n * trouble as the location object will contain the URL of the blob, not the\n * location of the page where our code is loaded in. The actual origin is\n * encoded in the `pathname` so we can thankfully generate a good \"default\"\n * location from it so we can generate proper relative URL's again.\n *\n * @param {Object|String} loc Optional default location object.\n * @returns {Object} lolcation object.\n * @api public\n */\nfunction lolcation(loc) {\n var location = global && global.location || {};\n loc = loc || location;\n\n var finaldestination = {}\n , type = typeof loc\n , key;\n\n if ('blob:' === loc.protocol) {\n finaldestination = new URL(unescape(loc.pathname), {});\n } else if ('string' === type) {\n finaldestination = new URL(loc, {});\n for (key in ignore) delete finaldestination[key];\n } else if ('object' === type) {\n for (key in loc) {\n if (key in ignore) continue;\n finaldestination[key] = loc[key];\n }\n\n if (finaldestination.slashes === undefined) {\n finaldestination.slashes = slashes.test(loc.href);\n }\n }\n\n return finaldestination;\n}\n\n/**\n * @typedef ProtocolExtract\n * @type Object\n * @property {String} protocol Protocol matched in the URL, in lowercase.\n * @property {Boolean} slashes `true` if protocol is followed by \"//\", else `false`.\n * @property {String} rest Rest of the URL that is not part of the protocol.\n */\n\n/**\n * Extract protocol information from a URL with/without double slash (\"//\").\n *\n * @param {String} address URL we want to extract from.\n * @return {ProtocolExtract} Extracted information.\n * @api private\n */\nfunction extractProtocol(address) {\n var match = protocolre.exec(address);\n\n return {\n protocol: match[1] ? match[1].toLowerCase() : '',\n slashes: !!match[2],\n rest: match[3]\n };\n}\n\n/**\n * Resolve a relative URL pathname against a base URL pathname.\n *\n * @param {String} relative Pathname of the relative URL.\n * @param {String} base Pathname of the base URL.\n * @return {String} Resolved pathname.\n * @api private\n */\nfunction resolve(relative, base) {\n var path = (base || '/').split('/').slice(0, -1).concat(relative.split('/'))\n , i = path.length\n , last = path[i - 1]\n , unshift = false\n , up = 0;\n\n while (i--) {\n if (path[i] === '.') {\n path.splice(i, 1);\n } else if (path[i] === '..') {\n path.splice(i, 1);\n up++;\n } else if (up) {\n if (i === 0) unshift = true;\n path.splice(i, 1);\n up--;\n }\n }\n\n if (unshift) path.unshift('');\n if (last === '.' || last === '..') path.push('');\n\n return path.join('/');\n}\n\n/**\n * The actual URL instance. Instead of returning an object we've opted-in to\n * create an actual constructor as it's much more memory efficient and\n * faster and it pleases my OCD.\n *\n * @constructor\n * @param {String} address URL we want to parse.\n * @param {Object|String} location Location defaults for relative paths.\n * @param {Boolean|Function} parser Parser for the query string.\n * @api public\n */\nfunction URL(address, location, parser) {\n if (!(this instanceof URL)) {\n return new URL(address, location, parser);\n }\n\n var relative, extracted, parse, instruction, index, key\n , instructions = rules.slice()\n , type = typeof location\n , url = this\n , i = 0;\n\n //\n // The following if statements allows this module two have compatibility with\n // 2 different API:\n //\n // 1. Node.js's `url.parse` api which accepts a URL, boolean as arguments\n // where the boolean indicates that the query string should also be parsed.\n //\n // 2. The `URL` interface of the browser which accepts a URL, object as\n // arguments. The supplied object will be used as default values / fall-back\n // for relative paths.\n //\n if ('object' !== type && 'string' !== type) {\n parser = location;\n location = null;\n }\n\n if (parser && 'function' !== typeof parser) parser = qs.parse;\n\n location = lolcation(location);\n\n //\n // Extract protocol information before running the instructions.\n //\n extracted = extractProtocol(address || '');\n relative = !extracted.protocol && !extracted.slashes;\n url.slashes = extracted.slashes || relative && location.slashes;\n url.protocol = extracted.protocol || location.protocol || '';\n address = extracted.rest;\n\n //\n // When the authority component is absent the URL starts with a path\n // component.\n //\n if (!extracted.slashes) instructions[2] = [/(.*)/, 'pathname'];\n\n for (; i < instructions.length; i++) {\n instruction = instructions[i];\n parse = instruction[0];\n key = instruction[1];\n\n if (parse !== parse) {\n url[key] = address;\n } else if ('string' === typeof parse) {\n if (~(index = address.indexOf(parse))) {\n if ('number' === typeof instruction[2]) {\n url[key] = address.slice(0, index);\n address = address.slice(index + instruction[2]);\n } else {\n url[key] = address.slice(index);\n address = address.slice(0, index);\n }\n }\n } else if ((index = parse.exec(address))) {\n url[key] = index[1];\n address = address.slice(0, index.index);\n }\n\n url[key] = url[key] || (\n relative && instruction[3] ? location[key] || '' : ''\n );\n\n //\n // Hostname, host and protocol should be lowercased so they can be used to\n // create a proper `origin`.\n //\n if (instruction[4]) url[key] = url[key].toLowerCase();\n }\n\n //\n // Also parse the supplied query string in to an object. If we're supplied\n // with a custom parser as function use that instead of the default build-in\n // parser.\n //\n if (parser) url.query = parser(url.query);\n\n //\n // If the URL is relative, resolve the pathname against the base URL.\n //\n if (\n relative\n && location.slashes\n && url.pathname.charAt(0) !== '/'\n && (url.pathname !== '' || location.pathname !== '')\n ) {\n url.pathname = resolve(url.pathname, location.pathname);\n }\n\n //\n // We should not add port numbers if they are already the default port number\n // for a given protocol. As the host also contains the port number we're going\n // override it with the hostname which contains no port number.\n //\n if (!required(url.port, url.protocol)) {\n url.host = url.hostname;\n url.port = '';\n }\n\n //\n // Parse down the `auth` for the username and password.\n //\n url.username = url.password = '';\n if (url.auth) {\n instruction = url.auth.split(':');\n url.username = instruction[0] || '';\n url.password = instruction[1] || '';\n }\n\n url.origin = url.protocol && url.host && url.protocol !== 'file:'\n ? url.protocol +'//'+ url.host\n : 'null';\n\n //\n // The href is just the compiled result.\n //\n url.href = url.toString();\n}\n\n/**\n * This is convenience method for changing properties in the URL instance to\n * insure that they all propagate correctly.\n *\n * @param {String} part Property we need to adjust.\n * @param {Mixed} value The newly assigned value.\n * @param {Boolean|Function} fn When setting the query, it will be the function\n * used to parse the query.\n * When setting the protocol, double slash will be\n * removed from the final url if it is true.\n * @returns {URL}\n * @api public\n */\nfunction set(part, value, fn) {\n var url = this;\n\n switch (part) {\n case 'query':\n if ('string' === typeof value && value.length) {\n value = (fn || qs.parse)(value);\n }\n\n url[part] = value;\n break;\n\n case 'port':\n url[part] = value;\n\n if (!required(value, url.protocol)) {\n url.host = url.hostname;\n url[part] = '';\n } else if (value) {\n url.host = url.hostname +':'+ value;\n }\n\n break;\n\n case 'hostname':\n url[part] = value;\n\n if (url.port) value += ':'+ url.port;\n url.host = value;\n break;\n\n case 'host':\n url[part] = value;\n\n if (/:\\d+$/.test(value)) {\n value = value.split(':');\n url.port = value.pop();\n url.hostname = value.join(':');\n } else {\n url.hostname = value;\n url.port = '';\n }\n\n break;\n\n case 'protocol':\n url.protocol = value.toLowerCase();\n url.slashes = !fn;\n break;\n\n case 'pathname':\n case 'hash':\n if (value) {\n var char = part === 'pathname' ? '/' : '#';\n url[part] = value.charAt(0) !== char ? char + value : value;\n } else {\n url[part] = value;\n }\n break;\n\n default:\n url[part] = value;\n }\n\n for (var i = 0; i < rules.length; i++) {\n var ins = rules[i];\n\n if (ins[4]) url[ins[1]] = url[ins[1]].toLowerCase();\n }\n\n url.origin = url.protocol && url.host && url.protocol !== 'file:'\n ? url.protocol +'//'+ url.host\n : 'null';\n\n url.href = url.toString();\n\n return url;\n}\n\n/**\n * Transform the properties back in to a valid and full URL string.\n *\n * @param {Function} stringify Optional query stringify function.\n * @returns {String}\n * @api public\n */\nfunction toString(stringify) {\n if (!stringify || 'function' !== typeof stringify) stringify = qs.stringify;\n\n var query\n , url = this\n , protocol = url.protocol;\n\n if (protocol && protocol.charAt(protocol.length - 1) !== ':') protocol += ':';\n\n var result = protocol + (url.slashes ? '//' : '');\n\n if (url.username) {\n result += url.username;\n if (url.password) result += ':'+ url.password;\n result += '@';\n }\n\n result += url.host + url.pathname;\n\n query = 'object' === typeof url.query ? stringify(url.query) : url.query;\n if (query) result += '?' !== query.charAt(0) ? '?'+ query : query;\n\n if (url.hash) result += url.hash;\n\n return result;\n}\n\nURL.prototype = { set: set, toString: toString };\n\n//\n// Expose the URL parser and some additional properties that might be useful for\n// others or testing.\n//\nURL.extractProtocol = extractProtocol;\nURL.location = lolcation;\nURL.qs = qs;\n\nmodule.exports = URL;\n","/*\n* This delay allows the thread to finish assigning its on* methods\n* before invoking the delay callback. This is purely a timing hack.\n* http://geekabyte.blogspot.com/2014/01/javascript-effect-of-setting-settimeout.html\n*\n* @param {callback: function} the callback which will be invoked after the timeout\n* @parma {context: object} the context in which to invoke the function\n*/\nexport default function delay(callback, context) {\n setTimeout(timeoutContext => callback.call(timeoutContext), 4, context);\n}\n","export default function log(method, message) {\n /* eslint-disable no-console */\n if (typeof process !== 'undefined' && process.env.NODE_ENV !== 'test') {\n console[method].call(null, message);\n }\n /* eslint-enable no-console */\n}\n","export function reject(array, callback) {\n const results = [];\n array.forEach(itemInArray => {\n if (!callback(itemInArray)) {\n results.push(itemInArray);\n }\n });\n\n return results;\n}\n\nexport function filter(array, callback) {\n const results = [];\n array.forEach(itemInArray => {\n if (callback(itemInArray)) {\n results.push(itemInArray);\n }\n });\n\n return results;\n}\n","import { reject, filter } from '../helpers/array-helpers';\n\n/*\n* EventTarget is an interface implemented by objects that can\n* receive events and may have listeners for them.\n*\n* https://developer.mozilla.org/en-US/docs/Web/API/EventTarget\n*/\nclass EventTarget {\n constructor() {\n this.listeners = {};\n }\n\n /*\n * Ties a listener function to an event type which can later be invoked via the\n * dispatchEvent method.\n *\n * @param {string} type - the type of event (ie: 'open', 'message', etc.)\n * @param {function} listener - the callback function to invoke whenever an event is dispatched matching the given type\n * @param {boolean} useCapture - N/A TODO: implement useCapture functionality\n */\n addEventListener(type, listener /* , useCapture */) {\n if (typeof listener === 'function') {\n if (!Array.isArray(this.listeners[type])) {\n this.listeners[type] = [];\n }\n\n // Only add the same function once\n if (filter(this.listeners[type], item => item === listener).length === 0) {\n this.listeners[type].push(listener);\n }\n }\n }\n\n /*\n * Removes the listener so it will no longer be invoked via the dispatchEvent method.\n *\n * @param {string} type - the type of event (ie: 'open', 'message', etc.)\n * @param {function} listener - the callback function to invoke whenever an event is dispatched matching the given type\n * @param {boolean} useCapture - N/A TODO: implement useCapture functionality\n */\n removeEventListener(type, removingListener /* , useCapture */) {\n const arrayOfListeners = this.listeners[type];\n this.listeners[type] = reject(arrayOfListeners, listener => listener === removingListener);\n }\n\n /*\n * Invokes all listener functions that are listening to the given event.type property. Each\n * listener will be passed the event as the first argument.\n *\n * @param {object} event - event object which will be passed to all listeners of the event.type property\n */\n dispatchEvent(event, ...customArguments) {\n const eventName = event.type;\n const listeners = this.listeners[eventName];\n\n if (!Array.isArray(listeners)) {\n return false;\n }\n\n listeners.forEach(listener => {\n if (customArguments.length > 0) {\n listener.apply(this, customArguments);\n } else {\n listener.call(this, event);\n }\n });\n\n return true;\n }\n}\n\nexport default EventTarget;\n","import { reject } from './helpers/array-helpers';\n\n/*\n* The network bridge is a way for the mock websocket object to 'communicate' with\n* all available servers. This is a singleton object so it is important that you\n* clean up urlMap whenever you are finished.\n*/\nclass NetworkBridge {\n constructor() {\n this.urlMap = {};\n }\n\n /*\n * Attaches a websocket object to the urlMap hash so that it can find the server\n * it is connected to and the server in turn can find it.\n *\n * @param {object} websocket - websocket object to add to the urlMap hash\n * @param {string} url\n */\n attachWebSocket(websocket, url) {\n const connectionLookup = this.urlMap[url];\n\n if (connectionLookup && connectionLookup.server && connectionLookup.websockets.indexOf(websocket) === -1) {\n connectionLookup.websockets.push(websocket);\n return connectionLookup.server;\n }\n }\n\n /*\n * Attaches a websocket to a room\n */\n addMembershipToRoom(websocket, room) {\n const connectionLookup = this.urlMap[websocket.url];\n\n if (connectionLookup && connectionLookup.server && connectionLookup.websockets.indexOf(websocket) !== -1) {\n if (!connectionLookup.roomMemberships[room]) {\n connectionLookup.roomMemberships[room] = [];\n }\n\n connectionLookup.roomMemberships[room].push(websocket);\n }\n }\n\n /*\n * Attaches a server object to the urlMap hash so that it can find a websockets\n * which are connected to it and so that websockets can in turn can find it.\n *\n * @param {object} server - server object to add to the urlMap hash\n * @param {string} url\n */\n attachServer(server, url) {\n const connectionLookup = this.urlMap[url];\n\n if (!connectionLookup) {\n this.urlMap[url] = {\n server,\n websockets: [],\n roomMemberships: {}\n };\n\n return server;\n }\n }\n\n /*\n * Finds the server which is 'running' on the given url.\n *\n * @param {string} url - the url to use to find which server is running on it\n */\n serverLookup(url) {\n const connectionLookup = this.urlMap[url];\n\n if (connectionLookup) {\n return connectionLookup.server;\n }\n }\n\n /*\n * Finds all websockets which is 'listening' on the given url.\n *\n * @param {string} url - the url to use to find all websockets which are associated with it\n * @param {string} room - if a room is provided, will only return sockets in this room\n * @param {class} broadcaster - socket that is broadcasting and is to be excluded from the lookup\n */\n websocketsLookup(url, room, broadcaster) {\n let websockets;\n const connectionLookup = this.urlMap[url];\n\n websockets = connectionLookup ? connectionLookup.websockets : [];\n\n if (room) {\n const members = connectionLookup.roomMemberships[room];\n websockets = members || [];\n }\n\n return broadcaster ? websockets.filter(websocket => websocket !== broadcaster) : websockets;\n }\n\n /*\n * Removes the entry associated with the url.\n *\n * @param {string} url\n */\n removeServer(url) {\n delete this.urlMap[url];\n }\n\n /*\n * Removes the individual websocket from the map of associated websockets.\n *\n * @param {object} websocket - websocket object to remove from the url map\n * @param {string} url\n */\n removeWebSocket(websocket, url) {\n const connectionLookup = this.urlMap[url];\n\n if (connectionLookup) {\n connectionLookup.websockets = reject(connectionLookup.websockets, socket => socket === websocket);\n }\n }\n\n /*\n * Removes a websocket from a room\n */\n removeMembershipFromRoom(websocket, room) {\n const connectionLookup = this.urlMap[websocket.url];\n const memberships = connectionLookup.roomMemberships[room];\n\n if (connectionLookup && memberships !== null) {\n connectionLookup.roomMemberships[room] = reject(memberships, socket => socket === websocket);\n }\n }\n}\n\nexport default new NetworkBridge(); // Note: this is a singleton\n","/*\n * https://developer.mozilla.org/en-US/docs/Web/API/CloseEvent\n */\nexport const CLOSE_CODES = {\n CLOSE_NORMAL: 1000,\n CLOSE_GOING_AWAY: 1001,\n CLOSE_PROTOCOL_ERROR: 1002,\n CLOSE_UNSUPPORTED: 1003,\n CLOSE_NO_STATUS: 1005,\n CLOSE_ABNORMAL: 1006,\n UNSUPPORTED_DATA: 1007,\n POLICY_VIOLATION: 1008,\n CLOSE_TOO_LARGE: 1009,\n MISSING_EXTENSION: 1010,\n INTERNAL_ERROR: 1011,\n SERVICE_RESTART: 1012,\n TRY_AGAIN_LATER: 1013,\n TLS_HANDSHAKE: 1015\n};\n\nexport const ERROR_PREFIX = {\n CONSTRUCTOR_ERROR: \"Failed to construct 'WebSocket':\",\n CLOSE_ERROR: \"Failed to execute 'close' on 'WebSocket':\",\n EVENT: {\n CONSTRUCT: \"Failed to construct 'Event':\",\n MESSAGE: \"Failed to construct 'MessageEvent':\",\n CLOSE: \"Failed to construct 'CloseEvent':\"\n }\n};\n","export default class EventPrototype {\n // Noops\n stopPropagation() {}\n stopImmediatePropagation() {}\n\n // if no arguments are passed then the type is set to \"undefined\" on\n // chrome and safari.\n initEvent(type = 'undefined', bubbles = false, cancelable = false) {\n this.type = `${type}`;\n this.bubbles = Boolean(bubbles);\n this.cancelable = Boolean(cancelable);\n }\n}\n","import EventPrototype from './prototype';\nimport { ERROR_PREFIX } from '../constants';\n\nexport default class Event extends EventPrototype {\n constructor(type, eventInitConfig = {}) {\n super();\n\n if (!type) {\n throw new TypeError(`${ERROR_PREFIX.EVENT_ERROR} 1 argument required, but only 0 present.`);\n }\n\n if (typeof eventInitConfig !== 'object') {\n throw new TypeError(`${ERROR_PREFIX.EVENT_ERROR} parameter 2 ('eventInitDict') is not an object.`);\n }\n\n const { bubbles, cancelable } = eventInitConfig;\n\n this.type = `${type}`;\n this.timeStamp = Date.now();\n this.target = null;\n this.srcElement = null;\n this.returnValue = true;\n this.isTrusted = false;\n this.eventPhase = 0;\n this.defaultPrevented = false;\n this.currentTarget = null;\n this.cancelable = cancelable ? Boolean(cancelable) : false;\n this.canncelBubble = false;\n this.bubbles = bubbles ? Boolean(bubbles) : false;\n }\n}\n","import EventPrototype from './prototype';\nimport { ERROR_PREFIX } from '../constants';\n\nexport default class MessageEvent extends EventPrototype {\n constructor(type, eventInitConfig = {}) {\n super();\n\n if (!type) {\n throw new TypeError(`${ERROR_PREFIX.EVENT.MESSAGE} 1 argument required, but only 0 present.`);\n }\n\n if (typeof eventInitConfig !== 'object') {\n throw new TypeError(`${ERROR_PREFIX.EVENT.MESSAGE} parameter 2 ('eventInitDict') is not an object`);\n }\n\n const { bubbles, cancelable, data, origin, lastEventId, ports } = eventInitConfig;\n\n this.type = `${type}`;\n this.timeStamp = Date.now();\n this.target = null;\n this.srcElement = null;\n this.returnValue = true;\n this.isTrusted = false;\n this.eventPhase = 0;\n this.defaultPrevented = false;\n this.currentTarget = null;\n this.cancelable = cancelable ? Boolean(cancelable) : false;\n this.canncelBubble = false;\n this.bubbles = bubbles ? Boolean(bubbles) : false;\n this.origin = `${origin}`;\n this.ports = typeof ports === 'undefined' ? null : ports;\n this.data = typeof data === 'undefined' ? null : data;\n this.lastEventId = `${lastEventId || ''}`;\n }\n}\n","import EventPrototype from './prototype';\nimport { ERROR_PREFIX } from '../constants';\n\nexport default class CloseEvent extends EventPrototype {\n constructor(type, eventInitConfig = {}) {\n super();\n\n if (!type) {\n throw new TypeError(`${ERROR_PREFIX.EVENT.CLOSE} 1 argument required, but only 0 present.`);\n }\n\n if (typeof eventInitConfig !== 'object') {\n throw new TypeError(`${ERROR_PREFIX.EVENT.CLOSE} parameter 2 ('eventInitDict') is not an object`);\n }\n\n const { bubbles, cancelable, code, reason, wasClean } = eventInitConfig;\n\n this.type = `${type}`;\n this.timeStamp = Date.now();\n this.target = null;\n this.srcElement = null;\n this.returnValue = true;\n this.isTrusted = false;\n this.eventPhase = 0;\n this.defaultPrevented = false;\n this.currentTarget = null;\n this.cancelable = cancelable ? Boolean(cancelable) : false;\n this.cancelBubble = false;\n this.bubbles = bubbles ? Boolean(bubbles) : false;\n this.code = typeof code === 'number' ? parseInt(code, 10) : 0;\n this.reason = `${reason || ''}`;\n this.wasClean = wasClean ? Boolean(wasClean) : false;\n }\n}\n","import Event from './event';\nimport MessageEvent from './message';\nimport CloseEvent from './close';\n\n/*\n* Creates an Event object and extends it to allow full modification of\n* its properties.\n*\n* @param {object} config - within config you will need to pass type and optionally target\n*/\nfunction createEvent(config) {\n const { type, target } = config;\n const eventObject = new Event(type);\n\n if (target) {\n eventObject.target = target;\n eventObject.srcElement = target;\n eventObject.currentTarget = target;\n }\n\n return eventObject;\n}\n\n/*\n* Creates a MessageEvent object and extends it to allow full modification of\n* its properties.\n*\n* @param {object} config - within config: type, origin, data and optionally target\n*/\nfunction createMessageEvent(config) {\n const { type, origin, data, target } = config;\n const messageEvent = new MessageEvent(type, {\n data,\n origin\n });\n\n if (target) {\n messageEvent.target = target;\n messageEvent.srcElement = target;\n messageEvent.currentTarget = target;\n }\n\n return messageEvent;\n}\n\n/*\n* Creates a CloseEvent object and extends it to allow full modification of\n* its properties.\n*\n* @param {object} config - within config: type and optionally target, code, and reason\n*/\nfunction createCloseEvent(config) {\n const { code, reason, type, target } = config;\n let { wasClean } = config;\n\n if (!wasClean) {\n wasClean = code === 1000;\n }\n\n const closeEvent = new CloseEvent(type, {\n code,\n reason,\n wasClean\n });\n\n if (target) {\n closeEvent.target = target;\n closeEvent.srcElement = target;\n closeEvent.currentTarget = target;\n }\n\n return closeEvent;\n}\n\nexport { createEvent, createMessageEvent, createCloseEvent };\n","import WebSocket from '../websocket';\nimport delay from '../helpers/delay';\nimport networkBridge from '../network-bridge';\nimport { createCloseEvent, createEvent } from '../event/factory';\n\nexport function closeWebSocketConnection(context, code, reason) {\n context.readyState = WebSocket.CLOSING;\n\n const server = networkBridge.serverLookup(context.url);\n const closeEvent = createCloseEvent({\n type: 'close',\n target: context,\n code,\n reason\n });\n\n delay(() => {\n networkBridge.removeWebSocket(context, context.url);\n\n context.readyState = WebSocket.CLOSED;\n context.dispatchEvent(closeEvent);\n\n if (server) {\n server.dispatchEvent(closeEvent, server);\n }\n }, context);\n}\n\nexport function failWebSocketConnection(context, code, reason) {\n context.readyState = WebSocket.CLOSING;\n\n const server = networkBridge.serverLookup(context.url);\n const closeEvent = createCloseEvent({\n type: 'close',\n target: context,\n code,\n reason,\n wasClean: false\n });\n\n const errorEvent = createEvent({\n type: 'error',\n target: context\n });\n\n delay(() => {\n networkBridge.removeWebSocket(context, context.url);\n\n context.readyState = WebSocket.CLOSED;\n context.dispatchEvent(errorEvent);\n context.dispatchEvent(closeEvent);\n\n if (server) {\n server.dispatchEvent(closeEvent, server);\n }\n }, context);\n}\n","export default function normalizeSendData(data) {\n if (Object.prototype.toString.call(data) !== '[object Blob]' && !(data instanceof ArrayBuffer)) {\n data = String(data);\n }\n\n return data;\n}\n","import delay from './helpers/delay';\nimport logger from './helpers/logger';\nimport EventTarget from './event/target';\nimport networkBridge from './network-bridge';\nimport proxyFactory from './helpers/proxy-factory';\nimport lengthInUtf8Bytes from './helpers/byte-length';\nimport { CLOSE_CODES, ERROR_PREFIX } from './constants';\nimport urlVerification from './helpers/url-verification';\nimport normalizeSendData from './helpers/normalize-send';\nimport protocolVerification from './helpers/protocol-verification';\nimport { createEvent, createMessageEvent, createCloseEvent } from './event/factory';\nimport { closeWebSocketConnection, failWebSocketConnection } from './algorithms/close';\n\n/*\n * The main websocket class which is designed to mimick the native WebSocket class as close\n * as possible.\n *\n * https://html.spec.whatwg.org/multipage/web-sockets.html\n */\nclass WebSocket extends EventTarget {\n constructor(url, protocols) {\n super();\n\n this.url = urlVerification(url);\n protocols = protocolVerification(protocols);\n this.protocol = protocols[0] || '';\n\n this.binaryType = 'blob';\n this.readyState = WebSocket.CONNECTING;\n\n const server = networkBridge.attachWebSocket(this, this.url);\n\n /*\n * This delay is needed so that we dont trigger an event before the callbacks have been\n * setup. For example:\n *\n * var socket = new WebSocket('ws://localhost');\n *\n * If we dont have the delay then the event would be triggered right here and this is\n * before the onopen had a chance to register itself.\n *\n * socket.onopen = () => { // this would never be called };\n *\n * and with the delay the event gets triggered here after all of the callbacks have been\n * registered :-)\n */\n delay(function delayCallback() {\n if (server) {\n if (\n server.options.verifyClient &&\n typeof server.options.verifyClient === 'function' &&\n !server.options.verifyClient()\n ) {\n this.readyState = WebSocket.CLOSED;\n\n logger(\n 'error',\n `WebSocket connection to '${this.url}' failed: HTTP Authentication failed; no valid credentials available`\n );\n\n networkBridge.removeWebSocket(this, this.url);\n this.dispatchEvent(createEvent({ type: 'error', target: this }));\n this.dispatchEvent(createCloseEvent({ type: 'close', target: this, code: CLOSE_CODES.CLOSE_NORMAL }));\n } else {\n if (server.options.selectProtocol && typeof server.options.selectProtocol === 'function') {\n const selectedProtocol = server.options.selectProtocol(protocols);\n const isFilled = selectedProtocol !== '';\n const isRequested = protocols.indexOf(selectedProtocol) !== -1;\n if (isFilled && !isRequested) {\n this.readyState = WebSocket.CLOSED;\n\n logger('error', `WebSocket connection to '${this.url}' failed: Invalid Sub-Protocol`);\n\n networkBridge.removeWebSocket(this, this.url);\n this.dispatchEvent(createEvent({ type: 'error', target: this }));\n this.dispatchEvent(createCloseEvent({ type: 'close', target: this, code: CLOSE_CODES.CLOSE_NORMAL }));\n return;\n }\n this.protocol = selectedProtocol;\n }\n this.readyState = WebSocket.OPEN;\n this.dispatchEvent(createEvent({ type: 'open', target: this }));\n server.dispatchEvent(createEvent({ type: 'connection' }), proxyFactory(this));\n }\n } else {\n this.readyState = WebSocket.CLOSED;\n this.dispatchEvent(createEvent({ type: 'error', target: this }));\n this.dispatchEvent(createCloseEvent({ type: 'close', target: this, code: CLOSE_CODES.CLOSE_NORMAL }));\n\n logger('error', `WebSocket connection to '${this.url}' failed`);\n }\n }, this);\n }\n\n get onopen() {\n return this.listeners.open;\n }\n\n get onmessage() {\n return this.listeners.message;\n }\n\n get onclose() {\n return this.listeners.close;\n }\n\n get onerror() {\n return this.listeners.error;\n }\n\n set onopen(listener) {\n delete this.listeners.open;\n this.addEventListener('open', listener);\n }\n\n set onmessage(listener) {\n delete this.listeners.message;\n this.addEventListener('message', listener);\n }\n\n set onclose(listener) {\n delete this.listeners.close;\n this.addEventListener('close', listener);\n }\n\n set onerror(listener) {\n delete this.listeners.error;\n this.addEventListener('error', listener);\n }\n\n send(data) {\n if (this.readyState === WebSocket.CLOSING || this.readyState === WebSocket.CLOSED) {\n throw new Error('WebSocket is already in CLOSING or CLOSED state');\n }\n\n // TODO: handle bufferedAmount\n\n const messageEvent = createMessageEvent({\n type: 'server::message',\n origin: this.url,\n data: normalizeSendData(data)\n });\n\n const server = networkBridge.serverLookup(this.url);\n\n if (server) {\n delay(() => {\n this.dispatchEvent(messageEvent, data);\n }, server);\n }\n }\n\n close(code, reason) {\n if (code !== undefined) {\n if (typeof code !== 'number' || (code !== 1000 && (code < 3000 || code > 4999))) {\n throw new TypeError(\n `${ERROR_PREFIX.CLOSE_ERROR} The code must be either 1000, or between 3000 and 4999. ${code} is neither.`\n );\n }\n }\n\n if (reason !== undefined) {\n const length = lengthInUtf8Bytes(reason);\n\n if (length > 123) {\n throw new SyntaxError(`${ERROR_PREFIX.CLOSE_ERROR} The message must not be greater than 123 bytes.`);\n }\n }\n\n if (this.readyState === WebSocket.CLOSING || this.readyState === WebSocket.CLOSED) {\n return;\n }\n\n if (this.readyState === WebSocket.CONNECTING) {\n failWebSocketConnection(this, code, reason);\n } else {\n closeWebSocketConnection(this, code, reason);\n }\n }\n}\n\nWebSocket.CONNECTING = 0;\nWebSocket.prototype.CONNECTING = WebSocket.CONNECTING;\nWebSocket.OPEN = 1;\nWebSocket.prototype.OPEN = WebSocket.OPEN;\nWebSocket.CLOSING = 2;\nWebSocket.prototype.CLOSING = WebSocket.CLOSING;\nWebSocket.CLOSED = 3;\nWebSocket.prototype.CLOSED = WebSocket.CLOSED;\n\nexport default WebSocket;\n","import URL from 'url-parse';\nimport { ERROR_PREFIX } from '../constants';\n\nexport default function urlVerification(url) {\n const urlRecord = new URL(url);\n const { pathname, protocol, hash } = urlRecord;\n\n if (!url) {\n throw new TypeError(`${ERROR_PREFIX.CONSTRUCTOR_ERROR} 1 argument required, but only 0 present.`);\n }\n\n if (!pathname) {\n urlRecord.pathname = '/';\n }\n\n if (protocol === '') {\n throw new SyntaxError(`${ERROR_PREFIX.CONSTRUCTOR_ERROR} The URL '${urlRecord.toString()}' is invalid.`);\n }\n\n if (protocol !== 'ws:' && protocol !== 'wss:') {\n throw new SyntaxError(\n `${ERROR_PREFIX.CONSTRUCTOR_ERROR} The URL's scheme must be either 'ws' or 'wss'. '${protocol}' is not allowed.`\n );\n }\n\n if (hash !== '') {\n /* eslint-disable max-len */\n throw new SyntaxError(\n `${\n ERROR_PREFIX.CONSTRUCTOR_ERROR\n } The URL contains a fragment identifier ('${hash}'). Fragment identifiers are not allowed in WebSocket URLs.`\n );\n /* eslint-enable max-len */\n }\n\n return urlRecord.toString();\n}\n","import { ERROR_PREFIX } from '../constants';\n\nexport default function protocolVerification(protocols = []) {\n if (!Array.isArray(protocols) && typeof protocols !== 'string') {\n throw new SyntaxError(`${ERROR_PREFIX.CONSTRUCTOR_ERROR} The subprotocol '${protocols.toString()}' is invalid.`);\n }\n\n if (typeof protocols === 'string') {\n protocols = [protocols];\n }\n\n const uniq = protocols.map(p => ({ count: 1, protocol: p })).reduce((a, b) => {\n a[b.protocol] = (a[b.protocol] || 0) + b.count;\n return a;\n }, {});\n\n const duplicates = Object.keys(uniq).filter(a => uniq[a] > 1);\n\n if (duplicates.length > 0) {\n throw new SyntaxError(`${ERROR_PREFIX.CONSTRUCTOR_ERROR} The subprotocol '${duplicates[0]}' is duplicated.`);\n }\n\n return protocols;\n}\n","import { CLOSE_CODES } from '../constants';\nimport { closeWebSocketConnection } from '../algorithms/close';\nimport normalizeSendData from './normalize-send';\nimport { createMessageEvent } from '../event/factory';\n\nexport default function proxyFactory(target) {\n const handler = {\n get(obj, prop) {\n if (prop === 'close') {\n return function close(options = {}) {\n const code = options.code || CLOSE_CODES.CLOSE_NORMAL;\n const reason = options.reason || '';\n\n closeWebSocketConnection(target, code, reason);\n };\n }\n\n if (prop === 'send') {\n return function send(data) {\n data = normalizeSendData(data);\n\n target.dispatchEvent(\n createMessageEvent({\n type: 'message',\n data,\n origin: this.url,\n target\n })\n );\n };\n }\n\n if (prop === 'on') {\n return function onWrapper(type, cb) {\n target.addEventListener(`server::${type}`, cb);\n };\n }\n\n return obj[prop];\n }\n };\n\n const proxy = new Proxy(target, handler);\n return proxy;\n}\n","export default function lengthInUtf8Bytes(str) {\n // Matches only the 10.. bytes that are non-initial characters in a multi-byte sequence.\n const m = encodeURIComponent(str).match(/%[89ABab]/g);\n return str.length + (m ? m.length : 0);\n}\n","export default function retrieveGlobalObject() {\n if (typeof window !== 'undefined') {\n return window;\n }\n\n return typeof process === 'object' && typeof require === 'function' && typeof global === 'object' ? global : this;\n}\n","import URL from 'url-parse';\nimport WebSocket from './websocket';\nimport dedupe from './helpers/dedupe';\nimport EventTarget from './event/target';\nimport { CLOSE_CODES } from './constants';\nimport networkBridge from './network-bridge';\nimport globalObject from './helpers/global-object';\nimport normalizeSendData from './helpers/normalize-send';\nimport { createEvent, createMessageEvent, createCloseEvent } from './event/factory';\n\nclass Server extends EventTarget {\n constructor(url, options = {}) {\n super();\n const urlRecord = new URL(url);\n\n if (!urlRecord.pathname) {\n urlRecord.pathname = '/';\n }\n\n this.url = urlRecord.toString();\n\n this.originalWebSocket = null;\n const server = networkBridge.attachServer(this, this.url);\n\n if (!server) {\n this.dispatchEvent(createEvent({ type: 'error' }));\n throw new Error('A mock server is already listening on this url');\n }\n\n if (typeof options.verifyClient === 'undefined') {\n options.verifyClient = null;\n }\n\n if (typeof options.selectProtocol === 'undefined') {\n options.selectProtocol = null;\n }\n\n this.options = options;\n this.start();\n }\n\n /*\n * Attaches the mock websocket object to the global object\n */\n start() {\n const globalObj = globalObject();\n\n if (globalObj.WebSocket) {\n this.originalWebSocket = globalObj.WebSocket;\n }\n\n globalObj.WebSocket = WebSocket;\n }\n\n /*\n * Removes the mock websocket object from the global object\n */\n stop(callback = () => {}) {\n const globalObj = globalObject();\n\n if (this.originalWebSocket) {\n globalObj.WebSocket = this.originalWebSocket;\n } else {\n delete globalObj.WebSocket;\n }\n\n this.originalWebSocket = null;\n\n networkBridge.removeServer(this.url);\n\n if (typeof callback === 'function') {\n callback();\n }\n }\n\n /*\n * This is the main function for the mock server to subscribe to the on events.\n *\n * ie: mockServer.on('connection', function() { console.log('a mock client connected'); });\n *\n * @param {string} type - The event key to subscribe to. Valid keys are: connection, message, and close.\n * @param {function} callback - The callback which should be called when a certain event is fired.\n */\n on(type, callback) {\n this.addEventListener(type, callback);\n }\n\n /*\n * Closes the connection and triggers the onclose method of all listening\n * websockets. After that it removes itself from the urlMap so another server\n * could add itself to the url.\n *\n * @param {object} options\n */\n close(options = {}) {\n const { code, reason, wasClean } = options;\n const listeners = networkBridge.websocketsLookup(this.url);\n\n // Remove server before notifications to prevent immediate reconnects from\n // socket onclose handlers\n networkBridge.removeServer(this.url);\n\n listeners.forEach(socket => {\n socket.readyState = WebSocket.CLOSE;\n socket.dispatchEvent(\n createCloseEvent({\n type: 'close',\n target: socket,\n code: code || CLOSE_CODES.CLOSE_NORMAL,\n reason: reason || '',\n wasClean\n })\n );\n });\n\n this.dispatchEvent(createCloseEvent({ type: 'close' }), this);\n }\n\n /*\n * Sends a generic message event to all mock clients.\n */\n emit(event, data, options = {}) {\n let { websockets } = options;\n\n if (!websockets) {\n websockets = networkBridge.websocketsLookup(this.url);\n }\n\n if (typeof options !== 'object' || arguments.length > 3) {\n data = Array.prototype.slice.call(arguments, 1, arguments.length);\n data = data.map(item => normalizeSendData(item));\n } else {\n data = normalizeSendData(data);\n }\n\n websockets.forEach(socket => {\n if (Array.isArray(data)) {\n socket.dispatchEvent(\n createMessageEvent({\n type: event,\n data,\n origin: this.url,\n target: socket\n }),\n ...data\n );\n } else {\n socket.dispatchEvent(\n createMessageEvent({\n type: event,\n data,\n origin: this.url,\n target: socket\n })\n );\n }\n });\n }\n\n /*\n * Returns an array of websockets which are listening to this server\n * TOOD: this should return a set and not be a method\n */\n clients() {\n return networkBridge.websocketsLookup(this.url);\n }\n\n /*\n * Prepares a method to submit an event to members of the room\n *\n * e.g. server.to('my-room').emit('hi!');\n */\n to(room, broadcaster, broadcastList = []) {\n const self = this;\n const websockets = dedupe(broadcastList.concat(networkBridge.websocketsLookup(this.url, room, broadcaster)));\n\n return {\n to: (chainedRoom, chainedBroadcaster) => this.to.call(this, chainedRoom, chainedBroadcaster, websockets),\n emit(event, data) {\n self.emit(event, data, { websockets });\n }\n };\n }\n\n /*\n * Alias for Server.to\n */\n in(...args) {\n return this.to.apply(null, args);\n }\n\n /*\n * Simulate an event from the server to the clients. Useful for\n * simulating errors.\n */\n simulate(event) {\n const listeners = networkBridge.websocketsLookup(this.url);\n\n if (event === 'error') {\n listeners.forEach(socket => {\n socket.readyState = WebSocket.CLOSE;\n socket.dispatchEvent(createEvent({ type: 'error' }));\n });\n }\n }\n}\n\n/*\n * Alternative constructor to support namespaces in socket.io\n *\n * http://socket.io/docs/rooms-and-namespaces/#custom-namespaces\n */\nServer.of = function of(url) {\n return new Server(url);\n};\n\nexport default Server;\n","export default arr =>\n arr.reduce((deduped, b) => {\n if (deduped.indexOf(b) > -1) return deduped;\n return deduped.concat(b);\n }, []);\n","import URL from 'url-parse';\nimport delay from './helpers/delay';\nimport EventTarget from './event/target';\nimport networkBridge from './network-bridge';\nimport { CLOSE_CODES } from './constants';\nimport logger from './helpers/logger';\nimport { createEvent, createMessageEvent, createCloseEvent } from './event/factory';\n\n/*\n* The socket-io class is designed to mimick the real API as closely as possible.\n*\n* http://socket.io/docs/\n*/\nclass SocketIO extends EventTarget {\n /*\n * @param {string} url\n */\n constructor(url = 'socket.io', protocol = '') {\n super();\n\n this.binaryType = 'blob';\n const urlRecord = new URL(url);\n\n if (!urlRecord.pathname) {\n urlRecord.pathname = '/';\n }\n\n this.url = urlRecord.toString();\n this.readyState = SocketIO.CONNECTING;\n this.protocol = '';\n\n if (typeof protocol === 'string' || (typeof protocol === 'object' && protocol !== null)) {\n this.protocol = protocol;\n } else if (Array.isArray(protocol) && protocol.length > 0) {\n this.protocol = protocol[0];\n }\n\n const server = networkBridge.attachWebSocket(this, this.url);\n\n /*\n * Delay triggering the connection events so they can be defined in time.\n */\n delay(function delayCallback() {\n if (server) {\n this.readyState = SocketIO.OPEN;\n server.dispatchEvent(createEvent({ type: 'connection' }), server, this);\n server.dispatchEvent(createEvent({ type: 'connect' }), server, this); // alias\n this.dispatchEvent(createEvent({ type: 'connect', target: this }));\n } else {\n this.readyState = SocketIO.CLOSED;\n this.dispatchEvent(createEvent({ type: 'error', target: this }));\n this.dispatchEvent(\n createCloseEvent({\n type: 'close',\n target: this,\n code: CLOSE_CODES.CLOSE_NORMAL\n })\n );\n\n logger('error', `Socket.io connection to '${this.url}' failed`);\n }\n }, this);\n\n /**\n Add an aliased event listener for close / disconnect\n */\n this.addEventListener('close', event => {\n this.dispatchEvent(\n createCloseEvent({\n type: 'disconnect',\n target: event.target,\n code: event.code\n })\n );\n });\n }\n\n /*\n * Closes the SocketIO connection or connection attempt, if any.\n * If the connection is already CLOSED, this method does nothing.\n */\n close() {\n if (this.readyState !== SocketIO.OPEN) {\n return undefined;\n }\n\n const server = networkBridge.serverLookup(this.url);\n networkBridge.removeWebSocket(this, this.url);\n\n this.readyState = SocketIO.CLOSED;\n this.dispatchEvent(\n createCloseEvent({\n type: 'close',\n target: this,\n code: CLOSE_CODES.CLOSE_NORMAL\n })\n );\n\n if (server) {\n server.dispatchEvent(\n createCloseEvent({\n type: 'disconnect',\n target: this,\n code: CLOSE_CODES.CLOSE_NORMAL\n }),\n server\n );\n }\n\n return this;\n }\n\n /*\n * Alias for Socket#close\n *\n * https://github.com/socketio/socket.io-client/blob/master/lib/socket.js#L383\n */\n disconnect() {\n return this.close();\n }\n\n /*\n * Submits an event to the server with a payload\n */\n emit(event, ...data) {\n if (this.readyState !== SocketIO.OPEN) {\n throw new Error('SocketIO is already in CLOSING or CLOSED state');\n }\n\n const messageEvent = createMessageEvent({\n type: event,\n origin: this.url,\n data\n });\n\n const server = networkBridge.serverLookup(this.url);\n\n if (server) {\n server.dispatchEvent(messageEvent, ...data);\n }\n\n return this;\n }\n\n /*\n * Submits a 'message' event to the server.\n *\n * Should behave exactly like WebSocket#send\n *\n * https://github.com/socketio/socket.io-client/blob/master/lib/socket.js#L113\n */\n send(data) {\n this.emit('message', data);\n return this;\n }\n\n /*\n * For broadcasting events to other connected sockets.\n *\n * e.g. socket.broadcast.emit('hi!');\n * e.g. socket.broadcast.to('my-room').emit('hi!');\n */\n get broadcast() {\n if (this.readyState !== SocketIO.OPEN) {\n throw new Error('SocketIO is already in CLOSING or CLOSED state');\n }\n\n const self = this;\n const server = networkBridge.serverLookup(this.url);\n if (!server) {\n throw new Error(`SocketIO can not find a server at the specified URL (${this.url})`);\n }\n\n return {\n emit(event, data) {\n server.emit(event, data, { websockets: networkBridge.websocketsLookup(self.url, null, self) });\n return self;\n },\n to(room) {\n return server.to(room, self);\n },\n in(room) {\n return server.in(room, self);\n }\n };\n }\n\n /*\n * For registering events to be received from the server\n */\n on(type, callback) {\n this.addEventListener(type, callback);\n return this;\n }\n\n /*\n * Remove event listener\n *\n * https://socket.io/docs/client-api/#socket-on-eventname-callback\n */\n off(type) {\n this.removeEventListener(type);\n }\n\n /*\n * Join a room on a server\n *\n * http://socket.io/docs/rooms-and-namespaces/#joining-and-leaving\n */\n join(room) {\n networkBridge.addMembershipToRoom(this, room);\n }\n\n /*\n * Get the websocket to leave the room\n *\n * http://socket.io/docs/rooms-and-namespaces/#joining-and-leaving\n */\n leave(room) {\n networkBridge.removeMembershipFromRoom(this, room);\n }\n\n to(room) {\n return this.broadcast.to(room);\n }\n\n in() {\n return this.to.apply(null, arguments);\n }\n\n /*\n * Invokes all listener functions that are listening to the given event.type property. Each\n * listener will be passed the event as the first argument.\n *\n * @param {object} event - event object which will be passed to all listeners of the event.type property\n */\n dispatchEvent(event, ...customArguments) {\n const eventName = event.type;\n const listeners = this.listeners[eventName];\n\n if (!Array.isArray(listeners)) {\n return false;\n }\n\n listeners.forEach(listener => {\n if (customArguments.length > 0) {\n listener.apply(this, customArguments);\n } else {\n // Regular WebSockets expect a MessageEvent but Socketio.io just wants raw data\n // payload instanceof MessageEvent works, but you can't isntance of NodeEvent\n // for now we detect if the output has data defined on it\n listener.call(this, event.data ? event.data : event);\n }\n });\n }\n}\n\nSocketIO.CONNECTING = 0;\nSocketIO.OPEN = 1;\nSocketIO.CLOSING = 2;\nSocketIO.CLOSED = 3;\n\n/*\n* Static constructor methods for the IO Socket\n*/\nconst IO = function ioConstructor(url, protocol) {\n return new SocketIO(url, protocol);\n};\n\n/*\n* Alias the raw IO() constructor\n*/\nIO.connect = function ioConnect(url, protocol) {\n /* eslint-disable new-cap */\n return IO(url, protocol);\n /* eslint-enable new-cap */\n};\n\nexport default IO;\n","import MockServer from './server';\nimport MockSocketIO from './socket-io';\nimport MockWebSocket from './websocket';\n\nexport const Server = MockServer;\nexport const WebSocket = MockWebSocket;\nexport const SocketIO = MockSocketIO;\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\n/**\n * Returns the last element of an array.\n * @param array The array.\n * @param n Which element from the end (default is zero).\n */\nexport function tail(array, n) {\n if (n === void 0) { n = 0; }\n return array[array.length - (1 + n)];\n}\nexport function equals(one, other, itemEquals) {\n if (itemEquals === void 0) { itemEquals = function (a, b) { return a === b; }; }\n if (one.length !== other.length) {\n return false;\n }\n for (var i = 0, len = one.length; i < len; i++) {\n if (!itemEquals(one[i], other[i])) {\n return false;\n }\n }\n return true;\n}\nexport function binarySearch(array, key, comparator) {\n var low = 0, high = array.length - 1;\n while (low <= high) {\n var mid = ((low + high) / 2) | 0;\n var comp = comparator(array[mid], key);\n if (comp < 0) {\n low = mid + 1;\n }\n else if (comp > 0) {\n high = mid - 1;\n }\n else {\n return mid;\n }\n }\n return -(low + 1);\n}\n/**\n * Takes a sorted array and a function p. The array is sorted in such a way that all elements where p(x) is false\n * are located before all elements where p(x) is true.\n * @returns the least x for which p(x) is true or array.length if no element fullfills the given function.\n */\nexport function findFirstInSorted(array, p) {\n var low = 0, high = array.length;\n if (high === 0) {\n return 0; // no children\n }\n while (low < high) {\n var mid = Math.floor((low + high) / 2);\n if (p(array[mid])) {\n high = mid;\n }\n else {\n low = mid + 1;\n }\n }\n return low;\n}\n/**\n * Like `Array#sort` but always stable. Usually runs a little slower `than Array#sort`\n * so only use this when actually needing stable sort.\n */\nexport function mergeSort(data, compare) {\n _sort(data, compare, 0, data.length - 1, []);\n return data;\n}\nfunction _merge(a, compare, lo, mid, hi, aux) {\n var leftIdx = lo, rightIdx = mid + 1;\n for (var i = lo; i <= hi; i++) {\n aux[i] = a[i];\n }\n for (var i = lo; i <= hi; i++) {\n if (leftIdx > mid) {\n // left side consumed\n a[i] = aux[rightIdx++];\n }\n else if (rightIdx > hi) {\n // right side consumed\n a[i] = aux[leftIdx++];\n }\n else if (compare(aux[rightIdx], aux[leftIdx]) < 0) {\n // right element is less -> comes first\n a[i] = aux[rightIdx++];\n }\n else {\n // left element comes first (less or equal)\n a[i] = aux[leftIdx++];\n }\n }\n}\nfunction _sort(a, compare, lo, hi, aux) {\n if (hi <= lo) {\n return;\n }\n var mid = lo + ((hi - lo) / 2) | 0;\n _sort(a, compare, lo, mid, aux);\n _sort(a, compare, mid + 1, hi, aux);\n if (compare(a[mid], a[mid + 1]) <= 0) {\n // left and right are sorted and if the last-left element is less\n // or equals than the first-right element there is nothing else\n // to do\n return;\n }\n _merge(a, compare, lo, mid, hi, aux);\n}\nexport function groupBy(data, compare) {\n var result = [];\n var currentGroup;\n for (var _i = 0, _a = mergeSort(data.slice(0), compare); _i < _a.length; _i++) {\n var element = _a[_i];\n if (!currentGroup || compare(currentGroup[0], element) !== 0) {\n currentGroup = [element];\n result.push(currentGroup);\n }\n else {\n currentGroup.push(element);\n }\n }\n return result;\n}\nexport function coalesce(array, inplace) {\n if (!array) {\n if (!inplace) {\n return array;\n }\n }\n if (!inplace) {\n return array.filter(function (e) { return !!e; });\n }\n else {\n var to = 0;\n for (var i = 0; i < array.length; i++) {\n if (!!array[i]) {\n array[to] = array[i];\n to += 1;\n }\n }\n array.length = to;\n }\n}\n/**\n * @returns {{false}} if the provided object is an array\n * \tand not empty.\n */\nexport function isFalsyOrEmpty(obj) {\n return !Array.isArray(obj) || obj.length === 0;\n}\n/**\n * Removes duplicates from the given array. The optional keyFn allows to specify\n * how elements are checked for equalness by returning a unique string for each.\n */\nexport function distinct(array, keyFn) {\n if (!keyFn) {\n return array.filter(function (element, position) {\n return array.indexOf(element) === position;\n });\n }\n var seen = Object.create(null);\n return array.filter(function (elem) {\n var key = keyFn(elem);\n if (seen[key]) {\n return false;\n }\n seen[key] = true;\n return true;\n });\n}\nexport function firstIndex(array, fn) {\n for (var i = 0; i < array.length; i++) {\n var element = array[i];\n if (fn(element)) {\n return i;\n }\n }\n return -1;\n}\nexport function first(array, fn, notFoundValue) {\n if (notFoundValue === void 0) { notFoundValue = null; }\n var index = firstIndex(array, fn);\n return index < 0 ? notFoundValue : array[index];\n}\nexport function flatten(arr) {\n return [].concat.apply([], arr);\n}\nexport function range(arg, to) {\n var from = typeof to === 'number' ? arg : 0;\n if (typeof to === 'number') {\n from = arg;\n }\n else {\n from = 0;\n to = arg;\n }\n var result = [];\n if (from <= to) {\n for (var i = from; i < to; i++) {\n result.push(i);\n }\n }\n else {\n for (var i = from; i > to; i--) {\n result.push(i);\n }\n }\n return result;\n}\n/**\n * Insert `insertArr` inside `target` at `insertIndex`.\n * Please don't touch unless you understand https://jsperf.com/inserting-an-array-within-an-array\n */\nexport function arrayInsert(target, insertIndex, insertArr) {\n var before = target.slice(0, insertIndex);\n var after = target.slice(insertIndex);\n return before.concat(insertArr, after);\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport { TPromise } from './winjs.base';\n// ------ BEGIN Hook up error listeners to winjs promises\nvar outstandingPromiseErrors = {};\nfunction promiseErrorHandler(e) {\n //\n // e.detail looks like: { exception, error, promise, handler, id, parent }\n //\n var details = e.detail;\n var id = details.id;\n // If the error has a parent promise then this is not the origination of the\n // error so we check if it has a handler, and if so we mark that the error\n // was handled by removing it from outstandingPromiseErrors\n //\n if (details.parent) {\n if (details.handler && outstandingPromiseErrors) {\n delete outstandingPromiseErrors[id];\n }\n return;\n }\n // Indicate that this error was originated and needs to be handled\n outstandingPromiseErrors[id] = details;\n // The first time the queue fills up this iteration, schedule a timeout to\n // check if any errors are still unhandled.\n if (Object.keys(outstandingPromiseErrors).length === 1) {\n setTimeout(function () {\n var errors = outstandingPromiseErrors;\n outstandingPromiseErrors = {};\n Object.keys(errors).forEach(function (errorId) {\n var error = errors[errorId];\n if (error.exception) {\n onUnexpectedError(error.exception);\n }\n else if (error.error) {\n onUnexpectedError(error.error);\n }\n console.log('WARNING: Promise with no error callback:' + error.id);\n console.log(error);\n if (error.exception) {\n console.log(error.exception.stack);\n }\n });\n }, 0);\n }\n}\nTPromise.addEventListener('error', promiseErrorHandler);\n// Avoid circular dependency on EventEmitter by implementing a subset of the interface.\nvar ErrorHandler = /** @class */ (function () {\n function ErrorHandler() {\n this.listeners = [];\n this.unexpectedErrorHandler = function (e) {\n setTimeout(function () {\n if (e.stack) {\n throw new Error(e.message + '\\n\\n' + e.stack);\n }\n throw e;\n }, 0);\n };\n }\n ErrorHandler.prototype.emit = function (e) {\n this.listeners.forEach(function (listener) {\n listener(e);\n });\n };\n ErrorHandler.prototype.onUnexpectedError = function (e) {\n this.unexpectedErrorHandler(e);\n this.emit(e);\n };\n // For external errors, we don't want the listeners to be called\n ErrorHandler.prototype.onUnexpectedExternalError = function (e) {\n this.unexpectedErrorHandler(e);\n };\n return ErrorHandler;\n}());\nexport { ErrorHandler };\nexport var errorHandler = new ErrorHandler();\nexport function onUnexpectedError(e) {\n // ignore errors from cancelled promises\n if (!isPromiseCanceledError(e)) {\n errorHandler.onUnexpectedError(e);\n }\n return undefined;\n}\nexport function onUnexpectedExternalError(e) {\n // ignore errors from cancelled promises\n if (!isPromiseCanceledError(e)) {\n errorHandler.onUnexpectedExternalError(e);\n }\n return undefined;\n}\nexport function transformErrorForSerialization(error) {\n if (error instanceof Error) {\n var name_1 = error.name, message = error.message;\n var stack = error.stacktrace || error.stack;\n return {\n $isError: true,\n name: name_1,\n message: message,\n stack: stack\n };\n }\n // return as is\n return error;\n}\nvar canceledName = 'Canceled';\n/**\n * Checks if the given error is a promise in canceled state\n */\nexport function isPromiseCanceledError(error) {\n return error instanceof Error && error.name === canceledName && error.message === canceledName;\n}\n/**\n * Returns an error that signals cancellation.\n */\nexport function canceled() {\n var error = new Error(canceledName);\n error.name = error.message;\n return error;\n}\nexport function illegalArgument(name) {\n if (name) {\n return new Error(\"Illegal argument: \" + name);\n }\n else {\n return new Error('Illegal argument');\n }\n}\nexport function illegalState(name) {\n if (name) {\n return new Error(\"Illegal state: \" + name);\n }\n else {\n return new Error('Illegal state');\n }\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport { onUnexpectedError } from './errors';\nimport { once as onceFn } from './functional';\nimport { combinedDisposable, Disposable, toDisposable } from './lifecycle';\nimport { LinkedList } from './linkedList';\nexport var Event;\n(function (Event) {\n var _disposable = { dispose: function () { } };\n Event.None = function () { return _disposable; };\n})(Event || (Event = {}));\n/**\n * The Emitter can be used to expose an Event to the public\n * to fire it from the insides.\n * Sample:\n class Document {\n\n private _onDidChange = new Emitter<(value:string)=>any>();\n\n public onDidChange = this._onDidChange.event;\n\n // getter-style\n // get onDidChange(): Event<(value:string)=>any> {\n // \treturn this._onDidChange.event;\n // }\n\n private _doIt() {\n //...\n this._onDidChange.fire(value);\n }\n }\n */\nvar Emitter = /** @class */ (function () {\n function Emitter(_options) {\n this._options = _options;\n }\n Object.defineProperty(Emitter.prototype, \"event\", {\n /**\n * For the public to allow to subscribe\n * to events from this Emitter\n */\n get: function () {\n var _this = this;\n if (!this._event) {\n this._event = function (listener, thisArgs, disposables) {\n if (!_this._listeners) {\n _this._listeners = new LinkedList();\n }\n var firstListener = _this._listeners.isEmpty();\n if (firstListener && _this._options && _this._options.onFirstListenerAdd) {\n _this._options.onFirstListenerAdd(_this);\n }\n var remove = _this._listeners.push(!thisArgs ? listener : [listener, thisArgs]);\n if (firstListener && _this._options && _this._options.onFirstListenerDidAdd) {\n _this._options.onFirstListenerDidAdd(_this);\n }\n if (_this._options && _this._options.onListenerDidAdd) {\n _this._options.onListenerDidAdd(_this, listener, thisArgs);\n }\n var result;\n result = {\n dispose: function () {\n result.dispose = Emitter._noop;\n if (!_this._disposed) {\n remove();\n if (_this._options && _this._options.onLastListenerRemove && _this._listeners.isEmpty()) {\n _this._options.onLastListenerRemove(_this);\n }\n }\n }\n };\n if (Array.isArray(disposables)) {\n disposables.push(result);\n }\n return result;\n };\n }\n return this._event;\n },\n enumerable: true,\n configurable: true\n });\n /**\n * To be kept private to fire an event to\n * subscribers\n */\n Emitter.prototype.fire = function (event) {\n if (this._listeners) {\n // put all [listener,event]-pairs into delivery queue\n // then emit all event. an inner/nested event might be\n // the driver of this\n if (!this._deliveryQueue) {\n this._deliveryQueue = [];\n }\n for (var iter = this._listeners.iterator(), e = iter.next(); !e.done; e = iter.next()) {\n this._deliveryQueue.push([e.value, event]);\n }\n while (this._deliveryQueue.length > 0) {\n var _a = this._deliveryQueue.shift(), listener = _a[0], event_1 = _a[1];\n try {\n if (typeof listener === 'function') {\n listener.call(undefined, event_1);\n }\n else {\n listener[0].call(listener[1], event_1);\n }\n }\n catch (e) {\n onUnexpectedError(e);\n }\n }\n }\n };\n Emitter.prototype.dispose = function () {\n if (this._listeners) {\n this._listeners = undefined;\n }\n if (this._deliveryQueue) {\n this._deliveryQueue.length = 0;\n }\n this._disposed = true;\n };\n Emitter._noop = function () { };\n return Emitter;\n}());\nexport { Emitter };\nvar EventMultiplexer = /** @class */ (function () {\n function EventMultiplexer() {\n var _this = this;\n this.hasListeners = false;\n this.events = [];\n this.emitter = new Emitter({\n onFirstListenerAdd: function () { return _this.onFirstListenerAdd(); },\n onLastListenerRemove: function () { return _this.onLastListenerRemove(); }\n });\n }\n Object.defineProperty(EventMultiplexer.prototype, \"event\", {\n get: function () {\n return this.emitter.event;\n },\n enumerable: true,\n configurable: true\n });\n EventMultiplexer.prototype.add = function (event) {\n var _this = this;\n var e = { event: event, listener: null };\n this.events.push(e);\n if (this.hasListeners) {\n this.hook(e);\n }\n var dispose = function () {\n if (_this.hasListeners) {\n _this.unhook(e);\n }\n var idx = _this.events.indexOf(e);\n _this.events.splice(idx, 1);\n };\n return toDisposable(onceFn(dispose));\n };\n EventMultiplexer.prototype.onFirstListenerAdd = function () {\n var _this = this;\n this.hasListeners = true;\n this.events.forEach(function (e) { return _this.hook(e); });\n };\n EventMultiplexer.prototype.onLastListenerRemove = function () {\n var _this = this;\n this.hasListeners = false;\n this.events.forEach(function (e) { return _this.unhook(e); });\n };\n EventMultiplexer.prototype.hook = function (e) {\n var _this = this;\n e.listener = e.event(function (r) { return _this.emitter.fire(r); });\n };\n EventMultiplexer.prototype.unhook = function (e) {\n e.listener.dispose();\n e.listener = null;\n };\n EventMultiplexer.prototype.dispose = function () {\n this.emitter.dispose();\n };\n return EventMultiplexer;\n}());\nexport { EventMultiplexer };\nexport function once(event) {\n return function (listener, thisArgs, disposables) {\n if (thisArgs === void 0) { thisArgs = null; }\n var result = event(function (e) {\n result.dispose();\n return listener.call(thisArgs, e);\n }, null, disposables);\n return result;\n };\n}\nexport function anyEvent() {\n var events = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n events[_i] = arguments[_i];\n }\n return function (listener, thisArgs, disposables) {\n if (thisArgs === void 0) { thisArgs = null; }\n return combinedDisposable(events.map(function (event) { return event(function (e) { return listener.call(thisArgs, e); }, null, disposables); }));\n };\n}\nexport function debounceEvent(event, merger, delay, leading) {\n if (delay === void 0) { delay = 100; }\n if (leading === void 0) { leading = false; }\n var subscription;\n var output = undefined;\n var handle = undefined;\n var numDebouncedCalls = 0;\n var emitter = new Emitter({\n onFirstListenerAdd: function () {\n subscription = event(function (cur) {\n numDebouncedCalls++;\n output = merger(output, cur);\n if (leading && !handle) {\n emitter.fire(output);\n }\n clearTimeout(handle);\n handle = setTimeout(function () {\n var _output = output;\n output = undefined;\n handle = undefined;\n if (!leading || numDebouncedCalls > 1) {\n emitter.fire(_output);\n }\n numDebouncedCalls = 0;\n }, delay);\n });\n },\n onLastListenerRemove: function () {\n subscription.dispose();\n }\n });\n return emitter.event;\n}\n/**\n * The EventDelayer is useful in situations in which you want\n * to delay firing your events during some code.\n * You can wrap that code and be sure that the event will not\n * be fired during that wrap.\n *\n * ```\n * const emitter: Emitter;\n * const delayer = new EventDelayer();\n * const delayedEvent = delayer.wrapEvent(emitter.event);\n *\n * delayedEvent(console.log);\n *\n * delayer.bufferEvents(() => {\n * emitter.fire(); // event will not be fired yet\n * });\n *\n * // event will only be fired at this point\n * ```\n */\nvar EventBufferer = /** @class */ (function () {\n function EventBufferer() {\n this.buffers = [];\n }\n EventBufferer.prototype.wrapEvent = function (event) {\n var _this = this;\n return function (listener, thisArgs, disposables) {\n return event(function (i) {\n var buffer = _this.buffers[_this.buffers.length - 1];\n if (buffer) {\n buffer.push(function () { return listener.call(thisArgs, i); });\n }\n else {\n listener.call(thisArgs, i);\n }\n }, void 0, disposables);\n };\n };\n EventBufferer.prototype.bufferEvents = function (fn) {\n var buffer = [];\n this.buffers.push(buffer);\n fn();\n this.buffers.pop();\n buffer.forEach(function (flush) { return flush(); });\n };\n return EventBufferer;\n}());\nexport { EventBufferer };\nexport function mapEvent(event, map) {\n return function (listener, thisArgs, disposables) {\n if (thisArgs === void 0) { thisArgs = null; }\n return event(function (i) { return listener.call(thisArgs, map(i)); }, null, disposables);\n };\n}\nexport function filterEvent(event, filter) {\n return function (listener, thisArgs, disposables) {\n if (thisArgs === void 0) { thisArgs = null; }\n return event(function (e) { return filter(e) && listener.call(thisArgs, e); }, null, disposables);\n };\n}\nvar ChainableEvent = /** @class */ (function () {\n function ChainableEvent(_event) {\n this._event = _event;\n }\n Object.defineProperty(ChainableEvent.prototype, \"event\", {\n get: function () { return this._event; },\n enumerable: true,\n configurable: true\n });\n ChainableEvent.prototype.map = function (fn) {\n return new ChainableEvent(mapEvent(this._event, fn));\n };\n ChainableEvent.prototype.filter = function (fn) {\n return new ChainableEvent(filterEvent(this._event, fn));\n };\n ChainableEvent.prototype.on = function (listener, thisArgs, disposables) {\n return this._event(listener, thisArgs, disposables);\n };\n return ChainableEvent;\n}());\nexport function chain(event) {\n return new ChainableEvent(event);\n}\nvar Relay = /** @class */ (function () {\n function Relay() {\n this.emitter = new Emitter();\n this.event = this.emitter.event;\n this.disposable = Disposable.None;\n }\n Object.defineProperty(Relay.prototype, \"input\", {\n set: function (event) {\n this.disposable.dispose();\n this.disposable = event(this.emitter.fire, this.emitter);\n },\n enumerable: true,\n configurable: true\n });\n Relay.prototype.dispose = function () {\n this.disposable.dispose();\n this.emitter.dispose();\n };\n return Relay;\n}());\nexport { Relay };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nexport function once(fn) {\n var _this = this;\n var didCall = false;\n var result;\n return function () {\n if (didCall) {\n return result;\n }\n didCall = true;\n result = fn.apply(_this, arguments);\n return result;\n };\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport * as arrays from './arrays';\nimport * as strings from './strings';\nimport * as paths from './paths';\nimport { LRUCache } from './map';\nimport { TPromise } from './winjs.base';\nvar GLOBSTAR = '**';\nvar GLOB_SPLIT = '/';\nvar PATH_REGEX = '[/\\\\\\\\]'; // any slash or backslash\nvar NO_PATH_REGEX = '[^/\\\\\\\\]'; // any non-slash and non-backslash\nvar ALL_FORWARD_SLASHES = /\\//g;\nfunction starsToRegExp(starCount) {\n switch (starCount) {\n case 0:\n return '';\n case 1:\n return NO_PATH_REGEX + \"*?\"; // 1 star matches any number of characters except path separator (/ and \\) - non greedy (?)\n default:\n // Matches: (Path Sep OR Path Val followed by Path Sep OR Path Sep followed by Path Val) 0-many times\n // Group is non capturing because we don't need to capture at all (?:...)\n // Overall we use non-greedy matching because it could be that we match too much\n return \"(?:\" + PATH_REGEX + \"|\" + NO_PATH_REGEX + \"+\" + PATH_REGEX + \"|\" + PATH_REGEX + NO_PATH_REGEX + \"+)*?\";\n }\n}\nexport function splitGlobAware(pattern, splitChar) {\n if (!pattern) {\n return [];\n }\n var segments = [];\n var inBraces = false;\n var inBrackets = false;\n var char;\n var curVal = '';\n for (var i = 0; i < pattern.length; i++) {\n char = pattern[i];\n switch (char) {\n case splitChar:\n if (!inBraces && !inBrackets) {\n segments.push(curVal);\n curVal = '';\n continue;\n }\n break;\n case '{':\n inBraces = true;\n break;\n case '}':\n inBraces = false;\n break;\n case '[':\n inBrackets = true;\n break;\n case ']':\n inBrackets = false;\n break;\n }\n curVal += char;\n }\n // Tail\n if (curVal) {\n segments.push(curVal);\n }\n return segments;\n}\nfunction parseRegExp(pattern) {\n if (!pattern) {\n return '';\n }\n var regEx = '';\n // Split up into segments for each slash found\n var segments = splitGlobAware(pattern, GLOB_SPLIT);\n // Special case where we only have globstars\n if (segments.every(function (s) { return s === GLOBSTAR; })) {\n regEx = '.*';\n }\n // Build regex over segments\n else {\n var previousSegmentWasGlobStar_1 = false;\n segments.forEach(function (segment, index) {\n // Globstar is special\n if (segment === GLOBSTAR) {\n // if we have more than one globstar after another, just ignore it\n if (!previousSegmentWasGlobStar_1) {\n regEx += starsToRegExp(2);\n previousSegmentWasGlobStar_1 = true;\n }\n return;\n }\n // States\n var inBraces = false;\n var braceVal = '';\n var inBrackets = false;\n var bracketVal = '';\n var char;\n for (var i = 0; i < segment.length; i++) {\n char = segment[i];\n // Support brace expansion\n if (char !== '}' && inBraces) {\n braceVal += char;\n continue;\n }\n // Support brackets\n if (inBrackets && (char !== ']' || !bracketVal) /* ] is literally only allowed as first character in brackets to match it */) {\n var res = void 0;\n // range operator\n if (char === '-') {\n res = char;\n }\n // negation operator (only valid on first index in bracket)\n else if ((char === '^' || char === '!') && !bracketVal) {\n res = '^';\n }\n // glob split matching is not allowed within character ranges\n // see http://man7.org/linux/man-pages/man7/glob.7.html\n else if (char === GLOB_SPLIT) {\n res = '';\n }\n // anything else gets escaped\n else {\n res = strings.escapeRegExpCharacters(char);\n }\n bracketVal += res;\n continue;\n }\n switch (char) {\n case '{':\n inBraces = true;\n continue;\n case '[':\n inBrackets = true;\n continue;\n case '}':\n var choices = splitGlobAware(braceVal, ',');\n // Converts {foo,bar} => [foo|bar]\n var braceRegExp = \"(?:\" + choices.map(function (c) { return parseRegExp(c); }).join('|') + \")\";\n regEx += braceRegExp;\n inBraces = false;\n braceVal = '';\n break;\n case ']':\n regEx += ('[' + bracketVal + ']');\n inBrackets = false;\n bracketVal = '';\n break;\n case '?':\n regEx += NO_PATH_REGEX; // 1 ? matches any single character except path separator (/ and \\)\n continue;\n case '*':\n regEx += starsToRegExp(1);\n continue;\n default:\n regEx += strings.escapeRegExpCharacters(char);\n }\n }\n // Tail: Add the slash we had split on if there is more to come and the remaining pattern is not a globstar\n // For example if pattern: some/**/*.js we want the \"/\" after some to be included in the RegEx to prevent\n // a folder called \"something\" to match as well.\n // However, if pattern: some/**, we tolerate that we also match on \"something\" because our globstar behaviour\n // is to match 0-N segments.\n if (index < segments.length - 1 && (segments[index + 1] !== GLOBSTAR || index + 2 < segments.length)) {\n regEx += PATH_REGEX;\n }\n // reset state\n previousSegmentWasGlobStar_1 = false;\n });\n }\n return regEx;\n}\n// regexes to check for trival glob patterns that just check for String#endsWith\nvar T1 = /^\\*\\*\\/\\*\\.[\\w\\.-]+$/; // **/*.something\nvar T2 = /^\\*\\*\\/([\\w\\.-]+)\\/?$/; // **/something\nvar T3 = /^{\\*\\*\\/[\\*\\.]?[\\w\\.-]+\\/?(,\\*\\*\\/[\\*\\.]?[\\w\\.-]+\\/?)*}$/; // {**/*.something,**/*.else} or {**/package.json,**/project.json}\nvar T3_2 = /^{\\*\\*\\/[\\*\\.]?[\\w\\.-]+(\\/(\\*\\*)?)?(,\\*\\*\\/[\\*\\.]?[\\w\\.-]+(\\/(\\*\\*)?)?)*}$/; // Like T3, with optional trailing /**\nvar T4 = /^\\*\\*((\\/[\\w\\.-]+)+)\\/?$/; // **/something/else\nvar T5 = /^([\\w\\.-]+(\\/[\\w\\.-]+)*)\\/?$/; // something/else\nvar CACHE = new LRUCache(10000); // bounded to 10000 elements\nvar FALSE = function () {\n return false;\n};\nvar NULL = function () {\n return null;\n};\nfunction parsePattern(arg1, options) {\n if (!arg1) {\n return NULL;\n }\n // Handle IRelativePattern\n var pattern;\n if (typeof arg1 !== 'string') {\n pattern = arg1.pattern;\n }\n else {\n pattern = arg1;\n }\n // Whitespace trimming\n pattern = pattern.trim();\n // Check cache\n var patternKey = pattern + \"_\" + !!options.trimForExclusions;\n var parsedPattern = CACHE.get(patternKey);\n if (parsedPattern) {\n return wrapRelativePattern(parsedPattern, arg1);\n }\n // Check for Trivias\n var match;\n if (T1.test(pattern)) { // common pattern: **/*.txt just need endsWith check\n var base_1 = pattern.substr(4); // '**/*'.length === 4\n parsedPattern = function (path, basename) {\n return path && strings.endsWith(path, base_1) ? pattern : null;\n };\n }\n else if (match = T2.exec(trimForExclusions(pattern, options))) { // common pattern: **/some.txt just need basename check\n parsedPattern = trivia2(match[1], pattern);\n }\n else if ((options.trimForExclusions ? T3_2 : T3).test(pattern)) { // repetition of common patterns (see above) {**/*.txt,**/*.png}\n parsedPattern = trivia3(pattern, options);\n }\n else if (match = T4.exec(trimForExclusions(pattern, options))) { // common pattern: **/something/else just need endsWith check\n parsedPattern = trivia4and5(match[1].substr(1), pattern, true);\n }\n else if (match = T5.exec(trimForExclusions(pattern, options))) { // common pattern: something/else just need equals check\n parsedPattern = trivia4and5(match[1], pattern, false);\n }\n // Otherwise convert to pattern\n else {\n parsedPattern = toRegExp(pattern);\n }\n // Cache\n CACHE.set(patternKey, parsedPattern);\n return wrapRelativePattern(parsedPattern, arg1);\n}\nfunction wrapRelativePattern(parsedPattern, arg2) {\n if (typeof arg2 === 'string') {\n return parsedPattern;\n }\n return function (path, basename) {\n if (!paths.isEqualOrParent(path, arg2.base)) {\n return null;\n }\n return parsedPattern(paths.normalize(arg2.pathToRelative(arg2.base, path)), basename);\n };\n}\nfunction trimForExclusions(pattern, options) {\n return options.trimForExclusions && strings.endsWith(pattern, '/**') ? pattern.substr(0, pattern.length - 2) : pattern; // dropping **, tailing / is dropped later\n}\n// common pattern: **/some.txt just need basename check\nfunction trivia2(base, originalPattern) {\n var slashBase = \"/\" + base;\n var backslashBase = \"\\\\\" + base;\n var parsedPattern = function (path, basename) {\n if (!path) {\n return null;\n }\n if (basename) {\n return basename === base ? originalPattern : null;\n }\n return path === base || strings.endsWith(path, slashBase) || strings.endsWith(path, backslashBase) ? originalPattern : null;\n };\n var basenames = [base];\n parsedPattern.basenames = basenames;\n parsedPattern.patterns = [originalPattern];\n parsedPattern.allBasenames = basenames;\n return parsedPattern;\n}\n// repetition of common patterns (see above) {**/*.txt,**/*.png}\nfunction trivia3(pattern, options) {\n var parsedPatterns = aggregateBasenameMatches(pattern.slice(1, -1).split(',')\n .map(function (pattern) { return parsePattern(pattern, options); })\n .filter(function (pattern) { return pattern !== NULL; }), pattern);\n var n = parsedPatterns.length;\n if (!n) {\n return NULL;\n }\n if (n === 1) {\n return parsedPatterns[0];\n }\n var parsedPattern = function (path, basename) {\n for (var i = 0, n_1 = parsedPatterns.length; i < n_1; i++) {\n if (parsedPatterns[i](path, basename)) {\n return pattern;\n }\n }\n return null;\n };\n var withBasenames = arrays.first(parsedPatterns, function (pattern) { return !!pattern.allBasenames; });\n if (withBasenames) {\n parsedPattern.allBasenames = withBasenames.allBasenames;\n }\n var allPaths = parsedPatterns.reduce(function (all, current) { return current.allPaths ? all.concat(current.allPaths) : all; }, []);\n if (allPaths.length) {\n parsedPattern.allPaths = allPaths;\n }\n return parsedPattern;\n}\n// common patterns: **/something/else just need endsWith check, something/else just needs and equals check\nfunction trivia4and5(path, pattern, matchPathEnds) {\n var nativePath = paths.nativeSep !== paths.sep ? path.replace(ALL_FORWARD_SLASHES, paths.nativeSep) : path;\n var nativePathEnd = paths.nativeSep + nativePath;\n var parsedPattern = matchPathEnds ? function (path, basename) {\n return path && (path === nativePath || strings.endsWith(path, nativePathEnd)) ? pattern : null;\n } : function (path, basename) {\n return path && path === nativePath ? pattern : null;\n };\n parsedPattern.allPaths = [(matchPathEnds ? '*/' : './') + path];\n return parsedPattern;\n}\nfunction toRegExp(pattern) {\n try {\n var regExp_1 = new RegExp(\"^\" + parseRegExp(pattern) + \"$\");\n return function (path, basename) {\n regExp_1.lastIndex = 0; // reset RegExp to its initial state to reuse it!\n return path && regExp_1.test(path) ? pattern : null;\n };\n }\n catch (error) {\n return NULL;\n }\n}\nexport function match(arg1, path, hasSibling) {\n if (!arg1 || !path) {\n return false;\n }\n return parse(arg1)(path, undefined, hasSibling);\n}\nexport function parse(arg1, options) {\n if (options === void 0) { options = {}; }\n if (!arg1) {\n return FALSE;\n }\n // Glob with String\n if (typeof arg1 === 'string' || isRelativePattern(arg1)) {\n var parsedPattern_1 = parsePattern(arg1, options);\n if (parsedPattern_1 === NULL) {\n return FALSE;\n }\n var resultPattern = function (path, basename) {\n return !!parsedPattern_1(path, basename);\n };\n if (parsedPattern_1.allBasenames) {\n resultPattern.allBasenames = parsedPattern_1.allBasenames;\n }\n if (parsedPattern_1.allPaths) {\n resultPattern.allPaths = parsedPattern_1.allPaths;\n }\n return resultPattern;\n }\n // Glob with Expression\n return parsedExpression(arg1, options);\n}\nexport function isRelativePattern(obj) {\n var rp = obj;\n return rp && typeof rp.base === 'string' && typeof rp.pattern === 'string' && typeof rp.pathToRelative === 'function';\n}\nfunction parsedExpression(expression, options) {\n var parsedPatterns = aggregateBasenameMatches(Object.getOwnPropertyNames(expression)\n .map(function (pattern) { return parseExpressionPattern(pattern, expression[pattern], options); })\n .filter(function (pattern) { return pattern !== NULL; }));\n var n = parsedPatterns.length;\n if (!n) {\n return NULL;\n }\n if (!parsedPatterns.some(function (parsedPattern) { return parsedPattern.requiresSiblings; })) {\n if (n === 1) {\n return parsedPatterns[0];\n }\n var resultExpression_1 = function (path, basename) {\n for (var i = 0, n_2 = parsedPatterns.length; i < n_2; i++) {\n // Pattern matches path\n var result = parsedPatterns[i](path, basename);\n if (result) {\n return result;\n }\n }\n return null;\n };\n var withBasenames_1 = arrays.first(parsedPatterns, function (pattern) { return !!pattern.allBasenames; });\n if (withBasenames_1) {\n resultExpression_1.allBasenames = withBasenames_1.allBasenames;\n }\n var allPaths_1 = parsedPatterns.reduce(function (all, current) { return current.allPaths ? all.concat(current.allPaths) : all; }, []);\n if (allPaths_1.length) {\n resultExpression_1.allPaths = allPaths_1;\n }\n return resultExpression_1;\n }\n var resultExpression = function (path, basename, hasSibling) {\n var name;\n for (var i = 0, n_3 = parsedPatterns.length; i < n_3; i++) {\n // Pattern matches path\n var parsedPattern = parsedPatterns[i];\n if (parsedPattern.requiresSiblings && hasSibling) {\n if (!basename) {\n basename = paths.basename(path);\n }\n if (!name) {\n name = basename.substr(0, basename.length - paths.extname(path).length);\n }\n }\n var result = parsedPattern(path, basename, name, hasSibling);\n if (result) {\n return result;\n }\n }\n return null;\n };\n var withBasenames = arrays.first(parsedPatterns, function (pattern) { return !!pattern.allBasenames; });\n if (withBasenames) {\n resultExpression.allBasenames = withBasenames.allBasenames;\n }\n var allPaths = parsedPatterns.reduce(function (all, current) { return current.allPaths ? all.concat(current.allPaths) : all; }, []);\n if (allPaths.length) {\n resultExpression.allPaths = allPaths;\n }\n return resultExpression;\n}\nfunction parseExpressionPattern(pattern, value, options) {\n if (value === false) {\n return NULL; // pattern is disabled\n }\n var parsedPattern = parsePattern(pattern, options);\n if (parsedPattern === NULL) {\n return NULL;\n }\n // Expression Pattern is \n if (typeof value === 'boolean') {\n return parsedPattern;\n }\n // Expression Pattern is \n if (value) {\n var when_1 = value.when;\n if (typeof when_1 === 'string') {\n var result = function (path, basename, name, hasSibling) {\n if (!hasSibling || !parsedPattern(path, basename)) {\n return null;\n }\n var clausePattern = when_1.replace('$(basename)', name);\n var matched = hasSibling(clausePattern);\n return TPromise.is(matched) ?\n matched.then(function (m) { return m ? pattern : null; }) :\n matched ? pattern : null;\n };\n result.requiresSiblings = true;\n return result;\n }\n }\n // Expression is Anything\n return parsedPattern;\n}\nfunction aggregateBasenameMatches(parsedPatterns, result) {\n var basenamePatterns = parsedPatterns.filter(function (parsedPattern) { return !!parsedPattern.basenames; });\n if (basenamePatterns.length < 2) {\n return parsedPatterns;\n }\n var basenames = basenamePatterns.reduce(function (all, current) { return all.concat(current.basenames); }, []);\n var patterns;\n if (result) {\n patterns = [];\n for (var i = 0, n = basenames.length; i < n; i++) {\n patterns.push(result);\n }\n }\n else {\n patterns = basenamePatterns.reduce(function (all, current) { return all.concat(current.patterns); }, []);\n }\n var aggregate = function (path, basename) {\n if (!path) {\n return null;\n }\n if (!basename) {\n var i = void 0;\n for (i = path.length; i > 0; i--) {\n var ch = path.charCodeAt(i - 1);\n if (ch === 47 /* Slash */ || ch === 92 /* Backslash */) {\n break;\n }\n }\n basename = path.substr(i);\n }\n var index = basenames.indexOf(basename);\n return index !== -1 ? patterns[index] : null;\n };\n aggregate.basenames = basenames;\n aggregate.patterns = patterns;\n aggregate.allBasenames = basenames;\n var aggregatedPatterns = parsedPatterns.filter(function (parsedPattern) { return !parsedPattern.basenames; });\n aggregatedPatterns.push(aggregate);\n return aggregatedPatterns;\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nexport function isDisposable(thing) {\n return typeof thing.dispose === 'function'\n && thing.dispose.length === 0;\n}\nexport function dispose(first) {\n var rest = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n rest[_i - 1] = arguments[_i];\n }\n if (Array.isArray(first)) {\n first.forEach(function (d) { return d && d.dispose(); });\n return [];\n }\n else if (rest.length === 0) {\n if (first) {\n first.dispose();\n return first;\n }\n return undefined;\n }\n else {\n dispose(first);\n dispose(rest);\n return [];\n }\n}\nexport function combinedDisposable(disposables) {\n return { dispose: function () { return dispose(disposables); } };\n}\nexport function toDisposable(fn) {\n return { dispose: function () { fn(); } };\n}\nvar Disposable = /** @class */ (function () {\n function Disposable() {\n this._toDispose = [];\n }\n Object.defineProperty(Disposable.prototype, \"toDispose\", {\n get: function () { return this._toDispose; },\n enumerable: true,\n configurable: true\n });\n Disposable.prototype.dispose = function () {\n this._toDispose = dispose(this._toDispose);\n };\n Disposable.prototype._register = function (t) {\n this._toDispose.push(t);\n return t;\n };\n Disposable.None = Object.freeze({ dispose: function () { } });\n return Disposable;\n}());\nexport { Disposable };\nvar ImmortalReference = /** @class */ (function () {\n function ImmortalReference(object) {\n this.object = object;\n }\n ImmortalReference.prototype.dispose = function () { };\n return ImmortalReference;\n}());\nexport { ImmortalReference };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar Node = /** @class */ (function () {\n function Node(element) {\n this.element = element;\n }\n return Node;\n}());\nvar LinkedList = /** @class */ (function () {\n function LinkedList() {\n }\n LinkedList.prototype.isEmpty = function () {\n return !this._first;\n };\n LinkedList.prototype.unshift = function (element) {\n return this.insert(element, false);\n };\n LinkedList.prototype.push = function (element) {\n return this.insert(element, true);\n };\n LinkedList.prototype.insert = function (element, atTheEnd) {\n var _this = this;\n var newNode = new Node(element);\n if (!this._first) {\n this._first = newNode;\n this._last = newNode;\n }\n else if (atTheEnd) {\n // push\n var oldLast = this._last;\n this._last = newNode;\n newNode.prev = oldLast;\n oldLast.next = newNode;\n }\n else {\n // unshift\n var oldFirst = this._first;\n this._first = newNode;\n newNode.next = oldFirst;\n oldFirst.prev = newNode;\n }\n return function () {\n for (var candidate = _this._first; candidate instanceof Node; candidate = candidate.next) {\n if (candidate !== newNode) {\n continue;\n }\n if (candidate.prev && candidate.next) {\n // middle\n var anchor = candidate.prev;\n anchor.next = candidate.next;\n candidate.next.prev = anchor;\n }\n else if (!candidate.prev && !candidate.next) {\n // only node\n _this._first = undefined;\n _this._last = undefined;\n }\n else if (!candidate.next) {\n // last\n _this._last = _this._last.prev;\n _this._last.next = undefined;\n }\n else if (!candidate.prev) {\n // first\n _this._first = _this._first.next;\n _this._first.prev = undefined;\n }\n // done\n break;\n }\n };\n };\n LinkedList.prototype.iterator = function () {\n var element = {\n done: undefined,\n value: undefined,\n };\n var node = this._first;\n return {\n next: function () {\n if (!node) {\n element.done = true;\n element.value = undefined;\n }\n else {\n element.done = false;\n element.value = node.element;\n node = node.next;\n }\n return element;\n }\n };\n };\n return LinkedList;\n}());\nexport { LinkedList };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nexport function values(forEachable) {\n var result = [];\n forEachable.forEach(function (value) { return result.push(value); });\n return result;\n}\nvar StringIterator = /** @class */ (function () {\n function StringIterator() {\n this._value = '';\n this._pos = 0;\n }\n StringIterator.prototype.reset = function (key) {\n this._value = key;\n this._pos = 0;\n return this;\n };\n StringIterator.prototype.next = function () {\n this._pos += 1;\n return this;\n };\n StringIterator.prototype.hasNext = function () {\n return this._pos < this._value.length - 1;\n };\n StringIterator.prototype.cmp = function (a) {\n var aCode = a.charCodeAt(0);\n var thisCode = this._value.charCodeAt(this._pos);\n return aCode - thisCode;\n };\n StringIterator.prototype.value = function () {\n return this._value[this._pos];\n };\n return StringIterator;\n}());\nexport { StringIterator };\nvar PathIterator = /** @class */ (function () {\n function PathIterator() {\n }\n PathIterator.prototype.reset = function (key) {\n this._value = key.replace(/\\\\$|\\/$/, '');\n this._from = 0;\n this._to = 0;\n return this.next();\n };\n PathIterator.prototype.hasNext = function () {\n return this._to < this._value.length;\n };\n PathIterator.prototype.next = function () {\n // this._data = key.split(/[\\\\/]/).filter(s => !!s);\n this._from = this._to;\n var justSeps = true;\n for (; this._to < this._value.length; this._to++) {\n var ch = this._value.charCodeAt(this._to);\n if (ch === 47 /* Slash */ || ch === 92 /* Backslash */) {\n if (justSeps) {\n this._from++;\n }\n else {\n break;\n }\n }\n else {\n justSeps = false;\n }\n }\n return this;\n };\n PathIterator.prototype.cmp = function (a) {\n var aPos = 0;\n var aLen = a.length;\n var thisPos = this._from;\n while (aPos < aLen && thisPos < this._to) {\n var cmp = a.charCodeAt(aPos) - this._value.charCodeAt(thisPos);\n if (cmp !== 0) {\n return cmp;\n }\n aPos += 1;\n thisPos += 1;\n }\n if (aLen === this._to - this._from) {\n return 0;\n }\n else if (aPos < aLen) {\n return -1;\n }\n else {\n return 1;\n }\n };\n PathIterator.prototype.value = function () {\n return this._value.substring(this._from, this._to);\n };\n return PathIterator;\n}());\nexport { PathIterator };\nvar TernarySearchTreeNode = /** @class */ (function () {\n function TernarySearchTreeNode() {\n }\n return TernarySearchTreeNode;\n}());\nvar TernarySearchTree = /** @class */ (function () {\n function TernarySearchTree(segments) {\n this._iter = segments;\n }\n TernarySearchTree.forPaths = function () {\n return new TernarySearchTree(new PathIterator());\n };\n TernarySearchTree.forStrings = function () {\n return new TernarySearchTree(new StringIterator());\n };\n TernarySearchTree.prototype.clear = function () {\n this._root = undefined;\n };\n TernarySearchTree.prototype.set = function (key, element) {\n var iter = this._iter.reset(key);\n var node;\n if (!this._root) {\n this._root = new TernarySearchTreeNode();\n this._root.segment = iter.value();\n }\n node = this._root;\n while (true) {\n var val = iter.cmp(node.segment);\n if (val > 0) {\n // left\n if (!node.left) {\n node.left = new TernarySearchTreeNode();\n node.left.segment = iter.value();\n }\n node = node.left;\n }\n else if (val < 0) {\n // right\n if (!node.right) {\n node.right = new TernarySearchTreeNode();\n node.right.segment = iter.value();\n }\n node = node.right;\n }\n else if (iter.hasNext()) {\n // mid\n iter.next();\n if (!node.mid) {\n node.mid = new TernarySearchTreeNode();\n node.mid.segment = iter.value();\n }\n node = node.mid;\n }\n else {\n break;\n }\n }\n var oldElement = node.value;\n node.value = element;\n node.key = key;\n return oldElement;\n };\n TernarySearchTree.prototype.get = function (key) {\n var iter = this._iter.reset(key);\n var node = this._root;\n while (node) {\n var val = iter.cmp(node.segment);\n if (val > 0) {\n // left\n node = node.left;\n }\n else if (val < 0) {\n // right\n node = node.right;\n }\n else if (iter.hasNext()) {\n // mid\n iter.next();\n node = node.mid;\n }\n else {\n break;\n }\n }\n return node ? node.value : undefined;\n };\n TernarySearchTree.prototype.findSubstr = function (key) {\n var iter = this._iter.reset(key);\n var node = this._root;\n var candidate;\n while (node) {\n var val = iter.cmp(node.segment);\n if (val > 0) {\n // left\n node = node.left;\n }\n else if (val < 0) {\n // right\n node = node.right;\n }\n else if (iter.hasNext()) {\n // mid\n iter.next();\n candidate = node.value || candidate;\n node = node.mid;\n }\n else {\n break;\n }\n }\n return node && node.value || candidate;\n };\n TernarySearchTree.prototype.forEach = function (callback) {\n this._forEach(this._root, callback);\n };\n TernarySearchTree.prototype._forEach = function (node, callback) {\n if (node) {\n // left\n this._forEach(node.left, callback);\n // node\n if (node.value) {\n // callback(node.value, this._iter.join(parts));\n callback(node.value, node.key);\n }\n // mid\n this._forEach(node.mid, callback);\n // right\n this._forEach(node.right, callback);\n }\n };\n return TernarySearchTree;\n}());\nexport { TernarySearchTree };\nvar ResourceMap = /** @class */ (function () {\n function ResourceMap() {\n this.map = new Map();\n this.ignoreCase = false; // in the future this should be an uri-comparator\n }\n ResourceMap.prototype.set = function (resource, value) {\n this.map.set(this.toKey(resource), value);\n };\n ResourceMap.prototype.get = function (resource) {\n return this.map.get(this.toKey(resource));\n };\n ResourceMap.prototype.toKey = function (resource) {\n var key = resource.toString();\n if (this.ignoreCase) {\n key = key.toLowerCase();\n }\n return key;\n };\n return ResourceMap;\n}());\nexport { ResourceMap };\nexport var Touch;\n(function (Touch) {\n Touch[Touch[\"None\"] = 0] = \"None\";\n Touch[Touch[\"AsOld\"] = 1] = \"AsOld\";\n Touch[Touch[\"AsNew\"] = 2] = \"AsNew\";\n})(Touch || (Touch = {}));\nvar LinkedMap = /** @class */ (function () {\n function LinkedMap() {\n this._map = new Map();\n this._head = undefined;\n this._tail = undefined;\n this._size = 0;\n }\n LinkedMap.prototype.clear = function () {\n this._map.clear();\n this._head = undefined;\n this._tail = undefined;\n this._size = 0;\n };\n Object.defineProperty(LinkedMap.prototype, \"size\", {\n get: function () {\n return this._size;\n },\n enumerable: true,\n configurable: true\n });\n LinkedMap.prototype.get = function (key, touch) {\n if (touch === void 0) { touch = Touch.None; }\n var item = this._map.get(key);\n if (!item) {\n return undefined;\n }\n if (touch !== Touch.None) {\n this.touch(item, touch);\n }\n return item.value;\n };\n LinkedMap.prototype.set = function (key, value, touch) {\n if (touch === void 0) { touch = Touch.None; }\n var item = this._map.get(key);\n if (item) {\n item.value = value;\n if (touch !== Touch.None) {\n this.touch(item, touch);\n }\n }\n else {\n item = { key: key, value: value, next: undefined, previous: undefined };\n switch (touch) {\n case Touch.None:\n this.addItemLast(item);\n break;\n case Touch.AsOld:\n this.addItemFirst(item);\n break;\n case Touch.AsNew:\n this.addItemLast(item);\n break;\n default:\n this.addItemLast(item);\n break;\n }\n this._map.set(key, item);\n this._size++;\n }\n };\n LinkedMap.prototype.forEach = function (callbackfn, thisArg) {\n var current = this._head;\n while (current) {\n if (thisArg) {\n callbackfn.bind(thisArg)(current.value, current.key, this);\n }\n else {\n callbackfn(current.value, current.key, this);\n }\n current = current.next;\n }\n };\n /* VS Code / Monaco editor runs on es5 which has no Symbol.iterator\n public keys(): IterableIterator {\n let current = this._head;\n let iterator: IterableIterator = {\n [Symbol.iterator]() {\n return iterator;\n },\n next():IteratorResult {\n if (current) {\n let result = { value: current.key, done: false };\n current = current.next;\n return result;\n } else {\n return { value: undefined, done: true };\n }\n }\n };\n return iterator;\n }\n\n public values(): IterableIterator {\n let current = this._head;\n let iterator: IterableIterator = {\n [Symbol.iterator]() {\n return iterator;\n },\n next():IteratorResult {\n if (current) {\n let result = { value: current.value, done: false };\n current = current.next;\n return result;\n } else {\n return { value: undefined, done: true };\n }\n }\n };\n return iterator;\n }\n */\n LinkedMap.prototype.trimOld = function (newSize) {\n if (newSize >= this.size) {\n return;\n }\n if (newSize === 0) {\n this.clear();\n return;\n }\n var current = this._head;\n var currentSize = this.size;\n while (current && currentSize > newSize) {\n this._map.delete(current.key);\n current = current.next;\n currentSize--;\n }\n this._head = current;\n this._size = currentSize;\n current.previous = void 0;\n };\n LinkedMap.prototype.addItemFirst = function (item) {\n // First time Insert\n if (!this._head && !this._tail) {\n this._tail = item;\n }\n else if (!this._head) {\n throw new Error('Invalid list');\n }\n else {\n item.next = this._head;\n this._head.previous = item;\n }\n this._head = item;\n };\n LinkedMap.prototype.addItemLast = function (item) {\n // First time Insert\n if (!this._head && !this._tail) {\n this._head = item;\n }\n else if (!this._tail) {\n throw new Error('Invalid list');\n }\n else {\n item.previous = this._tail;\n this._tail.next = item;\n }\n this._tail = item;\n };\n LinkedMap.prototype.touch = function (item, touch) {\n if (!this._head || !this._tail) {\n throw new Error('Invalid list');\n }\n if ((touch !== Touch.AsOld && touch !== Touch.AsNew)) {\n return;\n }\n if (touch === Touch.AsOld) {\n if (item === this._head) {\n return;\n }\n var next = item.next;\n var previous = item.previous;\n // Unlink the item\n if (item === this._tail) {\n // previous must be defined since item was not head but is tail\n // So there are more than on item in the map\n previous.next = void 0;\n this._tail = previous;\n }\n else {\n // Both next and previous are not undefined since item was neither head nor tail.\n next.previous = previous;\n previous.next = next;\n }\n // Insert the node at head\n item.previous = void 0;\n item.next = this._head;\n this._head.previous = item;\n this._head = item;\n }\n else if (touch === Touch.AsNew) {\n if (item === this._tail) {\n return;\n }\n var next = item.next;\n var previous = item.previous;\n // Unlink the item.\n if (item === this._head) {\n // next must be defined since item was not tail but is head\n // So there are more than on item in the map\n next.previous = void 0;\n this._head = next;\n }\n else {\n // Both next and previous are not undefined since item was neither head nor tail.\n next.previous = previous;\n previous.next = next;\n }\n item.next = void 0;\n item.previous = this._tail;\n this._tail.next = item;\n this._tail = item;\n }\n };\n LinkedMap.prototype.toJSON = function () {\n var data = [];\n this.forEach(function (value, key) {\n data.push([key, value]);\n });\n return data;\n };\n return LinkedMap;\n}());\nexport { LinkedMap };\nvar LRUCache = /** @class */ (function (_super) {\n __extends(LRUCache, _super);\n function LRUCache(limit, ratio) {\n if (ratio === void 0) { ratio = 1; }\n var _this = _super.call(this) || this;\n _this._limit = limit;\n _this._ratio = Math.min(Math.max(0, ratio), 1);\n return _this;\n }\n LRUCache.prototype.get = function (key) {\n return _super.prototype.get.call(this, key, Touch.AsNew);\n };\n LRUCache.prototype.set = function (key, value) {\n _super.prototype.set.call(this, key, value, Touch.AsNew);\n this.checkTrim();\n };\n LRUCache.prototype.checkTrim = function () {\n if (this.size > this._limit) {\n this.trimOld(Math.round(this._limit * this._ratio));\n }\n };\n return LRUCache;\n}(LinkedMap));\nexport { LRUCache };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport { isObject } from './types';\nexport function deepClone(obj) {\n if (!obj || typeof obj !== 'object') {\n return obj;\n }\n if (obj instanceof RegExp) {\n // See https://github.com/Microsoft/TypeScript/issues/10990\n return obj;\n }\n var result = Array.isArray(obj) ? [] : {};\n Object.keys(obj).forEach(function (key) {\n if (obj[key] && typeof obj[key] === 'object') {\n result[key] = deepClone(obj[key]);\n }\n else {\n result[key] = obj[key];\n }\n });\n return result;\n}\nexport function deepFreeze(obj) {\n if (!obj || typeof obj !== 'object') {\n return obj;\n }\n var stack = [obj];\n while (stack.length > 0) {\n var obj_1 = stack.shift();\n Object.freeze(obj_1);\n for (var key in obj_1) {\n if (_hasOwnProperty.call(obj_1, key)) {\n var prop = obj_1[key];\n if (typeof prop === 'object' && !Object.isFrozen(prop)) {\n stack.push(prop);\n }\n }\n }\n }\n return obj;\n}\nvar _hasOwnProperty = Object.prototype.hasOwnProperty;\n/**\n * Copies all properties of source into destination. The optional parameter \"overwrite\" allows to control\n * if existing properties on the destination should be overwritten or not. Defaults to true (overwrite).\n */\nexport function mixin(destination, source, overwrite) {\n if (overwrite === void 0) { overwrite = true; }\n if (!isObject(destination)) {\n return source;\n }\n if (isObject(source)) {\n Object.keys(source).forEach(function (key) {\n if (key in destination) {\n if (overwrite) {\n if (isObject(destination[key]) && isObject(source[key])) {\n mixin(destination[key], source[key], overwrite);\n }\n else {\n destination[key] = source[key];\n }\n }\n }\n else {\n destination[key] = source[key];\n }\n });\n }\n return destination;\n}\nexport function assign(destination) {\n var sources = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n sources[_i - 1] = arguments[_i];\n }\n sources.forEach(function (source) { return Object.keys(source).forEach(function (key) { return destination[key] = source[key]; }); });\n return destination;\n}\nexport function equals(one, other) {\n if (one === other) {\n return true;\n }\n if (one === null || one === undefined || other === null || other === undefined) {\n return false;\n }\n if (typeof one !== typeof other) {\n return false;\n }\n if (typeof one !== 'object') {\n return false;\n }\n if ((Array.isArray(one)) !== (Array.isArray(other))) {\n return false;\n }\n var i;\n var key;\n if (Array.isArray(one)) {\n if (one.length !== other.length) {\n return false;\n }\n for (i = 0; i < one.length; i++) {\n if (!equals(one[i], other[i])) {\n return false;\n }\n }\n }\n else {\n var oneKeys = [];\n for (key in one) {\n oneKeys.push(key);\n }\n oneKeys.sort();\n var otherKeys = [];\n for (key in other) {\n otherKeys.push(key);\n }\n otherKeys.sort();\n if (!equals(oneKeys, otherKeys)) {\n return false;\n }\n for (i = 0; i < oneKeys.length; i++) {\n if (!equals(one[oneKeys[i]], other[oneKeys[i]])) {\n return false;\n }\n }\n }\n return true;\n}\nexport function arrayToHash(array) {\n var result = {};\n for (var i = 0; i < array.length; ++i) {\n result[array[i]] = true;\n }\n return result;\n}\n/**\n * Given an array of strings, returns a function which, given a string\n * returns true or false whether the string is in that array.\n */\nexport function createKeywordMatcher(arr, caseInsensitive) {\n if (caseInsensitive === void 0) { caseInsensitive = false; }\n if (caseInsensitive) {\n arr = arr.map(function (x) { return x.toLowerCase(); });\n }\n var hash = arrayToHash(arr);\n if (caseInsensitive) {\n return function (word) {\n return hash[word.toLowerCase()] !== undefined && hash.hasOwnProperty(word.toLowerCase());\n };\n }\n else {\n return function (word) {\n return hash[word] !== undefined && hash.hasOwnProperty(word);\n };\n }\n}\nexport function getOrDefault(obj, fn, defaultValue) {\n if (defaultValue === void 0) { defaultValue = null; }\n var result = fn(obj);\n return typeof result === 'undefined' ? defaultValue : result;\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport { isWindows } from './platform';\nimport { startsWithIgnoreCase } from './strings';\n/**\n * The forward slash path separator.\n */\nexport var sep = '/';\n/**\n * The native path separator depending on the OS.\n */\nexport var nativeSep = isWindows ? '\\\\' : '/';\n/**\n * @returns the directory name of a path.\n */\nexport function dirname(path) {\n var idx = ~path.lastIndexOf('/') || ~path.lastIndexOf('\\\\');\n if (idx === 0) {\n return '.';\n }\n else if (~idx === 0) {\n return path[0];\n }\n else if (~idx === path.length - 1) {\n return dirname(path.substring(0, path.length - 1));\n }\n else {\n var res = path.substring(0, ~idx);\n if (isWindows && res[res.length - 1] === ':') {\n res += nativeSep; // make sure drive letters end with backslash\n }\n return res;\n }\n}\n/**\n * @returns the base name of a path.\n */\nexport function basename(path) {\n var idx = ~path.lastIndexOf('/') || ~path.lastIndexOf('\\\\');\n if (idx === 0) {\n return path;\n }\n else if (~idx === path.length - 1) {\n return basename(path.substring(0, path.length - 1));\n }\n else {\n return path.substr(~idx + 1);\n }\n}\n/**\n * @returns `.far` from `boo.far` or the empty string.\n */\nexport function extname(path) {\n path = basename(path);\n var idx = ~path.lastIndexOf('.');\n return idx ? path.substring(~idx) : '';\n}\nvar _posixBadPath = /(\\/\\.\\.?\\/)|(\\/\\.\\.?)$|^(\\.\\.?\\/)|(\\/\\/+)|(\\\\)/;\nvar _winBadPath = /(\\\\\\.\\.?\\\\)|(\\\\\\.\\.?)$|^(\\.\\.?\\\\)|(\\\\\\\\+)|(\\/)/;\nfunction _isNormal(path, win) {\n return win\n ? !_winBadPath.test(path)\n : !_posixBadPath.test(path);\n}\nexport function normalize(path, toOSPath) {\n if (path === null || path === void 0) {\n return path;\n }\n var len = path.length;\n if (len === 0) {\n return '.';\n }\n var wantsBackslash = isWindows && toOSPath;\n if (_isNormal(path, wantsBackslash)) {\n return path;\n }\n var sep = wantsBackslash ? '\\\\' : '/';\n var root = getRoot(path, sep);\n // skip the root-portion of the path\n var start = root.length;\n var skip = false;\n var res = '';\n for (var end = root.length; end <= len; end++) {\n // either at the end or at a path-separator character\n if (end === len || path.charCodeAt(end) === 47 /* Slash */ || path.charCodeAt(end) === 92 /* Backslash */) {\n if (streql(path, start, end, '..')) {\n // skip current and remove parent (if there is already something)\n var prev_start = res.lastIndexOf(sep);\n var prev_part = res.slice(prev_start + 1);\n if ((root || prev_part.length > 0) && prev_part !== '..') {\n res = prev_start === -1 ? '' : res.slice(0, prev_start);\n skip = true;\n }\n }\n else if (streql(path, start, end, '.') && (root || res || end < len - 1)) {\n // skip current (if there is already something or if there is more to come)\n skip = true;\n }\n if (!skip) {\n var part = path.slice(start, end);\n if (res !== '' && res[res.length - 1] !== sep) {\n res += sep;\n }\n res += part;\n }\n start = end + 1;\n skip = false;\n }\n }\n return root + res;\n}\nfunction streql(value, start, end, other) {\n return start + other.length === end && value.indexOf(other, start) === start;\n}\n/**\n * Computes the _root_ this path, like `getRoot('c:\\files') === c:\\`,\n * `getRoot('files:///files/path') === files:///`,\n * or `getRoot('\\\\server\\shares\\path') === \\\\server\\shares\\`\n */\nexport function getRoot(path, sep) {\n if (sep === void 0) { sep = '/'; }\n if (!path) {\n return '';\n }\n var len = path.length;\n var code = path.charCodeAt(0);\n if (code === 47 /* Slash */ || code === 92 /* Backslash */) {\n code = path.charCodeAt(1);\n if (code === 47 /* Slash */ || code === 92 /* Backslash */) {\n // UNC candidate \\\\localhost\\shares\\ddd\n // ^^^^^^^^^^^^^^^^^^^\n code = path.charCodeAt(2);\n if (code !== 47 /* Slash */ && code !== 92 /* Backslash */) {\n var pos_1 = 3;\n var start = pos_1;\n for (; pos_1 < len; pos_1++) {\n code = path.charCodeAt(pos_1);\n if (code === 47 /* Slash */ || code === 92 /* Backslash */) {\n break;\n }\n }\n code = path.charCodeAt(pos_1 + 1);\n if (start !== pos_1 && code !== 47 /* Slash */ && code !== 92 /* Backslash */) {\n pos_1 += 1;\n for (; pos_1 < len; pos_1++) {\n code = path.charCodeAt(pos_1);\n if (code === 47 /* Slash */ || code === 92 /* Backslash */) {\n return path.slice(0, pos_1 + 1) // consume this separator\n .replace(/[\\\\/]/g, sep);\n }\n }\n }\n }\n }\n // /user/far\n // ^\n return sep;\n }\n else if ((code >= 65 /* A */ && code <= 90 /* Z */) || (code >= 97 /* a */ && code <= 122 /* z */)) {\n // check for windows drive letter c:\\ or c:\n if (path.charCodeAt(1) === 58 /* Colon */) {\n code = path.charCodeAt(2);\n if (code === 47 /* Slash */ || code === 92 /* Backslash */) {\n // C:\\fff\n // ^^^\n return path.slice(0, 2) + sep;\n }\n else {\n // C:\n // ^^\n return path.slice(0, 2);\n }\n }\n }\n // check for URI\n // scheme://authority/path\n // ^^^^^^^^^^^^^^^^^^^\n var pos = path.indexOf('://');\n if (pos !== -1) {\n pos += 3; // 3 -> \"://\".length\n for (; pos < len; pos++) {\n code = path.charCodeAt(pos);\n if (code === 47 /* Slash */ || code === 92 /* Backslash */) {\n return path.slice(0, pos + 1); // consume this separator\n }\n }\n }\n return '';\n}\nexport var join = function () {\n // Not using a function with var-args because of how TS compiles\n // them to JS - it would result in 2*n runtime cost instead\n // of 1*n, where n is parts.length.\n var value = '';\n for (var i = 0; i < arguments.length; i++) {\n var part = arguments[i];\n if (i > 0) {\n // add the separater between two parts unless\n // there already is one\n var last = value.charCodeAt(value.length - 1);\n if (last !== 47 /* Slash */ && last !== 92 /* Backslash */) {\n var next = part.charCodeAt(0);\n if (next !== 47 /* Slash */ && next !== 92 /* Backslash */) {\n value += sep;\n }\n }\n }\n value += part;\n }\n return normalize(value);\n};\nexport function isEqualOrParent(path, candidate, ignoreCase, separator) {\n if (separator === void 0) { separator = nativeSep; }\n if (path === candidate) {\n return true;\n }\n if (!path || !candidate) {\n return false;\n }\n if (candidate.length > path.length) {\n return false;\n }\n if (ignoreCase) {\n var beginsWith = startsWithIgnoreCase(path, candidate);\n if (!beginsWith) {\n return false;\n }\n if (candidate.length === path.length) {\n return true; // same path, different casing\n }\n var sepOffset = candidate.length;\n if (candidate.charAt(candidate.length - 1) === separator) {\n sepOffset--; // adjust the expected sep offset in case our candidate already ends in separator character\n }\n return path.charAt(sepOffset) === separator;\n }\n if (candidate.charAt(candidate.length - 1) !== separator) {\n candidate += separator;\n }\n return path.indexOf(candidate) === 0;\n}\n/**\n * Adapted from Node's path.isAbsolute functions\n */\nexport function isAbsolute(path) {\n return isWindows ?\n isAbsolute_win32(path) :\n isAbsolute_posix(path);\n}\nexport function isAbsolute_win32(path) {\n if (!path) {\n return false;\n }\n var char0 = path.charCodeAt(0);\n if (char0 === 47 /* Slash */ || char0 === 92 /* Backslash */) {\n return true;\n }\n else if ((char0 >= 65 /* A */ && char0 <= 90 /* Z */) || (char0 >= 97 /* a */ && char0 <= 122 /* z */)) {\n if (path.length > 2 && path.charCodeAt(1) === 58 /* Colon */) {\n var char2 = path.charCodeAt(2);\n if (char2 === 47 /* Slash */ || char2 === 92 /* Backslash */) {\n return true;\n }\n }\n }\n return false;\n}\nexport function isAbsolute_posix(path) {\n return path && path.charCodeAt(0) === 47 /* Slash */;\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar _isWindows = false;\nvar _isMacintosh = false;\nvar _isLinux = false;\nvar _isNative = false;\nvar _isWeb = false;\nvar _locale = undefined;\nvar _language = undefined;\nvar _translationsConfigFile = undefined;\nexport var LANGUAGE_DEFAULT = 'en';\n// OS detection\nif (typeof process === 'object' && typeof process.nextTick === 'function' && typeof process.platform === 'string') {\n _isWindows = (process.platform === 'win32');\n _isMacintosh = (process.platform === 'darwin');\n _isLinux = (process.platform === 'linux');\n _locale = LANGUAGE_DEFAULT;\n _language = LANGUAGE_DEFAULT;\n var rawNlsConfig = process.env['VSCODE_NLS_CONFIG'];\n if (rawNlsConfig) {\n try {\n var nlsConfig = JSON.parse(rawNlsConfig);\n var resolved = nlsConfig.availableLanguages['*'];\n _locale = nlsConfig.locale;\n // VSCode's default language is 'en'\n _language = resolved ? resolved : LANGUAGE_DEFAULT;\n _translationsConfigFile = nlsConfig._translationsConfigFile;\n }\n catch (e) {\n }\n }\n _isNative = true;\n}\nelse if (typeof navigator === 'object') {\n var userAgent = navigator.userAgent;\n _isWindows = userAgent.indexOf('Windows') >= 0;\n _isMacintosh = userAgent.indexOf('Macintosh') >= 0;\n _isLinux = userAgent.indexOf('Linux') >= 0;\n _isWeb = true;\n _locale = navigator.language;\n _language = _locale;\n}\nexport var Platform;\n(function (Platform) {\n Platform[Platform[\"Web\"] = 0] = \"Web\";\n Platform[Platform[\"Mac\"] = 1] = \"Mac\";\n Platform[Platform[\"Linux\"] = 2] = \"Linux\";\n Platform[Platform[\"Windows\"] = 3] = \"Windows\";\n})(Platform || (Platform = {}));\nvar _platform = Platform.Web;\nif (_isNative) {\n if (_isMacintosh) {\n _platform = Platform.Mac;\n }\n else if (_isWindows) {\n _platform = Platform.Windows;\n }\n else if (_isLinux) {\n _platform = Platform.Linux;\n }\n}\nexport var isWindows = _isWindows;\nexport var isMacintosh = _isMacintosh;\nexport var isLinux = _isLinux;\nexport var isNative = _isNative;\nexport var isWeb = _isWeb;\nvar _globals = (typeof self === 'object' ? self : typeof global === 'object' ? global : {});\nexport var globals = _globals;\nvar _setImmediate = null;\nexport function setImmediate(callback) {\n if (_setImmediate === null) {\n if (globals.setImmediate) {\n _setImmediate = globals.setImmediate.bind(globals);\n }\n else if (typeof process !== 'undefined' && typeof process.nextTick === 'function') {\n _setImmediate = process.nextTick.bind(process);\n }\n else {\n _setImmediate = globals.setTimeout.bind(globals);\n }\n }\n return _setImmediate(callback);\n}\nexport var OS = (_isMacintosh ? 2 /* Macintosh */ : (_isWindows ? 1 /* Windows */ : 3 /* Linux */));\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { Disposable } from './lifecycle';\nimport { Emitter } from './event';\nexport var ScrollbarVisibility;\n(function (ScrollbarVisibility) {\n ScrollbarVisibility[ScrollbarVisibility[\"Auto\"] = 1] = \"Auto\";\n ScrollbarVisibility[ScrollbarVisibility[\"Hidden\"] = 2] = \"Hidden\";\n ScrollbarVisibility[ScrollbarVisibility[\"Visible\"] = 3] = \"Visible\";\n})(ScrollbarVisibility || (ScrollbarVisibility = {}));\nvar ScrollState = /** @class */ (function () {\n function ScrollState(width, scrollWidth, scrollLeft, height, scrollHeight, scrollTop) {\n width = width | 0;\n scrollWidth = scrollWidth | 0;\n scrollLeft = scrollLeft | 0;\n height = height | 0;\n scrollHeight = scrollHeight | 0;\n scrollTop = scrollTop | 0;\n if (width < 0) {\n width = 0;\n }\n if (scrollLeft + width > scrollWidth) {\n scrollLeft = scrollWidth - width;\n }\n if (scrollLeft < 0) {\n scrollLeft = 0;\n }\n if (height < 0) {\n height = 0;\n }\n if (scrollTop + height > scrollHeight) {\n scrollTop = scrollHeight - height;\n }\n if (scrollTop < 0) {\n scrollTop = 0;\n }\n this.width = width;\n this.scrollWidth = scrollWidth;\n this.scrollLeft = scrollLeft;\n this.height = height;\n this.scrollHeight = scrollHeight;\n this.scrollTop = scrollTop;\n }\n ScrollState.prototype.equals = function (other) {\n return (this.width === other.width\n && this.scrollWidth === other.scrollWidth\n && this.scrollLeft === other.scrollLeft\n && this.height === other.height\n && this.scrollHeight === other.scrollHeight\n && this.scrollTop === other.scrollTop);\n };\n ScrollState.prototype.withScrollDimensions = function (update) {\n return new ScrollState((typeof update.width !== 'undefined' ? update.width : this.width), (typeof update.scrollWidth !== 'undefined' ? update.scrollWidth : this.scrollWidth), this.scrollLeft, (typeof update.height !== 'undefined' ? update.height : this.height), (typeof update.scrollHeight !== 'undefined' ? update.scrollHeight : this.scrollHeight), this.scrollTop);\n };\n ScrollState.prototype.withScrollPosition = function (update) {\n return new ScrollState(this.width, this.scrollWidth, (typeof update.scrollLeft !== 'undefined' ? update.scrollLeft : this.scrollLeft), this.height, this.scrollHeight, (typeof update.scrollTop !== 'undefined' ? update.scrollTop : this.scrollTop));\n };\n ScrollState.prototype.createScrollEvent = function (previous) {\n var widthChanged = (this.width !== previous.width);\n var scrollWidthChanged = (this.scrollWidth !== previous.scrollWidth);\n var scrollLeftChanged = (this.scrollLeft !== previous.scrollLeft);\n var heightChanged = (this.height !== previous.height);\n var scrollHeightChanged = (this.scrollHeight !== previous.scrollHeight);\n var scrollTopChanged = (this.scrollTop !== previous.scrollTop);\n return {\n width: this.width,\n scrollWidth: this.scrollWidth,\n scrollLeft: this.scrollLeft,\n height: this.height,\n scrollHeight: this.scrollHeight,\n scrollTop: this.scrollTop,\n widthChanged: widthChanged,\n scrollWidthChanged: scrollWidthChanged,\n scrollLeftChanged: scrollLeftChanged,\n heightChanged: heightChanged,\n scrollHeightChanged: scrollHeightChanged,\n scrollTopChanged: scrollTopChanged,\n };\n };\n return ScrollState;\n}());\nexport { ScrollState };\nvar Scrollable = /** @class */ (function (_super) {\n __extends(Scrollable, _super);\n function Scrollable(smoothScrollDuration, scheduleAtNextAnimationFrame) {\n var _this = _super.call(this) || this;\n _this._onScroll = _this._register(new Emitter());\n _this.onScroll = _this._onScroll.event;\n _this._smoothScrollDuration = smoothScrollDuration;\n _this._scheduleAtNextAnimationFrame = scheduleAtNextAnimationFrame;\n _this._state = new ScrollState(0, 0, 0, 0, 0, 0);\n _this._smoothScrolling = null;\n return _this;\n }\n Scrollable.prototype.dispose = function () {\n if (this._smoothScrolling) {\n this._smoothScrolling.dispose();\n this._smoothScrolling = null;\n }\n _super.prototype.dispose.call(this);\n };\n Scrollable.prototype.setSmoothScrollDuration = function (smoothScrollDuration) {\n this._smoothScrollDuration = smoothScrollDuration;\n };\n Scrollable.prototype.validateScrollPosition = function (scrollPosition) {\n return this._state.withScrollPosition(scrollPosition);\n };\n Scrollable.prototype.getScrollDimensions = function () {\n return this._state;\n };\n Scrollable.prototype.setScrollDimensions = function (dimensions) {\n var newState = this._state.withScrollDimensions(dimensions);\n this._setState(newState);\n // Validate outstanding animated scroll position target\n if (this._smoothScrolling) {\n this._smoothScrolling.acceptScrollDimensions(this._state);\n }\n };\n /**\n * Returns the final scroll position that the instance will have once the smooth scroll animation concludes.\n * If no scroll animation is occurring, it will return the current scroll position instead.\n */\n Scrollable.prototype.getFutureScrollPosition = function () {\n if (this._smoothScrolling) {\n return this._smoothScrolling.to;\n }\n return this._state;\n };\n /**\n * Returns the current scroll position.\n * Note: This result might be an intermediate scroll position, as there might be an ongoing smooth scroll animation.\n */\n Scrollable.prototype.getCurrentScrollPosition = function () {\n return this._state;\n };\n Scrollable.prototype.setScrollPositionNow = function (update) {\n // no smooth scrolling requested\n var newState = this._state.withScrollPosition(update);\n // Terminate any outstanding smooth scrolling\n if (this._smoothScrolling) {\n this._smoothScrolling.dispose();\n this._smoothScrolling = null;\n }\n this._setState(newState);\n };\n Scrollable.prototype.setScrollPositionSmooth = function (update) {\n var _this = this;\n if (this._smoothScrollDuration === 0) {\n // Smooth scrolling not supported.\n return this.setScrollPositionNow(update);\n }\n if (this._smoothScrolling) {\n // Combine our pending scrollLeft/scrollTop with incoming scrollLeft/scrollTop\n update = {\n scrollLeft: (typeof update.scrollLeft === 'undefined' ? this._smoothScrolling.to.scrollLeft : update.scrollLeft),\n scrollTop: (typeof update.scrollTop === 'undefined' ? this._smoothScrolling.to.scrollTop : update.scrollTop)\n };\n // Validate `update`\n var validTarget = this._state.withScrollPosition(update);\n if (this._smoothScrolling.to.scrollLeft === validTarget.scrollLeft && this._smoothScrolling.to.scrollTop === validTarget.scrollTop) {\n // No need to interrupt or extend the current animation since we're going to the same place\n return;\n }\n var newSmoothScrolling = this._smoothScrolling.combine(this._state, validTarget, this._smoothScrollDuration);\n this._smoothScrolling.dispose();\n this._smoothScrolling = newSmoothScrolling;\n }\n else {\n // Validate `update`\n var validTarget = this._state.withScrollPosition(update);\n this._smoothScrolling = SmoothScrollingOperation.start(this._state, validTarget, this._smoothScrollDuration);\n }\n // Begin smooth scrolling animation\n this._smoothScrolling.animationFrameDisposable = this._scheduleAtNextAnimationFrame(function () {\n if (!_this._smoothScrolling) {\n return;\n }\n _this._smoothScrolling.animationFrameDisposable = null;\n _this._performSmoothScrolling();\n });\n };\n Scrollable.prototype._performSmoothScrolling = function () {\n var _this = this;\n var update = this._smoothScrolling.tick();\n var newState = this._state.withScrollPosition(update);\n this._setState(newState);\n if (update.isDone) {\n this._smoothScrolling.dispose();\n this._smoothScrolling = null;\n return;\n }\n // Continue smooth scrolling animation\n this._smoothScrolling.animationFrameDisposable = this._scheduleAtNextAnimationFrame(function () {\n if (!_this._smoothScrolling) {\n return;\n }\n _this._smoothScrolling.animationFrameDisposable = null;\n _this._performSmoothScrolling();\n });\n };\n Scrollable.prototype._setState = function (newState) {\n var oldState = this._state;\n if (oldState.equals(newState)) {\n // no change\n return;\n }\n this._state = newState;\n this._onScroll.fire(this._state.createScrollEvent(oldState));\n };\n return Scrollable;\n}(Disposable));\nexport { Scrollable };\nvar SmoothScrollingUpdate = /** @class */ (function () {\n function SmoothScrollingUpdate(scrollLeft, scrollTop, isDone) {\n this.scrollLeft = scrollLeft;\n this.scrollTop = scrollTop;\n this.isDone = isDone;\n }\n return SmoothScrollingUpdate;\n}());\nexport { SmoothScrollingUpdate };\nfunction createEaseOutCubic(from, to) {\n var delta = to - from;\n return function (completion) {\n return from + delta * easeOutCubic(completion);\n };\n}\nfunction createComposed(a, b, cut) {\n return function (completion) {\n if (completion < cut) {\n return a(completion / cut);\n }\n return b((completion - cut) / (1 - cut));\n };\n}\nvar SmoothScrollingOperation = /** @class */ (function () {\n function SmoothScrollingOperation(from, to, startTime, duration) {\n this.from = from;\n this.to = to;\n this.duration = duration;\n this._startTime = startTime;\n this.animationFrameDisposable = null;\n this._initAnimations();\n }\n SmoothScrollingOperation.prototype._initAnimations = function () {\n this.scrollLeft = this._initAnimation(this.from.scrollLeft, this.to.scrollLeft, this.to.width);\n this.scrollTop = this._initAnimation(this.from.scrollTop, this.to.scrollTop, this.to.height);\n };\n SmoothScrollingOperation.prototype._initAnimation = function (from, to, viewportSize) {\n var delta = Math.abs(from - to);\n if (delta > 2.5 * viewportSize) {\n var stop1 = void 0, stop2 = void 0;\n if (from < to) {\n // scroll to 75% of the viewportSize\n stop1 = from + 0.75 * viewportSize;\n stop2 = to - 0.75 * viewportSize;\n }\n else {\n stop1 = from - 0.75 * viewportSize;\n stop2 = to + 0.75 * viewportSize;\n }\n return createComposed(createEaseOutCubic(from, stop1), createEaseOutCubic(stop2, to), 0.33);\n }\n return createEaseOutCubic(from, to);\n };\n SmoothScrollingOperation.prototype.dispose = function () {\n if (this.animationFrameDisposable !== null) {\n this.animationFrameDisposable.dispose();\n this.animationFrameDisposable = null;\n }\n };\n SmoothScrollingOperation.prototype.acceptScrollDimensions = function (state) {\n this.to = state.withScrollPosition(this.to);\n this._initAnimations();\n };\n SmoothScrollingOperation.prototype.tick = function () {\n return this._tick(Date.now());\n };\n SmoothScrollingOperation.prototype._tick = function (now) {\n var completion = (now - this._startTime) / this.duration;\n if (completion < 1) {\n var newScrollLeft = this.scrollLeft(completion);\n var newScrollTop = this.scrollTop(completion);\n return new SmoothScrollingUpdate(newScrollLeft, newScrollTop, false);\n }\n return new SmoothScrollingUpdate(this.to.scrollLeft, this.to.scrollTop, true);\n };\n SmoothScrollingOperation.prototype.combine = function (from, to, duration) {\n return SmoothScrollingOperation.start(from, to, duration);\n };\n SmoothScrollingOperation.start = function (from, to, duration) {\n // +10 / -10 : pretend the animation already started for a quicker response to a scroll request\n duration = duration + 10;\n var startTime = Date.now() - 10;\n return new SmoothScrollingOperation(from, to, startTime, duration);\n };\n return SmoothScrollingOperation;\n}());\nexport { SmoothScrollingOperation };\nfunction easeInCubic(t) {\n return Math.pow(t, 3);\n}\nfunction easeOutCubic(t) {\n return 1 - easeInCubic(1 - t);\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\n/**\n * The empty string.\n */\nexport var empty = '';\nexport function isFalsyOrWhitespace(str) {\n if (!str || typeof str !== 'string') {\n return true;\n }\n return str.trim().length === 0;\n}\n/**\n * @returns the provided number with the given number of preceding zeros.\n */\nexport function pad(n, l, char) {\n if (char === void 0) { char = '0'; }\n var str = '' + n;\n var r = [str];\n for (var i = str.length; i < l; i++) {\n r.push(char);\n }\n return r.reverse().join('');\n}\nvar _formatRegexp = /{(\\d+)}/g;\n/**\n * Helper to produce a string with a variable number of arguments. Insert variable segments\n * into the string using the {n} notation where N is the index of the argument following the string.\n * @param value string to which formatting is applied\n * @param args replacements for {n}-entries\n */\nexport function format(value) {\n var args = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n args[_i - 1] = arguments[_i];\n }\n if (args.length === 0) {\n return value;\n }\n return value.replace(_formatRegexp, function (match, group) {\n var idx = parseInt(group, 10);\n return isNaN(idx) || idx < 0 || idx >= args.length ?\n match :\n args[idx];\n });\n}\n/**\n * Converts HTML characters inside the string to use entities instead. Makes the string safe from\n * being used e.g. in HTMLElement.innerHTML.\n */\nexport function escape(html) {\n return html.replace(/[<|>|&]/g, function (match) {\n switch (match) {\n case '<': return '<';\n case '>': return '>';\n case '&': return '&';\n default: return match;\n }\n });\n}\n/**\n * Escapes regular expression characters in a given string\n */\nexport function escapeRegExpCharacters(value) {\n return value.replace(/[\\-\\\\\\{\\}\\*\\+\\?\\|\\^\\$\\.\\[\\]\\(\\)\\#]/g, '\\\\$&');\n}\n/**\n * Removes all occurrences of needle from the beginning and end of haystack.\n * @param haystack string to trim\n * @param needle the thing to trim (default is a blank)\n */\nexport function trim(haystack, needle) {\n if (needle === void 0) { needle = ' '; }\n var trimmed = ltrim(haystack, needle);\n return rtrim(trimmed, needle);\n}\n/**\n * Removes all occurrences of needle from the beginning of haystack.\n * @param haystack string to trim\n * @param needle the thing to trim\n */\nexport function ltrim(haystack, needle) {\n if (!haystack || !needle) {\n return haystack;\n }\n var needleLen = needle.length;\n if (needleLen === 0 || haystack.length === 0) {\n return haystack;\n }\n var offset = 0, idx = -1;\n while ((idx = haystack.indexOf(needle, offset)) === offset) {\n offset = offset + needleLen;\n }\n return haystack.substring(offset);\n}\n/**\n * Removes all occurrences of needle from the end of haystack.\n * @param haystack string to trim\n * @param needle the thing to trim\n */\nexport function rtrim(haystack, needle) {\n if (!haystack || !needle) {\n return haystack;\n }\n var needleLen = needle.length, haystackLen = haystack.length;\n if (needleLen === 0 || haystackLen === 0) {\n return haystack;\n }\n var offset = haystackLen, idx = -1;\n while (true) {\n idx = haystack.lastIndexOf(needle, offset - 1);\n if (idx === -1 || idx + needleLen !== offset) {\n break;\n }\n if (idx === 0) {\n return '';\n }\n offset = idx;\n }\n return haystack.substring(0, offset);\n}\nexport function convertSimple2RegExpPattern(pattern) {\n return pattern.replace(/[\\-\\\\\\{\\}\\+\\?\\|\\^\\$\\.\\,\\[\\]\\(\\)\\#\\s]/g, '\\\\$&').replace(/[\\*]/g, '.*');\n}\n/**\n * Determines if haystack starts with needle.\n */\nexport function startsWith(haystack, needle) {\n if (haystack.length < needle.length) {\n return false;\n }\n if (haystack === needle) {\n return true;\n }\n for (var i = 0; i < needle.length; i++) {\n if (haystack[i] !== needle[i]) {\n return false;\n }\n }\n return true;\n}\n/**\n * Determines if haystack ends with needle.\n */\nexport function endsWith(haystack, needle) {\n var diff = haystack.length - needle.length;\n if (diff > 0) {\n return haystack.indexOf(needle, diff) === diff;\n }\n else if (diff === 0) {\n return haystack === needle;\n }\n else {\n return false;\n }\n}\nexport function createRegExp(searchString, isRegex, options) {\n if (options === void 0) { options = {}; }\n if (!searchString) {\n throw new Error('Cannot create regex from empty string');\n }\n if (!isRegex) {\n searchString = escapeRegExpCharacters(searchString);\n }\n if (options.wholeWord) {\n if (!/\\B/.test(searchString.charAt(0))) {\n searchString = '\\\\b' + searchString;\n }\n if (!/\\B/.test(searchString.charAt(searchString.length - 1))) {\n searchString = searchString + '\\\\b';\n }\n }\n var modifiers = '';\n if (options.global) {\n modifiers += 'g';\n }\n if (!options.matchCase) {\n modifiers += 'i';\n }\n if (options.multiline) {\n modifiers += 'm';\n }\n return new RegExp(searchString, modifiers);\n}\nexport function regExpLeadsToEndlessLoop(regexp) {\n // Exit early if it's one of these special cases which are meant to match\n // against an empty string\n if (regexp.source === '^' || regexp.source === '^$' || regexp.source === '$' || regexp.source === '^\\\\s*$') {\n return false;\n }\n // We check against an empty string. If the regular expression doesn't advance\n // (e.g. ends in an endless loop) it will match an empty string.\n var match = regexp.exec('');\n return (match && regexp.lastIndex === 0);\n}\n/**\n * Returns first index of the string that is not whitespace.\n * If string is empty or contains only whitespaces, returns -1\n */\nexport function firstNonWhitespaceIndex(str) {\n for (var i = 0, len = str.length; i < len; i++) {\n var chCode = str.charCodeAt(i);\n if (chCode !== 32 /* Space */ && chCode !== 9 /* Tab */) {\n return i;\n }\n }\n return -1;\n}\n/**\n * Returns the leading whitespace of the string.\n * If the string contains only whitespaces, returns entire string\n */\nexport function getLeadingWhitespace(str, start, end) {\n if (start === void 0) { start = 0; }\n if (end === void 0) { end = str.length; }\n for (var i = start; i < end; i++) {\n var chCode = str.charCodeAt(i);\n if (chCode !== 32 /* Space */ && chCode !== 9 /* Tab */) {\n return str.substring(start, i);\n }\n }\n return str.substring(start, end);\n}\n/**\n * Returns last index of the string that is not whitespace.\n * If string is empty or contains only whitespaces, returns -1\n */\nexport function lastNonWhitespaceIndex(str, startIndex) {\n if (startIndex === void 0) { startIndex = str.length - 1; }\n for (var i = startIndex; i >= 0; i--) {\n var chCode = str.charCodeAt(i);\n if (chCode !== 32 /* Space */ && chCode !== 9 /* Tab */) {\n return i;\n }\n }\n return -1;\n}\nexport function compare(a, b) {\n if (a < b) {\n return -1;\n }\n else if (a > b) {\n return 1;\n }\n else {\n return 0;\n }\n}\nexport function compareIgnoreCase(a, b) {\n var len = Math.min(a.length, b.length);\n for (var i = 0; i < len; i++) {\n var codeA = a.charCodeAt(i);\n var codeB = b.charCodeAt(i);\n if (codeA === codeB) {\n // equal\n continue;\n }\n if (isUpperAsciiLetter(codeA)) {\n codeA += 32;\n }\n if (isUpperAsciiLetter(codeB)) {\n codeB += 32;\n }\n var diff = codeA - codeB;\n if (diff === 0) {\n // equal -> ignoreCase\n continue;\n }\n else if (isLowerAsciiLetter(codeA) && isLowerAsciiLetter(codeB)) {\n //\n return diff;\n }\n else {\n return compare(a.toLowerCase(), b.toLowerCase());\n }\n }\n if (a.length < b.length) {\n return -1;\n }\n else if (a.length > b.length) {\n return 1;\n }\n else {\n return 0;\n }\n}\nexport function isLowerAsciiLetter(code) {\n return code >= 97 /* a */ && code <= 122 /* z */;\n}\nexport function isUpperAsciiLetter(code) {\n return code >= 65 /* A */ && code <= 90 /* Z */;\n}\nfunction isAsciiLetter(code) {\n return isLowerAsciiLetter(code) || isUpperAsciiLetter(code);\n}\nexport function equalsIgnoreCase(a, b) {\n var len1 = a ? a.length : 0;\n var len2 = b ? b.length : 0;\n if (len1 !== len2) {\n return false;\n }\n return doEqualsIgnoreCase(a, b);\n}\nfunction doEqualsIgnoreCase(a, b, stopAt) {\n if (stopAt === void 0) { stopAt = a.length; }\n if (typeof a !== 'string' || typeof b !== 'string') {\n return false;\n }\n for (var i = 0; i < stopAt; i++) {\n var codeA = a.charCodeAt(i);\n var codeB = b.charCodeAt(i);\n if (codeA === codeB) {\n continue;\n }\n // a-z A-Z\n if (isAsciiLetter(codeA) && isAsciiLetter(codeB)) {\n var diff = Math.abs(codeA - codeB);\n if (diff !== 0 && diff !== 32) {\n return false;\n }\n }\n // Any other charcode\n else {\n if (String.fromCharCode(codeA).toLowerCase() !== String.fromCharCode(codeB).toLowerCase()) {\n return false;\n }\n }\n }\n return true;\n}\nexport function startsWithIgnoreCase(str, candidate) {\n var candidateLength = candidate.length;\n if (candidate.length > str.length) {\n return false;\n }\n return doEqualsIgnoreCase(str, candidate, candidateLength);\n}\n/**\n * @returns the length of the common prefix of the two strings.\n */\nexport function commonPrefixLength(a, b) {\n var i, len = Math.min(a.length, b.length);\n for (i = 0; i < len; i++) {\n if (a.charCodeAt(i) !== b.charCodeAt(i)) {\n return i;\n }\n }\n return len;\n}\n/**\n * @returns the length of the common suffix of the two strings.\n */\nexport function commonSuffixLength(a, b) {\n var i, len = Math.min(a.length, b.length);\n var aLastIndex = a.length - 1;\n var bLastIndex = b.length - 1;\n for (i = 0; i < len; i++) {\n if (a.charCodeAt(aLastIndex - i) !== b.charCodeAt(bLastIndex - i)) {\n return i;\n }\n }\n return len;\n}\n// --- unicode\n// http://en.wikipedia.org/wiki/Surrogate_pair\n// Returns the code point starting at a specified index in a string\n// Code points U+0000 to U+D7FF and U+E000 to U+FFFF are represented on a single character\n// Code points U+10000 to U+10FFFF are represented on two consecutive characters\n//export function getUnicodePoint(str:string, index:number, len:number):number {\n//\tlet chrCode = str.charCodeAt(index);\n//\tif (0xD800 <= chrCode && chrCode <= 0xDBFF && index + 1 < len) {\n//\t\tlet nextChrCode = str.charCodeAt(index + 1);\n//\t\tif (0xDC00 <= nextChrCode && nextChrCode <= 0xDFFF) {\n//\t\t\treturn (chrCode - 0xD800) << 10 + (nextChrCode - 0xDC00) + 0x10000;\n//\t\t}\n//\t}\n//\treturn chrCode;\n//}\nexport function isHighSurrogate(charCode) {\n return (0xD800 <= charCode && charCode <= 0xDBFF);\n}\nexport function isLowSurrogate(charCode) {\n return (0xDC00 <= charCode && charCode <= 0xDFFF);\n}\n/**\n * Generated using https://github.com/alexandrudima/unicode-utils/blob/master/generate-rtl-test.js\n */\nvar CONTAINS_RTL = /(?:[\\u05BE\\u05C0\\u05C3\\u05C6\\u05D0-\\u05F4\\u0608\\u060B\\u060D\\u061B-\\u064A\\u066D-\\u066F\\u0671-\\u06D5\\u06E5\\u06E6\\u06EE\\u06EF\\u06FA-\\u0710\\u0712-\\u072F\\u074D-\\u07A5\\u07B1-\\u07EA\\u07F4\\u07F5\\u07FA-\\u0815\\u081A\\u0824\\u0828\\u0830-\\u0858\\u085E-\\u08BD\\u200F\\uFB1D\\uFB1F-\\uFB28\\uFB2A-\\uFD3D\\uFD50-\\uFDFC\\uFE70-\\uFEFC]|\\uD802[\\uDC00-\\uDD1B\\uDD20-\\uDE00\\uDE10-\\uDE33\\uDE40-\\uDEE4\\uDEEB-\\uDF35\\uDF40-\\uDFFF]|\\uD803[\\uDC00-\\uDCFF]|\\uD83A[\\uDC00-\\uDCCF\\uDD00-\\uDD43\\uDD50-\\uDFFF]|\\uD83B[\\uDC00-\\uDEBB])/;\n/**\n * Returns true if `str` contains any Unicode character that is classified as \"R\" or \"AL\".\n */\nexport function containsRTL(str) {\n return CONTAINS_RTL.test(str);\n}\n/**\n * Generated using https://github.com/alexandrudima/unicode-utils/blob/master/generate-emoji-test.js\n */\nvar CONTAINS_EMOJI = /(?:[\\u231A\\u231B\\u23F0\\u23F3\\u2600-\\u27BF\\u2B50\\u2B55]|\\uD83C[\\uDDE6-\\uDDFF\\uDF00-\\uDFFF]|\\uD83D[\\uDC00-\\uDE4F\\uDE80-\\uDEF8]|\\uD83E[\\uDD00-\\uDDE6])/;\nexport function containsEmoji(str) {\n return CONTAINS_EMOJI.test(str);\n}\nvar IS_BASIC_ASCII = /^[\\t\\n\\r\\x20-\\x7E]*$/;\n/**\n * Returns true if `str` contains only basic ASCII characters in the range 32 - 126 (including 32 and 126) or \\n, \\r, \\t\n */\nexport function isBasicASCII(str) {\n return IS_BASIC_ASCII.test(str);\n}\nexport function containsFullWidthCharacter(str) {\n for (var i = 0, len = str.length; i < len; i++) {\n if (isFullWidthCharacter(str.charCodeAt(i))) {\n return true;\n }\n }\n return false;\n}\nexport function isFullWidthCharacter(charCode) {\n // Do a cheap trick to better support wrapping of wide characters, treat them as 2 columns\n // http://jrgraphix.net/research/unicode_blocks.php\n // 2E80 — 2EFF CJK Radicals Supplement\n // 2F00 — 2FDF Kangxi Radicals\n // 2FF0 — 2FFF Ideographic Description Characters\n // 3000 — 303F CJK Symbols and Punctuation\n // 3040 — 309F Hiragana\n // 30A0 — 30FF Katakana\n // 3100 — 312F Bopomofo\n // 3130 — 318F Hangul Compatibility Jamo\n // 3190 — 319F Kanbun\n // 31A0 — 31BF Bopomofo Extended\n // 31F0 — 31FF Katakana Phonetic Extensions\n // 3200 — 32FF Enclosed CJK Letters and Months\n // 3300 — 33FF CJK Compatibility\n // 3400 — 4DBF CJK Unified Ideographs Extension A\n // 4DC0 — 4DFF Yijing Hexagram Symbols\n // 4E00 — 9FFF CJK Unified Ideographs\n // A000 — A48F Yi Syllables\n // A490 — A4CF Yi Radicals\n // AC00 — D7AF Hangul Syllables\n // [IGNORE] D800 — DB7F High Surrogates\n // [IGNORE] DB80 — DBFF High Private Use Surrogates\n // [IGNORE] DC00 — DFFF Low Surrogates\n // [IGNORE] E000 — F8FF Private Use Area\n // F900 — FAFF CJK Compatibility Ideographs\n // [IGNORE] FB00 — FB4F Alphabetic Presentation Forms\n // [IGNORE] FB50 — FDFF Arabic Presentation Forms-A\n // [IGNORE] FE00 — FE0F Variation Selectors\n // [IGNORE] FE20 — FE2F Combining Half Marks\n // [IGNORE] FE30 — FE4F CJK Compatibility Forms\n // [IGNORE] FE50 — FE6F Small Form Variants\n // [IGNORE] FE70 — FEFF Arabic Presentation Forms-B\n // FF00 — FFEF Halfwidth and Fullwidth Forms\n // [https://en.wikipedia.org/wiki/Halfwidth_and_fullwidth_forms]\n // of which FF01 - FF5E fullwidth ASCII of 21 to 7E\n // [IGNORE] and FF65 - FFDC halfwidth of Katakana and Hangul\n // [IGNORE] FFF0 — FFFF Specials\n charCode = +charCode; // @perf\n return ((charCode >= 0x2E80 && charCode <= 0xD7AF)\n || (charCode >= 0xF900 && charCode <= 0xFAFF)\n || (charCode >= 0xFF01 && charCode <= 0xFF5E));\n}\n// -- UTF-8 BOM\nexport var UTF8_BOM_CHARACTER = String.fromCharCode(65279 /* UTF8_BOM */);\nexport function startsWithUTF8BOM(str) {\n return (str && str.length > 0 && str.charCodeAt(0) === 65279 /* UTF8_BOM */);\n}\nexport function safeBtoa(str) {\n return btoa(encodeURIComponent(str)); // we use encodeURIComponent because btoa fails for non Latin 1 values\n}\nexport function repeat(s, count) {\n var result = '';\n for (var i = 0; i < count; i++) {\n result += s;\n }\n return result;\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar _typeof = {\n number: 'number',\n string: 'string',\n undefined: 'undefined',\n object: 'object',\n function: 'function'\n};\n/**\n * @returns whether the provided parameter is a JavaScript Array or not.\n */\nexport function isArray(array) {\n if (Array.isArray) {\n return Array.isArray(array);\n }\n if (array && typeof (array.length) === _typeof.number && array.constructor === Array) {\n return true;\n }\n return false;\n}\n/**\n * @returns whether the provided parameter is a JavaScript String or not.\n */\nexport function isString(str) {\n if (typeof (str) === _typeof.string || str instanceof String) {\n return true;\n }\n return false;\n}\n/**\n *\n * @returns whether the provided parameter is of type `object` but **not**\n *\t`null`, an `array`, a `regexp`, nor a `date`.\n */\nexport function isObject(obj) {\n // The method can't do a type cast since there are type (like strings) which\n // are subclasses of any put not positvely matched by the function. Hence type\n // narrowing results in wrong results.\n return typeof obj === _typeof.object\n && obj !== null\n && !Array.isArray(obj)\n && !(obj instanceof RegExp)\n && !(obj instanceof Date);\n}\n/**\n * In **contrast** to just checking `typeof` this will return `false` for `NaN`.\n * @returns whether the provided parameter is a JavaScript Number or not.\n */\nexport function isNumber(obj) {\n if ((typeof (obj) === _typeof.number || obj instanceof Number) && !isNaN(obj)) {\n return true;\n }\n return false;\n}\n/**\n * @returns whether the provided parameter is a JavaScript Boolean or not.\n */\nexport function isBoolean(obj) {\n return obj === true || obj === false;\n}\n/**\n * @returns whether the provided parameter is undefined.\n */\nexport function isUndefined(obj) {\n return typeof (obj) === _typeof.undefined;\n}\n/**\n * @returns whether the provided parameter is undefined or null.\n */\nexport function isUndefinedOrNull(obj) {\n return isUndefined(obj) || obj === null;\n}\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\n/**\n * @returns whether the provided parameter is an empty JavaScript Object or not.\n */\nexport function isEmptyObject(obj) {\n if (!isObject(obj)) {\n return false;\n }\n for (var key in obj) {\n if (hasOwnProperty.call(obj, key)) {\n return false;\n }\n }\n return true;\n}\n/**\n * @returns whether the provided parameter is a JavaScript Function or not.\n */\nexport function isFunction(obj) {\n return typeof obj === _typeof.function;\n}\nexport function validateConstraints(args, constraints) {\n var len = Math.min(args.length, constraints.length);\n for (var i = 0; i < len; i++) {\n validateConstraint(args[i], constraints[i]);\n }\n}\nexport function validateConstraint(arg, constraint) {\n if (isString(constraint)) {\n if (typeof arg !== constraint) {\n throw new Error(\"argument does not match constraint: typeof \" + constraint);\n }\n }\n else if (isFunction(constraint)) {\n if (arg instanceof constraint) {\n return;\n }\n if (!isUndefinedOrNull(arg) && arg.constructor === constraint) {\n return;\n }\n if (constraint.length === 1 && constraint.call(undefined, arg) === true) {\n return;\n }\n throw new Error(\"argument does not match one of these constraints: arg instanceof constraint, arg.constructor === constraint, nor constraint(arg) === true\");\n }\n}\n/**\n * Creates a new object of the provided class and will call the constructor with\n * any additional argument supplied.\n */\nexport function create(ctor) {\n var args = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n args[_i - 1] = arguments[_i];\n }\n var obj = Object.create(ctor.prototype);\n ctor.apply(obj, args);\n return obj;\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar _a;\nimport { isWindows } from './platform';\nvar _schemePattern = /^\\w[\\w\\d+.-]*$/;\nvar _singleSlashStart = /^\\//;\nvar _doubleSlashStart = /^\\/\\//;\nfunction _validateUri(ret) {\n // scheme, https://tools.ietf.org/html/rfc3986#section-3.1\n // ALPHA *( ALPHA / DIGIT / \"+\" / \"-\" / \".\" )\n if (ret.scheme && !_schemePattern.test(ret.scheme)) {\n throw new Error('[UriError]: Scheme contains illegal characters.');\n }\n // path, http://tools.ietf.org/html/rfc3986#section-3.3\n // If a URI contains an authority component, then the path component\n // must either be empty or begin with a slash (\"/\") character. If a URI\n // does not contain an authority component, then the path cannot begin\n // with two slash characters (\"//\").\n if (ret.path) {\n if (ret.authority) {\n if (!_singleSlashStart.test(ret.path)) {\n 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');\n }\n }\n else {\n if (_doubleSlashStart.test(ret.path)) {\n throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters (\"//\")');\n }\n }\n }\n}\n// implements a bit of https://tools.ietf.org/html/rfc3986#section-5\nfunction _referenceResolution(scheme, path) {\n // the slash-character is our 'default base' as we don't\n // support constructing URIs relative to other URIs. This\n // also means that we alter and potentially break paths.\n // see https://tools.ietf.org/html/rfc3986#section-5.1.4\n switch (scheme) {\n case 'https':\n case 'http':\n case 'file':\n if (!path) {\n path = _slash;\n }\n else if (path[0] !== _slash) {\n path = _slash + path;\n }\n break;\n }\n return path;\n}\nvar _empty = '';\nvar _slash = '/';\nvar _regexp = /^(([^:/?#]+?):)?(\\/\\/([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?/;\n/**\n * Uniform Resource Identifier (URI) http://tools.ietf.org/html/rfc3986.\n * This class is a simple parser which creates the basic component paths\n * (http://tools.ietf.org/html/rfc3986#section-3) with minimal validation\n * and encoding.\n *\n * foo://example.com:8042/over/there?name=ferret#nose\n * \\_/ \\______________/\\_________/ \\_________/ \\__/\n * | | | | |\n * scheme authority path query fragment\n * | _____________________|__\n * / \\ / \\\n * urn:example:animal:ferret:nose\n *\n *\n */\nvar URI = /** @class */ (function () {\n /**\n * @internal\n */\n function URI(schemeOrData, authority, path, query, fragment) {\n if (typeof schemeOrData === 'object') {\n this.scheme = schemeOrData.scheme || _empty;\n this.authority = schemeOrData.authority || _empty;\n this.path = schemeOrData.path || _empty;\n this.query = schemeOrData.query || _empty;\n this.fragment = schemeOrData.fragment || _empty;\n // no validation because it's this URI\n // that creates uri components.\n // _validateUri(this);\n }\n else {\n this.scheme = schemeOrData || _empty;\n this.authority = authority || _empty;\n this.path = _referenceResolution(this.scheme, path || _empty);\n this.query = query || _empty;\n this.fragment = fragment || _empty;\n _validateUri(this);\n }\n }\n URI.isUri = function (thing) {\n if (thing instanceof URI) {\n return true;\n }\n if (!thing) {\n return false;\n }\n return typeof thing.authority === 'string'\n && typeof thing.fragment === 'string'\n && typeof thing.path === 'string'\n && typeof thing.query === 'string'\n && typeof thing.scheme === 'string';\n };\n Object.defineProperty(URI.prototype, \"fsPath\", {\n // ---- filesystem path -----------------------\n /**\n * Returns a string representing the corresponding file system path of this URI.\n * Will handle UNC paths and normalize windows drive letters to lower-case. Also\n * uses the platform specific path separator. Will *not* validate the path for\n * invalid characters and semantics. Will *not* look at the scheme of this URI.\n */\n get: function () {\n return _makeFsPath(this);\n },\n enumerable: true,\n configurable: true\n });\n // ---- modify to new -------------------------\n URI.prototype.with = function (change) {\n if (!change) {\n return this;\n }\n var scheme = change.scheme, authority = change.authority, path = change.path, query = change.query, fragment = change.fragment;\n if (scheme === void 0) {\n scheme = this.scheme;\n }\n else if (scheme === null) {\n scheme = _empty;\n }\n if (authority === void 0) {\n authority = this.authority;\n }\n else if (authority === null) {\n authority = _empty;\n }\n if (path === void 0) {\n path = this.path;\n }\n else if (path === null) {\n path = _empty;\n }\n if (query === void 0) {\n query = this.query;\n }\n else if (query === null) {\n query = _empty;\n }\n if (fragment === void 0) {\n fragment = this.fragment;\n }\n else if (fragment === null) {\n fragment = _empty;\n }\n if (scheme === this.scheme\n && authority === this.authority\n && path === this.path\n && query === this.query\n && fragment === this.fragment) {\n return this;\n }\n return new _URI(scheme, authority, path, query, fragment);\n };\n // ---- parse & validate ------------------------\n URI.parse = function (value) {\n var match = _regexp.exec(value);\n if (!match) {\n return new _URI(_empty, _empty, _empty, _empty, _empty);\n }\n return new _URI(match[2] || _empty, decodeURIComponent(match[4] || _empty), decodeURIComponent(match[5] || _empty), decodeURIComponent(match[7] || _empty), decodeURIComponent(match[9] || _empty));\n };\n URI.file = function (path) {\n var authority = _empty;\n // normalize to fwd-slashes on windows,\n // on other systems bwd-slashes are valid\n // filename character, eg /f\\oo/ba\\r.txt\n if (isWindows) {\n path = path.replace(/\\\\/g, _slash);\n }\n // check for authority as used in UNC shares\n // or use the path as given\n if (path[0] === _slash && path[1] === _slash) {\n var idx = path.indexOf(_slash, 2);\n if (idx === -1) {\n authority = path.substring(2);\n path = _slash;\n }\n else {\n authority = path.substring(2, idx);\n path = path.substring(idx) || _slash;\n }\n }\n return new _URI('file', authority, path, _empty, _empty);\n };\n URI.from = function (components) {\n return new _URI(components.scheme, components.authority, components.path, components.query, components.fragment);\n };\n // ---- printing/externalize ---------------------------\n /**\n *\n * @param skipEncoding Do not encode the result, default is `false`\n */\n URI.prototype.toString = function (skipEncoding) {\n if (skipEncoding === void 0) { skipEncoding = false; }\n return _asFormatted(this, skipEncoding);\n };\n URI.prototype.toJSON = function () {\n return this;\n };\n URI.revive = function (data) {\n if (!data) {\n return data;\n }\n else if (data instanceof URI) {\n return data;\n }\n else {\n var result = new _URI(data);\n result._fsPath = data.fsPath;\n result._formatted = data.external;\n return result;\n }\n };\n return URI;\n}());\nexport default URI;\n// tslint:disable-next-line:class-name\nvar _URI = /** @class */ (function (_super) {\n __extends(_URI, _super);\n function _URI() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this._formatted = null;\n _this._fsPath = null;\n return _this;\n }\n Object.defineProperty(_URI.prototype, \"fsPath\", {\n get: function () {\n if (!this._fsPath) {\n this._fsPath = _makeFsPath(this);\n }\n return this._fsPath;\n },\n enumerable: true,\n configurable: true\n });\n _URI.prototype.toString = function (skipEncoding) {\n if (skipEncoding === void 0) { skipEncoding = false; }\n if (!skipEncoding) {\n if (!this._formatted) {\n this._formatted = _asFormatted(this, false);\n }\n return this._formatted;\n }\n else {\n // we don't cache that\n return _asFormatted(this, true);\n }\n };\n _URI.prototype.toJSON = function () {\n var res = {\n $mid: 1\n };\n // cached state\n if (this._fsPath) {\n res.fsPath = this._fsPath;\n }\n if (this._formatted) {\n res.external = this._formatted;\n }\n // uri components\n if (this.path) {\n res.path = this.path;\n }\n if (this.scheme) {\n res.scheme = this.scheme;\n }\n if (this.authority) {\n res.authority = this.authority;\n }\n if (this.query) {\n res.query = this.query;\n }\n if (this.fragment) {\n res.fragment = this.fragment;\n }\n return res;\n };\n return _URI;\n}(URI));\n// reserved characters: https://tools.ietf.org/html/rfc3986#section-2.2\nvar encodeTable = (_a = {},\n _a[58 /* Colon */] = '%3A',\n _a[47 /* Slash */] = '%2F',\n _a[63 /* QuestionMark */] = '%3F',\n _a[35 /* Hash */] = '%23',\n _a[91 /* OpenSquareBracket */] = '%5B',\n _a[93 /* CloseSquareBracket */] = '%5D',\n _a[64 /* AtSign */] = '%40',\n _a[33 /* ExclamationMark */] = '%21',\n _a[36 /* DollarSign */] = '%24',\n _a[38 /* Ampersand */] = '%26',\n _a[39 /* SingleQuote */] = '%27',\n _a[40 /* OpenParen */] = '%28',\n _a[41 /* CloseParen */] = '%29',\n _a[42 /* Asterisk */] = '%2A',\n _a[43 /* Plus */] = '%2B',\n _a[44 /* Comma */] = '%2C',\n _a[59 /* Semicolon */] = '%3B',\n _a[61 /* Equals */] = '%3D',\n _a[32 /* Space */] = '%20',\n _a);\nfunction encodeURIComponentFast(uriComponent, allowSlash) {\n var res = undefined;\n var nativeEncodePos = -1;\n for (var pos = 0; pos < uriComponent.length; pos++) {\n var code = uriComponent.charCodeAt(pos);\n // unreserved characters: https://tools.ietf.org/html/rfc3986#section-2.3\n if ((code >= 97 /* a */ && code <= 122 /* z */)\n || (code >= 65 /* A */ && code <= 90 /* Z */)\n || (code >= 48 /* Digit0 */ && code <= 57 /* Digit9 */)\n || code === 45 /* Dash */\n || code === 46 /* Period */\n || code === 95 /* Underline */\n || code === 126 /* Tilde */\n || (allowSlash && code === 47 /* Slash */)) {\n // check if we are delaying native encode\n if (nativeEncodePos !== -1) {\n res += encodeURIComponent(uriComponent.substring(nativeEncodePos, pos));\n nativeEncodePos = -1;\n }\n // check if we write into a new string (by default we try to return the param)\n if (res !== undefined) {\n res += uriComponent.charAt(pos);\n }\n }\n else {\n // encoding needed, we need to allocate a new string\n if (res === undefined) {\n res = uriComponent.substr(0, pos);\n }\n // check with default table first\n var escaped = encodeTable[code];\n if (escaped !== undefined) {\n // check if we are delaying native encode\n if (nativeEncodePos !== -1) {\n res += encodeURIComponent(uriComponent.substring(nativeEncodePos, pos));\n nativeEncodePos = -1;\n }\n // append escaped variant to result\n res += escaped;\n }\n else if (nativeEncodePos === -1) {\n // use native encode only when needed\n nativeEncodePos = pos;\n }\n }\n }\n if (nativeEncodePos !== -1) {\n res += encodeURIComponent(uriComponent.substring(nativeEncodePos));\n }\n return res !== undefined ? res : uriComponent;\n}\nfunction encodeURIComponentMinimal(path) {\n var res = undefined;\n for (var pos = 0; pos < path.length; pos++) {\n var code = path.charCodeAt(pos);\n if (code === 35 /* Hash */ || code === 63 /* QuestionMark */) {\n if (res === undefined) {\n res = path.substr(0, pos);\n }\n res += encodeTable[code];\n }\n else {\n if (res !== undefined) {\n res += path[pos];\n }\n }\n }\n return res !== undefined ? res : path;\n}\n/**\n * Compute `fsPath` for the given uri\n * @param uri\n */\nfunction _makeFsPath(uri) {\n var value;\n if (uri.authority && uri.path.length > 1 && uri.scheme === 'file') {\n // unc path: file://shares/c$/far/boo\n value = \"//\" + uri.authority + uri.path;\n }\n else if (uri.path.charCodeAt(0) === 47 /* Slash */\n && (uri.path.charCodeAt(1) >= 65 /* A */ && uri.path.charCodeAt(1) <= 90 /* Z */ || uri.path.charCodeAt(1) >= 97 /* a */ && uri.path.charCodeAt(1) <= 122 /* z */)\n && uri.path.charCodeAt(2) === 58 /* Colon */) {\n // windows drive letter: file:///c:/far/boo\n value = uri.path[1].toLowerCase() + uri.path.substr(2);\n }\n else {\n // other path\n value = uri.path;\n }\n if (isWindows) {\n value = value.replace(/\\//g, '\\\\');\n }\n return value;\n}\n/**\n * Create the external version of a uri\n */\nfunction _asFormatted(uri, skipEncoding) {\n var encoder = !skipEncoding\n ? encodeURIComponentFast\n : encodeURIComponentMinimal;\n var res = '';\n var scheme = uri.scheme, authority = uri.authority, path = uri.path, query = uri.query, fragment = uri.fragment;\n if (scheme) {\n res += scheme;\n res += ':';\n }\n if (authority || scheme === 'file') {\n res += _slash;\n res += _slash;\n }\n if (authority) {\n var idx = authority.indexOf('@');\n if (idx !== -1) {\n // @\n var userinfo = authority.substr(0, idx);\n authority = authority.substr(idx + 1);\n idx = userinfo.indexOf(':');\n if (idx === -1) {\n res += encoder(userinfo, false);\n }\n else {\n // :@\n res += encoder(userinfo.substr(0, idx), false);\n res += ':';\n res += encoder(userinfo.substr(idx + 1), false);\n }\n res += '@';\n }\n authority = authority.toLowerCase();\n idx = authority.indexOf(':');\n if (idx === -1) {\n res += encoder(authority, false);\n }\n else {\n // :\n res += encoder(authority.substr(0, idx), false);\n res += authority.substr(idx);\n }\n }\n if (path) {\n // lower-case windows drive letters in /C:/fff or C:/fff\n if (path.length >= 3 && path.charCodeAt(0) === 47 /* Slash */ && path.charCodeAt(2) === 58 /* Colon */) {\n var code = path.charCodeAt(1);\n if (code >= 65 /* A */ && code <= 90 /* Z */) {\n path = \"/\" + String.fromCharCode(code + 32) + \":\" + path.substr(3); // \"/c:\".length === 3\n }\n }\n else if (path.length >= 2 && path.charCodeAt(1) === 58 /* Colon */) {\n var code = path.charCodeAt(0);\n if (code >= 65 /* A */ && code <= 90 /* Z */) {\n path = String.fromCharCode(code + 32) + \":\" + path.substr(2); // \"/c:\".length === 3\n }\n }\n // encode the rest of the path\n res += encoder(path, true);\n }\n if (query) {\n res += '?';\n res += encoder(query, false);\n }\n if (fragment) {\n res += '#';\n res += !skipEncoding ? encodeURIComponentFast(fragment, false) : fragment;\n }\n return res;\n}\n","/**\n * Extracted from https://github.com/winjs/winjs\n * Version: 4.4.0(ec3258a9f3a36805a187848984e3bb938044178d)\n * Copyright (c) Microsoft Corporation.\n * All Rights Reserved.\n * Licensed under the MIT License.\n */\nvar __winjs_exports;\n\n(function() {\n\nvar _modules = Object.create(null);//{};\n_modules[\"WinJS/Core/_WinJS\"] = {};\n\nvar _winjs = function(moduleId, deps, factory) {\n var exports = {};\n var exportsPassedIn = false;\n\n var depsValues = deps.map(function(dep) {\n if (dep === 'exports') {\n exportsPassedIn = true;\n return exports;\n }\n return _modules[dep];\n });\n\n var result = factory.apply({}, depsValues);\n\n _modules[moduleId] = exportsPassedIn ? exports : result;\n};\n\n\n_winjs(\"WinJS/Core/_Global\", [], function () {\n \"use strict\";\n\n // Appease jshint\n /* global window, self, global */\n\n var globalObject =\n typeof window !== 'undefined' ? window :\n typeof self !== 'undefined' ? self :\n typeof global !== 'undefined' ? global :\n {};\n return globalObject;\n});\n\n_winjs(\"WinJS/Core/_BaseCoreUtils\", [\"WinJS/Core/_Global\"], function baseCoreUtilsInit(_Global) {\n \"use strict\";\n\n var hasWinRT = !!_Global.Windows;\n\n function markSupportedForProcessing(func) {\n /// \n /// \n /// Marks a function as being compatible with declarative processing, such as WinJS.UI.processAll\n /// or WinJS.Binding.processAll.\n /// \n /// \n /// The function to be marked as compatible with declarative processing.\n /// \n /// \n /// The input function.\n /// \n /// \n func.supportedForProcessing = true;\n return func;\n }\n\n var actualSetImmediate = null;\n\n return {\n hasWinRT: hasWinRT,\n markSupportedForProcessing: markSupportedForProcessing,\n _setImmediate: function (callback) {\n // BEGIN monaco change\n if (actualSetImmediate === null) {\n if (_Global.setImmediate) {\n actualSetImmediate = _Global.setImmediate.bind(_Global);\n } else if (typeof process !== 'undefined' && typeof process.nextTick === 'function') {\n actualSetImmediate = process.nextTick.bind(process);\n } else {\n actualSetImmediate = _Global.setTimeout.bind(_Global);\n }\n }\n actualSetImmediate(callback);\n // END monaco change\n }\n };\n});\n_winjs(\"WinJS/Core/_WriteProfilerMark\", [\"WinJS/Core/_Global\"], function profilerInit(_Global) {\n \"use strict\";\n\n return _Global.msWriteProfilerMark || function () { };\n});\n_winjs(\"WinJS/Core/_Base\", [\"WinJS/Core/_WinJS\",\"WinJS/Core/_Global\",\"WinJS/Core/_BaseCoreUtils\",\"WinJS/Core/_WriteProfilerMark\"], function baseInit(_WinJS, _Global, _BaseCoreUtils, _WriteProfilerMark) {\n \"use strict\";\n\n function initializeProperties(target, members, prefix) {\n var keys = Object.keys(members);\n var isArray = Array.isArray(target);\n var properties;\n var i, len;\n for (i = 0, len = keys.length; i < len; i++) {\n var key = keys[i];\n var enumerable = key.charCodeAt(0) !== /*_*/95;\n var member = members[key];\n if (member && typeof member === 'object') {\n if (member.value !== undefined || typeof member.get === 'function' || typeof member.set === 'function') {\n if (member.enumerable === undefined) {\n member.enumerable = enumerable;\n }\n if (prefix && member.setName && typeof member.setName === 'function') {\n member.setName(prefix + \".\" + key);\n }\n properties = properties || {};\n properties[key] = member;\n continue;\n }\n }\n if (!enumerable) {\n properties = properties || {};\n properties[key] = { value: member, enumerable: enumerable, configurable: true, writable: true };\n continue;\n }\n if (isArray) {\n target.forEach(function (target) {\n target[key] = member;\n });\n } else {\n target[key] = member;\n }\n }\n if (properties) {\n if (isArray) {\n target.forEach(function (target) {\n Object.defineProperties(target, properties);\n });\n } else {\n Object.defineProperties(target, properties);\n }\n }\n }\n\n (function () {\n\n var _rootNamespace = _WinJS;\n if (!_rootNamespace.Namespace) {\n _rootNamespace.Namespace = Object.create(Object.prototype);\n }\n\n function createNamespace(parentNamespace, name) {\n var currentNamespace = parentNamespace || {};\n if (name) {\n var namespaceFragments = name.split(\".\");\n if (currentNamespace === _Global && namespaceFragments[0] === \"WinJS\") {\n currentNamespace = _WinJS;\n namespaceFragments.splice(0, 1);\n }\n for (var i = 0, len = namespaceFragments.length; i < len; i++) {\n var namespaceName = namespaceFragments[i];\n if (!currentNamespace[namespaceName]) {\n Object.defineProperty(currentNamespace, namespaceName,\n { value: {}, writable: false, enumerable: true, configurable: true }\n );\n }\n currentNamespace = currentNamespace[namespaceName];\n }\n }\n return currentNamespace;\n }\n\n function defineWithParent(parentNamespace, name, members) {\n /// \n /// \n /// Defines a new namespace with the specified name under the specified parent namespace.\n /// \n /// \n /// The parent namespace.\n /// \n /// \n /// The name of the new namespace.\n /// \n /// \n /// The members of the new namespace.\n /// \n /// \n /// The newly-defined namespace.\n /// \n /// \n var currentNamespace = createNamespace(parentNamespace, name);\n\n if (members) {\n initializeProperties(currentNamespace, members, name || \"\");\n }\n\n return currentNamespace;\n }\n\n function define(name, members) {\n /// \n /// \n /// Defines a new namespace with the specified name.\n /// \n /// \n /// The name of the namespace. This could be a dot-separated name for nested namespaces.\n /// \n /// \n /// The members of the new namespace.\n /// \n /// \n /// The newly-defined namespace.\n /// \n /// \n return defineWithParent(_Global, name, members);\n }\n\n var LazyStates = {\n uninitialized: 1,\n working: 2,\n initialized: 3,\n };\n\n function lazy(f) {\n var name;\n var state = LazyStates.uninitialized;\n var result;\n return {\n setName: function (value) {\n name = value;\n },\n get: function () {\n switch (state) {\n case LazyStates.initialized:\n return result;\n\n case LazyStates.uninitialized:\n state = LazyStates.working;\n try {\n _WriteProfilerMark(\"WinJS.Namespace._lazy:\" + name + \",StartTM\");\n result = f();\n } finally {\n _WriteProfilerMark(\"WinJS.Namespace._lazy:\" + name + \",StopTM\");\n state = LazyStates.uninitialized;\n }\n f = null;\n state = LazyStates.initialized;\n return result;\n\n case LazyStates.working:\n throw \"Illegal: reentrancy on initialization\";\n\n default:\n throw \"Illegal\";\n }\n },\n set: function (value) {\n switch (state) {\n case LazyStates.working:\n throw \"Illegal: reentrancy on initialization\";\n\n default:\n state = LazyStates.initialized;\n result = value;\n break;\n }\n },\n enumerable: true,\n configurable: true,\n };\n }\n\n // helper for defining AMD module members\n function moduleDefine(exports, name, members) {\n var target = [exports];\n var publicNS = null;\n if (name) {\n publicNS = createNamespace(_Global, name);\n target.push(publicNS);\n }\n initializeProperties(target, members, name || \"\");\n return publicNS;\n }\n\n // Establish members of the \"WinJS.Namespace\" namespace\n Object.defineProperties(_rootNamespace.Namespace, {\n\n defineWithParent: { value: defineWithParent, writable: true, enumerable: true, configurable: true },\n\n define: { value: define, writable: true, enumerable: true, configurable: true },\n\n _lazy: { value: lazy, writable: true, enumerable: true, configurable: true },\n\n _moduleDefine: { value: moduleDefine, writable: true, enumerable: true, configurable: true }\n\n });\n\n })();\n\n (function () {\n\n function define(constructor, instanceMembers, staticMembers) {\n /// \n /// \n /// Defines a class using the given constructor and the specified instance members.\n /// \n /// \n /// A constructor function that is used to instantiate this class.\n /// \n /// \n /// The set of instance fields, properties, and methods made available on the class.\n /// \n /// \n /// The set of static fields, properties, and methods made available on the class.\n /// \n /// \n /// The newly-defined class.\n /// \n /// \n constructor = constructor || function () { };\n _BaseCoreUtils.markSupportedForProcessing(constructor);\n if (instanceMembers) {\n initializeProperties(constructor.prototype, instanceMembers);\n }\n if (staticMembers) {\n initializeProperties(constructor, staticMembers);\n }\n return constructor;\n }\n\n function derive(baseClass, constructor, instanceMembers, staticMembers) {\n /// \n /// \n /// Creates a sub-class based on the supplied baseClass parameter, using prototypal inheritance.\n /// \n /// \n /// The class to inherit from.\n /// \n /// \n /// A constructor function that is used to instantiate this class.\n /// \n /// \n /// The set of instance fields, properties, and methods to be made available on the class.\n /// \n /// \n /// The set of static fields, properties, and methods to be made available on the class.\n /// \n /// \n /// The newly-defined class.\n /// \n /// \n if (baseClass) {\n constructor = constructor || function () { };\n var basePrototype = baseClass.prototype;\n constructor.prototype = Object.create(basePrototype);\n _BaseCoreUtils.markSupportedForProcessing(constructor);\n Object.defineProperty(constructor.prototype, \"constructor\", { value: constructor, writable: true, configurable: true, enumerable: true });\n if (instanceMembers) {\n initializeProperties(constructor.prototype, instanceMembers);\n }\n if (staticMembers) {\n initializeProperties(constructor, staticMembers);\n }\n return constructor;\n } else {\n return define(constructor, instanceMembers, staticMembers);\n }\n }\n\n function mix(constructor) {\n /// \n /// \n /// Defines a class using the given constructor and the union of the set of instance members\n /// specified by all the mixin objects. The mixin parameter list is of variable length.\n /// \n /// \n /// A constructor function that is used to instantiate this class.\n /// \n /// \n /// The newly-defined class.\n /// \n /// \n constructor = constructor || function () { };\n var i, len;\n for (i = 1, len = arguments.length; i < len; i++) {\n initializeProperties(constructor.prototype, arguments[i]);\n }\n return constructor;\n }\n\n // Establish members of \"WinJS.Class\" namespace\n _WinJS.Namespace.define(\"WinJS.Class\", {\n define: define,\n derive: derive,\n mix: mix\n });\n\n })();\n\n return {\n Namespace: _WinJS.Namespace,\n Class: _WinJS.Class\n };\n\n});\n_winjs(\"WinJS/Core/_ErrorFromName\", [\"WinJS/Core/_Base\"], function errorsInit(_Base) {\n \"use strict\";\n\n var ErrorFromName = _Base.Class.derive(Error, function (name, message) {\n /// \n /// \n /// Creates an Error object with the specified name and message properties.\n /// \n /// The name of this error. The name is meant to be consumed programmatically and should not be localized.\n /// The message for this error. The message is meant to be consumed by humans and should be localized.\n /// Error instance with .name and .message properties populated\n /// \n this.name = name;\n this.message = message || name;\n }, {\n /* empty */\n }, {\n supportedForProcessing: false,\n });\n\n _Base.Namespace.define(\"WinJS\", {\n // ErrorFromName establishes a simple pattern for returning error codes.\n //\n ErrorFromName: ErrorFromName\n });\n\n return ErrorFromName;\n\n});\n\n\n_winjs(\"WinJS/Core/_Events\", [\"exports\",\"WinJS/Core/_Base\"], function eventsInit(exports, _Base) {\n \"use strict\";\n\n\n function createEventProperty(name) {\n var eventPropStateName = \"_on\" + name + \"state\";\n\n return {\n get: function () {\n var state = this[eventPropStateName];\n return state && state.userHandler;\n },\n set: function (handler) {\n var state = this[eventPropStateName];\n if (handler) {\n if (!state) {\n state = { wrapper: function (evt) { return state.userHandler(evt); }, userHandler: handler };\n Object.defineProperty(this, eventPropStateName, { value: state, enumerable: false, writable:true, configurable: true });\n this.addEventListener(name, state.wrapper, false);\n }\n state.userHandler = handler;\n } else if (state) {\n this.removeEventListener(name, state.wrapper, false);\n this[eventPropStateName] = null;\n }\n },\n enumerable: true\n };\n }\n\n function createEventProperties() {\n /// \n /// \n /// Creates an object that has one property for each name passed to the function.\n /// \n /// \n /// A variable list of property names.\n /// \n /// \n /// The object with the specified properties. The names of the properties are prefixed with 'on'.\n /// \n /// \n var props = {};\n for (var i = 0, len = arguments.length; i < len; i++) {\n var name = arguments[i];\n props[\"on\" + name] = createEventProperty(name);\n }\n return props;\n }\n\n var EventMixinEvent = _Base.Class.define(\n function EventMixinEvent_ctor(type, detail, target) {\n this.detail = detail;\n this.target = target;\n this.timeStamp = Date.now();\n this.type = type;\n },\n {\n bubbles: { value: false, writable: false },\n cancelable: { value: false, writable: false },\n currentTarget: {\n get: function () { return this.target; }\n },\n defaultPrevented: {\n get: function () { return this._preventDefaultCalled; }\n },\n trusted: { value: false, writable: false },\n eventPhase: { value: 0, writable: false },\n target: null,\n timeStamp: null,\n type: null,\n\n preventDefault: function () {\n this._preventDefaultCalled = true;\n },\n stopImmediatePropagation: function () {\n this._stopImmediatePropagationCalled = true;\n },\n stopPropagation: function () {\n }\n }, {\n supportedForProcessing: false,\n }\n );\n\n var eventMixin = {\n _listeners: null,\n\n addEventListener: function (type, listener, useCapture) {\n /// \n /// \n /// Adds an event listener to the control.\n /// \n /// \n /// The type (name) of the event.\n /// \n /// \n /// The listener to invoke when the event is raised.\n /// \n /// \n /// if true initiates capture, otherwise false.\n /// \n /// \n useCapture = useCapture || false;\n this._listeners = this._listeners || {};\n var eventListeners = (this._listeners[type] = this._listeners[type] || []);\n for (var i = 0, len = eventListeners.length; i < len; i++) {\n var l = eventListeners[i];\n if (l.useCapture === useCapture && l.listener === listener) {\n return;\n }\n }\n eventListeners.push({ listener: listener, useCapture: useCapture });\n },\n dispatchEvent: function (type, details) {\n /// \n /// \n /// Raises an event of the specified type and with the specified additional properties.\n /// \n /// \n /// The type (name) of the event.\n /// \n /// \n /// The set of additional properties to be attached to the event object when the event is raised.\n /// \n /// \n /// true if preventDefault was called on the event.\n /// \n /// \n var listeners = this._listeners && this._listeners[type];\n if (listeners) {\n var eventValue = new EventMixinEvent(type, details, this);\n // Need to copy the array to protect against people unregistering while we are dispatching\n listeners = listeners.slice(0, listeners.length);\n for (var i = 0, len = listeners.length; i < len && !eventValue._stopImmediatePropagationCalled; i++) {\n listeners[i].listener(eventValue);\n }\n return eventValue.defaultPrevented || false;\n }\n return false;\n },\n removeEventListener: function (type, listener, useCapture) {\n /// \n /// \n /// Removes an event listener from the control.\n /// \n /// \n /// The type (name) of the event.\n /// \n /// \n /// The listener to remove.\n /// \n /// \n /// Specifies whether to initiate capture.\n /// \n /// \n useCapture = useCapture || false;\n var listeners = this._listeners && this._listeners[type];\n if (listeners) {\n for (var i = 0, len = listeners.length; i < len; i++) {\n var l = listeners[i];\n if (l.listener === listener && l.useCapture === useCapture) {\n listeners.splice(i, 1);\n if (listeners.length === 0) {\n delete this._listeners[type];\n }\n // Only want to remove one element for each call to removeEventListener\n break;\n }\n }\n }\n }\n };\n\n _Base.Namespace._moduleDefine(exports, \"WinJS.Utilities\", {\n _createEventProperty: createEventProperty,\n createEventProperties: createEventProperties,\n eventMixin: eventMixin\n });\n\n});\n\n\n_winjs(\"WinJS/Core/_Trace\", [\"WinJS/Core/_Global\"], function traceInit(_Global) {\n \"use strict\";\n\n function nop(v) {\n return v;\n }\n\n return {\n _traceAsyncOperationStarting: (_Global.Debug && _Global.Debug.msTraceAsyncOperationStarting && _Global.Debug.msTraceAsyncOperationStarting.bind(_Global.Debug)) || nop,\n _traceAsyncOperationCompleted: (_Global.Debug && _Global.Debug.msTraceAsyncOperationCompleted && _Global.Debug.msTraceAsyncOperationCompleted.bind(_Global.Debug)) || nop,\n _traceAsyncCallbackStarting: (_Global.Debug && _Global.Debug.msTraceAsyncCallbackStarting && _Global.Debug.msTraceAsyncCallbackStarting.bind(_Global.Debug)) || nop,\n _traceAsyncCallbackCompleted: (_Global.Debug && _Global.Debug.msTraceAsyncCallbackCompleted && _Global.Debug.msTraceAsyncCallbackCompleted.bind(_Global.Debug)) || nop\n };\n});\n_winjs(\"WinJS/Promise/_StateMachine\", [\"WinJS/Core/_Global\",\"WinJS/Core/_BaseCoreUtils\",\"WinJS/Core/_Base\",\"WinJS/Core/_ErrorFromName\",\"WinJS/Core/_Events\",\"WinJS/Core/_Trace\"], function promiseStateMachineInit(_Global, _BaseCoreUtils, _Base, _ErrorFromName, _Events, _Trace) {\n \"use strict\";\n\n _Global.Debug && (_Global.Debug.setNonUserCodeExceptions = true);\n\n var ListenerType = _Base.Class.mix(_Base.Class.define(null, { /*empty*/ }, { supportedForProcessing: false }), _Events.eventMixin);\n var promiseEventListeners = new ListenerType();\n // make sure there is a listeners collection so that we can do a more trivial check below\n promiseEventListeners._listeners = {};\n var errorET = \"error\";\n var canceledName = \"Canceled\";\n var tagWithStack = false;\n var tag = {\n promise: 0x01,\n thenPromise: 0x02,\n errorPromise: 0x04,\n exceptionPromise: 0x08,\n completePromise: 0x10,\n };\n tag.all = tag.promise | tag.thenPromise | tag.errorPromise | tag.exceptionPromise | tag.completePromise;\n\n //\n // Global error counter, for each error which enters the system we increment this once and then\n // the error number travels with the error as it traverses the tree of potential handlers.\n //\n // When someone has registered to be told about errors (WinJS.Promise.callonerror) promises\n // which are in error will get tagged with a ._errorId field. This tagged field is the\n // contract by which nested promises with errors will be identified as chaining for the\n // purposes of the callonerror semantics. If a nested promise in error is encountered without\n // a ._errorId it will be assumed to be foreign and treated as an interop boundary and\n // a new error id will be minted.\n //\n var error_number = 1;\n\n //\n // The state machine has a interesting hiccup in it with regards to notification, in order\n // to flatten out notification and avoid recursion for synchronous completion we have an\n // explicit set of *_notify states which are responsible for notifying their entire tree\n // of children. They can do this because they know that immediate children are always\n // ThenPromise instances and we can therefore reach into their state to access the\n // _listeners collection.\n //\n // So, what happens is that a Promise will be fulfilled through the _completed or _error\n // messages at which point it will enter a *_notify state and be responsible for to move\n // its children into an (as appropriate) success or error state and also notify that child's\n // listeners of the state transition, until leaf notes are reached.\n //\n\n var state_created, // -> working\n state_working, // -> error | error_notify | success | success_notify | canceled | waiting\n state_waiting, // -> error | error_notify | success | success_notify | waiting_canceled\n state_waiting_canceled, // -> error | error_notify | success | success_notify | canceling\n state_canceled, // -> error | error_notify | success | success_notify | canceling\n state_canceling, // -> error_notify\n state_success_notify, // -> success\n state_success, // -> .\n state_error_notify, // -> error\n state_error; // -> .\n\n // Noop function, used in the various states to indicate that they don't support a given\n // message. Named with the somewhat cute name '_' because it reads really well in the states.\n\n function _() { }\n\n // Initial state\n //\n state_created = {\n name: \"created\",\n enter: function (promise) {\n promise._setState(state_working);\n },\n cancel: _,\n done: _,\n then: _,\n _completed: _,\n _error: _,\n _notify: _,\n _progress: _,\n _setCompleteValue: _,\n _setErrorValue: _\n };\n\n // Ready state, waiting for a message (completed/error/progress), able to be canceled\n //\n state_working = {\n name: \"working\",\n enter: _,\n cancel: function (promise) {\n promise._setState(state_canceled);\n },\n done: done,\n then: then,\n _completed: completed,\n _error: error,\n _notify: _,\n _progress: progress,\n _setCompleteValue: setCompleteValue,\n _setErrorValue: setErrorValue\n };\n\n // Waiting state, if a promise is completed with a value which is itself a promise\n // (has a then() method) it signs up to be informed when that child promise is\n // fulfilled at which point it will be fulfilled with that value.\n //\n state_waiting = {\n name: \"waiting\",\n enter: function (promise) {\n var waitedUpon = promise._value;\n // We can special case our own intermediate promises which are not in a\n // terminal state by just pushing this promise as a listener without\n // having to create new indirection functions\n if (waitedUpon instanceof ThenPromise &&\n waitedUpon._state !== state_error &&\n waitedUpon._state !== state_success) {\n pushListener(waitedUpon, { promise: promise });\n } else {\n var error = function (value) {\n if (waitedUpon._errorId) {\n promise._chainedError(value, waitedUpon);\n } else {\n // Because this is an interop boundary we want to indicate that this\n // error has been handled by the promise infrastructure before we\n // begin a new handling chain.\n //\n callonerror(promise, value, detailsForHandledError, waitedUpon, error);\n promise._error(value);\n }\n };\n error.handlesOnError = true;\n waitedUpon.then(\n promise._completed.bind(promise),\n error,\n promise._progress.bind(promise)\n );\n }\n },\n cancel: function (promise) {\n promise._setState(state_waiting_canceled);\n },\n done: done,\n then: then,\n _completed: completed,\n _error: error,\n _notify: _,\n _progress: progress,\n _setCompleteValue: setCompleteValue,\n _setErrorValue: setErrorValue\n };\n\n // Waiting canceled state, when a promise has been in a waiting state and receives a\n // request to cancel its pending work it will forward that request to the child promise\n // and then waits to be informed of the result. This promise moves itself into the\n // canceling state but understands that the child promise may instead push it to a\n // different state.\n //\n state_waiting_canceled = {\n name: \"waiting_canceled\",\n enter: function (promise) {\n // Initiate a transition to canceling. Triggering a cancel on the promise\n // that we are waiting upon may result in a different state transition\n // before the state machine pump runs again.\n promise._setState(state_canceling);\n var waitedUpon = promise._value;\n if (waitedUpon.cancel) {\n waitedUpon.cancel();\n }\n },\n cancel: _,\n done: done,\n then: then,\n _completed: completed,\n _error: error,\n _notify: _,\n _progress: progress,\n _setCompleteValue: setCompleteValue,\n _setErrorValue: setErrorValue\n };\n\n // Canceled state, moves to the canceling state and then tells the promise to do\n // whatever it might need to do on cancelation.\n //\n state_canceled = {\n name: \"canceled\",\n enter: function (promise) {\n // Initiate a transition to canceling. The _cancelAction may change the state\n // before the state machine pump runs again.\n promise._setState(state_canceling);\n promise._cancelAction();\n },\n cancel: _,\n done: done,\n then: then,\n _completed: completed,\n _error: error,\n _notify: _,\n _progress: progress,\n _setCompleteValue: setCompleteValue,\n _setErrorValue: setErrorValue\n };\n\n // Canceling state, commits to the promise moving to an error state with an error\n // object whose 'name' and 'message' properties contain the string \"Canceled\"\n //\n state_canceling = {\n name: \"canceling\",\n enter: function (promise) {\n var error = new Error(canceledName);\n error.name = error.message;\n promise._value = error;\n promise._setState(state_error_notify);\n },\n cancel: _,\n done: _,\n then: _,\n _completed: _,\n _error: _,\n _notify: _,\n _progress: _,\n _setCompleteValue: _,\n _setErrorValue: _\n };\n\n // Success notify state, moves a promise to the success state and notifies all children\n //\n state_success_notify = {\n name: \"complete_notify\",\n enter: function (promise) {\n promise.done = CompletePromise.prototype.done;\n promise.then = CompletePromise.prototype.then;\n if (promise._listeners) {\n var queue = [promise];\n var p;\n while (queue.length) {\n p = queue.shift();\n p._state._notify(p, queue);\n }\n }\n promise._setState(state_success);\n },\n cancel: _,\n done: null, /*error to get here */\n then: null, /*error to get here */\n _completed: _,\n _error: _,\n _notify: notifySuccess,\n _progress: _,\n _setCompleteValue: _,\n _setErrorValue: _\n };\n\n // Success state, moves a promise to the success state and does NOT notify any children.\n // Some upstream promise is owning the notification pass.\n //\n state_success = {\n name: \"success\",\n enter: function (promise) {\n promise.done = CompletePromise.prototype.done;\n promise.then = CompletePromise.prototype.then;\n promise._cleanupAction();\n },\n cancel: _,\n done: null, /*error to get here */\n then: null, /*error to get here */\n _completed: _,\n _error: _,\n _notify: notifySuccess,\n _progress: _,\n _setCompleteValue: _,\n _setErrorValue: _\n };\n\n // Error notify state, moves a promise to the error state and notifies all children\n //\n state_error_notify = {\n name: \"error_notify\",\n enter: function (promise) {\n promise.done = ErrorPromise.prototype.done;\n promise.then = ErrorPromise.prototype.then;\n if (promise._listeners) {\n var queue = [promise];\n var p;\n while (queue.length) {\n p = queue.shift();\n p._state._notify(p, queue);\n }\n }\n promise._setState(state_error);\n },\n cancel: _,\n done: null, /*error to get here*/\n then: null, /*error to get here*/\n _completed: _,\n _error: _,\n _notify: notifyError,\n _progress: _,\n _setCompleteValue: _,\n _setErrorValue: _\n };\n\n // Error state, moves a promise to the error state and does NOT notify any children.\n // Some upstream promise is owning the notification pass.\n //\n state_error = {\n name: \"error\",\n enter: function (promise) {\n promise.done = ErrorPromise.prototype.done;\n promise.then = ErrorPromise.prototype.then;\n promise._cleanupAction();\n },\n cancel: _,\n done: null, /*error to get here*/\n then: null, /*error to get here*/\n _completed: _,\n _error: _,\n _notify: notifyError,\n _progress: _,\n _setCompleteValue: _,\n _setErrorValue: _\n };\n\n //\n // The statemachine implementation follows a very particular pattern, the states are specified\n // as static stateless bags of functions which are then indirected through the state machine\n // instance (a Promise). As such all of the functions on each state have the promise instance\n // passed to them explicitly as a parameter and the Promise instance members do a little\n // dance where they indirect through the state and insert themselves in the argument list.\n //\n // We could instead call directly through the promise states however then every caller\n // would have to remember to do things like pumping the state machine to catch state transitions.\n //\n\n var PromiseStateMachine = _Base.Class.define(null, {\n _listeners: null,\n _nextState: null,\n _state: null,\n _value: null,\n\n cancel: function () {\n /// \n /// \n /// Attempts to cancel the fulfillment of a promised value. If the promise hasn't\n /// already been fulfilled and cancellation is supported, the promise enters\n /// the error state with a value of Error(\"Canceled\").\n /// \n /// \n this._state.cancel(this);\n this._run();\n },\n done: function Promise_done(onComplete, onError, onProgress) {\n /// \n /// \n /// Allows you to specify the work to be done on the fulfillment of the promised value,\n /// the error handling to be performed if the promise fails to fulfill\n /// a value, and the handling of progress notifications along the way.\n ///\n /// After the handlers have finished executing, this function throws any error that would have been returned\n /// from then() as a promise in the error state.\n /// \n /// \n /// The function to be called if the promise is fulfilled successfully with a value.\n /// The fulfilled value is passed as the single argument. If the value is null,\n /// the fulfilled value is returned. The value returned\n /// from the function becomes the fulfilled value of the promise returned by\n /// then(). If an exception is thrown while executing the function, the promise returned\n /// by then() moves into the error state.\n /// \n /// \n /// The function to be called if the promise is fulfilled with an error. The error\n /// is passed as the single argument. If it is null, the error is forwarded.\n /// The value returned from the function is the fulfilled value of the promise returned by then().\n /// \n /// \n /// the function to be called if the promise reports progress. Data about the progress\n /// is passed as the single argument. Promises are not required to support\n /// progress.\n /// \n /// \n this._state.done(this, onComplete, onError, onProgress);\n },\n then: function Promise_then(onComplete, onError, onProgress) {\n /// \n /// \n /// Allows you to specify the work to be done on the fulfillment of the promised value,\n /// the error handling to be performed if the promise fails to fulfill\n /// a value, and the handling of progress notifications along the way.\n /// \n /// \n /// The function to be called if the promise is fulfilled successfully with a value.\n /// The value is passed as the single argument. If the value is null, the value is returned.\n /// The value returned from the function becomes the fulfilled value of the promise returned by\n /// then(). If an exception is thrown while this function is being executed, the promise returned\n /// by then() moves into the error state.\n /// \n /// \n /// The function to be called if the promise is fulfilled with an error. The error\n /// is passed as the single argument. If it is null, the error is forwarded.\n /// The value returned from the function becomes the fulfilled value of the promise returned by then().\n /// \n /// \n /// The function to be called if the promise reports progress. Data about the progress\n /// is passed as the single argument. Promises are not required to support\n /// progress.\n /// \n /// \n /// The promise whose value is the result of executing the complete or\n /// error function.\n /// \n /// \n // BEGIN monaco change\n if (this.then !== Promise_then) {\n this.then(onComplete, onError, onProgress);\n return;\n }\n // END monaco change\n return this._state.then(this, onComplete, onError, onProgress);\n },\n\n _chainedError: function (value, context) {\n var result = this._state._error(this, value, detailsForChainedError, context);\n this._run();\n return result;\n },\n _completed: function (value) {\n var result = this._state._completed(this, value);\n this._run();\n return result;\n },\n _error: function (value) {\n var result = this._state._error(this, value, detailsForError);\n this._run();\n return result;\n },\n _progress: function (value) {\n this._state._progress(this, value);\n },\n _setState: function (state) {\n this._nextState = state;\n },\n _setCompleteValue: function (value) {\n this._state._setCompleteValue(this, value);\n this._run();\n },\n _setChainedErrorValue: function (value, context) {\n var result = this._state._setErrorValue(this, value, detailsForChainedError, context);\n this._run();\n return result;\n },\n _setExceptionValue: function (value) {\n var result = this._state._setErrorValue(this, value, detailsForException);\n this._run();\n return result;\n },\n _run: function () {\n while (this._nextState) {\n this._state = this._nextState;\n this._nextState = null;\n this._state.enter(this);\n }\n }\n }, {\n supportedForProcessing: false\n });\n\n //\n // Implementations of shared state machine code.\n //\n\n function completed(promise, value) {\n var targetState;\n if (value && typeof value === \"object\" && typeof value.then === \"function\") {\n targetState = state_waiting;\n } else {\n targetState = state_success_notify;\n }\n promise._value = value;\n promise._setState(targetState);\n }\n function createErrorDetails(exception, error, promise, id, parent, handler) {\n return {\n exception: exception,\n error: error,\n promise: promise,\n handler: handler,\n id: id,\n parent: parent\n };\n }\n function detailsForHandledError(promise, errorValue, context, handler) {\n var exception = context._isException;\n var errorId = context._errorId;\n return createErrorDetails(\n exception ? errorValue : null,\n exception ? null : errorValue,\n promise,\n errorId,\n context,\n handler\n );\n }\n function detailsForChainedError(promise, errorValue, context) {\n var exception = context._isException;\n var errorId = context._errorId;\n setErrorInfo(promise, errorId, exception);\n return createErrorDetails(\n exception ? errorValue : null,\n exception ? null : errorValue,\n promise,\n errorId,\n context\n );\n }\n function detailsForError(promise, errorValue) {\n var errorId = ++error_number;\n setErrorInfo(promise, errorId);\n return createErrorDetails(\n null,\n errorValue,\n promise,\n errorId\n );\n }\n function detailsForException(promise, exceptionValue) {\n var errorId = ++error_number;\n setErrorInfo(promise, errorId, true);\n return createErrorDetails(\n exceptionValue,\n null,\n promise,\n errorId\n );\n }\n function done(promise, onComplete, onError, onProgress) {\n var asyncOpID = _Trace._traceAsyncOperationStarting(\"WinJS.Promise.done\");\n pushListener(promise, { c: onComplete, e: onError, p: onProgress, asyncOpID: asyncOpID });\n }\n function error(promise, value, onerrorDetails, context) {\n promise._value = value;\n callonerror(promise, value, onerrorDetails, context);\n promise._setState(state_error_notify);\n }\n function notifySuccess(promise, queue) {\n var value = promise._value;\n var listeners = promise._listeners;\n if (!listeners) {\n return;\n }\n promise._listeners = null;\n var i, len;\n for (i = 0, len = Array.isArray(listeners) ? listeners.length : 1; i < len; i++) {\n var listener = len === 1 ? listeners : listeners[i];\n var onComplete = listener.c;\n var target = listener.promise;\n\n _Trace._traceAsyncOperationCompleted(listener.asyncOpID, _Global.Debug && _Global.Debug.MS_ASYNC_OP_STATUS_SUCCESS);\n\n if (target) {\n _Trace._traceAsyncCallbackStarting(listener.asyncOpID);\n try {\n target._setCompleteValue(onComplete ? onComplete(value) : value);\n } catch (ex) {\n target._setExceptionValue(ex);\n } finally {\n _Trace._traceAsyncCallbackCompleted();\n }\n if (target._state !== state_waiting && target._listeners) {\n queue.push(target);\n }\n } else {\n CompletePromise.prototype.done.call(promise, onComplete);\n }\n }\n }\n function notifyError(promise, queue) {\n var value = promise._value;\n var listeners = promise._listeners;\n if (!listeners) {\n return;\n }\n promise._listeners = null;\n var i, len;\n for (i = 0, len = Array.isArray(listeners) ? listeners.length : 1; i < len; i++) {\n var listener = len === 1 ? listeners : listeners[i];\n var onError = listener.e;\n var target = listener.promise;\n\n var errorID = _Global.Debug && (value && value.name === canceledName ? _Global.Debug.MS_ASYNC_OP_STATUS_CANCELED : _Global.Debug.MS_ASYNC_OP_STATUS_ERROR);\n _Trace._traceAsyncOperationCompleted(listener.asyncOpID, errorID);\n\n if (target) {\n var asyncCallbackStarted = false;\n try {\n if (onError) {\n _Trace._traceAsyncCallbackStarting(listener.asyncOpID);\n asyncCallbackStarted = true;\n if (!onError.handlesOnError) {\n callonerror(target, value, detailsForHandledError, promise, onError);\n }\n target._setCompleteValue(onError(value));\n } else {\n target._setChainedErrorValue(value, promise);\n }\n } catch (ex) {\n target._setExceptionValue(ex);\n } finally {\n if (asyncCallbackStarted) {\n _Trace._traceAsyncCallbackCompleted();\n }\n }\n if (target._state !== state_waiting && target._listeners) {\n queue.push(target);\n }\n } else {\n ErrorPromise.prototype.done.call(promise, null, onError);\n }\n }\n }\n function callonerror(promise, value, onerrorDetailsGenerator, context, handler) {\n if (promiseEventListeners._listeners[errorET]) {\n if (value instanceof Error && value.message === canceledName) {\n return;\n }\n promiseEventListeners.dispatchEvent(errorET, onerrorDetailsGenerator(promise, value, context, handler));\n }\n }\n function progress(promise, value) {\n var listeners = promise._listeners;\n if (listeners) {\n var i, len;\n for (i = 0, len = Array.isArray(listeners) ? listeners.length : 1; i < len; i++) {\n var listener = len === 1 ? listeners : listeners[i];\n var onProgress = listener.p;\n if (onProgress) {\n try { onProgress(value); } catch (ex) { }\n }\n if (!(listener.c || listener.e) && listener.promise) {\n listener.promise._progress(value);\n }\n }\n }\n }\n function pushListener(promise, listener) {\n var listeners = promise._listeners;\n if (listeners) {\n // We may have either a single listener (which will never be wrapped in an array)\n // or 2+ listeners (which will be wrapped). Since we are now adding one more listener\n // we may have to wrap the single listener before adding the second.\n listeners = Array.isArray(listeners) ? listeners : [listeners];\n listeners.push(listener);\n } else {\n listeners = listener;\n }\n promise._listeners = listeners;\n }\n // The difference beween setCompleteValue()/setErrorValue() and complete()/error() is that setXXXValue() moves\n // a promise directly to the success/error state without starting another notification pass (because one\n // is already ongoing).\n function setErrorInfo(promise, errorId, isException) {\n promise._isException = isException || false;\n promise._errorId = errorId;\n }\n function setErrorValue(promise, value, onerrorDetails, context) {\n promise._value = value;\n callonerror(promise, value, onerrorDetails, context);\n promise._setState(state_error);\n }\n function setCompleteValue(promise, value) {\n var targetState;\n if (value && typeof value === \"object\" && typeof value.then === \"function\") {\n targetState = state_waiting;\n } else {\n targetState = state_success;\n }\n promise._value = value;\n promise._setState(targetState);\n }\n function then(promise, onComplete, onError, onProgress) {\n var result = new ThenPromise(promise);\n var asyncOpID = _Trace._traceAsyncOperationStarting(\"WinJS.Promise.then\");\n pushListener(promise, { promise: result, c: onComplete, e: onError, p: onProgress, asyncOpID: asyncOpID });\n return result;\n }\n\n //\n // Internal implementation detail promise, ThenPromise is created when a promise needs\n // to be returned from a then() method.\n //\n var ThenPromise = _Base.Class.derive(PromiseStateMachine,\n function (creator) {\n\n if (tagWithStack && (tagWithStack === true || (tagWithStack & tag.thenPromise))) {\n this._stack = Promise._getStack();\n }\n\n this._creator = creator;\n this._setState(state_created);\n this._run();\n }, {\n _creator: null,\n\n _cancelAction: function () { if (this._creator) { this._creator.cancel(); } },\n _cleanupAction: function () { this._creator = null; }\n }, {\n supportedForProcessing: false\n }\n );\n\n //\n // Slim promise implementations for already completed promises, these are created\n // under the hood on synchronous completion paths as well as by WinJS.Promise.wrap\n // and WinJS.Promise.wrapError.\n //\n\n var ErrorPromise = _Base.Class.define(\n function ErrorPromise_ctor(value) {\n\n if (tagWithStack && (tagWithStack === true || (tagWithStack & tag.errorPromise))) {\n this._stack = Promise._getStack();\n }\n\n this._value = value;\n callonerror(this, value, detailsForError);\n }, {\n cancel: function () {\n /// \n /// \n /// Attempts to cancel the fulfillment of a promised value. If the promise hasn't\n /// already been fulfilled and cancellation is supported, the promise enters\n /// the error state with a value of Error(\"Canceled\").\n /// \n /// \n },\n done: function ErrorPromise_done(unused, onError) {\n /// \n /// \n /// Allows you to specify the work to be done on the fulfillment of the promised value,\n /// the error handling to be performed if the promise fails to fulfill\n /// a value, and the handling of progress notifications along the way.\n ///\n /// After the handlers have finished executing, this function throws any error that would have been returned\n /// from then() as a promise in the error state.\n /// \n /// \n /// The function to be called if the promise is fulfilled successfully with a value.\n /// The fulfilled value is passed as the single argument. If the value is null,\n /// the fulfilled value is returned. The value returned\n /// from the function becomes the fulfilled value of the promise returned by\n /// then(). If an exception is thrown while executing the function, the promise returned\n /// by then() moves into the error state.\n /// \n /// \n /// The function to be called if the promise is fulfilled with an error. The error\n /// is passed as the single argument. If it is null, the error is forwarded.\n /// The value returned from the function is the fulfilled value of the promise returned by then().\n /// \n /// \n /// the function to be called if the promise reports progress. Data about the progress\n /// is passed as the single argument. Promises are not required to support\n /// progress.\n /// \n /// \n var value = this._value;\n if (onError) {\n try {\n if (!onError.handlesOnError) {\n callonerror(null, value, detailsForHandledError, this, onError);\n }\n var result = onError(value);\n if (result && typeof result === \"object\" && typeof result.done === \"function\") {\n // If a promise is returned we need to wait on it.\n result.done();\n }\n return;\n } catch (ex) {\n value = ex;\n }\n }\n if (value instanceof Error && value.message === canceledName) {\n // suppress cancel\n return;\n }\n // force the exception to be thrown asyncronously to avoid any try/catch blocks\n //\n Promise._doneHandler(value);\n },\n then: function ErrorPromise_then(unused, onError) {\n /// \n /// \n /// Allows you to specify the work to be done on the fulfillment of the promised value,\n /// the error handling to be performed if the promise fails to fulfill\n /// a value, and the handling of progress notifications along the way.\n /// \n /// \n /// The function to be called if the promise is fulfilled successfully with a value.\n /// The value is passed as the single argument. If the value is null, the value is returned.\n /// The value returned from the function becomes the fulfilled value of the promise returned by\n /// then(). If an exception is thrown while this function is being executed, the promise returned\n /// by then() moves into the error state.\n /// \n /// \n /// The function to be called if the promise is fulfilled with an error. The error\n /// is passed as the single argument. If it is null, the error is forwarded.\n /// The value returned from the function becomes the fulfilled value of the promise returned by then().\n /// \n /// \n /// The function to be called if the promise reports progress. Data about the progress\n /// is passed as the single argument. Promises are not required to support\n /// progress.\n /// \n /// \n /// The promise whose value is the result of executing the complete or\n /// error function.\n /// \n /// \n\n // If the promise is already in a error state and no error handler is provided\n // we optimize by simply returning the promise instead of creating a new one.\n //\n if (!onError) { return this; }\n var result;\n var value = this._value;\n try {\n if (!onError.handlesOnError) {\n callonerror(null, value, detailsForHandledError, this, onError);\n }\n result = new CompletePromise(onError(value));\n } catch (ex) {\n // If the value throw from the error handler is the same as the value\n // provided to the error handler then there is no need for a new promise.\n //\n if (ex === value) {\n result = this;\n } else {\n result = new ExceptionPromise(ex);\n }\n }\n return result;\n }\n }, {\n supportedForProcessing: false\n }\n );\n\n var ExceptionPromise = _Base.Class.derive(ErrorPromise,\n function ExceptionPromise_ctor(value) {\n\n if (tagWithStack && (tagWithStack === true || (tagWithStack & tag.exceptionPromise))) {\n this._stack = Promise._getStack();\n }\n\n this._value = value;\n callonerror(this, value, detailsForException);\n }, {\n /* empty */\n }, {\n supportedForProcessing: false\n }\n );\n\n var CompletePromise = _Base.Class.define(\n function CompletePromise_ctor(value) {\n\n if (tagWithStack && (tagWithStack === true || (tagWithStack & tag.completePromise))) {\n this._stack = Promise._getStack();\n }\n\n if (value && typeof value === \"object\" && typeof value.then === \"function\") {\n var result = new ThenPromise(null);\n result._setCompleteValue(value);\n return result;\n }\n this._value = value;\n }, {\n cancel: function () {\n /// \n /// \n /// Attempts to cancel the fulfillment of a promised value. If the promise hasn't\n /// already been fulfilled and cancellation is supported, the promise enters\n /// the error state with a value of Error(\"Canceled\").\n /// \n /// \n },\n done: function CompletePromise_done(onComplete) {\n /// \n /// \n /// Allows you to specify the work to be done on the fulfillment of the promised value,\n /// the error handling to be performed if the promise fails to fulfill\n /// a value, and the handling of progress notifications along the way.\n ///\n /// After the handlers have finished executing, this function throws any error that would have been returned\n /// from then() as a promise in the error state.\n /// \n /// \n /// The function to be called if the promise is fulfilled successfully with a value.\n /// The fulfilled value is passed as the single argument. If the value is null,\n /// the fulfilled value is returned. The value returned\n /// from the function becomes the fulfilled value of the promise returned by\n /// then(). If an exception is thrown while executing the function, the promise returned\n /// by then() moves into the error state.\n /// \n /// \n /// The function to be called if the promise is fulfilled with an error. The error\n /// is passed as the single argument. If it is null, the error is forwarded.\n /// The value returned from the function is the fulfilled value of the promise returned by then().\n /// \n /// \n /// the function to be called if the promise reports progress. Data about the progress\n /// is passed as the single argument. Promises are not required to support\n /// progress.\n /// \n /// \n if (!onComplete) { return; }\n try {\n var result = onComplete(this._value);\n if (result && typeof result === \"object\" && typeof result.done === \"function\") {\n result.done();\n }\n } catch (ex) {\n // force the exception to be thrown asynchronously to avoid any try/catch blocks\n Promise._doneHandler(ex);\n }\n },\n then: function CompletePromise_then(onComplete) {\n /// \n /// \n /// Allows you to specify the work to be done on the fulfillment of the promised value,\n /// the error handling to be performed if the promise fails to fulfill\n /// a value, and the handling of progress notifications along the way.\n /// \n /// \n /// The function to be called if the promise is fulfilled successfully with a value.\n /// The value is passed as the single argument. If the value is null, the value is returned.\n /// The value returned from the function becomes the fulfilled value of the promise returned by\n /// then(). If an exception is thrown while this function is being executed, the promise returned\n /// by then() moves into the error state.\n /// \n /// \n /// The function to be called if the promise is fulfilled with an error. The error\n /// is passed as the single argument. If it is null, the error is forwarded.\n /// The value returned from the function becomes the fulfilled value of the promise returned by then().\n /// \n /// \n /// The function to be called if the promise reports progress. Data about the progress\n /// is passed as the single argument. Promises are not required to support\n /// progress.\n /// \n /// \n /// The promise whose value is the result of executing the complete or\n /// error function.\n /// \n /// \n try {\n // If the value returned from the completion handler is the same as the value\n // provided to the completion handler then there is no need for a new promise.\n //\n var newValue = onComplete ? onComplete(this._value) : this._value;\n return newValue === this._value ? this : new CompletePromise(newValue);\n } catch (ex) {\n return new ExceptionPromise(ex);\n }\n }\n }, {\n supportedForProcessing: false\n }\n );\n\n //\n // Promise is the user-creatable WinJS.Promise object.\n //\n\n function timeout(timeoutMS) {\n var id;\n return new Promise(\n function (c) {\n if (timeoutMS) {\n id = _Global.setTimeout(c, timeoutMS);\n } else {\n _BaseCoreUtils._setImmediate(c);\n }\n },\n function () {\n if (id) {\n _Global.clearTimeout(id);\n }\n }\n );\n }\n\n function timeoutWithPromise(timeout, promise) {\n var cancelPromise = function () { promise.cancel(); };\n var cancelTimeout = function () { timeout.cancel(); };\n timeout.then(cancelPromise);\n promise.then(cancelTimeout, cancelTimeout);\n return promise;\n }\n\n var staticCanceledPromise;\n\n var Promise = _Base.Class.derive(PromiseStateMachine,\n function Promise_ctor(init, oncancel) {\n /// \n /// \n /// A promise provides a mechanism to schedule work to be done on a value that\n /// has not yet been computed. It is a convenient abstraction for managing\n /// interactions with asynchronous APIs.\n /// \n /// \n /// The function that is called during construction of the promise. The function\n /// is given three arguments (complete, error, progress). Inside this function\n /// you should add event listeners for the notifications supported by this value.\n /// \n /// \n /// The function to call if a consumer of this promise wants\n /// to cancel its undone work. Promises are not required to\n /// support cancellation.\n /// \n /// \n\n if (tagWithStack && (tagWithStack === true || (tagWithStack & tag.promise))) {\n this._stack = Promise._getStack();\n }\n\n this._oncancel = oncancel;\n this._setState(state_created);\n this._run();\n\n try {\n var complete = this._completed.bind(this);\n var error = this._error.bind(this);\n var progress = this._progress.bind(this);\n init(complete, error, progress);\n } catch (ex) {\n this._setExceptionValue(ex);\n }\n }, {\n _oncancel: null,\n\n _cancelAction: function () {\n // BEGIN monaco change\n try {\n if (this._oncancel) {\n this._oncancel();\n } else {\n throw new Error('Promise did not implement oncancel');\n }\n } catch (ex) {\n // Access fields to get them created\n var msg = ex.message;\n var stack = ex.stack;\n promiseEventListeners.dispatchEvent('error', ex);\n }\n // END monaco change\n },\n _cleanupAction: function () { this._oncancel = null; }\n }, {\n\n addEventListener: function Promise_addEventListener(eventType, listener, capture) {\n /// \n /// \n /// Adds an event listener to the control.\n /// \n /// \n /// The type (name) of the event.\n /// \n /// \n /// The listener to invoke when the event is raised.\n /// \n /// \n /// Specifies whether or not to initiate capture.\n /// \n /// \n promiseEventListeners.addEventListener(eventType, listener, capture);\n },\n any: function Promise_any(values) {\n /// \n /// \n /// Returns a promise that is fulfilled when one of the input promises\n /// has been fulfilled.\n /// \n /// \n /// An array that contains promise objects or objects whose property\n /// values include promise objects.\n /// \n /// \n /// A promise that on fulfillment yields the value of the input (complete or error).\n /// \n /// \n return new Promise(\n function (complete, error) {\n var keys = Object.keys(values);\n if (keys.length === 0) {\n complete();\n }\n var canceled = 0;\n keys.forEach(function (key) {\n Promise.as(values[key]).then(\n function () { complete({ key: key, value: values[key] }); },\n function (e) {\n if (e instanceof Error && e.name === canceledName) {\n if ((++canceled) === keys.length) {\n complete(Promise.cancel);\n }\n return;\n }\n error({ key: key, value: values[key] });\n }\n );\n });\n },\n function () {\n var keys = Object.keys(values);\n keys.forEach(function (key) {\n var promise = Promise.as(values[key]);\n if (typeof promise.cancel === \"function\") {\n promise.cancel();\n }\n });\n }\n );\n },\n as: function Promise_as(value) {\n /// \n /// \n /// Returns a promise. If the object is already a promise it is returned;\n /// otherwise the object is wrapped in a promise.\n /// \n /// \n /// The value to be treated as a promise.\n /// \n /// \n /// A promise.\n /// \n /// \n if (value && typeof value === \"object\" && typeof value.then === \"function\") {\n return value;\n }\n return new CompletePromise(value);\n },\n /// \n /// Canceled promise value, can be returned from a promise completion handler\n /// to indicate cancelation of the promise chain.\n /// \n cancel: {\n get: function () {\n return (staticCanceledPromise = staticCanceledPromise || new ErrorPromise(new _ErrorFromName(canceledName)));\n }\n },\n dispatchEvent: function Promise_dispatchEvent(eventType, details) {\n /// \n /// \n /// Raises an event of the specified type and properties.\n /// \n /// \n /// The type (name) of the event.\n /// \n /// \n /// The set of additional properties to be attached to the event object.\n /// \n /// \n /// Specifies whether preventDefault was called on the event.\n /// \n /// \n return promiseEventListeners.dispatchEvent(eventType, details);\n },\n is: function Promise_is(value) {\n /// \n /// \n /// Determines whether a value fulfills the promise contract.\n /// \n /// \n /// A value that may be a promise.\n /// \n /// \n /// true if the specified value is a promise, otherwise false.\n /// \n /// \n return value && typeof value === \"object\" && typeof value.then === \"function\";\n },\n join: function Promise_join(values) {\n /// \n /// \n /// Creates a promise that is fulfilled when all the values are fulfilled.\n /// \n /// \n /// An object whose fields contain values, some of which may be promises.\n /// \n /// \n /// A promise whose value is an object with the same field names as those of the object in the values parameter, where\n /// each field value is the fulfilled value of a promise.\n /// \n /// \n return new Promise(\n function (complete, error, progress) {\n var keys = Object.keys(values);\n var errors = Array.isArray(values) ? [] : {};\n var results = Array.isArray(values) ? [] : {};\n var undefineds = 0;\n var pending = keys.length;\n var argDone = function (key) {\n if ((--pending) === 0) {\n var errorCount = Object.keys(errors).length;\n if (errorCount === 0) {\n complete(results);\n } else {\n var canceledCount = 0;\n keys.forEach(function (key) {\n var e = errors[key];\n if (e instanceof Error && e.name === canceledName) {\n canceledCount++;\n }\n });\n if (canceledCount === errorCount) {\n complete(Promise.cancel);\n } else {\n error(errors);\n }\n }\n } else {\n progress({ Key: key, Done: true });\n }\n };\n keys.forEach(function (key) {\n var value = values[key];\n if (value === undefined) {\n undefineds++;\n } else {\n Promise.then(value,\n function (value) { results[key] = value; argDone(key); },\n function (value) { errors[key] = value; argDone(key); }\n );\n }\n });\n pending -= undefineds;\n if (pending === 0) {\n complete(results);\n return;\n }\n },\n function () {\n Object.keys(values).forEach(function (key) {\n var promise = Promise.as(values[key]);\n if (typeof promise.cancel === \"function\") {\n promise.cancel();\n }\n });\n }\n );\n },\n removeEventListener: function Promise_removeEventListener(eventType, listener, capture) {\n /// \n /// \n /// Removes an event listener from the control.\n /// \n /// \n /// The type (name) of the event.\n /// \n /// \n /// The listener to remove.\n /// \n /// \n /// Specifies whether or not to initiate capture.\n /// \n /// \n promiseEventListeners.removeEventListener(eventType, listener, capture);\n },\n supportedForProcessing: false,\n then: function Promise_then(value, onComplete, onError, onProgress) {\n /// \n /// \n /// A static version of the promise instance method then().\n /// \n /// \n /// the value to be treated as a promise.\n /// \n /// \n /// The function to be called if the promise is fulfilled with a value.\n /// If it is null, the promise simply\n /// returns the value. The value is passed as the single argument.\n /// \n /// \n /// The function to be called if the promise is fulfilled with an error. The error\n /// is passed as the single argument.\n /// \n /// \n /// The function to be called if the promise reports progress. Data about the progress\n /// is passed as the single argument. Promises are not required to support\n /// progress.\n /// \n /// \n /// A promise whose value is the result of executing the provided complete function.\n /// \n /// \n return Promise.as(value).then(onComplete, onError, onProgress);\n },\n thenEach: function Promise_thenEach(values, onComplete, onError, onProgress) {\n /// \n /// \n /// Performs an operation on all the input promises and returns a promise\n /// that has the shape of the input and contains the result of the operation\n /// that has been performed on each input.\n /// \n /// \n /// A set of values (which could be either an array or an object) of which some or all are promises.\n /// \n /// \n /// The function to be called if the promise is fulfilled with a value.\n /// If the value is null, the promise returns the value.\n /// The value is passed as the single argument.\n /// \n /// \n /// The function to be called if the promise is fulfilled with an error. The error\n /// is passed as the single argument.\n /// \n /// \n /// The function to be called if the promise reports progress. Data about the progress\n /// is passed as the single argument. Promises are not required to support\n /// progress.\n /// \n /// \n /// A promise that is the result of calling Promise.join on the values parameter.\n /// \n /// \n var result = Array.isArray(values) ? [] : {};\n Object.keys(values).forEach(function (key) {\n result[key] = Promise.as(values[key]).then(onComplete, onError, onProgress);\n });\n return Promise.join(result);\n },\n timeout: function Promise_timeout(time, promise) {\n /// \n /// \n /// Creates a promise that is fulfilled after a timeout.\n /// \n /// \n /// The timeout period in milliseconds. If this value is zero or not specified\n /// setImmediate is called, otherwise setTimeout is called.\n /// \n /// \n /// A promise that will be canceled if it doesn't complete before the\n /// timeout has expired.\n /// \n /// \n /// A promise that is completed asynchronously after the specified timeout.\n /// \n /// \n var to = timeout(time);\n return promise ? timeoutWithPromise(to, promise) : to;\n },\n wrap: function Promise_wrap(value) {\n /// \n /// \n /// Wraps a non-promise value in a promise. You can use this function if you need\n /// to pass a value to a function that requires a promise.\n /// \n /// \n /// Some non-promise value to be wrapped in a promise.\n /// \n /// \n /// A promise that is successfully fulfilled with the specified value\n /// \n /// \n return new CompletePromise(value);\n },\n wrapError: function Promise_wrapError(error) {\n /// \n /// \n /// Wraps a non-promise error value in a promise. You can use this function if you need\n /// to pass an error to a function that requires a promise.\n /// \n /// \n /// A non-promise error value to be wrapped in a promise.\n /// \n /// \n /// A promise that is in an error state with the specified value.\n /// \n /// \n return new ErrorPromise(error);\n },\n\n _veryExpensiveTagWithStack: {\n get: function () { return tagWithStack; },\n set: function (value) { tagWithStack = value; }\n },\n _veryExpensiveTagWithStack_tag: tag,\n _getStack: function () {\n if (_Global.Debug && _Global.Debug.debuggerEnabled) {\n try { throw new Error(); } catch (e) { return e.stack; }\n }\n },\n\n _cancelBlocker: function Promise__cancelBlocker(input, oncancel) {\n //\n // Returns a promise which on cancelation will still result in downstream cancelation while\n // protecting the promise 'input' from being canceled which has the effect of allowing\n // 'input' to be shared amoung various consumers.\n //\n if (!Promise.is(input)) {\n return Promise.wrap(input);\n }\n var complete;\n var error;\n var output = new Promise(\n function (c, e) {\n complete = c;\n error = e;\n },\n function () {\n complete = null;\n error = null;\n oncancel && oncancel();\n }\n );\n input.then(\n function (v) { complete && complete(v); },\n function (e) { error && error(e); }\n );\n return output;\n },\n\n }\n );\n Object.defineProperties(Promise, _Events.createEventProperties(errorET));\n\n Promise._doneHandler = function (value) {\n _BaseCoreUtils._setImmediate(function Promise_done_rethrow() {\n throw value;\n });\n };\n\n return {\n PromiseStateMachine: PromiseStateMachine,\n Promise: Promise,\n state_created: state_created\n };\n});\n\n_winjs(\"WinJS/Promise\", [\"WinJS/Core/_Base\",\"WinJS/Promise/_StateMachine\"], function promiseInit( _Base, _StateMachine) {\n \"use strict\";\n\n _Base.Namespace.define(\"WinJS\", {\n Promise: _StateMachine.Promise\n });\n\n return _StateMachine.Promise;\n});\n\n__winjs_exports = _modules[\"WinJS/Core/_WinJS\"];\n__winjs_exports.TPromise = __winjs_exports.Promise;\n__winjs_exports.PPromise = __winjs_exports.Promise;\n\n// ESM-comment-begin\n// if (typeof exports === 'undefined' && typeof define === 'function' && define.amd) {\n// define([], __winjs_exports);\n// } else {\n// module.exports = __winjs_exports;\n// }\n// ESM-comment-end\n\n})();\n\n// ESM-uncomment-begin\nexport var Promise = __winjs_exports.Promise;\nexport var TPromise = __winjs_exports.TPromise;\nexport var PPromise = __winjs_exports.PPromise;\n// ESM-uncomment-end\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport * as strings from '../../../base/common/strings';\nimport { CursorColumns } from '../controller/cursorCommon';\nimport { Range } from '../core/range';\nimport { Selection, SelectionDirection } from '../core/selection';\nimport { LanguageConfigurationRegistry } from '../modes/languageConfigurationRegistry';\nvar ShiftCommand = /** @class */ (function () {\n function ShiftCommand(range, opts) {\n this._opts = opts;\n this._selection = range;\n this._useLastEditRangeForCursorEndPosition = false;\n this._selectionStartColumnStaysPut = false;\n }\n ShiftCommand.unshiftIndentCount = function (line, column, tabSize) {\n // Determine the visible column where the content starts\n var contentStartVisibleColumn = CursorColumns.visibleColumnFromColumn(line, column, tabSize);\n var desiredTabStop = CursorColumns.prevTabStop(contentStartVisibleColumn, tabSize);\n // The `desiredTabStop` is a multiple of `tabSize` => determine the number of indents\n return desiredTabStop / tabSize;\n };\n ShiftCommand.shiftIndentCount = function (line, column, tabSize) {\n // Determine the visible column where the content starts\n var contentStartVisibleColumn = CursorColumns.visibleColumnFromColumn(line, column, tabSize);\n var desiredTabStop = CursorColumns.nextTabStop(contentStartVisibleColumn, tabSize);\n // The `desiredTabStop` is a multiple of `tabSize` => determine the number of indents\n return desiredTabStop / tabSize;\n };\n ShiftCommand.prototype._addEditOperation = function (builder, range, text) {\n if (this._useLastEditRangeForCursorEndPosition) {\n builder.addTrackedEditOperation(range, text);\n }\n else {\n builder.addEditOperation(range, text);\n }\n };\n ShiftCommand.prototype.getEditOperations = function (model, builder) {\n var startLine = this._selection.startLineNumber;\n var endLine = this._selection.endLineNumber;\n if (this._selection.endColumn === 1 && startLine !== endLine) {\n endLine = endLine - 1;\n }\n var tabSize = this._opts.tabSize;\n var oneIndent = this._opts.oneIndent;\n var shouldIndentEmptyLines = (startLine === endLine);\n // if indenting or outdenting on a whitespace only line\n if (this._selection.isEmpty()) {\n if (/^\\s*$/.test(model.getLineContent(startLine))) {\n this._useLastEditRangeForCursorEndPosition = true;\n }\n }\n if (this._opts.useTabStops) {\n // indents[i] represents i * oneIndent\n var indents = ['', oneIndent];\n // keep track of previous line's \"miss-alignment\"\n var previousLineExtraSpaces = 0, extraSpaces = 0;\n for (var lineNumber = startLine; lineNumber <= endLine; lineNumber++, previousLineExtraSpaces = extraSpaces) {\n extraSpaces = 0;\n var lineText = model.getLineContent(lineNumber);\n var indentationEndIndex = strings.firstNonWhitespaceIndex(lineText);\n if (this._opts.isUnshift && (lineText.length === 0 || indentationEndIndex === 0)) {\n // empty line or line with no leading whitespace => nothing to do\n continue;\n }\n if (!shouldIndentEmptyLines && !this._opts.isUnshift && lineText.length === 0) {\n // do not indent empty lines => nothing to do\n continue;\n }\n if (indentationEndIndex === -1) {\n // the entire line is whitespace\n indentationEndIndex = lineText.length;\n }\n if (lineNumber > 1) {\n var contentStartVisibleColumn = CursorColumns.visibleColumnFromColumn(lineText, indentationEndIndex + 1, tabSize);\n if (contentStartVisibleColumn % tabSize !== 0) {\n // The current line is \"miss-aligned\", so let's see if this is expected...\n // This can only happen when it has trailing commas in the indent\n if (model.isCheapToTokenize(lineNumber - 1)) {\n var enterAction = LanguageConfigurationRegistry.getRawEnterActionAtPosition(model, lineNumber - 1, model.getLineMaxColumn(lineNumber - 1));\n if (enterAction) {\n extraSpaces = previousLineExtraSpaces;\n if (enterAction.appendText) {\n for (var j = 0, lenJ = enterAction.appendText.length; j < lenJ && extraSpaces < tabSize; j++) {\n if (enterAction.appendText.charCodeAt(j) === 32 /* Space */) {\n extraSpaces++;\n }\n else {\n break;\n }\n }\n }\n if (enterAction.removeText) {\n extraSpaces = Math.max(0, extraSpaces - enterAction.removeText);\n }\n // Act as if `prefixSpaces` is not part of the indentation\n for (var j = 0; j < extraSpaces; j++) {\n if (indentationEndIndex === 0 || lineText.charCodeAt(indentationEndIndex - 1) !== 32 /* Space */) {\n break;\n }\n indentationEndIndex--;\n }\n }\n }\n }\n }\n if (this._opts.isUnshift && indentationEndIndex === 0) {\n // line with no leading whitespace => nothing to do\n continue;\n }\n var desiredIndentCount = void 0;\n if (this._opts.isUnshift) {\n desiredIndentCount = ShiftCommand.unshiftIndentCount(lineText, indentationEndIndex + 1, tabSize);\n }\n else {\n desiredIndentCount = ShiftCommand.shiftIndentCount(lineText, indentationEndIndex + 1, tabSize);\n }\n // Fill `indents`, as needed\n for (var j = indents.length; j <= desiredIndentCount; j++) {\n indents[j] = indents[j - 1] + oneIndent;\n }\n this._addEditOperation(builder, new Range(lineNumber, 1, lineNumber, indentationEndIndex + 1), indents[desiredIndentCount]);\n if (lineNumber === startLine) {\n // Force the startColumn to stay put because we're inserting after it\n this._selectionStartColumnStaysPut = (this._selection.startColumn <= indentationEndIndex + 1);\n }\n }\n }\n else {\n for (var lineNumber = startLine; lineNumber <= endLine; lineNumber++) {\n var lineText = model.getLineContent(lineNumber);\n var indentationEndIndex = strings.firstNonWhitespaceIndex(lineText);\n if (this._opts.isUnshift && (lineText.length === 0 || indentationEndIndex === 0)) {\n // empty line or line with no leading whitespace => nothing to do\n continue;\n }\n if (!shouldIndentEmptyLines && !this._opts.isUnshift && lineText.length === 0) {\n // do not indent empty lines => nothing to do\n continue;\n }\n if (indentationEndIndex === -1) {\n // the entire line is whitespace\n indentationEndIndex = lineText.length;\n }\n if (this._opts.isUnshift && indentationEndIndex === 0) {\n // line with no leading whitespace => nothing to do\n continue;\n }\n if (this._opts.isUnshift) {\n indentationEndIndex = Math.min(indentationEndIndex, tabSize);\n for (var i = 0; i < indentationEndIndex; i++) {\n var chr = lineText.charCodeAt(i);\n if (chr === 9 /* Tab */) {\n indentationEndIndex = i + 1;\n break;\n }\n }\n this._addEditOperation(builder, new Range(lineNumber, 1, lineNumber, indentationEndIndex + 1), '');\n }\n else {\n this._addEditOperation(builder, new Range(lineNumber, 1, lineNumber, 1), oneIndent);\n if (lineNumber === startLine) {\n // Force the startColumn to stay put because we're inserting after it\n this._selectionStartColumnStaysPut = (this._selection.startColumn === 1);\n }\n }\n }\n }\n this._selectionId = builder.trackSelection(this._selection);\n };\n ShiftCommand.prototype.computeCursorState = function (model, helper) {\n if (this._useLastEditRangeForCursorEndPosition) {\n var lastOp = helper.getInverseEditOperations()[0];\n return new Selection(lastOp.range.endLineNumber, lastOp.range.endColumn, lastOp.range.endLineNumber, lastOp.range.endColumn);\n }\n var result = helper.getTrackedSelection(this._selectionId);\n if (this._selectionStartColumnStaysPut) {\n // The selection start should not move\n var initialStartColumn = this._selection.startColumn;\n var resultStartColumn = result.startColumn;\n if (resultStartColumn <= initialStartColumn) {\n return result;\n }\n if (result.getDirection() === SelectionDirection.LTR) {\n return new Selection(result.startLineNumber, initialStartColumn, result.endLineNumber, result.endColumn);\n }\n return new Selection(result.endLineNumber, result.endColumn, result.startLineNumber, initialStartColumn);\n }\n return result;\n };\n return ShiftCommand;\n}());\nexport { ShiftCommand };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar __assign = (this && this.__assign) || Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n};\nimport * as nls from '../../../nls';\nimport * as platform from '../../../base/common/platform';\nimport { ScrollbarVisibility } from '../../../base/common/scrollable';\nimport { USUAL_WORD_SEPARATORS } from '../model/wordHelper';\nimport * as arrays from '../../../base/common/arrays';\nimport * as objects from '../../../base/common/objects';\nexport var RenderMinimap;\n(function (RenderMinimap) {\n RenderMinimap[RenderMinimap[\"None\"] = 0] = \"None\";\n RenderMinimap[RenderMinimap[\"Small\"] = 1] = \"Small\";\n RenderMinimap[RenderMinimap[\"Large\"] = 2] = \"Large\";\n RenderMinimap[RenderMinimap[\"SmallBlocks\"] = 3] = \"SmallBlocks\";\n RenderMinimap[RenderMinimap[\"LargeBlocks\"] = 4] = \"LargeBlocks\";\n})(RenderMinimap || (RenderMinimap = {}));\n/**\n * Describes how to indent wrapped lines.\n */\nexport var WrappingIndent;\n(function (WrappingIndent) {\n /**\n * No indentation => wrapped lines begin at column 1.\n */\n WrappingIndent[WrappingIndent[\"None\"] = 0] = \"None\";\n /**\n * Same => wrapped lines get the same indentation as the parent.\n */\n WrappingIndent[WrappingIndent[\"Same\"] = 1] = \"Same\";\n /**\n * Indent => wrapped lines get +1 indentation toward the parent.\n */\n WrappingIndent[WrappingIndent[\"Indent\"] = 2] = \"Indent\";\n /**\n * DeepIndent => wrapped lines get +2 indentation toward the parent.\n */\n WrappingIndent[WrappingIndent[\"DeepIndent\"] = 3] = \"DeepIndent\";\n})(WrappingIndent || (WrappingIndent = {}));\n/**\n * The kind of animation in which the editor's cursor should be rendered.\n */\nexport var TextEditorCursorBlinkingStyle;\n(function (TextEditorCursorBlinkingStyle) {\n /**\n * Hidden\n */\n TextEditorCursorBlinkingStyle[TextEditorCursorBlinkingStyle[\"Hidden\"] = 0] = \"Hidden\";\n /**\n * Blinking\n */\n TextEditorCursorBlinkingStyle[TextEditorCursorBlinkingStyle[\"Blink\"] = 1] = \"Blink\";\n /**\n * Blinking with smooth fading\n */\n TextEditorCursorBlinkingStyle[TextEditorCursorBlinkingStyle[\"Smooth\"] = 2] = \"Smooth\";\n /**\n * Blinking with prolonged filled state and smooth fading\n */\n TextEditorCursorBlinkingStyle[TextEditorCursorBlinkingStyle[\"Phase\"] = 3] = \"Phase\";\n /**\n * Expand collapse animation on the y axis\n */\n TextEditorCursorBlinkingStyle[TextEditorCursorBlinkingStyle[\"Expand\"] = 4] = \"Expand\";\n /**\n * No-Blinking\n */\n TextEditorCursorBlinkingStyle[TextEditorCursorBlinkingStyle[\"Solid\"] = 5] = \"Solid\";\n})(TextEditorCursorBlinkingStyle || (TextEditorCursorBlinkingStyle = {}));\n/**\n * @internal\n */\nexport function blinkingStyleToString(blinkingStyle) {\n if (blinkingStyle === TextEditorCursorBlinkingStyle.Blink) {\n return 'blink';\n }\n else if (blinkingStyle === TextEditorCursorBlinkingStyle.Expand) {\n return 'expand';\n }\n else if (blinkingStyle === TextEditorCursorBlinkingStyle.Phase) {\n return 'phase';\n }\n else if (blinkingStyle === TextEditorCursorBlinkingStyle.Smooth) {\n return 'smooth';\n }\n else if (blinkingStyle === TextEditorCursorBlinkingStyle.Solid) {\n return 'solid';\n }\n else {\n throw new Error('blinkingStyleToString: Unknown blinkingStyle');\n }\n}\n/**\n * The style in which the editor's cursor should be rendered.\n */\nexport var TextEditorCursorStyle;\n(function (TextEditorCursorStyle) {\n /**\n * As a vertical line (sitting between two characters).\n */\n TextEditorCursorStyle[TextEditorCursorStyle[\"Line\"] = 1] = \"Line\";\n /**\n * As a block (sitting on top of a character).\n */\n TextEditorCursorStyle[TextEditorCursorStyle[\"Block\"] = 2] = \"Block\";\n /**\n * As a horizontal line (sitting under a character).\n */\n TextEditorCursorStyle[TextEditorCursorStyle[\"Underline\"] = 3] = \"Underline\";\n /**\n * As a thin vertical line (sitting between two characters).\n */\n TextEditorCursorStyle[TextEditorCursorStyle[\"LineThin\"] = 4] = \"LineThin\";\n /**\n * As an outlined block (sitting on top of a character).\n */\n TextEditorCursorStyle[TextEditorCursorStyle[\"BlockOutline\"] = 5] = \"BlockOutline\";\n /**\n * As a thin horizontal line (sitting under a character).\n */\n TextEditorCursorStyle[TextEditorCursorStyle[\"UnderlineThin\"] = 6] = \"UnderlineThin\";\n})(TextEditorCursorStyle || (TextEditorCursorStyle = {}));\n/**\n * @internal\n */\nexport function cursorStyleToString(cursorStyle) {\n if (cursorStyle === TextEditorCursorStyle.Line) {\n return 'line';\n }\n else if (cursorStyle === TextEditorCursorStyle.Block) {\n return 'block';\n }\n else if (cursorStyle === TextEditorCursorStyle.Underline) {\n return 'underline';\n }\n else if (cursorStyle === TextEditorCursorStyle.LineThin) {\n return 'line-thin';\n }\n else if (cursorStyle === TextEditorCursorStyle.BlockOutline) {\n return 'block-outline';\n }\n else if (cursorStyle === TextEditorCursorStyle.UnderlineThin) {\n return 'underline-thin';\n }\n else {\n throw new Error('cursorStyleToString: Unknown cursorStyle');\n }\n}\nfunction _cursorStyleFromString(cursorStyle, defaultValue) {\n if (typeof cursorStyle !== 'string') {\n return defaultValue;\n }\n if (cursorStyle === 'line') {\n return TextEditorCursorStyle.Line;\n }\n else if (cursorStyle === 'block') {\n return TextEditorCursorStyle.Block;\n }\n else if (cursorStyle === 'underline') {\n return TextEditorCursorStyle.Underline;\n }\n else if (cursorStyle === 'line-thin') {\n return TextEditorCursorStyle.LineThin;\n }\n else if (cursorStyle === 'block-outline') {\n return TextEditorCursorStyle.BlockOutline;\n }\n else if (cursorStyle === 'underline-thin') {\n return TextEditorCursorStyle.UnderlineThin;\n }\n return TextEditorCursorStyle.Line;\n}\n/**\n * Internal configuration options (transformed or computed) for the editor.\n */\nvar InternalEditorOptions = /** @class */ (function () {\n /**\n * @internal\n */\n function InternalEditorOptions(source) {\n this.canUseLayerHinting = source.canUseLayerHinting;\n this.pixelRatio = source.pixelRatio;\n this.editorClassName = source.editorClassName;\n this.lineHeight = source.lineHeight | 0;\n this.readOnly = source.readOnly;\n this.accessibilitySupport = source.accessibilitySupport;\n this.multiCursorModifier = source.multiCursorModifier;\n this.multiCursorMergeOverlapping = source.multiCursorMergeOverlapping;\n this.wordSeparators = source.wordSeparators;\n this.autoClosingBrackets = source.autoClosingBrackets;\n this.autoIndent = source.autoIndent;\n this.useTabStops = source.useTabStops;\n this.tabFocusMode = source.tabFocusMode;\n this.dragAndDrop = source.dragAndDrop;\n this.emptySelectionClipboard = source.emptySelectionClipboard;\n this.layoutInfo = source.layoutInfo;\n this.fontInfo = source.fontInfo;\n this.viewInfo = source.viewInfo;\n this.wrappingInfo = source.wrappingInfo;\n this.contribInfo = source.contribInfo;\n this.showUnused = source.showUnused;\n }\n /**\n * @internal\n */\n InternalEditorOptions.prototype.equals = function (other) {\n return (this.canUseLayerHinting === other.canUseLayerHinting\n && this.pixelRatio === other.pixelRatio\n && this.editorClassName === other.editorClassName\n && this.lineHeight === other.lineHeight\n && this.readOnly === other.readOnly\n && this.accessibilitySupport === other.accessibilitySupport\n && this.multiCursorModifier === other.multiCursorModifier\n && this.multiCursorMergeOverlapping === other.multiCursorMergeOverlapping\n && this.wordSeparators === other.wordSeparators\n && this.autoClosingBrackets === other.autoClosingBrackets\n && this.autoIndent === other.autoIndent\n && this.useTabStops === other.useTabStops\n && this.tabFocusMode === other.tabFocusMode\n && this.dragAndDrop === other.dragAndDrop\n && this.showUnused === other.showUnused\n && this.emptySelectionClipboard === other.emptySelectionClipboard\n && InternalEditorOptions._equalsLayoutInfo(this.layoutInfo, other.layoutInfo)\n && this.fontInfo.equals(other.fontInfo)\n && InternalEditorOptions._equalsViewOptions(this.viewInfo, other.viewInfo)\n && InternalEditorOptions._equalsWrappingInfo(this.wrappingInfo, other.wrappingInfo)\n && InternalEditorOptions._equalsContribOptions(this.contribInfo, other.contribInfo));\n };\n /**\n * @internal\n */\n InternalEditorOptions.prototype.createChangeEvent = function (newOpts) {\n return {\n canUseLayerHinting: (this.canUseLayerHinting !== newOpts.canUseLayerHinting),\n pixelRatio: (this.pixelRatio !== newOpts.pixelRatio),\n editorClassName: (this.editorClassName !== newOpts.editorClassName),\n lineHeight: (this.lineHeight !== newOpts.lineHeight),\n readOnly: (this.readOnly !== newOpts.readOnly),\n accessibilitySupport: (this.accessibilitySupport !== newOpts.accessibilitySupport),\n multiCursorModifier: (this.multiCursorModifier !== newOpts.multiCursorModifier),\n multiCursorMergeOverlapping: (this.multiCursorMergeOverlapping !== newOpts.multiCursorMergeOverlapping),\n wordSeparators: (this.wordSeparators !== newOpts.wordSeparators),\n autoClosingBrackets: (this.autoClosingBrackets !== newOpts.autoClosingBrackets),\n autoIndent: (this.autoIndent !== newOpts.autoIndent),\n useTabStops: (this.useTabStops !== newOpts.useTabStops),\n tabFocusMode: (this.tabFocusMode !== newOpts.tabFocusMode),\n dragAndDrop: (this.dragAndDrop !== newOpts.dragAndDrop),\n emptySelectionClipboard: (this.emptySelectionClipboard !== newOpts.emptySelectionClipboard),\n layoutInfo: (!InternalEditorOptions._equalsLayoutInfo(this.layoutInfo, newOpts.layoutInfo)),\n fontInfo: (!this.fontInfo.equals(newOpts.fontInfo)),\n viewInfo: (!InternalEditorOptions._equalsViewOptions(this.viewInfo, newOpts.viewInfo)),\n wrappingInfo: (!InternalEditorOptions._equalsWrappingInfo(this.wrappingInfo, newOpts.wrappingInfo)),\n contribInfo: (!InternalEditorOptions._equalsContribOptions(this.contribInfo, newOpts.contribInfo))\n };\n };\n /**\n * @internal\n */\n InternalEditorOptions._equalsLayoutInfo = function (a, b) {\n return (a.width === b.width\n && a.height === b.height\n && a.glyphMarginLeft === b.glyphMarginLeft\n && a.glyphMarginWidth === b.glyphMarginWidth\n && a.glyphMarginHeight === b.glyphMarginHeight\n && a.lineNumbersLeft === b.lineNumbersLeft\n && a.lineNumbersWidth === b.lineNumbersWidth\n && a.lineNumbersHeight === b.lineNumbersHeight\n && a.decorationsLeft === b.decorationsLeft\n && a.decorationsWidth === b.decorationsWidth\n && a.decorationsHeight === b.decorationsHeight\n && a.contentLeft === b.contentLeft\n && a.contentWidth === b.contentWidth\n && a.contentHeight === b.contentHeight\n && a.renderMinimap === b.renderMinimap\n && a.minimapLeft === b.minimapLeft\n && a.minimapWidth === b.minimapWidth\n && a.viewportColumn === b.viewportColumn\n && a.verticalScrollbarWidth === b.verticalScrollbarWidth\n && a.horizontalScrollbarHeight === b.horizontalScrollbarHeight\n && this._equalsOverviewRuler(a.overviewRuler, b.overviewRuler));\n };\n /**\n * @internal\n */\n InternalEditorOptions._equalsOverviewRuler = function (a, b) {\n return (a.width === b.width\n && a.height === b.height\n && a.top === b.top\n && a.right === b.right);\n };\n /**\n * @internal\n */\n InternalEditorOptions._equalsViewOptions = function (a, b) {\n return (a.extraEditorClassName === b.extraEditorClassName\n && a.disableMonospaceOptimizations === b.disableMonospaceOptimizations\n && arrays.equals(a.rulers, b.rulers)\n && a.ariaLabel === b.ariaLabel\n && a.renderLineNumbers === b.renderLineNumbers\n && a.renderCustomLineNumbers === b.renderCustomLineNumbers\n && a.selectOnLineNumbers === b.selectOnLineNumbers\n && a.glyphMargin === b.glyphMargin\n && a.revealHorizontalRightPadding === b.revealHorizontalRightPadding\n && a.roundedSelection === b.roundedSelection\n && a.overviewRulerLanes === b.overviewRulerLanes\n && a.overviewRulerBorder === b.overviewRulerBorder\n && a.cursorBlinking === b.cursorBlinking\n && a.mouseWheelZoom === b.mouseWheelZoom\n && a.cursorStyle === b.cursorStyle\n && a.cursorWidth === b.cursorWidth\n && a.hideCursorInOverviewRuler === b.hideCursorInOverviewRuler\n && a.scrollBeyondLastLine === b.scrollBeyondLastLine\n && a.scrollBeyondLastColumn === b.scrollBeyondLastColumn\n && a.smoothScrolling === b.smoothScrolling\n && a.stopRenderingLineAfter === b.stopRenderingLineAfter\n && a.renderWhitespace === b.renderWhitespace\n && a.renderControlCharacters === b.renderControlCharacters\n && a.fontLigatures === b.fontLigatures\n && a.renderIndentGuides === b.renderIndentGuides\n && a.highlightActiveIndentGuide === b.highlightActiveIndentGuide\n && a.renderLineHighlight === b.renderLineHighlight\n && this._equalsScrollbarOptions(a.scrollbar, b.scrollbar)\n && this._equalsMinimapOptions(a.minimap, b.minimap)\n && a.fixedOverflowWidgets === b.fixedOverflowWidgets);\n };\n /**\n * @internal\n */\n InternalEditorOptions._equalsScrollbarOptions = function (a, b) {\n return (a.arrowSize === b.arrowSize\n && a.vertical === b.vertical\n && a.horizontal === b.horizontal\n && a.useShadows === b.useShadows\n && a.verticalHasArrows === b.verticalHasArrows\n && a.horizontalHasArrows === b.horizontalHasArrows\n && a.handleMouseWheel === b.handleMouseWheel\n && a.horizontalScrollbarSize === b.horizontalScrollbarSize\n && a.horizontalSliderSize === b.horizontalSliderSize\n && a.verticalScrollbarSize === b.verticalScrollbarSize\n && a.verticalSliderSize === b.verticalSliderSize\n && a.mouseWheelScrollSensitivity === b.mouseWheelScrollSensitivity);\n };\n /**\n * @internal\n */\n InternalEditorOptions._equalsMinimapOptions = function (a, b) {\n return (a.enabled === b.enabled\n && a.side === b.side\n && a.showSlider === b.showSlider\n && a.renderCharacters === b.renderCharacters\n && a.maxColumn === b.maxColumn);\n };\n /**\n * @internal\n */\n InternalEditorOptions._equalFindOptions = function (a, b) {\n return (a.seedSearchStringFromSelection === b.seedSearchStringFromSelection\n && a.autoFindInSelection === b.autoFindInSelection\n && a.globalFindClipboard === b.globalFindClipboard);\n };\n /**\n * @internal\n */\n InternalEditorOptions._equalsHoverOptions = function (a, b) {\n return (a.enabled === b.enabled\n && a.delay === b.delay\n && a.sticky === b.sticky);\n };\n /**\n * @internal\n */\n InternalEditorOptions._equalsSuggestOptions = function (a, b) {\n if (a === b) {\n return true;\n }\n else if (!a || !b) {\n return false;\n }\n else {\n return a.filterGraceful === b.filterGraceful\n && a.snippets === b.snippets\n && a.snippetsPreventQuickSuggestions === b.snippetsPreventQuickSuggestions;\n }\n };\n /**\n * @internal\n */\n InternalEditorOptions._equalsWrappingInfo = function (a, b) {\n return (a.inDiffEditor === b.inDiffEditor\n && a.isDominatedByLongLines === b.isDominatedByLongLines\n && a.isWordWrapMinified === b.isWordWrapMinified\n && a.isViewportWrapping === b.isViewportWrapping\n && a.wrappingColumn === b.wrappingColumn\n && a.wrappingIndent === b.wrappingIndent\n && a.wordWrapBreakBeforeCharacters === b.wordWrapBreakBeforeCharacters\n && a.wordWrapBreakAfterCharacters === b.wordWrapBreakAfterCharacters\n && a.wordWrapBreakObtrusiveCharacters === b.wordWrapBreakObtrusiveCharacters);\n };\n /**\n * @internal\n */\n InternalEditorOptions._equalsContribOptions = function (a, b) {\n return (a.selectionClipboard === b.selectionClipboard\n && this._equalsHoverOptions(a.hover, b.hover)\n && a.links === b.links\n && a.contextmenu === b.contextmenu\n && InternalEditorOptions._equalsQuickSuggestions(a.quickSuggestions, b.quickSuggestions)\n && a.quickSuggestionsDelay === b.quickSuggestionsDelay\n && a.parameterHints === b.parameterHints\n && a.iconsInSuggestions === b.iconsInSuggestions\n && a.formatOnType === b.formatOnType\n && a.formatOnPaste === b.formatOnPaste\n && a.suggestOnTriggerCharacters === b.suggestOnTriggerCharacters\n && a.acceptSuggestionOnEnter === b.acceptSuggestionOnEnter\n && a.acceptSuggestionOnCommitCharacter === b.acceptSuggestionOnCommitCharacter\n && a.wordBasedSuggestions === b.wordBasedSuggestions\n && a.suggestSelection === b.suggestSelection\n && a.suggestFontSize === b.suggestFontSize\n && a.suggestLineHeight === b.suggestLineHeight\n && this._equalsSuggestOptions(a.suggest, b.suggest)\n && a.selectionHighlight === b.selectionHighlight\n && a.occurrencesHighlight === b.occurrencesHighlight\n && a.codeLens === b.codeLens\n && a.folding === b.folding\n && a.foldingStrategy === b.foldingStrategy\n && a.showFoldingControls === b.showFoldingControls\n && a.matchBrackets === b.matchBrackets\n && this._equalFindOptions(a.find, b.find)\n && a.colorDecorators === b.colorDecorators\n && objects.equals(a.codeActionsOnSave, b.codeActionsOnSave)\n && a.codeActionsOnSaveTimeout === b.codeActionsOnSaveTimeout\n && a.lightbulbEnabled === b.lightbulbEnabled);\n };\n InternalEditorOptions._equalsQuickSuggestions = function (a, b) {\n if (typeof a === 'boolean') {\n if (typeof b !== 'boolean') {\n return false;\n }\n return a === b;\n }\n if (typeof b === 'boolean') {\n return false;\n }\n return (a.comments === b.comments\n && a.other === b.other\n && a.strings === b.strings);\n };\n return InternalEditorOptions;\n}());\nexport { InternalEditorOptions };\nfunction _boolean(value, defaultValue) {\n if (typeof value === 'undefined') {\n return defaultValue;\n }\n if (value === 'false') {\n // treat the string 'false' as false\n return false;\n }\n return Boolean(value);\n}\nfunction _booleanMap(value, defaultValue) {\n if (!value) {\n return defaultValue;\n }\n var out = Object.create(null);\n for (var _i = 0, _a = Object.keys(value); _i < _a.length; _i++) {\n var k = _a[_i];\n var v = value[k];\n if (typeof v === 'boolean') {\n out[k] = v;\n }\n }\n return out;\n}\nfunction _string(value, defaultValue) {\n if (typeof value !== 'string') {\n return defaultValue;\n }\n return value;\n}\nfunction _stringSet(value, defaultValue, allowedValues) {\n if (typeof value !== 'string') {\n return defaultValue;\n }\n if (allowedValues.indexOf(value) === -1) {\n return defaultValue;\n }\n return value;\n}\nfunction _clampedInt(value, defaultValue, minimum, maximum) {\n var r;\n if (typeof value === 'undefined') {\n r = defaultValue;\n }\n else {\n r = parseInt(value, 10);\n if (isNaN(r)) {\n r = defaultValue;\n }\n }\n r = Math.max(minimum, r);\n r = Math.min(maximum, r);\n return r | 0;\n}\nfunction _float(value, defaultValue) {\n var r = parseFloat(value);\n if (isNaN(r)) {\n r = defaultValue;\n }\n return r;\n}\nfunction _wrappingIndentFromString(wrappingIndent, defaultValue) {\n if (typeof wrappingIndent !== 'string') {\n return defaultValue;\n }\n if (wrappingIndent === 'same') {\n return WrappingIndent.Same;\n }\n else if (wrappingIndent === 'indent') {\n return WrappingIndent.Indent;\n }\n else if (wrappingIndent === 'deepIndent') {\n return WrappingIndent.DeepIndent;\n }\n else {\n return WrappingIndent.None;\n }\n}\nfunction _cursorBlinkingStyleFromString(cursorBlinkingStyle, defaultValue) {\n if (typeof cursorBlinkingStyle !== 'string') {\n return defaultValue;\n }\n switch (cursorBlinkingStyle) {\n case 'blink':\n return TextEditorCursorBlinkingStyle.Blink;\n case 'smooth':\n return TextEditorCursorBlinkingStyle.Smooth;\n case 'phase':\n return TextEditorCursorBlinkingStyle.Phase;\n case 'expand':\n return TextEditorCursorBlinkingStyle.Expand;\n case 'visible': // maintain compatibility\n case 'solid':\n return TextEditorCursorBlinkingStyle.Solid;\n }\n return TextEditorCursorBlinkingStyle.Blink;\n}\nfunction _scrollbarVisibilityFromString(visibility, defaultValue) {\n if (typeof visibility !== 'string') {\n return defaultValue;\n }\n switch (visibility) {\n case 'hidden':\n return ScrollbarVisibility.Hidden;\n case 'visible':\n return ScrollbarVisibility.Visible;\n default:\n return ScrollbarVisibility.Auto;\n }\n}\n/**\n * @internal\n */\nvar EditorOptionsValidator = /** @class */ (function () {\n function EditorOptionsValidator() {\n }\n /**\n * Validate raw editor options.\n * i.e. since they can be defined by the user, they might be invalid.\n */\n EditorOptionsValidator.validate = function (opts, defaults) {\n var wordWrap = opts.wordWrap;\n {\n // Compatibility with old true or false values\n if (wordWrap === true) {\n wordWrap = 'on';\n }\n else if (wordWrap === false) {\n wordWrap = 'off';\n }\n wordWrap = _stringSet(wordWrap, defaults.wordWrap, ['off', 'on', 'wordWrapColumn', 'bounded']);\n }\n var viewInfo = this._sanitizeViewInfo(opts, defaults.viewInfo);\n var contribInfo = this._sanitizeContribInfo(opts, defaults.contribInfo);\n var configuredMulticursorModifier;\n if (typeof opts.multiCursorModifier === 'string') {\n if (opts.multiCursorModifier === 'ctrlCmd') {\n configuredMulticursorModifier = platform.isMacintosh ? 'metaKey' : 'ctrlKey';\n }\n else {\n configuredMulticursorModifier = 'altKey';\n }\n }\n var multiCursorModifier = _stringSet(configuredMulticursorModifier, defaults.multiCursorModifier, ['altKey', 'metaKey', 'ctrlKey']);\n return {\n inDiffEditor: _boolean(opts.inDiffEditor, defaults.inDiffEditor),\n wordSeparators: _string(opts.wordSeparators, defaults.wordSeparators),\n lineNumbersMinChars: _clampedInt(opts.lineNumbersMinChars, defaults.lineNumbersMinChars, 1, 10),\n lineDecorationsWidth: (typeof opts.lineDecorationsWidth === 'undefined' ? defaults.lineDecorationsWidth : opts.lineDecorationsWidth),\n readOnly: _boolean(opts.readOnly, defaults.readOnly),\n mouseStyle: _stringSet(opts.mouseStyle, defaults.mouseStyle, ['text', 'default', 'copy']),\n disableLayerHinting: _boolean(opts.disableLayerHinting, defaults.disableLayerHinting),\n automaticLayout: _boolean(opts.automaticLayout, defaults.automaticLayout),\n wordWrap: wordWrap,\n wordWrapColumn: _clampedInt(opts.wordWrapColumn, defaults.wordWrapColumn, 1, 1073741824 /* MAX_SAFE_SMALL_INTEGER */),\n wordWrapMinified: _boolean(opts.wordWrapMinified, defaults.wordWrapMinified),\n wrappingIndent: _wrappingIndentFromString(opts.wrappingIndent, defaults.wrappingIndent),\n wordWrapBreakBeforeCharacters: _string(opts.wordWrapBreakBeforeCharacters, defaults.wordWrapBreakBeforeCharacters),\n wordWrapBreakAfterCharacters: _string(opts.wordWrapBreakAfterCharacters, defaults.wordWrapBreakAfterCharacters),\n wordWrapBreakObtrusiveCharacters: _string(opts.wordWrapBreakObtrusiveCharacters, defaults.wordWrapBreakObtrusiveCharacters),\n autoClosingBrackets: _boolean(opts.autoClosingBrackets, defaults.autoClosingBrackets),\n autoIndent: _boolean(opts.autoIndent, defaults.autoIndent),\n dragAndDrop: _boolean(opts.dragAndDrop, defaults.dragAndDrop),\n emptySelectionClipboard: _boolean(opts.emptySelectionClipboard, defaults.emptySelectionClipboard),\n useTabStops: _boolean(opts.useTabStops, defaults.useTabStops),\n multiCursorModifier: multiCursorModifier,\n multiCursorMergeOverlapping: _boolean(opts.multiCursorMergeOverlapping, defaults.multiCursorMergeOverlapping),\n accessibilitySupport: _stringSet(opts.accessibilitySupport, defaults.accessibilitySupport, ['auto', 'on', 'off']),\n showUnused: _boolean(opts.showUnused, defaults.showUnused),\n viewInfo: viewInfo,\n contribInfo: contribInfo,\n };\n };\n EditorOptionsValidator._sanitizeScrollbarOpts = function (opts, defaults, mouseWheelScrollSensitivity) {\n if (typeof opts !== 'object') {\n return defaults;\n }\n var horizontalScrollbarSize = _clampedInt(opts.horizontalScrollbarSize, defaults.horizontalScrollbarSize, 0, 1000);\n var verticalScrollbarSize = _clampedInt(opts.verticalScrollbarSize, defaults.verticalScrollbarSize, 0, 1000);\n return {\n vertical: _scrollbarVisibilityFromString(opts.vertical, defaults.vertical),\n horizontal: _scrollbarVisibilityFromString(opts.horizontal, defaults.horizontal),\n arrowSize: _clampedInt(opts.arrowSize, defaults.arrowSize, 0, 1000),\n useShadows: _boolean(opts.useShadows, defaults.useShadows),\n verticalHasArrows: _boolean(opts.verticalHasArrows, defaults.verticalHasArrows),\n horizontalHasArrows: _boolean(opts.horizontalHasArrows, defaults.horizontalHasArrows),\n horizontalScrollbarSize: horizontalScrollbarSize,\n horizontalSliderSize: _clampedInt(opts.horizontalSliderSize, horizontalScrollbarSize, 0, 1000),\n verticalScrollbarSize: verticalScrollbarSize,\n verticalSliderSize: _clampedInt(opts.verticalSliderSize, verticalScrollbarSize, 0, 1000),\n handleMouseWheel: _boolean(opts.handleMouseWheel, defaults.handleMouseWheel),\n mouseWheelScrollSensitivity: mouseWheelScrollSensitivity\n };\n };\n EditorOptionsValidator._sanitizeMinimapOpts = function (opts, defaults) {\n if (typeof opts !== 'object') {\n return defaults;\n }\n return {\n enabled: _boolean(opts.enabled, defaults.enabled),\n side: _stringSet(opts.side, defaults.side, ['right', 'left']),\n showSlider: _stringSet(opts.showSlider, defaults.showSlider, ['always', 'mouseover']),\n renderCharacters: _boolean(opts.renderCharacters, defaults.renderCharacters),\n maxColumn: _clampedInt(opts.maxColumn, defaults.maxColumn, 1, 10000),\n };\n };\n EditorOptionsValidator._santizeFindOpts = function (opts, defaults) {\n if (typeof opts !== 'object') {\n return defaults;\n }\n return {\n seedSearchStringFromSelection: _boolean(opts.seedSearchStringFromSelection, defaults.seedSearchStringFromSelection),\n autoFindInSelection: _boolean(opts.autoFindInSelection, defaults.autoFindInSelection),\n globalFindClipboard: _boolean(opts.globalFindClipboard, defaults.globalFindClipboard)\n };\n };\n EditorOptionsValidator._santizeHoverOpts = function (_opts, defaults) {\n var opts;\n if (typeof _opts === 'boolean') {\n opts = {\n enabled: _opts\n };\n }\n else if (typeof _opts === 'object') {\n opts = _opts;\n }\n else {\n return defaults;\n }\n return {\n enabled: _boolean(opts.enabled, defaults.enabled),\n delay: _clampedInt(opts.delay, defaults.delay, 0, 10000),\n sticky: _boolean(opts.sticky, defaults.sticky)\n };\n };\n EditorOptionsValidator._sanitizeSuggestOpts = function (opts, defaults) {\n var suggestOpts = opts.suggest || {};\n return {\n filterGraceful: _boolean(suggestOpts.filterGraceful, defaults.filterGraceful),\n snippets: _stringSet(opts.snippetSuggestions, defaults.snippets, ['top', 'bottom', 'inline', 'none']),\n snippetsPreventQuickSuggestions: _boolean(suggestOpts.snippetsPreventQuickSuggestions, defaults.filterGraceful),\n };\n };\n EditorOptionsValidator._sanitizeViewInfo = function (opts, defaults) {\n var rulers = [];\n if (Array.isArray(opts.rulers)) {\n for (var i = 0, len = opts.rulers.length; i < len; i++) {\n rulers.push(_clampedInt(opts.rulers[i], 0, 0, 10000));\n }\n rulers.sort();\n }\n var renderLineNumbers = defaults.renderLineNumbers;\n var renderCustomLineNumbers = defaults.renderCustomLineNumbers;\n if (typeof opts.lineNumbers !== 'undefined') {\n var lineNumbers = opts.lineNumbers;\n // Compatibility with old true or false values\n if (lineNumbers === true) {\n lineNumbers = 'on';\n }\n else if (lineNumbers === false) {\n lineNumbers = 'off';\n }\n if (typeof lineNumbers === 'function') {\n renderLineNumbers = 4 /* Custom */;\n renderCustomLineNumbers = lineNumbers;\n }\n else if (lineNumbers === 'interval') {\n renderLineNumbers = 3 /* Interval */;\n }\n else if (lineNumbers === 'relative') {\n renderLineNumbers = 2 /* Relative */;\n }\n else if (lineNumbers === 'on') {\n renderLineNumbers = 1 /* On */;\n }\n else {\n renderLineNumbers = 0 /* Off */;\n }\n }\n var fontLigatures = _boolean(opts.fontLigatures, defaults.fontLigatures);\n var disableMonospaceOptimizations = _boolean(opts.disableMonospaceOptimizations, defaults.disableMonospaceOptimizations) || fontLigatures;\n var renderWhitespace = opts.renderWhitespace;\n {\n // Compatibility with old true or false values\n if (renderWhitespace === true) {\n renderWhitespace = 'boundary';\n }\n else if (renderWhitespace === false) {\n renderWhitespace = 'none';\n }\n renderWhitespace = _stringSet(opts.renderWhitespace, defaults.renderWhitespace, ['none', 'boundary', 'all']);\n }\n var renderLineHighlight = opts.renderLineHighlight;\n {\n // Compatibility with old true or false values\n if (renderLineHighlight === true) {\n renderLineHighlight = 'line';\n }\n else if (renderLineHighlight === false) {\n renderLineHighlight = 'none';\n }\n renderLineHighlight = _stringSet(opts.renderLineHighlight, defaults.renderLineHighlight, ['none', 'gutter', 'line', 'all']);\n }\n var mouseWheelScrollSensitivity = _float(opts.mouseWheelScrollSensitivity, defaults.scrollbar.mouseWheelScrollSensitivity);\n if (mouseWheelScrollSensitivity === 0) {\n // Disallow 0, as it would prevent/block scrolling\n mouseWheelScrollSensitivity = 1;\n }\n var scrollbar = this._sanitizeScrollbarOpts(opts.scrollbar, defaults.scrollbar, mouseWheelScrollSensitivity);\n var minimap = this._sanitizeMinimapOpts(opts.minimap, defaults.minimap);\n return {\n extraEditorClassName: _string(opts.extraEditorClassName, defaults.extraEditorClassName),\n disableMonospaceOptimizations: disableMonospaceOptimizations,\n rulers: rulers,\n ariaLabel: _string(opts.ariaLabel, defaults.ariaLabel),\n renderLineNumbers: renderLineNumbers,\n renderCustomLineNumbers: renderCustomLineNumbers,\n selectOnLineNumbers: _boolean(opts.selectOnLineNumbers, defaults.selectOnLineNumbers),\n glyphMargin: _boolean(opts.glyphMargin, defaults.glyphMargin),\n revealHorizontalRightPadding: _clampedInt(opts.revealHorizontalRightPadding, defaults.revealHorizontalRightPadding, 0, 1000),\n roundedSelection: _boolean(opts.roundedSelection, defaults.roundedSelection),\n overviewRulerLanes: _clampedInt(opts.overviewRulerLanes, defaults.overviewRulerLanes, 0, 3),\n overviewRulerBorder: _boolean(opts.overviewRulerBorder, defaults.overviewRulerBorder),\n cursorBlinking: _cursorBlinkingStyleFromString(opts.cursorBlinking, defaults.cursorBlinking),\n mouseWheelZoom: _boolean(opts.mouseWheelZoom, defaults.mouseWheelZoom),\n cursorStyle: _cursorStyleFromString(opts.cursorStyle, defaults.cursorStyle),\n cursorWidth: _clampedInt(opts.cursorWidth, defaults.cursorWidth, 0, Number.MAX_VALUE),\n hideCursorInOverviewRuler: _boolean(opts.hideCursorInOverviewRuler, defaults.hideCursorInOverviewRuler),\n scrollBeyondLastLine: _boolean(opts.scrollBeyondLastLine, defaults.scrollBeyondLastLine),\n scrollBeyondLastColumn: _clampedInt(opts.scrollBeyondLastColumn, defaults.scrollBeyondLastColumn, 0, 1073741824 /* MAX_SAFE_SMALL_INTEGER */),\n smoothScrolling: _boolean(opts.smoothScrolling, defaults.smoothScrolling),\n stopRenderingLineAfter: _clampedInt(opts.stopRenderingLineAfter, defaults.stopRenderingLineAfter, -1, 1073741824 /* MAX_SAFE_SMALL_INTEGER */),\n renderWhitespace: renderWhitespace,\n renderControlCharacters: _boolean(opts.renderControlCharacters, defaults.renderControlCharacters),\n fontLigatures: fontLigatures,\n renderIndentGuides: _boolean(opts.renderIndentGuides, defaults.renderIndentGuides),\n highlightActiveIndentGuide: _boolean(opts.highlightActiveIndentGuide, defaults.highlightActiveIndentGuide),\n renderLineHighlight: renderLineHighlight,\n scrollbar: scrollbar,\n minimap: minimap,\n fixedOverflowWidgets: _boolean(opts.fixedOverflowWidgets, defaults.fixedOverflowWidgets),\n };\n };\n EditorOptionsValidator._sanitizeContribInfo = function (opts, defaults) {\n var quickSuggestions;\n if (typeof opts.quickSuggestions === 'object') {\n quickSuggestions = __assign({ other: true }, opts.quickSuggestions);\n }\n else {\n quickSuggestions = _boolean(opts.quickSuggestions, defaults.quickSuggestions);\n }\n // Compatibility support for acceptSuggestionOnEnter\n if (typeof opts.acceptSuggestionOnEnter === 'boolean') {\n opts.acceptSuggestionOnEnter = opts.acceptSuggestionOnEnter ? 'on' : 'off';\n }\n var find = this._santizeFindOpts(opts.find, defaults.find);\n return {\n selectionClipboard: _boolean(opts.selectionClipboard, defaults.selectionClipboard),\n hover: this._santizeHoverOpts(opts.hover, defaults.hover),\n links: _boolean(opts.links, defaults.links),\n contextmenu: _boolean(opts.contextmenu, defaults.contextmenu),\n quickSuggestions: quickSuggestions,\n quickSuggestionsDelay: _clampedInt(opts.quickSuggestionsDelay, defaults.quickSuggestionsDelay, -1073741824 /* MIN_SAFE_SMALL_INTEGER */, 1073741824 /* MAX_SAFE_SMALL_INTEGER */),\n parameterHints: _boolean(opts.parameterHints, defaults.parameterHints),\n iconsInSuggestions: _boolean(opts.iconsInSuggestions, defaults.iconsInSuggestions),\n formatOnType: _boolean(opts.formatOnType, defaults.formatOnType),\n formatOnPaste: _boolean(opts.formatOnPaste, defaults.formatOnPaste),\n suggestOnTriggerCharacters: _boolean(opts.suggestOnTriggerCharacters, defaults.suggestOnTriggerCharacters),\n acceptSuggestionOnEnter: _stringSet(opts.acceptSuggestionOnEnter, defaults.acceptSuggestionOnEnter, ['on', 'smart', 'off']),\n acceptSuggestionOnCommitCharacter: _boolean(opts.acceptSuggestionOnCommitCharacter, defaults.acceptSuggestionOnCommitCharacter),\n wordBasedSuggestions: _boolean(opts.wordBasedSuggestions, defaults.wordBasedSuggestions),\n suggestSelection: _stringSet(opts.suggestSelection, defaults.suggestSelection, ['first', 'recentlyUsed', 'recentlyUsedByPrefix']),\n suggestFontSize: _clampedInt(opts.suggestFontSize, defaults.suggestFontSize, 0, 1000),\n suggestLineHeight: _clampedInt(opts.suggestLineHeight, defaults.suggestLineHeight, 0, 1000),\n suggest: this._sanitizeSuggestOpts(opts, defaults.suggest),\n selectionHighlight: _boolean(opts.selectionHighlight, defaults.selectionHighlight),\n occurrencesHighlight: _boolean(opts.occurrencesHighlight, defaults.occurrencesHighlight),\n codeLens: _boolean(opts.codeLens, defaults.codeLens),\n folding: _boolean(opts.folding, defaults.folding),\n foldingStrategy: _stringSet(opts.foldingStrategy, defaults.foldingStrategy, ['auto', 'indentation']),\n showFoldingControls: _stringSet(opts.showFoldingControls, defaults.showFoldingControls, ['always', 'mouseover']),\n matchBrackets: _boolean(opts.matchBrackets, defaults.matchBrackets),\n find: find,\n colorDecorators: _boolean(opts.colorDecorators, defaults.colorDecorators),\n lightbulbEnabled: _boolean(opts.lightbulb ? opts.lightbulb.enabled : false, defaults.lightbulbEnabled),\n codeActionsOnSave: _booleanMap(opts.codeActionsOnSave, {}),\n codeActionsOnSaveTimeout: _clampedInt(opts.codeActionsOnSaveTimeout, defaults.codeActionsOnSaveTimeout, 1, 10000)\n };\n };\n return EditorOptionsValidator;\n}());\nexport { EditorOptionsValidator };\n/**\n * @internal\n */\nvar InternalEditorOptionsFactory = /** @class */ (function () {\n function InternalEditorOptionsFactory() {\n }\n InternalEditorOptionsFactory._tweakValidatedOptions = function (opts, accessibilitySupport) {\n var accessibilityIsOn = (accessibilitySupport === 2 /* Enabled */);\n var accessibilityIsOff = (accessibilitySupport === 1 /* Disabled */);\n return {\n inDiffEditor: opts.inDiffEditor,\n wordSeparators: opts.wordSeparators,\n lineNumbersMinChars: opts.lineNumbersMinChars,\n lineDecorationsWidth: opts.lineDecorationsWidth,\n readOnly: opts.readOnly,\n mouseStyle: opts.mouseStyle,\n disableLayerHinting: opts.disableLayerHinting,\n automaticLayout: opts.automaticLayout,\n wordWrap: opts.wordWrap,\n wordWrapColumn: opts.wordWrapColumn,\n wordWrapMinified: opts.wordWrapMinified,\n wrappingIndent: opts.wrappingIndent,\n wordWrapBreakBeforeCharacters: opts.wordWrapBreakBeforeCharacters,\n wordWrapBreakAfterCharacters: opts.wordWrapBreakAfterCharacters,\n wordWrapBreakObtrusiveCharacters: opts.wordWrapBreakObtrusiveCharacters,\n autoClosingBrackets: opts.autoClosingBrackets,\n autoIndent: opts.autoIndent,\n dragAndDrop: opts.dragAndDrop,\n emptySelectionClipboard: opts.emptySelectionClipboard,\n useTabStops: opts.useTabStops,\n multiCursorModifier: opts.multiCursorModifier,\n multiCursorMergeOverlapping: opts.multiCursorMergeOverlapping,\n accessibilitySupport: opts.accessibilitySupport,\n showUnused: opts.showUnused,\n viewInfo: {\n extraEditorClassName: opts.viewInfo.extraEditorClassName,\n disableMonospaceOptimizations: opts.viewInfo.disableMonospaceOptimizations,\n rulers: opts.viewInfo.rulers,\n ariaLabel: (accessibilityIsOff ? nls.localize('accessibilityOffAriaLabel', \"The editor is not accessible at this time. Press Alt+F1 for options.\") : opts.viewInfo.ariaLabel),\n renderLineNumbers: opts.viewInfo.renderLineNumbers,\n renderCustomLineNumbers: opts.viewInfo.renderCustomLineNumbers,\n selectOnLineNumbers: opts.viewInfo.selectOnLineNumbers,\n glyphMargin: opts.viewInfo.glyphMargin,\n revealHorizontalRightPadding: opts.viewInfo.revealHorizontalRightPadding,\n roundedSelection: (accessibilityIsOn ? false : opts.viewInfo.roundedSelection),\n overviewRulerLanes: opts.viewInfo.overviewRulerLanes,\n overviewRulerBorder: opts.viewInfo.overviewRulerBorder,\n cursorBlinking: opts.viewInfo.cursorBlinking,\n mouseWheelZoom: opts.viewInfo.mouseWheelZoom,\n cursorStyle: opts.viewInfo.cursorStyle,\n cursorWidth: opts.viewInfo.cursorWidth,\n hideCursorInOverviewRuler: opts.viewInfo.hideCursorInOverviewRuler,\n scrollBeyondLastLine: opts.viewInfo.scrollBeyondLastLine,\n scrollBeyondLastColumn: opts.viewInfo.scrollBeyondLastColumn,\n smoothScrolling: opts.viewInfo.smoothScrolling,\n stopRenderingLineAfter: opts.viewInfo.stopRenderingLineAfter,\n renderWhitespace: (accessibilityIsOn ? 'none' : opts.viewInfo.renderWhitespace),\n renderControlCharacters: (accessibilityIsOn ? false : opts.viewInfo.renderControlCharacters),\n fontLigatures: (accessibilityIsOn ? false : opts.viewInfo.fontLigatures),\n renderIndentGuides: (accessibilityIsOn ? false : opts.viewInfo.renderIndentGuides),\n highlightActiveIndentGuide: opts.viewInfo.highlightActiveIndentGuide,\n renderLineHighlight: opts.viewInfo.renderLineHighlight,\n scrollbar: opts.viewInfo.scrollbar,\n minimap: {\n enabled: (accessibilityIsOn ? false : opts.viewInfo.minimap.enabled),\n side: opts.viewInfo.minimap.side,\n renderCharacters: opts.viewInfo.minimap.renderCharacters,\n showSlider: opts.viewInfo.minimap.showSlider,\n maxColumn: opts.viewInfo.minimap.maxColumn\n },\n fixedOverflowWidgets: opts.viewInfo.fixedOverflowWidgets\n },\n contribInfo: {\n selectionClipboard: opts.contribInfo.selectionClipboard,\n hover: opts.contribInfo.hover,\n links: (accessibilityIsOn ? false : opts.contribInfo.links),\n contextmenu: opts.contribInfo.contextmenu,\n quickSuggestions: opts.contribInfo.quickSuggestions,\n quickSuggestionsDelay: opts.contribInfo.quickSuggestionsDelay,\n parameterHints: opts.contribInfo.parameterHints,\n iconsInSuggestions: opts.contribInfo.iconsInSuggestions,\n formatOnType: opts.contribInfo.formatOnType,\n formatOnPaste: opts.contribInfo.formatOnPaste,\n suggestOnTriggerCharacters: opts.contribInfo.suggestOnTriggerCharacters,\n acceptSuggestionOnEnter: opts.contribInfo.acceptSuggestionOnEnter,\n acceptSuggestionOnCommitCharacter: opts.contribInfo.acceptSuggestionOnCommitCharacter,\n wordBasedSuggestions: opts.contribInfo.wordBasedSuggestions,\n suggestSelection: opts.contribInfo.suggestSelection,\n suggestFontSize: opts.contribInfo.suggestFontSize,\n suggestLineHeight: opts.contribInfo.suggestLineHeight,\n suggest: opts.contribInfo.suggest,\n selectionHighlight: (accessibilityIsOn ? false : opts.contribInfo.selectionHighlight),\n occurrencesHighlight: (accessibilityIsOn ? false : opts.contribInfo.occurrencesHighlight),\n codeLens: (accessibilityIsOn ? false : opts.contribInfo.codeLens),\n folding: (accessibilityIsOn ? false : opts.contribInfo.folding),\n foldingStrategy: opts.contribInfo.foldingStrategy,\n showFoldingControls: opts.contribInfo.showFoldingControls,\n matchBrackets: (accessibilityIsOn ? false : opts.contribInfo.matchBrackets),\n find: opts.contribInfo.find,\n colorDecorators: opts.contribInfo.colorDecorators,\n lightbulbEnabled: opts.contribInfo.lightbulbEnabled,\n codeActionsOnSave: opts.contribInfo.codeActionsOnSave,\n codeActionsOnSaveTimeout: opts.contribInfo.codeActionsOnSaveTimeout\n }\n };\n };\n InternalEditorOptionsFactory.createInternalEditorOptions = function (env, _opts) {\n var accessibilitySupport;\n if (_opts.accessibilitySupport === 'auto') {\n // The editor reads the `accessibilitySupport` from the environment\n accessibilitySupport = env.accessibilitySupport;\n }\n else if (_opts.accessibilitySupport === 'on') {\n accessibilitySupport = 2 /* Enabled */;\n }\n else {\n accessibilitySupport = 1 /* Disabled */;\n }\n // Disable some non critical features to get as best performance as possible\n // See https://github.com/Microsoft/vscode/issues/26730\n var opts = this._tweakValidatedOptions(_opts, accessibilitySupport);\n var lineDecorationsWidth;\n if (typeof opts.lineDecorationsWidth === 'string' && /^\\d+(\\.\\d+)?ch$/.test(opts.lineDecorationsWidth)) {\n var multiple = parseFloat(opts.lineDecorationsWidth.substr(0, opts.lineDecorationsWidth.length - 2));\n lineDecorationsWidth = multiple * env.fontInfo.typicalHalfwidthCharacterWidth;\n }\n else {\n lineDecorationsWidth = _clampedInt(opts.lineDecorationsWidth, 0, 0, 1000);\n }\n if (opts.contribInfo.folding) {\n lineDecorationsWidth += 16;\n }\n var layoutInfo = EditorLayoutProvider.compute({\n outerWidth: env.outerWidth,\n outerHeight: env.outerHeight,\n showGlyphMargin: opts.viewInfo.glyphMargin,\n lineHeight: env.fontInfo.lineHeight,\n showLineNumbers: (opts.viewInfo.renderLineNumbers !== 0 /* Off */),\n lineNumbersMinChars: opts.lineNumbersMinChars,\n lineNumbersDigitCount: env.lineNumbersDigitCount,\n lineDecorationsWidth: lineDecorationsWidth,\n typicalHalfwidthCharacterWidth: env.fontInfo.typicalHalfwidthCharacterWidth,\n maxDigitWidth: env.fontInfo.maxDigitWidth,\n verticalScrollbarWidth: opts.viewInfo.scrollbar.verticalScrollbarSize,\n horizontalScrollbarHeight: opts.viewInfo.scrollbar.horizontalScrollbarSize,\n scrollbarArrowSize: opts.viewInfo.scrollbar.arrowSize,\n verticalScrollbarHasArrows: opts.viewInfo.scrollbar.verticalHasArrows,\n minimap: opts.viewInfo.minimap.enabled,\n minimapSide: opts.viewInfo.minimap.side,\n minimapRenderCharacters: opts.viewInfo.minimap.renderCharacters,\n minimapMaxColumn: opts.viewInfo.minimap.maxColumn,\n pixelRatio: env.pixelRatio\n });\n var bareWrappingInfo = null;\n {\n var wordWrap = opts.wordWrap;\n var wordWrapColumn = opts.wordWrapColumn;\n var wordWrapMinified = opts.wordWrapMinified;\n if (accessibilitySupport === 2 /* Enabled */) {\n // See https://github.com/Microsoft/vscode/issues/27766\n // Never enable wrapping when a screen reader is attached\n // because arrow down etc. will not move the cursor in the way\n // a screen reader expects.\n bareWrappingInfo = {\n isWordWrapMinified: false,\n isViewportWrapping: false,\n wrappingColumn: -1\n };\n }\n else if (wordWrapMinified && env.isDominatedByLongLines) {\n // Force viewport width wrapping if model is dominated by long lines\n bareWrappingInfo = {\n isWordWrapMinified: true,\n isViewportWrapping: true,\n wrappingColumn: Math.max(1, layoutInfo.viewportColumn)\n };\n }\n else if (wordWrap === 'on') {\n bareWrappingInfo = {\n isWordWrapMinified: false,\n isViewportWrapping: true,\n wrappingColumn: Math.max(1, layoutInfo.viewportColumn)\n };\n }\n else if (wordWrap === 'bounded') {\n bareWrappingInfo = {\n isWordWrapMinified: false,\n isViewportWrapping: true,\n wrappingColumn: Math.min(Math.max(1, layoutInfo.viewportColumn), wordWrapColumn)\n };\n }\n else if (wordWrap === 'wordWrapColumn') {\n bareWrappingInfo = {\n isWordWrapMinified: false,\n isViewportWrapping: false,\n wrappingColumn: wordWrapColumn\n };\n }\n else {\n bareWrappingInfo = {\n isWordWrapMinified: false,\n isViewportWrapping: false,\n wrappingColumn: -1\n };\n }\n }\n var wrappingInfo = {\n inDiffEditor: opts.inDiffEditor,\n isDominatedByLongLines: env.isDominatedByLongLines,\n isWordWrapMinified: bareWrappingInfo.isWordWrapMinified,\n isViewportWrapping: bareWrappingInfo.isViewportWrapping,\n wrappingColumn: bareWrappingInfo.wrappingColumn,\n wrappingIndent: opts.wrappingIndent,\n wordWrapBreakBeforeCharacters: opts.wordWrapBreakBeforeCharacters,\n wordWrapBreakAfterCharacters: opts.wordWrapBreakAfterCharacters,\n wordWrapBreakObtrusiveCharacters: opts.wordWrapBreakObtrusiveCharacters,\n };\n var className = 'monaco-editor';\n if (opts.viewInfo.extraEditorClassName) {\n className += ' ' + opts.viewInfo.extraEditorClassName;\n }\n if (env.extraEditorClassName) {\n className += ' ' + env.extraEditorClassName;\n }\n if (opts.viewInfo.fontLigatures) {\n className += ' enable-ligatures';\n }\n if (opts.mouseStyle === 'default') {\n className += ' mouse-default';\n }\n else if (opts.mouseStyle === 'copy') {\n className += ' mouse-copy';\n }\n return new InternalEditorOptions({\n canUseLayerHinting: opts.disableLayerHinting ? false : true,\n pixelRatio: env.pixelRatio,\n editorClassName: className,\n lineHeight: env.fontInfo.lineHeight,\n readOnly: opts.readOnly,\n accessibilitySupport: accessibilitySupport,\n multiCursorModifier: opts.multiCursorModifier,\n multiCursorMergeOverlapping: opts.multiCursorMergeOverlapping,\n wordSeparators: opts.wordSeparators,\n autoClosingBrackets: opts.autoClosingBrackets,\n autoIndent: opts.autoIndent,\n useTabStops: opts.useTabStops,\n tabFocusMode: opts.readOnly ? true : env.tabFocusMode,\n dragAndDrop: opts.dragAndDrop,\n emptySelectionClipboard: opts.emptySelectionClipboard && env.emptySelectionClipboard,\n layoutInfo: layoutInfo,\n fontInfo: env.fontInfo,\n viewInfo: opts.viewInfo,\n wrappingInfo: wrappingInfo,\n contribInfo: opts.contribInfo,\n showUnused: opts.showUnused,\n });\n };\n return InternalEditorOptionsFactory;\n}());\nexport { InternalEditorOptionsFactory };\n/**\n * @internal\n */\nvar EditorLayoutProvider = /** @class */ (function () {\n function EditorLayoutProvider() {\n }\n EditorLayoutProvider.compute = function (_opts) {\n var outerWidth = _opts.outerWidth | 0;\n var outerHeight = _opts.outerHeight | 0;\n var showGlyphMargin = _opts.showGlyphMargin;\n var lineHeight = _opts.lineHeight | 0;\n var showLineNumbers = _opts.showLineNumbers;\n var lineNumbersMinChars = _opts.lineNumbersMinChars | 0;\n var lineNumbersDigitCount = _opts.lineNumbersDigitCount | 0;\n var lineDecorationsWidth = _opts.lineDecorationsWidth | 0;\n var typicalHalfwidthCharacterWidth = _opts.typicalHalfwidthCharacterWidth;\n var maxDigitWidth = _opts.maxDigitWidth;\n var verticalScrollbarWidth = _opts.verticalScrollbarWidth | 0;\n var verticalScrollbarHasArrows = _opts.verticalScrollbarHasArrows;\n var scrollbarArrowSize = _opts.scrollbarArrowSize | 0;\n var horizontalScrollbarHeight = _opts.horizontalScrollbarHeight | 0;\n var minimap = _opts.minimap;\n var minimapSide = _opts.minimapSide;\n var minimapRenderCharacters = _opts.minimapRenderCharacters;\n var minimapMaxColumn = _opts.minimapMaxColumn | 0;\n var pixelRatio = _opts.pixelRatio;\n var lineNumbersWidth = 0;\n if (showLineNumbers) {\n var digitCount = Math.max(lineNumbersDigitCount, lineNumbersMinChars);\n lineNumbersWidth = Math.round(digitCount * maxDigitWidth);\n }\n var glyphMarginWidth = 0;\n if (showGlyphMargin) {\n glyphMarginWidth = lineHeight;\n }\n var glyphMarginLeft = 0;\n var lineNumbersLeft = glyphMarginLeft + glyphMarginWidth;\n var decorationsLeft = lineNumbersLeft + lineNumbersWidth;\n var contentLeft = decorationsLeft + lineDecorationsWidth;\n var remainingWidth = outerWidth - glyphMarginWidth - lineNumbersWidth - lineDecorationsWidth;\n var renderMinimap;\n var minimapLeft;\n var minimapWidth;\n var contentWidth;\n if (!minimap) {\n minimapLeft = 0;\n minimapWidth = 0;\n renderMinimap = RenderMinimap.None;\n contentWidth = remainingWidth;\n }\n else {\n var minimapCharWidth = void 0;\n if (pixelRatio >= 2) {\n renderMinimap = minimapRenderCharacters ? RenderMinimap.Large : RenderMinimap.LargeBlocks;\n minimapCharWidth = 2 / pixelRatio;\n }\n else {\n renderMinimap = minimapRenderCharacters ? RenderMinimap.Small : RenderMinimap.SmallBlocks;\n minimapCharWidth = 1 / pixelRatio;\n }\n // Given:\n // (leaving 2px for the cursor to have space after the last character)\n // viewportColumn = (contentWidth - verticalScrollbarWidth - 2) / typicalHalfwidthCharacterWidth\n // minimapWidth = viewportColumn * minimapCharWidth\n // contentWidth = remainingWidth - minimapWidth\n // What are good values for contentWidth and minimapWidth ?\n // minimapWidth = ((contentWidth - verticalScrollbarWidth - 2) / typicalHalfwidthCharacterWidth) * minimapCharWidth\n // typicalHalfwidthCharacterWidth * minimapWidth = (contentWidth - verticalScrollbarWidth - 2) * minimapCharWidth\n // typicalHalfwidthCharacterWidth * minimapWidth = (remainingWidth - minimapWidth - verticalScrollbarWidth - 2) * minimapCharWidth\n // (typicalHalfwidthCharacterWidth + minimapCharWidth) * minimapWidth = (remainingWidth - verticalScrollbarWidth - 2) * minimapCharWidth\n // minimapWidth = ((remainingWidth - verticalScrollbarWidth - 2) * minimapCharWidth) / (typicalHalfwidthCharacterWidth + minimapCharWidth)\n minimapWidth = Math.max(0, Math.floor(((remainingWidth - verticalScrollbarWidth - 2) * minimapCharWidth) / (typicalHalfwidthCharacterWidth + minimapCharWidth)));\n var minimapColumns = minimapWidth / minimapCharWidth;\n if (minimapColumns > minimapMaxColumn) {\n minimapWidth = Math.floor(minimapMaxColumn * minimapCharWidth);\n }\n contentWidth = remainingWidth - minimapWidth;\n if (minimapSide === 'left') {\n minimapLeft = 0;\n glyphMarginLeft += minimapWidth;\n lineNumbersLeft += minimapWidth;\n decorationsLeft += minimapWidth;\n contentLeft += minimapWidth;\n }\n else {\n minimapLeft = outerWidth - minimapWidth - verticalScrollbarWidth;\n }\n }\n // (leaving 2px for the cursor to have space after the last character)\n var viewportColumn = Math.max(1, Math.floor((contentWidth - verticalScrollbarWidth - 2) / typicalHalfwidthCharacterWidth));\n var verticalArrowSize = (verticalScrollbarHasArrows ? scrollbarArrowSize : 0);\n return {\n width: outerWidth,\n height: outerHeight,\n glyphMarginLeft: glyphMarginLeft,\n glyphMarginWidth: glyphMarginWidth,\n glyphMarginHeight: outerHeight,\n lineNumbersLeft: lineNumbersLeft,\n lineNumbersWidth: lineNumbersWidth,\n lineNumbersHeight: outerHeight,\n decorationsLeft: decorationsLeft,\n decorationsWidth: lineDecorationsWidth,\n decorationsHeight: outerHeight,\n contentLeft: contentLeft,\n contentWidth: contentWidth,\n contentHeight: outerHeight,\n renderMinimap: renderMinimap,\n minimapLeft: minimapLeft,\n minimapWidth: minimapWidth,\n viewportColumn: viewportColumn,\n verticalScrollbarWidth: verticalScrollbarWidth,\n horizontalScrollbarHeight: horizontalScrollbarHeight,\n overviewRuler: {\n top: verticalArrowSize,\n width: verticalScrollbarWidth,\n height: (outerHeight - 2 * verticalArrowSize),\n right: 0\n }\n };\n };\n return EditorLayoutProvider;\n}());\nexport { EditorLayoutProvider };\nvar DEFAULT_WINDOWS_FONT_FAMILY = 'Consolas, \\'Courier New\\', monospace';\nvar DEFAULT_MAC_FONT_FAMILY = 'Menlo, Monaco, \\'Courier New\\', monospace';\nvar DEFAULT_LINUX_FONT_FAMILY = '\\'Droid Sans Mono\\', \\'monospace\\', monospace, \\'Droid Sans Fallback\\'';\n/**\n * @internal\n */\nexport var EDITOR_FONT_DEFAULTS = {\n fontFamily: (platform.isMacintosh ? DEFAULT_MAC_FONT_FAMILY : (platform.isLinux ? DEFAULT_LINUX_FONT_FAMILY : DEFAULT_WINDOWS_FONT_FAMILY)),\n fontWeight: 'normal',\n fontSize: (platform.isMacintosh ? 12 : 14),\n lineHeight: 0,\n letterSpacing: 0,\n};\n/**\n * @internal\n */\nexport var EDITOR_MODEL_DEFAULTS = {\n tabSize: 4,\n insertSpaces: true,\n detectIndentation: true,\n trimAutoWhitespace: true,\n largeFileOptimizations: true\n};\n/**\n * @internal\n */\nexport var EDITOR_DEFAULTS = {\n inDiffEditor: false,\n wordSeparators: USUAL_WORD_SEPARATORS,\n lineNumbersMinChars: 5,\n lineDecorationsWidth: 10,\n readOnly: false,\n mouseStyle: 'text',\n disableLayerHinting: false,\n automaticLayout: false,\n wordWrap: 'off',\n wordWrapColumn: 80,\n wordWrapMinified: true,\n wrappingIndent: WrappingIndent.Same,\n wordWrapBreakBeforeCharacters: '([{‘“〈《「『【〔([{「£¥$£¥++',\n wordWrapBreakAfterCharacters: ' \\t})]?|&,;¢°′″‰℃、。。、¢,.:;?!%・・ゝゞヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻ァィゥェォャュョッー”〉》」』】〕)]}」',\n wordWrapBreakObtrusiveCharacters: '.',\n autoClosingBrackets: true,\n autoIndent: true,\n dragAndDrop: true,\n emptySelectionClipboard: true,\n useTabStops: true,\n multiCursorModifier: 'altKey',\n multiCursorMergeOverlapping: true,\n accessibilitySupport: 'auto',\n showUnused: true,\n viewInfo: {\n extraEditorClassName: '',\n disableMonospaceOptimizations: false,\n rulers: [],\n ariaLabel: nls.localize('editorViewAccessibleLabel', \"Editor content\"),\n renderLineNumbers: 1 /* On */,\n renderCustomLineNumbers: null,\n selectOnLineNumbers: true,\n glyphMargin: true,\n revealHorizontalRightPadding: 30,\n roundedSelection: true,\n overviewRulerLanes: 2,\n overviewRulerBorder: true,\n cursorBlinking: TextEditorCursorBlinkingStyle.Blink,\n mouseWheelZoom: false,\n cursorStyle: TextEditorCursorStyle.Line,\n cursorWidth: 0,\n hideCursorInOverviewRuler: false,\n scrollBeyondLastLine: true,\n scrollBeyondLastColumn: 5,\n smoothScrolling: false,\n stopRenderingLineAfter: 10000,\n renderWhitespace: 'none',\n renderControlCharacters: false,\n fontLigatures: false,\n renderIndentGuides: true,\n highlightActiveIndentGuide: true,\n renderLineHighlight: 'line',\n scrollbar: {\n vertical: ScrollbarVisibility.Auto,\n horizontal: ScrollbarVisibility.Auto,\n arrowSize: 11,\n useShadows: true,\n verticalHasArrows: false,\n horizontalHasArrows: false,\n horizontalScrollbarSize: 10,\n horizontalSliderSize: 10,\n verticalScrollbarSize: 14,\n verticalSliderSize: 14,\n handleMouseWheel: true,\n mouseWheelScrollSensitivity: 1,\n },\n minimap: {\n enabled: true,\n side: 'right',\n showSlider: 'mouseover',\n renderCharacters: true,\n maxColumn: 120\n },\n fixedOverflowWidgets: false,\n },\n contribInfo: {\n selectionClipboard: true,\n hover: {\n enabled: true,\n delay: 300,\n sticky: true\n },\n links: true,\n contextmenu: true,\n quickSuggestions: { other: true, comments: false, strings: false },\n quickSuggestionsDelay: 10,\n parameterHints: true,\n iconsInSuggestions: true,\n formatOnType: false,\n formatOnPaste: false,\n suggestOnTriggerCharacters: true,\n acceptSuggestionOnEnter: 'on',\n acceptSuggestionOnCommitCharacter: true,\n wordBasedSuggestions: true,\n suggestSelection: 'recentlyUsed',\n suggestFontSize: 0,\n suggestLineHeight: 0,\n suggest: {\n filterGraceful: true,\n snippets: 'inline',\n snippetsPreventQuickSuggestions: true\n },\n selectionHighlight: true,\n occurrencesHighlight: true,\n codeLens: true,\n folding: true,\n foldingStrategy: 'auto',\n showFoldingControls: 'mouseover',\n matchBrackets: true,\n find: {\n seedSearchStringFromSelection: true,\n autoFindInSelection: false,\n globalFindClipboard: false\n },\n colorDecorators: true,\n lightbulbEnabled: true,\n codeActionsOnSave: {},\n codeActionsOnSaveTimeout: 750\n },\n};\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport { Position } from '../core/position';\nimport * as strings from '../../../base/common/strings';\nimport { TextModel } from '../model/textModel';\nimport { Selection } from '../core/selection';\nimport { Range } from '../core/range';\nimport { LanguageConfigurationRegistry } from '../modes/languageConfigurationRegistry';\nimport { onUnexpectedError } from '../../../base/common/errors';\nvar CursorConfiguration = /** @class */ (function () {\n function CursorConfiguration(languageIdentifier, oneIndent, modelOptions, configuration) {\n this._languageIdentifier = languageIdentifier;\n var c = configuration.editor;\n this.readOnly = c.readOnly;\n this.tabSize = modelOptions.tabSize;\n this.insertSpaces = modelOptions.insertSpaces;\n this.oneIndent = oneIndent;\n this.pageSize = Math.max(1, Math.floor(c.layoutInfo.height / c.fontInfo.lineHeight) - 2);\n this.lineHeight = c.lineHeight;\n this.useTabStops = c.useTabStops;\n this.wordSeparators = c.wordSeparators;\n this.emptySelectionClipboard = c.emptySelectionClipboard;\n this.multiCursorMergeOverlapping = c.multiCursorMergeOverlapping;\n this.autoClosingBrackets = c.autoClosingBrackets;\n this.autoIndent = c.autoIndent;\n this.autoClosingPairsOpen = {};\n this.autoClosingPairsClose = {};\n this.surroundingPairs = {};\n this._electricChars = null;\n var autoClosingPairs = CursorConfiguration._getAutoClosingPairs(languageIdentifier);\n if (autoClosingPairs) {\n for (var i = 0; i < autoClosingPairs.length; i++) {\n this.autoClosingPairsOpen[autoClosingPairs[i].open] = autoClosingPairs[i].close;\n this.autoClosingPairsClose[autoClosingPairs[i].close] = autoClosingPairs[i].open;\n }\n }\n var surroundingPairs = CursorConfiguration._getSurroundingPairs(languageIdentifier);\n if (surroundingPairs) {\n for (var i = 0; i < surroundingPairs.length; i++) {\n this.surroundingPairs[surroundingPairs[i].open] = surroundingPairs[i].close;\n }\n }\n }\n CursorConfiguration.shouldRecreate = function (e) {\n return (e.layoutInfo\n || e.wordSeparators\n || e.emptySelectionClipboard\n || e.multiCursorMergeOverlapping\n || e.autoClosingBrackets\n || e.useTabStops\n || e.lineHeight\n || e.readOnly);\n };\n Object.defineProperty(CursorConfiguration.prototype, \"electricChars\", {\n get: function () {\n if (!this._electricChars) {\n this._electricChars = {};\n var electricChars = CursorConfiguration._getElectricCharacters(this._languageIdentifier);\n if (electricChars) {\n for (var i = 0; i < electricChars.length; i++) {\n this._electricChars[electricChars[i]] = true;\n }\n }\n }\n return this._electricChars;\n },\n enumerable: true,\n configurable: true\n });\n CursorConfiguration.prototype.normalizeIndentation = function (str) {\n return TextModel.normalizeIndentation(str, this.tabSize, this.insertSpaces);\n };\n CursorConfiguration._getElectricCharacters = function (languageIdentifier) {\n try {\n return LanguageConfigurationRegistry.getElectricCharacters(languageIdentifier.id);\n }\n catch (e) {\n onUnexpectedError(e);\n return null;\n }\n };\n CursorConfiguration._getAutoClosingPairs = function (languageIdentifier) {\n try {\n return LanguageConfigurationRegistry.getAutoClosingPairs(languageIdentifier.id);\n }\n catch (e) {\n onUnexpectedError(e);\n return null;\n }\n };\n CursorConfiguration._getSurroundingPairs = function (languageIdentifier) {\n try {\n return LanguageConfigurationRegistry.getSurroundingPairs(languageIdentifier.id);\n }\n catch (e) {\n onUnexpectedError(e);\n return null;\n }\n };\n return CursorConfiguration;\n}());\nexport { CursorConfiguration };\n/**\n * Represents the cursor state on either the model or on the view model.\n */\nvar SingleCursorState = /** @class */ (function () {\n function SingleCursorState(selectionStart, selectionStartLeftoverVisibleColumns, position, leftoverVisibleColumns) {\n this.selectionStart = selectionStart;\n this.selectionStartLeftoverVisibleColumns = selectionStartLeftoverVisibleColumns;\n this.position = position;\n this.leftoverVisibleColumns = leftoverVisibleColumns;\n this.selection = SingleCursorState._computeSelection(this.selectionStart, this.position);\n }\n SingleCursorState.prototype.equals = function (other) {\n return (this.selectionStartLeftoverVisibleColumns === other.selectionStartLeftoverVisibleColumns\n && this.leftoverVisibleColumns === other.leftoverVisibleColumns\n && this.position.equals(other.position)\n && this.selectionStart.equalsRange(other.selectionStart));\n };\n SingleCursorState.prototype.hasSelection = function () {\n return (!this.selection.isEmpty() || !this.selectionStart.isEmpty());\n };\n SingleCursorState.prototype.move = function (inSelectionMode, lineNumber, column, leftoverVisibleColumns) {\n if (inSelectionMode) {\n // move just position\n return new SingleCursorState(this.selectionStart, this.selectionStartLeftoverVisibleColumns, new Position(lineNumber, column), leftoverVisibleColumns);\n }\n else {\n // move everything\n return new SingleCursorState(new Range(lineNumber, column, lineNumber, column), leftoverVisibleColumns, new Position(lineNumber, column), leftoverVisibleColumns);\n }\n };\n SingleCursorState._computeSelection = function (selectionStart, position) {\n var startLineNumber, startColumn, endLineNumber, endColumn;\n if (selectionStart.isEmpty()) {\n startLineNumber = selectionStart.startLineNumber;\n startColumn = selectionStart.startColumn;\n endLineNumber = position.lineNumber;\n endColumn = position.column;\n }\n else {\n if (position.isBeforeOrEqual(selectionStart.getStartPosition())) {\n startLineNumber = selectionStart.endLineNumber;\n startColumn = selectionStart.endColumn;\n endLineNumber = position.lineNumber;\n endColumn = position.column;\n }\n else {\n startLineNumber = selectionStart.startLineNumber;\n startColumn = selectionStart.startColumn;\n endLineNumber = position.lineNumber;\n endColumn = position.column;\n }\n }\n return new Selection(startLineNumber, startColumn, endLineNumber, endColumn);\n };\n return SingleCursorState;\n}());\nexport { SingleCursorState };\nvar CursorContext = /** @class */ (function () {\n function CursorContext(configuration, model, viewModel) {\n this.model = model;\n this.viewModel = viewModel;\n this.config = new CursorConfiguration(this.model.getLanguageIdentifier(), this.model.getOneIndent(), this.model.getOptions(), configuration);\n }\n CursorContext.prototype.validateViewPosition = function (viewPosition, modelPosition) {\n return this.viewModel.coordinatesConverter.validateViewPosition(viewPosition, modelPosition);\n };\n CursorContext.prototype.validateViewRange = function (viewRange, expectedModelRange) {\n return this.viewModel.coordinatesConverter.validateViewRange(viewRange, expectedModelRange);\n };\n CursorContext.prototype.convertViewRangeToModelRange = function (viewRange) {\n return this.viewModel.coordinatesConverter.convertViewRangeToModelRange(viewRange);\n };\n CursorContext.prototype.convertViewPositionToModelPosition = function (lineNumber, column) {\n return this.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new Position(lineNumber, column));\n };\n CursorContext.prototype.convertModelPositionToViewPosition = function (modelPosition) {\n return this.viewModel.coordinatesConverter.convertModelPositionToViewPosition(modelPosition);\n };\n CursorContext.prototype.convertModelRangeToViewRange = function (modelRange) {\n return this.viewModel.coordinatesConverter.convertModelRangeToViewRange(modelRange);\n };\n CursorContext.prototype.getCurrentScrollTop = function () {\n return this.viewModel.viewLayout.getCurrentScrollTop();\n };\n CursorContext.prototype.getCompletelyVisibleViewRange = function () {\n return this.viewModel.getCompletelyVisibleViewRange();\n };\n CursorContext.prototype.getCompletelyVisibleModelRange = function () {\n var viewRange = this.viewModel.getCompletelyVisibleViewRange();\n return this.viewModel.coordinatesConverter.convertViewRangeToModelRange(viewRange);\n };\n CursorContext.prototype.getCompletelyVisibleViewRangeAtScrollTop = function (scrollTop) {\n return this.viewModel.getCompletelyVisibleViewRangeAtScrollTop(scrollTop);\n };\n CursorContext.prototype.getVerticalOffsetForViewLine = function (viewLineNumber) {\n return this.viewModel.viewLayout.getVerticalOffsetForLineNumber(viewLineNumber);\n };\n return CursorContext;\n}());\nexport { CursorContext };\nvar CursorState = /** @class */ (function () {\n function CursorState(modelState, viewState) {\n this.modelState = modelState;\n this.viewState = viewState;\n }\n CursorState.fromModelState = function (modelState) {\n return new CursorState(modelState, null);\n };\n CursorState.fromViewState = function (viewState) {\n return new CursorState(null, viewState);\n };\n CursorState.fromModelSelection = function (modelSelection) {\n var selectionStartLineNumber = modelSelection.selectionStartLineNumber;\n var selectionStartColumn = modelSelection.selectionStartColumn;\n var positionLineNumber = modelSelection.positionLineNumber;\n var positionColumn = modelSelection.positionColumn;\n var modelState = new SingleCursorState(new Range(selectionStartLineNumber, selectionStartColumn, selectionStartLineNumber, selectionStartColumn), 0, new Position(positionLineNumber, positionColumn), 0);\n return CursorState.fromModelState(modelState);\n };\n CursorState.fromModelSelections = function (modelSelections) {\n var states = [];\n for (var i = 0, len = modelSelections.length; i < len; i++) {\n states[i] = this.fromModelSelection(modelSelections[i]);\n }\n return states;\n };\n CursorState.prototype.equals = function (other) {\n return (this.viewState.equals(other.viewState) && this.modelState.equals(other.modelState));\n };\n return CursorState;\n}());\nexport { CursorState };\nvar EditOperationResult = /** @class */ (function () {\n function EditOperationResult(type, commands, opts) {\n this.type = type;\n this.commands = commands;\n this.shouldPushStackElementBefore = opts.shouldPushStackElementBefore;\n this.shouldPushStackElementAfter = opts.shouldPushStackElementAfter;\n }\n return EditOperationResult;\n}());\nexport { EditOperationResult };\n/**\n * Common operations that work and make sense both on the model and on the view model.\n */\nvar CursorColumns = /** @class */ (function () {\n function CursorColumns() {\n }\n CursorColumns.isLowSurrogate = function (model, lineNumber, charOffset) {\n var lineContent = model.getLineContent(lineNumber);\n if (charOffset < 0 || charOffset >= lineContent.length) {\n return false;\n }\n return strings.isLowSurrogate(lineContent.charCodeAt(charOffset));\n };\n CursorColumns.isHighSurrogate = function (model, lineNumber, charOffset) {\n var lineContent = model.getLineContent(lineNumber);\n if (charOffset < 0 || charOffset >= lineContent.length) {\n return false;\n }\n return strings.isHighSurrogate(lineContent.charCodeAt(charOffset));\n };\n CursorColumns.isInsideSurrogatePair = function (model, lineNumber, column) {\n return this.isHighSurrogate(model, lineNumber, column - 2);\n };\n CursorColumns.visibleColumnFromColumn = function (lineContent, column, tabSize) {\n var endOffset = lineContent.length;\n if (endOffset > column - 1) {\n endOffset = column - 1;\n }\n var result = 0;\n for (var i = 0; i < endOffset; i++) {\n var charCode = lineContent.charCodeAt(i);\n if (charCode === 9 /* Tab */) {\n result = this.nextTabStop(result, tabSize);\n }\n else if (strings.isFullWidthCharacter(charCode)) {\n result = result + 2;\n }\n else {\n result = result + 1;\n }\n }\n return result;\n };\n CursorColumns.visibleColumnFromColumn2 = function (config, model, position) {\n return this.visibleColumnFromColumn(model.getLineContent(position.lineNumber), position.column, config.tabSize);\n };\n CursorColumns.columnFromVisibleColumn = function (lineContent, visibleColumn, tabSize) {\n if (visibleColumn <= 0) {\n return 1;\n }\n var lineLength = lineContent.length;\n var beforeVisibleColumn = 0;\n for (var i = 0; i < lineLength; i++) {\n var charCode = lineContent.charCodeAt(i);\n var afterVisibleColumn = void 0;\n if (charCode === 9 /* Tab */) {\n afterVisibleColumn = this.nextTabStop(beforeVisibleColumn, tabSize);\n }\n else if (strings.isFullWidthCharacter(charCode)) {\n afterVisibleColumn = beforeVisibleColumn + 2;\n }\n else {\n afterVisibleColumn = beforeVisibleColumn + 1;\n }\n if (afterVisibleColumn >= visibleColumn) {\n var prevDelta = visibleColumn - beforeVisibleColumn;\n var afterDelta = afterVisibleColumn - visibleColumn;\n if (afterDelta < prevDelta) {\n return i + 2;\n }\n else {\n return i + 1;\n }\n }\n beforeVisibleColumn = afterVisibleColumn;\n }\n // walked the entire string\n return lineLength + 1;\n };\n CursorColumns.columnFromVisibleColumn2 = function (config, model, lineNumber, visibleColumn) {\n var result = this.columnFromVisibleColumn(model.getLineContent(lineNumber), visibleColumn, config.tabSize);\n var minColumn = model.getLineMinColumn(lineNumber);\n if (result < minColumn) {\n return minColumn;\n }\n var maxColumn = model.getLineMaxColumn(lineNumber);\n if (result > maxColumn) {\n return maxColumn;\n }\n return result;\n };\n /**\n * ATTENTION: This works with 0-based columns (as oposed to the regular 1-based columns)\n */\n CursorColumns.nextTabStop = function (visibleColumn, tabSize) {\n return visibleColumn + tabSize - visibleColumn % tabSize;\n };\n /**\n * ATTENTION: This works with 0-based columns (as oposed to the regular 1-based columns)\n */\n CursorColumns.prevTabStop = function (column, tabSize) {\n return column - 1 - (column - 1) % tabSize;\n };\n return CursorColumns;\n}());\nexport { CursorColumns };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { CharacterClassifier } from '../core/characterClassifier';\nvar WordCharacterClassifier = /** @class */ (function (_super) {\n __extends(WordCharacterClassifier, _super);\n function WordCharacterClassifier(wordSeparators) {\n var _this = _super.call(this, 0 /* Regular */) || this;\n for (var i = 0, len = wordSeparators.length; i < len; i++) {\n _this.set(wordSeparators.charCodeAt(i), 2 /* WordSeparator */);\n }\n _this.set(32 /* Space */, 1 /* Whitespace */);\n _this.set(9 /* Tab */, 1 /* Whitespace */);\n return _this;\n }\n return WordCharacterClassifier;\n}(CharacterClassifier));\nexport { WordCharacterClassifier };\nfunction once(computeFn) {\n var cache = {}; // TODO@Alex unbounded cache\n return function (input) {\n if (!cache.hasOwnProperty(input)) {\n cache[input] = computeFn(input);\n }\n return cache[input];\n };\n}\nexport var getMapForWordSeparators = once(function (input) { return new WordCharacterClassifier(input); });\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport { toUint8 } from './uint';\n/**\n * A fast character classifier that uses a compact array for ASCII values.\n */\nvar CharacterClassifier = /** @class */ (function () {\n function CharacterClassifier(_defaultValue) {\n var defaultValue = toUint8(_defaultValue);\n this._defaultValue = defaultValue;\n this._asciiMap = CharacterClassifier._createAsciiMap(defaultValue);\n this._map = new Map();\n }\n CharacterClassifier._createAsciiMap = function (defaultValue) {\n var asciiMap = new Uint8Array(256);\n for (var i = 0; i < 256; i++) {\n asciiMap[i] = defaultValue;\n }\n return asciiMap;\n };\n CharacterClassifier.prototype.set = function (charCode, _value) {\n var value = toUint8(_value);\n if (charCode >= 0 && charCode < 256) {\n this._asciiMap[charCode] = value;\n }\n else {\n this._map.set(charCode, value);\n }\n };\n CharacterClassifier.prototype.get = function (charCode) {\n if (charCode >= 0 && charCode < 256) {\n return this._asciiMap[charCode];\n }\n else {\n return (this._map.get(charCode) || this._defaultValue);\n }\n };\n return CharacterClassifier;\n}());\nexport { CharacterClassifier };\nvar CharacterSet = /** @class */ (function () {\n function CharacterSet() {\n this._actual = new CharacterClassifier(0 /* False */);\n }\n CharacterSet.prototype.add = function (charCode) {\n this._actual.set(charCode, 1 /* True */);\n };\n CharacterSet.prototype.has = function (charCode) {\n return (this._actual.get(charCode) === 1 /* True */);\n };\n return CharacterSet;\n}());\nexport { CharacterSet };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport { TokenMetadata } from '../modes';\nvar LineTokens = /** @class */ (function () {\n function LineTokens(tokens, text) {\n this._tokens = tokens;\n this._tokensCount = (this._tokens.length >>> 1);\n this._text = text;\n }\n LineTokens.prototype.equals = function (other) {\n if (other instanceof LineTokens) {\n return this.slicedEquals(other, 0, this._tokensCount);\n }\n return false;\n };\n LineTokens.prototype.slicedEquals = function (other, sliceFromTokenIndex, sliceTokenCount) {\n if (this._text !== other._text) {\n return false;\n }\n if (this._tokensCount !== other._tokensCount) {\n return false;\n }\n var from = (sliceFromTokenIndex << 1);\n var to = from + (sliceTokenCount << 1);\n for (var i = from; i < to; i++) {\n if (this._tokens[i] !== other._tokens[i]) {\n return false;\n }\n }\n return true;\n };\n LineTokens.prototype.getLineContent = function () {\n return this._text;\n };\n LineTokens.prototype.getCount = function () {\n return this._tokensCount;\n };\n LineTokens.prototype.getStartOffset = function (tokenIndex) {\n if (tokenIndex > 0) {\n return this._tokens[(tokenIndex - 1) << 1];\n }\n return 0;\n };\n LineTokens.prototype.getLanguageId = function (tokenIndex) {\n var metadata = this._tokens[(tokenIndex << 1) + 1];\n return TokenMetadata.getLanguageId(metadata);\n };\n LineTokens.prototype.getStandardTokenType = function (tokenIndex) {\n var metadata = this._tokens[(tokenIndex << 1) + 1];\n return TokenMetadata.getTokenType(metadata);\n };\n LineTokens.prototype.getForeground = function (tokenIndex) {\n var metadata = this._tokens[(tokenIndex << 1) + 1];\n return TokenMetadata.getForeground(metadata);\n };\n LineTokens.prototype.getClassName = function (tokenIndex) {\n var metadata = this._tokens[(tokenIndex << 1) + 1];\n return TokenMetadata.getClassNameFromMetadata(metadata);\n };\n LineTokens.prototype.getInlineStyle = function (tokenIndex, colorMap) {\n var metadata = this._tokens[(tokenIndex << 1) + 1];\n return TokenMetadata.getInlineStyleFromMetadata(metadata, colorMap);\n };\n LineTokens.prototype.getEndOffset = function (tokenIndex) {\n return this._tokens[tokenIndex << 1];\n };\n /**\n * Find the token containing offset `offset`.\n * @param offset The search offset\n * @return The index of the token containing the offset.\n */\n LineTokens.prototype.findTokenIndexAtOffset = function (offset) {\n return LineTokens.findIndexInTokensArray(this._tokens, offset);\n };\n LineTokens.prototype.inflate = function () {\n return this;\n };\n LineTokens.prototype.sliceAndInflate = function (startOffset, endOffset, deltaOffset) {\n return new SlicedLineTokens(this, startOffset, endOffset, deltaOffset);\n };\n LineTokens.convertToEndOffset = function (tokens, lineTextLength) {\n var tokenCount = (tokens.length >>> 1);\n var lastTokenIndex = tokenCount - 1;\n for (var tokenIndex = 0; tokenIndex < lastTokenIndex; tokenIndex++) {\n tokens[tokenIndex << 1] = tokens[(tokenIndex + 1) << 1];\n }\n tokens[lastTokenIndex << 1] = lineTextLength;\n };\n LineTokens.findIndexInTokensArray = function (tokens, desiredIndex) {\n if (tokens.length <= 2) {\n return 0;\n }\n var low = 0;\n var high = (tokens.length >>> 1) - 1;\n while (low < high) {\n var mid = low + Math.floor((high - low) / 2);\n var endOffset = tokens[(mid << 1)];\n if (endOffset === desiredIndex) {\n return mid + 1;\n }\n else if (endOffset < desiredIndex) {\n low = mid + 1;\n }\n else if (endOffset > desiredIndex) {\n high = mid;\n }\n }\n return low;\n };\n return LineTokens;\n}());\nexport { LineTokens };\nvar SlicedLineTokens = /** @class */ (function () {\n function SlicedLineTokens(source, startOffset, endOffset, deltaOffset) {\n this._source = source;\n this._startOffset = startOffset;\n this._endOffset = endOffset;\n this._deltaOffset = deltaOffset;\n this._firstTokenIndex = source.findTokenIndexAtOffset(startOffset);\n this._tokensCount = 0;\n for (var i = this._firstTokenIndex, len = source.getCount(); i < len; i++) {\n var tokenStartOffset = source.getStartOffset(i);\n if (tokenStartOffset >= endOffset) {\n break;\n }\n this._tokensCount++;\n }\n }\n SlicedLineTokens.prototype.equals = function (other) {\n if (other instanceof SlicedLineTokens) {\n return (this._startOffset === other._startOffset\n && this._endOffset === other._endOffset\n && this._deltaOffset === other._deltaOffset\n && this._source.slicedEquals(other._source, this._firstTokenIndex, this._tokensCount));\n }\n return false;\n };\n SlicedLineTokens.prototype.getCount = function () {\n return this._tokensCount;\n };\n SlicedLineTokens.prototype.getForeground = function (tokenIndex) {\n return this._source.getForeground(this._firstTokenIndex + tokenIndex);\n };\n SlicedLineTokens.prototype.getEndOffset = function (tokenIndex) {\n var tokenEndOffset = this._source.getEndOffset(this._firstTokenIndex + tokenIndex);\n return Math.min(this._endOffset, tokenEndOffset) - this._startOffset + this._deltaOffset;\n };\n SlicedLineTokens.prototype.getClassName = function (tokenIndex) {\n return this._source.getClassName(this._firstTokenIndex + tokenIndex);\n };\n SlicedLineTokens.prototype.getInlineStyle = function (tokenIndex, colorMap) {\n return this._source.getInlineStyle(this._firstTokenIndex + tokenIndex, colorMap);\n };\n SlicedLineTokens.prototype.findTokenIndexAtOffset = function (offset) {\n return this._source.findTokenIndexAtOffset(offset + this._startOffset - this._deltaOffset) - this._firstTokenIndex;\n };\n return SlicedLineTokens;\n}());\nexport { SlicedLineTokens };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\n/**\n * A position in the editor.\n */\nvar Position = /** @class */ (function () {\n function Position(lineNumber, column) {\n this.lineNumber = lineNumber;\n this.column = column;\n }\n /**\n * Test if this position equals other position\n */\n Position.prototype.equals = function (other) {\n return Position.equals(this, other);\n };\n /**\n * Test if position `a` equals position `b`\n */\n Position.equals = function (a, b) {\n if (!a && !b) {\n return true;\n }\n return (!!a &&\n !!b &&\n a.lineNumber === b.lineNumber &&\n a.column === b.column);\n };\n /**\n * Test if this position is before other position.\n * If the two positions are equal, the result will be false.\n */\n Position.prototype.isBefore = function (other) {\n return Position.isBefore(this, other);\n };\n /**\n * Test if position `a` is before position `b`.\n * If the two positions are equal, the result will be false.\n */\n Position.isBefore = function (a, b) {\n if (a.lineNumber < b.lineNumber) {\n return true;\n }\n if (b.lineNumber < a.lineNumber) {\n return false;\n }\n return a.column < b.column;\n };\n /**\n * Test if this position is before other position.\n * If the two positions are equal, the result will be true.\n */\n Position.prototype.isBeforeOrEqual = function (other) {\n return Position.isBeforeOrEqual(this, other);\n };\n /**\n * Test if position `a` is before position `b`.\n * If the two positions are equal, the result will be true.\n */\n Position.isBeforeOrEqual = function (a, b) {\n if (a.lineNumber < b.lineNumber) {\n return true;\n }\n if (b.lineNumber < a.lineNumber) {\n return false;\n }\n return a.column <= b.column;\n };\n /**\n * A function that compares positions, useful for sorting\n */\n Position.compare = function (a, b) {\n var aLineNumber = a.lineNumber | 0;\n var bLineNumber = b.lineNumber | 0;\n if (aLineNumber === bLineNumber) {\n var aColumn = a.column | 0;\n var bColumn = b.column | 0;\n return aColumn - bColumn;\n }\n return aLineNumber - bLineNumber;\n };\n /**\n * Clone this position.\n */\n Position.prototype.clone = function () {\n return new Position(this.lineNumber, this.column);\n };\n /**\n * Convert to a human-readable representation.\n */\n Position.prototype.toString = function () {\n return '(' + this.lineNumber + ',' + this.column + ')';\n };\n // ---\n /**\n * Create a `Position` from an `IPosition`.\n */\n Position.lift = function (pos) {\n return new Position(pos.lineNumber, pos.column);\n };\n /**\n * Test if `obj` is an `IPosition`.\n */\n Position.isIPosition = function (obj) {\n return (obj\n && (typeof obj.lineNumber === 'number')\n && (typeof obj.column === 'number'));\n };\n return Position;\n}());\nexport { Position };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport { Position } from './position';\n/**\n * A range in the editor. (startLineNumber,startColumn) is <= (endLineNumber,endColumn)\n */\nvar Range = /** @class */ (function () {\n function Range(startLineNumber, startColumn, endLineNumber, endColumn) {\n if ((startLineNumber > endLineNumber) || (startLineNumber === endLineNumber && startColumn > endColumn)) {\n this.startLineNumber = endLineNumber;\n this.startColumn = endColumn;\n this.endLineNumber = startLineNumber;\n this.endColumn = startColumn;\n }\n else {\n this.startLineNumber = startLineNumber;\n this.startColumn = startColumn;\n this.endLineNumber = endLineNumber;\n this.endColumn = endColumn;\n }\n }\n /**\n * Test if this range is empty.\n */\n Range.prototype.isEmpty = function () {\n return Range.isEmpty(this);\n };\n /**\n * Test if `range` is empty.\n */\n Range.isEmpty = function (range) {\n return (range.startLineNumber === range.endLineNumber && range.startColumn === range.endColumn);\n };\n /**\n * Test if position is in this range. If the position is at the edges, will return true.\n */\n Range.prototype.containsPosition = function (position) {\n return Range.containsPosition(this, position);\n };\n /**\n * Test if `position` is in `range`. If the position is at the edges, will return true.\n */\n Range.containsPosition = function (range, position) {\n if (position.lineNumber < range.startLineNumber || position.lineNumber > range.endLineNumber) {\n return false;\n }\n if (position.lineNumber === range.startLineNumber && position.column < range.startColumn) {\n return false;\n }\n if (position.lineNumber === range.endLineNumber && position.column > range.endColumn) {\n return false;\n }\n return true;\n };\n /**\n * Test if range is in this range. If the range is equal to this range, will return true.\n */\n Range.prototype.containsRange = function (range) {\n return Range.containsRange(this, range);\n };\n /**\n * Test if `otherRange` is in `range`. If the ranges are equal, will return true.\n */\n Range.containsRange = function (range, otherRange) {\n if (otherRange.startLineNumber < range.startLineNumber || otherRange.endLineNumber < range.startLineNumber) {\n return false;\n }\n if (otherRange.startLineNumber > range.endLineNumber || otherRange.endLineNumber > range.endLineNumber) {\n return false;\n }\n if (otherRange.startLineNumber === range.startLineNumber && otherRange.startColumn < range.startColumn) {\n return false;\n }\n if (otherRange.endLineNumber === range.endLineNumber && otherRange.endColumn > range.endColumn) {\n return false;\n }\n return true;\n };\n /**\n * A reunion of the two ranges.\n * The smallest position will be used as the start point, and the largest one as the end point.\n */\n Range.prototype.plusRange = function (range) {\n return Range.plusRange(this, range);\n };\n /**\n * A reunion of the two ranges.\n * The smallest position will be used as the start point, and the largest one as the end point.\n */\n Range.plusRange = function (a, b) {\n var startLineNumber;\n var startColumn;\n var endLineNumber;\n var endColumn;\n if (b.startLineNumber < a.startLineNumber) {\n startLineNumber = b.startLineNumber;\n startColumn = b.startColumn;\n }\n else if (b.startLineNumber === a.startLineNumber) {\n startLineNumber = b.startLineNumber;\n startColumn = Math.min(b.startColumn, a.startColumn);\n }\n else {\n startLineNumber = a.startLineNumber;\n startColumn = a.startColumn;\n }\n if (b.endLineNumber > a.endLineNumber) {\n endLineNumber = b.endLineNumber;\n endColumn = b.endColumn;\n }\n else if (b.endLineNumber === a.endLineNumber) {\n endLineNumber = b.endLineNumber;\n endColumn = Math.max(b.endColumn, a.endColumn);\n }\n else {\n endLineNumber = a.endLineNumber;\n endColumn = a.endColumn;\n }\n return new Range(startLineNumber, startColumn, endLineNumber, endColumn);\n };\n /**\n * A intersection of the two ranges.\n */\n Range.prototype.intersectRanges = function (range) {\n return Range.intersectRanges(this, range);\n };\n /**\n * A intersection of the two ranges.\n */\n Range.intersectRanges = function (a, b) {\n var resultStartLineNumber = a.startLineNumber;\n var resultStartColumn = a.startColumn;\n var resultEndLineNumber = a.endLineNumber;\n var resultEndColumn = a.endColumn;\n var otherStartLineNumber = b.startLineNumber;\n var otherStartColumn = b.startColumn;\n var otherEndLineNumber = b.endLineNumber;\n var otherEndColumn = b.endColumn;\n if (resultStartLineNumber < otherStartLineNumber) {\n resultStartLineNumber = otherStartLineNumber;\n resultStartColumn = otherStartColumn;\n }\n else if (resultStartLineNumber === otherStartLineNumber) {\n resultStartColumn = Math.max(resultStartColumn, otherStartColumn);\n }\n if (resultEndLineNumber > otherEndLineNumber) {\n resultEndLineNumber = otherEndLineNumber;\n resultEndColumn = otherEndColumn;\n }\n else if (resultEndLineNumber === otherEndLineNumber) {\n resultEndColumn = Math.min(resultEndColumn, otherEndColumn);\n }\n // Check if selection is now empty\n if (resultStartLineNumber > resultEndLineNumber) {\n return null;\n }\n if (resultStartLineNumber === resultEndLineNumber && resultStartColumn > resultEndColumn) {\n return null;\n }\n return new Range(resultStartLineNumber, resultStartColumn, resultEndLineNumber, resultEndColumn);\n };\n /**\n * Test if this range equals other.\n */\n Range.prototype.equalsRange = function (other) {\n return Range.equalsRange(this, other);\n };\n /**\n * Test if range `a` equals `b`.\n */\n Range.equalsRange = function (a, b) {\n return (!!a &&\n !!b &&\n a.startLineNumber === b.startLineNumber &&\n a.startColumn === b.startColumn &&\n a.endLineNumber === b.endLineNumber &&\n a.endColumn === b.endColumn);\n };\n /**\n * Return the end position (which will be after or equal to the start position)\n */\n Range.prototype.getEndPosition = function () {\n return new Position(this.endLineNumber, this.endColumn);\n };\n /**\n * Return the start position (which will be before or equal to the end position)\n */\n Range.prototype.getStartPosition = function () {\n return new Position(this.startLineNumber, this.startColumn);\n };\n /**\n * Transform to a user presentable string representation.\n */\n Range.prototype.toString = function () {\n return '[' + this.startLineNumber + ',' + this.startColumn + ' -> ' + this.endLineNumber + ',' + this.endColumn + ']';\n };\n /**\n * Create a new range using this range's start position, and using endLineNumber and endColumn as the end position.\n */\n Range.prototype.setEndPosition = function (endLineNumber, endColumn) {\n return new Range(this.startLineNumber, this.startColumn, endLineNumber, endColumn);\n };\n /**\n * Create a new range using this range's end position, and using startLineNumber and startColumn as the start position.\n */\n Range.prototype.setStartPosition = function (startLineNumber, startColumn) {\n return new Range(startLineNumber, startColumn, this.endLineNumber, this.endColumn);\n };\n /**\n * Create a new empty range using this range's start position.\n */\n Range.prototype.collapseToStart = function () {\n return Range.collapseToStart(this);\n };\n /**\n * Create a new empty range using this range's start position.\n */\n Range.collapseToStart = function (range) {\n return new Range(range.startLineNumber, range.startColumn, range.startLineNumber, range.startColumn);\n };\n // ---\n Range.fromPositions = function (start, end) {\n if (end === void 0) { end = start; }\n return new Range(start.lineNumber, start.column, end.lineNumber, end.column);\n };\n /**\n * Create a `Range` from an `IRange`.\n */\n Range.lift = function (range) {\n if (!range) {\n return null;\n }\n return new Range(range.startLineNumber, range.startColumn, range.endLineNumber, range.endColumn);\n };\n /**\n * Test if `obj` is an `IRange`.\n */\n Range.isIRange = function (obj) {\n return (obj\n && (typeof obj.startLineNumber === 'number')\n && (typeof obj.startColumn === 'number')\n && (typeof obj.endLineNumber === 'number')\n && (typeof obj.endColumn === 'number'));\n };\n /**\n * Test if the two ranges are touching in any way.\n */\n Range.areIntersectingOrTouching = function (a, b) {\n // Check if `a` is before `b`\n if (a.endLineNumber < b.startLineNumber || (a.endLineNumber === b.startLineNumber && a.endColumn < b.startColumn)) {\n return false;\n }\n // Check if `b` is before `a`\n if (b.endLineNumber < a.startLineNumber || (b.endLineNumber === a.startLineNumber && b.endColumn < a.startColumn)) {\n return false;\n }\n // These ranges must intersect\n return true;\n };\n /**\n * Test if the two ranges are intersecting. If the ranges are touching it returns true.\n */\n Range.areIntersecting = function (a, b) {\n // Check if `a` is before `b`\n if (a.endLineNumber < b.startLineNumber || (a.endLineNumber === b.startLineNumber && a.endColumn <= b.startColumn)) {\n return false;\n }\n // Check if `b` is before `a`\n if (b.endLineNumber < a.startLineNumber || (b.endLineNumber === a.startLineNumber && b.endColumn <= a.startColumn)) {\n return false;\n }\n // These ranges must intersect\n return true;\n };\n /**\n * A function that compares ranges, useful for sorting ranges\n * It will first compare ranges on the startPosition and then on the endPosition\n */\n Range.compareRangesUsingStarts = function (a, b) {\n var aStartLineNumber = a.startLineNumber | 0;\n var bStartLineNumber = b.startLineNumber | 0;\n if (aStartLineNumber === bStartLineNumber) {\n var aStartColumn = a.startColumn | 0;\n var bStartColumn = b.startColumn | 0;\n if (aStartColumn === bStartColumn) {\n var aEndLineNumber = a.endLineNumber | 0;\n var bEndLineNumber = b.endLineNumber | 0;\n if (aEndLineNumber === bEndLineNumber) {\n var aEndColumn = a.endColumn | 0;\n var bEndColumn = b.endColumn | 0;\n return aEndColumn - bEndColumn;\n }\n return aEndLineNumber - bEndLineNumber;\n }\n return aStartColumn - bStartColumn;\n }\n return aStartLineNumber - bStartLineNumber;\n };\n /**\n * A function that compares ranges, useful for sorting ranges\n * It will first compare ranges on the endPosition and then on the startPosition\n */\n Range.compareRangesUsingEnds = function (a, b) {\n if (a.endLineNumber === b.endLineNumber) {\n if (a.endColumn === b.endColumn) {\n if (a.startLineNumber === b.startLineNumber) {\n return a.startColumn - b.startColumn;\n }\n return a.startLineNumber - b.startLineNumber;\n }\n return a.endColumn - b.endColumn;\n }\n return a.endLineNumber - b.endLineNumber;\n };\n /**\n * Test if the range spans multiple lines.\n */\n Range.spansMultipleLines = function (range) {\n return range.endLineNumber > range.startLineNumber;\n };\n return Range;\n}());\nexport { Range };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { Range } from './range';\nimport { Position } from './position';\n/**\n * The direction of a selection.\n */\nexport var SelectionDirection;\n(function (SelectionDirection) {\n /**\n * The selection starts above where it ends.\n */\n SelectionDirection[SelectionDirection[\"LTR\"] = 0] = \"LTR\";\n /**\n * The selection starts below where it ends.\n */\n SelectionDirection[SelectionDirection[\"RTL\"] = 1] = \"RTL\";\n})(SelectionDirection || (SelectionDirection = {}));\n/**\n * A selection in the editor.\n * The selection is a range that has an orientation.\n */\nvar Selection = /** @class */ (function (_super) {\n __extends(Selection, _super);\n function Selection(selectionStartLineNumber, selectionStartColumn, positionLineNumber, positionColumn) {\n var _this = _super.call(this, selectionStartLineNumber, selectionStartColumn, positionLineNumber, positionColumn) || this;\n _this.selectionStartLineNumber = selectionStartLineNumber;\n _this.selectionStartColumn = selectionStartColumn;\n _this.positionLineNumber = positionLineNumber;\n _this.positionColumn = positionColumn;\n return _this;\n }\n /**\n * Clone this selection.\n */\n Selection.prototype.clone = function () {\n return new Selection(this.selectionStartLineNumber, this.selectionStartColumn, this.positionLineNumber, this.positionColumn);\n };\n /**\n * Transform to a human-readable representation.\n */\n Selection.prototype.toString = function () {\n return '[' + this.selectionStartLineNumber + ',' + this.selectionStartColumn + ' -> ' + this.positionLineNumber + ',' + this.positionColumn + ']';\n };\n /**\n * Test if equals other selection.\n */\n Selection.prototype.equalsSelection = function (other) {\n return (Selection.selectionsEqual(this, other));\n };\n /**\n * Test if the two selections are equal.\n */\n Selection.selectionsEqual = function (a, b) {\n return (a.selectionStartLineNumber === b.selectionStartLineNumber &&\n a.selectionStartColumn === b.selectionStartColumn &&\n a.positionLineNumber === b.positionLineNumber &&\n a.positionColumn === b.positionColumn);\n };\n /**\n * Get directions (LTR or RTL).\n */\n Selection.prototype.getDirection = function () {\n if (this.selectionStartLineNumber === this.startLineNumber && this.selectionStartColumn === this.startColumn) {\n return SelectionDirection.LTR;\n }\n return SelectionDirection.RTL;\n };\n /**\n * Create a new selection with a different `positionLineNumber` and `positionColumn`.\n */\n Selection.prototype.setEndPosition = function (endLineNumber, endColumn) {\n if (this.getDirection() === SelectionDirection.LTR) {\n return new Selection(this.startLineNumber, this.startColumn, endLineNumber, endColumn);\n }\n return new Selection(endLineNumber, endColumn, this.startLineNumber, this.startColumn);\n };\n /**\n * Get the position at `positionLineNumber` and `positionColumn`.\n */\n Selection.prototype.getPosition = function () {\n return new Position(this.positionLineNumber, this.positionColumn);\n };\n /**\n * Create a new selection with a different `selectionStartLineNumber` and `selectionStartColumn`.\n */\n Selection.prototype.setStartPosition = function (startLineNumber, startColumn) {\n if (this.getDirection() === SelectionDirection.LTR) {\n return new Selection(startLineNumber, startColumn, this.endLineNumber, this.endColumn);\n }\n return new Selection(this.endLineNumber, this.endColumn, startLineNumber, startColumn);\n };\n // ----\n /**\n * Create a `Selection` from one or two positions\n */\n Selection.fromPositions = function (start, end) {\n if (end === void 0) { end = start; }\n return new Selection(start.lineNumber, start.column, end.lineNumber, end.column);\n };\n /**\n * Create a `Selection` from an `ISelection`.\n */\n Selection.liftSelection = function (sel) {\n return new Selection(sel.selectionStartLineNumber, sel.selectionStartColumn, sel.positionLineNumber, sel.positionColumn);\n };\n /**\n * `a` equals `b`.\n */\n Selection.selectionsArrEqual = function (a, b) {\n if (a && !b || !a && b) {\n return false;\n }\n if (!a && !b) {\n return true;\n }\n if (a.length !== b.length) {\n return false;\n }\n for (var i = 0, len = a.length; i < len; i++) {\n if (!this.selectionsEqual(a[i], b[i])) {\n return false;\n }\n }\n return true;\n };\n /**\n * Test if `obj` is an `ISelection`.\n */\n Selection.isISelection = function (obj) {\n return (obj\n && (typeof obj.selectionStartLineNumber === 'number')\n && (typeof obj.selectionStartColumn === 'number')\n && (typeof obj.positionLineNumber === 'number')\n && (typeof obj.positionColumn === 'number'));\n };\n /**\n * Create with a direction.\n */\n Selection.createWithDirection = function (startLineNumber, startColumn, endLineNumber, endColumn, direction) {\n if (direction === SelectionDirection.LTR) {\n return new Selection(startLineNumber, startColumn, endLineNumber, endColumn);\n }\n return new Selection(endLineNumber, endColumn, startLineNumber, startColumn);\n };\n return Selection;\n}(Range));\nexport { Selection };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar Token = /** @class */ (function () {\n function Token(offset, type, language) {\n this.offset = offset | 0; // @perf\n this.type = type;\n this.language = language;\n }\n Token.prototype.toString = function () {\n return '(' + this.offset + ', ' + this.type + ')';\n };\n return Token;\n}());\nexport { Token };\nvar TokenizationResult = /** @class */ (function () {\n function TokenizationResult(tokens, endState) {\n this.tokens = tokens;\n this.endState = endState;\n }\n return TokenizationResult;\n}());\nexport { TokenizationResult };\nvar TokenizationResult2 = /** @class */ (function () {\n function TokenizationResult2(tokens, endState) {\n this.tokens = tokens;\n this.endState = endState;\n }\n return TokenizationResult2;\n}());\nexport { TokenizationResult2 };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar Uint8Matrix = /** @class */ (function () {\n function Uint8Matrix(rows, cols, defaultValue) {\n var data = new Uint8Array(rows * cols);\n for (var i = 0, len = rows * cols; i < len; i++) {\n data[i] = defaultValue;\n }\n this._data = data;\n this.rows = rows;\n this.cols = cols;\n }\n Uint8Matrix.prototype.get = function (row, col) {\n return this._data[row * this.cols + col];\n };\n Uint8Matrix.prototype.set = function (row, col, value) {\n this._data[row * this.cols + col] = value;\n };\n return Uint8Matrix;\n}());\nexport { Uint8Matrix };\nexport function toUint8(v) {\n if (v < 0) {\n return 0;\n }\n if (v > 255 /* MAX_UINT_8 */) {\n return 255 /* MAX_UINT_8 */;\n }\n return v | 0;\n}\nexport function toUint32(v) {\n if (v < 0) {\n return 0;\n }\n if (v > 4294967295 /* MAX_UINT_32 */) {\n return 4294967295 /* MAX_UINT_32 */;\n }\n return v | 0;\n}\nexport function toUint32Array(arr) {\n var len = arr.length;\n var r = new Uint32Array(len);\n for (var i = 0; i < len; i++) {\n r[i] = toUint32(arr[i]);\n }\n return r;\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\n/**\n * Vertical Lane in the overview ruler of the editor.\n */\nexport var OverviewRulerLane;\n(function (OverviewRulerLane) {\n OverviewRulerLane[OverviewRulerLane[\"Left\"] = 1] = \"Left\";\n OverviewRulerLane[OverviewRulerLane[\"Center\"] = 2] = \"Center\";\n OverviewRulerLane[OverviewRulerLane[\"Right\"] = 4] = \"Right\";\n OverviewRulerLane[OverviewRulerLane[\"Full\"] = 7] = \"Full\";\n})(OverviewRulerLane || (OverviewRulerLane = {}));\n/**\n * End of line character preference.\n */\nexport var EndOfLinePreference;\n(function (EndOfLinePreference) {\n /**\n * Use the end of line character identified in the text buffer.\n */\n EndOfLinePreference[EndOfLinePreference[\"TextDefined\"] = 0] = \"TextDefined\";\n /**\n * Use line feed (\\n) as the end of line character.\n */\n EndOfLinePreference[EndOfLinePreference[\"LF\"] = 1] = \"LF\";\n /**\n * Use carriage return and line feed (\\r\\n) as the end of line character.\n */\n EndOfLinePreference[EndOfLinePreference[\"CRLF\"] = 2] = \"CRLF\";\n})(EndOfLinePreference || (EndOfLinePreference = {}));\n/**\n * The default end of line to use when instantiating models.\n */\nexport var DefaultEndOfLine;\n(function (DefaultEndOfLine) {\n /**\n * Use line feed (\\n) as the end of line character.\n */\n DefaultEndOfLine[DefaultEndOfLine[\"LF\"] = 1] = \"LF\";\n /**\n * Use carriage return and line feed (\\r\\n) as the end of line character.\n */\n DefaultEndOfLine[DefaultEndOfLine[\"CRLF\"] = 2] = \"CRLF\";\n})(DefaultEndOfLine || (DefaultEndOfLine = {}));\n/**\n * End of line character preference.\n */\nexport var EndOfLineSequence;\n(function (EndOfLineSequence) {\n /**\n * Use line feed (\\n) as the end of line character.\n */\n EndOfLineSequence[EndOfLineSequence[\"LF\"] = 0] = \"LF\";\n /**\n * Use carriage return and line feed (\\r\\n) as the end of line character.\n */\n EndOfLineSequence[EndOfLineSequence[\"CRLF\"] = 1] = \"CRLF\";\n})(EndOfLineSequence || (EndOfLineSequence = {}));\nvar TextModelResolvedOptions = /** @class */ (function () {\n /**\n * @internal\n */\n function TextModelResolvedOptions(src) {\n this.tabSize = src.tabSize | 0;\n this.insertSpaces = Boolean(src.insertSpaces);\n this.defaultEOL = src.defaultEOL | 0;\n this.trimAutoWhitespace = Boolean(src.trimAutoWhitespace);\n }\n /**\n * @internal\n */\n TextModelResolvedOptions.prototype.equals = function (other) {\n return (this.tabSize === other.tabSize\n && this.insertSpaces === other.insertSpaces\n && this.defaultEOL === other.defaultEOL\n && this.trimAutoWhitespace === other.trimAutoWhitespace);\n };\n /**\n * @internal\n */\n TextModelResolvedOptions.prototype.createChangeEvent = function (newOpts) {\n return {\n tabSize: this.tabSize !== newOpts.tabSize,\n insertSpaces: this.insertSpaces !== newOpts.insertSpaces,\n trimAutoWhitespace: this.trimAutoWhitespace !== newOpts.trimAutoWhitespace,\n };\n };\n return TextModelResolvedOptions;\n}());\nexport { TextModelResolvedOptions };\nvar FindMatch = /** @class */ (function () {\n /**\n * @internal\n */\n function FindMatch(range, matches) {\n this.range = range;\n this.matches = matches;\n }\n return FindMatch;\n}());\nexport { FindMatch };\n/**\n * Describes the behavior of decorations when typing/editing near their edges.\n * Note: Please do not edit the values, as they very carefully match `DecorationRangeBehavior`\n */\nexport var TrackedRangeStickiness;\n(function (TrackedRangeStickiness) {\n TrackedRangeStickiness[TrackedRangeStickiness[\"AlwaysGrowsWhenTypingAtEdges\"] = 0] = \"AlwaysGrowsWhenTypingAtEdges\";\n TrackedRangeStickiness[TrackedRangeStickiness[\"NeverGrowsWhenTypingAtEdges\"] = 1] = \"NeverGrowsWhenTypingAtEdges\";\n TrackedRangeStickiness[TrackedRangeStickiness[\"GrowsOnlyWhenTypingBefore\"] = 2] = \"GrowsOnlyWhenTypingBefore\";\n TrackedRangeStickiness[TrackedRangeStickiness[\"GrowsOnlyWhenTypingAfter\"] = 3] = \"GrowsOnlyWhenTypingAfter\";\n})(TrackedRangeStickiness || (TrackedRangeStickiness = {}));\n/**\n * @internal\n */\nvar ApplyEditsResult = /** @class */ (function () {\n function ApplyEditsResult(reverseEdits, changes, trimAutoWhitespaceLineNumbers) {\n this.reverseEdits = reverseEdits;\n this.changes = changes;\n this.trimAutoWhitespaceLineNumbers = trimAutoWhitespaceLineNumbers;\n }\n return ApplyEditsResult;\n}());\nexport { ApplyEditsResult };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport { onUnexpectedError } from '../../../base/common/errors';\nimport { EndOfLineSequence } from '../model';\nvar EditStackElement = /** @class */ (function () {\n function EditStackElement(beforeVersionId, beforeCursorState) {\n this.beforeVersionId = beforeVersionId;\n this.beforeCursorState = beforeCursorState;\n this.afterCursorState = null;\n this.afterVersionId = -1;\n this.editOperations = [];\n }\n EditStackElement.prototype.undo = function (model) {\n // Apply all operations in reverse order\n for (var i = this.editOperations.length - 1; i >= 0; i--) {\n this.editOperations[i] = {\n operations: model.applyEdits(this.editOperations[i].operations)\n };\n }\n };\n EditStackElement.prototype.redo = function (model) {\n // Apply all operations\n for (var i = 0; i < this.editOperations.length; i++) {\n this.editOperations[i] = {\n operations: model.applyEdits(this.editOperations[i].operations)\n };\n }\n };\n return EditStackElement;\n}());\nfunction getModelEOL(model) {\n var eol = model.getEOL();\n if (eol === '\\n') {\n return EndOfLineSequence.LF;\n }\n else {\n return EndOfLineSequence.CRLF;\n }\n}\nvar EOLStackElement = /** @class */ (function () {\n function EOLStackElement(beforeVersionId, setEOL) {\n this.beforeVersionId = beforeVersionId;\n this.beforeCursorState = null;\n this.afterCursorState = null;\n this.afterVersionId = -1;\n this.eol = setEOL;\n }\n EOLStackElement.prototype.undo = function (model) {\n var redoEOL = getModelEOL(model);\n model.setEOL(this.eol);\n this.eol = redoEOL;\n };\n EOLStackElement.prototype.redo = function (model) {\n var undoEOL = getModelEOL(model);\n model.setEOL(this.eol);\n this.eol = undoEOL;\n };\n return EOLStackElement;\n}());\nvar EditStack = /** @class */ (function () {\n function EditStack(model) {\n this.model = model;\n this.currentOpenStackElement = null;\n this.past = [];\n this.future = [];\n }\n EditStack.prototype.pushStackElement = function () {\n if (this.currentOpenStackElement !== null) {\n this.past.push(this.currentOpenStackElement);\n this.currentOpenStackElement = null;\n }\n };\n EditStack.prototype.clear = function () {\n this.currentOpenStackElement = null;\n this.past = [];\n this.future = [];\n };\n EditStack.prototype.pushEOL = function (eol) {\n // No support for parallel universes :(\n this.future = [];\n if (this.currentOpenStackElement) {\n this.pushStackElement();\n }\n var prevEOL = getModelEOL(this.model);\n var stackElement = new EOLStackElement(this.model.getAlternativeVersionId(), prevEOL);\n this.model.setEOL(eol);\n stackElement.afterVersionId = this.model.getVersionId();\n this.currentOpenStackElement = stackElement;\n this.pushStackElement();\n };\n EditStack.prototype.pushEditOperation = function (beforeCursorState, editOperations, cursorStateComputer) {\n // No support for parallel universes :(\n this.future = [];\n var stackElement = null;\n if (this.currentOpenStackElement) {\n if (this.currentOpenStackElement instanceof EditStackElement) {\n stackElement = this.currentOpenStackElement;\n }\n else {\n this.pushStackElement();\n }\n }\n if (!this.currentOpenStackElement) {\n stackElement = new EditStackElement(this.model.getAlternativeVersionId(), beforeCursorState);\n this.currentOpenStackElement = stackElement;\n }\n var inverseEditOperation = {\n operations: this.model.applyEdits(editOperations)\n };\n stackElement.editOperations.push(inverseEditOperation);\n stackElement.afterCursorState = EditStack._computeCursorState(cursorStateComputer, inverseEditOperation.operations);\n stackElement.afterVersionId = this.model.getVersionId();\n return stackElement.afterCursorState;\n };\n EditStack._computeCursorState = function (cursorStateComputer, inverseEditOperations) {\n try {\n return cursorStateComputer ? cursorStateComputer(inverseEditOperations) : null;\n }\n catch (e) {\n onUnexpectedError(e);\n return null;\n }\n };\n EditStack.prototype.undo = function () {\n this.pushStackElement();\n if (this.past.length > 0) {\n var pastStackElement = this.past.pop();\n try {\n pastStackElement.undo(this.model);\n }\n catch (e) {\n onUnexpectedError(e);\n this.clear();\n return null;\n }\n this.future.push(pastStackElement);\n return {\n selections: pastStackElement.beforeCursorState,\n recordedVersionId: pastStackElement.beforeVersionId\n };\n }\n return null;\n };\n EditStack.prototype.canUndo = function () {\n return (this.past.length > 0);\n };\n EditStack.prototype.redo = function () {\n if (this.future.length > 0) {\n var futureStackElement = this.future.pop();\n try {\n futureStackElement.redo(this.model);\n }\n catch (e) {\n onUnexpectedError(e);\n this.clear();\n return null;\n }\n this.past.push(futureStackElement);\n return {\n selections: futureStackElement.afterCursorState,\n recordedVersionId: futureStackElement.afterVersionId\n };\n }\n return null;\n };\n EditStack.prototype.canRedo = function () {\n return (this.future.length > 0);\n };\n return EditStack;\n}());\nexport { EditStack };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\n/**\n * An event describing that a model has been reset to a new value.\n * @internal\n */\nvar ModelRawFlush = /** @class */ (function () {\n function ModelRawFlush() {\n this.changeType = 1 /* Flush */;\n }\n return ModelRawFlush;\n}());\nexport { ModelRawFlush };\n/**\n * An event describing that a line has changed in a model.\n * @internal\n */\nvar ModelRawLineChanged = /** @class */ (function () {\n function ModelRawLineChanged(lineNumber, detail) {\n this.changeType = 2 /* LineChanged */;\n this.lineNumber = lineNumber;\n this.detail = detail;\n }\n return ModelRawLineChanged;\n}());\nexport { ModelRawLineChanged };\n/**\n * An event describing that line(s) have been deleted in a model.\n * @internal\n */\nvar ModelRawLinesDeleted = /** @class */ (function () {\n function ModelRawLinesDeleted(fromLineNumber, toLineNumber) {\n this.changeType = 3 /* LinesDeleted */;\n this.fromLineNumber = fromLineNumber;\n this.toLineNumber = toLineNumber;\n }\n return ModelRawLinesDeleted;\n}());\nexport { ModelRawLinesDeleted };\n/**\n * An event describing that line(s) have been inserted in a model.\n * @internal\n */\nvar ModelRawLinesInserted = /** @class */ (function () {\n function ModelRawLinesInserted(fromLineNumber, toLineNumber, detail) {\n this.changeType = 4 /* LinesInserted */;\n this.fromLineNumber = fromLineNumber;\n this.toLineNumber = toLineNumber;\n this.detail = detail;\n }\n return ModelRawLinesInserted;\n}());\nexport { ModelRawLinesInserted };\n/**\n * An event describing that a model has had its EOL changed.\n * @internal\n */\nvar ModelRawEOLChanged = /** @class */ (function () {\n function ModelRawEOLChanged() {\n this.changeType = 5 /* EOLChanged */;\n }\n return ModelRawEOLChanged;\n}());\nexport { ModelRawEOLChanged };\n/**\n * An event describing a change in the text of a model.\n * @internal\n */\nvar ModelRawContentChangedEvent = /** @class */ (function () {\n function ModelRawContentChangedEvent(changes, versionId, isUndoing, isRedoing) {\n this.changes = changes;\n this.versionId = versionId;\n this.isUndoing = isUndoing;\n this.isRedoing = isRedoing;\n }\n ModelRawContentChangedEvent.prototype.containsEvent = function (type) {\n for (var i = 0, len = this.changes.length; i < len; i++) {\n var change = this.changes[i];\n if (change.changeType === type) {\n return true;\n }\n }\n return false;\n };\n ModelRawContentChangedEvent.merge = function (a, b) {\n var changes = [].concat(a.changes).concat(b.changes);\n var versionId = b.versionId;\n var isUndoing = (a.isUndoing || b.isUndoing);\n var isRedoing = (a.isRedoing || b.isRedoing);\n return new ModelRawContentChangedEvent(changes, versionId, isUndoing, isRedoing);\n };\n return ModelRawContentChangedEvent;\n}());\nexport { ModelRawContentChangedEvent };\n/**\n * @internal\n */\nvar InternalModelContentChangeEvent = /** @class */ (function () {\n function InternalModelContentChangeEvent(rawContentChangedEvent, contentChangedEvent) {\n this.rawContentChangedEvent = rawContentChangedEvent;\n this.contentChangedEvent = contentChangedEvent;\n }\n InternalModelContentChangeEvent.prototype.merge = function (other) {\n var rawContentChangedEvent = ModelRawContentChangedEvent.merge(this.rawContentChangedEvent, other.rawContentChangedEvent);\n var contentChangedEvent = InternalModelContentChangeEvent._mergeChangeEvents(this.contentChangedEvent, other.contentChangedEvent);\n return new InternalModelContentChangeEvent(rawContentChangedEvent, contentChangedEvent);\n };\n InternalModelContentChangeEvent._mergeChangeEvents = function (a, b) {\n var changes = [].concat(a.changes).concat(b.changes);\n var eol = b.eol;\n var versionId = b.versionId;\n var isUndoing = (a.isUndoing || b.isUndoing);\n var isRedoing = (a.isRedoing || b.isRedoing);\n var isFlush = (a.isFlush || b.isFlush);\n return {\n changes: changes,\n eol: eol,\n versionId: versionId,\n isUndoing: isUndoing,\n isRedoing: isRedoing,\n isFlush: isFlush\n };\n };\n return InternalModelContentChangeEvent;\n}());\nexport { InternalModelContentChangeEvent };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nexport function getNodeColor(node) {\n return ((node.metadata & 1 /* ColorMask */) >>> 0 /* ColorOffset */);\n}\nfunction setNodeColor(node, color) {\n node.metadata = ((node.metadata & 254 /* ColorMaskInverse */) | (color << 0 /* ColorOffset */));\n}\nfunction getNodeIsVisited(node) {\n return ((node.metadata & 2 /* IsVisitedMask */) >>> 1 /* IsVisitedOffset */) === 1;\n}\nfunction setNodeIsVisited(node, value) {\n node.metadata = ((node.metadata & 253 /* IsVisitedMaskInverse */) | ((value ? 1 : 0) << 1 /* IsVisitedOffset */));\n}\nfunction getNodeIsForValidation(node) {\n return ((node.metadata & 4 /* IsForValidationMask */) >>> 2 /* IsForValidationOffset */) === 1;\n}\nfunction setNodeIsForValidation(node, value) {\n node.metadata = ((node.metadata & 251 /* IsForValidationMaskInverse */) | ((value ? 1 : 0) << 2 /* IsForValidationOffset */));\n}\nexport function getNodeIsInOverviewRuler(node) {\n return ((node.metadata & 8 /* IsInOverviewRulerMask */) >>> 3 /* IsInOverviewRulerOffset */) === 1;\n}\nfunction setNodeIsInOverviewRuler(node, value) {\n node.metadata = ((node.metadata & 247 /* IsInOverviewRulerMaskInverse */) | ((value ? 1 : 0) << 3 /* IsInOverviewRulerOffset */));\n}\nfunction getNodeStickiness(node) {\n return ((node.metadata & 48 /* StickinessMask */) >>> 4 /* StickinessOffset */);\n}\nfunction _setNodeStickiness(node, stickiness) {\n node.metadata = ((node.metadata & 207 /* StickinessMaskInverse */) | (stickiness << 4 /* StickinessOffset */));\n}\nvar IntervalNode = /** @class */ (function () {\n function IntervalNode(id, start, end) {\n this.metadata = 0;\n this.parent = null;\n this.left = null;\n this.right = null;\n setNodeColor(this, 1 /* Red */);\n this.start = start;\n this.end = end;\n // FORCE_OVERFLOWING_TEST: this.delta = start;\n this.delta = 0;\n this.maxEnd = end;\n this.id = id;\n this.ownerId = 0;\n this.options = null;\n setNodeIsForValidation(this, false);\n _setNodeStickiness(this, 1 /* NeverGrowsWhenTypingAtEdges */);\n setNodeIsInOverviewRuler(this, false);\n this.cachedVersionId = 0;\n this.cachedAbsoluteStart = start;\n this.cachedAbsoluteEnd = end;\n this.range = null;\n setNodeIsVisited(this, false);\n }\n IntervalNode.prototype.reset = function (versionId, start, end, range) {\n this.start = start;\n this.end = end;\n this.maxEnd = end;\n this.cachedVersionId = versionId;\n this.cachedAbsoluteStart = start;\n this.cachedAbsoluteEnd = end;\n this.range = range;\n };\n IntervalNode.prototype.setOptions = function (options) {\n this.options = options;\n var className = this.options.className;\n setNodeIsForValidation(this, (className === \"squiggly-error\" /* EditorErrorDecoration */\n || className === \"squiggly-warning\" /* EditorWarningDecoration */\n || className === \"squiggly-info\" /* EditorInfoDecoration */));\n _setNodeStickiness(this, this.options.stickiness);\n setNodeIsInOverviewRuler(this, this.options.overviewRuler.color ? true : false);\n };\n IntervalNode.prototype.setCachedOffsets = function (absoluteStart, absoluteEnd, cachedVersionId) {\n if (this.cachedVersionId !== cachedVersionId) {\n this.range = null;\n }\n this.cachedVersionId = cachedVersionId;\n this.cachedAbsoluteStart = absoluteStart;\n this.cachedAbsoluteEnd = absoluteEnd;\n };\n IntervalNode.prototype.detach = function () {\n this.parent = null;\n this.left = null;\n this.right = null;\n };\n return IntervalNode;\n}());\nexport { IntervalNode };\nexport var SENTINEL = new IntervalNode(null, 0, 0);\nSENTINEL.parent = SENTINEL;\nSENTINEL.left = SENTINEL;\nSENTINEL.right = SENTINEL;\nsetNodeColor(SENTINEL, 0 /* Black */);\nvar IntervalTree = /** @class */ (function () {\n function IntervalTree() {\n this.root = SENTINEL;\n this.requestNormalizeDelta = false;\n }\n IntervalTree.prototype.intervalSearch = function (start, end, filterOwnerId, filterOutValidation, cachedVersionId) {\n if (this.root === SENTINEL) {\n return [];\n }\n return intervalSearch(this, start, end, filterOwnerId, filterOutValidation, cachedVersionId);\n };\n IntervalTree.prototype.search = function (filterOwnerId, filterOutValidation, cachedVersionId) {\n if (this.root === SENTINEL) {\n return [];\n }\n return search(this, filterOwnerId, filterOutValidation, cachedVersionId);\n };\n /**\n * Will not set `cachedAbsoluteStart` nor `cachedAbsoluteEnd` on the returned nodes!\n */\n IntervalTree.prototype.collectNodesFromOwner = function (ownerId) {\n return collectNodesFromOwner(this, ownerId);\n };\n /**\n * Will not set `cachedAbsoluteStart` nor `cachedAbsoluteEnd` on the returned nodes!\n */\n IntervalTree.prototype.collectNodesPostOrder = function () {\n return collectNodesPostOrder(this);\n };\n IntervalTree.prototype.insert = function (node) {\n rbTreeInsert(this, node);\n this._normalizeDeltaIfNecessary();\n };\n IntervalTree.prototype.delete = function (node) {\n rbTreeDelete(this, node);\n this._normalizeDeltaIfNecessary();\n };\n IntervalTree.prototype.resolveNode = function (node, cachedVersionId) {\n var initialNode = node;\n var delta = 0;\n while (node !== this.root) {\n if (node === node.parent.right) {\n delta += node.parent.delta;\n }\n node = node.parent;\n }\n var nodeStart = initialNode.start + delta;\n var nodeEnd = initialNode.end + delta;\n initialNode.setCachedOffsets(nodeStart, nodeEnd, cachedVersionId);\n };\n IntervalTree.prototype.acceptReplace = function (offset, length, textLength, forceMoveMarkers) {\n // Our strategy is to remove all directly impacted nodes, and then add them back to the tree.\n // (1) collect all nodes that are intersecting this edit as nodes of interest\n var nodesOfInterest = searchForEditing(this, offset, offset + length);\n // (2) remove all nodes that are intersecting this edit\n for (var i = 0, len = nodesOfInterest.length; i < len; i++) {\n var node = nodesOfInterest[i];\n rbTreeDelete(this, node);\n }\n this._normalizeDeltaIfNecessary();\n // (3) edit all tree nodes except the nodes of interest\n noOverlapReplace(this, offset, offset + length, textLength);\n this._normalizeDeltaIfNecessary();\n // (4) edit the nodes of interest and insert them back in the tree\n for (var i = 0, len = nodesOfInterest.length; i < len; i++) {\n var node = nodesOfInterest[i];\n node.start = node.cachedAbsoluteStart;\n node.end = node.cachedAbsoluteEnd;\n nodeAcceptEdit(node, offset, (offset + length), textLength, forceMoveMarkers);\n node.maxEnd = node.end;\n rbTreeInsert(this, node);\n }\n this._normalizeDeltaIfNecessary();\n };\n IntervalTree.prototype._normalizeDeltaIfNecessary = function () {\n if (!this.requestNormalizeDelta) {\n return;\n }\n this.requestNormalizeDelta = false;\n normalizeDelta(this);\n };\n return IntervalTree;\n}());\nexport { IntervalTree };\n//#region Delta Normalization\nfunction normalizeDelta(T) {\n var node = T.root;\n var delta = 0;\n while (node !== SENTINEL) {\n if (node.left !== SENTINEL && !getNodeIsVisited(node.left)) {\n // go left\n node = node.left;\n continue;\n }\n if (node.right !== SENTINEL && !getNodeIsVisited(node.right)) {\n // go right\n delta += node.delta;\n node = node.right;\n continue;\n }\n // handle current node\n node.start = delta + node.start;\n node.end = delta + node.end;\n node.delta = 0;\n recomputeMaxEnd(node);\n setNodeIsVisited(node, true);\n // going up from this node\n setNodeIsVisited(node.left, false);\n setNodeIsVisited(node.right, false);\n if (node === node.parent.right) {\n delta -= node.parent.delta;\n }\n node = node.parent;\n }\n setNodeIsVisited(T.root, false);\n}\nfunction adjustMarkerBeforeColumn(markerOffset, markerStickToPreviousCharacter, checkOffset, moveSemantics) {\n if (markerOffset < checkOffset) {\n return true;\n }\n if (markerOffset > checkOffset) {\n return false;\n }\n if (moveSemantics === 1 /* ForceMove */) {\n return false;\n }\n if (moveSemantics === 2 /* ForceStay */) {\n return true;\n }\n return markerStickToPreviousCharacter;\n}\n/**\n * This is a lot more complicated than strictly necessary to maintain the same behaviour\n * as when decorations were implemented using two markers.\n */\nexport function nodeAcceptEdit(node, start, end, textLength, forceMoveMarkers) {\n var nodeStickiness = getNodeStickiness(node);\n var startStickToPreviousCharacter = (nodeStickiness === 0 /* AlwaysGrowsWhenTypingAtEdges */\n || nodeStickiness === 2 /* GrowsOnlyWhenTypingBefore */);\n var endStickToPreviousCharacter = (nodeStickiness === 1 /* NeverGrowsWhenTypingAtEdges */\n || nodeStickiness === 2 /* GrowsOnlyWhenTypingBefore */);\n var deletingCnt = (end - start);\n var insertingCnt = textLength;\n var commonLength = Math.min(deletingCnt, insertingCnt);\n var nodeStart = node.start;\n var startDone = false;\n var nodeEnd = node.end;\n var endDone = false;\n {\n var moveSemantics = forceMoveMarkers ? 1 /* ForceMove */ : (deletingCnt > 0 ? 2 /* ForceStay */ : 0 /* MarkerDefined */);\n if (!startDone && adjustMarkerBeforeColumn(nodeStart, startStickToPreviousCharacter, start, moveSemantics)) {\n startDone = true;\n }\n if (!endDone && adjustMarkerBeforeColumn(nodeEnd, endStickToPreviousCharacter, start, moveSemantics)) {\n endDone = true;\n }\n }\n if (commonLength > 0 && !forceMoveMarkers) {\n var moveSemantics = (deletingCnt > insertingCnt ? 2 /* ForceStay */ : 0 /* MarkerDefined */);\n if (!startDone && adjustMarkerBeforeColumn(nodeStart, startStickToPreviousCharacter, start + commonLength, moveSemantics)) {\n startDone = true;\n }\n if (!endDone && adjustMarkerBeforeColumn(nodeEnd, endStickToPreviousCharacter, start + commonLength, moveSemantics)) {\n endDone = true;\n }\n }\n {\n var moveSemantics = forceMoveMarkers ? 1 /* ForceMove */ : 0 /* MarkerDefined */;\n if (!startDone && adjustMarkerBeforeColumn(nodeStart, startStickToPreviousCharacter, end, moveSemantics)) {\n node.start = start + insertingCnt;\n startDone = true;\n }\n if (!endDone && adjustMarkerBeforeColumn(nodeEnd, endStickToPreviousCharacter, end, moveSemantics)) {\n node.end = start + insertingCnt;\n endDone = true;\n }\n }\n // Finish\n var deltaColumn = (insertingCnt - deletingCnt);\n if (!startDone) {\n node.start = Math.max(0, nodeStart + deltaColumn);\n startDone = true;\n }\n if (!endDone) {\n node.end = Math.max(0, nodeEnd + deltaColumn);\n endDone = true;\n }\n if (node.start > node.end) {\n node.end = node.start;\n }\n}\nfunction searchForEditing(T, start, end) {\n // https://en.wikipedia.org/wiki/Interval_tree#Augmented_tree\n // Now, it is known that two intervals A and B overlap only when both\n // A.low <= B.high and A.high >= B.low. When searching the trees for\n // nodes overlapping with a given interval, you can immediately skip:\n // a) all nodes to the right of nodes whose low value is past the end of the given interval.\n // b) all nodes that have their maximum 'high' value below the start of the given interval.\n var node = T.root;\n var delta = 0;\n var nodeMaxEnd = 0;\n var nodeStart = 0;\n var nodeEnd = 0;\n var result = [];\n var resultLen = 0;\n while (node !== SENTINEL) {\n if (getNodeIsVisited(node)) {\n // going up from this node\n setNodeIsVisited(node.left, false);\n setNodeIsVisited(node.right, false);\n if (node === node.parent.right) {\n delta -= node.parent.delta;\n }\n node = node.parent;\n continue;\n }\n if (!getNodeIsVisited(node.left)) {\n // first time seeing this node\n nodeMaxEnd = delta + node.maxEnd;\n if (nodeMaxEnd < start) {\n // cover case b) from above\n // there is no need to search this node or its children\n setNodeIsVisited(node, true);\n continue;\n }\n if (node.left !== SENTINEL) {\n // go left\n node = node.left;\n continue;\n }\n }\n // handle current node\n nodeStart = delta + node.start;\n if (nodeStart > end) {\n // cover case a) from above\n // there is no need to search this node or its right subtree\n setNodeIsVisited(node, true);\n continue;\n }\n nodeEnd = delta + node.end;\n if (nodeEnd >= start) {\n node.setCachedOffsets(nodeStart, nodeEnd, 0);\n result[resultLen++] = node;\n }\n setNodeIsVisited(node, true);\n if (node.right !== SENTINEL && !getNodeIsVisited(node.right)) {\n // go right\n delta += node.delta;\n node = node.right;\n continue;\n }\n }\n setNodeIsVisited(T.root, false);\n return result;\n}\nfunction noOverlapReplace(T, start, end, textLength) {\n // https://en.wikipedia.org/wiki/Interval_tree#Augmented_tree\n // Now, it is known that two intervals A and B overlap only when both\n // A.low <= B.high and A.high >= B.low. When searching the trees for\n // nodes overlapping with a given interval, you can immediately skip:\n // a) all nodes to the right of nodes whose low value is past the end of the given interval.\n // b) all nodes that have their maximum 'high' value below the start of the given interval.\n var node = T.root;\n var delta = 0;\n var nodeMaxEnd = 0;\n var nodeStart = 0;\n var editDelta = (textLength - (end - start));\n while (node !== SENTINEL) {\n if (getNodeIsVisited(node)) {\n // going up from this node\n setNodeIsVisited(node.left, false);\n setNodeIsVisited(node.right, false);\n if (node === node.parent.right) {\n delta -= node.parent.delta;\n }\n recomputeMaxEnd(node);\n node = node.parent;\n continue;\n }\n if (!getNodeIsVisited(node.left)) {\n // first time seeing this node\n nodeMaxEnd = delta + node.maxEnd;\n if (nodeMaxEnd < start) {\n // cover case b) from above\n // there is no need to search this node or its children\n setNodeIsVisited(node, true);\n continue;\n }\n if (node.left !== SENTINEL) {\n // go left\n node = node.left;\n continue;\n }\n }\n // handle current node\n nodeStart = delta + node.start;\n if (nodeStart > end) {\n node.start += editDelta;\n node.end += editDelta;\n node.delta += editDelta;\n if (node.delta < -1073741824 /* MIN_SAFE_DELTA */ || node.delta > 1073741824 /* MAX_SAFE_DELTA */) {\n T.requestNormalizeDelta = true;\n }\n // cover case a) from above\n // there is no need to search this node or its right subtree\n setNodeIsVisited(node, true);\n continue;\n }\n setNodeIsVisited(node, true);\n if (node.right !== SENTINEL && !getNodeIsVisited(node.right)) {\n // go right\n delta += node.delta;\n node = node.right;\n continue;\n }\n }\n setNodeIsVisited(T.root, false);\n}\n//#endregion\n//#region Searching\nfunction collectNodesFromOwner(T, ownerId) {\n var node = T.root;\n var result = [];\n var resultLen = 0;\n while (node !== SENTINEL) {\n if (getNodeIsVisited(node)) {\n // going up from this node\n setNodeIsVisited(node.left, false);\n setNodeIsVisited(node.right, false);\n node = node.parent;\n continue;\n }\n if (node.left !== SENTINEL && !getNodeIsVisited(node.left)) {\n // go left\n node = node.left;\n continue;\n }\n // handle current node\n if (node.ownerId === ownerId) {\n result[resultLen++] = node;\n }\n setNodeIsVisited(node, true);\n if (node.right !== SENTINEL && !getNodeIsVisited(node.right)) {\n // go right\n node = node.right;\n continue;\n }\n }\n setNodeIsVisited(T.root, false);\n return result;\n}\nfunction collectNodesPostOrder(T) {\n var node = T.root;\n var result = [];\n var resultLen = 0;\n while (node !== SENTINEL) {\n if (getNodeIsVisited(node)) {\n // going up from this node\n setNodeIsVisited(node.left, false);\n setNodeIsVisited(node.right, false);\n node = node.parent;\n continue;\n }\n if (node.left !== SENTINEL && !getNodeIsVisited(node.left)) {\n // go left\n node = node.left;\n continue;\n }\n if (node.right !== SENTINEL && !getNodeIsVisited(node.right)) {\n // go right\n node = node.right;\n continue;\n }\n // handle current node\n result[resultLen++] = node;\n setNodeIsVisited(node, true);\n }\n setNodeIsVisited(T.root, false);\n return result;\n}\nfunction search(T, filterOwnerId, filterOutValidation, cachedVersionId) {\n var node = T.root;\n var delta = 0;\n var nodeStart = 0;\n var nodeEnd = 0;\n var result = [];\n var resultLen = 0;\n while (node !== SENTINEL) {\n if (getNodeIsVisited(node)) {\n // going up from this node\n setNodeIsVisited(node.left, false);\n setNodeIsVisited(node.right, false);\n if (node === node.parent.right) {\n delta -= node.parent.delta;\n }\n node = node.parent;\n continue;\n }\n if (node.left !== SENTINEL && !getNodeIsVisited(node.left)) {\n // go left\n node = node.left;\n continue;\n }\n // handle current node\n nodeStart = delta + node.start;\n nodeEnd = delta + node.end;\n node.setCachedOffsets(nodeStart, nodeEnd, cachedVersionId);\n var include = true;\n if (filterOwnerId && node.ownerId && node.ownerId !== filterOwnerId) {\n include = false;\n }\n if (filterOutValidation && getNodeIsForValidation(node)) {\n include = false;\n }\n if (include) {\n result[resultLen++] = node;\n }\n setNodeIsVisited(node, true);\n if (node.right !== SENTINEL && !getNodeIsVisited(node.right)) {\n // go right\n delta += node.delta;\n node = node.right;\n continue;\n }\n }\n setNodeIsVisited(T.root, false);\n return result;\n}\nfunction intervalSearch(T, intervalStart, intervalEnd, filterOwnerId, filterOutValidation, cachedVersionId) {\n // https://en.wikipedia.org/wiki/Interval_tree#Augmented_tree\n // Now, it is known that two intervals A and B overlap only when both\n // A.low <= B.high and A.high >= B.low. When searching the trees for\n // nodes overlapping with a given interval, you can immediately skip:\n // a) all nodes to the right of nodes whose low value is past the end of the given interval.\n // b) all nodes that have their maximum 'high' value below the start of the given interval.\n var node = T.root;\n var delta = 0;\n var nodeMaxEnd = 0;\n var nodeStart = 0;\n var nodeEnd = 0;\n var result = [];\n var resultLen = 0;\n while (node !== SENTINEL) {\n if (getNodeIsVisited(node)) {\n // going up from this node\n setNodeIsVisited(node.left, false);\n setNodeIsVisited(node.right, false);\n if (node === node.parent.right) {\n delta -= node.parent.delta;\n }\n node = node.parent;\n continue;\n }\n if (!getNodeIsVisited(node.left)) {\n // first time seeing this node\n nodeMaxEnd = delta + node.maxEnd;\n if (nodeMaxEnd < intervalStart) {\n // cover case b) from above\n // there is no need to search this node or its children\n setNodeIsVisited(node, true);\n continue;\n }\n if (node.left !== SENTINEL) {\n // go left\n node = node.left;\n continue;\n }\n }\n // handle current node\n nodeStart = delta + node.start;\n if (nodeStart > intervalEnd) {\n // cover case a) from above\n // there is no need to search this node or its right subtree\n setNodeIsVisited(node, true);\n continue;\n }\n nodeEnd = delta + node.end;\n if (nodeEnd >= intervalStart) {\n // There is overlap\n node.setCachedOffsets(nodeStart, nodeEnd, cachedVersionId);\n var include = true;\n if (filterOwnerId && node.ownerId && node.ownerId !== filterOwnerId) {\n include = false;\n }\n if (filterOutValidation && getNodeIsForValidation(node)) {\n include = false;\n }\n if (include) {\n result[resultLen++] = node;\n }\n }\n setNodeIsVisited(node, true);\n if (node.right !== SENTINEL && !getNodeIsVisited(node.right)) {\n // go right\n delta += node.delta;\n node = node.right;\n continue;\n }\n }\n setNodeIsVisited(T.root, false);\n return result;\n}\n//#endregion\n//#region Insertion\nfunction rbTreeInsert(T, newNode) {\n if (T.root === SENTINEL) {\n newNode.parent = SENTINEL;\n newNode.left = SENTINEL;\n newNode.right = SENTINEL;\n setNodeColor(newNode, 0 /* Black */);\n T.root = newNode;\n return T.root;\n }\n treeInsert(T, newNode);\n recomputeMaxEndWalkToRoot(newNode.parent);\n // repair tree\n var x = newNode;\n while (x !== T.root && getNodeColor(x.parent) === 1 /* Red */) {\n if (x.parent === x.parent.parent.left) {\n var y = x.parent.parent.right;\n if (getNodeColor(y) === 1 /* Red */) {\n setNodeColor(x.parent, 0 /* Black */);\n setNodeColor(y, 0 /* Black */);\n setNodeColor(x.parent.parent, 1 /* Red */);\n x = x.parent.parent;\n }\n else {\n if (x === x.parent.right) {\n x = x.parent;\n leftRotate(T, x);\n }\n setNodeColor(x.parent, 0 /* Black */);\n setNodeColor(x.parent.parent, 1 /* Red */);\n rightRotate(T, x.parent.parent);\n }\n }\n else {\n var y = x.parent.parent.left;\n if (getNodeColor(y) === 1 /* Red */) {\n setNodeColor(x.parent, 0 /* Black */);\n setNodeColor(y, 0 /* Black */);\n setNodeColor(x.parent.parent, 1 /* Red */);\n x = x.parent.parent;\n }\n else {\n if (x === x.parent.left) {\n x = x.parent;\n rightRotate(T, x);\n }\n setNodeColor(x.parent, 0 /* Black */);\n setNodeColor(x.parent.parent, 1 /* Red */);\n leftRotate(T, x.parent.parent);\n }\n }\n }\n setNodeColor(T.root, 0 /* Black */);\n return newNode;\n}\nfunction treeInsert(T, z) {\n var delta = 0;\n var x = T.root;\n var zAbsoluteStart = z.start;\n var zAbsoluteEnd = z.end;\n while (true) {\n var cmp = intervalCompare(zAbsoluteStart, zAbsoluteEnd, x.start + delta, x.end + delta);\n if (cmp < 0) {\n // this node should be inserted to the left\n // => it is not affected by the node's delta\n if (x.left === SENTINEL) {\n z.start -= delta;\n z.end -= delta;\n z.maxEnd -= delta;\n x.left = z;\n break;\n }\n else {\n x = x.left;\n }\n }\n else {\n // this node should be inserted to the right\n // => it is not affected by the node's delta\n if (x.right === SENTINEL) {\n z.start -= (delta + x.delta);\n z.end -= (delta + x.delta);\n z.maxEnd -= (delta + x.delta);\n x.right = z;\n break;\n }\n else {\n delta += x.delta;\n x = x.right;\n }\n }\n }\n z.parent = x;\n z.left = SENTINEL;\n z.right = SENTINEL;\n setNodeColor(z, 1 /* Red */);\n}\n//#endregion\n//#region Deletion\nfunction rbTreeDelete(T, z) {\n var x;\n var y;\n // RB-DELETE except we don't swap z and y in case c)\n // i.e. we always delete what's pointed at by z.\n if (z.left === SENTINEL) {\n x = z.right;\n y = z;\n // x's delta is no longer influenced by z's delta\n x.delta += z.delta;\n if (x.delta < -1073741824 /* MIN_SAFE_DELTA */ || x.delta > 1073741824 /* MAX_SAFE_DELTA */) {\n T.requestNormalizeDelta = true;\n }\n x.start += z.delta;\n x.end += z.delta;\n }\n else if (z.right === SENTINEL) {\n x = z.left;\n y = z;\n }\n else {\n y = leftest(z.right);\n x = y.right;\n // y's delta is no longer influenced by z's delta,\n // but we don't want to walk the entire right-hand-side subtree of x.\n // we therefore maintain z's delta in y, and adjust only x\n x.start += y.delta;\n x.end += y.delta;\n x.delta += y.delta;\n if (x.delta < -1073741824 /* MIN_SAFE_DELTA */ || x.delta > 1073741824 /* MAX_SAFE_DELTA */) {\n T.requestNormalizeDelta = true;\n }\n y.start += z.delta;\n y.end += z.delta;\n y.delta = z.delta;\n if (y.delta < -1073741824 /* MIN_SAFE_DELTA */ || y.delta > 1073741824 /* MAX_SAFE_DELTA */) {\n T.requestNormalizeDelta = true;\n }\n }\n if (y === T.root) {\n T.root = x;\n setNodeColor(x, 0 /* Black */);\n z.detach();\n resetSentinel();\n recomputeMaxEnd(x);\n T.root.parent = SENTINEL;\n return;\n }\n var yWasRed = (getNodeColor(y) === 1 /* Red */);\n if (y === y.parent.left) {\n y.parent.left = x;\n }\n else {\n y.parent.right = x;\n }\n if (y === z) {\n x.parent = y.parent;\n }\n else {\n if (y.parent === z) {\n x.parent = y;\n }\n else {\n x.parent = y.parent;\n }\n y.left = z.left;\n y.right = z.right;\n y.parent = z.parent;\n setNodeColor(y, getNodeColor(z));\n if (z === T.root) {\n T.root = y;\n }\n else {\n if (z === z.parent.left) {\n z.parent.left = y;\n }\n else {\n z.parent.right = y;\n }\n }\n if (y.left !== SENTINEL) {\n y.left.parent = y;\n }\n if (y.right !== SENTINEL) {\n y.right.parent = y;\n }\n }\n z.detach();\n if (yWasRed) {\n recomputeMaxEndWalkToRoot(x.parent);\n if (y !== z) {\n recomputeMaxEndWalkToRoot(y);\n recomputeMaxEndWalkToRoot(y.parent);\n }\n resetSentinel();\n return;\n }\n recomputeMaxEndWalkToRoot(x);\n recomputeMaxEndWalkToRoot(x.parent);\n if (y !== z) {\n recomputeMaxEndWalkToRoot(y);\n recomputeMaxEndWalkToRoot(y.parent);\n }\n // RB-DELETE-FIXUP\n var w;\n while (x !== T.root && getNodeColor(x) === 0 /* Black */) {\n if (x === x.parent.left) {\n w = x.parent.right;\n if (getNodeColor(w) === 1 /* Red */) {\n setNodeColor(w, 0 /* Black */);\n setNodeColor(x.parent, 1 /* Red */);\n leftRotate(T, x.parent);\n w = x.parent.right;\n }\n if (getNodeColor(w.left) === 0 /* Black */ && getNodeColor(w.right) === 0 /* Black */) {\n setNodeColor(w, 1 /* Red */);\n x = x.parent;\n }\n else {\n if (getNodeColor(w.right) === 0 /* Black */) {\n setNodeColor(w.left, 0 /* Black */);\n setNodeColor(w, 1 /* Red */);\n rightRotate(T, w);\n w = x.parent.right;\n }\n setNodeColor(w, getNodeColor(x.parent));\n setNodeColor(x.parent, 0 /* Black */);\n setNodeColor(w.right, 0 /* Black */);\n leftRotate(T, x.parent);\n x = T.root;\n }\n }\n else {\n w = x.parent.left;\n if (getNodeColor(w) === 1 /* Red */) {\n setNodeColor(w, 0 /* Black */);\n setNodeColor(x.parent, 1 /* Red */);\n rightRotate(T, x.parent);\n w = x.parent.left;\n }\n if (getNodeColor(w.left) === 0 /* Black */ && getNodeColor(w.right) === 0 /* Black */) {\n setNodeColor(w, 1 /* Red */);\n x = x.parent;\n }\n else {\n if (getNodeColor(w.left) === 0 /* Black */) {\n setNodeColor(w.right, 0 /* Black */);\n setNodeColor(w, 1 /* Red */);\n leftRotate(T, w);\n w = x.parent.left;\n }\n setNodeColor(w, getNodeColor(x.parent));\n setNodeColor(x.parent, 0 /* Black */);\n setNodeColor(w.left, 0 /* Black */);\n rightRotate(T, x.parent);\n x = T.root;\n }\n }\n }\n setNodeColor(x, 0 /* Black */);\n resetSentinel();\n}\nfunction leftest(node) {\n while (node.left !== SENTINEL) {\n node = node.left;\n }\n return node;\n}\nfunction resetSentinel() {\n SENTINEL.parent = SENTINEL;\n SENTINEL.delta = 0; // optional\n SENTINEL.start = 0; // optional\n SENTINEL.end = 0; // optional\n}\n//#endregion\n//#region Rotations\nfunction leftRotate(T, x) {\n var y = x.right; // set y.\n y.delta += x.delta; // y's delta is no longer influenced by x's delta\n if (y.delta < -1073741824 /* MIN_SAFE_DELTA */ || y.delta > 1073741824 /* MAX_SAFE_DELTA */) {\n T.requestNormalizeDelta = true;\n }\n y.start += x.delta;\n y.end += x.delta;\n x.right = y.left; // turn y's left subtree into x's right subtree.\n if (y.left !== SENTINEL) {\n y.left.parent = x;\n }\n y.parent = x.parent; // link x's parent to y.\n if (x.parent === SENTINEL) {\n T.root = y;\n }\n else if (x === x.parent.left) {\n x.parent.left = y;\n }\n else {\n x.parent.right = y;\n }\n y.left = x; // put x on y's left.\n x.parent = y;\n recomputeMaxEnd(x);\n recomputeMaxEnd(y);\n}\nfunction rightRotate(T, y) {\n var x = y.left;\n y.delta -= x.delta;\n if (y.delta < -1073741824 /* MIN_SAFE_DELTA */ || y.delta > 1073741824 /* MAX_SAFE_DELTA */) {\n T.requestNormalizeDelta = true;\n }\n y.start -= x.delta;\n y.end -= x.delta;\n y.left = x.right;\n if (x.right !== SENTINEL) {\n x.right.parent = y;\n }\n x.parent = y.parent;\n if (y.parent === SENTINEL) {\n T.root = x;\n }\n else if (y === y.parent.right) {\n y.parent.right = x;\n }\n else {\n y.parent.left = x;\n }\n x.right = y;\n y.parent = x;\n recomputeMaxEnd(y);\n recomputeMaxEnd(x);\n}\n//#endregion\n//#region max end computation\nfunction computeMaxEnd(node) {\n var maxEnd = node.end;\n if (node.left !== SENTINEL) {\n var leftMaxEnd = node.left.maxEnd;\n if (leftMaxEnd > maxEnd) {\n maxEnd = leftMaxEnd;\n }\n }\n if (node.right !== SENTINEL) {\n var rightMaxEnd = node.right.maxEnd + node.delta;\n if (rightMaxEnd > maxEnd) {\n maxEnd = rightMaxEnd;\n }\n }\n return maxEnd;\n}\nexport function recomputeMaxEnd(node) {\n node.maxEnd = computeMaxEnd(node);\n}\nfunction recomputeMaxEndWalkToRoot(node) {\n while (node !== SENTINEL) {\n var maxEnd = computeMaxEnd(node);\n if (node.maxEnd === maxEnd) {\n // no need to go further\n return;\n }\n node.maxEnd = maxEnd;\n node = node.parent;\n }\n}\n//#endregion\n//#region utils\nexport function intervalCompare(aStart, aEnd, bStart, bEnd) {\n if (aStart === bStart) {\n return aEnd - bEnd;\n }\n return aStart - bStart;\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport { globals } from './platform';\nvar hasPerformanceNow = (globals.performance && typeof globals.performance.now === 'function');\nvar StopWatch = /** @class */ (function () {\n function StopWatch(highResolution) {\n this._highResolution = hasPerformanceNow && highResolution;\n this._startTime = this._now();\n this._stopTime = -1;\n }\n StopWatch.create = function (highResolution) {\n if (highResolution === void 0) { highResolution = true; }\n return new StopWatch(highResolution);\n };\n StopWatch.prototype.elapsed = function () {\n if (this._stopTime !== -1) {\n return this._stopTime - this._startTime;\n }\n return this._now() - this._startTime;\n };\n StopWatch.prototype._now = function () {\n return this._highResolution ? globals.performance.now() : new Date().getTime();\n };\n return StopWatch;\n}());\nexport { StopWatch };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport { LineTokens } from '../core/lineTokens';\nimport * as arrays from '../../../base/common/arrays';\nimport { Position } from '../core/position';\nimport { onUnexpectedError } from '../../../base/common/errors';\nimport { nullTokenize2 } from '../modes/nullMode';\nfunction getDefaultMetadata(topLevelLanguageId) {\n return ((topLevelLanguageId << 0 /* LANGUAGEID_OFFSET */)\n | (0 /* Other */ << 8 /* TOKEN_TYPE_OFFSET */)\n | (0 /* None */ << 11 /* FONT_STYLE_OFFSET */)\n | (1 /* DefaultForeground */ << 14 /* FOREGROUND_OFFSET */)\n | (2 /* DefaultBackground */ << 23 /* BACKGROUND_OFFSET */)) >>> 0;\n}\nvar EMPTY_LINE_TOKENS = (new Uint32Array(0)).buffer;\nvar ModelLineTokens = /** @class */ (function () {\n function ModelLineTokens(state) {\n this._state = state;\n this._lineTokens = null;\n this._invalid = true;\n }\n ModelLineTokens.prototype.deleteBeginning = function (toChIndex) {\n if (this._lineTokens === null || this._lineTokens === EMPTY_LINE_TOKENS) {\n return;\n }\n this.delete(0, toChIndex);\n };\n ModelLineTokens.prototype.deleteEnding = function (fromChIndex) {\n if (this._lineTokens === null || this._lineTokens === EMPTY_LINE_TOKENS) {\n return;\n }\n var tokens = new Uint32Array(this._lineTokens);\n var lineTextLength = tokens[tokens.length - 2];\n this.delete(fromChIndex, lineTextLength);\n };\n ModelLineTokens.prototype.delete = function (fromChIndex, toChIndex) {\n if (this._lineTokens === null || this._lineTokens === EMPTY_LINE_TOKENS || fromChIndex === toChIndex) {\n return;\n }\n var tokens = new Uint32Array(this._lineTokens);\n var tokensCount = (tokens.length >>> 1);\n // special case: deleting everything\n if (fromChIndex === 0 && tokens[tokens.length - 2] === toChIndex) {\n this._lineTokens = EMPTY_LINE_TOKENS;\n return;\n }\n var fromTokenIndex = LineTokens.findIndexInTokensArray(tokens, fromChIndex);\n var fromTokenStartOffset = (fromTokenIndex > 0 ? tokens[(fromTokenIndex - 1) << 1] : 0);\n var fromTokenEndOffset = tokens[fromTokenIndex << 1];\n if (toChIndex < fromTokenEndOffset) {\n // the delete range is inside a single token\n var delta_1 = (toChIndex - fromChIndex);\n for (var i = fromTokenIndex; i < tokensCount; i++) {\n tokens[i << 1] -= delta_1;\n }\n return;\n }\n var dest;\n var lastEnd;\n if (fromTokenStartOffset !== fromChIndex) {\n tokens[fromTokenIndex << 1] = fromChIndex;\n dest = ((fromTokenIndex + 1) << 1);\n lastEnd = fromChIndex;\n }\n else {\n dest = (fromTokenIndex << 1);\n lastEnd = fromTokenStartOffset;\n }\n var delta = (toChIndex - fromChIndex);\n for (var tokenIndex = fromTokenIndex + 1; tokenIndex < tokensCount; tokenIndex++) {\n var tokenEndOffset = tokens[tokenIndex << 1] - delta;\n if (tokenEndOffset > lastEnd) {\n tokens[dest++] = tokenEndOffset;\n tokens[dest++] = tokens[(tokenIndex << 1) + 1];\n lastEnd = tokenEndOffset;\n }\n }\n if (dest === tokens.length) {\n // nothing to trim\n return;\n }\n var tmp = new Uint32Array(dest);\n tmp.set(tokens.subarray(0, dest), 0);\n this._lineTokens = tmp.buffer;\n };\n ModelLineTokens.prototype.append = function (_otherTokens) {\n if (_otherTokens === EMPTY_LINE_TOKENS) {\n return;\n }\n if (this._lineTokens === EMPTY_LINE_TOKENS) {\n this._lineTokens = _otherTokens;\n return;\n }\n if (this._lineTokens === null) {\n return;\n }\n if (_otherTokens === null) {\n // cannot determine combined line length...\n this._lineTokens = null;\n return;\n }\n var myTokens = new Uint32Array(this._lineTokens);\n var otherTokens = new Uint32Array(_otherTokens);\n var otherTokensCount = (otherTokens.length >>> 1);\n var result = new Uint32Array(myTokens.length + otherTokens.length);\n result.set(myTokens, 0);\n var dest = myTokens.length;\n var delta = myTokens[myTokens.length - 2];\n for (var i = 0; i < otherTokensCount; i++) {\n result[dest++] = otherTokens[(i << 1)] + delta;\n result[dest++] = otherTokens[(i << 1) + 1];\n }\n this._lineTokens = result.buffer;\n };\n ModelLineTokens.prototype.insert = function (chIndex, textLength) {\n if (!this._lineTokens) {\n // nothing to do\n return;\n }\n var tokens = new Uint32Array(this._lineTokens);\n var tokensCount = (tokens.length >>> 1);\n var fromTokenIndex = LineTokens.findIndexInTokensArray(tokens, chIndex);\n if (fromTokenIndex > 0) {\n var fromTokenStartOffset = (fromTokenIndex > 0 ? tokens[(fromTokenIndex - 1) << 1] : 0);\n if (fromTokenStartOffset === chIndex) {\n fromTokenIndex--;\n }\n }\n for (var tokenIndex = fromTokenIndex; tokenIndex < tokensCount; tokenIndex++) {\n tokens[tokenIndex << 1] += textLength;\n }\n };\n return ModelLineTokens;\n}());\nvar ModelLinesTokens = /** @class */ (function () {\n function ModelLinesTokens(languageIdentifier, tokenizationSupport) {\n this.languageIdentifier = languageIdentifier;\n this.tokenizationSupport = tokenizationSupport;\n this._tokens = [];\n if (this.tokenizationSupport) {\n var initialState = null;\n try {\n initialState = this.tokenizationSupport.getInitialState();\n }\n catch (e) {\n onUnexpectedError(e);\n this.tokenizationSupport = null;\n }\n if (initialState) {\n this._tokens[0] = new ModelLineTokens(initialState);\n }\n }\n this._invalidLineStartIndex = 0;\n this._lastState = null;\n }\n Object.defineProperty(ModelLinesTokens.prototype, \"inValidLineStartIndex\", {\n get: function () {\n return this._invalidLineStartIndex;\n },\n enumerable: true,\n configurable: true\n });\n ModelLinesTokens.prototype.getTokens = function (topLevelLanguageId, lineIndex, lineText) {\n var rawLineTokens = null;\n if (lineIndex < this._tokens.length && this._tokens[lineIndex]) {\n rawLineTokens = this._tokens[lineIndex]._lineTokens;\n }\n if (rawLineTokens !== null && rawLineTokens !== EMPTY_LINE_TOKENS) {\n return new LineTokens(new Uint32Array(rawLineTokens), lineText);\n }\n var lineTokens = new Uint32Array(2);\n lineTokens[0] = lineText.length;\n lineTokens[1] = getDefaultMetadata(topLevelLanguageId);\n return new LineTokens(lineTokens, lineText);\n };\n ModelLinesTokens.prototype.isCheapToTokenize = function (lineNumber) {\n var firstInvalidLineNumber = this._invalidLineStartIndex + 1;\n return (firstInvalidLineNumber >= lineNumber);\n };\n ModelLinesTokens.prototype.hasLinesToTokenize = function (buffer) {\n return (this._invalidLineStartIndex < buffer.getLineCount());\n };\n ModelLinesTokens.prototype.invalidateLine = function (lineIndex) {\n this._setIsInvalid(lineIndex, true);\n if (lineIndex < this._invalidLineStartIndex) {\n this._setIsInvalid(this._invalidLineStartIndex, true);\n this._invalidLineStartIndex = lineIndex;\n }\n };\n ModelLinesTokens.prototype._setIsInvalid = function (lineIndex, invalid) {\n if (lineIndex < this._tokens.length && this._tokens[lineIndex]) {\n this._tokens[lineIndex]._invalid = invalid;\n }\n };\n ModelLinesTokens.prototype._isInvalid = function (lineIndex) {\n if (lineIndex < this._tokens.length && this._tokens[lineIndex]) {\n return this._tokens[lineIndex]._invalid;\n }\n return true;\n };\n ModelLinesTokens.prototype._getState = function (lineIndex) {\n if (lineIndex < this._tokens.length && this._tokens[lineIndex]) {\n return this._tokens[lineIndex]._state;\n }\n return null;\n };\n ModelLinesTokens.prototype._setTokens = function (topLevelLanguageId, lineIndex, lineTextLength, tokens) {\n var target;\n if (lineIndex < this._tokens.length && this._tokens[lineIndex]) {\n target = this._tokens[lineIndex];\n }\n else {\n target = new ModelLineTokens(null);\n this._tokens[lineIndex] = target;\n }\n if (lineTextLength === 0) {\n target._lineTokens = EMPTY_LINE_TOKENS;\n return;\n }\n if (!tokens || tokens.length === 0) {\n tokens = new Uint32Array(2);\n tokens[0] = 0;\n tokens[1] = getDefaultMetadata(topLevelLanguageId);\n }\n LineTokens.convertToEndOffset(tokens, lineTextLength);\n target._lineTokens = tokens.buffer;\n };\n ModelLinesTokens.prototype._setState = function (lineIndex, state) {\n if (lineIndex < this._tokens.length && this._tokens[lineIndex]) {\n this._tokens[lineIndex]._state = state;\n }\n else {\n var tmp = new ModelLineTokens(state);\n this._tokens[lineIndex] = tmp;\n }\n };\n //#region Editing\n ModelLinesTokens.prototype.applyEdits = function (range, eolCount, firstLineLength) {\n var deletingLinesCnt = range.endLineNumber - range.startLineNumber;\n var insertingLinesCnt = eolCount;\n var editingLinesCnt = Math.min(deletingLinesCnt, insertingLinesCnt);\n for (var j = editingLinesCnt; j >= 0; j--) {\n this.invalidateLine(range.startLineNumber + j - 1);\n }\n this._acceptDeleteRange(range);\n this._acceptInsertText(new Position(range.startLineNumber, range.startColumn), eolCount, firstLineLength);\n };\n ModelLinesTokens.prototype._acceptDeleteRange = function (range) {\n var firstLineIndex = range.startLineNumber - 1;\n if (firstLineIndex >= this._tokens.length) {\n return;\n }\n if (range.startLineNumber === range.endLineNumber) {\n if (range.startColumn === range.endColumn) {\n // Nothing to delete\n return;\n }\n this._tokens[firstLineIndex].delete(range.startColumn - 1, range.endColumn - 1);\n return;\n }\n var firstLine = this._tokens[firstLineIndex];\n firstLine.deleteEnding(range.startColumn - 1);\n var lastLineIndex = range.endLineNumber - 1;\n var lastLineTokens = null;\n if (lastLineIndex < this._tokens.length) {\n var lastLine = this._tokens[lastLineIndex];\n lastLine.deleteBeginning(range.endColumn - 1);\n lastLineTokens = lastLine._lineTokens;\n }\n // Take remaining text on last line and append it to remaining text on first line\n firstLine.append(lastLineTokens);\n // Delete middle lines\n this._tokens.splice(range.startLineNumber, range.endLineNumber - range.startLineNumber);\n };\n ModelLinesTokens.prototype._acceptInsertText = function (position, eolCount, firstLineLength) {\n if (eolCount === 0 && firstLineLength === 0) {\n // Nothing to insert\n return;\n }\n var lineIndex = position.lineNumber - 1;\n if (lineIndex >= this._tokens.length) {\n return;\n }\n if (eolCount === 0) {\n // Inserting text on one line\n this._tokens[lineIndex].insert(position.column - 1, firstLineLength);\n return;\n }\n var line = this._tokens[lineIndex];\n line.deleteEnding(position.column - 1);\n line.insert(position.column - 1, firstLineLength);\n var insert = new Array(eolCount);\n for (var i = eolCount - 1; i >= 0; i--) {\n insert[i] = new ModelLineTokens(null);\n }\n this._tokens = arrays.arrayInsert(this._tokens, position.lineNumber, insert);\n };\n //#endregion\n //#region Tokenization\n ModelLinesTokens.prototype._tokenizeOneLine = function (buffer, eventBuilder) {\n if (!this.hasLinesToTokenize(buffer)) {\n return buffer.getLineCount() + 1;\n }\n var lineNumber = this._invalidLineStartIndex + 1;\n this._updateTokensUntilLine(buffer, eventBuilder, lineNumber);\n return lineNumber;\n };\n ModelLinesTokens.prototype._tokenizeText = function (buffer, text, state) {\n var r = null;\n try {\n r = this.tokenizationSupport.tokenize2(text, state, 0);\n }\n catch (e) {\n onUnexpectedError(e);\n }\n if (!r) {\n r = nullTokenize2(this.languageIdentifier.id, text, state, 0);\n }\n return r;\n };\n ModelLinesTokens.prototype._updateTokensUntilLine = function (buffer, eventBuilder, lineNumber) {\n if (!this.tokenizationSupport) {\n this._invalidLineStartIndex = buffer.getLineCount();\n return;\n }\n var linesLength = buffer.getLineCount();\n var endLineIndex = lineNumber - 1;\n // Validate all states up to and including endLineIndex\n for (var lineIndex = this._invalidLineStartIndex; lineIndex <= endLineIndex; lineIndex++) {\n var endStateIndex = lineIndex + 1;\n var r = null;\n var text = buffer.getLineContent(lineIndex + 1);\n try {\n // Tokenize only the first X characters\n var freshState = this._getState(lineIndex).clone();\n r = this.tokenizationSupport.tokenize2(text, freshState, 0);\n }\n catch (e) {\n onUnexpectedError(e);\n }\n if (!r) {\n r = nullTokenize2(this.languageIdentifier.id, text, this._getState(lineIndex), 0);\n }\n this._setTokens(this.languageIdentifier.id, lineIndex, text.length, r.tokens);\n eventBuilder.registerChangedTokens(lineIndex + 1);\n this._setIsInvalid(lineIndex, false);\n if (endStateIndex < linesLength) {\n if (this._getState(endStateIndex) !== null && r.endState.equals(this._getState(endStateIndex))) {\n // The end state of this line remains the same\n var nextInvalidLineIndex = lineIndex + 1;\n while (nextInvalidLineIndex < linesLength) {\n if (this._isInvalid(nextInvalidLineIndex)) {\n break;\n }\n if (nextInvalidLineIndex + 1 < linesLength) {\n if (this._getState(nextInvalidLineIndex + 1) === null) {\n break;\n }\n }\n else {\n if (this._lastState === null) {\n break;\n }\n }\n nextInvalidLineIndex++;\n }\n this._invalidLineStartIndex = Math.max(this._invalidLineStartIndex, nextInvalidLineIndex);\n lineIndex = nextInvalidLineIndex - 1; // -1 because the outer loop increments it\n }\n else {\n this._setState(endStateIndex, r.endState);\n }\n }\n else {\n this._lastState = r.endState;\n }\n }\n this._invalidLineStartIndex = Math.max(this._invalidLineStartIndex, endLineIndex + 1);\n };\n return ModelLinesTokens;\n}());\nexport { ModelLinesTokens };\nvar ModelTokensChangedEventBuilder = /** @class */ (function () {\n function ModelTokensChangedEventBuilder() {\n this._ranges = [];\n }\n ModelTokensChangedEventBuilder.prototype.registerChangedTokens = function (lineNumber) {\n var ranges = this._ranges;\n var rangesLength = ranges.length;\n var previousRange = rangesLength > 0 ? ranges[rangesLength - 1] : null;\n if (previousRange && previousRange.toLineNumber === lineNumber - 1) {\n // extend previous range\n previousRange.toLineNumber++;\n }\n else {\n // insert new range\n ranges[rangesLength] = {\n fromLineNumber: lineNumber,\n toLineNumber: lineNumber\n };\n }\n };\n ModelTokensChangedEventBuilder.prototype.build = function () {\n if (this._ranges.length === 0) {\n return null;\n }\n return {\n ranges: this._ranges\n };\n };\n return ModelTokensChangedEventBuilder;\n}());\nexport { ModelTokensChangedEventBuilder };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\n/**\n * Compute the diff in spaces between two line's indentation.\n */\nfunction spacesDiff(a, aLength, b, bLength) {\n // This can go both ways (e.g.):\n // - a: \"\\t\"\n // - b: \"\\t \"\n // => This should count 1 tab and 4 spaces\n var i;\n for (i = 0; i < aLength && i < bLength; i++) {\n var aCharCode = a.charCodeAt(i);\n var bCharCode = b.charCodeAt(i);\n if (aCharCode !== bCharCode) {\n break;\n }\n }\n var aSpacesCnt = 0, aTabsCount = 0;\n for (var j = i; j < aLength; j++) {\n var aCharCode = a.charCodeAt(j);\n if (aCharCode === 32 /* Space */) {\n aSpacesCnt++;\n }\n else {\n aTabsCount++;\n }\n }\n var bSpacesCnt = 0, bTabsCount = 0;\n for (var j = i; j < bLength; j++) {\n var bCharCode = b.charCodeAt(j);\n if (bCharCode === 32 /* Space */) {\n bSpacesCnt++;\n }\n else {\n bTabsCount++;\n }\n }\n if (aSpacesCnt > 0 && aTabsCount > 0) {\n return 0;\n }\n if (bSpacesCnt > 0 && bTabsCount > 0) {\n return 0;\n }\n var tabsDiff = Math.abs(aTabsCount - bTabsCount);\n var spacesDiff = Math.abs(aSpacesCnt - bSpacesCnt);\n if (tabsDiff === 0) {\n return spacesDiff;\n }\n if (spacesDiff % tabsDiff === 0) {\n return spacesDiff / tabsDiff;\n }\n return 0;\n}\nexport function guessIndentation(source, defaultTabSize, defaultInsertSpaces) {\n // Look at most at the first 10k lines\n var linesCount = Math.min(source.getLineCount(), 10000);\n var linesIndentedWithTabsCount = 0; // number of lines that contain at least one tab in indentation\n var linesIndentedWithSpacesCount = 0; // number of lines that contain only spaces in indentation\n var previousLineText = ''; // content of latest line that contained non-whitespace chars\n var previousLineIndentation = 0; // index at which latest line contained the first non-whitespace char\n var ALLOWED_TAB_SIZE_GUESSES = [2, 4, 6, 8]; // limit guesses for `tabSize` to 2, 4, 6 or 8.\n var MAX_ALLOWED_TAB_SIZE_GUESS = 8; // max(2,4,6,8) = 8\n var spacesDiffCount = [0, 0, 0, 0, 0, 0, 0, 0, 0]; // `tabSize` scores\n for (var lineNumber = 1; lineNumber <= linesCount; lineNumber++) {\n var currentLineLength = source.getLineLength(lineNumber);\n var currentLineText = source.getLineContent(lineNumber);\n // if the text buffer is chunk based, so long lines are cons-string, v8 will flattern the string when we check charCode.\n // checking charCode on chunks directly is cheaper.\n var useCurrentLineText = (currentLineLength <= 65536);\n var currentLineHasContent = false; // does `currentLineText` contain non-whitespace chars\n var currentLineIndentation = 0; // index at which `currentLineText` contains the first non-whitespace char\n var currentLineSpacesCount = 0; // count of spaces found in `currentLineText` indentation\n var currentLineTabsCount = 0; // count of tabs found in `currentLineText` indentation\n for (var j = 0, lenJ = currentLineLength; j < lenJ; j++) {\n var charCode = (useCurrentLineText ? currentLineText.charCodeAt(j) : source.getLineCharCode(lineNumber, j));\n if (charCode === 9 /* Tab */) {\n currentLineTabsCount++;\n }\n else if (charCode === 32 /* Space */) {\n currentLineSpacesCount++;\n }\n else {\n // Hit non whitespace character on this line\n currentLineHasContent = true;\n currentLineIndentation = j;\n break;\n }\n }\n // Ignore empty or only whitespace lines\n if (!currentLineHasContent) {\n continue;\n }\n if (currentLineTabsCount > 0) {\n linesIndentedWithTabsCount++;\n }\n else if (currentLineSpacesCount > 1) {\n linesIndentedWithSpacesCount++;\n }\n var currentSpacesDiff = spacesDiff(previousLineText, previousLineIndentation, currentLineText, currentLineIndentation);\n if (currentSpacesDiff <= MAX_ALLOWED_TAB_SIZE_GUESS) {\n spacesDiffCount[currentSpacesDiff]++;\n }\n previousLineText = currentLineText;\n previousLineIndentation = currentLineIndentation;\n }\n var insertSpaces = defaultInsertSpaces;\n if (linesIndentedWithTabsCount !== linesIndentedWithSpacesCount) {\n insertSpaces = (linesIndentedWithTabsCount < linesIndentedWithSpacesCount);\n }\n var tabSize = defaultTabSize;\n var tabSizeScore = (insertSpaces ? 0 : 0.1 * linesCount);\n // console.log(\"score threshold: \" + tabSizeScore);\n ALLOWED_TAB_SIZE_GUESSES.forEach(function (possibleTabSize) {\n var possibleTabSizeScore = spacesDiffCount[possibleTabSize];\n if (possibleTabSizeScore > tabSizeScore) {\n tabSizeScore = possibleTabSizeScore;\n tabSize = possibleTabSize;\n }\n });\n // console.log('--------------------------');\n // console.log('linesIndentedWithTabsCount: ' + linesIndentedWithTabsCount + ', linesIndentedWithSpacesCount: ' + linesIndentedWithSpacesCount);\n // console.log('spacesDiffCount: ' + spacesDiffCount);\n // console.log('tabSize: ' + tabSize + ', tabSizeScore: ' + tabSizeScore);\n return {\n insertSpaces: insertSpaces,\n tabSize: tabSize\n };\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar TreeNode = /** @class */ (function () {\n function TreeNode(piece, color) {\n this.piece = piece;\n this.color = color;\n this.size_left = 0;\n this.lf_left = 0;\n this.parent = null;\n this.left = null;\n this.right = null;\n }\n TreeNode.prototype.next = function () {\n if (this.right !== SENTINEL) {\n return leftest(this.right);\n }\n var node = this;\n while (node.parent !== SENTINEL) {\n if (node.parent.left === node) {\n break;\n }\n node = node.parent;\n }\n if (node.parent === SENTINEL) {\n return SENTINEL;\n }\n else {\n return node.parent;\n }\n };\n TreeNode.prototype.prev = function () {\n if (this.left !== SENTINEL) {\n return righttest(this.left);\n }\n var node = this;\n while (node.parent !== SENTINEL) {\n if (node.parent.right === node) {\n break;\n }\n node = node.parent;\n }\n if (node.parent === SENTINEL) {\n return SENTINEL;\n }\n else {\n return node.parent;\n }\n };\n TreeNode.prototype.detach = function () {\n this.parent = null;\n this.left = null;\n this.right = null;\n };\n return TreeNode;\n}());\nexport { TreeNode };\nexport var SENTINEL = new TreeNode(null, 0 /* Black */);\nSENTINEL.parent = SENTINEL;\nSENTINEL.left = SENTINEL;\nSENTINEL.right = SENTINEL;\nSENTINEL.color = 0 /* Black */;\nexport function leftest(node) {\n while (node.left !== SENTINEL) {\n node = node.left;\n }\n return node;\n}\nexport function righttest(node) {\n while (node.right !== SENTINEL) {\n node = node.right;\n }\n return node;\n}\nexport function calculateSize(node) {\n if (node === SENTINEL) {\n return 0;\n }\n return node.size_left + node.piece.length + calculateSize(node.right);\n}\nexport function calculateLF(node) {\n if (node === SENTINEL) {\n return 0;\n }\n return node.lf_left + node.piece.lineFeedCnt + calculateLF(node.right);\n}\nexport function resetSentinel() {\n SENTINEL.parent = SENTINEL;\n}\nexport function leftRotate(tree, x) {\n var y = x.right;\n // fix size_left\n y.size_left += x.size_left + (x.piece ? x.piece.length : 0);\n y.lf_left += x.lf_left + (x.piece ? x.piece.lineFeedCnt : 0);\n x.right = y.left;\n if (y.left !== SENTINEL) {\n y.left.parent = x;\n }\n y.parent = x.parent;\n if (x.parent === SENTINEL) {\n tree.root = y;\n }\n else if (x.parent.left === x) {\n x.parent.left = y;\n }\n else {\n x.parent.right = y;\n }\n y.left = x;\n x.parent = y;\n}\nexport function rightRotate(tree, y) {\n var x = y.left;\n y.left = x.right;\n if (x.right !== SENTINEL) {\n x.right.parent = y;\n }\n x.parent = y.parent;\n // fix size_left\n y.size_left -= x.size_left + (x.piece ? x.piece.length : 0);\n y.lf_left -= x.lf_left + (x.piece ? x.piece.lineFeedCnt : 0);\n if (y.parent === SENTINEL) {\n tree.root = x;\n }\n else if (y === y.parent.right) {\n y.parent.right = x;\n }\n else {\n y.parent.left = x;\n }\n x.right = y;\n y.parent = x;\n}\nexport function rbDelete(tree, z) {\n var x;\n var y;\n if (z.left === SENTINEL) {\n y = z;\n x = y.right;\n }\n else if (z.right === SENTINEL) {\n y = z;\n x = y.left;\n }\n else {\n y = leftest(z.right);\n x = y.right;\n }\n if (y === tree.root) {\n tree.root = x;\n // if x is null, we are removing the only node\n x.color = 0 /* Black */;\n z.detach();\n resetSentinel();\n tree.root.parent = SENTINEL;\n return;\n }\n var yWasRed = (y.color === 1 /* Red */);\n if (y === y.parent.left) {\n y.parent.left = x;\n }\n else {\n y.parent.right = x;\n }\n if (y === z) {\n x.parent = y.parent;\n recomputeTreeMetadata(tree, x);\n }\n else {\n if (y.parent === z) {\n x.parent = y;\n }\n else {\n x.parent = y.parent;\n }\n // as we make changes to x's hierarchy, update size_left of subtree first\n recomputeTreeMetadata(tree, x);\n y.left = z.left;\n y.right = z.right;\n y.parent = z.parent;\n y.color = z.color;\n if (z === tree.root) {\n tree.root = y;\n }\n else {\n if (z === z.parent.left) {\n z.parent.left = y;\n }\n else {\n z.parent.right = y;\n }\n }\n if (y.left !== SENTINEL) {\n y.left.parent = y;\n }\n if (y.right !== SENTINEL) {\n y.right.parent = y;\n }\n // update metadata\n // we replace z with y, so in this sub tree, the length change is z.item.length\n y.size_left = z.size_left;\n y.lf_left = z.lf_left;\n recomputeTreeMetadata(tree, y);\n }\n z.detach();\n if (x.parent.left === x) {\n var newSizeLeft = calculateSize(x);\n var newLFLeft = calculateLF(x);\n if (newSizeLeft !== x.parent.size_left || newLFLeft !== x.parent.lf_left) {\n var delta = newSizeLeft - x.parent.size_left;\n var lf_delta = newLFLeft - x.parent.lf_left;\n x.parent.size_left = newSizeLeft;\n x.parent.lf_left = newLFLeft;\n updateTreeMetadata(tree, x.parent, delta, lf_delta);\n }\n }\n recomputeTreeMetadata(tree, x.parent);\n if (yWasRed) {\n resetSentinel();\n return;\n }\n // RB-DELETE-FIXUP\n var w;\n while (x !== tree.root && x.color === 0 /* Black */) {\n if (x === x.parent.left) {\n w = x.parent.right;\n if (w.color === 1 /* Red */) {\n w.color = 0 /* Black */;\n x.parent.color = 1 /* Red */;\n leftRotate(tree, x.parent);\n w = x.parent.right;\n }\n if (w.left.color === 0 /* Black */ && w.right.color === 0 /* Black */) {\n w.color = 1 /* Red */;\n x = x.parent;\n }\n else {\n if (w.right.color === 0 /* Black */) {\n w.left.color = 0 /* Black */;\n w.color = 1 /* Red */;\n rightRotate(tree, w);\n w = x.parent.right;\n }\n w.color = x.parent.color;\n x.parent.color = 0 /* Black */;\n w.right.color = 0 /* Black */;\n leftRotate(tree, x.parent);\n x = tree.root;\n }\n }\n else {\n w = x.parent.left;\n if (w.color === 1 /* Red */) {\n w.color = 0 /* Black */;\n x.parent.color = 1 /* Red */;\n rightRotate(tree, x.parent);\n w = x.parent.left;\n }\n if (w.left.color === 0 /* Black */ && w.right.color === 0 /* Black */) {\n w.color = 1 /* Red */;\n x = x.parent;\n }\n else {\n if (w.left.color === 0 /* Black */) {\n w.right.color = 0 /* Black */;\n w.color = 1 /* Red */;\n leftRotate(tree, w);\n w = x.parent.left;\n }\n w.color = x.parent.color;\n x.parent.color = 0 /* Black */;\n w.left.color = 0 /* Black */;\n rightRotate(tree, x.parent);\n x = tree.root;\n }\n }\n }\n x.color = 0 /* Black */;\n resetSentinel();\n}\nexport function fixInsert(tree, x) {\n recomputeTreeMetadata(tree, x);\n while (x !== tree.root && x.parent.color === 1 /* Red */) {\n if (x.parent === x.parent.parent.left) {\n var y = x.parent.parent.right;\n if (y.color === 1 /* Red */) {\n x.parent.color = 0 /* Black */;\n y.color = 0 /* Black */;\n x.parent.parent.color = 1 /* Red */;\n x = x.parent.parent;\n }\n else {\n if (x === x.parent.right) {\n x = x.parent;\n leftRotate(tree, x);\n }\n x.parent.color = 0 /* Black */;\n x.parent.parent.color = 1 /* Red */;\n rightRotate(tree, x.parent.parent);\n }\n }\n else {\n var y = x.parent.parent.left;\n if (y.color === 1 /* Red */) {\n x.parent.color = 0 /* Black */;\n y.color = 0 /* Black */;\n x.parent.parent.color = 1 /* Red */;\n x = x.parent.parent;\n }\n else {\n if (x === x.parent.left) {\n x = x.parent;\n rightRotate(tree, x);\n }\n x.parent.color = 0 /* Black */;\n x.parent.parent.color = 1 /* Red */;\n leftRotate(tree, x.parent.parent);\n }\n }\n }\n tree.root.color = 0 /* Black */;\n}\nexport function updateTreeMetadata(tree, x, delta, lineFeedCntDelta) {\n // node length change or line feed count change\n while (x !== tree.root && x !== SENTINEL) {\n if (x.parent.left === x) {\n x.parent.size_left += delta;\n x.parent.lf_left += lineFeedCntDelta;\n }\n x = x.parent;\n }\n}\nexport function recomputeTreeMetadata(tree, x) {\n var delta = 0;\n var lf_delta = 0;\n if (x === tree.root) {\n return;\n }\n if (delta === 0) {\n // go upwards till the node whose left subtree is changed.\n while (x !== tree.root && x === x.parent.right) {\n x = x.parent;\n }\n if (x === tree.root) {\n // well, it means we add a node to the end (inorder)\n return;\n }\n // x is the node whose right subtree is changed.\n x = x.parent;\n delta = calculateSize(x.left) - x.size_left;\n lf_delta = calculateLF(x.left) - x.lf_left;\n x.size_left += delta;\n x.lf_left += lf_delta;\n }\n // go upwards till root. O(logN)\n while (x !== tree.root && (delta !== 0 || lf_delta !== 0)) {\n if (x.parent.left === x) {\n x.parent.size_left += delta;\n x.parent.lf_left += lf_delta;\n }\n x = x.parent;\n }\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport { Position } from '../../core/position';\nimport { Range } from '../../core/range';\nimport { leftest, righttest, updateTreeMetadata, rbDelete, fixInsert, SENTINEL, TreeNode } from './rbTreeBase';\nimport { isValidMatch, Searcher, createFindMatch } from '../textModelSearch';\nimport { FindMatch } from '../../model';\n// const lfRegex = new RegExp(/\\r\\n|\\r|\\n/g);\nexport var AverageBufferSize = 65535;\nexport function createUintArray(arr) {\n var r;\n if (arr[arr.length - 1] < 65536) {\n r = new Uint16Array(arr.length);\n }\n else {\n r = new Uint32Array(arr.length);\n }\n r.set(arr, 0);\n return r;\n}\nvar LineStarts = /** @class */ (function () {\n function LineStarts(lineStarts, cr, lf, crlf, isBasicASCII) {\n this.lineStarts = lineStarts;\n this.cr = cr;\n this.lf = lf;\n this.crlf = crlf;\n this.isBasicASCII = isBasicASCII;\n }\n return LineStarts;\n}());\nexport { LineStarts };\nexport function createLineStartsFast(str, readonly) {\n if (readonly === void 0) { readonly = true; }\n var r = [0], rLength = 1;\n for (var i = 0, len = str.length; i < len; i++) {\n var chr = str.charCodeAt(i);\n if (chr === 13 /* CarriageReturn */) {\n if (i + 1 < len && str.charCodeAt(i + 1) === 10 /* LineFeed */) {\n // \\r\\n... case\n r[rLength++] = i + 2;\n i++; // skip \\n\n }\n else {\n // \\r... case\n r[rLength++] = i + 1;\n }\n }\n else if (chr === 10 /* LineFeed */) {\n r[rLength++] = i + 1;\n }\n }\n if (readonly) {\n return createUintArray(r);\n }\n else {\n return r;\n }\n}\nexport function createLineStarts(r, str) {\n r.length = 0;\n r[0] = 0;\n var rLength = 1;\n var cr = 0, lf = 0, crlf = 0;\n var isBasicASCII = true;\n for (var i = 0, len = str.length; i < len; i++) {\n var chr = str.charCodeAt(i);\n if (chr === 13 /* CarriageReturn */) {\n if (i + 1 < len && str.charCodeAt(i + 1) === 10 /* LineFeed */) {\n // \\r\\n... case\n crlf++;\n r[rLength++] = i + 2;\n i++; // skip \\n\n }\n else {\n cr++;\n // \\r... case\n r[rLength++] = i + 1;\n }\n }\n else if (chr === 10 /* LineFeed */) {\n lf++;\n r[rLength++] = i + 1;\n }\n else {\n if (isBasicASCII) {\n if (chr !== 9 /* Tab */ && (chr < 32 || chr > 126)) {\n isBasicASCII = false;\n }\n }\n }\n }\n var result = new LineStarts(createUintArray(r), cr, lf, crlf, isBasicASCII);\n r.length = 0;\n return result;\n}\nvar Piece = /** @class */ (function () {\n function Piece(bufferIndex, start, end, lineFeedCnt, length) {\n this.bufferIndex = bufferIndex;\n this.start = start;\n this.end = end;\n this.lineFeedCnt = lineFeedCnt;\n this.length = length;\n }\n return Piece;\n}());\nexport { Piece };\nvar StringBuffer = /** @class */ (function () {\n function StringBuffer(buffer, lineStarts) {\n this.buffer = buffer;\n this.lineStarts = lineStarts;\n }\n return StringBuffer;\n}());\nexport { StringBuffer };\nvar PieceTreeSearchCache = /** @class */ (function () {\n function PieceTreeSearchCache(limit) {\n this._limit = limit;\n this._cache = [];\n }\n PieceTreeSearchCache.prototype.get = function (offset) {\n for (var i = this._cache.length - 1; i >= 0; i--) {\n var nodePos = this._cache[i];\n if (nodePos.nodeStartOffset <= offset && nodePos.nodeStartOffset + nodePos.node.piece.length >= offset) {\n return nodePos;\n }\n }\n return null;\n };\n PieceTreeSearchCache.prototype.get2 = function (lineNumber) {\n for (var i = this._cache.length - 1; i >= 0; i--) {\n var nodePos = this._cache[i];\n if (nodePos.nodeStartLineNumber && nodePos.nodeStartLineNumber < lineNumber && nodePos.nodeStartLineNumber + nodePos.node.piece.lineFeedCnt >= lineNumber) {\n return nodePos;\n }\n }\n return null;\n };\n PieceTreeSearchCache.prototype.set = function (nodePosition) {\n if (this._cache.length >= this._limit) {\n this._cache.shift();\n }\n this._cache.push(nodePosition);\n };\n PieceTreeSearchCache.prototype.valdiate = function (offset) {\n var hasInvalidVal = false;\n for (var i = 0; i < this._cache.length; i++) {\n var nodePos = this._cache[i];\n if (nodePos.node.parent === null || nodePos.nodeStartOffset >= offset) {\n this._cache[i] = null;\n hasInvalidVal = true;\n continue;\n }\n }\n if (hasInvalidVal) {\n var newArr = [];\n for (var i = 0; i < this._cache.length; i++) {\n if (this._cache[i] !== null) {\n newArr.push(this._cache[i]);\n }\n }\n this._cache = newArr;\n }\n };\n return PieceTreeSearchCache;\n}());\nvar PieceTreeBase = /** @class */ (function () {\n function PieceTreeBase(chunks, eol, eolNormalized) {\n this.create(chunks, eol, eolNormalized);\n }\n PieceTreeBase.prototype.create = function (chunks, eol, eolNormalized) {\n this._buffers = [\n new StringBuffer('', [0])\n ];\n this._lastChangeBufferPos = { line: 0, column: 0 };\n this.root = SENTINEL;\n this._lineCnt = 1;\n this._length = 0;\n this._EOL = eol;\n this._EOLLength = eol.length;\n this._EOLNormalized = eolNormalized;\n var lastNode = null;\n for (var i = 0, len = chunks.length; i < len; i++) {\n if (chunks[i].buffer.length > 0) {\n if (!chunks[i].lineStarts) {\n chunks[i].lineStarts = createLineStartsFast(chunks[i].buffer);\n }\n var piece = new Piece(i + 1, { line: 0, column: 0 }, { line: chunks[i].lineStarts.length - 1, column: chunks[i].buffer.length - chunks[i].lineStarts[chunks[i].lineStarts.length - 1] }, chunks[i].lineStarts.length - 1, chunks[i].buffer.length);\n this._buffers.push(chunks[i]);\n lastNode = this.rbInsertRight(lastNode, piece);\n }\n }\n this._searchCache = new PieceTreeSearchCache(1);\n this._lastVisitedLine = { lineNumber: 0, value: null };\n this.computeBufferMetadata();\n };\n PieceTreeBase.prototype.normalizeEOL = function (eol) {\n var _this = this;\n var averageBufferSize = AverageBufferSize;\n var min = averageBufferSize - Math.floor(averageBufferSize / 3);\n var max = min * 2;\n var tempChunk = '';\n var tempChunkLen = 0;\n var chunks = [];\n this.iterate(this.root, function (node) {\n var str = _this.getNodeContent(node);\n var len = str.length;\n if (tempChunkLen <= min || tempChunkLen + len < max) {\n tempChunk += str;\n tempChunkLen += len;\n return true;\n }\n // flush anyways\n var text = tempChunk.replace(/\\r\\n|\\r|\\n/g, eol);\n chunks.push(new StringBuffer(text, createLineStartsFast(text)));\n tempChunk = str;\n tempChunkLen = len;\n return true;\n });\n if (tempChunkLen > 0) {\n var text = tempChunk.replace(/\\r\\n|\\r|\\n/g, eol);\n chunks.push(new StringBuffer(text, createLineStartsFast(text)));\n }\n this.create(chunks, eol, true);\n };\n // #region Buffer API\n PieceTreeBase.prototype.getEOL = function () {\n return this._EOL;\n };\n PieceTreeBase.prototype.setEOL = function (newEOL) {\n this._EOL = newEOL;\n this._EOLLength = this._EOL.length;\n this.normalizeEOL(newEOL);\n };\n PieceTreeBase.prototype.getOffsetAt = function (lineNumber, column) {\n var leftLen = 0; // inorder\n var x = this.root;\n while (x !== SENTINEL) {\n if (x.left !== SENTINEL && x.lf_left + 1 >= lineNumber) {\n x = x.left;\n }\n else if (x.lf_left + x.piece.lineFeedCnt + 1 >= lineNumber) {\n leftLen += x.size_left;\n // lineNumber >= 2\n var accumualtedValInCurrentIndex = this.getAccumulatedValue(x, lineNumber - x.lf_left - 2);\n return leftLen += accumualtedValInCurrentIndex + column - 1;\n }\n else {\n lineNumber -= x.lf_left + x.piece.lineFeedCnt;\n leftLen += x.size_left + x.piece.length;\n x = x.right;\n }\n }\n return leftLen;\n };\n PieceTreeBase.prototype.getPositionAt = function (offset) {\n offset = Math.floor(offset);\n offset = Math.max(0, offset);\n var x = this.root;\n var lfCnt = 0;\n var originalOffset = offset;\n while (x !== SENTINEL) {\n if (x.size_left !== 0 && x.size_left >= offset) {\n x = x.left;\n }\n else if (x.size_left + x.piece.length >= offset) {\n var out = this.getIndexOf(x, offset - x.size_left);\n lfCnt += x.lf_left + out.index;\n if (out.index === 0) {\n var lineStartOffset = this.getOffsetAt(lfCnt + 1, 1);\n var column = originalOffset - lineStartOffset;\n return new Position(lfCnt + 1, column + 1);\n }\n return new Position(lfCnt + 1, out.remainder + 1);\n }\n else {\n offset -= x.size_left + x.piece.length;\n lfCnt += x.lf_left + x.piece.lineFeedCnt;\n if (x.right === SENTINEL) {\n // last node\n var lineStartOffset = this.getOffsetAt(lfCnt + 1, 1);\n var column = originalOffset - offset - lineStartOffset;\n return new Position(lfCnt + 1, column + 1);\n }\n else {\n x = x.right;\n }\n }\n }\n return new Position(1, 1);\n };\n PieceTreeBase.prototype.getValueInRange = function (range, eol) {\n if (range.startLineNumber === range.endLineNumber && range.startColumn === range.endColumn) {\n return '';\n }\n var startPosition = this.nodeAt2(range.startLineNumber, range.startColumn);\n var endPosition = this.nodeAt2(range.endLineNumber, range.endColumn);\n var value = this.getValueInRange2(startPosition, endPosition);\n if (eol) {\n if (eol !== this._EOL || !this._EOLNormalized) {\n return value.replace(/\\r\\n|\\r|\\n/g, eol);\n }\n if (eol === this.getEOL() && this._EOLNormalized) {\n if (eol === '\\r\\n') {\n }\n return value;\n }\n return value.replace(/\\r\\n|\\r|\\n/g, eol);\n }\n return value;\n };\n PieceTreeBase.prototype.getValueInRange2 = function (startPosition, endPosition) {\n if (startPosition.node === endPosition.node) {\n var node = startPosition.node;\n var buffer_1 = this._buffers[node.piece.bufferIndex].buffer;\n var startOffset_1 = this.offsetInBuffer(node.piece.bufferIndex, node.piece.start);\n return buffer_1.substring(startOffset_1 + startPosition.remainder, startOffset_1 + endPosition.remainder);\n }\n var x = startPosition.node;\n var buffer = this._buffers[x.piece.bufferIndex].buffer;\n var startOffset = this.offsetInBuffer(x.piece.bufferIndex, x.piece.start);\n var ret = buffer.substring(startOffset + startPosition.remainder, startOffset + x.piece.length);\n x = x.next();\n while (x !== SENTINEL) {\n var buffer_2 = this._buffers[x.piece.bufferIndex].buffer;\n var startOffset_2 = this.offsetInBuffer(x.piece.bufferIndex, x.piece.start);\n if (x === endPosition.node) {\n ret += buffer_2.substring(startOffset_2, startOffset_2 + endPosition.remainder);\n break;\n }\n else {\n ret += buffer_2.substr(startOffset_2, x.piece.length);\n }\n x = x.next();\n }\n return ret;\n };\n PieceTreeBase.prototype.getLinesContent = function () {\n return this.getContentOfSubTree(this.root).split(/\\r\\n|\\r|\\n/);\n };\n PieceTreeBase.prototype.getLength = function () {\n return this._length;\n };\n PieceTreeBase.prototype.getLineCount = function () {\n return this._lineCnt;\n };\n PieceTreeBase.prototype.getLineContent = function (lineNumber) {\n if (this._lastVisitedLine.lineNumber === lineNumber) {\n return this._lastVisitedLine.value;\n }\n this._lastVisitedLine.lineNumber = lineNumber;\n if (lineNumber === this._lineCnt) {\n this._lastVisitedLine.value = this.getLineRawContent(lineNumber);\n }\n else if (this._EOLNormalized) {\n this._lastVisitedLine.value = this.getLineRawContent(lineNumber, this._EOLLength);\n }\n else {\n this._lastVisitedLine.value = this.getLineRawContent(lineNumber).replace(/(\\r\\n|\\r|\\n)$/, '');\n }\n return this._lastVisitedLine.value;\n };\n PieceTreeBase.prototype.getLineCharCode = function (lineNumber, index) {\n var nodePos = this.nodeAt2(lineNumber, index + 1);\n if (nodePos.remainder === nodePos.node.piece.length) {\n // the char we want to fetch is at the head of next node.\n var matchingNode = nodePos.node.next();\n if (!matchingNode) {\n return 0;\n }\n var buffer = this._buffers[matchingNode.piece.bufferIndex];\n var startOffset = this.offsetInBuffer(matchingNode.piece.bufferIndex, matchingNode.piece.start);\n return buffer.buffer.charCodeAt(startOffset);\n }\n else {\n var buffer = this._buffers[nodePos.node.piece.bufferIndex];\n var startOffset = this.offsetInBuffer(nodePos.node.piece.bufferIndex, nodePos.node.piece.start);\n var targetOffset = startOffset + nodePos.remainder;\n return buffer.buffer.charCodeAt(targetOffset);\n }\n };\n PieceTreeBase.prototype.getLineLength = function (lineNumber) {\n if (lineNumber === this.getLineCount()) {\n var startOffset = this.getOffsetAt(lineNumber, 1);\n return this.getLength() - startOffset;\n }\n return this.getOffsetAt(lineNumber + 1, 1) - this.getOffsetAt(lineNumber, 1) - this._EOLLength;\n };\n PieceTreeBase.prototype.findMatchesInNode = function (node, searcher, startLineNumber, startColumn, startCursor, endCursor, searchData, captureMatches, limitResultCount, resultLen, result) {\n var buffer = this._buffers[node.piece.bufferIndex];\n var startOffsetInBuffer = this.offsetInBuffer(node.piece.bufferIndex, node.piece.start);\n var start = this.offsetInBuffer(node.piece.bufferIndex, startCursor);\n var end = this.offsetInBuffer(node.piece.bufferIndex, endCursor);\n var m;\n // Reset regex to search from the beginning\n searcher.reset(start);\n var ret = { line: 0, column: 0 };\n do {\n m = searcher.next(buffer.buffer);\n if (m) {\n if (m.index >= end) {\n return resultLen;\n }\n this.positionInBuffer(node, m.index - startOffsetInBuffer, ret);\n var lineFeedCnt = this.getLineFeedCnt(node.piece.bufferIndex, startCursor, ret);\n var retStartColumn = ret.line === startCursor.line ? ret.column - startCursor.column + startColumn : ret.column + 1;\n var retEndColumn = retStartColumn + m[0].length;\n result[resultLen++] = createFindMatch(new Range(startLineNumber + lineFeedCnt, retStartColumn, startLineNumber + lineFeedCnt, retEndColumn), m, captureMatches);\n if (m.index + m[0].length >= end) {\n return resultLen;\n }\n if (resultLen >= limitResultCount) {\n return resultLen;\n }\n }\n } while (m);\n return resultLen;\n };\n PieceTreeBase.prototype.findMatchesLineByLine = function (searchRange, searchData, captureMatches, limitResultCount) {\n var result = [];\n var resultLen = 0;\n var searcher = new Searcher(searchData.wordSeparators, searchData.regex);\n var startPostion = this.nodeAt2(searchRange.startLineNumber, searchRange.startColumn);\n if (startPostion === null) {\n return [];\n }\n var endPosition = this.nodeAt2(searchRange.endLineNumber, searchRange.endColumn);\n if (endPosition === null) {\n return [];\n }\n var start = this.positionInBuffer(startPostion.node, startPostion.remainder);\n var end = this.positionInBuffer(endPosition.node, endPosition.remainder);\n if (startPostion.node === endPosition.node) {\n this.findMatchesInNode(startPostion.node, searcher, searchRange.startLineNumber, searchRange.startColumn, start, end, searchData, captureMatches, limitResultCount, resultLen, result);\n return result;\n }\n var startLineNumber = searchRange.startLineNumber;\n var currentNode = startPostion.node;\n while (currentNode !== endPosition.node) {\n var lineBreakCnt = this.getLineFeedCnt(currentNode.piece.bufferIndex, start, currentNode.piece.end);\n if (lineBreakCnt >= 1) {\n // last line break position\n var lineStarts = this._buffers[currentNode.piece.bufferIndex].lineStarts;\n var startOffsetInBuffer = this.offsetInBuffer(currentNode.piece.bufferIndex, currentNode.piece.start);\n var nextLineStartOffset = lineStarts[start.line + lineBreakCnt];\n var startColumn_1 = startLineNumber === searchRange.startLineNumber ? searchRange.startColumn : 1;\n resultLen = this.findMatchesInNode(currentNode, searcher, startLineNumber, startColumn_1, start, this.positionInBuffer(currentNode, nextLineStartOffset - startOffsetInBuffer), searchData, captureMatches, limitResultCount, resultLen, result);\n if (resultLen >= limitResultCount) {\n return result;\n }\n startLineNumber += lineBreakCnt;\n }\n var startColumn_2 = startLineNumber === searchRange.startLineNumber ? searchRange.startColumn - 1 : 0;\n // search for the remaining content\n if (startLineNumber === searchRange.endLineNumber) {\n var text = this.getLineContent(startLineNumber).substring(startColumn_2, searchRange.endColumn - 1);\n resultLen = this._findMatchesInLine(searchData, searcher, text, searchRange.endLineNumber, startColumn_2, resultLen, result, captureMatches, limitResultCount);\n return result;\n }\n resultLen = this._findMatchesInLine(searchData, searcher, this.getLineContent(startLineNumber).substr(startColumn_2), startLineNumber, startColumn_2, resultLen, result, captureMatches, limitResultCount);\n if (resultLen >= limitResultCount) {\n return result;\n }\n startLineNumber++;\n startPostion = this.nodeAt2(startLineNumber, 1);\n currentNode = startPostion.node;\n start = this.positionInBuffer(startPostion.node, startPostion.remainder);\n }\n if (startLineNumber === searchRange.endLineNumber) {\n var startColumn_3 = startLineNumber === searchRange.startLineNumber ? searchRange.startColumn - 1 : 0;\n var text = this.getLineContent(startLineNumber).substring(startColumn_3, searchRange.endColumn - 1);\n resultLen = this._findMatchesInLine(searchData, searcher, text, searchRange.endLineNumber, startColumn_3, resultLen, result, captureMatches, limitResultCount);\n return result;\n }\n var startColumn = startLineNumber === searchRange.startLineNumber ? searchRange.startColumn : 1;\n resultLen = this.findMatchesInNode(endPosition.node, searcher, startLineNumber, startColumn, start, end, searchData, captureMatches, limitResultCount, resultLen, result);\n return result;\n };\n PieceTreeBase.prototype._findMatchesInLine = function (searchData, searcher, text, lineNumber, deltaOffset, resultLen, result, captureMatches, limitResultCount) {\n var wordSeparators = searchData.wordSeparators;\n if (!captureMatches && searchData.simpleSearch) {\n var searchString = searchData.simpleSearch;\n var searchStringLen = searchString.length;\n var textLength = text.length;\n var lastMatchIndex = -searchStringLen;\n while ((lastMatchIndex = text.indexOf(searchString, lastMatchIndex + searchStringLen)) !== -1) {\n if (!wordSeparators || isValidMatch(wordSeparators, text, textLength, lastMatchIndex, searchStringLen)) {\n result[resultLen++] = new FindMatch(new Range(lineNumber, lastMatchIndex + 1 + deltaOffset, lineNumber, lastMatchIndex + 1 + searchStringLen + deltaOffset), null);\n if (resultLen >= limitResultCount) {\n return resultLen;\n }\n }\n }\n return resultLen;\n }\n var m;\n // Reset regex to search from the beginning\n searcher.reset(0);\n do {\n m = searcher.next(text);\n if (m) {\n result[resultLen++] = createFindMatch(new Range(lineNumber, m.index + 1 + deltaOffset, lineNumber, m.index + 1 + m[0].length + deltaOffset), m, captureMatches);\n if (resultLen >= limitResultCount) {\n return resultLen;\n }\n }\n } while (m);\n return resultLen;\n };\n // #endregion\n // #region Piece Table\n PieceTreeBase.prototype.insert = function (offset, value, eolNormalized) {\n if (eolNormalized === void 0) { eolNormalized = false; }\n this._EOLNormalized = this._EOLNormalized && eolNormalized;\n this._lastVisitedLine.lineNumber = 0;\n this._lastVisitedLine.value = null;\n if (this.root !== SENTINEL) {\n var _a = this.nodeAt(offset), node = _a.node, remainder = _a.remainder, nodeStartOffset = _a.nodeStartOffset;\n var piece = node.piece;\n var bufferIndex = piece.bufferIndex;\n var insertPosInBuffer = this.positionInBuffer(node, remainder);\n if (node.piece.bufferIndex === 0 &&\n piece.end.line === this._lastChangeBufferPos.line &&\n piece.end.column === this._lastChangeBufferPos.column &&\n (nodeStartOffset + piece.length === offset) &&\n value.length < AverageBufferSize) {\n // changed buffer\n this.appendToNode(node, value);\n this.computeBufferMetadata();\n return;\n }\n if (nodeStartOffset === offset) {\n this.insertContentToNodeLeft(value, node);\n this._searchCache.valdiate(offset);\n }\n else if (nodeStartOffset + node.piece.length > offset) {\n // we are inserting into the middle of a node.\n var nodesToDel = [];\n var newRightPiece = new Piece(piece.bufferIndex, insertPosInBuffer, piece.end, this.getLineFeedCnt(piece.bufferIndex, insertPosInBuffer, piece.end), this.offsetInBuffer(bufferIndex, piece.end) - this.offsetInBuffer(bufferIndex, insertPosInBuffer));\n if (this.shouldCheckCRLF() && this.endWithCR(value)) {\n var headOfRight = this.nodeCharCodeAt(node, remainder);\n if (headOfRight === 10 /** \\n */) {\n var newStart = { line: newRightPiece.start.line + 1, column: 0 };\n newRightPiece = new Piece(newRightPiece.bufferIndex, newStart, newRightPiece.end, this.getLineFeedCnt(newRightPiece.bufferIndex, newStart, newRightPiece.end), newRightPiece.length - 1);\n value += '\\n';\n }\n }\n // reuse node for content before insertion point.\n if (this.shouldCheckCRLF() && this.startWithLF(value)) {\n var tailOfLeft = this.nodeCharCodeAt(node, remainder - 1);\n if (tailOfLeft === 13 /** \\r */) {\n var previousPos = this.positionInBuffer(node, remainder - 1);\n this.deleteNodeTail(node, previousPos);\n value = '\\r' + value;\n if (node.piece.length === 0) {\n nodesToDel.push(node);\n }\n }\n else {\n this.deleteNodeTail(node, insertPosInBuffer);\n }\n }\n else {\n this.deleteNodeTail(node, insertPosInBuffer);\n }\n var newPieces = this.createNewPieces(value);\n if (newRightPiece.length > 0) {\n this.rbInsertRight(node, newRightPiece);\n }\n var tmpNode = node;\n for (var k = 0; k < newPieces.length; k++) {\n tmpNode = this.rbInsertRight(tmpNode, newPieces[k]);\n }\n this.deleteNodes(nodesToDel);\n }\n else {\n this.insertContentToNodeRight(value, node);\n }\n }\n else {\n // insert new node\n var pieces = this.createNewPieces(value);\n var node = this.rbInsertLeft(null, pieces[0]);\n for (var k = 1; k < pieces.length; k++) {\n node = this.rbInsertRight(node, pieces[k]);\n }\n }\n // todo, this is too brutal. Total line feed count should be updated the same way as lf_left.\n this.computeBufferMetadata();\n };\n PieceTreeBase.prototype.delete = function (offset, cnt) {\n this._lastVisitedLine.lineNumber = 0;\n this._lastVisitedLine.value = null;\n if (cnt <= 0 || this.root === SENTINEL) {\n return;\n }\n var startPosition = this.nodeAt(offset);\n var endPosition = this.nodeAt(offset + cnt);\n var startNode = startPosition.node;\n var endNode = endPosition.node;\n if (startNode === endNode) {\n var startSplitPosInBuffer_1 = this.positionInBuffer(startNode, startPosition.remainder);\n var endSplitPosInBuffer_1 = this.positionInBuffer(startNode, endPosition.remainder);\n if (startPosition.nodeStartOffset === offset) {\n if (cnt === startNode.piece.length) { // delete node\n var next = startNode.next();\n rbDelete(this, startNode);\n this.validateCRLFWithPrevNode(next);\n this.computeBufferMetadata();\n return;\n }\n this.deleteNodeHead(startNode, endSplitPosInBuffer_1);\n this._searchCache.valdiate(offset);\n this.validateCRLFWithPrevNode(startNode);\n this.computeBufferMetadata();\n return;\n }\n if (startPosition.nodeStartOffset + startNode.piece.length === offset + cnt) {\n this.deleteNodeTail(startNode, startSplitPosInBuffer_1);\n this.validateCRLFWithNextNode(startNode);\n this.computeBufferMetadata();\n return;\n }\n // delete content in the middle, this node will be splitted to nodes\n this.shrinkNode(startNode, startSplitPosInBuffer_1, endSplitPosInBuffer_1);\n this.computeBufferMetadata();\n return;\n }\n var nodesToDel = [];\n var startSplitPosInBuffer = this.positionInBuffer(startNode, startPosition.remainder);\n this.deleteNodeTail(startNode, startSplitPosInBuffer);\n this._searchCache.valdiate(offset);\n if (startNode.piece.length === 0) {\n nodesToDel.push(startNode);\n }\n // update last touched node\n var endSplitPosInBuffer = this.positionInBuffer(endNode, endPosition.remainder);\n this.deleteNodeHead(endNode, endSplitPosInBuffer);\n if (endNode.piece.length === 0) {\n nodesToDel.push(endNode);\n }\n // delete nodes in between\n var secondNode = startNode.next();\n for (var node = secondNode; node !== SENTINEL && node !== endNode; node = node.next()) {\n nodesToDel.push(node);\n }\n var prev = startNode.piece.length === 0 ? startNode.prev() : startNode;\n this.deleteNodes(nodesToDel);\n this.validateCRLFWithNextNode(prev);\n this.computeBufferMetadata();\n };\n PieceTreeBase.prototype.insertContentToNodeLeft = function (value, node) {\n // we are inserting content to the beginning of node\n var nodesToDel = [];\n if (this.shouldCheckCRLF() && this.endWithCR(value) && this.startWithLF(node)) {\n // move `\\n` to new node.\n var piece = node.piece;\n var newStart = { line: piece.start.line + 1, column: 0 };\n var nPiece = new Piece(piece.bufferIndex, newStart, piece.end, this.getLineFeedCnt(piece.bufferIndex, newStart, piece.end), piece.length - 1);\n node.piece = nPiece;\n value += '\\n';\n updateTreeMetadata(this, node, -1, -1);\n if (node.piece.length === 0) {\n nodesToDel.push(node);\n }\n }\n var newPieces = this.createNewPieces(value);\n var newNode = this.rbInsertLeft(node, newPieces[newPieces.length - 1]);\n for (var k = newPieces.length - 2; k >= 0; k--) {\n newNode = this.rbInsertLeft(newNode, newPieces[k]);\n }\n this.validateCRLFWithPrevNode(newNode);\n this.deleteNodes(nodesToDel);\n };\n PieceTreeBase.prototype.insertContentToNodeRight = function (value, node) {\n // we are inserting to the right of this node.\n if (this.adjustCarriageReturnFromNext(value, node)) {\n // move \\n to the new node.\n value += '\\n';\n }\n var newPieces = this.createNewPieces(value);\n var newNode = this.rbInsertRight(node, newPieces[0]);\n var tmpNode = newNode;\n for (var k = 1; k < newPieces.length; k++) {\n tmpNode = this.rbInsertRight(tmpNode, newPieces[k]);\n }\n this.validateCRLFWithPrevNode(newNode);\n };\n PieceTreeBase.prototype.positionInBuffer = function (node, remainder, ret) {\n var piece = node.piece;\n var bufferIndex = node.piece.bufferIndex;\n var lineStarts = this._buffers[bufferIndex].lineStarts;\n var startOffset = lineStarts[piece.start.line] + piece.start.column;\n var offset = startOffset + remainder;\n // binary search offset between startOffset and endOffset\n var low = piece.start.line;\n var high = piece.end.line;\n var mid;\n var midStop;\n var midStart;\n while (low <= high) {\n mid = low + ((high - low) / 2) | 0;\n midStart = lineStarts[mid];\n if (mid === high) {\n break;\n }\n midStop = lineStarts[mid + 1];\n if (offset < midStart) {\n high = mid - 1;\n }\n else if (offset >= midStop) {\n low = mid + 1;\n }\n else {\n break;\n }\n }\n if (ret) {\n ret.line = mid;\n ret.column = offset - midStart;\n return null;\n }\n return {\n line: mid,\n column: offset - midStart\n };\n };\n PieceTreeBase.prototype.getLineFeedCnt = function (bufferIndex, start, end) {\n // we don't need to worry about start: abc\\r|\\n, or abc|\\r, or abc|\\n, or abc|\\r\\n doesn't change the fact that, there is one line break after start.\n // now let's take care of end: abc\\r|\\n, if end is in between \\r and \\n, we need to add line feed count by 1\n if (end.column === 0) {\n return end.line - start.line;\n }\n var lineStarts = this._buffers[bufferIndex].lineStarts;\n if (end.line === lineStarts.length - 1) { // it means, there is no \\n after end, otherwise, there will be one more lineStart.\n return end.line - start.line;\n }\n var nextLineStartOffset = lineStarts[end.line + 1];\n var endOffset = lineStarts[end.line] + end.column;\n if (nextLineStartOffset > endOffset + 1) { // there are more than 1 character after end, which means it can't be \\n\n return end.line - start.line;\n }\n // endOffset + 1 === nextLineStartOffset\n // character at endOffset is \\n, so we check the character before first\n // if character at endOffset is \\r, end.column is 0 and we can't get here.\n var previousCharOffset = endOffset - 1; // end.column > 0 so it's okay.\n var buffer = this._buffers[bufferIndex].buffer;\n if (buffer.charCodeAt(previousCharOffset) === 13) {\n return end.line - start.line + 1;\n }\n else {\n return end.line - start.line;\n }\n };\n PieceTreeBase.prototype.offsetInBuffer = function (bufferIndex, cursor) {\n var lineStarts = this._buffers[bufferIndex].lineStarts;\n return lineStarts[cursor.line] + cursor.column;\n };\n PieceTreeBase.prototype.deleteNodes = function (nodes) {\n for (var i = 0; i < nodes.length; i++) {\n rbDelete(this, nodes[i]);\n }\n };\n PieceTreeBase.prototype.createNewPieces = function (text) {\n if (text.length > AverageBufferSize) {\n // the content is large, operations like substring, charCode becomes slow\n // so here we split it into smaller chunks, just like what we did for CR/LF normalization\n var newPieces = [];\n while (text.length > AverageBufferSize) {\n var lastChar = text.charCodeAt(AverageBufferSize - 1);\n var splitText = void 0;\n if (lastChar === 13 /* CarriageReturn */ || (lastChar >= 0xd800 && lastChar <= 0xdbff)) {\n // last character is \\r or a high surrogate => keep it back\n splitText = text.substring(0, AverageBufferSize - 1);\n text = text.substring(AverageBufferSize - 1);\n }\n else {\n splitText = text.substring(0, AverageBufferSize);\n text = text.substring(AverageBufferSize);\n }\n var lineStarts_1 = createLineStartsFast(splitText);\n newPieces.push(new Piece(this._buffers.length, /* buffer index */ { line: 0, column: 0 }, { line: lineStarts_1.length - 1, column: splitText.length - lineStarts_1[lineStarts_1.length - 1] }, lineStarts_1.length - 1, splitText.length));\n this._buffers.push(new StringBuffer(splitText, lineStarts_1));\n }\n var lineStarts_2 = createLineStartsFast(text);\n newPieces.push(new Piece(this._buffers.length, /* buffer index */ { line: 0, column: 0 }, { line: lineStarts_2.length - 1, column: text.length - lineStarts_2[lineStarts_2.length - 1] }, lineStarts_2.length - 1, text.length));\n this._buffers.push(new StringBuffer(text, lineStarts_2));\n return newPieces;\n }\n var startOffset = this._buffers[0].buffer.length;\n var lineStarts = createLineStartsFast(text, false);\n var start = this._lastChangeBufferPos;\n if (this._buffers[0].lineStarts[this._buffers[0].lineStarts.length - 1] === startOffset\n && startOffset !== 0\n && this.startWithLF(text)\n && this.endWithCR(this._buffers[0].buffer) // todo, we can check this._lastChangeBufferPos's column as it's the last one\n ) {\n this._lastChangeBufferPos = { line: this._lastChangeBufferPos.line, column: this._lastChangeBufferPos.column + 1 };\n start = this._lastChangeBufferPos;\n for (var i = 0; i < lineStarts.length; i++) {\n lineStarts[i] += startOffset + 1;\n }\n this._buffers[0].lineStarts = this._buffers[0].lineStarts.concat(lineStarts.slice(1));\n this._buffers[0].buffer += '_' + text;\n startOffset += 1;\n }\n else {\n if (startOffset !== 0) {\n for (var i = 0; i < lineStarts.length; i++) {\n lineStarts[i] += startOffset;\n }\n }\n this._buffers[0].lineStarts = this._buffers[0].lineStarts.concat(lineStarts.slice(1));\n this._buffers[0].buffer += text;\n }\n var endOffset = this._buffers[0].buffer.length;\n var endIndex = this._buffers[0].lineStarts.length - 1;\n var endColumn = endOffset - this._buffers[0].lineStarts[endIndex];\n var endPos = { line: endIndex, column: endColumn };\n var newPiece = new Piece(0, /** todo */ start, endPos, this.getLineFeedCnt(0, start, endPos), endOffset - startOffset);\n this._lastChangeBufferPos = endPos;\n return [newPiece];\n };\n PieceTreeBase.prototype.getLineRawContent = function (lineNumber, endOffset) {\n if (endOffset === void 0) { endOffset = 0; }\n var x = this.root;\n var ret = '';\n var cache = this._searchCache.get2(lineNumber);\n if (cache) {\n x = cache.node;\n var prevAccumualtedValue = this.getAccumulatedValue(x, lineNumber - cache.nodeStartLineNumber - 1);\n var buffer = this._buffers[x.piece.bufferIndex].buffer;\n var startOffset = this.offsetInBuffer(x.piece.bufferIndex, x.piece.start);\n if (cache.nodeStartLineNumber + x.piece.lineFeedCnt === lineNumber) {\n ret = buffer.substring(startOffset + prevAccumualtedValue, startOffset + x.piece.length);\n }\n else {\n var accumualtedValue = this.getAccumulatedValue(x, lineNumber - cache.nodeStartLineNumber);\n return buffer.substring(startOffset + prevAccumualtedValue, startOffset + accumualtedValue - endOffset);\n }\n }\n else {\n var nodeStartOffset = 0;\n var originalLineNumber = lineNumber;\n while (x !== SENTINEL) {\n if (x.left !== SENTINEL && x.lf_left >= lineNumber - 1) {\n x = x.left;\n }\n else if (x.lf_left + x.piece.lineFeedCnt > lineNumber - 1) {\n var prevAccumualtedValue = this.getAccumulatedValue(x, lineNumber - x.lf_left - 2);\n var accumualtedValue = this.getAccumulatedValue(x, lineNumber - x.lf_left - 1);\n var buffer = this._buffers[x.piece.bufferIndex].buffer;\n var startOffset = this.offsetInBuffer(x.piece.bufferIndex, x.piece.start);\n nodeStartOffset += x.size_left;\n this._searchCache.set({\n node: x,\n nodeStartOffset: nodeStartOffset,\n nodeStartLineNumber: originalLineNumber - (lineNumber - 1 - x.lf_left)\n });\n return buffer.substring(startOffset + prevAccumualtedValue, startOffset + accumualtedValue - endOffset);\n }\n else if (x.lf_left + x.piece.lineFeedCnt === lineNumber - 1) {\n var prevAccumualtedValue = this.getAccumulatedValue(x, lineNumber - x.lf_left - 2);\n var buffer = this._buffers[x.piece.bufferIndex].buffer;\n var startOffset = this.offsetInBuffer(x.piece.bufferIndex, x.piece.start);\n ret = buffer.substring(startOffset + prevAccumualtedValue, startOffset + x.piece.length);\n break;\n }\n else {\n lineNumber -= x.lf_left + x.piece.lineFeedCnt;\n nodeStartOffset += x.size_left + x.piece.length;\n x = x.right;\n }\n }\n }\n // search in order, to find the node contains end column\n x = x.next();\n while (x !== SENTINEL) {\n var buffer = this._buffers[x.piece.bufferIndex].buffer;\n if (x.piece.lineFeedCnt > 0) {\n var accumualtedValue = this.getAccumulatedValue(x, 0);\n var startOffset = this.offsetInBuffer(x.piece.bufferIndex, x.piece.start);\n ret += buffer.substring(startOffset, startOffset + accumualtedValue - endOffset);\n return ret;\n }\n else {\n var startOffset = this.offsetInBuffer(x.piece.bufferIndex, x.piece.start);\n ret += buffer.substr(startOffset, x.piece.length);\n }\n x = x.next();\n }\n return ret;\n };\n PieceTreeBase.prototype.computeBufferMetadata = function () {\n var x = this.root;\n var lfCnt = 1;\n var len = 0;\n while (x !== SENTINEL) {\n lfCnt += x.lf_left + x.piece.lineFeedCnt;\n len += x.size_left + x.piece.length;\n x = x.right;\n }\n this._lineCnt = lfCnt;\n this._length = len;\n this._searchCache.valdiate(this._length);\n };\n // #region node operations\n PieceTreeBase.prototype.getIndexOf = function (node, accumulatedValue) {\n var piece = node.piece;\n var pos = this.positionInBuffer(node, accumulatedValue);\n var lineCnt = pos.line - piece.start.line;\n if (this.offsetInBuffer(piece.bufferIndex, piece.end) - this.offsetInBuffer(piece.bufferIndex, piece.start) === accumulatedValue) {\n // we are checking the end of this node, so a CRLF check is necessary.\n var realLineCnt = this.getLineFeedCnt(node.piece.bufferIndex, piece.start, pos);\n if (realLineCnt !== lineCnt) {\n // aha yes, CRLF\n return { index: realLineCnt, remainder: 0 };\n }\n }\n return { index: lineCnt, remainder: pos.column };\n };\n PieceTreeBase.prototype.getAccumulatedValue = function (node, index) {\n if (index < 0) {\n return 0;\n }\n var piece = node.piece;\n var lineStarts = this._buffers[piece.bufferIndex].lineStarts;\n var expectedLineStartIndex = piece.start.line + index + 1;\n if (expectedLineStartIndex > piece.end.line) {\n return lineStarts[piece.end.line] + piece.end.column - lineStarts[piece.start.line] - piece.start.column;\n }\n else {\n return lineStarts[expectedLineStartIndex] - lineStarts[piece.start.line] - piece.start.column;\n }\n };\n PieceTreeBase.prototype.deleteNodeTail = function (node, pos) {\n var piece = node.piece;\n var originalLFCnt = piece.lineFeedCnt;\n var originalEndOffset = this.offsetInBuffer(piece.bufferIndex, piece.end);\n var newEnd = pos;\n var newEndOffset = this.offsetInBuffer(piece.bufferIndex, newEnd);\n var newLineFeedCnt = this.getLineFeedCnt(piece.bufferIndex, piece.start, newEnd);\n var lf_delta = newLineFeedCnt - originalLFCnt;\n var size_delta = newEndOffset - originalEndOffset;\n var newLength = piece.length + size_delta;\n node.piece = new Piece(piece.bufferIndex, piece.start, newEnd, newLineFeedCnt, newLength);\n updateTreeMetadata(this, node, size_delta, lf_delta);\n };\n PieceTreeBase.prototype.deleteNodeHead = function (node, pos) {\n var piece = node.piece;\n var originalLFCnt = piece.lineFeedCnt;\n var originalStartOffset = this.offsetInBuffer(piece.bufferIndex, piece.start);\n var newStart = pos;\n var newLineFeedCnt = this.getLineFeedCnt(piece.bufferIndex, newStart, piece.end);\n var newStartOffset = this.offsetInBuffer(piece.bufferIndex, newStart);\n var lf_delta = newLineFeedCnt - originalLFCnt;\n var size_delta = originalStartOffset - newStartOffset;\n var newLength = piece.length + size_delta;\n node.piece = new Piece(piece.bufferIndex, newStart, piece.end, newLineFeedCnt, newLength);\n updateTreeMetadata(this, node, size_delta, lf_delta);\n };\n PieceTreeBase.prototype.shrinkNode = function (node, start, end) {\n var piece = node.piece;\n var originalStartPos = piece.start;\n var originalEndPos = piece.end;\n // old piece, originalStartPos, start\n var oldLength = piece.length;\n var oldLFCnt = piece.lineFeedCnt;\n var newEnd = start;\n var newLineFeedCnt = this.getLineFeedCnt(piece.bufferIndex, piece.start, newEnd);\n var newLength = this.offsetInBuffer(piece.bufferIndex, start) - this.offsetInBuffer(piece.bufferIndex, originalStartPos);\n node.piece = new Piece(piece.bufferIndex, piece.start, newEnd, newLineFeedCnt, newLength);\n updateTreeMetadata(this, node, newLength - oldLength, newLineFeedCnt - oldLFCnt);\n // new right piece, end, originalEndPos\n var newPiece = new Piece(piece.bufferIndex, end, originalEndPos, this.getLineFeedCnt(piece.bufferIndex, end, originalEndPos), this.offsetInBuffer(piece.bufferIndex, originalEndPos) - this.offsetInBuffer(piece.bufferIndex, end));\n var newNode = this.rbInsertRight(node, newPiece);\n this.validateCRLFWithPrevNode(newNode);\n };\n PieceTreeBase.prototype.appendToNode = function (node, value) {\n if (this.adjustCarriageReturnFromNext(value, node)) {\n value += '\\n';\n }\n var hitCRLF = this.shouldCheckCRLF() && this.startWithLF(value) && this.endWithCR(node);\n var startOffset = this._buffers[0].buffer.length;\n this._buffers[0].buffer += value;\n var lineStarts = createLineStartsFast(value, false);\n for (var i = 0; i < lineStarts.length; i++) {\n lineStarts[i] += startOffset;\n }\n if (hitCRLF) {\n var prevStartOffset = this._buffers[0].lineStarts[this._buffers[0].lineStarts.length - 2];\n this._buffers[0].lineStarts.pop();\n // _lastChangeBufferPos is already wrong\n this._lastChangeBufferPos = { line: this._lastChangeBufferPos.line - 1, column: startOffset - prevStartOffset };\n }\n this._buffers[0].lineStarts = this._buffers[0].lineStarts.concat(lineStarts.slice(1));\n var endIndex = this._buffers[0].lineStarts.length - 1;\n var endColumn = this._buffers[0].buffer.length - this._buffers[0].lineStarts[endIndex];\n var newEnd = { line: endIndex, column: endColumn };\n var newLength = node.piece.length + value.length;\n var oldLineFeedCnt = node.piece.lineFeedCnt;\n var newLineFeedCnt = this.getLineFeedCnt(0, node.piece.start, newEnd);\n var lf_delta = newLineFeedCnt - oldLineFeedCnt;\n node.piece = new Piece(node.piece.bufferIndex, node.piece.start, newEnd, newLineFeedCnt, newLength);\n this._lastChangeBufferPos = newEnd;\n updateTreeMetadata(this, node, value.length, lf_delta);\n };\n PieceTreeBase.prototype.nodeAt = function (offset) {\n var x = this.root;\n var cache = this._searchCache.get(offset);\n if (cache) {\n return {\n node: cache.node,\n nodeStartOffset: cache.nodeStartOffset,\n remainder: offset - cache.nodeStartOffset\n };\n }\n var nodeStartOffset = 0;\n while (x !== SENTINEL) {\n if (x.size_left > offset) {\n x = x.left;\n }\n else if (x.size_left + x.piece.length >= offset) {\n nodeStartOffset += x.size_left;\n var ret = {\n node: x,\n remainder: offset - x.size_left,\n nodeStartOffset: nodeStartOffset\n };\n this._searchCache.set(ret);\n return ret;\n }\n else {\n offset -= x.size_left + x.piece.length;\n nodeStartOffset += x.size_left + x.piece.length;\n x = x.right;\n }\n }\n return null;\n };\n PieceTreeBase.prototype.nodeAt2 = function (lineNumber, column) {\n var x = this.root;\n var nodeStartOffset = 0;\n while (x !== SENTINEL) {\n if (x.left !== SENTINEL && x.lf_left >= lineNumber - 1) {\n x = x.left;\n }\n else if (x.lf_left + x.piece.lineFeedCnt > lineNumber - 1) {\n var prevAccumualtedValue = this.getAccumulatedValue(x, lineNumber - x.lf_left - 2);\n var accumualtedValue = this.getAccumulatedValue(x, lineNumber - x.lf_left - 1);\n nodeStartOffset += x.size_left;\n return {\n node: x,\n remainder: Math.min(prevAccumualtedValue + column - 1, accumualtedValue),\n nodeStartOffset: nodeStartOffset\n };\n }\n else if (x.lf_left + x.piece.lineFeedCnt === lineNumber - 1) {\n var prevAccumualtedValue = this.getAccumulatedValue(x, lineNumber - x.lf_left - 2);\n if (prevAccumualtedValue + column - 1 <= x.piece.length) {\n return {\n node: x,\n remainder: prevAccumualtedValue + column - 1,\n nodeStartOffset: nodeStartOffset\n };\n }\n else {\n column -= x.piece.length - prevAccumualtedValue;\n break;\n }\n }\n else {\n lineNumber -= x.lf_left + x.piece.lineFeedCnt;\n nodeStartOffset += x.size_left + x.piece.length;\n x = x.right;\n }\n }\n // search in order, to find the node contains position.column\n x = x.next();\n while (x !== SENTINEL) {\n if (x.piece.lineFeedCnt > 0) {\n var accumualtedValue = this.getAccumulatedValue(x, 0);\n var nodeStartOffset_1 = this.offsetOfNode(x);\n return {\n node: x,\n remainder: Math.min(column - 1, accumualtedValue),\n nodeStartOffset: nodeStartOffset_1\n };\n }\n else {\n if (x.piece.length >= column - 1) {\n var nodeStartOffset_2 = this.offsetOfNode(x);\n return {\n node: x,\n remainder: column - 1,\n nodeStartOffset: nodeStartOffset_2\n };\n }\n else {\n column -= x.piece.length;\n }\n }\n x = x.next();\n }\n return null;\n };\n PieceTreeBase.prototype.nodeCharCodeAt = function (node, offset) {\n if (node.piece.lineFeedCnt < 1) {\n return -1;\n }\n var buffer = this._buffers[node.piece.bufferIndex];\n var newOffset = this.offsetInBuffer(node.piece.bufferIndex, node.piece.start) + offset;\n return buffer.buffer.charCodeAt(newOffset);\n };\n PieceTreeBase.prototype.offsetOfNode = function (node) {\n if (!node) {\n return 0;\n }\n var pos = node.size_left;\n while (node !== this.root) {\n if (node.parent.right === node) {\n pos += node.parent.size_left + node.parent.piece.length;\n }\n node = node.parent;\n }\n return pos;\n };\n // #endregion\n // #region CRLF\n PieceTreeBase.prototype.shouldCheckCRLF = function () {\n return !(this._EOLNormalized && this._EOL === '\\n');\n };\n PieceTreeBase.prototype.startWithLF = function (val) {\n if (typeof val === 'string') {\n return val.charCodeAt(0) === 10;\n }\n if (val === SENTINEL || val.piece.lineFeedCnt === 0) {\n return false;\n }\n var piece = val.piece;\n var lineStarts = this._buffers[piece.bufferIndex].lineStarts;\n var line = piece.start.line;\n var startOffset = lineStarts[line] + piece.start.column;\n if (line === lineStarts.length - 1) {\n // last line, so there is no line feed at the end of this line\n return false;\n }\n var nextLineOffset = lineStarts[line + 1];\n if (nextLineOffset > startOffset + 1) {\n return false;\n }\n return this._buffers[piece.bufferIndex].buffer.charCodeAt(startOffset) === 10;\n };\n PieceTreeBase.prototype.endWithCR = function (val) {\n if (typeof val === 'string') {\n return val.charCodeAt(val.length - 1) === 13;\n }\n if (val === SENTINEL || val.piece.lineFeedCnt === 0) {\n return false;\n }\n return this.nodeCharCodeAt(val, val.piece.length - 1) === 13;\n };\n PieceTreeBase.prototype.validateCRLFWithPrevNode = function (nextNode) {\n if (this.shouldCheckCRLF() && this.startWithLF(nextNode)) {\n var node = nextNode.prev();\n if (this.endWithCR(node)) {\n this.fixCRLF(node, nextNode);\n }\n }\n };\n PieceTreeBase.prototype.validateCRLFWithNextNode = function (node) {\n if (this.shouldCheckCRLF() && this.endWithCR(node)) {\n var nextNode = node.next();\n if (this.startWithLF(nextNode)) {\n this.fixCRLF(node, nextNode);\n }\n }\n };\n PieceTreeBase.prototype.fixCRLF = function (prev, next) {\n var nodesToDel = [];\n // update node\n var lineStarts = this._buffers[prev.piece.bufferIndex].lineStarts;\n var newEnd;\n if (prev.piece.end.column === 0) {\n // it means, last line ends with \\r, not \\r\\n\n newEnd = { line: prev.piece.end.line - 1, column: lineStarts[prev.piece.end.line] - lineStarts[prev.piece.end.line - 1] - 1 };\n }\n else {\n // \\r\\n\n newEnd = { line: prev.piece.end.line, column: prev.piece.end.column - 1 };\n }\n var prevNewLength = prev.piece.length - 1;\n var prevNewLFCnt = prev.piece.lineFeedCnt - 1;\n prev.piece = new Piece(prev.piece.bufferIndex, prev.piece.start, newEnd, prevNewLFCnt, prevNewLength);\n updateTreeMetadata(this, prev, -1, -1);\n if (prev.piece.length === 0) {\n nodesToDel.push(prev);\n }\n // update nextNode\n var newStart = { line: next.piece.start.line + 1, column: 0 };\n var newLength = next.piece.length - 1;\n var newLineFeedCnt = this.getLineFeedCnt(next.piece.bufferIndex, newStart, next.piece.end);\n next.piece = new Piece(next.piece.bufferIndex, newStart, next.piece.end, newLineFeedCnt, newLength);\n updateTreeMetadata(this, next, -1, -1);\n if (next.piece.length === 0) {\n nodesToDel.push(next);\n }\n // create new piece which contains \\r\\n\n var pieces = this.createNewPieces('\\r\\n');\n this.rbInsertRight(prev, pieces[0]);\n // delete empty nodes\n for (var i = 0; i < nodesToDel.length; i++) {\n rbDelete(this, nodesToDel[i]);\n }\n };\n PieceTreeBase.prototype.adjustCarriageReturnFromNext = function (value, node) {\n if (this.shouldCheckCRLF() && this.endWithCR(value)) {\n var nextNode = node.next();\n if (this.startWithLF(nextNode)) {\n // move `\\n` forward\n value += '\\n';\n if (nextNode.piece.length === 1) {\n rbDelete(this, nextNode);\n }\n else {\n var piece = nextNode.piece;\n var newStart = { line: piece.start.line + 1, column: 0 };\n var newLength = piece.length - 1;\n var newLineFeedCnt = this.getLineFeedCnt(piece.bufferIndex, newStart, piece.end);\n nextNode.piece = new Piece(piece.bufferIndex, newStart, piece.end, newLineFeedCnt, newLength);\n updateTreeMetadata(this, nextNode, -1, -1);\n }\n return true;\n }\n }\n return false;\n };\n // #endregion\n // #endregion\n // #region Tree operations\n PieceTreeBase.prototype.iterate = function (node, callback) {\n if (node === SENTINEL) {\n return callback(SENTINEL);\n }\n var leftRet = this.iterate(node.left, callback);\n if (!leftRet) {\n return leftRet;\n }\n return callback(node) && this.iterate(node.right, callback);\n };\n PieceTreeBase.prototype.getNodeContent = function (node) {\n if (node === SENTINEL) {\n return '';\n }\n var buffer = this._buffers[node.piece.bufferIndex];\n var currentContent;\n var piece = node.piece;\n var startOffset = this.offsetInBuffer(piece.bufferIndex, piece.start);\n var endOffset = this.offsetInBuffer(piece.bufferIndex, piece.end);\n currentContent = buffer.buffer.substring(startOffset, endOffset);\n return currentContent;\n };\n /**\n * node node\n * / \\ / \\\n * a b <---- a b\n * /\n * z\n */\n PieceTreeBase.prototype.rbInsertRight = function (node, p) {\n var z = new TreeNode(p, 1 /* Red */);\n z.left = SENTINEL;\n z.right = SENTINEL;\n z.parent = SENTINEL;\n z.size_left = 0;\n z.lf_left = 0;\n var x = this.root;\n if (x === SENTINEL) {\n this.root = z;\n z.color = 0 /* Black */;\n }\n else if (node.right === SENTINEL) {\n node.right = z;\n z.parent = node;\n }\n else {\n var nextNode = leftest(node.right);\n nextNode.left = z;\n z.parent = nextNode;\n }\n fixInsert(this, z);\n return z;\n };\n /**\n * node node\n * / \\ / \\\n * a b ----> a b\n * \\\n * z\n */\n PieceTreeBase.prototype.rbInsertLeft = function (node, p) {\n var z = new TreeNode(p, 1 /* Red */);\n z.left = SENTINEL;\n z.right = SENTINEL;\n z.parent = SENTINEL;\n z.size_left = 0;\n z.lf_left = 0;\n var x = this.root;\n if (x === SENTINEL) {\n this.root = z;\n z.color = 0 /* Black */;\n }\n else if (node.left === SENTINEL) {\n node.left = z;\n z.parent = node;\n }\n else {\n var prevNode = righttest(node.left); // a\n prevNode.right = z;\n z.parent = prevNode;\n }\n fixInsert(this, z);\n return z;\n };\n PieceTreeBase.prototype.getContentOfSubTree = function (node) {\n var _this = this;\n var str = '';\n this.iterate(node, function (node) {\n str += _this.getNodeContent(node);\n return true;\n });\n return str;\n };\n return PieceTreeBase;\n}());\nexport { PieceTreeBase };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport URI from '../../../base/common/uri';\nimport { Emitter } from '../../../base/common/event';\nimport * as model from '../model';\nimport { TokenizationRegistry } from '../modes';\nimport { EditStack } from './editStack';\nimport { Range } from '../core/range';\nimport { Selection } from '../core/selection';\nimport { ModelRawContentChangedEvent, InternalModelContentChangeEvent, ModelRawFlush, ModelRawEOLChanged, ModelRawLineChanged, ModelRawLinesDeleted, ModelRawLinesInserted } from './textModelEvents';\nimport { onUnexpectedError } from '../../../base/common/errors';\nimport * as strings from '../../../base/common/strings';\nimport { IntervalNode, IntervalTree, recomputeMaxEnd, getNodeIsInOverviewRuler } from './intervalTree';\nimport { Disposable } from '../../../base/common/lifecycle';\nimport { StopWatch } from '../../../base/common/stopwatch';\nimport { NULL_LANGUAGE_IDENTIFIER } from '../modes/nullMode';\nimport { ignoreBracketsInToken } from '../modes/supports';\nimport { BracketsUtils } from '../modes/supports/richEditBrackets';\nimport { Position } from '../core/position';\nimport { LanguageConfigurationRegistry } from '../modes/languageConfigurationRegistry';\nimport { getWordAtText } from './wordHelper';\nimport { ModelLinesTokens, ModelTokensChangedEventBuilder } from './textModelTokens';\nimport { guessIndentation } from './indentationGuesser';\nimport { EDITOR_MODEL_DEFAULTS } from '../config/editorOptions';\nimport { TextModelSearch, SearchParams } from './textModelSearch';\nimport { PieceTreeTextBufferBuilder } from './pieceTreeTextBuffer/pieceTreeTextBufferBuilder';\nfunction createTextBufferBuilder() {\n return new PieceTreeTextBufferBuilder();\n}\nexport function createTextBufferFactory(text) {\n var builder = createTextBufferBuilder();\n builder.acceptChunk(text);\n return builder.finish();\n}\nexport function createTextBuffer(value, defaultEOL) {\n var factory = (typeof value === 'string' ? createTextBufferFactory(value) : value);\n return factory.create(defaultEOL);\n}\nvar MODEL_ID = 0;\n/**\n * Produces 'a'-'z', followed by 'A'-'Z'... followed by 'a'-'z', etc.\n */\nfunction singleLetter(result) {\n var LETTERS_CNT = (90 /* Z */ - 65 /* A */ + 1);\n result = result % (2 * LETTERS_CNT);\n if (result < LETTERS_CNT) {\n return String.fromCharCode(97 /* a */ + result);\n }\n return String.fromCharCode(65 /* A */ + result - LETTERS_CNT);\n}\nvar LIMIT_FIND_COUNT = 999;\nexport var LONG_LINE_BOUNDARY = 10000;\nvar TextModel = /** @class */ (function (_super) {\n __extends(TextModel, _super);\n //#endregion\n function TextModel(source, creationOptions, languageIdentifier, associatedResource) {\n if (associatedResource === void 0) { associatedResource = null; }\n var _this = _super.call(this) || this;\n //#region Events\n _this._onWillDispose = _this._register(new Emitter());\n _this.onWillDispose = _this._onWillDispose.event;\n _this._onDidChangeDecorations = _this._register(new DidChangeDecorationsEmitter());\n _this.onDidChangeDecorations = _this._onDidChangeDecorations.event;\n _this._onDidChangeLanguage = _this._register(new Emitter());\n _this.onDidChangeLanguage = _this._onDidChangeLanguage.event;\n _this._onDidChangeLanguageConfiguration = _this._register(new Emitter());\n _this.onDidChangeLanguageConfiguration = _this._onDidChangeLanguageConfiguration.event;\n _this._onDidChangeTokens = _this._register(new Emitter());\n _this.onDidChangeTokens = _this._onDidChangeTokens.event;\n _this._onDidChangeOptions = _this._register(new Emitter());\n _this.onDidChangeOptions = _this._onDidChangeOptions.event;\n _this._eventEmitter = _this._register(new DidChangeContentEmitter());\n // Generate a new unique model id\n MODEL_ID++;\n _this.id = '$model' + MODEL_ID;\n _this.isForSimpleWidget = creationOptions.isForSimpleWidget;\n if (typeof associatedResource === 'undefined' || associatedResource === null) {\n _this._associatedResource = URI.parse('inmemory://model/' + MODEL_ID);\n }\n else {\n _this._associatedResource = associatedResource;\n }\n _this._attachedEditorCount = 0;\n _this._buffer = createTextBuffer(source, creationOptions.defaultEOL);\n _this._options = TextModel.resolveOptions(_this._buffer, creationOptions);\n var bufferLineCount = _this._buffer.getLineCount();\n var bufferTextLength = _this._buffer.getValueLengthInRange(new Range(1, 1, bufferLineCount, _this._buffer.getLineLength(bufferLineCount) + 1), model.EndOfLinePreference.TextDefined);\n // !!! Make a decision in the ctor and permanently respect this decision !!!\n // If a model is too large at construction time, it will never get tokenized,\n // under no circumstances.\n if (creationOptions.largeFileOptimizations) {\n _this._isTooLargeForTokenization = ((bufferTextLength > TextModel.LARGE_FILE_SIZE_THRESHOLD)\n || (bufferLineCount > TextModel.LARGE_FILE_LINE_COUNT_THRESHOLD));\n }\n else {\n _this._isTooLargeForTokenization = false;\n }\n _this._isTooLargeForSyncing = (bufferTextLength > TextModel.MODEL_SYNC_LIMIT);\n _this._setVersionId(1);\n _this._isDisposed = false;\n _this._isDisposing = false;\n _this._languageIdentifier = languageIdentifier || NULL_LANGUAGE_IDENTIFIER;\n _this._tokenizationListener = TokenizationRegistry.onDidChange(function (e) {\n if (e.changedLanguages.indexOf(_this._languageIdentifier.language) === -1) {\n return;\n }\n _this._resetTokenizationState();\n _this.emitModelTokensChangedEvent({\n ranges: [{\n fromLineNumber: 1,\n toLineNumber: _this.getLineCount()\n }]\n });\n if (_this._shouldAutoTokenize()) {\n _this._warmUpTokens();\n }\n });\n _this._revalidateTokensTimeout = -1;\n _this._languageRegistryListener = LanguageConfigurationRegistry.onDidChange(function (e) {\n if (e.languageIdentifier.id === _this._languageIdentifier.id) {\n _this._onDidChangeLanguageConfiguration.fire({});\n }\n });\n _this._resetTokenizationState();\n _this._instanceId = singleLetter(MODEL_ID);\n _this._lastDecorationId = 0;\n _this._decorations = Object.create(null);\n _this._decorationsTree = new DecorationsTrees();\n _this._commandManager = new EditStack(_this);\n _this._isUndoing = false;\n _this._isRedoing = false;\n _this._trimAutoWhitespaceLines = null;\n return _this;\n }\n TextModel.createFromString = function (text, options, languageIdentifier, uri) {\n if (options === void 0) { options = TextModel.DEFAULT_CREATION_OPTIONS; }\n if (languageIdentifier === void 0) { languageIdentifier = null; }\n if (uri === void 0) { uri = null; }\n return new TextModel(text, options, languageIdentifier, uri);\n };\n TextModel.resolveOptions = function (textBuffer, options) {\n if (options.detectIndentation) {\n var guessedIndentation = guessIndentation(textBuffer, options.tabSize, options.insertSpaces);\n return new model.TextModelResolvedOptions({\n tabSize: guessedIndentation.tabSize,\n insertSpaces: guessedIndentation.insertSpaces,\n trimAutoWhitespace: options.trimAutoWhitespace,\n defaultEOL: options.defaultEOL\n });\n }\n return new model.TextModelResolvedOptions({\n tabSize: options.tabSize,\n insertSpaces: options.insertSpaces,\n trimAutoWhitespace: options.trimAutoWhitespace,\n defaultEOL: options.defaultEOL\n });\n };\n TextModel.prototype.onDidChangeRawContentFast = function (listener) {\n return this._eventEmitter.fastEvent(function (e) { return listener(e.rawContentChangedEvent); });\n };\n TextModel.prototype.onDidChangeRawContent = function (listener) {\n return this._eventEmitter.slowEvent(function (e) { return listener(e.rawContentChangedEvent); });\n };\n TextModel.prototype.onDidChangeContent = function (listener) {\n return this._eventEmitter.slowEvent(function (e) { return listener(e.contentChangedEvent); });\n };\n TextModel.prototype.dispose = function () {\n this._isDisposing = true;\n this._onWillDispose.fire();\n this._commandManager = null;\n this._decorations = null;\n this._decorationsTree = null;\n this._tokenizationListener.dispose();\n this._languageRegistryListener.dispose();\n this._clearTimers();\n this._tokens = null;\n this._isDisposed = true;\n // Null out members, such that any use of a disposed model will throw exceptions sooner rather than later\n this._buffer = null;\n _super.prototype.dispose.call(this);\n this._isDisposing = false;\n };\n TextModel.prototype._assertNotDisposed = function () {\n if (this._isDisposed) {\n throw new Error('Model is disposed!');\n }\n };\n TextModel.prototype._emitContentChangedEvent = function (rawChange, change) {\n if (this._isDisposing) {\n // Do not confuse listeners by emitting any event after disposing\n return;\n }\n this._eventEmitter.fire(new InternalModelContentChangeEvent(rawChange, change));\n };\n TextModel.prototype.setValue = function (value) {\n this._assertNotDisposed();\n if (value === null) {\n // There's nothing to do\n return;\n }\n var textBuffer = createTextBuffer(value, this._options.defaultEOL);\n this.setValueFromTextBuffer(textBuffer);\n };\n TextModel.prototype._createContentChanged2 = function (range, rangeOffset, rangeLength, text, isUndoing, isRedoing, isFlush) {\n return {\n changes: [{\n range: range,\n rangeOffset: rangeOffset,\n rangeLength: rangeLength,\n text: text,\n }],\n eol: this._buffer.getEOL(),\n versionId: this.getVersionId(),\n isUndoing: isUndoing,\n isRedoing: isRedoing,\n isFlush: isFlush\n };\n };\n TextModel.prototype.setValueFromTextBuffer = function (textBuffer) {\n this._assertNotDisposed();\n if (textBuffer === null) {\n // There's nothing to do\n return;\n }\n var oldFullModelRange = this.getFullModelRange();\n var oldModelValueLength = this.getValueLengthInRange(oldFullModelRange);\n var endLineNumber = this.getLineCount();\n var endColumn = this.getLineMaxColumn(endLineNumber);\n this._buffer = textBuffer;\n this._increaseVersionId();\n // Cancel tokenization, clear all tokens and begin tokenizing\n this._resetTokenizationState();\n // Destroy all my decorations\n this._decorations = Object.create(null);\n this._decorationsTree = new DecorationsTrees();\n // Destroy my edit history and settings\n this._commandManager = new EditStack(this);\n this._trimAutoWhitespaceLines = null;\n this._emitContentChangedEvent(new ModelRawContentChangedEvent([\n new ModelRawFlush()\n ], this._versionId, false, false), this._createContentChanged2(new Range(1, 1, endLineNumber, endColumn), 0, oldModelValueLength, this.getValue(), false, false, true));\n };\n TextModel.prototype.setEOL = function (eol) {\n this._assertNotDisposed();\n var newEOL = (eol === model.EndOfLineSequence.CRLF ? '\\r\\n' : '\\n');\n if (this._buffer.getEOL() === newEOL) {\n // Nothing to do\n return;\n }\n var oldFullModelRange = this.getFullModelRange();\n var oldModelValueLength = this.getValueLengthInRange(oldFullModelRange);\n var endLineNumber = this.getLineCount();\n var endColumn = this.getLineMaxColumn(endLineNumber);\n this._onBeforeEOLChange();\n this._buffer.setEOL(newEOL);\n this._increaseVersionId();\n this._onAfterEOLChange();\n this._emitContentChangedEvent(new ModelRawContentChangedEvent([\n new ModelRawEOLChanged()\n ], this._versionId, false, false), this._createContentChanged2(new Range(1, 1, endLineNumber, endColumn), 0, oldModelValueLength, this.getValue(), false, false, false));\n };\n TextModel.prototype._onBeforeEOLChange = function () {\n // Ensure all decorations get their `range` set.\n var versionId = this.getVersionId();\n var allDecorations = this._decorationsTree.search(0, false, false, versionId);\n this._ensureNodesHaveRanges(allDecorations);\n };\n TextModel.prototype._onAfterEOLChange = function () {\n // Transform back `range` to offsets\n var versionId = this.getVersionId();\n var allDecorations = this._decorationsTree.collectNodesPostOrder();\n for (var i = 0, len = allDecorations.length; i < len; i++) {\n var node = allDecorations[i];\n var delta = node.cachedAbsoluteStart - node.start;\n var startOffset = this._buffer.getOffsetAt(node.range.startLineNumber, node.range.startColumn);\n var endOffset = this._buffer.getOffsetAt(node.range.endLineNumber, node.range.endColumn);\n node.cachedAbsoluteStart = startOffset;\n node.cachedAbsoluteEnd = endOffset;\n node.cachedVersionId = versionId;\n node.start = startOffset - delta;\n node.end = endOffset - delta;\n recomputeMaxEnd(node);\n }\n };\n TextModel.prototype._resetTokenizationState = function () {\n this._clearTimers();\n var tokenizationSupport = (this._isTooLargeForTokenization\n ? null\n : TokenizationRegistry.get(this._languageIdentifier.language));\n this._tokens = new ModelLinesTokens(this._languageIdentifier, tokenizationSupport);\n this._beginBackgroundTokenization();\n };\n TextModel.prototype._clearTimers = function () {\n if (this._revalidateTokensTimeout !== -1) {\n clearTimeout(this._revalidateTokensTimeout);\n this._revalidateTokensTimeout = -1;\n }\n };\n TextModel.prototype.onBeforeAttached = function () {\n this._attachedEditorCount++;\n // Warm up tokens for the editor\n this._warmUpTokens();\n };\n TextModel.prototype.onBeforeDetached = function () {\n this._attachedEditorCount--;\n };\n TextModel.prototype._shouldAutoTokenize = function () {\n return this.isAttachedToEditor();\n };\n TextModel.prototype.isAttachedToEditor = function () {\n return this._attachedEditorCount > 0;\n };\n TextModel.prototype.getAttachedEditorCount = function () {\n return this._attachedEditorCount;\n };\n TextModel.prototype.isTooLargeForSyncing = function () {\n return this._isTooLargeForSyncing;\n };\n TextModel.prototype.isTooLargeForTokenization = function () {\n return this._isTooLargeForTokenization;\n };\n TextModel.prototype.isDisposed = function () {\n return this._isDisposed;\n };\n TextModel.prototype.isDominatedByLongLines = function () {\n this._assertNotDisposed();\n if (this.isTooLargeForTokenization()) {\n // Cannot word wrap huge files anyways, so it doesn't really matter\n return false;\n }\n var smallLineCharCount = 0;\n var longLineCharCount = 0;\n var lineCount = this._buffer.getLineCount();\n for (var lineNumber = 1; lineNumber <= lineCount; lineNumber++) {\n var lineLength = this._buffer.getLineLength(lineNumber);\n if (lineLength >= LONG_LINE_BOUNDARY) {\n longLineCharCount += lineLength;\n }\n else {\n smallLineCharCount += lineLength;\n }\n }\n return (longLineCharCount > smallLineCharCount);\n };\n Object.defineProperty(TextModel.prototype, \"uri\", {\n get: function () {\n return this._associatedResource;\n },\n enumerable: true,\n configurable: true\n });\n //#region Options\n TextModel.prototype.getOptions = function () {\n this._assertNotDisposed();\n return this._options;\n };\n TextModel.prototype.updateOptions = function (_newOpts) {\n this._assertNotDisposed();\n var tabSize = (typeof _newOpts.tabSize !== 'undefined') ? _newOpts.tabSize : this._options.tabSize;\n var insertSpaces = (typeof _newOpts.insertSpaces !== 'undefined') ? _newOpts.insertSpaces : this._options.insertSpaces;\n var trimAutoWhitespace = (typeof _newOpts.trimAutoWhitespace !== 'undefined') ? _newOpts.trimAutoWhitespace : this._options.trimAutoWhitespace;\n var newOpts = new model.TextModelResolvedOptions({\n tabSize: tabSize,\n insertSpaces: insertSpaces,\n defaultEOL: this._options.defaultEOL,\n trimAutoWhitespace: trimAutoWhitespace\n });\n if (this._options.equals(newOpts)) {\n return;\n }\n var e = this._options.createChangeEvent(newOpts);\n this._options = newOpts;\n this._onDidChangeOptions.fire(e);\n };\n TextModel.prototype.detectIndentation = function (defaultInsertSpaces, defaultTabSize) {\n this._assertNotDisposed();\n var guessedIndentation = guessIndentation(this._buffer, defaultTabSize, defaultInsertSpaces);\n this.updateOptions({\n insertSpaces: guessedIndentation.insertSpaces,\n tabSize: guessedIndentation.tabSize\n });\n };\n TextModel._normalizeIndentationFromWhitespace = function (str, tabSize, insertSpaces) {\n var spacesCnt = 0;\n for (var i = 0; i < str.length; i++) {\n if (str.charAt(i) === '\\t') {\n spacesCnt += tabSize;\n }\n else {\n spacesCnt++;\n }\n }\n var result = '';\n if (!insertSpaces) {\n var tabsCnt = Math.floor(spacesCnt / tabSize);\n spacesCnt = spacesCnt % tabSize;\n for (var i = 0; i < tabsCnt; i++) {\n result += '\\t';\n }\n }\n for (var i = 0; i < spacesCnt; i++) {\n result += ' ';\n }\n return result;\n };\n TextModel.normalizeIndentation = function (str, tabSize, insertSpaces) {\n var firstNonWhitespaceIndex = strings.firstNonWhitespaceIndex(str);\n if (firstNonWhitespaceIndex === -1) {\n firstNonWhitespaceIndex = str.length;\n }\n return TextModel._normalizeIndentationFromWhitespace(str.substring(0, firstNonWhitespaceIndex), tabSize, insertSpaces) + str.substring(firstNonWhitespaceIndex);\n };\n TextModel.prototype.normalizeIndentation = function (str) {\n this._assertNotDisposed();\n return TextModel.normalizeIndentation(str, this._options.tabSize, this._options.insertSpaces);\n };\n TextModel.prototype.getOneIndent = function () {\n this._assertNotDisposed();\n var tabSize = this._options.tabSize;\n var insertSpaces = this._options.insertSpaces;\n if (insertSpaces) {\n var result = '';\n for (var i = 0; i < tabSize; i++) {\n result += ' ';\n }\n return result;\n }\n else {\n return '\\t';\n }\n };\n //#endregion\n //#region Reading\n TextModel.prototype.getVersionId = function () {\n this._assertNotDisposed();\n return this._versionId;\n };\n TextModel.prototype.mightContainRTL = function () {\n return this._buffer.mightContainRTL();\n };\n TextModel.prototype.mightContainNonBasicASCII = function () {\n return this._buffer.mightContainNonBasicASCII();\n };\n TextModel.prototype.getAlternativeVersionId = function () {\n this._assertNotDisposed();\n return this._alternativeVersionId;\n };\n TextModel.prototype.getOffsetAt = function (rawPosition) {\n this._assertNotDisposed();\n var position = this._validatePosition(rawPosition.lineNumber, rawPosition.column, false);\n return this._buffer.getOffsetAt(position.lineNumber, position.column);\n };\n TextModel.prototype.getPositionAt = function (rawOffset) {\n this._assertNotDisposed();\n var offset = (Math.min(this._buffer.getLength(), Math.max(0, rawOffset)));\n return this._buffer.getPositionAt(offset);\n };\n TextModel.prototype._increaseVersionId = function () {\n this._setVersionId(this._versionId + 1);\n };\n TextModel.prototype._setVersionId = function (newVersionId) {\n this._versionId = newVersionId;\n this._alternativeVersionId = this._versionId;\n };\n TextModel.prototype._overwriteAlternativeVersionId = function (newAlternativeVersionId) {\n this._alternativeVersionId = newAlternativeVersionId;\n };\n TextModel.prototype.getValue = function (eol, preserveBOM) {\n if (preserveBOM === void 0) { preserveBOM = false; }\n this._assertNotDisposed();\n var fullModelRange = this.getFullModelRange();\n var fullModelValue = this.getValueInRange(fullModelRange, eol);\n if (preserveBOM) {\n return this._buffer.getBOM() + fullModelValue;\n }\n return fullModelValue;\n };\n TextModel.prototype.getValueLength = function (eol, preserveBOM) {\n if (preserveBOM === void 0) { preserveBOM = false; }\n this._assertNotDisposed();\n var fullModelRange = this.getFullModelRange();\n var fullModelValue = this.getValueLengthInRange(fullModelRange, eol);\n if (preserveBOM) {\n return this._buffer.getBOM().length + fullModelValue;\n }\n return fullModelValue;\n };\n TextModel.prototype.getValueInRange = function (rawRange, eol) {\n if (eol === void 0) { eol = model.EndOfLinePreference.TextDefined; }\n this._assertNotDisposed();\n return this._buffer.getValueInRange(this.validateRange(rawRange), eol);\n };\n TextModel.prototype.getValueLengthInRange = function (rawRange, eol) {\n if (eol === void 0) { eol = model.EndOfLinePreference.TextDefined; }\n this._assertNotDisposed();\n return this._buffer.getValueLengthInRange(this.validateRange(rawRange), eol);\n };\n TextModel.prototype.getLineCount = function () {\n this._assertNotDisposed();\n return this._buffer.getLineCount();\n };\n TextModel.prototype.getLineContent = function (lineNumber) {\n this._assertNotDisposed();\n if (lineNumber < 1 || lineNumber > this.getLineCount()) {\n throw new Error('Illegal value for lineNumber');\n }\n return this._buffer.getLineContent(lineNumber);\n };\n TextModel.prototype.getLineLength = function (lineNumber) {\n this._assertNotDisposed();\n if (lineNumber < 1 || lineNumber > this.getLineCount()) {\n throw new Error('Illegal value for lineNumber');\n }\n return this._buffer.getLineLength(lineNumber);\n };\n TextModel.prototype.getLinesContent = function () {\n this._assertNotDisposed();\n return this._buffer.getLinesContent();\n };\n TextModel.prototype.getEOL = function () {\n this._assertNotDisposed();\n return this._buffer.getEOL();\n };\n TextModel.prototype.getLineMinColumn = function (lineNumber) {\n this._assertNotDisposed();\n return 1;\n };\n TextModel.prototype.getLineMaxColumn = function (lineNumber) {\n this._assertNotDisposed();\n if (lineNumber < 1 || lineNumber > this.getLineCount()) {\n throw new Error('Illegal value for lineNumber');\n }\n return this._buffer.getLineLength(lineNumber) + 1;\n };\n TextModel.prototype.getLineFirstNonWhitespaceColumn = function (lineNumber) {\n this._assertNotDisposed();\n if (lineNumber < 1 || lineNumber > this.getLineCount()) {\n throw new Error('Illegal value for lineNumber');\n }\n return this._buffer.getLineFirstNonWhitespaceColumn(lineNumber);\n };\n TextModel.prototype.getLineLastNonWhitespaceColumn = function (lineNumber) {\n this._assertNotDisposed();\n if (lineNumber < 1 || lineNumber > this.getLineCount()) {\n throw new Error('Illegal value for lineNumber');\n }\n return this._buffer.getLineLastNonWhitespaceColumn(lineNumber);\n };\n /**\n * Validates `range` is within buffer bounds, but allows it to sit in between surrogate pairs, etc.\n * Will try to not allocate if possible.\n */\n TextModel.prototype._validateRangeRelaxedNoAllocations = function (range) {\n var linesCount = this._buffer.getLineCount();\n var initialStartLineNumber = range.startLineNumber;\n var initialStartColumn = range.startColumn;\n var startLineNumber;\n var startColumn;\n if (initialStartLineNumber < 1) {\n startLineNumber = 1;\n startColumn = 1;\n }\n else if (initialStartLineNumber > linesCount) {\n startLineNumber = linesCount;\n startColumn = this.getLineMaxColumn(startLineNumber);\n }\n else {\n startLineNumber = initialStartLineNumber | 0;\n if (initialStartColumn <= 1) {\n startColumn = 1;\n }\n else {\n var maxColumn = this.getLineMaxColumn(startLineNumber);\n if (initialStartColumn >= maxColumn) {\n startColumn = maxColumn;\n }\n else {\n startColumn = initialStartColumn | 0;\n }\n }\n }\n var initialEndLineNumber = range.endLineNumber;\n var initialEndColumn = range.endColumn;\n var endLineNumber;\n var endColumn;\n if (initialEndLineNumber < 1) {\n endLineNumber = 1;\n endColumn = 1;\n }\n else if (initialEndLineNumber > linesCount) {\n endLineNumber = linesCount;\n endColumn = this.getLineMaxColumn(endLineNumber);\n }\n else {\n endLineNumber = initialEndLineNumber | 0;\n if (initialEndColumn <= 1) {\n endColumn = 1;\n }\n else {\n var maxColumn = this.getLineMaxColumn(endLineNumber);\n if (initialEndColumn >= maxColumn) {\n endColumn = maxColumn;\n }\n else {\n endColumn = initialEndColumn | 0;\n }\n }\n }\n if (initialStartLineNumber === startLineNumber\n && initialStartColumn === startColumn\n && initialEndLineNumber === endLineNumber\n && initialEndColumn === endColumn\n && range instanceof Range\n && !(range instanceof Selection)) {\n return range;\n }\n return new Range(startLineNumber, startColumn, endLineNumber, endColumn);\n };\n /**\n * @param strict Do NOT allow a position inside a high-low surrogate pair\n */\n TextModel.prototype._isValidPosition = function (lineNumber, column, strict) {\n if (isNaN(lineNumber)) {\n return false;\n }\n if (lineNumber < 1) {\n return false;\n }\n var lineCount = this._buffer.getLineCount();\n if (lineNumber > lineCount) {\n return false;\n }\n if (isNaN(column)) {\n return false;\n }\n if (column < 1) {\n return false;\n }\n var maxColumn = this.getLineMaxColumn(lineNumber);\n if (column > maxColumn) {\n return false;\n }\n if (strict) {\n if (column > 1) {\n var charCodeBefore = this._buffer.getLineCharCode(lineNumber, column - 2);\n if (strings.isHighSurrogate(charCodeBefore)) {\n return false;\n }\n }\n }\n return true;\n };\n /**\n * @param strict Do NOT allow a position inside a high-low surrogate pair\n */\n TextModel.prototype._validatePosition = function (_lineNumber, _column, strict) {\n var lineNumber = Math.floor((typeof _lineNumber === 'number' && !isNaN(_lineNumber)) ? _lineNumber : 1);\n var column = Math.floor((typeof _column === 'number' && !isNaN(_column)) ? _column : 1);\n var lineCount = this._buffer.getLineCount();\n if (lineNumber < 1) {\n return new Position(1, 1);\n }\n if (lineNumber > lineCount) {\n return new Position(lineCount, this.getLineMaxColumn(lineCount));\n }\n if (column <= 1) {\n return new Position(lineNumber, 1);\n }\n var maxColumn = this.getLineMaxColumn(lineNumber);\n if (column >= maxColumn) {\n return new Position(lineNumber, maxColumn);\n }\n if (strict) {\n // If the position would end up in the middle of a high-low surrogate pair,\n // we move it to before the pair\n // !!At this point, column > 1\n var charCodeBefore = this._buffer.getLineCharCode(lineNumber, column - 2);\n if (strings.isHighSurrogate(charCodeBefore)) {\n return new Position(lineNumber, column - 1);\n }\n }\n return new Position(lineNumber, column);\n };\n TextModel.prototype.validatePosition = function (position) {\n this._assertNotDisposed();\n // Avoid object allocation and cover most likely case\n if (position instanceof Position) {\n if (this._isValidPosition(position.lineNumber, position.column, true)) {\n return position;\n }\n }\n return this._validatePosition(position.lineNumber, position.column, true);\n };\n /**\n * @param strict Do NOT allow a range to have its boundaries inside a high-low surrogate pair\n */\n TextModel.prototype._isValidRange = function (range, strict) {\n var startLineNumber = range.startLineNumber;\n var startColumn = range.startColumn;\n var endLineNumber = range.endLineNumber;\n var endColumn = range.endColumn;\n if (!this._isValidPosition(startLineNumber, startColumn, false)) {\n return false;\n }\n if (!this._isValidPosition(endLineNumber, endColumn, false)) {\n return false;\n }\n if (strict) {\n var charCodeBeforeStart = (startColumn > 1 ? this._buffer.getLineCharCode(startLineNumber, startColumn - 2) : 0);\n var charCodeBeforeEnd = (endColumn > 1 && endColumn <= this._buffer.getLineLength(endLineNumber) ? this._buffer.getLineCharCode(endLineNumber, endColumn - 2) : 0);\n var startInsideSurrogatePair = strings.isHighSurrogate(charCodeBeforeStart);\n var endInsideSurrogatePair = strings.isHighSurrogate(charCodeBeforeEnd);\n if (!startInsideSurrogatePair && !endInsideSurrogatePair) {\n return true;\n }\n return false;\n }\n return true;\n };\n TextModel.prototype.validateRange = function (_range) {\n this._assertNotDisposed();\n // Avoid object allocation and cover most likely case\n if ((_range instanceof Range) && !(_range instanceof Selection)) {\n if (this._isValidRange(_range, true)) {\n return _range;\n }\n }\n var start = this._validatePosition(_range.startLineNumber, _range.startColumn, false);\n var end = this._validatePosition(_range.endLineNumber, _range.endColumn, false);\n var startLineNumber = start.lineNumber;\n var startColumn = start.column;\n var endLineNumber = end.lineNumber;\n var endColumn = end.column;\n var charCodeBeforeStart = (startColumn > 1 ? this._buffer.getLineCharCode(startLineNumber, startColumn - 2) : 0);\n var charCodeBeforeEnd = (endColumn > 1 && endColumn <= this._buffer.getLineLength(endLineNumber) ? this._buffer.getLineCharCode(endLineNumber, endColumn - 2) : 0);\n var startInsideSurrogatePair = strings.isHighSurrogate(charCodeBeforeStart);\n var endInsideSurrogatePair = strings.isHighSurrogate(charCodeBeforeEnd);\n if (!startInsideSurrogatePair && !endInsideSurrogatePair) {\n return new Range(startLineNumber, startColumn, endLineNumber, endColumn);\n }\n if (startLineNumber === endLineNumber && startColumn === endColumn) {\n // do not expand a collapsed range, simply move it to a valid location\n return new Range(startLineNumber, startColumn - 1, endLineNumber, endColumn - 1);\n }\n if (startInsideSurrogatePair && endInsideSurrogatePair) {\n // expand range at both ends\n return new Range(startLineNumber, startColumn - 1, endLineNumber, endColumn + 1);\n }\n if (startInsideSurrogatePair) {\n // only expand range at the start\n return new Range(startLineNumber, startColumn - 1, endLineNumber, endColumn);\n }\n // only expand range at the end\n return new Range(startLineNumber, startColumn, endLineNumber, endColumn + 1);\n };\n TextModel.prototype.modifyPosition = function (rawPosition, offset) {\n this._assertNotDisposed();\n var candidate = this.getOffsetAt(rawPosition) + offset;\n return this.getPositionAt(Math.min(this._buffer.getLength(), Math.max(0, candidate)));\n };\n TextModel.prototype.getFullModelRange = function () {\n this._assertNotDisposed();\n var lineCount = this.getLineCount();\n return new Range(1, 1, lineCount, this.getLineMaxColumn(lineCount));\n };\n TextModel.prototype.findMatchesLineByLine = function (searchRange, searchData, captureMatches, limitResultCount) {\n return this._buffer.findMatchesLineByLine(searchRange, searchData, captureMatches, limitResultCount);\n };\n TextModel.prototype.findMatches = function (searchString, rawSearchScope, isRegex, matchCase, wordSeparators, captureMatches, limitResultCount) {\n if (limitResultCount === void 0) { limitResultCount = LIMIT_FIND_COUNT; }\n this._assertNotDisposed();\n var searchRange;\n if (Range.isIRange(rawSearchScope)) {\n searchRange = this.validateRange(rawSearchScope);\n }\n else {\n searchRange = this.getFullModelRange();\n }\n if (!isRegex && searchString.indexOf('\\n') < 0) {\n // not regex, not multi line\n var searchParams = new SearchParams(searchString, isRegex, matchCase, wordSeparators);\n var searchData = searchParams.parseSearchRequest();\n if (!searchData) {\n return [];\n }\n return this.findMatchesLineByLine(searchRange, searchData, captureMatches, limitResultCount);\n }\n return TextModelSearch.findMatches(this, new SearchParams(searchString, isRegex, matchCase, wordSeparators), searchRange, captureMatches, limitResultCount);\n };\n TextModel.prototype.findNextMatch = function (searchString, rawSearchStart, isRegex, matchCase, wordSeparators, captureMatches) {\n this._assertNotDisposed();\n var searchStart = this.validatePosition(rawSearchStart);\n if (!isRegex && searchString.indexOf('\\n') < 0) {\n var searchParams = new SearchParams(searchString, isRegex, matchCase, wordSeparators);\n var searchData = searchParams.parseSearchRequest();\n var lineCount = this.getLineCount();\n var searchRange = new Range(searchStart.lineNumber, searchStart.column, lineCount, this.getLineMaxColumn(lineCount));\n var ret = this.findMatchesLineByLine(searchRange, searchData, captureMatches, 1);\n TextModelSearch.findNextMatch(this, new SearchParams(searchString, isRegex, matchCase, wordSeparators), searchStart, captureMatches);\n if (ret.length > 0) {\n return ret[0];\n }\n searchRange = new Range(1, 1, searchStart.lineNumber, this.getLineMaxColumn(searchStart.lineNumber));\n ret = this.findMatchesLineByLine(searchRange, searchData, captureMatches, 1);\n if (ret.length > 0) {\n return ret[0];\n }\n return null;\n }\n return TextModelSearch.findNextMatch(this, new SearchParams(searchString, isRegex, matchCase, wordSeparators), searchStart, captureMatches);\n };\n TextModel.prototype.findPreviousMatch = function (searchString, rawSearchStart, isRegex, matchCase, wordSeparators, captureMatches) {\n this._assertNotDisposed();\n var searchStart = this.validatePosition(rawSearchStart);\n return TextModelSearch.findPreviousMatch(this, new SearchParams(searchString, isRegex, matchCase, wordSeparators), searchStart, captureMatches);\n };\n //#endregion\n //#region Editing\n TextModel.prototype.pushStackElement = function () {\n this._commandManager.pushStackElement();\n };\n TextModel.prototype.pushEOL = function (eol) {\n var currentEOL = (this.getEOL() === '\\n' ? model.EndOfLineSequence.LF : model.EndOfLineSequence.CRLF);\n if (currentEOL === eol) {\n return;\n }\n try {\n this._onDidChangeDecorations.beginDeferredEmit();\n this._eventEmitter.beginDeferredEmit();\n this._commandManager.pushEOL(eol);\n }\n finally {\n this._eventEmitter.endDeferredEmit();\n this._onDidChangeDecorations.endDeferredEmit();\n }\n };\n TextModel.prototype.pushEditOperations = function (beforeCursorState, editOperations, cursorStateComputer) {\n try {\n this._onDidChangeDecorations.beginDeferredEmit();\n this._eventEmitter.beginDeferredEmit();\n return this._pushEditOperations(beforeCursorState, editOperations, cursorStateComputer);\n }\n finally {\n this._eventEmitter.endDeferredEmit();\n this._onDidChangeDecorations.endDeferredEmit();\n }\n };\n TextModel.prototype._pushEditOperations = function (beforeCursorState, editOperations, cursorStateComputer) {\n var _this = this;\n if (this._options.trimAutoWhitespace && this._trimAutoWhitespaceLines) {\n // Go through each saved line number and insert a trim whitespace edit\n // if it is safe to do so (no conflicts with other edits).\n var incomingEdits = editOperations.map(function (op) {\n return {\n range: _this.validateRange(op.range),\n text: op.text\n };\n });\n // Sometimes, auto-formatters change ranges automatically which can cause undesired auto whitespace trimming near the cursor\n // We'll use the following heuristic: if the edits occur near the cursor, then it's ok to trim auto whitespace\n var editsAreNearCursors = true;\n for (var i = 0, len = beforeCursorState.length; i < len; i++) {\n var sel = beforeCursorState[i];\n var foundEditNearSel = false;\n for (var j = 0, lenJ = incomingEdits.length; j < lenJ; j++) {\n var editRange = incomingEdits[j].range;\n var selIsAbove = editRange.startLineNumber > sel.endLineNumber;\n var selIsBelow = sel.startLineNumber > editRange.endLineNumber;\n if (!selIsAbove && !selIsBelow) {\n foundEditNearSel = true;\n break;\n }\n }\n if (!foundEditNearSel) {\n editsAreNearCursors = false;\n break;\n }\n }\n if (editsAreNearCursors) {\n for (var i = 0, len = this._trimAutoWhitespaceLines.length; i < len; i++) {\n var trimLineNumber = this._trimAutoWhitespaceLines[i];\n var maxLineColumn = this.getLineMaxColumn(trimLineNumber);\n var allowTrimLine = true;\n for (var j = 0, lenJ = incomingEdits.length; j < lenJ; j++) {\n var editRange = incomingEdits[j].range;\n var editText = incomingEdits[j].text;\n if (trimLineNumber < editRange.startLineNumber || trimLineNumber > editRange.endLineNumber) {\n // `trimLine` is completely outside this edit\n continue;\n }\n // At this point:\n // editRange.startLineNumber <= trimLine <= editRange.endLineNumber\n if (trimLineNumber === editRange.startLineNumber && editRange.startColumn === maxLineColumn\n && editRange.isEmpty() && editText && editText.length > 0 && editText.charAt(0) === '\\n') {\n // This edit inserts a new line (and maybe other text) after `trimLine`\n continue;\n }\n if (trimLineNumber === editRange.startLineNumber && editRange.startColumn === 1\n && editRange.isEmpty() && editText && editText.length > 0 && editText.charAt(editText.length - 1) === '\\n') {\n // This edit inserts a new line (and maybe other text) before `trimLine`\n continue;\n }\n // Looks like we can't trim this line as it would interfere with an incoming edit\n allowTrimLine = false;\n break;\n }\n if (allowTrimLine) {\n editOperations.push({\n range: new Range(trimLineNumber, 1, trimLineNumber, maxLineColumn),\n text: null\n });\n }\n }\n }\n this._trimAutoWhitespaceLines = null;\n }\n return this._commandManager.pushEditOperation(beforeCursorState, editOperations, cursorStateComputer);\n };\n TextModel.prototype.applyEdits = function (rawOperations) {\n try {\n this._onDidChangeDecorations.beginDeferredEmit();\n this._eventEmitter.beginDeferredEmit();\n return this._applyEdits(rawOperations);\n }\n finally {\n this._eventEmitter.endDeferredEmit();\n this._onDidChangeDecorations.endDeferredEmit();\n }\n };\n TextModel._eolCount = function (text) {\n var eolCount = 0;\n var firstLineLength = 0;\n for (var i = 0, len = text.length; i < len; i++) {\n var chr = text.charCodeAt(i);\n if (chr === 13 /* CarriageReturn */) {\n if (eolCount === 0) {\n firstLineLength = i;\n }\n eolCount++;\n if (i + 1 < len && text.charCodeAt(i + 1) === 10 /* LineFeed */) {\n // \\r\\n... case\n i++; // skip \\n\n }\n else {\n // \\r... case\n }\n }\n else if (chr === 10 /* LineFeed */) {\n if (eolCount === 0) {\n firstLineLength = i;\n }\n eolCount++;\n }\n }\n if (eolCount === 0) {\n firstLineLength = text.length;\n }\n return [eolCount, firstLineLength];\n };\n TextModel.prototype._applyEdits = function (rawOperations) {\n for (var i = 0, len = rawOperations.length; i < len; i++) {\n rawOperations[i].range = this.validateRange(rawOperations[i].range);\n }\n var oldLineCount = this._buffer.getLineCount();\n var result = this._buffer.applyEdits(rawOperations, this._options.trimAutoWhitespace);\n var newLineCount = this._buffer.getLineCount();\n var contentChanges = result.changes;\n this._trimAutoWhitespaceLines = result.trimAutoWhitespaceLineNumbers;\n if (contentChanges.length !== 0) {\n var rawContentChanges = [];\n var lineCount = oldLineCount;\n for (var i = 0, len = contentChanges.length; i < len; i++) {\n var change = contentChanges[i];\n var _a = TextModel._eolCount(change.text), eolCount = _a[0], firstLineLength = _a[1];\n this._tokens.applyEdits(change.range, eolCount, firstLineLength);\n this._onDidChangeDecorations.fire();\n this._decorationsTree.acceptReplace(change.rangeOffset, change.rangeLength, change.text.length, change.forceMoveMarkers);\n var startLineNumber = change.range.startLineNumber;\n var endLineNumber = change.range.endLineNumber;\n var deletingLinesCnt = endLineNumber - startLineNumber;\n var insertingLinesCnt = eolCount;\n var editingLinesCnt = Math.min(deletingLinesCnt, insertingLinesCnt);\n var changeLineCountDelta = (insertingLinesCnt - deletingLinesCnt);\n for (var j = editingLinesCnt; j >= 0; j--) {\n var editLineNumber = startLineNumber + j;\n var currentEditLineNumber = newLineCount - lineCount - changeLineCountDelta + editLineNumber;\n rawContentChanges.push(new ModelRawLineChanged(editLineNumber, this.getLineContent(currentEditLineNumber)));\n }\n if (editingLinesCnt < deletingLinesCnt) {\n // Must delete some lines\n var spliceStartLineNumber = startLineNumber + editingLinesCnt;\n rawContentChanges.push(new ModelRawLinesDeleted(spliceStartLineNumber + 1, endLineNumber));\n }\n if (editingLinesCnt < insertingLinesCnt) {\n // Must insert some lines\n var spliceLineNumber = startLineNumber + editingLinesCnt;\n var cnt = insertingLinesCnt - editingLinesCnt;\n var fromLineNumber = newLineCount - lineCount - cnt + spliceLineNumber + 1;\n var newLines = [];\n for (var i_1 = 0; i_1 < cnt; i_1++) {\n var lineNumber = fromLineNumber + i_1;\n newLines[lineNumber - fromLineNumber] = this.getLineContent(lineNumber);\n }\n rawContentChanges.push(new ModelRawLinesInserted(spliceLineNumber + 1, startLineNumber + insertingLinesCnt, newLines));\n }\n lineCount += changeLineCountDelta;\n }\n this._increaseVersionId();\n this._emitContentChangedEvent(new ModelRawContentChangedEvent(rawContentChanges, this.getVersionId(), this._isUndoing, this._isRedoing), {\n changes: contentChanges,\n eol: this._buffer.getEOL(),\n versionId: this.getVersionId(),\n isUndoing: this._isUndoing,\n isRedoing: this._isRedoing,\n isFlush: false\n });\n }\n if (this._tokens.hasLinesToTokenize(this._buffer)) {\n this._beginBackgroundTokenization();\n }\n return result.reverseEdits;\n };\n TextModel.prototype._undo = function () {\n this._isUndoing = true;\n var r = this._commandManager.undo();\n this._isUndoing = false;\n if (!r) {\n return null;\n }\n this._overwriteAlternativeVersionId(r.recordedVersionId);\n return r.selections;\n };\n TextModel.prototype.undo = function () {\n try {\n this._onDidChangeDecorations.beginDeferredEmit();\n this._eventEmitter.beginDeferredEmit();\n return this._undo();\n }\n finally {\n this._eventEmitter.endDeferredEmit();\n this._onDidChangeDecorations.endDeferredEmit();\n }\n };\n TextModel.prototype.canUndo = function () {\n return this._commandManager.canUndo();\n };\n TextModel.prototype._redo = function () {\n this._isRedoing = true;\n var r = this._commandManager.redo();\n this._isRedoing = false;\n if (!r) {\n return null;\n }\n this._overwriteAlternativeVersionId(r.recordedVersionId);\n return r.selections;\n };\n TextModel.prototype.redo = function () {\n try {\n this._onDidChangeDecorations.beginDeferredEmit();\n this._eventEmitter.beginDeferredEmit();\n return this._redo();\n }\n finally {\n this._eventEmitter.endDeferredEmit();\n this._onDidChangeDecorations.endDeferredEmit();\n }\n };\n TextModel.prototype.canRedo = function () {\n return this._commandManager.canRedo();\n };\n //#endregion\n //#region Decorations\n TextModel.prototype.changeDecorations = function (callback, ownerId) {\n if (ownerId === void 0) { ownerId = 0; }\n this._assertNotDisposed();\n try {\n this._onDidChangeDecorations.beginDeferredEmit();\n return this._changeDecorations(ownerId, callback);\n }\n finally {\n this._onDidChangeDecorations.endDeferredEmit();\n }\n };\n TextModel.prototype._changeDecorations = function (ownerId, callback) {\n var _this = this;\n var changeAccessor = {\n addDecoration: function (range, options) {\n _this._onDidChangeDecorations.fire();\n return _this._deltaDecorationsImpl(ownerId, [], [{ range: range, options: options }])[0];\n },\n changeDecoration: function (id, newRange) {\n _this._onDidChangeDecorations.fire();\n _this._changeDecorationImpl(id, newRange);\n },\n changeDecorationOptions: function (id, options) {\n _this._onDidChangeDecorations.fire();\n _this._changeDecorationOptionsImpl(id, _normalizeOptions(options));\n },\n removeDecoration: function (id) {\n _this._onDidChangeDecorations.fire();\n _this._deltaDecorationsImpl(ownerId, [id], []);\n },\n deltaDecorations: function (oldDecorations, newDecorations) {\n if (oldDecorations.length === 0 && newDecorations.length === 0) {\n // nothing to do\n return [];\n }\n _this._onDidChangeDecorations.fire();\n return _this._deltaDecorationsImpl(ownerId, oldDecorations, newDecorations);\n }\n };\n var result = null;\n try {\n result = callback(changeAccessor);\n }\n catch (e) {\n onUnexpectedError(e);\n }\n // Invalidate change accessor\n changeAccessor.addDecoration = null;\n changeAccessor.changeDecoration = null;\n changeAccessor.removeDecoration = null;\n changeAccessor.deltaDecorations = null;\n return result;\n };\n TextModel.prototype.deltaDecorations = function (oldDecorations, newDecorations, ownerId) {\n if (ownerId === void 0) { ownerId = 0; }\n this._assertNotDisposed();\n if (!oldDecorations) {\n oldDecorations = [];\n }\n if (oldDecorations.length === 0 && newDecorations.length === 0) {\n // nothing to do\n return [];\n }\n try {\n this._onDidChangeDecorations.beginDeferredEmit();\n this._onDidChangeDecorations.fire();\n return this._deltaDecorationsImpl(ownerId, oldDecorations, newDecorations);\n }\n finally {\n this._onDidChangeDecorations.endDeferredEmit();\n }\n };\n TextModel.prototype._getTrackedRange = function (id) {\n return this.getDecorationRange(id);\n };\n TextModel.prototype._setTrackedRange = function (id, newRange, newStickiness) {\n var node = (id ? this._decorations[id] : null);\n if (!node) {\n if (!newRange) {\n // node doesn't exist, the request is to delete => nothing to do\n return null;\n }\n // node doesn't exist, the request is to set => add the tracked range\n return this._deltaDecorationsImpl(0, [], [{ range: newRange, options: TRACKED_RANGE_OPTIONS[newStickiness] }])[0];\n }\n if (!newRange) {\n // node exists, the request is to delete => delete node\n this._decorationsTree.delete(node);\n delete this._decorations[node.id];\n return null;\n }\n // node exists, the request is to set => change the tracked range and its options\n var range = this._validateRangeRelaxedNoAllocations(newRange);\n var startOffset = this._buffer.getOffsetAt(range.startLineNumber, range.startColumn);\n var endOffset = this._buffer.getOffsetAt(range.endLineNumber, range.endColumn);\n this._decorationsTree.delete(node);\n node.reset(this.getVersionId(), startOffset, endOffset, range);\n node.setOptions(TRACKED_RANGE_OPTIONS[newStickiness]);\n this._decorationsTree.insert(node);\n return node.id;\n };\n TextModel.prototype.removeAllDecorationsWithOwnerId = function (ownerId) {\n if (this._isDisposed) {\n return;\n }\n var nodes = this._decorationsTree.collectNodesFromOwner(ownerId);\n for (var i = 0, len = nodes.length; i < len; i++) {\n var node = nodes[i];\n this._decorationsTree.delete(node);\n delete this._decorations[node.id];\n }\n };\n TextModel.prototype.getDecorationOptions = function (decorationId) {\n var node = this._decorations[decorationId];\n if (!node) {\n return null;\n }\n return node.options;\n };\n TextModel.prototype.getDecorationRange = function (decorationId) {\n var node = this._decorations[decorationId];\n if (!node) {\n return null;\n }\n var versionId = this.getVersionId();\n if (node.cachedVersionId !== versionId) {\n this._decorationsTree.resolveNode(node, versionId);\n }\n if (node.range === null) {\n node.range = this._getRangeAt(node.cachedAbsoluteStart, node.cachedAbsoluteEnd);\n }\n return node.range;\n };\n TextModel.prototype.getLineDecorations = function (lineNumber, ownerId, filterOutValidation) {\n if (ownerId === void 0) { ownerId = 0; }\n if (filterOutValidation === void 0) { filterOutValidation = false; }\n if (lineNumber < 1 || lineNumber > this.getLineCount()) {\n return [];\n }\n return this.getLinesDecorations(lineNumber, lineNumber, ownerId, filterOutValidation);\n };\n TextModel.prototype.getLinesDecorations = function (_startLineNumber, _endLineNumber, ownerId, filterOutValidation) {\n if (ownerId === void 0) { ownerId = 0; }\n if (filterOutValidation === void 0) { filterOutValidation = false; }\n var lineCount = this.getLineCount();\n var startLineNumber = Math.min(lineCount, Math.max(1, _startLineNumber));\n var endLineNumber = Math.min(lineCount, Math.max(1, _endLineNumber));\n var endColumn = this.getLineMaxColumn(endLineNumber);\n return this._getDecorationsInRange(new Range(startLineNumber, 1, endLineNumber, endColumn), ownerId, filterOutValidation);\n };\n TextModel.prototype.getDecorationsInRange = function (range, ownerId, filterOutValidation) {\n if (ownerId === void 0) { ownerId = 0; }\n if (filterOutValidation === void 0) { filterOutValidation = false; }\n var validatedRange = this.validateRange(range);\n return this._getDecorationsInRange(validatedRange, ownerId, filterOutValidation);\n };\n TextModel.prototype.getOverviewRulerDecorations = function (ownerId, filterOutValidation) {\n if (ownerId === void 0) { ownerId = 0; }\n if (filterOutValidation === void 0) { filterOutValidation = false; }\n var versionId = this.getVersionId();\n var result = this._decorationsTree.search(ownerId, filterOutValidation, true, versionId);\n return this._ensureNodesHaveRanges(result);\n };\n TextModel.prototype.getAllDecorations = function (ownerId, filterOutValidation) {\n if (ownerId === void 0) { ownerId = 0; }\n if (filterOutValidation === void 0) { filterOutValidation = false; }\n var versionId = this.getVersionId();\n var result = this._decorationsTree.search(ownerId, filterOutValidation, false, versionId);\n return this._ensureNodesHaveRanges(result);\n };\n TextModel.prototype._getDecorationsInRange = function (filterRange, filterOwnerId, filterOutValidation) {\n var startOffset = this._buffer.getOffsetAt(filterRange.startLineNumber, filterRange.startColumn);\n var endOffset = this._buffer.getOffsetAt(filterRange.endLineNumber, filterRange.endColumn);\n var versionId = this.getVersionId();\n var result = this._decorationsTree.intervalSearch(startOffset, endOffset, filterOwnerId, filterOutValidation, versionId);\n return this._ensureNodesHaveRanges(result);\n };\n TextModel.prototype._ensureNodesHaveRanges = function (nodes) {\n for (var i = 0, len = nodes.length; i < len; i++) {\n var node = nodes[i];\n if (node.range === null) {\n node.range = this._getRangeAt(node.cachedAbsoluteStart, node.cachedAbsoluteEnd);\n }\n }\n return nodes;\n };\n TextModel.prototype._getRangeAt = function (start, end) {\n return this._buffer.getRangeAt(start, end - start);\n };\n TextModel.prototype._changeDecorationImpl = function (decorationId, _range) {\n var node = this._decorations[decorationId];\n if (!node) {\n return;\n }\n var range = this._validateRangeRelaxedNoAllocations(_range);\n var startOffset = this._buffer.getOffsetAt(range.startLineNumber, range.startColumn);\n var endOffset = this._buffer.getOffsetAt(range.endLineNumber, range.endColumn);\n this._decorationsTree.delete(node);\n node.reset(this.getVersionId(), startOffset, endOffset, range);\n this._decorationsTree.insert(node);\n };\n TextModel.prototype._changeDecorationOptionsImpl = function (decorationId, options) {\n var node = this._decorations[decorationId];\n if (!node) {\n return;\n }\n var nodeWasInOverviewRuler = (node.options.overviewRuler.color ? true : false);\n var nodeIsInOverviewRuler = (options.overviewRuler.color ? true : false);\n if (nodeWasInOverviewRuler !== nodeIsInOverviewRuler) {\n // Delete + Insert due to an overview ruler status change\n this._decorationsTree.delete(node);\n node.setOptions(options);\n this._decorationsTree.insert(node);\n }\n else {\n node.setOptions(options);\n }\n };\n TextModel.prototype._deltaDecorationsImpl = function (ownerId, oldDecorationsIds, newDecorations) {\n var versionId = this.getVersionId();\n var oldDecorationsLen = oldDecorationsIds.length;\n var oldDecorationIndex = 0;\n var newDecorationsLen = newDecorations.length;\n var newDecorationIndex = 0;\n var result = new Array(newDecorationsLen);\n while (oldDecorationIndex < oldDecorationsLen || newDecorationIndex < newDecorationsLen) {\n var node = null;\n if (oldDecorationIndex < oldDecorationsLen) {\n // (1) get ourselves an old node\n do {\n node = this._decorations[oldDecorationsIds[oldDecorationIndex++]];\n } while (!node && oldDecorationIndex < oldDecorationsLen);\n // (2) remove the node from the tree (if it exists)\n if (node) {\n this._decorationsTree.delete(node);\n }\n }\n if (newDecorationIndex < newDecorationsLen) {\n // (3) create a new node if necessary\n if (!node) {\n var internalDecorationId = (++this._lastDecorationId);\n var decorationId = this._instanceId + \";\" + internalDecorationId;\n node = new IntervalNode(decorationId, 0, 0);\n this._decorations[decorationId] = node;\n }\n // (4) initialize node\n var newDecoration = newDecorations[newDecorationIndex];\n var range = this._validateRangeRelaxedNoAllocations(newDecoration.range);\n var options = _normalizeOptions(newDecoration.options);\n var startOffset = this._buffer.getOffsetAt(range.startLineNumber, range.startColumn);\n var endOffset = this._buffer.getOffsetAt(range.endLineNumber, range.endColumn);\n node.ownerId = ownerId;\n node.reset(versionId, startOffset, endOffset, range);\n node.setOptions(options);\n this._decorationsTree.insert(node);\n result[newDecorationIndex] = node.id;\n newDecorationIndex++;\n }\n else {\n if (node) {\n delete this._decorations[node.id];\n }\n }\n }\n return result;\n };\n //#endregion\n //#region Tokenization\n TextModel.prototype.tokenizeViewport = function (startLineNumber, endLineNumber) {\n if (!this._tokens.tokenizationSupport) {\n return;\n }\n // we tokenize `this._tokens.inValidLineStartIndex` lines in around 20ms so it's a good baseline.\n var contextBefore = Math.floor(this._tokens.inValidLineStartIndex * 0.3);\n startLineNumber = Math.max(1, startLineNumber - contextBefore);\n if (startLineNumber <= this._tokens.inValidLineStartIndex) {\n this.forceTokenization(endLineNumber);\n return;\n }\n var eventBuilder = new ModelTokensChangedEventBuilder();\n var nonWhitespaceColumn = this.getLineFirstNonWhitespaceColumn(startLineNumber);\n var fakeLines = [];\n var i = startLineNumber - 1;\n var initialState = null;\n if (nonWhitespaceColumn > 0) {\n while (nonWhitespaceColumn > 0 && i >= 1) {\n var newNonWhitespaceIndex = this.getLineFirstNonWhitespaceColumn(i);\n if (newNonWhitespaceIndex === 0) {\n i--;\n continue;\n }\n if (newNonWhitespaceIndex < nonWhitespaceColumn) {\n initialState = this._tokens._getState(i - 1);\n if (initialState) {\n break;\n }\n fakeLines.push(this.getLineContent(i));\n nonWhitespaceColumn = newNonWhitespaceIndex;\n }\n i--;\n }\n }\n if (!initialState) {\n initialState = this._tokens.tokenizationSupport.getInitialState();\n }\n var state = initialState.clone();\n for (var i_2 = fakeLines.length - 1; i_2 >= 0; i_2--) {\n var r = this._tokens._tokenizeText(this._buffer, fakeLines[i_2], state);\n if (r) {\n state = r.endState.clone();\n }\n else {\n state = initialState.clone();\n }\n }\n var contextAfter = Math.floor(this._tokens.inValidLineStartIndex * 0.4);\n endLineNumber = Math.min(this.getLineCount(), endLineNumber + contextAfter);\n for (var i_3 = startLineNumber; i_3 <= endLineNumber; i_3++) {\n var text = this.getLineContent(i_3);\n var r = this._tokens._tokenizeText(this._buffer, text, state);\n if (r) {\n this._tokens._setTokens(this._tokens.languageIdentifier.id, i_3 - 1, text.length, r.tokens);\n /*\n * we think it's valid and give it a state but we don't update `_invalidLineStartIndex` then the top-to-bottom tokenization\n * goes through the viewport, it can skip them if they already have correct tokens and state, and the lines after the viewport\n * can still be tokenized.\n */\n this._tokens._setIsInvalid(i_3 - 1, false);\n this._tokens._setState(i_3 - 1, state);\n state = r.endState.clone();\n eventBuilder.registerChangedTokens(i_3);\n }\n else {\n state = initialState.clone();\n }\n }\n var e = eventBuilder.build();\n if (e) {\n this._onDidChangeTokens.fire(e);\n }\n };\n TextModel.prototype.forceTokenization = function (lineNumber) {\n if (lineNumber < 1 || lineNumber > this.getLineCount()) {\n throw new Error('Illegal value for lineNumber');\n }\n var eventBuilder = new ModelTokensChangedEventBuilder();\n this._tokens._updateTokensUntilLine(this._buffer, eventBuilder, lineNumber);\n var e = eventBuilder.build();\n if (e) {\n this._onDidChangeTokens.fire(e);\n }\n };\n TextModel.prototype.isCheapToTokenize = function (lineNumber) {\n return this._tokens.isCheapToTokenize(lineNumber);\n };\n TextModel.prototype.tokenizeIfCheap = function (lineNumber) {\n if (this.isCheapToTokenize(lineNumber)) {\n this.forceTokenization(lineNumber);\n }\n };\n TextModel.prototype.getLineTokens = function (lineNumber) {\n if (lineNumber < 1 || lineNumber > this.getLineCount()) {\n throw new Error('Illegal value for lineNumber');\n }\n return this._getLineTokens(lineNumber);\n };\n TextModel.prototype._getLineTokens = function (lineNumber) {\n var lineText = this._buffer.getLineContent(lineNumber);\n return this._tokens.getTokens(this._languageIdentifier.id, lineNumber - 1, lineText);\n };\n TextModel.prototype.getLanguageIdentifier = function () {\n return this._languageIdentifier;\n };\n TextModel.prototype.getModeId = function () {\n return this._languageIdentifier.language;\n };\n TextModel.prototype.setMode = function (languageIdentifier) {\n if (this._languageIdentifier.id === languageIdentifier.id) {\n // There's nothing to do\n return;\n }\n var e = {\n oldLanguage: this._languageIdentifier.language,\n newLanguage: languageIdentifier.language\n };\n this._languageIdentifier = languageIdentifier;\n // Cancel tokenization, clear all tokens and begin tokenizing\n this._resetTokenizationState();\n this.emitModelTokensChangedEvent({\n ranges: [{\n fromLineNumber: 1,\n toLineNumber: this.getLineCount()\n }]\n });\n this._onDidChangeLanguage.fire(e);\n this._onDidChangeLanguageConfiguration.fire({});\n };\n TextModel.prototype.getLanguageIdAtPosition = function (_lineNumber, _column) {\n if (!this._tokens.tokenizationSupport) {\n return this._languageIdentifier.id;\n }\n var _a = this.validatePosition({ lineNumber: _lineNumber, column: _column }), lineNumber = _a.lineNumber, column = _a.column;\n var lineTokens = this._getLineTokens(lineNumber);\n return lineTokens.getLanguageId(lineTokens.findTokenIndexAtOffset(column - 1));\n };\n TextModel.prototype._beginBackgroundTokenization = function () {\n var _this = this;\n if (this._shouldAutoTokenize() && this._revalidateTokensTimeout === -1) {\n this._revalidateTokensTimeout = setTimeout(function () {\n _this._revalidateTokensTimeout = -1;\n _this._revalidateTokensNow();\n }, 0);\n }\n };\n TextModel.prototype._warmUpTokens = function () {\n // Warm up first 100 lines (if it takes less than 50ms)\n var maxLineNumber = Math.min(100, this.getLineCount());\n this._revalidateTokensNow(maxLineNumber);\n if (this._tokens.hasLinesToTokenize(this._buffer)) {\n this._beginBackgroundTokenization();\n }\n };\n TextModel.prototype._revalidateTokensNow = function (toLineNumber) {\n if (toLineNumber === void 0) { toLineNumber = this._buffer.getLineCount(); }\n var MAX_ALLOWED_TIME = 20;\n var eventBuilder = new ModelTokensChangedEventBuilder();\n var sw = StopWatch.create(false);\n while (this._tokens.hasLinesToTokenize(this._buffer)) {\n if (sw.elapsed() > MAX_ALLOWED_TIME) {\n // Stop if MAX_ALLOWED_TIME is reached\n break;\n }\n var tokenizedLineNumber = this._tokens._tokenizeOneLine(this._buffer, eventBuilder);\n if (tokenizedLineNumber >= toLineNumber) {\n break;\n }\n }\n if (this._tokens.hasLinesToTokenize(this._buffer)) {\n this._beginBackgroundTokenization();\n }\n var e = eventBuilder.build();\n if (e) {\n this._onDidChangeTokens.fire(e);\n }\n };\n TextModel.prototype.emitModelTokensChangedEvent = function (e) {\n if (!this._isDisposing) {\n this._onDidChangeTokens.fire(e);\n }\n };\n // Having tokens allows implementing additional helper methods\n TextModel.prototype.getWordAtPosition = function (_position) {\n this._assertNotDisposed();\n var position = this.validatePosition(_position);\n var lineContent = this.getLineContent(position.lineNumber);\n var lineTokens = this._getLineTokens(position.lineNumber);\n var tokenIndex = lineTokens.findTokenIndexAtOffset(position.column - 1);\n // (1). First try checking right biased word\n var _a = TextModel._findLanguageBoundaries(lineTokens, tokenIndex), rbStartOffset = _a[0], rbEndOffset = _a[1];\n var rightBiasedWord = getWordAtText(position.column, LanguageConfigurationRegistry.getWordDefinition(lineTokens.getLanguageId(tokenIndex)), lineContent.substring(rbStartOffset, rbEndOffset), rbStartOffset);\n if (rightBiasedWord) {\n return rightBiasedWord;\n }\n // (2). Else, if we were at a language boundary, check the left biased word\n if (tokenIndex > 0 && rbStartOffset === position.column - 1) {\n // edge case, where `position` sits between two tokens belonging to two different languages\n var _b = TextModel._findLanguageBoundaries(lineTokens, tokenIndex - 1), lbStartOffset = _b[0], lbEndOffset = _b[1];\n var leftBiasedWord = getWordAtText(position.column, LanguageConfigurationRegistry.getWordDefinition(lineTokens.getLanguageId(tokenIndex - 1)), lineContent.substring(lbStartOffset, lbEndOffset), lbStartOffset);\n if (leftBiasedWord) {\n return leftBiasedWord;\n }\n }\n return null;\n };\n TextModel._findLanguageBoundaries = function (lineTokens, tokenIndex) {\n var languageId = lineTokens.getLanguageId(tokenIndex);\n // go left until a different language is hit\n var startOffset;\n for (var i = tokenIndex; i >= 0 && lineTokens.getLanguageId(i) === languageId; i--) {\n startOffset = lineTokens.getStartOffset(i);\n }\n // go right until a different language is hit\n var endOffset;\n for (var i = tokenIndex, tokenCount = lineTokens.getCount(); i < tokenCount && lineTokens.getLanguageId(i) === languageId; i++) {\n endOffset = lineTokens.getEndOffset(i);\n }\n return [startOffset, endOffset];\n };\n TextModel.prototype.getWordUntilPosition = function (position) {\n var wordAtPosition = this.getWordAtPosition(position);\n if (!wordAtPosition) {\n return {\n word: '',\n startColumn: position.column,\n endColumn: position.column\n };\n }\n return {\n word: wordAtPosition.word.substr(0, position.column - wordAtPosition.startColumn),\n startColumn: wordAtPosition.startColumn,\n endColumn: position.column\n };\n };\n TextModel.prototype.findMatchingBracketUp = function (_bracket, _position) {\n var bracket = _bracket.toLowerCase();\n var position = this.validatePosition(_position);\n var lineTokens = this._getLineTokens(position.lineNumber);\n var languageId = lineTokens.getLanguageId(lineTokens.findTokenIndexAtOffset(position.column - 1));\n var bracketsSupport = LanguageConfigurationRegistry.getBracketsSupport(languageId);\n if (!bracketsSupport) {\n return null;\n }\n var data = bracketsSupport.textIsBracket[bracket];\n if (!data) {\n return null;\n }\n return this._findMatchingBracketUp(data, position);\n };\n TextModel.prototype.matchBracket = function (position) {\n return this._matchBracket(this.validatePosition(position));\n };\n TextModel.prototype._matchBracket = function (position) {\n var lineNumber = position.lineNumber;\n var lineTokens = this._getLineTokens(lineNumber);\n var lineText = this._buffer.getLineContent(lineNumber);\n var tokenIndex = lineTokens.findTokenIndexAtOffset(position.column - 1);\n if (tokenIndex < 0) {\n return null;\n }\n var currentModeBrackets = LanguageConfigurationRegistry.getBracketsSupport(lineTokens.getLanguageId(tokenIndex));\n // check that the token is not to be ignored\n if (currentModeBrackets && !ignoreBracketsInToken(lineTokens.getStandardTokenType(tokenIndex))) {\n // limit search to not go before `maxBracketLength`\n var searchStartOffset = Math.max(lineTokens.getStartOffset(tokenIndex), position.column - 1 - currentModeBrackets.maxBracketLength);\n // limit search to not go after `maxBracketLength`\n var searchEndOffset = Math.min(lineTokens.getEndOffset(tokenIndex), position.column - 1 + currentModeBrackets.maxBracketLength);\n // it might be the case that [currentTokenStart -> currentTokenEnd] contains multiple brackets\n // `bestResult` will contain the most right-side result\n var bestResult = null;\n while (true) {\n var foundBracket = BracketsUtils.findNextBracketInToken(currentModeBrackets.forwardRegex, lineNumber, lineText, searchStartOffset, searchEndOffset);\n if (!foundBracket) {\n // there are no more brackets in this text\n break;\n }\n // check that we didn't hit a bracket too far away from position\n if (foundBracket.startColumn <= position.column && position.column <= foundBracket.endColumn) {\n var foundBracketText = lineText.substring(foundBracket.startColumn - 1, foundBracket.endColumn - 1);\n foundBracketText = foundBracketText.toLowerCase();\n var r = this._matchFoundBracket(foundBracket, currentModeBrackets.textIsBracket[foundBracketText], currentModeBrackets.textIsOpenBracket[foundBracketText]);\n // check that we can actually match this bracket\n if (r) {\n bestResult = r;\n }\n }\n searchStartOffset = foundBracket.endColumn - 1;\n }\n if (bestResult) {\n return bestResult;\n }\n }\n // If position is in between two tokens, try also looking in the previous token\n if (tokenIndex > 0 && lineTokens.getStartOffset(tokenIndex) === position.column - 1) {\n var searchEndOffset = lineTokens.getStartOffset(tokenIndex);\n tokenIndex--;\n var prevModeBrackets = LanguageConfigurationRegistry.getBracketsSupport(lineTokens.getLanguageId(tokenIndex));\n // check that previous token is not to be ignored\n if (prevModeBrackets && !ignoreBracketsInToken(lineTokens.getStandardTokenType(tokenIndex))) {\n // limit search in case previous token is very large, there's no need to go beyond `maxBracketLength`\n var searchStartOffset = Math.max(lineTokens.getStartOffset(tokenIndex), position.column - 1 - prevModeBrackets.maxBracketLength);\n var foundBracket = BracketsUtils.findPrevBracketInToken(prevModeBrackets.reversedRegex, lineNumber, lineText, searchStartOffset, searchEndOffset);\n // check that we didn't hit a bracket too far away from position\n if (foundBracket && foundBracket.startColumn <= position.column && position.column <= foundBracket.endColumn) {\n var foundBracketText = lineText.substring(foundBracket.startColumn - 1, foundBracket.endColumn - 1);\n foundBracketText = foundBracketText.toLowerCase();\n var r = this._matchFoundBracket(foundBracket, prevModeBrackets.textIsBracket[foundBracketText], prevModeBrackets.textIsOpenBracket[foundBracketText]);\n // check that we can actually match this bracket\n if (r) {\n return r;\n }\n }\n }\n }\n return null;\n };\n TextModel.prototype._matchFoundBracket = function (foundBracket, data, isOpen) {\n if (!data) {\n return null;\n }\n if (isOpen) {\n var matched = this._findMatchingBracketDown(data, foundBracket.getEndPosition());\n if (matched) {\n return [foundBracket, matched];\n }\n }\n else {\n var matched = this._findMatchingBracketUp(data, foundBracket.getStartPosition());\n if (matched) {\n return [foundBracket, matched];\n }\n }\n return null;\n };\n TextModel.prototype._findMatchingBracketUp = function (bracket, position) {\n // console.log('_findMatchingBracketUp: ', 'bracket: ', JSON.stringify(bracket), 'startPosition: ', String(position));\n var languageId = bracket.languageIdentifier.id;\n var reversedBracketRegex = bracket.reversedRegex;\n var count = -1;\n for (var lineNumber = position.lineNumber; lineNumber >= 1; lineNumber--) {\n var lineTokens = this._getLineTokens(lineNumber);\n var tokenCount = lineTokens.getCount();\n var lineText = this._buffer.getLineContent(lineNumber);\n var tokenIndex = tokenCount - 1;\n var searchStopOffset = -1;\n if (lineNumber === position.lineNumber) {\n tokenIndex = lineTokens.findTokenIndexAtOffset(position.column - 1);\n searchStopOffset = position.column - 1;\n }\n for (; tokenIndex >= 0; tokenIndex--) {\n var tokenLanguageId = lineTokens.getLanguageId(tokenIndex);\n var tokenType = lineTokens.getStandardTokenType(tokenIndex);\n var tokenStartOffset = lineTokens.getStartOffset(tokenIndex);\n var tokenEndOffset = lineTokens.getEndOffset(tokenIndex);\n if (searchStopOffset === -1) {\n searchStopOffset = tokenEndOffset;\n }\n if (tokenLanguageId === languageId && !ignoreBracketsInToken(tokenType)) {\n while (true) {\n var r = BracketsUtils.findPrevBracketInToken(reversedBracketRegex, lineNumber, lineText, tokenStartOffset, searchStopOffset);\n if (!r) {\n break;\n }\n var hitText = lineText.substring(r.startColumn - 1, r.endColumn - 1);\n hitText = hitText.toLowerCase();\n if (hitText === bracket.open) {\n count++;\n }\n else if (hitText === bracket.close) {\n count--;\n }\n if (count === 0) {\n return r;\n }\n searchStopOffset = r.startColumn - 1;\n }\n }\n searchStopOffset = -1;\n }\n }\n return null;\n };\n TextModel.prototype._findMatchingBracketDown = function (bracket, position) {\n // console.log('_findMatchingBracketDown: ', 'bracket: ', JSON.stringify(bracket), 'startPosition: ', String(position));\n var languageId = bracket.languageIdentifier.id;\n var bracketRegex = bracket.forwardRegex;\n var count = 1;\n for (var lineNumber = position.lineNumber, lineCount = this.getLineCount(); lineNumber <= lineCount; lineNumber++) {\n var lineTokens = this._getLineTokens(lineNumber);\n var tokenCount = lineTokens.getCount();\n var lineText = this._buffer.getLineContent(lineNumber);\n var tokenIndex = 0;\n var searchStartOffset = 0;\n if (lineNumber === position.lineNumber) {\n tokenIndex = lineTokens.findTokenIndexAtOffset(position.column - 1);\n searchStartOffset = position.column - 1;\n }\n for (; tokenIndex < tokenCount; tokenIndex++) {\n var tokenLanguageId = lineTokens.getLanguageId(tokenIndex);\n var tokenType = lineTokens.getStandardTokenType(tokenIndex);\n var tokenStartOffset = lineTokens.getStartOffset(tokenIndex);\n var tokenEndOffset = lineTokens.getEndOffset(tokenIndex);\n if (searchStartOffset === 0) {\n searchStartOffset = tokenStartOffset;\n }\n if (tokenLanguageId === languageId && !ignoreBracketsInToken(tokenType)) {\n while (true) {\n var r = BracketsUtils.findNextBracketInToken(bracketRegex, lineNumber, lineText, searchStartOffset, tokenEndOffset);\n if (!r) {\n break;\n }\n var hitText = lineText.substring(r.startColumn - 1, r.endColumn - 1);\n hitText = hitText.toLowerCase();\n if (hitText === bracket.open) {\n count++;\n }\n else if (hitText === bracket.close) {\n count--;\n }\n if (count === 0) {\n return r;\n }\n searchStartOffset = r.endColumn - 1;\n }\n }\n searchStartOffset = 0;\n }\n }\n return null;\n };\n TextModel.prototype.findNextBracket = function (_position) {\n var position = this.validatePosition(_position);\n var languageId = -1;\n var modeBrackets = null;\n for (var lineNumber = position.lineNumber, lineCount = this.getLineCount(); lineNumber <= lineCount; lineNumber++) {\n var lineTokens = this._getLineTokens(lineNumber);\n var tokenCount = lineTokens.getCount();\n var lineText = this._buffer.getLineContent(lineNumber);\n var tokenIndex = 0;\n var searchStartOffset = 0;\n if (lineNumber === position.lineNumber) {\n tokenIndex = lineTokens.findTokenIndexAtOffset(position.column - 1);\n searchStartOffset = position.column - 1;\n }\n for (; tokenIndex < tokenCount; tokenIndex++) {\n var tokenLanguageId = lineTokens.getLanguageId(tokenIndex);\n var tokenType = lineTokens.getStandardTokenType(tokenIndex);\n var tokenStartOffset = lineTokens.getStartOffset(tokenIndex);\n var tokenEndOffset = lineTokens.getEndOffset(tokenIndex);\n if (searchStartOffset === 0) {\n searchStartOffset = tokenStartOffset;\n }\n if (languageId !== tokenLanguageId) {\n languageId = tokenLanguageId;\n modeBrackets = LanguageConfigurationRegistry.getBracketsSupport(languageId);\n }\n if (modeBrackets && !ignoreBracketsInToken(tokenType)) {\n var r = BracketsUtils.findNextBracketInToken(modeBrackets.forwardRegex, lineNumber, lineText, searchStartOffset, tokenEndOffset);\n if (r) {\n return this._toFoundBracket(modeBrackets, r);\n }\n }\n searchStartOffset = 0;\n }\n }\n return null;\n };\n TextModel.prototype._toFoundBracket = function (modeBrackets, r) {\n if (!r) {\n return null;\n }\n var text = this.getValueInRange(r);\n text = text.toLowerCase();\n var data = modeBrackets.textIsBracket[text];\n if (!data) {\n return null;\n }\n return {\n range: r,\n open: data.open,\n close: data.close,\n isOpen: modeBrackets.textIsOpenBracket[text]\n };\n };\n /**\n * Returns:\n * - -1 => the line consists of whitespace\n * - otherwise => the indent level is returned value\n */\n TextModel.computeIndentLevel = function (line, tabSize) {\n var indent = 0;\n var i = 0;\n var len = line.length;\n while (i < len) {\n var chCode = line.charCodeAt(i);\n if (chCode === 32 /* Space */) {\n indent++;\n }\n else if (chCode === 9 /* Tab */) {\n indent = indent - indent % tabSize + tabSize;\n }\n else {\n break;\n }\n i++;\n }\n if (i === len) {\n return -1; // line only consists of whitespace\n }\n return indent;\n };\n TextModel.prototype._computeIndentLevel = function (lineIndex) {\n return TextModel.computeIndentLevel(this._buffer.getLineContent(lineIndex + 1), this._options.tabSize);\n };\n TextModel.prototype.getActiveIndentGuide = function (lineNumber, minLineNumber, maxLineNumber) {\n var _this = this;\n this._assertNotDisposed();\n var lineCount = this.getLineCount();\n if (lineNumber < 1 || lineNumber > lineCount) {\n throw new Error('Illegal value for lineNumber');\n }\n var foldingRules = LanguageConfigurationRegistry.getFoldingRules(this._languageIdentifier.id);\n var offSide = foldingRules && foldingRules.offSide;\n var up_aboveContentLineIndex = -2; /* -2 is a marker for not having computed it */\n var up_aboveContentLineIndent = -1;\n var up_belowContentLineIndex = -2; /* -2 is a marker for not having computed it */\n var up_belowContentLineIndent = -1;\n var up_resolveIndents = function (lineNumber) {\n if (up_aboveContentLineIndex !== -1 && (up_aboveContentLineIndex === -2 || up_aboveContentLineIndex > lineNumber - 1)) {\n up_aboveContentLineIndex = -1;\n up_aboveContentLineIndent = -1;\n // must find previous line with content\n for (var lineIndex = lineNumber - 2; lineIndex >= 0; lineIndex--) {\n var indent_1 = _this._computeIndentLevel(lineIndex);\n if (indent_1 >= 0) {\n up_aboveContentLineIndex = lineIndex;\n up_aboveContentLineIndent = indent_1;\n break;\n }\n }\n }\n if (up_belowContentLineIndex === -2) {\n up_belowContentLineIndex = -1;\n up_belowContentLineIndent = -1;\n // must find next line with content\n for (var lineIndex = lineNumber; lineIndex < lineCount; lineIndex++) {\n var indent_2 = _this._computeIndentLevel(lineIndex);\n if (indent_2 >= 0) {\n up_belowContentLineIndex = lineIndex;\n up_belowContentLineIndent = indent_2;\n break;\n }\n }\n }\n };\n var down_aboveContentLineIndex = -2; /* -2 is a marker for not having computed it */\n var down_aboveContentLineIndent = -1;\n var down_belowContentLineIndex = -2; /* -2 is a marker for not having computed it */\n var down_belowContentLineIndent = -1;\n var down_resolveIndents = function (lineNumber) {\n if (down_aboveContentLineIndex === -2) {\n down_aboveContentLineIndex = -1;\n down_aboveContentLineIndent = -1;\n // must find previous line with content\n for (var lineIndex = lineNumber - 2; lineIndex >= 0; lineIndex--) {\n var indent_3 = _this._computeIndentLevel(lineIndex);\n if (indent_3 >= 0) {\n down_aboveContentLineIndex = lineIndex;\n down_aboveContentLineIndent = indent_3;\n break;\n }\n }\n }\n if (down_belowContentLineIndex !== -1 && (down_belowContentLineIndex === -2 || down_belowContentLineIndex < lineNumber - 1)) {\n down_belowContentLineIndex = -1;\n down_belowContentLineIndent = -1;\n // must find next line with content\n for (var lineIndex = lineNumber; lineIndex < lineCount; lineIndex++) {\n var indent_4 = _this._computeIndentLevel(lineIndex);\n if (indent_4 >= 0) {\n down_belowContentLineIndex = lineIndex;\n down_belowContentLineIndent = indent_4;\n break;\n }\n }\n }\n };\n var startLineNumber = 0;\n var goUp = true;\n var endLineNumber = 0;\n var goDown = true;\n var indent = 0;\n for (var distance = 0; goUp || goDown; distance++) {\n var upLineNumber = lineNumber - distance;\n var downLineNumber = lineNumber + distance;\n if (distance !== 0 && (upLineNumber < 1 || upLineNumber < minLineNumber)) {\n goUp = false;\n }\n if (distance !== 0 && (downLineNumber > lineCount || downLineNumber > maxLineNumber)) {\n goDown = false;\n }\n if (distance > 50000) {\n // stop processing\n goUp = false;\n goDown = false;\n }\n if (goUp) {\n // compute indent level going up\n var upLineIndentLevel = void 0;\n var currentIndent = this._computeIndentLevel(upLineNumber - 1);\n if (currentIndent >= 0) {\n // This line has content (besides whitespace)\n // Use the line's indent\n up_belowContentLineIndex = upLineNumber - 1;\n up_belowContentLineIndent = currentIndent;\n upLineIndentLevel = Math.ceil(currentIndent / this._options.tabSize);\n }\n else {\n up_resolveIndents(upLineNumber);\n upLineIndentLevel = this._getIndentLevelForWhitespaceLine(offSide, up_aboveContentLineIndent, up_belowContentLineIndent);\n }\n if (distance === 0) {\n // This is the initial line number\n startLineNumber = upLineNumber;\n endLineNumber = downLineNumber;\n indent = upLineIndentLevel;\n if (indent === 0) {\n // No need to continue\n return { startLineNumber: startLineNumber, endLineNumber: endLineNumber, indent: indent };\n }\n continue;\n }\n if (upLineIndentLevel >= indent) {\n startLineNumber = upLineNumber;\n }\n else {\n goUp = false;\n }\n }\n if (goDown) {\n // compute indent level going down\n var downLineIndentLevel = void 0;\n var currentIndent = this._computeIndentLevel(downLineNumber - 1);\n if (currentIndent >= 0) {\n // This line has content (besides whitespace)\n // Use the line's indent\n down_aboveContentLineIndex = downLineNumber - 1;\n down_aboveContentLineIndent = currentIndent;\n downLineIndentLevel = Math.ceil(currentIndent / this._options.tabSize);\n }\n else {\n down_resolveIndents(downLineNumber);\n downLineIndentLevel = this._getIndentLevelForWhitespaceLine(offSide, down_aboveContentLineIndent, down_belowContentLineIndent);\n }\n if (downLineIndentLevel >= indent) {\n endLineNumber = downLineNumber;\n }\n else {\n goDown = false;\n }\n }\n }\n return { startLineNumber: startLineNumber, endLineNumber: endLineNumber, indent: indent };\n };\n TextModel.prototype.getLinesIndentGuides = function (startLineNumber, endLineNumber) {\n this._assertNotDisposed();\n var lineCount = this.getLineCount();\n if (startLineNumber < 1 || startLineNumber > lineCount) {\n throw new Error('Illegal value for startLineNumber');\n }\n if (endLineNumber < 1 || endLineNumber > lineCount) {\n throw new Error('Illegal value for endLineNumber');\n }\n var foldingRules = LanguageConfigurationRegistry.getFoldingRules(this._languageIdentifier.id);\n var offSide = foldingRules && foldingRules.offSide;\n var result = new Array(endLineNumber - startLineNumber + 1);\n var aboveContentLineIndex = -2; /* -2 is a marker for not having computed it */\n var aboveContentLineIndent = -1;\n var belowContentLineIndex = -2; /* -2 is a marker for not having computed it */\n var belowContentLineIndent = -1;\n for (var lineNumber = startLineNumber; lineNumber <= endLineNumber; lineNumber++) {\n var resultIndex = lineNumber - startLineNumber;\n var currentIndent = this._computeIndentLevel(lineNumber - 1);\n if (currentIndent >= 0) {\n // This line has content (besides whitespace)\n // Use the line's indent\n aboveContentLineIndex = lineNumber - 1;\n aboveContentLineIndent = currentIndent;\n result[resultIndex] = Math.ceil(currentIndent / this._options.tabSize);\n continue;\n }\n if (aboveContentLineIndex === -2) {\n aboveContentLineIndex = -1;\n aboveContentLineIndent = -1;\n // must find previous line with content\n for (var lineIndex = lineNumber - 2; lineIndex >= 0; lineIndex--) {\n var indent = this._computeIndentLevel(lineIndex);\n if (indent >= 0) {\n aboveContentLineIndex = lineIndex;\n aboveContentLineIndent = indent;\n break;\n }\n }\n }\n if (belowContentLineIndex !== -1 && (belowContentLineIndex === -2 || belowContentLineIndex < lineNumber - 1)) {\n belowContentLineIndex = -1;\n belowContentLineIndent = -1;\n // must find next line with content\n for (var lineIndex = lineNumber; lineIndex < lineCount; lineIndex++) {\n var indent = this._computeIndentLevel(lineIndex);\n if (indent >= 0) {\n belowContentLineIndex = lineIndex;\n belowContentLineIndent = indent;\n break;\n }\n }\n }\n result[resultIndex] = this._getIndentLevelForWhitespaceLine(offSide, aboveContentLineIndent, belowContentLineIndent);\n }\n return result;\n };\n TextModel.prototype._getIndentLevelForWhitespaceLine = function (offSide, aboveContentLineIndent, belowContentLineIndent) {\n if (aboveContentLineIndent === -1 || belowContentLineIndent === -1) {\n // At the top or bottom of the file\n return 0;\n }\n else if (aboveContentLineIndent < belowContentLineIndent) {\n // we are inside the region above\n return (1 + Math.floor(aboveContentLineIndent / this._options.tabSize));\n }\n else if (aboveContentLineIndent === belowContentLineIndent) {\n // we are in between two regions\n return Math.ceil(belowContentLineIndent / this._options.tabSize);\n }\n else {\n if (offSide) {\n // same level as region below\n return Math.ceil(belowContentLineIndent / this._options.tabSize);\n }\n else {\n // we are inside the region that ends below\n return (1 + Math.floor(belowContentLineIndent / this._options.tabSize));\n }\n }\n };\n TextModel.MODEL_SYNC_LIMIT = 50 * 1024 * 1024; // 50 MB\n TextModel.LARGE_FILE_SIZE_THRESHOLD = 20 * 1024 * 1024; // 20 MB;\n TextModel.LARGE_FILE_LINE_COUNT_THRESHOLD = 300 * 1000; // 300K lines\n TextModel.DEFAULT_CREATION_OPTIONS = {\n isForSimpleWidget: false,\n tabSize: EDITOR_MODEL_DEFAULTS.tabSize,\n insertSpaces: EDITOR_MODEL_DEFAULTS.insertSpaces,\n detectIndentation: false,\n defaultEOL: model.DefaultEndOfLine.LF,\n trimAutoWhitespace: EDITOR_MODEL_DEFAULTS.trimAutoWhitespace,\n largeFileOptimizations: EDITOR_MODEL_DEFAULTS.largeFileOptimizations,\n };\n return TextModel;\n}(Disposable));\nexport { TextModel };\n//#region Decorations\nvar DecorationsTrees = /** @class */ (function () {\n function DecorationsTrees() {\n this._decorationsTree0 = new IntervalTree();\n this._decorationsTree1 = new IntervalTree();\n }\n DecorationsTrees.prototype.intervalSearch = function (start, end, filterOwnerId, filterOutValidation, cachedVersionId) {\n var r0 = this._decorationsTree0.intervalSearch(start, end, filterOwnerId, filterOutValidation, cachedVersionId);\n var r1 = this._decorationsTree1.intervalSearch(start, end, filterOwnerId, filterOutValidation, cachedVersionId);\n return r0.concat(r1);\n };\n DecorationsTrees.prototype.search = function (filterOwnerId, filterOutValidation, overviewRulerOnly, cachedVersionId) {\n if (overviewRulerOnly) {\n return this._decorationsTree1.search(filterOwnerId, filterOutValidation, cachedVersionId);\n }\n else {\n var r0 = this._decorationsTree0.search(filterOwnerId, filterOutValidation, cachedVersionId);\n var r1 = this._decorationsTree1.search(filterOwnerId, filterOutValidation, cachedVersionId);\n return r0.concat(r1);\n }\n };\n DecorationsTrees.prototype.collectNodesFromOwner = function (ownerId) {\n var r0 = this._decorationsTree0.collectNodesFromOwner(ownerId);\n var r1 = this._decorationsTree1.collectNodesFromOwner(ownerId);\n return r0.concat(r1);\n };\n DecorationsTrees.prototype.collectNodesPostOrder = function () {\n var r0 = this._decorationsTree0.collectNodesPostOrder();\n var r1 = this._decorationsTree1.collectNodesPostOrder();\n return r0.concat(r1);\n };\n DecorationsTrees.prototype.insert = function (node) {\n if (getNodeIsInOverviewRuler(node)) {\n this._decorationsTree1.insert(node);\n }\n else {\n this._decorationsTree0.insert(node);\n }\n };\n DecorationsTrees.prototype.delete = function (node) {\n if (getNodeIsInOverviewRuler(node)) {\n this._decorationsTree1.delete(node);\n }\n else {\n this._decorationsTree0.delete(node);\n }\n };\n DecorationsTrees.prototype.resolveNode = function (node, cachedVersionId) {\n if (getNodeIsInOverviewRuler(node)) {\n this._decorationsTree1.resolveNode(node, cachedVersionId);\n }\n else {\n this._decorationsTree0.resolveNode(node, cachedVersionId);\n }\n };\n DecorationsTrees.prototype.acceptReplace = function (offset, length, textLength, forceMoveMarkers) {\n this._decorationsTree0.acceptReplace(offset, length, textLength, forceMoveMarkers);\n this._decorationsTree1.acceptReplace(offset, length, textLength, forceMoveMarkers);\n };\n return DecorationsTrees;\n}());\nfunction cleanClassName(className) {\n return className.replace(/[^a-z0-9\\-_]/gi, ' ');\n}\nvar ModelDecorationOverviewRulerOptions = /** @class */ (function () {\n function ModelDecorationOverviewRulerOptions(options) {\n this.color = strings.empty;\n this.darkColor = strings.empty;\n this.hcColor = strings.empty;\n this.position = model.OverviewRulerLane.Center;\n this._resolvedColor = null;\n if (options && options.color) {\n this.color = options.color;\n }\n if (options && options.darkColor) {\n this.darkColor = options.darkColor;\n this.hcColor = options.darkColor;\n }\n if (options && options.hcColor) {\n this.hcColor = options.hcColor;\n }\n if (options && options.hasOwnProperty('position')) {\n this.position = options.position;\n }\n }\n return ModelDecorationOverviewRulerOptions;\n}());\nexport { ModelDecorationOverviewRulerOptions };\nvar ModelDecorationOptions = /** @class */ (function () {\n function ModelDecorationOptions(options) {\n this.stickiness = options.stickiness || model.TrackedRangeStickiness.AlwaysGrowsWhenTypingAtEdges;\n this.zIndex = options.zIndex || 0;\n this.className = options.className ? cleanClassName(options.className) : strings.empty;\n this.hoverMessage = options.hoverMessage || [];\n this.glyphMarginHoverMessage = options.glyphMarginHoverMessage || [];\n this.isWholeLine = options.isWholeLine || false;\n this.showIfCollapsed = options.showIfCollapsed || false;\n this.overviewRuler = new ModelDecorationOverviewRulerOptions(options.overviewRuler);\n this.glyphMarginClassName = options.glyphMarginClassName ? cleanClassName(options.glyphMarginClassName) : strings.empty;\n this.linesDecorationsClassName = options.linesDecorationsClassName ? cleanClassName(options.linesDecorationsClassName) : strings.empty;\n this.marginClassName = options.marginClassName ? cleanClassName(options.marginClassName) : strings.empty;\n this.inlineClassName = options.inlineClassName ? cleanClassName(options.inlineClassName) : strings.empty;\n this.inlineClassNameAffectsLetterSpacing = options.inlineClassNameAffectsLetterSpacing || false;\n this.beforeContentClassName = options.beforeContentClassName ? cleanClassName(options.beforeContentClassName) : strings.empty;\n this.afterContentClassName = options.afterContentClassName ? cleanClassName(options.afterContentClassName) : strings.empty;\n }\n ModelDecorationOptions.register = function (options) {\n return new ModelDecorationOptions(options);\n };\n ModelDecorationOptions.createDynamic = function (options) {\n return new ModelDecorationOptions(options);\n };\n return ModelDecorationOptions;\n}());\nexport { ModelDecorationOptions };\nModelDecorationOptions.EMPTY = ModelDecorationOptions.register({});\n/**\n * The order carefully matches the values of the enum.\n */\nvar TRACKED_RANGE_OPTIONS = [\n ModelDecorationOptions.register({ stickiness: model.TrackedRangeStickiness.AlwaysGrowsWhenTypingAtEdges }),\n ModelDecorationOptions.register({ stickiness: model.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges }),\n ModelDecorationOptions.register({ stickiness: model.TrackedRangeStickiness.GrowsOnlyWhenTypingBefore }),\n ModelDecorationOptions.register({ stickiness: model.TrackedRangeStickiness.GrowsOnlyWhenTypingAfter }),\n];\nfunction _normalizeOptions(options) {\n if (options instanceof ModelDecorationOptions) {\n return options;\n }\n return ModelDecorationOptions.createDynamic(options);\n}\nvar DidChangeDecorationsEmitter = /** @class */ (function (_super) {\n __extends(DidChangeDecorationsEmitter, _super);\n function DidChangeDecorationsEmitter() {\n var _this = _super.call(this) || this;\n _this._actual = _this._register(new Emitter());\n _this.event = _this._actual.event;\n _this._deferredCnt = 0;\n _this._shouldFire = false;\n return _this;\n }\n DidChangeDecorationsEmitter.prototype.beginDeferredEmit = function () {\n this._deferredCnt++;\n };\n DidChangeDecorationsEmitter.prototype.endDeferredEmit = function () {\n this._deferredCnt--;\n if (this._deferredCnt === 0) {\n if (this._shouldFire) {\n this._shouldFire = false;\n this._actual.fire({});\n }\n }\n };\n DidChangeDecorationsEmitter.prototype.fire = function () {\n this._shouldFire = true;\n };\n return DidChangeDecorationsEmitter;\n}(Disposable));\nexport { DidChangeDecorationsEmitter };\n//#endregion\nvar DidChangeContentEmitter = /** @class */ (function (_super) {\n __extends(DidChangeContentEmitter, _super);\n function DidChangeContentEmitter() {\n var _this = _super.call(this) || this;\n /**\n * Both `fastEvent` and `slowEvent` work the same way and contain the same events, but first we invoke `fastEvent` and then `slowEvent`.\n */\n _this._fastEmitter = _this._register(new Emitter());\n _this.fastEvent = _this._fastEmitter.event;\n _this._slowEmitter = _this._register(new Emitter());\n _this.slowEvent = _this._slowEmitter.event;\n _this._deferredCnt = 0;\n _this._deferredEvent = null;\n return _this;\n }\n DidChangeContentEmitter.prototype.beginDeferredEmit = function () {\n this._deferredCnt++;\n };\n DidChangeContentEmitter.prototype.endDeferredEmit = function () {\n this._deferredCnt--;\n if (this._deferredCnt === 0) {\n if (this._deferredEvent !== null) {\n var e = this._deferredEvent;\n this._deferredEvent = null;\n this._fastEmitter.fire(e);\n this._slowEmitter.fire(e);\n }\n }\n };\n DidChangeContentEmitter.prototype.fire = function (e) {\n if (this._deferredCnt > 0) {\n if (this._deferredEvent) {\n this._deferredEvent = this._deferredEvent.merge(e);\n }\n else {\n this._deferredEvent = e;\n }\n return;\n }\n this._fastEmitter.fire(e);\n this._slowEmitter.fire(e);\n };\n return DidChangeContentEmitter;\n}(Disposable));\nexport { DidChangeContentEmitter };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport { Range } from '../../core/range';\nimport * as strings from '../../../../base/common/strings';\nimport { PieceTreeBase } from './pieceTreeBase';\nimport { EndOfLinePreference, ApplyEditsResult } from '../../model';\nvar PieceTreeTextBuffer = /** @class */ (function () {\n function PieceTreeTextBuffer(chunks, BOM, eol, containsRTL, isBasicASCII, eolNormalized) {\n this._BOM = BOM;\n this._mightContainNonBasicASCII = !isBasicASCII;\n this._mightContainRTL = containsRTL;\n this._pieceTree = new PieceTreeBase(chunks, eol, eolNormalized);\n }\n PieceTreeTextBuffer.prototype.mightContainRTL = function () {\n return this._mightContainRTL;\n };\n PieceTreeTextBuffer.prototype.mightContainNonBasicASCII = function () {\n return this._mightContainNonBasicASCII;\n };\n PieceTreeTextBuffer.prototype.getBOM = function () {\n return this._BOM;\n };\n PieceTreeTextBuffer.prototype.getEOL = function () {\n return this._pieceTree.getEOL();\n };\n PieceTreeTextBuffer.prototype.getOffsetAt = function (lineNumber, column) {\n return this._pieceTree.getOffsetAt(lineNumber, column);\n };\n PieceTreeTextBuffer.prototype.getPositionAt = function (offset) {\n return this._pieceTree.getPositionAt(offset);\n };\n PieceTreeTextBuffer.prototype.getRangeAt = function (start, length) {\n var end = start + length;\n var startPosition = this.getPositionAt(start);\n var endPosition = this.getPositionAt(end);\n return new Range(startPosition.lineNumber, startPosition.column, endPosition.lineNumber, endPosition.column);\n };\n PieceTreeTextBuffer.prototype.getValueInRange = function (range, eol) {\n if (eol === void 0) { eol = EndOfLinePreference.TextDefined; }\n if (range.isEmpty()) {\n return '';\n }\n var lineEnding = this._getEndOfLine(eol);\n return this._pieceTree.getValueInRange(range, lineEnding);\n };\n PieceTreeTextBuffer.prototype.getValueLengthInRange = function (range, eol) {\n if (eol === void 0) { eol = EndOfLinePreference.TextDefined; }\n if (range.isEmpty()) {\n return 0;\n }\n if (range.startLineNumber === range.endLineNumber) {\n return (range.endColumn - range.startColumn);\n }\n var startOffset = this.getOffsetAt(range.startLineNumber, range.startColumn);\n var endOffset = this.getOffsetAt(range.endLineNumber, range.endColumn);\n return endOffset - startOffset;\n };\n PieceTreeTextBuffer.prototype.getLength = function () {\n return this._pieceTree.getLength();\n };\n PieceTreeTextBuffer.prototype.getLineCount = function () {\n return this._pieceTree.getLineCount();\n };\n PieceTreeTextBuffer.prototype.getLinesContent = function () {\n return this._pieceTree.getLinesContent();\n };\n PieceTreeTextBuffer.prototype.getLineContent = function (lineNumber) {\n return this._pieceTree.getLineContent(lineNumber);\n };\n PieceTreeTextBuffer.prototype.getLineCharCode = function (lineNumber, index) {\n return this._pieceTree.getLineCharCode(lineNumber, index);\n };\n PieceTreeTextBuffer.prototype.getLineLength = function (lineNumber) {\n return this._pieceTree.getLineLength(lineNumber);\n };\n PieceTreeTextBuffer.prototype.getLineFirstNonWhitespaceColumn = function (lineNumber) {\n var result = strings.firstNonWhitespaceIndex(this.getLineContent(lineNumber));\n if (result === -1) {\n return 0;\n }\n return result + 1;\n };\n PieceTreeTextBuffer.prototype.getLineLastNonWhitespaceColumn = function (lineNumber) {\n var result = strings.lastNonWhitespaceIndex(this.getLineContent(lineNumber));\n if (result === -1) {\n return 0;\n }\n return result + 2;\n };\n PieceTreeTextBuffer.prototype._getEndOfLine = function (eol) {\n switch (eol) {\n case EndOfLinePreference.LF:\n return '\\n';\n case EndOfLinePreference.CRLF:\n return '\\r\\n';\n case EndOfLinePreference.TextDefined:\n return this.getEOL();\n }\n throw new Error('Unknown EOL preference');\n };\n PieceTreeTextBuffer.prototype.setEOL = function (newEOL) {\n this._pieceTree.setEOL(newEOL);\n };\n PieceTreeTextBuffer.prototype.applyEdits = function (rawOperations, recordTrimAutoWhitespace) {\n var mightContainRTL = this._mightContainRTL;\n var mightContainNonBasicASCII = this._mightContainNonBasicASCII;\n var canReduceOperations = true;\n var operations = [];\n for (var i = 0; i < rawOperations.length; i++) {\n var op = rawOperations[i];\n if (canReduceOperations && op._isTracked) {\n canReduceOperations = false;\n }\n var validatedRange = op.range;\n if (!mightContainRTL && op.text) {\n // check if the new inserted text contains RTL\n mightContainRTL = strings.containsRTL(op.text);\n }\n if (!mightContainNonBasicASCII && op.text) {\n mightContainNonBasicASCII = !strings.isBasicASCII(op.text);\n }\n operations[i] = {\n sortIndex: i,\n identifier: op.identifier,\n range: validatedRange,\n rangeOffset: this.getOffsetAt(validatedRange.startLineNumber, validatedRange.startColumn),\n rangeLength: this.getValueLengthInRange(validatedRange),\n lines: op.text ? op.text.split(/\\r\\n|\\r|\\n/) : null,\n forceMoveMarkers: op.forceMoveMarkers,\n isAutoWhitespaceEdit: op.isAutoWhitespaceEdit || false\n };\n }\n // Sort operations ascending\n operations.sort(PieceTreeTextBuffer._sortOpsAscending);\n var hasTouchingRanges = false;\n for (var i = 0, count = operations.length - 1; i < count; i++) {\n var rangeEnd = operations[i].range.getEndPosition();\n var nextRangeStart = operations[i + 1].range.getStartPosition();\n if (nextRangeStart.isBeforeOrEqual(rangeEnd)) {\n if (nextRangeStart.isBefore(rangeEnd)) {\n // overlapping ranges\n throw new Error('Overlapping ranges are not allowed!');\n }\n hasTouchingRanges = true;\n }\n }\n if (canReduceOperations) {\n operations = this._reduceOperations(operations);\n }\n // Delta encode operations\n var reverseRanges = PieceTreeTextBuffer._getInverseEditRanges(operations);\n var newTrimAutoWhitespaceCandidates = [];\n for (var i = 0; i < operations.length; i++) {\n var op = operations[i];\n var reverseRange = reverseRanges[i];\n if (recordTrimAutoWhitespace && op.isAutoWhitespaceEdit && op.range.isEmpty()) {\n // Record already the future line numbers that might be auto whitespace removal candidates on next edit\n for (var lineNumber = reverseRange.startLineNumber; lineNumber <= reverseRange.endLineNumber; lineNumber++) {\n var currentLineContent = '';\n if (lineNumber === reverseRange.startLineNumber) {\n currentLineContent = this.getLineContent(op.range.startLineNumber);\n if (strings.firstNonWhitespaceIndex(currentLineContent) !== -1) {\n continue;\n }\n }\n newTrimAutoWhitespaceCandidates.push({ lineNumber: lineNumber, oldContent: currentLineContent });\n }\n }\n }\n var reverseOperations = [];\n for (var i = 0; i < operations.length; i++) {\n var op = operations[i];\n var reverseRange = reverseRanges[i];\n reverseOperations[i] = {\n sortIndex: op.sortIndex,\n identifier: op.identifier,\n range: reverseRange,\n text: this.getValueInRange(op.range),\n forceMoveMarkers: op.forceMoveMarkers\n };\n }\n // Can only sort reverse operations when the order is not significant\n if (!hasTouchingRanges) {\n reverseOperations.sort(function (a, b) { return a.sortIndex - b.sortIndex; });\n }\n this._mightContainRTL = mightContainRTL;\n this._mightContainNonBasicASCII = mightContainNonBasicASCII;\n var contentChanges = this._doApplyEdits(operations);\n var trimAutoWhitespaceLineNumbers = null;\n if (recordTrimAutoWhitespace && newTrimAutoWhitespaceCandidates.length > 0) {\n // sort line numbers auto whitespace removal candidates for next edit descending\n newTrimAutoWhitespaceCandidates.sort(function (a, b) { return b.lineNumber - a.lineNumber; });\n trimAutoWhitespaceLineNumbers = [];\n for (var i = 0, len = newTrimAutoWhitespaceCandidates.length; i < len; i++) {\n var lineNumber = newTrimAutoWhitespaceCandidates[i].lineNumber;\n if (i > 0 && newTrimAutoWhitespaceCandidates[i - 1].lineNumber === lineNumber) {\n // Do not have the same line number twice\n continue;\n }\n var prevContent = newTrimAutoWhitespaceCandidates[i].oldContent;\n var lineContent = this.getLineContent(lineNumber);\n if (lineContent.length === 0 || lineContent === prevContent || strings.firstNonWhitespaceIndex(lineContent) !== -1) {\n continue;\n }\n trimAutoWhitespaceLineNumbers.push(lineNumber);\n }\n }\n return new ApplyEditsResult(reverseOperations, contentChanges, trimAutoWhitespaceLineNumbers);\n };\n /**\n * Transform operations such that they represent the same logic edit,\n * but that they also do not cause OOM crashes.\n */\n PieceTreeTextBuffer.prototype._reduceOperations = function (operations) {\n if (operations.length < 1000) {\n // We know from empirical testing that a thousand edits work fine regardless of their shape.\n return operations;\n }\n // At one point, due to how events are emitted and how each operation is handled,\n // some operations can trigger a high ammount of temporary string allocations,\n // that will immediately get edited again.\n // e.g. a formatter inserting ridiculous ammounts of \\n on a model with a single line\n // Therefore, the strategy is to collapse all the operations into a huge single edit operation\n return [this._toSingleEditOperation(operations)];\n };\n PieceTreeTextBuffer.prototype._toSingleEditOperation = function (operations) {\n var forceMoveMarkers = false, firstEditRange = operations[0].range, lastEditRange = operations[operations.length - 1].range, entireEditRange = new Range(firstEditRange.startLineNumber, firstEditRange.startColumn, lastEditRange.endLineNumber, lastEditRange.endColumn), lastEndLineNumber = firstEditRange.startLineNumber, lastEndColumn = firstEditRange.startColumn, result = [];\n for (var i = 0, len = operations.length; i < len; i++) {\n var operation = operations[i], range = operation.range;\n forceMoveMarkers = forceMoveMarkers || operation.forceMoveMarkers;\n // (1) -- Push old text\n for (var lineNumber = lastEndLineNumber; lineNumber < range.startLineNumber; lineNumber++) {\n if (lineNumber === lastEndLineNumber) {\n result.push(this.getLineContent(lineNumber).substring(lastEndColumn - 1));\n }\n else {\n result.push('\\n');\n result.push(this.getLineContent(lineNumber));\n }\n }\n if (range.startLineNumber === lastEndLineNumber) {\n result.push(this.getLineContent(range.startLineNumber).substring(lastEndColumn - 1, range.startColumn - 1));\n }\n else {\n result.push('\\n');\n result.push(this.getLineContent(range.startLineNumber).substring(0, range.startColumn - 1));\n }\n // (2) -- Push new text\n if (operation.lines) {\n for (var j = 0, lenJ = operation.lines.length; j < lenJ; j++) {\n if (j !== 0) {\n result.push('\\n');\n }\n result.push(operation.lines[j]);\n }\n }\n lastEndLineNumber = operation.range.endLineNumber;\n lastEndColumn = operation.range.endColumn;\n }\n return {\n sortIndex: 0,\n identifier: operations[0].identifier,\n range: entireEditRange,\n rangeOffset: this.getOffsetAt(entireEditRange.startLineNumber, entireEditRange.startColumn),\n rangeLength: this.getValueLengthInRange(entireEditRange, EndOfLinePreference.TextDefined),\n lines: result.join('').split('\\n'),\n forceMoveMarkers: forceMoveMarkers,\n isAutoWhitespaceEdit: false\n };\n };\n PieceTreeTextBuffer.prototype._doApplyEdits = function (operations) {\n operations.sort(PieceTreeTextBuffer._sortOpsDescending);\n var contentChanges = [];\n // operations are from bottom to top\n for (var i = 0; i < operations.length; i++) {\n var op = operations[i];\n var startLineNumber = op.range.startLineNumber;\n var startColumn = op.range.startColumn;\n var endLineNumber = op.range.endLineNumber;\n var endColumn = op.range.endColumn;\n if (startLineNumber === endLineNumber && startColumn === endColumn && (!op.lines || op.lines.length === 0)) {\n // no-op\n continue;\n }\n var deletingLinesCnt = endLineNumber - startLineNumber;\n var insertingLinesCnt = (op.lines ? op.lines.length - 1 : 0);\n var editingLinesCnt = Math.min(deletingLinesCnt, insertingLinesCnt);\n var text = (op.lines ? op.lines.join(this.getEOL()) : '');\n if (text) {\n // replacement\n this._pieceTree.delete(op.rangeOffset, op.rangeLength);\n this._pieceTree.insert(op.rangeOffset, text, true);\n }\n else {\n // deletion\n this._pieceTree.delete(op.rangeOffset, op.rangeLength);\n }\n if (editingLinesCnt < insertingLinesCnt) {\n var newLinesContent = [];\n for (var j = editingLinesCnt + 1; j <= insertingLinesCnt; j++) {\n newLinesContent.push(op.lines[j]);\n }\n newLinesContent[newLinesContent.length - 1] = this.getLineContent(startLineNumber + insertingLinesCnt - 1);\n }\n var contentChangeRange = new Range(startLineNumber, startColumn, endLineNumber, endColumn);\n contentChanges.push({\n range: contentChangeRange,\n rangeLength: op.rangeLength,\n text: text,\n rangeOffset: op.rangeOffset,\n forceMoveMarkers: op.forceMoveMarkers\n });\n }\n return contentChanges;\n };\n PieceTreeTextBuffer.prototype.findMatchesLineByLine = function (searchRange, searchData, captureMatches, limitResultCount) {\n return this._pieceTree.findMatchesLineByLine(searchRange, searchData, captureMatches, limitResultCount);\n };\n /**\n * Assumes `operations` are validated and sorted ascending\n */\n PieceTreeTextBuffer._getInverseEditRanges = function (operations) {\n var result = [];\n var prevOpEndLineNumber;\n var prevOpEndColumn;\n var prevOp = null;\n for (var i = 0, len = operations.length; i < len; i++) {\n var op = operations[i];\n var startLineNumber = void 0;\n var startColumn = void 0;\n if (prevOp) {\n if (prevOp.range.endLineNumber === op.range.startLineNumber) {\n startLineNumber = prevOpEndLineNumber;\n startColumn = prevOpEndColumn + (op.range.startColumn - prevOp.range.endColumn);\n }\n else {\n startLineNumber = prevOpEndLineNumber + (op.range.startLineNumber - prevOp.range.endLineNumber);\n startColumn = op.range.startColumn;\n }\n }\n else {\n startLineNumber = op.range.startLineNumber;\n startColumn = op.range.startColumn;\n }\n var resultRange = void 0;\n if (op.lines && op.lines.length > 0) {\n // the operation inserts something\n var lineCount = op.lines.length;\n var firstLine = op.lines[0];\n var lastLine = op.lines[lineCount - 1];\n if (lineCount === 1) {\n // single line insert\n resultRange = new Range(startLineNumber, startColumn, startLineNumber, startColumn + firstLine.length);\n }\n else {\n // multi line insert\n resultRange = new Range(startLineNumber, startColumn, startLineNumber + lineCount - 1, lastLine.length + 1);\n }\n }\n else {\n // There is nothing to insert\n resultRange = new Range(startLineNumber, startColumn, startLineNumber, startColumn);\n }\n prevOpEndLineNumber = resultRange.endLineNumber;\n prevOpEndColumn = resultRange.endColumn;\n result.push(resultRange);\n prevOp = op;\n }\n return result;\n };\n PieceTreeTextBuffer._sortOpsAscending = function (a, b) {\n var r = Range.compareRangesUsingEnds(a.range, b.range);\n if (r === 0) {\n return a.sortIndex - b.sortIndex;\n }\n return r;\n };\n PieceTreeTextBuffer._sortOpsDescending = function (a, b) {\n var r = Range.compareRangesUsingEnds(a.range, b.range);\n if (r === 0) {\n return b.sortIndex - a.sortIndex;\n }\n return -r;\n };\n return PieceTreeTextBuffer;\n}());\nexport { PieceTreeTextBuffer };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport * as strings from '../../../../base/common/strings';\nimport { DefaultEndOfLine } from '../../model';\nimport { PieceTreeTextBuffer } from './pieceTreeTextBuffer';\nimport { StringBuffer, createLineStarts, createLineStartsFast } from './pieceTreeBase';\nvar PieceTreeTextBufferFactory = /** @class */ (function () {\n function PieceTreeTextBufferFactory(_chunks, _bom, _cr, _lf, _crlf, _containsRTL, _isBasicASCII, _normalizeEOL) {\n this._chunks = _chunks;\n this._bom = _bom;\n this._cr = _cr;\n this._lf = _lf;\n this._crlf = _crlf;\n this._containsRTL = _containsRTL;\n this._isBasicASCII = _isBasicASCII;\n this._normalizeEOL = _normalizeEOL;\n }\n PieceTreeTextBufferFactory.prototype._getEOL = function (defaultEOL) {\n var totalEOLCount = this._cr + this._lf + this._crlf;\n var totalCRCount = this._cr + this._crlf;\n if (totalEOLCount === 0) {\n // This is an empty file or a file with precisely one line\n return (defaultEOL === DefaultEndOfLine.LF ? '\\n' : '\\r\\n');\n }\n if (totalCRCount > totalEOLCount / 2) {\n // More than half of the file contains \\r\\n ending lines\n return '\\r\\n';\n }\n // At least one line more ends in \\n\n return '\\n';\n };\n PieceTreeTextBufferFactory.prototype.create = function (defaultEOL) {\n var eol = this._getEOL(defaultEOL);\n var chunks = this._chunks;\n if (this._normalizeEOL &&\n ((eol === '\\r\\n' && (this._cr > 0 || this._lf > 0))\n || (eol === '\\n' && (this._cr > 0 || this._crlf > 0)))) {\n // Normalize pieces\n for (var i = 0, len = chunks.length; i < len; i++) {\n var str = chunks[i].buffer.replace(/\\r\\n|\\r|\\n/g, eol);\n var newLineStart = createLineStartsFast(str);\n chunks[i] = new StringBuffer(str, newLineStart);\n }\n }\n return new PieceTreeTextBuffer(chunks, this._bom, eol, this._containsRTL, this._isBasicASCII, this._normalizeEOL);\n };\n return PieceTreeTextBufferFactory;\n}());\nexport { PieceTreeTextBufferFactory };\nvar PieceTreeTextBufferBuilder = /** @class */ (function () {\n function PieceTreeTextBufferBuilder() {\n this.chunks = [];\n this.BOM = '';\n this._hasPreviousChar = false;\n this._previousChar = 0;\n this._tmpLineStarts = [];\n this.cr = 0;\n this.lf = 0;\n this.crlf = 0;\n this.containsRTL = false;\n this.isBasicASCII = true;\n }\n PieceTreeTextBufferBuilder.prototype.acceptChunk = function (chunk) {\n if (chunk.length === 0) {\n return;\n }\n if (this.chunks.length === 0) {\n if (strings.startsWithUTF8BOM(chunk)) {\n this.BOM = strings.UTF8_BOM_CHARACTER;\n chunk = chunk.substr(1);\n }\n }\n var lastChar = chunk.charCodeAt(chunk.length - 1);\n if (lastChar === 13 /* CarriageReturn */ || (lastChar >= 0xd800 && lastChar <= 0xdbff)) {\n // last character is \\r or a high surrogate => keep it back\n this._acceptChunk1(chunk.substr(0, chunk.length - 1), false);\n this._hasPreviousChar = true;\n this._previousChar = lastChar;\n }\n else {\n this._acceptChunk1(chunk, false);\n this._hasPreviousChar = false;\n this._previousChar = lastChar;\n }\n };\n PieceTreeTextBufferBuilder.prototype._acceptChunk1 = function (chunk, allowEmptyStrings) {\n if (!allowEmptyStrings && chunk.length === 0) {\n // Nothing to do\n return;\n }\n if (this._hasPreviousChar) {\n this._acceptChunk2(String.fromCharCode(this._previousChar) + chunk);\n }\n else {\n this._acceptChunk2(chunk);\n }\n };\n PieceTreeTextBufferBuilder.prototype._acceptChunk2 = function (chunk) {\n var lineStarts = createLineStarts(this._tmpLineStarts, chunk);\n this.chunks.push(new StringBuffer(chunk, lineStarts.lineStarts));\n this.cr += lineStarts.cr;\n this.lf += lineStarts.lf;\n this.crlf += lineStarts.crlf;\n if (this.isBasicASCII) {\n this.isBasicASCII = lineStarts.isBasicASCII;\n }\n if (!this.isBasicASCII && !this.containsRTL) {\n // No need to check if is basic ASCII\n this.containsRTL = strings.containsRTL(chunk);\n }\n };\n PieceTreeTextBufferBuilder.prototype.finish = function (normalizeEOL) {\n if (normalizeEOL === void 0) { normalizeEOL = true; }\n this._finish();\n return new PieceTreeTextBufferFactory(this.chunks, this.BOM, this.cr, this.lf, this.crlf, this.containsRTL, this.isBasicASCII, normalizeEOL);\n };\n PieceTreeTextBufferBuilder.prototype._finish = function () {\n if (this.chunks.length === 0) {\n this._acceptChunk1('', true);\n }\n if (this._hasPreviousChar) {\n this._hasPreviousChar = false;\n // recreate last chunk\n var lastChunk = this.chunks[this.chunks.length - 1];\n lastChunk.buffer += String.fromCharCode(this._previousChar);\n var newLineStarts = createLineStartsFast(lastChunk.buffer);\n lastChunk.lineStarts = newLineStarts;\n if (this._previousChar === 13 /* CarriageReturn */) {\n this.cr++;\n }\n }\n };\n return PieceTreeTextBufferBuilder;\n}());\nexport { PieceTreeTextBufferBuilder };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport * as strings from '../../../base/common/strings';\nimport { Position } from '../core/position';\nimport { Range } from '../core/range';\nimport { FindMatch, EndOfLinePreference } from '../model';\nimport { getMapForWordSeparators } from '../controller/wordCharacterClassifier';\nvar LIMIT_FIND_COUNT = 999;\nvar SearchParams = /** @class */ (function () {\n function SearchParams(searchString, isRegex, matchCase, wordSeparators) {\n this.searchString = searchString;\n this.isRegex = isRegex;\n this.matchCase = matchCase;\n this.wordSeparators = wordSeparators;\n }\n SearchParams._isMultilineRegexSource = function (searchString) {\n if (!searchString || searchString.length === 0) {\n return false;\n }\n for (var i = 0, len = searchString.length; i < len; i++) {\n var chCode = searchString.charCodeAt(i);\n if (chCode === 92 /* Backslash */) {\n // move to next char\n i++;\n if (i >= len) {\n // string ends with a \\\n break;\n }\n var nextChCode = searchString.charCodeAt(i);\n if (nextChCode === 110 /* n */ || nextChCode === 114 /* r */) {\n return true;\n }\n }\n }\n return false;\n };\n SearchParams.prototype.parseSearchRequest = function () {\n if (this.searchString === '') {\n return null;\n }\n // Try to create a RegExp out of the params\n var multiline;\n if (this.isRegex) {\n multiline = SearchParams._isMultilineRegexSource(this.searchString);\n }\n else {\n multiline = (this.searchString.indexOf('\\n') >= 0);\n }\n var regex = null;\n try {\n regex = strings.createRegExp(this.searchString, this.isRegex, {\n matchCase: this.matchCase,\n wholeWord: false,\n multiline: multiline,\n global: true\n });\n }\n catch (err) {\n return null;\n }\n if (!regex) {\n return null;\n }\n var canUseSimpleSearch = (!this.isRegex && !multiline);\n if (canUseSimpleSearch && this.searchString.toLowerCase() !== this.searchString.toUpperCase()) {\n // casing might make a difference\n canUseSimpleSearch = this.matchCase;\n }\n return new SearchData(regex, this.wordSeparators ? getMapForWordSeparators(this.wordSeparators) : null, canUseSimpleSearch ? this.searchString : null);\n };\n return SearchParams;\n}());\nexport { SearchParams };\nvar SearchData = /** @class */ (function () {\n function SearchData(regex, wordSeparators, simpleSearch) {\n this.regex = regex;\n this.wordSeparators = wordSeparators;\n this.simpleSearch = simpleSearch;\n }\n return SearchData;\n}());\nexport { SearchData };\nexport function createFindMatch(range, rawMatches, captureMatches) {\n if (!captureMatches) {\n return new FindMatch(range, null);\n }\n var matches = [];\n for (var i = 0, len = rawMatches.length; i < len; i++) {\n matches[i] = rawMatches[i];\n }\n return new FindMatch(range, matches);\n}\nvar LineFeedCounter = /** @class */ (function () {\n function LineFeedCounter(text) {\n var lineFeedsOffsets = [];\n var lineFeedsOffsetsLen = 0;\n for (var i = 0, textLen = text.length; i < textLen; i++) {\n if (text.charCodeAt(i) === 10 /* LineFeed */) {\n lineFeedsOffsets[lineFeedsOffsetsLen++] = i;\n }\n }\n this._lineFeedsOffsets = lineFeedsOffsets;\n }\n LineFeedCounter.prototype.findLineFeedCountBeforeOffset = function (offset) {\n var lineFeedsOffsets = this._lineFeedsOffsets;\n var min = 0;\n var max = lineFeedsOffsets.length - 1;\n if (max === -1) {\n // no line feeds\n return 0;\n }\n if (offset <= lineFeedsOffsets[0]) {\n // before first line feed\n return 0;\n }\n while (min < max) {\n var mid = min + ((max - min) / 2 >> 0);\n if (lineFeedsOffsets[mid] >= offset) {\n max = mid - 1;\n }\n else {\n if (lineFeedsOffsets[mid + 1] >= offset) {\n // bingo!\n min = mid;\n max = mid;\n }\n else {\n min = mid + 1;\n }\n }\n }\n return min + 1;\n };\n return LineFeedCounter;\n}());\nvar TextModelSearch = /** @class */ (function () {\n function TextModelSearch() {\n }\n TextModelSearch.findMatches = function (model, searchParams, searchRange, captureMatches, limitResultCount) {\n var searchData = searchParams.parseSearchRequest();\n if (!searchData) {\n return [];\n }\n if (searchData.regex.multiline) {\n return this._doFindMatchesMultiline(model, searchRange, new Searcher(searchData.wordSeparators, searchData.regex), captureMatches, limitResultCount);\n }\n return this._doFindMatchesLineByLine(model, searchRange, searchData, captureMatches, limitResultCount);\n };\n /**\n * Multiline search always executes on the lines concatenated with \\n.\n * We must therefore compensate for the count of \\n in case the model is CRLF\n */\n TextModelSearch._getMultilineMatchRange = function (model, deltaOffset, text, lfCounter, matchIndex, match0) {\n var startOffset;\n var lineFeedCountBeforeMatch = 0;\n if (model.getEOL() === '\\r\\n') {\n lineFeedCountBeforeMatch = lfCounter.findLineFeedCountBeforeOffset(matchIndex);\n startOffset = deltaOffset + matchIndex + lineFeedCountBeforeMatch /* add as many \\r as there were \\n */;\n }\n else {\n startOffset = deltaOffset + matchIndex;\n }\n var endOffset;\n if (model.getEOL() === '\\r\\n') {\n var lineFeedCountBeforeEndOfMatch = lfCounter.findLineFeedCountBeforeOffset(matchIndex + match0.length);\n var lineFeedCountInMatch = lineFeedCountBeforeEndOfMatch - lineFeedCountBeforeMatch;\n endOffset = startOffset + match0.length + lineFeedCountInMatch /* add as many \\r as there were \\n */;\n }\n else {\n endOffset = startOffset + match0.length;\n }\n var startPosition = model.getPositionAt(startOffset);\n var endPosition = model.getPositionAt(endOffset);\n return new Range(startPosition.lineNumber, startPosition.column, endPosition.lineNumber, endPosition.column);\n };\n TextModelSearch._doFindMatchesMultiline = function (model, searchRange, searcher, captureMatches, limitResultCount) {\n var deltaOffset = model.getOffsetAt(searchRange.getStartPosition());\n // We always execute multiline search over the lines joined with \\n\n // This makes it that \\n will match the EOL for both CRLF and LF models\n // We compensate for offset errors in `_getMultilineMatchRange`\n var text = model.getValueInRange(searchRange, EndOfLinePreference.LF);\n var lfCounter = (model.getEOL() === '\\r\\n' ? new LineFeedCounter(text) : null);\n var result = [];\n var counter = 0;\n var m;\n searcher.reset(0);\n while ((m = searcher.next(text))) {\n result[counter++] = createFindMatch(this._getMultilineMatchRange(model, deltaOffset, text, lfCounter, m.index, m[0]), m, captureMatches);\n if (counter >= limitResultCount) {\n return result;\n }\n }\n return result;\n };\n TextModelSearch._doFindMatchesLineByLine = function (model, searchRange, searchData, captureMatches, limitResultCount) {\n var result = [];\n var resultLen = 0;\n // Early case for a search range that starts & stops on the same line number\n if (searchRange.startLineNumber === searchRange.endLineNumber) {\n var text_1 = model.getLineContent(searchRange.startLineNumber).substring(searchRange.startColumn - 1, searchRange.endColumn - 1);\n resultLen = this._findMatchesInLine(searchData, text_1, searchRange.startLineNumber, searchRange.startColumn - 1, resultLen, result, captureMatches, limitResultCount);\n return result;\n }\n // Collect results from first line\n var text = model.getLineContent(searchRange.startLineNumber).substring(searchRange.startColumn - 1);\n resultLen = this._findMatchesInLine(searchData, text, searchRange.startLineNumber, searchRange.startColumn - 1, resultLen, result, captureMatches, limitResultCount);\n // Collect results from middle lines\n for (var lineNumber = searchRange.startLineNumber + 1; lineNumber < searchRange.endLineNumber && resultLen < limitResultCount; lineNumber++) {\n resultLen = this._findMatchesInLine(searchData, model.getLineContent(lineNumber), lineNumber, 0, resultLen, result, captureMatches, limitResultCount);\n }\n // Collect results from last line\n if (resultLen < limitResultCount) {\n var text_2 = model.getLineContent(searchRange.endLineNumber).substring(0, searchRange.endColumn - 1);\n resultLen = this._findMatchesInLine(searchData, text_2, searchRange.endLineNumber, 0, resultLen, result, captureMatches, limitResultCount);\n }\n return result;\n };\n TextModelSearch._findMatchesInLine = function (searchData, text, lineNumber, deltaOffset, resultLen, result, captureMatches, limitResultCount) {\n var wordSeparators = searchData.wordSeparators;\n if (!captureMatches && searchData.simpleSearch) {\n var searchString = searchData.simpleSearch;\n var searchStringLen = searchString.length;\n var textLength = text.length;\n var lastMatchIndex = -searchStringLen;\n while ((lastMatchIndex = text.indexOf(searchString, lastMatchIndex + searchStringLen)) !== -1) {\n if (!wordSeparators || isValidMatch(wordSeparators, text, textLength, lastMatchIndex, searchStringLen)) {\n result[resultLen++] = new FindMatch(new Range(lineNumber, lastMatchIndex + 1 + deltaOffset, lineNumber, lastMatchIndex + 1 + searchStringLen + deltaOffset), null);\n if (resultLen >= limitResultCount) {\n return resultLen;\n }\n }\n }\n return resultLen;\n }\n var searcher = new Searcher(searchData.wordSeparators, searchData.regex);\n var m;\n // Reset regex to search from the beginning\n searcher.reset(0);\n do {\n m = searcher.next(text);\n if (m) {\n result[resultLen++] = createFindMatch(new Range(lineNumber, m.index + 1 + deltaOffset, lineNumber, m.index + 1 + m[0].length + deltaOffset), m, captureMatches);\n if (resultLen >= limitResultCount) {\n return resultLen;\n }\n }\n } while (m);\n return resultLen;\n };\n TextModelSearch.findNextMatch = function (model, searchParams, searchStart, captureMatches) {\n var searchData = searchParams.parseSearchRequest();\n if (!searchData) {\n return null;\n }\n var searcher = new Searcher(searchData.wordSeparators, searchData.regex);\n if (searchData.regex.multiline) {\n return this._doFindNextMatchMultiline(model, searchStart, searcher, captureMatches);\n }\n return this._doFindNextMatchLineByLine(model, searchStart, searcher, captureMatches);\n };\n TextModelSearch._doFindNextMatchMultiline = function (model, searchStart, searcher, captureMatches) {\n var searchTextStart = new Position(searchStart.lineNumber, 1);\n var deltaOffset = model.getOffsetAt(searchTextStart);\n var lineCount = model.getLineCount();\n // We always execute multiline search over the lines joined with \\n\n // This makes it that \\n will match the EOL for both CRLF and LF models\n // We compensate for offset errors in `_getMultilineMatchRange`\n var text = model.getValueInRange(new Range(searchTextStart.lineNumber, searchTextStart.column, lineCount, model.getLineMaxColumn(lineCount)), EndOfLinePreference.LF);\n var lfCounter = (model.getEOL() === '\\r\\n' ? new LineFeedCounter(text) : null);\n searcher.reset(searchStart.column - 1);\n var m = searcher.next(text);\n if (m) {\n return createFindMatch(this._getMultilineMatchRange(model, deltaOffset, text, lfCounter, m.index, m[0]), m, captureMatches);\n }\n if (searchStart.lineNumber !== 1 || searchStart.column !== 1) {\n // Try again from the top\n return this._doFindNextMatchMultiline(model, new Position(1, 1), searcher, captureMatches);\n }\n return null;\n };\n TextModelSearch._doFindNextMatchLineByLine = function (model, searchStart, searcher, captureMatches) {\n var lineCount = model.getLineCount();\n var startLineNumber = searchStart.lineNumber;\n // Look in first line\n var text = model.getLineContent(startLineNumber);\n var r = this._findFirstMatchInLine(searcher, text, startLineNumber, searchStart.column, captureMatches);\n if (r) {\n return r;\n }\n for (var i = 1; i <= lineCount; i++) {\n var lineIndex = (startLineNumber + i - 1) % lineCount;\n var text_3 = model.getLineContent(lineIndex + 1);\n var r_1 = this._findFirstMatchInLine(searcher, text_3, lineIndex + 1, 1, captureMatches);\n if (r_1) {\n return r_1;\n }\n }\n return null;\n };\n TextModelSearch._findFirstMatchInLine = function (searcher, text, lineNumber, fromColumn, captureMatches) {\n // Set regex to search from column\n searcher.reset(fromColumn - 1);\n var m = searcher.next(text);\n if (m) {\n return createFindMatch(new Range(lineNumber, m.index + 1, lineNumber, m.index + 1 + m[0].length), m, captureMatches);\n }\n return null;\n };\n TextModelSearch.findPreviousMatch = function (model, searchParams, searchStart, captureMatches) {\n var searchData = searchParams.parseSearchRequest();\n if (!searchData) {\n return null;\n }\n var searcher = new Searcher(searchData.wordSeparators, searchData.regex);\n if (searchData.regex.multiline) {\n return this._doFindPreviousMatchMultiline(model, searchStart, searcher, captureMatches);\n }\n return this._doFindPreviousMatchLineByLine(model, searchStart, searcher, captureMatches);\n };\n TextModelSearch._doFindPreviousMatchMultiline = function (model, searchStart, searcher, captureMatches) {\n var matches = this._doFindMatchesMultiline(model, new Range(1, 1, searchStart.lineNumber, searchStart.column), searcher, captureMatches, 10 * LIMIT_FIND_COUNT);\n if (matches.length > 0) {\n return matches[matches.length - 1];\n }\n var lineCount = model.getLineCount();\n if (searchStart.lineNumber !== lineCount || searchStart.column !== model.getLineMaxColumn(lineCount)) {\n // Try again with all content\n return this._doFindPreviousMatchMultiline(model, new Position(lineCount, model.getLineMaxColumn(lineCount)), searcher, captureMatches);\n }\n return null;\n };\n TextModelSearch._doFindPreviousMatchLineByLine = function (model, searchStart, searcher, captureMatches) {\n var lineCount = model.getLineCount();\n var startLineNumber = searchStart.lineNumber;\n // Look in first line\n var text = model.getLineContent(startLineNumber).substring(0, searchStart.column - 1);\n var r = this._findLastMatchInLine(searcher, text, startLineNumber, captureMatches);\n if (r) {\n return r;\n }\n for (var i = 1; i <= lineCount; i++) {\n var lineIndex = (lineCount + startLineNumber - i - 1) % lineCount;\n var text_4 = model.getLineContent(lineIndex + 1);\n var r_2 = this._findLastMatchInLine(searcher, text_4, lineIndex + 1, captureMatches);\n if (r_2) {\n return r_2;\n }\n }\n return null;\n };\n TextModelSearch._findLastMatchInLine = function (searcher, text, lineNumber, captureMatches) {\n var bestResult = null;\n var m;\n searcher.reset(0);\n while ((m = searcher.next(text))) {\n bestResult = createFindMatch(new Range(lineNumber, m.index + 1, lineNumber, m.index + 1 + m[0].length), m, captureMatches);\n }\n return bestResult;\n };\n return TextModelSearch;\n}());\nexport { TextModelSearch };\nfunction leftIsWordBounday(wordSeparators, text, textLength, matchStartIndex, matchLength) {\n if (matchStartIndex === 0) {\n // Match starts at start of string\n return true;\n }\n var charBefore = text.charCodeAt(matchStartIndex - 1);\n if (wordSeparators.get(charBefore) !== 0 /* Regular */) {\n // The character before the match is a word separator\n return true;\n }\n if (charBefore === 13 /* CarriageReturn */ || charBefore === 10 /* LineFeed */) {\n // The character before the match is line break or carriage return.\n return true;\n }\n if (matchLength > 0) {\n var firstCharInMatch = text.charCodeAt(matchStartIndex);\n if (wordSeparators.get(firstCharInMatch) !== 0 /* Regular */) {\n // The first character inside the match is a word separator\n return true;\n }\n }\n return false;\n}\nfunction rightIsWordBounday(wordSeparators, text, textLength, matchStartIndex, matchLength) {\n if (matchStartIndex + matchLength === textLength) {\n // Match ends at end of string\n return true;\n }\n var charAfter = text.charCodeAt(matchStartIndex + matchLength);\n if (wordSeparators.get(charAfter) !== 0 /* Regular */) {\n // The character after the match is a word separator\n return true;\n }\n if (charAfter === 13 /* CarriageReturn */ || charAfter === 10 /* LineFeed */) {\n // The character after the match is line break or carriage return.\n return true;\n }\n if (matchLength > 0) {\n var lastCharInMatch = text.charCodeAt(matchStartIndex + matchLength - 1);\n if (wordSeparators.get(lastCharInMatch) !== 0 /* Regular */) {\n // The last character in the match is a word separator\n return true;\n }\n }\n return false;\n}\nexport function isValidMatch(wordSeparators, text, textLength, matchStartIndex, matchLength) {\n return (leftIsWordBounday(wordSeparators, text, textLength, matchStartIndex, matchLength)\n && rightIsWordBounday(wordSeparators, text, textLength, matchStartIndex, matchLength));\n}\nvar Searcher = /** @class */ (function () {\n function Searcher(wordSeparators, searchRegex) {\n this._wordSeparators = wordSeparators;\n this._searchRegex = searchRegex;\n this._prevMatchStartIndex = -1;\n this._prevMatchLength = 0;\n }\n Searcher.prototype.reset = function (lastIndex) {\n this._searchRegex.lastIndex = lastIndex;\n this._prevMatchStartIndex = -1;\n this._prevMatchLength = 0;\n };\n Searcher.prototype.next = function (text) {\n var textLength = text.length;\n var m;\n do {\n if (this._prevMatchStartIndex + this._prevMatchLength === textLength) {\n // Reached the end of the line\n return null;\n }\n m = this._searchRegex.exec(text);\n if (!m) {\n return null;\n }\n var matchStartIndex = m.index;\n var matchLength = m[0].length;\n if (matchStartIndex === this._prevMatchStartIndex && matchLength === this._prevMatchLength) {\n // Exit early if the regex matches the same range twice\n return null;\n }\n this._prevMatchStartIndex = matchStartIndex;\n this._prevMatchLength = matchLength;\n if (!this._wordSeparators || isValidMatch(this._wordSeparators, text, textLength, matchStartIndex, matchLength)) {\n return m;\n }\n } while (m);\n return null;\n };\n return Searcher;\n}());\nexport { Searcher };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nexport var USUAL_WORD_SEPARATORS = '`~!@#$%^&*()-=+[{]}\\\\|;:\\'\",.<>/?';\n/**\n * Create a word definition regular expression based on default word separators.\n * Optionally provide allowed separators that should be included in words.\n *\n * The default would look like this:\n * /(-?\\d*\\.\\d\\w*)|([^\\`\\~\\!\\@\\#\\$\\%\\^\\&\\*\\(\\)\\-\\=\\+\\[\\{\\]\\}\\\\\\|\\;\\:\\'\\\"\\,\\.\\<\\>\\/\\?\\s]+)/g\n */\nfunction createWordRegExp(allowInWords) {\n if (allowInWords === void 0) { allowInWords = ''; }\n var source = '(-?\\\\d*\\\\.\\\\d\\\\w*)|([^';\n for (var i = 0; i < USUAL_WORD_SEPARATORS.length; i++) {\n if (allowInWords.indexOf(USUAL_WORD_SEPARATORS[i]) >= 0) {\n continue;\n }\n source += '\\\\' + USUAL_WORD_SEPARATORS[i];\n }\n source += '\\\\s]+)';\n return new RegExp(source, 'g');\n}\n// catches numbers (including floating numbers) in the first group, and alphanum in the second\nexport var DEFAULT_WORD_REGEXP = createWordRegExp();\nexport function ensureValidWordDefinition(wordDefinition) {\n var result = DEFAULT_WORD_REGEXP;\n if (wordDefinition && (wordDefinition instanceof RegExp)) {\n if (!wordDefinition.global) {\n var flags = 'g';\n if (wordDefinition.ignoreCase) {\n flags += 'i';\n }\n if (wordDefinition.multiline) {\n flags += 'm';\n }\n result = new RegExp(wordDefinition.source, flags);\n }\n else {\n result = wordDefinition;\n }\n }\n result.lastIndex = 0;\n return result;\n}\nfunction getWordAtPosFast(column, wordDefinition, text, textOffset) {\n // find whitespace enclosed text around column and match from there\n var pos = column - 1 - textOffset;\n var start = text.lastIndexOf(' ', pos - 1) + 1;\n var end = text.indexOf(' ', pos);\n if (end === -1) {\n end = text.length;\n }\n wordDefinition.lastIndex = start;\n var match;\n while (match = wordDefinition.exec(text)) {\n if (match.index <= pos && wordDefinition.lastIndex >= pos) {\n return {\n word: match[0],\n startColumn: textOffset + 1 + match.index,\n endColumn: textOffset + 1 + wordDefinition.lastIndex\n };\n }\n }\n return null;\n}\nfunction getWordAtPosSlow(column, wordDefinition, text, textOffset) {\n // matches all words starting at the beginning\n // of the input until it finds a match that encloses\n // the desired column. slow but correct\n var pos = column - 1 - textOffset;\n wordDefinition.lastIndex = 0;\n var match;\n while (match = wordDefinition.exec(text)) {\n if (match.index > pos) {\n // |nW -> matched only after the pos\n return null;\n }\n else if (wordDefinition.lastIndex >= pos) {\n // W|W -> match encloses pos\n return {\n word: match[0],\n startColumn: textOffset + 1 + match.index,\n endColumn: textOffset + 1 + wordDefinition.lastIndex\n };\n }\n }\n return null;\n}\nexport function getWordAtText(column, wordDefinition, text, textOffset) {\n // if `words` can contain whitespace character we have to use the slow variant\n // otherwise we use the fast variant of finding a word\n wordDefinition.lastIndex = 0;\n var match = wordDefinition.exec(text);\n if (!match) {\n return null;\n }\n // todo@joh the `match` could already be the (first) word\n var ret = match[0].indexOf(' ') >= 0\n // did match a word which contains a space character -> use slow word find\n ? getWordAtPosSlow(column, wordDefinition, text, textOffset)\n // sane word definition -> use fast word find\n : getWordAtPosFast(column, wordDefinition, text, textOffset);\n // both (getWordAtPosFast and getWordAtPosSlow) leave the wordDefinition-RegExp\n // in an undefined state and to not confuse other users of the wordDefinition\n // we reset the lastIndex\n wordDefinition.lastIndex = 0;\n return ret;\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport { match as matchGlobPattern } from '../../../base/common/glob'; // TODO@Alex\nexport function score(selector, candidateUri, candidateLanguage, candidateIsSynchronized) {\n if (Array.isArray(selector)) {\n // array -> take max individual value\n var ret = 0;\n for (var _i = 0, selector_1 = selector; _i < selector_1.length; _i++) {\n var filter = selector_1[_i];\n var value = score(filter, candidateUri, candidateLanguage, candidateIsSynchronized);\n if (value === 10) {\n return value; // already at the highest\n }\n if (value > ret) {\n ret = value;\n }\n }\n return ret;\n }\n else if (typeof selector === 'string') {\n if (!candidateIsSynchronized) {\n return 0;\n }\n // short-hand notion, desugars to\n // 'fooLang' -> { language: 'fooLang'}\n // '*' -> { language: '*' }\n if (selector === '*') {\n return 5;\n }\n else if (selector === candidateLanguage) {\n return 10;\n }\n else {\n return 0;\n }\n }\n else if (selector) {\n // filter -> select accordingly, use defaults for scheme\n var language = selector.language, pattern = selector.pattern, scheme = selector.scheme, hasAccessToAllModels = selector.hasAccessToAllModels;\n if (!candidateIsSynchronized && !hasAccessToAllModels) {\n return 0;\n }\n var ret = 0;\n if (scheme) {\n if (scheme === candidateUri.scheme) {\n ret = 10;\n }\n else if (scheme === '*') {\n ret = 5;\n }\n else {\n return 0;\n }\n }\n if (language) {\n if (language === candidateLanguage) {\n ret = 10;\n }\n else if (language === '*') {\n ret = Math.max(ret, 5);\n }\n else {\n return 0;\n }\n }\n if (pattern) {\n if (pattern === candidateUri.fsPath || matchGlobPattern(pattern, candidateUri.fsPath)) {\n ret = 10;\n }\n else {\n return 0;\n }\n }\n return ret;\n }\n else {\n return 0;\n }\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport { Emitter } from '../../../base/common/event';\nimport { toDisposable } from '../../../base/common/lifecycle';\nimport { score } from './languageSelector';\nimport { shouldSynchronizeModel } from '../services/modelService';\nfunction isExclusive(selector) {\n if (typeof selector === 'string') {\n return false;\n }\n else if (Array.isArray(selector)) {\n return selector.every(isExclusive);\n }\n else {\n return selector.exclusive;\n }\n}\nvar LanguageFeatureRegistry = /** @class */ (function () {\n function LanguageFeatureRegistry() {\n this._clock = 0;\n this._entries = [];\n this._onDidChange = new Emitter();\n }\n Object.defineProperty(LanguageFeatureRegistry.prototype, \"onDidChange\", {\n get: function () {\n return this._onDidChange.event;\n },\n enumerable: true,\n configurable: true\n });\n LanguageFeatureRegistry.prototype.register = function (selector, provider) {\n var _this = this;\n var entry = {\n selector: selector,\n provider: provider,\n _score: -1,\n _time: this._clock++\n };\n this._entries.push(entry);\n this._lastCandidate = undefined;\n this._onDidChange.fire(this._entries.length);\n return toDisposable(function () {\n if (entry) {\n var idx = _this._entries.indexOf(entry);\n if (idx >= 0) {\n _this._entries.splice(idx, 1);\n _this._lastCandidate = undefined;\n _this._onDidChange.fire(_this._entries.length);\n entry = undefined;\n }\n }\n });\n };\n LanguageFeatureRegistry.prototype.has = function (model) {\n return this.all(model).length > 0;\n };\n LanguageFeatureRegistry.prototype.all = function (model) {\n if (!model) {\n return [];\n }\n this._updateScores(model);\n var result = [];\n // from registry\n for (var _i = 0, _a = this._entries; _i < _a.length; _i++) {\n var entry = _a[_i];\n if (entry._score > 0) {\n result.push(entry.provider);\n }\n }\n return result;\n };\n LanguageFeatureRegistry.prototype.ordered = function (model) {\n var result = [];\n this._orderedForEach(model, function (entry) { return result.push(entry.provider); });\n return result;\n };\n LanguageFeatureRegistry.prototype.orderedGroups = function (model) {\n var result = [];\n var lastBucket;\n var lastBucketScore;\n this._orderedForEach(model, function (entry) {\n if (lastBucket && lastBucketScore === entry._score) {\n lastBucket.push(entry.provider);\n }\n else {\n lastBucketScore = entry._score;\n lastBucket = [entry.provider];\n result.push(lastBucket);\n }\n });\n return result;\n };\n LanguageFeatureRegistry.prototype._orderedForEach = function (model, callback) {\n if (!model) {\n return;\n }\n this._updateScores(model);\n for (var from = 0; from < this._entries.length; from++) {\n var entry = this._entries[from];\n if (entry._score > 0) {\n callback(entry);\n }\n }\n };\n LanguageFeatureRegistry.prototype._updateScores = function (model) {\n var candidate = {\n uri: model.uri.toString(),\n language: model.getLanguageIdentifier().language\n };\n if (this._lastCandidate\n && this._lastCandidate.language === candidate.language\n && this._lastCandidate.uri === candidate.uri) {\n // nothing has changed\n return;\n }\n this._lastCandidate = candidate;\n for (var _i = 0, _a = this._entries; _i < _a.length; _i++) {\n var entry = _a[_i];\n entry._score = score(entry.selector, model.uri, model.getLanguageIdentifier().language, shouldSynchronizeModel(model));\n if (isExclusive(entry.selector) && entry._score > 0) {\n // support for one exclusive selector that overwrites\n // any other selector\n for (var _b = 0, _c = this._entries; _b < _c.length; _b++) {\n var entry_1 = _c[_b];\n entry_1._score = 0;\n }\n entry._score = 1000;\n break;\n }\n }\n // needs sorting\n this._entries.sort(LanguageFeatureRegistry._compareByScoreAndTime);\n };\n LanguageFeatureRegistry._compareByScoreAndTime = function (a, b) {\n if (a._score < b._score) {\n return 1;\n }\n else if (a._score > b._score) {\n return -1;\n }\n else if (a._time < b._time) {\n return 1;\n }\n else if (a._time > b._time) {\n return -1;\n }\n else {\n return 0;\n }\n };\n return LanguageFeatureRegistry;\n}());\nexport default LanguageFeatureRegistry;\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport { toDisposable } from '../../../base/common/lifecycle';\nimport { Emitter } from '../../../base/common/event';\nvar TokenizationRegistryImpl = /** @class */ (function () {\n function TokenizationRegistryImpl() {\n this._onDidChange = new Emitter();\n this.onDidChange = this._onDidChange.event;\n this._map = Object.create(null);\n this._colorMap = null;\n }\n TokenizationRegistryImpl.prototype.fire = function (languages) {\n this._onDidChange.fire({\n changedLanguages: languages,\n changedColorMap: false\n });\n };\n TokenizationRegistryImpl.prototype.register = function (language, support) {\n var _this = this;\n this._map[language] = support;\n this.fire([language]);\n return toDisposable(function () {\n if (_this._map[language] !== support) {\n return;\n }\n delete _this._map[language];\n _this.fire([language]);\n });\n };\n TokenizationRegistryImpl.prototype.get = function (language) {\n return (this._map[language] || null);\n };\n TokenizationRegistryImpl.prototype.setColorMap = function (colorMap) {\n this._colorMap = colorMap;\n this._onDidChange.fire({\n changedLanguages: Object.keys(this._map),\n changedColorMap: true\n });\n };\n TokenizationRegistryImpl.prototype.getColorMap = function () {\n return this._colorMap;\n };\n TokenizationRegistryImpl.prototype.getDefaultBackground = function () {\n return this._colorMap[2 /* DefaultBackground */];\n };\n return TokenizationRegistryImpl;\n}());\nexport { TokenizationRegistryImpl };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport LanguageFeatureRegistry from './modes/languageFeatureRegistry';\nimport { TokenizationRegistryImpl } from './modes/tokenizationRegistry';\nimport { isObject } from '../../base/common/types';\n/**\n * @internal\n */\nvar LanguageIdentifier = /** @class */ (function () {\n function LanguageIdentifier(language, id) {\n this.language = language;\n this.id = id;\n }\n return LanguageIdentifier;\n}());\nexport { LanguageIdentifier };\n/**\n * @internal\n */\nvar TokenMetadata = /** @class */ (function () {\n function TokenMetadata() {\n }\n TokenMetadata.getLanguageId = function (metadata) {\n return (metadata & 255 /* LANGUAGEID_MASK */) >>> 0 /* LANGUAGEID_OFFSET */;\n };\n TokenMetadata.getTokenType = function (metadata) {\n return (metadata & 1792 /* TOKEN_TYPE_MASK */) >>> 8 /* TOKEN_TYPE_OFFSET */;\n };\n TokenMetadata.getFontStyle = function (metadata) {\n return (metadata & 14336 /* FONT_STYLE_MASK */) >>> 11 /* FONT_STYLE_OFFSET */;\n };\n TokenMetadata.getForeground = function (metadata) {\n return (metadata & 8372224 /* FOREGROUND_MASK */) >>> 14 /* FOREGROUND_OFFSET */;\n };\n TokenMetadata.getBackground = function (metadata) {\n return (metadata & 4286578688 /* BACKGROUND_MASK */) >>> 23 /* BACKGROUND_OFFSET */;\n };\n TokenMetadata.getClassNameFromMetadata = function (metadata) {\n var foreground = this.getForeground(metadata);\n var className = 'mtk' + foreground;\n var fontStyle = this.getFontStyle(metadata);\n if (fontStyle & 1 /* Italic */) {\n className += ' mtki';\n }\n if (fontStyle & 2 /* Bold */) {\n className += ' mtkb';\n }\n if (fontStyle & 4 /* Underline */) {\n className += ' mtku';\n }\n return className;\n };\n TokenMetadata.getInlineStyleFromMetadata = function (metadata, colorMap) {\n var foreground = this.getForeground(metadata);\n var fontStyle = this.getFontStyle(metadata);\n var result = \"color: \" + colorMap[foreground] + \";\";\n if (fontStyle & 1 /* Italic */) {\n result += 'font-style: italic;';\n }\n if (fontStyle & 2 /* Bold */) {\n result += 'font-weight: bold;';\n }\n if (fontStyle & 4 /* Underline */) {\n result += 'text-decoration: underline;';\n }\n return result;\n };\n return TokenMetadata;\n}());\nexport { TokenMetadata };\n/**\n * How a suggest provider was triggered.\n */\nexport var SuggestTriggerKind;\n(function (SuggestTriggerKind) {\n SuggestTriggerKind[SuggestTriggerKind[\"Invoke\"] = 0] = \"Invoke\";\n SuggestTriggerKind[SuggestTriggerKind[\"TriggerCharacter\"] = 1] = \"TriggerCharacter\";\n SuggestTriggerKind[SuggestTriggerKind[\"TriggerForIncompleteCompletions\"] = 2] = \"TriggerForIncompleteCompletions\";\n})(SuggestTriggerKind || (SuggestTriggerKind = {}));\n/**\n * @internal\n */\nexport var CodeActionTrigger;\n(function (CodeActionTrigger) {\n CodeActionTrigger[CodeActionTrigger[\"Automatic\"] = 1] = \"Automatic\";\n CodeActionTrigger[CodeActionTrigger[\"Manual\"] = 2] = \"Manual\";\n})(CodeActionTrigger || (CodeActionTrigger = {}));\n/**\n * A document highlight kind.\n */\nexport var DocumentHighlightKind;\n(function (DocumentHighlightKind) {\n /**\n * A textual occurrence.\n */\n DocumentHighlightKind[DocumentHighlightKind[\"Text\"] = 0] = \"Text\";\n /**\n * Read-access of a symbol, like reading a variable.\n */\n DocumentHighlightKind[DocumentHighlightKind[\"Read\"] = 1] = \"Read\";\n /**\n * Write-access of a symbol, like writing to a variable.\n */\n DocumentHighlightKind[DocumentHighlightKind[\"Write\"] = 2] = \"Write\";\n})(DocumentHighlightKind || (DocumentHighlightKind = {}));\n/**\n * A symbol kind.\n */\nexport var SymbolKind;\n(function (SymbolKind) {\n SymbolKind[SymbolKind[\"File\"] = 0] = \"File\";\n SymbolKind[SymbolKind[\"Module\"] = 1] = \"Module\";\n SymbolKind[SymbolKind[\"Namespace\"] = 2] = \"Namespace\";\n SymbolKind[SymbolKind[\"Package\"] = 3] = \"Package\";\n SymbolKind[SymbolKind[\"Class\"] = 4] = \"Class\";\n SymbolKind[SymbolKind[\"Method\"] = 5] = \"Method\";\n SymbolKind[SymbolKind[\"Property\"] = 6] = \"Property\";\n SymbolKind[SymbolKind[\"Field\"] = 7] = \"Field\";\n SymbolKind[SymbolKind[\"Constructor\"] = 8] = \"Constructor\";\n SymbolKind[SymbolKind[\"Enum\"] = 9] = \"Enum\";\n SymbolKind[SymbolKind[\"Interface\"] = 10] = \"Interface\";\n SymbolKind[SymbolKind[\"Function\"] = 11] = \"Function\";\n SymbolKind[SymbolKind[\"Variable\"] = 12] = \"Variable\";\n SymbolKind[SymbolKind[\"Constant\"] = 13] = \"Constant\";\n SymbolKind[SymbolKind[\"String\"] = 14] = \"String\";\n SymbolKind[SymbolKind[\"Number\"] = 15] = \"Number\";\n SymbolKind[SymbolKind[\"Boolean\"] = 16] = \"Boolean\";\n SymbolKind[SymbolKind[\"Array\"] = 17] = \"Array\";\n SymbolKind[SymbolKind[\"Object\"] = 18] = \"Object\";\n SymbolKind[SymbolKind[\"Key\"] = 19] = \"Key\";\n SymbolKind[SymbolKind[\"Null\"] = 20] = \"Null\";\n SymbolKind[SymbolKind[\"EnumMember\"] = 21] = \"EnumMember\";\n SymbolKind[SymbolKind[\"Struct\"] = 22] = \"Struct\";\n SymbolKind[SymbolKind[\"Event\"] = 23] = \"Event\";\n SymbolKind[SymbolKind[\"Operator\"] = 24] = \"Operator\";\n SymbolKind[SymbolKind[\"TypeParameter\"] = 25] = \"TypeParameter\";\n})(SymbolKind || (SymbolKind = {}));\n/**\n * @internal\n */\nexport var symbolKindToCssClass = (function () {\n var _fromMapping = Object.create(null);\n _fromMapping[SymbolKind.File] = 'file';\n _fromMapping[SymbolKind.Module] = 'module';\n _fromMapping[SymbolKind.Namespace] = 'namespace';\n _fromMapping[SymbolKind.Package] = 'package';\n _fromMapping[SymbolKind.Class] = 'class';\n _fromMapping[SymbolKind.Method] = 'method';\n _fromMapping[SymbolKind.Property] = 'property';\n _fromMapping[SymbolKind.Field] = 'field';\n _fromMapping[SymbolKind.Constructor] = 'constructor';\n _fromMapping[SymbolKind.Enum] = 'enum';\n _fromMapping[SymbolKind.Interface] = 'interface';\n _fromMapping[SymbolKind.Function] = 'function';\n _fromMapping[SymbolKind.Variable] = 'variable';\n _fromMapping[SymbolKind.Constant] = 'constant';\n _fromMapping[SymbolKind.String] = 'string';\n _fromMapping[SymbolKind.Number] = 'number';\n _fromMapping[SymbolKind.Boolean] = 'boolean';\n _fromMapping[SymbolKind.Array] = 'array';\n _fromMapping[SymbolKind.Object] = 'object';\n _fromMapping[SymbolKind.Key] = 'key';\n _fromMapping[SymbolKind.Null] = 'null';\n _fromMapping[SymbolKind.EnumMember] = 'enum-member';\n _fromMapping[SymbolKind.Struct] = 'struct';\n _fromMapping[SymbolKind.Event] = 'event';\n _fromMapping[SymbolKind.Operator] = 'operator';\n _fromMapping[SymbolKind.TypeParameter] = 'type-parameter';\n return function toCssClassName(kind) {\n return \"symbol-icon \" + (_fromMapping[kind] || 'property');\n };\n})();\nvar FoldingRangeKind = /** @class */ (function () {\n /**\n * Creates a new [FoldingRangeKind](#FoldingRangeKind).\n *\n * @param value of the kind.\n */\n function FoldingRangeKind(value) {\n this.value = value;\n }\n /**\n * Kind for folding range representing a comment. The value of the kind is 'comment'.\n */\n FoldingRangeKind.Comment = new FoldingRangeKind('comment');\n /**\n * Kind for folding range representing a import. The value of the kind is 'imports'.\n */\n FoldingRangeKind.Imports = new FoldingRangeKind('imports');\n /**\n * Kind for folding range representing regions (for example marked by `#region`, `#endregion`).\n * The value of the kind is 'region'.\n */\n FoldingRangeKind.Region = new FoldingRangeKind('region');\n return FoldingRangeKind;\n}());\nexport { FoldingRangeKind };\n/**\n * @internal\n */\nexport function isResourceTextEdit(thing) {\n return isObject(thing) && thing.resource && Array.isArray(thing.edits);\n}\n// --- feature registries ------\n/**\n * @internal\n */\nexport var ReferenceProviderRegistry = new LanguageFeatureRegistry();\n/**\n * @internal\n */\nexport var RenameProviderRegistry = new LanguageFeatureRegistry();\n/**\n * @internal\n */\nexport var SuggestRegistry = new LanguageFeatureRegistry();\n/**\n * @internal\n */\nexport var SignatureHelpProviderRegistry = new LanguageFeatureRegistry();\n/**\n * @internal\n */\nexport var HoverProviderRegistry = new LanguageFeatureRegistry();\n/**\n * @internal\n */\nexport var DocumentSymbolProviderRegistry = new LanguageFeatureRegistry();\n/**\n * @internal\n */\nexport var DocumentHighlightProviderRegistry = new LanguageFeatureRegistry();\n/**\n * @internal\n */\nexport var DefinitionProviderRegistry = new LanguageFeatureRegistry();\n/**\n * @internal\n */\nexport var ImplementationProviderRegistry = new LanguageFeatureRegistry();\n/**\n * @internal\n */\nexport var TypeDefinitionProviderRegistry = new LanguageFeatureRegistry();\n/**\n * @internal\n */\nexport var CodeLensProviderRegistry = new LanguageFeatureRegistry();\n/**\n * @internal\n */\nexport var CodeActionProviderRegistry = new LanguageFeatureRegistry();\n/**\n * @internal\n */\nexport var DocumentFormattingEditProviderRegistry = new LanguageFeatureRegistry();\n/**\n * @internal\n */\nexport var DocumentRangeFormattingEditProviderRegistry = new LanguageFeatureRegistry();\n/**\n * @internal\n */\nexport var OnTypeFormattingEditProviderRegistry = new LanguageFeatureRegistry();\n/**\n * @internal\n */\nexport var LinkProviderRegistry = new LanguageFeatureRegistry();\n/**\n * @internal\n */\nexport var ColorProviderRegistry = new LanguageFeatureRegistry();\n/**\n * @internal\n */\nexport var FoldingRangeProviderRegistry = new LanguageFeatureRegistry();\n/**\n * @internal\n */\nexport var TokenizationRegistry = new TokenizationRegistryImpl();\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\n/**\n * Describes what to do with the indentation when pressing Enter.\n */\nexport var IndentAction;\n(function (IndentAction) {\n /**\n * Insert new line and copy the previous line's indentation.\n */\n IndentAction[IndentAction[\"None\"] = 0] = \"None\";\n /**\n * Insert new line and indent once (relative to the previous line's indentation).\n */\n IndentAction[IndentAction[\"Indent\"] = 1] = \"Indent\";\n /**\n * Insert two new lines:\n * - the first one indented which will hold the cursor\n * - the second one at the same indentation level\n */\n IndentAction[IndentAction[\"IndentOutdent\"] = 2] = \"IndentOutdent\";\n /**\n * Insert new line and outdent once (relative to the previous line's indentation).\n */\n IndentAction[IndentAction[\"Outdent\"] = 3] = \"Outdent\";\n})(IndentAction || (IndentAction = {}));\n/**\n * @internal\n */\nvar StandardAutoClosingPairConditional = /** @class */ (function () {\n function StandardAutoClosingPairConditional(source) {\n this.open = source.open;\n this.close = source.close;\n // initially allowed in all tokens\n this._standardTokenMask = 0;\n if (Array.isArray(source.notIn)) {\n for (var i = 0, len = source.notIn.length; i < len; i++) {\n var notIn = source.notIn[i];\n switch (notIn) {\n case 'string':\n this._standardTokenMask |= 2 /* String */;\n break;\n case 'comment':\n this._standardTokenMask |= 1 /* Comment */;\n break;\n case 'regex':\n this._standardTokenMask |= 4 /* RegEx */;\n break;\n }\n }\n }\n }\n StandardAutoClosingPairConditional.prototype.isOK = function (standardToken) {\n return (this._standardTokenMask & standardToken) === 0;\n };\n return StandardAutoClosingPairConditional;\n}());\nexport { StandardAutoClosingPairConditional };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport { StandardAutoClosingPairConditional } from '../languageConfiguration';\nvar CharacterPairSupport = /** @class */ (function () {\n function CharacterPairSupport(config) {\n if (config.autoClosingPairs) {\n this._autoClosingPairs = config.autoClosingPairs.map(function (el) { return new StandardAutoClosingPairConditional(el); });\n }\n else if (config.brackets) {\n this._autoClosingPairs = config.brackets.map(function (b) { return new StandardAutoClosingPairConditional({ open: b[0], close: b[1] }); });\n }\n else {\n this._autoClosingPairs = [];\n }\n this._surroundingPairs = config.surroundingPairs || this._autoClosingPairs;\n }\n CharacterPairSupport.prototype.getAutoClosingPairs = function () {\n return this._autoClosingPairs;\n };\n CharacterPairSupport.prototype.shouldAutoClosePair = function (character, context, column) {\n // Always complete on empty line\n if (context.getTokenCount() === 0) {\n return true;\n }\n var tokenIndex = context.findTokenIndexAtOffset(column - 2);\n var standardTokenType = context.getStandardTokenType(tokenIndex);\n for (var i = 0; i < this._autoClosingPairs.length; ++i) {\n var autoClosingPair = this._autoClosingPairs[i];\n if (autoClosingPair.open === character) {\n return autoClosingPair.isOK(standardTokenType);\n }\n }\n return false;\n };\n CharacterPairSupport.prototype.getSurroundingPairs = function () {\n return this._surroundingPairs;\n };\n return CharacterPairSupport;\n}());\nexport { CharacterPairSupport };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport { ignoreBracketsInToken } from '../supports';\nimport { BracketsUtils } from './richEditBrackets';\nimport { StandardAutoClosingPairConditional } from '../languageConfiguration';\nvar BracketElectricCharacterSupport = /** @class */ (function () {\n function BracketElectricCharacterSupport(richEditBrackets, autoClosePairs, contribution) {\n contribution = contribution || {};\n this._richEditBrackets = richEditBrackets;\n this._complexAutoClosePairs = autoClosePairs.filter(function (pair) { return pair.open.length > 1 && !!pair.close; }).map(function (el) { return new StandardAutoClosingPairConditional(el); });\n if (contribution.docComment) {\n // IDocComment is legacy, only partially supported\n this._complexAutoClosePairs.push(new StandardAutoClosingPairConditional({ open: contribution.docComment.open, close: contribution.docComment.close }));\n }\n }\n BracketElectricCharacterSupport.prototype.getElectricCharacters = function () {\n var result = [];\n if (this._richEditBrackets) {\n for (var i = 0, len = this._richEditBrackets.brackets.length; i < len; i++) {\n var bracketPair = this._richEditBrackets.brackets[i];\n var lastChar = bracketPair.close.charAt(bracketPair.close.length - 1);\n result.push(lastChar);\n }\n }\n // auto close\n for (var _i = 0, _a = this._complexAutoClosePairs; _i < _a.length; _i++) {\n var pair = _a[_i];\n result.push(pair.open.charAt(pair.open.length - 1));\n }\n // Filter duplicate entries\n result = result.filter(function (item, pos, array) {\n return array.indexOf(item) === pos;\n });\n return result;\n };\n BracketElectricCharacterSupport.prototype.onElectricCharacter = function (character, context, column) {\n return (this._onElectricAutoClose(character, context, column) ||\n this._onElectricAutoIndent(character, context, column));\n };\n BracketElectricCharacterSupport.prototype._onElectricAutoIndent = function (character, context, column) {\n if (!this._richEditBrackets || this._richEditBrackets.brackets.length === 0) {\n return null;\n }\n var tokenIndex = context.findTokenIndexAtOffset(column - 1);\n if (ignoreBracketsInToken(context.getStandardTokenType(tokenIndex))) {\n return null;\n }\n var reversedBracketRegex = this._richEditBrackets.reversedRegex;\n var text = context.getLineContent().substring(0, column - 1) + character;\n var r = BracketsUtils.findPrevBracketInToken(reversedBracketRegex, 1, text, 0, text.length);\n if (!r) {\n return null;\n }\n var bracketText = text.substring(r.startColumn - 1, r.endColumn - 1);\n bracketText = bracketText.toLowerCase();\n var isOpen = this._richEditBrackets.textIsOpenBracket[bracketText];\n if (isOpen) {\n return null;\n }\n var textBeforeBracket = text.substring(0, r.startColumn - 1);\n if (!/^\\s*$/.test(textBeforeBracket)) {\n // There is other text on the line before the bracket\n return null;\n }\n return {\n matchOpenBracket: bracketText\n };\n };\n BracketElectricCharacterSupport.prototype._onElectricAutoClose = function (character, context, column) {\n if (!this._complexAutoClosePairs.length) {\n return null;\n }\n var line = context.getLineContent();\n for (var i = 0, len = this._complexAutoClosePairs.length; i < len; i++) {\n var pair = this._complexAutoClosePairs[i];\n // See if the right electric character was pressed\n if (character !== pair.open.charAt(pair.open.length - 1)) {\n continue;\n }\n // check if the full open bracket matches\n var actual = line.substring(line.length - pair.open.length + 1) + character;\n if (actual !== pair.open) {\n continue;\n }\n var lastTokenIndex = context.findTokenIndexAtOffset(column - 1);\n var lastTokenStandardType = context.getStandardTokenType(lastTokenIndex);\n // If we're in a scope listed in 'notIn', do nothing\n if (!pair.isOK(lastTokenStandardType)) {\n continue;\n }\n // If this line already contains the closing tag, do nothing.\n if (line.indexOf(pair.close, column - 1) >= 0) {\n continue;\n }\n return { appendText: pair.close };\n }\n return null;\n };\n return BracketElectricCharacterSupport;\n}());\nexport { BracketElectricCharacterSupport };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport { onUnexpectedError } from '../../../../base/common/errors';\nimport * as strings from '../../../../base/common/strings';\nimport { IndentAction } from '../languageConfiguration';\nvar OnEnterSupport = /** @class */ (function () {\n function OnEnterSupport(opts) {\n opts = opts || {};\n opts.brackets = opts.brackets || [\n ['(', ')'],\n ['{', '}'],\n ['[', ']']\n ];\n this._brackets = opts.brackets.map(function (bracket) {\n return {\n open: bracket[0],\n openRegExp: OnEnterSupport._createOpenBracketRegExp(bracket[0]),\n close: bracket[1],\n closeRegExp: OnEnterSupport._createCloseBracketRegExp(bracket[1]),\n };\n });\n this._regExpRules = opts.regExpRules || [];\n }\n OnEnterSupport.prototype.onEnter = function (oneLineAboveText, beforeEnterText, afterEnterText) {\n // (1): `regExpRules`\n for (var i = 0, len = this._regExpRules.length; i < len; i++) {\n var rule = this._regExpRules[i];\n if (rule.beforeText.test(beforeEnterText)) {\n if (rule.afterText) {\n if (rule.afterText.test(afterEnterText)) {\n return rule.action;\n }\n }\n else {\n return rule.action;\n }\n }\n }\n // (2): Special indent-outdent\n if (beforeEnterText.length > 0 && afterEnterText.length > 0) {\n for (var i = 0, len = this._brackets.length; i < len; i++) {\n var bracket = this._brackets[i];\n if (bracket.openRegExp.test(beforeEnterText) && bracket.closeRegExp.test(afterEnterText)) {\n return { indentAction: IndentAction.IndentOutdent };\n }\n }\n }\n // (4): Open bracket based logic\n if (beforeEnterText.length > 0) {\n for (var i = 0, len = this._brackets.length; i < len; i++) {\n var bracket = this._brackets[i];\n if (bracket.openRegExp.test(beforeEnterText)) {\n return { indentAction: IndentAction.Indent };\n }\n }\n }\n return null;\n };\n OnEnterSupport._createOpenBracketRegExp = function (bracket) {\n var str = strings.escapeRegExpCharacters(bracket);\n if (!/\\B/.test(str.charAt(0))) {\n str = '\\\\b' + str;\n }\n str += '\\\\s*$';\n return OnEnterSupport._safeRegExp(str);\n };\n OnEnterSupport._createCloseBracketRegExp = function (bracket) {\n var str = strings.escapeRegExpCharacters(bracket);\n if (!/\\B/.test(str.charAt(str.length - 1))) {\n str = str + '\\\\b';\n }\n str = '^\\\\s*' + str;\n return OnEnterSupport._safeRegExp(str);\n };\n OnEnterSupport._safeRegExp = function (def) {\n try {\n return new RegExp(def);\n }\n catch (err) {\n onUnexpectedError(err);\n return null;\n }\n };\n return OnEnterSupport;\n}());\nexport { OnEnterSupport };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar IndentRulesSupport = /** @class */ (function () {\n function IndentRulesSupport(indentationRules) {\n this._indentationRules = indentationRules;\n }\n IndentRulesSupport.prototype.shouldIncrease = function (text) {\n if (this._indentationRules) {\n if (this._indentationRules.increaseIndentPattern && this._indentationRules.increaseIndentPattern.test(text)) {\n return true;\n }\n // if (this._indentationRules.indentNextLinePattern && this._indentationRules.indentNextLinePattern.test(text)) {\n // \treturn true;\n // }\n }\n return false;\n };\n IndentRulesSupport.prototype.shouldDecrease = function (text) {\n if (this._indentationRules && this._indentationRules.decreaseIndentPattern && this._indentationRules.decreaseIndentPattern.test(text)) {\n return true;\n }\n return false;\n };\n IndentRulesSupport.prototype.shouldIndentNextLine = function (text) {\n if (this._indentationRules && this._indentationRules.indentNextLinePattern && this._indentationRules.indentNextLinePattern.test(text)) {\n return true;\n }\n return false;\n };\n IndentRulesSupport.prototype.shouldIgnore = function (text) {\n // the text matches `unIndentedLinePattern`\n if (this._indentationRules && this._indentationRules.unIndentedLinePattern && this._indentationRules.unIndentedLinePattern.test(text)) {\n return true;\n }\n return false;\n };\n IndentRulesSupport.prototype.getIndentMetadata = function (text) {\n var ret = 0;\n if (this.shouldIncrease(text)) {\n ret += 1 /* INCREASE_MASK */;\n }\n if (this.shouldDecrease(text)) {\n ret += 2 /* DECREASE_MASK */;\n }\n if (this.shouldIndentNextLine(text)) {\n ret += 4 /* INDENT_NEXTLINE_MASK */;\n }\n if (this.shouldIgnore(text)) {\n ret += 8 /* UNINDENT_MASK */;\n }\n return ret;\n };\n return IndentRulesSupport;\n}());\nexport { IndentRulesSupport };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport { CharacterPairSupport } from './supports/characterPair';\nimport { BracketElectricCharacterSupport } from './supports/electricCharacter';\nimport { OnEnterSupport } from './supports/onEnter';\nimport { IndentRulesSupport } from './supports/indentRules';\nimport { RichEditBrackets } from './supports/richEditBrackets';\nimport { Emitter } from '../../../base/common/event';\nimport { onUnexpectedError } from '../../../base/common/errors';\nimport * as strings from '../../../base/common/strings';\nimport { toDisposable } from '../../../base/common/lifecycle';\nimport { DEFAULT_WORD_REGEXP, ensureValidWordDefinition } from '../model/wordHelper';\nimport { createScopedLineTokens } from './supports';\nimport { Range } from '../core/range';\nimport { IndentAction } from './languageConfiguration';\nvar RichEditSupport = /** @class */ (function () {\n function RichEditSupport(languageIdentifier, previous, rawConf) {\n this._languageIdentifier = languageIdentifier;\n this._brackets = null;\n this._electricCharacter = null;\n var prev = null;\n if (previous) {\n prev = previous._conf;\n }\n this._conf = RichEditSupport._mergeConf(prev, rawConf);\n this.onEnter = RichEditSupport._handleOnEnter(this._conf);\n this.comments = RichEditSupport._handleComments(this._conf);\n this.characterPair = new CharacterPairSupport(this._conf);\n this.wordDefinition = this._conf.wordPattern || DEFAULT_WORD_REGEXP;\n this.indentationRules = this._conf.indentationRules;\n if (this._conf.indentationRules) {\n this.indentRulesSupport = new IndentRulesSupport(this._conf.indentationRules);\n }\n this.foldingRules = this._conf.folding || {};\n }\n Object.defineProperty(RichEditSupport.prototype, \"brackets\", {\n get: function () {\n if (!this._brackets && this._conf.brackets) {\n this._brackets = new RichEditBrackets(this._languageIdentifier, this._conf.brackets);\n }\n return this._brackets;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(RichEditSupport.prototype, \"electricCharacter\", {\n get: function () {\n if (!this._electricCharacter) {\n var autoClosingPairs = [];\n if (this._conf.autoClosingPairs) {\n autoClosingPairs = this._conf.autoClosingPairs;\n }\n else if (this._conf.brackets) {\n autoClosingPairs = this._conf.brackets.map(function (b) {\n return { open: b[0], close: b[1] };\n });\n }\n this._electricCharacter = new BracketElectricCharacterSupport(this.brackets, autoClosingPairs, this._conf.__electricCharacterSupport);\n }\n return this._electricCharacter;\n },\n enumerable: true,\n configurable: true\n });\n RichEditSupport._mergeConf = function (prev, current) {\n return {\n comments: (prev ? current.comments || prev.comments : current.comments),\n brackets: (prev ? current.brackets || prev.brackets : current.brackets),\n wordPattern: (prev ? current.wordPattern || prev.wordPattern : current.wordPattern),\n indentationRules: (prev ? current.indentationRules || prev.indentationRules : current.indentationRules),\n onEnterRules: (prev ? current.onEnterRules || prev.onEnterRules : current.onEnterRules),\n autoClosingPairs: (prev ? current.autoClosingPairs || prev.autoClosingPairs : current.autoClosingPairs),\n surroundingPairs: (prev ? current.surroundingPairs || prev.surroundingPairs : current.surroundingPairs),\n folding: (prev ? current.folding || prev.folding : current.folding),\n __electricCharacterSupport: (prev ? current.__electricCharacterSupport || prev.__electricCharacterSupport : current.__electricCharacterSupport),\n };\n };\n RichEditSupport._handleOnEnter = function (conf) {\n // on enter\n var onEnter = {};\n var empty = true;\n if (conf.brackets) {\n empty = false;\n onEnter.brackets = conf.brackets;\n }\n if (conf.indentationRules) {\n empty = false;\n }\n if (conf.onEnterRules) {\n empty = false;\n onEnter.regExpRules = conf.onEnterRules;\n }\n if (!empty) {\n return new OnEnterSupport(onEnter);\n }\n return null;\n };\n RichEditSupport._handleComments = function (conf) {\n var commentRule = conf.comments;\n if (!commentRule) {\n return null;\n }\n // comment configuration\n var comments = {};\n if (commentRule.lineComment) {\n comments.lineCommentToken = commentRule.lineComment;\n }\n if (commentRule.blockComment) {\n var _a = commentRule.blockComment, blockStart = _a[0], blockEnd = _a[1];\n comments.blockCommentStartToken = blockStart;\n comments.blockCommentEndToken = blockEnd;\n }\n return comments;\n };\n return RichEditSupport;\n}());\nexport { RichEditSupport };\nvar LanguageConfigurationChangeEvent = /** @class */ (function () {\n function LanguageConfigurationChangeEvent() {\n }\n return LanguageConfigurationChangeEvent;\n}());\nexport { LanguageConfigurationChangeEvent };\nvar LanguageConfigurationRegistryImpl = /** @class */ (function () {\n function LanguageConfigurationRegistryImpl() {\n this._onDidChange = new Emitter();\n this.onDidChange = this._onDidChange.event;\n this._entries = [];\n }\n LanguageConfigurationRegistryImpl.prototype.register = function (languageIdentifier, configuration) {\n var _this = this;\n var previous = this._getRichEditSupport(languageIdentifier.id);\n var current = new RichEditSupport(languageIdentifier, previous, configuration);\n this._entries[languageIdentifier.id] = current;\n this._onDidChange.fire({ languageIdentifier: languageIdentifier });\n return toDisposable(function () {\n if (_this._entries[languageIdentifier.id] === current) {\n _this._entries[languageIdentifier.id] = previous;\n _this._onDidChange.fire({ languageIdentifier: languageIdentifier });\n }\n });\n };\n LanguageConfigurationRegistryImpl.prototype._getRichEditSupport = function (languageId) {\n return this._entries[languageId] || null;\n };\n // begin electricCharacter\n LanguageConfigurationRegistryImpl.prototype._getElectricCharacterSupport = function (languageId) {\n var value = this._getRichEditSupport(languageId);\n if (!value) {\n return null;\n }\n return value.electricCharacter || null;\n };\n LanguageConfigurationRegistryImpl.prototype.getElectricCharacters = function (languageId) {\n var electricCharacterSupport = this._getElectricCharacterSupport(languageId);\n if (!electricCharacterSupport) {\n return [];\n }\n return electricCharacterSupport.getElectricCharacters();\n };\n /**\n * Should return opening bracket type to match indentation with\n */\n LanguageConfigurationRegistryImpl.prototype.onElectricCharacter = function (character, context, column) {\n var scopedLineTokens = createScopedLineTokens(context, column - 1);\n var electricCharacterSupport = this._getElectricCharacterSupport(scopedLineTokens.languageId);\n if (!electricCharacterSupport) {\n return null;\n }\n return electricCharacterSupport.onElectricCharacter(character, scopedLineTokens, column - scopedLineTokens.firstCharOffset);\n };\n // end electricCharacter\n LanguageConfigurationRegistryImpl.prototype.getComments = function (languageId) {\n var value = this._getRichEditSupport(languageId);\n if (!value) {\n return null;\n }\n return value.comments || null;\n };\n // begin characterPair\n LanguageConfigurationRegistryImpl.prototype._getCharacterPairSupport = function (languageId) {\n var value = this._getRichEditSupport(languageId);\n if (!value) {\n return null;\n }\n return value.characterPair || null;\n };\n LanguageConfigurationRegistryImpl.prototype.getAutoClosingPairs = function (languageId) {\n var characterPairSupport = this._getCharacterPairSupport(languageId);\n if (!characterPairSupport) {\n return [];\n }\n return characterPairSupport.getAutoClosingPairs();\n };\n LanguageConfigurationRegistryImpl.prototype.getSurroundingPairs = function (languageId) {\n var characterPairSupport = this._getCharacterPairSupport(languageId);\n if (!characterPairSupport) {\n return [];\n }\n return characterPairSupport.getSurroundingPairs();\n };\n LanguageConfigurationRegistryImpl.prototype.shouldAutoClosePair = function (character, context, column) {\n var scopedLineTokens = createScopedLineTokens(context, column - 1);\n var characterPairSupport = this._getCharacterPairSupport(scopedLineTokens.languageId);\n if (!characterPairSupport) {\n return false;\n }\n return characterPairSupport.shouldAutoClosePair(character, scopedLineTokens, column - scopedLineTokens.firstCharOffset);\n };\n // end characterPair\n LanguageConfigurationRegistryImpl.prototype.getWordDefinition = function (languageId) {\n var value = this._getRichEditSupport(languageId);\n if (!value) {\n return ensureValidWordDefinition(null);\n }\n return ensureValidWordDefinition(value.wordDefinition || null);\n };\n LanguageConfigurationRegistryImpl.prototype.getFoldingRules = function (languageId) {\n var value = this._getRichEditSupport(languageId);\n if (!value) {\n return {};\n }\n return value.foldingRules;\n };\n // begin Indent Rules\n LanguageConfigurationRegistryImpl.prototype.getIndentRulesSupport = function (languageId) {\n var value = this._getRichEditSupport(languageId);\n if (!value) {\n return null;\n }\n return value.indentRulesSupport || null;\n };\n /**\n * Get nearest preceiding line which doesn't match unIndentPattern or contains all whitespace.\n * Result:\n * -1: run into the boundary of embedded languages\n * 0: every line above are invalid\n * else: nearest preceding line of the same language\n */\n LanguageConfigurationRegistryImpl.prototype.getPrecedingValidLine = function (model, lineNumber, indentRulesSupport) {\n var languageID = model.getLanguageIdAtPosition(lineNumber, 0);\n if (lineNumber > 1) {\n var lastLineNumber = lineNumber - 1;\n var resultLineNumber = -1;\n for (lastLineNumber = lineNumber - 1; lastLineNumber >= 1; lastLineNumber--) {\n if (model.getLanguageIdAtPosition(lastLineNumber, 0) !== languageID) {\n return resultLineNumber;\n }\n var text = model.getLineContent(lastLineNumber);\n if (indentRulesSupport.shouldIgnore(text) || /^\\s+$/.test(text) || text === '') {\n resultLineNumber = lastLineNumber;\n continue;\n }\n return lastLineNumber;\n }\n }\n return -1;\n };\n /**\n * Get inherited indentation from above lines.\n * 1. Find the nearest preceding line which doesn't match unIndentedLinePattern.\n * 2. If this line matches indentNextLinePattern or increaseIndentPattern, it means that the indent level of `lineNumber` should be 1 greater than this line.\n * 3. If this line doesn't match any indent rules\n * a. check whether the line above it matches indentNextLinePattern\n * b. If not, the indent level of this line is the result\n * c. If so, it means the indent of this line is *temporary*, go upward utill we find a line whose indent is not temporary (the same workflow a -> b -> c).\n * 4. Otherwise, we fail to get an inherited indent from aboves. Return null and we should not touch the indent of `lineNumber`\n *\n * This function only return the inherited indent based on above lines, it doesn't check whether current line should decrease or not.\n */\n LanguageConfigurationRegistryImpl.prototype.getInheritIndentForLine = function (model, lineNumber, honorIntentialIndent) {\n if (honorIntentialIndent === void 0) { honorIntentialIndent = true; }\n var indentRulesSupport = this.getIndentRulesSupport(model.getLanguageIdentifier().id);\n if (!indentRulesSupport) {\n return null;\n }\n if (lineNumber <= 1) {\n return {\n indentation: '',\n action: null\n };\n }\n var precedingUnIgnoredLine = this.getPrecedingValidLine(model, lineNumber, indentRulesSupport);\n if (precedingUnIgnoredLine < 0) {\n return null;\n }\n else if (precedingUnIgnoredLine < 1) {\n return {\n indentation: '',\n action: null\n };\n }\n var precedingUnIgnoredLineContent = model.getLineContent(precedingUnIgnoredLine);\n if (indentRulesSupport.shouldIncrease(precedingUnIgnoredLineContent) || indentRulesSupport.shouldIndentNextLine(precedingUnIgnoredLineContent)) {\n return {\n indentation: strings.getLeadingWhitespace(precedingUnIgnoredLineContent),\n action: IndentAction.Indent,\n line: precedingUnIgnoredLine\n };\n }\n else if (indentRulesSupport.shouldDecrease(precedingUnIgnoredLineContent)) {\n return {\n indentation: strings.getLeadingWhitespace(precedingUnIgnoredLineContent),\n action: null,\n line: precedingUnIgnoredLine\n };\n }\n else {\n // precedingUnIgnoredLine can not be ignored.\n // it doesn't increase indent of following lines\n // it doesn't increase just next line\n // so current line is not affect by precedingUnIgnoredLine\n // and then we should get a correct inheritted indentation from above lines\n if (precedingUnIgnoredLine === 1) {\n return {\n indentation: strings.getLeadingWhitespace(model.getLineContent(precedingUnIgnoredLine)),\n action: null,\n line: precedingUnIgnoredLine\n };\n }\n var previousLine = precedingUnIgnoredLine - 1;\n var previousLineIndentMetadata = indentRulesSupport.getIndentMetadata(model.getLineContent(previousLine));\n if (!(previousLineIndentMetadata & (1 /* INCREASE_MASK */ | 2 /* DECREASE_MASK */)) &&\n (previousLineIndentMetadata & 4 /* INDENT_NEXTLINE_MASK */)) {\n var stopLine = 0;\n for (var i = previousLine - 1; i > 0; i--) {\n if (indentRulesSupport.shouldIndentNextLine(model.getLineContent(i))) {\n continue;\n }\n stopLine = i;\n break;\n }\n return {\n indentation: strings.getLeadingWhitespace(model.getLineContent(stopLine + 1)),\n action: null,\n line: stopLine + 1\n };\n }\n if (honorIntentialIndent) {\n return {\n indentation: strings.getLeadingWhitespace(model.getLineContent(precedingUnIgnoredLine)),\n action: null,\n line: precedingUnIgnoredLine\n };\n }\n else {\n // search from precedingUnIgnoredLine until we find one whose indent is not temporary\n for (var i = precedingUnIgnoredLine; i > 0; i--) {\n var lineContent = model.getLineContent(i);\n if (indentRulesSupport.shouldIncrease(lineContent)) {\n return {\n indentation: strings.getLeadingWhitespace(lineContent),\n action: IndentAction.Indent,\n line: i\n };\n }\n else if (indentRulesSupport.shouldIndentNextLine(lineContent)) {\n var stopLine = 0;\n for (var j = i - 1; j > 0; j--) {\n if (indentRulesSupport.shouldIndentNextLine(model.getLineContent(i))) {\n continue;\n }\n stopLine = j;\n break;\n }\n return {\n indentation: strings.getLeadingWhitespace(model.getLineContent(stopLine + 1)),\n action: null,\n line: stopLine + 1\n };\n }\n else if (indentRulesSupport.shouldDecrease(lineContent)) {\n return {\n indentation: strings.getLeadingWhitespace(lineContent),\n action: null,\n line: i\n };\n }\n }\n return {\n indentation: strings.getLeadingWhitespace(model.getLineContent(1)),\n action: null,\n line: 1\n };\n }\n }\n };\n LanguageConfigurationRegistryImpl.prototype.getGoodIndentForLine = function (virtualModel, languageId, lineNumber, indentConverter) {\n var indentRulesSupport = this.getIndentRulesSupport(languageId);\n if (!indentRulesSupport) {\n return null;\n }\n var indent = this.getInheritIndentForLine(virtualModel, lineNumber);\n var lineContent = virtualModel.getLineContent(lineNumber);\n if (indent) {\n var inheritLine = indent.line;\n if (inheritLine !== undefined) {\n var onEnterSupport = this._getOnEnterSupport(languageId);\n var enterResult = null;\n try {\n enterResult = onEnterSupport.onEnter('', virtualModel.getLineContent(inheritLine), '');\n }\n catch (e) {\n onUnexpectedError(e);\n }\n if (enterResult) {\n var indentation = strings.getLeadingWhitespace(virtualModel.getLineContent(inheritLine));\n if (enterResult.removeText) {\n indentation = indentation.substring(0, indentation.length - enterResult.removeText);\n }\n if ((enterResult.indentAction === IndentAction.Indent) ||\n (enterResult.indentAction === IndentAction.IndentOutdent)) {\n indentation = indentConverter.shiftIndent(indentation);\n }\n else if (enterResult.indentAction === IndentAction.Outdent) {\n indentation = indentConverter.unshiftIndent(indentation);\n }\n if (indentRulesSupport.shouldDecrease(lineContent)) {\n indentation = indentConverter.unshiftIndent(indentation);\n }\n if (enterResult.appendText) {\n indentation += enterResult.appendText;\n }\n return strings.getLeadingWhitespace(indentation);\n }\n }\n if (indentRulesSupport.shouldDecrease(lineContent)) {\n if (indent.action === IndentAction.Indent) {\n return indent.indentation;\n }\n else {\n return indentConverter.unshiftIndent(indent.indentation);\n }\n }\n else {\n if (indent.action === IndentAction.Indent) {\n return indentConverter.shiftIndent(indent.indentation);\n }\n else {\n return indent.indentation;\n }\n }\n }\n return null;\n };\n LanguageConfigurationRegistryImpl.prototype.getIndentForEnter = function (model, range, indentConverter, autoIndent) {\n model.forceTokenization(range.startLineNumber);\n var lineTokens = model.getLineTokens(range.startLineNumber);\n var beforeEnterText;\n var afterEnterText;\n var scopedLineTokens = createScopedLineTokens(lineTokens, range.startColumn - 1);\n var scopedLineText = scopedLineTokens.getLineContent();\n var embeddedLanguage = false;\n if (scopedLineTokens.firstCharOffset > 0 && lineTokens.getLanguageId(0) !== scopedLineTokens.languageId) {\n // we are in the embeded language content\n embeddedLanguage = true; // if embeddedLanguage is true, then we don't touch the indentation of current line\n beforeEnterText = scopedLineText.substr(0, range.startColumn - 1 - scopedLineTokens.firstCharOffset);\n }\n else {\n beforeEnterText = lineTokens.getLineContent().substring(0, range.startColumn - 1);\n }\n if (range.isEmpty()) {\n afterEnterText = scopedLineText.substr(range.startColumn - 1 - scopedLineTokens.firstCharOffset);\n }\n else {\n var endScopedLineTokens = this.getScopedLineTokens(model, range.endLineNumber, range.endColumn);\n afterEnterText = endScopedLineTokens.getLineContent().substr(range.endColumn - 1 - scopedLineTokens.firstCharOffset);\n }\n var indentRulesSupport = this.getIndentRulesSupport(scopedLineTokens.languageId);\n if (!indentRulesSupport) {\n return null;\n }\n var beforeEnterResult = beforeEnterText;\n var beforeEnterIndent = strings.getLeadingWhitespace(beforeEnterText);\n if (!autoIndent && !embeddedLanguage) {\n var beforeEnterIndentAction = this.getInheritIndentForLine(model, range.startLineNumber);\n if (indentRulesSupport.shouldDecrease(beforeEnterText)) {\n if (beforeEnterIndentAction) {\n beforeEnterIndent = beforeEnterIndentAction.indentation;\n if (beforeEnterIndentAction.action !== IndentAction.Indent) {\n beforeEnterIndent = indentConverter.unshiftIndent(beforeEnterIndent);\n }\n }\n }\n beforeEnterResult = beforeEnterIndent + strings.ltrim(strings.ltrim(beforeEnterText, ' '), '\\t');\n }\n var virtualModel = {\n getLineTokens: function (lineNumber) {\n return model.getLineTokens(lineNumber);\n },\n getLanguageIdentifier: function () {\n return model.getLanguageIdentifier();\n },\n getLanguageIdAtPosition: function (lineNumber, column) {\n return model.getLanguageIdAtPosition(lineNumber, column);\n },\n getLineContent: function (lineNumber) {\n if (lineNumber === range.startLineNumber) {\n return beforeEnterResult;\n }\n else {\n return model.getLineContent(lineNumber);\n }\n }\n };\n var currentLineIndent = strings.getLeadingWhitespace(lineTokens.getLineContent());\n var afterEnterAction = this.getInheritIndentForLine(virtualModel, range.startLineNumber + 1);\n if (!afterEnterAction) {\n var beforeEnter = embeddedLanguage ? currentLineIndent : beforeEnterIndent;\n return {\n beforeEnter: beforeEnter,\n afterEnter: beforeEnter\n };\n }\n var afterEnterIndent = embeddedLanguage ? currentLineIndent : afterEnterAction.indentation;\n if (afterEnterAction.action === IndentAction.Indent) {\n afterEnterIndent = indentConverter.shiftIndent(afterEnterIndent);\n }\n if (indentRulesSupport.shouldDecrease(afterEnterText)) {\n afterEnterIndent = indentConverter.unshiftIndent(afterEnterIndent);\n }\n return {\n beforeEnter: embeddedLanguage ? currentLineIndent : beforeEnterIndent,\n afterEnter: afterEnterIndent\n };\n };\n /**\n * We should always allow intentional indentation. It means, if users change the indentation of `lineNumber` and the content of\n * this line doesn't match decreaseIndentPattern, we should not adjust the indentation.\n */\n LanguageConfigurationRegistryImpl.prototype.getIndentActionForType = function (model, range, ch, indentConverter) {\n var scopedLineTokens = this.getScopedLineTokens(model, range.startLineNumber, range.startColumn);\n var indentRulesSupport = this.getIndentRulesSupport(scopedLineTokens.languageId);\n if (!indentRulesSupport) {\n return null;\n }\n var scopedLineText = scopedLineTokens.getLineContent();\n var beforeTypeText = scopedLineText.substr(0, range.startColumn - 1 - scopedLineTokens.firstCharOffset);\n var afterTypeText;\n // selection support\n if (range.isEmpty()) {\n afterTypeText = scopedLineText.substr(range.startColumn - 1 - scopedLineTokens.firstCharOffset);\n }\n else {\n var endScopedLineTokens = this.getScopedLineTokens(model, range.endLineNumber, range.endColumn);\n afterTypeText = endScopedLineTokens.getLineContent().substr(range.endColumn - 1 - scopedLineTokens.firstCharOffset);\n }\n // If previous content already matches decreaseIndentPattern, it means indentation of this line should already be adjusted\n // Users might change the indentation by purpose and we should honor that instead of readjusting.\n if (!indentRulesSupport.shouldDecrease(beforeTypeText + afterTypeText) && indentRulesSupport.shouldDecrease(beforeTypeText + ch + afterTypeText)) {\n // after typing `ch`, the content matches decreaseIndentPattern, we should adjust the indent to a good manner.\n // 1. Get inherited indent action\n var r = this.getInheritIndentForLine(model, range.startLineNumber, false);\n if (!r) {\n return null;\n }\n var indentation = r.indentation;\n if (r.action !== IndentAction.Indent) {\n indentation = indentConverter.unshiftIndent(indentation);\n }\n return indentation;\n }\n return null;\n };\n LanguageConfigurationRegistryImpl.prototype.getIndentMetadata = function (model, lineNumber) {\n var indentRulesSupport = this.getIndentRulesSupport(model.getLanguageIdentifier().id);\n if (!indentRulesSupport) {\n return null;\n }\n if (lineNumber < 1 || lineNumber > model.getLineCount()) {\n return null;\n }\n return indentRulesSupport.getIndentMetadata(model.getLineContent(lineNumber));\n };\n // end Indent Rules\n // begin onEnter\n LanguageConfigurationRegistryImpl.prototype._getOnEnterSupport = function (languageId) {\n var value = this._getRichEditSupport(languageId);\n if (!value) {\n return null;\n }\n return value.onEnter || null;\n };\n LanguageConfigurationRegistryImpl.prototype.getRawEnterActionAtPosition = function (model, lineNumber, column) {\n var r = this.getEnterAction(model, new Range(lineNumber, column, lineNumber, column));\n return r ? r.enterAction : null;\n };\n LanguageConfigurationRegistryImpl.prototype.getEnterAction = function (model, range) {\n var indentation = this.getIndentationAtPosition(model, range.startLineNumber, range.startColumn);\n var scopedLineTokens = this.getScopedLineTokens(model, range.startLineNumber, range.startColumn);\n var onEnterSupport = this._getOnEnterSupport(scopedLineTokens.languageId);\n if (!onEnterSupport) {\n return null;\n }\n var scopedLineText = scopedLineTokens.getLineContent();\n var beforeEnterText = scopedLineText.substr(0, range.startColumn - 1 - scopedLineTokens.firstCharOffset);\n var afterEnterText;\n // selection support\n if (range.isEmpty()) {\n afterEnterText = scopedLineText.substr(range.startColumn - 1 - scopedLineTokens.firstCharOffset);\n }\n else {\n var endScopedLineTokens = this.getScopedLineTokens(model, range.endLineNumber, range.endColumn);\n afterEnterText = endScopedLineTokens.getLineContent().substr(range.endColumn - 1 - scopedLineTokens.firstCharOffset);\n }\n var lineNumber = range.startLineNumber;\n var oneLineAboveText = '';\n if (lineNumber > 1 && scopedLineTokens.firstCharOffset === 0) {\n // This is not the first line and the entire line belongs to this mode\n var oneLineAboveScopedLineTokens = this.getScopedLineTokens(model, lineNumber - 1);\n if (oneLineAboveScopedLineTokens.languageId === scopedLineTokens.languageId) {\n // The line above ends with text belonging to the same mode\n oneLineAboveText = oneLineAboveScopedLineTokens.getLineContent();\n }\n }\n var enterResult = null;\n try {\n enterResult = onEnterSupport.onEnter(oneLineAboveText, beforeEnterText, afterEnterText);\n }\n catch (e) {\n onUnexpectedError(e);\n }\n if (!enterResult) {\n return null;\n }\n else {\n // Here we add `\\t` to appendText first because enterAction is leveraging appendText and removeText to change indentation.\n if (!enterResult.appendText) {\n if ((enterResult.indentAction === IndentAction.Indent) ||\n (enterResult.indentAction === IndentAction.IndentOutdent)) {\n enterResult.appendText = '\\t';\n }\n else {\n enterResult.appendText = '';\n }\n }\n }\n if (enterResult.removeText) {\n indentation = indentation.substring(0, indentation.length - enterResult.removeText);\n }\n return {\n enterAction: enterResult,\n indentation: indentation,\n };\n };\n LanguageConfigurationRegistryImpl.prototype.getIndentationAtPosition = function (model, lineNumber, column) {\n var lineText = model.getLineContent(lineNumber);\n var indentation = strings.getLeadingWhitespace(lineText);\n if (indentation.length > column - 1) {\n indentation = indentation.substring(0, column - 1);\n }\n return indentation;\n };\n LanguageConfigurationRegistryImpl.prototype.getScopedLineTokens = function (model, lineNumber, columnNumber) {\n model.forceTokenization(lineNumber);\n var lineTokens = model.getLineTokens(lineNumber);\n var column = isNaN(columnNumber) ? model.getLineMaxColumn(lineNumber) - 1 : columnNumber - 1;\n var scopedLineTokens = createScopedLineTokens(lineTokens, column);\n return scopedLineTokens;\n };\n // end onEnter\n LanguageConfigurationRegistryImpl.prototype.getBracketsSupport = function (languageId) {\n var value = this._getRichEditSupport(languageId);\n if (!value) {\n return null;\n }\n return value.brackets || null;\n };\n return LanguageConfigurationRegistryImpl;\n}());\nexport { LanguageConfigurationRegistryImpl };\nexport var LanguageConfigurationRegistry = new LanguageConfigurationRegistryImpl();\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport { LanguageIdentifier } from '../modes';\nimport { Token, TokenizationResult, TokenizationResult2 } from '../core/token';\nvar NullStateImpl = /** @class */ (function () {\n function NullStateImpl() {\n }\n NullStateImpl.prototype.clone = function () {\n return this;\n };\n NullStateImpl.prototype.equals = function (other) {\n return (this === other);\n };\n return NullStateImpl;\n}());\nexport var NULL_STATE = new NullStateImpl();\nexport var NULL_MODE_ID = 'vs.editor.nullMode';\nexport var NULL_LANGUAGE_IDENTIFIER = new LanguageIdentifier(NULL_MODE_ID, 0 /* Null */);\nexport function nullTokenize(modeId, buffer, state, deltaOffset) {\n return new TokenizationResult([new Token(deltaOffset, '', modeId)], state);\n}\nexport function nullTokenize2(languageId, buffer, state, deltaOffset) {\n var tokens = new Uint32Array(2);\n tokens[0] = deltaOffset;\n tokens[1] = ((languageId << 0 /* LANGUAGEID_OFFSET */)\n | (0 /* Other */ << 8 /* TOKEN_TYPE_OFFSET */)\n | (0 /* None */ << 11 /* FONT_STYLE_OFFSET */)\n | (1 /* DefaultForeground */ << 14 /* FOREGROUND_OFFSET */)\n | (2 /* DefaultBackground */ << 23 /* BACKGROUND_OFFSET */)) >>> 0;\n return new TokenizationResult2(tokens, state);\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nexport function createScopedLineTokens(context, offset) {\n var tokenCount = context.getCount();\n var tokenIndex = context.findTokenIndexAtOffset(offset);\n var desiredLanguageId = context.getLanguageId(tokenIndex);\n var lastTokenIndex = tokenIndex;\n while (lastTokenIndex + 1 < tokenCount && context.getLanguageId(lastTokenIndex + 1) === desiredLanguageId) {\n lastTokenIndex++;\n }\n var firstTokenIndex = tokenIndex;\n while (firstTokenIndex > 0 && context.getLanguageId(firstTokenIndex - 1) === desiredLanguageId) {\n firstTokenIndex--;\n }\n return new ScopedLineTokens(context, desiredLanguageId, firstTokenIndex, lastTokenIndex + 1, context.getStartOffset(firstTokenIndex), context.getEndOffset(lastTokenIndex));\n}\nvar ScopedLineTokens = /** @class */ (function () {\n function ScopedLineTokens(actual, languageId, firstTokenIndex, lastTokenIndex, firstCharOffset, lastCharOffset) {\n this._actual = actual;\n this.languageId = languageId;\n this._firstTokenIndex = firstTokenIndex;\n this._lastTokenIndex = lastTokenIndex;\n this.firstCharOffset = firstCharOffset;\n this._lastCharOffset = lastCharOffset;\n }\n ScopedLineTokens.prototype.getLineContent = function () {\n var actualLineContent = this._actual.getLineContent();\n return actualLineContent.substring(this.firstCharOffset, this._lastCharOffset);\n };\n ScopedLineTokens.prototype.getTokenCount = function () {\n return this._lastTokenIndex - this._firstTokenIndex;\n };\n ScopedLineTokens.prototype.findTokenIndexAtOffset = function (offset) {\n return this._actual.findTokenIndexAtOffset(offset + this.firstCharOffset) - this._firstTokenIndex;\n };\n ScopedLineTokens.prototype.getStandardTokenType = function (tokenIndex) {\n return this._actual.getStandardTokenType(tokenIndex + this._firstTokenIndex);\n };\n return ScopedLineTokens;\n}());\nexport { ScopedLineTokens };\nexport function ignoreBracketsInToken(standardTokenType) {\n return (standardTokenType & 7 /* value */) !== 0;\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport * as strings from '../../../../base/common/strings';\nimport { Range } from '../../core/range';\nvar RichEditBracket = /** @class */ (function () {\n function RichEditBracket(languageIdentifier, open, close, forwardRegex, reversedRegex) {\n this.languageIdentifier = languageIdentifier;\n this.open = open;\n this.close = close;\n this.forwardRegex = forwardRegex;\n this.reversedRegex = reversedRegex;\n }\n return RichEditBracket;\n}());\nexport { RichEditBracket };\nvar RichEditBrackets = /** @class */ (function () {\n function RichEditBrackets(languageIdentifier, brackets) {\n var _this = this;\n this.brackets = brackets.map(function (b) {\n return new RichEditBracket(languageIdentifier, b[0], b[1], getRegexForBracketPair({ open: b[0], close: b[1] }), getReversedRegexForBracketPair({ open: b[0], close: b[1] }));\n });\n this.forwardRegex = getRegexForBrackets(this.brackets);\n this.reversedRegex = getReversedRegexForBrackets(this.brackets);\n this.textIsBracket = {};\n this.textIsOpenBracket = {};\n var maxBracketLength = 0;\n this.brackets.forEach(function (b) {\n _this.textIsBracket[b.open.toLowerCase()] = b;\n _this.textIsBracket[b.close.toLowerCase()] = b;\n _this.textIsOpenBracket[b.open.toLowerCase()] = true;\n _this.textIsOpenBracket[b.close.toLowerCase()] = false;\n maxBracketLength = Math.max(maxBracketLength, b.open.length);\n maxBracketLength = Math.max(maxBracketLength, b.close.length);\n });\n this.maxBracketLength = maxBracketLength;\n }\n return RichEditBrackets;\n}());\nexport { RichEditBrackets };\nfunction once(keyFn, computeFn) {\n var cache = {};\n return function (input) {\n var key = keyFn(input);\n if (!cache.hasOwnProperty(key)) {\n cache[key] = computeFn(input);\n }\n return cache[key];\n };\n}\nvar getRegexForBracketPair = once(function (input) { return input.open + \";\" + input.close; }, function (input) {\n return createBracketOrRegExp([input.open, input.close]);\n});\nvar getReversedRegexForBracketPair = once(function (input) { return input.open + \";\" + input.close; }, function (input) {\n return createBracketOrRegExp([toReversedString(input.open), toReversedString(input.close)]);\n});\nvar getRegexForBrackets = once(function (input) { return input.map(function (b) { return b.open + \";\" + b.close; }).join(';'); }, function (input) {\n var pieces = [];\n input.forEach(function (b) {\n pieces.push(b.open);\n pieces.push(b.close);\n });\n return createBracketOrRegExp(pieces);\n});\nvar getReversedRegexForBrackets = once(function (input) { return input.map(function (b) { return b.open + \";\" + b.close; }).join(';'); }, function (input) {\n var pieces = [];\n input.forEach(function (b) {\n pieces.push(toReversedString(b.open));\n pieces.push(toReversedString(b.close));\n });\n return createBracketOrRegExp(pieces);\n});\nfunction prepareBracketForRegExp(str) {\n // This bracket pair uses letters like e.g. \"begin\" - \"end\"\n var insertWordBoundaries = (/^[\\w]+$/.test(str));\n str = strings.escapeRegExpCharacters(str);\n return (insertWordBoundaries ? \"\\\\b\" + str + \"\\\\b\" : str);\n}\nfunction createBracketOrRegExp(pieces) {\n var regexStr = \"(\" + pieces.map(prepareBracketForRegExp).join(')|(') + \")\";\n return strings.createRegExp(regexStr, true);\n}\nvar toReversedString = (function () {\n function reverse(str) {\n var reversedStr = '';\n for (var i = str.length - 1; i >= 0; i--) {\n reversedStr += str.charAt(i);\n }\n return reversedStr;\n }\n var lastInput = null;\n var lastOutput = null;\n return function toReversedString(str) {\n if (lastInput !== str) {\n lastInput = str;\n lastOutput = reverse(lastInput);\n }\n return lastOutput;\n };\n})();\nvar BracketsUtils = /** @class */ (function () {\n function BracketsUtils() {\n }\n BracketsUtils._findPrevBracketInText = function (reversedBracketRegex, lineNumber, reversedText, offset) {\n var m = reversedText.match(reversedBracketRegex);\n if (!m) {\n return null;\n }\n var matchOffset = reversedText.length - m.index;\n var matchLength = m[0].length;\n var absoluteMatchOffset = offset + matchOffset;\n return new Range(lineNumber, absoluteMatchOffset - matchLength + 1, lineNumber, absoluteMatchOffset + 1);\n };\n BracketsUtils.findPrevBracketInToken = function (reversedBracketRegex, lineNumber, lineText, currentTokenStart, currentTokenEnd) {\n // Because JS does not support backwards regex search, we search forwards in a reversed string with a reversed regex ;)\n var reversedLineText = toReversedString(lineText);\n var reversedTokenText = reversedLineText.substring(lineText.length - currentTokenEnd, lineText.length - currentTokenStart);\n return this._findPrevBracketInText(reversedBracketRegex, lineNumber, reversedTokenText, currentTokenStart);\n };\n BracketsUtils.findNextBracketInText = function (bracketRegex, lineNumber, text, offset) {\n var m = text.match(bracketRegex);\n if (!m) {\n return null;\n }\n var matchOffset = m.index;\n var matchLength = m[0].length;\n if (matchLength === 0) {\n return null;\n }\n var absoluteMatchOffset = offset + matchOffset;\n return new Range(lineNumber, absoluteMatchOffset + 1, lineNumber, absoluteMatchOffset + 1 + matchLength);\n };\n BracketsUtils.findNextBracketInToken = function (bracketRegex, lineNumber, lineText, currentTokenStart, currentTokenEnd) {\n var currentTokenText = lineText.substring(currentTokenStart, currentTokenEnd);\n return this.findNextBracketInText(bracketRegex, lineNumber, currentTokenText, currentTokenStart);\n };\n return BracketsUtils;\n}());\nexport { BracketsUtils };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport { createDecorator } from '../../../platform/instantiation/common/instantiation';\nexport var IModelService = createDecorator('modelService');\nexport function shouldSynchronizeModel(model) {\n return (!model.isTooLargeForSyncing() && !model.isForSimpleWidget);\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\n/**\n * Describes the reason the cursor has changed its position.\n */\nexport var CursorChangeReason;\n(function (CursorChangeReason) {\n /**\n * Unknown or not set.\n */\n CursorChangeReason[CursorChangeReason[\"NotSet\"] = 0] = \"NotSet\";\n /**\n * A `model.setValue()` was called.\n */\n CursorChangeReason[CursorChangeReason[\"ContentFlush\"] = 1] = \"ContentFlush\";\n /**\n * The `model` has been changed outside of this cursor and the cursor recovers its position from associated markers.\n */\n CursorChangeReason[CursorChangeReason[\"RecoverFromMarkers\"] = 2] = \"RecoverFromMarkers\";\n /**\n * There was an explicit user gesture.\n */\n CursorChangeReason[CursorChangeReason[\"Explicit\"] = 3] = \"Explicit\";\n /**\n * There was a Paste.\n */\n CursorChangeReason[CursorChangeReason[\"Paste\"] = 4] = \"Paste\";\n /**\n * There was an Undo.\n */\n CursorChangeReason[CursorChangeReason[\"Undo\"] = 5] = \"Undo\";\n /**\n * There was a Redo.\n */\n CursorChangeReason[CursorChangeReason[\"Redo\"] = 6] = \"Redo\";\n})(CursorChangeReason || (CursorChangeReason = {}));\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\n/**\n * @internal\n */\nexport function isThemeColor(o) {\n return o && typeof o.id === 'string';\n}\n/**\n * The type of the `IEditor`.\n */\nexport var EditorType = {\n ICodeEditor: 'vs.editor.ICodeEditor',\n IDiffEditor: 'vs.editor.IDiffEditor'\n};\n/**\n * Built-in commands.\n * @internal\n */\nexport var Handler = {\n ExecuteCommand: 'executeCommand',\n ExecuteCommands: 'executeCommands',\n Type: 'type',\n ReplacePreviousChar: 'replacePreviousChar',\n CompositionStart: 'compositionStart',\n CompositionEnd: 'compositionEnd',\n Paste: 'paste',\n Cut: 'cut',\n Undo: 'undo',\n Redo: 'redo',\n};\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport { SingleCursorState, CursorColumns } from './cursorCommon';\nimport { Position } from '../core/position';\nimport { Range } from '../core/range';\nvar CursorPosition = /** @class */ (function () {\n function CursorPosition(lineNumber, column, leftoverVisibleColumns) {\n this.lineNumber = lineNumber;\n this.column = column;\n this.leftoverVisibleColumns = leftoverVisibleColumns;\n }\n return CursorPosition;\n}());\nexport { CursorPosition };\nvar MoveOperations = /** @class */ (function () {\n function MoveOperations() {\n }\n MoveOperations.left = function (config, model, lineNumber, column) {\n if (column > model.getLineMinColumn(lineNumber)) {\n if (CursorColumns.isLowSurrogate(model, lineNumber, column - 2)) {\n // character before column is a low surrogate\n column = column - 2;\n }\n else {\n column = column - 1;\n }\n }\n else if (lineNumber > 1) {\n lineNumber = lineNumber - 1;\n column = model.getLineMaxColumn(lineNumber);\n }\n return new CursorPosition(lineNumber, column, 0);\n };\n MoveOperations.moveLeft = function (config, model, cursor, inSelectionMode, noOfColumns) {\n var lineNumber, column;\n if (cursor.hasSelection() && !inSelectionMode) {\n // If we are in selection mode, move left without selection cancels selection and puts cursor at the beginning of the selection\n lineNumber = cursor.selection.startLineNumber;\n column = cursor.selection.startColumn;\n }\n else {\n var r = MoveOperations.left(config, model, cursor.position.lineNumber, cursor.position.column - (noOfColumns - 1));\n lineNumber = r.lineNumber;\n column = r.column;\n }\n return cursor.move(inSelectionMode, lineNumber, column, 0);\n };\n MoveOperations.right = function (config, model, lineNumber, column) {\n if (column < model.getLineMaxColumn(lineNumber)) {\n if (CursorColumns.isHighSurrogate(model, lineNumber, column - 1)) {\n // character after column is a high surrogate\n column = column + 2;\n }\n else {\n column = column + 1;\n }\n }\n else if (lineNumber < model.getLineCount()) {\n lineNumber = lineNumber + 1;\n column = model.getLineMinColumn(lineNumber);\n }\n return new CursorPosition(lineNumber, column, 0);\n };\n MoveOperations.moveRight = function (config, model, cursor, inSelectionMode, noOfColumns) {\n var lineNumber, column;\n if (cursor.hasSelection() && !inSelectionMode) {\n // If we are in selection mode, move right without selection cancels selection and puts cursor at the end of the selection\n lineNumber = cursor.selection.endLineNumber;\n column = cursor.selection.endColumn;\n }\n else {\n var r = MoveOperations.right(config, model, cursor.position.lineNumber, cursor.position.column + (noOfColumns - 1));\n lineNumber = r.lineNumber;\n column = r.column;\n }\n return cursor.move(inSelectionMode, lineNumber, column, 0);\n };\n MoveOperations.down = function (config, model, lineNumber, column, leftoverVisibleColumns, count, allowMoveOnLastLine) {\n var currentVisibleColumn = CursorColumns.visibleColumnFromColumn(model.getLineContent(lineNumber), column, config.tabSize) + leftoverVisibleColumns;\n lineNumber = lineNumber + count;\n var lineCount = model.getLineCount();\n if (lineNumber > lineCount) {\n lineNumber = lineCount;\n if (allowMoveOnLastLine) {\n column = model.getLineMaxColumn(lineNumber);\n }\n else {\n column = Math.min(model.getLineMaxColumn(lineNumber), column);\n if (CursorColumns.isInsideSurrogatePair(model, lineNumber, column)) {\n column = column - 1;\n }\n }\n }\n else {\n column = CursorColumns.columnFromVisibleColumn2(config, model, lineNumber, currentVisibleColumn);\n if (CursorColumns.isInsideSurrogatePair(model, lineNumber, column)) {\n column = column - 1;\n }\n }\n leftoverVisibleColumns = currentVisibleColumn - CursorColumns.visibleColumnFromColumn(model.getLineContent(lineNumber), column, config.tabSize);\n return new CursorPosition(lineNumber, column, leftoverVisibleColumns);\n };\n MoveOperations.moveDown = function (config, model, cursor, inSelectionMode, linesCount) {\n var lineNumber, column;\n if (cursor.hasSelection() && !inSelectionMode) {\n // If we are in selection mode, move down acts relative to the end of selection\n lineNumber = cursor.selection.endLineNumber;\n column = cursor.selection.endColumn;\n }\n else {\n lineNumber = cursor.position.lineNumber;\n column = cursor.position.column;\n }\n var r = MoveOperations.down(config, model, lineNumber, column, cursor.leftoverVisibleColumns, linesCount, true);\n return cursor.move(inSelectionMode, r.lineNumber, r.column, r.leftoverVisibleColumns);\n };\n MoveOperations.translateDown = function (config, model, cursor) {\n var selection = cursor.selection;\n var selectionStart = MoveOperations.down(config, model, selection.selectionStartLineNumber, selection.selectionStartColumn, cursor.selectionStartLeftoverVisibleColumns, 1, false);\n var position = MoveOperations.down(config, model, selection.positionLineNumber, selection.positionColumn, cursor.leftoverVisibleColumns, 1, false);\n return new SingleCursorState(new Range(selectionStart.lineNumber, selectionStart.column, selectionStart.lineNumber, selectionStart.column), selectionStart.leftoverVisibleColumns, new Position(position.lineNumber, position.column), position.leftoverVisibleColumns);\n };\n MoveOperations.up = function (config, model, lineNumber, column, leftoverVisibleColumns, count, allowMoveOnFirstLine) {\n var currentVisibleColumn = CursorColumns.visibleColumnFromColumn(model.getLineContent(lineNumber), column, config.tabSize) + leftoverVisibleColumns;\n lineNumber = lineNumber - count;\n if (lineNumber < 1) {\n lineNumber = 1;\n if (allowMoveOnFirstLine) {\n column = model.getLineMinColumn(lineNumber);\n }\n else {\n column = Math.min(model.getLineMaxColumn(lineNumber), column);\n if (CursorColumns.isInsideSurrogatePair(model, lineNumber, column)) {\n column = column - 1;\n }\n }\n }\n else {\n column = CursorColumns.columnFromVisibleColumn2(config, model, lineNumber, currentVisibleColumn);\n if (CursorColumns.isInsideSurrogatePair(model, lineNumber, column)) {\n column = column - 1;\n }\n }\n leftoverVisibleColumns = currentVisibleColumn - CursorColumns.visibleColumnFromColumn(model.getLineContent(lineNumber), column, config.tabSize);\n return new CursorPosition(lineNumber, column, leftoverVisibleColumns);\n };\n MoveOperations.moveUp = function (config, model, cursor, inSelectionMode, linesCount) {\n var lineNumber, column;\n if (cursor.hasSelection() && !inSelectionMode) {\n // If we are in selection mode, move up acts relative to the beginning of selection\n lineNumber = cursor.selection.startLineNumber;\n column = cursor.selection.startColumn;\n }\n else {\n lineNumber = cursor.position.lineNumber;\n column = cursor.position.column;\n }\n var r = MoveOperations.up(config, model, lineNumber, column, cursor.leftoverVisibleColumns, linesCount, true);\n return cursor.move(inSelectionMode, r.lineNumber, r.column, r.leftoverVisibleColumns);\n };\n MoveOperations.translateUp = function (config, model, cursor) {\n var selection = cursor.selection;\n var selectionStart = MoveOperations.up(config, model, selection.selectionStartLineNumber, selection.selectionStartColumn, cursor.selectionStartLeftoverVisibleColumns, 1, false);\n var position = MoveOperations.up(config, model, selection.positionLineNumber, selection.positionColumn, cursor.leftoverVisibleColumns, 1, false);\n return new SingleCursorState(new Range(selectionStart.lineNumber, selectionStart.column, selectionStart.lineNumber, selectionStart.column), selectionStart.leftoverVisibleColumns, new Position(position.lineNumber, position.column), position.leftoverVisibleColumns);\n };\n MoveOperations.moveToBeginningOfLine = function (config, model, cursor, inSelectionMode) {\n var lineNumber = cursor.position.lineNumber;\n var minColumn = model.getLineMinColumn(lineNumber);\n var firstNonBlankColumn = model.getLineFirstNonWhitespaceColumn(lineNumber) || minColumn;\n var column;\n var relevantColumnNumber = cursor.position.column;\n if (relevantColumnNumber === firstNonBlankColumn) {\n column = minColumn;\n }\n else {\n column = firstNonBlankColumn;\n }\n return cursor.move(inSelectionMode, lineNumber, column, 0);\n };\n MoveOperations.moveToEndOfLine = function (config, model, cursor, inSelectionMode) {\n var lineNumber = cursor.position.lineNumber;\n var maxColumn = model.getLineMaxColumn(lineNumber);\n return cursor.move(inSelectionMode, lineNumber, maxColumn, 0);\n };\n MoveOperations.moveToBeginningOfBuffer = function (config, model, cursor, inSelectionMode) {\n return cursor.move(inSelectionMode, 1, 1, 0);\n };\n MoveOperations.moveToEndOfBuffer = function (config, model, cursor, inSelectionMode) {\n var lastLineNumber = model.getLineCount();\n var lastColumn = model.getLineMaxColumn(lastLineNumber);\n return cursor.move(inSelectionMode, lastLineNumber, lastColumn, 0);\n };\n return MoveOperations;\n}());\nexport { MoveOperations };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { SingleCursorState } from './cursorCommon';\nimport { Position } from '../core/position';\nimport { getMapForWordSeparators } from './wordCharacterClassifier';\nimport * as strings from '../../../base/common/strings';\nimport { Range } from '../core/range';\nvar WordOperations = /** @class */ (function () {\n function WordOperations() {\n }\n WordOperations._createWord = function (lineContent, wordType, nextCharClass, start, end) {\n // console.log('WORD ==> ' + start + ' => ' + end + ':::: <<<' + lineContent.substring(start, end) + '>>>');\n return { start: start, end: end, wordType: wordType, nextCharClass: nextCharClass };\n };\n WordOperations._findPreviousWordOnLine = function (wordSeparators, model, position) {\n var lineContent = model.getLineContent(position.lineNumber);\n return this._doFindPreviousWordOnLine(lineContent, wordSeparators, position);\n };\n WordOperations._doFindPreviousWordOnLine = function (lineContent, wordSeparators, position) {\n var wordType = 0 /* None */;\n for (var chIndex = position.column - 2; chIndex >= 0; chIndex--) {\n var chCode = lineContent.charCodeAt(chIndex);\n var chClass = wordSeparators.get(chCode);\n if (chClass === 0 /* Regular */) {\n if (wordType === 2 /* Separator */) {\n return this._createWord(lineContent, wordType, chClass, chIndex + 1, this._findEndOfWord(lineContent, wordSeparators, wordType, chIndex + 1));\n }\n wordType = 1 /* Regular */;\n }\n else if (chClass === 2 /* WordSeparator */) {\n if (wordType === 1 /* Regular */) {\n return this._createWord(lineContent, wordType, chClass, chIndex + 1, this._findEndOfWord(lineContent, wordSeparators, wordType, chIndex + 1));\n }\n wordType = 2 /* Separator */;\n }\n else if (chClass === 1 /* Whitespace */) {\n if (wordType !== 0 /* None */) {\n return this._createWord(lineContent, wordType, chClass, chIndex + 1, this._findEndOfWord(lineContent, wordSeparators, wordType, chIndex + 1));\n }\n }\n }\n if (wordType !== 0 /* None */) {\n return this._createWord(lineContent, wordType, 1 /* Whitespace */, 0, this._findEndOfWord(lineContent, wordSeparators, wordType, 0));\n }\n return null;\n };\n WordOperations._findEndOfWord = function (lineContent, wordSeparators, wordType, startIndex) {\n var len = lineContent.length;\n for (var chIndex = startIndex; chIndex < len; chIndex++) {\n var chCode = lineContent.charCodeAt(chIndex);\n var chClass = wordSeparators.get(chCode);\n if (chClass === 1 /* Whitespace */) {\n return chIndex;\n }\n if (wordType === 1 /* Regular */ && chClass === 2 /* WordSeparator */) {\n return chIndex;\n }\n if (wordType === 2 /* Separator */ && chClass === 0 /* Regular */) {\n return chIndex;\n }\n }\n return len;\n };\n WordOperations._findNextWordOnLine = function (wordSeparators, model, position) {\n var lineContent = model.getLineContent(position.lineNumber);\n return this._doFindNextWordOnLine(lineContent, wordSeparators, position);\n };\n WordOperations._doFindNextWordOnLine = function (lineContent, wordSeparators, position) {\n var wordType = 0 /* None */;\n var len = lineContent.length;\n for (var chIndex = position.column - 1; chIndex < len; chIndex++) {\n var chCode = lineContent.charCodeAt(chIndex);\n var chClass = wordSeparators.get(chCode);\n if (chClass === 0 /* Regular */) {\n if (wordType === 2 /* Separator */) {\n return this._createWord(lineContent, wordType, chClass, this._findStartOfWord(lineContent, wordSeparators, wordType, chIndex - 1), chIndex);\n }\n wordType = 1 /* Regular */;\n }\n else if (chClass === 2 /* WordSeparator */) {\n if (wordType === 1 /* Regular */) {\n return this._createWord(lineContent, wordType, chClass, this._findStartOfWord(lineContent, wordSeparators, wordType, chIndex - 1), chIndex);\n }\n wordType = 2 /* Separator */;\n }\n else if (chClass === 1 /* Whitespace */) {\n if (wordType !== 0 /* None */) {\n return this._createWord(lineContent, wordType, chClass, this._findStartOfWord(lineContent, wordSeparators, wordType, chIndex - 1), chIndex);\n }\n }\n }\n if (wordType !== 0 /* None */) {\n return this._createWord(lineContent, wordType, 1 /* Whitespace */, this._findStartOfWord(lineContent, wordSeparators, wordType, len - 1), len);\n }\n return null;\n };\n WordOperations._findStartOfWord = function (lineContent, wordSeparators, wordType, startIndex) {\n for (var chIndex = startIndex; chIndex >= 0; chIndex--) {\n var chCode = lineContent.charCodeAt(chIndex);\n var chClass = wordSeparators.get(chCode);\n if (chClass === 1 /* Whitespace */) {\n return chIndex + 1;\n }\n if (wordType === 1 /* Regular */ && chClass === 2 /* WordSeparator */) {\n return chIndex + 1;\n }\n if (wordType === 2 /* Separator */ && chClass === 0 /* Regular */) {\n return chIndex + 1;\n }\n }\n return 0;\n };\n WordOperations.moveWordLeft = function (wordSeparators, model, position, wordNavigationType) {\n var lineNumber = position.lineNumber;\n var column = position.column;\n if (column === 1) {\n if (lineNumber > 1) {\n lineNumber = lineNumber - 1;\n column = model.getLineMaxColumn(lineNumber);\n }\n }\n var prevWordOnLine = WordOperations._findPreviousWordOnLine(wordSeparators, model, new Position(lineNumber, column));\n if (wordNavigationType === 0 /* WordStart */) {\n if (prevWordOnLine && prevWordOnLine.wordType === 2 /* Separator */) {\n if (prevWordOnLine.end - prevWordOnLine.start === 1 && prevWordOnLine.nextCharClass === 0 /* Regular */) {\n // Skip over a word made up of one single separator and followed by a regular character\n prevWordOnLine = WordOperations._findPreviousWordOnLine(wordSeparators, model, new Position(lineNumber, prevWordOnLine.start + 1));\n }\n }\n if (prevWordOnLine) {\n column = prevWordOnLine.start + 1;\n }\n else {\n column = 1;\n }\n }\n else {\n if (prevWordOnLine && column <= prevWordOnLine.end + 1) {\n prevWordOnLine = WordOperations._findPreviousWordOnLine(wordSeparators, model, new Position(lineNumber, prevWordOnLine.start + 1));\n }\n if (prevWordOnLine) {\n column = prevWordOnLine.end + 1;\n }\n else {\n column = 1;\n }\n }\n return new Position(lineNumber, column);\n };\n WordOperations.moveWordRight = function (wordSeparators, model, position, wordNavigationType) {\n var lineNumber = position.lineNumber;\n var column = position.column;\n if (column === model.getLineMaxColumn(lineNumber)) {\n if (lineNumber < model.getLineCount()) {\n lineNumber = lineNumber + 1;\n column = 1;\n }\n }\n var nextWordOnLine = WordOperations._findNextWordOnLine(wordSeparators, model, new Position(lineNumber, column));\n if (wordNavigationType === 1 /* WordEnd */) {\n if (nextWordOnLine && nextWordOnLine.wordType === 2 /* Separator */) {\n if (nextWordOnLine.end - nextWordOnLine.start === 1 && nextWordOnLine.nextCharClass === 0 /* Regular */) {\n // Skip over a word made up of one single separator and followed by a regular character\n nextWordOnLine = WordOperations._findNextWordOnLine(wordSeparators, model, new Position(lineNumber, nextWordOnLine.end + 1));\n }\n }\n if (nextWordOnLine) {\n column = nextWordOnLine.end + 1;\n }\n else {\n column = model.getLineMaxColumn(lineNumber);\n }\n }\n else {\n if (nextWordOnLine && column >= nextWordOnLine.start + 1) {\n nextWordOnLine = WordOperations._findNextWordOnLine(wordSeparators, model, new Position(lineNumber, nextWordOnLine.end + 1));\n }\n if (nextWordOnLine) {\n column = nextWordOnLine.start + 1;\n }\n else {\n column = model.getLineMaxColumn(lineNumber);\n }\n }\n return new Position(lineNumber, column);\n };\n WordOperations._deleteWordLeftWhitespace = function (model, position) {\n var lineContent = model.getLineContent(position.lineNumber);\n var startIndex = position.column - 2;\n var lastNonWhitespace = strings.lastNonWhitespaceIndex(lineContent, startIndex);\n if (lastNonWhitespace + 1 < startIndex) {\n return new Range(position.lineNumber, lastNonWhitespace + 2, position.lineNumber, position.column);\n }\n return null;\n };\n WordOperations.deleteWordLeft = function (wordSeparators, model, selection, whitespaceHeuristics, wordNavigationType) {\n if (!selection.isEmpty()) {\n return selection;\n }\n var position = new Position(selection.positionLineNumber, selection.positionColumn);\n var lineNumber = position.lineNumber;\n var column = position.column;\n if (lineNumber === 1 && column === 1) {\n // Ignore deleting at beginning of file\n return null;\n }\n if (whitespaceHeuristics) {\n var r = this._deleteWordLeftWhitespace(model, position);\n if (r) {\n return r;\n }\n }\n var prevWordOnLine = WordOperations._findPreviousWordOnLine(wordSeparators, model, position);\n if (wordNavigationType === 0 /* WordStart */) {\n if (prevWordOnLine) {\n column = prevWordOnLine.start + 1;\n }\n else {\n if (column > 1) {\n column = 1;\n }\n else {\n lineNumber--;\n column = model.getLineMaxColumn(lineNumber);\n }\n }\n }\n else {\n if (prevWordOnLine && column <= prevWordOnLine.end + 1) {\n prevWordOnLine = WordOperations._findPreviousWordOnLine(wordSeparators, model, new Position(lineNumber, prevWordOnLine.start + 1));\n }\n if (prevWordOnLine) {\n column = prevWordOnLine.end + 1;\n }\n else {\n if (column > 1) {\n column = 1;\n }\n else {\n lineNumber--;\n column = model.getLineMaxColumn(lineNumber);\n }\n }\n }\n return new Range(lineNumber, column, position.lineNumber, position.column);\n };\n WordOperations._findFirstNonWhitespaceChar = function (str, startIndex) {\n var len = str.length;\n for (var chIndex = startIndex; chIndex < len; chIndex++) {\n var ch = str.charAt(chIndex);\n if (ch !== ' ' && ch !== '\\t') {\n return chIndex;\n }\n }\n return len;\n };\n WordOperations._deleteWordRightWhitespace = function (model, position) {\n var lineContent = model.getLineContent(position.lineNumber);\n var startIndex = position.column - 1;\n var firstNonWhitespace = this._findFirstNonWhitespaceChar(lineContent, startIndex);\n if (startIndex + 1 < firstNonWhitespace) {\n // bingo\n return new Range(position.lineNumber, position.column, position.lineNumber, firstNonWhitespace + 1);\n }\n return null;\n };\n WordOperations.deleteWordRight = function (wordSeparators, model, selection, whitespaceHeuristics, wordNavigationType) {\n if (!selection.isEmpty()) {\n return selection;\n }\n var position = new Position(selection.positionLineNumber, selection.positionColumn);\n var lineNumber = position.lineNumber;\n var column = position.column;\n var lineCount = model.getLineCount();\n var maxColumn = model.getLineMaxColumn(lineNumber);\n if (lineNumber === lineCount && column === maxColumn) {\n // Ignore deleting at end of file\n return null;\n }\n if (whitespaceHeuristics) {\n var r = this._deleteWordRightWhitespace(model, position);\n if (r) {\n return r;\n }\n }\n var nextWordOnLine = WordOperations._findNextWordOnLine(wordSeparators, model, position);\n if (wordNavigationType === 1 /* WordEnd */) {\n if (nextWordOnLine) {\n column = nextWordOnLine.end + 1;\n }\n else {\n if (column < maxColumn || lineNumber === lineCount) {\n column = maxColumn;\n }\n else {\n lineNumber++;\n nextWordOnLine = WordOperations._findNextWordOnLine(wordSeparators, model, new Position(lineNumber, 1));\n if (nextWordOnLine) {\n column = nextWordOnLine.start + 1;\n }\n else {\n column = model.getLineMaxColumn(lineNumber);\n }\n }\n }\n }\n else {\n if (nextWordOnLine && column >= nextWordOnLine.start + 1) {\n nextWordOnLine = WordOperations._findNextWordOnLine(wordSeparators, model, new Position(lineNumber, nextWordOnLine.end + 1));\n }\n if (nextWordOnLine) {\n column = nextWordOnLine.start + 1;\n }\n else {\n if (column < maxColumn || lineNumber === lineCount) {\n column = maxColumn;\n }\n else {\n lineNumber++;\n nextWordOnLine = WordOperations._findNextWordOnLine(wordSeparators, model, new Position(lineNumber, 1));\n if (nextWordOnLine) {\n column = nextWordOnLine.start + 1;\n }\n else {\n column = model.getLineMaxColumn(lineNumber);\n }\n }\n }\n }\n return new Range(lineNumber, column, position.lineNumber, position.column);\n };\n WordOperations.word = function (config, model, cursor, inSelectionMode, position) {\n var wordSeparators = getMapForWordSeparators(config.wordSeparators);\n var prevWord = WordOperations._findPreviousWordOnLine(wordSeparators, model, position);\n var nextWord = WordOperations._findNextWordOnLine(wordSeparators, model, position);\n if (!inSelectionMode) {\n // Entering word selection for the first time\n var isTouchingPrevWord = (prevWord && prevWord.wordType === 1 /* Regular */ && prevWord.start <= position.column - 1 && position.column - 1 <= prevWord.end);\n var isTouchingNextWord = (nextWord && nextWord.wordType === 1 /* Regular */ && nextWord.start <= position.column - 1 && position.column - 1 <= nextWord.end);\n var startColumn_1;\n var endColumn_1;\n if (isTouchingPrevWord) {\n startColumn_1 = prevWord.start + 1;\n endColumn_1 = prevWord.end + 1;\n }\n else if (isTouchingNextWord) {\n startColumn_1 = nextWord.start + 1;\n endColumn_1 = nextWord.end + 1;\n }\n else {\n if (prevWord) {\n startColumn_1 = prevWord.end + 1;\n }\n else {\n startColumn_1 = 1;\n }\n if (nextWord) {\n endColumn_1 = nextWord.start + 1;\n }\n else {\n endColumn_1 = model.getLineMaxColumn(position.lineNumber);\n }\n }\n return new SingleCursorState(new Range(position.lineNumber, startColumn_1, position.lineNumber, endColumn_1), 0, new Position(position.lineNumber, endColumn_1), 0);\n }\n var isInsidePrevWord = (prevWord && prevWord.wordType === 1 /* Regular */ && prevWord.start < position.column - 1 && position.column - 1 < prevWord.end);\n var isInsideNextWord = (nextWord && nextWord.wordType === 1 /* Regular */ && nextWord.start < position.column - 1 && position.column - 1 < nextWord.end);\n var startColumn;\n var endColumn;\n if (isInsidePrevWord) {\n startColumn = prevWord.start + 1;\n endColumn = prevWord.end + 1;\n }\n else if (isInsideNextWord) {\n startColumn = nextWord.start + 1;\n endColumn = nextWord.end + 1;\n }\n else {\n startColumn = position.column;\n endColumn = position.column;\n }\n var lineNumber = position.lineNumber;\n var column;\n if (cursor.selectionStart.containsPosition(position)) {\n column = cursor.selectionStart.endColumn;\n }\n else if (position.isBeforeOrEqual(cursor.selectionStart.getStartPosition())) {\n column = startColumn;\n var possiblePosition = new Position(lineNumber, column);\n if (cursor.selectionStart.containsPosition(possiblePosition)) {\n column = cursor.selectionStart.endColumn;\n }\n }\n else {\n column = endColumn;\n var possiblePosition = new Position(lineNumber, column);\n if (cursor.selectionStart.containsPosition(possiblePosition)) {\n column = cursor.selectionStart.startColumn;\n }\n }\n return cursor.move(true, lineNumber, column, 0);\n };\n return WordOperations;\n}());\nexport { WordOperations };\nexport function _lastWordPartEnd(str, startIndex) {\n if (startIndex === void 0) { startIndex = str.length - 1; }\n var ignoreUpperCase = !strings.isLowerAsciiLetter(str.charCodeAt(startIndex + 1));\n for (var i = startIndex; i >= 0; i--) {\n var chCode = str.charCodeAt(i);\n if (chCode === 32 /* Space */ || chCode === 9 /* Tab */ || (!ignoreUpperCase && strings.isUpperAsciiLetter(chCode)) || chCode === 95 /* Underline */) {\n return i - 1;\n }\n if (ignoreUpperCase && i < startIndex && strings.isLowerAsciiLetter(chCode)) {\n return i;\n }\n ignoreUpperCase = ignoreUpperCase && strings.isUpperAsciiLetter(chCode);\n }\n return -1;\n}\nexport function _nextWordPartBegin(str, startIndex) {\n if (startIndex === void 0) { startIndex = 0; }\n var prevChCode = str.charCodeAt(startIndex - 1);\n var chCode = str.charCodeAt(startIndex);\n // handle the special case ' X' and ' x' which is different from the standard methods\n if ((prevChCode === 32 /* Space */ || prevChCode === 9 /* Tab */) && (strings.isLowerAsciiLetter(chCode) || strings.isUpperAsciiLetter(chCode))) {\n return startIndex + 1;\n }\n var ignoreUpperCase = strings.isUpperAsciiLetter(chCode);\n for (var i = startIndex; i < str.length; ++i) {\n chCode = str.charCodeAt(i);\n if (chCode === 32 /* Space */ || chCode === 9 /* Tab */ || (!ignoreUpperCase && strings.isUpperAsciiLetter(chCode))) {\n return i + 1;\n }\n if (ignoreUpperCase && strings.isLowerAsciiLetter(chCode)) {\n return i; // multiple UPPERCase : assume an upper case word and a CamelCase word - like DSLModel\n }\n ignoreUpperCase = ignoreUpperCase && strings.isUpperAsciiLetter(chCode);\n if (chCode === 95 /* Underline */) {\n return i + 2;\n }\n }\n return str.length + 1;\n}\nvar WordPartOperations = /** @class */ (function (_super) {\n __extends(WordPartOperations, _super);\n function WordPartOperations() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n WordPartOperations.deleteWordPartLeft = function (wordSeparators, model, selection, whitespaceHeuristics, wordNavigationType) {\n if (!selection.isEmpty()) {\n return selection;\n }\n var position = new Position(selection.positionLineNumber, selection.positionColumn);\n var lineNumber = position.lineNumber;\n var column = position.column;\n if (lineNumber === 1 && column === 1) {\n // Ignore deleting at beginning of file\n return null;\n }\n if (whitespaceHeuristics) {\n var r = WordOperations._deleteWordLeftWhitespace(model, position);\n if (r) {\n return r;\n }\n }\n var wordRange = WordOperations.deleteWordLeft(wordSeparators, model, selection, whitespaceHeuristics, wordNavigationType);\n var lastWordPartEnd = _lastWordPartEnd(model.getLineContent(position.lineNumber), position.column - 2);\n var wordPartRange = new Range(lineNumber, column, lineNumber, lastWordPartEnd + 2);\n if (wordPartRange.getStartPosition().isBeforeOrEqual(wordRange.getStartPosition())) {\n return wordRange;\n }\n return wordPartRange;\n };\n WordPartOperations.deleteWordPartRight = function (wordSeparators, model, selection, whitespaceHeuristics, wordNavigationType) {\n if (!selection.isEmpty()) {\n return selection;\n }\n var position = new Position(selection.positionLineNumber, selection.positionColumn);\n var lineNumber = position.lineNumber;\n var column = position.column;\n var lineCount = model.getLineCount();\n var maxColumn = model.getLineMaxColumn(lineNumber);\n if (lineNumber === lineCount && column === maxColumn) {\n // Ignore deleting at end of file\n return null;\n }\n if (whitespaceHeuristics) {\n var r = WordOperations._deleteWordRightWhitespace(model, position);\n if (r) {\n return r;\n }\n }\n var wordRange = WordOperations.deleteWordRight(wordSeparators, model, selection, whitespaceHeuristics, wordNavigationType);\n var nextWordPartBegin = _nextWordPartBegin(model.getLineContent(position.lineNumber), position.column);\n var wordPartRange = new Range(lineNumber, column, lineNumber, nextWordPartBegin);\n if (wordRange.getEndPosition().isBeforeOrEqual(wordPartRange.getEndPosition())) {\n return wordRange;\n }\n return wordPartRange;\n };\n WordPartOperations.moveWordPartLeft = function (wordSeparators, model, position, wordNavigationType) {\n var lineNumber = position.lineNumber;\n var column = position.column;\n if (column === 1) {\n return (lineNumber > 1 ? new Position(lineNumber - 1, model.getLineMaxColumn(lineNumber - 1)) : position);\n }\n var wordPos = WordOperations.moveWordLeft(wordSeparators, model, position, wordNavigationType);\n var lastWordPartEnd = _lastWordPartEnd(model.getLineContent(lineNumber), column - 2);\n var wordPartPos = new Position(lineNumber, lastWordPartEnd + 2);\n if (wordPartPos.isBeforeOrEqual(wordPos)) {\n return wordPos;\n }\n return wordPartPos;\n };\n WordPartOperations.moveWordPartRight = function (wordSeparators, model, position, wordNavigationType) {\n var lineNumber = position.lineNumber;\n var column = position.column;\n var maxColumn = model.getLineMaxColumn(lineNumber);\n if (column === maxColumn) {\n return (lineNumber < model.getLineCount() ? new Position(lineNumber + 1, 1) : position);\n }\n var wordPos = WordOperations.moveWordRight(wordSeparators, model, position, wordNavigationType);\n var nextWordPartBegin = _nextWordPartBegin(model.getLineContent(lineNumber), column);\n var wordPartPos = new Position(lineNumber, nextWordPartBegin);\n if (wordPos.isBeforeOrEqual(wordPartPos)) {\n return wordPos;\n }\n return wordPartPos;\n };\n return WordPartOperations;\n}(WordOperations));\nexport { WordPartOperations };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport { SingleCursorState, CursorState } from './cursorCommon';\nimport { Position } from '../core/position';\nimport { Range } from '../core/range';\nimport { MoveOperations } from './cursorMoveOperations';\nimport { WordOperations } from './cursorWordOperations';\nimport * as types from '../../../base/common/types';\nvar CursorMoveCommands = /** @class */ (function () {\n function CursorMoveCommands() {\n }\n CursorMoveCommands.addCursorDown = function (context, cursors, useLogicalLine) {\n var result = [], resultLen = 0;\n for (var i = 0, len = cursors.length; i < len; i++) {\n var cursor = cursors[i];\n result[resultLen++] = new CursorState(cursor.modelState, cursor.viewState);\n if (useLogicalLine) {\n result[resultLen++] = CursorState.fromModelState(MoveOperations.translateDown(context.config, context.model, cursor.modelState));\n }\n else {\n result[resultLen++] = CursorState.fromViewState(MoveOperations.translateDown(context.config, context.viewModel, cursor.viewState));\n }\n }\n return result;\n };\n CursorMoveCommands.addCursorUp = function (context, cursors, useLogicalLine) {\n var result = [], resultLen = 0;\n for (var i = 0, len = cursors.length; i < len; i++) {\n var cursor = cursors[i];\n result[resultLen++] = new CursorState(cursor.modelState, cursor.viewState);\n if (useLogicalLine) {\n result[resultLen++] = CursorState.fromModelState(MoveOperations.translateUp(context.config, context.model, cursor.modelState));\n }\n else {\n result[resultLen++] = CursorState.fromViewState(MoveOperations.translateUp(context.config, context.viewModel, cursor.viewState));\n }\n }\n return result;\n };\n CursorMoveCommands.moveToBeginningOfLine = function (context, cursors, inSelectionMode) {\n var result = [];\n for (var i = 0, len = cursors.length; i < len; i++) {\n var cursor = cursors[i];\n result[i] = this._moveToLineStart(context, cursor, inSelectionMode);\n }\n return result;\n };\n CursorMoveCommands._moveToLineStart = function (context, cursor, inSelectionMode) {\n var currentViewStateColumn = cursor.viewState.position.column;\n var currentModelStateColumn = cursor.modelState.position.column;\n var isFirstLineOfWrappedLine = currentViewStateColumn === currentModelStateColumn;\n var currentViewStatelineNumber = cursor.viewState.position.lineNumber;\n var firstNonBlankColumn = context.viewModel.getLineFirstNonWhitespaceColumn(currentViewStatelineNumber);\n var isBeginningOfViewLine = currentViewStateColumn === firstNonBlankColumn;\n if (!isFirstLineOfWrappedLine && !isBeginningOfViewLine) {\n return this._moveToLineStartByView(context, cursor, inSelectionMode);\n }\n else {\n return this._moveToLineStartByModel(context, cursor, inSelectionMode);\n }\n };\n CursorMoveCommands._moveToLineStartByView = function (context, cursor, inSelectionMode) {\n return CursorState.fromViewState(MoveOperations.moveToBeginningOfLine(context.config, context.viewModel, cursor.viewState, inSelectionMode));\n };\n CursorMoveCommands._moveToLineStartByModel = function (context, cursor, inSelectionMode) {\n return CursorState.fromModelState(MoveOperations.moveToBeginningOfLine(context.config, context.model, cursor.modelState, inSelectionMode));\n };\n CursorMoveCommands.moveToEndOfLine = function (context, cursors, inSelectionMode) {\n var result = [];\n for (var i = 0, len = cursors.length; i < len; i++) {\n var cursor = cursors[i];\n result[i] = this._moveToLineEnd(context, cursor, inSelectionMode);\n }\n return result;\n };\n CursorMoveCommands._moveToLineEnd = function (context, cursor, inSelectionMode) {\n var viewStatePosition = cursor.viewState.position;\n var viewModelMaxColumn = context.viewModel.getLineMaxColumn(viewStatePosition.lineNumber);\n var isEndOfViewLine = viewStatePosition.column === viewModelMaxColumn;\n var modelStatePosition = cursor.modelState.position;\n var modelMaxColumn = context.model.getLineMaxColumn(modelStatePosition.lineNumber);\n var isEndLineOfWrappedLine = viewModelMaxColumn - viewStatePosition.column === modelMaxColumn - modelStatePosition.column;\n if (isEndOfViewLine || isEndLineOfWrappedLine) {\n return this._moveToLineEndByModel(context, cursor, inSelectionMode);\n }\n else {\n return this._moveToLineEndByView(context, cursor, inSelectionMode);\n }\n };\n CursorMoveCommands._moveToLineEndByView = function (context, cursor, inSelectionMode) {\n return CursorState.fromViewState(MoveOperations.moveToEndOfLine(context.config, context.viewModel, cursor.viewState, inSelectionMode));\n };\n CursorMoveCommands._moveToLineEndByModel = function (context, cursor, inSelectionMode) {\n return CursorState.fromModelState(MoveOperations.moveToEndOfLine(context.config, context.model, cursor.modelState, inSelectionMode));\n };\n CursorMoveCommands.expandLineSelection = function (context, cursors) {\n var result = [];\n for (var i = 0, len = cursors.length; i < len; i++) {\n var cursor = cursors[i];\n var viewSelection = cursor.viewState.selection;\n var startLineNumber = viewSelection.startLineNumber;\n var lineCount = context.viewModel.getLineCount();\n var endLineNumber = viewSelection.endLineNumber;\n var endColumn = void 0;\n if (endLineNumber === lineCount) {\n endColumn = context.viewModel.getLineMaxColumn(lineCount);\n }\n else {\n endLineNumber++;\n endColumn = 1;\n }\n result[i] = CursorState.fromViewState(new SingleCursorState(new Range(startLineNumber, 1, startLineNumber, 1), 0, new Position(endLineNumber, endColumn), 0));\n }\n return result;\n };\n CursorMoveCommands.moveToBeginningOfBuffer = function (context, cursors, inSelectionMode) {\n var result = [];\n for (var i = 0, len = cursors.length; i < len; i++) {\n var cursor = cursors[i];\n result[i] = CursorState.fromModelState(MoveOperations.moveToBeginningOfBuffer(context.config, context.model, cursor.modelState, inSelectionMode));\n }\n return result;\n };\n CursorMoveCommands.moveToEndOfBuffer = function (context, cursors, inSelectionMode) {\n var result = [];\n for (var i = 0, len = cursors.length; i < len; i++) {\n var cursor = cursors[i];\n result[i] = CursorState.fromModelState(MoveOperations.moveToEndOfBuffer(context.config, context.model, cursor.modelState, inSelectionMode));\n }\n return result;\n };\n CursorMoveCommands.selectAll = function (context, cursor) {\n var lineCount = context.model.getLineCount();\n var maxColumn = context.model.getLineMaxColumn(lineCount);\n return CursorState.fromModelState(new SingleCursorState(new Range(1, 1, 1, 1), 0, new Position(lineCount, maxColumn), 0));\n };\n CursorMoveCommands.line = function (context, cursor, inSelectionMode, _position, _viewPosition) {\n var position = context.model.validatePosition(_position);\n var viewPosition = (_viewPosition\n ? context.validateViewPosition(new Position(_viewPosition.lineNumber, _viewPosition.column), position)\n : context.convertModelPositionToViewPosition(position));\n if (!inSelectionMode || !cursor.modelState.hasSelection()) {\n // Entering line selection for the first time\n var lineCount = context.model.getLineCount();\n var selectToLineNumber = position.lineNumber + 1;\n var selectToColumn = 1;\n if (selectToLineNumber > lineCount) {\n selectToLineNumber = lineCount;\n selectToColumn = context.model.getLineMaxColumn(selectToLineNumber);\n }\n return CursorState.fromModelState(new SingleCursorState(new Range(position.lineNumber, 1, selectToLineNumber, selectToColumn), 0, new Position(selectToLineNumber, selectToColumn), 0));\n }\n // Continuing line selection\n var enteringLineNumber = cursor.modelState.selectionStart.getStartPosition().lineNumber;\n if (position.lineNumber < enteringLineNumber) {\n return CursorState.fromViewState(cursor.viewState.move(cursor.modelState.hasSelection(), viewPosition.lineNumber, 1, 0));\n }\n else if (position.lineNumber > enteringLineNumber) {\n var lineCount = context.viewModel.getLineCount();\n var selectToViewLineNumber = viewPosition.lineNumber + 1;\n var selectToViewColumn = 1;\n if (selectToViewLineNumber > lineCount) {\n selectToViewLineNumber = lineCount;\n selectToViewColumn = context.viewModel.getLineMaxColumn(selectToViewLineNumber);\n }\n return CursorState.fromViewState(cursor.viewState.move(cursor.modelState.hasSelection(), selectToViewLineNumber, selectToViewColumn, 0));\n }\n else {\n var endPositionOfSelectionStart = cursor.modelState.selectionStart.getEndPosition();\n return CursorState.fromModelState(cursor.modelState.move(cursor.modelState.hasSelection(), endPositionOfSelectionStart.lineNumber, endPositionOfSelectionStart.column, 0));\n }\n };\n CursorMoveCommands.word = function (context, cursor, inSelectionMode, _position) {\n var position = context.model.validatePosition(_position);\n return CursorState.fromModelState(WordOperations.word(context.config, context.model, cursor.modelState, inSelectionMode, position));\n };\n CursorMoveCommands.cancelSelection = function (context, cursor) {\n if (!cursor.modelState.hasSelection()) {\n return new CursorState(cursor.modelState, cursor.viewState);\n }\n var lineNumber = cursor.viewState.position.lineNumber;\n var column = cursor.viewState.position.column;\n return CursorState.fromViewState(new SingleCursorState(new Range(lineNumber, column, lineNumber, column), 0, new Position(lineNumber, column), 0));\n };\n CursorMoveCommands.moveTo = function (context, cursor, inSelectionMode, _position, _viewPosition) {\n var position = context.model.validatePosition(_position);\n var viewPosition = (_viewPosition\n ? context.validateViewPosition(new Position(_viewPosition.lineNumber, _viewPosition.column), position)\n : context.convertModelPositionToViewPosition(position));\n return CursorState.fromViewState(cursor.viewState.move(inSelectionMode, viewPosition.lineNumber, viewPosition.column, 0));\n };\n CursorMoveCommands.move = function (context, cursors, args) {\n var inSelectionMode = args.select;\n var value = args.value;\n switch (args.direction) {\n case 0 /* Left */: {\n if (args.unit === 4 /* HalfLine */) {\n // Move left by half the current line length\n return this._moveHalfLineLeft(context, cursors, inSelectionMode);\n }\n else {\n // Move left by `moveParams.value` columns\n return this._moveLeft(context, cursors, inSelectionMode, value);\n }\n }\n case 1 /* Right */: {\n if (args.unit === 4 /* HalfLine */) {\n // Move right by half the current line length\n return this._moveHalfLineRight(context, cursors, inSelectionMode);\n }\n else {\n // Move right by `moveParams.value` columns\n return this._moveRight(context, cursors, inSelectionMode, value);\n }\n }\n case 2 /* Up */: {\n if (args.unit === 2 /* WrappedLine */) {\n // Move up by view lines\n return this._moveUpByViewLines(context, cursors, inSelectionMode, value);\n }\n else {\n // Move up by model lines\n return this._moveUpByModelLines(context, cursors, inSelectionMode, value);\n }\n }\n case 3 /* Down */: {\n if (args.unit === 2 /* WrappedLine */) {\n // Move down by view lines\n return this._moveDownByViewLines(context, cursors, inSelectionMode, value);\n }\n else {\n // Move down by model lines\n return this._moveDownByModelLines(context, cursors, inSelectionMode, value);\n }\n }\n case 4 /* WrappedLineStart */: {\n // Move to the beginning of the current view line\n return this._moveToViewMinColumn(context, cursors, inSelectionMode);\n }\n case 5 /* WrappedLineFirstNonWhitespaceCharacter */: {\n // Move to the first non-whitespace column of the current view line\n return this._moveToViewFirstNonWhitespaceColumn(context, cursors, inSelectionMode);\n }\n case 6 /* WrappedLineColumnCenter */: {\n // Move to the \"center\" of the current view line\n return this._moveToViewCenterColumn(context, cursors, inSelectionMode);\n }\n case 7 /* WrappedLineEnd */: {\n // Move to the end of the current view line\n return this._moveToViewMaxColumn(context, cursors, inSelectionMode);\n }\n case 8 /* WrappedLineLastNonWhitespaceCharacter */: {\n // Move to the last non-whitespace column of the current view line\n return this._moveToViewLastNonWhitespaceColumn(context, cursors, inSelectionMode);\n }\n case 9 /* ViewPortTop */: {\n // Move to the nth line start in the viewport (from the top)\n var cursor = cursors[0];\n var visibleModelRange = context.getCompletelyVisibleModelRange();\n var modelLineNumber = this._firstLineNumberInRange(context.model, visibleModelRange, value);\n var modelColumn = context.model.getLineFirstNonWhitespaceColumn(modelLineNumber);\n return [this._moveToModelPosition(context, cursor, inSelectionMode, modelLineNumber, modelColumn)];\n }\n case 11 /* ViewPortBottom */: {\n // Move to the nth line start in the viewport (from the bottom)\n var cursor = cursors[0];\n var visibleModelRange = context.getCompletelyVisibleModelRange();\n var modelLineNumber = this._lastLineNumberInRange(context.model, visibleModelRange, value);\n var modelColumn = context.model.getLineFirstNonWhitespaceColumn(modelLineNumber);\n return [this._moveToModelPosition(context, cursor, inSelectionMode, modelLineNumber, modelColumn)];\n }\n case 10 /* ViewPortCenter */: {\n // Move to the line start in the viewport center\n var cursor = cursors[0];\n var visibleModelRange = context.getCompletelyVisibleModelRange();\n var modelLineNumber = Math.round((visibleModelRange.startLineNumber + visibleModelRange.endLineNumber) / 2);\n var modelColumn = context.model.getLineFirstNonWhitespaceColumn(modelLineNumber);\n return [this._moveToModelPosition(context, cursor, inSelectionMode, modelLineNumber, modelColumn)];\n }\n case 12 /* ViewPortIfOutside */: {\n // Move to a position inside the viewport\n var visibleViewRange = context.getCompletelyVisibleViewRange();\n var result = [];\n for (var i = 0, len = cursors.length; i < len; i++) {\n var cursor = cursors[i];\n result[i] = this.findPositionInViewportIfOutside(context, cursor, visibleViewRange, inSelectionMode);\n }\n return result;\n }\n }\n return null;\n };\n CursorMoveCommands.findPositionInViewportIfOutside = function (context, cursor, visibleViewRange, inSelectionMode) {\n var viewLineNumber = cursor.viewState.position.lineNumber;\n if (visibleViewRange.startLineNumber <= viewLineNumber && viewLineNumber <= visibleViewRange.endLineNumber - 1) {\n // Nothing to do, cursor is in viewport\n return new CursorState(cursor.modelState, cursor.viewState);\n }\n else {\n if (viewLineNumber > visibleViewRange.endLineNumber - 1) {\n viewLineNumber = visibleViewRange.endLineNumber - 1;\n }\n if (viewLineNumber < visibleViewRange.startLineNumber) {\n viewLineNumber = visibleViewRange.startLineNumber;\n }\n var viewColumn = context.viewModel.getLineFirstNonWhitespaceColumn(viewLineNumber);\n return this._moveToViewPosition(context, cursor, inSelectionMode, viewLineNumber, viewColumn);\n }\n };\n /**\n * Find the nth line start included in the range (from the start).\n */\n CursorMoveCommands._firstLineNumberInRange = function (model, range, count) {\n var startLineNumber = range.startLineNumber;\n if (range.startColumn !== model.getLineMinColumn(startLineNumber)) {\n // Move on to the second line if the first line start is not included in the range\n startLineNumber++;\n }\n return Math.min(range.endLineNumber, startLineNumber + count - 1);\n };\n /**\n * Find the nth line start included in the range (from the end).\n */\n CursorMoveCommands._lastLineNumberInRange = function (model, range, count) {\n var startLineNumber = range.startLineNumber;\n if (range.startColumn !== model.getLineMinColumn(startLineNumber)) {\n // Move on to the second line if the first line start is not included in the range\n startLineNumber++;\n }\n return Math.max(startLineNumber, range.endLineNumber - count + 1);\n };\n CursorMoveCommands._moveLeft = function (context, cursors, inSelectionMode, noOfColumns) {\n var result = [];\n for (var i = 0, len = cursors.length; i < len; i++) {\n var cursor = cursors[i];\n var newViewState = MoveOperations.moveLeft(context.config, context.viewModel, cursor.viewState, inSelectionMode, noOfColumns);\n if (noOfColumns === 1 && newViewState.position.lineNumber !== cursor.viewState.position.lineNumber) {\n // moved over to the previous view line\n var newViewModelPosition = context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(newViewState.position);\n if (newViewModelPosition.lineNumber === cursor.modelState.position.lineNumber) {\n // stayed on the same model line => pass wrapping point where 2 view positions map to a single model position\n newViewState = MoveOperations.moveLeft(context.config, context.viewModel, newViewState, inSelectionMode, 1);\n }\n }\n result[i] = CursorState.fromViewState(newViewState);\n }\n return result;\n };\n CursorMoveCommands._moveHalfLineLeft = function (context, cursors, inSelectionMode) {\n var result = [];\n for (var i = 0, len = cursors.length; i < len; i++) {\n var cursor = cursors[i];\n var viewLineNumber = cursor.viewState.position.lineNumber;\n var halfLine = Math.round(context.viewModel.getLineContent(viewLineNumber).length / 2);\n result[i] = CursorState.fromViewState(MoveOperations.moveLeft(context.config, context.viewModel, cursor.viewState, inSelectionMode, halfLine));\n }\n return result;\n };\n CursorMoveCommands._moveRight = function (context, cursors, inSelectionMode, noOfColumns) {\n var result = [];\n for (var i = 0, len = cursors.length; i < len; i++) {\n var cursor = cursors[i];\n var newViewState = MoveOperations.moveRight(context.config, context.viewModel, cursor.viewState, inSelectionMode, noOfColumns);\n if (noOfColumns === 1 && newViewState.position.lineNumber !== cursor.viewState.position.lineNumber) {\n // moved over to the next view line\n var newViewModelPosition = context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(newViewState.position);\n if (newViewModelPosition.lineNumber === cursor.modelState.position.lineNumber) {\n // stayed on the same model line => pass wrapping point where 2 view positions map to a single model position\n newViewState = MoveOperations.moveRight(context.config, context.viewModel, newViewState, inSelectionMode, 1);\n }\n }\n result[i] = CursorState.fromViewState(newViewState);\n }\n return result;\n };\n CursorMoveCommands._moveHalfLineRight = function (context, cursors, inSelectionMode) {\n var result = [];\n for (var i = 0, len = cursors.length; i < len; i++) {\n var cursor = cursors[i];\n var viewLineNumber = cursor.viewState.position.lineNumber;\n var halfLine = Math.round(context.viewModel.getLineContent(viewLineNumber).length / 2);\n result[i] = CursorState.fromViewState(MoveOperations.moveRight(context.config, context.viewModel, cursor.viewState, inSelectionMode, halfLine));\n }\n return result;\n };\n CursorMoveCommands._moveDownByViewLines = function (context, cursors, inSelectionMode, linesCount) {\n var result = [];\n for (var i = 0, len = cursors.length; i < len; i++) {\n var cursor = cursors[i];\n result[i] = CursorState.fromViewState(MoveOperations.moveDown(context.config, context.viewModel, cursor.viewState, inSelectionMode, linesCount));\n }\n return result;\n };\n CursorMoveCommands._moveDownByModelLines = function (context, cursors, inSelectionMode, linesCount) {\n var result = [];\n for (var i = 0, len = cursors.length; i < len; i++) {\n var cursor = cursors[i];\n result[i] = CursorState.fromModelState(MoveOperations.moveDown(context.config, context.model, cursor.modelState, inSelectionMode, linesCount));\n }\n return result;\n };\n CursorMoveCommands._moveUpByViewLines = function (context, cursors, inSelectionMode, linesCount) {\n var result = [];\n for (var i = 0, len = cursors.length; i < len; i++) {\n var cursor = cursors[i];\n result[i] = CursorState.fromViewState(MoveOperations.moveUp(context.config, context.viewModel, cursor.viewState, inSelectionMode, linesCount));\n }\n return result;\n };\n CursorMoveCommands._moveUpByModelLines = function (context, cursors, inSelectionMode, linesCount) {\n var result = [];\n for (var i = 0, len = cursors.length; i < len; i++) {\n var cursor = cursors[i];\n result[i] = CursorState.fromModelState(MoveOperations.moveUp(context.config, context.model, cursor.modelState, inSelectionMode, linesCount));\n }\n return result;\n };\n CursorMoveCommands._moveToViewPosition = function (context, cursor, inSelectionMode, toViewLineNumber, toViewColumn) {\n return CursorState.fromViewState(cursor.viewState.move(inSelectionMode, toViewLineNumber, toViewColumn, 0));\n };\n CursorMoveCommands._moveToModelPosition = function (context, cursor, inSelectionMode, toModelLineNumber, toModelColumn) {\n return CursorState.fromModelState(cursor.modelState.move(inSelectionMode, toModelLineNumber, toModelColumn, 0));\n };\n CursorMoveCommands._moveToViewMinColumn = function (context, cursors, inSelectionMode) {\n var result = [];\n for (var i = 0, len = cursors.length; i < len; i++) {\n var cursor = cursors[i];\n var viewLineNumber = cursor.viewState.position.lineNumber;\n var viewColumn = context.viewModel.getLineMinColumn(viewLineNumber);\n result[i] = this._moveToViewPosition(context, cursor, inSelectionMode, viewLineNumber, viewColumn);\n }\n return result;\n };\n CursorMoveCommands._moveToViewFirstNonWhitespaceColumn = function (context, cursors, inSelectionMode) {\n var result = [];\n for (var i = 0, len = cursors.length; i < len; i++) {\n var cursor = cursors[i];\n var viewLineNumber = cursor.viewState.position.lineNumber;\n var viewColumn = context.viewModel.getLineFirstNonWhitespaceColumn(viewLineNumber);\n result[i] = this._moveToViewPosition(context, cursor, inSelectionMode, viewLineNumber, viewColumn);\n }\n return result;\n };\n CursorMoveCommands._moveToViewCenterColumn = function (context, cursors, inSelectionMode) {\n var result = [];\n for (var i = 0, len = cursors.length; i < len; i++) {\n var cursor = cursors[i];\n var viewLineNumber = cursor.viewState.position.lineNumber;\n var viewColumn = Math.round((context.viewModel.getLineMaxColumn(viewLineNumber) + context.viewModel.getLineMinColumn(viewLineNumber)) / 2);\n result[i] = this._moveToViewPosition(context, cursor, inSelectionMode, viewLineNumber, viewColumn);\n }\n return result;\n };\n CursorMoveCommands._moveToViewMaxColumn = function (context, cursors, inSelectionMode) {\n var result = [];\n for (var i = 0, len = cursors.length; i < len; i++) {\n var cursor = cursors[i];\n var viewLineNumber = cursor.viewState.position.lineNumber;\n var viewColumn = context.viewModel.getLineMaxColumn(viewLineNumber);\n result[i] = this._moveToViewPosition(context, cursor, inSelectionMode, viewLineNumber, viewColumn);\n }\n return result;\n };\n CursorMoveCommands._moveToViewLastNonWhitespaceColumn = function (context, cursors, inSelectionMode) {\n var result = [];\n for (var i = 0, len = cursors.length; i < len; i++) {\n var cursor = cursors[i];\n var viewLineNumber = cursor.viewState.position.lineNumber;\n var viewColumn = context.viewModel.getLineLastNonWhitespaceColumn(viewLineNumber);\n result[i] = this._moveToViewPosition(context, cursor, inSelectionMode, viewLineNumber, viewColumn);\n }\n return result;\n };\n return CursorMoveCommands;\n}());\nexport { CursorMoveCommands };\nexport var CursorMove;\n(function (CursorMove) {\n var isCursorMoveArgs = function (arg) {\n if (!types.isObject(arg)) {\n return false;\n }\n var cursorMoveArg = arg;\n if (!types.isString(cursorMoveArg.to)) {\n return false;\n }\n if (!types.isUndefined(cursorMoveArg.select) && !types.isBoolean(cursorMoveArg.select)) {\n return false;\n }\n if (!types.isUndefined(cursorMoveArg.by) && !types.isString(cursorMoveArg.by)) {\n return false;\n }\n if (!types.isUndefined(cursorMoveArg.value) && !types.isNumber(cursorMoveArg.value)) {\n return false;\n }\n return true;\n };\n CursorMove.description = {\n description: 'Move cursor to a logical position in the view',\n args: [\n {\n name: 'Cursor move argument object',\n description: \"Property-value pairs that can be passed through this argument:\\n\\t\\t\\t\\t\\t* 'to': A mandatory logical position value providing where to move the cursor.\\n\\t\\t\\t\\t\\t\\t```\\n\\t\\t\\t\\t\\t\\t'left', 'right', 'up', 'down'\\n\\t\\t\\t\\t\\t\\t'wrappedLineStart', 'wrappedLineEnd', 'wrappedLineColumnCenter'\\n\\t\\t\\t\\t\\t\\t'wrappedLineFirstNonWhitespaceCharacter', 'wrappedLineLastNonWhitespaceCharacter'\\n\\t\\t\\t\\t\\t\\t'viewPortTop', 'viewPortCenter', 'viewPortBottom', 'viewPortIfOutside'\\n\\t\\t\\t\\t\\t\\t```\\n\\t\\t\\t\\t\\t* 'by': Unit to move. Default is computed based on 'to' value.\\n\\t\\t\\t\\t\\t\\t```\\n\\t\\t\\t\\t\\t\\t'line', 'wrappedLine', 'character', 'halfLine'\\n\\t\\t\\t\\t\\t\\t```\\n\\t\\t\\t\\t\\t* 'value': Number of units to move. Default is '1'.\\n\\t\\t\\t\\t\\t* 'select': If 'true' makes the selection. Default is 'false'.\\n\\t\\t\\t\\t\",\n constraint: isCursorMoveArgs\n }\n ]\n };\n /**\n * Positions in the view for cursor move command.\n */\n CursorMove.RawDirection = {\n Left: 'left',\n Right: 'right',\n Up: 'up',\n Down: 'down',\n WrappedLineStart: 'wrappedLineStart',\n WrappedLineFirstNonWhitespaceCharacter: 'wrappedLineFirstNonWhitespaceCharacter',\n WrappedLineColumnCenter: 'wrappedLineColumnCenter',\n WrappedLineEnd: 'wrappedLineEnd',\n WrappedLineLastNonWhitespaceCharacter: 'wrappedLineLastNonWhitespaceCharacter',\n ViewPortTop: 'viewPortTop',\n ViewPortCenter: 'viewPortCenter',\n ViewPortBottom: 'viewPortBottom',\n ViewPortIfOutside: 'viewPortIfOutside'\n };\n /**\n * Units for Cursor move 'by' argument\n */\n CursorMove.RawUnit = {\n Line: 'line',\n WrappedLine: 'wrappedLine',\n Character: 'character',\n HalfLine: 'halfLine'\n };\n function parse(args) {\n if (!args.to) {\n // illegal arguments\n return null;\n }\n var direction;\n switch (args.to) {\n case CursorMove.RawDirection.Left:\n direction = 0 /* Left */;\n break;\n case CursorMove.RawDirection.Right:\n direction = 1 /* Right */;\n break;\n case CursorMove.RawDirection.Up:\n direction = 2 /* Up */;\n break;\n case CursorMove.RawDirection.Down:\n direction = 3 /* Down */;\n break;\n case CursorMove.RawDirection.WrappedLineStart:\n direction = 4 /* WrappedLineStart */;\n break;\n case CursorMove.RawDirection.WrappedLineFirstNonWhitespaceCharacter:\n direction = 5 /* WrappedLineFirstNonWhitespaceCharacter */;\n break;\n case CursorMove.RawDirection.WrappedLineColumnCenter:\n direction = 6 /* WrappedLineColumnCenter */;\n break;\n case CursorMove.RawDirection.WrappedLineEnd:\n direction = 7 /* WrappedLineEnd */;\n break;\n case CursorMove.RawDirection.WrappedLineLastNonWhitespaceCharacter:\n direction = 8 /* WrappedLineLastNonWhitespaceCharacter */;\n break;\n case CursorMove.RawDirection.ViewPortTop:\n direction = 9 /* ViewPortTop */;\n break;\n case CursorMove.RawDirection.ViewPortBottom:\n direction = 11 /* ViewPortBottom */;\n break;\n case CursorMove.RawDirection.ViewPortCenter:\n direction = 10 /* ViewPortCenter */;\n break;\n case CursorMove.RawDirection.ViewPortIfOutside:\n direction = 12 /* ViewPortIfOutside */;\n break;\n default:\n // illegal arguments\n return null;\n }\n var unit = 0 /* None */;\n switch (args.by) {\n case CursorMove.RawUnit.Line:\n unit = 1 /* Line */;\n break;\n case CursorMove.RawUnit.WrappedLine:\n unit = 2 /* WrappedLine */;\n break;\n case CursorMove.RawUnit.Character:\n unit = 3 /* Character */;\n break;\n case CursorMove.RawUnit.HalfLine:\n unit = 4 /* HalfLine */;\n break;\n }\n return {\n direction: direction,\n unit: unit,\n select: (!!args.select),\n value: (args.value || 1)\n };\n }\n CursorMove.parse = parse;\n})(CursorMove || (CursorMove = {}));\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar KeyCodeStrMap = /** @class */ (function () {\n function KeyCodeStrMap() {\n this._keyCodeToStr = [];\n this._strToKeyCode = Object.create(null);\n }\n KeyCodeStrMap.prototype.define = function (keyCode, str) {\n this._keyCodeToStr[keyCode] = str;\n this._strToKeyCode[str.toLowerCase()] = keyCode;\n };\n KeyCodeStrMap.prototype.keyCodeToStr = function (keyCode) {\n return this._keyCodeToStr[keyCode];\n };\n KeyCodeStrMap.prototype.strToKeyCode = function (str) {\n return this._strToKeyCode[str.toLowerCase()] || 0 /* Unknown */;\n };\n return KeyCodeStrMap;\n}());\nvar uiMap = new KeyCodeStrMap();\nvar userSettingsUSMap = new KeyCodeStrMap();\nvar userSettingsGeneralMap = new KeyCodeStrMap();\n(function () {\n function define(keyCode, uiLabel, usUserSettingsLabel, generalUserSettingsLabel) {\n if (usUserSettingsLabel === void 0) { usUserSettingsLabel = uiLabel; }\n if (generalUserSettingsLabel === void 0) { generalUserSettingsLabel = usUserSettingsLabel; }\n uiMap.define(keyCode, uiLabel);\n userSettingsUSMap.define(keyCode, usUserSettingsLabel);\n userSettingsGeneralMap.define(keyCode, generalUserSettingsLabel);\n }\n define(0 /* Unknown */, 'unknown');\n define(1 /* Backspace */, 'Backspace');\n define(2 /* Tab */, 'Tab');\n define(3 /* Enter */, 'Enter');\n define(4 /* Shift */, 'Shift');\n define(5 /* Ctrl */, 'Ctrl');\n define(6 /* Alt */, 'Alt');\n define(7 /* PauseBreak */, 'PauseBreak');\n define(8 /* CapsLock */, 'CapsLock');\n define(9 /* Escape */, 'Escape');\n define(10 /* Space */, 'Space');\n define(11 /* PageUp */, 'PageUp');\n define(12 /* PageDown */, 'PageDown');\n define(13 /* End */, 'End');\n define(14 /* Home */, 'Home');\n define(15 /* LeftArrow */, 'LeftArrow', 'Left');\n define(16 /* UpArrow */, 'UpArrow', 'Up');\n define(17 /* RightArrow */, 'RightArrow', 'Right');\n define(18 /* DownArrow */, 'DownArrow', 'Down');\n define(19 /* Insert */, 'Insert');\n define(20 /* Delete */, 'Delete');\n define(21 /* KEY_0 */, '0');\n define(22 /* KEY_1 */, '1');\n define(23 /* KEY_2 */, '2');\n define(24 /* KEY_3 */, '3');\n define(25 /* KEY_4 */, '4');\n define(26 /* KEY_5 */, '5');\n define(27 /* KEY_6 */, '6');\n define(28 /* KEY_7 */, '7');\n define(29 /* KEY_8 */, '8');\n define(30 /* KEY_9 */, '9');\n define(31 /* KEY_A */, 'A');\n define(32 /* KEY_B */, 'B');\n define(33 /* KEY_C */, 'C');\n define(34 /* KEY_D */, 'D');\n define(35 /* KEY_E */, 'E');\n define(36 /* KEY_F */, 'F');\n define(37 /* KEY_G */, 'G');\n define(38 /* KEY_H */, 'H');\n define(39 /* KEY_I */, 'I');\n define(40 /* KEY_J */, 'J');\n define(41 /* KEY_K */, 'K');\n define(42 /* KEY_L */, 'L');\n define(43 /* KEY_M */, 'M');\n define(44 /* KEY_N */, 'N');\n define(45 /* KEY_O */, 'O');\n define(46 /* KEY_P */, 'P');\n define(47 /* KEY_Q */, 'Q');\n define(48 /* KEY_R */, 'R');\n define(49 /* KEY_S */, 'S');\n define(50 /* KEY_T */, 'T');\n define(51 /* KEY_U */, 'U');\n define(52 /* KEY_V */, 'V');\n define(53 /* KEY_W */, 'W');\n define(54 /* KEY_X */, 'X');\n define(55 /* KEY_Y */, 'Y');\n define(56 /* KEY_Z */, 'Z');\n define(57 /* Meta */, 'Meta');\n define(58 /* ContextMenu */, 'ContextMenu');\n define(59 /* F1 */, 'F1');\n define(60 /* F2 */, 'F2');\n define(61 /* F3 */, 'F3');\n define(62 /* F4 */, 'F4');\n define(63 /* F5 */, 'F5');\n define(64 /* F6 */, 'F6');\n define(65 /* F7 */, 'F7');\n define(66 /* F8 */, 'F8');\n define(67 /* F9 */, 'F9');\n define(68 /* F10 */, 'F10');\n define(69 /* F11 */, 'F11');\n define(70 /* F12 */, 'F12');\n define(71 /* F13 */, 'F13');\n define(72 /* F14 */, 'F14');\n define(73 /* F15 */, 'F15');\n define(74 /* F16 */, 'F16');\n define(75 /* F17 */, 'F17');\n define(76 /* F18 */, 'F18');\n define(77 /* F19 */, 'F19');\n define(78 /* NumLock */, 'NumLock');\n define(79 /* ScrollLock */, 'ScrollLock');\n define(80 /* US_SEMICOLON */, ';', ';', 'OEM_1');\n define(81 /* US_EQUAL */, '=', '=', 'OEM_PLUS');\n define(82 /* US_COMMA */, ',', ',', 'OEM_COMMA');\n define(83 /* US_MINUS */, '-', '-', 'OEM_MINUS');\n define(84 /* US_DOT */, '.', '.', 'OEM_PERIOD');\n define(85 /* US_SLASH */, '/', '/', 'OEM_2');\n define(86 /* US_BACKTICK */, '`', '`', 'OEM_3');\n define(110 /* ABNT_C1 */, 'ABNT_C1');\n define(111 /* ABNT_C2 */, 'ABNT_C2');\n define(87 /* US_OPEN_SQUARE_BRACKET */, '[', '[', 'OEM_4');\n define(88 /* US_BACKSLASH */, '\\\\', '\\\\', 'OEM_5');\n define(89 /* US_CLOSE_SQUARE_BRACKET */, ']', ']', 'OEM_6');\n define(90 /* US_QUOTE */, '\\'', '\\'', 'OEM_7');\n define(91 /* OEM_8 */, 'OEM_8');\n define(92 /* OEM_102 */, 'OEM_102');\n define(93 /* NUMPAD_0 */, 'NumPad0');\n define(94 /* NUMPAD_1 */, 'NumPad1');\n define(95 /* NUMPAD_2 */, 'NumPad2');\n define(96 /* NUMPAD_3 */, 'NumPad3');\n define(97 /* NUMPAD_4 */, 'NumPad4');\n define(98 /* NUMPAD_5 */, 'NumPad5');\n define(99 /* NUMPAD_6 */, 'NumPad6');\n define(100 /* NUMPAD_7 */, 'NumPad7');\n define(101 /* NUMPAD_8 */, 'NumPad8');\n define(102 /* NUMPAD_9 */, 'NumPad9');\n define(103 /* NUMPAD_MULTIPLY */, 'NumPad_Multiply');\n define(104 /* NUMPAD_ADD */, 'NumPad_Add');\n define(105 /* NUMPAD_SEPARATOR */, 'NumPad_Separator');\n define(106 /* NUMPAD_SUBTRACT */, 'NumPad_Subtract');\n define(107 /* NUMPAD_DECIMAL */, 'NumPad_Decimal');\n define(108 /* NUMPAD_DIVIDE */, 'NumPad_Divide');\n})();\nexport var KeyCodeUtils;\n(function (KeyCodeUtils) {\n function toString(keyCode) {\n return uiMap.keyCodeToStr(keyCode);\n }\n KeyCodeUtils.toString = toString;\n function fromString(key) {\n return uiMap.strToKeyCode(key);\n }\n KeyCodeUtils.fromString = fromString;\n function toUserSettingsUS(keyCode) {\n return userSettingsUSMap.keyCodeToStr(keyCode);\n }\n KeyCodeUtils.toUserSettingsUS = toUserSettingsUS;\n function toUserSettingsGeneral(keyCode) {\n return userSettingsGeneralMap.keyCodeToStr(keyCode);\n }\n KeyCodeUtils.toUserSettingsGeneral = toUserSettingsGeneral;\n function fromUserSettings(key) {\n return userSettingsUSMap.strToKeyCode(key) || userSettingsGeneralMap.strToKeyCode(key);\n }\n KeyCodeUtils.fromUserSettings = fromUserSettings;\n})(KeyCodeUtils || (KeyCodeUtils = {}));\nexport function KeyChord(firstPart, secondPart) {\n var chordPart = ((secondPart & 0x0000ffff) << 16) >>> 0;\n return (firstPart | chordPart) >>> 0;\n}\nexport function createKeybinding(keybinding, OS) {\n if (keybinding === 0) {\n return null;\n }\n var firstPart = (keybinding & 0x0000ffff) >>> 0;\n var chordPart = (keybinding & 0xffff0000) >>> 16;\n if (chordPart !== 0) {\n return new ChordKeybinding(createSimpleKeybinding(firstPart, OS), createSimpleKeybinding(chordPart, OS));\n }\n return createSimpleKeybinding(firstPart, OS);\n}\nexport function createSimpleKeybinding(keybinding, OS) {\n var ctrlCmd = (keybinding & 2048 /* CtrlCmd */ ? true : false);\n var winCtrl = (keybinding & 256 /* WinCtrl */ ? true : false);\n var ctrlKey = (OS === 2 /* Macintosh */ ? winCtrl : ctrlCmd);\n var shiftKey = (keybinding & 1024 /* Shift */ ? true : false);\n var altKey = (keybinding & 512 /* Alt */ ? true : false);\n var metaKey = (OS === 2 /* Macintosh */ ? ctrlCmd : winCtrl);\n var keyCode = (keybinding & 255 /* KeyCode */);\n return new SimpleKeybinding(ctrlKey, shiftKey, altKey, metaKey, keyCode);\n}\nvar SimpleKeybinding = /** @class */ (function () {\n function SimpleKeybinding(ctrlKey, shiftKey, altKey, metaKey, keyCode) {\n this.type = 1 /* Simple */;\n this.ctrlKey = ctrlKey;\n this.shiftKey = shiftKey;\n this.altKey = altKey;\n this.metaKey = metaKey;\n this.keyCode = keyCode;\n }\n SimpleKeybinding.prototype.equals = function (other) {\n if (other.type !== 1 /* Simple */) {\n return false;\n }\n return (this.ctrlKey === other.ctrlKey\n && this.shiftKey === other.shiftKey\n && this.altKey === other.altKey\n && this.metaKey === other.metaKey\n && this.keyCode === other.keyCode);\n };\n SimpleKeybinding.prototype.isModifierKey = function () {\n return (this.keyCode === 0 /* Unknown */\n || this.keyCode === 5 /* Ctrl */\n || this.keyCode === 57 /* Meta */\n || this.keyCode === 6 /* Alt */\n || this.keyCode === 4 /* Shift */);\n };\n /**\n * Does this keybinding refer to the key code of a modifier and it also has the modifier flag?\n */\n SimpleKeybinding.prototype.isDuplicateModifierCase = function () {\n return ((this.ctrlKey && this.keyCode === 5 /* Ctrl */)\n || (this.shiftKey && this.keyCode === 4 /* Shift */)\n || (this.altKey && this.keyCode === 6 /* Alt */)\n || (this.metaKey && this.keyCode === 57 /* Meta */));\n };\n return SimpleKeybinding;\n}());\nexport { SimpleKeybinding };\nvar ChordKeybinding = /** @class */ (function () {\n function ChordKeybinding(firstPart, chordPart) {\n this.type = 2 /* Chord */;\n this.firstPart = firstPart;\n this.chordPart = chordPart;\n }\n return ChordKeybinding;\n}());\nexport { ChordKeybinding };\nvar ResolvedKeybindingPart = /** @class */ (function () {\n function ResolvedKeybindingPart(ctrlKey, shiftKey, altKey, metaKey, kbLabel, kbAriaLabel) {\n this.ctrlKey = ctrlKey;\n this.shiftKey = shiftKey;\n this.altKey = altKey;\n this.metaKey = metaKey;\n this.keyLabel = kbLabel;\n this.keyAriaLabel = kbAriaLabel;\n }\n return ResolvedKeybindingPart;\n}());\nexport { ResolvedKeybindingPart };\n/**\n * A resolved keybinding. Can be a simple keybinding or a chord keybinding.\n */\nvar ResolvedKeybinding = /** @class */ (function () {\n function ResolvedKeybinding() {\n }\n return ResolvedKeybinding;\n}());\nexport { ResolvedKeybinding };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport { toDisposable } from '../../../base/common/lifecycle';\nimport { validateConstraints } from '../../../base/common/types';\nimport { createDecorator } from '../../instantiation/common/instantiation';\nimport { LinkedList } from '../../../base/common/linkedList';\nexport var ICommandService = createDecorator('commandService');\nexport var CommandsRegistry = new /** @class */ (function () {\n function class_1() {\n this._commands = new Map();\n }\n class_1.prototype.registerCommand = function (idOrCommand, handler) {\n var _this = this;\n if (!idOrCommand) {\n throw new Error(\"invalid command\");\n }\n if (typeof idOrCommand === 'string') {\n if (!handler) {\n throw new Error(\"invalid command\");\n }\n return this.registerCommand({ id: idOrCommand, handler: handler });\n }\n // add argument validation if rich command metadata is provided\n if (idOrCommand.description) {\n var constraints_1 = [];\n for (var _i = 0, _a = idOrCommand.description.args; _i < _a.length; _i++) {\n var arg = _a[_i];\n constraints_1.push(arg.constraint);\n }\n var actualHandler_1 = idOrCommand.handler;\n idOrCommand.handler = function (accessor) {\n var args = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n args[_i - 1] = arguments[_i];\n }\n validateConstraints(args, constraints_1);\n return actualHandler_1.apply(void 0, [accessor].concat(args));\n };\n }\n // find a place to store the command\n var id = idOrCommand.id;\n var commands = this._commands.get(id);\n if (!commands) {\n commands = new LinkedList();\n this._commands.set(id, commands);\n }\n var removeFn = commands.unshift(idOrCommand);\n return toDisposable(function () {\n removeFn();\n if (_this._commands.get(id).isEmpty()) {\n _this._commands.delete(id);\n }\n });\n };\n class_1.prototype.registerCommandAlias = function (oldId, newId) {\n return CommandsRegistry.registerCommand(oldId, function (accessor) {\n var args = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n args[_i - 1] = arguments[_i];\n }\n var _a;\n (_a = accessor.get(ICommandService)).executeCommand.apply(_a, [newId].concat(args));\n });\n };\n class_1.prototype.getCommand = function (id) {\n var list = this._commands.get(id);\n if (!list || list.isEmpty()) {\n return undefined;\n }\n return list.iterator().next().value;\n };\n class_1.prototype.getCommands = function () {\n var _this = this;\n var result = Object.create(null);\n this._commands.forEach(function (value, key) {\n result[key] = _this.getCommand(key);\n });\n return result;\n };\n return class_1;\n}());\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\n/**\n * Throws an error with the provided message if the provided value does not evaluate to a true Javascript value.\n */\nexport function ok(value, message) {\n if (!value || value === null) {\n throw new Error(message ? 'Assertion failed (' + message + ')' : 'Assertion Failed');\n }\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport * as Types from '../../../base/common/types';\nimport * as Assert from '../../../base/common/assert';\nvar RegistryImpl = /** @class */ (function () {\n function RegistryImpl() {\n this.data = {};\n }\n RegistryImpl.prototype.add = function (id, data) {\n Assert.ok(Types.isString(id));\n Assert.ok(Types.isObject(data));\n Assert.ok(!this.data.hasOwnProperty(id), 'There is already an extension with this id');\n this.data[id] = data;\n };\n RegistryImpl.prototype.as = function (id) {\n return this.data[id] || null;\n };\n return RegistryImpl;\n}());\nexport var Registry = new RegistryImpl();\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport { createKeybinding } from '../../../base/common/keyCodes';\nimport { OS } from '../../../base/common/platform';\nimport { CommandsRegistry } from '../../commands/common/commands';\nimport { Registry } from '../../registry/common/platform';\nvar KeybindingsRegistryImpl = /** @class */ (function () {\n function KeybindingsRegistryImpl() {\n this._keybindings = [];\n this._keybindingsSorted = true;\n }\n /**\n * Take current platform into account and reduce to primary & secondary.\n */\n KeybindingsRegistryImpl.bindToCurrentPlatform = function (kb) {\n if (OS === 1 /* Windows */) {\n if (kb && kb.win) {\n return kb.win;\n }\n }\n else if (OS === 2 /* Macintosh */) {\n if (kb && kb.mac) {\n return kb.mac;\n }\n }\n else {\n if (kb && kb.linux) {\n return kb.linux;\n }\n }\n return kb;\n };\n KeybindingsRegistryImpl.prototype.registerKeybindingRule = function (rule, source) {\n if (source === void 0) { source = 0 /* Core */; }\n var actualKb = KeybindingsRegistryImpl.bindToCurrentPlatform(rule);\n if (actualKb && actualKb.primary) {\n this._registerDefaultKeybinding(createKeybinding(actualKb.primary, OS), rule.id, rule.weight, 0, rule.when, source);\n }\n if (actualKb && Array.isArray(actualKb.secondary)) {\n for (var i = 0, len = actualKb.secondary.length; i < len; i++) {\n var k = actualKb.secondary[i];\n this._registerDefaultKeybinding(createKeybinding(k, OS), rule.id, rule.weight, -i - 1, rule.when, source);\n }\n }\n };\n KeybindingsRegistryImpl.prototype.registerCommandAndKeybindingRule = function (desc, source) {\n if (source === void 0) { source = 0 /* Core */; }\n this.registerKeybindingRule(desc, source);\n CommandsRegistry.registerCommand(desc);\n };\n KeybindingsRegistryImpl._mightProduceChar = function (keyCode) {\n if (keyCode >= 21 /* KEY_0 */ && keyCode <= 30 /* KEY_9 */) {\n return true;\n }\n if (keyCode >= 31 /* KEY_A */ && keyCode <= 56 /* KEY_Z */) {\n return true;\n }\n return (keyCode === 80 /* US_SEMICOLON */\n || keyCode === 81 /* US_EQUAL */\n || keyCode === 82 /* US_COMMA */\n || keyCode === 83 /* US_MINUS */\n || keyCode === 84 /* US_DOT */\n || keyCode === 85 /* US_SLASH */\n || keyCode === 86 /* US_BACKTICK */\n || keyCode === 110 /* ABNT_C1 */\n || keyCode === 111 /* ABNT_C2 */\n || keyCode === 87 /* US_OPEN_SQUARE_BRACKET */\n || keyCode === 88 /* US_BACKSLASH */\n || keyCode === 89 /* US_CLOSE_SQUARE_BRACKET */\n || keyCode === 90 /* US_QUOTE */\n || keyCode === 91 /* OEM_8 */\n || keyCode === 92 /* OEM_102 */);\n };\n KeybindingsRegistryImpl.prototype._assertNoCtrlAlt = function (keybinding, commandId) {\n if (keybinding.ctrlKey && keybinding.altKey && !keybinding.metaKey) {\n if (KeybindingsRegistryImpl._mightProduceChar(keybinding.keyCode)) {\n console.warn('Ctrl+Alt+ keybindings should not be used by default under Windows. Offender: ', keybinding, ' for ', commandId);\n }\n }\n };\n KeybindingsRegistryImpl.prototype._registerDefaultKeybinding = function (keybinding, commandId, weight1, weight2, when, source) {\n if (source === 0 /* Core */ && OS === 1 /* Windows */) {\n if (keybinding.type === 2 /* Chord */) {\n this._assertNoCtrlAlt(keybinding.firstPart, commandId);\n }\n else {\n this._assertNoCtrlAlt(keybinding, commandId);\n }\n }\n this._keybindings.push({\n keybinding: keybinding,\n command: commandId,\n commandArgs: undefined,\n when: when,\n weight1: weight1,\n weight2: weight2\n });\n this._keybindingsSorted = false;\n };\n KeybindingsRegistryImpl.prototype.getDefaultKeybindings = function () {\n if (!this._keybindingsSorted) {\n this._keybindings.sort(sorter);\n this._keybindingsSorted = true;\n }\n return this._keybindings.slice(0);\n };\n return KeybindingsRegistryImpl;\n}());\nexport var KeybindingsRegistry = new KeybindingsRegistryImpl();\n// Define extension point ids\nexport var Extensions = {\n EditorModes: 'platform.keybindingsRegistry'\n};\nRegistry.add(Extensions.EditorModes, KeybindingsRegistry);\nfunction sorter(a, b) {\n if (a.weight1 !== b.weight1) {\n return a.weight1 - b.weight1;\n }\n if (a.command < b.command) {\n return -1;\n }\n if (a.command > b.command) {\n return 1;\n }\n return a.weight2 - b.weight2;\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport { createDecorator } from '../../instantiation/common/instantiation';\nexport var ITelemetryService = createDecorator('telemetryService');\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { createDecorator } from '../../instantiation/common/instantiation';\nimport { isFalsyOrWhitespace } from '../../../base/common/strings';\nexport var ContextKeyExprType;\n(function (ContextKeyExprType) {\n ContextKeyExprType[ContextKeyExprType[\"Defined\"] = 1] = \"Defined\";\n ContextKeyExprType[ContextKeyExprType[\"Not\"] = 2] = \"Not\";\n ContextKeyExprType[ContextKeyExprType[\"Equals\"] = 3] = \"Equals\";\n ContextKeyExprType[ContextKeyExprType[\"NotEquals\"] = 4] = \"NotEquals\";\n ContextKeyExprType[ContextKeyExprType[\"And\"] = 5] = \"And\";\n ContextKeyExprType[ContextKeyExprType[\"Regex\"] = 6] = \"Regex\";\n})(ContextKeyExprType || (ContextKeyExprType = {}));\nvar ContextKeyExpr = /** @class */ (function () {\n function ContextKeyExpr() {\n }\n ContextKeyExpr.has = function (key) {\n return new ContextKeyDefinedExpr(key);\n };\n ContextKeyExpr.equals = function (key, value) {\n return new ContextKeyEqualsExpr(key, value);\n };\n ContextKeyExpr.regex = function (key, value) {\n return new ContextKeyRegexExpr(key, value);\n };\n ContextKeyExpr.not = function (key) {\n return new ContextKeyNotExpr(key);\n };\n ContextKeyExpr.and = function () {\n var expr = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n expr[_i] = arguments[_i];\n }\n return new ContextKeyAndExpr(expr);\n };\n ContextKeyExpr.deserialize = function (serialized) {\n var _this = this;\n if (!serialized) {\n return null;\n }\n var pieces = serialized.split('&&');\n var result = new ContextKeyAndExpr(pieces.map(function (p) { return _this._deserializeOne(p); }));\n return result.normalize();\n };\n ContextKeyExpr._deserializeOne = function (serializedOne) {\n serializedOne = serializedOne.trim();\n if (serializedOne.indexOf('!=') >= 0) {\n var pieces = serializedOne.split('!=');\n return new ContextKeyNotEqualsExpr(pieces[0].trim(), this._deserializeValue(pieces[1]));\n }\n if (serializedOne.indexOf('==') >= 0) {\n var pieces = serializedOne.split('==');\n return new ContextKeyEqualsExpr(pieces[0].trim(), this._deserializeValue(pieces[1]));\n }\n if (serializedOne.indexOf('=~') >= 0) {\n var pieces = serializedOne.split('=~');\n return new ContextKeyRegexExpr(pieces[0].trim(), this._deserializeRegexValue(pieces[1]));\n }\n if (/^\\!\\s*/.test(serializedOne)) {\n return new ContextKeyNotExpr(serializedOne.substr(1).trim());\n }\n return new ContextKeyDefinedExpr(serializedOne);\n };\n ContextKeyExpr._deserializeValue = function (serializedValue) {\n serializedValue = serializedValue.trim();\n if (serializedValue === 'true') {\n return true;\n }\n if (serializedValue === 'false') {\n return false;\n }\n var m = /^'([^']*)'$/.exec(serializedValue);\n if (m) {\n return m[1].trim();\n }\n return serializedValue;\n };\n ContextKeyExpr._deserializeRegexValue = function (serializedValue) {\n if (isFalsyOrWhitespace(serializedValue)) {\n console.warn('missing regexp-value for =~-expression');\n return null;\n }\n var start = serializedValue.indexOf('/');\n var end = serializedValue.lastIndexOf('/');\n if (start === end || start < 0 /* || to < 0 */) {\n console.warn(\"bad regexp-value '\" + serializedValue + \"', missing /-enclosure\");\n return null;\n }\n var value = serializedValue.slice(start + 1, end);\n var caseIgnoreFlag = serializedValue[end + 1] === 'i' ? 'i' : '';\n try {\n return new RegExp(value, caseIgnoreFlag);\n }\n catch (e) {\n console.warn(\"bad regexp-value '\" + serializedValue + \"', parse error: \" + e);\n return null;\n }\n };\n return ContextKeyExpr;\n}());\nexport { ContextKeyExpr };\nfunction cmp(a, b) {\n var aType = a.getType();\n var bType = b.getType();\n if (aType !== bType) {\n return aType - bType;\n }\n switch (aType) {\n case ContextKeyExprType.Defined:\n return a.cmp(b);\n case ContextKeyExprType.Not:\n return a.cmp(b);\n case ContextKeyExprType.Equals:\n return a.cmp(b);\n case ContextKeyExprType.NotEquals:\n return a.cmp(b);\n case ContextKeyExprType.Regex:\n return a.cmp(b);\n default:\n throw new Error('Unknown ContextKeyExpr!');\n }\n}\nvar ContextKeyDefinedExpr = /** @class */ (function () {\n function ContextKeyDefinedExpr(key) {\n this.key = key;\n }\n ContextKeyDefinedExpr.prototype.getType = function () {\n return ContextKeyExprType.Defined;\n };\n ContextKeyDefinedExpr.prototype.cmp = function (other) {\n if (this.key < other.key) {\n return -1;\n }\n if (this.key > other.key) {\n return 1;\n }\n return 0;\n };\n ContextKeyDefinedExpr.prototype.equals = function (other) {\n if (other instanceof ContextKeyDefinedExpr) {\n return (this.key === other.key);\n }\n return false;\n };\n ContextKeyDefinedExpr.prototype.evaluate = function (context) {\n return (!!context.getValue(this.key));\n };\n ContextKeyDefinedExpr.prototype.normalize = function () {\n return this;\n };\n ContextKeyDefinedExpr.prototype.keys = function () {\n return [this.key];\n };\n return ContextKeyDefinedExpr;\n}());\nexport { ContextKeyDefinedExpr };\nvar ContextKeyEqualsExpr = /** @class */ (function () {\n function ContextKeyEqualsExpr(key, value) {\n this.key = key;\n this.value = value;\n }\n ContextKeyEqualsExpr.prototype.getType = function () {\n return ContextKeyExprType.Equals;\n };\n ContextKeyEqualsExpr.prototype.cmp = function (other) {\n if (this.key < other.key) {\n return -1;\n }\n if (this.key > other.key) {\n return 1;\n }\n if (this.value < other.value) {\n return -1;\n }\n if (this.value > other.value) {\n return 1;\n }\n return 0;\n };\n ContextKeyEqualsExpr.prototype.equals = function (other) {\n if (other instanceof ContextKeyEqualsExpr) {\n return (this.key === other.key && this.value === other.value);\n }\n return false;\n };\n ContextKeyEqualsExpr.prototype.evaluate = function (context) {\n /* tslint:disable:triple-equals */\n // Intentional ==\n return (context.getValue(this.key) == this.value);\n /* tslint:enable:triple-equals */\n };\n ContextKeyEqualsExpr.prototype.normalize = function () {\n if (typeof this.value === 'boolean') {\n if (this.value) {\n return new ContextKeyDefinedExpr(this.key);\n }\n return new ContextKeyNotExpr(this.key);\n }\n return this;\n };\n ContextKeyEqualsExpr.prototype.keys = function () {\n return [this.key];\n };\n return ContextKeyEqualsExpr;\n}());\nexport { ContextKeyEqualsExpr };\nvar ContextKeyNotEqualsExpr = /** @class */ (function () {\n function ContextKeyNotEqualsExpr(key, value) {\n this.key = key;\n this.value = value;\n }\n ContextKeyNotEqualsExpr.prototype.getType = function () {\n return ContextKeyExprType.NotEquals;\n };\n ContextKeyNotEqualsExpr.prototype.cmp = function (other) {\n if (this.key < other.key) {\n return -1;\n }\n if (this.key > other.key) {\n return 1;\n }\n if (this.value < other.value) {\n return -1;\n }\n if (this.value > other.value) {\n return 1;\n }\n return 0;\n };\n ContextKeyNotEqualsExpr.prototype.equals = function (other) {\n if (other instanceof ContextKeyNotEqualsExpr) {\n return (this.key === other.key && this.value === other.value);\n }\n return false;\n };\n ContextKeyNotEqualsExpr.prototype.evaluate = function (context) {\n /* tslint:disable:triple-equals */\n // Intentional !=\n return (context.getValue(this.key) != this.value);\n /* tslint:enable:triple-equals */\n };\n ContextKeyNotEqualsExpr.prototype.normalize = function () {\n if (typeof this.value === 'boolean') {\n if (this.value) {\n return new ContextKeyNotExpr(this.key);\n }\n return new ContextKeyDefinedExpr(this.key);\n }\n return this;\n };\n ContextKeyNotEqualsExpr.prototype.keys = function () {\n return [this.key];\n };\n return ContextKeyNotEqualsExpr;\n}());\nexport { ContextKeyNotEqualsExpr };\nvar ContextKeyNotExpr = /** @class */ (function () {\n function ContextKeyNotExpr(key) {\n this.key = key;\n }\n ContextKeyNotExpr.prototype.getType = function () {\n return ContextKeyExprType.Not;\n };\n ContextKeyNotExpr.prototype.cmp = function (other) {\n if (this.key < other.key) {\n return -1;\n }\n if (this.key > other.key) {\n return 1;\n }\n return 0;\n };\n ContextKeyNotExpr.prototype.equals = function (other) {\n if (other instanceof ContextKeyNotExpr) {\n return (this.key === other.key);\n }\n return false;\n };\n ContextKeyNotExpr.prototype.evaluate = function (context) {\n return (!context.getValue(this.key));\n };\n ContextKeyNotExpr.prototype.normalize = function () {\n return this;\n };\n ContextKeyNotExpr.prototype.keys = function () {\n return [this.key];\n };\n return ContextKeyNotExpr;\n}());\nexport { ContextKeyNotExpr };\nvar ContextKeyRegexExpr = /** @class */ (function () {\n function ContextKeyRegexExpr(key, regexp) {\n this.key = key;\n this.regexp = regexp;\n //\n }\n ContextKeyRegexExpr.prototype.getType = function () {\n return ContextKeyExprType.Regex;\n };\n ContextKeyRegexExpr.prototype.cmp = function (other) {\n if (this.key < other.key) {\n return -1;\n }\n if (this.key > other.key) {\n return 1;\n }\n var source = this.regexp ? this.regexp.source : undefined;\n if (source < other.regexp.source) {\n return -1;\n }\n if (source > other.regexp.source) {\n return 1;\n }\n return 0;\n };\n ContextKeyRegexExpr.prototype.equals = function (other) {\n if (other instanceof ContextKeyRegexExpr) {\n var source = this.regexp ? this.regexp.source : undefined;\n return (this.key === other.key && source === other.regexp.source);\n }\n return false;\n };\n ContextKeyRegexExpr.prototype.evaluate = function (context) {\n return this.regexp ? this.regexp.test(context.getValue(this.key)) : false;\n };\n ContextKeyRegexExpr.prototype.normalize = function () {\n return this;\n };\n ContextKeyRegexExpr.prototype.keys = function () {\n return [this.key];\n };\n return ContextKeyRegexExpr;\n}());\nexport { ContextKeyRegexExpr };\nvar ContextKeyAndExpr = /** @class */ (function () {\n function ContextKeyAndExpr(expr) {\n this.expr = ContextKeyAndExpr._normalizeArr(expr);\n }\n ContextKeyAndExpr.prototype.getType = function () {\n return ContextKeyExprType.And;\n };\n ContextKeyAndExpr.prototype.equals = function (other) {\n if (other instanceof ContextKeyAndExpr) {\n if (this.expr.length !== other.expr.length) {\n return false;\n }\n for (var i = 0, len = this.expr.length; i < len; i++) {\n if (!this.expr[i].equals(other.expr[i])) {\n return false;\n }\n }\n return true;\n }\n return false;\n };\n ContextKeyAndExpr.prototype.evaluate = function (context) {\n for (var i = 0, len = this.expr.length; i < len; i++) {\n if (!this.expr[i].evaluate(context)) {\n return false;\n }\n }\n return true;\n };\n ContextKeyAndExpr._normalizeArr = function (arr) {\n var expr = [];\n if (arr) {\n for (var i = 0, len = arr.length; i < len; i++) {\n var e = arr[i];\n if (!e) {\n continue;\n }\n e = e.normalize();\n if (!e) {\n continue;\n }\n if (e instanceof ContextKeyAndExpr) {\n expr = expr.concat(e.expr);\n continue;\n }\n expr.push(e);\n }\n expr.sort(cmp);\n }\n return expr;\n };\n ContextKeyAndExpr.prototype.normalize = function () {\n if (this.expr.length === 0) {\n return null;\n }\n if (this.expr.length === 1) {\n return this.expr[0];\n }\n return this;\n };\n ContextKeyAndExpr.prototype.keys = function () {\n var result = [];\n for (var _i = 0, _a = this.expr; _i < _a.length; _i++) {\n var expr = _a[_i];\n result.push.apply(result, expr.keys());\n }\n return result;\n };\n return ContextKeyAndExpr;\n}());\nexport { ContextKeyAndExpr };\nvar RawContextKey = /** @class */ (function (_super) {\n __extends(RawContextKey, _super);\n function RawContextKey(key, defaultValue) {\n var _this = _super.call(this, key) || this;\n _this._defaultValue = defaultValue;\n return _this;\n }\n RawContextKey.prototype.bindTo = function (target) {\n return target.createKey(this.key, this._defaultValue);\n };\n RawContextKey.prototype.toNegated = function () {\n return ContextKeyExpr.not(this.key);\n };\n return RawContextKey;\n}(ContextKeyDefinedExpr));\nexport { RawContextKey };\nexport var IContextKeyService = createDecorator('contextKeyService');\nexport var SET_CONTEXT_COMMAND_ID = 'setContext';\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport { TPromise } from './winjs.base';\nimport { Emitter } from './event';\nvar Action = /** @class */ (function () {\n function Action(id, label, cssClass, enabled, actionCallback) {\n if (label === void 0) { label = ''; }\n if (cssClass === void 0) { cssClass = ''; }\n if (enabled === void 0) { enabled = true; }\n this._onDidChange = new Emitter();\n this._id = id;\n this._label = label;\n this._cssClass = cssClass;\n this._enabled = enabled;\n this._actionCallback = actionCallback;\n }\n Action.prototype.dispose = function () {\n this._onDidChange.dispose();\n };\n Object.defineProperty(Action.prototype, \"onDidChange\", {\n get: function () {\n return this._onDidChange.event;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Action.prototype, \"id\", {\n get: function () {\n return this._id;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Action.prototype, \"label\", {\n get: function () {\n return this._label;\n },\n set: function (value) {\n this._setLabel(value);\n },\n enumerable: true,\n configurable: true\n });\n Action.prototype._setLabel = function (value) {\n if (this._label !== value) {\n this._label = value;\n this._onDidChange.fire({ label: value });\n }\n };\n Object.defineProperty(Action.prototype, \"tooltip\", {\n get: function () {\n return this._tooltip;\n },\n set: function (value) {\n this._setTooltip(value);\n },\n enumerable: true,\n configurable: true\n });\n Action.prototype._setTooltip = function (value) {\n if (this._tooltip !== value) {\n this._tooltip = value;\n this._onDidChange.fire({ tooltip: value });\n }\n };\n Object.defineProperty(Action.prototype, \"class\", {\n get: function () {\n return this._cssClass;\n },\n set: function (value) {\n this._setClass(value);\n },\n enumerable: true,\n configurable: true\n });\n Action.prototype._setClass = function (value) {\n if (this._cssClass !== value) {\n this._cssClass = value;\n this._onDidChange.fire({ class: value });\n }\n };\n Object.defineProperty(Action.prototype, \"enabled\", {\n get: function () {\n return this._enabled;\n },\n set: function (value) {\n this._setEnabled(value);\n },\n enumerable: true,\n configurable: true\n });\n Action.prototype._setEnabled = function (value) {\n if (this._enabled !== value) {\n this._enabled = value;\n this._onDidChange.fire({ enabled: value });\n }\n };\n Object.defineProperty(Action.prototype, \"checked\", {\n get: function () {\n return this._checked;\n },\n set: function (value) {\n this._setChecked(value);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Action.prototype, \"radio\", {\n get: function () {\n return this._radio;\n },\n set: function (value) {\n this._setRadio(value);\n },\n enumerable: true,\n configurable: true\n });\n Action.prototype._setChecked = function (value) {\n if (this._checked !== value) {\n this._checked = value;\n this._onDidChange.fire({ checked: value });\n }\n };\n Action.prototype._setRadio = function (value) {\n if (this._radio !== value) {\n this._radio = value;\n this._onDidChange.fire({ radio: value });\n }\n };\n Object.defineProperty(Action.prototype, \"order\", {\n get: function () {\n return this._order;\n },\n set: function (value) {\n this._order = value;\n },\n enumerable: true,\n configurable: true\n });\n Action.prototype.run = function (event, data) {\n if (this._actionCallback !== void 0) {\n return this._actionCallback(event);\n }\n return TPromise.as(true);\n };\n return Action;\n}());\nexport { Action };\nvar ActionRunner = /** @class */ (function () {\n function ActionRunner() {\n this._onDidBeforeRun = new Emitter();\n this._onDidRun = new Emitter();\n }\n Object.defineProperty(ActionRunner.prototype, \"onDidRun\", {\n get: function () {\n return this._onDidRun.event;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ActionRunner.prototype, \"onDidBeforeRun\", {\n get: function () {\n return this._onDidBeforeRun.event;\n },\n enumerable: true,\n configurable: true\n });\n ActionRunner.prototype.run = function (action, context) {\n var _this = this;\n if (!action.enabled) {\n return TPromise.as(null);\n }\n this._onDidBeforeRun.fire({ action: action });\n return this.runAction(action, context).then(function (result) {\n _this._onDidRun.fire({ action: action, result: result });\n }, function (error) {\n _this._onDidRun.fire({ action: action, error: error });\n });\n };\n ActionRunner.prototype.runAction = function (action, context) {\n var res = context ? action.run(context) : action.run();\n if (TPromise.is(res)) {\n return res;\n }\n return TPromise.wrap(res);\n };\n ActionRunner.prototype.dispose = function () {\n this._onDidBeforeRun.dispose();\n this._onDidRun.dispose();\n };\n return ActionRunner;\n}());\nexport { ActionRunner };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __param = (this && this.__param) || function (paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n};\nimport { Action } from '../../../base/common/actions';\nimport { createDecorator } from '../../instantiation/common/instantiation';\nimport { IContextKeyService } from '../../contextkey/common/contextkey';\nimport { ICommandService } from '../../commands/common/commands';\nexport function isIMenuItem(item) {\n return item.command !== undefined;\n}\nvar MenuId = /** @class */ (function () {\n function MenuId() {\n this.id = String(MenuId.ID++);\n }\n MenuId.ID = 1;\n MenuId.EditorContext = new MenuId();\n MenuId.CommandPalette = new MenuId();\n MenuId.MenubarEditMenu = new MenuId();\n MenuId.MenubarSelectionMenu = new MenuId();\n return MenuId;\n}());\nexport { MenuId };\nexport var IMenuService = createDecorator('menuService');\nexport var MenuRegistry = new /** @class */ (function () {\n function class_1() {\n this._commands = Object.create(null);\n this._menuItems = Object.create(null);\n }\n class_1.prototype.addCommand = function (command) {\n var old = this._commands[command.id];\n this._commands[command.id] = command;\n return old !== void 0;\n };\n class_1.prototype.getCommand = function (id) {\n return this._commands[id];\n };\n class_1.prototype.appendMenuItem = function (_a, item) {\n var id = _a.id;\n var array = this._menuItems[id];\n if (!array) {\n this._menuItems[id] = array = [item];\n }\n else {\n array.push(item);\n }\n return {\n dispose: function () {\n var idx = array.indexOf(item);\n if (idx >= 0) {\n array.splice(idx, 1);\n }\n }\n };\n };\n class_1.prototype.getMenuItems = function (_a) {\n var id = _a.id;\n var result = this._menuItems[id] || [];\n if (id === MenuId.CommandPalette.id) {\n // CommandPalette is special because it shows\n // all commands by default\n this._appendImplicitItems(result);\n }\n return result;\n };\n class_1.prototype._appendImplicitItems = function (result) {\n var set = new Set();\n var temp = result.filter(function (item) { return isIMenuItem(item); });\n for (var _i = 0, temp_1 = temp; _i < temp_1.length; _i++) {\n var _a = temp_1[_i], command = _a.command, alt = _a.alt;\n set.add(command.id);\n if (alt) {\n set.add(alt.id);\n }\n }\n for (var id in this._commands) {\n if (!set.has(id)) {\n result.push({ command: this._commands[id] });\n }\n }\n };\n return class_1;\n}());\nvar ExecuteCommandAction = /** @class */ (function (_super) {\n __extends(ExecuteCommandAction, _super);\n function ExecuteCommandAction(id, label, _commandService) {\n var _this = _super.call(this, id, label) || this;\n _this._commandService = _commandService;\n return _this;\n }\n ExecuteCommandAction.prototype.run = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var _a;\n return (_a = this._commandService).executeCommand.apply(_a, [this.id].concat(args));\n };\n ExecuteCommandAction = __decorate([\n __param(2, ICommandService)\n ], ExecuteCommandAction);\n return ExecuteCommandAction;\n}(Action));\nexport { ExecuteCommandAction };\nvar SubmenuItemAction = /** @class */ (function (_super) {\n __extends(SubmenuItemAction, _super);\n function SubmenuItemAction(item) {\n var _this = this;\n typeof item.title === 'string' ? _this = _super.call(this, '', item.title, 'submenu') || this : _this = _super.call(this, '', item.title.value, 'submenu') || this;\n _this.item = item;\n return _this;\n }\n return SubmenuItemAction;\n}(Action));\nexport { SubmenuItemAction };\nvar MenuItemAction = /** @class */ (function (_super) {\n __extends(MenuItemAction, _super);\n function MenuItemAction(item, alt, options, contextKeyService, commandService) {\n var _this = this;\n typeof item.title === 'string' ? _this = _super.call(this, item.id, item.title, commandService) || this : _this = _super.call(this, item.id, item.title.value, commandService) || this;\n _this._cssClass = undefined;\n _this._enabled = !item.precondition || contextKeyService.contextMatchesRules(item.precondition);\n _this._options = options || {};\n _this.item = item;\n _this.alt = alt ? new MenuItemAction(alt, undefined, _this._options, contextKeyService, commandService) : undefined;\n return _this;\n }\n MenuItemAction.prototype.run = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var runArgs = [];\n if (this._options.arg) {\n runArgs = runArgs.concat([this._options.arg]);\n }\n if (this._options.shouldForwardArgs) {\n runArgs = runArgs.concat(args);\n }\n return _super.prototype.run.apply(this, runArgs);\n };\n MenuItemAction = __decorate([\n __param(3, IContextKeyService),\n __param(4, ICommandService)\n ], MenuItemAction);\n return MenuItemAction;\n}(ExecuteCommandAction));\nexport { MenuItemAction };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n};\nimport { illegalArgument } from '../../base/common/errors';\nimport URI from '../../base/common/uri';\nimport { CommandsRegistry } from '../../platform/commands/common/commands';\nimport { KeybindingsRegistry } from '../../platform/keybinding/common/keybindingsRegistry';\nimport { Registry } from '../../platform/registry/common/platform';\nimport { ITelemetryService } from '../../platform/telemetry/common/telemetry';\nimport { Position } from '../common/core/position';\nimport { IModelService } from '../common/services/modelService';\nimport { MenuId, MenuRegistry } from '../../platform/actions/common/actions';\nimport { IContextKeyService, ContextKeyExpr } from '../../platform/contextkey/common/contextkey';\nimport { ICodeEditorService } from './services/codeEditorService';\nvar Command = /** @class */ (function () {\n function Command(opts) {\n this.id = opts.id;\n this.precondition = opts.precondition;\n this._kbOpts = opts.kbOpts;\n this._menubarOpts = opts.menubarOpts;\n this._description = opts.description;\n }\n Command.prototype.register = function () {\n var _this = this;\n if (this._menubarOpts) {\n MenuRegistry.appendMenuItem(this._menubarOpts.menuId, {\n group: this._menubarOpts.group,\n command: {\n id: this.id,\n title: this._menubarOpts.title,\n },\n when: this._menubarOpts.when,\n order: this._menubarOpts.order\n });\n }\n if (this._kbOpts) {\n var kbWhen = this._kbOpts.kbExpr;\n if (this.precondition) {\n if (kbWhen) {\n kbWhen = ContextKeyExpr.and(kbWhen, this.precondition);\n }\n else {\n kbWhen = this.precondition;\n }\n }\n KeybindingsRegistry.registerCommandAndKeybindingRule({\n id: this.id,\n handler: function (accessor, args) { return _this.runCommand(accessor, args); },\n weight: this._kbOpts.weight,\n when: kbWhen,\n primary: this._kbOpts.primary,\n secondary: this._kbOpts.secondary,\n win: this._kbOpts.win,\n linux: this._kbOpts.linux,\n mac: this._kbOpts.mac,\n description: this._description\n });\n }\n else {\n CommandsRegistry.registerCommand({\n id: this.id,\n handler: function (accessor, args) { return _this.runCommand(accessor, args); },\n description: this._description\n });\n }\n };\n return Command;\n}());\nexport { Command };\nvar EditorCommand = /** @class */ (function (_super) {\n __extends(EditorCommand, _super);\n function EditorCommand() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * Create a command class that is bound to a certain editor contribution.\n */\n EditorCommand.bindToContribution = function (controllerGetter) {\n return /** @class */ (function (_super) {\n __extends(EditorControllerCommandImpl, _super);\n function EditorControllerCommandImpl(opts) {\n var _this = _super.call(this, opts) || this;\n _this._callback = opts.handler;\n return _this;\n }\n EditorControllerCommandImpl.prototype.runEditorCommand = function (accessor, editor, args) {\n var controller = controllerGetter(editor);\n if (controller) {\n this._callback(controllerGetter(editor));\n }\n };\n return EditorControllerCommandImpl;\n }(EditorCommand));\n };\n EditorCommand.prototype.runCommand = function (accessor, args) {\n var _this = this;\n var codeEditorService = accessor.get(ICodeEditorService);\n // Find the editor with text focus or active\n var editor = codeEditorService.getFocusedCodeEditor() || codeEditorService.getActiveCodeEditor();\n if (!editor) {\n // well, at least we tried...\n return;\n }\n return editor.invokeWithinContext(function (editorAccessor) {\n var kbService = editorAccessor.get(IContextKeyService);\n if (!kbService.contextMatchesRules(_this.precondition)) {\n // precondition does not hold\n return;\n }\n return _this.runEditorCommand(editorAccessor, editor, args);\n });\n };\n return EditorCommand;\n}(Command));\nexport { EditorCommand };\nvar EditorAction = /** @class */ (function (_super) {\n __extends(EditorAction, _super);\n function EditorAction(opts) {\n var _this = _super.call(this, opts) || this;\n _this.label = opts.label;\n _this.alias = opts.alias;\n _this.menuOpts = opts.menuOpts;\n return _this;\n }\n EditorAction.prototype.register = function () {\n if (this.menuOpts) {\n MenuRegistry.appendMenuItem(MenuId.EditorContext, {\n command: {\n id: this.id,\n title: this.label\n },\n when: ContextKeyExpr.and(this.precondition, this.menuOpts.when),\n group: this.menuOpts.group,\n order: this.menuOpts.order\n });\n }\n _super.prototype.register.call(this);\n };\n EditorAction.prototype.runEditorCommand = function (accessor, editor, args) {\n this.reportTelemetry(accessor, editor);\n return this.run(accessor, editor, args || {});\n };\n EditorAction.prototype.reportTelemetry = function (accessor, editor) {\n /* __GDPR__\n \"editorActionInvoked\" : {\n \"name\" : { \"classification\": \"SystemMetaData\", \"purpose\": \"FeatureInsight\" },\n \"id\": { \"classification\": \"SystemMetaData\", \"purpose\": \"FeatureInsight\" },\n \"${include}\": [\n \"${EditorTelemetryData}\"\n ]\n }\n */\n accessor.get(ITelemetryService).publicLog('editorActionInvoked', __assign({ name: this.label, id: this.id }, editor.getTelemetryData()));\n };\n return EditorAction;\n}(EditorCommand));\nexport { EditorAction };\n//#endregion EditorAction\n// --- Registration of commands and actions\nexport function registerLanguageCommand(id, handler) {\n CommandsRegistry.registerCommand(id, function (accessor, args) { return handler(accessor, args || {}); });\n}\nexport function registerDefaultLanguageCommand(id, handler) {\n registerLanguageCommand(id, function (accessor, args) {\n var resource = args.resource, position = args.position;\n if (!(resource instanceof URI)) {\n throw illegalArgument('resource');\n }\n if (!Position.isIPosition(position)) {\n throw illegalArgument('position');\n }\n var model = accessor.get(IModelService).getModel(resource);\n if (!model) {\n throw illegalArgument('Can not find open model for ' + resource);\n }\n var editorPosition = Position.lift(position);\n return handler(model, editorPosition, args);\n });\n}\nexport function registerEditorCommand(editorCommand) {\n EditorContributionRegistry.INSTANCE.registerEditorCommand(editorCommand);\n return editorCommand;\n}\nexport function registerEditorAction(ctor) {\n EditorContributionRegistry.INSTANCE.registerEditorAction(new ctor());\n}\nexport function registerInstantiatedEditorAction(editorAction) {\n EditorContributionRegistry.INSTANCE.registerEditorAction(editorAction);\n}\nexport function registerEditorContribution(ctor) {\n EditorContributionRegistry.INSTANCE.registerEditorContribution(ctor);\n}\nexport var EditorExtensionsRegistry;\n(function (EditorExtensionsRegistry) {\n function getEditorCommand(commandId) {\n return EditorContributionRegistry.INSTANCE.getEditorCommand(commandId);\n }\n EditorExtensionsRegistry.getEditorCommand = getEditorCommand;\n function getEditorActions() {\n return EditorContributionRegistry.INSTANCE.getEditorActions();\n }\n EditorExtensionsRegistry.getEditorActions = getEditorActions;\n function getEditorContributions() {\n return EditorContributionRegistry.INSTANCE.getEditorContributions();\n }\n EditorExtensionsRegistry.getEditorContributions = getEditorContributions;\n})(EditorExtensionsRegistry || (EditorExtensionsRegistry = {}));\n// Editor extension points\nvar Extensions = {\n EditorCommonContributions: 'editor.contributions'\n};\nvar EditorContributionRegistry = /** @class */ (function () {\n function EditorContributionRegistry() {\n this.editorContributions = [];\n this.editorActions = [];\n this.editorCommands = Object.create(null);\n }\n EditorContributionRegistry.prototype.registerEditorContribution = function (ctor) {\n this.editorContributions.push(ctor);\n };\n EditorContributionRegistry.prototype.registerEditorAction = function (action) {\n action.register();\n this.editorActions.push(action);\n };\n EditorContributionRegistry.prototype.getEditorContributions = function () {\n return this.editorContributions.slice(0);\n };\n EditorContributionRegistry.prototype.getEditorActions = function () {\n return this.editorActions.slice(0);\n };\n EditorContributionRegistry.prototype.registerEditorCommand = function (editorCommand) {\n editorCommand.register();\n this.editorCommands[editorCommand.id] = editorCommand;\n };\n EditorContributionRegistry.prototype.getEditorCommand = function (commandId) {\n return (this.editorCommands[commandId] || null);\n };\n EditorContributionRegistry.INSTANCE = new EditorContributionRegistry();\n return EditorContributionRegistry;\n}());\nRegistry.add(Extensions.EditorCommonContributions, EditorContributionRegistry.INSTANCE);\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport { createDecorator } from '../../../platform/instantiation/common/instantiation';\nexport var ICodeEditorService = createDecorator('codeEditorService');\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport { Position } from '../core/position';\nimport { Range } from '../core/range';\nimport { SingleCursorState, CursorColumns } from './cursorCommon';\nvar ColumnSelection = /** @class */ (function () {\n function ColumnSelection() {\n }\n ColumnSelection._columnSelect = function (config, model, fromLineNumber, fromVisibleColumn, toLineNumber, toVisibleColumn) {\n var lineCount = Math.abs(toLineNumber - fromLineNumber) + 1;\n var reversed = (fromLineNumber > toLineNumber);\n var isRTL = (fromVisibleColumn > toVisibleColumn);\n var isLTR = (fromVisibleColumn < toVisibleColumn);\n var result = [];\n // console.log(`fromVisibleColumn: ${fromVisibleColumn}, toVisibleColumn: ${toVisibleColumn}`);\n for (var i = 0; i < lineCount; i++) {\n var lineNumber = fromLineNumber + (reversed ? -i : i);\n var startColumn = CursorColumns.columnFromVisibleColumn2(config, model, lineNumber, fromVisibleColumn);\n var endColumn = CursorColumns.columnFromVisibleColumn2(config, model, lineNumber, toVisibleColumn);\n var visibleStartColumn = CursorColumns.visibleColumnFromColumn2(config, model, new Position(lineNumber, startColumn));\n var visibleEndColumn = CursorColumns.visibleColumnFromColumn2(config, model, new Position(lineNumber, endColumn));\n // console.log(`lineNumber: ${lineNumber}: visibleStartColumn: ${visibleStartColumn}, visibleEndColumn: ${visibleEndColumn}`);\n if (isLTR) {\n if (visibleStartColumn > toVisibleColumn) {\n continue;\n }\n if (visibleEndColumn < fromVisibleColumn) {\n continue;\n }\n }\n if (isRTL) {\n if (visibleEndColumn > fromVisibleColumn) {\n continue;\n }\n if (visibleStartColumn < toVisibleColumn) {\n continue;\n }\n }\n result.push(new SingleCursorState(new Range(lineNumber, startColumn, lineNumber, startColumn), 0, new Position(lineNumber, endColumn), 0));\n }\n return {\n viewStates: result,\n reversed: reversed,\n toLineNumber: toLineNumber,\n toVisualColumn: toVisibleColumn\n };\n };\n ColumnSelection.columnSelect = function (config, model, fromViewSelection, toViewLineNumber, toViewVisualColumn) {\n var fromViewPosition = new Position(fromViewSelection.selectionStartLineNumber, fromViewSelection.selectionStartColumn);\n var fromViewVisibleColumn = CursorColumns.visibleColumnFromColumn2(config, model, fromViewPosition);\n return ColumnSelection._columnSelect(config, model, fromViewPosition.lineNumber, fromViewVisibleColumn, toViewLineNumber, toViewVisualColumn);\n };\n ColumnSelection.columnSelectLeft = function (config, model, cursor, toViewLineNumber, toViewVisualColumn) {\n if (toViewVisualColumn > 1) {\n toViewVisualColumn--;\n }\n return this.columnSelect(config, model, cursor.selection, toViewLineNumber, toViewVisualColumn);\n };\n ColumnSelection.columnSelectRight = function (config, model, cursor, toViewLineNumber, toViewVisualColumn) {\n var maxVisualViewColumn = 0;\n var minViewLineNumber = Math.min(cursor.position.lineNumber, toViewLineNumber);\n var maxViewLineNumber = Math.max(cursor.position.lineNumber, toViewLineNumber);\n for (var lineNumber = minViewLineNumber; lineNumber <= maxViewLineNumber; lineNumber++) {\n var lineMaxViewColumn = model.getLineMaxColumn(lineNumber);\n var lineMaxVisualViewColumn = CursorColumns.visibleColumnFromColumn2(config, model, new Position(lineNumber, lineMaxViewColumn));\n maxVisualViewColumn = Math.max(maxVisualViewColumn, lineMaxVisualViewColumn);\n }\n if (toViewVisualColumn < maxVisualViewColumn) {\n toViewVisualColumn++;\n }\n return this.columnSelect(config, model, cursor.selection, toViewLineNumber, toViewVisualColumn);\n };\n ColumnSelection.columnSelectUp = function (config, model, cursor, isPaged, toViewLineNumber, toViewVisualColumn) {\n var linesCount = isPaged ? config.pageSize : 1;\n toViewLineNumber -= linesCount;\n if (toViewLineNumber < 1) {\n toViewLineNumber = 1;\n }\n return this.columnSelect(config, model, cursor.selection, toViewLineNumber, toViewVisualColumn);\n };\n ColumnSelection.columnSelectDown = function (config, model, cursor, isPaged, toViewLineNumber, toViewVisualColumn) {\n var linesCount = isPaged ? config.pageSize : 1;\n toViewLineNumber += linesCount;\n if (toViewLineNumber > model.getLineCount()) {\n toViewLineNumber = model.getLineCount();\n }\n return this.columnSelect(config, model, cursor.selection, toViewLineNumber, toViewVisualColumn);\n };\n return ColumnSelection;\n}());\nexport { ColumnSelection };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport { RawContextKey } from '../../platform/contextkey/common/contextkey';\nexport var EditorContextKeys;\n(function (EditorContextKeys) {\n /**\n * A context key that is set when the editor's text has focus (cursor is blinking).\n */\n EditorContextKeys.editorTextFocus = new RawContextKey('editorTextFocus', false);\n /**\n * A context key that is set when the editor's text or an editor's widget has focus.\n */\n EditorContextKeys.focus = new RawContextKey('editorFocus', false);\n /**\n * A context key that is set when any editor input has focus (regular editor, repl input...).\n */\n EditorContextKeys.textInputFocus = new RawContextKey('textInputFocus', false);\n EditorContextKeys.readOnly = new RawContextKey('editorReadonly', false);\n EditorContextKeys.writable = EditorContextKeys.readOnly.toNegated();\n EditorContextKeys.hasNonEmptySelection = new RawContextKey('editorHasSelection', false);\n EditorContextKeys.hasOnlyEmptySelection = EditorContextKeys.hasNonEmptySelection.toNegated();\n EditorContextKeys.hasMultipleSelections = new RawContextKey('editorHasMultipleSelections', false);\n EditorContextKeys.hasSingleSelection = EditorContextKeys.hasMultipleSelections.toNegated();\n EditorContextKeys.tabMovesFocus = new RawContextKey('editorTabMovesFocus', false);\n EditorContextKeys.tabDoesNotMoveFocus = EditorContextKeys.tabMovesFocus.toNegated();\n EditorContextKeys.isInEmbeddedEditor = new RawContextKey('isInEmbeddedEditor', undefined);\n EditorContextKeys.canUndo = new RawContextKey('canUndo', false);\n EditorContextKeys.canRedo = new RawContextKey('canRedo', false);\n // -- mode context keys\n EditorContextKeys.languageId = new RawContextKey('editorLangId', undefined);\n EditorContextKeys.hasCompletionItemProvider = new RawContextKey('editorHasCompletionItemProvider', undefined);\n EditorContextKeys.hasCodeActionsProvider = new RawContextKey('editorHasCodeActionsProvider', undefined);\n EditorContextKeys.hasCodeLensProvider = new RawContextKey('editorHasCodeLensProvider', undefined);\n EditorContextKeys.hasDefinitionProvider = new RawContextKey('editorHasDefinitionProvider', undefined);\n EditorContextKeys.hasImplementationProvider = new RawContextKey('editorHasImplementationProvider', undefined);\n EditorContextKeys.hasTypeDefinitionProvider = new RawContextKey('editorHasTypeDefinitionProvider', undefined);\n EditorContextKeys.hasHoverProvider = new RawContextKey('editorHasHoverProvider', undefined);\n EditorContextKeys.hasDocumentHighlightProvider = new RawContextKey('editorHasDocumentHighlightProvider', undefined);\n EditorContextKeys.hasDocumentSymbolProvider = new RawContextKey('editorHasDocumentSymbolProvider', undefined);\n EditorContextKeys.hasReferenceProvider = new RawContextKey('editorHasReferenceProvider', undefined);\n EditorContextKeys.hasRenameProvider = new RawContextKey('editorHasRenameProvider', undefined);\n EditorContextKeys.hasDocumentFormattingProvider = new RawContextKey('editorHasDocumentFormattingProvider', undefined);\n EditorContextKeys.hasDocumentSelectionFormattingProvider = new RawContextKey('editorHasDocumentSelectionFormattingProvider', undefined);\n EditorContextKeys.hasSignatureHelpProvider = new RawContextKey('editorHasSignatureHelpProvider', undefined);\n})(EditorContextKeys || (EditorContextKeys = {}));\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport * as nls from '../../../nls';\nimport { Position } from '../../common/core/position';\nimport { Range } from '../../common/core/range';\nimport * as editorCommon from '../../common/editorCommon';\nimport { CursorState } from '../../common/controller/cursorCommon';\nimport { CursorChangeReason } from '../../common/controller/cursorEvents';\nimport { CursorMoveCommands, CursorMove as CursorMove_ } from '../../common/controller/cursorMoveCommands';\nimport { registerEditorCommand, EditorCommand, Command } from '../editorExtensions';\nimport { ColumnSelection } from '../../common/controller/cursorColumnSelection';\nimport { EditorContextKeys } from '../../common/editorContextKeys';\nvar H = editorCommon.Handler;\nimport { ICodeEditorService } from '../services/codeEditorService';\nimport { ContextKeyExpr } from '../../../platform/contextkey/common/contextkey';\nimport * as types from '../../../base/common/types';\nimport { TypeOperations } from '../../common/controller/cursorTypeOperations';\nimport { DeleteOperations } from '../../common/controller/cursorDeleteOperations';\nimport { MenuId } from '../../../platform/actions/common/actions';\nvar CORE_WEIGHT = 0 /* EditorCore */;\nvar CoreEditorCommand = /** @class */ (function (_super) {\n __extends(CoreEditorCommand, _super);\n function CoreEditorCommand() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n CoreEditorCommand.prototype.runEditorCommand = function (accessor, editor, args) {\n var cursors = editor._getCursors();\n if (!cursors) {\n // the editor has no view => has no cursors\n return;\n }\n this.runCoreEditorCommand(cursors, args || {});\n };\n return CoreEditorCommand;\n}(EditorCommand));\nexport { CoreEditorCommand };\nexport var EditorScroll_;\n(function (EditorScroll_) {\n var isEditorScrollArgs = function (arg) {\n if (!types.isObject(arg)) {\n return false;\n }\n var scrollArg = arg;\n if (!types.isString(scrollArg.to)) {\n return false;\n }\n if (!types.isUndefined(scrollArg.by) && !types.isString(scrollArg.by)) {\n return false;\n }\n if (!types.isUndefined(scrollArg.value) && !types.isNumber(scrollArg.value)) {\n return false;\n }\n if (!types.isUndefined(scrollArg.revealCursor) && !types.isBoolean(scrollArg.revealCursor)) {\n return false;\n }\n return true;\n };\n EditorScroll_.description = {\n description: 'Scroll editor in the given direction',\n args: [\n {\n name: 'Editor scroll argument object',\n description: \"Property-value pairs that can be passed through this argument:\\n\\t\\t\\t\\t\\t* 'to': A mandatory direction value.\\n\\t\\t\\t\\t\\t\\t```\\n\\t\\t\\t\\t\\t\\t'up', 'down'\\n\\t\\t\\t\\t\\t\\t```\\n\\t\\t\\t\\t\\t* 'by': Unit to move. Default is computed based on 'to' value.\\n\\t\\t\\t\\t\\t\\t```\\n\\t\\t\\t\\t\\t\\t'line', 'wrappedLine', 'page', 'halfPage'\\n\\t\\t\\t\\t\\t\\t```\\n\\t\\t\\t\\t\\t* 'value': Number of units to move. Default is '1'.\\n\\t\\t\\t\\t\\t* 'revealCursor': If 'true' reveals the cursor if it is outside view port.\\n\\t\\t\\t\\t\",\n constraint: isEditorScrollArgs\n }\n ]\n };\n /**\n * Directions in the view for editor scroll command.\n */\n EditorScroll_.RawDirection = {\n Up: 'up',\n Down: 'down',\n };\n /**\n * Units for editor scroll 'by' argument\n */\n EditorScroll_.RawUnit = {\n Line: 'line',\n WrappedLine: 'wrappedLine',\n Page: 'page',\n HalfPage: 'halfPage'\n };\n function parse(args) {\n var direction;\n switch (args.to) {\n case EditorScroll_.RawDirection.Up:\n direction = 1 /* Up */;\n break;\n case EditorScroll_.RawDirection.Down:\n direction = 2 /* Down */;\n break;\n default:\n // Illegal arguments\n return null;\n }\n var unit;\n switch (args.by) {\n case EditorScroll_.RawUnit.Line:\n unit = 1 /* Line */;\n break;\n case EditorScroll_.RawUnit.WrappedLine:\n unit = 2 /* WrappedLine */;\n break;\n case EditorScroll_.RawUnit.Page:\n unit = 3 /* Page */;\n break;\n case EditorScroll_.RawUnit.HalfPage:\n unit = 4 /* HalfPage */;\n break;\n default:\n unit = 2 /* WrappedLine */;\n }\n var value = Math.floor(args.value || 1);\n var revealCursor = !!args.revealCursor;\n return {\n direction: direction,\n unit: unit,\n value: value,\n revealCursor: revealCursor,\n select: (!!args.select)\n };\n }\n EditorScroll_.parse = parse;\n})(EditorScroll_ || (EditorScroll_ = {}));\nexport var RevealLine_;\n(function (RevealLine_) {\n var isRevealLineArgs = function (arg) {\n if (!types.isObject(arg)) {\n return false;\n }\n var reveaLineArg = arg;\n if (!types.isNumber(reveaLineArg.lineNumber)) {\n return false;\n }\n if (!types.isUndefined(reveaLineArg.at) && !types.isString(reveaLineArg.at)) {\n return false;\n }\n return true;\n };\n RevealLine_.description = {\n description: 'Reveal the given line at the given logical position',\n args: [\n {\n name: 'Reveal line argument object',\n description: \"Property-value pairs that can be passed through this argument:\\n\\t\\t\\t\\t\\t* 'lineNumber': A mandatory line number value.\\n\\t\\t\\t\\t\\t* 'at': Logical position at which line has to be revealed .\\n\\t\\t\\t\\t\\t\\t```\\n\\t\\t\\t\\t\\t\\t'top', 'center', 'bottom'\\n\\t\\t\\t\\t\\t\\t```\\n\\t\\t\\t\\t\",\n constraint: isRevealLineArgs\n }\n ]\n };\n /**\n * Values for reveal line 'at' argument\n */\n RevealLine_.RawAtArgument = {\n Top: 'top',\n Center: 'center',\n Bottom: 'bottom'\n };\n})(RevealLine_ || (RevealLine_ = {}));\nexport var CoreNavigationCommands;\n(function (CoreNavigationCommands) {\n var BaseMoveToCommand = /** @class */ (function (_super) {\n __extends(BaseMoveToCommand, _super);\n function BaseMoveToCommand(opts) {\n var _this = _super.call(this, opts) || this;\n _this._inSelectionMode = opts.inSelectionMode;\n return _this;\n }\n BaseMoveToCommand.prototype.runCoreEditorCommand = function (cursors, args) {\n cursors.context.model.pushStackElement();\n cursors.setStates(args.source, CursorChangeReason.Explicit, [\n CursorMoveCommands.moveTo(cursors.context, cursors.getPrimaryCursor(), this._inSelectionMode, args.position, args.viewPosition)\n ]);\n cursors.reveal(true, 0 /* Primary */, 0 /* Smooth */);\n };\n return BaseMoveToCommand;\n }(CoreEditorCommand));\n CoreNavigationCommands.MoveTo = registerEditorCommand(new BaseMoveToCommand({\n id: '_moveTo',\n inSelectionMode: false,\n precondition: null\n }));\n CoreNavigationCommands.MoveToSelect = registerEditorCommand(new BaseMoveToCommand({\n id: '_moveToSelect',\n inSelectionMode: true,\n precondition: null\n }));\n var ColumnSelectCommand = /** @class */ (function (_super) {\n __extends(ColumnSelectCommand, _super);\n function ColumnSelectCommand() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n ColumnSelectCommand.prototype.runCoreEditorCommand = function (cursors, args) {\n cursors.context.model.pushStackElement();\n var result = this._getColumnSelectResult(cursors.context, cursors.getPrimaryCursor(), cursors.getColumnSelectData(), args);\n cursors.setStates(args.source, CursorChangeReason.Explicit, result.viewStates.map(function (viewState) { return CursorState.fromViewState(viewState); }));\n cursors.setColumnSelectData({\n toViewLineNumber: result.toLineNumber,\n toViewVisualColumn: result.toVisualColumn\n });\n cursors.reveal(true, (result.reversed ? 1 /* TopMost */ : 2 /* BottomMost */), 0 /* Smooth */);\n };\n return ColumnSelectCommand;\n }(CoreEditorCommand));\n CoreNavigationCommands.ColumnSelect = registerEditorCommand(new /** @class */ (function (_super) {\n __extends(class_1, _super);\n function class_1() {\n return _super.call(this, {\n id: 'columnSelect',\n precondition: null\n }) || this;\n }\n class_1.prototype._getColumnSelectResult = function (context, primary, prevColumnSelectData, args) {\n // validate `args`\n var validatedPosition = context.model.validatePosition(args.position);\n var validatedViewPosition;\n if (args.viewPosition) {\n validatedViewPosition = context.validateViewPosition(new Position(args.viewPosition.lineNumber, args.viewPosition.column), validatedPosition);\n }\n else {\n validatedViewPosition = context.convertModelPositionToViewPosition(validatedPosition);\n }\n return ColumnSelection.columnSelect(context.config, context.viewModel, primary.viewState.selection, validatedViewPosition.lineNumber, args.mouseColumn - 1);\n };\n return class_1;\n }(ColumnSelectCommand)));\n CoreNavigationCommands.CursorColumnSelectLeft = registerEditorCommand(new /** @class */ (function (_super) {\n __extends(class_2, _super);\n function class_2() {\n return _super.call(this, {\n id: 'cursorColumnSelectLeft',\n precondition: null,\n kbOpts: {\n weight: CORE_WEIGHT,\n kbExpr: EditorContextKeys.textInputFocus,\n primary: 2048 /* CtrlCmd */ | 1024 /* Shift */ | 512 /* Alt */ | 15 /* LeftArrow */,\n linux: { primary: 0 }\n }\n }) || this;\n }\n class_2.prototype._getColumnSelectResult = function (context, primary, prevColumnSelectData, args) {\n return ColumnSelection.columnSelectLeft(context.config, context.viewModel, primary.viewState, prevColumnSelectData.toViewLineNumber, prevColumnSelectData.toViewVisualColumn);\n };\n return class_2;\n }(ColumnSelectCommand)));\n CoreNavigationCommands.CursorColumnSelectRight = registerEditorCommand(new /** @class */ (function (_super) {\n __extends(class_3, _super);\n function class_3() {\n return _super.call(this, {\n id: 'cursorColumnSelectRight',\n precondition: null,\n kbOpts: {\n weight: CORE_WEIGHT,\n kbExpr: EditorContextKeys.textInputFocus,\n primary: 2048 /* CtrlCmd */ | 1024 /* Shift */ | 512 /* Alt */ | 17 /* RightArrow */,\n linux: { primary: 0 }\n }\n }) || this;\n }\n class_3.prototype._getColumnSelectResult = function (context, primary, prevColumnSelectData, args) {\n return ColumnSelection.columnSelectRight(context.config, context.viewModel, primary.viewState, prevColumnSelectData.toViewLineNumber, prevColumnSelectData.toViewVisualColumn);\n };\n return class_3;\n }(ColumnSelectCommand)));\n var ColumnSelectUpCommand = /** @class */ (function (_super) {\n __extends(ColumnSelectUpCommand, _super);\n function ColumnSelectUpCommand(opts) {\n var _this = _super.call(this, opts) || this;\n _this._isPaged = opts.isPaged;\n return _this;\n }\n ColumnSelectUpCommand.prototype._getColumnSelectResult = function (context, primary, prevColumnSelectData, args) {\n return ColumnSelection.columnSelectUp(context.config, context.viewModel, primary.viewState, this._isPaged, prevColumnSelectData.toViewLineNumber, prevColumnSelectData.toViewVisualColumn);\n };\n return ColumnSelectUpCommand;\n }(ColumnSelectCommand));\n CoreNavigationCommands.CursorColumnSelectUp = registerEditorCommand(new ColumnSelectUpCommand({\n isPaged: false,\n id: 'cursorColumnSelectUp',\n precondition: null,\n kbOpts: {\n weight: CORE_WEIGHT,\n kbExpr: EditorContextKeys.textInputFocus,\n primary: 2048 /* CtrlCmd */ | 1024 /* Shift */ | 512 /* Alt */ | 16 /* UpArrow */,\n linux: { primary: 0 }\n }\n }));\n CoreNavigationCommands.CursorColumnSelectPageUp = registerEditorCommand(new ColumnSelectUpCommand({\n isPaged: true,\n id: 'cursorColumnSelectPageUp',\n precondition: null,\n kbOpts: {\n weight: CORE_WEIGHT,\n kbExpr: EditorContextKeys.textInputFocus,\n primary: 2048 /* CtrlCmd */ | 1024 /* Shift */ | 512 /* Alt */ | 11 /* PageUp */,\n linux: { primary: 0 }\n }\n }));\n var ColumnSelectDownCommand = /** @class */ (function (_super) {\n __extends(ColumnSelectDownCommand, _super);\n function ColumnSelectDownCommand(opts) {\n var _this = _super.call(this, opts) || this;\n _this._isPaged = opts.isPaged;\n return _this;\n }\n ColumnSelectDownCommand.prototype._getColumnSelectResult = function (context, primary, prevColumnSelectData, args) {\n return ColumnSelection.columnSelectDown(context.config, context.viewModel, primary.viewState, this._isPaged, prevColumnSelectData.toViewLineNumber, prevColumnSelectData.toViewVisualColumn);\n };\n return ColumnSelectDownCommand;\n }(ColumnSelectCommand));\n CoreNavigationCommands.CursorColumnSelectDown = registerEditorCommand(new ColumnSelectDownCommand({\n isPaged: false,\n id: 'cursorColumnSelectDown',\n precondition: null,\n kbOpts: {\n weight: CORE_WEIGHT,\n kbExpr: EditorContextKeys.textInputFocus,\n primary: 2048 /* CtrlCmd */ | 1024 /* Shift */ | 512 /* Alt */ | 18 /* DownArrow */,\n linux: { primary: 0 }\n }\n }));\n CoreNavigationCommands.CursorColumnSelectPageDown = registerEditorCommand(new ColumnSelectDownCommand({\n isPaged: true,\n id: 'cursorColumnSelectPageDown',\n precondition: null,\n kbOpts: {\n weight: CORE_WEIGHT,\n kbExpr: EditorContextKeys.textInputFocus,\n primary: 2048 /* CtrlCmd */ | 1024 /* Shift */ | 512 /* Alt */ | 12 /* PageDown */,\n linux: { primary: 0 }\n }\n }));\n var CursorMoveImpl = /** @class */ (function (_super) {\n __extends(CursorMoveImpl, _super);\n function CursorMoveImpl() {\n return _super.call(this, {\n id: 'cursorMove',\n precondition: null,\n description: CursorMove_.description\n }) || this;\n }\n CursorMoveImpl.prototype.runCoreEditorCommand = function (cursors, args) {\n var parsed = CursorMove_.parse(args);\n if (!parsed) {\n // illegal arguments\n return;\n }\n this._runCursorMove(cursors, args.source, parsed);\n };\n CursorMoveImpl.prototype._runCursorMove = function (cursors, source, args) {\n cursors.context.model.pushStackElement();\n cursors.setStates(source, CursorChangeReason.Explicit, CursorMoveCommands.move(cursors.context, cursors.getAll(), args));\n cursors.reveal(true, 0 /* Primary */, 0 /* Smooth */);\n };\n return CursorMoveImpl;\n }(CoreEditorCommand));\n CoreNavigationCommands.CursorMoveImpl = CursorMoveImpl;\n CoreNavigationCommands.CursorMove = registerEditorCommand(new CursorMoveImpl());\n var CursorMoveBasedCommand = /** @class */ (function (_super) {\n __extends(CursorMoveBasedCommand, _super);\n function CursorMoveBasedCommand(opts) {\n var _this = _super.call(this, opts) || this;\n _this._staticArgs = opts.args;\n return _this;\n }\n CursorMoveBasedCommand.prototype.runCoreEditorCommand = function (cursors, dynamicArgs) {\n var args = this._staticArgs;\n if (this._staticArgs.value === -1 /* PAGE_SIZE_MARKER */) {\n // -1 is a marker for page size\n args = {\n direction: this._staticArgs.direction,\n unit: this._staticArgs.unit,\n select: this._staticArgs.select,\n value: cursors.context.config.pageSize\n };\n }\n CoreNavigationCommands.CursorMove._runCursorMove(cursors, dynamicArgs.source, args);\n };\n return CursorMoveBasedCommand;\n }(CoreEditorCommand));\n CoreNavigationCommands.CursorLeft = registerEditorCommand(new CursorMoveBasedCommand({\n args: {\n direction: 0 /* Left */,\n unit: 0 /* None */,\n select: false,\n value: 1\n },\n id: 'cursorLeft',\n precondition: null,\n kbOpts: {\n weight: CORE_WEIGHT,\n kbExpr: EditorContextKeys.textInputFocus,\n primary: 15 /* LeftArrow */,\n mac: { primary: 15 /* LeftArrow */, secondary: [256 /* WinCtrl */ | 32 /* KEY_B */] }\n }\n }));\n CoreNavigationCommands.CursorLeftSelect = registerEditorCommand(new CursorMoveBasedCommand({\n args: {\n direction: 0 /* Left */,\n unit: 0 /* None */,\n select: true,\n value: 1\n },\n id: 'cursorLeftSelect',\n precondition: null,\n kbOpts: {\n weight: CORE_WEIGHT,\n kbExpr: EditorContextKeys.textInputFocus,\n primary: 1024 /* Shift */ | 15 /* LeftArrow */\n }\n }));\n CoreNavigationCommands.CursorRight = registerEditorCommand(new CursorMoveBasedCommand({\n args: {\n direction: 1 /* Right */,\n unit: 0 /* None */,\n select: false,\n value: 1\n },\n id: 'cursorRight',\n precondition: null,\n kbOpts: {\n weight: CORE_WEIGHT,\n kbExpr: EditorContextKeys.textInputFocus,\n primary: 17 /* RightArrow */,\n mac: { primary: 17 /* RightArrow */, secondary: [256 /* WinCtrl */ | 36 /* KEY_F */] }\n }\n }));\n CoreNavigationCommands.CursorRightSelect = registerEditorCommand(new CursorMoveBasedCommand({\n args: {\n direction: 1 /* Right */,\n unit: 0 /* None */,\n select: true,\n value: 1\n },\n id: 'cursorRightSelect',\n precondition: null,\n kbOpts: {\n weight: CORE_WEIGHT,\n kbExpr: EditorContextKeys.textInputFocus,\n primary: 1024 /* Shift */ | 17 /* RightArrow */\n }\n }));\n CoreNavigationCommands.CursorUp = registerEditorCommand(new CursorMoveBasedCommand({\n args: {\n direction: 2 /* Up */,\n unit: 2 /* WrappedLine */,\n select: false,\n value: 1\n },\n id: 'cursorUp',\n precondition: null,\n kbOpts: {\n weight: CORE_WEIGHT,\n kbExpr: EditorContextKeys.textInputFocus,\n primary: 16 /* UpArrow */,\n mac: { primary: 16 /* UpArrow */, secondary: [256 /* WinCtrl */ | 46 /* KEY_P */] }\n }\n }));\n CoreNavigationCommands.CursorUpSelect = registerEditorCommand(new CursorMoveBasedCommand({\n args: {\n direction: 2 /* Up */,\n unit: 2 /* WrappedLine */,\n select: true,\n value: 1\n },\n id: 'cursorUpSelect',\n precondition: null,\n kbOpts: {\n weight: CORE_WEIGHT,\n kbExpr: EditorContextKeys.textInputFocus,\n primary: 1024 /* Shift */ | 16 /* UpArrow */,\n secondary: [2048 /* CtrlCmd */ | 1024 /* Shift */ | 16 /* UpArrow */],\n mac: { primary: 1024 /* Shift */ | 16 /* UpArrow */ },\n linux: { primary: 1024 /* Shift */ | 16 /* UpArrow */ }\n }\n }));\n CoreNavigationCommands.CursorPageUp = registerEditorCommand(new CursorMoveBasedCommand({\n args: {\n direction: 2 /* Up */,\n unit: 2 /* WrappedLine */,\n select: false,\n value: -1 /* PAGE_SIZE_MARKER */\n },\n id: 'cursorPageUp',\n precondition: null,\n kbOpts: {\n weight: CORE_WEIGHT,\n kbExpr: EditorContextKeys.textInputFocus,\n primary: 11 /* PageUp */\n }\n }));\n CoreNavigationCommands.CursorPageUpSelect = registerEditorCommand(new CursorMoveBasedCommand({\n args: {\n direction: 2 /* Up */,\n unit: 2 /* WrappedLine */,\n select: true,\n value: -1 /* PAGE_SIZE_MARKER */\n },\n id: 'cursorPageUpSelect',\n precondition: null,\n kbOpts: {\n weight: CORE_WEIGHT,\n kbExpr: EditorContextKeys.textInputFocus,\n primary: 1024 /* Shift */ | 11 /* PageUp */\n }\n }));\n CoreNavigationCommands.CursorDown = registerEditorCommand(new CursorMoveBasedCommand({\n args: {\n direction: 3 /* Down */,\n unit: 2 /* WrappedLine */,\n select: false,\n value: 1\n },\n id: 'cursorDown',\n precondition: null,\n kbOpts: {\n weight: CORE_WEIGHT,\n kbExpr: EditorContextKeys.textInputFocus,\n primary: 18 /* DownArrow */,\n mac: { primary: 18 /* DownArrow */, secondary: [256 /* WinCtrl */ | 44 /* KEY_N */] }\n }\n }));\n CoreNavigationCommands.CursorDownSelect = registerEditorCommand(new CursorMoveBasedCommand({\n args: {\n direction: 3 /* Down */,\n unit: 2 /* WrappedLine */,\n select: true,\n value: 1\n },\n id: 'cursorDownSelect',\n precondition: null,\n kbOpts: {\n weight: CORE_WEIGHT,\n kbExpr: EditorContextKeys.textInputFocus,\n primary: 1024 /* Shift */ | 18 /* DownArrow */,\n secondary: [2048 /* CtrlCmd */ | 1024 /* Shift */ | 18 /* DownArrow */],\n mac: { primary: 1024 /* Shift */ | 18 /* DownArrow */ },\n linux: { primary: 1024 /* Shift */ | 18 /* DownArrow */ }\n }\n }));\n CoreNavigationCommands.CursorPageDown = registerEditorCommand(new CursorMoveBasedCommand({\n args: {\n direction: 3 /* Down */,\n unit: 2 /* WrappedLine */,\n select: false,\n value: -1 /* PAGE_SIZE_MARKER */\n },\n id: 'cursorPageDown',\n precondition: null,\n kbOpts: {\n weight: CORE_WEIGHT,\n kbExpr: EditorContextKeys.textInputFocus,\n primary: 12 /* PageDown */\n }\n }));\n CoreNavigationCommands.CursorPageDownSelect = registerEditorCommand(new CursorMoveBasedCommand({\n args: {\n direction: 3 /* Down */,\n unit: 2 /* WrappedLine */,\n select: true,\n value: -1 /* PAGE_SIZE_MARKER */\n },\n id: 'cursorPageDownSelect',\n precondition: null,\n kbOpts: {\n weight: CORE_WEIGHT,\n kbExpr: EditorContextKeys.textInputFocus,\n primary: 1024 /* Shift */ | 12 /* PageDown */\n }\n }));\n CoreNavigationCommands.CreateCursor = registerEditorCommand(new /** @class */ (function (_super) {\n __extends(class_4, _super);\n function class_4() {\n return _super.call(this, {\n id: 'createCursor',\n precondition: null\n }) || this;\n }\n class_4.prototype.runCoreEditorCommand = function (cursors, args) {\n var context = cursors.context;\n var newState;\n if (args.wholeLine) {\n newState = CursorMoveCommands.line(context, cursors.getPrimaryCursor(), false, args.position, args.viewPosition);\n }\n else {\n newState = CursorMoveCommands.moveTo(context, cursors.getPrimaryCursor(), false, args.position, args.viewPosition);\n }\n var states = cursors.getAll();\n // Check if we should remove a cursor (sort of like a toggle)\n if (states.length > 1) {\n var newModelPosition = (newState.modelState ? newState.modelState.position : null);\n var newViewPosition = (newState.viewState ? newState.viewState.position : null);\n for (var i = 0, len = states.length; i < len; i++) {\n var state = states[i];\n if (newModelPosition && !state.modelState.selection.containsPosition(newModelPosition)) {\n continue;\n }\n if (newViewPosition && !state.viewState.selection.containsPosition(newViewPosition)) {\n continue;\n }\n // => Remove the cursor\n states.splice(i, 1);\n cursors.context.model.pushStackElement();\n cursors.setStates(args.source, CursorChangeReason.Explicit, states);\n return;\n }\n }\n // => Add the new cursor\n states.push(newState);\n cursors.context.model.pushStackElement();\n cursors.setStates(args.source, CursorChangeReason.Explicit, states);\n };\n return class_4;\n }(CoreEditorCommand)));\n CoreNavigationCommands.LastCursorMoveToSelect = registerEditorCommand(new /** @class */ (function (_super) {\n __extends(class_5, _super);\n function class_5() {\n return _super.call(this, {\n id: '_lastCursorMoveToSelect',\n precondition: null\n }) || this;\n }\n class_5.prototype.runCoreEditorCommand = function (cursors, args) {\n var context = cursors.context;\n var lastAddedCursorIndex = cursors.getLastAddedCursorIndex();\n var newStates = cursors.getAll().slice(0);\n newStates[lastAddedCursorIndex] = CursorMoveCommands.moveTo(context, newStates[lastAddedCursorIndex], true, args.position, args.viewPosition);\n cursors.context.model.pushStackElement();\n cursors.setStates(args.source, CursorChangeReason.Explicit, newStates);\n };\n return class_5;\n }(CoreEditorCommand)));\n var HomeCommand = /** @class */ (function (_super) {\n __extends(HomeCommand, _super);\n function HomeCommand(opts) {\n var _this = _super.call(this, opts) || this;\n _this._inSelectionMode = opts.inSelectionMode;\n return _this;\n }\n HomeCommand.prototype.runCoreEditorCommand = function (cursors, args) {\n cursors.context.model.pushStackElement();\n cursors.setStates(args.source, CursorChangeReason.Explicit, CursorMoveCommands.moveToBeginningOfLine(cursors.context, cursors.getAll(), this._inSelectionMode));\n cursors.reveal(true, 0 /* Primary */, 0 /* Smooth */);\n };\n return HomeCommand;\n }(CoreEditorCommand));\n CoreNavigationCommands.CursorHome = registerEditorCommand(new HomeCommand({\n inSelectionMode: false,\n id: 'cursorHome',\n precondition: null,\n kbOpts: {\n weight: CORE_WEIGHT,\n kbExpr: EditorContextKeys.textInputFocus,\n primary: 14 /* Home */,\n mac: { primary: 14 /* Home */, secondary: [2048 /* CtrlCmd */ | 15 /* LeftArrow */] }\n }\n }));\n CoreNavigationCommands.CursorHomeSelect = registerEditorCommand(new HomeCommand({\n inSelectionMode: true,\n id: 'cursorHomeSelect',\n precondition: null,\n kbOpts: {\n weight: CORE_WEIGHT,\n kbExpr: EditorContextKeys.textInputFocus,\n primary: 1024 /* Shift */ | 14 /* Home */,\n mac: { primary: 1024 /* Shift */ | 14 /* Home */, secondary: [2048 /* CtrlCmd */ | 1024 /* Shift */ | 15 /* LeftArrow */] }\n }\n }));\n CoreNavigationCommands.CursorLineStart = registerEditorCommand(new /** @class */ (function (_super) {\n __extends(class_6, _super);\n function class_6() {\n return _super.call(this, {\n id: 'cursorLineStart',\n precondition: null,\n kbOpts: {\n weight: CORE_WEIGHT,\n kbExpr: EditorContextKeys.textInputFocus,\n primary: 0,\n mac: { primary: 256 /* WinCtrl */ | 31 /* KEY_A */ }\n }\n }) || this;\n }\n class_6.prototype.runCoreEditorCommand = function (cursors, args) {\n cursors.context.model.pushStackElement();\n cursors.setStates(args.source, CursorChangeReason.Explicit, this._exec(cursors.context, cursors.getAll()));\n cursors.reveal(true, 0 /* Primary */, 0 /* Smooth */);\n };\n class_6.prototype._exec = function (context, cursors) {\n var result = [];\n for (var i = 0, len = cursors.length; i < len; i++) {\n var cursor = cursors[i];\n var lineNumber = cursor.modelState.position.lineNumber;\n result[i] = CursorState.fromModelState(cursor.modelState.move(false, lineNumber, 1, 0));\n }\n return result;\n };\n return class_6;\n }(CoreEditorCommand)));\n var EndCommand = /** @class */ (function (_super) {\n __extends(EndCommand, _super);\n function EndCommand(opts) {\n var _this = _super.call(this, opts) || this;\n _this._inSelectionMode = opts.inSelectionMode;\n return _this;\n }\n EndCommand.prototype.runCoreEditorCommand = function (cursors, args) {\n cursors.context.model.pushStackElement();\n cursors.setStates(args.source, CursorChangeReason.Explicit, CursorMoveCommands.moveToEndOfLine(cursors.context, cursors.getAll(), this._inSelectionMode));\n cursors.reveal(true, 0 /* Primary */, 0 /* Smooth */);\n };\n return EndCommand;\n }(CoreEditorCommand));\n CoreNavigationCommands.CursorEnd = registerEditorCommand(new EndCommand({\n inSelectionMode: false,\n id: 'cursorEnd',\n precondition: null,\n kbOpts: {\n weight: CORE_WEIGHT,\n kbExpr: EditorContextKeys.textInputFocus,\n primary: 13 /* End */,\n mac: { primary: 13 /* End */, secondary: [2048 /* CtrlCmd */ | 17 /* RightArrow */] }\n }\n }));\n CoreNavigationCommands.CursorEndSelect = registerEditorCommand(new EndCommand({\n inSelectionMode: true,\n id: 'cursorEndSelect',\n precondition: null,\n kbOpts: {\n weight: CORE_WEIGHT,\n kbExpr: EditorContextKeys.textInputFocus,\n primary: 1024 /* Shift */ | 13 /* End */,\n mac: { primary: 1024 /* Shift */ | 13 /* End */, secondary: [2048 /* CtrlCmd */ | 1024 /* Shift */ | 17 /* RightArrow */] }\n }\n }));\n CoreNavigationCommands.CursorLineEnd = registerEditorCommand(new /** @class */ (function (_super) {\n __extends(class_7, _super);\n function class_7() {\n return _super.call(this, {\n id: 'cursorLineEnd',\n precondition: null,\n kbOpts: {\n weight: CORE_WEIGHT,\n kbExpr: EditorContextKeys.textInputFocus,\n primary: 0,\n mac: { primary: 256 /* WinCtrl */ | 35 /* KEY_E */ }\n }\n }) || this;\n }\n class_7.prototype.runCoreEditorCommand = function (cursors, args) {\n cursors.context.model.pushStackElement();\n cursors.setStates(args.source, CursorChangeReason.Explicit, this._exec(cursors.context, cursors.getAll()));\n cursors.reveal(true, 0 /* Primary */, 0 /* Smooth */);\n };\n class_7.prototype._exec = function (context, cursors) {\n var result = [];\n for (var i = 0, len = cursors.length; i < len; i++) {\n var cursor = cursors[i];\n var lineNumber = cursor.modelState.position.lineNumber;\n var maxColumn = context.model.getLineMaxColumn(lineNumber);\n result[i] = CursorState.fromModelState(cursor.modelState.move(false, lineNumber, maxColumn, 0));\n }\n return result;\n };\n return class_7;\n }(CoreEditorCommand)));\n var TopCommand = /** @class */ (function (_super) {\n __extends(TopCommand, _super);\n function TopCommand(opts) {\n var _this = _super.call(this, opts) || this;\n _this._inSelectionMode = opts.inSelectionMode;\n return _this;\n }\n TopCommand.prototype.runCoreEditorCommand = function (cursors, args) {\n cursors.context.model.pushStackElement();\n cursors.setStates(args.source, CursorChangeReason.Explicit, CursorMoveCommands.moveToBeginningOfBuffer(cursors.context, cursors.getAll(), this._inSelectionMode));\n cursors.reveal(true, 0 /* Primary */, 0 /* Smooth */);\n };\n return TopCommand;\n }(CoreEditorCommand));\n CoreNavigationCommands.CursorTop = registerEditorCommand(new TopCommand({\n inSelectionMode: false,\n id: 'cursorTop',\n precondition: null,\n kbOpts: {\n weight: CORE_WEIGHT,\n kbExpr: EditorContextKeys.textInputFocus,\n primary: 2048 /* CtrlCmd */ | 14 /* Home */,\n mac: { primary: 2048 /* CtrlCmd */ | 16 /* UpArrow */ }\n }\n }));\n CoreNavigationCommands.CursorTopSelect = registerEditorCommand(new TopCommand({\n inSelectionMode: true,\n id: 'cursorTopSelect',\n precondition: null,\n kbOpts: {\n weight: CORE_WEIGHT,\n kbExpr: EditorContextKeys.textInputFocus,\n primary: 2048 /* CtrlCmd */ | 1024 /* Shift */ | 14 /* Home */,\n mac: { primary: 2048 /* CtrlCmd */ | 1024 /* Shift */ | 16 /* UpArrow */ }\n }\n }));\n var BottomCommand = /** @class */ (function (_super) {\n __extends(BottomCommand, _super);\n function BottomCommand(opts) {\n var _this = _super.call(this, opts) || this;\n _this._inSelectionMode = opts.inSelectionMode;\n return _this;\n }\n BottomCommand.prototype.runCoreEditorCommand = function (cursors, args) {\n cursors.context.model.pushStackElement();\n cursors.setStates(args.source, CursorChangeReason.Explicit, CursorMoveCommands.moveToEndOfBuffer(cursors.context, cursors.getAll(), this._inSelectionMode));\n cursors.reveal(true, 0 /* Primary */, 0 /* Smooth */);\n };\n return BottomCommand;\n }(CoreEditorCommand));\n CoreNavigationCommands.CursorBottom = registerEditorCommand(new BottomCommand({\n inSelectionMode: false,\n id: 'cursorBottom',\n precondition: null,\n kbOpts: {\n weight: CORE_WEIGHT,\n kbExpr: EditorContextKeys.textInputFocus,\n primary: 2048 /* CtrlCmd */ | 13 /* End */,\n mac: { primary: 2048 /* CtrlCmd */ | 18 /* DownArrow */ }\n }\n }));\n CoreNavigationCommands.CursorBottomSelect = registerEditorCommand(new BottomCommand({\n inSelectionMode: true,\n id: 'cursorBottomSelect',\n precondition: null,\n kbOpts: {\n weight: CORE_WEIGHT,\n kbExpr: EditorContextKeys.textInputFocus,\n primary: 2048 /* CtrlCmd */ | 1024 /* Shift */ | 13 /* End */,\n mac: { primary: 2048 /* CtrlCmd */ | 1024 /* Shift */ | 18 /* DownArrow */ }\n }\n }));\n var EditorScrollImpl = /** @class */ (function (_super) {\n __extends(EditorScrollImpl, _super);\n function EditorScrollImpl() {\n return _super.call(this, {\n id: 'editorScroll',\n precondition: null,\n description: EditorScroll_.description\n }) || this;\n }\n EditorScrollImpl.prototype.runCoreEditorCommand = function (cursors, args) {\n var parsed = EditorScroll_.parse(args);\n if (!parsed) {\n // illegal arguments\n return;\n }\n this._runEditorScroll(cursors, args.source, parsed);\n };\n EditorScrollImpl.prototype._runEditorScroll = function (cursors, source, args) {\n var desiredScrollTop = this._computeDesiredScrollTop(cursors.context, args);\n if (args.revealCursor) {\n // must ensure cursor is in new visible range\n var desiredVisibleViewRange = cursors.context.getCompletelyVisibleViewRangeAtScrollTop(desiredScrollTop);\n cursors.setStates(source, CursorChangeReason.Explicit, [\n CursorMoveCommands.findPositionInViewportIfOutside(cursors.context, cursors.getPrimaryCursor(), desiredVisibleViewRange, args.select)\n ]);\n }\n cursors.scrollTo(desiredScrollTop);\n };\n EditorScrollImpl.prototype._computeDesiredScrollTop = function (context, args) {\n if (args.unit === 1 /* Line */) {\n // scrolling by model lines\n var visibleModelRange = context.getCompletelyVisibleModelRange();\n var desiredTopModelLineNumber = void 0;\n if (args.direction === 1 /* Up */) {\n // must go x model lines up\n desiredTopModelLineNumber = Math.max(1, visibleModelRange.startLineNumber - args.value);\n }\n else {\n // must go x model lines down\n desiredTopModelLineNumber = Math.min(context.model.getLineCount(), visibleModelRange.startLineNumber + args.value);\n }\n var desiredTopViewPosition = context.convertModelPositionToViewPosition(new Position(desiredTopModelLineNumber, 1));\n return context.getVerticalOffsetForViewLine(desiredTopViewPosition.lineNumber);\n }\n var noOfLines;\n if (args.unit === 3 /* Page */) {\n noOfLines = context.config.pageSize * args.value;\n }\n else if (args.unit === 4 /* HalfPage */) {\n noOfLines = Math.round(context.config.pageSize / 2) * args.value;\n }\n else {\n noOfLines = args.value;\n }\n var deltaLines = (args.direction === 1 /* Up */ ? -1 : 1) * noOfLines;\n return context.getCurrentScrollTop() + deltaLines * context.config.lineHeight;\n };\n return EditorScrollImpl;\n }(CoreEditorCommand));\n CoreNavigationCommands.EditorScrollImpl = EditorScrollImpl;\n CoreNavigationCommands.EditorScroll = registerEditorCommand(new EditorScrollImpl());\n CoreNavigationCommands.ScrollLineUp = registerEditorCommand(new /** @class */ (function (_super) {\n __extends(class_8, _super);\n function class_8() {\n return _super.call(this, {\n id: 'scrollLineUp',\n precondition: null,\n kbOpts: {\n weight: CORE_WEIGHT,\n kbExpr: EditorContextKeys.textInputFocus,\n primary: 2048 /* CtrlCmd */ | 16 /* UpArrow */,\n mac: { primary: 256 /* WinCtrl */ | 11 /* PageUp */ }\n }\n }) || this;\n }\n class_8.prototype.runCoreEditorCommand = function (cursors, args) {\n CoreNavigationCommands.EditorScroll._runEditorScroll(cursors, args.source, {\n direction: 1 /* Up */,\n unit: 2 /* WrappedLine */,\n value: 1,\n revealCursor: false,\n select: false\n });\n };\n return class_8;\n }(CoreEditorCommand)));\n CoreNavigationCommands.ScrollPageUp = registerEditorCommand(new /** @class */ (function (_super) {\n __extends(class_9, _super);\n function class_9() {\n return _super.call(this, {\n id: 'scrollPageUp',\n precondition: null,\n kbOpts: {\n weight: CORE_WEIGHT,\n kbExpr: EditorContextKeys.textInputFocus,\n primary: 2048 /* CtrlCmd */ | 11 /* PageUp */,\n win: { primary: 512 /* Alt */ | 11 /* PageUp */ },\n linux: { primary: 512 /* Alt */ | 11 /* PageUp */ }\n }\n }) || this;\n }\n class_9.prototype.runCoreEditorCommand = function (cursors, args) {\n CoreNavigationCommands.EditorScroll._runEditorScroll(cursors, args.source, {\n direction: 1 /* Up */,\n unit: 3 /* Page */,\n value: 1,\n revealCursor: false,\n select: false\n });\n };\n return class_9;\n }(CoreEditorCommand)));\n CoreNavigationCommands.ScrollLineDown = registerEditorCommand(new /** @class */ (function (_super) {\n __extends(class_10, _super);\n function class_10() {\n return _super.call(this, {\n id: 'scrollLineDown',\n precondition: null,\n kbOpts: {\n weight: CORE_WEIGHT,\n kbExpr: EditorContextKeys.textInputFocus,\n primary: 2048 /* CtrlCmd */ | 18 /* DownArrow */,\n mac: { primary: 256 /* WinCtrl */ | 12 /* PageDown */ }\n }\n }) || this;\n }\n class_10.prototype.runCoreEditorCommand = function (cursors, args) {\n CoreNavigationCommands.EditorScroll._runEditorScroll(cursors, args.source, {\n direction: 2 /* Down */,\n unit: 2 /* WrappedLine */,\n value: 1,\n revealCursor: false,\n select: false\n });\n };\n return class_10;\n }(CoreEditorCommand)));\n CoreNavigationCommands.ScrollPageDown = registerEditorCommand(new /** @class */ (function (_super) {\n __extends(class_11, _super);\n function class_11() {\n return _super.call(this, {\n id: 'scrollPageDown',\n precondition: null,\n kbOpts: {\n weight: CORE_WEIGHT,\n kbExpr: EditorContextKeys.textInputFocus,\n primary: 2048 /* CtrlCmd */ | 12 /* PageDown */,\n win: { primary: 512 /* Alt */ | 12 /* PageDown */ },\n linux: { primary: 512 /* Alt */ | 12 /* PageDown */ }\n }\n }) || this;\n }\n class_11.prototype.runCoreEditorCommand = function (cursors, args) {\n CoreNavigationCommands.EditorScroll._runEditorScroll(cursors, args.source, {\n direction: 2 /* Down */,\n unit: 3 /* Page */,\n value: 1,\n revealCursor: false,\n select: false\n });\n };\n return class_11;\n }(CoreEditorCommand)));\n var WordCommand = /** @class */ (function (_super) {\n __extends(WordCommand, _super);\n function WordCommand(opts) {\n var _this = _super.call(this, opts) || this;\n _this._inSelectionMode = opts.inSelectionMode;\n return _this;\n }\n WordCommand.prototype.runCoreEditorCommand = function (cursors, args) {\n cursors.context.model.pushStackElement();\n cursors.setStates(args.source, CursorChangeReason.Explicit, [\n CursorMoveCommands.word(cursors.context, cursors.getPrimaryCursor(), this._inSelectionMode, args.position)\n ]);\n cursors.reveal(true, 0 /* Primary */, 0 /* Smooth */);\n };\n return WordCommand;\n }(CoreEditorCommand));\n CoreNavigationCommands.WordSelect = registerEditorCommand(new WordCommand({\n inSelectionMode: false,\n id: '_wordSelect',\n precondition: null\n }));\n CoreNavigationCommands.WordSelectDrag = registerEditorCommand(new WordCommand({\n inSelectionMode: true,\n id: '_wordSelectDrag',\n precondition: null\n }));\n CoreNavigationCommands.LastCursorWordSelect = registerEditorCommand(new /** @class */ (function (_super) {\n __extends(class_12, _super);\n function class_12() {\n return _super.call(this, {\n id: 'lastCursorWordSelect',\n precondition: null\n }) || this;\n }\n class_12.prototype.runCoreEditorCommand = function (cursors, args) {\n var context = cursors.context;\n var lastAddedCursorIndex = cursors.getLastAddedCursorIndex();\n var newStates = cursors.getAll().slice(0);\n var lastAddedState = newStates[lastAddedCursorIndex];\n newStates[lastAddedCursorIndex] = CursorMoveCommands.word(context, lastAddedState, lastAddedState.modelState.hasSelection(), args.position);\n context.model.pushStackElement();\n cursors.setStates(args.source, CursorChangeReason.Explicit, newStates);\n };\n return class_12;\n }(CoreEditorCommand)));\n var LineCommand = /** @class */ (function (_super) {\n __extends(LineCommand, _super);\n function LineCommand(opts) {\n var _this = _super.call(this, opts) || this;\n _this._inSelectionMode = opts.inSelectionMode;\n return _this;\n }\n LineCommand.prototype.runCoreEditorCommand = function (cursors, args) {\n cursors.context.model.pushStackElement();\n cursors.setStates(args.source, CursorChangeReason.Explicit, [\n CursorMoveCommands.line(cursors.context, cursors.getPrimaryCursor(), this._inSelectionMode, args.position, args.viewPosition)\n ]);\n cursors.reveal(false, 0 /* Primary */, 0 /* Smooth */);\n };\n return LineCommand;\n }(CoreEditorCommand));\n CoreNavigationCommands.LineSelect = registerEditorCommand(new LineCommand({\n inSelectionMode: false,\n id: '_lineSelect',\n precondition: null\n }));\n CoreNavigationCommands.LineSelectDrag = registerEditorCommand(new LineCommand({\n inSelectionMode: true,\n id: '_lineSelectDrag',\n precondition: null\n }));\n var LastCursorLineCommand = /** @class */ (function (_super) {\n __extends(LastCursorLineCommand, _super);\n function LastCursorLineCommand(opts) {\n var _this = _super.call(this, opts) || this;\n _this._inSelectionMode = opts.inSelectionMode;\n return _this;\n }\n LastCursorLineCommand.prototype.runCoreEditorCommand = function (cursors, args) {\n var lastAddedCursorIndex = cursors.getLastAddedCursorIndex();\n var newStates = cursors.getAll().slice(0);\n newStates[lastAddedCursorIndex] = CursorMoveCommands.line(cursors.context, newStates[lastAddedCursorIndex], this._inSelectionMode, args.position, args.viewPosition);\n cursors.context.model.pushStackElement();\n cursors.setStates(args.source, CursorChangeReason.Explicit, newStates);\n };\n return LastCursorLineCommand;\n }(CoreEditorCommand));\n CoreNavigationCommands.LastCursorLineSelect = registerEditorCommand(new LastCursorLineCommand({\n inSelectionMode: false,\n id: 'lastCursorLineSelect',\n precondition: null\n }));\n CoreNavigationCommands.LastCursorLineSelectDrag = registerEditorCommand(new LastCursorLineCommand({\n inSelectionMode: true,\n id: 'lastCursorLineSelectDrag',\n precondition: null\n }));\n CoreNavigationCommands.ExpandLineSelection = registerEditorCommand(new /** @class */ (function (_super) {\n __extends(class_13, _super);\n function class_13() {\n return _super.call(this, {\n id: 'expandLineSelection',\n precondition: null,\n kbOpts: {\n weight: CORE_WEIGHT,\n kbExpr: EditorContextKeys.textInputFocus,\n primary: 2048 /* CtrlCmd */ | 39 /* KEY_I */\n }\n }) || this;\n }\n class_13.prototype.runCoreEditorCommand = function (cursors, args) {\n cursors.context.model.pushStackElement();\n cursors.setStates(args.source, CursorChangeReason.Explicit, CursorMoveCommands.expandLineSelection(cursors.context, cursors.getAll()));\n cursors.reveal(true, 0 /* Primary */, 0 /* Smooth */);\n };\n return class_13;\n }(CoreEditorCommand)));\n CoreNavigationCommands.CancelSelection = registerEditorCommand(new /** @class */ (function (_super) {\n __extends(class_14, _super);\n function class_14() {\n return _super.call(this, {\n id: 'cancelSelection',\n precondition: EditorContextKeys.hasNonEmptySelection,\n kbOpts: {\n weight: CORE_WEIGHT,\n kbExpr: EditorContextKeys.textInputFocus,\n primary: 9 /* Escape */,\n secondary: [1024 /* Shift */ | 9 /* Escape */]\n }\n }) || this;\n }\n class_14.prototype.runCoreEditorCommand = function (cursors, args) {\n cursors.context.model.pushStackElement();\n cursors.setStates(args.source, CursorChangeReason.Explicit, [\n CursorMoveCommands.cancelSelection(cursors.context, cursors.getPrimaryCursor())\n ]);\n cursors.reveal(true, 0 /* Primary */, 0 /* Smooth */);\n };\n return class_14;\n }(CoreEditorCommand)));\n CoreNavigationCommands.RemoveSecondaryCursors = registerEditorCommand(new /** @class */ (function (_super) {\n __extends(class_15, _super);\n function class_15() {\n return _super.call(this, {\n id: 'removeSecondaryCursors',\n precondition: EditorContextKeys.hasMultipleSelections,\n kbOpts: {\n weight: CORE_WEIGHT + 1,\n kbExpr: EditorContextKeys.textInputFocus,\n primary: 9 /* Escape */,\n secondary: [1024 /* Shift */ | 9 /* Escape */]\n }\n }) || this;\n }\n class_15.prototype.runCoreEditorCommand = function (cursors, args) {\n cursors.context.model.pushStackElement();\n cursors.setStates(args.source, CursorChangeReason.Explicit, [\n cursors.getPrimaryCursor()\n ]);\n cursors.reveal(true, 0 /* Primary */, 0 /* Smooth */);\n };\n return class_15;\n }(CoreEditorCommand)));\n CoreNavigationCommands.RevealLine = registerEditorCommand(new /** @class */ (function (_super) {\n __extends(class_16, _super);\n function class_16() {\n return _super.call(this, {\n id: 'revealLine',\n precondition: null,\n description: RevealLine_.description\n }) || this;\n }\n class_16.prototype.runCoreEditorCommand = function (cursors, args) {\n var revealLineArg = args;\n var lineNumber = revealLineArg.lineNumber + 1;\n if (lineNumber < 1) {\n lineNumber = 1;\n }\n var lineCount = cursors.context.model.getLineCount();\n if (lineNumber > lineCount) {\n lineNumber = lineCount;\n }\n var range = new Range(lineNumber, 1, lineNumber, cursors.context.model.getLineMaxColumn(lineNumber));\n var revealAt = 0 /* Simple */;\n if (revealLineArg.at) {\n switch (revealLineArg.at) {\n case RevealLine_.RawAtArgument.Top:\n revealAt = 3 /* Top */;\n break;\n case RevealLine_.RawAtArgument.Center:\n revealAt = 1 /* Center */;\n break;\n case RevealLine_.RawAtArgument.Bottom:\n revealAt = 4 /* Bottom */;\n break;\n default:\n break;\n }\n }\n var viewRange = cursors.context.convertModelRangeToViewRange(range);\n cursors.revealRange(false, viewRange, revealAt, 0 /* Smooth */);\n };\n return class_16;\n }(CoreEditorCommand)));\n CoreNavigationCommands.SelectAll = registerEditorCommand(new /** @class */ (function (_super) {\n __extends(class_17, _super);\n function class_17() {\n return _super.call(this, {\n id: 'selectAll',\n precondition: null\n }) || this;\n }\n class_17.prototype.runCoreEditorCommand = function (cursors, args) {\n cursors.context.model.pushStackElement();\n cursors.setStates(args.source, CursorChangeReason.Explicit, [\n CursorMoveCommands.selectAll(cursors.context, cursors.getPrimaryCursor())\n ]);\n };\n return class_17;\n }(CoreEditorCommand)));\n CoreNavigationCommands.SetSelection = registerEditorCommand(new /** @class */ (function (_super) {\n __extends(class_18, _super);\n function class_18() {\n return _super.call(this, {\n id: 'setSelection',\n precondition: null\n }) || this;\n }\n class_18.prototype.runCoreEditorCommand = function (cursors, args) {\n cursors.context.model.pushStackElement();\n cursors.setStates(args.source, CursorChangeReason.Explicit, [\n CursorState.fromModelSelection(args.selection)\n ]);\n };\n return class_18;\n }(CoreEditorCommand)));\n})(CoreNavigationCommands || (CoreNavigationCommands = {}));\nexport var CoreEditingCommands;\n(function (CoreEditingCommands) {\n CoreEditingCommands.LineBreakInsert = registerEditorCommand(new /** @class */ (function (_super) {\n __extends(class_19, _super);\n function class_19() {\n return _super.call(this, {\n id: 'lineBreakInsert',\n precondition: EditorContextKeys.writable,\n kbOpts: {\n weight: CORE_WEIGHT,\n kbExpr: EditorContextKeys.textInputFocus,\n primary: null,\n mac: { primary: 256 /* WinCtrl */ | 45 /* KEY_O */ }\n }\n }) || this;\n }\n class_19.prototype.runEditorCommand = function (accessor, editor, args) {\n editor.pushUndoStop();\n editor.executeCommands(this.id, TypeOperations.lineBreakInsert(editor._getCursorConfiguration(), editor.getModel(), editor.getSelections()));\n };\n return class_19;\n }(EditorCommand)));\n CoreEditingCommands.Outdent = registerEditorCommand(new /** @class */ (function (_super) {\n __extends(class_20, _super);\n function class_20() {\n return _super.call(this, {\n id: 'outdent',\n precondition: EditorContextKeys.writable,\n kbOpts: {\n weight: CORE_WEIGHT,\n kbExpr: ContextKeyExpr.and(EditorContextKeys.editorTextFocus, EditorContextKeys.tabDoesNotMoveFocus),\n primary: 1024 /* Shift */ | 2 /* Tab */\n }\n }) || this;\n }\n class_20.prototype.runEditorCommand = function (accessor, editor, args) {\n editor.pushUndoStop();\n editor.executeCommands(this.id, TypeOperations.outdent(editor._getCursorConfiguration(), editor.getModel(), editor.getSelections()));\n editor.pushUndoStop();\n };\n return class_20;\n }(EditorCommand)));\n CoreEditingCommands.Tab = registerEditorCommand(new /** @class */ (function (_super) {\n __extends(class_21, _super);\n function class_21() {\n return _super.call(this, {\n id: 'tab',\n precondition: EditorContextKeys.writable,\n kbOpts: {\n weight: CORE_WEIGHT,\n kbExpr: ContextKeyExpr.and(EditorContextKeys.editorTextFocus, EditorContextKeys.tabDoesNotMoveFocus),\n primary: 2 /* Tab */\n }\n }) || this;\n }\n class_21.prototype.runEditorCommand = function (accessor, editor, args) {\n editor.pushUndoStop();\n editor.executeCommands(this.id, TypeOperations.tab(editor._getCursorConfiguration(), editor.getModel(), editor.getSelections()));\n editor.pushUndoStop();\n };\n return class_21;\n }(EditorCommand)));\n CoreEditingCommands.DeleteLeft = registerEditorCommand(new /** @class */ (function (_super) {\n __extends(class_22, _super);\n function class_22() {\n return _super.call(this, {\n id: 'deleteLeft',\n precondition: EditorContextKeys.writable,\n kbOpts: {\n weight: CORE_WEIGHT,\n kbExpr: EditorContextKeys.textInputFocus,\n primary: 1 /* Backspace */,\n secondary: [1024 /* Shift */ | 1 /* Backspace */],\n mac: { primary: 1 /* Backspace */, secondary: [1024 /* Shift */ | 1 /* Backspace */, 256 /* WinCtrl */ | 38 /* KEY_H */, 256 /* WinCtrl */ | 1 /* Backspace */] }\n }\n }) || this;\n }\n class_22.prototype.runEditorCommand = function (accessor, editor, args) {\n var cursors = editor._getCursors();\n var _a = DeleteOperations.deleteLeft(cursors.getPrevEditOperationType(), editor._getCursorConfiguration(), editor.getModel(), editor.getSelections()), shouldPushStackElementBefore = _a[0], commands = _a[1];\n if (shouldPushStackElementBefore) {\n editor.pushUndoStop();\n }\n editor.executeCommands(this.id, commands);\n cursors.setPrevEditOperationType(2 /* DeletingLeft */);\n };\n return class_22;\n }(EditorCommand)));\n CoreEditingCommands.DeleteRight = registerEditorCommand(new /** @class */ (function (_super) {\n __extends(class_23, _super);\n function class_23() {\n return _super.call(this, {\n id: 'deleteRight',\n precondition: EditorContextKeys.writable,\n kbOpts: {\n weight: CORE_WEIGHT,\n kbExpr: EditorContextKeys.textInputFocus,\n primary: 20 /* Delete */,\n mac: { primary: 20 /* Delete */, secondary: [256 /* WinCtrl */ | 34 /* KEY_D */, 256 /* WinCtrl */ | 20 /* Delete */] }\n }\n }) || this;\n }\n class_23.prototype.runEditorCommand = function (accessor, editor, args) {\n var cursors = editor._getCursors();\n var _a = DeleteOperations.deleteRight(cursors.getPrevEditOperationType(), editor._getCursorConfiguration(), editor.getModel(), editor.getSelections()), shouldPushStackElementBefore = _a[0], commands = _a[1];\n if (shouldPushStackElementBefore) {\n editor.pushUndoStop();\n }\n editor.executeCommands(this.id, commands);\n cursors.setPrevEditOperationType(3 /* DeletingRight */);\n };\n return class_23;\n }(EditorCommand)));\n})(CoreEditingCommands || (CoreEditingCommands = {}));\nfunction findFocusedEditor(accessor) {\n return accessor.get(ICodeEditorService).getFocusedCodeEditor();\n}\nfunction registerCommand(command) {\n command.register();\n}\n/**\n * A command that will:\n * 1. invoke a command on the focused editor.\n * 2. otherwise, invoke a browser built-in command on the `activeElement`.\n * 3. otherwise, invoke a command on the workbench active editor.\n */\nvar EditorOrNativeTextInputCommand = /** @class */ (function (_super) {\n __extends(EditorOrNativeTextInputCommand, _super);\n function EditorOrNativeTextInputCommand(opts) {\n var _this = _super.call(this, opts) || this;\n _this._editorHandler = opts.editorHandler;\n _this._inputHandler = opts.inputHandler;\n return _this;\n }\n EditorOrNativeTextInputCommand.prototype.runCommand = function (accessor, args) {\n var focusedEditor = findFocusedEditor(accessor);\n // Only if editor text focus (i.e. not if editor has widget focus).\n if (focusedEditor && focusedEditor.hasTextFocus()) {\n return this._runEditorHandler(focusedEditor, args);\n }\n // Ignore this action when user is focused on an element that allows for entering text\n var activeElement = document.activeElement;\n if (activeElement && ['input', 'textarea'].indexOf(activeElement.tagName.toLowerCase()) >= 0) {\n document.execCommand(this._inputHandler);\n return;\n }\n // Redirecting to active editor\n var activeEditor = accessor.get(ICodeEditorService).getActiveCodeEditor();\n if (activeEditor) {\n activeEditor.focus();\n return this._runEditorHandler(activeEditor, args);\n }\n };\n EditorOrNativeTextInputCommand.prototype._runEditorHandler = function (editor, args) {\n var HANDLER = this._editorHandler;\n if (typeof HANDLER === 'string') {\n editor.trigger('keyboard', HANDLER, args);\n }\n else {\n args = args || {};\n args.source = 'keyboard';\n HANDLER.runEditorCommand(null, editor, args);\n }\n };\n return EditorOrNativeTextInputCommand;\n}(Command));\n/**\n * A command that will invoke a command on the focused editor.\n */\nvar EditorHandlerCommand = /** @class */ (function (_super) {\n __extends(EditorHandlerCommand, _super);\n function EditorHandlerCommand(id, handlerId) {\n var _this = _super.call(this, {\n id: id,\n precondition: null\n }) || this;\n _this._handlerId = handlerId;\n return _this;\n }\n EditorHandlerCommand.prototype.runCommand = function (accessor, args) {\n var editor = findFocusedEditor(accessor);\n if (!editor) {\n return;\n }\n editor.trigger('keyboard', this._handlerId, args);\n };\n return EditorHandlerCommand;\n}(Command));\nregisterCommand(new EditorOrNativeTextInputCommand({\n editorHandler: CoreNavigationCommands.SelectAll,\n inputHandler: 'selectAll',\n id: 'editor.action.selectAll',\n precondition: EditorContextKeys.textInputFocus,\n kbOpts: {\n weight: CORE_WEIGHT,\n kbExpr: null,\n primary: 2048 /* CtrlCmd */ | 31 /* KEY_A */\n },\n menubarOpts: {\n menuId: MenuId.MenubarSelectionMenu,\n group: '1_basic',\n title: nls.localize({ key: 'miSelectAll', comment: ['&& denotes a mnemonic'] }, \"&&Select All\"),\n order: 1\n }\n}));\nregisterCommand(new EditorOrNativeTextInputCommand({\n editorHandler: H.Undo,\n inputHandler: 'undo',\n id: H.Undo,\n precondition: EditorContextKeys.writable,\n kbOpts: {\n weight: CORE_WEIGHT,\n kbExpr: EditorContextKeys.textInputFocus,\n primary: 2048 /* CtrlCmd */ | 56 /* KEY_Z */\n },\n menubarOpts: {\n menuId: MenuId.MenubarEditMenu,\n group: '1_do',\n title: nls.localize({ key: 'miUndo', comment: ['&& denotes a mnemonic'] }, \"&&Undo\"),\n order: 1\n }\n}));\nregisterCommand(new EditorHandlerCommand('default:' + H.Undo, H.Undo));\nregisterCommand(new EditorOrNativeTextInputCommand({\n editorHandler: H.Redo,\n inputHandler: 'redo',\n id: H.Redo,\n precondition: EditorContextKeys.writable,\n kbOpts: {\n weight: CORE_WEIGHT,\n kbExpr: EditorContextKeys.textInputFocus,\n primary: 2048 /* CtrlCmd */ | 55 /* KEY_Y */,\n secondary: [2048 /* CtrlCmd */ | 1024 /* Shift */ | 56 /* KEY_Z */],\n mac: { primary: 2048 /* CtrlCmd */ | 1024 /* Shift */ | 56 /* KEY_Z */ }\n },\n menubarOpts: {\n menuId: MenuId.MenubarEditMenu,\n group: '1_do',\n title: nls.localize({ key: 'miRedo', comment: ['&& denotes a mnemonic'] }, \"&&Redo\"),\n order: 2\n }\n}));\nregisterCommand(new EditorHandlerCommand('default:' + H.Redo, H.Redo));\nfunction registerOverwritableCommand(handlerId) {\n registerCommand(new EditorHandlerCommand('default:' + handlerId, handlerId));\n registerCommand(new EditorHandlerCommand(handlerId, handlerId));\n}\nregisterOverwritableCommand(H.Type);\nregisterOverwritableCommand(H.ReplacePreviousChar);\nregisterOverwritableCommand(H.CompositionStart);\nregisterOverwritableCommand(H.CompositionEnd);\nregisterOverwritableCommand(H.Paste);\nregisterOverwritableCommand(H.Cut);\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport { Selection } from '../core/selection';\nvar ReplaceCommand = /** @class */ (function () {\n function ReplaceCommand(range, text, insertsAutoWhitespace) {\n if (insertsAutoWhitespace === void 0) { insertsAutoWhitespace = false; }\n this._range = range;\n this._text = text;\n this.insertsAutoWhitespace = insertsAutoWhitespace;\n }\n ReplaceCommand.prototype.getEditOperations = function (model, builder) {\n builder.addTrackedEditOperation(this._range, this._text);\n };\n ReplaceCommand.prototype.computeCursorState = function (model, helper) {\n var inverseEditOperations = helper.getInverseEditOperations();\n var srcRange = inverseEditOperations[0].range;\n return new Selection(srcRange.endLineNumber, srcRange.endColumn, srcRange.endLineNumber, srcRange.endColumn);\n };\n return ReplaceCommand;\n}());\nexport { ReplaceCommand };\nvar ReplaceCommandWithoutChangingPosition = /** @class */ (function () {\n function ReplaceCommandWithoutChangingPosition(range, text, insertsAutoWhitespace) {\n if (insertsAutoWhitespace === void 0) { insertsAutoWhitespace = false; }\n this._range = range;\n this._text = text;\n this.insertsAutoWhitespace = insertsAutoWhitespace;\n }\n ReplaceCommandWithoutChangingPosition.prototype.getEditOperations = function (model, builder) {\n builder.addTrackedEditOperation(this._range, this._text);\n };\n ReplaceCommandWithoutChangingPosition.prototype.computeCursorState = function (model, helper) {\n var inverseEditOperations = helper.getInverseEditOperations();\n var srcRange = inverseEditOperations[0].range;\n return new Selection(srcRange.startLineNumber, srcRange.startColumn, srcRange.startLineNumber, srcRange.startColumn);\n };\n return ReplaceCommandWithoutChangingPosition;\n}());\nexport { ReplaceCommandWithoutChangingPosition };\nvar ReplaceCommandWithOffsetCursorState = /** @class */ (function () {\n function ReplaceCommandWithOffsetCursorState(range, text, lineNumberDeltaOffset, columnDeltaOffset, insertsAutoWhitespace) {\n if (insertsAutoWhitespace === void 0) { insertsAutoWhitespace = false; }\n this._range = range;\n this._text = text;\n this._columnDeltaOffset = columnDeltaOffset;\n this._lineNumberDeltaOffset = lineNumberDeltaOffset;\n this.insertsAutoWhitespace = insertsAutoWhitespace;\n }\n ReplaceCommandWithOffsetCursorState.prototype.getEditOperations = function (model, builder) {\n builder.addTrackedEditOperation(this._range, this._text);\n };\n ReplaceCommandWithOffsetCursorState.prototype.computeCursorState = function (model, helper) {\n var inverseEditOperations = helper.getInverseEditOperations();\n var srcRange = inverseEditOperations[0].range;\n return new Selection(srcRange.endLineNumber + this._lineNumberDeltaOffset, srcRange.endColumn + this._columnDeltaOffset, srcRange.endLineNumber + this._lineNumberDeltaOffset, srcRange.endColumn + this._columnDeltaOffset);\n };\n return ReplaceCommandWithOffsetCursorState;\n}());\nexport { ReplaceCommandWithOffsetCursorState };\nvar ReplaceCommandThatPreservesSelection = /** @class */ (function () {\n function ReplaceCommandThatPreservesSelection(editRange, text, initialSelection) {\n this._range = editRange;\n this._text = text;\n this._initialSelection = initialSelection;\n }\n ReplaceCommandThatPreservesSelection.prototype.getEditOperations = function (model, builder) {\n builder.addEditOperation(this._range, this._text);\n this._selectionId = builder.trackSelection(this._initialSelection);\n };\n ReplaceCommandThatPreservesSelection.prototype.computeCursorState = function (model, helper) {\n return helper.getTrackedSelection(this._selectionId);\n };\n return ReplaceCommandThatPreservesSelection;\n}());\nexport { ReplaceCommandThatPreservesSelection };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport { Range } from '../core/range';\nimport { Selection } from '../core/selection';\nvar SurroundSelectionCommand = /** @class */ (function () {\n function SurroundSelectionCommand(range, charBeforeSelection, charAfterSelection) {\n this._range = range;\n this._charBeforeSelection = charBeforeSelection;\n this._charAfterSelection = charAfterSelection;\n }\n SurroundSelectionCommand.prototype.getEditOperations = function (model, builder) {\n builder.addTrackedEditOperation(new Range(this._range.startLineNumber, this._range.startColumn, this._range.startLineNumber, this._range.startColumn), this._charBeforeSelection);\n builder.addTrackedEditOperation(new Range(this._range.endLineNumber, this._range.endColumn, this._range.endLineNumber, this._range.endColumn), this._charAfterSelection);\n };\n SurroundSelectionCommand.prototype.computeCursorState = function (model, helper) {\n var inverseEditOperations = helper.getInverseEditOperations();\n var firstOperationRange = inverseEditOperations[0].range;\n var secondOperationRange = inverseEditOperations[1].range;\n return new Selection(firstOperationRange.endLineNumber, firstOperationRange.endColumn, secondOperationRange.endLineNumber, secondOperationRange.endColumn - this._charAfterSelection.length);\n };\n return SurroundSelectionCommand;\n}());\nexport { SurroundSelectionCommand };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport { onUnexpectedError } from '../../../base/common/errors';\nimport { ReplaceCommand, ReplaceCommandWithoutChangingPosition, ReplaceCommandWithOffsetCursorState } from '../commands/replaceCommand';\nimport { CursorColumns, EditOperationResult } from './cursorCommon';\nimport { Range } from '../core/range';\nimport * as strings from '../../../base/common/strings';\nimport { ShiftCommand } from '../commands/shiftCommand';\nimport { LanguageConfigurationRegistry } from '../modes/languageConfigurationRegistry';\nimport { IndentAction } from '../modes/languageConfiguration';\nimport { SurroundSelectionCommand } from '../commands/surroundSelectionCommand';\nimport { getMapForWordSeparators } from './wordCharacterClassifier';\nvar TypeOperations = /** @class */ (function () {\n function TypeOperations() {\n }\n TypeOperations.indent = function (config, model, selections) {\n var commands = [];\n for (var i = 0, len = selections.length; i < len; i++) {\n commands[i] = new ShiftCommand(selections[i], {\n isUnshift: false,\n tabSize: config.tabSize,\n oneIndent: config.oneIndent,\n useTabStops: config.useTabStops\n });\n }\n return commands;\n };\n TypeOperations.outdent = function (config, model, selections) {\n var commands = [];\n for (var i = 0, len = selections.length; i < len; i++) {\n commands[i] = new ShiftCommand(selections[i], {\n isUnshift: true,\n tabSize: config.tabSize,\n oneIndent: config.oneIndent,\n useTabStops: config.useTabStops\n });\n }\n return commands;\n };\n TypeOperations.shiftIndent = function (config, indentation, count) {\n count = count || 1;\n var desiredIndentCount = ShiftCommand.shiftIndentCount(indentation, indentation.length + count, config.tabSize);\n var newIndentation = '';\n for (var i = 0; i < desiredIndentCount; i++) {\n newIndentation += '\\t';\n }\n return newIndentation;\n };\n TypeOperations.unshiftIndent = function (config, indentation, count) {\n count = count || 1;\n var desiredIndentCount = ShiftCommand.unshiftIndentCount(indentation, indentation.length + count, config.tabSize);\n var newIndentation = '';\n for (var i = 0; i < desiredIndentCount; i++) {\n newIndentation += '\\t';\n }\n return newIndentation;\n };\n TypeOperations._distributedPaste = function (config, model, selections, text) {\n var commands = [];\n for (var i = 0, len = selections.length; i < len; i++) {\n commands[i] = new ReplaceCommand(selections[i], text[i]);\n }\n return new EditOperationResult(0 /* Other */, commands, {\n shouldPushStackElementBefore: true,\n shouldPushStackElementAfter: true\n });\n };\n TypeOperations._simplePaste = function (config, model, selections, text, pasteOnNewLine) {\n var commands = [];\n for (var i = 0, len = selections.length; i < len; i++) {\n var selection = selections[i];\n var position = selection.getPosition();\n if (pasteOnNewLine && text.indexOf('\\n') !== text.length - 1) {\n pasteOnNewLine = false;\n }\n if (pasteOnNewLine && selection.startLineNumber !== selection.endLineNumber) {\n pasteOnNewLine = false;\n }\n if (pasteOnNewLine && selection.startColumn === model.getLineMinColumn(selection.startLineNumber) && selection.endColumn === model.getLineMaxColumn(selection.startLineNumber)) {\n pasteOnNewLine = false;\n }\n if (pasteOnNewLine) {\n // Paste entire line at the beginning of line\n var typeSelection = new Range(position.lineNumber, 1, position.lineNumber, 1);\n commands[i] = new ReplaceCommand(typeSelection, text);\n }\n else {\n commands[i] = new ReplaceCommand(selection, text);\n }\n }\n return new EditOperationResult(0 /* Other */, commands, {\n shouldPushStackElementBefore: true,\n shouldPushStackElementAfter: true\n });\n };\n TypeOperations._distributePasteToCursors = function (selections, text, pasteOnNewLine, multicursorText) {\n if (pasteOnNewLine) {\n return null;\n }\n if (selections.length === 1) {\n return null;\n }\n if (multicursorText && multicursorText.length === selections.length) {\n return multicursorText;\n }\n // Remove trailing \\n if present\n if (text.charCodeAt(text.length - 1) === 10 /* LineFeed */) {\n text = text.substr(0, text.length - 1);\n }\n var lines = text.split(/\\r\\n|\\r|\\n/);\n if (lines.length === selections.length) {\n return lines;\n }\n return null;\n };\n TypeOperations.paste = function (config, model, selections, text, pasteOnNewLine, multicursorText) {\n var distributedPaste = this._distributePasteToCursors(selections, text, pasteOnNewLine, multicursorText);\n if (distributedPaste) {\n selections = selections.sort(Range.compareRangesUsingStarts);\n return this._distributedPaste(config, model, selections, distributedPaste);\n }\n else {\n return this._simplePaste(config, model, selections, text, pasteOnNewLine);\n }\n };\n TypeOperations._goodIndentForLine = function (config, model, lineNumber) {\n var action;\n var indentation;\n var expectedIndentAction = config.autoIndent ? LanguageConfigurationRegistry.getInheritIndentForLine(model, lineNumber, false) : null;\n if (expectedIndentAction) {\n action = expectedIndentAction.action;\n indentation = expectedIndentAction.indentation;\n }\n else if (lineNumber > 1) {\n var lastLineNumber = lineNumber - 1;\n for (lastLineNumber = lineNumber - 1; lastLineNumber >= 1; lastLineNumber--) {\n var lineText = model.getLineContent(lastLineNumber);\n var nonWhitespaceIdx = strings.lastNonWhitespaceIndex(lineText);\n if (nonWhitespaceIdx >= 0) {\n break;\n }\n }\n if (lastLineNumber < 1) {\n // No previous line with content found\n return null;\n }\n var maxColumn = model.getLineMaxColumn(lastLineNumber);\n var expectedEnterAction = LanguageConfigurationRegistry.getEnterAction(model, new Range(lastLineNumber, maxColumn, lastLineNumber, maxColumn));\n if (expectedEnterAction) {\n indentation = expectedEnterAction.indentation;\n action = expectedEnterAction.enterAction;\n if (action) {\n indentation += action.appendText;\n }\n }\n }\n if (action) {\n if (action === IndentAction.Indent) {\n indentation = TypeOperations.shiftIndent(config, indentation);\n }\n if (action === IndentAction.Outdent) {\n indentation = TypeOperations.unshiftIndent(config, indentation);\n }\n indentation = config.normalizeIndentation(indentation);\n }\n if (!indentation) {\n return null;\n }\n return indentation;\n };\n TypeOperations._replaceJumpToNextIndent = function (config, model, selection, insertsAutoWhitespace) {\n var typeText = '';\n var position = selection.getStartPosition();\n if (config.insertSpaces) {\n var visibleColumnFromColumn = CursorColumns.visibleColumnFromColumn2(config, model, position);\n var tabSize = config.tabSize;\n var spacesCnt = tabSize - (visibleColumnFromColumn % tabSize);\n for (var i = 0; i < spacesCnt; i++) {\n typeText += ' ';\n }\n }\n else {\n typeText = '\\t';\n }\n return new ReplaceCommand(selection, typeText, insertsAutoWhitespace);\n };\n TypeOperations.tab = function (config, model, selections) {\n var commands = [];\n for (var i = 0, len = selections.length; i < len; i++) {\n var selection = selections[i];\n if (selection.isEmpty()) {\n var lineText = model.getLineContent(selection.startLineNumber);\n if (/^\\s*$/.test(lineText) && model.isCheapToTokenize(selection.startLineNumber)) {\n var goodIndent = this._goodIndentForLine(config, model, selection.startLineNumber);\n goodIndent = goodIndent || '\\t';\n var possibleTypeText = config.normalizeIndentation(goodIndent);\n if (!strings.startsWith(lineText, possibleTypeText)) {\n commands[i] = new ReplaceCommand(new Range(selection.startLineNumber, 1, selection.startLineNumber, lineText.length + 1), possibleTypeText, true);\n continue;\n }\n }\n commands[i] = this._replaceJumpToNextIndent(config, model, selection, true);\n }\n else {\n if (selection.startLineNumber === selection.endLineNumber) {\n var lineMaxColumn = model.getLineMaxColumn(selection.startLineNumber);\n if (selection.startColumn !== 1 || selection.endColumn !== lineMaxColumn) {\n // This is a single line selection that is not the entire line\n commands[i] = this._replaceJumpToNextIndent(config, model, selection, false);\n continue;\n }\n }\n commands[i] = new ShiftCommand(selection, {\n isUnshift: false,\n tabSize: config.tabSize,\n oneIndent: config.oneIndent,\n useTabStops: config.useTabStops\n });\n }\n }\n return commands;\n };\n TypeOperations.replacePreviousChar = function (prevEditOperationType, config, model, selections, txt, replaceCharCnt) {\n var commands = [];\n for (var i = 0, len = selections.length; i < len; i++) {\n var selection = selections[i];\n if (!selection.isEmpty()) {\n // looks like https://github.com/Microsoft/vscode/issues/2773\n // where a cursor operation occurred before a canceled composition\n // => ignore composition\n commands[i] = null;\n continue;\n }\n var pos = selection.getPosition();\n var startColumn = Math.max(1, pos.column - replaceCharCnt);\n var range = new Range(pos.lineNumber, startColumn, pos.lineNumber, pos.column);\n commands[i] = new ReplaceCommand(range, txt);\n }\n return new EditOperationResult(1 /* Typing */, commands, {\n shouldPushStackElementBefore: (prevEditOperationType !== 1 /* Typing */),\n shouldPushStackElementAfter: false\n });\n };\n TypeOperations._typeCommand = function (range, text, keepPosition) {\n if (keepPosition) {\n return new ReplaceCommandWithoutChangingPosition(range, text, true);\n }\n else {\n return new ReplaceCommand(range, text, true);\n }\n };\n TypeOperations._enter = function (config, model, keepPosition, range) {\n if (!model.isCheapToTokenize(range.getStartPosition().lineNumber)) {\n var lineText_1 = model.getLineContent(range.startLineNumber);\n var indentation_1 = strings.getLeadingWhitespace(lineText_1).substring(0, range.startColumn - 1);\n return TypeOperations._typeCommand(range, '\\n' + config.normalizeIndentation(indentation_1), keepPosition);\n }\n var r = LanguageConfigurationRegistry.getEnterAction(model, range);\n if (r) {\n var enterAction = r.enterAction;\n var indentation_2 = r.indentation;\n if (enterAction.indentAction === IndentAction.None) {\n // Nothing special\n return TypeOperations._typeCommand(range, '\\n' + config.normalizeIndentation(indentation_2 + enterAction.appendText), keepPosition);\n }\n else if (enterAction.indentAction === IndentAction.Indent) {\n // Indent once\n return TypeOperations._typeCommand(range, '\\n' + config.normalizeIndentation(indentation_2 + enterAction.appendText), keepPosition);\n }\n else if (enterAction.indentAction === IndentAction.IndentOutdent) {\n // Ultra special\n var normalIndent = config.normalizeIndentation(indentation_2);\n var increasedIndent = config.normalizeIndentation(indentation_2 + enterAction.appendText);\n var typeText = '\\n' + increasedIndent + '\\n' + normalIndent;\n if (keepPosition) {\n return new ReplaceCommandWithoutChangingPosition(range, typeText, true);\n }\n else {\n return new ReplaceCommandWithOffsetCursorState(range, typeText, -1, increasedIndent.length - normalIndent.length, true);\n }\n }\n else if (enterAction.indentAction === IndentAction.Outdent) {\n var actualIndentation = TypeOperations.unshiftIndent(config, indentation_2);\n return TypeOperations._typeCommand(range, '\\n' + config.normalizeIndentation(actualIndentation + enterAction.appendText), keepPosition);\n }\n }\n // no enter rules applied, we should check indentation rules then.\n if (!config.autoIndent) {\n // Nothing special\n var lineText_2 = model.getLineContent(range.startLineNumber);\n var indentation_3 = strings.getLeadingWhitespace(lineText_2).substring(0, range.startColumn - 1);\n return TypeOperations._typeCommand(range, '\\n' + config.normalizeIndentation(indentation_3), keepPosition);\n }\n var ir = LanguageConfigurationRegistry.getIndentForEnter(model, range, {\n unshiftIndent: function (indent) {\n return TypeOperations.unshiftIndent(config, indent);\n },\n shiftIndent: function (indent) {\n return TypeOperations.shiftIndent(config, indent);\n },\n normalizeIndentation: function (indent) {\n return config.normalizeIndentation(indent);\n }\n }, config.autoIndent);\n var lineText = model.getLineContent(range.startLineNumber);\n var indentation = strings.getLeadingWhitespace(lineText).substring(0, range.startColumn - 1);\n if (ir) {\n var oldEndViewColumn = CursorColumns.visibleColumnFromColumn2(config, model, range.getEndPosition());\n var oldEndColumn = range.endColumn;\n var beforeText = '\\n';\n if (indentation !== config.normalizeIndentation(ir.beforeEnter)) {\n beforeText = config.normalizeIndentation(ir.beforeEnter) + lineText.substring(indentation.length, range.startColumn - 1) + '\\n';\n range = new Range(range.startLineNumber, 1, range.endLineNumber, range.endColumn);\n }\n var newLineContent = model.getLineContent(range.endLineNumber);\n var firstNonWhitespace = strings.firstNonWhitespaceIndex(newLineContent);\n if (firstNonWhitespace >= 0) {\n range = range.setEndPosition(range.endLineNumber, Math.max(range.endColumn, firstNonWhitespace + 1));\n }\n else {\n range = range.setEndPosition(range.endLineNumber, model.getLineMaxColumn(range.endLineNumber));\n }\n if (keepPosition) {\n return new ReplaceCommandWithoutChangingPosition(range, beforeText + config.normalizeIndentation(ir.afterEnter), true);\n }\n else {\n var offset = 0;\n if (oldEndColumn <= firstNonWhitespace + 1) {\n if (!config.insertSpaces) {\n oldEndViewColumn = Math.ceil(oldEndViewColumn / config.tabSize);\n }\n offset = Math.min(oldEndViewColumn + 1 - config.normalizeIndentation(ir.afterEnter).length - 1, 0);\n }\n return new ReplaceCommandWithOffsetCursorState(range, beforeText + config.normalizeIndentation(ir.afterEnter), 0, offset, true);\n }\n }\n else {\n return TypeOperations._typeCommand(range, '\\n' + config.normalizeIndentation(indentation), keepPosition);\n }\n };\n TypeOperations._isAutoIndentType = function (config, model, selections) {\n if (!config.autoIndent) {\n return false;\n }\n for (var i = 0, len = selections.length; i < len; i++) {\n if (!model.isCheapToTokenize(selections[i].getEndPosition().lineNumber)) {\n return false;\n }\n }\n return true;\n };\n TypeOperations._runAutoIndentType = function (config, model, range, ch) {\n var currentIndentation = LanguageConfigurationRegistry.getIndentationAtPosition(model, range.startLineNumber, range.startColumn);\n var actualIndentation = LanguageConfigurationRegistry.getIndentActionForType(model, range, ch, {\n shiftIndent: function (indentation) {\n return TypeOperations.shiftIndent(config, indentation);\n },\n unshiftIndent: function (indentation) {\n return TypeOperations.unshiftIndent(config, indentation);\n },\n });\n if (actualIndentation === null) {\n return null;\n }\n if (actualIndentation !== config.normalizeIndentation(currentIndentation)) {\n var firstNonWhitespace = model.getLineFirstNonWhitespaceColumn(range.startLineNumber);\n if (firstNonWhitespace === 0) {\n return TypeOperations._typeCommand(new Range(range.startLineNumber, 0, range.endLineNumber, range.endColumn), config.normalizeIndentation(actualIndentation) + ch, false);\n }\n else {\n return TypeOperations._typeCommand(new Range(range.startLineNumber, 0, range.endLineNumber, range.endColumn), config.normalizeIndentation(actualIndentation) +\n model.getLineContent(range.startLineNumber).substring(firstNonWhitespace - 1, range.startColumn - 1) + ch, false);\n }\n }\n return null;\n };\n TypeOperations._isAutoClosingCloseCharType = function (config, model, selections, ch) {\n if (!config.autoClosingBrackets || !config.autoClosingPairsClose.hasOwnProperty(ch)) {\n return false;\n }\n var isEqualPair = (ch === config.autoClosingPairsClose[ch]);\n for (var i = 0, len = selections.length; i < len; i++) {\n var selection = selections[i];\n if (!selection.isEmpty()) {\n return false;\n }\n var position = selection.getPosition();\n var lineText = model.getLineContent(position.lineNumber);\n var afterCharacter = lineText.charAt(position.column - 1);\n if (afterCharacter !== ch) {\n return false;\n }\n if (isEqualPair) {\n var lineTextBeforeCursor = lineText.substr(0, position.column - 1);\n var chCntBefore = this._countNeedlesInHaystack(lineTextBeforeCursor, ch);\n if (chCntBefore % 2 === 0) {\n return false;\n }\n }\n }\n return true;\n };\n TypeOperations._countNeedlesInHaystack = function (haystack, needle) {\n var cnt = 0;\n var lastIndex = -1;\n while ((lastIndex = haystack.indexOf(needle, lastIndex + 1)) !== -1) {\n cnt++;\n }\n return cnt;\n };\n TypeOperations._runAutoClosingCloseCharType = function (prevEditOperationType, config, model, selections, ch) {\n var commands = [];\n for (var i = 0, len = selections.length; i < len; i++) {\n var selection = selections[i];\n var position = selection.getPosition();\n var typeSelection = new Range(position.lineNumber, position.column, position.lineNumber, position.column + 1);\n commands[i] = new ReplaceCommand(typeSelection, ch);\n }\n return new EditOperationResult(1 /* Typing */, commands, {\n shouldPushStackElementBefore: (prevEditOperationType !== 1 /* Typing */),\n shouldPushStackElementAfter: false\n });\n };\n TypeOperations._isBeforeClosingBrace = function (config, ch, characterAfter) {\n var thisBraceIsSymmetric = (config.autoClosingPairsOpen[ch] === ch);\n var isBeforeCloseBrace = false;\n for (var otherCloseBrace in config.autoClosingPairsClose) {\n var otherBraceIsSymmetric = (config.autoClosingPairsOpen[otherCloseBrace] === otherCloseBrace);\n if (!thisBraceIsSymmetric && otherBraceIsSymmetric) {\n continue;\n }\n if (characterAfter === otherCloseBrace) {\n isBeforeCloseBrace = true;\n break;\n }\n }\n return isBeforeCloseBrace;\n };\n TypeOperations._isAutoClosingOpenCharType = function (config, model, selections, ch) {\n if (!config.autoClosingBrackets || !config.autoClosingPairsOpen.hasOwnProperty(ch)) {\n return false;\n }\n for (var i = 0, len = selections.length; i < len; i++) {\n var selection = selections[i];\n if (!selection.isEmpty()) {\n return false;\n }\n var position = selection.getPosition();\n var lineText = model.getLineContent(position.lineNumber);\n // Do not auto-close ' or \" after a word character\n if ((ch === '\\'' || ch === '\"') && position.column > 1) {\n var wordSeparators = getMapForWordSeparators(config.wordSeparators);\n var characterBeforeCode = lineText.charCodeAt(position.column - 2);\n var characterBeforeType = wordSeparators.get(characterBeforeCode);\n if (characterBeforeType === 0 /* Regular */) {\n return false;\n }\n }\n // Only consider auto closing the pair if a space follows or if another autoclosed pair follows\n var characterAfter = lineText.charAt(position.column - 1);\n if (characterAfter) {\n var isBeforeCloseBrace = TypeOperations._isBeforeClosingBrace(config, ch, characterAfter);\n if (!isBeforeCloseBrace && !/\\s/.test(characterAfter)) {\n return false;\n }\n }\n if (!model.isCheapToTokenize(position.lineNumber)) {\n // Do not force tokenization\n return false;\n }\n model.forceTokenization(position.lineNumber);\n var lineTokens = model.getLineTokens(position.lineNumber);\n var shouldAutoClosePair = false;\n try {\n shouldAutoClosePair = LanguageConfigurationRegistry.shouldAutoClosePair(ch, lineTokens, position.column);\n }\n catch (e) {\n onUnexpectedError(e);\n }\n if (!shouldAutoClosePair) {\n return false;\n }\n }\n return true;\n };\n TypeOperations._runAutoClosingOpenCharType = function (prevEditOperationType, config, model, selections, ch) {\n var commands = [];\n for (var i = 0, len = selections.length; i < len; i++) {\n var selection = selections[i];\n var closeCharacter = config.autoClosingPairsOpen[ch];\n commands[i] = new ReplaceCommandWithOffsetCursorState(selection, ch + closeCharacter, 0, -closeCharacter.length);\n }\n return new EditOperationResult(1 /* Typing */, commands, {\n shouldPushStackElementBefore: true,\n shouldPushStackElementAfter: false\n });\n };\n TypeOperations._isSurroundSelectionType = function (config, model, selections, ch) {\n if (!config.autoClosingBrackets || !config.surroundingPairs.hasOwnProperty(ch)) {\n return false;\n }\n var isTypingAQuoteCharacter = (ch === '\\'' || ch === '\"');\n for (var i = 0, len = selections.length; i < len; i++) {\n var selection = selections[i];\n if (selection.isEmpty()) {\n return false;\n }\n var selectionContainsOnlyWhitespace = true;\n for (var lineNumber = selection.startLineNumber; lineNumber <= selection.endLineNumber; lineNumber++) {\n var lineText = model.getLineContent(lineNumber);\n var startIndex = (lineNumber === selection.startLineNumber ? selection.startColumn - 1 : 0);\n var endIndex = (lineNumber === selection.endLineNumber ? selection.endColumn - 1 : lineText.length);\n var selectedText = lineText.substring(startIndex, endIndex);\n if (/[^ \\t]/.test(selectedText)) {\n // this selected text contains something other than whitespace\n selectionContainsOnlyWhitespace = false;\n break;\n }\n }\n if (selectionContainsOnlyWhitespace) {\n return false;\n }\n if (isTypingAQuoteCharacter && selection.startLineNumber === selection.endLineNumber && selection.startColumn + 1 === selection.endColumn) {\n var selectionText = model.getValueInRange(selection);\n if ((selectionText === '\\'' || selectionText === '\"')) {\n // Typing a quote character on top of another quote character\n // => disable surround selection type\n return false;\n }\n }\n }\n return true;\n };\n TypeOperations._runSurroundSelectionType = function (prevEditOperationType, config, model, selections, ch) {\n var commands = [];\n for (var i = 0, len = selections.length; i < len; i++) {\n var selection = selections[i];\n var closeCharacter = config.surroundingPairs[ch];\n commands[i] = new SurroundSelectionCommand(selection, ch, closeCharacter);\n }\n return new EditOperationResult(0 /* Other */, commands, {\n shouldPushStackElementBefore: true,\n shouldPushStackElementAfter: true\n });\n };\n TypeOperations._isTypeInterceptorElectricChar = function (config, model, selections) {\n if (selections.length === 1 && model.isCheapToTokenize(selections[0].getEndPosition().lineNumber)) {\n return true;\n }\n return false;\n };\n TypeOperations._typeInterceptorElectricChar = function (prevEditOperationType, config, model, selection, ch) {\n if (!config.electricChars.hasOwnProperty(ch) || !selection.isEmpty()) {\n return null;\n }\n var position = selection.getPosition();\n model.forceTokenization(position.lineNumber);\n var lineTokens = model.getLineTokens(position.lineNumber);\n var electricAction;\n try {\n electricAction = LanguageConfigurationRegistry.onElectricCharacter(ch, lineTokens, position.column);\n }\n catch (e) {\n onUnexpectedError(e);\n }\n if (!electricAction) {\n return null;\n }\n if (electricAction.appendText) {\n var command = new ReplaceCommandWithOffsetCursorState(selection, ch + electricAction.appendText, 0, -electricAction.appendText.length);\n return new EditOperationResult(1 /* Typing */, [command], {\n shouldPushStackElementBefore: false,\n shouldPushStackElementAfter: true\n });\n }\n if (electricAction.matchOpenBracket) {\n var endColumn = (lineTokens.getLineContent() + ch).lastIndexOf(electricAction.matchOpenBracket) + 1;\n var match = model.findMatchingBracketUp(electricAction.matchOpenBracket, {\n lineNumber: position.lineNumber,\n column: endColumn\n });\n if (match) {\n if (match.startLineNumber === position.lineNumber) {\n // matched something on the same line => no change in indentation\n return null;\n }\n var matchLine = model.getLineContent(match.startLineNumber);\n var matchLineIndentation = strings.getLeadingWhitespace(matchLine);\n var newIndentation = config.normalizeIndentation(matchLineIndentation);\n var lineText = model.getLineContent(position.lineNumber);\n var lineFirstNonBlankColumn = model.getLineFirstNonWhitespaceColumn(position.lineNumber) || position.column;\n var prefix = lineText.substring(lineFirstNonBlankColumn - 1, position.column - 1);\n var typeText = newIndentation + prefix + ch;\n var typeSelection = new Range(position.lineNumber, 1, position.lineNumber, position.column);\n var command = new ReplaceCommand(typeSelection, typeText);\n return new EditOperationResult(1 /* Typing */, [command], {\n shouldPushStackElementBefore: false,\n shouldPushStackElementAfter: true\n });\n }\n }\n return null;\n };\n TypeOperations.compositionEndWithInterceptors = function (prevEditOperationType, config, model, selections) {\n if (!config.autoClosingBrackets) {\n return null;\n }\n var commands = [];\n for (var i = 0; i < selections.length; i++) {\n if (!selections[i].isEmpty()) {\n continue;\n }\n var position = selections[i].getPosition();\n var lineText = model.getLineContent(position.lineNumber);\n var ch = lineText.charAt(position.column - 2);\n if (config.autoClosingPairsClose.hasOwnProperty(ch)) { // first of all, it's a closing tag\n if (ch === config.autoClosingPairsClose[ch] /** isEqualPair */) {\n var lineTextBeforeCursor = lineText.substr(0, position.column - 2);\n var chCntBefore = this._countNeedlesInHaystack(lineTextBeforeCursor, ch);\n if (chCntBefore % 2 === 1) {\n continue; // it pairs with the opening tag.\n }\n }\n }\n // As we are not typing in a new character, so we don't need to run `_runAutoClosingCloseCharType`\n // Next step, let's try to check if it's an open char.\n if (config.autoClosingPairsOpen.hasOwnProperty(ch)) {\n if ((ch === '\\'' || ch === '\"') && position.column > 2) {\n var wordSeparators = getMapForWordSeparators(config.wordSeparators);\n var characterBeforeCode = lineText.charCodeAt(position.column - 3);\n var characterBeforeType = wordSeparators.get(characterBeforeCode);\n if (characterBeforeType === 0 /* Regular */) {\n continue;\n }\n }\n var characterAfter = lineText.charAt(position.column - 1);\n if (characterAfter) {\n var isBeforeCloseBrace = TypeOperations._isBeforeClosingBrace(config, ch, characterAfter);\n if (!isBeforeCloseBrace && !/\\s/.test(characterAfter)) {\n continue;\n }\n }\n if (!model.isCheapToTokenize(position.lineNumber)) {\n // Do not force tokenization\n continue;\n }\n model.forceTokenization(position.lineNumber);\n var lineTokens = model.getLineTokens(position.lineNumber);\n var shouldAutoClosePair = false;\n try {\n shouldAutoClosePair = LanguageConfigurationRegistry.shouldAutoClosePair(ch, lineTokens, position.column - 1);\n }\n catch (e) {\n onUnexpectedError(e);\n }\n if (shouldAutoClosePair) {\n var closeCharacter = config.autoClosingPairsOpen[ch];\n commands[i] = new ReplaceCommandWithOffsetCursorState(selections[i], closeCharacter, 0, -closeCharacter.length);\n }\n }\n }\n return new EditOperationResult(1 /* Typing */, commands, {\n shouldPushStackElementBefore: true,\n shouldPushStackElementAfter: false\n });\n };\n TypeOperations.typeWithInterceptors = function (prevEditOperationType, config, model, selections, ch) {\n if (ch === '\\n') {\n var commands_1 = [];\n for (var i = 0, len = selections.length; i < len; i++) {\n commands_1[i] = TypeOperations._enter(config, model, false, selections[i]);\n }\n return new EditOperationResult(1 /* Typing */, commands_1, {\n shouldPushStackElementBefore: true,\n shouldPushStackElementAfter: false,\n });\n }\n if (this._isAutoIndentType(config, model, selections)) {\n var commands_2 = [];\n var autoIndentFails = false;\n for (var i = 0, len = selections.length; i < len; i++) {\n commands_2[i] = this._runAutoIndentType(config, model, selections[i], ch);\n if (!commands_2[i]) {\n autoIndentFails = true;\n break;\n }\n }\n if (!autoIndentFails) {\n return new EditOperationResult(1 /* Typing */, commands_2, {\n shouldPushStackElementBefore: true,\n shouldPushStackElementAfter: false,\n });\n }\n }\n if (this._isAutoClosingCloseCharType(config, model, selections, ch)) {\n return this._runAutoClosingCloseCharType(prevEditOperationType, config, model, selections, ch);\n }\n if (this._isAutoClosingOpenCharType(config, model, selections, ch)) {\n return this._runAutoClosingOpenCharType(prevEditOperationType, config, model, selections, ch);\n }\n if (this._isSurroundSelectionType(config, model, selections, ch)) {\n return this._runSurroundSelectionType(prevEditOperationType, config, model, selections, ch);\n }\n // Electric characters make sense only when dealing with a single cursor,\n // as multiple cursors typing brackets for example would interfer with bracket matching\n if (this._isTypeInterceptorElectricChar(config, model, selections)) {\n var r = this._typeInterceptorElectricChar(prevEditOperationType, config, model, selections[0], ch);\n if (r) {\n return r;\n }\n }\n // A simple character type\n var commands = [];\n for (var i = 0, len = selections.length; i < len; i++) {\n commands[i] = new ReplaceCommand(selections[i], ch);\n }\n var shouldPushStackElementBefore = (prevEditOperationType !== 1 /* Typing */);\n if (ch === ' ') {\n shouldPushStackElementBefore = true;\n }\n return new EditOperationResult(1 /* Typing */, commands, {\n shouldPushStackElementBefore: shouldPushStackElementBefore,\n shouldPushStackElementAfter: false\n });\n };\n TypeOperations.typeWithoutInterceptors = function (prevEditOperationType, config, model, selections, str) {\n var commands = [];\n for (var i = 0, len = selections.length; i < len; i++) {\n commands[i] = new ReplaceCommand(selections[i], str);\n }\n return new EditOperationResult(1 /* Typing */, commands, {\n shouldPushStackElementBefore: (prevEditOperationType !== 1 /* Typing */),\n shouldPushStackElementAfter: false\n });\n };\n TypeOperations.lineInsertBefore = function (config, model, selections) {\n var commands = [];\n for (var i = 0, len = selections.length; i < len; i++) {\n var lineNumber = selections[i].positionLineNumber;\n if (lineNumber === 1) {\n commands[i] = new ReplaceCommandWithoutChangingPosition(new Range(1, 1, 1, 1), '\\n');\n }\n else {\n lineNumber--;\n var column = model.getLineMaxColumn(lineNumber);\n commands[i] = this._enter(config, model, false, new Range(lineNumber, column, lineNumber, column));\n }\n }\n return commands;\n };\n TypeOperations.lineInsertAfter = function (config, model, selections) {\n var commands = [];\n for (var i = 0, len = selections.length; i < len; i++) {\n var lineNumber = selections[i].positionLineNumber;\n var column = model.getLineMaxColumn(lineNumber);\n commands[i] = this._enter(config, model, false, new Range(lineNumber, column, lineNumber, column));\n }\n return commands;\n };\n TypeOperations.lineBreakInsert = function (config, model, selections) {\n var commands = [];\n for (var i = 0, len = selections.length; i < len; i++) {\n commands[i] = this._enter(config, model, true, selections[i]);\n }\n return commands;\n };\n return TypeOperations;\n}());\nexport { TypeOperations };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport { ReplaceCommand } from '../commands/replaceCommand';\nimport { CursorColumns, EditOperationResult } from './cursorCommon';\nimport { Range } from '../core/range';\nimport { MoveOperations } from './cursorMoveOperations';\nimport * as strings from '../../../base/common/strings';\nvar DeleteOperations = /** @class */ (function () {\n function DeleteOperations() {\n }\n DeleteOperations.deleteRight = function (prevEditOperationType, config, model, selections) {\n var commands = [];\n var shouldPushStackElementBefore = (prevEditOperationType !== 3 /* DeletingRight */);\n for (var i = 0, len = selections.length; i < len; i++) {\n var selection = selections[i];\n var deleteSelection = selection;\n if (deleteSelection.isEmpty()) {\n var position = selection.getPosition();\n var rightOfPosition = MoveOperations.right(config, model, position.lineNumber, position.column);\n deleteSelection = new Range(rightOfPosition.lineNumber, rightOfPosition.column, position.lineNumber, position.column);\n }\n if (deleteSelection.isEmpty()) {\n // Probably at end of file => ignore\n commands[i] = null;\n continue;\n }\n if (deleteSelection.startLineNumber !== deleteSelection.endLineNumber) {\n shouldPushStackElementBefore = true;\n }\n commands[i] = new ReplaceCommand(deleteSelection, '');\n }\n return [shouldPushStackElementBefore, commands];\n };\n DeleteOperations._isAutoClosingPairDelete = function (config, model, selections) {\n if (!config.autoClosingBrackets) {\n return false;\n }\n for (var i = 0, len = selections.length; i < len; i++) {\n var selection = selections[i];\n var position = selection.getPosition();\n if (!selection.isEmpty()) {\n return false;\n }\n var lineText = model.getLineContent(position.lineNumber);\n var character = lineText[position.column - 2];\n if (!config.autoClosingPairsOpen.hasOwnProperty(character)) {\n return false;\n }\n var afterCharacter = lineText[position.column - 1];\n var closeCharacter = config.autoClosingPairsOpen[character];\n if (afterCharacter !== closeCharacter) {\n return false;\n }\n }\n return true;\n };\n DeleteOperations._runAutoClosingPairDelete = function (config, model, selections) {\n var commands = [];\n for (var i = 0, len = selections.length; i < len; i++) {\n var position = selections[i].getPosition();\n var deleteSelection = new Range(position.lineNumber, position.column - 1, position.lineNumber, position.column + 1);\n commands[i] = new ReplaceCommand(deleteSelection, '');\n }\n return [true, commands];\n };\n DeleteOperations.deleteLeft = function (prevEditOperationType, config, model, selections) {\n if (this._isAutoClosingPairDelete(config, model, selections)) {\n return this._runAutoClosingPairDelete(config, model, selections);\n }\n var commands = [];\n var shouldPushStackElementBefore = (prevEditOperationType !== 2 /* DeletingLeft */);\n for (var i = 0, len = selections.length; i < len; i++) {\n var selection = selections[i];\n var deleteSelection = selection;\n if (deleteSelection.isEmpty()) {\n var position = selection.getPosition();\n if (config.useTabStops && position.column > 1) {\n var lineContent = model.getLineContent(position.lineNumber);\n var firstNonWhitespaceIndex = strings.firstNonWhitespaceIndex(lineContent);\n var lastIndentationColumn = (firstNonWhitespaceIndex === -1\n ? /* entire string is whitespace */ lineContent.length + 1\n : firstNonWhitespaceIndex + 1);\n if (position.column <= lastIndentationColumn) {\n var fromVisibleColumn = CursorColumns.visibleColumnFromColumn2(config, model, position);\n var toVisibleColumn = CursorColumns.prevTabStop(fromVisibleColumn, config.tabSize);\n var toColumn = CursorColumns.columnFromVisibleColumn2(config, model, position.lineNumber, toVisibleColumn);\n deleteSelection = new Range(position.lineNumber, toColumn, position.lineNumber, position.column);\n }\n else {\n deleteSelection = new Range(position.lineNumber, position.column - 1, position.lineNumber, position.column);\n }\n }\n else {\n var leftOfPosition = MoveOperations.left(config, model, position.lineNumber, position.column);\n deleteSelection = new Range(leftOfPosition.lineNumber, leftOfPosition.column, position.lineNumber, position.column);\n }\n }\n if (deleteSelection.isEmpty()) {\n // Probably at beginning of file => ignore\n commands[i] = null;\n continue;\n }\n if (deleteSelection.startLineNumber !== deleteSelection.endLineNumber) {\n shouldPushStackElementBefore = true;\n }\n commands[i] = new ReplaceCommand(deleteSelection, '');\n }\n return [shouldPushStackElementBefore, commands];\n };\n DeleteOperations.cut = function (config, model, selections) {\n var commands = [];\n for (var i = 0, len = selections.length; i < len; i++) {\n var selection = selections[i];\n if (selection.isEmpty()) {\n if (config.emptySelectionClipboard) {\n // This is a full line cut\n var position = selection.getPosition();\n var startLineNumber = void 0, startColumn = void 0, endLineNumber = void 0, endColumn = void 0;\n if (position.lineNumber < model.getLineCount()) {\n // Cutting a line in the middle of the model\n startLineNumber = position.lineNumber;\n startColumn = 1;\n endLineNumber = position.lineNumber + 1;\n endColumn = 1;\n }\n else if (position.lineNumber > 1) {\n // Cutting the last line & there are more than 1 lines in the model\n startLineNumber = position.lineNumber - 1;\n startColumn = model.getLineMaxColumn(position.lineNumber - 1);\n endLineNumber = position.lineNumber;\n endColumn = model.getLineMaxColumn(position.lineNumber);\n }\n else {\n // Cutting the single line that the model contains\n startLineNumber = position.lineNumber;\n startColumn = 1;\n endLineNumber = position.lineNumber;\n endColumn = model.getLineMaxColumn(position.lineNumber);\n }\n var deleteSelection = new Range(startLineNumber, startColumn, endLineNumber, endColumn);\n if (!deleteSelection.isEmpty()) {\n commands[i] = new ReplaceCommand(deleteSelection, '');\n }\n else {\n commands[i] = null;\n }\n }\n else {\n // Cannot cut empty selection\n commands[i] = null;\n }\n }\n else {\n commands[i] = new ReplaceCommand(selection, '');\n }\n }\n return new EditOperationResult(0 /* Other */, commands, {\n shouldPushStackElementBefore: true,\n shouldPushStackElementAfter: true\n });\n };\n return DeleteOperations;\n}());\nexport { DeleteOperations };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport { Event, Emitter } from './event';\nvar shortcutEvent = Object.freeze(function (callback, context) {\n var handle = setTimeout(callback.bind(context), 0);\n return { dispose: function () { clearTimeout(handle); } };\n});\nexport var CancellationToken;\n(function (CancellationToken) {\n CancellationToken.None = Object.freeze({\n isCancellationRequested: false,\n onCancellationRequested: Event.None\n });\n CancellationToken.Cancelled = Object.freeze({\n isCancellationRequested: true,\n onCancellationRequested: shortcutEvent\n });\n})(CancellationToken || (CancellationToken = {}));\nvar MutableToken = /** @class */ (function () {\n function MutableToken() {\n this._isCancelled = false;\n }\n MutableToken.prototype.cancel = function () {\n if (!this._isCancelled) {\n this._isCancelled = true;\n if (this._emitter) {\n this._emitter.fire(undefined);\n this.dispose();\n }\n }\n };\n Object.defineProperty(MutableToken.prototype, \"isCancellationRequested\", {\n get: function () {\n return this._isCancelled;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(MutableToken.prototype, \"onCancellationRequested\", {\n get: function () {\n if (this._isCancelled) {\n return shortcutEvent;\n }\n if (!this._emitter) {\n this._emitter = new Emitter();\n }\n return this._emitter.event;\n },\n enumerable: true,\n configurable: true\n });\n MutableToken.prototype.dispose = function () {\n if (this._emitter) {\n this._emitter.dispose();\n this._emitter = undefined;\n }\n };\n return MutableToken;\n}());\nvar CancellationTokenSource = /** @class */ (function () {\n function CancellationTokenSource() {\n }\n Object.defineProperty(CancellationTokenSource.prototype, \"token\", {\n get: function () {\n if (!this._token) {\n // be lazy and create the token only when\n // actually needed\n this._token = new MutableToken();\n }\n return this._token;\n },\n enumerable: true,\n configurable: true\n });\n CancellationTokenSource.prototype.cancel = function () {\n if (!this._token) {\n // save an object by returning the default\n // cancelled token when cancellation happens\n // before someone asks for the token\n this._token = CancellationToken.Cancelled;\n }\n else if (this._token instanceof MutableToken) {\n // actually cancel\n this._token.cancel();\n }\n };\n CancellationTokenSource.prototype.dispose = function () {\n if (!this._token) {\n // ensure to initialize with an empty token if we had none\n this._token = CancellationToken.None;\n }\n else if (this._token instanceof MutableToken) {\n // actually dispose\n this._token.dispose();\n }\n };\n return CancellationTokenSource;\n}());\nexport { CancellationTokenSource };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport * as errors from './errors';\nimport { TPromise } from './winjs.base';\nimport { CancellationTokenSource } from './cancellation';\nimport { Disposable } from './lifecycle';\nexport function isThenable(obj) {\n return obj && typeof obj.then === 'function';\n}\nexport function toThenable(arg) {\n if (isThenable(arg)) {\n return arg;\n }\n else {\n return TPromise.as(arg);\n }\n}\nexport function createCancelablePromise(callback) {\n var source = new CancellationTokenSource();\n var thenable = callback(source.token);\n var promise = new Promise(function (resolve, reject) {\n source.token.onCancellationRequested(function () {\n reject(errors.canceled());\n });\n Promise.resolve(thenable).then(function (value) {\n source.dispose();\n resolve(value);\n }, function (err) {\n source.dispose();\n reject(err);\n });\n });\n return new /** @class */ (function () {\n function class_1() {\n }\n class_1.prototype.cancel = function () {\n source.cancel();\n };\n class_1.prototype.then = function (resolve, reject) {\n return promise.then(resolve, reject);\n };\n class_1.prototype.catch = function (reject) {\n return this.then(undefined, reject);\n };\n return class_1;\n }());\n}\nexport function asWinJsPromise(callback) {\n var source = new CancellationTokenSource();\n return new TPromise(function (resolve, reject, progress) {\n var item = callback(source.token);\n if (item instanceof TPromise) {\n item.then(function (result) {\n source.dispose();\n resolve(result);\n }, function (err) {\n source.dispose();\n reject(err);\n }, progress);\n }\n else if (isThenable(item)) {\n item.then(function (result) {\n source.dispose();\n resolve(result);\n }, function (err) {\n source.dispose();\n reject(err);\n });\n }\n else {\n source.dispose();\n resolve(item);\n }\n }, function () {\n source.cancel();\n });\n}\n/**\n * Hook a cancellation token to a WinJS Promise\n */\nexport function wireCancellationToken(token, promise, resolveAsUndefinedWhenCancelled) {\n var subscription = token.onCancellationRequested(function () { return promise.cancel(); });\n if (resolveAsUndefinedWhenCancelled) {\n promise = promise.then(undefined, function (err) {\n if (!errors.isPromiseCanceledError(err)) {\n return TPromise.wrapError(err);\n }\n return undefined;\n });\n }\n return always(promise, function () { return subscription.dispose(); });\n}\n/**\n * A helper to prevent accumulation of sequential async tasks.\n *\n * Imagine a mail man with the sole task of delivering letters. As soon as\n * a letter submitted for delivery, he drives to the destination, delivers it\n * and returns to his base. Imagine that during the trip, N more letters were submitted.\n * When the mail man returns, he picks those N letters and delivers them all in a\n * single trip. Even though N+1 submissions occurred, only 2 deliveries were made.\n *\n * The throttler implements this via the queue() method, by providing it a task\n * factory. Following the example:\n *\n * \t\tconst throttler = new Throttler();\n * \t\tconst letters = [];\n *\n * \t\tfunction deliver() {\n * \t\t\tconst lettersToDeliver = letters;\n * \t\t\tletters = [];\n * \t\t\treturn makeTheTrip(lettersToDeliver);\n * \t\t}\n *\n * \t\tfunction onLetterReceived(l) {\n * \t\t\tletters.push(l);\n * \t\t\tthrottler.queue(deliver);\n * \t\t}\n */\nvar Throttler = /** @class */ (function () {\n function Throttler() {\n this.activePromise = null;\n this.queuedPromise = null;\n this.queuedPromiseFactory = null;\n }\n Throttler.prototype.queue = function (promiseFactory) {\n var _this = this;\n if (this.activePromise) {\n this.queuedPromiseFactory = promiseFactory;\n if (!this.queuedPromise) {\n var onComplete_1 = function () {\n _this.queuedPromise = null;\n var result = _this.queue(_this.queuedPromiseFactory);\n _this.queuedPromiseFactory = null;\n return result;\n };\n this.queuedPromise = new TPromise(function (c, e, p) {\n _this.activePromise.then(onComplete_1, onComplete_1, p).done(c);\n }, function () {\n _this.activePromise.cancel();\n });\n }\n return new TPromise(function (c, e, p) {\n _this.queuedPromise.then(c, e, p);\n }, function () {\n // no-op\n });\n }\n this.activePromise = promiseFactory();\n return new TPromise(function (c, e, p) {\n _this.activePromise.done(function (result) {\n _this.activePromise = null;\n c(result);\n }, function (err) {\n _this.activePromise = null;\n e(err);\n }, p);\n }, function () {\n _this.activePromise.cancel();\n });\n };\n return Throttler;\n}());\nexport { Throttler };\n/**\n * A helper to delay execution of a task that is being requested often.\n *\n * Following the throttler, now imagine the mail man wants to optimize the number of\n * trips proactively. The trip itself can be long, so he decides not to make the trip\n * as soon as a letter is submitted. Instead he waits a while, in case more\n * letters are submitted. After said waiting period, if no letters were submitted, he\n * decides to make the trip. Imagine that N more letters were submitted after the first\n * one, all within a short period of time between each other. Even though N+1\n * submissions occurred, only 1 delivery was made.\n *\n * The delayer offers this behavior via the trigger() method, into which both the task\n * to be executed and the waiting period (delay) must be passed in as arguments. Following\n * the example:\n *\n * \t\tconst delayer = new Delayer(WAITING_PERIOD);\n * \t\tconst letters = [];\n *\n * \t\tfunction letterReceived(l) {\n * \t\t\tletters.push(l);\n * \t\t\tdelayer.trigger(() => { return makeTheTrip(); });\n * \t\t}\n */\nvar Delayer = /** @class */ (function () {\n function Delayer(defaultDelay) {\n this.defaultDelay = defaultDelay;\n this.timeout = null;\n this.completionPromise = null;\n this.onSuccess = null;\n this.task = null;\n }\n Delayer.prototype.trigger = function (task, delay) {\n var _this = this;\n if (delay === void 0) { delay = this.defaultDelay; }\n this.task = task;\n this.cancelTimeout();\n if (!this.completionPromise) {\n this.completionPromise = new TPromise(function (c) {\n _this.onSuccess = c;\n }, function () {\n // no-op\n }).then(function () {\n _this.completionPromise = null;\n _this.onSuccess = null;\n var task = _this.task;\n _this.task = null;\n return task();\n });\n }\n this.timeout = setTimeout(function () {\n _this.timeout = null;\n _this.onSuccess(null);\n }, delay);\n return this.completionPromise;\n };\n Delayer.prototype.cancel = function () {\n this.cancelTimeout();\n if (this.completionPromise) {\n this.completionPromise.cancel();\n this.completionPromise = null;\n }\n };\n Delayer.prototype.cancelTimeout = function () {\n if (this.timeout !== null) {\n clearTimeout(this.timeout);\n this.timeout = null;\n }\n };\n return Delayer;\n}());\nexport { Delayer };\nvar ShallowCancelThenPromise = /** @class */ (function (_super) {\n __extends(ShallowCancelThenPromise, _super);\n function ShallowCancelThenPromise(outer) {\n var _this = this;\n var completeCallback, errorCallback, progressCallback;\n _this = _super.call(this, function (c, e, p) {\n completeCallback = c;\n errorCallback = e;\n progressCallback = p;\n }, function () {\n // cancel this promise but not the\n // outer promise\n errorCallback(errors.canceled());\n }) || this;\n outer.then(completeCallback, errorCallback, progressCallback);\n return _this;\n }\n return ShallowCancelThenPromise;\n}(TPromise));\nexport { ShallowCancelThenPromise };\n/**\n * Replacement for `WinJS.TPromise.timeout`.\n */\nexport function timeout(n) {\n return createCancelablePromise(function (token) {\n return new Promise(function (resolve, reject) {\n var handle = setTimeout(resolve, n);\n token.onCancellationRequested(function (_) {\n clearTimeout(handle);\n reject(errors.canceled());\n });\n });\n });\n}\nfunction isWinJSPromise(candidate) {\n return TPromise.is(candidate) && typeof candidate.done === 'function';\n}\nexport function always(winjsPromiseOrThenable, f) {\n if (isWinJSPromise(winjsPromiseOrThenable)) {\n return new TPromise(function (c, e, p) {\n winjsPromiseOrThenable.done(function (result) {\n try {\n f(result);\n }\n catch (e1) {\n errors.onUnexpectedError(e1);\n }\n c(result);\n }, function (err) {\n try {\n f(err);\n }\n catch (e1) {\n errors.onUnexpectedError(e1);\n }\n e(err);\n }, function (progress) {\n p(progress);\n });\n }, function () {\n winjsPromiseOrThenable.cancel();\n });\n }\n else {\n // simple\n winjsPromiseOrThenable.then(function (_) { return f(); }, function (_) { return f(); });\n return winjsPromiseOrThenable;\n }\n}\nexport function first2(promiseFactories, shouldStop, defaultValue) {\n if (shouldStop === void 0) { shouldStop = function (t) { return !!t; }; }\n if (defaultValue === void 0) { defaultValue = null; }\n var index = 0;\n var len = promiseFactories.length;\n var loop = function () {\n if (index >= len) {\n return Promise.resolve(defaultValue);\n }\n var factory = promiseFactories[index++];\n var promise = factory();\n return promise.then(function (result) {\n if (shouldStop(result)) {\n return Promise.resolve(result);\n }\n return loop();\n });\n };\n return loop();\n}\nexport function first(promiseFactories, shouldStop, defaultValue) {\n if (shouldStop === void 0) { shouldStop = function (t) { return !!t; }; }\n if (defaultValue === void 0) { defaultValue = null; }\n var index = 0;\n var len = promiseFactories.length;\n var loop = function () {\n if (index >= len) {\n return TPromise.as(defaultValue);\n }\n var factory = promiseFactories[index++];\n var promise = factory();\n return promise.then(function (result) {\n if (shouldStop(result)) {\n return TPromise.as(result);\n }\n return loop();\n });\n };\n return loop();\n}\nexport function setDisposableTimeout(handler, timeout) {\n var args = [];\n for (var _i = 2; _i < arguments.length; _i++) {\n args[_i - 2] = arguments[_i];\n }\n var handle = setTimeout.apply(void 0, [handler, timeout].concat(args));\n return { dispose: function () { clearTimeout(handle); } };\n}\nvar TimeoutTimer = /** @class */ (function (_super) {\n __extends(TimeoutTimer, _super);\n function TimeoutTimer() {\n var _this = _super.call(this) || this;\n _this._token = -1;\n return _this;\n }\n TimeoutTimer.prototype.dispose = function () {\n this.cancel();\n _super.prototype.dispose.call(this);\n };\n TimeoutTimer.prototype.cancel = function () {\n if (this._token !== -1) {\n clearTimeout(this._token);\n this._token = -1;\n }\n };\n TimeoutTimer.prototype.cancelAndSet = function (runner, timeout) {\n var _this = this;\n this.cancel();\n this._token = setTimeout(function () {\n _this._token = -1;\n runner();\n }, timeout);\n };\n TimeoutTimer.prototype.setIfNotSet = function (runner, timeout) {\n var _this = this;\n if (this._token !== -1) {\n // timer is already set\n return;\n }\n this._token = setTimeout(function () {\n _this._token = -1;\n runner();\n }, timeout);\n };\n return TimeoutTimer;\n}(Disposable));\nexport { TimeoutTimer };\nvar IntervalTimer = /** @class */ (function (_super) {\n __extends(IntervalTimer, _super);\n function IntervalTimer() {\n var _this = _super.call(this) || this;\n _this._token = -1;\n return _this;\n }\n IntervalTimer.prototype.dispose = function () {\n this.cancel();\n _super.prototype.dispose.call(this);\n };\n IntervalTimer.prototype.cancel = function () {\n if (this._token !== -1) {\n clearInterval(this._token);\n this._token = -1;\n }\n };\n IntervalTimer.prototype.cancelAndSet = function (runner, interval) {\n this.cancel();\n this._token = setInterval(function () {\n runner();\n }, interval);\n };\n return IntervalTimer;\n}(Disposable));\nexport { IntervalTimer };\nvar RunOnceScheduler = /** @class */ (function () {\n function RunOnceScheduler(runner, timeout) {\n this.timeoutToken = -1;\n this.runner = runner;\n this.timeout = timeout;\n this.timeoutHandler = this.onTimeout.bind(this);\n }\n /**\n * Dispose RunOnceScheduler\n */\n RunOnceScheduler.prototype.dispose = function () {\n this.cancel();\n this.runner = null;\n };\n /**\n * Cancel current scheduled runner (if any).\n */\n RunOnceScheduler.prototype.cancel = function () {\n if (this.isScheduled()) {\n clearTimeout(this.timeoutToken);\n this.timeoutToken = -1;\n }\n };\n /**\n * Cancel previous runner (if any) & schedule a new runner.\n */\n RunOnceScheduler.prototype.schedule = function (delay) {\n if (delay === void 0) { delay = this.timeout; }\n this.cancel();\n this.timeoutToken = setTimeout(this.timeoutHandler, delay);\n };\n /**\n * Returns true if scheduled.\n */\n RunOnceScheduler.prototype.isScheduled = function () {\n return this.timeoutToken !== -1;\n };\n RunOnceScheduler.prototype.onTimeout = function () {\n this.timeoutToken = -1;\n if (this.runner) {\n this.doRun();\n }\n };\n RunOnceScheduler.prototype.doRun = function () {\n this.runner();\n };\n return RunOnceScheduler;\n}());\nexport { RunOnceScheduler };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport { Emitter } from '../common/event';\nvar WindowManager = /** @class */ (function () {\n function WindowManager() {\n // --- Zoom Level\n this._zoomLevel = 0;\n this._lastZoomLevelChangeTime = 0;\n this._onDidChangeZoomLevel = new Emitter();\n this.onDidChangeZoomLevel = this._onDidChangeZoomLevel.event;\n // --- Accessibility\n this._accessibilitySupport = 0 /* Unknown */;\n this._onDidChangeAccessibilitySupport = new Emitter();\n this.onDidChangeAccessibilitySupport = this._onDidChangeAccessibilitySupport.event;\n }\n WindowManager.prototype.getZoomLevel = function () {\n return this._zoomLevel;\n };\n WindowManager.prototype.getTimeSinceLastZoomLevelChanged = function () {\n return Date.now() - this._lastZoomLevelChangeTime;\n };\n // --- Pixel Ratio\n WindowManager.prototype.getPixelRatio = function () {\n var ctx = document.createElement('canvas').getContext('2d');\n var dpr = window.devicePixelRatio || 1;\n var bsr = ctx.webkitBackingStorePixelRatio ||\n ctx.mozBackingStorePixelRatio ||\n ctx.msBackingStorePixelRatio ||\n ctx.oBackingStorePixelRatio ||\n ctx.backingStorePixelRatio || 1;\n return dpr / bsr;\n };\n WindowManager.prototype.getAccessibilitySupport = function () {\n return this._accessibilitySupport;\n };\n WindowManager.INSTANCE = new WindowManager();\n return WindowManager;\n}());\nexport function getZoomLevel() {\n return WindowManager.INSTANCE.getZoomLevel();\n}\n/** Returns the time (in ms) since the zoom level was changed */\nexport function getTimeSinceLastZoomLevelChanged() {\n return WindowManager.INSTANCE.getTimeSinceLastZoomLevelChanged();\n}\nexport function onDidChangeZoomLevel(callback) {\n return WindowManager.INSTANCE.onDidChangeZoomLevel(callback);\n}\nexport function getPixelRatio() {\n return WindowManager.INSTANCE.getPixelRatio();\n}\nexport function getAccessibilitySupport() {\n return WindowManager.INSTANCE.getAccessibilitySupport();\n}\nexport function onDidChangeAccessibilitySupport(callback) {\n return WindowManager.INSTANCE.onDidChangeAccessibilitySupport(callback);\n}\nvar userAgent = navigator.userAgent;\nexport var isIE = (userAgent.indexOf('Trident') >= 0);\nexport var isEdge = (userAgent.indexOf('Edge/') >= 0);\nexport var isEdgeOrIE = isIE || isEdge;\nexport var isFirefox = (userAgent.indexOf('Firefox') >= 0);\nexport var isWebKit = (userAgent.indexOf('AppleWebKit') >= 0);\nexport var isChrome = (userAgent.indexOf('Chrome') >= 0);\nexport var isSafari = (userAgent.indexOf('Chrome') === -1) && (userAgent.indexOf('Safari') >= 0);\nexport var isIPad = (userAgent.indexOf('iPad') >= 0);\nexport var isEdgeWebView = isEdge && (userAgent.indexOf('WebView/') >= 0);\nexport function hasClipboardSupport() {\n if (isIE) {\n return false;\n }\n if (isEdge) {\n var index = userAgent.indexOf('Edge/');\n var version = parseInt(userAgent.substring(index + 5, userAgent.indexOf('.', index)), 10);\n if (!version || (version >= 12 && version <= 16)) {\n return false;\n }\n }\n return true;\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport { KeyCodeUtils, SimpleKeybinding } from '../common/keyCodes';\nimport * as platform from '../common/platform';\nimport * as browser from './browser';\nvar KEY_CODE_MAP = new Array(230);\nvar INVERSE_KEY_CODE_MAP = new Array(112 /* MAX_VALUE */);\n(function () {\n for (var i = 0; i < INVERSE_KEY_CODE_MAP.length; i++) {\n INVERSE_KEY_CODE_MAP[i] = -1;\n }\n function define(code, keyCode) {\n KEY_CODE_MAP[code] = keyCode;\n INVERSE_KEY_CODE_MAP[keyCode] = code;\n }\n define(3, 7 /* PauseBreak */); // VK_CANCEL 0x03 Control-break processing\n define(8, 1 /* Backspace */);\n define(9, 2 /* Tab */);\n define(13, 3 /* Enter */);\n define(16, 4 /* Shift */);\n define(17, 5 /* Ctrl */);\n define(18, 6 /* Alt */);\n define(19, 7 /* PauseBreak */);\n define(20, 8 /* CapsLock */);\n define(27, 9 /* Escape */);\n define(32, 10 /* Space */);\n define(33, 11 /* PageUp */);\n define(34, 12 /* PageDown */);\n define(35, 13 /* End */);\n define(36, 14 /* Home */);\n define(37, 15 /* LeftArrow */);\n define(38, 16 /* UpArrow */);\n define(39, 17 /* RightArrow */);\n define(40, 18 /* DownArrow */);\n define(45, 19 /* Insert */);\n define(46, 20 /* Delete */);\n define(48, 21 /* KEY_0 */);\n define(49, 22 /* KEY_1 */);\n define(50, 23 /* KEY_2 */);\n define(51, 24 /* KEY_3 */);\n define(52, 25 /* KEY_4 */);\n define(53, 26 /* KEY_5 */);\n define(54, 27 /* KEY_6 */);\n define(55, 28 /* KEY_7 */);\n define(56, 29 /* KEY_8 */);\n define(57, 30 /* KEY_9 */);\n define(65, 31 /* KEY_A */);\n define(66, 32 /* KEY_B */);\n define(67, 33 /* KEY_C */);\n define(68, 34 /* KEY_D */);\n define(69, 35 /* KEY_E */);\n define(70, 36 /* KEY_F */);\n define(71, 37 /* KEY_G */);\n define(72, 38 /* KEY_H */);\n define(73, 39 /* KEY_I */);\n define(74, 40 /* KEY_J */);\n define(75, 41 /* KEY_K */);\n define(76, 42 /* KEY_L */);\n define(77, 43 /* KEY_M */);\n define(78, 44 /* KEY_N */);\n define(79, 45 /* KEY_O */);\n define(80, 46 /* KEY_P */);\n define(81, 47 /* KEY_Q */);\n define(82, 48 /* KEY_R */);\n define(83, 49 /* KEY_S */);\n define(84, 50 /* KEY_T */);\n define(85, 51 /* KEY_U */);\n define(86, 52 /* KEY_V */);\n define(87, 53 /* KEY_W */);\n define(88, 54 /* KEY_X */);\n define(89, 55 /* KEY_Y */);\n define(90, 56 /* KEY_Z */);\n define(93, 58 /* ContextMenu */);\n define(96, 93 /* NUMPAD_0 */);\n define(97, 94 /* NUMPAD_1 */);\n define(98, 95 /* NUMPAD_2 */);\n define(99, 96 /* NUMPAD_3 */);\n define(100, 97 /* NUMPAD_4 */);\n define(101, 98 /* NUMPAD_5 */);\n define(102, 99 /* NUMPAD_6 */);\n define(103, 100 /* NUMPAD_7 */);\n define(104, 101 /* NUMPAD_8 */);\n define(105, 102 /* NUMPAD_9 */);\n define(106, 103 /* NUMPAD_MULTIPLY */);\n define(107, 104 /* NUMPAD_ADD */);\n define(108, 105 /* NUMPAD_SEPARATOR */);\n define(109, 106 /* NUMPAD_SUBTRACT */);\n define(110, 107 /* NUMPAD_DECIMAL */);\n define(111, 108 /* NUMPAD_DIVIDE */);\n define(112, 59 /* F1 */);\n define(113, 60 /* F2 */);\n define(114, 61 /* F3 */);\n define(115, 62 /* F4 */);\n define(116, 63 /* F5 */);\n define(117, 64 /* F6 */);\n define(118, 65 /* F7 */);\n define(119, 66 /* F8 */);\n define(120, 67 /* F9 */);\n define(121, 68 /* F10 */);\n define(122, 69 /* F11 */);\n define(123, 70 /* F12 */);\n define(124, 71 /* F13 */);\n define(125, 72 /* F14 */);\n define(126, 73 /* F15 */);\n define(127, 74 /* F16 */);\n define(128, 75 /* F17 */);\n define(129, 76 /* F18 */);\n define(130, 77 /* F19 */);\n define(144, 78 /* NumLock */);\n define(145, 79 /* ScrollLock */);\n define(186, 80 /* US_SEMICOLON */);\n define(187, 81 /* US_EQUAL */);\n define(188, 82 /* US_COMMA */);\n define(189, 83 /* US_MINUS */);\n define(190, 84 /* US_DOT */);\n define(191, 85 /* US_SLASH */);\n define(192, 86 /* US_BACKTICK */);\n define(193, 110 /* ABNT_C1 */);\n define(194, 111 /* ABNT_C2 */);\n define(219, 87 /* US_OPEN_SQUARE_BRACKET */);\n define(220, 88 /* US_BACKSLASH */);\n define(221, 89 /* US_CLOSE_SQUARE_BRACKET */);\n define(222, 90 /* US_QUOTE */);\n define(223, 91 /* OEM_8 */);\n define(226, 92 /* OEM_102 */);\n /**\n * https://lists.w3.org/Archives/Public/www-dom/2010JulSep/att-0182/keyCode-spec.html\n * If an Input Method Editor is processing key input and the event is keydown, return 229.\n */\n define(229, 109 /* KEY_IN_COMPOSITION */);\n if (browser.isIE) {\n define(91, 57 /* Meta */);\n }\n else if (browser.isFirefox) {\n define(59, 80 /* US_SEMICOLON */);\n define(107, 81 /* US_EQUAL */);\n define(109, 83 /* US_MINUS */);\n if (platform.isMacintosh) {\n define(224, 57 /* Meta */);\n }\n }\n else if (browser.isWebKit) {\n define(91, 57 /* Meta */);\n if (platform.isMacintosh) {\n // the two meta keys in the Mac have different key codes (91 and 93)\n define(93, 57 /* Meta */);\n }\n else {\n define(92, 57 /* Meta */);\n }\n }\n})();\nfunction extractKeyCode(e) {\n if (e.charCode) {\n // \"keypress\" events mostly\n var char = String.fromCharCode(e.charCode).toUpperCase();\n return KeyCodeUtils.fromString(char);\n }\n return KEY_CODE_MAP[e.keyCode] || 0 /* Unknown */;\n}\nvar ctrlKeyMod = (platform.isMacintosh ? 256 /* WinCtrl */ : 2048 /* CtrlCmd */);\nvar altKeyMod = 512 /* Alt */;\nvar shiftKeyMod = 1024 /* Shift */;\nvar metaKeyMod = (platform.isMacintosh ? 2048 /* CtrlCmd */ : 256 /* WinCtrl */);\nvar StandardKeyboardEvent = /** @class */ (function () {\n function StandardKeyboardEvent(source) {\n var e = source;\n this.browserEvent = e;\n this.target = e.target;\n this.ctrlKey = e.ctrlKey;\n this.shiftKey = e.shiftKey;\n this.altKey = e.altKey;\n this.metaKey = e.metaKey;\n this.keyCode = extractKeyCode(e);\n this.code = e.code;\n // console.info(e.type + \": keyCode: \" + e.keyCode + \", which: \" + e.which + \", charCode: \" + e.charCode + \", detail: \" + e.detail + \" ====> \" + this.keyCode + ' -- ' + KeyCode[this.keyCode]);\n this.ctrlKey = this.ctrlKey || this.keyCode === 5 /* Ctrl */;\n this.altKey = this.altKey || this.keyCode === 6 /* Alt */;\n this.shiftKey = this.shiftKey || this.keyCode === 4 /* Shift */;\n this.metaKey = this.metaKey || this.keyCode === 57 /* Meta */;\n this._asKeybinding = this._computeKeybinding();\n this._asRuntimeKeybinding = this._computeRuntimeKeybinding();\n // console.log(`code: ${e.code}, keyCode: ${e.keyCode}, key: ${e.key}`);\n }\n StandardKeyboardEvent.prototype.preventDefault = function () {\n if (this.browserEvent && this.browserEvent.preventDefault) {\n this.browserEvent.preventDefault();\n }\n };\n StandardKeyboardEvent.prototype.stopPropagation = function () {\n if (this.browserEvent && this.browserEvent.stopPropagation) {\n this.browserEvent.stopPropagation();\n }\n };\n StandardKeyboardEvent.prototype.toKeybinding = function () {\n return this._asRuntimeKeybinding;\n };\n StandardKeyboardEvent.prototype.equals = function (other) {\n return this._asKeybinding === other;\n };\n StandardKeyboardEvent.prototype._computeKeybinding = function () {\n var key = 0 /* Unknown */;\n if (this.keyCode !== 5 /* Ctrl */ && this.keyCode !== 4 /* Shift */ && this.keyCode !== 6 /* Alt */ && this.keyCode !== 57 /* Meta */) {\n key = this.keyCode;\n }\n var result = 0;\n if (this.ctrlKey) {\n result |= ctrlKeyMod;\n }\n if (this.altKey) {\n result |= altKeyMod;\n }\n if (this.shiftKey) {\n result |= shiftKeyMod;\n }\n if (this.metaKey) {\n result |= metaKeyMod;\n }\n result |= key;\n return result;\n };\n StandardKeyboardEvent.prototype._computeRuntimeKeybinding = function () {\n var key = 0 /* Unknown */;\n if (this.keyCode !== 5 /* Ctrl */ && this.keyCode !== 4 /* Shift */ && this.keyCode !== 6 /* Alt */ && this.keyCode !== 57 /* Meta */) {\n key = this.keyCode;\n }\n return new SimpleKeybinding(this.ctrlKey, this.shiftKey, this.altKey, this.metaKey, key);\n };\n return StandardKeyboardEvent;\n}());\nexport { StandardKeyboardEvent };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar hasDifferentOriginAncestorFlag = false;\nvar sameOriginWindowChainCache = null;\nfunction getParentWindowIfSameOrigin(w) {\n if (!w.parent || w.parent === w) {\n return null;\n }\n // Cannot really tell if we have access to the parent window unless we try to access something in it\n try {\n var location_1 = w.location;\n var parentLocation = w.parent.location;\n if (location_1.protocol !== parentLocation.protocol || location_1.hostname !== parentLocation.hostname || location_1.port !== parentLocation.port) {\n hasDifferentOriginAncestorFlag = true;\n return null;\n }\n }\n catch (e) {\n hasDifferentOriginAncestorFlag = true;\n return null;\n }\n return w.parent;\n}\nfunction findIframeElementInParentWindow(parentWindow, childWindow) {\n var parentWindowIframes = parentWindow.document.getElementsByTagName('iframe');\n var iframe;\n for (var i = 0, len = parentWindowIframes.length; i < len; i++) {\n iframe = parentWindowIframes[i];\n if (iframe.contentWindow === childWindow) {\n return iframe;\n }\n }\n return null;\n}\nvar IframeUtils = /** @class */ (function () {\n function IframeUtils() {\n }\n /**\n * Returns a chain of embedded windows with the same origin (which can be accessed programmatically).\n * Having a chain of length 1 might mean that the current execution environment is running outside of an iframe or inside an iframe embedded in a window with a different origin.\n * To distinguish if at one point the current execution environment is running inside a window with a different origin, see hasDifferentOriginAncestor()\n */\n IframeUtils.getSameOriginWindowChain = function () {\n if (!sameOriginWindowChainCache) {\n sameOriginWindowChainCache = [];\n var w = window, parent_1;\n do {\n parent_1 = getParentWindowIfSameOrigin(w);\n if (parent_1) {\n sameOriginWindowChainCache.push({\n window: w,\n iframeElement: findIframeElementInParentWindow(parent_1, w)\n });\n }\n else {\n sameOriginWindowChainCache.push({\n window: w,\n iframeElement: null\n });\n }\n w = parent_1;\n } while (w);\n }\n return sameOriginWindowChainCache.slice(0);\n };\n /**\n * Returns true if the current execution environment is chained in a list of iframes which at one point ends in a window with a different origin.\n * Returns false if the current execution environment is not running inside an iframe or if the entire chain of iframes have the same origin.\n */\n IframeUtils.hasDifferentOriginAncestor = function () {\n if (!sameOriginWindowChainCache) {\n this.getSameOriginWindowChain();\n }\n return hasDifferentOriginAncestorFlag;\n };\n /**\n * Returns the position of `childWindow` relative to `ancestorWindow`\n */\n IframeUtils.getPositionOfChildWindowRelativeToAncestorWindow = function (childWindow, ancestorWindow) {\n if (!ancestorWindow || childWindow === ancestorWindow) {\n return {\n top: 0,\n left: 0\n };\n }\n var top = 0, left = 0;\n var windowChain = this.getSameOriginWindowChain();\n for (var i = 0; i < windowChain.length; i++) {\n var windowChainEl = windowChain[i];\n if (windowChainEl.window === ancestorWindow) {\n break;\n }\n if (!windowChainEl.iframeElement) {\n break;\n }\n var boundingRect = windowChainEl.iframeElement.getBoundingClientRect();\n top += boundingRect.top;\n left += boundingRect.left;\n }\n return {\n top: top,\n left: left\n };\n };\n return IframeUtils;\n}());\nexport { IframeUtils };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport * as platform from '../common/platform';\nimport * as browser from './browser';\nimport { IframeUtils } from './iframe';\nvar StandardMouseEvent = /** @class */ (function () {\n function StandardMouseEvent(e) {\n this.timestamp = Date.now();\n this.browserEvent = e;\n this.leftButton = e.button === 0;\n this.middleButton = e.button === 1;\n this.rightButton = e.button === 2;\n this.target = e.target;\n this.detail = e.detail || 1;\n if (e.type === 'dblclick') {\n this.detail = 2;\n }\n this.ctrlKey = e.ctrlKey;\n this.shiftKey = e.shiftKey;\n this.altKey = e.altKey;\n this.metaKey = e.metaKey;\n if (typeof e.pageX === 'number') {\n this.posx = e.pageX;\n this.posy = e.pageY;\n }\n else {\n // Probably hit by MSGestureEvent\n this.posx = e.clientX + document.body.scrollLeft + document.documentElement.scrollLeft;\n this.posy = e.clientY + document.body.scrollTop + document.documentElement.scrollTop;\n }\n // Find the position of the iframe this code is executing in relative to the iframe where the event was captured.\n var iframeOffsets = IframeUtils.getPositionOfChildWindowRelativeToAncestorWindow(self, e.view);\n this.posx -= iframeOffsets.left;\n this.posy -= iframeOffsets.top;\n }\n StandardMouseEvent.prototype.preventDefault = function () {\n if (this.browserEvent.preventDefault) {\n this.browserEvent.preventDefault();\n }\n };\n StandardMouseEvent.prototype.stopPropagation = function () {\n if (this.browserEvent.stopPropagation) {\n this.browserEvent.stopPropagation();\n }\n };\n return StandardMouseEvent;\n}());\nexport { StandardMouseEvent };\nvar DragMouseEvent = /** @class */ (function (_super) {\n __extends(DragMouseEvent, _super);\n function DragMouseEvent(e) {\n var _this = _super.call(this, e) || this;\n _this.dataTransfer = e.dataTransfer;\n return _this;\n }\n return DragMouseEvent;\n}(StandardMouseEvent));\nexport { DragMouseEvent };\nvar StandardMouseWheelEvent = /** @class */ (function () {\n function StandardMouseWheelEvent(e, deltaX, deltaY) {\n if (deltaX === void 0) { deltaX = 0; }\n if (deltaY === void 0) { deltaY = 0; }\n this.browserEvent = e || null;\n this.target = e ? (e.target || e.targetNode || e.srcElement) : null;\n this.deltaY = deltaY;\n this.deltaX = deltaX;\n if (e) {\n var e1 = e;\n var e2 = e;\n // vertical delta scroll\n if (typeof e1.wheelDeltaY !== 'undefined') {\n this.deltaY = e1.wheelDeltaY / 120;\n }\n else if (typeof e2.VERTICAL_AXIS !== 'undefined' && e2.axis === e2.VERTICAL_AXIS) {\n this.deltaY = -e2.detail / 3;\n }\n // horizontal delta scroll\n if (typeof e1.wheelDeltaX !== 'undefined') {\n if (browser.isSafari && platform.isWindows) {\n this.deltaX = -(e1.wheelDeltaX / 120);\n }\n else {\n this.deltaX = e1.wheelDeltaX / 120;\n }\n }\n else if (typeof e2.HORIZONTAL_AXIS !== 'undefined' && e2.axis === e2.HORIZONTAL_AXIS) {\n this.deltaX = -e.detail / 3;\n }\n // Assume a vertical scroll if nothing else worked\n if (this.deltaY === 0 && this.deltaX === 0 && e.wheelDelta) {\n this.deltaY = e.wheelDelta / 120;\n }\n }\n }\n StandardMouseWheelEvent.prototype.preventDefault = function () {\n if (this.browserEvent) {\n if (this.browserEvent.preventDefault) {\n this.browserEvent.preventDefault();\n }\n }\n };\n StandardMouseWheelEvent.prototype.stopPropagation = function () {\n if (this.browserEvent) {\n if (this.browserEvent.stopPropagation) {\n this.browserEvent.stopPropagation();\n }\n }\n };\n return StandardMouseWheelEvent;\n}());\nexport { StandardMouseWheelEvent };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { Emitter, mapEvent } from '../common/event';\nexport var domEvent = function (element, type, useCapture) {\n var fn = function (e) { return emitter.fire(e); };\n var emitter = new Emitter({\n onFirstListenerAdd: function () {\n element.addEventListener(type, fn, useCapture);\n },\n onLastListenerRemove: function () {\n element.removeEventListener(type, fn, useCapture);\n }\n });\n return emitter.event;\n};\nexport function stop(event) {\n return mapEvent(event, function (e) {\n e.preventDefault();\n e.stopPropagation();\n return e;\n });\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport * as platform from '../common/platform';\nimport { TimeoutTimer } from '../common/async';\nimport { onUnexpectedError } from '../common/errors';\nimport { Disposable, dispose } from '../common/lifecycle';\nimport * as browser from './browser';\nimport { StandardKeyboardEvent } from './keyboardEvent';\nimport { StandardMouseEvent } from './mouseEvent';\nimport { Emitter } from '../common/event';\nimport { domEvent } from './event';\nexport function clearNode(node) {\n while (node.firstChild) {\n node.removeChild(node.firstChild);\n }\n}\nexport function isInDOM(node) {\n while (node) {\n if (node === document.body) {\n return true;\n }\n node = node.parentNode;\n }\n return false;\n}\nvar _manualClassList = new /** @class */ (function () {\n function class_1() {\n }\n class_1.prototype._findClassName = function (node, className) {\n var classes = node.className;\n if (!classes) {\n this._lastStart = -1;\n return;\n }\n className = className.trim();\n var classesLen = classes.length, classLen = className.length;\n if (classLen === 0) {\n this._lastStart = -1;\n return;\n }\n if (classesLen < classLen) {\n this._lastStart = -1;\n return;\n }\n if (classes === className) {\n this._lastStart = 0;\n this._lastEnd = classesLen;\n return;\n }\n var idx = -1, idxEnd;\n while ((idx = classes.indexOf(className, idx + 1)) >= 0) {\n idxEnd = idx + classLen;\n // a class that is followed by another class\n if ((idx === 0 || classes.charCodeAt(idx - 1) === 32 /* Space */) && classes.charCodeAt(idxEnd) === 32 /* Space */) {\n this._lastStart = idx;\n this._lastEnd = idxEnd + 1;\n return;\n }\n // last class\n if (idx > 0 && classes.charCodeAt(idx - 1) === 32 /* Space */ && idxEnd === classesLen) {\n this._lastStart = idx - 1;\n this._lastEnd = idxEnd;\n return;\n }\n // equal - duplicate of cmp above\n if (idx === 0 && idxEnd === classesLen) {\n this._lastStart = 0;\n this._lastEnd = idxEnd;\n return;\n }\n }\n this._lastStart = -1;\n };\n class_1.prototype.hasClass = function (node, className) {\n this._findClassName(node, className);\n return this._lastStart !== -1;\n };\n class_1.prototype.addClasses = function (node) {\n var _this = this;\n var classNames = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n classNames[_i - 1] = arguments[_i];\n }\n classNames.forEach(function (nameValue) { return nameValue.split(' ').forEach(function (name) { return _this.addClass(node, name); }); });\n };\n class_1.prototype.addClass = function (node, className) {\n if (!node.className) { // doesn't have it for sure\n node.className = className;\n }\n else {\n this._findClassName(node, className); // see if it's already there\n if (this._lastStart === -1) {\n node.className = node.className + ' ' + className;\n }\n }\n };\n class_1.prototype.removeClass = function (node, className) {\n this._findClassName(node, className);\n if (this._lastStart === -1) {\n return; // Prevent styles invalidation if not necessary\n }\n else {\n node.className = node.className.substring(0, this._lastStart) + node.className.substring(this._lastEnd);\n }\n };\n class_1.prototype.removeClasses = function (node) {\n var _this = this;\n var classNames = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n classNames[_i - 1] = arguments[_i];\n }\n classNames.forEach(function (nameValue) { return nameValue.split(' ').forEach(function (name) { return _this.removeClass(node, name); }); });\n };\n class_1.prototype.toggleClass = function (node, className, shouldHaveIt) {\n this._findClassName(node, className);\n if (this._lastStart !== -1 && (shouldHaveIt === void 0 || !shouldHaveIt)) {\n this.removeClass(node, className);\n }\n if (this._lastStart === -1 && (shouldHaveIt === void 0 || shouldHaveIt)) {\n this.addClass(node, className);\n }\n };\n return class_1;\n}());\nvar _nativeClassList = new /** @class */ (function () {\n function class_2() {\n }\n class_2.prototype.hasClass = function (node, className) {\n return className && node.classList && node.classList.contains(className);\n };\n class_2.prototype.addClasses = function (node) {\n var _this = this;\n var classNames = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n classNames[_i - 1] = arguments[_i];\n }\n classNames.forEach(function (nameValue) { return nameValue.split(' ').forEach(function (name) { return _this.addClass(node, name); }); });\n };\n class_2.prototype.addClass = function (node, className) {\n if (className && node.classList) {\n node.classList.add(className);\n }\n };\n class_2.prototype.removeClass = function (node, className) {\n if (className && node.classList) {\n node.classList.remove(className);\n }\n };\n class_2.prototype.removeClasses = function (node) {\n var _this = this;\n var classNames = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n classNames[_i - 1] = arguments[_i];\n }\n classNames.forEach(function (nameValue) { return nameValue.split(' ').forEach(function (name) { return _this.removeClass(node, name); }); });\n };\n class_2.prototype.toggleClass = function (node, className, shouldHaveIt) {\n if (node.classList) {\n node.classList.toggle(className, shouldHaveIt);\n }\n };\n return class_2;\n}());\n// In IE11 there is only partial support for `classList` which makes us keep our\n// custom implementation. Otherwise use the native implementation, see: http://caniuse.com/#search=classlist\nvar _classList = browser.isIE ? _manualClassList : _nativeClassList;\nexport var hasClass = _classList.hasClass.bind(_classList);\nexport var addClass = _classList.addClass.bind(_classList);\nexport var removeClass = _classList.removeClass.bind(_classList);\nexport var toggleClass = _classList.toggleClass.bind(_classList);\nvar DomListener = /** @class */ (function () {\n function DomListener(node, type, handler, useCapture) {\n this._node = node;\n this._type = type;\n this._handler = handler;\n this._useCapture = (useCapture || false);\n this._node.addEventListener(this._type, this._handler, this._useCapture);\n }\n DomListener.prototype.dispose = function () {\n if (!this._handler) {\n // Already disposed\n return;\n }\n this._node.removeEventListener(this._type, this._handler, this._useCapture);\n // Prevent leakers from holding on to the dom or handler func\n this._node = null;\n this._handler = null;\n };\n return DomListener;\n}());\nexport function addDisposableListener(node, type, handler, useCapture) {\n return new DomListener(node, type, handler, useCapture);\n}\nfunction _wrapAsStandardMouseEvent(handler) {\n return function (e) {\n return handler(new StandardMouseEvent(e));\n };\n}\nfunction _wrapAsStandardKeyboardEvent(handler) {\n return function (e) {\n return handler(new StandardKeyboardEvent(e));\n };\n}\nexport var addStandardDisposableListener = function addStandardDisposableListener(node, type, handler, useCapture) {\n var wrapHandler = handler;\n if (type === 'click' || type === 'mousedown') {\n wrapHandler = _wrapAsStandardMouseEvent(handler);\n }\n else if (type === 'keydown' || type === 'keypress' || type === 'keyup') {\n wrapHandler = _wrapAsStandardKeyboardEvent(handler);\n }\n return addDisposableListener(node, type, wrapHandler, useCapture);\n};\nexport function addDisposableNonBubblingMouseOutListener(node, handler) {\n return addDisposableListener(node, 'mouseout', function (e) {\n // Mouse out bubbles, so this is an attempt to ignore faux mouse outs coming from children elements\n var toElement = (e.relatedTarget || e.toElement);\n while (toElement && toElement !== node) {\n toElement = toElement.parentNode;\n }\n if (toElement === node) {\n return;\n }\n handler(e);\n });\n}\nvar _animationFrame = null;\nfunction doRequestAnimationFrame(callback) {\n if (!_animationFrame) {\n var emulatedRequestAnimationFrame = function (callback) {\n return setTimeout(function () { return callback(new Date().getTime()); }, 0);\n };\n _animationFrame = (self.requestAnimationFrame\n || self.msRequestAnimationFrame\n || self.webkitRequestAnimationFrame\n || self.mozRequestAnimationFrame\n || self.oRequestAnimationFrame\n || emulatedRequestAnimationFrame);\n }\n return _animationFrame.call(self, callback);\n}\n/**\n * Schedule a callback to be run at the next animation frame.\n * This allows multiple parties to register callbacks that should run at the next animation frame.\n * If currently in an animation frame, `runner` will be executed immediately.\n * @return token that can be used to cancel the scheduled runner (only if `runner` was not executed immediately).\n */\nexport var runAtThisOrScheduleAtNextAnimationFrame;\n/**\n * Schedule a callback to be run at the next animation frame.\n * This allows multiple parties to register callbacks that should run at the next animation frame.\n * If currently in an animation frame, `runner` will be executed at the next animation frame.\n * @return token that can be used to cancel the scheduled runner.\n */\nexport var scheduleAtNextAnimationFrame;\nvar AnimationFrameQueueItem = /** @class */ (function () {\n function AnimationFrameQueueItem(runner, priority) {\n this._runner = runner;\n this.priority = priority;\n this._canceled = false;\n }\n AnimationFrameQueueItem.prototype.dispose = function () {\n this._canceled = true;\n };\n AnimationFrameQueueItem.prototype.execute = function () {\n if (this._canceled) {\n return;\n }\n try {\n this._runner();\n }\n catch (e) {\n onUnexpectedError(e);\n }\n };\n // Sort by priority (largest to lowest)\n AnimationFrameQueueItem.sort = function (a, b) {\n return b.priority - a.priority;\n };\n return AnimationFrameQueueItem;\n}());\n(function () {\n /**\n * The runners scheduled at the next animation frame\n */\n var NEXT_QUEUE = [];\n /**\n * The runners scheduled at the current animation frame\n */\n var CURRENT_QUEUE = null;\n /**\n * A flag to keep track if the native requestAnimationFrame was already called\n */\n var animFrameRequested = false;\n /**\n * A flag to indicate if currently handling a native requestAnimationFrame callback\n */\n var inAnimationFrameRunner = false;\n var animationFrameRunner = function () {\n animFrameRequested = false;\n CURRENT_QUEUE = NEXT_QUEUE;\n NEXT_QUEUE = [];\n inAnimationFrameRunner = true;\n while (CURRENT_QUEUE.length > 0) {\n CURRENT_QUEUE.sort(AnimationFrameQueueItem.sort);\n var top_1 = CURRENT_QUEUE.shift();\n top_1.execute();\n }\n inAnimationFrameRunner = false;\n };\n scheduleAtNextAnimationFrame = function (runner, priority) {\n if (priority === void 0) { priority = 0; }\n var item = new AnimationFrameQueueItem(runner, priority);\n NEXT_QUEUE.push(item);\n if (!animFrameRequested) {\n animFrameRequested = true;\n doRequestAnimationFrame(animationFrameRunner);\n }\n return item;\n };\n runAtThisOrScheduleAtNextAnimationFrame = function (runner, priority) {\n if (inAnimationFrameRunner) {\n var item = new AnimationFrameQueueItem(runner, priority);\n CURRENT_QUEUE.push(item);\n return item;\n }\n else {\n return scheduleAtNextAnimationFrame(runner, priority);\n }\n };\n})();\nvar MINIMUM_TIME_MS = 16;\nvar DEFAULT_EVENT_MERGER = function (lastEvent, currentEvent) {\n return currentEvent;\n};\nvar TimeoutThrottledDomListener = /** @class */ (function (_super) {\n __extends(TimeoutThrottledDomListener, _super);\n function TimeoutThrottledDomListener(node, type, handler, eventMerger, minimumTimeMs) {\n if (eventMerger === void 0) { eventMerger = DEFAULT_EVENT_MERGER; }\n if (minimumTimeMs === void 0) { minimumTimeMs = MINIMUM_TIME_MS; }\n var _this = _super.call(this) || this;\n var lastEvent = null;\n var lastHandlerTime = 0;\n var timeout = _this._register(new TimeoutTimer());\n var invokeHandler = function () {\n lastHandlerTime = (new Date()).getTime();\n handler(lastEvent);\n lastEvent = null;\n };\n _this._register(addDisposableListener(node, type, function (e) {\n lastEvent = eventMerger(lastEvent, e);\n var elapsedTime = (new Date()).getTime() - lastHandlerTime;\n if (elapsedTime >= minimumTimeMs) {\n timeout.cancel();\n invokeHandler();\n }\n else {\n timeout.setIfNotSet(invokeHandler, minimumTimeMs - elapsedTime);\n }\n }));\n return _this;\n }\n return TimeoutThrottledDomListener;\n}(Disposable));\nexport function addDisposableThrottledListener(node, type, handler, eventMerger, minimumTimeMs) {\n return new TimeoutThrottledDomListener(node, type, handler, eventMerger, minimumTimeMs);\n}\nexport function getComputedStyle(el) {\n return document.defaultView.getComputedStyle(el, null);\n}\n// Adapted from WinJS\n// Converts a CSS positioning string for the specified element to pixels.\nvar convertToPixels = (function () {\n return function (element, value) {\n return parseFloat(value) || 0;\n };\n})();\nfunction getDimension(element, cssPropertyName, jsPropertyName) {\n var computedStyle = getComputedStyle(element);\n var value = '0';\n if (computedStyle) {\n if (computedStyle.getPropertyValue) {\n value = computedStyle.getPropertyValue(cssPropertyName);\n }\n else {\n // IE8\n value = computedStyle.getAttribute(jsPropertyName);\n }\n }\n return convertToPixels(element, value);\n}\nexport function getClientArea(element) {\n // Try with DOM clientWidth / clientHeight\n if (element !== document.body) {\n return new Dimension(element.clientWidth, element.clientHeight);\n }\n // Try innerWidth / innerHeight\n if (window.innerWidth && window.innerHeight) {\n return new Dimension(window.innerWidth, window.innerHeight);\n }\n // Try with document.body.clientWidth / document.body.clientHeigh\n if (document.body && document.body.clientWidth && document.body.clientWidth) {\n return new Dimension(document.body.clientWidth, document.body.clientHeight);\n }\n // Try with document.documentElement.clientWidth / document.documentElement.clientHeight\n if (document.documentElement && document.documentElement.clientWidth && document.documentElement.clientHeight) {\n return new Dimension(document.documentElement.clientWidth, document.documentElement.clientHeight);\n }\n throw new Error('Unable to figure out browser width and height');\n}\nvar sizeUtils = {\n getBorderLeftWidth: function (element) {\n return getDimension(element, 'border-left-width', 'borderLeftWidth');\n },\n getBorderRightWidth: function (element) {\n return getDimension(element, 'border-right-width', 'borderRightWidth');\n },\n getBorderTopWidth: function (element) {\n return getDimension(element, 'border-top-width', 'borderTopWidth');\n },\n getBorderBottomWidth: function (element) {\n return getDimension(element, 'border-bottom-width', 'borderBottomWidth');\n },\n getPaddingLeft: function (element) {\n return getDimension(element, 'padding-left', 'paddingLeft');\n },\n getPaddingRight: function (element) {\n return getDimension(element, 'padding-right', 'paddingRight');\n },\n getPaddingTop: function (element) {\n return getDimension(element, 'padding-top', 'paddingTop');\n },\n getPaddingBottom: function (element) {\n return getDimension(element, 'padding-bottom', 'paddingBottom');\n },\n getMarginLeft: function (element) {\n return getDimension(element, 'margin-left', 'marginLeft');\n },\n getMarginTop: function (element) {\n return getDimension(element, 'margin-top', 'marginTop');\n },\n getMarginRight: function (element) {\n return getDimension(element, 'margin-right', 'marginRight');\n },\n getMarginBottom: function (element) {\n return getDimension(element, 'margin-bottom', 'marginBottom');\n },\n __commaSentinel: false\n};\n// ----------------------------------------------------------------------------------------\n// Position & Dimension\nvar Dimension = /** @class */ (function () {\n function Dimension(width, height) {\n this.width = width;\n this.height = height;\n }\n return Dimension;\n}());\nexport { Dimension };\nexport function getTopLeftOffset(element) {\n // Adapted from WinJS.Utilities.getPosition\n // and added borders to the mix\n var offsetParent = element.offsetParent, top = element.offsetTop, left = element.offsetLeft;\n while ((element = element.parentNode) !== null && element !== document.body && element !== document.documentElement) {\n top -= element.scrollTop;\n var c = getComputedStyle(element);\n if (c) {\n left -= c.direction !== 'rtl' ? element.scrollLeft : -element.scrollLeft;\n }\n if (element === offsetParent) {\n left += sizeUtils.getBorderLeftWidth(element);\n top += sizeUtils.getBorderTopWidth(element);\n top += element.offsetTop;\n left += element.offsetLeft;\n offsetParent = element.offsetParent;\n }\n }\n return {\n left: left,\n top: top\n };\n}\n/**\n * Returns the position of a dom node relative to the entire page.\n */\nexport function getDomNodePagePosition(domNode) {\n var bb = domNode.getBoundingClientRect();\n return {\n left: bb.left + StandardWindow.scrollX,\n top: bb.top + StandardWindow.scrollY,\n width: bb.width,\n height: bb.height\n };\n}\nexport var StandardWindow = new /** @class */ (function () {\n function class_3() {\n }\n Object.defineProperty(class_3.prototype, \"scrollX\", {\n get: function () {\n if (typeof window.scrollX === 'number') {\n // modern browsers\n return window.scrollX;\n }\n else {\n return document.body.scrollLeft + document.documentElement.scrollLeft;\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(class_3.prototype, \"scrollY\", {\n get: function () {\n if (typeof window.scrollY === 'number') {\n // modern browsers\n return window.scrollY;\n }\n else {\n return document.body.scrollTop + document.documentElement.scrollTop;\n }\n },\n enumerable: true,\n configurable: true\n });\n return class_3;\n}());\n// Adapted from WinJS\n// Gets the width of the element, including margins.\nexport function getTotalWidth(element) {\n var margin = sizeUtils.getMarginLeft(element) + sizeUtils.getMarginRight(element);\n return element.offsetWidth + margin;\n}\nexport function getContentWidth(element) {\n var border = sizeUtils.getBorderLeftWidth(element) + sizeUtils.getBorderRightWidth(element);\n var padding = sizeUtils.getPaddingLeft(element) + sizeUtils.getPaddingRight(element);\n return element.offsetWidth - border - padding;\n}\n// Adapted from WinJS\n// Gets the height of the content of the specified element. The content height does not include borders or padding.\nexport function getContentHeight(element) {\n var border = sizeUtils.getBorderTopWidth(element) + sizeUtils.getBorderBottomWidth(element);\n var padding = sizeUtils.getPaddingTop(element) + sizeUtils.getPaddingBottom(element);\n return element.offsetHeight - border - padding;\n}\n// Adapted from WinJS\n// Gets the height of the element, including its margins.\nexport function getTotalHeight(element) {\n var margin = sizeUtils.getMarginTop(element) + sizeUtils.getMarginBottom(element);\n return element.offsetHeight + margin;\n}\n// ----------------------------------------------------------------------------------------\nexport function isAncestor(testChild, testAncestor) {\n while (testChild) {\n if (testChild === testAncestor) {\n return true;\n }\n testChild = testChild.parentNode;\n }\n return false;\n}\nexport function findParentWithClass(node, clazz, stopAtClazzOrNode) {\n while (node) {\n if (hasClass(node, clazz)) {\n return node;\n }\n if (stopAtClazzOrNode) {\n if (typeof stopAtClazzOrNode === 'string') {\n if (hasClass(node, stopAtClazzOrNode)) {\n return null;\n }\n }\n else {\n if (node === stopAtClazzOrNode) {\n return null;\n }\n }\n }\n node = node.parentNode;\n }\n return null;\n}\nexport function createStyleSheet(container) {\n if (container === void 0) { container = document.getElementsByTagName('head')[0]; }\n var style = document.createElement('style');\n style.type = 'text/css';\n style.media = 'screen';\n container.appendChild(style);\n return style;\n}\nvar _sharedStyleSheet = null;\nfunction getSharedStyleSheet() {\n if (!_sharedStyleSheet) {\n _sharedStyleSheet = createStyleSheet();\n }\n return _sharedStyleSheet;\n}\nfunction getDynamicStyleSheetRules(style) {\n if (style && style.sheet && style.sheet.rules) {\n // Chrome, IE\n return style.sheet.rules;\n }\n if (style && style.sheet && style.sheet.cssRules) {\n // FF\n return style.sheet.cssRules;\n }\n return [];\n}\nexport function createCSSRule(selector, cssText, style) {\n if (style === void 0) { style = getSharedStyleSheet(); }\n if (!style || !cssText) {\n return;\n }\n style.sheet.insertRule(selector + '{' + cssText + '}', 0);\n}\nexport function removeCSSRulesContainingSelector(ruleName, style) {\n if (style === void 0) { style = getSharedStyleSheet(); }\n if (!style) {\n return;\n }\n var rules = getDynamicStyleSheetRules(style);\n var toDelete = [];\n for (var i = 0; i < rules.length; i++) {\n var rule = rules[i];\n if (rule.selectorText.indexOf(ruleName) !== -1) {\n toDelete.push(i);\n }\n }\n for (var i = toDelete.length - 1; i >= 0; i--) {\n style.sheet.deleteRule(toDelete[i]);\n }\n}\nexport function isHTMLElement(o) {\n if (typeof HTMLElement === 'object') {\n return o instanceof HTMLElement;\n }\n return o && typeof o === 'object' && o.nodeType === 1 && typeof o.nodeName === 'string';\n}\nexport var EventType = {\n // Mouse\n CLICK: 'click',\n AUXCLICK: 'auxclick',\n DBLCLICK: 'dblclick',\n MOUSE_UP: 'mouseup',\n MOUSE_DOWN: 'mousedown',\n MOUSE_OVER: 'mouseover',\n MOUSE_MOVE: 'mousemove',\n MOUSE_OUT: 'mouseout',\n MOUSE_ENTER: 'mouseenter',\n MOUSE_LEAVE: 'mouseleave',\n CONTEXT_MENU: 'contextmenu',\n WHEEL: 'wheel',\n // Keyboard\n KEY_DOWN: 'keydown',\n KEY_PRESS: 'keypress',\n KEY_UP: 'keyup',\n // HTML Document\n LOAD: 'load',\n UNLOAD: 'unload',\n ABORT: 'abort',\n ERROR: 'error',\n RESIZE: 'resize',\n SCROLL: 'scroll',\n // Form\n SELECT: 'select',\n CHANGE: 'change',\n SUBMIT: 'submit',\n RESET: 'reset',\n FOCUS: 'focus',\n FOCUS_IN: 'focusin',\n FOCUS_OUT: 'focusout',\n BLUR: 'blur',\n INPUT: 'input',\n // Local Storage\n STORAGE: 'storage',\n // Drag\n DRAG_START: 'dragstart',\n DRAG: 'drag',\n DRAG_ENTER: 'dragenter',\n DRAG_LEAVE: 'dragleave',\n DRAG_OVER: 'dragover',\n DROP: 'drop',\n DRAG_END: 'dragend',\n // Animation\n ANIMATION_START: browser.isWebKit ? 'webkitAnimationStart' : 'animationstart',\n ANIMATION_END: browser.isWebKit ? 'webkitAnimationEnd' : 'animationend',\n ANIMATION_ITERATION: browser.isWebKit ? 'webkitAnimationIteration' : 'animationiteration'\n};\nexport var EventHelper = {\n stop: function (e, cancelBubble) {\n if (e.preventDefault) {\n e.preventDefault();\n }\n else {\n // IE8\n e.returnValue = false;\n }\n if (cancelBubble) {\n if (e.stopPropagation) {\n e.stopPropagation();\n }\n else {\n // IE8\n e.cancelBubble = true;\n }\n }\n }\n};\nexport function saveParentsScrollTop(node) {\n var r = [];\n for (var i = 0; node && node.nodeType === node.ELEMENT_NODE; i++) {\n r[i] = node.scrollTop;\n node = node.parentNode;\n }\n return r;\n}\nexport function restoreParentsScrollTop(node, state) {\n for (var i = 0; node && node.nodeType === node.ELEMENT_NODE; i++) {\n if (node.scrollTop !== state[i]) {\n node.scrollTop = state[i];\n }\n node = node.parentNode;\n }\n}\nvar FocusTracker = /** @class */ (function () {\n function FocusTracker(element) {\n var _this = this;\n this._onDidFocus = new Emitter();\n this.onDidFocus = this._onDidFocus.event;\n this._onDidBlur = new Emitter();\n this.onDidBlur = this._onDidBlur.event;\n this.disposables = [];\n var hasFocus = false;\n var loosingFocus = false;\n var onFocus = function () {\n loosingFocus = false;\n if (!hasFocus) {\n hasFocus = true;\n _this._onDidFocus.fire();\n }\n };\n var onBlur = function () {\n if (hasFocus) {\n loosingFocus = true;\n window.setTimeout(function () {\n if (loosingFocus) {\n loosingFocus = false;\n hasFocus = false;\n _this._onDidBlur.fire();\n }\n }, 0);\n }\n };\n domEvent(element, EventType.FOCUS, true)(onFocus, null, this.disposables);\n domEvent(element, EventType.BLUR, true)(onBlur, null, this.disposables);\n }\n FocusTracker.prototype.dispose = function () {\n this.disposables = dispose(this.disposables);\n this._onDidFocus.dispose();\n this._onDidBlur.dispose();\n };\n return FocusTracker;\n}());\nexport function trackFocus(element) {\n return new FocusTracker(element);\n}\nexport function append(parent) {\n var children = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n children[_i - 1] = arguments[_i];\n }\n children.forEach(function (child) { return parent.appendChild(child); });\n return children[children.length - 1];\n}\nexport function prepend(parent, child) {\n parent.insertBefore(child, parent.firstChild);\n return child;\n}\nvar SELECTOR_REGEX = /([\\w\\-]+)?(#([\\w\\-]+))?((.([\\w\\-]+))*)/;\n// Similar to builder, but much more lightweight\nexport function $(description, attrs) {\n var children = [];\n for (var _i = 2; _i < arguments.length; _i++) {\n children[_i - 2] = arguments[_i];\n }\n var match = SELECTOR_REGEX.exec(description);\n if (!match) {\n throw new Error('Bad use of emmet');\n }\n var result = document.createElement(match[1] || 'div');\n if (match[3]) {\n result.id = match[3];\n }\n if (match[4]) {\n result.className = match[4].replace(/\\./g, ' ').trim();\n }\n Object.keys(attrs || {}).forEach(function (name) {\n if (/^on\\w+$/.test(name)) {\n result[name] = attrs[name];\n }\n else if (name === 'selected') {\n var value = attrs[name];\n if (value) {\n result.setAttribute(name, 'true');\n }\n }\n else {\n result.setAttribute(name, attrs[name]);\n }\n });\n children\n .filter(function (child) { return !!child; })\n .forEach(function (child) {\n if (child instanceof Node) {\n result.appendChild(child);\n }\n else {\n result.appendChild(document.createTextNode(child));\n }\n });\n return result;\n}\nexport function show() {\n var elements = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n elements[_i] = arguments[_i];\n }\n for (var _a = 0, elements_1 = elements; _a < elements_1.length; _a++) {\n var element = elements_1[_a];\n element.style.display = '';\n element.removeAttribute('aria-hidden');\n }\n}\nexport function hide() {\n var elements = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n elements[_i] = arguments[_i];\n }\n for (var _a = 0, elements_2 = elements; _a < elements_2.length; _a++) {\n var element = elements_2[_a];\n element.style.display = 'none';\n element.setAttribute('aria-hidden', 'true');\n }\n}\nfunction findParentWithAttribute(node, attribute) {\n while (node) {\n if (node instanceof HTMLElement && node.hasAttribute(attribute)) {\n return node;\n }\n node = node.parentNode;\n }\n return null;\n}\nexport function removeTabIndexAndUpdateFocus(node) {\n if (!node || !node.hasAttribute('tabIndex')) {\n return;\n }\n // If we are the currently focused element and tabIndex is removed,\n // standard DOM behavior is to move focus to the element. We\n // typically never want that, rather put focus to the closest element\n // in the hierarchy of the parent DOM nodes.\n if (document.activeElement === node) {\n var parentFocusable = findParentWithAttribute(node.parentElement, 'tabIndex');\n if (parentFocusable) {\n parentFocusable.focus();\n }\n }\n node.removeAttribute('tabindex');\n}\nexport function getElementsByTagName(tag) {\n return Array.prototype.slice.call(document.getElementsByTagName(tag), 0);\n}\n/**\n * Find a value usable for a dom node size such that the likelihood that it would be\n * displayed with constant screen pixels size is as high as possible.\n *\n * e.g. We would desire for the cursors to be 2px (CSS px) wide. Under a devicePixelRatio\n * of 1.25, the cursor will be 2.5 screen pixels wide. Depending on how the dom node aligns/\"snaps\"\n * with the screen pixels, it will sometimes be rendered with 2 screen pixels, and sometimes with 3 screen pixels.\n */\nexport function computeScreenAwareSize(cssPx) {\n var screenPx = window.devicePixelRatio * cssPx;\n return Math.max(1, Math.floor(screenPx)) / window.devicePixelRatio;\n}\n/**\n * See https://github.com/Microsoft/monaco-editor/issues/601\n * To protect against malicious code in the linked site, particularly phishing attempts,\n * the window.opener should be set to null to prevent the linked site from having access\n * to change the location of the current page.\n * See https://mathiasbynens.github.io/rel-noopener/\n */\nexport function windowOpenNoOpener(url) {\n if (platform.isNative || browser.isEdgeWebView) {\n // In VSCode, window.open() always returns null...\n // The same is true for a WebView (see https://github.com/Microsoft/monaco-editor/issues/628)\n window.open(url);\n }\n else {\n var newTab = window.open();\n if (newTab) {\n newTab.opener = null;\n newTab.location.href = url;\n }\n }\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar ServiceCollection = /** @class */ (function () {\n function ServiceCollection() {\n var entries = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n entries[_i] = arguments[_i];\n }\n this._entries = new Map();\n for (var _a = 0, entries_1 = entries; _a < entries_1.length; _a++) {\n var _b = entries_1[_a], id = _b[0], service = _b[1];\n this.set(id, service);\n }\n }\n ServiceCollection.prototype.set = function (id, instanceOrDescriptor) {\n var result = this._entries.get(id);\n this._entries.set(id, instanceOrDescriptor);\n return result;\n };\n ServiceCollection.prototype.forEach = function (callback) {\n this._entries.forEach(function (value, key) { return callback(key, value); });\n };\n ServiceCollection.prototype.has = function (id) {\n return this._entries.has(id);\n };\n ServiceCollection.prototype.get = function (id) {\n return this._entries.get(id);\n };\n return ServiceCollection;\n}());\nexport { ServiceCollection };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport * as platform from '../../registry/common/platform';\nimport { Emitter } from '../../../base/common/event';\nexport var Extensions = {\n JSONContribution: 'base.contributions.json'\n};\nfunction normalizeId(id) {\n if (id.length > 0 && id.charAt(id.length - 1) === '#') {\n return id.substring(0, id.length - 1);\n }\n return id;\n}\nvar JSONContributionRegistry = /** @class */ (function () {\n function JSONContributionRegistry() {\n this._onDidChangeSchema = new Emitter();\n this.schemasById = {};\n }\n JSONContributionRegistry.prototype.registerSchema = function (uri, unresolvedSchemaContent) {\n this.schemasById[normalizeId(uri)] = unresolvedSchemaContent;\n this._onDidChangeSchema.fire(uri);\n };\n return JSONContributionRegistry;\n}());\nvar jsonContributionRegistry = new JSONContributionRegistry();\nplatform.Registry.add(Extensions.JSONContribution, jsonContributionRegistry);\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport * as nls from '../../../nls';\nimport { Emitter } from '../../../base/common/event';\nimport { Registry } from '../../registry/common/platform';\nimport * as types from '../../../base/common/types';\nimport * as strings from '../../../base/common/strings';\nimport { Extensions as JSONExtensions } from '../../jsonschemas/common/jsonContributionRegistry';\nexport var Extensions = {\n Configuration: 'base.contributions.configuration'\n};\nexport var ConfigurationScope;\n(function (ConfigurationScope) {\n ConfigurationScope[ConfigurationScope[\"APPLICATION\"] = 1] = \"APPLICATION\";\n ConfigurationScope[ConfigurationScope[\"WINDOW\"] = 2] = \"WINDOW\";\n ConfigurationScope[ConfigurationScope[\"RESOURCE\"] = 3] = \"RESOURCE\";\n})(ConfigurationScope || (ConfigurationScope = {}));\nexport var allSettings = { properties: {}, patternProperties: {} };\nexport var applicationSettings = { properties: {}, patternProperties: {} };\nexport var windowSettings = { properties: {}, patternProperties: {} };\nexport var resourceSettings = { properties: {}, patternProperties: {} };\nexport var editorConfigurationSchemaId = 'vscode://schemas/settings/editor';\nvar contributionRegistry = Registry.as(JSONExtensions.JSONContribution);\nvar ConfigurationRegistry = /** @class */ (function () {\n function ConfigurationRegistry() {\n this.overrideIdentifiers = [];\n this._onDidSchemaChange = new Emitter();\n this._onDidRegisterConfiguration = new Emitter();\n this.configurationContributors = [];\n this.editorConfigurationSchema = { properties: {}, patternProperties: {}, additionalProperties: false, errorMessage: 'Unknown editor configuration setting' };\n this.configurationProperties = {};\n this.excludedConfigurationProperties = {};\n this.computeOverridePropertyPattern();\n contributionRegistry.registerSchema(editorConfigurationSchemaId, this.editorConfigurationSchema);\n }\n ConfigurationRegistry.prototype.registerConfiguration = function (configuration, validate) {\n if (validate === void 0) { validate = true; }\n this.registerConfigurations([configuration], [], validate);\n };\n ConfigurationRegistry.prototype.registerConfigurations = function (configurations, defaultConfigurations, validate) {\n var _this = this;\n if (validate === void 0) { validate = true; }\n var configurationNode = this.toConfiguration(defaultConfigurations);\n if (configurationNode) {\n configurations.push(configurationNode);\n }\n var properties = [];\n configurations.forEach(function (configuration) {\n properties.push.apply(properties, _this.validateAndRegisterProperties(configuration, validate)); // fills in defaults\n _this.configurationContributors.push(configuration);\n _this.registerJSONConfiguration(configuration);\n _this.updateSchemaForOverrideSettingsConfiguration(configuration);\n });\n this._onDidRegisterConfiguration.fire(properties);\n };\n ConfigurationRegistry.prototype.registerOverrideIdentifiers = function (overrideIdentifiers) {\n var _a;\n (_a = this.overrideIdentifiers).push.apply(_a, overrideIdentifiers);\n this.updateOverridePropertyPatternKey();\n };\n ConfigurationRegistry.prototype.toConfiguration = function (defaultConfigurations) {\n var configurationNode = {\n id: 'defaultOverrides',\n title: nls.localize('defaultConfigurations.title', \"Default Configuration Overrides\"),\n properties: {}\n };\n for (var _i = 0, defaultConfigurations_1 = defaultConfigurations; _i < defaultConfigurations_1.length; _i++) {\n var defaultConfiguration = defaultConfigurations_1[_i];\n for (var key in defaultConfiguration.defaults) {\n var defaultValue = defaultConfiguration.defaults[key];\n if (OVERRIDE_PROPERTY_PATTERN.test(key) && typeof defaultValue === 'object') {\n configurationNode.properties[key] = {\n type: 'object',\n default: defaultValue,\n description: nls.localize('overrideSettings.description', \"Configure editor settings to be overridden for {0} language.\", key),\n $ref: editorConfigurationSchemaId\n };\n }\n }\n }\n return Object.keys(configurationNode.properties).length ? configurationNode : null;\n };\n ConfigurationRegistry.prototype.validateAndRegisterProperties = function (configuration, validate, scope, overridable) {\n if (validate === void 0) { validate = true; }\n if (scope === void 0) { scope = ConfigurationScope.WINDOW; }\n if (overridable === void 0) { overridable = false; }\n scope = types.isUndefinedOrNull(configuration.scope) ? scope : configuration.scope;\n overridable = configuration.overridable || overridable;\n var propertyKeys = [];\n var properties = configuration.properties;\n if (properties) {\n for (var key in properties) {\n var message = void 0;\n if (validate && (message = validateProperty(key))) {\n console.warn(message);\n delete properties[key];\n continue;\n }\n // fill in default values\n var property = properties[key];\n var defaultValue = property.default;\n if (types.isUndefined(defaultValue)) {\n property.default = getDefaultValue(property.type);\n }\n // Inherit overridable property from parent\n if (overridable) {\n property.overridable = true;\n }\n if (OVERRIDE_PROPERTY_PATTERN.test(key)) {\n property.scope = void 0; // No scope for overridable properties `[${identifier}]`\n }\n else {\n property.scope = types.isUndefinedOrNull(property.scope) ? scope : property.scope;\n }\n // Add to properties maps\n // Property is included by default if 'included' is unspecified\n if (properties[key].hasOwnProperty('included') && !properties[key].included) {\n this.excludedConfigurationProperties[key] = properties[key];\n delete properties[key];\n continue;\n }\n else {\n this.configurationProperties[key] = properties[key];\n }\n propertyKeys.push(key);\n }\n }\n var subNodes = configuration.allOf;\n if (subNodes) {\n for (var _i = 0, subNodes_1 = subNodes; _i < subNodes_1.length; _i++) {\n var node = subNodes_1[_i];\n propertyKeys.push.apply(propertyKeys, this.validateAndRegisterProperties(node, validate, scope, overridable));\n }\n }\n return propertyKeys;\n };\n ConfigurationRegistry.prototype.getConfigurationProperties = function () {\n return this.configurationProperties;\n };\n ConfigurationRegistry.prototype.registerJSONConfiguration = function (configuration) {\n function register(configuration) {\n var properties = configuration.properties;\n if (properties) {\n for (var key in properties) {\n allSettings.properties[key] = properties[key];\n switch (properties[key].scope) {\n case ConfigurationScope.APPLICATION:\n applicationSettings.properties[key] = properties[key];\n break;\n case ConfigurationScope.WINDOW:\n windowSettings.properties[key] = properties[key];\n break;\n case ConfigurationScope.RESOURCE:\n resourceSettings.properties[key] = properties[key];\n break;\n }\n }\n }\n var subNodes = configuration.allOf;\n if (subNodes) {\n subNodes.forEach(register);\n }\n }\n register(configuration);\n this._onDidSchemaChange.fire();\n };\n ConfigurationRegistry.prototype.updateSchemaForOverrideSettingsConfiguration = function (configuration) {\n if (configuration.id !== SETTINGS_OVERRRIDE_NODE_ID) {\n this.update(configuration);\n contributionRegistry.registerSchema(editorConfigurationSchemaId, this.editorConfigurationSchema);\n }\n };\n ConfigurationRegistry.prototype.updateOverridePropertyPatternKey = function () {\n var patternProperties = allSettings.patternProperties[this.overridePropertyPattern];\n if (!patternProperties) {\n patternProperties = {\n type: 'object',\n description: nls.localize('overrideSettings.defaultDescription', \"Configure editor settings to be overridden for a language.\"),\n errorMessage: 'Unknown Identifier. Use language identifiers',\n $ref: editorConfigurationSchemaId\n };\n }\n delete allSettings.patternProperties[this.overridePropertyPattern];\n delete applicationSettings.patternProperties[this.overridePropertyPattern];\n delete windowSettings.patternProperties[this.overridePropertyPattern];\n delete resourceSettings.patternProperties[this.overridePropertyPattern];\n this.computeOverridePropertyPattern();\n allSettings.patternProperties[this.overridePropertyPattern] = patternProperties;\n applicationSettings.patternProperties[this.overridePropertyPattern] = patternProperties;\n windowSettings.patternProperties[this.overridePropertyPattern] = patternProperties;\n resourceSettings.patternProperties[this.overridePropertyPattern] = patternProperties;\n this._onDidSchemaChange.fire();\n };\n ConfigurationRegistry.prototype.update = function (configuration) {\n var _this = this;\n var properties = configuration.properties;\n if (properties) {\n for (var key in properties) {\n if (properties[key].overridable) {\n this.editorConfigurationSchema.properties[key] = this.getConfigurationProperties()[key];\n }\n }\n }\n var subNodes = configuration.allOf;\n if (subNodes) {\n subNodes.forEach(function (subNode) { return _this.update(subNode); });\n }\n };\n ConfigurationRegistry.prototype.computeOverridePropertyPattern = function () {\n this.overridePropertyPattern = this.overrideIdentifiers.length ? OVERRIDE_PATTERN_WITH_SUBSTITUTION.replace('${0}', this.overrideIdentifiers.map(function (identifier) { return strings.createRegExp(identifier, false).source; }).join('|')) : OVERRIDE_PROPERTY;\n };\n return ConfigurationRegistry;\n}());\nvar SETTINGS_OVERRRIDE_NODE_ID = 'override';\nvar OVERRIDE_PROPERTY = '\\\\[.*\\\\]$';\nvar OVERRIDE_PATTERN_WITH_SUBSTITUTION = '\\\\[(${0})\\\\]$';\nexport var OVERRIDE_PROPERTY_PATTERN = new RegExp(OVERRIDE_PROPERTY);\nfunction getDefaultValue(type) {\n var t = Array.isArray(type) ? type[0] : type;\n switch (t) {\n case 'boolean':\n return false;\n case 'integer':\n case 'number':\n return 0;\n case 'string':\n return '';\n case 'array':\n return [];\n case 'object':\n return {};\n default:\n return null;\n }\n}\nvar configurationRegistry = new ConfigurationRegistry();\nRegistry.add(Extensions.Configuration, configurationRegistry);\nexport function validateProperty(property) {\n if (OVERRIDE_PROPERTY_PATTERN.test(property)) {\n return nls.localize('config.property.languageDefault', \"Cannot register '{0}'. This matches property pattern '\\\\\\\\[.*\\\\\\\\]$' for describing language specific editor settings. Use 'configurationDefaults' contribution.\", property);\n }\n if (configurationRegistry.getConfigurationProperties()[property] !== void 0) {\n return nls.localize('config.property.duplicate', \"Cannot register '{0}'. This property is already registered.\", property);\n }\n return null;\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport { Emitter } from '../../../base/common/event';\nexport var EditorZoom = new /** @class */ (function () {\n function class_1() {\n this._zoomLevel = 0;\n this._onDidChangeZoomLevel = new Emitter();\n this.onDidChangeZoomLevel = this._onDidChangeZoomLevel.event;\n }\n class_1.prototype.getZoomLevel = function () {\n return this._zoomLevel;\n };\n class_1.prototype.setZoomLevel = function (zoomLevel) {\n zoomLevel = Math.min(Math.max(-5, zoomLevel), 20);\n if (this._zoomLevel === zoomLevel) {\n return;\n }\n this._zoomLevel = zoomLevel;\n this._onDidChangeZoomLevel.fire(this._zoomLevel);\n };\n return class_1;\n}());\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport * as platform from '../../../base/common/platform';\nimport { EditorZoom } from './editorZoom';\nimport { EDITOR_FONT_DEFAULTS } from './editorOptions';\n/**\n * Determined from empirical observations.\n * @internal\n */\nvar GOLDEN_LINE_HEIGHT_RATIO = platform.isMacintosh ? 1.5 : 1.35;\n/**\n * Font settings maximum and minimum limits\n */\nvar MINIMUM_FONT_SIZE = 8;\nvar MAXIMUM_FONT_SIZE = 100;\nvar MINIMUM_LINE_HEIGHT = 8;\nvar MAXIMUM_LINE_HEIGHT = 150;\nvar MINIMUM_LETTER_SPACING = -5;\nvar MAXIMUM_LETTER_SPACING = 20;\nfunction safeParseFloat(n, defaultValue) {\n if (typeof n === 'number') {\n return n;\n }\n var r = parseFloat(n);\n if (isNaN(r)) {\n return defaultValue;\n }\n return r;\n}\nfunction safeParseInt(n, defaultValue) {\n if (typeof n === 'number') {\n return Math.round(n);\n }\n var r = parseInt(n);\n if (isNaN(r)) {\n return defaultValue;\n }\n return r;\n}\nfunction clamp(n, min, max) {\n if (n < min) {\n return min;\n }\n if (n > max) {\n return max;\n }\n return n;\n}\nfunction _string(value, defaultValue) {\n if (typeof value !== 'string') {\n return defaultValue;\n }\n return value;\n}\nvar BareFontInfo = /** @class */ (function () {\n /**\n * @internal\n */\n function BareFontInfo(opts) {\n this.zoomLevel = opts.zoomLevel;\n this.fontFamily = String(opts.fontFamily);\n this.fontWeight = String(opts.fontWeight);\n this.fontSize = opts.fontSize;\n this.lineHeight = opts.lineHeight | 0;\n this.letterSpacing = opts.letterSpacing;\n }\n /**\n * @internal\n */\n BareFontInfo.createFromRawSettings = function (opts, zoomLevel) {\n var fontFamily = _string(opts.fontFamily, EDITOR_FONT_DEFAULTS.fontFamily);\n var fontWeight = _string(opts.fontWeight, EDITOR_FONT_DEFAULTS.fontWeight);\n var fontSize = safeParseFloat(opts.fontSize, EDITOR_FONT_DEFAULTS.fontSize);\n fontSize = clamp(fontSize, 0, MAXIMUM_FONT_SIZE);\n if (fontSize === 0) {\n fontSize = EDITOR_FONT_DEFAULTS.fontSize;\n }\n else if (fontSize < MINIMUM_FONT_SIZE) {\n fontSize = MINIMUM_FONT_SIZE;\n }\n var lineHeight = safeParseInt(opts.lineHeight, 0);\n lineHeight = clamp(lineHeight, 0, MAXIMUM_LINE_HEIGHT);\n if (lineHeight === 0) {\n lineHeight = Math.round(GOLDEN_LINE_HEIGHT_RATIO * fontSize);\n }\n else if (lineHeight < MINIMUM_LINE_HEIGHT) {\n lineHeight = MINIMUM_LINE_HEIGHT;\n }\n var letterSpacing = safeParseFloat(opts.letterSpacing, 0);\n letterSpacing = clamp(letterSpacing, MINIMUM_LETTER_SPACING, MAXIMUM_LETTER_SPACING);\n var editorZoomLevelMultiplier = 1 + (EditorZoom.getZoomLevel() * 0.1);\n fontSize *= editorZoomLevelMultiplier;\n lineHeight *= editorZoomLevelMultiplier;\n return new BareFontInfo({\n zoomLevel: zoomLevel,\n fontFamily: fontFamily,\n fontWeight: fontWeight,\n fontSize: fontSize,\n lineHeight: lineHeight,\n letterSpacing: letterSpacing\n });\n };\n /**\n * @internal\n */\n BareFontInfo.prototype.getId = function () {\n return this.zoomLevel + '-' + this.fontFamily + '-' + this.fontWeight + '-' + this.fontSize + '-' + this.lineHeight + '-' + this.letterSpacing;\n };\n return BareFontInfo;\n}());\nexport { BareFontInfo };\nvar FontInfo = /** @class */ (function (_super) {\n __extends(FontInfo, _super);\n /**\n * @internal\n */\n function FontInfo(opts, isTrusted) {\n var _this = _super.call(this, opts) || this;\n _this.isTrusted = isTrusted;\n _this.isMonospace = opts.isMonospace;\n _this.typicalHalfwidthCharacterWidth = opts.typicalHalfwidthCharacterWidth;\n _this.typicalFullwidthCharacterWidth = opts.typicalFullwidthCharacterWidth;\n _this.spaceWidth = opts.spaceWidth;\n _this.maxDigitWidth = opts.maxDigitWidth;\n return _this;\n }\n /**\n * @internal\n */\n FontInfo.prototype.equals = function (other) {\n return (this.fontFamily === other.fontFamily\n && this.fontWeight === other.fontWeight\n && this.fontSize === other.fontSize\n && this.lineHeight === other.lineHeight\n && this.letterSpacing === other.letterSpacing\n && this.typicalHalfwidthCharacterWidth === other.typicalHalfwidthCharacterWidth\n && this.typicalFullwidthCharacterWidth === other.typicalFullwidthCharacterWidth\n && this.spaceWidth === other.spaceWidth\n && this.maxDigitWidth === other.maxDigitWidth);\n };\n return FontInfo;\n}(BareFontInfo));\nexport { FontInfo };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport * as nls from '../../../nls';\nimport { Emitter } from '../../../base/common/event';\nimport { Disposable } from '../../../base/common/lifecycle';\nimport * as objects from '../../../base/common/objects';\nimport * as platform from '../../../base/common/platform';\nimport { Extensions, ConfigurationScope } from '../../../platform/configuration/common/configurationRegistry';\nimport { Registry } from '../../../platform/registry/common/platform';\nimport { BareFontInfo } from './fontInfo';\nimport { EditorZoom } from './editorZoom';\nimport * as editorOptions from './editorOptions';\nvar EDITOR_DEFAULTS = editorOptions.EDITOR_DEFAULTS;\nvar EDITOR_FONT_DEFAULTS = editorOptions.EDITOR_FONT_DEFAULTS;\nvar EDITOR_MODEL_DEFAULTS = editorOptions.EDITOR_MODEL_DEFAULTS;\nexport var TabFocus = new /** @class */ (function () {\n function class_1() {\n this._tabFocus = false;\n this._onDidChangeTabFocus = new Emitter();\n this.onDidChangeTabFocus = this._onDidChangeTabFocus.event;\n }\n class_1.prototype.getTabFocusMode = function () {\n return this._tabFocus;\n };\n class_1.prototype.setTabFocusMode = function (tabFocusMode) {\n if (this._tabFocus === tabFocusMode) {\n return;\n }\n this._tabFocus = tabFocusMode;\n this._onDidChangeTabFocus.fire(this._tabFocus);\n };\n return class_1;\n}());\nvar hasOwnProperty = Object.hasOwnProperty;\nvar CommonEditorConfiguration = /** @class */ (function (_super) {\n __extends(CommonEditorConfiguration, _super);\n function CommonEditorConfiguration(options) {\n var _this = _super.call(this) || this;\n _this._onDidChange = _this._register(new Emitter());\n _this.onDidChange = _this._onDidChange.event;\n // Do a \"deep clone of sorts\" on the incoming options\n _this._rawOptions = objects.mixin({}, options || {});\n _this._rawOptions.scrollbar = objects.mixin({}, _this._rawOptions.scrollbar || {});\n _this._rawOptions.minimap = objects.mixin({}, _this._rawOptions.minimap || {});\n _this._rawOptions.find = objects.mixin({}, _this._rawOptions.find || {});\n _this._rawOptions.hover = objects.mixin({}, _this._rawOptions.hover || {});\n _this._validatedOptions = editorOptions.EditorOptionsValidator.validate(_this._rawOptions, EDITOR_DEFAULTS);\n _this.editor = null;\n _this._isDominatedByLongLines = false;\n _this._lineNumbersDigitCount = 1;\n _this._register(EditorZoom.onDidChangeZoomLevel(function (_) { return _this._recomputeOptions(); }));\n _this._register(TabFocus.onDidChangeTabFocus(function (_) { return _this._recomputeOptions(); }));\n return _this;\n }\n CommonEditorConfiguration.prototype.observeReferenceElement = function (dimension) {\n };\n CommonEditorConfiguration.prototype.dispose = function () {\n _super.prototype.dispose.call(this);\n };\n CommonEditorConfiguration.prototype._recomputeOptions = function () {\n var oldOptions = this.editor;\n var newOptions = this._computeInternalOptions();\n if (oldOptions && oldOptions.equals(newOptions)) {\n return;\n }\n this.editor = newOptions;\n if (oldOptions) {\n this._onDidChange.fire(oldOptions.createChangeEvent(newOptions));\n }\n };\n CommonEditorConfiguration.prototype.getRawOptions = function () {\n return this._rawOptions;\n };\n CommonEditorConfiguration.prototype._computeInternalOptions = function () {\n var opts = this._validatedOptions;\n var partialEnv = this._getEnvConfiguration();\n var bareFontInfo = BareFontInfo.createFromRawSettings(this._rawOptions, partialEnv.zoomLevel);\n var env = {\n outerWidth: partialEnv.outerWidth,\n outerHeight: partialEnv.outerHeight,\n fontInfo: this.readConfiguration(bareFontInfo),\n extraEditorClassName: partialEnv.extraEditorClassName,\n isDominatedByLongLines: this._isDominatedByLongLines,\n lineNumbersDigitCount: this._lineNumbersDigitCount,\n emptySelectionClipboard: partialEnv.emptySelectionClipboard,\n pixelRatio: partialEnv.pixelRatio,\n tabFocusMode: TabFocus.getTabFocusMode(),\n accessibilitySupport: partialEnv.accessibilitySupport\n };\n return editorOptions.InternalEditorOptionsFactory.createInternalEditorOptions(env, opts);\n };\n CommonEditorConfiguration._primitiveArrayEquals = function (a, b) {\n if (a.length !== b.length) {\n return false;\n }\n for (var i = 0; i < a.length; i++) {\n if (a[i] !== b[i]) {\n return false;\n }\n }\n return true;\n };\n CommonEditorConfiguration._subsetEquals = function (base, subset) {\n for (var key in subset) {\n if (hasOwnProperty.call(subset, key)) {\n var subsetValue = subset[key];\n var baseValue = base[key];\n if (baseValue === subsetValue) {\n continue;\n }\n if (Array.isArray(baseValue) && Array.isArray(subsetValue)) {\n if (!this._primitiveArrayEquals(baseValue, subsetValue)) {\n return false;\n }\n continue;\n }\n if (typeof baseValue === 'object' && typeof subsetValue === 'object') {\n if (!this._subsetEquals(baseValue, subsetValue)) {\n return false;\n }\n continue;\n }\n return false;\n }\n }\n return true;\n };\n CommonEditorConfiguration.prototype.updateOptions = function (newOptions) {\n if (typeof newOptions === 'undefined') {\n return;\n }\n if (CommonEditorConfiguration._subsetEquals(this._rawOptions, newOptions)) {\n return;\n }\n this._rawOptions = objects.mixin(this._rawOptions, newOptions || {});\n this._validatedOptions = editorOptions.EditorOptionsValidator.validate(this._rawOptions, EDITOR_DEFAULTS);\n this._recomputeOptions();\n };\n CommonEditorConfiguration.prototype.setIsDominatedByLongLines = function (isDominatedByLongLines) {\n this._isDominatedByLongLines = isDominatedByLongLines;\n this._recomputeOptions();\n };\n CommonEditorConfiguration.prototype.setMaxLineNumber = function (maxLineNumber) {\n var digitCount = CommonEditorConfiguration._digitCount(maxLineNumber);\n if (this._lineNumbersDigitCount === digitCount) {\n return;\n }\n this._lineNumbersDigitCount = digitCount;\n this._recomputeOptions();\n };\n CommonEditorConfiguration._digitCount = function (n) {\n var r = 0;\n while (n) {\n n = Math.floor(n / 10);\n r++;\n }\n return r ? r : 1;\n };\n return CommonEditorConfiguration;\n}(Disposable));\nexport { CommonEditorConfiguration };\nvar configurationRegistry = Registry.as(Extensions.Configuration);\nvar editorConfiguration = {\n 'id': 'editor',\n 'order': 5,\n 'type': 'object',\n 'title': nls.localize('editorConfigurationTitle', \"Editor\"),\n 'overridable': true,\n 'scope': ConfigurationScope.RESOURCE,\n 'properties': {\n 'editor.fontFamily': {\n 'type': 'string',\n 'default': EDITOR_FONT_DEFAULTS.fontFamily,\n 'description': nls.localize('fontFamily', \"Controls the font family.\")\n },\n 'editor.fontWeight': {\n 'type': 'string',\n 'enum': ['normal', 'bold', '100', '200', '300', '400', '500', '600', '700', '800', '900'],\n 'default': EDITOR_FONT_DEFAULTS.fontWeight,\n 'description': nls.localize('fontWeight', \"Controls the font weight.\")\n },\n 'editor.fontSize': {\n 'type': 'number',\n 'default': EDITOR_FONT_DEFAULTS.fontSize,\n 'description': nls.localize('fontSize', \"Controls the font size in pixels.\")\n },\n 'editor.lineHeight': {\n 'type': 'number',\n 'default': EDITOR_FONT_DEFAULTS.lineHeight,\n 'description': nls.localize('lineHeight', \"Controls the line height. Use 0 to compute the line height from the font size.\")\n },\n 'editor.letterSpacing': {\n 'type': 'number',\n 'default': EDITOR_FONT_DEFAULTS.letterSpacing,\n 'description': nls.localize('letterSpacing', \"Controls the letter spacing in pixels.\")\n },\n 'editor.lineNumbers': {\n 'type': 'string',\n 'enum': ['off', 'on', 'relative', 'interval'],\n 'enumDescriptions': [\n nls.localize('lineNumbers.off', \"Line numbers are not rendered.\"),\n nls.localize('lineNumbers.on', \"Line numbers are rendered as absolute number.\"),\n nls.localize('lineNumbers.relative', \"Line numbers are rendered as distance in lines to cursor position.\"),\n nls.localize('lineNumbers.interval', \"Line numbers are rendered every 10 lines.\")\n ],\n 'default': 'on',\n 'description': nls.localize('lineNumbers', \"Controls the display of line numbers.\")\n },\n 'editor.rulers': {\n 'type': 'array',\n 'items': {\n 'type': 'number'\n },\n 'default': EDITOR_DEFAULTS.viewInfo.rulers,\n 'description': nls.localize('rulers', \"Render vertical rulers after a certain number of monospace characters. Use multiple values for multiple rulers. No rulers are drawn if array is empty.\")\n },\n 'editor.wordSeparators': {\n 'type': 'string',\n 'default': EDITOR_DEFAULTS.wordSeparators,\n 'description': nls.localize('wordSeparators', \"Characters that will be used as word separators when doing word related navigations or operations.\")\n },\n 'editor.tabSize': {\n 'type': 'number',\n 'default': EDITOR_MODEL_DEFAULTS.tabSize,\n 'minimum': 1,\n 'description': nls.localize('tabSize', \"The number of spaces a tab is equal to. This setting is overridden based on the file contents when `#editor.detectIndentation#` is on.\"),\n 'errorMessage': nls.localize('tabSize.errorMessage', \"Expected 'number'. Note that the value \\\"auto\\\" has been replaced by the `editor.detectIndentation` setting.\")\n },\n 'editor.insertSpaces': {\n 'type': 'boolean',\n 'default': EDITOR_MODEL_DEFAULTS.insertSpaces,\n 'description': nls.localize('insertSpaces', \"Insert spaces when pressing `Tab`. This setting is overridden based on the file contents when `#editor.detectIndentation#` is on.\"),\n 'errorMessage': nls.localize('insertSpaces.errorMessage', \"Expected 'boolean'. Note that the value \\\"auto\\\" has been replaced by the `editor.detectIndentation` setting.\")\n },\n 'editor.detectIndentation': {\n 'type': 'boolean',\n 'default': EDITOR_MODEL_DEFAULTS.detectIndentation,\n 'description': nls.localize('detectIndentation', \"Controls whether `#editor.tabSize#` and `#editor.insertSpaces#` will be automatically detected when a file is opened based on the file contents.\")\n },\n 'editor.roundedSelection': {\n 'type': 'boolean',\n 'default': EDITOR_DEFAULTS.viewInfo.roundedSelection,\n 'description': nls.localize('roundedSelection', \"Controls whether selections should have rounded corners.\")\n },\n 'editor.scrollBeyondLastLine': {\n 'type': 'boolean',\n 'default': EDITOR_DEFAULTS.viewInfo.scrollBeyondLastLine,\n 'description': nls.localize('scrollBeyondLastLine', \"Controls whether the editor will scroll beyond the last line.\")\n },\n 'editor.scrollBeyondLastColumn': {\n 'type': 'number',\n 'default': EDITOR_DEFAULTS.viewInfo.scrollBeyondLastColumn,\n 'description': nls.localize('scrollBeyondLastColumn', \"Controls the number of extra characters beyond which the editor will scroll horizontally.\")\n },\n 'editor.smoothScrolling': {\n 'type': 'boolean',\n 'default': EDITOR_DEFAULTS.viewInfo.smoothScrolling,\n 'description': nls.localize('smoothScrolling', \"Controls whether the editor will scroll using an animation.\")\n },\n 'editor.minimap.enabled': {\n 'type': 'boolean',\n 'default': EDITOR_DEFAULTS.viewInfo.minimap.enabled,\n 'description': nls.localize('minimap.enabled', \"Controls whether the minimap is shown.\")\n },\n 'editor.minimap.side': {\n 'type': 'string',\n 'enum': ['left', 'right'],\n 'default': EDITOR_DEFAULTS.viewInfo.minimap.side,\n 'description': nls.localize('minimap.side', \"Controls the side where to render the minimap.\")\n },\n 'editor.minimap.showSlider': {\n 'type': 'string',\n 'enum': ['always', 'mouseover'],\n 'default': EDITOR_DEFAULTS.viewInfo.minimap.showSlider,\n 'description': nls.localize('minimap.showSlider', \"Controls whether the minimap slider is automatically hidden.\")\n },\n 'editor.minimap.renderCharacters': {\n 'type': 'boolean',\n 'default': EDITOR_DEFAULTS.viewInfo.minimap.renderCharacters,\n 'description': nls.localize('minimap.renderCharacters', \"Render the actual characters on a line as opposed to color blocks.\")\n },\n 'editor.minimap.maxColumn': {\n 'type': 'number',\n 'default': EDITOR_DEFAULTS.viewInfo.minimap.maxColumn,\n 'description': nls.localize('minimap.maxColumn', \"Limit the width of the minimap to render at most a certain number of columns.\")\n },\n 'editor.hover.enabled': {\n 'type': 'boolean',\n 'default': EDITOR_DEFAULTS.contribInfo.hover.enabled,\n 'description': nls.localize('hover.enabled', \"Controls whether the hover is shown.\")\n },\n 'editor.hover.delay': {\n 'type': 'number',\n 'default': EDITOR_DEFAULTS.contribInfo.hover.delay,\n 'description': nls.localize('hover.delay', \"Time delay in milliseconds after which to the hover is shown.\")\n },\n 'editor.hover.sticky': {\n 'type': 'boolean',\n 'default': EDITOR_DEFAULTS.contribInfo.hover.sticky,\n 'description': nls.localize('hover.sticky', \"Controls whether the hover should remain visible when mouse is moved over it.\")\n },\n 'editor.find.seedSearchStringFromSelection': {\n 'type': 'boolean',\n 'default': EDITOR_DEFAULTS.contribInfo.find.seedSearchStringFromSelection,\n 'description': nls.localize('find.seedSearchStringFromSelection', \"Controls whether the search string in the Find Widget is seeded from the editor selection.\")\n },\n 'editor.find.autoFindInSelection': {\n 'type': 'boolean',\n 'default': EDITOR_DEFAULTS.contribInfo.find.autoFindInSelection,\n 'description': nls.localize('find.autoFindInSelection', \"Controls whether the find operation is carried on selected text or the entire file in the editor.\")\n },\n 'editor.find.globalFindClipboard': {\n 'type': 'boolean',\n 'default': EDITOR_DEFAULTS.contribInfo.find.globalFindClipboard,\n 'description': nls.localize('find.globalFindClipboard', \"Controls whether the Find Widget should read or modify the shared find clipboard on macOS.\"),\n 'included': platform.isMacintosh\n },\n 'editor.wordWrap': {\n 'type': 'string',\n 'enum': ['off', 'on', 'wordWrapColumn', 'bounded'],\n 'enumDescriptions': [\n nls.localize('wordWrap.off', \"Lines will never wrap.\"),\n nls.localize('wordWrap.on', \"Lines will wrap at the viewport width.\"),\n nls.localize({\n key: 'wordWrap.wordWrapColumn',\n comment: [\n '- `editor.wordWrapColumn` refers to a different setting and should not be localized.'\n ]\n }, \"Lines will wrap at `#editor.wordWrapColumn#`.\"),\n nls.localize({\n key: 'wordWrap.bounded',\n comment: [\n '- viewport means the edge of the visible window size.',\n '- `editor.wordWrapColumn` refers to a different setting and should not be localized.'\n ]\n }, \"Lines will wrap at the minimum of viewport and `#editor.wordWrapColumn#`.\"),\n ],\n 'default': EDITOR_DEFAULTS.wordWrap,\n 'description': nls.localize({\n key: 'wordWrap',\n comment: [\n '- \\'off\\', \\'on\\', \\'wordWrapColumn\\' and \\'bounded\\' refer to values the setting can take and should not be localized.',\n '- `editor.wordWrapColumn` refers to a different setting and should not be localized.'\n ]\n }, \"Controls how lines should wrap.\")\n },\n 'editor.wordWrapColumn': {\n 'type': 'integer',\n 'default': EDITOR_DEFAULTS.wordWrapColumn,\n 'minimum': 1,\n 'description': nls.localize({\n key: 'wordWrapColumn',\n comment: [\n '- `editor.wordWrap` refers to a different setting and should not be localized.',\n '- \\'wordWrapColumn\\' and \\'bounded\\' refer to values the different setting can take and should not be localized.'\n ]\n }, \"Controls the wrapping column of the editor when `#editor.wordWrap#` is `wordWrapColumn` or `bounded`.\")\n },\n 'editor.wrappingIndent': {\n 'type': 'string',\n 'enum': ['none', 'same', 'indent', 'deepIndent'],\n enumDescriptions: [\n nls.localize('wrappingIndent.none', \"No indentation. Wrapped lines begin at column 1.\"),\n nls.localize('wrappingIndent.same', \"Wrapped lines get the same indentation as the parent.\"),\n nls.localize('wrappingIndent.indent', \"Wrapped lines get +1 indentation toward the parent.\"),\n nls.localize('wrappingIndent.deepIndent', \"Wrapped lines get +2 indentation toward the parent.\"),\n ],\n 'default': 'same',\n 'description': nls.localize('wrappingIndent', \"Controls the indentation of wrapped lines.\"),\n },\n 'editor.mouseWheelScrollSensitivity': {\n 'type': 'number',\n 'default': EDITOR_DEFAULTS.viewInfo.scrollbar.mouseWheelScrollSensitivity,\n 'description': nls.localize('mouseWheelScrollSensitivity', \"A multiplier to be used on the `deltaX` and `deltaY` of mouse wheel scroll events.\")\n },\n 'editor.multiCursorModifier': {\n 'type': 'string',\n 'enum': ['ctrlCmd', 'alt'],\n 'enumDescriptions': [\n nls.localize('multiCursorModifier.ctrlCmd', \"Maps to `Control` on Windows and Linux and to `Command` on macOS.\"),\n nls.localize('multiCursorModifier.alt', \"Maps to `Alt` on Windows and Linux and to `Option` on macOS.\")\n ],\n 'default': 'alt',\n 'description': nls.localize({\n key: 'multiCursorModifier',\n comment: [\n '- `ctrlCmd` refers to a value the setting can take and should not be localized.',\n '- `Control` and `Command` refer to the modifier keys Ctrl or Cmd on the keyboard and can be localized.'\n ]\n }, \"The modifier to be used to add multiple cursors with the mouse. The Go To Definition and Open Link mouse gestures will adapt such that they do not conflict with the multicursor modifier. [Read more](https://code.visualstudio.com/docs/editor/codebasics#_multicursor-modifier).\")\n },\n 'editor.multiCursorMergeOverlapping': {\n 'type': 'boolean',\n 'default': EDITOR_DEFAULTS.multiCursorMergeOverlapping,\n 'description': nls.localize('multiCursorMergeOverlapping', \"Merge multiple cursors when they are overlapping.\")\n },\n 'editor.quickSuggestions': {\n 'anyOf': [\n {\n type: 'boolean',\n },\n {\n type: 'object',\n properties: {\n strings: {\n type: 'boolean',\n default: false,\n description: nls.localize('quickSuggestions.strings', \"Enable quick suggestions inside strings.\")\n },\n comments: {\n type: 'boolean',\n default: false,\n description: nls.localize('quickSuggestions.comments', \"Enable quick suggestions inside comments.\")\n },\n other: {\n type: 'boolean',\n default: true,\n description: nls.localize('quickSuggestions.other', \"Enable quick suggestions outside of strings and comments.\")\n },\n }\n }\n ],\n 'default': EDITOR_DEFAULTS.contribInfo.quickSuggestions,\n 'description': nls.localize('quickSuggestions', \"Controls whether suggestions should automatically show up while typing.\")\n },\n 'editor.quickSuggestionsDelay': {\n 'type': 'integer',\n 'default': EDITOR_DEFAULTS.contribInfo.quickSuggestionsDelay,\n 'minimum': 0,\n 'description': nls.localize('quickSuggestionsDelay', \"Controls the delay in milliseconds after which quick suggestions will show up.\")\n },\n 'editor.parameterHints': {\n 'type': 'boolean',\n 'default': EDITOR_DEFAULTS.contribInfo.parameterHints,\n 'description': nls.localize('parameterHints', \"Enables a pop-up that shows parameter documentation and type information as you type.\")\n },\n 'editor.autoClosingBrackets': {\n 'type': 'boolean',\n 'default': EDITOR_DEFAULTS.autoClosingBrackets,\n 'description': nls.localize('autoClosingBrackets', \"Controls whether the editor should automatically close brackets after the user adds an opening bracket.\")\n },\n 'editor.formatOnType': {\n 'type': 'boolean',\n 'default': EDITOR_DEFAULTS.contribInfo.formatOnType,\n 'description': nls.localize('formatOnType', \"Controls whether the editor should automatically format the line after typing.\")\n },\n 'editor.formatOnPaste': {\n 'type': 'boolean',\n 'default': EDITOR_DEFAULTS.contribInfo.formatOnPaste,\n 'description': nls.localize('formatOnPaste', \"Controls whether the editor should automatically format the pasted content. A formatter must be available and the formatter should be able to format a range in a document.\")\n },\n 'editor.autoIndent': {\n 'type': 'boolean',\n 'default': EDITOR_DEFAULTS.autoIndent,\n 'description': nls.localize('autoIndent', \"Controls whether the editor should automatically adjust the indentation when users type, paste or move lines. Extensions with indentation rules of the language must be available.\")\n },\n 'editor.suggestOnTriggerCharacters': {\n 'type': 'boolean',\n 'default': EDITOR_DEFAULTS.contribInfo.suggestOnTriggerCharacters,\n 'description': nls.localize('suggestOnTriggerCharacters', \"Controls whether suggestions should automatically show up when typing trigger characters.\")\n },\n 'editor.acceptSuggestionOnEnter': {\n 'type': 'string',\n 'enum': ['on', 'smart', 'off'],\n 'default': EDITOR_DEFAULTS.contribInfo.acceptSuggestionOnEnter,\n 'enumDescriptions': [\n '',\n nls.localize('acceptSuggestionOnEnterSmart', \"Only accept a suggestion with `Enter` when it makes a textual change.\"),\n ''\n ],\n 'description': nls.localize('acceptSuggestionOnEnter', \"Controls whether suggestions should be accepted on `Enter`, in addition to `Tab`. Helps to avoid ambiguity between inserting new lines or accepting suggestions.\")\n },\n 'editor.acceptSuggestionOnCommitCharacter': {\n 'type': 'boolean',\n 'default': EDITOR_DEFAULTS.contribInfo.acceptSuggestionOnCommitCharacter,\n 'description': nls.localize('acceptSuggestionOnCommitCharacter', \"Controls whether suggestions should be accepted on commit characters. For example, in JavaScript, the semi-colon (`;`) can be a commit character that accepts a suggestion and types that character.\")\n },\n 'editor.snippetSuggestions': {\n 'type': 'string',\n 'enum': ['top', 'bottom', 'inline', 'none'],\n 'enumDescriptions': [\n nls.localize('snippetSuggestions.top', \"Show snippet suggestions on top of other suggestions.\"),\n nls.localize('snippetSuggestions.bottom', \"Show snippet suggestions below other suggestions.\"),\n nls.localize('snippetSuggestions.inline', \"Show snippets suggestions with other suggestions.\"),\n nls.localize('snippetSuggestions.none', \"Do not show snippet suggestions.\"),\n ],\n 'default': EDITOR_DEFAULTS.contribInfo.suggest.snippets,\n 'description': nls.localize('snippetSuggestions', \"Controls whether snippets are shown with other suggestions and how they are sorted.\")\n },\n 'editor.emptySelectionClipboard': {\n 'type': 'boolean',\n 'default': EDITOR_DEFAULTS.emptySelectionClipboard,\n 'description': nls.localize('emptySelectionClipboard', \"Controls whether copying without a selection copies the current line.\")\n },\n 'editor.wordBasedSuggestions': {\n 'type': 'boolean',\n 'default': EDITOR_DEFAULTS.contribInfo.wordBasedSuggestions,\n 'description': nls.localize('wordBasedSuggestions', \"Controls whether completions should be computed based on words in the document.\")\n },\n 'editor.suggestSelection': {\n 'type': 'string',\n 'enum': ['first', 'recentlyUsed', 'recentlyUsedByPrefix'],\n 'enumDescriptions': [\n nls.localize('suggestSelection.first', \"Always select the first suggestion.\"),\n nls.localize('suggestSelection.recentlyUsed', \"Select recent suggestions unless further typing selects one, e.g. `console.| -> console.log` because `log` has been completed recently.\"),\n nls.localize('suggestSelection.recentlyUsedByPrefix', \"Select suggestions based on previous prefixes that have completed those suggestions, e.g. `co -> console` and `con -> const`.\"),\n ],\n 'default': 'recentlyUsed',\n 'description': nls.localize('suggestSelection', \"Controls how suggestions are pre-selected when showing the suggest list.\")\n },\n 'editor.suggestFontSize': {\n 'type': 'integer',\n 'default': 0,\n 'minimum': 0,\n 'description': nls.localize('suggestFontSize', \"Font size for the suggest widget.\")\n },\n 'editor.suggestLineHeight': {\n 'type': 'integer',\n 'default': 0,\n 'minimum': 0,\n 'description': nls.localize('suggestLineHeight', \"Line height for the suggest widget.\")\n },\n 'editor.suggest.filterGraceful': {\n type: 'boolean',\n default: true,\n description: nls.localize('suggest.filterGraceful', \"Controls whether filtering and sorting suggestions accounts for small typos.\")\n },\n 'editor.suggest.snippetsPreventQuickSuggestions': {\n type: 'boolean',\n default: true,\n description: nls.localize('suggest.snippetsPreventQuickSuggestions', \"Control whether an active snippet prevents quick suggestions.\")\n },\n 'editor.selectionHighlight': {\n 'type': 'boolean',\n 'default': EDITOR_DEFAULTS.contribInfo.selectionHighlight,\n 'description': nls.localize('selectionHighlight', \"Controls whether the editor should highlight matches similar to the selection\")\n },\n 'editor.occurrencesHighlight': {\n 'type': 'boolean',\n 'default': EDITOR_DEFAULTS.contribInfo.occurrencesHighlight,\n 'description': nls.localize('occurrencesHighlight', \"Controls whether the editor should highlight semantic symbol occurrences.\")\n },\n 'editor.overviewRulerLanes': {\n 'type': 'integer',\n 'default': 3,\n 'description': nls.localize('overviewRulerLanes', \"Controls the number of decorations that can show up at the same position in the overview ruler.\")\n },\n 'editor.overviewRulerBorder': {\n 'type': 'boolean',\n 'default': EDITOR_DEFAULTS.viewInfo.overviewRulerBorder,\n 'description': nls.localize('overviewRulerBorder', \"Controls whether a border should be drawn around the overview ruler.\")\n },\n 'editor.cursorBlinking': {\n 'type': 'string',\n 'enum': ['blink', 'smooth', 'phase', 'expand', 'solid'],\n 'default': editorOptions.blinkingStyleToString(EDITOR_DEFAULTS.viewInfo.cursorBlinking),\n 'description': nls.localize('cursorBlinking', \"Control the cursor animation style.\")\n },\n 'editor.mouseWheelZoom': {\n 'type': 'boolean',\n 'default': EDITOR_DEFAULTS.viewInfo.mouseWheelZoom,\n 'description': nls.localize('mouseWheelZoom', \"Zoom the font of the editor when using mouse wheel and holding `Ctrl`.\")\n },\n 'editor.cursorStyle': {\n 'type': 'string',\n 'enum': ['block', 'block-outline', 'line', 'line-thin', 'underline', 'underline-thin'],\n 'default': editorOptions.cursorStyleToString(EDITOR_DEFAULTS.viewInfo.cursorStyle),\n 'description': nls.localize('cursorStyle', \"Controls the cursor style.\")\n },\n 'editor.cursorWidth': {\n 'type': 'integer',\n 'default': EDITOR_DEFAULTS.viewInfo.cursorWidth,\n 'description': nls.localize('cursorWidth', \"Controls the width of the cursor when `#editor.cursorStyle#` is set to `line`.\")\n },\n 'editor.fontLigatures': {\n 'type': 'boolean',\n 'default': EDITOR_DEFAULTS.viewInfo.fontLigatures,\n 'description': nls.localize('fontLigatures', \"Enables/Disables font ligatures.\")\n },\n 'editor.hideCursorInOverviewRuler': {\n 'type': 'boolean',\n 'default': EDITOR_DEFAULTS.viewInfo.hideCursorInOverviewRuler,\n 'description': nls.localize('hideCursorInOverviewRuler', \"Controls whether the cursor should be hidden in the overview ruler.\")\n },\n 'editor.renderWhitespace': {\n 'type': 'string',\n 'enum': ['none', 'boundary', 'all'],\n 'enumDescriptions': [\n '',\n nls.localize('renderWhiteSpace.boundary', \"Render whitespace characters except for single spaces between words.\"),\n ''\n ],\n default: EDITOR_DEFAULTS.viewInfo.renderWhitespace,\n description: nls.localize('renderWhitespace', \"Controls how the editor should render whitespace characters.\")\n },\n 'editor.renderControlCharacters': {\n 'type': 'boolean',\n default: EDITOR_DEFAULTS.viewInfo.renderControlCharacters,\n description: nls.localize('renderControlCharacters', \"Controls whether the editor should render control characters.\")\n },\n 'editor.renderIndentGuides': {\n 'type': 'boolean',\n default: EDITOR_DEFAULTS.viewInfo.renderIndentGuides,\n description: nls.localize('renderIndentGuides', \"Controls whether the editor should render indent guides.\")\n },\n 'editor.highlightActiveIndentGuide': {\n 'type': 'boolean',\n default: EDITOR_DEFAULTS.viewInfo.highlightActiveIndentGuide,\n description: nls.localize('highlightActiveIndentGuide', \"Controls whether the editor should highlight the active indent guide.\")\n },\n 'editor.renderLineHighlight': {\n 'type': 'string',\n 'enum': ['none', 'gutter', 'line', 'all'],\n 'enumDescriptions': [\n '',\n '',\n '',\n nls.localize('renderLineHighlight.all', \"Highlights both the gutter and the current line.\"),\n ],\n default: EDITOR_DEFAULTS.viewInfo.renderLineHighlight,\n description: nls.localize('renderLineHighlight', \"Controls how the editor should render the current line highlight.\")\n },\n 'editor.codeLens': {\n 'type': 'boolean',\n 'default': EDITOR_DEFAULTS.contribInfo.codeLens,\n 'description': nls.localize('codeLens', \"Controls whether the editor shows CodeLens\")\n },\n 'editor.folding': {\n 'type': 'boolean',\n 'default': EDITOR_DEFAULTS.contribInfo.folding,\n 'description': nls.localize('folding', \"Controls whether the editor has code folding enabled\")\n },\n 'editor.foldingStrategy': {\n 'type': 'string',\n 'enum': ['auto', 'indentation'],\n 'default': EDITOR_DEFAULTS.contribInfo.foldingStrategy,\n 'description': nls.localize('foldingStrategy', \"Controls the strategy for computing folding ranges. `auto` uses a language specific folding strategy, if available. `indentation` uses the indentation based folding strategy.\")\n },\n 'editor.showFoldingControls': {\n 'type': 'string',\n 'enum': ['always', 'mouseover'],\n 'default': EDITOR_DEFAULTS.contribInfo.showFoldingControls,\n 'description': nls.localize('showFoldingControls', \"Controls whether the fold controls on the gutter are automatically hidden.\")\n },\n 'editor.matchBrackets': {\n 'type': 'boolean',\n 'default': EDITOR_DEFAULTS.contribInfo.matchBrackets,\n 'description': nls.localize('matchBrackets', \"Highlight matching brackets when one of them is selected.\")\n },\n 'editor.glyphMargin': {\n 'type': 'boolean',\n 'default': EDITOR_DEFAULTS.viewInfo.glyphMargin,\n 'description': nls.localize('glyphMargin', \"Controls whether the editor should render the vertical glyph margin. Glyph margin is mostly used for debugging.\")\n },\n 'editor.useTabStops': {\n 'type': 'boolean',\n 'default': EDITOR_DEFAULTS.useTabStops,\n 'description': nls.localize('useTabStops', \"Inserting and deleting whitespace follows tab stops.\")\n },\n 'editor.trimAutoWhitespace': {\n 'type': 'boolean',\n 'default': EDITOR_MODEL_DEFAULTS.trimAutoWhitespace,\n 'description': nls.localize('trimAutoWhitespace', \"Remove trailing auto inserted whitespace.\")\n },\n 'editor.stablePeek': {\n 'type': 'boolean',\n 'default': false,\n 'description': nls.localize('stablePeek', \"Keep peek editors open even when double clicking their content or when hitting `Escape`.\")\n },\n 'editor.dragAndDrop': {\n 'type': 'boolean',\n 'default': EDITOR_DEFAULTS.dragAndDrop,\n 'description': nls.localize('dragAndDrop', \"Controls whether the editor should allow moving selections via drag and drop.\")\n },\n 'editor.accessibilitySupport': {\n 'type': 'string',\n 'enum': ['auto', 'on', 'off'],\n 'enumDescriptions': [\n nls.localize('accessibilitySupport.auto', \"The editor will use platform APIs to detect when a Screen Reader is attached.\"),\n nls.localize('accessibilitySupport.on', \"The editor will be permanently optimized for usage with a Screen Reader.\"),\n nls.localize('accessibilitySupport.off', \"The editor will never be optimized for usage with a Screen Reader.\"),\n ],\n 'default': EDITOR_DEFAULTS.accessibilitySupport,\n 'description': nls.localize('accessibilitySupport', \"Controls whether the editor should run in a mode where it is optimized for screen readers.\")\n },\n 'editor.showUnused': {\n 'type': 'boolean',\n 'default': EDITOR_DEFAULTS.showUnused,\n 'description': nls.localize('showUnused', \"Controls fading out of unused code.\")\n },\n 'editor.links': {\n 'type': 'boolean',\n 'default': EDITOR_DEFAULTS.contribInfo.links,\n 'description': nls.localize('links', \"Controls whether the editor should detect links and make them clickable.\")\n },\n 'editor.colorDecorators': {\n 'type': 'boolean',\n 'default': EDITOR_DEFAULTS.contribInfo.colorDecorators,\n 'description': nls.localize('colorDecorators', \"Controls whether the editor should render the inline color decorators and color picker.\")\n },\n 'editor.lightbulb.enabled': {\n 'type': 'boolean',\n 'default': EDITOR_DEFAULTS.contribInfo.lightbulbEnabled,\n 'description': nls.localize('codeActions', \"Enables the code action lightbulb in the editor.\")\n },\n 'editor.codeActionsOnSave': {\n 'type': 'object',\n 'properties': {\n 'source.organizeImports': {\n 'type': 'boolean',\n 'description': nls.localize('codeActionsOnSave.organizeImports', \"Controls whether organize imports action should be run on file save.\")\n }\n },\n 'additionalProperties': {\n 'type': 'boolean'\n },\n 'default': EDITOR_DEFAULTS.contribInfo.codeActionsOnSave,\n 'description': nls.localize('codeActionsOnSave', \"Code action kinds to be run on save.\")\n },\n 'editor.codeActionsOnSaveTimeout': {\n 'type': 'number',\n 'default': EDITOR_DEFAULTS.contribInfo.codeActionsOnSaveTimeout,\n 'description': nls.localize('codeActionsOnSaveTimeout', \"Timeout in milliseconds after which the code actions that are run on save are cancelled.\")\n },\n 'editor.selectionClipboard': {\n 'type': 'boolean',\n 'default': EDITOR_DEFAULTS.contribInfo.selectionClipboard,\n 'description': nls.localize('selectionClipboard', \"Controls whether the Linux primary clipboard should be supported.\"),\n 'included': platform.isLinux\n },\n 'diffEditor.renderSideBySide': {\n 'type': 'boolean',\n 'default': true,\n 'description': nls.localize('sideBySide', \"Controls whether the diff editor shows the diff side by side or inline.\")\n },\n 'diffEditor.ignoreTrimWhitespace': {\n 'type': 'boolean',\n 'default': true,\n 'description': nls.localize('ignoreTrimWhitespace', \"Controls whether the diff editor shows changes in leading or trailing whitespace as diffs.\")\n },\n 'editor.largeFileOptimizations': {\n 'type': 'boolean',\n 'default': EDITOR_MODEL_DEFAULTS.largeFileOptimizations,\n 'description': nls.localize('largeFileOptimizations', \"Special handling for large files to disable certain memory intensive features.\")\n },\n 'diffEditor.renderIndicators': {\n 'type': 'boolean',\n 'default': true,\n 'description': nls.localize('renderIndicators', \"Controls whether the diff editor shows +/- indicators for added/removed changes.\")\n }\n }\n};\nvar cachedEditorConfigurationKeys = null;\nfunction getEditorConfigurationKeys() {\n if (cachedEditorConfigurationKeys === null) {\n cachedEditorConfigurationKeys = Object.create(null);\n Object.keys(editorConfiguration.properties).forEach(function (prop) {\n cachedEditorConfigurationKeys[prop] = true;\n });\n }\n return cachedEditorConfigurationKeys;\n}\nexport function isEditorConfigurationKey(key) {\n var editorConfigurationKeys = getEditorConfigurationKeys();\n return (editorConfigurationKeys[\"editor.\" + key] || false);\n}\nexport function isDiffEditorConfigurationKey(key) {\n var editorConfigurationKeys = getEditorConfigurationKeys();\n return (editorConfigurationKeys[\"diffEditor.\" + key] || false);\n}\nconfigurationRegistry.registerConfiguration(editorConfiguration);\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { Disposable } from '../../../base/common/lifecycle';\nvar ElementSizeObserver = /** @class */ (function (_super) {\n __extends(ElementSizeObserver, _super);\n function ElementSizeObserver(referenceDomElement, changeCallback) {\n var _this = _super.call(this) || this;\n _this.referenceDomElement = referenceDomElement;\n _this.changeCallback = changeCallback;\n _this.measureReferenceDomElementToken = -1;\n _this.width = -1;\n _this.height = -1;\n _this.measureReferenceDomElement(false);\n return _this;\n }\n ElementSizeObserver.prototype.dispose = function () {\n this.stopObserving();\n _super.prototype.dispose.call(this);\n };\n ElementSizeObserver.prototype.getWidth = function () {\n return this.width;\n };\n ElementSizeObserver.prototype.getHeight = function () {\n return this.height;\n };\n ElementSizeObserver.prototype.startObserving = function () {\n var _this = this;\n if (this.measureReferenceDomElementToken === -1) {\n this.measureReferenceDomElementToken = setInterval(function () { return _this.measureReferenceDomElement(true); }, 100);\n }\n };\n ElementSizeObserver.prototype.stopObserving = function () {\n if (this.measureReferenceDomElementToken !== -1) {\n clearInterval(this.measureReferenceDomElementToken);\n this.measureReferenceDomElementToken = -1;\n }\n };\n ElementSizeObserver.prototype.observe = function (dimension) {\n this.measureReferenceDomElement(true, dimension);\n };\n ElementSizeObserver.prototype.measureReferenceDomElement = function (callChangeCallback, dimension) {\n var observedWidth = 0;\n var observedHeight = 0;\n if (dimension) {\n observedWidth = dimension.width;\n observedHeight = dimension.height;\n }\n else if (this.referenceDomElement) {\n observedWidth = this.referenceDomElement.clientWidth;\n observedHeight = this.referenceDomElement.clientHeight;\n }\n observedWidth = Math.max(5, observedWidth);\n observedHeight = Math.max(5, observedHeight);\n if (this.width !== observedWidth || this.height !== observedHeight) {\n this.width = observedWidth;\n this.height = observedHeight;\n if (callChangeCallback) {\n this.changeCallback();\n }\n }\n };\n return ElementSizeObserver;\n}(Disposable));\nexport { ElementSizeObserver };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar CharWidthRequest = /** @class */ (function () {\n function CharWidthRequest(chr, type) {\n this.chr = chr;\n this.type = type;\n this.width = 0;\n }\n CharWidthRequest.prototype.fulfill = function (width) {\n this.width = width;\n };\n return CharWidthRequest;\n}());\nexport { CharWidthRequest };\nvar DomCharWidthReader = /** @class */ (function () {\n function DomCharWidthReader(bareFontInfo, requests) {\n this._bareFontInfo = bareFontInfo;\n this._requests = requests;\n this._container = null;\n this._testElements = null;\n }\n DomCharWidthReader.prototype.read = function () {\n // Create a test container with all these test elements\n this._createDomElements();\n // Add the container to the DOM\n document.body.appendChild(this._container);\n // Read character widths\n this._readFromDomElements();\n // Remove the container from the DOM\n document.body.removeChild(this._container);\n this._container = null;\n this._testElements = null;\n };\n DomCharWidthReader.prototype._createDomElements = function () {\n var container = document.createElement('div');\n container.style.position = 'absolute';\n container.style.top = '-50000px';\n container.style.width = '50000px';\n var regularDomNode = document.createElement('div');\n regularDomNode.style.fontFamily = this._bareFontInfo.fontFamily;\n regularDomNode.style.fontWeight = this._bareFontInfo.fontWeight;\n regularDomNode.style.fontSize = this._bareFontInfo.fontSize + 'px';\n regularDomNode.style.lineHeight = this._bareFontInfo.lineHeight + 'px';\n regularDomNode.style.letterSpacing = this._bareFontInfo.letterSpacing + 'px';\n container.appendChild(regularDomNode);\n var boldDomNode = document.createElement('div');\n boldDomNode.style.fontFamily = this._bareFontInfo.fontFamily;\n boldDomNode.style.fontWeight = 'bold';\n boldDomNode.style.fontSize = this._bareFontInfo.fontSize + 'px';\n boldDomNode.style.lineHeight = this._bareFontInfo.lineHeight + 'px';\n boldDomNode.style.letterSpacing = this._bareFontInfo.letterSpacing + 'px';\n container.appendChild(boldDomNode);\n var italicDomNode = document.createElement('div');\n italicDomNode.style.fontFamily = this._bareFontInfo.fontFamily;\n italicDomNode.style.fontWeight = this._bareFontInfo.fontWeight;\n italicDomNode.style.fontSize = this._bareFontInfo.fontSize + 'px';\n italicDomNode.style.lineHeight = this._bareFontInfo.lineHeight + 'px';\n italicDomNode.style.letterSpacing = this._bareFontInfo.letterSpacing + 'px';\n italicDomNode.style.fontStyle = 'italic';\n container.appendChild(italicDomNode);\n var testElements = [];\n for (var i = 0, len = this._requests.length; i < len; i++) {\n var request = this._requests[i];\n var parent_1 = void 0;\n if (request.type === 0 /* Regular */) {\n parent_1 = regularDomNode;\n }\n if (request.type === 2 /* Bold */) {\n parent_1 = boldDomNode;\n }\n if (request.type === 1 /* Italic */) {\n parent_1 = italicDomNode;\n }\n parent_1.appendChild(document.createElement('br'));\n var testElement = document.createElement('span');\n DomCharWidthReader._render(testElement, request);\n parent_1.appendChild(testElement);\n testElements[i] = testElement;\n }\n this._container = container;\n this._testElements = testElements;\n };\n DomCharWidthReader._render = function (testElement, request) {\n if (request.chr === ' ') {\n var htmlString = ' ';\n // Repeat character 256 (2^8) times\n for (var i = 0; i < 8; i++) {\n htmlString += htmlString;\n }\n testElement.innerHTML = htmlString;\n }\n else {\n var testString = request.chr;\n // Repeat character 256 (2^8) times\n for (var i = 0; i < 8; i++) {\n testString += testString;\n }\n testElement.textContent = testString;\n }\n };\n DomCharWidthReader.prototype._readFromDomElements = function () {\n for (var i = 0, len = this._requests.length; i < len; i++) {\n var request = this._requests[i];\n var testElement = this._testElements[i];\n request.fulfill(testElement.offsetWidth / 256);\n }\n };\n return DomCharWidthReader;\n}());\nexport function readCharWidths(bareFontInfo, requests) {\n var reader = new DomCharWidthReader(bareFontInfo, requests);\n reader.read();\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { Emitter } from '../../../base/common/event';\nimport { Disposable } from '../../../base/common/lifecycle';\nimport * as platform from '../../../base/common/platform';\nimport * as browser from '../../../base/browser/browser';\nimport { CommonEditorConfiguration } from '../../common/config/commonEditorConfig';\nimport { FontInfo } from '../../common/config/fontInfo';\nimport { ElementSizeObserver } from './elementSizeObserver';\nimport { CharWidthRequest, readCharWidths } from './charWidthReader';\nvar CSSBasedConfigurationCache = /** @class */ (function () {\n function CSSBasedConfigurationCache() {\n this._keys = Object.create(null);\n this._values = Object.create(null);\n }\n CSSBasedConfigurationCache.prototype.has = function (item) {\n var itemId = item.getId();\n return !!this._values[itemId];\n };\n CSSBasedConfigurationCache.prototype.get = function (item) {\n var itemId = item.getId();\n return this._values[itemId];\n };\n CSSBasedConfigurationCache.prototype.put = function (item, value) {\n var itemId = item.getId();\n this._keys[itemId] = item;\n this._values[itemId] = value;\n };\n CSSBasedConfigurationCache.prototype.remove = function (item) {\n var itemId = item.getId();\n delete this._keys[itemId];\n delete this._values[itemId];\n };\n CSSBasedConfigurationCache.prototype.getValues = function () {\n var _this = this;\n return Object.keys(this._keys).map(function (id) { return _this._values[id]; });\n };\n return CSSBasedConfigurationCache;\n}());\nvar CSSBasedConfiguration = /** @class */ (function (_super) {\n __extends(CSSBasedConfiguration, _super);\n function CSSBasedConfiguration() {\n var _this = _super.call(this) || this;\n _this._onDidChange = _this._register(new Emitter());\n _this.onDidChange = _this._onDidChange.event;\n _this._cache = new CSSBasedConfigurationCache();\n _this._evictUntrustedReadingsTimeout = -1;\n return _this;\n }\n CSSBasedConfiguration.prototype.dispose = function () {\n if (this._evictUntrustedReadingsTimeout !== -1) {\n clearTimeout(this._evictUntrustedReadingsTimeout);\n this._evictUntrustedReadingsTimeout = -1;\n }\n _super.prototype.dispose.call(this);\n };\n CSSBasedConfiguration.prototype._writeToCache = function (item, value) {\n var _this = this;\n this._cache.put(item, value);\n if (!value.isTrusted && this._evictUntrustedReadingsTimeout === -1) {\n // Try reading again after some time\n this._evictUntrustedReadingsTimeout = setTimeout(function () {\n _this._evictUntrustedReadingsTimeout = -1;\n _this._evictUntrustedReadings();\n }, 5000);\n }\n };\n CSSBasedConfiguration.prototype._evictUntrustedReadings = function () {\n var values = this._cache.getValues();\n var somethingRemoved = false;\n for (var i = 0, len = values.length; i < len; i++) {\n var item = values[i];\n if (!item.isTrusted) {\n somethingRemoved = true;\n this._cache.remove(item);\n }\n }\n if (somethingRemoved) {\n this._onDidChange.fire();\n }\n };\n CSSBasedConfiguration.prototype.readConfiguration = function (bareFontInfo) {\n if (!this._cache.has(bareFontInfo)) {\n var readConfig = CSSBasedConfiguration._actualReadConfiguration(bareFontInfo);\n if (readConfig.typicalHalfwidthCharacterWidth <= 2 || readConfig.typicalFullwidthCharacterWidth <= 2 || readConfig.spaceWidth <= 2 || readConfig.maxDigitWidth <= 2) {\n // Hey, it's Bug 14341 ... we couldn't read\n readConfig = new FontInfo({\n zoomLevel: browser.getZoomLevel(),\n fontFamily: readConfig.fontFamily,\n fontWeight: readConfig.fontWeight,\n fontSize: readConfig.fontSize,\n lineHeight: readConfig.lineHeight,\n letterSpacing: readConfig.letterSpacing,\n isMonospace: readConfig.isMonospace,\n typicalHalfwidthCharacterWidth: Math.max(readConfig.typicalHalfwidthCharacterWidth, 5),\n typicalFullwidthCharacterWidth: Math.max(readConfig.typicalFullwidthCharacterWidth, 5),\n spaceWidth: Math.max(readConfig.spaceWidth, 5),\n maxDigitWidth: Math.max(readConfig.maxDigitWidth, 5),\n }, false);\n }\n this._writeToCache(bareFontInfo, readConfig);\n }\n return this._cache.get(bareFontInfo);\n };\n CSSBasedConfiguration.createRequest = function (chr, type, all, monospace) {\n var result = new CharWidthRequest(chr, type);\n all.push(result);\n if (monospace) {\n monospace.push(result);\n }\n return result;\n };\n CSSBasedConfiguration._actualReadConfiguration = function (bareFontInfo) {\n var all = [];\n var monospace = [];\n var typicalHalfwidthCharacter = this.createRequest('n', 0 /* Regular */, all, monospace);\n var typicalFullwidthCharacter = this.createRequest('\\uff4d', 0 /* Regular */, all, null);\n var space = this.createRequest(' ', 0 /* Regular */, all, monospace);\n var digit0 = this.createRequest('0', 0 /* Regular */, all, monospace);\n var digit1 = this.createRequest('1', 0 /* Regular */, all, monospace);\n var digit2 = this.createRequest('2', 0 /* Regular */, all, monospace);\n var digit3 = this.createRequest('3', 0 /* Regular */, all, monospace);\n var digit4 = this.createRequest('4', 0 /* Regular */, all, monospace);\n var digit5 = this.createRequest('5', 0 /* Regular */, all, monospace);\n var digit6 = this.createRequest('6', 0 /* Regular */, all, monospace);\n var digit7 = this.createRequest('7', 0 /* Regular */, all, monospace);\n var digit8 = this.createRequest('8', 0 /* Regular */, all, monospace);\n var digit9 = this.createRequest('9', 0 /* Regular */, all, monospace);\n // monospace test: used for whitespace rendering\n this.createRequest('→', 0 /* Regular */, all, monospace);\n this.createRequest('·', 0 /* Regular */, all, monospace);\n // monospace test: some characters\n this.createRequest('|', 0 /* Regular */, all, monospace);\n this.createRequest('/', 0 /* Regular */, all, monospace);\n this.createRequest('-', 0 /* Regular */, all, monospace);\n this.createRequest('_', 0 /* Regular */, all, monospace);\n this.createRequest('i', 0 /* Regular */, all, monospace);\n this.createRequest('l', 0 /* Regular */, all, monospace);\n this.createRequest('m', 0 /* Regular */, all, monospace);\n // monospace italic test\n this.createRequest('|', 1 /* Italic */, all, monospace);\n this.createRequest('_', 1 /* Italic */, all, monospace);\n this.createRequest('i', 1 /* Italic */, all, monospace);\n this.createRequest('l', 1 /* Italic */, all, monospace);\n this.createRequest('m', 1 /* Italic */, all, monospace);\n this.createRequest('n', 1 /* Italic */, all, monospace);\n // monospace bold test\n this.createRequest('|', 2 /* Bold */, all, monospace);\n this.createRequest('_', 2 /* Bold */, all, monospace);\n this.createRequest('i', 2 /* Bold */, all, monospace);\n this.createRequest('l', 2 /* Bold */, all, monospace);\n this.createRequest('m', 2 /* Bold */, all, monospace);\n this.createRequest('n', 2 /* Bold */, all, monospace);\n readCharWidths(bareFontInfo, all);\n var maxDigitWidth = Math.max(digit0.width, digit1.width, digit2.width, digit3.width, digit4.width, digit5.width, digit6.width, digit7.width, digit8.width, digit9.width);\n var isMonospace = true;\n var referenceWidth = monospace[0].width;\n for (var i = 1, len = monospace.length; i < len; i++) {\n var diff = referenceWidth - monospace[i].width;\n if (diff < -0.001 || diff > 0.001) {\n isMonospace = false;\n break;\n }\n }\n // let's trust the zoom level only 2s after it was changed.\n var canTrustBrowserZoomLevel = (browser.getTimeSinceLastZoomLevelChanged() > 2000);\n return new FontInfo({\n zoomLevel: browser.getZoomLevel(),\n fontFamily: bareFontInfo.fontFamily,\n fontWeight: bareFontInfo.fontWeight,\n fontSize: bareFontInfo.fontSize,\n lineHeight: bareFontInfo.lineHeight,\n letterSpacing: bareFontInfo.letterSpacing,\n isMonospace: isMonospace,\n typicalHalfwidthCharacterWidth: typicalHalfwidthCharacter.width,\n typicalFullwidthCharacterWidth: typicalFullwidthCharacter.width,\n spaceWidth: space.width,\n maxDigitWidth: maxDigitWidth\n }, canTrustBrowserZoomLevel);\n };\n CSSBasedConfiguration.INSTANCE = new CSSBasedConfiguration();\n return CSSBasedConfiguration;\n}(Disposable));\nvar Configuration = /** @class */ (function (_super) {\n __extends(Configuration, _super);\n function Configuration(options, referenceDomElement) {\n if (referenceDomElement === void 0) { referenceDomElement = null; }\n var _this = _super.call(this, options) || this;\n _this._elementSizeObserver = _this._register(new ElementSizeObserver(referenceDomElement, function () { return _this._onReferenceDomElementSizeChanged(); }));\n _this._register(CSSBasedConfiguration.INSTANCE.onDidChange(function () { return _this._onCSSBasedConfigurationChanged(); }));\n if (_this._validatedOptions.automaticLayout) {\n _this._elementSizeObserver.startObserving();\n }\n _this._register(browser.onDidChangeZoomLevel(function (_) { return _this._recomputeOptions(); }));\n _this._register(browser.onDidChangeAccessibilitySupport(function () { return _this._recomputeOptions(); }));\n _this._recomputeOptions();\n return _this;\n }\n Configuration._massageFontFamily = function (fontFamily) {\n if (/[,\"']/.test(fontFamily)) {\n // Looks like the font family might be already escaped\n return fontFamily;\n }\n if (/[+ ]/.test(fontFamily)) {\n // Wrap a font family using + or with quotes\n return \"\\\"\" + fontFamily + \"\\\"\";\n }\n return fontFamily;\n };\n Configuration.applyFontInfoSlow = function (domNode, fontInfo) {\n domNode.style.fontFamily = Configuration._massageFontFamily(fontInfo.fontFamily);\n domNode.style.fontWeight = fontInfo.fontWeight;\n domNode.style.fontSize = fontInfo.fontSize + 'px';\n domNode.style.lineHeight = fontInfo.lineHeight + 'px';\n domNode.style.letterSpacing = fontInfo.letterSpacing + 'px';\n };\n Configuration.applyFontInfo = function (domNode, fontInfo) {\n domNode.setFontFamily(Configuration._massageFontFamily(fontInfo.fontFamily));\n domNode.setFontWeight(fontInfo.fontWeight);\n domNode.setFontSize(fontInfo.fontSize);\n domNode.setLineHeight(fontInfo.lineHeight);\n domNode.setLetterSpacing(fontInfo.letterSpacing);\n };\n Configuration.prototype._onReferenceDomElementSizeChanged = function () {\n this._recomputeOptions();\n };\n Configuration.prototype._onCSSBasedConfigurationChanged = function () {\n this._recomputeOptions();\n };\n Configuration.prototype.observeReferenceElement = function (dimension) {\n this._elementSizeObserver.observe(dimension);\n };\n Configuration.prototype.dispose = function () {\n _super.prototype.dispose.call(this);\n };\n Configuration.prototype._getExtraEditorClassName = function () {\n var extra = '';\n if (browser.isIE) {\n extra += 'ie ';\n }\n else if (browser.isFirefox) {\n extra += 'ff ';\n }\n else if (browser.isEdge) {\n extra += 'edge ';\n }\n else if (browser.isSafari) {\n extra += 'safari ';\n }\n if (platform.isMacintosh) {\n extra += 'mac ';\n }\n return extra;\n };\n Configuration.prototype._getEnvConfiguration = function () {\n return {\n extraEditorClassName: this._getExtraEditorClassName(),\n outerWidth: this._elementSizeObserver.getWidth(),\n outerHeight: this._elementSizeObserver.getHeight(),\n emptySelectionClipboard: browser.isWebKit || browser.isFirefox,\n pixelRatio: browser.getPixelRatio(),\n zoomLevel: browser.getZoomLevel(),\n accessibilitySupport: browser.getAccessibilitySupport()\n };\n };\n Configuration.prototype.readConfiguration = function (bareFontInfo) {\n return CSSBasedConfiguration.INSTANCE.readConfiguration(bareFontInfo);\n };\n return Configuration;\n}(CommonEditorConfiguration));\nexport { Configuration };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport { SingleCursorState, CursorState } from './cursorCommon';\nimport { Position } from '../core/position';\nimport { Range } from '../core/range';\nimport { Selection, SelectionDirection } from '../core/selection';\nimport { TrackedRangeStickiness } from '../model';\nvar OneCursor = /** @class */ (function () {\n function OneCursor(context) {\n this.modelState = null;\n this.viewState = null;\n this._selTrackedRange = null;\n this._trackSelection = true;\n this._setState(context, new SingleCursorState(new Range(1, 1, 1, 1), 0, new Position(1, 1), 0), new SingleCursorState(new Range(1, 1, 1, 1), 0, new Position(1, 1), 0));\n }\n OneCursor.prototype.dispose = function (context) {\n this._removeTrackedRange(context);\n };\n OneCursor.prototype.startTrackingSelection = function (context) {\n this._trackSelection = true;\n this._updateTrackedRange(context);\n };\n OneCursor.prototype.stopTrackingSelection = function (context) {\n this._trackSelection = false;\n this._removeTrackedRange(context);\n };\n OneCursor.prototype._updateTrackedRange = function (context) {\n if (!this._trackSelection) {\n // don't track the selection\n return;\n }\n this._selTrackedRange = context.model._setTrackedRange(this._selTrackedRange, this.modelState.selection, TrackedRangeStickiness.AlwaysGrowsWhenTypingAtEdges);\n };\n OneCursor.prototype._removeTrackedRange = function (context) {\n this._selTrackedRange = context.model._setTrackedRange(this._selTrackedRange, null, TrackedRangeStickiness.AlwaysGrowsWhenTypingAtEdges);\n };\n OneCursor.prototype.asCursorState = function () {\n return new CursorState(this.modelState, this.viewState);\n };\n OneCursor.prototype.readSelectionFromMarkers = function (context) {\n var range = context.model._getTrackedRange(this._selTrackedRange);\n if (this.modelState.selection.getDirection() === SelectionDirection.LTR) {\n return new Selection(range.startLineNumber, range.startColumn, range.endLineNumber, range.endColumn);\n }\n return new Selection(range.endLineNumber, range.endColumn, range.startLineNumber, range.startColumn);\n };\n OneCursor.prototype.ensureValidState = function (context) {\n this._setState(context, this.modelState, this.viewState);\n };\n OneCursor.prototype.setState = function (context, modelState, viewState) {\n this._setState(context, modelState, viewState);\n };\n OneCursor.prototype._setState = function (context, modelState, viewState) {\n if (!modelState) {\n // We only have the view state => compute the model state\n var selectionStart = context.model.validateRange(context.convertViewRangeToModelRange(viewState.selectionStart));\n var position = context.model.validatePosition(context.convertViewPositionToModelPosition(viewState.position.lineNumber, viewState.position.column));\n modelState = new SingleCursorState(selectionStart, viewState.selectionStartLeftoverVisibleColumns, position, viewState.leftoverVisibleColumns);\n }\n else {\n // Validate new model state\n var selectionStart = context.model.validateRange(modelState.selectionStart);\n var selectionStartLeftoverVisibleColumns = modelState.selectionStart.equalsRange(selectionStart) ? modelState.selectionStartLeftoverVisibleColumns : 0;\n var position = context.model.validatePosition(modelState.position);\n var leftoverVisibleColumns = modelState.position.equals(position) ? modelState.leftoverVisibleColumns : 0;\n modelState = new SingleCursorState(selectionStart, selectionStartLeftoverVisibleColumns, position, leftoverVisibleColumns);\n }\n if (!viewState) {\n // We only have the model state => compute the view state\n var viewSelectionStart1 = context.convertModelPositionToViewPosition(new Position(modelState.selectionStart.startLineNumber, modelState.selectionStart.startColumn));\n var viewSelectionStart2 = context.convertModelPositionToViewPosition(new Position(modelState.selectionStart.endLineNumber, modelState.selectionStart.endColumn));\n var viewSelectionStart = new Range(viewSelectionStart1.lineNumber, viewSelectionStart1.column, viewSelectionStart2.lineNumber, viewSelectionStart2.column);\n var viewPosition = context.convertModelPositionToViewPosition(modelState.position);\n viewState = new SingleCursorState(viewSelectionStart, modelState.selectionStartLeftoverVisibleColumns, viewPosition, modelState.leftoverVisibleColumns);\n }\n else {\n // Validate new view state\n var viewSelectionStart = context.validateViewRange(viewState.selectionStart, modelState.selectionStart);\n var viewPosition = context.validateViewPosition(viewState.position, modelState.position);\n viewState = new SingleCursorState(viewSelectionStart, modelState.selectionStartLeftoverVisibleColumns, viewPosition, modelState.leftoverVisibleColumns);\n }\n this.modelState = modelState;\n this.viewState = viewState;\n this._updateTrackedRange(context);\n };\n return OneCursor;\n}());\nexport { OneCursor };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport { OneCursor } from './oneCursor';\nimport { Selection } from '../core/selection';\nimport { CursorState } from './cursorCommon';\nvar CursorCollection = /** @class */ (function () {\n function CursorCollection(context) {\n this.context = context;\n this.primaryCursor = new OneCursor(context);\n this.secondaryCursors = [];\n this.lastAddedCursorIndex = 0;\n }\n CursorCollection.prototype.dispose = function () {\n this.primaryCursor.dispose(this.context);\n this.killSecondaryCursors();\n };\n CursorCollection.prototype.startTrackingSelections = function () {\n this.primaryCursor.startTrackingSelection(this.context);\n for (var i = 0, len = this.secondaryCursors.length; i < len; i++) {\n this.secondaryCursors[i].startTrackingSelection(this.context);\n }\n };\n CursorCollection.prototype.stopTrackingSelections = function () {\n this.primaryCursor.stopTrackingSelection(this.context);\n for (var i = 0, len = this.secondaryCursors.length; i < len; i++) {\n this.secondaryCursors[i].stopTrackingSelection(this.context);\n }\n };\n CursorCollection.prototype.updateContext = function (context) {\n this.context = context;\n };\n CursorCollection.prototype.ensureValidState = function () {\n this.primaryCursor.ensureValidState(this.context);\n for (var i = 0, len = this.secondaryCursors.length; i < len; i++) {\n this.secondaryCursors[i].ensureValidState(this.context);\n }\n };\n CursorCollection.prototype.readSelectionFromMarkers = function () {\n var result = [];\n result[0] = this.primaryCursor.readSelectionFromMarkers(this.context);\n for (var i = 0, len = this.secondaryCursors.length; i < len; i++) {\n result[i + 1] = this.secondaryCursors[i].readSelectionFromMarkers(this.context);\n }\n return result;\n };\n CursorCollection.prototype.getAll = function () {\n var result = [];\n result[0] = this.primaryCursor.asCursorState();\n for (var i = 0, len = this.secondaryCursors.length; i < len; i++) {\n result[i + 1] = this.secondaryCursors[i].asCursorState();\n }\n return result;\n };\n CursorCollection.prototype.getViewPositions = function () {\n var result = [];\n result[0] = this.primaryCursor.viewState.position;\n for (var i = 0, len = this.secondaryCursors.length; i < len; i++) {\n result[i + 1] = this.secondaryCursors[i].viewState.position;\n }\n return result;\n };\n CursorCollection.prototype.getSelections = function () {\n var result = [];\n result[0] = this.primaryCursor.modelState.selection;\n for (var i = 0, len = this.secondaryCursors.length; i < len; i++) {\n result[i + 1] = this.secondaryCursors[i].modelState.selection;\n }\n return result;\n };\n CursorCollection.prototype.getViewSelections = function () {\n var result = [];\n result[0] = this.primaryCursor.viewState.selection;\n for (var i = 0, len = this.secondaryCursors.length; i < len; i++) {\n result[i + 1] = this.secondaryCursors[i].viewState.selection;\n }\n return result;\n };\n CursorCollection.prototype.setSelections = function (selections) {\n this.setStates(CursorState.fromModelSelections(selections));\n };\n CursorCollection.prototype.getPrimaryCursor = function () {\n return this.primaryCursor.asCursorState();\n };\n CursorCollection.prototype.setStates = function (states) {\n if (states === null) {\n return;\n }\n this.primaryCursor.setState(this.context, states[0].modelState, states[0].viewState);\n this._setSecondaryStates(states.slice(1));\n };\n /**\n * Creates or disposes secondary cursors as necessary to match the number of `secondarySelections`.\n */\n CursorCollection.prototype._setSecondaryStates = function (secondaryStates) {\n var secondaryCursorsLength = this.secondaryCursors.length;\n var secondaryStatesLength = secondaryStates.length;\n if (secondaryCursorsLength < secondaryStatesLength) {\n var createCnt = secondaryStatesLength - secondaryCursorsLength;\n for (var i = 0; i < createCnt; i++) {\n this._addSecondaryCursor();\n }\n }\n else if (secondaryCursorsLength > secondaryStatesLength) {\n var removeCnt = secondaryCursorsLength - secondaryStatesLength;\n for (var i = 0; i < removeCnt; i++) {\n this._removeSecondaryCursor(this.secondaryCursors.length - 1);\n }\n }\n for (var i = 0; i < secondaryStatesLength; i++) {\n this.secondaryCursors[i].setState(this.context, secondaryStates[i].modelState, secondaryStates[i].viewState);\n }\n };\n CursorCollection.prototype.killSecondaryCursors = function () {\n this._setSecondaryStates([]);\n };\n CursorCollection.prototype._addSecondaryCursor = function () {\n this.secondaryCursors.push(new OneCursor(this.context));\n this.lastAddedCursorIndex = this.secondaryCursors.length;\n };\n CursorCollection.prototype.getLastAddedCursorIndex = function () {\n if (this.secondaryCursors.length === 0 || this.lastAddedCursorIndex === 0) {\n return 0;\n }\n return this.lastAddedCursorIndex;\n };\n CursorCollection.prototype._removeSecondaryCursor = function (removeIndex) {\n if (this.lastAddedCursorIndex >= removeIndex + 1) {\n this.lastAddedCursorIndex--;\n }\n this.secondaryCursors[removeIndex].dispose(this.context);\n this.secondaryCursors.splice(removeIndex, 1);\n };\n CursorCollection.prototype._getAll = function () {\n var result = [];\n result[0] = this.primaryCursor;\n for (var i = 0, len = this.secondaryCursors.length; i < len; i++) {\n result[i + 1] = this.secondaryCursors[i];\n }\n return result;\n };\n CursorCollection.prototype.normalize = function () {\n if (this.secondaryCursors.length === 0) {\n return;\n }\n var cursors = this._getAll();\n var sortedCursors = [];\n for (var i = 0, len = cursors.length; i < len; i++) {\n sortedCursors.push({\n index: i,\n selection: cursors[i].modelState.selection,\n });\n }\n sortedCursors.sort(function (a, b) {\n if (a.selection.startLineNumber === b.selection.startLineNumber) {\n return a.selection.startColumn - b.selection.startColumn;\n }\n return a.selection.startLineNumber - b.selection.startLineNumber;\n });\n for (var sortedCursorIndex = 0; sortedCursorIndex < sortedCursors.length - 1; sortedCursorIndex++) {\n var current = sortedCursors[sortedCursorIndex];\n var next = sortedCursors[sortedCursorIndex + 1];\n var currentSelection = current.selection;\n var nextSelection = next.selection;\n if (!this.context.config.multiCursorMergeOverlapping) {\n continue;\n }\n var shouldMergeCursors = void 0;\n if (nextSelection.isEmpty() || currentSelection.isEmpty()) {\n // Merge touching cursors if one of them is collapsed\n shouldMergeCursors = nextSelection.getStartPosition().isBeforeOrEqual(currentSelection.getEndPosition());\n }\n else {\n // Merge only overlapping cursors (i.e. allow touching ranges)\n shouldMergeCursors = nextSelection.getStartPosition().isBefore(currentSelection.getEndPosition());\n }\n if (shouldMergeCursors) {\n var winnerSortedCursorIndex = current.index < next.index ? sortedCursorIndex : sortedCursorIndex + 1;\n var looserSortedCursorIndex = current.index < next.index ? sortedCursorIndex + 1 : sortedCursorIndex;\n var looserIndex = sortedCursors[looserSortedCursorIndex].index;\n var winnerIndex = sortedCursors[winnerSortedCursorIndex].index;\n var looserSelection = sortedCursors[looserSortedCursorIndex].selection;\n var winnerSelection = sortedCursors[winnerSortedCursorIndex].selection;\n if (!looserSelection.equalsSelection(winnerSelection)) {\n var resultingRange = looserSelection.plusRange(winnerSelection);\n var looserSelectionIsLTR = (looserSelection.selectionStartLineNumber === looserSelection.startLineNumber && looserSelection.selectionStartColumn === looserSelection.startColumn);\n var winnerSelectionIsLTR = (winnerSelection.selectionStartLineNumber === winnerSelection.startLineNumber && winnerSelection.selectionStartColumn === winnerSelection.startColumn);\n // Give more importance to the last added cursor (think Ctrl-dragging + hitting another cursor)\n var resultingSelectionIsLTR = void 0;\n if (looserIndex === this.lastAddedCursorIndex) {\n resultingSelectionIsLTR = looserSelectionIsLTR;\n this.lastAddedCursorIndex = winnerIndex;\n }\n else {\n // Winner takes it all\n resultingSelectionIsLTR = winnerSelectionIsLTR;\n }\n var resultingSelection = void 0;\n if (resultingSelectionIsLTR) {\n resultingSelection = new Selection(resultingRange.startLineNumber, resultingRange.startColumn, resultingRange.endLineNumber, resultingRange.endColumn);\n }\n else {\n resultingSelection = new Selection(resultingRange.endLineNumber, resultingRange.endColumn, resultingRange.startLineNumber, resultingRange.startColumn);\n }\n sortedCursors[winnerSortedCursorIndex].selection = resultingSelection;\n var resultingState = CursorState.fromModelSelection(resultingSelection);\n cursors[winnerIndex].setState(this.context, resultingState.modelState, resultingState.viewState);\n }\n for (var j = 0; j < sortedCursors.length; j++) {\n if (sortedCursors[j].index > looserIndex) {\n sortedCursors[j].index--;\n }\n }\n cursors.splice(looserIndex, 1);\n sortedCursors.splice(looserSortedCursorIndex, 1);\n this._removeSecondaryCursor(looserIndex - 1);\n sortedCursorIndex--;\n }\n }\n };\n return CursorCollection;\n}());\nexport { CursorCollection };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport * as errors from '../../../base/common/errors';\nimport { Disposable, toDisposable } from '../../../base/common/lifecycle';\nvar ViewConfigurationChangedEvent = /** @class */ (function () {\n function ViewConfigurationChangedEvent(source) {\n this.type = 1 /* ViewConfigurationChanged */;\n this.canUseLayerHinting = source.canUseLayerHinting;\n this.pixelRatio = source.pixelRatio;\n this.editorClassName = source.editorClassName;\n this.lineHeight = source.lineHeight;\n this.readOnly = source.readOnly;\n this.accessibilitySupport = source.accessibilitySupport;\n this.emptySelectionClipboard = source.emptySelectionClipboard;\n this.layoutInfo = source.layoutInfo;\n this.fontInfo = source.fontInfo;\n this.viewInfo = source.viewInfo;\n this.wrappingInfo = source.wrappingInfo;\n }\n return ViewConfigurationChangedEvent;\n}());\nexport { ViewConfigurationChangedEvent };\nvar ViewCursorStateChangedEvent = /** @class */ (function () {\n function ViewCursorStateChangedEvent(selections) {\n this.type = 2 /* ViewCursorStateChanged */;\n this.selections = selections;\n }\n return ViewCursorStateChangedEvent;\n}());\nexport { ViewCursorStateChangedEvent };\nvar ViewDecorationsChangedEvent = /** @class */ (function () {\n function ViewDecorationsChangedEvent() {\n this.type = 3 /* ViewDecorationsChanged */;\n // Nothing to do\n }\n return ViewDecorationsChangedEvent;\n}());\nexport { ViewDecorationsChangedEvent };\nvar ViewFlushedEvent = /** @class */ (function () {\n function ViewFlushedEvent() {\n this.type = 4 /* ViewFlushed */;\n // Nothing to do\n }\n return ViewFlushedEvent;\n}());\nexport { ViewFlushedEvent };\nvar ViewFocusChangedEvent = /** @class */ (function () {\n function ViewFocusChangedEvent(isFocused) {\n this.type = 5 /* ViewFocusChanged */;\n this.isFocused = isFocused;\n }\n return ViewFocusChangedEvent;\n}());\nexport { ViewFocusChangedEvent };\nvar ViewLineMappingChangedEvent = /** @class */ (function () {\n function ViewLineMappingChangedEvent() {\n this.type = 6 /* ViewLineMappingChanged */;\n // Nothing to do\n }\n return ViewLineMappingChangedEvent;\n}());\nexport { ViewLineMappingChangedEvent };\nvar ViewLinesChangedEvent = /** @class */ (function () {\n function ViewLinesChangedEvent(fromLineNumber, toLineNumber) {\n this.type = 7 /* ViewLinesChanged */;\n this.fromLineNumber = fromLineNumber;\n this.toLineNumber = toLineNumber;\n }\n return ViewLinesChangedEvent;\n}());\nexport { ViewLinesChangedEvent };\nvar ViewLinesDeletedEvent = /** @class */ (function () {\n function ViewLinesDeletedEvent(fromLineNumber, toLineNumber) {\n this.type = 8 /* ViewLinesDeleted */;\n this.fromLineNumber = fromLineNumber;\n this.toLineNumber = toLineNumber;\n }\n return ViewLinesDeletedEvent;\n}());\nexport { ViewLinesDeletedEvent };\nvar ViewLinesInsertedEvent = /** @class */ (function () {\n function ViewLinesInsertedEvent(fromLineNumber, toLineNumber) {\n this.type = 9 /* ViewLinesInserted */;\n this.fromLineNumber = fromLineNumber;\n this.toLineNumber = toLineNumber;\n }\n return ViewLinesInsertedEvent;\n}());\nexport { ViewLinesInsertedEvent };\nvar ViewRevealRangeRequestEvent = /** @class */ (function () {\n function ViewRevealRangeRequestEvent(range, verticalType, revealHorizontal, scrollType) {\n this.type = 10 /* ViewRevealRangeRequest */;\n this.range = range;\n this.verticalType = verticalType;\n this.revealHorizontal = revealHorizontal;\n this.scrollType = scrollType;\n }\n return ViewRevealRangeRequestEvent;\n}());\nexport { ViewRevealRangeRequestEvent };\nvar ViewScrollChangedEvent = /** @class */ (function () {\n function ViewScrollChangedEvent(source) {\n this.type = 11 /* ViewScrollChanged */;\n this.scrollWidth = source.scrollWidth;\n this.scrollLeft = source.scrollLeft;\n this.scrollHeight = source.scrollHeight;\n this.scrollTop = source.scrollTop;\n this.scrollWidthChanged = source.scrollWidthChanged;\n this.scrollLeftChanged = source.scrollLeftChanged;\n this.scrollHeightChanged = source.scrollHeightChanged;\n this.scrollTopChanged = source.scrollTopChanged;\n }\n return ViewScrollChangedEvent;\n}());\nexport { ViewScrollChangedEvent };\nvar ViewTokensChangedEvent = /** @class */ (function () {\n function ViewTokensChangedEvent(ranges) {\n this.type = 12 /* ViewTokensChanged */;\n this.ranges = ranges;\n }\n return ViewTokensChangedEvent;\n}());\nexport { ViewTokensChangedEvent };\nvar ViewThemeChangedEvent = /** @class */ (function () {\n function ViewThemeChangedEvent() {\n this.type = 15 /* ViewThemeChanged */;\n }\n return ViewThemeChangedEvent;\n}());\nexport { ViewThemeChangedEvent };\nvar ViewTokensColorsChangedEvent = /** @class */ (function () {\n function ViewTokensColorsChangedEvent() {\n this.type = 13 /* ViewTokensColorsChanged */;\n // Nothing to do\n }\n return ViewTokensColorsChangedEvent;\n}());\nexport { ViewTokensColorsChangedEvent };\nvar ViewZonesChangedEvent = /** @class */ (function () {\n function ViewZonesChangedEvent() {\n this.type = 14 /* ViewZonesChanged */;\n // Nothing to do\n }\n return ViewZonesChangedEvent;\n}());\nexport { ViewZonesChangedEvent };\nvar ViewLanguageConfigurationEvent = /** @class */ (function () {\n function ViewLanguageConfigurationEvent() {\n this.type = 16 /* ViewLanguageConfigurationChanged */;\n }\n return ViewLanguageConfigurationEvent;\n}());\nexport { ViewLanguageConfigurationEvent };\nvar ViewEventEmitter = /** @class */ (function (_super) {\n __extends(ViewEventEmitter, _super);\n function ViewEventEmitter() {\n var _this = _super.call(this) || this;\n _this._listeners = [];\n _this._collector = null;\n _this._collectorCnt = 0;\n return _this;\n }\n ViewEventEmitter.prototype.dispose = function () {\n this._listeners = [];\n _super.prototype.dispose.call(this);\n };\n ViewEventEmitter.prototype._beginEmit = function () {\n this._collectorCnt++;\n if (this._collectorCnt === 1) {\n this._collector = new ViewEventsCollector();\n }\n return this._collector;\n };\n ViewEventEmitter.prototype._endEmit = function () {\n this._collectorCnt--;\n if (this._collectorCnt === 0) {\n var events = this._collector.finalize();\n this._collector = null;\n if (events.length > 0) {\n this._emit(events);\n }\n }\n };\n ViewEventEmitter.prototype._emit = function (events) {\n var listeners = this._listeners.slice(0);\n for (var i = 0, len = listeners.length; i < len; i++) {\n safeInvokeListener(listeners[i], events);\n }\n };\n ViewEventEmitter.prototype.addEventListener = function (listener) {\n var _this = this;\n this._listeners.push(listener);\n return toDisposable(function () {\n var listeners = _this._listeners;\n for (var i = 0, len = listeners.length; i < len; i++) {\n if (listeners[i] === listener) {\n listeners.splice(i, 1);\n break;\n }\n }\n });\n };\n return ViewEventEmitter;\n}(Disposable));\nexport { ViewEventEmitter };\nvar ViewEventsCollector = /** @class */ (function () {\n function ViewEventsCollector() {\n this._eventsLen = 0;\n this._events = [];\n this._eventsLen = 0;\n }\n ViewEventsCollector.prototype.emit = function (event) {\n this._events[this._eventsLen++] = event;\n };\n ViewEventsCollector.prototype.finalize = function () {\n var result = this._events;\n this._events = null;\n return result;\n };\n return ViewEventsCollector;\n}());\nexport { ViewEventsCollector };\nfunction safeInvokeListener(listener, events) {\n try {\n listener(events);\n }\n catch (e) {\n errors.onUnexpectedError(e);\n }\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport * as nls from '../../../nls';\nimport * as strings from '../../../base/common/strings';\nimport { onUnexpectedError } from '../../../base/common/errors';\nimport { CursorCollection } from './cursorCollection';\nimport { Range } from '../core/range';\nimport { Selection, SelectionDirection } from '../core/selection';\nimport * as editorCommon from '../editorCommon';\nimport { CursorColumns, CursorConfiguration, EditOperationResult, CursorContext, CursorState } from './cursorCommon';\nimport { DeleteOperations } from './cursorDeleteOperations';\nimport { TypeOperations } from './cursorTypeOperations';\nimport { CursorChangeReason } from './cursorEvents';\nimport * as viewEvents from '../view/viewEvents';\nimport { Emitter } from '../../../base/common/event';\nimport { TrackedRangeStickiness } from '../model';\nfunction containsLineMappingChanged(events) {\n for (var i = 0, len = events.length; i < len; i++) {\n if (events[i].type === 6 /* ViewLineMappingChanged */) {\n return true;\n }\n }\n return false;\n}\nvar CursorStateChangedEvent = /** @class */ (function () {\n function CursorStateChangedEvent(selections, source, reason) {\n this.selections = selections;\n this.source = source;\n this.reason = reason;\n }\n return CursorStateChangedEvent;\n}());\nexport { CursorStateChangedEvent };\n/**\n * A snapshot of the cursor and the model state\n */\nvar CursorModelState = /** @class */ (function () {\n function CursorModelState(model, cursor) {\n this.modelVersionId = model.getVersionId();\n this.cursorState = cursor.getAll();\n }\n CursorModelState.prototype.equals = function (other) {\n if (!other) {\n return false;\n }\n if (this.modelVersionId !== other.modelVersionId) {\n return false;\n }\n if (this.cursorState.length !== other.cursorState.length) {\n return false;\n }\n for (var i = 0, len = this.cursorState.length; i < len; i++) {\n if (!this.cursorState[i].equals(other.cursorState[i])) {\n return false;\n }\n }\n return true;\n };\n return CursorModelState;\n}());\nexport { CursorModelState };\nvar Cursor = /** @class */ (function (_super) {\n __extends(Cursor, _super);\n function Cursor(configuration, model, viewModel) {\n var _this = _super.call(this) || this;\n _this._onDidReachMaxCursorCount = _this._register(new Emitter());\n _this.onDidReachMaxCursorCount = _this._onDidReachMaxCursorCount.event;\n _this._onDidAttemptReadOnlyEdit = _this._register(new Emitter());\n _this.onDidAttemptReadOnlyEdit = _this._onDidAttemptReadOnlyEdit.event;\n _this._onDidChange = _this._register(new Emitter());\n _this.onDidChange = _this._onDidChange.event;\n _this._configuration = configuration;\n _this._model = model;\n _this._knownModelVersionId = _this._model.getVersionId();\n _this._viewModel = viewModel;\n _this.context = new CursorContext(_this._configuration, _this._model, _this._viewModel);\n _this._cursors = new CursorCollection(_this.context);\n _this._isHandling = false;\n _this._isDoingComposition = false;\n _this._columnSelectData = null;\n _this._prevEditOperationType = 0 /* Other */;\n _this._register(_this._model.onDidChangeRawContent(function (e) {\n _this._knownModelVersionId = e.versionId;\n if (_this._isHandling) {\n return;\n }\n var hadFlushEvent = e.containsEvent(1 /* Flush */);\n _this._onModelContentChanged(hadFlushEvent);\n }));\n _this._register(viewModel.addEventListener(function (events) {\n if (!containsLineMappingChanged(events)) {\n return;\n }\n if (_this._knownModelVersionId !== _this._model.getVersionId()) {\n // There are model change events that I didn't yet receive.\n //\n // This can happen when editing the model, and the view model receives the change events first,\n // and the view model emits line mapping changed events, all before the cursor gets a chance to\n // recover from markers.\n //\n // The model change listener above will be called soon and we'll ensure a valid cursor state there.\n return;\n }\n // Ensure valid state\n _this.setStates('viewModel', CursorChangeReason.NotSet, _this.getAll());\n }));\n var updateCursorContext = function () {\n _this.context = new CursorContext(_this._configuration, _this._model, _this._viewModel);\n _this._cursors.updateContext(_this.context);\n };\n _this._register(_this._model.onDidChangeLanguage(function (e) {\n updateCursorContext();\n }));\n _this._register(_this._model.onDidChangeLanguageConfiguration(function () {\n updateCursorContext();\n }));\n _this._register(_this._model.onDidChangeOptions(function () {\n updateCursorContext();\n }));\n _this._register(_this._configuration.onDidChange(function (e) {\n if (CursorConfiguration.shouldRecreate(e)) {\n updateCursorContext();\n }\n }));\n return _this;\n }\n Cursor.prototype.dispose = function () {\n this._cursors.dispose();\n _super.prototype.dispose.call(this);\n };\n // ------ some getters/setters\n Cursor.prototype.getPrimaryCursor = function () {\n return this._cursors.getPrimaryCursor();\n };\n Cursor.prototype.getLastAddedCursorIndex = function () {\n return this._cursors.getLastAddedCursorIndex();\n };\n Cursor.prototype.getAll = function () {\n return this._cursors.getAll();\n };\n Cursor.prototype.setStates = function (source, reason, states) {\n if (states.length > Cursor.MAX_CURSOR_COUNT) {\n states = states.slice(0, Cursor.MAX_CURSOR_COUNT);\n this._onDidReachMaxCursorCount.fire(void 0);\n }\n var oldState = new CursorModelState(this._model, this);\n this._cursors.setStates(states);\n this._cursors.normalize();\n this._columnSelectData = null;\n this._emitStateChangedIfNecessary(source, reason, oldState);\n };\n Cursor.prototype.setColumnSelectData = function (columnSelectData) {\n this._columnSelectData = columnSelectData;\n };\n Cursor.prototype.reveal = function (horizontal, target, scrollType) {\n this._revealRange(target, 0 /* Simple */, horizontal, scrollType);\n };\n Cursor.prototype.revealRange = function (revealHorizontal, viewRange, verticalType, scrollType) {\n this.emitCursorRevealRange(viewRange, verticalType, revealHorizontal, scrollType);\n };\n Cursor.prototype.scrollTo = function (desiredScrollTop) {\n this._viewModel.viewLayout.setScrollPositionSmooth({\n scrollTop: desiredScrollTop\n });\n };\n Cursor.prototype.saveState = function () {\n var result = [];\n var selections = this._cursors.getSelections();\n for (var i = 0, len = selections.length; i < len; i++) {\n var selection = selections[i];\n result.push({\n inSelectionMode: !selection.isEmpty(),\n selectionStart: {\n lineNumber: selection.selectionStartLineNumber,\n column: selection.selectionStartColumn,\n },\n position: {\n lineNumber: selection.positionLineNumber,\n column: selection.positionColumn,\n }\n });\n }\n return result;\n };\n Cursor.prototype.restoreState = function (states) {\n var desiredSelections = [];\n for (var i = 0, len = states.length; i < len; i++) {\n var state = states[i];\n var positionLineNumber = 1;\n var positionColumn = 1;\n // Avoid missing properties on the literal\n if (state.position && state.position.lineNumber) {\n positionLineNumber = state.position.lineNumber;\n }\n if (state.position && state.position.column) {\n positionColumn = state.position.column;\n }\n var selectionStartLineNumber = positionLineNumber;\n var selectionStartColumn = positionColumn;\n // Avoid missing properties on the literal\n if (state.selectionStart && state.selectionStart.lineNumber) {\n selectionStartLineNumber = state.selectionStart.lineNumber;\n }\n if (state.selectionStart && state.selectionStart.column) {\n selectionStartColumn = state.selectionStart.column;\n }\n desiredSelections.push({\n selectionStartLineNumber: selectionStartLineNumber,\n selectionStartColumn: selectionStartColumn,\n positionLineNumber: positionLineNumber,\n positionColumn: positionColumn\n });\n }\n this.setStates('restoreState', CursorChangeReason.NotSet, CursorState.fromModelSelections(desiredSelections));\n this.reveal(true, 0 /* Primary */, 1 /* Immediate */);\n };\n Cursor.prototype._onModelContentChanged = function (hadFlushEvent) {\n this._prevEditOperationType = 0 /* Other */;\n if (hadFlushEvent) {\n // a model.setValue() was called\n this._cursors.dispose();\n this._cursors = new CursorCollection(this.context);\n this._emitStateChangedIfNecessary('model', CursorChangeReason.ContentFlush, null);\n }\n else {\n var selectionsFromMarkers = this._cursors.readSelectionFromMarkers();\n this.setStates('modelChange', CursorChangeReason.RecoverFromMarkers, CursorState.fromModelSelections(selectionsFromMarkers));\n }\n };\n Cursor.prototype.getSelection = function () {\n return this._cursors.getPrimaryCursor().modelState.selection;\n };\n Cursor.prototype.getColumnSelectData = function () {\n if (this._columnSelectData) {\n return this._columnSelectData;\n }\n var primaryCursor = this._cursors.getPrimaryCursor();\n var primaryPos = primaryCursor.viewState.position;\n return {\n toViewLineNumber: primaryPos.lineNumber,\n toViewVisualColumn: CursorColumns.visibleColumnFromColumn2(this.context.config, this.context.viewModel, primaryPos)\n };\n };\n Cursor.prototype.getSelections = function () {\n return this._cursors.getSelections();\n };\n Cursor.prototype.getViewSelections = function () {\n return this._cursors.getViewSelections();\n };\n Cursor.prototype.getPosition = function () {\n return this._cursors.getPrimaryCursor().modelState.position;\n };\n Cursor.prototype.setSelections = function (source, selections) {\n this.setStates(source, CursorChangeReason.NotSet, CursorState.fromModelSelections(selections));\n };\n Cursor.prototype.getPrevEditOperationType = function () {\n return this._prevEditOperationType;\n };\n Cursor.prototype.setPrevEditOperationType = function (type) {\n this._prevEditOperationType = type;\n };\n // ------ auxiliary handling logic\n Cursor.prototype._executeEditOperation = function (opResult) {\n if (!opResult) {\n // Nothing to execute\n return;\n }\n if (opResult.shouldPushStackElementBefore) {\n this._model.pushStackElement();\n }\n var result = CommandExecutor.executeCommands(this._model, this._cursors.getSelections(), opResult.commands);\n if (result) {\n // The commands were applied correctly\n this._interpretCommandResult(result);\n this._prevEditOperationType = opResult.type;\n }\n if (opResult.shouldPushStackElementAfter) {\n this._model.pushStackElement();\n }\n };\n Cursor.prototype._interpretCommandResult = function (cursorState) {\n if (!cursorState || cursorState.length === 0) {\n cursorState = this._cursors.readSelectionFromMarkers();\n }\n this._columnSelectData = null;\n this._cursors.setSelections(cursorState);\n this._cursors.normalize();\n };\n // -----------------------------------------------------------------------------------------------------------\n // ----- emitting events\n Cursor.prototype._emitStateChangedIfNecessary = function (source, reason, oldState) {\n var newState = new CursorModelState(this._model, this);\n if (newState.equals(oldState)) {\n return false;\n }\n var selections = this._cursors.getSelections();\n var viewSelections = this._cursors.getViewSelections();\n // Let the view get the event first.\n try {\n var eventsCollector = this._beginEmit();\n eventsCollector.emit(new viewEvents.ViewCursorStateChangedEvent(viewSelections));\n }\n finally {\n this._endEmit();\n }\n // Only after the view has been notified, let the rest of the world know...\n if (!oldState\n || oldState.cursorState.length !== newState.cursorState.length\n || newState.cursorState.some(function (newCursorState, i) { return !newCursorState.modelState.equals(oldState.cursorState[i].modelState); })) {\n this._onDidChange.fire(new CursorStateChangedEvent(selections, source || 'keyboard', reason));\n }\n return true;\n };\n Cursor.prototype._revealRange = function (revealTarget, verticalType, revealHorizontal, scrollType) {\n var viewPositions = this._cursors.getViewPositions();\n var viewPosition = viewPositions[0];\n if (revealTarget === 1 /* TopMost */) {\n for (var i = 1; i < viewPositions.length; i++) {\n if (viewPositions[i].isBefore(viewPosition)) {\n viewPosition = viewPositions[i];\n }\n }\n }\n else if (revealTarget === 2 /* BottomMost */) {\n for (var i = 1; i < viewPositions.length; i++) {\n if (viewPosition.isBeforeOrEqual(viewPositions[i])) {\n viewPosition = viewPositions[i];\n }\n }\n }\n else {\n if (viewPositions.length > 1) {\n // no revealing!\n return;\n }\n }\n var viewRange = new Range(viewPosition.lineNumber, viewPosition.column, viewPosition.lineNumber, viewPosition.column);\n this.emitCursorRevealRange(viewRange, verticalType, revealHorizontal, scrollType);\n };\n Cursor.prototype.emitCursorRevealRange = function (viewRange, verticalType, revealHorizontal, scrollType) {\n try {\n var eventsCollector = this._beginEmit();\n eventsCollector.emit(new viewEvents.ViewRevealRangeRequestEvent(viewRange, verticalType, revealHorizontal, scrollType));\n }\n finally {\n this._endEmit();\n }\n };\n // -----------------------------------------------------------------------------------------------------------\n // ----- handlers beyond this point\n Cursor.prototype.trigger = function (source, handlerId, payload) {\n var H = editorCommon.Handler;\n if (handlerId === H.CompositionStart) {\n this._isDoingComposition = true;\n return;\n }\n if (handlerId === H.CompositionEnd) {\n this._isDoingComposition = false;\n }\n if (this._configuration.editor.readOnly) {\n // All the remaining handlers will try to edit the model,\n // but we cannot edit when read only...\n this._onDidAttemptReadOnlyEdit.fire(void 0);\n return;\n }\n var oldState = new CursorModelState(this._model, this);\n var cursorChangeReason = CursorChangeReason.NotSet;\n if (handlerId !== H.Undo && handlerId !== H.Redo) {\n // TODO@Alex: if the undo/redo stack contains non-null selections\n // it would also be OK to stop tracking selections here\n this._cursors.stopTrackingSelections();\n }\n // ensure valid state on all cursors\n this._cursors.ensureValidState();\n this._isHandling = true;\n try {\n switch (handlerId) {\n case H.Type:\n this._type(source, payload.text);\n break;\n case H.ReplacePreviousChar:\n this._replacePreviousChar(payload.text, payload.replaceCharCnt);\n break;\n case H.Paste:\n cursorChangeReason = CursorChangeReason.Paste;\n this._paste(payload.text, payload.pasteOnNewLine, payload.multicursorText);\n break;\n case H.Cut:\n this._cut();\n break;\n case H.Undo:\n cursorChangeReason = CursorChangeReason.Undo;\n this._interpretCommandResult(this._model.undo());\n break;\n case H.Redo:\n cursorChangeReason = CursorChangeReason.Redo;\n this._interpretCommandResult(this._model.redo());\n break;\n case H.ExecuteCommand:\n this._externalExecuteCommand(payload);\n break;\n case H.ExecuteCommands:\n this._externalExecuteCommands(payload);\n break;\n case H.CompositionEnd:\n this._interpretCompositionEnd(source);\n break;\n }\n }\n catch (err) {\n onUnexpectedError(err);\n }\n this._isHandling = false;\n if (handlerId !== H.Undo && handlerId !== H.Redo) {\n this._cursors.startTrackingSelections();\n }\n if (this._emitStateChangedIfNecessary(source, cursorChangeReason, oldState)) {\n this._revealRange(0 /* Primary */, 0 /* Simple */, true, 0 /* Smooth */);\n }\n };\n Cursor.prototype._interpretCompositionEnd = function (source) {\n if (!this._isDoingComposition && source === 'keyboard') {\n // composition finishes, let's check if we need to auto complete if necessary.\n this._executeEditOperation(TypeOperations.compositionEndWithInterceptors(this._prevEditOperationType, this.context.config, this.context.model, this.getSelections()));\n }\n };\n Cursor.prototype._type = function (source, text) {\n if (!this._isDoingComposition && source === 'keyboard') {\n // If this event is coming straight from the keyboard, look for electric characters and enter\n for (var i = 0, len = text.length; i < len; i++) {\n var charCode = text.charCodeAt(i);\n var chr = void 0;\n if (strings.isHighSurrogate(charCode) && i + 1 < len) {\n chr = text.charAt(i) + text.charAt(i + 1);\n i++;\n }\n else {\n chr = text.charAt(i);\n }\n // Here we must interpret each typed character individually, that's why we create a new context\n this._executeEditOperation(TypeOperations.typeWithInterceptors(this._prevEditOperationType, this.context.config, this.context.model, this.getSelections(), chr));\n }\n }\n else {\n this._executeEditOperation(TypeOperations.typeWithoutInterceptors(this._prevEditOperationType, this.context.config, this.context.model, this.getSelections(), text));\n }\n };\n Cursor.prototype._replacePreviousChar = function (text, replaceCharCnt) {\n this._executeEditOperation(TypeOperations.replacePreviousChar(this._prevEditOperationType, this.context.config, this.context.model, this.getSelections(), text, replaceCharCnt));\n };\n Cursor.prototype._paste = function (text, pasteOnNewLine, multicursorText) {\n this._executeEditOperation(TypeOperations.paste(this.context.config, this.context.model, this.getSelections(), text, pasteOnNewLine, multicursorText));\n };\n Cursor.prototype._cut = function () {\n this._executeEditOperation(DeleteOperations.cut(this.context.config, this.context.model, this.getSelections()));\n };\n Cursor.prototype._externalExecuteCommand = function (command) {\n this._cursors.killSecondaryCursors();\n this._executeEditOperation(new EditOperationResult(0 /* Other */, [command], {\n shouldPushStackElementBefore: false,\n shouldPushStackElementAfter: false\n }));\n };\n Cursor.prototype._externalExecuteCommands = function (commands) {\n this._executeEditOperation(new EditOperationResult(0 /* Other */, commands, {\n shouldPushStackElementBefore: false,\n shouldPushStackElementAfter: false\n }));\n };\n Cursor.MAX_CURSOR_COUNT = 10000;\n return Cursor;\n}(viewEvents.ViewEventEmitter));\nexport { Cursor };\nvar CommandExecutor = /** @class */ (function () {\n function CommandExecutor() {\n }\n CommandExecutor.executeCommands = function (model, selectionsBefore, commands) {\n var ctx = {\n model: model,\n selectionsBefore: selectionsBefore,\n trackedRanges: [],\n trackedRangesDirection: []\n };\n var result = this._innerExecuteCommands(ctx, commands);\n for (var i = 0, len = ctx.trackedRanges.length; i < len; i++) {\n ctx.model._setTrackedRange(ctx.trackedRanges[i], null, TrackedRangeStickiness.AlwaysGrowsWhenTypingAtEdges);\n }\n return result;\n };\n CommandExecutor._innerExecuteCommands = function (ctx, commands) {\n if (this._arrayIsEmpty(commands)) {\n return null;\n }\n var commandsData = this._getEditOperations(ctx, commands);\n if (commandsData.operations.length === 0) {\n return null;\n }\n var rawOperations = commandsData.operations;\n var loserCursorsMap = this._getLoserCursorMap(rawOperations);\n if (loserCursorsMap.hasOwnProperty('0')) {\n // These commands are very messed up\n console.warn('Ignoring commands');\n return null;\n }\n // Remove operations belonging to losing cursors\n var filteredOperations = [];\n for (var i = 0, len = rawOperations.length; i < len; i++) {\n if (!loserCursorsMap.hasOwnProperty(rawOperations[i].identifier.major.toString())) {\n filteredOperations.push(rawOperations[i]);\n }\n }\n // TODO@Alex: find a better way to do this.\n // give the hint that edit operations are tracked to the model\n if (commandsData.hadTrackedEditOperation && filteredOperations.length > 0) {\n filteredOperations[0]._isTracked = true;\n }\n var selectionsAfter = ctx.model.pushEditOperations(ctx.selectionsBefore, filteredOperations, function (inverseEditOperations) {\n var groupedInverseEditOperations = [];\n for (var i = 0; i < ctx.selectionsBefore.length; i++) {\n groupedInverseEditOperations[i] = [];\n }\n for (var i = 0; i < inverseEditOperations.length; i++) {\n var op = inverseEditOperations[i];\n if (!op.identifier) {\n // perhaps auto whitespace trim edits\n continue;\n }\n groupedInverseEditOperations[op.identifier.major].push(op);\n }\n var minorBasedSorter = function (a, b) {\n return a.identifier.minor - b.identifier.minor;\n };\n var cursorSelections = [];\n var _loop_1 = function (i) {\n if (groupedInverseEditOperations[i].length > 0) {\n groupedInverseEditOperations[i].sort(minorBasedSorter);\n cursorSelections[i] = commands[i].computeCursorState(ctx.model, {\n getInverseEditOperations: function () {\n return groupedInverseEditOperations[i];\n },\n getTrackedSelection: function (id) {\n var idx = parseInt(id, 10);\n var range = ctx.model._getTrackedRange(ctx.trackedRanges[idx]);\n if (ctx.trackedRangesDirection[idx] === SelectionDirection.LTR) {\n return new Selection(range.startLineNumber, range.startColumn, range.endLineNumber, range.endColumn);\n }\n return new Selection(range.endLineNumber, range.endColumn, range.startLineNumber, range.startColumn);\n }\n });\n }\n else {\n cursorSelections[i] = ctx.selectionsBefore[i];\n }\n };\n for (var i = 0; i < ctx.selectionsBefore.length; i++) {\n _loop_1(i);\n }\n return cursorSelections;\n });\n // Extract losing cursors\n var losingCursors = [];\n for (var losingCursorIndex in loserCursorsMap) {\n if (loserCursorsMap.hasOwnProperty(losingCursorIndex)) {\n losingCursors.push(parseInt(losingCursorIndex, 10));\n }\n }\n // Sort losing cursors descending\n losingCursors.sort(function (a, b) {\n return b - a;\n });\n // Remove losing cursors\n for (var i = 0; i < losingCursors.length; i++) {\n selectionsAfter.splice(losingCursors[i], 1);\n }\n return selectionsAfter;\n };\n CommandExecutor._arrayIsEmpty = function (commands) {\n for (var i = 0, len = commands.length; i < len; i++) {\n if (commands[i]) {\n return false;\n }\n }\n return true;\n };\n CommandExecutor._getEditOperations = function (ctx, commands) {\n var operations = [];\n var hadTrackedEditOperation = false;\n for (var i = 0, len = commands.length; i < len; i++) {\n if (commands[i]) {\n var r = this._getEditOperationsFromCommand(ctx, i, commands[i]);\n operations = operations.concat(r.operations);\n hadTrackedEditOperation = hadTrackedEditOperation || r.hadTrackedEditOperation;\n }\n }\n return {\n operations: operations,\n hadTrackedEditOperation: hadTrackedEditOperation\n };\n };\n CommandExecutor._getEditOperationsFromCommand = function (ctx, majorIdentifier, command) {\n // This method acts as a transaction, if the command fails\n // everything it has done is ignored\n var operations = [];\n var operationMinor = 0;\n var addEditOperation = function (selection, text) {\n if (selection.isEmpty() && text === '') {\n // This command wants to add a no-op => no thank you\n return;\n }\n operations.push({\n identifier: {\n major: majorIdentifier,\n minor: operationMinor++\n },\n range: selection,\n text: text,\n forceMoveMarkers: false,\n isAutoWhitespaceEdit: command.insertsAutoWhitespace\n });\n };\n var hadTrackedEditOperation = false;\n var addTrackedEditOperation = function (selection, text) {\n hadTrackedEditOperation = true;\n addEditOperation(selection, text);\n };\n var trackSelection = function (selection, trackPreviousOnEmpty) {\n var stickiness;\n if (selection.isEmpty()) {\n if (typeof trackPreviousOnEmpty === 'boolean') {\n if (trackPreviousOnEmpty) {\n stickiness = TrackedRangeStickiness.GrowsOnlyWhenTypingBefore;\n }\n else {\n stickiness = TrackedRangeStickiness.GrowsOnlyWhenTypingAfter;\n }\n }\n else {\n // Try to lock it with surrounding text\n var maxLineColumn = ctx.model.getLineMaxColumn(selection.startLineNumber);\n if (selection.startColumn === maxLineColumn) {\n stickiness = TrackedRangeStickiness.GrowsOnlyWhenTypingBefore;\n }\n else {\n stickiness = TrackedRangeStickiness.GrowsOnlyWhenTypingAfter;\n }\n }\n }\n else {\n stickiness = TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges;\n }\n var l = ctx.trackedRanges.length;\n var id = ctx.model._setTrackedRange(null, selection, stickiness);\n ctx.trackedRanges[l] = id;\n ctx.trackedRangesDirection[l] = selection.getDirection();\n return l.toString();\n };\n var editOperationBuilder = {\n addEditOperation: addEditOperation,\n addTrackedEditOperation: addTrackedEditOperation,\n trackSelection: trackSelection\n };\n try {\n command.getEditOperations(ctx.model, editOperationBuilder);\n }\n catch (e) {\n e.friendlyMessage = nls.localize('corrupt.commands', \"Unexpected exception while executing command.\");\n onUnexpectedError(e);\n return {\n operations: [],\n hadTrackedEditOperation: false\n };\n }\n return {\n operations: operations,\n hadTrackedEditOperation: hadTrackedEditOperation\n };\n };\n CommandExecutor._getLoserCursorMap = function (operations) {\n // This is destructive on the array\n operations = operations.slice(0);\n // Sort operations with last one first\n operations.sort(function (a, b) {\n // Note the minus!\n return -(Range.compareRangesUsingEnds(a.range, b.range));\n });\n // Operations can not overlap!\n var loserCursorsMap = {};\n for (var i = 1; i < operations.length; i++) {\n var previousOp = operations[i - 1];\n var currentOp = operations[i];\n if (previousOp.range.getStartPosition().isBefore(currentOp.range.getEndPosition())) {\n var loserMajor = void 0;\n if (previousOp.identifier.major > currentOp.identifier.major) {\n // previousOp loses the battle\n loserMajor = previousOp.identifier.major;\n }\n else {\n loserMajor = currentOp.identifier.major;\n }\n loserCursorsMap[loserMajor.toString()] = true;\n for (var j = 0; j < operations.length; j++) {\n if (operations[j].identifier.major === loserMajor) {\n operations.splice(j, 1);\n if (j < i) {\n i--;\n }\n j--;\n }\n }\n if (i > 0) {\n i--;\n }\n }\n }\n return loserCursorsMap;\n };\n return CommandExecutor;\n}());\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport * as strings from '../../../base/common/strings';\nimport { TokenizationRegistry } from '../modes';\nimport { NULL_STATE, nullTokenize2 } from './nullMode';\nimport { LineTokens } from '../core/lineTokens';\nexport function tokenizeToString(text, languageId) {\n return _tokenizeToString(text, _getSafeTokenizationSupport(languageId));\n}\nexport function tokenizeLineToHTML(text, viewLineTokens, colorMap, startOffset, endOffset, tabSize) {\n var result = \"
    \";\n var charIndex = startOffset;\n var tabsCharDelta = 0;\n for (var tokenIndex = 0, tokenCount = viewLineTokens.getCount(); tokenIndex < tokenCount; tokenIndex++) {\n var tokenEndIndex = viewLineTokens.getEndOffset(tokenIndex);\n if (tokenEndIndex <= startOffset) {\n continue;\n }\n var partContent = '';\n for (; charIndex < tokenEndIndex && charIndex < endOffset; charIndex++) {\n var charCode = text.charCodeAt(charIndex);\n switch (charCode) {\n case 9 /* Tab */:\n var insertSpacesCount = tabSize - (charIndex + tabsCharDelta) % tabSize;\n tabsCharDelta += insertSpacesCount - 1;\n while (insertSpacesCount > 0) {\n partContent += ' ';\n insertSpacesCount--;\n }\n break;\n case 60 /* LessThan */:\n partContent += '<';\n break;\n case 62 /* GreaterThan */:\n partContent += '>';\n break;\n case 38 /* Ampersand */:\n partContent += '&';\n break;\n case 0 /* Null */:\n partContent += '�';\n break;\n case 65279 /* UTF8_BOM */:\n case 8232 /* LINE_SEPARATOR_2028 */:\n partContent += '\\ufffd';\n break;\n case 13 /* CarriageReturn */:\n // zero width space, because carriage return would introduce a line break\n partContent += '​';\n break;\n default:\n partContent += String.fromCharCode(charCode);\n }\n }\n result += \"\" + partContent + \"\";\n if (tokenEndIndex > endOffset || charIndex >= endOffset) {\n break;\n }\n }\n result += \"
    \";\n return result;\n}\nfunction _getSafeTokenizationSupport(languageId) {\n var tokenizationSupport = TokenizationRegistry.get(languageId);\n if (tokenizationSupport) {\n return tokenizationSupport;\n }\n return {\n getInitialState: function () { return NULL_STATE; },\n tokenize: undefined,\n tokenize2: function (buffer, state, deltaOffset) { return nullTokenize2(0 /* Null */, buffer, state, deltaOffset); }\n };\n}\nfunction _tokenizeToString(text, tokenizationSupport) {\n var result = \"
    \";\n var lines = text.split(/\\r\\n|\\r|\\n/);\n var currentState = tokenizationSupport.getInitialState();\n for (var i = 0, len = lines.length; i < len; i++) {\n var line = lines[i];\n if (i > 0) {\n result += \"
    \";\n }\n var tokenizationResult = tokenizationSupport.tokenize2(line, currentState, 0);\n LineTokens.convertToEndOffset(tokenizationResult.tokens, line.length);\n var lineTokens = new LineTokens(tokenizationResult.tokens, line);\n var viewLineTokens = lineTokens.inflate();\n var startOffset = 0;\n for (var j = 0, lenJ = viewLineTokens.getCount(); j < lenJ; j++) {\n var type = viewLineTokens.getClassName(j);\n var endIndex = viewLineTokens.getEndOffset(j);\n result += \"\" + strings.escape(line.substring(startOffset, endIndex)) + \"\";\n startOffset = endIndex;\n }\n currentState = tokenizationResult.endState;\n }\n result += \"
    \";\n return result;\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport * as strings from '../../../base/common/strings';\nvar Viewport = /** @class */ (function () {\n function Viewport(top, left, width, height) {\n this.top = top | 0;\n this.left = left | 0;\n this.width = width | 0;\n this.height = height | 0;\n }\n return Viewport;\n}());\nexport { Viewport };\nvar MinimapLinesRenderingData = /** @class */ (function () {\n function MinimapLinesRenderingData(tabSize, data) {\n this.tabSize = tabSize;\n this.data = data;\n }\n return MinimapLinesRenderingData;\n}());\nexport { MinimapLinesRenderingData };\nvar ViewLineData = /** @class */ (function () {\n function ViewLineData(content, continuesWithWrappedLine, minColumn, maxColumn, tokens) {\n this.content = content;\n this.continuesWithWrappedLine = continuesWithWrappedLine;\n this.minColumn = minColumn;\n this.maxColumn = maxColumn;\n this.tokens = tokens;\n }\n return ViewLineData;\n}());\nexport { ViewLineData };\nvar ViewLineRenderingData = /** @class */ (function () {\n function ViewLineRenderingData(minColumn, maxColumn, content, continuesWithWrappedLine, mightContainRTL, mightContainNonBasicASCII, tokens, inlineDecorations, tabSize) {\n this.minColumn = minColumn;\n this.maxColumn = maxColumn;\n this.content = content;\n this.continuesWithWrappedLine = continuesWithWrappedLine;\n this.isBasicASCII = ViewLineRenderingData.isBasicASCII(content, mightContainNonBasicASCII);\n this.containsRTL = ViewLineRenderingData.containsRTL(content, this.isBasicASCII, mightContainRTL);\n this.tokens = tokens;\n this.inlineDecorations = inlineDecorations;\n this.tabSize = tabSize;\n }\n ViewLineRenderingData.isBasicASCII = function (lineContent, mightContainNonBasicASCII) {\n if (mightContainNonBasicASCII) {\n return strings.isBasicASCII(lineContent);\n }\n return true;\n };\n ViewLineRenderingData.containsRTL = function (lineContent, isBasicASCII, mightContainRTL) {\n if (!isBasicASCII && mightContainRTL) {\n return strings.containsRTL(lineContent);\n }\n return false;\n };\n return ViewLineRenderingData;\n}());\nexport { ViewLineRenderingData };\nvar InlineDecoration = /** @class */ (function () {\n function InlineDecoration(range, inlineClassName, type) {\n this.range = range;\n this.inlineClassName = inlineClassName;\n this.type = type;\n }\n return InlineDecoration;\n}());\nexport { InlineDecoration };\nvar ViewModelDecoration = /** @class */ (function () {\n function ViewModelDecoration(range, options) {\n this.range = range;\n this.options = options;\n }\n return ViewModelDecoration;\n}());\nexport { ViewModelDecoration };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport { Range } from '../core/range';\nimport { Position } from '../core/position';\nimport { InlineDecoration, ViewModelDecoration } from './viewModel';\nvar ViewModelDecorations = /** @class */ (function () {\n function ViewModelDecorations(editorId, model, configuration, linesCollection, coordinatesConverter) {\n this.editorId = editorId;\n this.model = model;\n this.configuration = configuration;\n this._linesCollection = linesCollection;\n this._coordinatesConverter = coordinatesConverter;\n this._decorationsCache = Object.create(null);\n this._clearCachedModelDecorationsResolver();\n }\n ViewModelDecorations.prototype._clearCachedModelDecorationsResolver = function () {\n this._cachedModelDecorationsResolver = null;\n this._cachedModelDecorationsResolverViewRange = null;\n };\n ViewModelDecorations.prototype.dispose = function () {\n this._decorationsCache = null;\n this._clearCachedModelDecorationsResolver();\n };\n ViewModelDecorations.prototype.reset = function () {\n this._decorationsCache = Object.create(null);\n this._clearCachedModelDecorationsResolver();\n };\n ViewModelDecorations.prototype.onModelDecorationsChanged = function () {\n this._decorationsCache = Object.create(null);\n this._clearCachedModelDecorationsResolver();\n };\n ViewModelDecorations.prototype.onLineMappingChanged = function () {\n this._decorationsCache = Object.create(null);\n this._clearCachedModelDecorationsResolver();\n };\n ViewModelDecorations.prototype._getOrCreateViewModelDecoration = function (modelDecoration) {\n var id = modelDecoration.id;\n var r = this._decorationsCache[id];\n if (!r) {\n var modelRange = modelDecoration.range;\n var options = modelDecoration.options;\n var viewRange = void 0;\n if (options.isWholeLine) {\n var start = this._coordinatesConverter.convertModelPositionToViewPosition(new Position(modelRange.startLineNumber, 1));\n var end = this._coordinatesConverter.convertModelPositionToViewPosition(new Position(modelRange.endLineNumber, this.model.getLineMaxColumn(modelRange.endLineNumber)));\n viewRange = new Range(start.lineNumber, start.column, end.lineNumber, end.column);\n }\n else {\n viewRange = this._coordinatesConverter.convertModelRangeToViewRange(modelRange);\n }\n r = new ViewModelDecoration(viewRange, options);\n this._decorationsCache[id] = r;\n }\n return r;\n };\n ViewModelDecorations.prototype.getDecorationsViewportData = function (viewRange) {\n var cacheIsValid = true;\n cacheIsValid = cacheIsValid && (this._cachedModelDecorationsResolver !== null);\n cacheIsValid = cacheIsValid && (viewRange.equalsRange(this._cachedModelDecorationsResolverViewRange));\n if (!cacheIsValid) {\n this._cachedModelDecorationsResolver = this._getDecorationsViewportData(viewRange);\n this._cachedModelDecorationsResolverViewRange = viewRange;\n }\n return this._cachedModelDecorationsResolver;\n };\n ViewModelDecorations.prototype._getDecorationsViewportData = function (viewportRange) {\n var modelDecorations = this._linesCollection.getDecorationsInRange(viewportRange, this.editorId, this.configuration.editor.readOnly);\n var startLineNumber = viewportRange.startLineNumber;\n var endLineNumber = viewportRange.endLineNumber;\n var decorationsInViewport = [], decorationsInViewportLen = 0;\n var inlineDecorations = [];\n for (var j = startLineNumber; j <= endLineNumber; j++) {\n inlineDecorations[j - startLineNumber] = [];\n }\n for (var i = 0, len = modelDecorations.length; i < len; i++) {\n var modelDecoration = modelDecorations[i];\n var decorationOptions = modelDecoration.options;\n var viewModelDecoration = this._getOrCreateViewModelDecoration(modelDecoration);\n var viewRange = viewModelDecoration.range;\n decorationsInViewport[decorationsInViewportLen++] = viewModelDecoration;\n if (decorationOptions.inlineClassName) {\n var inlineDecoration = new InlineDecoration(viewRange, decorationOptions.inlineClassName, decorationOptions.inlineClassNameAffectsLetterSpacing ? 3 /* RegularAffectingLetterSpacing */ : 0 /* Regular */);\n var intersectedStartLineNumber = Math.max(startLineNumber, viewRange.startLineNumber);\n var intersectedEndLineNumber = Math.min(endLineNumber, viewRange.endLineNumber);\n for (var j = intersectedStartLineNumber; j <= intersectedEndLineNumber; j++) {\n inlineDecorations[j - startLineNumber].push(inlineDecoration);\n }\n }\n if (decorationOptions.beforeContentClassName) {\n if (startLineNumber <= viewRange.startLineNumber && viewRange.startLineNumber <= endLineNumber) {\n var inlineDecoration = new InlineDecoration(new Range(viewRange.startLineNumber, viewRange.startColumn, viewRange.startLineNumber, viewRange.startColumn), decorationOptions.beforeContentClassName, 1 /* Before */);\n inlineDecorations[viewRange.startLineNumber - startLineNumber].push(inlineDecoration);\n }\n }\n if (decorationOptions.afterContentClassName) {\n if (startLineNumber <= viewRange.endLineNumber && viewRange.endLineNumber <= endLineNumber) {\n var inlineDecoration = new InlineDecoration(new Range(viewRange.endLineNumber, viewRange.endColumn, viewRange.endLineNumber, viewRange.endColumn), decorationOptions.afterContentClassName, 2 /* After */);\n inlineDecorations[viewRange.endLineNumber - startLineNumber].push(inlineDecoration);\n }\n }\n }\n return {\n decorations: decorationsInViewport,\n inlineDecorations: inlineDecorations\n };\n };\n return ViewModelDecorations;\n}());\nexport { ViewModelDecorations };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport { toUint32 } from '../core/uint';\nvar PrefixSumIndexOfResult = /** @class */ (function () {\n function PrefixSumIndexOfResult(index, remainder) {\n this.index = index;\n this.remainder = remainder;\n }\n return PrefixSumIndexOfResult;\n}());\nexport { PrefixSumIndexOfResult };\nvar PrefixSumComputer = /** @class */ (function () {\n function PrefixSumComputer(values) {\n this.values = values;\n this.prefixSum = new Uint32Array(values.length);\n this.prefixSumValidIndex = new Int32Array(1);\n this.prefixSumValidIndex[0] = -1;\n }\n PrefixSumComputer.prototype.getCount = function () {\n return this.values.length;\n };\n PrefixSumComputer.prototype.insertValues = function (insertIndex, insertValues) {\n insertIndex = toUint32(insertIndex);\n var oldValues = this.values;\n var oldPrefixSum = this.prefixSum;\n var insertValuesLen = insertValues.length;\n if (insertValuesLen === 0) {\n return false;\n }\n this.values = new Uint32Array(oldValues.length + insertValuesLen);\n this.values.set(oldValues.subarray(0, insertIndex), 0);\n this.values.set(oldValues.subarray(insertIndex), insertIndex + insertValuesLen);\n this.values.set(insertValues, insertIndex);\n if (insertIndex - 1 < this.prefixSumValidIndex[0]) {\n this.prefixSumValidIndex[0] = insertIndex - 1;\n }\n this.prefixSum = new Uint32Array(this.values.length);\n if (this.prefixSumValidIndex[0] >= 0) {\n this.prefixSum.set(oldPrefixSum.subarray(0, this.prefixSumValidIndex[0] + 1));\n }\n return true;\n };\n PrefixSumComputer.prototype.changeValue = function (index, value) {\n index = toUint32(index);\n value = toUint32(value);\n if (this.values[index] === value) {\n return false;\n }\n this.values[index] = value;\n if (index - 1 < this.prefixSumValidIndex[0]) {\n this.prefixSumValidIndex[0] = index - 1;\n }\n return true;\n };\n PrefixSumComputer.prototype.removeValues = function (startIndex, cnt) {\n startIndex = toUint32(startIndex);\n cnt = toUint32(cnt);\n var oldValues = this.values;\n var oldPrefixSum = this.prefixSum;\n if (startIndex >= oldValues.length) {\n return false;\n }\n var maxCnt = oldValues.length - startIndex;\n if (cnt >= maxCnt) {\n cnt = maxCnt;\n }\n if (cnt === 0) {\n return false;\n }\n this.values = new Uint32Array(oldValues.length - cnt);\n this.values.set(oldValues.subarray(0, startIndex), 0);\n this.values.set(oldValues.subarray(startIndex + cnt), startIndex);\n this.prefixSum = new Uint32Array(this.values.length);\n if (startIndex - 1 < this.prefixSumValidIndex[0]) {\n this.prefixSumValidIndex[0] = startIndex - 1;\n }\n if (this.prefixSumValidIndex[0] >= 0) {\n this.prefixSum.set(oldPrefixSum.subarray(0, this.prefixSumValidIndex[0] + 1));\n }\n return true;\n };\n PrefixSumComputer.prototype.getTotalValue = function () {\n if (this.values.length === 0) {\n return 0;\n }\n return this._getAccumulatedValue(this.values.length - 1);\n };\n PrefixSumComputer.prototype.getAccumulatedValue = function (index) {\n if (index < 0) {\n return 0;\n }\n index = toUint32(index);\n return this._getAccumulatedValue(index);\n };\n PrefixSumComputer.prototype._getAccumulatedValue = function (index) {\n if (index <= this.prefixSumValidIndex[0]) {\n return this.prefixSum[index];\n }\n var startIndex = this.prefixSumValidIndex[0] + 1;\n if (startIndex === 0) {\n this.prefixSum[0] = this.values[0];\n startIndex++;\n }\n if (index >= this.values.length) {\n index = this.values.length - 1;\n }\n for (var i = startIndex; i <= index; i++) {\n this.prefixSum[i] = this.prefixSum[i - 1] + this.values[i];\n }\n this.prefixSumValidIndex[0] = Math.max(this.prefixSumValidIndex[0], index);\n return this.prefixSum[index];\n };\n PrefixSumComputer.prototype.getIndexOf = function (accumulatedValue) {\n accumulatedValue = Math.floor(accumulatedValue); //@perf\n // Compute all sums (to get a fully valid prefixSum)\n this.getTotalValue();\n var low = 0;\n var high = this.values.length - 1;\n var mid;\n var midStop;\n var midStart;\n while (low <= high) {\n mid = low + ((high - low) / 2) | 0;\n midStop = this.prefixSum[mid];\n midStart = midStop - this.values[mid];\n if (accumulatedValue < midStart) {\n high = mid - 1;\n }\n else if (accumulatedValue >= midStop) {\n low = mid + 1;\n }\n else {\n break;\n }\n }\n return new PrefixSumIndexOfResult(mid, accumulatedValue - midStart);\n };\n return PrefixSumComputer;\n}());\nexport { PrefixSumComputer };\nvar PrefixSumComputerWithCache = /** @class */ (function () {\n function PrefixSumComputerWithCache(values) {\n this._cacheAccumulatedValueStart = 0;\n this._cache = null;\n this._actual = new PrefixSumComputer(values);\n this._bustCache();\n }\n PrefixSumComputerWithCache.prototype._bustCache = function () {\n this._cacheAccumulatedValueStart = 0;\n this._cache = null;\n };\n PrefixSumComputerWithCache.prototype.insertValues = function (insertIndex, insertValues) {\n if (this._actual.insertValues(insertIndex, insertValues)) {\n this._bustCache();\n }\n };\n PrefixSumComputerWithCache.prototype.changeValue = function (index, value) {\n if (this._actual.changeValue(index, value)) {\n this._bustCache();\n }\n };\n PrefixSumComputerWithCache.prototype.removeValues = function (startIndex, cnt) {\n if (this._actual.removeValues(startIndex, cnt)) {\n this._bustCache();\n }\n };\n PrefixSumComputerWithCache.prototype.getTotalValue = function () {\n return this._actual.getTotalValue();\n };\n PrefixSumComputerWithCache.prototype.getAccumulatedValue = function (index) {\n return this._actual.getAccumulatedValue(index);\n };\n PrefixSumComputerWithCache.prototype.getIndexOf = function (accumulatedValue) {\n accumulatedValue = Math.floor(accumulatedValue); //@perf\n if (this._cache !== null) {\n var cacheIndex = accumulatedValue - this._cacheAccumulatedValueStart;\n if (cacheIndex >= 0 && cacheIndex < this._cache.length) {\n // Cache hit!\n return this._cache[cacheIndex];\n }\n }\n // Cache miss!\n return this._actual.getIndexOf(accumulatedValue);\n };\n /**\n * Gives a hint that a lot of requests are about to come in for these accumulated values.\n */\n PrefixSumComputerWithCache.prototype.warmUpCache = function (accumulatedValueStart, accumulatedValueEnd) {\n var newCache = [];\n for (var accumulatedValue = accumulatedValueStart; accumulatedValue <= accumulatedValueEnd; accumulatedValue++) {\n newCache[accumulatedValue - accumulatedValueStart] = this.getIndexOf(accumulatedValue);\n }\n this._cache = newCache;\n this._cacheAccumulatedValueStart = accumulatedValueStart;\n };\n return PrefixSumComputerWithCache;\n}());\nexport { PrefixSumComputerWithCache };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nfunction roundFloat(number, decimalPoints) {\n var decimal = Math.pow(10, decimalPoints);\n return Math.round(number * decimal) / decimal;\n}\nvar RGBA = /** @class */ (function () {\n function RGBA(r, g, b, a) {\n if (a === void 0) { a = 1; }\n this.r = Math.min(255, Math.max(0, r)) | 0;\n this.g = Math.min(255, Math.max(0, g)) | 0;\n this.b = Math.min(255, Math.max(0, b)) | 0;\n this.a = roundFloat(Math.max(Math.min(1, a), 0), 3);\n }\n RGBA.equals = function (a, b) {\n return a.r === b.r && a.g === b.g && a.b === b.b && a.a === b.a;\n };\n return RGBA;\n}());\nexport { RGBA };\nvar HSLA = /** @class */ (function () {\n function HSLA(h, s, l, a) {\n this.h = Math.max(Math.min(360, h), 0) | 0;\n this.s = roundFloat(Math.max(Math.min(1, s), 0), 3);\n this.l = roundFloat(Math.max(Math.min(1, l), 0), 3);\n this.a = roundFloat(Math.max(Math.min(1, a), 0), 3);\n }\n HSLA.equals = function (a, b) {\n return a.h === b.h && a.s === b.s && a.l === b.l && a.a === b.a;\n };\n /**\n * Converts an RGB color value to HSL. Conversion formula\n * adapted from http://en.wikipedia.org/wiki/HSL_color_space.\n * Assumes r, g, and b are contained in the set [0, 255] and\n * returns h in the set [0, 360], s, and l in the set [0, 1].\n */\n HSLA.fromRGBA = function (rgba) {\n var r = rgba.r / 255;\n var g = rgba.g / 255;\n var b = rgba.b / 255;\n var a = rgba.a;\n var max = Math.max(r, g, b);\n var min = Math.min(r, g, b);\n var h = 0;\n var s = 0;\n var l = (min + max) / 2;\n var chroma = max - min;\n if (chroma > 0) {\n s = Math.min((l <= 0.5 ? chroma / (2 * l) : chroma / (2 - (2 * l))), 1);\n switch (max) {\n case r:\n h = (g - b) / chroma + (g < b ? 6 : 0);\n break;\n case g:\n h = (b - r) / chroma + 2;\n break;\n case b:\n h = (r - g) / chroma + 4;\n break;\n }\n h *= 60;\n h = Math.round(h);\n }\n return new HSLA(h, s, l, a);\n };\n HSLA._hue2rgb = function (p, q, t) {\n if (t < 0) {\n t += 1;\n }\n if (t > 1) {\n t -= 1;\n }\n if (t < 1 / 6) {\n return p + (q - p) * 6 * t;\n }\n if (t < 1 / 2) {\n return q;\n }\n if (t < 2 / 3) {\n return p + (q - p) * (2 / 3 - t) * 6;\n }\n return p;\n };\n /**\n * Converts an HSL color value to RGB. Conversion formula\n * adapted from http://en.wikipedia.org/wiki/HSL_color_space.\n * Assumes h in the set [0, 360] s, and l are contained in the set [0, 1] and\n * returns r, g, and b in the set [0, 255].\n */\n HSLA.toRGBA = function (hsla) {\n var h = hsla.h / 360;\n var s = hsla.s, l = hsla.l, a = hsla.a;\n var r, g, b;\n if (s === 0) {\n r = g = b = l; // achromatic\n }\n else {\n var q = l < 0.5 ? l * (1 + s) : l + s - l * s;\n var p = 2 * l - q;\n r = HSLA._hue2rgb(p, q, h + 1 / 3);\n g = HSLA._hue2rgb(p, q, h);\n b = HSLA._hue2rgb(p, q, h - 1 / 3);\n }\n return new RGBA(Math.round(r * 255), Math.round(g * 255), Math.round(b * 255), a);\n };\n return HSLA;\n}());\nexport { HSLA };\nvar HSVA = /** @class */ (function () {\n function HSVA(h, s, v, a) {\n this.h = Math.max(Math.min(360, h), 0) | 0;\n this.s = roundFloat(Math.max(Math.min(1, s), 0), 3);\n this.v = roundFloat(Math.max(Math.min(1, v), 0), 3);\n this.a = roundFloat(Math.max(Math.min(1, a), 0), 3);\n }\n HSVA.equals = function (a, b) {\n return a.h === b.h && a.s === b.s && a.v === b.v && a.a === b.a;\n };\n // from http://www.rapidtables.com/convert/color/rgb-to-hsv.htm\n HSVA.fromRGBA = function (rgba) {\n var r = rgba.r / 255;\n var g = rgba.g / 255;\n var b = rgba.b / 255;\n var cmax = Math.max(r, g, b);\n var cmin = Math.min(r, g, b);\n var delta = cmax - cmin;\n var s = cmax === 0 ? 0 : (delta / cmax);\n var m;\n if (delta === 0) {\n m = 0;\n }\n else if (cmax === r) {\n m = ((((g - b) / delta) % 6) + 6) % 6;\n }\n else if (cmax === g) {\n m = ((b - r) / delta) + 2;\n }\n else {\n m = ((r - g) / delta) + 4;\n }\n return new HSVA(Math.round(m * 60), s, cmax, rgba.a);\n };\n // from http://www.rapidtables.com/convert/color/hsv-to-rgb.htm\n HSVA.toRGBA = function (hsva) {\n var h = hsva.h, s = hsva.s, v = hsva.v, a = hsva.a;\n var c = v * s;\n var x = c * (1 - Math.abs((h / 60) % 2 - 1));\n var m = v - c;\n var _a = [0, 0, 0], r = _a[0], g = _a[1], b = _a[2];\n if (h < 60) {\n r = c;\n g = x;\n }\n else if (h < 120) {\n r = x;\n g = c;\n }\n else if (h < 180) {\n g = c;\n b = x;\n }\n else if (h < 240) {\n g = x;\n b = c;\n }\n else if (h < 300) {\n r = x;\n b = c;\n }\n else if (h < 360) {\n r = c;\n b = x;\n }\n r = Math.round((r + m) * 255);\n g = Math.round((g + m) * 255);\n b = Math.round((b + m) * 255);\n return new RGBA(r, g, b, a);\n };\n return HSVA;\n}());\nexport { HSVA };\nvar Color = /** @class */ (function () {\n function Color(arg) {\n if (!arg) {\n throw new Error('Color needs a value');\n }\n else if (arg instanceof RGBA) {\n this.rgba = arg;\n }\n else if (arg instanceof HSLA) {\n this._hsla = arg;\n this.rgba = HSLA.toRGBA(arg);\n }\n else if (arg instanceof HSVA) {\n this._hsva = arg;\n this.rgba = HSVA.toRGBA(arg);\n }\n else {\n throw new Error('Invalid color ctor argument');\n }\n }\n Color.fromHex = function (hex) {\n return Color.Format.CSS.parseHex(hex) || Color.red;\n };\n Object.defineProperty(Color.prototype, \"hsla\", {\n get: function () {\n if (this._hsla) {\n return this._hsla;\n }\n else {\n return HSLA.fromRGBA(this.rgba);\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Color.prototype, \"hsva\", {\n get: function () {\n if (this._hsva) {\n return this._hsva;\n }\n return HSVA.fromRGBA(this.rgba);\n },\n enumerable: true,\n configurable: true\n });\n Color.prototype.equals = function (other) {\n return !!other && RGBA.equals(this.rgba, other.rgba) && HSLA.equals(this.hsla, other.hsla) && HSVA.equals(this.hsva, other.hsva);\n };\n /**\n * http://www.w3.org/TR/WCAG20/#relativeluminancedef\n * Returns the number in the set [0, 1]. O => Darkest Black. 1 => Lightest white.\n */\n Color.prototype.getRelativeLuminance = function () {\n var R = Color._relativeLuminanceForComponent(this.rgba.r);\n var G = Color._relativeLuminanceForComponent(this.rgba.g);\n var B = Color._relativeLuminanceForComponent(this.rgba.b);\n var luminance = 0.2126 * R + 0.7152 * G + 0.0722 * B;\n return roundFloat(luminance, 4);\n };\n Color._relativeLuminanceForComponent = function (color) {\n var c = color / 255;\n return (c <= 0.03928) ? c / 12.92 : Math.pow(((c + 0.055) / 1.055), 2.4);\n };\n /**\n *\thttp://24ways.org/2010/calculating-color-contrast\n * Return 'true' if lighter color otherwise 'false'\n */\n Color.prototype.isLighter = function () {\n var yiq = (this.rgba.r * 299 + this.rgba.g * 587 + this.rgba.b * 114) / 1000;\n return yiq >= 128;\n };\n Color.prototype.isLighterThan = function (another) {\n var lum1 = this.getRelativeLuminance();\n var lum2 = another.getRelativeLuminance();\n return lum1 > lum2;\n };\n Color.prototype.isDarkerThan = function (another) {\n var lum1 = this.getRelativeLuminance();\n var lum2 = another.getRelativeLuminance();\n return lum1 < lum2;\n };\n Color.prototype.lighten = function (factor) {\n return new Color(new HSLA(this.hsla.h, this.hsla.s, this.hsla.l + this.hsla.l * factor, this.hsla.a));\n };\n Color.prototype.darken = function (factor) {\n return new Color(new HSLA(this.hsla.h, this.hsla.s, this.hsla.l - this.hsla.l * factor, this.hsla.a));\n };\n Color.prototype.transparent = function (factor) {\n var _a = this.rgba, r = _a.r, g = _a.g, b = _a.b, a = _a.a;\n return new Color(new RGBA(r, g, b, a * factor));\n };\n Color.prototype.isTransparent = function () {\n return this.rgba.a === 0;\n };\n Color.prototype.isOpaque = function () {\n return this.rgba.a === 1;\n };\n Color.prototype.opposite = function () {\n return new Color(new RGBA(255 - this.rgba.r, 255 - this.rgba.g, 255 - this.rgba.b, this.rgba.a));\n };\n Color.prototype.toString = function () {\n return Color.Format.CSS.format(this);\n };\n Color.getLighterColor = function (of, relative, factor) {\n if (of.isLighterThan(relative)) {\n return of;\n }\n factor = factor ? factor : 0.5;\n var lum1 = of.getRelativeLuminance();\n var lum2 = relative.getRelativeLuminance();\n factor = factor * (lum2 - lum1) / lum2;\n return of.lighten(factor);\n };\n Color.getDarkerColor = function (of, relative, factor) {\n if (of.isDarkerThan(relative)) {\n return of;\n }\n factor = factor ? factor : 0.5;\n var lum1 = of.getRelativeLuminance();\n var lum2 = relative.getRelativeLuminance();\n factor = factor * (lum1 - lum2) / lum1;\n return of.darken(factor);\n };\n Color.white = new Color(new RGBA(255, 255, 255, 1));\n Color.black = new Color(new RGBA(0, 0, 0, 1));\n Color.red = new Color(new RGBA(255, 0, 0, 1));\n Color.blue = new Color(new RGBA(0, 0, 255, 1));\n Color.cyan = new Color(new RGBA(0, 255, 255, 1));\n Color.lightgrey = new Color(new RGBA(211, 211, 211, 1));\n Color.transparent = new Color(new RGBA(0, 0, 0, 0));\n return Color;\n}());\nexport { Color };\n(function (Color) {\n var Format;\n (function (Format) {\n var CSS;\n (function (CSS) {\n function formatRGB(color) {\n if (color.rgba.a === 1) {\n return \"rgb(\" + color.rgba.r + \", \" + color.rgba.g + \", \" + color.rgba.b + \")\";\n }\n return Color.Format.CSS.formatRGBA(color);\n }\n CSS.formatRGB = formatRGB;\n function formatRGBA(color) {\n return \"rgba(\" + color.rgba.r + \", \" + color.rgba.g + \", \" + color.rgba.b + \", \" + +(color.rgba.a).toFixed(2) + \")\";\n }\n CSS.formatRGBA = formatRGBA;\n function formatHSL(color) {\n if (color.hsla.a === 1) {\n return \"hsl(\" + color.hsla.h + \", \" + (color.hsla.s * 100).toFixed(2) + \"%, \" + (color.hsla.l * 100).toFixed(2) + \"%)\";\n }\n return Color.Format.CSS.formatHSLA(color);\n }\n CSS.formatHSL = formatHSL;\n function formatHSLA(color) {\n return \"hsla(\" + color.hsla.h + \", \" + (color.hsla.s * 100).toFixed(2) + \"%, \" + (color.hsla.l * 100).toFixed(2) + \"%, \" + color.hsla.a.toFixed(2) + \")\";\n }\n CSS.formatHSLA = formatHSLA;\n function _toTwoDigitHex(n) {\n var r = n.toString(16);\n return r.length !== 2 ? '0' + r : r;\n }\n /**\n * Formats the color as #RRGGBB\n */\n function formatHex(color) {\n return \"#\" + _toTwoDigitHex(color.rgba.r) + _toTwoDigitHex(color.rgba.g) + _toTwoDigitHex(color.rgba.b);\n }\n CSS.formatHex = formatHex;\n /**\n * Formats the color as #RRGGBBAA\n * If 'compact' is set, colors without transparancy will be printed as #RRGGBB\n */\n function formatHexA(color, compact) {\n if (compact === void 0) { compact = false; }\n if (compact && color.rgba.a === 1) {\n return Color.Format.CSS.formatHex(color);\n }\n return \"#\" + _toTwoDigitHex(color.rgba.r) + _toTwoDigitHex(color.rgba.g) + _toTwoDigitHex(color.rgba.b) + _toTwoDigitHex(Math.round(color.rgba.a * 255));\n }\n CSS.formatHexA = formatHexA;\n /**\n * The default format will use HEX if opaque and RGBA otherwise.\n */\n function format(color) {\n if (!color) {\n return null;\n }\n if (color.isOpaque()) {\n return Color.Format.CSS.formatHex(color);\n }\n return Color.Format.CSS.formatRGBA(color);\n }\n CSS.format = format;\n /**\n * Converts an Hex color value to a Color.\n * returns r, g, and b are contained in the set [0, 255]\n * @param hex string (#RGB, #RGBA, #RRGGBB or #RRGGBBAA).\n */\n function parseHex(hex) {\n if (!hex) {\n // Invalid color\n return null;\n }\n var length = hex.length;\n if (length === 0) {\n // Invalid color\n return null;\n }\n if (hex.charCodeAt(0) !== 35 /* Hash */) {\n // Does not begin with a #\n return null;\n }\n if (length === 7) {\n // #RRGGBB format\n var r = 16 * _parseHexDigit(hex.charCodeAt(1)) + _parseHexDigit(hex.charCodeAt(2));\n var g = 16 * _parseHexDigit(hex.charCodeAt(3)) + _parseHexDigit(hex.charCodeAt(4));\n var b = 16 * _parseHexDigit(hex.charCodeAt(5)) + _parseHexDigit(hex.charCodeAt(6));\n return new Color(new RGBA(r, g, b, 1));\n }\n if (length === 9) {\n // #RRGGBBAA format\n var r = 16 * _parseHexDigit(hex.charCodeAt(1)) + _parseHexDigit(hex.charCodeAt(2));\n var g = 16 * _parseHexDigit(hex.charCodeAt(3)) + _parseHexDigit(hex.charCodeAt(4));\n var b = 16 * _parseHexDigit(hex.charCodeAt(5)) + _parseHexDigit(hex.charCodeAt(6));\n var a = 16 * _parseHexDigit(hex.charCodeAt(7)) + _parseHexDigit(hex.charCodeAt(8));\n return new Color(new RGBA(r, g, b, a / 255));\n }\n if (length === 4) {\n // #RGB format\n var r = _parseHexDigit(hex.charCodeAt(1));\n var g = _parseHexDigit(hex.charCodeAt(2));\n var b = _parseHexDigit(hex.charCodeAt(3));\n return new Color(new RGBA(16 * r + r, 16 * g + g, 16 * b + b));\n }\n if (length === 5) {\n // #RGBA format\n var r = _parseHexDigit(hex.charCodeAt(1));\n var g = _parseHexDigit(hex.charCodeAt(2));\n var b = _parseHexDigit(hex.charCodeAt(3));\n var a = _parseHexDigit(hex.charCodeAt(4));\n return new Color(new RGBA(16 * r + r, 16 * g + g, 16 * b + b, (16 * a + a) / 255));\n }\n // Invalid color\n return null;\n }\n CSS.parseHex = parseHex;\n function _parseHexDigit(charCode) {\n switch (charCode) {\n case 48 /* Digit0 */: return 0;\n case 49 /* Digit1 */: return 1;\n case 50 /* Digit2 */: return 2;\n case 51 /* Digit3 */: return 3;\n case 52 /* Digit4 */: return 4;\n case 53 /* Digit5 */: return 5;\n case 54 /* Digit6 */: return 6;\n case 55 /* Digit7 */: return 7;\n case 56 /* Digit8 */: return 8;\n case 57 /* Digit9 */: return 9;\n case 97 /* a */: return 10;\n case 65 /* A */: return 10;\n case 98 /* b */: return 11;\n case 66 /* B */: return 11;\n case 99 /* c */: return 12;\n case 67 /* C */: return 12;\n case 100 /* d */: return 13;\n case 68 /* D */: return 13;\n case 101 /* e */: return 14;\n case 69 /* E */: return 14;\n case 102 /* f */: return 15;\n case 70 /* F */: return 15;\n }\n return 0;\n }\n })(CSS = Format.CSS || (Format.CSS = {}));\n })(Format = Color.Format || (Color.Format = {}));\n})(Color || (Color = {}));\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport { Position } from '../core/position';\nimport { Range } from '../core/range';\nimport { PrefixSumComputerWithCache } from './prefixSumComputer';\nimport { ViewLineData } from './viewModel';\nimport * as viewEvents from '../view/viewEvents';\nimport { ModelDecorationOptions } from '../model/textModel';\nimport { Color } from '../../../base/common/color';\nvar OutputPosition = /** @class */ (function () {\n function OutputPosition(outputLineIndex, outputOffset) {\n this.outputLineIndex = outputLineIndex;\n this.outputOffset = outputOffset;\n }\n return OutputPosition;\n}());\nexport { OutputPosition };\nvar CoordinatesConverter = /** @class */ (function () {\n function CoordinatesConverter(lines) {\n this._lines = lines;\n }\n // View -> Model conversion and related methods\n CoordinatesConverter.prototype.convertViewPositionToModelPosition = function (viewPosition) {\n return this._lines.convertViewPositionToModelPosition(viewPosition.lineNumber, viewPosition.column);\n };\n CoordinatesConverter.prototype.convertViewRangeToModelRange = function (viewRange) {\n var start = this._lines.convertViewPositionToModelPosition(viewRange.startLineNumber, viewRange.startColumn);\n var end = this._lines.convertViewPositionToModelPosition(viewRange.endLineNumber, viewRange.endColumn);\n return new Range(start.lineNumber, start.column, end.lineNumber, end.column);\n };\n CoordinatesConverter.prototype.validateViewPosition = function (viewPosition, expectedModelPosition) {\n return this._lines.validateViewPosition(viewPosition.lineNumber, viewPosition.column, expectedModelPosition);\n };\n CoordinatesConverter.prototype.validateViewRange = function (viewRange, expectedModelRange) {\n var validViewStart = this._lines.validateViewPosition(viewRange.startLineNumber, viewRange.startColumn, expectedModelRange.getStartPosition());\n var validViewEnd = this._lines.validateViewPosition(viewRange.endLineNumber, viewRange.endColumn, expectedModelRange.getEndPosition());\n return new Range(validViewStart.lineNumber, validViewStart.column, validViewEnd.lineNumber, validViewEnd.column);\n };\n // Model -> View conversion and related methods\n CoordinatesConverter.prototype.convertModelPositionToViewPosition = function (modelPosition) {\n return this._lines.convertModelPositionToViewPosition(modelPosition.lineNumber, modelPosition.column);\n };\n CoordinatesConverter.prototype.convertModelRangeToViewRange = function (modelRange) {\n var start = this._lines.convertModelPositionToViewPosition(modelRange.startLineNumber, modelRange.startColumn);\n var end = this._lines.convertModelPositionToViewPosition(modelRange.endLineNumber, modelRange.endColumn);\n return new Range(start.lineNumber, start.column, end.lineNumber, end.column);\n };\n CoordinatesConverter.prototype.modelPositionIsVisible = function (modelPosition) {\n return this._lines.modelPositionIsVisible(modelPosition.lineNumber, modelPosition.column);\n };\n return CoordinatesConverter;\n}());\nexport { CoordinatesConverter };\nvar SplitLinesCollection = /** @class */ (function () {\n function SplitLinesCollection(model, linePositionMapperFactory, tabSize, wrappingColumn, columnsForFullWidthChar, wrappingIndent) {\n this.model = model;\n this._validModelVersionId = -1;\n this.tabSize = tabSize;\n this.wrappingColumn = wrappingColumn;\n this.columnsForFullWidthChar = columnsForFullWidthChar;\n this.wrappingIndent = wrappingIndent;\n this.linePositionMapperFactory = linePositionMapperFactory;\n this._constructLines(true);\n }\n SplitLinesCollection.prototype.dispose = function () {\n this.hiddenAreasIds = this.model.deltaDecorations(this.hiddenAreasIds, []);\n };\n SplitLinesCollection.prototype.createCoordinatesConverter = function () {\n return new CoordinatesConverter(this);\n };\n SplitLinesCollection.prototype._ensureValidState = function () {\n var modelVersion = this.model.getVersionId();\n if (modelVersion !== this._validModelVersionId) {\n // This is pretty bad, it means we lost track of the model...\n throw new Error(\"ViewModel is out of sync with Model!\");\n }\n };\n SplitLinesCollection.prototype._constructLines = function (resetHiddenAreas) {\n var _this = this;\n this.lines = [];\n if (resetHiddenAreas) {\n this.hiddenAreasIds = [];\n }\n var linesContent = this.model.getLinesContent();\n var lineCount = linesContent.length;\n var values = new Uint32Array(lineCount);\n var hiddenAreas = this.hiddenAreasIds.map(function (areaId) { return _this.model.getDecorationRange(areaId); }).sort(Range.compareRangesUsingStarts);\n var hiddenAreaStart = 1, hiddenAreaEnd = 0;\n var hiddenAreaIdx = -1;\n var nextLineNumberToUpdateHiddenArea = (hiddenAreaIdx + 1 < hiddenAreas.length) ? hiddenAreaEnd + 1 : lineCount + 2;\n for (var i = 0; i < lineCount; i++) {\n var lineNumber = i + 1;\n if (lineNumber === nextLineNumberToUpdateHiddenArea) {\n hiddenAreaIdx++;\n hiddenAreaStart = hiddenAreas[hiddenAreaIdx].startLineNumber;\n hiddenAreaEnd = hiddenAreas[hiddenAreaIdx].endLineNumber;\n nextLineNumberToUpdateHiddenArea = (hiddenAreaIdx + 1 < hiddenAreas.length) ? hiddenAreaEnd + 1 : lineCount + 2;\n }\n var isInHiddenArea = (lineNumber >= hiddenAreaStart && lineNumber <= hiddenAreaEnd);\n var line = createSplitLine(this.linePositionMapperFactory, linesContent[i], this.tabSize, this.wrappingColumn, this.columnsForFullWidthChar, this.wrappingIndent, !isInHiddenArea);\n values[i] = line.getViewLineCount();\n this.lines[i] = line;\n }\n this._validModelVersionId = this.model.getVersionId();\n this.prefixSumComputer = new PrefixSumComputerWithCache(values);\n };\n SplitLinesCollection.prototype.getHiddenAreas = function () {\n var _this = this;\n return this.hiddenAreasIds.map(function (decId) {\n return _this.model.getDecorationRange(decId);\n });\n };\n SplitLinesCollection.prototype._reduceRanges = function (_ranges) {\n var _this = this;\n if (_ranges.length === 0) {\n return [];\n }\n var ranges = _ranges.map(function (r) { return _this.model.validateRange(r); }).sort(Range.compareRangesUsingStarts);\n var result = [];\n var currentRangeStart = ranges[0].startLineNumber;\n var currentRangeEnd = ranges[0].endLineNumber;\n for (var i = 1, len = ranges.length; i < len; i++) {\n var range = ranges[i];\n if (range.startLineNumber > currentRangeEnd + 1) {\n result.push(new Range(currentRangeStart, 1, currentRangeEnd, 1));\n currentRangeStart = range.startLineNumber;\n currentRangeEnd = range.endLineNumber;\n }\n else if (range.endLineNumber > currentRangeEnd) {\n currentRangeEnd = range.endLineNumber;\n }\n }\n result.push(new Range(currentRangeStart, 1, currentRangeEnd, 1));\n return result;\n };\n SplitLinesCollection.prototype.setHiddenAreas = function (_ranges) {\n var _this = this;\n var newRanges = this._reduceRanges(_ranges);\n // BEGIN TODO@Martin: Please stop calling this method on each model change!\n var oldRanges = this.hiddenAreasIds.map(function (areaId) { return _this.model.getDecorationRange(areaId); }).sort(Range.compareRangesUsingStarts);\n if (newRanges.length === oldRanges.length) {\n var hasDifference = false;\n for (var i = 0; i < newRanges.length; i++) {\n if (!newRanges[i].equalsRange(oldRanges[i])) {\n hasDifference = true;\n break;\n }\n }\n if (!hasDifference) {\n return false;\n }\n }\n // END TODO@Martin: Please stop calling this method on each model change!\n var newDecorations = [];\n for (var i = 0; i < newRanges.length; i++) {\n newDecorations.push({\n range: newRanges[i],\n options: ModelDecorationOptions.EMPTY\n });\n }\n this.hiddenAreasIds = this.model.deltaDecorations(this.hiddenAreasIds, newDecorations);\n var hiddenAreas = newRanges;\n var hiddenAreaStart = 1, hiddenAreaEnd = 0;\n var hiddenAreaIdx = -1;\n var nextLineNumberToUpdateHiddenArea = (hiddenAreaIdx + 1 < hiddenAreas.length) ? hiddenAreaEnd + 1 : this.lines.length + 2;\n var hasVisibleLine = false;\n for (var i = 0; i < this.lines.length; i++) {\n var lineNumber = i + 1;\n if (lineNumber === nextLineNumberToUpdateHiddenArea) {\n hiddenAreaIdx++;\n hiddenAreaStart = hiddenAreas[hiddenAreaIdx].startLineNumber;\n hiddenAreaEnd = hiddenAreas[hiddenAreaIdx].endLineNumber;\n nextLineNumberToUpdateHiddenArea = (hiddenAreaIdx + 1 < hiddenAreas.length) ? hiddenAreaEnd + 1 : this.lines.length + 2;\n }\n var lineChanged = false;\n if (lineNumber >= hiddenAreaStart && lineNumber <= hiddenAreaEnd) {\n // Line should be hidden\n if (this.lines[i].isVisible()) {\n this.lines[i] = this.lines[i].setVisible(false);\n lineChanged = true;\n }\n }\n else {\n hasVisibleLine = true;\n // Line should be visible\n if (!this.lines[i].isVisible()) {\n this.lines[i] = this.lines[i].setVisible(true);\n lineChanged = true;\n }\n }\n if (lineChanged) {\n var newOutputLineCount = this.lines[i].getViewLineCount();\n this.prefixSumComputer.changeValue(i, newOutputLineCount);\n }\n }\n if (!hasVisibleLine) {\n // Cannot have everything be hidden => reveal everything!\n this.setHiddenAreas([]);\n }\n return true;\n };\n SplitLinesCollection.prototype.modelPositionIsVisible = function (modelLineNumber, modelColumn) {\n if (modelLineNumber < 1 || modelLineNumber > this.lines.length) {\n // invalid arguments\n return false;\n }\n return this.lines[modelLineNumber - 1].isVisible();\n };\n SplitLinesCollection.prototype.setTabSize = function (newTabSize) {\n if (this.tabSize === newTabSize) {\n return false;\n }\n this.tabSize = newTabSize;\n this._constructLines(false);\n return true;\n };\n SplitLinesCollection.prototype.setWrappingSettings = function (wrappingIndent, wrappingColumn, columnsForFullWidthChar) {\n if (this.wrappingIndent === wrappingIndent && this.wrappingColumn === wrappingColumn && this.columnsForFullWidthChar === columnsForFullWidthChar) {\n return false;\n }\n this.wrappingIndent = wrappingIndent;\n this.wrappingColumn = wrappingColumn;\n this.columnsForFullWidthChar = columnsForFullWidthChar;\n this._constructLines(false);\n return true;\n };\n SplitLinesCollection.prototype.onModelFlushed = function () {\n this._constructLines(true);\n };\n SplitLinesCollection.prototype.onModelLinesDeleted = function (versionId, fromLineNumber, toLineNumber) {\n if (versionId <= this._validModelVersionId) {\n // Here we check for versionId in case the lines were reconstructed in the meantime.\n // We don't want to apply stale change events on top of a newer read model state.\n return null;\n }\n var outputFromLineNumber = (fromLineNumber === 1 ? 1 : this.prefixSumComputer.getAccumulatedValue(fromLineNumber - 2) + 1);\n var outputToLineNumber = this.prefixSumComputer.getAccumulatedValue(toLineNumber - 1);\n this.lines.splice(fromLineNumber - 1, toLineNumber - fromLineNumber + 1);\n this.prefixSumComputer.removeValues(fromLineNumber - 1, toLineNumber - fromLineNumber + 1);\n return new viewEvents.ViewLinesDeletedEvent(outputFromLineNumber, outputToLineNumber);\n };\n SplitLinesCollection.prototype.onModelLinesInserted = function (versionId, fromLineNumber, toLineNumber, text) {\n if (versionId <= this._validModelVersionId) {\n // Here we check for versionId in case the lines were reconstructed in the meantime.\n // We don't want to apply stale change events on top of a newer read model state.\n return null;\n }\n var hiddenAreas = this.getHiddenAreas();\n var isInHiddenArea = false;\n var testPosition = new Position(fromLineNumber, 1);\n for (var i = 0; i < hiddenAreas.length; i++) {\n if (hiddenAreas[i].containsPosition(testPosition)) {\n isInHiddenArea = true;\n break;\n }\n }\n var outputFromLineNumber = (fromLineNumber === 1 ? 1 : this.prefixSumComputer.getAccumulatedValue(fromLineNumber - 2) + 1);\n var totalOutputLineCount = 0;\n var insertLines = [];\n var insertPrefixSumValues = new Uint32Array(text.length);\n for (var i = 0, len = text.length; i < len; i++) {\n var line = createSplitLine(this.linePositionMapperFactory, text[i], this.tabSize, this.wrappingColumn, this.columnsForFullWidthChar, this.wrappingIndent, !isInHiddenArea);\n insertLines.push(line);\n var outputLineCount = line.getViewLineCount();\n totalOutputLineCount += outputLineCount;\n insertPrefixSumValues[i] = outputLineCount;\n }\n // TODO@Alex: use arrays.arrayInsert\n this.lines = this.lines.slice(0, fromLineNumber - 1).concat(insertLines).concat(this.lines.slice(fromLineNumber - 1));\n this.prefixSumComputer.insertValues(fromLineNumber - 1, insertPrefixSumValues);\n return new viewEvents.ViewLinesInsertedEvent(outputFromLineNumber, outputFromLineNumber + totalOutputLineCount - 1);\n };\n SplitLinesCollection.prototype.onModelLineChanged = function (versionId, lineNumber, newText) {\n if (versionId <= this._validModelVersionId) {\n // Here we check for versionId in case the lines were reconstructed in the meantime.\n // We don't want to apply stale change events on top of a newer read model state.\n return [false, null, null, null];\n }\n var lineIndex = lineNumber - 1;\n var oldOutputLineCount = this.lines[lineIndex].getViewLineCount();\n var isVisible = this.lines[lineIndex].isVisible();\n var line = createSplitLine(this.linePositionMapperFactory, newText, this.tabSize, this.wrappingColumn, this.columnsForFullWidthChar, this.wrappingIndent, isVisible);\n this.lines[lineIndex] = line;\n var newOutputLineCount = this.lines[lineIndex].getViewLineCount();\n var lineMappingChanged = false;\n var changeFrom = 0;\n var changeTo = -1;\n var insertFrom = 0;\n var insertTo = -1;\n var deleteFrom = 0;\n var deleteTo = -1;\n if (oldOutputLineCount > newOutputLineCount) {\n changeFrom = (lineNumber === 1 ? 1 : this.prefixSumComputer.getAccumulatedValue(lineNumber - 2) + 1);\n changeTo = changeFrom + newOutputLineCount - 1;\n deleteFrom = changeTo + 1;\n deleteTo = deleteFrom + (oldOutputLineCount - newOutputLineCount) - 1;\n lineMappingChanged = true;\n }\n else if (oldOutputLineCount < newOutputLineCount) {\n changeFrom = (lineNumber === 1 ? 1 : this.prefixSumComputer.getAccumulatedValue(lineNumber - 2) + 1);\n changeTo = changeFrom + oldOutputLineCount - 1;\n insertFrom = changeTo + 1;\n insertTo = insertFrom + (newOutputLineCount - oldOutputLineCount) - 1;\n lineMappingChanged = true;\n }\n else {\n changeFrom = (lineNumber === 1 ? 1 : this.prefixSumComputer.getAccumulatedValue(lineNumber - 2) + 1);\n changeTo = changeFrom + newOutputLineCount - 1;\n }\n this.prefixSumComputer.changeValue(lineIndex, newOutputLineCount);\n var viewLinesChangedEvent = (changeFrom <= changeTo ? new viewEvents.ViewLinesChangedEvent(changeFrom, changeTo) : null);\n var viewLinesInsertedEvent = (insertFrom <= insertTo ? new viewEvents.ViewLinesInsertedEvent(insertFrom, insertTo) : null);\n var viewLinesDeletedEvent = (deleteFrom <= deleteTo ? new viewEvents.ViewLinesDeletedEvent(deleteFrom, deleteTo) : null);\n return [lineMappingChanged, viewLinesChangedEvent, viewLinesInsertedEvent, viewLinesDeletedEvent];\n };\n SplitLinesCollection.prototype.acceptVersionId = function (versionId) {\n this._validModelVersionId = versionId;\n if (this.lines.length === 1 && !this.lines[0].isVisible()) {\n // At least one line must be visible => reset hidden areas\n this.setHiddenAreas([]);\n }\n };\n SplitLinesCollection.prototype.getViewLineCount = function () {\n this._ensureValidState();\n return this.prefixSumComputer.getTotalValue();\n };\n SplitLinesCollection.prototype._toValidViewLineNumber = function (viewLineNumber) {\n if (viewLineNumber < 1) {\n return 1;\n }\n var viewLineCount = this.getViewLineCount();\n if (viewLineNumber > viewLineCount) {\n return viewLineCount;\n }\n return viewLineNumber;\n };\n /**\n * Gives a hint that a lot of requests are about to come in for these line numbers.\n */\n SplitLinesCollection.prototype.warmUpLookupCache = function (viewStartLineNumber, viewEndLineNumber) {\n this.prefixSumComputer.warmUpCache(viewStartLineNumber - 1, viewEndLineNumber - 1);\n };\n SplitLinesCollection.prototype.getActiveIndentGuide = function (viewLineNumber, minLineNumber, maxLineNumber) {\n this._ensureValidState();\n viewLineNumber = this._toValidViewLineNumber(viewLineNumber);\n minLineNumber = this._toValidViewLineNumber(minLineNumber);\n maxLineNumber = this._toValidViewLineNumber(maxLineNumber);\n var modelPosition = this.convertViewPositionToModelPosition(viewLineNumber, this.getViewLineMinColumn(viewLineNumber));\n var modelMinPosition = this.convertViewPositionToModelPosition(minLineNumber, this.getViewLineMinColumn(minLineNumber));\n var modelMaxPosition = this.convertViewPositionToModelPosition(maxLineNumber, this.getViewLineMinColumn(maxLineNumber));\n var result = this.model.getActiveIndentGuide(modelPosition.lineNumber, modelMinPosition.lineNumber, modelMaxPosition.lineNumber);\n var viewStartPosition = this.convertModelPositionToViewPosition(result.startLineNumber, 1);\n var viewEndPosition = this.convertModelPositionToViewPosition(result.endLineNumber, 1);\n return {\n startLineNumber: viewStartPosition.lineNumber,\n endLineNumber: viewEndPosition.lineNumber,\n indent: result.indent\n };\n };\n SplitLinesCollection.prototype.getViewLinesIndentGuides = function (viewStartLineNumber, viewEndLineNumber) {\n this._ensureValidState();\n viewStartLineNumber = this._toValidViewLineNumber(viewStartLineNumber);\n viewEndLineNumber = this._toValidViewLineNumber(viewEndLineNumber);\n var modelStart = this.convertViewPositionToModelPosition(viewStartLineNumber, this.getViewLineMinColumn(viewStartLineNumber));\n var modelEnd = this.convertViewPositionToModelPosition(viewEndLineNumber, this.getViewLineMaxColumn(viewEndLineNumber));\n var result = [];\n var resultRepeatCount = [];\n var resultRepeatOption = [];\n var modelStartLineIndex = modelStart.lineNumber - 1;\n var modelEndLineIndex = modelEnd.lineNumber - 1;\n var reqStart = null;\n for (var modelLineIndex = modelStartLineIndex; modelLineIndex <= modelEndLineIndex; modelLineIndex++) {\n var line = this.lines[modelLineIndex];\n if (line.isVisible()) {\n var viewLineStartIndex = line.getViewLineNumberOfModelPosition(0, modelLineIndex === modelStartLineIndex ? modelStart.column : 1);\n var viewLineEndIndex = line.getViewLineNumberOfModelPosition(0, this.model.getLineMaxColumn(modelLineIndex + 1));\n var count = viewLineEndIndex - viewLineStartIndex + 1;\n var option = 0 /* BlockNone */;\n if (count > 1 && line.getViewLineMinColumn(this.model, modelLineIndex + 1, viewLineEndIndex) === 1) {\n // wrapped lines should block indent guides\n option = (viewLineStartIndex === 0 ? 1 /* BlockSubsequent */ : 2 /* BlockAll */);\n }\n resultRepeatCount.push(count);\n resultRepeatOption.push(option);\n // merge into previous request\n if (reqStart === null) {\n reqStart = new Position(modelLineIndex + 1, 0);\n }\n }\n else {\n // hit invisible line => flush request\n if (reqStart !== null) {\n result = result.concat(this.model.getLinesIndentGuides(reqStart.lineNumber, modelLineIndex));\n reqStart = null;\n }\n }\n }\n if (reqStart !== null) {\n result = result.concat(this.model.getLinesIndentGuides(reqStart.lineNumber, modelEnd.lineNumber));\n reqStart = null;\n }\n var viewLineCount = viewEndLineNumber - viewStartLineNumber + 1;\n var viewIndents = new Array(viewLineCount);\n var currIndex = 0;\n for (var i = 0, len = result.length; i < len; i++) {\n var value = result[i];\n var count = Math.min(viewLineCount - currIndex, resultRepeatCount[i]);\n var option = resultRepeatOption[i];\n var blockAtIndex = void 0;\n if (option === 2 /* BlockAll */) {\n blockAtIndex = 0;\n }\n else if (option === 1 /* BlockSubsequent */) {\n blockAtIndex = 1;\n }\n else {\n blockAtIndex = count;\n }\n for (var j = 0; j < count; j++) {\n if (j === blockAtIndex) {\n value = 0;\n }\n viewIndents[currIndex++] = value;\n }\n }\n return viewIndents;\n };\n SplitLinesCollection.prototype.getViewLineContent = function (viewLineNumber) {\n this._ensureValidState();\n viewLineNumber = this._toValidViewLineNumber(viewLineNumber);\n var r = this.prefixSumComputer.getIndexOf(viewLineNumber - 1);\n var lineIndex = r.index;\n var remainder = r.remainder;\n return this.lines[lineIndex].getViewLineContent(this.model, lineIndex + 1, remainder);\n };\n SplitLinesCollection.prototype.getViewLineLength = function (viewLineNumber) {\n this._ensureValidState();\n viewLineNumber = this._toValidViewLineNumber(viewLineNumber);\n var r = this.prefixSumComputer.getIndexOf(viewLineNumber - 1);\n var lineIndex = r.index;\n var remainder = r.remainder;\n return this.lines[lineIndex].getViewLineLength(this.model, lineIndex + 1, remainder);\n };\n SplitLinesCollection.prototype.getViewLineMinColumn = function (viewLineNumber) {\n this._ensureValidState();\n viewLineNumber = this._toValidViewLineNumber(viewLineNumber);\n var r = this.prefixSumComputer.getIndexOf(viewLineNumber - 1);\n var lineIndex = r.index;\n var remainder = r.remainder;\n return this.lines[lineIndex].getViewLineMinColumn(this.model, lineIndex + 1, remainder);\n };\n SplitLinesCollection.prototype.getViewLineMaxColumn = function (viewLineNumber) {\n this._ensureValidState();\n viewLineNumber = this._toValidViewLineNumber(viewLineNumber);\n var r = this.prefixSumComputer.getIndexOf(viewLineNumber - 1);\n var lineIndex = r.index;\n var remainder = r.remainder;\n return this.lines[lineIndex].getViewLineMaxColumn(this.model, lineIndex + 1, remainder);\n };\n SplitLinesCollection.prototype.getViewLineData = function (viewLineNumber) {\n this._ensureValidState();\n viewLineNumber = this._toValidViewLineNumber(viewLineNumber);\n var r = this.prefixSumComputer.getIndexOf(viewLineNumber - 1);\n var lineIndex = r.index;\n var remainder = r.remainder;\n return this.lines[lineIndex].getViewLineData(this.model, lineIndex + 1, remainder);\n };\n SplitLinesCollection.prototype.getViewLinesData = function (viewStartLineNumber, viewEndLineNumber, needed) {\n this._ensureValidState();\n viewStartLineNumber = this._toValidViewLineNumber(viewStartLineNumber);\n viewEndLineNumber = this._toValidViewLineNumber(viewEndLineNumber);\n var start = this.prefixSumComputer.getIndexOf(viewStartLineNumber - 1);\n var viewLineNumber = viewStartLineNumber;\n var startModelLineIndex = start.index;\n var startRemainder = start.remainder;\n var result = [];\n for (var modelLineIndex = startModelLineIndex, len = this.model.getLineCount(); modelLineIndex < len; modelLineIndex++) {\n var line = this.lines[modelLineIndex];\n if (!line.isVisible()) {\n continue;\n }\n var fromViewLineIndex = (modelLineIndex === startModelLineIndex ? startRemainder : 0);\n var remainingViewLineCount = line.getViewLineCount() - fromViewLineIndex;\n var lastLine = false;\n if (viewLineNumber + remainingViewLineCount > viewEndLineNumber) {\n lastLine = true;\n remainingViewLineCount = viewEndLineNumber - viewLineNumber + 1;\n }\n var toViewLineIndex = fromViewLineIndex + remainingViewLineCount;\n line.getViewLinesData(this.model, modelLineIndex + 1, fromViewLineIndex, toViewLineIndex, viewLineNumber - viewStartLineNumber, needed, result);\n viewLineNumber += remainingViewLineCount;\n if (lastLine) {\n break;\n }\n }\n return result;\n };\n SplitLinesCollection.prototype.validateViewPosition = function (viewLineNumber, viewColumn, expectedModelPosition) {\n this._ensureValidState();\n viewLineNumber = this._toValidViewLineNumber(viewLineNumber);\n var r = this.prefixSumComputer.getIndexOf(viewLineNumber - 1);\n var lineIndex = r.index;\n var remainder = r.remainder;\n var line = this.lines[lineIndex];\n var minColumn = line.getViewLineMinColumn(this.model, lineIndex + 1, remainder);\n var maxColumn = line.getViewLineMaxColumn(this.model, lineIndex + 1, remainder);\n if (viewColumn < minColumn) {\n viewColumn = minColumn;\n }\n if (viewColumn > maxColumn) {\n viewColumn = maxColumn;\n }\n var computedModelColumn = line.getModelColumnOfViewPosition(remainder, viewColumn);\n var computedModelPosition = this.model.validatePosition(new Position(lineIndex + 1, computedModelColumn));\n if (computedModelPosition.equals(expectedModelPosition)) {\n return new Position(viewLineNumber, viewColumn);\n }\n return this.convertModelPositionToViewPosition(expectedModelPosition.lineNumber, expectedModelPosition.column);\n };\n SplitLinesCollection.prototype.convertViewPositionToModelPosition = function (viewLineNumber, viewColumn) {\n this._ensureValidState();\n viewLineNumber = this._toValidViewLineNumber(viewLineNumber);\n var r = this.prefixSumComputer.getIndexOf(viewLineNumber - 1);\n var lineIndex = r.index;\n var remainder = r.remainder;\n var inputColumn = this.lines[lineIndex].getModelColumnOfViewPosition(remainder, viewColumn);\n // console.log('out -> in ' + viewLineNumber + ',' + viewColumn + ' ===> ' + (lineIndex+1) + ',' + inputColumn);\n return this.model.validatePosition(new Position(lineIndex + 1, inputColumn));\n };\n SplitLinesCollection.prototype.convertModelPositionToViewPosition = function (_modelLineNumber, _modelColumn) {\n this._ensureValidState();\n var validPosition = this.model.validatePosition(new Position(_modelLineNumber, _modelColumn));\n var inputLineNumber = validPosition.lineNumber;\n var inputColumn = validPosition.column;\n var lineIndex = inputLineNumber - 1, lineIndexChanged = false;\n while (lineIndex > 0 && !this.lines[lineIndex].isVisible()) {\n lineIndex--;\n lineIndexChanged = true;\n }\n if (lineIndex === 0 && !this.lines[lineIndex].isVisible()) {\n // Could not reach a real line\n // console.log('in -> out ' + inputLineNumber + ',' + inputColumn + ' ===> ' + 1 + ',' + 1);\n return new Position(1, 1);\n }\n var deltaLineNumber = 1 + (lineIndex === 0 ? 0 : this.prefixSumComputer.getAccumulatedValue(lineIndex - 1));\n var r;\n if (lineIndexChanged) {\n r = this.lines[lineIndex].getViewPositionOfModelPosition(deltaLineNumber, this.model.getLineMaxColumn(lineIndex + 1));\n }\n else {\n r = this.lines[inputLineNumber - 1].getViewPositionOfModelPosition(deltaLineNumber, inputColumn);\n }\n // console.log('in -> out ' + inputLineNumber + ',' + inputColumn + ' ===> ' + r.lineNumber + ',' + r);\n return r;\n };\n SplitLinesCollection.prototype._getViewLineNumberForModelPosition = function (inputLineNumber, inputColumn) {\n var lineIndex = inputLineNumber - 1;\n if (this.lines[lineIndex].isVisible()) {\n // this model line is visible\n var deltaLineNumber_1 = 1 + (lineIndex === 0 ? 0 : this.prefixSumComputer.getAccumulatedValue(lineIndex - 1));\n return this.lines[lineIndex].getViewLineNumberOfModelPosition(deltaLineNumber_1, inputColumn);\n }\n // this model line is not visible\n while (lineIndex > 0 && !this.lines[lineIndex].isVisible()) {\n lineIndex--;\n }\n if (lineIndex === 0 && !this.lines[lineIndex].isVisible()) {\n // Could not reach a real line\n return 1;\n }\n var deltaLineNumber = 1 + (lineIndex === 0 ? 0 : this.prefixSumComputer.getAccumulatedValue(lineIndex - 1));\n return this.lines[lineIndex].getViewLineNumberOfModelPosition(deltaLineNumber, this.model.getLineMaxColumn(lineIndex + 1));\n };\n SplitLinesCollection.prototype.getAllOverviewRulerDecorations = function (ownerId, filterOutValidation, theme) {\n var decorations = this.model.getOverviewRulerDecorations(ownerId, filterOutValidation);\n var result = new OverviewRulerDecorations();\n for (var i = 0, len = decorations.length; i < len; i++) {\n var decoration = decorations[i];\n var opts = decoration.options.overviewRuler;\n var lane = opts.position;\n if (lane === 0) {\n continue;\n }\n var color = resolveColor(opts, theme);\n var viewStartLineNumber = this._getViewLineNumberForModelPosition(decoration.range.startLineNumber, decoration.range.startColumn);\n var viewEndLineNumber = this._getViewLineNumberForModelPosition(decoration.range.endLineNumber, decoration.range.endColumn);\n result.accept(color, viewStartLineNumber, viewEndLineNumber, lane);\n }\n return result.result;\n };\n SplitLinesCollection.prototype.getDecorationsInRange = function (range, ownerId, filterOutValidation) {\n var modelStart = this.convertViewPositionToModelPosition(range.startLineNumber, range.startColumn);\n var modelEnd = this.convertViewPositionToModelPosition(range.endLineNumber, range.endColumn);\n if (modelEnd.lineNumber - modelStart.lineNumber <= range.endLineNumber - range.startLineNumber) {\n // most likely there are no hidden lines => fast path\n return this.model.getDecorationsInRange(new Range(modelStart.lineNumber, modelStart.column, modelEnd.lineNumber, modelEnd.column), ownerId, filterOutValidation);\n }\n var result = [];\n var modelStartLineIndex = modelStart.lineNumber - 1;\n var modelEndLineIndex = modelEnd.lineNumber - 1;\n var reqStart = null;\n for (var modelLineIndex = modelStartLineIndex; modelLineIndex <= modelEndLineIndex; modelLineIndex++) {\n var line = this.lines[modelLineIndex];\n if (line.isVisible()) {\n // merge into previous request\n if (reqStart === null) {\n reqStart = new Position(modelLineIndex + 1, modelLineIndex === modelStartLineIndex ? modelStart.column : 1);\n }\n }\n else {\n // hit invisible line => flush request\n if (reqStart !== null) {\n var maxLineColumn = this.model.getLineMaxColumn(modelLineIndex);\n result = result.concat(this.model.getDecorationsInRange(new Range(reqStart.lineNumber, reqStart.column, modelLineIndex, maxLineColumn), ownerId, filterOutValidation));\n reqStart = null;\n }\n }\n }\n if (reqStart !== null) {\n result = result.concat(this.model.getDecorationsInRange(new Range(reqStart.lineNumber, reqStart.column, modelEnd.lineNumber, modelEnd.column), ownerId, filterOutValidation));\n reqStart = null;\n }\n return result;\n };\n return SplitLinesCollection;\n}());\nexport { SplitLinesCollection };\nvar VisibleIdentitySplitLine = /** @class */ (function () {\n function VisibleIdentitySplitLine() {\n }\n VisibleIdentitySplitLine.prototype.isVisible = function () {\n return true;\n };\n VisibleIdentitySplitLine.prototype.setVisible = function (isVisible) {\n if (isVisible) {\n return this;\n }\n return InvisibleIdentitySplitLine.INSTANCE;\n };\n VisibleIdentitySplitLine.prototype.getViewLineCount = function () {\n return 1;\n };\n VisibleIdentitySplitLine.prototype.getViewLineContent = function (model, modelLineNumber, outputLineIndex) {\n return model.getLineContent(modelLineNumber);\n };\n VisibleIdentitySplitLine.prototype.getViewLineLength = function (model, modelLineNumber, outputLineIndex) {\n return model.getLineLength(modelLineNumber);\n };\n VisibleIdentitySplitLine.prototype.getViewLineMinColumn = function (model, modelLineNumber, outputLineIndex) {\n return model.getLineMinColumn(modelLineNumber);\n };\n VisibleIdentitySplitLine.prototype.getViewLineMaxColumn = function (model, modelLineNumber, outputLineIndex) {\n return model.getLineMaxColumn(modelLineNumber);\n };\n VisibleIdentitySplitLine.prototype.getViewLineData = function (model, modelLineNumber, outputLineIndex) {\n var lineTokens = model.getLineTokens(modelLineNumber);\n var lineContent = lineTokens.getLineContent();\n return new ViewLineData(lineContent, false, 1, lineContent.length + 1, lineTokens.inflate());\n };\n VisibleIdentitySplitLine.prototype.getViewLinesData = function (model, modelLineNumber, fromOuputLineIndex, toOutputLineIndex, globalStartIndex, needed, result) {\n if (!needed[globalStartIndex]) {\n result[globalStartIndex] = null;\n return;\n }\n result[globalStartIndex] = this.getViewLineData(model, modelLineNumber, 0);\n };\n VisibleIdentitySplitLine.prototype.getModelColumnOfViewPosition = function (outputLineIndex, outputColumn) {\n return outputColumn;\n };\n VisibleIdentitySplitLine.prototype.getViewPositionOfModelPosition = function (deltaLineNumber, inputColumn) {\n return new Position(deltaLineNumber, inputColumn);\n };\n VisibleIdentitySplitLine.prototype.getViewLineNumberOfModelPosition = function (deltaLineNumber, inputColumn) {\n return deltaLineNumber;\n };\n VisibleIdentitySplitLine.INSTANCE = new VisibleIdentitySplitLine();\n return VisibleIdentitySplitLine;\n}());\nvar InvisibleIdentitySplitLine = /** @class */ (function () {\n function InvisibleIdentitySplitLine() {\n }\n InvisibleIdentitySplitLine.prototype.isVisible = function () {\n return false;\n };\n InvisibleIdentitySplitLine.prototype.setVisible = function (isVisible) {\n if (!isVisible) {\n return this;\n }\n return VisibleIdentitySplitLine.INSTANCE;\n };\n InvisibleIdentitySplitLine.prototype.getViewLineCount = function () {\n return 0;\n };\n InvisibleIdentitySplitLine.prototype.getViewLineContent = function (model, modelLineNumber, outputLineIndex) {\n throw new Error('Not supported');\n };\n InvisibleIdentitySplitLine.prototype.getViewLineLength = function (model, modelLineNumber, outputLineIndex) {\n throw new Error('Not supported');\n };\n InvisibleIdentitySplitLine.prototype.getViewLineMinColumn = function (model, modelLineNumber, outputLineIndex) {\n throw new Error('Not supported');\n };\n InvisibleIdentitySplitLine.prototype.getViewLineMaxColumn = function (model, modelLineNumber, outputLineIndex) {\n throw new Error('Not supported');\n };\n InvisibleIdentitySplitLine.prototype.getViewLineData = function (model, modelLineNumber, outputLineIndex) {\n throw new Error('Not supported');\n };\n InvisibleIdentitySplitLine.prototype.getViewLinesData = function (model, modelLineNumber, fromOuputLineIndex, toOutputLineIndex, globalStartIndex, needed, result) {\n throw new Error('Not supported');\n };\n InvisibleIdentitySplitLine.prototype.getModelColumnOfViewPosition = function (outputLineIndex, outputColumn) {\n throw new Error('Not supported');\n };\n InvisibleIdentitySplitLine.prototype.getViewPositionOfModelPosition = function (deltaLineNumber, inputColumn) {\n throw new Error('Not supported');\n };\n InvisibleIdentitySplitLine.prototype.getViewLineNumberOfModelPosition = function (deltaLineNumber, inputColumn) {\n throw new Error('Not supported');\n };\n InvisibleIdentitySplitLine.INSTANCE = new InvisibleIdentitySplitLine();\n return InvisibleIdentitySplitLine;\n}());\nvar SplitLine = /** @class */ (function () {\n function SplitLine(positionMapper, isVisible) {\n this.positionMapper = positionMapper;\n this.wrappedIndent = this.positionMapper.getWrappedLinesIndent();\n this.wrappedIndentLength = this.wrappedIndent.length;\n this.outputLineCount = this.positionMapper.getOutputLineCount();\n this._isVisible = isVisible;\n }\n SplitLine.prototype.isVisible = function () {\n return this._isVisible;\n };\n SplitLine.prototype.setVisible = function (isVisible) {\n this._isVisible = isVisible;\n return this;\n };\n SplitLine.prototype.getViewLineCount = function () {\n if (!this._isVisible) {\n return 0;\n }\n return this.outputLineCount;\n };\n SplitLine.prototype.getInputStartOffsetOfOutputLineIndex = function (outputLineIndex) {\n return this.positionMapper.getInputOffsetOfOutputPosition(outputLineIndex, 0);\n };\n SplitLine.prototype.getInputEndOffsetOfOutputLineIndex = function (model, modelLineNumber, outputLineIndex) {\n if (outputLineIndex + 1 === this.outputLineCount) {\n return model.getLineMaxColumn(modelLineNumber) - 1;\n }\n return this.positionMapper.getInputOffsetOfOutputPosition(outputLineIndex + 1, 0);\n };\n SplitLine.prototype.getViewLineContent = function (model, modelLineNumber, outputLineIndex) {\n if (!this._isVisible) {\n throw new Error('Not supported');\n }\n var startOffset = this.getInputStartOffsetOfOutputLineIndex(outputLineIndex);\n var endOffset = this.getInputEndOffsetOfOutputLineIndex(model, modelLineNumber, outputLineIndex);\n var r = model.getValueInRange({\n startLineNumber: modelLineNumber,\n startColumn: startOffset + 1,\n endLineNumber: modelLineNumber,\n endColumn: endOffset + 1\n });\n if (outputLineIndex > 0) {\n r = this.wrappedIndent + r;\n }\n return r;\n };\n SplitLine.prototype.getViewLineLength = function (model, modelLineNumber, outputLineIndex) {\n if (!this._isVisible) {\n throw new Error('Not supported');\n }\n var startOffset = this.getInputStartOffsetOfOutputLineIndex(outputLineIndex);\n var endOffset = this.getInputEndOffsetOfOutputLineIndex(model, modelLineNumber, outputLineIndex);\n var r = endOffset - startOffset;\n if (outputLineIndex > 0) {\n r = this.wrappedIndent.length + r;\n }\n return r;\n };\n SplitLine.prototype.getViewLineMinColumn = function (model, modelLineNumber, outputLineIndex) {\n if (!this._isVisible) {\n throw new Error('Not supported');\n }\n if (outputLineIndex > 0) {\n return this.wrappedIndentLength + 1;\n }\n return 1;\n };\n SplitLine.prototype.getViewLineMaxColumn = function (model, modelLineNumber, outputLineIndex) {\n if (!this._isVisible) {\n throw new Error('Not supported');\n }\n return this.getViewLineContent(model, modelLineNumber, outputLineIndex).length + 1;\n };\n SplitLine.prototype.getViewLineData = function (model, modelLineNumber, outputLineIndex) {\n if (!this._isVisible) {\n throw new Error('Not supported');\n }\n var startOffset = this.getInputStartOffsetOfOutputLineIndex(outputLineIndex);\n var endOffset = this.getInputEndOffsetOfOutputLineIndex(model, modelLineNumber, outputLineIndex);\n var lineContent = model.getValueInRange({\n startLineNumber: modelLineNumber,\n startColumn: startOffset + 1,\n endLineNumber: modelLineNumber,\n endColumn: endOffset + 1\n });\n if (outputLineIndex > 0) {\n lineContent = this.wrappedIndent + lineContent;\n }\n var minColumn = (outputLineIndex > 0 ? this.wrappedIndentLength + 1 : 1);\n var maxColumn = lineContent.length + 1;\n var continuesWithWrappedLine = (outputLineIndex + 1 < this.getViewLineCount());\n var deltaStartIndex = 0;\n if (outputLineIndex > 0) {\n deltaStartIndex = this.wrappedIndentLength;\n }\n var lineTokens = model.getLineTokens(modelLineNumber);\n return new ViewLineData(lineContent, continuesWithWrappedLine, minColumn, maxColumn, lineTokens.sliceAndInflate(startOffset, endOffset, deltaStartIndex));\n };\n SplitLine.prototype.getViewLinesData = function (model, modelLineNumber, fromOuputLineIndex, toOutputLineIndex, globalStartIndex, needed, result) {\n if (!this._isVisible) {\n throw new Error('Not supported');\n }\n for (var outputLineIndex = fromOuputLineIndex; outputLineIndex < toOutputLineIndex; outputLineIndex++) {\n var globalIndex = globalStartIndex + outputLineIndex - fromOuputLineIndex;\n if (!needed[globalIndex]) {\n result[globalIndex] = null;\n continue;\n }\n result[globalIndex] = this.getViewLineData(model, modelLineNumber, outputLineIndex);\n }\n };\n SplitLine.prototype.getModelColumnOfViewPosition = function (outputLineIndex, outputColumn) {\n if (!this._isVisible) {\n throw new Error('Not supported');\n }\n var adjustedColumn = outputColumn - 1;\n if (outputLineIndex > 0) {\n if (adjustedColumn < this.wrappedIndentLength) {\n adjustedColumn = 0;\n }\n else {\n adjustedColumn -= this.wrappedIndentLength;\n }\n }\n return this.positionMapper.getInputOffsetOfOutputPosition(outputLineIndex, adjustedColumn) + 1;\n };\n SplitLine.prototype.getViewPositionOfModelPosition = function (deltaLineNumber, inputColumn) {\n if (!this._isVisible) {\n throw new Error('Not supported');\n }\n var r = this.positionMapper.getOutputPositionOfInputOffset(inputColumn - 1);\n var outputLineIndex = r.outputLineIndex;\n var outputColumn = r.outputOffset + 1;\n if (outputLineIndex > 0) {\n outputColumn += this.wrappedIndentLength;\n }\n //\t\tconsole.log('in -> out ' + deltaLineNumber + ',' + inputColumn + ' ===> ' + (deltaLineNumber+outputLineIndex) + ',' + outputColumn);\n return new Position(deltaLineNumber + outputLineIndex, outputColumn);\n };\n SplitLine.prototype.getViewLineNumberOfModelPosition = function (deltaLineNumber, inputColumn) {\n if (!this._isVisible) {\n throw new Error('Not supported');\n }\n var r = this.positionMapper.getOutputPositionOfInputOffset(inputColumn - 1);\n return (deltaLineNumber + r.outputLineIndex);\n };\n return SplitLine;\n}());\nexport { SplitLine };\nfunction createSplitLine(linePositionMapperFactory, text, tabSize, wrappingColumn, columnsForFullWidthChar, wrappingIndent, isVisible) {\n var positionMapper = linePositionMapperFactory.createLineMapping(text, tabSize, wrappingColumn, columnsForFullWidthChar, wrappingIndent);\n if (positionMapper === null) {\n // No mapping needed\n if (isVisible) {\n return VisibleIdentitySplitLine.INSTANCE;\n }\n return InvisibleIdentitySplitLine.INSTANCE;\n }\n else {\n return new SplitLine(positionMapper, isVisible);\n }\n}\nvar IdentityCoordinatesConverter = /** @class */ (function () {\n function IdentityCoordinatesConverter(lines) {\n this._lines = lines;\n }\n IdentityCoordinatesConverter.prototype._validPosition = function (pos) {\n return this._lines.model.validatePosition(pos);\n };\n IdentityCoordinatesConverter.prototype._validRange = function (range) {\n return this._lines.model.validateRange(range);\n };\n // View -> Model conversion and related methods\n IdentityCoordinatesConverter.prototype.convertViewPositionToModelPosition = function (viewPosition) {\n return this._validPosition(viewPosition);\n };\n IdentityCoordinatesConverter.prototype.convertViewRangeToModelRange = function (viewRange) {\n return this._validRange(viewRange);\n };\n IdentityCoordinatesConverter.prototype.validateViewPosition = function (viewPosition, expectedModelPosition) {\n return this._validPosition(expectedModelPosition);\n };\n IdentityCoordinatesConverter.prototype.validateViewRange = function (viewRange, expectedModelRange) {\n return this._validRange(expectedModelRange);\n };\n // Model -> View conversion and related methods\n IdentityCoordinatesConverter.prototype.convertModelPositionToViewPosition = function (modelPosition) {\n return this._validPosition(modelPosition);\n };\n IdentityCoordinatesConverter.prototype.convertModelRangeToViewRange = function (modelRange) {\n return this._validRange(modelRange);\n };\n IdentityCoordinatesConverter.prototype.modelPositionIsVisible = function (modelPosition) {\n var lineCount = this._lines.model.getLineCount();\n if (modelPosition.lineNumber < 1 || modelPosition.lineNumber > lineCount) {\n // invalid arguments\n return false;\n }\n return true;\n };\n return IdentityCoordinatesConverter;\n}());\nexport { IdentityCoordinatesConverter };\nvar IdentityLinesCollection = /** @class */ (function () {\n function IdentityLinesCollection(model) {\n this.model = model;\n }\n IdentityLinesCollection.prototype.dispose = function () {\n };\n IdentityLinesCollection.prototype.createCoordinatesConverter = function () {\n return new IdentityCoordinatesConverter(this);\n };\n IdentityLinesCollection.prototype.getHiddenAreas = function () {\n return [];\n };\n IdentityLinesCollection.prototype.setHiddenAreas = function (_ranges) {\n return false;\n };\n IdentityLinesCollection.prototype.setTabSize = function (newTabSize) {\n return false;\n };\n IdentityLinesCollection.prototype.setWrappingSettings = function (wrappingIndent, wrappingColumn, columnsForFullWidthChar) {\n return false;\n };\n IdentityLinesCollection.prototype.onModelFlushed = function () {\n };\n IdentityLinesCollection.prototype.onModelLinesDeleted = function (versionId, fromLineNumber, toLineNumber) {\n return new viewEvents.ViewLinesDeletedEvent(fromLineNumber, toLineNumber);\n };\n IdentityLinesCollection.prototype.onModelLinesInserted = function (versionId, fromLineNumber, toLineNumber, text) {\n return new viewEvents.ViewLinesInsertedEvent(fromLineNumber, toLineNumber);\n };\n IdentityLinesCollection.prototype.onModelLineChanged = function (versionId, lineNumber, newText) {\n return [false, new viewEvents.ViewLinesChangedEvent(lineNumber, lineNumber), null, null];\n };\n IdentityLinesCollection.prototype.acceptVersionId = function (versionId) {\n };\n IdentityLinesCollection.prototype.getViewLineCount = function () {\n return this.model.getLineCount();\n };\n IdentityLinesCollection.prototype.warmUpLookupCache = function (viewStartLineNumber, viewEndLineNumber) {\n };\n IdentityLinesCollection.prototype.getActiveIndentGuide = function (viewLineNumber, minLineNumber, maxLineNumber) {\n return {\n startLineNumber: viewLineNumber,\n endLineNumber: viewLineNumber,\n indent: 0\n };\n };\n IdentityLinesCollection.prototype.getViewLinesIndentGuides = function (viewStartLineNumber, viewEndLineNumber) {\n var viewLineCount = viewEndLineNumber - viewStartLineNumber + 1;\n var result = new Array(viewLineCount);\n for (var i = 0; i < viewLineCount; i++) {\n result[i] = 0;\n }\n return result;\n };\n IdentityLinesCollection.prototype.getViewLineContent = function (viewLineNumber) {\n return this.model.getLineContent(viewLineNumber);\n };\n IdentityLinesCollection.prototype.getViewLineLength = function (viewLineNumber) {\n return this.model.getLineLength(viewLineNumber);\n };\n IdentityLinesCollection.prototype.getViewLineMinColumn = function (viewLineNumber) {\n return this.model.getLineMinColumn(viewLineNumber);\n };\n IdentityLinesCollection.prototype.getViewLineMaxColumn = function (viewLineNumber) {\n return this.model.getLineMaxColumn(viewLineNumber);\n };\n IdentityLinesCollection.prototype.getViewLineData = function (viewLineNumber) {\n var lineTokens = this.model.getLineTokens(viewLineNumber);\n var lineContent = lineTokens.getLineContent();\n return new ViewLineData(lineContent, false, 1, lineContent.length + 1, lineTokens.inflate());\n };\n IdentityLinesCollection.prototype.getViewLinesData = function (viewStartLineNumber, viewEndLineNumber, needed) {\n var lineCount = this.model.getLineCount();\n viewStartLineNumber = Math.min(Math.max(1, viewStartLineNumber), lineCount);\n viewEndLineNumber = Math.min(Math.max(1, viewEndLineNumber), lineCount);\n var result = [];\n for (var lineNumber = viewStartLineNumber; lineNumber <= viewEndLineNumber; lineNumber++) {\n var idx = lineNumber - viewStartLineNumber;\n if (!needed[idx]) {\n result[idx] = null;\n }\n result[idx] = this.getViewLineData(lineNumber);\n }\n return result;\n };\n IdentityLinesCollection.prototype.getAllOverviewRulerDecorations = function (ownerId, filterOutValidation, theme) {\n var decorations = this.model.getOverviewRulerDecorations(ownerId, filterOutValidation);\n var result = new OverviewRulerDecorations();\n for (var i = 0, len = decorations.length; i < len; i++) {\n var decoration = decorations[i];\n var opts = decoration.options.overviewRuler;\n var lane = opts.position;\n if (lane === 0) {\n continue;\n }\n var color = resolveColor(opts, theme);\n var viewStartLineNumber = decoration.range.startLineNumber;\n var viewEndLineNumber = decoration.range.endLineNumber;\n result.accept(color, viewStartLineNumber, viewEndLineNumber, lane);\n }\n return result.result;\n };\n IdentityLinesCollection.prototype.getDecorationsInRange = function (range, ownerId, filterOutValidation) {\n return this.model.getDecorationsInRange(range, ownerId, filterOutValidation);\n };\n return IdentityLinesCollection;\n}());\nexport { IdentityLinesCollection };\nvar OverviewRulerDecorations = /** @class */ (function () {\n function OverviewRulerDecorations() {\n this.result = Object.create(null);\n }\n OverviewRulerDecorations.prototype.accept = function (color, startLineNumber, endLineNumber, lane) {\n var prev = this.result[color];\n if (prev) {\n var prevLane = prev[prev.length - 3];\n var prevEndLineNumber = prev[prev.length - 1];\n if (prevLane === lane && prevEndLineNumber + 1 >= startLineNumber) {\n // merge into prev\n if (endLineNumber > prevEndLineNumber) {\n prev[prev.length - 1] = endLineNumber;\n }\n return;\n }\n // push\n prev.push(lane, startLineNumber, endLineNumber);\n }\n else {\n this.result[color] = [lane, startLineNumber, endLineNumber];\n }\n };\n return OverviewRulerDecorations;\n}());\nfunction resolveColor(opts, theme) {\n if (!opts._resolvedColor) {\n var themeType = theme.type;\n var color = (themeType === 'dark' ? opts.darkColor : themeType === 'light' ? opts.color : opts.hcColor);\n opts._resolvedColor = resolveRulerColor(color, theme);\n }\n return opts._resolvedColor;\n}\nfunction resolveRulerColor(color, theme) {\n if (typeof color === 'string') {\n return color;\n }\n var c = color ? theme.getColor(color.id) : null;\n if (!c) {\n c = Color.transparent;\n }\n return c.toString();\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\n/**\n * A very VM friendly rgba datastructure.\n * Please don't touch unless you take a look at the IR.\n */\nvar RGBA8 = /** @class */ (function () {\n function RGBA8(r, g, b, a) {\n this.r = RGBA8._clamp(r);\n this.g = RGBA8._clamp(g);\n this.b = RGBA8._clamp(b);\n this.a = RGBA8._clamp(a);\n }\n RGBA8._clamp = function (c) {\n if (c < 0) {\n return 0;\n }\n if (c > 255) {\n return 255;\n }\n return c | 0;\n };\n return RGBA8;\n}());\nexport { RGBA8 };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nexport var Schemas;\n(function (Schemas) {\n /**\n * A schema that is used for models that exist in memory\n * only and that have no correspondence on a server or such.\n */\n Schemas.inMemory = 'inmemory';\n /**\n * A schema that is used for setting files\n */\n Schemas.vscode = 'vscode';\n /**\n * A schema that is used for internal private files\n */\n Schemas.internal = 'private';\n /**\n * A walk-through document.\n */\n Schemas.walkThrough = 'walkThrough';\n /**\n * An embedded code snippet.\n */\n Schemas.walkThroughSnippet = 'walkThroughSnippet';\n Schemas.http = 'http';\n Schemas.https = 'https';\n Schemas.file = 'file';\n Schemas.mailto = 'mailto';\n Schemas.untitled = 'untitled';\n Schemas.data = 'data';\n})(Schemas || (Schemas = {}));\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport * as nls from '../../nls';\nimport * as strings from './strings';\nvar Severity;\n(function (Severity) {\n Severity[Severity[\"Ignore\"] = 0] = \"Ignore\";\n Severity[Severity[\"Info\"] = 1] = \"Info\";\n Severity[Severity[\"Warning\"] = 2] = \"Warning\";\n Severity[Severity[\"Error\"] = 3] = \"Error\";\n})(Severity || (Severity = {}));\n(function (Severity) {\n var _error = 'error';\n var _warning = 'warning';\n var _warn = 'warn';\n var _info = 'info';\n var _displayStrings = Object.create(null);\n _displayStrings[Severity.Error] = nls.localize('sev.error', \"Error\");\n _displayStrings[Severity.Warning] = nls.localize('sev.warning', \"Warning\");\n _displayStrings[Severity.Info] = nls.localize('sev.info', \"Info\");\n /**\n * Parses 'error', 'warning', 'warn', 'info' in call casings\n * and falls back to ignore.\n */\n function fromValue(value) {\n if (!value) {\n return Severity.Ignore;\n }\n if (strings.equalsIgnoreCase(_error, value)) {\n return Severity.Error;\n }\n if (strings.equalsIgnoreCase(_warning, value) || strings.equalsIgnoreCase(_warn, value)) {\n return Severity.Warning;\n }\n if (strings.equalsIgnoreCase(_info, value)) {\n return Severity.Info;\n }\n return Severity.Ignore;\n }\n Severity.fromValue = fromValue;\n})(Severity || (Severity = {}));\nexport default Severity;\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport { TokenizationRegistry } from '../modes';\nimport { Emitter } from '../../../base/common/event';\nimport { RGBA8 } from '../core/rgba';\nvar MinimapTokensColorTracker = /** @class */ (function () {\n function MinimapTokensColorTracker() {\n var _this = this;\n this._onDidChange = new Emitter();\n this.onDidChange = this._onDidChange.event;\n this._updateColorMap();\n TokenizationRegistry.onDidChange(function (e) {\n if (e.changedColorMap) {\n _this._updateColorMap();\n }\n });\n }\n MinimapTokensColorTracker.getInstance = function () {\n if (!this._INSTANCE) {\n this._INSTANCE = new MinimapTokensColorTracker();\n }\n return this._INSTANCE;\n };\n MinimapTokensColorTracker.prototype._updateColorMap = function () {\n var colorMap = TokenizationRegistry.getColorMap();\n if (!colorMap) {\n this._colors = [null];\n this._backgroundIsLight = true;\n return;\n }\n this._colors = [null];\n for (var colorId = 1; colorId < colorMap.length; colorId++) {\n var source = colorMap[colorId].rgba;\n // Use a VM friendly data-type\n this._colors[colorId] = new RGBA8(source.r, source.g, source.b, Math.round(source.a * 255));\n }\n var backgroundLuminosity = colorMap[2 /* DefaultBackground */].getRelativeLuminance();\n this._backgroundIsLight = (backgroundLuminosity >= 0.5);\n this._onDidChange.fire(void 0);\n };\n MinimapTokensColorTracker.prototype.getColor = function (colorId) {\n if (colorId < 1 || colorId >= this._colors.length) {\n // background color (basically invisible)\n colorId = 2 /* DefaultBackground */;\n }\n return this._colors[colorId];\n };\n MinimapTokensColorTracker.prototype.backgroundIsLight = function () {\n return this._backgroundIsLight;\n };\n MinimapTokensColorTracker._INSTANCE = null;\n return MinimapTokensColorTracker;\n}());\nexport { MinimapTokensColorTracker };\nvar MinimapCharRenderer = /** @class */ (function () {\n function MinimapCharRenderer(x2CharData, x1CharData) {\n var x2ExpectedLen = 4 /* x2_CHAR_HEIGHT */ * 2 /* x2_CHAR_WIDTH */ * 95 /* CHAR_COUNT */;\n if (x2CharData.length !== x2ExpectedLen) {\n throw new Error('Invalid x2CharData');\n }\n var x1ExpectedLen = 2 /* x1_CHAR_HEIGHT */ * 1 /* x1_CHAR_WIDTH */ * 95 /* CHAR_COUNT */;\n if (x1CharData.length !== x1ExpectedLen) {\n throw new Error('Invalid x1CharData');\n }\n this.x2charData = x2CharData;\n this.x1charData = x1CharData;\n this.x2charDataLight = MinimapCharRenderer.soften(x2CharData, 12 / 15);\n this.x1charDataLight = MinimapCharRenderer.soften(x1CharData, 50 / 60);\n }\n MinimapCharRenderer.soften = function (input, ratio) {\n var result = new Uint8ClampedArray(input.length);\n for (var i = 0, len = input.length; i < len; i++) {\n result[i] = input[i] * ratio;\n }\n return result;\n };\n MinimapCharRenderer._getChIndex = function (chCode) {\n chCode -= 32 /* START_CH_CODE */;\n if (chCode < 0) {\n chCode += 95 /* CHAR_COUNT */;\n }\n return (chCode % 95 /* CHAR_COUNT */);\n };\n MinimapCharRenderer.prototype.x2RenderChar = function (target, dx, dy, chCode, color, backgroundColor, useLighterFont) {\n if (dx + 2 /* x2_CHAR_WIDTH */ > target.width || dy + 4 /* x2_CHAR_HEIGHT */ > target.height) {\n console.warn('bad render request outside image data');\n return;\n }\n var x2CharData = useLighterFont ? this.x2charDataLight : this.x2charData;\n var chIndex = MinimapCharRenderer._getChIndex(chCode);\n var outWidth = target.width * 4 /* RGBA_CHANNELS_CNT */;\n var backgroundR = backgroundColor.r;\n var backgroundG = backgroundColor.g;\n var backgroundB = backgroundColor.b;\n var deltaR = color.r - backgroundR;\n var deltaG = color.g - backgroundG;\n var deltaB = color.b - backgroundB;\n var dest = target.data;\n var sourceOffset = chIndex * 4 /* x2_CHAR_HEIGHT */ * 2 /* x2_CHAR_WIDTH */;\n var destOffset = dy * outWidth + dx * 4 /* RGBA_CHANNELS_CNT */;\n {\n var c = x2CharData[sourceOffset] / 255;\n dest[destOffset + 0] = backgroundR + deltaR * c;\n dest[destOffset + 1] = backgroundG + deltaG * c;\n dest[destOffset + 2] = backgroundB + deltaB * c;\n }\n {\n var c = x2CharData[sourceOffset + 1] / 255;\n dest[destOffset + 4] = backgroundR + deltaR * c;\n dest[destOffset + 5] = backgroundG + deltaG * c;\n dest[destOffset + 6] = backgroundB + deltaB * c;\n }\n destOffset += outWidth;\n {\n var c = x2CharData[sourceOffset + 2] / 255;\n dest[destOffset + 0] = backgroundR + deltaR * c;\n dest[destOffset + 1] = backgroundG + deltaG * c;\n dest[destOffset + 2] = backgroundB + deltaB * c;\n }\n {\n var c = x2CharData[sourceOffset + 3] / 255;\n dest[destOffset + 4] = backgroundR + deltaR * c;\n dest[destOffset + 5] = backgroundG + deltaG * c;\n dest[destOffset + 6] = backgroundB + deltaB * c;\n }\n destOffset += outWidth;\n {\n var c = x2CharData[sourceOffset + 4] / 255;\n dest[destOffset + 0] = backgroundR + deltaR * c;\n dest[destOffset + 1] = backgroundG + deltaG * c;\n dest[destOffset + 2] = backgroundB + deltaB * c;\n }\n {\n var c = x2CharData[sourceOffset + 5] / 255;\n dest[destOffset + 4] = backgroundR + deltaR * c;\n dest[destOffset + 5] = backgroundG + deltaG * c;\n dest[destOffset + 6] = backgroundB + deltaB * c;\n }\n destOffset += outWidth;\n {\n var c = x2CharData[sourceOffset + 6] / 255;\n dest[destOffset + 0] = backgroundR + deltaR * c;\n dest[destOffset + 1] = backgroundG + deltaG * c;\n dest[destOffset + 2] = backgroundB + deltaB * c;\n }\n {\n var c = x2CharData[sourceOffset + 7] / 255;\n dest[destOffset + 4] = backgroundR + deltaR * c;\n dest[destOffset + 5] = backgroundG + deltaG * c;\n dest[destOffset + 6] = backgroundB + deltaB * c;\n }\n };\n MinimapCharRenderer.prototype.x1RenderChar = function (target, dx, dy, chCode, color, backgroundColor, useLighterFont) {\n if (dx + 1 /* x1_CHAR_WIDTH */ > target.width || dy + 2 /* x1_CHAR_HEIGHT */ > target.height) {\n console.warn('bad render request outside image data');\n return;\n }\n var x1CharData = useLighterFont ? this.x1charDataLight : this.x1charData;\n var chIndex = MinimapCharRenderer._getChIndex(chCode);\n var outWidth = target.width * 4 /* RGBA_CHANNELS_CNT */;\n var backgroundR = backgroundColor.r;\n var backgroundG = backgroundColor.g;\n var backgroundB = backgroundColor.b;\n var deltaR = color.r - backgroundR;\n var deltaG = color.g - backgroundG;\n var deltaB = color.b - backgroundB;\n var dest = target.data;\n var sourceOffset = chIndex * 2 /* x1_CHAR_HEIGHT */ * 1 /* x1_CHAR_WIDTH */;\n var destOffset = dy * outWidth + dx * 4 /* RGBA_CHANNELS_CNT */;\n {\n var c = x1CharData[sourceOffset] / 255;\n dest[destOffset + 0] = backgroundR + deltaR * c;\n dest[destOffset + 1] = backgroundG + deltaG * c;\n dest[destOffset + 2] = backgroundB + deltaB * c;\n }\n destOffset += outWidth;\n {\n var c = x1CharData[sourceOffset + 1] / 255;\n dest[destOffset + 0] = backgroundR + deltaR * c;\n dest[destOffset + 1] = backgroundG + deltaG * c;\n dest[destOffset + 2] = backgroundB + deltaB * c;\n }\n };\n MinimapCharRenderer.prototype.x2BlockRenderChar = function (target, dx, dy, color, backgroundColor, useLighterFont) {\n if (dx + 2 /* x2_CHAR_WIDTH */ > target.width || dy + 4 /* x2_CHAR_HEIGHT */ > target.height) {\n console.warn('bad render request outside image data');\n return;\n }\n var outWidth = target.width * 4 /* RGBA_CHANNELS_CNT */;\n var c = 0.5;\n var backgroundR = backgroundColor.r;\n var backgroundG = backgroundColor.g;\n var backgroundB = backgroundColor.b;\n var deltaR = color.r - backgroundR;\n var deltaG = color.g - backgroundG;\n var deltaB = color.b - backgroundB;\n var colorR = backgroundR + deltaR * c;\n var colorG = backgroundG + deltaG * c;\n var colorB = backgroundB + deltaB * c;\n var dest = target.data;\n var destOffset = dy * outWidth + dx * 4 /* RGBA_CHANNELS_CNT */;\n {\n dest[destOffset + 0] = colorR;\n dest[destOffset + 1] = colorG;\n dest[destOffset + 2] = colorB;\n }\n {\n dest[destOffset + 4] = colorR;\n dest[destOffset + 5] = colorG;\n dest[destOffset + 6] = colorB;\n }\n destOffset += outWidth;\n {\n dest[destOffset + 0] = colorR;\n dest[destOffset + 1] = colorG;\n dest[destOffset + 2] = colorB;\n }\n {\n dest[destOffset + 4] = colorR;\n dest[destOffset + 5] = colorG;\n dest[destOffset + 6] = colorB;\n }\n destOffset += outWidth;\n {\n dest[destOffset + 0] = colorR;\n dest[destOffset + 1] = colorG;\n dest[destOffset + 2] = colorB;\n }\n {\n dest[destOffset + 4] = colorR;\n dest[destOffset + 5] = colorG;\n dest[destOffset + 6] = colorB;\n }\n destOffset += outWidth;\n {\n dest[destOffset + 0] = colorR;\n dest[destOffset + 1] = colorG;\n dest[destOffset + 2] = colorB;\n }\n {\n dest[destOffset + 4] = colorR;\n dest[destOffset + 5] = colorG;\n dest[destOffset + 6] = colorB;\n }\n };\n MinimapCharRenderer.prototype.x1BlockRenderChar = function (target, dx, dy, color, backgroundColor, useLighterFont) {\n if (dx + 1 /* x1_CHAR_WIDTH */ > target.width || dy + 2 /* x1_CHAR_HEIGHT */ > target.height) {\n console.warn('bad render request outside image data');\n return;\n }\n var outWidth = target.width * 4 /* RGBA_CHANNELS_CNT */;\n var c = 0.5;\n var backgroundR = backgroundColor.r;\n var backgroundG = backgroundColor.g;\n var backgroundB = backgroundColor.b;\n var deltaR = color.r - backgroundR;\n var deltaG = color.g - backgroundG;\n var deltaB = color.b - backgroundB;\n var colorR = backgroundR + deltaR * c;\n var colorG = backgroundG + deltaG * c;\n var colorB = backgroundB + deltaB * c;\n var dest = target.data;\n var destOffset = dy * outWidth + dx * 4 /* RGBA_CHANNELS_CNT */;\n {\n dest[destOffset + 0] = colorR;\n dest[destOffset + 1] = colorG;\n dest[destOffset + 2] = colorB;\n }\n destOffset += outWidth;\n {\n dest[destOffset + 0] = colorR;\n dest[destOffset + 1] = colorG;\n dest[destOffset + 2] = colorB;\n }\n };\n return MinimapCharRenderer;\n}());\nexport { MinimapCharRenderer };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport * as strings from '../../../base/common/strings';\nimport { PrefixSumComputer } from './prefixSumComputer';\nimport { OutputPosition } from './splitLinesCollection';\nimport { CharacterClassifier } from '../core/characterClassifier';\nimport { toUint32Array } from '../core/uint';\nimport { WrappingIndent } from '../config/editorOptions';\nvar WrappingCharacterClassifier = /** @class */ (function (_super) {\n __extends(WrappingCharacterClassifier, _super);\n function WrappingCharacterClassifier(BREAK_BEFORE, BREAK_AFTER, BREAK_OBTRUSIVE) {\n var _this = _super.call(this, 0 /* NONE */) || this;\n for (var i = 0; i < BREAK_BEFORE.length; i++) {\n _this.set(BREAK_BEFORE.charCodeAt(i), 1 /* BREAK_BEFORE */);\n }\n for (var i = 0; i < BREAK_AFTER.length; i++) {\n _this.set(BREAK_AFTER.charCodeAt(i), 2 /* BREAK_AFTER */);\n }\n for (var i = 0; i < BREAK_OBTRUSIVE.length; i++) {\n _this.set(BREAK_OBTRUSIVE.charCodeAt(i), 3 /* BREAK_OBTRUSIVE */);\n }\n return _this;\n }\n WrappingCharacterClassifier.prototype.get = function (charCode) {\n // Initialize CharacterClass.BREAK_IDEOGRAPHIC for these Unicode ranges:\n // 1. CJK Unified Ideographs (0x4E00 -- 0x9FFF)\n // 2. CJK Unified Ideographs Extension A (0x3400 -- 0x4DBF)\n // 3. Hiragana and Katakana (0x3040 -- 0x30FF)\n if ((charCode >= 0x3040 && charCode <= 0x30FF)\n || (charCode >= 0x3400 && charCode <= 0x4DBF)\n || (charCode >= 0x4E00 && charCode <= 0x9FFF)) {\n return 4 /* BREAK_IDEOGRAPHIC */;\n }\n return _super.prototype.get.call(this, charCode);\n };\n return WrappingCharacterClassifier;\n}(CharacterClassifier));\nvar CharacterHardWrappingLineMapperFactory = /** @class */ (function () {\n function CharacterHardWrappingLineMapperFactory(breakBeforeChars, breakAfterChars, breakObtrusiveChars) {\n this.classifier = new WrappingCharacterClassifier(breakBeforeChars, breakAfterChars, breakObtrusiveChars);\n }\n // TODO@Alex -> duplicated in lineCommentCommand\n CharacterHardWrappingLineMapperFactory.nextVisibleColumn = function (currentVisibleColumn, tabSize, isTab, columnSize) {\n currentVisibleColumn = +currentVisibleColumn; //@perf\n tabSize = +tabSize; //@perf\n columnSize = +columnSize; //@perf\n if (isTab) {\n return currentVisibleColumn + (tabSize - (currentVisibleColumn % tabSize));\n }\n return currentVisibleColumn + columnSize;\n };\n CharacterHardWrappingLineMapperFactory.prototype.createLineMapping = function (lineText, tabSize, breakingColumn, columnsForFullWidthChar, hardWrappingIndent) {\n if (breakingColumn === -1) {\n return null;\n }\n tabSize = +tabSize; //@perf\n breakingColumn = +breakingColumn; //@perf\n columnsForFullWidthChar = +columnsForFullWidthChar; //@perf\n hardWrappingIndent = +hardWrappingIndent; //@perf\n var wrappedTextIndentVisibleColumn = 0;\n var wrappedTextIndent = '';\n var firstNonWhitespaceIndex = -1;\n if (hardWrappingIndent !== WrappingIndent.None) {\n firstNonWhitespaceIndex = strings.firstNonWhitespaceIndex(lineText);\n if (firstNonWhitespaceIndex !== -1) {\n // Track existing indent\n wrappedTextIndent = lineText.substring(0, firstNonWhitespaceIndex);\n for (var i = 0; i < firstNonWhitespaceIndex; i++) {\n wrappedTextIndentVisibleColumn = CharacterHardWrappingLineMapperFactory.nextVisibleColumn(wrappedTextIndentVisibleColumn, tabSize, lineText.charCodeAt(i) === 9 /* Tab */, 1);\n }\n // Increase indent of continuation lines, if desired\n var numberOfAdditionalTabs = 0;\n if (hardWrappingIndent === WrappingIndent.Indent) {\n numberOfAdditionalTabs = 1;\n }\n else if (hardWrappingIndent === WrappingIndent.DeepIndent) {\n numberOfAdditionalTabs = 2;\n }\n for (var i = 0; i < numberOfAdditionalTabs; i++) {\n wrappedTextIndent += '\\t';\n wrappedTextIndentVisibleColumn = CharacterHardWrappingLineMapperFactory.nextVisibleColumn(wrappedTextIndentVisibleColumn, tabSize, true, 1);\n }\n // Force sticking to beginning of line if no character would fit except for the indentation\n if (wrappedTextIndentVisibleColumn + columnsForFullWidthChar > breakingColumn) {\n wrappedTextIndent = '';\n wrappedTextIndentVisibleColumn = 0;\n }\n }\n }\n var classifier = this.classifier;\n var lastBreakingOffset = 0; // Last 0-based offset in the lineText at which a break happened\n var breakingLengths = []; // The length of each broken-up line text\n var breakingLengthsIndex = 0; // The count of breaks already done\n var visibleColumn = 0; // Visible column since the beginning of the current line\n var niceBreakOffset = -1; // Last index of a character that indicates a break should happen before it (more desirable)\n var niceBreakVisibleColumn = 0; // visible column if a break were to be later introduced before `niceBreakOffset`\n var obtrusiveBreakOffset = -1; // Last index of a character that indicates a break should happen before it (less desirable)\n var obtrusiveBreakVisibleColumn = 0; // visible column if a break were to be later introduced before `obtrusiveBreakOffset`\n var len = lineText.length;\n for (var i = 0; i < len; i++) {\n // At this point, there is a certainty that the character before `i` fits on the current line,\n // but the character at `i` might not fit\n var charCode = lineText.charCodeAt(i);\n var charCodeIsTab = (charCode === 9 /* Tab */);\n var charCodeClass = classifier.get(charCode);\n if (charCodeClass === 1 /* BREAK_BEFORE */) {\n // This is a character that indicates that a break should happen before it\n // Since we are certain the character before `i` fits, there's no extra checking needed,\n // just mark it as a nice breaking opportunity\n niceBreakOffset = i;\n niceBreakVisibleColumn = wrappedTextIndentVisibleColumn;\n }\n // CJK breaking : before break\n if (charCodeClass === 4 /* BREAK_IDEOGRAPHIC */ && i > 0) {\n var prevCode = lineText.charCodeAt(i - 1);\n var prevClass = classifier.get(prevCode);\n if (prevClass !== 1 /* BREAK_BEFORE */) { // Kinsoku Shori: Don't break after a leading character, like an open bracket\n niceBreakOffset = i;\n niceBreakVisibleColumn = wrappedTextIndentVisibleColumn;\n }\n }\n var charColumnSize = 1;\n if (strings.isFullWidthCharacter(charCode)) {\n charColumnSize = columnsForFullWidthChar;\n }\n // Advance visibleColumn with character at `i`\n visibleColumn = CharacterHardWrappingLineMapperFactory.nextVisibleColumn(visibleColumn, tabSize, charCodeIsTab, charColumnSize);\n if (visibleColumn > breakingColumn && i !== 0) {\n // We need to break at least before character at `i`:\n // - break before niceBreakLastOffset if it exists (and re-establish a correct visibleColumn by using niceBreakVisibleColumn + charAt(i))\n // - otherwise, break before obtrusiveBreakLastOffset if it exists (and re-establish a correct visibleColumn by using obtrusiveBreakVisibleColumn + charAt(i))\n // - otherwise, break before i (and re-establish a correct visibleColumn by charAt(i))\n var breakBeforeOffset = void 0;\n var restoreVisibleColumnFrom = void 0;\n if (niceBreakOffset !== -1 && niceBreakVisibleColumn <= breakingColumn) {\n // We will break before `niceBreakLastOffset`\n breakBeforeOffset = niceBreakOffset;\n restoreVisibleColumnFrom = niceBreakVisibleColumn;\n }\n else if (obtrusiveBreakOffset !== -1 && obtrusiveBreakVisibleColumn <= breakingColumn) {\n // We will break before `obtrusiveBreakLastOffset`\n breakBeforeOffset = obtrusiveBreakOffset;\n restoreVisibleColumnFrom = obtrusiveBreakVisibleColumn;\n }\n else {\n // We will break before `i`\n breakBeforeOffset = i;\n restoreVisibleColumnFrom = wrappedTextIndentVisibleColumn;\n }\n // Break before character at `breakBeforeOffset`\n breakingLengths[breakingLengthsIndex++] = breakBeforeOffset - lastBreakingOffset;\n lastBreakingOffset = breakBeforeOffset;\n // Re-establish visibleColumn by taking character at `i` into account\n visibleColumn = CharacterHardWrappingLineMapperFactory.nextVisibleColumn(restoreVisibleColumnFrom, tabSize, charCodeIsTab, charColumnSize);\n // Reset markers\n niceBreakOffset = -1;\n niceBreakVisibleColumn = 0;\n obtrusiveBreakOffset = -1;\n obtrusiveBreakVisibleColumn = 0;\n }\n // At this point, there is a certainty that the character at `i` fits on the current line\n if (niceBreakOffset !== -1) {\n // Advance niceBreakVisibleColumn\n niceBreakVisibleColumn = CharacterHardWrappingLineMapperFactory.nextVisibleColumn(niceBreakVisibleColumn, tabSize, charCodeIsTab, charColumnSize);\n }\n if (obtrusiveBreakOffset !== -1) {\n // Advance obtrusiveBreakVisibleColumn\n obtrusiveBreakVisibleColumn = CharacterHardWrappingLineMapperFactory.nextVisibleColumn(obtrusiveBreakVisibleColumn, tabSize, charCodeIsTab, charColumnSize);\n }\n if (charCodeClass === 2 /* BREAK_AFTER */ && (hardWrappingIndent === WrappingIndent.None || i >= firstNonWhitespaceIndex)) {\n // This is a character that indicates that a break should happen after it\n niceBreakOffset = i + 1;\n niceBreakVisibleColumn = wrappedTextIndentVisibleColumn;\n }\n // CJK breaking : after break\n if (charCodeClass === 4 /* BREAK_IDEOGRAPHIC */ && i < len - 1) {\n var nextCode = lineText.charCodeAt(i + 1);\n var nextClass = classifier.get(nextCode);\n if (nextClass !== 2 /* BREAK_AFTER */) { // Kinsoku Shori: Don't break before a trailing character, like a period\n niceBreakOffset = i + 1;\n niceBreakVisibleColumn = wrappedTextIndentVisibleColumn;\n }\n }\n if (charCodeClass === 3 /* BREAK_OBTRUSIVE */) {\n // This is an obtrusive character that indicates that a break should happen after it\n obtrusiveBreakOffset = i + 1;\n obtrusiveBreakVisibleColumn = wrappedTextIndentVisibleColumn;\n }\n }\n if (breakingLengthsIndex === 0) {\n return null;\n }\n // Add last segment\n breakingLengths[breakingLengthsIndex++] = len - lastBreakingOffset;\n return new CharacterHardWrappingLineMapping(new PrefixSumComputer(toUint32Array(breakingLengths)), wrappedTextIndent);\n };\n return CharacterHardWrappingLineMapperFactory;\n}());\nexport { CharacterHardWrappingLineMapperFactory };\nvar CharacterHardWrappingLineMapping = /** @class */ (function () {\n function CharacterHardWrappingLineMapping(prefixSums, wrappedLinesIndent) {\n this._prefixSums = prefixSums;\n this._wrappedLinesIndent = wrappedLinesIndent;\n }\n CharacterHardWrappingLineMapping.prototype.getOutputLineCount = function () {\n return this._prefixSums.getCount();\n };\n CharacterHardWrappingLineMapping.prototype.getWrappedLinesIndent = function () {\n return this._wrappedLinesIndent;\n };\n CharacterHardWrappingLineMapping.prototype.getInputOffsetOfOutputPosition = function (outputLineIndex, outputOffset) {\n if (outputLineIndex === 0) {\n return outputOffset;\n }\n else {\n return this._prefixSums.getAccumulatedValue(outputLineIndex - 1) + outputOffset;\n }\n };\n CharacterHardWrappingLineMapping.prototype.getOutputPositionOfInputOffset = function (inputOffset) {\n var r = this._prefixSums.getIndexOf(inputOffset);\n return new OutputPosition(r.index, r.remainder);\n };\n return CharacterHardWrappingLineMapping;\n}());\nexport { CharacterHardWrappingLineMapping };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\n/**\n * Represent whitespaces in between lines and provide fast CRUD management methods.\n * The whitespaces are sorted ascending by `afterLineNumber`.\n */\nvar WhitespaceComputer = /** @class */ (function () {\n function WhitespaceComputer() {\n this._heights = [];\n this._minWidths = [];\n this._ids = [];\n this._afterLineNumbers = [];\n this._ordinals = [];\n this._prefixSum = [];\n this._prefixSumValidIndex = -1;\n this._whitespaceId2Index = {};\n this._lastWhitespaceId = 0;\n this._minWidth = -1; /* marker for not being computed */\n }\n /**\n * Find the insertion index for a new value inside a sorted array of values.\n * If the value is already present in the sorted array, the insertion index will be after the already existing value.\n */\n WhitespaceComputer.findInsertionIndex = function (sortedArray, value, ordinals, valueOrdinal) {\n var low = 0;\n var high = sortedArray.length;\n while (low < high) {\n var mid = ((low + high) >>> 1);\n if (value === sortedArray[mid]) {\n if (valueOrdinal < ordinals[mid]) {\n high = mid;\n }\n else {\n low = mid + 1;\n }\n }\n else if (value < sortedArray[mid]) {\n high = mid;\n }\n else {\n low = mid + 1;\n }\n }\n return low;\n };\n /**\n * Insert a new whitespace of a certain height after a line number.\n * The whitespace has a \"sticky\" characteristic.\n * Irrespective of edits above or below `afterLineNumber`, the whitespace will follow the initial line.\n *\n * @param afterLineNumber The conceptual position of this whitespace. The whitespace will follow this line as best as possible even when deleting/inserting lines above/below.\n * @param heightInPx The height of the whitespace, in pixels.\n * @return An id that can be used later to mutate or delete the whitespace\n */\n WhitespaceComputer.prototype.insertWhitespace = function (afterLineNumber, ordinal, heightInPx, minWidth) {\n afterLineNumber = afterLineNumber | 0;\n ordinal = ordinal | 0;\n heightInPx = heightInPx | 0;\n minWidth = minWidth | 0;\n var id = (++this._lastWhitespaceId);\n var insertionIndex = WhitespaceComputer.findInsertionIndex(this._afterLineNumbers, afterLineNumber, this._ordinals, ordinal);\n this._insertWhitespaceAtIndex(id, insertionIndex, afterLineNumber, ordinal, heightInPx, minWidth);\n this._minWidth = -1; /* marker for not being computed */\n return id;\n };\n WhitespaceComputer.prototype._insertWhitespaceAtIndex = function (id, insertIndex, afterLineNumber, ordinal, heightInPx, minWidth) {\n id = id | 0;\n insertIndex = insertIndex | 0;\n afterLineNumber = afterLineNumber | 0;\n ordinal = ordinal | 0;\n heightInPx = heightInPx | 0;\n minWidth = minWidth | 0;\n this._heights.splice(insertIndex, 0, heightInPx);\n this._minWidths.splice(insertIndex, 0, minWidth);\n this._ids.splice(insertIndex, 0, id);\n this._afterLineNumbers.splice(insertIndex, 0, afterLineNumber);\n this._ordinals.splice(insertIndex, 0, ordinal);\n this._prefixSum.splice(insertIndex, 0, 0);\n var keys = Object.keys(this._whitespaceId2Index);\n for (var i = 0, len = keys.length; i < len; i++) {\n var sid = keys[i];\n var oldIndex = this._whitespaceId2Index[sid];\n if (oldIndex >= insertIndex) {\n this._whitespaceId2Index[sid] = oldIndex + 1;\n }\n }\n this._whitespaceId2Index[id.toString()] = insertIndex;\n this._prefixSumValidIndex = Math.min(this._prefixSumValidIndex, insertIndex - 1);\n };\n /**\n * Change properties associated with a certain whitespace.\n */\n WhitespaceComputer.prototype.changeWhitespace = function (id, newAfterLineNumber, newHeight) {\n id = id | 0;\n newAfterLineNumber = newAfterLineNumber | 0;\n newHeight = newHeight | 0;\n var hasChanges = false;\n hasChanges = this.changeWhitespaceHeight(id, newHeight) || hasChanges;\n hasChanges = this.changeWhitespaceAfterLineNumber(id, newAfterLineNumber) || hasChanges;\n return hasChanges;\n };\n /**\n * Change the height of an existing whitespace\n *\n * @param id The whitespace to change\n * @param newHeightInPx The new height of the whitespace, in pixels\n * @return Returns true if the whitespace is found and if the new height is different than the old height\n */\n WhitespaceComputer.prototype.changeWhitespaceHeight = function (id, newHeightInPx) {\n id = id | 0;\n newHeightInPx = newHeightInPx | 0;\n var sid = id.toString();\n if (this._whitespaceId2Index.hasOwnProperty(sid)) {\n var index = this._whitespaceId2Index[sid];\n if (this._heights[index] !== newHeightInPx) {\n this._heights[index] = newHeightInPx;\n this._prefixSumValidIndex = Math.min(this._prefixSumValidIndex, index - 1);\n return true;\n }\n }\n return false;\n };\n /**\n * Change the line number after which an existing whitespace flows.\n *\n * @param id The whitespace to change\n * @param newAfterLineNumber The new line number the whitespace will follow\n * @return Returns true if the whitespace is found and if the new line number is different than the old line number\n */\n WhitespaceComputer.prototype.changeWhitespaceAfterLineNumber = function (id, newAfterLineNumber) {\n id = id | 0;\n newAfterLineNumber = newAfterLineNumber | 0;\n var sid = id.toString();\n if (this._whitespaceId2Index.hasOwnProperty(sid)) {\n var index = this._whitespaceId2Index[sid];\n if (this._afterLineNumbers[index] !== newAfterLineNumber) {\n // `afterLineNumber` changed for this whitespace\n // Record old ordinal\n var ordinal = this._ordinals[index];\n // Record old height\n var heightInPx = this._heights[index];\n // Record old min width\n var minWidth = this._minWidths[index];\n // Since changing `afterLineNumber` can trigger a reordering, we're gonna remove this whitespace\n this.removeWhitespace(id);\n // And add it again\n var insertionIndex = WhitespaceComputer.findInsertionIndex(this._afterLineNumbers, newAfterLineNumber, this._ordinals, ordinal);\n this._insertWhitespaceAtIndex(id, insertionIndex, newAfterLineNumber, ordinal, heightInPx, minWidth);\n return true;\n }\n }\n return false;\n };\n /**\n * Remove an existing whitespace.\n *\n * @param id The whitespace to remove\n * @return Returns true if the whitespace is found and it is removed.\n */\n WhitespaceComputer.prototype.removeWhitespace = function (id) {\n id = id | 0;\n var sid = id.toString();\n if (this._whitespaceId2Index.hasOwnProperty(sid)) {\n var index = this._whitespaceId2Index[sid];\n delete this._whitespaceId2Index[sid];\n this._removeWhitespaceAtIndex(index);\n this._minWidth = -1; /* marker for not being computed */\n return true;\n }\n return false;\n };\n WhitespaceComputer.prototype._removeWhitespaceAtIndex = function (removeIndex) {\n removeIndex = removeIndex | 0;\n this._heights.splice(removeIndex, 1);\n this._minWidths.splice(removeIndex, 1);\n this._ids.splice(removeIndex, 1);\n this._afterLineNumbers.splice(removeIndex, 1);\n this._ordinals.splice(removeIndex, 1);\n this._prefixSum.splice(removeIndex, 1);\n this._prefixSumValidIndex = Math.min(this._prefixSumValidIndex, removeIndex - 1);\n var keys = Object.keys(this._whitespaceId2Index);\n for (var i = 0, len = keys.length; i < len; i++) {\n var sid = keys[i];\n var oldIndex = this._whitespaceId2Index[sid];\n if (oldIndex >= removeIndex) {\n this._whitespaceId2Index[sid] = oldIndex - 1;\n }\n }\n };\n /**\n * Notify the computer that lines have been deleted (a continuous zone of lines).\n * This gives it a chance to update `afterLineNumber` for whitespaces, giving the \"sticky\" characteristic.\n *\n * @param fromLineNumber The line number at which the deletion started, inclusive\n * @param toLineNumber The line number at which the deletion ended, inclusive\n */\n WhitespaceComputer.prototype.onLinesDeleted = function (fromLineNumber, toLineNumber) {\n fromLineNumber = fromLineNumber | 0;\n toLineNumber = toLineNumber | 0;\n for (var i = 0, len = this._afterLineNumbers.length; i < len; i++) {\n var afterLineNumber = this._afterLineNumbers[i];\n if (fromLineNumber <= afterLineNumber && afterLineNumber <= toLineNumber) {\n // The line this whitespace was after has been deleted\n // => move whitespace to before first deleted line\n this._afterLineNumbers[i] = fromLineNumber - 1;\n }\n else if (afterLineNumber > toLineNumber) {\n // The line this whitespace was after has been moved up\n // => move whitespace up\n this._afterLineNumbers[i] -= (toLineNumber - fromLineNumber + 1);\n }\n }\n };\n /**\n * Notify the computer that lines have been inserted (a continuous zone of lines).\n * This gives it a chance to update `afterLineNumber` for whitespaces, giving the \"sticky\" characteristic.\n *\n * @param fromLineNumber The line number at which the insertion started, inclusive\n * @param toLineNumber The line number at which the insertion ended, inclusive.\n */\n WhitespaceComputer.prototype.onLinesInserted = function (fromLineNumber, toLineNumber) {\n fromLineNumber = fromLineNumber | 0;\n toLineNumber = toLineNumber | 0;\n for (var i = 0, len = this._afterLineNumbers.length; i < len; i++) {\n var afterLineNumber = this._afterLineNumbers[i];\n if (fromLineNumber <= afterLineNumber) {\n this._afterLineNumbers[i] += (toLineNumber - fromLineNumber + 1);\n }\n }\n };\n /**\n * Get the sum of all the whitespaces.\n */\n WhitespaceComputer.prototype.getTotalHeight = function () {\n if (this._heights.length === 0) {\n return 0;\n }\n return this.getAccumulatedHeight(this._heights.length - 1);\n };\n /**\n * Return the sum of the heights of the whitespaces at [0..index].\n * This includes the whitespace at `index`.\n *\n * @param index The index of the whitespace.\n * @return The sum of the heights of all whitespaces before the one at `index`, including the one at `index`.\n */\n WhitespaceComputer.prototype.getAccumulatedHeight = function (index) {\n index = index | 0;\n var startIndex = Math.max(0, this._prefixSumValidIndex + 1);\n if (startIndex === 0) {\n this._prefixSum[0] = this._heights[0];\n startIndex++;\n }\n for (var i = startIndex; i <= index; i++) {\n this._prefixSum[i] = this._prefixSum[i - 1] + this._heights[i];\n }\n this._prefixSumValidIndex = Math.max(this._prefixSumValidIndex, index);\n return this._prefixSum[index];\n };\n /**\n * Find all whitespaces with `afterLineNumber` < `lineNumber` and return the sum of their heights.\n *\n * @param lineNumber The line number whitespaces should be before.\n * @return The sum of the heights of the whitespaces before `lineNumber`.\n */\n WhitespaceComputer.prototype.getAccumulatedHeightBeforeLineNumber = function (lineNumber) {\n lineNumber = lineNumber | 0;\n var lastWhitespaceBeforeLineNumber = this._findLastWhitespaceBeforeLineNumber(lineNumber);\n if (lastWhitespaceBeforeLineNumber === -1) {\n return 0;\n }\n return this.getAccumulatedHeight(lastWhitespaceBeforeLineNumber);\n };\n WhitespaceComputer.prototype._findLastWhitespaceBeforeLineNumber = function (lineNumber) {\n lineNumber = lineNumber | 0;\n // Find the whitespace before line number\n var afterLineNumbers = this._afterLineNumbers;\n var low = 0;\n var high = afterLineNumbers.length - 1;\n while (low <= high) {\n var delta = (high - low) | 0;\n var halfDelta = (delta / 2) | 0;\n var mid = (low + halfDelta) | 0;\n if (afterLineNumbers[mid] < lineNumber) {\n if (mid + 1 >= afterLineNumbers.length || afterLineNumbers[mid + 1] >= lineNumber) {\n return mid;\n }\n else {\n low = (mid + 1) | 0;\n }\n }\n else {\n high = (mid - 1) | 0;\n }\n }\n return -1;\n };\n WhitespaceComputer.prototype._findFirstWhitespaceAfterLineNumber = function (lineNumber) {\n lineNumber = lineNumber | 0;\n var lastWhitespaceBeforeLineNumber = this._findLastWhitespaceBeforeLineNumber(lineNumber);\n var firstWhitespaceAfterLineNumber = lastWhitespaceBeforeLineNumber + 1;\n if (firstWhitespaceAfterLineNumber < this._heights.length) {\n return firstWhitespaceAfterLineNumber;\n }\n return -1;\n };\n /**\n * Find the index of the first whitespace which has `afterLineNumber` >= `lineNumber`.\n * @return The index of the first whitespace with `afterLineNumber` >= `lineNumber` or -1 if no whitespace is found.\n */\n WhitespaceComputer.prototype.getFirstWhitespaceIndexAfterLineNumber = function (lineNumber) {\n lineNumber = lineNumber | 0;\n return this._findFirstWhitespaceAfterLineNumber(lineNumber);\n };\n /**\n * The number of whitespaces.\n */\n WhitespaceComputer.prototype.getCount = function () {\n return this._heights.length;\n };\n /**\n * The maximum min width for all whitespaces.\n */\n WhitespaceComputer.prototype.getMinWidth = function () {\n if (this._minWidth === -1) {\n var minWidth = 0;\n for (var i = 0, len = this._minWidths.length; i < len; i++) {\n minWidth = Math.max(minWidth, this._minWidths[i]);\n }\n this._minWidth = minWidth;\n }\n return this._minWidth;\n };\n /**\n * Get the `afterLineNumber` for whitespace at index `index`.\n *\n * @param index The index of the whitespace.\n * @return `afterLineNumber` of whitespace at `index`.\n */\n WhitespaceComputer.prototype.getAfterLineNumberForWhitespaceIndex = function (index) {\n index = index | 0;\n return this._afterLineNumbers[index];\n };\n /**\n * Get the `id` for whitespace at index `index`.\n *\n * @param index The index of the whitespace.\n * @return `id` of whitespace at `index`.\n */\n WhitespaceComputer.prototype.getIdForWhitespaceIndex = function (index) {\n index = index | 0;\n return this._ids[index];\n };\n /**\n * Get the `height` for whitespace at index `index`.\n *\n * @param index The index of the whitespace.\n * @return `height` of whitespace at `index`.\n */\n WhitespaceComputer.prototype.getHeightForWhitespaceIndex = function (index) {\n index = index | 0;\n return this._heights[index];\n };\n /**\n * Get all whitespaces.\n */\n WhitespaceComputer.prototype.getWhitespaces = function (deviceLineHeight) {\n deviceLineHeight = deviceLineHeight | 0;\n var result = [];\n for (var i = 0; i < this._heights.length; i++) {\n result.push({\n id: this._ids[i],\n afterLineNumber: this._afterLineNumbers[i],\n heightInLines: this._heights[i] / deviceLineHeight\n });\n }\n return result;\n };\n return WhitespaceComputer;\n}());\nexport { WhitespaceComputer };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport { WhitespaceComputer } from './whitespaceComputer';\n/**\n * Layouting of objects that take vertical space (by having a height) and push down other objects.\n *\n * These objects are basically either text (lines) or spaces between those lines (whitespaces).\n * This provides commodity operations for working with lines that contain whitespace that pushes lines lower (vertically).\n * This is written with no knowledge of an editor in mind.\n */\nvar LinesLayout = /** @class */ (function () {\n function LinesLayout(lineCount, lineHeight) {\n this._lineCount = lineCount;\n this._lineHeight = lineHeight;\n this._whitespaces = new WhitespaceComputer();\n }\n /**\n * Change the height of a line in pixels.\n */\n LinesLayout.prototype.setLineHeight = function (lineHeight) {\n this._lineHeight = lineHeight;\n };\n /**\n * Set the number of lines.\n *\n * @param lineCount New number of lines.\n */\n LinesLayout.prototype.onFlushed = function (lineCount) {\n this._lineCount = lineCount;\n };\n /**\n * Insert a new whitespace of a certain height after a line number.\n * The whitespace has a \"sticky\" characteristic.\n * Irrespective of edits above or below `afterLineNumber`, the whitespace will follow the initial line.\n *\n * @param afterLineNumber The conceptual position of this whitespace. The whitespace will follow this line as best as possible even when deleting/inserting lines above/below.\n * @param heightInPx The height of the whitespace, in pixels.\n * @return An id that can be used later to mutate or delete the whitespace\n */\n LinesLayout.prototype.insertWhitespace = function (afterLineNumber, ordinal, heightInPx, minWidth) {\n return this._whitespaces.insertWhitespace(afterLineNumber, ordinal, heightInPx, minWidth);\n };\n /**\n * Change properties associated with a certain whitespace.\n */\n LinesLayout.prototype.changeWhitespace = function (id, newAfterLineNumber, newHeight) {\n return this._whitespaces.changeWhitespace(id, newAfterLineNumber, newHeight);\n };\n /**\n * Remove an existing whitespace.\n *\n * @param id The whitespace to remove\n * @return Returns true if the whitespace is found and it is removed.\n */\n LinesLayout.prototype.removeWhitespace = function (id) {\n return this._whitespaces.removeWhitespace(id);\n };\n /**\n * Notify the layouter that lines have been deleted (a continuous zone of lines).\n *\n * @param fromLineNumber The line number at which the deletion started, inclusive\n * @param toLineNumber The line number at which the deletion ended, inclusive\n */\n LinesLayout.prototype.onLinesDeleted = function (fromLineNumber, toLineNumber) {\n this._lineCount -= (toLineNumber - fromLineNumber + 1);\n this._whitespaces.onLinesDeleted(fromLineNumber, toLineNumber);\n };\n /**\n * Notify the layouter that lines have been inserted (a continuous zone of lines).\n *\n * @param fromLineNumber The line number at which the insertion started, inclusive\n * @param toLineNumber The line number at which the insertion ended, inclusive.\n */\n LinesLayout.prototype.onLinesInserted = function (fromLineNumber, toLineNumber) {\n this._lineCount += (toLineNumber - fromLineNumber + 1);\n this._whitespaces.onLinesInserted(fromLineNumber, toLineNumber);\n };\n /**\n * Get the sum of heights for all objects.\n *\n * @return The sum of heights for all objects.\n */\n LinesLayout.prototype.getLinesTotalHeight = function () {\n var linesHeight = this._lineHeight * this._lineCount;\n var whitespacesHeight = this._whitespaces.getTotalHeight();\n return linesHeight + whitespacesHeight;\n };\n /**\n * Get the vertical offset (the sum of heights for all objects above) a certain line number.\n *\n * @param lineNumber The line number\n * @return The sum of heights for all objects above `lineNumber`.\n */\n LinesLayout.prototype.getVerticalOffsetForLineNumber = function (lineNumber) {\n lineNumber = lineNumber | 0;\n var previousLinesHeight;\n if (lineNumber > 1) {\n previousLinesHeight = this._lineHeight * (lineNumber - 1);\n }\n else {\n previousLinesHeight = 0;\n }\n var previousWhitespacesHeight = this._whitespaces.getAccumulatedHeightBeforeLineNumber(lineNumber);\n return previousLinesHeight + previousWhitespacesHeight;\n };\n /**\n * Returns the accumulated height of whitespaces before the given line number.\n *\n * @param lineNumber The line number\n */\n LinesLayout.prototype.getWhitespaceAccumulatedHeightBeforeLineNumber = function (lineNumber) {\n return this._whitespaces.getAccumulatedHeightBeforeLineNumber(lineNumber);\n };\n LinesLayout.prototype.getWhitespaceMinWidth = function () {\n return this._whitespaces.getMinWidth();\n };\n /**\n * Check if `verticalOffset` is below all lines.\n */\n LinesLayout.prototype.isAfterLines = function (verticalOffset) {\n var totalHeight = this.getLinesTotalHeight();\n return verticalOffset > totalHeight;\n };\n /**\n * Find the first line number that is at or after vertical offset `verticalOffset`.\n * i.e. if getVerticalOffsetForLine(line) is x and getVerticalOffsetForLine(line + 1) is y, then\n * getLineNumberAtOrAfterVerticalOffset(i) = line, x <= i < y.\n *\n * @param verticalOffset The vertical offset to search at.\n * @return The line number at or after vertical offset `verticalOffset`.\n */\n LinesLayout.prototype.getLineNumberAtOrAfterVerticalOffset = function (verticalOffset) {\n verticalOffset = verticalOffset | 0;\n if (verticalOffset < 0) {\n return 1;\n }\n var linesCount = this._lineCount | 0;\n var lineHeight = this._lineHeight;\n var minLineNumber = 1;\n var maxLineNumber = linesCount;\n while (minLineNumber < maxLineNumber) {\n var midLineNumber = ((minLineNumber + maxLineNumber) / 2) | 0;\n var midLineNumberVerticalOffset = this.getVerticalOffsetForLineNumber(midLineNumber) | 0;\n if (verticalOffset >= midLineNumberVerticalOffset + lineHeight) {\n // vertical offset is after mid line number\n minLineNumber = midLineNumber + 1;\n }\n else if (verticalOffset >= midLineNumberVerticalOffset) {\n // Hit\n return midLineNumber;\n }\n else {\n // vertical offset is before mid line number, but mid line number could still be what we're searching for\n maxLineNumber = midLineNumber;\n }\n }\n if (minLineNumber > linesCount) {\n return linesCount;\n }\n return minLineNumber;\n };\n /**\n * Get all the lines and their relative vertical offsets that are positioned between `verticalOffset1` and `verticalOffset2`.\n *\n * @param verticalOffset1 The beginning of the viewport.\n * @param verticalOffset2 The end of the viewport.\n * @return A structure describing the lines positioned between `verticalOffset1` and `verticalOffset2`.\n */\n LinesLayout.prototype.getLinesViewportData = function (verticalOffset1, verticalOffset2) {\n verticalOffset1 = verticalOffset1 | 0;\n verticalOffset2 = verticalOffset2 | 0;\n var lineHeight = this._lineHeight;\n // Find first line number\n // We don't live in a perfect world, so the line number might start before or after verticalOffset1\n var startLineNumber = this.getLineNumberAtOrAfterVerticalOffset(verticalOffset1) | 0;\n var startLineNumberVerticalOffset = this.getVerticalOffsetForLineNumber(startLineNumber) | 0;\n var endLineNumber = this._lineCount | 0;\n // Also keep track of what whitespace we've got\n var whitespaceIndex = this._whitespaces.getFirstWhitespaceIndexAfterLineNumber(startLineNumber) | 0;\n var whitespaceCount = this._whitespaces.getCount() | 0;\n var currentWhitespaceHeight;\n var currentWhitespaceAfterLineNumber;\n if (whitespaceIndex === -1) {\n whitespaceIndex = whitespaceCount;\n currentWhitespaceAfterLineNumber = endLineNumber + 1;\n currentWhitespaceHeight = 0;\n }\n else {\n currentWhitespaceAfterLineNumber = this._whitespaces.getAfterLineNumberForWhitespaceIndex(whitespaceIndex) | 0;\n currentWhitespaceHeight = this._whitespaces.getHeightForWhitespaceIndex(whitespaceIndex) | 0;\n }\n var currentVerticalOffset = startLineNumberVerticalOffset;\n var currentLineRelativeOffset = currentVerticalOffset;\n // IE (all versions) cannot handle units above about 1,533,908 px, so every 500k pixels bring numbers down\n var STEP_SIZE = 500000;\n var bigNumbersDelta = 0;\n if (startLineNumberVerticalOffset >= STEP_SIZE) {\n // Compute a delta that guarantees that lines are positioned at `lineHeight` increments\n bigNumbersDelta = Math.floor(startLineNumberVerticalOffset / STEP_SIZE) * STEP_SIZE;\n bigNumbersDelta = Math.floor(bigNumbersDelta / lineHeight) * lineHeight;\n currentLineRelativeOffset -= bigNumbersDelta;\n }\n var linesOffsets = [];\n var verticalCenter = verticalOffset1 + (verticalOffset2 - verticalOffset1) / 2;\n var centeredLineNumber = -1;\n // Figure out how far the lines go\n for (var lineNumber = startLineNumber; lineNumber <= endLineNumber; lineNumber++) {\n if (centeredLineNumber === -1) {\n var currentLineTop = currentVerticalOffset;\n var currentLineBottom = currentVerticalOffset + lineHeight;\n if ((currentLineTop <= verticalCenter && verticalCenter < currentLineBottom) || currentLineTop > verticalCenter) {\n centeredLineNumber = lineNumber;\n }\n }\n // Count current line height in the vertical offsets\n currentVerticalOffset += lineHeight;\n linesOffsets[lineNumber - startLineNumber] = currentLineRelativeOffset;\n // Next line starts immediately after this one\n currentLineRelativeOffset += lineHeight;\n while (currentWhitespaceAfterLineNumber === lineNumber) {\n // Push down next line with the height of the current whitespace\n currentLineRelativeOffset += currentWhitespaceHeight;\n // Count current whitespace in the vertical offsets\n currentVerticalOffset += currentWhitespaceHeight;\n whitespaceIndex++;\n if (whitespaceIndex >= whitespaceCount) {\n currentWhitespaceAfterLineNumber = endLineNumber + 1;\n }\n else {\n currentWhitespaceAfterLineNumber = this._whitespaces.getAfterLineNumberForWhitespaceIndex(whitespaceIndex) | 0;\n currentWhitespaceHeight = this._whitespaces.getHeightForWhitespaceIndex(whitespaceIndex) | 0;\n }\n }\n if (currentVerticalOffset >= verticalOffset2) {\n // We have covered the entire viewport area, time to stop\n endLineNumber = lineNumber;\n break;\n }\n }\n if (centeredLineNumber === -1) {\n centeredLineNumber = endLineNumber;\n }\n var endLineNumberVerticalOffset = this.getVerticalOffsetForLineNumber(endLineNumber) | 0;\n var completelyVisibleStartLineNumber = startLineNumber;\n var completelyVisibleEndLineNumber = endLineNumber;\n if (completelyVisibleStartLineNumber < completelyVisibleEndLineNumber) {\n if (startLineNumberVerticalOffset < verticalOffset1) {\n completelyVisibleStartLineNumber++;\n }\n }\n if (completelyVisibleStartLineNumber < completelyVisibleEndLineNumber) {\n if (endLineNumberVerticalOffset + lineHeight > verticalOffset2) {\n completelyVisibleEndLineNumber--;\n }\n }\n return {\n bigNumbersDelta: bigNumbersDelta,\n startLineNumber: startLineNumber,\n endLineNumber: endLineNumber,\n relativeVerticalOffset: linesOffsets,\n centeredLineNumber: centeredLineNumber,\n completelyVisibleStartLineNumber: completelyVisibleStartLineNumber,\n completelyVisibleEndLineNumber: completelyVisibleEndLineNumber\n };\n };\n LinesLayout.prototype.getVerticalOffsetForWhitespaceIndex = function (whitespaceIndex) {\n whitespaceIndex = whitespaceIndex | 0;\n var afterLineNumber = this._whitespaces.getAfterLineNumberForWhitespaceIndex(whitespaceIndex);\n var previousLinesHeight;\n if (afterLineNumber >= 1) {\n previousLinesHeight = this._lineHeight * afterLineNumber;\n }\n else {\n previousLinesHeight = 0;\n }\n var previousWhitespacesHeight;\n if (whitespaceIndex > 0) {\n previousWhitespacesHeight = this._whitespaces.getAccumulatedHeight(whitespaceIndex - 1);\n }\n else {\n previousWhitespacesHeight = 0;\n }\n return previousLinesHeight + previousWhitespacesHeight;\n };\n LinesLayout.prototype.getWhitespaceIndexAtOrAfterVerticallOffset = function (verticalOffset) {\n verticalOffset = verticalOffset | 0;\n var midWhitespaceIndex, minWhitespaceIndex = 0, maxWhitespaceIndex = this._whitespaces.getCount() - 1, midWhitespaceVerticalOffset, midWhitespaceHeight;\n if (maxWhitespaceIndex < 0) {\n return -1;\n }\n // Special case: nothing to be found\n var maxWhitespaceVerticalOffset = this.getVerticalOffsetForWhitespaceIndex(maxWhitespaceIndex);\n var maxWhitespaceHeight = this._whitespaces.getHeightForWhitespaceIndex(maxWhitespaceIndex);\n if (verticalOffset >= maxWhitespaceVerticalOffset + maxWhitespaceHeight) {\n return -1;\n }\n while (minWhitespaceIndex < maxWhitespaceIndex) {\n midWhitespaceIndex = Math.floor((minWhitespaceIndex + maxWhitespaceIndex) / 2);\n midWhitespaceVerticalOffset = this.getVerticalOffsetForWhitespaceIndex(midWhitespaceIndex);\n midWhitespaceHeight = this._whitespaces.getHeightForWhitespaceIndex(midWhitespaceIndex);\n if (verticalOffset >= midWhitespaceVerticalOffset + midWhitespaceHeight) {\n // vertical offset is after whitespace\n minWhitespaceIndex = midWhitespaceIndex + 1;\n }\n else if (verticalOffset >= midWhitespaceVerticalOffset) {\n // Hit\n return midWhitespaceIndex;\n }\n else {\n // vertical offset is before whitespace, but midWhitespaceIndex might still be what we're searching for\n maxWhitespaceIndex = midWhitespaceIndex;\n }\n }\n return minWhitespaceIndex;\n };\n /**\n * Get exactly the whitespace that is layouted at `verticalOffset`.\n *\n * @param verticalOffset The vertical offset.\n * @return Precisely the whitespace that is layouted at `verticaloffset` or null.\n */\n LinesLayout.prototype.getWhitespaceAtVerticalOffset = function (verticalOffset) {\n verticalOffset = verticalOffset | 0;\n var candidateIndex = this.getWhitespaceIndexAtOrAfterVerticallOffset(verticalOffset);\n if (candidateIndex < 0) {\n return null;\n }\n if (candidateIndex >= this._whitespaces.getCount()) {\n return null;\n }\n var candidateTop = this.getVerticalOffsetForWhitespaceIndex(candidateIndex);\n if (candidateTop > verticalOffset) {\n return null;\n }\n var candidateHeight = this._whitespaces.getHeightForWhitespaceIndex(candidateIndex);\n var candidateId = this._whitespaces.getIdForWhitespaceIndex(candidateIndex);\n var candidateAfterLineNumber = this._whitespaces.getAfterLineNumberForWhitespaceIndex(candidateIndex);\n return {\n id: candidateId,\n afterLineNumber: candidateAfterLineNumber,\n verticalOffset: candidateTop,\n height: candidateHeight\n };\n };\n /**\n * Get a list of whitespaces that are positioned between `verticalOffset1` and `verticalOffset2`.\n *\n * @param verticalOffset1 The beginning of the viewport.\n * @param verticalOffset2 The end of the viewport.\n * @return An array with all the whitespaces in the viewport. If no whitespace is in viewport, the array is empty.\n */\n LinesLayout.prototype.getWhitespaceViewportData = function (verticalOffset1, verticalOffset2) {\n verticalOffset1 = verticalOffset1 | 0;\n verticalOffset2 = verticalOffset2 | 0;\n var startIndex = this.getWhitespaceIndexAtOrAfterVerticallOffset(verticalOffset1);\n var endIndex = this._whitespaces.getCount() - 1;\n if (startIndex < 0) {\n return [];\n }\n var result = [];\n for (var i = startIndex; i <= endIndex; i++) {\n var top_1 = this.getVerticalOffsetForWhitespaceIndex(i);\n var height = this._whitespaces.getHeightForWhitespaceIndex(i);\n if (top_1 >= verticalOffset2) {\n break;\n }\n result.push({\n id: this._whitespaces.getIdForWhitespaceIndex(i),\n afterLineNumber: this._whitespaces.getAfterLineNumberForWhitespaceIndex(i),\n verticalOffset: top_1,\n height: height\n });\n }\n return result;\n };\n /**\n * Get all whitespaces.\n */\n LinesLayout.prototype.getWhitespaces = function () {\n return this._whitespaces.getWhitespaces(this._lineHeight);\n };\n return LinesLayout;\n}());\nexport { LinesLayout };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { Disposable } from '../../../base/common/lifecycle';\nimport { Scrollable, ScrollbarVisibility } from '../../../base/common/scrollable';\nimport { LinesLayout } from './linesLayout';\nimport { Viewport } from '../viewModel/viewModel';\nvar SMOOTH_SCROLLING_TIME = 125;\nvar ViewLayout = /** @class */ (function (_super) {\n __extends(ViewLayout, _super);\n function ViewLayout(configuration, lineCount, scheduleAtNextAnimationFrame) {\n var _this = _super.call(this) || this;\n _this._configuration = configuration;\n _this._linesLayout = new LinesLayout(lineCount, _this._configuration.editor.lineHeight);\n _this.scrollable = _this._register(new Scrollable(0, scheduleAtNextAnimationFrame));\n _this._configureSmoothScrollDuration();\n _this.scrollable.setScrollDimensions({\n width: configuration.editor.layoutInfo.contentWidth,\n height: configuration.editor.layoutInfo.contentHeight\n });\n _this.onDidScroll = _this.scrollable.onScroll;\n _this._updateHeight();\n return _this;\n }\n ViewLayout.prototype.dispose = function () {\n _super.prototype.dispose.call(this);\n };\n ViewLayout.prototype.onHeightMaybeChanged = function () {\n this._updateHeight();\n };\n ViewLayout.prototype._configureSmoothScrollDuration = function () {\n this.scrollable.setSmoothScrollDuration(this._configuration.editor.viewInfo.smoothScrolling ? SMOOTH_SCROLLING_TIME : 0);\n };\n // ---- begin view event handlers\n ViewLayout.prototype.onConfigurationChanged = function (e) {\n if (e.lineHeight) {\n this._linesLayout.setLineHeight(this._configuration.editor.lineHeight);\n }\n if (e.layoutInfo) {\n this.scrollable.setScrollDimensions({\n width: this._configuration.editor.layoutInfo.contentWidth,\n height: this._configuration.editor.layoutInfo.contentHeight\n });\n }\n if (e.viewInfo) {\n this._configureSmoothScrollDuration();\n }\n this._updateHeight();\n };\n ViewLayout.prototype.onFlushed = function (lineCount) {\n this._linesLayout.onFlushed(lineCount);\n };\n ViewLayout.prototype.onLinesDeleted = function (fromLineNumber, toLineNumber) {\n this._linesLayout.onLinesDeleted(fromLineNumber, toLineNumber);\n };\n ViewLayout.prototype.onLinesInserted = function (fromLineNumber, toLineNumber) {\n this._linesLayout.onLinesInserted(fromLineNumber, toLineNumber);\n };\n // ---- end view event handlers\n ViewLayout.prototype._getHorizontalScrollbarHeight = function (scrollDimensions) {\n if (this._configuration.editor.viewInfo.scrollbar.horizontal === ScrollbarVisibility.Hidden) {\n // horizontal scrollbar not visible\n return 0;\n }\n if (scrollDimensions.width >= scrollDimensions.scrollWidth) {\n // horizontal scrollbar not visible\n return 0;\n }\n return this._configuration.editor.viewInfo.scrollbar.horizontalScrollbarSize;\n };\n ViewLayout.prototype._getTotalHeight = function () {\n var scrollDimensions = this.scrollable.getScrollDimensions();\n var result = this._linesLayout.getLinesTotalHeight();\n if (this._configuration.editor.viewInfo.scrollBeyondLastLine) {\n result += scrollDimensions.height - this._configuration.editor.lineHeight;\n }\n else {\n result += this._getHorizontalScrollbarHeight(scrollDimensions);\n }\n return Math.max(scrollDimensions.height, result);\n };\n ViewLayout.prototype._updateHeight = function () {\n this.scrollable.setScrollDimensions({\n scrollHeight: this._getTotalHeight()\n });\n };\n // ---- Layouting logic\n ViewLayout.prototype.getCurrentViewport = function () {\n var scrollDimensions = this.scrollable.getScrollDimensions();\n var currentScrollPosition = this.scrollable.getCurrentScrollPosition();\n return new Viewport(currentScrollPosition.scrollTop, currentScrollPosition.scrollLeft, scrollDimensions.width, scrollDimensions.height);\n };\n ViewLayout.prototype.getFutureViewport = function () {\n var scrollDimensions = this.scrollable.getScrollDimensions();\n var currentScrollPosition = this.scrollable.getFutureScrollPosition();\n return new Viewport(currentScrollPosition.scrollTop, currentScrollPosition.scrollLeft, scrollDimensions.width, scrollDimensions.height);\n };\n ViewLayout.prototype._computeScrollWidth = function (maxLineWidth, viewportWidth) {\n var isViewportWrapping = this._configuration.editor.wrappingInfo.isViewportWrapping;\n if (!isViewportWrapping) {\n var extraHorizontalSpace = this._configuration.editor.viewInfo.scrollBeyondLastColumn * this._configuration.editor.fontInfo.typicalHalfwidthCharacterWidth;\n var whitespaceMinWidth = this._linesLayout.getWhitespaceMinWidth();\n return Math.max(maxLineWidth + extraHorizontalSpace, viewportWidth, whitespaceMinWidth);\n }\n return Math.max(maxLineWidth, viewportWidth);\n };\n ViewLayout.prototype.onMaxLineWidthChanged = function (maxLineWidth) {\n var newScrollWidth = this._computeScrollWidth(maxLineWidth, this.getCurrentViewport().width);\n this.scrollable.setScrollDimensions({\n scrollWidth: newScrollWidth\n });\n // The height might depend on the fact that there is a horizontal scrollbar or not\n this._updateHeight();\n };\n // ---- view state\n ViewLayout.prototype.saveState = function () {\n var currentScrollPosition = this.scrollable.getFutureScrollPosition();\n var scrollTop = currentScrollPosition.scrollTop;\n var firstLineNumberInViewport = this._linesLayout.getLineNumberAtOrAfterVerticalOffset(scrollTop);\n var whitespaceAboveFirstLine = this._linesLayout.getWhitespaceAccumulatedHeightBeforeLineNumber(firstLineNumberInViewport);\n return {\n scrollTop: scrollTop,\n scrollTopWithoutViewZones: scrollTop - whitespaceAboveFirstLine,\n scrollLeft: currentScrollPosition.scrollLeft\n };\n };\n // ---- IVerticalLayoutProvider\n ViewLayout.prototype.addWhitespace = function (afterLineNumber, ordinal, height, minWidth) {\n return this._linesLayout.insertWhitespace(afterLineNumber, ordinal, height, minWidth);\n };\n ViewLayout.prototype.changeWhitespace = function (id, newAfterLineNumber, newHeight) {\n return this._linesLayout.changeWhitespace(id, newAfterLineNumber, newHeight);\n };\n ViewLayout.prototype.removeWhitespace = function (id) {\n return this._linesLayout.removeWhitespace(id);\n };\n ViewLayout.prototype.getVerticalOffsetForLineNumber = function (lineNumber) {\n return this._linesLayout.getVerticalOffsetForLineNumber(lineNumber);\n };\n ViewLayout.prototype.isAfterLines = function (verticalOffset) {\n return this._linesLayout.isAfterLines(verticalOffset);\n };\n ViewLayout.prototype.getLineNumberAtVerticalOffset = function (verticalOffset) {\n return this._linesLayout.getLineNumberAtOrAfterVerticalOffset(verticalOffset);\n };\n ViewLayout.prototype.getWhitespaceAtVerticalOffset = function (verticalOffset) {\n return this._linesLayout.getWhitespaceAtVerticalOffset(verticalOffset);\n };\n ViewLayout.prototype.getLinesViewportData = function () {\n var visibleBox = this.getCurrentViewport();\n return this._linesLayout.getLinesViewportData(visibleBox.top, visibleBox.top + visibleBox.height);\n };\n ViewLayout.prototype.getLinesViewportDataAtScrollTop = function (scrollTop) {\n // do some minimal validations on scrollTop\n var scrollDimensions = this.scrollable.getScrollDimensions();\n if (scrollTop + scrollDimensions.height > scrollDimensions.scrollHeight) {\n scrollTop = scrollDimensions.scrollHeight - scrollDimensions.height;\n }\n if (scrollTop < 0) {\n scrollTop = 0;\n }\n return this._linesLayout.getLinesViewportData(scrollTop, scrollTop + scrollDimensions.height);\n };\n ViewLayout.prototype.getWhitespaceViewportData = function () {\n var visibleBox = this.getCurrentViewport();\n return this._linesLayout.getWhitespaceViewportData(visibleBox.top, visibleBox.top + visibleBox.height);\n };\n ViewLayout.prototype.getWhitespaces = function () {\n return this._linesLayout.getWhitespaces();\n };\n // ---- IScrollingProvider\n ViewLayout.prototype.getScrollWidth = function () {\n var scrollDimensions = this.scrollable.getScrollDimensions();\n return scrollDimensions.scrollWidth;\n };\n ViewLayout.prototype.getScrollHeight = function () {\n var scrollDimensions = this.scrollable.getScrollDimensions();\n return scrollDimensions.scrollHeight;\n };\n ViewLayout.prototype.getCurrentScrollLeft = function () {\n var currentScrollPosition = this.scrollable.getCurrentScrollPosition();\n return currentScrollPosition.scrollLeft;\n };\n ViewLayout.prototype.getCurrentScrollTop = function () {\n var currentScrollPosition = this.scrollable.getCurrentScrollPosition();\n return currentScrollPosition.scrollTop;\n };\n ViewLayout.prototype.validateScrollPosition = function (scrollPosition) {\n return this.scrollable.validateScrollPosition(scrollPosition);\n };\n ViewLayout.prototype.setScrollPositionNow = function (position) {\n this.scrollable.setScrollPositionNow(position);\n };\n ViewLayout.prototype.setScrollPositionSmooth = function (position) {\n this.scrollable.setScrollPositionSmooth(position);\n };\n ViewLayout.prototype.deltaScrollNow = function (deltaScrollLeft, deltaScrollTop) {\n var currentScrollPosition = this.scrollable.getCurrentScrollPosition();\n this.scrollable.setScrollPositionNow({\n scrollLeft: currentScrollPosition.scrollLeft + deltaScrollLeft,\n scrollTop: currentScrollPosition.scrollTop + deltaScrollTop\n });\n };\n return ViewLayout;\n}(Disposable));\nexport { ViewLayout };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport * as strings from '../../../base/common/strings';\nimport { Position } from '../core/position';\nimport { Range } from '../core/range';\nimport { TokenizationRegistry } from '../modes';\nimport { tokenizeLineToHTML } from '../modes/textToHtmlTokenizer';\nimport { ViewModelDecorations } from './viewModelDecorations';\nimport { MinimapLinesRenderingData, ViewLineRenderingData } from './viewModel';\nimport { SplitLinesCollection, IdentityLinesCollection } from './splitLinesCollection';\nimport * as viewEvents from '../view/viewEvents';\nimport { MinimapTokensColorTracker } from '../view/minimapCharRenderer';\nimport { CharacterHardWrappingLineMapperFactory } from './characterHardWrappingLineMapper';\nimport { ViewLayout } from '../viewLayout/viewLayout';\nimport { Color } from '../../../base/common/color';\nimport { EndOfLinePreference, TrackedRangeStickiness } from '../model';\nvar USE_IDENTITY_LINES_COLLECTION = true;\nvar ViewModel = /** @class */ (function (_super) {\n __extends(ViewModel, _super);\n function ViewModel(editorId, configuration, model, scheduleAtNextAnimationFrame) {\n var _this = _super.call(this) || this;\n _this.editorId = editorId;\n _this.configuration = configuration;\n _this.model = model;\n _this.hasFocus = false;\n _this.viewportStartLine = -1;\n _this.viewportStartLineTrackedRange = null;\n _this.viewportStartLineTop = 0;\n if (USE_IDENTITY_LINES_COLLECTION && _this.model.isTooLargeForTokenization()) {\n _this.lines = new IdentityLinesCollection(_this.model);\n }\n else {\n var conf = _this.configuration.editor;\n var hardWrappingLineMapperFactory = new CharacterHardWrappingLineMapperFactory(conf.wrappingInfo.wordWrapBreakBeforeCharacters, conf.wrappingInfo.wordWrapBreakAfterCharacters, conf.wrappingInfo.wordWrapBreakObtrusiveCharacters);\n _this.lines = new SplitLinesCollection(_this.model, hardWrappingLineMapperFactory, _this.model.getOptions().tabSize, conf.wrappingInfo.wrappingColumn, conf.fontInfo.typicalFullwidthCharacterWidth / conf.fontInfo.typicalHalfwidthCharacterWidth, conf.wrappingInfo.wrappingIndent);\n }\n _this.coordinatesConverter = _this.lines.createCoordinatesConverter();\n _this.viewLayout = _this._register(new ViewLayout(_this.configuration, _this.getLineCount(), scheduleAtNextAnimationFrame));\n _this._register(_this.viewLayout.onDidScroll(function (e) {\n try {\n var eventsCollector = _this._beginEmit();\n eventsCollector.emit(new viewEvents.ViewScrollChangedEvent(e));\n }\n finally {\n _this._endEmit();\n }\n }));\n _this.decorations = new ViewModelDecorations(_this.editorId, _this.model, _this.configuration, _this.lines, _this.coordinatesConverter);\n _this._registerModelEvents();\n _this._register(_this.configuration.onDidChange(function (e) {\n try {\n var eventsCollector = _this._beginEmit();\n _this._onConfigurationChanged(eventsCollector, e);\n }\n finally {\n _this._endEmit();\n }\n }));\n _this._register(MinimapTokensColorTracker.getInstance().onDidChange(function () {\n try {\n var eventsCollector = _this._beginEmit();\n eventsCollector.emit(new viewEvents.ViewTokensColorsChangedEvent());\n }\n finally {\n _this._endEmit();\n }\n }));\n return _this;\n }\n ViewModel.prototype.dispose = function () {\n // First remove listeners, as disposing the lines might end up sending\n // model decoration changed events ... and we no longer care about them ...\n _super.prototype.dispose.call(this);\n this.decorations.dispose();\n this.lines.dispose();\n this.viewportStartLineTrackedRange = this.model._setTrackedRange(this.viewportStartLineTrackedRange, null, TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges);\n };\n ViewModel.prototype.setHasFocus = function (hasFocus) {\n this.hasFocus = hasFocus;\n };\n ViewModel.prototype._onConfigurationChanged = function (eventsCollector, e) {\n // We might need to restore the current centered view range, so save it (if available)\n var previousViewportStartModelPosition = null;\n if (this.viewportStartLine !== -1) {\n var previousViewportStartViewPosition = new Position(this.viewportStartLine, this.getLineMinColumn(this.viewportStartLine));\n previousViewportStartModelPosition = this.coordinatesConverter.convertViewPositionToModelPosition(previousViewportStartViewPosition);\n }\n var restorePreviousViewportStart = false;\n var conf = this.configuration.editor;\n if (this.lines.setWrappingSettings(conf.wrappingInfo.wrappingIndent, conf.wrappingInfo.wrappingColumn, conf.fontInfo.typicalFullwidthCharacterWidth / conf.fontInfo.typicalHalfwidthCharacterWidth)) {\n eventsCollector.emit(new viewEvents.ViewFlushedEvent());\n eventsCollector.emit(new viewEvents.ViewLineMappingChangedEvent());\n eventsCollector.emit(new viewEvents.ViewDecorationsChangedEvent());\n this.decorations.onLineMappingChanged();\n this.viewLayout.onFlushed(this.getLineCount());\n if (this.viewLayout.getCurrentScrollTop() !== 0) {\n // Never change the scroll position from 0 to something else...\n restorePreviousViewportStart = true;\n }\n }\n if (e.readOnly) {\n // Must read again all decorations due to readOnly filtering\n this.decorations.reset();\n eventsCollector.emit(new viewEvents.ViewDecorationsChangedEvent());\n }\n eventsCollector.emit(new viewEvents.ViewConfigurationChangedEvent(e));\n this.viewLayout.onConfigurationChanged(e);\n if (restorePreviousViewportStart && previousViewportStartModelPosition) {\n var viewPosition = this.coordinatesConverter.convertModelPositionToViewPosition(previousViewportStartModelPosition);\n var viewPositionTop = this.viewLayout.getVerticalOffsetForLineNumber(viewPosition.lineNumber);\n this.viewLayout.deltaScrollNow(0, viewPositionTop - this.viewportStartLineTop);\n }\n };\n ViewModel.prototype._registerModelEvents = function () {\n var _this = this;\n this._register(this.model.onDidChangeRawContentFast(function (e) {\n try {\n var eventsCollector = _this._beginEmit();\n var hadOtherModelChange = false;\n var hadModelLineChangeThatChangedLineMapping = false;\n var changes = e.changes;\n var versionId = e.versionId;\n for (var j = 0, lenJ = changes.length; j < lenJ; j++) {\n var change = changes[j];\n switch (change.changeType) {\n case 1 /* Flush */: {\n _this.lines.onModelFlushed();\n eventsCollector.emit(new viewEvents.ViewFlushedEvent());\n _this.decorations.reset();\n _this.viewLayout.onFlushed(_this.getLineCount());\n hadOtherModelChange = true;\n break;\n }\n case 3 /* LinesDeleted */: {\n var linesDeletedEvent = _this.lines.onModelLinesDeleted(versionId, change.fromLineNumber, change.toLineNumber);\n if (linesDeletedEvent !== null) {\n eventsCollector.emit(linesDeletedEvent);\n _this.viewLayout.onLinesDeleted(linesDeletedEvent.fromLineNumber, linesDeletedEvent.toLineNumber);\n }\n hadOtherModelChange = true;\n break;\n }\n case 4 /* LinesInserted */: {\n var linesInsertedEvent = _this.lines.onModelLinesInserted(versionId, change.fromLineNumber, change.toLineNumber, change.detail);\n if (linesInsertedEvent !== null) {\n eventsCollector.emit(linesInsertedEvent);\n _this.viewLayout.onLinesInserted(linesInsertedEvent.fromLineNumber, linesInsertedEvent.toLineNumber);\n }\n hadOtherModelChange = true;\n break;\n }\n case 2 /* LineChanged */: {\n var _a = _this.lines.onModelLineChanged(versionId, change.lineNumber, change.detail), lineMappingChanged = _a[0], linesChangedEvent = _a[1], linesInsertedEvent = _a[2], linesDeletedEvent = _a[3];\n hadModelLineChangeThatChangedLineMapping = lineMappingChanged;\n if (linesChangedEvent) {\n eventsCollector.emit(linesChangedEvent);\n }\n if (linesInsertedEvent) {\n eventsCollector.emit(linesInsertedEvent);\n _this.viewLayout.onLinesInserted(linesInsertedEvent.fromLineNumber, linesInsertedEvent.toLineNumber);\n }\n if (linesDeletedEvent) {\n eventsCollector.emit(linesDeletedEvent);\n _this.viewLayout.onLinesDeleted(linesDeletedEvent.fromLineNumber, linesDeletedEvent.toLineNumber);\n }\n break;\n }\n case 5 /* EOLChanged */: {\n // Nothing to do. The new version will be accepted below\n break;\n }\n }\n }\n _this.lines.acceptVersionId(versionId);\n _this.viewLayout.onHeightMaybeChanged();\n if (!hadOtherModelChange && hadModelLineChangeThatChangedLineMapping) {\n eventsCollector.emit(new viewEvents.ViewLineMappingChangedEvent());\n eventsCollector.emit(new viewEvents.ViewDecorationsChangedEvent());\n _this.decorations.onLineMappingChanged();\n }\n }\n finally {\n _this._endEmit();\n }\n // Update the configuration and reset the centered view line\n _this.viewportStartLine = -1;\n _this.configuration.setMaxLineNumber(_this.model.getLineCount());\n // Recover viewport\n if (!_this.hasFocus && _this.model.getAttachedEditorCount() >= 2 && _this.viewportStartLineTrackedRange) {\n var modelRange = _this.model._getTrackedRange(_this.viewportStartLineTrackedRange);\n if (modelRange) {\n var viewPosition = _this.coordinatesConverter.convertModelPositionToViewPosition(modelRange.getStartPosition());\n var viewPositionTop = _this.viewLayout.getVerticalOffsetForLineNumber(viewPosition.lineNumber);\n _this.viewLayout.deltaScrollNow(0, viewPositionTop - _this.viewportStartLineTop);\n }\n }\n }));\n this._register(this.model.onDidChangeTokens(function (e) {\n var viewRanges = [];\n for (var j = 0, lenJ = e.ranges.length; j < lenJ; j++) {\n var modelRange = e.ranges[j];\n var viewStartLineNumber = _this.coordinatesConverter.convertModelPositionToViewPosition(new Position(modelRange.fromLineNumber, 1)).lineNumber;\n var viewEndLineNumber = _this.coordinatesConverter.convertModelPositionToViewPosition(new Position(modelRange.toLineNumber, _this.model.getLineMaxColumn(modelRange.toLineNumber))).lineNumber;\n viewRanges[j] = {\n fromLineNumber: viewStartLineNumber,\n toLineNumber: viewEndLineNumber\n };\n }\n try {\n var eventsCollector = _this._beginEmit();\n eventsCollector.emit(new viewEvents.ViewTokensChangedEvent(viewRanges));\n }\n finally {\n _this._endEmit();\n }\n }));\n this._register(this.model.onDidChangeLanguageConfiguration(function (e) {\n try {\n var eventsCollector = _this._beginEmit();\n eventsCollector.emit(new viewEvents.ViewLanguageConfigurationEvent());\n }\n finally {\n _this._endEmit();\n }\n }));\n this._register(this.model.onDidChangeOptions(function (e) {\n // A tab size change causes a line mapping changed event => all view parts will repaint OK, no further event needed here\n if (_this.lines.setTabSize(_this.model.getOptions().tabSize)) {\n _this.decorations.onLineMappingChanged();\n _this.viewLayout.onFlushed(_this.getLineCount());\n try {\n var eventsCollector = _this._beginEmit();\n eventsCollector.emit(new viewEvents.ViewFlushedEvent());\n eventsCollector.emit(new viewEvents.ViewLineMappingChangedEvent());\n eventsCollector.emit(new viewEvents.ViewDecorationsChangedEvent());\n }\n finally {\n _this._endEmit();\n }\n }\n }));\n this._register(this.model.onDidChangeDecorations(function (e) {\n _this.decorations.onModelDecorationsChanged();\n try {\n var eventsCollector = _this._beginEmit();\n eventsCollector.emit(new viewEvents.ViewDecorationsChangedEvent());\n }\n finally {\n _this._endEmit();\n }\n }));\n };\n ViewModel.prototype.setHiddenAreas = function (ranges) {\n try {\n var eventsCollector = this._beginEmit();\n var lineMappingChanged = this.lines.setHiddenAreas(ranges);\n if (lineMappingChanged) {\n eventsCollector.emit(new viewEvents.ViewFlushedEvent());\n eventsCollector.emit(new viewEvents.ViewLineMappingChangedEvent());\n eventsCollector.emit(new viewEvents.ViewDecorationsChangedEvent());\n this.decorations.onLineMappingChanged();\n this.viewLayout.onFlushed(this.getLineCount());\n this.viewLayout.onHeightMaybeChanged();\n }\n }\n finally {\n this._endEmit();\n }\n };\n ViewModel.prototype.getVisibleRanges = function () {\n var visibleViewRange = this.getCompletelyVisibleViewRange();\n var visibleRange = this.coordinatesConverter.convertViewRangeToModelRange(visibleViewRange);\n var hiddenAreas = this.lines.getHiddenAreas();\n if (hiddenAreas.length === 0) {\n return [visibleRange];\n }\n var result = [], resultLen = 0;\n var startLineNumber = visibleRange.startLineNumber;\n var startColumn = visibleRange.startColumn;\n var endLineNumber = visibleRange.endLineNumber;\n var endColumn = visibleRange.endColumn;\n for (var i = 0, len = hiddenAreas.length; i < len; i++) {\n var hiddenStartLineNumber = hiddenAreas[i].startLineNumber;\n var hiddenEndLineNumber = hiddenAreas[i].endLineNumber;\n if (hiddenEndLineNumber < startLineNumber) {\n continue;\n }\n if (hiddenStartLineNumber > endLineNumber) {\n continue;\n }\n if (startLineNumber < hiddenStartLineNumber) {\n result[resultLen++] = new Range(startLineNumber, startColumn, hiddenStartLineNumber - 1, this.model.getLineMaxColumn(hiddenStartLineNumber - 1));\n }\n startLineNumber = hiddenEndLineNumber + 1;\n startColumn = 1;\n }\n if (startLineNumber < endLineNumber || (startLineNumber === endLineNumber && startColumn < endColumn)) {\n result[resultLen++] = new Range(startLineNumber, startColumn, endLineNumber, endColumn);\n }\n return result;\n };\n ViewModel.prototype.getCompletelyVisibleViewRange = function () {\n var partialData = this.viewLayout.getLinesViewportData();\n var startViewLineNumber = partialData.completelyVisibleStartLineNumber;\n var endViewLineNumber = partialData.completelyVisibleEndLineNumber;\n return new Range(startViewLineNumber, this.getLineMinColumn(startViewLineNumber), endViewLineNumber, this.getLineMaxColumn(endViewLineNumber));\n };\n ViewModel.prototype.getCompletelyVisibleViewRangeAtScrollTop = function (scrollTop) {\n var partialData = this.viewLayout.getLinesViewportDataAtScrollTop(scrollTop);\n var startViewLineNumber = partialData.completelyVisibleStartLineNumber;\n var endViewLineNumber = partialData.completelyVisibleEndLineNumber;\n return new Range(startViewLineNumber, this.getLineMinColumn(startViewLineNumber), endViewLineNumber, this.getLineMaxColumn(endViewLineNumber));\n };\n ViewModel.prototype.saveState = function () {\n var compatViewState = this.viewLayout.saveState();\n var scrollTop = compatViewState.scrollTop;\n var firstViewLineNumber = this.viewLayout.getLineNumberAtVerticalOffset(scrollTop);\n var firstPosition = this.coordinatesConverter.convertViewPositionToModelPosition(new Position(firstViewLineNumber, this.getLineMinColumn(firstViewLineNumber)));\n var firstPositionDeltaTop = this.viewLayout.getVerticalOffsetForLineNumber(firstViewLineNumber) - scrollTop;\n return {\n scrollLeft: compatViewState.scrollLeft,\n firstPosition: firstPosition,\n firstPositionDeltaTop: firstPositionDeltaTop\n };\n };\n ViewModel.prototype.reduceRestoreState = function (state) {\n if (typeof state.firstPosition === 'undefined') {\n // This is a view state serialized by an older version\n return this._reduceRestoreStateCompatibility(state);\n }\n var modelPosition = this.model.validatePosition(state.firstPosition);\n var viewPosition = this.coordinatesConverter.convertModelPositionToViewPosition(modelPosition);\n var scrollTop = this.viewLayout.getVerticalOffsetForLineNumber(viewPosition.lineNumber) - state.firstPositionDeltaTop;\n return {\n scrollLeft: state.scrollLeft,\n scrollTop: scrollTop\n };\n };\n ViewModel.prototype._reduceRestoreStateCompatibility = function (state) {\n return {\n scrollLeft: state.scrollLeft,\n scrollTop: state.scrollTopWithoutViewZones\n };\n };\n ViewModel.prototype.getTabSize = function () {\n return this.model.getOptions().tabSize;\n };\n ViewModel.prototype.getLineCount = function () {\n return this.lines.getViewLineCount();\n };\n /**\n * Gives a hint that a lot of requests are about to come in for these line numbers.\n */\n ViewModel.prototype.setViewport = function (startLineNumber, endLineNumber, centeredLineNumber) {\n this.lines.warmUpLookupCache(startLineNumber, endLineNumber);\n this.viewportStartLine = startLineNumber;\n var position = this.coordinatesConverter.convertViewPositionToModelPosition(new Position(startLineNumber, this.getLineMinColumn(startLineNumber)));\n this.viewportStartLineTrackedRange = this.model._setTrackedRange(this.viewportStartLineTrackedRange, new Range(position.lineNumber, position.column, position.lineNumber, position.column), TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges);\n this.viewportStartLineTop = this.viewLayout.getVerticalOffsetForLineNumber(startLineNumber);\n };\n ViewModel.prototype.getActiveIndentGuide = function (lineNumber, minLineNumber, maxLineNumber) {\n return this.lines.getActiveIndentGuide(lineNumber, minLineNumber, maxLineNumber);\n };\n ViewModel.prototype.getLinesIndentGuides = function (startLineNumber, endLineNumber) {\n return this.lines.getViewLinesIndentGuides(startLineNumber, endLineNumber);\n };\n ViewModel.prototype.getLineContent = function (lineNumber) {\n return this.lines.getViewLineContent(lineNumber);\n };\n ViewModel.prototype.getLineLength = function (lineNumber) {\n return this.lines.getViewLineLength(lineNumber);\n };\n ViewModel.prototype.getLineMinColumn = function (lineNumber) {\n return this.lines.getViewLineMinColumn(lineNumber);\n };\n ViewModel.prototype.getLineMaxColumn = function (lineNumber) {\n return this.lines.getViewLineMaxColumn(lineNumber);\n };\n ViewModel.prototype.getLineFirstNonWhitespaceColumn = function (lineNumber) {\n var result = strings.firstNonWhitespaceIndex(this.getLineContent(lineNumber));\n if (result === -1) {\n return 0;\n }\n return result + 1;\n };\n ViewModel.prototype.getLineLastNonWhitespaceColumn = function (lineNumber) {\n var result = strings.lastNonWhitespaceIndex(this.getLineContent(lineNumber));\n if (result === -1) {\n return 0;\n }\n return result + 2;\n };\n ViewModel.prototype.getDecorationsInViewport = function (visibleRange) {\n return this.decorations.getDecorationsViewportData(visibleRange).decorations;\n };\n ViewModel.prototype.getViewLineRenderingData = function (visibleRange, lineNumber) {\n var mightContainRTL = this.model.mightContainRTL();\n var mightContainNonBasicASCII = this.model.mightContainNonBasicASCII();\n var tabSize = this.getTabSize();\n var lineData = this.lines.getViewLineData(lineNumber);\n var allInlineDecorations = this.decorations.getDecorationsViewportData(visibleRange).inlineDecorations;\n var inlineDecorations = allInlineDecorations[lineNumber - visibleRange.startLineNumber];\n return new ViewLineRenderingData(lineData.minColumn, lineData.maxColumn, lineData.content, lineData.continuesWithWrappedLine, mightContainRTL, mightContainNonBasicASCII, lineData.tokens, inlineDecorations, tabSize);\n };\n ViewModel.prototype.getViewLineData = function (lineNumber) {\n return this.lines.getViewLineData(lineNumber);\n };\n ViewModel.prototype.getMinimapLinesRenderingData = function (startLineNumber, endLineNumber, needed) {\n var result = this.lines.getViewLinesData(startLineNumber, endLineNumber, needed);\n return new MinimapLinesRenderingData(this.getTabSize(), result);\n };\n ViewModel.prototype.getAllOverviewRulerDecorations = function (theme) {\n return this.lines.getAllOverviewRulerDecorations(this.editorId, this.configuration.editor.readOnly, theme);\n };\n ViewModel.prototype.invalidateOverviewRulerColorCache = function () {\n var decorations = this.model.getOverviewRulerDecorations();\n for (var i = 0, len = decorations.length; i < len; i++) {\n var decoration = decorations[i];\n var opts = decoration.options.overviewRuler;\n opts._resolvedColor = null;\n }\n };\n ViewModel.prototype.getValueInRange = function (range, eol) {\n var modelRange = this.coordinatesConverter.convertViewRangeToModelRange(range);\n return this.model.getValueInRange(modelRange, eol);\n };\n ViewModel.prototype.getModelLineMaxColumn = function (modelLineNumber) {\n return this.model.getLineMaxColumn(modelLineNumber);\n };\n ViewModel.prototype.validateModelPosition = function (position) {\n return this.model.validatePosition(position);\n };\n ViewModel.prototype.deduceModelPositionRelativeToViewPosition = function (viewAnchorPosition, deltaOffset, lineFeedCnt) {\n var modelAnchor = this.coordinatesConverter.convertViewPositionToModelPosition(viewAnchorPosition);\n if (this.model.getEOL().length === 2) {\n // This model uses CRLF, so the delta must take that into account\n if (deltaOffset < 0) {\n deltaOffset -= lineFeedCnt;\n }\n else {\n deltaOffset += lineFeedCnt;\n }\n }\n var modelAnchorOffset = this.model.getOffsetAt(modelAnchor);\n var resultOffset = modelAnchorOffset + deltaOffset;\n return this.model.getPositionAt(resultOffset);\n };\n ViewModel.prototype.getEOL = function () {\n return this.model.getEOL();\n };\n ViewModel.prototype.getPlainTextToCopy = function (ranges, emptySelectionClipboard, forceCRLF) {\n var _this = this;\n var newLineCharacter = forceCRLF ? '\\r\\n' : this.model.getEOL();\n ranges = ranges.slice(0);\n ranges.sort(Range.compareRangesUsingStarts);\n var nonEmptyRanges = ranges.filter(function (r) { return !r.isEmpty(); });\n if (nonEmptyRanges.length === 0) {\n if (!emptySelectionClipboard) {\n return '';\n }\n var modelLineNumbers = ranges.map(function (r) {\n var viewLineStart = new Position(r.startLineNumber, 1);\n return _this.coordinatesConverter.convertViewPositionToModelPosition(viewLineStart).lineNumber;\n });\n var result_1 = '';\n for (var i = 0; i < modelLineNumbers.length; i++) {\n if (i > 0 && modelLineNumbers[i - 1] === modelLineNumbers[i]) {\n continue;\n }\n result_1 += this.model.getLineContent(modelLineNumbers[i]) + newLineCharacter;\n }\n return result_1;\n }\n var result = [];\n for (var i = 0; i < nonEmptyRanges.length; i++) {\n result.push(this.getValueInRange(nonEmptyRanges[i], forceCRLF ? EndOfLinePreference.CRLF : EndOfLinePreference.TextDefined));\n }\n return result.length === 1 ? result[0] : result;\n };\n ViewModel.prototype.getHTMLToCopy = function (viewRanges, emptySelectionClipboard) {\n if (this.model.getLanguageIdentifier().id === 1 /* PlainText */) {\n return null;\n }\n if (viewRanges.length !== 1) {\n // no multiple selection support at this time\n return null;\n }\n var range = this.coordinatesConverter.convertViewRangeToModelRange(viewRanges[0]);\n if (range.isEmpty()) {\n if (!emptySelectionClipboard) {\n // nothing to copy\n return null;\n }\n var lineNumber = range.startLineNumber;\n range = new Range(lineNumber, this.model.getLineMinColumn(lineNumber), lineNumber, this.model.getLineMaxColumn(lineNumber));\n }\n var fontInfo = this.configuration.editor.fontInfo;\n var colorMap = this._getColorMap();\n return (\"
    \"\n + this._getHTMLToCopy(range, colorMap)\n + '
    ');\n };\n ViewModel.prototype._getHTMLToCopy = function (modelRange, colorMap) {\n var startLineNumber = modelRange.startLineNumber;\n var startColumn = modelRange.startColumn;\n var endLineNumber = modelRange.endLineNumber;\n var endColumn = modelRange.endColumn;\n var tabSize = this.getTabSize();\n var result = '';\n for (var lineNumber = startLineNumber; lineNumber <= endLineNumber; lineNumber++) {\n var lineTokens = this.model.getLineTokens(lineNumber);\n var lineContent = lineTokens.getLineContent();\n var startOffset = (lineNumber === startLineNumber ? startColumn - 1 : 0);\n var endOffset = (lineNumber === endLineNumber ? endColumn - 1 : lineContent.length);\n if (lineContent === '') {\n result += '
    ';\n }\n else {\n result += tokenizeLineToHTML(lineContent, lineTokens.inflate(), colorMap, startOffset, endOffset, tabSize);\n }\n }\n return result;\n };\n ViewModel.prototype._getColorMap = function () {\n var colorMap = TokenizationRegistry.getColorMap();\n var result = [null];\n for (var i = 1, len = colorMap.length; i < len; i++) {\n result[i] = Color.Format.CSS.formatHex(colorMap[i]);\n }\n return result;\n };\n return ViewModel;\n}(viewEvents.ViewEventEmitter));\nexport { ViewModel };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport BaseSeverity from '../../../base/common/severity';\nimport { createDecorator } from '../../instantiation/common/instantiation';\nexport var Severity = BaseSeverity;\nexport var INotificationService = createDecorator('notificationService');\nvar NoOpNotification = /** @class */ (function () {\n function NoOpNotification() {\n }\n return NoOpNotification;\n}());\nexport { NoOpNotification };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport { createDecorator } from '../../instantiation/common/instantiation';\nimport { toDisposable } from '../../../base/common/lifecycle';\nimport * as platform from '../../registry/common/platform';\nimport { Emitter } from '../../../base/common/event';\nexport var IThemeService = createDecorator('themeService');\nexport function themeColorFromId(id) {\n return { id: id };\n}\n// base themes\nexport var DARK = 'dark';\nexport var HIGH_CONTRAST = 'hc';\nexport function getThemeTypeSelector(type) {\n switch (type) {\n case DARK: return 'vs-dark';\n case HIGH_CONTRAST: return 'hc-black';\n default: return 'vs';\n }\n}\n// static theming participant\nexport var Extensions = {\n ThemingContribution: 'base.contributions.theming'\n};\nvar ThemingRegistry = /** @class */ (function () {\n function ThemingRegistry() {\n this.themingParticipants = [];\n this.themingParticipants = [];\n this.onThemingParticipantAddedEmitter = new Emitter();\n }\n ThemingRegistry.prototype.onThemeChange = function (participant) {\n var _this = this;\n this.themingParticipants.push(participant);\n this.onThemingParticipantAddedEmitter.fire(participant);\n return toDisposable(function () {\n var idx = _this.themingParticipants.indexOf(participant);\n _this.themingParticipants.splice(idx, 1);\n });\n };\n ThemingRegistry.prototype.getThemingParticipants = function () {\n return this.themingParticipants;\n };\n return ThemingRegistry;\n}());\nvar themingRegistry = new ThemingRegistry();\nplatform.Registry.add(Extensions.ThemingContribution, themingRegistry);\nexport function registerThemingParticipant(participant) {\n return themingRegistry.onThemeChange(participant);\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport * as dom from './dom';\nvar FastDomNode = /** @class */ (function () {\n function FastDomNode(domNode) {\n this.domNode = domNode;\n this._maxWidth = -1;\n this._width = -1;\n this._height = -1;\n this._top = -1;\n this._left = -1;\n this._bottom = -1;\n this._right = -1;\n this._fontFamily = '';\n this._fontWeight = '';\n this._fontSize = -1;\n this._lineHeight = -1;\n this._letterSpacing = -100;\n this._className = '';\n this._display = '';\n this._position = '';\n this._visibility = '';\n this._layerHint = false;\n }\n FastDomNode.prototype.setMaxWidth = function (maxWidth) {\n if (this._maxWidth === maxWidth) {\n return;\n }\n this._maxWidth = maxWidth;\n this.domNode.style.maxWidth = this._maxWidth + 'px';\n };\n FastDomNode.prototype.setWidth = function (width) {\n if (this._width === width) {\n return;\n }\n this._width = width;\n this.domNode.style.width = this._width + 'px';\n };\n FastDomNode.prototype.setHeight = function (height) {\n if (this._height === height) {\n return;\n }\n this._height = height;\n this.domNode.style.height = this._height + 'px';\n };\n FastDomNode.prototype.setTop = function (top) {\n if (this._top === top) {\n return;\n }\n this._top = top;\n this.domNode.style.top = this._top + 'px';\n };\n FastDomNode.prototype.unsetTop = function () {\n if (this._top === -1) {\n return;\n }\n this._top = -1;\n this.domNode.style.top = '';\n };\n FastDomNode.prototype.setLeft = function (left) {\n if (this._left === left) {\n return;\n }\n this._left = left;\n this.domNode.style.left = this._left + 'px';\n };\n FastDomNode.prototype.setBottom = function (bottom) {\n if (this._bottom === bottom) {\n return;\n }\n this._bottom = bottom;\n this.domNode.style.bottom = this._bottom + 'px';\n };\n FastDomNode.prototype.setRight = function (right) {\n if (this._right === right) {\n return;\n }\n this._right = right;\n this.domNode.style.right = this._right + 'px';\n };\n FastDomNode.prototype.setFontFamily = function (fontFamily) {\n if (this._fontFamily === fontFamily) {\n return;\n }\n this._fontFamily = fontFamily;\n this.domNode.style.fontFamily = this._fontFamily;\n };\n FastDomNode.prototype.setFontWeight = function (fontWeight) {\n if (this._fontWeight === fontWeight) {\n return;\n }\n this._fontWeight = fontWeight;\n this.domNode.style.fontWeight = this._fontWeight;\n };\n FastDomNode.prototype.setFontSize = function (fontSize) {\n if (this._fontSize === fontSize) {\n return;\n }\n this._fontSize = fontSize;\n this.domNode.style.fontSize = this._fontSize + 'px';\n };\n FastDomNode.prototype.setLineHeight = function (lineHeight) {\n if (this._lineHeight === lineHeight) {\n return;\n }\n this._lineHeight = lineHeight;\n this.domNode.style.lineHeight = this._lineHeight + 'px';\n };\n FastDomNode.prototype.setLetterSpacing = function (letterSpacing) {\n if (this._letterSpacing === letterSpacing) {\n return;\n }\n this._letterSpacing = letterSpacing;\n this.domNode.style.letterSpacing = this._letterSpacing + 'px';\n };\n FastDomNode.prototype.setClassName = function (className) {\n if (this._className === className) {\n return;\n }\n this._className = className;\n this.domNode.className = this._className;\n };\n FastDomNode.prototype.toggleClassName = function (className, shouldHaveIt) {\n dom.toggleClass(this.domNode, className, shouldHaveIt);\n this._className = this.domNode.className;\n };\n FastDomNode.prototype.setDisplay = function (display) {\n if (this._display === display) {\n return;\n }\n this._display = display;\n this.domNode.style.display = this._display;\n };\n FastDomNode.prototype.setPosition = function (position) {\n if (this._position === position) {\n return;\n }\n this._position = position;\n this.domNode.style.position = this._position;\n };\n FastDomNode.prototype.setVisibility = function (visibility) {\n if (this._visibility === visibility) {\n return;\n }\n this._visibility = visibility;\n this.domNode.style.visibility = this._visibility;\n };\n FastDomNode.prototype.setLayerHinting = function (layerHint) {\n if (this._layerHint === layerHint) {\n return;\n }\n this._layerHint = layerHint;\n this.domNode.style.willChange = this._layerHint ? 'transform' : 'auto';\n };\n FastDomNode.prototype.setAttribute = function (name, value) {\n this.domNode.setAttribute(name, value);\n };\n FastDomNode.prototype.removeAttribute = function (name) {\n this.domNode.removeAttribute(name);\n };\n FastDomNode.prototype.appendChild = function (child) {\n this.domNode.appendChild(child.domNode);\n };\n FastDomNode.prototype.removeChild = function (child) {\n this.domNode.removeChild(child.domNode);\n };\n return FastDomNode;\n}());\nexport { FastDomNode };\nexport function createFastDomNode(domNode) {\n return new FastDomNode(domNode);\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { Disposable } from '../../../base/common/lifecycle';\nvar ViewEventHandler = /** @class */ (function (_super) {\n __extends(ViewEventHandler, _super);\n function ViewEventHandler() {\n var _this = _super.call(this) || this;\n _this._shouldRender = true;\n return _this;\n }\n ViewEventHandler.prototype.shouldRender = function () {\n return this._shouldRender;\n };\n ViewEventHandler.prototype.forceShouldRender = function () {\n this._shouldRender = true;\n };\n ViewEventHandler.prototype.setShouldRender = function () {\n this._shouldRender = true;\n };\n ViewEventHandler.prototype.onDidRender = function () {\n this._shouldRender = false;\n };\n // --- begin event handlers\n ViewEventHandler.prototype.onConfigurationChanged = function (e) {\n return false;\n };\n ViewEventHandler.prototype.onCursorStateChanged = function (e) {\n return false;\n };\n ViewEventHandler.prototype.onDecorationsChanged = function (e) {\n return false;\n };\n ViewEventHandler.prototype.onFlushed = function (e) {\n return false;\n };\n ViewEventHandler.prototype.onFocusChanged = function (e) {\n return false;\n };\n ViewEventHandler.prototype.onLanguageConfigurationChanged = function (e) {\n return false;\n };\n ViewEventHandler.prototype.onLineMappingChanged = function (e) {\n return false;\n };\n ViewEventHandler.prototype.onLinesChanged = function (e) {\n return false;\n };\n ViewEventHandler.prototype.onLinesDeleted = function (e) {\n return false;\n };\n ViewEventHandler.prototype.onLinesInserted = function (e) {\n return false;\n };\n ViewEventHandler.prototype.onRevealRangeRequest = function (e) {\n return false;\n };\n ViewEventHandler.prototype.onScrollChanged = function (e) {\n return false;\n };\n ViewEventHandler.prototype.onTokensChanged = function (e) {\n return false;\n };\n ViewEventHandler.prototype.onTokensColorsChanged = function (e) {\n return false;\n };\n ViewEventHandler.prototype.onZonesChanged = function (e) {\n return false;\n };\n ViewEventHandler.prototype.onThemeChanged = function (e) {\n return false;\n };\n // --- end event handlers\n ViewEventHandler.prototype.handleEvents = function (events) {\n var shouldRender = false;\n for (var i = 0, len = events.length; i < len; i++) {\n var e = events[i];\n switch (e.type) {\n case 1 /* ViewConfigurationChanged */:\n if (this.onConfigurationChanged(e)) {\n shouldRender = true;\n }\n break;\n case 2 /* ViewCursorStateChanged */:\n if (this.onCursorStateChanged(e)) {\n shouldRender = true;\n }\n break;\n case 3 /* ViewDecorationsChanged */:\n if (this.onDecorationsChanged(e)) {\n shouldRender = true;\n }\n break;\n case 4 /* ViewFlushed */:\n if (this.onFlushed(e)) {\n shouldRender = true;\n }\n break;\n case 5 /* ViewFocusChanged */:\n if (this.onFocusChanged(e)) {\n shouldRender = true;\n }\n break;\n case 16 /* ViewLanguageConfigurationChanged */:\n if (this.onLanguageConfigurationChanged(e)) {\n shouldRender = true;\n }\n break;\n case 6 /* ViewLineMappingChanged */:\n if (this.onLineMappingChanged(e)) {\n shouldRender = true;\n }\n break;\n case 7 /* ViewLinesChanged */:\n if (this.onLinesChanged(e)) {\n shouldRender = true;\n }\n break;\n case 8 /* ViewLinesDeleted */:\n if (this.onLinesDeleted(e)) {\n shouldRender = true;\n }\n break;\n case 9 /* ViewLinesInserted */:\n if (this.onLinesInserted(e)) {\n shouldRender = true;\n }\n break;\n case 10 /* ViewRevealRangeRequest */:\n if (this.onRevealRangeRequest(e)) {\n shouldRender = true;\n }\n break;\n case 11 /* ViewScrollChanged */:\n if (this.onScrollChanged(e)) {\n shouldRender = true;\n }\n break;\n case 12 /* ViewTokensChanged */:\n if (this.onTokensChanged(e)) {\n shouldRender = true;\n }\n break;\n case 13 /* ViewTokensColorsChanged */:\n if (this.onTokensColorsChanged(e)) {\n shouldRender = true;\n }\n break;\n case 14 /* ViewZonesChanged */:\n if (this.onZonesChanged(e)) {\n shouldRender = true;\n }\n break;\n case 15 /* ViewThemeChanged */:\n if (this.onThemeChanged(e)) {\n shouldRender = true;\n }\n break;\n default:\n console.info('View received unknown event: ');\n console.info(e);\n }\n }\n if (shouldRender) {\n this._shouldRender = true;\n }\n };\n return ViewEventHandler;\n}(Disposable));\nexport { ViewEventHandler };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport { Range } from '../../common/core/range';\nimport { Position } from '../../common/core/position';\nimport { EndOfLinePreference } from '../../common/model';\nimport * as strings from '../../../base/common/strings';\nvar TextAreaState = /** @class */ (function () {\n function TextAreaState(value, selectionStart, selectionEnd, selectionStartPosition, selectionEndPosition) {\n this.value = value;\n this.selectionStart = selectionStart;\n this.selectionEnd = selectionEnd;\n this.selectionStartPosition = selectionStartPosition;\n this.selectionEndPosition = selectionEndPosition;\n }\n TextAreaState.prototype.toString = function () {\n return '[ <' + this.value + '>, selectionStart: ' + this.selectionStart + ', selectionEnd: ' + this.selectionEnd + ']';\n };\n TextAreaState.readFromTextArea = function (textArea) {\n return new TextAreaState(textArea.getValue(), textArea.getSelectionStart(), textArea.getSelectionEnd(), null, null);\n };\n TextAreaState.prototype.collapseSelection = function () {\n return new TextAreaState(this.value, this.value.length, this.value.length, null, null);\n };\n TextAreaState.prototype.writeToTextArea = function (reason, textArea, select) {\n // console.log(Date.now() + ': writeToTextArea ' + reason + ': ' + this.toString());\n textArea.setValue(reason, this.value);\n if (select) {\n textArea.setSelectionRange(reason, this.selectionStart, this.selectionEnd);\n }\n };\n TextAreaState.prototype.deduceEditorPosition = function (offset) {\n if (offset <= this.selectionStart) {\n var str = this.value.substring(offset, this.selectionStart);\n return this._finishDeduceEditorPosition(this.selectionStartPosition, str, -1);\n }\n if (offset >= this.selectionEnd) {\n var str = this.value.substring(this.selectionEnd, offset);\n return this._finishDeduceEditorPosition(this.selectionEndPosition, str, 1);\n }\n var str1 = this.value.substring(this.selectionStart, offset);\n if (str1.indexOf(String.fromCharCode(8230)) === -1) {\n return this._finishDeduceEditorPosition(this.selectionStartPosition, str1, 1);\n }\n var str2 = this.value.substring(offset, this.selectionEnd);\n return this._finishDeduceEditorPosition(this.selectionEndPosition, str2, -1);\n };\n TextAreaState.prototype._finishDeduceEditorPosition = function (anchor, deltaText, signum) {\n var lineFeedCnt = 0;\n var lastLineFeedIndex = -1;\n while ((lastLineFeedIndex = deltaText.indexOf('\\n', lastLineFeedIndex + 1)) !== -1) {\n lineFeedCnt++;\n }\n return [anchor, signum * deltaText.length, lineFeedCnt];\n };\n TextAreaState.selectedText = function (text) {\n return new TextAreaState(text, 0, text.length, null, null);\n };\n TextAreaState.deduceInput = function (previousState, currentState, couldBeEmojiInput, couldBeTypingAtOffset0) {\n if (!previousState) {\n // This is the EMPTY state\n return {\n text: '',\n replaceCharCnt: 0\n };\n }\n // console.log('------------------------deduceInput');\n // console.log('PREVIOUS STATE: ' + previousState.toString());\n // console.log('CURRENT STATE: ' + currentState.toString());\n var previousValue = previousState.value;\n var previousSelectionStart = previousState.selectionStart;\n var previousSelectionEnd = previousState.selectionEnd;\n var currentValue = currentState.value;\n var currentSelectionStart = currentState.selectionStart;\n var currentSelectionEnd = currentState.selectionEnd;\n if (couldBeTypingAtOffset0 && previousValue.length > 0 && previousSelectionStart === previousSelectionEnd && currentSelectionStart === currentSelectionEnd) {\n // See https://github.com/Microsoft/vscode/issues/42251\n // where typing always happens at offset 0 in the textarea\n // when using a custom title area in OSX and moving the window\n if (!strings.startsWith(currentValue, previousValue) && strings.endsWith(currentValue, previousValue)) {\n // Looks like something was typed at offset 0\n // ==> pretend we placed the cursor at offset 0 to begin with...\n previousSelectionStart = 0;\n previousSelectionEnd = 0;\n }\n }\n // Strip the previous suffix from the value (without interfering with the current selection)\n var previousSuffix = previousValue.substring(previousSelectionEnd);\n var currentSuffix = currentValue.substring(currentSelectionEnd);\n var suffixLength = strings.commonSuffixLength(previousSuffix, currentSuffix);\n currentValue = currentValue.substring(0, currentValue.length - suffixLength);\n previousValue = previousValue.substring(0, previousValue.length - suffixLength);\n var previousPrefix = previousValue.substring(0, previousSelectionStart);\n var currentPrefix = currentValue.substring(0, currentSelectionStart);\n var prefixLength = strings.commonPrefixLength(previousPrefix, currentPrefix);\n currentValue = currentValue.substring(prefixLength);\n previousValue = previousValue.substring(prefixLength);\n currentSelectionStart -= prefixLength;\n previousSelectionStart -= prefixLength;\n currentSelectionEnd -= prefixLength;\n previousSelectionEnd -= prefixLength;\n // console.log('AFTER DIFFING PREVIOUS STATE: <' + previousValue + '>, selectionStart: ' + previousSelectionStart + ', selectionEnd: ' + previousSelectionEnd);\n // console.log('AFTER DIFFING CURRENT STATE: <' + currentValue + '>, selectionStart: ' + currentSelectionStart + ', selectionEnd: ' + currentSelectionEnd);\n if (couldBeEmojiInput && currentSelectionStart === currentSelectionEnd && previousValue.length > 0) {\n // on OSX, emojis from the emoji picker are inserted at random locations\n // the only hints we can use is that the selection is immediately after the inserted emoji\n // and that none of the old text has been deleted\n var potentialEmojiInput = null;\n if (currentSelectionStart === currentValue.length) {\n // emoji potentially inserted \"somewhere\" after the previous selection => it should appear at the end of `currentValue`\n if (strings.startsWith(currentValue, previousValue)) {\n // only if all of the old text is accounted for\n potentialEmojiInput = currentValue.substring(previousValue.length);\n }\n }\n else {\n // emoji potentially inserted \"somewhere\" before the previous selection => it should appear at the start of `currentValue`\n if (strings.endsWith(currentValue, previousValue)) {\n // only if all of the old text is accounted for\n potentialEmojiInput = currentValue.substring(0, currentValue.length - previousValue.length);\n }\n }\n if (potentialEmojiInput !== null && potentialEmojiInput.length > 0) {\n // now we check that this is indeed an emoji\n // emojis can grow quite long, so a length check is of no help\n // e.g. 1F3F4 E0067 E0062 E0065 E006E E0067 E007F ; fully-qualified # 🏴󠁧󠁢󠁥󠁮󠁧󠁿 England\n // Oftentimes, emojis use Variation Selector-16 (U+FE0F), so that is a good hint\n // http://emojipedia.org/variation-selector-16/\n // > An invisible codepoint which specifies that the preceding character\n // > should be displayed with emoji presentation. Only required if the\n // > preceding character defaults to text presentation.\n if (/\\uFE0F/.test(potentialEmojiInput) || strings.containsEmoji(potentialEmojiInput)) {\n return {\n text: potentialEmojiInput,\n replaceCharCnt: 0\n };\n }\n }\n }\n if (currentSelectionStart === currentSelectionEnd) {\n // composition accept case (noticed in FF + Japanese)\n // [blahblah] => blahblah|\n if (previousValue === currentValue\n && previousSelectionStart === 0\n && previousSelectionEnd === previousValue.length\n && currentSelectionStart === currentValue.length\n && currentValue.indexOf('\\n') === -1) {\n if (strings.containsFullWidthCharacter(currentValue)) {\n return {\n text: '',\n replaceCharCnt: 0\n };\n }\n }\n // no current selection\n var replacePreviousCharacters_1 = (previousPrefix.length - prefixLength);\n // console.log('REMOVE PREVIOUS: ' + (previousPrefix.length - prefixLength) + ' chars');\n return {\n text: currentValue,\n replaceCharCnt: replacePreviousCharacters_1\n };\n }\n // there is a current selection => composition case\n var replacePreviousCharacters = previousSelectionEnd - previousSelectionStart;\n return {\n text: currentValue,\n replaceCharCnt: replacePreviousCharacters\n };\n };\n TextAreaState.EMPTY = new TextAreaState('', 0, 0, null, null);\n return TextAreaState;\n}());\nexport { TextAreaState };\nvar PagedScreenReaderStrategy = /** @class */ (function () {\n function PagedScreenReaderStrategy() {\n }\n PagedScreenReaderStrategy._getPageOfLine = function (lineNumber) {\n return Math.floor((lineNumber - 1) / PagedScreenReaderStrategy._LINES_PER_PAGE);\n };\n PagedScreenReaderStrategy._getRangeForPage = function (page) {\n var offset = page * PagedScreenReaderStrategy._LINES_PER_PAGE;\n var startLineNumber = offset + 1;\n var endLineNumber = offset + PagedScreenReaderStrategy._LINES_PER_PAGE;\n return new Range(startLineNumber, 1, endLineNumber + 1, 1);\n };\n PagedScreenReaderStrategy.fromEditorSelection = function (previousState, model, selection, trimLongText) {\n var selectionStartPage = PagedScreenReaderStrategy._getPageOfLine(selection.startLineNumber);\n var selectionStartPageRange = PagedScreenReaderStrategy._getRangeForPage(selectionStartPage);\n var selectionEndPage = PagedScreenReaderStrategy._getPageOfLine(selection.endLineNumber);\n var selectionEndPageRange = PagedScreenReaderStrategy._getRangeForPage(selectionEndPage);\n var pretextRange = selectionStartPageRange.intersectRanges(new Range(1, 1, selection.startLineNumber, selection.startColumn));\n var pretext = model.getValueInRange(pretextRange, EndOfLinePreference.LF);\n var lastLine = model.getLineCount();\n var lastLineMaxColumn = model.getLineMaxColumn(lastLine);\n var posttextRange = selectionEndPageRange.intersectRanges(new Range(selection.endLineNumber, selection.endColumn, lastLine, lastLineMaxColumn));\n var posttext = model.getValueInRange(posttextRange, EndOfLinePreference.LF);\n var text = null;\n if (selectionStartPage === selectionEndPage || selectionStartPage + 1 === selectionEndPage) {\n // take full selection\n text = model.getValueInRange(selection, EndOfLinePreference.LF);\n }\n else {\n var selectionRange1 = selectionStartPageRange.intersectRanges(selection);\n var selectionRange2 = selectionEndPageRange.intersectRanges(selection);\n text = (model.getValueInRange(selectionRange1, EndOfLinePreference.LF)\n + String.fromCharCode(8230)\n + model.getValueInRange(selectionRange2, EndOfLinePreference.LF));\n }\n // Chromium handles very poorly text even of a few thousand chars\n // Cut text to avoid stalling the entire UI\n if (trimLongText) {\n var LIMIT_CHARS = 500;\n if (pretext.length > LIMIT_CHARS) {\n pretext = pretext.substring(pretext.length - LIMIT_CHARS, pretext.length);\n }\n if (posttext.length > LIMIT_CHARS) {\n posttext = posttext.substring(0, LIMIT_CHARS);\n }\n if (text.length > 2 * LIMIT_CHARS) {\n text = text.substring(0, LIMIT_CHARS) + String.fromCharCode(8230) + text.substring(text.length - LIMIT_CHARS, text.length);\n }\n }\n return new TextAreaState(pretext + text + posttext, pretext.length, pretext.length + text.length, new Position(selection.startLineNumber, selection.startColumn), new Position(selection.endLineNumber, selection.endColumn));\n };\n PagedScreenReaderStrategy._LINES_PER_PAGE = 10;\n return PagedScreenReaderStrategy;\n}());\nexport { PagedScreenReaderStrategy };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { RunOnceScheduler } from '../../../base/common/async';\nimport { Selection } from '../../common/core/selection';\nimport * as strings from '../../../base/common/strings';\nimport { Emitter } from '../../../base/common/event';\nimport { Disposable } from '../../../base/common/lifecycle';\nimport { TextAreaState } from './textAreaState';\nimport * as browser from '../../../base/browser/browser';\nimport * as platform from '../../../base/common/platform';\nimport * as dom from '../../../base/browser/dom';\nexport var CopyOptions = {\n forceCopyWithSyntaxHighlighting: false\n};\n/**\n * Writes screen reader content to the textarea and is able to analyze its input events to generate:\n * - onCut\n * - onPaste\n * - onType\n *\n * Composition events are generated for presentation purposes (composition input is reflected in onType).\n */\nvar TextAreaInput = /** @class */ (function (_super) {\n __extends(TextAreaInput, _super);\n function TextAreaInput(host, textArea) {\n var _this = _super.call(this) || this;\n _this._onFocus = _this._register(new Emitter());\n _this.onFocus = _this._onFocus.event;\n _this._onBlur = _this._register(new Emitter());\n _this.onBlur = _this._onBlur.event;\n _this._onKeyDown = _this._register(new Emitter());\n _this.onKeyDown = _this._onKeyDown.event;\n _this._onKeyUp = _this._register(new Emitter());\n _this.onKeyUp = _this._onKeyUp.event;\n _this._onCut = _this._register(new Emitter());\n _this.onCut = _this._onCut.event;\n _this._onPaste = _this._register(new Emitter());\n _this.onPaste = _this._onPaste.event;\n _this._onType = _this._register(new Emitter());\n _this.onType = _this._onType.event;\n _this._onCompositionStart = _this._register(new Emitter());\n _this.onCompositionStart = _this._onCompositionStart.event;\n _this._onCompositionUpdate = _this._register(new Emitter());\n _this.onCompositionUpdate = _this._onCompositionUpdate.event;\n _this._onCompositionEnd = _this._register(new Emitter());\n _this.onCompositionEnd = _this._onCompositionEnd.event;\n _this._onSelectionChangeRequest = _this._register(new Emitter());\n _this.onSelectionChangeRequest = _this._onSelectionChangeRequest.event;\n _this._host = host;\n _this._textArea = _this._register(new TextAreaWrapper(textArea));\n _this._lastTextAreaEvent = 0 /* none */;\n _this._asyncTriggerCut = _this._register(new RunOnceScheduler(function () { return _this._onCut.fire(); }, 0));\n _this._textAreaState = TextAreaState.EMPTY;\n _this.writeScreenReaderContent('ctor');\n _this._hasFocus = false;\n _this._isDoingComposition = false;\n _this._nextCommand = 0 /* Type */;\n _this._register(dom.addStandardDisposableListener(textArea.domNode, 'keydown', function (e) {\n if (_this._isDoingComposition &&\n (e.keyCode === 109 /* KEY_IN_COMPOSITION */ || e.keyCode === 1 /* Backspace */)) {\n // Stop propagation for keyDown events if the IME is processing key input\n e.stopPropagation();\n }\n if (e.equals(9 /* Escape */)) {\n // Prevent default always for `Esc`, otherwise it will generate a keypress\n // See https://msdn.microsoft.com/en-us/library/ie/ms536939(v=vs.85).aspx\n e.preventDefault();\n }\n _this._onKeyDown.fire(e);\n }));\n _this._register(dom.addStandardDisposableListener(textArea.domNode, 'keyup', function (e) {\n _this._onKeyUp.fire(e);\n }));\n _this._register(dom.addDisposableListener(textArea.domNode, 'compositionstart', function (e) {\n _this._lastTextAreaEvent = 1 /* compositionstart */;\n if (_this._isDoingComposition) {\n return;\n }\n _this._isDoingComposition = true;\n // In IE we cannot set .value when handling 'compositionstart' because the entire composition will get canceled.\n if (!browser.isEdgeOrIE) {\n _this._setAndWriteTextAreaState('compositionstart', TextAreaState.EMPTY);\n }\n _this._onCompositionStart.fire();\n }));\n /**\n * Deduce the typed input from a text area's value and the last observed state.\n */\n var deduceInputFromTextAreaValue = function (couldBeEmojiInput, couldBeTypingAtOffset0) {\n var oldState = _this._textAreaState;\n var newState = TextAreaState.readFromTextArea(_this._textArea);\n return [newState, TextAreaState.deduceInput(oldState, newState, couldBeEmojiInput, couldBeTypingAtOffset0)];\n };\n /**\n * Deduce the composition input from a string.\n */\n var deduceComposition = function (text) {\n var oldState = _this._textAreaState;\n var newState = TextAreaState.selectedText(text);\n var typeInput = {\n text: newState.value,\n replaceCharCnt: oldState.selectionEnd - oldState.selectionStart\n };\n return [newState, typeInput];\n };\n var compositionDataInValid = function (locale) {\n // https://github.com/Microsoft/monaco-editor/issues/339\n // Multi-part Japanese compositions reset cursor in Edge/IE, Chinese and Korean IME don't have this issue.\n // The reason that we can't use this path for all CJK IME is IE and Edge behave differently when handling Korean IME,\n // which breaks this path of code.\n if (browser.isEdgeOrIE && locale === 'ja') {\n return true;\n }\n // https://github.com/Microsoft/monaco-editor/issues/545\n // On IE11, we can't trust composition data when typing Chinese as IE11 doesn't emit correct\n // events when users type numbers in IME.\n // Chinese: zh-Hans-CN, zh-Hans-SG, zh-Hant-TW, zh-Hant-HK\n if (browser.isIE && locale.indexOf('zh-Han') === 0) {\n return true;\n }\n return false;\n };\n _this._register(dom.addDisposableListener(textArea.domNode, 'compositionupdate', function (e) {\n _this._lastTextAreaEvent = 2 /* compositionupdate */;\n if (compositionDataInValid(e.locale)) {\n var _a = deduceInputFromTextAreaValue(/*couldBeEmojiInput*/ false, /*couldBeTypingAtOffset0*/ false), newState_1 = _a[0], typeInput_1 = _a[1];\n _this._textAreaState = newState_1;\n _this._onType.fire(typeInput_1);\n _this._onCompositionUpdate.fire(e);\n return;\n }\n var _b = deduceComposition(e.data), newState = _b[0], typeInput = _b[1];\n _this._textAreaState = newState;\n _this._onType.fire(typeInput);\n _this._onCompositionUpdate.fire(e);\n }));\n _this._register(dom.addDisposableListener(textArea.domNode, 'compositionend', function (e) {\n _this._lastTextAreaEvent = 3 /* compositionend */;\n if (compositionDataInValid(e.locale)) {\n // https://github.com/Microsoft/monaco-editor/issues/339\n var _a = deduceInputFromTextAreaValue(/*couldBeEmojiInput*/ false, /*couldBeTypingAtOffset0*/ false), newState = _a[0], typeInput = _a[1];\n _this._textAreaState = newState;\n _this._onType.fire(typeInput);\n }\n else {\n var _b = deduceComposition(e.data), newState = _b[0], typeInput = _b[1];\n _this._textAreaState = newState;\n _this._onType.fire(typeInput);\n }\n // Due to isEdgeOrIE (where the textarea was not cleared initially) and isChrome (the textarea is not updated correctly when composition ends)\n // we cannot assume the text at the end consists only of the composited text\n if (browser.isEdgeOrIE || browser.isChrome) {\n _this._textAreaState = TextAreaState.readFromTextArea(_this._textArea);\n }\n if (!_this._isDoingComposition) {\n return;\n }\n _this._isDoingComposition = false;\n _this._onCompositionEnd.fire();\n }));\n _this._register(dom.addDisposableListener(textArea.domNode, 'input', function () {\n // We want to find out if this is the first `input` after a `focus`.\n var previousEventWasFocus = (_this._lastTextAreaEvent === 8 /* focus */);\n _this._lastTextAreaEvent = 4 /* input */;\n // Pretend here we touched the text area, as the `input` event will most likely\n // result in a `selectionchange` event which we want to ignore\n _this._textArea.setIgnoreSelectionChangeTime('received input event');\n if (_this._isDoingComposition) {\n return;\n }\n var _a = deduceInputFromTextAreaValue(/*couldBeEmojiInput*/ platform.isMacintosh, /*couldBeTypingAtOffset0*/ previousEventWasFocus && platform.isMacintosh), newState = _a[0], typeInput = _a[1];\n if (typeInput.replaceCharCnt === 0 && typeInput.text.length === 1 && strings.isHighSurrogate(typeInput.text.charCodeAt(0))) {\n // Ignore invalid input but keep it around for next time\n return;\n }\n _this._textAreaState = newState;\n if (_this._nextCommand === 0 /* Type */) {\n if (typeInput.text !== '') {\n _this._onType.fire(typeInput);\n }\n }\n else {\n if (typeInput.text !== '') {\n _this._onPaste.fire({\n text: typeInput.text\n });\n }\n _this._nextCommand = 0 /* Type */;\n }\n }));\n // --- Clipboard operations\n _this._register(dom.addDisposableListener(textArea.domNode, 'cut', function (e) {\n _this._lastTextAreaEvent = 5 /* cut */;\n // Pretend here we touched the text area, as the `cut` event will most likely\n // result in a `selectionchange` event which we want to ignore\n _this._textArea.setIgnoreSelectionChangeTime('received cut event');\n _this._ensureClipboardGetsEditorSelection(e);\n _this._asyncTriggerCut.schedule();\n }));\n _this._register(dom.addDisposableListener(textArea.domNode, 'copy', function (e) {\n _this._lastTextAreaEvent = 6 /* copy */;\n _this._ensureClipboardGetsEditorSelection(e);\n }));\n _this._register(dom.addDisposableListener(textArea.domNode, 'paste', function (e) {\n _this._lastTextAreaEvent = 7 /* paste */;\n // Pretend here we touched the text area, as the `paste` event will most likely\n // result in a `selectionchange` event which we want to ignore\n _this._textArea.setIgnoreSelectionChangeTime('received paste event');\n if (ClipboardEventUtils.canUseTextData(e)) {\n var pastePlainText = ClipboardEventUtils.getTextData(e);\n if (pastePlainText !== '') {\n _this._onPaste.fire({\n text: pastePlainText\n });\n }\n }\n else {\n if (_this._textArea.getSelectionStart() !== _this._textArea.getSelectionEnd()) {\n // Clean up the textarea, to get a clean paste\n _this._setAndWriteTextAreaState('paste', TextAreaState.EMPTY);\n }\n _this._nextCommand = 1 /* Paste */;\n }\n }));\n _this._register(dom.addDisposableListener(textArea.domNode, 'focus', function () {\n _this._lastTextAreaEvent = 8 /* focus */;\n _this._setHasFocus(true);\n }));\n _this._register(dom.addDisposableListener(textArea.domNode, 'blur', function () {\n _this._lastTextAreaEvent = 9 /* blur */;\n _this._setHasFocus(false);\n }));\n // See https://github.com/Microsoft/vscode/issues/27216\n // When using a Braille display, it is possible for users to reposition the\n // system caret. This is reflected in Chrome as a `selectionchange` event.\n //\n // The `selectionchange` event appears to be emitted under numerous other circumstances,\n // so it is quite a challenge to distinguish a `selectionchange` coming in from a user\n // using a Braille display from all the other cases.\n //\n // The problems with the `selectionchange` event are:\n // * the event is emitted when the textarea is focused programmatically -- textarea.focus()\n // * the event is emitted when the selection is changed in the textarea programatically -- textarea.setSelectionRange(...)\n // * the event is emitted when the value of the textarea is changed programmatically -- textarea.value = '...'\n // * the event is emitted when tabbing into the textarea\n // * the event is emitted asynchronously (sometimes with a delay as high as a few tens of ms)\n // * the event sometimes comes in bursts for a single logical textarea operation\n // `selectionchange` events often come multiple times for a single logical change\n // so throttle multiple `selectionchange` events that burst in a short period of time.\n var previousSelectionChangeEventTime = 0;\n _this._register(dom.addDisposableListener(document, 'selectionchange', function (e) {\n if (!_this._hasFocus) {\n return;\n }\n if (_this._isDoingComposition) {\n return;\n }\n if (!browser.isChrome || !platform.isWindows) {\n // Support only for Chrome on Windows until testing happens on other browsers + OS configurations\n return;\n }\n var now = Date.now();\n var delta1 = now - previousSelectionChangeEventTime;\n previousSelectionChangeEventTime = now;\n if (delta1 < 5) {\n // received another `selectionchange` event within 5ms of the previous `selectionchange` event\n // => ignore it\n return;\n }\n var delta2 = now - _this._textArea.getIgnoreSelectionChangeTime();\n _this._textArea.resetSelectionChangeTime();\n if (delta2 < 100) {\n // received a `selectionchange` event within 100ms since we touched the textarea\n // => ignore it, since we caused it\n return;\n }\n if (!_this._textAreaState.selectionStartPosition || !_this._textAreaState.selectionEndPosition) {\n // Cannot correlate a position in the textarea with a position in the editor...\n return;\n }\n var newValue = _this._textArea.getValue();\n if (_this._textAreaState.value !== newValue) {\n // Cannot correlate a position in the textarea with a position in the editor...\n return;\n }\n var newSelectionStart = _this._textArea.getSelectionStart();\n var newSelectionEnd = _this._textArea.getSelectionEnd();\n if (_this._textAreaState.selectionStart === newSelectionStart && _this._textAreaState.selectionEnd === newSelectionEnd) {\n // Nothing to do...\n return;\n }\n var _newSelectionStartPosition = _this._textAreaState.deduceEditorPosition(newSelectionStart);\n var newSelectionStartPosition = _this._host.deduceModelPosition(_newSelectionStartPosition[0], _newSelectionStartPosition[1], _newSelectionStartPosition[2]);\n var _newSelectionEndPosition = _this._textAreaState.deduceEditorPosition(newSelectionEnd);\n var newSelectionEndPosition = _this._host.deduceModelPosition(_newSelectionEndPosition[0], _newSelectionEndPosition[1], _newSelectionEndPosition[2]);\n var newSelection = new Selection(newSelectionStartPosition.lineNumber, newSelectionStartPosition.column, newSelectionEndPosition.lineNumber, newSelectionEndPosition.column);\n _this._onSelectionChangeRequest.fire(newSelection);\n }));\n return _this;\n }\n TextAreaInput.prototype.dispose = function () {\n _super.prototype.dispose.call(this);\n };\n TextAreaInput.prototype.focusTextArea = function () {\n // Setting this._hasFocus and writing the screen reader content\n // will result in a focus() and setSelectionRange() in the textarea\n this._setHasFocus(true);\n };\n TextAreaInput.prototype.isFocused = function () {\n return this._hasFocus;\n };\n TextAreaInput.prototype._setHasFocus = function (newHasFocus) {\n if (this._hasFocus === newHasFocus) {\n // no change\n return;\n }\n this._hasFocus = newHasFocus;\n if (this._hasFocus) {\n if (browser.isEdge) {\n // Edge has a bug where setting the selection range while the focus event\n // is dispatching doesn't work. To reproduce, \"tab into\" the editor.\n this._setAndWriteTextAreaState('focusgain', TextAreaState.EMPTY);\n }\n else {\n this.writeScreenReaderContent('focusgain');\n }\n }\n if (this._hasFocus) {\n this._onFocus.fire();\n }\n else {\n this._onBlur.fire();\n }\n };\n TextAreaInput.prototype._setAndWriteTextAreaState = function (reason, textAreaState) {\n if (!this._hasFocus) {\n textAreaState = textAreaState.collapseSelection();\n }\n textAreaState.writeToTextArea(reason, this._textArea, this._hasFocus);\n this._textAreaState = textAreaState;\n };\n TextAreaInput.prototype.writeScreenReaderContent = function (reason) {\n if (this._isDoingComposition) {\n // Do not write to the text area when doing composition\n return;\n }\n this._setAndWriteTextAreaState(reason, this._host.getScreenReaderContent(this._textAreaState));\n };\n TextAreaInput.prototype._ensureClipboardGetsEditorSelection = function (e) {\n var copyPlainText = this._host.getPlainTextToCopy();\n if (!ClipboardEventUtils.canUseTextData(e)) {\n // Looks like an old browser. The strategy is to place the text\n // we'd like to be copied to the clipboard in the textarea and select it.\n this._setAndWriteTextAreaState('copy or cut', TextAreaState.selectedText(copyPlainText));\n return;\n }\n var copyHTML = null;\n if (browser.hasClipboardSupport() && (copyPlainText.length < 65536 || CopyOptions.forceCopyWithSyntaxHighlighting)) {\n copyHTML = this._host.getHTMLToCopy();\n }\n ClipboardEventUtils.setTextData(e, copyPlainText, copyHTML);\n };\n return TextAreaInput;\n}(Disposable));\nexport { TextAreaInput };\nvar ClipboardEventUtils = /** @class */ (function () {\n function ClipboardEventUtils() {\n }\n ClipboardEventUtils.canUseTextData = function (e) {\n if (e.clipboardData) {\n return true;\n }\n if (window.clipboardData) {\n return true;\n }\n return false;\n };\n ClipboardEventUtils.getTextData = function (e) {\n if (e.clipboardData) {\n e.preventDefault();\n return e.clipboardData.getData('text/plain');\n }\n if (window.clipboardData) {\n e.preventDefault();\n return window.clipboardData.getData('Text');\n }\n throw new Error('ClipboardEventUtils.getTextData: Cannot use text data!');\n };\n ClipboardEventUtils.setTextData = function (e, text, richText) {\n if (e.clipboardData) {\n e.clipboardData.setData('text/plain', text);\n if (richText !== null) {\n e.clipboardData.setData('text/html', richText);\n }\n e.preventDefault();\n return;\n }\n if (window.clipboardData) {\n window.clipboardData.setData('Text', text);\n e.preventDefault();\n return;\n }\n throw new Error('ClipboardEventUtils.setTextData: Cannot use text data!');\n };\n return ClipboardEventUtils;\n}());\nvar TextAreaWrapper = /** @class */ (function (_super) {\n __extends(TextAreaWrapper, _super);\n function TextAreaWrapper(_textArea) {\n var _this = _super.call(this) || this;\n _this._actual = _textArea;\n _this._ignoreSelectionChangeTime = 0;\n return _this;\n }\n TextAreaWrapper.prototype.setIgnoreSelectionChangeTime = function (reason) {\n this._ignoreSelectionChangeTime = Date.now();\n };\n TextAreaWrapper.prototype.getIgnoreSelectionChangeTime = function () {\n return this._ignoreSelectionChangeTime;\n };\n TextAreaWrapper.prototype.resetSelectionChangeTime = function () {\n this._ignoreSelectionChangeTime = 0;\n };\n TextAreaWrapper.prototype.getValue = function () {\n // console.log('current value: ' + this._textArea.value);\n return this._actual.domNode.value;\n };\n TextAreaWrapper.prototype.setValue = function (reason, value) {\n var textArea = this._actual.domNode;\n if (textArea.value === value) {\n // No change\n return;\n }\n // console.log('reason: ' + reason + ', current value: ' + textArea.value + ' => new value: ' + value);\n this.setIgnoreSelectionChangeTime('setValue');\n textArea.value = value;\n };\n TextAreaWrapper.prototype.getSelectionStart = function () {\n return this._actual.domNode.selectionStart;\n };\n TextAreaWrapper.prototype.getSelectionEnd = function () {\n return this._actual.domNode.selectionEnd;\n };\n TextAreaWrapper.prototype.setSelectionRange = function (reason, selectionStart, selectionEnd) {\n var textArea = this._actual.domNode;\n var currentIsFocused = (document.activeElement === textArea);\n var currentSelectionStart = textArea.selectionStart;\n var currentSelectionEnd = textArea.selectionEnd;\n if (currentIsFocused && currentSelectionStart === selectionStart && currentSelectionEnd === selectionEnd) {\n // No change\n // Firefox iframe bug https://github.com/Microsoft/monaco-editor/issues/643#issuecomment-367871377\n if (browser.isFirefox && window.parent !== window) {\n textArea.focus();\n }\n return;\n }\n // console.log('reason: ' + reason + ', setSelectionRange: ' + selectionStart + ' -> ' + selectionEnd);\n if (currentIsFocused) {\n // No need to focus, only need to change the selection range\n this.setIgnoreSelectionChangeTime('setSelectionRange');\n textArea.setSelectionRange(selectionStart, selectionEnd);\n if (browser.isFirefox && window.parent !== window) {\n textArea.focus();\n }\n return;\n }\n // If the focus is outside the textarea, browsers will try really hard to reveal the textarea.\n // Here, we try to undo the browser's desperate reveal.\n try {\n var scrollState = dom.saveParentsScrollTop(textArea);\n this.setIgnoreSelectionChangeTime('setSelectionRange');\n textArea.focus();\n textArea.setSelectionRange(selectionStart, selectionEnd);\n dom.restoreParentsScrollTop(textArea, scrollState);\n }\n catch (e) {\n // Sometimes IE throws when setting selection (e.g. textarea is off-DOM)\n }\n };\n return TextAreaWrapper;\n}(Disposable));\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { ViewEventHandler } from '../../common/viewModel/viewEventHandler';\nimport { FastDomNode } from '../../../base/browser/fastDomNode';\nvar ViewPart = /** @class */ (function (_super) {\n __extends(ViewPart, _super);\n function ViewPart(context) {\n var _this = _super.call(this) || this;\n _this._context = context;\n _this._context.addEventHandler(_this);\n return _this;\n }\n ViewPart.prototype.dispose = function () {\n this._context.removeEventHandler(this);\n this._context = null;\n _super.prototype.dispose.call(this);\n };\n return ViewPart;\n}(ViewEventHandler));\nexport { ViewPart };\nvar PartFingerprints = /** @class */ (function () {\n function PartFingerprints() {\n }\n PartFingerprints.write = function (target, partId) {\n if (target instanceof FastDomNode) {\n target.setAttribute('data-mprt', String(partId));\n }\n else {\n target.setAttribute('data-mprt', String(partId));\n }\n };\n PartFingerprints.read = function (target) {\n var r = target.getAttribute('data-mprt');\n if (r === null) {\n return 0 /* None */;\n }\n return parseInt(r, 10);\n };\n PartFingerprints.collect = function (child, stopAt) {\n var result = [], resultLen = 0;\n while (child && child !== document.body) {\n if (child === stopAt) {\n break;\n }\n if (child.nodeType === child.ELEMENT_NODE) {\n result[resultLen++] = this.read(child);\n }\n child = child.parentElement;\n }\n var r = new Uint8Array(resultLen);\n for (var i = 0; i < resultLen; i++) {\n r[i] = result[resultLen - i - 1];\n }\n return r;\n };\n return PartFingerprints;\n}());\nexport { PartFingerprints };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { createFastDomNode } from '../../../../base/browser/fastDomNode';\nimport { ViewPart } from '../../view/viewPart';\nvar Margin = /** @class */ (function (_super) {\n __extends(Margin, _super);\n function Margin(context) {\n var _this = _super.call(this, context) || this;\n _this._canUseLayerHinting = _this._context.configuration.editor.canUseLayerHinting;\n _this._contentLeft = _this._context.configuration.editor.layoutInfo.contentLeft;\n _this._glyphMarginLeft = _this._context.configuration.editor.layoutInfo.glyphMarginLeft;\n _this._glyphMarginWidth = _this._context.configuration.editor.layoutInfo.glyphMarginWidth;\n _this._domNode = _this._createDomNode();\n return _this;\n }\n Margin.prototype.dispose = function () {\n _super.prototype.dispose.call(this);\n };\n Margin.prototype.getDomNode = function () {\n return this._domNode;\n };\n Margin.prototype._createDomNode = function () {\n var domNode = createFastDomNode(document.createElement('div'));\n domNode.setClassName(Margin.OUTER_CLASS_NAME);\n domNode.setPosition('absolute');\n domNode.setAttribute('role', 'presentation');\n domNode.setAttribute('aria-hidden', 'true');\n this._glyphMarginBackgroundDomNode = createFastDomNode(document.createElement('div'));\n this._glyphMarginBackgroundDomNode.setClassName(Margin.CLASS_NAME);\n domNode.appendChild(this._glyphMarginBackgroundDomNode);\n return domNode;\n };\n // --- begin event handlers\n Margin.prototype.onConfigurationChanged = function (e) {\n if (e.canUseLayerHinting) {\n this._canUseLayerHinting = this._context.configuration.editor.canUseLayerHinting;\n }\n if (e.layoutInfo) {\n this._contentLeft = this._context.configuration.editor.layoutInfo.contentLeft;\n this._glyphMarginLeft = this._context.configuration.editor.layoutInfo.glyphMarginLeft;\n this._glyphMarginWidth = this._context.configuration.editor.layoutInfo.glyphMarginWidth;\n }\n return true;\n };\n Margin.prototype.onScrollChanged = function (e) {\n return _super.prototype.onScrollChanged.call(this, e) || e.scrollTopChanged;\n };\n // --- end event handlers\n Margin.prototype.prepareRender = function (ctx) {\n // Nothing to read\n };\n Margin.prototype.render = function (ctx) {\n this._domNode.setLayerHinting(this._canUseLayerHinting);\n var adjustedScrollTop = ctx.scrollTop - ctx.bigNumbersDelta;\n this._domNode.setTop(-adjustedScrollTop);\n var height = Math.min(ctx.scrollHeight, 1000000);\n this._domNode.setHeight(height);\n this._domNode.setWidth(this._contentLeft);\n this._glyphMarginBackgroundDomNode.setLeft(this._glyphMarginLeft);\n this._glyphMarginBackgroundDomNode.setWidth(this._glyphMarginWidth);\n this._glyphMarginBackgroundDomNode.setHeight(height);\n };\n Margin.CLASS_NAME = 'glyph-margin';\n Margin.OUTER_CLASS_NAME = 'margin';\n return Margin;\n}(ViewPart));\nexport { Margin };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport * as platform from '../../registry/common/platform';\nimport { Color, RGBA } from '../../../base/common/color';\nimport * as nls from '../../../nls';\n// color registry\nexport var Extensions = {\n ColorContribution: 'base.contributions.colors'\n};\nvar ColorRegistry = /** @class */ (function () {\n function ColorRegistry() {\n this.colorSchema = { type: 'object', description: nls.localize('schema.colors', \"Colors used in the workbench.\"), properties: {}, additionalProperties: false };\n this.colorReferenceSchema = { type: 'string', enum: [], enumDescriptions: [] };\n this.colorsById = {};\n }\n ColorRegistry.prototype.registerColor = function (id, defaults, description, needsTransparency, deprecationMessage) {\n if (needsTransparency === void 0) { needsTransparency = false; }\n var colorContribution = { id: id, description: description, defaults: defaults, needsTransparency: needsTransparency, deprecationMessage: deprecationMessage };\n this.colorsById[id] = colorContribution;\n var propertySchema = { type: 'string', description: description, format: 'color-hex', default: '#ff0000' };\n if (deprecationMessage) {\n propertySchema.deprecationMessage = deprecationMessage;\n }\n this.colorSchema.properties[id] = propertySchema;\n this.colorReferenceSchema.enum.push(id);\n this.colorReferenceSchema.enumDescriptions.push(description);\n return id;\n };\n ColorRegistry.prototype.resolveDefaultColor = function (id, theme) {\n var colorDesc = this.colorsById[id];\n if (colorDesc && colorDesc.defaults) {\n var colorValue = colorDesc.defaults[theme.type];\n return resolveColorValue(colorValue, theme);\n }\n return null;\n };\n ColorRegistry.prototype.toString = function () {\n var _this = this;\n var sorter = function (a, b) {\n var cat1 = a.indexOf('.') === -1 ? 0 : 1;\n var cat2 = b.indexOf('.') === -1 ? 0 : 1;\n if (cat1 !== cat2) {\n return cat1 - cat2;\n }\n return a.localeCompare(b);\n };\n return Object.keys(this.colorsById).sort(sorter).map(function (k) { return \"- `\" + k + \"`: \" + _this.colorsById[k].description; }).join('\\n');\n };\n return ColorRegistry;\n}());\nvar colorRegistry = new ColorRegistry();\nplatform.Registry.add(Extensions.ColorContribution, colorRegistry);\nexport function registerColor(id, defaults, description, needsTransparency, deprecationMessage) {\n return colorRegistry.registerColor(id, defaults, description, needsTransparency, deprecationMessage);\n}\n// ----- base colors\nexport var foreground = registerColor('foreground', { dark: '#CCCCCC', light: '#616161', hc: '#FFFFFF' }, nls.localize('foreground', \"Overall foreground color. This color is only used if not overridden by a component.\"));\nexport var errorForeground = registerColor('errorForeground', { dark: '#F48771', light: '#A1260D', hc: '#F48771' }, nls.localize('errorForeground', \"Overall foreground color for error messages. This color is only used if not overridden by a component.\"));\nexport var focusBorder = registerColor('focusBorder', { dark: Color.fromHex('#0E639C').transparent(0.6), light: Color.fromHex('#007ACC').transparent(0.4), hc: '#F38518' }, nls.localize('focusBorder', \"Overall border color for focused elements. This color is only used if not overridden by a component.\"));\nexport var contrastBorder = registerColor('contrastBorder', { light: null, dark: null, hc: '#6FC3DF' }, nls.localize('contrastBorder', \"An extra border around elements to separate them from others for greater contrast.\"));\nexport var activeContrastBorder = registerColor('contrastActiveBorder', { light: null, dark: null, hc: focusBorder }, nls.localize('activeContrastBorder', \"An extra border around active elements to separate them from others for greater contrast.\"));\nexport var textLinkForeground = registerColor('textLink.foreground', { light: '#006AB1', dark: '#3794FF', hc: '#3794FF' }, nls.localize('textLinkForeground', \"Foreground color for links in text.\"));\nexport var textCodeBlockBackground = registerColor('textCodeBlock.background', { light: '#dcdcdc66', dark: '#0a0a0a66', hc: Color.black }, nls.localize('textCodeBlockBackground', \"Background color for code blocks in text.\"));\n// ----- widgets\nexport var widgetShadow = registerColor('widget.shadow', { dark: '#000000', light: '#A8A8A8', hc: null }, nls.localize('widgetShadow', 'Shadow color of widgets such as find/replace inside the editor.'));\nexport var inputBackground = registerColor('input.background', { dark: '#3C3C3C', light: Color.white, hc: Color.black }, nls.localize('inputBoxBackground', \"Input box background.\"));\nexport var inputForeground = registerColor('input.foreground', { dark: foreground, light: foreground, hc: foreground }, nls.localize('inputBoxForeground', \"Input box foreground.\"));\nexport var inputBorder = registerColor('input.border', { dark: null, light: null, hc: contrastBorder }, nls.localize('inputBoxBorder', \"Input box border.\"));\nexport var inputActiveOptionBorder = registerColor('inputOption.activeBorder', { dark: '#007ACC', light: '#007ACC', hc: activeContrastBorder }, nls.localize('inputBoxActiveOptionBorder', \"Border color of activated options in input fields.\"));\nexport var inputValidationInfoBackground = registerColor('inputValidation.infoBackground', { dark: '#063B49', light: '#D6ECF2', hc: Color.black }, nls.localize('inputValidationInfoBackground', \"Input validation background color for information severity.\"));\nexport var inputValidationInfoBorder = registerColor('inputValidation.infoBorder', { dark: '#007acc', light: '#007acc', hc: contrastBorder }, nls.localize('inputValidationInfoBorder', \"Input validation border color for information severity.\"));\nexport var inputValidationWarningBackground = registerColor('inputValidation.warningBackground', { dark: '#352A05', light: '#F6F5D2', hc: Color.black }, nls.localize('inputValidationWarningBackground', \"Input validation background color for warning severity.\"));\nexport var inputValidationWarningBorder = registerColor('inputValidation.warningBorder', { dark: '#B89500', light: '#B89500', hc: contrastBorder }, nls.localize('inputValidationWarningBorder', \"Input validation border color for warning severity.\"));\nexport var inputValidationErrorBackground = registerColor('inputValidation.errorBackground', { dark: '#5A1D1D', light: '#F2DEDE', hc: Color.black }, nls.localize('inputValidationErrorBackground', \"Input validation background color for error severity.\"));\nexport var inputValidationErrorBorder = registerColor('inputValidation.errorBorder', { dark: '#BE1100', light: '#BE1100', hc: contrastBorder }, nls.localize('inputValidationErrorBorder', \"Input validation border color for error severity.\"));\nexport var listFocusBackground = registerColor('list.focusBackground', { dark: '#062F4A', light: '#DFF0FF', hc: null }, nls.localize('listFocusBackground', \"List/Tree background color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.\"));\nexport var listFocusForeground = registerColor('list.focusForeground', { dark: null, light: null, hc: null }, nls.localize('listFocusForeground', \"List/Tree foreground color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.\"));\nexport var listActiveSelectionBackground = registerColor('list.activeSelectionBackground', { dark: '#094771', light: '#2477CE', hc: null }, nls.localize('listActiveSelectionBackground', \"List/Tree background color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.\"));\nexport var listActiveSelectionForeground = registerColor('list.activeSelectionForeground', { dark: Color.white, light: Color.white, hc: null }, nls.localize('listActiveSelectionForeground', \"List/Tree foreground color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.\"));\nexport var listInactiveSelectionBackground = registerColor('list.inactiveSelectionBackground', { dark: '#37373D', light: '#dddfea', hc: null }, nls.localize('listInactiveSelectionBackground', \"List/Tree background color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.\"));\nexport var listInactiveSelectionForeground = registerColor('list.inactiveSelectionForeground', { dark: null, light: null, hc: null }, nls.localize('listInactiveSelectionForeground', \"List/Tree foreground color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.\"));\nexport var listInactiveFocusBackground = registerColor('list.inactiveFocusBackground', { dark: '#313135', light: '#d8dae6', hc: null }, nls.localize('listInactiveFocusBackground', \"List/Tree background color for the focused item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.\"));\nexport var listHoverBackground = registerColor('list.hoverBackground', { dark: '#2A2D2E', light: '#F0F0F0', hc: null }, nls.localize('listHoverBackground', \"List/Tree background when hovering over items using the mouse.\"));\nexport var listHoverForeground = registerColor('list.hoverForeground', { dark: null, light: null, hc: null }, nls.localize('listHoverForeground', \"List/Tree foreground when hovering over items using the mouse.\"));\nexport var listDropBackground = registerColor('list.dropBackground', { dark: listFocusBackground, light: listFocusBackground, hc: null }, nls.localize('listDropBackground', \"List/Tree drag and drop background when moving items around using the mouse.\"));\nexport var listHighlightForeground = registerColor('list.highlightForeground', { dark: '#0097fb', light: '#007acc', hc: focusBorder }, nls.localize('highlight', 'List/Tree foreground color of the match highlights when searching inside the list/tree.'));\nexport var pickerGroupForeground = registerColor('pickerGroup.foreground', { dark: '#3794FF', light: '#006AB1', hc: Color.white }, nls.localize('pickerGroupForeground', \"Quick picker color for grouping labels.\"));\nexport var pickerGroupBorder = registerColor('pickerGroup.border', { dark: '#3F3F46', light: '#CCCEDB', hc: Color.white }, nls.localize('pickerGroupBorder', \"Quick picker color for grouping borders.\"));\nexport var badgeBackground = registerColor('badge.background', { dark: '#4D4D4D', light: '#C4C4C4', hc: Color.black }, nls.localize('badgeBackground', \"Badge background color. Badges are small information labels, e.g. for search results count.\"));\nexport var badgeForeground = registerColor('badge.foreground', { dark: Color.white, light: '#333', hc: Color.white }, nls.localize('badgeForeground', \"Badge foreground color. Badges are small information labels, e.g. for search results count.\"));\nexport var scrollbarShadow = registerColor('scrollbar.shadow', { dark: '#000000', light: '#DDDDDD', hc: null }, nls.localize('scrollbarShadow', \"Scrollbar shadow to indicate that the view is scrolled.\"));\nexport var scrollbarSliderBackground = registerColor('scrollbarSlider.background', { dark: Color.fromHex('#797979').transparent(0.4), light: Color.fromHex('#646464').transparent(0.4), hc: transparent(contrastBorder, 0.6) }, nls.localize('scrollbarSliderBackground', \"Scrollbar slider background color.\"));\nexport var scrollbarSliderHoverBackground = registerColor('scrollbarSlider.hoverBackground', { dark: Color.fromHex('#646464').transparent(0.7), light: Color.fromHex('#646464').transparent(0.7), hc: transparent(contrastBorder, 0.8) }, nls.localize('scrollbarSliderHoverBackground', \"Scrollbar slider background color when hovering.\"));\nexport var scrollbarSliderActiveBackground = registerColor('scrollbarSlider.activeBackground', { dark: Color.fromHex('#BFBFBF').transparent(0.4), light: Color.fromHex('#000000').transparent(0.6), hc: contrastBorder }, nls.localize('scrollbarSliderActiveBackground', \"Scrollbar slider background color when clicked on.\"));\nexport var progressBarBackground = registerColor('progressBar.background', { dark: Color.fromHex('#0E70C0'), light: Color.fromHex('#0E70C0'), hc: contrastBorder }, nls.localize('progressBarBackground', \"Background color of the progress bar that can show for long running operations.\"));\n/**\n * Editor background color.\n * Because of bug https://monacotools.visualstudio.com/DefaultCollection/Monaco/_workitems/edit/13254\n * we are *not* using the color white (or #ffffff, rgba(255,255,255)) but something very close to white.\n */\nexport var editorBackground = registerColor('editor.background', { light: '#fffffe', dark: '#1E1E1E', hc: Color.black }, nls.localize('editorBackground', \"Editor background color.\"));\n/**\n * Editor foreground color.\n */\nexport var editorForeground = registerColor('editor.foreground', { light: '#333333', dark: '#BBBBBB', hc: Color.white }, nls.localize('editorForeground', \"Editor default foreground color.\"));\n/**\n * Editor widgets\n */\nexport var editorWidgetBackground = registerColor('editorWidget.background', { dark: '#2D2D30', light: '#EFEFF2', hc: '#0C141F' }, nls.localize('editorWidgetBackground', 'Background color of editor widgets, such as find/replace.'));\nexport var editorWidgetBorder = registerColor('editorWidget.border', { dark: '#454545', light: '#C8C8C8', hc: contrastBorder }, nls.localize('editorWidgetBorder', 'Border color of editor widgets. The color is only used if the widget chooses to have a border and if the color is not overridden by a widget.'));\nexport var editorWidgetResizeBorder = registerColor('editorWidget.resizeBorder', { light: null, dark: null, hc: null }, nls.localize('editorWidgetResizeBorder', \"Border color of the resize bar of editor widgets. The color is only used if the widget chooses to have a resize border and if the color is not overridden by a widget.\"));\n/**\n * Editor selection colors.\n */\nexport var editorSelectionBackground = registerColor('editor.selectionBackground', { light: '#ADD6FF', dark: '#264F78', hc: '#f3f518' }, nls.localize('editorSelectionBackground', \"Color of the editor selection.\"));\nexport var editorSelectionForeground = registerColor('editor.selectionForeground', { light: null, dark: null, hc: '#000000' }, nls.localize('editorSelectionForeground', \"Color of the selected text for high contrast.\"));\nexport var editorInactiveSelection = registerColor('editor.inactiveSelectionBackground', { light: transparent(editorSelectionBackground, 0.5), dark: transparent(editorSelectionBackground, 0.5), hc: transparent(editorSelectionBackground, 0.5) }, nls.localize('editorInactiveSelection', \"Color of the selection in an inactive editor. The color must not be opaque to not hide underlying decorations.\"), true);\nexport var editorSelectionHighlight = registerColor('editor.selectionHighlightBackground', { light: lessProminent(editorSelectionBackground, editorBackground, 0.3, 0.6), dark: lessProminent(editorSelectionBackground, editorBackground, 0.3, 0.6), hc: null }, nls.localize('editorSelectionHighlight', 'Color for regions with the same content as the selection. The color must not be opaque to not hide underlying decorations.'), true);\nexport var editorSelectionHighlightBorder = registerColor('editor.selectionHighlightBorder', { light: null, dark: null, hc: activeContrastBorder }, nls.localize('editorSelectionHighlightBorder', \"Border color for regions with the same content as the selection.\"));\n/**\n * Editor find match colors.\n */\nexport var editorFindMatch = registerColor('editor.findMatchBackground', { light: '#A8AC94', dark: '#515C6A', hc: null }, nls.localize('editorFindMatch', \"Color of the current search match.\"));\nexport var editorFindMatchHighlight = registerColor('editor.findMatchHighlightBackground', { light: '#EA5C0055', dark: '#EA5C0055', hc: null }, nls.localize('findMatchHighlight', \"Color of the other search matches. The color must not be opaque to not hide underlying decorations.\"), true);\nexport var editorFindRangeHighlight = registerColor('editor.findRangeHighlightBackground', { dark: '#3a3d4166', light: '#b4b4b44d', hc: null }, nls.localize('findRangeHighlight', \"Color of the range limiting the search. The color must not be opaque to not hide underlying decorations.\"), true);\nexport var editorFindMatchBorder = registerColor('editor.findMatchBorder', { light: null, dark: null, hc: activeContrastBorder }, nls.localize('editorFindMatchBorder', \"Border color of the current search match.\"));\nexport var editorFindMatchHighlightBorder = registerColor('editor.findMatchHighlightBorder', { light: null, dark: null, hc: activeContrastBorder }, nls.localize('findMatchHighlightBorder', \"Border color of the other search matches.\"));\nexport var editorFindRangeHighlightBorder = registerColor('editor.findRangeHighlightBorder', { dark: null, light: null, hc: transparent(activeContrastBorder, 0.4) }, nls.localize('findRangeHighlightBorder', \"Border color of the range limiting the search. The color must not be opaque to not hide underlying decorations.\"), true);\n/**\n * Editor hover\n */\nexport var editorHoverHighlight = registerColor('editor.hoverHighlightBackground', { light: '#ADD6FF26', dark: '#264f7840', hc: '#ADD6FF26' }, nls.localize('hoverHighlight', 'Highlight below the word for which a hover is shown. The color must not be opaque to not hide underlying decorations.'), true);\nexport var editorHoverBackground = registerColor('editorHoverWidget.background', { light: editorWidgetBackground, dark: editorWidgetBackground, hc: editorWidgetBackground }, nls.localize('hoverBackground', 'Background color of the editor hover.'));\nexport var editorHoverBorder = registerColor('editorHoverWidget.border', { light: editorWidgetBorder, dark: editorWidgetBorder, hc: editorWidgetBorder }, nls.localize('hoverBorder', 'Border color of the editor hover.'));\n/**\n * Editor link colors\n */\nexport var editorActiveLinkForeground = registerColor('editorLink.activeForeground', { dark: '#4E94CE', light: Color.blue, hc: Color.cyan }, nls.localize('activeLinkForeground', 'Color of active links.'));\n/**\n * Diff Editor Colors\n */\nexport var defaultInsertColor = new Color(new RGBA(155, 185, 85, 0.2));\nexport var defaultRemoveColor = new Color(new RGBA(255, 0, 0, 0.2));\nexport var diffInserted = registerColor('diffEditor.insertedTextBackground', { dark: defaultInsertColor, light: defaultInsertColor, hc: null }, nls.localize('diffEditorInserted', 'Background color for text that got inserted. The color must not be opaque to not hide underlying decorations.'), true);\nexport var diffRemoved = registerColor('diffEditor.removedTextBackground', { dark: defaultRemoveColor, light: defaultRemoveColor, hc: null }, nls.localize('diffEditorRemoved', 'Background color for text that got removed. The color must not be opaque to not hide underlying decorations.'), true);\nexport var diffInsertedOutline = registerColor('diffEditor.insertedTextBorder', { dark: null, light: null, hc: '#33ff2eff' }, nls.localize('diffEditorInsertedOutline', 'Outline color for the text that got inserted.'));\nexport var diffRemovedOutline = registerColor('diffEditor.removedTextBorder', { dark: null, light: null, hc: '#FF008F' }, nls.localize('diffEditorRemovedOutline', 'Outline color for text that got removed.'));\nexport var diffBorder = registerColor('diffEditor.border', { dark: null, light: null, hc: contrastBorder }, nls.localize('diffEditorBorder', 'Border color between the two text editors.'));\nvar findMatchColorDefault = new Color(new RGBA(246, 185, 77, 0.7));\nexport var overviewRulerFindMatchForeground = registerColor('editorOverviewRuler.findMatchForeground', { dark: findMatchColorDefault, light: findMatchColorDefault, hc: findMatchColorDefault }, nls.localize('overviewRulerFindMatchForeground', 'Overview ruler marker color for find matches. The color must not be opaque to not hide underlying decorations.'), true);\nexport var overviewRulerSelectionHighlightForeground = registerColor('editorOverviewRuler.selectionHighlightForeground', { dark: '#A0A0A0CC', light: '#A0A0A0CC', hc: '#A0A0A0CC' }, nls.localize('overviewRulerSelectionHighlightForeground', 'Overview ruler marker color for selection highlights. The color must not be opaque to not hide underlying decorations.'), true);\nexport function transparent(colorValue, factor) {\n return function (theme) {\n var color = resolveColorValue(colorValue, theme);\n if (color) {\n return color.transparent(factor);\n }\n return null;\n };\n}\nexport function oneOf() {\n var colorValues = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n colorValues[_i] = arguments[_i];\n }\n return function (theme) {\n for (var _i = 0, colorValues_1 = colorValues; _i < colorValues_1.length; _i++) {\n var colorValue = colorValues_1[_i];\n var color = resolveColorValue(colorValue, theme);\n if (color) {\n return color;\n }\n }\n return null;\n };\n}\nfunction lessProminent(colorValue, backgroundColorValue, factor, transparency) {\n return function (theme) {\n var from = resolveColorValue(colorValue, theme);\n if (from) {\n var backgroundColor = resolveColorValue(backgroundColorValue, theme);\n if (backgroundColor) {\n if (from.isDarkerThan(backgroundColor)) {\n return Color.getLighterColor(from, backgroundColor, factor).transparent(transparency);\n }\n return Color.getDarkerColor(from, backgroundColor, factor).transparent(transparency);\n }\n return from.transparent(factor * transparency);\n }\n return null;\n };\n}\n// ----- implementation\n/**\n * @param colorValue Resolve a color value in the context of a theme\n */\nfunction resolveColorValue(colorValue, theme) {\n if (colorValue === null) {\n return null;\n }\n else if (typeof colorValue === 'string') {\n if (colorValue[0] === '#') {\n return Color.fromHex(colorValue);\n }\n return theme.getColor(colorValue);\n }\n else if (colorValue instanceof Color) {\n return colorValue;\n }\n else if (typeof colorValue === 'function') {\n return colorValue(theme);\n }\n return null;\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport * as nls from '../../../nls';\nimport { registerColor, editorBackground, activeContrastBorder, editorForeground } from '../../../platform/theme/common/colorRegistry';\nimport { registerThemingParticipant } from '../../../platform/theme/common/themeService';\nimport { Color, RGBA } from '../../../base/common/color';\n/**\n * Definition of the editor colors\n */\nexport var editorLineHighlight = registerColor('editor.lineHighlightBackground', { dark: null, light: null, hc: null }, nls.localize('lineHighlight', 'Background color for the highlight of line at the cursor position.'));\nexport var editorLineHighlightBorder = registerColor('editor.lineHighlightBorder', { dark: '#282828', light: '#eeeeee', hc: '#f38518' }, nls.localize('lineHighlightBorderBox', 'Background color for the border around the line at the cursor position.'));\nexport var editorRangeHighlight = registerColor('editor.rangeHighlightBackground', { dark: '#ffffff0b', light: '#fdff0033', hc: null }, nls.localize('rangeHighlight', 'Background color of highlighted ranges, like by quick open and find features. The color must not be opaque to not hide underlying decorations.'), true);\nexport var editorRangeHighlightBorder = registerColor('editor.rangeHighlightBorder', { dark: null, light: null, hc: activeContrastBorder }, nls.localize('rangeHighlightBorder', 'Background color of the border around highlighted ranges.'), true);\nexport var editorCursorForeground = registerColor('editorCursor.foreground', { dark: '#AEAFAD', light: Color.black, hc: Color.white }, nls.localize('caret', 'Color of the editor cursor.'));\nexport var editorCursorBackground = registerColor('editorCursor.background', null, nls.localize('editorCursorBackground', 'The background color of the editor cursor. Allows customizing the color of a character overlapped by a block cursor.'));\nexport var editorWhitespaces = registerColor('editorWhitespace.foreground', { dark: '#e3e4e229', light: '#33333333', hc: '#e3e4e229' }, nls.localize('editorWhitespaces', 'Color of whitespace characters in the editor.'));\nexport var editorIndentGuides = registerColor('editorIndentGuide.background', { dark: editorWhitespaces, light: editorWhitespaces, hc: editorWhitespaces }, nls.localize('editorIndentGuides', 'Color of the editor indentation guides.'));\nexport var editorActiveIndentGuides = registerColor('editorIndentGuide.activeBackground', { dark: editorWhitespaces, light: editorWhitespaces, hc: editorWhitespaces }, nls.localize('editorActiveIndentGuide', 'Color of the active editor indentation guides.'));\nexport var editorLineNumbers = registerColor('editorLineNumber.foreground', { dark: '#858585', light: '#237893', hc: Color.white }, nls.localize('editorLineNumbers', 'Color of editor line numbers.'));\nvar deprecatedEditorActiveLineNumber = registerColor('editorActiveLineNumber.foreground', { dark: '#c6c6c6', light: '#0B216F', hc: activeContrastBorder }, nls.localize('editorActiveLineNumber', 'Color of editor active line number'), false, nls.localize('deprecatedEditorActiveLineNumber', 'Id is deprecated. Use \\'editorLineNumber.activeForeground\\' instead.'));\nexport var editorActiveLineNumber = registerColor('editorLineNumber.activeForeground', { dark: deprecatedEditorActiveLineNumber, light: deprecatedEditorActiveLineNumber, hc: deprecatedEditorActiveLineNumber }, nls.localize('editorActiveLineNumber', 'Color of editor active line number'));\nexport var editorRuler = registerColor('editorRuler.foreground', { dark: '#5A5A5A', light: Color.lightgrey, hc: Color.white }, nls.localize('editorRuler', 'Color of the editor rulers.'));\nexport var editorCodeLensForeground = registerColor('editorCodeLens.foreground', { dark: '#999999', light: '#999999', hc: '#999999' }, nls.localize('editorCodeLensForeground', 'Foreground color of editor code lenses'));\nexport var editorBracketMatchBackground = registerColor('editorBracketMatch.background', { dark: '#0064001a', light: '#0064001a', hc: '#0064001a' }, nls.localize('editorBracketMatchBackground', 'Background color behind matching brackets'));\nexport var editorBracketMatchBorder = registerColor('editorBracketMatch.border', { dark: '#888', light: '#B9B9B9', hc: '#fff' }, nls.localize('editorBracketMatchBorder', 'Color for matching brackets boxes'));\nexport var editorOverviewRulerBorder = registerColor('editorOverviewRuler.border', { dark: '#7f7f7f4d', light: '#7f7f7f4d', hc: '#7f7f7f4d' }, nls.localize('editorOverviewRulerBorder', 'Color of the overview ruler border.'));\nexport var editorGutter = registerColor('editorGutter.background', { dark: editorBackground, light: editorBackground, hc: editorBackground }, nls.localize('editorGutter', 'Background color of the editor gutter. The gutter contains the glyph margins and the line numbers.'));\nexport var editorErrorForeground = registerColor('editorError.foreground', { dark: '#ea4646', light: '#d60a0a', hc: null }, nls.localize('errorForeground', 'Foreground color of error squigglies in the editor.'));\nexport var editorErrorBorder = registerColor('editorError.border', { dark: null, light: null, hc: Color.fromHex('#E47777').transparent(0.8) }, nls.localize('errorBorder', 'Border color of error squigglies in the editor.'));\nexport var editorWarningForeground = registerColor('editorWarning.foreground', { dark: '#4d9e4d', light: '#117711', hc: null }, nls.localize('warningForeground', 'Foreground color of warning squigglies in the editor.'));\nexport var editorWarningBorder = registerColor('editorWarning.border', { dark: null, light: null, hc: Color.fromHex('#71B771').transparent(0.8) }, nls.localize('warningBorder', 'Border color of warning squigglies in the editor.'));\nexport var editorInfoForeground = registerColor('editorInfo.foreground', { dark: '#008000', light: '#008000', hc: null }, nls.localize('infoForeground', 'Foreground color of info squigglies in the editor.'));\nexport var editorInfoBorder = registerColor('editorInfo.border', { dark: null, light: null, hc: Color.fromHex('#71B771').transparent(0.8) }, nls.localize('infoBorder', 'Border color of info squigglies in the editor.'));\nexport var editorHintForeground = registerColor('editorHint.foreground', { dark: Color.fromHex('#eeeeee').transparent(0.7), light: '#6c6c6c', hc: null }, nls.localize('hintForeground', 'Foreground color of hint squigglies in the editor.'));\nexport var editorHintBorder = registerColor('editorHint.border', { dark: null, light: null, hc: Color.fromHex('#eeeeee').transparent(0.8) }, nls.localize('hintBorder', 'Border color of hint squigglies in the editor.'));\nexport var editorUnnecessaryCodeBorder = registerColor('editorUnnecessaryCode.border', { dark: null, light: null, hc: Color.fromHex('#fff').transparent(0.8) }, nls.localize('unnecessaryCodeBorder', 'Border of unnecessary code in the editor.'));\nexport var editorUnnecessaryCodeOpacity = registerColor('editorUnnecessaryCode.opacity', { dark: Color.fromHex('#000a'), light: Color.fromHex('#0007'), hc: null }, nls.localize('unnecessaryCodeOpacity', 'Opacity of unnecessary code in the editor.'));\nexport var overviewRulerError = registerColor('editorOverviewRuler.errorForeground', { dark: new Color(new RGBA(255, 18, 18, 0.7)), light: new Color(new RGBA(255, 18, 18, 0.7)), hc: new Color(new RGBA(255, 50, 50, 1)) }, nls.localize('overviewRuleError', 'Overview ruler marker color for errors.'));\nexport var overviewRulerWarning = registerColor('editorOverviewRuler.warningForeground', { dark: new Color(new RGBA(18, 136, 18, 0.7)), light: new Color(new RGBA(18, 136, 18, 0.7)), hc: new Color(new RGBA(50, 255, 50, 1)) }, nls.localize('overviewRuleWarning', 'Overview ruler marker color for warnings.'));\nexport var overviewRulerInfo = registerColor('editorOverviewRuler.infoForeground', { dark: new Color(new RGBA(18, 18, 136, 0.7)), light: new Color(new RGBA(18, 18, 136, 0.7)), hc: new Color(new RGBA(50, 50, 255, 1)) }, nls.localize('overviewRuleInfo', 'Overview ruler marker color for infos.'));\n// contains all color rules that used to defined in editor/browser/widget/editor.css\nregisterThemingParticipant(function (theme, collector) {\n var background = theme.getColor(editorBackground);\n if (background) {\n collector.addRule(\".monaco-editor, .monaco-editor-background, .monaco-editor .inputarea.ime-input { background-color: \" + background + \"; }\");\n }\n var foreground = theme.getColor(editorForeground);\n if (foreground) {\n collector.addRule(\".monaco-editor, .monaco-editor .inputarea.ime-input { color: \" + foreground + \"; }\");\n }\n var gutter = theme.getColor(editorGutter);\n if (gutter) {\n collector.addRule(\".monaco-editor .margin { background-color: \" + gutter + \"; }\");\n }\n var rangeHighlight = theme.getColor(editorRangeHighlight);\n if (rangeHighlight) {\n collector.addRule(\".monaco-editor .rangeHighlight { background-color: \" + rangeHighlight + \"; }\");\n }\n var rangeHighlightBorder = theme.getColor(editorRangeHighlightBorder);\n if (rangeHighlightBorder) {\n collector.addRule(\".monaco-editor .rangeHighlight { border: 1px \" + (theme.type === 'hc' ? 'dotted' : 'solid') + \" \" + rangeHighlightBorder + \"; }\");\n }\n var invisibles = theme.getColor(editorWhitespaces);\n if (invisibles) {\n collector.addRule(\".vs-whitespace { color: \" + invisibles + \" !important; }\");\n }\n});\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { ViewEventHandler } from '../../common/viewModel/viewEventHandler';\nvar DynamicViewOverlay = /** @class */ (function (_super) {\n __extends(DynamicViewOverlay, _super);\n function DynamicViewOverlay() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return DynamicViewOverlay;\n}(ViewEventHandler));\nexport { DynamicViewOverlay };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport './lineNumbers.css';\nimport { editorLineNumbers, editorActiveLineNumber } from '../../../common/view/editorColorRegistry';\nimport { registerThemingParticipant } from '../../../../platform/theme/common/themeService';\nimport * as platform from '../../../../base/common/platform';\nimport { DynamicViewOverlay } from '../../view/dynamicViewOverlay';\nimport { Position } from '../../../common/core/position';\nvar LineNumbersOverlay = /** @class */ (function (_super) {\n __extends(LineNumbersOverlay, _super);\n function LineNumbersOverlay(context) {\n var _this = _super.call(this) || this;\n _this._context = context;\n _this._readConfig();\n _this._lastCursorModelPosition = new Position(1, 1);\n _this._renderResult = null;\n _this._context.addEventHandler(_this);\n return _this;\n }\n LineNumbersOverlay.prototype._readConfig = function () {\n var config = this._context.configuration.editor;\n this._lineHeight = config.lineHeight;\n this._renderLineNumbers = config.viewInfo.renderLineNumbers;\n this._renderCustomLineNumbers = config.viewInfo.renderCustomLineNumbers;\n this._lineNumbersLeft = config.layoutInfo.lineNumbersLeft;\n this._lineNumbersWidth = config.layoutInfo.lineNumbersWidth;\n };\n LineNumbersOverlay.prototype.dispose = function () {\n this._context.removeEventHandler(this);\n this._context = null;\n this._renderResult = null;\n _super.prototype.dispose.call(this);\n };\n // --- begin event handlers\n LineNumbersOverlay.prototype.onConfigurationChanged = function (e) {\n this._readConfig();\n return true;\n };\n LineNumbersOverlay.prototype.onCursorStateChanged = function (e) {\n var primaryViewPosition = e.selections[0].getPosition();\n this._lastCursorModelPosition = this._context.model.coordinatesConverter.convertViewPositionToModelPosition(primaryViewPosition);\n if (this._renderLineNumbers === 2 /* Relative */ || this._renderLineNumbers === 3 /* Interval */) {\n return true;\n }\n return false;\n };\n LineNumbersOverlay.prototype.onFlushed = function (e) {\n return true;\n };\n LineNumbersOverlay.prototype.onLinesChanged = function (e) {\n return true;\n };\n LineNumbersOverlay.prototype.onLinesDeleted = function (e) {\n return true;\n };\n LineNumbersOverlay.prototype.onLinesInserted = function (e) {\n return true;\n };\n LineNumbersOverlay.prototype.onScrollChanged = function (e) {\n return e.scrollTopChanged;\n };\n LineNumbersOverlay.prototype.onZonesChanged = function (e) {\n return true;\n };\n // --- end event handlers\n LineNumbersOverlay.prototype._getLineRenderLineNumber = function (viewLineNumber) {\n var modelPosition = this._context.model.coordinatesConverter.convertViewPositionToModelPosition(new Position(viewLineNumber, 1));\n if (modelPosition.column !== 1) {\n return '';\n }\n var modelLineNumber = modelPosition.lineNumber;\n if (this._renderCustomLineNumbers) {\n return this._renderCustomLineNumbers(modelLineNumber);\n }\n if (this._renderLineNumbers === 2 /* Relative */) {\n var diff = Math.abs(this._lastCursorModelPosition.lineNumber - modelLineNumber);\n if (diff === 0) {\n return '' + modelLineNumber + '';\n }\n return String(diff);\n }\n if (this._renderLineNumbers === 3 /* Interval */) {\n if (this._lastCursorModelPosition.lineNumber === modelLineNumber) {\n return String(modelLineNumber);\n }\n if (modelLineNumber % 10 === 0) {\n return String(modelLineNumber);\n }\n return '';\n }\n return String(modelLineNumber);\n };\n LineNumbersOverlay.prototype.prepareRender = function (ctx) {\n if (this._renderLineNumbers === 0 /* Off */) {\n this._renderResult = null;\n return;\n }\n var lineHeightClassName = (platform.isLinux ? (this._lineHeight % 2 === 0 ? ' lh-even' : ' lh-odd') : '');\n var visibleStartLineNumber = ctx.visibleRange.startLineNumber;\n var visibleEndLineNumber = ctx.visibleRange.endLineNumber;\n var common = '
    ';\n var output = [];\n for (var lineNumber = visibleStartLineNumber; lineNumber <= visibleEndLineNumber; lineNumber++) {\n var lineIndex = lineNumber - visibleStartLineNumber;\n var renderLineNumber = this._getLineRenderLineNumber(lineNumber);\n if (renderLineNumber) {\n output[lineIndex] = (common\n + renderLineNumber\n + '
    ');\n }\n else {\n output[lineIndex] = '';\n }\n }\n this._renderResult = output;\n };\n LineNumbersOverlay.prototype.render = function (startLineNumber, lineNumber) {\n if (!this._renderResult) {\n return '';\n }\n var lineIndex = lineNumber - startLineNumber;\n if (lineIndex < 0 || lineIndex >= this._renderResult.length) {\n return '';\n }\n return this._renderResult[lineIndex];\n };\n LineNumbersOverlay.CLASS_NAME = 'line-numbers';\n return LineNumbersOverlay;\n}(DynamicViewOverlay));\nexport { LineNumbersOverlay };\n// theming\nregisterThemingParticipant(function (theme, collector) {\n var lineNumbers = theme.getColor(editorLineNumbers);\n if (lineNumbers) {\n collector.addRule(\".monaco-editor .line-numbers { color: \" + lineNumbers + \"; }\");\n }\n var activeLineNumber = theme.getColor(editorActiveLineNumber);\n if (activeLineNumber) {\n collector.addRule(\".monaco-editor .current-line ~ .line-numbers { color: \" + activeLineNumber + \"; }\");\n }\n});\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport './textAreaHandler.css';\nimport * as platform from '../../../base/common/platform';\nimport * as browser from '../../../base/browser/browser';\nimport * as strings from '../../../base/common/strings';\nimport { TextAreaInput } from './textAreaInput';\nimport { TextAreaState, PagedScreenReaderStrategy } from './textAreaState';\nimport { Range } from '../../common/core/range';\nimport { Selection } from '../../common/core/selection';\nimport { Position } from '../../common/core/position';\nimport { Configuration } from '../config/configuration';\nimport * as viewEvents from '../../common/view/viewEvents';\nimport { createFastDomNode } from '../../../base/browser/fastDomNode';\nimport { PartFingerprints, ViewPart } from '../view/viewPart';\nimport { Margin } from '../viewParts/margin/margin';\nimport { LineNumbersOverlay } from '../viewParts/lineNumbers/lineNumbers';\nimport { getMapForWordSeparators } from '../../common/controller/wordCharacterClassifier';\nvar VisibleTextAreaData = /** @class */ (function () {\n function VisibleTextAreaData(top, left, width) {\n this.top = top;\n this.left = left;\n this.width = width;\n }\n VisibleTextAreaData.prototype.setWidth = function (width) {\n return new VisibleTextAreaData(this.top, this.left, width);\n };\n return VisibleTextAreaData;\n}());\nvar canUseZeroSizeTextarea = (browser.isEdgeOrIE || browser.isFirefox);\n/**\n * Every time we write to the clipboard, we record a bit of extra metadata here.\n * Every time we read from the cipboard, if the text matches our last written text,\n * we can fetch the previous metadata.\n */\nvar LocalClipboardMetadataManager = /** @class */ (function () {\n function LocalClipboardMetadataManager() {\n this._lastState = null;\n }\n LocalClipboardMetadataManager.prototype.set = function (state) {\n this._lastState = state;\n };\n LocalClipboardMetadataManager.prototype.get = function (pastedText) {\n if (this._lastState && this._lastState.lastCopiedValue === pastedText) {\n // match!\n return this._lastState;\n }\n this._lastState = null;\n return null;\n };\n LocalClipboardMetadataManager.INSTANCE = new LocalClipboardMetadataManager();\n return LocalClipboardMetadataManager;\n}());\nvar TextAreaHandler = /** @class */ (function (_super) {\n __extends(TextAreaHandler, _super);\n function TextAreaHandler(context, viewController, viewHelper) {\n var _this = _super.call(this, context) || this;\n // --- end view API\n _this._primaryCursorVisibleRange = null;\n _this._viewController = viewController;\n _this._viewHelper = viewHelper;\n var conf = _this._context.configuration.editor;\n _this._accessibilitySupport = conf.accessibilitySupport;\n _this._contentLeft = conf.layoutInfo.contentLeft;\n _this._contentWidth = conf.layoutInfo.contentWidth;\n _this._contentHeight = conf.layoutInfo.contentHeight;\n _this._scrollLeft = 0;\n _this._scrollTop = 0;\n _this._fontInfo = conf.fontInfo;\n _this._lineHeight = conf.lineHeight;\n _this._emptySelectionClipboard = conf.emptySelectionClipboard;\n _this._visibleTextArea = null;\n _this._selections = [new Selection(1, 1, 1, 1)];\n // Text Area (The focus will always be in the textarea when the cursor is blinking)\n _this.textArea = createFastDomNode(document.createElement('textarea'));\n PartFingerprints.write(_this.textArea, 6 /* TextArea */);\n _this.textArea.setClassName('inputarea');\n _this.textArea.setAttribute('wrap', 'off');\n _this.textArea.setAttribute('autocorrect', 'off');\n _this.textArea.setAttribute('autocapitalize', 'off');\n _this.textArea.setAttribute('autocomplete', 'off');\n _this.textArea.setAttribute('spellcheck', 'false');\n _this.textArea.setAttribute('aria-label', conf.viewInfo.ariaLabel);\n _this.textArea.setAttribute('role', 'textbox');\n _this.textArea.setAttribute('aria-multiline', 'true');\n _this.textArea.setAttribute('aria-haspopup', 'false');\n _this.textArea.setAttribute('aria-autocomplete', 'both');\n _this.textAreaCover = createFastDomNode(document.createElement('div'));\n _this.textAreaCover.setPosition('absolute');\n var simpleModel = {\n getLineCount: function () {\n return _this._context.model.getLineCount();\n },\n getLineMaxColumn: function (lineNumber) {\n return _this._context.model.getLineMaxColumn(lineNumber);\n },\n getValueInRange: function (range, eol) {\n return _this._context.model.getValueInRange(range, eol);\n }\n };\n var textAreaInputHost = {\n getPlainTextToCopy: function () {\n var rawWhatToCopy = _this._context.model.getPlainTextToCopy(_this._selections, _this._emptySelectionClipboard, platform.isWindows);\n var newLineCharacter = _this._context.model.getEOL();\n var isFromEmptySelection = (_this._emptySelectionClipboard && _this._selections.length === 1 && _this._selections[0].isEmpty());\n var multicursorText = (Array.isArray(rawWhatToCopy) ? rawWhatToCopy : null);\n var whatToCopy = (Array.isArray(rawWhatToCopy) ? rawWhatToCopy.join(newLineCharacter) : rawWhatToCopy);\n var metadata = null;\n if (isFromEmptySelection || multicursorText) {\n // Only store the non-default metadata\n // When writing \"LINE\\r\\n\" to the clipboard and then pasting,\n // Firefox pastes \"LINE\\n\", so let's work around this quirk\n var lastCopiedValue = (browser.isFirefox ? whatToCopy.replace(/\\r\\n/g, '\\n') : whatToCopy);\n metadata = {\n lastCopiedValue: lastCopiedValue,\n isFromEmptySelection: (_this._emptySelectionClipboard && _this._selections.length === 1 && _this._selections[0].isEmpty()),\n multicursorText: multicursorText\n };\n }\n LocalClipboardMetadataManager.INSTANCE.set(metadata);\n return whatToCopy;\n },\n getHTMLToCopy: function () {\n return _this._context.model.getHTMLToCopy(_this._selections, _this._emptySelectionClipboard);\n },\n getScreenReaderContent: function (currentState) {\n if (browser.isIPad) {\n // Do not place anything in the textarea for the iPad\n return TextAreaState.EMPTY;\n }\n if (_this._accessibilitySupport === 1 /* Disabled */) {\n // We know for a fact that a screen reader is not attached\n // On OSX, we write the character before the cursor to allow for \"long-press\" composition\n // Also on OSX, we write the word before the cursor to allow for the Accessibility Keyboard to give good hints\n if (platform.isMacintosh) {\n var selection = _this._selections[0];\n if (selection.isEmpty()) {\n var position = selection.getStartPosition();\n var textBefore = _this._getWordBeforePosition(position);\n if (textBefore.length === 0) {\n textBefore = _this._getCharacterBeforePosition(position);\n }\n if (textBefore.length > 0) {\n return new TextAreaState(textBefore, textBefore.length, textBefore.length, position, position);\n }\n }\n }\n return TextAreaState.EMPTY;\n }\n return PagedScreenReaderStrategy.fromEditorSelection(currentState, simpleModel, _this._selections[0], _this._accessibilitySupport === 0 /* Unknown */);\n },\n deduceModelPosition: function (viewAnchorPosition, deltaOffset, lineFeedCnt) {\n return _this._context.model.deduceModelPositionRelativeToViewPosition(viewAnchorPosition, deltaOffset, lineFeedCnt);\n }\n };\n _this._textAreaInput = _this._register(new TextAreaInput(textAreaInputHost, _this.textArea));\n _this._register(_this._textAreaInput.onKeyDown(function (e) {\n _this._viewController.emitKeyDown(e);\n }));\n _this._register(_this._textAreaInput.onKeyUp(function (e) {\n _this._viewController.emitKeyUp(e);\n }));\n _this._register(_this._textAreaInput.onPaste(function (e) {\n var metadata = LocalClipboardMetadataManager.INSTANCE.get(e.text);\n var pasteOnNewLine = false;\n var multicursorText = null;\n if (metadata) {\n pasteOnNewLine = (_this._emptySelectionClipboard && metadata.isFromEmptySelection);\n multicursorText = metadata.multicursorText;\n }\n _this._viewController.paste('keyboard', e.text, pasteOnNewLine, multicursorText);\n }));\n _this._register(_this._textAreaInput.onCut(function () {\n _this._viewController.cut('keyboard');\n }));\n _this._register(_this._textAreaInput.onType(function (e) {\n if (e.replaceCharCnt) {\n _this._viewController.replacePreviousChar('keyboard', e.text, e.replaceCharCnt);\n }\n else {\n _this._viewController.type('keyboard', e.text);\n }\n }));\n _this._register(_this._textAreaInput.onSelectionChangeRequest(function (modelSelection) {\n _this._viewController.setSelection('keyboard', modelSelection);\n }));\n _this._register(_this._textAreaInput.onCompositionStart(function () {\n var lineNumber = _this._selections[0].startLineNumber;\n var column = _this._selections[0].startColumn;\n _this._context.privateViewEventBus.emit(new viewEvents.ViewRevealRangeRequestEvent(new Range(lineNumber, column, lineNumber, column), 0 /* Simple */, true, 1 /* Immediate */));\n // Find range pixel position\n var visibleRange = _this._viewHelper.visibleRangeForPositionRelativeToEditor(lineNumber, column);\n if (visibleRange) {\n _this._visibleTextArea = new VisibleTextAreaData(_this._context.viewLayout.getVerticalOffsetForLineNumber(lineNumber), visibleRange.left, canUseZeroSizeTextarea ? 0 : 1);\n _this._render();\n }\n // Show the textarea\n _this.textArea.setClassName('inputarea ime-input');\n _this._viewController.compositionStart('keyboard');\n }));\n _this._register(_this._textAreaInput.onCompositionUpdate(function (e) {\n if (browser.isEdgeOrIE) {\n // Due to isEdgeOrIE (where the textarea was not cleared initially)\n // we cannot assume the text consists only of the composited text\n _this._visibleTextArea = _this._visibleTextArea.setWidth(0);\n }\n else {\n // adjust width by its size\n _this._visibleTextArea = _this._visibleTextArea.setWidth(measureText(e.data, _this._fontInfo));\n }\n _this._render();\n }));\n _this._register(_this._textAreaInput.onCompositionEnd(function () {\n _this._visibleTextArea = null;\n _this._render();\n _this.textArea.setClassName('inputarea');\n _this._viewController.compositionEnd('keyboard');\n }));\n _this._register(_this._textAreaInput.onFocus(function () {\n _this._context.privateViewEventBus.emit(new viewEvents.ViewFocusChangedEvent(true));\n }));\n _this._register(_this._textAreaInput.onBlur(function () {\n _this._context.privateViewEventBus.emit(new viewEvents.ViewFocusChangedEvent(false));\n }));\n return _this;\n }\n TextAreaHandler.prototype.dispose = function () {\n _super.prototype.dispose.call(this);\n };\n TextAreaHandler.prototype._getWordBeforePosition = function (position) {\n var lineContent = this._context.model.getLineContent(position.lineNumber);\n var wordSeparators = getMapForWordSeparators(this._context.configuration.editor.wordSeparators);\n var column = position.column;\n var distance = 0;\n while (column > 1) {\n var charCode = lineContent.charCodeAt(column - 2);\n var charClass = wordSeparators.get(charCode);\n if (charClass !== 0 /* Regular */ || distance > 50) {\n return lineContent.substring(column - 1, position.column - 1);\n }\n distance++;\n column--;\n }\n return lineContent.substring(0, position.column - 1);\n };\n TextAreaHandler.prototype._getCharacterBeforePosition = function (position) {\n if (position.column > 1) {\n var lineContent = this._context.model.getLineContent(position.lineNumber);\n var charBefore = lineContent.charAt(position.column - 2);\n if (!strings.isHighSurrogate(charBefore.charCodeAt(0))) {\n return charBefore;\n }\n }\n return '';\n };\n // --- begin event handlers\n TextAreaHandler.prototype.onConfigurationChanged = function (e) {\n var conf = this._context.configuration.editor;\n if (e.fontInfo) {\n this._fontInfo = conf.fontInfo;\n }\n if (e.viewInfo) {\n this.textArea.setAttribute('aria-label', conf.viewInfo.ariaLabel);\n }\n if (e.layoutInfo) {\n this._contentLeft = conf.layoutInfo.contentLeft;\n this._contentWidth = conf.layoutInfo.contentWidth;\n this._contentHeight = conf.layoutInfo.contentHeight;\n }\n if (e.lineHeight) {\n this._lineHeight = conf.lineHeight;\n }\n if (e.accessibilitySupport) {\n this._accessibilitySupport = conf.accessibilitySupport;\n this._textAreaInput.writeScreenReaderContent('strategy changed');\n }\n if (e.emptySelectionClipboard) {\n this._emptySelectionClipboard = conf.emptySelectionClipboard;\n }\n return true;\n };\n TextAreaHandler.prototype.onCursorStateChanged = function (e) {\n this._selections = e.selections.slice(0);\n this._textAreaInput.writeScreenReaderContent('selection changed');\n return true;\n };\n TextAreaHandler.prototype.onDecorationsChanged = function (e) {\n // true for inline decorations that can end up relayouting text\n return true;\n };\n TextAreaHandler.prototype.onFlushed = function (e) {\n return true;\n };\n TextAreaHandler.prototype.onLinesChanged = function (e) {\n return true;\n };\n TextAreaHandler.prototype.onLinesDeleted = function (e) {\n return true;\n };\n TextAreaHandler.prototype.onLinesInserted = function (e) {\n return true;\n };\n TextAreaHandler.prototype.onScrollChanged = function (e) {\n this._scrollLeft = e.scrollLeft;\n this._scrollTop = e.scrollTop;\n return true;\n };\n TextAreaHandler.prototype.onZonesChanged = function (e) {\n return true;\n };\n // --- end event handlers\n // --- begin view API\n TextAreaHandler.prototype.isFocused = function () {\n return this._textAreaInput.isFocused();\n };\n TextAreaHandler.prototype.focusTextArea = function () {\n this._textAreaInput.focusTextArea();\n };\n TextAreaHandler.prototype.prepareRender = function (ctx) {\n if (this._accessibilitySupport === 2 /* Enabled */) {\n // Do not move the textarea with the cursor, as this generates accessibility events that might confuse screen readers\n // See https://github.com/Microsoft/vscode/issues/26730\n this._primaryCursorVisibleRange = null;\n }\n else {\n var primaryCursorPosition = new Position(this._selections[0].positionLineNumber, this._selections[0].positionColumn);\n this._primaryCursorVisibleRange = ctx.visibleRangeForPosition(primaryCursorPosition);\n }\n };\n TextAreaHandler.prototype.render = function (ctx) {\n this._textAreaInput.writeScreenReaderContent('render');\n this._render();\n };\n TextAreaHandler.prototype._render = function () {\n if (this._visibleTextArea) {\n // The text area is visible for composition reasons\n this._renderInsideEditor(this._visibleTextArea.top - this._scrollTop, this._contentLeft + this._visibleTextArea.left - this._scrollLeft, this._visibleTextArea.width, this._lineHeight, true);\n return;\n }\n if (!this._primaryCursorVisibleRange) {\n // The primary cursor is outside the viewport => place textarea to the top left\n this._renderAtTopLeft();\n return;\n }\n var left = this._contentLeft + this._primaryCursorVisibleRange.left - this._scrollLeft;\n if (left < this._contentLeft || left > this._contentLeft + this._contentWidth) {\n // cursor is outside the viewport\n this._renderAtTopLeft();\n return;\n }\n var top = this._context.viewLayout.getVerticalOffsetForLineNumber(this._selections[0].positionLineNumber) - this._scrollTop;\n if (top < 0 || top > this._contentHeight) {\n // cursor is outside the viewport\n this._renderAtTopLeft();\n return;\n }\n // The primary cursor is in the viewport (at least vertically) => place textarea on the cursor\n this._renderInsideEditor(top, left, canUseZeroSizeTextarea ? 0 : 1, canUseZeroSizeTextarea ? 0 : 1, false);\n };\n TextAreaHandler.prototype._renderInsideEditor = function (top, left, width, height, useEditorFont) {\n var ta = this.textArea;\n var tac = this.textAreaCover;\n if (useEditorFont) {\n Configuration.applyFontInfo(ta, this._fontInfo);\n }\n else {\n ta.setFontSize(1);\n ta.setLineHeight(this._fontInfo.lineHeight);\n }\n ta.setTop(top);\n ta.setLeft(left);\n ta.setWidth(width);\n ta.setHeight(height);\n tac.setTop(0);\n tac.setLeft(0);\n tac.setWidth(0);\n tac.setHeight(0);\n };\n TextAreaHandler.prototype._renderAtTopLeft = function () {\n var ta = this.textArea;\n var tac = this.textAreaCover;\n Configuration.applyFontInfo(ta, this._fontInfo);\n ta.setTop(0);\n ta.setLeft(0);\n tac.setTop(0);\n tac.setLeft(0);\n if (canUseZeroSizeTextarea) {\n ta.setWidth(0);\n ta.setHeight(0);\n tac.setWidth(0);\n tac.setHeight(0);\n return;\n }\n // (in WebKit the textarea is 1px by 1px because it cannot handle input to a 0x0 textarea)\n // specifically, when doing Korean IME, setting the textare to 0x0 breaks IME badly.\n ta.setWidth(1);\n ta.setHeight(1);\n tac.setWidth(1);\n tac.setHeight(1);\n if (this._context.configuration.editor.viewInfo.glyphMargin) {\n tac.setClassName('monaco-editor-background textAreaCover ' + Margin.OUTER_CLASS_NAME);\n }\n else {\n if (this._context.configuration.editor.viewInfo.renderLineNumbers !== 0 /* Off */) {\n tac.setClassName('monaco-editor-background textAreaCover ' + LineNumbersOverlay.CLASS_NAME);\n }\n else {\n tac.setClassName('monaco-editor-background textAreaCover');\n }\n }\n };\n return TextAreaHandler;\n}(ViewPart));\nexport { TextAreaHandler };\nfunction measureText(text, fontInfo) {\n // adjust width by its size\n var canvasElem = document.createElement('canvas');\n var context = canvasElem.getContext('2d');\n context.font = createFontString(fontInfo);\n var metrics = context.measureText(text);\n if (browser.isFirefox) {\n return metrics.width + 2; // +2 for Japanese...\n }\n else {\n return metrics.width;\n }\n}\nfunction createFontString(bareFontInfo) {\n return doCreateFontString('normal', bareFontInfo.fontWeight, bareFontInfo.fontSize, bareFontInfo.lineHeight, bareFontInfo.fontFamily);\n}\nfunction doCreateFontString(fontStyle, fontWeight, fontSize, lineHeight, fontFamily) {\n // The full font syntax is:\n // style | variant | weight | stretch | size/line-height | fontFamily\n // (https://developer.mozilla.org/en-US/docs/Web/CSS/font)\n // But it appears Edge and IE11 cannot properly parse `stretch`.\n return fontStyle + \" normal \" + fontWeight + \" \" + fontSize + \"px / \" + lineHeight + \"px \" + fontFamily;\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nexport function memoize(target, key, descriptor) {\n var fnKey = null;\n var fn = null;\n if (typeof descriptor.value === 'function') {\n fnKey = 'value';\n fn = descriptor.value;\n if (fn.length !== 0) {\n console.warn('Memoize should only be used in functions with zero parameters');\n }\n }\n else if (typeof descriptor.get === 'function') {\n fnKey = 'get';\n fn = descriptor.get;\n }\n if (!fn) {\n throw new Error('not supported');\n }\n var memoizeKey = \"$memoize$\" + key;\n descriptor[fnKey] = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n if (!this.hasOwnProperty(memoizeKey)) {\n Object.defineProperty(this, memoizeKey, {\n configurable: false,\n enumerable: false,\n writable: false,\n value: fn.apply(this, args)\n });\n }\n return this[memoizeKey];\n };\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport * as arrays from '../common/arrays';\nimport { dispose } from '../common/lifecycle';\nimport * as DomUtils from './dom';\nimport { memoize } from '../common/decorators';\nexport var EventType;\n(function (EventType) {\n EventType.Tap = '-monaco-gesturetap';\n EventType.Change = '-monaco-gesturechange';\n EventType.Start = '-monaco-gesturestart';\n EventType.End = '-monaco-gesturesend';\n EventType.Contextmenu = '-monaco-gesturecontextmenu';\n})(EventType || (EventType = {}));\nvar Gesture = /** @class */ (function () {\n function Gesture() {\n var _this = this;\n this.toDispose = [];\n this.activeTouches = {};\n this.handle = null;\n this.targets = [];\n this.toDispose.push(DomUtils.addDisposableListener(document, 'touchstart', function (e) { return _this.onTouchStart(e); }));\n this.toDispose.push(DomUtils.addDisposableListener(document, 'touchend', function (e) { return _this.onTouchEnd(e); }));\n this.toDispose.push(DomUtils.addDisposableListener(document, 'touchmove', function (e) { return _this.onTouchMove(e); }));\n }\n Gesture.addTarget = function (element) {\n if (!Gesture.isTouchDevice()) {\n return;\n }\n if (!Gesture.INSTANCE) {\n Gesture.INSTANCE = new Gesture();\n }\n Gesture.INSTANCE.targets.push(element);\n };\n Gesture.isTouchDevice = function () {\n return 'ontouchstart' in window || navigator.maxTouchPoints > 0 || window.navigator.msMaxTouchPoints > 0;\n };\n Gesture.prototype.dispose = function () {\n if (this.handle) {\n this.handle.dispose();\n dispose(this.toDispose);\n this.handle = null;\n }\n };\n Gesture.prototype.onTouchStart = function (e) {\n var timestamp = Date.now(); // use Date.now() because on FF e.timeStamp is not epoch based.\n if (this.handle) {\n this.handle.dispose();\n this.handle = null;\n }\n for (var i = 0, len = e.targetTouches.length; i < len; i++) {\n var touch = e.targetTouches.item(i);\n this.activeTouches[touch.identifier] = {\n id: touch.identifier,\n initialTarget: touch.target,\n initialTimeStamp: timestamp,\n initialPageX: touch.pageX,\n initialPageY: touch.pageY,\n rollingTimestamps: [timestamp],\n rollingPageX: [touch.pageX],\n rollingPageY: [touch.pageY]\n };\n var evt = this.newGestureEvent(EventType.Start, touch.target);\n evt.pageX = touch.pageX;\n evt.pageY = touch.pageY;\n this.dispatchEvent(evt);\n }\n if (this.dispatched) {\n e.preventDefault();\n e.stopPropagation();\n this.dispatched = false;\n }\n };\n Gesture.prototype.onTouchEnd = function (e) {\n var timestamp = Date.now(); // use Date.now() because on FF e.timeStamp is not epoch based.\n var activeTouchCount = Object.keys(this.activeTouches).length;\n var _loop_1 = function (i, len) {\n var touch = e.changedTouches.item(i);\n if (!this_1.activeTouches.hasOwnProperty(String(touch.identifier))) {\n console.warn('move of an UNKNOWN touch', touch);\n return \"continue\";\n }\n var data = this_1.activeTouches[touch.identifier], holdTime = Date.now() - data.initialTimeStamp;\n if (holdTime < Gesture.HOLD_DELAY\n && Math.abs(data.initialPageX - arrays.tail(data.rollingPageX)) < 30\n && Math.abs(data.initialPageY - arrays.tail(data.rollingPageY)) < 30) {\n var evt = this_1.newGestureEvent(EventType.Tap, data.initialTarget);\n evt.pageX = arrays.tail(data.rollingPageX);\n evt.pageY = arrays.tail(data.rollingPageY);\n this_1.dispatchEvent(evt);\n }\n else if (holdTime >= Gesture.HOLD_DELAY\n && Math.abs(data.initialPageX - arrays.tail(data.rollingPageX)) < 30\n && Math.abs(data.initialPageY - arrays.tail(data.rollingPageY)) < 30) {\n var evt = this_1.newGestureEvent(EventType.Contextmenu, data.initialTarget);\n evt.pageX = arrays.tail(data.rollingPageX);\n evt.pageY = arrays.tail(data.rollingPageY);\n this_1.dispatchEvent(evt);\n }\n else if (activeTouchCount === 1) {\n var finalX = arrays.tail(data.rollingPageX);\n var finalY = arrays.tail(data.rollingPageY);\n var deltaT = arrays.tail(data.rollingTimestamps) - data.rollingTimestamps[0];\n var deltaX = finalX - data.rollingPageX[0];\n var deltaY = finalY - data.rollingPageY[0];\n // We need to get all the dispatch targets on the start of the inertia event\n var dispatchTo = this_1.targets.filter(function (t) { return data.initialTarget instanceof Node && t.contains(data.initialTarget); });\n this_1.inertia(dispatchTo, timestamp, // time now\n Math.abs(deltaX) / deltaT, // speed\n deltaX > 0 ? 1 : -1, // x direction\n finalX, // x now\n Math.abs(deltaY) / deltaT, // y speed\n deltaY > 0 ? 1 : -1, // y direction\n finalY // y now\n );\n }\n this_1.dispatchEvent(this_1.newGestureEvent(EventType.End, data.initialTarget));\n // forget about this touch\n delete this_1.activeTouches[touch.identifier];\n };\n var this_1 = this;\n for (var i = 0, len = e.changedTouches.length; i < len; i++) {\n _loop_1(i, len);\n }\n if (this.dispatched) {\n e.preventDefault();\n e.stopPropagation();\n this.dispatched = false;\n }\n };\n Gesture.prototype.newGestureEvent = function (type, intialTarget) {\n var event = document.createEvent('CustomEvent');\n event.initEvent(type, false, true);\n event.initialTarget = intialTarget;\n return event;\n };\n Gesture.prototype.dispatchEvent = function (event) {\n var _this = this;\n this.targets.forEach(function (target) {\n if (event.initialTarget instanceof Node && target.contains(event.initialTarget)) {\n target.dispatchEvent(event);\n _this.dispatched = true;\n }\n });\n };\n Gesture.prototype.inertia = function (dispatchTo, t1, vX, dirX, x, vY, dirY, y) {\n var _this = this;\n this.handle = DomUtils.scheduleAtNextAnimationFrame(function () {\n var now = Date.now();\n // velocity: old speed + accel_over_time\n var deltaT = now - t1, delta_pos_x = 0, delta_pos_y = 0, stopped = true;\n vX += Gesture.SCROLL_FRICTION * deltaT;\n vY += Gesture.SCROLL_FRICTION * deltaT;\n if (vX > 0) {\n stopped = false;\n delta_pos_x = dirX * vX * deltaT;\n }\n if (vY > 0) {\n stopped = false;\n delta_pos_y = dirY * vY * deltaT;\n }\n // dispatch translation event\n var evt = _this.newGestureEvent(EventType.Change);\n evt.translationX = delta_pos_x;\n evt.translationY = delta_pos_y;\n dispatchTo.forEach(function (d) { return d.dispatchEvent(evt); });\n if (!stopped) {\n _this.inertia(dispatchTo, now, vX, dirX, x + delta_pos_x, vY, dirY, y + delta_pos_y);\n }\n });\n };\n Gesture.prototype.onTouchMove = function (e) {\n var timestamp = Date.now(); // use Date.now() because on FF e.timeStamp is not epoch based.\n for (var i = 0, len = e.changedTouches.length; i < len; i++) {\n var touch = e.changedTouches.item(i);\n if (!this.activeTouches.hasOwnProperty(String(touch.identifier))) {\n console.warn('end of an UNKNOWN touch', touch);\n continue;\n }\n var data = this.activeTouches[touch.identifier];\n var evt = this.newGestureEvent(EventType.Change, data.initialTarget);\n evt.translationX = touch.pageX - arrays.tail(data.rollingPageX);\n evt.translationY = touch.pageY - arrays.tail(data.rollingPageY);\n evt.pageX = touch.pageX;\n evt.pageY = touch.pageY;\n this.dispatchEvent(evt);\n // only keep a few data points, to average the final speed\n if (data.rollingPageX.length > 3) {\n data.rollingPageX.shift();\n data.rollingPageY.shift();\n data.rollingTimestamps.shift();\n }\n data.rollingPageX.push(touch.pageX);\n data.rollingPageY.push(touch.pageY);\n data.rollingTimestamps.push(timestamp);\n }\n if (this.dispatched) {\n e.preventDefault();\n e.stopPropagation();\n this.dispatched = false;\n }\n };\n Gesture.SCROLL_FRICTION = -0.005;\n Gesture.HOLD_DELAY = 700;\n __decorate([\n memoize\n ], Gesture, \"isTouchDevice\", null);\n return Gesture;\n}());\nexport { Gesture };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport * as editorCommon from '../common/editorCommon';\n/**\n * A positioning preference for rendering content widgets.\n */\nexport var ContentWidgetPositionPreference;\n(function (ContentWidgetPositionPreference) {\n /**\n * Place the content widget exactly at a position\n */\n ContentWidgetPositionPreference[ContentWidgetPositionPreference[\"EXACT\"] = 0] = \"EXACT\";\n /**\n * Place the content widget above a position\n */\n ContentWidgetPositionPreference[ContentWidgetPositionPreference[\"ABOVE\"] = 1] = \"ABOVE\";\n /**\n * Place the content widget below a position\n */\n ContentWidgetPositionPreference[ContentWidgetPositionPreference[\"BELOW\"] = 2] = \"BELOW\";\n})(ContentWidgetPositionPreference || (ContentWidgetPositionPreference = {}));\n/**\n * A positioning preference for rendering overlay widgets.\n */\nexport var OverlayWidgetPositionPreference;\n(function (OverlayWidgetPositionPreference) {\n /**\n * Position the overlay widget in the top right corner\n */\n OverlayWidgetPositionPreference[OverlayWidgetPositionPreference[\"TOP_RIGHT_CORNER\"] = 0] = \"TOP_RIGHT_CORNER\";\n /**\n * Position the overlay widget in the bottom right corner\n */\n OverlayWidgetPositionPreference[OverlayWidgetPositionPreference[\"BOTTOM_RIGHT_CORNER\"] = 1] = \"BOTTOM_RIGHT_CORNER\";\n /**\n * Position the overlay widget in the top center\n */\n OverlayWidgetPositionPreference[OverlayWidgetPositionPreference[\"TOP_CENTER\"] = 2] = \"TOP_CENTER\";\n})(OverlayWidgetPositionPreference || (OverlayWidgetPositionPreference = {}));\n/**\n * Type of hit element with the mouse in the editor.\n */\nexport var MouseTargetType;\n(function (MouseTargetType) {\n /**\n * Mouse is on top of an unknown element.\n */\n MouseTargetType[MouseTargetType[\"UNKNOWN\"] = 0] = \"UNKNOWN\";\n /**\n * Mouse is on top of the textarea used for input.\n */\n MouseTargetType[MouseTargetType[\"TEXTAREA\"] = 1] = \"TEXTAREA\";\n /**\n * Mouse is on top of the glyph margin\n */\n MouseTargetType[MouseTargetType[\"GUTTER_GLYPH_MARGIN\"] = 2] = \"GUTTER_GLYPH_MARGIN\";\n /**\n * Mouse is on top of the line numbers\n */\n MouseTargetType[MouseTargetType[\"GUTTER_LINE_NUMBERS\"] = 3] = \"GUTTER_LINE_NUMBERS\";\n /**\n * Mouse is on top of the line decorations\n */\n MouseTargetType[MouseTargetType[\"GUTTER_LINE_DECORATIONS\"] = 4] = \"GUTTER_LINE_DECORATIONS\";\n /**\n * Mouse is on top of the whitespace left in the gutter by a view zone.\n */\n MouseTargetType[MouseTargetType[\"GUTTER_VIEW_ZONE\"] = 5] = \"GUTTER_VIEW_ZONE\";\n /**\n * Mouse is on top of text in the content.\n */\n MouseTargetType[MouseTargetType[\"CONTENT_TEXT\"] = 6] = \"CONTENT_TEXT\";\n /**\n * Mouse is on top of empty space in the content (e.g. after line text or below last line)\n */\n MouseTargetType[MouseTargetType[\"CONTENT_EMPTY\"] = 7] = \"CONTENT_EMPTY\";\n /**\n * Mouse is on top of a view zone in the content.\n */\n MouseTargetType[MouseTargetType[\"CONTENT_VIEW_ZONE\"] = 8] = \"CONTENT_VIEW_ZONE\";\n /**\n * Mouse is on top of a content widget.\n */\n MouseTargetType[MouseTargetType[\"CONTENT_WIDGET\"] = 9] = \"CONTENT_WIDGET\";\n /**\n * Mouse is on top of the decorations overview ruler.\n */\n MouseTargetType[MouseTargetType[\"OVERVIEW_RULER\"] = 10] = \"OVERVIEW_RULER\";\n /**\n * Mouse is on top of a scrollbar.\n */\n MouseTargetType[MouseTargetType[\"SCROLLBAR\"] = 11] = \"SCROLLBAR\";\n /**\n * Mouse is on top of an overlay widget.\n */\n MouseTargetType[MouseTargetType[\"OVERLAY_WIDGET\"] = 12] = \"OVERLAY_WIDGET\";\n /**\n * Mouse is outside of the editor.\n */\n MouseTargetType[MouseTargetType[\"OUTSIDE_EDITOR\"] = 13] = \"OUTSIDE_EDITOR\";\n})(MouseTargetType || (MouseTargetType = {}));\n/**\n *@internal\n */\nexport function isCodeEditor(thing) {\n if (thing && typeof thing.getEditorType === 'function') {\n return thing.getEditorType() === editorCommon.EditorType.ICodeEditor;\n }\n else {\n return false;\n }\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { Disposable, dispose } from '../common/lifecycle';\nimport * as dom from './dom';\nimport { IframeUtils } from './iframe';\nimport { StandardMouseEvent } from './mouseEvent';\nexport function standardMouseMoveMerger(lastEvent, currentEvent) {\n var ev = new StandardMouseEvent(currentEvent);\n ev.preventDefault();\n return {\n leftButton: ev.leftButton,\n posx: ev.posx,\n posy: ev.posy\n };\n}\nvar GlobalMouseMoveMonitor = /** @class */ (function (_super) {\n __extends(GlobalMouseMoveMonitor, _super);\n function GlobalMouseMoveMonitor() {\n var _this = _super.call(this) || this;\n _this.hooks = [];\n _this.mouseMoveEventMerger = null;\n _this.mouseMoveCallback = null;\n _this.onStopCallback = null;\n return _this;\n }\n GlobalMouseMoveMonitor.prototype.dispose = function () {\n this.stopMonitoring(false);\n _super.prototype.dispose.call(this);\n };\n GlobalMouseMoveMonitor.prototype.stopMonitoring = function (invokeStopCallback) {\n if (!this.isMonitoring()) {\n // Not monitoring\n return;\n }\n // Unhook\n this.hooks = dispose(this.hooks);\n this.mouseMoveEventMerger = null;\n this.mouseMoveCallback = null;\n var onStopCallback = this.onStopCallback;\n this.onStopCallback = null;\n if (invokeStopCallback) {\n onStopCallback();\n }\n };\n GlobalMouseMoveMonitor.prototype.isMonitoring = function () {\n return this.hooks.length > 0;\n };\n GlobalMouseMoveMonitor.prototype.startMonitoring = function (mouseMoveEventMerger, mouseMoveCallback, onStopCallback) {\n var _this = this;\n if (this.isMonitoring()) {\n // I am already hooked\n return;\n }\n this.mouseMoveEventMerger = mouseMoveEventMerger;\n this.mouseMoveCallback = mouseMoveCallback;\n this.onStopCallback = onStopCallback;\n var windowChain = IframeUtils.getSameOriginWindowChain();\n for (var i = 0; i < windowChain.length; i++) {\n this.hooks.push(dom.addDisposableThrottledListener(windowChain[i].window.document, 'mousemove', function (data) { return _this.mouseMoveCallback(data); }, function (lastEvent, currentEvent) { return _this.mouseMoveEventMerger(lastEvent, currentEvent); }));\n this.hooks.push(dom.addDisposableListener(windowChain[i].window.document, 'mouseup', function (e) { return _this.stopMonitoring(true); }));\n }\n if (IframeUtils.hasDifferentOriginAncestor()) {\n var lastSameOriginAncestor = windowChain[windowChain.length - 1];\n // We might miss a mouse up if it happens outside the iframe\n // This one is for Chrome\n this.hooks.push(dom.addDisposableListener(lastSameOriginAncestor.window.document, 'mouseout', function (browserEvent) {\n var e = new StandardMouseEvent(browserEvent);\n if (e.target.tagName.toLowerCase() === 'html') {\n _this.stopMonitoring(true);\n }\n }));\n // This one is for FF\n this.hooks.push(dom.addDisposableListener(lastSameOriginAncestor.window.document, 'mouseover', function (browserEvent) {\n var e = new StandardMouseEvent(browserEvent);\n if (e.target.tagName.toLowerCase() === 'html') {\n _this.stopMonitoring(true);\n }\n }));\n // This one is for IE\n this.hooks.push(dom.addDisposableListener(lastSameOriginAncestor.window.document.body, 'mouseleave', function (browserEvent) {\n _this.stopMonitoring(true);\n }));\n }\n };\n return GlobalMouseMoveMonitor;\n}(Disposable));\nexport { GlobalMouseMoveMonitor };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { Disposable } from '../../base/common/lifecycle';\nimport { StandardMouseEvent } from '../../base/browser/mouseEvent';\nimport * as dom from '../../base/browser/dom';\nimport { GlobalMouseMoveMonitor } from '../../base/browser/globalMouseMoveMonitor';\n/**\n * Coordinates relative to the whole document (e.g. mouse event's pageX and pageY)\n */\nvar PageCoordinates = /** @class */ (function () {\n function PageCoordinates(x, y) {\n this.x = x;\n this.y = y;\n }\n PageCoordinates.prototype.toClientCoordinates = function () {\n return new ClientCoordinates(this.x - dom.StandardWindow.scrollX, this.y - dom.StandardWindow.scrollY);\n };\n return PageCoordinates;\n}());\nexport { PageCoordinates };\n/**\n * Coordinates within the application's client area (i.e. origin is document's scroll position).\n *\n * For example, clicking in the top-left corner of the client area will\n * always result in a mouse event with a client.x value of 0, regardless\n * of whether the page is scrolled horizontally.\n */\nvar ClientCoordinates = /** @class */ (function () {\n function ClientCoordinates(clientX, clientY) {\n this.clientX = clientX;\n this.clientY = clientY;\n }\n ClientCoordinates.prototype.toPageCoordinates = function () {\n return new PageCoordinates(this.clientX + dom.StandardWindow.scrollX, this.clientY + dom.StandardWindow.scrollY);\n };\n return ClientCoordinates;\n}());\nexport { ClientCoordinates };\n/**\n * The position of the editor in the page.\n */\nvar EditorPagePosition = /** @class */ (function () {\n function EditorPagePosition(x, y, width, height) {\n this.x = x;\n this.y = y;\n this.width = width;\n this.height = height;\n }\n return EditorPagePosition;\n}());\nexport { EditorPagePosition };\nexport function createEditorPagePosition(editorViewDomNode) {\n var editorPos = dom.getDomNodePagePosition(editorViewDomNode);\n return new EditorPagePosition(editorPos.left, editorPos.top, editorPos.width, editorPos.height);\n}\nvar EditorMouseEvent = /** @class */ (function (_super) {\n __extends(EditorMouseEvent, _super);\n function EditorMouseEvent(e, editorViewDomNode) {\n var _this = _super.call(this, e) || this;\n _this.pos = new PageCoordinates(_this.posx, _this.posy);\n _this.editorPos = createEditorPagePosition(editorViewDomNode);\n return _this;\n }\n return EditorMouseEvent;\n}(StandardMouseEvent));\nexport { EditorMouseEvent };\nvar EditorMouseEventFactory = /** @class */ (function () {\n function EditorMouseEventFactory(editorViewDomNode) {\n this._editorViewDomNode = editorViewDomNode;\n }\n EditorMouseEventFactory.prototype._create = function (e) {\n return new EditorMouseEvent(e, this._editorViewDomNode);\n };\n EditorMouseEventFactory.prototype.onContextMenu = function (target, callback) {\n var _this = this;\n return dom.addDisposableListener(target, 'contextmenu', function (e) {\n callback(_this._create(e));\n });\n };\n EditorMouseEventFactory.prototype.onMouseUp = function (target, callback) {\n var _this = this;\n return dom.addDisposableListener(target, 'mouseup', function (e) {\n callback(_this._create(e));\n });\n };\n EditorMouseEventFactory.prototype.onMouseDown = function (target, callback) {\n var _this = this;\n return dom.addDisposableListener(target, 'mousedown', function (e) {\n callback(_this._create(e));\n });\n };\n EditorMouseEventFactory.prototype.onMouseLeave = function (target, callback) {\n var _this = this;\n return dom.addDisposableNonBubblingMouseOutListener(target, function (e) {\n callback(_this._create(e));\n });\n };\n EditorMouseEventFactory.prototype.onMouseMoveThrottled = function (target, callback, merger, minimumTimeMs) {\n var _this = this;\n var myMerger = function (lastEvent, currentEvent) {\n return merger(lastEvent, _this._create(currentEvent));\n };\n return dom.addDisposableThrottledListener(target, 'mousemove', callback, myMerger, minimumTimeMs);\n };\n return EditorMouseEventFactory;\n}());\nexport { EditorMouseEventFactory };\nvar GlobalEditorMouseMoveMonitor = /** @class */ (function (_super) {\n __extends(GlobalEditorMouseMoveMonitor, _super);\n function GlobalEditorMouseMoveMonitor(editorViewDomNode) {\n var _this = _super.call(this) || this;\n _this._editorViewDomNode = editorViewDomNode;\n _this._globalMouseMoveMonitor = _this._register(new GlobalMouseMoveMonitor());\n _this._keydownListener = null;\n return _this;\n }\n GlobalEditorMouseMoveMonitor.prototype.startMonitoring = function (merger, mouseMoveCallback, onStopCallback) {\n var _this = this;\n // Add a <> keydown event listener that will cancel the monitoring\n // if something other than a modifier key is pressed\n this._keydownListener = dom.addStandardDisposableListener(document, 'keydown', function (e) {\n var kb = e.toKeybinding();\n if (kb.isModifierKey()) {\n // Allow modifier keys\n return;\n }\n _this._globalMouseMoveMonitor.stopMonitoring(true);\n }, true);\n var myMerger = function (lastEvent, currentEvent) {\n return merger(lastEvent, new EditorMouseEvent(currentEvent, _this._editorViewDomNode));\n };\n this._globalMouseMoveMonitor.startMonitoring(myMerger, mouseMoveCallback, function () {\n _this._keydownListener.dispose();\n onStopCallback();\n });\n };\n return GlobalEditorMouseMoveMonitor;\n}(Disposable));\nexport { GlobalEditorMouseMoveMonitor };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport * as strings from '../../../base/common/strings';\nexport var createStringBuilder;\nif (typeof TextDecoder !== 'undefined') {\n createStringBuilder = function (capacity) { return new StringBuilder(capacity); };\n}\nelse {\n createStringBuilder = function (capacity) { return new CompatStringBuilder(); };\n}\nvar StringBuilder = /** @class */ (function () {\n function StringBuilder(capacity) {\n this._decoder = new TextDecoder('UTF-16LE');\n this._capacity = capacity | 0;\n this._buffer = new Uint16Array(this._capacity);\n this._completedStrings = null;\n this._bufferLength = 0;\n }\n StringBuilder.prototype.reset = function () {\n this._completedStrings = null;\n this._bufferLength = 0;\n };\n StringBuilder.prototype.build = function () {\n if (this._completedStrings !== null) {\n this._flushBuffer();\n return this._completedStrings.join('');\n }\n return this._buildBuffer();\n };\n StringBuilder.prototype._buildBuffer = function () {\n if (this._bufferLength === 0) {\n return '';\n }\n var view = new Uint16Array(this._buffer.buffer, 0, this._bufferLength);\n return this._decoder.decode(view);\n };\n StringBuilder.prototype._flushBuffer = function () {\n var bufferString = this._buildBuffer();\n this._bufferLength = 0;\n if (this._completedStrings === null) {\n this._completedStrings = [bufferString];\n }\n else {\n this._completedStrings[this._completedStrings.length] = bufferString;\n }\n };\n StringBuilder.prototype.write1 = function (charCode) {\n var remainingSpace = this._capacity - this._bufferLength;\n if (remainingSpace <= 1) {\n if (remainingSpace === 0 || strings.isHighSurrogate(charCode)) {\n this._flushBuffer();\n }\n }\n this._buffer[this._bufferLength++] = charCode;\n };\n StringBuilder.prototype.appendASCII = function (charCode) {\n if (this._bufferLength === this._capacity) {\n // buffer is full\n this._flushBuffer();\n }\n this._buffer[this._bufferLength++] = charCode;\n };\n StringBuilder.prototype.appendASCIIString = function (str) {\n var strLen = str.length;\n if (this._bufferLength + strLen >= this._capacity) {\n // This string does not fit in the remaining buffer space\n this._flushBuffer();\n this._completedStrings[this._completedStrings.length] = str;\n return;\n }\n for (var i = 0; i < strLen; i++) {\n this._buffer[this._bufferLength++] = str.charCodeAt(i);\n }\n };\n return StringBuilder;\n}());\nvar CompatStringBuilder = /** @class */ (function () {\n function CompatStringBuilder() {\n this._pieces = [];\n this._piecesLen = 0;\n }\n CompatStringBuilder.prototype.reset = function () {\n this._pieces = [];\n this._piecesLen = 0;\n };\n CompatStringBuilder.prototype.build = function () {\n return this._pieces.join('');\n };\n CompatStringBuilder.prototype.write1 = function (charCode) {\n this._pieces[this._piecesLen++] = String.fromCharCode(charCode);\n };\n CompatStringBuilder.prototype.appendASCII = function (charCode) {\n this._pieces[this._piecesLen++] = String.fromCharCode(charCode);\n };\n CompatStringBuilder.prototype.appendASCIIString = function (str) {\n this._pieces[this._piecesLen++] = str;\n };\n return CompatStringBuilder;\n}());\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport * as strings from '../../../base/common/strings';\nvar LineDecoration = /** @class */ (function () {\n function LineDecoration(startColumn, endColumn, className, type) {\n this.startColumn = startColumn;\n this.endColumn = endColumn;\n this.className = className;\n this.type = type;\n }\n LineDecoration._equals = function (a, b) {\n return (a.startColumn === b.startColumn\n && a.endColumn === b.endColumn\n && a.className === b.className\n && a.type === b.type);\n };\n LineDecoration.equalsArr = function (a, b) {\n var aLen = a.length;\n var bLen = b.length;\n if (aLen !== bLen) {\n return false;\n }\n for (var i = 0; i < aLen; i++) {\n if (!LineDecoration._equals(a[i], b[i])) {\n return false;\n }\n }\n return true;\n };\n LineDecoration.filter = function (lineDecorations, lineNumber, minLineColumn, maxLineColumn) {\n if (lineDecorations.length === 0) {\n return [];\n }\n var result = [], resultLen = 0;\n for (var i = 0, len = lineDecorations.length; i < len; i++) {\n var d = lineDecorations[i];\n var range = d.range;\n if (range.endLineNumber < lineNumber || range.startLineNumber > lineNumber) {\n // Ignore decorations that sit outside this line\n continue;\n }\n if (range.isEmpty() && (d.type === 0 /* Regular */ || d.type === 3 /* RegularAffectingLetterSpacing */)) {\n // Ignore empty range decorations\n continue;\n }\n var startColumn = (range.startLineNumber === lineNumber ? range.startColumn : minLineColumn);\n var endColumn = (range.endLineNumber === lineNumber ? range.endColumn : maxLineColumn);\n result[resultLen++] = new LineDecoration(startColumn, endColumn, d.inlineClassName, d.type);\n }\n return result;\n };\n LineDecoration.compare = function (a, b) {\n if (a.startColumn === b.startColumn) {\n if (a.endColumn === b.endColumn) {\n if (a.className < b.className) {\n return -1;\n }\n if (a.className > b.className) {\n return 1;\n }\n return 0;\n }\n return a.endColumn - b.endColumn;\n }\n return a.startColumn - b.startColumn;\n };\n return LineDecoration;\n}());\nexport { LineDecoration };\nvar DecorationSegment = /** @class */ (function () {\n function DecorationSegment(startOffset, endOffset, className) {\n this.startOffset = startOffset;\n this.endOffset = endOffset;\n this.className = className;\n }\n return DecorationSegment;\n}());\nexport { DecorationSegment };\nvar Stack = /** @class */ (function () {\n function Stack() {\n this.stopOffsets = [];\n this.classNames = [];\n this.count = 0;\n }\n Stack.prototype.consumeLowerThan = function (maxStopOffset, nextStartOffset, result) {\n while (this.count > 0 && this.stopOffsets[0] < maxStopOffset) {\n var i = 0;\n // Take all equal stopping offsets\n while (i + 1 < this.count && this.stopOffsets[i] === this.stopOffsets[i + 1]) {\n i++;\n }\n // Basically we are consuming the first i + 1 elements of the stack\n result.push(new DecorationSegment(nextStartOffset, this.stopOffsets[i], this.classNames.join(' ')));\n nextStartOffset = this.stopOffsets[i] + 1;\n // Consume them\n this.stopOffsets.splice(0, i + 1);\n this.classNames.splice(0, i + 1);\n this.count -= (i + 1);\n }\n if (this.count > 0 && nextStartOffset < maxStopOffset) {\n result.push(new DecorationSegment(nextStartOffset, maxStopOffset - 1, this.classNames.join(' ')));\n nextStartOffset = maxStopOffset;\n }\n return nextStartOffset;\n };\n Stack.prototype.insert = function (stopOffset, className) {\n if (this.count === 0 || this.stopOffsets[this.count - 1] <= stopOffset) {\n // Insert at the end\n this.stopOffsets.push(stopOffset);\n this.classNames.push(className);\n }\n else {\n // Find the insertion position for `stopOffset`\n for (var i = 0; i < this.count; i++) {\n if (this.stopOffsets[i] >= stopOffset) {\n this.stopOffsets.splice(i, 0, stopOffset);\n this.classNames.splice(i, 0, className);\n break;\n }\n }\n }\n this.count++;\n return;\n };\n return Stack;\n}());\nvar LineDecorationsNormalizer = /** @class */ (function () {\n function LineDecorationsNormalizer() {\n }\n /**\n * Normalize line decorations. Overlapping decorations will generate multiple segments\n */\n LineDecorationsNormalizer.normalize = function (lineContent, lineDecorations) {\n if (lineDecorations.length === 0) {\n return [];\n }\n var result = [];\n var stack = new Stack();\n var nextStartOffset = 0;\n for (var i = 0, len = lineDecorations.length; i < len; i++) {\n var d = lineDecorations[i];\n var startColumn = d.startColumn;\n var endColumn = d.endColumn;\n var className = d.className;\n // If the position would end up in the middle of a high-low surrogate pair, we move it to before the pair\n if (startColumn > 1) {\n var charCodeBefore = lineContent.charCodeAt(startColumn - 2);\n if (strings.isHighSurrogate(charCodeBefore)) {\n startColumn--;\n }\n }\n if (endColumn > 1) {\n var charCodeBefore = lineContent.charCodeAt(endColumn - 2);\n if (strings.isHighSurrogate(charCodeBefore)) {\n endColumn--;\n }\n }\n var currentStartOffset = startColumn - 1;\n var currentEndOffset = endColumn - 2;\n nextStartOffset = stack.consumeLowerThan(currentStartOffset, nextStartOffset, result);\n if (stack.count === 0) {\n nextStartOffset = currentStartOffset;\n }\n stack.insert(currentEndOffset, className);\n }\n stack.consumeLowerThan(1073741824 /* MAX_SAFE_SMALL_INTEGER */, nextStartOffset, result);\n return result;\n };\n return LineDecorationsNormalizer;\n}());\nexport { LineDecorationsNormalizer };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport { LineDecoration, LineDecorationsNormalizer } from './lineDecorations';\nimport * as strings from '../../../base/common/strings';\nimport { createStringBuilder } from '../core/stringBuilder';\nvar LinePart = /** @class */ (function () {\n function LinePart(endIndex, type) {\n this.endIndex = endIndex;\n this.type = type;\n }\n return LinePart;\n}());\nvar RenderLineInput = /** @class */ (function () {\n function RenderLineInput(useMonospaceOptimizations, lineContent, continuesWithWrappedLine, isBasicASCII, containsRTL, fauxIndentLength, lineTokens, lineDecorations, tabSize, spaceWidth, stopRenderingLineAfter, renderWhitespace, renderControlCharacters, fontLigatures) {\n this.useMonospaceOptimizations = useMonospaceOptimizations;\n this.lineContent = lineContent;\n this.continuesWithWrappedLine = continuesWithWrappedLine;\n this.isBasicASCII = isBasicASCII;\n this.containsRTL = containsRTL;\n this.fauxIndentLength = fauxIndentLength;\n this.lineTokens = lineTokens;\n this.lineDecorations = lineDecorations;\n this.tabSize = tabSize;\n this.spaceWidth = spaceWidth;\n this.stopRenderingLineAfter = stopRenderingLineAfter;\n this.renderWhitespace = (renderWhitespace === 'all'\n ? 2 /* All */\n : renderWhitespace === 'boundary'\n ? 1 /* Boundary */\n : 0 /* None */);\n this.renderControlCharacters = renderControlCharacters;\n this.fontLigatures = fontLigatures;\n }\n RenderLineInput.prototype.equals = function (other) {\n return (this.useMonospaceOptimizations === other.useMonospaceOptimizations\n && this.lineContent === other.lineContent\n && this.continuesWithWrappedLine === other.continuesWithWrappedLine\n && this.isBasicASCII === other.isBasicASCII\n && this.containsRTL === other.containsRTL\n && this.fauxIndentLength === other.fauxIndentLength\n && this.tabSize === other.tabSize\n && this.spaceWidth === other.spaceWidth\n && this.stopRenderingLineAfter === other.stopRenderingLineAfter\n && this.renderWhitespace === other.renderWhitespace\n && this.renderControlCharacters === other.renderControlCharacters\n && this.fontLigatures === other.fontLigatures\n && LineDecoration.equalsArr(this.lineDecorations, other.lineDecorations)\n && this.lineTokens.equals(other.lineTokens));\n };\n return RenderLineInput;\n}());\nexport { RenderLineInput };\n/**\n * Provides a both direction mapping between a line's character and its rendered position.\n */\nvar CharacterMapping = /** @class */ (function () {\n function CharacterMapping(length, partCount) {\n this.length = length;\n this._data = new Uint32Array(this.length);\n this._absoluteOffsets = new Uint32Array(this.length);\n }\n CharacterMapping.getPartIndex = function (partData) {\n return (partData & 4294901760 /* PART_INDEX_MASK */) >>> 16 /* PART_INDEX_OFFSET */;\n };\n CharacterMapping.getCharIndex = function (partData) {\n return (partData & 65535 /* CHAR_INDEX_MASK */) >>> 0 /* CHAR_INDEX_OFFSET */;\n };\n CharacterMapping.prototype.setPartData = function (charOffset, partIndex, charIndex, partAbsoluteOffset) {\n var partData = ((partIndex << 16 /* PART_INDEX_OFFSET */)\n | (charIndex << 0 /* CHAR_INDEX_OFFSET */)) >>> 0;\n this._data[charOffset] = partData;\n this._absoluteOffsets[charOffset] = partAbsoluteOffset + charIndex;\n };\n CharacterMapping.prototype.getAbsoluteOffsets = function () {\n return this._absoluteOffsets;\n };\n CharacterMapping.prototype.charOffsetToPartData = function (charOffset) {\n if (this.length === 0) {\n return 0;\n }\n if (charOffset < 0) {\n return this._data[0];\n }\n if (charOffset >= this.length) {\n return this._data[this.length - 1];\n }\n return this._data[charOffset];\n };\n CharacterMapping.prototype.partDataToCharOffset = function (partIndex, partLength, charIndex) {\n if (this.length === 0) {\n return 0;\n }\n var searchEntry = ((partIndex << 16 /* PART_INDEX_OFFSET */)\n | (charIndex << 0 /* CHAR_INDEX_OFFSET */)) >>> 0;\n var min = 0;\n var max = this.length - 1;\n while (min + 1 < max) {\n var mid = ((min + max) >>> 1);\n var midEntry = this._data[mid];\n if (midEntry === searchEntry) {\n return mid;\n }\n else if (midEntry > searchEntry) {\n max = mid;\n }\n else {\n min = mid;\n }\n }\n if (min === max) {\n return min;\n }\n var minEntry = this._data[min];\n var maxEntry = this._data[max];\n if (minEntry === searchEntry) {\n return min;\n }\n if (maxEntry === searchEntry) {\n return max;\n }\n var minPartIndex = CharacterMapping.getPartIndex(minEntry);\n var minCharIndex = CharacterMapping.getCharIndex(minEntry);\n var maxPartIndex = CharacterMapping.getPartIndex(maxEntry);\n var maxCharIndex;\n if (minPartIndex !== maxPartIndex) {\n // sitting between parts\n maxCharIndex = partLength;\n }\n else {\n maxCharIndex = CharacterMapping.getCharIndex(maxEntry);\n }\n var minEntryDistance = charIndex - minCharIndex;\n var maxEntryDistance = maxCharIndex - charIndex;\n if (minEntryDistance <= maxEntryDistance) {\n return min;\n }\n return max;\n };\n return CharacterMapping;\n}());\nexport { CharacterMapping };\nvar RenderLineOutput = /** @class */ (function () {\n function RenderLineOutput(characterMapping, containsRTL, containsForeignElements) {\n this.characterMapping = characterMapping;\n this.containsRTL = containsRTL;\n this.containsForeignElements = containsForeignElements;\n }\n return RenderLineOutput;\n}());\nexport { RenderLineOutput };\nexport function renderViewLine(input, sb) {\n if (input.lineContent.length === 0) {\n var containsForeignElements = 0 /* None */;\n // This is basically for IE's hit test to work\n var content = '\\u00a0';\n if (input.lineDecorations.length > 0) {\n // This line is empty, but it contains inline decorations\n var classNames = [];\n for (var i = 0, len = input.lineDecorations.length; i < len; i++) {\n var lineDecoration = input.lineDecorations[i];\n if (lineDecoration.type === 1 /* Before */) {\n classNames.push(input.lineDecorations[i].className);\n containsForeignElements |= 1 /* Before */;\n }\n if (lineDecoration.type === 2 /* After */) {\n classNames.push(input.lineDecorations[i].className);\n containsForeignElements |= 2 /* After */;\n }\n }\n if (containsForeignElements !== 0 /* None */) {\n content = \"\";\n }\n }\n sb.appendASCIIString(content);\n return new RenderLineOutput(new CharacterMapping(0, 0), false, containsForeignElements);\n }\n return _renderLine(resolveRenderLineInput(input), sb);\n}\nvar RenderLineOutput2 = /** @class */ (function () {\n function RenderLineOutput2(characterMapping, html, containsRTL, containsForeignElements) {\n this.characterMapping = characterMapping;\n this.html = html;\n this.containsRTL = containsRTL;\n this.containsForeignElements = containsForeignElements;\n }\n return RenderLineOutput2;\n}());\nexport { RenderLineOutput2 };\nexport function renderViewLine2(input) {\n var sb = createStringBuilder(10000);\n var out = renderViewLine(input, sb);\n return new RenderLineOutput2(out.characterMapping, sb.build(), out.containsRTL, out.containsForeignElements);\n}\nvar ResolvedRenderLineInput = /** @class */ (function () {\n function ResolvedRenderLineInput(fontIsMonospace, lineContent, len, isOverflowing, parts, containsForeignElements, tabSize, containsRTL, spaceWidth, renderWhitespace, renderControlCharacters) {\n this.fontIsMonospace = fontIsMonospace;\n this.lineContent = lineContent;\n this.len = len;\n this.isOverflowing = isOverflowing;\n this.parts = parts;\n this.containsForeignElements = containsForeignElements;\n this.tabSize = tabSize;\n this.containsRTL = containsRTL;\n this.spaceWidth = spaceWidth;\n this.renderWhitespace = renderWhitespace;\n this.renderControlCharacters = renderControlCharacters;\n //\n }\n return ResolvedRenderLineInput;\n}());\nfunction resolveRenderLineInput(input) {\n var useMonospaceOptimizations = input.useMonospaceOptimizations;\n var lineContent = input.lineContent;\n var isOverflowing;\n var len;\n if (input.stopRenderingLineAfter !== -1 && input.stopRenderingLineAfter < lineContent.length) {\n isOverflowing = true;\n len = input.stopRenderingLineAfter;\n }\n else {\n isOverflowing = false;\n len = lineContent.length;\n }\n var tokens = transformAndRemoveOverflowing(input.lineTokens, input.fauxIndentLength, len);\n if (input.renderWhitespace === 2 /* All */ || input.renderWhitespace === 1 /* Boundary */) {\n tokens = _applyRenderWhitespace(lineContent, len, input.continuesWithWrappedLine, tokens, input.fauxIndentLength, input.tabSize, useMonospaceOptimizations, input.renderWhitespace === 1 /* Boundary */);\n }\n var containsForeignElements = 0 /* None */;\n if (input.lineDecorations.length > 0) {\n for (var i = 0, len_1 = input.lineDecorations.length; i < len_1; i++) {\n var lineDecoration = input.lineDecorations[i];\n if (lineDecoration.type === 3 /* RegularAffectingLetterSpacing */) {\n // Pretend there are foreign elements... although not 100% accurate.\n containsForeignElements |= 1 /* Before */;\n }\n else if (lineDecoration.type === 1 /* Before */) {\n containsForeignElements |= 1 /* Before */;\n }\n else if (lineDecoration.type === 2 /* After */) {\n containsForeignElements |= 2 /* After */;\n }\n }\n tokens = _applyInlineDecorations(lineContent, len, tokens, input.lineDecorations);\n }\n if (input.isBasicASCII && !input.fontLigatures) {\n tokens = splitLargeTokens(lineContent, tokens);\n }\n return new ResolvedRenderLineInput(useMonospaceOptimizations, lineContent, len, isOverflowing, tokens, containsForeignElements, input.tabSize, input.containsRTL, input.spaceWidth, input.renderWhitespace, input.renderControlCharacters);\n}\n/**\n * In the rendering phase, characters are always looped until token.endIndex.\n * Ensure that all tokens end before `len` and the last one ends precisely at `len`.\n */\nfunction transformAndRemoveOverflowing(tokens, fauxIndentLength, len) {\n var result = [], resultLen = 0;\n // The faux indent part of the line should have no token type\n if (fauxIndentLength > 0) {\n result[resultLen++] = new LinePart(fauxIndentLength, '');\n }\n for (var tokenIndex = 0, tokensLen = tokens.getCount(); tokenIndex < tokensLen; tokenIndex++) {\n var endIndex = tokens.getEndOffset(tokenIndex);\n if (endIndex <= fauxIndentLength) {\n // The faux indent part of the line should have no token type\n continue;\n }\n var type = tokens.getClassName(tokenIndex);\n if (endIndex >= len) {\n result[resultLen++] = new LinePart(len, type);\n break;\n }\n result[resultLen++] = new LinePart(endIndex, type);\n }\n return result;\n}\n/**\n * See https://github.com/Microsoft/vscode/issues/6885.\n * It appears that having very large spans causes very slow reading of character positions.\n * So here we try to avoid that.\n */\nfunction splitLargeTokens(lineContent, tokens) {\n var lastTokenEndIndex = 0;\n var result = [], resultLen = 0;\n for (var i = 0, len = tokens.length; i < len; i++) {\n var token = tokens[i];\n var tokenEndIndex = token.endIndex;\n var diff = (tokenEndIndex - lastTokenEndIndex);\n if (diff > 50 /* LongToken */) {\n var tokenType = token.type;\n var piecesCount = Math.ceil(diff / 50 /* LongToken */);\n for (var j = 1; j < piecesCount; j++) {\n var pieceEndIndex = lastTokenEndIndex + (j * 50 /* LongToken */);\n result[resultLen++] = new LinePart(pieceEndIndex, tokenType);\n }\n result[resultLen++] = new LinePart(tokenEndIndex, tokenType);\n }\n else {\n result[resultLen++] = token;\n }\n lastTokenEndIndex = tokenEndIndex;\n }\n return result;\n}\n/**\n * Whitespace is rendered by \"replacing\" tokens with a special-purpose `vs-whitespace` type that is later recognized in the rendering phase.\n * Moreover, a token is created for every visual indent because on some fonts the glyphs used for rendering whitespace (→ or ·) do not have the same width as  .\n * The rendering phase will generate `style=\"width:...\"` for these tokens.\n */\nfunction _applyRenderWhitespace(lineContent, len, continuesWithWrappedLine, tokens, fauxIndentLength, tabSize, useMonospaceOptimizations, onlyBoundary) {\n var result = [], resultLen = 0;\n var tokenIndex = 0;\n var tokenType = tokens[tokenIndex].type;\n var tokenEndIndex = tokens[tokenIndex].endIndex;\n var firstNonWhitespaceIndex = strings.firstNonWhitespaceIndex(lineContent);\n var lastNonWhitespaceIndex;\n if (firstNonWhitespaceIndex === -1) {\n // The entire line is whitespace\n firstNonWhitespaceIndex = len;\n lastNonWhitespaceIndex = len;\n }\n else {\n lastNonWhitespaceIndex = strings.lastNonWhitespaceIndex(lineContent);\n }\n var tmpIndent = 0;\n for (var charIndex = 0; charIndex < fauxIndentLength; charIndex++) {\n var chCode = lineContent.charCodeAt(charIndex);\n if (chCode === 9 /* Tab */) {\n tmpIndent = tabSize;\n }\n else if (strings.isFullWidthCharacter(chCode)) {\n tmpIndent += 2;\n }\n else {\n tmpIndent++;\n }\n }\n tmpIndent = tmpIndent % tabSize;\n var wasInWhitespace = false;\n for (var charIndex = fauxIndentLength; charIndex < len; charIndex++) {\n var chCode = lineContent.charCodeAt(charIndex);\n var isInWhitespace = void 0;\n if (charIndex < firstNonWhitespaceIndex || charIndex > lastNonWhitespaceIndex) {\n // in leading or trailing whitespace\n isInWhitespace = true;\n }\n else if (chCode === 9 /* Tab */) {\n // a tab character is rendered both in all and boundary cases\n isInWhitespace = true;\n }\n else if (chCode === 32 /* Space */) {\n // hit a space character\n if (onlyBoundary) {\n // rendering only boundary whitespace\n if (wasInWhitespace) {\n isInWhitespace = true;\n }\n else {\n var nextChCode = (charIndex + 1 < len ? lineContent.charCodeAt(charIndex + 1) : 0 /* Null */);\n isInWhitespace = (nextChCode === 32 /* Space */ || nextChCode === 9 /* Tab */);\n }\n }\n else {\n isInWhitespace = true;\n }\n }\n else {\n isInWhitespace = false;\n }\n if (wasInWhitespace) {\n // was in whitespace token\n if (!isInWhitespace || (!useMonospaceOptimizations && tmpIndent >= tabSize)) {\n // leaving whitespace token or entering a new indent\n result[resultLen++] = new LinePart(charIndex, 'vs-whitespace');\n tmpIndent = tmpIndent % tabSize;\n }\n }\n else {\n // was in regular token\n if (charIndex === tokenEndIndex || (isInWhitespace && charIndex > fauxIndentLength)) {\n result[resultLen++] = new LinePart(charIndex, tokenType);\n tmpIndent = tmpIndent % tabSize;\n }\n }\n if (chCode === 9 /* Tab */) {\n tmpIndent = tabSize;\n }\n else if (strings.isFullWidthCharacter(chCode)) {\n tmpIndent += 2;\n }\n else {\n tmpIndent++;\n }\n wasInWhitespace = isInWhitespace;\n if (charIndex === tokenEndIndex) {\n tokenIndex++;\n tokenType = tokens[tokenIndex].type;\n tokenEndIndex = tokens[tokenIndex].endIndex;\n }\n }\n var generateWhitespace = false;\n if (wasInWhitespace) {\n // was in whitespace token\n if (continuesWithWrappedLine && onlyBoundary) {\n var lastCharCode = (len > 0 ? lineContent.charCodeAt(len - 1) : 0 /* Null */);\n var prevCharCode = (len > 1 ? lineContent.charCodeAt(len - 2) : 0 /* Null */);\n var isSingleTrailingSpace = (lastCharCode === 32 /* Space */ && (prevCharCode !== 32 /* Space */ && prevCharCode !== 9 /* Tab */));\n if (!isSingleTrailingSpace) {\n generateWhitespace = true;\n }\n }\n else {\n generateWhitespace = true;\n }\n }\n result[resultLen++] = new LinePart(len, generateWhitespace ? 'vs-whitespace' : tokenType);\n return result;\n}\n/**\n * Inline decorations are \"merged\" on top of tokens.\n * Special care must be taken when multiple inline decorations are at play and they overlap.\n */\nfunction _applyInlineDecorations(lineContent, len, tokens, _lineDecorations) {\n _lineDecorations.sort(LineDecoration.compare);\n var lineDecorations = LineDecorationsNormalizer.normalize(lineContent, _lineDecorations);\n var lineDecorationsLen = lineDecorations.length;\n var lineDecorationIndex = 0;\n var result = [], resultLen = 0, lastResultEndIndex = 0;\n for (var tokenIndex = 0, len_2 = tokens.length; tokenIndex < len_2; tokenIndex++) {\n var token = tokens[tokenIndex];\n var tokenEndIndex = token.endIndex;\n var tokenType = token.type;\n while (lineDecorationIndex < lineDecorationsLen && lineDecorations[lineDecorationIndex].startOffset < tokenEndIndex) {\n var lineDecoration = lineDecorations[lineDecorationIndex];\n if (lineDecoration.startOffset > lastResultEndIndex) {\n lastResultEndIndex = lineDecoration.startOffset;\n result[resultLen++] = new LinePart(lastResultEndIndex, tokenType);\n }\n if (lineDecoration.endOffset + 1 <= tokenEndIndex) {\n // This line decoration ends before this token ends\n lastResultEndIndex = lineDecoration.endOffset + 1;\n result[resultLen++] = new LinePart(lastResultEndIndex, tokenType + ' ' + lineDecoration.className);\n lineDecorationIndex++;\n }\n else {\n // This line decoration continues on to the next token\n lastResultEndIndex = tokenEndIndex;\n result[resultLen++] = new LinePart(lastResultEndIndex, tokenType + ' ' + lineDecoration.className);\n break;\n }\n }\n if (tokenEndIndex > lastResultEndIndex) {\n lastResultEndIndex = tokenEndIndex;\n result[resultLen++] = new LinePart(lastResultEndIndex, tokenType);\n }\n }\n var lastTokenEndIndex = tokens[tokens.length - 1].endIndex;\n if (lineDecorationIndex < lineDecorationsLen && lineDecorations[lineDecorationIndex].startOffset === lastTokenEndIndex) {\n var classNames = [];\n while (lineDecorationIndex < lineDecorationsLen && lineDecorations[lineDecorationIndex].startOffset === lastTokenEndIndex) {\n classNames.push(lineDecorations[lineDecorationIndex].className);\n lineDecorationIndex++;\n }\n result[resultLen++] = new LinePart(lastResultEndIndex, classNames.join(' '));\n }\n return result;\n}\n/**\n * This function is on purpose not split up into multiple functions to allow runtime type inference (i.e. performance reasons).\n * Notice how all the needed data is fully resolved and passed in (i.e. no other calls).\n */\nfunction _renderLine(input, sb) {\n var fontIsMonospace = input.fontIsMonospace;\n var containsForeignElements = input.containsForeignElements;\n var lineContent = input.lineContent;\n var len = input.len;\n var isOverflowing = input.isOverflowing;\n var parts = input.parts;\n var tabSize = input.tabSize;\n var containsRTL = input.containsRTL;\n var spaceWidth = input.spaceWidth;\n var renderWhitespace = input.renderWhitespace;\n var renderControlCharacters = input.renderControlCharacters;\n var characterMapping = new CharacterMapping(len + 1, parts.length);\n var charIndex = 0;\n var tabsCharDelta = 0;\n var charOffsetInPart = 0;\n var prevPartContentCnt = 0;\n var partAbsoluteOffset = 0;\n sb.appendASCIIString('');\n for (var partIndex = 0, tokensLen = parts.length; partIndex < tokensLen; partIndex++) {\n partAbsoluteOffset += prevPartContentCnt;\n var part = parts[partIndex];\n var partEndIndex = part.endIndex;\n var partType = part.type;\n var partRendersWhitespace = (renderWhitespace !== 0 /* None */ && (partType.indexOf('vs-whitespace') >= 0));\n charOffsetInPart = 0;\n sb.appendASCIIString(' 0) {\n if (insertSpacesCount > 1) {\n sb.write1(0x2192); // RIGHTWARDS ARROW\n }\n else {\n sb.write1(0xffeb); // HALFWIDTH RIGHTWARDS ARROW\n }\n insertSpacesCount--;\n }\n while (insertSpacesCount > 0) {\n sb.write1(0xA0); //  \n insertSpacesCount--;\n }\n }\n else {\n // must be CharCode.Space\n sb.write1(0xb7); // ·\n }\n charOffsetInPart++;\n }\n prevPartContentCnt = partContentCnt;\n }\n else {\n var partContentCnt = 0;\n if (containsRTL) {\n sb.appendASCIIString(' dir=\"ltr\"');\n }\n sb.appendASCII(62 /* GreaterThan */);\n for (; charIndex < partEndIndex; charIndex++) {\n characterMapping.setPartData(charIndex, partIndex, charOffsetInPart, partAbsoluteOffset);\n var charCode = lineContent.charCodeAt(charIndex);\n switch (charCode) {\n case 9 /* Tab */:\n var insertSpacesCount = tabSize - (charIndex + tabsCharDelta) % tabSize;\n tabsCharDelta += insertSpacesCount - 1;\n charOffsetInPart += insertSpacesCount - 1;\n while (insertSpacesCount > 0) {\n sb.write1(0xA0); //  \n partContentCnt++;\n insertSpacesCount--;\n }\n break;\n case 32 /* Space */:\n sb.write1(0xA0); //  \n partContentCnt++;\n break;\n case 60 /* LessThan */:\n sb.appendASCIIString('<');\n partContentCnt++;\n break;\n case 62 /* GreaterThan */:\n sb.appendASCIIString('>');\n partContentCnt++;\n break;\n case 38 /* Ampersand */:\n sb.appendASCIIString('&');\n partContentCnt++;\n break;\n case 0 /* Null */:\n sb.appendASCIIString('�');\n partContentCnt++;\n break;\n case 65279 /* UTF8_BOM */:\n case 8232 /* LINE_SEPARATOR_2028 */:\n sb.write1(0xfffd);\n partContentCnt++;\n break;\n default:\n if (strings.isFullWidthCharacter(charCode)) {\n tabsCharDelta++;\n }\n if (renderControlCharacters && charCode < 32) {\n sb.write1(9216 + charCode);\n partContentCnt++;\n }\n else {\n sb.write1(charCode);\n partContentCnt++;\n }\n }\n charOffsetInPart++;\n }\n prevPartContentCnt = partContentCnt;\n }\n sb.appendASCIIString('');\n }\n // When getting client rects for the last character, we will position the\n // text range at the end of the span, insteaf of at the beginning of next span\n characterMapping.setPartData(len, parts.length - 1, charOffsetInPart, partAbsoluteOffset);\n if (isOverflowing) {\n sb.appendASCIIString('');\n }\n sb.appendASCIIString('');\n return new RenderLineOutput(characterMapping, containsRTL, containsForeignElements);\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { Range } from '../core/range';\nvar RestrictedRenderingContext = /** @class */ (function () {\n function RestrictedRenderingContext(viewLayout, viewportData) {\n this._viewLayout = viewLayout;\n this.viewportData = viewportData;\n this.scrollWidth = this._viewLayout.getScrollWidth();\n this.scrollHeight = this._viewLayout.getScrollHeight();\n this.visibleRange = this.viewportData.visibleRange;\n this.bigNumbersDelta = this.viewportData.bigNumbersDelta;\n var vInfo = this._viewLayout.getCurrentViewport();\n this.scrollTop = vInfo.top;\n this.scrollLeft = vInfo.left;\n this.viewportWidth = vInfo.width;\n this.viewportHeight = vInfo.height;\n }\n RestrictedRenderingContext.prototype.getScrolledTopFromAbsoluteTop = function (absoluteTop) {\n return absoluteTop - this.scrollTop;\n };\n RestrictedRenderingContext.prototype.getVerticalOffsetForLineNumber = function (lineNumber) {\n return this._viewLayout.getVerticalOffsetForLineNumber(lineNumber);\n };\n RestrictedRenderingContext.prototype.getDecorationsInViewport = function () {\n return this.viewportData.getDecorationsInViewport();\n };\n return RestrictedRenderingContext;\n}());\nexport { RestrictedRenderingContext };\nvar RenderingContext = /** @class */ (function (_super) {\n __extends(RenderingContext, _super);\n function RenderingContext(viewLayout, viewportData, viewLines) {\n var _this = _super.call(this, viewLayout, viewportData) || this;\n _this._viewLines = viewLines;\n return _this;\n }\n RenderingContext.prototype.linesVisibleRangesForRange = function (range, includeNewLines) {\n return this._viewLines.linesVisibleRangesForRange(range, includeNewLines);\n };\n RenderingContext.prototype.visibleRangeForPosition = function (position) {\n var visibleRanges = this._viewLines.visibleRangesForRange2(new Range(position.lineNumber, position.column, position.lineNumber, position.column));\n if (!visibleRanges) {\n return null;\n }\n return visibleRanges[0];\n };\n return RenderingContext;\n}(RestrictedRenderingContext));\nexport { RenderingContext };\nvar LineVisibleRanges = /** @class */ (function () {\n function LineVisibleRanges(lineNumber, ranges) {\n this.lineNumber = lineNumber;\n this.ranges = ranges;\n }\n return LineVisibleRanges;\n}());\nexport { LineVisibleRanges };\nvar HorizontalRange = /** @class */ (function () {\n function HorizontalRange(left, width) {\n this.left = Math.round(left);\n this.width = Math.round(width);\n }\n HorizontalRange.prototype.toString = function () {\n return \"[\" + this.left + \",\" + this.width + \"]\";\n };\n return HorizontalRange;\n}());\nexport { HorizontalRange };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport { HorizontalRange } from '../../../common/view/renderingContext';\nvar FloatHorizontalRange = /** @class */ (function () {\n function FloatHorizontalRange(left, width) {\n this.left = left;\n this.width = width;\n }\n FloatHorizontalRange.prototype.toString = function () {\n return \"[\" + this.left + \",\" + this.width + \"]\";\n };\n FloatHorizontalRange.compare = function (a, b) {\n return a.left - b.left;\n };\n return FloatHorizontalRange;\n}());\nvar RangeUtil = /** @class */ (function () {\n function RangeUtil() {\n }\n RangeUtil._createRange = function () {\n if (!this._handyReadyRange) {\n this._handyReadyRange = document.createRange();\n }\n return this._handyReadyRange;\n };\n RangeUtil._detachRange = function (range, endNode) {\n // Move range out of the span node, IE doesn't like having many ranges in\n // the same spot and will act badly for lines containing dashes ('-')\n range.selectNodeContents(endNode);\n };\n RangeUtil._readClientRects = function (startElement, startOffset, endElement, endOffset, endNode) {\n var range = this._createRange();\n try {\n range.setStart(startElement, startOffset);\n range.setEnd(endElement, endOffset);\n return range.getClientRects();\n }\n catch (e) {\n // This is life ...\n return null;\n }\n finally {\n this._detachRange(range, endNode);\n }\n };\n RangeUtil._mergeAdjacentRanges = function (ranges) {\n if (ranges.length === 1) {\n // There is nothing to merge\n return [new HorizontalRange(ranges[0].left, ranges[0].width)];\n }\n ranges.sort(FloatHorizontalRange.compare);\n var result = [], resultLen = 0;\n var prevLeft = ranges[0].left;\n var prevWidth = ranges[0].width;\n for (var i = 1, len = ranges.length; i < len; i++) {\n var range = ranges[i];\n var myLeft = range.left;\n var myWidth = range.width;\n if (prevLeft + prevWidth + 0.9 /* account for browser's rounding errors*/ >= myLeft) {\n prevWidth = Math.max(prevWidth, myLeft + myWidth - prevLeft);\n }\n else {\n result[resultLen++] = new HorizontalRange(prevLeft, prevWidth);\n prevLeft = myLeft;\n prevWidth = myWidth;\n }\n }\n result[resultLen++] = new HorizontalRange(prevLeft, prevWidth);\n return result;\n };\n RangeUtil._createHorizontalRangesFromClientRects = function (clientRects, clientRectDeltaLeft) {\n if (!clientRects || clientRects.length === 0) {\n return null;\n }\n // We go through FloatHorizontalRange because it has been observed in bi-di text\n // that the clientRects are not coming in sorted from the browser\n var result = [];\n for (var i = 0, len = clientRects.length; i < len; i++) {\n var clientRect = clientRects[i];\n result[i] = new FloatHorizontalRange(Math.max(0, clientRect.left - clientRectDeltaLeft), clientRect.width);\n }\n return this._mergeAdjacentRanges(result);\n };\n RangeUtil.readHorizontalRanges = function (domNode, startChildIndex, startOffset, endChildIndex, endOffset, clientRectDeltaLeft, endNode) {\n // Panic check\n var min = 0;\n var max = domNode.children.length - 1;\n if (min > max) {\n return null;\n }\n startChildIndex = Math.min(max, Math.max(min, startChildIndex));\n endChildIndex = Math.min(max, Math.max(min, endChildIndex));\n // If crossing over to a span only to select offset 0, then use the previous span's maximum offset\n // Chrome is buggy and doesn't handle 0 offsets well sometimes.\n if (startChildIndex !== endChildIndex) {\n if (endChildIndex > 0 && endOffset === 0) {\n endChildIndex--;\n endOffset = Number.MAX_VALUE;\n }\n }\n var startElement = domNode.children[startChildIndex].firstChild;\n var endElement = domNode.children[endChildIndex].firstChild;\n if (!startElement || !endElement) {\n // When having an empty (without any text content), try to move to the previous \n if (!startElement && startOffset === 0 && startChildIndex > 0) {\n startElement = domNode.children[startChildIndex - 1].firstChild;\n startOffset = 1073741824 /* MAX_SAFE_SMALL_INTEGER */;\n }\n if (!endElement && endOffset === 0 && endChildIndex > 0) {\n endElement = domNode.children[endChildIndex - 1].firstChild;\n endOffset = 1073741824 /* MAX_SAFE_SMALL_INTEGER */;\n }\n }\n if (!startElement || !endElement) {\n return null;\n }\n startOffset = Math.min(startElement.textContent.length, Math.max(0, startOffset));\n endOffset = Math.min(endElement.textContent.length, Math.max(0, endOffset));\n var clientRects = this._readClientRects(startElement, startOffset, endElement, endOffset, endNode);\n return this._createHorizontalRangesFromClientRects(clientRects, clientRectDeltaLeft);\n };\n return RangeUtil;\n}());\nexport { RangeUtil };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport * as browser from '../../../../base/browser/browser';\nimport * as platform from '../../../../base/common/platform';\nimport { createFastDomNode } from '../../../../base/browser/fastDomNode';\nimport { LineDecoration } from '../../../common/viewLayout/lineDecorations';\nimport { renderViewLine, RenderLineInput, CharacterMapping } from '../../../common/viewLayout/viewLineRenderer';\nimport { RangeUtil } from './rangeUtil';\nimport { HorizontalRange } from '../../../common/view/renderingContext';\nimport { HIGH_CONTRAST } from '../../../../platform/theme/common/themeService';\nvar canUseFastRenderedViewLine = (function () {\n if (platform.isNative) {\n // In VSCode we know very well when the zoom level changes\n return true;\n }\n if (platform.isLinux || browser.isFirefox || browser.isSafari) {\n // On Linux, it appears that zooming affects char widths (in pixels), which is unexpected.\n // --\n // Even though we read character widths correctly, having read them at a specific zoom level\n // does not mean they are the same at the current zoom level.\n // --\n // This could be improved if we ever figure out how to get an event when browsers zoom,\n // but until then we have to stick with reading client rects.\n // --\n // The same has been observed with Firefox on Windows7\n // --\n // The same has been oversved with Safari\n return false;\n }\n return true;\n})();\nvar alwaysRenderInlineSelection = (browser.isEdgeOrIE);\nvar DomReadingContext = /** @class */ (function () {\n function DomReadingContext(domNode, endNode) {\n this._domNode = domNode;\n this._clientRectDeltaLeft = 0;\n this._clientRectDeltaLeftRead = false;\n this.endNode = endNode;\n }\n Object.defineProperty(DomReadingContext.prototype, \"clientRectDeltaLeft\", {\n get: function () {\n if (!this._clientRectDeltaLeftRead) {\n this._clientRectDeltaLeftRead = true;\n this._clientRectDeltaLeft = this._domNode.getBoundingClientRect().left;\n }\n return this._clientRectDeltaLeft;\n },\n enumerable: true,\n configurable: true\n });\n return DomReadingContext;\n}());\nexport { DomReadingContext };\nvar ViewLineOptions = /** @class */ (function () {\n function ViewLineOptions(config, themeType) {\n this.themeType = themeType;\n this.renderWhitespace = config.editor.viewInfo.renderWhitespace;\n this.renderControlCharacters = config.editor.viewInfo.renderControlCharacters;\n this.spaceWidth = config.editor.fontInfo.spaceWidth;\n this.useMonospaceOptimizations = (config.editor.fontInfo.isMonospace\n && !config.editor.viewInfo.disableMonospaceOptimizations);\n this.lineHeight = config.editor.lineHeight;\n this.stopRenderingLineAfter = config.editor.viewInfo.stopRenderingLineAfter;\n this.fontLigatures = config.editor.viewInfo.fontLigatures;\n }\n ViewLineOptions.prototype.equals = function (other) {\n return (this.themeType === other.themeType\n && this.renderWhitespace === other.renderWhitespace\n && this.renderControlCharacters === other.renderControlCharacters\n && this.spaceWidth === other.spaceWidth\n && this.useMonospaceOptimizations === other.useMonospaceOptimizations\n && this.lineHeight === other.lineHeight\n && this.stopRenderingLineAfter === other.stopRenderingLineAfter\n && this.fontLigatures === other.fontLigatures);\n };\n return ViewLineOptions;\n}());\nexport { ViewLineOptions };\nvar ViewLine = /** @class */ (function () {\n function ViewLine(options) {\n this._options = options;\n this._isMaybeInvalid = true;\n this._renderedViewLine = null;\n }\n // --- begin IVisibleLineData\n ViewLine.prototype.getDomNode = function () {\n if (this._renderedViewLine && this._renderedViewLine.domNode) {\n return this._renderedViewLine.domNode.domNode;\n }\n return null;\n };\n ViewLine.prototype.setDomNode = function (domNode) {\n if (this._renderedViewLine) {\n this._renderedViewLine.domNode = createFastDomNode(domNode);\n }\n else {\n throw new Error('I have no rendered view line to set the dom node to...');\n }\n };\n ViewLine.prototype.onContentChanged = function () {\n this._isMaybeInvalid = true;\n };\n ViewLine.prototype.onTokensChanged = function () {\n this._isMaybeInvalid = true;\n };\n ViewLine.prototype.onDecorationsChanged = function () {\n this._isMaybeInvalid = true;\n };\n ViewLine.prototype.onOptionsChanged = function (newOptions) {\n this._isMaybeInvalid = true;\n this._options = newOptions;\n };\n ViewLine.prototype.onSelectionChanged = function () {\n if (alwaysRenderInlineSelection || this._options.themeType === HIGH_CONTRAST) {\n this._isMaybeInvalid = true;\n return true;\n }\n return false;\n };\n ViewLine.prototype.renderLine = function (lineNumber, deltaTop, viewportData, sb) {\n if (this._isMaybeInvalid === false) {\n // it appears that nothing relevant has changed\n return false;\n }\n this._isMaybeInvalid = false;\n var lineData = viewportData.getViewLineRenderingData(lineNumber);\n var options = this._options;\n var actualInlineDecorations = LineDecoration.filter(lineData.inlineDecorations, lineNumber, lineData.minColumn, lineData.maxColumn);\n if (alwaysRenderInlineSelection || options.themeType === HIGH_CONTRAST) {\n var selections = viewportData.selections;\n for (var i = 0, len = selections.length; i < len; i++) {\n var selection = selections[i];\n if (selection.endLineNumber < lineNumber || selection.startLineNumber > lineNumber) {\n // Selection does not intersect line\n continue;\n }\n var startColumn = (selection.startLineNumber === lineNumber ? selection.startColumn : lineData.minColumn);\n var endColumn = (selection.endLineNumber === lineNumber ? selection.endColumn : lineData.maxColumn);\n if (startColumn < endColumn) {\n actualInlineDecorations.push(new LineDecoration(startColumn, endColumn, 'inline-selected-text', 0 /* Regular */));\n }\n }\n }\n var renderLineInput = new RenderLineInput(options.useMonospaceOptimizations, lineData.content, lineData.continuesWithWrappedLine, lineData.isBasicASCII, lineData.containsRTL, lineData.minColumn - 1, lineData.tokens, actualInlineDecorations, lineData.tabSize, options.spaceWidth, options.stopRenderingLineAfter, options.renderWhitespace, options.renderControlCharacters, options.fontLigatures);\n if (this._renderedViewLine && this._renderedViewLine.input.equals(renderLineInput)) {\n // no need to do anything, we have the same render input\n return false;\n }\n sb.appendASCIIString('
    ');\n var output = renderViewLine(renderLineInput, sb);\n sb.appendASCIIString('
    ');\n var renderedViewLine = null;\n if (canUseFastRenderedViewLine && lineData.isBasicASCII && options.useMonospaceOptimizations && output.containsForeignElements === 0 /* None */) {\n if (lineData.content.length < 300 && renderLineInput.lineTokens.getCount() < 100) {\n // Browser rounding errors have been observed in Chrome and IE, so using the fast\n // view line only for short lines. Please test before removing the length check...\n // ---\n // Another rounding error has been observed on Linux in VSCode, where width\n // rounding errors add up to an observable large number...\n // ---\n // Also see another example of rounding errors on Windows in\n // https://github.com/Microsoft/vscode/issues/33178\n renderedViewLine = new FastRenderedViewLine(this._renderedViewLine ? this._renderedViewLine.domNode : null, renderLineInput, output.characterMapping);\n }\n }\n if (!renderedViewLine) {\n renderedViewLine = createRenderedLine(this._renderedViewLine ? this._renderedViewLine.domNode : null, renderLineInput, output.characterMapping, output.containsRTL, output.containsForeignElements);\n }\n this._renderedViewLine = renderedViewLine;\n return true;\n };\n ViewLine.prototype.layoutLine = function (lineNumber, deltaTop) {\n if (this._renderedViewLine && this._renderedViewLine.domNode) {\n this._renderedViewLine.domNode.setTop(deltaTop);\n this._renderedViewLine.domNode.setHeight(this._options.lineHeight);\n }\n };\n // --- end IVisibleLineData\n ViewLine.prototype.getWidth = function () {\n if (!this._renderedViewLine) {\n return 0;\n }\n return this._renderedViewLine.getWidth();\n };\n ViewLine.prototype.getWidthIsFast = function () {\n if (!this._renderedViewLine) {\n return true;\n }\n return this._renderedViewLine.getWidthIsFast();\n };\n ViewLine.prototype.getVisibleRangesForRange = function (startColumn, endColumn, context) {\n startColumn = startColumn | 0; // @perf\n endColumn = endColumn | 0; // @perf\n startColumn = Math.min(this._renderedViewLine.input.lineContent.length + 1, Math.max(1, startColumn));\n endColumn = Math.min(this._renderedViewLine.input.lineContent.length + 1, Math.max(1, endColumn));\n var stopRenderingLineAfter = this._renderedViewLine.input.stopRenderingLineAfter | 0; // @perf\n if (stopRenderingLineAfter !== -1 && startColumn > stopRenderingLineAfter && endColumn > stopRenderingLineAfter) {\n // This range is obviously not visible\n return null;\n }\n if (stopRenderingLineAfter !== -1 && startColumn > stopRenderingLineAfter) {\n startColumn = stopRenderingLineAfter;\n }\n if (stopRenderingLineAfter !== -1 && endColumn > stopRenderingLineAfter) {\n endColumn = stopRenderingLineAfter;\n }\n return this._renderedViewLine.getVisibleRangesForRange(startColumn, endColumn, context);\n };\n ViewLine.prototype.getColumnOfNodeOffset = function (lineNumber, spanNode, offset) {\n return this._renderedViewLine.getColumnOfNodeOffset(lineNumber, spanNode, offset);\n };\n ViewLine.CLASS_NAME = 'view-line';\n return ViewLine;\n}());\nexport { ViewLine };\n/**\n * A rendered line which is guaranteed to contain only regular ASCII and is rendered with a monospace font.\n */\nvar FastRenderedViewLine = /** @class */ (function () {\n function FastRenderedViewLine(domNode, renderLineInput, characterMapping) {\n this.domNode = domNode;\n this.input = renderLineInput;\n this._characterMapping = characterMapping;\n this._charWidth = renderLineInput.spaceWidth;\n }\n FastRenderedViewLine.prototype.getWidth = function () {\n return this._getCharPosition(this._characterMapping.length);\n };\n FastRenderedViewLine.prototype.getWidthIsFast = function () {\n return true;\n };\n FastRenderedViewLine.prototype.getVisibleRangesForRange = function (startColumn, endColumn, context) {\n var startPosition = this._getCharPosition(startColumn);\n var endPosition = this._getCharPosition(endColumn);\n return [new HorizontalRange(startPosition, endPosition - startPosition)];\n };\n FastRenderedViewLine.prototype._getCharPosition = function (column) {\n var charOffset = this._characterMapping.getAbsoluteOffsets();\n if (charOffset.length === 0) {\n // No characters on this line\n return 0;\n }\n return Math.round(this._charWidth * charOffset[column - 1]);\n };\n FastRenderedViewLine.prototype.getColumnOfNodeOffset = function (lineNumber, spanNode, offset) {\n var spanNodeTextContentLength = spanNode.textContent.length;\n var spanIndex = -1;\n while (spanNode) {\n spanNode = spanNode.previousSibling;\n spanIndex++;\n }\n var charOffset = this._characterMapping.partDataToCharOffset(spanIndex, spanNodeTextContentLength, offset);\n return charOffset + 1;\n };\n return FastRenderedViewLine;\n}());\n/**\n * Every time we render a line, we save what we have rendered in an instance of this class.\n */\nvar RenderedViewLine = /** @class */ (function () {\n function RenderedViewLine(domNode, renderLineInput, characterMapping, containsRTL, containsForeignElements) {\n this.domNode = domNode;\n this.input = renderLineInput;\n this._characterMapping = characterMapping;\n this._isWhitespaceOnly = /^\\s*$/.test(renderLineInput.lineContent);\n this._containsForeignElements = containsForeignElements;\n this._cachedWidth = -1;\n this._pixelOffsetCache = null;\n if (!containsRTL || this._characterMapping.length === 0 /* the line is empty */) {\n this._pixelOffsetCache = new Int32Array(Math.max(2, this._characterMapping.length + 1));\n for (var column = 0, len = this._characterMapping.length; column <= len; column++) {\n this._pixelOffsetCache[column] = -1;\n }\n }\n }\n // --- Reading from the DOM methods\n RenderedViewLine.prototype._getReadingTarget = function () {\n return this.domNode.domNode.firstChild;\n };\n /**\n * Width of the line in pixels\n */\n RenderedViewLine.prototype.getWidth = function () {\n if (this._cachedWidth === -1) {\n this._cachedWidth = this._getReadingTarget().offsetWidth;\n }\n return this._cachedWidth;\n };\n RenderedViewLine.prototype.getWidthIsFast = function () {\n if (this._cachedWidth === -1) {\n return false;\n }\n return true;\n };\n /**\n * Visible ranges for a model range\n */\n RenderedViewLine.prototype.getVisibleRangesForRange = function (startColumn, endColumn, context) {\n if (this._pixelOffsetCache !== null) {\n // the text is LTR\n var startOffset = this._readPixelOffset(startColumn, context);\n if (startOffset === -1) {\n return null;\n }\n var endOffset = this._readPixelOffset(endColumn, context);\n if (endOffset === -1) {\n return null;\n }\n return [new HorizontalRange(startOffset, endOffset - startOffset)];\n }\n return this._readVisibleRangesForRange(startColumn, endColumn, context);\n };\n RenderedViewLine.prototype._readVisibleRangesForRange = function (startColumn, endColumn, context) {\n if (startColumn === endColumn) {\n var pixelOffset = this._readPixelOffset(startColumn, context);\n if (pixelOffset === -1) {\n return null;\n }\n else {\n return [new HorizontalRange(pixelOffset, 0)];\n }\n }\n else {\n return this._readRawVisibleRangesForRange(startColumn, endColumn, context);\n }\n };\n RenderedViewLine.prototype._readPixelOffset = function (column, context) {\n if (this._characterMapping.length === 0) {\n // This line has no content\n if (this._containsForeignElements === 0 /* None */) {\n // We can assume the line is really empty\n return 0;\n }\n if (this._containsForeignElements === 2 /* After */) {\n // We have foreign elements after the (empty) line\n return 0;\n }\n if (this._containsForeignElements === 1 /* Before */) {\n // We have foreign element before the (empty) line\n return this.getWidth();\n }\n }\n if (this._pixelOffsetCache !== null) {\n // the text is LTR\n var cachedPixelOffset = this._pixelOffsetCache[column];\n if (cachedPixelOffset !== -1) {\n return cachedPixelOffset;\n }\n var result = this._actualReadPixelOffset(column, context);\n this._pixelOffsetCache[column] = result;\n return result;\n }\n return this._actualReadPixelOffset(column, context);\n };\n RenderedViewLine.prototype._actualReadPixelOffset = function (column, context) {\n if (this._characterMapping.length === 0) {\n // This line has no content\n var r_1 = RangeUtil.readHorizontalRanges(this._getReadingTarget(), 0, 0, 0, 0, context.clientRectDeltaLeft, context.endNode);\n if (!r_1 || r_1.length === 0) {\n return -1;\n }\n return r_1[0].left;\n }\n if (column === this._characterMapping.length && this._isWhitespaceOnly && this._containsForeignElements === 0 /* None */) {\n // This branch helps in the case of whitespace only lines which have a width set\n return this.getWidth();\n }\n var partData = this._characterMapping.charOffsetToPartData(column - 1);\n var partIndex = CharacterMapping.getPartIndex(partData);\n var charOffsetInPart = CharacterMapping.getCharIndex(partData);\n var r = RangeUtil.readHorizontalRanges(this._getReadingTarget(), partIndex, charOffsetInPart, partIndex, charOffsetInPart, context.clientRectDeltaLeft, context.endNode);\n if (!r || r.length === 0) {\n return -1;\n }\n return r[0].left;\n };\n RenderedViewLine.prototype._readRawVisibleRangesForRange = function (startColumn, endColumn, context) {\n if (startColumn === 1 && endColumn === this._characterMapping.length) {\n // This branch helps IE with bidi text & gives a performance boost to other browsers when reading visible ranges for an entire line\n return [new HorizontalRange(0, this.getWidth())];\n }\n var startPartData = this._characterMapping.charOffsetToPartData(startColumn - 1);\n var startPartIndex = CharacterMapping.getPartIndex(startPartData);\n var startCharOffsetInPart = CharacterMapping.getCharIndex(startPartData);\n var endPartData = this._characterMapping.charOffsetToPartData(endColumn - 1);\n var endPartIndex = CharacterMapping.getPartIndex(endPartData);\n var endCharOffsetInPart = CharacterMapping.getCharIndex(endPartData);\n return RangeUtil.readHorizontalRanges(this._getReadingTarget(), startPartIndex, startCharOffsetInPart, endPartIndex, endCharOffsetInPart, context.clientRectDeltaLeft, context.endNode);\n };\n /**\n * Returns the column for the text found at a specific offset inside a rendered dom node\n */\n RenderedViewLine.prototype.getColumnOfNodeOffset = function (lineNumber, spanNode, offset) {\n var spanNodeTextContentLength = spanNode.textContent.length;\n var spanIndex = -1;\n while (spanNode) {\n spanNode = spanNode.previousSibling;\n spanIndex++;\n }\n var charOffset = this._characterMapping.partDataToCharOffset(spanIndex, spanNodeTextContentLength, offset);\n return charOffset + 1;\n };\n return RenderedViewLine;\n}());\nvar WebKitRenderedViewLine = /** @class */ (function (_super) {\n __extends(WebKitRenderedViewLine, _super);\n function WebKitRenderedViewLine() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n WebKitRenderedViewLine.prototype._readVisibleRangesForRange = function (startColumn, endColumn, context) {\n var output = _super.prototype._readVisibleRangesForRange.call(this, startColumn, endColumn, context);\n if (!output || output.length === 0 || startColumn === endColumn || (startColumn === 1 && endColumn === this._characterMapping.length)) {\n return output;\n }\n // WebKit is buggy and returns an expanded range (to contain words in some cases)\n // The last client rect is enlarged (I think)\n // This is an attempt to patch things up\n // Find position of previous column\n var beforeEndPixelOffset = this._readPixelOffset(endColumn - 1, context);\n // Find position of last column\n var endPixelOffset = this._readPixelOffset(endColumn, context);\n if (beforeEndPixelOffset !== -1 && endPixelOffset !== -1) {\n var isLTR = (beforeEndPixelOffset <= endPixelOffset);\n var lastRange = output[output.length - 1];\n if (isLTR && lastRange.left < endPixelOffset) {\n // Trim down the width of the last visible range to not go after the last column's position\n lastRange.width = endPixelOffset - lastRange.left;\n }\n }\n return output;\n };\n return WebKitRenderedViewLine;\n}(RenderedViewLine));\nvar createRenderedLine = (function () {\n if (browser.isWebKit) {\n return createWebKitRenderedLine;\n }\n return createNormalRenderedLine;\n})();\nfunction createWebKitRenderedLine(domNode, renderLineInput, characterMapping, containsRTL, containsForeignElements) {\n return new WebKitRenderedViewLine(domNode, renderLineInput, characterMapping, containsRTL, containsForeignElements);\n}\nfunction createNormalRenderedLine(domNode, renderLineInput, characterMapping, containsRTL, containsForeignElements) {\n return new RenderedViewLine(domNode, renderLineInput, characterMapping, containsRTL, containsForeignElements);\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { Position } from '../../common/core/position';\nimport { Range as EditorRange } from '../../common/core/range';\nimport { MouseTargetType } from '../editorBrowser';\nimport { PageCoordinates } from '../editorDom';\nimport * as browser from '../../../base/browser/browser';\nimport { PartFingerprints } from '../view/viewPart';\nimport { ViewLine } from '../viewParts/lines/viewLine';\nvar MouseTarget = /** @class */ (function () {\n function MouseTarget(element, type, mouseColumn, position, range, detail) {\n if (mouseColumn === void 0) { mouseColumn = 0; }\n if (position === void 0) { position = null; }\n if (range === void 0) { range = null; }\n if (detail === void 0) { detail = null; }\n this.element = element;\n this.type = type;\n this.mouseColumn = mouseColumn;\n this.position = position;\n if (!range && position) {\n range = new EditorRange(position.lineNumber, position.column, position.lineNumber, position.column);\n }\n this.range = range;\n this.detail = detail;\n }\n MouseTarget._typeToString = function (type) {\n if (type === MouseTargetType.TEXTAREA) {\n return 'TEXTAREA';\n }\n if (type === MouseTargetType.GUTTER_GLYPH_MARGIN) {\n return 'GUTTER_GLYPH_MARGIN';\n }\n if (type === MouseTargetType.GUTTER_LINE_NUMBERS) {\n return 'GUTTER_LINE_NUMBERS';\n }\n if (type === MouseTargetType.GUTTER_LINE_DECORATIONS) {\n return 'GUTTER_LINE_DECORATIONS';\n }\n if (type === MouseTargetType.GUTTER_VIEW_ZONE) {\n return 'GUTTER_VIEW_ZONE';\n }\n if (type === MouseTargetType.CONTENT_TEXT) {\n return 'CONTENT_TEXT';\n }\n if (type === MouseTargetType.CONTENT_EMPTY) {\n return 'CONTENT_EMPTY';\n }\n if (type === MouseTargetType.CONTENT_VIEW_ZONE) {\n return 'CONTENT_VIEW_ZONE';\n }\n if (type === MouseTargetType.CONTENT_WIDGET) {\n return 'CONTENT_WIDGET';\n }\n if (type === MouseTargetType.OVERVIEW_RULER) {\n return 'OVERVIEW_RULER';\n }\n if (type === MouseTargetType.SCROLLBAR) {\n return 'SCROLLBAR';\n }\n if (type === MouseTargetType.OVERLAY_WIDGET) {\n return 'OVERLAY_WIDGET';\n }\n return 'UNKNOWN';\n };\n MouseTarget.toString = function (target) {\n return this._typeToString(target.type) + ': ' + target.position + ' - ' + target.range + ' - ' + target.detail;\n };\n MouseTarget.prototype.toString = function () {\n return MouseTarget.toString(this);\n };\n return MouseTarget;\n}());\nexport { MouseTarget };\nvar ElementPath = /** @class */ (function () {\n function ElementPath() {\n }\n ElementPath.isTextArea = function (path) {\n return (path.length === 2\n && path[0] === 3 /* OverflowGuard */\n && path[1] === 6 /* TextArea */);\n };\n ElementPath.isChildOfViewLines = function (path) {\n return (path.length >= 4\n && path[0] === 3 /* OverflowGuard */\n && path[3] === 7 /* ViewLines */);\n };\n ElementPath.isStrictChildOfViewLines = function (path) {\n return (path.length > 4\n && path[0] === 3 /* OverflowGuard */\n && path[3] === 7 /* ViewLines */);\n };\n ElementPath.isChildOfScrollableElement = function (path) {\n return (path.length >= 2\n && path[0] === 3 /* OverflowGuard */\n && path[1] === 5 /* ScrollableElement */);\n };\n ElementPath.isChildOfMinimap = function (path) {\n return (path.length >= 2\n && path[0] === 3 /* OverflowGuard */\n && path[1] === 8 /* Minimap */);\n };\n ElementPath.isChildOfContentWidgets = function (path) {\n return (path.length >= 4\n && path[0] === 3 /* OverflowGuard */\n && path[3] === 1 /* ContentWidgets */);\n };\n ElementPath.isChildOfOverflowingContentWidgets = function (path) {\n return (path.length >= 1\n && path[0] === 2 /* OverflowingContentWidgets */);\n };\n ElementPath.isChildOfOverlayWidgets = function (path) {\n return (path.length >= 2\n && path[0] === 3 /* OverflowGuard */\n && path[1] === 4 /* OverlayWidgets */);\n };\n return ElementPath;\n}());\nvar HitTestContext = /** @class */ (function () {\n function HitTestContext(context, viewHelper, lastViewCursorsRenderData) {\n this.model = context.model;\n this.layoutInfo = context.configuration.editor.layoutInfo;\n this.viewDomNode = viewHelper.viewDomNode;\n this.lineHeight = context.configuration.editor.lineHeight;\n this.typicalHalfwidthCharacterWidth = context.configuration.editor.fontInfo.typicalHalfwidthCharacterWidth;\n this.lastViewCursorsRenderData = lastViewCursorsRenderData;\n this._context = context;\n this._viewHelper = viewHelper;\n }\n HitTestContext.prototype.getZoneAtCoord = function (mouseVerticalOffset) {\n return HitTestContext.getZoneAtCoord(this._context, mouseVerticalOffset);\n };\n HitTestContext.getZoneAtCoord = function (context, mouseVerticalOffset) {\n // The target is either a view zone or the empty space after the last view-line\n var viewZoneWhitespace = context.viewLayout.getWhitespaceAtVerticalOffset(mouseVerticalOffset);\n if (viewZoneWhitespace) {\n var viewZoneMiddle = viewZoneWhitespace.verticalOffset + viewZoneWhitespace.height / 2, lineCount = context.model.getLineCount(), positionBefore = null, position = void 0, positionAfter = null;\n if (viewZoneWhitespace.afterLineNumber !== lineCount) {\n // There are more lines after this view zone\n positionAfter = new Position(viewZoneWhitespace.afterLineNumber + 1, 1);\n }\n if (viewZoneWhitespace.afterLineNumber > 0) {\n // There are more lines above this view zone\n positionBefore = new Position(viewZoneWhitespace.afterLineNumber, context.model.getLineMaxColumn(viewZoneWhitespace.afterLineNumber));\n }\n if (positionAfter === null) {\n position = positionBefore;\n }\n else if (positionBefore === null) {\n position = positionAfter;\n }\n else if (mouseVerticalOffset < viewZoneMiddle) {\n position = positionBefore;\n }\n else {\n position = positionAfter;\n }\n return {\n viewZoneId: viewZoneWhitespace.id,\n afterLineNumber: viewZoneWhitespace.afterLineNumber,\n positionBefore: positionBefore,\n positionAfter: positionAfter,\n position: position\n };\n }\n return null;\n };\n HitTestContext.prototype.getFullLineRangeAtCoord = function (mouseVerticalOffset) {\n if (this._context.viewLayout.isAfterLines(mouseVerticalOffset)) {\n // Below the last line\n var lineNumber_1 = this._context.model.getLineCount();\n var maxLineColumn_1 = this._context.model.getLineMaxColumn(lineNumber_1);\n return {\n range: new EditorRange(lineNumber_1, maxLineColumn_1, lineNumber_1, maxLineColumn_1),\n isAfterLines: true\n };\n }\n var lineNumber = this._context.viewLayout.getLineNumberAtVerticalOffset(mouseVerticalOffset);\n var maxLineColumn = this._context.model.getLineMaxColumn(lineNumber);\n return {\n range: new EditorRange(lineNumber, 1, lineNumber, maxLineColumn),\n isAfterLines: false\n };\n };\n HitTestContext.prototype.getLineNumberAtVerticalOffset = function (mouseVerticalOffset) {\n return this._context.viewLayout.getLineNumberAtVerticalOffset(mouseVerticalOffset);\n };\n HitTestContext.prototype.isAfterLines = function (mouseVerticalOffset) {\n return this._context.viewLayout.isAfterLines(mouseVerticalOffset);\n };\n HitTestContext.prototype.getVerticalOffsetForLineNumber = function (lineNumber) {\n return this._context.viewLayout.getVerticalOffsetForLineNumber(lineNumber);\n };\n HitTestContext.prototype.findAttribute = function (element, attr) {\n return HitTestContext._findAttribute(element, attr, this._viewHelper.viewDomNode);\n };\n HitTestContext._findAttribute = function (element, attr, stopAt) {\n while (element && element !== document.body) {\n if (element.hasAttribute && element.hasAttribute(attr)) {\n return element.getAttribute(attr);\n }\n if (element === stopAt) {\n return null;\n }\n element = element.parentNode;\n }\n return null;\n };\n HitTestContext.prototype.getLineWidth = function (lineNumber) {\n return this._viewHelper.getLineWidth(lineNumber);\n };\n HitTestContext.prototype.visibleRangeForPosition2 = function (lineNumber, column) {\n return this._viewHelper.visibleRangeForPosition2(lineNumber, column);\n };\n HitTestContext.prototype.getPositionFromDOMInfo = function (spanNode, offset) {\n return this._viewHelper.getPositionFromDOMInfo(spanNode, offset);\n };\n HitTestContext.prototype.getCurrentScrollTop = function () {\n return this._context.viewLayout.getCurrentScrollTop();\n };\n HitTestContext.prototype.getCurrentScrollLeft = function () {\n return this._context.viewLayout.getCurrentScrollLeft();\n };\n return HitTestContext;\n}());\nexport { HitTestContext };\nvar BareHitTestRequest = /** @class */ (function () {\n function BareHitTestRequest(ctx, editorPos, pos) {\n this.editorPos = editorPos;\n this.pos = pos;\n this.mouseVerticalOffset = Math.max(0, ctx.getCurrentScrollTop() + pos.y - editorPos.y);\n this.mouseContentHorizontalOffset = ctx.getCurrentScrollLeft() + pos.x - editorPos.x - ctx.layoutInfo.contentLeft;\n this.isInMarginArea = (pos.x - editorPos.x < ctx.layoutInfo.contentLeft && pos.x - editorPos.x >= ctx.layoutInfo.glyphMarginLeft);\n this.isInContentArea = !this.isInMarginArea;\n this.mouseColumn = Math.max(0, MouseTargetFactory._getMouseColumn(this.mouseContentHorizontalOffset, ctx.typicalHalfwidthCharacterWidth));\n }\n return BareHitTestRequest;\n}());\nvar HitTestRequest = /** @class */ (function (_super) {\n __extends(HitTestRequest, _super);\n function HitTestRequest(ctx, editorPos, pos, target) {\n var _this = _super.call(this, ctx, editorPos, pos) || this;\n _this._ctx = ctx;\n if (target) {\n _this.target = target;\n _this.targetPath = PartFingerprints.collect(target, ctx.viewDomNode);\n }\n else {\n _this.target = null;\n _this.targetPath = new Uint8Array(0);\n }\n return _this;\n }\n HitTestRequest.prototype.toString = function () {\n return \"pos(\" + this.pos.x + \",\" + this.pos.y + \"), editorPos(\" + this.editorPos.x + \",\" + this.editorPos.y + \"), mouseVerticalOffset: \" + this.mouseVerticalOffset + \", mouseContentHorizontalOffset: \" + this.mouseContentHorizontalOffset + \"\\n\\ttarget: \" + (this.target ? this.target.outerHTML : null);\n };\n HitTestRequest.prototype.fulfill = function (type, position, range, detail) {\n if (position === void 0) { position = null; }\n if (range === void 0) { range = null; }\n if (detail === void 0) { detail = null; }\n return new MouseTarget(this.target, type, this.mouseColumn, position, range, detail);\n };\n HitTestRequest.prototype.withTarget = function (target) {\n return new HitTestRequest(this._ctx, this.editorPos, this.pos, target);\n };\n return HitTestRequest;\n}(BareHitTestRequest));\nvar EMPTY_CONTENT_AFTER_LINES = { isAfterLines: true };\nfunction createEmptyContentDataInLines(horizontalDistanceToText) {\n return {\n isAfterLines: false,\n horizontalDistanceToText: horizontalDistanceToText\n };\n}\nvar MouseTargetFactory = /** @class */ (function () {\n function MouseTargetFactory(context, viewHelper) {\n this._context = context;\n this._viewHelper = viewHelper;\n }\n MouseTargetFactory.prototype.mouseTargetIsWidget = function (e) {\n var t = e.target;\n var path = PartFingerprints.collect(t, this._viewHelper.viewDomNode);\n // Is it a content widget?\n if (ElementPath.isChildOfContentWidgets(path) || ElementPath.isChildOfOverflowingContentWidgets(path)) {\n return true;\n }\n // Is it an overlay widget?\n if (ElementPath.isChildOfOverlayWidgets(path)) {\n return true;\n }\n return false;\n };\n MouseTargetFactory.prototype.createMouseTarget = function (lastViewCursorsRenderData, editorPos, pos, target) {\n var ctx = new HitTestContext(this._context, this._viewHelper, lastViewCursorsRenderData);\n var request = new HitTestRequest(ctx, editorPos, pos, target);\n try {\n var r = MouseTargetFactory._createMouseTarget(ctx, request, false);\n // console.log(r.toString());\n return r;\n }\n catch (err) {\n // console.log(err);\n return request.fulfill(MouseTargetType.UNKNOWN);\n }\n };\n MouseTargetFactory._createMouseTarget = function (ctx, request, domHitTestExecuted) {\n // console.log(`${domHitTestExecuted ? '=>' : ''}CAME IN REQUEST: ${request}`);\n // First ensure the request has a target\n if (request.target === null) {\n if (domHitTestExecuted) {\n // Still no target... and we have already executed hit test...\n return request.fulfill(MouseTargetType.UNKNOWN);\n }\n var hitTestResult = MouseTargetFactory._doHitTest(ctx, request);\n if (hitTestResult.position) {\n return MouseTargetFactory.createMouseTargetFromHitTestPosition(ctx, request, hitTestResult.position.lineNumber, hitTestResult.position.column);\n }\n return this._createMouseTarget(ctx, request.withTarget(hitTestResult.hitTarget), true);\n }\n var result = null;\n result = result || MouseTargetFactory._hitTestContentWidget(ctx, request);\n result = result || MouseTargetFactory._hitTestOverlayWidget(ctx, request);\n result = result || MouseTargetFactory._hitTestMinimap(ctx, request);\n result = result || MouseTargetFactory._hitTestScrollbarSlider(ctx, request);\n result = result || MouseTargetFactory._hitTestViewZone(ctx, request);\n result = result || MouseTargetFactory._hitTestMargin(ctx, request);\n result = result || MouseTargetFactory._hitTestViewCursor(ctx, request);\n result = result || MouseTargetFactory._hitTestTextArea(ctx, request);\n result = result || MouseTargetFactory._hitTestViewLines(ctx, request, domHitTestExecuted);\n result = result || MouseTargetFactory._hitTestScrollbar(ctx, request);\n return (result || request.fulfill(MouseTargetType.UNKNOWN));\n };\n MouseTargetFactory._hitTestContentWidget = function (ctx, request) {\n // Is it a content widget?\n if (ElementPath.isChildOfContentWidgets(request.targetPath) || ElementPath.isChildOfOverflowingContentWidgets(request.targetPath)) {\n var widgetId = ctx.findAttribute(request.target, 'widgetId');\n if (widgetId) {\n return request.fulfill(MouseTargetType.CONTENT_WIDGET, null, null, widgetId);\n }\n else {\n return request.fulfill(MouseTargetType.UNKNOWN);\n }\n }\n return null;\n };\n MouseTargetFactory._hitTestOverlayWidget = function (ctx, request) {\n // Is it an overlay widget?\n if (ElementPath.isChildOfOverlayWidgets(request.targetPath)) {\n var widgetId = ctx.findAttribute(request.target, 'widgetId');\n if (widgetId) {\n return request.fulfill(MouseTargetType.OVERLAY_WIDGET, null, null, widgetId);\n }\n else {\n return request.fulfill(MouseTargetType.UNKNOWN);\n }\n }\n return null;\n };\n MouseTargetFactory._hitTestViewCursor = function (ctx, request) {\n if (request.target) {\n // Check if we've hit a painted cursor\n var lastViewCursorsRenderData = ctx.lastViewCursorsRenderData;\n for (var i = 0, len = lastViewCursorsRenderData.length; i < len; i++) {\n var d = lastViewCursorsRenderData[i];\n if (request.target === d.domNode) {\n return request.fulfill(MouseTargetType.CONTENT_TEXT, d.position);\n }\n }\n }\n if (request.isInContentArea) {\n // Edge has a bug when hit-testing the exact position of a cursor,\n // instead of returning the correct dom node, it returns the\n // first or last rendered view line dom node, therefore help it out\n // and first check if we are on top of a cursor\n var lastViewCursorsRenderData = ctx.lastViewCursorsRenderData;\n var mouseContentHorizontalOffset = request.mouseContentHorizontalOffset;\n var mouseVerticalOffset = request.mouseVerticalOffset;\n for (var i = 0, len = lastViewCursorsRenderData.length; i < len; i++) {\n var d = lastViewCursorsRenderData[i];\n if (mouseContentHorizontalOffset < d.contentLeft) {\n // mouse position is to the left of the cursor\n continue;\n }\n if (mouseContentHorizontalOffset > d.contentLeft + d.width) {\n // mouse position is to the right of the cursor\n continue;\n }\n var cursorVerticalOffset = ctx.getVerticalOffsetForLineNumber(d.position.lineNumber);\n if (cursorVerticalOffset <= mouseVerticalOffset\n && mouseVerticalOffset <= cursorVerticalOffset + d.height) {\n return request.fulfill(MouseTargetType.CONTENT_TEXT, d.position);\n }\n }\n }\n return null;\n };\n MouseTargetFactory._hitTestViewZone = function (ctx, request) {\n var viewZoneData = ctx.getZoneAtCoord(request.mouseVerticalOffset);\n if (viewZoneData) {\n var mouseTargetType = (request.isInContentArea ? MouseTargetType.CONTENT_VIEW_ZONE : MouseTargetType.GUTTER_VIEW_ZONE);\n return request.fulfill(mouseTargetType, viewZoneData.position, null, viewZoneData);\n }\n return null;\n };\n MouseTargetFactory._hitTestTextArea = function (ctx, request) {\n // Is it the textarea?\n if (ElementPath.isTextArea(request.targetPath)) {\n return request.fulfill(MouseTargetType.TEXTAREA);\n }\n return null;\n };\n MouseTargetFactory._hitTestMargin = function (ctx, request) {\n if (request.isInMarginArea) {\n var res = ctx.getFullLineRangeAtCoord(request.mouseVerticalOffset);\n var pos = res.range.getStartPosition();\n var offset = Math.abs(request.pos.x - request.editorPos.x);\n var detail = {\n isAfterLines: res.isAfterLines,\n glyphMarginLeft: ctx.layoutInfo.glyphMarginLeft,\n glyphMarginWidth: ctx.layoutInfo.glyphMarginWidth,\n lineNumbersWidth: ctx.layoutInfo.lineNumbersWidth,\n offsetX: offset\n };\n offset -= ctx.layoutInfo.glyphMarginLeft;\n if (offset <= ctx.layoutInfo.glyphMarginWidth) {\n // On the glyph margin\n return request.fulfill(MouseTargetType.GUTTER_GLYPH_MARGIN, pos, res.range, detail);\n }\n offset -= ctx.layoutInfo.glyphMarginWidth;\n if (offset <= ctx.layoutInfo.lineNumbersWidth) {\n // On the line numbers\n return request.fulfill(MouseTargetType.GUTTER_LINE_NUMBERS, pos, res.range, detail);\n }\n offset -= ctx.layoutInfo.lineNumbersWidth;\n // On the line decorations\n return request.fulfill(MouseTargetType.GUTTER_LINE_DECORATIONS, pos, res.range, detail);\n }\n return null;\n };\n MouseTargetFactory._hitTestViewLines = function (ctx, request, domHitTestExecuted) {\n if (!ElementPath.isChildOfViewLines(request.targetPath)) {\n return null;\n }\n // Check if it is below any lines and any view zones\n if (ctx.isAfterLines(request.mouseVerticalOffset)) {\n // This most likely indicates it happened after the last view-line\n var lineCount = ctx.model.getLineCount();\n var maxLineColumn = ctx.model.getLineMaxColumn(lineCount);\n return request.fulfill(MouseTargetType.CONTENT_EMPTY, new Position(lineCount, maxLineColumn), void 0, EMPTY_CONTENT_AFTER_LINES);\n }\n if (domHitTestExecuted) {\n // Check if we are hitting a view-line (can happen in the case of inline decorations on empty lines)\n // See https://github.com/Microsoft/vscode/issues/46942\n if (ElementPath.isStrictChildOfViewLines(request.targetPath)) {\n var lineNumber = ctx.getLineNumberAtVerticalOffset(request.mouseVerticalOffset);\n if (ctx.model.getLineLength(lineNumber) === 0) {\n var lineWidth = ctx.getLineWidth(lineNumber);\n var detail = createEmptyContentDataInLines(request.mouseContentHorizontalOffset - lineWidth);\n return request.fulfill(MouseTargetType.CONTENT_EMPTY, new Position(lineNumber, 1), void 0, detail);\n }\n }\n // We have already executed hit test...\n return request.fulfill(MouseTargetType.UNKNOWN);\n }\n var hitTestResult = MouseTargetFactory._doHitTest(ctx, request);\n if (hitTestResult.position) {\n return MouseTargetFactory.createMouseTargetFromHitTestPosition(ctx, request, hitTestResult.position.lineNumber, hitTestResult.position.column);\n }\n return this._createMouseTarget(ctx, request.withTarget(hitTestResult.hitTarget), true);\n };\n MouseTargetFactory._hitTestMinimap = function (ctx, request) {\n if (ElementPath.isChildOfMinimap(request.targetPath)) {\n var possibleLineNumber = ctx.getLineNumberAtVerticalOffset(request.mouseVerticalOffset);\n var maxColumn = ctx.model.getLineMaxColumn(possibleLineNumber);\n return request.fulfill(MouseTargetType.SCROLLBAR, new Position(possibleLineNumber, maxColumn));\n }\n return null;\n };\n MouseTargetFactory._hitTestScrollbarSlider = function (ctx, request) {\n if (ElementPath.isChildOfScrollableElement(request.targetPath)) {\n if (request.target && request.target.nodeType === 1) {\n var className = request.target.className;\n if (className && /\\b(slider|scrollbar)\\b/.test(className)) {\n var possibleLineNumber = ctx.getLineNumberAtVerticalOffset(request.mouseVerticalOffset);\n var maxColumn = ctx.model.getLineMaxColumn(possibleLineNumber);\n return request.fulfill(MouseTargetType.SCROLLBAR, new Position(possibleLineNumber, maxColumn));\n }\n }\n }\n return null;\n };\n MouseTargetFactory._hitTestScrollbar = function (ctx, request) {\n // Is it the overview ruler?\n // Is it a child of the scrollable element?\n if (ElementPath.isChildOfScrollableElement(request.targetPath)) {\n var possibleLineNumber = ctx.getLineNumberAtVerticalOffset(request.mouseVerticalOffset);\n var maxColumn = ctx.model.getLineMaxColumn(possibleLineNumber);\n return request.fulfill(MouseTargetType.SCROLLBAR, new Position(possibleLineNumber, maxColumn));\n }\n return null;\n };\n MouseTargetFactory.prototype.getMouseColumn = function (editorPos, pos) {\n var layoutInfo = this._context.configuration.editor.layoutInfo;\n var mouseContentHorizontalOffset = this._context.viewLayout.getCurrentScrollLeft() + pos.x - editorPos.x - layoutInfo.contentLeft;\n return MouseTargetFactory._getMouseColumn(mouseContentHorizontalOffset, this._context.configuration.editor.fontInfo.typicalHalfwidthCharacterWidth);\n };\n MouseTargetFactory._getMouseColumn = function (mouseContentHorizontalOffset, typicalHalfwidthCharacterWidth) {\n if (mouseContentHorizontalOffset < 0) {\n return 1;\n }\n var chars = Math.round(mouseContentHorizontalOffset / typicalHalfwidthCharacterWidth);\n return (chars + 1);\n };\n MouseTargetFactory.createMouseTargetFromHitTestPosition = function (ctx, request, lineNumber, column) {\n var pos = new Position(lineNumber, column);\n var lineWidth = ctx.getLineWidth(lineNumber);\n if (request.mouseContentHorizontalOffset > lineWidth) {\n if (browser.isEdge && pos.column === 1) {\n // See https://github.com/Microsoft/vscode/issues/10875\n var detail_1 = createEmptyContentDataInLines(request.mouseContentHorizontalOffset - lineWidth);\n return request.fulfill(MouseTargetType.CONTENT_EMPTY, new Position(lineNumber, ctx.model.getLineMaxColumn(lineNumber)), void 0, detail_1);\n }\n var detail = createEmptyContentDataInLines(request.mouseContentHorizontalOffset - lineWidth);\n return request.fulfill(MouseTargetType.CONTENT_EMPTY, pos, void 0, detail);\n }\n var visibleRange = ctx.visibleRangeForPosition2(lineNumber, column);\n if (!visibleRange) {\n return request.fulfill(MouseTargetType.UNKNOWN, pos);\n }\n var columnHorizontalOffset = visibleRange.left;\n if (request.mouseContentHorizontalOffset === columnHorizontalOffset) {\n return request.fulfill(MouseTargetType.CONTENT_TEXT, pos);\n }\n var points = [];\n points.push({ offset: visibleRange.left, column: column });\n if (column > 1) {\n var visibleRange_1 = ctx.visibleRangeForPosition2(lineNumber, column - 1);\n if (visibleRange_1) {\n points.push({ offset: visibleRange_1.left, column: column - 1 });\n }\n }\n var lineMaxColumn = ctx.model.getLineMaxColumn(lineNumber);\n if (column < lineMaxColumn) {\n var visibleRange_2 = ctx.visibleRangeForPosition2(lineNumber, column + 1);\n if (visibleRange_2) {\n points.push({ offset: visibleRange_2.left, column: column + 1 });\n }\n }\n points.sort(function (a, b) { return a.offset - b.offset; });\n for (var i = 1; i < points.length; i++) {\n var prev = points[i - 1];\n var curr = points[i];\n if (prev.offset <= request.mouseContentHorizontalOffset && request.mouseContentHorizontalOffset <= curr.offset) {\n var rng = new EditorRange(lineNumber, prev.column, lineNumber, curr.column);\n return request.fulfill(MouseTargetType.CONTENT_TEXT, pos, rng);\n }\n }\n return request.fulfill(MouseTargetType.CONTENT_TEXT, pos);\n };\n /**\n * Most probably WebKit browsers and Edge\n */\n MouseTargetFactory._doHitTestWithCaretRangeFromPoint = function (ctx, request) {\n // In Chrome, especially on Linux it is possible to click between lines,\n // so try to adjust the `hity` below so that it lands in the center of a line\n var lineNumber = ctx.getLineNumberAtVerticalOffset(request.mouseVerticalOffset);\n var lineVerticalOffset = ctx.getVerticalOffsetForLineNumber(lineNumber);\n var lineCenteredVerticalOffset = lineVerticalOffset + Math.floor(ctx.lineHeight / 2);\n var adjustedPageY = request.pos.y + (lineCenteredVerticalOffset - request.mouseVerticalOffset);\n if (adjustedPageY <= request.editorPos.y) {\n adjustedPageY = request.editorPos.y + 1;\n }\n if (adjustedPageY >= request.editorPos.y + ctx.layoutInfo.height) {\n adjustedPageY = request.editorPos.y + ctx.layoutInfo.height - 1;\n }\n var adjustedPage = new PageCoordinates(request.pos.x, adjustedPageY);\n var r = this._actualDoHitTestWithCaretRangeFromPoint(ctx, adjustedPage.toClientCoordinates());\n if (r.position) {\n return r;\n }\n // Also try to hit test without the adjustment (for the edge cases that we are near the top or bottom)\n return this._actualDoHitTestWithCaretRangeFromPoint(ctx, request.pos.toClientCoordinates());\n };\n MouseTargetFactory._actualDoHitTestWithCaretRangeFromPoint = function (ctx, coords) {\n var range = document.caretRangeFromPoint(coords.clientX, coords.clientY);\n if (!range || !range.startContainer) {\n return {\n position: null,\n hitTarget: null\n };\n }\n // Chrome always hits a TEXT_NODE, while Edge sometimes hits a token span\n var startContainer = range.startContainer;\n var hitTarget;\n if (startContainer.nodeType === startContainer.TEXT_NODE) {\n // startContainer is expected to be the token text\n var parent1 = startContainer.parentNode; // expected to be the token span\n var parent2 = parent1 ? parent1.parentNode : null; // expected to be the view line container span\n var parent3 = parent2 ? parent2.parentNode : null; // expected to be the view line div\n var parent3ClassName = parent3 && parent3.nodeType === parent3.ELEMENT_NODE ? parent3.className : null;\n if (parent3ClassName === ViewLine.CLASS_NAME) {\n var p = ctx.getPositionFromDOMInfo(parent1, range.startOffset);\n return {\n position: p,\n hitTarget: null\n };\n }\n else {\n hitTarget = startContainer.parentNode;\n }\n }\n else if (startContainer.nodeType === startContainer.ELEMENT_NODE) {\n // startContainer is expected to be the token span\n var parent1 = startContainer.parentNode; // expected to be the view line container span\n var parent2 = parent1 ? parent1.parentNode : null; // expected to be the view line div\n var parent2ClassName = parent2 && parent2.nodeType === parent2.ELEMENT_NODE ? parent2.className : null;\n if (parent2ClassName === ViewLine.CLASS_NAME) {\n var p = ctx.getPositionFromDOMInfo(startContainer, startContainer.textContent.length);\n return {\n position: p,\n hitTarget: null\n };\n }\n else {\n hitTarget = startContainer;\n }\n }\n return {\n position: null,\n hitTarget: hitTarget\n };\n };\n /**\n * Most probably Gecko\n */\n MouseTargetFactory._doHitTestWithCaretPositionFromPoint = function (ctx, coords) {\n var hitResult = document.caretPositionFromPoint(coords.clientX, coords.clientY);\n if (hitResult.offsetNode.nodeType === hitResult.offsetNode.TEXT_NODE) {\n // offsetNode is expected to be the token text\n var parent1 = hitResult.offsetNode.parentNode; // expected to be the token span\n var parent2 = parent1 ? parent1.parentNode : null; // expected to be the view line container span\n var parent3 = parent2 ? parent2.parentNode : null; // expected to be the view line div\n var parent3ClassName = parent3 && parent3.nodeType === parent3.ELEMENT_NODE ? parent3.className : null;\n if (parent3ClassName === ViewLine.CLASS_NAME) {\n var p = ctx.getPositionFromDOMInfo(hitResult.offsetNode.parentNode, hitResult.offset);\n return {\n position: p,\n hitTarget: null\n };\n }\n else {\n return {\n position: null,\n hitTarget: hitResult.offsetNode.parentNode\n };\n }\n }\n return {\n position: null,\n hitTarget: hitResult.offsetNode\n };\n };\n /**\n * Most probably IE\n */\n MouseTargetFactory._doHitTestWithMoveToPoint = function (ctx, coords) {\n var resultPosition = null;\n var resultHitTarget = null;\n var textRange = document.body.createTextRange();\n try {\n textRange.moveToPoint(coords.clientX, coords.clientY);\n }\n catch (err) {\n return {\n position: null,\n hitTarget: null\n };\n }\n textRange.collapse(true);\n // Now, let's do our best to figure out what we hit :)\n var parentElement = textRange ? textRange.parentElement() : null;\n var parent1 = parentElement ? parentElement.parentNode : null;\n var parent2 = parent1 ? parent1.parentNode : null;\n var parent2ClassName = parent2 && parent2.nodeType === parent2.ELEMENT_NODE ? parent2.className : '';\n if (parent2ClassName === ViewLine.CLASS_NAME) {\n var rangeToContainEntireSpan = textRange.duplicate();\n rangeToContainEntireSpan.moveToElementText(parentElement);\n rangeToContainEntireSpan.setEndPoint('EndToStart', textRange);\n resultPosition = ctx.getPositionFromDOMInfo(parentElement, rangeToContainEntireSpan.text.length);\n // Move range out of the span node, IE doesn't like having many ranges in\n // the same spot and will act badly for lines containing dashes ('-')\n rangeToContainEntireSpan.moveToElementText(ctx.viewDomNode);\n }\n else {\n // Looks like we've hit the hover or something foreign\n resultHitTarget = parentElement;\n }\n // Move range out of the span node, IE doesn't like having many ranges in\n // the same spot and will act badly for lines containing dashes ('-')\n textRange.moveToElementText(ctx.viewDomNode);\n return {\n position: resultPosition,\n hitTarget: resultHitTarget\n };\n };\n MouseTargetFactory._doHitTest = function (ctx, request) {\n // State of the art (18.10.2012):\n // The spec says browsers should support document.caretPositionFromPoint, but nobody implemented it (http://dev.w3.org/csswg/cssom-view/)\n // Gecko:\n // - they tried to implement it once, but failed: https://bugzilla.mozilla.org/show_bug.cgi?id=654352\n // - however, they do give out rangeParent/rangeOffset properties on mouse events\n // Webkit:\n // - they have implemented a previous version of the spec which was using document.caretRangeFromPoint\n // IE:\n // - they have a proprietary method on ranges, moveToPoint: https://msdn.microsoft.com/en-us/library/ie/ms536632(v=vs.85).aspx\n // 24.08.2016: Edge has added WebKit's document.caretRangeFromPoint, but it is quite buggy\n // - when hit testing the cursor it returns the first or the last line in the viewport\n // - it inconsistently hits text nodes or span nodes, while WebKit only hits text nodes\n // - when toggling render whitespace on, and hit testing in the empty content after a line, it always hits offset 0 of the first span of the line\n // Thank you browsers for making this so 'easy' :)\n if (document.caretRangeFromPoint) {\n return this._doHitTestWithCaretRangeFromPoint(ctx, request);\n }\n else if (document.caretPositionFromPoint) {\n return this._doHitTestWithCaretPositionFromPoint(ctx, request.pos.toClientCoordinates());\n }\n else if (document.body.createTextRange) {\n return this._doHitTestWithMoveToPoint(ctx, request.pos.toClientCoordinates());\n }\n return {\n position: null,\n hitTarget: null\n };\n };\n return MouseTargetFactory;\n}());\nexport { MouseTargetFactory };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { Disposable } from '../../../base/common/lifecycle';\nimport * as platform from '../../../base/common/platform';\nimport * as browser from '../../../base/browser/browser';\nimport * as dom from '../../../base/browser/dom';\nimport { Position } from '../../common/core/position';\nimport { Selection } from '../../common/core/selection';\nimport { ViewEventHandler } from '../../common/viewModel/viewEventHandler';\nimport { MouseTarget, MouseTargetFactory, HitTestContext } from './mouseTarget';\nimport * as editorBrowser from '../editorBrowser';\nimport { TimeoutTimer, RunOnceScheduler } from '../../../base/common/async';\nimport { EditorMouseEventFactory, GlobalEditorMouseMoveMonitor, createEditorPagePosition, ClientCoordinates } from '../editorDom';\nimport { StandardMouseWheelEvent } from '../../../base/browser/mouseEvent';\nimport { EditorZoom } from '../../common/config/editorZoom';\n/**\n * Merges mouse events when mouse move events are throttled\n */\nfunction createMouseMoveEventMerger(mouseTargetFactory) {\n return function (lastEvent, currentEvent) {\n var targetIsWidget = false;\n if (mouseTargetFactory) {\n targetIsWidget = mouseTargetFactory.mouseTargetIsWidget(currentEvent);\n }\n if (!targetIsWidget) {\n currentEvent.preventDefault();\n }\n return currentEvent;\n };\n}\nvar MouseHandler = /** @class */ (function (_super) {\n __extends(MouseHandler, _super);\n function MouseHandler(context, viewController, viewHelper) {\n var _this = _super.call(this) || this;\n _this._isFocused = false;\n _this._context = context;\n _this.viewController = viewController;\n _this.viewHelper = viewHelper;\n _this.mouseTargetFactory = new MouseTargetFactory(_this._context, viewHelper);\n _this._mouseDownOperation = _this._register(new MouseDownOperation(_this._context, _this.viewController, _this.viewHelper, function (e, testEventTarget) { return _this._createMouseTarget(e, testEventTarget); }, function (e) { return _this._getMouseColumn(e); }));\n _this._asyncFocus = _this._register(new RunOnceScheduler(function () { return _this.viewHelper.focusTextArea(); }, 0));\n _this.lastMouseLeaveTime = -1;\n var mouseEvents = new EditorMouseEventFactory(_this.viewHelper.viewDomNode);\n _this._register(mouseEvents.onContextMenu(_this.viewHelper.viewDomNode, function (e) { return _this._onContextMenu(e, true); }));\n _this._register(mouseEvents.onMouseMoveThrottled(_this.viewHelper.viewDomNode, function (e) { return _this._onMouseMove(e); }, createMouseMoveEventMerger(_this.mouseTargetFactory), MouseHandler.MOUSE_MOVE_MINIMUM_TIME));\n _this._register(mouseEvents.onMouseUp(_this.viewHelper.viewDomNode, function (e) { return _this._onMouseUp(e); }));\n _this._register(mouseEvents.onMouseLeave(_this.viewHelper.viewDomNode, function (e) { return _this._onMouseLeave(e); }));\n _this._register(mouseEvents.onMouseDown(_this.viewHelper.viewDomNode, function (e) { return _this._onMouseDown(e); }));\n var onMouseWheel = function (browserEvent) {\n if (!_this._context.configuration.editor.viewInfo.mouseWheelZoom) {\n return;\n }\n var e = new StandardMouseWheelEvent(browserEvent);\n if (e.browserEvent.ctrlKey || e.browserEvent.metaKey) {\n var zoomLevel = EditorZoom.getZoomLevel();\n var delta = e.deltaY > 0 ? 1 : -1;\n EditorZoom.setZoomLevel(zoomLevel + delta);\n e.preventDefault();\n e.stopPropagation();\n }\n };\n _this._register(dom.addDisposableListener(_this.viewHelper.viewDomNode, 'mousewheel', onMouseWheel, true));\n _this._register(dom.addDisposableListener(_this.viewHelper.viewDomNode, 'DOMMouseScroll', onMouseWheel, true));\n _this._context.addEventHandler(_this);\n return _this;\n }\n MouseHandler.prototype.dispose = function () {\n this._context.removeEventHandler(this);\n _super.prototype.dispose.call(this);\n };\n // --- begin event handlers\n MouseHandler.prototype.onCursorStateChanged = function (e) {\n this._mouseDownOperation.onCursorStateChanged(e);\n return false;\n };\n MouseHandler.prototype.onFocusChanged = function (e) {\n this._isFocused = e.isFocused;\n return false;\n };\n MouseHandler.prototype.onScrollChanged = function (e) {\n this._mouseDownOperation.onScrollChanged();\n return false;\n };\n // --- end event handlers\n MouseHandler.prototype.getTargetAtClientPoint = function (clientX, clientY) {\n var clientPos = new ClientCoordinates(clientX, clientY);\n var pos = clientPos.toPageCoordinates();\n var editorPos = createEditorPagePosition(this.viewHelper.viewDomNode);\n if (pos.y < editorPos.y || pos.y > editorPos.y + editorPos.height || pos.x < editorPos.x || pos.x > editorPos.x + editorPos.width) {\n return null;\n }\n var lastViewCursorsRenderData = this.viewHelper.getLastViewCursorsRenderData();\n return this.mouseTargetFactory.createMouseTarget(lastViewCursorsRenderData, editorPos, pos, null);\n };\n MouseHandler.prototype._createMouseTarget = function (e, testEventTarget) {\n var lastViewCursorsRenderData = this.viewHelper.getLastViewCursorsRenderData();\n return this.mouseTargetFactory.createMouseTarget(lastViewCursorsRenderData, e.editorPos, e.pos, testEventTarget ? e.target : null);\n };\n MouseHandler.prototype._getMouseColumn = function (e) {\n return this.mouseTargetFactory.getMouseColumn(e.editorPos, e.pos);\n };\n MouseHandler.prototype._onContextMenu = function (e, testEventTarget) {\n this.viewController.emitContextMenu({\n event: e,\n target: this._createMouseTarget(e, testEventTarget)\n });\n };\n MouseHandler.prototype._onMouseMove = function (e) {\n if (this._mouseDownOperation.isActive()) {\n // In selection/drag operation\n return;\n }\n var actualMouseMoveTime = e.timestamp;\n if (actualMouseMoveTime < this.lastMouseLeaveTime) {\n // Due to throttling, this event occurred before the mouse left the editor, therefore ignore it.\n return;\n }\n this.viewController.emitMouseMove({\n event: e,\n target: this._createMouseTarget(e, true)\n });\n };\n MouseHandler.prototype._onMouseLeave = function (e) {\n this.lastMouseLeaveTime = (new Date()).getTime();\n this.viewController.emitMouseLeave({\n event: e,\n target: null\n });\n };\n MouseHandler.prototype._onMouseUp = function (e) {\n this.viewController.emitMouseUp({\n event: e,\n target: this._createMouseTarget(e, true)\n });\n };\n MouseHandler.prototype._onMouseDown = function (e) {\n var _this = this;\n var t = this._createMouseTarget(e, true);\n var targetIsContent = (t.type === editorBrowser.MouseTargetType.CONTENT_TEXT || t.type === editorBrowser.MouseTargetType.CONTENT_EMPTY);\n var targetIsGutter = (t.type === editorBrowser.MouseTargetType.GUTTER_GLYPH_MARGIN || t.type === editorBrowser.MouseTargetType.GUTTER_LINE_NUMBERS || t.type === editorBrowser.MouseTargetType.GUTTER_LINE_DECORATIONS);\n var targetIsLineNumbers = (t.type === editorBrowser.MouseTargetType.GUTTER_LINE_NUMBERS);\n var selectOnLineNumbers = this._context.configuration.editor.viewInfo.selectOnLineNumbers;\n var targetIsViewZone = (t.type === editorBrowser.MouseTargetType.CONTENT_VIEW_ZONE || t.type === editorBrowser.MouseTargetType.GUTTER_VIEW_ZONE);\n var targetIsWidget = (t.type === editorBrowser.MouseTargetType.CONTENT_WIDGET);\n var shouldHandle = e.leftButton || e.middleButton;\n if (platform.isMacintosh && e.leftButton && e.ctrlKey) {\n shouldHandle = false;\n }\n var focus = function () {\n // In IE11, if the focus is in the browser's address bar and\n // then you click in the editor, calling preventDefault()\n // will not move focus properly (focus remains the address bar)\n if (browser.isIE && !_this._isFocused) {\n _this._asyncFocus.schedule();\n }\n else {\n e.preventDefault();\n _this.viewHelper.focusTextArea();\n }\n };\n if (shouldHandle && (targetIsContent || (targetIsLineNumbers && selectOnLineNumbers))) {\n focus();\n this._mouseDownOperation.start(t.type, e);\n }\n else if (targetIsGutter) {\n // Do not steal focus\n e.preventDefault();\n }\n else if (targetIsViewZone) {\n var viewZoneData = t.detail;\n if (this.viewHelper.shouldSuppressMouseDownOnViewZone(viewZoneData.viewZoneId)) {\n focus();\n this._mouseDownOperation.start(t.type, e);\n e.preventDefault();\n }\n }\n else if (targetIsWidget && this.viewHelper.shouldSuppressMouseDownOnWidget(t.detail)) {\n focus();\n e.preventDefault();\n }\n this.viewController.emitMouseDown({\n event: e,\n target: t\n });\n };\n MouseHandler.MOUSE_MOVE_MINIMUM_TIME = 100; // ms\n return MouseHandler;\n}(ViewEventHandler));\nexport { MouseHandler };\nvar MouseDownOperation = /** @class */ (function (_super) {\n __extends(MouseDownOperation, _super);\n function MouseDownOperation(context, viewController, viewHelper, createMouseTarget, getMouseColumn) {\n var _this = _super.call(this) || this;\n _this._context = context;\n _this._viewController = viewController;\n _this._viewHelper = viewHelper;\n _this._createMouseTarget = createMouseTarget;\n _this._getMouseColumn = getMouseColumn;\n _this._mouseMoveMonitor = _this._register(new GlobalEditorMouseMoveMonitor(_this._viewHelper.viewDomNode));\n _this._onScrollTimeout = _this._register(new TimeoutTimer());\n _this._mouseState = new MouseDownState();\n _this._currentSelection = new Selection(1, 1, 1, 1);\n _this._isActive = false;\n _this._lastMouseEvent = null;\n return _this;\n }\n MouseDownOperation.prototype.dispose = function () {\n _super.prototype.dispose.call(this);\n };\n MouseDownOperation.prototype.isActive = function () {\n return this._isActive;\n };\n MouseDownOperation.prototype._onMouseDownThenMove = function (e) {\n this._lastMouseEvent = e;\n this._mouseState.setModifiers(e);\n var position = this._findMousePosition(e, true);\n if (!position) {\n // Ignoring because position is unknown\n return;\n }\n if (this._mouseState.isDragAndDrop) {\n this._viewController.emitMouseDrag({\n event: e,\n target: position\n });\n }\n else {\n this._dispatchMouse(position, true);\n }\n };\n MouseDownOperation.prototype.start = function (targetType, e) {\n var _this = this;\n this._lastMouseEvent = e;\n this._mouseState.setStartedOnLineNumbers(targetType === editorBrowser.MouseTargetType.GUTTER_LINE_NUMBERS);\n this._mouseState.setStartButtons(e);\n this._mouseState.setModifiers(e);\n var position = this._findMousePosition(e, true);\n if (!position) {\n // Ignoring because position is unknown\n return;\n }\n this._mouseState.trySetCount(e.detail, position.position);\n // Overwrite the detail of the MouseEvent, as it will be sent out in an event and contributions might rely on it.\n e.detail = this._mouseState.count;\n if (!this._context.configuration.editor.readOnly\n && this._context.configuration.editor.dragAndDrop\n && !this._mouseState.altKey // we don't support multiple mouse\n && e.detail < 2 // only single click on a selection can work\n && !this._isActive // the mouse is not down yet\n && !this._currentSelection.isEmpty() // we don't drag single cursor\n && this._currentSelection.containsPosition(position.position) // single click on a selection\n ) {\n this._mouseState.isDragAndDrop = true;\n this._isActive = true;\n this._mouseMoveMonitor.startMonitoring(createMouseMoveEventMerger(null), function (e) { return _this._onMouseDownThenMove(e); }, function () {\n var position = _this._findMousePosition(_this._lastMouseEvent, true);\n _this._viewController.emitMouseDrop({\n event: _this._lastMouseEvent,\n target: position ? _this._createMouseTarget(_this._lastMouseEvent, true) : null // Ignoring because position is unknown, e.g., Content View Zone\n });\n _this._stop();\n });\n return;\n }\n this._mouseState.isDragAndDrop = false;\n this._dispatchMouse(position, e.shiftKey);\n if (!this._isActive) {\n this._isActive = true;\n this._mouseMoveMonitor.startMonitoring(createMouseMoveEventMerger(null), function (e) { return _this._onMouseDownThenMove(e); }, function () { return _this._stop(); });\n }\n };\n MouseDownOperation.prototype._stop = function () {\n this._isActive = false;\n this._onScrollTimeout.cancel();\n };\n MouseDownOperation.prototype.onScrollChanged = function () {\n var _this = this;\n if (!this._isActive) {\n return;\n }\n this._onScrollTimeout.setIfNotSet(function () {\n var position = _this._findMousePosition(_this._lastMouseEvent, false);\n if (!position) {\n // Ignoring because position is unknown\n return;\n }\n if (_this._mouseState.isDragAndDrop) {\n // Ignoring because users are dragging the text\n return;\n }\n _this._dispatchMouse(position, true);\n }, 10);\n };\n MouseDownOperation.prototype.onCursorStateChanged = function (e) {\n this._currentSelection = e.selections[0];\n };\n MouseDownOperation.prototype._getPositionOutsideEditor = function (e) {\n var editorContent = e.editorPos;\n var model = this._context.model;\n var viewLayout = this._context.viewLayout;\n var mouseColumn = this._getMouseColumn(e);\n if (e.posy < editorContent.y) {\n var verticalOffset = Math.max(viewLayout.getCurrentScrollTop() - (editorContent.y - e.posy), 0);\n var viewZoneData = HitTestContext.getZoneAtCoord(this._context, verticalOffset);\n if (viewZoneData) {\n var newPosition = this._helpPositionJumpOverViewZone(viewZoneData);\n if (newPosition) {\n return new MouseTarget(null, editorBrowser.MouseTargetType.OUTSIDE_EDITOR, mouseColumn, newPosition);\n }\n }\n var aboveLineNumber = viewLayout.getLineNumberAtVerticalOffset(verticalOffset);\n return new MouseTarget(null, editorBrowser.MouseTargetType.OUTSIDE_EDITOR, mouseColumn, new Position(aboveLineNumber, 1));\n }\n if (e.posy > editorContent.y + editorContent.height) {\n var verticalOffset = viewLayout.getCurrentScrollTop() + (e.posy - editorContent.y);\n var viewZoneData = HitTestContext.getZoneAtCoord(this._context, verticalOffset);\n if (viewZoneData) {\n var newPosition = this._helpPositionJumpOverViewZone(viewZoneData);\n if (newPosition) {\n return new MouseTarget(null, editorBrowser.MouseTargetType.OUTSIDE_EDITOR, mouseColumn, newPosition);\n }\n }\n var belowLineNumber = viewLayout.getLineNumberAtVerticalOffset(verticalOffset);\n return new MouseTarget(null, editorBrowser.MouseTargetType.OUTSIDE_EDITOR, mouseColumn, new Position(belowLineNumber, model.getLineMaxColumn(belowLineNumber)));\n }\n var possibleLineNumber = viewLayout.getLineNumberAtVerticalOffset(viewLayout.getCurrentScrollTop() + (e.posy - editorContent.y));\n if (e.posx < editorContent.x) {\n return new MouseTarget(null, editorBrowser.MouseTargetType.OUTSIDE_EDITOR, mouseColumn, new Position(possibleLineNumber, 1));\n }\n if (e.posx > editorContent.x + editorContent.width) {\n return new MouseTarget(null, editorBrowser.MouseTargetType.OUTSIDE_EDITOR, mouseColumn, new Position(possibleLineNumber, model.getLineMaxColumn(possibleLineNumber)));\n }\n return null;\n };\n MouseDownOperation.prototype._findMousePosition = function (e, testEventTarget) {\n var positionOutsideEditor = this._getPositionOutsideEditor(e);\n if (positionOutsideEditor) {\n return positionOutsideEditor;\n }\n var t = this._createMouseTarget(e, testEventTarget);\n var hintedPosition = t.position;\n if (!hintedPosition) {\n return null;\n }\n if (t.type === editorBrowser.MouseTargetType.CONTENT_VIEW_ZONE || t.type === editorBrowser.MouseTargetType.GUTTER_VIEW_ZONE) {\n var newPosition = this._helpPositionJumpOverViewZone(t.detail);\n if (newPosition) {\n return new MouseTarget(t.element, t.type, t.mouseColumn, newPosition, null, t.detail);\n }\n }\n return t;\n };\n MouseDownOperation.prototype._helpPositionJumpOverViewZone = function (viewZoneData) {\n // Force position on view zones to go above or below depending on where selection started from\n var selectionStart = new Position(this._currentSelection.selectionStartLineNumber, this._currentSelection.selectionStartColumn);\n var positionBefore = viewZoneData.positionBefore;\n var positionAfter = viewZoneData.positionAfter;\n if (positionBefore && positionAfter) {\n if (positionBefore.isBefore(selectionStart)) {\n return positionBefore;\n }\n else {\n return positionAfter;\n }\n }\n return null;\n };\n MouseDownOperation.prototype._dispatchMouse = function (position, inSelectionMode) {\n this._viewController.dispatchMouse({\n position: position.position,\n mouseColumn: position.mouseColumn,\n startedOnLineNumbers: this._mouseState.startedOnLineNumbers,\n inSelectionMode: inSelectionMode,\n mouseDownCount: this._mouseState.count,\n altKey: this._mouseState.altKey,\n ctrlKey: this._mouseState.ctrlKey,\n metaKey: this._mouseState.metaKey,\n shiftKey: this._mouseState.shiftKey,\n leftButton: this._mouseState.leftButton,\n middleButton: this._mouseState.middleButton,\n });\n };\n return MouseDownOperation;\n}(Disposable));\nvar MouseDownState = /** @class */ (function () {\n function MouseDownState() {\n this._altKey = false;\n this._ctrlKey = false;\n this._metaKey = false;\n this._shiftKey = false;\n this._leftButton = false;\n this._middleButton = false;\n this._startedOnLineNumbers = false;\n this._lastMouseDownPosition = null;\n this._lastMouseDownPositionEqualCount = 0;\n this._lastMouseDownCount = 0;\n this._lastSetMouseDownCountTime = 0;\n this.isDragAndDrop = false;\n }\n Object.defineProperty(MouseDownState.prototype, \"altKey\", {\n get: function () { return this._altKey; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(MouseDownState.prototype, \"ctrlKey\", {\n get: function () { return this._ctrlKey; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(MouseDownState.prototype, \"metaKey\", {\n get: function () { return this._metaKey; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(MouseDownState.prototype, \"shiftKey\", {\n get: function () { return this._shiftKey; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(MouseDownState.prototype, \"leftButton\", {\n get: function () { return this._leftButton; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(MouseDownState.prototype, \"middleButton\", {\n get: function () { return this._middleButton; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(MouseDownState.prototype, \"startedOnLineNumbers\", {\n get: function () { return this._startedOnLineNumbers; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(MouseDownState.prototype, \"count\", {\n get: function () {\n return this._lastMouseDownCount;\n },\n enumerable: true,\n configurable: true\n });\n MouseDownState.prototype.setModifiers = function (source) {\n this._altKey = source.altKey;\n this._ctrlKey = source.ctrlKey;\n this._metaKey = source.metaKey;\n this._shiftKey = source.shiftKey;\n };\n MouseDownState.prototype.setStartButtons = function (source) {\n this._leftButton = source.leftButton;\n this._middleButton = source.middleButton;\n };\n MouseDownState.prototype.setStartedOnLineNumbers = function (startedOnLineNumbers) {\n this._startedOnLineNumbers = startedOnLineNumbers;\n };\n MouseDownState.prototype.trySetCount = function (setMouseDownCount, newMouseDownPosition) {\n // a. Invalidate multiple clicking if too much time has passed (will be hit by IE because the detail field of mouse events contains garbage in IE10)\n var currentTime = (new Date()).getTime();\n if (currentTime - this._lastSetMouseDownCountTime > MouseDownState.CLEAR_MOUSE_DOWN_COUNT_TIME) {\n setMouseDownCount = 1;\n }\n this._lastSetMouseDownCountTime = currentTime;\n // b. Ensure that we don't jump from single click to triple click in one go (will be hit by IE because the detail field of mouse events contains garbage in IE10)\n if (setMouseDownCount > this._lastMouseDownCount + 1) {\n setMouseDownCount = this._lastMouseDownCount + 1;\n }\n // c. Invalidate multiple clicking if the logical position is different\n if (this._lastMouseDownPosition && this._lastMouseDownPosition.equals(newMouseDownPosition)) {\n this._lastMouseDownPositionEqualCount++;\n }\n else {\n this._lastMouseDownPositionEqualCount = 1;\n }\n this._lastMouseDownPosition = newMouseDownPosition;\n // Finally set the lastMouseDownCount\n this._lastMouseDownCount = Math.min(setMouseDownCount, this._lastMouseDownPositionEqualCount);\n };\n MouseDownState.CLEAR_MOUSE_DOWN_COUNT_TIME = 400; // ms\n return MouseDownState;\n}());\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport * as dom from '../../../base/browser/dom';\nimport { EventType, Gesture } from '../../../base/browser/touch';\nimport { MouseHandler } from './mouseHandler';\nimport { EditorMouseEvent } from '../editorDom';\nfunction gestureChangeEventMerger(lastEvent, currentEvent) {\n var r = {\n translationY: currentEvent.translationY,\n translationX: currentEvent.translationX\n };\n if (lastEvent) {\n r.translationY += lastEvent.translationY;\n r.translationX += lastEvent.translationX;\n }\n return r;\n}\n/**\n * Basically IE10 and IE11\n */\nvar MsPointerHandler = /** @class */ (function (_super) {\n __extends(MsPointerHandler, _super);\n function MsPointerHandler(context, viewController, viewHelper) {\n var _this = _super.call(this, context, viewController, viewHelper) || this;\n _this.viewHelper.linesContentDomNode.style.msTouchAction = 'none';\n _this.viewHelper.linesContentDomNode.style.msContentZooming = 'none';\n // TODO@Alex -> this expects that the view is added in 100 ms, might not be the case\n // This handler should be added when the dom node is in the dom tree\n _this._installGestureHandlerTimeout = window.setTimeout(function () {\n _this._installGestureHandlerTimeout = -1;\n if (window.MSGesture) {\n var touchGesture_1 = new MSGesture();\n var penGesture_1 = new MSGesture();\n touchGesture_1.target = _this.viewHelper.linesContentDomNode;\n penGesture_1.target = _this.viewHelper.linesContentDomNode;\n _this.viewHelper.linesContentDomNode.addEventListener('MSPointerDown', function (e) {\n // Circumvent IE11 breaking change in e.pointerType & TypeScript's stale definitions\n var pointerType = e.pointerType;\n if (pointerType === (e.MSPOINTER_TYPE_MOUSE || 'mouse')) {\n _this._lastPointerType = 'mouse';\n return;\n }\n else if (pointerType === (e.MSPOINTER_TYPE_TOUCH || 'touch')) {\n _this._lastPointerType = 'touch';\n touchGesture_1.addPointer(e.pointerId);\n }\n else {\n _this._lastPointerType = 'pen';\n penGesture_1.addPointer(e.pointerId);\n }\n });\n _this._register(dom.addDisposableThrottledListener(_this.viewHelper.linesContentDomNode, 'MSGestureChange', function (e) { return _this._onGestureChange(e); }, gestureChangeEventMerger));\n _this._register(dom.addDisposableListener(_this.viewHelper.linesContentDomNode, 'MSGestureTap', function (e) { return _this._onCaptureGestureTap(e); }, true));\n }\n }, 100);\n _this._lastPointerType = 'mouse';\n return _this;\n }\n MsPointerHandler.prototype._onMouseDown = function (e) {\n if (this._lastPointerType === 'mouse') {\n _super.prototype._onMouseDown.call(this, e);\n }\n };\n MsPointerHandler.prototype._onCaptureGestureTap = function (rawEvent) {\n var _this = this;\n var e = new EditorMouseEvent(rawEvent, this.viewHelper.viewDomNode);\n var t = this._createMouseTarget(e, false);\n if (t.position) {\n this.viewController.moveTo(t.position);\n }\n // IE does not want to focus when coming in from the browser's address bar\n if (e.browserEvent.fromElement) {\n e.preventDefault();\n this.viewHelper.focusTextArea();\n }\n else {\n // TODO@Alex -> cancel this is focus is lost\n setTimeout(function () {\n _this.viewHelper.focusTextArea();\n });\n }\n };\n MsPointerHandler.prototype._onGestureChange = function (e) {\n this._context.viewLayout.deltaScrollNow(-e.translationX, -e.translationY);\n };\n MsPointerHandler.prototype.dispose = function () {\n window.clearTimeout(this._installGestureHandlerTimeout);\n _super.prototype.dispose.call(this);\n };\n return MsPointerHandler;\n}(MouseHandler));\n/**\n * Basically Edge but should be modified to handle any pointerEnabled, even without support of MSGesture\n */\nvar StandardPointerHandler = /** @class */ (function (_super) {\n __extends(StandardPointerHandler, _super);\n function StandardPointerHandler(context, viewController, viewHelper) {\n var _this = _super.call(this, context, viewController, viewHelper) || this;\n _this.viewHelper.linesContentDomNode.style.touchAction = 'none';\n // TODO@Alex -> this expects that the view is added in 100 ms, might not be the case\n // This handler should be added when the dom node is in the dom tree\n _this._installGestureHandlerTimeout = window.setTimeout(function () {\n _this._installGestureHandlerTimeout = -1;\n // TODO@Alex: replace the usage of MSGesture here with something that works across all browsers\n if (window.MSGesture) {\n var touchGesture_2 = new MSGesture();\n var penGesture_2 = new MSGesture();\n touchGesture_2.target = _this.viewHelper.linesContentDomNode;\n penGesture_2.target = _this.viewHelper.linesContentDomNode;\n _this.viewHelper.linesContentDomNode.addEventListener('pointerdown', function (e) {\n var pointerType = e.pointerType;\n if (pointerType === 'mouse') {\n _this._lastPointerType = 'mouse';\n return;\n }\n else if (pointerType === 'touch') {\n _this._lastPointerType = 'touch';\n touchGesture_2.addPointer(e.pointerId);\n }\n else {\n _this._lastPointerType = 'pen';\n penGesture_2.addPointer(e.pointerId);\n }\n });\n _this._register(dom.addDisposableThrottledListener(_this.viewHelper.linesContentDomNode, 'MSGestureChange', function (e) { return _this._onGestureChange(e); }, gestureChangeEventMerger));\n _this._register(dom.addDisposableListener(_this.viewHelper.linesContentDomNode, 'MSGestureTap', function (e) { return _this._onCaptureGestureTap(e); }, true));\n }\n }, 100);\n _this._lastPointerType = 'mouse';\n return _this;\n }\n StandardPointerHandler.prototype._onMouseDown = function (e) {\n if (this._lastPointerType === 'mouse') {\n _super.prototype._onMouseDown.call(this, e);\n }\n };\n StandardPointerHandler.prototype._onCaptureGestureTap = function (rawEvent) {\n var _this = this;\n var e = new EditorMouseEvent(rawEvent, this.viewHelper.viewDomNode);\n var t = this._createMouseTarget(e, false);\n if (t.position) {\n this.viewController.moveTo(t.position);\n }\n // IE does not want to focus when coming in from the browser's address bar\n if (e.browserEvent.fromElement) {\n e.preventDefault();\n this.viewHelper.focusTextArea();\n }\n else {\n // TODO@Alex -> cancel this is focus is lost\n setTimeout(function () {\n _this.viewHelper.focusTextArea();\n });\n }\n };\n StandardPointerHandler.prototype._onGestureChange = function (e) {\n this._context.viewLayout.deltaScrollNow(-e.translationX, -e.translationY);\n };\n StandardPointerHandler.prototype.dispose = function () {\n window.clearTimeout(this._installGestureHandlerTimeout);\n _super.prototype.dispose.call(this);\n };\n return StandardPointerHandler;\n}(MouseHandler));\nvar TouchHandler = /** @class */ (function (_super) {\n __extends(TouchHandler, _super);\n function TouchHandler(context, viewController, viewHelper) {\n var _this = _super.call(this, context, viewController, viewHelper) || this;\n Gesture.addTarget(_this.viewHelper.linesContentDomNode);\n _this._register(dom.addDisposableListener(_this.viewHelper.linesContentDomNode, EventType.Tap, function (e) { return _this.onTap(e); }));\n _this._register(dom.addDisposableListener(_this.viewHelper.linesContentDomNode, EventType.Change, function (e) { return _this.onChange(e); }));\n _this._register(dom.addDisposableListener(_this.viewHelper.linesContentDomNode, EventType.Contextmenu, function (e) { return _this._onContextMenu(new EditorMouseEvent(e, _this.viewHelper.viewDomNode), false); }));\n return _this;\n }\n TouchHandler.prototype.dispose = function () {\n _super.prototype.dispose.call(this);\n };\n TouchHandler.prototype.onTap = function (event) {\n event.preventDefault();\n this.viewHelper.focusTextArea();\n var target = this._createMouseTarget(new EditorMouseEvent(event, this.viewHelper.viewDomNode), false);\n if (target.position) {\n this.viewController.moveTo(target.position);\n }\n };\n TouchHandler.prototype.onChange = function (e) {\n this._context.viewLayout.deltaScrollNow(-e.translationX, -e.translationY);\n };\n return TouchHandler;\n}(MouseHandler));\nvar PointerHandler = /** @class */ (function () {\n function PointerHandler(context, viewController, viewHelper) {\n if (window.navigator.msPointerEnabled) {\n this.handler = new MsPointerHandler(context, viewController, viewHelper);\n }\n else if (window.TouchEvent) {\n this.handler = new TouchHandler(context, viewController, viewHelper);\n }\n else if (window.navigator.pointerEnabled || window.PointerEvent) {\n this.handler = new StandardPointerHandler(context, viewController, viewHelper);\n }\n else {\n this.handler = new MouseHandler(context, viewController, viewHelper);\n }\n }\n PointerHandler.prototype.getTargetAtClientPoint = function (clientX, clientY) {\n return this.handler.getTargetAtClientPoint(clientX, clientY);\n };\n PointerHandler.prototype.dispose = function () {\n this.handler.dispose();\n };\n return PointerHandler;\n}());\nexport { PointerHandler };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport { Position } from '../../common/core/position';\nimport { CoreNavigationCommands } from '../controller/coreCommands';\nvar ViewController = /** @class */ (function () {\n function ViewController(configuration, viewModel, execCommandFunc, outgoingEvents, commandDelegate) {\n this.configuration = configuration;\n this.viewModel = viewModel;\n this._execCoreEditorCommandFunc = execCommandFunc;\n this.outgoingEvents = outgoingEvents;\n this.commandDelegate = commandDelegate;\n }\n ViewController.prototype._execMouseCommand = function (editorCommand, args) {\n args.source = 'mouse';\n this._execCoreEditorCommandFunc(editorCommand, args);\n };\n ViewController.prototype.paste = function (source, text, pasteOnNewLine, multicursorText) {\n this.commandDelegate.paste(source, text, pasteOnNewLine, multicursorText);\n };\n ViewController.prototype.type = function (source, text) {\n this.commandDelegate.type(source, text);\n };\n ViewController.prototype.replacePreviousChar = function (source, text, replaceCharCnt) {\n this.commandDelegate.replacePreviousChar(source, text, replaceCharCnt);\n };\n ViewController.prototype.compositionStart = function (source) {\n this.commandDelegate.compositionStart(source);\n };\n ViewController.prototype.compositionEnd = function (source) {\n this.commandDelegate.compositionEnd(source);\n };\n ViewController.prototype.cut = function (source) {\n this.commandDelegate.cut(source);\n };\n ViewController.prototype.setSelection = function (source, modelSelection) {\n this._execCoreEditorCommandFunc(CoreNavigationCommands.SetSelection, {\n source: source,\n selection: modelSelection\n });\n };\n ViewController.prototype._validateViewColumn = function (viewPosition) {\n var minColumn = this.viewModel.getLineMinColumn(viewPosition.lineNumber);\n if (viewPosition.column < minColumn) {\n return new Position(viewPosition.lineNumber, minColumn);\n }\n return viewPosition;\n };\n ViewController.prototype._hasMulticursorModifier = function (data) {\n switch (this.configuration.editor.multiCursorModifier) {\n case 'altKey':\n return data.altKey;\n case 'ctrlKey':\n return data.ctrlKey;\n case 'metaKey':\n return data.metaKey;\n }\n return false;\n };\n ViewController.prototype._hasNonMulticursorModifier = function (data) {\n switch (this.configuration.editor.multiCursorModifier) {\n case 'altKey':\n return data.ctrlKey || data.metaKey;\n case 'ctrlKey':\n return data.altKey || data.metaKey;\n case 'metaKey':\n return data.ctrlKey || data.altKey;\n }\n return false;\n };\n ViewController.prototype.dispatchMouse = function (data) {\n if (data.middleButton) {\n if (data.inSelectionMode) {\n this.columnSelect(data.position, data.mouseColumn);\n }\n else {\n this.moveTo(data.position);\n }\n }\n else if (data.startedOnLineNumbers) {\n // If the dragging started on the gutter, then have operations work on the entire line\n if (this._hasMulticursorModifier(data)) {\n if (data.inSelectionMode) {\n this.lastCursorLineSelect(data.position);\n }\n else {\n this.createCursor(data.position, true);\n }\n }\n else {\n if (data.inSelectionMode) {\n this.lineSelectDrag(data.position);\n }\n else {\n this.lineSelect(data.position);\n }\n }\n }\n else if (data.mouseDownCount >= 4) {\n this.selectAll();\n }\n else if (data.mouseDownCount === 3) {\n if (this._hasMulticursorModifier(data)) {\n if (data.inSelectionMode) {\n this.lastCursorLineSelectDrag(data.position);\n }\n else {\n this.lastCursorLineSelect(data.position);\n }\n }\n else {\n if (data.inSelectionMode) {\n this.lineSelectDrag(data.position);\n }\n else {\n this.lineSelect(data.position);\n }\n }\n }\n else if (data.mouseDownCount === 2) {\n if (this._hasMulticursorModifier(data)) {\n this.lastCursorWordSelect(data.position);\n }\n else {\n if (data.inSelectionMode) {\n this.wordSelectDrag(data.position);\n }\n else {\n this.wordSelect(data.position);\n }\n }\n }\n else {\n if (this._hasMulticursorModifier(data)) {\n if (!this._hasNonMulticursorModifier(data)) {\n if (data.shiftKey) {\n this.columnSelect(data.position, data.mouseColumn);\n }\n else {\n // Do multi-cursor operations only when purely alt is pressed\n if (data.inSelectionMode) {\n this.lastCursorMoveToSelect(data.position);\n }\n else {\n this.createCursor(data.position, false);\n }\n }\n }\n }\n else {\n if (data.inSelectionMode) {\n this.moveToSelect(data.position);\n }\n else {\n this.moveTo(data.position);\n }\n }\n }\n };\n ViewController.prototype._usualArgs = function (viewPosition) {\n viewPosition = this._validateViewColumn(viewPosition);\n return {\n position: this.convertViewToModelPosition(viewPosition),\n viewPosition: viewPosition\n };\n };\n ViewController.prototype.moveTo = function (viewPosition) {\n this._execMouseCommand(CoreNavigationCommands.MoveTo, this._usualArgs(viewPosition));\n };\n ViewController.prototype.moveToSelect = function (viewPosition) {\n this._execMouseCommand(CoreNavigationCommands.MoveToSelect, this._usualArgs(viewPosition));\n };\n ViewController.prototype.columnSelect = function (viewPosition, mouseColumn) {\n viewPosition = this._validateViewColumn(viewPosition);\n this._execMouseCommand(CoreNavigationCommands.ColumnSelect, {\n position: this.convertViewToModelPosition(viewPosition),\n viewPosition: viewPosition,\n mouseColumn: mouseColumn\n });\n };\n ViewController.prototype.createCursor = function (viewPosition, wholeLine) {\n viewPosition = this._validateViewColumn(viewPosition);\n this._execMouseCommand(CoreNavigationCommands.CreateCursor, {\n position: this.convertViewToModelPosition(viewPosition),\n viewPosition: viewPosition,\n wholeLine: wholeLine\n });\n };\n ViewController.prototype.lastCursorMoveToSelect = function (viewPosition) {\n this._execMouseCommand(CoreNavigationCommands.LastCursorMoveToSelect, this._usualArgs(viewPosition));\n };\n ViewController.prototype.wordSelect = function (viewPosition) {\n this._execMouseCommand(CoreNavigationCommands.WordSelect, this._usualArgs(viewPosition));\n };\n ViewController.prototype.wordSelectDrag = function (viewPosition) {\n this._execMouseCommand(CoreNavigationCommands.WordSelectDrag, this._usualArgs(viewPosition));\n };\n ViewController.prototype.lastCursorWordSelect = function (viewPosition) {\n this._execMouseCommand(CoreNavigationCommands.LastCursorWordSelect, this._usualArgs(viewPosition));\n };\n ViewController.prototype.lineSelect = function (viewPosition) {\n this._execMouseCommand(CoreNavigationCommands.LineSelect, this._usualArgs(viewPosition));\n };\n ViewController.prototype.lineSelectDrag = function (viewPosition) {\n this._execMouseCommand(CoreNavigationCommands.LineSelectDrag, this._usualArgs(viewPosition));\n };\n ViewController.prototype.lastCursorLineSelect = function (viewPosition) {\n this._execMouseCommand(CoreNavigationCommands.LastCursorLineSelect, this._usualArgs(viewPosition));\n };\n ViewController.prototype.lastCursorLineSelectDrag = function (viewPosition) {\n this._execMouseCommand(CoreNavigationCommands.LastCursorLineSelectDrag, this._usualArgs(viewPosition));\n };\n ViewController.prototype.selectAll = function () {\n this._execMouseCommand(CoreNavigationCommands.SelectAll, {});\n };\n // ----------------------\n ViewController.prototype.convertViewToModelPosition = function (viewPosition) {\n return this.viewModel.coordinatesConverter.convertViewPositionToModelPosition(viewPosition);\n };\n ViewController.prototype.emitKeyDown = function (e) {\n this.outgoingEvents.emitKeyDown(e);\n };\n ViewController.prototype.emitKeyUp = function (e) {\n this.outgoingEvents.emitKeyUp(e);\n };\n ViewController.prototype.emitContextMenu = function (e) {\n this.outgoingEvents.emitContextMenu(e);\n };\n ViewController.prototype.emitMouseMove = function (e) {\n this.outgoingEvents.emitMouseMove(e);\n };\n ViewController.prototype.emitMouseLeave = function (e) {\n this.outgoingEvents.emitMouseLeave(e);\n };\n ViewController.prototype.emitMouseUp = function (e) {\n this.outgoingEvents.emitMouseUp(e);\n };\n ViewController.prototype.emitMouseDown = function (e) {\n this.outgoingEvents.emitMouseDown(e);\n };\n ViewController.prototype.emitMouseDrag = function (e) {\n this.outgoingEvents.emitMouseDrag(e);\n };\n ViewController.prototype.emitMouseDrop = function (e) {\n this.outgoingEvents.emitMouseDrop(e);\n };\n return ViewController;\n}());\nexport { ViewController };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar ViewEventDispatcher = /** @class */ (function () {\n function ViewEventDispatcher(eventHandlerGateKeeper) {\n this._eventHandlerGateKeeper = eventHandlerGateKeeper;\n this._eventHandlers = [];\n this._eventQueue = null;\n this._isConsumingQueue = false;\n }\n ViewEventDispatcher.prototype.addEventHandler = function (eventHandler) {\n for (var i = 0, len = this._eventHandlers.length; i < len; i++) {\n if (this._eventHandlers[i] === eventHandler) {\n console.warn('Detected duplicate listener in ViewEventDispatcher', eventHandler);\n }\n }\n this._eventHandlers.push(eventHandler);\n };\n ViewEventDispatcher.prototype.removeEventHandler = function (eventHandler) {\n for (var i = 0; i < this._eventHandlers.length; i++) {\n if (this._eventHandlers[i] === eventHandler) {\n this._eventHandlers.splice(i, 1);\n break;\n }\n }\n };\n ViewEventDispatcher.prototype.emit = function (event) {\n if (this._eventQueue) {\n this._eventQueue.push(event);\n }\n else {\n this._eventQueue = [event];\n }\n if (!this._isConsumingQueue) {\n this.consumeQueue();\n }\n };\n ViewEventDispatcher.prototype.emitMany = function (events) {\n if (this._eventQueue) {\n this._eventQueue = this._eventQueue.concat(events);\n }\n else {\n this._eventQueue = events;\n }\n if (!this._isConsumingQueue) {\n this.consumeQueue();\n }\n };\n ViewEventDispatcher.prototype.consumeQueue = function () {\n var _this = this;\n this._eventHandlerGateKeeper(function () {\n try {\n _this._isConsumingQueue = true;\n _this._doConsumeQueue();\n }\n finally {\n _this._isConsumingQueue = false;\n }\n });\n };\n ViewEventDispatcher.prototype._doConsumeQueue = function () {\n while (this._eventQueue) {\n // Empty event queue, as events might come in while sending these off\n var events = this._eventQueue;\n this._eventQueue = null;\n // Use a clone of the event handlers list, as they might remove themselves\n var eventHandlers = this._eventHandlers.slice(0);\n for (var i = 0, len = eventHandlers.length; i < len; i++) {\n eventHandlers[i].handleEvents(events);\n }\n }\n };\n return ViewEventDispatcher;\n}());\nexport { ViewEventDispatcher };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport { createFastDomNode } from '../../../base/browser/fastDomNode';\nimport { createStringBuilder } from '../../common/core/stringBuilder';\nvar RenderedLinesCollection = /** @class */ (function () {\n function RenderedLinesCollection(createLine) {\n this._createLine = createLine;\n this._set(1, []);\n }\n RenderedLinesCollection.prototype.flush = function () {\n this._set(1, []);\n };\n RenderedLinesCollection.prototype._set = function (rendLineNumberStart, lines) {\n this._lines = lines;\n this._rendLineNumberStart = rendLineNumberStart;\n };\n RenderedLinesCollection.prototype._get = function () {\n return {\n rendLineNumberStart: this._rendLineNumberStart,\n lines: this._lines\n };\n };\n /**\n * @returns Inclusive line number that is inside this collection\n */\n RenderedLinesCollection.prototype.getStartLineNumber = function () {\n return this._rendLineNumberStart;\n };\n /**\n * @returns Inclusive line number that is inside this collection\n */\n RenderedLinesCollection.prototype.getEndLineNumber = function () {\n return this._rendLineNumberStart + this._lines.length - 1;\n };\n RenderedLinesCollection.prototype.getCount = function () {\n return this._lines.length;\n };\n RenderedLinesCollection.prototype.getLine = function (lineNumber) {\n var lineIndex = lineNumber - this._rendLineNumberStart;\n if (lineIndex < 0 || lineIndex >= this._lines.length) {\n throw new Error('Illegal value for lineNumber');\n }\n return this._lines[lineIndex];\n };\n /**\n * @returns Lines that were removed from this collection\n */\n RenderedLinesCollection.prototype.onLinesDeleted = function (deleteFromLineNumber, deleteToLineNumber) {\n if (this.getCount() === 0) {\n // no lines\n return null;\n }\n var startLineNumber = this.getStartLineNumber();\n var endLineNumber = this.getEndLineNumber();\n if (deleteToLineNumber < startLineNumber) {\n // deleting above the viewport\n var deleteCnt = deleteToLineNumber - deleteFromLineNumber + 1;\n this._rendLineNumberStart -= deleteCnt;\n return null;\n }\n if (deleteFromLineNumber > endLineNumber) {\n // deleted below the viewport\n return null;\n }\n // Record what needs to be deleted\n var deleteStartIndex = 0;\n var deleteCount = 0;\n for (var lineNumber = startLineNumber; lineNumber <= endLineNumber; lineNumber++) {\n var lineIndex = lineNumber - this._rendLineNumberStart;\n if (deleteFromLineNumber <= lineNumber && lineNumber <= deleteToLineNumber) {\n // this is a line to be deleted\n if (deleteCount === 0) {\n // this is the first line to be deleted\n deleteStartIndex = lineIndex;\n deleteCount = 1;\n }\n else {\n deleteCount++;\n }\n }\n }\n // Adjust this._rendLineNumberStart for lines deleted above\n if (deleteFromLineNumber < startLineNumber) {\n // Something was deleted above\n var deleteAboveCount = 0;\n if (deleteToLineNumber < startLineNumber) {\n // the entire deleted lines are above\n deleteAboveCount = deleteToLineNumber - deleteFromLineNumber + 1;\n }\n else {\n deleteAboveCount = startLineNumber - deleteFromLineNumber;\n }\n this._rendLineNumberStart -= deleteAboveCount;\n }\n var deleted = this._lines.splice(deleteStartIndex, deleteCount);\n return deleted;\n };\n RenderedLinesCollection.prototype.onLinesChanged = function (changeFromLineNumber, changeToLineNumber) {\n if (this.getCount() === 0) {\n // no lines\n return false;\n }\n var startLineNumber = this.getStartLineNumber();\n var endLineNumber = this.getEndLineNumber();\n var someoneNotified = false;\n for (var changedLineNumber = changeFromLineNumber; changedLineNumber <= changeToLineNumber; changedLineNumber++) {\n if (changedLineNumber >= startLineNumber && changedLineNumber <= endLineNumber) {\n // Notify the line\n this._lines[changedLineNumber - this._rendLineNumberStart].onContentChanged();\n someoneNotified = true;\n }\n }\n return someoneNotified;\n };\n RenderedLinesCollection.prototype.onLinesInserted = function (insertFromLineNumber, insertToLineNumber) {\n if (this.getCount() === 0) {\n // no lines\n return null;\n }\n var insertCnt = insertToLineNumber - insertFromLineNumber + 1;\n var startLineNumber = this.getStartLineNumber();\n var endLineNumber = this.getEndLineNumber();\n if (insertFromLineNumber <= startLineNumber) {\n // inserting above the viewport\n this._rendLineNumberStart += insertCnt;\n return null;\n }\n if (insertFromLineNumber > endLineNumber) {\n // inserting below the viewport\n return null;\n }\n if (insertCnt + insertFromLineNumber > endLineNumber) {\n // insert inside the viewport in such a way that all remaining lines are pushed outside\n var deleted = this._lines.splice(insertFromLineNumber - this._rendLineNumberStart, endLineNumber - insertFromLineNumber + 1);\n return deleted;\n }\n // insert inside the viewport, push out some lines, but not all remaining lines\n var newLines = [];\n for (var i = 0; i < insertCnt; i++) {\n newLines[i] = this._createLine();\n }\n var insertIndex = insertFromLineNumber - this._rendLineNumberStart;\n var beforeLines = this._lines.slice(0, insertIndex);\n var afterLines = this._lines.slice(insertIndex, this._lines.length - insertCnt);\n var deletedLines = this._lines.slice(this._lines.length - insertCnt, this._lines.length);\n this._lines = beforeLines.concat(newLines).concat(afterLines);\n return deletedLines;\n };\n RenderedLinesCollection.prototype.onTokensChanged = function (ranges) {\n if (this.getCount() === 0) {\n // no lines\n return false;\n }\n var startLineNumber = this.getStartLineNumber();\n var endLineNumber = this.getEndLineNumber();\n var notifiedSomeone = false;\n for (var i = 0, len = ranges.length; i < len; i++) {\n var rng = ranges[i];\n if (rng.toLineNumber < startLineNumber || rng.fromLineNumber > endLineNumber) {\n // range outside viewport\n continue;\n }\n var from = Math.max(startLineNumber, rng.fromLineNumber);\n var to = Math.min(endLineNumber, rng.toLineNumber);\n for (var lineNumber = from; lineNumber <= to; lineNumber++) {\n var lineIndex = lineNumber - this._rendLineNumberStart;\n this._lines[lineIndex].onTokensChanged();\n notifiedSomeone = true;\n }\n }\n return notifiedSomeone;\n };\n return RenderedLinesCollection;\n}());\nexport { RenderedLinesCollection };\nvar VisibleLinesCollection = /** @class */ (function () {\n function VisibleLinesCollection(host) {\n var _this = this;\n this._host = host;\n this.domNode = this._createDomNode();\n this._linesCollection = new RenderedLinesCollection(function () { return _this._host.createVisibleLine(); });\n }\n VisibleLinesCollection.prototype._createDomNode = function () {\n var domNode = createFastDomNode(document.createElement('div'));\n domNode.setClassName('view-layer');\n domNode.setPosition('absolute');\n domNode.domNode.setAttribute('role', 'presentation');\n domNode.domNode.setAttribute('aria-hidden', 'true');\n return domNode;\n };\n // ---- begin view event handlers\n VisibleLinesCollection.prototype.onConfigurationChanged = function (e) {\n return e.layoutInfo;\n };\n VisibleLinesCollection.prototype.onFlushed = function (e) {\n this._linesCollection.flush();\n // No need to clear the dom node because a full .innerHTML will occur in ViewLayerRenderer._render\n return true;\n };\n VisibleLinesCollection.prototype.onLinesChanged = function (e) {\n return this._linesCollection.onLinesChanged(e.fromLineNumber, e.toLineNumber);\n };\n VisibleLinesCollection.prototype.onLinesDeleted = function (e) {\n var deleted = this._linesCollection.onLinesDeleted(e.fromLineNumber, e.toLineNumber);\n if (deleted) {\n // Remove from DOM\n for (var i = 0, len = deleted.length; i < len; i++) {\n var lineDomNode = deleted[i].getDomNode();\n if (lineDomNode) {\n this.domNode.domNode.removeChild(lineDomNode);\n }\n }\n }\n return true;\n };\n VisibleLinesCollection.prototype.onLinesInserted = function (e) {\n var deleted = this._linesCollection.onLinesInserted(e.fromLineNumber, e.toLineNumber);\n if (deleted) {\n // Remove from DOM\n for (var i = 0, len = deleted.length; i < len; i++) {\n var lineDomNode = deleted[i].getDomNode();\n if (lineDomNode) {\n this.domNode.domNode.removeChild(lineDomNode);\n }\n }\n }\n return true;\n };\n VisibleLinesCollection.prototype.onScrollChanged = function (e) {\n return e.scrollTopChanged;\n };\n VisibleLinesCollection.prototype.onTokensChanged = function (e) {\n return this._linesCollection.onTokensChanged(e.ranges);\n };\n VisibleLinesCollection.prototype.onZonesChanged = function (e) {\n return true;\n };\n // ---- end view event handlers\n VisibleLinesCollection.prototype.getStartLineNumber = function () {\n return this._linesCollection.getStartLineNumber();\n };\n VisibleLinesCollection.prototype.getEndLineNumber = function () {\n return this._linesCollection.getEndLineNumber();\n };\n VisibleLinesCollection.prototype.getVisibleLine = function (lineNumber) {\n return this._linesCollection.getLine(lineNumber);\n };\n VisibleLinesCollection.prototype.renderLines = function (viewportData) {\n var inp = this._linesCollection._get();\n var renderer = new ViewLayerRenderer(this.domNode.domNode, this._host, viewportData);\n var ctx = {\n rendLineNumberStart: inp.rendLineNumberStart,\n lines: inp.lines,\n linesLength: inp.lines.length\n };\n // Decide if this render will do a single update (single large .innerHTML) or many updates (inserting/removing dom nodes)\n var resCtx = renderer.render(ctx, viewportData.startLineNumber, viewportData.endLineNumber, viewportData.relativeVerticalOffset);\n this._linesCollection._set(resCtx.rendLineNumberStart, resCtx.lines);\n };\n return VisibleLinesCollection;\n}());\nexport { VisibleLinesCollection };\nvar ViewLayerRenderer = /** @class */ (function () {\n function ViewLayerRenderer(domNode, host, viewportData) {\n this.domNode = domNode;\n this.host = host;\n this.viewportData = viewportData;\n }\n ViewLayerRenderer.prototype.render = function (inContext, startLineNumber, stopLineNumber, deltaTop) {\n var ctx = {\n rendLineNumberStart: inContext.rendLineNumberStart,\n lines: inContext.lines.slice(0),\n linesLength: inContext.linesLength\n };\n if ((ctx.rendLineNumberStart + ctx.linesLength - 1 < startLineNumber) || (stopLineNumber < ctx.rendLineNumberStart)) {\n // There is no overlap whatsoever\n ctx.rendLineNumberStart = startLineNumber;\n ctx.linesLength = stopLineNumber - startLineNumber + 1;\n ctx.lines = [];\n for (var x = startLineNumber; x <= stopLineNumber; x++) {\n ctx.lines[x - startLineNumber] = this.host.createVisibleLine();\n }\n this._finishRendering(ctx, true, deltaTop);\n return ctx;\n }\n // Update lines which will remain untouched\n this._renderUntouchedLines(ctx, Math.max(startLineNumber - ctx.rendLineNumberStart, 0), Math.min(stopLineNumber - ctx.rendLineNumberStart, ctx.linesLength - 1), deltaTop, startLineNumber);\n if (ctx.rendLineNumberStart > startLineNumber) {\n // Insert lines before\n var fromLineNumber = startLineNumber;\n var toLineNumber = Math.min(stopLineNumber, ctx.rendLineNumberStart - 1);\n if (fromLineNumber <= toLineNumber) {\n this._insertLinesBefore(ctx, fromLineNumber, toLineNumber, deltaTop, startLineNumber);\n ctx.linesLength += toLineNumber - fromLineNumber + 1;\n }\n }\n else if (ctx.rendLineNumberStart < startLineNumber) {\n // Remove lines before\n var removeCnt = Math.min(ctx.linesLength, startLineNumber - ctx.rendLineNumberStart);\n if (removeCnt > 0) {\n this._removeLinesBefore(ctx, removeCnt);\n ctx.linesLength -= removeCnt;\n }\n }\n ctx.rendLineNumberStart = startLineNumber;\n if (ctx.rendLineNumberStart + ctx.linesLength - 1 < stopLineNumber) {\n // Insert lines after\n var fromLineNumber = ctx.rendLineNumberStart + ctx.linesLength;\n var toLineNumber = stopLineNumber;\n if (fromLineNumber <= toLineNumber) {\n this._insertLinesAfter(ctx, fromLineNumber, toLineNumber, deltaTop, startLineNumber);\n ctx.linesLength += toLineNumber - fromLineNumber + 1;\n }\n }\n else if (ctx.rendLineNumberStart + ctx.linesLength - 1 > stopLineNumber) {\n // Remove lines after\n var fromLineNumber = Math.max(0, stopLineNumber - ctx.rendLineNumberStart + 1);\n var toLineNumber = ctx.linesLength - 1;\n var removeCnt = toLineNumber - fromLineNumber + 1;\n if (removeCnt > 0) {\n this._removeLinesAfter(ctx, removeCnt);\n ctx.linesLength -= removeCnt;\n }\n }\n this._finishRendering(ctx, false, deltaTop);\n return ctx;\n };\n ViewLayerRenderer.prototype._renderUntouchedLines = function (ctx, startIndex, endIndex, deltaTop, deltaLN) {\n var rendLineNumberStart = ctx.rendLineNumberStart;\n var lines = ctx.lines;\n for (var i = startIndex; i <= endIndex; i++) {\n var lineNumber = rendLineNumberStart + i;\n lines[i].layoutLine(lineNumber, deltaTop[lineNumber - deltaLN]);\n }\n };\n ViewLayerRenderer.prototype._insertLinesBefore = function (ctx, fromLineNumber, toLineNumber, deltaTop, deltaLN) {\n var newLines = [];\n var newLinesLen = 0;\n for (var lineNumber = fromLineNumber; lineNumber <= toLineNumber; lineNumber++) {\n newLines[newLinesLen++] = this.host.createVisibleLine();\n }\n ctx.lines = newLines.concat(ctx.lines);\n };\n ViewLayerRenderer.prototype._removeLinesBefore = function (ctx, removeCount) {\n for (var i = 0; i < removeCount; i++) {\n var lineDomNode = ctx.lines[i].getDomNode();\n if (lineDomNode) {\n this.domNode.removeChild(lineDomNode);\n }\n }\n ctx.lines.splice(0, removeCount);\n };\n ViewLayerRenderer.prototype._insertLinesAfter = function (ctx, fromLineNumber, toLineNumber, deltaTop, deltaLN) {\n var newLines = [];\n var newLinesLen = 0;\n for (var lineNumber = fromLineNumber; lineNumber <= toLineNumber; lineNumber++) {\n newLines[newLinesLen++] = this.host.createVisibleLine();\n }\n ctx.lines = ctx.lines.concat(newLines);\n };\n ViewLayerRenderer.prototype._removeLinesAfter = function (ctx, removeCount) {\n var removeIndex = ctx.linesLength - removeCount;\n for (var i = 0; i < removeCount; i++) {\n var lineDomNode = ctx.lines[removeIndex + i].getDomNode();\n if (lineDomNode) {\n this.domNode.removeChild(lineDomNode);\n }\n }\n ctx.lines.splice(removeIndex, removeCount);\n };\n ViewLayerRenderer.prototype._finishRenderingNewLines = function (ctx, domNodeIsEmpty, newLinesHTML, wasNew) {\n var lastChild = this.domNode.lastChild;\n if (domNodeIsEmpty || !lastChild) {\n this.domNode.innerHTML = newLinesHTML;\n }\n else {\n lastChild.insertAdjacentHTML('afterend', newLinesHTML);\n }\n var currChild = this.domNode.lastChild;\n for (var i = ctx.linesLength - 1; i >= 0; i--) {\n var line = ctx.lines[i];\n if (wasNew[i]) {\n line.setDomNode(currChild);\n currChild = currChild.previousSibling;\n }\n }\n };\n ViewLayerRenderer.prototype._finishRenderingInvalidLines = function (ctx, invalidLinesHTML, wasInvalid) {\n var hugeDomNode = document.createElement('div');\n hugeDomNode.innerHTML = invalidLinesHTML;\n for (var i = 0; i < ctx.linesLength; i++) {\n var line = ctx.lines[i];\n if (wasInvalid[i]) {\n var source = hugeDomNode.firstChild;\n var lineDomNode = line.getDomNode();\n lineDomNode.parentNode.replaceChild(source, lineDomNode);\n line.setDomNode(source);\n }\n }\n };\n ViewLayerRenderer.prototype._finishRendering = function (ctx, domNodeIsEmpty, deltaTop) {\n var sb = ViewLayerRenderer._sb;\n var linesLength = ctx.linesLength;\n var lines = ctx.lines;\n var rendLineNumberStart = ctx.rendLineNumberStart;\n var wasNew = [];\n {\n sb.reset();\n var hadNewLine = false;\n for (var i = 0; i < linesLength; i++) {\n var line = lines[i];\n wasNew[i] = false;\n var lineDomNode = line.getDomNode();\n if (lineDomNode) {\n // line is not new\n continue;\n }\n var renderResult = line.renderLine(i + rendLineNumberStart, deltaTop[i], this.viewportData, sb);\n if (!renderResult) {\n // line does not need rendering\n continue;\n }\n wasNew[i] = true;\n hadNewLine = true;\n }\n if (hadNewLine) {\n this._finishRenderingNewLines(ctx, domNodeIsEmpty, sb.build(), wasNew);\n }\n }\n {\n sb.reset();\n var hadInvalidLine = false;\n var wasInvalid = [];\n for (var i = 0; i < linesLength; i++) {\n var line = lines[i];\n wasInvalid[i] = false;\n if (wasNew[i]) {\n // line was new\n continue;\n }\n var renderResult = line.renderLine(i + rendLineNumberStart, deltaTop[i], this.viewportData, sb);\n if (!renderResult) {\n // line does not need rendering\n continue;\n }\n wasInvalid[i] = true;\n hadInvalidLine = true;\n }\n if (hadInvalidLine) {\n this._finishRenderingInvalidLines(ctx, sb.build(), wasInvalid);\n }\n }\n };\n ViewLayerRenderer._sb = createStringBuilder(100000);\n return ViewLayerRenderer;\n}());\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { createFastDomNode } from '../../../base/browser/fastDomNode';\nimport { VisibleLinesCollection } from './viewLayer';\nimport { Configuration } from '../config/configuration';\nimport { ViewPart } from './viewPart';\nvar ViewOverlays = /** @class */ (function (_super) {\n __extends(ViewOverlays, _super);\n function ViewOverlays(context) {\n var _this = _super.call(this, context) || this;\n _this._visibleLines = new VisibleLinesCollection(_this);\n _this.domNode = _this._visibleLines.domNode;\n _this._dynamicOverlays = [];\n _this._isFocused = false;\n _this.domNode.setClassName('view-overlays');\n return _this;\n }\n ViewOverlays.prototype.shouldRender = function () {\n if (_super.prototype.shouldRender.call(this)) {\n return true;\n }\n for (var i = 0, len = this._dynamicOverlays.length; i < len; i++) {\n var dynamicOverlay = this._dynamicOverlays[i];\n if (dynamicOverlay.shouldRender()) {\n return true;\n }\n }\n return false;\n };\n ViewOverlays.prototype.dispose = function () {\n _super.prototype.dispose.call(this);\n for (var i = 0, len = this._dynamicOverlays.length; i < len; i++) {\n var dynamicOverlay = this._dynamicOverlays[i];\n dynamicOverlay.dispose();\n }\n this._dynamicOverlays = null;\n };\n ViewOverlays.prototype.getDomNode = function () {\n return this.domNode;\n };\n // ---- begin IVisibleLinesHost\n ViewOverlays.prototype.createVisibleLine = function () {\n return new ViewOverlayLine(this._context.configuration, this._dynamicOverlays);\n };\n // ---- end IVisibleLinesHost\n ViewOverlays.prototype.addDynamicOverlay = function (overlay) {\n this._dynamicOverlays.push(overlay);\n };\n // ----- event handlers\n ViewOverlays.prototype.onConfigurationChanged = function (e) {\n this._visibleLines.onConfigurationChanged(e);\n var startLineNumber = this._visibleLines.getStartLineNumber();\n var endLineNumber = this._visibleLines.getEndLineNumber();\n for (var lineNumber = startLineNumber; lineNumber <= endLineNumber; lineNumber++) {\n var line = this._visibleLines.getVisibleLine(lineNumber);\n line.onConfigurationChanged(e);\n }\n return true;\n };\n ViewOverlays.prototype.onFlushed = function (e) {\n return this._visibleLines.onFlushed(e);\n };\n ViewOverlays.prototype.onFocusChanged = function (e) {\n this._isFocused = e.isFocused;\n return true;\n };\n ViewOverlays.prototype.onLinesChanged = function (e) {\n return this._visibleLines.onLinesChanged(e);\n };\n ViewOverlays.prototype.onLinesDeleted = function (e) {\n return this._visibleLines.onLinesDeleted(e);\n };\n ViewOverlays.prototype.onLinesInserted = function (e) {\n return this._visibleLines.onLinesInserted(e);\n };\n ViewOverlays.prototype.onScrollChanged = function (e) {\n return this._visibleLines.onScrollChanged(e) || true;\n };\n ViewOverlays.prototype.onTokensChanged = function (e) {\n return this._visibleLines.onTokensChanged(e);\n };\n ViewOverlays.prototype.onZonesChanged = function (e) {\n return this._visibleLines.onZonesChanged(e);\n };\n // ----- end event handlers\n ViewOverlays.prototype.prepareRender = function (ctx) {\n var toRender = this._dynamicOverlays.filter(function (overlay) { return overlay.shouldRender(); });\n for (var i = 0, len = toRender.length; i < len; i++) {\n var dynamicOverlay = toRender[i];\n dynamicOverlay.prepareRender(ctx);\n dynamicOverlay.onDidRender();\n }\n return null;\n };\n ViewOverlays.prototype.render = function (ctx) {\n // Overwriting to bypass `shouldRender` flag\n this._viewOverlaysRender(ctx);\n this.domNode.toggleClassName('focused', this._isFocused);\n };\n ViewOverlays.prototype._viewOverlaysRender = function (ctx) {\n this._visibleLines.renderLines(ctx.viewportData);\n };\n return ViewOverlays;\n}(ViewPart));\nexport { ViewOverlays };\nvar ViewOverlayLine = /** @class */ (function () {\n function ViewOverlayLine(configuration, dynamicOverlays) {\n this._configuration = configuration;\n this._lineHeight = this._configuration.editor.lineHeight;\n this._dynamicOverlays = dynamicOverlays;\n this._domNode = null;\n this._renderedContent = null;\n }\n ViewOverlayLine.prototype.getDomNode = function () {\n if (!this._domNode) {\n return null;\n }\n return this._domNode.domNode;\n };\n ViewOverlayLine.prototype.setDomNode = function (domNode) {\n this._domNode = createFastDomNode(domNode);\n };\n ViewOverlayLine.prototype.onContentChanged = function () {\n // Nothing\n };\n ViewOverlayLine.prototype.onTokensChanged = function () {\n // Nothing\n };\n ViewOverlayLine.prototype.onConfigurationChanged = function (e) {\n if (e.lineHeight) {\n this._lineHeight = this._configuration.editor.lineHeight;\n }\n };\n ViewOverlayLine.prototype.renderLine = function (lineNumber, deltaTop, viewportData, sb) {\n var result = '';\n for (var i = 0, len = this._dynamicOverlays.length; i < len; i++) {\n var dynamicOverlay = this._dynamicOverlays[i];\n result += dynamicOverlay.render(viewportData.startLineNumber, lineNumber);\n }\n if (this._renderedContent === result) {\n // No rendering needed\n return false;\n }\n this._renderedContent = result;\n sb.appendASCIIString('
    ');\n sb.appendASCIIString(result);\n sb.appendASCIIString('
    ');\n return true;\n };\n ViewOverlayLine.prototype.layoutLine = function (lineNumber, deltaTop) {\n if (this._domNode) {\n this._domNode.setTop(deltaTop);\n this._domNode.setHeight(this._lineHeight);\n }\n };\n return ViewOverlayLine;\n}());\nexport { ViewOverlayLine };\nvar ContentViewOverlays = /** @class */ (function (_super) {\n __extends(ContentViewOverlays, _super);\n function ContentViewOverlays(context) {\n var _this = _super.call(this, context) || this;\n _this._contentWidth = _this._context.configuration.editor.layoutInfo.contentWidth;\n _this.domNode.setHeight(0);\n return _this;\n }\n // --- begin event handlers\n ContentViewOverlays.prototype.onConfigurationChanged = function (e) {\n if (e.layoutInfo) {\n this._contentWidth = this._context.configuration.editor.layoutInfo.contentWidth;\n }\n return _super.prototype.onConfigurationChanged.call(this, e);\n };\n ContentViewOverlays.prototype.onScrollChanged = function (e) {\n return _super.prototype.onScrollChanged.call(this, e) || e.scrollWidthChanged;\n };\n // --- end event handlers\n ContentViewOverlays.prototype._viewOverlaysRender = function (ctx) {\n _super.prototype._viewOverlaysRender.call(this, ctx);\n this.domNode.setWidth(Math.max(ctx.scrollWidth, this._contentWidth));\n };\n return ContentViewOverlays;\n}(ViewOverlays));\nexport { ContentViewOverlays };\nvar MarginViewOverlays = /** @class */ (function (_super) {\n __extends(MarginViewOverlays, _super);\n function MarginViewOverlays(context) {\n var _this = _super.call(this, context) || this;\n _this._contentLeft = _this._context.configuration.editor.layoutInfo.contentLeft;\n _this.domNode.setClassName('margin-view-overlays');\n _this.domNode.setWidth(1);\n Configuration.applyFontInfo(_this.domNode, _this._context.configuration.editor.fontInfo);\n return _this;\n }\n MarginViewOverlays.prototype.onConfigurationChanged = function (e) {\n var shouldRender = false;\n if (e.fontInfo) {\n Configuration.applyFontInfo(this.domNode, this._context.configuration.editor.fontInfo);\n shouldRender = true;\n }\n if (e.layoutInfo) {\n this._contentLeft = this._context.configuration.editor.layoutInfo.contentLeft;\n shouldRender = true;\n }\n return _super.prototype.onConfigurationChanged.call(this, e) || shouldRender;\n };\n MarginViewOverlays.prototype.onScrollChanged = function (e) {\n return _super.prototype.onScrollChanged.call(this, e) || e.scrollHeightChanged;\n };\n MarginViewOverlays.prototype._viewOverlaysRender = function (ctx) {\n _super.prototype._viewOverlaysRender.call(this, ctx);\n var height = Math.min(ctx.scrollHeight, 1000000);\n this.domNode.setHeight(height);\n this.domNode.setWidth(this._contentLeft);\n };\n return MarginViewOverlays;\n}(ViewOverlays));\nexport { MarginViewOverlays };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport * as dom from '../../../../base/browser/dom';\nimport { createFastDomNode } from '../../../../base/browser/fastDomNode';\nimport { ContentWidgetPositionPreference } from '../../editorBrowser';\nimport { ViewPart, PartFingerprints } from '../../view/viewPart';\nvar Coordinate = /** @class */ (function () {\n function Coordinate(top, left) {\n this.top = top;\n this.left = left;\n }\n return Coordinate;\n}());\nvar ViewContentWidgets = /** @class */ (function (_super) {\n __extends(ViewContentWidgets, _super);\n function ViewContentWidgets(context, viewDomNode) {\n var _this = _super.call(this, context) || this;\n _this._viewDomNode = viewDomNode;\n _this._widgets = {};\n _this.domNode = createFastDomNode(document.createElement('div'));\n PartFingerprints.write(_this.domNode, 1 /* ContentWidgets */);\n _this.domNode.setClassName('contentWidgets');\n _this.domNode.setPosition('absolute');\n _this.domNode.setTop(0);\n _this.overflowingContentWidgetsDomNode = createFastDomNode(document.createElement('div'));\n PartFingerprints.write(_this.overflowingContentWidgetsDomNode, 2 /* OverflowingContentWidgets */);\n _this.overflowingContentWidgetsDomNode.setClassName('overflowingContentWidgets');\n return _this;\n }\n ViewContentWidgets.prototype.dispose = function () {\n _super.prototype.dispose.call(this);\n this._widgets = null;\n this.domNode = null;\n };\n // --- begin event handlers\n ViewContentWidgets.prototype.onConfigurationChanged = function (e) {\n var keys = Object.keys(this._widgets);\n for (var i = 0, len = keys.length; i < len; i++) {\n var widgetId = keys[i];\n this._widgets[widgetId].onConfigurationChanged(e);\n }\n return true;\n };\n ViewContentWidgets.prototype.onDecorationsChanged = function (e) {\n // true for inline decorations that can end up relayouting text\n return true;\n };\n ViewContentWidgets.prototype.onFlushed = function (e) {\n return true;\n };\n ViewContentWidgets.prototype.onLineMappingChanged = function (e) {\n var keys = Object.keys(this._widgets);\n for (var i = 0, len = keys.length; i < len; i++) {\n var widgetId = keys[i];\n this._widgets[widgetId].onLineMappingChanged(e);\n }\n return true;\n };\n ViewContentWidgets.prototype.onLinesChanged = function (e) {\n return true;\n };\n ViewContentWidgets.prototype.onLinesDeleted = function (e) {\n return true;\n };\n ViewContentWidgets.prototype.onLinesInserted = function (e) {\n return true;\n };\n ViewContentWidgets.prototype.onScrollChanged = function (e) {\n return true;\n };\n ViewContentWidgets.prototype.onZonesChanged = function (e) {\n return true;\n };\n // ---- end view event handlers\n ViewContentWidgets.prototype.addWidget = function (_widget) {\n var myWidget = new Widget(this._context, this._viewDomNode, _widget);\n this._widgets[myWidget.id] = myWidget;\n if (myWidget.allowEditorOverflow) {\n this.overflowingContentWidgetsDomNode.appendChild(myWidget.domNode);\n }\n else {\n this.domNode.appendChild(myWidget.domNode);\n }\n this.setShouldRender();\n };\n ViewContentWidgets.prototype.setWidgetPosition = function (widget, position, preference) {\n var myWidget = this._widgets[widget.getId()];\n myWidget.setPosition(position, preference);\n this.setShouldRender();\n };\n ViewContentWidgets.prototype.removeWidget = function (widget) {\n var widgetId = widget.getId();\n if (this._widgets.hasOwnProperty(widgetId)) {\n var myWidget = this._widgets[widgetId];\n delete this._widgets[widgetId];\n var domNode = myWidget.domNode.domNode;\n domNode.parentNode.removeChild(domNode);\n domNode.removeAttribute('monaco-visible-content-widget');\n this.setShouldRender();\n }\n };\n ViewContentWidgets.prototype.shouldSuppressMouseDownOnWidget = function (widgetId) {\n if (this._widgets.hasOwnProperty(widgetId)) {\n return this._widgets[widgetId].suppressMouseDown;\n }\n return false;\n };\n ViewContentWidgets.prototype.onBeforeRender = function (viewportData) {\n var keys = Object.keys(this._widgets);\n for (var i = 0, len = keys.length; i < len; i++) {\n var widgetId = keys[i];\n this._widgets[widgetId].onBeforeRender(viewportData);\n }\n };\n ViewContentWidgets.prototype.prepareRender = function (ctx) {\n var keys = Object.keys(this._widgets);\n for (var i = 0, len = keys.length; i < len; i++) {\n var widgetId = keys[i];\n this._widgets[widgetId].prepareRender(ctx);\n }\n };\n ViewContentWidgets.prototype.render = function (ctx) {\n var keys = Object.keys(this._widgets);\n for (var i = 0, len = keys.length; i < len; i++) {\n var widgetId = keys[i];\n this._widgets[widgetId].render(ctx);\n }\n };\n return ViewContentWidgets;\n}(ViewPart));\nexport { ViewContentWidgets };\nvar Widget = /** @class */ (function () {\n function Widget(context, viewDomNode, actual) {\n this._context = context;\n this._viewDomNode = viewDomNode;\n this._actual = actual;\n this.domNode = createFastDomNode(this._actual.getDomNode());\n this.id = this._actual.getId();\n this.allowEditorOverflow = this._actual.allowEditorOverflow || false;\n this.suppressMouseDown = this._actual.suppressMouseDown || false;\n this._fixedOverflowWidgets = this._context.configuration.editor.viewInfo.fixedOverflowWidgets;\n this._contentWidth = this._context.configuration.editor.layoutInfo.contentWidth;\n this._contentLeft = this._context.configuration.editor.layoutInfo.contentLeft;\n this._lineHeight = this._context.configuration.editor.lineHeight;\n this._setPosition(null);\n this._preference = null;\n this._cachedDomNodeClientWidth = -1;\n this._cachedDomNodeClientHeight = -1;\n this._maxWidth = this._getMaxWidth();\n this._isVisible = false;\n this._renderData = null;\n this.domNode.setPosition((this._fixedOverflowWidgets && this.allowEditorOverflow) ? 'fixed' : 'absolute');\n this.domNode.setVisibility('hidden');\n this.domNode.setAttribute('widgetId', this.id);\n this.domNode.setMaxWidth(this._maxWidth);\n }\n Widget.prototype.onConfigurationChanged = function (e) {\n if (e.lineHeight) {\n this._lineHeight = this._context.configuration.editor.lineHeight;\n }\n if (e.layoutInfo) {\n this._contentLeft = this._context.configuration.editor.layoutInfo.contentLeft;\n this._contentWidth = this._context.configuration.editor.layoutInfo.contentWidth;\n this._maxWidth = this._getMaxWidth();\n }\n };\n Widget.prototype.onLineMappingChanged = function (e) {\n this._setPosition(this._position);\n };\n Widget.prototype._setPosition = function (position) {\n this._position = position;\n this._viewPosition = null;\n if (this._position) {\n // Do not trust that widgets give a valid position\n var validModelPosition = this._context.model.validateModelPosition(this._position);\n if (this._context.model.coordinatesConverter.modelPositionIsVisible(validModelPosition)) {\n this._viewPosition = this._context.model.coordinatesConverter.convertModelPositionToViewPosition(validModelPosition);\n }\n }\n };\n Widget.prototype._getMaxWidth = function () {\n return (this.allowEditorOverflow\n ? window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth\n : this._contentWidth);\n };\n Widget.prototype.setPosition = function (position, preference) {\n this._setPosition(position);\n this._preference = preference;\n this._cachedDomNodeClientWidth = -1;\n this._cachedDomNodeClientHeight = -1;\n };\n Widget.prototype._layoutBoxInViewport = function (topLeft, width, height, ctx) {\n // Our visible box is split horizontally by the current line => 2 boxes\n // a) the box above the line\n var aboveLineTop = topLeft.top;\n var heightAboveLine = aboveLineTop;\n // b) the box under the line\n var underLineTop = topLeft.top + this._lineHeight;\n var heightUnderLine = ctx.viewportHeight - underLineTop;\n var aboveTop = aboveLineTop - height;\n var fitsAbove = (heightAboveLine >= height);\n var belowTop = underLineTop;\n var fitsBelow = (heightUnderLine >= height);\n // And its left\n var actualLeft = topLeft.left;\n if (actualLeft + width > ctx.scrollLeft + ctx.viewportWidth) {\n actualLeft = ctx.scrollLeft + ctx.viewportWidth - width;\n }\n if (actualLeft < ctx.scrollLeft) {\n actualLeft = ctx.scrollLeft;\n }\n return {\n aboveTop: aboveTop,\n fitsAbove: fitsAbove,\n belowTop: belowTop,\n fitsBelow: fitsBelow,\n left: actualLeft\n };\n };\n Widget.prototype._layoutBoxInPage = function (topLeft, width, height, ctx) {\n var left0 = topLeft.left - ctx.scrollLeft;\n if (left0 < 0 || left0 > this._contentWidth) {\n // Don't render if position is scrolled outside viewport\n return null;\n }\n var aboveTop = topLeft.top - height;\n var belowTop = topLeft.top + this._lineHeight;\n var left = left0 + this._contentLeft;\n var domNodePosition = dom.getDomNodePagePosition(this._viewDomNode.domNode);\n var absoluteAboveTop = domNodePosition.top + aboveTop - dom.StandardWindow.scrollY;\n var absoluteBelowTop = domNodePosition.top + belowTop - dom.StandardWindow.scrollY;\n var absoluteLeft = domNodePosition.left + left - dom.StandardWindow.scrollX;\n var INNER_WIDTH = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;\n var INNER_HEIGHT = window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight;\n // Leave some clearance to the bottom\n var TOP_PADDING = 22;\n var BOTTOM_PADDING = 22;\n var fitsAbove = (absoluteAboveTop >= TOP_PADDING), fitsBelow = (absoluteBelowTop + height <= INNER_HEIGHT - BOTTOM_PADDING);\n if (absoluteLeft + width + 20 > INNER_WIDTH) {\n var delta = absoluteLeft - (INNER_WIDTH - width - 20);\n absoluteLeft -= delta;\n left -= delta;\n }\n if (absoluteLeft < 0) {\n var delta = absoluteLeft;\n absoluteLeft -= delta;\n left -= delta;\n }\n if (this._fixedOverflowWidgets) {\n aboveTop = absoluteAboveTop;\n belowTop = absoluteBelowTop;\n left = absoluteLeft;\n }\n return { aboveTop: aboveTop, fitsAbove: fitsAbove, belowTop: belowTop, fitsBelow: fitsBelow, left: left };\n };\n Widget.prototype._prepareRenderWidgetAtExactPositionOverflowing = function (topLeft) {\n return new Coordinate(topLeft.top, topLeft.left + this._contentLeft);\n };\n /**\n * Compute `this._topLeft`\n */\n Widget.prototype._getTopLeft = function (ctx) {\n if (!this._viewPosition) {\n return null;\n }\n var visibleRange = ctx.visibleRangeForPosition(this._viewPosition);\n if (!visibleRange) {\n return null;\n }\n var top = ctx.getVerticalOffsetForLineNumber(this._viewPosition.lineNumber) - ctx.scrollTop;\n return new Coordinate(top, visibleRange.left);\n };\n Widget.prototype._prepareRenderWidget = function (topLeft, ctx) {\n var _this = this;\n if (!topLeft) {\n return null;\n }\n var placement = null;\n var fetchPlacement = function () {\n if (placement) {\n return;\n }\n if (_this._cachedDomNodeClientWidth === -1 || _this._cachedDomNodeClientHeight === -1) {\n var domNode = _this.domNode.domNode;\n _this._cachedDomNodeClientWidth = domNode.clientWidth;\n _this._cachedDomNodeClientHeight = domNode.clientHeight;\n }\n if (_this.allowEditorOverflow) {\n placement = _this._layoutBoxInPage(topLeft, _this._cachedDomNodeClientWidth, _this._cachedDomNodeClientHeight, ctx);\n }\n else {\n placement = _this._layoutBoxInViewport(topLeft, _this._cachedDomNodeClientWidth, _this._cachedDomNodeClientHeight, ctx);\n }\n };\n // Do two passes, first for perfect fit, second picks first option\n for (var pass = 1; pass <= 2; pass++) {\n for (var i = 0; i < this._preference.length; i++) {\n var pref = this._preference[i];\n if (pref === ContentWidgetPositionPreference.ABOVE) {\n fetchPlacement();\n if (!placement) {\n // Widget outside of viewport\n return null;\n }\n if (pass === 2 || placement.fitsAbove) {\n return new Coordinate(placement.aboveTop, placement.left);\n }\n }\n else if (pref === ContentWidgetPositionPreference.BELOW) {\n fetchPlacement();\n if (!placement) {\n // Widget outside of viewport\n return null;\n }\n if (pass === 2 || placement.fitsBelow) {\n return new Coordinate(placement.belowTop, placement.left);\n }\n }\n else {\n if (this.allowEditorOverflow) {\n return this._prepareRenderWidgetAtExactPositionOverflowing(topLeft);\n }\n else {\n return topLeft;\n }\n }\n }\n }\n return null;\n };\n /**\n * On this first pass, we ensure that the content widget (if it is in the viewport) has the max width set correctly.\n */\n Widget.prototype.onBeforeRender = function (viewportData) {\n if (!this._viewPosition || !this._preference) {\n return;\n }\n if (this._viewPosition.lineNumber < viewportData.startLineNumber || this._viewPosition.lineNumber > viewportData.endLineNumber) {\n // Outside of viewport\n return;\n }\n this.domNode.setMaxWidth(this._maxWidth);\n };\n Widget.prototype.prepareRender = function (ctx) {\n var topLeft = this._getTopLeft(ctx);\n this._renderData = this._prepareRenderWidget(topLeft, ctx);\n };\n Widget.prototype.render = function (ctx) {\n if (!this._renderData) {\n // This widget should be invisible\n if (this._isVisible) {\n this.domNode.removeAttribute('monaco-visible-content-widget');\n this._isVisible = false;\n this.domNode.setVisibility('hidden');\n }\n return;\n }\n // This widget should be visible\n if (this.allowEditorOverflow) {\n this.domNode.setTop(this._renderData.top);\n this.domNode.setLeft(this._renderData.left);\n }\n else {\n this.domNode.setTop(this._renderData.top + ctx.scrollTop - ctx.bigNumbersDelta);\n this.domNode.setLeft(this._renderData.left);\n }\n if (!this._isVisible) {\n this.domNode.setVisibility('inherit');\n this.domNode.setAttribute('monaco-visible-content-widget', 'true');\n this._isVisible = true;\n }\n };\n return Widget;\n}());\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport './currentLineHighlight.css';\nimport { DynamicViewOverlay } from '../../view/dynamicViewOverlay';\nimport { registerThemingParticipant } from '../../../../platform/theme/common/themeService';\nimport { editorLineHighlight, editorLineHighlightBorder } from '../../../common/view/editorColorRegistry';\nvar CurrentLineHighlightOverlay = /** @class */ (function (_super) {\n __extends(CurrentLineHighlightOverlay, _super);\n function CurrentLineHighlightOverlay(context) {\n var _this = _super.call(this) || this;\n _this._context = context;\n _this._lineHeight = _this._context.configuration.editor.lineHeight;\n _this._renderLineHighlight = _this._context.configuration.editor.viewInfo.renderLineHighlight;\n _this._selectionIsEmpty = true;\n _this._primaryCursorLineNumber = 1;\n _this._scrollWidth = 0;\n _this._contentWidth = _this._context.configuration.editor.layoutInfo.contentWidth;\n _this._context.addEventHandler(_this);\n return _this;\n }\n CurrentLineHighlightOverlay.prototype.dispose = function () {\n this._context.removeEventHandler(this);\n this._context = null;\n _super.prototype.dispose.call(this);\n };\n // --- begin event handlers\n CurrentLineHighlightOverlay.prototype.onConfigurationChanged = function (e) {\n if (e.lineHeight) {\n this._lineHeight = this._context.configuration.editor.lineHeight;\n }\n if (e.viewInfo) {\n this._renderLineHighlight = this._context.configuration.editor.viewInfo.renderLineHighlight;\n }\n if (e.layoutInfo) {\n this._contentWidth = this._context.configuration.editor.layoutInfo.contentWidth;\n }\n return true;\n };\n CurrentLineHighlightOverlay.prototype.onCursorStateChanged = function (e) {\n var hasChanged = false;\n var primaryCursorLineNumber = e.selections[0].positionLineNumber;\n if (this._primaryCursorLineNumber !== primaryCursorLineNumber) {\n this._primaryCursorLineNumber = primaryCursorLineNumber;\n hasChanged = true;\n }\n var selectionIsEmpty = e.selections[0].isEmpty();\n if (this._selectionIsEmpty !== selectionIsEmpty) {\n this._selectionIsEmpty = selectionIsEmpty;\n hasChanged = true;\n return true;\n }\n return hasChanged;\n };\n CurrentLineHighlightOverlay.prototype.onFlushed = function (e) {\n return true;\n };\n CurrentLineHighlightOverlay.prototype.onLinesDeleted = function (e) {\n return true;\n };\n CurrentLineHighlightOverlay.prototype.onLinesInserted = function (e) {\n return true;\n };\n CurrentLineHighlightOverlay.prototype.onScrollChanged = function (e) {\n return e.scrollWidthChanged;\n };\n CurrentLineHighlightOverlay.prototype.onZonesChanged = function (e) {\n return true;\n };\n // --- end event handlers\n CurrentLineHighlightOverlay.prototype.prepareRender = function (ctx) {\n this._scrollWidth = ctx.scrollWidth;\n };\n CurrentLineHighlightOverlay.prototype.render = function (startLineNumber, lineNumber) {\n if (lineNumber === this._primaryCursorLineNumber) {\n if (this._shouldShowCurrentLine()) {\n var paintedInMargin = this._willRenderMarginCurrentLine();\n var className = 'current-line' + (paintedInMargin ? ' current-line-both' : '');\n return ('
    ');\n }\n else {\n return '';\n }\n }\n return '';\n };\n CurrentLineHighlightOverlay.prototype._shouldShowCurrentLine = function () {\n return ((this._renderLineHighlight === 'line' || this._renderLineHighlight === 'all')\n && this._selectionIsEmpty);\n };\n CurrentLineHighlightOverlay.prototype._willRenderMarginCurrentLine = function () {\n return ((this._renderLineHighlight === 'gutter' || this._renderLineHighlight === 'all'));\n };\n return CurrentLineHighlightOverlay;\n}(DynamicViewOverlay));\nexport { CurrentLineHighlightOverlay };\nregisterThemingParticipant(function (theme, collector) {\n var lineHighlight = theme.getColor(editorLineHighlight);\n if (lineHighlight) {\n collector.addRule(\".monaco-editor .view-overlays .current-line { background-color: \" + lineHighlight + \"; }\");\n }\n if (!lineHighlight || lineHighlight.isTransparent() || theme.defines(editorLineHighlightBorder)) {\n var lineHighlightBorder = theme.getColor(editorLineHighlightBorder);\n if (lineHighlightBorder) {\n collector.addRule(\".monaco-editor .view-overlays .current-line { border: 2px solid \" + lineHighlightBorder + \"; }\");\n if (theme.type === 'hc') {\n collector.addRule(\".monaco-editor .view-overlays .current-line { border-width: 1px; }\");\n }\n }\n }\n});\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport './currentLineMarginHighlight.css';\nimport { DynamicViewOverlay } from '../../view/dynamicViewOverlay';\nimport { registerThemingParticipant } from '../../../../platform/theme/common/themeService';\nimport { editorLineHighlight, editorLineHighlightBorder } from '../../../common/view/editorColorRegistry';\nvar CurrentLineMarginHighlightOverlay = /** @class */ (function (_super) {\n __extends(CurrentLineMarginHighlightOverlay, _super);\n function CurrentLineMarginHighlightOverlay(context) {\n var _this = _super.call(this) || this;\n _this._context = context;\n _this._lineHeight = _this._context.configuration.editor.lineHeight;\n _this._renderLineHighlight = _this._context.configuration.editor.viewInfo.renderLineHighlight;\n _this._selectionIsEmpty = true;\n _this._primaryCursorLineNumber = 1;\n _this._contentLeft = _this._context.configuration.editor.layoutInfo.contentLeft;\n _this._context.addEventHandler(_this);\n return _this;\n }\n CurrentLineMarginHighlightOverlay.prototype.dispose = function () {\n this._context.removeEventHandler(this);\n this._context = null;\n _super.prototype.dispose.call(this);\n };\n // --- begin event handlers\n CurrentLineMarginHighlightOverlay.prototype.onConfigurationChanged = function (e) {\n if (e.lineHeight) {\n this._lineHeight = this._context.configuration.editor.lineHeight;\n }\n if (e.viewInfo) {\n this._renderLineHighlight = this._context.configuration.editor.viewInfo.renderLineHighlight;\n }\n if (e.layoutInfo) {\n this._contentLeft = this._context.configuration.editor.layoutInfo.contentLeft;\n }\n return true;\n };\n CurrentLineMarginHighlightOverlay.prototype.onCursorStateChanged = function (e) {\n var hasChanged = false;\n var primaryCursorLineNumber = e.selections[0].positionLineNumber;\n if (this._primaryCursorLineNumber !== primaryCursorLineNumber) {\n this._primaryCursorLineNumber = primaryCursorLineNumber;\n hasChanged = true;\n }\n var selectionIsEmpty = e.selections[0].isEmpty();\n if (this._selectionIsEmpty !== selectionIsEmpty) {\n this._selectionIsEmpty = selectionIsEmpty;\n hasChanged = true;\n return true;\n }\n return hasChanged;\n };\n CurrentLineMarginHighlightOverlay.prototype.onFlushed = function (e) {\n return true;\n };\n CurrentLineMarginHighlightOverlay.prototype.onLinesDeleted = function (e) {\n return true;\n };\n CurrentLineMarginHighlightOverlay.prototype.onLinesInserted = function (e) {\n return true;\n };\n CurrentLineMarginHighlightOverlay.prototype.onZonesChanged = function (e) {\n return true;\n };\n // --- end event handlers\n CurrentLineMarginHighlightOverlay.prototype.prepareRender = function (ctx) {\n };\n CurrentLineMarginHighlightOverlay.prototype.render = function (startLineNumber, lineNumber) {\n if (lineNumber === this._primaryCursorLineNumber) {\n var className = 'current-line';\n if (this._shouldShowCurrentLine()) {\n var paintedInContent = this._willRenderContentCurrentLine();\n className = 'current-line current-line-margin' + (paintedInContent ? ' current-line-margin-both' : '');\n }\n return ('
    ');\n }\n return '';\n };\n CurrentLineMarginHighlightOverlay.prototype._shouldShowCurrentLine = function () {\n return ((this._renderLineHighlight === 'gutter' || this._renderLineHighlight === 'all'));\n };\n CurrentLineMarginHighlightOverlay.prototype._willRenderContentCurrentLine = function () {\n return ((this._renderLineHighlight === 'line' || this._renderLineHighlight === 'all')\n && this._selectionIsEmpty);\n };\n return CurrentLineMarginHighlightOverlay;\n}(DynamicViewOverlay));\nexport { CurrentLineMarginHighlightOverlay };\nregisterThemingParticipant(function (theme, collector) {\n var lineHighlight = theme.getColor(editorLineHighlight);\n if (lineHighlight) {\n collector.addRule(\".monaco-editor .margin-view-overlays .current-line-margin { background-color: \" + lineHighlight + \"; border: none; }\");\n }\n else {\n var lineHighlightBorder = theme.getColor(editorLineHighlightBorder);\n if (lineHighlightBorder) {\n collector.addRule(\".monaco-editor .margin-view-overlays .current-line-margin { border: 2px solid \" + lineHighlightBorder + \"; }\");\n }\n if (theme.type === 'hc') {\n collector.addRule(\".monaco-editor .margin-view-overlays .current-line-margin { border-width: 1px; }\");\n }\n }\n});\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport './decorations.css';\nimport { DynamicViewOverlay } from '../../view/dynamicViewOverlay';\nimport { Range } from '../../../common/core/range';\nimport { HorizontalRange } from '../../../common/view/renderingContext';\nvar DecorationsOverlay = /** @class */ (function (_super) {\n __extends(DecorationsOverlay, _super);\n function DecorationsOverlay(context) {\n var _this = _super.call(this) || this;\n _this._context = context;\n _this._lineHeight = _this._context.configuration.editor.lineHeight;\n _this._typicalHalfwidthCharacterWidth = _this._context.configuration.editor.fontInfo.typicalHalfwidthCharacterWidth;\n _this._renderResult = null;\n _this._context.addEventHandler(_this);\n return _this;\n }\n DecorationsOverlay.prototype.dispose = function () {\n this._context.removeEventHandler(this);\n this._context = null;\n this._renderResult = null;\n _super.prototype.dispose.call(this);\n };\n // --- begin event handlers\n DecorationsOverlay.prototype.onConfigurationChanged = function (e) {\n if (e.lineHeight) {\n this._lineHeight = this._context.configuration.editor.lineHeight;\n }\n if (e.fontInfo) {\n this._typicalHalfwidthCharacterWidth = this._context.configuration.editor.fontInfo.typicalHalfwidthCharacterWidth;\n }\n return true;\n };\n DecorationsOverlay.prototype.onDecorationsChanged = function (e) {\n return true;\n };\n DecorationsOverlay.prototype.onFlushed = function (e) {\n return true;\n };\n DecorationsOverlay.prototype.onLinesChanged = function (e) {\n return true;\n };\n DecorationsOverlay.prototype.onLinesDeleted = function (e) {\n return true;\n };\n DecorationsOverlay.prototype.onLinesInserted = function (e) {\n return true;\n };\n DecorationsOverlay.prototype.onScrollChanged = function (e) {\n return e.scrollTopChanged || e.scrollWidthChanged;\n };\n DecorationsOverlay.prototype.onZonesChanged = function (e) {\n return true;\n };\n // --- end event handlers\n DecorationsOverlay.prototype.prepareRender = function (ctx) {\n var _decorations = ctx.getDecorationsInViewport();\n // Keep only decorations with `className`\n var decorations = [], decorationsLen = 0;\n for (var i = 0, len = _decorations.length; i < len; i++) {\n var d = _decorations[i];\n if (d.options.className) {\n decorations[decorationsLen++] = d;\n }\n }\n // Sort decorations for consistent render output\n decorations = decorations.sort(function (a, b) {\n if (a.options.zIndex < b.options.zIndex) {\n return -1;\n }\n if (a.options.zIndex > b.options.zIndex) {\n return 1;\n }\n var aClassName = a.options.className;\n var bClassName = b.options.className;\n if (aClassName < bClassName) {\n return -1;\n }\n if (aClassName > bClassName) {\n return 1;\n }\n return Range.compareRangesUsingStarts(a.range, b.range);\n });\n var visibleStartLineNumber = ctx.visibleRange.startLineNumber;\n var visibleEndLineNumber = ctx.visibleRange.endLineNumber;\n var output = [];\n for (var lineNumber = visibleStartLineNumber; lineNumber <= visibleEndLineNumber; lineNumber++) {\n var lineIndex = lineNumber - visibleStartLineNumber;\n output[lineIndex] = '';\n }\n // Render first whole line decorations and then regular decorations\n this._renderWholeLineDecorations(ctx, decorations, output);\n this._renderNormalDecorations(ctx, decorations, output);\n this._renderResult = output;\n };\n DecorationsOverlay.prototype._renderWholeLineDecorations = function (ctx, decorations, output) {\n var lineHeight = String(this._lineHeight);\n var visibleStartLineNumber = ctx.visibleRange.startLineNumber;\n var visibleEndLineNumber = ctx.visibleRange.endLineNumber;\n for (var i = 0, lenI = decorations.length; i < lenI; i++) {\n var d = decorations[i];\n if (!d.options.isWholeLine) {\n continue;\n }\n var decorationOutput = ('
    ');\n var startLineNumber = Math.max(d.range.startLineNumber, visibleStartLineNumber);\n var endLineNumber = Math.min(d.range.endLineNumber, visibleEndLineNumber);\n for (var j = startLineNumber; j <= endLineNumber; j++) {\n var lineIndex = j - visibleStartLineNumber;\n output[lineIndex] += decorationOutput;\n }\n }\n };\n DecorationsOverlay.prototype._renderNormalDecorations = function (ctx, decorations, output) {\n var lineHeight = String(this._lineHeight);\n var visibleStartLineNumber = ctx.visibleRange.startLineNumber;\n var prevClassName = null;\n var prevShowIfCollapsed = false;\n var prevRange = null;\n for (var i = 0, lenI = decorations.length; i < lenI; i++) {\n var d = decorations[i];\n if (d.options.isWholeLine) {\n continue;\n }\n var className = d.options.className;\n var showIfCollapsed = d.options.showIfCollapsed;\n var range = d.range;\n if (showIfCollapsed && range.endColumn === 1 && range.endLineNumber !== range.startLineNumber) {\n range = new Range(range.startLineNumber, range.startColumn, range.endLineNumber - 1, this._context.model.getLineMaxColumn(range.endLineNumber - 1));\n }\n if (prevClassName === className && prevShowIfCollapsed === showIfCollapsed && Range.areIntersectingOrTouching(prevRange, range)) {\n // merge into previous decoration\n prevRange = Range.plusRange(prevRange, range);\n continue;\n }\n // flush previous decoration\n if (prevClassName !== null) {\n this._renderNormalDecoration(ctx, prevRange, prevClassName, prevShowIfCollapsed, lineHeight, visibleStartLineNumber, output);\n }\n prevClassName = className;\n prevShowIfCollapsed = showIfCollapsed;\n prevRange = range;\n }\n if (prevClassName !== null) {\n this._renderNormalDecoration(ctx, prevRange, prevClassName, prevShowIfCollapsed, lineHeight, visibleStartLineNumber, output);\n }\n };\n DecorationsOverlay.prototype._renderNormalDecoration = function (ctx, range, className, showIfCollapsed, lineHeight, visibleStartLineNumber, output) {\n var linesVisibleRanges = ctx.linesVisibleRangesForRange(range, /*TODO@Alex*/ className === 'findMatch');\n if (!linesVisibleRanges) {\n return;\n }\n for (var j = 0, lenJ = linesVisibleRanges.length; j < lenJ; j++) {\n var lineVisibleRanges = linesVisibleRanges[j];\n var lineIndex = lineVisibleRanges.lineNumber - visibleStartLineNumber;\n if (showIfCollapsed && lineVisibleRanges.ranges.length === 1) {\n var singleVisibleRange = lineVisibleRanges.ranges[0];\n if (singleVisibleRange.width === 0) {\n // collapsed range case => make the decoration visible by faking its width\n lineVisibleRanges.ranges[0] = new HorizontalRange(singleVisibleRange.left, this._typicalHalfwidthCharacterWidth);\n }\n }\n for (var k = 0, lenK = lineVisibleRanges.ranges.length; k < lenK; k++) {\n var visibleRange = lineVisibleRanges.ranges[k];\n var decorationOutput = ('
    ');\n output[lineIndex] += decorationOutput;\n }\n }\n };\n DecorationsOverlay.prototype.render = function (startLineNumber, lineNumber) {\n if (!this._renderResult) {\n return '';\n }\n var lineIndex = lineNumber - startLineNumber;\n if (lineIndex < 0 || lineIndex >= this._renderResult.length) {\n return '';\n }\n return this._renderResult[lineIndex];\n };\n return DecorationsOverlay;\n}(DynamicViewOverlay));\nexport { DecorationsOverlay };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport './glyphMargin.css';\nimport { DynamicViewOverlay } from '../../view/dynamicViewOverlay';\nvar DecorationToRender = /** @class */ (function () {\n function DecorationToRender(startLineNumber, endLineNumber, className) {\n this.startLineNumber = +startLineNumber;\n this.endLineNumber = +endLineNumber;\n this.className = String(className);\n }\n return DecorationToRender;\n}());\nexport { DecorationToRender };\nvar DedupOverlay = /** @class */ (function (_super) {\n __extends(DedupOverlay, _super);\n function DedupOverlay() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n DedupOverlay.prototype._render = function (visibleStartLineNumber, visibleEndLineNumber, decorations) {\n var output = [];\n for (var lineNumber = visibleStartLineNumber; lineNumber <= visibleEndLineNumber; lineNumber++) {\n var lineIndex = lineNumber - visibleStartLineNumber;\n output[lineIndex] = [];\n }\n if (decorations.length === 0) {\n return output;\n }\n decorations.sort(function (a, b) {\n if (a.className === b.className) {\n if (a.startLineNumber === b.startLineNumber) {\n return a.endLineNumber - b.endLineNumber;\n }\n return a.startLineNumber - b.startLineNumber;\n }\n return (a.className < b.className ? -1 : 1);\n });\n var prevClassName = null;\n var prevEndLineIndex = 0;\n for (var i = 0, len = decorations.length; i < len; i++) {\n var d = decorations[i];\n var className = d.className;\n var startLineIndex = Math.max(d.startLineNumber, visibleStartLineNumber) - visibleStartLineNumber;\n var endLineIndex = Math.min(d.endLineNumber, visibleEndLineNumber) - visibleStartLineNumber;\n if (prevClassName === className) {\n startLineIndex = Math.max(prevEndLineIndex + 1, startLineIndex);\n prevEndLineIndex = Math.max(prevEndLineIndex, endLineIndex);\n }\n else {\n prevClassName = className;\n prevEndLineIndex = endLineIndex;\n }\n for (var i_1 = startLineIndex; i_1 <= prevEndLineIndex; i_1++) {\n output[i_1].push(prevClassName);\n }\n }\n return output;\n };\n return DedupOverlay;\n}(DynamicViewOverlay));\nexport { DedupOverlay };\nvar GlyphMarginOverlay = /** @class */ (function (_super) {\n __extends(GlyphMarginOverlay, _super);\n function GlyphMarginOverlay(context) {\n var _this = _super.call(this) || this;\n _this._context = context;\n _this._lineHeight = _this._context.configuration.editor.lineHeight;\n _this._glyphMargin = _this._context.configuration.editor.viewInfo.glyphMargin;\n _this._glyphMarginLeft = _this._context.configuration.editor.layoutInfo.glyphMarginLeft;\n _this._glyphMarginWidth = _this._context.configuration.editor.layoutInfo.glyphMarginWidth;\n _this._renderResult = null;\n _this._context.addEventHandler(_this);\n return _this;\n }\n GlyphMarginOverlay.prototype.dispose = function () {\n this._context.removeEventHandler(this);\n this._context = null;\n this._renderResult = null;\n _super.prototype.dispose.call(this);\n };\n // --- begin event handlers\n GlyphMarginOverlay.prototype.onConfigurationChanged = function (e) {\n if (e.lineHeight) {\n this._lineHeight = this._context.configuration.editor.lineHeight;\n }\n if (e.viewInfo) {\n this._glyphMargin = this._context.configuration.editor.viewInfo.glyphMargin;\n }\n if (e.layoutInfo) {\n this._glyphMarginLeft = this._context.configuration.editor.layoutInfo.glyphMarginLeft;\n this._glyphMarginWidth = this._context.configuration.editor.layoutInfo.glyphMarginWidth;\n }\n return true;\n };\n GlyphMarginOverlay.prototype.onDecorationsChanged = function (e) {\n return true;\n };\n GlyphMarginOverlay.prototype.onFlushed = function (e) {\n return true;\n };\n GlyphMarginOverlay.prototype.onLinesChanged = function (e) {\n return true;\n };\n GlyphMarginOverlay.prototype.onLinesDeleted = function (e) {\n return true;\n };\n GlyphMarginOverlay.prototype.onLinesInserted = function (e) {\n return true;\n };\n GlyphMarginOverlay.prototype.onScrollChanged = function (e) {\n return e.scrollTopChanged;\n };\n GlyphMarginOverlay.prototype.onZonesChanged = function (e) {\n return true;\n };\n // --- end event handlers\n GlyphMarginOverlay.prototype._getDecorations = function (ctx) {\n var decorations = ctx.getDecorationsInViewport();\n var r = [], rLen = 0;\n for (var i = 0, len = decorations.length; i < len; i++) {\n var d = decorations[i];\n var glyphMarginClassName = d.options.glyphMarginClassName;\n if (glyphMarginClassName) {\n r[rLen++] = new DecorationToRender(d.range.startLineNumber, d.range.endLineNumber, glyphMarginClassName);\n }\n }\n return r;\n };\n GlyphMarginOverlay.prototype.prepareRender = function (ctx) {\n if (!this._glyphMargin) {\n this._renderResult = null;\n return;\n }\n var visibleStartLineNumber = ctx.visibleRange.startLineNumber;\n var visibleEndLineNumber = ctx.visibleRange.endLineNumber;\n var toRender = this._render(visibleStartLineNumber, visibleEndLineNumber, this._getDecorations(ctx));\n var lineHeight = this._lineHeight.toString();\n var left = this._glyphMarginLeft.toString();\n var width = this._glyphMarginWidth.toString();\n var common = '\" style=\"left:' + left + 'px;width:' + width + 'px' + ';height:' + lineHeight + 'px;\">';\n var output = [];\n for (var lineNumber = visibleStartLineNumber; lineNumber <= visibleEndLineNumber; lineNumber++) {\n var lineIndex = lineNumber - visibleStartLineNumber;\n var classNames = toRender[lineIndex];\n if (classNames.length === 0) {\n output[lineIndex] = '';\n }\n else {\n output[lineIndex] = ('
    = this._renderResult.length) {\n return '';\n }\n return this._renderResult[lineIndex];\n };\n return GlyphMarginOverlay;\n}(DedupOverlay));\nexport { GlyphMarginOverlay };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport './indentGuides.css';\nimport { DynamicViewOverlay } from '../../view/dynamicViewOverlay';\nimport { registerThemingParticipant } from '../../../../platform/theme/common/themeService';\nimport { editorIndentGuides, editorActiveIndentGuides } from '../../../common/view/editorColorRegistry';\nimport { Position } from '../../../common/core/position';\nvar IndentGuidesOverlay = /** @class */ (function (_super) {\n __extends(IndentGuidesOverlay, _super);\n function IndentGuidesOverlay(context) {\n var _this = _super.call(this) || this;\n _this._context = context;\n _this._primaryLineNumber = 0;\n _this._lineHeight = _this._context.configuration.editor.lineHeight;\n _this._spaceWidth = _this._context.configuration.editor.fontInfo.spaceWidth;\n _this._enabled = _this._context.configuration.editor.viewInfo.renderIndentGuides;\n _this._activeIndentEnabled = _this._context.configuration.editor.viewInfo.highlightActiveIndentGuide;\n _this._renderResult = null;\n _this._context.addEventHandler(_this);\n return _this;\n }\n IndentGuidesOverlay.prototype.dispose = function () {\n this._context.removeEventHandler(this);\n this._context = null;\n this._renderResult = null;\n _super.prototype.dispose.call(this);\n };\n // --- begin event handlers\n IndentGuidesOverlay.prototype.onConfigurationChanged = function (e) {\n if (e.lineHeight) {\n this._lineHeight = this._context.configuration.editor.lineHeight;\n }\n if (e.fontInfo) {\n this._spaceWidth = this._context.configuration.editor.fontInfo.spaceWidth;\n }\n if (e.viewInfo) {\n this._enabled = this._context.configuration.editor.viewInfo.renderIndentGuides;\n this._activeIndentEnabled = this._context.configuration.editor.viewInfo.highlightActiveIndentGuide;\n }\n return true;\n };\n IndentGuidesOverlay.prototype.onCursorStateChanged = function (e) {\n var selection = e.selections[0];\n var newPrimaryLineNumber = selection.isEmpty() ? selection.positionLineNumber : 0;\n if (this._primaryLineNumber !== newPrimaryLineNumber) {\n this._primaryLineNumber = newPrimaryLineNumber;\n return true;\n }\n return false;\n };\n IndentGuidesOverlay.prototype.onDecorationsChanged = function (e) {\n // true for inline decorations\n return true;\n };\n IndentGuidesOverlay.prototype.onFlushed = function (e) {\n return true;\n };\n IndentGuidesOverlay.prototype.onLinesChanged = function (e) {\n return true;\n };\n IndentGuidesOverlay.prototype.onLinesDeleted = function (e) {\n return true;\n };\n IndentGuidesOverlay.prototype.onLinesInserted = function (e) {\n return true;\n };\n IndentGuidesOverlay.prototype.onScrollChanged = function (e) {\n return e.scrollTopChanged; // || e.scrollWidthChanged;\n };\n IndentGuidesOverlay.prototype.onZonesChanged = function (e) {\n return true;\n };\n IndentGuidesOverlay.prototype.onLanguageConfigurationChanged = function (e) {\n return true;\n };\n // --- end event handlers\n IndentGuidesOverlay.prototype.prepareRender = function (ctx) {\n if (!this._enabled) {\n this._renderResult = null;\n return;\n }\n var visibleStartLineNumber = ctx.visibleRange.startLineNumber;\n var visibleEndLineNumber = ctx.visibleRange.endLineNumber;\n var tabSize = this._context.model.getTabSize();\n var tabWidth = tabSize * this._spaceWidth;\n var scrollWidth = ctx.scrollWidth;\n var lineHeight = this._lineHeight;\n var indentGuideWidth = tabWidth;\n var indents = this._context.model.getLinesIndentGuides(visibleStartLineNumber, visibleEndLineNumber);\n var activeIndentStartLineNumber = 0;\n var activeIndentEndLineNumber = 0;\n var activeIndentLevel = 0;\n if (this._activeIndentEnabled && this._primaryLineNumber) {\n var activeIndentInfo = this._context.model.getActiveIndentGuide(this._primaryLineNumber, visibleStartLineNumber, visibleEndLineNumber);\n activeIndentStartLineNumber = activeIndentInfo.startLineNumber;\n activeIndentEndLineNumber = activeIndentInfo.endLineNumber;\n activeIndentLevel = activeIndentInfo.indent;\n }\n var output = [];\n for (var lineNumber = visibleStartLineNumber; lineNumber <= visibleEndLineNumber; lineNumber++) {\n var containsActiveIndentGuide = (activeIndentStartLineNumber <= lineNumber && lineNumber <= activeIndentEndLineNumber);\n var lineIndex = lineNumber - visibleStartLineNumber;\n var indent = indents[lineIndex];\n var result = '';\n var leftMostVisiblePosition = ctx.visibleRangeForPosition(new Position(lineNumber, 1));\n var left = leftMostVisiblePosition ? leftMostVisiblePosition.left : 0;\n for (var i = 1; i <= indent; i++) {\n var className = (containsActiveIndentGuide && i === activeIndentLevel ? 'cigra' : 'cigr');\n result += \"
    \";\n left += tabWidth;\n if (left > scrollWidth) {\n break;\n }\n }\n output[lineIndex] = result;\n }\n this._renderResult = output;\n };\n IndentGuidesOverlay.prototype.render = function (startLineNumber, lineNumber) {\n if (!this._renderResult) {\n return '';\n }\n var lineIndex = lineNumber - startLineNumber;\n if (lineIndex < 0 || lineIndex >= this._renderResult.length) {\n return '';\n }\n return this._renderResult[lineIndex];\n };\n return IndentGuidesOverlay;\n}(DynamicViewOverlay));\nexport { IndentGuidesOverlay };\nregisterThemingParticipant(function (theme, collector) {\n var editorIndentGuidesColor = theme.getColor(editorIndentGuides);\n if (editorIndentGuidesColor) {\n collector.addRule(\".monaco-editor .lines-content .cigr { box-shadow: 1px 0 0 0 \" + editorIndentGuidesColor + \" inset; }\");\n }\n var editorActiveIndentGuidesColor = theme.getColor(editorActiveIndentGuides) || editorIndentGuidesColor;\n if (editorActiveIndentGuidesColor) {\n collector.addRule(\".monaco-editor .lines-content .cigra { box-shadow: 1px 0 0 0 \" + editorActiveIndentGuidesColor + \" inset; }\");\n }\n});\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport './viewLines.css';\nimport { RunOnceScheduler } from '../../../../base/common/async';\nimport { Range } from '../../../common/core/range';\nimport { Position } from '../../../common/core/position';\nimport { VisibleLinesCollection } from '../../view/viewLayer';\nimport { ViewLineOptions, DomReadingContext, ViewLine } from './viewLine';\nimport { Configuration } from '../../config/configuration';\nimport { LineVisibleRanges } from '../../../common/view/renderingContext';\nimport { ViewPart, PartFingerprints } from '../../view/viewPart';\nvar LastRenderedData = /** @class */ (function () {\n function LastRenderedData() {\n this._currentVisibleRange = new Range(1, 1, 1, 1);\n }\n LastRenderedData.prototype.getCurrentVisibleRange = function () {\n return this._currentVisibleRange;\n };\n LastRenderedData.prototype.setCurrentVisibleRange = function (currentVisibleRange) {\n this._currentVisibleRange = currentVisibleRange;\n };\n return LastRenderedData;\n}());\nvar HorizontalRevealRequest = /** @class */ (function () {\n function HorizontalRevealRequest(lineNumber, startColumn, endColumn, startScrollTop, stopScrollTop, scrollType) {\n this.lineNumber = lineNumber;\n this.startColumn = startColumn;\n this.endColumn = endColumn;\n this.startScrollTop = startScrollTop;\n this.stopScrollTop = stopScrollTop;\n this.scrollType = scrollType;\n }\n return HorizontalRevealRequest;\n}());\nvar ViewLines = /** @class */ (function (_super) {\n __extends(ViewLines, _super);\n function ViewLines(context, linesContent) {\n var _this = _super.call(this, context) || this;\n _this._linesContent = linesContent;\n _this._textRangeRestingSpot = document.createElement('div');\n _this._visibleLines = new VisibleLinesCollection(_this);\n _this.domNode = _this._visibleLines.domNode;\n var conf = _this._context.configuration;\n _this._lineHeight = conf.editor.lineHeight;\n _this._typicalHalfwidthCharacterWidth = conf.editor.fontInfo.typicalHalfwidthCharacterWidth;\n _this._isViewportWrapping = conf.editor.wrappingInfo.isViewportWrapping;\n _this._revealHorizontalRightPadding = conf.editor.viewInfo.revealHorizontalRightPadding;\n _this._canUseLayerHinting = conf.editor.canUseLayerHinting;\n _this._viewLineOptions = new ViewLineOptions(conf, _this._context.theme.type);\n PartFingerprints.write(_this.domNode, 7 /* ViewLines */);\n _this.domNode.setClassName('view-lines');\n Configuration.applyFontInfo(_this.domNode, conf.editor.fontInfo);\n // --- width & height\n _this._maxLineWidth = 0;\n _this._asyncUpdateLineWidths = new RunOnceScheduler(function () {\n _this._updateLineWidthsSlow();\n }, 200);\n _this._lastRenderedData = new LastRenderedData();\n _this._horizontalRevealRequest = null;\n return _this;\n }\n ViewLines.prototype.dispose = function () {\n this._asyncUpdateLineWidths.dispose();\n _super.prototype.dispose.call(this);\n };\n ViewLines.prototype.getDomNode = function () {\n return this.domNode;\n };\n // ---- begin IVisibleLinesHost\n ViewLines.prototype.createVisibleLine = function () {\n return new ViewLine(this._viewLineOptions);\n };\n // ---- end IVisibleLinesHost\n // ---- begin view event handlers\n ViewLines.prototype.onConfigurationChanged = function (e) {\n this._visibleLines.onConfigurationChanged(e);\n if (e.wrappingInfo) {\n this._maxLineWidth = 0;\n }\n var conf = this._context.configuration;\n if (e.lineHeight) {\n this._lineHeight = conf.editor.lineHeight;\n }\n if (e.fontInfo) {\n this._typicalHalfwidthCharacterWidth = conf.editor.fontInfo.typicalHalfwidthCharacterWidth;\n }\n if (e.wrappingInfo) {\n this._isViewportWrapping = conf.editor.wrappingInfo.isViewportWrapping;\n }\n if (e.viewInfo) {\n this._revealHorizontalRightPadding = conf.editor.viewInfo.revealHorizontalRightPadding;\n }\n if (e.canUseLayerHinting) {\n this._canUseLayerHinting = conf.editor.canUseLayerHinting;\n }\n if (e.fontInfo) {\n Configuration.applyFontInfo(this.domNode, conf.editor.fontInfo);\n }\n this._onOptionsMaybeChanged();\n if (e.layoutInfo) {\n this._maxLineWidth = 0;\n }\n return true;\n };\n ViewLines.prototype._onOptionsMaybeChanged = function () {\n var conf = this._context.configuration;\n var newViewLineOptions = new ViewLineOptions(conf, this._context.theme.type);\n if (!this._viewLineOptions.equals(newViewLineOptions)) {\n this._viewLineOptions = newViewLineOptions;\n var startLineNumber = this._visibleLines.getStartLineNumber();\n var endLineNumber = this._visibleLines.getEndLineNumber();\n for (var lineNumber = startLineNumber; lineNumber <= endLineNumber; lineNumber++) {\n var line = this._visibleLines.getVisibleLine(lineNumber);\n line.onOptionsChanged(this._viewLineOptions);\n }\n return true;\n }\n return false;\n };\n ViewLines.prototype.onCursorStateChanged = function (e) {\n var rendStartLineNumber = this._visibleLines.getStartLineNumber();\n var rendEndLineNumber = this._visibleLines.getEndLineNumber();\n var r = false;\n for (var lineNumber = rendStartLineNumber; lineNumber <= rendEndLineNumber; lineNumber++) {\n r = this._visibleLines.getVisibleLine(lineNumber).onSelectionChanged() || r;\n }\n return r;\n };\n ViewLines.prototype.onDecorationsChanged = function (e) {\n if (true /*e.inlineDecorationsChanged*/) {\n var rendStartLineNumber = this._visibleLines.getStartLineNumber();\n var rendEndLineNumber = this._visibleLines.getEndLineNumber();\n for (var lineNumber = rendStartLineNumber; lineNumber <= rendEndLineNumber; lineNumber++) {\n this._visibleLines.getVisibleLine(lineNumber).onDecorationsChanged();\n }\n }\n return true;\n };\n ViewLines.prototype.onFlushed = function (e) {\n var shouldRender = this._visibleLines.onFlushed(e);\n this._maxLineWidth = 0;\n return shouldRender;\n };\n ViewLines.prototype.onLinesChanged = function (e) {\n return this._visibleLines.onLinesChanged(e);\n };\n ViewLines.prototype.onLinesDeleted = function (e) {\n return this._visibleLines.onLinesDeleted(e);\n };\n ViewLines.prototype.onLinesInserted = function (e) {\n return this._visibleLines.onLinesInserted(e);\n };\n ViewLines.prototype.onRevealRangeRequest = function (e) {\n // Using the future viewport here in order to handle multiple\n // incoming reveal range requests that might all desire to be animated\n var desiredScrollTop = this._computeScrollTopToRevealRange(this._context.viewLayout.getFutureViewport(), e.range, e.verticalType);\n // validate the new desired scroll top\n var newScrollPosition = this._context.viewLayout.validateScrollPosition({ scrollTop: desiredScrollTop });\n if (e.revealHorizontal) {\n if (e.range.startLineNumber !== e.range.endLineNumber) {\n // Two or more lines? => scroll to base (That's how you see most of the two lines)\n newScrollPosition = {\n scrollTop: newScrollPosition.scrollTop,\n scrollLeft: 0\n };\n }\n else {\n // We don't necessarily know the horizontal offset of this range since the line might not be in the view...\n this._horizontalRevealRequest = new HorizontalRevealRequest(e.range.startLineNumber, e.range.startColumn, e.range.endColumn, this._context.viewLayout.getCurrentScrollTop(), newScrollPosition.scrollTop, e.scrollType);\n }\n }\n else {\n this._horizontalRevealRequest = null;\n }\n var scrollTopDelta = Math.abs(this._context.viewLayout.getCurrentScrollTop() - newScrollPosition.scrollTop);\n if (e.scrollType === 0 /* Smooth */ && scrollTopDelta > this._lineHeight) {\n this._context.viewLayout.setScrollPositionSmooth(newScrollPosition);\n }\n else {\n this._context.viewLayout.setScrollPositionNow(newScrollPosition);\n }\n return true;\n };\n ViewLines.prototype.onScrollChanged = function (e) {\n if (this._horizontalRevealRequest && e.scrollLeftChanged) {\n // cancel any outstanding horizontal reveal request if someone else scrolls horizontally.\n this._horizontalRevealRequest = null;\n }\n if (this._horizontalRevealRequest && e.scrollTopChanged) {\n var min = Math.min(this._horizontalRevealRequest.startScrollTop, this._horizontalRevealRequest.stopScrollTop);\n var max = Math.max(this._horizontalRevealRequest.startScrollTop, this._horizontalRevealRequest.stopScrollTop);\n if (e.scrollTop < min || e.scrollTop > max) {\n // cancel any outstanding horizontal reveal request if someone else scrolls vertically.\n this._horizontalRevealRequest = null;\n }\n }\n this.domNode.setWidth(e.scrollWidth);\n return this._visibleLines.onScrollChanged(e) || true;\n };\n ViewLines.prototype.onTokensChanged = function (e) {\n return this._visibleLines.onTokensChanged(e);\n };\n ViewLines.prototype.onZonesChanged = function (e) {\n this._context.viewLayout.onMaxLineWidthChanged(this._maxLineWidth);\n return this._visibleLines.onZonesChanged(e);\n };\n ViewLines.prototype.onThemeChanged = function (e) {\n return this._onOptionsMaybeChanged();\n };\n // ---- end view event handlers\n // ----------- HELPERS FOR OTHERS\n ViewLines.prototype.getPositionFromDOMInfo = function (spanNode, offset) {\n var viewLineDomNode = this._getViewLineDomNode(spanNode);\n if (viewLineDomNode === null) {\n // Couldn't find view line node\n return null;\n }\n var lineNumber = this._getLineNumberFor(viewLineDomNode);\n if (lineNumber === -1) {\n // Couldn't find view line node\n return null;\n }\n if (lineNumber < 1 || lineNumber > this._context.model.getLineCount()) {\n // lineNumber is outside range\n return null;\n }\n if (this._context.model.getLineMaxColumn(lineNumber) === 1) {\n // Line is empty\n return new Position(lineNumber, 1);\n }\n var rendStartLineNumber = this._visibleLines.getStartLineNumber();\n var rendEndLineNumber = this._visibleLines.getEndLineNumber();\n if (lineNumber < rendStartLineNumber || lineNumber > rendEndLineNumber) {\n // Couldn't find line\n return null;\n }\n var column = this._visibleLines.getVisibleLine(lineNumber).getColumnOfNodeOffset(lineNumber, spanNode, offset);\n var minColumn = this._context.model.getLineMinColumn(lineNumber);\n if (column < minColumn) {\n column = minColumn;\n }\n return new Position(lineNumber, column);\n };\n ViewLines.prototype._getViewLineDomNode = function (node) {\n while (node && node.nodeType === 1) {\n if (node.className === ViewLine.CLASS_NAME) {\n return node;\n }\n node = node.parentElement;\n }\n return null;\n };\n /**\n * @returns the line number of this view line dom node.\n */\n ViewLines.prototype._getLineNumberFor = function (domNode) {\n var startLineNumber = this._visibleLines.getStartLineNumber();\n var endLineNumber = this._visibleLines.getEndLineNumber();\n for (var lineNumber = startLineNumber; lineNumber <= endLineNumber; lineNumber++) {\n var line = this._visibleLines.getVisibleLine(lineNumber);\n if (domNode === line.getDomNode()) {\n return lineNumber;\n }\n }\n return -1;\n };\n ViewLines.prototype.getLineWidth = function (lineNumber) {\n var rendStartLineNumber = this._visibleLines.getStartLineNumber();\n var rendEndLineNumber = this._visibleLines.getEndLineNumber();\n if (lineNumber < rendStartLineNumber || lineNumber > rendEndLineNumber) {\n // Couldn't find line\n return -1;\n }\n return this._visibleLines.getVisibleLine(lineNumber).getWidth();\n };\n ViewLines.prototype.linesVisibleRangesForRange = function (range, includeNewLines) {\n if (this.shouldRender()) {\n // Cannot read from the DOM because it is dirty\n // i.e. the model & the dom are out of sync, so I'd be reading something stale\n return null;\n }\n var originalEndLineNumber = range.endLineNumber;\n range = Range.intersectRanges(range, this._lastRenderedData.getCurrentVisibleRange());\n if (!range) {\n return null;\n }\n var visibleRanges = [], visibleRangesLen = 0;\n var domReadingContext = new DomReadingContext(this.domNode.domNode, this._textRangeRestingSpot);\n var nextLineModelLineNumber;\n if (includeNewLines) {\n nextLineModelLineNumber = this._context.model.coordinatesConverter.convertViewPositionToModelPosition(new Position(range.startLineNumber, 1)).lineNumber;\n }\n var rendStartLineNumber = this._visibleLines.getStartLineNumber();\n var rendEndLineNumber = this._visibleLines.getEndLineNumber();\n for (var lineNumber = range.startLineNumber; lineNumber <= range.endLineNumber; lineNumber++) {\n if (lineNumber < rendStartLineNumber || lineNumber > rendEndLineNumber) {\n continue;\n }\n var startColumn = lineNumber === range.startLineNumber ? range.startColumn : 1;\n var endColumn = lineNumber === range.endLineNumber ? range.endColumn : this._context.model.getLineMaxColumn(lineNumber);\n var visibleRangesForLine = this._visibleLines.getVisibleLine(lineNumber).getVisibleRangesForRange(startColumn, endColumn, domReadingContext);\n if (!visibleRangesForLine || visibleRangesForLine.length === 0) {\n continue;\n }\n if (includeNewLines && lineNumber < originalEndLineNumber) {\n var currentLineModelLineNumber = nextLineModelLineNumber;\n nextLineModelLineNumber = this._context.model.coordinatesConverter.convertViewPositionToModelPosition(new Position(lineNumber + 1, 1)).lineNumber;\n if (currentLineModelLineNumber !== nextLineModelLineNumber) {\n visibleRangesForLine[visibleRangesForLine.length - 1].width += this._typicalHalfwidthCharacterWidth;\n }\n }\n visibleRanges[visibleRangesLen++] = new LineVisibleRanges(lineNumber, visibleRangesForLine);\n }\n if (visibleRangesLen === 0) {\n return null;\n }\n return visibleRanges;\n };\n ViewLines.prototype.visibleRangesForRange2 = function (range) {\n if (this.shouldRender()) {\n // Cannot read from the DOM because it is dirty\n // i.e. the model & the dom are out of sync, so I'd be reading something stale\n return null;\n }\n range = Range.intersectRanges(range, this._lastRenderedData.getCurrentVisibleRange());\n if (!range) {\n return null;\n }\n var result = [];\n var domReadingContext = new DomReadingContext(this.domNode.domNode, this._textRangeRestingSpot);\n var rendStartLineNumber = this._visibleLines.getStartLineNumber();\n var rendEndLineNumber = this._visibleLines.getEndLineNumber();\n for (var lineNumber = range.startLineNumber; lineNumber <= range.endLineNumber; lineNumber++) {\n if (lineNumber < rendStartLineNumber || lineNumber > rendEndLineNumber) {\n continue;\n }\n var startColumn = lineNumber === range.startLineNumber ? range.startColumn : 1;\n var endColumn = lineNumber === range.endLineNumber ? range.endColumn : this._context.model.getLineMaxColumn(lineNumber);\n var visibleRangesForLine = this._visibleLines.getVisibleLine(lineNumber).getVisibleRangesForRange(startColumn, endColumn, domReadingContext);\n if (!visibleRangesForLine || visibleRangesForLine.length === 0) {\n continue;\n }\n result = result.concat(visibleRangesForLine);\n }\n if (result.length === 0) {\n return null;\n }\n return result;\n };\n // --- implementation\n ViewLines.prototype.updateLineWidths = function () {\n this._updateLineWidths(false);\n };\n /**\n * Updates the max line width if it is fast to compute.\n * Returns true if all lines were taken into account.\n * Returns false if some lines need to be reevaluated (in a slow fashion).\n */\n ViewLines.prototype._updateLineWidthsFast = function () {\n return this._updateLineWidths(true);\n };\n ViewLines.prototype._updateLineWidthsSlow = function () {\n this._updateLineWidths(false);\n };\n ViewLines.prototype._updateLineWidths = function (fast) {\n var rendStartLineNumber = this._visibleLines.getStartLineNumber();\n var rendEndLineNumber = this._visibleLines.getEndLineNumber();\n var localMaxLineWidth = 1;\n var allWidthsComputed = true;\n for (var lineNumber = rendStartLineNumber; lineNumber <= rendEndLineNumber; lineNumber++) {\n var visibleLine = this._visibleLines.getVisibleLine(lineNumber);\n if (fast && !visibleLine.getWidthIsFast()) {\n // Cannot compute width in a fast way for this line\n allWidthsComputed = false;\n continue;\n }\n localMaxLineWidth = Math.max(localMaxLineWidth, visibleLine.getWidth());\n }\n if (allWidthsComputed && rendStartLineNumber === 1 && rendEndLineNumber === this._context.model.getLineCount()) {\n // we know the max line width for all the lines\n this._maxLineWidth = 0;\n }\n this._ensureMaxLineWidth(localMaxLineWidth);\n return allWidthsComputed;\n };\n ViewLines.prototype.prepareRender = function () {\n throw new Error('Not supported');\n };\n ViewLines.prototype.render = function () {\n throw new Error('Not supported');\n };\n ViewLines.prototype.renderText = function (viewportData) {\n // (1) render lines - ensures lines are in the DOM\n this._visibleLines.renderLines(viewportData);\n this._lastRenderedData.setCurrentVisibleRange(viewportData.visibleRange);\n this.domNode.setWidth(this._context.viewLayout.getScrollWidth());\n this.domNode.setHeight(Math.min(this._context.viewLayout.getScrollHeight(), 1000000));\n // (2) compute horizontal scroll position:\n // - this must happen after the lines are in the DOM since it might need a line that rendered just now\n // - it might change `scrollWidth` and `scrollLeft`\n if (this._horizontalRevealRequest) {\n var revealLineNumber = this._horizontalRevealRequest.lineNumber;\n var revealStartColumn = this._horizontalRevealRequest.startColumn;\n var revealEndColumn = this._horizontalRevealRequest.endColumn;\n var scrollType = this._horizontalRevealRequest.scrollType;\n // Check that we have the line that contains the horizontal range in the viewport\n if (viewportData.startLineNumber <= revealLineNumber && revealLineNumber <= viewportData.endLineNumber) {\n this._horizontalRevealRequest = null;\n // allow `visibleRangesForRange2` to work\n this.onDidRender();\n // compute new scroll position\n var newScrollLeft = this._computeScrollLeftToRevealRange(revealLineNumber, revealStartColumn, revealEndColumn);\n var isViewportWrapping = this._isViewportWrapping;\n if (!isViewportWrapping) {\n // ensure `scrollWidth` is large enough\n this._ensureMaxLineWidth(newScrollLeft.maxHorizontalOffset);\n }\n // set `scrollLeft`\n if (scrollType === 0 /* Smooth */) {\n this._context.viewLayout.setScrollPositionSmooth({\n scrollLeft: newScrollLeft.scrollLeft\n });\n }\n else {\n this._context.viewLayout.setScrollPositionNow({\n scrollLeft: newScrollLeft.scrollLeft\n });\n }\n }\n }\n // Update max line width (not so important, it is just so the horizontal scrollbar doesn't get too small)\n if (!this._updateLineWidthsFast()) {\n // Computing the width of some lines would be slow => delay it\n this._asyncUpdateLineWidths.schedule();\n }\n // (3) handle scrolling\n this._linesContent.setLayerHinting(this._canUseLayerHinting);\n var adjustedScrollTop = this._context.viewLayout.getCurrentScrollTop() - viewportData.bigNumbersDelta;\n this._linesContent.setTop(-adjustedScrollTop);\n this._linesContent.setLeft(-this._context.viewLayout.getCurrentScrollLeft());\n };\n // --- width\n ViewLines.prototype._ensureMaxLineWidth = function (lineWidth) {\n var iLineWidth = Math.ceil(lineWidth);\n if (this._maxLineWidth < iLineWidth) {\n this._maxLineWidth = iLineWidth;\n this._context.viewLayout.onMaxLineWidthChanged(this._maxLineWidth);\n }\n };\n ViewLines.prototype._computeScrollTopToRevealRange = function (viewport, range, verticalType) {\n var viewportStartY = viewport.top;\n var viewportHeight = viewport.height;\n var viewportEndY = viewportStartY + viewportHeight;\n var boxStartY;\n var boxEndY;\n // Have a box that includes one extra line height (for the horizontal scrollbar)\n boxStartY = this._context.viewLayout.getVerticalOffsetForLineNumber(range.startLineNumber);\n boxEndY = this._context.viewLayout.getVerticalOffsetForLineNumber(range.endLineNumber) + this._lineHeight;\n if (verticalType === 0 /* Simple */ || verticalType === 4 /* Bottom */) {\n // Reveal one line more when the last line would be covered by the scrollbar - arrow down case or revealing a line explicitly at bottom\n boxEndY += this._lineHeight;\n }\n var newScrollTop;\n if (verticalType === 1 /* Center */ || verticalType === 2 /* CenterIfOutsideViewport */) {\n if (verticalType === 2 /* CenterIfOutsideViewport */ && viewportStartY <= boxStartY && boxEndY <= viewportEndY) {\n // Box is already in the viewport... do nothing\n newScrollTop = viewportStartY;\n }\n else {\n // Box is outside the viewport... center it\n var boxMiddleY = (boxStartY + boxEndY) / 2;\n newScrollTop = Math.max(0, boxMiddleY - viewportHeight / 2);\n }\n }\n else {\n newScrollTop = this._computeMinimumScrolling(viewportStartY, viewportEndY, boxStartY, boxEndY, verticalType === 3 /* Top */, verticalType === 4 /* Bottom */);\n }\n return newScrollTop;\n };\n ViewLines.prototype._computeScrollLeftToRevealRange = function (lineNumber, startColumn, endColumn) {\n var maxHorizontalOffset = 0;\n var viewport = this._context.viewLayout.getCurrentViewport();\n var viewportStartX = viewport.left;\n var viewportEndX = viewportStartX + viewport.width;\n var visibleRanges = this.visibleRangesForRange2(new Range(lineNumber, startColumn, lineNumber, endColumn));\n var boxStartX = Number.MAX_VALUE;\n var boxEndX = 0;\n if (!visibleRanges) {\n // Unknown\n return {\n scrollLeft: viewportStartX,\n maxHorizontalOffset: maxHorizontalOffset\n };\n }\n for (var i = 0; i < visibleRanges.length; i++) {\n var visibleRange = visibleRanges[i];\n if (visibleRange.left < boxStartX) {\n boxStartX = visibleRange.left;\n }\n if (visibleRange.left + visibleRange.width > boxEndX) {\n boxEndX = visibleRange.left + visibleRange.width;\n }\n }\n maxHorizontalOffset = boxEndX;\n boxStartX = Math.max(0, boxStartX - ViewLines.HORIZONTAL_EXTRA_PX);\n boxEndX += this._revealHorizontalRightPadding;\n var newScrollLeft = this._computeMinimumScrolling(viewportStartX, viewportEndX, boxStartX, boxEndX);\n return {\n scrollLeft: newScrollLeft,\n maxHorizontalOffset: maxHorizontalOffset\n };\n };\n ViewLines.prototype._computeMinimumScrolling = function (viewportStart, viewportEnd, boxStart, boxEnd, revealAtStart, revealAtEnd) {\n viewportStart = viewportStart | 0;\n viewportEnd = viewportEnd | 0;\n boxStart = boxStart | 0;\n boxEnd = boxEnd | 0;\n revealAtStart = !!revealAtStart;\n revealAtEnd = !!revealAtEnd;\n var viewportLength = viewportEnd - viewportStart;\n var boxLength = boxEnd - boxStart;\n if (boxLength < viewportLength) {\n // The box would fit in the viewport\n if (revealAtStart) {\n return boxStart;\n }\n if (revealAtEnd) {\n return Math.max(0, boxEnd - viewportLength);\n }\n if (boxStart < viewportStart) {\n // The box is above the viewport\n return boxStart;\n }\n else if (boxEnd > viewportEnd) {\n // The box is below the viewport\n return Math.max(0, boxEnd - viewportLength);\n }\n }\n else {\n // The box would not fit in the viewport\n // Reveal the beginning of the box\n return boxStart;\n }\n return viewportStart;\n };\n /**\n * Adds this ammount of pixels to the right of lines (no-one wants to type near the edge of the viewport)\n */\n ViewLines.HORIZONTAL_EXTRA_PX = 30;\n return ViewLines;\n}(ViewPart));\nexport { ViewLines };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport './linesDecorations.css';\nimport { DecorationToRender, DedupOverlay } from '../glyphMargin/glyphMargin';\nvar LinesDecorationsOverlay = /** @class */ (function (_super) {\n __extends(LinesDecorationsOverlay, _super);\n function LinesDecorationsOverlay(context) {\n var _this = _super.call(this) || this;\n _this._context = context;\n _this._decorationsLeft = _this._context.configuration.editor.layoutInfo.decorationsLeft;\n _this._decorationsWidth = _this._context.configuration.editor.layoutInfo.decorationsWidth;\n _this._renderResult = null;\n _this._context.addEventHandler(_this);\n return _this;\n }\n LinesDecorationsOverlay.prototype.dispose = function () {\n this._context.removeEventHandler(this);\n this._context = null;\n this._renderResult = null;\n _super.prototype.dispose.call(this);\n };\n // --- begin event handlers\n LinesDecorationsOverlay.prototype.onConfigurationChanged = function (e) {\n if (e.layoutInfo) {\n this._decorationsLeft = this._context.configuration.editor.layoutInfo.decorationsLeft;\n this._decorationsWidth = this._context.configuration.editor.layoutInfo.decorationsWidth;\n }\n return true;\n };\n LinesDecorationsOverlay.prototype.onDecorationsChanged = function (e) {\n return true;\n };\n LinesDecorationsOverlay.prototype.onFlushed = function (e) {\n return true;\n };\n LinesDecorationsOverlay.prototype.onLinesChanged = function (e) {\n return true;\n };\n LinesDecorationsOverlay.prototype.onLinesDeleted = function (e) {\n return true;\n };\n LinesDecorationsOverlay.prototype.onLinesInserted = function (e) {\n return true;\n };\n LinesDecorationsOverlay.prototype.onScrollChanged = function (e) {\n return e.scrollTopChanged;\n };\n LinesDecorationsOverlay.prototype.onZonesChanged = function (e) {\n return true;\n };\n // --- end event handlers\n LinesDecorationsOverlay.prototype._getDecorations = function (ctx) {\n var decorations = ctx.getDecorationsInViewport();\n var r = [], rLen = 0;\n for (var i = 0, len = decorations.length; i < len; i++) {\n var d = decorations[i];\n var linesDecorationsClassName = d.options.linesDecorationsClassName;\n if (linesDecorationsClassName) {\n r[rLen++] = new DecorationToRender(d.range.startLineNumber, d.range.endLineNumber, linesDecorationsClassName);\n }\n }\n return r;\n };\n LinesDecorationsOverlay.prototype.prepareRender = function (ctx) {\n var visibleStartLineNumber = ctx.visibleRange.startLineNumber;\n var visibleEndLineNumber = ctx.visibleRange.endLineNumber;\n var toRender = this._render(visibleStartLineNumber, visibleEndLineNumber, this._getDecorations(ctx));\n var left = this._decorationsLeft.toString();\n var width = this._decorationsWidth.toString();\n var common = '\" style=\"left:' + left + 'px;width:' + width + 'px;\">
    ';\n var output = [];\n for (var lineNumber = visibleStartLineNumber; lineNumber <= visibleEndLineNumber; lineNumber++) {\n var lineIndex = lineNumber - visibleStartLineNumber;\n var classNames = toRender[lineIndex];\n var lineOutput = '';\n for (var i = 0, len = classNames.length; i < len; i++) {\n lineOutput += '
    ';\n }\n output[lineIndex] = lineOutput;\n }\n this._renderResult = output;\n };\n MarginViewLineDecorationsOverlay.prototype.render = function (startLineNumber, lineNumber) {\n if (!this._renderResult) {\n return '';\n }\n return this._renderResult[lineNumber - startLineNumber];\n };\n return MarginViewLineDecorationsOverlay;\n}(DedupOverlay));\nexport { MarginViewLineDecorationsOverlay };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport './overlayWidgets.css';\nimport { createFastDomNode } from '../../../../base/browser/fastDomNode';\nimport { OverlayWidgetPositionPreference } from '../../editorBrowser';\nimport { ViewPart, PartFingerprints } from '../../view/viewPart';\nvar ViewOverlayWidgets = /** @class */ (function (_super) {\n __extends(ViewOverlayWidgets, _super);\n function ViewOverlayWidgets(context) {\n var _this = _super.call(this, context) || this;\n _this._widgets = {};\n _this._verticalScrollbarWidth = _this._context.configuration.editor.layoutInfo.verticalScrollbarWidth;\n _this._minimapWidth = _this._context.configuration.editor.layoutInfo.minimapWidth;\n _this._horizontalScrollbarHeight = _this._context.configuration.editor.layoutInfo.horizontalScrollbarHeight;\n _this._editorHeight = _this._context.configuration.editor.layoutInfo.height;\n _this._editorWidth = _this._context.configuration.editor.layoutInfo.width;\n _this._domNode = createFastDomNode(document.createElement('div'));\n PartFingerprints.write(_this._domNode, 4 /* OverlayWidgets */);\n _this._domNode.setClassName('overlayWidgets');\n return _this;\n }\n ViewOverlayWidgets.prototype.dispose = function () {\n _super.prototype.dispose.call(this);\n this._widgets = null;\n };\n ViewOverlayWidgets.prototype.getDomNode = function () {\n return this._domNode;\n };\n // ---- begin view event handlers\n ViewOverlayWidgets.prototype.onConfigurationChanged = function (e) {\n if (e.layoutInfo) {\n this._verticalScrollbarWidth = this._context.configuration.editor.layoutInfo.verticalScrollbarWidth;\n this._minimapWidth = this._context.configuration.editor.layoutInfo.minimapWidth;\n this._horizontalScrollbarHeight = this._context.configuration.editor.layoutInfo.horizontalScrollbarHeight;\n this._editorHeight = this._context.configuration.editor.layoutInfo.height;\n this._editorWidth = this._context.configuration.editor.layoutInfo.width;\n return true;\n }\n return false;\n };\n // ---- end view event handlers\n ViewOverlayWidgets.prototype.addWidget = function (widget) {\n var domNode = createFastDomNode(widget.getDomNode());\n this._widgets[widget.getId()] = {\n widget: widget,\n preference: null,\n domNode: domNode\n };\n // This is sync because a widget wants to be in the dom\n domNode.setPosition('absolute');\n domNode.setAttribute('widgetId', widget.getId());\n this._domNode.appendChild(domNode);\n this.setShouldRender();\n };\n ViewOverlayWidgets.prototype.setWidgetPosition = function (widget, preference) {\n var widgetData = this._widgets[widget.getId()];\n if (widgetData.preference === preference) {\n return false;\n }\n widgetData.preference = preference;\n this.setShouldRender();\n return true;\n };\n ViewOverlayWidgets.prototype.removeWidget = function (widget) {\n var widgetId = widget.getId();\n if (this._widgets.hasOwnProperty(widgetId)) {\n var widgetData = this._widgets[widgetId];\n var domNode = widgetData.domNode.domNode;\n delete this._widgets[widgetId];\n domNode.parentNode.removeChild(domNode);\n this.setShouldRender();\n }\n };\n ViewOverlayWidgets.prototype._renderWidget = function (widgetData) {\n var domNode = widgetData.domNode;\n if (widgetData.preference === null) {\n domNode.unsetTop();\n return;\n }\n if (widgetData.preference === OverlayWidgetPositionPreference.TOP_RIGHT_CORNER) {\n domNode.setTop(0);\n domNode.setRight((2 * this._verticalScrollbarWidth) + this._minimapWidth);\n }\n else if (widgetData.preference === OverlayWidgetPositionPreference.BOTTOM_RIGHT_CORNER) {\n var widgetHeight = domNode.domNode.clientHeight;\n domNode.setTop((this._editorHeight - widgetHeight - 2 * this._horizontalScrollbarHeight));\n domNode.setRight((2 * this._verticalScrollbarWidth) + this._minimapWidth);\n }\n else if (widgetData.preference === OverlayWidgetPositionPreference.TOP_CENTER) {\n domNode.setTop(0);\n domNode.domNode.style.right = '50%';\n }\n };\n ViewOverlayWidgets.prototype.prepareRender = function (ctx) {\n // Nothing to read\n };\n ViewOverlayWidgets.prototype.render = function (ctx) {\n this._domNode.setWidth(this._editorWidth);\n var keys = Object.keys(this._widgets);\n for (var i = 0, len = keys.length; i < len; i++) {\n var widgetId = keys[i];\n this._renderWidget(this._widgets[widgetId]);\n }\n };\n return ViewOverlayWidgets;\n}(ViewPart));\nexport { ViewOverlayWidgets };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { ViewPart } from '../../view/viewPart';\nimport { Position } from '../../../common/core/position';\nimport { TokenizationRegistry } from '../../../common/modes';\nimport { editorOverviewRulerBorder, editorCursorForeground } from '../../../common/view/editorColorRegistry';\nimport { Color } from '../../../../base/common/color';\nimport { createFastDomNode } from '../../../../base/browser/fastDomNode';\nvar Settings = /** @class */ (function () {\n function Settings(config, theme) {\n this.lineHeight = config.editor.lineHeight;\n this.pixelRatio = config.editor.pixelRatio;\n this.overviewRulerLanes = config.editor.viewInfo.overviewRulerLanes;\n this.renderBorder = config.editor.viewInfo.overviewRulerBorder;\n var borderColor = theme.getColor(editorOverviewRulerBorder);\n this.borderColor = borderColor ? borderColor.toString() : null;\n this.hideCursor = config.editor.viewInfo.hideCursorInOverviewRuler;\n var cursorColor = theme.getColor(editorCursorForeground);\n this.cursorColor = cursorColor ? cursorColor.transparent(0.7).toString() : null;\n this.themeType = theme.type;\n var minimapEnabled = config.editor.viewInfo.minimap.enabled;\n var minimapSide = config.editor.viewInfo.minimap.side;\n var backgroundColor = (minimapEnabled ? TokenizationRegistry.getDefaultBackground() : null);\n if (backgroundColor === null || minimapSide === 'left') {\n this.backgroundColor = null;\n }\n else {\n this.backgroundColor = Color.Format.CSS.formatHex(backgroundColor);\n }\n var position = config.editor.layoutInfo.overviewRuler;\n this.top = position.top;\n this.right = position.right;\n this.domWidth = position.width;\n this.domHeight = position.height;\n this.canvasWidth = (this.domWidth * this.pixelRatio) | 0;\n this.canvasHeight = (this.domHeight * this.pixelRatio) | 0;\n var _a = this._initLanes(1, this.canvasWidth, this.overviewRulerLanes), x = _a[0], w = _a[1];\n this.x = x;\n this.w = w;\n }\n Settings.prototype._initLanes = function (canvasLeftOffset, canvasWidth, laneCount) {\n var remainingWidth = canvasWidth - canvasLeftOffset;\n if (laneCount >= 3) {\n var leftWidth = Math.floor(remainingWidth / 3);\n var rightWidth = Math.floor(remainingWidth / 3);\n var centerWidth = remainingWidth - leftWidth - rightWidth;\n var leftOffset = canvasLeftOffset;\n var centerOffset = leftOffset + leftWidth;\n var rightOffset = leftOffset + leftWidth + centerWidth;\n return [\n [\n 0,\n leftOffset,\n centerOffset,\n leftOffset,\n rightOffset,\n leftOffset,\n centerOffset,\n leftOffset,\n ], [\n 0,\n leftWidth,\n centerWidth,\n leftWidth + centerWidth,\n rightWidth,\n leftWidth + centerWidth + rightWidth,\n centerWidth + rightWidth,\n leftWidth + centerWidth + rightWidth,\n ]\n ];\n }\n else if (laneCount === 2) {\n var leftWidth = Math.floor(remainingWidth / 2);\n var rightWidth = remainingWidth - leftWidth;\n var leftOffset = canvasLeftOffset;\n var rightOffset = leftOffset + leftWidth;\n return [\n [\n 0,\n leftOffset,\n leftOffset,\n leftOffset,\n rightOffset,\n leftOffset,\n leftOffset,\n leftOffset,\n ], [\n 0,\n leftWidth,\n leftWidth,\n leftWidth,\n rightWidth,\n leftWidth + rightWidth,\n leftWidth + rightWidth,\n leftWidth + rightWidth,\n ]\n ];\n }\n else {\n var offset = canvasLeftOffset;\n var width = remainingWidth;\n return [\n [\n 0,\n offset,\n offset,\n offset,\n offset,\n offset,\n offset,\n offset,\n ], [\n 0,\n width,\n width,\n width,\n width,\n width,\n width,\n width,\n ]\n ];\n }\n };\n Settings.prototype.equals = function (other) {\n return (this.lineHeight === other.lineHeight\n && this.pixelRatio === other.pixelRatio\n && this.overviewRulerLanes === other.overviewRulerLanes\n && this.renderBorder === other.renderBorder\n && this.borderColor === other.borderColor\n && this.hideCursor === other.hideCursor\n && this.cursorColor === other.cursorColor\n && this.themeType === other.themeType\n && this.backgroundColor === other.backgroundColor\n && this.top === other.top\n && this.right === other.right\n && this.domWidth === other.domWidth\n && this.domHeight === other.domHeight\n && this.canvasWidth === other.canvasWidth\n && this.canvasHeight === other.canvasHeight);\n };\n return Settings;\n}());\nvar DecorationsOverviewRuler = /** @class */ (function (_super) {\n __extends(DecorationsOverviewRuler, _super);\n function DecorationsOverviewRuler(context) {\n var _this = _super.call(this, context) || this;\n _this._domNode = createFastDomNode(document.createElement('canvas'));\n _this._domNode.setClassName('decorationsOverviewRuler');\n _this._domNode.setPosition('absolute');\n _this._domNode.setLayerHinting(true);\n _this._domNode.setAttribute('aria-hidden', 'true');\n _this._settings = null;\n _this._updateSettings(false);\n _this._tokensColorTrackerListener = TokenizationRegistry.onDidChange(function (e) {\n if (e.changedColorMap) {\n _this._updateSettings(true);\n }\n });\n _this._cursorPositions = [];\n return _this;\n }\n DecorationsOverviewRuler.prototype.dispose = function () {\n _super.prototype.dispose.call(this);\n this._tokensColorTrackerListener.dispose();\n };\n DecorationsOverviewRuler.prototype._updateSettings = function (renderNow) {\n var newSettings = new Settings(this._context.configuration, this._context.theme);\n if (this._settings !== null && this._settings.equals(newSettings)) {\n // nothing to do\n return false;\n }\n this._settings = newSettings;\n this._domNode.setTop(this._settings.top);\n this._domNode.setRight(this._settings.right);\n this._domNode.setWidth(this._settings.domWidth);\n this._domNode.setHeight(this._settings.domHeight);\n this._domNode.domNode.width = this._settings.canvasWidth;\n this._domNode.domNode.height = this._settings.canvasHeight;\n if (renderNow) {\n this._render();\n }\n return true;\n };\n // ---- begin view event handlers\n DecorationsOverviewRuler.prototype.onConfigurationChanged = function (e) {\n return this._updateSettings(false);\n };\n DecorationsOverviewRuler.prototype.onCursorStateChanged = function (e) {\n this._cursorPositions = [];\n for (var i = 0, len = e.selections.length; i < len; i++) {\n this._cursorPositions[i] = e.selections[i].getPosition();\n }\n this._cursorPositions.sort(Position.compare);\n return true;\n };\n DecorationsOverviewRuler.prototype.onDecorationsChanged = function (e) {\n return true;\n };\n DecorationsOverviewRuler.prototype.onFlushed = function (e) {\n return true;\n };\n DecorationsOverviewRuler.prototype.onScrollChanged = function (e) {\n return e.scrollHeightChanged;\n };\n DecorationsOverviewRuler.prototype.onZonesChanged = function (e) {\n return true;\n };\n DecorationsOverviewRuler.prototype.onThemeChanged = function (e) {\n // invalidate color cache\n this._context.model.invalidateOverviewRulerColorCache();\n return this._updateSettings(false);\n };\n // ---- end view event handlers\n DecorationsOverviewRuler.prototype.getDomNode = function () {\n return this._domNode.domNode;\n };\n DecorationsOverviewRuler.prototype.prepareRender = function (ctx) {\n // Nothing to read\n };\n DecorationsOverviewRuler.prototype.render = function (editorCtx) {\n this._render();\n };\n DecorationsOverviewRuler.prototype._render = function () {\n var canvasWidth = this._settings.canvasWidth;\n var canvasHeight = this._settings.canvasHeight;\n var lineHeight = this._settings.lineHeight;\n var viewLayout = this._context.viewLayout;\n var outerHeight = this._context.viewLayout.getScrollHeight();\n var heightRatio = canvasHeight / outerHeight;\n var decorations = this._context.model.getAllOverviewRulerDecorations(this._context.theme);\n var minDecorationHeight = (6 /* MIN_DECORATION_HEIGHT */ * this._settings.pixelRatio) | 0;\n var halfMinDecorationHeight = (minDecorationHeight / 2) | 0;\n var canvasCtx = this._domNode.domNode.getContext('2d');\n if (this._settings.backgroundColor === null) {\n canvasCtx.clearRect(0, 0, canvasWidth, canvasHeight);\n }\n else {\n canvasCtx.fillStyle = this._settings.backgroundColor;\n canvasCtx.fillRect(0, 0, canvasWidth, canvasHeight);\n }\n var x = this._settings.x;\n var w = this._settings.w;\n // Avoid flickering by always rendering the colors in the same order\n // colors that don't use transparency will be sorted last (they start with #)\n var colors = Object.keys(decorations);\n colors.sort();\n for (var cIndex = 0, cLen = colors.length; cIndex < cLen; cIndex++) {\n var color = colors[cIndex];\n var colorDecorations = decorations[color];\n canvasCtx.fillStyle = color;\n var prevLane = 0;\n var prevY1 = 0;\n var prevY2 = 0;\n for (var i = 0, len = colorDecorations.length; i < len; i++) {\n var lane = colorDecorations[3 * i];\n var startLineNumber = colorDecorations[3 * i + 1];\n var endLineNumber = colorDecorations[3 * i + 2];\n var y1 = (viewLayout.getVerticalOffsetForLineNumber(startLineNumber) * heightRatio) | 0;\n var y2 = ((viewLayout.getVerticalOffsetForLineNumber(endLineNumber) + lineHeight) * heightRatio) | 0;\n var height = y2 - y1;\n if (height < minDecorationHeight) {\n var yCenter = ((y1 + y2) / 2) | 0;\n if (yCenter < halfMinDecorationHeight) {\n yCenter = halfMinDecorationHeight;\n }\n else if (yCenter + halfMinDecorationHeight > canvasHeight) {\n yCenter = canvasHeight - halfMinDecorationHeight;\n }\n y1 = yCenter - halfMinDecorationHeight;\n y2 = yCenter + halfMinDecorationHeight;\n }\n if (y1 > prevY2 + 1 || lane !== prevLane) {\n // flush prev\n if (i !== 0) {\n canvasCtx.fillRect(x[prevLane], prevY1, w[prevLane], prevY2 - prevY1);\n }\n prevLane = lane;\n prevY1 = y1;\n prevY2 = y2;\n }\n else {\n // merge into prev\n if (y2 > prevY2) {\n prevY2 = y2;\n }\n }\n }\n canvasCtx.fillRect(x[prevLane], prevY1, w[prevLane], prevY2 - prevY1);\n }\n // Draw cursors\n if (!this._settings.hideCursor) {\n var cursorHeight = (2 * this._settings.pixelRatio) | 0;\n var halfCursorHeight = (cursorHeight / 2) | 0;\n var cursorX = this._settings.x[7 /* Full */];\n var cursorW = this._settings.w[7 /* Full */];\n canvasCtx.fillStyle = this._settings.cursorColor;\n var prevY1 = -100;\n var prevY2 = -100;\n for (var i = 0, len = this._cursorPositions.length; i < len; i++) {\n var cursor = this._cursorPositions[i];\n var yCenter = (viewLayout.getVerticalOffsetForLineNumber(cursor.lineNumber) * heightRatio) | 0;\n if (yCenter < halfCursorHeight) {\n yCenter = halfCursorHeight;\n }\n else if (yCenter + halfCursorHeight > canvasHeight) {\n yCenter = canvasHeight - halfCursorHeight;\n }\n var y1 = yCenter - halfCursorHeight;\n var y2 = y1 + cursorHeight;\n if (y1 > prevY2 + 1) {\n // flush prev\n if (i !== 0) {\n canvasCtx.fillRect(cursorX, prevY1, cursorW, prevY2 - prevY1);\n }\n prevY1 = y1;\n prevY2 = y2;\n }\n else {\n // merge into prev\n if (y2 > prevY2) {\n prevY2 = y2;\n }\n }\n }\n canvasCtx.fillRect(cursorX, prevY1, cursorW, prevY2 - prevY1);\n }\n if (this._settings.renderBorder && this._settings.borderColor && this._settings.overviewRulerLanes > 0) {\n canvasCtx.beginPath();\n canvasCtx.lineWidth = 1;\n canvasCtx.strokeStyle = this._settings.borderColor;\n canvasCtx.moveTo(0, 0);\n canvasCtx.lineTo(0, canvasHeight);\n canvasCtx.stroke();\n canvasCtx.moveTo(0, 0);\n canvasCtx.lineTo(canvasWidth, 0);\n canvasCtx.stroke();\n }\n };\n return DecorationsOverviewRuler;\n}(ViewPart));\nexport { DecorationsOverviewRuler };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar ColorZone = /** @class */ (function () {\n function ColorZone(from, to, colorId) {\n this.from = from | 0;\n this.to = to | 0;\n this.colorId = colorId | 0;\n }\n ColorZone.compare = function (a, b) {\n if (a.colorId === b.colorId) {\n if (a.from === b.from) {\n return a.to - b.to;\n }\n return a.from - b.from;\n }\n return a.colorId - b.colorId;\n };\n return ColorZone;\n}());\nexport { ColorZone };\n/**\n * A zone in the overview ruler\n */\nvar OverviewRulerZone = /** @class */ (function () {\n function OverviewRulerZone(startLineNumber, endLineNumber, color) {\n this.startLineNumber = startLineNumber;\n this.endLineNumber = endLineNumber;\n this.color = color;\n this._colorZone = null;\n }\n OverviewRulerZone.compare = function (a, b) {\n if (a.color === b.color) {\n if (a.startLineNumber === b.startLineNumber) {\n return a.endLineNumber - b.endLineNumber;\n }\n return a.startLineNumber - b.startLineNumber;\n }\n return a.color < b.color ? -1 : 1;\n };\n OverviewRulerZone.prototype.setColorZone = function (colorZone) {\n this._colorZone = colorZone;\n };\n OverviewRulerZone.prototype.getColorZones = function () {\n return this._colorZone;\n };\n return OverviewRulerZone;\n}());\nexport { OverviewRulerZone };\nvar OverviewZoneManager = /** @class */ (function () {\n function OverviewZoneManager(getVerticalOffsetForLine) {\n this._getVerticalOffsetForLine = getVerticalOffsetForLine;\n this._zones = [];\n this._colorZonesInvalid = false;\n this._lineHeight = 0;\n this._domWidth = 0;\n this._domHeight = 0;\n this._outerHeight = 0;\n this._pixelRatio = 1;\n this._lastAssignedId = 0;\n this._color2Id = Object.create(null);\n this._id2Color = [];\n }\n OverviewZoneManager.prototype.getId2Color = function () {\n return this._id2Color;\n };\n OverviewZoneManager.prototype.setZones = function (newZones) {\n this._zones = newZones;\n this._zones.sort(OverviewRulerZone.compare);\n };\n OverviewZoneManager.prototype.setLineHeight = function (lineHeight) {\n if (this._lineHeight === lineHeight) {\n return false;\n }\n this._lineHeight = lineHeight;\n this._colorZonesInvalid = true;\n return true;\n };\n OverviewZoneManager.prototype.setPixelRatio = function (pixelRatio) {\n this._pixelRatio = pixelRatio;\n this._colorZonesInvalid = true;\n };\n OverviewZoneManager.prototype.getDOMWidth = function () {\n return this._domWidth;\n };\n OverviewZoneManager.prototype.getCanvasWidth = function () {\n return this._domWidth * this._pixelRatio;\n };\n OverviewZoneManager.prototype.setDOMWidth = function (width) {\n if (this._domWidth === width) {\n return false;\n }\n this._domWidth = width;\n this._colorZonesInvalid = true;\n return true;\n };\n OverviewZoneManager.prototype.getDOMHeight = function () {\n return this._domHeight;\n };\n OverviewZoneManager.prototype.getCanvasHeight = function () {\n return this._domHeight * this._pixelRatio;\n };\n OverviewZoneManager.prototype.setDOMHeight = function (height) {\n if (this._domHeight === height) {\n return false;\n }\n this._domHeight = height;\n this._colorZonesInvalid = true;\n return true;\n };\n OverviewZoneManager.prototype.getOuterHeight = function () {\n return this._outerHeight;\n };\n OverviewZoneManager.prototype.setOuterHeight = function (outerHeight) {\n if (this._outerHeight === outerHeight) {\n return false;\n }\n this._outerHeight = outerHeight;\n this._colorZonesInvalid = true;\n return true;\n };\n OverviewZoneManager.prototype.resolveColorZones = function () {\n var colorZonesInvalid = this._colorZonesInvalid;\n var lineHeight = Math.floor(this._lineHeight); // @perf\n var totalHeight = Math.floor(this.getCanvasHeight()); // @perf\n var outerHeight = Math.floor(this._outerHeight); // @perf\n var heightRatio = totalHeight / outerHeight;\n var halfMinimumHeight = Math.floor(4 /* MINIMUM_HEIGHT */ * this._pixelRatio / 2);\n var allColorZones = [];\n for (var i = 0, len = this._zones.length; i < len; i++) {\n var zone = this._zones[i];\n if (!colorZonesInvalid) {\n var colorZone_1 = zone.getColorZones();\n if (colorZone_1) {\n allColorZones.push(colorZone_1);\n continue;\n }\n }\n var y1 = Math.floor(heightRatio * (this._getVerticalOffsetForLine(zone.startLineNumber)));\n var y2 = Math.floor(heightRatio * (this._getVerticalOffsetForLine(zone.endLineNumber) + lineHeight));\n var ycenter = Math.floor((y1 + y2) / 2);\n var halfHeight = (y2 - ycenter);\n if (halfHeight < halfMinimumHeight) {\n halfHeight = halfMinimumHeight;\n }\n if (ycenter - halfHeight < 0) {\n ycenter = halfHeight;\n }\n if (ycenter + halfHeight > totalHeight) {\n ycenter = totalHeight - halfHeight;\n }\n var color = zone.color;\n var colorId = this._color2Id[color];\n if (!colorId) {\n colorId = (++this._lastAssignedId);\n this._color2Id[color] = colorId;\n this._id2Color[colorId] = color;\n }\n var colorZone = new ColorZone(ycenter - halfHeight, ycenter + halfHeight, colorId);\n zone.setColorZone(colorZone);\n allColorZones.push(colorZone);\n }\n this._colorZonesInvalid = false;\n allColorZones.sort(ColorZone.compare);\n return allColorZones;\n };\n return OverviewZoneManager;\n}());\nexport { OverviewZoneManager };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { ViewEventHandler } from '../../../common/viewModel/viewEventHandler';\nimport { OverviewZoneManager } from '../../../common/view/overviewZoneManager';\nimport { createFastDomNode } from '../../../../base/browser/fastDomNode';\nvar OverviewRuler = /** @class */ (function (_super) {\n __extends(OverviewRuler, _super);\n function OverviewRuler(context, cssClassName) {\n var _this = _super.call(this) || this;\n _this._context = context;\n _this._domNode = createFastDomNode(document.createElement('canvas'));\n _this._domNode.setClassName(cssClassName);\n _this._domNode.setPosition('absolute');\n _this._domNode.setLayerHinting(true);\n _this._zoneManager = new OverviewZoneManager(function (lineNumber) { return _this._context.viewLayout.getVerticalOffsetForLineNumber(lineNumber); });\n _this._zoneManager.setDOMWidth(0);\n _this._zoneManager.setDOMHeight(0);\n _this._zoneManager.setOuterHeight(_this._context.viewLayout.getScrollHeight());\n _this._zoneManager.setLineHeight(_this._context.configuration.editor.lineHeight);\n _this._zoneManager.setPixelRatio(_this._context.configuration.editor.pixelRatio);\n _this._context.addEventHandler(_this);\n return _this;\n }\n OverviewRuler.prototype.dispose = function () {\n this._context.removeEventHandler(this);\n this._zoneManager = null;\n _super.prototype.dispose.call(this);\n };\n // ---- begin view event handlers\n OverviewRuler.prototype.onConfigurationChanged = function (e) {\n if (e.lineHeight) {\n this._zoneManager.setLineHeight(this._context.configuration.editor.lineHeight);\n this._render();\n }\n if (e.pixelRatio) {\n this._zoneManager.setPixelRatio(this._context.configuration.editor.pixelRatio);\n this._domNode.setWidth(this._zoneManager.getDOMWidth());\n this._domNode.setHeight(this._zoneManager.getDOMHeight());\n this._domNode.domNode.width = this._zoneManager.getCanvasWidth();\n this._domNode.domNode.height = this._zoneManager.getCanvasHeight();\n this._render();\n }\n return true;\n };\n OverviewRuler.prototype.onFlushed = function (e) {\n this._render();\n return true;\n };\n OverviewRuler.prototype.onScrollChanged = function (e) {\n if (e.scrollHeightChanged) {\n this._zoneManager.setOuterHeight(e.scrollHeight);\n this._render();\n }\n return true;\n };\n OverviewRuler.prototype.onZonesChanged = function (e) {\n this._render();\n return true;\n };\n // ---- end view event handlers\n OverviewRuler.prototype.getDomNode = function () {\n return this._domNode.domNode;\n };\n OverviewRuler.prototype.setLayout = function (position) {\n this._domNode.setTop(position.top);\n this._domNode.setRight(position.right);\n var hasChanged = false;\n hasChanged = this._zoneManager.setDOMWidth(position.width) || hasChanged;\n hasChanged = this._zoneManager.setDOMHeight(position.height) || hasChanged;\n if (hasChanged) {\n this._domNode.setWidth(this._zoneManager.getDOMWidth());\n this._domNode.setHeight(this._zoneManager.getDOMHeight());\n this._domNode.domNode.width = this._zoneManager.getCanvasWidth();\n this._domNode.domNode.height = this._zoneManager.getCanvasHeight();\n this._render();\n }\n };\n OverviewRuler.prototype.setZones = function (zones) {\n this._zoneManager.setZones(zones);\n this._render();\n };\n OverviewRuler.prototype._render = function () {\n if (this._zoneManager.getOuterHeight() === 0) {\n return false;\n }\n var width = this._zoneManager.getCanvasWidth();\n var height = this._zoneManager.getCanvasHeight();\n var colorZones = this._zoneManager.resolveColorZones();\n var id2Color = this._zoneManager.getId2Color();\n var ctx = this._domNode.domNode.getContext('2d');\n ctx.clearRect(0, 0, width, height);\n if (colorZones.length > 0) {\n this._renderOneLane(ctx, colorZones, id2Color, width);\n }\n return true;\n };\n OverviewRuler.prototype._renderOneLane = function (ctx, colorZones, id2Color, width) {\n var currentColorId = 0;\n var currentFrom = 0;\n var currentTo = 0;\n for (var i = 0, len = colorZones.length; i < len; i++) {\n var zone = colorZones[i];\n var zoneColorId = zone.colorId;\n var zoneFrom = zone.from;\n var zoneTo = zone.to;\n if (zoneColorId !== currentColorId) {\n ctx.fillRect(0, currentFrom, width, currentTo - currentFrom);\n currentColorId = zoneColorId;\n ctx.fillStyle = id2Color[currentColorId];\n currentFrom = zoneFrom;\n currentTo = zoneTo;\n }\n else {\n if (currentTo >= zoneFrom) {\n currentTo = Math.max(currentTo, zoneTo);\n }\n else {\n ctx.fillRect(0, currentFrom, width, currentTo - currentFrom);\n currentFrom = zoneFrom;\n currentTo = zoneTo;\n }\n }\n }\n ctx.fillRect(0, currentFrom, width, currentTo - currentFrom);\n };\n return OverviewRuler;\n}(ViewEventHandler));\nexport { OverviewRuler };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport './rulers.css';\nimport { createFastDomNode } from '../../../../base/browser/fastDomNode';\nimport { ViewPart } from '../../view/viewPart';\nimport { registerThemingParticipant } from '../../../../platform/theme/common/themeService';\nimport { editorRuler } from '../../../common/view/editorColorRegistry';\nvar Rulers = /** @class */ (function (_super) {\n __extends(Rulers, _super);\n function Rulers(context) {\n var _this = _super.call(this, context) || this;\n _this.domNode = createFastDomNode(document.createElement('div'));\n _this.domNode.setAttribute('role', 'presentation');\n _this.domNode.setAttribute('aria-hidden', 'true');\n _this.domNode.setClassName('view-rulers');\n _this._renderedRulers = [];\n _this._rulers = _this._context.configuration.editor.viewInfo.rulers;\n _this._typicalHalfwidthCharacterWidth = _this._context.configuration.editor.fontInfo.typicalHalfwidthCharacterWidth;\n return _this;\n }\n Rulers.prototype.dispose = function () {\n _super.prototype.dispose.call(this);\n };\n // --- begin event handlers\n Rulers.prototype.onConfigurationChanged = function (e) {\n if (e.viewInfo || e.layoutInfo || e.fontInfo) {\n this._rulers = this._context.configuration.editor.viewInfo.rulers;\n this._typicalHalfwidthCharacterWidth = this._context.configuration.editor.fontInfo.typicalHalfwidthCharacterWidth;\n return true;\n }\n return false;\n };\n Rulers.prototype.onScrollChanged = function (e) {\n return e.scrollHeightChanged;\n };\n // --- end event handlers\n Rulers.prototype.prepareRender = function (ctx) {\n // Nothing to read\n };\n Rulers.prototype._ensureRulersCount = function () {\n var currentCount = this._renderedRulers.length;\n var desiredCount = this._rulers.length;\n if (currentCount === desiredCount) {\n // Nothing to do\n return;\n }\n if (currentCount < desiredCount) {\n var rulerWidth = this._context.model.getTabSize();\n var addCount = desiredCount - currentCount;\n while (addCount > 0) {\n var node = createFastDomNode(document.createElement('div'));\n node.setClassName('view-ruler');\n node.setWidth(rulerWidth);\n this.domNode.appendChild(node);\n this._renderedRulers.push(node);\n addCount--;\n }\n return;\n }\n var removeCount = currentCount - desiredCount;\n while (removeCount > 0) {\n var node = this._renderedRulers.pop();\n this.domNode.removeChild(node);\n removeCount--;\n }\n };\n Rulers.prototype.render = function (ctx) {\n this._ensureRulersCount();\n for (var i = 0, len = this._rulers.length; i < len; i++) {\n var node = this._renderedRulers[i];\n node.setHeight(Math.min(ctx.scrollHeight, 1000000));\n node.setLeft(this._rulers[i] * this._typicalHalfwidthCharacterWidth);\n }\n };\n return Rulers;\n}(ViewPart));\nexport { Rulers };\nregisterThemingParticipant(function (theme, collector) {\n var rulerColor = theme.getColor(editorRuler);\n if (rulerColor) {\n collector.addRule(\".monaco-editor .view-ruler { box-shadow: 1px 0 0 0 \" + rulerColor + \" inset; }\");\n }\n});\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport './scrollDecoration.css';\nimport { createFastDomNode } from '../../../../base/browser/fastDomNode';\nimport { ViewPart } from '../../view/viewPart';\nimport { registerThemingParticipant } from '../../../../platform/theme/common/themeService';\nimport { scrollbarShadow } from '../../../../platform/theme/common/colorRegistry';\nvar ScrollDecorationViewPart = /** @class */ (function (_super) {\n __extends(ScrollDecorationViewPart, _super);\n function ScrollDecorationViewPart(context) {\n var _this = _super.call(this, context) || this;\n _this._scrollTop = 0;\n _this._width = 0;\n _this._updateWidth();\n _this._shouldShow = false;\n _this._useShadows = _this._context.configuration.editor.viewInfo.scrollbar.useShadows;\n _this._domNode = createFastDomNode(document.createElement('div'));\n _this._domNode.setAttribute('role', 'presentation');\n _this._domNode.setAttribute('aria-hidden', 'true');\n return _this;\n }\n ScrollDecorationViewPart.prototype.dispose = function () {\n _super.prototype.dispose.call(this);\n };\n ScrollDecorationViewPart.prototype._updateShouldShow = function () {\n var newShouldShow = (this._useShadows && this._scrollTop > 0);\n if (this._shouldShow !== newShouldShow) {\n this._shouldShow = newShouldShow;\n return true;\n }\n return false;\n };\n ScrollDecorationViewPart.prototype.getDomNode = function () {\n return this._domNode;\n };\n ScrollDecorationViewPart.prototype._updateWidth = function () {\n var layoutInfo = this._context.configuration.editor.layoutInfo;\n var newWidth = 0;\n if (layoutInfo.renderMinimap === 0 || (layoutInfo.minimapWidth > 0 && layoutInfo.minimapLeft === 0)) {\n newWidth = layoutInfo.width;\n }\n else {\n newWidth = layoutInfo.width - layoutInfo.minimapWidth - layoutInfo.verticalScrollbarWidth;\n }\n if (this._width !== newWidth) {\n this._width = newWidth;\n return true;\n }\n return false;\n };\n // --- begin event handlers\n ScrollDecorationViewPart.prototype.onConfigurationChanged = function (e) {\n var shouldRender = false;\n if (e.viewInfo) {\n this._useShadows = this._context.configuration.editor.viewInfo.scrollbar.useShadows;\n }\n if (e.layoutInfo) {\n shouldRender = this._updateWidth();\n }\n return this._updateShouldShow() || shouldRender;\n };\n ScrollDecorationViewPart.prototype.onScrollChanged = function (e) {\n this._scrollTop = e.scrollTop;\n return this._updateShouldShow();\n };\n // --- end event handlers\n ScrollDecorationViewPart.prototype.prepareRender = function (ctx) {\n // Nothing to read\n };\n ScrollDecorationViewPart.prototype.render = function (ctx) {\n this._domNode.setWidth(this._width);\n this._domNode.setClassName(this._shouldShow ? 'scroll-decoration' : '');\n };\n return ScrollDecorationViewPart;\n}(ViewPart));\nexport { ScrollDecorationViewPart };\nregisterThemingParticipant(function (theme, collector) {\n var shadow = theme.getColor(scrollbarShadow);\n if (shadow) {\n collector.addRule(\".monaco-editor .scroll-decoration { box-shadow: \" + shadow + \" 0 6px 6px -6px inset; }\");\n }\n});\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport './selections.css';\nimport { registerThemingParticipant } from '../../../../platform/theme/common/themeService';\nimport { editorSelectionBackground, editorInactiveSelection, editorSelectionForeground } from '../../../../platform/theme/common/colorRegistry';\nimport { DynamicViewOverlay } from '../../view/dynamicViewOverlay';\nimport * as browser from '../../../../base/browser/browser';\nvar HorizontalRangeWithStyle = /** @class */ (function () {\n function HorizontalRangeWithStyle(other) {\n this.left = other.left;\n this.width = other.width;\n this.startStyle = null;\n this.endStyle = null;\n }\n return HorizontalRangeWithStyle;\n}());\nvar LineVisibleRangesWithStyle = /** @class */ (function () {\n function LineVisibleRangesWithStyle(lineNumber, ranges) {\n this.lineNumber = lineNumber;\n this.ranges = ranges;\n }\n return LineVisibleRangesWithStyle;\n}());\nfunction toStyledRange(item) {\n return new HorizontalRangeWithStyle(item);\n}\nfunction toStyled(item) {\n return new LineVisibleRangesWithStyle(item.lineNumber, item.ranges.map(toStyledRange));\n}\n// TODO@Alex: Remove this once IE11 fixes Bug #524217\n// The problem in IE11 is that it does some sort of auto-zooming to accomodate for displays with different pixel density.\n// Unfortunately, this auto-zooming is buggy around dealing with rounded borders\nvar isIEWithZoomingIssuesNearRoundedBorders = browser.isEdgeOrIE;\nvar SelectionsOverlay = /** @class */ (function (_super) {\n __extends(SelectionsOverlay, _super);\n function SelectionsOverlay(context) {\n var _this = _super.call(this) || this;\n _this._previousFrameVisibleRangesWithStyle = [];\n _this._context = context;\n _this._lineHeight = _this._context.configuration.editor.lineHeight;\n _this._roundedSelection = _this._context.configuration.editor.viewInfo.roundedSelection;\n _this._typicalHalfwidthCharacterWidth = _this._context.configuration.editor.fontInfo.typicalHalfwidthCharacterWidth;\n _this._selections = [];\n _this._renderResult = null;\n _this._context.addEventHandler(_this);\n return _this;\n }\n SelectionsOverlay.prototype.dispose = function () {\n this._context.removeEventHandler(this);\n this._context = null;\n this._selections = null;\n this._renderResult = null;\n _super.prototype.dispose.call(this);\n };\n // --- begin event handlers\n SelectionsOverlay.prototype.onConfigurationChanged = function (e) {\n if (e.lineHeight) {\n this._lineHeight = this._context.configuration.editor.lineHeight;\n }\n if (e.viewInfo) {\n this._roundedSelection = this._context.configuration.editor.viewInfo.roundedSelection;\n }\n if (e.fontInfo) {\n this._typicalHalfwidthCharacterWidth = this._context.configuration.editor.fontInfo.typicalHalfwidthCharacterWidth;\n }\n return true;\n };\n SelectionsOverlay.prototype.onCursorStateChanged = function (e) {\n this._selections = e.selections.slice(0);\n return true;\n };\n SelectionsOverlay.prototype.onDecorationsChanged = function (e) {\n // true for inline decorations that can end up relayouting text\n return true; //e.inlineDecorationsChanged;\n };\n SelectionsOverlay.prototype.onFlushed = function (e) {\n return true;\n };\n SelectionsOverlay.prototype.onLinesChanged = function (e) {\n return true;\n };\n SelectionsOverlay.prototype.onLinesDeleted = function (e) {\n return true;\n };\n SelectionsOverlay.prototype.onLinesInserted = function (e) {\n return true;\n };\n SelectionsOverlay.prototype.onScrollChanged = function (e) {\n return e.scrollTopChanged;\n };\n SelectionsOverlay.prototype.onZonesChanged = function (e) {\n return true;\n };\n // --- end event handlers\n SelectionsOverlay.prototype._visibleRangesHaveGaps = function (linesVisibleRanges) {\n for (var i = 0, len = linesVisibleRanges.length; i < len; i++) {\n var lineVisibleRanges = linesVisibleRanges[i];\n if (lineVisibleRanges.ranges.length > 1) {\n // There are two ranges on the same line\n return true;\n }\n }\n return false;\n };\n SelectionsOverlay.prototype._enrichVisibleRangesWithStyle = function (viewport, linesVisibleRanges, previousFrame) {\n var epsilon = this._typicalHalfwidthCharacterWidth / 4;\n var previousFrameTop = null;\n var previousFrameBottom = null;\n if (previousFrame && previousFrame.length > 0 && linesVisibleRanges.length > 0) {\n var topLineNumber = linesVisibleRanges[0].lineNumber;\n if (topLineNumber === viewport.startLineNumber) {\n for (var i = 0; !previousFrameTop && i < previousFrame.length; i++) {\n if (previousFrame[i].lineNumber === topLineNumber) {\n previousFrameTop = previousFrame[i].ranges[0];\n }\n }\n }\n var bottomLineNumber = linesVisibleRanges[linesVisibleRanges.length - 1].lineNumber;\n if (bottomLineNumber === viewport.endLineNumber) {\n for (var i = previousFrame.length - 1; !previousFrameBottom && i >= 0; i--) {\n if (previousFrame[i].lineNumber === bottomLineNumber) {\n previousFrameBottom = previousFrame[i].ranges[0];\n }\n }\n }\n if (previousFrameTop && !previousFrameTop.startStyle) {\n previousFrameTop = null;\n }\n if (previousFrameBottom && !previousFrameBottom.startStyle) {\n previousFrameBottom = null;\n }\n }\n for (var i = 0, len = linesVisibleRanges.length; i < len; i++) {\n // We know for a fact that there is precisely one range on each line\n var curLineRange = linesVisibleRanges[i].ranges[0];\n var curLeft = curLineRange.left;\n var curRight = curLineRange.left + curLineRange.width;\n var startStyle = {\n top: 0 /* EXTERN */,\n bottom: 0 /* EXTERN */\n };\n var endStyle = {\n top: 0 /* EXTERN */,\n bottom: 0 /* EXTERN */\n };\n if (i > 0) {\n // Look above\n var prevLeft = linesVisibleRanges[i - 1].ranges[0].left;\n var prevRight = linesVisibleRanges[i - 1].ranges[0].left + linesVisibleRanges[i - 1].ranges[0].width;\n if (abs(curLeft - prevLeft) < epsilon) {\n startStyle.top = 2 /* FLAT */;\n }\n else if (curLeft > prevLeft) {\n startStyle.top = 1 /* INTERN */;\n }\n if (abs(curRight - prevRight) < epsilon) {\n endStyle.top = 2 /* FLAT */;\n }\n else if (prevLeft < curRight && curRight < prevRight) {\n endStyle.top = 1 /* INTERN */;\n }\n }\n else if (previousFrameTop) {\n // Accept some hick-ups near the viewport edges to save on repaints\n startStyle.top = previousFrameTop.startStyle.top;\n endStyle.top = previousFrameTop.endStyle.top;\n }\n if (i + 1 < len) {\n // Look below\n var nextLeft = linesVisibleRanges[i + 1].ranges[0].left;\n var nextRight = linesVisibleRanges[i + 1].ranges[0].left + linesVisibleRanges[i + 1].ranges[0].width;\n if (abs(curLeft - nextLeft) < epsilon) {\n startStyle.bottom = 2 /* FLAT */;\n }\n else if (nextLeft < curLeft && curLeft < nextRight) {\n startStyle.bottom = 1 /* INTERN */;\n }\n if (abs(curRight - nextRight) < epsilon) {\n endStyle.bottom = 2 /* FLAT */;\n }\n else if (curRight < nextRight) {\n endStyle.bottom = 1 /* INTERN */;\n }\n }\n else if (previousFrameBottom) {\n // Accept some hick-ups near the viewport edges to save on repaints\n startStyle.bottom = previousFrameBottom.startStyle.bottom;\n endStyle.bottom = previousFrameBottom.endStyle.bottom;\n }\n curLineRange.startStyle = startStyle;\n curLineRange.endStyle = endStyle;\n }\n };\n SelectionsOverlay.prototype._getVisibleRangesWithStyle = function (selection, ctx, previousFrame) {\n var _linesVisibleRanges = ctx.linesVisibleRangesForRange(selection, true) || [];\n var linesVisibleRanges = _linesVisibleRanges.map(toStyled);\n var visibleRangesHaveGaps = this._visibleRangesHaveGaps(linesVisibleRanges);\n if (!isIEWithZoomingIssuesNearRoundedBorders && !visibleRangesHaveGaps && this._roundedSelection) {\n this._enrichVisibleRangesWithStyle(ctx.visibleRange, linesVisibleRanges, previousFrame);\n }\n // The visible ranges are sorted TOP-BOTTOM and LEFT-RIGHT\n return linesVisibleRanges;\n };\n SelectionsOverlay.prototype._createSelectionPiece = function (top, height, className, left, width) {\n return ('
    ');\n };\n SelectionsOverlay.prototype._actualRenderOneSelection = function (output2, visibleStartLineNumber, hasMultipleSelections, visibleRanges) {\n var visibleRangesHaveStyle = (visibleRanges.length > 0 && visibleRanges[0].ranges[0].startStyle);\n var fullLineHeight = (this._lineHeight).toString();\n var reducedLineHeight = (this._lineHeight - 1).toString();\n var firstLineNumber = (visibleRanges.length > 0 ? visibleRanges[0].lineNumber : 0);\n var lastLineNumber = (visibleRanges.length > 0 ? visibleRanges[visibleRanges.length - 1].lineNumber : 0);\n for (var i = 0, len = visibleRanges.length; i < len; i++) {\n var lineVisibleRanges = visibleRanges[i];\n var lineNumber = lineVisibleRanges.lineNumber;\n var lineIndex = lineNumber - visibleStartLineNumber;\n var lineHeight = hasMultipleSelections ? (lineNumber === lastLineNumber || lineNumber === firstLineNumber ? reducedLineHeight : fullLineHeight) : fullLineHeight;\n var top_1 = hasMultipleSelections ? (lineNumber === firstLineNumber ? 1 : 0) : 0;\n var lineOutput = '';\n for (var j = 0, lenJ = lineVisibleRanges.ranges.length; j < lenJ; j++) {\n var visibleRange = lineVisibleRanges.ranges[j];\n if (visibleRangesHaveStyle) {\n if (visibleRange.startStyle.top === 1 /* INTERN */ || visibleRange.startStyle.bottom === 1 /* INTERN */) {\n // Reverse rounded corner to the left\n // First comes the selection (blue layer)\n lineOutput += this._createSelectionPiece(top_1, lineHeight, SelectionsOverlay.SELECTION_CLASS_NAME, visibleRange.left - SelectionsOverlay.ROUNDED_PIECE_WIDTH, SelectionsOverlay.ROUNDED_PIECE_WIDTH);\n // Second comes the background (white layer) with inverse border radius\n var className_1 = SelectionsOverlay.EDITOR_BACKGROUND_CLASS_NAME;\n if (visibleRange.startStyle.top === 1 /* INTERN */) {\n className_1 += ' ' + SelectionsOverlay.SELECTION_TOP_RIGHT;\n }\n if (visibleRange.startStyle.bottom === 1 /* INTERN */) {\n className_1 += ' ' + SelectionsOverlay.SELECTION_BOTTOM_RIGHT;\n }\n lineOutput += this._createSelectionPiece(top_1, lineHeight, className_1, visibleRange.left - SelectionsOverlay.ROUNDED_PIECE_WIDTH, SelectionsOverlay.ROUNDED_PIECE_WIDTH);\n }\n if (visibleRange.endStyle.top === 1 /* INTERN */ || visibleRange.endStyle.bottom === 1 /* INTERN */) {\n // Reverse rounded corner to the right\n // First comes the selection (blue layer)\n lineOutput += this._createSelectionPiece(top_1, lineHeight, SelectionsOverlay.SELECTION_CLASS_NAME, visibleRange.left + visibleRange.width, SelectionsOverlay.ROUNDED_PIECE_WIDTH);\n // Second comes the background (white layer) with inverse border radius\n var className_2 = SelectionsOverlay.EDITOR_BACKGROUND_CLASS_NAME;\n if (visibleRange.endStyle.top === 1 /* INTERN */) {\n className_2 += ' ' + SelectionsOverlay.SELECTION_TOP_LEFT;\n }\n if (visibleRange.endStyle.bottom === 1 /* INTERN */) {\n className_2 += ' ' + SelectionsOverlay.SELECTION_BOTTOM_LEFT;\n }\n lineOutput += this._createSelectionPiece(top_1, lineHeight, className_2, visibleRange.left + visibleRange.width, SelectionsOverlay.ROUNDED_PIECE_WIDTH);\n }\n }\n var className = SelectionsOverlay.SELECTION_CLASS_NAME;\n if (visibleRangesHaveStyle) {\n if (visibleRange.startStyle.top === 0 /* EXTERN */) {\n className += ' ' + SelectionsOverlay.SELECTION_TOP_LEFT;\n }\n if (visibleRange.startStyle.bottom === 0 /* EXTERN */) {\n className += ' ' + SelectionsOverlay.SELECTION_BOTTOM_LEFT;\n }\n if (visibleRange.endStyle.top === 0 /* EXTERN */) {\n className += ' ' + SelectionsOverlay.SELECTION_TOP_RIGHT;\n }\n if (visibleRange.endStyle.bottom === 0 /* EXTERN */) {\n className += ' ' + SelectionsOverlay.SELECTION_BOTTOM_RIGHT;\n }\n }\n lineOutput += this._createSelectionPiece(top_1, lineHeight, className, visibleRange.left, visibleRange.width);\n }\n output2[lineIndex] += lineOutput;\n }\n };\n SelectionsOverlay.prototype.prepareRender = function (ctx) {\n var output = [];\n var visibleStartLineNumber = ctx.visibleRange.startLineNumber;\n var visibleEndLineNumber = ctx.visibleRange.endLineNumber;\n for (var lineNumber = visibleStartLineNumber; lineNumber <= visibleEndLineNumber; lineNumber++) {\n var lineIndex = lineNumber - visibleStartLineNumber;\n output[lineIndex] = '';\n }\n var thisFrameVisibleRangesWithStyle = [];\n for (var i = 0, len = this._selections.length; i < len; i++) {\n var selection = this._selections[i];\n if (selection.isEmpty()) {\n thisFrameVisibleRangesWithStyle[i] = null;\n continue;\n }\n var visibleRangesWithStyle = this._getVisibleRangesWithStyle(selection, ctx, this._previousFrameVisibleRangesWithStyle[i]);\n thisFrameVisibleRangesWithStyle[i] = visibleRangesWithStyle;\n this._actualRenderOneSelection(output, visibleStartLineNumber, this._selections.length > 1, visibleRangesWithStyle);\n }\n this._previousFrameVisibleRangesWithStyle = thisFrameVisibleRangesWithStyle;\n this._renderResult = output;\n };\n SelectionsOverlay.prototype.render = function (startLineNumber, lineNumber) {\n if (!this._renderResult) {\n return '';\n }\n var lineIndex = lineNumber - startLineNumber;\n if (lineIndex < 0 || lineIndex >= this._renderResult.length) {\n return '';\n }\n return this._renderResult[lineIndex];\n };\n SelectionsOverlay.SELECTION_CLASS_NAME = 'selected-text';\n SelectionsOverlay.SELECTION_TOP_LEFT = 'top-left-radius';\n SelectionsOverlay.SELECTION_BOTTOM_LEFT = 'bottom-left-radius';\n SelectionsOverlay.SELECTION_TOP_RIGHT = 'top-right-radius';\n SelectionsOverlay.SELECTION_BOTTOM_RIGHT = 'bottom-right-radius';\n SelectionsOverlay.EDITOR_BACKGROUND_CLASS_NAME = 'monaco-editor-background';\n SelectionsOverlay.ROUNDED_PIECE_WIDTH = 10;\n return SelectionsOverlay;\n}(DynamicViewOverlay));\nexport { SelectionsOverlay };\nregisterThemingParticipant(function (theme, collector) {\n var editorSelectionColor = theme.getColor(editorSelectionBackground);\n if (editorSelectionColor) {\n collector.addRule(\".monaco-editor .focused .selected-text { background-color: \" + editorSelectionColor + \"; }\");\n }\n var editorInactiveSelectionColor = theme.getColor(editorInactiveSelection);\n if (editorInactiveSelectionColor) {\n collector.addRule(\".monaco-editor .selected-text { background-color: \" + editorInactiveSelectionColor + \"; }\");\n }\n var editorSelectionForegroundColor = theme.getColor(editorSelectionForeground);\n if (editorSelectionForegroundColor) {\n collector.addRule(\".monaco-editor .view-line span.inline-selected-text { color: \" + editorSelectionForegroundColor + \"; }\");\n }\n});\nfunction abs(n) {\n return n < 0 ? -n : n;\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport { createFastDomNode } from '../../../../base/browser/fastDomNode';\nimport { Position } from '../../../common/core/position';\nimport { Range } from '../../../common/core/range';\nimport { TextEditorCursorStyle } from '../../../common/config/editorOptions';\nimport { Configuration } from '../../config/configuration';\nimport * as dom from '../../../../base/browser/dom';\nimport * as strings from '../../../../base/common/strings';\nvar ViewCursorRenderData = /** @class */ (function () {\n function ViewCursorRenderData(top, left, width, height, textContent, textContentClassName) {\n this.top = top;\n this.left = left;\n this.width = width;\n this.height = height;\n this.textContent = textContent;\n this.textContentClassName = textContentClassName;\n }\n return ViewCursorRenderData;\n}());\nvar ViewCursor = /** @class */ (function () {\n function ViewCursor(context) {\n this._context = context;\n this._cursorStyle = this._context.configuration.editor.viewInfo.cursorStyle;\n this._lineHeight = this._context.configuration.editor.lineHeight;\n this._typicalHalfwidthCharacterWidth = this._context.configuration.editor.fontInfo.typicalHalfwidthCharacterWidth;\n this._lineCursorWidth = Math.min(this._context.configuration.editor.viewInfo.cursorWidth, this._typicalHalfwidthCharacterWidth);\n this._isVisible = true;\n // Create the dom node\n this._domNode = createFastDomNode(document.createElement('div'));\n this._domNode.setClassName('cursor');\n this._domNode.setHeight(this._lineHeight);\n this._domNode.setTop(0);\n this._domNode.setLeft(0);\n Configuration.applyFontInfo(this._domNode, this._context.configuration.editor.fontInfo);\n this._domNode.setDisplay('none');\n this.updatePosition(new Position(1, 1));\n this._lastRenderedContent = '';\n this._renderData = null;\n }\n ViewCursor.prototype.getDomNode = function () {\n return this._domNode;\n };\n ViewCursor.prototype.getPosition = function () {\n return this._position;\n };\n ViewCursor.prototype.show = function () {\n if (!this._isVisible) {\n this._domNode.setVisibility('inherit');\n this._isVisible = true;\n }\n };\n ViewCursor.prototype.hide = function () {\n if (this._isVisible) {\n this._domNode.setVisibility('hidden');\n this._isVisible = false;\n }\n };\n ViewCursor.prototype.onConfigurationChanged = function (e) {\n if (e.lineHeight) {\n this._lineHeight = this._context.configuration.editor.lineHeight;\n }\n if (e.fontInfo) {\n Configuration.applyFontInfo(this._domNode, this._context.configuration.editor.fontInfo);\n this._typicalHalfwidthCharacterWidth = this._context.configuration.editor.fontInfo.typicalHalfwidthCharacterWidth;\n }\n if (e.viewInfo) {\n this._cursorStyle = this._context.configuration.editor.viewInfo.cursorStyle;\n this._lineCursorWidth = Math.min(this._context.configuration.editor.viewInfo.cursorWidth, this._typicalHalfwidthCharacterWidth);\n }\n return true;\n };\n ViewCursor.prototype.onCursorPositionChanged = function (position) {\n this.updatePosition(position);\n return true;\n };\n ViewCursor.prototype._prepareRender = function (ctx) {\n var textContent = '';\n var textContentClassName = '';\n if (this._cursorStyle === TextEditorCursorStyle.Line || this._cursorStyle === TextEditorCursorStyle.LineThin) {\n var visibleRange = ctx.visibleRangeForPosition(this._position);\n if (!visibleRange) {\n // Outside viewport\n return null;\n }\n var width_1;\n if (this._cursorStyle === TextEditorCursorStyle.Line) {\n width_1 = dom.computeScreenAwareSize(this._lineCursorWidth > 0 ? this._lineCursorWidth : 2);\n if (width_1 > 2) {\n var lineContent = this._context.model.getLineContent(this._position.lineNumber);\n textContent = lineContent.charAt(this._position.column - 1);\n }\n }\n else {\n width_1 = dom.computeScreenAwareSize(1);\n }\n var top_1 = ctx.getVerticalOffsetForLineNumber(this._position.lineNumber) - ctx.bigNumbersDelta;\n return new ViewCursorRenderData(top_1, visibleRange.left, width_1, this._lineHeight, textContent, textContentClassName);\n }\n var visibleRangeForCharacter = ctx.linesVisibleRangesForRange(new Range(this._position.lineNumber, this._position.column, this._position.lineNumber, this._position.column + 1), false);\n if (!visibleRangeForCharacter || visibleRangeForCharacter.length === 0 || visibleRangeForCharacter[0].ranges.length === 0) {\n // Outside viewport\n return null;\n }\n var range = visibleRangeForCharacter[0].ranges[0];\n var width = range.width < 1 ? this._typicalHalfwidthCharacterWidth : range.width;\n if (this._cursorStyle === TextEditorCursorStyle.Block) {\n var lineData = this._context.model.getViewLineData(this._position.lineNumber);\n textContent = lineData.content.charAt(this._position.column - 1);\n if (strings.isHighSurrogate(lineData.content.charCodeAt(this._position.column - 1))) {\n textContent += lineData.content.charAt(this._position.column);\n }\n var tokenIndex = lineData.tokens.findTokenIndexAtOffset(this._position.column - 1);\n textContentClassName = lineData.tokens.getClassName(tokenIndex);\n }\n var top = ctx.getVerticalOffsetForLineNumber(this._position.lineNumber) - ctx.bigNumbersDelta;\n var height = this._lineHeight;\n // Underline might interfere with clicking\n if (this._cursorStyle === TextEditorCursorStyle.Underline || this._cursorStyle === TextEditorCursorStyle.UnderlineThin) {\n top += this._lineHeight - 2;\n height = 2;\n }\n return new ViewCursorRenderData(top, range.left, width, height, textContent, textContentClassName);\n };\n ViewCursor.prototype.prepareRender = function (ctx) {\n this._renderData = this._prepareRender(ctx);\n };\n ViewCursor.prototype.render = function (ctx) {\n if (!this._renderData) {\n this._domNode.setDisplay('none');\n return null;\n }\n if (this._lastRenderedContent !== this._renderData.textContent) {\n this._lastRenderedContent = this._renderData.textContent;\n this._domNode.domNode.textContent = this._lastRenderedContent;\n }\n this._domNode.setClassName('cursor ' + this._renderData.textContentClassName);\n this._domNode.setDisplay('block');\n this._domNode.setTop(this._renderData.top);\n this._domNode.setLeft(this._renderData.left);\n this._domNode.setWidth(this._renderData.width);\n this._domNode.setLineHeight(this._renderData.height);\n this._domNode.setHeight(this._renderData.height);\n return {\n domNode: this._domNode.domNode,\n position: this._position,\n contentLeft: this._renderData.left,\n height: this._renderData.height,\n width: 2\n };\n };\n ViewCursor.prototype.updatePosition = function (newPosition) {\n this._position = newPosition;\n };\n return ViewCursor;\n}());\nexport { ViewCursor };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport './viewCursors.css';\nimport { ViewPart } from '../../view/viewPart';\nimport { ViewCursor } from './viewCursor';\nimport { createFastDomNode } from '../../../../base/browser/fastDomNode';\nimport { TimeoutTimer, IntervalTimer } from '../../../../base/common/async';\nimport { registerThemingParticipant } from '../../../../platform/theme/common/themeService';\nimport { editorCursorForeground, editorCursorBackground } from '../../../common/view/editorColorRegistry';\nimport { TextEditorCursorBlinkingStyle, TextEditorCursorStyle } from '../../../common/config/editorOptions';\nvar ViewCursors = /** @class */ (function (_super) {\n __extends(ViewCursors, _super);\n function ViewCursors(context) {\n var _this = _super.call(this, context) || this;\n _this._readOnly = _this._context.configuration.editor.readOnly;\n _this._cursorBlinking = _this._context.configuration.editor.viewInfo.cursorBlinking;\n _this._cursorStyle = _this._context.configuration.editor.viewInfo.cursorStyle;\n _this._selectionIsEmpty = true;\n _this._primaryCursor = new ViewCursor(_this._context);\n _this._secondaryCursors = [];\n _this._renderData = [];\n _this._domNode = createFastDomNode(document.createElement('div'));\n _this._domNode.setAttribute('role', 'presentation');\n _this._domNode.setAttribute('aria-hidden', 'true');\n _this._updateDomClassName();\n _this._domNode.appendChild(_this._primaryCursor.getDomNode());\n _this._startCursorBlinkAnimation = new TimeoutTimer();\n _this._cursorFlatBlinkInterval = new IntervalTimer();\n _this._blinkingEnabled = false;\n _this._editorHasFocus = false;\n _this._updateBlinking();\n return _this;\n }\n ViewCursors.prototype.dispose = function () {\n _super.prototype.dispose.call(this);\n this._startCursorBlinkAnimation.dispose();\n this._cursorFlatBlinkInterval.dispose();\n };\n ViewCursors.prototype.getDomNode = function () {\n return this._domNode;\n };\n // --- begin event handlers\n ViewCursors.prototype.onConfigurationChanged = function (e) {\n if (e.readOnly) {\n this._readOnly = this._context.configuration.editor.readOnly;\n }\n if (e.viewInfo) {\n this._cursorBlinking = this._context.configuration.editor.viewInfo.cursorBlinking;\n this._cursorStyle = this._context.configuration.editor.viewInfo.cursorStyle;\n }\n this._primaryCursor.onConfigurationChanged(e);\n this._updateBlinking();\n if (e.viewInfo) {\n this._updateDomClassName();\n }\n for (var i = 0, len = this._secondaryCursors.length; i < len; i++) {\n this._secondaryCursors[i].onConfigurationChanged(e);\n }\n return true;\n };\n ViewCursors.prototype._onCursorPositionChanged = function (position, secondaryPositions) {\n this._primaryCursor.onCursorPositionChanged(position);\n this._updateBlinking();\n if (this._secondaryCursors.length < secondaryPositions.length) {\n // Create new cursors\n var addCnt = secondaryPositions.length - this._secondaryCursors.length;\n for (var i = 0; i < addCnt; i++) {\n var newCursor = new ViewCursor(this._context);\n this._domNode.domNode.insertBefore(newCursor.getDomNode().domNode, this._primaryCursor.getDomNode().domNode.nextSibling);\n this._secondaryCursors.push(newCursor);\n }\n }\n else if (this._secondaryCursors.length > secondaryPositions.length) {\n // Remove some cursors\n var removeCnt = this._secondaryCursors.length - secondaryPositions.length;\n for (var i = 0; i < removeCnt; i++) {\n this._domNode.removeChild(this._secondaryCursors[0].getDomNode());\n this._secondaryCursors.splice(0, 1);\n }\n }\n for (var i = 0; i < secondaryPositions.length; i++) {\n this._secondaryCursors[i].onCursorPositionChanged(secondaryPositions[i]);\n }\n };\n ViewCursors.prototype.onCursorStateChanged = function (e) {\n var positions = [];\n for (var i = 0, len = e.selections.length; i < len; i++) {\n positions[i] = e.selections[i].getPosition();\n }\n this._onCursorPositionChanged(positions[0], positions.slice(1));\n var selectionIsEmpty = e.selections[0].isEmpty();\n if (this._selectionIsEmpty !== selectionIsEmpty) {\n this._selectionIsEmpty = selectionIsEmpty;\n this._updateDomClassName();\n }\n return true;\n };\n ViewCursors.prototype.onDecorationsChanged = function (e) {\n // true for inline decorations that can end up relayouting text\n return true;\n };\n ViewCursors.prototype.onFlushed = function (e) {\n return true;\n };\n ViewCursors.prototype.onFocusChanged = function (e) {\n this._editorHasFocus = e.isFocused;\n this._updateBlinking();\n return false;\n };\n ViewCursors.prototype.onLinesChanged = function (e) {\n return true;\n };\n ViewCursors.prototype.onLinesDeleted = function (e) {\n return true;\n };\n ViewCursors.prototype.onLinesInserted = function (e) {\n return true;\n };\n ViewCursors.prototype.onScrollChanged = function (e) {\n return true;\n };\n ViewCursors.prototype.onTokensChanged = function (e) {\n var shouldRender = function (position) {\n for (var i = 0, len = e.ranges.length; i < len; i++) {\n if (e.ranges[i].fromLineNumber <= position.lineNumber && position.lineNumber <= e.ranges[i].toLineNumber) {\n return true;\n }\n }\n return false;\n };\n if (shouldRender(this._primaryCursor.getPosition())) {\n return true;\n }\n for (var i = 0; i < this._secondaryCursors.length; i++) {\n if (shouldRender(this._secondaryCursors[i].getPosition())) {\n return true;\n }\n }\n return false;\n };\n ViewCursors.prototype.onZonesChanged = function (e) {\n return true;\n };\n // --- end event handlers\n // ---- blinking logic\n ViewCursors.prototype._getCursorBlinking = function () {\n if (!this._editorHasFocus) {\n return TextEditorCursorBlinkingStyle.Hidden;\n }\n if (this._readOnly) {\n return TextEditorCursorBlinkingStyle.Solid;\n }\n return this._cursorBlinking;\n };\n ViewCursors.prototype._updateBlinking = function () {\n var _this = this;\n this._startCursorBlinkAnimation.cancel();\n this._cursorFlatBlinkInterval.cancel();\n var blinkingStyle = this._getCursorBlinking();\n // hidden and solid are special as they involve no animations\n var isHidden = (blinkingStyle === TextEditorCursorBlinkingStyle.Hidden);\n var isSolid = (blinkingStyle === TextEditorCursorBlinkingStyle.Solid);\n if (isHidden) {\n this._hide();\n }\n else {\n this._show();\n }\n this._blinkingEnabled = false;\n this._updateDomClassName();\n if (!isHidden && !isSolid) {\n if (blinkingStyle === TextEditorCursorBlinkingStyle.Blink) {\n // flat blinking is handled by JavaScript to save battery life due to Chromium step timing issue https://bugs.chromium.org/p/chromium/issues/detail?id=361587\n this._cursorFlatBlinkInterval.cancelAndSet(function () {\n if (_this._isVisible) {\n _this._hide();\n }\n else {\n _this._show();\n }\n }, ViewCursors.BLINK_INTERVAL);\n }\n else {\n this._startCursorBlinkAnimation.setIfNotSet(function () {\n _this._blinkingEnabled = true;\n _this._updateDomClassName();\n }, ViewCursors.BLINK_INTERVAL);\n }\n }\n };\n // --- end blinking logic\n ViewCursors.prototype._updateDomClassName = function () {\n this._domNode.setClassName(this._getClassName());\n };\n ViewCursors.prototype._getClassName = function () {\n var result = 'cursors-layer';\n if (!this._selectionIsEmpty) {\n result += ' has-selection';\n }\n switch (this._cursorStyle) {\n case TextEditorCursorStyle.Line:\n result += ' cursor-line-style';\n break;\n case TextEditorCursorStyle.Block:\n result += ' cursor-block-style';\n break;\n case TextEditorCursorStyle.Underline:\n result += ' cursor-underline-style';\n break;\n case TextEditorCursorStyle.LineThin:\n result += ' cursor-line-thin-style';\n break;\n case TextEditorCursorStyle.BlockOutline:\n result += ' cursor-block-outline-style';\n break;\n case TextEditorCursorStyle.UnderlineThin:\n result += ' cursor-underline-thin-style';\n break;\n default:\n result += ' cursor-line-style';\n }\n if (this._blinkingEnabled) {\n switch (this._getCursorBlinking()) {\n case TextEditorCursorBlinkingStyle.Blink:\n result += ' cursor-blink';\n break;\n case TextEditorCursorBlinkingStyle.Smooth:\n result += ' cursor-smooth';\n break;\n case TextEditorCursorBlinkingStyle.Phase:\n result += ' cursor-phase';\n break;\n case TextEditorCursorBlinkingStyle.Expand:\n result += ' cursor-expand';\n break;\n case TextEditorCursorBlinkingStyle.Solid:\n result += ' cursor-solid';\n break;\n default:\n result += ' cursor-solid';\n }\n }\n else {\n result += ' cursor-solid';\n }\n return result;\n };\n ViewCursors.prototype._show = function () {\n this._primaryCursor.show();\n for (var i = 0, len = this._secondaryCursors.length; i < len; i++) {\n this._secondaryCursors[i].show();\n }\n this._isVisible = true;\n };\n ViewCursors.prototype._hide = function () {\n this._primaryCursor.hide();\n for (var i = 0, len = this._secondaryCursors.length; i < len; i++) {\n this._secondaryCursors[i].hide();\n }\n this._isVisible = false;\n };\n // ---- IViewPart implementation\n ViewCursors.prototype.prepareRender = function (ctx) {\n this._primaryCursor.prepareRender(ctx);\n for (var i = 0, len = this._secondaryCursors.length; i < len; i++) {\n this._secondaryCursors[i].prepareRender(ctx);\n }\n };\n ViewCursors.prototype.render = function (ctx) {\n var renderData = [], renderDataLen = 0;\n var primaryRenderData = this._primaryCursor.render(ctx);\n if (primaryRenderData) {\n renderData[renderDataLen++] = primaryRenderData;\n }\n for (var i = 0, len = this._secondaryCursors.length; i < len; i++) {\n var secondaryRenderData = this._secondaryCursors[i].render(ctx);\n if (secondaryRenderData) {\n renderData[renderDataLen++] = secondaryRenderData;\n }\n }\n this._renderData = renderData;\n };\n ViewCursors.prototype.getLastRenderData = function () {\n return this._renderData;\n };\n ViewCursors.BLINK_INTERVAL = 500;\n return ViewCursors;\n}(ViewPart));\nexport { ViewCursors };\nregisterThemingParticipant(function (theme, collector) {\n var caret = theme.getColor(editorCursorForeground);\n if (caret) {\n var caretBackground = theme.getColor(editorCursorBackground);\n if (!caretBackground) {\n caretBackground = caret.opposite();\n }\n collector.addRule(\".monaco-editor .cursor { background-color: \" + caret + \"; border-color: \" + caret + \"; color: \" + caretBackground + \"; }\");\n if (theme.type === 'hc') {\n collector.addRule(\".monaco-editor .cursors-layer.has-selection .cursor { border-left: 1px solid \" + caretBackground + \"; border-right: 1px solid \" + caretBackground + \"; }\");\n }\n }\n});\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { onUnexpectedError } from '../../../../base/common/errors';\nimport { createFastDomNode } from '../../../../base/browser/fastDomNode';\nimport { ViewPart } from '../../view/viewPart';\nimport { Position } from '../../../common/core/position';\nvar ViewZones = /** @class */ (function (_super) {\n __extends(ViewZones, _super);\n function ViewZones(context) {\n var _this = _super.call(this, context) || this;\n _this._lineHeight = _this._context.configuration.editor.lineHeight;\n _this._contentWidth = _this._context.configuration.editor.layoutInfo.contentWidth;\n _this._contentLeft = _this._context.configuration.editor.layoutInfo.contentLeft;\n _this.domNode = createFastDomNode(document.createElement('div'));\n _this.domNode.setClassName('view-zones');\n _this.domNode.setPosition('absolute');\n _this.domNode.setAttribute('role', 'presentation');\n _this.domNode.setAttribute('aria-hidden', 'true');\n _this.marginDomNode = createFastDomNode(document.createElement('div'));\n _this.marginDomNode.setClassName('margin-view-zones');\n _this.marginDomNode.setPosition('absolute');\n _this.marginDomNode.setAttribute('role', 'presentation');\n _this.marginDomNode.setAttribute('aria-hidden', 'true');\n _this._zones = {};\n return _this;\n }\n ViewZones.prototype.dispose = function () {\n _super.prototype.dispose.call(this);\n this._zones = {};\n };\n // ---- begin view event handlers\n ViewZones.prototype._recomputeWhitespacesProps = function () {\n var hadAChange = false;\n var keys = Object.keys(this._zones);\n for (var i = 0, len = keys.length; i < len; i++) {\n var id = keys[i];\n var zone = this._zones[id];\n var props = this._computeWhitespaceProps(zone.delegate);\n if (this._context.viewLayout.changeWhitespace(parseInt(id, 10), props.afterViewLineNumber, props.heightInPx)) {\n this._safeCallOnComputedHeight(zone.delegate, props.heightInPx);\n hadAChange = true;\n }\n }\n return hadAChange;\n };\n ViewZones.prototype.onConfigurationChanged = function (e) {\n if (e.lineHeight) {\n this._lineHeight = this._context.configuration.editor.lineHeight;\n return this._recomputeWhitespacesProps();\n }\n if (e.layoutInfo) {\n this._contentWidth = this._context.configuration.editor.layoutInfo.contentWidth;\n this._contentLeft = this._context.configuration.editor.layoutInfo.contentLeft;\n }\n return true;\n };\n ViewZones.prototype.onLineMappingChanged = function (e) {\n var hadAChange = this._recomputeWhitespacesProps();\n if (hadAChange) {\n this._context.viewLayout.onHeightMaybeChanged();\n }\n return hadAChange;\n };\n ViewZones.prototype.onLinesDeleted = function (e) {\n return true;\n };\n ViewZones.prototype.onScrollChanged = function (e) {\n return e.scrollTopChanged || e.scrollWidthChanged;\n };\n ViewZones.prototype.onZonesChanged = function (e) {\n return true;\n };\n ViewZones.prototype.onLinesInserted = function (e) {\n return true;\n };\n // ---- end view event handlers\n ViewZones.prototype._getZoneOrdinal = function (zone) {\n if (typeof zone.afterColumn !== 'undefined') {\n return zone.afterColumn;\n }\n return 10000;\n };\n ViewZones.prototype._computeWhitespaceProps = function (zone) {\n if (zone.afterLineNumber === 0) {\n return {\n afterViewLineNumber: 0,\n heightInPx: this._heightInPixels(zone),\n minWidthInPx: this._minWidthInPixels(zone)\n };\n }\n var zoneAfterModelPosition;\n if (typeof zone.afterColumn !== 'undefined') {\n zoneAfterModelPosition = this._context.model.validateModelPosition({\n lineNumber: zone.afterLineNumber,\n column: zone.afterColumn\n });\n }\n else {\n var validAfterLineNumber = this._context.model.validateModelPosition({\n lineNumber: zone.afterLineNumber,\n column: 1\n }).lineNumber;\n zoneAfterModelPosition = new Position(validAfterLineNumber, this._context.model.getModelLineMaxColumn(validAfterLineNumber));\n }\n var zoneBeforeModelPosition;\n if (zoneAfterModelPosition.column === this._context.model.getModelLineMaxColumn(zoneAfterModelPosition.lineNumber)) {\n zoneBeforeModelPosition = this._context.model.validateModelPosition({\n lineNumber: zoneAfterModelPosition.lineNumber + 1,\n column: 1\n });\n }\n else {\n zoneBeforeModelPosition = this._context.model.validateModelPosition({\n lineNumber: zoneAfterModelPosition.lineNumber,\n column: zoneAfterModelPosition.column + 1\n });\n }\n var viewPosition = this._context.model.coordinatesConverter.convertModelPositionToViewPosition(zoneAfterModelPosition);\n var isVisible = this._context.model.coordinatesConverter.modelPositionIsVisible(zoneBeforeModelPosition);\n return {\n afterViewLineNumber: viewPosition.lineNumber,\n heightInPx: (isVisible ? this._heightInPixels(zone) : 0),\n minWidthInPx: this._minWidthInPixels(zone)\n };\n };\n ViewZones.prototype.addZone = function (zone) {\n var props = this._computeWhitespaceProps(zone);\n var whitespaceId = this._context.viewLayout.addWhitespace(props.afterViewLineNumber, this._getZoneOrdinal(zone), props.heightInPx, props.minWidthInPx);\n var myZone = {\n whitespaceId: whitespaceId,\n delegate: zone,\n isVisible: false,\n domNode: createFastDomNode(zone.domNode),\n marginDomNode: zone.marginDomNode ? createFastDomNode(zone.marginDomNode) : null\n };\n this._safeCallOnComputedHeight(myZone.delegate, props.heightInPx);\n myZone.domNode.setPosition('absolute');\n myZone.domNode.domNode.style.width = '100%';\n myZone.domNode.setDisplay('none');\n myZone.domNode.setAttribute('monaco-view-zone', myZone.whitespaceId.toString());\n this.domNode.appendChild(myZone.domNode);\n if (myZone.marginDomNode) {\n myZone.marginDomNode.setPosition('absolute');\n myZone.marginDomNode.domNode.style.width = '100%';\n myZone.marginDomNode.setDisplay('none');\n myZone.marginDomNode.setAttribute('monaco-view-zone', myZone.whitespaceId.toString());\n this.marginDomNode.appendChild(myZone.marginDomNode);\n }\n this._zones[myZone.whitespaceId.toString()] = myZone;\n this.setShouldRender();\n return myZone.whitespaceId;\n };\n ViewZones.prototype.removeZone = function (id) {\n if (this._zones.hasOwnProperty(id.toString())) {\n var zone = this._zones[id.toString()];\n delete this._zones[id.toString()];\n this._context.viewLayout.removeWhitespace(zone.whitespaceId);\n zone.domNode.removeAttribute('monaco-visible-view-zone');\n zone.domNode.removeAttribute('monaco-view-zone');\n zone.domNode.domNode.parentNode.removeChild(zone.domNode.domNode);\n if (zone.marginDomNode) {\n zone.marginDomNode.removeAttribute('monaco-visible-view-zone');\n zone.marginDomNode.removeAttribute('monaco-view-zone');\n zone.marginDomNode.domNode.parentNode.removeChild(zone.marginDomNode.domNode);\n }\n this.setShouldRender();\n return true;\n }\n return false;\n };\n ViewZones.prototype.layoutZone = function (id) {\n var changed = false;\n if (this._zones.hasOwnProperty(id.toString())) {\n var zone = this._zones[id.toString()];\n var props = this._computeWhitespaceProps(zone.delegate);\n // let newOrdinal = this._getZoneOrdinal(zone.delegate);\n changed = this._context.viewLayout.changeWhitespace(zone.whitespaceId, props.afterViewLineNumber, props.heightInPx) || changed;\n // TODO@Alex: change `newOrdinal` too\n if (changed) {\n this._safeCallOnComputedHeight(zone.delegate, props.heightInPx);\n this.setShouldRender();\n }\n }\n return changed;\n };\n ViewZones.prototype.shouldSuppressMouseDownOnViewZone = function (id) {\n if (this._zones.hasOwnProperty(id.toString())) {\n var zone = this._zones[id.toString()];\n return zone.delegate.suppressMouseDown;\n }\n return false;\n };\n ViewZones.prototype._heightInPixels = function (zone) {\n if (typeof zone.heightInPx === 'number') {\n return zone.heightInPx;\n }\n if (typeof zone.heightInLines === 'number') {\n return this._lineHeight * zone.heightInLines;\n }\n return this._lineHeight;\n };\n ViewZones.prototype._minWidthInPixels = function (zone) {\n if (typeof zone.minWidthInPx === 'number') {\n return zone.minWidthInPx;\n }\n return 0;\n };\n ViewZones.prototype._safeCallOnComputedHeight = function (zone, height) {\n if (typeof zone.onComputedHeight === 'function') {\n try {\n zone.onComputedHeight(height);\n }\n catch (e) {\n onUnexpectedError(e);\n }\n }\n };\n ViewZones.prototype._safeCallOnDomNodeTop = function (zone, top) {\n if (typeof zone.onDomNodeTop === 'function') {\n try {\n zone.onDomNodeTop(top);\n }\n catch (e) {\n onUnexpectedError(e);\n }\n }\n };\n ViewZones.prototype.prepareRender = function (ctx) {\n // Nothing to read\n };\n ViewZones.prototype.render = function (ctx) {\n var visibleWhitespaces = ctx.viewportData.whitespaceViewportData;\n var visibleZones = {};\n var hasVisibleZone = false;\n for (var i = 0, len = visibleWhitespaces.length; i < len; i++) {\n visibleZones[visibleWhitespaces[i].id.toString()] = visibleWhitespaces[i];\n hasVisibleZone = true;\n }\n var keys = Object.keys(this._zones);\n for (var i = 0, len = keys.length; i < len; i++) {\n var id = keys[i];\n var zone = this._zones[id];\n var newTop = 0;\n var newHeight = 0;\n var newDisplay = 'none';\n if (visibleZones.hasOwnProperty(id)) {\n newTop = visibleZones[id].verticalOffset - ctx.bigNumbersDelta;\n newHeight = visibleZones[id].height;\n newDisplay = 'block';\n // zone is visible\n if (!zone.isVisible) {\n zone.domNode.setAttribute('monaco-visible-view-zone', 'true');\n zone.isVisible = true;\n }\n this._safeCallOnDomNodeTop(zone.delegate, ctx.getScrolledTopFromAbsoluteTop(visibleZones[id].verticalOffset));\n }\n else {\n if (zone.isVisible) {\n zone.domNode.removeAttribute('monaco-visible-view-zone');\n zone.isVisible = false;\n }\n this._safeCallOnDomNodeTop(zone.delegate, ctx.getScrolledTopFromAbsoluteTop(-1000000));\n }\n zone.domNode.setTop(newTop);\n zone.domNode.setHeight(newHeight);\n zone.domNode.setDisplay(newDisplay);\n if (zone.marginDomNode) {\n zone.marginDomNode.setTop(newTop);\n zone.marginDomNode.setHeight(newHeight);\n zone.marginDomNode.setDisplay(newDisplay);\n }\n }\n if (hasVisibleZone) {\n this.domNode.setWidth(Math.max(ctx.scrollWidth, this._contentWidth));\n this.marginDomNode.setWidth(this._contentLeft);\n }\n };\n return ViewZones;\n}(ViewPart));\nexport { ViewZones };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar ViewContext = /** @class */ (function () {\n function ViewContext(configuration, theme, model, privateViewEventBus) {\n this.configuration = configuration;\n this.theme = theme;\n this.model = model;\n this.viewLayout = model.viewLayout;\n this.privateViewEventBus = privateViewEventBus;\n }\n ViewContext.prototype.addEventHandler = function (eventHandler) {\n this.privateViewEventBus.addEventHandler(eventHandler);\n };\n ViewContext.prototype.removeEventHandler = function (eventHandler) {\n this.privateViewEventBus.removeEventHandler(eventHandler);\n };\n return ViewContext;\n}());\nexport { ViewContext };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { Disposable } from '../../../base/common/lifecycle';\nimport { MouseTarget } from '../controller/mouseTarget';\nvar ViewOutgoingEvents = /** @class */ (function (_super) {\n __extends(ViewOutgoingEvents, _super);\n function ViewOutgoingEvents(viewModel) {\n var _this = _super.call(this) || this;\n _this.onDidScroll = null;\n _this.onDidGainFocus = null;\n _this.onDidLoseFocus = null;\n _this.onKeyDown = null;\n _this.onKeyUp = null;\n _this.onContextMenu = null;\n _this.onMouseMove = null;\n _this.onMouseLeave = null;\n _this.onMouseUp = null;\n _this.onMouseDown = null;\n _this.onMouseDrag = null;\n _this.onMouseDrop = null;\n _this._viewModel = viewModel;\n return _this;\n }\n ViewOutgoingEvents.prototype.emitScrollChanged = function (e) {\n if (this.onDidScroll) {\n this.onDidScroll(e);\n }\n };\n ViewOutgoingEvents.prototype.emitViewFocusGained = function () {\n if (this.onDidGainFocus) {\n this.onDidGainFocus(void 0);\n }\n };\n ViewOutgoingEvents.prototype.emitViewFocusLost = function () {\n if (this.onDidLoseFocus) {\n this.onDidLoseFocus(void 0);\n }\n };\n ViewOutgoingEvents.prototype.emitKeyDown = function (e) {\n if (this.onKeyDown) {\n this.onKeyDown(e);\n }\n };\n ViewOutgoingEvents.prototype.emitKeyUp = function (e) {\n if (this.onKeyUp) {\n this.onKeyUp(e);\n }\n };\n ViewOutgoingEvents.prototype.emitContextMenu = function (e) {\n if (this.onContextMenu) {\n this.onContextMenu(this._convertViewToModelMouseEvent(e));\n }\n };\n ViewOutgoingEvents.prototype.emitMouseMove = function (e) {\n if (this.onMouseMove) {\n this.onMouseMove(this._convertViewToModelMouseEvent(e));\n }\n };\n ViewOutgoingEvents.prototype.emitMouseLeave = function (e) {\n if (this.onMouseLeave) {\n this.onMouseLeave(this._convertViewToModelMouseEvent(e));\n }\n };\n ViewOutgoingEvents.prototype.emitMouseUp = function (e) {\n if (this.onMouseUp) {\n this.onMouseUp(this._convertViewToModelMouseEvent(e));\n }\n };\n ViewOutgoingEvents.prototype.emitMouseDown = function (e) {\n if (this.onMouseDown) {\n this.onMouseDown(this._convertViewToModelMouseEvent(e));\n }\n };\n ViewOutgoingEvents.prototype.emitMouseDrag = function (e) {\n if (this.onMouseDrag) {\n this.onMouseDrag(this._convertViewToModelMouseEvent(e));\n }\n };\n ViewOutgoingEvents.prototype.emitMouseDrop = function (e) {\n if (this.onMouseDrop) {\n this.onMouseDrop(this._convertViewToModelMouseEvent(e));\n }\n };\n ViewOutgoingEvents.prototype._convertViewToModelMouseEvent = function (e) {\n if (e.target) {\n return {\n event: e.event,\n target: this._convertViewToModelMouseTarget(e.target)\n };\n }\n return e;\n };\n ViewOutgoingEvents.prototype._convertViewToModelMouseTarget = function (target) {\n return new ExternalMouseTarget(target.element, target.type, target.mouseColumn, target.position ? this._convertViewToModelPosition(target.position) : null, target.range ? this._convertViewToModelRange(target.range) : null, target.detail);\n };\n ViewOutgoingEvents.prototype._convertViewToModelPosition = function (viewPosition) {\n return this._viewModel.coordinatesConverter.convertViewPositionToModelPosition(viewPosition);\n };\n ViewOutgoingEvents.prototype._convertViewToModelRange = function (viewRange) {\n return this._viewModel.coordinatesConverter.convertViewRangeToModelRange(viewRange);\n };\n return ViewOutgoingEvents;\n}(Disposable));\nexport { ViewOutgoingEvents };\nvar ExternalMouseTarget = /** @class */ (function () {\n function ExternalMouseTarget(element, type, mouseColumn, position, range, detail) {\n this.element = element;\n this.type = type;\n this.mouseColumn = mouseColumn;\n this.position = position;\n this.range = range;\n this.detail = detail;\n }\n ExternalMouseTarget.prototype.toString = function () {\n return MouseTarget.toString(this);\n };\n return ExternalMouseTarget;\n}());\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport { Range } from '../core/range';\n/**\n * Contains all data needed to render at a specific viewport.\n */\nvar ViewportData = /** @class */ (function () {\n function ViewportData(selections, partialData, whitespaceViewportData, model) {\n this.selections = selections;\n this.startLineNumber = partialData.startLineNumber | 0;\n this.endLineNumber = partialData.endLineNumber | 0;\n this.relativeVerticalOffset = partialData.relativeVerticalOffset;\n this.bigNumbersDelta = partialData.bigNumbersDelta | 0;\n this.whitespaceViewportData = whitespaceViewportData;\n this._model = model;\n this.visibleRange = new Range(partialData.startLineNumber, this._model.getLineMinColumn(partialData.startLineNumber), partialData.endLineNumber, this._model.getLineMaxColumn(partialData.endLineNumber));\n }\n ViewportData.prototype.getViewLineRenderingData = function (lineNumber) {\n return this._model.getViewLineRenderingData(this.visibleRange, lineNumber);\n };\n ViewportData.prototype.getDecorationsInViewport = function () {\n return this._model.getDecorationsInViewport(this.visibleRange);\n };\n return ViewportData;\n}());\nexport { ViewportData };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { Disposable } from '../../common/lifecycle';\nimport { StandardMouseEvent } from '../mouseEvent';\nimport { StandardKeyboardEvent } from '../keyboardEvent';\nimport * as DomUtils from '../dom';\nvar Widget = /** @class */ (function (_super) {\n __extends(Widget, _super);\n function Widget() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Widget.prototype.onclick = function (domNode, listener) {\n this._register(DomUtils.addDisposableListener(domNode, DomUtils.EventType.CLICK, function (e) { return listener(new StandardMouseEvent(e)); }));\n };\n Widget.prototype.onmousedown = function (domNode, listener) {\n this._register(DomUtils.addDisposableListener(domNode, DomUtils.EventType.MOUSE_DOWN, function (e) { return listener(new StandardMouseEvent(e)); }));\n };\n Widget.prototype.onmouseover = function (domNode, listener) {\n this._register(DomUtils.addDisposableListener(domNode, DomUtils.EventType.MOUSE_OVER, function (e) { return listener(new StandardMouseEvent(e)); }));\n };\n Widget.prototype.onnonbubblingmouseout = function (domNode, listener) {\n this._register(DomUtils.addDisposableNonBubblingMouseOutListener(domNode, function (e) { return listener(new StandardMouseEvent(e)); }));\n };\n Widget.prototype.onkeydown = function (domNode, listener) {\n this._register(DomUtils.addDisposableListener(domNode, DomUtils.EventType.KEY_DOWN, function (e) { return listener(new StandardKeyboardEvent(e)); }));\n };\n Widget.prototype.onkeyup = function (domNode, listener) {\n this._register(DomUtils.addDisposableListener(domNode, DomUtils.EventType.KEY_UP, function (e) { return listener(new StandardKeyboardEvent(e)); }));\n };\n Widget.prototype.oninput = function (domNode, listener) {\n this._register(DomUtils.addDisposableListener(domNode, DomUtils.EventType.INPUT, listener));\n };\n Widget.prototype.onblur = function (domNode, listener) {\n this._register(DomUtils.addDisposableListener(domNode, DomUtils.EventType.BLUR, listener));\n };\n Widget.prototype.onfocus = function (domNode, listener) {\n this._register(DomUtils.addDisposableListener(domNode, DomUtils.EventType.FOCUS, listener));\n };\n Widget.prototype.onchange = function (domNode, listener) {\n this._register(DomUtils.addDisposableListener(domNode, DomUtils.EventType.CHANGE, listener));\n };\n return Widget;\n}(Disposable));\nexport { Widget };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { GlobalMouseMoveMonitor, standardMouseMoveMerger } from '../../globalMouseMoveMonitor';\nimport { Widget } from '../widget';\nimport { TimeoutTimer, IntervalTimer } from '../../../common/async';\n/**\n * The arrow image size.\n */\nexport var ARROW_IMG_SIZE = 11;\nvar ScrollbarArrow = /** @class */ (function (_super) {\n __extends(ScrollbarArrow, _super);\n function ScrollbarArrow(opts) {\n var _this = _super.call(this) || this;\n _this._onActivate = opts.onActivate;\n _this.bgDomNode = document.createElement('div');\n _this.bgDomNode.className = 'arrow-background';\n _this.bgDomNode.style.position = 'absolute';\n _this.bgDomNode.style.width = opts.bgWidth + 'px';\n _this.bgDomNode.style.height = opts.bgHeight + 'px';\n if (typeof opts.top !== 'undefined') {\n _this.bgDomNode.style.top = '0px';\n }\n if (typeof opts.left !== 'undefined') {\n _this.bgDomNode.style.left = '0px';\n }\n if (typeof opts.bottom !== 'undefined') {\n _this.bgDomNode.style.bottom = '0px';\n }\n if (typeof opts.right !== 'undefined') {\n _this.bgDomNode.style.right = '0px';\n }\n _this.domNode = document.createElement('div');\n _this.domNode.className = opts.className;\n _this.domNode.style.position = 'absolute';\n _this.domNode.style.width = ARROW_IMG_SIZE + 'px';\n _this.domNode.style.height = ARROW_IMG_SIZE + 'px';\n if (typeof opts.top !== 'undefined') {\n _this.domNode.style.top = opts.top + 'px';\n }\n if (typeof opts.left !== 'undefined') {\n _this.domNode.style.left = opts.left + 'px';\n }\n if (typeof opts.bottom !== 'undefined') {\n _this.domNode.style.bottom = opts.bottom + 'px';\n }\n if (typeof opts.right !== 'undefined') {\n _this.domNode.style.right = opts.right + 'px';\n }\n _this._mouseMoveMonitor = _this._register(new GlobalMouseMoveMonitor());\n _this.onmousedown(_this.bgDomNode, function (e) { return _this._arrowMouseDown(e); });\n _this.onmousedown(_this.domNode, function (e) { return _this._arrowMouseDown(e); });\n _this._mousedownRepeatTimer = _this._register(new IntervalTimer());\n _this._mousedownScheduleRepeatTimer = _this._register(new TimeoutTimer());\n return _this;\n }\n ScrollbarArrow.prototype._arrowMouseDown = function (e) {\n var _this = this;\n var scheduleRepeater = function () {\n _this._mousedownRepeatTimer.cancelAndSet(function () { return _this._onActivate(); }, 1000 / 24);\n };\n this._onActivate();\n this._mousedownRepeatTimer.cancel();\n this._mousedownScheduleRepeatTimer.cancelAndSet(scheduleRepeater, 200);\n this._mouseMoveMonitor.startMonitoring(standardMouseMoveMerger, function (mouseMoveData) {\n /* Intentional empty */\n }, function () {\n _this._mousedownRepeatTimer.cancel();\n _this._mousedownScheduleRepeatTimer.cancel();\n });\n e.preventDefault();\n };\n return ScrollbarArrow;\n}(Widget));\nexport { ScrollbarArrow };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { Disposable } from '../../../common/lifecycle';\nimport { TimeoutTimer } from '../../../common/async';\nimport { ScrollbarVisibility } from '../../../common/scrollable';\nvar ScrollbarVisibilityController = /** @class */ (function (_super) {\n __extends(ScrollbarVisibilityController, _super);\n function ScrollbarVisibilityController(visibility, visibleClassName, invisibleClassName) {\n var _this = _super.call(this) || this;\n _this._visibility = visibility;\n _this._visibleClassName = visibleClassName;\n _this._invisibleClassName = invisibleClassName;\n _this._domNode = null;\n _this._isVisible = false;\n _this._isNeeded = false;\n _this._shouldBeVisible = false;\n _this._revealTimer = _this._register(new TimeoutTimer());\n return _this;\n }\n // ----------------- Hide / Reveal\n ScrollbarVisibilityController.prototype.applyVisibilitySetting = function (shouldBeVisible) {\n if (this._visibility === ScrollbarVisibility.Hidden) {\n return false;\n }\n if (this._visibility === ScrollbarVisibility.Visible) {\n return true;\n }\n return shouldBeVisible;\n };\n ScrollbarVisibilityController.prototype.setShouldBeVisible = function (rawShouldBeVisible) {\n var shouldBeVisible = this.applyVisibilitySetting(rawShouldBeVisible);\n if (this._shouldBeVisible !== shouldBeVisible) {\n this._shouldBeVisible = shouldBeVisible;\n this.ensureVisibility();\n }\n };\n ScrollbarVisibilityController.prototype.setIsNeeded = function (isNeeded) {\n if (this._isNeeded !== isNeeded) {\n this._isNeeded = isNeeded;\n this.ensureVisibility();\n }\n };\n ScrollbarVisibilityController.prototype.setDomNode = function (domNode) {\n this._domNode = domNode;\n this._domNode.setClassName(this._invisibleClassName);\n // Now that the flags & the dom node are in a consistent state, ensure the Hidden/Visible configuration\n this.setShouldBeVisible(false);\n };\n ScrollbarVisibilityController.prototype.ensureVisibility = function () {\n if (!this._isNeeded) {\n // Nothing to be rendered\n this._hide(false);\n return;\n }\n if (this._shouldBeVisible) {\n this._reveal();\n }\n else {\n this._hide(true);\n }\n };\n ScrollbarVisibilityController.prototype._reveal = function () {\n var _this = this;\n if (this._isVisible) {\n return;\n }\n this._isVisible = true;\n // The CSS animation doesn't play otherwise\n this._revealTimer.setIfNotSet(function () {\n _this._domNode.setClassName(_this._visibleClassName);\n }, 0);\n };\n ScrollbarVisibilityController.prototype._hide = function (withFadeAway) {\n this._revealTimer.cancel();\n if (!this._isVisible) {\n return;\n }\n this._isVisible = false;\n this._domNode.setClassName(this._invisibleClassName + (withFadeAway ? ' fade' : ''));\n };\n return ScrollbarVisibilityController;\n}(Disposable));\nexport { ScrollbarVisibilityController };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport * as Platform from '../../../common/platform';\nimport * as DomUtils from '../../dom';\nimport { GlobalMouseMoveMonitor, standardMouseMoveMerger } from '../../globalMouseMoveMonitor';\nimport { Widget } from '../widget';\nimport { createFastDomNode } from '../../fastDomNode';\nimport { ScrollbarArrow } from './scrollbarArrow';\nimport { ScrollbarVisibilityController } from './scrollbarVisibilityController';\n/**\n * The orthogonal distance to the slider at which dragging \"resets\". This implements \"snapping\"\n */\nvar MOUSE_DRAG_RESET_DISTANCE = 140;\nvar AbstractScrollbar = /** @class */ (function (_super) {\n __extends(AbstractScrollbar, _super);\n function AbstractScrollbar(opts) {\n var _this = _super.call(this) || this;\n _this._lazyRender = opts.lazyRender;\n _this._host = opts.host;\n _this._scrollable = opts.scrollable;\n _this._scrollbarState = opts.scrollbarState;\n _this._visibilityController = _this._register(new ScrollbarVisibilityController(opts.visibility, 'visible scrollbar ' + opts.extraScrollbarClassName, 'invisible scrollbar ' + opts.extraScrollbarClassName));\n _this._mouseMoveMonitor = _this._register(new GlobalMouseMoveMonitor());\n _this._shouldRender = true;\n _this.domNode = createFastDomNode(document.createElement('div'));\n _this.domNode.setAttribute('role', 'presentation');\n _this.domNode.setAttribute('aria-hidden', 'true');\n _this._visibilityController.setDomNode(_this.domNode);\n _this.domNode.setPosition('absolute');\n _this.onmousedown(_this.domNode.domNode, function (e) { return _this._domNodeMouseDown(e); });\n return _this;\n }\n // ----------------- creation\n /**\n * Creates the dom node for an arrow & adds it to the container\n */\n AbstractScrollbar.prototype._createArrow = function (opts) {\n var arrow = this._register(new ScrollbarArrow(opts));\n this.domNode.domNode.appendChild(arrow.bgDomNode);\n this.domNode.domNode.appendChild(arrow.domNode);\n };\n /**\n * Creates the slider dom node, adds it to the container & hooks up the events\n */\n AbstractScrollbar.prototype._createSlider = function (top, left, width, height) {\n var _this = this;\n this.slider = createFastDomNode(document.createElement('div'));\n this.slider.setClassName('slider');\n this.slider.setPosition('absolute');\n this.slider.setTop(top);\n this.slider.setLeft(left);\n this.slider.setWidth(width);\n this.slider.setHeight(height);\n this.slider.setLayerHinting(true);\n this.domNode.domNode.appendChild(this.slider.domNode);\n this.onmousedown(this.slider.domNode, function (e) {\n if (e.leftButton) {\n e.preventDefault();\n _this._sliderMouseDown(e, function () { });\n }\n });\n };\n // ----------------- Update state\n AbstractScrollbar.prototype._onElementSize = function (visibleSize) {\n if (this._scrollbarState.setVisibleSize(visibleSize)) {\n this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded());\n this._shouldRender = true;\n if (!this._lazyRender) {\n this.render();\n }\n }\n return this._shouldRender;\n };\n AbstractScrollbar.prototype._onElementScrollSize = function (elementScrollSize) {\n if (this._scrollbarState.setScrollSize(elementScrollSize)) {\n this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded());\n this._shouldRender = true;\n if (!this._lazyRender) {\n this.render();\n }\n }\n return this._shouldRender;\n };\n AbstractScrollbar.prototype._onElementScrollPosition = function (elementScrollPosition) {\n if (this._scrollbarState.setScrollPosition(elementScrollPosition)) {\n this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded());\n this._shouldRender = true;\n if (!this._lazyRender) {\n this.render();\n }\n }\n return this._shouldRender;\n };\n // ----------------- rendering\n AbstractScrollbar.prototype.beginReveal = function () {\n this._visibilityController.setShouldBeVisible(true);\n };\n AbstractScrollbar.prototype.beginHide = function () {\n this._visibilityController.setShouldBeVisible(false);\n };\n AbstractScrollbar.prototype.render = function () {\n if (!this._shouldRender) {\n return;\n }\n this._shouldRender = false;\n this._renderDomNode(this._scrollbarState.getRectangleLargeSize(), this._scrollbarState.getRectangleSmallSize());\n this._updateSlider(this._scrollbarState.getSliderSize(), this._scrollbarState.getArrowSize() + this._scrollbarState.getSliderPosition());\n };\n // ----------------- DOM events\n AbstractScrollbar.prototype._domNodeMouseDown = function (e) {\n if (e.target !== this.domNode.domNode) {\n return;\n }\n this._onMouseDown(e);\n };\n AbstractScrollbar.prototype.delegateMouseDown = function (e) {\n var domTop = this.domNode.domNode.getClientRects()[0].top;\n var sliderStart = domTop + this._scrollbarState.getSliderPosition();\n var sliderStop = domTop + this._scrollbarState.getSliderPosition() + this._scrollbarState.getSliderSize();\n var mousePos = this._sliderMousePosition(e);\n if (sliderStart <= mousePos && mousePos <= sliderStop) {\n // Act as if it was a mouse down on the slider\n if (e.leftButton) {\n e.preventDefault();\n this._sliderMouseDown(e, function () { });\n }\n }\n else {\n // Act as if it was a mouse down on the scrollbar\n this._onMouseDown(e);\n }\n };\n AbstractScrollbar.prototype._onMouseDown = function (e) {\n var offsetX;\n var offsetY;\n if (e.target === this.domNode.domNode && typeof e.browserEvent.offsetX === 'number' && typeof e.browserEvent.offsetY === 'number') {\n offsetX = e.browserEvent.offsetX;\n offsetY = e.browserEvent.offsetY;\n }\n else {\n var domNodePosition = DomUtils.getDomNodePagePosition(this.domNode.domNode);\n offsetX = e.posx - domNodePosition.left;\n offsetY = e.posy - domNodePosition.top;\n }\n this._setDesiredScrollPositionNow(this._scrollbarState.getDesiredScrollPositionFromOffset(this._mouseDownRelativePosition(offsetX, offsetY)));\n if (e.leftButton) {\n e.preventDefault();\n this._sliderMouseDown(e, function () { });\n }\n };\n AbstractScrollbar.prototype._sliderMouseDown = function (e, onDragFinished) {\n var _this = this;\n var initialMousePosition = this._sliderMousePosition(e);\n var initialMouseOrthogonalPosition = this._sliderOrthogonalMousePosition(e);\n var initialScrollbarState = this._scrollbarState.clone();\n this.slider.toggleClassName('active', true);\n this._mouseMoveMonitor.startMonitoring(standardMouseMoveMerger, function (mouseMoveData) {\n var mouseOrthogonalPosition = _this._sliderOrthogonalMousePosition(mouseMoveData);\n var mouseOrthogonalDelta = Math.abs(mouseOrthogonalPosition - initialMouseOrthogonalPosition);\n if (Platform.isWindows && mouseOrthogonalDelta > MOUSE_DRAG_RESET_DISTANCE) {\n // The mouse has wondered away from the scrollbar => reset dragging\n _this._setDesiredScrollPositionNow(initialScrollbarState.getScrollPosition());\n return;\n }\n var mousePosition = _this._sliderMousePosition(mouseMoveData);\n var mouseDelta = mousePosition - initialMousePosition;\n _this._setDesiredScrollPositionNow(initialScrollbarState.getDesiredScrollPositionFromDelta(mouseDelta));\n }, function () {\n _this.slider.toggleClassName('active', false);\n _this._host.onDragEnd();\n onDragFinished();\n });\n this._host.onDragStart();\n };\n AbstractScrollbar.prototype._setDesiredScrollPositionNow = function (_desiredScrollPosition) {\n var desiredScrollPosition = {};\n this.writeScrollPosition(desiredScrollPosition, _desiredScrollPosition);\n this._scrollable.setScrollPositionNow(desiredScrollPosition);\n };\n return AbstractScrollbar;\n}(Widget));\nexport { AbstractScrollbar };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\n/**\n * The minimal size of the slider (such that it can still be clickable) -- it is artificially enlarged.\n */\nvar MINIMUM_SLIDER_SIZE = 20;\nvar ScrollbarState = /** @class */ (function () {\n function ScrollbarState(arrowSize, scrollbarSize, oppositeScrollbarSize) {\n this._scrollbarSize = Math.round(scrollbarSize);\n this._oppositeScrollbarSize = Math.round(oppositeScrollbarSize);\n this._arrowSize = Math.round(arrowSize);\n this._visibleSize = 0;\n this._scrollSize = 0;\n this._scrollPosition = 0;\n this._computedAvailableSize = 0;\n this._computedIsNeeded = false;\n this._computedSliderSize = 0;\n this._computedSliderRatio = 0;\n this._computedSliderPosition = 0;\n this._refreshComputedValues();\n }\n ScrollbarState.prototype.clone = function () {\n var r = new ScrollbarState(this._arrowSize, this._scrollbarSize, this._oppositeScrollbarSize);\n r.setVisibleSize(this._visibleSize);\n r.setScrollSize(this._scrollSize);\n r.setScrollPosition(this._scrollPosition);\n return r;\n };\n ScrollbarState.prototype.setVisibleSize = function (visibleSize) {\n var iVisibleSize = Math.round(visibleSize);\n if (this._visibleSize !== iVisibleSize) {\n this._visibleSize = iVisibleSize;\n this._refreshComputedValues();\n return true;\n }\n return false;\n };\n ScrollbarState.prototype.setScrollSize = function (scrollSize) {\n var iScrollSize = Math.round(scrollSize);\n if (this._scrollSize !== iScrollSize) {\n this._scrollSize = iScrollSize;\n this._refreshComputedValues();\n return true;\n }\n return false;\n };\n ScrollbarState.prototype.setScrollPosition = function (scrollPosition) {\n var iScrollPosition = Math.round(scrollPosition);\n if (this._scrollPosition !== iScrollPosition) {\n this._scrollPosition = iScrollPosition;\n this._refreshComputedValues();\n return true;\n }\n return false;\n };\n ScrollbarState._computeValues = function (oppositeScrollbarSize, arrowSize, visibleSize, scrollSize, scrollPosition) {\n var computedAvailableSize = Math.max(0, visibleSize - oppositeScrollbarSize);\n var computedRepresentableSize = Math.max(0, computedAvailableSize - 2 * arrowSize);\n var computedIsNeeded = (scrollSize > 0 && scrollSize > visibleSize);\n if (!computedIsNeeded) {\n // There is no need for a slider\n return {\n computedAvailableSize: Math.round(computedAvailableSize),\n computedIsNeeded: computedIsNeeded,\n computedSliderSize: Math.round(computedRepresentableSize),\n computedSliderRatio: 0,\n computedSliderPosition: 0,\n };\n }\n // We must artificially increase the size of the slider if needed, since the slider would be too small to grab with the mouse otherwise\n var computedSliderSize = Math.round(Math.max(MINIMUM_SLIDER_SIZE, Math.floor(visibleSize * computedRepresentableSize / scrollSize)));\n // The slider can move from 0 to `computedRepresentableSize` - `computedSliderSize`\n // in the same way `scrollPosition` can move from 0 to `scrollSize` - `visibleSize`.\n var computedSliderRatio = (computedRepresentableSize - computedSliderSize) / (scrollSize - visibleSize);\n var computedSliderPosition = (scrollPosition * computedSliderRatio);\n return {\n computedAvailableSize: Math.round(computedAvailableSize),\n computedIsNeeded: computedIsNeeded,\n computedSliderSize: Math.round(computedSliderSize),\n computedSliderRatio: computedSliderRatio,\n computedSliderPosition: Math.round(computedSliderPosition),\n };\n };\n ScrollbarState.prototype._refreshComputedValues = function () {\n var r = ScrollbarState._computeValues(this._oppositeScrollbarSize, this._arrowSize, this._visibleSize, this._scrollSize, this._scrollPosition);\n this._computedAvailableSize = r.computedAvailableSize;\n this._computedIsNeeded = r.computedIsNeeded;\n this._computedSliderSize = r.computedSliderSize;\n this._computedSliderRatio = r.computedSliderRatio;\n this._computedSliderPosition = r.computedSliderPosition;\n };\n ScrollbarState.prototype.getArrowSize = function () {\n return this._arrowSize;\n };\n ScrollbarState.prototype.getScrollPosition = function () {\n return this._scrollPosition;\n };\n ScrollbarState.prototype.getRectangleLargeSize = function () {\n return this._computedAvailableSize;\n };\n ScrollbarState.prototype.getRectangleSmallSize = function () {\n return this._scrollbarSize;\n };\n ScrollbarState.prototype.isNeeded = function () {\n return this._computedIsNeeded;\n };\n ScrollbarState.prototype.getSliderSize = function () {\n return this._computedSliderSize;\n };\n ScrollbarState.prototype.getSliderPosition = function () {\n return this._computedSliderPosition;\n };\n /**\n * Compute a desired `scrollPosition` such that `offset` ends up in the center of the slider.\n * `offset` is based on the same coordinate system as the `sliderPosition`.\n */\n ScrollbarState.prototype.getDesiredScrollPositionFromOffset = function (offset) {\n if (!this._computedIsNeeded) {\n // no need for a slider\n return 0;\n }\n var desiredSliderPosition = offset - this._arrowSize - this._computedSliderSize / 2;\n return Math.round(desiredSliderPosition / this._computedSliderRatio);\n };\n /**\n * Compute a desired `scrollPosition` such that the slider moves by `delta`.\n */\n ScrollbarState.prototype.getDesiredScrollPositionFromDelta = function (delta) {\n if (!this._computedIsNeeded) {\n // no need for a slider\n return 0;\n }\n var desiredSliderPosition = this._computedSliderPosition + delta;\n return Math.round(desiredSliderPosition / this._computedSliderRatio);\n };\n return ScrollbarState;\n}());\nexport { ScrollbarState };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { AbstractScrollbar } from './abstractScrollbar';\nimport { StandardMouseWheelEvent } from '../../mouseEvent';\nimport { ScrollbarVisibility } from '../../../common/scrollable';\nimport { ScrollbarState } from './scrollbarState';\nimport { ARROW_IMG_SIZE } from './scrollbarArrow';\nvar HorizontalScrollbar = /** @class */ (function (_super) {\n __extends(HorizontalScrollbar, _super);\n function HorizontalScrollbar(scrollable, options, host) {\n var _this = _super.call(this, {\n lazyRender: options.lazyRender,\n host: host,\n scrollbarState: new ScrollbarState((options.horizontalHasArrows ? options.arrowSize : 0), (options.horizontal === ScrollbarVisibility.Hidden ? 0 : options.horizontalScrollbarSize), (options.vertical === ScrollbarVisibility.Hidden ? 0 : options.verticalScrollbarSize)),\n visibility: options.horizontal,\n extraScrollbarClassName: 'horizontal',\n scrollable: scrollable\n }) || this;\n if (options.horizontalHasArrows) {\n var arrowDelta = (options.arrowSize - ARROW_IMG_SIZE) / 2;\n var scrollbarDelta = (options.horizontalScrollbarSize - ARROW_IMG_SIZE) / 2;\n _this._createArrow({\n className: 'left-arrow',\n top: scrollbarDelta,\n left: arrowDelta,\n bottom: void 0,\n right: void 0,\n bgWidth: options.arrowSize,\n bgHeight: options.horizontalScrollbarSize,\n onActivate: function () { return _this._host.onMouseWheel(new StandardMouseWheelEvent(null, 1, 0)); },\n });\n _this._createArrow({\n className: 'right-arrow',\n top: scrollbarDelta,\n left: void 0,\n bottom: void 0,\n right: arrowDelta,\n bgWidth: options.arrowSize,\n bgHeight: options.horizontalScrollbarSize,\n onActivate: function () { return _this._host.onMouseWheel(new StandardMouseWheelEvent(null, -1, 0)); },\n });\n }\n _this._createSlider(Math.floor((options.horizontalScrollbarSize - options.horizontalSliderSize) / 2), 0, null, options.horizontalSliderSize);\n return _this;\n }\n HorizontalScrollbar.prototype._updateSlider = function (sliderSize, sliderPosition) {\n this.slider.setWidth(sliderSize);\n this.slider.setLeft(sliderPosition);\n };\n HorizontalScrollbar.prototype._renderDomNode = function (largeSize, smallSize) {\n this.domNode.setWidth(largeSize);\n this.domNode.setHeight(smallSize);\n this.domNode.setLeft(0);\n this.domNode.setBottom(0);\n };\n HorizontalScrollbar.prototype.onDidScroll = function (e) {\n this._shouldRender = this._onElementScrollSize(e.scrollWidth) || this._shouldRender;\n this._shouldRender = this._onElementScrollPosition(e.scrollLeft) || this._shouldRender;\n this._shouldRender = this._onElementSize(e.width) || this._shouldRender;\n return this._shouldRender;\n };\n HorizontalScrollbar.prototype._mouseDownRelativePosition = function (offsetX, offsetY) {\n return offsetX;\n };\n HorizontalScrollbar.prototype._sliderMousePosition = function (e) {\n return e.posx;\n };\n HorizontalScrollbar.prototype._sliderOrthogonalMousePosition = function (e) {\n return e.posy;\n };\n HorizontalScrollbar.prototype.writeScrollPosition = function (target, scrollPosition) {\n target.scrollLeft = scrollPosition;\n };\n return HorizontalScrollbar;\n}(AbstractScrollbar));\nexport { HorizontalScrollbar };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { AbstractScrollbar } from './abstractScrollbar';\nimport { StandardMouseWheelEvent } from '../../mouseEvent';\nimport { ScrollbarVisibility } from '../../../common/scrollable';\nimport { ScrollbarState } from './scrollbarState';\nimport { ARROW_IMG_SIZE } from './scrollbarArrow';\nvar VerticalScrollbar = /** @class */ (function (_super) {\n __extends(VerticalScrollbar, _super);\n function VerticalScrollbar(scrollable, options, host) {\n var _this = _super.call(this, {\n lazyRender: options.lazyRender,\n host: host,\n scrollbarState: new ScrollbarState((options.verticalHasArrows ? options.arrowSize : 0), (options.vertical === ScrollbarVisibility.Hidden ? 0 : options.verticalScrollbarSize), \n // give priority to vertical scroll bar over horizontal and let it scroll all the way to the bottom\n 0),\n visibility: options.vertical,\n extraScrollbarClassName: 'vertical',\n scrollable: scrollable\n }) || this;\n if (options.verticalHasArrows) {\n var arrowDelta = (options.arrowSize - ARROW_IMG_SIZE) / 2;\n var scrollbarDelta = (options.verticalScrollbarSize - ARROW_IMG_SIZE) / 2;\n _this._createArrow({\n className: 'up-arrow',\n top: arrowDelta,\n left: scrollbarDelta,\n bottom: void 0,\n right: void 0,\n bgWidth: options.verticalScrollbarSize,\n bgHeight: options.arrowSize,\n onActivate: function () { return _this._host.onMouseWheel(new StandardMouseWheelEvent(null, 0, 1)); },\n });\n _this._createArrow({\n className: 'down-arrow',\n top: void 0,\n left: scrollbarDelta,\n bottom: arrowDelta,\n right: void 0,\n bgWidth: options.verticalScrollbarSize,\n bgHeight: options.arrowSize,\n onActivate: function () { return _this._host.onMouseWheel(new StandardMouseWheelEvent(null, 0, -1)); },\n });\n }\n _this._createSlider(0, Math.floor((options.verticalScrollbarSize - options.verticalSliderSize) / 2), options.verticalSliderSize, null);\n return _this;\n }\n VerticalScrollbar.prototype._updateSlider = function (sliderSize, sliderPosition) {\n this.slider.setHeight(sliderSize);\n this.slider.setTop(sliderPosition);\n };\n VerticalScrollbar.prototype._renderDomNode = function (largeSize, smallSize) {\n this.domNode.setWidth(smallSize);\n this.domNode.setHeight(largeSize);\n this.domNode.setRight(0);\n this.domNode.setTop(0);\n };\n VerticalScrollbar.prototype.onDidScroll = function (e) {\n this._shouldRender = this._onElementScrollSize(e.scrollHeight) || this._shouldRender;\n this._shouldRender = this._onElementScrollPosition(e.scrollTop) || this._shouldRender;\n this._shouldRender = this._onElementSize(e.height) || this._shouldRender;\n return this._shouldRender;\n };\n VerticalScrollbar.prototype._mouseDownRelativePosition = function (offsetX, offsetY) {\n return offsetY;\n };\n VerticalScrollbar.prototype._sliderMousePosition = function (e) {\n return e.posy;\n };\n VerticalScrollbar.prototype._sliderOrthogonalMousePosition = function (e) {\n return e.posx;\n };\n VerticalScrollbar.prototype.writeScrollPosition = function (target, scrollPosition) {\n target.scrollTop = scrollPosition;\n };\n return VerticalScrollbar;\n}(AbstractScrollbar));\nexport { VerticalScrollbar };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport './media/scrollbars.css';\nimport * as DomUtils from '../../dom';\nimport * as Platform from '../../../common/platform';\nimport { StandardMouseWheelEvent } from '../../mouseEvent';\nimport { HorizontalScrollbar } from './horizontalScrollbar';\nimport { VerticalScrollbar } from './verticalScrollbar';\nimport { dispose } from '../../../common/lifecycle';\nimport { Scrollable, ScrollbarVisibility } from '../../../common/scrollable';\nimport { Widget } from '../widget';\nimport { TimeoutTimer } from '../../../common/async';\nimport { createFastDomNode } from '../../fastDomNode';\nimport { Emitter } from '../../../common/event';\nvar HIDE_TIMEOUT = 500;\nvar SCROLL_WHEEL_SENSITIVITY = 50;\nvar SCROLL_WHEEL_SMOOTH_SCROLL_ENABLED = true;\nvar MouseWheelClassifierItem = /** @class */ (function () {\n function MouseWheelClassifierItem(timestamp, deltaX, deltaY) {\n this.timestamp = timestamp;\n this.deltaX = deltaX;\n this.deltaY = deltaY;\n this.score = 0;\n }\n return MouseWheelClassifierItem;\n}());\nvar MouseWheelClassifier = /** @class */ (function () {\n function MouseWheelClassifier() {\n this._capacity = 5;\n this._memory = [];\n this._front = -1;\n this._rear = -1;\n }\n MouseWheelClassifier.prototype.isPhysicalMouseWheel = function () {\n if (this._front === -1 && this._rear === -1) {\n // no elements\n return false;\n }\n // 0.5 * last + 0.25 * before last + 0.125 * before before last + ...\n var remainingInfluence = 1;\n var score = 0;\n var iteration = 1;\n var index = this._rear;\n do {\n var influence = (index === this._front ? remainingInfluence : Math.pow(2, -iteration));\n remainingInfluence -= influence;\n score += this._memory[index].score * influence;\n if (index === this._front) {\n break;\n }\n index = (this._capacity + index - 1) % this._capacity;\n iteration++;\n } while (true);\n return (score <= 0.5);\n };\n MouseWheelClassifier.prototype.accept = function (timestamp, deltaX, deltaY) {\n var item = new MouseWheelClassifierItem(timestamp, deltaX, deltaY);\n item.score = this._computeScore(item);\n if (this._front === -1 && this._rear === -1) {\n this._memory[0] = item;\n this._front = 0;\n this._rear = 0;\n }\n else {\n this._rear = (this._rear + 1) % this._capacity;\n if (this._rear === this._front) {\n // Drop oldest\n this._front = (this._front + 1) % this._capacity;\n }\n this._memory[this._rear] = item;\n }\n };\n /**\n * A score between 0 and 1 for `item`.\n * - a score towards 0 indicates that the source appears to be a physical mouse wheel\n * - a score towards 1 indicates that the source appears to be a touchpad or magic mouse, etc.\n */\n MouseWheelClassifier.prototype._computeScore = function (item) {\n if (Math.abs(item.deltaX) > 0 && Math.abs(item.deltaY) > 0) {\n // both axes exercised => definitely not a physical mouse wheel\n return 1;\n }\n var score = 0.5;\n var prev = (this._front === -1 && this._rear === -1 ? null : this._memory[this._rear]);\n if (prev) {\n // const deltaT = item.timestamp - prev.timestamp;\n // if (deltaT < 1000 / 30) {\n // \t// sooner than X times per second => indicator that this is not a physical mouse wheel\n // \tscore += 0.25;\n // }\n // if (item.deltaX === prev.deltaX && item.deltaY === prev.deltaY) {\n // \t// equal amplitude => indicator that this is a physical mouse wheel\n // \tscore -= 0.25;\n // }\n }\n if (Math.abs(item.deltaX - Math.round(item.deltaX)) > 0 || Math.abs(item.deltaY - Math.round(item.deltaY)) > 0) {\n // non-integer deltas => indicator that this is not a physical mouse wheel\n score += 0.25;\n }\n return Math.min(Math.max(score, 0), 1);\n };\n MouseWheelClassifier.INSTANCE = new MouseWheelClassifier();\n return MouseWheelClassifier;\n}());\nexport { MouseWheelClassifier };\nvar AbstractScrollableElement = /** @class */ (function (_super) {\n __extends(AbstractScrollableElement, _super);\n function AbstractScrollableElement(element, options, scrollable) {\n var _this = _super.call(this) || this;\n _this._onScroll = _this._register(new Emitter());\n _this.onScroll = _this._onScroll.event;\n element.style.overflow = 'hidden';\n _this._options = resolveOptions(options);\n _this._scrollable = scrollable;\n _this._register(_this._scrollable.onScroll(function (e) {\n _this._onDidScroll(e);\n _this._onScroll.fire(e);\n }));\n var scrollbarHost = {\n onMouseWheel: function (mouseWheelEvent) { return _this._onMouseWheel(mouseWheelEvent); },\n onDragStart: function () { return _this._onDragStart(); },\n onDragEnd: function () { return _this._onDragEnd(); },\n };\n _this._verticalScrollbar = _this._register(new VerticalScrollbar(_this._scrollable, _this._options, scrollbarHost));\n _this._horizontalScrollbar = _this._register(new HorizontalScrollbar(_this._scrollable, _this._options, scrollbarHost));\n _this._domNode = document.createElement('div');\n _this._domNode.className = 'monaco-scrollable-element ' + _this._options.className;\n _this._domNode.setAttribute('role', 'presentation');\n _this._domNode.style.position = 'relative';\n _this._domNode.style.overflow = 'hidden';\n _this._domNode.appendChild(element);\n _this._domNode.appendChild(_this._horizontalScrollbar.domNode.domNode);\n _this._domNode.appendChild(_this._verticalScrollbar.domNode.domNode);\n if (_this._options.useShadows) {\n _this._leftShadowDomNode = createFastDomNode(document.createElement('div'));\n _this._leftShadowDomNode.setClassName('shadow');\n _this._domNode.appendChild(_this._leftShadowDomNode.domNode);\n _this._topShadowDomNode = createFastDomNode(document.createElement('div'));\n _this._topShadowDomNode.setClassName('shadow');\n _this._domNode.appendChild(_this._topShadowDomNode.domNode);\n _this._topLeftShadowDomNode = createFastDomNode(document.createElement('div'));\n _this._topLeftShadowDomNode.setClassName('shadow top-left-corner');\n _this._domNode.appendChild(_this._topLeftShadowDomNode.domNode);\n }\n _this._listenOnDomNode = _this._options.listenOnDomNode || _this._domNode;\n _this._mouseWheelToDispose = [];\n _this._setListeningToMouseWheel(_this._options.handleMouseWheel);\n _this.onmouseover(_this._listenOnDomNode, function (e) { return _this._onMouseOver(e); });\n _this.onnonbubblingmouseout(_this._listenOnDomNode, function (e) { return _this._onMouseOut(e); });\n _this._hideTimeout = _this._register(new TimeoutTimer());\n _this._isDragging = false;\n _this._mouseIsOver = false;\n _this._shouldRender = true;\n _this._revealOnScroll = true;\n return _this;\n }\n AbstractScrollableElement.prototype.dispose = function () {\n this._mouseWheelToDispose = dispose(this._mouseWheelToDispose);\n _super.prototype.dispose.call(this);\n };\n /**\n * Get the generated 'scrollable' dom node\n */\n AbstractScrollableElement.prototype.getDomNode = function () {\n return this._domNode;\n };\n AbstractScrollableElement.prototype.getOverviewRulerLayoutInfo = function () {\n return {\n parent: this._domNode,\n insertBefore: this._verticalScrollbar.domNode.domNode,\n };\n };\n /**\n * Delegate a mouse down event to the vertical scrollbar.\n * This is to help with clicking somewhere else and having the scrollbar react.\n */\n AbstractScrollableElement.prototype.delegateVerticalScrollbarMouseDown = function (browserEvent) {\n this._verticalScrollbar.delegateMouseDown(browserEvent);\n };\n AbstractScrollableElement.prototype.getScrollDimensions = function () {\n return this._scrollable.getScrollDimensions();\n };\n AbstractScrollableElement.prototype.setScrollDimensions = function (dimensions) {\n this._scrollable.setScrollDimensions(dimensions);\n };\n /**\n * Update the class name of the scrollable element.\n */\n AbstractScrollableElement.prototype.updateClassName = function (newClassName) {\n this._options.className = newClassName;\n // Defaults are different on Macs\n if (Platform.isMacintosh) {\n this._options.className += ' mac';\n }\n this._domNode.className = 'monaco-scrollable-element ' + this._options.className;\n };\n /**\n * Update configuration options for the scrollbar.\n * Really this is Editor.IEditorScrollbarOptions, but base shouldn't\n * depend on Editor.\n */\n AbstractScrollableElement.prototype.updateOptions = function (newOptions) {\n var massagedOptions = resolveOptions(newOptions);\n this._options.handleMouseWheel = massagedOptions.handleMouseWheel;\n this._options.mouseWheelScrollSensitivity = massagedOptions.mouseWheelScrollSensitivity;\n this._setListeningToMouseWheel(this._options.handleMouseWheel);\n if (!this._options.lazyRender) {\n this._render();\n }\n };\n // -------------------- mouse wheel scrolling --------------------\n AbstractScrollableElement.prototype._setListeningToMouseWheel = function (shouldListen) {\n var _this = this;\n var isListening = (this._mouseWheelToDispose.length > 0);\n if (isListening === shouldListen) {\n // No change\n return;\n }\n // Stop listening (if necessary)\n this._mouseWheelToDispose = dispose(this._mouseWheelToDispose);\n // Start listening (if necessary)\n if (shouldListen) {\n var onMouseWheel = function (browserEvent) {\n var e = new StandardMouseWheelEvent(browserEvent);\n _this._onMouseWheel(e);\n };\n this._mouseWheelToDispose.push(DomUtils.addDisposableListener(this._listenOnDomNode, 'mousewheel', onMouseWheel));\n this._mouseWheelToDispose.push(DomUtils.addDisposableListener(this._listenOnDomNode, 'DOMMouseScroll', onMouseWheel));\n }\n };\n AbstractScrollableElement.prototype._onMouseWheel = function (e) {\n var _a;\n var classifier = MouseWheelClassifier.INSTANCE;\n if (SCROLL_WHEEL_SMOOTH_SCROLL_ENABLED) {\n classifier.accept(Date.now(), e.deltaX, e.deltaY);\n }\n // console.log(`${Date.now()}, ${e.deltaY}, ${e.deltaX}`);\n if (e.deltaY || e.deltaX) {\n var deltaY = e.deltaY * this._options.mouseWheelScrollSensitivity;\n var deltaX = e.deltaX * this._options.mouseWheelScrollSensitivity;\n if (this._options.flipAxes) {\n _a = [deltaX, deltaY], deltaY = _a[0], deltaX = _a[1];\n }\n // Convert vertical scrolling to horizontal if shift is held, this\n // is handled at a higher level on Mac\n var shiftConvert = !Platform.isMacintosh && e.browserEvent && e.browserEvent.shiftKey;\n if ((this._options.scrollYToX || shiftConvert) && !deltaX) {\n deltaX = deltaY;\n deltaY = 0;\n }\n var futureScrollPosition = this._scrollable.getFutureScrollPosition();\n var desiredScrollPosition = {};\n if (deltaY) {\n var desiredScrollTop = futureScrollPosition.scrollTop - SCROLL_WHEEL_SENSITIVITY * deltaY;\n this._verticalScrollbar.writeScrollPosition(desiredScrollPosition, desiredScrollTop);\n }\n if (deltaX) {\n var desiredScrollLeft = futureScrollPosition.scrollLeft - SCROLL_WHEEL_SENSITIVITY * deltaX;\n this._horizontalScrollbar.writeScrollPosition(desiredScrollPosition, desiredScrollLeft);\n }\n // Check that we are scrolling towards a location which is valid\n desiredScrollPosition = this._scrollable.validateScrollPosition(desiredScrollPosition);\n if (futureScrollPosition.scrollLeft !== desiredScrollPosition.scrollLeft || futureScrollPosition.scrollTop !== desiredScrollPosition.scrollTop) {\n var canPerformSmoothScroll = (SCROLL_WHEEL_SMOOTH_SCROLL_ENABLED\n && this._options.mouseWheelSmoothScroll\n && classifier.isPhysicalMouseWheel());\n if (canPerformSmoothScroll) {\n this._scrollable.setScrollPositionSmooth(desiredScrollPosition);\n }\n else {\n this._scrollable.setScrollPositionNow(desiredScrollPosition);\n }\n this._shouldRender = true;\n }\n }\n if (this._options.alwaysConsumeMouseWheel || this._shouldRender) {\n e.preventDefault();\n e.stopPropagation();\n }\n };\n AbstractScrollableElement.prototype._onDidScroll = function (e) {\n this._shouldRender = this._horizontalScrollbar.onDidScroll(e) || this._shouldRender;\n this._shouldRender = this._verticalScrollbar.onDidScroll(e) || this._shouldRender;\n if (this._options.useShadows) {\n this._shouldRender = true;\n }\n if (this._revealOnScroll) {\n this._reveal();\n }\n if (!this._options.lazyRender) {\n this._render();\n }\n };\n /**\n * Render / mutate the DOM now.\n * Should be used together with the ctor option `lazyRender`.\n */\n AbstractScrollableElement.prototype.renderNow = function () {\n if (!this._options.lazyRender) {\n throw new Error('Please use `lazyRender` together with `renderNow`!');\n }\n this._render();\n };\n AbstractScrollableElement.prototype._render = function () {\n if (!this._shouldRender) {\n return;\n }\n this._shouldRender = false;\n this._horizontalScrollbar.render();\n this._verticalScrollbar.render();\n if (this._options.useShadows) {\n var scrollState = this._scrollable.getCurrentScrollPosition();\n var enableTop = scrollState.scrollTop > 0;\n var enableLeft = scrollState.scrollLeft > 0;\n this._leftShadowDomNode.setClassName('shadow' + (enableLeft ? ' left' : ''));\n this._topShadowDomNode.setClassName('shadow' + (enableTop ? ' top' : ''));\n this._topLeftShadowDomNode.setClassName('shadow top-left-corner' + (enableTop ? ' top' : '') + (enableLeft ? ' left' : ''));\n }\n };\n // -------------------- fade in / fade out --------------------\n AbstractScrollableElement.prototype._onDragStart = function () {\n this._isDragging = true;\n this._reveal();\n };\n AbstractScrollableElement.prototype._onDragEnd = function () {\n this._isDragging = false;\n this._hide();\n };\n AbstractScrollableElement.prototype._onMouseOut = function (e) {\n this._mouseIsOver = false;\n this._hide();\n };\n AbstractScrollableElement.prototype._onMouseOver = function (e) {\n this._mouseIsOver = true;\n this._reveal();\n };\n AbstractScrollableElement.prototype._reveal = function () {\n this._verticalScrollbar.beginReveal();\n this._horizontalScrollbar.beginReveal();\n this._scheduleHide();\n };\n AbstractScrollableElement.prototype._hide = function () {\n if (!this._mouseIsOver && !this._isDragging) {\n this._verticalScrollbar.beginHide();\n this._horizontalScrollbar.beginHide();\n }\n };\n AbstractScrollableElement.prototype._scheduleHide = function () {\n var _this = this;\n if (!this._mouseIsOver && !this._isDragging) {\n this._hideTimeout.cancelAndSet(function () { return _this._hide(); }, HIDE_TIMEOUT);\n }\n };\n return AbstractScrollableElement;\n}(Widget));\nexport { AbstractScrollableElement };\nvar ScrollableElement = /** @class */ (function (_super) {\n __extends(ScrollableElement, _super);\n function ScrollableElement(element, options) {\n var _this = this;\n options = options || {};\n options.mouseWheelSmoothScroll = false;\n var scrollable = new Scrollable(0, function (callback) { return DomUtils.scheduleAtNextAnimationFrame(callback); });\n _this = _super.call(this, element, options, scrollable) || this;\n _this._register(scrollable);\n return _this;\n }\n ScrollableElement.prototype.setScrollPosition = function (update) {\n this._scrollable.setScrollPositionNow(update);\n };\n ScrollableElement.prototype.getScrollPosition = function () {\n return this._scrollable.getCurrentScrollPosition();\n };\n return ScrollableElement;\n}(AbstractScrollableElement));\nexport { ScrollableElement };\nvar SmoothScrollableElement = /** @class */ (function (_super) {\n __extends(SmoothScrollableElement, _super);\n function SmoothScrollableElement(element, options, scrollable) {\n return _super.call(this, element, options, scrollable) || this;\n }\n return SmoothScrollableElement;\n}(AbstractScrollableElement));\nexport { SmoothScrollableElement };\nvar DomScrollableElement = /** @class */ (function (_super) {\n __extends(DomScrollableElement, _super);\n function DomScrollableElement(element, options) {\n var _this = _super.call(this, element, options) || this;\n _this._element = element;\n _this.onScroll(function (e) {\n if (e.scrollTopChanged) {\n _this._element.scrollTop = e.scrollTop;\n }\n if (e.scrollLeftChanged) {\n _this._element.scrollLeft = e.scrollLeft;\n }\n });\n _this.scanDomNode();\n return _this;\n }\n DomScrollableElement.prototype.scanDomNode = function () {\n // widh, scrollLeft, scrollWidth, height, scrollTop, scrollHeight\n this.setScrollDimensions({\n width: this._element.clientWidth,\n scrollWidth: this._element.scrollWidth,\n height: this._element.clientHeight,\n scrollHeight: this._element.scrollHeight\n });\n this.setScrollPosition({\n scrollLeft: this._element.scrollLeft,\n scrollTop: this._element.scrollTop,\n });\n };\n return DomScrollableElement;\n}(ScrollableElement));\nexport { DomScrollableElement };\nfunction resolveOptions(opts) {\n var result = {\n lazyRender: (typeof opts.lazyRender !== 'undefined' ? opts.lazyRender : false),\n className: (typeof opts.className !== 'undefined' ? opts.className : ''),\n useShadows: (typeof opts.useShadows !== 'undefined' ? opts.useShadows : true),\n handleMouseWheel: (typeof opts.handleMouseWheel !== 'undefined' ? opts.handleMouseWheel : true),\n flipAxes: (typeof opts.flipAxes !== 'undefined' ? opts.flipAxes : false),\n alwaysConsumeMouseWheel: (typeof opts.alwaysConsumeMouseWheel !== 'undefined' ? opts.alwaysConsumeMouseWheel : false),\n scrollYToX: (typeof opts.scrollYToX !== 'undefined' ? opts.scrollYToX : false),\n mouseWheelScrollSensitivity: (typeof opts.mouseWheelScrollSensitivity !== 'undefined' ? opts.mouseWheelScrollSensitivity : 1),\n mouseWheelSmoothScroll: (typeof opts.mouseWheelSmoothScroll !== 'undefined' ? opts.mouseWheelSmoothScroll : true),\n arrowSize: (typeof opts.arrowSize !== 'undefined' ? opts.arrowSize : 11),\n listenOnDomNode: (typeof opts.listenOnDomNode !== 'undefined' ? opts.listenOnDomNode : null),\n horizontal: (typeof opts.horizontal !== 'undefined' ? opts.horizontal : ScrollbarVisibility.Auto),\n horizontalScrollbarSize: (typeof opts.horizontalScrollbarSize !== 'undefined' ? opts.horizontalScrollbarSize : 10),\n horizontalSliderSize: (typeof opts.horizontalSliderSize !== 'undefined' ? opts.horizontalSliderSize : 0),\n horizontalHasArrows: (typeof opts.horizontalHasArrows !== 'undefined' ? opts.horizontalHasArrows : false),\n vertical: (typeof opts.vertical !== 'undefined' ? opts.vertical : ScrollbarVisibility.Auto),\n verticalScrollbarSize: (typeof opts.verticalScrollbarSize !== 'undefined' ? opts.verticalScrollbarSize : 10),\n verticalHasArrows: (typeof opts.verticalHasArrows !== 'undefined' ? opts.verticalHasArrows : false),\n verticalSliderSize: (typeof opts.verticalSliderSize !== 'undefined' ? opts.verticalSliderSize : 0)\n };\n result.horizontalSliderSize = (typeof opts.horizontalSliderSize !== 'undefined' ? opts.horizontalSliderSize : result.horizontalScrollbarSize);\n result.verticalSliderSize = (typeof opts.verticalSliderSize !== 'undefined' ? opts.verticalSliderSize : result.verticalScrollbarSize);\n // Defaults are different on Macs\n if (Platform.isMacintosh) {\n result.className += ' mac';\n }\n return result;\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport * as dom from '../../../../base/browser/dom';\nimport { SmoothScrollableElement } from '../../../../base/browser/ui/scrollbar/scrollableElement';\nimport { ViewPart, PartFingerprints } from '../../view/viewPart';\nimport { createFastDomNode } from '../../../../base/browser/fastDomNode';\nimport { getThemeTypeSelector } from '../../../../platform/theme/common/themeService';\nvar EditorScrollbar = /** @class */ (function (_super) {\n __extends(EditorScrollbar, _super);\n function EditorScrollbar(context, linesContent, viewDomNode, overflowGuardDomNode) {\n var _this = _super.call(this, context) || this;\n var editor = _this._context.configuration.editor;\n var configScrollbarOpts = editor.viewInfo.scrollbar;\n var scrollbarOptions = {\n listenOnDomNode: viewDomNode.domNode,\n className: 'editor-scrollable' + ' ' + getThemeTypeSelector(context.theme.type),\n useShadows: false,\n lazyRender: true,\n vertical: configScrollbarOpts.vertical,\n horizontal: configScrollbarOpts.horizontal,\n verticalHasArrows: configScrollbarOpts.verticalHasArrows,\n horizontalHasArrows: configScrollbarOpts.horizontalHasArrows,\n verticalScrollbarSize: configScrollbarOpts.verticalScrollbarSize,\n verticalSliderSize: configScrollbarOpts.verticalSliderSize,\n horizontalScrollbarSize: configScrollbarOpts.horizontalScrollbarSize,\n horizontalSliderSize: configScrollbarOpts.horizontalSliderSize,\n handleMouseWheel: configScrollbarOpts.handleMouseWheel,\n arrowSize: configScrollbarOpts.arrowSize,\n mouseWheelScrollSensitivity: configScrollbarOpts.mouseWheelScrollSensitivity,\n };\n _this.scrollbar = _this._register(new SmoothScrollableElement(linesContent.domNode, scrollbarOptions, _this._context.viewLayout.scrollable));\n PartFingerprints.write(_this.scrollbar.getDomNode(), 5 /* ScrollableElement */);\n _this.scrollbarDomNode = createFastDomNode(_this.scrollbar.getDomNode());\n _this.scrollbarDomNode.setPosition('absolute');\n _this._setLayout();\n // When having a zone widget that calls .focus() on one of its dom elements,\n // the browser will try desperately to reveal that dom node, unexpectedly\n // changing the .scrollTop of this.linesContent\n var onBrowserDesperateReveal = function (domNode, lookAtScrollTop, lookAtScrollLeft) {\n var newScrollPosition = {};\n if (lookAtScrollTop) {\n var deltaTop = domNode.scrollTop;\n if (deltaTop) {\n newScrollPosition.scrollTop = _this._context.viewLayout.getCurrentScrollTop() + deltaTop;\n domNode.scrollTop = 0;\n }\n }\n if (lookAtScrollLeft) {\n var deltaLeft = domNode.scrollLeft;\n if (deltaLeft) {\n newScrollPosition.scrollLeft = _this._context.viewLayout.getCurrentScrollLeft() + deltaLeft;\n domNode.scrollLeft = 0;\n }\n }\n _this._context.viewLayout.setScrollPositionNow(newScrollPosition);\n };\n // I've seen this happen both on the view dom node & on the lines content dom node.\n _this._register(dom.addDisposableListener(viewDomNode.domNode, 'scroll', function (e) { return onBrowserDesperateReveal(viewDomNode.domNode, true, true); }));\n _this._register(dom.addDisposableListener(linesContent.domNode, 'scroll', function (e) { return onBrowserDesperateReveal(linesContent.domNode, true, false); }));\n _this._register(dom.addDisposableListener(overflowGuardDomNode.domNode, 'scroll', function (e) { return onBrowserDesperateReveal(overflowGuardDomNode.domNode, true, false); }));\n _this._register(dom.addDisposableListener(_this.scrollbarDomNode.domNode, 'scroll', function (e) { return onBrowserDesperateReveal(_this.scrollbarDomNode.domNode, true, false); }));\n return _this;\n }\n EditorScrollbar.prototype.dispose = function () {\n _super.prototype.dispose.call(this);\n };\n EditorScrollbar.prototype._setLayout = function () {\n var layoutInfo = this._context.configuration.editor.layoutInfo;\n this.scrollbarDomNode.setLeft(layoutInfo.contentLeft);\n var side = this._context.configuration.editor.viewInfo.minimap.side;\n if (side === 'right') {\n this.scrollbarDomNode.setWidth(layoutInfo.contentWidth + layoutInfo.minimapWidth);\n }\n else {\n this.scrollbarDomNode.setWidth(layoutInfo.contentWidth);\n }\n this.scrollbarDomNode.setHeight(layoutInfo.contentHeight);\n };\n EditorScrollbar.prototype.getOverviewRulerLayoutInfo = function () {\n return this.scrollbar.getOverviewRulerLayoutInfo();\n };\n EditorScrollbar.prototype.getDomNode = function () {\n return this.scrollbarDomNode;\n };\n EditorScrollbar.prototype.delegateVerticalScrollbarMouseDown = function (browserEvent) {\n this.scrollbar.delegateVerticalScrollbarMouseDown(browserEvent);\n };\n // --- begin event handlers\n EditorScrollbar.prototype.onConfigurationChanged = function (e) {\n if (e.viewInfo) {\n var editor = this._context.configuration.editor;\n var newOpts = {\n handleMouseWheel: editor.viewInfo.scrollbar.handleMouseWheel,\n mouseWheelScrollSensitivity: editor.viewInfo.scrollbar.mouseWheelScrollSensitivity\n };\n this.scrollbar.updateOptions(newOpts);\n }\n if (e.layoutInfo) {\n this._setLayout();\n }\n return true;\n };\n EditorScrollbar.prototype.onScrollChanged = function (e) {\n return true;\n };\n EditorScrollbar.prototype.onThemeChanged = function (e) {\n this.scrollbar.updateClassName('editor-scrollable' + ' ' + getThemeTypeSelector(this._context.theme.type));\n return true;\n };\n // --- end event handlers\n EditorScrollbar.prototype.prepareRender = function (ctx) {\n // Nothing to do\n };\n EditorScrollbar.prototype.render = function (ctx) {\n this.scrollbar.renderNow();\n };\n return EditorScrollbar;\n}(ViewPart));\nexport { EditorScrollbar };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport { MinimapCharRenderer } from './minimapCharRenderer';\nfunction toUint8ClampedArrat(arr) {\n var r = new Uint8ClampedArray(arr.length);\n for (var i = 0, len = arr.length; i < len; i++) {\n r[i] = arr[i];\n }\n return r;\n}\nvar minimapCharRenderer = null;\nexport function getOrCreateMinimapCharRenderer() {\n if (!minimapCharRenderer) {\n var _x1Data = toUint8ClampedArrat(x1Data);\n x1Data = null;\n var _x2Data = toUint8ClampedArrat(x2Data);\n x2Data = null;\n minimapCharRenderer = new MinimapCharRenderer(_x2Data, _x1Data);\n }\n return minimapCharRenderer;\n}\nvar x2Data = [\n //\n 0, 0,\n 0, 0,\n 0, 0,\n 0, 0,\n // !\n 39, 14,\n 39, 14,\n 14, 5,\n 29, 10,\n // \"\n 96, 96,\n 29, 29,\n 0, 0,\n 0, 0,\n // #\n 49, 113,\n 195, 214,\n 227, 166,\n 135, 42,\n // $\n 40, 29,\n 194, 38,\n 75, 148,\n 197, 187,\n // %\n 145, 0,\n 160, 61,\n 75, 143,\n 2, 183,\n // &\n 138, 58,\n 163, 6,\n 177, 223,\n 197, 227,\n // '\n 38, 13,\n 11, 4,\n 0, 0,\n 0, 0,\n // (\n 10, 54,\n 52, 8,\n 62, 4,\n 71, 122,\n // )\n 73, 2,\n 19, 40,\n 10, 50,\n 155, 36,\n // *\n 79, 70,\n 145, 121,\n 7, 5,\n 0, 0,\n // +\n 2, 1,\n 36, 12,\n 204, 166,\n 16, 5,\n // ,\n 0, 0,\n 0, 0,\n 1, 0,\n 154, 34,\n // -\n 0, 0,\n 0, 0,\n 96, 83,\n 0, 0,\n // .\n 0, 0,\n 0, 0,\n 0, 0,\n 46, 34,\n // /\n 0, 82,\n 2, 56,\n 53, 3,\n 146, 0,\n // 0\n 146, 119,\n 152, 132,\n 152, 131,\n 145, 119,\n // 1\n 170, 42,\n 15, 42,\n 15, 42,\n 172, 194,\n // 2\n 131, 132,\n 0, 139,\n 80, 28,\n 227, 143,\n // 3\n 159, 135,\n 15, 118,\n 11, 126,\n 171, 144,\n // 4\n 20, 124,\n 88, 106,\n 217, 196,\n 0, 106,\n // 5\n 189, 92,\n 168, 43,\n 5, 130,\n 164, 133,\n // 6\n 130, 115,\n 183, 65,\n 134, 120,\n 141, 141,\n // 7\n 170, 196,\n 2, 106,\n 31, 32,\n 105, 2,\n // 8\n 145, 130,\n 116, 114,\n 132, 135,\n 138, 140,\n // 9\n 138, 113,\n 147, 137,\n 81, 183,\n 129, 94,\n // :\n 0, 0,\n 21, 16,\n 4, 3,\n 46, 34,\n // ;\n 0, 0,\n 45, 34,\n 1, 0,\n 160, 49,\n // <\n 0, 0,\n 43, 143,\n 203, 23,\n 1, 76,\n // =\n 0, 0,\n 38, 28,\n 131, 96,\n 38, 28,\n // >\n 0, 0,\n 168, 31,\n 29, 191,\n 98, 0,\n // ?\n 118, 139,\n 5, 113,\n 45, 13,\n 37, 6,\n // @\n 97, 115,\n 161, 179,\n 204, 105,\n 223, 224,\n // A\n 83, 52,\n 111, 100,\n 184, 186,\n 120, 132,\n // B\n 212, 145,\n 180, 139,\n 174, 161,\n 212, 182,\n // C\n 104, 162,\n 131, 0,\n 131, 0,\n 104, 161,\n // D\n 219, 120,\n 110, 116,\n 110, 116,\n 219, 120,\n // E\n 207, 154,\n 163, 40,\n 147, 22,\n 207, 154,\n // F\n 202, 159,\n 161, 47,\n 145, 23,\n 111, 0,\n // G\n 139, 154,\n 144, 30,\n 144, 135,\n 139, 187,\n // H\n 110, 110,\n 168, 161,\n 150, 145,\n 110, 110,\n // I\n 185, 162,\n 43, 16,\n 43, 16,\n 185, 162,\n // J\n 73, 129,\n 0, 110,\n 0, 110,\n 191, 87,\n // K\n 149, 149,\n 236, 48,\n 195, 91,\n 146, 149,\n // L\n 146, 0,\n 146, 0,\n 146, 0,\n 187, 173,\n // M\n 200, 201,\n 222, 215,\n 172, 147,\n 95, 95,\n // N\n 193, 97,\n 224, 129,\n 159, 206,\n 97, 192,\n // O\n 155, 139,\n 153, 115,\n 153, 115,\n 156, 140,\n // P\n 189, 158,\n 123, 136,\n 190, 64,\n 111, 0,\n // Q\n 155, 139,\n 153, 115,\n 153, 114,\n 156, 241,\n // R\n 197, 148,\n 150, 152,\n 170, 116,\n 110, 157,\n // S\n 156, 128,\n 169, 14,\n 13, 159,\n 158, 149,\n // T\n 212, 189,\n 43, 16,\n 43, 16,\n 43, 16,\n // U\n 148, 110,\n 148, 110,\n 147, 109,\n 182, 151,\n // V\n 133, 121,\n 106, 118,\n 114, 103,\n 89, 66,\n // W\n 94, 94,\n 211, 188,\n 205, 207,\n 139, 168,\n // X\n 151, 152,\n 87, 76,\n 101, 79,\n 151, 152,\n // Y\n 130, 156,\n 125, 116,\n 47, 29,\n 43, 16,\n // Z\n 169, 228,\n 11, 103,\n 120, 6,\n 230, 176,\n // [\n 55, 49,\n 55, 6,\n 55, 6,\n 193, 102,\n // \\\n 92, 0,\n 71, 0,\n 13, 30,\n 0, 147,\n // ]\n 63, 43,\n 12, 43,\n 12, 43,\n 142, 152,\n // ^\n 71, 53,\n 61, 61,\n 0, 0,\n 0, 0,\n // _\n 0, 0,\n 0, 0,\n 0, 0,\n 158, 146,\n // `\n 25, 2,\n 0, 0,\n 0, 0,\n 0, 0,\n // a\n 0, 0,\n 107, 130,\n 170, 194,\n 176, 188,\n // b\n 109, 0,\n 203, 159,\n 113, 111,\n 202, 158,\n // c\n 0, 0,\n 135, 135,\n 114, 0,\n 136, 135,\n // d\n 0, 109,\n 187, 190,\n 148, 126,\n 177, 187,\n // e\n 0, 0,\n 149, 130,\n 218, 105,\n 169, 135,\n // f\n 37, 113,\n 146, 113,\n 49, 13,\n 49, 13,\n // g\n 0, 0,\n 178, 195,\n 147, 114,\n 255, 255,\n // h\n 109, 0,\n 193, 149,\n 110, 109,\n 109, 109,\n // i\n 12, 15,\n 125, 41,\n 33, 41,\n 144, 188,\n // j\n 1, 6,\n 75, 53,\n 10, 53,\n 210, 161,\n // k\n 110, 0,\n 152, 148,\n 210, 60,\n 110, 156,\n // l\n 213, 5,\n 63, 5,\n 63, 5,\n 45, 111,\n // m\n 0, 0,\n 232, 172,\n 190, 168,\n 190, 169,\n // n\n 0, 0,\n 190, 144,\n 109, 109,\n 109, 109,\n // o\n 0, 0,\n 168, 140,\n 148, 111,\n 168, 140,\n // p\n 0, 0,\n 200, 151,\n 113, 110,\n 255, 158,\n // q\n 0, 0,\n 184, 188,\n 147, 139,\n 186, 255,\n // r\n 0, 0,\n 122, 130,\n 111, 0,\n 109, 0,\n // s\n 0, 0,\n 132, 69,\n 109, 93,\n 110, 136,\n // t\n 51, 5,\n 205, 103,\n 61, 6,\n 47, 106,\n // u\n 0, 0,\n 110, 109,\n 110, 122,\n 155, 179,\n // v\n 0, 0,\n 132, 120,\n 113, 114,\n 84, 63,\n // w\n 0, 0,\n 124, 108,\n 202, 189,\n 160, 174,\n // x\n 0, 0,\n 144, 142,\n 79, 57,\n 159, 146,\n // y\n 0, 0,\n 138, 138,\n 119, 117,\n 255, 69,\n // z\n 0, 0,\n 97, 198,\n 47, 38,\n 208, 84,\n // {\n 23, 112,\n 41, 14,\n 157, 7,\n 121, 192,\n // |\n 35, 11,\n 35, 11,\n 35, 11,\n 160, 61,\n // }\n 129, 9,\n 40, 19,\n 20, 139,\n 236, 44,\n // ~\n 0, 0,\n 15, 3,\n 97, 93,\n 0, 0,\n];\nvar x1Data = [\n //\n 0,\n 0,\n // !\n 23,\n 12,\n // \"\n 53,\n 0,\n // #\n 130,\n 127,\n // $\n 58,\n 149,\n // %\n 67,\n 77,\n // &\n 72,\n 198,\n // '\n 13,\n 0,\n // (\n 25,\n 51,\n // )\n 25,\n 49,\n // *\n 94,\n 2,\n // +\n 8,\n 64,\n // ,\n 0,\n 24,\n // -\n 0,\n 21,\n // .\n 0,\n 9,\n // /\n 19,\n 27,\n // 0\n 126,\n 126,\n // 1\n 51,\n 80,\n // 2\n 72,\n 105,\n // 3\n 87,\n 98,\n // 4\n 73,\n 93,\n // 5\n 106,\n 85,\n // 6\n 111,\n 123,\n // 7\n 87,\n 30,\n // 8\n 116,\n 126,\n // 9\n 123,\n 110,\n // :\n 4,\n 16,\n // ;\n 9,\n 28,\n // <\n 21,\n 53,\n // =\n 8,\n 62,\n // >\n 23,\n 52,\n // ?\n 73,\n 21,\n // @\n 132,\n 183,\n // A\n 78,\n 142,\n // B\n 168,\n 175,\n // C\n 70,\n 70,\n // D\n 128,\n 128,\n // E\n 123,\n 110,\n // F\n 125,\n 43,\n // G\n 100,\n 139,\n // H\n 125,\n 119,\n // I\n 78,\n 78,\n // J\n 54,\n 77,\n // K\n 139,\n 139,\n // L\n 33,\n 87,\n // M\n 201,\n 117,\n // N\n 162,\n 149,\n // O\n 130,\n 130,\n // P\n 138,\n 60,\n // Q\n 130,\n 172,\n // R\n 149,\n 127,\n // S\n 95,\n 98,\n // T\n 95,\n 25,\n // U\n 118,\n 135,\n // V\n 110,\n 85,\n // W\n 147,\n 175,\n // X\n 105,\n 110,\n // Y\n 121,\n 30,\n // Z\n 101,\n 113,\n // [\n 34,\n 68,\n // \\\n 20,\n 26,\n // ]\n 34,\n 68,\n // ^\n 56,\n 0,\n // _\n 0,\n 44,\n // `\n 3,\n 0,\n // a\n 27,\n 175,\n // b\n 80,\n 133,\n // c\n 31,\n 66,\n // d\n 85,\n 147,\n // e\n 32,\n 150,\n // f\n 90,\n 25,\n // g\n 45,\n 230,\n // h\n 77,\n 101,\n // i\n 36,\n 83,\n // j\n 22,\n 84,\n // k\n 71,\n 118,\n // l\n 44,\n 44,\n // m\n 52,\n 172,\n // n\n 38,\n 101,\n // o\n 35,\n 130,\n // p\n 40,\n 197,\n // q\n 43,\n 197,\n // r\n 29,\n 26,\n // s\n 23,\n 103,\n // t\n 67,\n 44,\n // u\n 25,\n 129,\n // v\n 29,\n 85,\n // w\n 27,\n 177,\n // x\n 33,\n 97,\n // y\n 32,\n 145,\n // z\n 33,\n 77,\n // {\n 38,\n 96,\n // |\n 20,\n 55,\n // }\n 36,\n 95,\n // ~\n 2,\n 22,\n];\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport './minimap.css';\nimport { ViewPart, PartFingerprints } from '../../view/viewPart';\nimport * as strings from '../../../../base/common/strings';\nimport { getOrCreateMinimapCharRenderer } from '../../../common/view/runtimeMinimapCharRenderer';\nimport * as dom from '../../../../base/browser/dom';\nimport { MinimapTokensColorTracker } from '../../../common/view/minimapCharRenderer';\nimport { createFastDomNode } from '../../../../base/browser/fastDomNode';\nimport { RenderedLinesCollection } from '../../view/viewLayer';\nimport { Range } from '../../../common/core/range';\nimport * as viewEvents from '../../../common/view/viewEvents';\nimport { GlobalMouseMoveMonitor, standardMouseMoveMerger } from '../../../../base/browser/globalMouseMoveMonitor';\nimport * as platform from '../../../../base/common/platform';\nimport { registerThemingParticipant } from '../../../../platform/theme/common/themeService';\nimport { scrollbarSliderBackground, scrollbarSliderHoverBackground, scrollbarSliderActiveBackground, scrollbarShadow } from '../../../../platform/theme/common/colorRegistry';\nfunction getMinimapLineHeight(renderMinimap) {\n if (renderMinimap === 2 /* Large */) {\n return 4 /* x2_CHAR_HEIGHT */;\n }\n if (renderMinimap === 4 /* LargeBlocks */) {\n return 4 /* x2_CHAR_HEIGHT */ + 2;\n }\n if (renderMinimap === 1 /* Small */) {\n return 2 /* x1_CHAR_HEIGHT */;\n }\n // RenderMinimap.SmallBlocks\n return 2 /* x1_CHAR_HEIGHT */ + 1;\n}\nfunction getMinimapCharWidth(renderMinimap) {\n if (renderMinimap === 2 /* Large */) {\n return 2 /* x2_CHAR_WIDTH */;\n }\n if (renderMinimap === 4 /* LargeBlocks */) {\n return 2 /* x2_CHAR_WIDTH */;\n }\n if (renderMinimap === 1 /* Small */) {\n return 1 /* x1_CHAR_WIDTH */;\n }\n // RenderMinimap.SmallBlocks\n return 1 /* x1_CHAR_WIDTH */;\n}\n/**\n * The orthogonal distance to the slider at which dragging \"resets\". This implements \"snapping\"\n */\nvar MOUSE_DRAG_RESET_DISTANCE = 140;\nvar MinimapOptions = /** @class */ (function () {\n function MinimapOptions(configuration) {\n var pixelRatio = configuration.editor.pixelRatio;\n var layoutInfo = configuration.editor.layoutInfo;\n var viewInfo = configuration.editor.viewInfo;\n var fontInfo = configuration.editor.fontInfo;\n this.renderMinimap = layoutInfo.renderMinimap | 0;\n this.scrollBeyondLastLine = viewInfo.scrollBeyondLastLine;\n this.showSlider = viewInfo.minimap.showSlider;\n this.pixelRatio = pixelRatio;\n this.typicalHalfwidthCharacterWidth = fontInfo.typicalHalfwidthCharacterWidth;\n this.lineHeight = configuration.editor.lineHeight;\n this.minimapLeft = layoutInfo.minimapLeft;\n this.minimapWidth = layoutInfo.minimapWidth;\n this.minimapHeight = layoutInfo.height;\n this.canvasInnerWidth = Math.max(1, Math.floor(pixelRatio * this.minimapWidth));\n this.canvasInnerHeight = Math.max(1, Math.floor(pixelRatio * this.minimapHeight));\n this.canvasOuterWidth = this.canvasInnerWidth / pixelRatio;\n this.canvasOuterHeight = this.canvasInnerHeight / pixelRatio;\n }\n MinimapOptions.prototype.equals = function (other) {\n return (this.renderMinimap === other.renderMinimap\n && this.scrollBeyondLastLine === other.scrollBeyondLastLine\n && this.showSlider === other.showSlider\n && this.pixelRatio === other.pixelRatio\n && this.typicalHalfwidthCharacterWidth === other.typicalHalfwidthCharacterWidth\n && this.lineHeight === other.lineHeight\n && this.minimapLeft === other.minimapLeft\n && this.minimapWidth === other.minimapWidth\n && this.minimapHeight === other.minimapHeight\n && this.canvasInnerWidth === other.canvasInnerWidth\n && this.canvasInnerHeight === other.canvasInnerHeight\n && this.canvasOuterWidth === other.canvasOuterWidth\n && this.canvasOuterHeight === other.canvasOuterHeight);\n };\n return MinimapOptions;\n}());\nvar MinimapLayout = /** @class */ (function () {\n function MinimapLayout(scrollTop, scrollHeight, computedSliderRatio, sliderTop, sliderHeight, startLineNumber, endLineNumber) {\n this.scrollTop = scrollTop;\n this.scrollHeight = scrollHeight;\n this._computedSliderRatio = computedSliderRatio;\n this.sliderTop = sliderTop;\n this.sliderHeight = sliderHeight;\n this.startLineNumber = startLineNumber;\n this.endLineNumber = endLineNumber;\n }\n /**\n * Compute a desired `scrollPosition` such that the slider moves by `delta`.\n */\n MinimapLayout.prototype.getDesiredScrollTopFromDelta = function (delta) {\n var desiredSliderPosition = this.sliderTop + delta;\n return Math.round(desiredSliderPosition / this._computedSliderRatio);\n };\n MinimapLayout.create = function (options, viewportStartLineNumber, viewportEndLineNumber, viewportHeight, viewportContainsWhitespaceGaps, lineCount, scrollTop, scrollHeight, previousLayout) {\n var pixelRatio = options.pixelRatio;\n var minimapLineHeight = getMinimapLineHeight(options.renderMinimap);\n var minimapLinesFitting = Math.floor(options.canvasInnerHeight / minimapLineHeight);\n var lineHeight = options.lineHeight;\n // The visible line count in a viewport can change due to a number of reasons:\n // a) with the same viewport width, different scroll positions can result in partial lines being visible:\n // e.g. for a line height of 20, and a viewport height of 600\n // * scrollTop = 0 => visible lines are [1, 30]\n // * scrollTop = 10 => visible lines are [1, 31] (with lines 1 and 31 partially visible)\n // * scrollTop = 20 => visible lines are [2, 31]\n // b) whitespace gaps might make their way in the viewport (which results in a decrease in the visible line count)\n // c) we could be in the scroll beyond last line case (which also results in a decrease in the visible line count, down to possibly only one line being visible)\n // We must first establish a desirable slider height.\n var sliderHeight;\n if (viewportContainsWhitespaceGaps && viewportEndLineNumber !== lineCount) {\n // case b) from above: there are whitespace gaps in the viewport.\n // In this case, the height of the slider directly reflects the visible line count.\n var viewportLineCount = viewportEndLineNumber - viewportStartLineNumber + 1;\n sliderHeight = Math.floor(viewportLineCount * minimapLineHeight / pixelRatio);\n }\n else {\n // The slider has a stable height\n var expectedViewportLineCount = viewportHeight / lineHeight;\n sliderHeight = Math.floor(expectedViewportLineCount * minimapLineHeight / pixelRatio);\n }\n var maxMinimapSliderTop;\n if (options.scrollBeyondLastLine) {\n // The minimap slider, when dragged all the way down, will contain the last line at its top\n maxMinimapSliderTop = (lineCount - 1) * minimapLineHeight / pixelRatio;\n }\n else {\n // The minimap slider, when dragged all the way down, will contain the last line at its bottom\n maxMinimapSliderTop = Math.max(0, lineCount * minimapLineHeight / pixelRatio - sliderHeight);\n }\n maxMinimapSliderTop = Math.min(options.minimapHeight - sliderHeight, maxMinimapSliderTop);\n // The slider can move from 0 to `maxMinimapSliderTop`\n // in the same way `scrollTop` can move from 0 to `scrollHeight` - `viewportHeight`.\n var computedSliderRatio = (maxMinimapSliderTop) / (scrollHeight - viewportHeight);\n var sliderTop = (scrollTop * computedSliderRatio);\n if (minimapLinesFitting >= lineCount) {\n // All lines fit in the minimap\n var startLineNumber = 1;\n var endLineNumber = lineCount;\n return new MinimapLayout(scrollTop, scrollHeight, computedSliderRatio, sliderTop, sliderHeight, startLineNumber, endLineNumber);\n }\n else {\n var startLineNumber = Math.max(1, Math.floor(viewportStartLineNumber - sliderTop * pixelRatio / minimapLineHeight));\n // Avoid flickering caused by a partial viewport start line\n // by being consistent w.r.t. the previous layout decision\n if (previousLayout && previousLayout.scrollHeight === scrollHeight) {\n if (previousLayout.scrollTop > scrollTop) {\n // Scrolling up => never increase `startLineNumber`\n startLineNumber = Math.min(startLineNumber, previousLayout.startLineNumber);\n }\n if (previousLayout.scrollTop < scrollTop) {\n // Scrolling down => never decrease `startLineNumber`\n startLineNumber = Math.max(startLineNumber, previousLayout.startLineNumber);\n }\n }\n var endLineNumber = Math.min(lineCount, startLineNumber + minimapLinesFitting - 1);\n return new MinimapLayout(scrollTop, scrollHeight, computedSliderRatio, sliderTop, sliderHeight, startLineNumber, endLineNumber);\n }\n };\n return MinimapLayout;\n}());\nvar MinimapLine = /** @class */ (function () {\n function MinimapLine(dy) {\n this.dy = dy;\n }\n MinimapLine.prototype.onContentChanged = function () {\n this.dy = -1;\n };\n MinimapLine.prototype.onTokensChanged = function () {\n this.dy = -1;\n };\n MinimapLine.INVALID = new MinimapLine(-1);\n return MinimapLine;\n}());\nvar RenderData = /** @class */ (function () {\n function RenderData(renderedLayout, imageData, lines) {\n this.renderedLayout = renderedLayout;\n this._imageData = imageData;\n this._renderedLines = new RenderedLinesCollection(function () { return MinimapLine.INVALID; });\n this._renderedLines._set(renderedLayout.startLineNumber, lines);\n }\n /**\n * Check if the current RenderData matches accurately the new desired layout and no painting is needed.\n */\n RenderData.prototype.linesEquals = function (layout) {\n if (this.renderedLayout.startLineNumber !== layout.startLineNumber) {\n return false;\n }\n if (this.renderedLayout.endLineNumber !== layout.endLineNumber) {\n return false;\n }\n var tmp = this._renderedLines._get();\n var lines = tmp.lines;\n for (var i = 0, len = lines.length; i < len; i++) {\n if (lines[i].dy === -1) {\n // This line is invalid\n return false;\n }\n }\n return true;\n };\n RenderData.prototype._get = function () {\n var tmp = this._renderedLines._get();\n return {\n imageData: this._imageData,\n rendLineNumberStart: tmp.rendLineNumberStart,\n lines: tmp.lines\n };\n };\n RenderData.prototype.onLinesChanged = function (e) {\n return this._renderedLines.onLinesChanged(e.fromLineNumber, e.toLineNumber);\n };\n RenderData.prototype.onLinesDeleted = function (e) {\n this._renderedLines.onLinesDeleted(e.fromLineNumber, e.toLineNumber);\n };\n RenderData.prototype.onLinesInserted = function (e) {\n this._renderedLines.onLinesInserted(e.fromLineNumber, e.toLineNumber);\n };\n RenderData.prototype.onTokensChanged = function (e) {\n return this._renderedLines.onTokensChanged(e.ranges);\n };\n return RenderData;\n}());\n/**\n * Some sort of double buffering.\n *\n * Keeps two buffers around that will be rotated for painting.\n * Always gives a buffer that is filled with the background color.\n */\nvar MinimapBuffers = /** @class */ (function () {\n function MinimapBuffers(ctx, WIDTH, HEIGHT, background) {\n this._backgroundFillData = MinimapBuffers._createBackgroundFillData(WIDTH, HEIGHT, background);\n this._buffers = [\n ctx.createImageData(WIDTH, HEIGHT),\n ctx.createImageData(WIDTH, HEIGHT)\n ];\n this._lastUsedBuffer = 0;\n }\n MinimapBuffers.prototype.getBuffer = function () {\n // rotate buffers\n this._lastUsedBuffer = 1 - this._lastUsedBuffer;\n var result = this._buffers[this._lastUsedBuffer];\n // fill with background color\n result.data.set(this._backgroundFillData);\n return result;\n };\n MinimapBuffers._createBackgroundFillData = function (WIDTH, HEIGHT, background) {\n var backgroundR = background.r;\n var backgroundG = background.g;\n var backgroundB = background.b;\n var result = new Uint8ClampedArray(WIDTH * HEIGHT * 4);\n var offset = 0;\n for (var i = 0; i < HEIGHT; i++) {\n for (var j = 0; j < WIDTH; j++) {\n result[offset] = backgroundR;\n result[offset + 1] = backgroundG;\n result[offset + 2] = backgroundB;\n result[offset + 3] = 255;\n offset += 4;\n }\n }\n return result;\n };\n return MinimapBuffers;\n}());\nvar Minimap = /** @class */ (function (_super) {\n __extends(Minimap, _super);\n function Minimap(context) {\n var _this = _super.call(this, context) || this;\n _this._options = new MinimapOptions(_this._context.configuration);\n _this._lastRenderData = null;\n _this._buffers = null;\n _this._domNode = createFastDomNode(document.createElement('div'));\n PartFingerprints.write(_this._domNode, 8 /* Minimap */);\n _this._domNode.setClassName(_this._getMinimapDomNodeClassName());\n _this._domNode.setPosition('absolute');\n _this._domNode.setAttribute('role', 'presentation');\n _this._domNode.setAttribute('aria-hidden', 'true');\n _this._shadow = createFastDomNode(document.createElement('div'));\n _this._shadow.setClassName('minimap-shadow-hidden');\n _this._domNode.appendChild(_this._shadow);\n _this._canvas = createFastDomNode(document.createElement('canvas'));\n _this._canvas.setPosition('absolute');\n _this._canvas.setLeft(0);\n _this._domNode.appendChild(_this._canvas);\n _this._slider = createFastDomNode(document.createElement('div'));\n _this._slider.setPosition('absolute');\n _this._slider.setClassName('minimap-slider');\n _this._slider.setLayerHinting(true);\n _this._domNode.appendChild(_this._slider);\n _this._sliderHorizontal = createFastDomNode(document.createElement('div'));\n _this._sliderHorizontal.setPosition('absolute');\n _this._sliderHorizontal.setClassName('minimap-slider-horizontal');\n _this._slider.appendChild(_this._sliderHorizontal);\n _this._tokensColorTracker = MinimapTokensColorTracker.getInstance();\n _this._applyLayout();\n _this._mouseDownListener = dom.addStandardDisposableListener(_this._canvas.domNode, 'mousedown', function (e) {\n e.preventDefault();\n var renderMinimap = _this._options.renderMinimap;\n if (renderMinimap === 0 /* None */) {\n return;\n }\n if (!_this._lastRenderData) {\n return;\n }\n var minimapLineHeight = getMinimapLineHeight(renderMinimap);\n var internalOffsetY = _this._options.pixelRatio * e.browserEvent.offsetY;\n var lineIndex = Math.floor(internalOffsetY / minimapLineHeight);\n var lineNumber = lineIndex + _this._lastRenderData.renderedLayout.startLineNumber;\n lineNumber = Math.min(lineNumber, _this._context.model.getLineCount());\n _this._context.privateViewEventBus.emit(new viewEvents.ViewRevealRangeRequestEvent(new Range(lineNumber, 1, lineNumber, 1), 1 /* Center */, false, 0 /* Smooth */));\n });\n _this._sliderMouseMoveMonitor = new GlobalMouseMoveMonitor();\n _this._sliderMouseDownListener = dom.addStandardDisposableListener(_this._slider.domNode, 'mousedown', function (e) {\n e.preventDefault();\n if (e.leftButton && _this._lastRenderData) {\n var initialMousePosition_1 = e.posy;\n var initialMouseOrthogonalPosition_1 = e.posx;\n var initialSliderState_1 = _this._lastRenderData.renderedLayout;\n _this._slider.toggleClassName('active', true);\n _this._sliderMouseMoveMonitor.startMonitoring(standardMouseMoveMerger, function (mouseMoveData) {\n var mouseOrthogonalDelta = Math.abs(mouseMoveData.posx - initialMouseOrthogonalPosition_1);\n if (platform.isWindows && mouseOrthogonalDelta > MOUSE_DRAG_RESET_DISTANCE) {\n // The mouse has wondered away from the scrollbar => reset dragging\n _this._context.viewLayout.setScrollPositionNow({\n scrollTop: initialSliderState_1.scrollTop\n });\n return;\n }\n var mouseDelta = mouseMoveData.posy - initialMousePosition_1;\n _this._context.viewLayout.setScrollPositionNow({\n scrollTop: initialSliderState_1.getDesiredScrollTopFromDelta(mouseDelta)\n });\n }, function () {\n _this._slider.toggleClassName('active', false);\n });\n }\n });\n return _this;\n }\n Minimap.prototype.dispose = function () {\n this._mouseDownListener.dispose();\n this._sliderMouseMoveMonitor.dispose();\n this._sliderMouseDownListener.dispose();\n _super.prototype.dispose.call(this);\n };\n Minimap.prototype._getMinimapDomNodeClassName = function () {\n if (this._options.showSlider === 'always') {\n return 'minimap slider-always';\n }\n return 'minimap slider-mouseover';\n };\n Minimap.prototype.getDomNode = function () {\n return this._domNode;\n };\n Minimap.prototype._applyLayout = function () {\n this._domNode.setLeft(this._options.minimapLeft);\n this._domNode.setWidth(this._options.minimapWidth);\n this._domNode.setHeight(this._options.minimapHeight);\n this._shadow.setHeight(this._options.minimapHeight);\n this._canvas.setWidth(this._options.canvasOuterWidth);\n this._canvas.setHeight(this._options.canvasOuterHeight);\n this._canvas.domNode.width = this._options.canvasInnerWidth;\n this._canvas.domNode.height = this._options.canvasInnerHeight;\n this._slider.setWidth(this._options.minimapWidth);\n };\n Minimap.prototype._getBuffer = function () {\n if (!this._buffers) {\n this._buffers = new MinimapBuffers(this._canvas.domNode.getContext('2d'), this._options.canvasInnerWidth, this._options.canvasInnerHeight, this._tokensColorTracker.getColor(2 /* DefaultBackground */));\n }\n return this._buffers.getBuffer();\n };\n Minimap.prototype._onOptionsMaybeChanged = function () {\n var opts = new MinimapOptions(this._context.configuration);\n if (this._options.equals(opts)) {\n return false;\n }\n this._options = opts;\n this._lastRenderData = null;\n this._buffers = null;\n this._applyLayout();\n this._domNode.setClassName(this._getMinimapDomNodeClassName());\n return true;\n };\n // ---- begin view event handlers\n Minimap.prototype.onConfigurationChanged = function (e) {\n return this._onOptionsMaybeChanged();\n };\n Minimap.prototype.onFlushed = function (e) {\n this._lastRenderData = null;\n return true;\n };\n Minimap.prototype.onLinesChanged = function (e) {\n if (this._lastRenderData) {\n return this._lastRenderData.onLinesChanged(e);\n }\n return false;\n };\n Minimap.prototype.onLinesDeleted = function (e) {\n if (this._lastRenderData) {\n this._lastRenderData.onLinesDeleted(e);\n }\n return true;\n };\n Minimap.prototype.onLinesInserted = function (e) {\n if (this._lastRenderData) {\n this._lastRenderData.onLinesInserted(e);\n }\n return true;\n };\n Minimap.prototype.onScrollChanged = function (e) {\n return true;\n };\n Minimap.prototype.onTokensChanged = function (e) {\n if (this._lastRenderData) {\n return this._lastRenderData.onTokensChanged(e);\n }\n return false;\n };\n Minimap.prototype.onTokensColorsChanged = function (e) {\n this._lastRenderData = null;\n this._buffers = null;\n return true;\n };\n Minimap.prototype.onZonesChanged = function (e) {\n this._lastRenderData = null;\n return true;\n };\n // --- end event handlers\n Minimap.prototype.prepareRender = function (ctx) {\n // Nothing to read\n };\n Minimap.prototype.render = function (renderingCtx) {\n var renderMinimap = this._options.renderMinimap;\n if (renderMinimap === 0 /* None */) {\n this._shadow.setClassName('minimap-shadow-hidden');\n this._sliderHorizontal.setWidth(0);\n this._sliderHorizontal.setHeight(0);\n return;\n }\n if (renderingCtx.scrollLeft + renderingCtx.viewportWidth >= renderingCtx.scrollWidth) {\n this._shadow.setClassName('minimap-shadow-hidden');\n }\n else {\n this._shadow.setClassName('minimap-shadow-visible');\n }\n var layout = MinimapLayout.create(this._options, renderingCtx.visibleRange.startLineNumber, renderingCtx.visibleRange.endLineNumber, renderingCtx.viewportHeight, (renderingCtx.viewportData.whitespaceViewportData.length > 0), this._context.model.getLineCount(), renderingCtx.scrollTop, renderingCtx.scrollHeight, this._lastRenderData ? this._lastRenderData.renderedLayout : null);\n this._slider.setTop(layout.sliderTop);\n this._slider.setHeight(layout.sliderHeight);\n // Compute horizontal slider coordinates\n var scrollLeftChars = renderingCtx.scrollLeft / this._options.typicalHalfwidthCharacterWidth;\n var horizontalSliderLeft = Math.min(this._options.minimapWidth, Math.round(scrollLeftChars * getMinimapCharWidth(this._options.renderMinimap) / this._options.pixelRatio));\n this._sliderHorizontal.setLeft(horizontalSliderLeft);\n this._sliderHorizontal.setWidth(this._options.minimapWidth - horizontalSliderLeft);\n this._sliderHorizontal.setTop(0);\n this._sliderHorizontal.setHeight(layout.sliderHeight);\n this._lastRenderData = this.renderLines(layout);\n };\n Minimap.prototype.renderLines = function (layout) {\n var renderMinimap = this._options.renderMinimap;\n var startLineNumber = layout.startLineNumber;\n var endLineNumber = layout.endLineNumber;\n var minimapLineHeight = getMinimapLineHeight(renderMinimap);\n // Check if nothing changed w.r.t. lines from last frame\n if (this._lastRenderData && this._lastRenderData.linesEquals(layout)) {\n var _lastData = this._lastRenderData._get();\n // Nice!! Nothing changed from last frame\n return new RenderData(layout, _lastData.imageData, _lastData.lines);\n }\n // Oh well!! We need to repaint some lines...\n var imageData = this._getBuffer();\n // Render untouched lines by using last rendered data.\n var _a = Minimap._renderUntouchedLines(imageData, startLineNumber, endLineNumber, minimapLineHeight, this._lastRenderData), _dirtyY1 = _a[0], _dirtyY2 = _a[1], needed = _a[2];\n // Fetch rendering info from view model for rest of lines that need rendering.\n var lineInfo = this._context.model.getMinimapLinesRenderingData(startLineNumber, endLineNumber, needed);\n var tabSize = lineInfo.tabSize;\n var background = this._tokensColorTracker.getColor(2 /* DefaultBackground */);\n var useLighterFont = this._tokensColorTracker.backgroundIsLight();\n // Render the rest of lines\n var dy = 0;\n var renderedLines = [];\n for (var lineIndex = 0, lineCount = endLineNumber - startLineNumber + 1; lineIndex < lineCount; lineIndex++) {\n if (needed[lineIndex]) {\n Minimap._renderLine(imageData, background, useLighterFont, renderMinimap, this._tokensColorTracker, getOrCreateMinimapCharRenderer(), dy, tabSize, lineInfo.data[lineIndex]);\n }\n renderedLines[lineIndex] = new MinimapLine(dy);\n dy += minimapLineHeight;\n }\n var dirtyY1 = (_dirtyY1 === -1 ? 0 : _dirtyY1);\n var dirtyY2 = (_dirtyY2 === -1 ? imageData.height : _dirtyY2);\n var dirtyHeight = dirtyY2 - dirtyY1;\n // Finally, paint to the canvas\n var ctx = this._canvas.domNode.getContext('2d');\n ctx.putImageData(imageData, 0, 0, 0, dirtyY1, imageData.width, dirtyHeight);\n // Save rendered data for reuse on next frame if possible\n return new RenderData(layout, imageData, renderedLines);\n };\n Minimap._renderUntouchedLines = function (target, startLineNumber, endLineNumber, minimapLineHeight, lastRenderData) {\n var needed = [];\n if (!lastRenderData) {\n for (var i = 0, len = endLineNumber - startLineNumber + 1; i < len; i++) {\n needed[i] = true;\n }\n return [-1, -1, needed];\n }\n var _lastData = lastRenderData._get();\n var lastTargetData = _lastData.imageData.data;\n var lastStartLineNumber = _lastData.rendLineNumberStart;\n var lastLines = _lastData.lines;\n var lastLinesLength = lastLines.length;\n var WIDTH = target.width;\n var targetData = target.data;\n var maxDestPixel = (endLineNumber - startLineNumber + 1) * minimapLineHeight * WIDTH * 4;\n var dirtyPixel1 = -1; // the pixel offset up to which all the data is equal to the prev frame\n var dirtyPixel2 = -1; // the pixel offset after which all the data is equal to the prev frame\n var copySourceStart = -1;\n var copySourceEnd = -1;\n var copyDestStart = -1;\n var copyDestEnd = -1;\n var dest_dy = 0;\n for (var lineNumber = startLineNumber; lineNumber <= endLineNumber; lineNumber++) {\n var lineIndex = lineNumber - startLineNumber;\n var lastLineIndex = lineNumber - lastStartLineNumber;\n var source_dy = (lastLineIndex >= 0 && lastLineIndex < lastLinesLength ? lastLines[lastLineIndex].dy : -1);\n if (source_dy === -1) {\n needed[lineIndex] = true;\n dest_dy += minimapLineHeight;\n continue;\n }\n var sourceStart = source_dy * WIDTH * 4;\n var sourceEnd = (source_dy + minimapLineHeight) * WIDTH * 4;\n var destStart = dest_dy * WIDTH * 4;\n var destEnd = (dest_dy + minimapLineHeight) * WIDTH * 4;\n if (copySourceEnd === sourceStart && copyDestEnd === destStart) {\n // contiguous zone => extend copy request\n copySourceEnd = sourceEnd;\n copyDestEnd = destEnd;\n }\n else {\n if (copySourceStart !== -1) {\n // flush existing copy request\n targetData.set(lastTargetData.subarray(copySourceStart, copySourceEnd), copyDestStart);\n if (dirtyPixel1 === -1 && copySourceStart === 0 && copySourceStart === copyDestStart) {\n dirtyPixel1 = copySourceEnd;\n }\n if (dirtyPixel2 === -1 && copySourceEnd === maxDestPixel && copySourceStart === copyDestStart) {\n dirtyPixel2 = copySourceStart;\n }\n }\n copySourceStart = sourceStart;\n copySourceEnd = sourceEnd;\n copyDestStart = destStart;\n copyDestEnd = destEnd;\n }\n needed[lineIndex] = false;\n dest_dy += minimapLineHeight;\n }\n if (copySourceStart !== -1) {\n // flush existing copy request\n targetData.set(lastTargetData.subarray(copySourceStart, copySourceEnd), copyDestStart);\n if (dirtyPixel1 === -1 && copySourceStart === 0 && copySourceStart === copyDestStart) {\n dirtyPixel1 = copySourceEnd;\n }\n if (dirtyPixel2 === -1 && copySourceEnd === maxDestPixel && copySourceStart === copyDestStart) {\n dirtyPixel2 = copySourceStart;\n }\n }\n var dirtyY1 = (dirtyPixel1 === -1 ? -1 : dirtyPixel1 / (WIDTH * 4));\n var dirtyY2 = (dirtyPixel2 === -1 ? -1 : dirtyPixel2 / (WIDTH * 4));\n return [dirtyY1, dirtyY2, needed];\n };\n Minimap._renderLine = function (target, backgroundColor, useLighterFont, renderMinimap, colorTracker, minimapCharRenderer, dy, tabSize, lineData) {\n var content = lineData.content;\n var tokens = lineData.tokens;\n var charWidth = getMinimapCharWidth(renderMinimap);\n var maxDx = target.width - charWidth;\n var dx = 0;\n var charIndex = 0;\n var tabsCharDelta = 0;\n for (var tokenIndex = 0, tokensLen = tokens.getCount(); tokenIndex < tokensLen; tokenIndex++) {\n var tokenEndIndex = tokens.getEndOffset(tokenIndex);\n var tokenColorId = tokens.getForeground(tokenIndex);\n var tokenColor = colorTracker.getColor(tokenColorId);\n for (; charIndex < tokenEndIndex; charIndex++) {\n if (dx > maxDx) {\n // hit edge of minimap\n return;\n }\n var charCode = content.charCodeAt(charIndex);\n if (charCode === 9 /* Tab */) {\n var insertSpacesCount = tabSize - (charIndex + tabsCharDelta) % tabSize;\n tabsCharDelta += insertSpacesCount - 1;\n // No need to render anything since tab is invisible\n dx += insertSpacesCount * charWidth;\n }\n else if (charCode === 32 /* Space */) {\n // No need to render anything since space is invisible\n dx += charWidth;\n }\n else {\n // Render twice for a full width character\n var count = strings.isFullWidthCharacter(charCode) ? 2 : 1;\n for (var i = 0; i < count; i++) {\n if (renderMinimap === 2 /* Large */) {\n minimapCharRenderer.x2RenderChar(target, dx, dy, charCode, tokenColor, backgroundColor, useLighterFont);\n }\n else if (renderMinimap === 1 /* Small */) {\n minimapCharRenderer.x1RenderChar(target, dx, dy, charCode, tokenColor, backgroundColor, useLighterFont);\n }\n else if (renderMinimap === 4 /* LargeBlocks */) {\n minimapCharRenderer.x2BlockRenderChar(target, dx, dy, tokenColor, backgroundColor, useLighterFont);\n }\n else {\n // RenderMinimap.SmallBlocks\n minimapCharRenderer.x1BlockRenderChar(target, dx, dy, tokenColor, backgroundColor, useLighterFont);\n }\n dx += charWidth;\n if (dx > maxDx) {\n // hit edge of minimap\n return;\n }\n }\n }\n }\n }\n };\n return Minimap;\n}(ViewPart));\nexport { Minimap };\nregisterThemingParticipant(function (theme, collector) {\n var sliderBackground = theme.getColor(scrollbarSliderBackground);\n if (sliderBackground) {\n var halfSliderBackground = sliderBackground.transparent(0.5);\n collector.addRule(\".monaco-editor .minimap-slider, .monaco-editor .minimap-slider .minimap-slider-horizontal { background: \" + halfSliderBackground + \"; }\");\n }\n var sliderHoverBackground = theme.getColor(scrollbarSliderHoverBackground);\n if (sliderHoverBackground) {\n var halfSliderHoverBackground = sliderHoverBackground.transparent(0.5);\n collector.addRule(\".monaco-editor .minimap-slider:hover, .monaco-editor .minimap-slider:hover .minimap-slider-horizontal { background: \" + halfSliderHoverBackground + \"; }\");\n }\n var sliderActiveBackground = theme.getColor(scrollbarSliderActiveBackground);\n if (sliderActiveBackground) {\n var halfSliderActiveBackground = sliderActiveBackground.transparent(0.5);\n collector.addRule(\".monaco-editor .minimap-slider.active, .monaco-editor .minimap-slider.active .minimap-slider-horizontal { background: \" + halfSliderActiveBackground + \"; }\");\n }\n var shadow = theme.getColor(scrollbarShadow);\n if (shadow) {\n collector.addRule(\".monaco-editor .minimap-shadow-visible { box-shadow: \" + shadow + \" -6px 0 6px -6px inset; }\");\n }\n});\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { onUnexpectedError } from '../../../base/common/errors';\nimport * as dom from '../../../base/browser/dom';\nimport { createFastDomNode } from '../../../base/browser/fastDomNode';\nimport { Range } from '../../common/core/range';\nimport { ViewEventHandler } from '../../common/viewModel/viewEventHandler';\nimport { TextAreaHandler } from '../controller/textAreaHandler';\nimport { PointerHandler } from '../controller/pointerHandler';\nimport { ViewController } from './viewController';\nimport { ViewEventDispatcher } from '../../common/view/viewEventDispatcher';\nimport { ContentViewOverlays, MarginViewOverlays } from './viewOverlays';\nimport { ViewContentWidgets } from '../viewParts/contentWidgets/contentWidgets';\nimport { CurrentLineHighlightOverlay } from '../viewParts/currentLineHighlight/currentLineHighlight';\nimport { CurrentLineMarginHighlightOverlay } from '../viewParts/currentLineMarginHighlight/currentLineMarginHighlight';\nimport { DecorationsOverlay } from '../viewParts/decorations/decorations';\nimport { GlyphMarginOverlay } from '../viewParts/glyphMargin/glyphMargin';\nimport { LineNumbersOverlay } from '../viewParts/lineNumbers/lineNumbers';\nimport { IndentGuidesOverlay } from '../viewParts/indentGuides/indentGuides';\nimport { ViewLines } from '../viewParts/lines/viewLines';\nimport { Margin } from '../viewParts/margin/margin';\nimport { LinesDecorationsOverlay } from '../viewParts/linesDecorations/linesDecorations';\nimport { MarginViewLineDecorationsOverlay } from '../viewParts/marginDecorations/marginDecorations';\nimport { ViewOverlayWidgets } from '../viewParts/overlayWidgets/overlayWidgets';\nimport { DecorationsOverviewRuler } from '../viewParts/overviewRuler/decorationsOverviewRuler';\nimport { OverviewRuler } from '../viewParts/overviewRuler/overviewRuler';\nimport { Rulers } from '../viewParts/rulers/rulers';\nimport { ScrollDecorationViewPart } from '../viewParts/scrollDecoration/scrollDecoration';\nimport { SelectionsOverlay } from '../viewParts/selections/selections';\nimport { ViewCursors } from '../viewParts/viewCursors/viewCursors';\nimport { ViewZones } from '../viewParts/viewZones/viewZones';\nimport { PartFingerprints } from './viewPart';\nimport { ViewContext } from '../../common/view/viewContext';\nimport { RenderingContext } from '../../common/view/renderingContext';\nimport { ViewOutgoingEvents } from './viewOutgoingEvents';\nimport { ViewportData } from '../../common/viewLayout/viewLinesViewportData';\nimport { EditorScrollbar } from '../viewParts/editorScrollbar/editorScrollbar';\nimport { Minimap } from '../viewParts/minimap/minimap';\nimport * as viewEvents from '../../common/view/viewEvents';\nimport { getThemeTypeSelector } from '../../../platform/theme/common/themeService';\nvar View = /** @class */ (function (_super) {\n __extends(View, _super);\n function View(commandDelegate, configuration, themeService, model, cursor, execCoreEditorCommandFunc) {\n var _this = _super.call(this) || this;\n _this._cursor = cursor;\n _this._renderAnimationFrame = null;\n _this.outgoingEvents = new ViewOutgoingEvents(model);\n var viewController = new ViewController(configuration, model, execCoreEditorCommandFunc, _this.outgoingEvents, commandDelegate);\n // The event dispatcher will always go through _renderOnce before dispatching any events\n _this.eventDispatcher = new ViewEventDispatcher(function (callback) { return _this._renderOnce(callback); });\n // Ensure the view is the first event handler in order to update the layout\n _this.eventDispatcher.addEventHandler(_this);\n // The view context is passed on to most classes (basically to reduce param. counts in ctors)\n _this._context = new ViewContext(configuration, themeService.getTheme(), model, _this.eventDispatcher);\n _this._register(themeService.onThemeChange(function (theme) {\n _this._context.theme = theme;\n _this.eventDispatcher.emit(new viewEvents.ViewThemeChangedEvent());\n _this.render(true, false);\n }));\n _this.viewParts = [];\n // Keyboard handler\n _this._textAreaHandler = new TextAreaHandler(_this._context, viewController, _this.createTextAreaHandlerHelper());\n _this.viewParts.push(_this._textAreaHandler);\n _this.createViewParts();\n _this._setLayout();\n // Pointer handler\n _this.pointerHandler = new PointerHandler(_this._context, viewController, _this.createPointerHandlerHelper());\n _this._register(model.addEventListener(function (events) {\n _this.eventDispatcher.emitMany(events);\n }));\n _this._register(_this._cursor.addEventListener(function (events) {\n _this.eventDispatcher.emitMany(events);\n }));\n return _this;\n }\n View.prototype.createViewParts = function () {\n // These two dom nodes must be constructed up front, since references are needed in the layout provider (scrolling & co.)\n this.linesContent = createFastDomNode(document.createElement('div'));\n this.linesContent.setClassName('lines-content' + ' monaco-editor-background');\n this.linesContent.setPosition('absolute');\n this.domNode = createFastDomNode(document.createElement('div'));\n this.domNode.setClassName(this.getEditorClassName());\n this.overflowGuardContainer = createFastDomNode(document.createElement('div'));\n PartFingerprints.write(this.overflowGuardContainer, 3 /* OverflowGuard */);\n this.overflowGuardContainer.setClassName('overflow-guard');\n this._scrollbar = new EditorScrollbar(this._context, this.linesContent, this.domNode, this.overflowGuardContainer);\n this.viewParts.push(this._scrollbar);\n // View Lines\n this.viewLines = new ViewLines(this._context, this.linesContent);\n // View Zones\n this.viewZones = new ViewZones(this._context);\n this.viewParts.push(this.viewZones);\n // Decorations overview ruler\n var decorationsOverviewRuler = new DecorationsOverviewRuler(this._context);\n this.viewParts.push(decorationsOverviewRuler);\n var scrollDecoration = new ScrollDecorationViewPart(this._context);\n this.viewParts.push(scrollDecoration);\n var contentViewOverlays = new ContentViewOverlays(this._context);\n this.viewParts.push(contentViewOverlays);\n contentViewOverlays.addDynamicOverlay(new CurrentLineHighlightOverlay(this._context));\n contentViewOverlays.addDynamicOverlay(new SelectionsOverlay(this._context));\n contentViewOverlays.addDynamicOverlay(new IndentGuidesOverlay(this._context));\n contentViewOverlays.addDynamicOverlay(new DecorationsOverlay(this._context));\n var marginViewOverlays = new MarginViewOverlays(this._context);\n this.viewParts.push(marginViewOverlays);\n marginViewOverlays.addDynamicOverlay(new CurrentLineMarginHighlightOverlay(this._context));\n marginViewOverlays.addDynamicOverlay(new GlyphMarginOverlay(this._context));\n marginViewOverlays.addDynamicOverlay(new MarginViewLineDecorationsOverlay(this._context));\n marginViewOverlays.addDynamicOverlay(new LinesDecorationsOverlay(this._context));\n marginViewOverlays.addDynamicOverlay(new LineNumbersOverlay(this._context));\n var margin = new Margin(this._context);\n margin.getDomNode().appendChild(this.viewZones.marginDomNode);\n margin.getDomNode().appendChild(marginViewOverlays.getDomNode());\n this.viewParts.push(margin);\n // Content widgets\n this.contentWidgets = new ViewContentWidgets(this._context, this.domNode);\n this.viewParts.push(this.contentWidgets);\n this.viewCursors = new ViewCursors(this._context);\n this.viewParts.push(this.viewCursors);\n // Overlay widgets\n this.overlayWidgets = new ViewOverlayWidgets(this._context);\n this.viewParts.push(this.overlayWidgets);\n var rulers = new Rulers(this._context);\n this.viewParts.push(rulers);\n var minimap = new Minimap(this._context);\n this.viewParts.push(minimap);\n // -------------- Wire dom nodes up\n if (decorationsOverviewRuler) {\n var overviewRulerData = this._scrollbar.getOverviewRulerLayoutInfo();\n overviewRulerData.parent.insertBefore(decorationsOverviewRuler.getDomNode(), overviewRulerData.insertBefore);\n }\n this.linesContent.appendChild(contentViewOverlays.getDomNode());\n this.linesContent.appendChild(rulers.domNode);\n this.linesContent.appendChild(this.viewZones.domNode);\n this.linesContent.appendChild(this.viewLines.getDomNode());\n this.linesContent.appendChild(this.contentWidgets.domNode);\n this.linesContent.appendChild(this.viewCursors.getDomNode());\n this.overflowGuardContainer.appendChild(margin.getDomNode());\n this.overflowGuardContainer.appendChild(this._scrollbar.getDomNode());\n this.overflowGuardContainer.appendChild(scrollDecoration.getDomNode());\n this.overflowGuardContainer.appendChild(this._textAreaHandler.textArea);\n this.overflowGuardContainer.appendChild(this._textAreaHandler.textAreaCover);\n this.overflowGuardContainer.appendChild(this.overlayWidgets.getDomNode());\n this.overflowGuardContainer.appendChild(minimap.getDomNode());\n this.domNode.appendChild(this.overflowGuardContainer);\n this.domNode.appendChild(this.contentWidgets.overflowingContentWidgetsDomNode);\n };\n View.prototype._flushAccumulatedAndRenderNow = function () {\n this._renderNow();\n };\n View.prototype.createPointerHandlerHelper = function () {\n var _this = this;\n return {\n viewDomNode: this.domNode.domNode,\n linesContentDomNode: this.linesContent.domNode,\n focusTextArea: function () {\n _this.focus();\n },\n getLastViewCursorsRenderData: function () {\n return _this.viewCursors.getLastRenderData() || [];\n },\n shouldSuppressMouseDownOnViewZone: function (viewZoneId) {\n return _this.viewZones.shouldSuppressMouseDownOnViewZone(viewZoneId);\n },\n shouldSuppressMouseDownOnWidget: function (widgetId) {\n return _this.contentWidgets.shouldSuppressMouseDownOnWidget(widgetId);\n },\n getPositionFromDOMInfo: function (spanNode, offset) {\n _this._flushAccumulatedAndRenderNow();\n return _this.viewLines.getPositionFromDOMInfo(spanNode, offset);\n },\n visibleRangeForPosition2: function (lineNumber, column) {\n _this._flushAccumulatedAndRenderNow();\n var visibleRanges = _this.viewLines.visibleRangesForRange2(new Range(lineNumber, column, lineNumber, column));\n if (!visibleRanges) {\n return null;\n }\n return visibleRanges[0];\n },\n getLineWidth: function (lineNumber) {\n _this._flushAccumulatedAndRenderNow();\n return _this.viewLines.getLineWidth(lineNumber);\n }\n };\n };\n View.prototype.createTextAreaHandlerHelper = function () {\n var _this = this;\n return {\n visibleRangeForPositionRelativeToEditor: function (lineNumber, column) {\n _this._flushAccumulatedAndRenderNow();\n var visibleRanges = _this.viewLines.visibleRangesForRange2(new Range(lineNumber, column, lineNumber, column));\n if (!visibleRanges) {\n return null;\n }\n return visibleRanges[0];\n }\n };\n };\n View.prototype._setLayout = function () {\n var layoutInfo = this._context.configuration.editor.layoutInfo;\n this.domNode.setWidth(layoutInfo.width);\n this.domNode.setHeight(layoutInfo.height);\n this.overflowGuardContainer.setWidth(layoutInfo.width);\n this.overflowGuardContainer.setHeight(layoutInfo.height);\n this.linesContent.setWidth(1000000);\n this.linesContent.setHeight(1000000);\n };\n View.prototype.getEditorClassName = function () {\n var focused = this._textAreaHandler.isFocused() ? ' focused' : '';\n return this._context.configuration.editor.editorClassName + ' ' + getThemeTypeSelector(this._context.theme.type) + focused;\n };\n // --- begin event handlers\n View.prototype.onConfigurationChanged = function (e) {\n if (e.editorClassName) {\n this.domNode.setClassName(this.getEditorClassName());\n }\n if (e.layoutInfo) {\n this._setLayout();\n }\n return false;\n };\n View.prototype.onFocusChanged = function (e) {\n this.domNode.setClassName(this.getEditorClassName());\n this._context.model.setHasFocus(e.isFocused);\n if (e.isFocused) {\n this.outgoingEvents.emitViewFocusGained();\n }\n else {\n this.outgoingEvents.emitViewFocusLost();\n }\n return false;\n };\n View.prototype.onScrollChanged = function (e) {\n this.outgoingEvents.emitScrollChanged(e);\n return false;\n };\n View.prototype.onThemeChanged = function (e) {\n this.domNode.setClassName(this.getEditorClassName());\n return false;\n };\n // --- end event handlers\n View.prototype.dispose = function () {\n if (this._renderAnimationFrame !== null) {\n this._renderAnimationFrame.dispose();\n this._renderAnimationFrame = null;\n }\n this.eventDispatcher.removeEventHandler(this);\n this.outgoingEvents.dispose();\n this.pointerHandler.dispose();\n this.viewLines.dispose();\n // Destroy view parts\n for (var i = 0, len = this.viewParts.length; i < len; i++) {\n this.viewParts[i].dispose();\n }\n this.viewParts = [];\n _super.prototype.dispose.call(this);\n };\n View.prototype._renderOnce = function (callback) {\n var r = safeInvokeNoArg(callback);\n this._scheduleRender();\n return r;\n };\n View.prototype._scheduleRender = function () {\n if (this._renderAnimationFrame === null) {\n this._renderAnimationFrame = dom.runAtThisOrScheduleAtNextAnimationFrame(this._onRenderScheduled.bind(this), 100);\n }\n };\n View.prototype._onRenderScheduled = function () {\n this._renderAnimationFrame = null;\n this._flushAccumulatedAndRenderNow();\n };\n View.prototype._renderNow = function () {\n var _this = this;\n safeInvokeNoArg(function () { return _this._actualRender(); });\n };\n View.prototype._getViewPartsToRender = function () {\n var result = [], resultLen = 0;\n for (var i = 0, len = this.viewParts.length; i < len; i++) {\n var viewPart = this.viewParts[i];\n if (viewPart.shouldRender()) {\n result[resultLen++] = viewPart;\n }\n }\n return result;\n };\n View.prototype._actualRender = function () {\n if (!dom.isInDOM(this.domNode.domNode)) {\n return;\n }\n var viewPartsToRender = this._getViewPartsToRender();\n if (!this.viewLines.shouldRender() && viewPartsToRender.length === 0) {\n // Nothing to render\n return;\n }\n var partialViewportData = this._context.viewLayout.getLinesViewportData();\n this._context.model.setViewport(partialViewportData.startLineNumber, partialViewportData.endLineNumber, partialViewportData.centeredLineNumber);\n var viewportData = new ViewportData(this._cursor.getViewSelections(), partialViewportData, this._context.viewLayout.getWhitespaceViewportData(), this._context.model);\n if (this.contentWidgets.shouldRender()) {\n // Give the content widgets a chance to set their max width before a possible synchronous layout\n this.contentWidgets.onBeforeRender(viewportData);\n }\n if (this.viewLines.shouldRender()) {\n this.viewLines.renderText(viewportData);\n this.viewLines.onDidRender();\n // Rendering of viewLines might cause scroll events to occur, so collect view parts to render again\n viewPartsToRender = this._getViewPartsToRender();\n }\n var renderingContext = new RenderingContext(this._context.viewLayout, viewportData, this.viewLines);\n // Render the rest of the parts\n for (var i = 0, len = viewPartsToRender.length; i < len; i++) {\n var viewPart = viewPartsToRender[i];\n viewPart.prepareRender(renderingContext);\n }\n for (var i = 0, len = viewPartsToRender.length; i < len; i++) {\n var viewPart = viewPartsToRender[i];\n viewPart.render(renderingContext);\n viewPart.onDidRender();\n }\n };\n // --- BEGIN CodeEditor helpers\n View.prototype.delegateVerticalScrollbarMouseDown = function (browserEvent) {\n this._scrollbar.delegateVerticalScrollbarMouseDown(browserEvent);\n };\n View.prototype.restoreState = function (scrollPosition) {\n this._context.viewLayout.setScrollPositionNow({ scrollTop: scrollPosition.scrollTop });\n this._renderNow();\n this.viewLines.updateLineWidths();\n this._context.viewLayout.setScrollPositionNow({ scrollLeft: scrollPosition.scrollLeft });\n };\n View.prototype.getOffsetForColumn = function (modelLineNumber, modelColumn) {\n var modelPosition = this._context.model.validateModelPosition({\n lineNumber: modelLineNumber,\n column: modelColumn\n });\n var viewPosition = this._context.model.coordinatesConverter.convertModelPositionToViewPosition(modelPosition);\n this._flushAccumulatedAndRenderNow();\n var visibleRanges = this.viewLines.visibleRangesForRange2(new Range(viewPosition.lineNumber, viewPosition.column, viewPosition.lineNumber, viewPosition.column));\n if (!visibleRanges) {\n return -1;\n }\n return visibleRanges[0].left;\n };\n View.prototype.getTargetAtClientPoint = function (clientX, clientY) {\n return this.pointerHandler.getTargetAtClientPoint(clientX, clientY);\n };\n View.prototype.getInternalEventBus = function () {\n return this.outgoingEvents;\n };\n View.prototype.createOverviewRuler = function (cssClassName) {\n return new OverviewRuler(this._context, cssClassName);\n };\n View.prototype.change = function (callback) {\n var _this = this;\n var zonesHaveChanged = false;\n this._renderOnce(function () {\n var changeAccessor = {\n addZone: function (zone) {\n zonesHaveChanged = true;\n return _this.viewZones.addZone(zone);\n },\n removeZone: function (id) {\n if (!id) {\n return;\n }\n zonesHaveChanged = _this.viewZones.removeZone(id) || zonesHaveChanged;\n },\n layoutZone: function (id) {\n if (!id) {\n return;\n }\n zonesHaveChanged = _this.viewZones.layoutZone(id) || zonesHaveChanged;\n }\n };\n safeInvoke1Arg(callback, changeAccessor);\n // Invalidate changeAccessor\n changeAccessor.addZone = null;\n changeAccessor.removeZone = null;\n if (zonesHaveChanged) {\n _this._context.viewLayout.onHeightMaybeChanged();\n _this._context.privateViewEventBus.emit(new viewEvents.ViewZonesChangedEvent());\n }\n });\n return zonesHaveChanged;\n };\n View.prototype.render = function (now, everything) {\n if (everything) {\n // Force everything to render...\n this.viewLines.forceShouldRender();\n for (var i = 0, len = this.viewParts.length; i < len; i++) {\n var viewPart = this.viewParts[i];\n viewPart.forceShouldRender();\n }\n }\n if (now) {\n this._flushAccumulatedAndRenderNow();\n }\n else {\n this._scheduleRender();\n }\n };\n View.prototype.focus = function () {\n this._textAreaHandler.focusTextArea();\n };\n View.prototype.isFocused = function () {\n return this._textAreaHandler.isFocused();\n };\n View.prototype.addContentWidget = function (widgetData) {\n this.contentWidgets.addWidget(widgetData.widget);\n this.layoutContentWidget(widgetData);\n this._scheduleRender();\n };\n View.prototype.layoutContentWidget = function (widgetData) {\n var newPosition = widgetData.position ? widgetData.position.position : null;\n var newPreference = widgetData.position ? widgetData.position.preference : null;\n this.contentWidgets.setWidgetPosition(widgetData.widget, newPosition, newPreference);\n this._scheduleRender();\n };\n View.prototype.removeContentWidget = function (widgetData) {\n this.contentWidgets.removeWidget(widgetData.widget);\n this._scheduleRender();\n };\n View.prototype.addOverlayWidget = function (widgetData) {\n this.overlayWidgets.addWidget(widgetData.widget);\n this.layoutOverlayWidget(widgetData);\n this._scheduleRender();\n };\n View.prototype.layoutOverlayWidget = function (widgetData) {\n var newPreference = widgetData.position ? widgetData.position.preference : null;\n var shouldRender = this.overlayWidgets.setWidgetPosition(widgetData.widget, newPreference);\n if (shouldRender) {\n this._scheduleRender();\n }\n };\n View.prototype.removeOverlayWidget = function (widgetData) {\n this.overlayWidgets.removeWidget(widgetData.widget);\n this._scheduleRender();\n };\n return View;\n}(ViewEventHandler));\nexport { View };\nfunction safeInvokeNoArg(func) {\n try {\n return func();\n }\n catch (e) {\n onUnexpectedError(e);\n }\n}\nfunction safeInvoke1Arg(func, arg1) {\n try {\n return func(arg1);\n }\n catch (e) {\n onUnexpectedError(e);\n }\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport { TPromise } from '../../base/common/winjs.base';\nvar InternalEditorAction = /** @class */ (function () {\n function InternalEditorAction(id, label, alias, precondition, run, contextKeyService) {\n this.id = id;\n this.label = label;\n this.alias = alias;\n this._precondition = precondition;\n this._run = run;\n this._contextKeyService = contextKeyService;\n }\n InternalEditorAction.prototype.isSupported = function () {\n return this._contextKeyService.contextMatchesRules(this._precondition);\n };\n InternalEditorAction.prototype.run = function () {\n if (!this.isSupported()) {\n return TPromise.as(void 0);\n }\n var r = this._run();\n return r ? r : TPromise.as(void 0);\n };\n return InternalEditorAction;\n}());\nexport { InternalEditorAction };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __param = (this && this.__param) || function (paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n};\nimport './media/editor.css';\nimport './media/tokens.css';\nimport * as nls from '../../../nls';\nimport * as dom from '../../../base/browser/dom';\nimport { onUnexpectedError } from '../../../base/common/errors';\nimport { Emitter } from '../../../base/common/event';\nimport { Disposable, dispose } from '../../../base/common/lifecycle';\nimport { TPromise } from '../../../base/common/winjs.base';\nimport { IInstantiationService } from '../../../platform/instantiation/common/instantiation';\nimport { ServiceCollection } from '../../../platform/instantiation/common/serviceCollection';\nimport { IContextKeyService } from '../../../platform/contextkey/common/contextkey';\nimport { Configuration } from '../config/configuration';\nimport { Cursor } from '../../common/controller/cursor';\nimport { CursorColumns } from '../../common/controller/cursorCommon';\nimport { Position } from '../../common/core/position';\nimport { Range } from '../../common/core/range';\nimport { Selection } from '../../common/core/selection';\nimport * as editorCommon from '../../common/editorCommon';\nimport { ViewModel } from '../../common/viewModel/viewModelImpl';\nimport { EditorContextKeys } from '../../common/editorContextKeys';\nimport * as modes from '../../common/modes';\nimport { Schemas } from '../../../base/common/network';\nimport { EndOfLinePreference } from '../../common/model';\nimport { INotificationService } from '../../../platform/notification/common/notification';\nimport { ICodeEditorService } from '../services/codeEditorService';\nimport { ICommandService } from '../../../platform/commands/common/commands';\nimport { IThemeService, registerThemingParticipant } from '../../../platform/theme/common/themeService';\nimport { View } from '../view/viewImpl';\nimport { EditorExtensionsRegistry } from '../editorExtensions';\nimport { InternalEditorAction } from '../../common/editorAction';\nimport { editorErrorForeground, editorErrorBorder, editorWarningForeground, editorWarningBorder, editorInfoBorder, editorInfoForeground, editorHintForeground, editorHintBorder, editorUnnecessaryCodeOpacity, editorUnnecessaryCodeBorder } from '../../common/view/editorColorRegistry';\nvar EDITOR_ID = 0;\nvar SHOW_UNUSED_ENABLED_CLASS = 'showUnused';\nvar CodeEditorWidget = /** @class */ (function (_super) {\n __extends(CodeEditorWidget, _super);\n function CodeEditorWidget(domElement, options, codeEditorWidgetOptions, instantiationService, codeEditorService, commandService, contextKeyService, themeService, notificationService) {\n var _this = _super.call(this) || this;\n //#region Eventing\n _this._onDidDispose = _this._register(new Emitter());\n _this.onDidDispose = _this._onDidDispose.event;\n _this._onDidChangeModelContent = _this._register(new Emitter());\n _this.onDidChangeModelContent = _this._onDidChangeModelContent.event;\n _this._onDidChangeModelLanguage = _this._register(new Emitter());\n _this.onDidChangeModelLanguage = _this._onDidChangeModelLanguage.event;\n _this._onDidChangeModelLanguageConfiguration = _this._register(new Emitter());\n _this.onDidChangeModelLanguageConfiguration = _this._onDidChangeModelLanguageConfiguration.event;\n _this._onDidChangeModelOptions = _this._register(new Emitter());\n _this.onDidChangeModelOptions = _this._onDidChangeModelOptions.event;\n _this._onDidChangeModelDecorations = _this._register(new Emitter());\n _this.onDidChangeModelDecorations = _this._onDidChangeModelDecorations.event;\n _this._onDidChangeConfiguration = _this._register(new Emitter());\n _this.onDidChangeConfiguration = _this._onDidChangeConfiguration.event;\n _this._onDidChangeModel = _this._register(new Emitter());\n _this.onDidChangeModel = _this._onDidChangeModel.event;\n _this._onDidChangeCursorPosition = _this._register(new Emitter());\n _this.onDidChangeCursorPosition = _this._onDidChangeCursorPosition.event;\n _this._onDidChangeCursorSelection = _this._register(new Emitter());\n _this.onDidChangeCursorSelection = _this._onDidChangeCursorSelection.event;\n _this._onDidAttemptReadOnlyEdit = _this._register(new Emitter());\n _this.onDidAttemptReadOnlyEdit = _this._onDidAttemptReadOnlyEdit.event;\n _this._onDidLayoutChange = _this._register(new Emitter());\n _this.onDidLayoutChange = _this._onDidLayoutChange.event;\n _this._editorTextFocus = _this._register(new BooleanEventEmitter());\n _this.onDidFocusEditorText = _this._editorTextFocus.onDidChangeToTrue;\n _this.onDidBlurEditorText = _this._editorTextFocus.onDidChangeToFalse;\n _this._editorWidgetFocus = _this._register(new BooleanEventEmitter());\n _this.onDidFocusEditorWidget = _this._editorWidgetFocus.onDidChangeToTrue;\n _this.onDidBlurEditorWidget = _this._editorWidgetFocus.onDidChangeToFalse;\n _this._onWillType = _this._register(new Emitter());\n _this.onWillType = _this._onWillType.event;\n _this._onDidType = _this._register(new Emitter());\n _this.onDidType = _this._onDidType.event;\n _this._onDidPaste = _this._register(new Emitter());\n _this.onDidPaste = _this._onDidPaste.event;\n _this._onMouseUp = _this._register(new Emitter());\n _this.onMouseUp = _this._onMouseUp.event;\n _this._onMouseDown = _this._register(new Emitter());\n _this.onMouseDown = _this._onMouseDown.event;\n _this._onMouseDrag = _this._register(new Emitter());\n _this.onMouseDrag = _this._onMouseDrag.event;\n _this._onMouseDrop = _this._register(new Emitter());\n _this.onMouseDrop = _this._onMouseDrop.event;\n _this._onContextMenu = _this._register(new Emitter());\n _this.onContextMenu = _this._onContextMenu.event;\n _this._onMouseMove = _this._register(new Emitter());\n _this.onMouseMove = _this._onMouseMove.event;\n _this._onMouseLeave = _this._register(new Emitter());\n _this.onMouseLeave = _this._onMouseLeave.event;\n _this._onKeyUp = _this._register(new Emitter());\n _this.onKeyUp = _this._onKeyUp.event;\n _this._onKeyDown = _this._register(new Emitter());\n _this.onKeyDown = _this._onKeyDown.event;\n _this._onDidScrollChange = _this._register(new Emitter());\n _this.onDidScrollChange = _this._onDidScrollChange.event;\n _this._onDidChangeViewZones = _this._register(new Emitter());\n _this.onDidChangeViewZones = _this._onDidChangeViewZones.event;\n _this.domElement = domElement;\n _this.id = (++EDITOR_ID);\n _this._decorationTypeKeysToIds = {};\n _this._decorationTypeSubtypes = {};\n _this.isSimpleWidget = codeEditorWidgetOptions.isSimpleWidget || false;\n _this._telemetryData = codeEditorWidgetOptions.telemetryData || null;\n options = options || {};\n _this._configuration = _this._register(_this._createConfiguration(options));\n _this._register(_this._configuration.onDidChange(function (e) {\n _this._onDidChangeConfiguration.fire(e);\n if (e.layoutInfo) {\n _this._onDidLayoutChange.fire(_this._configuration.editor.layoutInfo);\n }\n if (_this._configuration.editor.showUnused) {\n _this.domElement.classList.add(SHOW_UNUSED_ENABLED_CLASS);\n }\n else {\n _this.domElement.classList.remove(SHOW_UNUSED_ENABLED_CLASS);\n }\n }));\n _this._contextKeyService = _this._register(contextKeyService.createScoped(_this.domElement));\n _this._notificationService = notificationService;\n _this._codeEditorService = codeEditorService;\n _this._commandService = commandService;\n _this._themeService = themeService;\n _this._register(new EditorContextKeysManager(_this, _this._contextKeyService));\n _this._register(new EditorModeContext(_this, _this._contextKeyService));\n _this._instantiationService = instantiationService.createChild(new ServiceCollection([IContextKeyService, _this._contextKeyService]));\n _this._attachModel(null);\n _this._contributions = {};\n _this._actions = {};\n _this._focusTracker = new CodeEditorWidgetFocusTracker(domElement);\n _this._focusTracker.onChange(function () {\n _this._editorWidgetFocus.setValue(_this._focusTracker.hasFocus());\n });\n _this.contentWidgets = {};\n _this.overlayWidgets = {};\n var contributions = codeEditorWidgetOptions.contributions;\n if (!Array.isArray(contributions)) {\n contributions = EditorExtensionsRegistry.getEditorContributions();\n }\n for (var i = 0, len = contributions.length; i < len; i++) {\n var ctor = contributions[i];\n try {\n var contribution = _this._instantiationService.createInstance(ctor, _this);\n _this._contributions[contribution.getId()] = contribution;\n }\n catch (err) {\n onUnexpectedError(err);\n }\n }\n EditorExtensionsRegistry.getEditorActions().forEach(function (action) {\n var internalAction = new InternalEditorAction(action.id, action.label, action.alias, action.precondition, function () {\n return _this._instantiationService.invokeFunction(function (accessor) {\n return action.runEditorCommand(accessor, _this, null);\n });\n }, _this._contextKeyService);\n _this._actions[internalAction.id] = internalAction;\n });\n _this._codeEditorService.addCodeEditor(_this);\n return _this;\n }\n CodeEditorWidget.prototype._createConfiguration = function (options) {\n return new Configuration(options, this.domElement);\n };\n CodeEditorWidget.prototype.getId = function () {\n return this.getEditorType() + ':' + this.id;\n };\n CodeEditorWidget.prototype.getEditorType = function () {\n return editorCommon.EditorType.ICodeEditor;\n };\n CodeEditorWidget.prototype.dispose = function () {\n this._codeEditorService.removeCodeEditor(this);\n this.contentWidgets = {};\n this.overlayWidgets = {};\n this._focusTracker.dispose();\n var keys = Object.keys(this._contributions);\n for (var i = 0, len = keys.length; i < len; i++) {\n var contributionId = keys[i];\n this._contributions[contributionId].dispose();\n }\n this._contributions = {};\n // editor actions don't need to be disposed\n this._actions = {};\n this._removeDecorationTypes();\n this._postDetachModelCleanup(this._detachModel());\n this._onDidDispose.fire();\n _super.prototype.dispose.call(this);\n };\n CodeEditorWidget.prototype.invokeWithinContext = function (fn) {\n return this._instantiationService.invokeFunction(fn);\n };\n CodeEditorWidget.prototype.updateOptions = function (newOptions) {\n this._configuration.updateOptions(newOptions);\n };\n CodeEditorWidget.prototype.getConfiguration = function () {\n return this._configuration.editor;\n };\n CodeEditorWidget.prototype.getRawConfiguration = function () {\n return this._configuration.getRawOptions();\n };\n CodeEditorWidget.prototype.getValue = function (options) {\n if (options === void 0) { options = null; }\n if (this.model) {\n var preserveBOM = (options && options.preserveBOM) ? true : false;\n var eolPreference = EndOfLinePreference.TextDefined;\n if (options && options.lineEnding && options.lineEnding === '\\n') {\n eolPreference = EndOfLinePreference.LF;\n }\n else if (options && options.lineEnding && options.lineEnding === '\\r\\n') {\n eolPreference = EndOfLinePreference.CRLF;\n }\n return this.model.getValue(eolPreference, preserveBOM);\n }\n return '';\n };\n CodeEditorWidget.prototype.setValue = function (newValue) {\n if (this.model) {\n this.model.setValue(newValue);\n }\n };\n CodeEditorWidget.prototype.getModel = function () {\n return this.model;\n };\n CodeEditorWidget.prototype.setModel = function (model) {\n if (model === void 0) { model = null; }\n if (this.model === model) {\n // Current model is the new model\n return;\n }\n var detachedModel = this._detachModel();\n this._attachModel(model);\n var e = {\n oldModelUrl: detachedModel ? detachedModel.uri : null,\n newModelUrl: model ? model.uri : null\n };\n this._removeDecorationTypes();\n this._onDidChangeModel.fire(e);\n this._postDetachModelCleanup(detachedModel);\n };\n CodeEditorWidget.prototype._removeDecorationTypes = function () {\n this._decorationTypeKeysToIds = {};\n if (this._decorationTypeSubtypes) {\n for (var decorationType in this._decorationTypeSubtypes) {\n var subTypes = this._decorationTypeSubtypes[decorationType];\n for (var subType in subTypes) {\n this._removeDecorationType(decorationType + '-' + subType);\n }\n }\n this._decorationTypeSubtypes = {};\n }\n };\n CodeEditorWidget.prototype.getVisibleRanges = function () {\n if (!this.hasView) {\n return [];\n }\n return this.viewModel.getVisibleRanges();\n };\n CodeEditorWidget.prototype.getWhitespaces = function () {\n if (!this.hasView) {\n return [];\n }\n return this.viewModel.viewLayout.getWhitespaces();\n };\n CodeEditorWidget.prototype._getVerticalOffsetForPosition = function (modelLineNumber, modelColumn) {\n var modelPosition = this.model.validatePosition({\n lineNumber: modelLineNumber,\n column: modelColumn\n });\n var viewPosition = this.viewModel.coordinatesConverter.convertModelPositionToViewPosition(modelPosition);\n return this.viewModel.viewLayout.getVerticalOffsetForLineNumber(viewPosition.lineNumber);\n };\n CodeEditorWidget.prototype.getTopForLineNumber = function (lineNumber) {\n if (!this.hasView) {\n return -1;\n }\n return this._getVerticalOffsetForPosition(lineNumber, 1);\n };\n CodeEditorWidget.prototype.getTopForPosition = function (lineNumber, column) {\n if (!this.hasView) {\n return -1;\n }\n return this._getVerticalOffsetForPosition(lineNumber, column);\n };\n CodeEditorWidget.prototype.setHiddenAreas = function (ranges) {\n if (this.viewModel) {\n this.viewModel.setHiddenAreas(ranges.map(function (r) { return Range.lift(r); }));\n }\n };\n CodeEditorWidget.prototype.getVisibleColumnFromPosition = function (rawPosition) {\n if (!this.model) {\n return rawPosition.column;\n }\n var position = this.model.validatePosition(rawPosition);\n var tabSize = this.model.getOptions().tabSize;\n return CursorColumns.visibleColumnFromColumn(this.model.getLineContent(position.lineNumber), position.column, tabSize) + 1;\n };\n CodeEditorWidget.prototype.getPosition = function () {\n if (!this.cursor) {\n return null;\n }\n return this.cursor.getPosition().clone();\n };\n CodeEditorWidget.prototype.setPosition = function (position) {\n if (!this.cursor) {\n return;\n }\n if (!Position.isIPosition(position)) {\n throw new Error('Invalid arguments');\n }\n this.cursor.setSelections('api', [{\n selectionStartLineNumber: position.lineNumber,\n selectionStartColumn: position.column,\n positionLineNumber: position.lineNumber,\n positionColumn: position.column\n }]);\n };\n CodeEditorWidget.prototype._sendRevealRange = function (modelRange, verticalType, revealHorizontal, scrollType) {\n if (!this.model || !this.cursor) {\n return;\n }\n if (!Range.isIRange(modelRange)) {\n throw new Error('Invalid arguments');\n }\n var validatedModelRange = this.model.validateRange(modelRange);\n var viewRange = this.viewModel.coordinatesConverter.convertModelRangeToViewRange(validatedModelRange);\n this.cursor.emitCursorRevealRange(viewRange, verticalType, revealHorizontal, scrollType);\n };\n CodeEditorWidget.prototype.revealLine = function (lineNumber, scrollType) {\n if (scrollType === void 0) { scrollType = 0 /* Smooth */; }\n this._revealLine(lineNumber, 0 /* Simple */, scrollType);\n };\n CodeEditorWidget.prototype.revealLineInCenter = function (lineNumber, scrollType) {\n if (scrollType === void 0) { scrollType = 0 /* Smooth */; }\n this._revealLine(lineNumber, 1 /* Center */, scrollType);\n };\n CodeEditorWidget.prototype.revealLineInCenterIfOutsideViewport = function (lineNumber, scrollType) {\n if (scrollType === void 0) { scrollType = 0 /* Smooth */; }\n this._revealLine(lineNumber, 2 /* CenterIfOutsideViewport */, scrollType);\n };\n CodeEditorWidget.prototype._revealLine = function (lineNumber, revealType, scrollType) {\n if (typeof lineNumber !== 'number') {\n throw new Error('Invalid arguments');\n }\n this._sendRevealRange(new Range(lineNumber, 1, lineNumber, 1), revealType, false, scrollType);\n };\n CodeEditorWidget.prototype.revealPosition = function (position, scrollType) {\n if (scrollType === void 0) { scrollType = 0 /* Smooth */; }\n this._revealPosition(position, 0 /* Simple */, true, scrollType);\n };\n CodeEditorWidget.prototype.revealPositionInCenter = function (position, scrollType) {\n if (scrollType === void 0) { scrollType = 0 /* Smooth */; }\n this._revealPosition(position, 1 /* Center */, true, scrollType);\n };\n CodeEditorWidget.prototype.revealPositionInCenterIfOutsideViewport = function (position, scrollType) {\n if (scrollType === void 0) { scrollType = 0 /* Smooth */; }\n this._revealPosition(position, 2 /* CenterIfOutsideViewport */, true, scrollType);\n };\n CodeEditorWidget.prototype._revealPosition = function (position, verticalType, revealHorizontal, scrollType) {\n if (!Position.isIPosition(position)) {\n throw new Error('Invalid arguments');\n }\n this._sendRevealRange(new Range(position.lineNumber, position.column, position.lineNumber, position.column), verticalType, revealHorizontal, scrollType);\n };\n CodeEditorWidget.prototype.getSelection = function () {\n if (!this.cursor) {\n return null;\n }\n return this.cursor.getSelection().clone();\n };\n CodeEditorWidget.prototype.getSelections = function () {\n if (!this.cursor) {\n return null;\n }\n var selections = this.cursor.getSelections();\n var result = [];\n for (var i = 0, len = selections.length; i < len; i++) {\n result[i] = selections[i].clone();\n }\n return result;\n };\n CodeEditorWidget.prototype.setSelection = function (something) {\n var isSelection = Selection.isISelection(something);\n var isRange = Range.isIRange(something);\n if (!isSelection && !isRange) {\n throw new Error('Invalid arguments');\n }\n if (isSelection) {\n this._setSelectionImpl(something);\n }\n else if (isRange) {\n // act as if it was an IRange\n var selection = {\n selectionStartLineNumber: something.startLineNumber,\n selectionStartColumn: something.startColumn,\n positionLineNumber: something.endLineNumber,\n positionColumn: something.endColumn\n };\n this._setSelectionImpl(selection);\n }\n };\n CodeEditorWidget.prototype._setSelectionImpl = function (sel) {\n if (!this.cursor) {\n return;\n }\n var selection = new Selection(sel.selectionStartLineNumber, sel.selectionStartColumn, sel.positionLineNumber, sel.positionColumn);\n this.cursor.setSelections('api', [selection]);\n };\n CodeEditorWidget.prototype.revealLines = function (startLineNumber, endLineNumber, scrollType) {\n if (scrollType === void 0) { scrollType = 0 /* Smooth */; }\n this._revealLines(startLineNumber, endLineNumber, 0 /* Simple */, scrollType);\n };\n CodeEditorWidget.prototype.revealLinesInCenter = function (startLineNumber, endLineNumber, scrollType) {\n if (scrollType === void 0) { scrollType = 0 /* Smooth */; }\n this._revealLines(startLineNumber, endLineNumber, 1 /* Center */, scrollType);\n };\n CodeEditorWidget.prototype.revealLinesInCenterIfOutsideViewport = function (startLineNumber, endLineNumber, scrollType) {\n if (scrollType === void 0) { scrollType = 0 /* Smooth */; }\n this._revealLines(startLineNumber, endLineNumber, 2 /* CenterIfOutsideViewport */, scrollType);\n };\n CodeEditorWidget.prototype._revealLines = function (startLineNumber, endLineNumber, verticalType, scrollType) {\n if (typeof startLineNumber !== 'number' || typeof endLineNumber !== 'number') {\n throw new Error('Invalid arguments');\n }\n this._sendRevealRange(new Range(startLineNumber, 1, endLineNumber, 1), verticalType, false, scrollType);\n };\n CodeEditorWidget.prototype.revealRange = function (range, scrollType, revealVerticalInCenter, revealHorizontal) {\n if (scrollType === void 0) { scrollType = 0 /* Smooth */; }\n if (revealVerticalInCenter === void 0) { revealVerticalInCenter = false; }\n if (revealHorizontal === void 0) { revealHorizontal = true; }\n this._revealRange(range, revealVerticalInCenter ? 1 /* Center */ : 0 /* Simple */, revealHorizontal, scrollType);\n };\n CodeEditorWidget.prototype.revealRangeInCenter = function (range, scrollType) {\n if (scrollType === void 0) { scrollType = 0 /* Smooth */; }\n this._revealRange(range, 1 /* Center */, true, scrollType);\n };\n CodeEditorWidget.prototype.revealRangeInCenterIfOutsideViewport = function (range, scrollType) {\n if (scrollType === void 0) { scrollType = 0 /* Smooth */; }\n this._revealRange(range, 2 /* CenterIfOutsideViewport */, true, scrollType);\n };\n CodeEditorWidget.prototype.revealRangeAtTop = function (range, scrollType) {\n if (scrollType === void 0) { scrollType = 0 /* Smooth */; }\n this._revealRange(range, 3 /* Top */, true, scrollType);\n };\n CodeEditorWidget.prototype._revealRange = function (range, verticalType, revealHorizontal, scrollType) {\n if (!Range.isIRange(range)) {\n throw new Error('Invalid arguments');\n }\n this._sendRevealRange(Range.lift(range), verticalType, revealHorizontal, scrollType);\n };\n CodeEditorWidget.prototype.setSelections = function (ranges) {\n if (!this.cursor) {\n return;\n }\n if (!ranges || ranges.length === 0) {\n throw new Error('Invalid arguments');\n }\n for (var i = 0, len = ranges.length; i < len; i++) {\n if (!Selection.isISelection(ranges[i])) {\n throw new Error('Invalid arguments');\n }\n }\n this.cursor.setSelections('api', ranges);\n };\n CodeEditorWidget.prototype.getScrollWidth = function () {\n if (!this.hasView) {\n return -1;\n }\n return this.viewModel.viewLayout.getScrollWidth();\n };\n CodeEditorWidget.prototype.getScrollLeft = function () {\n if (!this.hasView) {\n return -1;\n }\n return this.viewModel.viewLayout.getCurrentScrollLeft();\n };\n CodeEditorWidget.prototype.getScrollHeight = function () {\n if (!this.hasView) {\n return -1;\n }\n return this.viewModel.viewLayout.getScrollHeight();\n };\n CodeEditorWidget.prototype.getScrollTop = function () {\n if (!this.hasView) {\n return -1;\n }\n return this.viewModel.viewLayout.getCurrentScrollTop();\n };\n CodeEditorWidget.prototype.setScrollLeft = function (newScrollLeft) {\n if (!this.hasView) {\n return;\n }\n if (typeof newScrollLeft !== 'number') {\n throw new Error('Invalid arguments');\n }\n this.viewModel.viewLayout.setScrollPositionNow({\n scrollLeft: newScrollLeft\n });\n };\n CodeEditorWidget.prototype.setScrollTop = function (newScrollTop) {\n if (!this.hasView) {\n return;\n }\n if (typeof newScrollTop !== 'number') {\n throw new Error('Invalid arguments');\n }\n this.viewModel.viewLayout.setScrollPositionNow({\n scrollTop: newScrollTop\n });\n };\n CodeEditorWidget.prototype.setScrollPosition = function (position) {\n if (!this.hasView) {\n return;\n }\n this.viewModel.viewLayout.setScrollPositionNow(position);\n };\n CodeEditorWidget.prototype.saveViewState = function () {\n if (!this.cursor || !this.hasView) {\n return null;\n }\n var contributionsState = {};\n var keys = Object.keys(this._contributions);\n for (var i = 0, len = keys.length; i < len; i++) {\n var id = keys[i];\n var contribution = this._contributions[id];\n if (typeof contribution.saveViewState === 'function') {\n contributionsState[id] = contribution.saveViewState();\n }\n }\n var cursorState = this.cursor.saveState();\n var viewState = this.viewModel.saveState();\n return {\n cursorState: cursorState,\n viewState: viewState,\n contributionsState: contributionsState\n };\n };\n CodeEditorWidget.prototype.restoreViewState = function (s) {\n if (!this.cursor || !this.hasView) {\n return;\n }\n if (s && s.cursorState && s.viewState) {\n var codeEditorState = s;\n var cursorState = codeEditorState.cursorState;\n if (Array.isArray(cursorState)) {\n this.cursor.restoreState(cursorState);\n }\n else {\n // Backwards compatibility\n this.cursor.restoreState([cursorState]);\n }\n var contributionsState = s.contributionsState || {};\n var keys = Object.keys(this._contributions);\n for (var i = 0, len = keys.length; i < len; i++) {\n var id = keys[i];\n var contribution = this._contributions[id];\n if (typeof contribution.restoreViewState === 'function') {\n contribution.restoreViewState(contributionsState[id]);\n }\n }\n var reducedState = this.viewModel.reduceRestoreState(s.viewState);\n var linesViewportData = this.viewModel.viewLayout.getLinesViewportDataAtScrollTop(reducedState.scrollTop);\n var startPosition = this.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new Position(linesViewportData.startLineNumber, 1));\n var endPosition = this.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new Position(linesViewportData.endLineNumber, 1));\n this.model.tokenizeViewport(startPosition.lineNumber, endPosition.lineNumber);\n this._view.restoreState(reducedState);\n }\n };\n CodeEditorWidget.prototype.getContribution = function (id) {\n return (this._contributions[id] || null);\n };\n CodeEditorWidget.prototype.getActions = function () {\n var result = [];\n var keys = Object.keys(this._actions);\n for (var i = 0, len = keys.length; i < len; i++) {\n var id = keys[i];\n result.push(this._actions[id]);\n }\n return result;\n };\n CodeEditorWidget.prototype.getSupportedActions = function () {\n var result = this.getActions();\n result = result.filter(function (action) { return action.isSupported(); });\n return result;\n };\n CodeEditorWidget.prototype.getAction = function (id) {\n return this._actions[id] || null;\n };\n CodeEditorWidget.prototype.trigger = function (source, handlerId, payload) {\n payload = payload || {};\n // Special case for typing\n if (handlerId === editorCommon.Handler.Type) {\n if (!this.cursor || typeof payload.text !== 'string' || payload.text.length === 0) {\n // nothing to do\n return;\n }\n if (source === 'keyboard') {\n this._onWillType.fire(payload.text);\n }\n this.cursor.trigger(source, handlerId, payload);\n if (source === 'keyboard') {\n this._onDidType.fire(payload.text);\n }\n return;\n }\n // Special case for pasting\n if (handlerId === editorCommon.Handler.Paste) {\n if (!this.cursor || typeof payload.text !== 'string' || payload.text.length === 0) {\n // nothing to do\n return;\n }\n var startPosition = this.cursor.getSelection().getStartPosition();\n this.cursor.trigger(source, handlerId, payload);\n var endPosition = this.cursor.getSelection().getStartPosition();\n if (source === 'keyboard') {\n this._onDidPaste.fire(new Range(startPosition.lineNumber, startPosition.column, endPosition.lineNumber, endPosition.column));\n }\n return;\n }\n var action = this.getAction(handlerId);\n if (action) {\n TPromise.as(action.run()).then(null, onUnexpectedError);\n return;\n }\n if (!this.cursor) {\n return;\n }\n if (this._triggerEditorCommand(source, handlerId, payload)) {\n return;\n }\n this.cursor.trigger(source, handlerId, payload);\n };\n CodeEditorWidget.prototype._triggerEditorCommand = function (source, handlerId, payload) {\n var command = EditorExtensionsRegistry.getEditorCommand(handlerId);\n if (command) {\n payload = payload || {};\n payload.source = source;\n TPromise.as(command.runEditorCommand(null, this, payload)).done(null, onUnexpectedError);\n return true;\n }\n return false;\n };\n CodeEditorWidget.prototype._getCursors = function () {\n return this.cursor;\n };\n CodeEditorWidget.prototype._getCursorConfiguration = function () {\n return this.cursor.context.config;\n };\n CodeEditorWidget.prototype.pushUndoStop = function () {\n if (!this.model) {\n return false;\n }\n if (this._configuration.editor.readOnly) {\n // read only editor => sorry!\n return false;\n }\n this.model.pushStackElement();\n return true;\n };\n CodeEditorWidget.prototype.executeEdits = function (source, edits, endCursorState) {\n if (!this.cursor) {\n // no view, no cursor\n return false;\n }\n if (this._configuration.editor.readOnly) {\n // read only editor => sorry!\n return false;\n }\n this.model.pushEditOperations(this.cursor.getSelections(), edits, function () {\n return endCursorState ? endCursorState : null;\n });\n if (endCursorState) {\n this.cursor.setSelections(source, endCursorState);\n }\n return true;\n };\n CodeEditorWidget.prototype.executeCommand = function (source, command) {\n if (!this.cursor) {\n return;\n }\n this.cursor.trigger(source, editorCommon.Handler.ExecuteCommand, command);\n };\n CodeEditorWidget.prototype.executeCommands = function (source, commands) {\n if (!this.cursor) {\n return;\n }\n this.cursor.trigger(source, editorCommon.Handler.ExecuteCommands, commands);\n };\n CodeEditorWidget.prototype.changeDecorations = function (callback) {\n if (!this.model) {\n //\t\t\tconsole.warn('Cannot change decorations on editor that is not attached to a model');\n // callback will not be called\n return null;\n }\n return this.model.changeDecorations(callback, this.id);\n };\n CodeEditorWidget.prototype.getLineDecorations = function (lineNumber) {\n if (!this.model) {\n return null;\n }\n return this.model.getLineDecorations(lineNumber, this.id, this._configuration.editor.readOnly);\n };\n CodeEditorWidget.prototype.deltaDecorations = function (oldDecorations, newDecorations) {\n if (!this.model) {\n return [];\n }\n if (oldDecorations.length === 0 && newDecorations.length === 0) {\n return oldDecorations;\n }\n return this.model.deltaDecorations(oldDecorations, newDecorations, this.id);\n };\n CodeEditorWidget.prototype.removeDecorations = function (decorationTypeKey) {\n // remove decorations for type and sub type\n var oldDecorationsIds = this._decorationTypeKeysToIds[decorationTypeKey];\n if (oldDecorationsIds) {\n this.deltaDecorations(oldDecorationsIds, []);\n }\n if (this._decorationTypeKeysToIds.hasOwnProperty(decorationTypeKey)) {\n delete this._decorationTypeKeysToIds[decorationTypeKey];\n }\n if (this._decorationTypeSubtypes.hasOwnProperty(decorationTypeKey)) {\n delete this._decorationTypeSubtypes[decorationTypeKey];\n }\n };\n CodeEditorWidget.prototype.getLayoutInfo = function () {\n return this._configuration.editor.layoutInfo;\n };\n CodeEditorWidget.prototype.createOverviewRuler = function (cssClassName) {\n return this._view.createOverviewRuler(cssClassName);\n };\n CodeEditorWidget.prototype.getDomNode = function () {\n if (!this.hasView) {\n return null;\n }\n return this._view.domNode.domNode;\n };\n CodeEditorWidget.prototype.delegateVerticalScrollbarMouseDown = function (browserEvent) {\n if (!this.hasView) {\n return;\n }\n this._view.delegateVerticalScrollbarMouseDown(browserEvent);\n };\n CodeEditorWidget.prototype.layout = function (dimension) {\n this._configuration.observeReferenceElement(dimension);\n this.render();\n };\n CodeEditorWidget.prototype.focus = function () {\n if (!this.hasView) {\n return;\n }\n this._view.focus();\n };\n CodeEditorWidget.prototype.hasTextFocus = function () {\n return this.hasView && this._view.isFocused();\n };\n CodeEditorWidget.prototype.hasWidgetFocus = function () {\n return this._focusTracker && this._focusTracker.hasFocus();\n };\n CodeEditorWidget.prototype.addContentWidget = function (widget) {\n var widgetData = {\n widget: widget,\n position: widget.getPosition()\n };\n if (this.contentWidgets.hasOwnProperty(widget.getId())) {\n console.warn('Overwriting a content widget with the same id.');\n }\n this.contentWidgets[widget.getId()] = widgetData;\n if (this.hasView) {\n this._view.addContentWidget(widgetData);\n }\n };\n CodeEditorWidget.prototype.layoutContentWidget = function (widget) {\n var widgetId = widget.getId();\n if (this.contentWidgets.hasOwnProperty(widgetId)) {\n var widgetData = this.contentWidgets[widgetId];\n widgetData.position = widget.getPosition();\n if (this.hasView) {\n this._view.layoutContentWidget(widgetData);\n }\n }\n };\n CodeEditorWidget.prototype.removeContentWidget = function (widget) {\n var widgetId = widget.getId();\n if (this.contentWidgets.hasOwnProperty(widgetId)) {\n var widgetData = this.contentWidgets[widgetId];\n delete this.contentWidgets[widgetId];\n if (this.hasView) {\n this._view.removeContentWidget(widgetData);\n }\n }\n };\n CodeEditorWidget.prototype.addOverlayWidget = function (widget) {\n var widgetData = {\n widget: widget,\n position: widget.getPosition()\n };\n if (this.overlayWidgets.hasOwnProperty(widget.getId())) {\n console.warn('Overwriting an overlay widget with the same id.');\n }\n this.overlayWidgets[widget.getId()] = widgetData;\n if (this.hasView) {\n this._view.addOverlayWidget(widgetData);\n }\n };\n CodeEditorWidget.prototype.layoutOverlayWidget = function (widget) {\n var widgetId = widget.getId();\n if (this.overlayWidgets.hasOwnProperty(widgetId)) {\n var widgetData = this.overlayWidgets[widgetId];\n widgetData.position = widget.getPosition();\n if (this.hasView) {\n this._view.layoutOverlayWidget(widgetData);\n }\n }\n };\n CodeEditorWidget.prototype.removeOverlayWidget = function (widget) {\n var widgetId = widget.getId();\n if (this.overlayWidgets.hasOwnProperty(widgetId)) {\n var widgetData = this.overlayWidgets[widgetId];\n delete this.overlayWidgets[widgetId];\n if (this.hasView) {\n this._view.removeOverlayWidget(widgetData);\n }\n }\n };\n CodeEditorWidget.prototype.changeViewZones = function (callback) {\n if (!this.hasView) {\n return;\n }\n var hasChanges = this._view.change(callback);\n if (hasChanges) {\n this._onDidChangeViewZones.fire();\n }\n };\n CodeEditorWidget.prototype.getTargetAtClientPoint = function (clientX, clientY) {\n if (!this.hasView) {\n return null;\n }\n return this._view.getTargetAtClientPoint(clientX, clientY);\n };\n CodeEditorWidget.prototype.getScrolledVisiblePosition = function (rawPosition) {\n if (!this.hasView) {\n return null;\n }\n var position = this.model.validatePosition(rawPosition);\n var layoutInfo = this._configuration.editor.layoutInfo;\n var top = this._getVerticalOffsetForPosition(position.lineNumber, position.column) - this.getScrollTop();\n var left = this._view.getOffsetForColumn(position.lineNumber, position.column) + layoutInfo.glyphMarginWidth + layoutInfo.lineNumbersWidth + layoutInfo.decorationsWidth - this.getScrollLeft();\n return {\n top: top,\n left: left,\n height: this._configuration.editor.lineHeight\n };\n };\n CodeEditorWidget.prototype.getOffsetForColumn = function (lineNumber, column) {\n if (!this.hasView) {\n return -1;\n }\n return this._view.getOffsetForColumn(lineNumber, column);\n };\n CodeEditorWidget.prototype.render = function () {\n if (!this.hasView) {\n return;\n }\n this._view.render(true, false);\n };\n CodeEditorWidget.prototype.applyFontInfo = function (target) {\n Configuration.applyFontInfoSlow(target, this._configuration.editor.fontInfo);\n };\n CodeEditorWidget.prototype._attachModel = function (model) {\n var _this = this;\n this._view = null;\n this.model = model ? model : null;\n this.listenersToRemove = [];\n this.viewModel = null;\n this.cursor = null;\n if (this.model) {\n this.domElement.setAttribute('data-mode-id', this.model.getLanguageIdentifier().language);\n this._configuration.setIsDominatedByLongLines(this.model.isDominatedByLongLines());\n this._configuration.setMaxLineNumber(this.model.getLineCount());\n this.model.onBeforeAttached();\n this.viewModel = new ViewModel(this.id, this._configuration, this.model, function (callback) { return dom.scheduleAtNextAnimationFrame(callback); });\n this.listenersToRemove.push(this.model.onDidChangeDecorations(function (e) { return _this._onDidChangeModelDecorations.fire(e); }));\n this.listenersToRemove.push(this.model.onDidChangeLanguage(function (e) {\n if (!_this.model) {\n return;\n }\n _this.domElement.setAttribute('data-mode-id', _this.model.getLanguageIdentifier().language);\n _this._onDidChangeModelLanguage.fire(e);\n }));\n this.listenersToRemove.push(this.model.onDidChangeLanguageConfiguration(function (e) { return _this._onDidChangeModelLanguageConfiguration.fire(e); }));\n this.listenersToRemove.push(this.model.onDidChangeContent(function (e) { return _this._onDidChangeModelContent.fire(e); }));\n this.listenersToRemove.push(this.model.onDidChangeOptions(function (e) { return _this._onDidChangeModelOptions.fire(e); }));\n // Someone might destroy the model from under the editor, so prevent any exceptions by setting a null model\n this.listenersToRemove.push(this.model.onWillDispose(function () { return _this.setModel(null); }));\n this.cursor = new Cursor(this._configuration, this.model, this.viewModel);\n this._createView();\n this.listenersToRemove.push(this.cursor.onDidReachMaxCursorCount(function () {\n _this._notificationService.warn(nls.localize('cursors.maximum', \"The number of cursors has been limited to {0}.\", Cursor.MAX_CURSOR_COUNT));\n }));\n this.listenersToRemove.push(this.cursor.onDidAttemptReadOnlyEdit(function () {\n _this._onDidAttemptReadOnlyEdit.fire(void 0);\n }));\n this.listenersToRemove.push(this.cursor.onDidChange(function (e) {\n var positions = [];\n for (var i = 0, len = e.selections.length; i < len; i++) {\n positions[i] = e.selections[i].getPosition();\n }\n var e1 = {\n position: positions[0],\n secondaryPositions: positions.slice(1),\n reason: e.reason,\n source: e.source\n };\n _this._onDidChangeCursorPosition.fire(e1);\n var e2 = {\n selection: e.selections[0],\n secondarySelections: e.selections.slice(1),\n source: e.source,\n reason: e.reason\n };\n _this._onDidChangeCursorSelection.fire(e2);\n }));\n }\n else {\n this.hasView = false;\n }\n if (this._view) {\n this.domElement.appendChild(this._view.domNode.domNode);\n var keys = Object.keys(this.contentWidgets);\n for (var i = 0, len = keys.length; i < len; i++) {\n var widgetId = keys[i];\n this._view.addContentWidget(this.contentWidgets[widgetId]);\n }\n keys = Object.keys(this.overlayWidgets);\n for (var i = 0, len = keys.length; i < len; i++) {\n var widgetId = keys[i];\n this._view.addOverlayWidget(this.overlayWidgets[widgetId]);\n }\n this._view.render(false, true);\n this.hasView = true;\n this._view.domNode.domNode.setAttribute('data-uri', model.uri.toString());\n }\n };\n CodeEditorWidget.prototype._createView = function () {\n var _this = this;\n var commandDelegate;\n if (this.isSimpleWidget) {\n commandDelegate = {\n paste: function (source, text, pasteOnNewLine, multicursorText) {\n _this.trigger(source, editorCommon.Handler.Paste, { text: text, pasteOnNewLine: pasteOnNewLine, multicursorText: multicursorText });\n },\n type: function (source, text) {\n _this.trigger(source, editorCommon.Handler.Type, { text: text });\n },\n replacePreviousChar: function (source, text, replaceCharCnt) {\n _this.trigger(source, editorCommon.Handler.ReplacePreviousChar, { text: text, replaceCharCnt: replaceCharCnt });\n },\n compositionStart: function (source) {\n _this.trigger(source, editorCommon.Handler.CompositionStart, undefined);\n },\n compositionEnd: function (source) {\n _this.trigger(source, editorCommon.Handler.CompositionEnd, undefined);\n },\n cut: function (source) {\n _this.trigger(source, editorCommon.Handler.Cut, undefined);\n }\n };\n }\n else {\n commandDelegate = {\n paste: function (source, text, pasteOnNewLine, multicursorText) {\n _this._commandService.executeCommand(editorCommon.Handler.Paste, {\n text: text,\n pasteOnNewLine: pasteOnNewLine,\n multicursorText: multicursorText\n });\n },\n type: function (source, text) {\n _this._commandService.executeCommand(editorCommon.Handler.Type, {\n text: text\n });\n },\n replacePreviousChar: function (source, text, replaceCharCnt) {\n _this._commandService.executeCommand(editorCommon.Handler.ReplacePreviousChar, {\n text: text,\n replaceCharCnt: replaceCharCnt\n });\n },\n compositionStart: function (source) {\n _this._commandService.executeCommand(editorCommon.Handler.CompositionStart, {});\n },\n compositionEnd: function (source) {\n _this._commandService.executeCommand(editorCommon.Handler.CompositionEnd, {});\n },\n cut: function (source) {\n _this._commandService.executeCommand(editorCommon.Handler.Cut, {});\n }\n };\n }\n this._view = new View(commandDelegate, this._configuration, this._themeService, this.viewModel, this.cursor, function (editorCommand, args) {\n if (!_this.cursor) {\n return;\n }\n editorCommand.runCoreEditorCommand(_this.cursor, args);\n });\n var viewEventBus = this._view.getInternalEventBus();\n viewEventBus.onDidGainFocus = function () {\n _this._editorTextFocus.setValue(true);\n // In IE, the focus is not synchronous, so we give it a little help\n _this._editorWidgetFocus.setValue(true);\n };\n viewEventBus.onDidScroll = function (e) { return _this._onDidScrollChange.fire(e); };\n viewEventBus.onDidLoseFocus = function () { return _this._editorTextFocus.setValue(false); };\n viewEventBus.onContextMenu = function (e) { return _this._onContextMenu.fire(e); };\n viewEventBus.onMouseDown = function (e) { return _this._onMouseDown.fire(e); };\n viewEventBus.onMouseUp = function (e) { return _this._onMouseUp.fire(e); };\n viewEventBus.onMouseDrag = function (e) { return _this._onMouseDrag.fire(e); };\n viewEventBus.onMouseDrop = function (e) { return _this._onMouseDrop.fire(e); };\n viewEventBus.onKeyUp = function (e) { return _this._onKeyUp.fire(e); };\n viewEventBus.onMouseMove = function (e) { return _this._onMouseMove.fire(e); };\n viewEventBus.onMouseLeave = function (e) { return _this._onMouseLeave.fire(e); };\n viewEventBus.onKeyDown = function (e) { return _this._onKeyDown.fire(e); };\n };\n CodeEditorWidget.prototype._postDetachModelCleanup = function (detachedModel) {\n if (detachedModel) {\n detachedModel.removeAllDecorationsWithOwnerId(this.id);\n }\n };\n CodeEditorWidget.prototype._detachModel = function () {\n var removeDomNode = null;\n if (this._view) {\n this._view.dispose();\n removeDomNode = this._view.domNode.domNode;\n this._view = null;\n }\n if (this.model) {\n this.model.onBeforeDetached();\n }\n this.hasView = false;\n this.listenersToRemove = dispose(this.listenersToRemove);\n if (this.cursor) {\n this.cursor.dispose();\n this.cursor = null;\n }\n if (this.viewModel) {\n this.viewModel.dispose();\n this.viewModel = null;\n }\n var result = this.model;\n this.model = null;\n this.domElement.removeAttribute('data-mode-id');\n if (removeDomNode) {\n this.domElement.removeChild(removeDomNode);\n }\n return result;\n };\n CodeEditorWidget.prototype._removeDecorationType = function (key) {\n this._codeEditorService.removeDecorationType(key);\n };\n /* __GDPR__FRAGMENT__\n \"EditorTelemetryData\" : {}\n */\n CodeEditorWidget.prototype.getTelemetryData = function () {\n return this._telemetryData;\n };\n CodeEditorWidget = __decorate([\n __param(3, IInstantiationService),\n __param(4, ICodeEditorService),\n __param(5, ICommandService),\n __param(6, IContextKeyService),\n __param(7, IThemeService),\n __param(8, INotificationService)\n ], CodeEditorWidget);\n return CodeEditorWidget;\n}(Disposable));\nexport { CodeEditorWidget };\nvar BooleanEventEmitter = /** @class */ (function (_super) {\n __extends(BooleanEventEmitter, _super);\n function BooleanEventEmitter() {\n var _this = _super.call(this) || this;\n _this._onDidChangeToTrue = _this._register(new Emitter());\n _this.onDidChangeToTrue = _this._onDidChangeToTrue.event;\n _this._onDidChangeToFalse = _this._register(new Emitter());\n _this.onDidChangeToFalse = _this._onDidChangeToFalse.event;\n _this._value = 0 /* NotSet */;\n return _this;\n }\n BooleanEventEmitter.prototype.setValue = function (_value) {\n var value = (_value ? 2 /* True */ : 1 /* False */);\n if (this._value === value) {\n return;\n }\n this._value = value;\n if (this._value === 2 /* True */) {\n this._onDidChangeToTrue.fire();\n }\n else if (this._value === 1 /* False */) {\n this._onDidChangeToFalse.fire();\n }\n };\n return BooleanEventEmitter;\n}(Disposable));\nexport { BooleanEventEmitter };\nvar EditorContextKeysManager = /** @class */ (function (_super) {\n __extends(EditorContextKeysManager, _super);\n function EditorContextKeysManager(editor, contextKeyService) {\n var _this = _super.call(this) || this;\n _this._editor = editor;\n contextKeyService.createKey('editorId', editor.getId());\n _this._editorFocus = EditorContextKeys.focus.bindTo(contextKeyService);\n _this._textInputFocus = EditorContextKeys.textInputFocus.bindTo(contextKeyService);\n _this._editorTextFocus = EditorContextKeys.editorTextFocus.bindTo(contextKeyService);\n _this._editorTabMovesFocus = EditorContextKeys.tabMovesFocus.bindTo(contextKeyService);\n _this._editorReadonly = EditorContextKeys.readOnly.bindTo(contextKeyService);\n _this._hasMultipleSelections = EditorContextKeys.hasMultipleSelections.bindTo(contextKeyService);\n _this._hasNonEmptySelection = EditorContextKeys.hasNonEmptySelection.bindTo(contextKeyService);\n _this._canUndo = EditorContextKeys.canUndo.bindTo(contextKeyService);\n _this._canRedo = EditorContextKeys.canRedo.bindTo(contextKeyService);\n _this._register(_this._editor.onDidChangeConfiguration(function () { return _this._updateFromConfig(); }));\n _this._register(_this._editor.onDidChangeCursorSelection(function () { return _this._updateFromSelection(); }));\n _this._register(_this._editor.onDidFocusEditorWidget(function () { return _this._updateFromFocus(); }));\n _this._register(_this._editor.onDidBlurEditorWidget(function () { return _this._updateFromFocus(); }));\n _this._register(_this._editor.onDidFocusEditorText(function () { return _this._updateFromFocus(); }));\n _this._register(_this._editor.onDidBlurEditorText(function () { return _this._updateFromFocus(); }));\n _this._register(_this._editor.onDidChangeModel(function () { return _this._updateFromModel(); }));\n _this._register(_this._editor.onDidChangeConfiguration(function () { return _this._updateFromModel(); }));\n _this._updateFromConfig();\n _this._updateFromSelection();\n _this._updateFromFocus();\n _this._updateFromModel();\n return _this;\n }\n EditorContextKeysManager.prototype._updateFromConfig = function () {\n var config = this._editor.getConfiguration();\n this._editorTabMovesFocus.set(config.tabFocusMode);\n this._editorReadonly.set(config.readOnly);\n };\n EditorContextKeysManager.prototype._updateFromSelection = function () {\n var selections = this._editor.getSelections();\n if (!selections) {\n this._hasMultipleSelections.reset();\n this._hasNonEmptySelection.reset();\n }\n else {\n this._hasMultipleSelections.set(selections.length > 1);\n this._hasNonEmptySelection.set(selections.some(function (s) { return !s.isEmpty(); }));\n }\n };\n EditorContextKeysManager.prototype._updateFromFocus = function () {\n this._editorFocus.set(this._editor.hasWidgetFocus() && !this._editor.isSimpleWidget);\n this._editorTextFocus.set(this._editor.hasTextFocus() && !this._editor.isSimpleWidget);\n this._textInputFocus.set(this._editor.hasTextFocus());\n };\n EditorContextKeysManager.prototype._updateFromModel = function () {\n var model = this._editor.getModel();\n this._canUndo.set(model && model.canUndo());\n this._canRedo.set(model && model.canRedo());\n };\n return EditorContextKeysManager;\n}(Disposable));\nvar EditorModeContext = /** @class */ (function (_super) {\n __extends(EditorModeContext, _super);\n function EditorModeContext(editor, contextKeyService) {\n var _this = _super.call(this) || this;\n _this._editor = editor;\n _this._langId = EditorContextKeys.languageId.bindTo(contextKeyService);\n _this._hasCompletionItemProvider = EditorContextKeys.hasCompletionItemProvider.bindTo(contextKeyService);\n _this._hasCodeActionsProvider = EditorContextKeys.hasCodeActionsProvider.bindTo(contextKeyService);\n _this._hasCodeLensProvider = EditorContextKeys.hasCodeLensProvider.bindTo(contextKeyService);\n _this._hasDefinitionProvider = EditorContextKeys.hasDefinitionProvider.bindTo(contextKeyService);\n _this._hasImplementationProvider = EditorContextKeys.hasImplementationProvider.bindTo(contextKeyService);\n _this._hasTypeDefinitionProvider = EditorContextKeys.hasTypeDefinitionProvider.bindTo(contextKeyService);\n _this._hasHoverProvider = EditorContextKeys.hasHoverProvider.bindTo(contextKeyService);\n _this._hasDocumentHighlightProvider = EditorContextKeys.hasDocumentHighlightProvider.bindTo(contextKeyService);\n _this._hasDocumentSymbolProvider = EditorContextKeys.hasDocumentSymbolProvider.bindTo(contextKeyService);\n _this._hasReferenceProvider = EditorContextKeys.hasReferenceProvider.bindTo(contextKeyService);\n _this._hasRenameProvider = EditorContextKeys.hasRenameProvider.bindTo(contextKeyService);\n _this._hasDocumentFormattingProvider = EditorContextKeys.hasDocumentFormattingProvider.bindTo(contextKeyService);\n _this._hasDocumentSelectionFormattingProvider = EditorContextKeys.hasDocumentSelectionFormattingProvider.bindTo(contextKeyService);\n _this._hasSignatureHelpProvider = EditorContextKeys.hasSignatureHelpProvider.bindTo(contextKeyService);\n _this._isInWalkThrough = EditorContextKeys.isInEmbeddedEditor.bindTo(contextKeyService);\n var update = function () { return _this._update(); };\n // update when model/mode changes\n _this._register(editor.onDidChangeModel(update));\n _this._register(editor.onDidChangeModelLanguage(update));\n // update when registries change\n _this._register(modes.SuggestRegistry.onDidChange(update));\n _this._register(modes.CodeActionProviderRegistry.onDidChange(update));\n _this._register(modes.CodeLensProviderRegistry.onDidChange(update));\n _this._register(modes.DefinitionProviderRegistry.onDidChange(update));\n _this._register(modes.ImplementationProviderRegistry.onDidChange(update));\n _this._register(modes.TypeDefinitionProviderRegistry.onDidChange(update));\n _this._register(modes.HoverProviderRegistry.onDidChange(update));\n _this._register(modes.DocumentHighlightProviderRegistry.onDidChange(update));\n _this._register(modes.DocumentSymbolProviderRegistry.onDidChange(update));\n _this._register(modes.ReferenceProviderRegistry.onDidChange(update));\n _this._register(modes.RenameProviderRegistry.onDidChange(update));\n _this._register(modes.DocumentFormattingEditProviderRegistry.onDidChange(update));\n _this._register(modes.DocumentRangeFormattingEditProviderRegistry.onDidChange(update));\n _this._register(modes.SignatureHelpProviderRegistry.onDidChange(update));\n update();\n return _this;\n }\n EditorModeContext.prototype.dispose = function () {\n _super.prototype.dispose.call(this);\n };\n EditorModeContext.prototype.reset = function () {\n this._langId.reset();\n this._hasCompletionItemProvider.reset();\n this._hasCodeActionsProvider.reset();\n this._hasCodeLensProvider.reset();\n this._hasDefinitionProvider.reset();\n this._hasImplementationProvider.reset();\n this._hasTypeDefinitionProvider.reset();\n this._hasHoverProvider.reset();\n this._hasDocumentHighlightProvider.reset();\n this._hasDocumentSymbolProvider.reset();\n this._hasReferenceProvider.reset();\n this._hasRenameProvider.reset();\n this._hasDocumentFormattingProvider.reset();\n this._hasDocumentSelectionFormattingProvider.reset();\n this._hasSignatureHelpProvider.reset();\n this._isInWalkThrough.reset();\n };\n EditorModeContext.prototype._update = function () {\n var model = this._editor.getModel();\n if (!model) {\n this.reset();\n return;\n }\n this._langId.set(model.getLanguageIdentifier().language);\n this._hasCompletionItemProvider.set(modes.SuggestRegistry.has(model));\n this._hasCodeActionsProvider.set(modes.CodeActionProviderRegistry.has(model));\n this._hasCodeLensProvider.set(modes.CodeLensProviderRegistry.has(model));\n this._hasDefinitionProvider.set(modes.DefinitionProviderRegistry.has(model));\n this._hasImplementationProvider.set(modes.ImplementationProviderRegistry.has(model));\n this._hasTypeDefinitionProvider.set(modes.TypeDefinitionProviderRegistry.has(model));\n this._hasHoverProvider.set(modes.HoverProviderRegistry.has(model));\n this._hasDocumentHighlightProvider.set(modes.DocumentHighlightProviderRegistry.has(model));\n this._hasDocumentSymbolProvider.set(modes.DocumentSymbolProviderRegistry.has(model));\n this._hasReferenceProvider.set(modes.ReferenceProviderRegistry.has(model));\n this._hasRenameProvider.set(modes.RenameProviderRegistry.has(model));\n this._hasSignatureHelpProvider.set(modes.SignatureHelpProviderRegistry.has(model));\n this._hasDocumentFormattingProvider.set(modes.DocumentFormattingEditProviderRegistry.has(model) || modes.DocumentRangeFormattingEditProviderRegistry.has(model));\n this._hasDocumentSelectionFormattingProvider.set(modes.DocumentRangeFormattingEditProviderRegistry.has(model));\n this._isInWalkThrough.set(model.uri.scheme === Schemas.walkThroughSnippet);\n };\n return EditorModeContext;\n}(Disposable));\nexport { EditorModeContext };\nvar CodeEditorWidgetFocusTracker = /** @class */ (function (_super) {\n __extends(CodeEditorWidgetFocusTracker, _super);\n function CodeEditorWidgetFocusTracker(domElement) {\n var _this = _super.call(this) || this;\n _this._onChange = _this._register(new Emitter());\n _this.onChange = _this._onChange.event;\n _this._hasFocus = false;\n _this._domFocusTracker = _this._register(dom.trackFocus(domElement));\n _this._register(_this._domFocusTracker.onDidFocus(function () {\n _this._hasFocus = true;\n _this._onChange.fire(void 0);\n }));\n _this._register(_this._domFocusTracker.onDidBlur(function () {\n _this._hasFocus = false;\n _this._onChange.fire(void 0);\n }));\n return _this;\n }\n CodeEditorWidgetFocusTracker.prototype.hasFocus = function () {\n return this._hasFocus;\n };\n return CodeEditorWidgetFocusTracker;\n}(Disposable));\nvar squigglyStart = encodeURIComponent(\"\");\nfunction getSquigglySVGData(color) {\n return squigglyStart + encodeURIComponent(color.toString()) + squigglyEnd;\n}\nvar dotdotdotStart = encodeURIComponent(\"\");\nfunction getDotDotDotSVGData(color) {\n return dotdotdotStart + encodeURIComponent(color.toString()) + dotdotdotEnd;\n}\nregisterThemingParticipant(function (theme, collector) {\n var errorBorderColor = theme.getColor(editorErrorBorder);\n if (errorBorderColor) {\n collector.addRule(\".monaco-editor .\" + \"squiggly-error\" /* EditorErrorDecoration */ + \" { border-bottom: 4px double \" + errorBorderColor + \"; }\");\n }\n var errorForeground = theme.getColor(editorErrorForeground);\n if (errorForeground) {\n collector.addRule(\".monaco-editor .\" + \"squiggly-error\" /* EditorErrorDecoration */ + \" { background: url(\\\"data:image/svg+xml,\" + getSquigglySVGData(errorForeground) + \"\\\") repeat-x bottom left; }\");\n }\n var warningBorderColor = theme.getColor(editorWarningBorder);\n if (warningBorderColor) {\n collector.addRule(\".monaco-editor .\" + \"squiggly-warning\" /* EditorWarningDecoration */ + \" { border-bottom: 4px double \" + warningBorderColor + \"; }\");\n }\n var warningForeground = theme.getColor(editorWarningForeground);\n if (warningForeground) {\n collector.addRule(\".monaco-editor .\" + \"squiggly-warning\" /* EditorWarningDecoration */ + \" { background: url(\\\"data:image/svg+xml,\" + getSquigglySVGData(warningForeground) + \"\\\") repeat-x bottom left; }\");\n }\n var infoBorderColor = theme.getColor(editorInfoBorder);\n if (infoBorderColor) {\n collector.addRule(\".monaco-editor .\" + \"squiggly-info\" /* EditorInfoDecoration */ + \" { border-bottom: 4px double \" + infoBorderColor + \"; }\");\n }\n var infoForeground = theme.getColor(editorInfoForeground);\n if (infoForeground) {\n collector.addRule(\".monaco-editor .\" + \"squiggly-info\" /* EditorInfoDecoration */ + \" { background: url(\\\"data:image/svg+xml,\" + getSquigglySVGData(infoForeground) + \"\\\") repeat-x bottom left; }\");\n }\n var hintBorderColor = theme.getColor(editorHintBorder);\n if (hintBorderColor) {\n collector.addRule(\".monaco-editor .\" + \"squiggly-hint\" /* EditorHintDecoration */ + \" { border-bottom: 2px dotted \" + hintBorderColor + \"; }\");\n }\n var hintForeground = theme.getColor(editorHintForeground);\n if (hintForeground) {\n collector.addRule(\".monaco-editor .\" + \"squiggly-hint\" /* EditorHintDecoration */ + \" { background: url(\\\"data:image/svg+xml,\" + getDotDotDotSVGData(hintForeground) + \"\\\") no-repeat bottom left; }\");\n }\n var unnecessaryForeground = theme.getColor(editorUnnecessaryCodeOpacity);\n if (unnecessaryForeground) {\n collector.addRule(\".\" + SHOW_UNUSED_ENABLED_CLASS + \" .monaco-editor .\" + \"squiggly-inline-unnecessary\" /* EditorUnnecessaryInlineDecoration */ + \" { opacity: \" + unnecessaryForeground.rgba.a + \"; will-change: opacity; }\"); // TODO@Ben: 'will-change: opacity' is a workaround for https://github.com/Microsoft/vscode/issues/52196\n }\n var unnecessaryBorder = theme.getColor(editorUnnecessaryCodeBorder);\n if (unnecessaryBorder) {\n collector.addRule(\".\" + SHOW_UNUSED_ENABLED_CLASS + \" .monaco-editor .\" + \"squiggly-unnecessary\" /* EditorUnnecessaryDecoration */ + \" { border-bottom: 2px dashed \" + unnecessaryBorder + \"; }\");\n }\n});\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport './sash.css';\nimport { dispose } from '../../../common/lifecycle';\nimport { isIPad } from '../../browser';\nimport { isMacintosh } from '../../../common/platform';\nimport * as types from '../../../common/types';\nimport { EventType, Gesture } from '../../touch';\nimport { StandardMouseEvent } from '../../mouseEvent';\nimport { Emitter } from '../../../common/event';\nimport { getElementsByTagName, EventHelper, createStyleSheet, addDisposableListener, append, $, addClass, removeClass, toggleClass } from '../../dom';\nimport { domEvent } from '../../event';\nvar DEBUG = false;\nexport var Orientation;\n(function (Orientation) {\n Orientation[Orientation[\"VERTICAL\"] = 0] = \"VERTICAL\";\n Orientation[Orientation[\"HORIZONTAL\"] = 1] = \"HORIZONTAL\";\n})(Orientation || (Orientation = {}));\nexport var SashState;\n(function (SashState) {\n SashState[SashState[\"Disabled\"] = 0] = \"Disabled\";\n SashState[SashState[\"Minimum\"] = 1] = \"Minimum\";\n SashState[SashState[\"Maximum\"] = 2] = \"Maximum\";\n SashState[SashState[\"Enabled\"] = 3] = \"Enabled\";\n})(SashState || (SashState = {}));\nvar Sash = /** @class */ (function () {\n function Sash(container, layoutProvider, options) {\n if (options === void 0) { options = {}; }\n this.disposables = [];\n this._state = SashState.Enabled;\n this._onDidEnablementChange = new Emitter();\n this.onDidEnablementChange = this._onDidEnablementChange.event;\n this._onDidStart = new Emitter();\n this.onDidStart = this._onDidStart.event;\n this._onDidChange = new Emitter();\n this.onDidChange = this._onDidChange.event;\n this._onDidReset = new Emitter();\n this.onDidReset = this._onDidReset.event;\n this._onDidEnd = new Emitter();\n this.onDidEnd = this._onDidEnd.event;\n this.linkedSash = undefined;\n this.orthogonalStartSashDisposables = [];\n this.orthogonalEndSashDisposables = [];\n this.el = append(container, $('.monaco-sash'));\n if (isMacintosh) {\n addClass(this.el, 'mac');\n }\n domEvent(this.el, 'mousedown')(this.onMouseDown, this, this.disposables);\n domEvent(this.el, 'dblclick')(this.onMouseDoubleClick, this, this.disposables);\n Gesture.addTarget(this.el);\n domEvent(this.el, EventType.Start)(this.onTouchStart, this, this.disposables);\n if (isIPad) {\n // see also http://ux.stackexchange.com/questions/39023/what-is-the-optimum-button-size-of-touch-screen-applications\n addClass(this.el, 'touch');\n }\n this.setOrientation(options.orientation || Orientation.VERTICAL);\n this.hidden = false;\n this.layoutProvider = layoutProvider;\n this.orthogonalStartSash = options.orthogonalStartSash;\n this.orthogonalEndSash = options.orthogonalEndSash;\n toggleClass(this.el, 'debug', DEBUG);\n }\n Object.defineProperty(Sash.prototype, \"state\", {\n get: function () { return this._state; },\n set: function (state) {\n if (this._state === state) {\n return;\n }\n toggleClass(this.el, 'disabled', state === SashState.Disabled);\n toggleClass(this.el, 'minimum', state === SashState.Minimum);\n toggleClass(this.el, 'maximum', state === SashState.Maximum);\n this._state = state;\n this._onDidEnablementChange.fire(state);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Sash.prototype, \"orthogonalStartSash\", {\n get: function () { return this._orthogonalStartSash; },\n set: function (sash) {\n this.orthogonalStartSashDisposables = dispose(this.orthogonalStartSashDisposables);\n if (sash) {\n sash.onDidEnablementChange(this.onOrthogonalStartSashEnablementChange, this, this.orthogonalStartSashDisposables);\n this.onOrthogonalStartSashEnablementChange(sash.state);\n }\n else {\n this.onOrthogonalStartSashEnablementChange(SashState.Disabled);\n }\n this._orthogonalStartSash = sash;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Sash.prototype, \"orthogonalEndSash\", {\n get: function () { return this._orthogonalEndSash; },\n set: function (sash) {\n this.orthogonalEndSashDisposables = dispose(this.orthogonalEndSashDisposables);\n if (sash) {\n sash.onDidEnablementChange(this.onOrthogonalEndSashEnablementChange, this, this.orthogonalEndSashDisposables);\n this.onOrthogonalEndSashEnablementChange(sash.state);\n }\n else {\n this.onOrthogonalEndSashEnablementChange(SashState.Disabled);\n }\n this._orthogonalEndSash = sash;\n },\n enumerable: true,\n configurable: true\n });\n Sash.prototype.setOrientation = function (orientation) {\n this.orientation = orientation;\n if (this.orientation === Orientation.HORIZONTAL) {\n addClass(this.el, 'horizontal');\n removeClass(this.el, 'vertical');\n }\n else {\n removeClass(this.el, 'horizontal');\n addClass(this.el, 'vertical');\n }\n if (this.layoutProvider) {\n this.layout();\n }\n };\n Sash.prototype.onMouseDown = function (e) {\n var _this = this;\n EventHelper.stop(e, false);\n var isMultisashResize = false;\n if (this.linkedSash && !e.__linkedSashEvent) {\n e.__linkedSashEvent = true;\n this.linkedSash.onMouseDown(e);\n }\n if (!e.__orthogonalSashEvent) {\n var orthogonalSash = void 0;\n if (this.orientation === Orientation.VERTICAL) {\n if (e.offsetY <= 4) {\n orthogonalSash = this.orthogonalStartSash;\n }\n else if (e.offsetY >= this.el.clientHeight - 4) {\n orthogonalSash = this.orthogonalEndSash;\n }\n }\n else {\n if (e.offsetX <= 4) {\n orthogonalSash = this.orthogonalStartSash;\n }\n else if (e.offsetX >= this.el.clientWidth - 4) {\n orthogonalSash = this.orthogonalEndSash;\n }\n }\n if (orthogonalSash) {\n isMultisashResize = true;\n e.__orthogonalSashEvent = true;\n orthogonalSash.onMouseDown(e);\n }\n }\n if (!this.state) {\n return;\n }\n var iframes = getElementsByTagName('iframe');\n for (var _i = 0, iframes_1 = iframes; _i < iframes_1.length; _i++) {\n var iframe = iframes_1[_i];\n iframe.style.pointerEvents = 'none'; // disable mouse events on iframes as long as we drag the sash\n }\n var mouseDownEvent = new StandardMouseEvent(e);\n var startX = mouseDownEvent.posx;\n var startY = mouseDownEvent.posy;\n var altKey = mouseDownEvent.altKey;\n var startEvent = { startX: startX, currentX: startX, startY: startY, currentY: startY, altKey: altKey };\n addClass(this.el, 'active');\n this._onDidStart.fire(startEvent);\n // fix https://github.com/Microsoft/vscode/issues/21675\n var style = createStyleSheet(this.el);\n var updateStyle = function () {\n var cursor = '';\n if (isMultisashResize) {\n cursor = 'all-scroll';\n }\n else if (_this.orientation === Orientation.HORIZONTAL) {\n if (_this.state === SashState.Minimum) {\n cursor = 's-resize';\n }\n else if (_this.state === SashState.Maximum) {\n cursor = 'n-resize';\n }\n else {\n cursor = isMacintosh ? 'row-resize' : 'ns-resize';\n }\n }\n else {\n if (_this.state === SashState.Minimum) {\n cursor = 'e-resize';\n }\n else if (_this.state === SashState.Maximum) {\n cursor = 'w-resize';\n }\n else {\n cursor = isMacintosh ? 'col-resize' : 'ew-resize';\n }\n }\n style.innerHTML = \"* { cursor: \" + cursor + \" !important; }\";\n };\n var disposables = [];\n updateStyle();\n if (!isMultisashResize) {\n this.onDidEnablementChange(updateStyle, null, disposables);\n }\n var onMouseMove = function (e) {\n EventHelper.stop(e, false);\n var mouseMoveEvent = new StandardMouseEvent(e);\n var event = { startX: startX, currentX: mouseMoveEvent.posx, startY: startY, currentY: mouseMoveEvent.posy, altKey: altKey };\n _this._onDidChange.fire(event);\n };\n var onMouseUp = function (e) {\n EventHelper.stop(e, false);\n _this.el.removeChild(style);\n removeClass(_this.el, 'active');\n _this._onDidEnd.fire();\n dispose(disposables);\n var iframes = getElementsByTagName('iframe');\n for (var _i = 0, iframes_2 = iframes; _i < iframes_2.length; _i++) {\n var iframe = iframes_2[_i];\n iframe.style.pointerEvents = 'auto';\n }\n };\n domEvent(window, 'mousemove')(onMouseMove, null, disposables);\n domEvent(window, 'mouseup')(onMouseUp, null, disposables);\n };\n Sash.prototype.onMouseDoubleClick = function (event) {\n this._onDidReset.fire();\n };\n Sash.prototype.onTouchStart = function (event) {\n var _this = this;\n EventHelper.stop(event);\n var listeners = [];\n var startX = event.pageX;\n var startY = event.pageY;\n var altKey = event.altKey;\n this._onDidStart.fire({\n startX: startX,\n currentX: startX,\n startY: startY,\n currentY: startY,\n altKey: altKey\n });\n listeners.push(addDisposableListener(this.el, EventType.Change, function (event) {\n if (types.isNumber(event.pageX) && types.isNumber(event.pageY)) {\n _this._onDidChange.fire({\n startX: startX,\n currentX: event.pageX,\n startY: startY,\n currentY: event.pageY,\n altKey: altKey\n });\n }\n }));\n listeners.push(addDisposableListener(this.el, EventType.End, function (event) {\n _this._onDidEnd.fire();\n dispose(listeners);\n }));\n };\n Sash.prototype.layout = function () {\n var size = isIPad ? 20 : 4;\n if (this.orientation === Orientation.VERTICAL) {\n var verticalProvider = this.layoutProvider;\n this.el.style.left = verticalProvider.getVerticalSashLeft(this) - (size / 2) + 'px';\n if (verticalProvider.getVerticalSashTop) {\n this.el.style.top = verticalProvider.getVerticalSashTop(this) + 'px';\n }\n if (verticalProvider.getVerticalSashHeight) {\n this.el.style.height = verticalProvider.getVerticalSashHeight(this) + 'px';\n }\n }\n else {\n var horizontalProvider = this.layoutProvider;\n this.el.style.top = horizontalProvider.getHorizontalSashTop(this) - (size / 2) + 'px';\n if (horizontalProvider.getHorizontalSashLeft) {\n this.el.style.left = horizontalProvider.getHorizontalSashLeft(this) + 'px';\n }\n if (horizontalProvider.getHorizontalSashWidth) {\n this.el.style.width = horizontalProvider.getHorizontalSashWidth(this) + 'px';\n }\n }\n };\n Sash.prototype.hide = function () {\n this.hidden = true;\n this.el.style.display = 'none';\n this.el.setAttribute('aria-hidden', 'true');\n };\n Sash.prototype.onOrthogonalStartSashEnablementChange = function (state) {\n toggleClass(this.el, 'orthogonal-start', state !== SashState.Disabled);\n };\n Sash.prototype.onOrthogonalEndSashEnablementChange = function (state) {\n toggleClass(this.el, 'orthogonal-end', state !== SashState.Disabled);\n };\n Sash.prototype.dispose = function () {\n this.orthogonalStartSashDisposables = dispose(this.orthogonalStartSashDisposables);\n this.orthogonalEndSashDisposables = dispose(this.orthogonalEndSashDisposables);\n if (this.el && this.el.parentElement) {\n this.el.parentElement.removeChild(this.el);\n }\n this.el = null;\n this.disposables = dispose(this.disposables);\n };\n return Sash;\n}());\nexport { Sash };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport { createDecorator } from '../../../platform/instantiation/common/instantiation';\nexport var ID_EDITOR_WORKER_SERVICE = 'editorWorkerService';\nexport var IEditorWorkerService = createDecorator(ID_EDITOR_WORKER_SERVICE);\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport './builder.css';\nimport * as types from '../common/types';\nimport { dispose } from '../common/lifecycle';\nimport * as strings from '../common/strings';\nimport * as assert from '../common/assert';\nimport * as DOM from './dom';\n// --- Implementation starts here\nvar MS_DATA_KEY = '_msDataKey';\nvar LISTENER_BINDING_ID = '__$listeners';\nvar VISIBILITY_BINDING_ID = '__$visibility';\nfunction data(element) {\n if (!element[MS_DATA_KEY]) {\n element[MS_DATA_KEY] = {};\n }\n return element[MS_DATA_KEY];\n}\nfunction hasData(element) {\n return !!element[MS_DATA_KEY];\n}\n/**\n * Wraps around the provided element to manipulate it and add more child elements.\n */\nvar Builder = /** @class */ (function () {\n function Builder(element, offdom) {\n this.offdom = offdom;\n this.container = element;\n this.currentElement = element;\n this.createdElements = [];\n this.toDispose = {};\n this.captureToDispose = {};\n }\n /**\n * Clones the builder providing the same properties as this one.\n */\n Builder.prototype.clone = function () {\n var builder = new Builder(this.container, this.offdom);\n builder.currentElement = this.currentElement;\n builder.createdElements = this.createdElements;\n builder.captureToDispose = this.captureToDispose;\n builder.toDispose = this.toDispose;\n return builder;\n };\n Builder.prototype.build = function (container, index) {\n assert.ok(this.offdom, 'This builder was not created off-dom, so build() can not be called.');\n // Use builders own container if present\n if (!container) {\n container = this.container;\n }\n // Handle case of passed in Builder\n else if (container instanceof Builder) {\n container = container.getHTMLElement();\n }\n assert.ok(container, 'Builder can only be build() with a container provided.');\n assert.ok(DOM.isHTMLElement(container), 'The container must either be a HTMLElement or a Builder.');\n var htmlContainer = container;\n // Append\n var i, len;\n var childNodes = htmlContainer.childNodes;\n if (types.isNumber(index) && index < childNodes.length) {\n for (i = 0, len = this.createdElements.length; i < len; i++) {\n htmlContainer.insertBefore(this.createdElements[i], childNodes[index++]);\n }\n }\n else {\n for (i = 0, len = this.createdElements.length; i < len; i++) {\n htmlContainer.appendChild(this.createdElements[i]);\n }\n }\n return this;\n };\n Builder.prototype.appendTo = function (container, index) {\n // Use builders own container if present\n if (!container) {\n container = this.container;\n }\n // Handle case of passed in Builder\n else if (container instanceof Builder) {\n container = container.getHTMLElement();\n }\n assert.ok(container, 'Builder can only be build() with a container provided.');\n assert.ok(DOM.isHTMLElement(container), 'The container must either be a HTMLElement or a Builder.');\n var htmlContainer = container;\n // Remove node from parent, if needed\n if (this.currentElement.parentNode) {\n this.currentElement.parentNode.removeChild(this.currentElement);\n }\n var childNodes = htmlContainer.childNodes;\n if (types.isNumber(index) && index < childNodes.length) {\n htmlContainer.insertBefore(this.currentElement, childNodes[index]);\n }\n else {\n htmlContainer.appendChild(this.currentElement);\n }\n return this;\n };\n /**\n * Returns the HTML Element the builder is currently active on.\n */\n Builder.prototype.getHTMLElement = function () {\n return this.currentElement;\n };\n // HTML Elements\n /**\n * Creates a new element of this kind as child of the current element or parent.\n * Accepts an object literal as first parameter that can be used to describe the\n * attributes of the element.\n * Accepts a function as second parameter that can be used to create child elements\n * of the element. The function will be called with a new builder created with the\n * provided element.\n */\n Builder.prototype.div = function (attributes, fn) {\n return this.doElement('div', attributes, fn);\n };\n /**\n * Creates a new element of given tag name as child of the current element or parent.\n * Accepts an object literal as first parameter that can be used to describe the\n * attributes of the element.\n * Accepts a function as second parameter that can be used to create child elements\n * of the element. The function will be called with a new builder created with the\n * provided element.\n */\n Builder.prototype.element = function (name, attributes, fn) {\n return this.doElement(name, attributes, fn);\n };\n Builder.prototype.doElement = function (name, attributesOrFn, fn) {\n // Create Element\n var element = document.createElement(name);\n this.currentElement = element;\n // Off-DOM: Remember in array of created elements\n if (this.offdom) {\n this.createdElements.push(element);\n }\n // Object (apply properties as attributes to HTML element)\n if (types.isObject(attributesOrFn)) {\n this.attr(attributesOrFn);\n }\n // Support second argument being function\n if (types.isFunction(attributesOrFn)) {\n fn = attributesOrFn;\n }\n // Apply Functions (Elements created in Functions will be added as child to current element)\n if (types.isFunction(fn)) {\n var builder = new Builder(element);\n fn.call(builder, builder); // Set both 'this' and the first parameter to the new builder\n }\n // Add to parent\n if (!this.offdom) {\n this.container.appendChild(element);\n }\n return this;\n };\n /**\n * Calls blur() on the current HTML element;\n */\n Builder.prototype.domBlur = function () {\n this.currentElement.blur();\n return this;\n };\n Builder.prototype.on = function (arg1, fn, listenerToDisposeContainer, useCapture) {\n var _this = this;\n // Event Type Array\n if (types.isArray(arg1)) {\n arg1.forEach(function (type) {\n _this.on(type, fn, listenerToDisposeContainer, useCapture);\n });\n }\n // Single Event Type\n else {\n var type = arg1;\n // Add Listener\n var unbind_1 = DOM.addDisposableListener(this.currentElement, type, function (e) {\n fn(e, _this, unbind_1); // Pass in Builder as Second Argument\n }, useCapture || false);\n // Remember for off() use\n if (useCapture) {\n if (!this.captureToDispose[type]) {\n this.captureToDispose[type] = [];\n }\n this.captureToDispose[type].push(unbind_1);\n }\n else {\n if (!this.toDispose[type]) {\n this.toDispose[type] = [];\n }\n this.toDispose[type].push(unbind_1);\n }\n // Bind to Element\n var listenerBinding = this.getProperty(LISTENER_BINDING_ID, []);\n listenerBinding.push(unbind_1);\n this.setProperty(LISTENER_BINDING_ID, listenerBinding);\n // Add to Array if passed in\n if (listenerToDisposeContainer && types.isArray(listenerToDisposeContainer)) {\n listenerToDisposeContainer.push(unbind_1);\n }\n }\n return this;\n };\n Builder.prototype.off = function (arg1, useCapture) {\n var _this = this;\n // Event Type Array\n if (types.isArray(arg1)) {\n arg1.forEach(function (type) {\n _this.off(type);\n });\n }\n // Single Event Type\n else {\n var type = arg1;\n if (useCapture) {\n if (this.captureToDispose[type]) {\n this.captureToDispose[type] = dispose(this.captureToDispose[type]);\n }\n }\n else {\n if (this.toDispose[type]) {\n this.toDispose[type] = dispose(this.toDispose[type]);\n }\n }\n }\n return this;\n };\n Builder.prototype.attr = function (firstP, secondP) {\n // Apply Object Literal to Attributes of Element\n if (types.isObject(firstP)) {\n for (var prop in firstP) {\n if (firstP.hasOwnProperty(prop)) {\n var value = firstP[prop];\n this.doSetAttr(prop, value);\n }\n }\n return this;\n }\n // Get Attribute Value\n if (types.isString(firstP) && !types.isString(secondP)) {\n return this.currentElement.getAttribute(firstP);\n }\n // Set Attribute Value\n if (types.isString(firstP)) {\n if (!types.isString(secondP)) {\n secondP = String(secondP);\n }\n this.doSetAttr(firstP, secondP);\n }\n return this;\n };\n Builder.prototype.doSetAttr = function (prop, value) {\n if (prop === 'class') {\n prop = 'addClass'; // Workaround for the issue that a function name can not be 'class' in ES\n }\n if (this[prop]) {\n if (types.isArray(value)) {\n this[prop].apply(this, value);\n }\n else {\n this[prop].call(this, value);\n }\n }\n else {\n this.currentElement.setAttribute(prop, value);\n }\n };\n Builder.prototype.style = function (firstP, secondP) {\n // Apply Object Literal to Styles of Element\n if (types.isObject(firstP)) {\n for (var prop in firstP) {\n if (firstP.hasOwnProperty(prop)) {\n var value = firstP[prop];\n this.doSetStyle(prop, value);\n }\n }\n return this;\n }\n var hasFirstP = types.isString(firstP);\n // Get Style Value\n if (hasFirstP && types.isUndefined(secondP)) {\n return this.currentElement.style[this.cssKeyToJavaScriptProperty(firstP)];\n }\n // Set Style Value\n else if (hasFirstP) {\n this.doSetStyle(firstP, secondP);\n }\n return this;\n };\n Builder.prototype.doSetStyle = function (key, value) {\n if (key.indexOf('-') >= 0) {\n var segments = key.split('-');\n key = segments[0];\n for (var i = 1; i < segments.length; i++) {\n var segment = segments[i];\n key = key + segment.charAt(0).toUpperCase() + segment.substr(1);\n }\n }\n this.currentElement.style[this.cssKeyToJavaScriptProperty(key)] = value;\n };\n Builder.prototype.cssKeyToJavaScriptProperty = function (key) {\n // Automagically convert dashes as they are not allowed when programmatically\n // setting a CSS style property\n if (key.indexOf('-') >= 0) {\n var segments = key.split('-');\n key = segments[0];\n for (var i = 1; i < segments.length; i++) {\n var segment = segments[i];\n key = key + segment.charAt(0).toUpperCase() + segment.substr(1);\n }\n }\n // Float is special too\n else if (key === 'float') {\n key = 'cssFloat';\n }\n return key;\n };\n /**\n * Adds the variable list of arguments as class names to the current HTML element of the builder.\n */\n Builder.prototype.addClass = function () {\n var _this = this;\n var classes = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n classes[_i] = arguments[_i];\n }\n classes.forEach(function (nameValue) {\n var names = nameValue.split(' ');\n names.forEach(function (name) {\n DOM.addClass(_this.currentElement, name);\n });\n });\n return this;\n };\n /**\n * Sets the class name of the current HTML element of the builder to the provided className.\n * If shouldAddClass is provided - for true class is added, for false class is removed.\n */\n Builder.prototype.setClass = function (className, shouldAddClass) {\n if (shouldAddClass === void 0) { shouldAddClass = null; }\n if (shouldAddClass === null) {\n this.currentElement.className = className;\n }\n else if (shouldAddClass) {\n this.addClass(className);\n }\n else {\n this.removeClass(className);\n }\n return this;\n };\n /**\n * Returns whether the current HTML element of the builder has the provided class assigned.\n */\n Builder.prototype.hasClass = function (className) {\n return DOM.hasClass(this.currentElement, className);\n };\n /**\n * Removes the variable list of arguments as class names from the current HTML element of the builder.\n */\n Builder.prototype.removeClass = function () {\n var _this = this;\n var classes = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n classes[_i] = arguments[_i];\n }\n classes.forEach(function (nameValue) {\n var names = nameValue.split(' ');\n names.forEach(function (name) {\n DOM.removeClass(_this.currentElement, name);\n });\n });\n return this;\n };\n /**\n * Shows the current element of the builder.\n */\n Builder.prototype.show = function () {\n if (this.hasClass('monaco-builder-hidden')) {\n this.removeClass('monaco-builder-hidden');\n }\n this.attr('aria-hidden', 'false');\n // Cancel any pending showDelayed() invocation\n this.cancelVisibilityTimeout();\n return this;\n };\n /**\n * Hides the current element of the builder.\n */\n Builder.prototype.hide = function () {\n if (!this.hasClass('monaco-builder-hidden')) {\n this.addClass('monaco-builder-hidden');\n }\n this.attr('aria-hidden', 'true');\n // Cancel any pending showDelayed() invocation\n this.cancelVisibilityTimeout();\n return this;\n };\n Builder.prototype.cancelVisibilityTimeout = function () {\n var visibilityDisposable = this.getProperty(VISIBILITY_BINDING_ID);\n if (visibilityDisposable) {\n visibilityDisposable.dispose();\n this.removeProperty(VISIBILITY_BINDING_ID);\n }\n };\n /**\n * Sets the innerHTML attribute.\n */\n Builder.prototype.innerHtml = function (html, append) {\n if (append) {\n this.currentElement.innerHTML += html;\n }\n else {\n this.currentElement.innerHTML = html;\n }\n return this;\n };\n /**\n * Sets the textContent property of the element.\n * All HTML special characters will be escaped.\n */\n Builder.prototype.text = function (text, append) {\n if (append) {\n // children is child Elements versus childNodes includes textNodes\n if (this.currentElement.children.length === 0) {\n this.currentElement.textContent += text;\n }\n else {\n // if there are elements inside this node, append the string as a new text node\n // to avoid wiping out the innerHTML and replacing it with only text content\n this.currentElement.appendChild(document.createTextNode(text));\n }\n }\n else {\n this.currentElement.textContent = text;\n }\n return this;\n };\n /**\n * Sets the innerHTML attribute in escaped form.\n */\n Builder.prototype.safeInnerHtml = function (html, append) {\n return this.innerHtml(strings.escape(html), append);\n };\n /**\n * Allows to store arbritary data into the current element.\n */\n Builder.prototype.setProperty = function (key, value) {\n setPropertyOnElement(this.currentElement, key, value);\n return this;\n };\n /**\n * Allows to get arbritary data from the current element.\n */\n Builder.prototype.getProperty = function (key, fallback) {\n return getPropertyFromElement(this.currentElement, key, fallback);\n };\n /**\n * Removes a property from the current element that is stored under the given key.\n */\n Builder.prototype.removeProperty = function (key) {\n if (hasData(this.currentElement)) {\n delete data(this.currentElement)[key];\n }\n return this;\n };\n /**\n * Recurse through all descendant nodes and remove their data binding.\n */\n Builder.prototype.unbindDescendants = function (current) {\n if (current && current.children) {\n for (var i = 0, length_1 = current.children.length; i < length_1; i++) {\n var element = current.children.item(i);\n // Unbind\n if (hasData(element)) {\n // Listeners\n var listeners = data(element)[LISTENER_BINDING_ID];\n if (types.isArray(listeners)) {\n while (listeners.length) {\n listeners.pop().dispose();\n }\n }\n // Delete Data Slot\n delete element[MS_DATA_KEY];\n }\n // Recurse\n this.unbindDescendants(element);\n }\n }\n };\n /**\n * Removes all HTML elements from the current element of the builder. Will also clean up any\n * event listners registered and also clear any data binding and properties stored\n * to any child element.\n */\n Builder.prototype.empty = function () {\n this.unbindDescendants(this.currentElement);\n this.clearChildren();\n if (this.offdom) {\n this.createdElements = [];\n }\n return this;\n };\n /**\n * Removes all HTML elements from the current element of the builder.\n */\n Builder.prototype.clearChildren = function () {\n // Remove Elements\n if (this.currentElement) {\n DOM.clearNode(this.currentElement);\n }\n return this;\n };\n /**\n * Removes the current HTML element and all its children from its parent and unbinds\n * all listeners and properties set to the data slots.\n */\n Builder.prototype.destroy = function () {\n if (this.currentElement) {\n // Remove from parent\n if (this.currentElement.parentNode) {\n this.currentElement.parentNode.removeChild(this.currentElement);\n }\n // Empty to clear listeners and bindings from children\n this.empty();\n // Unbind\n if (hasData(this.currentElement)) {\n // Listeners\n var listeners = data(this.currentElement)[LISTENER_BINDING_ID];\n if (types.isArray(listeners)) {\n while (listeners.length) {\n listeners.pop().dispose();\n }\n }\n // Delete Data Slot\n delete this.currentElement[MS_DATA_KEY];\n }\n }\n var type;\n for (type in this.toDispose) {\n if (this.toDispose.hasOwnProperty(type) && types.isArray(this.toDispose[type])) {\n this.toDispose[type] = dispose(this.toDispose[type]);\n }\n }\n for (type in this.captureToDispose) {\n if (this.captureToDispose.hasOwnProperty(type) && types.isArray(this.captureToDispose[type])) {\n this.captureToDispose[type] = dispose(this.captureToDispose[type]);\n }\n }\n // Nullify fields\n this.currentElement = null;\n this.container = null;\n this.offdom = null;\n this.createdElements = null;\n this.captureToDispose = null;\n this.toDispose = null;\n };\n /**\n * Removes the current HTML element and all its children from its parent and unbinds\n * all listeners and properties set to the data slots.\n */\n Builder.prototype.dispose = function () {\n this.destroy();\n };\n /**\n * Gets the size (in pixels) of an element, including the margin.\n */\n Builder.prototype.getTotalSize = function () {\n var totalWidth = DOM.getTotalWidth(this.currentElement);\n var totalHeight = DOM.getTotalHeight(this.currentElement);\n return new DOM.Dimension(totalWidth, totalHeight);\n };\n /**\n * Another variant of getting the inner dimensions of an element.\n */\n Builder.prototype.getClientArea = function () {\n return DOM.getClientArea(this.currentElement);\n };\n return Builder;\n}());\nexport { Builder };\n/**\n * The multi builder provides the same methods as the builder, but allows to call\n * them on an array of builders.\n */\nvar MultiBuilder = /** @class */ (function (_super) {\n __extends(MultiBuilder, _super);\n function MultiBuilder(builders) {\n var _this = this;\n assert.ok(types.isArray(builders) || builders instanceof MultiBuilder, 'Expected Array or MultiBuilder as parameter');\n _this = _super.call(this) || this;\n _this.length = 0;\n _this.builders = [];\n // Add Builders to Array\n if (types.isArray(builders)) {\n for (var i = 0; i < builders.length; i++) {\n if (builders[i] instanceof HTMLElement) {\n _this.push(withElement(builders[i]));\n }\n else {\n _this.push(builders[i]);\n }\n }\n }\n else {\n for (var i = 0; i < builders.length; i++) {\n _this.push(builders.item(i));\n }\n }\n // Mixin Builder functions to operate on all builders\n var $outer = _this;\n var propertyFn = function (prop) {\n $outer[prop] = function () {\n var args = Array.prototype.slice.call(arguments);\n var returnValues;\n var mergeBuilders = false;\n for (var i = 0; i < $outer.length; i++) {\n var res = $outer.item(i)[prop].apply($outer.item(i), args);\n // Merge MultiBuilders into one\n if (res instanceof MultiBuilder) {\n if (!returnValues) {\n returnValues = [];\n }\n mergeBuilders = true;\n for (var j = 0; j < res.length; j++) {\n returnValues.push(res.item(j));\n }\n }\n // Any other Return Type (e.g. boolean, integer)\n else if (!types.isUndefined(res) && !(res instanceof Builder)) {\n if (!returnValues) {\n returnValues = [];\n }\n returnValues.push(res);\n }\n }\n if (returnValues && mergeBuilders) {\n return new MultiBuilder(returnValues);\n }\n return returnValues || $outer;\n };\n };\n for (var prop in Builder.prototype) {\n if (prop !== 'clone' && prop !== 'and') { // Skip methods that are explicitly defined in MultiBuilder\n if (Builder.prototype.hasOwnProperty(prop) && types.isFunction(Builder.prototype[prop])) {\n propertyFn(prop);\n }\n }\n }\n return _this;\n }\n MultiBuilder.prototype.item = function (i) {\n return this.builders[i];\n };\n MultiBuilder.prototype.push = function () {\n var items = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n items[_i] = arguments[_i];\n }\n for (var i = 0; i < items.length; i++) {\n this.builders.push(items[i]);\n }\n this.length = this.builders.length;\n };\n MultiBuilder.prototype.clone = function () {\n return new MultiBuilder(this);\n };\n return MultiBuilder;\n}(Builder));\nexport { MultiBuilder };\nfunction withBuilder(builder, offdom) {\n if (builder instanceof MultiBuilder) {\n return new MultiBuilder(builder);\n }\n return new Builder(builder.getHTMLElement(), offdom);\n}\nexport function withElement(element, offdom) {\n return new Builder(element, offdom);\n}\nfunction offDOM() {\n return new Builder(null, true);\n}\n// Binding functions\n/**\n * Allows to store arbritary data into element.\n */\nexport function setPropertyOnElement(element, key, value) {\n data(element)[key] = value;\n}\n/**\n * Allows to get arbritary data from element.\n */\nexport function getPropertyFromElement(element, key, fallback) {\n if (hasData(element)) {\n var value = data(element)[key];\n if (!types.isUndefined(value)) {\n return value;\n }\n }\n return fallback;\n}\nvar SELECTOR_REGEX = /([\\w\\-]+)?(#([\\w\\-]+))?((.([\\w\\-]+))*)/;\nexport var $ = function (arg) {\n // Off-DOM use\n if (types.isUndefined(arg)) {\n return offDOM();\n }\n // Falsified values cause error otherwise\n if (!arg) {\n throw new Error('Bad use of $');\n }\n // Wrap the given element\n if (DOM.isHTMLElement(arg) || arg === window) {\n return withElement(arg);\n }\n // Wrap the given builders\n if (types.isArray(arg)) {\n return new MultiBuilder(arg);\n }\n // Wrap the given builder\n if (arg instanceof Builder) {\n return withBuilder(arg);\n }\n if (types.isString(arg)) {\n // Use the argument as HTML code\n if (arg[0] === '<') {\n var element = void 0;\n var container = document.createElement('div');\n container.innerHTML = strings.format.apply(strings, arguments);\n if (container.children.length === 0) {\n throw new Error('Bad use of $');\n }\n if (container.children.length === 1) {\n element = container.firstChild;\n container.removeChild(element);\n return withElement(element);\n }\n var builders = [];\n while (container.firstChild) {\n element = container.firstChild;\n container.removeChild(element);\n builders.push(withElement(element));\n }\n return new MultiBuilder(builders);\n }\n // Use the argument as a selector constructor\n else if (arguments.length === 1) {\n var match = SELECTOR_REGEX.exec(arg);\n if (!match) {\n throw new Error('Bad use of $');\n }\n var tag = match[1] || 'div';\n var id = match[3] || undefined;\n var classes = (match[4] || '').replace(/\\./g, ' ');\n var props = {};\n if (id) {\n props['id'] = id;\n }\n if (classes) {\n props['class'] = classes;\n }\n return offDOM().element(tag, props);\n }\n // Use the arguments as the arguments to Builder#element(...)\n else {\n var result = offDOM();\n result.element.apply(result, arguments);\n return result;\n }\n }\n else {\n throw new Error('Bad use of $');\n }\n};\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport './actionbar.css';\nimport * as platform from '../../../common/platform';\nimport * as nls from '../../../../nls';\nimport * as lifecycle from '../../../common/lifecycle';\nimport { $ } from '../../builder';\nimport { Action, ActionRunner } from '../../../common/actions';\nimport * as DOM from '../../dom';\nimport * as types from '../../../common/types';\nimport { EventType, Gesture } from '../../touch';\nimport { StandardKeyboardEvent } from '../../keyboardEvent';\nimport { Emitter } from '../../../common/event';\nvar BaseActionItem = /** @class */ (function () {\n function BaseActionItem(context, action, options) {\n var _this = this;\n this.options = options;\n this._callOnDispose = [];\n this._context = context || this;\n this._action = action;\n if (action instanceof Action) {\n this._callOnDispose.push(action.onDidChange(function (event) {\n if (!_this.builder) {\n // we have not been rendered yet, so there\n // is no point in updating the UI\n return;\n }\n _this._handleActionChangeEvent(event);\n }));\n }\n }\n BaseActionItem.prototype._handleActionChangeEvent = function (event) {\n if (event.enabled !== void 0) {\n this._updateEnabled();\n }\n if (event.checked !== void 0) {\n this._updateChecked();\n }\n if (event.class !== void 0) {\n this._updateClass();\n }\n if (event.label !== void 0) {\n this._updateLabel();\n this._updateTooltip();\n }\n if (event.tooltip !== void 0) {\n this._updateTooltip();\n }\n };\n Object.defineProperty(BaseActionItem.prototype, \"actionRunner\", {\n get: function () {\n return this._actionRunner;\n },\n set: function (actionRunner) {\n this._actionRunner = actionRunner;\n },\n enumerable: true,\n configurable: true\n });\n BaseActionItem.prototype.getAction = function () {\n return this._action;\n };\n BaseActionItem.prototype.isEnabled = function () {\n return this._action.enabled;\n };\n BaseActionItem.prototype.setActionContext = function (newContext) {\n this._context = newContext;\n };\n BaseActionItem.prototype.render = function (container) {\n var _this = this;\n this.builder = $(container);\n Gesture.addTarget(container);\n var enableDragging = this.options && this.options.draggable;\n if (enableDragging) {\n container.draggable = true;\n }\n this.builder.on(EventType.Tap, function (e) { return _this.onClick(e); });\n this.builder.on(DOM.EventType.MOUSE_DOWN, function (e) {\n if (!enableDragging) {\n DOM.EventHelper.stop(e, true); // do not run when dragging is on because that would disable it\n }\n var mouseEvent = e;\n if (_this._action.enabled && mouseEvent.button === 0) {\n _this.builder.addClass('active');\n }\n });\n this.builder.on(DOM.EventType.CLICK, function (e) {\n DOM.EventHelper.stop(e, true);\n // See https://developer.mozilla.org/en-US/Add-ons/WebExtensions/Interact_with_the_clipboard\n // > Writing to the clipboard\n // > You can use the \"cut\" and \"copy\" commands without any special\n // permission if you are using them in a short-lived event handler\n // for a user action (for example, a click handler).\n // => to get the Copy and Paste context menu actions working on Firefox,\n // there should be no timeout here\n if (_this.options && _this.options.isMenu) {\n _this.onClick(e);\n }\n else {\n platform.setImmediate(function () { return _this.onClick(e); });\n }\n });\n this.builder.on([DOM.EventType.MOUSE_UP, DOM.EventType.MOUSE_OUT], function (e) {\n DOM.EventHelper.stop(e);\n _this.builder.removeClass('active');\n });\n };\n BaseActionItem.prototype.onClick = function (event) {\n DOM.EventHelper.stop(event, true);\n var context;\n if (types.isUndefinedOrNull(this._context) || !types.isObject(this._context)) {\n context = event;\n }\n else {\n context = this._context;\n context.event = event;\n }\n this._actionRunner.run(this._action, context);\n };\n BaseActionItem.prototype._updateEnabled = function () {\n // implement in subclass\n };\n BaseActionItem.prototype._updateLabel = function () {\n // implement in subclass\n };\n BaseActionItem.prototype._updateTooltip = function () {\n // implement in subclass\n };\n BaseActionItem.prototype._updateClass = function () {\n // implement in subclass\n };\n BaseActionItem.prototype._updateChecked = function () {\n // implement in subclass\n };\n BaseActionItem.prototype.dispose = function () {\n if (this.builder) {\n this.builder.destroy();\n this.builder = null;\n }\n this._callOnDispose = lifecycle.dispose(this._callOnDispose);\n };\n return BaseActionItem;\n}());\nexport { BaseActionItem };\nvar Separator = /** @class */ (function (_super) {\n __extends(Separator, _super);\n function Separator(label, order) {\n var _this = _super.call(this, Separator.ID, label, label ? 'separator text' : 'separator') || this;\n _this.checked = false;\n _this.radio = false;\n _this.enabled = false;\n _this.order = order;\n return _this;\n }\n Separator.ID = 'vs.actions.separator';\n return Separator;\n}(Action));\nexport { Separator };\nvar ActionItem = /** @class */ (function (_super) {\n __extends(ActionItem, _super);\n function ActionItem(context, action, options) {\n if (options === void 0) { options = {}; }\n var _this = _super.call(this, context, action, options) || this;\n _this.options = options;\n _this.options.icon = options.icon !== undefined ? options.icon : false;\n _this.options.label = options.label !== undefined ? options.label : true;\n _this.cssClass = '';\n return _this;\n }\n ActionItem.prototype.render = function (container) {\n _super.prototype.render.call(this, container);\n this.$e = $('a.action-label').appendTo(this.builder);\n if (this._action.id === Separator.ID) {\n // A separator is a presentation item\n this.$e.attr({ role: 'presentation' });\n }\n else {\n if (this.options.isMenu) {\n this.$e.attr({ role: 'menuitem' });\n }\n else {\n this.$e.attr({ role: 'button' });\n }\n }\n if (this.options.label && this.options.keybinding) {\n $('span.keybinding').text(this.options.keybinding).appendTo(this.builder);\n }\n this._updateClass();\n this._updateLabel();\n this._updateTooltip();\n this._updateEnabled();\n this._updateChecked();\n };\n ActionItem.prototype._updateLabel = function () {\n if (this.options.label) {\n this.$e.text(this.getAction().label);\n }\n };\n ActionItem.prototype._updateTooltip = function () {\n var title = null;\n if (this.getAction().tooltip) {\n title = this.getAction().tooltip;\n }\n else if (!this.options.label && this.getAction().label && this.options.icon) {\n title = this.getAction().label;\n if (this.options.keybinding) {\n title = nls.localize({ key: 'titleLabel', comment: ['action title', 'action keybinding'] }, \"{0} ({1})\", title, this.options.keybinding);\n }\n }\n if (title) {\n this.$e.attr({ title: title });\n }\n };\n ActionItem.prototype._updateClass = function () {\n if (this.cssClass) {\n this.$e.removeClass(this.cssClass);\n }\n if (this.options.icon) {\n this.cssClass = this.getAction().class;\n this.$e.addClass('icon');\n if (this.cssClass) {\n this.$e.addClass(this.cssClass);\n }\n this._updateEnabled();\n }\n else {\n this.$e.removeClass('icon');\n }\n };\n ActionItem.prototype._updateEnabled = function () {\n if (this.getAction().enabled) {\n this.builder.removeClass('disabled');\n this.$e.removeClass('disabled');\n this.$e.attr({ tabindex: 0 });\n }\n else {\n this.builder.addClass('disabled');\n this.$e.addClass('disabled');\n DOM.removeTabIndexAndUpdateFocus(this.$e.getHTMLElement());\n }\n };\n ActionItem.prototype._updateChecked = function () {\n if (this.getAction().checked) {\n this.$e.addClass('checked');\n }\n else {\n this.$e.removeClass('checked');\n }\n };\n return ActionItem;\n}(BaseActionItem));\nexport { ActionItem };\nexport var ActionsOrientation;\n(function (ActionsOrientation) {\n ActionsOrientation[ActionsOrientation[\"HORIZONTAL\"] = 0] = \"HORIZONTAL\";\n ActionsOrientation[ActionsOrientation[\"HORIZONTAL_REVERSE\"] = 1] = \"HORIZONTAL_REVERSE\";\n ActionsOrientation[ActionsOrientation[\"VERTICAL\"] = 2] = \"VERTICAL\";\n ActionsOrientation[ActionsOrientation[\"VERTICAL_REVERSE\"] = 3] = \"VERTICAL_REVERSE\";\n})(ActionsOrientation || (ActionsOrientation = {}));\nvar defaultOptions = {\n orientation: ActionsOrientation.HORIZONTAL,\n context: null\n};\nvar ActionBar = /** @class */ (function () {\n function ActionBar(container, options) {\n if (options === void 0) { options = defaultOptions; }\n var _this = this;\n this._onDidBlur = new Emitter();\n this._onDidCancel = new Emitter();\n this._onDidRun = new Emitter();\n this._onDidBeforeRun = new Emitter();\n this.options = options;\n this._context = options.context;\n this.toDispose = [];\n this._actionRunner = this.options.actionRunner;\n if (!this._actionRunner) {\n this._actionRunner = new ActionRunner();\n this.toDispose.push(this._actionRunner);\n }\n this.toDispose.push(this._actionRunner.onDidRun(function (e) { return _this._onDidRun.fire(e); }));\n this.toDispose.push(this._actionRunner.onDidBeforeRun(function (e) { return _this._onDidBeforeRun.fire(e); }));\n this.items = [];\n this.focusedItem = undefined;\n this.domNode = document.createElement('div');\n this.domNode.className = 'monaco-action-bar';\n if (options.animated !== false) {\n DOM.addClass(this.domNode, 'animated');\n }\n var previousKey;\n var nextKey;\n switch (this.options.orientation) {\n case ActionsOrientation.HORIZONTAL:\n previousKey = 15 /* LeftArrow */;\n nextKey = 17 /* RightArrow */;\n break;\n case ActionsOrientation.HORIZONTAL_REVERSE:\n previousKey = 17 /* RightArrow */;\n nextKey = 15 /* LeftArrow */;\n this.domNode.className += ' reverse';\n break;\n case ActionsOrientation.VERTICAL:\n previousKey = 16 /* UpArrow */;\n nextKey = 18 /* DownArrow */;\n this.domNode.className += ' vertical';\n break;\n case ActionsOrientation.VERTICAL_REVERSE:\n previousKey = 18 /* DownArrow */;\n nextKey = 16 /* UpArrow */;\n this.domNode.className += ' vertical reverse';\n break;\n }\n $(this.domNode).on(DOM.EventType.KEY_DOWN, function (e) {\n var event = new StandardKeyboardEvent(e);\n var eventHandled = true;\n if (event.equals(previousKey)) {\n _this.focusPrevious();\n }\n else if (event.equals(nextKey)) {\n _this.focusNext();\n }\n else if (event.equals(9 /* Escape */)) {\n _this.cancel();\n }\n else if (event.equals(3 /* Enter */) || event.equals(10 /* Space */)) {\n // Nothing, just staying out of the else branch\n }\n else {\n eventHandled = false;\n }\n if (eventHandled) {\n event.preventDefault();\n event.stopPropagation();\n }\n });\n $(this.domNode).on(DOM.EventType.KEY_UP, function (e) {\n var event = new StandardKeyboardEvent(e);\n // Run action on Enter/Space\n if (event.equals(3 /* Enter */) || event.equals(10 /* Space */)) {\n _this.doTrigger(event);\n event.preventDefault();\n event.stopPropagation();\n }\n // Recompute focused item\n else if (event.equals(2 /* Tab */) || event.equals(1024 /* Shift */ | 2 /* Tab */)) {\n _this.updateFocusedItem();\n }\n });\n this.focusTracker = DOM.trackFocus(this.domNode);\n this.toDispose.push(this.focusTracker.onDidBlur(function () {\n if (document.activeElement === _this.domNode || !DOM.isAncestor(document.activeElement, _this.domNode)) {\n _this._onDidBlur.fire();\n _this.focusedItem = undefined;\n }\n }));\n this.toDispose.push(this.focusTracker.onDidFocus(function () { return _this.updateFocusedItem(); }));\n this.actionsList = document.createElement('ul');\n this.actionsList.className = 'actions-container';\n if (this.options.isMenu) {\n this.actionsList.setAttribute('role', 'menu');\n }\n else {\n this.actionsList.setAttribute('role', 'toolbar');\n }\n if (this.options.ariaLabel) {\n this.actionsList.setAttribute('aria-label', this.options.ariaLabel);\n }\n if (this.options.isMenu) {\n this.domNode.tabIndex = 0;\n $(this.domNode).on(DOM.EventType.MOUSE_OUT, function (e) {\n var relatedTarget = e.relatedTarget;\n if (!DOM.isAncestor(relatedTarget, _this.domNode)) {\n _this.focusedItem = undefined;\n _this.updateFocus();\n e.stopPropagation();\n }\n });\n $(this.actionsList).on(DOM.EventType.MOUSE_OVER, function (e) {\n var target = e.target;\n if (!target || !DOM.isAncestor(target, _this.actionsList) || target === _this.actionsList) {\n return;\n }\n while (target.parentElement !== _this.actionsList) {\n target = target.parentElement;\n }\n if (DOM.hasClass(target, 'action-item')) {\n var lastFocusedItem = _this.focusedItem;\n _this.setFocusedItem(target);\n if (lastFocusedItem !== _this.focusedItem) {\n _this.updateFocus();\n }\n }\n });\n }\n this.domNode.appendChild(this.actionsList);\n container.appendChild(this.domNode);\n }\n Object.defineProperty(ActionBar.prototype, \"onDidBlur\", {\n get: function () {\n return this._onDidBlur.event;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ActionBar.prototype, \"onDidCancel\", {\n get: function () {\n return this._onDidCancel.event;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ActionBar.prototype, \"onDidRun\", {\n get: function () {\n return this._onDidRun.event;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ActionBar.prototype, \"onDidBeforeRun\", {\n get: function () {\n return this._onDidBeforeRun.event;\n },\n enumerable: true,\n configurable: true\n });\n ActionBar.prototype.setFocusedItem = function (element) {\n for (var i = 0; i < this.actionsList.children.length; i++) {\n var elem = this.actionsList.children[i];\n if (element === elem) {\n this.focusedItem = i;\n break;\n }\n }\n };\n ActionBar.prototype.updateFocusedItem = function () {\n for (var i = 0; i < this.actionsList.children.length; i++) {\n var elem = this.actionsList.children[i];\n if (DOM.isAncestor(document.activeElement, elem)) {\n this.focusedItem = i;\n break;\n }\n }\n };\n Object.defineProperty(ActionBar.prototype, \"context\", {\n get: function () {\n return this._context;\n },\n set: function (context) {\n this._context = context;\n this.items.forEach(function (i) { return i.setActionContext(context); });\n },\n enumerable: true,\n configurable: true\n });\n ActionBar.prototype.getContainer = function () {\n return this.domNode;\n };\n ActionBar.prototype.push = function (arg, options) {\n var _this = this;\n if (options === void 0) { options = {}; }\n var actions = !Array.isArray(arg) ? [arg] : arg;\n var index = types.isNumber(options.index) ? options.index : null;\n actions.forEach(function (action) {\n var actionItemElement = document.createElement('li');\n actionItemElement.className = 'action-item';\n actionItemElement.setAttribute('role', 'presentation');\n // Prevent native context menu on actions\n $(actionItemElement).on(DOM.EventType.CONTEXT_MENU, function (e) {\n e.preventDefault();\n e.stopPropagation();\n });\n var item = null;\n if (_this.options.actionItemProvider) {\n item = _this.options.actionItemProvider(action);\n }\n if (!item) {\n item = new ActionItem(_this.context, action, options);\n }\n item.actionRunner = _this._actionRunner;\n item.setActionContext(_this.context);\n item.render(actionItemElement);\n if (index === null || index < 0 || index >= _this.actionsList.children.length) {\n _this.actionsList.appendChild(actionItemElement);\n _this.items.push(item);\n }\n else {\n _this.actionsList.insertBefore(actionItemElement, _this.actionsList.children[index]);\n _this.items.splice(index, 0, item);\n index++;\n }\n });\n };\n ActionBar.prototype.clear = function () {\n this.items = lifecycle.dispose(this.items);\n $(this.actionsList).empty();\n };\n ActionBar.prototype.isEmpty = function () {\n return this.items.length === 0;\n };\n ActionBar.prototype.focus = function (selectFirst) {\n if (selectFirst && typeof this.focusedItem === 'undefined') {\n // Focus the first enabled item\n this.focusedItem = this.items.length - 1;\n this.focusNext();\n }\n else {\n this.updateFocus();\n }\n };\n ActionBar.prototype.focusNext = function () {\n if (typeof this.focusedItem === 'undefined') {\n this.focusedItem = this.items.length - 1;\n }\n var startIndex = this.focusedItem;\n var item;\n do {\n this.focusedItem = (this.focusedItem + 1) % this.items.length;\n item = this.items[this.focusedItem];\n } while (this.focusedItem !== startIndex && !item.isEnabled());\n if (this.focusedItem === startIndex && !item.isEnabled()) {\n this.focusedItem = undefined;\n }\n this.updateFocus();\n };\n ActionBar.prototype.focusPrevious = function () {\n if (typeof this.focusedItem === 'undefined') {\n this.focusedItem = 0;\n }\n var startIndex = this.focusedItem;\n var item;\n do {\n this.focusedItem = this.focusedItem - 1;\n if (this.focusedItem < 0) {\n this.focusedItem = this.items.length - 1;\n }\n item = this.items[this.focusedItem];\n } while (this.focusedItem !== startIndex && !item.isEnabled());\n if (this.focusedItem === startIndex && !item.isEnabled()) {\n this.focusedItem = undefined;\n }\n this.updateFocus(true);\n };\n ActionBar.prototype.updateFocus = function (fromRight) {\n if (typeof this.focusedItem === 'undefined') {\n this.domNode.focus();\n }\n for (var i = 0; i < this.items.length; i++) {\n var item = this.items[i];\n var actionItem = item;\n if (i === this.focusedItem) {\n if (types.isFunction(actionItem.isEnabled)) {\n if (actionItem.isEnabled() && types.isFunction(actionItem.focus)) {\n actionItem.focus(fromRight);\n }\n else {\n this.domNode.focus();\n }\n }\n }\n else {\n if (types.isFunction(actionItem.blur)) {\n actionItem.blur();\n }\n }\n }\n };\n ActionBar.prototype.doTrigger = function (event) {\n if (typeof this.focusedItem === 'undefined') {\n return; //nothing to focus\n }\n // trigger action\n var actionItem = this.items[this.focusedItem];\n if (actionItem instanceof BaseActionItem) {\n var context = (actionItem._context === null || actionItem._context === undefined) ? event : actionItem._context;\n this.run(actionItem._action, context).done();\n }\n };\n ActionBar.prototype.cancel = function () {\n if (document.activeElement instanceof HTMLElement) {\n document.activeElement.blur(); // remove focus from focused action\n }\n this._onDidCancel.fire();\n };\n ActionBar.prototype.run = function (action, context) {\n return this._actionRunner.run(action, context);\n };\n ActionBar.prototype.dispose = function () {\n if (this.items !== null) {\n lifecycle.dispose(this.items);\n }\n this.items = null;\n if (this.focusTracker) {\n this.focusTracker.dispose();\n this.focusTracker = null;\n }\n this.toDispose = lifecycle.dispose(this.toDispose);\n $(this.getContainer()).destroy();\n };\n return ActionBar;\n}());\nexport { ActionBar };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport './media/diffReview.css';\nimport * as nls from '../../../nls';\nimport { Disposable } from '../../../base/common/lifecycle';\nimport * as dom from '../../../base/browser/dom';\nimport { createFastDomNode } from '../../../base/browser/fastDomNode';\nimport { renderViewLine2 as renderViewLine, RenderLineInput } from '../../common/viewLayout/viewLineRenderer';\nimport { LineTokens } from '../../common/core/lineTokens';\nimport { Configuration } from '../config/configuration';\nimport { Position } from '../../common/core/position';\nimport { registerThemingParticipant } from '../../../platform/theme/common/themeService';\nimport { scrollbarShadow } from '../../../platform/theme/common/colorRegistry';\nimport { DomScrollableElement } from '../../../base/browser/ui/scrollbar/scrollableElement';\nimport { editorLineNumbers } from '../../common/view/editorColorRegistry';\nimport { ActionBar } from '../../../base/browser/ui/actionbar/actionbar';\nimport { Action } from '../../../base/common/actions';\nimport { registerEditorAction, EditorAction } from '../editorExtensions';\nimport { ContextKeyExpr } from '../../../platform/contextkey/common/contextkey';\nimport { ICodeEditorService } from '../services/codeEditorService';\nimport { ViewLineRenderingData } from '../../common/viewModel/viewModel';\nvar DIFF_LINES_PADDING = 3;\nvar DiffEntry = /** @class */ (function () {\n function DiffEntry(originalLineStart, originalLineEnd, modifiedLineStart, modifiedLineEnd) {\n this.originalLineStart = originalLineStart;\n this.originalLineEnd = originalLineEnd;\n this.modifiedLineStart = modifiedLineStart;\n this.modifiedLineEnd = modifiedLineEnd;\n }\n DiffEntry.prototype.getType = function () {\n if (this.originalLineStart === 0) {\n return 1 /* Insert */;\n }\n if (this.modifiedLineStart === 0) {\n return 2 /* Delete */;\n }\n return 0 /* Equal */;\n };\n return DiffEntry;\n}());\nvar Diff = /** @class */ (function () {\n function Diff(entries) {\n this.entries = entries;\n }\n return Diff;\n}());\nvar DiffReview = /** @class */ (function (_super) {\n __extends(DiffReview, _super);\n function DiffReview(diffEditor) {\n var _this = _super.call(this) || this;\n _this._width = 0;\n _this._diffEditor = diffEditor;\n _this._isVisible = false;\n _this.shadow = createFastDomNode(document.createElement('div'));\n _this.shadow.setClassName('diff-review-shadow');\n _this.actionBarContainer = createFastDomNode(document.createElement('div'));\n _this.actionBarContainer.setClassName('diff-review-actions');\n _this._actionBar = _this._register(new ActionBar(_this.actionBarContainer.domNode));\n _this._actionBar.push(new Action('diffreview.close', nls.localize('label.close', \"Close\"), 'close-diff-review', true, function () {\n _this.hide();\n return null;\n }), { label: false, icon: true });\n _this.domNode = createFastDomNode(document.createElement('div'));\n _this.domNode.setClassName('diff-review monaco-editor-background');\n _this._content = createFastDomNode(document.createElement('div'));\n _this._content.setClassName('diff-review-content');\n _this.scrollbar = _this._register(new DomScrollableElement(_this._content.domNode, {}));\n _this.domNode.domNode.appendChild(_this.scrollbar.getDomNode());\n _this._register(diffEditor.onDidUpdateDiff(function () {\n if (!_this._isVisible) {\n return;\n }\n _this._diffs = _this._compute();\n _this._render();\n }));\n _this._register(diffEditor.getModifiedEditor().onDidChangeCursorPosition(function () {\n if (!_this._isVisible) {\n return;\n }\n _this._render();\n }));\n _this._register(diffEditor.getOriginalEditor().onDidFocusEditorWidget(function () {\n if (_this._isVisible) {\n _this.hide();\n }\n }));\n _this._register(diffEditor.getModifiedEditor().onDidFocusEditorWidget(function () {\n if (_this._isVisible) {\n _this.hide();\n }\n }));\n _this._register(dom.addStandardDisposableListener(_this.domNode.domNode, 'click', function (e) {\n e.preventDefault();\n var row = dom.findParentWithClass(e.target, 'diff-review-row');\n if (row) {\n _this._goToRow(row);\n }\n }));\n _this._register(dom.addStandardDisposableListener(_this.domNode.domNode, 'keydown', function (e) {\n if (e.equals(18 /* DownArrow */)\n || e.equals(2048 /* CtrlCmd */ | 18 /* DownArrow */)\n || e.equals(512 /* Alt */ | 18 /* DownArrow */)) {\n e.preventDefault();\n _this._goToRow(_this._getNextRow());\n }\n if (e.equals(16 /* UpArrow */)\n || e.equals(2048 /* CtrlCmd */ | 16 /* UpArrow */)\n || e.equals(512 /* Alt */ | 16 /* UpArrow */)) {\n e.preventDefault();\n _this._goToRow(_this._getPrevRow());\n }\n if (e.equals(9 /* Escape */)\n || e.equals(2048 /* CtrlCmd */ | 9 /* Escape */)\n || e.equals(512 /* Alt */ | 9 /* Escape */)\n || e.equals(1024 /* Shift */ | 9 /* Escape */)) {\n e.preventDefault();\n _this.hide();\n }\n if (e.equals(10 /* Space */)\n || e.equals(3 /* Enter */)) {\n e.preventDefault();\n _this.accept();\n }\n }));\n _this._diffs = [];\n _this._currentDiff = null;\n return _this;\n }\n DiffReview.prototype.prev = function () {\n var index = 0;\n if (!this._isVisible) {\n this._diffs = this._compute();\n }\n if (this._isVisible) {\n var currentIndex = -1;\n for (var i = 0, len = this._diffs.length; i < len; i++) {\n if (this._diffs[i] === this._currentDiff) {\n currentIndex = i;\n break;\n }\n }\n index = (this._diffs.length + currentIndex - 1);\n }\n else {\n index = this._findDiffIndex(this._diffEditor.getPosition());\n }\n if (this._diffs.length === 0) {\n // Nothing to do\n return;\n }\n index = index % this._diffs.length;\n this._diffEditor.setPosition(new Position(this._diffs[index].entries[0].modifiedLineStart, 1));\n this._isVisible = true;\n this._diffEditor.doLayout();\n this._render();\n this._goToRow(this._getNextRow());\n };\n DiffReview.prototype.next = function () {\n var index = 0;\n if (!this._isVisible) {\n this._diffs = this._compute();\n }\n if (this._isVisible) {\n var currentIndex = -1;\n for (var i = 0, len = this._diffs.length; i < len; i++) {\n if (this._diffs[i] === this._currentDiff) {\n currentIndex = i;\n break;\n }\n }\n index = (currentIndex + 1);\n }\n else {\n index = this._findDiffIndex(this._diffEditor.getPosition());\n }\n if (this._diffs.length === 0) {\n // Nothing to do\n return;\n }\n index = index % this._diffs.length;\n this._diffEditor.setPosition(new Position(this._diffs[index].entries[0].modifiedLineStart, 1));\n this._isVisible = true;\n this._diffEditor.doLayout();\n this._render();\n this._goToRow(this._getNextRow());\n };\n DiffReview.prototype.accept = function () {\n var jumpToLineNumber = -1;\n var current = this._getCurrentFocusedRow();\n if (current) {\n var lineNumber = parseInt(current.getAttribute('data-line'), 10);\n if (!isNaN(lineNumber)) {\n jumpToLineNumber = lineNumber;\n }\n }\n this.hide();\n if (jumpToLineNumber !== -1) {\n this._diffEditor.setPosition(new Position(jumpToLineNumber, 1));\n this._diffEditor.revealPosition(new Position(jumpToLineNumber, 1), 1 /* Immediate */);\n }\n };\n DiffReview.prototype.hide = function () {\n this._isVisible = false;\n this._diffEditor.focus();\n this._diffEditor.doLayout();\n this._render();\n };\n DiffReview.prototype._getPrevRow = function () {\n var current = this._getCurrentFocusedRow();\n if (!current) {\n return this._getFirstRow();\n }\n if (current.previousElementSibling) {\n return current.previousElementSibling;\n }\n return current;\n };\n DiffReview.prototype._getNextRow = function () {\n var current = this._getCurrentFocusedRow();\n if (!current) {\n return this._getFirstRow();\n }\n if (current.nextElementSibling) {\n return current.nextElementSibling;\n }\n return current;\n };\n DiffReview.prototype._getFirstRow = function () {\n return this.domNode.domNode.querySelector('.diff-review-row');\n };\n DiffReview.prototype._getCurrentFocusedRow = function () {\n var result = document.activeElement;\n if (result && /diff-review-row/.test(result.className)) {\n return result;\n }\n return null;\n };\n DiffReview.prototype._goToRow = function (row) {\n var prev = this._getCurrentFocusedRow();\n row.tabIndex = 0;\n row.focus();\n if (prev && prev !== row) {\n prev.tabIndex = -1;\n }\n this.scrollbar.scanDomNode();\n };\n DiffReview.prototype.isVisible = function () {\n return this._isVisible;\n };\n DiffReview.prototype.layout = function (top, width, height) {\n this._width = width;\n this.shadow.setTop(top - 6);\n this.shadow.setWidth(width);\n this.shadow.setHeight(this._isVisible ? 6 : 0);\n this.domNode.setTop(top);\n this.domNode.setWidth(width);\n this.domNode.setHeight(height);\n this._content.setHeight(height);\n this._content.setWidth(width);\n if (this._isVisible) {\n this.actionBarContainer.setAttribute('aria-hidden', 'false');\n this.actionBarContainer.setDisplay('block');\n }\n else {\n this.actionBarContainer.setAttribute('aria-hidden', 'true');\n this.actionBarContainer.setDisplay('none');\n }\n };\n DiffReview.prototype._compute = function () {\n var lineChanges = this._diffEditor.getLineChanges();\n if (!lineChanges || lineChanges.length === 0) {\n return [];\n }\n var originalModel = this._diffEditor.getOriginalEditor().getModel();\n var modifiedModel = this._diffEditor.getModifiedEditor().getModel();\n if (!originalModel || !modifiedModel) {\n return [];\n }\n return DiffReview._mergeAdjacent(lineChanges, originalModel.getLineCount(), modifiedModel.getLineCount());\n };\n DiffReview._mergeAdjacent = function (lineChanges, originalLineCount, modifiedLineCount) {\n if (!lineChanges || lineChanges.length === 0) {\n return [];\n }\n var diffs = [], diffsLength = 0;\n for (var i = 0, len = lineChanges.length; i < len; i++) {\n var lineChange = lineChanges[i];\n var originalStart = lineChange.originalStartLineNumber;\n var originalEnd = lineChange.originalEndLineNumber;\n var modifiedStart = lineChange.modifiedStartLineNumber;\n var modifiedEnd = lineChange.modifiedEndLineNumber;\n var r_1 = [], rLength_1 = 0;\n // Emit before anchors\n {\n var originalEqualAbove = (originalEnd === 0 ? originalStart : originalStart - 1);\n var modifiedEqualAbove = (modifiedEnd === 0 ? modifiedStart : modifiedStart - 1);\n // Make sure we don't step into the previous diff\n var minOriginal = 1;\n var minModified = 1;\n if (i > 0) {\n var prevLineChange = lineChanges[i - 1];\n if (prevLineChange.originalEndLineNumber === 0) {\n minOriginal = prevLineChange.originalStartLineNumber + 1;\n }\n else {\n minOriginal = prevLineChange.originalEndLineNumber + 1;\n }\n if (prevLineChange.modifiedEndLineNumber === 0) {\n minModified = prevLineChange.modifiedStartLineNumber + 1;\n }\n else {\n minModified = prevLineChange.modifiedEndLineNumber + 1;\n }\n }\n var fromOriginal = originalEqualAbove - DIFF_LINES_PADDING + 1;\n var fromModified = modifiedEqualAbove - DIFF_LINES_PADDING + 1;\n if (fromOriginal < minOriginal) {\n var delta = minOriginal - fromOriginal;\n fromOriginal = fromOriginal + delta;\n fromModified = fromModified + delta;\n }\n if (fromModified < minModified) {\n var delta = minModified - fromModified;\n fromOriginal = fromOriginal + delta;\n fromModified = fromModified + delta;\n }\n r_1[rLength_1++] = new DiffEntry(fromOriginal, originalEqualAbove, fromModified, modifiedEqualAbove);\n }\n // Emit deleted lines\n {\n if (originalEnd !== 0) {\n r_1[rLength_1++] = new DiffEntry(originalStart, originalEnd, 0, 0);\n }\n }\n // Emit inserted lines\n {\n if (modifiedEnd !== 0) {\n r_1[rLength_1++] = new DiffEntry(0, 0, modifiedStart, modifiedEnd);\n }\n }\n // Emit after anchors\n {\n var originalEqualBelow = (originalEnd === 0 ? originalStart + 1 : originalEnd + 1);\n var modifiedEqualBelow = (modifiedEnd === 0 ? modifiedStart + 1 : modifiedEnd + 1);\n // Make sure we don't step into the next diff\n var maxOriginal = originalLineCount;\n var maxModified = modifiedLineCount;\n if (i + 1 < len) {\n var nextLineChange = lineChanges[i + 1];\n if (nextLineChange.originalEndLineNumber === 0) {\n maxOriginal = nextLineChange.originalStartLineNumber;\n }\n else {\n maxOriginal = nextLineChange.originalStartLineNumber - 1;\n }\n if (nextLineChange.modifiedEndLineNumber === 0) {\n maxModified = nextLineChange.modifiedStartLineNumber;\n }\n else {\n maxModified = nextLineChange.modifiedStartLineNumber - 1;\n }\n }\n var toOriginal = originalEqualBelow + DIFF_LINES_PADDING - 1;\n var toModified = modifiedEqualBelow + DIFF_LINES_PADDING - 1;\n if (toOriginal > maxOriginal) {\n var delta = maxOriginal - toOriginal;\n toOriginal = toOriginal + delta;\n toModified = toModified + delta;\n }\n if (toModified > maxModified) {\n var delta = maxModified - toModified;\n toOriginal = toOriginal + delta;\n toModified = toModified + delta;\n }\n r_1[rLength_1++] = new DiffEntry(originalEqualBelow, toOriginal, modifiedEqualBelow, toModified);\n }\n diffs[diffsLength++] = new Diff(r_1);\n }\n // Merge adjacent diffs\n var curr = diffs[0].entries;\n var r = [], rLength = 0;\n for (var i = 1, len = diffs.length; i < len; i++) {\n var thisDiff = diffs[i].entries;\n var currLast = curr[curr.length - 1];\n var thisFirst = thisDiff[0];\n if (currLast.getType() === 0 /* Equal */\n && thisFirst.getType() === 0 /* Equal */\n && thisFirst.originalLineStart <= currLast.originalLineEnd) {\n // We are dealing with equal lines that overlap\n curr[curr.length - 1] = new DiffEntry(currLast.originalLineStart, thisFirst.originalLineEnd, currLast.modifiedLineStart, thisFirst.modifiedLineEnd);\n curr = curr.concat(thisDiff.slice(1));\n continue;\n }\n r[rLength++] = new Diff(curr);\n curr = thisDiff;\n }\n r[rLength++] = new Diff(curr);\n return r;\n };\n DiffReview.prototype._findDiffIndex = function (pos) {\n var lineNumber = pos.lineNumber;\n for (var i = 0, len = this._diffs.length; i < len; i++) {\n var diff = this._diffs[i].entries;\n var lastModifiedLine = diff[diff.length - 1].modifiedLineEnd;\n if (lineNumber <= lastModifiedLine) {\n return i;\n }\n }\n return 0;\n };\n DiffReview.prototype._render = function () {\n var originalOpts = this._diffEditor.getOriginalEditor().getConfiguration();\n var modifiedOpts = this._diffEditor.getModifiedEditor().getConfiguration();\n var originalModel = this._diffEditor.getOriginalEditor().getModel();\n var modifiedModel = this._diffEditor.getModifiedEditor().getModel();\n var originalModelOpts = originalModel.getOptions();\n var modifiedModelOpts = modifiedModel.getOptions();\n if (!this._isVisible || !originalModel || !modifiedModel) {\n dom.clearNode(this._content.domNode);\n this._currentDiff = null;\n this.scrollbar.scanDomNode();\n return;\n }\n var pos = this._diffEditor.getPosition();\n var diffIndex = this._findDiffIndex(pos);\n if (this._diffs[diffIndex] === this._currentDiff) {\n return;\n }\n this._currentDiff = this._diffs[diffIndex];\n var diffs = this._diffs[diffIndex].entries;\n var container = document.createElement('div');\n container.className = 'diff-review-table';\n container.setAttribute('role', 'list');\n Configuration.applyFontInfoSlow(container, modifiedOpts.fontInfo);\n var minOriginalLine = 0;\n var maxOriginalLine = 0;\n var minModifiedLine = 0;\n var maxModifiedLine = 0;\n for (var i = 0, len = diffs.length; i < len; i++) {\n var diffEntry = diffs[i];\n var originalLineStart = diffEntry.originalLineStart;\n var originalLineEnd = diffEntry.originalLineEnd;\n var modifiedLineStart = diffEntry.modifiedLineStart;\n var modifiedLineEnd = diffEntry.modifiedLineEnd;\n if (originalLineStart !== 0 && ((minOriginalLine === 0 || originalLineStart < minOriginalLine))) {\n minOriginalLine = originalLineStart;\n }\n if (originalLineEnd !== 0 && ((maxOriginalLine === 0 || originalLineEnd > maxOriginalLine))) {\n maxOriginalLine = originalLineEnd;\n }\n if (modifiedLineStart !== 0 && ((minModifiedLine === 0 || modifiedLineStart < minModifiedLine))) {\n minModifiedLine = modifiedLineStart;\n }\n if (modifiedLineEnd !== 0 && ((maxModifiedLine === 0 || modifiedLineEnd > maxModifiedLine))) {\n maxModifiedLine = modifiedLineEnd;\n }\n }\n var header = document.createElement('div');\n header.className = 'diff-review-row';\n var cell = document.createElement('div');\n cell.className = 'diff-review-cell diff-review-summary';\n var originalChangedLinesCnt = maxOriginalLine - minOriginalLine + 1;\n var modifiedChangedLinesCnt = maxModifiedLine - minModifiedLine + 1;\n cell.appendChild(document.createTextNode(diffIndex + 1 + \"/\" + this._diffs.length + \": @@ -\" + minOriginalLine + \",\" + originalChangedLinesCnt + \" +\" + minModifiedLine + \",\" + modifiedChangedLinesCnt + \" @@\"));\n header.setAttribute('data-line', String(minModifiedLine));\n var getAriaLines = function (lines) {\n if (lines === 0) {\n return nls.localize('no_lines', \"no lines\");\n }\n else if (lines === 1) {\n return nls.localize('one_line', \"1 line\");\n }\n else {\n return nls.localize('more_lines', \"{0} lines\", lines);\n }\n };\n var originalChangedLinesCntAria = getAriaLines(originalChangedLinesCnt);\n var modifiedChangedLinesCntAria = getAriaLines(modifiedChangedLinesCnt);\n header.setAttribute('aria-label', nls.localize({\n key: 'header',\n comment: [\n 'This is the ARIA label for a git diff header.',\n 'A git diff header looks like this: @@ -154,12 +159,39 @@.',\n 'That encodes that at original line 154 (which is now line 159), 12 lines were removed/changed with 39 lines.',\n 'Variables 0 and 1 refer to the diff index out of total number of diffs.',\n 'Variables 2 and 4 will be numbers (a line number).',\n 'Variables 3 and 5 will be \"no lines\", \"1 line\" or \"X lines\", localized separately.'\n ]\n }, \"Difference {0} of {1}: original {2}, {3}, modified {4}, {5}\", (diffIndex + 1), this._diffs.length, minOriginalLine, originalChangedLinesCntAria, minModifiedLine, modifiedChangedLinesCntAria));\n header.appendChild(cell);\n // @@ -504,7 +517,7 @@\n header.setAttribute('role', 'listitem');\n container.appendChild(header);\n var modLine = minModifiedLine;\n for (var i = 0, len = diffs.length; i < len; i++) {\n var diffEntry = diffs[i];\n DiffReview._renderSection(container, diffEntry, modLine, this._width, originalOpts, originalModel, originalModelOpts, modifiedOpts, modifiedModel, modifiedModelOpts);\n if (diffEntry.modifiedLineStart !== 0) {\n modLine = diffEntry.modifiedLineEnd;\n }\n }\n dom.clearNode(this._content.domNode);\n this._content.domNode.appendChild(container);\n this.scrollbar.scanDomNode();\n };\n DiffReview._renderSection = function (dest, diffEntry, modLine, width, originalOpts, originalModel, originalModelOpts, modifiedOpts, modifiedModel, modifiedModelOpts) {\n var type = diffEntry.getType();\n var rowClassName = 'diff-review-row';\n var lineNumbersExtraClassName = '';\n var spacerClassName = 'diff-review-spacer';\n switch (type) {\n case 1 /* Insert */:\n rowClassName = 'diff-review-row line-insert';\n lineNumbersExtraClassName = ' char-insert';\n spacerClassName = 'diff-review-spacer insert-sign';\n break;\n case 2 /* Delete */:\n rowClassName = 'diff-review-row line-delete';\n lineNumbersExtraClassName = ' char-delete';\n spacerClassName = 'diff-review-spacer delete-sign';\n break;\n }\n var originalLineStart = diffEntry.originalLineStart;\n var originalLineEnd = diffEntry.originalLineEnd;\n var modifiedLineStart = diffEntry.modifiedLineStart;\n var modifiedLineEnd = diffEntry.modifiedLineEnd;\n var cnt = Math.max(modifiedLineEnd - modifiedLineStart, originalLineEnd - originalLineStart);\n var originalLineNumbersWidth = originalOpts.layoutInfo.glyphMarginWidth + originalOpts.layoutInfo.lineNumbersWidth;\n var modifiedLineNumbersWidth = 10 + modifiedOpts.layoutInfo.glyphMarginWidth + modifiedOpts.layoutInfo.lineNumbersWidth;\n for (var i = 0; i <= cnt; i++) {\n var originalLine = (originalLineStart === 0 ? 0 : originalLineStart + i);\n var modifiedLine = (modifiedLineStart === 0 ? 0 : modifiedLineStart + i);\n var row = document.createElement('div');\n row.style.minWidth = width + 'px';\n row.className = rowClassName;\n row.setAttribute('role', 'listitem');\n if (modifiedLine !== 0) {\n modLine = modifiedLine;\n }\n row.setAttribute('data-line', String(modLine));\n var cell = document.createElement('div');\n cell.className = 'diff-review-cell';\n row.appendChild(cell);\n var originalLineNumber = document.createElement('span');\n originalLineNumber.style.width = (originalLineNumbersWidth + 'px');\n originalLineNumber.style.minWidth = (originalLineNumbersWidth + 'px');\n originalLineNumber.className = 'diff-review-line-number' + lineNumbersExtraClassName;\n if (originalLine !== 0) {\n originalLineNumber.appendChild(document.createTextNode(String(originalLine)));\n }\n else {\n originalLineNumber.innerHTML = ' ';\n }\n cell.appendChild(originalLineNumber);\n var modifiedLineNumber = document.createElement('span');\n modifiedLineNumber.style.width = (modifiedLineNumbersWidth + 'px');\n modifiedLineNumber.style.minWidth = (modifiedLineNumbersWidth + 'px');\n modifiedLineNumber.style.paddingRight = '10px';\n modifiedLineNumber.className = 'diff-review-line-number' + lineNumbersExtraClassName;\n if (modifiedLine !== 0) {\n modifiedLineNumber.appendChild(document.createTextNode(String(modifiedLine)));\n }\n else {\n modifiedLineNumber.innerHTML = ' ';\n }\n cell.appendChild(modifiedLineNumber);\n var spacer = document.createElement('span');\n spacer.className = spacerClassName;\n spacer.innerHTML = '  ';\n cell.appendChild(spacer);\n var lineContent = void 0;\n if (modifiedLine !== 0) {\n cell.insertAdjacentHTML('beforeend', this._renderLine(modifiedModel, modifiedOpts, modifiedModelOpts.tabSize, modifiedLine));\n lineContent = modifiedModel.getLineContent(modifiedLine);\n }\n else {\n cell.insertAdjacentHTML('beforeend', this._renderLine(originalModel, originalOpts, originalModelOpts.tabSize, originalLine));\n lineContent = originalModel.getLineContent(originalLine);\n }\n if (lineContent.length === 0) {\n lineContent = nls.localize('blankLine', \"blank\");\n }\n var ariaLabel = void 0;\n switch (type) {\n case 0 /* Equal */:\n ariaLabel = nls.localize('equalLine', \"original {0}, modified {1}: {2}\", originalLine, modifiedLine, lineContent);\n break;\n case 1 /* Insert */:\n ariaLabel = nls.localize('insertLine', \"+ modified {0}: {1}\", modifiedLine, lineContent);\n break;\n case 2 /* Delete */:\n ariaLabel = nls.localize('deleteLine', \"- original {0}: {1}\", originalLine, lineContent);\n break;\n }\n row.setAttribute('aria-label', ariaLabel);\n dest.appendChild(row);\n }\n };\n DiffReview._renderLine = function (model, config, tabSize, lineNumber) {\n var lineContent = model.getLineContent(lineNumber);\n var defaultMetadata = ((0 /* None */ << 11 /* FONT_STYLE_OFFSET */)\n | (1 /* DefaultForeground */ << 14 /* FOREGROUND_OFFSET */)\n | (2 /* DefaultBackground */ << 23 /* BACKGROUND_OFFSET */)) >>> 0;\n var tokens = new Uint32Array(2);\n tokens[0] = lineContent.length;\n tokens[1] = defaultMetadata;\n var lineTokens = new LineTokens(tokens, lineContent);\n var isBasicASCII = ViewLineRenderingData.isBasicASCII(lineContent, model.mightContainNonBasicASCII());\n var containsRTL = ViewLineRenderingData.containsRTL(lineContent, isBasicASCII, model.mightContainRTL());\n var r = renderViewLine(new RenderLineInput((config.fontInfo.isMonospace && !config.viewInfo.disableMonospaceOptimizations), lineContent, false, isBasicASCII, containsRTL, 0, lineTokens, [], tabSize, config.fontInfo.spaceWidth, config.viewInfo.stopRenderingLineAfter, config.viewInfo.renderWhitespace, config.viewInfo.renderControlCharacters, config.viewInfo.fontLigatures));\n return r.html;\n };\n return DiffReview;\n}(Disposable));\nexport { DiffReview };\n// theming\nregisterThemingParticipant(function (theme, collector) {\n var lineNumbers = theme.getColor(editorLineNumbers);\n if (lineNumbers) {\n collector.addRule(\".monaco-diff-editor .diff-review-line-number { color: \" + lineNumbers + \"; }\");\n }\n var shadow = theme.getColor(scrollbarShadow);\n if (shadow) {\n collector.addRule(\".monaco-diff-editor .diff-review-shadow { box-shadow: \" + shadow + \" 0 -6px 6px -6px inset; }\");\n }\n});\nvar DiffReviewNext = /** @class */ (function (_super) {\n __extends(DiffReviewNext, _super);\n function DiffReviewNext() {\n return _super.call(this, {\n id: 'editor.action.diffReview.next',\n label: nls.localize('editor.action.diffReview.next', \"Go to Next Difference\"),\n alias: 'Go to Next Difference',\n precondition: ContextKeyExpr.has('isInDiffEditor'),\n kbOpts: {\n kbExpr: null,\n primary: 65 /* F7 */,\n weight: 100 /* EditorContrib */\n }\n }) || this;\n }\n DiffReviewNext.prototype.run = function (accessor, editor) {\n var diffEditor = findFocusedDiffEditor(accessor);\n if (diffEditor) {\n diffEditor.diffReviewNext();\n }\n };\n return DiffReviewNext;\n}(EditorAction));\nvar DiffReviewPrev = /** @class */ (function (_super) {\n __extends(DiffReviewPrev, _super);\n function DiffReviewPrev() {\n return _super.call(this, {\n id: 'editor.action.diffReview.prev',\n label: nls.localize('editor.action.diffReview.prev', \"Go to Previous Difference\"),\n alias: 'Go to Previous Difference',\n precondition: ContextKeyExpr.has('isInDiffEditor'),\n kbOpts: {\n kbExpr: null,\n primary: 1024 /* Shift */ | 65 /* F7 */,\n weight: 100 /* EditorContrib */\n }\n }) || this;\n }\n DiffReviewPrev.prototype.run = function (accessor, editor) {\n var diffEditor = findFocusedDiffEditor(accessor);\n if (diffEditor) {\n diffEditor.diffReviewPrev();\n }\n };\n return DiffReviewPrev;\n}(EditorAction));\nfunction findFocusedDiffEditor(accessor) {\n var codeEditorService = accessor.get(ICodeEditorService);\n var diffEditors = codeEditorService.listDiffEditors();\n for (var i = 0, len = diffEditors.length; i < len; i++) {\n var diffEditor = diffEditors[i];\n if (diffEditor.hasWidgetFocus()) {\n return diffEditor;\n }\n }\n return null;\n}\nregisterEditorAction(DiffReviewNext);\nregisterEditorAction(DiffReviewPrev);\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport * as strings from '../../../base/common/strings';\nvar EditorState = /** @class */ (function () {\n function EditorState(editor, flags) {\n this.flags = flags;\n if ((this.flags & 1 /* Value */) !== 0) {\n var model = editor.getModel();\n this.modelVersionId = model ? strings.format('{0}#{1}', model.uri.toString(), model.getVersionId()) : null;\n }\n if ((this.flags & 4 /* Position */) !== 0) {\n this.position = editor.getPosition();\n }\n if ((this.flags & 2 /* Selection */) !== 0) {\n this.selection = editor.getSelection();\n }\n if ((this.flags & 8 /* Scroll */) !== 0) {\n this.scrollLeft = editor.getScrollLeft();\n this.scrollTop = editor.getScrollTop();\n }\n }\n EditorState.prototype._equals = function (other) {\n if (!(other instanceof EditorState)) {\n return false;\n }\n var state = other;\n if (this.modelVersionId !== state.modelVersionId) {\n return false;\n }\n if (this.scrollLeft !== state.scrollLeft || this.scrollTop !== state.scrollTop) {\n return false;\n }\n if (!this.position && state.position || this.position && !state.position || this.position && state.position && !this.position.equals(state.position)) {\n return false;\n }\n if (!this.selection && state.selection || this.selection && !state.selection || this.selection && state.selection && !this.selection.equalsRange(state.selection)) {\n return false;\n }\n return true;\n };\n EditorState.prototype.validate = function (editor) {\n return this._equals(new EditorState(editor, this.flags));\n };\n return EditorState;\n}());\nexport { EditorState };\nvar StableEditorScrollState = /** @class */ (function () {\n function StableEditorScrollState(_visiblePosition, _visiblePositionScrollDelta) {\n this._visiblePosition = _visiblePosition;\n this._visiblePositionScrollDelta = _visiblePositionScrollDelta;\n }\n StableEditorScrollState.capture = function (editor) {\n var visiblePosition = null;\n var visiblePositionScrollDelta = 0;\n if (editor.getScrollTop() !== 0) {\n var visibleRanges = editor.getVisibleRanges();\n if (visibleRanges.length > 0) {\n visiblePosition = visibleRanges[0].getStartPosition();\n var visiblePositionScrollTop = editor.getTopForPosition(visiblePosition.lineNumber, visiblePosition.column);\n visiblePositionScrollDelta = editor.getScrollTop() - visiblePositionScrollTop;\n }\n }\n return new StableEditorScrollState(visiblePosition, visiblePositionScrollDelta);\n };\n StableEditorScrollState.prototype.restore = function (editor) {\n if (this._visiblePosition) {\n var visiblePositionScrollTop = editor.getTopForPosition(this._visiblePosition.lineNumber, this._visiblePosition.column);\n editor.setScrollTop(visiblePositionScrollTop + this._visiblePositionScrollDelta);\n }\n };\n return StableEditorScrollState;\n}());\nexport { StableEditorScrollState };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __param = (this && this.__param) || function (paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n};\nimport './media/diffEditor.css';\nimport * as nls from '../../../nls';\nimport { RunOnceScheduler } from '../../../base/common/async';\nimport { Disposable } from '../../../base/common/lifecycle';\nimport * as objects from '../../../base/common/objects';\nimport * as dom from '../../../base/browser/dom';\nimport { createFastDomNode } from '../../../base/browser/fastDomNode';\nimport { Sash, SashState } from '../../../base/browser/ui/sash/sash';\nimport { IInstantiationService } from '../../../platform/instantiation/common/instantiation';\nimport { IContextKeyService } from '../../../platform/contextkey/common/contextkey';\nimport { ICodeEditorService } from '../services/codeEditorService';\nimport { Range } from '../../common/core/range';\nimport * as editorCommon from '../../common/editorCommon';\nimport { IEditorWorkerService } from '../../common/services/editorWorkerService';\nimport { LineDecoration } from '../../common/viewLayout/lineDecorations';\nimport { renderViewLine, RenderLineInput } from '../../common/viewLayout/viewLineRenderer';\nimport { CodeEditorWidget } from './codeEditorWidget';\nimport { Configuration } from '../config/configuration';\nimport { InlineDecoration, ViewLineRenderingData } from '../../common/viewModel/viewModel';\nimport { ServiceCollection } from '../../../platform/instantiation/common/serviceCollection';\nimport { Emitter } from '../../../base/common/event';\nimport * as editorOptions from '../../common/config/editorOptions';\nimport { registerThemingParticipant, IThemeService, getThemeTypeSelector } from '../../../platform/theme/common/themeService';\nimport { scrollbarShadow, diffInserted, diffRemoved, defaultInsertColor, defaultRemoveColor, diffInsertedOutline, diffRemovedOutline, diffBorder } from '../../../platform/theme/common/colorRegistry';\nimport { OverviewRulerZone } from '../../common/view/overviewZoneManager';\nimport { ModelDecorationOptions } from '../../common/model/textModel';\nimport { DiffReview } from './diffReview';\nimport { createStringBuilder } from '../../common/core/stringBuilder';\nimport { INotificationService } from '../../../platform/notification/common/notification';\nimport { StableEditorScrollState } from '../core/editorState';\nvar VisualEditorState = /** @class */ (function () {\n function VisualEditorState() {\n this._zones = [];\n this._zonesMap = {};\n this._decorations = [];\n }\n VisualEditorState.prototype.getForeignViewZones = function (allViewZones) {\n var _this = this;\n return allViewZones.filter(function (z) { return !_this._zonesMap[String(z.id)]; });\n };\n VisualEditorState.prototype.clean = function (editor) {\n var _this = this;\n // (1) View zones\n if (this._zones.length > 0) {\n editor.changeViewZones(function (viewChangeAccessor) {\n for (var i = 0, length_1 = _this._zones.length; i < length_1; i++) {\n viewChangeAccessor.removeZone(_this._zones[i]);\n }\n });\n }\n this._zones = [];\n this._zonesMap = {};\n // (2) Model decorations\n this._decorations = editor.deltaDecorations(this._decorations, []);\n };\n VisualEditorState.prototype.apply = function (editor, overviewRuler, newDecorations, restoreScrollState) {\n var _this = this;\n var scrollState = restoreScrollState ? StableEditorScrollState.capture(editor) : null;\n // view zones\n editor.changeViewZones(function (viewChangeAccessor) {\n for (var i = 0, length_2 = _this._zones.length; i < length_2; i++) {\n viewChangeAccessor.removeZone(_this._zones[i]);\n }\n _this._zones = [];\n _this._zonesMap = {};\n for (var i = 0, length_3 = newDecorations.zones.length; i < length_3; i++) {\n newDecorations.zones[i].suppressMouseDown = true;\n var zoneId = viewChangeAccessor.addZone(newDecorations.zones[i]);\n _this._zones.push(zoneId);\n _this._zonesMap[String(zoneId)] = true;\n }\n });\n if (scrollState) {\n scrollState.restore(editor);\n }\n // decorations\n this._decorations = editor.deltaDecorations(this._decorations, newDecorations.decorations);\n // overview ruler\n if (overviewRuler) {\n overviewRuler.setZones(newDecorations.overviewZones);\n }\n };\n return VisualEditorState;\n}());\nvar DIFF_EDITOR_ID = 0;\nvar DiffEditorWidget = /** @class */ (function (_super) {\n __extends(DiffEditorWidget, _super);\n function DiffEditorWidget(domElement, options, editorWorkerService, contextKeyService, instantiationService, codeEditorService, themeService, notificationService) {\n var _this = _super.call(this) || this;\n _this._onDidDispose = _this._register(new Emitter());\n _this.onDidDispose = _this._onDidDispose.event;\n _this._onDidUpdateDiff = _this._register(new Emitter());\n _this.onDidUpdateDiff = _this._onDidUpdateDiff.event;\n _this._lastOriginalWarning = null;\n _this._lastModifiedWarning = null;\n _this._editorWorkerService = editorWorkerService;\n _this._codeEditorService = codeEditorService;\n _this._contextKeyService = _this._register(contextKeyService.createScoped(domElement));\n _this._contextKeyService.createKey('isInDiffEditor', true);\n _this._themeService = themeService;\n _this._notificationService = notificationService;\n _this.id = (++DIFF_EDITOR_ID);\n _this._domElement = domElement;\n options = options || {};\n // renderSideBySide\n _this._renderSideBySide = true;\n if (typeof options.renderSideBySide !== 'undefined') {\n _this._renderSideBySide = options.renderSideBySide;\n }\n // ignoreTrimWhitespace\n _this._ignoreTrimWhitespace = true;\n if (typeof options.ignoreTrimWhitespace !== 'undefined') {\n _this._ignoreTrimWhitespace = options.ignoreTrimWhitespace;\n }\n // renderIndicators\n _this._renderIndicators = true;\n if (typeof options.renderIndicators !== 'undefined') {\n _this._renderIndicators = options.renderIndicators;\n }\n _this._originalIsEditable = false;\n if (typeof options.originalEditable !== 'undefined') {\n _this._originalIsEditable = Boolean(options.originalEditable);\n }\n _this._updateDecorationsRunner = _this._register(new RunOnceScheduler(function () { return _this._updateDecorations(); }, 0));\n _this._containerDomElement = document.createElement('div');\n _this._containerDomElement.className = DiffEditorWidget._getClassName(_this._themeService.getTheme(), _this._renderSideBySide);\n _this._containerDomElement.style.position = 'relative';\n _this._containerDomElement.style.height = '100%';\n _this._domElement.appendChild(_this._containerDomElement);\n _this._overviewViewportDomElement = createFastDomNode(document.createElement('div'));\n _this._overviewViewportDomElement.setClassName('diffViewport');\n _this._overviewViewportDomElement.setPosition('absolute');\n _this._overviewDomElement = document.createElement('div');\n _this._overviewDomElement.className = 'diffOverview';\n _this._overviewDomElement.style.position = 'absolute';\n _this._overviewDomElement.appendChild(_this._overviewViewportDomElement.domNode);\n _this._register(dom.addStandardDisposableListener(_this._overviewDomElement, 'mousedown', function (e) {\n _this.modifiedEditor.delegateVerticalScrollbarMouseDown(e);\n }));\n _this._containerDomElement.appendChild(_this._overviewDomElement);\n _this._createLeftHandSide();\n _this._createRightHandSide();\n _this._beginUpdateDecorationsTimeout = -1;\n _this._currentlyChangingViewZones = false;\n _this._diffComputationToken = 0;\n _this._originalEditorState = new VisualEditorState();\n _this._modifiedEditorState = new VisualEditorState();\n _this._isVisible = true;\n _this._isHandlingScrollEvent = false;\n _this._width = 0;\n _this._height = 0;\n _this._reviewHeight = 0;\n _this._lineChanges = null;\n var leftContextKeyService = _this._contextKeyService.createScoped();\n leftContextKeyService.createKey('isInDiffLeftEditor', true);\n var leftServices = new ServiceCollection();\n leftServices.set(IContextKeyService, leftContextKeyService);\n var leftScopedInstantiationService = instantiationService.createChild(leftServices);\n var rightContextKeyService = _this._contextKeyService.createScoped();\n rightContextKeyService.createKey('isInDiffRightEditor', true);\n var rightServices = new ServiceCollection();\n rightServices.set(IContextKeyService, rightContextKeyService);\n var rightScopedInstantiationService = instantiationService.createChild(rightServices);\n _this._createLeftHandSideEditor(options, leftScopedInstantiationService);\n _this._createRightHandSideEditor(options, rightScopedInstantiationService);\n _this._reviewPane = new DiffReview(_this);\n _this._containerDomElement.appendChild(_this._reviewPane.domNode.domNode);\n _this._containerDomElement.appendChild(_this._reviewPane.shadow.domNode);\n _this._containerDomElement.appendChild(_this._reviewPane.actionBarContainer.domNode);\n if (options.automaticLayout) {\n _this._measureDomElementToken = window.setInterval(function () { return _this._measureDomElement(false); }, 100);\n }\n // enableSplitViewResizing\n _this._enableSplitViewResizing = true;\n if (typeof options.enableSplitViewResizing !== 'undefined') {\n _this._enableSplitViewResizing = options.enableSplitViewResizing;\n }\n if (_this._renderSideBySide) {\n _this._setStrategy(new DiffEdtorWidgetSideBySide(_this._createDataSource(), _this._enableSplitViewResizing));\n }\n else {\n _this._setStrategy(new DiffEdtorWidgetInline(_this._createDataSource(), _this._enableSplitViewResizing));\n }\n _this._register(themeService.onThemeChange(function (t) {\n if (_this._strategy && _this._strategy.applyColors(t)) {\n _this._updateDecorationsRunner.schedule();\n }\n _this._containerDomElement.className = DiffEditorWidget._getClassName(_this._themeService.getTheme(), _this._renderSideBySide);\n }));\n _this._codeEditorService.addDiffEditor(_this);\n return _this;\n }\n DiffEditorWidget.prototype.hasWidgetFocus = function () {\n return dom.isAncestor(document.activeElement, this._domElement);\n };\n DiffEditorWidget.prototype.diffReviewNext = function () {\n this._reviewPane.next();\n };\n DiffEditorWidget.prototype.diffReviewPrev = function () {\n this._reviewPane.prev();\n };\n DiffEditorWidget._getClassName = function (theme, renderSideBySide) {\n var result = 'monaco-diff-editor monaco-editor-background ';\n if (renderSideBySide) {\n result += 'side-by-side ';\n }\n result += getThemeTypeSelector(theme.type);\n return result;\n };\n DiffEditorWidget.prototype._recreateOverviewRulers = function () {\n if (this._originalOverviewRuler) {\n this._overviewDomElement.removeChild(this._originalOverviewRuler.getDomNode());\n this._originalOverviewRuler.dispose();\n }\n this._originalOverviewRuler = this.originalEditor.createOverviewRuler('original diffOverviewRuler');\n this._overviewDomElement.appendChild(this._originalOverviewRuler.getDomNode());\n if (this._modifiedOverviewRuler) {\n this._overviewDomElement.removeChild(this._modifiedOverviewRuler.getDomNode());\n this._modifiedOverviewRuler.dispose();\n }\n this._modifiedOverviewRuler = this.modifiedEditor.createOverviewRuler('modified diffOverviewRuler');\n this._overviewDomElement.appendChild(this._modifiedOverviewRuler.getDomNode());\n this._layoutOverviewRulers();\n };\n DiffEditorWidget.prototype._createLeftHandSide = function () {\n this._originalDomNode = document.createElement('div');\n this._originalDomNode.className = 'editor original';\n this._originalDomNode.style.position = 'absolute';\n this._originalDomNode.style.height = '100%';\n this._containerDomElement.appendChild(this._originalDomNode);\n };\n DiffEditorWidget.prototype._createRightHandSide = function () {\n this._modifiedDomNode = document.createElement('div');\n this._modifiedDomNode.className = 'editor modified';\n this._modifiedDomNode.style.position = 'absolute';\n this._modifiedDomNode.style.height = '100%';\n this._containerDomElement.appendChild(this._modifiedDomNode);\n };\n DiffEditorWidget.prototype._createLeftHandSideEditor = function (options, instantiationService) {\n var _this = this;\n this.originalEditor = this._createInnerEditor(instantiationService, this._originalDomNode, this._adjustOptionsForLeftHandSide(options, this._originalIsEditable));\n this._register(this.originalEditor.onDidScrollChange(function (e) {\n if (_this._isHandlingScrollEvent) {\n return;\n }\n if (!e.scrollTopChanged && !e.scrollLeftChanged && !e.scrollHeightChanged) {\n return;\n }\n _this._isHandlingScrollEvent = true;\n _this.modifiedEditor.setScrollPosition({\n scrollLeft: e.scrollLeft,\n scrollTop: e.scrollTop\n });\n _this._isHandlingScrollEvent = false;\n _this._layoutOverviewViewport();\n }));\n this._register(this.originalEditor.onDidChangeViewZones(function () {\n _this._onViewZonesChanged();\n }));\n this._register(this.originalEditor.onDidChangeModelContent(function () {\n if (_this._isVisible) {\n _this._beginUpdateDecorationsSoon();\n }\n }));\n };\n DiffEditorWidget.prototype._createRightHandSideEditor = function (options, instantiationService) {\n var _this = this;\n this.modifiedEditor = this._createInnerEditor(instantiationService, this._modifiedDomNode, this._adjustOptionsForRightHandSide(options));\n this._register(this.modifiedEditor.onDidScrollChange(function (e) {\n if (_this._isHandlingScrollEvent) {\n return;\n }\n if (!e.scrollTopChanged && !e.scrollLeftChanged && !e.scrollHeightChanged) {\n return;\n }\n _this._isHandlingScrollEvent = true;\n _this.originalEditor.setScrollPosition({\n scrollLeft: e.scrollLeft,\n scrollTop: e.scrollTop\n });\n _this._isHandlingScrollEvent = false;\n _this._layoutOverviewViewport();\n }));\n this._register(this.modifiedEditor.onDidChangeViewZones(function () {\n _this._onViewZonesChanged();\n }));\n this._register(this.modifiedEditor.onDidChangeConfiguration(function (e) {\n if (e.fontInfo && _this.modifiedEditor.getModel()) {\n _this._onViewZonesChanged();\n }\n }));\n this._register(this.modifiedEditor.onDidChangeModelContent(function () {\n if (_this._isVisible) {\n _this._beginUpdateDecorationsSoon();\n }\n }));\n };\n DiffEditorWidget.prototype._createInnerEditor = function (instantiationService, container, options) {\n return instantiationService.createInstance(CodeEditorWidget, container, options, {});\n };\n DiffEditorWidget.prototype.dispose = function () {\n this._codeEditorService.removeDiffEditor(this);\n if (this._beginUpdateDecorationsTimeout !== -1) {\n window.clearTimeout(this._beginUpdateDecorationsTimeout);\n this._beginUpdateDecorationsTimeout = -1;\n }\n window.clearInterval(this._measureDomElementToken);\n this._cleanViewZonesAndDecorations();\n if (this._originalOverviewRuler) {\n this._overviewDomElement.removeChild(this._originalOverviewRuler.getDomNode());\n this._originalOverviewRuler.dispose();\n }\n if (this._modifiedOverviewRuler) {\n this._overviewDomElement.removeChild(this._modifiedOverviewRuler.getDomNode());\n this._modifiedOverviewRuler.dispose();\n }\n this._overviewDomElement.removeChild(this._overviewViewportDomElement.domNode);\n this._containerDomElement.removeChild(this._overviewDomElement);\n this._containerDomElement.removeChild(this._originalDomNode);\n this.originalEditor.dispose();\n this._containerDomElement.removeChild(this._modifiedDomNode);\n this.modifiedEditor.dispose();\n this._strategy.dispose();\n this._containerDomElement.removeChild(this._reviewPane.domNode.domNode);\n this._containerDomElement.removeChild(this._reviewPane.shadow.domNode);\n this._containerDomElement.removeChild(this._reviewPane.actionBarContainer.domNode);\n this._reviewPane.dispose();\n this._domElement.removeChild(this._containerDomElement);\n this._onDidDispose.fire();\n _super.prototype.dispose.call(this);\n };\n //------------ begin IDiffEditor methods\n DiffEditorWidget.prototype.getId = function () {\n return this.getEditorType() + ':' + this.id;\n };\n DiffEditorWidget.prototype.getEditorType = function () {\n return editorCommon.EditorType.IDiffEditor;\n };\n DiffEditorWidget.prototype.getLineChanges = function () {\n return this._lineChanges;\n };\n DiffEditorWidget.prototype.getOriginalEditor = function () {\n return this.originalEditor;\n };\n DiffEditorWidget.prototype.getModifiedEditor = function () {\n return this.modifiedEditor;\n };\n DiffEditorWidget.prototype.updateOptions = function (newOptions) {\n // Handle side by side\n var renderSideBySideChanged = false;\n if (typeof newOptions.renderSideBySide !== 'undefined') {\n if (this._renderSideBySide !== newOptions.renderSideBySide) {\n this._renderSideBySide = newOptions.renderSideBySide;\n renderSideBySideChanged = true;\n }\n }\n var beginUpdateDecorations = false;\n if (typeof newOptions.ignoreTrimWhitespace !== 'undefined') {\n if (this._ignoreTrimWhitespace !== newOptions.ignoreTrimWhitespace) {\n this._ignoreTrimWhitespace = newOptions.ignoreTrimWhitespace;\n // Begin comparing\n beginUpdateDecorations = true;\n }\n }\n if (typeof newOptions.renderIndicators !== 'undefined') {\n if (this._renderIndicators !== newOptions.renderIndicators) {\n this._renderIndicators = newOptions.renderIndicators;\n beginUpdateDecorations = true;\n }\n }\n if (beginUpdateDecorations) {\n this._beginUpdateDecorations();\n }\n if (typeof newOptions.originalEditable !== 'undefined') {\n this._originalIsEditable = Boolean(newOptions.originalEditable);\n }\n this.modifiedEditor.updateOptions(this._adjustOptionsForRightHandSide(newOptions));\n this.originalEditor.updateOptions(this._adjustOptionsForLeftHandSide(newOptions, this._originalIsEditable));\n // enableSplitViewResizing\n if (typeof newOptions.enableSplitViewResizing !== 'undefined') {\n this._enableSplitViewResizing = newOptions.enableSplitViewResizing;\n }\n this._strategy.setEnableSplitViewResizing(this._enableSplitViewResizing);\n // renderSideBySide\n if (renderSideBySideChanged) {\n if (this._renderSideBySide) {\n this._setStrategy(new DiffEdtorWidgetSideBySide(this._createDataSource(), this._enableSplitViewResizing));\n }\n else {\n this._setStrategy(new DiffEdtorWidgetInline(this._createDataSource(), this._enableSplitViewResizing));\n }\n // Update class name\n this._containerDomElement.className = DiffEditorWidget._getClassName(this._themeService.getTheme(), this._renderSideBySide);\n }\n };\n DiffEditorWidget.prototype.getModel = function () {\n return {\n original: this.originalEditor.getModel(),\n modified: this.modifiedEditor.getModel()\n };\n };\n DiffEditorWidget.prototype.setModel = function (model) {\n // Guard us against partial null model\n if (model && (!model.original || !model.modified)) {\n throw new Error(!model.original ? 'DiffEditorWidget.setModel: Original model is null' : 'DiffEditorWidget.setModel: Modified model is null');\n }\n // Remove all view zones & decorations\n this._cleanViewZonesAndDecorations();\n // Update code editor models\n this.originalEditor.setModel(model ? model.original : null);\n this.modifiedEditor.setModel(model ? model.modified : null);\n this._updateDecorationsRunner.cancel();\n if (model) {\n this.originalEditor.setScrollTop(0);\n this.modifiedEditor.setScrollTop(0);\n }\n // Disable any diff computations that will come in\n this._lineChanges = null;\n this._diffComputationToken++;\n if (model) {\n this._recreateOverviewRulers();\n // Begin comparing\n this._beginUpdateDecorations();\n }\n else {\n this._lineChanges = null;\n }\n this._layoutOverviewViewport();\n };\n DiffEditorWidget.prototype.getDomNode = function () {\n return this._domElement;\n };\n DiffEditorWidget.prototype.getVisibleColumnFromPosition = function (position) {\n return this.modifiedEditor.getVisibleColumnFromPosition(position);\n };\n DiffEditorWidget.prototype.getPosition = function () {\n return this.modifiedEditor.getPosition();\n };\n DiffEditorWidget.prototype.setPosition = function (position) {\n this.modifiedEditor.setPosition(position);\n };\n DiffEditorWidget.prototype.revealLine = function (lineNumber, scrollType) {\n if (scrollType === void 0) { scrollType = 0 /* Smooth */; }\n this.modifiedEditor.revealLine(lineNumber, scrollType);\n };\n DiffEditorWidget.prototype.revealLineInCenter = function (lineNumber, scrollType) {\n if (scrollType === void 0) { scrollType = 0 /* Smooth */; }\n this.modifiedEditor.revealLineInCenter(lineNumber, scrollType);\n };\n DiffEditorWidget.prototype.revealLineInCenterIfOutsideViewport = function (lineNumber, scrollType) {\n if (scrollType === void 0) { scrollType = 0 /* Smooth */; }\n this.modifiedEditor.revealLineInCenterIfOutsideViewport(lineNumber, scrollType);\n };\n DiffEditorWidget.prototype.revealPosition = function (position, scrollType) {\n if (scrollType === void 0) { scrollType = 0 /* Smooth */; }\n this.modifiedEditor.revealPosition(position, scrollType);\n };\n DiffEditorWidget.prototype.revealPositionInCenter = function (position, scrollType) {\n if (scrollType === void 0) { scrollType = 0 /* Smooth */; }\n this.modifiedEditor.revealPositionInCenter(position, scrollType);\n };\n DiffEditorWidget.prototype.revealPositionInCenterIfOutsideViewport = function (position, scrollType) {\n if (scrollType === void 0) { scrollType = 0 /* Smooth */; }\n this.modifiedEditor.revealPositionInCenterIfOutsideViewport(position, scrollType);\n };\n DiffEditorWidget.prototype.getSelection = function () {\n return this.modifiedEditor.getSelection();\n };\n DiffEditorWidget.prototype.getSelections = function () {\n return this.modifiedEditor.getSelections();\n };\n DiffEditorWidget.prototype.setSelection = function (something) {\n this.modifiedEditor.setSelection(something);\n };\n DiffEditorWidget.prototype.setSelections = function (ranges) {\n this.modifiedEditor.setSelections(ranges);\n };\n DiffEditorWidget.prototype.revealLines = function (startLineNumber, endLineNumber, scrollType) {\n if (scrollType === void 0) { scrollType = 0 /* Smooth */; }\n this.modifiedEditor.revealLines(startLineNumber, endLineNumber, scrollType);\n };\n DiffEditorWidget.prototype.revealLinesInCenter = function (startLineNumber, endLineNumber, scrollType) {\n if (scrollType === void 0) { scrollType = 0 /* Smooth */; }\n this.modifiedEditor.revealLinesInCenter(startLineNumber, endLineNumber, scrollType);\n };\n DiffEditorWidget.prototype.revealLinesInCenterIfOutsideViewport = function (startLineNumber, endLineNumber, scrollType) {\n if (scrollType === void 0) { scrollType = 0 /* Smooth */; }\n this.modifiedEditor.revealLinesInCenterIfOutsideViewport(startLineNumber, endLineNumber, scrollType);\n };\n DiffEditorWidget.prototype.revealRange = function (range, scrollType, revealVerticalInCenter, revealHorizontal) {\n if (scrollType === void 0) { scrollType = 0 /* Smooth */; }\n if (revealVerticalInCenter === void 0) { revealVerticalInCenter = false; }\n if (revealHorizontal === void 0) { revealHorizontal = true; }\n this.modifiedEditor.revealRange(range, scrollType, revealVerticalInCenter, revealHorizontal);\n };\n DiffEditorWidget.prototype.revealRangeInCenter = function (range, scrollType) {\n if (scrollType === void 0) { scrollType = 0 /* Smooth */; }\n this.modifiedEditor.revealRangeInCenter(range, scrollType);\n };\n DiffEditorWidget.prototype.revealRangeInCenterIfOutsideViewport = function (range, scrollType) {\n if (scrollType === void 0) { scrollType = 0 /* Smooth */; }\n this.modifiedEditor.revealRangeInCenterIfOutsideViewport(range, scrollType);\n };\n DiffEditorWidget.prototype.revealRangeAtTop = function (range, scrollType) {\n if (scrollType === void 0) { scrollType = 0 /* Smooth */; }\n this.modifiedEditor.revealRangeAtTop(range, scrollType);\n };\n DiffEditorWidget.prototype.getSupportedActions = function () {\n return this.modifiedEditor.getSupportedActions();\n };\n DiffEditorWidget.prototype.saveViewState = function () {\n var originalViewState = this.originalEditor.saveViewState();\n var modifiedViewState = this.modifiedEditor.saveViewState();\n return {\n original: originalViewState,\n modified: modifiedViewState\n };\n };\n DiffEditorWidget.prototype.restoreViewState = function (s) {\n if (s.original && s.original) {\n var diffEditorState = s;\n this.originalEditor.restoreViewState(diffEditorState.original);\n this.modifiedEditor.restoreViewState(diffEditorState.modified);\n }\n };\n DiffEditorWidget.prototype.layout = function (dimension) {\n this._measureDomElement(false, dimension);\n };\n DiffEditorWidget.prototype.focus = function () {\n this.modifiedEditor.focus();\n };\n DiffEditorWidget.prototype.hasTextFocus = function () {\n return this.originalEditor.hasTextFocus() || this.modifiedEditor.hasTextFocus();\n };\n DiffEditorWidget.prototype.trigger = function (source, handlerId, payload) {\n this.modifiedEditor.trigger(source, handlerId, payload);\n };\n DiffEditorWidget.prototype.changeDecorations = function (callback) {\n return this.modifiedEditor.changeDecorations(callback);\n };\n //------------ end IDiffEditor methods\n //------------ begin layouting methods\n DiffEditorWidget.prototype._measureDomElement = function (forceDoLayoutCall, dimensions) {\n dimensions = dimensions || {\n width: this._containerDomElement.clientWidth,\n height: this._containerDomElement.clientHeight\n };\n if (dimensions.width <= 0) {\n this._width = 0;\n this._height = 0;\n this._reviewHeight = 0;\n return;\n }\n if (!forceDoLayoutCall && dimensions.width === this._width && dimensions.height === this._height) {\n // Nothing has changed\n return;\n }\n this._width = dimensions.width;\n this._height = dimensions.height;\n this._reviewHeight = this._reviewPane.isVisible() ? this._height : 0;\n this._doLayout();\n };\n DiffEditorWidget.prototype._layoutOverviewRulers = function () {\n var freeSpace = DiffEditorWidget.ENTIRE_DIFF_OVERVIEW_WIDTH - 2 * DiffEditorWidget.ONE_OVERVIEW_WIDTH;\n var layoutInfo = this.modifiedEditor.getLayoutInfo();\n if (layoutInfo) {\n this._originalOverviewRuler.setLayout({\n top: 0,\n width: DiffEditorWidget.ONE_OVERVIEW_WIDTH,\n right: freeSpace + DiffEditorWidget.ONE_OVERVIEW_WIDTH,\n height: (this._height - this._reviewHeight)\n });\n this._modifiedOverviewRuler.setLayout({\n top: 0,\n right: 0,\n width: DiffEditorWidget.ONE_OVERVIEW_WIDTH,\n height: (this._height - this._reviewHeight)\n });\n }\n };\n //------------ end layouting methods\n DiffEditorWidget.prototype._onViewZonesChanged = function () {\n if (this._currentlyChangingViewZones) {\n return;\n }\n this._updateDecorationsRunner.schedule();\n };\n DiffEditorWidget.prototype._beginUpdateDecorationsSoon = function () {\n var _this = this;\n // Clear previous timeout if necessary\n if (this._beginUpdateDecorationsTimeout !== -1) {\n window.clearTimeout(this._beginUpdateDecorationsTimeout);\n this._beginUpdateDecorationsTimeout = -1;\n }\n this._beginUpdateDecorationsTimeout = window.setTimeout(function () { return _this._beginUpdateDecorations(); }, DiffEditorWidget.UPDATE_DIFF_DECORATIONS_DELAY);\n };\n DiffEditorWidget._equals = function (a, b) {\n if (!a && !b) {\n return true;\n }\n if (!a || !b) {\n return false;\n }\n return (a.toString() === b.toString());\n };\n DiffEditorWidget.prototype._beginUpdateDecorations = function () {\n var _this = this;\n this._beginUpdateDecorationsTimeout = -1;\n var currentOriginalModel = this.originalEditor.getModel();\n var currentModifiedModel = this.modifiedEditor.getModel();\n if (!currentOriginalModel || !currentModifiedModel) {\n return;\n }\n // Prevent old diff requests to come if a new request has been initiated\n // The best method would be to call cancel on the Promise, but this is not\n // yet supported, so using tokens for now.\n this._diffComputationToken++;\n var currentToken = this._diffComputationToken;\n if (!this._editorWorkerService.canComputeDiff(currentOriginalModel.uri, currentModifiedModel.uri)) {\n if (!DiffEditorWidget._equals(currentOriginalModel.uri, this._lastOriginalWarning)\n || !DiffEditorWidget._equals(currentModifiedModel.uri, this._lastModifiedWarning)) {\n this._lastOriginalWarning = currentOriginalModel.uri;\n this._lastModifiedWarning = currentModifiedModel.uri;\n this._notificationService.warn(nls.localize(\"diff.tooLarge\", \"Cannot compare files because one file is too large.\"));\n }\n return;\n }\n this._editorWorkerService.computeDiff(currentOriginalModel.uri, currentModifiedModel.uri, this._ignoreTrimWhitespace).then(function (result) {\n if (currentToken === _this._diffComputationToken\n && currentOriginalModel === _this.originalEditor.getModel()\n && currentModifiedModel === _this.modifiedEditor.getModel()) {\n _this._lineChanges = result;\n _this._updateDecorationsRunner.schedule();\n _this._onDidUpdateDiff.fire();\n }\n }, function (error) {\n if (currentToken === _this._diffComputationToken\n && currentOriginalModel === _this.originalEditor.getModel()\n && currentModifiedModel === _this.modifiedEditor.getModel()) {\n _this._lineChanges = null;\n _this._updateDecorationsRunner.schedule();\n }\n });\n };\n DiffEditorWidget.prototype._cleanViewZonesAndDecorations = function () {\n this._originalEditorState.clean(this.originalEditor);\n this._modifiedEditorState.clean(this.modifiedEditor);\n };\n DiffEditorWidget.prototype._updateDecorations = function () {\n if (!this.originalEditor.getModel() || !this.modifiedEditor.getModel()) {\n return;\n }\n var lineChanges = this._lineChanges || [];\n var foreignOriginal = this._originalEditorState.getForeignViewZones(this.originalEditor.getWhitespaces());\n var foreignModified = this._modifiedEditorState.getForeignViewZones(this.modifiedEditor.getWhitespaces());\n var diffDecorations = this._strategy.getEditorsDiffDecorations(lineChanges, this._ignoreTrimWhitespace, this._renderIndicators, foreignOriginal, foreignModified, this.originalEditor, this.modifiedEditor);\n try {\n this._currentlyChangingViewZones = true;\n this._originalEditorState.apply(this.originalEditor, this._originalOverviewRuler, diffDecorations.original, false);\n this._modifiedEditorState.apply(this.modifiedEditor, this._modifiedOverviewRuler, diffDecorations.modified, true);\n }\n finally {\n this._currentlyChangingViewZones = false;\n }\n };\n DiffEditorWidget.prototype._adjustOptionsForSubEditor = function (options) {\n var clonedOptions = objects.deepClone(options || {});\n clonedOptions.inDiffEditor = true;\n clonedOptions.wordWrap = 'off';\n clonedOptions.wordWrapMinified = false;\n clonedOptions.automaticLayout = false;\n clonedOptions.scrollbar = clonedOptions.scrollbar || {};\n clonedOptions.scrollbar.vertical = 'visible';\n clonedOptions.folding = false;\n clonedOptions.codeLens = false;\n clonedOptions.fixedOverflowWidgets = true;\n clonedOptions.lineDecorationsWidth = '2ch';\n if (!clonedOptions.minimap) {\n clonedOptions.minimap = {};\n }\n clonedOptions.minimap.enabled = false;\n return clonedOptions;\n };\n DiffEditorWidget.prototype._adjustOptionsForLeftHandSide = function (options, isEditable) {\n var result = this._adjustOptionsForSubEditor(options);\n result.readOnly = !isEditable;\n result.overviewRulerLanes = 1;\n result.extraEditorClassName = 'original-in-monaco-diff-editor';\n return result;\n };\n DiffEditorWidget.prototype._adjustOptionsForRightHandSide = function (options) {\n var result = this._adjustOptionsForSubEditor(options);\n result.revealHorizontalRightPadding = editorOptions.EDITOR_DEFAULTS.viewInfo.revealHorizontalRightPadding + DiffEditorWidget.ENTIRE_DIFF_OVERVIEW_WIDTH;\n result.scrollbar.verticalHasArrows = false;\n result.extraEditorClassName = 'modified-in-monaco-diff-editor';\n return result;\n };\n DiffEditorWidget.prototype.doLayout = function () {\n this._measureDomElement(true);\n };\n DiffEditorWidget.prototype._doLayout = function () {\n var splitPoint = this._strategy.layout();\n this._originalDomNode.style.width = splitPoint + 'px';\n this._originalDomNode.style.left = '0px';\n this._modifiedDomNode.style.width = (this._width - splitPoint) + 'px';\n this._modifiedDomNode.style.left = splitPoint + 'px';\n this._overviewDomElement.style.top = '0px';\n this._overviewDomElement.style.height = (this._height - this._reviewHeight) + 'px';\n this._overviewDomElement.style.width = DiffEditorWidget.ENTIRE_DIFF_OVERVIEW_WIDTH + 'px';\n this._overviewDomElement.style.left = (this._width - DiffEditorWidget.ENTIRE_DIFF_OVERVIEW_WIDTH) + 'px';\n this._overviewViewportDomElement.setWidth(DiffEditorWidget.ENTIRE_DIFF_OVERVIEW_WIDTH);\n this._overviewViewportDomElement.setHeight(30);\n this.originalEditor.layout({ width: splitPoint, height: (this._height - this._reviewHeight) });\n this.modifiedEditor.layout({ width: this._width - splitPoint - DiffEditorWidget.ENTIRE_DIFF_OVERVIEW_WIDTH, height: (this._height - this._reviewHeight) });\n if (this._originalOverviewRuler || this._modifiedOverviewRuler) {\n this._layoutOverviewRulers();\n }\n this._reviewPane.layout(this._height - this._reviewHeight, this._width, this._reviewHeight);\n this._layoutOverviewViewport();\n };\n DiffEditorWidget.prototype._layoutOverviewViewport = function () {\n var layout = this._computeOverviewViewport();\n if (!layout) {\n this._overviewViewportDomElement.setTop(0);\n this._overviewViewportDomElement.setHeight(0);\n }\n else {\n this._overviewViewportDomElement.setTop(layout.top);\n this._overviewViewportDomElement.setHeight(layout.height);\n }\n };\n DiffEditorWidget.prototype._computeOverviewViewport = function () {\n var layoutInfo = this.modifiedEditor.getLayoutInfo();\n if (!layoutInfo) {\n return null;\n }\n var scrollTop = this.modifiedEditor.getScrollTop();\n var scrollHeight = this.modifiedEditor.getScrollHeight();\n var computedAvailableSize = Math.max(0, layoutInfo.contentHeight);\n var computedRepresentableSize = Math.max(0, computedAvailableSize - 2 * 0);\n var computedRatio = scrollHeight > 0 ? (computedRepresentableSize / scrollHeight) : 0;\n var computedSliderSize = Math.max(0, Math.floor(layoutInfo.contentHeight * computedRatio));\n var computedSliderPosition = Math.floor(scrollTop * computedRatio);\n return {\n height: computedSliderSize,\n top: computedSliderPosition\n };\n };\n DiffEditorWidget.prototype._createDataSource = function () {\n var _this = this;\n return {\n getWidth: function () {\n return _this._width;\n },\n getHeight: function () {\n return (_this._height - _this._reviewHeight);\n },\n getContainerDomNode: function () {\n return _this._containerDomElement;\n },\n relayoutEditors: function () {\n _this._doLayout();\n },\n getOriginalEditor: function () {\n return _this.originalEditor;\n },\n getModifiedEditor: function () {\n return _this.modifiedEditor;\n }\n };\n };\n DiffEditorWidget.prototype._setStrategy = function (newStrategy) {\n if (this._strategy) {\n this._strategy.dispose();\n }\n this._strategy = newStrategy;\n newStrategy.applyColors(this._themeService.getTheme());\n if (this._lineChanges) {\n this._updateDecorations();\n }\n // Just do a layout, the strategy might need it\n this._measureDomElement(true);\n };\n DiffEditorWidget.prototype._getLineChangeAtOrBeforeLineNumber = function (lineNumber, startLineNumberExtractor) {\n if (this._lineChanges.length === 0 || lineNumber < startLineNumberExtractor(this._lineChanges[0])) {\n // There are no changes or `lineNumber` is before the first change\n return null;\n }\n var min = 0, max = this._lineChanges.length - 1;\n while (min < max) {\n var mid = Math.floor((min + max) / 2);\n var midStart = startLineNumberExtractor(this._lineChanges[mid]);\n var midEnd = (mid + 1 <= max ? startLineNumberExtractor(this._lineChanges[mid + 1]) : Number.MAX_VALUE);\n if (lineNumber < midStart) {\n max = mid - 1;\n }\n else if (lineNumber >= midEnd) {\n min = mid + 1;\n }\n else {\n // HIT!\n min = mid;\n max = mid;\n }\n }\n return this._lineChanges[min];\n };\n DiffEditorWidget.prototype._getEquivalentLineForOriginalLineNumber = function (lineNumber) {\n var lineChange = this._getLineChangeAtOrBeforeLineNumber(lineNumber, function (lineChange) { return lineChange.originalStartLineNumber; });\n if (!lineChange) {\n return lineNumber;\n }\n var originalEquivalentLineNumber = lineChange.originalStartLineNumber + (lineChange.originalEndLineNumber > 0 ? -1 : 0);\n var modifiedEquivalentLineNumber = lineChange.modifiedStartLineNumber + (lineChange.modifiedEndLineNumber > 0 ? -1 : 0);\n var lineChangeOriginalLength = (lineChange.originalEndLineNumber > 0 ? (lineChange.originalEndLineNumber - lineChange.originalStartLineNumber + 1) : 0);\n var lineChangeModifiedLength = (lineChange.modifiedEndLineNumber > 0 ? (lineChange.modifiedEndLineNumber - lineChange.modifiedStartLineNumber + 1) : 0);\n var delta = lineNumber - originalEquivalentLineNumber;\n if (delta <= lineChangeOriginalLength) {\n return modifiedEquivalentLineNumber + Math.min(delta, lineChangeModifiedLength);\n }\n return modifiedEquivalentLineNumber + lineChangeModifiedLength - lineChangeOriginalLength + delta;\n };\n DiffEditorWidget.prototype._getEquivalentLineForModifiedLineNumber = function (lineNumber) {\n var lineChange = this._getLineChangeAtOrBeforeLineNumber(lineNumber, function (lineChange) { return lineChange.modifiedStartLineNumber; });\n if (!lineChange) {\n return lineNumber;\n }\n var originalEquivalentLineNumber = lineChange.originalStartLineNumber + (lineChange.originalEndLineNumber > 0 ? -1 : 0);\n var modifiedEquivalentLineNumber = lineChange.modifiedStartLineNumber + (lineChange.modifiedEndLineNumber > 0 ? -1 : 0);\n var lineChangeOriginalLength = (lineChange.originalEndLineNumber > 0 ? (lineChange.originalEndLineNumber - lineChange.originalStartLineNumber + 1) : 0);\n var lineChangeModifiedLength = (lineChange.modifiedEndLineNumber > 0 ? (lineChange.modifiedEndLineNumber - lineChange.modifiedStartLineNumber + 1) : 0);\n var delta = lineNumber - modifiedEquivalentLineNumber;\n if (delta <= lineChangeModifiedLength) {\n return originalEquivalentLineNumber + Math.min(delta, lineChangeOriginalLength);\n }\n return originalEquivalentLineNumber + lineChangeOriginalLength - lineChangeModifiedLength + delta;\n };\n DiffEditorWidget.prototype.getDiffLineInformationForOriginal = function (lineNumber) {\n if (!this._lineChanges) {\n // Cannot answer that which I don't know\n return null;\n }\n return {\n equivalentLineNumber: this._getEquivalentLineForOriginalLineNumber(lineNumber)\n };\n };\n DiffEditorWidget.prototype.getDiffLineInformationForModified = function (lineNumber) {\n if (!this._lineChanges) {\n // Cannot answer that which I don't know\n return null;\n }\n return {\n equivalentLineNumber: this._getEquivalentLineForModifiedLineNumber(lineNumber)\n };\n };\n DiffEditorWidget.ONE_OVERVIEW_WIDTH = 15;\n DiffEditorWidget.ENTIRE_DIFF_OVERVIEW_WIDTH = 30;\n DiffEditorWidget.UPDATE_DIFF_DECORATIONS_DELAY = 200; // ms\n DiffEditorWidget = __decorate([\n __param(2, IEditorWorkerService),\n __param(3, IContextKeyService),\n __param(4, IInstantiationService),\n __param(5, ICodeEditorService),\n __param(6, IThemeService),\n __param(7, INotificationService)\n ], DiffEditorWidget);\n return DiffEditorWidget;\n}(Disposable));\nexport { DiffEditorWidget };\nvar DiffEditorWidgetStyle = /** @class */ (function (_super) {\n __extends(DiffEditorWidgetStyle, _super);\n function DiffEditorWidgetStyle(dataSource) {\n var _this = _super.call(this) || this;\n _this._dataSource = dataSource;\n return _this;\n }\n DiffEditorWidgetStyle.prototype.applyColors = function (theme) {\n var newInsertColor = (theme.getColor(diffInserted) || defaultInsertColor).transparent(2);\n var newRemoveColor = (theme.getColor(diffRemoved) || defaultRemoveColor).transparent(2);\n var hasChanges = !newInsertColor.equals(this._insertColor) || !newRemoveColor.equals(this._removeColor);\n this._insertColor = newInsertColor;\n this._removeColor = newRemoveColor;\n return hasChanges;\n };\n DiffEditorWidgetStyle.prototype.getEditorsDiffDecorations = function (lineChanges, ignoreTrimWhitespace, renderIndicators, originalWhitespaces, modifiedWhitespaces, originalEditor, modifiedEditor) {\n // Get view zones\n modifiedWhitespaces = modifiedWhitespaces.sort(function (a, b) {\n return a.afterLineNumber - b.afterLineNumber;\n });\n originalWhitespaces = originalWhitespaces.sort(function (a, b) {\n return a.afterLineNumber - b.afterLineNumber;\n });\n var zones = this._getViewZones(lineChanges, originalWhitespaces, modifiedWhitespaces, originalEditor, modifiedEditor, renderIndicators);\n // Get decorations & overview ruler zones\n var originalDecorations = this._getOriginalEditorDecorations(lineChanges, ignoreTrimWhitespace, renderIndicators, originalEditor, modifiedEditor);\n var modifiedDecorations = this._getModifiedEditorDecorations(lineChanges, ignoreTrimWhitespace, renderIndicators, originalEditor, modifiedEditor);\n return {\n original: {\n decorations: originalDecorations.decorations,\n overviewZones: originalDecorations.overviewZones,\n zones: zones.original\n },\n modified: {\n decorations: modifiedDecorations.decorations,\n overviewZones: modifiedDecorations.overviewZones,\n zones: zones.modified\n }\n };\n };\n return DiffEditorWidgetStyle;\n}(Disposable));\nvar ForeignViewZonesIterator = /** @class */ (function () {\n function ForeignViewZonesIterator(source) {\n this._source = source;\n this._index = -1;\n this.advance();\n }\n ForeignViewZonesIterator.prototype.advance = function () {\n this._index++;\n if (this._index < this._source.length) {\n this.current = this._source[this._index];\n }\n else {\n this.current = null;\n }\n };\n return ForeignViewZonesIterator;\n}());\nvar ViewZonesComputer = /** @class */ (function () {\n function ViewZonesComputer(lineChanges, originalForeignVZ, modifiedForeignVZ) {\n this.lineChanges = lineChanges;\n this.originalForeignVZ = originalForeignVZ;\n this.modifiedForeignVZ = modifiedForeignVZ;\n }\n ViewZonesComputer.prototype.getViewZones = function () {\n var result = {\n original: [],\n modified: []\n };\n var lineChangeModifiedLength = 0;\n var lineChangeOriginalLength = 0;\n var originalEquivalentLineNumber = 0;\n var modifiedEquivalentLineNumber = 0;\n var originalEndEquivalentLineNumber = 0;\n var modifiedEndEquivalentLineNumber = 0;\n var sortMyViewZones = function (a, b) {\n return a.afterLineNumber - b.afterLineNumber;\n };\n var addAndCombineIfPossible = function (destination, item) {\n if (item.domNode === null && destination.length > 0) {\n var lastItem = destination[destination.length - 1];\n if (lastItem.afterLineNumber === item.afterLineNumber && lastItem.domNode === null) {\n lastItem.heightInLines += item.heightInLines;\n return;\n }\n }\n destination.push(item);\n };\n var modifiedForeignVZ = new ForeignViewZonesIterator(this.modifiedForeignVZ);\n var originalForeignVZ = new ForeignViewZonesIterator(this.originalForeignVZ);\n // In order to include foreign view zones after the last line change, the for loop will iterate once more after the end of the `lineChanges` array\n for (var i = 0, length_4 = this.lineChanges.length; i <= length_4; i++) {\n var lineChange = (i < length_4 ? this.lineChanges[i] : null);\n if (lineChange !== null) {\n originalEquivalentLineNumber = lineChange.originalStartLineNumber + (lineChange.originalEndLineNumber > 0 ? -1 : 0);\n modifiedEquivalentLineNumber = lineChange.modifiedStartLineNumber + (lineChange.modifiedEndLineNumber > 0 ? -1 : 0);\n lineChangeOriginalLength = (lineChange.originalEndLineNumber > 0 ? (lineChange.originalEndLineNumber - lineChange.originalStartLineNumber + 1) : 0);\n lineChangeModifiedLength = (lineChange.modifiedEndLineNumber > 0 ? (lineChange.modifiedEndLineNumber - lineChange.modifiedStartLineNumber + 1) : 0);\n originalEndEquivalentLineNumber = Math.max(lineChange.originalStartLineNumber, lineChange.originalEndLineNumber);\n modifiedEndEquivalentLineNumber = Math.max(lineChange.modifiedStartLineNumber, lineChange.modifiedEndLineNumber);\n }\n else {\n // Increase to very large value to get the producing tests of foreign view zones running\n originalEquivalentLineNumber += 10000000 + lineChangeOriginalLength;\n modifiedEquivalentLineNumber += 10000000 + lineChangeModifiedLength;\n originalEndEquivalentLineNumber = originalEquivalentLineNumber;\n modifiedEndEquivalentLineNumber = modifiedEquivalentLineNumber;\n }\n // Each step produces view zones, and after producing them, we try to cancel them out, to avoid empty-empty view zone cases\n var stepOriginal = [];\n var stepModified = [];\n // ---------------------------- PRODUCE VIEW ZONES\n // [PRODUCE] View zone(s) in original-side due to foreign view zone(s) in modified-side\n while (modifiedForeignVZ.current && modifiedForeignVZ.current.afterLineNumber <= modifiedEndEquivalentLineNumber) {\n var viewZoneLineNumber = void 0;\n if (modifiedForeignVZ.current.afterLineNumber <= modifiedEquivalentLineNumber) {\n viewZoneLineNumber = originalEquivalentLineNumber - modifiedEquivalentLineNumber + modifiedForeignVZ.current.afterLineNumber;\n }\n else {\n viewZoneLineNumber = originalEndEquivalentLineNumber;\n }\n stepOriginal.push({\n afterLineNumber: viewZoneLineNumber,\n heightInLines: modifiedForeignVZ.current.heightInLines,\n domNode: null\n });\n modifiedForeignVZ.advance();\n }\n // [PRODUCE] View zone(s) in modified-side due to foreign view zone(s) in original-side\n while (originalForeignVZ.current && originalForeignVZ.current.afterLineNumber <= originalEndEquivalentLineNumber) {\n var viewZoneLineNumber = void 0;\n if (originalForeignVZ.current.afterLineNumber <= originalEquivalentLineNumber) {\n viewZoneLineNumber = modifiedEquivalentLineNumber - originalEquivalentLineNumber + originalForeignVZ.current.afterLineNumber;\n }\n else {\n viewZoneLineNumber = modifiedEndEquivalentLineNumber;\n }\n stepModified.push({\n afterLineNumber: viewZoneLineNumber,\n heightInLines: originalForeignVZ.current.heightInLines,\n domNode: null\n });\n originalForeignVZ.advance();\n }\n if (lineChange !== null && isChangeOrInsert(lineChange)) {\n var r = this._produceOriginalFromDiff(lineChange, lineChangeOriginalLength, lineChangeModifiedLength);\n if (r) {\n stepOriginal.push(r);\n }\n }\n if (lineChange !== null && isChangeOrDelete(lineChange)) {\n var r = this._produceModifiedFromDiff(lineChange, lineChangeOriginalLength, lineChangeModifiedLength);\n if (r) {\n stepModified.push(r);\n }\n }\n // ---------------------------- END PRODUCE VIEW ZONES\n // ---------------------------- EMIT MINIMAL VIEW ZONES\n // [CANCEL & EMIT] Try to cancel view zones out\n var stepOriginalIndex = 0;\n var stepModifiedIndex = 0;\n stepOriginal = stepOriginal.sort(sortMyViewZones);\n stepModified = stepModified.sort(sortMyViewZones);\n while (stepOriginalIndex < stepOriginal.length && stepModifiedIndex < stepModified.length) {\n var original = stepOriginal[stepOriginalIndex];\n var modified = stepModified[stepModifiedIndex];\n var originalDelta = original.afterLineNumber - originalEquivalentLineNumber;\n var modifiedDelta = modified.afterLineNumber - modifiedEquivalentLineNumber;\n if (originalDelta < modifiedDelta) {\n addAndCombineIfPossible(result.original, original);\n stepOriginalIndex++;\n }\n else if (modifiedDelta < originalDelta) {\n addAndCombineIfPossible(result.modified, modified);\n stepModifiedIndex++;\n }\n else if (original.shouldNotShrink) {\n addAndCombineIfPossible(result.original, original);\n stepOriginalIndex++;\n }\n else if (modified.shouldNotShrink) {\n addAndCombineIfPossible(result.modified, modified);\n stepModifiedIndex++;\n }\n else {\n if (original.heightInLines >= modified.heightInLines) {\n // modified view zone gets removed\n original.heightInLines -= modified.heightInLines;\n stepModifiedIndex++;\n }\n else {\n // original view zone gets removed\n modified.heightInLines -= original.heightInLines;\n stepOriginalIndex++;\n }\n }\n }\n // [EMIT] Remaining original view zones\n while (stepOriginalIndex < stepOriginal.length) {\n addAndCombineIfPossible(result.original, stepOriginal[stepOriginalIndex]);\n stepOriginalIndex++;\n }\n // [EMIT] Remaining modified view zones\n while (stepModifiedIndex < stepModified.length) {\n addAndCombineIfPossible(result.modified, stepModified[stepModifiedIndex]);\n stepModifiedIndex++;\n }\n // ---------------------------- END EMIT MINIMAL VIEW ZONES\n }\n var ensureDomNode = function (z) {\n if (!z.domNode) {\n z.domNode = createFakeLinesDiv();\n }\n };\n result.original.forEach(ensureDomNode);\n result.modified.forEach(ensureDomNode);\n return result;\n };\n return ViewZonesComputer;\n}());\nfunction createDecoration(startLineNumber, startColumn, endLineNumber, endColumn, options) {\n return {\n range: new Range(startLineNumber, startColumn, endLineNumber, endColumn),\n options: options\n };\n}\nvar DECORATIONS = {\n charDelete: ModelDecorationOptions.register({\n className: 'char-delete'\n }),\n charDeleteWholeLine: ModelDecorationOptions.register({\n className: 'char-delete',\n isWholeLine: true\n }),\n charInsert: ModelDecorationOptions.register({\n className: 'char-insert'\n }),\n charInsertWholeLine: ModelDecorationOptions.register({\n className: 'char-insert',\n isWholeLine: true\n }),\n lineInsert: ModelDecorationOptions.register({\n className: 'line-insert',\n marginClassName: 'line-insert',\n isWholeLine: true\n }),\n lineInsertWithSign: ModelDecorationOptions.register({\n className: 'line-insert',\n linesDecorationsClassName: 'insert-sign',\n marginClassName: 'line-insert',\n isWholeLine: true\n }),\n lineDelete: ModelDecorationOptions.register({\n className: 'line-delete',\n marginClassName: 'line-delete',\n isWholeLine: true\n }),\n lineDeleteWithSign: ModelDecorationOptions.register({\n className: 'line-delete',\n linesDecorationsClassName: 'delete-sign',\n marginClassName: 'line-delete',\n isWholeLine: true\n }),\n lineDeleteMargin: ModelDecorationOptions.register({\n marginClassName: 'line-delete',\n })\n};\nvar DiffEdtorWidgetSideBySide = /** @class */ (function (_super) {\n __extends(DiffEdtorWidgetSideBySide, _super);\n function DiffEdtorWidgetSideBySide(dataSource, enableSplitViewResizing) {\n var _this = _super.call(this, dataSource) || this;\n _this._disableSash = (enableSplitViewResizing === false);\n _this._sashRatio = null;\n _this._sashPosition = null;\n _this._sash = _this._register(new Sash(_this._dataSource.getContainerDomNode(), _this));\n if (_this._disableSash) {\n _this._sash.state = SashState.Disabled;\n }\n _this._sash.onDidStart(function () { return _this.onSashDragStart(); });\n _this._sash.onDidChange(function (e) { return _this.onSashDrag(e); });\n _this._sash.onDidEnd(function () { return _this.onSashDragEnd(); });\n _this._sash.onDidReset(function () { return _this.onSashReset(); });\n return _this;\n }\n DiffEdtorWidgetSideBySide.prototype.setEnableSplitViewResizing = function (enableSplitViewResizing) {\n var newDisableSash = (enableSplitViewResizing === false);\n if (this._disableSash !== newDisableSash) {\n this._disableSash = newDisableSash;\n this._sash.state = this._disableSash ? SashState.Disabled : SashState.Enabled;\n }\n };\n DiffEdtorWidgetSideBySide.prototype.layout = function (sashRatio) {\n if (sashRatio === void 0) { sashRatio = this._sashRatio; }\n var w = this._dataSource.getWidth();\n var contentWidth = w - DiffEditorWidget.ENTIRE_DIFF_OVERVIEW_WIDTH;\n var sashPosition = Math.floor((sashRatio || 0.5) * contentWidth);\n var midPoint = Math.floor(0.5 * contentWidth);\n sashPosition = this._disableSash ? midPoint : sashPosition || midPoint;\n if (contentWidth > DiffEdtorWidgetSideBySide.MINIMUM_EDITOR_WIDTH * 2) {\n if (sashPosition < DiffEdtorWidgetSideBySide.MINIMUM_EDITOR_WIDTH) {\n sashPosition = DiffEdtorWidgetSideBySide.MINIMUM_EDITOR_WIDTH;\n }\n if (sashPosition > contentWidth - DiffEdtorWidgetSideBySide.MINIMUM_EDITOR_WIDTH) {\n sashPosition = contentWidth - DiffEdtorWidgetSideBySide.MINIMUM_EDITOR_WIDTH;\n }\n }\n else {\n sashPosition = midPoint;\n }\n if (this._sashPosition !== sashPosition) {\n this._sashPosition = sashPosition;\n this._sash.layout();\n }\n return this._sashPosition;\n };\n DiffEdtorWidgetSideBySide.prototype.onSashDragStart = function () {\n this._startSashPosition = this._sashPosition;\n };\n DiffEdtorWidgetSideBySide.prototype.onSashDrag = function (e) {\n var w = this._dataSource.getWidth();\n var contentWidth = w - DiffEditorWidget.ENTIRE_DIFF_OVERVIEW_WIDTH;\n var sashPosition = this.layout((this._startSashPosition + (e.currentX - e.startX)) / contentWidth);\n this._sashRatio = sashPosition / contentWidth;\n this._dataSource.relayoutEditors();\n };\n DiffEdtorWidgetSideBySide.prototype.onSashDragEnd = function () {\n this._sash.layout();\n };\n DiffEdtorWidgetSideBySide.prototype.onSashReset = function () {\n this._sashRatio = 0.5;\n this._dataSource.relayoutEditors();\n this._sash.layout();\n };\n DiffEdtorWidgetSideBySide.prototype.getVerticalSashTop = function (sash) {\n return 0;\n };\n DiffEdtorWidgetSideBySide.prototype.getVerticalSashLeft = function (sash) {\n return this._sashPosition;\n };\n DiffEdtorWidgetSideBySide.prototype.getVerticalSashHeight = function (sash) {\n return this._dataSource.getHeight();\n };\n DiffEdtorWidgetSideBySide.prototype._getViewZones = function (lineChanges, originalForeignVZ, modifiedForeignVZ, originalEditor, modifiedEditor) {\n var c = new SideBySideViewZonesComputer(lineChanges, originalForeignVZ, modifiedForeignVZ);\n return c.getViewZones();\n };\n DiffEdtorWidgetSideBySide.prototype._getOriginalEditorDecorations = function (lineChanges, ignoreTrimWhitespace, renderIndicators, originalEditor, modifiedEditor) {\n var overviewZoneColor = this._removeColor.toString();\n var result = {\n decorations: [],\n overviewZones: []\n };\n var originalModel = originalEditor.getModel();\n for (var i = 0, length_5 = lineChanges.length; i < length_5; i++) {\n var lineChange = lineChanges[i];\n if (isChangeOrDelete(lineChange)) {\n result.decorations.push({\n range: new Range(lineChange.originalStartLineNumber, 1, lineChange.originalEndLineNumber, Number.MAX_VALUE),\n options: (renderIndicators ? DECORATIONS.lineDeleteWithSign : DECORATIONS.lineDelete)\n });\n if (!isChangeOrInsert(lineChange) || !lineChange.charChanges) {\n result.decorations.push(createDecoration(lineChange.originalStartLineNumber, 1, lineChange.originalEndLineNumber, Number.MAX_VALUE, DECORATIONS.charDeleteWholeLine));\n }\n result.overviewZones.push(new OverviewRulerZone(lineChange.originalStartLineNumber, lineChange.originalEndLineNumber, overviewZoneColor));\n if (lineChange.charChanges) {\n for (var j = 0, lengthJ = lineChange.charChanges.length; j < lengthJ; j++) {\n var charChange = lineChange.charChanges[j];\n if (isChangeOrDelete(charChange)) {\n if (ignoreTrimWhitespace) {\n for (var lineNumber = charChange.originalStartLineNumber; lineNumber <= charChange.originalEndLineNumber; lineNumber++) {\n var startColumn = void 0;\n var endColumn = void 0;\n if (lineNumber === charChange.originalStartLineNumber) {\n startColumn = charChange.originalStartColumn;\n }\n else {\n startColumn = originalModel.getLineFirstNonWhitespaceColumn(lineNumber);\n }\n if (lineNumber === charChange.originalEndLineNumber) {\n endColumn = charChange.originalEndColumn;\n }\n else {\n endColumn = originalModel.getLineLastNonWhitespaceColumn(lineNumber);\n }\n result.decorations.push(createDecoration(lineNumber, startColumn, lineNumber, endColumn, DECORATIONS.charDelete));\n }\n }\n else {\n result.decorations.push(createDecoration(charChange.originalStartLineNumber, charChange.originalStartColumn, charChange.originalEndLineNumber, charChange.originalEndColumn, DECORATIONS.charDelete));\n }\n }\n }\n }\n }\n }\n return result;\n };\n DiffEdtorWidgetSideBySide.prototype._getModifiedEditorDecorations = function (lineChanges, ignoreTrimWhitespace, renderIndicators, originalEditor, modifiedEditor) {\n var overviewZoneColor = this._insertColor.toString();\n var result = {\n decorations: [],\n overviewZones: []\n };\n var modifiedModel = modifiedEditor.getModel();\n for (var i = 0, length_6 = lineChanges.length; i < length_6; i++) {\n var lineChange = lineChanges[i];\n if (isChangeOrInsert(lineChange)) {\n result.decorations.push({\n range: new Range(lineChange.modifiedStartLineNumber, 1, lineChange.modifiedEndLineNumber, Number.MAX_VALUE),\n options: (renderIndicators ? DECORATIONS.lineInsertWithSign : DECORATIONS.lineInsert)\n });\n if (!isChangeOrDelete(lineChange) || !lineChange.charChanges) {\n result.decorations.push(createDecoration(lineChange.modifiedStartLineNumber, 1, lineChange.modifiedEndLineNumber, Number.MAX_VALUE, DECORATIONS.charInsertWholeLine));\n }\n result.overviewZones.push(new OverviewRulerZone(lineChange.modifiedStartLineNumber, lineChange.modifiedEndLineNumber, overviewZoneColor));\n if (lineChange.charChanges) {\n for (var j = 0, lengthJ = lineChange.charChanges.length; j < lengthJ; j++) {\n var charChange = lineChange.charChanges[j];\n if (isChangeOrInsert(charChange)) {\n if (ignoreTrimWhitespace) {\n for (var lineNumber = charChange.modifiedStartLineNumber; lineNumber <= charChange.modifiedEndLineNumber; lineNumber++) {\n var startColumn = void 0;\n var endColumn = void 0;\n if (lineNumber === charChange.modifiedStartLineNumber) {\n startColumn = charChange.modifiedStartColumn;\n }\n else {\n startColumn = modifiedModel.getLineFirstNonWhitespaceColumn(lineNumber);\n }\n if (lineNumber === charChange.modifiedEndLineNumber) {\n endColumn = charChange.modifiedEndColumn;\n }\n else {\n endColumn = modifiedModel.getLineLastNonWhitespaceColumn(lineNumber);\n }\n result.decorations.push(createDecoration(lineNumber, startColumn, lineNumber, endColumn, DECORATIONS.charInsert));\n }\n }\n else {\n result.decorations.push(createDecoration(charChange.modifiedStartLineNumber, charChange.modifiedStartColumn, charChange.modifiedEndLineNumber, charChange.modifiedEndColumn, DECORATIONS.charInsert));\n }\n }\n }\n }\n }\n }\n return result;\n };\n DiffEdtorWidgetSideBySide.MINIMUM_EDITOR_WIDTH = 100;\n return DiffEdtorWidgetSideBySide;\n}(DiffEditorWidgetStyle));\nvar SideBySideViewZonesComputer = /** @class */ (function (_super) {\n __extends(SideBySideViewZonesComputer, _super);\n function SideBySideViewZonesComputer(lineChanges, originalForeignVZ, modifiedForeignVZ) {\n return _super.call(this, lineChanges, originalForeignVZ, modifiedForeignVZ) || this;\n }\n SideBySideViewZonesComputer.prototype._produceOriginalFromDiff = function (lineChange, lineChangeOriginalLength, lineChangeModifiedLength) {\n if (lineChangeModifiedLength > lineChangeOriginalLength) {\n return {\n afterLineNumber: Math.max(lineChange.originalStartLineNumber, lineChange.originalEndLineNumber),\n heightInLines: (lineChangeModifiedLength - lineChangeOriginalLength),\n domNode: null\n };\n }\n return null;\n };\n SideBySideViewZonesComputer.prototype._produceModifiedFromDiff = function (lineChange, lineChangeOriginalLength, lineChangeModifiedLength) {\n if (lineChangeOriginalLength > lineChangeModifiedLength) {\n return {\n afterLineNumber: Math.max(lineChange.modifiedStartLineNumber, lineChange.modifiedEndLineNumber),\n heightInLines: (lineChangeOriginalLength - lineChangeModifiedLength),\n domNode: null\n };\n }\n return null;\n };\n return SideBySideViewZonesComputer;\n}(ViewZonesComputer));\nvar DiffEdtorWidgetInline = /** @class */ (function (_super) {\n __extends(DiffEdtorWidgetInline, _super);\n function DiffEdtorWidgetInline(dataSource, enableSplitViewResizing) {\n var _this = _super.call(this, dataSource) || this;\n _this.decorationsLeft = dataSource.getOriginalEditor().getLayoutInfo().decorationsLeft;\n _this._register(dataSource.getOriginalEditor().onDidLayoutChange(function (layoutInfo) {\n if (_this.decorationsLeft !== layoutInfo.decorationsLeft) {\n _this.decorationsLeft = layoutInfo.decorationsLeft;\n dataSource.relayoutEditors();\n }\n }));\n return _this;\n }\n DiffEdtorWidgetInline.prototype.setEnableSplitViewResizing = function (enableSplitViewResizing) {\n // Nothing to do..\n };\n DiffEdtorWidgetInline.prototype._getViewZones = function (lineChanges, originalForeignVZ, modifiedForeignVZ, originalEditor, modifiedEditor, renderIndicators) {\n var computer = new InlineViewZonesComputer(lineChanges, originalForeignVZ, modifiedForeignVZ, originalEditor, modifiedEditor, renderIndicators);\n return computer.getViewZones();\n };\n DiffEdtorWidgetInline.prototype._getOriginalEditorDecorations = function (lineChanges, ignoreTrimWhitespace, renderIndicators, originalEditor, modifiedEditor) {\n var overviewZoneColor = this._removeColor.toString();\n var result = {\n decorations: [],\n overviewZones: []\n };\n for (var i = 0, length_7 = lineChanges.length; i < length_7; i++) {\n var lineChange = lineChanges[i];\n // Add overview zones in the overview ruler\n if (isChangeOrDelete(lineChange)) {\n result.decorations.push({\n range: new Range(lineChange.originalStartLineNumber, 1, lineChange.originalEndLineNumber, Number.MAX_VALUE),\n options: DECORATIONS.lineDeleteMargin\n });\n result.overviewZones.push(new OverviewRulerZone(lineChange.originalStartLineNumber, lineChange.originalEndLineNumber, overviewZoneColor));\n }\n }\n return result;\n };\n DiffEdtorWidgetInline.prototype._getModifiedEditorDecorations = function (lineChanges, ignoreTrimWhitespace, renderIndicators, originalEditor, modifiedEditor) {\n var overviewZoneColor = this._insertColor.toString();\n var result = {\n decorations: [],\n overviewZones: []\n };\n var modifiedModel = modifiedEditor.getModel();\n for (var i = 0, length_8 = lineChanges.length; i < length_8; i++) {\n var lineChange = lineChanges[i];\n // Add decorations & overview zones\n if (isChangeOrInsert(lineChange)) {\n result.decorations.push({\n range: new Range(lineChange.modifiedStartLineNumber, 1, lineChange.modifiedEndLineNumber, Number.MAX_VALUE),\n options: (renderIndicators ? DECORATIONS.lineInsertWithSign : DECORATIONS.lineInsert)\n });\n result.overviewZones.push(new OverviewRulerZone(lineChange.modifiedStartLineNumber, lineChange.modifiedEndLineNumber, overviewZoneColor));\n if (lineChange.charChanges) {\n for (var j = 0, lengthJ = lineChange.charChanges.length; j < lengthJ; j++) {\n var charChange = lineChange.charChanges[j];\n if (isChangeOrInsert(charChange)) {\n if (ignoreTrimWhitespace) {\n for (var lineNumber = charChange.modifiedStartLineNumber; lineNumber <= charChange.modifiedEndLineNumber; lineNumber++) {\n var startColumn = void 0;\n var endColumn = void 0;\n if (lineNumber === charChange.modifiedStartLineNumber) {\n startColumn = charChange.modifiedStartColumn;\n }\n else {\n startColumn = modifiedModel.getLineFirstNonWhitespaceColumn(lineNumber);\n }\n if (lineNumber === charChange.modifiedEndLineNumber) {\n endColumn = charChange.modifiedEndColumn;\n }\n else {\n endColumn = modifiedModel.getLineLastNonWhitespaceColumn(lineNumber);\n }\n result.decorations.push(createDecoration(lineNumber, startColumn, lineNumber, endColumn, DECORATIONS.charInsert));\n }\n }\n else {\n result.decorations.push(createDecoration(charChange.modifiedStartLineNumber, charChange.modifiedStartColumn, charChange.modifiedEndLineNumber, charChange.modifiedEndColumn, DECORATIONS.charInsert));\n }\n }\n }\n }\n else {\n result.decorations.push(createDecoration(lineChange.modifiedStartLineNumber, 1, lineChange.modifiedEndLineNumber, Number.MAX_VALUE, DECORATIONS.charInsertWholeLine));\n }\n }\n }\n return result;\n };\n DiffEdtorWidgetInline.prototype.layout = function () {\n // An editor should not be smaller than 5px\n return Math.max(5, this.decorationsLeft);\n };\n return DiffEdtorWidgetInline;\n}(DiffEditorWidgetStyle));\nvar InlineViewZonesComputer = /** @class */ (function (_super) {\n __extends(InlineViewZonesComputer, _super);\n function InlineViewZonesComputer(lineChanges, originalForeignVZ, modifiedForeignVZ, originalEditor, modifiedEditor, renderIndicators) {\n var _this = _super.call(this, lineChanges, originalForeignVZ, modifiedForeignVZ) || this;\n _this.originalModel = originalEditor.getModel();\n _this.modifiedEditorConfiguration = modifiedEditor.getConfiguration();\n _this.modifiedEditorTabSize = modifiedEditor.getModel().getOptions().tabSize;\n _this.renderIndicators = renderIndicators;\n return _this;\n }\n InlineViewZonesComputer.prototype._produceOriginalFromDiff = function (lineChange, lineChangeOriginalLength, lineChangeModifiedLength) {\n var marginDomNode = document.createElement('div');\n marginDomNode.className = 'inline-added-margin-view-zone';\n Configuration.applyFontInfoSlow(marginDomNode, this.modifiedEditorConfiguration.fontInfo);\n return {\n afterLineNumber: Math.max(lineChange.originalStartLineNumber, lineChange.originalEndLineNumber),\n heightInLines: lineChangeModifiedLength,\n domNode: document.createElement('div'),\n marginDomNode: marginDomNode\n };\n };\n InlineViewZonesComputer.prototype._produceModifiedFromDiff = function (lineChange, lineChangeOriginalLength, lineChangeModifiedLength) {\n var decorations = [];\n if (lineChange.charChanges) {\n for (var j = 0, lengthJ = lineChange.charChanges.length; j < lengthJ; j++) {\n var charChange = lineChange.charChanges[j];\n if (isChangeOrDelete(charChange)) {\n decorations.push(new InlineDecoration(new Range(charChange.originalStartLineNumber, charChange.originalStartColumn, charChange.originalEndLineNumber, charChange.originalEndColumn), 'char-delete', 0 /* Regular */));\n }\n }\n }\n var sb = createStringBuilder(10000);\n var marginHTML = [];\n var lineDecorationsWidth = this.modifiedEditorConfiguration.layoutInfo.decorationsWidth;\n var lineHeight = this.modifiedEditorConfiguration.lineHeight;\n var typicalHalfwidthCharacterWidth = this.modifiedEditorConfiguration.fontInfo.typicalHalfwidthCharacterWidth;\n var maxCharsPerLine = 0;\n for (var lineNumber = lineChange.originalStartLineNumber; lineNumber <= lineChange.originalEndLineNumber; lineNumber++) {\n maxCharsPerLine = Math.max(maxCharsPerLine, this._renderOriginalLine(lineNumber - lineChange.originalStartLineNumber, this.originalModel, this.modifiedEditorConfiguration, this.modifiedEditorTabSize, lineNumber, decorations, sb));\n if (this.renderIndicators) {\n var index = lineNumber - lineChange.originalStartLineNumber;\n marginHTML = marginHTML.concat([\n \"
    \"\n ]);\n }\n }\n maxCharsPerLine += this.modifiedEditorConfiguration.viewInfo.scrollBeyondLastColumn;\n var domNode = document.createElement('div');\n domNode.className = 'view-lines line-delete';\n domNode.innerHTML = sb.build();\n Configuration.applyFontInfoSlow(domNode, this.modifiedEditorConfiguration.fontInfo);\n var marginDomNode = document.createElement('div');\n marginDomNode.className = 'inline-deleted-margin-view-zone';\n marginDomNode.innerHTML = marginHTML.join('');\n Configuration.applyFontInfoSlow(marginDomNode, this.modifiedEditorConfiguration.fontInfo);\n return {\n shouldNotShrink: true,\n afterLineNumber: (lineChange.modifiedEndLineNumber === 0 ? lineChange.modifiedStartLineNumber : lineChange.modifiedStartLineNumber - 1),\n heightInLines: lineChangeOriginalLength,\n minWidthInPx: (maxCharsPerLine * typicalHalfwidthCharacterWidth),\n domNode: domNode,\n marginDomNode: marginDomNode\n };\n };\n InlineViewZonesComputer.prototype._renderOriginalLine = function (count, originalModel, config, tabSize, lineNumber, decorations, sb) {\n var lineTokens = originalModel.getLineTokens(lineNumber);\n var lineContent = lineTokens.getLineContent();\n var actualDecorations = LineDecoration.filter(decorations, lineNumber, 1, lineContent.length + 1);\n sb.appendASCIIString('
    ');\n var isBasicASCII = ViewLineRenderingData.isBasicASCII(lineContent, originalModel.mightContainNonBasicASCII());\n var containsRTL = ViewLineRenderingData.containsRTL(lineContent, isBasicASCII, originalModel.mightContainRTL());\n var output = renderViewLine(new RenderLineInput((config.fontInfo.isMonospace && !config.viewInfo.disableMonospaceOptimizations), lineContent, false, isBasicASCII, containsRTL, 0, lineTokens, actualDecorations, tabSize, config.fontInfo.spaceWidth, config.viewInfo.stopRenderingLineAfter, config.viewInfo.renderWhitespace, config.viewInfo.renderControlCharacters, config.viewInfo.fontLigatures), sb);\n sb.appendASCIIString('
    ');\n var absoluteOffsets = output.characterMapping.getAbsoluteOffsets();\n return absoluteOffsets.length > 0 ? absoluteOffsets[absoluteOffsets.length - 1] : 0;\n };\n return InlineViewZonesComputer;\n}(ViewZonesComputer));\nfunction isChangeOrInsert(lineChange) {\n return lineChange.modifiedEndLineNumber > 0;\n}\nfunction isChangeOrDelete(lineChange) {\n return lineChange.originalEndLineNumber > 0;\n}\nfunction createFakeLinesDiv() {\n var r = document.createElement('div');\n r.className = 'diagonal-fill';\n return r;\n}\nregisterThemingParticipant(function (theme, collector) {\n var added = theme.getColor(diffInserted);\n if (added) {\n collector.addRule(\".monaco-editor .line-insert, .monaco-editor .char-insert { background-color: \" + added + \"; }\");\n collector.addRule(\".monaco-diff-editor .line-insert, .monaco-diff-editor .char-insert { background-color: \" + added + \"; }\");\n collector.addRule(\".monaco-editor .inline-added-margin-view-zone { background-color: \" + added + \"; }\");\n }\n var removed = theme.getColor(diffRemoved);\n if (removed) {\n collector.addRule(\".monaco-editor .line-delete, .monaco-editor .char-delete { background-color: \" + removed + \"; }\");\n collector.addRule(\".monaco-diff-editor .line-delete, .monaco-diff-editor .char-delete { background-color: \" + removed + \"; }\");\n collector.addRule(\".monaco-editor .inline-deleted-margin-view-zone { background-color: \" + removed + \"; }\");\n }\n var addedOutline = theme.getColor(diffInsertedOutline);\n if (addedOutline) {\n collector.addRule(\".monaco-editor .line-insert, .monaco-editor .char-insert { border: 1px \" + (theme.type === 'hc' ? 'dashed' : 'solid') + \" \" + addedOutline + \"; }\");\n }\n var removedOutline = theme.getColor(diffRemovedOutline);\n if (removedOutline) {\n collector.addRule(\".monaco-editor .line-delete, .monaco-editor .char-delete { border: 1px \" + (theme.type === 'hc' ? 'dashed' : 'solid') + \" \" + removedOutline + \"; }\");\n }\n var shadow = theme.getColor(scrollbarShadow);\n if (shadow) {\n collector.addRule(\".monaco-diff-editor.side-by-side .editor.modified { box-shadow: -6px 0 5px -5px \" + shadow + \"; }\");\n }\n var border = theme.getColor(diffBorder);\n if (border) {\n collector.addRule(\".monaco-diff-editor.side-by-side .editor.modified { border-left: 1px solid \" + border + \"; }\");\n }\n});\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport * as assert from '../../../base/common/assert';\nimport * as objects from '../../../base/common/objects';\nimport { Range } from '../../common/core/range';\nimport { dispose } from '../../../base/common/lifecycle';\nimport { Emitter } from '../../../base/common/event';\nvar defaultOptions = {\n followsCaret: true,\n ignoreCharChanges: true,\n alwaysRevealFirst: true\n};\n/**\n * Create a new diff navigator for the provided diff editor.\n */\nvar DiffNavigator = /** @class */ (function () {\n function DiffNavigator(editor, options) {\n if (options === void 0) { options = {}; }\n var _this = this;\n this._onDidUpdate = new Emitter();\n this._editor = editor;\n this._options = objects.mixin(options, defaultOptions, false);\n this.disposed = false;\n this._disposables = [];\n this.nextIdx = -1;\n this.ranges = [];\n this.ignoreSelectionChange = false;\n this.revealFirst = this._options.alwaysRevealFirst;\n // hook up to diff editor for diff, disposal, and caret move\n this._disposables.push(this._editor.onDidDispose(function () { return _this.dispose(); }));\n this._disposables.push(this._editor.onDidUpdateDiff(function () { return _this._onDiffUpdated(); }));\n if (this._options.followsCaret) {\n this._disposables.push(this._editor.getModifiedEditor().onDidChangeCursorPosition(function (e) {\n if (_this.ignoreSelectionChange) {\n return;\n }\n _this.nextIdx = -1;\n }));\n }\n if (this._options.alwaysRevealFirst) {\n this._disposables.push(this._editor.getModifiedEditor().onDidChangeModel(function (e) {\n _this.revealFirst = true;\n }));\n }\n // init things\n this._init();\n }\n DiffNavigator.prototype._init = function () {\n var changes = this._editor.getLineChanges();\n if (!changes) {\n return;\n }\n };\n DiffNavigator.prototype._onDiffUpdated = function () {\n this._init();\n this._compute(this._editor.getLineChanges());\n if (this.revealFirst) {\n // Only reveal first on first non-null changes\n if (this._editor.getLineChanges() !== null) {\n this.revealFirst = false;\n this.nextIdx = -1;\n this.next(1 /* Immediate */);\n }\n }\n };\n DiffNavigator.prototype._compute = function (lineChanges) {\n var _this = this;\n // new ranges\n this.ranges = [];\n if (lineChanges) {\n // create ranges from changes\n lineChanges.forEach(function (lineChange) {\n if (!_this._options.ignoreCharChanges && lineChange.charChanges) {\n lineChange.charChanges.forEach(function (charChange) {\n _this.ranges.push({\n rhs: true,\n range: new Range(charChange.modifiedStartLineNumber, charChange.modifiedStartColumn, charChange.modifiedEndLineNumber, charChange.modifiedEndColumn)\n });\n });\n }\n else {\n _this.ranges.push({\n rhs: true,\n range: new Range(lineChange.modifiedStartLineNumber, 1, lineChange.modifiedStartLineNumber, 1)\n });\n }\n });\n }\n // sort\n this.ranges.sort(function (left, right) {\n if (left.range.getStartPosition().isBeforeOrEqual(right.range.getStartPosition())) {\n return -1;\n }\n else if (right.range.getStartPosition().isBeforeOrEqual(left.range.getStartPosition())) {\n return 1;\n }\n else {\n return 0;\n }\n });\n this._onDidUpdate.fire(this);\n };\n DiffNavigator.prototype._initIdx = function (fwd) {\n var found = false;\n var position = this._editor.getPosition();\n for (var i = 0, len = this.ranges.length; i < len && !found; i++) {\n var range = this.ranges[i].range;\n if (position.isBeforeOrEqual(range.getStartPosition())) {\n this.nextIdx = i + (fwd ? 0 : -1);\n found = true;\n }\n }\n if (!found) {\n // after the last change\n this.nextIdx = fwd ? 0 : this.ranges.length - 1;\n }\n if (this.nextIdx < 0) {\n this.nextIdx = this.ranges.length - 1;\n }\n };\n DiffNavigator.prototype._move = function (fwd, scrollType) {\n assert.ok(!this.disposed, 'Illegal State - diff navigator has been disposed');\n if (!this.canNavigate()) {\n return;\n }\n if (this.nextIdx === -1) {\n this._initIdx(fwd);\n }\n else if (fwd) {\n this.nextIdx += 1;\n if (this.nextIdx >= this.ranges.length) {\n this.nextIdx = 0;\n }\n }\n else {\n this.nextIdx -= 1;\n if (this.nextIdx < 0) {\n this.nextIdx = this.ranges.length - 1;\n }\n }\n var info = this.ranges[this.nextIdx];\n this.ignoreSelectionChange = true;\n try {\n var pos = info.range.getStartPosition();\n this._editor.setPosition(pos);\n this._editor.revealPositionInCenter(pos, scrollType);\n }\n finally {\n this.ignoreSelectionChange = false;\n }\n };\n DiffNavigator.prototype.canNavigate = function () {\n return this.ranges && this.ranges.length > 0;\n };\n DiffNavigator.prototype.next = function (scrollType) {\n if (scrollType === void 0) { scrollType = 0 /* Smooth */; }\n this._move(true, scrollType);\n };\n DiffNavigator.prototype.previous = function (scrollType) {\n if (scrollType === void 0) { scrollType = 0 /* Smooth */; }\n this._move(false, scrollType);\n };\n DiffNavigator.prototype.dispose = function () {\n dispose(this._disposables);\n this._disposables.length = 0;\n this._onDidUpdate.dispose();\n this.ranges = null;\n this.disposed = true;\n };\n return DiffNavigator;\n}());\nexport { DiffNavigator };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport './bracketMatching.css';\nimport * as nls from '../../../nls';\nimport { Disposable } from '../../../base/common/lifecycle';\nimport { Position } from '../../common/core/position';\nimport { Selection } from '../../common/core/selection';\nimport { RunOnceScheduler } from '../../../base/common/async';\nimport { EditorAction, registerEditorAction, registerEditorContribution } from '../../browser/editorExtensions';\nimport { EditorContextKeys } from '../../common/editorContextKeys';\nimport { registerThemingParticipant, themeColorFromId } from '../../../platform/theme/common/themeService';\nimport { editorBracketMatchBackground, editorBracketMatchBorder } from '../../common/view/editorColorRegistry';\nimport { ModelDecorationOptions } from '../../common/model/textModel';\nimport { registerColor } from '../../../platform/theme/common/colorRegistry';\nimport { TrackedRangeStickiness, OverviewRulerLane } from '../../common/model';\nvar overviewRulerBracketMatchForeground = registerColor('editorOverviewRuler.bracketMatchForeground', { dark: '#A0A0A0', light: '#A0A0A0', hc: '#A0A0A0' }, nls.localize('overviewRulerBracketMatchForeground', 'Overview ruler marker color for matching brackets.'));\nvar JumpToBracketAction = /** @class */ (function (_super) {\n __extends(JumpToBracketAction, _super);\n function JumpToBracketAction() {\n return _super.call(this, {\n id: 'editor.action.jumpToBracket',\n label: nls.localize('smartSelect.jumpBracket', \"Go to Bracket\"),\n alias: 'Go to Bracket',\n precondition: null,\n kbOpts: {\n kbExpr: EditorContextKeys.editorTextFocus,\n primary: 2048 /* CtrlCmd */ | 1024 /* Shift */ | 88 /* US_BACKSLASH */,\n weight: 100 /* EditorContrib */\n }\n }) || this;\n }\n JumpToBracketAction.prototype.run = function (accessor, editor) {\n var controller = BracketMatchingController.get(editor);\n if (!controller) {\n return;\n }\n controller.jumpToBracket();\n };\n return JumpToBracketAction;\n}(EditorAction));\nvar SelectToBracketAction = /** @class */ (function (_super) {\n __extends(SelectToBracketAction, _super);\n function SelectToBracketAction() {\n return _super.call(this, {\n id: 'editor.action.selectToBracket',\n label: nls.localize('smartSelect.selectToBracket', \"Select to Bracket\"),\n alias: 'Select to Bracket',\n precondition: null\n }) || this;\n }\n SelectToBracketAction.prototype.run = function (accessor, editor) {\n var controller = BracketMatchingController.get(editor);\n if (!controller) {\n return;\n }\n controller.selectToBracket();\n };\n return SelectToBracketAction;\n}(EditorAction));\nvar BracketsData = /** @class */ (function () {\n function BracketsData(position, brackets) {\n this.position = position;\n this.brackets = brackets;\n }\n return BracketsData;\n}());\nvar BracketMatchingController = /** @class */ (function (_super) {\n __extends(BracketMatchingController, _super);\n function BracketMatchingController(editor) {\n var _this = _super.call(this) || this;\n _this._editor = editor;\n _this._lastBracketsData = [];\n _this._lastVersionId = 0;\n _this._decorations = [];\n _this._updateBracketsSoon = _this._register(new RunOnceScheduler(function () { return _this._updateBrackets(); }, 50));\n _this._matchBrackets = _this._editor.getConfiguration().contribInfo.matchBrackets;\n _this._updateBracketsSoon.schedule();\n _this._register(editor.onDidChangeCursorPosition(function (e) {\n if (!_this._matchBrackets) {\n // Early exit if nothing needs to be done!\n // Leave some form of early exit check here if you wish to continue being a cursor position change listener ;)\n return;\n }\n _this._updateBracketsSoon.schedule();\n }));\n _this._register(editor.onDidChangeModelContent(function (e) {\n _this._updateBracketsSoon.schedule();\n }));\n _this._register(editor.onDidChangeModel(function (e) {\n _this._decorations = [];\n _this._updateBracketsSoon.schedule();\n }));\n _this._register(editor.onDidChangeModelLanguageConfiguration(function (e) {\n _this._lastBracketsData = [];\n _this._updateBracketsSoon.schedule();\n }));\n _this._register(editor.onDidChangeConfiguration(function (e) {\n _this._matchBrackets = _this._editor.getConfiguration().contribInfo.matchBrackets;\n if (!_this._matchBrackets && _this._decorations.length > 0) {\n // Remove existing decorations if bracket matching is off\n _this._decorations = _this._editor.deltaDecorations(_this._decorations, []);\n }\n _this._updateBracketsSoon.schedule();\n }));\n return _this;\n }\n BracketMatchingController.get = function (editor) {\n return editor.getContribution(BracketMatchingController.ID);\n };\n BracketMatchingController.prototype.getId = function () {\n return BracketMatchingController.ID;\n };\n BracketMatchingController.prototype.jumpToBracket = function () {\n var model = this._editor.getModel();\n if (!model) {\n return;\n }\n var newSelections = this._editor.getSelections().map(function (selection) {\n var position = selection.getStartPosition();\n // find matching brackets if position is on a bracket\n var brackets = model.matchBracket(position);\n var newCursorPosition = null;\n if (brackets) {\n if (brackets[0].containsPosition(position)) {\n newCursorPosition = brackets[1].getStartPosition();\n }\n else if (brackets[1].containsPosition(position)) {\n newCursorPosition = brackets[0].getStartPosition();\n }\n }\n else {\n // find the next bracket if the position isn't on a matching bracket\n var nextBracket = model.findNextBracket(position);\n if (nextBracket && nextBracket.range) {\n newCursorPosition = nextBracket.range.getStartPosition();\n }\n }\n if (newCursorPosition) {\n return new Selection(newCursorPosition.lineNumber, newCursorPosition.column, newCursorPosition.lineNumber, newCursorPosition.column);\n }\n return new Selection(position.lineNumber, position.column, position.lineNumber, position.column);\n });\n this._editor.setSelections(newSelections);\n this._editor.revealRange(newSelections[0]);\n };\n BracketMatchingController.prototype.selectToBracket = function () {\n var model = this._editor.getModel();\n if (!model) {\n return;\n }\n var newSelections = [];\n this._editor.getSelections().forEach(function (selection) {\n var position = selection.getStartPosition();\n var brackets = model.matchBracket(position);\n var openBracket = null;\n var closeBracket = null;\n if (!brackets) {\n var nextBracket = model.findNextBracket(position);\n if (nextBracket && nextBracket.range) {\n brackets = model.matchBracket(nextBracket.range.getStartPosition());\n }\n }\n if (brackets) {\n if (brackets[0].startLineNumber === brackets[1].startLineNumber) {\n openBracket = brackets[1].startColumn < brackets[0].startColumn ?\n brackets[1].getStartPosition() : brackets[0].getStartPosition();\n closeBracket = brackets[1].startColumn < brackets[0].startColumn ?\n brackets[0].getEndPosition() : brackets[1].getEndPosition();\n }\n else {\n openBracket = brackets[1].startLineNumber < brackets[0].startLineNumber ?\n brackets[1].getStartPosition() : brackets[0].getStartPosition();\n closeBracket = brackets[1].startLineNumber < brackets[0].startLineNumber ?\n brackets[0].getEndPosition() : brackets[1].getEndPosition();\n }\n }\n if (openBracket && closeBracket) {\n newSelections.push(new Selection(openBracket.lineNumber, openBracket.column, closeBracket.lineNumber, closeBracket.column));\n }\n });\n if (newSelections.length > 0) {\n this._editor.setSelections(newSelections);\n this._editor.revealRange(newSelections[0]);\n }\n };\n BracketMatchingController.prototype._updateBrackets = function () {\n if (!this._matchBrackets) {\n return;\n }\n this._recomputeBrackets();\n var newDecorations = [], newDecorationsLen = 0;\n for (var i = 0, len = this._lastBracketsData.length; i < len; i++) {\n var brackets = this._lastBracketsData[i].brackets;\n if (brackets) {\n newDecorations[newDecorationsLen++] = { range: brackets[0], options: BracketMatchingController._DECORATION_OPTIONS };\n newDecorations[newDecorationsLen++] = { range: brackets[1], options: BracketMatchingController._DECORATION_OPTIONS };\n }\n }\n this._decorations = this._editor.deltaDecorations(this._decorations, newDecorations);\n };\n BracketMatchingController.prototype._recomputeBrackets = function () {\n var model = this._editor.getModel();\n if (!model) {\n // no model => no brackets!\n this._lastBracketsData = [];\n this._lastVersionId = 0;\n return;\n }\n var versionId = model.getVersionId();\n var previousData = [];\n if (this._lastVersionId === versionId) {\n // use the previous data only if the model is at the same version id\n previousData = this._lastBracketsData;\n }\n var selections = this._editor.getSelections();\n var positions = [], positionsLen = 0;\n for (var i = 0, len = selections.length; i < len; i++) {\n var selection = selections[i];\n if (selection.isEmpty()) {\n // will bracket match a cursor only if the selection is collapsed\n positions[positionsLen++] = selection.getStartPosition();\n }\n }\n // sort positions for `previousData` cache hits\n if (positions.length > 1) {\n positions.sort(Position.compare);\n }\n var newData = [], newDataLen = 0;\n var previousIndex = 0, previousLen = previousData.length;\n for (var i = 0, len = positions.length; i < len; i++) {\n var position = positions[i];\n while (previousIndex < previousLen && previousData[previousIndex].position.isBefore(position)) {\n previousIndex++;\n }\n if (previousIndex < previousLen && previousData[previousIndex].position.equals(position)) {\n newData[newDataLen++] = previousData[previousIndex];\n }\n else {\n var brackets = model.matchBracket(position);\n newData[newDataLen++] = new BracketsData(position, brackets);\n }\n }\n this._lastBracketsData = newData;\n this._lastVersionId = versionId;\n };\n BracketMatchingController.ID = 'editor.contrib.bracketMatchingController';\n BracketMatchingController._DECORATION_OPTIONS = ModelDecorationOptions.register({\n stickiness: TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges,\n className: 'bracket-match',\n overviewRuler: {\n color: themeColorFromId(overviewRulerBracketMatchForeground),\n darkColor: themeColorFromId(overviewRulerBracketMatchForeground),\n position: OverviewRulerLane.Center\n }\n });\n return BracketMatchingController;\n}(Disposable));\nexport { BracketMatchingController };\nregisterEditorContribution(BracketMatchingController);\nregisterEditorAction(SelectToBracketAction);\nregisterEditorAction(JumpToBracketAction);\nregisterThemingParticipant(function (theme, collector) {\n var bracketMatchBackground = theme.getColor(editorBracketMatchBackground);\n if (bracketMatchBackground) {\n collector.addRule(\".monaco-editor .bracket-match { background-color: \" + bracketMatchBackground + \"; }\");\n }\n var bracketMatchBorder = theme.getColor(editorBracketMatchBorder);\n if (bracketMatchBorder) {\n collector.addRule(\".monaco-editor .bracket-match { border: 1px solid \" + bracketMatchBorder + \"; }\");\n }\n});\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport { Range } from '../../common/core/range';\nvar MoveCaretCommand = /** @class */ (function () {\n function MoveCaretCommand(selection, isMovingLeft) {\n this._selection = selection;\n this._isMovingLeft = isMovingLeft;\n }\n MoveCaretCommand.prototype.getEditOperations = function (model, builder) {\n var s = this._selection;\n this._selectionId = builder.trackSelection(s);\n if (s.startLineNumber !== s.endLineNumber) {\n return;\n }\n if (this._isMovingLeft && s.startColumn === 0) {\n return;\n }\n else if (!this._isMovingLeft && s.endColumn === model.getLineMaxColumn(s.startLineNumber)) {\n return;\n }\n var lineNumber = s.selectionStartLineNumber;\n var lineContent = model.getLineContent(lineNumber);\n var left;\n var middle;\n var right;\n if (this._isMovingLeft) {\n left = lineContent.substring(0, s.startColumn - 2);\n middle = lineContent.substring(s.startColumn - 1, s.endColumn - 1);\n right = lineContent.substring(s.startColumn - 2, s.startColumn - 1) + lineContent.substring(s.endColumn - 1);\n }\n else {\n left = lineContent.substring(0, s.startColumn - 1) + lineContent.substring(s.endColumn - 1, s.endColumn);\n middle = lineContent.substring(s.startColumn - 1, s.endColumn - 1);\n right = lineContent.substring(s.endColumn);\n }\n var newLineContent = left + middle + right;\n builder.addEditOperation(new Range(lineNumber, 1, lineNumber, model.getLineMaxColumn(lineNumber)), null);\n builder.addEditOperation(new Range(lineNumber, 1, lineNumber, 1), newLineContent);\n this._cutStartIndex = s.startColumn + (this._isMovingLeft ? -1 : 1);\n this._cutEndIndex = this._cutStartIndex + s.endColumn - s.startColumn;\n this._moved = true;\n };\n MoveCaretCommand.prototype.computeCursorState = function (model, helper) {\n var result = helper.getTrackedSelection(this._selectionId);\n if (this._moved) {\n result = result.setStartPosition(result.startLineNumber, this._cutStartIndex);\n result = result.setEndPosition(result.startLineNumber, this._cutEndIndex);\n }\n return result;\n };\n return MoveCaretCommand;\n}());\nexport { MoveCaretCommand };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport * as nls from '../../../nls';\nimport { EditorContextKeys } from '../../common/editorContextKeys';\nimport { registerEditorAction, EditorAction } from '../../browser/editorExtensions';\nimport { MoveCaretCommand } from './moveCaretCommand';\nvar MoveCaretAction = /** @class */ (function (_super) {\n __extends(MoveCaretAction, _super);\n function MoveCaretAction(left, opts) {\n var _this = _super.call(this, opts) || this;\n _this.left = left;\n return _this;\n }\n MoveCaretAction.prototype.run = function (accessor, editor) {\n var commands = [];\n var selections = editor.getSelections();\n for (var i = 0; i < selections.length; i++) {\n commands.push(new MoveCaretCommand(selections[i], this.left));\n }\n editor.pushUndoStop();\n editor.executeCommands(this.id, commands);\n editor.pushUndoStop();\n };\n return MoveCaretAction;\n}(EditorAction));\nvar MoveCaretLeftAction = /** @class */ (function (_super) {\n __extends(MoveCaretLeftAction, _super);\n function MoveCaretLeftAction() {\n return _super.call(this, true, {\n id: 'editor.action.moveCarretLeftAction',\n label: nls.localize('caret.moveLeft', \"Move Caret Left\"),\n alias: 'Move Caret Left',\n precondition: EditorContextKeys.writable\n }) || this;\n }\n return MoveCaretLeftAction;\n}(MoveCaretAction));\nvar MoveCaretRightAction = /** @class */ (function (_super) {\n __extends(MoveCaretRightAction, _super);\n function MoveCaretRightAction() {\n return _super.call(this, false, {\n id: 'editor.action.moveCarretRightAction',\n label: nls.localize('caret.moveRight', \"Move Caret Right\"),\n alias: 'Move Caret Right',\n precondition: EditorContextKeys.writable\n }) || this;\n }\n return MoveCaretRightAction;\n}(MoveCaretAction));\nregisterEditorAction(MoveCaretLeftAction);\nregisterEditorAction(MoveCaretRightAction);\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport * as nls from '../../../nls';\nimport { isLowSurrogate, isHighSurrogate } from '../../../base/common/strings';\nimport { Range } from '../../common/core/range';\nimport { Position } from '../../common/core/position';\nimport { EditorContextKeys } from '../../common/editorContextKeys';\nimport { registerEditorAction, EditorAction } from '../../browser/editorExtensions';\nimport { ReplaceCommand } from '../../common/commands/replaceCommand';\nvar TransposeLettersAction = /** @class */ (function (_super) {\n __extends(TransposeLettersAction, _super);\n function TransposeLettersAction() {\n return _super.call(this, {\n id: 'editor.action.transposeLetters',\n label: nls.localize('transposeLetters.label', \"Transpose Letters\"),\n alias: 'Transpose Letters',\n precondition: EditorContextKeys.writable,\n kbOpts: {\n kbExpr: EditorContextKeys.textInputFocus,\n primary: 0,\n mac: {\n primary: 256 /* WinCtrl */ | 50 /* KEY_T */\n },\n weight: 100 /* EditorContrib */\n }\n }) || this;\n }\n TransposeLettersAction.prototype.positionLeftOf = function (start, model) {\n var column = start.column;\n var lineNumber = start.lineNumber;\n if (column > model.getLineMinColumn(lineNumber)) {\n if (isLowSurrogate(model.getLineContent(lineNumber).charCodeAt(column - 2))) {\n // character before column is a low surrogate\n column = column - 2;\n }\n else {\n column = column - 1;\n }\n }\n else if (lineNumber > 1) {\n lineNumber = lineNumber - 1;\n column = model.getLineMaxColumn(lineNumber);\n }\n return new Position(lineNumber, column);\n };\n TransposeLettersAction.prototype.positionRightOf = function (start, model) {\n var column = start.column;\n var lineNumber = start.lineNumber;\n if (column < model.getLineMaxColumn(lineNumber)) {\n if (isHighSurrogate(model.getLineContent(lineNumber).charCodeAt(column - 1))) {\n // character after column is a high surrogate\n column = column + 2;\n }\n else {\n column = column + 1;\n }\n }\n else if (lineNumber < model.getLineCount()) {\n lineNumber = lineNumber + 1;\n column = 0;\n }\n return new Position(lineNumber, column);\n };\n TransposeLettersAction.prototype.run = function (accessor, editor) {\n var model = editor.getModel();\n var commands = [];\n var selections = editor.getSelections();\n for (var _i = 0, selections_1 = selections; _i < selections_1.length; _i++) {\n var selection = selections_1[_i];\n if (!selection.isEmpty()) {\n continue;\n }\n var lineNumber = selection.startLineNumber;\n var column = selection.startColumn;\n var lastColumn = model.getLineMaxColumn(lineNumber);\n if (lineNumber === 1 && (column === 1 || (column === 2 && lastColumn === 2))) {\n // at beginning of file, nothing to do\n continue;\n }\n // handle special case: when at end of line, transpose left two chars\n // otherwise, transpose left and right chars\n var endPosition = (column === lastColumn) ?\n selection.getPosition() :\n this.positionRightOf(selection.getPosition(), model);\n var middlePosition = this.positionLeftOf(endPosition, model);\n var beginPosition = this.positionLeftOf(middlePosition, model);\n var leftChar = model.getValueInRange(Range.fromPositions(beginPosition, middlePosition));\n var rightChar = model.getValueInRange(Range.fromPositions(middlePosition, endPosition));\n var replaceRange = Range.fromPositions(beginPosition, endPosition);\n commands.push(new ReplaceCommand(replaceRange, rightChar + leftChar));\n }\n if (commands.length > 0) {\n editor.pushUndoStop();\n editor.executeCommands(this.id, commands);\n editor.pushUndoStop();\n }\n };\n return TransposeLettersAction;\n}(EditorAction));\nregisterEditorAction(TransposeLettersAction);\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport './clipboard.css';\nimport * as nls from '../../../nls';\nimport * as browser from '../../../base/browser/browser';\nimport * as platform from '../../../base/common/platform';\nimport { ICodeEditorService } from '../../browser/services/codeEditorService';\nimport { registerEditorAction, EditorAction } from '../../browser/editorExtensions';\nimport { CopyOptions } from '../../browser/controller/textAreaInput';\nimport { EditorContextKeys } from '../../common/editorContextKeys';\nimport { MenuId } from '../../../platform/actions/common/actions';\nvar CLIPBOARD_CONTEXT_MENU_GROUP = '9_cutcopypaste';\nvar supportsCut = (platform.isNative || document.queryCommandSupported('cut'));\nvar supportsCopy = (platform.isNative || document.queryCommandSupported('copy'));\n// IE and Edge have trouble with setting html content in clipboard\nvar supportsCopyWithSyntaxHighlighting = (supportsCopy && !browser.isEdgeOrIE);\n// Chrome incorrectly returns true for document.queryCommandSupported('paste')\n// when the paste feature is available but the calling script has insufficient\n// privileges to actually perform the action\nvar supportsPaste = (platform.isNative || (!browser.isChrome && document.queryCommandSupported('paste')));\nvar ExecCommandAction = /** @class */ (function (_super) {\n __extends(ExecCommandAction, _super);\n function ExecCommandAction(browserCommand, opts) {\n var _this = _super.call(this, opts) || this;\n _this.browserCommand = browserCommand;\n return _this;\n }\n ExecCommandAction.prototype.runCommand = function (accessor, args) {\n var focusedEditor = accessor.get(ICodeEditorService).getFocusedCodeEditor();\n // Only if editor text focus (i.e. not if editor has widget focus).\n if (focusedEditor && focusedEditor.hasTextFocus()) {\n focusedEditor.trigger('keyboard', this.id, args);\n return;\n }\n document.execCommand(this.browserCommand);\n };\n ExecCommandAction.prototype.run = function (accessor, editor) {\n editor.focus();\n document.execCommand(this.browserCommand);\n };\n return ExecCommandAction;\n}(EditorAction));\nvar ExecCommandCutAction = /** @class */ (function (_super) {\n __extends(ExecCommandCutAction, _super);\n function ExecCommandCutAction() {\n var _this = this;\n var kbOpts = {\n kbExpr: EditorContextKeys.textInputFocus,\n primary: 2048 /* CtrlCmd */ | 54 /* KEY_X */,\n win: { primary: 2048 /* CtrlCmd */ | 54 /* KEY_X */, secondary: [1024 /* Shift */ | 20 /* Delete */] },\n weight: 100 /* EditorContrib */\n };\n // Do not bind cut keybindings in the browser,\n // since browsers do that for us and it avoids security prompts\n if (!platform.isNative) {\n kbOpts = null;\n }\n _this = _super.call(this, 'cut', {\n id: 'editor.action.clipboardCutAction',\n label: nls.localize('actions.clipboard.cutLabel', \"Cut\"),\n alias: 'Cut',\n precondition: EditorContextKeys.writable,\n kbOpts: kbOpts,\n menuOpts: {\n group: CLIPBOARD_CONTEXT_MENU_GROUP,\n order: 1\n },\n menubarOpts: {\n menuId: MenuId.MenubarEditMenu,\n group: '2_ccp',\n title: nls.localize({ key: 'miCut', comment: ['&& denotes a mnemonic'] }, \"Cu&&t\"),\n order: 1\n }\n }) || this;\n return _this;\n }\n ExecCommandCutAction.prototype.run = function (accessor, editor) {\n var emptySelectionClipboard = editor.getConfiguration().emptySelectionClipboard;\n if (!emptySelectionClipboard && editor.getSelection().isEmpty()) {\n return;\n }\n _super.prototype.run.call(this, accessor, editor);\n };\n return ExecCommandCutAction;\n}(ExecCommandAction));\nvar ExecCommandCopyAction = /** @class */ (function (_super) {\n __extends(ExecCommandCopyAction, _super);\n function ExecCommandCopyAction() {\n var _this = this;\n var kbOpts = {\n kbExpr: EditorContextKeys.textInputFocus,\n primary: 2048 /* CtrlCmd */ | 33 /* KEY_C */,\n win: { primary: 2048 /* CtrlCmd */ | 33 /* KEY_C */, secondary: [2048 /* CtrlCmd */ | 19 /* Insert */] },\n weight: 100 /* EditorContrib */\n };\n // Do not bind copy keybindings in the browser,\n // since browsers do that for us and it avoids security prompts\n if (!platform.isNative) {\n kbOpts = null;\n }\n _this = _super.call(this, 'copy', {\n id: 'editor.action.clipboardCopyAction',\n label: nls.localize('actions.clipboard.copyLabel', \"Copy\"),\n alias: 'Copy',\n precondition: null,\n kbOpts: kbOpts,\n menuOpts: {\n group: CLIPBOARD_CONTEXT_MENU_GROUP,\n order: 2\n },\n menubarOpts: {\n menuId: MenuId.MenubarEditMenu,\n group: '2_ccp',\n title: nls.localize({ key: 'miCopy', comment: ['&& denotes a mnemonic'] }, \"&&Copy\"),\n order: 2\n }\n }) || this;\n return _this;\n }\n ExecCommandCopyAction.prototype.run = function (accessor, editor) {\n var emptySelectionClipboard = editor.getConfiguration().emptySelectionClipboard;\n if (!emptySelectionClipboard && editor.getSelection().isEmpty()) {\n return;\n }\n _super.prototype.run.call(this, accessor, editor);\n };\n return ExecCommandCopyAction;\n}(ExecCommandAction));\nvar ExecCommandPasteAction = /** @class */ (function (_super) {\n __extends(ExecCommandPasteAction, _super);\n function ExecCommandPasteAction() {\n var _this = this;\n var kbOpts = {\n kbExpr: EditorContextKeys.textInputFocus,\n primary: 2048 /* CtrlCmd */ | 52 /* KEY_V */,\n win: { primary: 2048 /* CtrlCmd */ | 52 /* KEY_V */, secondary: [1024 /* Shift */ | 19 /* Insert */] },\n weight: 100 /* EditorContrib */\n };\n // Do not bind paste keybindings in the browser,\n // since browsers do that for us and it avoids security prompts\n if (!platform.isNative) {\n kbOpts = null;\n }\n _this = _super.call(this, 'paste', {\n id: 'editor.action.clipboardPasteAction',\n label: nls.localize('actions.clipboard.pasteLabel', \"Paste\"),\n alias: 'Paste',\n precondition: EditorContextKeys.writable,\n kbOpts: kbOpts,\n menuOpts: {\n group: CLIPBOARD_CONTEXT_MENU_GROUP,\n order: 3\n },\n menubarOpts: {\n menuId: MenuId.MenubarEditMenu,\n group: '2_ccp',\n title: nls.localize({ key: 'miPaste', comment: ['&& denotes a mnemonic'] }, \"&&Paste\"),\n order: 3\n }\n }) || this;\n return _this;\n }\n return ExecCommandPasteAction;\n}(ExecCommandAction));\nvar ExecCommandCopyWithSyntaxHighlightingAction = /** @class */ (function (_super) {\n __extends(ExecCommandCopyWithSyntaxHighlightingAction, _super);\n function ExecCommandCopyWithSyntaxHighlightingAction() {\n return _super.call(this, 'copy', {\n id: 'editor.action.clipboardCopyWithSyntaxHighlightingAction',\n label: nls.localize('actions.clipboard.copyWithSyntaxHighlightingLabel', \"Copy With Syntax Highlighting\"),\n alias: 'Copy With Syntax Highlighting',\n precondition: null,\n kbOpts: {\n kbExpr: EditorContextKeys.textInputFocus,\n primary: null,\n weight: 100 /* EditorContrib */\n }\n }) || this;\n }\n ExecCommandCopyWithSyntaxHighlightingAction.prototype.run = function (accessor, editor) {\n var emptySelectionClipboard = editor.getConfiguration().emptySelectionClipboard;\n if (!emptySelectionClipboard && editor.getSelection().isEmpty()) {\n return;\n }\n CopyOptions.forceCopyWithSyntaxHighlighting = true;\n _super.prototype.run.call(this, accessor, editor);\n CopyOptions.forceCopyWithSyntaxHighlighting = false;\n };\n return ExecCommandCopyWithSyntaxHighlightingAction;\n}(ExecCommandAction));\nif (supportsCut) {\n registerEditorAction(ExecCommandCutAction);\n}\nif (supportsCopy) {\n registerEditorAction(ExecCommandCopyAction);\n}\nif (supportsPaste) {\n registerEditorAction(ExecCommandPasteAction);\n}\nif (supportsCopyWithSyntaxHighlighting) {\n registerEditorAction(ExecCommandCopyWithSyntaxHighlightingAction);\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport './codelensWidget.css';\nimport { dispose } from '../../../base/common/lifecycle';\nimport { format, escape } from '../../../base/common/strings';\nimport * as dom from '../../../base/browser/dom';\nimport { Range } from '../../common/core/range';\nimport * as editorBrowser from '../../browser/editorBrowser';\nimport { ModelDecorationOptions } from '../../common/model/textModel';\nimport { editorCodeLensForeground } from '../../common/view/editorColorRegistry';\nimport { registerThemingParticipant } from '../../../platform/theme/common/themeService';\nimport { editorActiveLinkForeground } from '../../../platform/theme/common/colorRegistry';\nvar CodeLensViewZone = /** @class */ (function () {\n function CodeLensViewZone(afterLineNumber, onHeight) {\n this.afterLineNumber = afterLineNumber;\n this._onHeight = onHeight;\n this.heightInLines = 1;\n this.suppressMouseDown = true;\n this.domNode = document.createElement('div');\n }\n CodeLensViewZone.prototype.onComputedHeight = function (height) {\n if (this._lastHeight === undefined) {\n this._lastHeight = height;\n }\n else if (this._lastHeight !== height) {\n this._lastHeight = height;\n this._onHeight();\n }\n };\n return CodeLensViewZone;\n}());\nvar CodeLensContentWidget = /** @class */ (function () {\n function CodeLensContentWidget(editor, symbolRange, commandService, notificationService) {\n var _this = this;\n // Editor.IContentWidget.allowEditorOverflow\n this.allowEditorOverflow = false;\n this.suppressMouseDown = true;\n this._disposables = [];\n this._commands = Object.create(null);\n this._id = 'codeLensWidget' + (++CodeLensContentWidget._idPool);\n this._editor = editor;\n this.setSymbolRange(symbolRange);\n this._domNode = document.createElement('span');\n this._domNode.innerHTML = ' ';\n dom.addClass(this._domNode, 'codelens-decoration');\n dom.addClass(this._domNode, 'invisible-cl');\n this._updateHeight();\n this._disposables.push(this._editor.onDidChangeConfiguration(function (e) { return e.fontInfo && _this._updateHeight(); }));\n this._disposables.push(dom.addDisposableListener(this._domNode, 'click', function (e) {\n var element = e.target;\n if (element.tagName === 'A' && element.id) {\n var command = _this._commands[element.id];\n if (command) {\n editor.focus();\n commandService.executeCommand.apply(commandService, [command.id].concat(command.arguments)).done(undefined, function (err) {\n notificationService.error(err);\n });\n }\n }\n }));\n this.updateVisibility();\n }\n CodeLensContentWidget.prototype.dispose = function () {\n dispose(this._disposables);\n };\n CodeLensContentWidget.prototype._updateHeight = function () {\n var _a = this._editor.getConfiguration(), fontInfo = _a.fontInfo, lineHeight = _a.lineHeight;\n this._domNode.style.height = Math.round(lineHeight * 1.1) + \"px\";\n this._domNode.style.lineHeight = lineHeight + \"px\";\n this._domNode.style.fontSize = Math.round(fontInfo.fontSize * .9) + \"px\";\n this._domNode.innerHTML = ' ';\n };\n CodeLensContentWidget.prototype.updateVisibility = function () {\n if (this.isVisible()) {\n dom.removeClass(this._domNode, 'invisible-cl');\n dom.addClass(this._domNode, 'fadein');\n }\n };\n CodeLensContentWidget.prototype.withCommands = function (symbols) {\n this._commands = Object.create(null);\n if (!symbols || !symbols.length) {\n this._domNode.innerHTML = 'no commands';\n return;\n }\n var html = [];\n for (var i = 0; i < symbols.length; i++) {\n var command = symbols[i].command;\n var title = escape(command.title);\n var part = void 0;\n if (command.id) {\n part = format('{1}', i, title);\n this._commands[i] = command;\n }\n else {\n part = format('{0}', title);\n }\n html.push(part);\n }\n this._domNode.innerHTML = html.join(' | ');\n this._editor.layoutContentWidget(this);\n };\n CodeLensContentWidget.prototype.getId = function () {\n return this._id;\n };\n CodeLensContentWidget.prototype.getDomNode = function () {\n return this._domNode;\n };\n CodeLensContentWidget.prototype.setSymbolRange = function (range) {\n var lineNumber = range.startLineNumber;\n var column = this._editor.getModel().getLineFirstNonWhitespaceColumn(lineNumber);\n this._widgetPosition = {\n position: { lineNumber: lineNumber, column: column },\n preference: [editorBrowser.ContentWidgetPositionPreference.ABOVE]\n };\n };\n CodeLensContentWidget.prototype.getPosition = function () {\n return this._widgetPosition;\n };\n CodeLensContentWidget.prototype.isVisible = function () {\n return this._domNode.hasAttribute('monaco-visible-content-widget');\n };\n CodeLensContentWidget._idPool = 0;\n return CodeLensContentWidget;\n}());\nvar CodeLensHelper = /** @class */ (function () {\n function CodeLensHelper() {\n this._removeDecorations = [];\n this._addDecorations = [];\n this._addDecorationsCallbacks = [];\n }\n CodeLensHelper.prototype.addDecoration = function (decoration, callback) {\n this._addDecorations.push(decoration);\n this._addDecorationsCallbacks.push(callback);\n };\n CodeLensHelper.prototype.removeDecoration = function (decorationId) {\n this._removeDecorations.push(decorationId);\n };\n CodeLensHelper.prototype.commit = function (changeAccessor) {\n var resultingDecorations = changeAccessor.deltaDecorations(this._removeDecorations, this._addDecorations);\n for (var i = 0, len = resultingDecorations.length; i < len; i++) {\n this._addDecorationsCallbacks[i](resultingDecorations[i]);\n }\n };\n return CodeLensHelper;\n}());\nexport { CodeLensHelper };\nvar CodeLens = /** @class */ (function () {\n function CodeLens(data, editor, helper, viewZoneChangeAccessor, commandService, notificationService, updateCallabck) {\n var _this = this;\n this._editor = editor;\n this._data = data;\n this._decorationIds = new Array(this._data.length);\n var range;\n this._data.forEach(function (codeLensData, i) {\n helper.addDecoration({\n range: codeLensData.symbol.range,\n options: ModelDecorationOptions.EMPTY\n }, function (id) { return _this._decorationIds[i] = id; });\n // the range contains all lenses on this line\n if (!range) {\n range = Range.lift(codeLensData.symbol.range);\n }\n else {\n range = Range.plusRange(range, codeLensData.symbol.range);\n }\n });\n this._contentWidget = new CodeLensContentWidget(editor, range, commandService, notificationService);\n this._viewZone = new CodeLensViewZone(range.startLineNumber - 1, updateCallabck);\n this._viewZoneId = viewZoneChangeAccessor.addZone(this._viewZone);\n this._editor.addContentWidget(this._contentWidget);\n }\n CodeLens.prototype.dispose = function (helper, viewZoneChangeAccessor) {\n while (this._decorationIds.length) {\n helper.removeDecoration(this._decorationIds.pop());\n }\n if (viewZoneChangeAccessor) {\n viewZoneChangeAccessor.removeZone(this._viewZoneId);\n }\n this._editor.removeContentWidget(this._contentWidget);\n this._contentWidget.dispose();\n };\n CodeLens.prototype.isValid = function () {\n var _this = this;\n return this._decorationIds.some(function (id, i) {\n var range = _this._editor.getModel().getDecorationRange(id);\n var symbol = _this._data[i].symbol;\n return range && Range.isEmpty(symbol.range) === range.isEmpty();\n });\n };\n CodeLens.prototype.updateCodeLensSymbols = function (data, helper) {\n var _this = this;\n while (this._decorationIds.length) {\n helper.removeDecoration(this._decorationIds.pop());\n }\n this._data = data;\n this._decorationIds = new Array(this._data.length);\n this._data.forEach(function (codeLensData, i) {\n helper.addDecoration({\n range: codeLensData.symbol.range,\n options: ModelDecorationOptions.EMPTY\n }, function (id) { return _this._decorationIds[i] = id; });\n });\n };\n CodeLens.prototype.computeIfNecessary = function (model) {\n this._contentWidget.updateVisibility(); // trigger the fade in\n if (!this._contentWidget.isVisible()) {\n return null;\n }\n // Read editor current state\n for (var i = 0; i < this._decorationIds.length; i++) {\n this._data[i].symbol.range = model.getDecorationRange(this._decorationIds[i]);\n }\n return this._data;\n };\n CodeLens.prototype.updateCommands = function (symbols) {\n this._contentWidget.withCommands(symbols);\n };\n CodeLens.prototype.getLineNumber = function () {\n var range = this._editor.getModel().getDecorationRange(this._decorationIds[0]);\n if (range) {\n return range.startLineNumber;\n }\n return -1;\n };\n CodeLens.prototype.update = function (viewZoneChangeAccessor) {\n if (this.isValid()) {\n var range = this._editor.getModel().getDecorationRange(this._decorationIds[0]);\n this._viewZone.afterLineNumber = range.startLineNumber - 1;\n viewZoneChangeAccessor.layoutZone(this._viewZoneId);\n this._contentWidget.setSymbolRange(range);\n this._editor.layoutContentWidget(this._contentWidget);\n }\n };\n return CodeLens;\n}());\nexport { CodeLens };\nregisterThemingParticipant(function (theme, collector) {\n var codeLensForeground = theme.getColor(editorCodeLensForeground);\n if (codeLensForeground) {\n collector.addRule(\".monaco-editor .codelens-decoration { color: \" + codeLensForeground + \"; }\");\n }\n var activeLinkForeground = theme.getColor(editorActiveLinkForeground);\n if (activeLinkForeground) {\n collector.addRule(\".monaco-editor .codelens-decoration > a:hover { color: \" + activeLinkForeground + \" !important; }\");\n }\n});\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport { illegalArgument, onUnexpectedExternalError } from '../../../base/common/errors';\nimport { mergeSort } from '../../../base/common/arrays';\nimport URI from '../../../base/common/uri';\nimport { registerLanguageCommand } from '../../browser/editorExtensions';\nimport { CodeLensProviderRegistry } from '../../common/modes';\nimport { IModelService } from '../../common/services/modelService';\nimport { CancellationToken } from '../../../base/common/cancellation';\nexport function getCodeLensData(model, token) {\n var symbols = [];\n var provider = CodeLensProviderRegistry.ordered(model);\n var promises = provider.map(function (provider) { return Promise.resolve(provider.provideCodeLenses(model, token)).then(function (result) {\n if (Array.isArray(result)) {\n for (var _i = 0, result_1 = result; _i < result_1.length; _i++) {\n var symbol = result_1[_i];\n symbols.push({ symbol: symbol, provider: provider });\n }\n }\n }).catch(onUnexpectedExternalError); });\n return Promise.all(promises).then(function () {\n return mergeSort(symbols, function (a, b) {\n // sort by lineNumber, provider-rank, and column\n if (a.symbol.range.startLineNumber < b.symbol.range.startLineNumber) {\n return -1;\n }\n else if (a.symbol.range.startLineNumber > b.symbol.range.startLineNumber) {\n return 1;\n }\n else if (provider.indexOf(a.provider) < provider.indexOf(b.provider)) {\n return -1;\n }\n else if (provider.indexOf(a.provider) > provider.indexOf(b.provider)) {\n return 1;\n }\n else if (a.symbol.range.startColumn < b.symbol.range.startColumn) {\n return -1;\n }\n else if (a.symbol.range.startColumn > b.symbol.range.startColumn) {\n return 1;\n }\n else {\n return 0;\n }\n });\n });\n}\nregisterLanguageCommand('_executeCodeLensProvider', function (accessor, args) {\n var resource = args.resource, itemResolveCount = args.itemResolveCount;\n if (!(resource instanceof URI)) {\n throw illegalArgument();\n }\n var model = accessor.get(IModelService).getModel(resource);\n if (!model) {\n throw illegalArgument();\n }\n var result = [];\n return getCodeLensData(model, CancellationToken.None).then(function (value) {\n var resolve = [];\n for (var _i = 0, value_1 = value; _i < value_1.length; _i++) {\n var item = value_1[_i];\n if (typeof itemResolveCount === 'undefined' || Boolean(item.symbol.command)) {\n result.push(item.symbol);\n }\n else if (itemResolveCount-- > 0) {\n resolve.push(Promise.resolve(item.provider.resolveCodeLens(model, item.symbol, CancellationToken.None)).then(function (symbol) { return result.push(symbol); }));\n }\n }\n return Promise.all(resolve);\n }).then(function () {\n return result;\n });\n});\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __param = (this && this.__param) || function (paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n};\nimport { createCancelablePromise, RunOnceScheduler } from '../../../base/common/async';\nimport { onUnexpectedError } from '../../../base/common/errors';\nimport { dispose, toDisposable } from '../../../base/common/lifecycle';\nimport { StableEditorScrollState } from '../../browser/core/editorState';\nimport { registerEditorContribution } from '../../browser/editorExtensions';\nimport { CodeLensProviderRegistry } from '../../common/modes';\nimport { CodeLens, CodeLensHelper } from './codelensWidget';\nimport { ICommandService } from '../../../platform/commands/common/commands';\nimport { INotificationService } from '../../../platform/notification/common/notification';\nimport { getCodeLensData } from './codelens';\nvar CodeLensContribution = /** @class */ (function () {\n function CodeLensContribution(_editor, _commandService, _notificationService) {\n var _this = this;\n this._editor = _editor;\n this._commandService = _commandService;\n this._notificationService = _notificationService;\n this._isEnabled = this._editor.getConfiguration().contribInfo.codeLens;\n this._globalToDispose = [];\n this._localToDispose = [];\n this._lenses = [];\n this._currentFindCodeLensSymbolsPromise = null;\n this._modelChangeCounter = 0;\n this._globalToDispose.push(this._editor.onDidChangeModel(function () { return _this._onModelChange(); }));\n this._globalToDispose.push(this._editor.onDidChangeModelLanguage(function () { return _this._onModelChange(); }));\n this._globalToDispose.push(this._editor.onDidChangeConfiguration(function (e) {\n var prevIsEnabled = _this._isEnabled;\n _this._isEnabled = _this._editor.getConfiguration().contribInfo.codeLens;\n if (prevIsEnabled !== _this._isEnabled) {\n _this._onModelChange();\n }\n }));\n this._globalToDispose.push(CodeLensProviderRegistry.onDidChange(this._onModelChange, this));\n this._onModelChange();\n }\n CodeLensContribution.prototype.dispose = function () {\n this._localDispose();\n this._globalToDispose = dispose(this._globalToDispose);\n };\n CodeLensContribution.prototype._localDispose = function () {\n if (this._currentFindCodeLensSymbolsPromise) {\n this._currentFindCodeLensSymbolsPromise.cancel();\n this._currentFindCodeLensSymbolsPromise = null;\n this._modelChangeCounter++;\n }\n if (this._currentResolveCodeLensSymbolsPromise) {\n this._currentResolveCodeLensSymbolsPromise.cancel();\n this._currentResolveCodeLensSymbolsPromise = null;\n }\n this._localToDispose = dispose(this._localToDispose);\n };\n CodeLensContribution.prototype.getId = function () {\n return CodeLensContribution.ID;\n };\n CodeLensContribution.prototype._onModelChange = function () {\n var _this = this;\n this._localDispose();\n var model = this._editor.getModel();\n if (!model) {\n return;\n }\n if (!this._isEnabled) {\n return;\n }\n if (!CodeLensProviderRegistry.has(model)) {\n return;\n }\n for (var _i = 0, _a = CodeLensProviderRegistry.all(model); _i < _a.length; _i++) {\n var provider = _a[_i];\n if (typeof provider.onDidChange === 'function') {\n var registration = provider.onDidChange(function () { return scheduler.schedule(); });\n this._localToDispose.push(registration);\n }\n }\n this._detectVisibleLenses = new RunOnceScheduler(function () {\n _this._onViewportChanged();\n }, 500);\n var scheduler = new RunOnceScheduler(function () {\n var counterValue = ++_this._modelChangeCounter;\n if (_this._currentFindCodeLensSymbolsPromise) {\n _this._currentFindCodeLensSymbolsPromise.cancel();\n }\n _this._currentFindCodeLensSymbolsPromise = createCancelablePromise(function (token) { return getCodeLensData(model, token); });\n _this._currentFindCodeLensSymbolsPromise.then(function (result) {\n if (counterValue === _this._modelChangeCounter) { // only the last one wins\n _this._renderCodeLensSymbols(result);\n _this._detectVisibleLenses.schedule();\n }\n }, onUnexpectedError);\n }, 250);\n this._localToDispose.push(scheduler);\n this._localToDispose.push(this._detectVisibleLenses);\n this._localToDispose.push(this._editor.onDidChangeModelContent(function (e) {\n _this._editor.changeDecorations(function (changeAccessor) {\n _this._editor.changeViewZones(function (viewAccessor) {\n var toDispose = [];\n var lastLensLineNumber = -1;\n _this._lenses.forEach(function (lens) {\n if (!lens.isValid() || lastLensLineNumber === lens.getLineNumber()) {\n // invalid -> lens collapsed, attach range doesn't exist anymore\n // line_number -> lenses should never be on the same line\n toDispose.push(lens);\n }\n else {\n lens.update(viewAccessor);\n lastLensLineNumber = lens.getLineNumber();\n }\n });\n var helper = new CodeLensHelper();\n toDispose.forEach(function (l) {\n l.dispose(helper, viewAccessor);\n _this._lenses.splice(_this._lenses.indexOf(l), 1);\n });\n helper.commit(changeAccessor);\n });\n });\n // Compute new `visible` code lenses\n _this._detectVisibleLenses.schedule();\n // Ask for all references again\n scheduler.schedule();\n }));\n this._localToDispose.push(this._editor.onDidScrollChange(function (e) {\n if (e.scrollTopChanged && _this._lenses.length > 0) {\n _this._detectVisibleLenses.schedule();\n }\n }));\n this._localToDispose.push(this._editor.onDidLayoutChange(function (e) {\n _this._detectVisibleLenses.schedule();\n }));\n this._localToDispose.push(toDisposable(function () {\n if (_this._editor.getModel()) {\n var scrollState = StableEditorScrollState.capture(_this._editor);\n _this._editor.changeDecorations(function (changeAccessor) {\n _this._editor.changeViewZones(function (accessor) {\n _this._disposeAllLenses(changeAccessor, accessor);\n });\n });\n scrollState.restore(_this._editor);\n }\n else {\n // No accessors available\n _this._disposeAllLenses(null, null);\n }\n }));\n scheduler.schedule();\n };\n CodeLensContribution.prototype._disposeAllLenses = function (decChangeAccessor, viewZoneChangeAccessor) {\n var helper = new CodeLensHelper();\n this._lenses.forEach(function (lens) { return lens.dispose(helper, viewZoneChangeAccessor); });\n if (decChangeAccessor) {\n helper.commit(decChangeAccessor);\n }\n this._lenses = [];\n };\n CodeLensContribution.prototype._renderCodeLensSymbols = function (symbols) {\n var _this = this;\n if (!this._editor.getModel()) {\n return;\n }\n var maxLineNumber = this._editor.getModel().getLineCount();\n var groups = [];\n var lastGroup;\n for (var _i = 0, symbols_1 = symbols; _i < symbols_1.length; _i++) {\n var symbol = symbols_1[_i];\n var line = symbol.symbol.range.startLineNumber;\n if (line < 1 || line > maxLineNumber) {\n // invalid code lens\n continue;\n }\n else if (lastGroup && lastGroup[lastGroup.length - 1].symbol.range.startLineNumber === line) {\n // on same line as previous\n lastGroup.push(symbol);\n }\n else {\n // on later line as previous\n lastGroup = [symbol];\n groups.push(lastGroup);\n }\n }\n var scrollState = StableEditorScrollState.capture(this._editor);\n this._editor.changeDecorations(function (changeAccessor) {\n _this._editor.changeViewZones(function (accessor) {\n var codeLensIndex = 0, groupsIndex = 0, helper = new CodeLensHelper();\n while (groupsIndex < groups.length && codeLensIndex < _this._lenses.length) {\n var symbolsLineNumber = groups[groupsIndex][0].symbol.range.startLineNumber;\n var codeLensLineNumber = _this._lenses[codeLensIndex].getLineNumber();\n if (codeLensLineNumber < symbolsLineNumber) {\n _this._lenses[codeLensIndex].dispose(helper, accessor);\n _this._lenses.splice(codeLensIndex, 1);\n }\n else if (codeLensLineNumber === symbolsLineNumber) {\n _this._lenses[codeLensIndex].updateCodeLensSymbols(groups[groupsIndex], helper);\n groupsIndex++;\n codeLensIndex++;\n }\n else {\n _this._lenses.splice(codeLensIndex, 0, new CodeLens(groups[groupsIndex], _this._editor, helper, accessor, _this._commandService, _this._notificationService, function () { return _this._detectVisibleLenses.schedule(); }));\n codeLensIndex++;\n groupsIndex++;\n }\n }\n // Delete extra code lenses\n while (codeLensIndex < _this._lenses.length) {\n _this._lenses[codeLensIndex].dispose(helper, accessor);\n _this._lenses.splice(codeLensIndex, 1);\n }\n // Create extra symbols\n while (groupsIndex < groups.length) {\n _this._lenses.push(new CodeLens(groups[groupsIndex], _this._editor, helper, accessor, _this._commandService, _this._notificationService, function () { return _this._detectVisibleLenses.schedule(); }));\n groupsIndex++;\n }\n helper.commit(changeAccessor);\n });\n });\n scrollState.restore(this._editor);\n };\n CodeLensContribution.prototype._onViewportChanged = function () {\n var _this = this;\n if (this._currentResolveCodeLensSymbolsPromise) {\n this._currentResolveCodeLensSymbolsPromise.cancel();\n this._currentResolveCodeLensSymbolsPromise = null;\n }\n var model = this._editor.getModel();\n if (!model) {\n return;\n }\n var toResolve = [];\n var lenses = [];\n this._lenses.forEach(function (lens) {\n var request = lens.computeIfNecessary(model);\n if (request) {\n toResolve.push(request);\n lenses.push(lens);\n }\n });\n if (toResolve.length === 0) {\n return;\n }\n this._currentResolveCodeLensSymbolsPromise = createCancelablePromise(function (token) {\n var promises = toResolve.map(function (request, i) {\n var resolvedSymbols = new Array(request.length);\n var promises = request.map(function (request, i) {\n if (typeof request.provider.resolveCodeLens === 'function') {\n return Promise.resolve(request.provider.resolveCodeLens(model, request.symbol, token)).then(function (symbol) {\n resolvedSymbols[i] = symbol;\n });\n }\n resolvedSymbols[i] = request.symbol;\n return Promise.resolve(void 0);\n });\n return Promise.all(promises).then(function () {\n lenses[i].updateCommands(resolvedSymbols);\n });\n });\n return Promise.all(promises);\n });\n this._currentResolveCodeLensSymbolsPromise.then(function () {\n _this._currentResolveCodeLensSymbolsPromise = null;\n }).catch(function (err) {\n _this._currentResolveCodeLensSymbolsPromise = null;\n onUnexpectedError(err);\n });\n };\n CodeLensContribution.ID = 'css.editor.codeLens';\n CodeLensContribution = __decorate([\n __param(1, ICommandService),\n __param(2, INotificationService)\n ], CodeLensContribution);\n return CodeLensContribution;\n}());\nexport { CodeLensContribution };\nregisterEditorContribution(CodeLensContribution);\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\n/**\n * Return a hash value for an object.\n */\nexport function hash(obj, hashVal) {\n if (hashVal === void 0) { hashVal = 0; }\n switch (typeof obj) {\n case 'object':\n if (obj === null) {\n return numberHash(349, hashVal);\n }\n else if (Array.isArray(obj)) {\n return arrayHash(obj, hashVal);\n }\n return objectHash(obj, hashVal);\n case 'string':\n return stringHash(obj, hashVal);\n case 'boolean':\n return booleanHash(obj, hashVal);\n case 'number':\n return numberHash(obj, hashVal);\n case 'undefined':\n return numberHash(obj, 937);\n default:\n return numberHash(obj, 617);\n }\n}\nfunction numberHash(val, initialHashVal) {\n return (((initialHashVal << 5) - initialHashVal) + val) | 0; // hashVal * 31 + ch, keep as int32\n}\nfunction booleanHash(b, initialHashVal) {\n return numberHash(b ? 433 : 863, initialHashVal);\n}\nfunction stringHash(s, hashVal) {\n hashVal = numberHash(149417, hashVal);\n for (var i = 0, length_1 = s.length; i < length_1; i++) {\n hashVal = numberHash(s.charCodeAt(i), hashVal);\n }\n return hashVal;\n}\nfunction arrayHash(arr, initialHashVal) {\n initialHashVal = numberHash(104579, initialHashVal);\n return arr.reduce(function (hashVal, item) { return hash(item, hashVal); }, initialHashVal);\n}\nfunction objectHash(obj, initialHashVal) {\n initialHashVal = numberHash(181387, initialHashVal);\n return Object.keys(obj).sort().reduce(function (hashVal, key) {\n hashVal = stringHash(key, hashVal);\n return hash(obj[key], hashVal);\n }, initialHashVal);\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport URI from '../../../base/common/uri';\nimport { TPromise } from '../../../base/common/winjs.base';\nimport { ColorProviderRegistry } from '../../common/modes';\nimport { asWinJsPromise } from '../../../base/common/async';\nimport { registerLanguageCommand } from '../../browser/editorExtensions';\nimport { Range } from '../../common/core/range';\nimport { illegalArgument } from '../../../base/common/errors';\nimport { IModelService } from '../../common/services/modelService';\nexport function getColors(model, token) {\n var colors = [];\n var providers = ColorProviderRegistry.ordered(model).reverse();\n var promises = providers.map(function (provider) { return Promise.resolve(provider.provideDocumentColors(model, token)).then(function (result) {\n if (Array.isArray(result)) {\n for (var _i = 0, result_1 = result; _i < result_1.length; _i++) {\n var colorInfo = result_1[_i];\n colors.push({ colorInfo: colorInfo, provider: provider });\n }\n }\n }); });\n return Promise.all(promises).then(function () { return colors; });\n}\nexport function getColorPresentations(model, colorInfo, provider, token) {\n return Promise.resolve(provider.provideColorPresentations(model, colorInfo, token));\n}\nregisterLanguageCommand('_executeDocumentColorProvider', function (accessor, args) {\n var resource = args.resource;\n if (!(resource instanceof URI)) {\n throw illegalArgument();\n }\n var model = accessor.get(IModelService).getModel(resource);\n if (!model) {\n throw illegalArgument();\n }\n var rawCIs = [];\n var providers = ColorProviderRegistry.ordered(model).reverse();\n var promises = providers.map(function (provider) { return asWinJsPromise(function (token) { return provider.provideDocumentColors(model, token); }).then(function (result) {\n if (Array.isArray(result)) {\n for (var _i = 0, result_2 = result; _i < result_2.length; _i++) {\n var ci = result_2[_i];\n rawCIs.push({ range: ci.range, color: [ci.color.red, ci.color.green, ci.color.blue, ci.color.alpha] });\n }\n }\n }); });\n return TPromise.join(promises).then(function () { return rawCIs; });\n});\nregisterLanguageCommand('_executeColorPresentationProvider', function (accessor, args) {\n var resource = args.resource, color = args.color, range = args.range;\n if (!(resource instanceof URI) || !Array.isArray(color) || color.length !== 4 || !Range.isIRange(range)) {\n throw illegalArgument();\n }\n var red = color[0], green = color[1], blue = color[2], alpha = color[3];\n var model = accessor.get(IModelService).getModel(resource);\n if (!model) {\n throw illegalArgument();\n }\n var colorInfo = {\n range: range,\n color: { red: red, green: green, blue: blue, alpha: alpha }\n };\n var presentations = [];\n var providers = ColorProviderRegistry.ordered(model).reverse();\n var promises = providers.map(function (provider) { return asWinJsPromise(function (token) { return provider.provideColorPresentations(model, colorInfo, token); }).then(function (result) {\n if (Array.isArray(result)) {\n presentations.push.apply(presentations, result);\n }\n }); });\n return TPromise.join(promises).then(function () { return presentations; });\n});\n","import { Registry } from '../../registry/common/platform';\nimport { createDecorator } from '../../instantiation/common/instantiation';\nimport { Extensions } from './configurationRegistry';\nexport var IConfigurationService = createDecorator('configurationService');\nexport var ConfigurationTarget;\n(function (ConfigurationTarget) {\n ConfigurationTarget[ConfigurationTarget[\"USER\"] = 1] = \"USER\";\n ConfigurationTarget[ConfigurationTarget[\"WORKSPACE\"] = 2] = \"WORKSPACE\";\n ConfigurationTarget[ConfigurationTarget[\"WORKSPACE_FOLDER\"] = 3] = \"WORKSPACE_FOLDER\";\n ConfigurationTarget[ConfigurationTarget[\"DEFAULT\"] = 4] = \"DEFAULT\";\n ConfigurationTarget[ConfigurationTarget[\"MEMORY\"] = 5] = \"MEMORY\";\n})(ConfigurationTarget || (ConfigurationTarget = {}));\nexport function toValuesTree(properties, conflictReporter) {\n var root = Object.create(null);\n for (var key in properties) {\n addToValueTree(root, key, properties[key], conflictReporter);\n }\n return root;\n}\nexport function addToValueTree(settingsTreeRoot, key, value, conflictReporter) {\n var segments = key.split('.');\n var last = segments.pop();\n var curr = settingsTreeRoot;\n for (var i = 0; i < segments.length; i++) {\n var s = segments[i];\n var obj = curr[s];\n switch (typeof obj) {\n case 'undefined':\n obj = curr[s] = Object.create(null);\n break;\n case 'object':\n break;\n default:\n conflictReporter(\"Ignoring \" + key + \" as \" + segments.slice(0, i + 1).join('.') + \" is \" + JSON.stringify(obj));\n return;\n }\n curr = obj;\n }\n if (typeof curr === 'object') {\n curr[last] = value; // workaround https://github.com/Microsoft/vscode/issues/13606\n }\n else {\n conflictReporter(\"Ignoring \" + key + \" as \" + segments.join('.') + \" is \" + JSON.stringify(curr));\n }\n}\nexport function removeFromValueTree(valueTree, key) {\n var segments = key.split('.');\n doRemoveFromValueTree(valueTree, segments);\n}\nfunction doRemoveFromValueTree(valueTree, segments) {\n var first = segments.shift();\n if (segments.length === 0) {\n // Reached last segment\n delete valueTree[first];\n return;\n }\n if (Object.keys(valueTree).indexOf(first) !== -1) {\n var value = valueTree[first];\n if (typeof value === 'object' && !Array.isArray(value)) {\n doRemoveFromValueTree(value, segments);\n if (Object.keys(value).length === 0) {\n delete valueTree[first];\n }\n }\n }\n}\n/**\n * A helper function to get the configuration value with a specific settings path (e.g. config.some.setting)\n */\nexport function getConfigurationValue(config, settingPath, defaultValue) {\n function accessSetting(config, path) {\n var current = config;\n for (var i = 0; i < path.length; i++) {\n if (typeof current !== 'object' || current === null) {\n return undefined;\n }\n current = current[path[i]];\n }\n return current;\n }\n var path = settingPath.split('.');\n var result = accessSetting(config, path);\n return typeof result === 'undefined' ? defaultValue : result;\n}\nexport function getConfigurationKeys() {\n var properties = Registry.as(Extensions.Configuration).getConfigurationProperties();\n return Object.keys(properties);\n}\nexport function getDefaultValues() {\n var valueTreeRoot = Object.create(null);\n var properties = Registry.as(Extensions.Configuration).getConfigurationProperties();\n for (var key in properties) {\n var value = properties[key].default;\n addToValueTree(valueTreeRoot, key, value, function (message) { return console.error(\"Conflict in default settings: \" + message); });\n }\n return valueTreeRoot;\n}\nexport function overrideIdentifierFromKey(key) {\n return key.substring(1, key.length - 1);\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __param = (this && this.__param) || function (paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n};\nimport { RGBA } from '../../../base/common/color';\nimport { hash } from '../../../base/common/hash';\nimport { dispose } from '../../../base/common/lifecycle';\nimport { registerEditorContribution } from '../../browser/editorExtensions';\nimport { Range } from '../../common/core/range';\nimport { ColorProviderRegistry } from '../../common/modes';\nimport { ICodeEditorService } from '../../browser/services/codeEditorService';\nimport { getColors } from './color';\nimport { IConfigurationService } from '../../../platform/configuration/common/configuration';\nimport { ModelDecorationOptions } from '../../common/model/textModel';\nimport { TimeoutTimer, createCancelablePromise } from '../../../base/common/async';\nimport { onUnexpectedError } from '../../../base/common/errors';\nvar MAX_DECORATORS = 500;\nvar ColorDetector = /** @class */ (function () {\n function ColorDetector(_editor, _codeEditorService, _configurationService) {\n var _this = this;\n this._editor = _editor;\n this._codeEditorService = _codeEditorService;\n this._configurationService = _configurationService;\n this._globalToDispose = [];\n this._localToDispose = [];\n this._decorationsIds = [];\n this._colorDatas = new Map();\n this._colorDecoratorIds = [];\n this._decorationsTypes = {};\n this._globalToDispose.push(_editor.onDidChangeModel(function (e) {\n _this._isEnabled = _this.isEnabled();\n _this.onModelChanged();\n }));\n this._globalToDispose.push(_editor.onDidChangeModelLanguage(function (e) { return _this.onModelChanged(); }));\n this._globalToDispose.push(ColorProviderRegistry.onDidChange(function (e) { return _this.onModelChanged(); }));\n this._globalToDispose.push(_editor.onDidChangeConfiguration(function (e) {\n var prevIsEnabled = _this._isEnabled;\n _this._isEnabled = _this.isEnabled();\n if (prevIsEnabled !== _this._isEnabled) {\n if (_this._isEnabled) {\n _this.onModelChanged();\n }\n else {\n _this.removeAllDecorations();\n }\n }\n }));\n this._timeoutTimer = null;\n this._computePromise = null;\n this._isEnabled = this.isEnabled();\n this.onModelChanged();\n }\n ColorDetector.prototype.isEnabled = function () {\n var model = this._editor.getModel();\n if (!model) {\n return false;\n }\n var languageId = model.getLanguageIdentifier();\n // handle deprecated settings. [languageId].colorDecorators.enable\n var deprecatedConfig = this._configurationService.getValue(languageId.language);\n if (deprecatedConfig) {\n var colorDecorators = deprecatedConfig['colorDecorators']; // deprecatedConfig.valueOf('.colorDecorators.enable');\n if (colorDecorators && colorDecorators['enable'] !== undefined && !colorDecorators['enable']) {\n return colorDecorators['enable'];\n }\n }\n return this._editor.getConfiguration().contribInfo.colorDecorators;\n };\n ColorDetector.prototype.getId = function () {\n return ColorDetector.ID;\n };\n ColorDetector.get = function (editor) {\n return editor.getContribution(this.ID);\n };\n ColorDetector.prototype.dispose = function () {\n this.stop();\n this.removeAllDecorations();\n this._globalToDispose = dispose(this._globalToDispose);\n };\n ColorDetector.prototype.onModelChanged = function () {\n var _this = this;\n this.stop();\n if (!this._isEnabled) {\n return;\n }\n var model = this._editor.getModel();\n // if (!model) {\n // \treturn;\n // }\n if (!ColorProviderRegistry.has(model)) {\n return;\n }\n this._localToDispose.push(this._editor.onDidChangeModelContent(function (e) {\n if (!_this._timeoutTimer) {\n _this._timeoutTimer = new TimeoutTimer();\n _this._timeoutTimer.cancelAndSet(function () {\n _this._timeoutTimer = null;\n _this.beginCompute();\n }, ColorDetector.RECOMPUTE_TIME);\n }\n }));\n this.beginCompute();\n };\n ColorDetector.prototype.beginCompute = function () {\n var _this = this;\n this._computePromise = createCancelablePromise(function (token) { return getColors(_this._editor.getModel(), token); });\n this._computePromise.then(function (colorInfos) {\n _this.updateDecorations(colorInfos);\n _this.updateColorDecorators(colorInfos);\n _this._computePromise = null;\n }, onUnexpectedError);\n };\n ColorDetector.prototype.stop = function () {\n if (this._timeoutTimer) {\n this._timeoutTimer.cancel();\n this._timeoutTimer = null;\n }\n if (this._computePromise) {\n this._computePromise.cancel();\n this._computePromise = null;\n }\n this._localToDispose = dispose(this._localToDispose);\n };\n ColorDetector.prototype.updateDecorations = function (colorDatas) {\n var _this = this;\n var decorations = colorDatas.map(function (c) { return ({\n range: {\n startLineNumber: c.colorInfo.range.startLineNumber,\n startColumn: c.colorInfo.range.startColumn,\n endLineNumber: c.colorInfo.range.endLineNumber,\n endColumn: c.colorInfo.range.endColumn\n },\n options: ModelDecorationOptions.EMPTY\n }); });\n this._decorationsIds = this._editor.deltaDecorations(this._decorationsIds, decorations);\n this._colorDatas = new Map();\n this._decorationsIds.forEach(function (id, i) { return _this._colorDatas.set(id, colorDatas[i]); });\n };\n ColorDetector.prototype.updateColorDecorators = function (colorData) {\n var decorations = [];\n var newDecorationsTypes = {};\n for (var i = 0; i < colorData.length && decorations.length < MAX_DECORATORS; i++) {\n var _a = colorData[i].colorInfo.color, red = _a.red, green = _a.green, blue = _a.blue, alpha = _a.alpha;\n var rgba = new RGBA(Math.round(red * 255), Math.round(green * 255), Math.round(blue * 255), alpha);\n var subKey = hash(rgba).toString(16);\n var color = \"rgba(\" + rgba.r + \", \" + rgba.g + \", \" + rgba.b + \", \" + rgba.a + \")\";\n var key = 'colorBox-' + subKey;\n if (!this._decorationsTypes[key] && !newDecorationsTypes[key]) {\n this._codeEditorService.registerDecorationType(key, {\n before: {\n contentText: ' ',\n border: 'solid 0.1em #000',\n margin: '0.1em 0.2em 0 0.2em',\n width: '0.8em',\n height: '0.8em',\n backgroundColor: color\n },\n dark: {\n before: {\n border: 'solid 0.1em #eee'\n }\n }\n });\n }\n newDecorationsTypes[key] = true;\n decorations.push({\n range: {\n startLineNumber: colorData[i].colorInfo.range.startLineNumber,\n startColumn: colorData[i].colorInfo.range.startColumn,\n endLineNumber: colorData[i].colorInfo.range.endLineNumber,\n endColumn: colorData[i].colorInfo.range.endColumn\n },\n options: this._codeEditorService.resolveDecorationOptions(key, true)\n });\n }\n for (var subType in this._decorationsTypes) {\n if (!newDecorationsTypes[subType]) {\n this._codeEditorService.removeDecorationType(subType);\n }\n }\n this._colorDecoratorIds = this._editor.deltaDecorations(this._colorDecoratorIds, decorations);\n };\n ColorDetector.prototype.removeAllDecorations = function () {\n this._decorationsIds = this._editor.deltaDecorations(this._decorationsIds, []);\n this._colorDecoratorIds = this._editor.deltaDecorations(this._colorDecoratorIds, []);\n for (var subType in this._decorationsTypes) {\n this._codeEditorService.removeDecorationType(subType);\n }\n };\n ColorDetector.prototype.getColorData = function (position) {\n var _this = this;\n var decorations = this._editor.getModel()\n .getDecorationsInRange(Range.fromPositions(position, position))\n .filter(function (d) { return _this._colorDatas.has(d.id); });\n if (decorations.length === 0) {\n return null;\n }\n return this._colorDatas.get(decorations[0].id);\n };\n ColorDetector.ID = 'editor.contrib.colorDetector';\n ColorDetector.RECOMPUTE_TIME = 1000; // ms\n ColorDetector = __decorate([\n __param(1, ICodeEditorService),\n __param(2, IConfigurationService)\n ], ColorDetector);\n return ColorDetector;\n}());\nexport { ColorDetector };\nregisterEditorContribution(ColorDetector);\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport { Range } from './range';\nvar EditOperation = /** @class */ (function () {\n function EditOperation() {\n }\n EditOperation.insert = function (position, text) {\n return {\n range: new Range(position.lineNumber, position.column, position.lineNumber, position.column),\n text: text,\n forceMoveMarkers: true\n };\n };\n EditOperation.delete = function (range) {\n return {\n range: range,\n text: null\n };\n };\n EditOperation.replace = function (range, text) {\n return {\n range: range,\n text: text\n };\n };\n EditOperation.replaceMove = function (range, text) {\n return {\n range: range,\n text: text,\n forceMoveMarkers: true\n };\n };\n return EditOperation;\n}());\nexport { EditOperation };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport { EditOperation } from '../../common/core/editOperation';\nimport { Position } from '../../common/core/position';\nimport { Range } from '../../common/core/range';\nimport { Selection } from '../../common/core/selection';\nimport { LanguageConfigurationRegistry } from '../../common/modes/languageConfigurationRegistry';\nvar BlockCommentCommand = /** @class */ (function () {\n function BlockCommentCommand(selection) {\n this._selection = selection;\n this._usedEndToken = null;\n }\n BlockCommentCommand._haystackHasNeedleAtOffset = function (haystack, needle, offset) {\n if (offset < 0) {\n return false;\n }\n var needleLength = needle.length;\n var haystackLength = haystack.length;\n if (offset + needleLength > haystackLength) {\n return false;\n }\n for (var i = 0; i < needleLength; i++) {\n var codeA = haystack.charCodeAt(offset + i);\n var codeB = needle.charCodeAt(i);\n if (codeA === codeB) {\n continue;\n }\n if (codeA >= 65 /* A */ && codeA <= 90 /* Z */ && codeA + 32 === codeB) {\n // codeA is upper-case variant of codeB\n continue;\n }\n if (codeB >= 65 /* A */ && codeB <= 90 /* Z */ && codeB + 32 === codeA) {\n // codeB is upper-case variant of codeA\n continue;\n }\n return false;\n }\n return true;\n };\n BlockCommentCommand.prototype._createOperationsForBlockComment = function (selection, config, model, builder) {\n var startLineNumber = selection.startLineNumber;\n var startColumn = selection.startColumn;\n var endLineNumber = selection.endLineNumber;\n var endColumn = selection.endColumn;\n var startLineText = model.getLineContent(startLineNumber);\n var endLineText = model.getLineContent(endLineNumber);\n var startToken = config.blockCommentStartToken;\n var endToken = config.blockCommentEndToken;\n var startTokenIndex = startLineText.lastIndexOf(startToken, startColumn - 1 + startToken.length);\n var endTokenIndex = endLineText.indexOf(endToken, endColumn - 1 - endToken.length);\n if (startTokenIndex !== -1 && endTokenIndex !== -1) {\n if (startLineNumber === endLineNumber) {\n var lineBetweenTokens = startLineText.substring(startTokenIndex + startToken.length, endTokenIndex);\n if (lineBetweenTokens.indexOf(endToken) >= 0) {\n // force to add a block comment\n startTokenIndex = -1;\n endTokenIndex = -1;\n }\n }\n else {\n var startLineAfterStartToken = startLineText.substring(startTokenIndex + startToken.length);\n var endLineBeforeEndToken = endLineText.substring(0, endTokenIndex);\n if (startLineAfterStartToken.indexOf(endToken) >= 0 || endLineBeforeEndToken.indexOf(endToken) >= 0) {\n // force to add a block comment\n startTokenIndex = -1;\n endTokenIndex = -1;\n }\n }\n }\n var ops;\n if (startTokenIndex !== -1 && endTokenIndex !== -1) {\n // Consider spaces as part of the comment tokens\n if (startTokenIndex + startToken.length < startLineText.length) {\n if (startLineText.charCodeAt(startTokenIndex + startToken.length) === 32 /* Space */) {\n // Pretend the start token contains a trailing space\n startToken = startToken + ' ';\n }\n }\n if (endTokenIndex > 0) {\n if (endLineText.charCodeAt(endTokenIndex - 1) === 32 /* Space */) {\n // Pretend the end token contains a leading space\n endToken = ' ' + endToken;\n endTokenIndex -= 1;\n }\n }\n ops = BlockCommentCommand._createRemoveBlockCommentOperations(new Range(startLineNumber, startTokenIndex + startToken.length + 1, endLineNumber, endTokenIndex + 1), startToken, endToken);\n }\n else {\n ops = BlockCommentCommand._createAddBlockCommentOperations(selection, startToken, endToken);\n this._usedEndToken = ops.length === 1 ? endToken : null;\n }\n for (var i = 0; i < ops.length; i++) {\n builder.addTrackedEditOperation(ops[i].range, ops[i].text);\n }\n };\n BlockCommentCommand._createRemoveBlockCommentOperations = function (r, startToken, endToken) {\n var res = [];\n if (!Range.isEmpty(r)) {\n // Remove block comment start\n res.push(EditOperation.delete(new Range(r.startLineNumber, r.startColumn - startToken.length, r.startLineNumber, r.startColumn)));\n // Remove block comment end\n res.push(EditOperation.delete(new Range(r.endLineNumber, r.endColumn, r.endLineNumber, r.endColumn + endToken.length)));\n }\n else {\n // Remove both continuously\n res.push(EditOperation.delete(new Range(r.startLineNumber, r.startColumn - startToken.length, r.endLineNumber, r.endColumn + endToken.length)));\n }\n return res;\n };\n BlockCommentCommand._createAddBlockCommentOperations = function (r, startToken, endToken) {\n var res = [];\n if (!Range.isEmpty(r)) {\n // Insert block comment start\n res.push(EditOperation.insert(new Position(r.startLineNumber, r.startColumn), startToken + ' '));\n // Insert block comment end\n res.push(EditOperation.insert(new Position(r.endLineNumber, r.endColumn), ' ' + endToken));\n }\n else {\n // Insert both continuously\n res.push(EditOperation.replace(new Range(r.startLineNumber, r.startColumn, r.endLineNumber, r.endColumn), startToken + ' ' + endToken));\n }\n return res;\n };\n BlockCommentCommand.prototype.getEditOperations = function (model, builder) {\n var startLineNumber = this._selection.startLineNumber;\n var startColumn = this._selection.startColumn;\n model.tokenizeIfCheap(startLineNumber);\n var languageId = model.getLanguageIdAtPosition(startLineNumber, startColumn);\n var config = LanguageConfigurationRegistry.getComments(languageId);\n if (!config || !config.blockCommentStartToken || !config.blockCommentEndToken) {\n // Mode does not support block comments\n return;\n }\n this._createOperationsForBlockComment(this._selection, config, model, builder);\n };\n BlockCommentCommand.prototype.computeCursorState = function (model, helper) {\n var inverseEditOperations = helper.getInverseEditOperations();\n if (inverseEditOperations.length === 2) {\n var startTokenEditOperation = inverseEditOperations[0];\n var endTokenEditOperation = inverseEditOperations[1];\n return new Selection(startTokenEditOperation.range.endLineNumber, startTokenEditOperation.range.endColumn, endTokenEditOperation.range.startLineNumber, endTokenEditOperation.range.startColumn);\n }\n else {\n var srcRange = inverseEditOperations[0].range;\n var deltaColumn = this._usedEndToken ? -this._usedEndToken.length - 1 : 0; // minus 1 space before endToken\n return new Selection(srcRange.endLineNumber, srcRange.endColumn + deltaColumn, srcRange.endLineNumber, srcRange.endColumn + deltaColumn);\n }\n };\n return BlockCommentCommand;\n}());\nexport { BlockCommentCommand };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport * as strings from '../../../base/common/strings';\nimport { EditOperation } from '../../common/core/editOperation';\nimport { Position } from '../../common/core/position';\nimport { Range } from '../../common/core/range';\nimport { Selection } from '../../common/core/selection';\nimport { BlockCommentCommand } from './blockCommentCommand';\nimport { LanguageConfigurationRegistry } from '../../common/modes/languageConfigurationRegistry';\nvar LineCommentCommand = /** @class */ (function () {\n function LineCommentCommand(selection, tabSize, type) {\n this._selection = selection;\n this._tabSize = tabSize;\n this._type = type;\n this._deltaColumn = 0;\n }\n /**\n * Do an initial pass over the lines and gather info about the line comment string.\n * Returns null if any of the lines doesn't support a line comment string.\n */\n LineCommentCommand._gatherPreflightCommentStrings = function (model, startLineNumber, endLineNumber) {\n model.tokenizeIfCheap(startLineNumber);\n var languageId = model.getLanguageIdAtPosition(startLineNumber, 1);\n var config = LanguageConfigurationRegistry.getComments(languageId);\n var commentStr = (config ? config.lineCommentToken : null);\n if (!commentStr) {\n // Mode does not support line comments\n return null;\n }\n var lines = [];\n for (var i = 0, lineCount = endLineNumber - startLineNumber + 1; i < lineCount; i++) {\n lines[i] = {\n ignore: false,\n commentStr: commentStr,\n commentStrOffset: 0,\n commentStrLength: commentStr.length\n };\n }\n return lines;\n };\n /**\n * Analyze lines and decide which lines are relevant and what the toggle should do.\n * Also, build up several offsets and lengths useful in the generation of editor operations.\n */\n LineCommentCommand._analyzeLines = function (type, model, lines, startLineNumber) {\n var onlyWhitespaceLines = true;\n var shouldRemoveComments;\n if (type === 0 /* Toggle */) {\n shouldRemoveComments = true;\n }\n else if (type === 1 /* ForceAdd */) {\n shouldRemoveComments = false;\n }\n else {\n shouldRemoveComments = true;\n }\n for (var i = 0, lineCount = lines.length; i < lineCount; i++) {\n var lineData = lines[i];\n var lineNumber = startLineNumber + i;\n var lineContent = model.getLineContent(lineNumber);\n var lineContentStartOffset = strings.firstNonWhitespaceIndex(lineContent);\n if (lineContentStartOffset === -1) {\n // Empty or whitespace only line\n if (type === 0 /* Toggle */) {\n lineData.ignore = true;\n }\n else if (type === 1 /* ForceAdd */) {\n lineData.ignore = true;\n }\n else {\n lineData.ignore = true;\n }\n lineData.commentStrOffset = lineContent.length;\n continue;\n }\n onlyWhitespaceLines = false;\n lineData.ignore = false;\n lineData.commentStrOffset = lineContentStartOffset;\n if (shouldRemoveComments && !BlockCommentCommand._haystackHasNeedleAtOffset(lineContent, lineData.commentStr, lineContentStartOffset)) {\n if (type === 0 /* Toggle */) {\n // Every line so far has been a line comment, but this one is not\n shouldRemoveComments = false;\n }\n else if (type === 1 /* ForceAdd */) {\n // Will not happen\n }\n else {\n lineData.ignore = true;\n }\n }\n if (shouldRemoveComments) {\n var commentStrEndOffset = lineContentStartOffset + lineData.commentStrLength;\n if (commentStrEndOffset < lineContent.length && lineContent.charCodeAt(commentStrEndOffset) === 32 /* Space */) {\n lineData.commentStrLength += 1;\n }\n }\n }\n if (type === 0 /* Toggle */ && onlyWhitespaceLines) {\n // For only whitespace lines, we insert comments\n shouldRemoveComments = false;\n // Also, no longer ignore them\n for (var i = 0, lineCount = lines.length; i < lineCount; i++) {\n lines[i].ignore = false;\n }\n }\n return {\n supported: true,\n shouldRemoveComments: shouldRemoveComments,\n lines: lines\n };\n };\n /**\n * Analyze all lines and decide exactly what to do => not supported | insert line comments | remove line comments\n */\n LineCommentCommand._gatherPreflightData = function (type, model, startLineNumber, endLineNumber) {\n var lines = LineCommentCommand._gatherPreflightCommentStrings(model, startLineNumber, endLineNumber);\n if (lines === null) {\n return {\n supported: false,\n shouldRemoveComments: false,\n lines: null\n };\n }\n return LineCommentCommand._analyzeLines(type, model, lines, startLineNumber);\n };\n /**\n * Given a successful analysis, execute either insert line comments, either remove line comments\n */\n LineCommentCommand.prototype._executeLineComments = function (model, builder, data, s) {\n var ops;\n if (data.shouldRemoveComments) {\n ops = LineCommentCommand._createRemoveLineCommentsOperations(data.lines, s.startLineNumber);\n }\n else {\n LineCommentCommand._normalizeInsertionPoint(model, data.lines, s.startLineNumber, this._tabSize);\n ops = LineCommentCommand._createAddLineCommentsOperations(data.lines, s.startLineNumber);\n }\n var cursorPosition = new Position(s.positionLineNumber, s.positionColumn);\n for (var i = 0, len = ops.length; i < len; i++) {\n builder.addEditOperation(ops[i].range, ops[i].text);\n if (ops[i].range.isEmpty() && ops[i].range.getStartPosition().equals(cursorPosition)) {\n var lineContent = model.getLineContent(cursorPosition.lineNumber);\n if (lineContent.length + 1 === cursorPosition.column) {\n this._deltaColumn = ops[i].text.length;\n }\n }\n }\n this._selectionId = builder.trackSelection(s);\n };\n LineCommentCommand.prototype._attemptRemoveBlockComment = function (model, s, startToken, endToken) {\n var startLineNumber = s.startLineNumber;\n var endLineNumber = s.endLineNumber;\n var startTokenAllowedBeforeColumn = endToken.length + Math.max(model.getLineFirstNonWhitespaceColumn(s.startLineNumber), s.startColumn);\n var startTokenIndex = model.getLineContent(startLineNumber).lastIndexOf(startToken, startTokenAllowedBeforeColumn - 1);\n var endTokenIndex = model.getLineContent(endLineNumber).indexOf(endToken, s.endColumn - 1 - startToken.length);\n if (startTokenIndex !== -1 && endTokenIndex === -1) {\n endTokenIndex = model.getLineContent(startLineNumber).indexOf(endToken, startTokenIndex + startToken.length);\n endLineNumber = startLineNumber;\n }\n if (startTokenIndex === -1 && endTokenIndex !== -1) {\n startTokenIndex = model.getLineContent(endLineNumber).lastIndexOf(startToken, endTokenIndex);\n startLineNumber = endLineNumber;\n }\n if (s.isEmpty() && (startTokenIndex === -1 || endTokenIndex === -1)) {\n startTokenIndex = model.getLineContent(startLineNumber).indexOf(startToken);\n if (startTokenIndex !== -1) {\n endTokenIndex = model.getLineContent(startLineNumber).indexOf(endToken, startTokenIndex + startToken.length);\n }\n }\n // We have to adjust to possible inner white space.\n // For Space after startToken, add Space to startToken - range math will work out.\n if (startTokenIndex !== -1 && model.getLineContent(startLineNumber).charCodeAt(startTokenIndex + startToken.length) === 32 /* Space */) {\n startToken += ' ';\n }\n // For Space before endToken, add Space before endToken and shift index one left.\n if (endTokenIndex !== -1 && model.getLineContent(endLineNumber).charCodeAt(endTokenIndex - 1) === 32 /* Space */) {\n endToken = ' ' + endToken;\n endTokenIndex -= 1;\n }\n if (startTokenIndex !== -1 && endTokenIndex !== -1) {\n return BlockCommentCommand._createRemoveBlockCommentOperations(new Range(startLineNumber, startTokenIndex + startToken.length + 1, endLineNumber, endTokenIndex + 1), startToken, endToken);\n }\n return null;\n };\n /**\n * Given an unsuccessful analysis, delegate to the block comment command\n */\n LineCommentCommand.prototype._executeBlockComment = function (model, builder, s) {\n model.tokenizeIfCheap(s.startLineNumber);\n var languageId = model.getLanguageIdAtPosition(s.startLineNumber, 1);\n var config = LanguageConfigurationRegistry.getComments(languageId);\n if (!config || !config.blockCommentStartToken || !config.blockCommentEndToken) {\n // Mode does not support block comments\n return;\n }\n var startToken = config.blockCommentStartToken;\n var endToken = config.blockCommentEndToken;\n var ops = this._attemptRemoveBlockComment(model, s, startToken, endToken);\n if (!ops) {\n if (s.isEmpty()) {\n var lineContent = model.getLineContent(s.startLineNumber);\n var firstNonWhitespaceIndex = strings.firstNonWhitespaceIndex(lineContent);\n if (firstNonWhitespaceIndex === -1) {\n // Line is empty or contains only whitespace\n firstNonWhitespaceIndex = lineContent.length;\n }\n ops = BlockCommentCommand._createAddBlockCommentOperations(new Range(s.startLineNumber, firstNonWhitespaceIndex + 1, s.startLineNumber, lineContent.length + 1), startToken, endToken);\n }\n else {\n ops = BlockCommentCommand._createAddBlockCommentOperations(new Range(s.startLineNumber, model.getLineFirstNonWhitespaceColumn(s.startLineNumber), s.endLineNumber, model.getLineMaxColumn(s.endLineNumber)), startToken, endToken);\n }\n if (ops.length === 1) {\n // Leave cursor after token and Space\n this._deltaColumn = startToken.length + 1;\n }\n }\n this._selectionId = builder.trackSelection(s);\n for (var i = 0; i < ops.length; i++) {\n builder.addEditOperation(ops[i].range, ops[i].text);\n }\n };\n LineCommentCommand.prototype.getEditOperations = function (model, builder) {\n var s = this._selection;\n this._moveEndPositionDown = false;\n if (s.startLineNumber < s.endLineNumber && s.endColumn === 1) {\n this._moveEndPositionDown = true;\n s = s.setEndPosition(s.endLineNumber - 1, model.getLineMaxColumn(s.endLineNumber - 1));\n }\n var data = LineCommentCommand._gatherPreflightData(this._type, model, s.startLineNumber, s.endLineNumber);\n if (data.supported) {\n return this._executeLineComments(model, builder, data, s);\n }\n return this._executeBlockComment(model, builder, s);\n };\n LineCommentCommand.prototype.computeCursorState = function (model, helper) {\n var result = helper.getTrackedSelection(this._selectionId);\n if (this._moveEndPositionDown) {\n result = result.setEndPosition(result.endLineNumber + 1, 1);\n }\n return new Selection(result.selectionStartLineNumber, result.selectionStartColumn + this._deltaColumn, result.positionLineNumber, result.positionColumn + this._deltaColumn);\n };\n /**\n * Generate edit operations in the remove line comment case\n */\n LineCommentCommand._createRemoveLineCommentsOperations = function (lines, startLineNumber) {\n var res = [];\n for (var i = 0, len = lines.length; i < len; i++) {\n var lineData = lines[i];\n if (lineData.ignore) {\n continue;\n }\n res.push(EditOperation.delete(new Range(startLineNumber + i, lineData.commentStrOffset + 1, startLineNumber + i, lineData.commentStrOffset + lineData.commentStrLength + 1)));\n }\n return res;\n };\n /**\n * Generate edit operations in the add line comment case\n */\n LineCommentCommand._createAddLineCommentsOperations = function (lines, startLineNumber) {\n var res = [];\n for (var i = 0, len = lines.length; i < len; i++) {\n var lineData = lines[i];\n if (lineData.ignore) {\n continue;\n }\n res.push(EditOperation.insert(new Position(startLineNumber + i, lineData.commentStrOffset + 1), lineData.commentStr + ' '));\n }\n return res;\n };\n // TODO@Alex -> duplicated in characterHardWrappingLineMapper\n LineCommentCommand.nextVisibleColumn = function (currentVisibleColumn, tabSize, isTab, columnSize) {\n if (isTab) {\n return currentVisibleColumn + (tabSize - (currentVisibleColumn % tabSize));\n }\n return currentVisibleColumn + columnSize;\n };\n /**\n * Adjust insertion points to have them vertically aligned in the add line comment case\n */\n LineCommentCommand._normalizeInsertionPoint = function (model, lines, startLineNumber, tabSize) {\n var minVisibleColumn = Number.MAX_VALUE;\n var j;\n var lenJ;\n for (var i = 0, len = lines.length; i < len; i++) {\n if (lines[i].ignore) {\n continue;\n }\n var lineContent = model.getLineContent(startLineNumber + i);\n var currentVisibleColumn = 0;\n for (var j_1 = 0, lenJ_1 = lines[i].commentStrOffset; currentVisibleColumn < minVisibleColumn && j_1 < lenJ_1; j_1++) {\n currentVisibleColumn = LineCommentCommand.nextVisibleColumn(currentVisibleColumn, tabSize, lineContent.charCodeAt(j_1) === 9 /* Tab */, 1);\n }\n if (currentVisibleColumn < minVisibleColumn) {\n minVisibleColumn = currentVisibleColumn;\n }\n }\n minVisibleColumn = Math.floor(minVisibleColumn / tabSize) * tabSize;\n for (var i = 0, len = lines.length; i < len; i++) {\n if (lines[i].ignore) {\n continue;\n }\n var lineContent = model.getLineContent(startLineNumber + i);\n var currentVisibleColumn = 0;\n for (j = 0, lenJ = lines[i].commentStrOffset; currentVisibleColumn < minVisibleColumn && j < lenJ; j++) {\n currentVisibleColumn = LineCommentCommand.nextVisibleColumn(currentVisibleColumn, tabSize, lineContent.charCodeAt(j) === 9 /* Tab */, 1);\n }\n if (currentVisibleColumn > minVisibleColumn) {\n lines[i].commentStrOffset = j - 1;\n }\n else {\n lines[i].commentStrOffset = j;\n }\n }\n };\n return LineCommentCommand;\n}());\nexport { LineCommentCommand };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport * as nls from '../../../nls';\nimport { KeyChord } from '../../../base/common/keyCodes';\nimport { EditorContextKeys } from '../../common/editorContextKeys';\nimport { registerEditorAction, EditorAction } from '../../browser/editorExtensions';\nimport { BlockCommentCommand } from './blockCommentCommand';\nimport { LineCommentCommand } from './lineCommentCommand';\nimport { MenuId } from '../../../platform/actions/common/actions';\nvar CommentLineAction = /** @class */ (function (_super) {\n __extends(CommentLineAction, _super);\n function CommentLineAction(type, opts) {\n var _this = _super.call(this, opts) || this;\n _this._type = type;\n return _this;\n }\n CommentLineAction.prototype.run = function (accessor, editor) {\n var model = editor.getModel();\n if (!model) {\n return;\n }\n var commands = [];\n var selections = editor.getSelections();\n var opts = model.getOptions();\n for (var i = 0; i < selections.length; i++) {\n commands.push(new LineCommentCommand(selections[i], opts.tabSize, this._type));\n }\n editor.pushUndoStop();\n editor.executeCommands(this.id, commands);\n editor.pushUndoStop();\n };\n return CommentLineAction;\n}(EditorAction));\nvar ToggleCommentLineAction = /** @class */ (function (_super) {\n __extends(ToggleCommentLineAction, _super);\n function ToggleCommentLineAction() {\n return _super.call(this, 0 /* Toggle */, {\n id: 'editor.action.commentLine',\n label: nls.localize('comment.line', \"Toggle Line Comment\"),\n alias: 'Toggle Line Comment',\n precondition: EditorContextKeys.writable,\n kbOpts: {\n kbExpr: EditorContextKeys.editorTextFocus,\n primary: 2048 /* CtrlCmd */ | 85 /* US_SLASH */,\n weight: 100 /* EditorContrib */\n },\n menubarOpts: {\n menuId: MenuId.MenubarEditMenu,\n group: '5_insert',\n title: nls.localize({ key: 'miToggleLineComment', comment: ['&& denotes a mnemonic'] }, \"&&Toggle Line Comment\"),\n order: 1\n }\n }) || this;\n }\n return ToggleCommentLineAction;\n}(CommentLineAction));\nvar AddLineCommentAction = /** @class */ (function (_super) {\n __extends(AddLineCommentAction, _super);\n function AddLineCommentAction() {\n return _super.call(this, 1 /* ForceAdd */, {\n id: 'editor.action.addCommentLine',\n label: nls.localize('comment.line.add', \"Add Line Comment\"),\n alias: 'Add Line Comment',\n precondition: EditorContextKeys.writable,\n kbOpts: {\n kbExpr: EditorContextKeys.editorTextFocus,\n primary: KeyChord(2048 /* CtrlCmd */ | 41 /* KEY_K */, 2048 /* CtrlCmd */ | 33 /* KEY_C */),\n weight: 100 /* EditorContrib */\n }\n }) || this;\n }\n return AddLineCommentAction;\n}(CommentLineAction));\nvar RemoveLineCommentAction = /** @class */ (function (_super) {\n __extends(RemoveLineCommentAction, _super);\n function RemoveLineCommentAction() {\n return _super.call(this, 2 /* ForceRemove */, {\n id: 'editor.action.removeCommentLine',\n label: nls.localize('comment.line.remove', \"Remove Line Comment\"),\n alias: 'Remove Line Comment',\n precondition: EditorContextKeys.writable,\n kbOpts: {\n kbExpr: EditorContextKeys.editorTextFocus,\n primary: KeyChord(2048 /* CtrlCmd */ | 41 /* KEY_K */, 2048 /* CtrlCmd */ | 51 /* KEY_U */),\n weight: 100 /* EditorContrib */\n }\n }) || this;\n }\n return RemoveLineCommentAction;\n}(CommentLineAction));\nvar BlockCommentAction = /** @class */ (function (_super) {\n __extends(BlockCommentAction, _super);\n function BlockCommentAction() {\n return _super.call(this, {\n id: 'editor.action.blockComment',\n label: nls.localize('comment.block', \"Toggle Block Comment\"),\n alias: 'Toggle Block Comment',\n precondition: EditorContextKeys.writable,\n kbOpts: {\n kbExpr: EditorContextKeys.editorTextFocus,\n primary: 1024 /* Shift */ | 512 /* Alt */ | 31 /* KEY_A */,\n linux: { primary: 2048 /* CtrlCmd */ | 1024 /* Shift */ | 31 /* KEY_A */ },\n weight: 100 /* EditorContrib */\n },\n menubarOpts: {\n menuId: MenuId.MenubarEditMenu,\n group: '5_insert',\n title: nls.localize({ key: 'miToggleBlockComment', comment: ['&& denotes a mnemonic'] }, \"Toggle &&Block Comment\"),\n order: 2\n }\n }) || this;\n }\n BlockCommentAction.prototype.run = function (accessor, editor) {\n var commands = [];\n var selections = editor.getSelections();\n for (var i = 0; i < selections.length; i++) {\n commands.push(new BlockCommentCommand(selections[i]));\n }\n editor.pushUndoStop();\n editor.executeCommands(this.id, commands);\n editor.pushUndoStop();\n };\n return BlockCommentAction;\n}(EditorAction));\nregisterEditorAction(ToggleCommentLineAction);\nregisterEditorAction(AddLineCommentAction);\nregisterEditorAction(RemoveLineCommentAction);\nregisterEditorAction(BlockCommentAction);\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport { createDecorator } from '../../instantiation/common/instantiation';\nexport var IContextViewService = createDecorator('contextViewService');\nexport var IContextMenuService = createDecorator('contextMenuService');\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport { createDecorator } from '../../instantiation/common/instantiation';\nexport var KeybindingSource;\n(function (KeybindingSource) {\n KeybindingSource[KeybindingSource[\"Default\"] = 1] = \"Default\";\n KeybindingSource[KeybindingSource[\"User\"] = 2] = \"User\";\n})(KeybindingSource || (KeybindingSource = {}));\nexport var IKeybindingService = createDecorator('keybindingService');\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __param = (this && this.__param) || function (paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n};\nimport * as nls from '../../../nls';\nimport { dispose } from '../../../base/common/lifecycle';\nimport { TPromise } from '../../../base/common/winjs.base';\nimport * as dom from '../../../base/browser/dom';\nimport { ActionItem, Separator } from '../../../base/browser/ui/actionbar/actionbar';\nimport { IContextMenuService, IContextViewService } from '../../../platform/contextview/browser/contextView';\nimport { IKeybindingService } from '../../../platform/keybinding/common/keybinding';\nimport { IContextKeyService } from '../../../platform/contextkey/common/contextkey';\nimport { IMenuService, MenuId } from '../../../platform/actions/common/actions';\nimport { EditorContextKeys } from '../../common/editorContextKeys';\nimport { registerEditorAction, registerEditorContribution, EditorAction } from '../../browser/editorExtensions';\nimport { MouseTargetType } from '../../browser/editorBrowser';\nvar ContextMenuController = /** @class */ (function () {\n function ContextMenuController(editor, _contextMenuService, _contextViewService, _contextKeyService, _keybindingService, _menuService) {\n var _this = this;\n this._contextMenuService = _contextMenuService;\n this._contextViewService = _contextViewService;\n this._contextKeyService = _contextKeyService;\n this._keybindingService = _keybindingService;\n this._menuService = _menuService;\n this._toDispose = [];\n this._contextMenuIsBeingShownCount = 0;\n this._editor = editor;\n this._toDispose.push(this._editor.onContextMenu(function (e) { return _this._onContextMenu(e); }));\n this._toDispose.push(this._editor.onDidScrollChange(function (e) {\n if (_this._contextMenuIsBeingShownCount > 0) {\n _this._contextViewService.hideContextView();\n }\n }));\n this._toDispose.push(this._editor.onKeyDown(function (e) {\n if (e.keyCode === 58 /* ContextMenu */) {\n // Chrome is funny like that\n e.preventDefault();\n e.stopPropagation();\n _this.showContextMenu();\n }\n }));\n }\n ContextMenuController.get = function (editor) {\n return editor.getContribution(ContextMenuController.ID);\n };\n ContextMenuController.prototype._onContextMenu = function (e) {\n if (!this._editor.getConfiguration().contribInfo.contextmenu) {\n this._editor.focus();\n // Ensure the cursor is at the position of the mouse click\n if (e.target.position && !this._editor.getSelection().containsPosition(e.target.position)) {\n this._editor.setPosition(e.target.position);\n }\n return; // Context menu is turned off through configuration\n }\n if (e.target.type === MouseTargetType.OVERLAY_WIDGET) {\n return; // allow native menu on widgets to support right click on input field for example in find\n }\n e.event.preventDefault();\n if (e.target.type !== MouseTargetType.CONTENT_TEXT && e.target.type !== MouseTargetType.CONTENT_EMPTY && e.target.type !== MouseTargetType.TEXTAREA) {\n return; // only support mouse click into text or native context menu key for now\n }\n // Ensure the editor gets focus if it hasn't, so the right events are being sent to other contributions\n this._editor.focus();\n // Ensure the cursor is at the position of the mouse click\n if (e.target.position && !this._editor.getSelection().containsPosition(e.target.position)) {\n this._editor.setPosition(e.target.position);\n }\n // Unless the user triggerd the context menu through Shift+F10, use the mouse position as menu position\n var forcedPosition;\n if (e.target.type !== MouseTargetType.TEXTAREA) {\n forcedPosition = { x: e.event.posx, y: e.event.posy + 1 };\n }\n // Show the context menu\n this.showContextMenu(forcedPosition);\n };\n ContextMenuController.prototype.showContextMenu = function (forcedPosition) {\n if (!this._editor.getConfiguration().contribInfo.contextmenu) {\n return; // Context menu is turned off through configuration\n }\n if (!this._contextMenuService) {\n this._editor.focus();\n return; // We need the context menu service to function\n }\n // Find actions available for menu\n var menuActions = this._getMenuActions();\n // Show menu if we have actions to show\n if (menuActions.length > 0) {\n this._doShowContextMenu(menuActions, forcedPosition);\n }\n };\n ContextMenuController.prototype._getMenuActions = function () {\n var result = [];\n var contextMenu = this._menuService.createMenu(MenuId.EditorContext, this._contextKeyService);\n var groups = contextMenu.getActions({ arg: this._editor.getModel().uri });\n contextMenu.dispose();\n for (var _i = 0, groups_1 = groups; _i < groups_1.length; _i++) {\n var group = groups_1[_i];\n var actions = group[1];\n result.push.apply(result, actions);\n result.push(new Separator());\n }\n result.pop(); // remove last separator\n return result;\n };\n ContextMenuController.prototype._doShowContextMenu = function (actions, forcedPosition) {\n var _this = this;\n if (forcedPosition === void 0) { forcedPosition = null; }\n // Disable hover\n var oldHoverSetting = this._editor.getConfiguration().contribInfo.hover;\n this._editor.updateOptions({\n hover: {\n enabled: false\n }\n });\n var menuPosition = forcedPosition;\n if (!menuPosition) {\n // Ensure selection is visible\n this._editor.revealPosition(this._editor.getPosition(), 1 /* Immediate */);\n this._editor.render();\n var cursorCoords = this._editor.getScrolledVisiblePosition(this._editor.getPosition());\n // Translate to absolute editor position\n var editorCoords = dom.getDomNodePagePosition(this._editor.getDomNode());\n var posx = editorCoords.left + cursorCoords.left;\n var posy = editorCoords.top + cursorCoords.top + cursorCoords.height;\n menuPosition = { x: posx, y: posy };\n }\n // Show menu\n this._contextMenuIsBeingShownCount++;\n this._contextMenuService.showContextMenu({\n getAnchor: function () { return menuPosition; },\n getActions: function () {\n return TPromise.as(actions);\n },\n getActionItem: function (action) {\n var keybinding = _this._keybindingFor(action);\n if (keybinding) {\n return new ActionItem(action, action, { label: true, keybinding: keybinding.getLabel(), isMenu: true });\n }\n var customActionItem = action;\n if (typeof customActionItem.getActionItem === 'function') {\n return customActionItem.getActionItem();\n }\n return new ActionItem(action, action, { icon: true, label: true, isMenu: true });\n },\n getKeyBinding: function (action) {\n return _this._keybindingFor(action);\n },\n onHide: function (wasCancelled) {\n _this._contextMenuIsBeingShownCount--;\n _this._editor.focus();\n _this._editor.updateOptions({\n hover: oldHoverSetting\n });\n }\n });\n };\n ContextMenuController.prototype._keybindingFor = function (action) {\n return this._keybindingService.lookupKeybinding(action.id);\n };\n ContextMenuController.prototype.getId = function () {\n return ContextMenuController.ID;\n };\n ContextMenuController.prototype.dispose = function () {\n if (this._contextMenuIsBeingShownCount > 0) {\n this._contextViewService.hideContextView();\n }\n this._toDispose = dispose(this._toDispose);\n };\n ContextMenuController.ID = 'editor.contrib.contextmenu';\n ContextMenuController = __decorate([\n __param(1, IContextMenuService),\n __param(2, IContextViewService),\n __param(3, IContextKeyService),\n __param(4, IKeybindingService),\n __param(5, IMenuService)\n ], ContextMenuController);\n return ContextMenuController;\n}());\nexport { ContextMenuController };\nvar ShowContextMenu = /** @class */ (function (_super) {\n __extends(ShowContextMenu, _super);\n function ShowContextMenu() {\n return _super.call(this, {\n id: 'editor.action.showContextMenu',\n label: nls.localize('action.showContextMenu.label', \"Show Editor Context Menu\"),\n alias: 'Show Editor Context Menu',\n precondition: null,\n kbOpts: {\n kbExpr: EditorContextKeys.textInputFocus,\n primary: 1024 /* Shift */ | 68 /* F10 */,\n weight: 100 /* EditorContrib */\n }\n }) || this;\n }\n ShowContextMenu.prototype.run = function (accessor, editor) {\n var contribution = ContextMenuController.get(editor);\n contribution.showContextMenu();\n };\n return ShowContextMenu;\n}(EditorAction));\nregisterEditorContribution(ContextMenuController);\nregisterEditorAction(ShowContextMenu);\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport * as nls from '../../../nls';\nimport { registerEditorContribution, EditorAction, registerEditorAction } from '../../browser/editorExtensions';\nimport { Disposable } from '../../../base/common/lifecycle';\nimport { EditorContextKeys } from '../../common/editorContextKeys';\nvar CursorState = /** @class */ (function () {\n function CursorState(selections) {\n this.selections = selections;\n }\n CursorState.prototype.equals = function (other) {\n var thisLen = this.selections.length;\n var otherLen = other.selections.length;\n if (thisLen !== otherLen) {\n return false;\n }\n for (var i = 0; i < thisLen; i++) {\n if (!this.selections[i].equalsSelection(other.selections[i])) {\n return false;\n }\n }\n return true;\n };\n return CursorState;\n}());\nvar CursorUndoController = /** @class */ (function (_super) {\n __extends(CursorUndoController, _super);\n function CursorUndoController(editor) {\n var _this = _super.call(this) || this;\n _this._editor = editor;\n _this._isCursorUndo = false;\n _this._undoStack = [];\n _this._prevState = _this._readState();\n _this._register(editor.onDidChangeModel(function (e) {\n _this._undoStack = [];\n _this._prevState = null;\n }));\n _this._register(editor.onDidChangeModelContent(function (e) {\n _this._undoStack = [];\n _this._prevState = null;\n }));\n _this._register(editor.onDidChangeCursorSelection(function (e) {\n if (!_this._isCursorUndo && _this._prevState) {\n _this._undoStack.push(_this._prevState);\n if (_this._undoStack.length > 50) {\n // keep the cursor undo stack bounded\n _this._undoStack.shift();\n }\n }\n _this._prevState = _this._readState();\n }));\n return _this;\n }\n CursorUndoController.get = function (editor) {\n return editor.getContribution(CursorUndoController.ID);\n };\n CursorUndoController.prototype._readState = function () {\n if (!this._editor.getModel()) {\n // no model => no state\n return null;\n }\n return new CursorState(this._editor.getSelections());\n };\n CursorUndoController.prototype.getId = function () {\n return CursorUndoController.ID;\n };\n CursorUndoController.prototype.cursorUndo = function () {\n var currState = new CursorState(this._editor.getSelections());\n while (this._undoStack.length > 0) {\n var prevState = this._undoStack.pop();\n if (!prevState.equals(currState)) {\n this._isCursorUndo = true;\n this._editor.setSelections(prevState.selections);\n this._editor.revealRangeInCenterIfOutsideViewport(prevState.selections[0], 0 /* Smooth */);\n this._isCursorUndo = false;\n return;\n }\n }\n };\n CursorUndoController.ID = 'editor.contrib.cursorUndoController';\n return CursorUndoController;\n}(Disposable));\nexport { CursorUndoController };\nvar CursorUndo = /** @class */ (function (_super) {\n __extends(CursorUndo, _super);\n function CursorUndo() {\n return _super.call(this, {\n id: 'cursorUndo',\n label: nls.localize('cursor.undo', \"Soft Undo\"),\n alias: 'Soft Undo',\n precondition: null,\n kbOpts: {\n kbExpr: EditorContextKeys.textInputFocus,\n primary: 2048 /* CtrlCmd */ | 51 /* KEY_U */,\n weight: 100 /* EditorContrib */\n }\n }) || this;\n }\n CursorUndo.prototype.run = function (accessor, editor, args) {\n CursorUndoController.get(editor).cursorUndo();\n };\n return CursorUndo;\n}(EditorAction));\nexport { CursorUndo };\nregisterEditorContribution(CursorUndoController);\nregisterEditorAction(CursorUndo);\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport { Selection } from '../../common/core/selection';\nimport { Range } from '../../common/core/range';\nvar DragAndDropCommand = /** @class */ (function () {\n function DragAndDropCommand(selection, targetPosition, copy) {\n this.selection = selection;\n this.targetPosition = targetPosition;\n this.copy = copy;\n }\n DragAndDropCommand.prototype.getEditOperations = function (model, builder) {\n var text = model.getValueInRange(this.selection);\n if (!this.copy) {\n builder.addEditOperation(this.selection, null);\n }\n builder.addEditOperation(new Range(this.targetPosition.lineNumber, this.targetPosition.column, this.targetPosition.lineNumber, this.targetPosition.column), text);\n if (this.selection.containsPosition(this.targetPosition) && !(this.copy && (this.selection.getEndPosition().equals(this.targetPosition) || this.selection.getStartPosition().equals(this.targetPosition)) // we allow users to paste content beside the selection\n )) {\n this.targetSelection = this.selection;\n return;\n }\n if (this.copy) {\n this.targetSelection = new Selection(this.targetPosition.lineNumber, this.targetPosition.column, this.selection.endLineNumber - this.selection.startLineNumber + this.targetPosition.lineNumber, this.selection.startLineNumber === this.selection.endLineNumber ?\n this.targetPosition.column + this.selection.endColumn - this.selection.startColumn :\n this.selection.endColumn);\n return;\n }\n if (this.targetPosition.lineNumber > this.selection.endLineNumber) {\n // Drag the selection downwards\n this.targetSelection = new Selection(this.targetPosition.lineNumber - this.selection.endLineNumber + this.selection.startLineNumber, this.targetPosition.column, this.targetPosition.lineNumber, this.selection.startLineNumber === this.selection.endLineNumber ?\n this.targetPosition.column + this.selection.endColumn - this.selection.startColumn :\n this.selection.endColumn);\n return;\n }\n if (this.targetPosition.lineNumber < this.selection.endLineNumber) {\n // Drag the selection upwards\n this.targetSelection = new Selection(this.targetPosition.lineNumber, this.targetPosition.column, this.targetPosition.lineNumber + this.selection.endLineNumber - this.selection.startLineNumber, this.selection.startLineNumber === this.selection.endLineNumber ?\n this.targetPosition.column + this.selection.endColumn - this.selection.startColumn :\n this.selection.endColumn);\n return;\n }\n // The target position is at the same line as the selection's end position.\n if (this.selection.endColumn <= this.targetPosition.column) {\n // The target position is after the selection's end position\n this.targetSelection = new Selection(this.targetPosition.lineNumber - this.selection.endLineNumber + this.selection.startLineNumber, this.selection.startLineNumber === this.selection.endLineNumber ?\n this.targetPosition.column - this.selection.endColumn + this.selection.startColumn :\n this.targetPosition.column - this.selection.endColumn + this.selection.startColumn, this.targetPosition.lineNumber, this.selection.startLineNumber === this.selection.endLineNumber ?\n this.targetPosition.column :\n this.selection.endColumn);\n }\n else {\n // The target position is before the selection's end postion. Since the selection doesn't contain the target position, the selection is one-line and target position is before this selection.\n this.targetSelection = new Selection(this.targetPosition.lineNumber - this.selection.endLineNumber + this.selection.startLineNumber, this.targetPosition.column, this.targetPosition.lineNumber, this.targetPosition.column + this.selection.endColumn - this.selection.startColumn);\n }\n };\n DragAndDropCommand.prototype.computeCursorState = function (model, helper) {\n return this.targetSelection;\n };\n return DragAndDropCommand;\n}());\nexport { DragAndDropCommand };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport './dnd.css';\nimport { dispose } from '../../../base/common/lifecycle';\nimport { isMacintosh } from '../../../base/common/platform';\nimport { MouseTargetType } from '../../browser/editorBrowser';\nimport { registerEditorContribution } from '../../browser/editorExtensions';\nimport { Position } from '../../common/core/position';\nimport { Range } from '../../common/core/range';\nimport { Selection } from '../../common/core/selection';\nimport { DragAndDropCommand } from './dragAndDropCommand';\nimport { ModelDecorationOptions } from '../../common/model/textModel';\nfunction hasTriggerModifier(e) {\n if (isMacintosh) {\n return e.altKey;\n }\n else {\n return e.ctrlKey;\n }\n}\nvar DragAndDropController = /** @class */ (function () {\n function DragAndDropController(editor) {\n var _this = this;\n this._editor = editor;\n this._toUnhook = [];\n this._toUnhook.push(this._editor.onMouseDown(function (e) { return _this._onEditorMouseDown(e); }));\n this._toUnhook.push(this._editor.onMouseUp(function (e) { return _this._onEditorMouseUp(e); }));\n this._toUnhook.push(this._editor.onMouseDrag(function (e) { return _this._onEditorMouseDrag(e); }));\n this._toUnhook.push(this._editor.onMouseDrop(function (e) { return _this._onEditorMouseDrop(e); }));\n this._toUnhook.push(this._editor.onKeyDown(function (e) { return _this.onEditorKeyDown(e); }));\n this._toUnhook.push(this._editor.onKeyUp(function (e) { return _this.onEditorKeyUp(e); }));\n this._dndDecorationIds = [];\n this._mouseDown = false;\n this._modiferPressed = false;\n this._dragSelection = null;\n }\n DragAndDropController.prototype.onEditorKeyDown = function (e) {\n if (!this._editor.getConfiguration().dragAndDrop) {\n return;\n }\n if (hasTriggerModifier(e)) {\n this._modiferPressed = true;\n }\n if (this._mouseDown && hasTriggerModifier(e)) {\n this._editor.updateOptions({\n mouseStyle: 'copy'\n });\n }\n };\n DragAndDropController.prototype.onEditorKeyUp = function (e) {\n if (!this._editor.getConfiguration().dragAndDrop) {\n return;\n }\n if (hasTriggerModifier(e)) {\n this._modiferPressed = false;\n }\n if (this._mouseDown && e.keyCode === DragAndDropController.TRIGGER_KEY_VALUE) {\n this._editor.updateOptions({\n mouseStyle: 'default'\n });\n }\n };\n DragAndDropController.prototype._onEditorMouseDown = function (mouseEvent) {\n this._mouseDown = true;\n };\n DragAndDropController.prototype._onEditorMouseUp = function (mouseEvent) {\n this._mouseDown = false;\n // Whenever users release the mouse, the drag and drop operation should finish and the cursor should revert to text.\n this._editor.updateOptions({\n mouseStyle: 'text'\n });\n };\n DragAndDropController.prototype._onEditorMouseDrag = function (mouseEvent) {\n var target = mouseEvent.target;\n if (this._dragSelection === null) {\n var possibleSelections = this._editor.getSelections().filter(function (selection) { return selection.containsPosition(target.position); });\n if (possibleSelections.length === 1) {\n this._dragSelection = possibleSelections[0];\n }\n else {\n return;\n }\n }\n if (hasTriggerModifier(mouseEvent.event)) {\n this._editor.updateOptions({\n mouseStyle: 'copy'\n });\n }\n else {\n this._editor.updateOptions({\n mouseStyle: 'default'\n });\n }\n if (this._dragSelection.containsPosition(target.position)) {\n this._removeDecoration();\n }\n else {\n this.showAt(target.position);\n }\n };\n DragAndDropController.prototype._onEditorMouseDrop = function (mouseEvent) {\n if (mouseEvent.target && (this._hitContent(mouseEvent.target) || this._hitMargin(mouseEvent.target)) && mouseEvent.target.position) {\n var newCursorPosition_1 = new Position(mouseEvent.target.position.lineNumber, mouseEvent.target.position.column);\n if (this._dragSelection === null) {\n if (mouseEvent.event.shiftKey) {\n var primarySelection = this._editor.getSelection();\n var startLineNumber = primarySelection.startLineNumber, startColumn = primarySelection.startColumn;\n this._editor.setSelections([new Selection(startLineNumber, startColumn, newCursorPosition_1.lineNumber, newCursorPosition_1.column)]);\n }\n else {\n var newSelections = this._editor.getSelections().map(function (selection) {\n if (selection.containsPosition(newCursorPosition_1)) {\n return new Selection(newCursorPosition_1.lineNumber, newCursorPosition_1.column, newCursorPosition_1.lineNumber, newCursorPosition_1.column);\n }\n else {\n return selection;\n }\n });\n this._editor.setSelections(newSelections);\n }\n }\n else if (!this._dragSelection.containsPosition(newCursorPosition_1) ||\n ((hasTriggerModifier(mouseEvent.event) ||\n this._modiferPressed) && (this._dragSelection.getEndPosition().equals(newCursorPosition_1) || this._dragSelection.getStartPosition().equals(newCursorPosition_1)) // we allow users to paste content beside the selection\n )) {\n this._editor.pushUndoStop();\n this._editor.executeCommand(DragAndDropController.ID, new DragAndDropCommand(this._dragSelection, newCursorPosition_1, hasTriggerModifier(mouseEvent.event) || this._modiferPressed));\n this._editor.pushUndoStop();\n }\n }\n this._editor.updateOptions({\n mouseStyle: 'text'\n });\n this._removeDecoration();\n this._dragSelection = null;\n this._mouseDown = false;\n };\n DragAndDropController.prototype.showAt = function (position) {\n var newDecorations = [{\n range: new Range(position.lineNumber, position.column, position.lineNumber, position.column),\n options: DragAndDropController._DECORATION_OPTIONS\n }];\n this._dndDecorationIds = this._editor.deltaDecorations(this._dndDecorationIds, newDecorations);\n this._editor.revealPosition(position, 1 /* Immediate */);\n };\n DragAndDropController.prototype._removeDecoration = function () {\n this._dndDecorationIds = this._editor.deltaDecorations(this._dndDecorationIds, []);\n };\n DragAndDropController.prototype._hitContent = function (target) {\n return target.type === MouseTargetType.CONTENT_TEXT ||\n target.type === MouseTargetType.CONTENT_EMPTY;\n };\n DragAndDropController.prototype._hitMargin = function (target) {\n return target.type === MouseTargetType.GUTTER_GLYPH_MARGIN ||\n target.type === MouseTargetType.GUTTER_LINE_NUMBERS ||\n target.type === MouseTargetType.GUTTER_LINE_DECORATIONS;\n };\n DragAndDropController.prototype.getId = function () {\n return DragAndDropController.ID;\n };\n DragAndDropController.prototype.dispose = function () {\n this._removeDecoration();\n this._dragSelection = null;\n this._mouseDown = false;\n this._modiferPressed = false;\n this._toUnhook = dispose(this._toUnhook);\n };\n DragAndDropController.ID = 'editor.contrib.dragAndDrop';\n DragAndDropController.TRIGGER_KEY_VALUE = isMacintosh ? 6 /* Alt */ : 5 /* Ctrl */;\n DragAndDropController._DECORATION_OPTIONS = ModelDecorationOptions.register({\n className: 'dnd-target'\n });\n return DragAndDropController;\n}());\nexport { DragAndDropController };\nregisterEditorContribution(DragAndDropController);\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nvar ReplacePattern = /** @class */ (function () {\n function ReplacePattern(pieces) {\n if (!pieces || pieces.length === 0) {\n this._staticValue = '';\n this._pieces = null;\n }\n else if (pieces.length === 1 && pieces[0].staticValue !== null) {\n this._staticValue = pieces[0].staticValue;\n this._pieces = null;\n }\n else {\n this._staticValue = null;\n this._pieces = pieces;\n }\n }\n ReplacePattern.fromStaticValue = function (value) {\n return new ReplacePattern([ReplacePiece.staticValue(value)]);\n };\n Object.defineProperty(ReplacePattern.prototype, \"hasReplacementPatterns\", {\n get: function () {\n return this._staticValue === null;\n },\n enumerable: true,\n configurable: true\n });\n ReplacePattern.prototype.buildReplaceString = function (matches) {\n if (this._staticValue !== null) {\n return this._staticValue;\n }\n var result = '';\n for (var i = 0, len = this._pieces.length; i < len; i++) {\n var piece = this._pieces[i];\n if (piece.staticValue !== null) {\n // static value ReplacePiece\n result += piece.staticValue;\n continue;\n }\n // match index ReplacePiece\n result += ReplacePattern._substitute(piece.matchIndex, matches);\n }\n return result;\n };\n ReplacePattern._substitute = function (matchIndex, matches) {\n if (matchIndex === 0) {\n return matches[0];\n }\n var remainder = '';\n while (matchIndex > 0) {\n if (matchIndex < matches.length) {\n // A match can be undefined\n var match = (matches[matchIndex] || '');\n return match + remainder;\n }\n remainder = String(matchIndex % 10) + remainder;\n matchIndex = Math.floor(matchIndex / 10);\n }\n return '$' + remainder;\n };\n return ReplacePattern;\n}());\nexport { ReplacePattern };\n/**\n * A replace piece can either be a static string or an index to a specific match.\n */\nvar ReplacePiece = /** @class */ (function () {\n function ReplacePiece(staticValue, matchIndex) {\n this.staticValue = staticValue;\n this.matchIndex = matchIndex;\n }\n ReplacePiece.staticValue = function (value) {\n return new ReplacePiece(value, -1);\n };\n ReplacePiece.matchIndex = function (index) {\n return new ReplacePiece(null, index);\n };\n return ReplacePiece;\n}());\nexport { ReplacePiece };\nvar ReplacePieceBuilder = /** @class */ (function () {\n function ReplacePieceBuilder(source) {\n this._source = source;\n this._lastCharIndex = 0;\n this._result = [];\n this._resultLen = 0;\n this._currentStaticPiece = '';\n }\n ReplacePieceBuilder.prototype.emitUnchanged = function (toCharIndex) {\n this._emitStatic(this._source.substring(this._lastCharIndex, toCharIndex));\n this._lastCharIndex = toCharIndex;\n };\n ReplacePieceBuilder.prototype.emitStatic = function (value, toCharIndex) {\n this._emitStatic(value);\n this._lastCharIndex = toCharIndex;\n };\n ReplacePieceBuilder.prototype._emitStatic = function (value) {\n if (value.length === 0) {\n return;\n }\n this._currentStaticPiece += value;\n };\n ReplacePieceBuilder.prototype.emitMatchIndex = function (index, toCharIndex) {\n if (this._currentStaticPiece.length !== 0) {\n this._result[this._resultLen++] = ReplacePiece.staticValue(this._currentStaticPiece);\n this._currentStaticPiece = '';\n }\n this._result[this._resultLen++] = ReplacePiece.matchIndex(index);\n this._lastCharIndex = toCharIndex;\n };\n ReplacePieceBuilder.prototype.finalize = function () {\n this.emitUnchanged(this._source.length);\n if (this._currentStaticPiece.length !== 0) {\n this._result[this._resultLen++] = ReplacePiece.staticValue(this._currentStaticPiece);\n this._currentStaticPiece = '';\n }\n return new ReplacePattern(this._result);\n };\n return ReplacePieceBuilder;\n}());\n/**\n * \\n\t\t\t=> inserts a LF\n * \\t\t\t\t=> inserts a TAB\n * \\\\\t\t\t=> inserts a \"\\\".\n * $$\t\t\t=> inserts a \"$\".\n * $& and $0\t=> inserts the matched substring.\n * $n\t\t\t=> Where n is a non-negative integer lesser than 100, inserts the nth parenthesized submatch string\n * everything else stays untouched\n *\n * Also see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replace#Specifying_a_string_as_a_parameter\n */\nexport function parseReplaceString(replaceString) {\n if (!replaceString || replaceString.length === 0) {\n return new ReplacePattern(null);\n }\n var result = new ReplacePieceBuilder(replaceString);\n for (var i = 0, len = replaceString.length; i < len; i++) {\n var chCode = replaceString.charCodeAt(i);\n if (chCode === 92 /* Backslash */) {\n // move to next char\n i++;\n if (i >= len) {\n // string ends with a \\\n break;\n }\n var nextChCode = replaceString.charCodeAt(i);\n // let replaceWithCharacter: string = null;\n switch (nextChCode) {\n case 92 /* Backslash */:\n // \\\\ => inserts a \"\\\"\n result.emitUnchanged(i - 1);\n result.emitStatic('\\\\', i + 1);\n break;\n case 110 /* n */:\n // \\n => inserts a LF\n result.emitUnchanged(i - 1);\n result.emitStatic('\\n', i + 1);\n break;\n case 116 /* t */:\n // \\t => inserts a TAB\n result.emitUnchanged(i - 1);\n result.emitStatic('\\t', i + 1);\n break;\n }\n continue;\n }\n if (chCode === 36 /* DollarSign */) {\n // move to next char\n i++;\n if (i >= len) {\n // string ends with a $\n break;\n }\n var nextChCode = replaceString.charCodeAt(i);\n if (nextChCode === 36 /* DollarSign */) {\n // $$ => inserts a \"$\"\n result.emitUnchanged(i - 1);\n result.emitStatic('$', i + 1);\n continue;\n }\n if (nextChCode === 48 /* Digit0 */ || nextChCode === 38 /* Ampersand */) {\n // $& and $0 => inserts the matched substring.\n result.emitUnchanged(i - 1);\n result.emitMatchIndex(0, i + 1);\n continue;\n }\n if (49 /* Digit1 */ <= nextChCode && nextChCode <= 57 /* Digit9 */) {\n // $n\n var matchIndex = nextChCode - 48 /* Digit0 */;\n // peek next char to probe for $nn\n if (i + 1 < len) {\n var nextNextChCode = replaceString.charCodeAt(i + 1);\n if (48 /* Digit0 */ <= nextNextChCode && nextNextChCode <= 57 /* Digit9 */) {\n // $nn\n // move to next char\n i++;\n matchIndex = matchIndex * 10 + (nextNextChCode - 48 /* Digit0 */);\n result.emitUnchanged(i - 2);\n result.emitMatchIndex(matchIndex, i + 1);\n continue;\n }\n }\n result.emitUnchanged(i - 1);\n result.emitMatchIndex(matchIndex, i + 1);\n continue;\n }\n }\n }\n return result.finalize();\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport { Range } from '../../common/core/range';\nimport { ModelDecorationOptions } from '../../common/model/textModel';\nimport { overviewRulerFindMatchForeground } from '../../../platform/theme/common/colorRegistry';\nimport { themeColorFromId } from '../../../platform/theme/common/themeService';\nimport { TrackedRangeStickiness, OverviewRulerLane } from '../../common/model';\nvar FindDecorations = /** @class */ (function () {\n function FindDecorations(editor) {\n this._editor = editor;\n this._decorations = [];\n this._overviewRulerApproximateDecorations = [];\n this._findScopeDecorationId = null;\n this._rangeHighlightDecorationId = null;\n this._highlightedDecorationId = null;\n this._startPosition = this._editor.getPosition();\n }\n FindDecorations.prototype.dispose = function () {\n this._editor.deltaDecorations(this._allDecorations(), []);\n this._editor = null;\n this._decorations = [];\n this._overviewRulerApproximateDecorations = [];\n this._findScopeDecorationId = null;\n this._rangeHighlightDecorationId = null;\n this._highlightedDecorationId = null;\n this._startPosition = null;\n };\n FindDecorations.prototype.reset = function () {\n this._decorations = [];\n this._overviewRulerApproximateDecorations = [];\n this._findScopeDecorationId = null;\n this._rangeHighlightDecorationId = null;\n this._highlightedDecorationId = null;\n };\n FindDecorations.prototype.getCount = function () {\n return this._decorations.length;\n };\n FindDecorations.prototype.getFindScope = function () {\n if (this._findScopeDecorationId) {\n return this._editor.getModel().getDecorationRange(this._findScopeDecorationId);\n }\n return null;\n };\n FindDecorations.prototype.getStartPosition = function () {\n return this._startPosition;\n };\n FindDecorations.prototype.setStartPosition = function (newStartPosition) {\n this._startPosition = newStartPosition;\n this.setCurrentFindMatch(null);\n };\n FindDecorations.prototype._getDecorationIndex = function (decorationId) {\n var index = this._decorations.indexOf(decorationId);\n if (index >= 0) {\n return index + 1;\n }\n return 1;\n };\n FindDecorations.prototype.getCurrentMatchesPosition = function (desiredRange) {\n var candidates = this._editor.getModel().getDecorationsInRange(desiredRange);\n for (var i = 0, len = candidates.length; i < len; i++) {\n var candidate = candidates[i];\n var candidateOpts = candidate.options;\n if (candidateOpts === FindDecorations._FIND_MATCH_DECORATION || candidateOpts === FindDecorations._CURRENT_FIND_MATCH_DECORATION) {\n return this._getDecorationIndex(candidate.id);\n }\n }\n return 1;\n };\n FindDecorations.prototype.setCurrentFindMatch = function (nextMatch) {\n var _this = this;\n var newCurrentDecorationId = null;\n var matchPosition = 0;\n if (nextMatch) {\n for (var i = 0, len = this._decorations.length; i < len; i++) {\n var range = this._editor.getModel().getDecorationRange(this._decorations[i]);\n if (nextMatch.equalsRange(range)) {\n newCurrentDecorationId = this._decorations[i];\n matchPosition = (i + 1);\n break;\n }\n }\n }\n if (this._highlightedDecorationId !== null || newCurrentDecorationId !== null) {\n this._editor.changeDecorations(function (changeAccessor) {\n if (_this._highlightedDecorationId !== null) {\n changeAccessor.changeDecorationOptions(_this._highlightedDecorationId, FindDecorations._FIND_MATCH_DECORATION);\n _this._highlightedDecorationId = null;\n }\n if (newCurrentDecorationId !== null) {\n _this._highlightedDecorationId = newCurrentDecorationId;\n changeAccessor.changeDecorationOptions(_this._highlightedDecorationId, FindDecorations._CURRENT_FIND_MATCH_DECORATION);\n }\n if (_this._rangeHighlightDecorationId !== null) {\n changeAccessor.removeDecoration(_this._rangeHighlightDecorationId);\n _this._rangeHighlightDecorationId = null;\n }\n if (newCurrentDecorationId !== null) {\n var rng = _this._editor.getModel().getDecorationRange(newCurrentDecorationId);\n if (rng.startLineNumber !== rng.endLineNumber && rng.endColumn === 1) {\n var lineBeforeEnd = rng.endLineNumber - 1;\n var lineBeforeEndMaxColumn = _this._editor.getModel().getLineMaxColumn(lineBeforeEnd);\n rng = new Range(rng.startLineNumber, rng.startColumn, lineBeforeEnd, lineBeforeEndMaxColumn);\n }\n _this._rangeHighlightDecorationId = changeAccessor.addDecoration(rng, FindDecorations._RANGE_HIGHLIGHT_DECORATION);\n }\n });\n }\n return matchPosition;\n };\n FindDecorations.prototype.set = function (findMatches, findScope) {\n var _this = this;\n this._editor.changeDecorations(function (accessor) {\n var findMatchesOptions = FindDecorations._FIND_MATCH_DECORATION;\n var newOverviewRulerApproximateDecorations = [];\n if (findMatches.length > 1000) {\n // we go into a mode where the overview ruler gets \"approximate\" decorations\n // the reason is that the overview ruler paints all the decorations in the file and we don't want to cause freezes\n findMatchesOptions = FindDecorations._FIND_MATCH_NO_OVERVIEW_DECORATION;\n // approximate a distance in lines where matches should be merged\n var lineCount = _this._editor.getModel().getLineCount();\n var height = _this._editor.getLayoutInfo().height;\n var approxPixelsPerLine = height / lineCount;\n var mergeLinesDelta = Math.max(2, Math.ceil(3 / approxPixelsPerLine));\n // merge decorations as much as possible\n var prevStartLineNumber = findMatches[0].range.startLineNumber;\n var prevEndLineNumber = findMatches[0].range.endLineNumber;\n for (var i = 1, len = findMatches.length; i < len; i++) {\n var range = findMatches[i].range;\n if (prevEndLineNumber + mergeLinesDelta >= range.startLineNumber) {\n if (range.endLineNumber > prevEndLineNumber) {\n prevEndLineNumber = range.endLineNumber;\n }\n }\n else {\n newOverviewRulerApproximateDecorations.push({\n range: new Range(prevStartLineNumber, 1, prevEndLineNumber, 1),\n options: FindDecorations._FIND_MATCH_ONLY_OVERVIEW_DECORATION\n });\n prevStartLineNumber = range.startLineNumber;\n prevEndLineNumber = range.endLineNumber;\n }\n }\n newOverviewRulerApproximateDecorations.push({\n range: new Range(prevStartLineNumber, 1, prevEndLineNumber, 1),\n options: FindDecorations._FIND_MATCH_ONLY_OVERVIEW_DECORATION\n });\n }\n // Find matches\n var newFindMatchesDecorations = new Array(findMatches.length);\n for (var i = 0, len = findMatches.length; i < len; i++) {\n newFindMatchesDecorations[i] = {\n range: findMatches[i].range,\n options: findMatchesOptions\n };\n }\n _this._decorations = accessor.deltaDecorations(_this._decorations, newFindMatchesDecorations);\n // Overview ruler approximate decorations\n _this._overviewRulerApproximateDecorations = accessor.deltaDecorations(_this._overviewRulerApproximateDecorations, newOverviewRulerApproximateDecorations);\n // Range highlight\n if (_this._rangeHighlightDecorationId) {\n accessor.removeDecoration(_this._rangeHighlightDecorationId);\n _this._rangeHighlightDecorationId = null;\n }\n // Find scope\n if (_this._findScopeDecorationId) {\n accessor.removeDecoration(_this._findScopeDecorationId);\n _this._findScopeDecorationId = null;\n }\n if (findScope) {\n _this._findScopeDecorationId = accessor.addDecoration(findScope, FindDecorations._FIND_SCOPE_DECORATION);\n }\n });\n };\n FindDecorations.prototype.matchBeforePosition = function (position) {\n if (this._decorations.length === 0) {\n return null;\n }\n for (var i = this._decorations.length - 1; i >= 0; i--) {\n var decorationId = this._decorations[i];\n var r = this._editor.getModel().getDecorationRange(decorationId);\n if (!r || r.endLineNumber > position.lineNumber) {\n continue;\n }\n if (r.endLineNumber < position.lineNumber) {\n return r;\n }\n if (r.endColumn > position.column) {\n continue;\n }\n return r;\n }\n return this._editor.getModel().getDecorationRange(this._decorations[this._decorations.length - 1]);\n };\n FindDecorations.prototype.matchAfterPosition = function (position) {\n if (this._decorations.length === 0) {\n return null;\n }\n for (var i = 0, len = this._decorations.length; i < len; i++) {\n var decorationId = this._decorations[i];\n var r = this._editor.getModel().getDecorationRange(decorationId);\n if (!r || r.startLineNumber < position.lineNumber) {\n continue;\n }\n if (r.startLineNumber > position.lineNumber) {\n return r;\n }\n if (r.startColumn < position.column) {\n continue;\n }\n return r;\n }\n return this._editor.getModel().getDecorationRange(this._decorations[0]);\n };\n FindDecorations.prototype._allDecorations = function () {\n var result = [];\n result = result.concat(this._decorations);\n result = result.concat(this._overviewRulerApproximateDecorations);\n if (this._findScopeDecorationId) {\n result.push(this._findScopeDecorationId);\n }\n if (this._rangeHighlightDecorationId) {\n result.push(this._rangeHighlightDecorationId);\n }\n return result;\n };\n FindDecorations._CURRENT_FIND_MATCH_DECORATION = ModelDecorationOptions.register({\n stickiness: TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges,\n zIndex: 13,\n className: 'currentFindMatch',\n showIfCollapsed: true,\n overviewRuler: {\n color: themeColorFromId(overviewRulerFindMatchForeground),\n darkColor: themeColorFromId(overviewRulerFindMatchForeground),\n position: OverviewRulerLane.Center\n }\n });\n FindDecorations._FIND_MATCH_DECORATION = ModelDecorationOptions.register({\n stickiness: TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges,\n className: 'findMatch',\n showIfCollapsed: true,\n overviewRuler: {\n color: themeColorFromId(overviewRulerFindMatchForeground),\n darkColor: themeColorFromId(overviewRulerFindMatchForeground),\n position: OverviewRulerLane.Center\n }\n });\n FindDecorations._FIND_MATCH_NO_OVERVIEW_DECORATION = ModelDecorationOptions.register({\n stickiness: TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges,\n className: 'findMatch',\n showIfCollapsed: true\n });\n FindDecorations._FIND_MATCH_ONLY_OVERVIEW_DECORATION = ModelDecorationOptions.register({\n stickiness: TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges,\n overviewRuler: {\n color: themeColorFromId(overviewRulerFindMatchForeground),\n darkColor: themeColorFromId(overviewRulerFindMatchForeground),\n position: OverviewRulerLane.Center\n }\n });\n FindDecorations._RANGE_HIGHLIGHT_DECORATION = ModelDecorationOptions.register({\n stickiness: TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges,\n className: 'rangeHighlight',\n isWholeLine: true\n });\n FindDecorations._FIND_SCOPE_DECORATION = ModelDecorationOptions.register({\n className: 'findScope',\n isWholeLine: true\n });\n return FindDecorations;\n}());\nexport { FindDecorations };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport { Range } from '../../common/core/range';\nvar ReplaceAllCommand = /** @class */ (function () {\n function ReplaceAllCommand(editorSelection, ranges, replaceStrings) {\n this._editorSelection = editorSelection;\n this._ranges = ranges;\n this._replaceStrings = replaceStrings;\n }\n ReplaceAllCommand.prototype.getEditOperations = function (model, builder) {\n if (this._ranges.length > 0) {\n // Collect all edit operations\n var ops = [];\n for (var i = 0; i < this._ranges.length; i++) {\n ops.push({\n range: this._ranges[i],\n text: this._replaceStrings[i]\n });\n }\n // Sort them in ascending order by range starts\n ops.sort(function (o1, o2) {\n return Range.compareRangesUsingStarts(o1.range, o2.range);\n });\n // Merge operations that touch each other\n var resultOps = [];\n var previousOp = ops[0];\n for (var i = 1; i < ops.length; i++) {\n if (previousOp.range.endLineNumber === ops[i].range.startLineNumber && previousOp.range.endColumn === ops[i].range.startColumn) {\n // These operations are one after another and can be merged\n previousOp.range = previousOp.range.plusRange(ops[i].range);\n previousOp.text = previousOp.text + ops[i].text;\n }\n else {\n resultOps.push(previousOp);\n previousOp = ops[i];\n }\n }\n resultOps.push(previousOp);\n for (var i = 0; i < resultOps.length; i++) {\n builder.addEditOperation(resultOps[i].range, resultOps[i].text);\n }\n }\n this._trackedEditorSelectionId = builder.trackSelection(this._editorSelection);\n };\n ReplaceAllCommand.prototype.computeCursorState = function (model, helper) {\n return helper.getTrackedSelection(this._trackedEditorSelectionId);\n };\n return ReplaceAllCommand;\n}());\nexport { ReplaceAllCommand };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport { RunOnceScheduler, TimeoutTimer } from '../../../base/common/async';\nimport { dispose } from '../../../base/common/lifecycle';\nimport { ReplacePattern, parseReplaceString } from './replacePattern';\nimport { ReplaceCommand, ReplaceCommandThatPreservesSelection } from '../../common/commands/replaceCommand';\nimport { Position } from '../../common/core/position';\nimport { Range } from '../../common/core/range';\nimport { FindDecorations } from './findDecorations';\nimport { ReplaceAllCommand } from './replaceAllCommand';\nimport { Selection } from '../../common/core/selection';\nimport { SearchParams } from '../../common/model/textModelSearch';\nimport { CursorChangeReason } from '../../common/controller/cursorEvents';\nimport { RawContextKey } from '../../../platform/contextkey/common/contextkey';\nimport { EndOfLinePreference } from '../../common/model';\nexport var CONTEXT_FIND_WIDGET_VISIBLE = new RawContextKey('findWidgetVisible', false);\n// Keep ContextKey use of 'Focussed' to not break when clauses\nexport var CONTEXT_FIND_INPUT_FOCUSED = new RawContextKey('findInputFocussed', false);\nexport var CONTEXT_REPLACE_INPUT_FOCUSED = new RawContextKey('replaceInputFocussed', false);\nexport var ToggleCaseSensitiveKeybinding = {\n primary: 512 /* Alt */ | 33 /* KEY_C */,\n mac: { primary: 2048 /* CtrlCmd */ | 512 /* Alt */ | 33 /* KEY_C */ }\n};\nexport var ToggleWholeWordKeybinding = {\n primary: 512 /* Alt */ | 53 /* KEY_W */,\n mac: { primary: 2048 /* CtrlCmd */ | 512 /* Alt */ | 53 /* KEY_W */ }\n};\nexport var ToggleRegexKeybinding = {\n primary: 512 /* Alt */ | 48 /* KEY_R */,\n mac: { primary: 2048 /* CtrlCmd */ | 512 /* Alt */ | 48 /* KEY_R */ }\n};\nexport var ToggleSearchScopeKeybinding = {\n primary: 512 /* Alt */ | 42 /* KEY_L */,\n mac: { primary: 2048 /* CtrlCmd */ | 512 /* Alt */ | 42 /* KEY_L */ }\n};\nexport var FIND_IDS = {\n StartFindAction: 'actions.find',\n StartFindWithSelection: 'actions.findWithSelection',\n NextMatchFindAction: 'editor.action.nextMatchFindAction',\n PreviousMatchFindAction: 'editor.action.previousMatchFindAction',\n NextSelectionMatchFindAction: 'editor.action.nextSelectionMatchFindAction',\n PreviousSelectionMatchFindAction: 'editor.action.previousSelectionMatchFindAction',\n StartFindReplaceAction: 'editor.action.startFindReplaceAction',\n CloseFindWidgetCommand: 'closeFindWidget',\n ToggleCaseSensitiveCommand: 'toggleFindCaseSensitive',\n ToggleWholeWordCommand: 'toggleFindWholeWord',\n ToggleRegexCommand: 'toggleFindRegex',\n ToggleSearchScopeCommand: 'toggleFindInSelection',\n ReplaceOneAction: 'editor.action.replaceOne',\n ReplaceAllAction: 'editor.action.replaceAll',\n SelectAllMatchesAction: 'editor.action.selectAllMatches'\n};\nexport var MATCHES_LIMIT = 19999;\nvar RESEARCH_DELAY = 240;\nvar FindModelBoundToEditorModel = /** @class */ (function () {\n function FindModelBoundToEditorModel(editor, state) {\n var _this = this;\n this._editor = editor;\n this._state = state;\n this._toDispose = [];\n this._isDisposed = false;\n this._startSearchingTimer = new TimeoutTimer();\n this._decorations = new FindDecorations(editor);\n this._toDispose.push(this._decorations);\n this._updateDecorationsScheduler = new RunOnceScheduler(function () { return _this.research(false); }, 100);\n this._toDispose.push(this._updateDecorationsScheduler);\n this._toDispose.push(this._editor.onDidChangeCursorPosition(function (e) {\n if (e.reason === CursorChangeReason.Explicit\n || e.reason === CursorChangeReason.Undo\n || e.reason === CursorChangeReason.Redo) {\n _this._decorations.setStartPosition(_this._editor.getPosition());\n }\n }));\n this._ignoreModelContentChanged = false;\n this._toDispose.push(this._editor.onDidChangeModelContent(function (e) {\n if (_this._ignoreModelContentChanged) {\n return;\n }\n if (e.isFlush) {\n // a model.setValue() was called\n _this._decorations.reset();\n }\n _this._decorations.setStartPosition(_this._editor.getPosition());\n _this._updateDecorationsScheduler.schedule();\n }));\n this._toDispose.push(this._state.onFindReplaceStateChange(function (e) { return _this._onStateChanged(e); }));\n this.research(false, this._state.searchScope);\n }\n FindModelBoundToEditorModel.prototype.dispose = function () {\n this._isDisposed = true;\n dispose(this._startSearchingTimer);\n this._toDispose = dispose(this._toDispose);\n };\n FindModelBoundToEditorModel.prototype._onStateChanged = function (e) {\n var _this = this;\n if (this._isDisposed) {\n // The find model is disposed during a find state changed event\n return;\n }\n if (!this._editor.getModel()) {\n // The find model will be disposed momentarily\n return;\n }\n if (e.searchString || e.isReplaceRevealed || e.isRegex || e.wholeWord || e.matchCase || e.searchScope) {\n var model = this._editor.getModel();\n if (model.isTooLargeForSyncing()) {\n this._startSearchingTimer.cancel();\n this._startSearchingTimer.setIfNotSet(function () {\n if (e.searchScope) {\n _this.research(e.moveCursor, _this._state.searchScope);\n }\n else {\n _this.research(e.moveCursor);\n }\n }, RESEARCH_DELAY);\n }\n else {\n if (e.searchScope) {\n this.research(e.moveCursor, this._state.searchScope);\n }\n else {\n this.research(e.moveCursor);\n }\n }\n }\n };\n FindModelBoundToEditorModel._getSearchRange = function (model, findScope) {\n var searchRange = model.getFullModelRange();\n // If we have set now or before a find scope, use it for computing the search range\n if (findScope) {\n searchRange = searchRange.intersectRanges(findScope);\n }\n return searchRange;\n };\n FindModelBoundToEditorModel.prototype.research = function (moveCursor, newFindScope) {\n var findScope = null;\n if (typeof newFindScope !== 'undefined') {\n findScope = newFindScope;\n }\n else {\n findScope = this._decorations.getFindScope();\n }\n if (findScope !== null) {\n if (findScope.startLineNumber !== findScope.endLineNumber) {\n // multiline find scope => expand to line starts / ends\n findScope = new Range(findScope.startLineNumber, 1, findScope.endLineNumber, this._editor.getModel().getLineMaxColumn(findScope.endLineNumber));\n }\n }\n var findMatches = this._findMatches(findScope, false, MATCHES_LIMIT);\n this._decorations.set(findMatches, findScope);\n this._state.changeMatchInfo(this._decorations.getCurrentMatchesPosition(this._editor.getSelection()), this._decorations.getCount(), undefined);\n if (moveCursor) {\n this._moveToNextMatch(this._decorations.getStartPosition());\n }\n };\n FindModelBoundToEditorModel.prototype._hasMatches = function () {\n return (this._state.matchesCount > 0);\n };\n FindModelBoundToEditorModel.prototype._cannotFind = function () {\n if (!this._hasMatches()) {\n var findScope = this._decorations.getFindScope();\n if (findScope) {\n // Reveal the selection so user is reminded that 'selection find' is on.\n this._editor.revealRangeInCenterIfOutsideViewport(findScope, 0 /* Smooth */);\n }\n return true;\n }\n return false;\n };\n FindModelBoundToEditorModel.prototype._setCurrentFindMatch = function (match) {\n var matchesPosition = this._decorations.setCurrentFindMatch(match);\n this._state.changeMatchInfo(matchesPosition, this._decorations.getCount(), match);\n this._editor.setSelection(match);\n this._editor.revealRangeInCenterIfOutsideViewport(match, 0 /* Smooth */);\n };\n FindModelBoundToEditorModel.prototype._prevSearchPosition = function (before) {\n var isUsingLineStops = this._state.isRegex && (this._state.searchString.indexOf('^') >= 0\n || this._state.searchString.indexOf('$') >= 0);\n var lineNumber = before.lineNumber, column = before.column;\n var model = this._editor.getModel();\n if (isUsingLineStops || column === 1) {\n if (lineNumber === 1) {\n lineNumber = model.getLineCount();\n }\n else {\n lineNumber--;\n }\n column = model.getLineMaxColumn(lineNumber);\n }\n else {\n column--;\n }\n return new Position(lineNumber, column);\n };\n FindModelBoundToEditorModel.prototype._moveToPrevMatch = function (before, isRecursed) {\n if (isRecursed === void 0) { isRecursed = false; }\n if (this._decorations.getCount() < MATCHES_LIMIT) {\n var prevMatchRange = this._decorations.matchBeforePosition(before);\n if (prevMatchRange && prevMatchRange.isEmpty() && prevMatchRange.getStartPosition().equals(before)) {\n before = this._prevSearchPosition(before);\n prevMatchRange = this._decorations.matchBeforePosition(before);\n }\n if (prevMatchRange) {\n this._setCurrentFindMatch(prevMatchRange);\n }\n return;\n }\n if (this._cannotFind()) {\n return;\n }\n var findScope = this._decorations.getFindScope();\n var searchRange = FindModelBoundToEditorModel._getSearchRange(this._editor.getModel(), findScope);\n // ...(----)...|...\n if (searchRange.getEndPosition().isBefore(before)) {\n before = searchRange.getEndPosition();\n }\n // ...|...(----)...\n if (before.isBefore(searchRange.getStartPosition())) {\n before = searchRange.getEndPosition();\n }\n var lineNumber = before.lineNumber, column = before.column;\n var model = this._editor.getModel();\n var position = new Position(lineNumber, column);\n var prevMatch = model.findPreviousMatch(this._state.searchString, position, this._state.isRegex, this._state.matchCase, this._state.wholeWord ? this._editor.getConfiguration().wordSeparators : null, false);\n if (prevMatch && prevMatch.range.isEmpty() && prevMatch.range.getStartPosition().equals(position)) {\n // Looks like we're stuck at this position, unacceptable!\n position = this._prevSearchPosition(position);\n prevMatch = model.findPreviousMatch(this._state.searchString, position, this._state.isRegex, this._state.matchCase, this._state.wholeWord ? this._editor.getConfiguration().wordSeparators : null, false);\n }\n if (!prevMatch) {\n // there is precisely one match and selection is on top of it\n return null;\n }\n if (!isRecursed && !searchRange.containsRange(prevMatch.range)) {\n return this._moveToPrevMatch(prevMatch.range.getStartPosition(), true);\n }\n this._setCurrentFindMatch(prevMatch.range);\n };\n FindModelBoundToEditorModel.prototype.moveToPrevMatch = function () {\n this._moveToPrevMatch(this._editor.getSelection().getStartPosition());\n };\n FindModelBoundToEditorModel.prototype._nextSearchPosition = function (after) {\n var isUsingLineStops = this._state.isRegex && (this._state.searchString.indexOf('^') >= 0\n || this._state.searchString.indexOf('$') >= 0);\n var lineNumber = after.lineNumber, column = after.column;\n var model = this._editor.getModel();\n if (isUsingLineStops || column === model.getLineMaxColumn(lineNumber)) {\n if (lineNumber === model.getLineCount()) {\n lineNumber = 1;\n }\n else {\n lineNumber++;\n }\n column = 1;\n }\n else {\n column++;\n }\n return new Position(lineNumber, column);\n };\n FindModelBoundToEditorModel.prototype._moveToNextMatch = function (after) {\n if (this._decorations.getCount() < MATCHES_LIMIT) {\n var nextMatchRange = this._decorations.matchAfterPosition(after);\n if (nextMatchRange && nextMatchRange.isEmpty() && nextMatchRange.getStartPosition().equals(after)) {\n // Looks like we're stuck at this position, unacceptable!\n after = this._nextSearchPosition(after);\n nextMatchRange = this._decorations.matchAfterPosition(after);\n }\n if (nextMatchRange) {\n this._setCurrentFindMatch(nextMatchRange);\n }\n return;\n }\n var nextMatch = this._getNextMatch(after, false, true);\n if (nextMatch) {\n this._setCurrentFindMatch(nextMatch.range);\n }\n };\n FindModelBoundToEditorModel.prototype._getNextMatch = function (after, captureMatches, forceMove, isRecursed) {\n if (isRecursed === void 0) { isRecursed = false; }\n if (this._cannotFind()) {\n return null;\n }\n var findScope = this._decorations.getFindScope();\n var searchRange = FindModelBoundToEditorModel._getSearchRange(this._editor.getModel(), findScope);\n // ...(----)...|...\n if (searchRange.getEndPosition().isBefore(after)) {\n after = searchRange.getStartPosition();\n }\n // ...|...(----)...\n if (after.isBefore(searchRange.getStartPosition())) {\n after = searchRange.getStartPosition();\n }\n var lineNumber = after.lineNumber, column = after.column;\n var model = this._editor.getModel();\n var position = new Position(lineNumber, column);\n var nextMatch = model.findNextMatch(this._state.searchString, position, this._state.isRegex, this._state.matchCase, this._state.wholeWord ? this._editor.getConfiguration().wordSeparators : null, captureMatches);\n if (forceMove && nextMatch && nextMatch.range.isEmpty() && nextMatch.range.getStartPosition().equals(position)) {\n // Looks like we're stuck at this position, unacceptable!\n position = this._nextSearchPosition(position);\n nextMatch = model.findNextMatch(this._state.searchString, position, this._state.isRegex, this._state.matchCase, this._state.wholeWord ? this._editor.getConfiguration().wordSeparators : null, captureMatches);\n }\n if (!nextMatch) {\n // there is precisely one match and selection is on top of it\n return null;\n }\n if (!isRecursed && !searchRange.containsRange(nextMatch.range)) {\n return this._getNextMatch(nextMatch.range.getEndPosition(), captureMatches, forceMove, true);\n }\n return nextMatch;\n };\n FindModelBoundToEditorModel.prototype.moveToNextMatch = function () {\n this._moveToNextMatch(this._editor.getSelection().getEndPosition());\n };\n FindModelBoundToEditorModel.prototype._getReplacePattern = function () {\n if (this._state.isRegex) {\n return parseReplaceString(this._state.replaceString);\n }\n return ReplacePattern.fromStaticValue(this._state.replaceString);\n };\n FindModelBoundToEditorModel.prototype.replace = function () {\n if (!this._hasMatches()) {\n return;\n }\n var replacePattern = this._getReplacePattern();\n var selection = this._editor.getSelection();\n var nextMatch = this._getNextMatch(selection.getStartPosition(), replacePattern.hasReplacementPatterns, false);\n if (nextMatch) {\n if (selection.equalsRange(nextMatch.range)) {\n // selection sits on a find match => replace it!\n var replaceString = replacePattern.buildReplaceString(nextMatch.matches);\n var command = new ReplaceCommand(selection, replaceString);\n this._executeEditorCommand('replace', command);\n this._decorations.setStartPosition(new Position(selection.startLineNumber, selection.startColumn + replaceString.length));\n this.research(true);\n }\n else {\n this._decorations.setStartPosition(this._editor.getPosition());\n this._setCurrentFindMatch(nextMatch.range);\n }\n }\n };\n FindModelBoundToEditorModel.prototype._findMatches = function (findScope, captureMatches, limitResultCount) {\n var searchRange = FindModelBoundToEditorModel._getSearchRange(this._editor.getModel(), findScope);\n return this._editor.getModel().findMatches(this._state.searchString, searchRange, this._state.isRegex, this._state.matchCase, this._state.wholeWord ? this._editor.getConfiguration().wordSeparators : null, captureMatches, limitResultCount);\n };\n FindModelBoundToEditorModel.prototype.replaceAll = function () {\n if (!this._hasMatches()) {\n return;\n }\n var findScope = this._decorations.getFindScope();\n if (findScope === null && this._state.matchesCount >= MATCHES_LIMIT) {\n // Doing a replace on the entire file that is over ${MATCHES_LIMIT} matches\n this._largeReplaceAll();\n }\n else {\n this._regularReplaceAll(findScope);\n }\n this.research(false);\n };\n FindModelBoundToEditorModel.prototype._largeReplaceAll = function () {\n var searchParams = new SearchParams(this._state.searchString, this._state.isRegex, this._state.matchCase, this._state.wholeWord ? this._editor.getConfiguration().wordSeparators : null);\n var searchData = searchParams.parseSearchRequest();\n if (!searchData) {\n return;\n }\n var searchRegex = searchData.regex;\n if (!searchRegex.multiline) {\n var mod = 'm';\n if (searchRegex.ignoreCase) {\n mod += 'i';\n }\n if (searchRegex.global) {\n mod += 'g';\n }\n searchRegex = new RegExp(searchRegex.source, mod);\n }\n var model = this._editor.getModel();\n var modelText = model.getValue(EndOfLinePreference.LF);\n var fullModelRange = model.getFullModelRange();\n var replacePattern = this._getReplacePattern();\n var resultText;\n if (replacePattern.hasReplacementPatterns) {\n resultText = modelText.replace(searchRegex, function () {\n return replacePattern.buildReplaceString(arguments);\n });\n }\n else {\n resultText = modelText.replace(searchRegex, replacePattern.buildReplaceString(null));\n }\n var command = new ReplaceCommandThatPreservesSelection(fullModelRange, resultText, this._editor.getSelection());\n this._executeEditorCommand('replaceAll', command);\n };\n FindModelBoundToEditorModel.prototype._regularReplaceAll = function (findScope) {\n var replacePattern = this._getReplacePattern();\n // Get all the ranges (even more than the highlighted ones)\n var matches = this._findMatches(findScope, replacePattern.hasReplacementPatterns, 1073741824 /* MAX_SAFE_SMALL_INTEGER */);\n var replaceStrings = [];\n for (var i = 0, len = matches.length; i < len; i++) {\n replaceStrings[i] = replacePattern.buildReplaceString(matches[i].matches);\n }\n var command = new ReplaceAllCommand(this._editor.getSelection(), matches.map(function (m) { return m.range; }), replaceStrings);\n this._executeEditorCommand('replaceAll', command);\n };\n FindModelBoundToEditorModel.prototype.selectAllMatches = function () {\n if (!this._hasMatches()) {\n return;\n }\n var findScope = this._decorations.getFindScope();\n // Get all the ranges (even more than the highlighted ones)\n var matches = this._findMatches(findScope, false, 1073741824 /* MAX_SAFE_SMALL_INTEGER */);\n var selections = matches.map(function (m) { return new Selection(m.range.startLineNumber, m.range.startColumn, m.range.endLineNumber, m.range.endColumn); });\n // If one of the ranges is the editor selection, then maintain it as primary\n var editorSelection = this._editor.getSelection();\n for (var i = 0, len = selections.length; i < len; i++) {\n var sel = selections[i];\n if (sel.equalsRange(editorSelection)) {\n selections = [editorSelection].concat(selections.slice(0, i)).concat(selections.slice(i + 1));\n break;\n }\n }\n this._editor.setSelections(selections);\n };\n FindModelBoundToEditorModel.prototype._executeEditorCommand = function (source, command) {\n try {\n this._ignoreModelContentChanged = true;\n this._editor.pushUndoStop();\n this._editor.executeCommand(source, command);\n this._editor.pushUndoStop();\n }\n finally {\n this._ignoreModelContentChanged = false;\n }\n };\n return FindModelBoundToEditorModel;\n}());\nexport { FindModelBoundToEditorModel };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport { Emitter } from '../../../base/common/event';\nimport { Range } from '../../common/core/range';\nfunction effectiveOptionValue(override, value) {\n if (override === 1 /* True */) {\n return true;\n }\n if (override === 2 /* False */) {\n return false;\n }\n return value;\n}\nvar FindReplaceState = /** @class */ (function () {\n function FindReplaceState() {\n this._searchString = '';\n this._replaceString = '';\n this._isRevealed = false;\n this._isReplaceRevealed = false;\n this._isRegex = false;\n this._isRegexOverride = 0 /* NotSet */;\n this._wholeWord = false;\n this._wholeWordOverride = 0 /* NotSet */;\n this._matchCase = false;\n this._matchCaseOverride = 0 /* NotSet */;\n this._searchScope = null;\n this._matchesPosition = 0;\n this._matchesCount = 0;\n this._currentMatch = null;\n this._onFindReplaceStateChange = new Emitter();\n }\n Object.defineProperty(FindReplaceState.prototype, \"searchString\", {\n get: function () { return this._searchString; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(FindReplaceState.prototype, \"replaceString\", {\n get: function () { return this._replaceString; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(FindReplaceState.prototype, \"isRevealed\", {\n get: function () { return this._isRevealed; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(FindReplaceState.prototype, \"isReplaceRevealed\", {\n get: function () { return this._isReplaceRevealed; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(FindReplaceState.prototype, \"isRegex\", {\n get: function () { return effectiveOptionValue(this._isRegexOverride, this._isRegex); },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(FindReplaceState.prototype, \"wholeWord\", {\n get: function () { return effectiveOptionValue(this._wholeWordOverride, this._wholeWord); },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(FindReplaceState.prototype, \"matchCase\", {\n get: function () { return effectiveOptionValue(this._matchCaseOverride, this._matchCase); },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(FindReplaceState.prototype, \"actualIsRegex\", {\n get: function () { return this._isRegex; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(FindReplaceState.prototype, \"actualWholeWord\", {\n get: function () { return this._wholeWord; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(FindReplaceState.prototype, \"actualMatchCase\", {\n get: function () { return this._matchCase; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(FindReplaceState.prototype, \"searchScope\", {\n get: function () { return this._searchScope; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(FindReplaceState.prototype, \"matchesPosition\", {\n get: function () { return this._matchesPosition; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(FindReplaceState.prototype, \"matchesCount\", {\n get: function () { return this._matchesCount; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(FindReplaceState.prototype, \"currentMatch\", {\n get: function () { return this._currentMatch; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(FindReplaceState.prototype, \"onFindReplaceStateChange\", {\n get: function () { return this._onFindReplaceStateChange.event; },\n enumerable: true,\n configurable: true\n });\n FindReplaceState.prototype.dispose = function () {\n };\n FindReplaceState.prototype.changeMatchInfo = function (matchesPosition, matchesCount, currentMatch) {\n var changeEvent = {\n moveCursor: false,\n updateHistory: false,\n searchString: false,\n replaceString: false,\n isRevealed: false,\n isReplaceRevealed: false,\n isRegex: false,\n wholeWord: false,\n matchCase: false,\n searchScope: false,\n matchesPosition: false,\n matchesCount: false,\n currentMatch: false\n };\n var somethingChanged = false;\n if (matchesCount === 0) {\n matchesPosition = 0;\n }\n if (matchesPosition > matchesCount) {\n matchesPosition = matchesCount;\n }\n if (this._matchesPosition !== matchesPosition) {\n this._matchesPosition = matchesPosition;\n changeEvent.matchesPosition = true;\n somethingChanged = true;\n }\n if (this._matchesCount !== matchesCount) {\n this._matchesCount = matchesCount;\n changeEvent.matchesCount = true;\n somethingChanged = true;\n }\n if (typeof currentMatch !== 'undefined') {\n if (!Range.equalsRange(this._currentMatch, currentMatch)) {\n this._currentMatch = currentMatch;\n changeEvent.currentMatch = true;\n somethingChanged = true;\n }\n }\n if (somethingChanged) {\n this._onFindReplaceStateChange.fire(changeEvent);\n }\n };\n FindReplaceState.prototype.change = function (newState, moveCursor, updateHistory) {\n if (updateHistory === void 0) { updateHistory = true; }\n var changeEvent = {\n moveCursor: moveCursor,\n updateHistory: updateHistory,\n searchString: false,\n replaceString: false,\n isRevealed: false,\n isReplaceRevealed: false,\n isRegex: false,\n wholeWord: false,\n matchCase: false,\n searchScope: false,\n matchesPosition: false,\n matchesCount: false,\n currentMatch: false\n };\n var somethingChanged = false;\n var oldEffectiveIsRegex = this.isRegex;\n var oldEffectiveWholeWords = this.wholeWord;\n var oldEffectiveMatchCase = this.matchCase;\n if (typeof newState.searchString !== 'undefined') {\n if (this._searchString !== newState.searchString) {\n this._searchString = newState.searchString;\n changeEvent.searchString = true;\n somethingChanged = true;\n }\n }\n if (typeof newState.replaceString !== 'undefined') {\n if (this._replaceString !== newState.replaceString) {\n this._replaceString = newState.replaceString;\n changeEvent.replaceString = true;\n somethingChanged = true;\n }\n }\n if (typeof newState.isRevealed !== 'undefined') {\n if (this._isRevealed !== newState.isRevealed) {\n this._isRevealed = newState.isRevealed;\n changeEvent.isRevealed = true;\n somethingChanged = true;\n }\n }\n if (typeof newState.isReplaceRevealed !== 'undefined') {\n if (this._isReplaceRevealed !== newState.isReplaceRevealed) {\n this._isReplaceRevealed = newState.isReplaceRevealed;\n changeEvent.isReplaceRevealed = true;\n somethingChanged = true;\n }\n }\n if (typeof newState.isRegex !== 'undefined') {\n this._isRegex = newState.isRegex;\n }\n if (typeof newState.wholeWord !== 'undefined') {\n this._wholeWord = newState.wholeWord;\n }\n if (typeof newState.matchCase !== 'undefined') {\n this._matchCase = newState.matchCase;\n }\n if (typeof newState.searchScope !== 'undefined') {\n if (!Range.equalsRange(this._searchScope, newState.searchScope)) {\n this._searchScope = newState.searchScope;\n changeEvent.searchScope = true;\n somethingChanged = true;\n }\n }\n // Overrides get set when they explicitly come in and get reset anytime something else changes\n this._isRegexOverride = (typeof newState.isRegexOverride !== 'undefined' ? newState.isRegexOverride : 0 /* NotSet */);\n this._wholeWordOverride = (typeof newState.wholeWordOverride !== 'undefined' ? newState.wholeWordOverride : 0 /* NotSet */);\n this._matchCaseOverride = (typeof newState.matchCaseOverride !== 'undefined' ? newState.matchCaseOverride : 0 /* NotSet */);\n if (oldEffectiveIsRegex !== this.isRegex) {\n somethingChanged = true;\n changeEvent.isRegex = true;\n }\n if (oldEffectiveWholeWords !== this.wholeWord) {\n somethingChanged = true;\n changeEvent.wholeWord = true;\n }\n if (oldEffectiveMatchCase !== this.matchCase) {\n somethingChanged = true;\n changeEvent.matchCase = true;\n }\n if (somethingChanged) {\n this._onFindReplaceStateChange.fire(changeEvent);\n }\n };\n return FindReplaceState;\n}());\nexport { FindReplaceState };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport { createDecorator } from '../../instantiation/common/instantiation';\nexport var ID = 'storageService';\nexport var IStorageService = createDecorator(ID);\nexport var StorageScope;\n(function (StorageScope) {\n /**\n * The stored data will be scoped to all workspaces of this domain.\n */\n StorageScope[StorageScope[\"GLOBAL\"] = 0] = \"GLOBAL\";\n /**\n * The stored data will be scoped to the current workspace.\n */\n StorageScope[StorageScope[\"WORKSPACE\"] = 1] = \"WORKSPACE\";\n})(StorageScope || (StorageScope = {}));\nexport var NullStorageService = {\n _serviceBrand: undefined,\n store: function () { return undefined; },\n remove: function () { return undefined; },\n get: function (a, b, defaultValue) { return defaultValue; },\n getInteger: function (a, b, defaultValue) { return defaultValue; },\n getBoolean: function (a, b, defaultValue) { return defaultValue; }\n};\n","/**\n * marked - a markdown parser\n * Copyright (c) 2011-2014, Christopher Jeffrey. (MIT Licensed)\n * https://github.com/markedjs/marked\n */\n\nvar __marked_exports;\n\n; (function (root) {\n'use strict';\n\n/**\n * Block-Level Grammar\n */\n\nvar block = {\n newline: /^\\n+/,\n code: /^( {4}[^\\n]+\\n*)+/,\n fences: noop,\n hr: /^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)/,\n heading: /^ *(#{1,6}) *([^\\n]+?) *(?:#+ *)?(?:\\n+|$)/,\n nptable: noop,\n blockquote: /^( {0,3}> ?(paragraph|[^\\n]*)(?:\\n|$))+/,\n list: /^( *)(bull) [\\s\\S]+?(?:hr|def|\\n{2,}(?! )(?!\\1bull )\\n*|\\s*$)/,\n html: '^ {0,3}(?:' // optional indentation\n + '<(script|pre|style)[\\\\s>][\\\\s\\\\S]*?(?:[^\\\\n]*\\\\n+|$)' // (1)\n + '|comment[^\\\\n]*(\\\\n+|$)' // (2)\n + '|<\\\\?[\\\\s\\\\S]*?\\\\?>\\\\n*' // (3)\n + '|\\\\n*' // (4)\n + '|\\\\n*' // (5)\n + '|)[\\\\s\\\\S]*?(?:\\\\n{2,}|$)' // (6)\n + '|<(?!script|pre|style)([a-z][\\\\w-]*)(?:attribute)*? */?>(?=\\\\h*\\\\n)[\\\\s\\\\S]*?(?:\\\\n{2,}|$)' // (7) open tag\n + '|(?=\\\\h*\\\\n)[\\\\s\\\\S]*?(?:\\\\n{2,}|$)' // (7) closing tag\n + ')',\n def: /^ {0,3}\\[(label)\\]: *\\n? *]+)>?(?:(?: +\\n? *| *\\n *)(title))? *(?:\\n+|$)/,\n table: noop,\n lheading: /^([^\\n]+)\\n *(=|-){2,} *(?:\\n+|$)/,\n paragraph: /^([^\\n]+(?:\\n(?!hr|heading|lheading| {0,3}>|<\\/?(?:tag)(?: +|\\n|\\/?>)|<(?:script|pre|style|!--))[^\\n]+)*)/,\n text: /^[^\\n]+/\n};\n\nblock._label = /(?!\\s*\\])(?:\\\\[\\[\\]]|[^\\[\\]])+/;\nblock._title = /(?:\"(?:\\\\\"?|[^\"\\\\])*\"|'[^'\\n]*(?:\\n[^'\\n]+)*\\n?'|\\([^()]*\\))/;\nblock.def = edit(block.def)\n .replace('label', block._label)\n .replace('title', block._title)\n .getRegex();\n\nblock.bullet = /(?:[*+-]|\\d+\\.)/;\nblock.item = /^( *)(bull) [^\\n]*(?:\\n(?!\\1bull )[^\\n]*)*/;\nblock.item = edit(block.item, 'gm')\n .replace(/bull/g, block.bullet)\n .getRegex();\n\nblock.list = edit(block.list)\n .replace(/bull/g, block.bullet)\n .replace('hr', '\\\\n+(?=\\\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\\\* *){3,})(?:\\\\n+|$))')\n .replace('def', '\\\\n+(?=' + block.def.source + ')')\n .getRegex();\n\nblock._tag = 'address|article|aside|base|basefont|blockquote|body|caption'\n + '|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption'\n + '|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe'\n + '|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option'\n + '|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr'\n + '|track|ul';\nblock._comment = //;\nblock.html = edit(block.html, 'i')\n .replace('comment', block._comment)\n .replace('tag', block._tag)\n .replace('attribute', / +[a-zA-Z:_][\\w.:-]*(?: *= *\"[^\"\\n]*\"| *= *'[^'\\n]*'| *= *[^\\s\"'=<>`]+)?/)\n .getRegex();\n\nblock.paragraph = edit(block.paragraph)\n .replace('hr', block.hr)\n .replace('heading', block.heading)\n .replace('lheading', block.lheading)\n .replace('tag', block._tag) // pars can be interrupted by type (6) html blocks\n .getRegex();\n\nblock.blockquote = edit(block.blockquote)\n .replace('paragraph', block.paragraph)\n .getRegex();\n\n/**\n * Normal Block Grammar\n */\n\nblock.normal = merge({}, block);\n\n/**\n * GFM Block Grammar\n */\n\nblock.gfm = merge({}, block.normal, {\n fences: /^ *(`{3,}|~{3,})[ \\.]*(\\S+)? *\\n([\\s\\S]*?)\\n? *\\1 *(?:\\n+|$)/,\n paragraph: /^/,\n heading: /^ *(#{1,6}) +([^\\n]+?) *#* *(?:\\n+|$)/\n});\n\nblock.gfm.paragraph = edit(block.paragraph)\n .replace('(?!', '(?!'\n + block.gfm.fences.source.replace('\\\\1', '\\\\2') + '|'\n + block.list.source.replace('\\\\1', '\\\\3') + '|')\n .getRegex();\n\n/**\n * GFM + Tables Block Grammar\n */\n\nblock.tables = merge({}, block.gfm, {\n nptable: /^ *([^|\\n ].*\\|.*)\\n *([-:]+ *\\|[-| :]*)(?:\\n((?:.*[^>\\n ].*(?:\\n|$))*)\\n*|$)/,\n table: /^ *\\|(.+)\\n *\\|?( *[-:]+[-| :]*)(?:\\n((?: *[^>\\n ].*(?:\\n|$))*)\\n*|$)/\n});\n\n/**\n * Pedantic grammar\n */\n\nblock.pedantic = merge({}, block.normal, {\n html: edit(\n '^ *(?:comment *(?:\\\\n|\\\\s*$)'\n + '|<(tag)[\\\\s\\\\S]+? *(?:\\\\n{2,}|\\\\s*$)' // closed tag\n + '|\\\\s]*)*?/?> *(?:\\\\n{2,}|\\\\s*$))')\n .replace('comment', block._comment)\n .replace(/tag/g, '(?!(?:'\n + 'a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub'\n + '|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)'\n + '\\\\b)\\\\w+(?!:|[^\\\\w\\\\s@]*@)\\\\b')\n .getRegex(),\n def: /^ *\\[([^\\]]+)\\]: *]+)>?(?: +([\"(][^\\n]+[\")]))? *(?:\\n+|$)/\n});\n\n/**\n * Block Lexer\n */\n\nfunction Lexer(options) {\n this.tokens = [];\n this.tokens.links = {};\n this.options = options || marked.defaults;\n this.rules = block.normal;\n\n if (this.options.pedantic) {\n this.rules = block.pedantic;\n } else if (this.options.gfm) {\n if (this.options.tables) {\n this.rules = block.tables;\n } else {\n this.rules = block.gfm;\n }\n }\n}\n\n/**\n * Expose Block Rules\n */\n\nLexer.rules = block;\n\n/**\n * Static Lex Method\n */\n\nLexer.lex = function(src, options) {\n var lexer = new Lexer(options);\n return lexer.lex(src);\n};\n\n/**\n * Preprocessing\n */\n\nLexer.prototype.lex = function(src) {\n src = src\n .replace(/\\r\\n|\\r/g, '\\n')\n .replace(/\\t/g, ' ')\n .replace(/\\u00a0/g, ' ')\n .replace(/\\u2424/g, '\\n');\n\n return this.token(src, true);\n};\n\n/**\n * Lexing\n */\n\nLexer.prototype.token = function(src, top) {\n src = src.replace(/^ +$/gm, '');\n var next,\n loose,\n cap,\n bull,\n b,\n item,\n space,\n i,\n tag,\n l,\n isordered,\n istask,\n ischecked;\n\n while (src) {\n // newline\n if (cap = this.rules.newline.exec(src)) {\n src = src.substring(cap[0].length);\n if (cap[0].length > 1) {\n this.tokens.push({\n type: 'space'\n });\n }\n }\n\n // code\n if (cap = this.rules.code.exec(src)) {\n src = src.substring(cap[0].length);\n cap = cap[0].replace(/^ {4}/gm, '');\n this.tokens.push({\n type: 'code',\n text: !this.options.pedantic\n ? rtrim(cap, '\\n')\n : cap\n });\n continue;\n }\n\n // fences (gfm)\n if (cap = this.rules.fences.exec(src)) {\n src = src.substring(cap[0].length);\n this.tokens.push({\n type: 'code',\n lang: cap[2],\n text: cap[3] || ''\n });\n continue;\n }\n\n // heading\n if (cap = this.rules.heading.exec(src)) {\n src = src.substring(cap[0].length);\n this.tokens.push({\n type: 'heading',\n depth: cap[1].length,\n text: cap[2]\n });\n continue;\n }\n\n // table no leading pipe (gfm)\n if (top && (cap = this.rules.nptable.exec(src))) {\n item = {\n type: 'table',\n header: splitCells(cap[1].replace(/^ *| *\\| *$/g, '')),\n align: cap[2].replace(/^ *|\\| *$/g, '').split(/ *\\| */),\n cells: cap[3] ? cap[3].replace(/\\n$/, '').split('\\n') : []\n };\n\n if (item.header.length === item.align.length) {\n src = src.substring(cap[0].length);\n\n for (i = 0; i < item.align.length; i++) {\n if (/^ *-+: *$/.test(item.align[i])) {\n item.align[i] = 'right';\n } else if (/^ *:-+: *$/.test(item.align[i])) {\n item.align[i] = 'center';\n } else if (/^ *:-+ *$/.test(item.align[i])) {\n item.align[i] = 'left';\n } else {\n item.align[i] = null;\n }\n }\n\n for (i = 0; i < item.cells.length; i++) {\n item.cells[i] = splitCells(item.cells[i], item.header.length);\n }\n\n this.tokens.push(item);\n\n continue;\n }\n }\n\n // hr\n if (cap = this.rules.hr.exec(src)) {\n src = src.substring(cap[0].length);\n this.tokens.push({\n type: 'hr'\n });\n continue;\n }\n\n // blockquote\n if (cap = this.rules.blockquote.exec(src)) {\n src = src.substring(cap[0].length);\n\n this.tokens.push({\n type: 'blockquote_start'\n });\n\n cap = cap[0].replace(/^ *> ?/gm, '');\n\n // Pass `top` to keep the current\n // \"toplevel\" state. This is exactly\n // how markdown.pl works.\n this.token(cap, top);\n\n this.tokens.push({\n type: 'blockquote_end'\n });\n\n continue;\n }\n\n // list\n if (cap = this.rules.list.exec(src)) {\n src = src.substring(cap[0].length);\n bull = cap[2];\n isordered = bull.length > 1;\n\n this.tokens.push({\n type: 'list_start',\n ordered: isordered,\n start: isordered ? +bull : ''\n });\n\n // Get each top-level item.\n cap = cap[0].match(this.rules.item);\n\n next = false;\n l = cap.length;\n i = 0;\n\n for (; i < l; i++) {\n item = cap[i];\n\n // Remove the list item's bullet\n // so it is seen as the next token.\n space = item.length;\n item = item.replace(/^ *([*+-]|\\d+\\.) +/, '');\n\n // Outdent whatever the\n // list item contains. Hacky.\n if (~item.indexOf('\\n ')) {\n space -= item.length;\n item = !this.options.pedantic\n ? item.replace(new RegExp('^ {1,' + space + '}', 'gm'), '')\n : item.replace(/^ {1,4}/gm, '');\n }\n\n // Determine whether the next list item belongs here.\n // Backpedal if it does not belong in this list.\n if (this.options.smartLists && i !== l - 1) {\n b = block.bullet.exec(cap[i + 1])[0];\n if (bull !== b && !(bull.length > 1 && b.length > 1)) {\n src = cap.slice(i + 1).join('\\n') + src;\n i = l - 1;\n }\n }\n\n // Determine whether item is loose or not.\n // Use: /(^|\\n)(?! )[^\\n]+\\n\\n(?!\\s*$)/\n // for discount behavior.\n loose = next || /\\n\\n(?!\\s*$)/.test(item);\n if (i !== l - 1) {\n next = item.charAt(item.length - 1) === '\\n';\n if (!loose) loose = next;\n }\n\n // Check for task list items\n istask = /^\\[[ xX]\\] /.test(item);\n ischecked = undefined;\n if (istask) {\n ischecked = item[1] !== ' ';\n item = item.replace(/^\\[[ xX]\\] +/, '');\n }\n\n this.tokens.push({\n type: loose\n ? 'loose_item_start'\n : 'list_item_start',\n task: istask,\n checked: ischecked\n });\n\n // Recurse.\n this.token(item, false);\n\n this.tokens.push({\n type: 'list_item_end'\n });\n }\n\n this.tokens.push({\n type: 'list_end'\n });\n\n continue;\n }\n\n // html\n if (cap = this.rules.html.exec(src)) {\n src = src.substring(cap[0].length);\n this.tokens.push({\n type: this.options.sanitize\n ? 'paragraph'\n : 'html',\n pre: !this.options.sanitizer\n && (cap[1] === 'pre' || cap[1] === 'script' || cap[1] === 'style'),\n text: cap[0]\n });\n continue;\n }\n\n // def\n if (top && (cap = this.rules.def.exec(src))) {\n src = src.substring(cap[0].length);\n if (cap[3]) cap[3] = cap[3].substring(1, cap[3].length - 1);\n tag = cap[1].toLowerCase().replace(/\\s+/g, ' ');\n if (!this.tokens.links[tag]) {\n this.tokens.links[tag] = {\n href: cap[2],\n title: cap[3]\n };\n }\n continue;\n }\n\n // table (gfm)\n if (top && (cap = this.rules.table.exec(src))) {\n item = {\n type: 'table',\n header: splitCells(cap[1].replace(/^ *| *\\| *$/g, '')),\n align: cap[2].replace(/^ *|\\| *$/g, '').split(/ *\\| */),\n cells: cap[3] ? cap[3].replace(/(?: *\\| *)?\\n$/, '').split('\\n') : []\n };\n\n if (item.header.length === item.align.length) {\n src = src.substring(cap[0].length);\n\n for (i = 0; i < item.align.length; i++) {\n if (/^ *-+: *$/.test(item.align[i])) {\n item.align[i] = 'right';\n } else if (/^ *:-+: *$/.test(item.align[i])) {\n item.align[i] = 'center';\n } else if (/^ *:-+ *$/.test(item.align[i])) {\n item.align[i] = 'left';\n } else {\n item.align[i] = null;\n }\n }\n\n for (i = 0; i < item.cells.length; i++) {\n item.cells[i] = splitCells(\n item.cells[i].replace(/^ *\\| *| *\\| *$/g, ''),\n item.header.length);\n }\n\n this.tokens.push(item);\n\n continue;\n }\n }\n\n // lheading\n if (cap = this.rules.lheading.exec(src)) {\n src = src.substring(cap[0].length);\n this.tokens.push({\n type: 'heading',\n depth: cap[2] === '=' ? 1 : 2,\n text: cap[1]\n });\n continue;\n }\n\n // top-level paragraph\n if (top && (cap = this.rules.paragraph.exec(src))) {\n src = src.substring(cap[0].length);\n this.tokens.push({\n type: 'paragraph',\n text: cap[1].charAt(cap[1].length - 1) === '\\n'\n ? cap[1].slice(0, -1)\n : cap[1]\n });\n continue;\n }\n\n // text\n if (cap = this.rules.text.exec(src)) {\n // Top-level should never reach here.\n src = src.substring(cap[0].length);\n this.tokens.push({\n type: 'text',\n text: cap[0]\n });\n continue;\n }\n\n if (src) {\n throw new Error('Infinite loop on byte: ' + src.charCodeAt(0));\n }\n }\n\n return this.tokens;\n};\n\n/**\n * Inline-Level Grammar\n */\n\nvar inline = {\n escape: /^\\\\([!\"#$%&'()*+,\\-./:;<=>?@\\[\\]\\\\^_`{|}~])/,\n autolink: /^<(scheme:[^\\s\\x00-\\x1f<>]*|email)>/,\n url: noop,\n tag: '^comment'\n + '|^' // self-closing tag\n + '|^<[a-zA-Z][\\\\w-]*(?:attribute)*?\\\\s*/?>' // open tag\n + '|^<\\\\?[\\\\s\\\\S]*?\\\\?>' // processing instruction, e.g. \n + '|^' // declaration, e.g. \n + '|^', // CDATA section\n link: /^!?\\[(label)\\]\\(href(?:\\s+(title))?\\s*\\)/,\n reflink: /^!?\\[(label)\\]\\[(?!\\s*\\])((?:\\\\[\\[\\]]?|[^\\[\\]\\\\])+)\\]/,\n nolink: /^!?\\[(?!\\s*\\])((?:\\[[^\\[\\]]*\\]|\\\\[\\[\\]]|[^\\[\\]])*)\\](?:\\[\\])?/,\n strong: /^__([^\\s][\\s\\S]*?[^\\s])__(?!_)|^\\*\\*([^\\s][\\s\\S]*?[^\\s])\\*\\*(?!\\*)|^__([^\\s])__(?!_)|^\\*\\*([^\\s])\\*\\*(?!\\*)/,\n em: /^_([^\\s][\\s\\S]*?[^\\s_])_(?!_)|^_([^\\s_][\\s\\S]*?[^\\s])_(?!_)|^\\*([^\\s][\\s\\S]*?[^\\s*])\\*(?!\\*)|^\\*([^\\s*][\\s\\S]*?[^\\s])\\*(?!\\*)|^_([^\\s_])_(?!_)|^\\*([^\\s*])\\*(?!\\*)/,\n code: /^(`+)\\s*([\\s\\S]*?[^`]?)\\s*\\1(?!`)/,\n br: /^ {2,}\\n(?!\\s*$)/,\n del: noop,\n text: /^[\\s\\S]+?(?=[\\\\?@\\[\\]\\\\^_`{|}~])/g;\n\ninline._scheme = /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/;\ninline._email = /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/;\ninline.autolink = edit(inline.autolink)\n .replace('scheme', inline._scheme)\n .replace('email', inline._email)\n .getRegex();\n\ninline._attribute = /\\s+[a-zA-Z:_][\\w.:-]*(?:\\s*=\\s*\"[^\"]*\"|\\s*=\\s*'[^']*'|\\s*=\\s*[^\\s\"'=<>`]+)?/;\n\ninline.tag = edit(inline.tag)\n .replace('comment', block._comment)\n .replace('attribute', inline._attribute)\n .getRegex();\n\ninline._label = /(?:\\[[^\\[\\]]*\\]|\\\\[\\[\\]]?|`[^`]*`|[^\\[\\]\\\\])*?/;\ninline._href = /\\s*(<(?:\\\\[<>]?|[^\\s<>\\\\])*>|(?:\\\\[()]?|\\([^\\s\\x00-\\x1f()\\\\]*\\)|[^\\s\\x00-\\x1f()\\\\])*?)/;\ninline._title = /\"(?:\\\\\"?|[^\"\\\\])*\"|'(?:\\\\'?|[^'\\\\])*'|\\((?:\\\\\\)?|[^)\\\\])*\\)/;\n\ninline.link = edit(inline.link)\n .replace('label', inline._label)\n .replace('href', inline._href)\n .replace('title', inline._title)\n .getRegex();\n\ninline.reflink = edit(inline.reflink)\n .replace('label', inline._label)\n .getRegex();\n\n/**\n * Normal Inline Grammar\n */\n\ninline.normal = merge({}, inline);\n\n/**\n * Pedantic Inline Grammar\n */\n\ninline.pedantic = merge({}, inline.normal, {\n strong: /^__(?=\\S)([\\s\\S]*?\\S)__(?!_)|^\\*\\*(?=\\S)([\\s\\S]*?\\S)\\*\\*(?!\\*)/,\n em: /^_(?=\\S)([\\s\\S]*?\\S)_(?!_)|^\\*(?=\\S)([\\s\\S]*?\\S)\\*(?!\\*)/,\n link: edit(/^!?\\[(label)\\]\\((.*?)\\)/)\n .replace('label', inline._label)\n .getRegex(),\n reflink: edit(/^!?\\[(label)\\]\\s*\\[([^\\]]*)\\]/)\n .replace('label', inline._label)\n .getRegex()\n});\n\n/**\n * GFM Inline Grammar\n */\n\ninline.gfm = merge({}, inline.normal, {\n escape: edit(inline.escape).replace('])', '~|])').getRegex(),\n url: edit(/^((?:ftp|https?):\\/\\/|www\\.)(?:[a-zA-Z0-9\\-]+\\.?)+[^\\s<]*|^email/)\n .replace('email', inline._email)\n .getRegex(),\n _backpedal: /(?:[^?!.,:;*_~()&]+|\\([^)]*\\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,\n del: /^~~(?=\\S)([\\s\\S]*?\\S)~~/,\n text: edit(inline.text)\n .replace(']|', '~]|')\n .replace('|', '|https?://|ftp://|www\\\\.|[a-zA-Z0-9.!#$%&\\'*+/=?^_`{\\\\|}~-]+@|')\n .getRegex()\n});\n\n/**\n * GFM + Line Breaks Inline Grammar\n */\n\ninline.breaks = merge({}, inline.gfm, {\n br: edit(inline.br).replace('{2,}', '*').getRegex(),\n text: edit(inline.gfm.text).replace('{2,}', '*').getRegex()\n});\n\n/**\n * Inline Lexer & Compiler\n */\n\nfunction InlineLexer(links, options) {\n this.options = options || marked.defaults;\n this.links = links;\n this.rules = inline.normal;\n this.renderer = this.options.renderer || new Renderer();\n this.renderer.options = this.options;\n\n if (!this.links) {\n throw new Error('Tokens array requires a `links` property.');\n }\n\n if (this.options.pedantic) {\n this.rules = inline.pedantic;\n } else if (this.options.gfm) {\n if (this.options.breaks) {\n this.rules = inline.breaks;\n } else {\n this.rules = inline.gfm;\n }\n }\n}\n\n/**\n * Expose Inline Rules\n */\n\nInlineLexer.rules = inline;\n\n/**\n * Static Lexing/Compiling Method\n */\n\nInlineLexer.output = function(src, links, options) {\n var inline = new InlineLexer(links, options);\n return inline.output(src);\n};\n\n/**\n * Lexing/Compiling\n */\n\nInlineLexer.prototype.output = function(src) {\n var out = '',\n link,\n text,\n href,\n title,\n cap;\n\n while (src) {\n // escape\n if (cap = this.rules.escape.exec(src)) {\n src = src.substring(cap[0].length);\n out += cap[1];\n continue;\n }\n\n // autolink\n if (cap = this.rules.autolink.exec(src)) {\n src = src.substring(cap[0].length);\n if (cap[2] === '@') {\n text = escape(this.mangle(cap[1]));\n href = 'mailto:' + text;\n } else {\n text = escape(cap[1]);\n href = text;\n }\n out += this.renderer.link(href, null, text);\n continue;\n }\n\n // url (gfm)\n if (!this.inLink && (cap = this.rules.url.exec(src))) {\n cap[0] = this.rules._backpedal.exec(cap[0])[0];\n src = src.substring(cap[0].length);\n if (cap[2] === '@') {\n text = escape(cap[0]);\n href = 'mailto:' + text;\n } else {\n text = escape(cap[0]);\n if (cap[1] === 'www.') {\n href = 'http://' + text;\n } else {\n href = text;\n }\n }\n out += this.renderer.link(href, null, text);\n continue;\n }\n\n // tag\n if (cap = this.rules.tag.exec(src)) {\n if (!this.inLink && /^/i.test(cap[0])) {\n this.inLink = false;\n }\n src = src.substring(cap[0].length);\n out += this.options.sanitize\n ? this.options.sanitizer\n ? this.options.sanitizer(cap[0])\n : escape(cap[0])\n : cap[0]\n continue;\n }\n\n // link\n if (cap = this.rules.link.exec(src)) {\n src = src.substring(cap[0].length);\n this.inLink = true;\n href = cap[2];\n if (this.options.pedantic) {\n link = /^([^'\"]*[^\\s])\\s+(['\"])(.*)\\2/.exec(href);\n\n if (link) {\n href = link[1];\n title = link[3];\n } else {\n title = '';\n }\n } else {\n title = cap[3] ? cap[3].slice(1, -1) : '';\n }\n href = href.trim().replace(/^<([\\s\\S]*)>$/, '$1');\n out += this.outputLink(cap, {\n href: InlineLexer.escapes(href),\n title: InlineLexer.escapes(title)\n });\n this.inLink = false;\n continue;\n }\n\n // reflink, nolink\n if ((cap = this.rules.reflink.exec(src))\n || (cap = this.rules.nolink.exec(src))) {\n src = src.substring(cap[0].length);\n link = (cap[2] || cap[1]).replace(/\\s+/g, ' ');\n link = this.links[link.toLowerCase()];\n if (!link || !link.href) {\n out += cap[0].charAt(0);\n src = cap[0].substring(1) + src;\n continue;\n }\n this.inLink = true;\n out += this.outputLink(cap, link);\n this.inLink = false;\n continue;\n }\n\n // strong\n if (cap = this.rules.strong.exec(src)) {\n src = src.substring(cap[0].length);\n out += this.renderer.strong(this.output(cap[4] || cap[3] || cap[2] || cap[1]));\n continue;\n }\n\n // em\n if (cap = this.rules.em.exec(src)) {\n src = src.substring(cap[0].length);\n out += this.renderer.em(this.output(cap[6] || cap[5] || cap[4] || cap[3] || cap[2] || cap[1]));\n continue;\n }\n\n // code\n if (cap = this.rules.code.exec(src)) {\n src = src.substring(cap[0].length);\n out += this.renderer.codespan(escape(cap[2].trim(), true));\n continue;\n }\n\n // br\n if (cap = this.rules.br.exec(src)) {\n src = src.substring(cap[0].length);\n out += this.renderer.br();\n continue;\n }\n\n // del (gfm)\n if (cap = this.rules.del.exec(src)) {\n src = src.substring(cap[0].length);\n out += this.renderer.del(this.output(cap[1]));\n continue;\n }\n\n // text\n if (cap = this.rules.text.exec(src)) {\n src = src.substring(cap[0].length);\n out += this.renderer.text(escape(this.smartypants(cap[0])));\n continue;\n }\n\n if (src) {\n throw new Error('Infinite loop on byte: ' + src.charCodeAt(0));\n }\n }\n\n return out;\n};\n\nInlineLexer.escapes = function(text) {\n return text ? text.replace(InlineLexer.rules._escapes, '$1') : text;\n}\n\n/**\n * Compile Link\n */\n\nInlineLexer.prototype.outputLink = function(cap, link) {\n var href = link.href,\n title = link.title ? escape(link.title) : null;\n\n return cap[0].charAt(0) !== '!'\n ? this.renderer.link(href, title, this.output(cap[1]))\n : this.renderer.image(href, title, escape(cap[1]));\n};\n\n/**\n * Smartypants Transformations\n */\n\nInlineLexer.prototype.smartypants = function(text) {\n if (!this.options.smartypants) return text;\n return text\n // em-dashes\n .replace(/---/g, '\\u2014')\n // en-dashes\n .replace(/--/g, '\\u2013')\n // opening singles\n .replace(/(^|[-\\u2014/(\\[{\"\\s])'/g, '$1\\u2018')\n // closing singles & apostrophes\n .replace(/'/g, '\\u2019')\n // opening doubles\n .replace(/(^|[-\\u2014/(\\[{\\u2018\\s])\"/g, '$1\\u201c')\n // closing doubles\n .replace(/\"/g, '\\u201d')\n // ellipses\n .replace(/\\.{3}/g, '\\u2026');\n};\n\n/**\n * Mangle Links\n */\n\nInlineLexer.prototype.mangle = function(text) {\n if (!this.options.mangle) return text;\n var out = '',\n l = text.length,\n i = 0,\n ch;\n\n for (; i < l; i++) {\n ch = text.charCodeAt(i);\n if (Math.random() > 0.5) {\n ch = 'x' + ch.toString(16);\n }\n out += '&#' + ch + ';';\n }\n\n return out;\n};\n\n/**\n * Renderer\n */\n\nfunction Renderer(options) {\n this.options = options || marked.defaults;\n}\n\nRenderer.prototype.code = function(code, lang, escaped) {\n if (this.options.highlight) {\n var out = this.options.highlight(code, lang);\n if (out != null && out !== code) {\n escaped = true;\n code = out;\n }\n }\n\n if (!lang) {\n return '
    '\n      + (escaped ? code : escape(code, true))\n      + '
    ';\n }\n\n return '
    '\n    + (escaped ? code : escape(code, true))\n    + '
    \\n';\n};\n\nRenderer.prototype.blockquote = function(quote) {\n return '
    \\n' + quote + '
    \\n';\n};\n\nRenderer.prototype.html = function(html) {\n return html;\n};\n\nRenderer.prototype.heading = function(text, level, raw) {\n if (this.options.headerIds) {\n return ''\n + text\n + '\\n';\n }\n // ignore IDs\n return '' + text + '\\n';\n};\n\nRenderer.prototype.hr = function() {\n return this.options.xhtml ? '
    \\n' : '
    \\n';\n};\n\nRenderer.prototype.list = function(body, ordered, start) {\n var type = ordered ? 'ol' : 'ul',\n startatt = (ordered && start !== 1) ? (' start=\"' + start + '\"') : '';\n return '<' + type + startatt + '>\\n' + body + '\\n';\n};\n\nRenderer.prototype.listitem = function(text) {\n return '
  • ' + text + '
  • \\n';\n};\n\nRenderer.prototype.checkbox = function(checked) {\n return ' ';\n}\n\nRenderer.prototype.paragraph = function(text) {\n return '

    ' + text + '

    \\n';\n};\n\nRenderer.prototype.table = function(header, body) {\n if (body) body = '' + body + '';\n\n return '\\n'\n + '\\n'\n + header\n + '\\n'\n + body\n + '
    \\n';\n};\n\nRenderer.prototype.tablerow = function(content) {\n return '\\n' + content + '\\n';\n};\n\nRenderer.prototype.tablecell = function(content, flags) {\n var type = flags.header ? 'th' : 'td';\n var tag = flags.align\n ? '<' + type + ' align=\"' + flags.align + '\">'\n : '<' + type + '>';\n return tag + content + '\\n';\n};\n\n// span level renderer\nRenderer.prototype.strong = function(text) {\n return '' + text + '';\n};\n\nRenderer.prototype.em = function(text) {\n return '' + text + '';\n};\n\nRenderer.prototype.codespan = function(text) {\n return '' + text + '';\n};\n\nRenderer.prototype.br = function() {\n return this.options.xhtml ? '
    ' : '
    ';\n};\n\nRenderer.prototype.del = function(text) {\n return '' + text + '';\n};\n\nRenderer.prototype.link = function(href, title, text) {\n if (this.options.sanitize) {\n try {\n var prot = decodeURIComponent(unescape(href))\n .replace(/[^\\w:]/g, '')\n .toLowerCase();\n } catch (e) {\n return text;\n }\n if (prot.indexOf('javascript:') === 0 || prot.indexOf('vbscript:') === 0 || prot.indexOf('data:') === 0) {\n return text;\n }\n }\n if (this.options.baseUrl && !originIndependentUrl.test(href)) {\n href = resolveUrl(this.options.baseUrl, href);\n }\n try {\n href = encodeURI(href).replace(/%25/g, '%');\n } catch (e) {\n return text;\n }\n var out = '
    ';\n return out;\n};\n\nRenderer.prototype.image = function(href, title, text) {\n if (this.options.baseUrl && !originIndependentUrl.test(href)) {\n href = resolveUrl(this.options.baseUrl, href);\n }\n var out = '\"'' : '>';\n return out;\n};\n\nRenderer.prototype.text = function(text) {\n return text;\n};\n\n/**\n * TextRenderer\n * returns only the textual part of the token\n */\n\nfunction TextRenderer() {}\n\n// no need for block level renderers\n\nTextRenderer.prototype.strong =\nTextRenderer.prototype.em =\nTextRenderer.prototype.codespan =\nTextRenderer.prototype.del =\nTextRenderer.prototype.text = function (text) {\n return text;\n}\n\nTextRenderer.prototype.link =\nTextRenderer.prototype.image = function(href, title, text) {\n return '' + text;\n}\n\nTextRenderer.prototype.br = function() {\n return '';\n}\n\n/**\n * Parsing & Compiling\n */\n\nfunction Parser(options) {\n this.tokens = [];\n this.token = null;\n this.options = options || marked.defaults;\n this.options.renderer = this.options.renderer || new Renderer();\n this.renderer = this.options.renderer;\n this.renderer.options = this.options;\n}\n\n/**\n * Static Parse Method\n */\n\nParser.parse = function(src, options) {\n var parser = new Parser(options);\n return parser.parse(src);\n};\n\n/**\n * Parse Loop\n */\n\nParser.prototype.parse = function(src) {\n this.inline = new InlineLexer(src.links, this.options);\n // use an InlineLexer with a TextRenderer to extract pure text\n this.inlineText = new InlineLexer(\n src.links,\n merge({}, this.options, {renderer: new TextRenderer()})\n );\n this.tokens = src.reverse();\n\n var out = '';\n while (this.next()) {\n out += this.tok();\n }\n\n return out;\n};\n\n/**\n * Next Token\n */\n\nParser.prototype.next = function() {\n return this.token = this.tokens.pop();\n};\n\n/**\n * Preview Next Token\n */\n\nParser.prototype.peek = function() {\n return this.tokens[this.tokens.length - 1] || 0;\n};\n\n/**\n * Parse Text Tokens\n */\n\nParser.prototype.parseText = function() {\n var body = this.token.text;\n\n while (this.peek().type === 'text') {\n body += '\\n' + this.next().text;\n }\n\n return this.inline.output(body);\n};\n\n/**\n * Parse Current Token\n */\n\nParser.prototype.tok = function() {\n switch (this.token.type) {\n case 'space': {\n return '';\n }\n case 'hr': {\n return this.renderer.hr();\n }\n case 'heading': {\n return this.renderer.heading(\n this.inline.output(this.token.text),\n this.token.depth,\n unescape(this.inlineText.output(this.token.text)));\n }\n case 'code': {\n return this.renderer.code(this.token.text,\n this.token.lang,\n this.token.escaped);\n }\n case 'table': {\n var header = '',\n body = '',\n i,\n row,\n cell,\n j;\n\n // header\n cell = '';\n for (i = 0; i < this.token.header.length; i++) {\n cell += this.renderer.tablecell(\n this.inline.output(this.token.header[i]),\n { header: true, align: this.token.align[i] }\n );\n }\n header += this.renderer.tablerow(cell);\n\n for (i = 0; i < this.token.cells.length; i++) {\n row = this.token.cells[i];\n\n cell = '';\n for (j = 0; j < row.length; j++) {\n cell += this.renderer.tablecell(\n this.inline.output(row[j]),\n { header: false, align: this.token.align[j] }\n );\n }\n\n body += this.renderer.tablerow(cell);\n }\n return this.renderer.table(header, body);\n }\n case 'blockquote_start': {\n body = '';\n\n while (this.next().type !== 'blockquote_end') {\n body += this.tok();\n }\n\n return this.renderer.blockquote(body);\n }\n case 'list_start': {\n body = '';\n var ordered = this.token.ordered,\n start = this.token.start;\n\n while (this.next().type !== 'list_end') {\n body += this.tok();\n }\n\n return this.renderer.list(body, ordered, start);\n }\n case 'list_item_start': {\n body = '';\n\n if (this.token.task) {\n body += this.renderer.checkbox(this.token.checked);\n }\n\n while (this.next().type !== 'list_item_end') {\n body += this.token.type === 'text'\n ? this.parseText()\n : this.tok();\n }\n\n return this.renderer.listitem(body);\n }\n case 'loose_item_start': {\n body = '';\n\n while (this.next().type !== 'list_item_end') {\n body += this.tok();\n }\n\n return this.renderer.listitem(body);\n }\n case 'html': {\n // TODO parse inline content if parameter markdown=1\n return this.renderer.html(this.token.text);\n }\n case 'paragraph': {\n return this.renderer.paragraph(this.inline.output(this.token.text));\n }\n case 'text': {\n return this.renderer.paragraph(this.parseText());\n }\n }\n};\n\n/**\n * Helpers\n */\n\nfunction escape(html, encode) {\n return html\n .replace(!encode ? /&(?!#?\\w+;)/g : /&/g, '&')\n .replace(//g, '>')\n .replace(/\"/g, '"')\n .replace(/'/g, ''');\n}\n\nfunction unescape(html) {\n // explicitly match decimal, hex, and named HTML entities\n return html.replace(/&(#(?:\\d+)|(?:#x[0-9A-Fa-f]+)|(?:\\w+));?/ig, function(_, n) {\n n = n.toLowerCase();\n if (n === 'colon') return ':';\n if (n.charAt(0) === '#') {\n return n.charAt(1) === 'x'\n ? String.fromCharCode(parseInt(n.substring(2), 16))\n : String.fromCharCode(+n.substring(1));\n }\n return '';\n });\n}\n\nfunction edit(regex, opt) {\n regex = regex.source || regex;\n opt = opt || '';\n return {\n replace: function(name, val) {\n val = val.source || val;\n val = val.replace(/(^|[^\\[])\\^/g, '$1');\n regex = regex.replace(name, val);\n return this;\n },\n getRegex: function() {\n return new RegExp(regex, opt);\n }\n };\n}\n\nfunction resolveUrl(base, href) {\n if (!baseUrls[' ' + base]) {\n // we can ignore everything in base after the last slash of its path component,\n // but we might need to add _that_\n // https://tools.ietf.org/html/rfc3986#section-3\n if (/^[^:]+:\\/*[^/]*$/.test(base)) {\n baseUrls[' ' + base] = base + '/';\n } else {\n baseUrls[' ' + base] = rtrim(base, '/', true);\n }\n }\n base = baseUrls[' ' + base];\n\n if (href.slice(0, 2) === '//') {\n return base.replace(/:[\\s\\S]*/, ':') + href;\n } else if (href.charAt(0) === '/') {\n return base.replace(/(:\\/*[^/]*)[\\s\\S]*/, '$1') + href;\n } else {\n return base + href;\n }\n}\nvar baseUrls = {};\nvar originIndependentUrl = /^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;\n\nfunction noop() {}\nnoop.exec = noop;\n\nfunction merge(obj) {\n var i = 1,\n target,\n key;\n\n for (; i < arguments.length; i++) {\n target = arguments[i];\n for (key in target) {\n if (Object.prototype.hasOwnProperty.call(target, key)) {\n obj[key] = target[key];\n }\n }\n }\n\n return obj;\n}\n\nfunction splitCells(tableRow, count) {\n // ensure that every cell-delimiting pipe has a space\n // before it to distinguish it from an escaped pipe\n var row = tableRow.replace(/\\|/g, function (match, offset, str) {\n var escaped = false,\n curr = offset;\n while (--curr >= 0 && str[curr] === '\\\\') escaped = !escaped;\n if (escaped) {\n // odd number of slashes means | is escaped\n // so we leave it alone\n return '|';\n } else {\n // add space before unescaped |\n return ' |';\n }\n }),\n cells = row.split(/ \\|/),\n i = 0;\n\n if (cells.length > count) {\n cells.splice(count);\n } else {\n while (cells.length < count) cells.push('');\n }\n\n for (; i < cells.length; i++) {\n // leading or trailing whitespace is ignored per the gfm spec\n cells[i] = cells[i].trim().replace(/\\\\\\|/g, '|');\n }\n return cells;\n}\n\n// Remove trailing 'c's. Equivalent to str.replace(/c*$/, '').\n// /c*$/ is vulnerable to REDOS.\n// invert: Remove suffix of non-c chars instead. Default falsey.\nfunction rtrim(str, c, invert) {\n if (str.length === 0) {\n return '';\n }\n\n // Length of suffix matching the invert condition.\n var suffLen = 0;\n\n // Step left until we fail to match the invert condition.\n while (suffLen < str.length) {\n var currChar = str.charAt(str.length - suffLen - 1);\n if (currChar === c && !invert) {\n suffLen++;\n } else if (currChar !== c && invert) {\n suffLen++;\n } else {\n break;\n }\n }\n\n return str.substr(0, str.length - suffLen);\n}\n\n/**\n * Marked\n */\n\nfunction marked(src, opt, callback) {\n // throw error in case of non string input\n if (typeof src === 'undefined' || src === null) {\n throw new Error('marked(): input parameter is undefined or null');\n }\n if (typeof src !== 'string') {\n throw new Error('marked(): input parameter is of type '\n + Object.prototype.toString.call(src) + ', string expected');\n }\n\n if (callback || typeof opt === 'function') {\n if (!callback) {\n callback = opt;\n opt = null;\n }\n\n opt = merge({}, marked.defaults, opt || {});\n\n var highlight = opt.highlight,\n tokens,\n pending,\n i = 0;\n\n try {\n tokens = Lexer.lex(src, opt)\n } catch (e) {\n return callback(e);\n }\n\n pending = tokens.length;\n\n var done = function(err) {\n if (err) {\n opt.highlight = highlight;\n return callback(err);\n }\n\n var out;\n\n try {\n out = Parser.parse(tokens, opt);\n } catch (e) {\n err = e;\n }\n\n opt.highlight = highlight;\n\n return err\n ? callback(err)\n : callback(null, out);\n };\n\n if (!highlight || highlight.length < 3) {\n return done();\n }\n\n delete opt.highlight;\n\n if (!pending) return done();\n\n for (; i < tokens.length; i++) {\n (function(token) {\n if (token.type !== 'code') {\n return --pending || done();\n }\n return highlight(token.text, token.lang, function(err, code) {\n if (err) return done(err);\n if (code == null || code === token.text) {\n return --pending || done();\n }\n token.text = code;\n token.escaped = true;\n --pending || done();\n });\n })(tokens[i]);\n }\n\n return;\n }\n try {\n if (opt) opt = merge({}, marked.defaults, opt);\n return Parser.parse(Lexer.lex(src, opt), opt);\n } catch (e) {\n e.message += '\\nPlease report this to https://github.com/markedjs/marked.';\n if ((opt || marked.defaults).silent) {\n return '

    An error occurred:

    '\n        + escape(e.message + '', true)\n        + '
    ';\n }\n throw e;\n }\n}\n\n/**\n * Options\n */\n\nmarked.options =\nmarked.setOptions = function(opt) {\n merge(marked.defaults, opt);\n return marked;\n};\n\nmarked.getDefaults = function () {\n return {\n baseUrl: null,\n breaks: false,\n gfm: true,\n headerIds: true,\n headerPrefix: '',\n highlight: null,\n langPrefix: 'language-',\n mangle: true,\n pedantic: false,\n renderer: new Renderer(),\n sanitize: false,\n sanitizer: null,\n silent: false,\n smartLists: false,\n smartypants: false,\n tables: true,\n xhtml: false\n };\n}\n\nmarked.defaults = marked.getDefaults();\n\n/**\n * Expose\n */\n\nmarked.Parser = Parser;\nmarked.parser = Parser.parse;\n\nmarked.Renderer = Renderer;\nmarked.TextRenderer = TextRenderer;\n\nmarked.Lexer = Lexer;\nmarked.lexer = Lexer.lex;\n\nmarked.InlineLexer = InlineLexer;\nmarked.inlineLexer = InlineLexer.output;\n\nmarked.parse = marked;\n__marked_exports = marked;\n\n}).call(this);\n\n// ESM-comment-begin\n// define([], function() {\n// return {\n// marked: __marked_exports\n// };\n// });\n// ESM-comment-end\n\n// ESM-uncomment-begin\nexport var marked = __marked_exports;\nexport var Parser = __marked_exports.Parser;\nexport var parser = __marked_exports.parser;\nexport var Renderer = __marked_exports.Renderer;\nexport var TextRenderer = __marked_exports.TextRenderer;\nexport var Lexer = __marked_exports.Lexer;\nexport var lexer = __marked_exports.lexer;\nexport var InlineLexer = __marked_exports.InlineLexer;\nexport var inlineLexer = __marked_exports.inlineLexer;\nexport var parse = __marked_exports.parse;\n// ESM-uncomment-end\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport { createDecorator } from '../../instantiation/common/instantiation';\nexport var IClipboardService = createDecorator('clipboardService');\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar IdGenerator = /** @class */ (function () {\n function IdGenerator(prefix) {\n this._prefix = prefix;\n this._lastId = 0;\n }\n IdGenerator.prototype.nextId = function () {\n return this._prefix + (++this._lastId);\n };\n return IdGenerator;\n}());\nexport { IdGenerator };\nexport var defaultGenerator = new IdGenerator('id#');\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport { equals } from './arrays';\nvar MarkdownString = /** @class */ (function () {\n function MarkdownString(value) {\n if (value === void 0) { value = ''; }\n this.value = value;\n }\n MarkdownString.prototype.appendText = function (value) {\n // escape markdown syntax tokens: http://daringfireball.net/projects/markdown/syntax#backslash\n this.value += value.replace(/[\\\\`*_{}[\\]()#+\\-.!]/g, '\\\\$&');\n return this;\n };\n MarkdownString.prototype.appendMarkdown = function (value) {\n this.value += value;\n return this;\n };\n MarkdownString.prototype.appendCodeblock = function (langId, code) {\n this.value += '\\n```';\n this.value += langId;\n this.value += '\\n';\n this.value += code;\n this.value += '\\n```\\n';\n return this;\n };\n return MarkdownString;\n}());\nexport { MarkdownString };\nexport function isEmptyMarkdownString(oneOrMany) {\n if (isMarkdownString(oneOrMany)) {\n return !oneOrMany.value;\n }\n else if (Array.isArray(oneOrMany)) {\n return oneOrMany.every(isEmptyMarkdownString);\n }\n else {\n return true;\n }\n}\nexport function isMarkdownString(thing) {\n if (thing instanceof MarkdownString) {\n return true;\n }\n else if (thing && typeof thing === 'object') {\n return typeof thing.value === 'string'\n && (typeof thing.isTrusted === 'boolean' || thing.isTrusted === void 0);\n }\n return false;\n}\nexport function markedStringsEquals(a, b) {\n if (!a && !b) {\n return true;\n }\n else if (!a || !b) {\n return false;\n }\n else if (Array.isArray(a) && Array.isArray(b)) {\n return equals(a, b, markdownStringEqual);\n }\n else if (isMarkdownString(a) && isMarkdownString(b)) {\n return markdownStringEqual(a, b);\n }\n else {\n return false;\n }\n}\nfunction markdownStringEqual(a, b) {\n if (a === b) {\n return true;\n }\n else if (!a || !b) {\n return false;\n }\n else {\n return a.value === b.value && a.isTrusted === b.isTrusted;\n }\n}\nexport function removeMarkdownEscapes(text) {\n if (!text) {\n return text;\n }\n return text.replace(/\\\\([\\\\`*_{}[\\]()#+\\-.!])/g, '$1');\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport * as DOM from './dom';\nimport { defaultGenerator } from '../common/idGenerator';\nimport { escape } from '../common/strings';\nimport { removeMarkdownEscapes } from '../common/htmlContent';\nimport { marked } from '../common/marked/marked';\nfunction createElement(options) {\n var tagName = options.inline ? 'span' : 'div';\n var element = document.createElement(tagName);\n if (options.className) {\n element.className = options.className;\n }\n return element;\n}\nexport function renderText(text, options) {\n if (options === void 0) { options = {}; }\n var element = createElement(options);\n element.textContent = text;\n return element;\n}\nexport function renderFormattedText(formattedText, options) {\n if (options === void 0) { options = {}; }\n var element = createElement(options);\n _renderFormattedText(element, parseFormattedText(formattedText), options.actionHandler);\n return element;\n}\n/**\n * Create html nodes for the given content element.\n */\nexport function renderMarkdown(markdown, options) {\n if (options === void 0) { options = {}; }\n var element = createElement(options);\n // signal to code-block render that the\n // element has been created\n var signalInnerHTML;\n var withInnerHTML = new Promise(function (c) { return signalInnerHTML = c; });\n var renderer = new marked.Renderer();\n renderer.image = function (href, title, text) {\n var dimensions = [];\n if (href) {\n var splitted = href.split('|').map(function (s) { return s.trim(); });\n href = splitted[0];\n var parameters = splitted[1];\n if (parameters) {\n var heightFromParams = /height=(\\d+)/.exec(parameters);\n var widthFromParams = /width=(\\d+)/.exec(parameters);\n var height = (heightFromParams && heightFromParams[1]);\n var width = (widthFromParams && widthFromParams[1]);\n var widthIsFinite = isFinite(parseInt(width));\n var heightIsFinite = isFinite(parseInt(height));\n if (widthIsFinite) {\n dimensions.push(\"width=\\\"\" + width + \"\\\"\");\n }\n if (heightIsFinite) {\n dimensions.push(\"height=\\\"\" + height + \"\\\"\");\n }\n }\n }\n var attributes = [];\n if (href) {\n attributes.push(\"src=\\\"\" + href + \"\\\"\");\n }\n if (text) {\n attributes.push(\"alt=\\\"\" + text + \"\\\"\");\n }\n if (title) {\n attributes.push(\"title=\\\"\" + title + \"\\\"\");\n }\n if (dimensions.length) {\n attributes = attributes.concat(dimensions);\n }\n return '';\n };\n renderer.link = function (href, title, text) {\n // Remove markdown escapes. Workaround for https://github.com/chjj/marked/issues/829\n if (href === text) { // raw link case\n text = removeMarkdownEscapes(text);\n }\n title = removeMarkdownEscapes(title);\n href = removeMarkdownEscapes(href);\n if (!href\n || href.match(/^data:|javascript:/i)\n || (href.match(/^command:/i) && !markdown.isTrusted)) {\n // drop the link\n return text;\n }\n else {\n return \"
    \" + text + \"\";\n }\n };\n renderer.paragraph = function (text) {\n return \"

    \" + text + \"

    \";\n };\n if (options.codeBlockRenderer) {\n renderer.code = function (code, lang) {\n var value = options.codeBlockRenderer(lang, code);\n // when code-block rendering is async we return sync\n // but update the node with the real result later.\n var id = defaultGenerator.nextId();\n var promise = Promise.all([value, withInnerHTML]).then(function (values) {\n var strValue = values[0];\n var span = element.querySelector(\"div[data-code=\\\"\" + id + \"\\\"]\");\n if (span) {\n span.innerHTML = strValue;\n }\n }).catch(function (err) {\n // ignore\n });\n if (options.codeBlockRenderCallback) {\n promise.then(options.codeBlockRenderCallback);\n }\n return \"
    \" + escape(code) + \"
    \";\n };\n }\n if (options.actionHandler) {\n options.actionHandler.disposeables.push(DOM.addStandardDisposableListener(element, 'click', function (event) {\n var target = event.target;\n if (target.tagName !== 'A') {\n target = target.parentElement;\n if (!target || target.tagName !== 'A') {\n return;\n }\n }\n var href = target.dataset['href'];\n if (href) {\n options.actionHandler.callback(href, event);\n }\n }));\n }\n var markedOptions = {\n sanitize: true,\n renderer: renderer\n };\n element.innerHTML = marked(markdown.value, markedOptions);\n signalInnerHTML();\n return element;\n}\n// --- formatted string parsing\nvar StringStream = /** @class */ (function () {\n function StringStream(source) {\n this.source = source;\n this.index = 0;\n }\n StringStream.prototype.eos = function () {\n return this.index >= this.source.length;\n };\n StringStream.prototype.next = function () {\n var next = this.peek();\n this.advance();\n return next;\n };\n StringStream.prototype.peek = function () {\n return this.source[this.index];\n };\n StringStream.prototype.advance = function () {\n this.index++;\n };\n return StringStream;\n}());\nfunction _renderFormattedText(element, treeNode, actionHandler) {\n var child;\n if (treeNode.type === 2 /* Text */) {\n child = document.createTextNode(treeNode.content);\n }\n else if (treeNode.type === 3 /* Bold */) {\n child = document.createElement('b');\n }\n else if (treeNode.type === 4 /* Italics */) {\n child = document.createElement('i');\n }\n else if (treeNode.type === 5 /* Action */ && actionHandler) {\n var a = document.createElement('a');\n a.href = '#';\n actionHandler.disposeables.push(DOM.addStandardDisposableListener(a, 'click', function (event) {\n actionHandler.callback(String(treeNode.index), event);\n }));\n child = a;\n }\n else if (treeNode.type === 7 /* NewLine */) {\n child = document.createElement('br');\n }\n else if (treeNode.type === 1 /* Root */) {\n child = element;\n }\n if (element !== child) {\n element.appendChild(child);\n }\n if (Array.isArray(treeNode.children)) {\n treeNode.children.forEach(function (nodeChild) {\n _renderFormattedText(child, nodeChild, actionHandler);\n });\n }\n}\nfunction parseFormattedText(content) {\n var root = {\n type: 1 /* Root */,\n children: []\n };\n var actionItemIndex = 0;\n var current = root;\n var stack = [];\n var stream = new StringStream(content);\n while (!stream.eos()) {\n var next = stream.next();\n var isEscapedFormatType = (next === '\\\\' && formatTagType(stream.peek()) !== 0 /* Invalid */);\n if (isEscapedFormatType) {\n next = stream.next(); // unread the backslash if it escapes a format tag type\n }\n if (!isEscapedFormatType && isFormatTag(next) && next === stream.peek()) {\n stream.advance();\n if (current.type === 2 /* Text */) {\n current = stack.pop();\n }\n var type = formatTagType(next);\n if (current.type === type || (current.type === 5 /* Action */ && type === 6 /* ActionClose */)) {\n current = stack.pop();\n }\n else {\n var newCurrent = {\n type: type,\n children: []\n };\n if (type === 5 /* Action */) {\n newCurrent.index = actionItemIndex;\n actionItemIndex++;\n }\n current.children.push(newCurrent);\n stack.push(current);\n current = newCurrent;\n }\n }\n else if (next === '\\n') {\n if (current.type === 2 /* Text */) {\n current = stack.pop();\n }\n current.children.push({\n type: 7 /* NewLine */\n });\n }\n else {\n if (current.type !== 2 /* Text */) {\n var textCurrent = {\n type: 2 /* Text */,\n content: next\n };\n current.children.push(textCurrent);\n stack.push(current);\n current = textCurrent;\n }\n else {\n current.content += next;\n }\n }\n }\n if (current.type === 2 /* Text */) {\n current = stack.pop();\n }\n if (stack.length) {\n // incorrectly formatted string literal\n }\n return root;\n}\nfunction isFormatTag(char) {\n return formatTagType(char) !== 0 /* Invalid */;\n}\nfunction formatTagType(char) {\n switch (char) {\n case '*':\n return 3 /* Bold */;\n case '_':\n return 4 /* Italics */;\n case '[':\n return 5 /* Action */;\n case ']':\n return 6 /* ActionClose */;\n default:\n return 0 /* Invalid */;\n }\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport './aria.css';\nimport * as nls from '../../../../nls';\nimport { isMacintosh } from '../../../common/platform';\nimport * as dom from '../../dom';\nvar ariaContainer;\nvar alertContainer;\nvar statusContainer;\nexport function setARIAContainer(parent) {\n ariaContainer = document.createElement('div');\n ariaContainer.className = 'monaco-aria-container';\n alertContainer = document.createElement('div');\n alertContainer.className = 'monaco-alert';\n alertContainer.setAttribute('role', 'alert');\n alertContainer.setAttribute('aria-atomic', 'true');\n ariaContainer.appendChild(alertContainer);\n statusContainer = document.createElement('div');\n statusContainer.className = 'monaco-status';\n statusContainer.setAttribute('role', 'status');\n statusContainer.setAttribute('aria-atomic', 'true');\n ariaContainer.appendChild(statusContainer);\n parent.appendChild(ariaContainer);\n}\n/**\n * Given the provided message, will make sure that it is read as alert to screen readers.\n */\nexport function alert(msg) {\n insertMessage(alertContainer, msg);\n}\n/**\n * Given the provided message, will make sure that it is read as status to screen readers.\n */\nexport function status(msg) {\n if (isMacintosh) {\n alert(msg); // VoiceOver does not seem to support status role\n }\n else {\n insertMessage(statusContainer, msg);\n }\n}\nvar repeatedTimes = 0;\nvar prevText = undefined;\nfunction insertMessage(target, msg) {\n if (!ariaContainer) {\n // console.warn('ARIA support needs a container. Call setARIAContainer() first.');\n return;\n }\n if (prevText === msg) {\n repeatedTimes++;\n }\n else {\n prevText = msg;\n repeatedTimes = 0;\n }\n switch (repeatedTimes) {\n case 0: break;\n case 1:\n msg = nls.localize('repeated', \"{0} (occurred again)\", msg);\n break;\n default:\n msg = nls.localize('repeatedNtimes', \"{0} (occurred {1} times)\", msg, repeatedTimes);\n break;\n }\n dom.clearNode(target);\n target.textContent = msg;\n // See https://www.paciellogroup.com/blog/2012/06/html5-accessibility-chops-aria-rolealert-browser-support/\n target.style.visibility = 'hidden';\n target.style.visibility = 'visible';\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport './contextview.css';\nimport { $ } from '../../builder';\nimport * as DOM from '../../dom';\nimport { dispose, toDisposable } from '../../../common/lifecycle';\nexport var AnchorAlignment;\n(function (AnchorAlignment) {\n AnchorAlignment[AnchorAlignment[\"LEFT\"] = 0] = \"LEFT\";\n AnchorAlignment[AnchorAlignment[\"RIGHT\"] = 1] = \"RIGHT\";\n})(AnchorAlignment || (AnchorAlignment = {}));\nexport var AnchorPosition;\n(function (AnchorPosition) {\n AnchorPosition[AnchorPosition[\"BELOW\"] = 0] = \"BELOW\";\n AnchorPosition[AnchorPosition[\"ABOVE\"] = 1] = \"ABOVE\";\n})(AnchorPosition || (AnchorPosition = {}));\nexport var LayoutAnchorPosition;\n(function (LayoutAnchorPosition) {\n LayoutAnchorPosition[LayoutAnchorPosition[\"Before\"] = 0] = \"Before\";\n LayoutAnchorPosition[LayoutAnchorPosition[\"After\"] = 1] = \"After\";\n})(LayoutAnchorPosition || (LayoutAnchorPosition = {}));\n/**\n * Lays out a one dimensional view next to an anchor in a viewport.\n *\n * @returns The view offset within the viewport.\n */\nexport function layout(viewportSize, viewSize, anchor) {\n var anchorEnd = anchor.offset + anchor.size;\n if (anchor.position === LayoutAnchorPosition.Before) {\n if (viewSize <= viewportSize - anchorEnd) {\n return anchorEnd; // happy case, lay it out after the anchor\n }\n if (viewSize <= anchor.offset) {\n return anchor.offset - viewSize; // ok case, lay it out before the anchor\n }\n return Math.max(viewportSize - viewSize, 0); // sad case, lay it over the anchor\n }\n else {\n if (viewSize <= anchor.offset) {\n return anchor.offset - viewSize; // happy case, lay it out before the anchor\n }\n if (viewSize <= viewportSize - anchorEnd) {\n return anchorEnd; // ok case, lay it out after the anchor\n }\n return 0; // sad case, lay it over the anchor\n }\n}\nvar ContextView = /** @class */ (function () {\n function ContextView(container) {\n var _this = this;\n this.$view = $('.context-view').hide();\n this.setContainer(container);\n this.toDispose = [toDisposable(function () {\n _this.setContainer(null);\n })];\n this.toDisposeOnClean = null;\n }\n ContextView.prototype.setContainer = function (container) {\n var _this = this;\n if (this.$container) {\n this.$container.getHTMLElement().removeChild(this.$view.getHTMLElement());\n this.$container.off(ContextView.BUBBLE_UP_EVENTS);\n this.$container.off(ContextView.BUBBLE_DOWN_EVENTS, true);\n this.$container = null;\n }\n if (container) {\n this.$container = $(container);\n this.$view.appendTo(this.$container);\n this.$container.on(ContextView.BUBBLE_UP_EVENTS, function (e) {\n _this.onDOMEvent(e, document.activeElement, false);\n });\n this.$container.on(ContextView.BUBBLE_DOWN_EVENTS, function (e) {\n _this.onDOMEvent(e, document.activeElement, true);\n }, null, true);\n }\n };\n ContextView.prototype.show = function (delegate) {\n if (this.isVisible()) {\n this.hide();\n }\n // Show static box\n this.$view.setClass('context-view').empty().style({ top: '0px', left: '0px' }).show();\n // Render content\n this.toDisposeOnClean = delegate.render(this.$view.getHTMLElement());\n // Set active delegate\n this.delegate = delegate;\n // Layout\n this.doLayout();\n };\n ContextView.prototype.layout = function () {\n if (!this.isVisible()) {\n return;\n }\n if (this.delegate.canRelayout === false) {\n this.hide();\n return;\n }\n if (this.delegate.layout) {\n this.delegate.layout();\n }\n this.doLayout();\n };\n ContextView.prototype.doLayout = function () {\n // Get anchor\n var anchor = this.delegate.getAnchor();\n // Compute around\n var around;\n // Get the element's position and size (to anchor the view)\n if (DOM.isHTMLElement(anchor)) {\n var elementPosition = DOM.getDomNodePagePosition(anchor);\n around = {\n top: elementPosition.top,\n left: elementPosition.left,\n width: elementPosition.width,\n height: elementPosition.height\n };\n }\n else {\n var realAnchor = anchor;\n around = {\n top: realAnchor.y,\n left: realAnchor.x,\n width: realAnchor.width || 0,\n height: realAnchor.height || 0\n };\n }\n var viewSize = this.$view.getTotalSize();\n var anchorPosition = this.delegate.anchorPosition || AnchorPosition.BELOW;\n var anchorAlignment = this.delegate.anchorAlignment || AnchorAlignment.LEFT;\n var verticalAnchor = { offset: around.top, size: around.height, position: anchorPosition === AnchorPosition.BELOW ? LayoutAnchorPosition.Before : LayoutAnchorPosition.After };\n var horizontalAnchor;\n if (anchorAlignment === AnchorAlignment.LEFT) {\n horizontalAnchor = { offset: around.left, size: 0, position: LayoutAnchorPosition.Before };\n }\n else {\n horizontalAnchor = { offset: around.left + around.width, size: 0, position: LayoutAnchorPosition.After };\n }\n var containerPosition = DOM.getDomNodePagePosition(this.$container.getHTMLElement());\n var top = layout(window.innerHeight, viewSize.height, verticalAnchor) - containerPosition.top;\n var left = layout(window.innerWidth, viewSize.width, horizontalAnchor) - containerPosition.left;\n this.$view.removeClass('top', 'bottom', 'left', 'right');\n this.$view.addClass(anchorPosition === AnchorPosition.BELOW ? 'bottom' : 'top');\n this.$view.addClass(anchorAlignment === AnchorAlignment.LEFT ? 'left' : 'right');\n this.$view.style({ top: top + \"px\", left: left + \"px\", width: 'initial' });\n };\n ContextView.prototype.hide = function (data) {\n if (this.delegate && this.delegate.onHide) {\n this.delegate.onHide(data);\n }\n this.delegate = null;\n if (this.toDisposeOnClean) {\n this.toDisposeOnClean.dispose();\n this.toDisposeOnClean = null;\n }\n this.$view.hide();\n };\n ContextView.prototype.isVisible = function () {\n return !!this.delegate;\n };\n ContextView.prototype.onDOMEvent = function (e, element, onCapture) {\n if (this.delegate) {\n if (this.delegate.onDOMEvent) {\n this.delegate.onDOMEvent(e, document.activeElement);\n }\n else if (onCapture && !DOM.isAncestor(e.target, this.$container.getHTMLElement())) {\n this.hide();\n }\n }\n };\n ContextView.prototype.dispose = function () {\n this.hide();\n this.toDispose = dispose(this.toDispose);\n };\n ContextView.BUBBLE_UP_EVENTS = ['click', 'keydown', 'focus', 'blur'];\n ContextView.BUBBLE_DOWN_EVENTS = ['click'];\n return ContextView;\n}());\nexport { ContextView };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nexport var Iterator;\n(function (Iterator) {\n var _empty = {\n next: function () {\n return { done: true, value: undefined };\n }\n };\n function empty() {\n return _empty;\n }\n Iterator.empty = empty;\n function iterate(array, index, length) {\n if (index === void 0) { index = 0; }\n if (length === void 0) { length = array.length; }\n return {\n next: function () {\n if (index >= length) {\n return { done: true, value: undefined };\n }\n return { done: false, value: array[index++] };\n }\n };\n }\n Iterator.iterate = iterate;\n function map(iterator, fn) {\n return {\n next: function () {\n var _a = iterator.next(), done = _a.done, value = _a.value;\n return { done: done, value: done ? undefined : fn(value) };\n }\n };\n }\n Iterator.map = map;\n function filter(iterator, fn) {\n return {\n next: function () {\n while (true) {\n var _a = iterator.next(), done = _a.done, value = _a.value;\n if (done) {\n return { done: done, value: undefined };\n }\n if (fn(value)) {\n return { done: done, value: value };\n }\n }\n }\n };\n }\n Iterator.filter = filter;\n function forEach(iterator, fn) {\n for (var next = iterator.next(); !next.done; next = iterator.next()) {\n fn(next.value);\n }\n }\n Iterator.forEach = forEach;\n function collect(iterator) {\n var result = [];\n forEach(iterator, function (value) { return result.push(value); });\n return result;\n }\n Iterator.collect = collect;\n})(Iterator || (Iterator = {}));\nvar ArrayIterator = /** @class */ (function () {\n function ArrayIterator(items, start, end, index) {\n if (start === void 0) { start = 0; }\n if (end === void 0) { end = items.length; }\n if (index === void 0) { index = start - 1; }\n this.items = items;\n this.start = start;\n this.end = end;\n this.index = index;\n }\n ArrayIterator.prototype.next = function () {\n this.index = Math.min(this.index + 1, this.end);\n return this.current();\n };\n ArrayIterator.prototype.current = function () {\n if (this.index === this.start - 1 || this.index === this.end) {\n return null;\n }\n return this.items[this.index];\n };\n return ArrayIterator;\n}());\nexport { ArrayIterator };\nvar ArrayNavigator = /** @class */ (function (_super) {\n __extends(ArrayNavigator, _super);\n function ArrayNavigator(items, start, end, index) {\n if (start === void 0) { start = 0; }\n if (end === void 0) { end = items.length; }\n if (index === void 0) { index = start - 1; }\n return _super.call(this, items, start, end, index) || this;\n }\n ArrayNavigator.prototype.current = function () {\n return _super.prototype.current.call(this);\n };\n ArrayNavigator.prototype.previous = function () {\n this.index = Math.max(this.index - 1, this.start - 1);\n return this.current();\n };\n ArrayNavigator.prototype.first = function () {\n this.index = this.start;\n return this.current();\n };\n ArrayNavigator.prototype.last = function () {\n this.index = this.end - 1;\n return this.current();\n };\n ArrayNavigator.prototype.parent = function () {\n return null;\n };\n return ArrayNavigator;\n}(ArrayIterator));\nexport { ArrayNavigator };\nvar MappedIterator = /** @class */ (function () {\n function MappedIterator(iterator, fn) {\n this.iterator = iterator;\n this.fn = fn;\n // noop\n }\n MappedIterator.prototype.next = function () { return this.fn(this.iterator.next()); };\n return MappedIterator;\n}());\nexport { MappedIterator };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport './inputBox.css';\nimport * as nls from '../../../../nls';\nimport * as Bal from '../../browser';\nimport * as dom from '../../dom';\nimport { renderFormattedText, renderText } from '../../htmlContentRenderer';\nimport * as aria from '../aria/aria';\nimport { ActionBar } from '../actionbar/actionbar';\nimport { AnchorAlignment } from '../contextview/contextview';\nimport { Emitter } from '../../../common/event';\nimport { Widget } from '../widget';\nimport { Color } from '../../../common/color';\nimport { mixin } from '../../../common/objects';\nimport { HistoryNavigator } from '../../../common/history';\nvar $ = dom.$;\nexport var MessageType;\n(function (MessageType) {\n MessageType[MessageType[\"INFO\"] = 1] = \"INFO\";\n MessageType[MessageType[\"WARNING\"] = 2] = \"WARNING\";\n MessageType[MessageType[\"ERROR\"] = 3] = \"ERROR\";\n})(MessageType || (MessageType = {}));\nvar defaultOpts = {\n inputBackground: Color.fromHex('#3C3C3C'),\n inputForeground: Color.fromHex('#CCCCCC'),\n inputValidationInfoBorder: Color.fromHex('#55AAFF'),\n inputValidationInfoBackground: Color.fromHex('#063B49'),\n inputValidationWarningBorder: Color.fromHex('#B89500'),\n inputValidationWarningBackground: Color.fromHex('#352A05'),\n inputValidationErrorBorder: Color.fromHex('#BE1100'),\n inputValidationErrorBackground: Color.fromHex('#5A1D1D')\n};\nvar InputBox = /** @class */ (function (_super) {\n __extends(InputBox, _super);\n function InputBox(container, contextViewProvider, options) {\n var _this = _super.call(this) || this;\n _this.state = 'idle';\n _this._onDidChange = _this._register(new Emitter());\n _this.onDidChange = _this._onDidChange.event;\n _this._onDidHeightChange = _this._register(new Emitter());\n _this.contextViewProvider = contextViewProvider;\n _this.options = options || Object.create(null);\n mixin(_this.options, defaultOpts, false);\n _this.message = null;\n _this.cachedHeight = null;\n _this.placeholder = _this.options.placeholder || '';\n _this.ariaLabel = _this.options.ariaLabel || '';\n _this.inputBackground = _this.options.inputBackground;\n _this.inputForeground = _this.options.inputForeground;\n _this.inputBorder = _this.options.inputBorder;\n _this.inputValidationInfoBorder = _this.options.inputValidationInfoBorder;\n _this.inputValidationInfoBackground = _this.options.inputValidationInfoBackground;\n _this.inputValidationWarningBorder = _this.options.inputValidationWarningBorder;\n _this.inputValidationWarningBackground = _this.options.inputValidationWarningBackground;\n _this.inputValidationErrorBorder = _this.options.inputValidationErrorBorder;\n _this.inputValidationErrorBackground = _this.options.inputValidationErrorBackground;\n if (_this.options.validationOptions) {\n _this.validation = _this.options.validationOptions.validation;\n }\n _this.element = dom.append(container, $('.monaco-inputbox.idle'));\n var tagName = _this.options.flexibleHeight ? 'textarea' : 'input';\n var wrapper = dom.append(_this.element, $('.wrapper'));\n _this.input = dom.append(wrapper, $(tagName + '.input'));\n _this.input.setAttribute('autocorrect', 'off');\n _this.input.setAttribute('autocapitalize', 'off');\n _this.input.setAttribute('spellcheck', 'false');\n _this.onfocus(_this.input, function () { return dom.addClass(_this.element, 'synthetic-focus'); });\n _this.onblur(_this.input, function () { return dom.removeClass(_this.element, 'synthetic-focus'); });\n if (_this.options.flexibleHeight) {\n _this.mirror = dom.append(wrapper, $('div.mirror'));\n }\n else {\n _this.input.type = _this.options.type || 'text';\n _this.input.setAttribute('wrap', 'off');\n }\n if (_this.ariaLabel) {\n _this.input.setAttribute('aria-label', _this.ariaLabel);\n }\n if (_this.placeholder) {\n _this.setPlaceHolder(_this.placeholder);\n }\n _this.oninput(_this.input, function () { return _this.onValueChange(); });\n _this.onblur(_this.input, function () { return _this.onBlur(); });\n _this.onfocus(_this.input, function () { return _this.onFocus(); });\n // Add placeholder shim for IE because IE decides to hide the placeholder on focus (we dont want that!)\n if (_this.placeholder && Bal.isIE) {\n _this.onclick(_this.input, function (e) {\n dom.EventHelper.stop(e, true);\n _this.input.focus();\n });\n }\n setTimeout(function () {\n if (!_this.input) {\n return;\n }\n _this.updateMirror();\n }, 0);\n // Support actions\n if (_this.options.actions) {\n _this.actionbar = _this._register(new ActionBar(_this.element));\n _this.actionbar.push(_this.options.actions, { icon: true, label: false });\n }\n _this.applyStyles();\n return _this;\n }\n InputBox.prototype.onBlur = function () {\n this._hideMessage();\n };\n InputBox.prototype.onFocus = function () {\n this._showMessage();\n };\n InputBox.prototype.setPlaceHolder = function (placeHolder) {\n if (this.input) {\n this.input.setAttribute('placeholder', placeHolder);\n this.input.title = placeHolder;\n }\n };\n InputBox.prototype.setAriaLabel = function (label) {\n this.ariaLabel = label;\n if (this.input) {\n if (label) {\n this.input.setAttribute('aria-label', this.ariaLabel);\n }\n else {\n this.input.removeAttribute('aria-label');\n }\n }\n };\n Object.defineProperty(InputBox.prototype, \"inputElement\", {\n get: function () {\n return this.input;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(InputBox.prototype, \"value\", {\n get: function () {\n return this.input.value;\n },\n set: function (newValue) {\n if (this.input.value !== newValue) {\n this.input.value = newValue;\n this.onValueChange();\n }\n },\n enumerable: true,\n configurable: true\n });\n InputBox.prototype.focus = function () {\n this.input.focus();\n };\n InputBox.prototype.blur = function () {\n this.input.blur();\n };\n InputBox.prototype.hasFocus = function () {\n return document.activeElement === this.input;\n };\n InputBox.prototype.select = function (range) {\n if (range === void 0) { range = null; }\n this.input.select();\n if (range) {\n this.input.setSelectionRange(range.start, range.end);\n }\n };\n InputBox.prototype.enable = function () {\n this.input.removeAttribute('disabled');\n };\n InputBox.prototype.disable = function () {\n this.input.disabled = true;\n this._hideMessage();\n };\n InputBox.prototype.setEnabled = function (enabled) {\n if (enabled) {\n this.enable();\n }\n else {\n this.disable();\n }\n };\n Object.defineProperty(InputBox.prototype, \"width\", {\n get: function () {\n return dom.getTotalWidth(this.input);\n },\n set: function (width) {\n this.input.style.width = width + 'px';\n },\n enumerable: true,\n configurable: true\n });\n InputBox.prototype.showMessage = function (message, force) {\n this.message = message;\n dom.removeClass(this.element, 'idle');\n dom.removeClass(this.element, 'info');\n dom.removeClass(this.element, 'warning');\n dom.removeClass(this.element, 'error');\n dom.addClass(this.element, this.classForType(message.type));\n var styles = this.stylesForType(this.message.type);\n this.element.style.border = styles.border ? \"1px solid \" + styles.border : null;\n // ARIA Support\n var alertText;\n if (message.type === MessageType.ERROR) {\n alertText = nls.localize('alertErrorMessage', \"Error: {0}\", message.content);\n }\n else if (message.type === MessageType.WARNING) {\n alertText = nls.localize('alertWarningMessage', \"Warning: {0}\", message.content);\n }\n else {\n alertText = nls.localize('alertInfoMessage', \"Info: {0}\", message.content);\n }\n aria.alert(alertText);\n if (this.hasFocus() || force) {\n this._showMessage();\n }\n };\n InputBox.prototype.hideMessage = function () {\n this.message = null;\n dom.removeClass(this.element, 'info');\n dom.removeClass(this.element, 'warning');\n dom.removeClass(this.element, 'error');\n dom.addClass(this.element, 'idle');\n this._hideMessage();\n this.applyStyles();\n };\n InputBox.prototype.validate = function () {\n var errorMsg = null;\n if (this.validation) {\n errorMsg = this.validation(this.value);\n if (errorMsg) {\n this.inputElement.setAttribute('aria-invalid', 'true');\n this.showMessage(errorMsg);\n }\n else if (this.inputElement.hasAttribute('aria-invalid')) {\n this.inputElement.removeAttribute('aria-invalid');\n this.hideMessage();\n }\n }\n return !errorMsg;\n };\n InputBox.prototype.stylesForType = function (type) {\n switch (type) {\n case MessageType.INFO: return { border: this.inputValidationInfoBorder, background: this.inputValidationInfoBackground };\n case MessageType.WARNING: return { border: this.inputValidationWarningBorder, background: this.inputValidationWarningBackground };\n default: return { border: this.inputValidationErrorBorder, background: this.inputValidationErrorBackground };\n }\n };\n InputBox.prototype.classForType = function (type) {\n switch (type) {\n case MessageType.INFO: return 'info';\n case MessageType.WARNING: return 'warning';\n default: return 'error';\n }\n };\n InputBox.prototype._showMessage = function () {\n var _this = this;\n if (!this.contextViewProvider || !this.message) {\n return;\n }\n var div;\n var layout = function () { return div.style.width = dom.getTotalWidth(_this.element) + 'px'; };\n this.state = 'open';\n this.contextViewProvider.showContextView({\n getAnchor: function () { return _this.element; },\n anchorAlignment: AnchorAlignment.RIGHT,\n render: function (container) {\n div = dom.append(container, $('.monaco-inputbox-container'));\n layout();\n var renderOptions = {\n inline: true,\n className: 'monaco-inputbox-message'\n };\n var spanElement = (_this.message.formatContent\n ? renderFormattedText(_this.message.content, renderOptions)\n : renderText(_this.message.content, renderOptions));\n dom.addClass(spanElement, _this.classForType(_this.message.type));\n var styles = _this.stylesForType(_this.message.type);\n spanElement.style.backgroundColor = styles.background ? styles.background.toString() : null;\n spanElement.style.border = styles.border ? \"1px solid \" + styles.border : null;\n dom.append(div, spanElement);\n return null;\n },\n layout: layout\n });\n };\n InputBox.prototype._hideMessage = function () {\n if (!this.contextViewProvider || this.state !== 'open') {\n return;\n }\n this.state = 'idle';\n this.contextViewProvider.hideContextView();\n };\n InputBox.prototype.onValueChange = function () {\n this._onDidChange.fire(this.value);\n this.validate();\n this.updateMirror();\n if (this.state === 'open') {\n this.contextViewProvider.layout();\n }\n };\n InputBox.prototype.updateMirror = function () {\n if (!this.mirror) {\n return;\n }\n var value = this.value || this.placeholder;\n var lastCharCode = value.charCodeAt(value.length - 1);\n var suffix = lastCharCode === 10 ? ' ' : '';\n this.mirror.textContent = value + suffix;\n this.layout();\n };\n InputBox.prototype.style = function (styles) {\n this.inputBackground = styles.inputBackground;\n this.inputForeground = styles.inputForeground;\n this.inputBorder = styles.inputBorder;\n this.inputValidationInfoBackground = styles.inputValidationInfoBackground;\n this.inputValidationInfoBorder = styles.inputValidationInfoBorder;\n this.inputValidationWarningBackground = styles.inputValidationWarningBackground;\n this.inputValidationWarningBorder = styles.inputValidationWarningBorder;\n this.inputValidationErrorBackground = styles.inputValidationErrorBackground;\n this.inputValidationErrorBorder = styles.inputValidationErrorBorder;\n this.applyStyles();\n };\n InputBox.prototype.applyStyles = function () {\n if (this.element) {\n var background = this.inputBackground ? this.inputBackground.toString() : null;\n var foreground = this.inputForeground ? this.inputForeground.toString() : null;\n var border = this.inputBorder ? this.inputBorder.toString() : null;\n this.element.style.backgroundColor = background;\n this.element.style.color = foreground;\n this.input.style.backgroundColor = background;\n this.input.style.color = foreground;\n this.element.style.borderWidth = border ? '1px' : null;\n this.element.style.borderStyle = border ? 'solid' : null;\n this.element.style.borderColor = border;\n }\n };\n InputBox.prototype.layout = function () {\n if (!this.mirror) {\n return;\n }\n var previousHeight = this.cachedHeight;\n this.cachedHeight = dom.getTotalHeight(this.mirror);\n if (previousHeight !== this.cachedHeight) {\n this.input.style.height = this.cachedHeight + 'px';\n this._onDidHeightChange.fire(this.cachedHeight);\n }\n };\n InputBox.prototype.dispose = function () {\n this._hideMessage();\n this.element = null;\n this.input = null;\n this.contextViewProvider = null;\n this.message = null;\n this.placeholder = null;\n this.ariaLabel = null;\n this.validation = null;\n this.state = null;\n this.actionbar = null;\n _super.prototype.dispose.call(this);\n };\n return InputBox;\n}(Widget));\nexport { InputBox };\nvar HistoryInputBox = /** @class */ (function (_super) {\n __extends(HistoryInputBox, _super);\n function HistoryInputBox(container, contextViewProvider, options) {\n var _this = _super.call(this, container, contextViewProvider, options) || this;\n _this.history = new HistoryNavigator(options.history, 100);\n return _this;\n }\n HistoryInputBox.prototype.addToHistory = function () {\n if (this.value && this.value !== this.getCurrentValue()) {\n this.history.add(this.value);\n }\n };\n HistoryInputBox.prototype.showNextValue = function () {\n if (!this.history.has(this.value)) {\n this.addToHistory();\n }\n var next = this.getNextValue();\n if (next) {\n next = next === this.value ? this.getNextValue() : next;\n }\n if (next) {\n this.value = next;\n aria.status(this.value);\n }\n };\n HistoryInputBox.prototype.showPreviousValue = function () {\n if (!this.history.has(this.value)) {\n this.addToHistory();\n }\n var previous = this.getPreviousValue();\n if (previous) {\n previous = previous === this.value ? this.getPreviousValue() : previous;\n }\n if (previous) {\n this.value = previous;\n aria.status(this.value);\n }\n };\n HistoryInputBox.prototype.getCurrentValue = function () {\n var currentValue = this.history.current();\n if (!currentValue) {\n currentValue = this.history.last();\n this.history.next();\n }\n return currentValue;\n };\n HistoryInputBox.prototype.getPreviousValue = function () {\n return this.history.previous() || this.history.first();\n };\n HistoryInputBox.prototype.getNextValue = function () {\n return this.history.next() || this.history.last();\n };\n return HistoryInputBox;\n}(InputBox));\nexport { HistoryInputBox };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { ArrayNavigator } from './iterator';\nvar HistoryNavigator = /** @class */ (function () {\n function HistoryNavigator(history, limit) {\n if (history === void 0) { history = []; }\n if (limit === void 0) { limit = 10; }\n this._initialize(history);\n this._limit = limit;\n this._onChange();\n }\n HistoryNavigator.prototype.add = function (t) {\n this._history.delete(t);\n this._history.add(t);\n this._onChange();\n };\n HistoryNavigator.prototype.next = function () {\n return this._navigator.next();\n };\n HistoryNavigator.prototype.previous = function () {\n return this._navigator.previous();\n };\n HistoryNavigator.prototype.current = function () {\n return this._navigator.current();\n };\n HistoryNavigator.prototype.parent = function () {\n return null;\n };\n HistoryNavigator.prototype.first = function () {\n return this._navigator.first();\n };\n HistoryNavigator.prototype.last = function () {\n return this._navigator.last();\n };\n HistoryNavigator.prototype.has = function (t) {\n return this._history.has(t);\n };\n HistoryNavigator.prototype._onChange = function () {\n this._reduceToLimit();\n this._navigator = new ArrayNavigator(this._elements, 0, this._elements.length, this._elements.length);\n };\n HistoryNavigator.prototype._reduceToLimit = function () {\n var data = this._elements;\n if (data.length > this._limit) {\n this._initialize(data.slice(data.length - this._limit));\n }\n };\n HistoryNavigator.prototype._initialize = function (history) {\n this._history = new Set();\n for (var _i = 0, history_1 = history; _i < history_1.length; _i++) {\n var entry = history_1[_i];\n this._history.add(entry);\n }\n };\n Object.defineProperty(HistoryNavigator.prototype, \"_elements\", {\n get: function () {\n var elements = [];\n this._history.forEach(function (e) { return elements.push(e); });\n return elements;\n },\n enumerable: true,\n configurable: true\n });\n return HistoryNavigator;\n}());\nexport { HistoryNavigator };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport './checkbox.css';\nimport * as DOM from '../../dom';\nimport { Widget } from '../widget';\nimport { Color } from '../../../common/color';\nimport { Emitter } from '../../../common/event';\nimport * as objects from '../../../common/objects';\nvar defaultOpts = {\n inputActiveOptionBorder: Color.fromHex('#007ACC')\n};\nvar Checkbox = /** @class */ (function (_super) {\n __extends(Checkbox, _super);\n function Checkbox(opts) {\n var _this = _super.call(this) || this;\n _this._onChange = _this._register(new Emitter());\n _this._onKeyDown = _this._register(new Emitter());\n _this._opts = objects.deepClone(opts);\n objects.mixin(_this._opts, defaultOpts, false);\n _this._checked = _this._opts.isChecked;\n _this.domNode = document.createElement('div');\n _this.domNode.title = _this._opts.title;\n _this.domNode.className = 'monaco-custom-checkbox ' + _this._opts.actionClassName + ' ' + (_this._checked ? 'checked' : 'unchecked');\n _this.domNode.tabIndex = 0;\n _this.domNode.setAttribute('role', 'checkbox');\n _this.domNode.setAttribute('aria-checked', String(_this._checked));\n _this.domNode.setAttribute('aria-label', _this._opts.title);\n _this.applyStyles();\n _this.onclick(_this.domNode, function (ev) {\n _this.checked = !_this._checked;\n _this._onChange.fire(false);\n ev.preventDefault();\n });\n _this.onkeydown(_this.domNode, function (keyboardEvent) {\n if (keyboardEvent.keyCode === 10 /* Space */ || keyboardEvent.keyCode === 3 /* Enter */) {\n _this.checked = !_this._checked;\n _this._onChange.fire(true);\n keyboardEvent.preventDefault();\n return;\n }\n _this._onKeyDown.fire(keyboardEvent);\n });\n return _this;\n }\n Object.defineProperty(Checkbox.prototype, \"onChange\", {\n get: function () { return this._onChange.event; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Checkbox.prototype, \"onKeyDown\", {\n get: function () { return this._onKeyDown.event; },\n enumerable: true,\n configurable: true\n });\n Checkbox.prototype.focus = function () {\n this.domNode.focus();\n };\n Object.defineProperty(Checkbox.prototype, \"checked\", {\n get: function () {\n return this._checked;\n },\n set: function (newIsChecked) {\n this._checked = newIsChecked;\n this.domNode.setAttribute('aria-checked', String(this._checked));\n if (this._checked) {\n this.domNode.classList.add('checked');\n }\n else {\n this.domNode.classList.remove('checked');\n }\n this.applyStyles();\n },\n enumerable: true,\n configurable: true\n });\n Checkbox.prototype.width = function () {\n return 2 /*marginleft*/ + 2 /*border*/ + 2 /*padding*/ + 16 /* icon width */;\n };\n Checkbox.prototype.style = function (styles) {\n if (styles.inputActiveOptionBorder) {\n this._opts.inputActiveOptionBorder = styles.inputActiveOptionBorder;\n }\n this.applyStyles();\n };\n Checkbox.prototype.applyStyles = function () {\n if (this.domNode) {\n this.domNode.style.borderColor = this._checked && this._opts.inputActiveOptionBorder ? this._opts.inputActiveOptionBorder.toString() : 'transparent';\n }\n };\n Checkbox.prototype.enable = function () {\n this.domNode.tabIndex = 0;\n this.domNode.setAttribute('aria-disabled', String(false));\n };\n Checkbox.prototype.disable = function () {\n DOM.removeTabIndexAndUpdateFocus(this.domNode);\n this.domNode.setAttribute('aria-disabled', String(true));\n };\n return Checkbox;\n}(Widget));\nexport { Checkbox };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { Checkbox } from '../checkbox/checkbox';\nimport './findInputCheckboxes.css';\nimport * as nls from '../../../../nls';\nvar NLS_CASE_SENSITIVE_CHECKBOX_LABEL = nls.localize('caseDescription', \"Match Case\");\nvar NLS_WHOLE_WORD_CHECKBOX_LABEL = nls.localize('wordsDescription', \"Match Whole Word\");\nvar NLS_REGEX_CHECKBOX_LABEL = nls.localize('regexDescription', \"Use Regular Expression\");\nvar CaseSensitiveCheckbox = /** @class */ (function (_super) {\n __extends(CaseSensitiveCheckbox, _super);\n function CaseSensitiveCheckbox(opts) {\n return _super.call(this, {\n actionClassName: 'monaco-case-sensitive',\n title: NLS_CASE_SENSITIVE_CHECKBOX_LABEL + opts.appendTitle,\n isChecked: opts.isChecked,\n inputActiveOptionBorder: opts.inputActiveOptionBorder\n }) || this;\n }\n return CaseSensitiveCheckbox;\n}(Checkbox));\nexport { CaseSensitiveCheckbox };\nvar WholeWordsCheckbox = /** @class */ (function (_super) {\n __extends(WholeWordsCheckbox, _super);\n function WholeWordsCheckbox(opts) {\n return _super.call(this, {\n actionClassName: 'monaco-whole-word',\n title: NLS_WHOLE_WORD_CHECKBOX_LABEL + opts.appendTitle,\n isChecked: opts.isChecked,\n inputActiveOptionBorder: opts.inputActiveOptionBorder\n }) || this;\n }\n return WholeWordsCheckbox;\n}(Checkbox));\nexport { WholeWordsCheckbox };\nvar RegexCheckbox = /** @class */ (function (_super) {\n __extends(RegexCheckbox, _super);\n function RegexCheckbox(opts) {\n return _super.call(this, {\n actionClassName: 'monaco-regex',\n title: NLS_REGEX_CHECKBOX_LABEL + opts.appendTitle,\n isChecked: opts.isChecked,\n inputActiveOptionBorder: opts.inputActiveOptionBorder\n }) || this;\n }\n return RegexCheckbox;\n}(Checkbox));\nexport { RegexCheckbox };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport './findInput.css';\nimport * as nls from '../../../../nls';\nimport * as dom from '../../dom';\nimport { HistoryInputBox } from '../inputbox/inputBox';\nimport { Widget } from '../widget';\nimport { Emitter } from '../../../common/event';\nimport { CaseSensitiveCheckbox, WholeWordsCheckbox, RegexCheckbox } from './findInputCheckboxes';\nvar NLS_DEFAULT_LABEL = nls.localize('defaultLabel', \"input\");\nvar FindInput = /** @class */ (function (_super) {\n __extends(FindInput, _super);\n function FindInput(parent, contextViewProvider, options) {\n var _this = _super.call(this) || this;\n _this._onDidOptionChange = _this._register(new Emitter());\n _this.onDidOptionChange = _this._onDidOptionChange.event;\n _this._onKeyDown = _this._register(new Emitter());\n _this.onKeyDown = _this._onKeyDown.event;\n _this._onMouseDown = _this._register(new Emitter());\n _this.onMouseDown = _this._onMouseDown.event;\n _this._onInput = _this._register(new Emitter());\n _this._onKeyUp = _this._register(new Emitter());\n _this._onCaseSensitiveKeyDown = _this._register(new Emitter());\n _this.onCaseSensitiveKeyDown = _this._onCaseSensitiveKeyDown.event;\n _this._onRegexKeyDown = _this._register(new Emitter());\n _this._lastHighlightFindOptions = 0;\n _this.contextViewProvider = contextViewProvider;\n _this.width = options.width || 100;\n _this.placeholder = options.placeholder || '';\n _this.validation = options.validation;\n _this.label = options.label || NLS_DEFAULT_LABEL;\n _this.inputActiveOptionBorder = options.inputActiveOptionBorder;\n _this.inputBackground = options.inputBackground;\n _this.inputForeground = options.inputForeground;\n _this.inputBorder = options.inputBorder;\n _this.inputValidationInfoBorder = options.inputValidationInfoBorder;\n _this.inputValidationInfoBackground = options.inputValidationInfoBackground;\n _this.inputValidationWarningBorder = options.inputValidationWarningBorder;\n _this.inputValidationWarningBackground = options.inputValidationWarningBackground;\n _this.inputValidationErrorBorder = options.inputValidationErrorBorder;\n _this.inputValidationErrorBackground = options.inputValidationErrorBackground;\n _this.regex = null;\n _this.wholeWords = null;\n _this.caseSensitive = null;\n _this.domNode = null;\n _this.inputBox = null;\n _this.buildDomNode(options.appendCaseSensitiveLabel || '', options.appendWholeWordsLabel || '', options.appendRegexLabel || '', options.history);\n if (Boolean(parent)) {\n parent.appendChild(_this.domNode);\n }\n _this.onkeydown(_this.inputBox.inputElement, function (e) { return _this._onKeyDown.fire(e); });\n _this.onkeyup(_this.inputBox.inputElement, function (e) { return _this._onKeyUp.fire(e); });\n _this.oninput(_this.inputBox.inputElement, function (e) { return _this._onInput.fire(); });\n _this.onmousedown(_this.inputBox.inputElement, function (e) { return _this._onMouseDown.fire(e); });\n return _this;\n }\n FindInput.prototype.enable = function () {\n dom.removeClass(this.domNode, 'disabled');\n this.inputBox.enable();\n this.regex.enable();\n this.wholeWords.enable();\n this.caseSensitive.enable();\n };\n FindInput.prototype.disable = function () {\n dom.addClass(this.domNode, 'disabled');\n this.inputBox.disable();\n this.regex.disable();\n this.wholeWords.disable();\n this.caseSensitive.disable();\n };\n FindInput.prototype.setEnabled = function (enabled) {\n if (enabled) {\n this.enable();\n }\n else {\n this.disable();\n }\n };\n FindInput.prototype.getValue = function () {\n return this.inputBox.value;\n };\n FindInput.prototype.setValue = function (value) {\n if (this.inputBox.value !== value) {\n this.inputBox.value = value;\n }\n };\n FindInput.prototype.style = function (styles) {\n this.inputActiveOptionBorder = styles.inputActiveOptionBorder;\n this.inputBackground = styles.inputBackground;\n this.inputForeground = styles.inputForeground;\n this.inputBorder = styles.inputBorder;\n this.inputValidationInfoBackground = styles.inputValidationInfoBackground;\n this.inputValidationInfoBorder = styles.inputValidationInfoBorder;\n this.inputValidationWarningBackground = styles.inputValidationWarningBackground;\n this.inputValidationWarningBorder = styles.inputValidationWarningBorder;\n this.inputValidationErrorBackground = styles.inputValidationErrorBackground;\n this.inputValidationErrorBorder = styles.inputValidationErrorBorder;\n this.applyStyles();\n };\n FindInput.prototype.applyStyles = function () {\n if (this.domNode) {\n var checkBoxStyles = {\n inputActiveOptionBorder: this.inputActiveOptionBorder,\n };\n this.regex.style(checkBoxStyles);\n this.wholeWords.style(checkBoxStyles);\n this.caseSensitive.style(checkBoxStyles);\n var inputBoxStyles = {\n inputBackground: this.inputBackground,\n inputForeground: this.inputForeground,\n inputBorder: this.inputBorder,\n inputValidationInfoBackground: this.inputValidationInfoBackground,\n inputValidationInfoBorder: this.inputValidationInfoBorder,\n inputValidationWarningBackground: this.inputValidationWarningBackground,\n inputValidationWarningBorder: this.inputValidationWarningBorder,\n inputValidationErrorBackground: this.inputValidationErrorBackground,\n inputValidationErrorBorder: this.inputValidationErrorBorder\n };\n this.inputBox.style(inputBoxStyles);\n }\n };\n FindInput.prototype.select = function () {\n this.inputBox.select();\n };\n FindInput.prototype.focus = function () {\n this.inputBox.focus();\n };\n FindInput.prototype.getCaseSensitive = function () {\n return this.caseSensitive.checked;\n };\n FindInput.prototype.setCaseSensitive = function (value) {\n this.caseSensitive.checked = value;\n this.setInputWidth();\n };\n FindInput.prototype.getWholeWords = function () {\n return this.wholeWords.checked;\n };\n FindInput.prototype.setWholeWords = function (value) {\n this.wholeWords.checked = value;\n this.setInputWidth();\n };\n FindInput.prototype.getRegex = function () {\n return this.regex.checked;\n };\n FindInput.prototype.setRegex = function (value) {\n this.regex.checked = value;\n this.setInputWidth();\n this.validate();\n };\n FindInput.prototype.focusOnCaseSensitive = function () {\n this.caseSensitive.focus();\n };\n FindInput.prototype.highlightFindOptions = function () {\n dom.removeClass(this.domNode, 'highlight-' + (this._lastHighlightFindOptions));\n this._lastHighlightFindOptions = 1 - this._lastHighlightFindOptions;\n dom.addClass(this.domNode, 'highlight-' + (this._lastHighlightFindOptions));\n };\n FindInput.prototype.setInputWidth = function () {\n var w = this.width - this.caseSensitive.width() - this.wholeWords.width() - this.regex.width();\n this.inputBox.width = w;\n };\n FindInput.prototype.buildDomNode = function (appendCaseSensitiveLabel, appendWholeWordsLabel, appendRegexLabel, history) {\n var _this = this;\n this.domNode = document.createElement('div');\n this.domNode.style.width = this.width + 'px';\n dom.addClass(this.domNode, 'monaco-findInput');\n this.inputBox = this._register(new HistoryInputBox(this.domNode, this.contextViewProvider, {\n placeholder: this.placeholder || '',\n ariaLabel: this.label || '',\n validationOptions: {\n validation: this.validation || null\n },\n inputBackground: this.inputBackground,\n inputForeground: this.inputForeground,\n inputBorder: this.inputBorder,\n inputValidationInfoBackground: this.inputValidationInfoBackground,\n inputValidationInfoBorder: this.inputValidationInfoBorder,\n inputValidationWarningBackground: this.inputValidationWarningBackground,\n inputValidationWarningBorder: this.inputValidationWarningBorder,\n inputValidationErrorBackground: this.inputValidationErrorBackground,\n inputValidationErrorBorder: this.inputValidationErrorBorder,\n history: history\n }));\n this.regex = this._register(new RegexCheckbox({\n appendTitle: appendRegexLabel,\n isChecked: false,\n inputActiveOptionBorder: this.inputActiveOptionBorder\n }));\n this._register(this.regex.onChange(function (viaKeyboard) {\n _this._onDidOptionChange.fire(viaKeyboard);\n if (!viaKeyboard) {\n _this.inputBox.focus();\n }\n _this.setInputWidth();\n _this.validate();\n }));\n this._register(this.regex.onKeyDown(function (e) {\n _this._onRegexKeyDown.fire(e);\n }));\n this.wholeWords = this._register(new WholeWordsCheckbox({\n appendTitle: appendWholeWordsLabel,\n isChecked: false,\n inputActiveOptionBorder: this.inputActiveOptionBorder\n }));\n this._register(this.wholeWords.onChange(function (viaKeyboard) {\n _this._onDidOptionChange.fire(viaKeyboard);\n if (!viaKeyboard) {\n _this.inputBox.focus();\n }\n _this.setInputWidth();\n _this.validate();\n }));\n this.caseSensitive = this._register(new CaseSensitiveCheckbox({\n appendTitle: appendCaseSensitiveLabel,\n isChecked: false,\n inputActiveOptionBorder: this.inputActiveOptionBorder\n }));\n this._register(this.caseSensitive.onChange(function (viaKeyboard) {\n _this._onDidOptionChange.fire(viaKeyboard);\n if (!viaKeyboard) {\n _this.inputBox.focus();\n }\n _this.setInputWidth();\n _this.validate();\n }));\n this._register(this.caseSensitive.onKeyDown(function (e) {\n _this._onCaseSensitiveKeyDown.fire(e);\n }));\n // Arrow-Key support to navigate between options\n var indexes = [this.caseSensitive.domNode, this.wholeWords.domNode, this.regex.domNode];\n this.onkeydown(this.domNode, function (event) {\n if (event.equals(15 /* LeftArrow */) || event.equals(17 /* RightArrow */) || event.equals(9 /* Escape */)) {\n var index = indexes.indexOf(document.activeElement);\n if (index >= 0) {\n var newIndex = void 0;\n if (event.equals(17 /* RightArrow */)) {\n newIndex = (index + 1) % indexes.length;\n }\n else if (event.equals(15 /* LeftArrow */)) {\n if (index === 0) {\n newIndex = indexes.length - 1;\n }\n else {\n newIndex = index - 1;\n }\n }\n if (event.equals(9 /* Escape */)) {\n indexes[index].blur();\n }\n else if (newIndex >= 0) {\n indexes[newIndex].focus();\n }\n dom.EventHelper.stop(event, true);\n }\n }\n });\n this.setInputWidth();\n var controls = document.createElement('div');\n controls.className = 'controls';\n controls.appendChild(this.caseSensitive.domNode);\n controls.appendChild(this.wholeWords.domNode);\n controls.appendChild(this.regex.domNode);\n this.domNode.appendChild(controls);\n };\n FindInput.prototype.validate = function () {\n this.inputBox.validate();\n };\n FindInput.prototype.dispose = function () {\n _super.prototype.dispose.call(this);\n };\n return FindInput;\n}(Widget));\nexport { FindInput };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport { RawContextKey } from '../../contextkey/common/contextkey';\nexport function bindContextScopedWidget(contextKeyService, widget, contextKey) {\n new RawContextKey(contextKey, widget).bindTo(contextKeyService);\n}\nexport function createWidgetScopedContextKeyService(contextKeyService, widget) {\n return contextKeyService.createScoped(widget.target);\n}\nexport function getContextScopedWidget(contextKeyService, contextKey) {\n return contextKeyService.getContext(document.activeElement).getValue(contextKey);\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __param = (this && this.__param) || function (paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n};\nimport { IContextKeyService, ContextKeyDefinedExpr, ContextKeyExpr, ContextKeyAndExpr, ContextKeyEqualsExpr, RawContextKey } from '../../contextkey/common/contextkey';\nimport { HistoryInputBox } from '../../../base/browser/ui/inputbox/inputBox';\nimport { FindInput } from '../../../base/browser/ui/findinput/findInput';\nimport { getContextScopedWidget, createWidgetScopedContextKeyService, bindContextScopedWidget } from '../common/contextScopedWidget';\nimport { KeybindingsRegistry } from '../../keybinding/common/keybindingsRegistry';\nexport var HistoryNavigationWidgetContext = 'historyNavigationWidget';\nexport var HistoryNavigationEnablementContext = 'historyNavigationEnabled';\nexport function createAndBindHistoryNavigationWidgetScopedContextKeyService(contextKeyService, widget) {\n var scopedContextKeyService = createWidgetScopedContextKeyService(contextKeyService, widget);\n bindContextScopedWidget(scopedContextKeyService, widget, HistoryNavigationWidgetContext);\n var historyNavigationEnablement = new RawContextKey(HistoryNavigationEnablementContext, true).bindTo(scopedContextKeyService);\n return { scopedContextKeyService: scopedContextKeyService, historyNavigationEnablement: historyNavigationEnablement };\n}\nvar ContextScopedHistoryInputBox = /** @class */ (function (_super) {\n __extends(ContextScopedHistoryInputBox, _super);\n function ContextScopedHistoryInputBox(container, contextViewProvider, options, contextKeyService) {\n var _this = _super.call(this, container, contextViewProvider, options) || this;\n _this._register(createAndBindHistoryNavigationWidgetScopedContextKeyService(contextKeyService, { target: _this.element, historyNavigator: _this }).scopedContextKeyService);\n return _this;\n }\n ContextScopedHistoryInputBox = __decorate([\n __param(3, IContextKeyService)\n ], ContextScopedHistoryInputBox);\n return ContextScopedHistoryInputBox;\n}(HistoryInputBox));\nexport { ContextScopedHistoryInputBox };\nvar ContextScopedFindInput = /** @class */ (function (_super) {\n __extends(ContextScopedFindInput, _super);\n function ContextScopedFindInput(container, contextViewProvider, options, contextKeyService) {\n var _this = _super.call(this, container, contextViewProvider, options) || this;\n _this._register(createAndBindHistoryNavigationWidgetScopedContextKeyService(contextKeyService, { target: _this.inputBox.element, historyNavigator: _this.inputBox }).scopedContextKeyService);\n return _this;\n }\n ContextScopedFindInput = __decorate([\n __param(3, IContextKeyService)\n ], ContextScopedFindInput);\n return ContextScopedFindInput;\n}(FindInput));\nexport { ContextScopedFindInput };\nKeybindingsRegistry.registerCommandAndKeybindingRule({\n id: 'history.showPrevious',\n weight: 200 /* WorkbenchContrib */,\n when: ContextKeyExpr.and(new ContextKeyDefinedExpr(HistoryNavigationWidgetContext), new ContextKeyEqualsExpr(HistoryNavigationEnablementContext, true)),\n primary: 16 /* UpArrow */,\n secondary: [512 /* Alt */ | 16 /* UpArrow */],\n handler: function (accessor, arg2) {\n var historyInputBox = getContextScopedWidget(accessor.get(IContextKeyService), HistoryNavigationWidgetContext).historyNavigator;\n historyInputBox.showPreviousValue();\n }\n});\nKeybindingsRegistry.registerCommandAndKeybindingRule({\n id: 'history.showNext',\n weight: 200 /* WorkbenchContrib */,\n when: new ContextKeyAndExpr([new ContextKeyDefinedExpr(HistoryNavigationWidgetContext), new ContextKeyEqualsExpr(HistoryNavigationEnablementContext, true)]),\n primary: 18 /* DownArrow */,\n secondary: [512 /* Alt */ | 18 /* DownArrow */],\n handler: function (accessor, arg2) {\n var historyInputBox = getContextScopedWidget(accessor.get(IContextKeyService), HistoryNavigationWidgetContext).historyNavigator;\n historyInputBox.showNextValue();\n }\n});\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport './findWidget.css';\nimport * as nls from '../../../nls';\nimport { onUnexpectedError } from '../../../base/common/errors';\nimport * as platform from '../../../base/common/platform';\nimport * as strings from '../../../base/common/strings';\nimport { Delayer } from '../../../base/common/async';\nimport * as dom from '../../../base/browser/dom';\nimport { Widget } from '../../../base/browser/ui/widget';\nimport { Sash, Orientation } from '../../../base/browser/ui/sash/sash';\nimport { OverlayWidgetPositionPreference } from '../../browser/editorBrowser';\nimport { FIND_IDS, MATCHES_LIMIT, CONTEXT_FIND_INPUT_FOCUSED, CONTEXT_REPLACE_INPUT_FOCUSED } from './findModel';\nimport { Range } from '../../common/core/range';\nimport { registerThemingParticipant } from '../../../platform/theme/common/themeService';\nimport { editorFindRangeHighlight, editorFindMatch, editorFindMatchHighlight, contrastBorder, inputBackground, editorWidgetBackground, inputActiveOptionBorder, widgetShadow, inputForeground, inputBorder, inputValidationInfoBackground, inputValidationInfoBorder, inputValidationWarningBackground, inputValidationWarningBorder, inputValidationErrorBackground, inputValidationErrorBorder, errorForeground, editorWidgetBorder, editorFindMatchBorder, editorFindMatchHighlightBorder, editorFindRangeHighlightBorder, editorWidgetResizeBorder } from '../../../platform/theme/common/colorRegistry';\nimport { ContextScopedFindInput, ContextScopedHistoryInputBox } from '../../../platform/widget/browser/contextScopedHistoryWidget';\nvar NLS_FIND_INPUT_LABEL = nls.localize('label.find', \"Find\");\nvar NLS_FIND_INPUT_PLACEHOLDER = nls.localize('placeholder.find', \"Find\");\nvar NLS_PREVIOUS_MATCH_BTN_LABEL = nls.localize('label.previousMatchButton', \"Previous match\");\nvar NLS_NEXT_MATCH_BTN_LABEL = nls.localize('label.nextMatchButton', \"Next match\");\nvar NLS_TOGGLE_SELECTION_FIND_TITLE = nls.localize('label.toggleSelectionFind', \"Find in selection\");\nvar NLS_CLOSE_BTN_LABEL = nls.localize('label.closeButton', \"Close\");\nvar NLS_REPLACE_INPUT_LABEL = nls.localize('label.replace', \"Replace\");\nvar NLS_REPLACE_INPUT_PLACEHOLDER = nls.localize('placeholder.replace', \"Replace\");\nvar NLS_REPLACE_BTN_LABEL = nls.localize('label.replaceButton', \"Replace\");\nvar NLS_REPLACE_ALL_BTN_LABEL = nls.localize('label.replaceAllButton', \"Replace All\");\nvar NLS_TOGGLE_REPLACE_MODE_BTN_LABEL = nls.localize('label.toggleReplaceButton', \"Toggle Replace mode\");\nvar NLS_MATCHES_COUNT_LIMIT_TITLE = nls.localize('title.matchesCountLimit', \"Only the first {0} results are highlighted, but all find operations work on the entire text.\", MATCHES_LIMIT);\nvar NLS_MATCHES_LOCATION = nls.localize('label.matchesLocation', \"{0} of {1}\");\nvar NLS_NO_RESULTS = nls.localize('label.noResults', \"No Results\");\nvar FIND_WIDGET_INITIAL_WIDTH = 411;\nvar PART_WIDTH = 275;\nvar FIND_INPUT_AREA_WIDTH = PART_WIDTH - 54;\nvar REPLACE_INPUT_AREA_WIDTH = FIND_INPUT_AREA_WIDTH;\nvar MAX_MATCHES_COUNT_WIDTH = 69;\nvar FIND_ALL_CONTROLS_WIDTH = 17 /** Find Input margin-left */ + (MAX_MATCHES_COUNT_WIDTH + 3 + 1) /** Match Results */ + 23 /** Button */ * 4 + 2 /** sash */;\nvar FIND_INPUT_AREA_HEIGHT = 34; // The height of Find Widget when Replace Input is not visible.\nvar FIND_REPLACE_AREA_HEIGHT = 64; // The height of Find Widget when Replace Input is visible.\nvar FindWidgetViewZone = /** @class */ (function () {\n function FindWidgetViewZone(afterLineNumber) {\n this.afterLineNumber = afterLineNumber;\n this.heightInPx = FIND_INPUT_AREA_HEIGHT;\n this.suppressMouseDown = false;\n this.domNode = document.createElement('div');\n this.domNode.className = 'dock-find-viewzone';\n }\n return FindWidgetViewZone;\n}());\nexport { FindWidgetViewZone };\nvar FindWidget = /** @class */ (function (_super) {\n __extends(FindWidget, _super);\n function FindWidget(codeEditor, controller, state, contextViewProvider, keybindingService, contextKeyService, themeService) {\n var _this = _super.call(this) || this;\n _this._codeEditor = codeEditor;\n _this._controller = controller;\n _this._state = state;\n _this._contextViewProvider = contextViewProvider;\n _this._keybindingService = keybindingService;\n _this._contextKeyService = contextKeyService;\n _this._isVisible = false;\n _this._isReplaceVisible = false;\n _this._updateHistoryDelayer = new Delayer(500);\n _this._register(_this._state.onFindReplaceStateChange(function (e) { return _this._onStateChanged(e); }));\n _this._buildDomNode();\n _this._updateButtons();\n _this._tryUpdateWidgetWidth();\n _this._register(_this._codeEditor.onDidChangeConfiguration(function (e) {\n if (e.readOnly) {\n if (_this._codeEditor.getConfiguration().readOnly) {\n // Hide replace part if editor becomes read only\n _this._state.change({ isReplaceRevealed: false }, false);\n }\n _this._updateButtons();\n }\n if (e.layoutInfo) {\n _this._tryUpdateWidgetWidth();\n }\n }));\n _this._register(_this._codeEditor.onDidChangeCursorSelection(function () {\n if (_this._isVisible) {\n _this._updateToggleSelectionFindButton();\n }\n }));\n _this._register(_this._codeEditor.onDidFocusEditorWidget(function () {\n if (_this._isVisible) {\n var globalBufferTerm = _this._controller.getGlobalBufferTerm();\n if (globalBufferTerm && globalBufferTerm !== _this._state.searchString) {\n _this._state.change({ searchString: globalBufferTerm }, true);\n _this._findInput.select();\n }\n }\n }));\n _this._findInputFocused = CONTEXT_FIND_INPUT_FOCUSED.bindTo(contextKeyService);\n _this._findFocusTracker = _this._register(dom.trackFocus(_this._findInput.inputBox.inputElement));\n _this._register(_this._findFocusTracker.onDidFocus(function () {\n _this._findInputFocused.set(true);\n _this._updateSearchScope();\n }));\n _this._register(_this._findFocusTracker.onDidBlur(function () {\n _this._findInputFocused.set(false);\n }));\n _this._replaceInputFocused = CONTEXT_REPLACE_INPUT_FOCUSED.bindTo(contextKeyService);\n _this._replaceFocusTracker = _this._register(dom.trackFocus(_this._replaceInputBox.inputElement));\n _this._register(_this._replaceFocusTracker.onDidFocus(function () {\n _this._replaceInputFocused.set(true);\n _this._updateSearchScope();\n }));\n _this._register(_this._replaceFocusTracker.onDidBlur(function () {\n _this._replaceInputFocused.set(false);\n }));\n _this._codeEditor.addOverlayWidget(_this);\n _this._viewZone = new FindWidgetViewZone(0); // Put it before the first line then users can scroll beyond the first line.\n _this._applyTheme(themeService.getTheme());\n _this._register(themeService.onThemeChange(_this._applyTheme.bind(_this)));\n _this._register(_this._codeEditor.onDidChangeModel(function (e) {\n if (!_this._isVisible) {\n return;\n }\n if (_this._viewZoneId === undefined) {\n return;\n }\n _this._codeEditor.changeViewZones(function (accessor) {\n accessor.removeZone(_this._viewZoneId);\n _this._viewZoneId = undefined;\n });\n }));\n _this._register(_this._codeEditor.onDidScrollChange(function (e) {\n if (e.scrollTopChanged) {\n _this._layoutViewZone();\n return;\n }\n // for other scroll changes, layout the viewzone in next tick to avoid ruining current rendering.\n setTimeout(function () {\n _this._layoutViewZone();\n }, 0);\n }));\n return _this;\n }\n // ----- IOverlayWidget API\n FindWidget.prototype.getId = function () {\n return FindWidget.ID;\n };\n FindWidget.prototype.getDomNode = function () {\n return this._domNode;\n };\n FindWidget.prototype.getPosition = function () {\n if (this._isVisible) {\n return {\n preference: OverlayWidgetPositionPreference.TOP_RIGHT_CORNER\n };\n }\n return null;\n };\n // ----- React to state changes\n FindWidget.prototype._onStateChanged = function (e) {\n if (e.searchString) {\n this._findInput.setValue(this._state.searchString);\n this._updateButtons();\n }\n if (e.replaceString) {\n this._replaceInputBox.value = this._state.replaceString;\n }\n if (e.isRevealed) {\n if (this._state.isRevealed) {\n this._reveal(true);\n }\n else {\n this._hide(true);\n }\n }\n if (e.isReplaceRevealed) {\n if (this._state.isReplaceRevealed) {\n if (!this._codeEditor.getConfiguration().readOnly && !this._isReplaceVisible) {\n this._isReplaceVisible = true;\n this._replaceInputBox.width = this._findInput.inputBox.width;\n this._updateButtons();\n }\n }\n else {\n if (this._isReplaceVisible) {\n this._isReplaceVisible = false;\n this._updateButtons();\n }\n }\n }\n if (e.isRegex) {\n this._findInput.setRegex(this._state.isRegex);\n }\n if (e.wholeWord) {\n this._findInput.setWholeWords(this._state.wholeWord);\n }\n if (e.matchCase) {\n this._findInput.setCaseSensitive(this._state.matchCase);\n }\n if (e.searchScope) {\n if (this._state.searchScope) {\n this._toggleSelectionFind.checked = true;\n }\n else {\n this._toggleSelectionFind.checked = false;\n }\n this._updateToggleSelectionFindButton();\n }\n if (e.searchString || e.matchesCount || e.matchesPosition) {\n var showRedOutline = (this._state.searchString.length > 0 && this._state.matchesCount === 0);\n dom.toggleClass(this._domNode, 'no-results', showRedOutline);\n this._updateMatchesCount();\n }\n if (e.searchString || e.currentMatch) {\n this._layoutViewZone();\n }\n if (e.updateHistory) {\n this._delayedUpdateHistory();\n }\n };\n FindWidget.prototype._delayedUpdateHistory = function () {\n this._updateHistoryDelayer.trigger(this._updateHistory.bind(this));\n };\n FindWidget.prototype._updateHistory = function () {\n if (this._state.searchString) {\n this._findInput.inputBox.addToHistory();\n }\n if (this._state.replaceString) {\n this._replaceInputBox.addToHistory();\n }\n };\n FindWidget.prototype._updateMatchesCount = function () {\n this._matchesCount.style.minWidth = MAX_MATCHES_COUNT_WIDTH + 'px';\n if (this._state.matchesCount >= MATCHES_LIMIT) {\n this._matchesCount.title = NLS_MATCHES_COUNT_LIMIT_TITLE;\n }\n else {\n this._matchesCount.title = '';\n }\n // remove previous content\n if (this._matchesCount.firstChild) {\n this._matchesCount.removeChild(this._matchesCount.firstChild);\n }\n var label;\n if (this._state.matchesCount > 0) {\n var matchesCount = String(this._state.matchesCount);\n if (this._state.matchesCount >= MATCHES_LIMIT) {\n matchesCount += '+';\n }\n var matchesPosition = String(this._state.matchesPosition);\n if (matchesPosition === '0') {\n matchesPosition = '?';\n }\n label = strings.format(NLS_MATCHES_LOCATION, matchesPosition, matchesCount);\n }\n else {\n label = NLS_NO_RESULTS;\n }\n this._matchesCount.appendChild(document.createTextNode(label));\n MAX_MATCHES_COUNT_WIDTH = Math.max(MAX_MATCHES_COUNT_WIDTH, this._matchesCount.clientWidth);\n };\n // ----- actions\n /**\n * If 'selection find' is ON we should not disable the button (its function is to cancel 'selection find').\n * If 'selection find' is OFF we enable the button only if there is a selection.\n */\n FindWidget.prototype._updateToggleSelectionFindButton = function () {\n var selection = this._codeEditor.getSelection();\n var isSelection = selection ? (selection.startLineNumber !== selection.endLineNumber || selection.startColumn !== selection.endColumn) : false;\n var isChecked = this._toggleSelectionFind.checked;\n this._toggleSelectionFind.setEnabled(this._isVisible && (isChecked || isSelection));\n };\n FindWidget.prototype._updateButtons = function () {\n this._findInput.setEnabled(this._isVisible);\n this._replaceInputBox.setEnabled(this._isVisible && this._isReplaceVisible);\n this._updateToggleSelectionFindButton();\n this._closeBtn.setEnabled(this._isVisible);\n var findInputIsNonEmpty = (this._state.searchString.length > 0);\n this._prevBtn.setEnabled(this._isVisible && findInputIsNonEmpty);\n this._nextBtn.setEnabled(this._isVisible && findInputIsNonEmpty);\n this._replaceBtn.setEnabled(this._isVisible && this._isReplaceVisible && findInputIsNonEmpty);\n this._replaceAllBtn.setEnabled(this._isVisible && this._isReplaceVisible && findInputIsNonEmpty);\n dom.toggleClass(this._domNode, 'replaceToggled', this._isReplaceVisible);\n this._toggleReplaceBtn.toggleClass('collapse', !this._isReplaceVisible);\n this._toggleReplaceBtn.toggleClass('expand', this._isReplaceVisible);\n this._toggleReplaceBtn.setExpanded(this._isReplaceVisible);\n var canReplace = !this._codeEditor.getConfiguration().readOnly;\n this._toggleReplaceBtn.setEnabled(this._isVisible && canReplace);\n };\n FindWidget.prototype._reveal = function (animate) {\n var _this = this;\n if (!this._isVisible) {\n this._isVisible = true;\n var selection = this._codeEditor.getSelection();\n var isSelection = selection ? (selection.startLineNumber !== selection.endLineNumber || selection.startColumn !== selection.endColumn) : false;\n if (isSelection && this._codeEditor.getConfiguration().contribInfo.find.autoFindInSelection) {\n this._toggleSelectionFind.checked = true;\n }\n else {\n this._toggleSelectionFind.checked = false;\n }\n this._tryUpdateWidgetWidth();\n this._updateButtons();\n setTimeout(function () {\n dom.addClass(_this._domNode, 'visible');\n _this._domNode.setAttribute('aria-hidden', 'false');\n }, 0);\n this._codeEditor.layoutOverlayWidget(this);\n var adjustEditorScrollTop = true;\n if (this._codeEditor.getConfiguration().contribInfo.find.seedSearchStringFromSelection && selection) {\n var editorCoords = dom.getDomNodePagePosition(this._codeEditor.getDomNode());\n var startCoords = this._codeEditor.getScrolledVisiblePosition(selection.getStartPosition());\n var startLeft = editorCoords.left + startCoords.left;\n var startTop = startCoords.top;\n if (startTop < this._viewZone.heightInPx) {\n if (selection.endLineNumber > selection.startLineNumber) {\n adjustEditorScrollTop = false;\n }\n var leftOfFindWidget = dom.getTopLeftOffset(this._domNode).left;\n if (startLeft > leftOfFindWidget) {\n adjustEditorScrollTop = false;\n }\n var endCoords = this._codeEditor.getScrolledVisiblePosition(selection.getEndPosition());\n var endLeft = editorCoords.left + endCoords.left;\n if (endLeft > leftOfFindWidget) {\n adjustEditorScrollTop = false;\n }\n }\n }\n this._showViewZone(adjustEditorScrollTop);\n }\n };\n FindWidget.prototype._hide = function (focusTheEditor) {\n var _this = this;\n if (this._isVisible) {\n this._isVisible = false;\n this._updateButtons();\n dom.removeClass(this._domNode, 'visible');\n this._domNode.setAttribute('aria-hidden', 'true');\n if (focusTheEditor) {\n this._codeEditor.focus();\n }\n this._codeEditor.layoutOverlayWidget(this);\n this._codeEditor.changeViewZones(function (accessor) {\n if (_this._viewZoneId !== undefined) {\n accessor.removeZone(_this._viewZoneId);\n _this._viewZoneId = undefined;\n _this._codeEditor.setScrollTop(_this._codeEditor.getScrollTop() - _this._viewZone.heightInPx);\n }\n });\n }\n };\n FindWidget.prototype._layoutViewZone = function () {\n var _this = this;\n if (!this._isVisible) {\n return;\n }\n if (this._viewZoneId !== undefined) {\n return;\n }\n this._codeEditor.changeViewZones(function (accessor) {\n if (_this._state.isReplaceRevealed) {\n _this._viewZone.heightInPx = FIND_REPLACE_AREA_HEIGHT;\n }\n else {\n _this._viewZone.heightInPx = FIND_INPUT_AREA_HEIGHT;\n }\n _this._viewZoneId = accessor.addZone(_this._viewZone);\n // scroll top adjust to make sure the editor doesn't scroll when adding viewzone at the beginning.\n _this._codeEditor.setScrollTop(_this._codeEditor.getScrollTop() + _this._viewZone.heightInPx);\n });\n };\n FindWidget.prototype._showViewZone = function (adjustScroll) {\n var _this = this;\n if (adjustScroll === void 0) { adjustScroll = true; }\n if (!this._isVisible) {\n return;\n }\n this._codeEditor.changeViewZones(function (accessor) {\n var scrollAdjustment = FIND_INPUT_AREA_HEIGHT;\n if (_this._viewZoneId !== undefined) {\n if (_this._state.isReplaceRevealed) {\n _this._viewZone.heightInPx = FIND_REPLACE_AREA_HEIGHT;\n scrollAdjustment = FIND_REPLACE_AREA_HEIGHT - FIND_INPUT_AREA_HEIGHT;\n }\n else {\n _this._viewZone.heightInPx = FIND_INPUT_AREA_HEIGHT;\n scrollAdjustment = FIND_INPUT_AREA_HEIGHT - FIND_REPLACE_AREA_HEIGHT;\n }\n accessor.removeZone(_this._viewZoneId);\n }\n else {\n _this._viewZone.heightInPx = FIND_INPUT_AREA_HEIGHT;\n }\n _this._viewZoneId = accessor.addZone(_this._viewZone);\n if (adjustScroll) {\n _this._codeEditor.setScrollTop(_this._codeEditor.getScrollTop() + scrollAdjustment);\n }\n });\n };\n FindWidget.prototype._applyTheme = function (theme) {\n var inputStyles = {\n inputActiveOptionBorder: theme.getColor(inputActiveOptionBorder),\n inputBackground: theme.getColor(inputBackground),\n inputForeground: theme.getColor(inputForeground),\n inputBorder: theme.getColor(inputBorder),\n inputValidationInfoBackground: theme.getColor(inputValidationInfoBackground),\n inputValidationInfoBorder: theme.getColor(inputValidationInfoBorder),\n inputValidationWarningBackground: theme.getColor(inputValidationWarningBackground),\n inputValidationWarningBorder: theme.getColor(inputValidationWarningBorder),\n inputValidationErrorBackground: theme.getColor(inputValidationErrorBackground),\n inputValidationErrorBorder: theme.getColor(inputValidationErrorBorder)\n };\n this._findInput.style(inputStyles);\n this._replaceInputBox.style(inputStyles);\n };\n FindWidget.prototype._tryUpdateWidgetWidth = function () {\n if (!this._isVisible) {\n return;\n }\n var editorWidth = this._codeEditor.getConfiguration().layoutInfo.width;\n var minimapWidth = this._codeEditor.getConfiguration().layoutInfo.minimapWidth;\n var collapsedFindWidget = false;\n var reducedFindWidget = false;\n var narrowFindWidget = false;\n if (this._resized) {\n var widgetWidth = dom.getTotalWidth(this._domNode);\n if (widgetWidth > FIND_WIDGET_INITIAL_WIDTH) {\n // as the widget is resized by users, we may need to change the max width of the widget as the editor width changes.\n this._domNode.style.maxWidth = editorWidth - 28 - minimapWidth - 15 + \"px\";\n this._replaceInputBox.inputElement.style.width = dom.getTotalWidth(this._findInput.inputBox.inputElement) + \"px\";\n return;\n }\n }\n if (FIND_WIDGET_INITIAL_WIDTH + 28 + minimapWidth >= editorWidth) {\n reducedFindWidget = true;\n }\n if (FIND_WIDGET_INITIAL_WIDTH + 28 + minimapWidth - MAX_MATCHES_COUNT_WIDTH >= editorWidth) {\n narrowFindWidget = true;\n }\n if (FIND_WIDGET_INITIAL_WIDTH + 28 + minimapWidth - MAX_MATCHES_COUNT_WIDTH >= editorWidth + 50) {\n collapsedFindWidget = true;\n }\n dom.toggleClass(this._domNode, 'collapsed-find-widget', collapsedFindWidget);\n dom.toggleClass(this._domNode, 'narrow-find-widget', narrowFindWidget);\n dom.toggleClass(this._domNode, 'reduced-find-widget', reducedFindWidget);\n if (!narrowFindWidget && !collapsedFindWidget) {\n // the minimal left offset of findwidget is 15px.\n this._domNode.style.maxWidth = editorWidth - 28 - minimapWidth - 15 + \"px\";\n }\n if (this._resized) {\n var findInputWidth = dom.getTotalWidth(this._findInput.inputBox.inputElement);\n if (findInputWidth > 0) {\n this._replaceInputBox.inputElement.style.width = findInputWidth + \"px\";\n }\n }\n };\n // ----- Public\n FindWidget.prototype.focusFindInput = function () {\n this._findInput.select();\n // Edge browser requires focus() in addition to select()\n this._findInput.focus();\n };\n FindWidget.prototype.focusReplaceInput = function () {\n this._replaceInputBox.select();\n // Edge browser requires focus() in addition to select()\n this._replaceInputBox.focus();\n };\n FindWidget.prototype.highlightFindOptions = function () {\n this._findInput.highlightFindOptions();\n };\n FindWidget.prototype._updateSearchScope = function () {\n if (this._toggleSelectionFind.checked) {\n var selection = this._codeEditor.getSelection();\n if (selection.endColumn === 1 && selection.endLineNumber > selection.startLineNumber) {\n selection = selection.setEndPosition(selection.endLineNumber - 1, 1);\n }\n var currentMatch = this._state.currentMatch;\n if (selection.startLineNumber !== selection.endLineNumber) {\n if (!Range.equalsRange(selection, currentMatch)) {\n // Reseed find scope\n this._state.change({ searchScope: selection }, true);\n }\n }\n }\n };\n FindWidget.prototype._onFindInputMouseDown = function (e) {\n // on linux, middle key does pasting.\n if (e.middleButton) {\n e.stopPropagation();\n }\n };\n FindWidget.prototype._onFindInputKeyDown = function (e) {\n if (e.equals(3 /* Enter */)) {\n this._codeEditor.getAction(FIND_IDS.NextMatchFindAction).run().done(null, onUnexpectedError);\n e.preventDefault();\n return;\n }\n if (e.equals(1024 /* Shift */ | 3 /* Enter */)) {\n this._codeEditor.getAction(FIND_IDS.PreviousMatchFindAction).run().done(null, onUnexpectedError);\n e.preventDefault();\n return;\n }\n if (e.equals(2 /* Tab */)) {\n if (this._isReplaceVisible) {\n this._replaceInputBox.focus();\n }\n else {\n this._findInput.focusOnCaseSensitive();\n }\n e.preventDefault();\n return;\n }\n if (e.equals(2048 /* CtrlCmd */ | 18 /* DownArrow */)) {\n this._codeEditor.focus();\n e.preventDefault();\n return;\n }\n };\n FindWidget.prototype._onReplaceInputKeyDown = function (e) {\n if (e.equals(3 /* Enter */)) {\n this._controller.replace();\n e.preventDefault();\n return;\n }\n if (e.equals(2048 /* CtrlCmd */ | 3 /* Enter */)) {\n this._controller.replaceAll();\n e.preventDefault();\n return;\n }\n if (e.equals(2 /* Tab */)) {\n this._findInput.focusOnCaseSensitive();\n e.preventDefault();\n return;\n }\n if (e.equals(1024 /* Shift */ | 2 /* Tab */)) {\n this._findInput.focus();\n e.preventDefault();\n return;\n }\n if (e.equals(2048 /* CtrlCmd */ | 18 /* DownArrow */)) {\n this._codeEditor.focus();\n e.preventDefault();\n return;\n }\n };\n // ----- sash\n FindWidget.prototype.getHorizontalSashTop = function (sash) {\n return 0;\n };\n FindWidget.prototype.getHorizontalSashLeft = function (sash) {\n return 0;\n };\n FindWidget.prototype.getHorizontalSashWidth = function (sash) {\n return 500;\n };\n // ----- initialization\n FindWidget.prototype._keybindingLabelFor = function (actionId) {\n var kb = this._keybindingService.lookupKeybinding(actionId);\n if (!kb) {\n return '';\n }\n return \" (\" + kb.getLabel() + \")\";\n };\n FindWidget.prototype._buildFindPart = function () {\n var _this = this;\n // Find input\n this._findInput = this._register(new ContextScopedFindInput(null, this._contextViewProvider, {\n width: FIND_INPUT_AREA_WIDTH,\n label: NLS_FIND_INPUT_LABEL,\n placeholder: NLS_FIND_INPUT_PLACEHOLDER,\n appendCaseSensitiveLabel: this._keybindingLabelFor(FIND_IDS.ToggleCaseSensitiveCommand),\n appendWholeWordsLabel: this._keybindingLabelFor(FIND_IDS.ToggleWholeWordCommand),\n appendRegexLabel: this._keybindingLabelFor(FIND_IDS.ToggleRegexCommand),\n validation: function (value) {\n if (value.length === 0) {\n return null;\n }\n if (!_this._findInput.getRegex()) {\n return null;\n }\n try {\n /* tslint:disable:no-unused-expression */\n new RegExp(value);\n /* tslint:enable:no-unused-expression */\n return null;\n }\n catch (e) {\n return { content: e.message };\n }\n }\n }, this._contextKeyService));\n this._findInput.setRegex(!!this._state.isRegex);\n this._findInput.setCaseSensitive(!!this._state.matchCase);\n this._findInput.setWholeWords(!!this._state.wholeWord);\n this._register(this._findInput.onKeyDown(function (e) { return _this._onFindInputKeyDown(e); }));\n this._register(this._findInput.inputBox.onDidChange(function () {\n _this._state.change({ searchString: _this._findInput.getValue() }, true);\n }));\n this._register(this._findInput.onDidOptionChange(function () {\n _this._state.change({\n isRegex: _this._findInput.getRegex(),\n wholeWord: _this._findInput.getWholeWords(),\n matchCase: _this._findInput.getCaseSensitive()\n }, true);\n }));\n this._register(this._findInput.onCaseSensitiveKeyDown(function (e) {\n if (e.equals(1024 /* Shift */ | 2 /* Tab */)) {\n if (_this._isReplaceVisible) {\n _this._replaceInputBox.focus();\n e.preventDefault();\n }\n }\n }));\n if (platform.isLinux) {\n this._register(this._findInput.onMouseDown(function (e) { return _this._onFindInputMouseDown(e); }));\n }\n this._matchesCount = document.createElement('div');\n this._matchesCount.className = 'matchesCount';\n this._updateMatchesCount();\n // Previous button\n this._prevBtn = this._register(new SimpleButton({\n label: NLS_PREVIOUS_MATCH_BTN_LABEL + this._keybindingLabelFor(FIND_IDS.PreviousMatchFindAction),\n className: 'previous',\n onTrigger: function () {\n _this._codeEditor.getAction(FIND_IDS.PreviousMatchFindAction).run().done(null, onUnexpectedError);\n }\n }));\n // Next button\n this._nextBtn = this._register(new SimpleButton({\n label: NLS_NEXT_MATCH_BTN_LABEL + this._keybindingLabelFor(FIND_IDS.NextMatchFindAction),\n className: 'next',\n onTrigger: function () {\n _this._codeEditor.getAction(FIND_IDS.NextMatchFindAction).run().done(null, onUnexpectedError);\n }\n }));\n var findPart = document.createElement('div');\n findPart.className = 'find-part';\n findPart.appendChild(this._findInput.domNode);\n findPart.appendChild(this._matchesCount);\n findPart.appendChild(this._prevBtn.domNode);\n findPart.appendChild(this._nextBtn.domNode);\n // Toggle selection button\n this._toggleSelectionFind = this._register(new SimpleCheckbox({\n parent: findPart,\n title: NLS_TOGGLE_SELECTION_FIND_TITLE + this._keybindingLabelFor(FIND_IDS.ToggleSearchScopeCommand),\n onChange: function () {\n if (_this._toggleSelectionFind.checked) {\n var selection = _this._codeEditor.getSelection();\n if (selection.endColumn === 1 && selection.endLineNumber > selection.startLineNumber) {\n selection = selection.setEndPosition(selection.endLineNumber - 1, 1);\n }\n if (!selection.isEmpty()) {\n _this._state.change({ searchScope: selection }, true);\n }\n }\n else {\n _this._state.change({ searchScope: null }, true);\n }\n }\n }));\n // Close button\n this._closeBtn = this._register(new SimpleButton({\n label: NLS_CLOSE_BTN_LABEL + this._keybindingLabelFor(FIND_IDS.CloseFindWidgetCommand),\n className: 'close-fw',\n onTrigger: function () {\n _this._state.change({ isRevealed: false, searchScope: null }, false);\n },\n onKeyDown: function (e) {\n if (e.equals(2 /* Tab */)) {\n if (_this._isReplaceVisible) {\n if (_this._replaceBtn.isEnabled()) {\n _this._replaceBtn.focus();\n }\n else {\n _this._codeEditor.focus();\n }\n e.preventDefault();\n }\n }\n }\n }));\n findPart.appendChild(this._closeBtn.domNode);\n return findPart;\n };\n FindWidget.prototype._buildReplacePart = function () {\n var _this = this;\n // Replace input\n var replaceInput = document.createElement('div');\n replaceInput.className = 'replace-input';\n replaceInput.style.width = REPLACE_INPUT_AREA_WIDTH + 'px';\n this._replaceInputBox = this._register(new ContextScopedHistoryInputBox(replaceInput, null, {\n ariaLabel: NLS_REPLACE_INPUT_LABEL,\n placeholder: NLS_REPLACE_INPUT_PLACEHOLDER,\n history: []\n }, this._contextKeyService));\n this._register(dom.addStandardDisposableListener(this._replaceInputBox.inputElement, 'keydown', function (e) { return _this._onReplaceInputKeyDown(e); }));\n this._register(dom.addStandardDisposableListener(this._replaceInputBox.inputElement, 'input', function (e) {\n _this._state.change({ replaceString: _this._replaceInputBox.value }, false);\n }));\n // Replace one button\n this._replaceBtn = this._register(new SimpleButton({\n label: NLS_REPLACE_BTN_LABEL + this._keybindingLabelFor(FIND_IDS.ReplaceOneAction),\n className: 'replace',\n onTrigger: function () {\n _this._controller.replace();\n },\n onKeyDown: function (e) {\n if (e.equals(1024 /* Shift */ | 2 /* Tab */)) {\n _this._closeBtn.focus();\n e.preventDefault();\n }\n }\n }));\n // Replace all button\n this._replaceAllBtn = this._register(new SimpleButton({\n label: NLS_REPLACE_ALL_BTN_LABEL + this._keybindingLabelFor(FIND_IDS.ReplaceAllAction),\n className: 'replace-all',\n onTrigger: function () {\n _this._controller.replaceAll();\n }\n }));\n var replacePart = document.createElement('div');\n replacePart.className = 'replace-part';\n replacePart.appendChild(replaceInput);\n replacePart.appendChild(this._replaceBtn.domNode);\n replacePart.appendChild(this._replaceAllBtn.domNode);\n return replacePart;\n };\n FindWidget.prototype._buildDomNode = function () {\n var _this = this;\n // Find part\n var findPart = this._buildFindPart();\n // Replace part\n var replacePart = this._buildReplacePart();\n // Toggle replace button\n this._toggleReplaceBtn = this._register(new SimpleButton({\n label: NLS_TOGGLE_REPLACE_MODE_BTN_LABEL,\n className: 'toggle left',\n onTrigger: function () {\n _this._state.change({ isReplaceRevealed: !_this._isReplaceVisible }, false);\n if (_this._isReplaceVisible) {\n _this._replaceInputBox.width = _this._findInput.inputBox.width;\n }\n _this._showViewZone();\n }\n }));\n this._toggleReplaceBtn.toggleClass('expand', this._isReplaceVisible);\n this._toggleReplaceBtn.toggleClass('collapse', !this._isReplaceVisible);\n this._toggleReplaceBtn.setExpanded(this._isReplaceVisible);\n // Widget\n this._domNode = document.createElement('div');\n this._domNode.className = 'editor-widget find-widget';\n this._domNode.setAttribute('aria-hidden', 'true');\n // We need to set this explicitly, otherwise on IE11, the width inheritence of flex doesn't work.\n this._domNode.style.width = FIND_WIDGET_INITIAL_WIDTH + \"px\";\n this._domNode.appendChild(this._toggleReplaceBtn.domNode);\n this._domNode.appendChild(findPart);\n this._domNode.appendChild(replacePart);\n this._buildSash();\n };\n FindWidget.prototype._buildSash = function () {\n var _this = this;\n this._resizeSash = new Sash(this._domNode, this, { orientation: Orientation.VERTICAL });\n this._resized = false;\n var originalWidth = FIND_WIDGET_INITIAL_WIDTH;\n this._register(this._resizeSash.onDidStart(function (e) {\n originalWidth = dom.getTotalWidth(_this._domNode);\n }));\n this._register(this._resizeSash.onDidChange(function (evt) {\n _this._resized = true;\n var width = originalWidth + evt.startX - evt.currentX;\n if (width < FIND_WIDGET_INITIAL_WIDTH) {\n // narrow down the find widget should be handled by CSS.\n return;\n }\n var inputBoxWidth = width - FIND_ALL_CONTROLS_WIDTH;\n var maxWidth = parseFloat(dom.getComputedStyle(_this._domNode).maxWidth) || 0;\n if (width > maxWidth) {\n return;\n }\n _this._domNode.style.width = width + \"px\";\n if (_this._isReplaceVisible) {\n _this._replaceInputBox.width = inputBoxWidth;\n }\n }));\n };\n FindWidget.ID = 'editor.contrib.findWidget';\n return FindWidget;\n}(Widget));\nexport { FindWidget };\nvar SimpleCheckbox = /** @class */ (function (_super) {\n __extends(SimpleCheckbox, _super);\n function SimpleCheckbox(opts) {\n var _this = _super.call(this) || this;\n _this._opts = opts;\n _this._domNode = document.createElement('div');\n _this._domNode.className = 'monaco-checkbox';\n _this._domNode.title = _this._opts.title;\n _this._domNode.tabIndex = 0;\n _this._checkbox = document.createElement('input');\n _this._checkbox.type = 'checkbox';\n _this._checkbox.className = 'checkbox';\n _this._checkbox.id = 'checkbox-' + SimpleCheckbox._COUNTER++;\n _this._checkbox.tabIndex = -1;\n _this._label = document.createElement('label');\n _this._label.className = 'label';\n // Connect the label and the checkbox. Checkbox will get checked when the label receives a click.\n _this._label.htmlFor = _this._checkbox.id;\n _this._label.tabIndex = -1;\n _this._domNode.appendChild(_this._checkbox);\n _this._domNode.appendChild(_this._label);\n _this._opts.parent.appendChild(_this._domNode);\n _this.onchange(_this._checkbox, function (e) {\n _this._opts.onChange();\n });\n return _this;\n }\n Object.defineProperty(SimpleCheckbox.prototype, \"domNode\", {\n get: function () {\n return this._domNode;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(SimpleCheckbox.prototype, \"checked\", {\n get: function () {\n return this._checkbox.checked;\n },\n set: function (newValue) {\n this._checkbox.checked = newValue;\n },\n enumerable: true,\n configurable: true\n });\n SimpleCheckbox.prototype.enable = function () {\n this._checkbox.removeAttribute('disabled');\n };\n SimpleCheckbox.prototype.disable = function () {\n this._checkbox.disabled = true;\n };\n SimpleCheckbox.prototype.setEnabled = function (enabled) {\n if (enabled) {\n this.enable();\n this.domNode.tabIndex = 0;\n }\n else {\n this.disable();\n this.domNode.tabIndex = -1;\n }\n };\n SimpleCheckbox._COUNTER = 0;\n return SimpleCheckbox;\n}(Widget));\nvar SimpleButton = /** @class */ (function (_super) {\n __extends(SimpleButton, _super);\n function SimpleButton(opts) {\n var _this = _super.call(this) || this;\n _this._opts = opts;\n _this._domNode = document.createElement('div');\n _this._domNode.title = _this._opts.label;\n _this._domNode.tabIndex = 0;\n _this._domNode.className = 'button ' + _this._opts.className;\n _this._domNode.setAttribute('role', 'button');\n _this._domNode.setAttribute('aria-label', _this._opts.label);\n _this.onclick(_this._domNode, function (e) {\n _this._opts.onTrigger();\n e.preventDefault();\n });\n _this.onkeydown(_this._domNode, function (e) {\n if (e.equals(10 /* Space */) || e.equals(3 /* Enter */)) {\n _this._opts.onTrigger();\n e.preventDefault();\n return;\n }\n if (_this._opts.onKeyDown) {\n _this._opts.onKeyDown(e);\n }\n });\n return _this;\n }\n Object.defineProperty(SimpleButton.prototype, \"domNode\", {\n get: function () {\n return this._domNode;\n },\n enumerable: true,\n configurable: true\n });\n SimpleButton.prototype.isEnabled = function () {\n return (this._domNode.tabIndex >= 0);\n };\n SimpleButton.prototype.focus = function () {\n this._domNode.focus();\n };\n SimpleButton.prototype.setEnabled = function (enabled) {\n dom.toggleClass(this._domNode, 'disabled', !enabled);\n this._domNode.setAttribute('aria-disabled', String(!enabled));\n this._domNode.tabIndex = enabled ? 0 : -1;\n };\n SimpleButton.prototype.setExpanded = function (expanded) {\n this._domNode.setAttribute('aria-expanded', String(!!expanded));\n };\n SimpleButton.prototype.toggleClass = function (className, shouldHaveIt) {\n dom.toggleClass(this._domNode, className, shouldHaveIt);\n };\n return SimpleButton;\n}(Widget));\nexport { SimpleButton };\n// theming\nregisterThemingParticipant(function (theme, collector) {\n var addBackgroundColorRule = function (selector, color) {\n if (color) {\n collector.addRule(\".monaco-editor \" + selector + \" { background-color: \" + color + \"; }\");\n }\n };\n addBackgroundColorRule('.findMatch', theme.getColor(editorFindMatchHighlight));\n addBackgroundColorRule('.currentFindMatch', theme.getColor(editorFindMatch));\n addBackgroundColorRule('.findScope', theme.getColor(editorFindRangeHighlight));\n var widgetBackground = theme.getColor(editorWidgetBackground);\n addBackgroundColorRule('.find-widget', widgetBackground);\n var widgetShadowColor = theme.getColor(widgetShadow);\n if (widgetShadowColor) {\n collector.addRule(\".monaco-editor .find-widget { box-shadow: 0 2px 8px \" + widgetShadowColor + \"; }\");\n }\n var findMatchHighlightBorder = theme.getColor(editorFindMatchHighlightBorder);\n if (findMatchHighlightBorder) {\n collector.addRule(\".monaco-editor .findMatch { border: 1px \" + (theme.type === 'hc' ? 'dotted' : 'solid') + \" \" + findMatchHighlightBorder + \"; box-sizing: border-box; }\");\n }\n var findMatchBorder = theme.getColor(editorFindMatchBorder);\n if (findMatchBorder) {\n collector.addRule(\".monaco-editor .currentFindMatch { border: 2px solid \" + findMatchBorder + \"; padding: 1px; box-sizing: border-box; }\");\n }\n var findRangeHighlightBorder = theme.getColor(editorFindRangeHighlightBorder);\n if (findRangeHighlightBorder) {\n collector.addRule(\".monaco-editor .findScope { border: 1px \" + (theme.type === 'hc' ? 'dashed' : 'solid') + \" \" + findRangeHighlightBorder + \"; }\");\n }\n var hcBorder = theme.getColor(contrastBorder);\n if (hcBorder) {\n collector.addRule(\".monaco-editor .find-widget { border: 2px solid \" + hcBorder + \"; }\");\n }\n var error = theme.getColor(errorForeground);\n if (error) {\n collector.addRule(\".monaco-editor .find-widget.no-results .matchesCount { color: \" + error + \"; }\");\n }\n var resizeBorderBackground = theme.getColor(editorWidgetResizeBorder);\n if (resizeBorderBackground) {\n collector.addRule(\".monaco-editor .find-widget .monaco-sash { background-color: \" + resizeBorderBackground + \"; width: 3px !important; margin-left: -4px;}\");\n }\n else {\n var border = theme.getColor(editorWidgetBorder);\n if (border) {\n collector.addRule(\".monaco-editor .find-widget .monaco-sash { background-color: \" + border + \"; width: 3px !important; margin-left: -4px;}\");\n }\n }\n});\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport * as dom from '../../../base/browser/dom';\nimport { Widget } from '../../../base/browser/ui/widget';\nimport { OverlayWidgetPositionPreference } from '../../browser/editorBrowser';\nimport { FIND_IDS } from './findModel';\nimport { CaseSensitiveCheckbox, WholeWordsCheckbox, RegexCheckbox } from '../../../base/browser/ui/findinput/findInputCheckboxes';\nimport { RunOnceScheduler } from '../../../base/common/async';\nimport { registerThemingParticipant } from '../../../platform/theme/common/themeService';\nimport { inputActiveOptionBorder, editorWidgetBackground, contrastBorder, widgetShadow } from '../../../platform/theme/common/colorRegistry';\nvar FindOptionsWidget = /** @class */ (function (_super) {\n __extends(FindOptionsWidget, _super);\n function FindOptionsWidget(editor, state, keybindingService, themeService) {\n var _this = _super.call(this) || this;\n _this._hideSoon = _this._register(new RunOnceScheduler(function () { return _this._hide(); }, 2000));\n _this._isVisible = false;\n _this._editor = editor;\n _this._state = state;\n _this._keybindingService = keybindingService;\n _this._domNode = document.createElement('div');\n _this._domNode.className = 'findOptionsWidget';\n _this._domNode.style.display = 'none';\n _this._domNode.style.top = '10px';\n _this._domNode.setAttribute('role', 'presentation');\n _this._domNode.setAttribute('aria-hidden', 'true');\n var inputActiveOptionBorderColor = themeService.getTheme().getColor(inputActiveOptionBorder);\n _this.caseSensitive = _this._register(new CaseSensitiveCheckbox({\n appendTitle: _this._keybindingLabelFor(FIND_IDS.ToggleCaseSensitiveCommand),\n isChecked: _this._state.matchCase,\n inputActiveOptionBorder: inputActiveOptionBorderColor\n }));\n _this._domNode.appendChild(_this.caseSensitive.domNode);\n _this._register(_this.caseSensitive.onChange(function () {\n _this._state.change({\n matchCase: _this.caseSensitive.checked\n }, false);\n }));\n _this.wholeWords = _this._register(new WholeWordsCheckbox({\n appendTitle: _this._keybindingLabelFor(FIND_IDS.ToggleWholeWordCommand),\n isChecked: _this._state.wholeWord,\n inputActiveOptionBorder: inputActiveOptionBorderColor\n }));\n _this._domNode.appendChild(_this.wholeWords.domNode);\n _this._register(_this.wholeWords.onChange(function () {\n _this._state.change({\n wholeWord: _this.wholeWords.checked\n }, false);\n }));\n _this.regex = _this._register(new RegexCheckbox({\n appendTitle: _this._keybindingLabelFor(FIND_IDS.ToggleRegexCommand),\n isChecked: _this._state.isRegex,\n inputActiveOptionBorder: inputActiveOptionBorderColor\n }));\n _this._domNode.appendChild(_this.regex.domNode);\n _this._register(_this.regex.onChange(function () {\n _this._state.change({\n isRegex: _this.regex.checked\n }, false);\n }));\n _this._editor.addOverlayWidget(_this);\n _this._register(_this._state.onFindReplaceStateChange(function (e) {\n var somethingChanged = false;\n if (e.isRegex) {\n _this.regex.checked = _this._state.isRegex;\n somethingChanged = true;\n }\n if (e.wholeWord) {\n _this.wholeWords.checked = _this._state.wholeWord;\n somethingChanged = true;\n }\n if (e.matchCase) {\n _this.caseSensitive.checked = _this._state.matchCase;\n somethingChanged = true;\n }\n if (!_this._state.isRevealed && somethingChanged) {\n _this._revealTemporarily();\n }\n }));\n _this._register(dom.addDisposableNonBubblingMouseOutListener(_this._domNode, function (e) { return _this._onMouseOut(); }));\n _this._register(dom.addDisposableListener(_this._domNode, 'mouseover', function (e) { return _this._onMouseOver(); }));\n _this._applyTheme(themeService.getTheme());\n _this._register(themeService.onThemeChange(_this._applyTheme.bind(_this)));\n return _this;\n }\n FindOptionsWidget.prototype._keybindingLabelFor = function (actionId) {\n var kb = this._keybindingService.lookupKeybinding(actionId);\n if (!kb) {\n return '';\n }\n return \" (\" + kb.getLabel() + \")\";\n };\n FindOptionsWidget.prototype.dispose = function () {\n this._editor.removeOverlayWidget(this);\n _super.prototype.dispose.call(this);\n };\n // ----- IOverlayWidget API\n FindOptionsWidget.prototype.getId = function () {\n return FindOptionsWidget.ID;\n };\n FindOptionsWidget.prototype.getDomNode = function () {\n return this._domNode;\n };\n FindOptionsWidget.prototype.getPosition = function () {\n return {\n preference: OverlayWidgetPositionPreference.TOP_RIGHT_CORNER\n };\n };\n FindOptionsWidget.prototype.highlightFindOptions = function () {\n this._revealTemporarily();\n };\n FindOptionsWidget.prototype._revealTemporarily = function () {\n this._show();\n this._hideSoon.schedule();\n };\n FindOptionsWidget.prototype._onMouseOut = function () {\n this._hideSoon.schedule();\n };\n FindOptionsWidget.prototype._onMouseOver = function () {\n this._hideSoon.cancel();\n };\n FindOptionsWidget.prototype._show = function () {\n if (this._isVisible) {\n return;\n }\n this._isVisible = true;\n this._domNode.style.display = 'block';\n };\n FindOptionsWidget.prototype._hide = function () {\n if (!this._isVisible) {\n return;\n }\n this._isVisible = false;\n this._domNode.style.display = 'none';\n };\n FindOptionsWidget.prototype._applyTheme = function (theme) {\n var inputStyles = { inputActiveOptionBorder: theme.getColor(inputActiveOptionBorder) };\n this.caseSensitive.style(inputStyles);\n this.wholeWords.style(inputStyles);\n this.regex.style(inputStyles);\n };\n FindOptionsWidget.ID = 'editor.contrib.findOptionsWidget';\n return FindOptionsWidget;\n}(Widget));\nexport { FindOptionsWidget };\nregisterThemingParticipant(function (theme, collector) {\n var widgetBackground = theme.getColor(editorWidgetBackground);\n if (widgetBackground) {\n collector.addRule(\".monaco-editor .findOptionsWidget { background-color: \" + widgetBackground + \"; }\");\n }\n var widgetShadowColor = theme.getColor(widgetShadow);\n if (widgetShadowColor) {\n collector.addRule(\".monaco-editor .findOptionsWidget { box-shadow: 0 2px 8px \" + widgetShadowColor + \"; }\");\n }\n var hcBorder = theme.getColor(contrastBorder);\n if (hcBorder) {\n collector.addRule(\".monaco-editor .findOptionsWidget { border: 2px solid \" + hcBorder + \"; }\");\n }\n});\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __param = (this && this.__param) || function (paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n};\nimport * as nls from '../../../nls';\nimport { Disposable } from '../../../base/common/lifecycle';\nimport { IContextKeyService } from '../../../platform/contextkey/common/contextkey';\nimport * as strings from '../../../base/common/strings';\nimport { registerEditorContribution, registerEditorAction, EditorAction, EditorCommand, registerEditorCommand } from '../../browser/editorExtensions';\nimport { FIND_IDS, FindModelBoundToEditorModel, ToggleCaseSensitiveKeybinding, ToggleRegexKeybinding, ToggleWholeWordKeybinding, ToggleSearchScopeKeybinding, CONTEXT_FIND_WIDGET_VISIBLE } from './findModel';\nimport { FindReplaceState } from './findState';\nimport { Delayer } from '../../../base/common/async';\nimport { EditorContextKeys } from '../../common/editorContextKeys';\nimport { IStorageService, StorageScope } from '../../../platform/storage/common/storage';\nimport { IClipboardService } from '../../../platform/clipboard/common/clipboardService';\nimport { IContextViewService } from '../../../platform/contextview/browser/contextView';\nimport { IKeybindingService } from '../../../platform/keybinding/common/keybinding';\nimport { FindWidget } from './findWidget';\nimport { FindOptionsWidget } from './findOptionsWidget';\nimport { IThemeService } from '../../../platform/theme/common/themeService';\nimport { optional } from '../../../platform/instantiation/common/instantiation';\nimport { MenuId } from '../../../platform/actions/common/actions';\nexport function getSelectionSearchString(editor) {\n var selection = editor.getSelection();\n // if selection spans multiple lines, default search string to empty\n if (selection.startLineNumber === selection.endLineNumber) {\n if (selection.isEmpty()) {\n var wordAtPosition = editor.getModel().getWordAtPosition(selection.getStartPosition());\n if (wordAtPosition) {\n return wordAtPosition.word;\n }\n }\n else {\n return editor.getModel().getValueInRange(selection);\n }\n }\n return null;\n}\nvar CommonFindController = /** @class */ (function (_super) {\n __extends(CommonFindController, _super);\n function CommonFindController(editor, contextKeyService, storageService, clipboardService) {\n var _this = _super.call(this) || this;\n _this._editor = editor;\n _this._findWidgetVisible = CONTEXT_FIND_WIDGET_VISIBLE.bindTo(contextKeyService);\n _this._storageService = storageService;\n _this._clipboardService = clipboardService;\n _this._updateHistoryDelayer = new Delayer(500);\n _this._state = _this._register(new FindReplaceState());\n _this.loadQueryState();\n _this._register(_this._state.onFindReplaceStateChange(function (e) { return _this._onStateChanged(e); }));\n _this._model = null;\n _this._register(_this._editor.onDidChangeModel(function () {\n var shouldRestartFind = (_this._editor.getModel() && _this._state.isRevealed);\n _this.disposeModel();\n _this._state.change({\n searchScope: null,\n matchCase: _this._storageService.getBoolean('editor.matchCase', StorageScope.WORKSPACE, false),\n wholeWord: _this._storageService.getBoolean('editor.wholeWord', StorageScope.WORKSPACE, false),\n isRegex: _this._storageService.getBoolean('editor.isRegex', StorageScope.WORKSPACE, false)\n }, false);\n if (shouldRestartFind) {\n _this._start({\n forceRevealReplace: false,\n seedSearchStringFromSelection: false && _this._editor.getConfiguration().contribInfo.find.seedSearchStringFromSelection,\n seedSearchStringFromGlobalClipboard: false,\n shouldFocus: 0 /* NoFocusChange */,\n shouldAnimate: false,\n });\n }\n }));\n return _this;\n }\n CommonFindController.get = function (editor) {\n return editor.getContribution(CommonFindController.ID);\n };\n CommonFindController.prototype.dispose = function () {\n this.disposeModel();\n _super.prototype.dispose.call(this);\n };\n CommonFindController.prototype.disposeModel = function () {\n if (this._model) {\n this._model.dispose();\n this._model = null;\n }\n };\n CommonFindController.prototype.getId = function () {\n return CommonFindController.ID;\n };\n CommonFindController.prototype._onStateChanged = function (e) {\n this.saveQueryState(e);\n if (e.isRevealed) {\n if (this._state.isRevealed) {\n this._findWidgetVisible.set(true);\n }\n else {\n this._findWidgetVisible.reset();\n this.disposeModel();\n }\n }\n if (e.searchString) {\n this.setGlobalBufferTerm(this._state.searchString);\n }\n };\n CommonFindController.prototype.saveQueryState = function (e) {\n if (e.isRegex) {\n this._storageService.store('editor.isRegex', this._state.actualIsRegex, StorageScope.WORKSPACE);\n }\n if (e.wholeWord) {\n this._storageService.store('editor.wholeWord', this._state.actualWholeWord, StorageScope.WORKSPACE);\n }\n if (e.matchCase) {\n this._storageService.store('editor.matchCase', this._state.actualMatchCase, StorageScope.WORKSPACE);\n }\n };\n CommonFindController.prototype.loadQueryState = function () {\n this._state.change({\n matchCase: this._storageService.getBoolean('editor.matchCase', StorageScope.WORKSPACE, this._state.matchCase),\n wholeWord: this._storageService.getBoolean('editor.wholeWord', StorageScope.WORKSPACE, this._state.wholeWord),\n isRegex: this._storageService.getBoolean('editor.isRegex', StorageScope.WORKSPACE, this._state.isRegex)\n }, false);\n };\n CommonFindController.prototype.getState = function () {\n return this._state;\n };\n CommonFindController.prototype.closeFindWidget = function () {\n this._state.change({\n isRevealed: false,\n searchScope: null\n }, false);\n this._editor.focus();\n };\n CommonFindController.prototype.toggleCaseSensitive = function () {\n this._state.change({ matchCase: !this._state.matchCase }, false);\n };\n CommonFindController.prototype.toggleWholeWords = function () {\n this._state.change({ wholeWord: !this._state.wholeWord }, false);\n };\n CommonFindController.prototype.toggleRegex = function () {\n this._state.change({ isRegex: !this._state.isRegex }, false);\n };\n CommonFindController.prototype.toggleSearchScope = function () {\n if (this._state.searchScope) {\n this._state.change({ searchScope: null }, true);\n }\n else {\n var selection = this._editor.getSelection();\n if (selection.endColumn === 1 && selection.endLineNumber > selection.startLineNumber) {\n selection = selection.setEndPosition(selection.endLineNumber - 1, 1);\n }\n if (!selection.isEmpty()) {\n this._state.change({ searchScope: selection }, true);\n }\n }\n };\n CommonFindController.prototype.setSearchString = function (searchString) {\n if (this._state.isRegex) {\n searchString = strings.escapeRegExpCharacters(searchString);\n }\n this._state.change({ searchString: searchString }, false);\n };\n CommonFindController.prototype.highlightFindOptions = function () {\n // overwritten in subclass\n };\n CommonFindController.prototype._start = function (opts) {\n this.disposeModel();\n if (!this._editor.getModel()) {\n // cannot do anything with an editor that doesn't have a model...\n return;\n }\n var stateChanges = {\n isRevealed: true\n };\n if (opts.seedSearchStringFromSelection) {\n var selectionSearchString = getSelectionSearchString(this._editor);\n if (selectionSearchString) {\n if (this._state.isRegex) {\n stateChanges.searchString = strings.escapeRegExpCharacters(selectionSearchString);\n }\n else {\n stateChanges.searchString = selectionSearchString;\n }\n }\n }\n if (!stateChanges.searchString && opts.seedSearchStringFromGlobalClipboard) {\n var selectionSearchString = this.getGlobalBufferTerm();\n if (selectionSearchString) {\n stateChanges.searchString = selectionSearchString;\n }\n }\n // Overwrite isReplaceRevealed\n if (opts.forceRevealReplace) {\n stateChanges.isReplaceRevealed = true;\n }\n else if (!this._findWidgetVisible.get()) {\n stateChanges.isReplaceRevealed = false;\n }\n this._state.change(stateChanges, false);\n if (!this._model) {\n this._model = new FindModelBoundToEditorModel(this._editor, this._state);\n }\n };\n CommonFindController.prototype.start = function (opts) {\n this._start(opts);\n };\n CommonFindController.prototype.moveToNextMatch = function () {\n if (this._model) {\n this._model.moveToNextMatch();\n return true;\n }\n return false;\n };\n CommonFindController.prototype.moveToPrevMatch = function () {\n if (this._model) {\n this._model.moveToPrevMatch();\n return true;\n }\n return false;\n };\n CommonFindController.prototype.replace = function () {\n if (this._model) {\n this._model.replace();\n return true;\n }\n return false;\n };\n CommonFindController.prototype.replaceAll = function () {\n if (this._model) {\n this._model.replaceAll();\n return true;\n }\n return false;\n };\n CommonFindController.prototype.selectAllMatches = function () {\n if (this._model) {\n this._model.selectAllMatches();\n this._editor.focus();\n return true;\n }\n return false;\n };\n CommonFindController.prototype.getGlobalBufferTerm = function () {\n if (this._editor.getConfiguration().contribInfo.find.globalFindClipboard\n && this._clipboardService\n && !this._editor.getModel().isTooLargeForSyncing()) {\n return this._clipboardService.readFindText();\n }\n return '';\n };\n CommonFindController.prototype.setGlobalBufferTerm = function (text) {\n if (this._editor.getConfiguration().contribInfo.find.globalFindClipboard\n && this._clipboardService\n && !this._editor.getModel().isTooLargeForSyncing()) {\n this._clipboardService.writeFindText(text);\n }\n };\n CommonFindController.ID = 'editor.contrib.findController';\n CommonFindController = __decorate([\n __param(1, IContextKeyService),\n __param(2, IStorageService),\n __param(3, IClipboardService)\n ], CommonFindController);\n return CommonFindController;\n}(Disposable));\nexport { CommonFindController };\nvar FindController = /** @class */ (function (_super) {\n __extends(FindController, _super);\n function FindController(editor, _contextViewService, _contextKeyService, _keybindingService, _themeService, storageService, clipboardService) {\n var _this = _super.call(this, editor, _contextKeyService, storageService, clipboardService) || this;\n _this._contextViewService = _contextViewService;\n _this._contextKeyService = _contextKeyService;\n _this._keybindingService = _keybindingService;\n _this._themeService = _themeService;\n return _this;\n }\n FindController.prototype._start = function (opts) {\n if (!this._widget) {\n this._createFindWidget();\n }\n _super.prototype._start.call(this, opts);\n if (opts.shouldFocus === 2 /* FocusReplaceInput */) {\n this._widget.focusReplaceInput();\n }\n else if (opts.shouldFocus === 1 /* FocusFindInput */) {\n this._widget.focusFindInput();\n }\n };\n FindController.prototype.highlightFindOptions = function () {\n if (!this._widget) {\n this._createFindWidget();\n }\n if (this._state.isRevealed) {\n this._widget.highlightFindOptions();\n }\n else {\n this._findOptionsWidget.highlightFindOptions();\n }\n };\n FindController.prototype._createFindWidget = function () {\n this._widget = this._register(new FindWidget(this._editor, this, this._state, this._contextViewService, this._keybindingService, this._contextKeyService, this._themeService));\n this._findOptionsWidget = this._register(new FindOptionsWidget(this._editor, this._state, this._keybindingService, this._themeService));\n };\n FindController = __decorate([\n __param(1, IContextViewService),\n __param(2, IContextKeyService),\n __param(3, IKeybindingService),\n __param(4, IThemeService),\n __param(5, IStorageService),\n __param(6, optional(IClipboardService))\n ], FindController);\n return FindController;\n}(CommonFindController));\nexport { FindController };\nvar StartFindAction = /** @class */ (function (_super) {\n __extends(StartFindAction, _super);\n function StartFindAction() {\n return _super.call(this, {\n id: FIND_IDS.StartFindAction,\n label: nls.localize('startFindAction', \"Find\"),\n alias: 'Find',\n precondition: null,\n kbOpts: {\n kbExpr: null,\n primary: 2048 /* CtrlCmd */ | 36 /* KEY_F */,\n weight: 100 /* EditorContrib */\n },\n menubarOpts: {\n menuId: MenuId.MenubarEditMenu,\n group: '3_find',\n title: nls.localize({ key: 'miFind', comment: ['&& denotes a mnemonic'] }, \"&&Find\"),\n order: 1\n }\n }) || this;\n }\n StartFindAction.prototype.run = function (accessor, editor) {\n var controller = CommonFindController.get(editor);\n if (controller) {\n controller.start({\n forceRevealReplace: false,\n seedSearchStringFromSelection: editor.getConfiguration().contribInfo.find.seedSearchStringFromSelection,\n seedSearchStringFromGlobalClipboard: editor.getConfiguration().contribInfo.find.globalFindClipboard,\n shouldFocus: 1 /* FocusFindInput */,\n shouldAnimate: true\n });\n }\n };\n return StartFindAction;\n}(EditorAction));\nexport { StartFindAction };\nvar StartFindWithSelectionAction = /** @class */ (function (_super) {\n __extends(StartFindWithSelectionAction, _super);\n function StartFindWithSelectionAction() {\n return _super.call(this, {\n id: FIND_IDS.StartFindWithSelection,\n label: nls.localize('startFindWithSelectionAction', \"Find With Selection\"),\n alias: 'Find With Selection',\n precondition: null,\n kbOpts: {\n kbExpr: null,\n primary: null,\n mac: {\n primary: 2048 /* CtrlCmd */ | 35 /* KEY_E */,\n },\n weight: 100 /* EditorContrib */\n }\n }) || this;\n }\n StartFindWithSelectionAction.prototype.run = function (accessor, editor) {\n var controller = CommonFindController.get(editor);\n if (controller) {\n controller.start({\n forceRevealReplace: false,\n seedSearchStringFromSelection: true,\n seedSearchStringFromGlobalClipboard: false,\n shouldFocus: 1 /* FocusFindInput */,\n shouldAnimate: true\n });\n controller.setGlobalBufferTerm(controller.getState().searchString);\n }\n };\n return StartFindWithSelectionAction;\n}(EditorAction));\nexport { StartFindWithSelectionAction };\nvar MatchFindAction = /** @class */ (function (_super) {\n __extends(MatchFindAction, _super);\n function MatchFindAction() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n MatchFindAction.prototype.run = function (accessor, editor) {\n var controller = CommonFindController.get(editor);\n if (controller && !this._run(controller)) {\n controller.start({\n forceRevealReplace: false,\n seedSearchStringFromSelection: (controller.getState().searchString.length === 0) && editor.getConfiguration().contribInfo.find.seedSearchStringFromSelection,\n seedSearchStringFromGlobalClipboard: true,\n shouldFocus: 0 /* NoFocusChange */,\n shouldAnimate: true\n });\n this._run(controller);\n }\n };\n return MatchFindAction;\n}(EditorAction));\nexport { MatchFindAction };\nvar NextMatchFindAction = /** @class */ (function (_super) {\n __extends(NextMatchFindAction, _super);\n function NextMatchFindAction() {\n return _super.call(this, {\n id: FIND_IDS.NextMatchFindAction,\n label: nls.localize('findNextMatchAction', \"Find Next\"),\n alias: 'Find Next',\n precondition: null,\n kbOpts: {\n kbExpr: EditorContextKeys.focus,\n primary: 61 /* F3 */,\n mac: { primary: 2048 /* CtrlCmd */ | 37 /* KEY_G */, secondary: [61 /* F3 */] },\n weight: 100 /* EditorContrib */\n }\n }) || this;\n }\n NextMatchFindAction.prototype._run = function (controller) {\n return controller.moveToNextMatch();\n };\n return NextMatchFindAction;\n}(MatchFindAction));\nexport { NextMatchFindAction };\nvar PreviousMatchFindAction = /** @class */ (function (_super) {\n __extends(PreviousMatchFindAction, _super);\n function PreviousMatchFindAction() {\n return _super.call(this, {\n id: FIND_IDS.PreviousMatchFindAction,\n label: nls.localize('findPreviousMatchAction', \"Find Previous\"),\n alias: 'Find Previous',\n precondition: null,\n kbOpts: {\n kbExpr: EditorContextKeys.focus,\n primary: 1024 /* Shift */ | 61 /* F3 */,\n mac: { primary: 2048 /* CtrlCmd */ | 1024 /* Shift */ | 37 /* KEY_G */, secondary: [1024 /* Shift */ | 61 /* F3 */] },\n weight: 100 /* EditorContrib */\n }\n }) || this;\n }\n PreviousMatchFindAction.prototype._run = function (controller) {\n return controller.moveToPrevMatch();\n };\n return PreviousMatchFindAction;\n}(MatchFindAction));\nexport { PreviousMatchFindAction };\nvar SelectionMatchFindAction = /** @class */ (function (_super) {\n __extends(SelectionMatchFindAction, _super);\n function SelectionMatchFindAction() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n SelectionMatchFindAction.prototype.run = function (accessor, editor) {\n var controller = CommonFindController.get(editor);\n if (!controller) {\n return;\n }\n var selectionSearchString = getSelectionSearchString(editor);\n if (selectionSearchString) {\n controller.setSearchString(selectionSearchString);\n }\n if (!this._run(controller)) {\n controller.start({\n forceRevealReplace: false,\n seedSearchStringFromSelection: editor.getConfiguration().contribInfo.find.seedSearchStringFromSelection,\n seedSearchStringFromGlobalClipboard: false,\n shouldFocus: 0 /* NoFocusChange */,\n shouldAnimate: true\n });\n this._run(controller);\n }\n };\n return SelectionMatchFindAction;\n}(EditorAction));\nexport { SelectionMatchFindAction };\nvar NextSelectionMatchFindAction = /** @class */ (function (_super) {\n __extends(NextSelectionMatchFindAction, _super);\n function NextSelectionMatchFindAction() {\n return _super.call(this, {\n id: FIND_IDS.NextSelectionMatchFindAction,\n label: nls.localize('nextSelectionMatchFindAction', \"Find Next Selection\"),\n alias: 'Find Next Selection',\n precondition: null,\n kbOpts: {\n kbExpr: EditorContextKeys.focus,\n primary: 2048 /* CtrlCmd */ | 61 /* F3 */,\n weight: 100 /* EditorContrib */\n }\n }) || this;\n }\n NextSelectionMatchFindAction.prototype._run = function (controller) {\n return controller.moveToNextMatch();\n };\n return NextSelectionMatchFindAction;\n}(SelectionMatchFindAction));\nexport { NextSelectionMatchFindAction };\nvar PreviousSelectionMatchFindAction = /** @class */ (function (_super) {\n __extends(PreviousSelectionMatchFindAction, _super);\n function PreviousSelectionMatchFindAction() {\n return _super.call(this, {\n id: FIND_IDS.PreviousSelectionMatchFindAction,\n label: nls.localize('previousSelectionMatchFindAction', \"Find Previous Selection\"),\n alias: 'Find Previous Selection',\n precondition: null,\n kbOpts: {\n kbExpr: EditorContextKeys.focus,\n primary: 2048 /* CtrlCmd */ | 1024 /* Shift */ | 61 /* F3 */,\n weight: 100 /* EditorContrib */\n }\n }) || this;\n }\n PreviousSelectionMatchFindAction.prototype._run = function (controller) {\n return controller.moveToPrevMatch();\n };\n return PreviousSelectionMatchFindAction;\n}(SelectionMatchFindAction));\nexport { PreviousSelectionMatchFindAction };\nvar StartFindReplaceAction = /** @class */ (function (_super) {\n __extends(StartFindReplaceAction, _super);\n function StartFindReplaceAction() {\n return _super.call(this, {\n id: FIND_IDS.StartFindReplaceAction,\n label: nls.localize('startReplace', \"Replace\"),\n alias: 'Replace',\n precondition: null,\n kbOpts: {\n kbExpr: null,\n primary: 2048 /* CtrlCmd */ | 38 /* KEY_H */,\n mac: { primary: 2048 /* CtrlCmd */ | 512 /* Alt */ | 36 /* KEY_F */ },\n weight: 100 /* EditorContrib */\n },\n menubarOpts: {\n menuId: MenuId.MenubarEditMenu,\n group: '3_find',\n title: nls.localize({ key: 'miReplace', comment: ['&& denotes a mnemonic'] }, \"&&Replace\"),\n order: 2\n }\n }) || this;\n }\n StartFindReplaceAction.prototype.run = function (accessor, editor) {\n if (editor.getConfiguration().readOnly) {\n return;\n }\n var controller = CommonFindController.get(editor);\n var currentSelection = editor.getSelection();\n // we only seed search string from selection when the current selection is single line and not empty.\n var seedSearchStringFromSelection = !currentSelection.isEmpty() &&\n currentSelection.startLineNumber === currentSelection.endLineNumber && editor.getConfiguration().contribInfo.find.seedSearchStringFromSelection;\n var oldSearchString = controller.getState().searchString;\n // if the existing search string in find widget is empty and we don't seed search string from selection, it means the Find Input\n // is still empty, so we should focus the Find Input instead of Replace Input.\n var shouldFocus = (!!oldSearchString || seedSearchStringFromSelection) ?\n 2 /* FocusReplaceInput */ : 1 /* FocusFindInput */;\n if (controller) {\n controller.start({\n forceRevealReplace: true,\n seedSearchStringFromSelection: seedSearchStringFromSelection,\n seedSearchStringFromGlobalClipboard: editor.getConfiguration().contribInfo.find.seedSearchStringFromSelection,\n shouldFocus: shouldFocus,\n shouldAnimate: true\n });\n }\n };\n return StartFindReplaceAction;\n}(EditorAction));\nexport { StartFindReplaceAction };\nregisterEditorContribution(FindController);\nregisterEditorAction(StartFindAction);\nregisterEditorAction(StartFindWithSelectionAction);\nregisterEditorAction(NextMatchFindAction);\nregisterEditorAction(PreviousMatchFindAction);\nregisterEditorAction(NextSelectionMatchFindAction);\nregisterEditorAction(PreviousSelectionMatchFindAction);\nregisterEditorAction(StartFindReplaceAction);\nvar FindCommand = EditorCommand.bindToContribution(CommonFindController.get);\nregisterEditorCommand(new FindCommand({\n id: FIND_IDS.CloseFindWidgetCommand,\n precondition: CONTEXT_FIND_WIDGET_VISIBLE,\n handler: function (x) { return x.closeFindWidget(); },\n kbOpts: {\n weight: 100 /* EditorContrib */ + 5,\n kbExpr: EditorContextKeys.focus,\n primary: 9 /* Escape */,\n secondary: [1024 /* Shift */ | 9 /* Escape */]\n }\n}));\nregisterEditorCommand(new FindCommand({\n id: FIND_IDS.ToggleCaseSensitiveCommand,\n precondition: null,\n handler: function (x) { return x.toggleCaseSensitive(); },\n kbOpts: {\n weight: 100 /* EditorContrib */ + 5,\n kbExpr: EditorContextKeys.focus,\n primary: ToggleCaseSensitiveKeybinding.primary,\n mac: ToggleCaseSensitiveKeybinding.mac,\n win: ToggleCaseSensitiveKeybinding.win,\n linux: ToggleCaseSensitiveKeybinding.linux\n }\n}));\nregisterEditorCommand(new FindCommand({\n id: FIND_IDS.ToggleWholeWordCommand,\n precondition: null,\n handler: function (x) { return x.toggleWholeWords(); },\n kbOpts: {\n weight: 100 /* EditorContrib */ + 5,\n kbExpr: EditorContextKeys.focus,\n primary: ToggleWholeWordKeybinding.primary,\n mac: ToggleWholeWordKeybinding.mac,\n win: ToggleWholeWordKeybinding.win,\n linux: ToggleWholeWordKeybinding.linux\n }\n}));\nregisterEditorCommand(new FindCommand({\n id: FIND_IDS.ToggleRegexCommand,\n precondition: null,\n handler: function (x) { return x.toggleRegex(); },\n kbOpts: {\n weight: 100 /* EditorContrib */ + 5,\n kbExpr: EditorContextKeys.focus,\n primary: ToggleRegexKeybinding.primary,\n mac: ToggleRegexKeybinding.mac,\n win: ToggleRegexKeybinding.win,\n linux: ToggleRegexKeybinding.linux\n }\n}));\nregisterEditorCommand(new FindCommand({\n id: FIND_IDS.ToggleSearchScopeCommand,\n precondition: null,\n handler: function (x) { return x.toggleSearchScope(); },\n kbOpts: {\n weight: 100 /* EditorContrib */ + 5,\n kbExpr: EditorContextKeys.focus,\n primary: ToggleSearchScopeKeybinding.primary,\n mac: ToggleSearchScopeKeybinding.mac,\n win: ToggleSearchScopeKeybinding.win,\n linux: ToggleSearchScopeKeybinding.linux\n }\n}));\nregisterEditorCommand(new FindCommand({\n id: FIND_IDS.ReplaceOneAction,\n precondition: CONTEXT_FIND_WIDGET_VISIBLE,\n handler: function (x) { return x.replace(); },\n kbOpts: {\n weight: 100 /* EditorContrib */ + 5,\n kbExpr: EditorContextKeys.focus,\n primary: 2048 /* CtrlCmd */ | 1024 /* Shift */ | 22 /* KEY_1 */\n }\n}));\nregisterEditorCommand(new FindCommand({\n id: FIND_IDS.ReplaceAllAction,\n precondition: CONTEXT_FIND_WIDGET_VISIBLE,\n handler: function (x) { return x.replaceAll(); },\n kbOpts: {\n weight: 100 /* EditorContrib */ + 5,\n kbExpr: EditorContextKeys.focus,\n primary: 2048 /* CtrlCmd */ | 512 /* Alt */ | 3 /* Enter */\n }\n}));\nregisterEditorCommand(new FindCommand({\n id: FIND_IDS.SelectAllMatchesAction,\n precondition: CONTEXT_FIND_WIDGET_VISIBLE,\n handler: function (x) { return x.selectAllMatches(); },\n kbOpts: {\n weight: 100 /* EditorContrib */ + 5,\n kbExpr: EditorContextKeys.focus,\n primary: 512 /* Alt */ | 3 /* Enter */\n }\n}));\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nexport var MAX_FOLDING_REGIONS = 0xFFFF;\nexport var MAX_LINE_NUMBER = 0xFFFFFF;\nvar MASK_INDENT = 0xFF000000;\nvar FoldingRegions = /** @class */ (function () {\n function FoldingRegions(startIndexes, endIndexes, types) {\n if (startIndexes.length !== endIndexes.length || startIndexes.length > MAX_FOLDING_REGIONS) {\n throw new Error('invalid startIndexes or endIndexes size');\n }\n this._startIndexes = startIndexes;\n this._endIndexes = endIndexes;\n this._collapseStates = new Uint32Array(Math.ceil(startIndexes.length / 32));\n this._types = types;\n }\n FoldingRegions.prototype.ensureParentIndices = function () {\n var _this = this;\n if (!this._parentsComputed) {\n this._parentsComputed = true;\n var parentIndexes_1 = [];\n var isInsideLast = function (startLineNumber, endLineNumber) {\n var index = parentIndexes_1[parentIndexes_1.length - 1];\n return _this.getStartLineNumber(index) <= startLineNumber && _this.getEndLineNumber(index) >= endLineNumber;\n };\n for (var i = 0, len = this._startIndexes.length; i < len; i++) {\n var startLineNumber = this._startIndexes[i];\n var endLineNumber = this._endIndexes[i];\n if (startLineNumber > MAX_LINE_NUMBER || endLineNumber > MAX_LINE_NUMBER) {\n throw new Error('startLineNumber or endLineNumber must not exceed ' + MAX_LINE_NUMBER);\n }\n while (parentIndexes_1.length > 0 && !isInsideLast(startLineNumber, endLineNumber)) {\n parentIndexes_1.pop();\n }\n var parentIndex = parentIndexes_1.length > 0 ? parentIndexes_1[parentIndexes_1.length - 1] : -1;\n parentIndexes_1.push(i);\n this._startIndexes[i] = startLineNumber + ((parentIndex & 0xFF) << 24);\n this._endIndexes[i] = endLineNumber + ((parentIndex & 0xFF00) << 16);\n }\n }\n };\n Object.defineProperty(FoldingRegions.prototype, \"length\", {\n get: function () {\n return this._startIndexes.length;\n },\n enumerable: true,\n configurable: true\n });\n FoldingRegions.prototype.getStartLineNumber = function (index) {\n return this._startIndexes[index] & MAX_LINE_NUMBER;\n };\n FoldingRegions.prototype.getEndLineNumber = function (index) {\n return this._endIndexes[index] & MAX_LINE_NUMBER;\n };\n FoldingRegions.prototype.getType = function (index) {\n return this._types ? this._types[index] : void 0;\n };\n FoldingRegions.prototype.hasTypes = function () {\n return !!this._types;\n };\n FoldingRegions.prototype.isCollapsed = function (index) {\n var arrayIndex = (index / 32) | 0;\n var bit = index % 32;\n return (this._collapseStates[arrayIndex] & (1 << bit)) !== 0;\n };\n FoldingRegions.prototype.setCollapsed = function (index, newState) {\n var arrayIndex = (index / 32) | 0;\n var bit = index % 32;\n var value = this._collapseStates[arrayIndex];\n if (newState) {\n this._collapseStates[arrayIndex] = value | (1 << bit);\n }\n else {\n this._collapseStates[arrayIndex] = value & ~(1 << bit);\n }\n };\n FoldingRegions.prototype.toRegion = function (index) {\n return new FoldingRegion(this, index);\n };\n FoldingRegions.prototype.getParentIndex = function (index) {\n this.ensureParentIndices();\n var parent = ((this._startIndexes[index] & MASK_INDENT) >>> 24) + ((this._endIndexes[index] & MASK_INDENT) >>> 16);\n if (parent === MAX_FOLDING_REGIONS) {\n return -1;\n }\n return parent;\n };\n FoldingRegions.prototype.contains = function (index, line) {\n return this.getStartLineNumber(index) <= line && this.getEndLineNumber(index) >= line;\n };\n FoldingRegions.prototype.findIndex = function (line) {\n var low = 0, high = this._startIndexes.length;\n if (high === 0) {\n return -1; // no children\n }\n while (low < high) {\n var mid = Math.floor((low + high) / 2);\n if (line < this.getStartLineNumber(mid)) {\n high = mid;\n }\n else {\n low = mid + 1;\n }\n }\n return low - 1;\n };\n FoldingRegions.prototype.findRange = function (line) {\n var index = this.findIndex(line);\n if (index >= 0) {\n var endLineNumber = this.getEndLineNumber(index);\n if (endLineNumber >= line) {\n return index;\n }\n index = this.getParentIndex(index);\n while (index !== -1) {\n if (this.contains(index, line)) {\n return index;\n }\n index = this.getParentIndex(index);\n }\n }\n return -1;\n };\n FoldingRegions.prototype.toString = function () {\n var res = [];\n for (var i = 0; i < this.length; i++) {\n res[i] = \"[\" + (this.isCollapsed(i) ? '+' : '-') + \"] \" + this.getStartLineNumber(i) + \"/\" + this.getEndLineNumber(i);\n }\n return res.join(', ');\n };\n return FoldingRegions;\n}());\nexport { FoldingRegions };\nvar FoldingRegion = /** @class */ (function () {\n function FoldingRegion(ranges, index) {\n this.ranges = ranges;\n this.index = index;\n }\n Object.defineProperty(FoldingRegion.prototype, \"startLineNumber\", {\n get: function () {\n return this.ranges.getStartLineNumber(this.index);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(FoldingRegion.prototype, \"endLineNumber\", {\n get: function () {\n return this.ranges.getEndLineNumber(this.index);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(FoldingRegion.prototype, \"regionIndex\", {\n get: function () {\n return this.index;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(FoldingRegion.prototype, \"parentIndex\", {\n get: function () {\n return this.ranges.getParentIndex(this.index);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(FoldingRegion.prototype, \"isCollapsed\", {\n get: function () {\n return this.ranges.isCollapsed(this.index);\n },\n enumerable: true,\n configurable: true\n });\n FoldingRegion.prototype.containedBy = function (range) {\n return range.startLineNumber <= this.startLineNumber && range.endLineNumber >= this.endLineNumber;\n };\n FoldingRegion.prototype.containsLine = function (lineNumber) {\n return this.startLineNumber <= lineNumber && lineNumber <= this.endLineNumber;\n };\n return FoldingRegion;\n}());\nexport { FoldingRegion };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { Emitter } from '../../../base/common/event';\nimport { FoldingRegions } from './foldingRanges';\nvar FoldingModel = /** @class */ (function () {\n function FoldingModel(textModel, decorationProvider) {\n this._updateEventEmitter = new Emitter();\n this._textModel = textModel;\n this._decorationProvider = decorationProvider;\n this._regions = new FoldingRegions(new Uint32Array(0), new Uint32Array(0));\n this._editorDecorationIds = [];\n this._isInitialized = false;\n }\n Object.defineProperty(FoldingModel.prototype, \"regions\", {\n get: function () { return this._regions; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(FoldingModel.prototype, \"onDidChange\", {\n get: function () { return this._updateEventEmitter.event; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(FoldingModel.prototype, \"textModel\", {\n get: function () { return this._textModel; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(FoldingModel.prototype, \"isInitialized\", {\n get: function () { return this._isInitialized; },\n enumerable: true,\n configurable: true\n });\n FoldingModel.prototype.toggleCollapseState = function (regions) {\n var _this = this;\n if (!regions.length) {\n return;\n }\n var processed = {};\n this._decorationProvider.changeDecorations(function (accessor) {\n for (var _i = 0, regions_1 = regions; _i < regions_1.length; _i++) {\n var region = regions_1[_i];\n var index = region.regionIndex;\n var editorDecorationId = _this._editorDecorationIds[index];\n if (editorDecorationId && !processed[editorDecorationId]) {\n processed[editorDecorationId] = true;\n var newCollapseState = !_this._regions.isCollapsed(index);\n _this._regions.setCollapsed(index, newCollapseState);\n accessor.changeDecorationOptions(editorDecorationId, _this._decorationProvider.getDecorationOption(newCollapseState));\n }\n }\n });\n this._updateEventEmitter.fire({ model: this, collapseStateChanged: regions });\n };\n FoldingModel.prototype.update = function (newRegions, blockedLineNumers) {\n var _this = this;\n if (blockedLineNumers === void 0) { blockedLineNumers = []; }\n var newEditorDecorations = [];\n var isBlocked = function (startLineNumber, endLineNumber) {\n for (var _i = 0, blockedLineNumers_1 = blockedLineNumers; _i < blockedLineNumers_1.length; _i++) {\n var blockedLineNumber = blockedLineNumers_1[_i];\n if (startLineNumber < blockedLineNumber && blockedLineNumber <= endLineNumber) { // first line is visible\n return true;\n }\n }\n return false;\n };\n var initRange = function (index, isCollapsed) {\n var startLineNumber = newRegions.getStartLineNumber(index);\n if (isCollapsed && isBlocked(startLineNumber, newRegions.getEndLineNumber(index))) {\n isCollapsed = false;\n }\n newRegions.setCollapsed(index, isCollapsed);\n var maxColumn = _this._textModel.getLineMaxColumn(startLineNumber);\n var decorationRange = {\n startLineNumber: startLineNumber,\n startColumn: maxColumn,\n endLineNumber: startLineNumber,\n endColumn: maxColumn\n };\n newEditorDecorations.push({ range: decorationRange, options: _this._decorationProvider.getDecorationOption(isCollapsed) });\n };\n var i = 0;\n var nextCollapsed = function () {\n while (i < _this._regions.length) {\n var isCollapsed = _this._regions.isCollapsed(i);\n i++;\n if (isCollapsed) {\n return i - 1;\n }\n }\n return -1;\n };\n var k = 0;\n var collapsedIndex = nextCollapsed();\n while (collapsedIndex !== -1 && k < newRegions.length) {\n // get the latest range\n var decRange = this._textModel.getDecorationRange(this._editorDecorationIds[collapsedIndex]);\n if (decRange) {\n var collapsedStartLineNumber = decRange.startLineNumber;\n if (this._textModel.getLineMaxColumn(collapsedStartLineNumber) === decRange.startColumn) { // test that the decoration is still at the end otherwise it got deleted\n while (k < newRegions.length) {\n var startLineNumber = newRegions.getStartLineNumber(k);\n if (collapsedStartLineNumber >= startLineNumber) {\n initRange(k, collapsedStartLineNumber === startLineNumber);\n k++;\n }\n else {\n break;\n }\n }\n }\n }\n collapsedIndex = nextCollapsed();\n }\n while (k < newRegions.length) {\n initRange(k, false);\n k++;\n }\n this._editorDecorationIds = this._decorationProvider.deltaDecorations(this._editorDecorationIds, newEditorDecorations);\n this._regions = newRegions;\n this._isInitialized = true;\n this._updateEventEmitter.fire({ model: this });\n };\n /**\n * Collapse state memento, for persistence only\n */\n FoldingModel.prototype.getMemento = function () {\n var collapsedRanges = [];\n for (var i = 0; i < this._regions.length; i++) {\n if (this._regions.isCollapsed(i)) {\n var range = this._textModel.getDecorationRange(this._editorDecorationIds[i]);\n if (range) {\n var startLineNumber = range.startLineNumber;\n var endLineNumber = range.endLineNumber + this._regions.getEndLineNumber(i) - this._regions.getStartLineNumber(i);\n collapsedRanges.push({ startLineNumber: startLineNumber, endLineNumber: endLineNumber });\n }\n }\n }\n if (collapsedRanges.length > 0) {\n return collapsedRanges;\n }\n return null;\n };\n /**\n * Apply persisted state, for persistence only\n */\n FoldingModel.prototype.applyMemento = function (state) {\n if (!Array.isArray(state)) {\n return;\n }\n var toToogle = [];\n for (var _i = 0, state_1 = state; _i < state_1.length; _i++) {\n var range = state_1[_i];\n var region = this.getRegionAtLine(range.startLineNumber);\n if (region && !region.isCollapsed) {\n toToogle.push(region);\n }\n }\n this.toggleCollapseState(toToogle);\n };\n FoldingModel.prototype.dispose = function () {\n this._decorationProvider.deltaDecorations(this._editorDecorationIds, []);\n };\n FoldingModel.prototype.getAllRegionsAtLine = function (lineNumber, filter) {\n var result = [];\n if (this._regions) {\n var index = this._regions.findRange(lineNumber);\n var level = 1;\n while (index >= 0) {\n var current = this._regions.toRegion(index);\n if (!filter || filter(current, level)) {\n result.push(current);\n }\n level++;\n index = current.parentIndex;\n }\n }\n return result;\n };\n FoldingModel.prototype.getRegionAtLine = function (lineNumber) {\n if (this._regions) {\n var index = this._regions.findRange(lineNumber);\n if (index >= 0) {\n return this._regions.toRegion(index);\n }\n }\n return null;\n };\n FoldingModel.prototype.getRegionsInside = function (region, filter) {\n var result = [];\n var trackLevel = filter && filter.length === 2;\n var levelStack = trackLevel ? [] : null;\n var index = region ? region.regionIndex + 1 : 0;\n var endLineNumber = region ? region.endLineNumber : Number.MAX_VALUE;\n for (var i = index, len = this._regions.length; i < len; i++) {\n var current = this._regions.toRegion(i);\n if (this._regions.getStartLineNumber(i) < endLineNumber) {\n if (trackLevel) {\n while (levelStack.length > 0 && !current.containedBy(levelStack[levelStack.length - 1])) {\n levelStack.pop();\n }\n levelStack.push(current);\n if (filter(current, levelStack.length)) {\n result.push(current);\n }\n }\n else if (!filter || filter(current)) {\n result.push(current);\n }\n }\n else {\n break;\n }\n }\n return result;\n };\n return FoldingModel;\n}());\nexport { FoldingModel };\n/**\n * Collapse or expand the regions at the given locations including all children.\n * @param doCollapse Wheter to collase or expand\n * @param levels The number of levels. Use 1 to only impact the regions at the location, use Number.MAX_VALUE for all levels.\n * @param lineNumbers the location of the regions to collapse or expand, or if not set, all regions in the model.\n */\nexport function setCollapseStateLevelsDown(foldingModel, doCollapse, levels, lineNumbers) {\n if (levels === void 0) { levels = Number.MAX_VALUE; }\n var toToggle = [];\n if (lineNumbers && lineNumbers.length > 0) {\n for (var _i = 0, lineNumbers_1 = lineNumbers; _i < lineNumbers_1.length; _i++) {\n var lineNumber = lineNumbers_1[_i];\n var region = foldingModel.getRegionAtLine(lineNumber);\n if (region) {\n if (region.isCollapsed !== doCollapse) {\n toToggle.push(region);\n }\n if (levels > 1) {\n var regionsInside = foldingModel.getRegionsInside(region, function (r, level) { return r.isCollapsed !== doCollapse && level < levels; });\n toToggle.push.apply(toToggle, regionsInside);\n }\n }\n }\n }\n else {\n var regionsInside = foldingModel.getRegionsInside(null, function (r, level) { return r.isCollapsed !== doCollapse && level < levels; });\n toToggle.push.apply(toToggle, regionsInside);\n }\n foldingModel.toggleCollapseState(toToggle);\n}\n/**\n * Collapse or expand the regions at the given locations including all parents.\n * @param doCollapse Wheter to collase or expand\n * @param levels The number of levels. Use 1 to only impact the regions at the location, use Number.MAX_VALUE for all levels.\n * @param lineNumbers the location of the regions to collapse or expand, or if not set, all regions in the model.\n */\nexport function setCollapseStateLevelsUp(foldingModel, doCollapse, levels, lineNumbers) {\n var toToggle = [];\n for (var _i = 0, lineNumbers_2 = lineNumbers; _i < lineNumbers_2.length; _i++) {\n var lineNumber = lineNumbers_2[_i];\n var regions = foldingModel.getAllRegionsAtLine(lineNumber, function (region, level) { return region.isCollapsed !== doCollapse && level <= levels; });\n toToggle.push.apply(toToggle, regions);\n }\n foldingModel.toggleCollapseState(toToggle);\n}\n/**\n * Folds or unfolds all regions that have a given level, except if they contain one of the blocked lines.\n * @param foldLevel level. Level == 1 is the top level\n * @param doCollapse Wheter to collase or expand\n* @param blockedLineNumbers\n*/\nexport function setCollapseStateAtLevel(foldingModel, foldLevel, doCollapse, blockedLineNumbers) {\n var filter = function (region, level) { return level === foldLevel && region.isCollapsed !== doCollapse && !blockedLineNumbers.some(function (line) { return region.containsLine(line); }); };\n var toToggle = foldingModel.getRegionsInside(null, filter);\n foldingModel.toggleCollapseState(toToggle);\n}\n/**\n * Folds all regions for which the lines start with a given regex\n * @param foldingModel the folding model\n */\nexport function setCollapseStateForMatchingLines(foldingModel, regExp, doCollapse) {\n var editorModel = foldingModel.textModel;\n var regions = foldingModel.regions;\n var toToggle = [];\n for (var i = regions.length - 1; i >= 0; i--) {\n if (doCollapse !== regions.isCollapsed(i)) {\n var startLineNumber = regions.getStartLineNumber(i);\n if (regExp.test(editorModel.getLineContent(startLineNumber))) {\n toToggle.push(regions.toRegion(i));\n }\n }\n }\n foldingModel.toggleCollapseState(toToggle);\n}\n/**\n * Folds all regions of the given type\n * @param foldingModel the folding model\n */\nexport function setCollapseStateForType(foldingModel, type, doCollapse) {\n var regions = foldingModel.regions;\n var toToggle = [];\n for (var i = regions.length - 1; i >= 0; i--) {\n if (doCollapse !== regions.isCollapsed(i) && type === regions.getType(i)) {\n toToggle.push(regions.toRegion(i));\n }\n }\n foldingModel.toggleCollapseState(toToggle);\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { TrackedRangeStickiness } from '../../common/model';\nimport { ModelDecorationOptions } from '../../common/model/textModel';\nvar FoldingDecorationProvider = /** @class */ (function () {\n function FoldingDecorationProvider(editor) {\n this.editor = editor;\n this.autoHideFoldingControls = true;\n }\n FoldingDecorationProvider.prototype.getDecorationOption = function (isCollapsed) {\n if (isCollapsed) {\n return FoldingDecorationProvider.COLLAPSED_VISUAL_DECORATION;\n }\n else if (this.autoHideFoldingControls) {\n return FoldingDecorationProvider.EXPANDED_AUTO_HIDE_VISUAL_DECORATION;\n }\n else {\n return FoldingDecorationProvider.EXPANDED_VISUAL_DECORATION;\n }\n };\n FoldingDecorationProvider.prototype.deltaDecorations = function (oldDecorations, newDecorations) {\n return this.editor.deltaDecorations(oldDecorations, newDecorations);\n };\n FoldingDecorationProvider.prototype.changeDecorations = function (callback) {\n return this.editor.changeDecorations(callback);\n };\n FoldingDecorationProvider.COLLAPSED_VISUAL_DECORATION = ModelDecorationOptions.register({\n stickiness: TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges,\n afterContentClassName: 'inline-folded',\n linesDecorationsClassName: 'folding collapsed'\n });\n FoldingDecorationProvider.EXPANDED_AUTO_HIDE_VISUAL_DECORATION = ModelDecorationOptions.register({\n stickiness: TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges,\n linesDecorationsClassName: 'folding'\n });\n FoldingDecorationProvider.EXPANDED_VISUAL_DECORATION = ModelDecorationOptions.register({\n stickiness: TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges,\n linesDecorationsClassName: 'folding alwaysShowFoldIcons'\n });\n return FoldingDecorationProvider;\n}());\nexport { FoldingDecorationProvider };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { Emitter } from '../../../base/common/event';\nimport { Range } from '../../common/core/range';\nimport { findFirstInSorted } from '../../../base/common/arrays';\nvar HiddenRangeModel = /** @class */ (function () {\n function HiddenRangeModel(model) {\n var _this = this;\n this._updateEventEmitter = new Emitter();\n this._foldingModel = model;\n this._foldingModelListener = model.onDidChange(function (_) { return _this.updateHiddenRanges(); });\n this._hiddenRanges = [];\n if (model.regions.length) {\n this.updateHiddenRanges();\n }\n }\n Object.defineProperty(HiddenRangeModel.prototype, \"onDidChange\", {\n get: function () { return this._updateEventEmitter.event; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(HiddenRangeModel.prototype, \"hiddenRanges\", {\n get: function () { return this._hiddenRanges; },\n enumerable: true,\n configurable: true\n });\n HiddenRangeModel.prototype.updateHiddenRanges = function () {\n var updateHiddenAreas = false;\n var newHiddenAreas = [];\n var i = 0; // index into hidden\n var k = 0;\n var lastCollapsedStart = Number.MAX_VALUE;\n var lastCollapsedEnd = -1;\n var ranges = this._foldingModel.regions;\n for (; i < ranges.length; i++) {\n if (!ranges.isCollapsed(i)) {\n continue;\n }\n var startLineNumber = ranges.getStartLineNumber(i) + 1; // the first line is not hidden\n var endLineNumber = ranges.getEndLineNumber(i);\n if (lastCollapsedStart <= startLineNumber && endLineNumber <= lastCollapsedEnd) {\n // ignore ranges contained in collapsed regions\n continue;\n }\n if (!updateHiddenAreas && k < this._hiddenRanges.length && this._hiddenRanges[k].startLineNumber === startLineNumber && this._hiddenRanges[k].endLineNumber === endLineNumber) {\n // reuse the old ranges\n newHiddenAreas.push(this._hiddenRanges[k]);\n k++;\n }\n else {\n updateHiddenAreas = true;\n newHiddenAreas.push(new Range(startLineNumber, 1, endLineNumber, 1));\n }\n lastCollapsedStart = startLineNumber;\n lastCollapsedEnd = endLineNumber;\n }\n if (updateHiddenAreas || k < this._hiddenRanges.length) {\n this.applyHiddenRanges(newHiddenAreas);\n }\n };\n HiddenRangeModel.prototype.applyMemento = function (state) {\n if (!Array.isArray(state) || state.length === 0) {\n return false;\n }\n var hiddenRanges = [];\n for (var _i = 0, state_1 = state; _i < state_1.length; _i++) {\n var r = state_1[_i];\n if (!r.startLineNumber || !r.endLineNumber) {\n return false;\n }\n hiddenRanges.push(new Range(r.startLineNumber + 1, 1, r.endLineNumber, 1));\n }\n this.applyHiddenRanges(hiddenRanges);\n return true;\n };\n /**\n * Collapse state memento, for persistence only, only used if folding model is not yet initialized\n */\n HiddenRangeModel.prototype.getMemento = function () {\n return this._hiddenRanges.map(function (r) { return ({ startLineNumber: r.startLineNumber - 1, endLineNumber: r.endLineNumber }); });\n };\n HiddenRangeModel.prototype.applyHiddenRanges = function (newHiddenAreas) {\n this._hiddenRanges = newHiddenAreas;\n this._updateEventEmitter.fire(newHiddenAreas);\n };\n HiddenRangeModel.prototype.hasRanges = function () {\n return this._hiddenRanges.length > 0;\n };\n HiddenRangeModel.prototype.isHidden = function (line) {\n return findRange(this._hiddenRanges, line) !== null;\n };\n HiddenRangeModel.prototype.adjustSelections = function (selections) {\n var _this = this;\n var hasChanges = false;\n var editorModel = this._foldingModel.textModel;\n var lastRange = null;\n var adjustLine = function (line) {\n if (!lastRange || !isInside(line, lastRange)) {\n lastRange = findRange(_this._hiddenRanges, line);\n }\n if (lastRange) {\n return lastRange.startLineNumber - 1;\n }\n return null;\n };\n for (var i = 0, len = selections.length; i < len; i++) {\n var selection = selections[i];\n var adjustedStartLine = adjustLine(selection.startLineNumber);\n if (adjustedStartLine) {\n selection = selection.setStartPosition(adjustedStartLine, editorModel.getLineMaxColumn(adjustedStartLine));\n hasChanges = true;\n }\n var adjustedEndLine = adjustLine(selection.endLineNumber);\n if (adjustedEndLine) {\n selection = selection.setEndPosition(adjustedEndLine, editorModel.getLineMaxColumn(adjustedEndLine));\n hasChanges = true;\n }\n selections[i] = selection;\n }\n return hasChanges;\n };\n HiddenRangeModel.prototype.dispose = function () {\n if (this.hiddenRanges.length > 0) {\n this._hiddenRanges = [];\n this._updateEventEmitter.fire(this._hiddenRanges);\n }\n if (this._foldingModelListener) {\n this._foldingModelListener.dispose();\n this._foldingModelListener = null;\n }\n };\n return HiddenRangeModel;\n}());\nexport { HiddenRangeModel };\nfunction isInside(line, range) {\n return line >= range.startLineNumber && line <= range.endLineNumber;\n}\nfunction findRange(ranges, line) {\n var i = findFirstInSorted(ranges, function (r) { return line < r.startLineNumber; }) - 1;\n if (i >= 0 && ranges[i].endLineNumber >= line) {\n return ranges[i];\n }\n return null;\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport { FoldingRegions, MAX_LINE_NUMBER } from './foldingRanges';\nimport { TextModel } from '../../common/model/textModel';\nimport { TPromise } from '../../../base/common/winjs.base';\nimport { LanguageConfigurationRegistry } from '../../common/modes/languageConfigurationRegistry';\nvar MAX_FOLDING_REGIONS_FOR_INDENT_LIMIT = 5000;\nexport var ID_INDENT_PROVIDER = 'indent';\nvar IndentRangeProvider = /** @class */ (function () {\n function IndentRangeProvider(editorModel) {\n this.editorModel = editorModel;\n this.id = ID_INDENT_PROVIDER;\n }\n IndentRangeProvider.prototype.dispose = function () {\n };\n IndentRangeProvider.prototype.compute = function (cancelationToken) {\n var foldingRules = LanguageConfigurationRegistry.getFoldingRules(this.editorModel.getLanguageIdentifier().id);\n var offSide = foldingRules && foldingRules.offSide;\n var markers = foldingRules && foldingRules.markers;\n return TPromise.as(computeRanges(this.editorModel, offSide, markers));\n };\n return IndentRangeProvider;\n}());\nexport { IndentRangeProvider };\n// public only for testing\nvar RangesCollector = /** @class */ (function () {\n function RangesCollector(foldingRangesLimit) {\n this._startIndexes = [];\n this._endIndexes = [];\n this._indentOccurrences = [];\n this._length = 0;\n this._foldingRangesLimit = foldingRangesLimit;\n }\n RangesCollector.prototype.insertFirst = function (startLineNumber, endLineNumber, indent) {\n if (startLineNumber > MAX_LINE_NUMBER || endLineNumber > MAX_LINE_NUMBER) {\n return;\n }\n var index = this._length;\n this._startIndexes[index] = startLineNumber;\n this._endIndexes[index] = endLineNumber;\n this._length++;\n if (indent < 1000) {\n this._indentOccurrences[indent] = (this._indentOccurrences[indent] || 0) + 1;\n }\n };\n RangesCollector.prototype.toIndentRanges = function (model) {\n if (this._length <= this._foldingRangesLimit) {\n // reverse and create arrays of the exact length\n var startIndexes = new Uint32Array(this._length);\n var endIndexes = new Uint32Array(this._length);\n for (var i = this._length - 1, k = 0; i >= 0; i--, k++) {\n startIndexes[k] = this._startIndexes[i];\n endIndexes[k] = this._endIndexes[i];\n }\n return new FoldingRegions(startIndexes, endIndexes);\n }\n else {\n var entries = 0;\n var maxIndent = this._indentOccurrences.length;\n for (var i = 0; i < this._indentOccurrences.length; i++) {\n var n = this._indentOccurrences[i];\n if (n) {\n if (n + entries > this._foldingRangesLimit) {\n maxIndent = i;\n break;\n }\n entries += n;\n }\n }\n var tabSize = model.getOptions().tabSize;\n // reverse and create arrays of the exact length\n var startIndexes = new Uint32Array(this._foldingRangesLimit);\n var endIndexes = new Uint32Array(this._foldingRangesLimit);\n for (var i = this._length - 1, k = 0; i >= 0; i--) {\n var startIndex = this._startIndexes[i];\n var lineContent = model.getLineContent(startIndex);\n var indent = TextModel.computeIndentLevel(lineContent, tabSize);\n if (indent < maxIndent || (indent === maxIndent && entries++ < this._foldingRangesLimit)) {\n startIndexes[k] = startIndex;\n endIndexes[k] = this._endIndexes[i];\n k++;\n }\n }\n return new FoldingRegions(startIndexes, endIndexes);\n }\n };\n return RangesCollector;\n}());\nexport { RangesCollector };\nexport function computeRanges(model, offSide, markers, foldingRangesLimit) {\n if (foldingRangesLimit === void 0) { foldingRangesLimit = MAX_FOLDING_REGIONS_FOR_INDENT_LIMIT; }\n var tabSize = model.getOptions().tabSize;\n var result = new RangesCollector(foldingRangesLimit);\n var pattern = void 0;\n if (markers) {\n pattern = new RegExp(\"(\" + markers.start.source + \")|(?:\" + markers.end.source + \")\");\n }\n var previousRegions = [];\n previousRegions.push({ indent: -1, line: model.getLineCount() + 1, marker: false }); // sentinel, to make sure there's at least one entry\n for (var line = model.getLineCount(); line > 0; line--) {\n var lineContent = model.getLineContent(line);\n var indent = TextModel.computeIndentLevel(lineContent, tabSize);\n var previous = previousRegions[previousRegions.length - 1];\n if (indent === -1) {\n if (offSide && !previous.marker) {\n // for offSide languages, empty lines are associated to the next block\n previous.line = line;\n }\n continue; // only whitespace\n }\n var m = void 0;\n if (pattern && (m = lineContent.match(pattern))) {\n // folding pattern match\n if (m[1]) { // start pattern match\n // discard all regions until the folding pattern\n var i = previousRegions.length - 1;\n while (i > 0 && !previousRegions[i].marker) {\n i--;\n }\n if (i > 0) {\n previousRegions.length = i + 1;\n previous = previousRegions[i];\n // new folding range from pattern, includes the end line\n result.insertFirst(line, previous.line, indent);\n previous.marker = false;\n previous.indent = indent;\n previous.line = line;\n continue;\n }\n else {\n // no end marker found, treat line as a regular line\n }\n }\n else { // end pattern match\n previousRegions.push({ indent: -2, line: line, marker: true });\n continue;\n }\n }\n if (previous.indent > indent) {\n // discard all regions with larger indent\n do {\n previousRegions.pop();\n previous = previousRegions[previousRegions.length - 1];\n } while (previous.indent > indent);\n // new folding range\n var endLineNumber = previous.line - 1;\n if (endLineNumber - line >= 1) { // needs at east size 1\n result.insertFirst(line, endLineNumber, indent);\n }\n }\n if (previous.indent === indent) {\n previous.line = line;\n }\n else { // previous.indent < indent\n // new region with a bigger indent\n previousRegions.push({ indent: indent, line: line, marker: false });\n }\n }\n return result.toIndentRanges(model);\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport { onUnexpectedExternalError } from '../../../base/common/errors';\nimport { toThenable } from '../../../base/common/async';\nimport { TPromise } from '../../../base/common/winjs.base';\nimport { MAX_LINE_NUMBER, FoldingRegions } from './foldingRanges';\nvar MAX_FOLDING_REGIONS = 5000;\nvar foldingContext = {};\nexport var ID_SYNTAX_PROVIDER = 'syntax';\nvar SyntaxRangeProvider = /** @class */ (function () {\n function SyntaxRangeProvider(editorModel, providers, limit) {\n if (limit === void 0) { limit = MAX_FOLDING_REGIONS; }\n this.editorModel = editorModel;\n this.providers = providers;\n this.limit = limit;\n this.id = ID_SYNTAX_PROVIDER;\n }\n SyntaxRangeProvider.prototype.compute = function (cancellationToken) {\n var _this = this;\n return collectSyntaxRanges(this.providers, this.editorModel, cancellationToken).then(function (ranges) {\n if (ranges) {\n var res = sanitizeRanges(ranges, _this.limit);\n return res;\n }\n return null;\n });\n };\n SyntaxRangeProvider.prototype.dispose = function () {\n };\n return SyntaxRangeProvider;\n}());\nexport { SyntaxRangeProvider };\nfunction collectSyntaxRanges(providers, model, cancellationToken) {\n var rangeData = null;\n var promises = providers.map(function (provider, i) {\n return toThenable(provider.provideFoldingRanges(model, foldingContext, cancellationToken)).then(function (ranges) {\n if (cancellationToken.isCancellationRequested) {\n return;\n }\n if (Array.isArray(ranges)) {\n if (!Array.isArray(rangeData)) {\n rangeData = [];\n }\n var nLines = model.getLineCount();\n for (var _i = 0, ranges_1 = ranges; _i < ranges_1.length; _i++) {\n var r = ranges_1[_i];\n if (r.start > 0 && r.end > r.start && r.end <= nLines) {\n rangeData.push({ start: r.start, end: r.end, rank: i, kind: r.kind });\n }\n }\n }\n }, onUnexpectedExternalError);\n });\n return TPromise.join(promises).then(function (_) {\n return rangeData;\n });\n}\nvar RangesCollector = /** @class */ (function () {\n function RangesCollector(foldingRangesLimit) {\n this._startIndexes = [];\n this._endIndexes = [];\n this._nestingLevels = [];\n this._nestingLevelCounts = [];\n this._types = [];\n this._length = 0;\n this._foldingRangesLimit = foldingRangesLimit;\n }\n RangesCollector.prototype.add = function (startLineNumber, endLineNumber, type, nestingLevel) {\n if (startLineNumber > MAX_LINE_NUMBER || endLineNumber > MAX_LINE_NUMBER) {\n return;\n }\n var index = this._length;\n this._startIndexes[index] = startLineNumber;\n this._endIndexes[index] = endLineNumber;\n this._nestingLevels[index] = nestingLevel;\n this._types[index] = type;\n this._length++;\n if (nestingLevel < 30) {\n this._nestingLevelCounts[nestingLevel] = (this._nestingLevelCounts[nestingLevel] || 0) + 1;\n }\n };\n RangesCollector.prototype.toIndentRanges = function () {\n if (this._length <= this._foldingRangesLimit) {\n var startIndexes = new Uint32Array(this._length);\n var endIndexes = new Uint32Array(this._length);\n for (var i = 0; i < this._length; i++) {\n startIndexes[i] = this._startIndexes[i];\n endIndexes[i] = this._endIndexes[i];\n }\n return new FoldingRegions(startIndexes, endIndexes, this._types);\n }\n else {\n var entries = 0;\n var maxLevel = this._nestingLevelCounts.length;\n for (var i = 0; i < this._nestingLevelCounts.length; i++) {\n var n = this._nestingLevelCounts[i];\n if (n) {\n if (n + entries > this._foldingRangesLimit) {\n maxLevel = i;\n break;\n }\n entries += n;\n }\n }\n var startIndexes = new Uint32Array(this._foldingRangesLimit);\n var endIndexes = new Uint32Array(this._foldingRangesLimit);\n var types = [];\n for (var i = 0, k = 0; i < this._length; i++) {\n var level = this._nestingLevels[i];\n if (level < maxLevel || (level === maxLevel && entries++ < this._foldingRangesLimit)) {\n startIndexes[k] = this._startIndexes[i];\n endIndexes[k] = this._endIndexes[i];\n types[k] = this._types[i];\n k++;\n }\n }\n return new FoldingRegions(startIndexes, endIndexes, types);\n }\n };\n return RangesCollector;\n}());\nexport { RangesCollector };\nexport function sanitizeRanges(rangeData, limit) {\n var sorted = rangeData.sort(function (d1, d2) {\n var diff = d1.start - d2.start;\n if (diff === 0) {\n diff = d1.rank - d2.rank;\n }\n return diff;\n });\n var collector = new RangesCollector(limit);\n var top = null;\n var previous = [];\n for (var _i = 0, sorted_1 = sorted; _i < sorted_1.length; _i++) {\n var entry = sorted_1[_i];\n if (!top) {\n top = entry;\n collector.add(entry.start, entry.end, entry.kind && entry.kind.value, previous.length);\n }\n else {\n if (entry.start > top.start) {\n if (entry.end <= top.end) {\n previous.push(top);\n top = entry;\n collector.add(entry.start, entry.end, entry.kind && entry.kind.value, previous.length);\n }\n else {\n if (entry.start > top.end) {\n do {\n top = previous.pop();\n } while (top && entry.start > top.end);\n if (top) {\n previous.push(top);\n }\n top = entry;\n }\n collector.add(entry.start, entry.end, entry.kind && entry.kind.value, previous.length);\n }\n }\n }\n }\n return collector.toIndentRanges();\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport { TrackedRangeStickiness } from '../../common/model';\nimport { TPromise } from '../../../base/common/winjs.base';\nimport { sanitizeRanges } from './syntaxRangeProvider';\nexport var ID_INIT_PROVIDER = 'init';\nvar InitializingRangeProvider = /** @class */ (function () {\n function InitializingRangeProvider(editorModel, initialRanges, onTimeout, timeoutTime) {\n this.editorModel = editorModel;\n this.id = ID_INIT_PROVIDER;\n if (initialRanges.length) {\n var toDecorationRange = function (range) {\n return {\n range: {\n startLineNumber: range.startLineNumber,\n startColumn: 0,\n endLineNumber: range.endLineNumber,\n endColumn: editorModel.getLineLength(range.endLineNumber)\n },\n options: {\n stickiness: TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges\n }\n };\n };\n this.decorationIds = editorModel.deltaDecorations([], initialRanges.map(toDecorationRange));\n this.timeout = setTimeout(onTimeout, timeoutTime);\n }\n }\n InitializingRangeProvider.prototype.dispose = function () {\n if (this.decorationIds) {\n this.editorModel.deltaDecorations(this.decorationIds, []);\n this.decorationIds = void 0;\n }\n if (typeof this.timeout === 'number') {\n clearTimeout(this.timeout);\n this.timeout = void 0;\n }\n };\n InitializingRangeProvider.prototype.compute = function (cancelationToken) {\n var foldingRangeData = [];\n if (this.decorationIds) {\n for (var _i = 0, _a = this.decorationIds; _i < _a.length; _i++) {\n var id = _a[_i];\n var range = this.editorModel.getDecorationRange(id);\n if (range) {\n foldingRangeData.push({ start: range.startLineNumber, end: range.endLineNumber, rank: 1 });\n }\n }\n }\n return TPromise.as(sanitizeRanges(foldingRangeData, Number.MAX_VALUE));\n };\n return InitializingRangeProvider;\n}());\nexport { InitializingRangeProvider };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport './folding.css';\nimport * as nls from '../../../nls';\nimport * as types from '../../../base/common/types';\nimport { escapeRegExpCharacters } from '../../../base/common/strings';\nimport { RunOnceScheduler, Delayer, createCancelablePromise } from '../../../base/common/async';\nimport { KeyChord } from '../../../base/common/keyCodes';\nimport { dispose } from '../../../base/common/lifecycle';\nimport { TPromise } from '../../../base/common/winjs.base';\nimport { registerEditorAction, registerEditorContribution, EditorAction, registerInstantiatedEditorAction } from '../../browser/editorExtensions';\nimport { MouseTargetType } from '../../browser/editorBrowser';\nimport { FoldingModel, setCollapseStateAtLevel, setCollapseStateLevelsDown, setCollapseStateLevelsUp, setCollapseStateForMatchingLines, setCollapseStateForType } from './foldingModel';\nimport { FoldingDecorationProvider } from './foldingDecorations';\nimport { EditorContextKeys } from '../../common/editorContextKeys';\nimport { HiddenRangeModel } from './hiddenRangeModel';\nimport { LanguageConfigurationRegistry } from '../../common/modes/languageConfigurationRegistry';\nimport { IndentRangeProvider } from './indentRangeProvider';\nimport { FoldingRangeProviderRegistry, FoldingRangeKind } from '../../common/modes';\nimport { SyntaxRangeProvider, ID_SYNTAX_PROVIDER } from './syntaxRangeProvider';\nimport { InitializingRangeProvider, ID_INIT_PROVIDER } from './intializingRangeProvider';\nimport { onUnexpectedError } from '../../../base/common/errors';\nexport var ID = 'editor.contrib.folding';\nvar FoldingController = /** @class */ (function () {\n function FoldingController(editor) {\n var _this = this;\n this.editor = editor;\n this._isEnabled = this.editor.getConfiguration().contribInfo.folding;\n this._autoHideFoldingControls = this.editor.getConfiguration().contribInfo.showFoldingControls === 'mouseover';\n this._useFoldingProviders = this.editor.getConfiguration().contribInfo.foldingStrategy !== 'indentation';\n this.globalToDispose = [];\n this.localToDispose = [];\n this.foldingDecorationProvider = new FoldingDecorationProvider(editor);\n this.foldingDecorationProvider.autoHideFoldingControls = this._autoHideFoldingControls;\n this.globalToDispose.push(this.editor.onDidChangeModel(function () { return _this.onModelChanged(); }));\n this.globalToDispose.push(FoldingRangeProviderRegistry.onDidChange(function () { return _this.onFoldingStrategyChanged(); }));\n this.globalToDispose.push(this.editor.onDidChangeConfiguration(function (e) {\n if (e.contribInfo) {\n var oldIsEnabled = _this._isEnabled;\n _this._isEnabled = _this.editor.getConfiguration().contribInfo.folding;\n if (oldIsEnabled !== _this._isEnabled) {\n _this.onModelChanged();\n }\n var oldShowFoldingControls = _this._autoHideFoldingControls;\n _this._autoHideFoldingControls = _this.editor.getConfiguration().contribInfo.showFoldingControls === 'mouseover';\n if (oldShowFoldingControls !== _this._autoHideFoldingControls) {\n _this.foldingDecorationProvider.autoHideFoldingControls = _this._autoHideFoldingControls;\n _this.onModelContentChanged();\n }\n var oldUseFoldingProviders = _this._useFoldingProviders;\n _this._useFoldingProviders = _this.editor.getConfiguration().contribInfo.foldingStrategy !== 'indentation';\n if (oldUseFoldingProviders !== _this._useFoldingProviders) {\n _this.onFoldingStrategyChanged();\n }\n }\n }));\n this.globalToDispose.push({ dispose: function () { return dispose(_this.localToDispose); } });\n this.onModelChanged();\n }\n FoldingController.get = function (editor) {\n return editor.getContribution(ID);\n };\n FoldingController.prototype.getId = function () {\n return ID;\n };\n FoldingController.prototype.dispose = function () {\n this.globalToDispose = dispose(this.globalToDispose);\n };\n /**\n * Store view state.\n */\n FoldingController.prototype.saveViewState = function () {\n var model = this.editor.getModel();\n if (!model || !this._isEnabled || model.isTooLargeForTokenization()) {\n return {};\n }\n if (this.foldingModel) { // disposed ?\n var collapsedRegions = this.foldingModel.isInitialized ? this.foldingModel.getMemento() : this.hiddenRangeModel.getMemento();\n var provider = this.rangeProvider ? this.rangeProvider.id : void 0;\n return { collapsedRegions: collapsedRegions, lineCount: model.getLineCount(), provider: provider };\n }\n return void 0;\n };\n /**\n * Restore view state.\n */\n FoldingController.prototype.restoreViewState = function (state) {\n var model = this.editor.getModel();\n if (!model || !this._isEnabled || model.isTooLargeForTokenization()) {\n return;\n }\n if (!state || !state.collapsedRegions || state.lineCount !== model.getLineCount()) {\n return;\n }\n if (state.provider === ID_SYNTAX_PROVIDER || state.provider === ID_INIT_PROVIDER) {\n this.foldingStateMemento = state;\n }\n // set the hidden ranges right away, before waiting for the folding model.\n if (this.hiddenRangeModel.applyMemento(state.collapsedRegions)) {\n this.getFoldingModel().then(function (foldingModel) {\n if (foldingModel) {\n foldingModel.applyMemento(state.collapsedRegions);\n }\n }).done(undefined, onUnexpectedError);\n }\n };\n FoldingController.prototype.onModelChanged = function () {\n var _this = this;\n this.localToDispose = dispose(this.localToDispose);\n var model = this.editor.getModel();\n if (!this._isEnabled || !model || model.isTooLargeForTokenization()) {\n // huge files get no view model, so they cannot support hidden areas\n return;\n }\n this.foldingModel = new FoldingModel(model, this.foldingDecorationProvider);\n this.localToDispose.push(this.foldingModel);\n this.hiddenRangeModel = new HiddenRangeModel(this.foldingModel);\n this.localToDispose.push(this.hiddenRangeModel);\n this.localToDispose.push(this.hiddenRangeModel.onDidChange(function (hr) { return _this.onHiddenRangesChanges(hr); }));\n this.updateScheduler = new Delayer(200);\n this.cursorChangedScheduler = new RunOnceScheduler(function () { return _this.revealCursor(); }, 200);\n this.localToDispose.push(this.cursorChangedScheduler);\n this.localToDispose.push(this.editor.onDidChangeModelLanguageConfiguration(function (e) { return _this.onModelContentChanged(); })); // covers model language changes as well\n this.localToDispose.push(this.editor.onDidChangeModelContent(function (e) { return _this.onModelContentChanged(); }));\n this.localToDispose.push(this.editor.onDidChangeCursorPosition(function (e) { return _this.onCursorPositionChanged(); }));\n this.localToDispose.push(this.editor.onMouseDown(function (e) { return _this.onEditorMouseDown(e); }));\n this.localToDispose.push(this.editor.onMouseUp(function (e) { return _this.onEditorMouseUp(e); }));\n this.localToDispose.push({\n dispose: function () {\n if (_this.foldingRegionPromise) {\n _this.foldingRegionPromise.cancel();\n _this.foldingRegionPromise = null;\n }\n _this.updateScheduler.cancel();\n _this.updateScheduler = null;\n _this.foldingModel = null;\n _this.foldingModelPromise = null;\n _this.hiddenRangeModel = null;\n _this.cursorChangedScheduler = null;\n _this.foldingStateMemento = null;\n if (_this.rangeProvider) {\n _this.rangeProvider.dispose();\n }\n _this.rangeProvider = null;\n }\n });\n this.onModelContentChanged();\n };\n FoldingController.prototype.onFoldingStrategyChanged = function () {\n if (this.rangeProvider) {\n this.rangeProvider.dispose();\n }\n this.rangeProvider = null;\n this.onModelContentChanged();\n };\n FoldingController.prototype.getRangeProvider = function (editorModel) {\n var _this = this;\n if (this.rangeProvider) {\n return this.rangeProvider;\n }\n this.rangeProvider = new IndentRangeProvider(editorModel); // fallback\n if (this._useFoldingProviders) {\n var foldingProviders = FoldingRangeProviderRegistry.ordered(this.foldingModel.textModel);\n if (foldingProviders.length === 0 && this.foldingStateMemento) {\n this.rangeProvider = new InitializingRangeProvider(editorModel, this.foldingStateMemento.collapsedRegions, function () {\n // if after 30 the InitializingRangeProvider is still not replaced, force a refresh\n _this.foldingStateMemento = null;\n _this.onFoldingStrategyChanged();\n }, 30000);\n return this.rangeProvider; // keep memento in case there are still no foldingProviders on the next request.\n }\n else if (foldingProviders.length > 0) {\n this.rangeProvider = new SyntaxRangeProvider(editorModel, foldingProviders);\n }\n }\n this.foldingStateMemento = null;\n return this.rangeProvider;\n };\n FoldingController.prototype.getFoldingModel = function () {\n return this.foldingModelPromise;\n };\n FoldingController.prototype.onModelContentChanged = function () {\n var _this = this;\n if (this.updateScheduler) {\n if (this.foldingRegionPromise) {\n this.foldingRegionPromise.cancel();\n this.foldingRegionPromise = null;\n }\n this.foldingModelPromise = this.updateScheduler.trigger(function () {\n if (!_this.foldingModel) { // null if editor has been disposed, or folding turned off\n return null;\n }\n var foldingRegionPromise = _this.foldingRegionPromise = createCancelablePromise(function (token) { return _this.getRangeProvider(_this.foldingModel.textModel).compute(token); });\n return TPromise.wrap(foldingRegionPromise.then(function (foldingRanges) {\n if (foldingRanges && foldingRegionPromise === _this.foldingRegionPromise) { // new request or cancelled in the meantime?\n // some cursors might have moved into hidden regions, make sure they are in expanded regions\n var selections = _this.editor.getSelections();\n var selectionLineNumbers = selections ? selections.map(function (s) { return s.startLineNumber; }) : [];\n _this.foldingModel.update(foldingRanges, selectionLineNumbers);\n }\n return _this.foldingModel;\n }));\n });\n }\n };\n FoldingController.prototype.onHiddenRangesChanges = function (hiddenRanges) {\n if (hiddenRanges.length) {\n var selections = this.editor.getSelections();\n if (selections) {\n if (this.hiddenRangeModel.adjustSelections(selections)) {\n this.editor.setSelections(selections);\n }\n }\n }\n this.editor.setHiddenAreas(hiddenRanges);\n };\n FoldingController.prototype.onCursorPositionChanged = function () {\n if (this.hiddenRangeModel.hasRanges()) {\n this.cursorChangedScheduler.schedule();\n }\n };\n FoldingController.prototype.revealCursor = function () {\n var _this = this;\n this.getFoldingModel().then(function (foldingModel) {\n if (foldingModel) {\n var selections = _this.editor.getSelections();\n if (selections && selections.length > 0) {\n var toToggle = [];\n var _loop_1 = function (selection) {\n var lineNumber = selection.selectionStartLineNumber;\n if (_this.hiddenRangeModel.isHidden(lineNumber)) {\n toToggle.push.apply(toToggle, foldingModel.getAllRegionsAtLine(lineNumber, function (r) { return r.isCollapsed && lineNumber > r.startLineNumber; }));\n }\n };\n for (var _i = 0, selections_1 = selections; _i < selections_1.length; _i++) {\n var selection = selections_1[_i];\n _loop_1(selection);\n }\n if (toToggle.length) {\n foldingModel.toggleCollapseState(toToggle);\n _this.reveal(selections[0].getPosition());\n }\n }\n }\n }).done(undefined, onUnexpectedError);\n };\n FoldingController.prototype.onEditorMouseDown = function (e) {\n this.mouseDownInfo = null;\n var range = e.target.range;\n if (!this.hiddenRangeModel || !range) {\n return;\n }\n if (!e.event.leftButton && !e.event.middleButton) {\n return;\n }\n var iconClicked = false;\n switch (e.target.type) {\n case MouseTargetType.GUTTER_LINE_DECORATIONS:\n var data = e.target.detail;\n var gutterOffsetX = data.offsetX - data.glyphMarginWidth - data.lineNumbersWidth - data.glyphMarginLeft;\n // TODO@joao TODO@alex TODO@martin this is such that we don't collide with dirty diff\n if (gutterOffsetX <= 10) {\n return;\n }\n iconClicked = true;\n break;\n case MouseTargetType.CONTENT_EMPTY: {\n if (this.hiddenRangeModel.hasRanges()) {\n var data_1 = e.target.detail;\n if (!data_1.isAfterLines) {\n break;\n }\n }\n return;\n }\n case MouseTargetType.CONTENT_TEXT: {\n if (this.hiddenRangeModel.hasRanges()) {\n var model = this.editor.getModel();\n if (model && range.startColumn === model.getLineMaxColumn(range.startLineNumber)) {\n break;\n }\n }\n return;\n }\n default:\n return;\n }\n this.mouseDownInfo = { lineNumber: range.startLineNumber, iconClicked: iconClicked };\n };\n FoldingController.prototype.onEditorMouseUp = function (e) {\n var _this = this;\n if (!this.mouseDownInfo) {\n return;\n }\n var lineNumber = this.mouseDownInfo.lineNumber;\n var iconClicked = this.mouseDownInfo.iconClicked;\n var range = e.target.range;\n if (!range || range.startLineNumber !== lineNumber) {\n return;\n }\n if (iconClicked) {\n if (e.target.type !== MouseTargetType.GUTTER_LINE_DECORATIONS) {\n return;\n }\n }\n else {\n var model = this.editor.getModel();\n if (range.startColumn !== model.getLineMaxColumn(lineNumber)) {\n return;\n }\n }\n this.getFoldingModel().then(function (foldingModel) {\n if (foldingModel) {\n var region = foldingModel.getRegionAtLine(lineNumber);\n if (region && region.startLineNumber === lineNumber) {\n var isCollapsed_1 = region.isCollapsed;\n if (iconClicked || isCollapsed_1) {\n var toToggle = [region];\n if (e.event.middleButton || e.event.shiftKey) {\n toToggle.push.apply(toToggle, foldingModel.getRegionsInside(region, function (r) { return r.isCollapsed === isCollapsed_1; }));\n }\n foldingModel.toggleCollapseState(toToggle);\n _this.reveal({ lineNumber: lineNumber, column: 1 });\n }\n }\n }\n }).done(undefined, onUnexpectedError);\n };\n FoldingController.prototype.reveal = function (position) {\n this.editor.revealPositionInCenterIfOutsideViewport(position, 0 /* Smooth */);\n };\n return FoldingController;\n}());\nexport { FoldingController };\nvar FoldingAction = /** @class */ (function (_super) {\n __extends(FoldingAction, _super);\n function FoldingAction() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n FoldingAction.prototype.runEditorCommand = function (accessor, editor, args) {\n var _this = this;\n var foldingController = FoldingController.get(editor);\n if (!foldingController) {\n return;\n }\n var foldingModelPromise = foldingController.getFoldingModel();\n if (foldingModelPromise) {\n this.reportTelemetry(accessor, editor);\n return foldingModelPromise.then(function (foldingModel) {\n if (foldingModel) {\n _this.invoke(foldingController, foldingModel, editor, args);\n foldingController.reveal(editor.getSelection().getStartPosition());\n }\n });\n }\n };\n FoldingAction.prototype.getSelectedLines = function (editor) {\n var selections = editor.getSelections();\n return selections ? selections.map(function (s) { return s.startLineNumber; }) : [];\n };\n FoldingAction.prototype.getLineNumbers = function (args, editor) {\n if (args && args.selectionLines) {\n return args.selectionLines.map(function (l) { return l + 1; }); // to 0-bases line numbers\n }\n return this.getSelectedLines(editor);\n };\n FoldingAction.prototype.run = function (accessor, editor) {\n };\n return FoldingAction;\n}(EditorAction));\nfunction foldingArgumentsConstraint(args) {\n if (!types.isUndefined(args)) {\n if (!types.isObject(args)) {\n return false;\n }\n var foldingArgs = args;\n if (!types.isUndefined(foldingArgs.levels) && !types.isNumber(foldingArgs.levels)) {\n return false;\n }\n if (!types.isUndefined(foldingArgs.direction) && !types.isString(foldingArgs.direction)) {\n return false;\n }\n if (!types.isUndefined(foldingArgs.selectionLines) && (!types.isArray(foldingArgs.selectionLines) || !foldingArgs.selectionLines.every(types.isNumber))) {\n return false;\n }\n }\n return true;\n}\nvar UnfoldAction = /** @class */ (function (_super) {\n __extends(UnfoldAction, _super);\n function UnfoldAction() {\n return _super.call(this, {\n id: 'editor.unfold',\n label: nls.localize('unfoldAction.label', \"Unfold\"),\n alias: 'Unfold',\n precondition: null,\n kbOpts: {\n kbExpr: EditorContextKeys.editorTextFocus,\n primary: 2048 /* CtrlCmd */ | 1024 /* Shift */ | 89 /* US_CLOSE_SQUARE_BRACKET */,\n mac: {\n primary: 2048 /* CtrlCmd */ | 512 /* Alt */ | 89 /* US_CLOSE_SQUARE_BRACKET */\n },\n weight: 100 /* EditorContrib */\n },\n description: {\n description: 'Unfold the content in the editor',\n args: [\n {\n name: 'Unfold editor argument',\n description: \"Property-value pairs that can be passed through this argument:\\n\\t\\t\\t\\t\\t\\t* 'levels': Number of levels to unfold. If not set, defaults to 1.\\n\\t\\t\\t\\t\\t\\t* 'direction': If 'up', unfold given number of levels up otherwise unfolds down.\\n\\t\\t\\t\\t\\t\\t* 'selectionLines': The start lines (0-based) of the editor selections to apply the unfold action to. If not set, the active selection(s) will be used.\\n\\t\\t\\t\\t\\t\\t\",\n constraint: foldingArgumentsConstraint\n }\n ]\n }\n }) || this;\n }\n UnfoldAction.prototype.invoke = function (foldingController, foldingModel, editor, args) {\n var levels = args && args.levels || 1;\n var lineNumbers = this.getLineNumbers(args, editor);\n if (args && args.direction === 'up') {\n setCollapseStateLevelsUp(foldingModel, false, levels, lineNumbers);\n }\n else {\n setCollapseStateLevelsDown(foldingModel, false, levels, lineNumbers);\n }\n };\n return UnfoldAction;\n}(FoldingAction));\nvar UnFoldRecursivelyAction = /** @class */ (function (_super) {\n __extends(UnFoldRecursivelyAction, _super);\n function UnFoldRecursivelyAction() {\n return _super.call(this, {\n id: 'editor.unfoldRecursively',\n label: nls.localize('unFoldRecursivelyAction.label', \"Unfold Recursively\"),\n alias: 'Unfold Recursively',\n precondition: null,\n kbOpts: {\n kbExpr: EditorContextKeys.editorTextFocus,\n primary: KeyChord(2048 /* CtrlCmd */ | 41 /* KEY_K */, 2048 /* CtrlCmd */ | 89 /* US_CLOSE_SQUARE_BRACKET */),\n weight: 100 /* EditorContrib */\n }\n }) || this;\n }\n UnFoldRecursivelyAction.prototype.invoke = function (foldingController, foldingModel, editor, args) {\n setCollapseStateLevelsDown(foldingModel, false, Number.MAX_VALUE, this.getSelectedLines(editor));\n };\n return UnFoldRecursivelyAction;\n}(FoldingAction));\nvar FoldAction = /** @class */ (function (_super) {\n __extends(FoldAction, _super);\n function FoldAction() {\n return _super.call(this, {\n id: 'editor.fold',\n label: nls.localize('foldAction.label', \"Fold\"),\n alias: 'Fold',\n precondition: null,\n kbOpts: {\n kbExpr: EditorContextKeys.editorTextFocus,\n primary: 2048 /* CtrlCmd */ | 1024 /* Shift */ | 87 /* US_OPEN_SQUARE_BRACKET */,\n mac: {\n primary: 2048 /* CtrlCmd */ | 512 /* Alt */ | 87 /* US_OPEN_SQUARE_BRACKET */\n },\n weight: 100 /* EditorContrib */\n },\n description: {\n description: 'Fold the content in the editor',\n args: [\n {\n name: 'Fold editor argument',\n description: \"Property-value pairs that can be passed through this argument:\\n\\t\\t\\t\\t\\t\\t\\t* 'levels': Number of levels to fold. Defaults to 1.\\n\\t\\t\\t\\t\\t\\t\\t* 'direction': If 'up', folds given number of levels up otherwise folds down.\\n\\t\\t\\t\\t\\t\\t\\t* 'selectionLines': The start lines (0-based) of the editor selections to apply the fold action to. If not set, the active selection(s) will be used.\\n\\t\\t\\t\\t\\t\\t\",\n constraint: foldingArgumentsConstraint\n }\n ]\n }\n }) || this;\n }\n FoldAction.prototype.invoke = function (foldingController, foldingModel, editor, args) {\n var levels = args && args.levels || 1;\n var lineNumbers = this.getLineNumbers(args, editor);\n if (args && args.direction === 'up') {\n setCollapseStateLevelsUp(foldingModel, true, levels, lineNumbers);\n }\n else {\n setCollapseStateLevelsDown(foldingModel, true, levels, lineNumbers);\n }\n };\n return FoldAction;\n}(FoldingAction));\nvar FoldRecursivelyAction = /** @class */ (function (_super) {\n __extends(FoldRecursivelyAction, _super);\n function FoldRecursivelyAction() {\n return _super.call(this, {\n id: 'editor.foldRecursively',\n label: nls.localize('foldRecursivelyAction.label', \"Fold Recursively\"),\n alias: 'Fold Recursively',\n precondition: null,\n kbOpts: {\n kbExpr: EditorContextKeys.editorTextFocus,\n primary: KeyChord(2048 /* CtrlCmd */ | 41 /* KEY_K */, 2048 /* CtrlCmd */ | 87 /* US_OPEN_SQUARE_BRACKET */),\n weight: 100 /* EditorContrib */\n }\n }) || this;\n }\n FoldRecursivelyAction.prototype.invoke = function (foldingController, foldingModel, editor) {\n var selectedLines = this.getSelectedLines(editor);\n setCollapseStateLevelsDown(foldingModel, true, Number.MAX_VALUE, selectedLines);\n };\n return FoldRecursivelyAction;\n}(FoldingAction));\nvar FoldAllBlockCommentsAction = /** @class */ (function (_super) {\n __extends(FoldAllBlockCommentsAction, _super);\n function FoldAllBlockCommentsAction() {\n return _super.call(this, {\n id: 'editor.foldAllBlockComments',\n label: nls.localize('foldAllBlockComments.label', \"Fold All Block Comments\"),\n alias: 'Fold All Block Comments',\n precondition: null,\n kbOpts: {\n kbExpr: EditorContextKeys.editorTextFocus,\n primary: KeyChord(2048 /* CtrlCmd */ | 41 /* KEY_K */, 2048 /* CtrlCmd */ | 85 /* US_SLASH */),\n weight: 100 /* EditorContrib */\n }\n }) || this;\n }\n FoldAllBlockCommentsAction.prototype.invoke = function (foldingController, foldingModel, editor) {\n if (foldingModel.regions.hasTypes()) {\n setCollapseStateForType(foldingModel, FoldingRangeKind.Comment.value, true);\n }\n else {\n var comments = LanguageConfigurationRegistry.getComments(editor.getModel().getLanguageIdentifier().id);\n if (comments && comments.blockCommentStartToken) {\n var regExp = new RegExp('^\\\\s*' + escapeRegExpCharacters(comments.blockCommentStartToken));\n setCollapseStateForMatchingLines(foldingModel, regExp, true);\n }\n }\n };\n return FoldAllBlockCommentsAction;\n}(FoldingAction));\nvar FoldAllRegionsAction = /** @class */ (function (_super) {\n __extends(FoldAllRegionsAction, _super);\n function FoldAllRegionsAction() {\n return _super.call(this, {\n id: 'editor.foldAllMarkerRegions',\n label: nls.localize('foldAllMarkerRegions.label', \"Fold All Regions\"),\n alias: 'Fold All Regions',\n precondition: null,\n kbOpts: {\n kbExpr: EditorContextKeys.editorTextFocus,\n primary: KeyChord(2048 /* CtrlCmd */ | 41 /* KEY_K */, 2048 /* CtrlCmd */ | 29 /* KEY_8 */),\n weight: 100 /* EditorContrib */\n }\n }) || this;\n }\n FoldAllRegionsAction.prototype.invoke = function (foldingController, foldingModel, editor) {\n if (foldingModel.regions.hasTypes()) {\n setCollapseStateForType(foldingModel, FoldingRangeKind.Region.value, true);\n }\n else {\n var foldingRules = LanguageConfigurationRegistry.getFoldingRules(editor.getModel().getLanguageIdentifier().id);\n if (foldingRules && foldingRules.markers && foldingRules.markers.start) {\n var regExp = new RegExp(foldingRules.markers.start);\n setCollapseStateForMatchingLines(foldingModel, regExp, true);\n }\n }\n };\n return FoldAllRegionsAction;\n}(FoldingAction));\nvar UnfoldAllRegionsAction = /** @class */ (function (_super) {\n __extends(UnfoldAllRegionsAction, _super);\n function UnfoldAllRegionsAction() {\n return _super.call(this, {\n id: 'editor.unfoldAllMarkerRegions',\n label: nls.localize('unfoldAllMarkerRegions.label', \"Unfold All Regions\"),\n alias: 'Unfold All Regions',\n precondition: null,\n kbOpts: {\n kbExpr: EditorContextKeys.editorTextFocus,\n primary: KeyChord(2048 /* CtrlCmd */ | 41 /* KEY_K */, 2048 /* CtrlCmd */ | 30 /* KEY_9 */),\n weight: 100 /* EditorContrib */\n }\n }) || this;\n }\n UnfoldAllRegionsAction.prototype.invoke = function (foldingController, foldingModel, editor) {\n if (foldingModel.regions.hasTypes()) {\n setCollapseStateForType(foldingModel, FoldingRangeKind.Region.value, false);\n }\n else {\n var foldingRules = LanguageConfigurationRegistry.getFoldingRules(editor.getModel().getLanguageIdentifier().id);\n if (foldingRules && foldingRules.markers && foldingRules.markers.start) {\n var regExp = new RegExp(foldingRules.markers.start);\n setCollapseStateForMatchingLines(foldingModel, regExp, false);\n }\n }\n };\n return UnfoldAllRegionsAction;\n}(FoldingAction));\nvar FoldAllAction = /** @class */ (function (_super) {\n __extends(FoldAllAction, _super);\n function FoldAllAction() {\n return _super.call(this, {\n id: 'editor.foldAll',\n label: nls.localize('foldAllAction.label', \"Fold All\"),\n alias: 'Fold All',\n precondition: null,\n kbOpts: {\n kbExpr: EditorContextKeys.editorTextFocus,\n primary: KeyChord(2048 /* CtrlCmd */ | 41 /* KEY_K */, 2048 /* CtrlCmd */ | 21 /* KEY_0 */),\n weight: 100 /* EditorContrib */\n }\n }) || this;\n }\n FoldAllAction.prototype.invoke = function (foldingController, foldingModel, editor) {\n setCollapseStateLevelsDown(foldingModel, true);\n };\n return FoldAllAction;\n}(FoldingAction));\nvar UnfoldAllAction = /** @class */ (function (_super) {\n __extends(UnfoldAllAction, _super);\n function UnfoldAllAction() {\n return _super.call(this, {\n id: 'editor.unfoldAll',\n label: nls.localize('unfoldAllAction.label', \"Unfold All\"),\n alias: 'Unfold All',\n precondition: null,\n kbOpts: {\n kbExpr: EditorContextKeys.editorTextFocus,\n primary: KeyChord(2048 /* CtrlCmd */ | 41 /* KEY_K */, 2048 /* CtrlCmd */ | 40 /* KEY_J */),\n weight: 100 /* EditorContrib */\n }\n }) || this;\n }\n UnfoldAllAction.prototype.invoke = function (foldingController, foldingModel, editor) {\n setCollapseStateLevelsDown(foldingModel, false);\n };\n return UnfoldAllAction;\n}(FoldingAction));\nvar FoldLevelAction = /** @class */ (function (_super) {\n __extends(FoldLevelAction, _super);\n function FoldLevelAction() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n FoldLevelAction.prototype.getFoldingLevel = function () {\n return parseInt(this.id.substr(FoldLevelAction.ID_PREFIX.length));\n };\n FoldLevelAction.prototype.invoke = function (foldingController, foldingModel, editor) {\n setCollapseStateAtLevel(foldingModel, this.getFoldingLevel(), true, this.getSelectedLines(editor));\n };\n FoldLevelAction.ID_PREFIX = 'editor.foldLevel';\n FoldLevelAction.ID = function (level) { return FoldLevelAction.ID_PREFIX + level; };\n return FoldLevelAction;\n}(FoldingAction));\nregisterEditorContribution(FoldingController);\nregisterEditorAction(UnfoldAction);\nregisterEditorAction(UnFoldRecursivelyAction);\nregisterEditorAction(FoldAction);\nregisterEditorAction(FoldRecursivelyAction);\nregisterEditorAction(FoldAllAction);\nregisterEditorAction(UnfoldAllAction);\nregisterEditorAction(FoldAllBlockCommentsAction);\nregisterEditorAction(FoldAllRegionsAction);\nregisterEditorAction(UnfoldAllRegionsAction);\nfor (var i = 1; i <= 7; i++) {\n registerInstantiatedEditorAction(new FoldLevelAction({\n id: FoldLevelAction.ID(i),\n label: nls.localize('foldLevelAction.label', \"Fold Level {0}\", i),\n alias: \"Fold Level \" + i,\n precondition: null,\n kbOpts: {\n kbExpr: EditorContextKeys.editorTextFocus,\n primary: KeyChord(2048 /* CtrlCmd */ | 41 /* KEY_K */, 2048 /* CtrlCmd */ | (21 /* KEY_0 */ + i)),\n weight: 100 /* EditorContrib */\n }\n }));\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport * as nls from '../../../nls';\nimport { registerEditorAction, EditorAction } from '../../browser/editorExtensions';\nimport { EditorZoom } from '../../common/config/editorZoom';\nvar EditorFontZoomIn = /** @class */ (function (_super) {\n __extends(EditorFontZoomIn, _super);\n function EditorFontZoomIn() {\n return _super.call(this, {\n id: 'editor.action.fontZoomIn',\n label: nls.localize('EditorFontZoomIn.label', \"Editor Font Zoom In\"),\n alias: 'Editor Font Zoom In',\n precondition: null\n }) || this;\n }\n EditorFontZoomIn.prototype.run = function (accessor, editor) {\n EditorZoom.setZoomLevel(EditorZoom.getZoomLevel() + 1);\n };\n return EditorFontZoomIn;\n}(EditorAction));\nvar EditorFontZoomOut = /** @class */ (function (_super) {\n __extends(EditorFontZoomOut, _super);\n function EditorFontZoomOut() {\n return _super.call(this, {\n id: 'editor.action.fontZoomOut',\n label: nls.localize('EditorFontZoomOut.label', \"Editor Font Zoom Out\"),\n alias: 'Editor Font Zoom Out',\n precondition: null\n }) || this;\n }\n EditorFontZoomOut.prototype.run = function (accessor, editor) {\n EditorZoom.setZoomLevel(EditorZoom.getZoomLevel() - 1);\n };\n return EditorFontZoomOut;\n}(EditorAction));\nvar EditorFontZoomReset = /** @class */ (function (_super) {\n __extends(EditorFontZoomReset, _super);\n function EditorFontZoomReset() {\n return _super.call(this, {\n id: 'editor.action.fontZoomReset',\n label: nls.localize('EditorFontZoomReset.label', \"Editor Font Zoom Reset\"),\n alias: 'Editor Font Zoom Reset',\n precondition: null\n }) || this;\n }\n EditorFontZoomReset.prototype.run = function (accessor, editor) {\n EditorZoom.setZoomLevel(0);\n };\n return EditorFontZoomReset;\n}(EditorAction));\nregisterEditorAction(EditorFontZoomIn);\nregisterEditorAction(EditorFontZoomOut);\nregisterEditorAction(EditorFontZoomReset);\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { illegalArgument, onUnexpectedExternalError } from '../../../base/common/errors';\nimport URI from '../../../base/common/uri';\nimport { isFalsyOrEmpty } from '../../../base/common/arrays';\nimport { TPromise } from '../../../base/common/winjs.base';\nimport { Range } from '../../common/core/range';\nimport { registerDefaultLanguageCommand, registerLanguageCommand } from '../../browser/editorExtensions';\nimport { DocumentFormattingEditProviderRegistry, DocumentRangeFormattingEditProviderRegistry, OnTypeFormattingEditProviderRegistry } from '../../common/modes';\nimport { IModelService } from '../../common/services/modelService';\nimport { asWinJsPromise, first } from '../../../base/common/async';\nvar NoProviderError = /** @class */ (function (_super) {\n __extends(NoProviderError, _super);\n function NoProviderError(message) {\n var _this = _super.call(this) || this;\n _this.name = NoProviderError.Name;\n _this.message = message;\n return _this;\n }\n NoProviderError.Name = 'NOPRO';\n return NoProviderError;\n}(Error));\nexport { NoProviderError };\nexport function getDocumentRangeFormattingEdits(model, range, options) {\n var providers = DocumentRangeFormattingEditProviderRegistry.ordered(model);\n if (providers.length === 0) {\n return TPromise.wrapError(new NoProviderError());\n }\n return first(providers.map(function (provider) { return function () {\n return asWinJsPromise(function (token) { return provider.provideDocumentRangeFormattingEdits(model, range, options, token); })\n .then(undefined, onUnexpectedExternalError);\n }; }), function (result) { return !isFalsyOrEmpty(result); });\n}\nexport function getDocumentFormattingEdits(model, options) {\n var providers = DocumentFormattingEditProviderRegistry.ordered(model);\n // try range formatters when no document formatter is registered\n if (providers.length === 0) {\n return getDocumentRangeFormattingEdits(model, model.getFullModelRange(), options);\n }\n return first(providers.map(function (provider) { return function () {\n return asWinJsPromise(function (token) { return provider.provideDocumentFormattingEdits(model, options, token); })\n .then(undefined, onUnexpectedExternalError);\n }; }), function (result) { return !isFalsyOrEmpty(result); });\n}\nexport function getOnTypeFormattingEdits(model, position, ch, options) {\n var support = OnTypeFormattingEditProviderRegistry.ordered(model)[0];\n if (!support) {\n return TPromise.as(undefined);\n }\n if (support.autoFormatTriggerCharacters.indexOf(ch) < 0) {\n return TPromise.as(undefined);\n }\n return asWinJsPromise(function (token) {\n return support.provideOnTypeFormattingEdits(model, position, ch, options, token);\n }).then(function (r) { return r; }, onUnexpectedExternalError);\n}\nregisterLanguageCommand('_executeFormatRangeProvider', function (accessor, args) {\n var resource = args.resource, range = args.range, options = args.options;\n if (!(resource instanceof URI) || !Range.isIRange(range)) {\n throw illegalArgument();\n }\n var model = accessor.get(IModelService).getModel(resource);\n if (!model) {\n throw illegalArgument('resource');\n }\n return getDocumentRangeFormattingEdits(model, Range.lift(range), options);\n});\nregisterLanguageCommand('_executeFormatDocumentProvider', function (accessor, args) {\n var resource = args.resource, options = args.options;\n if (!(resource instanceof URI)) {\n throw illegalArgument('resource');\n }\n var model = accessor.get(IModelService).getModel(resource);\n if (!model) {\n throw illegalArgument('resource');\n }\n return getDocumentFormattingEdits(model, options);\n});\nregisterDefaultLanguageCommand('_executeFormatOnTypeProvider', function (model, position, args) {\n var ch = args.ch, options = args.options;\n if (typeof ch !== 'string') {\n throw illegalArgument('ch');\n }\n return getOnTypeFormattingEdits(model, position, ch, options);\n});\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport { EditOperation } from '../../common/core/editOperation';\nimport { Range } from '../../common/core/range';\nvar FormattingEdit = /** @class */ (function () {\n function FormattingEdit() {\n }\n FormattingEdit._handleEolEdits = function (editor, edits) {\n var newEol = undefined;\n var singleEdits = [];\n for (var _i = 0, edits_1 = edits; _i < edits_1.length; _i++) {\n var edit = edits_1[_i];\n if (typeof edit.eol === 'number') {\n newEol = edit.eol;\n }\n if (edit.range && typeof edit.text === 'string') {\n singleEdits.push(edit);\n }\n }\n if (typeof newEol === 'number') {\n editor.getModel().pushEOL(newEol);\n }\n return singleEdits;\n };\n FormattingEdit._isFullModelReplaceEdit = function (editor, edit) {\n var model = editor.getModel();\n var editRange = model.validateRange(edit.range);\n var fullModelRange = model.getFullModelRange();\n return fullModelRange.equalsRange(editRange);\n };\n FormattingEdit.execute = function (editor, _edits) {\n editor.pushUndoStop();\n var edits = FormattingEdit._handleEolEdits(editor, _edits);\n if (edits.length === 1 && FormattingEdit._isFullModelReplaceEdit(editor, edits[0])) {\n // We use replace semantics and hope that markers stay put...\n editor.executeEdits('formatEditsCommand', edits.map(function (edit) { return EditOperation.replace(Range.lift(edit.range), edit.text); }));\n }\n else {\n editor.executeEdits('formatEditsCommand', edits.map(function (edit) { return EditOperation.replaceMove(Range.lift(edit.range), edit.text); }));\n }\n editor.pushUndoStop();\n };\n return FormattingEdit;\n}());\nexport { FormattingEdit };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __param = (this && this.__param) || function (paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n};\nimport * as nls from '../../../nls';\nimport { isFalsyOrEmpty } from '../../../base/common/arrays';\nimport { KeyChord } from '../../../base/common/keyCodes';\nimport { dispose } from '../../../base/common/lifecycle';\nimport { TPromise } from '../../../base/common/winjs.base';\nimport { ContextKeyExpr } from '../../../platform/contextkey/common/contextkey';\nimport { registerEditorAction, EditorAction, registerEditorContribution } from '../../browser/editorExtensions';\nimport { OnTypeFormattingEditProviderRegistry, DocumentRangeFormattingEditProviderRegistry } from '../../common/modes';\nimport { getOnTypeFormattingEdits, getDocumentFormattingEdits, getDocumentRangeFormattingEdits, NoProviderError } from './format';\nimport { FormattingEdit } from './formattingEdit';\nimport { CommandsRegistry } from '../../../platform/commands/common/commands';\nimport { ICodeEditorService } from '../../browser/services/codeEditorService';\nimport { IEditorWorkerService } from '../../common/services/editorWorkerService';\nimport { CharacterSet } from '../../common/core/characterClassifier';\nimport { Range } from '../../common/core/range';\nimport { alert } from '../../../base/browser/ui/aria/aria';\nimport { EditorState } from '../../browser/core/editorState';\nimport { EditorContextKeys } from '../../common/editorContextKeys';\nimport { INotificationService } from '../../../platform/notification/common/notification';\nfunction alertFormattingEdits(edits) {\n edits = edits.filter(function (edit) { return edit.range; });\n if (!edits.length) {\n return;\n }\n var range = edits[0].range;\n for (var i = 1; i < edits.length; i++) {\n range = Range.plusRange(range, edits[i].range);\n }\n var startLineNumber = range.startLineNumber, endLineNumber = range.endLineNumber;\n if (startLineNumber === endLineNumber) {\n if (edits.length === 1) {\n alert(nls.localize('hint11', \"Made 1 formatting edit on line {0}\", startLineNumber));\n }\n else {\n alert(nls.localize('hintn1', \"Made {0} formatting edits on line {1}\", edits.length, startLineNumber));\n }\n }\n else {\n if (edits.length === 1) {\n alert(nls.localize('hint1n', \"Made 1 formatting edit between lines {0} and {1}\", startLineNumber, endLineNumber));\n }\n else {\n alert(nls.localize('hintnn', \"Made {0} formatting edits between lines {1} and {2}\", edits.length, startLineNumber, endLineNumber));\n }\n }\n}\nvar FormatOnType = /** @class */ (function () {\n function FormatOnType(editor, workerService) {\n var _this = this;\n this.editor = editor;\n this.workerService = workerService;\n this.callOnDispose = [];\n this.callOnModel = [];\n this.callOnDispose.push(editor.onDidChangeConfiguration(function () { return _this.update(); }));\n this.callOnDispose.push(editor.onDidChangeModel(function () { return _this.update(); }));\n this.callOnDispose.push(editor.onDidChangeModelLanguage(function () { return _this.update(); }));\n this.callOnDispose.push(OnTypeFormattingEditProviderRegistry.onDidChange(this.update, this));\n }\n FormatOnType.prototype.update = function () {\n var _this = this;\n // clean up\n this.callOnModel = dispose(this.callOnModel);\n // we are disabled\n if (!this.editor.getConfiguration().contribInfo.formatOnType) {\n return;\n }\n // no model\n if (!this.editor.getModel()) {\n return;\n }\n var model = this.editor.getModel();\n // no support\n var support = OnTypeFormattingEditProviderRegistry.ordered(model)[0];\n if (!support || !support.autoFormatTriggerCharacters) {\n return;\n }\n // register typing listeners that will trigger the format\n var triggerChars = new CharacterSet();\n for (var _i = 0, _a = support.autoFormatTriggerCharacters; _i < _a.length; _i++) {\n var ch = _a[_i];\n triggerChars.add(ch.charCodeAt(0));\n }\n this.callOnModel.push(this.editor.onDidType(function (text) {\n var lastCharCode = text.charCodeAt(text.length - 1);\n if (triggerChars.has(lastCharCode)) {\n _this.trigger(String.fromCharCode(lastCharCode));\n }\n }));\n };\n FormatOnType.prototype.trigger = function (ch) {\n var _this = this;\n if (this.editor.getSelections().length > 1) {\n return;\n }\n var model = this.editor.getModel();\n var position = this.editor.getPosition();\n var canceled = false;\n // install a listener that checks if edits happens before the\n // position on which we format right now. If so, we won't\n // apply the format edits\n var unbind = this.editor.onDidChangeModelContent(function (e) {\n if (e.isFlush) {\n // a model.setValue() was called\n // cancel only once\n canceled = true;\n unbind.dispose();\n return;\n }\n for (var i = 0, len = e.changes.length; i < len; i++) {\n var change = e.changes[i];\n if (change.range.endLineNumber <= position.lineNumber) {\n // cancel only once\n canceled = true;\n unbind.dispose();\n return;\n }\n }\n });\n var modelOpts = model.getOptions();\n getOnTypeFormattingEdits(model, position, ch, {\n tabSize: modelOpts.tabSize,\n insertSpaces: modelOpts.insertSpaces\n }).then(function (edits) {\n return _this.workerService.computeMoreMinimalEdits(model.uri, edits);\n }).then(function (edits) {\n unbind.dispose();\n if (canceled || isFalsyOrEmpty(edits)) {\n return;\n }\n FormattingEdit.execute(_this.editor, edits);\n alertFormattingEdits(edits);\n }, function (err) {\n unbind.dispose();\n throw err;\n });\n };\n FormatOnType.prototype.getId = function () {\n return FormatOnType.ID;\n };\n FormatOnType.prototype.dispose = function () {\n this.callOnDispose = dispose(this.callOnDispose);\n this.callOnModel = dispose(this.callOnModel);\n };\n FormatOnType.ID = 'editor.contrib.autoFormat';\n FormatOnType = __decorate([\n __param(1, IEditorWorkerService)\n ], FormatOnType);\n return FormatOnType;\n}());\nvar FormatOnPaste = /** @class */ (function () {\n function FormatOnPaste(editor, workerService) {\n var _this = this;\n this.editor = editor;\n this.workerService = workerService;\n this.callOnDispose = [];\n this.callOnModel = [];\n this.callOnDispose.push(editor.onDidChangeConfiguration(function () { return _this.update(); }));\n this.callOnDispose.push(editor.onDidChangeModel(function () { return _this.update(); }));\n this.callOnDispose.push(editor.onDidChangeModelLanguage(function () { return _this.update(); }));\n this.callOnDispose.push(DocumentRangeFormattingEditProviderRegistry.onDidChange(this.update, this));\n }\n FormatOnPaste.prototype.update = function () {\n var _this = this;\n // clean up\n this.callOnModel = dispose(this.callOnModel);\n // we are disabled\n if (!this.editor.getConfiguration().contribInfo.formatOnPaste) {\n return;\n }\n // no model\n if (!this.editor.getModel()) {\n return;\n }\n var model = this.editor.getModel();\n // no support\n var support = DocumentRangeFormattingEditProviderRegistry.ordered(model)[0];\n if (!support || !support.provideDocumentRangeFormattingEdits) {\n return;\n }\n this.callOnModel.push(this.editor.onDidPaste(function (range) {\n _this.trigger(range);\n }));\n };\n FormatOnPaste.prototype.trigger = function (range) {\n var _this = this;\n if (this.editor.getSelections().length > 1) {\n return;\n }\n var model = this.editor.getModel();\n var _a = model.getOptions(), tabSize = _a.tabSize, insertSpaces = _a.insertSpaces;\n var state = new EditorState(this.editor, 1 /* Value */ | 4 /* Position */);\n getDocumentRangeFormattingEdits(model, range, { tabSize: tabSize, insertSpaces: insertSpaces }).then(function (edits) {\n return _this.workerService.computeMoreMinimalEdits(model.uri, edits);\n }).then(function (edits) {\n if (!state.validate(_this.editor) || isFalsyOrEmpty(edits)) {\n return;\n }\n FormattingEdit.execute(_this.editor, edits);\n alertFormattingEdits(edits);\n });\n };\n FormatOnPaste.prototype.getId = function () {\n return FormatOnPaste.ID;\n };\n FormatOnPaste.prototype.dispose = function () {\n this.callOnDispose = dispose(this.callOnDispose);\n this.callOnModel = dispose(this.callOnModel);\n };\n FormatOnPaste.ID = 'editor.contrib.formatOnPaste';\n FormatOnPaste = __decorate([\n __param(1, IEditorWorkerService)\n ], FormatOnPaste);\n return FormatOnPaste;\n}());\nvar AbstractFormatAction = /** @class */ (function (_super) {\n __extends(AbstractFormatAction, _super);\n function AbstractFormatAction() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n AbstractFormatAction.prototype.run = function (accessor, editor) {\n var _this = this;\n var workerService = accessor.get(IEditorWorkerService);\n var notificationService = accessor.get(INotificationService);\n var formattingPromise = this._getFormattingEdits(editor);\n if (!formattingPromise) {\n return TPromise.as(void 0);\n }\n // Capture the state of the editor\n var state = new EditorState(editor, 1 /* Value */ | 4 /* Position */);\n // Receive formatted value from worker\n return formattingPromise.then(function (edits) { return workerService.computeMoreMinimalEdits(editor.getModel().uri, edits); }).then(function (edits) {\n if (!state.validate(editor) || isFalsyOrEmpty(edits)) {\n return;\n }\n FormattingEdit.execute(editor, edits);\n alertFormattingEdits(edits);\n editor.focus();\n }, function (err) {\n if (err instanceof Error && err.name === NoProviderError.Name) {\n _this._notifyNoProviderError(notificationService, editor.getModel().getLanguageIdentifier().language);\n }\n else {\n throw err;\n }\n });\n };\n AbstractFormatAction.prototype._notifyNoProviderError = function (notificationService, language) {\n notificationService.info(nls.localize('no.provider', \"There is no formatter for '{0}'-files installed.\", language));\n };\n return AbstractFormatAction;\n}(EditorAction));\nexport { AbstractFormatAction };\nvar FormatDocumentAction = /** @class */ (function (_super) {\n __extends(FormatDocumentAction, _super);\n function FormatDocumentAction() {\n return _super.call(this, {\n id: 'editor.action.formatDocument',\n label: nls.localize('formatDocument.label', \"Format Document\"),\n alias: 'Format Document',\n precondition: EditorContextKeys.writable,\n kbOpts: {\n kbExpr: EditorContextKeys.editorTextFocus,\n primary: 1024 /* Shift */ | 512 /* Alt */ | 36 /* KEY_F */,\n // secondary: [KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyMod.CtrlCmd | KeyCode.KEY_D)],\n linux: { primary: 2048 /* CtrlCmd */ | 1024 /* Shift */ | 39 /* KEY_I */ },\n weight: 100 /* EditorContrib */\n },\n menuOpts: {\n when: EditorContextKeys.hasDocumentFormattingProvider,\n group: '1_modification',\n order: 1.3\n }\n }) || this;\n }\n FormatDocumentAction.prototype._getFormattingEdits = function (editor) {\n var model = editor.getModel();\n var _a = model.getOptions(), tabSize = _a.tabSize, insertSpaces = _a.insertSpaces;\n return getDocumentFormattingEdits(model, { tabSize: tabSize, insertSpaces: insertSpaces });\n };\n FormatDocumentAction.prototype._notifyNoProviderError = function (notificationService, language) {\n notificationService.info(nls.localize('no.documentprovider', \"There is no document formatter for '{0}'-files installed.\", language));\n };\n return FormatDocumentAction;\n}(AbstractFormatAction));\nexport { FormatDocumentAction };\nvar FormatSelectionAction = /** @class */ (function (_super) {\n __extends(FormatSelectionAction, _super);\n function FormatSelectionAction() {\n return _super.call(this, {\n id: 'editor.action.formatSelection',\n label: nls.localize('formatSelection.label', \"Format Selection\"),\n alias: 'Format Code',\n precondition: ContextKeyExpr.and(EditorContextKeys.writable, EditorContextKeys.hasNonEmptySelection),\n kbOpts: {\n kbExpr: EditorContextKeys.editorTextFocus,\n primary: KeyChord(2048 /* CtrlCmd */ | 41 /* KEY_K */, 2048 /* CtrlCmd */ | 36 /* KEY_F */),\n weight: 100 /* EditorContrib */\n },\n menuOpts: {\n when: ContextKeyExpr.and(EditorContextKeys.hasDocumentSelectionFormattingProvider, EditorContextKeys.hasNonEmptySelection),\n group: '1_modification',\n order: 1.31\n }\n }) || this;\n }\n FormatSelectionAction.prototype._getFormattingEdits = function (editor) {\n var model = editor.getModel();\n var _a = model.getOptions(), tabSize = _a.tabSize, insertSpaces = _a.insertSpaces;\n return getDocumentRangeFormattingEdits(model, editor.getSelection(), { tabSize: tabSize, insertSpaces: insertSpaces });\n };\n FormatSelectionAction.prototype._notifyNoProviderError = function (notificationService, language) {\n notificationService.info(nls.localize('no.selectionprovider', \"There is no selection formatter for '{0}'-files installed.\", language));\n };\n return FormatSelectionAction;\n}(AbstractFormatAction));\nexport { FormatSelectionAction };\nregisterEditorContribution(FormatOnType);\nregisterEditorContribution(FormatOnPaste);\nregisterEditorAction(FormatDocumentAction);\nregisterEditorAction(FormatSelectionAction);\n// this is the old format action that does both (format document OR format selection)\n// and we keep it here such that existing keybinding configurations etc will still work\nCommandsRegistry.registerCommand('editor.action.format', function (accessor) {\n var editor = accessor.get(ICodeEditorService).getFocusedCodeEditor();\n if (editor) {\n return new /** @class */ (function (_super) {\n __extends(class_1, _super);\n function class_1() {\n return _super.call(this, {}) || this;\n }\n class_1.prototype._getFormattingEdits = function (editor) {\n var model = editor.getModel();\n var editorSelection = editor.getSelection();\n var _a = model.getOptions(), tabSize = _a.tabSize, insertSpaces = _a.insertSpaces;\n return editorSelection.isEmpty()\n ? getDocumentFormattingEdits(model, { tabSize: tabSize, insertSpaces: insertSpaces })\n : getDocumentRangeFormattingEdits(model, editorSelection, { tabSize: tabSize, insertSpaces: insertSpaces });\n };\n return class_1;\n }(AbstractFormatAction))().run(accessor, editor);\n }\n return undefined;\n});\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { flatten, coalesce } from '../../../base/common/arrays';\nimport { asWinJsPromise } from '../../../base/common/async';\nimport { onUnexpectedExternalError } from '../../../base/common/errors';\nimport { TPromise } from '../../../base/common/winjs.base';\nimport { registerDefaultLanguageCommand } from '../../browser/editorExtensions';\nimport { DefinitionProviderRegistry, ImplementationProviderRegistry, TypeDefinitionProviderRegistry } from '../../common/modes';\nfunction getDefinitions(model, position, registry, provide) {\n var provider = registry.ordered(model);\n // get results\n var promises = provider.map(function (provider) {\n return asWinJsPromise(function (token) {\n return provide(provider, model, position, token);\n }).then(undefined, function (err) {\n onUnexpectedExternalError(err);\n return null;\n });\n });\n return TPromise.join(promises)\n .then(flatten)\n .then(function (references) { return coalesce(references); });\n}\nexport function getDefinitionsAtPosition(model, position) {\n return getDefinitions(model, position, DefinitionProviderRegistry, function (provider, model, position, token) {\n return provider.provideDefinition(model, position, token);\n });\n}\nexport function getImplementationsAtPosition(model, position) {\n return getDefinitions(model, position, ImplementationProviderRegistry, function (provider, model, position, token) {\n return provider.provideImplementation(model, position, token);\n });\n}\nexport function getTypeDefinitionsAtPosition(model, position) {\n return getDefinitions(model, position, TypeDefinitionProviderRegistry, function (provider, model, position, token) {\n return provider.provideTypeDefinition(model, position, token);\n });\n}\nregisterDefaultLanguageCommand('_executeDefinitionProvider', getDefinitionsAtPosition);\nregisterDefaultLanguageCommand('_executeImplementationProvider', getImplementationsAtPosition);\nregisterDefaultLanguageCommand('_executeTypeDefinitionProvider', getTypeDefinitionsAtPosition);\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport './countBadge.css';\nimport { $, append } from '../../dom';\nimport { format } from '../../../common/strings';\nimport { Color } from '../../../common/color';\nimport { mixin } from '../../../common/objects';\nvar defaultOpts = {\n badgeBackground: Color.fromHex('#4D4D4D'),\n badgeForeground: Color.fromHex('#FFFFFF')\n};\nvar CountBadge = /** @class */ (function () {\n function CountBadge(container, options) {\n this.options = options || Object.create(null);\n mixin(this.options, defaultOpts, false);\n this.badgeBackground = this.options.badgeBackground;\n this.badgeForeground = this.options.badgeForeground;\n this.badgeBorder = this.options.badgeBorder;\n this.element = append(container, $('.monaco-count-badge'));\n this.countFormat = this.options.countFormat || '{0}';\n this.titleFormat = this.options.titleFormat || '';\n this.setCount(this.options.count || 0);\n }\n CountBadge.prototype.setCount = function (count) {\n this.count = count;\n this.render();\n };\n CountBadge.prototype.setTitleFormat = function (titleFormat) {\n this.titleFormat = titleFormat;\n this.render();\n };\n CountBadge.prototype.render = function () {\n this.element.textContent = format(this.countFormat, this.count);\n this.element.title = format(this.titleFormat, this.count);\n this.applyStyles();\n };\n CountBadge.prototype.style = function (styles) {\n this.badgeBackground = styles.badgeBackground;\n this.badgeForeground = styles.badgeForeground;\n this.badgeBorder = styles.badgeBorder;\n this.applyStyles();\n };\n CountBadge.prototype.applyStyles = function () {\n if (this.element) {\n var background = this.badgeBackground ? this.badgeBackground.toString() : null;\n var foreground = this.badgeForeground ? this.badgeForeground.toString() : null;\n var border = this.badgeBorder ? this.badgeBorder.toString() : null;\n this.element.style.backgroundColor = background;\n this.element.style.color = foreground;\n this.element.style.borderWidth = border ? '1px' : null;\n this.element.style.borderStyle = border ? 'solid' : null;\n this.element.style.borderColor = border;\n }\n };\n return CountBadge;\n}());\nexport { CountBadge };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { escape } from '../../../common/strings';\nexport function renderOcticons(text) {\n return escape(text);\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport * as dom from '../../dom';\nimport * as objects from '../../../common/objects';\nimport { renderOcticons } from '../octiconLabel/octiconLabel';\nvar HighlightedLabel = /** @class */ (function () {\n function HighlightedLabel(container) {\n this.domNode = document.createElement('span');\n this.domNode.className = 'monaco-highlighted-label';\n this.didEverRender = false;\n container.appendChild(this.domNode);\n }\n Object.defineProperty(HighlightedLabel.prototype, \"element\", {\n get: function () {\n return this.domNode;\n },\n enumerable: true,\n configurable: true\n });\n HighlightedLabel.prototype.set = function (text, highlights, title, escapeNewLines) {\n if (highlights === void 0) { highlights = []; }\n if (title === void 0) { title = ''; }\n if (!text) {\n text = '';\n }\n if (escapeNewLines) {\n // adjusts highlights inplace\n text = HighlightedLabel.escapeNewLines(text, highlights);\n }\n if (this.didEverRender && this.text === text && this.title === title && objects.equals(this.highlights, highlights)) {\n return;\n }\n if (!Array.isArray(highlights)) {\n highlights = [];\n }\n this.text = text;\n this.title = title;\n this.highlights = highlights;\n this.render();\n };\n HighlightedLabel.prototype.render = function () {\n dom.clearNode(this.domNode);\n var htmlContent = [], highlight, pos = 0;\n for (var i = 0; i < this.highlights.length; i++) {\n highlight = this.highlights[i];\n if (highlight.end === highlight.start) {\n continue;\n }\n if (pos < highlight.start) {\n htmlContent.push('');\n htmlContent.push(renderOcticons(this.text.substring(pos, highlight.start)));\n htmlContent.push('');\n pos = highlight.end;\n }\n htmlContent.push('');\n htmlContent.push(renderOcticons(this.text.substring(highlight.start, highlight.end)));\n htmlContent.push('');\n pos = highlight.end;\n }\n if (pos < this.text.length) {\n htmlContent.push('');\n htmlContent.push(renderOcticons(this.text.substring(pos)));\n htmlContent.push('');\n }\n this.domNode.innerHTML = htmlContent.join('');\n this.domNode.title = this.title;\n this.didEverRender = true;\n };\n HighlightedLabel.prototype.dispose = function () {\n this.text = null;\n this.highlights = null;\n };\n HighlightedLabel.escapeNewLines = function (text, highlights) {\n var total = 0;\n var extra = 0;\n return text.replace(/\\r\\n|\\r|\\n/, function (match, offset) {\n extra = match === '\\r\\n' ? -1 : 0;\n offset += total;\n for (var _i = 0, highlights_1 = highlights; _i < highlights_1.length; _i++) {\n var highlight = highlights_1[_i];\n if (highlight.end <= offset) {\n continue;\n }\n if (highlight.start >= offset) {\n highlight.start += extra;\n }\n if (highlight.end >= offset) {\n highlight.end += extra;\n }\n }\n total += extra;\n return '\\u23CE';\n });\n };\n return HighlightedLabel;\n}());\nexport { HighlightedLabel };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport URI from './uri';\nimport { normalize, basename as pathsBasename, sep } from './paths';\nimport { ltrim, startsWithIgnoreCase, rtrim, startsWith } from './strings';\nimport { Schemas } from './network';\nimport { isLinux, isWindows } from './platform';\nimport { isEqual } from './resources';\n/**\n * @deprecated use UriLabelService instead\n */\nexport function getPathLabel(resource, userHomeProvider, rootProvider) {\n if (!resource) {\n return null;\n }\n if (typeof resource === 'string') {\n resource = URI.file(resource);\n }\n // return early if we can resolve a relative path label from the root\n var baseResource = rootProvider ? rootProvider.getWorkspaceFolder(resource) : null;\n if (baseResource) {\n var hasMultipleRoots = rootProvider.getWorkspace().folders.length > 1;\n var pathLabel = void 0;\n if (isEqual(baseResource.uri, resource, !isLinux)) {\n pathLabel = ''; // no label if paths are identical\n }\n else {\n pathLabel = normalize(ltrim(resource.path.substr(baseResource.uri.path.length), sep), true);\n }\n if (hasMultipleRoots) {\n var rootName = (baseResource && baseResource.name) ? baseResource.name : pathsBasename(baseResource.uri.fsPath);\n pathLabel = pathLabel ? (rootName + ' • ' + pathLabel) : rootName; // always show root basename if there are multiple\n }\n return pathLabel;\n }\n // return if the resource is neither file:// nor untitled:// and no baseResource was provided\n if (resource.scheme !== Schemas.file && resource.scheme !== Schemas.untitled) {\n return resource.with({ query: null, fragment: null }).toString(true);\n }\n // convert c:\\something => C:\\something\n if (hasDriveLetter(resource.fsPath)) {\n return normalize(normalizeDriveLetter(resource.fsPath), true);\n }\n // normalize and tildify (macOS, Linux only)\n var res = normalize(resource.fsPath, true);\n if (!isWindows && userHomeProvider) {\n res = tildify(res, userHomeProvider.userHome);\n }\n return res;\n}\nexport function getBaseLabel(resource) {\n if (!resource) {\n return null;\n }\n if (typeof resource === 'string') {\n resource = URI.file(resource);\n }\n var base = pathsBasename(resource.path) || (resource.scheme === Schemas.file ? resource.fsPath : resource.path) /* can be empty string if '/' is passed in */;\n // convert c: => C:\n if (hasDriveLetter(base)) {\n return normalizeDriveLetter(base);\n }\n return base;\n}\nfunction hasDriveLetter(path) {\n return isWindows && path && path[1] === ':';\n}\nexport function normalizeDriveLetter(path) {\n if (hasDriveLetter(path)) {\n return path.charAt(0).toUpperCase() + path.slice(1);\n }\n return path;\n}\nvar normalizedUserHomeCached = Object.create(null);\nexport function tildify(path, userHome) {\n if (isWindows || !path || !userHome) {\n return path; // unsupported\n }\n // Keep a normalized user home path as cache to prevent accumulated string creation\n var normalizedUserHome = normalizedUserHomeCached.original === userHome ? normalizedUserHomeCached.normalized : void 0;\n if (!normalizedUserHome) {\n normalizedUserHome = \"\" + rtrim(userHome, sep) + sep;\n normalizedUserHomeCached = { original: userHome, normalized: normalizedUserHome };\n }\n // Linux: case sensitive, macOS: case insensitive\n if (isLinux ? startsWith(path, normalizedUserHome) : startsWithIgnoreCase(path, normalizedUserHome)) {\n path = \"~/\" + path.substr(normalizedUserHome.length);\n }\n return path;\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport * as paths from './paths';\nimport { equalsIgnoreCase } from './strings';\nexport function basenameOrAuthority(resource) {\n return paths.basename(resource.path) || resource.authority;\n}\nexport function isEqual(first, second, ignoreCase) {\n var identityEquals = (first === second);\n if (identityEquals) {\n return true;\n }\n if (!first || !second) {\n return false;\n }\n if (ignoreCase) {\n return equalsIgnoreCase(first.toString(), second.toString());\n }\n return first.toString() === second.toString();\n}\nexport function dirname(resource) {\n var dirname = paths.dirname(resource.path);\n if (resource.authority && dirname && !paths.isAbsolute(dirname)) {\n return null; // If a URI contains an authority component, then the path component must either be empty or begin with a slash (\"/\") character\n }\n return resource.with({\n path: dirname\n });\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport URI from '../../../base/common/uri';\nimport * as paths from '../../../base/common/paths';\nimport { createDecorator } from '../../instantiation/common/instantiation';\nimport { TernarySearchTree } from '../../../base/common/map';\nexport var IWorkspaceContextService = createDecorator('contextService');\nexport var IWorkspace;\n(function (IWorkspace) {\n function isIWorkspace(thing) {\n return thing && typeof thing === 'object'\n && typeof thing.id === 'string'\n && typeof thing.name === 'string'\n && Array.isArray(thing.folders);\n }\n IWorkspace.isIWorkspace = isIWorkspace;\n})(IWorkspace || (IWorkspace = {}));\nexport var IWorkspaceFolder;\n(function (IWorkspaceFolder) {\n function isIWorkspaceFolder(thing) {\n return thing && typeof thing === 'object'\n && URI.isUri(thing.uri)\n && typeof thing.name === 'string'\n && typeof thing.toResource === 'function';\n }\n IWorkspaceFolder.isIWorkspaceFolder = isIWorkspaceFolder;\n})(IWorkspaceFolder || (IWorkspaceFolder = {}));\nvar Workspace = /** @class */ (function () {\n function Workspace(_id, _name, folders, _configuration, _ctime) {\n if (_name === void 0) { _name = ''; }\n if (folders === void 0) { folders = []; }\n if (_configuration === void 0) { _configuration = null; }\n this._id = _id;\n this._name = _name;\n this._configuration = _configuration;\n this._ctime = _ctime;\n this._foldersMap = TernarySearchTree.forPaths();\n this.folders = folders;\n }\n Object.defineProperty(Workspace.prototype, \"folders\", {\n get: function () {\n return this._folders;\n },\n set: function (folders) {\n this._folders = folders;\n this.updateFoldersMap();\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Workspace.prototype, \"id\", {\n get: function () {\n return this._id;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Workspace.prototype, \"name\", {\n get: function () {\n return this._name;\n },\n set: function (name) {\n this._name = name;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Workspace.prototype, \"configuration\", {\n get: function () {\n return this._configuration;\n },\n set: function (configuration) {\n this._configuration = configuration;\n },\n enumerable: true,\n configurable: true\n });\n Workspace.prototype.getFolder = function (resource) {\n if (!resource) {\n return null;\n }\n return this._foldersMap.findSubstr(resource.toString());\n };\n Workspace.prototype.updateFoldersMap = function () {\n this._foldersMap = TernarySearchTree.forPaths();\n for (var _i = 0, _a = this.folders; _i < _a.length; _i++) {\n var folder = _a[_i];\n this._foldersMap.set(folder.uri.toString(), folder);\n }\n };\n Workspace.prototype.toJSON = function () {\n return { id: this.id, folders: this.folders, name: this.name, configuration: this.configuration };\n };\n return Workspace;\n}());\nexport { Workspace };\nvar WorkspaceFolder = /** @class */ (function () {\n function WorkspaceFolder(data, raw) {\n this.raw = raw;\n this.uri = data.uri;\n this.index = data.index;\n this.name = data.name;\n }\n WorkspaceFolder.prototype.toResource = function (relativePath) {\n return this.uri.with({ path: paths.join(this.uri.path, relativePath) });\n };\n WorkspaceFolder.prototype.toJSON = function () {\n return { uri: this.uri, name: this.name, index: this.index };\n };\n return WorkspaceFolder;\n}());\nexport { WorkspaceFolder };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport './iconlabel.css';\nimport * as dom from '../../dom';\nimport { HighlightedLabel } from '../highlightedlabel/highlightedLabel';\nimport * as paths from '../../../common/paths';\nimport { getPathLabel, getBaseLabel } from '../../../common/labels';\nimport { Disposable } from '../../../common/lifecycle';\nvar FastLabelNode = /** @class */ (function () {\n function FastLabelNode(_element) {\n this._element = _element;\n }\n Object.defineProperty(FastLabelNode.prototype, \"element\", {\n get: function () {\n return this._element;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(FastLabelNode.prototype, \"textContent\", {\n set: function (content) {\n if (this.disposed || content === this._textContent) {\n return;\n }\n this._textContent = content;\n this._element.textContent = content;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(FastLabelNode.prototype, \"className\", {\n set: function (className) {\n if (this.disposed || className === this._className) {\n return;\n }\n this._className = className;\n this._element.className = className;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(FastLabelNode.prototype, \"title\", {\n set: function (title) {\n if (this.disposed || title === this._title) {\n return;\n }\n this._title = title;\n if (this._title) {\n this._element.title = title;\n }\n else {\n this._element.removeAttribute('title');\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(FastLabelNode.prototype, \"empty\", {\n set: function (empty) {\n if (this.disposed || empty === this._empty) {\n return;\n }\n this._empty = empty;\n this._element.style.marginLeft = empty ? '0' : null;\n },\n enumerable: true,\n configurable: true\n });\n FastLabelNode.prototype.dispose = function () {\n this.disposed = true;\n };\n return FastLabelNode;\n}());\nvar IconLabel = /** @class */ (function (_super) {\n __extends(IconLabel, _super);\n function IconLabel(container, options) {\n var _this = _super.call(this) || this;\n _this.domNode = _this._register(new FastLabelNode(dom.append(container, dom.$('.monaco-icon-label'))));\n _this.labelDescriptionContainer = _this._register(new FastLabelNode(dom.append(_this.domNode.element, dom.$('.monaco-icon-label-description-container'))));\n if (options && options.supportHighlights) {\n _this.labelNode = _this._register(new HighlightedLabel(dom.append(_this.labelDescriptionContainer.element, dom.$('a.label-name'))));\n }\n else {\n _this.labelNode = _this._register(new FastLabelNode(dom.append(_this.labelDescriptionContainer.element, dom.$('a.label-name'))));\n }\n if (options && options.supportDescriptionHighlights) {\n _this.descriptionNodeFactory = function () { return _this._register(new HighlightedLabel(dom.append(_this.labelDescriptionContainer.element, dom.$('span.label-description')))); };\n }\n else {\n _this.descriptionNodeFactory = function () { return _this._register(new FastLabelNode(dom.append(_this.labelDescriptionContainer.element, dom.$('span.label-description')))); };\n }\n return _this;\n }\n IconLabel.prototype.setValue = function (label, description, options) {\n var classes = ['monaco-icon-label'];\n if (options) {\n if (options.extraClasses) {\n classes.push.apply(classes, options.extraClasses);\n }\n if (options.italic) {\n classes.push('italic');\n }\n }\n this.domNode.className = classes.join(' ');\n this.domNode.title = options && options.title ? options.title : '';\n if (this.labelNode instanceof HighlightedLabel) {\n this.labelNode.set(label || '', options ? options.matches : void 0);\n }\n else {\n this.labelNode.textContent = label || '';\n }\n if (description || this.descriptionNode) {\n if (!this.descriptionNode) {\n this.descriptionNode = this.descriptionNodeFactory(); // description node is created lazily on demand\n }\n if (this.descriptionNode instanceof HighlightedLabel) {\n this.descriptionNode.set(description || '', options ? options.descriptionMatches : void 0);\n if (options && options.descriptionTitle) {\n this.descriptionNode.element.title = options.descriptionTitle;\n }\n else {\n this.descriptionNode.element.removeAttribute('title');\n }\n }\n else {\n this.descriptionNode.textContent = description || '';\n this.descriptionNode.title = options && options.descriptionTitle ? options.descriptionTitle : '';\n this.descriptionNode.empty = !description;\n }\n }\n };\n return IconLabel;\n}(Disposable));\nexport { IconLabel };\nvar FileLabel = /** @class */ (function (_super) {\n __extends(FileLabel, _super);\n function FileLabel(container, file, provider, userHome) {\n var _this = _super.call(this, container) || this;\n _this.setFile(file, provider, userHome);\n return _this;\n }\n FileLabel.prototype.setFile = function (file, provider, userHome) {\n var parent = paths.dirname(file.fsPath);\n this.setValue(getBaseLabel(file), parent && parent !== '.' ? getPathLabel(parent, userHome, provider) : '', { title: file.fsPath });\n };\n return FileLabel;\n}(IconLabel));\nexport { FileLabel };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport './media/peekViewWidget.css';\nimport * as nls from '../../../nls';\nimport { Action } from '../../../base/common/actions';\nimport * as strings from '../../../base/common/strings';\nimport * as objects from '../../../base/common/objects';\nimport { $ } from '../../../base/browser/builder';\nimport { Emitter } from '../../../base/common/event';\nimport * as dom from '../../../base/browser/dom';\nimport { ActionBar } from '../../../base/browser/ui/actionbar/actionbar';\nimport { ICodeEditorService } from '../../browser/services/codeEditorService';\nimport { ZoneWidget } from '../zoneWidget/zoneWidget';\nimport { EmbeddedCodeEditorWidget } from '../../browser/widget/embeddedCodeEditorWidget';\nimport { RawContextKey } from '../../../platform/contextkey/common/contextkey';\nimport { Color } from '../../../base/common/color';\nexport var PeekContext;\n(function (PeekContext) {\n PeekContext.inPeekEditor = new RawContextKey('inReferenceSearchEditor', true);\n PeekContext.notInPeekEditor = PeekContext.inPeekEditor.toNegated();\n})(PeekContext || (PeekContext = {}));\nexport function getOuterEditor(accessor) {\n var editor = accessor.get(ICodeEditorService).getFocusedCodeEditor();\n if (editor instanceof EmbeddedCodeEditorWidget) {\n return editor.getParentEditor();\n }\n return editor;\n}\nvar defaultOptions = {\n headerBackgroundColor: Color.white,\n primaryHeadingColor: Color.fromHex('#333333'),\n secondaryHeadingColor: Color.fromHex('#6c6c6cb3')\n};\nvar PeekViewWidget = /** @class */ (function (_super) {\n __extends(PeekViewWidget, _super);\n function PeekViewWidget(editor, options) {\n if (options === void 0) { options = {}; }\n var _this = _super.call(this, editor, options) || this;\n _this._onDidClose = new Emitter();\n objects.mixin(_this.options, defaultOptions, false);\n return _this;\n }\n PeekViewWidget.prototype.dispose = function () {\n _super.prototype.dispose.call(this);\n this._onDidClose.fire(this);\n };\n Object.defineProperty(PeekViewWidget.prototype, \"onDidClose\", {\n get: function () {\n return this._onDidClose.event;\n },\n enumerable: true,\n configurable: true\n });\n PeekViewWidget.prototype.style = function (styles) {\n var options = this.options;\n if (styles.headerBackgroundColor) {\n options.headerBackgroundColor = styles.headerBackgroundColor;\n }\n if (styles.primaryHeadingColor) {\n options.primaryHeadingColor = styles.primaryHeadingColor;\n }\n if (styles.secondaryHeadingColor) {\n options.secondaryHeadingColor = styles.secondaryHeadingColor;\n }\n _super.prototype.style.call(this, styles);\n };\n PeekViewWidget.prototype._applyStyles = function () {\n _super.prototype._applyStyles.call(this);\n var options = this.options;\n if (this._headElement) {\n this._headElement.style.backgroundColor = options.headerBackgroundColor.toString();\n }\n if (this._primaryHeading) {\n this._primaryHeading.style.color = options.primaryHeadingColor.toString();\n }\n if (this._secondaryHeading) {\n this._secondaryHeading.style.color = options.secondaryHeadingColor.toString();\n }\n if (this._bodyElement) {\n this._bodyElement.style.borderColor = options.frameColor.toString();\n }\n };\n PeekViewWidget.prototype._fillContainer = function (container) {\n this.setCssClass('peekview-widget');\n this._headElement = $('.head').getHTMLElement();\n this._bodyElement = $('.body').getHTMLElement();\n this._fillHead(this._headElement);\n this._fillBody(this._bodyElement);\n container.appendChild(this._headElement);\n container.appendChild(this._bodyElement);\n };\n PeekViewWidget.prototype._fillHead = function (container) {\n var _this = this;\n var titleElement = $('.peekview-title').\n on(dom.EventType.CLICK, function (e) { return _this._onTitleClick(e); }).\n appendTo(this._headElement).\n getHTMLElement();\n this._primaryHeading = $('span.filename').appendTo(titleElement).getHTMLElement();\n this._secondaryHeading = $('span.dirname').appendTo(titleElement).getHTMLElement();\n this._metaHeading = $('span.meta').appendTo(titleElement).getHTMLElement();\n var actionsContainer = $('.peekview-actions').appendTo(this._headElement);\n var actionBarOptions = this._getActionBarOptions();\n this._actionbarWidget = new ActionBar(actionsContainer.getHTMLElement(), actionBarOptions);\n this._disposables.push(this._actionbarWidget);\n this._actionbarWidget.push(new Action('peekview.close', nls.localize('label.close', \"Close\"), 'close-peekview-action', true, function () {\n _this.dispose();\n return null;\n }), { label: false, icon: true });\n };\n PeekViewWidget.prototype._getActionBarOptions = function () {\n return {};\n };\n PeekViewWidget.prototype._onTitleClick = function (event) {\n // implement me\n };\n PeekViewWidget.prototype.setTitle = function (primaryHeading, secondaryHeading) {\n $(this._primaryHeading).safeInnerHtml(primaryHeading);\n this._primaryHeading.setAttribute('aria-label', primaryHeading);\n if (secondaryHeading) {\n $(this._secondaryHeading).safeInnerHtml(secondaryHeading);\n }\n else {\n dom.clearNode(this._secondaryHeading);\n }\n };\n PeekViewWidget.prototype.setMetaTitle = function (value) {\n if (value) {\n $(this._metaHeading).safeInnerHtml(value);\n }\n else {\n dom.clearNode(this._metaHeading);\n }\n };\n PeekViewWidget.prototype._doLayout = function (heightInPixel, widthInPixel) {\n if (!this._isShowing && heightInPixel < 0) {\n // Looks like the view zone got folded away!\n this.dispose();\n return;\n }\n var headHeight = Math.ceil(this.editor.getConfiguration().lineHeight * 1.2);\n var bodyHeight = heightInPixel - (headHeight + 2 /* the border-top/bottom width*/);\n this._doLayoutHead(headHeight, widthInPixel);\n this._doLayoutBody(bodyHeight, widthInPixel);\n };\n PeekViewWidget.prototype._doLayoutHead = function (heightInPixel, widthInPixel) {\n this._headElement.style.height = strings.format('{0}px', heightInPixel);\n this._headElement.style.lineHeight = this._headElement.style.height;\n };\n PeekViewWidget.prototype._doLayoutBody = function (heightInPixel, widthInPixel) {\n this._bodyElement.style.height = strings.format('{0}px', heightInPixel);\n };\n return PeekViewWidget;\n}(ZoneWidget));\nexport { PeekViewWidget };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __param = (this && this.__param) || function (paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n};\nimport * as objects from '../../../base/common/objects';\nimport { IInstantiationService } from '../../../platform/instantiation/common/instantiation';\nimport { ICommandService } from '../../../platform/commands/common/commands';\nimport { IContextKeyService } from '../../../platform/contextkey/common/contextkey';\nimport { ICodeEditorService } from '../services/codeEditorService';\nimport { CodeEditorWidget } from './codeEditorWidget';\nimport { IThemeService } from '../../../platform/theme/common/themeService';\nimport { INotificationService } from '../../../platform/notification/common/notification';\nvar EmbeddedCodeEditorWidget = /** @class */ (function (_super) {\n __extends(EmbeddedCodeEditorWidget, _super);\n function EmbeddedCodeEditorWidget(domElement, options, parentEditor, instantiationService, codeEditorService, commandService, contextKeyService, themeService, notificationService) {\n var _this = _super.call(this, domElement, parentEditor.getRawConfiguration(), {}, instantiationService, codeEditorService, commandService, contextKeyService, themeService, notificationService) || this;\n _this._parentEditor = parentEditor;\n _this._overwriteOptions = options;\n // Overwrite parent's options\n _super.prototype.updateOptions.call(_this, _this._overwriteOptions);\n _this._register(parentEditor.onDidChangeConfiguration(function (e) { return _this._onParentConfigurationChanged(e); }));\n return _this;\n }\n EmbeddedCodeEditorWidget.prototype.getParentEditor = function () {\n return this._parentEditor;\n };\n EmbeddedCodeEditorWidget.prototype._onParentConfigurationChanged = function (e) {\n _super.prototype.updateOptions.call(this, this._parentEditor.getRawConfiguration());\n _super.prototype.updateOptions.call(this, this._overwriteOptions);\n };\n EmbeddedCodeEditorWidget.prototype.updateOptions = function (newOptions) {\n objects.mixin(this._overwriteOptions, newOptions, true);\n _super.prototype.updateOptions.call(this, this._overwriteOptions);\n };\n EmbeddedCodeEditorWidget = __decorate([\n __param(3, IInstantiationService),\n __param(4, ICodeEditorService),\n __param(5, ICommandService),\n __param(6, IContextKeyService),\n __param(7, IThemeService),\n __param(8, INotificationService)\n ], EmbeddedCodeEditorWidget);\n return EmbeddedCodeEditorWidget;\n}(CodeEditorWidget));\nexport { EmbeddedCodeEditorWidget };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport './zoneWidget.css';\nimport { dispose } from '../../../base/common/lifecycle';\nimport * as objects from '../../../base/common/objects';\nimport * as dom from '../../../base/browser/dom';\nimport { Sash, Orientation, SashState } from '../../../base/browser/ui/sash/sash';\nimport { Range } from '../../common/core/range';\nimport { Color, RGBA } from '../../../base/common/color';\nimport { ModelDecorationOptions } from '../../common/model/textModel';\nimport { IdGenerator } from '../../../base/common/idGenerator';\nimport { TrackedRangeStickiness } from '../../common/model';\nvar defaultColor = new Color(new RGBA(0, 122, 204));\nvar defaultOptions = {\n showArrow: true,\n showFrame: true,\n className: '',\n frameColor: defaultColor,\n arrowColor: defaultColor,\n keepEditorSelection: false\n};\nvar WIDGET_ID = 'vs.editor.contrib.zoneWidget';\nvar ViewZoneDelegate = /** @class */ (function () {\n function ViewZoneDelegate(domNode, afterLineNumber, afterColumn, heightInLines, onDomNodeTop, onComputedHeight) {\n this.domNode = domNode;\n this.afterLineNumber = afterLineNumber;\n this.afterColumn = afterColumn;\n this.heightInLines = heightInLines;\n this._onDomNodeTop = onDomNodeTop;\n this._onComputedHeight = onComputedHeight;\n }\n ViewZoneDelegate.prototype.onDomNodeTop = function (top) {\n this._onDomNodeTop(top);\n };\n ViewZoneDelegate.prototype.onComputedHeight = function (height) {\n this._onComputedHeight(height);\n };\n return ViewZoneDelegate;\n}());\nexport { ViewZoneDelegate };\nvar OverlayWidgetDelegate = /** @class */ (function () {\n function OverlayWidgetDelegate(id, domNode) {\n this._id = id;\n this._domNode = domNode;\n }\n OverlayWidgetDelegate.prototype.getId = function () {\n return this._id;\n };\n OverlayWidgetDelegate.prototype.getDomNode = function () {\n return this._domNode;\n };\n OverlayWidgetDelegate.prototype.getPosition = function () {\n return null;\n };\n return OverlayWidgetDelegate;\n}());\nexport { OverlayWidgetDelegate };\nvar Arrow = /** @class */ (function () {\n function Arrow(_editor) {\n this._editor = _editor;\n this._ruleName = Arrow._IdGenerator.nextId();\n this._decorations = [];\n //\n }\n Arrow.prototype.dispose = function () {\n this.hide();\n dom.removeCSSRulesContainingSelector(this._ruleName);\n };\n Object.defineProperty(Arrow.prototype, \"color\", {\n set: function (value) {\n if (this._color !== value) {\n this._color = value;\n this._updateStyle();\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Arrow.prototype, \"height\", {\n set: function (value) {\n if (this._height !== value) {\n this._height = value;\n this._updateStyle();\n }\n },\n enumerable: true,\n configurable: true\n });\n Arrow.prototype._updateStyle = function () {\n dom.removeCSSRulesContainingSelector(this._ruleName);\n dom.createCSSRule(\".monaco-editor \" + this._ruleName, \"border-style: solid; border-color: transparent; border-bottom-color: \" + this._color + \"; border-width: \" + this._height + \"px; bottom: -\" + this._height + \"px; margin-left: -\" + this._height + \"px; \");\n };\n Arrow.prototype.show = function (where) {\n this._decorations = this._editor.deltaDecorations(this._decorations, [{ range: Range.fromPositions(where), options: { className: this._ruleName, stickiness: TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges } }]);\n };\n Arrow.prototype.hide = function () {\n this._editor.deltaDecorations(this._decorations, []);\n };\n Arrow._IdGenerator = new IdGenerator('.arrow-decoration-');\n return Arrow;\n}());\nvar ZoneWidget = /** @class */ (function () {\n function ZoneWidget(editor, options) {\n if (options === void 0) { options = {}; }\n var _this = this;\n this._positionMarkerId = [];\n this._disposables = [];\n this._isShowing = false;\n this.editor = editor;\n this.options = objects.deepClone(options);\n objects.mixin(this.options, defaultOptions, false);\n this.domNode = document.createElement('div');\n if (!this.options.isAccessible) {\n this.domNode.setAttribute('aria-hidden', 'true');\n this.domNode.setAttribute('role', 'presentation');\n }\n this._disposables.push(this.editor.onDidLayoutChange(function (info) {\n var width = _this._getWidth(info);\n _this.domNode.style.width = width + 'px';\n _this.domNode.style.left = _this._getLeft(info) + 'px';\n _this._onWidth(width);\n }));\n }\n ZoneWidget.prototype.dispose = function () {\n var _this = this;\n dispose(this._disposables);\n if (this._overlayWidget) {\n this.editor.removeOverlayWidget(this._overlayWidget);\n this._overlayWidget = null;\n }\n if (this._viewZone) {\n this.editor.changeViewZones(function (accessor) {\n accessor.removeZone(_this._viewZone.id);\n _this._viewZone = null;\n });\n }\n this.editor.deltaDecorations(this._positionMarkerId, []);\n this._positionMarkerId = [];\n };\n ZoneWidget.prototype.create = function () {\n dom.addClass(this.domNode, 'zone-widget');\n dom.addClass(this.domNode, this.options.className);\n this.container = document.createElement('div');\n dom.addClass(this.container, 'zone-widget-container');\n this.domNode.appendChild(this.container);\n if (this.options.showArrow) {\n this._arrow = new Arrow(this.editor);\n this._disposables.push(this._arrow);\n }\n this._fillContainer(this.container);\n this._initSash();\n this._applyStyles();\n };\n ZoneWidget.prototype.style = function (styles) {\n if (styles.frameColor) {\n this.options.frameColor = styles.frameColor;\n }\n if (styles.arrowColor) {\n this.options.arrowColor = styles.arrowColor;\n }\n this._applyStyles();\n };\n ZoneWidget.prototype._applyStyles = function () {\n if (this.container) {\n var frameColor = this.options.frameColor.toString();\n this.container.style.borderTopColor = frameColor;\n this.container.style.borderBottomColor = frameColor;\n }\n if (this._arrow) {\n var arrowColor = this.options.arrowColor.toString();\n this._arrow.color = arrowColor;\n }\n };\n ZoneWidget.prototype._getWidth = function (info) {\n return info.width - info.minimapWidth - info.verticalScrollbarWidth;\n };\n ZoneWidget.prototype._getLeft = function (info) {\n // If minimap is to the left, we move beyond it\n if (info.minimapWidth > 0 && info.minimapLeft === 0) {\n return info.minimapWidth;\n }\n return 0;\n };\n ZoneWidget.prototype._onViewZoneTop = function (top) {\n this.domNode.style.top = top + 'px';\n };\n ZoneWidget.prototype._onViewZoneHeight = function (height) {\n this.domNode.style.height = height + \"px\";\n var containerHeight = height - this._decoratingElementsHeight();\n this.container.style.height = containerHeight + \"px\";\n var layoutInfo = this.editor.getLayoutInfo();\n this._doLayout(containerHeight, this._getWidth(layoutInfo));\n this._resizeSash.layout();\n };\n Object.defineProperty(ZoneWidget.prototype, \"position\", {\n get: function () {\n var id = this._positionMarkerId[0];\n if (!id) {\n return undefined;\n }\n var range = this.editor.getModel().getDecorationRange(id);\n if (!range) {\n return undefined;\n }\n return range.getStartPosition();\n },\n enumerable: true,\n configurable: true\n });\n ZoneWidget.prototype.show = function (rangeOrPos, heightInLines) {\n var range = Range.isIRange(rangeOrPos)\n ? rangeOrPos\n : new Range(rangeOrPos.lineNumber, rangeOrPos.column, rangeOrPos.lineNumber, rangeOrPos.column);\n this._isShowing = true;\n this._showImpl(range, heightInLines);\n this._isShowing = false;\n this._positionMarkerId = this.editor.deltaDecorations(this._positionMarkerId, [{ range: range, options: ModelDecorationOptions.EMPTY }]);\n };\n ZoneWidget.prototype.hide = function () {\n var _this = this;\n if (this._viewZone) {\n this.editor.changeViewZones(function (accessor) {\n accessor.removeZone(_this._viewZone.id);\n });\n this._viewZone = null;\n }\n if (this._overlayWidget) {\n this.editor.removeOverlayWidget(this._overlayWidget);\n this._overlayWidget = null;\n }\n if (this._arrow) {\n this._arrow.hide();\n }\n };\n ZoneWidget.prototype._decoratingElementsHeight = function () {\n var lineHeight = this.editor.getConfiguration().lineHeight;\n var result = 0;\n if (this.options.showArrow) {\n var arrowHeight = Math.round(lineHeight / 3);\n result += 2 * arrowHeight;\n }\n if (this.options.showFrame) {\n var frameThickness = Math.round(lineHeight / 9);\n result += 2 * frameThickness;\n }\n return result;\n };\n ZoneWidget.prototype._showImpl = function (where, heightInLines) {\n var _this = this;\n var position = {\n lineNumber: where.startLineNumber,\n column: where.startColumn\n };\n var layoutInfo = this.editor.getLayoutInfo();\n var width = this._getWidth(layoutInfo);\n this.domNode.style.width = width + \"px\";\n this.domNode.style.left = this._getLeft(layoutInfo) + 'px';\n // Render the widget as zone (rendering) and widget (lifecycle)\n var viewZoneDomNode = document.createElement('div');\n viewZoneDomNode.style.overflow = 'hidden';\n var lineHeight = this.editor.getConfiguration().lineHeight;\n // adjust heightInLines to viewport\n var maxHeightInLines = (this.editor.getLayoutInfo().height / lineHeight) * .8;\n if (heightInLines >= maxHeightInLines) {\n heightInLines = maxHeightInLines;\n }\n var arrowHeight = 0;\n var frameThickness = 0;\n // Render the arrow one 1/3 of an editor line height\n if (this.options.showArrow) {\n arrowHeight = Math.round(lineHeight / 3);\n this._arrow.height = arrowHeight;\n this._arrow.show(position);\n }\n // Render the frame as 1/9 of an editor line height\n if (this.options.showFrame) {\n frameThickness = Math.round(lineHeight / 9);\n }\n // insert zone widget\n this.editor.changeViewZones(function (accessor) {\n if (_this._viewZone) {\n accessor.removeZone(_this._viewZone.id);\n }\n if (_this._overlayWidget) {\n _this.editor.removeOverlayWidget(_this._overlayWidget);\n _this._overlayWidget = null;\n }\n _this.domNode.style.top = '-1000px';\n _this._viewZone = new ViewZoneDelegate(viewZoneDomNode, position.lineNumber, position.column, heightInLines, function (top) { return _this._onViewZoneTop(top); }, function (height) { return _this._onViewZoneHeight(height); });\n _this._viewZone.id = accessor.addZone(_this._viewZone);\n _this._overlayWidget = new OverlayWidgetDelegate(WIDGET_ID + _this._viewZone.id, _this.domNode);\n _this.editor.addOverlayWidget(_this._overlayWidget);\n });\n if (this.options.showFrame) {\n var width_1 = this.options.frameWidth ? this.options.frameWidth : frameThickness;\n this.container.style.borderTopWidth = width_1 + 'px';\n this.container.style.borderBottomWidth = width_1 + 'px';\n }\n var containerHeight = heightInLines * lineHeight - this._decoratingElementsHeight();\n this.container.style.top = arrowHeight + 'px';\n this.container.style.height = containerHeight + 'px';\n this.container.style.overflow = 'hidden';\n this._doLayout(containerHeight, width);\n if (!this.options.keepEditorSelection) {\n this.editor.setSelection(where);\n }\n // Reveal the line above or below the zone widget, to get the zone widget in the viewport\n var revealLineNumber = Math.min(this.editor.getModel().getLineCount(), Math.max(1, where.endLineNumber + 1));\n this.revealLine(revealLineNumber);\n };\n ZoneWidget.prototype.revealLine = function (lineNumber) {\n this.editor.revealLine(lineNumber, 0 /* Smooth */);\n };\n ZoneWidget.prototype.setCssClass = function (className, classToReplace) {\n if (classToReplace) {\n this.container.classList.remove(classToReplace);\n }\n dom.addClass(this.container, className);\n };\n ZoneWidget.prototype._onWidth = function (widthInPixel) {\n // implement in subclass\n };\n ZoneWidget.prototype._doLayout = function (heightInPixel, widthInPixel) {\n // implement in subclass\n };\n ZoneWidget.prototype._relayout = function (newHeightInLines) {\n var _this = this;\n if (this._viewZone.heightInLines !== newHeightInLines) {\n this.editor.changeViewZones(function (accessor) {\n _this._viewZone.heightInLines = newHeightInLines;\n accessor.layoutZone(_this._viewZone.id);\n });\n }\n };\n // --- sash\n ZoneWidget.prototype._initSash = function () {\n var _this = this;\n this._resizeSash = new Sash(this.domNode, this, { orientation: Orientation.HORIZONTAL });\n if (!this.options.isResizeable) {\n this._resizeSash.hide();\n this._resizeSash.state = SashState.Disabled;\n }\n var data;\n this._disposables.push(this._resizeSash.onDidStart(function (e) {\n if (_this._viewZone) {\n data = {\n startY: e.startY,\n heightInLines: _this._viewZone.heightInLines,\n };\n }\n }));\n this._disposables.push(this._resizeSash.onDidEnd(function () {\n data = undefined;\n }));\n this._disposables.push(this._resizeSash.onDidChange(function (evt) {\n if (data) {\n var lineDelta = (evt.currentY - data.startY) / _this.editor.getConfiguration().lineHeight;\n var roundedLineDelta = lineDelta < 0 ? Math.ceil(lineDelta) : Math.floor(lineDelta);\n var newHeightInLines = data.heightInLines + roundedLineDelta;\n if (newHeightInLines > 5 && newHeightInLines < 35) {\n _this._relayout(newHeightInLines);\n }\n }\n }));\n };\n ZoneWidget.prototype.getHorizontalSashLeft = function () {\n return 0;\n };\n ZoneWidget.prototype.getHorizontalSashTop = function () {\n return parseInt(this.domNode.style.height) - (this._decoratingElementsHeight() / 2);\n };\n ZoneWidget.prototype.getHorizontalSashWidth = function () {\n var layoutInfo = this.editor.getLayoutInfo();\n return layoutInfo.width - layoutInfo.minimapWidth;\n };\n return ZoneWidget;\n}());\nexport { ZoneWidget };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport { localize } from '../../../nls';\nimport { Emitter } from '../../../base/common/event';\nimport { basename } from '../../../base/common/paths';\nimport { dispose } from '../../../base/common/lifecycle';\nimport * as strings from '../../../base/common/strings';\nimport { defaultGenerator } from '../../../base/common/idGenerator';\nimport { TPromise } from '../../../base/common/winjs.base';\nimport { Range } from '../../common/core/range';\nvar OneReference = /** @class */ (function () {\n function OneReference(_parent, _range) {\n this._parent = _parent;\n this._range = _range;\n this._onRefChanged = new Emitter();\n this.onRefChanged = this._onRefChanged.event;\n this._id = defaultGenerator.nextId();\n }\n Object.defineProperty(OneReference.prototype, \"id\", {\n get: function () {\n return this._id;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(OneReference.prototype, \"parent\", {\n get: function () {\n return this._parent;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(OneReference.prototype, \"uri\", {\n get: function () {\n return this._parent.uri;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(OneReference.prototype, \"range\", {\n get: function () {\n return this._range;\n },\n set: function (value) {\n this._range = value;\n this._onRefChanged.fire(this);\n },\n enumerable: true,\n configurable: true\n });\n OneReference.prototype.getAriaMessage = function () {\n return localize('aria.oneReference', \"symbol in {0} on line {1} at column {2}\", basename(this.uri.fsPath), this.range.startLineNumber, this.range.startColumn);\n };\n return OneReference;\n}());\nexport { OneReference };\nvar FilePreview = /** @class */ (function () {\n function FilePreview(_modelReference) {\n this._modelReference = _modelReference;\n }\n Object.defineProperty(FilePreview.prototype, \"_model\", {\n get: function () { return this._modelReference.object.textEditorModel; },\n enumerable: true,\n configurable: true\n });\n FilePreview.prototype.preview = function (range, n) {\n if (n === void 0) { n = 8; }\n var model = this._model;\n if (!model) {\n return undefined;\n }\n var startLineNumber = range.startLineNumber, startColumn = range.startColumn, endLineNumber = range.endLineNumber, endColumn = range.endColumn;\n var word = model.getWordUntilPosition({ lineNumber: startLineNumber, column: startColumn - n });\n var beforeRange = new Range(startLineNumber, word.startColumn, startLineNumber, startColumn);\n var afterRange = new Range(endLineNumber, endColumn, endLineNumber, Number.MAX_VALUE);\n var ret = {\n before: model.getValueInRange(beforeRange).replace(/^\\s+/, strings.empty),\n inside: model.getValueInRange(range),\n after: model.getValueInRange(afterRange).replace(/\\s+$/, strings.empty)\n };\n return ret;\n };\n FilePreview.prototype.dispose = function () {\n if (this._modelReference) {\n this._modelReference.dispose();\n this._modelReference = null;\n }\n };\n return FilePreview;\n}());\nexport { FilePreview };\nvar FileReferences = /** @class */ (function () {\n function FileReferences(_parent, _uri) {\n this._parent = _parent;\n this._uri = _uri;\n this._children = [];\n }\n Object.defineProperty(FileReferences.prototype, \"id\", {\n get: function () {\n return this._uri.toString();\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(FileReferences.prototype, \"parent\", {\n get: function () {\n return this._parent;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(FileReferences.prototype, \"children\", {\n get: function () {\n return this._children;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(FileReferences.prototype, \"uri\", {\n get: function () {\n return this._uri;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(FileReferences.prototype, \"preview\", {\n get: function () {\n return this._preview;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(FileReferences.prototype, \"failure\", {\n get: function () {\n return this._loadFailure;\n },\n enumerable: true,\n configurable: true\n });\n FileReferences.prototype.getAriaMessage = function () {\n var len = this.children.length;\n if (len === 1) {\n return localize('aria.fileReferences.1', \"1 symbol in {0}, full path {1}\", basename(this.uri.fsPath), this.uri.fsPath);\n }\n else {\n return localize('aria.fileReferences.N', \"{0} symbols in {1}, full path {2}\", len, basename(this.uri.fsPath), this.uri.fsPath);\n }\n };\n FileReferences.prototype.resolve = function (textModelResolverService) {\n var _this = this;\n if (this._resolved) {\n return TPromise.as(this);\n }\n return textModelResolverService.createModelReference(this._uri).then(function (modelReference) {\n var model = modelReference.object;\n if (!model) {\n modelReference.dispose();\n throw new Error();\n }\n _this._preview = new FilePreview(modelReference);\n _this._resolved = true;\n return _this;\n }, function (err) {\n // something wrong here\n _this._children = [];\n _this._resolved = true;\n _this._loadFailure = err;\n return _this;\n });\n };\n FileReferences.prototype.dispose = function () {\n if (this._preview) {\n this._preview.dispose();\n this._preview = null;\n }\n };\n return FileReferences;\n}());\nexport { FileReferences };\nvar ReferencesModel = /** @class */ (function () {\n function ReferencesModel(references) {\n var _this = this;\n this._groups = [];\n this._references = [];\n this._onDidChangeReferenceRange = new Emitter();\n this.onDidChangeReferenceRange = this._onDidChangeReferenceRange.event;\n this._disposables = [];\n // grouping and sorting\n references.sort(ReferencesModel._compareReferences);\n var current;\n for (var _i = 0, references_1 = references; _i < references_1.length; _i++) {\n var ref = references_1[_i];\n if (!current || current.uri.toString() !== ref.uri.toString()) {\n // new group\n current = new FileReferences(this, ref.uri);\n this.groups.push(current);\n }\n // append, check for equality first!\n if (current.children.length === 0\n || !Range.equalsRange(ref.range, current.children[current.children.length - 1].range)) {\n var oneRef = new OneReference(current, ref.range);\n this._disposables.push(oneRef.onRefChanged(function (e) { return _this._onDidChangeReferenceRange.fire(e); }));\n this._references.push(oneRef);\n current.children.push(oneRef);\n }\n }\n }\n Object.defineProperty(ReferencesModel.prototype, \"empty\", {\n get: function () {\n return this._groups.length === 0;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ReferencesModel.prototype, \"references\", {\n get: function () {\n return this._references;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ReferencesModel.prototype, \"groups\", {\n get: function () {\n return this._groups;\n },\n enumerable: true,\n configurable: true\n });\n ReferencesModel.prototype.getAriaMessage = function () {\n if (this.empty) {\n return localize('aria.result.0', \"No results found\");\n }\n else if (this.references.length === 1) {\n return localize('aria.result.1', \"Found 1 symbol in {0}\", this.references[0].uri.fsPath);\n }\n else if (this.groups.length === 1) {\n return localize('aria.result.n1', \"Found {0} symbols in {1}\", this.references.length, this.groups[0].uri.fsPath);\n }\n else {\n return localize('aria.result.nm', \"Found {0} symbols in {1} files\", this.references.length, this.groups.length);\n }\n };\n ReferencesModel.prototype.nextOrPreviousReference = function (reference, next) {\n var parent = reference.parent;\n var idx = parent.children.indexOf(reference);\n var childCount = parent.children.length;\n var groupCount = parent.parent.groups.length;\n if (groupCount === 1 || next && idx + 1 < childCount || !next && idx > 0) {\n // cycling within one file\n if (next) {\n idx = (idx + 1) % childCount;\n }\n else {\n idx = (idx + childCount - 1) % childCount;\n }\n return parent.children[idx];\n }\n idx = parent.parent.groups.indexOf(parent);\n if (next) {\n idx = (idx + 1) % groupCount;\n return parent.parent.groups[idx].children[0];\n }\n else {\n idx = (idx + groupCount - 1) % groupCount;\n return parent.parent.groups[idx].children[parent.parent.groups[idx].children.length - 1];\n }\n };\n ReferencesModel.prototype.nearestReference = function (resource, position) {\n var nearest = this._references.map(function (ref, idx) {\n return {\n idx: idx,\n prefixLen: strings.commonPrefixLength(ref.uri.toString(), resource.toString()),\n offsetDist: Math.abs(ref.range.startLineNumber - position.lineNumber) * 100 + Math.abs(ref.range.startColumn - position.column)\n };\n }).sort(function (a, b) {\n if (a.prefixLen > b.prefixLen) {\n return -1;\n }\n else if (a.prefixLen < b.prefixLen) {\n return 1;\n }\n else if (a.offsetDist < b.offsetDist) {\n return -1;\n }\n else if (a.offsetDist > b.offsetDist) {\n return 1;\n }\n else {\n return 0;\n }\n })[0];\n if (nearest) {\n return this._references[nearest.idx];\n }\n return undefined;\n };\n ReferencesModel.prototype.dispose = function () {\n this._groups = dispose(this._groups);\n dispose(this._disposables);\n this._disposables.length = 0;\n };\n ReferencesModel._compareReferences = function (a, b) {\n var auri = a.uri.toString();\n var buri = b.uri.toString();\n if (auri < buri) {\n return -1;\n }\n else if (auri > buri) {\n return 1;\n }\n else {\n return Range.compareRangesUsingStarts(a.range, b.range);\n }\n };\n return ReferencesModel;\n}());\nexport { ReferencesModel };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport { createDecorator } from '../../../platform/instantiation/common/instantiation';\nexport var ITextModelService = createDecorator('textModelService');\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport { inputBackground, inputForeground, inputBorder, foreground, editorBackground, contrastBorder, listFocusBackground, listFocusForeground, listActiveSelectionBackground, listActiveSelectionForeground, listInactiveSelectionForeground, listInactiveSelectionBackground, listInactiveFocusBackground, listHoverBackground, listHoverForeground, listDropBackground, pickerGroupBorder, pickerGroupForeground, widgetShadow, inputValidationInfoBorder, inputValidationInfoBackground, inputValidationWarningBorder, inputValidationWarningBackground, inputValidationErrorBorder, inputValidationErrorBackground, activeContrastBorder, badgeBackground, badgeForeground, progressBarBackground } from './colorRegistry';\nimport { mixin } from '../../../base/common/objects';\nexport function computeStyles(theme, styleMap) {\n var styles = Object.create(null);\n for (var key in styleMap) {\n var value = styleMap[key];\n if (typeof value === 'string') {\n styles[key] = theme.getColor(value);\n }\n else if (typeof value === 'function') {\n styles[key] = value(theme);\n }\n }\n return styles;\n}\nexport function attachStyler(themeService, styleMap, widgetOrCallback) {\n function applyStyles(theme) {\n var styles = computeStyles(themeService.getTheme(), styleMap);\n if (typeof widgetOrCallback === 'function') {\n widgetOrCallback(styles);\n }\n else {\n widgetOrCallback.style(styles);\n }\n }\n applyStyles(themeService.getTheme());\n return themeService.onThemeChange(applyStyles);\n}\nexport function attachBadgeStyler(widget, themeService, style) {\n return attachStyler(themeService, {\n badgeBackground: (style && style.badgeBackground) || badgeBackground,\n badgeForeground: (style && style.badgeForeground) || badgeForeground,\n badgeBorder: contrastBorder\n }, widget);\n}\nexport function attachQuickOpenStyler(widget, themeService, style) {\n return attachStyler(themeService, {\n foreground: (style && style.foreground) || foreground,\n background: (style && style.background) || editorBackground,\n borderColor: style && style.borderColor || contrastBorder,\n widgetShadow: style && style.widgetShadow || widgetShadow,\n progressBarBackground: style && style.progressBarBackground || progressBarBackground,\n pickerGroupForeground: style && style.pickerGroupForeground || pickerGroupForeground,\n pickerGroupBorder: style && style.pickerGroupBorder || pickerGroupBorder,\n inputBackground: (style && style.inputBackground) || inputBackground,\n inputForeground: (style && style.inputForeground) || inputForeground,\n inputBorder: (style && style.inputBorder) || inputBorder,\n inputValidationInfoBorder: (style && style.inputValidationInfoBorder) || inputValidationInfoBorder,\n inputValidationInfoBackground: (style && style.inputValidationInfoBackground) || inputValidationInfoBackground,\n inputValidationWarningBorder: (style && style.inputValidationWarningBorder) || inputValidationWarningBorder,\n inputValidationWarningBackground: (style && style.inputValidationWarningBackground) || inputValidationWarningBackground,\n inputValidationErrorBorder: (style && style.inputValidationErrorBorder) || inputValidationErrorBorder,\n inputValidationErrorBackground: (style && style.inputValidationErrorBackground) || inputValidationErrorBackground,\n listFocusBackground: (style && style.listFocusBackground) || listFocusBackground,\n listFocusForeground: (style && style.listFocusForeground) || listFocusForeground,\n listActiveSelectionBackground: (style && style.listActiveSelectionBackground) || listActiveSelectionBackground,\n listActiveSelectionForeground: (style && style.listActiveSelectionForeground) || listActiveSelectionForeground,\n listFocusAndSelectionBackground: style && style.listFocusAndSelectionBackground || listActiveSelectionBackground,\n listFocusAndSelectionForeground: (style && style.listFocusAndSelectionForeground) || listActiveSelectionForeground,\n listInactiveSelectionBackground: (style && style.listInactiveSelectionBackground) || listInactiveSelectionBackground,\n listInactiveSelectionForeground: (style && style.listInactiveSelectionForeground) || listInactiveSelectionForeground,\n listInactiveFocusBackground: (style && style.listInactiveFocusBackground) || listInactiveFocusBackground,\n listHoverBackground: (style && style.listHoverBackground) || listHoverBackground,\n listHoverForeground: (style && style.listHoverForeground) || listHoverForeground,\n listDropBackground: (style && style.listDropBackground) || listDropBackground,\n listFocusOutline: (style && style.listFocusOutline) || activeContrastBorder,\n listSelectionOutline: (style && style.listSelectionOutline) || activeContrastBorder,\n listHoverOutline: (style && style.listHoverOutline) || activeContrastBorder\n }, widget);\n}\nexport function attachListStyler(widget, themeService, overrides) {\n return attachStyler(themeService, mixin(overrides || Object.create(null), defaultListStyles, false), widget);\n}\nexport var defaultListStyles = {\n listFocusBackground: listFocusBackground,\n listFocusForeground: listFocusForeground,\n listActiveSelectionBackground: listActiveSelectionBackground,\n listActiveSelectionForeground: listActiveSelectionForeground,\n listFocusAndSelectionBackground: listActiveSelectionBackground,\n listFocusAndSelectionForeground: listActiveSelectionForeground,\n listInactiveSelectionBackground: listInactiveSelectionBackground,\n listInactiveSelectionForeground: listInactiveSelectionForeground,\n listInactiveFocusBackground: listInactiveFocusBackground,\n listHoverBackground: listHoverBackground,\n listHoverForeground: listHoverForeground,\n listDropBackground: listDropBackground,\n listFocusOutline: activeContrastBorder,\n listSelectionOutline: activeContrastBorder,\n listHoverOutline: activeContrastBorder\n};\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport * as platform from '../../../common/platform';\nimport * as errors from '../../../common/errors';\nimport * as dom from '../../../browser/dom';\nimport { createKeybinding } from '../../../common/keyCodes';\nexport var ClickBehavior;\n(function (ClickBehavior) {\n /**\n * Handle the click when the mouse button is pressed but not released yet.\n */\n ClickBehavior[ClickBehavior[\"ON_MOUSE_DOWN\"] = 0] = \"ON_MOUSE_DOWN\";\n /**\n * Handle the click when the mouse button is released.\n */\n ClickBehavior[ClickBehavior[\"ON_MOUSE_UP\"] = 1] = \"ON_MOUSE_UP\";\n})(ClickBehavior || (ClickBehavior = {}));\nexport var OpenMode;\n(function (OpenMode) {\n OpenMode[OpenMode[\"SINGLE_CLICK\"] = 0] = \"SINGLE_CLICK\";\n OpenMode[OpenMode[\"DOUBLE_CLICK\"] = 1] = \"DOUBLE_CLICK\";\n})(OpenMode || (OpenMode = {}));\nvar KeybindingDispatcher = /** @class */ (function () {\n function KeybindingDispatcher() {\n this._arr = [];\n }\n KeybindingDispatcher.prototype.set = function (keybinding, callback) {\n this._arr.push({\n keybinding: createKeybinding(keybinding, platform.OS),\n callback: callback\n });\n };\n KeybindingDispatcher.prototype.dispatch = function (keybinding) {\n // Loop from the last to the first to handle overwrites\n for (var i = this._arr.length - 1; i >= 0; i--) {\n var item = this._arr[i];\n if (keybinding.equals(item.keybinding)) {\n return item.callback;\n }\n }\n return null;\n };\n return KeybindingDispatcher;\n}());\nexport { KeybindingDispatcher };\nvar DefaultController = /** @class */ (function () {\n function DefaultController(options) {\n if (options === void 0) { options = { clickBehavior: ClickBehavior.ON_MOUSE_DOWN, keyboardSupport: true, openMode: OpenMode.SINGLE_CLICK }; }\n var _this = this;\n this.options = options;\n this.downKeyBindingDispatcher = new KeybindingDispatcher();\n this.upKeyBindingDispatcher = new KeybindingDispatcher();\n if (typeof options.keyboardSupport !== 'boolean' || options.keyboardSupport) {\n this.downKeyBindingDispatcher.set(16 /* UpArrow */, function (t, e) { return _this.onUp(t, e); });\n this.downKeyBindingDispatcher.set(18 /* DownArrow */, function (t, e) { return _this.onDown(t, e); });\n this.downKeyBindingDispatcher.set(15 /* LeftArrow */, function (t, e) { return _this.onLeft(t, e); });\n this.downKeyBindingDispatcher.set(17 /* RightArrow */, function (t, e) { return _this.onRight(t, e); });\n if (platform.isMacintosh) {\n this.downKeyBindingDispatcher.set(2048 /* CtrlCmd */ | 16 /* UpArrow */, function (t, e) { return _this.onLeft(t, e); });\n this.downKeyBindingDispatcher.set(256 /* WinCtrl */ | 44 /* KEY_N */, function (t, e) { return _this.onDown(t, e); });\n this.downKeyBindingDispatcher.set(256 /* WinCtrl */ | 46 /* KEY_P */, function (t, e) { return _this.onUp(t, e); });\n }\n this.downKeyBindingDispatcher.set(11 /* PageUp */, function (t, e) { return _this.onPageUp(t, e); });\n this.downKeyBindingDispatcher.set(12 /* PageDown */, function (t, e) { return _this.onPageDown(t, e); });\n this.downKeyBindingDispatcher.set(14 /* Home */, function (t, e) { return _this.onHome(t, e); });\n this.downKeyBindingDispatcher.set(13 /* End */, function (t, e) { return _this.onEnd(t, e); });\n this.downKeyBindingDispatcher.set(10 /* Space */, function (t, e) { return _this.onSpace(t, e); });\n this.downKeyBindingDispatcher.set(9 /* Escape */, function (t, e) { return _this.onEscape(t, e); });\n this.upKeyBindingDispatcher.set(3 /* Enter */, this.onEnter.bind(this));\n this.upKeyBindingDispatcher.set(2048 /* CtrlCmd */ | 3 /* Enter */, this.onEnter.bind(this));\n }\n }\n DefaultController.prototype.onMouseDown = function (tree, element, event, origin) {\n if (origin === void 0) { origin = 'mouse'; }\n if (this.options.clickBehavior === ClickBehavior.ON_MOUSE_DOWN && (event.leftButton || event.middleButton)) {\n if (event.target) {\n if (event.target.tagName && event.target.tagName.toLowerCase() === 'input') {\n return false; // Ignore event if target is a form input field (avoids browser specific issues)\n }\n if (dom.findParentWithClass(event.target, 'scrollbar', 'monaco-tree')) {\n return false;\n }\n if (dom.findParentWithClass(event.target, 'monaco-action-bar', 'row')) { // TODO@Joao not very nice way of checking for the action bar (implicit knowledge)\n return false; // Ignore event if target is over an action bar of the row\n }\n }\n // Propagate to onLeftClick now\n return this.onLeftClick(tree, element, event, origin);\n }\n return false;\n };\n DefaultController.prototype.onClick = function (tree, element, event) {\n var isMac = platform.isMacintosh;\n // A Ctrl click on the Mac is a context menu event\n if (isMac && event.ctrlKey) {\n event.preventDefault();\n event.stopPropagation();\n return false;\n }\n if (event.target && event.target.tagName && event.target.tagName.toLowerCase() === 'input') {\n return false; // Ignore event if target is a form input field (avoids browser specific issues)\n }\n if (this.options.clickBehavior === ClickBehavior.ON_MOUSE_DOWN && (event.leftButton || event.middleButton)) {\n return false; // Already handled by onMouseDown\n }\n return this.onLeftClick(tree, element, event);\n };\n DefaultController.prototype.onLeftClick = function (tree, element, eventish, origin) {\n if (origin === void 0) { origin = 'mouse'; }\n var event = eventish;\n var payload = { origin: origin, originalEvent: eventish, didClickOnTwistie: this.isClickOnTwistie(event) };\n if (tree.getInput() === element) {\n tree.clearFocus(payload);\n tree.clearSelection(payload);\n }\n else {\n var isSingleMouseDown = eventish && event.browserEvent && event.browserEvent.type === 'mousedown' && event.browserEvent.detail === 1;\n if (!isSingleMouseDown) {\n eventish.preventDefault(); // we cannot preventDefault onMouseDown with single click because this would break DND otherwise\n }\n eventish.stopPropagation();\n tree.domFocus();\n tree.setSelection([element], payload);\n tree.setFocus(element, payload);\n if (this.shouldToggleExpansion(element, event, origin)) {\n if (tree.isExpanded(element)) {\n tree.collapse(element).done(null, errors.onUnexpectedError);\n }\n else {\n tree.expand(element).done(null, errors.onUnexpectedError);\n }\n }\n }\n return true;\n };\n DefaultController.prototype.shouldToggleExpansion = function (element, event, origin) {\n var isDoubleClick = (origin === 'mouse' && event.detail === 2);\n return this.openOnSingleClick || isDoubleClick || this.isClickOnTwistie(event);\n };\n DefaultController.prototype.setOpenMode = function (openMode) {\n this.options.openMode = openMode;\n };\n Object.defineProperty(DefaultController.prototype, \"openOnSingleClick\", {\n get: function () {\n return this.options.openMode === OpenMode.SINGLE_CLICK;\n },\n enumerable: true,\n configurable: true\n });\n DefaultController.prototype.isClickOnTwistie = function (event) {\n var element = event.target;\n if (!dom.hasClass(element, 'content')) {\n return false;\n }\n var twistieStyle = window.getComputedStyle(element, ':before');\n if (twistieStyle.backgroundImage === 'none' || twistieStyle.display === 'none') {\n return false;\n }\n var twistieWidth = parseInt(twistieStyle.width) + parseInt(twistieStyle.paddingRight);\n return event.browserEvent.offsetX <= twistieWidth;\n };\n DefaultController.prototype.onContextMenu = function (tree, element, event) {\n if (event.target && event.target.tagName && event.target.tagName.toLowerCase() === 'input') {\n return false; // allow context menu on input fields\n }\n // Prevent native context menu from showing up\n if (event) {\n event.preventDefault();\n event.stopPropagation();\n }\n return false;\n };\n DefaultController.prototype.onTap = function (tree, element, event) {\n var target = event.initialTarget;\n if (target && target.tagName && target.tagName.toLowerCase() === 'input') {\n return false; // Ignore event if target is a form input field (avoids browser specific issues)\n }\n return this.onLeftClick(tree, element, event, 'touch');\n };\n DefaultController.prototype.onKeyDown = function (tree, event) {\n return this.onKey(this.downKeyBindingDispatcher, tree, event);\n };\n DefaultController.prototype.onKeyUp = function (tree, event) {\n return this.onKey(this.upKeyBindingDispatcher, tree, event);\n };\n DefaultController.prototype.onKey = function (bindings, tree, event) {\n var handler = bindings.dispatch(event.toKeybinding());\n if (handler) {\n if (handler(tree, event)) {\n event.preventDefault();\n event.stopPropagation();\n return true;\n }\n }\n return false;\n };\n DefaultController.prototype.onUp = function (tree, event) {\n var payload = { origin: 'keyboard', originalEvent: event };\n if (tree.getHighlight()) {\n tree.clearHighlight(payload);\n }\n else {\n tree.focusPrevious(1, payload);\n tree.reveal(tree.getFocus()).done(null, errors.onUnexpectedError);\n }\n return true;\n };\n DefaultController.prototype.onPageUp = function (tree, event) {\n var payload = { origin: 'keyboard', originalEvent: event };\n if (tree.getHighlight()) {\n tree.clearHighlight(payload);\n }\n else {\n tree.focusPreviousPage(payload);\n tree.reveal(tree.getFocus()).done(null, errors.onUnexpectedError);\n }\n return true;\n };\n DefaultController.prototype.onDown = function (tree, event) {\n var payload = { origin: 'keyboard', originalEvent: event };\n if (tree.getHighlight()) {\n tree.clearHighlight(payload);\n }\n else {\n tree.focusNext(1, payload);\n tree.reveal(tree.getFocus()).done(null, errors.onUnexpectedError);\n }\n return true;\n };\n DefaultController.prototype.onPageDown = function (tree, event) {\n var payload = { origin: 'keyboard', originalEvent: event };\n if (tree.getHighlight()) {\n tree.clearHighlight(payload);\n }\n else {\n tree.focusNextPage(payload);\n tree.reveal(tree.getFocus()).done(null, errors.onUnexpectedError);\n }\n return true;\n };\n DefaultController.prototype.onHome = function (tree, event) {\n var payload = { origin: 'keyboard', originalEvent: event };\n if (tree.getHighlight()) {\n tree.clearHighlight(payload);\n }\n else {\n tree.focusFirst(payload);\n tree.reveal(tree.getFocus()).done(null, errors.onUnexpectedError);\n }\n return true;\n };\n DefaultController.prototype.onEnd = function (tree, event) {\n var payload = { origin: 'keyboard', originalEvent: event };\n if (tree.getHighlight()) {\n tree.clearHighlight(payload);\n }\n else {\n tree.focusLast(payload);\n tree.reveal(tree.getFocus()).done(null, errors.onUnexpectedError);\n }\n return true;\n };\n DefaultController.prototype.onLeft = function (tree, event) {\n var payload = { origin: 'keyboard', originalEvent: event };\n if (tree.getHighlight()) {\n tree.clearHighlight(payload);\n }\n else {\n var focus_1 = tree.getFocus();\n tree.collapse(focus_1).then(function (didCollapse) {\n if (focus_1 && !didCollapse) {\n tree.focusParent(payload);\n return tree.reveal(tree.getFocus());\n }\n return undefined;\n }).done(null, errors.onUnexpectedError);\n }\n return true;\n };\n DefaultController.prototype.onRight = function (tree, event) {\n var payload = { origin: 'keyboard', originalEvent: event };\n if (tree.getHighlight()) {\n tree.clearHighlight(payload);\n }\n else {\n var focus_2 = tree.getFocus();\n tree.expand(focus_2).then(function (didExpand) {\n if (focus_2 && !didExpand) {\n tree.focusFirstChild(payload);\n return tree.reveal(tree.getFocus());\n }\n return undefined;\n }).done(null, errors.onUnexpectedError);\n }\n return true;\n };\n DefaultController.prototype.onEnter = function (tree, event) {\n var payload = { origin: 'keyboard', originalEvent: event };\n if (tree.getHighlight()) {\n return false;\n }\n var focus = tree.getFocus();\n if (focus) {\n tree.setSelection([focus], payload);\n }\n return true;\n };\n DefaultController.prototype.onSpace = function (tree, event) {\n if (tree.getHighlight()) {\n return false;\n }\n var focus = tree.getFocus();\n if (focus) {\n tree.toggleExpansion(focus);\n }\n return true;\n };\n DefaultController.prototype.onEscape = function (tree, event) {\n var payload = { origin: 'keyboard', originalEvent: event };\n if (tree.getHighlight()) {\n tree.clearHighlight(payload);\n return true;\n }\n if (tree.getSelection().length) {\n tree.clearSelection(payload);\n return true;\n }\n if (tree.getFocus()) {\n tree.clearFocus(payload);\n return true;\n }\n return false;\n };\n return DefaultController;\n}());\nexport { DefaultController };\nvar DefaultDragAndDrop = /** @class */ (function () {\n function DefaultDragAndDrop() {\n }\n DefaultDragAndDrop.prototype.getDragURI = function (tree, element) {\n return null;\n };\n DefaultDragAndDrop.prototype.onDragStart = function (tree, data, originalEvent) {\n return;\n };\n DefaultDragAndDrop.prototype.onDragOver = function (tree, data, targetElement, originalEvent) {\n return null;\n };\n DefaultDragAndDrop.prototype.drop = function (tree, data, targetElement, originalEvent) {\n return;\n };\n return DefaultDragAndDrop;\n}());\nexport { DefaultDragAndDrop };\nvar DefaultFilter = /** @class */ (function () {\n function DefaultFilter() {\n }\n DefaultFilter.prototype.isVisible = function (tree, element) {\n return true;\n };\n return DefaultFilter;\n}());\nexport { DefaultFilter };\nvar DefaultAccessibilityProvider = /** @class */ (function () {\n function DefaultAccessibilityProvider() {\n }\n DefaultAccessibilityProvider.prototype.getAriaLabel = function (tree, element) {\n return null;\n };\n return DefaultAccessibilityProvider;\n}());\nexport { DefaultAccessibilityProvider };\nvar DefaultTreestyler = /** @class */ (function () {\n function DefaultTreestyler(styleElement, selectorSuffix) {\n this.styleElement = styleElement;\n this.selectorSuffix = selectorSuffix;\n }\n DefaultTreestyler.prototype.style = function (styles) {\n var suffix = this.selectorSuffix ? \".\" + this.selectorSuffix : '';\n var content = [];\n if (styles.listFocusBackground) {\n content.push(\".monaco-tree\" + suffix + \".focused .monaco-tree-rows > .monaco-tree-row.focused:not(.highlighted) { background-color: \" + styles.listFocusBackground + \"; }\");\n }\n if (styles.listFocusForeground) {\n content.push(\".monaco-tree\" + suffix + \".focused .monaco-tree-rows > .monaco-tree-row.focused:not(.highlighted) { color: \" + styles.listFocusForeground + \"; }\");\n }\n if (styles.listActiveSelectionBackground) {\n content.push(\".monaco-tree\" + suffix + \".focused .monaco-tree-rows > .monaco-tree-row.selected:not(.highlighted) { background-color: \" + styles.listActiveSelectionBackground + \"; }\");\n }\n if (styles.listActiveSelectionForeground) {\n content.push(\".monaco-tree\" + suffix + \".focused .monaco-tree-rows > .monaco-tree-row.selected:not(.highlighted) { color: \" + styles.listActiveSelectionForeground + \"; }\");\n }\n if (styles.listFocusAndSelectionBackground) {\n content.push(\"\\n\\t\\t\\t\\t.monaco-tree-drag-image,\\n\\t\\t\\t\\t.monaco-tree\" + suffix + \".focused .monaco-tree-rows > .monaco-tree-row.focused.selected:not(.highlighted) { background-color: \" + styles.listFocusAndSelectionBackground + \"; }\\n\\t\\t\\t\");\n }\n if (styles.listFocusAndSelectionForeground) {\n content.push(\"\\n\\t\\t\\t\\t.monaco-tree-drag-image,\\n\\t\\t\\t\\t.monaco-tree\" + suffix + \".focused .monaco-tree-rows > .monaco-tree-row.focused.selected:not(.highlighted) { color: \" + styles.listFocusAndSelectionForeground + \"; }\\n\\t\\t\\t\");\n }\n if (styles.listInactiveSelectionBackground) {\n content.push(\".monaco-tree\" + suffix + \" .monaco-tree-rows > .monaco-tree-row.selected:not(.highlighted) { background-color: \" + styles.listInactiveSelectionBackground + \"; }\");\n }\n if (styles.listInactiveSelectionForeground) {\n content.push(\".monaco-tree\" + suffix + \" .monaco-tree-rows > .monaco-tree-row.selected:not(.highlighted) { color: \" + styles.listInactiveSelectionForeground + \"; }\");\n }\n if (styles.listHoverBackground) {\n content.push(\".monaco-tree\" + suffix + \" .monaco-tree-rows > .monaco-tree-row:hover:not(.highlighted):not(.selected):not(.focused) { background-color: \" + styles.listHoverBackground + \"; }\");\n }\n if (styles.listHoverForeground) {\n content.push(\".monaco-tree\" + suffix + \" .monaco-tree-rows > .monaco-tree-row:hover:not(.highlighted):not(.selected):not(.focused) { color: \" + styles.listHoverForeground + \"; }\");\n }\n if (styles.listDropBackground) {\n content.push(\"\\n\\t\\t\\t\\t.monaco-tree\" + suffix + \" .monaco-tree-wrapper.drop-target,\\n\\t\\t\\t\\t.monaco-tree\" + suffix + \" .monaco-tree-rows > .monaco-tree-row.drop-target { background-color: \" + styles.listDropBackground + \" !important; color: inherit !important; }\\n\\t\\t\\t\");\n }\n if (styles.listFocusOutline) {\n content.push(\"\\n\\t\\t\\t\\t.monaco-tree-drag-image\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t{ border: 1px solid \" + styles.listFocusOutline + \"; background: #000; }\\n\\t\\t\\t\\t.monaco-tree\" + suffix + \" .monaco-tree-rows > .monaco-tree-row \\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t{ border: 1px solid transparent; }\\n\\t\\t\\t\\t.monaco-tree\" + suffix + \".focused .monaco-tree-rows > .monaco-tree-row.focused:not(.highlighted) \\t\\t\\t\\t\\t\\t{ border: 1px dotted \" + styles.listFocusOutline + \"; }\\n\\t\\t\\t\\t.monaco-tree\" + suffix + \".focused .monaco-tree-rows > .monaco-tree-row.selected:not(.highlighted) \\t\\t\\t\\t\\t\\t{ border: 1px solid \" + styles.listFocusOutline + \"; }\\n\\t\\t\\t\\t.monaco-tree\" + suffix + \" .monaco-tree-rows > .monaco-tree-row.selected:not(.highlighted) \\t\\t\\t\\t\\t\\t\\t{ border: 1px solid \" + styles.listFocusOutline + \"; }\\n\\t\\t\\t\\t.monaco-tree\" + suffix + \" .monaco-tree-rows > .monaco-tree-row:hover:not(.highlighted):not(.selected):not(.focused) \\t{ border: 1px dashed \" + styles.listFocusOutline + \"; }\\n\\t\\t\\t\\t.monaco-tree\" + suffix + \" .monaco-tree-wrapper.drop-target,\\n\\t\\t\\t\\t.monaco-tree\" + suffix + \" .monaco-tree-rows > .monaco-tree-row.drop-target\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t{ border: 1px dashed \" + styles.listFocusOutline + \"; }\\n\\t\\t\\t\");\n }\n var newStyles = content.join('\\n');\n if (newStyles !== this.styleElement.innerHTML) {\n this.styleElement.innerHTML = newStyles;\n }\n };\n return DefaultTreestyler;\n}());\nexport { DefaultTreestyler };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { createDecorator } from '../../instantiation/common/instantiation';\nexport var IEnvironmentService = createDecorator('environmentService');\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport * as Assert from '../../../common/assert';\nimport { onUnexpectedError } from '../../../common/errors';\nimport { combinedDisposable } from '../../../common/lifecycle';\nimport * as WinJS from '../../../common/winjs.base';\nimport { Emitter, once, EventMultiplexer, Relay } from '../../../common/event';\nvar LockData = /** @class */ (function () {\n function LockData(item) {\n this._onDispose = new Emitter();\n this.onDispose = this._onDispose.event;\n this._item = item;\n }\n Object.defineProperty(LockData.prototype, \"item\", {\n get: function () {\n return this._item;\n },\n enumerable: true,\n configurable: true\n });\n LockData.prototype.dispose = function () {\n if (this._onDispose) {\n this._onDispose.fire();\n this._onDispose.dispose();\n this._onDispose = null;\n }\n };\n return LockData;\n}());\nexport { LockData };\nvar Lock = /** @class */ (function () {\n function Lock() {\n this.locks = Object.create({});\n }\n Lock.prototype.isLocked = function (item) {\n return !!this.locks[item.id];\n };\n Lock.prototype.run = function (item, fn) {\n var _this = this;\n var lock = this.getLock(item);\n if (lock) {\n var unbindListener;\n return new WinJS.TPromise(function (c, e) {\n unbindListener = once(lock.onDispose)(function () {\n return _this.run(item, fn).then(c, e);\n });\n }, function () { unbindListener.dispose(); });\n }\n var result;\n return new WinJS.TPromise(function (c, e) {\n if (item.isDisposed()) {\n return e(new Error('Item is disposed.'));\n }\n var lock = _this.locks[item.id] = new LockData(item);\n result = fn().then(function (r) {\n delete _this.locks[item.id];\n lock.dispose();\n return r;\n }).then(c, e);\n return result;\n }, function () { return result.cancel(); });\n };\n Lock.prototype.getLock = function (item) {\n var key;\n for (key in this.locks) {\n var lock = this.locks[key];\n if (item.intersects(lock.item)) {\n return lock;\n }\n }\n return null;\n };\n return Lock;\n}());\nexport { Lock };\nvar ItemRegistry = /** @class */ (function () {\n function ItemRegistry() {\n this._isDisposed = false;\n this._onDidRevealItem = new EventMultiplexer();\n this.onDidRevealItem = this._onDidRevealItem.event;\n this._onExpandItem = new EventMultiplexer();\n this.onExpandItem = this._onExpandItem.event;\n this._onDidExpandItem = new EventMultiplexer();\n this.onDidExpandItem = this._onDidExpandItem.event;\n this._onCollapseItem = new EventMultiplexer();\n this.onCollapseItem = this._onCollapseItem.event;\n this._onDidCollapseItem = new EventMultiplexer();\n this.onDidCollapseItem = this._onDidCollapseItem.event;\n this._onDidAddTraitItem = new EventMultiplexer();\n this.onDidAddTraitItem = this._onDidAddTraitItem.event;\n this._onDidRemoveTraitItem = new EventMultiplexer();\n this.onDidRemoveTraitItem = this._onDidRemoveTraitItem.event;\n this._onDidRefreshItem = new EventMultiplexer();\n this.onDidRefreshItem = this._onDidRefreshItem.event;\n this._onRefreshItemChildren = new EventMultiplexer();\n this.onRefreshItemChildren = this._onRefreshItemChildren.event;\n this._onDidRefreshItemChildren = new EventMultiplexer();\n this.onDidRefreshItemChildren = this._onDidRefreshItemChildren.event;\n this._onDidDisposeItem = new EventMultiplexer();\n this.onDidDisposeItem = this._onDidDisposeItem.event;\n this.items = {};\n }\n ItemRegistry.prototype.register = function (item) {\n Assert.ok(!this.isRegistered(item.id), 'item already registered: ' + item.id);\n var disposable = combinedDisposable([\n this._onDidRevealItem.add(item.onDidReveal),\n this._onExpandItem.add(item.onExpand),\n this._onDidExpandItem.add(item.onDidExpand),\n this._onCollapseItem.add(item.onCollapse),\n this._onDidCollapseItem.add(item.onDidCollapse),\n this._onDidAddTraitItem.add(item.onDidAddTrait),\n this._onDidRemoveTraitItem.add(item.onDidRemoveTrait),\n this._onDidRefreshItem.add(item.onDidRefresh),\n this._onRefreshItemChildren.add(item.onRefreshChildren),\n this._onDidRefreshItemChildren.add(item.onDidRefreshChildren),\n this._onDidDisposeItem.add(item.onDidDispose)\n ]);\n this.items[item.id] = { item: item, disposable: disposable };\n };\n ItemRegistry.prototype.deregister = function (item) {\n Assert.ok(this.isRegistered(item.id), 'item not registered: ' + item.id);\n this.items[item.id].disposable.dispose();\n delete this.items[item.id];\n };\n ItemRegistry.prototype.isRegistered = function (id) {\n return this.items.hasOwnProperty(id);\n };\n ItemRegistry.prototype.getItem = function (id) {\n var result = this.items[id];\n return result ? result.item : null;\n };\n ItemRegistry.prototype.dispose = function () {\n this.items = null;\n this._onDidRevealItem.dispose();\n this._onExpandItem.dispose();\n this._onDidExpandItem.dispose();\n this._onCollapseItem.dispose();\n this._onDidCollapseItem.dispose();\n this._onDidAddTraitItem.dispose();\n this._onDidRemoveTraitItem.dispose();\n this._onDidRefreshItem.dispose();\n this._onRefreshItemChildren.dispose();\n this._onDidRefreshItemChildren.dispose();\n this._isDisposed = true;\n };\n ItemRegistry.prototype.isDisposed = function () {\n return this._isDisposed;\n };\n return ItemRegistry;\n}());\nexport { ItemRegistry };\nvar Item = /** @class */ (function () {\n function Item(id, registry, context, lock, element) {\n this._onDidCreate = new Emitter();\n this._onDidReveal = new Emitter();\n this.onDidReveal = this._onDidReveal.event;\n this._onExpand = new Emitter();\n this.onExpand = this._onExpand.event;\n this._onDidExpand = new Emitter();\n this.onDidExpand = this._onDidExpand.event;\n this._onCollapse = new Emitter();\n this.onCollapse = this._onCollapse.event;\n this._onDidCollapse = new Emitter();\n this.onDidCollapse = this._onDidCollapse.event;\n this._onDidAddTrait = new Emitter();\n this.onDidAddTrait = this._onDidAddTrait.event;\n this._onDidRemoveTrait = new Emitter();\n this.onDidRemoveTrait = this._onDidRemoveTrait.event;\n this._onDidRefresh = new Emitter();\n this.onDidRefresh = this._onDidRefresh.event;\n this._onRefreshChildren = new Emitter();\n this.onRefreshChildren = this._onRefreshChildren.event;\n this._onDidRefreshChildren = new Emitter();\n this.onDidRefreshChildren = this._onDidRefreshChildren.event;\n this._onDidDispose = new Emitter();\n this.onDidDispose = this._onDidDispose.event;\n this.registry = registry;\n this.context = context;\n this.lock = lock;\n this.element = element;\n this.id = id;\n this.registry.register(this);\n this.doesHaveChildren = this.context.dataSource.hasChildren(this.context.tree, this.element);\n this.needsChildrenRefresh = true;\n this.parent = null;\n this.previous = null;\n this.next = null;\n this.firstChild = null;\n this.lastChild = null;\n this.traits = {};\n this.depth = 0;\n this.expanded = this.context.dataSource.shouldAutoexpand && this.context.dataSource.shouldAutoexpand(this.context.tree, element);\n this._onDidCreate.fire(this);\n this.visible = this._isVisible();\n this.height = this._getHeight();\n this._isDisposed = false;\n }\n Item.prototype.getElement = function () {\n return this.element;\n };\n Item.prototype.hasChildren = function () {\n return this.doesHaveChildren;\n };\n Item.prototype.getDepth = function () {\n return this.depth;\n };\n Item.prototype.isVisible = function () {\n return this.visible;\n };\n Item.prototype.setVisible = function (value) {\n this.visible = value;\n };\n Item.prototype.isExpanded = function () {\n return this.expanded;\n };\n /* protected */ Item.prototype._setExpanded = function (value) {\n this.expanded = value;\n };\n Item.prototype.reveal = function (relativeTop) {\n if (relativeTop === void 0) { relativeTop = null; }\n var eventData = { item: this, relativeTop: relativeTop };\n this._onDidReveal.fire(eventData);\n };\n Item.prototype.expand = function () {\n var _this = this;\n if (this.isExpanded() || !this.doesHaveChildren || this.lock.isLocked(this)) {\n return WinJS.TPromise.as(false);\n }\n var result = this.lock.run(this, function () {\n var eventData = { item: _this };\n var result;\n _this._onExpand.fire(eventData);\n if (_this.needsChildrenRefresh) {\n result = _this.refreshChildren(false, true, true);\n }\n else {\n result = WinJS.TPromise.as(null);\n }\n return result.then(function () {\n _this._setExpanded(true);\n _this._onDidExpand.fire(eventData);\n return true;\n });\n });\n return result.then(function (r) {\n if (_this.isDisposed()) {\n return false;\n }\n // Auto expand single child folders\n if (_this.context.options.autoExpandSingleChildren && r && _this.firstChild !== null && _this.firstChild === _this.lastChild && _this.firstChild.isVisible()) {\n return _this.firstChild.expand().then(function () { return true; });\n }\n return r;\n });\n };\n Item.prototype.collapse = function (recursive) {\n var _this = this;\n if (recursive === void 0) { recursive = false; }\n if (recursive) {\n var collapseChildrenPromise = WinJS.TPromise.as(null);\n this.forEachChild(function (child) {\n collapseChildrenPromise = collapseChildrenPromise.then(function () { return child.collapse(true); });\n });\n return collapseChildrenPromise.then(function () {\n return _this.collapse(false);\n });\n }\n else {\n if (!this.isExpanded() || this.lock.isLocked(this)) {\n return WinJS.TPromise.as(false);\n }\n return this.lock.run(this, function () {\n var eventData = { item: _this };\n _this._onCollapse.fire(eventData);\n _this._setExpanded(false);\n _this._onDidCollapse.fire(eventData);\n return WinJS.TPromise.as(true);\n });\n }\n };\n Item.prototype.addTrait = function (trait) {\n var eventData = { item: this, trait: trait };\n this.traits[trait] = true;\n this._onDidAddTrait.fire(eventData);\n };\n Item.prototype.removeTrait = function (trait) {\n var eventData = { item: this, trait: trait };\n delete this.traits[trait];\n this._onDidRemoveTrait.fire(eventData);\n };\n Item.prototype.hasTrait = function (trait) {\n return this.traits[trait] || false;\n };\n Item.prototype.getAllTraits = function () {\n var result = [];\n var trait;\n for (trait in this.traits) {\n if (this.traits.hasOwnProperty(trait) && this.traits[trait]) {\n result.push(trait);\n }\n }\n return result;\n };\n Item.prototype.getHeight = function () {\n return this.height;\n };\n Item.prototype.refreshChildren = function (recursive, safe, force) {\n var _this = this;\n if (safe === void 0) { safe = false; }\n if (force === void 0) { force = false; }\n if (!force && !this.isExpanded()) {\n this.needsChildrenRefresh = true;\n return WinJS.TPromise.as(this);\n }\n this.needsChildrenRefresh = false;\n var doRefresh = function () {\n var eventData = { item: _this, isNested: safe };\n _this._onRefreshChildren.fire(eventData);\n var childrenPromise;\n if (_this.doesHaveChildren) {\n childrenPromise = _this.context.dataSource.getChildren(_this.context.tree, _this.element);\n }\n else {\n childrenPromise = WinJS.TPromise.as([]);\n }\n var result = childrenPromise.then(function (elements) {\n if (_this.isDisposed() || _this.registry.isDisposed()) {\n return WinJS.TPromise.as(null);\n }\n if (!Array.isArray(elements)) {\n return WinJS.TPromise.wrapError(new Error('Please return an array of children.'));\n }\n elements = !elements ? [] : elements.slice(0);\n elements = _this.sort(elements);\n var staleItems = {};\n while (_this.firstChild !== null) {\n staleItems[_this.firstChild.id] = _this.firstChild;\n _this.removeChild(_this.firstChild);\n }\n for (var i = 0, len = elements.length; i < len; i++) {\n var element = elements[i];\n var id = _this.context.dataSource.getId(_this.context.tree, element);\n var item = staleItems[id] || new Item(id, _this.registry, _this.context, _this.lock, element);\n item.element = element;\n if (recursive) {\n item.needsChildrenRefresh = recursive;\n }\n delete staleItems[id];\n _this.addChild(item);\n }\n for (var staleItemId in staleItems) {\n if (staleItems.hasOwnProperty(staleItemId)) {\n staleItems[staleItemId].dispose();\n }\n }\n if (recursive) {\n return WinJS.Promise.join(_this.mapEachChild(function (child) {\n return child.doRefresh(recursive, true);\n }));\n }\n else {\n _this.mapEachChild(function (child) { return child.updateVisibility(); });\n return WinJS.TPromise.as(null);\n }\n });\n return result\n .then(null, onUnexpectedError)\n .then(function () { return _this._onDidRefreshChildren.fire(eventData); });\n };\n return safe ? doRefresh() : this.lock.run(this, doRefresh);\n };\n Item.prototype.doRefresh = function (recursive, safe) {\n if (safe === void 0) { safe = false; }\n this.doesHaveChildren = this.context.dataSource.hasChildren(this.context.tree, this.element);\n this.height = this._getHeight();\n this.updateVisibility();\n this._onDidRefresh.fire(this);\n return this.refreshChildren(recursive, safe);\n };\n Item.prototype.updateVisibility = function () {\n this.setVisible(this._isVisible());\n };\n Item.prototype.refresh = function (recursive) {\n return this.doRefresh(recursive);\n };\n Item.prototype.getNavigator = function () {\n return new TreeNavigator(this);\n };\n Item.prototype.intersects = function (other) {\n return this.isAncestorOf(other) || other.isAncestorOf(this);\n };\n Item.prototype.isAncestorOf = function (item) {\n while (item) {\n if (item.id === this.id) {\n return true;\n }\n item = item.parent;\n }\n return false;\n };\n Item.prototype.addChild = function (item, afterItem) {\n if (afterItem === void 0) { afterItem = this.lastChild; }\n var isEmpty = this.firstChild === null;\n var atHead = afterItem === null;\n var atTail = afterItem === this.lastChild;\n if (isEmpty) {\n this.firstChild = this.lastChild = item;\n item.next = item.previous = null;\n }\n else if (atHead) {\n this.firstChild.previous = item;\n item.next = this.firstChild;\n item.previous = null;\n this.firstChild = item;\n }\n else if (atTail) {\n this.lastChild.next = item;\n item.next = null;\n item.previous = this.lastChild;\n this.lastChild = item;\n }\n else {\n item.previous = afterItem;\n item.next = afterItem.next;\n afterItem.next.previous = item;\n afterItem.next = item;\n }\n item.parent = this;\n item.depth = this.depth + 1;\n };\n Item.prototype.removeChild = function (item) {\n var isFirstChild = this.firstChild === item;\n var isLastChild = this.lastChild === item;\n if (isFirstChild && isLastChild) {\n this.firstChild = this.lastChild = null;\n }\n else if (isFirstChild) {\n item.next.previous = null;\n this.firstChild = item.next;\n }\n else if (isLastChild) {\n item.previous.next = null;\n this.lastChild = item.previous;\n }\n else {\n item.next.previous = item.previous;\n item.previous.next = item.next;\n }\n item.parent = null;\n item.depth = null;\n };\n Item.prototype.forEachChild = function (fn) {\n var child = this.firstChild, next;\n while (child) {\n next = child.next;\n fn(child);\n child = next;\n }\n };\n Item.prototype.mapEachChild = function (fn) {\n var result = [];\n this.forEachChild(function (child) {\n result.push(fn(child));\n });\n return result;\n };\n Item.prototype.sort = function (elements) {\n var _this = this;\n if (this.context.sorter) {\n return elements.sort(function (element, otherElement) {\n return _this.context.sorter.compare(_this.context.tree, element, otherElement);\n });\n }\n return elements;\n };\n /* protected */ Item.prototype._getHeight = function () {\n return this.context.renderer.getHeight(this.context.tree, this.element);\n };\n /* protected */ Item.prototype._isVisible = function () {\n return this.context.filter.isVisible(this.context.tree, this.element);\n };\n Item.prototype.isDisposed = function () {\n return this._isDisposed;\n };\n Item.prototype.dispose = function () {\n this.forEachChild(function (child) { return child.dispose(); });\n this.parent = null;\n this.previous = null;\n this.next = null;\n this.firstChild = null;\n this.lastChild = null;\n this._onDidDispose.fire(this);\n this.registry.deregister(this);\n this._onDidCreate.dispose();\n this._onDidReveal.dispose();\n this._onExpand.dispose();\n this._onDidExpand.dispose();\n this._onCollapse.dispose();\n this._onDidCollapse.dispose();\n this._onDidAddTrait.dispose();\n this._onDidRemoveTrait.dispose();\n this._onDidRefresh.dispose();\n this._onRefreshChildren.dispose();\n this._onDidRefreshChildren.dispose();\n this._onDidDispose.dispose();\n this._isDisposed = true;\n };\n return Item;\n}());\nexport { Item };\nvar RootItem = /** @class */ (function (_super) {\n __extends(RootItem, _super);\n function RootItem(id, registry, context, lock, element) {\n return _super.call(this, id, registry, context, lock, element) || this;\n }\n RootItem.prototype.isVisible = function () {\n return false;\n };\n RootItem.prototype.setVisible = function (value) {\n // no-op\n };\n RootItem.prototype.isExpanded = function () {\n return true;\n };\n /* protected */ RootItem.prototype._setExpanded = function (value) {\n // no-op\n };\n /* protected */ RootItem.prototype._getHeight = function () {\n return 0;\n };\n /* protected */ RootItem.prototype._isVisible = function () {\n return false;\n };\n return RootItem;\n}(Item));\nvar TreeNavigator = /** @class */ (function () {\n function TreeNavigator(item, subTreeOnly) {\n if (subTreeOnly === void 0) { subTreeOnly = true; }\n this.item = item;\n this.start = subTreeOnly ? item : null;\n }\n TreeNavigator.lastDescendantOf = function (item) {\n if (!item) {\n return null;\n }\n if (item instanceof RootItem) {\n return TreeNavigator.lastDescendantOf(item.lastChild);\n }\n if (!item.isVisible()) {\n return TreeNavigator.lastDescendantOf(item.previous);\n }\n if (!item.isExpanded() || item.lastChild === null) {\n return item;\n }\n return TreeNavigator.lastDescendantOf(item.lastChild);\n };\n TreeNavigator.prototype.current = function () {\n return this.item || null;\n };\n TreeNavigator.prototype.next = function () {\n if (this.item) {\n do {\n if ((this.item instanceof RootItem || (this.item.isVisible() && this.item.isExpanded())) && this.item.firstChild) {\n this.item = this.item.firstChild;\n }\n else if (this.item === this.start) {\n this.item = null;\n }\n else {\n // select next brother, next uncle, next great-uncle, etc...\n while (this.item && this.item !== this.start && !this.item.next) {\n this.item = this.item.parent;\n }\n if (this.item === this.start) {\n this.item = null;\n }\n this.item = !this.item ? null : this.item.next;\n }\n } while (this.item && !this.item.isVisible());\n }\n return this.item || null;\n };\n TreeNavigator.prototype.previous = function () {\n if (this.item) {\n do {\n var previous = TreeNavigator.lastDescendantOf(this.item.previous);\n if (previous) {\n this.item = previous;\n }\n else if (this.item.parent && this.item.parent !== this.start && this.item.parent.isVisible()) {\n this.item = this.item.parent;\n }\n else {\n this.item = null;\n }\n } while (this.item && !this.item.isVisible());\n }\n return this.item || null;\n };\n TreeNavigator.prototype.parent = function () {\n if (this.item) {\n var parent = this.item.parent;\n if (parent && parent !== this.start && parent.isVisible()) {\n this.item = parent;\n }\n else {\n this.item = null;\n }\n }\n return this.item || null;\n };\n TreeNavigator.prototype.first = function () {\n this.item = this.start;\n this.next();\n return this.item || null;\n };\n TreeNavigator.prototype.last = function () {\n return TreeNavigator.lastDescendantOf(this.start);\n };\n return TreeNavigator;\n}());\nexport { TreeNavigator };\nvar TreeModel = /** @class */ (function () {\n function TreeModel(context) {\n this._onSetInput = new Emitter();\n this.onSetInput = this._onSetInput.event;\n this._onDidSetInput = new Emitter();\n this.onDidSetInput = this._onDidSetInput.event;\n this._onRefresh = new Emitter();\n this.onRefresh = this._onRefresh.event;\n this._onDidRefresh = new Emitter();\n this.onDidRefresh = this._onDidRefresh.event;\n this._onDidHighlight = new Emitter();\n this.onDidHighlight = this._onDidHighlight.event;\n this._onDidSelect = new Emitter();\n this.onDidSelect = this._onDidSelect.event;\n this._onDidFocus = new Emitter();\n this.onDidFocus = this._onDidFocus.event;\n this._onDidRevealItem = new Relay();\n this.onDidRevealItem = this._onDidRevealItem.event;\n this._onExpandItem = new Relay();\n this.onExpandItem = this._onExpandItem.event;\n this._onDidExpandItem = new Relay();\n this.onDidExpandItem = this._onDidExpandItem.event;\n this._onCollapseItem = new Relay();\n this.onCollapseItem = this._onCollapseItem.event;\n this._onDidCollapseItem = new Relay();\n this.onDidCollapseItem = this._onDidCollapseItem.event;\n this._onDidAddTraitItem = new Relay();\n this.onDidAddTraitItem = this._onDidAddTraitItem.event;\n this._onDidRemoveTraitItem = new Relay();\n this.onDidRemoveTraitItem = this._onDidRemoveTraitItem.event;\n this._onDidRefreshItem = new Relay();\n this.onDidRefreshItem = this._onDidRefreshItem.event;\n this._onRefreshItemChildren = new Relay();\n this.onRefreshItemChildren = this._onRefreshItemChildren.event;\n this._onDidRefreshItemChildren = new Relay();\n this.onDidRefreshItemChildren = this._onDidRefreshItemChildren.event;\n this._onDidDisposeItem = new Relay();\n this.context = context;\n this.input = null;\n this.traitsToItems = {};\n }\n TreeModel.prototype.setInput = function (element) {\n var _this = this;\n var eventData = { item: this.input };\n this._onSetInput.fire(eventData);\n this.setSelection([]);\n this.setFocus();\n this.setHighlight();\n this.lock = new Lock();\n if (this.input) {\n this.input.dispose();\n }\n if (this.registry) {\n this.registry.dispose();\n this.registryDisposable.dispose();\n }\n this.registry = new ItemRegistry();\n this._onDidRevealItem.input = this.registry.onDidRevealItem;\n this._onExpandItem.input = this.registry.onExpandItem;\n this._onDidExpandItem.input = this.registry.onDidExpandItem;\n this._onCollapseItem.input = this.registry.onCollapseItem;\n this._onDidCollapseItem.input = this.registry.onDidCollapseItem;\n this._onDidAddTraitItem.input = this.registry.onDidAddTraitItem;\n this._onDidRemoveTraitItem.input = this.registry.onDidRemoveTraitItem;\n this._onDidRefreshItem.input = this.registry.onDidRefreshItem;\n this._onRefreshItemChildren.input = this.registry.onRefreshItemChildren;\n this._onDidRefreshItemChildren.input = this.registry.onDidRefreshItemChildren;\n this._onDidDisposeItem.input = this.registry.onDidDisposeItem;\n this.registryDisposable = this.registry\n .onDidDisposeItem(function (item) { return item.getAllTraits().forEach(function (trait) { return delete _this.traitsToItems[trait][item.id]; }); });\n var id = this.context.dataSource.getId(this.context.tree, element);\n this.input = new RootItem(id, this.registry, this.context, this.lock, element);\n eventData = { item: this.input };\n this._onDidSetInput.fire(eventData);\n return this.refresh(this.input);\n };\n TreeModel.prototype.getInput = function () {\n return this.input ? this.input.getElement() : null;\n };\n TreeModel.prototype.refresh = function (element, recursive) {\n var _this = this;\n if (element === void 0) { element = null; }\n if (recursive === void 0) { recursive = true; }\n var item = this.getItem(element);\n if (!item) {\n return WinJS.TPromise.as(null);\n }\n var eventData = { item: item, recursive: recursive };\n this._onRefresh.fire(eventData);\n return item.refresh(recursive).then(function () {\n _this._onDidRefresh.fire(eventData);\n });\n };\n TreeModel.prototype.expand = function (element) {\n var item = this.getItem(element);\n if (!item) {\n return WinJS.TPromise.as(false);\n }\n return item.expand();\n };\n TreeModel.prototype.collapse = function (element, recursive) {\n if (recursive === void 0) { recursive = false; }\n var item = this.getItem(element);\n if (!item) {\n return WinJS.TPromise.as(false);\n }\n return item.collapse(recursive);\n };\n TreeModel.prototype.toggleExpansion = function (element, recursive) {\n if (recursive === void 0) { recursive = false; }\n return this.isExpanded(element) ? this.collapse(element, recursive) : this.expand(element);\n };\n TreeModel.prototype.isExpanded = function (element) {\n var item = this.getItem(element);\n if (!item) {\n return false;\n }\n return item.isExpanded();\n };\n TreeModel.prototype.reveal = function (element, relativeTop) {\n var _this = this;\n if (relativeTop === void 0) { relativeTop = null; }\n return this.resolveUnknownParentChain(element).then(function (chain) {\n var result = WinJS.TPromise.as(null);\n chain.forEach(function (e) {\n result = result.then(function () { return _this.expand(e); });\n });\n return result;\n }).then(function () {\n var item = _this.getItem(element);\n if (item) {\n return item.reveal(relativeTop);\n }\n });\n };\n TreeModel.prototype.resolveUnknownParentChain = function (element) {\n var _this = this;\n return this.context.dataSource.getParent(this.context.tree, element).then(function (parent) {\n if (!parent) {\n return WinJS.TPromise.as([]);\n }\n return _this.resolveUnknownParentChain(parent).then(function (result) {\n result.push(parent);\n return result;\n });\n });\n };\n TreeModel.prototype.setHighlight = function (element, eventPayload) {\n this.setTraits('highlighted', element ? [element] : []);\n var eventData = { highlight: this.getHighlight(), payload: eventPayload };\n this._onDidHighlight.fire(eventData);\n };\n TreeModel.prototype.getHighlight = function (includeHidden) {\n var result = this.getElementsWithTrait('highlighted', includeHidden);\n return result.length === 0 ? null : result[0];\n };\n TreeModel.prototype.setSelection = function (elements, eventPayload) {\n this.setTraits('selected', elements);\n var eventData = { selection: this.getSelection(), payload: eventPayload };\n this._onDidSelect.fire(eventData);\n };\n TreeModel.prototype.getSelection = function (includeHidden) {\n return this.getElementsWithTrait('selected', includeHidden);\n };\n TreeModel.prototype.setFocus = function (element, eventPayload) {\n this.setTraits('focused', element ? [element] : []);\n var eventData = { focus: this.getFocus(), payload: eventPayload };\n this._onDidFocus.fire(eventData);\n };\n TreeModel.prototype.getFocus = function (includeHidden) {\n var result = this.getElementsWithTrait('focused', includeHidden);\n return result.length === 0 ? null : result[0];\n };\n TreeModel.prototype.focusNext = function (count, eventPayload) {\n if (count === void 0) { count = 1; }\n var item = this.getFocus() || this.input;\n var nextItem;\n var nav = this.getNavigator(item, false);\n for (var i = 0; i < count; i++) {\n nextItem = nav.next();\n if (!nextItem) {\n break;\n }\n item = nextItem;\n }\n this.setFocus(item, eventPayload);\n };\n TreeModel.prototype.focusPrevious = function (count, eventPayload) {\n if (count === void 0) { count = 1; }\n var item = this.getFocus() || this.input;\n var previousItem;\n var nav = this.getNavigator(item, false);\n for (var i = 0; i < count; i++) {\n previousItem = nav.previous();\n if (!previousItem) {\n break;\n }\n item = previousItem;\n }\n this.setFocus(item, eventPayload);\n };\n TreeModel.prototype.focusParent = function (eventPayload) {\n var item = this.getFocus() || this.input;\n var nav = this.getNavigator(item, false);\n var parent = nav.parent();\n if (parent) {\n this.setFocus(parent, eventPayload);\n }\n };\n TreeModel.prototype.focusFirstChild = function (eventPayload) {\n var item = this.getItem(this.getFocus() || this.input);\n var nav = this.getNavigator(item, false);\n var next = nav.next();\n var parent = nav.parent();\n if (parent === item) {\n this.setFocus(next, eventPayload);\n }\n };\n TreeModel.prototype.focusFirst = function (eventPayload, from) {\n this.focusNth(0, eventPayload, from);\n };\n TreeModel.prototype.focusNth = function (index, eventPayload, from) {\n var navItem = this.getParent(from);\n var nav = this.getNavigator(navItem);\n var item = nav.first();\n for (var i = 0; i < index; i++) {\n item = nav.next();\n }\n if (item) {\n this.setFocus(item, eventPayload);\n }\n };\n TreeModel.prototype.focusLast = function (eventPayload, from) {\n var navItem = this.getParent(from);\n var item;\n if (from) {\n item = navItem.lastChild;\n }\n else {\n var nav = this.getNavigator(navItem);\n item = nav.last();\n }\n if (item) {\n this.setFocus(item, eventPayload);\n }\n };\n TreeModel.prototype.getParent = function (from) {\n if (from) {\n var fromItem = this.getItem(from);\n if (fromItem && fromItem.parent) {\n return fromItem.parent;\n }\n }\n return this.getItem(this.input);\n };\n TreeModel.prototype.getNavigator = function (element, subTreeOnly) {\n if (element === void 0) { element = null; }\n if (subTreeOnly === void 0) { subTreeOnly = true; }\n return new TreeNavigator(this.getItem(element), subTreeOnly);\n };\n TreeModel.prototype.getItem = function (element) {\n if (element === void 0) { element = null; }\n if (element === null) {\n return this.input;\n }\n else if (element instanceof Item) {\n return element;\n }\n else if (typeof element === 'string') {\n return this.registry.getItem(element);\n }\n else {\n return this.registry.getItem(this.context.dataSource.getId(this.context.tree, element));\n }\n };\n TreeModel.prototype.removeTraits = function (trait, elements) {\n var items = this.traitsToItems[trait] || {};\n var item;\n var id;\n if (elements.length === 0) {\n for (id in items) {\n if (items.hasOwnProperty(id)) {\n item = items[id];\n item.removeTrait(trait);\n }\n }\n delete this.traitsToItems[trait];\n }\n else {\n for (var i = 0, len = elements.length; i < len; i++) {\n item = this.getItem(elements[i]);\n if (item) {\n item.removeTrait(trait);\n delete items[item.id];\n }\n }\n }\n };\n TreeModel.prototype.setTraits = function (trait, elements) {\n if (elements.length === 0) {\n this.removeTraits(trait, elements);\n }\n else {\n var items = {};\n var item;\n for (var i = 0, len = elements.length; i < len; i++) {\n item = this.getItem(elements[i]);\n if (item) {\n items[item.id] = item;\n }\n }\n var traitItems = this.traitsToItems[trait] || {};\n var itemsToRemoveTrait = [];\n var id;\n for (id in traitItems) {\n if (traitItems.hasOwnProperty(id)) {\n if (items.hasOwnProperty(id)) {\n delete items[id];\n }\n else {\n itemsToRemoveTrait.push(traitItems[id]);\n }\n }\n }\n for (var i = 0, len = itemsToRemoveTrait.length; i < len; i++) {\n item = itemsToRemoveTrait[i];\n item.removeTrait(trait);\n delete traitItems[item.id];\n }\n for (id in items) {\n if (items.hasOwnProperty(id)) {\n item = items[id];\n item.addTrait(trait);\n traitItems[id] = item;\n }\n }\n this.traitsToItems[trait] = traitItems;\n }\n };\n TreeModel.prototype.getElementsWithTrait = function (trait, includeHidden) {\n var elements = [];\n var items = this.traitsToItems[trait] || {};\n var id;\n for (id in items) {\n if (items.hasOwnProperty(id) && (items[id].isVisible() || includeHidden)) {\n elements.push(items[id].getElement());\n }\n }\n return elements;\n };\n TreeModel.prototype.dispose = function () {\n if (this.registry) {\n this.registry.dispose();\n this.registry = null;\n }\n this._onSetInput.dispose();\n this._onDidSetInput.dispose();\n this._onRefresh.dispose();\n this._onDidRefresh.dispose();\n this._onDidHighlight.dispose();\n this._onDidSelect.dispose();\n this._onDidFocus.dispose();\n this._onDidRevealItem.dispose();\n this._onExpandItem.dispose();\n this._onDidExpandItem.dispose();\n this._onCollapseItem.dispose();\n this._onDidCollapseItem.dispose();\n this._onDidAddTraitItem.dispose();\n this._onDidRemoveTraitItem.dispose();\n this._onDidRefreshItem.dispose();\n this._onRefreshItemChildren.dispose();\n this._onDidRefreshItemChildren.dispose();\n this._onDidDisposeItem.dispose();\n };\n return TreeModel;\n}());\nexport { TreeModel };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\n/**\n * Represents information about a specific difference between two sequences.\n */\nvar DiffChange = /** @class */ (function () {\n /**\n * Constructs a new DiffChange with the given sequence information\n * and content.\n */\n function DiffChange(originalStart, originalLength, modifiedStart, modifiedLength) {\n //Debug.Assert(originalLength > 0 || modifiedLength > 0, \"originalLength and modifiedLength cannot both be <= 0\");\n this.originalStart = originalStart;\n this.originalLength = originalLength;\n this.modifiedStart = modifiedStart;\n this.modifiedLength = modifiedLength;\n }\n /**\n * The end point (exclusive) of the change in the original sequence.\n */\n DiffChange.prototype.getOriginalEnd = function () {\n return this.originalStart + this.originalLength;\n };\n /**\n * The end point (exclusive) of the change in the modified sequence.\n */\n DiffChange.prototype.getModifiedEnd = function () {\n return this.modifiedStart + this.modifiedLength;\n };\n return DiffChange;\n}());\nexport { DiffChange };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport { DiffChange } from './diffChange';\nfunction createStringSequence(a) {\n return {\n getLength: function () { return a.length; },\n getElementAtIndex: function (pos) { return a.charCodeAt(pos); }\n };\n}\nexport function stringDiff(original, modified, pretty) {\n return new LcsDiff(createStringSequence(original), createStringSequence(modified)).ComputeDiff(pretty);\n}\n//\n// The code below has been ported from a C# implementation in VS\n//\nvar Debug = /** @class */ (function () {\n function Debug() {\n }\n Debug.Assert = function (condition, message) {\n if (!condition) {\n throw new Error(message);\n }\n };\n return Debug;\n}());\nexport { Debug };\nvar MyArray = /** @class */ (function () {\n function MyArray() {\n }\n /**\n * Copies a range of elements from an Array starting at the specified source index and pastes\n * them to another Array starting at the specified destination index. The length and the indexes\n * are specified as 64-bit integers.\n * sourceArray:\n *\t\tThe Array that contains the data to copy.\n * sourceIndex:\n *\t\tA 64-bit integer that represents the index in the sourceArray at which copying begins.\n * destinationArray:\n *\t\tThe Array that receives the data.\n * destinationIndex:\n *\t\tA 64-bit integer that represents the index in the destinationArray at which storing begins.\n * length:\n *\t\tA 64-bit integer that represents the number of elements to copy.\n */\n MyArray.Copy = function (sourceArray, sourceIndex, destinationArray, destinationIndex, length) {\n for (var i = 0; i < length; i++) {\n destinationArray[destinationIndex + i] = sourceArray[sourceIndex + i];\n }\n };\n return MyArray;\n}());\nexport { MyArray };\n//*****************************************************************************\n// LcsDiff.cs\n//\n// An implementation of the difference algorithm described in\n// \"An O(ND) Difference Algorithm and its variations\" by Eugene W. Myers\n//\n// Copyright (C) 2008 Microsoft Corporation @minifier_do_not_preserve\n//*****************************************************************************\n// Our total memory usage for storing history is (worst-case):\n// 2 * [(MaxDifferencesHistory + 1) * (MaxDifferencesHistory + 1) - 1] * sizeof(int)\n// 2 * [1448*1448 - 1] * 4 = 16773624 = 16MB\nvar MaxDifferencesHistory = 1447;\n//let MaxDifferencesHistory = 100;\n/**\n * A utility class which helps to create the set of DiffChanges from\n * a difference operation. This class accepts original DiffElements and\n * modified DiffElements that are involved in a particular change. The\n * MarktNextChange() method can be called to mark the separation between\n * distinct changes. At the end, the Changes property can be called to retrieve\n * the constructed changes.\n */\nvar DiffChangeHelper = /** @class */ (function () {\n /**\n * Constructs a new DiffChangeHelper for the given DiffSequences.\n */\n function DiffChangeHelper() {\n this.m_changes = [];\n this.m_originalStart = Number.MAX_VALUE;\n this.m_modifiedStart = Number.MAX_VALUE;\n this.m_originalCount = 0;\n this.m_modifiedCount = 0;\n }\n /**\n * Marks the beginning of the next change in the set of differences.\n */\n DiffChangeHelper.prototype.MarkNextChange = function () {\n // Only add to the list if there is something to add\n if (this.m_originalCount > 0 || this.m_modifiedCount > 0) {\n // Add the new change to our list\n this.m_changes.push(new DiffChange(this.m_originalStart, this.m_originalCount, this.m_modifiedStart, this.m_modifiedCount));\n }\n // Reset for the next change\n this.m_originalCount = 0;\n this.m_modifiedCount = 0;\n this.m_originalStart = Number.MAX_VALUE;\n this.m_modifiedStart = Number.MAX_VALUE;\n };\n /**\n * Adds the original element at the given position to the elements\n * affected by the current change. The modified index gives context\n * to the change position with respect to the original sequence.\n * @param originalIndex The index of the original element to add.\n * @param modifiedIndex The index of the modified element that provides corresponding position in the modified sequence.\n */\n DiffChangeHelper.prototype.AddOriginalElement = function (originalIndex, modifiedIndex) {\n // The 'true' start index is the smallest of the ones we've seen\n this.m_originalStart = Math.min(this.m_originalStart, originalIndex);\n this.m_modifiedStart = Math.min(this.m_modifiedStart, modifiedIndex);\n this.m_originalCount++;\n };\n /**\n * Adds the modified element at the given position to the elements\n * affected by the current change. The original index gives context\n * to the change position with respect to the modified sequence.\n * @param originalIndex The index of the original element that provides corresponding position in the original sequence.\n * @param modifiedIndex The index of the modified element to add.\n */\n DiffChangeHelper.prototype.AddModifiedElement = function (originalIndex, modifiedIndex) {\n // The 'true' start index is the smallest of the ones we've seen\n this.m_originalStart = Math.min(this.m_originalStart, originalIndex);\n this.m_modifiedStart = Math.min(this.m_modifiedStart, modifiedIndex);\n this.m_modifiedCount++;\n };\n /**\n * Retrieves all of the changes marked by the class.\n */\n DiffChangeHelper.prototype.getChanges = function () {\n if (this.m_originalCount > 0 || this.m_modifiedCount > 0) {\n // Finish up on whatever is left\n this.MarkNextChange();\n }\n return this.m_changes;\n };\n /**\n * Retrieves all of the changes marked by the class in the reverse order\n */\n DiffChangeHelper.prototype.getReverseChanges = function () {\n if (this.m_originalCount > 0 || this.m_modifiedCount > 0) {\n // Finish up on whatever is left\n this.MarkNextChange();\n }\n this.m_changes.reverse();\n return this.m_changes;\n };\n return DiffChangeHelper;\n}());\n/**\n * An implementation of the difference algorithm described in\n * \"An O(ND) Difference Algorithm and its variations\" by Eugene W. Myers\n */\nvar LcsDiff = /** @class */ (function () {\n /**\n * Constructs the DiffFinder\n */\n function LcsDiff(originalSequence, newSequence, continueProcessingPredicate) {\n if (continueProcessingPredicate === void 0) { continueProcessingPredicate = null; }\n this.OriginalSequence = originalSequence;\n this.ModifiedSequence = newSequence;\n this.ContinueProcessingPredicate = continueProcessingPredicate;\n this.m_forwardHistory = [];\n this.m_reverseHistory = [];\n }\n LcsDiff.prototype.ElementsAreEqual = function (originalIndex, newIndex) {\n return (this.OriginalSequence.getElementAtIndex(originalIndex) === this.ModifiedSequence.getElementAtIndex(newIndex));\n };\n LcsDiff.prototype.OriginalElementsAreEqual = function (index1, index2) {\n return (this.OriginalSequence.getElementAtIndex(index1) === this.OriginalSequence.getElementAtIndex(index2));\n };\n LcsDiff.prototype.ModifiedElementsAreEqual = function (index1, index2) {\n return (this.ModifiedSequence.getElementAtIndex(index1) === this.ModifiedSequence.getElementAtIndex(index2));\n };\n LcsDiff.prototype.ComputeDiff = function (pretty) {\n return this._ComputeDiff(0, this.OriginalSequence.getLength() - 1, 0, this.ModifiedSequence.getLength() - 1, pretty);\n };\n /**\n * Computes the differences between the original and modified input\n * sequences on the bounded range.\n * @returns An array of the differences between the two input sequences.\n */\n LcsDiff.prototype._ComputeDiff = function (originalStart, originalEnd, modifiedStart, modifiedEnd, pretty) {\n var quitEarlyArr = [false];\n var changes = this.ComputeDiffRecursive(originalStart, originalEnd, modifiedStart, modifiedEnd, quitEarlyArr);\n if (pretty) {\n // We have to clean up the computed diff to be more intuitive\n // but it turns out this cannot be done correctly until the entire set\n // of diffs have been computed\n return this.ShiftChanges(changes);\n }\n return changes;\n };\n /**\n * Private helper method which computes the differences on the bounded range\n * recursively.\n * @returns An array of the differences between the two input sequences.\n */\n LcsDiff.prototype.ComputeDiffRecursive = function (originalStart, originalEnd, modifiedStart, modifiedEnd, quitEarlyArr) {\n quitEarlyArr[0] = false;\n // Find the start of the differences\n while (originalStart <= originalEnd && modifiedStart <= modifiedEnd && this.ElementsAreEqual(originalStart, modifiedStart)) {\n originalStart++;\n modifiedStart++;\n }\n // Find the end of the differences\n while (originalEnd >= originalStart && modifiedEnd >= modifiedStart && this.ElementsAreEqual(originalEnd, modifiedEnd)) {\n originalEnd--;\n modifiedEnd--;\n }\n // In the special case where we either have all insertions or all deletions or the sequences are identical\n if (originalStart > originalEnd || modifiedStart > modifiedEnd) {\n var changes = void 0;\n if (modifiedStart <= modifiedEnd) {\n Debug.Assert(originalStart === originalEnd + 1, 'originalStart should only be one more than originalEnd');\n // All insertions\n changes = [\n new DiffChange(originalStart, 0, modifiedStart, modifiedEnd - modifiedStart + 1)\n ];\n }\n else if (originalStart <= originalEnd) {\n Debug.Assert(modifiedStart === modifiedEnd + 1, 'modifiedStart should only be one more than modifiedEnd');\n // All deletions\n changes = [\n new DiffChange(originalStart, originalEnd - originalStart + 1, modifiedStart, 0)\n ];\n }\n else {\n Debug.Assert(originalStart === originalEnd + 1, 'originalStart should only be one more than originalEnd');\n Debug.Assert(modifiedStart === modifiedEnd + 1, 'modifiedStart should only be one more than modifiedEnd');\n // Identical sequences - No differences\n changes = [];\n }\n return changes;\n }\n // This problem can be solved using the Divide-And-Conquer technique.\n var midOriginalArr = [0], midModifiedArr = [0];\n var result = this.ComputeRecursionPoint(originalStart, originalEnd, modifiedStart, modifiedEnd, midOriginalArr, midModifiedArr, quitEarlyArr);\n var midOriginal = midOriginalArr[0];\n var midModified = midModifiedArr[0];\n if (result !== null) {\n // Result is not-null when there was enough memory to compute the changes while\n // searching for the recursion point\n return result;\n }\n else if (!quitEarlyArr[0]) {\n // We can break the problem down recursively by finding the changes in the\n // First Half: (originalStart, modifiedStart) to (midOriginal, midModified)\n // Second Half: (midOriginal + 1, minModified + 1) to (originalEnd, modifiedEnd)\n // NOTE: ComputeDiff() is inclusive, therefore the second range starts on the next point\n var leftChanges = this.ComputeDiffRecursive(originalStart, midOriginal, modifiedStart, midModified, quitEarlyArr);\n var rightChanges = [];\n if (!quitEarlyArr[0]) {\n rightChanges = this.ComputeDiffRecursive(midOriginal + 1, originalEnd, midModified + 1, modifiedEnd, quitEarlyArr);\n }\n else {\n // We did't have time to finish the first half, so we don't have time to compute this half.\n // Consider the entire rest of the sequence different.\n rightChanges = [\n new DiffChange(midOriginal + 1, originalEnd - (midOriginal + 1) + 1, midModified + 1, modifiedEnd - (midModified + 1) + 1)\n ];\n }\n return this.ConcatenateChanges(leftChanges, rightChanges);\n }\n // If we hit here, we quit early, and so can't return anything meaningful\n return [\n new DiffChange(originalStart, originalEnd - originalStart + 1, modifiedStart, modifiedEnd - modifiedStart + 1)\n ];\n };\n LcsDiff.prototype.WALKTRACE = function (diagonalForwardBase, diagonalForwardStart, diagonalForwardEnd, diagonalForwardOffset, diagonalReverseBase, diagonalReverseStart, diagonalReverseEnd, diagonalReverseOffset, forwardPoints, reversePoints, originalIndex, originalEnd, midOriginalArr, modifiedIndex, modifiedEnd, midModifiedArr, deltaIsEven, quitEarlyArr) {\n var forwardChanges = null, reverseChanges = null;\n // First, walk backward through the forward diagonals history\n var changeHelper = new DiffChangeHelper();\n var diagonalMin = diagonalForwardStart;\n var diagonalMax = diagonalForwardEnd;\n var diagonalRelative = (midOriginalArr[0] - midModifiedArr[0]) - diagonalForwardOffset;\n var lastOriginalIndex = Number.MIN_VALUE;\n var historyIndex = this.m_forwardHistory.length - 1;\n var diagonal;\n do {\n // Get the diagonal index from the relative diagonal number\n diagonal = diagonalRelative + diagonalForwardBase;\n // Figure out where we came from\n if (diagonal === diagonalMin || (diagonal < diagonalMax && forwardPoints[diagonal - 1] < forwardPoints[diagonal + 1])) {\n // Vertical line (the element is an insert)\n originalIndex = forwardPoints[diagonal + 1];\n modifiedIndex = originalIndex - diagonalRelative - diagonalForwardOffset;\n if (originalIndex < lastOriginalIndex) {\n changeHelper.MarkNextChange();\n }\n lastOriginalIndex = originalIndex;\n changeHelper.AddModifiedElement(originalIndex + 1, modifiedIndex);\n diagonalRelative = (diagonal + 1) - diagonalForwardBase; //Setup for the next iteration\n }\n else {\n // Horizontal line (the element is a deletion)\n originalIndex = forwardPoints[diagonal - 1] + 1;\n modifiedIndex = originalIndex - diagonalRelative - diagonalForwardOffset;\n if (originalIndex < lastOriginalIndex) {\n changeHelper.MarkNextChange();\n }\n lastOriginalIndex = originalIndex - 1;\n changeHelper.AddOriginalElement(originalIndex, modifiedIndex + 1);\n diagonalRelative = (diagonal - 1) - diagonalForwardBase; //Setup for the next iteration\n }\n if (historyIndex >= 0) {\n forwardPoints = this.m_forwardHistory[historyIndex];\n diagonalForwardBase = forwardPoints[0]; //We stored this in the first spot\n diagonalMin = 1;\n diagonalMax = forwardPoints.length - 1;\n }\n } while (--historyIndex >= -1);\n // Ironically, we get the forward changes as the reverse of the\n // order we added them since we technically added them backwards\n forwardChanges = changeHelper.getReverseChanges();\n if (quitEarlyArr[0]) {\n // TODO: Calculate a partial from the reverse diagonals.\n // For now, just assume everything after the midOriginal/midModified point is a diff\n var originalStartPoint = midOriginalArr[0] + 1;\n var modifiedStartPoint = midModifiedArr[0] + 1;\n if (forwardChanges !== null && forwardChanges.length > 0) {\n var lastForwardChange = forwardChanges[forwardChanges.length - 1];\n originalStartPoint = Math.max(originalStartPoint, lastForwardChange.getOriginalEnd());\n modifiedStartPoint = Math.max(modifiedStartPoint, lastForwardChange.getModifiedEnd());\n }\n reverseChanges = [\n new DiffChange(originalStartPoint, originalEnd - originalStartPoint + 1, modifiedStartPoint, modifiedEnd - modifiedStartPoint + 1)\n ];\n }\n else {\n // Now walk backward through the reverse diagonals history\n changeHelper = new DiffChangeHelper();\n diagonalMin = diagonalReverseStart;\n diagonalMax = diagonalReverseEnd;\n diagonalRelative = (midOriginalArr[0] - midModifiedArr[0]) - diagonalReverseOffset;\n lastOriginalIndex = Number.MAX_VALUE;\n historyIndex = (deltaIsEven) ? this.m_reverseHistory.length - 1 : this.m_reverseHistory.length - 2;\n do {\n // Get the diagonal index from the relative diagonal number\n diagonal = diagonalRelative + diagonalReverseBase;\n // Figure out where we came from\n if (diagonal === diagonalMin || (diagonal < diagonalMax && reversePoints[diagonal - 1] >= reversePoints[diagonal + 1])) {\n // Horizontal line (the element is a deletion))\n originalIndex = reversePoints[diagonal + 1] - 1;\n modifiedIndex = originalIndex - diagonalRelative - diagonalReverseOffset;\n if (originalIndex > lastOriginalIndex) {\n changeHelper.MarkNextChange();\n }\n lastOriginalIndex = originalIndex + 1;\n changeHelper.AddOriginalElement(originalIndex + 1, modifiedIndex + 1);\n diagonalRelative = (diagonal + 1) - diagonalReverseBase; //Setup for the next iteration\n }\n else {\n // Vertical line (the element is an insertion)\n originalIndex = reversePoints[diagonal - 1];\n modifiedIndex = originalIndex - diagonalRelative - diagonalReverseOffset;\n if (originalIndex > lastOriginalIndex) {\n changeHelper.MarkNextChange();\n }\n lastOriginalIndex = originalIndex;\n changeHelper.AddModifiedElement(originalIndex + 1, modifiedIndex + 1);\n diagonalRelative = (diagonal - 1) - diagonalReverseBase; //Setup for the next iteration\n }\n if (historyIndex >= 0) {\n reversePoints = this.m_reverseHistory[historyIndex];\n diagonalReverseBase = reversePoints[0]; //We stored this in the first spot\n diagonalMin = 1;\n diagonalMax = reversePoints.length - 1;\n }\n } while (--historyIndex >= -1);\n // There are cases where the reverse history will find diffs that\n // are correct, but not intuitive, so we need shift them.\n reverseChanges = changeHelper.getChanges();\n }\n return this.ConcatenateChanges(forwardChanges, reverseChanges);\n };\n /**\n * Given the range to compute the diff on, this method finds the point:\n * (midOriginal, midModified)\n * that exists in the middle of the LCS of the two sequences and\n * is the point at which the LCS problem may be broken down recursively.\n * This method will try to keep the LCS trace in memory. If the LCS recursion\n * point is calculated and the full trace is available in memory, then this method\n * will return the change list.\n * @param originalStart The start bound of the original sequence range\n * @param originalEnd The end bound of the original sequence range\n * @param modifiedStart The start bound of the modified sequence range\n * @param modifiedEnd The end bound of the modified sequence range\n * @param midOriginal The middle point of the original sequence range\n * @param midModified The middle point of the modified sequence range\n * @returns The diff changes, if available, otherwise null\n */\n LcsDiff.prototype.ComputeRecursionPoint = function (originalStart, originalEnd, modifiedStart, modifiedEnd, midOriginalArr, midModifiedArr, quitEarlyArr) {\n var originalIndex, modifiedIndex;\n var diagonalForwardStart = 0, diagonalForwardEnd = 0;\n var diagonalReverseStart = 0, diagonalReverseEnd = 0;\n var numDifferences;\n // To traverse the edit graph and produce the proper LCS, our actual\n // start position is just outside the given boundary\n originalStart--;\n modifiedStart--;\n // We set these up to make the compiler happy, but they will\n // be replaced before we return with the actual recursion point\n midOriginalArr[0] = 0;\n midModifiedArr[0] = 0;\n // Clear out the history\n this.m_forwardHistory = [];\n this.m_reverseHistory = [];\n // Each cell in the two arrays corresponds to a diagonal in the edit graph.\n // The integer value in the cell represents the originalIndex of the furthest\n // reaching point found so far that ends in that diagonal.\n // The modifiedIndex can be computed mathematically from the originalIndex and the diagonal number.\n var maxDifferences = (originalEnd - originalStart) + (modifiedEnd - modifiedStart);\n var numDiagonals = maxDifferences + 1;\n var forwardPoints = new Array(numDiagonals);\n var reversePoints = new Array(numDiagonals);\n // diagonalForwardBase: Index into forwardPoints of the diagonal which passes through (originalStart, modifiedStart)\n // diagonalReverseBase: Index into reversePoints of the diagonal which passes through (originalEnd, modifiedEnd)\n var diagonalForwardBase = (modifiedEnd - modifiedStart);\n var diagonalReverseBase = (originalEnd - originalStart);\n // diagonalForwardOffset: Geometric offset which allows modifiedIndex to be computed from originalIndex and the\n // diagonal number (relative to diagonalForwardBase)\n // diagonalReverseOffset: Geometric offset which allows modifiedIndex to be computed from originalIndex and the\n // diagonal number (relative to diagonalReverseBase)\n var diagonalForwardOffset = (originalStart - modifiedStart);\n var diagonalReverseOffset = (originalEnd - modifiedEnd);\n // delta: The difference between the end diagonal and the start diagonal. This is used to relate diagonal numbers\n // relative to the start diagonal with diagonal numbers relative to the end diagonal.\n // The Even/Oddn-ness of this delta is important for determining when we should check for overlap\n var delta = diagonalReverseBase - diagonalForwardBase;\n var deltaIsEven = (delta % 2 === 0);\n // Here we set up the start and end points as the furthest points found so far\n // in both the forward and reverse directions, respectively\n forwardPoints[diagonalForwardBase] = originalStart;\n reversePoints[diagonalReverseBase] = originalEnd;\n // Remember if we quit early, and thus need to do a best-effort result instead of a real result.\n quitEarlyArr[0] = false;\n // A couple of points:\n // --With this method, we iterate on the number of differences between the two sequences.\n // The more differences there actually are, the longer this will take.\n // --Also, as the number of differences increases, we have to search on diagonals further\n // away from the reference diagonal (which is diagonalForwardBase for forward, diagonalReverseBase for reverse).\n // --We extend on even diagonals (relative to the reference diagonal) only when numDifferences\n // is even and odd diagonals only when numDifferences is odd.\n var diagonal, tempOriginalIndex;\n for (numDifferences = 1; numDifferences <= (maxDifferences / 2) + 1; numDifferences++) {\n var furthestOriginalIndex = 0;\n var furthestModifiedIndex = 0;\n // Run the algorithm in the forward direction\n diagonalForwardStart = this.ClipDiagonalBound(diagonalForwardBase - numDifferences, numDifferences, diagonalForwardBase, numDiagonals);\n diagonalForwardEnd = this.ClipDiagonalBound(diagonalForwardBase + numDifferences, numDifferences, diagonalForwardBase, numDiagonals);\n for (diagonal = diagonalForwardStart; diagonal <= diagonalForwardEnd; diagonal += 2) {\n // STEP 1: We extend the furthest reaching point in the present diagonal\n // by looking at the diagonals above and below and picking the one whose point\n // is further away from the start point (originalStart, modifiedStart)\n if (diagonal === diagonalForwardStart || (diagonal < diagonalForwardEnd && forwardPoints[diagonal - 1] < forwardPoints[diagonal + 1])) {\n originalIndex = forwardPoints[diagonal + 1];\n }\n else {\n originalIndex = forwardPoints[diagonal - 1] + 1;\n }\n modifiedIndex = originalIndex - (diagonal - diagonalForwardBase) - diagonalForwardOffset;\n // Save the current originalIndex so we can test for false overlap in step 3\n tempOriginalIndex = originalIndex;\n // STEP 2: We can continue to extend the furthest reaching point in the present diagonal\n // so long as the elements are equal.\n while (originalIndex < originalEnd && modifiedIndex < modifiedEnd && this.ElementsAreEqual(originalIndex + 1, modifiedIndex + 1)) {\n originalIndex++;\n modifiedIndex++;\n }\n forwardPoints[diagonal] = originalIndex;\n if (originalIndex + modifiedIndex > furthestOriginalIndex + furthestModifiedIndex) {\n furthestOriginalIndex = originalIndex;\n furthestModifiedIndex = modifiedIndex;\n }\n // STEP 3: If delta is odd (overlap first happens on forward when delta is odd)\n // and diagonal is in the range of reverse diagonals computed for numDifferences-1\n // (the previous iteration; we haven't computed reverse diagonals for numDifferences yet)\n // then check for overlap.\n if (!deltaIsEven && Math.abs(diagonal - diagonalReverseBase) <= (numDifferences - 1)) {\n if (originalIndex >= reversePoints[diagonal]) {\n midOriginalArr[0] = originalIndex;\n midModifiedArr[0] = modifiedIndex;\n if (tempOriginalIndex <= reversePoints[diagonal] && MaxDifferencesHistory > 0 && numDifferences <= (MaxDifferencesHistory + 1)) {\n // BINGO! We overlapped, and we have the full trace in memory!\n return this.WALKTRACE(diagonalForwardBase, diagonalForwardStart, diagonalForwardEnd, diagonalForwardOffset, diagonalReverseBase, diagonalReverseStart, diagonalReverseEnd, diagonalReverseOffset, forwardPoints, reversePoints, originalIndex, originalEnd, midOriginalArr, modifiedIndex, modifiedEnd, midModifiedArr, deltaIsEven, quitEarlyArr);\n }\n else {\n // Either false overlap, or we didn't have enough memory for the full trace\n // Just return the recursion point\n return null;\n }\n }\n }\n }\n // Check to see if we should be quitting early, before moving on to the next iteration.\n var matchLengthOfLongest = ((furthestOriginalIndex - originalStart) + (furthestModifiedIndex - modifiedStart) - numDifferences) / 2;\n if (this.ContinueProcessingPredicate !== null && !this.ContinueProcessingPredicate(furthestOriginalIndex, this.OriginalSequence, matchLengthOfLongest)) {\n // We can't finish, so skip ahead to generating a result from what we have.\n quitEarlyArr[0] = true;\n // Use the furthest distance we got in the forward direction.\n midOriginalArr[0] = furthestOriginalIndex;\n midModifiedArr[0] = furthestModifiedIndex;\n if (matchLengthOfLongest > 0 && MaxDifferencesHistory > 0 && numDifferences <= (MaxDifferencesHistory + 1)) {\n // Enough of the history is in memory to walk it backwards\n return this.WALKTRACE(diagonalForwardBase, diagonalForwardStart, diagonalForwardEnd, diagonalForwardOffset, diagonalReverseBase, diagonalReverseStart, diagonalReverseEnd, diagonalReverseOffset, forwardPoints, reversePoints, originalIndex, originalEnd, midOriginalArr, modifiedIndex, modifiedEnd, midModifiedArr, deltaIsEven, quitEarlyArr);\n }\n else {\n // We didn't actually remember enough of the history.\n //Since we are quiting the diff early, we need to shift back the originalStart and modified start\n //back into the boundary limits since we decremented their value above beyond the boundary limit.\n originalStart++;\n modifiedStart++;\n return [\n new DiffChange(originalStart, originalEnd - originalStart + 1, modifiedStart, modifiedEnd - modifiedStart + 1)\n ];\n }\n }\n // Run the algorithm in the reverse direction\n diagonalReverseStart = this.ClipDiagonalBound(diagonalReverseBase - numDifferences, numDifferences, diagonalReverseBase, numDiagonals);\n diagonalReverseEnd = this.ClipDiagonalBound(diagonalReverseBase + numDifferences, numDifferences, diagonalReverseBase, numDiagonals);\n for (diagonal = diagonalReverseStart; diagonal <= diagonalReverseEnd; diagonal += 2) {\n // STEP 1: We extend the furthest reaching point in the present diagonal\n // by looking at the diagonals above and below and picking the one whose point\n // is further away from the start point (originalEnd, modifiedEnd)\n if (diagonal === diagonalReverseStart || (diagonal < diagonalReverseEnd && reversePoints[diagonal - 1] >= reversePoints[diagonal + 1])) {\n originalIndex = reversePoints[diagonal + 1] - 1;\n }\n else {\n originalIndex = reversePoints[diagonal - 1];\n }\n modifiedIndex = originalIndex - (diagonal - diagonalReverseBase) - diagonalReverseOffset;\n // Save the current originalIndex so we can test for false overlap\n tempOriginalIndex = originalIndex;\n // STEP 2: We can continue to extend the furthest reaching point in the present diagonal\n // as long as the elements are equal.\n while (originalIndex > originalStart && modifiedIndex > modifiedStart && this.ElementsAreEqual(originalIndex, modifiedIndex)) {\n originalIndex--;\n modifiedIndex--;\n }\n reversePoints[diagonal] = originalIndex;\n // STEP 4: If delta is even (overlap first happens on reverse when delta is even)\n // and diagonal is in the range of forward diagonals computed for numDifferences\n // then check for overlap.\n if (deltaIsEven && Math.abs(diagonal - diagonalForwardBase) <= numDifferences) {\n if (originalIndex <= forwardPoints[diagonal]) {\n midOriginalArr[0] = originalIndex;\n midModifiedArr[0] = modifiedIndex;\n if (tempOriginalIndex >= forwardPoints[diagonal] && MaxDifferencesHistory > 0 && numDifferences <= (MaxDifferencesHistory + 1)) {\n // BINGO! We overlapped, and we have the full trace in memory!\n return this.WALKTRACE(diagonalForwardBase, diagonalForwardStart, diagonalForwardEnd, diagonalForwardOffset, diagonalReverseBase, diagonalReverseStart, diagonalReverseEnd, diagonalReverseOffset, forwardPoints, reversePoints, originalIndex, originalEnd, midOriginalArr, modifiedIndex, modifiedEnd, midModifiedArr, deltaIsEven, quitEarlyArr);\n }\n else {\n // Either false overlap, or we didn't have enough memory for the full trace\n // Just return the recursion point\n return null;\n }\n }\n }\n }\n // Save current vectors to history before the next iteration\n if (numDifferences <= MaxDifferencesHistory) {\n // We are allocating space for one extra int, which we fill with\n // the index of the diagonal base index\n var temp = new Array(diagonalForwardEnd - diagonalForwardStart + 2);\n temp[0] = diagonalForwardBase - diagonalForwardStart + 1;\n MyArray.Copy(forwardPoints, diagonalForwardStart, temp, 1, diagonalForwardEnd - diagonalForwardStart + 1);\n this.m_forwardHistory.push(temp);\n temp = new Array(diagonalReverseEnd - diagonalReverseStart + 2);\n temp[0] = diagonalReverseBase - diagonalReverseStart + 1;\n MyArray.Copy(reversePoints, diagonalReverseStart, temp, 1, diagonalReverseEnd - diagonalReverseStart + 1);\n this.m_reverseHistory.push(temp);\n }\n }\n // If we got here, then we have the full trace in history. We just have to convert it to a change list\n // NOTE: This part is a bit messy\n return this.WALKTRACE(diagonalForwardBase, diagonalForwardStart, diagonalForwardEnd, diagonalForwardOffset, diagonalReverseBase, diagonalReverseStart, diagonalReverseEnd, diagonalReverseOffset, forwardPoints, reversePoints, originalIndex, originalEnd, midOriginalArr, modifiedIndex, modifiedEnd, midModifiedArr, deltaIsEven, quitEarlyArr);\n };\n /**\n * Shifts the given changes to provide a more intuitive diff.\n * While the first element in a diff matches the first element after the diff,\n * we shift the diff down.\n *\n * @param changes The list of changes to shift\n * @returns The shifted changes\n */\n LcsDiff.prototype.ShiftChanges = function (changes) {\n var mergedDiffs;\n do {\n mergedDiffs = false;\n // Shift all the changes down first\n for (var i = 0; i < changes.length; i++) {\n var change = changes[i];\n var originalStop = (i < changes.length - 1) ? changes[i + 1].originalStart : this.OriginalSequence.getLength();\n var modifiedStop = (i < changes.length - 1) ? changes[i + 1].modifiedStart : this.ModifiedSequence.getLength();\n var checkOriginal = change.originalLength > 0;\n var checkModified = change.modifiedLength > 0;\n while (change.originalStart + change.originalLength < originalStop &&\n change.modifiedStart + change.modifiedLength < modifiedStop &&\n (!checkOriginal || this.OriginalElementsAreEqual(change.originalStart, change.originalStart + change.originalLength)) &&\n (!checkModified || this.ModifiedElementsAreEqual(change.modifiedStart, change.modifiedStart + change.modifiedLength))) {\n change.originalStart++;\n change.modifiedStart++;\n }\n }\n // Build up the new list (we have to build a new list because we\n // might have changes we can merge together now)\n var result = new Array();\n var mergedChangeArr = [null];\n for (var i = 0; i < changes.length; i++) {\n if (i < changes.length - 1 && this.ChangesOverlap(changes[i], changes[i + 1], mergedChangeArr)) {\n mergedDiffs = true;\n result.push(mergedChangeArr[0]);\n i++;\n }\n else {\n result.push(changes[i]);\n }\n }\n changes = result;\n } while (mergedDiffs);\n // Shift changes back up until we hit empty or whitespace-only lines\n for (var i = changes.length - 1; i >= 0; i--) {\n var change = changes[i];\n var originalStop = 0;\n var modifiedStop = 0;\n if (i > 0) {\n var prevChange = changes[i - 1];\n if (prevChange.originalLength > 0) {\n originalStop = prevChange.originalStart + prevChange.originalLength;\n }\n if (prevChange.modifiedLength > 0) {\n modifiedStop = prevChange.modifiedStart + prevChange.modifiedLength;\n }\n }\n var checkOriginal = change.originalLength > 0;\n var checkModified = change.modifiedLength > 0;\n var bestDelta = 0;\n var bestScore = this._boundaryScore(change.originalStart, change.originalLength, change.modifiedStart, change.modifiedLength);\n for (var delta = 1;; delta++) {\n var originalStart = change.originalStart - delta;\n var modifiedStart = change.modifiedStart - delta;\n if (originalStart < originalStop || modifiedStart < modifiedStop) {\n break;\n }\n if (checkOriginal && !this.OriginalElementsAreEqual(originalStart, originalStart + change.originalLength)) {\n break;\n }\n if (checkModified && !this.ModifiedElementsAreEqual(modifiedStart, modifiedStart + change.modifiedLength)) {\n break;\n }\n var score = this._boundaryScore(originalStart, change.originalLength, modifiedStart, change.modifiedLength);\n if (score > bestScore) {\n bestScore = score;\n bestDelta = delta;\n }\n }\n change.originalStart -= bestDelta;\n change.modifiedStart -= bestDelta;\n }\n return changes;\n };\n LcsDiff.prototype._OriginalIsBoundary = function (index) {\n if (index <= 0 || index >= this.OriginalSequence.getLength() - 1) {\n return true;\n }\n var element = this.OriginalSequence.getElementAtIndex(index);\n return (typeof element === 'string' && /^\\s*$/.test(element));\n };\n LcsDiff.prototype._OriginalRegionIsBoundary = function (originalStart, originalLength) {\n if (this._OriginalIsBoundary(originalStart) || this._OriginalIsBoundary(originalStart - 1)) {\n return true;\n }\n if (originalLength > 0) {\n var originalEnd = originalStart + originalLength;\n if (this._OriginalIsBoundary(originalEnd - 1) || this._OriginalIsBoundary(originalEnd)) {\n return true;\n }\n }\n return false;\n };\n LcsDiff.prototype._ModifiedIsBoundary = function (index) {\n if (index <= 0 || index >= this.ModifiedSequence.getLength() - 1) {\n return true;\n }\n var element = this.ModifiedSequence.getElementAtIndex(index);\n return (typeof element === 'string' && /^\\s*$/.test(element));\n };\n LcsDiff.prototype._ModifiedRegionIsBoundary = function (modifiedStart, modifiedLength) {\n if (this._ModifiedIsBoundary(modifiedStart) || this._ModifiedIsBoundary(modifiedStart - 1)) {\n return true;\n }\n if (modifiedLength > 0) {\n var modifiedEnd = modifiedStart + modifiedLength;\n if (this._ModifiedIsBoundary(modifiedEnd - 1) || this._ModifiedIsBoundary(modifiedEnd)) {\n return true;\n }\n }\n return false;\n };\n LcsDiff.prototype._boundaryScore = function (originalStart, originalLength, modifiedStart, modifiedLength) {\n var originalScore = (this._OriginalRegionIsBoundary(originalStart, originalLength) ? 1 : 0);\n var modifiedScore = (this._ModifiedRegionIsBoundary(modifiedStart, modifiedLength) ? 1 : 0);\n return (originalScore + modifiedScore);\n };\n /**\n * Concatenates the two input DiffChange lists and returns the resulting\n * list.\n * @param The left changes\n * @param The right changes\n * @returns The concatenated list\n */\n LcsDiff.prototype.ConcatenateChanges = function (left, right) {\n var mergedChangeArr = [];\n var result = null;\n if (left.length === 0 || right.length === 0) {\n return (right.length > 0) ? right : left;\n }\n else if (this.ChangesOverlap(left[left.length - 1], right[0], mergedChangeArr)) {\n // Since we break the problem down recursively, it is possible that we\n // might recurse in the middle of a change thereby splitting it into\n // two changes. Here in the combining stage, we detect and fuse those\n // changes back together\n result = new Array(left.length + right.length - 1);\n MyArray.Copy(left, 0, result, 0, left.length - 1);\n result[left.length - 1] = mergedChangeArr[0];\n MyArray.Copy(right, 1, result, left.length, right.length - 1);\n return result;\n }\n else {\n result = new Array(left.length + right.length);\n MyArray.Copy(left, 0, result, 0, left.length);\n MyArray.Copy(right, 0, result, left.length, right.length);\n return result;\n }\n };\n /**\n * Returns true if the two changes overlap and can be merged into a single\n * change\n * @param left The left change\n * @param right The right change\n * @param mergedChange The merged change if the two overlap, null otherwise\n * @returns True if the two changes overlap\n */\n LcsDiff.prototype.ChangesOverlap = function (left, right, mergedChangeArr) {\n Debug.Assert(left.originalStart <= right.originalStart, 'Left change is not less than or equal to right change');\n Debug.Assert(left.modifiedStart <= right.modifiedStart, 'Left change is not less than or equal to right change');\n if (left.originalStart + left.originalLength >= right.originalStart || left.modifiedStart + left.modifiedLength >= right.modifiedStart) {\n var originalStart = left.originalStart;\n var originalLength = left.originalLength;\n var modifiedStart = left.modifiedStart;\n var modifiedLength = left.modifiedLength;\n if (left.originalStart + left.originalLength >= right.originalStart) {\n originalLength = right.originalStart + right.originalLength - left.originalStart;\n }\n if (left.modifiedStart + left.modifiedLength >= right.modifiedStart) {\n modifiedLength = right.modifiedStart + right.modifiedLength - left.modifiedStart;\n }\n mergedChangeArr[0] = new DiffChange(originalStart, originalLength, modifiedStart, modifiedLength);\n return true;\n }\n else {\n mergedChangeArr[0] = null;\n return false;\n }\n };\n /**\n * Helper method used to clip a diagonal index to the range of valid\n * diagonals. This also decides whether or not the diagonal index,\n * if it exceeds the boundary, should be clipped to the boundary or clipped\n * one inside the boundary depending on the Even/Odd status of the boundary\n * and numDifferences.\n * @param diagonal The index of the diagonal to clip.\n * @param numDifferences The current number of differences being iterated upon.\n * @param diagonalBaseIndex The base reference diagonal.\n * @param numDiagonals The total number of diagonals.\n * @returns The clipped diagonal index.\n */\n LcsDiff.prototype.ClipDiagonalBound = function (diagonal, numDifferences, diagonalBaseIndex, numDiagonals) {\n if (diagonal >= 0 && diagonal < numDiagonals) {\n // Nothing to clip, its in range\n return diagonal;\n }\n // diagonalsBelow: The number of diagonals below the reference diagonal\n // diagonalsAbove: The number of diagonals above the reference diagonal\n var diagonalsBelow = diagonalBaseIndex;\n var diagonalsAbove = numDiagonals - diagonalBaseIndex - 1;\n var diffEven = (numDifferences % 2 === 0);\n if (diagonal < 0) {\n var lowerBoundEven = (diagonalsBelow % 2 === 0);\n return (diffEven === lowerBoundEven) ? 0 : 1;\n }\n else {\n var upperBoundEven = (diagonalsAbove % 2 === 0);\n return (diffEven === upperBoundEven) ? numDiagonals - 1 : numDiagonals - 2;\n }\n };\n return LcsDiff;\n}());\nexport { LcsDiff };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar ContextMenuEvent = /** @class */ (function () {\n function ContextMenuEvent(posx, posy, target) {\n this._posx = posx;\n this._posy = posy;\n this._target = target;\n }\n ContextMenuEvent.prototype.preventDefault = function () {\n // no-op\n };\n ContextMenuEvent.prototype.stopPropagation = function () {\n // no-op\n };\n Object.defineProperty(ContextMenuEvent.prototype, \"target\", {\n get: function () {\n return this._target;\n },\n enumerable: true,\n configurable: true\n });\n return ContextMenuEvent;\n}());\nexport { ContextMenuEvent };\nvar MouseContextMenuEvent = /** @class */ (function (_super) {\n __extends(MouseContextMenuEvent, _super);\n function MouseContextMenuEvent(originalEvent) {\n var _this = _super.call(this, originalEvent.posx, originalEvent.posy, originalEvent.target) || this;\n _this.originalEvent = originalEvent;\n return _this;\n }\n MouseContextMenuEvent.prototype.preventDefault = function () {\n this.originalEvent.preventDefault();\n };\n MouseContextMenuEvent.prototype.stopPropagation = function () {\n this.originalEvent.stopPropagation();\n };\n return MouseContextMenuEvent;\n}(ContextMenuEvent));\nexport { MouseContextMenuEvent };\nvar KeyboardContextMenuEvent = /** @class */ (function (_super) {\n __extends(KeyboardContextMenuEvent, _super);\n function KeyboardContextMenuEvent(posx, posy, originalEvent) {\n var _this = _super.call(this, posx, posy, originalEvent.target) || this;\n _this.originalEvent = originalEvent;\n return _this;\n }\n KeyboardContextMenuEvent.prototype.preventDefault = function () {\n this.originalEvent.preventDefault();\n };\n KeyboardContextMenuEvent.prototype.stopPropagation = function () {\n this.originalEvent.stopPropagation();\n };\n return KeyboardContextMenuEvent;\n}(ContextMenuEvent));\nexport { KeyboardContextMenuEvent };\nexport var DragOverEffect;\n(function (DragOverEffect) {\n DragOverEffect[DragOverEffect[\"COPY\"] = 0] = \"COPY\";\n DragOverEffect[DragOverEffect[\"MOVE\"] = 1] = \"MOVE\";\n})(DragOverEffect || (DragOverEffect = {}));\nexport var DragOverBubble;\n(function (DragOverBubble) {\n DragOverBubble[DragOverBubble[\"BUBBLE_DOWN\"] = 0] = \"BUBBLE_DOWN\";\n DragOverBubble[DragOverBubble[\"BUBBLE_UP\"] = 1] = \"BUBBLE_UP\";\n})(DragOverBubble || (DragOverBubble = {}));\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar ElementsDragAndDropData = /** @class */ (function () {\n function ElementsDragAndDropData(elements) {\n this.elements = elements;\n }\n ElementsDragAndDropData.prototype.update = function (event) {\n // no-op\n };\n return ElementsDragAndDropData;\n}());\nexport { ElementsDragAndDropData };\nvar ExternalElementsDragAndDropData = /** @class */ (function () {\n function ExternalElementsDragAndDropData(elements) {\n this.elements = elements;\n }\n ExternalElementsDragAndDropData.prototype.update = function (event) {\n // no-op\n };\n return ExternalElementsDragAndDropData;\n}());\nexport { ExternalElementsDragAndDropData };\nvar DesktopDragAndDropData = /** @class */ (function () {\n function DesktopDragAndDropData() {\n this.types = [];\n this.files = [];\n }\n DesktopDragAndDropData.prototype.update = function (event) {\n if (event.dataTransfer.types) {\n this.types = [];\n Array.prototype.push.apply(this.types, event.dataTransfer.types);\n }\n if (event.dataTransfer.files) {\n this.files = [];\n Array.prototype.push.apply(this.files, event.dataTransfer.files);\n this.files = this.files.filter(function (f) { return f.size || f.type; });\n }\n };\n return DesktopDragAndDropData;\n}());\nexport { DesktopDragAndDropData };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { ArrayIterator } from '../../../common/iterator';\nvar HeightMap = /** @class */ (function () {\n function HeightMap() {\n this.heightMap = [];\n this.indexes = {};\n }\n HeightMap.prototype.getContentHeight = function () {\n var last = this.heightMap[this.heightMap.length - 1];\n return !last ? 0 : last.top + last.height;\n };\n HeightMap.prototype.onInsertItems = function (iterator, afterItemId) {\n if (afterItemId === void 0) { afterItemId = null; }\n var item;\n var viewItem;\n var i, j;\n var totalSize;\n var sizeDiff = 0;\n if (afterItemId === null) {\n i = 0;\n totalSize = 0;\n }\n else {\n i = this.indexes[afterItemId] + 1;\n viewItem = this.heightMap[i - 1];\n if (!viewItem) {\n console.error('view item doesnt exist');\n return undefined;\n }\n totalSize = viewItem.top + viewItem.height;\n }\n var boundSplice = this.heightMap.splice.bind(this.heightMap, i, 0);\n var itemsToInsert = [];\n while (item = iterator.next()) {\n viewItem = this.createViewItem(item);\n viewItem.top = totalSize + sizeDiff;\n this.indexes[item.id] = i++;\n itemsToInsert.push(viewItem);\n sizeDiff += viewItem.height;\n }\n boundSplice.apply(this.heightMap, itemsToInsert);\n for (j = i; j < this.heightMap.length; j++) {\n viewItem = this.heightMap[j];\n viewItem.top += sizeDiff;\n this.indexes[viewItem.model.id] = j;\n }\n for (j = itemsToInsert.length - 1; j >= 0; j--) {\n this.onInsertItem(itemsToInsert[j]);\n }\n for (j = this.heightMap.length - 1; j >= i; j--) {\n this.onRefreshItem(this.heightMap[j]);\n }\n return sizeDiff;\n };\n HeightMap.prototype.onInsertItem = function (item) {\n // noop\n };\n // Contiguous items\n HeightMap.prototype.onRemoveItems = function (iterator) {\n var itemId;\n var viewItem;\n var startIndex = null;\n var i;\n var sizeDiff = 0;\n while (itemId = iterator.next()) {\n i = this.indexes[itemId];\n viewItem = this.heightMap[i];\n if (!viewItem) {\n console.error('view item doesnt exist');\n return;\n }\n sizeDiff -= viewItem.height;\n delete this.indexes[itemId];\n this.onRemoveItem(viewItem);\n if (startIndex === null) {\n startIndex = i;\n }\n }\n if (sizeDiff === 0) {\n return;\n }\n this.heightMap.splice(startIndex, i - startIndex + 1);\n for (i = startIndex; i < this.heightMap.length; i++) {\n viewItem = this.heightMap[i];\n viewItem.top += sizeDiff;\n this.indexes[viewItem.model.id] = i;\n this.onRefreshItem(viewItem);\n }\n };\n HeightMap.prototype.onRemoveItem = function (item) {\n // noop\n };\n HeightMap.prototype.onRefreshItemSet = function (items) {\n var _this = this;\n var sortedItems = items.sort(function (a, b) { return _this.indexes[a.id] - _this.indexes[b.id]; });\n this.onRefreshItems(new ArrayIterator(sortedItems));\n };\n // Ordered, but not necessarily contiguous items\n HeightMap.prototype.onRefreshItems = function (iterator) {\n var item;\n var viewItem;\n var newHeight;\n var i, j = null;\n var cummDiff = 0;\n while (item = iterator.next()) {\n i = this.indexes[item.id];\n for (; cummDiff !== 0 && j !== null && j < i; j++) {\n viewItem = this.heightMap[j];\n viewItem.top += cummDiff;\n this.onRefreshItem(viewItem);\n }\n viewItem = this.heightMap[i];\n newHeight = item.getHeight();\n viewItem.top += cummDiff;\n cummDiff += newHeight - viewItem.height;\n viewItem.height = newHeight;\n this.onRefreshItem(viewItem, true);\n j = i + 1;\n }\n if (cummDiff !== 0 && j !== null) {\n for (; j < this.heightMap.length; j++) {\n viewItem = this.heightMap[j];\n viewItem.top += cummDiff;\n this.onRefreshItem(viewItem);\n }\n }\n };\n HeightMap.prototype.onRefreshItem = function (item, needsRender) {\n if (needsRender === void 0) { needsRender = false; }\n // noop\n };\n HeightMap.prototype.indexAt = function (position) {\n var left = 0;\n var right = this.heightMap.length;\n var center;\n var item;\n // Binary search\n while (left < right) {\n center = Math.floor((left + right) / 2);\n item = this.heightMap[center];\n if (position < item.top) {\n right = center;\n }\n else if (position >= item.top + item.height) {\n if (left === center) {\n break;\n }\n left = center;\n }\n else {\n return center;\n }\n }\n return this.heightMap.length;\n };\n HeightMap.prototype.indexAfter = function (position) {\n return Math.min(this.indexAt(position) + 1, this.heightMap.length);\n };\n HeightMap.prototype.itemAtIndex = function (index) {\n return this.heightMap[index];\n };\n HeightMap.prototype.itemAfter = function (item) {\n return this.heightMap[this.indexes[item.model.id] + 1] || null;\n };\n HeightMap.prototype.createViewItem = function (item) {\n throw new Error('not implemented');\n };\n HeightMap.prototype.dispose = function () {\n this.heightMap = null;\n this.indexes = null;\n };\n return HeightMap;\n}());\nexport { HeightMap };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\n// Common data transfers\nexport var DataTransfers = {\n /**\n * Application specific resource transfer type\n */\n RESOURCES: 'ResourceURLs',\n /**\n * Browser specific transfer type to download\n */\n DOWNLOAD_URL: 'DownloadURL',\n /**\n * Browser specific transfer type for files\n */\n FILES: 'Files',\n /**\n * Typicaly transfer type for copy/paste transfers.\n */\n TEXT: 'text/plain'\n};\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n};\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __param = (this && this.__param) || function (paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n};\nvar _a;\nimport { createDecorator, IInstantiationService } from '../../instantiation/common/instantiation';\nimport { toDisposable, combinedDisposable, dispose } from '../../../base/common/lifecycle';\nimport { IContextKeyService, RawContextKey } from '../../contextkey/common/contextkey';\nimport { Tree } from '../../../base/parts/tree/browser/treeImpl';\nimport { attachListStyler, defaultListStyles, computeStyles } from '../../theme/common/styler';\nimport { IThemeService } from '../../theme/common/themeService';\nimport { IConfigurationService } from '../../configuration/common/configuration';\nimport { localize } from '../../../nls';\nimport { Registry } from '../../registry/common/platform';\nimport { Extensions as ConfigurationExtensions } from '../../configuration/common/configurationRegistry';\nimport { DefaultController, OpenMode, ClickBehavior, DefaultTreestyler } from '../../../base/parts/tree/browser/treeDefaults';\nimport { isUndefinedOrNull } from '../../../base/common/types';\nimport { createStyleSheet } from '../../../base/browser/dom';\nimport { ScrollbarVisibility } from '../../../base/common/scrollable';\nexport var IListService = createDecorator('listService');\nvar ListService = /** @class */ (function () {\n function ListService(contextKeyService) {\n this.lists = [];\n this._lastFocusedWidget = undefined;\n }\n Object.defineProperty(ListService.prototype, \"lastFocusedList\", {\n get: function () {\n return this._lastFocusedWidget;\n },\n enumerable: true,\n configurable: true\n });\n ListService.prototype.register = function (widget, extraContextKeys) {\n var _this = this;\n if (this.lists.some(function (l) { return l.widget === widget; })) {\n throw new Error('Cannot register the same widget multiple times');\n }\n // Keep in our lists list\n var registeredList = { widget: widget, extraContextKeys: extraContextKeys };\n this.lists.push(registeredList);\n // Check for currently being focused\n if (widget.isDOMFocused()) {\n this._lastFocusedWidget = widget;\n }\n var result = combinedDisposable([\n widget.onDidFocus(function () { return _this._lastFocusedWidget = widget; }),\n toDisposable(function () { return _this.lists.splice(_this.lists.indexOf(registeredList), 1); }),\n widget.onDidDispose(function () {\n _this.lists = _this.lists.filter(function (l) { return l !== registeredList; });\n if (_this._lastFocusedWidget === widget) {\n _this._lastFocusedWidget = undefined;\n }\n })\n ]);\n return result;\n };\n ListService = __decorate([\n __param(0, IContextKeyService)\n ], ListService);\n return ListService;\n}());\nexport { ListService };\nvar RawWorkbenchListFocusContextKey = new RawContextKey('listFocus', true);\nexport var WorkbenchListSupportsMultiSelectContextKey = new RawContextKey('listSupportsMultiselect', true);\nexport var WorkbenchListHasSelectionOrFocus = new RawContextKey('listHasSelectionOrFocus', false);\nexport var WorkbenchListDoubleSelection = new RawContextKey('listDoubleSelection', false);\nexport var WorkbenchListMultiSelection = new RawContextKey('listMultiSelection', false);\nfunction createScopedContextKeyService(contextKeyService, widget) {\n var result = contextKeyService.createScoped(widget.getHTMLElement());\n RawWorkbenchListFocusContextKey.bindTo(result);\n return result;\n}\nexport var multiSelectModifierSettingKey = 'workbench.list.multiSelectModifier';\nexport var openModeSettingKey = 'workbench.list.openMode';\nexport var horizontalScrollingKey = 'workbench.tree.horizontalScrolling';\nfunction useAltAsMultipleSelectionModifier(configurationService) {\n return configurationService.getValue(multiSelectModifierSettingKey) === 'alt';\n}\nfunction useSingleClickToOpen(configurationService) {\n return configurationService.getValue(openModeSettingKey) !== 'doubleClick';\n}\nvar sharedTreeStyleSheet;\nfunction getSharedTreeStyleSheet() {\n if (!sharedTreeStyleSheet) {\n sharedTreeStyleSheet = createStyleSheet();\n }\n return sharedTreeStyleSheet;\n}\nfunction handleTreeController(configuration, instantiationService) {\n if (!configuration.controller) {\n configuration.controller = instantiationService.createInstance(WorkbenchTreeController, {});\n }\n if (!configuration.styler) {\n configuration.styler = new DefaultTreestyler(getSharedTreeStyleSheet());\n }\n return configuration;\n}\nvar WorkbenchTree = /** @class */ (function (_super) {\n __extends(WorkbenchTree, _super);\n function WorkbenchTree(container, configuration, options, contextKeyService, listService, themeService, instantiationService, configurationService) {\n var _this = this;\n var config = handleTreeController(configuration, instantiationService);\n var horizontalScrollMode = configurationService.getValue(horizontalScrollingKey) ? ScrollbarVisibility.Auto : ScrollbarVisibility.Hidden;\n var opts = __assign({ horizontalScrollMode: horizontalScrollMode, keyboardSupport: false }, computeStyles(themeService.getTheme(), defaultListStyles), options);\n _this = _super.call(this, container, config, opts) || this;\n _this.disposables = [];\n _this.contextKeyService = createScopedContextKeyService(contextKeyService, _this);\n WorkbenchListSupportsMultiSelectContextKey.bindTo(_this.contextKeyService);\n _this.listHasSelectionOrFocus = WorkbenchListHasSelectionOrFocus.bindTo(_this.contextKeyService);\n _this.listDoubleSelection = WorkbenchListDoubleSelection.bindTo(_this.contextKeyService);\n _this.listMultiSelection = WorkbenchListMultiSelection.bindTo(_this.contextKeyService);\n _this._openOnSingleClick = useSingleClickToOpen(configurationService);\n _this._useAltAsMultipleSelectionModifier = useAltAsMultipleSelectionModifier(configurationService);\n _this.disposables.push(_this.contextKeyService, listService.register(_this), attachListStyler(_this, themeService));\n _this.disposables.push(_this.onDidChangeSelection(function () {\n var selection = _this.getSelection();\n var focus = _this.getFocus();\n _this.listHasSelectionOrFocus.set((selection && selection.length > 0) || !!focus);\n _this.listDoubleSelection.set(selection && selection.length === 2);\n _this.listMultiSelection.set(selection && selection.length > 1);\n }));\n _this.disposables.push(_this.onDidChangeFocus(function () {\n var selection = _this.getSelection();\n var focus = _this.getFocus();\n _this.listHasSelectionOrFocus.set((selection && selection.length > 0) || !!focus);\n }));\n _this.disposables.push(configurationService.onDidChangeConfiguration(function (e) {\n if (e.affectsConfiguration(openModeSettingKey)) {\n _this._openOnSingleClick = useSingleClickToOpen(configurationService);\n }\n if (e.affectsConfiguration(multiSelectModifierSettingKey)) {\n _this._useAltAsMultipleSelectionModifier = useAltAsMultipleSelectionModifier(configurationService);\n }\n }));\n return _this;\n }\n WorkbenchTree.prototype.dispose = function () {\n _super.prototype.dispose.call(this);\n this.disposables = dispose(this.disposables);\n };\n WorkbenchTree = __decorate([\n __param(3, IContextKeyService),\n __param(4, IListService),\n __param(5, IThemeService),\n __param(6, IInstantiationService),\n __param(7, IConfigurationService)\n ], WorkbenchTree);\n return WorkbenchTree;\n}(Tree));\nexport { WorkbenchTree };\nfunction massageControllerOptions(options) {\n if (typeof options.keyboardSupport !== 'boolean') {\n options.keyboardSupport = false;\n }\n if (typeof options.clickBehavior !== 'number') {\n options.clickBehavior = ClickBehavior.ON_MOUSE_DOWN;\n }\n return options;\n}\nvar WorkbenchTreeController = /** @class */ (function (_super) {\n __extends(WorkbenchTreeController, _super);\n function WorkbenchTreeController(options, configurationService) {\n var _this = _super.call(this, massageControllerOptions(options)) || this;\n _this.configurationService = configurationService;\n _this.disposables = [];\n // if the open mode is not set, we configure it based on settings\n if (isUndefinedOrNull(options.openMode)) {\n _this.setOpenMode(_this.getOpenModeSetting());\n _this.registerListeners();\n }\n return _this;\n }\n WorkbenchTreeController.prototype.registerListeners = function () {\n var _this = this;\n this.disposables.push(this.configurationService.onDidChangeConfiguration(function (e) {\n if (e.affectsConfiguration(openModeSettingKey)) {\n _this.setOpenMode(_this.getOpenModeSetting());\n }\n }));\n };\n WorkbenchTreeController.prototype.getOpenModeSetting = function () {\n return useSingleClickToOpen(this.configurationService) ? OpenMode.SINGLE_CLICK : OpenMode.DOUBLE_CLICK;\n };\n WorkbenchTreeController.prototype.dispose = function () {\n this.disposables = dispose(this.disposables);\n };\n WorkbenchTreeController = __decorate([\n __param(1, IConfigurationService)\n ], WorkbenchTreeController);\n return WorkbenchTreeController;\n}(DefaultController));\nexport { WorkbenchTreeController };\nvar configurationRegistry = Registry.as(ConfigurationExtensions.Configuration);\nconfigurationRegistry.registerConfiguration({\n 'id': 'workbench',\n 'order': 7,\n 'title': localize('workbenchConfigurationTitle', \"Workbench\"),\n 'type': 'object',\n 'properties': (_a = {},\n _a[multiSelectModifierSettingKey] = {\n 'type': 'string',\n 'enum': ['ctrlCmd', 'alt'],\n 'enumDescriptions': [\n localize('multiSelectModifier.ctrlCmd', \"Maps to `Control` on Windows and Linux and to `Command` on macOS.\"),\n localize('multiSelectModifier.alt', \"Maps to `Alt` on Windows and Linux and to `Option` on macOS.\")\n ],\n 'default': 'ctrlCmd',\n 'description': localize({\n key: 'multiSelectModifier',\n comment: [\n '- `ctrlCmd` refers to a value the setting can take and should not be localized.',\n '- `Control` and `Command` refer to the modifier keys Ctrl or Cmd on the keyboard and can be localized.'\n ]\n }, \"The modifier to be used to add an item in trees and lists to a multi-selection with the mouse (for example in the explorer, open editors and scm view). The 'Open to Side' mouse gestures - if supported - will adapt such that they do not conflict with the multiselect modifier.\")\n },\n _a[openModeSettingKey] = {\n 'type': 'string',\n 'enum': ['singleClick', 'doubleClick'],\n 'default': 'singleClick',\n 'description': localize({\n key: 'openModeModifier',\n comment: ['`singleClick` and `doubleClick` refers to a value the setting can take and should not be localized.']\n }, \"Controls how to open items in trees and lists using the mouse (if supported). For parents with children in trees, this setting will control if a single click expands the parent or a double click. Note that some trees and lists might choose to ignore this setting if it is not applicable. \")\n },\n _a[horizontalScrollingKey] = {\n 'type': 'boolean',\n 'default': false,\n 'description': localize('horizontalScrolling setting', \"Controls whether trees support horizontal scrolling in the workbench.\")\n },\n _a)\n});\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport * as Platform from '../../../common/platform';\nimport * as Browser from '../../../browser/browser';\nimport * as WinJS from '../../../common/winjs.base';\nimport * as Lifecycle from '../../../common/lifecycle';\nimport * as DOM from '../../../browser/dom';\nimport * as Diff from '../../../common/diff/diff';\nimport * as Touch from '../../../browser/touch';\nimport * as strings from '../../../common/strings';\nimport * as Mouse from '../../../browser/mouseEvent';\nimport * as Keyboard from '../../../browser/keyboardEvent';\nimport * as dnd from './treeDnd';\nimport { ArrayIterator, MappedIterator } from '../../../common/iterator';\nimport { ScrollableElement } from '../../../browser/ui/scrollbar/scrollableElement';\nimport { ScrollbarVisibility } from '../../../common/scrollable';\nimport { HeightMap } from './treeViewModel';\nimport * as _ from './tree';\nimport { Emitter } from '../../../common/event';\nimport { DataTransfers } from '../../../browser/dnd';\nimport { DefaultTreestyler } from './treeDefaults';\nimport { Delayer } from '../../../common/async';\nfunction removeFromParent(element) {\n try {\n element.parentElement.removeChild(element);\n }\n catch (e) {\n // this will throw if this happens due to a blur event, nasty business\n }\n}\nvar RowCache = /** @class */ (function () {\n function RowCache(context) {\n this.context = context;\n this._cache = { '': [] };\n }\n RowCache.prototype.alloc = function (templateId) {\n var result = this.cache(templateId).pop();\n if (!result) {\n var content = document.createElement('div');\n content.className = 'content';\n var row = document.createElement('div');\n row.appendChild(content);\n result = {\n element: row,\n templateId: templateId,\n templateData: this.context.renderer.renderTemplate(this.context.tree, templateId, content)\n };\n }\n return result;\n };\n RowCache.prototype.release = function (templateId, row) {\n removeFromParent(row.element);\n this.cache(templateId).push(row);\n };\n RowCache.prototype.cache = function (templateId) {\n return this._cache[templateId] || (this._cache[templateId] = []);\n };\n RowCache.prototype.garbageCollect = function () {\n var _this = this;\n if (this._cache) {\n Object.keys(this._cache).forEach(function (templateId) {\n _this._cache[templateId].forEach(function (cachedRow) {\n _this.context.renderer.disposeTemplate(_this.context.tree, templateId, cachedRow.templateData);\n cachedRow.element = null;\n cachedRow.templateData = null;\n });\n delete _this._cache[templateId];\n });\n }\n };\n RowCache.prototype.dispose = function () {\n this.garbageCollect();\n this._cache = null;\n this.context = null;\n };\n return RowCache;\n}());\nexport { RowCache };\nvar ViewItem = /** @class */ (function () {\n function ViewItem(context, model) {\n var _this = this;\n this.width = 0;\n this.context = context;\n this.model = model;\n this.id = this.model.id;\n this.row = null;\n this.top = 0;\n this.height = model.getHeight();\n this._styles = {};\n model.getAllTraits().forEach(function (t) { return _this._styles[t] = true; });\n if (model.isExpanded()) {\n this.addClass('expanded');\n }\n }\n Object.defineProperty(ViewItem.prototype, \"expanded\", {\n set: function (value) {\n value ? this.addClass('expanded') : this.removeClass('expanded');\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ViewItem.prototype, \"loading\", {\n set: function (value) {\n value ? this.addClass('loading') : this.removeClass('loading');\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ViewItem.prototype, \"draggable\", {\n get: function () {\n return this._draggable;\n },\n set: function (value) {\n this._draggable = value;\n this.render(true);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ViewItem.prototype, \"dropTarget\", {\n set: function (value) {\n value ? this.addClass('drop-target') : this.removeClass('drop-target');\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ViewItem.prototype, \"element\", {\n get: function () {\n return this.row && this.row.element;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ViewItem.prototype, \"templateId\", {\n get: function () {\n return this._templateId || (this._templateId = (this.context.renderer.getTemplateId && this.context.renderer.getTemplateId(this.context.tree, this.model.getElement())));\n },\n enumerable: true,\n configurable: true\n });\n ViewItem.prototype.addClass = function (name) {\n this._styles[name] = true;\n this.render(true);\n };\n ViewItem.prototype.removeClass = function (name) {\n delete this._styles[name]; // is this slow?\n this.render(true);\n };\n ViewItem.prototype.render = function (skipUserRender) {\n var _this = this;\n if (skipUserRender === void 0) { skipUserRender = false; }\n if (!this.model || !this.element) {\n return;\n }\n var classes = ['monaco-tree-row'];\n classes.push.apply(classes, Object.keys(this._styles));\n if (this.model.hasChildren()) {\n classes.push('has-children');\n }\n this.element.className = classes.join(' ');\n this.element.draggable = this.draggable;\n this.element.style.height = this.height + 'px';\n // ARIA\n this.element.setAttribute('role', 'treeitem');\n var accessibility = this.context.accessibilityProvider;\n var ariaLabel = accessibility.getAriaLabel(this.context.tree, this.model.getElement());\n if (ariaLabel) {\n this.element.setAttribute('aria-label', ariaLabel);\n }\n if (accessibility.getPosInSet && accessibility.getSetSize) {\n this.element.setAttribute('aria-setsize', accessibility.getSetSize());\n this.element.setAttribute('aria-posinset', accessibility.getPosInSet(this.context.tree, this.model.getElement()));\n }\n if (this.model.hasTrait('focused')) {\n var base64Id = strings.safeBtoa(this.model.id);\n this.element.setAttribute('aria-selected', 'true');\n this.element.setAttribute('id', base64Id);\n }\n else {\n this.element.setAttribute('aria-selected', 'false');\n this.element.removeAttribute('id');\n }\n if (this.model.hasChildren()) {\n this.element.setAttribute('aria-expanded', String(!!this._styles['expanded']));\n }\n else {\n this.element.removeAttribute('aria-expanded');\n }\n this.element.setAttribute('aria-level', String(this.model.getDepth()));\n if (this.context.options.paddingOnRow) {\n this.element.style.paddingLeft = this.context.options.twistiePixels + ((this.model.getDepth() - 1) * this.context.options.indentPixels) + 'px';\n }\n else {\n this.element.style.paddingLeft = ((this.model.getDepth() - 1) * this.context.options.indentPixels) + 'px';\n this.row.element.firstElementChild.style.paddingLeft = this.context.options.twistiePixels + 'px';\n }\n var uri = this.context.dnd.getDragURI(this.context.tree, this.model.getElement());\n if (uri !== this.uri) {\n if (this.unbindDragStart) {\n this.unbindDragStart.dispose();\n this.unbindDragStart = null;\n }\n if (uri) {\n this.uri = uri;\n this.draggable = true;\n this.unbindDragStart = DOM.addDisposableListener(this.element, 'dragstart', function (e) {\n _this.onDragStart(e);\n });\n }\n else {\n this.uri = null;\n }\n }\n if (!skipUserRender && this.element) {\n var style = window.getComputedStyle(this.element);\n var paddingLeft = parseFloat(style.paddingLeft);\n if (this.context.horizontalScrolling) {\n this.element.style.width = 'fit-content';\n }\n this.context.renderer.renderElement(this.context.tree, this.model.getElement(), this.templateId, this.row.templateData);\n if (this.context.horizontalScrolling) {\n this.width = DOM.getContentWidth(this.element) + paddingLeft;\n this.element.style.width = '';\n }\n }\n };\n ViewItem.prototype.insertInDOM = function (container, afterElement) {\n if (!this.row) {\n this.row = this.context.cache.alloc(this.templateId);\n // used in reverse lookup from HTMLElement to Item\n this.element[TreeView.BINDING] = this;\n }\n if (this.element.parentElement) {\n return;\n }\n if (afterElement === null) {\n container.appendChild(this.element);\n }\n else {\n try {\n container.insertBefore(this.element, afterElement);\n }\n catch (e) {\n console.warn('Failed to locate previous tree element');\n container.appendChild(this.element);\n }\n }\n this.render();\n };\n ViewItem.prototype.removeFromDOM = function () {\n if (!this.row) {\n return;\n }\n if (this.unbindDragStart) {\n this.unbindDragStart.dispose();\n this.unbindDragStart = null;\n }\n this.uri = null;\n this.element[TreeView.BINDING] = null;\n this.context.cache.release(this.templateId, this.row);\n this.row = null;\n };\n ViewItem.prototype.dispose = function () {\n this.row = null;\n this.model = null;\n };\n return ViewItem;\n}());\nexport { ViewItem };\nvar RootViewItem = /** @class */ (function (_super) {\n __extends(RootViewItem, _super);\n function RootViewItem(context, model, wrapper) {\n var _this = _super.call(this, context, model) || this;\n _this.row = {\n element: wrapper,\n templateData: null,\n templateId: null\n };\n return _this;\n }\n RootViewItem.prototype.render = function () {\n if (!this.model || !this.element) {\n return;\n }\n var classes = ['monaco-tree-wrapper'];\n classes.push.apply(classes, Object.keys(this._styles));\n if (this.model.hasChildren()) {\n classes.push('has-children');\n }\n this.element.className = classes.join(' ');\n };\n RootViewItem.prototype.insertInDOM = function (container, afterElement) {\n // noop\n };\n RootViewItem.prototype.removeFromDOM = function () {\n // noop\n };\n return RootViewItem;\n}(ViewItem));\nfunction reactionEquals(one, other) {\n if (!one && !other) {\n return true;\n }\n else if (!one || !other) {\n return false;\n }\n else if (one.accept !== other.accept) {\n return false;\n }\n else if (one.bubble !== other.bubble) {\n return false;\n }\n else if (one.effect !== other.effect) {\n return false;\n }\n else {\n return true;\n }\n}\nvar TreeView = /** @class */ (function (_super) {\n __extends(TreeView, _super);\n function TreeView(context, container) {\n var _this = _super.call(this) || this;\n _this.lastClickTimeStamp = 0;\n _this.contentWidthUpdateDelayer = new Delayer(50);\n _this.isRefreshing = false;\n _this.refreshingPreviousChildrenIds = {};\n _this._onDOMFocus = new Emitter();\n _this._onDOMBlur = new Emitter();\n _this._onDidScroll = new Emitter();\n TreeView.counter++;\n _this.instance = TreeView.counter;\n var horizontalScrollMode = typeof context.options.horizontalScrollMode === 'undefined' ? ScrollbarVisibility.Hidden : context.options.horizontalScrollMode;\n _this.horizontalScrolling = horizontalScrollMode !== ScrollbarVisibility.Hidden;\n _this.context = {\n dataSource: context.dataSource,\n renderer: context.renderer,\n controller: context.controller,\n dnd: context.dnd,\n filter: context.filter,\n sorter: context.sorter,\n tree: context.tree,\n accessibilityProvider: context.accessibilityProvider,\n options: context.options,\n cache: new RowCache(context),\n horizontalScrolling: _this.horizontalScrolling\n };\n _this.modelListeners = [];\n _this.viewListeners = [];\n _this.model = null;\n _this.items = {};\n _this.domNode = document.createElement('div');\n _this.domNode.className = \"monaco-tree no-focused-item monaco-tree-instance-\" + _this.instance;\n // to allow direct tabbing into the tree instead of first focusing the tree\n _this.domNode.tabIndex = context.options.preventRootFocus ? -1 : 0;\n _this.styleElement = DOM.createStyleSheet(_this.domNode);\n _this.treeStyler = context.styler;\n if (!_this.treeStyler) {\n _this.treeStyler = new DefaultTreestyler(_this.styleElement, \"monaco-tree-instance-\" + _this.instance);\n }\n // ARIA\n _this.domNode.setAttribute('role', 'tree');\n if (_this.context.options.ariaLabel) {\n _this.domNode.setAttribute('aria-label', _this.context.options.ariaLabel);\n }\n if (_this.context.options.alwaysFocused) {\n DOM.addClass(_this.domNode, 'focused');\n }\n if (!_this.context.options.paddingOnRow) {\n DOM.addClass(_this.domNode, 'no-row-padding');\n }\n _this.wrapper = document.createElement('div');\n _this.wrapper.className = 'monaco-tree-wrapper';\n _this.scrollableElement = new ScrollableElement(_this.wrapper, {\n alwaysConsumeMouseWheel: true,\n horizontal: horizontalScrollMode,\n vertical: (typeof context.options.verticalScrollMode !== 'undefined' ? context.options.verticalScrollMode : ScrollbarVisibility.Auto),\n useShadows: context.options.useShadows\n });\n _this.scrollableElement.onScroll(function (e) {\n _this.render(e.scrollTop, e.height, e.scrollLeft, e.width, e.scrollWidth);\n _this._onDidScroll.fire();\n });\n if (Browser.isIE) {\n _this.wrapper.style.msTouchAction = 'none';\n _this.wrapper.style.msContentZooming = 'none';\n }\n else {\n Touch.Gesture.addTarget(_this.wrapper);\n }\n _this.rowsContainer = document.createElement('div');\n _this.rowsContainer.className = 'monaco-tree-rows';\n if (context.options.showTwistie) {\n _this.rowsContainer.className += ' show-twisties';\n }\n var focusTracker = DOM.trackFocus(_this.domNode);\n _this.viewListeners.push(focusTracker.onDidFocus(function () { return _this.onFocus(); }));\n _this.viewListeners.push(focusTracker.onDidBlur(function () { return _this.onBlur(); }));\n _this.viewListeners.push(focusTracker);\n _this.viewListeners.push(DOM.addDisposableListener(_this.domNode, 'keydown', function (e) { return _this.onKeyDown(e); }));\n _this.viewListeners.push(DOM.addDisposableListener(_this.domNode, 'keyup', function (e) { return _this.onKeyUp(e); }));\n _this.viewListeners.push(DOM.addDisposableListener(_this.domNode, 'mousedown', function (e) { return _this.onMouseDown(e); }));\n _this.viewListeners.push(DOM.addDisposableListener(_this.domNode, 'mouseup', function (e) { return _this.onMouseUp(e); }));\n _this.viewListeners.push(DOM.addDisposableListener(_this.wrapper, 'click', function (e) { return _this.onClick(e); }));\n _this.viewListeners.push(DOM.addDisposableListener(_this.wrapper, 'auxclick', function (e) { return _this.onClick(e); })); // >= Chrome 56\n _this.viewListeners.push(DOM.addDisposableListener(_this.domNode, 'contextmenu', function (e) { return _this.onContextMenu(e); }));\n _this.viewListeners.push(DOM.addDisposableListener(_this.wrapper, Touch.EventType.Tap, function (e) { return _this.onTap(e); }));\n _this.viewListeners.push(DOM.addDisposableListener(_this.wrapper, Touch.EventType.Change, function (e) { return _this.onTouchChange(e); }));\n if (Browser.isIE) {\n _this.viewListeners.push(DOM.addDisposableListener(_this.wrapper, 'MSPointerDown', function (e) { return _this.onMsPointerDown(e); }));\n _this.viewListeners.push(DOM.addDisposableListener(_this.wrapper, 'MSGestureTap', function (e) { return _this.onMsGestureTap(e); }));\n // these events come too fast, we throttle them\n _this.viewListeners.push(DOM.addDisposableThrottledListener(_this.wrapper, 'MSGestureChange', function (e) { return _this.onThrottledMsGestureChange(e); }, function (lastEvent, event) {\n event.stopPropagation();\n event.preventDefault();\n var result = { translationY: event.translationY, translationX: event.translationX };\n if (lastEvent) {\n result.translationY += lastEvent.translationY;\n result.translationX += lastEvent.translationX;\n }\n return result;\n }));\n }\n _this.viewListeners.push(DOM.addDisposableListener(window, 'dragover', function (e) { return _this.onDragOver(e); }));\n _this.viewListeners.push(DOM.addDisposableListener(_this.wrapper, 'drop', function (e) { return _this.onDrop(e); }));\n _this.viewListeners.push(DOM.addDisposableListener(window, 'dragend', function (e) { return _this.onDragEnd(e); }));\n _this.viewListeners.push(DOM.addDisposableListener(window, 'dragleave', function (e) { return _this.onDragOver(e); }));\n _this.wrapper.appendChild(_this.rowsContainer);\n _this.domNode.appendChild(_this.scrollableElement.getDomNode());\n container.appendChild(_this.domNode);\n _this.lastRenderTop = 0;\n _this.lastRenderHeight = 0;\n _this.didJustPressContextMenuKey = false;\n _this.currentDropTarget = null;\n _this.currentDropTargets = [];\n _this.shouldInvalidateDropReaction = false;\n _this.dragAndDropScrollInterval = null;\n _this.dragAndDropScrollTimeout = null;\n _this.onHiddenScrollTop = null;\n _this.onRowsChanged();\n _this.layout();\n _this.setupMSGesture();\n _this.applyStyles(context.options);\n return _this;\n }\n Object.defineProperty(TreeView.prototype, \"onDOMFocus\", {\n get: function () { return this._onDOMFocus.event; },\n enumerable: true,\n configurable: true\n });\n TreeView.prototype.applyStyles = function (styles) {\n this.treeStyler.style(styles);\n };\n TreeView.prototype.createViewItem = function (item) {\n return new ViewItem(this.context, item);\n };\n TreeView.prototype.getHTMLElement = function () {\n return this.domNode;\n };\n TreeView.prototype.focus = function () {\n this.domNode.focus();\n };\n TreeView.prototype.isFocused = function () {\n return document.activeElement === this.domNode;\n };\n TreeView.prototype.blur = function () {\n this.domNode.blur();\n };\n TreeView.prototype.setupMSGesture = function () {\n var _this = this;\n if (window.MSGesture) {\n this.msGesture = new MSGesture();\n setTimeout(function () { return _this.msGesture.target = _this.wrapper; }, 100); // TODO@joh, TODO@IETeam\n }\n };\n TreeView.prototype.isTreeVisible = function () {\n return this.onHiddenScrollTop === null;\n };\n TreeView.prototype.layout = function (height, width) {\n if (!this.isTreeVisible()) {\n return;\n }\n this.viewHeight = height || DOM.getContentHeight(this.wrapper); // render\n this.scrollHeight = this.getContentHeight();\n if (this.horizontalScrolling) {\n this.viewWidth = width || DOM.getContentWidth(this.wrapper);\n }\n };\n TreeView.prototype.render = function (scrollTop, viewHeight, scrollLeft, viewWidth, scrollWidth) {\n var i;\n var stop;\n var renderTop = scrollTop;\n var renderBottom = scrollTop + viewHeight;\n var thisRenderBottom = this.lastRenderTop + this.lastRenderHeight;\n // when view scrolls down, start rendering from the renderBottom\n for (i = this.indexAfter(renderBottom) - 1, stop = this.indexAt(Math.max(thisRenderBottom, renderTop)); i >= stop; i--) {\n this.insertItemInDOM(this.itemAtIndex(i));\n }\n // when view scrolls up, start rendering from either this.renderTop or renderBottom\n for (i = Math.min(this.indexAt(this.lastRenderTop), this.indexAfter(renderBottom)) - 1, stop = this.indexAt(renderTop); i >= stop; i--) {\n this.insertItemInDOM(this.itemAtIndex(i));\n }\n // when view scrolls down, start unrendering from renderTop\n for (i = this.indexAt(this.lastRenderTop), stop = Math.min(this.indexAt(renderTop), this.indexAfter(thisRenderBottom)); i < stop; i++) {\n this.removeItemFromDOM(this.itemAtIndex(i));\n }\n // when view scrolls up, start unrendering from either renderBottom this.renderTop\n for (i = Math.max(this.indexAfter(renderBottom), this.indexAt(this.lastRenderTop)), stop = this.indexAfter(thisRenderBottom); i < stop; i++) {\n this.removeItemFromDOM(this.itemAtIndex(i));\n }\n var topItem = this.itemAtIndex(this.indexAt(renderTop));\n if (topItem) {\n this.rowsContainer.style.top = (topItem.top - renderTop) + 'px';\n }\n if (this.horizontalScrolling) {\n this.rowsContainer.style.left = -scrollLeft + 'px';\n this.rowsContainer.style.width = Math.max(scrollWidth, viewWidth) + \"px\";\n }\n this.lastRenderTop = renderTop;\n this.lastRenderHeight = renderBottom - renderTop;\n };\n TreeView.prototype.setModel = function (newModel) {\n this.releaseModel();\n this.model = newModel;\n this.model.onRefresh(this.onRefreshing, this, this.modelListeners);\n this.model.onDidRefresh(this.onRefreshed, this, this.modelListeners);\n this.model.onSetInput(this.onClearingInput, this, this.modelListeners);\n this.model.onDidSetInput(this.onSetInput, this, this.modelListeners);\n this.model.onDidFocus(this.onModelFocusChange, this, this.modelListeners);\n this.model.onRefreshItemChildren(this.onItemChildrenRefreshing, this, this.modelListeners);\n this.model.onDidRefreshItemChildren(this.onItemChildrenRefreshed, this, this.modelListeners);\n this.model.onDidRefreshItem(this.onItemRefresh, this, this.modelListeners);\n this.model.onExpandItem(this.onItemExpanding, this, this.modelListeners);\n this.model.onDidExpandItem(this.onItemExpanded, this, this.modelListeners);\n this.model.onCollapseItem(this.onItemCollapsing, this, this.modelListeners);\n this.model.onDidRevealItem(this.onItemReveal, this, this.modelListeners);\n this.model.onDidAddTraitItem(this.onItemAddTrait, this, this.modelListeners);\n this.model.onDidRemoveTraitItem(this.onItemRemoveTrait, this, this.modelListeners);\n };\n TreeView.prototype.onRefreshing = function () {\n this.isRefreshing = true;\n };\n TreeView.prototype.onRefreshed = function () {\n this.isRefreshing = false;\n this.onRowsChanged();\n };\n TreeView.prototype.onRowsChanged = function (scrollTop) {\n if (scrollTop === void 0) { scrollTop = this.scrollTop; }\n if (this.isRefreshing) {\n return;\n }\n this.scrollTop = scrollTop;\n this.updateScrollWidth();\n };\n TreeView.prototype.updateScrollWidth = function () {\n var _this = this;\n if (!this.horizontalScrolling) {\n return;\n }\n this.contentWidthUpdateDelayer.trigger(function () {\n var keys = Object.keys(_this.items);\n var scrollWidth = 0;\n for (var _i = 0, keys_1 = keys; _i < keys_1.length; _i++) {\n var key = keys_1[_i];\n scrollWidth = Math.max(scrollWidth, _this.items[key].width);\n }\n _this.scrollWidth = scrollWidth + 10 /* scrollbar */;\n });\n };\n TreeView.prototype.focusNextPage = function (eventPayload) {\n var _this = this;\n var lastPageIndex = this.indexAt(this.scrollTop + this.viewHeight);\n lastPageIndex = lastPageIndex === 0 ? 0 : lastPageIndex - 1;\n var lastPageElement = this.itemAtIndex(lastPageIndex).model.getElement();\n var currentlyFocusedElement = this.model.getFocus();\n if (currentlyFocusedElement !== lastPageElement) {\n this.model.setFocus(lastPageElement, eventPayload);\n }\n else {\n var previousScrollTop = this.scrollTop;\n this.scrollTop += this.viewHeight;\n if (this.scrollTop !== previousScrollTop) {\n // Let the scroll event listener run\n setTimeout(function () {\n _this.focusNextPage(eventPayload);\n }, 0);\n }\n }\n };\n TreeView.prototype.focusPreviousPage = function (eventPayload) {\n var _this = this;\n var firstPageIndex;\n if (this.scrollTop === 0) {\n firstPageIndex = this.indexAt(this.scrollTop);\n }\n else {\n firstPageIndex = this.indexAfter(this.scrollTop - 1);\n }\n var firstPageElement = this.itemAtIndex(firstPageIndex).model.getElement();\n var currentlyFocusedElement = this.model.getFocus();\n if (currentlyFocusedElement !== firstPageElement) {\n this.model.setFocus(firstPageElement, eventPayload);\n }\n else {\n var previousScrollTop = this.scrollTop;\n this.scrollTop -= this.viewHeight;\n if (this.scrollTop !== previousScrollTop) {\n // Let the scroll event listener run\n setTimeout(function () {\n _this.focusPreviousPage(eventPayload);\n }, 0);\n }\n }\n };\n Object.defineProperty(TreeView.prototype, \"viewHeight\", {\n get: function () {\n var scrollDimensions = this.scrollableElement.getScrollDimensions();\n return scrollDimensions.height;\n },\n set: function (height) {\n this.scrollableElement.setScrollDimensions({ height: height });\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(TreeView.prototype, \"scrollHeight\", {\n set: function (scrollHeight) {\n this.scrollableElement.setScrollDimensions({ scrollHeight: scrollHeight });\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(TreeView.prototype, \"viewWidth\", {\n get: function () {\n var scrollDimensions = this.scrollableElement.getScrollDimensions();\n return scrollDimensions.width;\n },\n set: function (viewWidth) {\n this.scrollableElement.setScrollDimensions({ width: viewWidth });\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(TreeView.prototype, \"scrollWidth\", {\n set: function (scrollWidth) {\n this.scrollableElement.setScrollDimensions({ scrollWidth: scrollWidth });\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(TreeView.prototype, \"scrollTop\", {\n get: function () {\n var scrollPosition = this.scrollableElement.getScrollPosition();\n return scrollPosition.scrollTop;\n },\n set: function (scrollTop) {\n this.scrollableElement.setScrollDimensions({\n scrollHeight: this.getContentHeight()\n });\n this.scrollableElement.setScrollPosition({\n scrollTop: scrollTop\n });\n },\n enumerable: true,\n configurable: true\n });\n // Events\n TreeView.prototype.onClearingInput = function (e) {\n var item = e.item;\n if (item) {\n this.onRemoveItems(new MappedIterator(item.getNavigator(), function (item) { return item && item.id; }));\n this.onRowsChanged();\n }\n };\n TreeView.prototype.onSetInput = function (e) {\n this.context.cache.garbageCollect();\n this.inputItem = new RootViewItem(this.context, e.item, this.wrapper);\n };\n TreeView.prototype.onItemChildrenRefreshing = function (e) {\n var item = e.item;\n var viewItem = this.items[item.id];\n if (viewItem && this.context.options.showLoading) {\n viewItem.loadingTimer = setTimeout(function () {\n viewItem.loadingTimer = 0;\n viewItem.loading = true;\n }, TreeView.LOADING_DECORATION_DELAY);\n }\n if (!e.isNested) {\n var childrenIds = [];\n var navigator = item.getNavigator();\n var childItem;\n while (childItem = navigator.next()) {\n childrenIds.push(childItem.id);\n }\n this.refreshingPreviousChildrenIds[item.id] = childrenIds;\n }\n };\n TreeView.prototype.onItemChildrenRefreshed = function (e) {\n var _this = this;\n var item = e.item;\n var viewItem = this.items[item.id];\n if (viewItem) {\n if (viewItem.loadingTimer) {\n clearTimeout(viewItem.loadingTimer);\n viewItem.loadingTimer = 0;\n }\n viewItem.loading = false;\n }\n if (!e.isNested) {\n var previousChildrenIds = this.refreshingPreviousChildrenIds[item.id];\n var afterModelItems = [];\n var navigator = item.getNavigator();\n var childItem;\n while (childItem = navigator.next()) {\n afterModelItems.push(childItem);\n }\n var skipDiff = Math.abs(previousChildrenIds.length - afterModelItems.length) > 1000;\n var diff = void 0;\n var doToInsertItemsAlreadyExist = void 0;\n if (!skipDiff) {\n var lcs = new Diff.LcsDiff({\n getLength: function () { return previousChildrenIds.length; },\n getElementAtIndex: function (i) { return previousChildrenIds[i]; }\n }, {\n getLength: function () { return afterModelItems.length; },\n getElementAtIndex: function (i) { return afterModelItems[i].id; }\n }, null);\n diff = lcs.ComputeDiff(false);\n // this means that the result of the diff algorithm would result\n // in inserting items that were already registered. this can only\n // happen if the data provider returns bad ids OR if the sorting\n // of the elements has changed\n doToInsertItemsAlreadyExist = diff.some(function (d) {\n if (d.modifiedLength > 0) {\n for (var i = d.modifiedStart, len = d.modifiedStart + d.modifiedLength; i < len; i++) {\n if (_this.items.hasOwnProperty(afterModelItems[i].id)) {\n return true;\n }\n }\n }\n return false;\n });\n }\n // 50 is an optimization number, at some point we're better off\n // just replacing everything\n if (!skipDiff && !doToInsertItemsAlreadyExist && diff.length < 50) {\n for (var i = 0, len = diff.length; i < len; i++) {\n var diffChange = diff[i];\n if (diffChange.originalLength > 0) {\n this.onRemoveItems(new ArrayIterator(previousChildrenIds, diffChange.originalStart, diffChange.originalStart + diffChange.originalLength));\n }\n if (diffChange.modifiedLength > 0) {\n var beforeItem = afterModelItems[diffChange.modifiedStart - 1] || item;\n beforeItem = beforeItem.getDepth() > 0 ? beforeItem : null;\n this.onInsertItems(new ArrayIterator(afterModelItems, diffChange.modifiedStart, diffChange.modifiedStart + diffChange.modifiedLength), beforeItem ? beforeItem.id : null);\n }\n }\n }\n else if (skipDiff || diff.length) {\n this.onRemoveItems(new ArrayIterator(previousChildrenIds));\n this.onInsertItems(new ArrayIterator(afterModelItems), item.getDepth() > 0 ? item.id : null);\n }\n if (skipDiff || diff.length) {\n this.onRowsChanged();\n }\n }\n };\n TreeView.prototype.onItemRefresh = function (item) {\n this.onItemsRefresh([item]);\n };\n TreeView.prototype.onItemsRefresh = function (items) {\n var _this = this;\n this.onRefreshItemSet(items.filter(function (item) { return _this.items.hasOwnProperty(item.id); }));\n this.onRowsChanged();\n };\n TreeView.prototype.onItemExpanding = function (e) {\n var viewItem = this.items[e.item.id];\n if (viewItem) {\n viewItem.expanded = true;\n }\n };\n TreeView.prototype.onItemExpanded = function (e) {\n var item = e.item;\n var viewItem = this.items[item.id];\n if (viewItem) {\n viewItem.expanded = true;\n var height = this.onInsertItems(item.getNavigator(), item.id);\n var scrollTop = this.scrollTop;\n if (viewItem.top + viewItem.height <= this.scrollTop) {\n scrollTop += height;\n }\n this.onRowsChanged(scrollTop);\n }\n };\n TreeView.prototype.onItemCollapsing = function (e) {\n var item = e.item;\n var viewItem = this.items[item.id];\n if (viewItem) {\n viewItem.expanded = false;\n this.onRemoveItems(new MappedIterator(item.getNavigator(), function (item) { return item && item.id; }));\n this.onRowsChanged();\n }\n };\n TreeView.prototype.onItemReveal = function (e) {\n var item = e.item;\n var relativeTop = e.relativeTop;\n var viewItem = this.items[item.id];\n if (viewItem) {\n if (relativeTop !== null) {\n relativeTop = relativeTop < 0 ? 0 : relativeTop;\n relativeTop = relativeTop > 1 ? 1 : relativeTop;\n // y = mx + b\n var m = viewItem.height - this.viewHeight;\n this.scrollTop = m * relativeTop + viewItem.top;\n }\n else {\n var viewItemBottom = viewItem.top + viewItem.height;\n var wrapperBottom = this.scrollTop + this.viewHeight;\n if (viewItem.top < this.scrollTop) {\n this.scrollTop = viewItem.top;\n }\n else if (viewItemBottom >= wrapperBottom) {\n this.scrollTop = viewItemBottom - this.viewHeight;\n }\n }\n }\n };\n TreeView.prototype.onItemAddTrait = function (e) {\n var item = e.item;\n var trait = e.trait;\n var viewItem = this.items[item.id];\n if (viewItem) {\n viewItem.addClass(trait);\n }\n if (trait === 'highlighted') {\n DOM.addClass(this.domNode, trait);\n // Ugly Firefox fix: input fields can't be selected if parent nodes are draggable\n if (viewItem) {\n this.highlightedItemWasDraggable = !!viewItem.draggable;\n if (viewItem.draggable) {\n viewItem.draggable = false;\n }\n }\n }\n };\n TreeView.prototype.onItemRemoveTrait = function (e) {\n var item = e.item;\n var trait = e.trait;\n var viewItem = this.items[item.id];\n if (viewItem) {\n viewItem.removeClass(trait);\n }\n if (trait === 'highlighted') {\n DOM.removeClass(this.domNode, trait);\n // Ugly Firefox fix: input fields can't be selected if parent nodes are draggable\n if (this.highlightedItemWasDraggable) {\n viewItem.draggable = true;\n }\n this.highlightedItemWasDraggable = false;\n }\n };\n TreeView.prototype.onModelFocusChange = function () {\n var focus = this.model && this.model.getFocus();\n DOM.toggleClass(this.domNode, 'no-focused-item', !focus);\n // ARIA\n if (focus) {\n this.domNode.setAttribute('aria-activedescendant', strings.safeBtoa(this.context.dataSource.getId(this.context.tree, focus)));\n }\n else {\n this.domNode.removeAttribute('aria-activedescendant');\n }\n };\n // HeightMap \"events\"\n TreeView.prototype.onInsertItem = function (item) {\n var _this = this;\n item.onDragStart = function (e) { _this.onDragStart(item, e); };\n item.needsRender = true;\n this.refreshViewItem(item);\n this.items[item.id] = item;\n };\n TreeView.prototype.onRefreshItem = function (item, needsRender) {\n if (needsRender === void 0) { needsRender = false; }\n item.needsRender = item.needsRender || needsRender;\n this.refreshViewItem(item);\n };\n TreeView.prototype.onRemoveItem = function (item) {\n this.removeItemFromDOM(item);\n item.dispose();\n delete this.items[item.id];\n };\n // ViewItem refresh\n TreeView.prototype.refreshViewItem = function (item) {\n item.render();\n if (this.shouldBeRendered(item)) {\n this.insertItemInDOM(item);\n }\n else {\n this.removeItemFromDOM(item);\n }\n };\n // DOM Events\n TreeView.prototype.onClick = function (e) {\n if (this.lastPointerType && this.lastPointerType !== 'mouse') {\n return;\n }\n var event = new Mouse.StandardMouseEvent(e);\n var item = this.getItemAround(event.target);\n if (!item) {\n return;\n }\n if (Browser.isIE && Date.now() - this.lastClickTimeStamp < 300) {\n // IE10+ doesn't set the detail property correctly. While IE10 simply\n // counts the number of clicks, IE11 reports always 1. To align with\n // other browser, we set the value to 2 if clicks events come in a 300ms\n // sequence.\n event.detail = 2;\n }\n this.lastClickTimeStamp = Date.now();\n this.context.controller.onClick(this.context.tree, item.model.getElement(), event);\n };\n TreeView.prototype.onMouseDown = function (e) {\n this.didJustPressContextMenuKey = false;\n if (!this.context.controller.onMouseDown) {\n return;\n }\n if (this.lastPointerType && this.lastPointerType !== 'mouse') {\n return;\n }\n var event = new Mouse.StandardMouseEvent(e);\n if (event.ctrlKey && Platform.isNative && Platform.isMacintosh) {\n return;\n }\n var item = this.getItemAround(event.target);\n if (!item) {\n return;\n }\n this.context.controller.onMouseDown(this.context.tree, item.model.getElement(), event);\n };\n TreeView.prototype.onMouseUp = function (e) {\n if (!this.context.controller.onMouseUp) {\n return;\n }\n if (this.lastPointerType && this.lastPointerType !== 'mouse') {\n return;\n }\n var event = new Mouse.StandardMouseEvent(e);\n if (event.ctrlKey && Platform.isNative && Platform.isMacintosh) {\n return;\n }\n var item = this.getItemAround(event.target);\n if (!item) {\n return;\n }\n this.context.controller.onMouseUp(this.context.tree, item.model.getElement(), event);\n };\n TreeView.prototype.onTap = function (e) {\n var item = this.getItemAround(e.initialTarget);\n if (!item) {\n return;\n }\n this.context.controller.onTap(this.context.tree, item.model.getElement(), e);\n };\n TreeView.prototype.onTouchChange = function (event) {\n event.preventDefault();\n event.stopPropagation();\n this.scrollTop -= event.translationY;\n };\n TreeView.prototype.onContextMenu = function (event) {\n var resultEvent;\n var element;\n if (event instanceof KeyboardEvent || this.didJustPressContextMenuKey) {\n this.didJustPressContextMenuKey = false;\n var keyboardEvent = new Keyboard.StandardKeyboardEvent(event);\n element = this.model.getFocus();\n var position;\n if (!element) {\n element = this.model.getInput();\n position = DOM.getDomNodePagePosition(this.inputItem.element);\n }\n else {\n var id = this.context.dataSource.getId(this.context.tree, element);\n var viewItem = this.items[id];\n position = DOM.getDomNodePagePosition(viewItem.element);\n }\n resultEvent = new _.KeyboardContextMenuEvent(position.left + position.width, position.top, keyboardEvent);\n }\n else {\n var mouseEvent = new Mouse.StandardMouseEvent(event);\n var item = this.getItemAround(mouseEvent.target);\n if (!item) {\n return;\n }\n element = item.model.getElement();\n resultEvent = new _.MouseContextMenuEvent(mouseEvent);\n }\n this.context.controller.onContextMenu(this.context.tree, element, resultEvent);\n };\n TreeView.prototype.onKeyDown = function (e) {\n var event = new Keyboard.StandardKeyboardEvent(e);\n this.didJustPressContextMenuKey = event.keyCode === 58 /* ContextMenu */ || (event.shiftKey && event.keyCode === 68 /* F10 */);\n if (this.didJustPressContextMenuKey) {\n event.preventDefault();\n event.stopPropagation();\n }\n if (event.target && event.target.tagName && event.target.tagName.toLowerCase() === 'input') {\n return; // Ignore event if target is a form input field (avoids browser specific issues)\n }\n this.context.controller.onKeyDown(this.context.tree, event);\n };\n TreeView.prototype.onKeyUp = function (e) {\n if (this.didJustPressContextMenuKey) {\n this.onContextMenu(e);\n }\n this.didJustPressContextMenuKey = false;\n this.context.controller.onKeyUp(this.context.tree, new Keyboard.StandardKeyboardEvent(e));\n };\n TreeView.prototype.onDragStart = function (item, e) {\n if (this.model.getHighlight()) {\n return;\n }\n var element = item.model.getElement();\n var selection = this.model.getSelection();\n var elements;\n if (selection.indexOf(element) > -1) {\n elements = selection;\n }\n else {\n elements = [element];\n }\n e.dataTransfer.effectAllowed = 'copyMove';\n e.dataTransfer.setData(DataTransfers.RESOURCES, JSON.stringify([item.uri]));\n if (e.dataTransfer.setDragImage) {\n var label = void 0;\n if (this.context.dnd.getDragLabel) {\n label = this.context.dnd.getDragLabel(this.context.tree, elements);\n }\n else {\n label = String(elements.length);\n }\n var dragImage_1 = document.createElement('div');\n dragImage_1.className = 'monaco-tree-drag-image';\n dragImage_1.textContent = label;\n document.body.appendChild(dragImage_1);\n e.dataTransfer.setDragImage(dragImage_1, -10, -10);\n setTimeout(function () { return document.body.removeChild(dragImage_1); }, 0);\n }\n this.currentDragAndDropData = new dnd.ElementsDragAndDropData(elements);\n TreeView.currentExternalDragAndDropData = new dnd.ExternalElementsDragAndDropData(elements);\n this.context.dnd.onDragStart(this.context.tree, this.currentDragAndDropData, new Mouse.DragMouseEvent(e));\n };\n TreeView.prototype.setupDragAndDropScrollInterval = function () {\n var _this = this;\n var viewTop = DOM.getTopLeftOffset(this.wrapper).top;\n if (!this.dragAndDropScrollInterval) {\n this.dragAndDropScrollInterval = window.setInterval(function () {\n if (_this.dragAndDropMouseY === undefined) {\n return;\n }\n var diff = _this.dragAndDropMouseY - viewTop;\n var scrollDiff = 0;\n var upperLimit = _this.viewHeight - 35;\n if (diff < 35) {\n scrollDiff = Math.max(-14, 0.2 * (diff - 35));\n }\n else if (diff > upperLimit) {\n scrollDiff = Math.min(14, 0.2 * (diff - upperLimit));\n }\n _this.scrollTop += scrollDiff;\n }, 10);\n this.cancelDragAndDropScrollTimeout();\n this.dragAndDropScrollTimeout = window.setTimeout(function () {\n _this.cancelDragAndDropScrollInterval();\n _this.dragAndDropScrollTimeout = null;\n }, 1000);\n }\n };\n TreeView.prototype.cancelDragAndDropScrollInterval = function () {\n if (this.dragAndDropScrollInterval) {\n window.clearInterval(this.dragAndDropScrollInterval);\n this.dragAndDropScrollInterval = null;\n }\n this.cancelDragAndDropScrollTimeout();\n };\n TreeView.prototype.cancelDragAndDropScrollTimeout = function () {\n if (this.dragAndDropScrollTimeout) {\n window.clearTimeout(this.dragAndDropScrollTimeout);\n this.dragAndDropScrollTimeout = null;\n }\n };\n TreeView.prototype.onDragOver = function (e) {\n var _this = this;\n var event = new Mouse.DragMouseEvent(e);\n var viewItem = this.getItemAround(event.target);\n if (!viewItem || (event.posx === 0 && event.posy === 0 && event.browserEvent.type === DOM.EventType.DRAG_LEAVE)) {\n // dragging outside of tree\n if (this.currentDropTarget) {\n // clear previously hovered element feedback\n this.currentDropTargets.forEach(function (i) { return i.dropTarget = false; });\n this.currentDropTargets = [];\n if (this.currentDropPromise) {\n this.currentDropPromise.cancel();\n this.currentDropPromise = null;\n }\n }\n this.cancelDragAndDropScrollInterval();\n this.currentDropTarget = null;\n this.currentDropElement = null;\n this.dragAndDropMouseY = null;\n return false;\n }\n // dragging inside the tree\n this.setupDragAndDropScrollInterval();\n this.dragAndDropMouseY = event.posy;\n if (!this.currentDragAndDropData) {\n // just started dragging\n if (TreeView.currentExternalDragAndDropData) {\n this.currentDragAndDropData = TreeView.currentExternalDragAndDropData;\n }\n else {\n if (!event.dataTransfer.types) {\n return false;\n }\n this.currentDragAndDropData = new dnd.DesktopDragAndDropData();\n }\n }\n this.currentDragAndDropData.update(event);\n var element;\n var item = viewItem.model;\n var reaction;\n // check the bubble up behavior\n do {\n element = item ? item.getElement() : this.model.getInput();\n reaction = this.context.dnd.onDragOver(this.context.tree, this.currentDragAndDropData, element, event);\n if (!reaction || reaction.bubble !== _.DragOverBubble.BUBBLE_UP) {\n break;\n }\n item = item && item.parent;\n } while (item);\n if (!item) {\n this.currentDropElement = null;\n return false;\n }\n var canDrop = reaction && reaction.accept;\n if (canDrop) {\n this.currentDropElement = item.getElement();\n event.preventDefault();\n event.dataTransfer.dropEffect = reaction.effect === _.DragOverEffect.COPY ? 'copy' : 'move';\n }\n else {\n this.currentDropElement = null;\n }\n // item is the model item where drop() should be called\n // can be null\n var currentDropTarget = item.id === this.inputItem.id ? this.inputItem : this.items[item.id];\n if (this.shouldInvalidateDropReaction || this.currentDropTarget !== currentDropTarget || !reactionEquals(this.currentDropElementReaction, reaction)) {\n this.shouldInvalidateDropReaction = false;\n if (this.currentDropTarget) {\n this.currentDropTargets.forEach(function (i) { return i.dropTarget = false; });\n this.currentDropTargets = [];\n if (this.currentDropPromise) {\n this.currentDropPromise.cancel();\n this.currentDropPromise = null;\n }\n }\n this.currentDropTarget = currentDropTarget;\n this.currentDropElementReaction = reaction;\n if (canDrop) {\n // setup hover feedback for drop target\n if (this.currentDropTarget) {\n this.currentDropTarget.dropTarget = true;\n this.currentDropTargets.push(this.currentDropTarget);\n }\n if (reaction.bubble === _.DragOverBubble.BUBBLE_DOWN) {\n var nav = item.getNavigator();\n var child;\n while (child = nav.next()) {\n viewItem = this.items[child.id];\n if (viewItem) {\n viewItem.dropTarget = true;\n this.currentDropTargets.push(viewItem);\n }\n }\n }\n if (reaction.autoExpand) {\n this.currentDropPromise = WinJS.TPromise.timeout(500)\n .then(function () { return _this.context.tree.expand(_this.currentDropElement); })\n .then(function () { return _this.shouldInvalidateDropReaction = true; });\n }\n }\n }\n return true;\n };\n TreeView.prototype.onDrop = function (e) {\n if (this.currentDropElement) {\n var event = new Mouse.DragMouseEvent(e);\n event.preventDefault();\n this.currentDragAndDropData.update(event);\n this.context.dnd.drop(this.context.tree, this.currentDragAndDropData, this.currentDropElement, event);\n this.onDragEnd(e);\n }\n this.cancelDragAndDropScrollInterval();\n };\n TreeView.prototype.onDragEnd = function (e) {\n if (this.currentDropTarget) {\n this.currentDropTargets.forEach(function (i) { return i.dropTarget = false; });\n this.currentDropTargets = [];\n }\n if (this.currentDropPromise) {\n this.currentDropPromise.cancel();\n this.currentDropPromise = null;\n }\n this.cancelDragAndDropScrollInterval();\n this.currentDragAndDropData = null;\n TreeView.currentExternalDragAndDropData = null;\n this.currentDropElement = null;\n this.currentDropTarget = null;\n this.dragAndDropMouseY = null;\n };\n TreeView.prototype.onFocus = function () {\n if (!this.context.options.alwaysFocused) {\n DOM.addClass(this.domNode, 'focused');\n }\n this._onDOMFocus.fire();\n };\n TreeView.prototype.onBlur = function () {\n if (!this.context.options.alwaysFocused) {\n DOM.removeClass(this.domNode, 'focused');\n }\n this.domNode.removeAttribute('aria-activedescendant'); // ARIA\n this._onDOMBlur.fire();\n };\n // MS specific DOM Events\n TreeView.prototype.onMsPointerDown = function (event) {\n if (!this.msGesture) {\n return;\n }\n // Circumvent IE11 breaking change in e.pointerType & TypeScript's stale definitions\n var pointerType = event.pointerType;\n if (pointerType === (event.MSPOINTER_TYPE_MOUSE || 'mouse')) {\n this.lastPointerType = 'mouse';\n return;\n }\n else if (pointerType === (event.MSPOINTER_TYPE_TOUCH || 'touch')) {\n this.lastPointerType = 'touch';\n }\n else {\n return;\n }\n event.stopPropagation();\n event.preventDefault();\n this.msGesture.addPointer(event.pointerId);\n };\n TreeView.prototype.onThrottledMsGestureChange = function (event) {\n this.scrollTop -= event.translationY;\n };\n TreeView.prototype.onMsGestureTap = function (event) {\n event.initialTarget = document.elementFromPoint(event.clientX, event.clientY);\n this.onTap(event);\n };\n // DOM changes\n TreeView.prototype.insertItemInDOM = function (item) {\n var elementAfter = null;\n var itemAfter = this.itemAfter(item);\n if (itemAfter && itemAfter.element) {\n elementAfter = itemAfter.element;\n }\n item.insertInDOM(this.rowsContainer, elementAfter);\n };\n TreeView.prototype.removeItemFromDOM = function (item) {\n if (!item) {\n return;\n }\n item.removeFromDOM();\n };\n // Helpers\n TreeView.prototype.shouldBeRendered = function (item) {\n return item.top < this.lastRenderTop + this.lastRenderHeight && item.top + item.height > this.lastRenderTop;\n };\n TreeView.prototype.getItemAround = function (element) {\n var candidate = this.inputItem;\n do {\n if (element[TreeView.BINDING]) {\n candidate = element[TreeView.BINDING];\n }\n if (element === this.wrapper || element === this.domNode) {\n return candidate;\n }\n if (element === document.body) {\n return null;\n }\n } while (element = element.parentElement);\n return undefined;\n };\n // Cleanup\n TreeView.prototype.releaseModel = function () {\n if (this.model) {\n this.modelListeners = Lifecycle.dispose(this.modelListeners);\n this.model = null;\n }\n };\n TreeView.prototype.dispose = function () {\n var _this = this;\n // TODO@joao: improve\n this.scrollableElement.dispose();\n this.releaseModel();\n this.modelListeners = null;\n this.viewListeners = Lifecycle.dispose(this.viewListeners);\n this._onDOMFocus.dispose();\n this._onDOMBlur.dispose();\n if (this.domNode.parentNode) {\n this.domNode.parentNode.removeChild(this.domNode);\n }\n this.domNode = null;\n if (this.items) {\n Object.keys(this.items).forEach(function (key) { return _this.items[key].removeFromDOM(); });\n this.items = null;\n }\n if (this.context.cache) {\n this.context.cache.dispose();\n this.context.cache = null;\n }\n _super.prototype.dispose.call(this);\n };\n TreeView.BINDING = 'monaco-tree-row';\n TreeView.LOADING_DECORATION_DELAY = 800;\n TreeView.counter = 0;\n TreeView.currentExternalDragAndDropData = null;\n return TreeView;\n}(HeightMap));\nexport { TreeView };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport './tree.css';\nimport * as TreeDefaults from './treeDefaults';\nimport * as Model from './treeModel';\nimport * as View from './treeView';\nimport { Emitter, Relay } from '../../../common/event';\nimport { Color } from '../../../common/color';\nimport { mixin } from '../../../common/objects';\nvar TreeContext = /** @class */ (function () {\n function TreeContext(tree, configuration, options) {\n if (options === void 0) { options = {}; }\n this.tree = tree;\n this.configuration = configuration;\n this.options = options;\n if (!configuration.dataSource) {\n throw new Error('You must provide a Data Source to the tree.');\n }\n this.dataSource = configuration.dataSource;\n this.renderer = configuration.renderer;\n this.controller = configuration.controller || new TreeDefaults.DefaultController({ clickBehavior: TreeDefaults.ClickBehavior.ON_MOUSE_UP, keyboardSupport: typeof options.keyboardSupport !== 'boolean' || options.keyboardSupport });\n this.dnd = configuration.dnd || new TreeDefaults.DefaultDragAndDrop();\n this.filter = configuration.filter || new TreeDefaults.DefaultFilter();\n this.sorter = configuration.sorter || null;\n this.accessibilityProvider = configuration.accessibilityProvider || new TreeDefaults.DefaultAccessibilityProvider();\n this.styler = configuration.styler || null;\n }\n return TreeContext;\n}());\nexport { TreeContext };\nvar defaultStyles = {\n listFocusBackground: Color.fromHex('#073655'),\n listActiveSelectionBackground: Color.fromHex('#0E639C'),\n listActiveSelectionForeground: Color.fromHex('#FFFFFF'),\n listFocusAndSelectionBackground: Color.fromHex('#094771'),\n listFocusAndSelectionForeground: Color.fromHex('#FFFFFF'),\n listInactiveSelectionBackground: Color.fromHex('#3F3F46'),\n listHoverBackground: Color.fromHex('#2A2D2E'),\n listDropBackground: Color.fromHex('#383B3D')\n};\nvar Tree = /** @class */ (function () {\n function Tree(container, configuration, options) {\n if (options === void 0) { options = {}; }\n this._onDidChangeFocus = new Relay();\n this.onDidChangeFocus = this._onDidChangeFocus.event;\n this._onDidChangeSelection = new Relay();\n this.onDidChangeSelection = this._onDidChangeSelection.event;\n this._onHighlightChange = new Relay();\n this._onDidExpandItem = new Relay();\n this._onDidCollapseItem = new Relay();\n this._onDispose = new Emitter();\n this.onDidDispose = this._onDispose.event;\n this.container = container;\n mixin(options, defaultStyles, false);\n options.twistiePixels = typeof options.twistiePixels === 'number' ? options.twistiePixels : 32;\n options.showTwistie = options.showTwistie === false ? false : true;\n options.indentPixels = typeof options.indentPixels === 'number' ? options.indentPixels : 12;\n options.alwaysFocused = options.alwaysFocused === true ? true : false;\n options.useShadows = options.useShadows === false ? false : true;\n options.paddingOnRow = options.paddingOnRow === false ? false : true;\n options.showLoading = options.showLoading === false ? false : true;\n this.context = new TreeContext(this, configuration, options);\n this.model = new Model.TreeModel(this.context);\n this.view = new View.TreeView(this.context, this.container);\n this.view.setModel(this.model);\n this._onDidChangeFocus.input = this.model.onDidFocus;\n this._onDidChangeSelection.input = this.model.onDidSelect;\n this._onHighlightChange.input = this.model.onDidHighlight;\n this._onDidExpandItem.input = this.model.onDidExpandItem;\n this._onDidCollapseItem.input = this.model.onDidCollapseItem;\n }\n Tree.prototype.style = function (styles) {\n this.view.applyStyles(styles);\n };\n Object.defineProperty(Tree.prototype, \"onDidFocus\", {\n get: function () {\n return this.view && this.view.onDOMFocus;\n },\n enumerable: true,\n configurable: true\n });\n Tree.prototype.getHTMLElement = function () {\n return this.view.getHTMLElement();\n };\n Tree.prototype.layout = function (height, width) {\n this.view.layout(height, width);\n };\n Tree.prototype.domFocus = function () {\n this.view.focus();\n };\n Tree.prototype.isDOMFocused = function () {\n return this.view.isFocused();\n };\n Tree.prototype.domBlur = function () {\n this.view.blur();\n };\n Tree.prototype.setInput = function (element) {\n return this.model.setInput(element);\n };\n Tree.prototype.getInput = function () {\n return this.model.getInput();\n };\n Tree.prototype.refresh = function (element, recursive) {\n if (element === void 0) { element = null; }\n if (recursive === void 0) { recursive = true; }\n return this.model.refresh(element, recursive);\n };\n Tree.prototype.expand = function (element) {\n return this.model.expand(element);\n };\n Tree.prototype.collapse = function (element, recursive) {\n if (recursive === void 0) { recursive = false; }\n return this.model.collapse(element, recursive);\n };\n Tree.prototype.toggleExpansion = function (element, recursive) {\n if (recursive === void 0) { recursive = false; }\n return this.model.toggleExpansion(element, recursive);\n };\n Tree.prototype.isExpanded = function (element) {\n return this.model.isExpanded(element);\n };\n Tree.prototype.reveal = function (element, relativeTop) {\n if (relativeTop === void 0) { relativeTop = null; }\n return this.model.reveal(element, relativeTop);\n };\n Tree.prototype.getHighlight = function () {\n return this.model.getHighlight();\n };\n Tree.prototype.clearHighlight = function (eventPayload) {\n this.model.setHighlight(null, eventPayload);\n };\n Tree.prototype.setSelection = function (elements, eventPayload) {\n this.model.setSelection(elements, eventPayload);\n };\n Tree.prototype.getSelection = function () {\n return this.model.getSelection();\n };\n Tree.prototype.clearSelection = function (eventPayload) {\n this.model.setSelection([], eventPayload);\n };\n Tree.prototype.setFocus = function (element, eventPayload) {\n this.model.setFocus(element, eventPayload);\n };\n Tree.prototype.getFocus = function () {\n return this.model.getFocus();\n };\n Tree.prototype.focusNext = function (count, eventPayload) {\n this.model.focusNext(count, eventPayload);\n };\n Tree.prototype.focusPrevious = function (count, eventPayload) {\n this.model.focusPrevious(count, eventPayload);\n };\n Tree.prototype.focusParent = function (eventPayload) {\n this.model.focusParent(eventPayload);\n };\n Tree.prototype.focusFirstChild = function (eventPayload) {\n this.model.focusFirstChild(eventPayload);\n };\n Tree.prototype.focusFirst = function (eventPayload, from) {\n this.model.focusFirst(eventPayload, from);\n };\n Tree.prototype.focusNth = function (index, eventPayload) {\n this.model.focusNth(index, eventPayload);\n };\n Tree.prototype.focusLast = function (eventPayload, from) {\n this.model.focusLast(eventPayload, from);\n };\n Tree.prototype.focusNextPage = function (eventPayload) {\n this.view.focusNextPage(eventPayload);\n };\n Tree.prototype.focusPreviousPage = function (eventPayload) {\n this.view.focusPreviousPage(eventPayload);\n };\n Tree.prototype.clearFocus = function (eventPayload) {\n this.model.setFocus(null, eventPayload);\n };\n Tree.prototype.dispose = function () {\n this._onDispose.fire();\n if (this.model !== null) {\n this.model.dispose();\n this.model = null;\n }\n if (this.view !== null) {\n this.view.dispose();\n this.view = null;\n }\n this._onDidChangeFocus.dispose();\n this._onDidChangeSelection.dispose();\n this._onHighlightChange.dispose();\n this._onDidExpandItem.dispose();\n this._onDidCollapseItem.dispose();\n this._onDispose.dispose();\n };\n return Tree;\n}());\nexport { Tree };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { createDecorator } from '../../instantiation/common/instantiation';\nvar URI_DISPLAY_SERVICE_ID = 'uriDisplay';\nexport var IUriDisplayService = createDecorator(URI_DISPLAY_SERVICE_ID);\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __param = (this && this.__param) || function (paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nimport './media/referencesWidget.css';\nimport * as nls from '../../../nls';\nimport { onUnexpectedError } from '../../../base/common/errors';\nimport { Emitter } from '../../../base/common/event';\nimport { dispose } from '../../../base/common/lifecycle';\nimport { Schemas } from '../../../base/common/network';\nimport * as strings from '../../../base/common/strings';\nimport { TPromise } from '../../../base/common/winjs.base';\nimport { Color } from '../../../base/common/color';\nimport { $ } from '../../../base/browser/builder';\nimport * as dom from '../../../base/browser/dom';\nimport { Sash } from '../../../base/browser/ui/sash/sash';\nimport { CountBadge } from '../../../base/browser/ui/countBadge/countBadge';\nimport { FileLabel } from '../../../base/browser/ui/iconLabel/iconLabel';\nimport { IInstantiationService, optional } from '../../../platform/instantiation/common/instantiation';\nimport { IWorkspaceContextService } from '../../../platform/workspace/common/workspace';\nimport { Range } from '../../common/core/range';\nimport { TextModel, ModelDecorationOptions } from '../../common/model/textModel';\nimport { EmbeddedCodeEditorWidget } from '../../browser/widget/embeddedCodeEditorWidget';\nimport { PeekViewWidget } from './peekViewWidget';\nimport { FileReferences, OneReference, ReferencesModel } from './referencesModel';\nimport { ITextModelService } from '../../common/services/resolverService';\nimport { registerColor, activeContrastBorder, contrastBorder } from '../../../platform/theme/common/colorRegistry';\nimport { registerThemingParticipant, IThemeService } from '../../../platform/theme/common/themeService';\nimport { attachBadgeStyler } from '../../../platform/theme/common/styler';\nimport { IEnvironmentService } from '../../../platform/environment/common/environment';\nimport URI from '../../../base/common/uri';\nimport { TrackedRangeStickiness } from '../../common/model';\nimport { WorkbenchTree, WorkbenchTreeController } from '../../../platform/list/browser/listService';\nimport { RawContextKey } from '../../../platform/contextkey/common/contextkey';\nimport { ClickBehavior } from '../../../base/parts/tree/browser/treeDefaults';\nimport { IUriDisplayService } from '../../../platform/uriDisplay/common/uriDisplay';\nimport { dirname, basenameOrAuthority } from '../../../base/common/resources';\nvar DecorationsManager = /** @class */ (function () {\n function DecorationsManager(_editor, _model) {\n var _this = this;\n this._editor = _editor;\n this._model = _model;\n this._decorations = new Map();\n this._decorationIgnoreSet = new Set();\n this._callOnDispose = [];\n this._callOnModelChange = [];\n this._callOnDispose.push(this._editor.onDidChangeModel(function () { return _this._onModelChanged(); }));\n this._onModelChanged();\n }\n DecorationsManager.prototype.dispose = function () {\n this._callOnModelChange = dispose(this._callOnModelChange);\n this._callOnDispose = dispose(this._callOnDispose);\n this.removeDecorations();\n };\n DecorationsManager.prototype._onModelChanged = function () {\n this._callOnModelChange = dispose(this._callOnModelChange);\n var model = this._editor.getModel();\n if (model) {\n for (var _i = 0, _a = this._model.groups; _i < _a.length; _i++) {\n var ref = _a[_i];\n if (ref.uri.toString() === model.uri.toString()) {\n this._addDecorations(ref);\n return;\n }\n }\n }\n };\n DecorationsManager.prototype._addDecorations = function (reference) {\n var _this = this;\n this._callOnModelChange.push(this._editor.getModel().onDidChangeDecorations(function (event) { return _this._onDecorationChanged(); }));\n var newDecorations = [];\n var newDecorationsActualIndex = [];\n for (var i = 0, len = reference.children.length; i < len; i++) {\n var oneReference = reference.children[i];\n if (this._decorationIgnoreSet.has(oneReference.id)) {\n continue;\n }\n newDecorations.push({\n range: oneReference.range,\n options: DecorationsManager.DecorationOptions\n });\n newDecorationsActualIndex.push(i);\n }\n var decorations = this._editor.deltaDecorations([], newDecorations);\n for (var i = 0; i < decorations.length; i++) {\n this._decorations.set(decorations[i], reference.children[newDecorationsActualIndex[i]]);\n }\n };\n DecorationsManager.prototype._onDecorationChanged = function () {\n var _this = this;\n var toRemove = [];\n this._decorations.forEach(function (reference, decorationId) {\n var newRange = _this._editor.getModel().getDecorationRange(decorationId);\n if (!newRange) {\n return;\n }\n var ignore = false;\n if (Range.equalsRange(newRange, reference.range)) {\n return;\n }\n else if (Range.spansMultipleLines(newRange)) {\n ignore = true;\n }\n else {\n var lineLength = reference.range.endColumn - reference.range.startColumn;\n var newLineLength = newRange.endColumn - newRange.startColumn;\n if (lineLength !== newLineLength) {\n ignore = true;\n }\n }\n if (ignore) {\n _this._decorationIgnoreSet.add(reference.id);\n toRemove.push(decorationId);\n }\n else {\n reference.range = newRange;\n }\n });\n for (var i = 0, len = toRemove.length; i < len; i++) {\n this._decorations.delete(toRemove[i]);\n }\n this._editor.deltaDecorations(toRemove, []);\n };\n DecorationsManager.prototype.removeDecorations = function () {\n var toRemove = [];\n this._decorations.forEach(function (value, key) {\n toRemove.push(key);\n });\n this._editor.deltaDecorations(toRemove, []);\n this._decorations.clear();\n };\n DecorationsManager.DecorationOptions = ModelDecorationOptions.register({\n stickiness: TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges,\n className: 'reference-decoration'\n });\n return DecorationsManager;\n}());\nvar DataSource = /** @class */ (function () {\n function DataSource(_textModelResolverService) {\n this._textModelResolverService = _textModelResolverService;\n //\n }\n DataSource.prototype.getId = function (tree, element) {\n if (element instanceof ReferencesModel) {\n return 'root';\n }\n else if (element instanceof FileReferences) {\n return element.id;\n }\n else if (element instanceof OneReference) {\n return element.id;\n }\n return undefined;\n };\n DataSource.prototype.hasChildren = function (tree, element) {\n if (element instanceof ReferencesModel) {\n return true;\n }\n if (element instanceof FileReferences && !element.failure) {\n return true;\n }\n return false;\n };\n DataSource.prototype.getChildren = function (tree, element) {\n if (element instanceof ReferencesModel) {\n return TPromise.as(element.groups);\n }\n else if (element instanceof FileReferences) {\n return element.resolve(this._textModelResolverService).then(function (val) {\n if (element.failure) {\n // refresh the element on failure so that\n // we can update its rendering\n return tree.refresh(element).then(function () { return val.children; });\n }\n return val.children;\n });\n }\n else {\n return TPromise.as([]);\n }\n };\n DataSource.prototype.getParent = function (tree, element) {\n var result = null;\n if (element instanceof FileReferences) {\n result = element.parent;\n }\n else if (element instanceof OneReference) {\n result = element.parent;\n }\n return TPromise.as(result);\n };\n DataSource = __decorate([\n __param(0, ITextModelService)\n ], DataSource);\n return DataSource;\n}());\nvar Controller = /** @class */ (function (_super) {\n __extends(Controller, _super);\n function Controller() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this._onDidFocus = new Emitter();\n _this.onDidFocus = _this._onDidFocus.event;\n _this._onDidSelect = new Emitter();\n _this.onDidSelect = _this._onDidSelect.event;\n _this._onDidOpenToSide = new Emitter();\n _this.onDidOpenToSide = _this._onDidOpenToSide.event;\n return _this;\n }\n Controller.prototype.onTap = function (tree, element, event) {\n if (element instanceof FileReferences) {\n event.preventDefault();\n event.stopPropagation();\n return this._expandCollapse(tree, element);\n }\n var result = _super.prototype.onTap.call(this, tree, element, event);\n this._onDidFocus.fire(element);\n return result;\n };\n Controller.prototype.onMouseDown = function (tree, element, event) {\n var isDoubleClick = event.detail === 2;\n if (event.leftButton) {\n if (element instanceof FileReferences) {\n if (this.openOnSingleClick || isDoubleClick || this.isClickOnTwistie(event)) {\n event.preventDefault();\n event.stopPropagation();\n return this._expandCollapse(tree, element);\n }\n }\n var result = _super.prototype.onClick.call(this, tree, element, event);\n var openToSide = event.ctrlKey || event.metaKey || event.altKey;\n if (openToSide && (isDoubleClick || this.openOnSingleClick)) {\n this._onDidOpenToSide.fire(element);\n }\n else if (isDoubleClick) {\n this._onDidSelect.fire(element);\n }\n else if (this.openOnSingleClick) {\n this._onDidFocus.fire(element);\n }\n return result;\n }\n return false;\n };\n Controller.prototype.onClick = function (tree, element, event) {\n if (event.leftButton) {\n return false; // Already handled by onMouseDown\n }\n return _super.prototype.onClick.call(this, tree, element, event);\n };\n Controller.prototype._expandCollapse = function (tree, element) {\n if (tree.isExpanded(element)) {\n tree.collapse(element).done(null, onUnexpectedError);\n }\n else {\n tree.expand(element).done(null, onUnexpectedError);\n }\n return true;\n };\n Controller.prototype.onEscape = function (tree, event) {\n return false;\n };\n Controller.prototype.dispose = function () {\n this._onDidFocus.dispose();\n this._onDidSelect.dispose();\n this._onDidOpenToSide.dispose();\n };\n return Controller;\n}(WorkbenchTreeController));\nvar FileReferencesTemplate = /** @class */ (function () {\n function FileReferencesTemplate(container, _contextService, _environmentService, themeService) {\n var _this = this;\n this._contextService = _contextService;\n this._environmentService = _environmentService;\n var parent = document.createElement('div');\n dom.addClass(parent, 'reference-file');\n container.appendChild(parent);\n this.file = new FileLabel(parent, URI.parse('no:file'), this._contextService, this._environmentService);\n this.badge = new CountBadge($('.count').appendTo(parent).getHTMLElement());\n var styler = attachBadgeStyler(this.badge, themeService);\n this.dispose = function () {\n _this.file.dispose();\n styler.dispose();\n };\n }\n FileReferencesTemplate.prototype.set = function (element) {\n this.file.setFile(element.uri, this._contextService, this._environmentService);\n var len = element.children.length;\n this.badge.setCount(len);\n if (element.failure) {\n this.badge.setTitleFormat(nls.localize('referencesFailre', \"Failed to resolve file.\"));\n }\n else if (len > 1) {\n this.badge.setTitleFormat(nls.localize('referencesCount', \"{0} references\", len));\n }\n else {\n this.badge.setTitleFormat(nls.localize('referenceCount', \"{0} reference\", len));\n }\n };\n FileReferencesTemplate = __decorate([\n __param(1, IWorkspaceContextService),\n __param(2, optional(IEnvironmentService)),\n __param(3, IThemeService)\n ], FileReferencesTemplate);\n return FileReferencesTemplate;\n}());\nvar OneReferenceTemplate = /** @class */ (function () {\n function OneReferenceTemplate(container) {\n var parent = document.createElement('div');\n this.before = document.createElement('span');\n this.inside = document.createElement('span');\n this.after = document.createElement('span');\n dom.addClass(this.inside, 'referenceMatch');\n dom.addClass(parent, 'reference');\n parent.appendChild(this.before);\n parent.appendChild(this.inside);\n parent.appendChild(this.after);\n container.appendChild(parent);\n }\n OneReferenceTemplate.prototype.set = function (element) {\n var _a = element.parent.preview.preview(element.range), before = _a.before, inside = _a.inside, after = _a.after;\n this.before.innerHTML = strings.escape(before);\n this.inside.innerHTML = strings.escape(inside);\n this.after.innerHTML = strings.escape(after);\n };\n return OneReferenceTemplate;\n}());\nvar Renderer = /** @class */ (function () {\n function Renderer(_contextService, _themeService, _environmentService) {\n this._contextService = _contextService;\n this._themeService = _themeService;\n this._environmentService = _environmentService;\n //\n }\n Renderer.prototype.getHeight = function (tree, element) {\n return 23;\n };\n Renderer.prototype.getTemplateId = function (tree, element) {\n if (element instanceof FileReferences) {\n return Renderer._ids.FileReferences;\n }\n else if (element instanceof OneReference) {\n return Renderer._ids.OneReference;\n }\n throw element;\n };\n Renderer.prototype.renderTemplate = function (tree, templateId, container) {\n if (templateId === Renderer._ids.FileReferences) {\n return new FileReferencesTemplate(container, this._contextService, this._environmentService, this._themeService);\n }\n else if (templateId === Renderer._ids.OneReference) {\n return new OneReferenceTemplate(container);\n }\n throw templateId;\n };\n Renderer.prototype.renderElement = function (tree, element, templateId, templateData) {\n if (element instanceof FileReferences) {\n templateData.set(element);\n }\n else if (element instanceof OneReference) {\n templateData.set(element);\n }\n else {\n throw templateId;\n }\n };\n Renderer.prototype.disposeTemplate = function (tree, templateId, templateData) {\n if (templateData instanceof FileReferencesTemplate) {\n templateData.dispose();\n }\n };\n Renderer._ids = {\n FileReferences: 'FileReferences',\n OneReference: 'OneReference'\n };\n Renderer = __decorate([\n __param(0, IWorkspaceContextService),\n __param(1, IThemeService),\n __param(2, optional(IEnvironmentService))\n ], Renderer);\n return Renderer;\n}());\nvar AriaProvider = /** @class */ (function () {\n function AriaProvider() {\n }\n AriaProvider.prototype.getAriaLabel = function (tree, element) {\n if (element instanceof FileReferences) {\n return element.getAriaMessage();\n }\n else if (element instanceof OneReference) {\n return element.getAriaMessage();\n }\n else {\n return undefined;\n }\n };\n return AriaProvider;\n}());\nvar VSash = /** @class */ (function () {\n function VSash(container, ratio) {\n var _this = this;\n this._disposables = [];\n this._onDidChangePercentages = new Emitter();\n this._ratio = ratio;\n this._sash = new Sash(container, {\n getVerticalSashLeft: function () { return _this._width * _this._ratio; },\n getVerticalSashHeight: function () { return _this._height; }\n });\n // compute the current widget clientX postion since\n // the sash works with clientX when dragging\n var clientX;\n this._disposables.push(this._sash.onDidStart(function (e) {\n clientX = e.startX - (_this._width * _this.ratio);\n }));\n this._disposables.push(this._sash.onDidChange(function (e) {\n // compute the new position of the sash and from that\n // compute the new ratio that we are using\n var newLeft = e.currentX - clientX;\n if (newLeft > 20 && newLeft + 20 < _this._width) {\n _this._ratio = newLeft / _this._width;\n _this._sash.layout();\n _this._onDidChangePercentages.fire(_this);\n }\n }));\n }\n VSash.prototype.dispose = function () {\n this._sash.dispose();\n this._onDidChangePercentages.dispose();\n dispose(this._disposables);\n };\n Object.defineProperty(VSash.prototype, \"onDidChangePercentages\", {\n get: function () {\n return this._onDidChangePercentages.event;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(VSash.prototype, \"width\", {\n set: function (value) {\n this._width = value;\n this._sash.layout();\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(VSash.prototype, \"height\", {\n set: function (value) {\n this._height = value;\n this._sash.layout();\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(VSash.prototype, \"percentages\", {\n get: function () {\n var left = 100 * this._ratio;\n var right = 100 - left;\n return [left + \"%\", right + \"%\"];\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(VSash.prototype, \"ratio\", {\n get: function () {\n return this._ratio;\n },\n enumerable: true,\n configurable: true\n });\n return VSash;\n}());\nexport var ctxReferenceWidgetSearchTreeFocused = new RawContextKey('referenceSearchTreeFocused', true);\n/**\n * ZoneWidget that is shown inside the editor\n */\nvar ReferenceWidget = /** @class */ (function (_super) {\n __extends(ReferenceWidget, _super);\n function ReferenceWidget(editor, _defaultTreeKeyboardSupport, layoutData, themeService, _textModelResolverService, _instantiationService, _uriDisplay) {\n var _this = _super.call(this, editor, { showFrame: false, showArrow: true, isResizeable: true, isAccessible: true }) || this;\n _this._defaultTreeKeyboardSupport = _defaultTreeKeyboardSupport;\n _this.layoutData = layoutData;\n _this._textModelResolverService = _textModelResolverService;\n _this._instantiationService = _instantiationService;\n _this._uriDisplay = _uriDisplay;\n _this._disposeOnNewModel = [];\n _this._callOnDispose = [];\n _this._onDidSelectReference = new Emitter();\n _this._applyTheme(themeService.getTheme());\n _this._callOnDispose.push(themeService.onThemeChange(_this._applyTheme.bind(_this)));\n _this.create();\n return _this;\n }\n ReferenceWidget.prototype._applyTheme = function (theme) {\n var borderColor = theme.getColor(peekViewBorder) || Color.transparent;\n this.style({\n arrowColor: borderColor,\n frameColor: borderColor,\n headerBackgroundColor: theme.getColor(peekViewTitleBackground) || Color.transparent,\n primaryHeadingColor: theme.getColor(peekViewTitleForeground),\n secondaryHeadingColor: theme.getColor(peekViewTitleInfoForeground)\n });\n };\n ReferenceWidget.prototype.dispose = function () {\n this.setModel(null);\n this._callOnDispose = dispose(this._callOnDispose);\n dispose(this._preview, this._previewNotAvailableMessage, this._tree, this._sash, this._previewModelReference);\n _super.prototype.dispose.call(this);\n };\n Object.defineProperty(ReferenceWidget.prototype, \"onDidSelectReference\", {\n get: function () {\n return this._onDidSelectReference.event;\n },\n enumerable: true,\n configurable: true\n });\n ReferenceWidget.prototype.show = function (where) {\n this.editor.revealRangeInCenterIfOutsideViewport(where, 0 /* Smooth */);\n _super.prototype.show.call(this, where, this.layoutData.heightInLines || 18);\n };\n ReferenceWidget.prototype.focus = function () {\n this._tree.domFocus();\n };\n ReferenceWidget.prototype._onTitleClick = function (e) {\n if (this._preview && this._preview.getModel()) {\n this._onDidSelectReference.fire({\n element: this._getFocusedReference(),\n kind: e.ctrlKey || e.metaKey || e.altKey ? 'side' : 'open',\n source: 'title'\n });\n }\n };\n ReferenceWidget.prototype._fillBody = function (containerElement) {\n var _this = this;\n var container = $(containerElement);\n this.setCssClass('reference-zone-widget');\n // message pane\n container.div({ 'class': 'messages' }, function (div) {\n _this._messageContainer = div.hide();\n });\n // editor\n container.div({ 'class': 'preview inline' }, function (div) {\n var options = {\n scrollBeyondLastLine: false,\n scrollbar: {\n verticalScrollbarSize: 14,\n horizontal: 'auto',\n useShadows: true,\n verticalHasArrows: false,\n horizontalHasArrows: false\n },\n overviewRulerLanes: 2,\n fixedOverflowWidgets: true,\n minimap: {\n enabled: false\n }\n };\n _this._preview = _this._instantiationService.createInstance(EmbeddedCodeEditorWidget, div.getHTMLElement(), options, _this.editor);\n _this._previewContainer = div.hide();\n _this._previewNotAvailableMessage = TextModel.createFromString(nls.localize('missingPreviewMessage', \"no preview available\"));\n });\n // sash\n this._sash = new VSash(containerElement, this.layoutData.ratio || .8);\n this._sash.onDidChangePercentages(function () {\n var _a = _this._sash.percentages, left = _a[0], right = _a[1];\n _this._previewContainer.style({ width: left });\n _this._treeContainer.style({ width: right });\n _this._preview.layout();\n _this._tree.layout();\n _this.layoutData.ratio = _this._sash.ratio;\n });\n // tree\n container.div({ 'class': 'ref-tree inline' }, function (div) {\n var controller = _this._instantiationService.createInstance(Controller, { keyboardSupport: _this._defaultTreeKeyboardSupport, clickBehavior: ClickBehavior.ON_MOUSE_UP /* our controller already deals with this */ });\n _this._callOnDispose.push(controller);\n var config = {\n dataSource: _this._instantiationService.createInstance(DataSource),\n renderer: _this._instantiationService.createInstance(Renderer),\n controller: controller,\n accessibilityProvider: new AriaProvider()\n };\n var options = {\n twistiePixels: 20,\n ariaLabel: nls.localize('treeAriaLabel', \"References\")\n };\n _this._tree = _this._instantiationService.createInstance(WorkbenchTree, div.getHTMLElement(), config, options);\n ctxReferenceWidgetSearchTreeFocused.bindTo(_this._tree.contextKeyService);\n // listen on selection and focus\n var onEvent = function (element, kind) {\n if (element instanceof OneReference) {\n if (kind === 'show') {\n _this._revealReference(element, false);\n }\n _this._onDidSelectReference.fire({ element: element, kind: kind, source: 'tree' });\n }\n };\n _this._disposables.push(_this._tree.onDidChangeFocus(function (event) {\n if (event && event.payload && event.payload.origin === 'keyboard') {\n onEvent(event.focus, 'show'); // only handle events from keyboard, mouse/touch is handled by other listeners below\n }\n }));\n _this._disposables.push(_this._tree.onDidChangeSelection(function (event) {\n if (event && event.payload && event.payload.origin === 'keyboard') {\n onEvent(event.selection[0], 'goto'); // only handle events from keyboard, mouse/touch is handled by other listeners below\n }\n }));\n _this._disposables.push(controller.onDidFocus(function (element) { return onEvent(element, 'show'); }));\n _this._disposables.push(controller.onDidSelect(function (element) { return onEvent(element, 'goto'); }));\n _this._disposables.push(controller.onDidOpenToSide(function (element) { return onEvent(element, 'side'); }));\n _this._treeContainer = div.hide();\n });\n };\n ReferenceWidget.prototype._doLayoutBody = function (heightInPixel, widthInPixel) {\n _super.prototype._doLayoutBody.call(this, heightInPixel, widthInPixel);\n var height = heightInPixel + 'px';\n this._sash.height = heightInPixel;\n this._sash.width = widthInPixel;\n // set height/width\n var _a = this._sash.percentages, left = _a[0], right = _a[1];\n this._previewContainer.style({ height: height, width: left });\n this._treeContainer.style({ height: height, width: right });\n // forward\n this._tree.layout(heightInPixel);\n this._preview.layout();\n // store layout data\n this.layoutData = {\n heightInLines: this._viewZone.heightInLines,\n ratio: this._sash.ratio\n };\n };\n ReferenceWidget.prototype._onWidth = function (widthInPixel) {\n this._sash.width = widthInPixel;\n this._preview.layout();\n };\n ReferenceWidget.prototype.setSelection = function (selection) {\n var _this = this;\n return this._revealReference(selection, true).then(function () {\n // show in tree\n _this._tree.setSelection([selection]);\n _this._tree.setFocus(selection);\n });\n };\n ReferenceWidget.prototype.setModel = function (newModel) {\n // clean up\n this._disposeOnNewModel = dispose(this._disposeOnNewModel);\n this._model = newModel;\n if (this._model) {\n return this._onNewModel();\n }\n return undefined;\n };\n ReferenceWidget.prototype._onNewModel = function () {\n var _this = this;\n if (this._model.empty) {\n this.setTitle('');\n this._messageContainer.innerHtml(nls.localize('noResults', \"No results\")).show();\n return TPromise.as(void 0);\n }\n this._messageContainer.hide();\n this._decorationsManager = new DecorationsManager(this._preview, this._model);\n this._disposeOnNewModel.push(this._decorationsManager);\n // listen on model changes\n this._disposeOnNewModel.push(this._model.onDidChangeReferenceRange(function (reference) { return _this._tree.refresh(reference); }));\n // listen on editor\n this._disposeOnNewModel.push(this._preview.onMouseDown(function (e) {\n var event = e.event, target = e.target;\n if (event.detail === 2) {\n _this._onDidSelectReference.fire({\n element: { uri: _this._getFocusedReference().uri, range: target.range },\n kind: (event.ctrlKey || event.metaKey || event.altKey) ? 'side' : 'open',\n source: 'editor'\n });\n }\n }));\n // make sure things are rendered\n dom.addClass(this.container, 'results-loaded');\n this._treeContainer.show();\n this._previewContainer.show();\n this._preview.layout();\n this._tree.layout();\n this.focus();\n // pick input and a reference to begin with\n var input = this._model.groups.length === 1 ? this._model.groups[0] : this._model;\n return this._tree.setInput(input);\n };\n ReferenceWidget.prototype._getFocusedReference = function () {\n var element = this._tree.getFocus();\n if (element instanceof OneReference) {\n return element;\n }\n else if (element instanceof FileReferences) {\n if (element.children.length > 0) {\n return element.children[0];\n }\n }\n return undefined;\n };\n ReferenceWidget.prototype._revealReference = function (reference, revealParent) {\n return __awaiter(this, void 0, void 0, function () {\n var promise;\n var _this = this;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n // Update widget header\n if (reference.uri.scheme !== Schemas.inMemory) {\n this.setTitle(basenameOrAuthority(reference.uri), this._uriDisplay.getLabel(dirname(reference.uri), false));\n }\n else {\n this.setTitle(nls.localize('peekView.alternateTitle', \"References\"));\n }\n promise = this._textModelResolverService.createModelReference(reference.uri);\n if (!revealParent) return [3 /*break*/, 2];\n return [4 /*yield*/, this._tree.reveal(reference.parent)];\n case 1:\n _a.sent();\n _a.label = 2;\n case 2: return [2 /*return*/, TPromise.join([promise, this._tree.reveal(reference)]).then(function (values) {\n var ref = values[0];\n if (!_this._model) {\n ref.dispose();\n // disposed\n return;\n }\n dispose(_this._previewModelReference);\n // show in editor\n var model = ref.object;\n if (model) {\n _this._previewModelReference = ref;\n var isSameModel = (_this._preview.getModel() === model.textEditorModel);\n _this._preview.setModel(model.textEditorModel);\n var sel = Range.lift(reference.range).collapseToStart();\n _this._preview.setSelection(sel);\n _this._preview.revealRangeInCenter(sel, isSameModel ? 0 /* Smooth */ : 1 /* Immediate */);\n }\n else {\n _this._preview.setModel(_this._previewNotAvailableMessage);\n ref.dispose();\n }\n }, onUnexpectedError)];\n }\n });\n });\n };\n ReferenceWidget = __decorate([\n __param(3, IThemeService),\n __param(4, ITextModelService),\n __param(5, IInstantiationService),\n __param(6, IUriDisplayService)\n ], ReferenceWidget);\n return ReferenceWidget;\n}(PeekViewWidget));\nexport { ReferenceWidget };\n// theming\nexport var peekViewTitleBackground = registerColor('peekViewTitle.background', { dark: '#1E1E1E', light: '#FFFFFF', hc: '#0C141F' }, nls.localize('peekViewTitleBackground', 'Background color of the peek view title area.'));\nexport var peekViewTitleForeground = registerColor('peekViewTitleLabel.foreground', { dark: '#FFFFFF', light: '#333333', hc: '#FFFFFF' }, nls.localize('peekViewTitleForeground', 'Color of the peek view title.'));\nexport var peekViewTitleInfoForeground = registerColor('peekViewTitleDescription.foreground', { dark: '#ccccccb3', light: '#6c6c6cb3', hc: '#FFFFFF99' }, nls.localize('peekViewTitleInfoForeground', 'Color of the peek view title info.'));\nexport var peekViewBorder = registerColor('peekView.border', { dark: '#007acc', light: '#007acc', hc: contrastBorder }, nls.localize('peekViewBorder', 'Color of the peek view borders and arrow.'));\nexport var peekViewResultsBackground = registerColor('peekViewResult.background', { dark: '#252526', light: '#F3F3F3', hc: Color.black }, nls.localize('peekViewResultsBackground', 'Background color of the peek view result list.'));\nexport var peekViewResultsMatchForeground = registerColor('peekViewResult.lineForeground', { dark: '#bbbbbb', light: '#646465', hc: Color.white }, nls.localize('peekViewResultsMatchForeground', 'Foreground color for line nodes in the peek view result list.'));\nexport var peekViewResultsFileForeground = registerColor('peekViewResult.fileForeground', { dark: Color.white, light: '#1E1E1E', hc: Color.white }, nls.localize('peekViewResultsFileForeground', 'Foreground color for file nodes in the peek view result list.'));\nexport var peekViewResultsSelectionBackground = registerColor('peekViewResult.selectionBackground', { dark: '#3399ff33', light: '#3399ff33', hc: null }, nls.localize('peekViewResultsSelectionBackground', 'Background color of the selected entry in the peek view result list.'));\nexport var peekViewResultsSelectionForeground = registerColor('peekViewResult.selectionForeground', { dark: Color.white, light: '#6C6C6C', hc: Color.white }, nls.localize('peekViewResultsSelectionForeground', 'Foreground color of the selected entry in the peek view result list.'));\nexport var peekViewEditorBackground = registerColor('peekViewEditor.background', { dark: '#001F33', light: '#F2F8FC', hc: Color.black }, nls.localize('peekViewEditorBackground', 'Background color of the peek view editor.'));\nexport var peekViewEditorGutterBackground = registerColor('peekViewEditorGutter.background', { dark: peekViewEditorBackground, light: peekViewEditorBackground, hc: peekViewEditorBackground }, nls.localize('peekViewEditorGutterBackground', 'Background color of the gutter in the peek view editor.'));\nexport var peekViewResultsMatchHighlight = registerColor('peekViewResult.matchHighlightBackground', { dark: '#ea5c004d', light: '#ea5c004d', hc: null }, nls.localize('peekViewResultsMatchHighlight', 'Match highlight color in the peek view result list.'));\nexport var peekViewEditorMatchHighlight = registerColor('peekViewEditor.matchHighlightBackground', { dark: '#ff8f0099', light: '#f5d802de', hc: null }, nls.localize('peekViewEditorMatchHighlight', 'Match highlight color in the peek view editor.'));\nexport var peekViewEditorMatchHighlightBorder = registerColor('peekViewEditor.matchHighlightBorder', { dark: null, light: null, hc: activeContrastBorder }, nls.localize('peekViewEditorMatchHighlightBorder', 'Match highlight border in the peek view editor.'));\nregisterThemingParticipant(function (theme, collector) {\n var findMatchHighlightColor = theme.getColor(peekViewResultsMatchHighlight);\n if (findMatchHighlightColor) {\n collector.addRule(\".monaco-editor .reference-zone-widget .ref-tree .referenceMatch { background-color: \" + findMatchHighlightColor + \"; }\");\n }\n var referenceHighlightColor = theme.getColor(peekViewEditorMatchHighlight);\n if (referenceHighlightColor) {\n collector.addRule(\".monaco-editor .reference-zone-widget .preview .reference-decoration { background-color: \" + referenceHighlightColor + \"; }\");\n }\n var referenceHighlightBorder = theme.getColor(peekViewEditorMatchHighlightBorder);\n if (referenceHighlightBorder) {\n collector.addRule(\".monaco-editor .reference-zone-widget .preview .reference-decoration { border: 2px solid \" + referenceHighlightBorder + \"; box-sizing: border-box; }\");\n }\n var hcOutline = theme.getColor(activeContrastBorder);\n if (hcOutline) {\n collector.addRule(\".monaco-editor .reference-zone-widget .ref-tree .referenceMatch { border: 1px dotted \" + hcOutline + \"; box-sizing: border-box; }\");\n }\n var resultsBackground = theme.getColor(peekViewResultsBackground);\n if (resultsBackground) {\n collector.addRule(\".monaco-editor .reference-zone-widget .ref-tree { background-color: \" + resultsBackground + \"; }\");\n }\n var resultsMatchForeground = theme.getColor(peekViewResultsMatchForeground);\n if (resultsMatchForeground) {\n collector.addRule(\".monaco-editor .reference-zone-widget .ref-tree { color: \" + resultsMatchForeground + \"; }\");\n }\n var resultsFileForeground = theme.getColor(peekViewResultsFileForeground);\n if (resultsFileForeground) {\n collector.addRule(\".monaco-editor .reference-zone-widget .ref-tree .reference-file { color: \" + resultsFileForeground + \"; }\");\n }\n var resultsSelectedBackground = theme.getColor(peekViewResultsSelectionBackground);\n if (resultsSelectedBackground) {\n collector.addRule(\".monaco-editor .reference-zone-widget .ref-tree .monaco-tree.focused .monaco-tree-rows > .monaco-tree-row.selected:not(.highlighted) { background-color: \" + resultsSelectedBackground + \"; }\");\n }\n var resultsSelectedForeground = theme.getColor(peekViewResultsSelectionForeground);\n if (resultsSelectedForeground) {\n collector.addRule(\".monaco-editor .reference-zone-widget .ref-tree .monaco-tree.focused .monaco-tree-rows > .monaco-tree-row.selected:not(.highlighted) { color: \" + resultsSelectedForeground + \" !important; }\");\n }\n var editorBackground = theme.getColor(peekViewEditorBackground);\n if (editorBackground) {\n collector.addRule(\".monaco-editor .reference-zone-widget .preview .monaco-editor .monaco-editor-background,\" +\n \".monaco-editor .reference-zone-widget .preview .monaco-editor .inputarea.ime-input {\" +\n (\"\\tbackground-color: \" + editorBackground + \";\") +\n \"}\");\n }\n var editorGutterBackground = theme.getColor(peekViewEditorGutterBackground);\n if (editorGutterBackground) {\n collector.addRule(\".monaco-editor .reference-zone-widget .preview .monaco-editor .margin {\" +\n (\"\\tbackground-color: \" + editorGutterBackground + \";\") +\n \"}\");\n }\n});\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __param = (this && this.__param) || function (paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nimport * as nls from '../../../nls';\nimport { onUnexpectedError } from '../../../base/common/errors';\nimport { dispose } from '../../../base/common/lifecycle';\nimport { ICodeEditorService } from '../../browser/services/codeEditorService';\nimport { IInstantiationService } from '../../../platform/instantiation/common/instantiation';\nimport { IContextKeyService, RawContextKey } from '../../../platform/contextkey/common/contextkey';\nimport { IConfigurationService } from '../../../platform/configuration/common/configuration';\nimport { IStorageService } from '../../../platform/storage/common/storage';\nimport { ReferenceWidget } from './referencesWidget';\nimport { Range } from '../../common/core/range';\nimport { Position } from '../../common/core/position';\nimport { INotificationService } from '../../../platform/notification/common/notification';\nexport var ctxReferenceSearchVisible = new RawContextKey('referenceSearchVisible', false);\nvar ReferencesController = /** @class */ (function () {\n function ReferencesController(_defaultTreeKeyboardSupport, editor, contextKeyService, _editorService, _notificationService, _instantiationService, _storageService, _configurationService) {\n this._defaultTreeKeyboardSupport = _defaultTreeKeyboardSupport;\n this._editorService = _editorService;\n this._notificationService = _notificationService;\n this._instantiationService = _instantiationService;\n this._storageService = _storageService;\n this._configurationService = _configurationService;\n this._requestIdPool = 0;\n this._disposables = [];\n this._ignoreModelChangeEvent = false;\n this._editor = editor;\n this._referenceSearchVisible = ctxReferenceSearchVisible.bindTo(contextKeyService);\n }\n ReferencesController.get = function (editor) {\n return editor.getContribution(ReferencesController.ID);\n };\n ReferencesController.prototype.getId = function () {\n return ReferencesController.ID;\n };\n ReferencesController.prototype.dispose = function () {\n this._referenceSearchVisible.reset();\n dispose(this._disposables);\n dispose(this._widget);\n dispose(this._model);\n this._widget = null;\n this._model = null;\n this._editor = null;\n };\n ReferencesController.prototype.toggleWidget = function (range, modelPromise, options) {\n var _this = this;\n // close current widget and return early is position didn't change\n var widgetPosition;\n if (this._widget) {\n widgetPosition = this._widget.position;\n }\n this.closeWidget();\n if (!!widgetPosition && range.containsPosition(widgetPosition)) {\n return null;\n }\n this._referenceSearchVisible.set(true);\n // close the widget on model/mode changes\n this._disposables.push(this._editor.onDidChangeModelLanguage(function () { _this.closeWidget(); }));\n this._disposables.push(this._editor.onDidChangeModel(function () {\n if (!_this._ignoreModelChangeEvent) {\n _this.closeWidget();\n }\n }));\n var storageKey = 'peekViewLayout';\n var data = JSON.parse(this._storageService.get(storageKey, undefined, '{}'));\n this._widget = this._instantiationService.createInstance(ReferenceWidget, this._editor, this._defaultTreeKeyboardSupport, data);\n this._widget.setTitle(nls.localize('labelLoading', \"Loading...\"));\n this._widget.show(range);\n this._disposables.push(this._widget.onDidClose(function () {\n modelPromise.cancel();\n _this._storageService.store(storageKey, JSON.stringify(_this._widget.layoutData));\n _this._widget = null;\n _this.closeWidget();\n }));\n this._disposables.push(this._widget.onDidSelectReference(function (event) {\n var element = event.element, kind = event.kind;\n switch (kind) {\n case 'open':\n if (event.source === 'editor'\n && _this._configurationService.getValue('editor.stablePeek')) {\n // when stable peek is configured we don't close\n // the peek window on selecting the editor\n break;\n }\n case 'side':\n _this.openReference(element, kind === 'side');\n break;\n case 'goto':\n if (options.onGoto) {\n options.onGoto(element);\n }\n else {\n _this._gotoReference(element);\n }\n break;\n }\n }));\n var requestId = ++this._requestIdPool;\n modelPromise.then(function (model) {\n // still current request? widget still open?\n if (requestId !== _this._requestIdPool || !_this._widget) {\n return undefined;\n }\n if (_this._model) {\n _this._model.dispose();\n }\n _this._model = model;\n // show widget\n return _this._widget.setModel(_this._model).then(function () {\n if (_this._widget) { // might have been closed\n // set title\n _this._widget.setMetaTitle(options.getMetaTitle(_this._model));\n // set 'best' selection\n var uri = _this._editor.getModel().uri;\n var pos = new Position(range.startLineNumber, range.startColumn);\n var selection = _this._model.nearestReference(uri, pos);\n if (selection) {\n return _this._widget.setSelection(selection);\n }\n }\n return undefined;\n });\n }, function (error) {\n _this._notificationService.error(error);\n });\n };\n ReferencesController.prototype.goToNextOrPreviousReference = function (fwd) {\n return __awaiter(this, void 0, void 0, function () {\n var source, target, editorFocus;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n if (!this._model) return [3 /*break*/, 3];\n source = this._model.nearestReference(this._editor.getModel().uri, this._widget.position);\n target = this._model.nextOrPreviousReference(source, fwd);\n editorFocus = this._editor.hasTextFocus();\n return [4 /*yield*/, this._widget.setSelection(target)];\n case 1:\n _a.sent();\n return [4 /*yield*/, this._gotoReference(target)];\n case 2:\n _a.sent();\n if (editorFocus) {\n this._editor.focus();\n }\n _a.label = 3;\n case 3: return [2 /*return*/];\n }\n });\n });\n };\n ReferencesController.prototype.closeWidget = function () {\n dispose(this._widget);\n this._widget = null;\n this._referenceSearchVisible.reset();\n this._disposables = dispose(this._disposables);\n dispose(this._model);\n this._model = null;\n this._editor.focus();\n this._requestIdPool += 1; // Cancel pending requests\n };\n ReferencesController.prototype._gotoReference = function (ref) {\n var _this = this;\n this._widget.hide();\n this._ignoreModelChangeEvent = true;\n var range = Range.lift(ref.range).collapseToStart();\n return this._editorService.openCodeEditor({\n resource: ref.uri,\n options: { selection: range }\n }, this._editor).then(function (openedEditor) {\n _this._ignoreModelChangeEvent = false;\n if (!openedEditor || openedEditor !== _this._editor) {\n // TODO@Alex TODO@Joh\n // when opening the current reference we might end up\n // in a different editor instance. that means we also have\n // a different instance of this reference search controller\n // and cannot hold onto the widget (which likely doesn't\n // exist). Instead of bailing out we should find the\n // 'sister' action and pass our current model on to it.\n _this.closeWidget();\n return;\n }\n _this._widget.show(range);\n _this._widget.focus();\n }, function (err) {\n _this._ignoreModelChangeEvent = false;\n onUnexpectedError(err);\n });\n };\n ReferencesController.prototype.openReference = function (ref, sideBySide) {\n var uri = ref.uri, range = ref.range;\n this._editorService.openCodeEditor({\n resource: uri,\n options: { selection: range }\n }, this._editor, sideBySide);\n // clear stage\n if (!sideBySide) {\n this.closeWidget();\n }\n };\n ReferencesController.ID = 'editor.contrib.referencesController';\n ReferencesController = __decorate([\n __param(2, IContextKeyService),\n __param(3, ICodeEditorService),\n __param(4, INotificationService),\n __param(5, IInstantiationService),\n __param(6, IStorageService),\n __param(7, IConfigurationService)\n ], ReferencesController);\n return ReferencesController;\n}());\nexport { ReferencesController };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __param = (this && this.__param) || function (paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n};\nimport './messageController.css';\nimport * as nls from '../../../nls';\nimport { setDisposableTimeout } from '../../../base/common/async';\nimport { dispose, Disposable } from '../../../base/common/lifecycle';\nimport { alert } from '../../../base/browser/ui/aria/aria';\nimport { Range } from '../../common/core/range';\nimport { registerEditorContribution, EditorCommand, registerEditorCommand } from '../../browser/editorExtensions';\nimport { ContentWidgetPositionPreference } from '../../browser/editorBrowser';\nimport { IContextKeyService, RawContextKey } from '../../../platform/contextkey/common/contextkey';\nimport { registerThemingParticipant, HIGH_CONTRAST } from '../../../platform/theme/common/themeService';\nimport { inputValidationInfoBorder, inputValidationInfoBackground } from '../../../platform/theme/common/colorRegistry';\nvar MessageController = /** @class */ (function (_super) {\n __extends(MessageController, _super);\n function MessageController(editor, contextKeyService) {\n var _this = _super.call(this) || this;\n _this._messageListeners = [];\n _this._editor = editor;\n _this._visible = MessageController.MESSAGE_VISIBLE.bindTo(contextKeyService);\n _this._register(_this._editor.onDidAttemptReadOnlyEdit(function () { return _this._onDidAttemptReadOnlyEdit(); }));\n return _this;\n }\n MessageController.get = function (editor) {\n return editor.getContribution(MessageController._id);\n };\n MessageController.prototype.getId = function () {\n return MessageController._id;\n };\n MessageController.prototype.dispose = function () {\n _super.prototype.dispose.call(this);\n this._visible.reset();\n };\n MessageController.prototype.showMessage = function (message, position) {\n var _this = this;\n alert(message);\n this._visible.set(true);\n dispose(this._messageWidget);\n this._messageListeners = dispose(this._messageListeners);\n this._messageWidget = new MessageWidget(this._editor, position, message);\n // close on blur, cursor, model change, dispose\n this._messageListeners.push(this._editor.onDidBlurEditorText(function () { return _this.closeMessage(); }));\n this._messageListeners.push(this._editor.onDidChangeCursorPosition(function () { return _this.closeMessage(); }));\n this._messageListeners.push(this._editor.onDidDispose(function () { return _this.closeMessage(); }));\n this._messageListeners.push(this._editor.onDidChangeModel(function () { return _this.closeMessage(); }));\n // close after 3s\n this._messageListeners.push(setDisposableTimeout(function () { return _this.closeMessage(); }, 3000));\n // close on mouse move\n var bounds;\n this._messageListeners.push(this._editor.onMouseMove(function (e) {\n // outside the text area\n if (!e.target.position) {\n return;\n }\n if (!bounds) {\n // define bounding box around position and first mouse occurance\n bounds = new Range(position.lineNumber - 3, 1, e.target.position.lineNumber + 3, 1);\n }\n else if (!bounds.containsPosition(e.target.position)) {\n // check if position is still in bounds\n _this.closeMessage();\n }\n }));\n };\n MessageController.prototype.closeMessage = function () {\n this._visible.reset();\n this._messageListeners = dispose(this._messageListeners);\n this._messageListeners.push(MessageWidget.fadeOut(this._messageWidget));\n };\n MessageController.prototype._onDidAttemptReadOnlyEdit = function () {\n this.showMessage(nls.localize('editor.readonly', \"Cannot edit in read-only editor\"), this._editor.getPosition());\n };\n MessageController._id = 'editor.contrib.messageController';\n MessageController.MESSAGE_VISIBLE = new RawContextKey('messageVisible', false);\n MessageController = __decorate([\n __param(1, IContextKeyService)\n ], MessageController);\n return MessageController;\n}(Disposable));\nexport { MessageController };\nvar MessageCommand = EditorCommand.bindToContribution(MessageController.get);\nregisterEditorCommand(new MessageCommand({\n id: 'leaveEditorMessage',\n precondition: MessageController.MESSAGE_VISIBLE,\n handler: function (c) { return c.closeMessage(); },\n kbOpts: {\n weight: 100 /* EditorContrib */ + 30,\n primary: 9 /* Escape */\n }\n}));\nvar MessageWidget = /** @class */ (function () {\n function MessageWidget(editor, _a, text) {\n var lineNumber = _a.lineNumber, column = _a.column;\n // Editor.IContentWidget.allowEditorOverflow\n this.allowEditorOverflow = true;\n this.suppressMouseDown = false;\n this._editor = editor;\n this._editor.revealLinesInCenterIfOutsideViewport(lineNumber, lineNumber, 0 /* Smooth */);\n this._position = { lineNumber: lineNumber, column: column - 1 };\n this._domNode = document.createElement('div');\n this._domNode.classList.add('monaco-editor-overlaymessage');\n var message = document.createElement('div');\n message.classList.add('message');\n message.textContent = text;\n this._domNode.appendChild(message);\n var anchor = document.createElement('div');\n anchor.classList.add('anchor');\n this._domNode.appendChild(anchor);\n this._editor.addContentWidget(this);\n this._domNode.classList.add('fadeIn');\n }\n MessageWidget.fadeOut = function (messageWidget) {\n var handle;\n var dispose = function () {\n messageWidget.dispose();\n clearTimeout(handle);\n messageWidget.getDomNode().removeEventListener('animationend', dispose);\n };\n handle = setTimeout(dispose, 110);\n messageWidget.getDomNode().addEventListener('animationend', dispose);\n messageWidget.getDomNode().classList.add('fadeOut');\n return { dispose: dispose };\n };\n MessageWidget.prototype.dispose = function () {\n this._editor.removeContentWidget(this);\n };\n MessageWidget.prototype.getId = function () {\n return 'messageoverlay';\n };\n MessageWidget.prototype.getDomNode = function () {\n return this._domNode;\n };\n MessageWidget.prototype.getPosition = function () {\n return { position: this._position, preference: [ContentWidgetPositionPreference.ABOVE] };\n };\n return MessageWidget;\n}());\nregisterEditorContribution(MessageController);\nregisterThemingParticipant(function (theme, collector) {\n var border = theme.getColor(inputValidationInfoBorder);\n if (border) {\n var borderWidth = theme.type === HIGH_CONTRAST ? 2 : 1;\n collector.addRule(\".monaco-editor .monaco-editor-overlaymessage .anchor { border-top-color: \" + border + \"; }\");\n collector.addRule(\".monaco-editor .monaco-editor-overlaymessage .message { border: \" + borderWidth + \"px solid \" + border + \"; }\");\n }\n var background = theme.getColor(inputValidationInfoBackground);\n if (background) {\n collector.addRule(\".monaco-editor .monaco-editor-overlaymessage .message { background-color: \" + background + \"; }\");\n }\n});\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport { createDecorator } from '../../instantiation/common/instantiation';\nexport var IProgressService = createDecorator('progressService');\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport * as nls from '../../../nls';\nimport { alert } from '../../../base/browser/ui/aria/aria';\nimport { KeyChord } from '../../../base/common/keyCodes';\nimport * as platform from '../../../base/common/platform';\nimport { ICodeEditorService } from '../../browser/services/codeEditorService';\nimport { Range } from '../../common/core/range';\nimport { registerEditorAction, EditorAction } from '../../browser/editorExtensions';\nimport { getDefinitionsAtPosition, getImplementationsAtPosition, getTypeDefinitionsAtPosition } from './goToDefinition';\nimport { ReferencesController } from '../referenceSearch/referencesController';\nimport { ReferencesModel } from '../referenceSearch/referencesModel';\nimport { PeekContext } from '../referenceSearch/peekViewWidget';\nimport { ContextKeyExpr } from '../../../platform/contextkey/common/contextkey';\nimport { MessageController } from '../message/messageController';\nimport { EditorContextKeys } from '../../common/editorContextKeys';\nimport { IProgressService } from '../../../platform/progress/common/progress';\nimport { INotificationService } from '../../../platform/notification/common/notification';\nimport { createCancelablePromise } from '../../../base/common/async';\nvar DefinitionActionConfig = /** @class */ (function () {\n function DefinitionActionConfig(openToSide, openInPeek, filterCurrent, showMessage) {\n if (openToSide === void 0) { openToSide = false; }\n if (openInPeek === void 0) { openInPeek = false; }\n if (filterCurrent === void 0) { filterCurrent = true; }\n if (showMessage === void 0) { showMessage = true; }\n this.openToSide = openToSide;\n this.openInPeek = openInPeek;\n this.filterCurrent = filterCurrent;\n this.showMessage = showMessage;\n //\n }\n return DefinitionActionConfig;\n}());\nexport { DefinitionActionConfig };\nvar DefinitionAction = /** @class */ (function (_super) {\n __extends(DefinitionAction, _super);\n function DefinitionAction(configuration, opts) {\n var _this = _super.call(this, opts) || this;\n _this._configuration = configuration;\n return _this;\n }\n DefinitionAction.prototype.run = function (accessor, editor) {\n var _this = this;\n var notificationService = accessor.get(INotificationService);\n var editorService = accessor.get(ICodeEditorService);\n var progressService = accessor.get(IProgressService);\n var model = editor.getModel();\n var pos = editor.getPosition();\n var definitionPromise = this._getDeclarationsAtPosition(model, pos).then(function (references) {\n if (model.isDisposed() || editor.getModel() !== model) {\n // new model, no more model\n return;\n }\n // * remove falsy references\n // * find reference at the current pos\n var idxOfCurrent = -1;\n var result = [];\n for (var i = 0; i < references.length; i++) {\n var reference = references[i];\n if (!reference || !reference.range) {\n continue;\n }\n var uri = reference.uri, range = reference.range;\n var newLen = result.push({\n uri: uri,\n range: range\n });\n if (_this._configuration.filterCurrent\n && uri.toString() === model.uri.toString()\n && Range.containsPosition(range, pos)\n && idxOfCurrent === -1) {\n idxOfCurrent = newLen - 1;\n }\n }\n if (result.length === 0) {\n // no result -> show message\n if (_this._configuration.showMessage) {\n var info = model.getWordAtPosition(pos);\n MessageController.get(editor).showMessage(_this._getNoResultFoundMessage(info), pos);\n }\n }\n else if (result.length === 1 && idxOfCurrent !== -1) {\n // only the position at which we are -> adjust selection\n var current = result[0];\n _this._openReference(editor, editorService, current, false);\n }\n else {\n // handle multile results\n _this._onResult(editorService, editor, new ReferencesModel(result));\n }\n }, function (err) {\n // report an error\n notificationService.error(err);\n });\n progressService.showWhile(definitionPromise, 250);\n return definitionPromise;\n };\n DefinitionAction.prototype._getDeclarationsAtPosition = function (model, position) {\n return getDefinitionsAtPosition(model, position);\n };\n DefinitionAction.prototype._getNoResultFoundMessage = function (info) {\n return info && info.word\n ? nls.localize('noResultWord', \"No definition found for '{0}'\", info.word)\n : nls.localize('generic.noResults', \"No definition found\");\n };\n DefinitionAction.prototype._getMetaTitle = function (model) {\n return model.references.length > 1 && nls.localize('meta.title', \" – {0} definitions\", model.references.length);\n };\n DefinitionAction.prototype._onResult = function (editorService, editor, model) {\n var _this = this;\n var msg = model.getAriaMessage();\n alert(msg);\n if (this._configuration.openInPeek) {\n this._openInPeek(editorService, editor, model);\n }\n else {\n var next = model.nearestReference(editor.getModel().uri, editor.getPosition());\n this._openReference(editor, editorService, next, this._configuration.openToSide).then(function (editor) {\n if (editor && model.references.length > 1) {\n _this._openInPeek(editorService, editor, model);\n }\n else {\n model.dispose();\n }\n });\n }\n };\n DefinitionAction.prototype._openReference = function (editor, editorService, reference, sideBySide) {\n var uri = reference.uri, range = reference.range;\n return editorService.openCodeEditor({\n resource: uri,\n options: {\n selection: Range.collapseToStart(range),\n revealIfOpened: true,\n revealInCenterIfOutsideViewport: true\n }\n }, editor, sideBySide);\n };\n DefinitionAction.prototype._openInPeek = function (editorService, target, model) {\n var _this = this;\n var controller = ReferencesController.get(target);\n if (controller) {\n controller.toggleWidget(target.getSelection(), createCancelablePromise(function (_) { return Promise.resolve(model); }), {\n getMetaTitle: function (model) {\n return _this._getMetaTitle(model);\n },\n onGoto: function (reference) {\n controller.closeWidget();\n return _this._openReference(target, editorService, reference, false);\n }\n });\n }\n else {\n model.dispose();\n }\n };\n return DefinitionAction;\n}(EditorAction));\nexport { DefinitionAction };\nvar goToDeclarationKb = platform.isWeb\n ? 2048 /* CtrlCmd */ | 70 /* F12 */\n : 70 /* F12 */;\nvar GoToDefinitionAction = /** @class */ (function (_super) {\n __extends(GoToDefinitionAction, _super);\n function GoToDefinitionAction() {\n return _super.call(this, new DefinitionActionConfig(), {\n id: GoToDefinitionAction.ID,\n label: nls.localize('actions.goToDecl.label', \"Go to Definition\"),\n alias: 'Go to Definition',\n precondition: ContextKeyExpr.and(EditorContextKeys.hasDefinitionProvider, EditorContextKeys.isInEmbeddedEditor.toNegated()),\n kbOpts: {\n kbExpr: EditorContextKeys.editorTextFocus,\n primary: goToDeclarationKb,\n weight: 100 /* EditorContrib */\n },\n menuOpts: {\n group: 'navigation',\n order: 1.1\n }\n }) || this;\n }\n GoToDefinitionAction.ID = 'editor.action.goToDeclaration';\n return GoToDefinitionAction;\n}(DefinitionAction));\nexport { GoToDefinitionAction };\nvar OpenDefinitionToSideAction = /** @class */ (function (_super) {\n __extends(OpenDefinitionToSideAction, _super);\n function OpenDefinitionToSideAction() {\n return _super.call(this, new DefinitionActionConfig(true), {\n id: OpenDefinitionToSideAction.ID,\n label: nls.localize('actions.goToDeclToSide.label', \"Open Definition to the Side\"),\n alias: 'Open Definition to the Side',\n precondition: ContextKeyExpr.and(EditorContextKeys.hasDefinitionProvider, EditorContextKeys.isInEmbeddedEditor.toNegated()),\n kbOpts: {\n kbExpr: EditorContextKeys.editorTextFocus,\n primary: KeyChord(2048 /* CtrlCmd */ | 41 /* KEY_K */, goToDeclarationKb),\n weight: 100 /* EditorContrib */\n }\n }) || this;\n }\n OpenDefinitionToSideAction.ID = 'editor.action.openDeclarationToTheSide';\n return OpenDefinitionToSideAction;\n}(DefinitionAction));\nexport { OpenDefinitionToSideAction };\nvar PeekDefinitionAction = /** @class */ (function (_super) {\n __extends(PeekDefinitionAction, _super);\n function PeekDefinitionAction() {\n return _super.call(this, new DefinitionActionConfig(void 0, true, false), {\n id: 'editor.action.previewDeclaration',\n label: nls.localize('actions.previewDecl.label', \"Peek Definition\"),\n alias: 'Peek Definition',\n precondition: ContextKeyExpr.and(EditorContextKeys.hasDefinitionProvider, PeekContext.notInPeekEditor, EditorContextKeys.isInEmbeddedEditor.toNegated()),\n kbOpts: {\n kbExpr: EditorContextKeys.editorTextFocus,\n primary: 512 /* Alt */ | 70 /* F12 */,\n linux: { primary: 2048 /* CtrlCmd */ | 1024 /* Shift */ | 68 /* F10 */ },\n weight: 100 /* EditorContrib */\n },\n menuOpts: {\n group: 'navigation',\n order: 1.2\n }\n }) || this;\n }\n return PeekDefinitionAction;\n}(DefinitionAction));\nexport { PeekDefinitionAction };\nvar ImplementationAction = /** @class */ (function (_super) {\n __extends(ImplementationAction, _super);\n function ImplementationAction() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n ImplementationAction.prototype._getDeclarationsAtPosition = function (model, position) {\n return getImplementationsAtPosition(model, position);\n };\n ImplementationAction.prototype._getNoResultFoundMessage = function (info) {\n return info && info.word\n ? nls.localize('goToImplementation.noResultWord', \"No implementation found for '{0}'\", info.word)\n : nls.localize('goToImplementation.generic.noResults', \"No implementation found\");\n };\n ImplementationAction.prototype._getMetaTitle = function (model) {\n return model.references.length > 1 && nls.localize('meta.implementations.title', \" – {0} implementations\", model.references.length);\n };\n return ImplementationAction;\n}(DefinitionAction));\nexport { ImplementationAction };\nvar GoToImplementationAction = /** @class */ (function (_super) {\n __extends(GoToImplementationAction, _super);\n function GoToImplementationAction() {\n return _super.call(this, new DefinitionActionConfig(), {\n id: GoToImplementationAction.ID,\n label: nls.localize('actions.goToImplementation.label', \"Go to Implementation\"),\n alias: 'Go to Implementation',\n precondition: ContextKeyExpr.and(EditorContextKeys.hasImplementationProvider, EditorContextKeys.isInEmbeddedEditor.toNegated()),\n kbOpts: {\n kbExpr: EditorContextKeys.editorTextFocus,\n primary: 2048 /* CtrlCmd */ | 70 /* F12 */,\n weight: 100 /* EditorContrib */\n }\n }) || this;\n }\n GoToImplementationAction.ID = 'editor.action.goToImplementation';\n return GoToImplementationAction;\n}(ImplementationAction));\nexport { GoToImplementationAction };\nvar PeekImplementationAction = /** @class */ (function (_super) {\n __extends(PeekImplementationAction, _super);\n function PeekImplementationAction() {\n return _super.call(this, new DefinitionActionConfig(false, true, false), {\n id: PeekImplementationAction.ID,\n label: nls.localize('actions.peekImplementation.label', \"Peek Implementation\"),\n alias: 'Peek Implementation',\n precondition: ContextKeyExpr.and(EditorContextKeys.hasImplementationProvider, EditorContextKeys.isInEmbeddedEditor.toNegated()),\n kbOpts: {\n kbExpr: EditorContextKeys.editorTextFocus,\n primary: 2048 /* CtrlCmd */ | 1024 /* Shift */ | 70 /* F12 */,\n weight: 100 /* EditorContrib */\n }\n }) || this;\n }\n PeekImplementationAction.ID = 'editor.action.peekImplementation';\n return PeekImplementationAction;\n}(ImplementationAction));\nexport { PeekImplementationAction };\nvar TypeDefinitionAction = /** @class */ (function (_super) {\n __extends(TypeDefinitionAction, _super);\n function TypeDefinitionAction() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n TypeDefinitionAction.prototype._getDeclarationsAtPosition = function (model, position) {\n return getTypeDefinitionsAtPosition(model, position);\n };\n TypeDefinitionAction.prototype._getNoResultFoundMessage = function (info) {\n return info && info.word\n ? nls.localize('goToTypeDefinition.noResultWord', \"No type definition found for '{0}'\", info.word)\n : nls.localize('goToTypeDefinition.generic.noResults', \"No type definition found\");\n };\n TypeDefinitionAction.prototype._getMetaTitle = function (model) {\n return model.references.length > 1 && nls.localize('meta.typeDefinitions.title', \" – {0} type definitions\", model.references.length);\n };\n return TypeDefinitionAction;\n}(DefinitionAction));\nexport { TypeDefinitionAction };\nvar GoToTypeDefinitionAction = /** @class */ (function (_super) {\n __extends(GoToTypeDefinitionAction, _super);\n function GoToTypeDefinitionAction() {\n return _super.call(this, new DefinitionActionConfig(), {\n id: GoToTypeDefinitionAction.ID,\n label: nls.localize('actions.goToTypeDefinition.label', \"Go to Type Definition\"),\n alias: 'Go to Type Definition',\n precondition: ContextKeyExpr.and(EditorContextKeys.hasTypeDefinitionProvider, EditorContextKeys.isInEmbeddedEditor.toNegated()),\n kbOpts: {\n kbExpr: EditorContextKeys.editorTextFocus,\n primary: 0,\n weight: 100 /* EditorContrib */\n },\n menuOpts: {\n group: 'navigation',\n order: 1.4\n }\n }) || this;\n }\n GoToTypeDefinitionAction.ID = 'editor.action.goToTypeDefinition';\n return GoToTypeDefinitionAction;\n}(TypeDefinitionAction));\nexport { GoToTypeDefinitionAction };\nvar PeekTypeDefinitionAction = /** @class */ (function (_super) {\n __extends(PeekTypeDefinitionAction, _super);\n function PeekTypeDefinitionAction() {\n return _super.call(this, new DefinitionActionConfig(false, true, false), {\n id: PeekTypeDefinitionAction.ID,\n label: nls.localize('actions.peekTypeDefinition.label', \"Peek Type Definition\"),\n alias: 'Peek Type Definition',\n precondition: ContextKeyExpr.and(EditorContextKeys.hasTypeDefinitionProvider, EditorContextKeys.isInEmbeddedEditor.toNegated()),\n kbOpts: {\n kbExpr: EditorContextKeys.editorTextFocus,\n primary: 0,\n weight: 100 /* EditorContrib */\n }\n }) || this;\n }\n PeekTypeDefinitionAction.ID = 'editor.action.peekTypeDefinition';\n return PeekTypeDefinitionAction;\n}(TypeDefinitionAction));\nexport { PeekTypeDefinitionAction };\nregisterEditorAction(GoToDefinitionAction);\nregisterEditorAction(OpenDefinitionToSideAction);\nregisterEditorAction(PeekDefinitionAction);\nregisterEditorAction(GoToImplementationAction);\nregisterEditorAction(PeekImplementationAction);\nregisterEditorAction(GoToTypeDefinitionAction);\nregisterEditorAction(PeekTypeDefinitionAction);\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport { createDecorator } from '../../../platform/instantiation/common/instantiation';\nexport var IModeService = createDecorator('modeService');\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport './goToDefinitionMouse.css';\nimport * as browser from '../../../base/browser/browser';\nimport { Disposable } from '../../../base/common/lifecycle';\nimport { Emitter } from '../../../base/common/event';\nimport * as platform from '../../../base/common/platform';\nfunction hasModifier(e, modifier) {\n return !!e[modifier];\n}\n/**\n * An event that encapsulates the various trigger modifiers logic needed for go to definition.\n */\nvar ClickLinkMouseEvent = /** @class */ (function () {\n function ClickLinkMouseEvent(source, opts) {\n this.target = source.target;\n this.hasTriggerModifier = hasModifier(source.event, opts.triggerModifier);\n this.hasSideBySideModifier = hasModifier(source.event, opts.triggerSideBySideModifier);\n this.isNoneOrSingleMouseDown = (browser.isIE || source.event.detail <= 1); // IE does not support event.detail properly\n }\n return ClickLinkMouseEvent;\n}());\nexport { ClickLinkMouseEvent };\n/**\n * An event that encapsulates the various trigger modifiers logic needed for go to definition.\n */\nvar ClickLinkKeyboardEvent = /** @class */ (function () {\n function ClickLinkKeyboardEvent(source, opts) {\n this.keyCodeIsTriggerKey = (source.keyCode === opts.triggerKey);\n this.keyCodeIsSideBySideKey = (source.keyCode === opts.triggerSideBySideKey);\n this.hasTriggerModifier = hasModifier(source, opts.triggerModifier);\n }\n return ClickLinkKeyboardEvent;\n}());\nexport { ClickLinkKeyboardEvent };\nvar ClickLinkOptions = /** @class */ (function () {\n function ClickLinkOptions(triggerKey, triggerModifier, triggerSideBySideKey, triggerSideBySideModifier) {\n this.triggerKey = triggerKey;\n this.triggerModifier = triggerModifier;\n this.triggerSideBySideKey = triggerSideBySideKey;\n this.triggerSideBySideModifier = triggerSideBySideModifier;\n }\n ClickLinkOptions.prototype.equals = function (other) {\n return (this.triggerKey === other.triggerKey\n && this.triggerModifier === other.triggerModifier\n && this.triggerSideBySideKey === other.triggerSideBySideKey\n && this.triggerSideBySideModifier === other.triggerSideBySideModifier);\n };\n return ClickLinkOptions;\n}());\nexport { ClickLinkOptions };\nfunction createOptions(multiCursorModifier) {\n if (multiCursorModifier === 'altKey') {\n if (platform.isMacintosh) {\n return new ClickLinkOptions(57 /* Meta */, 'metaKey', 6 /* Alt */, 'altKey');\n }\n return new ClickLinkOptions(5 /* Ctrl */, 'ctrlKey', 6 /* Alt */, 'altKey');\n }\n if (platform.isMacintosh) {\n return new ClickLinkOptions(6 /* Alt */, 'altKey', 57 /* Meta */, 'metaKey');\n }\n return new ClickLinkOptions(6 /* Alt */, 'altKey', 5 /* Ctrl */, 'ctrlKey');\n}\nvar ClickLinkGesture = /** @class */ (function (_super) {\n __extends(ClickLinkGesture, _super);\n function ClickLinkGesture(editor) {\n var _this = _super.call(this) || this;\n _this._onMouseMoveOrRelevantKeyDown = _this._register(new Emitter());\n _this.onMouseMoveOrRelevantKeyDown = _this._onMouseMoveOrRelevantKeyDown.event;\n _this._onExecute = _this._register(new Emitter());\n _this.onExecute = _this._onExecute.event;\n _this._onCancel = _this._register(new Emitter());\n _this.onCancel = _this._onCancel.event;\n _this._editor = editor;\n _this._opts = createOptions(_this._editor.getConfiguration().multiCursorModifier);\n _this.lastMouseMoveEvent = null;\n _this.hasTriggerKeyOnMouseDown = false;\n _this._register(_this._editor.onDidChangeConfiguration(function (e) {\n if (e.multiCursorModifier) {\n var newOpts = createOptions(_this._editor.getConfiguration().multiCursorModifier);\n if (_this._opts.equals(newOpts)) {\n return;\n }\n _this._opts = newOpts;\n _this.lastMouseMoveEvent = null;\n _this.hasTriggerKeyOnMouseDown = false;\n _this._onCancel.fire();\n }\n }));\n _this._register(_this._editor.onMouseMove(function (e) { return _this.onEditorMouseMove(new ClickLinkMouseEvent(e, _this._opts)); }));\n _this._register(_this._editor.onMouseDown(function (e) { return _this.onEditorMouseDown(new ClickLinkMouseEvent(e, _this._opts)); }));\n _this._register(_this._editor.onMouseUp(function (e) { return _this.onEditorMouseUp(new ClickLinkMouseEvent(e, _this._opts)); }));\n _this._register(_this._editor.onKeyDown(function (e) { return _this.onEditorKeyDown(new ClickLinkKeyboardEvent(e, _this._opts)); }));\n _this._register(_this._editor.onKeyUp(function (e) { return _this.onEditorKeyUp(new ClickLinkKeyboardEvent(e, _this._opts)); }));\n _this._register(_this._editor.onMouseDrag(function () { return _this.resetHandler(); }));\n _this._register(_this._editor.onDidChangeCursorSelection(function (e) { return _this.onDidChangeCursorSelection(e); }));\n _this._register(_this._editor.onDidChangeModel(function (e) { return _this.resetHandler(); }));\n _this._register(_this._editor.onDidChangeModelContent(function () { return _this.resetHandler(); }));\n _this._register(_this._editor.onDidScrollChange(function (e) {\n if (e.scrollTopChanged || e.scrollLeftChanged) {\n _this.resetHandler();\n }\n }));\n return _this;\n }\n ClickLinkGesture.prototype.onDidChangeCursorSelection = function (e) {\n if (e.selection && e.selection.startColumn !== e.selection.endColumn) {\n this.resetHandler(); // immediately stop this feature if the user starts to select (https://github.com/Microsoft/vscode/issues/7827)\n }\n };\n ClickLinkGesture.prototype.onEditorMouseMove = function (mouseEvent) {\n this.lastMouseMoveEvent = mouseEvent;\n this._onMouseMoveOrRelevantKeyDown.fire([mouseEvent, null]);\n };\n ClickLinkGesture.prototype.onEditorMouseDown = function (mouseEvent) {\n // We need to record if we had the trigger key on mouse down because someone might select something in the editor\n // holding the mouse down and then while mouse is down start to press Ctrl/Cmd to start a copy operation and then\n // release the mouse button without wanting to do the navigation.\n // With this flag we prevent goto definition if the mouse was down before the trigger key was pressed.\n this.hasTriggerKeyOnMouseDown = mouseEvent.hasTriggerModifier;\n };\n ClickLinkGesture.prototype.onEditorMouseUp = function (mouseEvent) {\n if (this.hasTriggerKeyOnMouseDown) {\n this._onExecute.fire(mouseEvent);\n }\n };\n ClickLinkGesture.prototype.onEditorKeyDown = function (e) {\n if (this.lastMouseMoveEvent\n && (e.keyCodeIsTriggerKey // User just pressed Ctrl/Cmd (normal goto definition)\n || (e.keyCodeIsSideBySideKey && e.hasTriggerModifier) // User pressed Ctrl/Cmd+Alt (goto definition to the side)\n )) {\n this._onMouseMoveOrRelevantKeyDown.fire([this.lastMouseMoveEvent, e]);\n }\n else if (e.hasTriggerModifier) {\n this._onCancel.fire(); // remove decorations if user holds another key with ctrl/cmd to prevent accident goto declaration\n }\n };\n ClickLinkGesture.prototype.onEditorKeyUp = function (e) {\n if (e.keyCodeIsTriggerKey) {\n this._onCancel.fire();\n }\n };\n ClickLinkGesture.prototype.resetHandler = function () {\n this.lastMouseMoveEvent = null;\n this.hasTriggerKeyOnMouseDown = false;\n this._onCancel.fire();\n };\n return ClickLinkGesture;\n}(Disposable));\nexport { ClickLinkGesture };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport { createDecorator } from '../../instantiation/common/instantiation';\nimport { localize } from '../../../nls';\nimport Severity from '../../../base/common/severity';\nexport var MarkerTag;\n(function (MarkerTag) {\n MarkerTag[MarkerTag[\"Unnecessary\"] = 1] = \"Unnecessary\";\n})(MarkerTag || (MarkerTag = {}));\nexport var MarkerSeverity;\n(function (MarkerSeverity) {\n MarkerSeverity[MarkerSeverity[\"Hint\"] = 1] = \"Hint\";\n MarkerSeverity[MarkerSeverity[\"Info\"] = 2] = \"Info\";\n MarkerSeverity[MarkerSeverity[\"Warning\"] = 4] = \"Warning\";\n MarkerSeverity[MarkerSeverity[\"Error\"] = 8] = \"Error\";\n})(MarkerSeverity || (MarkerSeverity = {}));\n(function (MarkerSeverity) {\n function compare(a, b) {\n return b - a;\n }\n MarkerSeverity.compare = compare;\n var _displayStrings = Object.create(null);\n _displayStrings[MarkerSeverity.Error] = localize('sev.error', \"Error\");\n _displayStrings[MarkerSeverity.Warning] = localize('sev.warning', \"Warning\");\n _displayStrings[MarkerSeverity.Info] = localize('sev.info', \"Info\");\n function toString(a) {\n return _displayStrings[a] || '';\n }\n MarkerSeverity.toString = toString;\n function fromSeverity(severity) {\n switch (severity) {\n case Severity.Error: return MarkerSeverity.Error;\n case Severity.Warning: return MarkerSeverity.Warning;\n case Severity.Info: return MarkerSeverity.Info;\n case Severity.Ignore: return MarkerSeverity.Hint;\n }\n }\n MarkerSeverity.fromSeverity = fromSeverity;\n})(MarkerSeverity || (MarkerSeverity = {}));\nexport var IMarkerData;\n(function (IMarkerData) {\n var emptyString = '';\n function makeKey(markerData) {\n var result = [emptyString];\n if (markerData.source) {\n result.push(markerData.source.replace('¦', '\\¦'));\n }\n else {\n result.push(emptyString);\n }\n if (markerData.code) {\n result.push(markerData.code.replace('¦', '\\¦'));\n }\n else {\n result.push(emptyString);\n }\n if (markerData.severity !== void 0 && markerData.severity !== null) {\n result.push(MarkerSeverity.toString(markerData.severity));\n }\n else {\n result.push(emptyString);\n }\n if (markerData.message) {\n result.push(markerData.message.replace('¦', '\\¦'));\n }\n else {\n result.push(emptyString);\n }\n if (markerData.startLineNumber !== void 0 && markerData.startLineNumber !== null) {\n result.push(markerData.startLineNumber.toString());\n }\n else {\n result.push(emptyString);\n }\n if (markerData.startColumn !== void 0 && markerData.startColumn !== null) {\n result.push(markerData.startColumn.toString());\n }\n else {\n result.push(emptyString);\n }\n if (markerData.endLineNumber !== void 0 && markerData.endLineNumber !== null) {\n result.push(markerData.endLineNumber.toString());\n }\n else {\n result.push(emptyString);\n }\n if (markerData.endColumn !== void 0 && markerData.endColumn !== null) {\n result.push(markerData.endColumn.toString());\n }\n else {\n result.push(emptyString);\n }\n result.push(emptyString);\n return result.join('¦');\n }\n IMarkerData.makeKey = makeKey;\n})(IMarkerData || (IMarkerData = {}));\nexport var IMarkerService = createDecorator('markerService');\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __param = (this && this.__param) || function (paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n};\nimport './goToDefinitionMouse.css';\nimport * as nls from '../../../nls';\nimport { Throttler } from '../../../base/common/async';\nimport { onUnexpectedError } from '../../../base/common/errors';\nimport { MarkdownString } from '../../../base/common/htmlContent';\nimport { TPromise } from '../../../base/common/winjs.base';\nimport { IModeService } from '../../common/services/modeService';\nimport { Range } from '../../common/core/range';\nimport { DefinitionProviderRegistry } from '../../common/modes';\nimport { MouseTargetType } from '../../browser/editorBrowser';\nimport { registerEditorContribution } from '../../browser/editorExtensions';\nimport { getDefinitionsAtPosition } from './goToDefinition';\nimport { dispose } from '../../../base/common/lifecycle';\nimport { ITextModelService } from '../../common/services/resolverService';\nimport { registerThemingParticipant } from '../../../platform/theme/common/themeService';\nimport { editorActiveLinkForeground } from '../../../platform/theme/common/colorRegistry';\nimport { EditorState } from '../../browser/core/editorState';\nimport { DefinitionAction, DefinitionActionConfig } from './goToDefinitionCommands';\nimport { ClickLinkGesture } from './clickLinkGesture';\nimport { Position } from '../../common/core/position';\nvar GotoDefinitionWithMouseEditorContribution = /** @class */ (function () {\n function GotoDefinitionWithMouseEditorContribution(editor, textModelResolverService, modeService) {\n var _this = this;\n this.textModelResolverService = textModelResolverService;\n this.modeService = modeService;\n this.toUnhook = [];\n this.decorations = [];\n this.editor = editor;\n this.throttler = new Throttler();\n var linkGesture = new ClickLinkGesture(editor);\n this.toUnhook.push(linkGesture);\n this.toUnhook.push(linkGesture.onMouseMoveOrRelevantKeyDown(function (_a) {\n var mouseEvent = _a[0], keyboardEvent = _a[1];\n _this.startFindDefinition(mouseEvent, keyboardEvent);\n }));\n this.toUnhook.push(linkGesture.onExecute(function (mouseEvent) {\n if (_this.isEnabled(mouseEvent)) {\n _this.gotoDefinition(mouseEvent.target, mouseEvent.hasSideBySideModifier).done(function () {\n _this.removeDecorations();\n }, function (error) {\n _this.removeDecorations();\n onUnexpectedError(error);\n });\n }\n }));\n this.toUnhook.push(linkGesture.onCancel(function () {\n _this.removeDecorations();\n _this.currentWordUnderMouse = null;\n }));\n }\n GotoDefinitionWithMouseEditorContribution.prototype.startFindDefinition = function (mouseEvent, withKey) {\n var _this = this;\n if (!this.isEnabled(mouseEvent, withKey)) {\n this.currentWordUnderMouse = null;\n this.removeDecorations();\n return;\n }\n // Find word at mouse position\n var position = mouseEvent.target.position;\n var word = position ? this.editor.getModel().getWordAtPosition(position) : null;\n if (!word) {\n this.currentWordUnderMouse = null;\n this.removeDecorations();\n return;\n }\n // Return early if word at position is still the same\n if (this.currentWordUnderMouse && this.currentWordUnderMouse.startColumn === word.startColumn && this.currentWordUnderMouse.endColumn === word.endColumn && this.currentWordUnderMouse.word === word.word) {\n return;\n }\n this.currentWordUnderMouse = word;\n // Find definition and decorate word if found\n var state = new EditorState(this.editor, 4 /* Position */ | 1 /* Value */ | 2 /* Selection */ | 8 /* Scroll */);\n this.throttler.queue(function () {\n return state.validate(_this.editor)\n ? _this.findDefinition(mouseEvent.target)\n : TPromise.wrap(null);\n }).then(function (results) {\n if (!results || !results.length || !state.validate(_this.editor)) {\n _this.removeDecorations();\n return;\n }\n // Multiple results\n if (results.length > 1) {\n _this.addDecoration(new Range(position.lineNumber, word.startColumn, position.lineNumber, word.endColumn), new MarkdownString().appendText(nls.localize('multipleResults', \"Click to show {0} definitions.\", results.length)));\n }\n // Single result\n else {\n var result_1 = results[0];\n if (!result_1.uri) {\n return;\n }\n _this.textModelResolverService.createModelReference(result_1.uri).then(function (ref) {\n if (!ref.object || !ref.object.textEditorModel) {\n ref.dispose();\n return;\n }\n var textEditorModel = ref.object.textEditorModel;\n var startLineNumber = result_1.range.startLineNumber;\n if (textEditorModel.getLineMaxColumn(startLineNumber) === 0) {\n ref.dispose();\n return;\n }\n var previewValue = _this.getPreviewValue(textEditorModel, startLineNumber);\n var wordRange;\n if (result_1.origin) {\n wordRange = Range.lift(result_1.origin);\n }\n else {\n wordRange = new Range(position.lineNumber, word.startColumn, position.lineNumber, word.endColumn);\n }\n _this.addDecoration(wordRange, new MarkdownString().appendCodeblock(_this.modeService.getModeIdByFilenameOrFirstLine(textEditorModel.uri.fsPath), previewValue));\n ref.dispose();\n });\n }\n }).done(undefined, onUnexpectedError);\n };\n GotoDefinitionWithMouseEditorContribution.prototype.getPreviewValue = function (textEditorModel, startLineNumber) {\n var rangeToUse = this.getPreviewRangeBasedOnBrackets(textEditorModel, startLineNumber);\n var numberOfLinesInRange = rangeToUse.endLineNumber - rangeToUse.startLineNumber;\n if (numberOfLinesInRange >= GotoDefinitionWithMouseEditorContribution.MAX_SOURCE_PREVIEW_LINES) {\n rangeToUse = this.getPreviewRangeBasedOnIndentation(textEditorModel, startLineNumber);\n }\n var previewValue = this.stripIndentationFromPreviewRange(textEditorModel, startLineNumber, rangeToUse);\n return previewValue;\n };\n GotoDefinitionWithMouseEditorContribution.prototype.stripIndentationFromPreviewRange = function (textEditorModel, startLineNumber, previewRange) {\n var startIndent = textEditorModel.getLineFirstNonWhitespaceColumn(startLineNumber);\n var minIndent = startIndent;\n for (var endLineNumber = startLineNumber + 1; endLineNumber < previewRange.endLineNumber; endLineNumber++) {\n var endIndent = textEditorModel.getLineFirstNonWhitespaceColumn(endLineNumber);\n minIndent = Math.min(minIndent, endIndent);\n }\n var previewValue = textEditorModel.getValueInRange(previewRange).replace(new RegExp(\"^\\\\s{\" + (minIndent - 1) + \"}\", 'gm'), '').trim();\n return previewValue;\n };\n GotoDefinitionWithMouseEditorContribution.prototype.getPreviewRangeBasedOnIndentation = function (textEditorModel, startLineNumber) {\n var startIndent = textEditorModel.getLineFirstNonWhitespaceColumn(startLineNumber);\n var maxLineNumber = Math.min(textEditorModel.getLineCount(), startLineNumber + GotoDefinitionWithMouseEditorContribution.MAX_SOURCE_PREVIEW_LINES);\n var endLineNumber = startLineNumber + 1;\n for (; endLineNumber < maxLineNumber; endLineNumber++) {\n var endIndent = textEditorModel.getLineFirstNonWhitespaceColumn(endLineNumber);\n if (startIndent === endIndent) {\n break;\n }\n }\n return new Range(startLineNumber, 1, endLineNumber + 1, 1);\n };\n GotoDefinitionWithMouseEditorContribution.prototype.getPreviewRangeBasedOnBrackets = function (textEditorModel, startLineNumber) {\n var maxLineNumber = Math.min(textEditorModel.getLineCount(), startLineNumber + GotoDefinitionWithMouseEditorContribution.MAX_SOURCE_PREVIEW_LINES);\n var brackets = [];\n var ignoreFirstEmpty = true;\n var currentBracket = textEditorModel.findNextBracket(new Position(startLineNumber, 1));\n while (currentBracket !== null) {\n if (brackets.length === 0) {\n brackets.push(currentBracket);\n }\n else {\n var lastBracket = brackets[brackets.length - 1];\n if (lastBracket.open === currentBracket.open && lastBracket.isOpen && !currentBracket.isOpen) {\n brackets.pop();\n }\n else {\n brackets.push(currentBracket);\n }\n if (brackets.length === 0) {\n if (ignoreFirstEmpty) {\n ignoreFirstEmpty = false;\n }\n else {\n return new Range(startLineNumber, 1, currentBracket.range.endLineNumber + 1, 1);\n }\n }\n }\n var maxColumn = textEditorModel.getLineMaxColumn(startLineNumber);\n var nextLineNumber = currentBracket.range.endLineNumber;\n var nextColumn = currentBracket.range.endColumn;\n if (maxColumn === currentBracket.range.endColumn) {\n nextLineNumber++;\n nextColumn = 1;\n }\n if (nextLineNumber > maxLineNumber) {\n return new Range(startLineNumber, 1, maxLineNumber + 1, 1);\n }\n currentBracket = textEditorModel.findNextBracket(new Position(nextLineNumber, nextColumn));\n }\n return new Range(startLineNumber, 1, maxLineNumber + 1, 1);\n };\n GotoDefinitionWithMouseEditorContribution.prototype.addDecoration = function (range, hoverMessage) {\n var newDecorations = {\n range: range,\n options: {\n inlineClassName: 'goto-definition-link',\n hoverMessage: hoverMessage\n }\n };\n this.decorations = this.editor.deltaDecorations(this.decorations, [newDecorations]);\n };\n GotoDefinitionWithMouseEditorContribution.prototype.removeDecorations = function () {\n if (this.decorations.length > 0) {\n this.decorations = this.editor.deltaDecorations(this.decorations, []);\n }\n };\n GotoDefinitionWithMouseEditorContribution.prototype.isEnabled = function (mouseEvent, withKey) {\n return this.editor.getModel() &&\n mouseEvent.isNoneOrSingleMouseDown &&\n mouseEvent.target.type === MouseTargetType.CONTENT_TEXT &&\n (mouseEvent.hasTriggerModifier || (withKey && withKey.keyCodeIsTriggerKey)) &&\n DefinitionProviderRegistry.has(this.editor.getModel());\n };\n GotoDefinitionWithMouseEditorContribution.prototype.findDefinition = function (target) {\n var model = this.editor.getModel();\n if (!model) {\n return TPromise.as(null);\n }\n return getDefinitionsAtPosition(model, target.position);\n };\n GotoDefinitionWithMouseEditorContribution.prototype.gotoDefinition = function (target, sideBySide) {\n var _this = this;\n this.editor.setPosition(target.position);\n var action = new DefinitionAction(new DefinitionActionConfig(sideBySide, false, true, false), { alias: undefined, label: undefined, id: undefined, precondition: undefined });\n return this.editor.invokeWithinContext(function (accessor) { return action.run(accessor, _this.editor); });\n };\n GotoDefinitionWithMouseEditorContribution.prototype.getId = function () {\n return GotoDefinitionWithMouseEditorContribution.ID;\n };\n GotoDefinitionWithMouseEditorContribution.prototype.dispose = function () {\n this.toUnhook = dispose(this.toUnhook);\n };\n GotoDefinitionWithMouseEditorContribution.ID = 'editor.contrib.gotodefinitionwithmouse';\n GotoDefinitionWithMouseEditorContribution.MAX_SOURCE_PREVIEW_LINES = 8;\n GotoDefinitionWithMouseEditorContribution = __decorate([\n __param(1, ITextModelService),\n __param(2, IModeService)\n ], GotoDefinitionWithMouseEditorContribution);\n return GotoDefinitionWithMouseEditorContribution;\n}());\nregisterEditorContribution(GotoDefinitionWithMouseEditorContribution);\nregisterThemingParticipant(function (theme, collector) {\n var activeLinkForeground = theme.getColor(editorActiveLinkForeground);\n if (activeLinkForeground) {\n collector.addRule(\".monaco-editor .goto-definition-link { color: \" + activeLinkForeground + \" !important; }\");\n }\n});\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport './gotoErrorWidget.css';\nimport * as nls from '../../../nls';\nimport * as dom from '../../../base/browser/dom';\nimport { dispose } from '../../../base/common/lifecycle';\nimport { MarkerSeverity } from '../../../platform/markers/common/markers';\nimport { Range } from '../../common/core/range';\nimport { ZoneWidget } from '../zoneWidget/zoneWidget';\nimport { registerColor, oneOf } from '../../../platform/theme/common/colorRegistry';\nimport { Color } from '../../../base/common/color';\nimport { editorErrorForeground, editorErrorBorder, editorWarningForeground, editorWarningBorder, editorInfoForeground, editorInfoBorder } from '../../common/view/editorColorRegistry';\nimport { ScrollableElement } from '../../../base/browser/ui/scrollbar/scrollableElement';\nimport { ScrollbarVisibility } from '../../../base/common/scrollable';\nimport { getBaseLabel, getPathLabel } from '../../../base/common/labels';\nimport { isFalsyOrEmpty } from '../../../base/common/arrays';\nimport { Emitter } from '../../../base/common/event';\nvar MessageWidget = /** @class */ (function () {\n function MessageWidget(parent, editor, onRelatedInformation) {\n var _this = this;\n this._lines = 0;\n this._longestLineLength = 0;\n this._relatedDiagnostics = new WeakMap();\n this._disposables = [];\n this._editor = editor;\n var domNode = document.createElement('div');\n domNode.className = 'descriptioncontainer';\n domNode.setAttribute('aria-live', 'assertive');\n domNode.setAttribute('role', 'alert');\n this._messageBlock = document.createElement('div');\n domNode.appendChild(this._messageBlock);\n this._relatedBlock = document.createElement('div');\n domNode.appendChild(this._relatedBlock);\n this._disposables.push(dom.addStandardDisposableListener(this._relatedBlock, 'click', function (event) {\n event.preventDefault();\n var related = _this._relatedDiagnostics.get(event.target);\n if (related) {\n onRelatedInformation(related);\n }\n }));\n this._scrollable = new ScrollableElement(domNode, {\n horizontal: ScrollbarVisibility.Auto,\n vertical: ScrollbarVisibility.Auto,\n useShadows: false,\n horizontalScrollbarSize: 3,\n verticalScrollbarSize: 3\n });\n dom.addClass(this._scrollable.getDomNode(), 'block');\n parent.appendChild(this._scrollable.getDomNode());\n this._disposables.push(this._scrollable.onScroll(function (e) {\n domNode.style.left = \"-\" + e.scrollLeft + \"px\";\n domNode.style.top = \"-\" + e.scrollTop + \"px\";\n }));\n this._disposables.push(this._scrollable);\n }\n MessageWidget.prototype.dispose = function () {\n dispose(this._disposables);\n };\n MessageWidget.prototype.update = function (_a) {\n var source = _a.source, message = _a.message, relatedInformation = _a.relatedInformation;\n if (source) {\n this._lines = 0;\n this._longestLineLength = 0;\n var indent = new Array(source.length + 3 + 1).join(' ');\n var lines = message.split(/\\r\\n|\\r|\\n/g);\n for (var i = 0; i < lines.length; i++) {\n var line = lines[i];\n this._lines += 1;\n this._longestLineLength = Math.max(line.length, this._longestLineLength);\n if (i === 0) {\n message = \"[\" + source + \"] \" + line;\n }\n else {\n message += \"\\n\" + indent + line;\n }\n }\n }\n else {\n this._lines = 1;\n this._longestLineLength = message.length;\n }\n dom.clearNode(this._relatedBlock);\n if (!isFalsyOrEmpty(relatedInformation)) {\n this._relatedBlock.style.paddingTop = Math.floor(this._editor.getConfiguration().lineHeight * .66) + \"px\";\n this._lines += 1;\n for (var _i = 0, relatedInformation_1 = relatedInformation; _i < relatedInformation_1.length; _i++) {\n var related = relatedInformation_1[_i];\n var container = document.createElement('div');\n var relatedResource = document.createElement('span');\n dom.addClass(relatedResource, 'filename');\n relatedResource.innerHTML = getBaseLabel(related.resource) + \"(\" + related.startLineNumber + \", \" + related.startColumn + \"): \";\n relatedResource.title = getPathLabel(related.resource, undefined);\n this._relatedDiagnostics.set(relatedResource, related);\n var relatedMessage = document.createElement('span');\n relatedMessage.innerText = related.message;\n this._editor.applyFontInfo(relatedMessage);\n container.appendChild(relatedResource);\n container.appendChild(relatedMessage);\n this._lines += 1;\n this._relatedBlock.appendChild(container);\n }\n }\n this._messageBlock.innerText = message;\n this._editor.applyFontInfo(this._messageBlock);\n var fontInfo = this._editor.getConfiguration().fontInfo;\n var scrollWidth = Math.ceil(fontInfo.typicalFullwidthCharacterWidth * this._longestLineLength * 0.75);\n var scrollHeight = fontInfo.lineHeight * this._lines;\n this._scrollable.setScrollDimensions({ scrollWidth: scrollWidth, scrollHeight: scrollHeight });\n };\n MessageWidget.prototype.layout = function (height, width) {\n this._scrollable.getDomNode().style.height = height + \"px\";\n this._scrollable.setScrollDimensions({ width: width, height: height });\n };\n MessageWidget.prototype.getHeightInLines = function () {\n return Math.min(17, this._lines);\n };\n return MessageWidget;\n}());\nvar MarkerNavigationWidget = /** @class */ (function (_super) {\n __extends(MarkerNavigationWidget, _super);\n function MarkerNavigationWidget(editor, _themeService) {\n var _this = _super.call(this, editor, { showArrow: true, showFrame: true, isAccessible: true }) || this;\n _this._themeService = _themeService;\n _this._callOnDispose = [];\n _this._onDidSelectRelatedInformation = new Emitter();\n _this.onDidSelectRelatedInformation = _this._onDidSelectRelatedInformation.event;\n _this._severity = MarkerSeverity.Warning;\n _this._backgroundColor = Color.white;\n _this._applyTheme(_themeService.getTheme());\n _this._callOnDispose.push(_themeService.onThemeChange(_this._applyTheme.bind(_this)));\n _this.create();\n return _this;\n }\n MarkerNavigationWidget.prototype._applyTheme = function (theme) {\n this._backgroundColor = theme.getColor(editorMarkerNavigationBackground);\n var colorId = editorMarkerNavigationError;\n if (this._severity === MarkerSeverity.Warning) {\n colorId = editorMarkerNavigationWarning;\n }\n else if (this._severity === MarkerSeverity.Info) {\n colorId = editorMarkerNavigationInfo;\n }\n var frameColor = theme.getColor(colorId);\n this.style({\n arrowColor: frameColor,\n frameColor: frameColor\n }); // style() will trigger _applyStyles\n };\n MarkerNavigationWidget.prototype._applyStyles = function () {\n if (this._parentContainer) {\n this._parentContainer.style.backgroundColor = this._backgroundColor.toString();\n }\n _super.prototype._applyStyles.call(this);\n };\n MarkerNavigationWidget.prototype.dispose = function () {\n this._callOnDispose = dispose(this._callOnDispose);\n _super.prototype.dispose.call(this);\n };\n MarkerNavigationWidget.prototype.focus = function () {\n this._parentContainer.focus();\n };\n MarkerNavigationWidget.prototype._fillContainer = function (container) {\n var _this = this;\n this._parentContainer = container;\n dom.addClass(container, 'marker-widget');\n this._parentContainer.tabIndex = 0;\n this._parentContainer.setAttribute('role', 'tooltip');\n this._container = document.createElement('div');\n container.appendChild(this._container);\n this._title = document.createElement('div');\n this._title.className = 'block title';\n this._container.appendChild(this._title);\n this._message = new MessageWidget(this._container, this.editor, function (related) { return _this._onDidSelectRelatedInformation.fire(related); });\n this._disposables.push(this._message);\n };\n MarkerNavigationWidget.prototype.show = function (where, heightInLines) {\n throw new Error('call showAtMarker');\n };\n MarkerNavigationWidget.prototype.showAtMarker = function (marker, markerIdx, markerCount) {\n // update:\n // * title\n // * message\n this._container.classList.remove('stale');\n this._title.innerHTML = nls.localize('title.wo_source', \"({0}/{1})\", markerIdx, markerCount);\n this._message.update(marker);\n // update frame color (only applied on 'show')\n this._severity = marker.severity;\n this._applyTheme(this._themeService.getTheme());\n // show\n var range = Range.lift(marker);\n var position = range.containsPosition(this.editor.getPosition()) ? this.editor.getPosition() : range.getStartPosition();\n _super.prototype.show.call(this, position, this.computeRequiredHeight());\n this.editor.revealPositionInCenter(position, 0 /* Smooth */);\n if (this.editor.getConfiguration().accessibilitySupport !== 1 /* Disabled */) {\n this.focus();\n }\n };\n MarkerNavigationWidget.prototype.updateMarker = function (marker) {\n this._container.classList.remove('stale');\n this._message.update(marker);\n };\n MarkerNavigationWidget.prototype.showStale = function () {\n this._container.classList.add('stale');\n this._relayout();\n };\n MarkerNavigationWidget.prototype._doLayout = function (heightInPixel, widthInPixel) {\n this._message.layout(heightInPixel, widthInPixel);\n this._container.style.height = heightInPixel + \"px\";\n };\n MarkerNavigationWidget.prototype._relayout = function () {\n _super.prototype._relayout.call(this, this.computeRequiredHeight());\n };\n MarkerNavigationWidget.prototype.computeRequiredHeight = function () {\n return 1 + this._message.getHeightInLines();\n };\n return MarkerNavigationWidget;\n}(ZoneWidget));\nexport { MarkerNavigationWidget };\n// theming\nvar errorDefault = oneOf(editorErrorForeground, editorErrorBorder);\nvar warningDefault = oneOf(editorWarningForeground, editorWarningBorder);\nvar infoDefault = oneOf(editorInfoForeground, editorInfoBorder);\nexport var editorMarkerNavigationError = registerColor('editorMarkerNavigationError.background', { dark: errorDefault, light: errorDefault, hc: errorDefault }, nls.localize('editorMarkerNavigationError', 'Editor marker navigation widget error color.'));\nexport var editorMarkerNavigationWarning = registerColor('editorMarkerNavigationWarning.background', { dark: warningDefault, light: warningDefault, hc: warningDefault }, nls.localize('editorMarkerNavigationWarning', 'Editor marker navigation widget warning color.'));\nexport var editorMarkerNavigationInfo = registerColor('editorMarkerNavigationInfo.background', { dark: infoDefault, light: infoDefault, hc: infoDefault }, nls.localize('editorMarkerNavigationInfo', 'Editor marker navigation widget info color.'));\nexport var editorMarkerNavigationBackground = registerColor('editorMarkerNavigation.background', { dark: '#2D2D30', light: Color.white, hc: '#0C141F' }, nls.localize('editorMarkerNavigationBackground', 'Editor marker navigation widget background.'));\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __param = (this && this.__param) || function (paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n};\nimport * as nls from '../../../nls';\nimport { Emitter } from '../../../base/common/event';\nimport { dispose } from '../../../base/common/lifecycle';\nimport { RawContextKey, IContextKeyService } from '../../../platform/contextkey/common/contextkey';\nimport { IMarkerService, MarkerSeverity } from '../../../platform/markers/common/markers';\nimport { Range } from '../../common/core/range';\nimport { registerEditorAction, registerEditorContribution, EditorAction, EditorCommand, registerEditorCommand } from '../../browser/editorExtensions';\nimport { IThemeService } from '../../../platform/theme/common/themeService';\nimport { EditorContextKeys } from '../../common/editorContextKeys';\nimport { MarkerNavigationWidget } from './gotoErrorWidget';\nimport { compare } from '../../../base/common/strings';\nimport { binarySearch } from '../../../base/common/arrays';\nimport { ICodeEditorService } from '../../browser/services/codeEditorService';\nimport { onUnexpectedError } from '../../../base/common/errors';\nvar MarkerModel = /** @class */ (function () {\n function MarkerModel(editor, markers) {\n var _this = this;\n this._editor = editor;\n this._markers = null;\n this._nextIdx = -1;\n this._toUnbind = [];\n this._ignoreSelectionChange = false;\n this._onCurrentMarkerChanged = new Emitter();\n this._onMarkerSetChanged = new Emitter();\n this.setMarkers(markers);\n // listen on editor\n this._toUnbind.push(this._editor.onDidDispose(function () { return _this.dispose(); }));\n this._toUnbind.push(this._editor.onDidChangeCursorPosition(function () {\n if (_this._ignoreSelectionChange) {\n return;\n }\n if (_this.currentMarker && Range.containsPosition(_this.currentMarker, _this._editor.getPosition())) {\n return;\n }\n _this._nextIdx = -1;\n }));\n }\n Object.defineProperty(MarkerModel.prototype, \"onCurrentMarkerChanged\", {\n get: function () {\n return this._onCurrentMarkerChanged.event;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(MarkerModel.prototype, \"onMarkerSetChanged\", {\n get: function () {\n return this._onMarkerSetChanged.event;\n },\n enumerable: true,\n configurable: true\n });\n MarkerModel.prototype.setMarkers = function (markers) {\n var oldMarker = this._nextIdx >= 0 ? this._markers[this._nextIdx] : undefined;\n this._markers = markers || [];\n this._markers.sort(MarkerNavigationAction.compareMarker);\n if (!oldMarker) {\n this._nextIdx = -1;\n }\n else {\n this._nextIdx = Math.max(-1, binarySearch(this._markers, oldMarker, MarkerNavigationAction.compareMarker));\n }\n this._onMarkerSetChanged.fire(this);\n };\n MarkerModel.prototype.withoutWatchingEditorPosition = function (callback) {\n this._ignoreSelectionChange = true;\n try {\n callback();\n }\n finally {\n this._ignoreSelectionChange = false;\n }\n };\n MarkerModel.prototype._initIdx = function (fwd) {\n var found = false;\n var position = this._editor.getPosition();\n for (var i = 0; i < this._markers.length; i++) {\n var range = Range.lift(this._markers[i]);\n if (range.isEmpty()) {\n var word = this._editor.getModel().getWordAtPosition(range.getStartPosition());\n if (word) {\n range = new Range(range.startLineNumber, word.startColumn, range.startLineNumber, word.endColumn);\n }\n }\n if (range.containsPosition(position) || position.isBeforeOrEqual(range.getStartPosition())) {\n this._nextIdx = i;\n found = true;\n break;\n }\n }\n if (!found) {\n // after the last change\n this._nextIdx = fwd ? 0 : this._markers.length - 1;\n }\n if (this._nextIdx < 0) {\n this._nextIdx = this._markers.length - 1;\n }\n };\n Object.defineProperty(MarkerModel.prototype, \"currentMarker\", {\n get: function () {\n return this.canNavigate() ? this._markers[this._nextIdx] : undefined;\n },\n enumerable: true,\n configurable: true\n });\n MarkerModel.prototype.move = function (fwd, inCircles) {\n if (!this.canNavigate()) {\n this._onCurrentMarkerChanged.fire(undefined);\n return !inCircles;\n }\n var oldIdx = this._nextIdx;\n var atEdge = false;\n if (this._nextIdx === -1) {\n this._initIdx(fwd);\n }\n else if (fwd) {\n if (inCircles || this._nextIdx + 1 < this._markers.length) {\n this._nextIdx = (this._nextIdx + 1) % this._markers.length;\n }\n else {\n atEdge = true;\n }\n }\n else if (!fwd) {\n if (inCircles || this._nextIdx > 0) {\n this._nextIdx = (this._nextIdx - 1 + this._markers.length) % this._markers.length;\n }\n else {\n atEdge = true;\n }\n }\n if (oldIdx !== this._nextIdx) {\n var marker = this._markers[this._nextIdx];\n this._onCurrentMarkerChanged.fire(marker);\n }\n return atEdge;\n };\n MarkerModel.prototype.canNavigate = function () {\n return this._markers.length > 0;\n };\n MarkerModel.prototype.findMarkerAtPosition = function (pos) {\n for (var _i = 0, _a = this._markers; _i < _a.length; _i++) {\n var marker = _a[_i];\n if (Range.containsPosition(marker, pos)) {\n return marker;\n }\n }\n return undefined;\n };\n Object.defineProperty(MarkerModel.prototype, \"total\", {\n get: function () {\n return this._markers.length;\n },\n enumerable: true,\n configurable: true\n });\n MarkerModel.prototype.indexOf = function (marker) {\n return 1 + this._markers.indexOf(marker);\n };\n MarkerModel.prototype.dispose = function () {\n this._toUnbind = dispose(this._toUnbind);\n };\n return MarkerModel;\n}());\nvar MarkerController = /** @class */ (function () {\n function MarkerController(editor, _markerService, _contextKeyService, _themeService, _editorService) {\n this._markerService = _markerService;\n this._contextKeyService = _contextKeyService;\n this._themeService = _themeService;\n this._editorService = _editorService;\n this._disposeOnClose = [];\n this._editor = editor;\n this._widgetVisible = CONTEXT_MARKERS_NAVIGATION_VISIBLE.bindTo(this._contextKeyService);\n }\n MarkerController.get = function (editor) {\n return editor.getContribution(MarkerController.ID);\n };\n MarkerController.prototype.getId = function () {\n return MarkerController.ID;\n };\n MarkerController.prototype.dispose = function () {\n this._cleanUp();\n };\n MarkerController.prototype._cleanUp = function () {\n this._widgetVisible.reset();\n this._disposeOnClose = dispose(this._disposeOnClose);\n this._widget = null;\n this._model = null;\n };\n MarkerController.prototype.getOrCreateModel = function () {\n var _this = this;\n if (this._model) {\n return this._model;\n }\n var markers = this._getMarkers();\n this._model = new MarkerModel(this._editor, markers);\n this._markerService.onMarkerChanged(this._onMarkerChanged, this, this._disposeOnClose);\n this._widget = new MarkerNavigationWidget(this._editor, this._themeService);\n this._widgetVisible.set(true);\n this._disposeOnClose.push(this._model);\n this._disposeOnClose.push(this._widget);\n this._disposeOnClose.push(this._widget.onDidSelectRelatedInformation(function (related) {\n _this._editorService.openCodeEditor({\n resource: related.resource,\n options: { pinned: true, revealIfOpened: true, selection: Range.lift(related).collapseToStart() }\n }, _this._editor).then(undefined, onUnexpectedError);\n _this.closeMarkersNavigation(false);\n }));\n this._disposeOnClose.push(this._editor.onDidChangeModel(function () { return _this._cleanUp(); }));\n this._disposeOnClose.push(this._model.onCurrentMarkerChanged(function (marker) {\n if (!marker) {\n _this._cleanUp();\n }\n else {\n _this._model.withoutWatchingEditorPosition(function () {\n _this._widget.showAtMarker(marker, _this._model.indexOf(marker), _this._model.total);\n });\n }\n }));\n this._disposeOnClose.push(this._model.onMarkerSetChanged(function () {\n var marker = _this._model.findMarkerAtPosition(_this._widget.position);\n if (marker) {\n _this._widget.updateMarker(marker);\n }\n else {\n _this._widget.showStale();\n }\n }));\n return this._model;\n };\n MarkerController.prototype.closeMarkersNavigation = function (focusEditor) {\n if (focusEditor === void 0) { focusEditor = true; }\n this._cleanUp();\n if (focusEditor) {\n this._editor.focus();\n }\n };\n MarkerController.prototype._onMarkerChanged = function (changedResources) {\n var _this = this;\n if (!changedResources.some(function (r) { return _this._editor.getModel().uri.toString() === r.toString(); })) {\n return;\n }\n this._model.setMarkers(this._getMarkers());\n };\n MarkerController.prototype._getMarkers = function () {\n return this._markerService.read({\n resource: this._editor.getModel().uri,\n severities: MarkerSeverity.Error | MarkerSeverity.Warning | MarkerSeverity.Info\n });\n };\n MarkerController.ID = 'editor.contrib.markerController';\n MarkerController = __decorate([\n __param(1, IMarkerService),\n __param(2, IContextKeyService),\n __param(3, IThemeService),\n __param(4, ICodeEditorService)\n ], MarkerController);\n return MarkerController;\n}());\nvar MarkerNavigationAction = /** @class */ (function (_super) {\n __extends(MarkerNavigationAction, _super);\n function MarkerNavigationAction(next, multiFile, opts) {\n var _this = _super.call(this, opts) || this;\n _this._isNext = next;\n _this._multiFile = multiFile;\n return _this;\n }\n MarkerNavigationAction.prototype.run = function (accessor, editor) {\n var _this = this;\n var markerService = accessor.get(IMarkerService);\n var editorService = accessor.get(ICodeEditorService);\n var controller = MarkerController.get(editor);\n if (!controller) {\n return undefined;\n }\n var model = controller.getOrCreateModel();\n var atEdge = model.move(this._isNext, !this._multiFile);\n if (!atEdge || !this._multiFile) {\n return undefined;\n }\n // try with the next/prev file\n var markers = markerService.read({ severities: MarkerSeverity.Error | MarkerSeverity.Warning | MarkerSeverity.Info }).sort(MarkerNavigationAction.compareMarker);\n if (markers.length === 0) {\n return undefined;\n }\n var oldMarker = model.currentMarker || { resource: editor.getModel().uri, severity: MarkerSeverity.Error, startLineNumber: 1, startColumn: 1, endLineNumber: 1, endColumn: 1 };\n var idx = binarySearch(markers, oldMarker, MarkerNavigationAction.compareMarker);\n if (idx < 0) {\n // find best match...\n idx = ~idx;\n idx %= markers.length;\n }\n else if (this._isNext) {\n idx = (idx + 1) % markers.length;\n }\n else {\n idx = (idx + markers.length - 1) % markers.length;\n }\n var newMarker = markers[idx];\n if (newMarker.resource.toString() === editor.getModel().uri.toString()) {\n // the next `resource` is this resource which\n // means we cycle within this file\n model.move(this._isNext, true);\n return undefined;\n }\n // close the widget for this editor-instance, open the resource\n // for the next marker and re-start marker navigation in there\n controller.closeMarkersNavigation();\n return editorService.openCodeEditor({\n resource: newMarker.resource,\n options: { pinned: false, revealIfOpened: true, revealInCenterIfOutsideViewport: true, selection: newMarker }\n }, editor).then(function (editor) {\n if (!editor) {\n return undefined;\n }\n return editor.getAction(_this.id).run();\n });\n };\n MarkerNavigationAction.compareMarker = function (a, b) {\n var res = compare(a.resource.toString(), b.resource.toString());\n if (res === 0) {\n res = MarkerSeverity.compare(a.severity, b.severity);\n }\n if (res === 0) {\n res = Range.compareRangesUsingStarts(a, b);\n }\n return res;\n };\n return MarkerNavigationAction;\n}(EditorAction));\nvar NextMarkerAction = /** @class */ (function (_super) {\n __extends(NextMarkerAction, _super);\n function NextMarkerAction() {\n return _super.call(this, true, false, {\n id: 'editor.action.marker.next',\n label: nls.localize('markerAction.next.label', \"Go to Next Problem (Error, Warning, Info)\"),\n alias: 'Go to Next Error or Warning',\n precondition: EditorContextKeys.writable\n }) || this;\n }\n return NextMarkerAction;\n}(MarkerNavigationAction));\nvar PrevMarkerAction = /** @class */ (function (_super) {\n __extends(PrevMarkerAction, _super);\n function PrevMarkerAction() {\n return _super.call(this, false, false, {\n id: 'editor.action.marker.prev',\n label: nls.localize('markerAction.previous.label', \"Go to Previous Problem (Error, Warning, Info)\"),\n alias: 'Go to Previous Error or Warning',\n precondition: EditorContextKeys.writable\n }) || this;\n }\n return PrevMarkerAction;\n}(MarkerNavigationAction));\nvar NextMarkerInFilesAction = /** @class */ (function (_super) {\n __extends(NextMarkerInFilesAction, _super);\n function NextMarkerInFilesAction() {\n return _super.call(this, true, true, {\n id: 'editor.action.marker.nextInFiles',\n label: nls.localize('markerAction.nextInFiles.label', \"Go to Next Problem in Files (Error, Warning, Info)\"),\n alias: 'Go to Next Error or Warning in Files',\n precondition: EditorContextKeys.writable,\n kbOpts: {\n kbExpr: EditorContextKeys.focus,\n primary: 66 /* F8 */,\n weight: 100 /* EditorContrib */\n }\n }) || this;\n }\n return NextMarkerInFilesAction;\n}(MarkerNavigationAction));\nvar PrevMarkerInFilesAction = /** @class */ (function (_super) {\n __extends(PrevMarkerInFilesAction, _super);\n function PrevMarkerInFilesAction() {\n return _super.call(this, false, true, {\n id: 'editor.action.marker.prevInFiles',\n label: nls.localize('markerAction.previousInFiles.label', \"Go to Previous Problem in Files (Error, Warning, Info)\"),\n alias: 'Go to Previous Error or Warning in Files',\n precondition: EditorContextKeys.writable,\n kbOpts: {\n kbExpr: EditorContextKeys.focus,\n primary: 1024 /* Shift */ | 66 /* F8 */,\n weight: 100 /* EditorContrib */\n }\n }) || this;\n }\n return PrevMarkerInFilesAction;\n}(MarkerNavigationAction));\nregisterEditorContribution(MarkerController);\nregisterEditorAction(NextMarkerAction);\nregisterEditorAction(PrevMarkerAction);\nregisterEditorAction(NextMarkerInFilesAction);\nregisterEditorAction(PrevMarkerInFilesAction);\nvar CONTEXT_MARKERS_NAVIGATION_VISIBLE = new RawContextKey('markersNavigationVisible', false);\nvar MarkerCommand = EditorCommand.bindToContribution(MarkerController.get);\nregisterEditorCommand(new MarkerCommand({\n id: 'closeMarkersNavigation',\n precondition: CONTEXT_MARKERS_NAVIGATION_VISIBLE,\n handler: function (x) { return x.closeMarkersNavigation(); },\n kbOpts: {\n weight: 100 /* EditorContrib */ + 50,\n kbExpr: EditorContextKeys.focus,\n primary: 9 /* Escape */,\n secondary: [1024 /* Shift */ | 9 /* Escape */]\n }\n}));\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport { TPromise } from '../../../base/common/winjs.base';\nimport { createDecorator } from '../../instantiation/common/instantiation';\nexport var IOpenerService = createDecorator('openerService');\nexport var NullOpenerService = Object.freeze({\n _serviceBrand: undefined,\n open: function () { return TPromise.as(undefined); }\n});\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { coalesce } from '../../../base/common/arrays';\nimport { onUnexpectedExternalError } from '../../../base/common/errors';\nimport { registerDefaultLanguageCommand } from '../../browser/editorExtensions';\nimport { HoverProviderRegistry } from '../../common/modes';\nimport { CancellationToken } from '../../../base/common/cancellation';\nexport function getHover(model, position, token) {\n var supports = HoverProviderRegistry.ordered(model);\n var promises = supports.map(function (support) {\n return Promise.resolve(support.provideHover(model, position, token)).then(function (hover) {\n return hover && isValid(hover) ? hover : undefined;\n }, function (err) {\n onUnexpectedExternalError(err);\n return undefined;\n });\n });\n return Promise.all(promises).then(function (values) { return coalesce(values); });\n}\nregisterDefaultLanguageCommand('_executeHoverProvider', function (model, position) { return getHover(model, position, CancellationToken.None); });\nfunction isValid(result) {\n var hasRange = (typeof result.range !== 'undefined');\n var hasHtmlContent = typeof result.contents !== 'undefined' && result.contents && result.contents.length > 0;\n return hasRange && hasHtmlContent;\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport { RunOnceScheduler, createCancelablePromise } from '../../../base/common/async';\nimport { onUnexpectedError } from '../../../base/common/errors';\nvar HoverOperation = /** @class */ (function () {\n function HoverOperation(computer, success, error, progress) {\n var _this = this;\n this._computer = computer;\n this._state = 0 /* IDLE */;\n this._hoverTime = HoverOperation.HOVER_TIME;\n this._firstWaitScheduler = new RunOnceScheduler(function () { return _this._triggerAsyncComputation(); }, 0);\n this._secondWaitScheduler = new RunOnceScheduler(function () { return _this._triggerSyncComputation(); }, 0);\n this._loadingMessageScheduler = new RunOnceScheduler(function () { return _this._showLoadingMessage(); }, 0);\n this._asyncComputationPromise = null;\n this._asyncComputationPromiseDone = false;\n this._completeCallback = success;\n this._errorCallback = error;\n this._progressCallback = progress;\n }\n HoverOperation.prototype.setHoverTime = function (hoverTime) {\n this._hoverTime = hoverTime;\n };\n HoverOperation.prototype._firstWaitTime = function () {\n return this._hoverTime / 2;\n };\n HoverOperation.prototype._secondWaitTime = function () {\n return this._hoverTime / 2;\n };\n HoverOperation.prototype._loadingMessageTime = function () {\n return 3 * this._hoverTime;\n };\n HoverOperation.prototype._triggerAsyncComputation = function () {\n var _this = this;\n this._state = 2 /* SECOND_WAIT */;\n this._secondWaitScheduler.schedule(this._secondWaitTime());\n if (this._computer.computeAsync) {\n this._asyncComputationPromiseDone = false;\n this._asyncComputationPromise = createCancelablePromise(function (token) { return _this._computer.computeAsync(token); });\n this._asyncComputationPromise.then(function (asyncResult) {\n _this._asyncComputationPromiseDone = true;\n _this._withAsyncResult(asyncResult);\n }, function (e) { return _this._onError(e); });\n }\n else {\n this._asyncComputationPromiseDone = true;\n }\n };\n HoverOperation.prototype._triggerSyncComputation = function () {\n if (this._computer.computeSync) {\n this._computer.onResult(this._computer.computeSync(), true);\n }\n if (this._asyncComputationPromiseDone) {\n this._state = 0 /* IDLE */;\n this._onComplete(this._computer.getResult());\n }\n else {\n this._state = 3 /* WAITING_FOR_ASYNC_COMPUTATION */;\n this._onProgress(this._computer.getResult());\n }\n };\n HoverOperation.prototype._showLoadingMessage = function () {\n if (this._state === 3 /* WAITING_FOR_ASYNC_COMPUTATION */) {\n this._onProgress(this._computer.getResultWithLoadingMessage());\n }\n };\n HoverOperation.prototype._withAsyncResult = function (asyncResult) {\n if (asyncResult) {\n this._computer.onResult(asyncResult, false);\n }\n if (this._state === 3 /* WAITING_FOR_ASYNC_COMPUTATION */) {\n this._state = 0 /* IDLE */;\n this._onComplete(this._computer.getResult());\n }\n };\n HoverOperation.prototype._onComplete = function (value) {\n if (this._completeCallback) {\n this._completeCallback(value);\n }\n };\n HoverOperation.prototype._onError = function (error) {\n if (this._errorCallback) {\n this._errorCallback(error);\n }\n else {\n onUnexpectedError(error);\n }\n };\n HoverOperation.prototype._onProgress = function (value) {\n if (this._progressCallback) {\n this._progressCallback(value);\n }\n };\n HoverOperation.prototype.start = function (mode) {\n if (mode === 0 /* Delayed */) {\n if (this._state === 0 /* IDLE */) {\n this._state = 1 /* FIRST_WAIT */;\n this._firstWaitScheduler.schedule(this._firstWaitTime());\n this._loadingMessageScheduler.schedule(this._loadingMessageTime());\n }\n }\n else {\n switch (this._state) {\n case 0 /* IDLE */:\n this._triggerAsyncComputation();\n this._secondWaitScheduler.cancel();\n this._triggerSyncComputation();\n break;\n case 2 /* SECOND_WAIT */:\n this._secondWaitScheduler.cancel();\n this._triggerSyncComputation();\n break;\n }\n }\n };\n HoverOperation.prototype.cancel = function () {\n this._loadingMessageScheduler.cancel();\n if (this._state === 1 /* FIRST_WAIT */) {\n this._firstWaitScheduler.cancel();\n }\n if (this._state === 2 /* SECOND_WAIT */) {\n this._secondWaitScheduler.cancel();\n if (this._asyncComputationPromise) {\n this._asyncComputationPromise.cancel();\n this._asyncComputationPromise = null;\n }\n }\n if (this._state === 3 /* WAITING_FOR_ASYNC_COMPUTATION */) {\n if (this._asyncComputationPromise) {\n this._asyncComputationPromise.cancel();\n this._asyncComputationPromise = null;\n }\n }\n this._state = 0 /* IDLE */;\n };\n HoverOperation.HOVER_TIME = 300;\n return HoverOperation;\n}());\nexport { HoverOperation };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { toggleClass } from '../../../base/browser/dom';\nimport { Position } from '../../common/core/position';\nimport * as editorBrowser from '../../browser/editorBrowser';\nimport { Widget } from '../../../base/browser/ui/widget';\nimport { DomScrollableElement } from '../../../base/browser/ui/scrollbar/scrollableElement';\nimport { dispose } from '../../../base/common/lifecycle';\nvar ContentHoverWidget = /** @class */ (function (_super) {\n __extends(ContentHoverWidget, _super);\n function ContentHoverWidget(id, editor) {\n var _this = _super.call(this) || this;\n _this.disposables = [];\n // Editor.IContentWidget.allowEditorOverflow\n _this.allowEditorOverflow = true;\n _this._id = id;\n _this._editor = editor;\n _this._isVisible = false;\n _this._containerDomNode = document.createElement('div');\n _this._containerDomNode.className = 'monaco-editor-hover hidden';\n _this._containerDomNode.tabIndex = 0;\n _this._domNode = document.createElement('div');\n _this._domNode.className = 'monaco-editor-hover-content';\n _this.scrollbar = new DomScrollableElement(_this._domNode, {});\n _this.disposables.push(_this.scrollbar);\n _this._containerDomNode.appendChild(_this.scrollbar.getDomNode());\n _this.onkeydown(_this._containerDomNode, function (e) {\n if (e.equals(9 /* Escape */)) {\n _this.hide();\n }\n });\n _this._register(_this._editor.onDidChangeConfiguration(function (e) {\n if (e.fontInfo) {\n _this.updateFont();\n }\n }));\n _this._editor.onDidLayoutChange(function (e) { return _this.updateMaxHeight(); });\n _this.updateMaxHeight();\n _this._editor.addContentWidget(_this);\n _this._showAtPosition = null;\n return _this;\n }\n Object.defineProperty(ContentHoverWidget.prototype, \"isVisible\", {\n get: function () {\n return this._isVisible;\n },\n set: function (value) {\n this._isVisible = value;\n toggleClass(this._containerDomNode, 'hidden', !this._isVisible);\n },\n enumerable: true,\n configurable: true\n });\n ContentHoverWidget.prototype.getId = function () {\n return this._id;\n };\n ContentHoverWidget.prototype.getDomNode = function () {\n return this._containerDomNode;\n };\n ContentHoverWidget.prototype.showAt = function (position, focus) {\n // Position has changed\n this._showAtPosition = new Position(position.lineNumber, position.column);\n this.isVisible = true;\n this._editor.layoutContentWidget(this);\n // Simply force a synchronous render on the editor\n // such that the widget does not really render with left = '0px'\n this._editor.render();\n this._stoleFocus = focus;\n if (focus) {\n this._containerDomNode.focus();\n }\n };\n ContentHoverWidget.prototype.hide = function () {\n if (!this.isVisible) {\n return;\n }\n this.isVisible = false;\n this._editor.layoutContentWidget(this);\n if (this._stoleFocus) {\n this._editor.focus();\n }\n };\n ContentHoverWidget.prototype.getPosition = function () {\n if (this.isVisible) {\n return {\n position: this._showAtPosition,\n preference: [\n editorBrowser.ContentWidgetPositionPreference.ABOVE,\n editorBrowser.ContentWidgetPositionPreference.BELOW\n ]\n };\n }\n return null;\n };\n ContentHoverWidget.prototype.dispose = function () {\n this._editor.removeContentWidget(this);\n this.disposables = dispose(this.disposables);\n _super.prototype.dispose.call(this);\n };\n ContentHoverWidget.prototype.updateFont = function () {\n var _this = this;\n var codeClasses = Array.prototype.slice.call(this._domNode.getElementsByClassName('code'));\n codeClasses.forEach(function (node) { return _this._editor.applyFontInfo(node); });\n };\n ContentHoverWidget.prototype.updateContents = function (node) {\n this._domNode.textContent = '';\n this._domNode.appendChild(node);\n this.updateFont();\n this._editor.layoutContentWidget(this);\n this.onContentsChange();\n };\n ContentHoverWidget.prototype.onContentsChange = function () {\n this.scrollbar.scanDomNode();\n };\n ContentHoverWidget.prototype.updateMaxHeight = function () {\n var height = Math.max(this._editor.getLayoutInfo().height / 4, 250);\n var _a = this._editor.getConfiguration().fontInfo, fontSize = _a.fontSize, lineHeight = _a.lineHeight;\n this._domNode.style.fontSize = fontSize + \"px\";\n this._domNode.style.lineHeight = lineHeight + \"px\";\n this._domNode.style.maxHeight = height + \"px\";\n };\n return ContentHoverWidget;\n}(Widget));\nexport { ContentHoverWidget };\nvar GlyphHoverWidget = /** @class */ (function (_super) {\n __extends(GlyphHoverWidget, _super);\n function GlyphHoverWidget(id, editor) {\n var _this = _super.call(this) || this;\n _this._id = id;\n _this._editor = editor;\n _this._isVisible = false;\n _this._domNode = document.createElement('div');\n _this._domNode.className = 'monaco-editor-hover hidden';\n _this._domNode.setAttribute('aria-hidden', 'true');\n _this._domNode.setAttribute('role', 'presentation');\n _this._showAtLineNumber = -1;\n _this._register(_this._editor.onDidChangeConfiguration(function (e) {\n if (e.fontInfo) {\n _this.updateFont();\n }\n }));\n _this._editor.addOverlayWidget(_this);\n return _this;\n }\n Object.defineProperty(GlyphHoverWidget.prototype, \"isVisible\", {\n get: function () {\n return this._isVisible;\n },\n set: function (value) {\n this._isVisible = value;\n toggleClass(this._domNode, 'hidden', !this._isVisible);\n },\n enumerable: true,\n configurable: true\n });\n GlyphHoverWidget.prototype.getId = function () {\n return this._id;\n };\n GlyphHoverWidget.prototype.getDomNode = function () {\n return this._domNode;\n };\n GlyphHoverWidget.prototype.showAt = function (lineNumber) {\n this._showAtLineNumber = lineNumber;\n if (!this.isVisible) {\n this.isVisible = true;\n }\n var editorLayout = this._editor.getLayoutInfo();\n var topForLineNumber = this._editor.getTopForLineNumber(this._showAtLineNumber);\n var editorScrollTop = this._editor.getScrollTop();\n var lineHeight = this._editor.getConfiguration().lineHeight;\n var nodeHeight = this._domNode.clientHeight;\n var top = topForLineNumber - editorScrollTop - ((nodeHeight - lineHeight) / 2);\n this._domNode.style.left = editorLayout.glyphMarginLeft + editorLayout.glyphMarginWidth + \"px\";\n this._domNode.style.top = Math.max(Math.round(top), 0) + \"px\";\n };\n GlyphHoverWidget.prototype.hide = function () {\n if (!this.isVisible) {\n return;\n }\n this.isVisible = false;\n };\n GlyphHoverWidget.prototype.getPosition = function () {\n return null;\n };\n GlyphHoverWidget.prototype.dispose = function () {\n this._editor.removeOverlayWidget(this);\n _super.prototype.dispose.call(this);\n };\n GlyphHoverWidget.prototype.updateFont = function () {\n var _this = this;\n var codeTags = Array.prototype.slice.call(this._domNode.getElementsByTagName('code'));\n var codeClasses = Array.prototype.slice.call(this._domNode.getElementsByClassName('code'));\n codeTags.concat(codeClasses).forEach(function (node) { return _this._editor.applyFontInfo(node); });\n };\n GlyphHoverWidget.prototype.updateContents = function (node) {\n this._domNode.textContent = '';\n this._domNode.appendChild(node);\n this.updateFont();\n };\n return GlyphHoverWidget;\n}(Widget));\nexport { GlyphHoverWidget };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { Emitter } from '../../../base/common/event';\nvar ColorPickerModel = /** @class */ (function () {\n function ColorPickerModel(color, availableColorPresentations, presentationIndex) {\n this.presentationIndex = presentationIndex;\n this._onColorFlushed = new Emitter();\n this.onColorFlushed = this._onColorFlushed.event;\n this._onDidChangeColor = new Emitter();\n this.onDidChangeColor = this._onDidChangeColor.event;\n this._onDidChangePresentation = new Emitter();\n this.onDidChangePresentation = this._onDidChangePresentation.event;\n this.originalColor = color;\n this._color = color;\n this._colorPresentations = availableColorPresentations;\n }\n Object.defineProperty(ColorPickerModel.prototype, \"color\", {\n get: function () {\n return this._color;\n },\n set: function (color) {\n if (this._color.equals(color)) {\n return;\n }\n this._color = color;\n this._onDidChangeColor.fire(color);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ColorPickerModel.prototype, \"presentation\", {\n get: function () { return this.colorPresentations[this.presentationIndex]; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ColorPickerModel.prototype, \"colorPresentations\", {\n get: function () {\n return this._colorPresentations;\n },\n set: function (colorPresentations) {\n this._colorPresentations = colorPresentations;\n if (this.presentationIndex > colorPresentations.length - 1) {\n this.presentationIndex = 0;\n }\n this._onDidChangePresentation.fire(this.presentation);\n },\n enumerable: true,\n configurable: true\n });\n ColorPickerModel.prototype.selectNextColorPresentation = function () {\n this.presentationIndex = (this.presentationIndex + 1) % this.colorPresentations.length;\n this.flushColor();\n this._onDidChangePresentation.fire(this.presentation);\n };\n ColorPickerModel.prototype.guessColorPresentation = function (color, originalText) {\n for (var i = 0; i < this.colorPresentations.length; i++) {\n if (originalText === this.colorPresentations[i].label) {\n this.presentationIndex = i;\n this._onDidChangePresentation.fire(this.presentation);\n break;\n }\n }\n };\n ColorPickerModel.prototype.flushColor = function () {\n this._onColorFlushed.fire(this._color);\n };\n return ColorPickerModel;\n}());\nexport { ColorPickerModel };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport './colorPicker.css';\nimport { Emitter } from '../../../base/common/event';\nimport { Widget } from '../../../base/browser/ui/widget';\nimport * as dom from '../../../base/browser/dom';\nimport { onDidChangeZoomLevel } from '../../../base/browser/browser';\nimport { Disposable } from '../../../base/common/lifecycle';\nimport { GlobalMouseMoveMonitor, standardMouseMoveMerger } from '../../../base/browser/globalMouseMoveMonitor';\nimport { Color, RGBA, HSVA } from '../../../base/common/color';\nimport { editorHoverBackground } from '../../../platform/theme/common/colorRegistry';\nimport { registerThemingParticipant } from '../../../platform/theme/common/themeService';\nvar $ = dom.$;\nvar ColorPickerHeader = /** @class */ (function (_super) {\n __extends(ColorPickerHeader, _super);\n function ColorPickerHeader(container, model, themeService) {\n var _this = _super.call(this) || this;\n _this.model = model;\n _this.domNode = $('.colorpicker-header');\n dom.append(container, _this.domNode);\n _this.pickedColorNode = dom.append(_this.domNode, $('.picked-color'));\n var colorBox = dom.append(_this.domNode, $('.original-color'));\n colorBox.style.backgroundColor = Color.Format.CSS.format(_this.model.originalColor);\n _this.backgroundColor = themeService.getTheme().getColor(editorHoverBackground) || Color.white;\n _this._register(registerThemingParticipant(function (theme, collector) {\n _this.backgroundColor = theme.getColor(editorHoverBackground) || Color.white;\n }));\n _this._register(dom.addDisposableListener(_this.pickedColorNode, dom.EventType.CLICK, function () { return _this.model.selectNextColorPresentation(); }));\n _this._register(dom.addDisposableListener(colorBox, dom.EventType.CLICK, function () {\n _this.model.color = _this.model.originalColor;\n _this.model.flushColor();\n }));\n _this._register(model.onDidChangeColor(_this.onDidChangeColor, _this));\n _this._register(model.onDidChangePresentation(_this.onDidChangePresentation, _this));\n _this.pickedColorNode.style.backgroundColor = Color.Format.CSS.format(model.color);\n dom.toggleClass(_this.pickedColorNode, 'light', model.color.rgba.a < 0.5 ? _this.backgroundColor.isLighter() : model.color.isLighter());\n return _this;\n }\n ColorPickerHeader.prototype.onDidChangeColor = function (color) {\n this.pickedColorNode.style.backgroundColor = Color.Format.CSS.format(color);\n dom.toggleClass(this.pickedColorNode, 'light', color.rgba.a < 0.5 ? this.backgroundColor.isLighter() : color.isLighter());\n this.onDidChangePresentation();\n };\n ColorPickerHeader.prototype.onDidChangePresentation = function () {\n this.pickedColorNode.textContent = this.model.presentation ? this.model.presentation.label : '';\n };\n return ColorPickerHeader;\n}(Disposable));\nexport { ColorPickerHeader };\nvar ColorPickerBody = /** @class */ (function (_super) {\n __extends(ColorPickerBody, _super);\n function ColorPickerBody(container, model, pixelRatio) {\n var _this = _super.call(this) || this;\n _this.model = model;\n _this.pixelRatio = pixelRatio;\n _this.domNode = $('.colorpicker-body');\n dom.append(container, _this.domNode);\n _this.saturationBox = new SaturationBox(_this.domNode, _this.model, _this.pixelRatio);\n _this._register(_this.saturationBox);\n _this._register(_this.saturationBox.onDidChange(_this.onDidSaturationValueChange, _this));\n _this._register(_this.saturationBox.onColorFlushed(_this.flushColor, _this));\n _this.opacityStrip = new OpacityStrip(_this.domNode, _this.model);\n _this._register(_this.opacityStrip);\n _this._register(_this.opacityStrip.onDidChange(_this.onDidOpacityChange, _this));\n _this._register(_this.opacityStrip.onColorFlushed(_this.flushColor, _this));\n _this.hueStrip = new HueStrip(_this.domNode, _this.model);\n _this._register(_this.hueStrip);\n _this._register(_this.hueStrip.onDidChange(_this.onDidHueChange, _this));\n _this._register(_this.hueStrip.onColorFlushed(_this.flushColor, _this));\n return _this;\n }\n ColorPickerBody.prototype.flushColor = function () {\n this.model.flushColor();\n };\n ColorPickerBody.prototype.onDidSaturationValueChange = function (_a) {\n var s = _a.s, v = _a.v;\n var hsva = this.model.color.hsva;\n this.model.color = new Color(new HSVA(hsva.h, s, v, hsva.a));\n };\n ColorPickerBody.prototype.onDidOpacityChange = function (a) {\n var hsva = this.model.color.hsva;\n this.model.color = new Color(new HSVA(hsva.h, hsva.s, hsva.v, a));\n };\n ColorPickerBody.prototype.onDidHueChange = function (value) {\n var hsva = this.model.color.hsva;\n var h = (1 - value) * 360;\n this.model.color = new Color(new HSVA(h === 360 ? 0 : h, hsva.s, hsva.v, hsva.a));\n };\n ColorPickerBody.prototype.layout = function () {\n this.saturationBox.layout();\n this.opacityStrip.layout();\n this.hueStrip.layout();\n };\n return ColorPickerBody;\n}(Disposable));\nexport { ColorPickerBody };\nvar SaturationBox = /** @class */ (function (_super) {\n __extends(SaturationBox, _super);\n function SaturationBox(container, model, pixelRatio) {\n var _this = _super.call(this) || this;\n _this.model = model;\n _this.pixelRatio = pixelRatio;\n _this._onDidChange = new Emitter();\n _this.onDidChange = _this._onDidChange.event;\n _this._onColorFlushed = new Emitter();\n _this.onColorFlushed = _this._onColorFlushed.event;\n _this.domNode = $('.saturation-wrap');\n dom.append(container, _this.domNode);\n // Create canvas, draw selected color\n _this.canvas = document.createElement('canvas');\n _this.canvas.className = 'saturation-box';\n dom.append(_this.domNode, _this.canvas);\n // Add selection circle\n _this.selection = $('.saturation-selection');\n dom.append(_this.domNode, _this.selection);\n _this.layout();\n _this._register(dom.addDisposableListener(_this.domNode, dom.EventType.MOUSE_DOWN, function (e) { return _this.onMouseDown(e); }));\n _this._register(_this.model.onDidChangeColor(_this.onDidChangeColor, _this));\n _this.monitor = null;\n return _this;\n }\n SaturationBox.prototype.onMouseDown = function (e) {\n var _this = this;\n this.monitor = this._register(new GlobalMouseMoveMonitor());\n var origin = dom.getDomNodePagePosition(this.domNode);\n if (e.target !== this.selection) {\n this.onDidChangePosition(e.offsetX, e.offsetY);\n }\n this.monitor.startMonitoring(standardMouseMoveMerger, function (event) { return _this.onDidChangePosition(event.posx - origin.left, event.posy - origin.top); }, function () { return null; });\n var mouseUpListener = dom.addDisposableListener(document, dom.EventType.MOUSE_UP, function () {\n _this._onColorFlushed.fire();\n mouseUpListener.dispose();\n _this.monitor.stopMonitoring(true);\n _this.monitor = null;\n }, true);\n };\n SaturationBox.prototype.onDidChangePosition = function (left, top) {\n var s = Math.max(0, Math.min(1, left / this.width));\n var v = Math.max(0, Math.min(1, 1 - (top / this.height)));\n this.paintSelection(s, v);\n this._onDidChange.fire({ s: s, v: v });\n };\n SaturationBox.prototype.layout = function () {\n this.width = this.domNode.offsetWidth;\n this.height = this.domNode.offsetHeight;\n this.canvas.width = this.width * this.pixelRatio;\n this.canvas.height = this.height * this.pixelRatio;\n this.paint();\n var hsva = this.model.color.hsva;\n this.paintSelection(hsva.s, hsva.v);\n };\n SaturationBox.prototype.paint = function () {\n var hsva = this.model.color.hsva;\n var saturatedColor = new Color(new HSVA(hsva.h, 1, 1, 1));\n var ctx = this.canvas.getContext('2d');\n var whiteGradient = ctx.createLinearGradient(0, 0, this.canvas.width, 0);\n whiteGradient.addColorStop(0, 'rgba(255, 255, 255, 1)');\n whiteGradient.addColorStop(0.5, 'rgba(255, 255, 255, 0.5)');\n whiteGradient.addColorStop(1, 'rgba(255, 255, 255, 0)');\n var blackGradient = ctx.createLinearGradient(0, 0, 0, this.canvas.height);\n blackGradient.addColorStop(0, 'rgba(0, 0, 0, 0)');\n blackGradient.addColorStop(1, 'rgba(0, 0, 0, 1)');\n ctx.rect(0, 0, this.canvas.width, this.canvas.height);\n ctx.fillStyle = Color.Format.CSS.format(saturatedColor);\n ctx.fill();\n ctx.fillStyle = whiteGradient;\n ctx.fill();\n ctx.fillStyle = blackGradient;\n ctx.fill();\n };\n SaturationBox.prototype.paintSelection = function (s, v) {\n this.selection.style.left = s * this.width + \"px\";\n this.selection.style.top = this.height - v * this.height + \"px\";\n };\n SaturationBox.prototype.onDidChangeColor = function () {\n if (this.monitor && this.monitor.isMonitoring()) {\n return;\n }\n this.paint();\n };\n return SaturationBox;\n}(Disposable));\nvar Strip = /** @class */ (function (_super) {\n __extends(Strip, _super);\n function Strip(container, model) {\n var _this = _super.call(this) || this;\n _this.model = model;\n _this._onDidChange = new Emitter();\n _this.onDidChange = _this._onDidChange.event;\n _this._onColorFlushed = new Emitter();\n _this.onColorFlushed = _this._onColorFlushed.event;\n _this.domNode = dom.append(container, $('.strip'));\n _this.overlay = dom.append(_this.domNode, $('.overlay'));\n _this.slider = dom.append(_this.domNode, $('.slider'));\n _this.slider.style.top = \"0px\";\n _this._register(dom.addDisposableListener(_this.domNode, dom.EventType.MOUSE_DOWN, function (e) { return _this.onMouseDown(e); }));\n _this.layout();\n return _this;\n }\n Strip.prototype.layout = function () {\n this.height = this.domNode.offsetHeight - this.slider.offsetHeight;\n var value = this.getValue(this.model.color);\n this.updateSliderPosition(value);\n };\n Strip.prototype.onMouseDown = function (e) {\n var _this = this;\n var monitor = this._register(new GlobalMouseMoveMonitor());\n var origin = dom.getDomNodePagePosition(this.domNode);\n dom.addClass(this.domNode, 'grabbing');\n if (e.target !== this.slider) {\n this.onDidChangeTop(e.offsetY);\n }\n monitor.startMonitoring(standardMouseMoveMerger, function (event) { return _this.onDidChangeTop(event.posy - origin.top); }, function () { return null; });\n var mouseUpListener = dom.addDisposableListener(document, dom.EventType.MOUSE_UP, function () {\n _this._onColorFlushed.fire();\n mouseUpListener.dispose();\n monitor.stopMonitoring(true);\n dom.removeClass(_this.domNode, 'grabbing');\n }, true);\n };\n Strip.prototype.onDidChangeTop = function (top) {\n var value = Math.max(0, Math.min(1, 1 - (top / this.height)));\n this.updateSliderPosition(value);\n this._onDidChange.fire(value);\n };\n Strip.prototype.updateSliderPosition = function (value) {\n this.slider.style.top = (1 - value) * this.height + \"px\";\n };\n return Strip;\n}(Disposable));\nvar OpacityStrip = /** @class */ (function (_super) {\n __extends(OpacityStrip, _super);\n function OpacityStrip(container, model) {\n var _this = _super.call(this, container, model) || this;\n dom.addClass(_this.domNode, 'opacity-strip');\n _this._register(model.onDidChangeColor(_this.onDidChangeColor, _this));\n _this.onDidChangeColor(_this.model.color);\n return _this;\n }\n OpacityStrip.prototype.onDidChangeColor = function (color) {\n var _a = color.rgba, r = _a.r, g = _a.g, b = _a.b;\n var opaque = new Color(new RGBA(r, g, b, 1));\n var transparent = new Color(new RGBA(r, g, b, 0));\n this.overlay.style.background = \"linear-gradient(to bottom, \" + opaque + \" 0%, \" + transparent + \" 100%)\";\n };\n OpacityStrip.prototype.getValue = function (color) {\n return color.hsva.a;\n };\n return OpacityStrip;\n}(Strip));\nvar HueStrip = /** @class */ (function (_super) {\n __extends(HueStrip, _super);\n function HueStrip(container, model) {\n var _this = _super.call(this, container, model) || this;\n dom.addClass(_this.domNode, 'hue-strip');\n return _this;\n }\n HueStrip.prototype.getValue = function (color) {\n return 1 - (color.hsva.h / 360);\n };\n return HueStrip;\n}(Strip));\nvar ColorPickerWidget = /** @class */ (function (_super) {\n __extends(ColorPickerWidget, _super);\n function ColorPickerWidget(container, model, pixelRatio, themeService) {\n var _this = _super.call(this) || this;\n _this.model = model;\n _this.pixelRatio = pixelRatio;\n _this._register(onDidChangeZoomLevel(function () { return _this.layout(); }));\n var element = $('.colorpicker-widget');\n container.appendChild(element);\n var header = new ColorPickerHeader(element, _this.model, themeService);\n _this.body = new ColorPickerBody(element, _this.model, _this.pixelRatio);\n _this._register(header);\n _this._register(_this.body);\n return _this;\n }\n ColorPickerWidget.prototype.layout = function () {\n this.body.layout();\n };\n return ColorPickerWidget;\n}(Widget));\nexport { ColorPickerWidget };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport * as nls from '../../../nls';\nimport * as dom from '../../../base/browser/dom';\nimport { Range } from '../../common/core/range';\nimport { Position } from '../../common/core/position';\nimport { HoverProviderRegistry } from '../../common/modes';\nimport { getHover } from './getHover';\nimport { HoverOperation } from './hoverOperation';\nimport { ContentHoverWidget } from './hoverWidgets';\nimport { MarkdownString, isEmptyMarkdownString, markedStringsEquals } from '../../../base/common/htmlContent';\nimport { ModelDecorationOptions } from '../../common/model/textModel';\nimport { ColorPickerModel } from '../colorPicker/colorPickerModel';\nimport { ColorPickerWidget } from '../colorPicker/colorPickerWidget';\nimport { ColorDetector } from '../colorPicker/colorDetector';\nimport { Color, RGBA } from '../../../base/common/color';\nimport { Disposable, combinedDisposable } from '../../../base/common/lifecycle';\nimport { getColorPresentations } from '../colorPicker/color';\nimport { CancellationToken } from '../../../base/common/cancellation';\nvar $ = dom.$;\nvar ColorHover = /** @class */ (function () {\n function ColorHover(range, color, provider) {\n this.range = range;\n this.color = color;\n this.provider = provider;\n }\n return ColorHover;\n}());\nvar ModesContentComputer = /** @class */ (function () {\n function ModesContentComputer(editor) {\n this._editor = editor;\n this._range = null;\n }\n ModesContentComputer.prototype.setRange = function (range) {\n this._range = range;\n this._result = [];\n };\n ModesContentComputer.prototype.clearResult = function () {\n this._result = [];\n };\n ModesContentComputer.prototype.computeAsync = function (token) {\n var model = this._editor.getModel();\n if (!HoverProviderRegistry.has(model)) {\n return Promise.resolve(null);\n }\n return getHover(model, new Position(this._range.startLineNumber, this._range.startColumn), token);\n };\n ModesContentComputer.prototype.computeSync = function () {\n var _this = this;\n var lineNumber = this._range.startLineNumber;\n if (lineNumber > this._editor.getModel().getLineCount()) {\n // Illegal line number => no results\n return [];\n }\n var colorDetector = ColorDetector.get(this._editor);\n var maxColumn = this._editor.getModel().getLineMaxColumn(lineNumber);\n var lineDecorations = this._editor.getLineDecorations(lineNumber);\n var didFindColor = false;\n var result = lineDecorations.map(function (d) {\n var startColumn = (d.range.startLineNumber === lineNumber) ? d.range.startColumn : 1;\n var endColumn = (d.range.endLineNumber === lineNumber) ? d.range.endColumn : maxColumn;\n if (startColumn > _this._range.startColumn || _this._range.endColumn > endColumn) {\n return null;\n }\n var range = new Range(_this._range.startLineNumber, startColumn, _this._range.startLineNumber, endColumn);\n var colorData = colorDetector.getColorData(d.range.getStartPosition());\n if (!didFindColor && colorData) {\n didFindColor = true;\n var _a = colorData.colorInfo, color = _a.color, range_1 = _a.range;\n return new ColorHover(range_1, color, colorData.provider);\n }\n else {\n if (isEmptyMarkdownString(d.options.hoverMessage)) {\n return null;\n }\n var contents = void 0;\n if (d.options.hoverMessage) {\n if (Array.isArray(d.options.hoverMessage)) {\n contents = d.options.hoverMessage.slice();\n }\n else {\n contents = [d.options.hoverMessage];\n }\n }\n return { contents: contents, range: range };\n }\n });\n return result.filter(function (d) { return !!d; });\n };\n ModesContentComputer.prototype.onResult = function (result, isFromSynchronousComputation) {\n // Always put synchronous messages before asynchronous ones\n if (isFromSynchronousComputation) {\n this._result = result.concat(this._result.sort(function (a, b) {\n if (a instanceof ColorHover) { // sort picker messages at to the top\n return -1;\n }\n else if (b instanceof ColorHover) {\n return 1;\n }\n return 0;\n }));\n }\n else {\n this._result = this._result.concat(result);\n }\n };\n ModesContentComputer.prototype.getResult = function () {\n return this._result.slice(0);\n };\n ModesContentComputer.prototype.getResultWithLoadingMessage = function () {\n return this._result.slice(0).concat([this._getLoadingMessage()]);\n };\n ModesContentComputer.prototype._getLoadingMessage = function () {\n return {\n range: this._range,\n contents: [new MarkdownString().appendText(nls.localize('modesContentHover.loading', \"Loading...\"))]\n };\n };\n return ModesContentComputer;\n}());\nvar ModesContentHoverWidget = /** @class */ (function (_super) {\n __extends(ModesContentHoverWidget, _super);\n function ModesContentHoverWidget(editor, markdownRenderer, _themeService) {\n var _this = _super.call(this, ModesContentHoverWidget.ID, editor) || this;\n _this._themeService = _themeService;\n _this.renderDisposable = Disposable.None;\n _this._computer = new ModesContentComputer(_this._editor);\n _this._highlightDecorations = [];\n _this._isChangingDecorations = false;\n _this._markdownRenderer = markdownRenderer;\n _this._register(markdownRenderer.onDidRenderCodeBlock(_this.onContentsChange, _this));\n _this._hoverOperation = new HoverOperation(_this._computer, function (result) { return _this._withResult(result, true); }, null, function (result) { return _this._withResult(result, false); });\n _this._register(dom.addStandardDisposableListener(_this.getDomNode(), dom.EventType.FOCUS, function () {\n if (_this._colorPicker) {\n dom.addClass(_this.getDomNode(), 'colorpicker-hover');\n }\n }));\n _this._register(dom.addStandardDisposableListener(_this.getDomNode(), dom.EventType.BLUR, function () {\n dom.removeClass(_this.getDomNode(), 'colorpicker-hover');\n }));\n _this._register(editor.onDidChangeConfiguration(function (e) {\n _this._hoverOperation.setHoverTime(_this._editor.getConfiguration().contribInfo.hover.delay);\n }));\n return _this;\n }\n ModesContentHoverWidget.prototype.dispose = function () {\n this.renderDisposable.dispose();\n this.renderDisposable = Disposable.None;\n this._hoverOperation.cancel();\n _super.prototype.dispose.call(this);\n };\n ModesContentHoverWidget.prototype.onModelDecorationsChanged = function () {\n if (this._isChangingDecorations) {\n return;\n }\n if (this.isVisible) {\n // The decorations have changed and the hover is visible,\n // we need to recompute the displayed text\n this._hoverOperation.cancel();\n this._computer.clearResult();\n if (!this._colorPicker) { // TODO@Michel ensure that displayed text for other decorations is computed even if color picker is in place\n this._hoverOperation.start(0 /* Delayed */);\n }\n }\n };\n ModesContentHoverWidget.prototype.startShowingAt = function (range, mode, focus) {\n if (this._lastRange && this._lastRange.equalsRange(range)) {\n // We have to show the widget at the exact same range as before, so no work is needed\n return;\n }\n this._hoverOperation.cancel();\n if (this.isVisible) {\n // The range might have changed, but the hover is visible\n // Instead of hiding it completely, filter out messages that are still in the new range and\n // kick off a new computation\n if (this._showAtPosition.lineNumber !== range.startLineNumber) {\n this.hide();\n }\n else {\n var filteredMessages = [];\n for (var i = 0, len = this._messages.length; i < len; i++) {\n var msg = this._messages[i];\n var rng = msg.range;\n if (rng.startColumn <= range.startColumn && rng.endColumn >= range.endColumn) {\n filteredMessages.push(msg);\n }\n }\n if (filteredMessages.length > 0) {\n if (hoverContentsEquals(filteredMessages, this._messages)) {\n return;\n }\n this._renderMessages(range, filteredMessages);\n }\n else {\n this.hide();\n }\n }\n }\n this._lastRange = range;\n this._computer.setRange(range);\n this._shouldFocus = focus;\n this._hoverOperation.start(mode);\n };\n ModesContentHoverWidget.prototype.hide = function () {\n this._lastRange = null;\n this._hoverOperation.cancel();\n _super.prototype.hide.call(this);\n this._isChangingDecorations = true;\n this._highlightDecorations = this._editor.deltaDecorations(this._highlightDecorations, []);\n this._isChangingDecorations = false;\n this.renderDisposable.dispose();\n this.renderDisposable = Disposable.None;\n this._colorPicker = null;\n };\n ModesContentHoverWidget.prototype.isColorPickerVisible = function () {\n if (this._colorPicker) {\n return true;\n }\n return false;\n };\n ModesContentHoverWidget.prototype._withResult = function (result, complete) {\n this._messages = result;\n if (this._lastRange && this._messages.length > 0) {\n this._renderMessages(this._lastRange, this._messages);\n }\n else if (complete) {\n this.hide();\n }\n };\n ModesContentHoverWidget.prototype._renderMessages = function (renderRange, messages) {\n var _this = this;\n this.renderDisposable.dispose();\n this._colorPicker = null;\n // update column from which to show\n var renderColumn = Number.MAX_VALUE;\n var highlightRange = messages[0].range;\n var fragment = document.createDocumentFragment();\n var isEmptyHoverContent = true;\n var containColorPicker = false;\n var markdownDisposeable;\n messages.forEach(function (msg) {\n if (!msg.range) {\n return;\n }\n renderColumn = Math.min(renderColumn, msg.range.startColumn);\n highlightRange = Range.plusRange(highlightRange, msg.range);\n if (!(msg instanceof ColorHover)) {\n msg.contents\n .filter(function (contents) { return !isEmptyMarkdownString(contents); })\n .forEach(function (contents) {\n var renderedContents = _this._markdownRenderer.render(contents);\n markdownDisposeable = renderedContents;\n fragment.appendChild($('div.hover-row', null, renderedContents.element));\n isEmptyHoverContent = false;\n });\n }\n else {\n containColorPicker = true;\n var _a = msg.color, red = _a.red, green = _a.green, blue = _a.blue, alpha = _a.alpha;\n var rgba = new RGBA(red * 255, green * 255, blue * 255, alpha);\n var color_1 = new Color(rgba);\n var editorModel_1 = _this._editor.getModel();\n var range_2 = new Range(msg.range.startLineNumber, msg.range.startColumn, msg.range.endLineNumber, msg.range.endColumn);\n var colorInfo = { range: msg.range, color: msg.color };\n // create blank olor picker model and widget first to ensure it's positioned correctly.\n var model_1 = new ColorPickerModel(color_1, [], 0);\n var widget_1 = new ColorPickerWidget(fragment, model_1, _this._editor.getConfiguration().pixelRatio, _this._themeService);\n getColorPresentations(editorModel_1, colorInfo, msg.provider, CancellationToken.None).then(function (colorPresentations) {\n model_1.colorPresentations = colorPresentations;\n var originalText = _this._editor.getModel().getValueInRange(msg.range);\n model_1.guessColorPresentation(color_1, originalText);\n var updateEditorModel = function () {\n var textEdits;\n var newRange;\n if (model_1.presentation.textEdit) {\n textEdits = [model_1.presentation.textEdit];\n newRange = new Range(model_1.presentation.textEdit.range.startLineNumber, model_1.presentation.textEdit.range.startColumn, model_1.presentation.textEdit.range.endLineNumber, model_1.presentation.textEdit.range.endColumn);\n newRange = newRange.setEndPosition(newRange.endLineNumber, newRange.startColumn + model_1.presentation.textEdit.text.length);\n }\n else {\n textEdits = [{ identifier: null, range: range_2, text: model_1.presentation.label, forceMoveMarkers: false }];\n newRange = range_2.setEndPosition(range_2.endLineNumber, range_2.startColumn + model_1.presentation.label.length);\n }\n _this._editor.executeEdits('colorpicker', textEdits);\n if (model_1.presentation.additionalTextEdits) {\n textEdits = model_1.presentation.additionalTextEdits.slice();\n _this._editor.executeEdits('colorpicker', textEdits);\n _this.hide();\n }\n _this._editor.pushUndoStop();\n range_2 = newRange;\n };\n var updateColorPresentations = function (color) {\n return getColorPresentations(editorModel_1, {\n range: range_2,\n color: {\n red: color.rgba.r / 255,\n green: color.rgba.g / 255,\n blue: color.rgba.b / 255,\n alpha: color.rgba.a\n }\n }, msg.provider, CancellationToken.None).then(function (colorPresentations) {\n model_1.colorPresentations = colorPresentations;\n });\n };\n var colorListener = model_1.onColorFlushed(function (color) {\n updateColorPresentations(color).then(updateEditorModel);\n });\n var colorChangeListener = model_1.onDidChangeColor(updateColorPresentations);\n _this._colorPicker = widget_1;\n _this.showAt(new Position(renderRange.startLineNumber, renderColumn), _this._shouldFocus);\n _this.updateContents(fragment);\n _this._colorPicker.layout();\n _this.renderDisposable = combinedDisposable([colorListener, colorChangeListener, widget_1, markdownDisposeable]);\n });\n }\n });\n // show\n if (!containColorPicker && !isEmptyHoverContent) {\n this.showAt(new Position(renderRange.startLineNumber, renderColumn), this._shouldFocus);\n this.updateContents(fragment);\n }\n this._isChangingDecorations = true;\n this._highlightDecorations = this._editor.deltaDecorations(this._highlightDecorations, [{\n range: highlightRange,\n options: ModesContentHoverWidget._DECORATION_OPTIONS\n }]);\n this._isChangingDecorations = false;\n };\n ModesContentHoverWidget.ID = 'editor.contrib.modesContentHoverWidget';\n ModesContentHoverWidget._DECORATION_OPTIONS = ModelDecorationOptions.register({\n className: 'hoverHighlight'\n });\n return ModesContentHoverWidget;\n}(ContentHoverWidget));\nexport { ModesContentHoverWidget };\nfunction hoverContentsEquals(first, second) {\n if ((!first && second) || (first && !second) || first.length !== second.length) {\n return false;\n }\n for (var i = 0; i < first.length; i++) {\n var firstElement = first[i];\n var secondElement = second[i];\n if (firstElement instanceof ColorHover) {\n return false;\n }\n if (secondElement instanceof ColorHover) {\n return false;\n }\n if (!markedStringsEquals(firstElement.contents, secondElement.contents)) {\n return false;\n }\n }\n return true;\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { HoverOperation } from './hoverOperation';\nimport { GlyphHoverWidget } from './hoverWidgets';\nimport { $ } from '../../../base/browser/dom';\nimport { isEmptyMarkdownString } from '../../../base/common/htmlContent';\nimport { dispose } from '../../../base/common/lifecycle';\nvar MarginComputer = /** @class */ (function () {\n function MarginComputer(editor) {\n this._editor = editor;\n this._lineNumber = -1;\n }\n MarginComputer.prototype.setLineNumber = function (lineNumber) {\n this._lineNumber = lineNumber;\n this._result = [];\n };\n MarginComputer.prototype.clearResult = function () {\n this._result = [];\n };\n MarginComputer.prototype.computeSync = function () {\n var toHoverMessage = function (contents) {\n return {\n value: contents\n };\n };\n var lineDecorations = this._editor.getLineDecorations(this._lineNumber);\n var result = [];\n for (var i = 0, len = lineDecorations.length; i < len; i++) {\n var d = lineDecorations[i];\n if (!d.options.glyphMarginClassName) {\n continue;\n }\n var hoverMessage = d.options.glyphMarginHoverMessage;\n if (isEmptyMarkdownString(hoverMessage)) {\n continue;\n }\n if (Array.isArray(hoverMessage)) {\n result = result.concat(hoverMessage.map(toHoverMessage));\n }\n else {\n result.push(toHoverMessage(hoverMessage));\n }\n }\n return result;\n };\n MarginComputer.prototype.onResult = function (result, isFromSynchronousComputation) {\n this._result = this._result.concat(result);\n };\n MarginComputer.prototype.getResult = function () {\n return this._result;\n };\n MarginComputer.prototype.getResultWithLoadingMessage = function () {\n return this.getResult();\n };\n return MarginComputer;\n}());\nvar ModesGlyphHoverWidget = /** @class */ (function (_super) {\n __extends(ModesGlyphHoverWidget, _super);\n function ModesGlyphHoverWidget(editor, markdownRenderer) {\n var _this = _super.call(this, ModesGlyphHoverWidget.ID, editor) || this;\n _this._lastLineNumber = -1;\n _this._markdownRenderer = markdownRenderer;\n _this._computer = new MarginComputer(_this._editor);\n _this._hoverOperation = new HoverOperation(_this._computer, function (result) { return _this._withResult(result); }, null, function (result) { return _this._withResult(result); });\n return _this;\n }\n ModesGlyphHoverWidget.prototype.dispose = function () {\n this._renderDisposeables = dispose(this._renderDisposeables);\n this._hoverOperation.cancel();\n _super.prototype.dispose.call(this);\n };\n ModesGlyphHoverWidget.prototype.onModelDecorationsChanged = function () {\n if (this.isVisible) {\n // The decorations have changed and the hover is visible,\n // we need to recompute the displayed text\n this._hoverOperation.cancel();\n this._computer.clearResult();\n this._hoverOperation.start(0 /* Delayed */);\n }\n };\n ModesGlyphHoverWidget.prototype.startShowingAt = function (lineNumber) {\n if (this._lastLineNumber === lineNumber) {\n // We have to show the widget at the exact same line number as before, so no work is needed\n return;\n }\n this._hoverOperation.cancel();\n this.hide();\n this._lastLineNumber = lineNumber;\n this._computer.setLineNumber(lineNumber);\n this._hoverOperation.start(0 /* Delayed */);\n };\n ModesGlyphHoverWidget.prototype.hide = function () {\n this._lastLineNumber = -1;\n this._hoverOperation.cancel();\n _super.prototype.hide.call(this);\n };\n ModesGlyphHoverWidget.prototype._withResult = function (result) {\n this._messages = result;\n if (this._messages.length > 0) {\n this._renderMessages(this._lastLineNumber, this._messages);\n }\n else {\n this.hide();\n }\n };\n ModesGlyphHoverWidget.prototype._renderMessages = function (lineNumber, messages) {\n var _this = this;\n dispose(this._renderDisposeables);\n this._renderDisposeables = [];\n var fragment = document.createDocumentFragment();\n messages.forEach(function (msg) {\n var renderedContents = _this._markdownRenderer.render(msg.value);\n _this._renderDisposeables.push(renderedContents);\n fragment.appendChild($('div.hover-row', null, renderedContents.element));\n });\n this.updateContents(fragment);\n this.showAt(lineNumber);\n };\n ModesGlyphHoverWidget.ID = 'editor.contrib.modesGlyphHoverWidget';\n return ModesGlyphHoverWidget;\n}(GlyphHoverWidget));\nexport { ModesGlyphHoverWidget };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __param = (this && this.__param) || function (paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n};\nimport { renderMarkdown } from '../../../base/browser/htmlContentRenderer';\nimport { IOpenerService, NullOpenerService } from '../../../platform/opener/common/opener';\nimport { IModeService } from '../../common/services/modeService';\nimport URI from '../../../base/common/uri';\nimport { onUnexpectedError } from '../../../base/common/errors';\nimport { tokenizeToString } from '../../common/modes/textToHtmlTokenizer';\nimport { optional } from '../../../platform/instantiation/common/instantiation';\nimport { Emitter } from '../../../base/common/event';\nimport { dispose } from '../../../base/common/lifecycle';\nvar MarkdownRenderer = /** @class */ (function () {\n function MarkdownRenderer(_editor, _modeService, _openerService) {\n if (_openerService === void 0) { _openerService = NullOpenerService; }\n this._editor = _editor;\n this._modeService = _modeService;\n this._openerService = _openerService;\n this._onDidRenderCodeBlock = new Emitter();\n this.onDidRenderCodeBlock = this._onDidRenderCodeBlock.event;\n }\n MarkdownRenderer.prototype.getOptions = function (disposeables) {\n var _this = this;\n return {\n codeBlockRenderer: function (languageAlias, value) {\n // In markdown,\n // it is possible that we stumble upon language aliases (e.g.js instead of javascript)\n // it is possible no alias is given in which case we fall back to the current editor lang\n var modeId = languageAlias\n ? _this._modeService.getModeIdForLanguageName(languageAlias)\n : _this._editor.getModel().getLanguageIdentifier().language;\n return _this._modeService.getOrCreateMode(modeId).then(function (_) {\n return tokenizeToString(value, modeId);\n }).then(function (code) {\n return \"\" + code + \"\";\n });\n },\n codeBlockRenderCallback: function () { return _this._onDidRenderCodeBlock.fire(); },\n actionHandler: {\n callback: function (content) {\n _this._openerService.open(URI.parse(content)).then(void 0, onUnexpectedError);\n },\n disposeables: disposeables\n }\n };\n };\n MarkdownRenderer.prototype.render = function (markdown) {\n var disposeables = [];\n var element;\n if (!markdown) {\n element = document.createElement('span');\n }\n else {\n element = renderMarkdown(markdown, this.getOptions(disposeables));\n }\n return {\n element: element,\n dispose: function () { return dispose(disposeables); }\n };\n };\n MarkdownRenderer = __decorate([\n __param(1, IModeService),\n __param(2, optional(IOpenerService))\n ], MarkdownRenderer);\n return MarkdownRenderer;\n}());\nexport { MarkdownRenderer };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __param = (this && this.__param) || function (paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n};\nimport './hover.css';\nimport * as nls from '../../../nls';\nimport { KeyChord } from '../../../base/common/keyCodes';\nimport * as platform from '../../../base/common/platform';\nimport { IOpenerService } from '../../../platform/opener/common/opener';\nimport { IModeService } from '../../common/services/modeService';\nimport { Range } from '../../common/core/range';\nimport { registerEditorAction, registerEditorContribution, EditorAction } from '../../browser/editorExtensions';\nimport { MouseTargetType } from '../../browser/editorBrowser';\nimport { ModesContentHoverWidget } from './modesContentHover';\nimport { ModesGlyphHoverWidget } from './modesGlyphHover';\nimport { dispose } from '../../../base/common/lifecycle';\nimport { registerThemingParticipant, IThemeService } from '../../../platform/theme/common/themeService';\nimport { editorHoverHighlight, editorHoverBackground, editorHoverBorder, textLinkForeground, textCodeBlockBackground } from '../../../platform/theme/common/colorRegistry';\nimport { EditorContextKeys } from '../../common/editorContextKeys';\nimport { MarkdownRenderer } from '../markdown/markdownRenderer';\nvar ModesHoverController = /** @class */ (function () {\n function ModesHoverController(_editor, _openerService, _modeService, _themeService) {\n var _this = this;\n this._editor = _editor;\n this._openerService = _openerService;\n this._modeService = _modeService;\n this._themeService = _themeService;\n this._toUnhook = [];\n this._isMouseDown = false;\n this._hoverClicked = false;\n this._hookEvents();\n this._didChangeConfigurationHandler = this._editor.onDidChangeConfiguration(function (e) {\n if (e.contribInfo) {\n _this._hideWidgets();\n _this._unhookEvents();\n _this._hookEvents();\n }\n });\n }\n Object.defineProperty(ModesHoverController.prototype, \"contentWidget\", {\n get: function () {\n if (!this._contentWidget) {\n this._createHoverWidget();\n }\n return this._contentWidget;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ModesHoverController.prototype, \"glyphWidget\", {\n get: function () {\n if (!this._glyphWidget) {\n this._createHoverWidget();\n }\n return this._glyphWidget;\n },\n enumerable: true,\n configurable: true\n });\n ModesHoverController.get = function (editor) {\n return editor.getContribution(ModesHoverController.ID);\n };\n ModesHoverController.prototype._hookEvents = function () {\n var _this = this;\n var hideWidgetsEventHandler = function () { return _this._hideWidgets(); };\n var hoverOpts = this._editor.getConfiguration().contribInfo.hover;\n this._isHoverEnabled = hoverOpts.enabled;\n this._isHoverSticky = hoverOpts.sticky;\n if (this._isHoverEnabled) {\n this._toUnhook.push(this._editor.onMouseDown(function (e) { return _this._onEditorMouseDown(e); }));\n this._toUnhook.push(this._editor.onMouseUp(function (e) { return _this._onEditorMouseUp(e); }));\n this._toUnhook.push(this._editor.onMouseMove(function (e) { return _this._onEditorMouseMove(e); }));\n this._toUnhook.push(this._editor.onKeyDown(function (e) { return _this._onKeyDown(e); }));\n this._toUnhook.push(this._editor.onDidChangeModelDecorations(function () { return _this._onModelDecorationsChanged(); }));\n }\n else {\n this._toUnhook.push(this._editor.onMouseMove(hideWidgetsEventHandler));\n }\n this._toUnhook.push(this._editor.onMouseLeave(hideWidgetsEventHandler));\n this._toUnhook.push(this._editor.onDidChangeModel(hideWidgetsEventHandler));\n this._toUnhook.push(this._editor.onDidScrollChange(function (e) { return _this._onEditorScrollChanged(e); }));\n };\n ModesHoverController.prototype._unhookEvents = function () {\n this._toUnhook = dispose(this._toUnhook);\n };\n ModesHoverController.prototype._onModelDecorationsChanged = function () {\n this.contentWidget.onModelDecorationsChanged();\n this.glyphWidget.onModelDecorationsChanged();\n };\n ModesHoverController.prototype._onEditorScrollChanged = function (e) {\n if (e.scrollTopChanged || e.scrollLeftChanged) {\n this._hideWidgets();\n }\n };\n ModesHoverController.prototype._onEditorMouseDown = function (mouseEvent) {\n this._isMouseDown = true;\n var targetType = mouseEvent.target.type;\n if (targetType === MouseTargetType.CONTENT_WIDGET && mouseEvent.target.detail === ModesContentHoverWidget.ID) {\n this._hoverClicked = true;\n // mouse down on top of content hover widget\n return;\n }\n if (targetType === MouseTargetType.OVERLAY_WIDGET && mouseEvent.target.detail === ModesGlyphHoverWidget.ID) {\n // mouse down on top of overlay hover widget\n return;\n }\n if (targetType !== MouseTargetType.OVERLAY_WIDGET && mouseEvent.target.detail !== ModesGlyphHoverWidget.ID) {\n this._hoverClicked = false;\n }\n this._hideWidgets();\n };\n ModesHoverController.prototype._onEditorMouseUp = function (mouseEvent) {\n this._isMouseDown = false;\n };\n ModesHoverController.prototype._onEditorMouseMove = function (mouseEvent) {\n // const this._editor.getConfiguration().contribInfo.hover.sticky;\n var targetType = mouseEvent.target.type;\n var hasStopKey = (platform.isMacintosh ? mouseEvent.event.metaKey : mouseEvent.event.ctrlKey);\n if (this._isMouseDown && this._hoverClicked && this.contentWidget.isColorPickerVisible()) {\n return;\n }\n if (this._isHoverSticky && targetType === MouseTargetType.CONTENT_WIDGET && mouseEvent.target.detail === ModesContentHoverWidget.ID && !hasStopKey) {\n // mouse moved on top of content hover widget\n return;\n }\n if (this._isHoverSticky && targetType === MouseTargetType.OVERLAY_WIDGET && mouseEvent.target.detail === ModesGlyphHoverWidget.ID && !hasStopKey) {\n // mouse moved on top of overlay hover widget\n return;\n }\n if (targetType === MouseTargetType.CONTENT_EMPTY) {\n var epsilon = this._editor.getConfiguration().fontInfo.typicalHalfwidthCharacterWidth / 2;\n var data = mouseEvent.target.detail;\n if (data && !data.isAfterLines && typeof data.horizontalDistanceToText === 'number' && data.horizontalDistanceToText < epsilon) {\n // Let hover kick in even when the mouse is technically in the empty area after a line, given the distance is small enough\n targetType = MouseTargetType.CONTENT_TEXT;\n }\n }\n if (targetType === MouseTargetType.CONTENT_TEXT) {\n this.glyphWidget.hide();\n if (this._isHoverEnabled) {\n this.contentWidget.startShowingAt(mouseEvent.target.range, 0 /* Delayed */, false);\n }\n }\n else if (targetType === MouseTargetType.GUTTER_GLYPH_MARGIN) {\n this.contentWidget.hide();\n if (this._isHoverEnabled) {\n this.glyphWidget.startShowingAt(mouseEvent.target.position.lineNumber);\n }\n }\n else {\n this._hideWidgets();\n }\n };\n ModesHoverController.prototype._onKeyDown = function (e) {\n if (e.keyCode !== 5 /* Ctrl */ && e.keyCode !== 6 /* Alt */ && e.keyCode !== 57 /* Meta */) {\n // Do not hide hover when Ctrl/Meta is pressed\n this._hideWidgets();\n }\n };\n ModesHoverController.prototype._hideWidgets = function () {\n if (!this._contentWidget || (this._isMouseDown && this._hoverClicked && this._contentWidget.isColorPickerVisible())) {\n return;\n }\n this._glyphWidget.hide();\n this._contentWidget.hide();\n };\n ModesHoverController.prototype._createHoverWidget = function () {\n var renderer = new MarkdownRenderer(this._editor, this._modeService, this._openerService);\n this._contentWidget = new ModesContentHoverWidget(this._editor, renderer, this._themeService);\n this._glyphWidget = new ModesGlyphHoverWidget(this._editor, renderer);\n };\n ModesHoverController.prototype.showContentHover = function (range, mode, focus) {\n this.contentWidget.startShowingAt(range, mode, focus);\n };\n ModesHoverController.prototype.getId = function () {\n return ModesHoverController.ID;\n };\n ModesHoverController.prototype.dispose = function () {\n this._unhookEvents();\n this._didChangeConfigurationHandler.dispose();\n if (this._glyphWidget) {\n this._glyphWidget.dispose();\n this._glyphWidget = null;\n }\n if (this._contentWidget) {\n this._contentWidget.dispose();\n this._contentWidget = null;\n }\n };\n ModesHoverController.ID = 'editor.contrib.hover';\n ModesHoverController = __decorate([\n __param(1, IOpenerService),\n __param(2, IModeService),\n __param(3, IThemeService)\n ], ModesHoverController);\n return ModesHoverController;\n}());\nexport { ModesHoverController };\nvar ShowHoverAction = /** @class */ (function (_super) {\n __extends(ShowHoverAction, _super);\n function ShowHoverAction() {\n return _super.call(this, {\n id: 'editor.action.showHover',\n label: nls.localize({\n key: 'showHover',\n comment: [\n 'Label for action that will trigger the showing of a hover in the editor.',\n 'This allows for users to show the hover without using the mouse.'\n ]\n }, \"Show Hover\"),\n alias: 'Show Hover',\n precondition: null,\n kbOpts: {\n kbExpr: EditorContextKeys.editorTextFocus,\n primary: KeyChord(2048 /* CtrlCmd */ | 41 /* KEY_K */, 2048 /* CtrlCmd */ | 39 /* KEY_I */),\n weight: 100 /* EditorContrib */\n }\n }) || this;\n }\n ShowHoverAction.prototype.run = function (accessor, editor) {\n var controller = ModesHoverController.get(editor);\n if (!controller) {\n return;\n }\n var position = editor.getPosition();\n var range = new Range(position.lineNumber, position.column, position.lineNumber, position.column);\n controller.showContentHover(range, 1 /* Immediate */, true);\n };\n return ShowHoverAction;\n}(EditorAction));\nregisterEditorContribution(ModesHoverController);\nregisterEditorAction(ShowHoverAction);\n// theming\nregisterThemingParticipant(function (theme, collector) {\n var editorHoverHighlightColor = theme.getColor(editorHoverHighlight);\n if (editorHoverHighlightColor) {\n collector.addRule(\".monaco-editor .hoverHighlight { background-color: \" + editorHoverHighlightColor + \"; }\");\n }\n var hoverBackground = theme.getColor(editorHoverBackground);\n if (hoverBackground) {\n collector.addRule(\".monaco-editor .monaco-editor-hover { background-color: \" + hoverBackground + \"; }\");\n }\n var hoverBorder = theme.getColor(editorHoverBorder);\n if (hoverBorder) {\n collector.addRule(\".monaco-editor .monaco-editor-hover { border: 1px solid \" + hoverBorder + \"; }\");\n collector.addRule(\".monaco-editor .monaco-editor-hover .hover-row:not(:first-child):not(:empty) { border-top: 1px solid \" + hoverBorder.transparent(0.5) + \"; }\");\n }\n var link = theme.getColor(textLinkForeground);\n if (link) {\n collector.addRule(\".monaco-editor .monaco-editor-hover a { color: \" + link + \"; }\");\n }\n var codeBackground = theme.getColor(textCodeBlockBackground);\n if (codeBackground) {\n collector.addRule(\".monaco-editor .monaco-editor-hover code { background-color: \" + codeBackground + \"; }\");\n }\n});\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport { Selection } from '../../common/core/selection';\nvar InPlaceReplaceCommand = /** @class */ (function () {\n function InPlaceReplaceCommand(editRange, originalSelection, text) {\n this._editRange = editRange;\n this._originalSelection = originalSelection;\n this._text = text;\n }\n InPlaceReplaceCommand.prototype.getEditOperations = function (model, builder) {\n builder.addTrackedEditOperation(this._editRange, this._text);\n };\n InPlaceReplaceCommand.prototype.computeCursorState = function (model, helper) {\n var inverseEditOperations = helper.getInverseEditOperations();\n var srcRange = inverseEditOperations[0].range;\n if (!this._originalSelection.isEmpty()) {\n // Preserve selection and extends to typed text\n return new Selection(srcRange.endLineNumber, srcRange.endColumn - this._text.length, srcRange.endLineNumber, srcRange.endColumn);\n }\n return new Selection(srcRange.endLineNumber, Math.min(this._originalSelection.positionColumn, srcRange.endColumn), srcRange.endLineNumber, Math.min(this._originalSelection.positionColumn, srcRange.endColumn));\n };\n return InPlaceReplaceCommand;\n}());\nexport { InPlaceReplaceCommand };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __param = (this && this.__param) || function (paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n};\nimport * as nls from '../../../nls';\nimport { TPromise } from '../../../base/common/winjs.base';\nimport { Range } from '../../common/core/range';\nimport { Selection } from '../../common/core/selection';\nimport { EditorContextKeys } from '../../common/editorContextKeys';\nimport { registerEditorAction, EditorAction, registerEditorContribution } from '../../browser/editorExtensions';\nimport { IEditorWorkerService } from '../../common/services/editorWorkerService';\nimport { InPlaceReplaceCommand } from './inPlaceReplaceCommand';\nimport { EditorState } from '../../browser/core/editorState';\nimport { registerThemingParticipant } from '../../../platform/theme/common/themeService';\nimport { editorBracketMatchBorder } from '../../common/view/editorColorRegistry';\nimport { ModelDecorationOptions } from '../../common/model/textModel';\nimport { createCancelablePromise, timeout } from '../../../base/common/async';\nimport { onUnexpectedError } from '../../../base/common/errors';\nvar InPlaceReplaceController = /** @class */ (function () {\n function InPlaceReplaceController(editor, editorWorkerService) {\n this.decorationIds = [];\n this.editor = editor;\n this.editorWorkerService = editorWorkerService;\n }\n InPlaceReplaceController.get = function (editor) {\n return editor.getContribution(InPlaceReplaceController.ID);\n };\n InPlaceReplaceController.prototype.dispose = function () {\n };\n InPlaceReplaceController.prototype.getId = function () {\n return InPlaceReplaceController.ID;\n };\n InPlaceReplaceController.prototype.run = function (source, up) {\n var _this = this;\n // cancel any pending request\n if (this.currentRequest) {\n this.currentRequest.cancel();\n }\n var selection = this.editor.getSelection();\n var model = this.editor.getModel();\n var modelURI = model.uri;\n if (selection.startLineNumber !== selection.endLineNumber) {\n // Can't accept multiline selection\n return null;\n }\n var state = new EditorState(this.editor, 1 /* Value */ | 4 /* Position */);\n if (!this.editorWorkerService.canNavigateValueSet(modelURI)) {\n return undefined;\n }\n this.currentRequest = createCancelablePromise(function (token) { return _this.editorWorkerService.navigateValueSet(modelURI, selection, up); });\n return this.currentRequest.then(function (result) {\n if (!result || !result.range || !result.value) {\n // No proper result\n return;\n }\n if (!state.validate(_this.editor)) {\n // state has changed\n return;\n }\n // Selection\n var editRange = Range.lift(result.range);\n var highlightRange = result.range;\n var diff = result.value.length - (selection.endColumn - selection.startColumn);\n // highlight\n highlightRange = {\n startLineNumber: highlightRange.startLineNumber,\n startColumn: highlightRange.startColumn,\n endLineNumber: highlightRange.endLineNumber,\n endColumn: highlightRange.startColumn + result.value.length\n };\n if (diff > 1) {\n selection = new Selection(selection.startLineNumber, selection.startColumn, selection.endLineNumber, selection.endColumn + diff - 1);\n }\n // Insert new text\n var command = new InPlaceReplaceCommand(editRange, selection, result.value);\n _this.editor.pushUndoStop();\n _this.editor.executeCommand(source, command);\n _this.editor.pushUndoStop();\n // add decoration\n _this.decorationIds = _this.editor.deltaDecorations(_this.decorationIds, [{\n range: highlightRange,\n options: InPlaceReplaceController.DECORATION\n }]);\n // remove decoration after delay\n if (_this.decorationRemover) {\n _this.decorationRemover.cancel();\n }\n _this.decorationRemover = timeout(350);\n _this.decorationRemover.then(function () { return _this.decorationIds = _this.editor.deltaDecorations(_this.decorationIds, []); }).catch(onUnexpectedError);\n }).catch(onUnexpectedError);\n };\n InPlaceReplaceController.ID = 'editor.contrib.inPlaceReplaceController';\n InPlaceReplaceController.DECORATION = ModelDecorationOptions.register({\n className: 'valueSetReplacement'\n });\n InPlaceReplaceController = __decorate([\n __param(1, IEditorWorkerService)\n ], InPlaceReplaceController);\n return InPlaceReplaceController;\n}());\nvar InPlaceReplaceUp = /** @class */ (function (_super) {\n __extends(InPlaceReplaceUp, _super);\n function InPlaceReplaceUp() {\n return _super.call(this, {\n id: 'editor.action.inPlaceReplace.up',\n label: nls.localize('InPlaceReplaceAction.previous.label', \"Replace with Previous Value\"),\n alias: 'Replace with Previous Value',\n precondition: EditorContextKeys.writable,\n kbOpts: {\n kbExpr: EditorContextKeys.editorTextFocus,\n primary: 2048 /* CtrlCmd */ | 1024 /* Shift */ | 82 /* US_COMMA */,\n weight: 100 /* EditorContrib */\n }\n }) || this;\n }\n InPlaceReplaceUp.prototype.run = function (accessor, editor) {\n var controller = InPlaceReplaceController.get(editor);\n if (!controller) {\n return undefined;\n }\n return TPromise.wrap(controller.run(this.id, true));\n };\n return InPlaceReplaceUp;\n}(EditorAction));\nvar InPlaceReplaceDown = /** @class */ (function (_super) {\n __extends(InPlaceReplaceDown, _super);\n function InPlaceReplaceDown() {\n return _super.call(this, {\n id: 'editor.action.inPlaceReplace.down',\n label: nls.localize('InPlaceReplaceAction.next.label', \"Replace with Next Value\"),\n alias: 'Replace with Next Value',\n precondition: EditorContextKeys.writable,\n kbOpts: {\n kbExpr: EditorContextKeys.editorTextFocus,\n primary: 2048 /* CtrlCmd */ | 1024 /* Shift */ | 84 /* US_DOT */,\n weight: 100 /* EditorContrib */\n }\n }) || this;\n }\n InPlaceReplaceDown.prototype.run = function (accessor, editor) {\n var controller = InPlaceReplaceController.get(editor);\n if (!controller) {\n return undefined;\n }\n return TPromise.wrap(controller.run(this.id, false));\n };\n return InPlaceReplaceDown;\n}(EditorAction));\nregisterEditorContribution(InPlaceReplaceController);\nregisterEditorAction(InPlaceReplaceUp);\nregisterEditorAction(InPlaceReplaceDown);\nregisterThemingParticipant(function (theme, collector) {\n var border = theme.getColor(editorBracketMatchBorder);\n if (border) {\n collector.addRule(\".monaco-editor.vs .valueSetReplacement { outline: solid 2px \" + border + \"; }\");\n }\n});\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport { EditOperation } from '../../common/core/editOperation';\nimport { Range } from '../../common/core/range';\nvar SortLinesCommand = /** @class */ (function () {\n function SortLinesCommand(selection, descending) {\n this.selection = selection;\n this.descending = descending;\n }\n SortLinesCommand.prototype.getEditOperations = function (model, builder) {\n var op = sortLines(model, this.selection, this.descending);\n if (op) {\n builder.addEditOperation(op.range, op.text);\n }\n this.selectionId = builder.trackSelection(this.selection);\n };\n SortLinesCommand.prototype.computeCursorState = function (model, helper) {\n return helper.getTrackedSelection(this.selectionId);\n };\n SortLinesCommand.canRun = function (model, selection, descending) {\n var data = getSortData(model, selection, descending);\n if (!data) {\n return false;\n }\n for (var i = 0, len = data.before.length; i < len; i++) {\n if (data.before[i] !== data.after[i]) {\n return true;\n }\n }\n return false;\n };\n return SortLinesCommand;\n}());\nexport { SortLinesCommand };\nfunction getSortData(model, selection, descending) {\n var startLineNumber = selection.startLineNumber;\n var endLineNumber = selection.endLineNumber;\n if (selection.endColumn === 1) {\n endLineNumber--;\n }\n // Nothing to sort if user didn't select anything.\n if (startLineNumber >= endLineNumber) {\n return null;\n }\n var linesToSort = [];\n // Get the contents of the selection to be sorted.\n for (var lineNumber = startLineNumber; lineNumber <= endLineNumber; lineNumber++) {\n linesToSort.push(model.getLineContent(lineNumber));\n }\n var sorted = linesToSort.slice(0);\n sorted.sort(function (a, b) {\n return a.toLowerCase().localeCompare(b.toLowerCase());\n });\n // If descending, reverse the order.\n if (descending === true) {\n sorted = sorted.reverse();\n }\n return {\n startLineNumber: startLineNumber,\n endLineNumber: endLineNumber,\n before: linesToSort,\n after: sorted\n };\n}\n/**\n * Generate commands for sorting lines on a model.\n */\nfunction sortLines(model, selection, descending) {\n var data = getSortData(model, selection, descending);\n if (!data) {\n return null;\n }\n return EditOperation.replace(new Range(data.startLineNumber, 1, data.endLineNumber, model.getLineMaxColumn(data.endLineNumber)), data.after.join('\\n'));\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport * as strings from '../../../base/common/strings';\nimport { EditOperation } from '../core/editOperation';\nimport { Range } from '../core/range';\nvar TrimTrailingWhitespaceCommand = /** @class */ (function () {\n function TrimTrailingWhitespaceCommand(selection, cursors) {\n this.selection = selection;\n this.cursors = cursors;\n }\n TrimTrailingWhitespaceCommand.prototype.getEditOperations = function (model, builder) {\n var ops = trimTrailingWhitespace(model, this.cursors);\n for (var i = 0, len = ops.length; i < len; i++) {\n var op = ops[i];\n builder.addEditOperation(op.range, op.text);\n }\n this.selectionId = builder.trackSelection(this.selection);\n };\n TrimTrailingWhitespaceCommand.prototype.computeCursorState = function (model, helper) {\n return helper.getTrackedSelection(this.selectionId);\n };\n return TrimTrailingWhitespaceCommand;\n}());\nexport { TrimTrailingWhitespaceCommand };\n/**\n * Generate commands for trimming trailing whitespace on a model and ignore lines on which cursors are sitting.\n */\nexport function trimTrailingWhitespace(model, cursors) {\n // Sort cursors ascending\n cursors.sort(function (a, b) {\n if (a.lineNumber === b.lineNumber) {\n return a.column - b.column;\n }\n return a.lineNumber - b.lineNumber;\n });\n // Reduce multiple cursors on the same line and only keep the last one on the line\n for (var i = cursors.length - 2; i >= 0; i--) {\n if (cursors[i].lineNumber === cursors[i + 1].lineNumber) {\n // Remove cursor at `i`\n cursors.splice(i, 1);\n }\n }\n var r = [];\n var rLen = 0;\n var cursorIndex = 0;\n var cursorLen = cursors.length;\n for (var lineNumber = 1, lineCount = model.getLineCount(); lineNumber <= lineCount; lineNumber++) {\n var lineContent = model.getLineContent(lineNumber);\n var maxLineColumn = lineContent.length + 1;\n var minEditColumn = 0;\n if (cursorIndex < cursorLen && cursors[cursorIndex].lineNumber === lineNumber) {\n minEditColumn = cursors[cursorIndex].column;\n cursorIndex++;\n if (minEditColumn === maxLineColumn) {\n // The cursor is at the end of the line => no edits for sure on this line\n continue;\n }\n }\n if (lineContent.length === 0) {\n continue;\n }\n var lastNonWhitespaceIndex = strings.lastNonWhitespaceIndex(lineContent);\n var fromColumn = 0;\n if (lastNonWhitespaceIndex === -1) {\n // Entire line is whitespace\n fromColumn = 1;\n }\n else if (lastNonWhitespaceIndex !== lineContent.length - 1) {\n // There is trailing whitespace\n fromColumn = lastNonWhitespaceIndex + 2;\n }\n else {\n // There is no trailing whitespace\n continue;\n }\n fromColumn = Math.max(minEditColumn, fromColumn);\n r[rLen++] = EditOperation.delete(new Range(lineNumber, fromColumn, lineNumber, maxLineColumn));\n }\n return r;\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport { Range } from '../../common/core/range';\nimport { Selection } from '../../common/core/selection';\nvar CopyLinesCommand = /** @class */ (function () {\n function CopyLinesCommand(selection, isCopyingDown) {\n this._selection = selection;\n this._isCopyingDown = isCopyingDown;\n }\n CopyLinesCommand.prototype.getEditOperations = function (model, builder) {\n var s = this._selection;\n this._startLineNumberDelta = 0;\n this._endLineNumberDelta = 0;\n if (s.startLineNumber < s.endLineNumber && s.endColumn === 1) {\n this._endLineNumberDelta = 1;\n s = s.setEndPosition(s.endLineNumber - 1, model.getLineMaxColumn(s.endLineNumber - 1));\n }\n var sourceLines = [];\n for (var i = s.startLineNumber; i <= s.endLineNumber; i++) {\n sourceLines.push(model.getLineContent(i));\n }\n var sourceText = sourceLines.join('\\n');\n if (sourceText === '') {\n // Duplicating empty line\n if (this._isCopyingDown) {\n this._startLineNumberDelta++;\n this._endLineNumberDelta++;\n }\n }\n if (!this._isCopyingDown) {\n builder.addEditOperation(new Range(s.endLineNumber, model.getLineMaxColumn(s.endLineNumber), s.endLineNumber, model.getLineMaxColumn(s.endLineNumber)), '\\n' + sourceText);\n }\n else {\n builder.addEditOperation(new Range(s.startLineNumber, 1, s.startLineNumber, 1), sourceText + '\\n');\n }\n this._selectionId = builder.trackSelection(s);\n this._selectionDirection = this._selection.getDirection();\n };\n CopyLinesCommand.prototype.computeCursorState = function (model, helper) {\n var result = helper.getTrackedSelection(this._selectionId);\n if (this._startLineNumberDelta !== 0 || this._endLineNumberDelta !== 0) {\n var startLineNumber = result.startLineNumber;\n var startColumn = result.startColumn;\n var endLineNumber = result.endLineNumber;\n var endColumn = result.endColumn;\n if (this._startLineNumberDelta !== 0) {\n startLineNumber = startLineNumber + this._startLineNumberDelta;\n startColumn = 1;\n }\n if (this._endLineNumberDelta !== 0) {\n endLineNumber = endLineNumber + this._endLineNumberDelta;\n endColumn = 1;\n }\n result = Selection.createWithDirection(startLineNumber, startColumn, endLineNumber, endColumn, this._selectionDirection);\n }\n return result;\n };\n return CopyLinesCommand;\n}());\nexport { CopyLinesCommand };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport { Range } from '../../common/core/range';\nimport { Selection } from '../../common/core/selection';\nvar DeleteLinesCommand = /** @class */ (function () {\n function DeleteLinesCommand(startLineNumber, endLineNumber, restoreCursorToColumn) {\n this.startLineNumber = startLineNumber;\n this.endLineNumber = endLineNumber;\n this.restoreCursorToColumn = restoreCursorToColumn;\n }\n DeleteLinesCommand.prototype.getEditOperations = function (model, builder) {\n if (model.getLineCount() === 1 && model.getLineMaxColumn(1) === 1) {\n // Model is empty\n return;\n }\n var startLineNumber = this.startLineNumber;\n var endLineNumber = this.endLineNumber;\n var startColumn = 1;\n var endColumn = model.getLineMaxColumn(endLineNumber);\n if (endLineNumber < model.getLineCount()) {\n endLineNumber += 1;\n endColumn = 1;\n }\n else if (startLineNumber > 1) {\n startLineNumber -= 1;\n startColumn = model.getLineMaxColumn(startLineNumber);\n }\n builder.addTrackedEditOperation(new Range(startLineNumber, startColumn, endLineNumber, endColumn), null);\n };\n DeleteLinesCommand.prototype.computeCursorState = function (model, helper) {\n var inverseEditOperations = helper.getInverseEditOperations();\n var srcRange = inverseEditOperations[0].range;\n return new Selection(srcRange.endLineNumber, this.restoreCursorToColumn, srcRange.endLineNumber, this.restoreCursorToColumn);\n };\n return DeleteLinesCommand;\n}());\nexport { DeleteLinesCommand };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nexport function getSpaceCnt(str, tabSize) {\n var spacesCnt = 0;\n for (var i = 0; i < str.length; i++) {\n if (str.charAt(i) === '\\t') {\n spacesCnt += tabSize;\n }\n else {\n spacesCnt++;\n }\n }\n return spacesCnt;\n}\nexport function generateIndent(spacesCnt, tabSize, insertSpaces) {\n spacesCnt = spacesCnt < 0 ? 0 : spacesCnt;\n var result = '';\n if (!insertSpaces) {\n var tabsCnt = Math.floor(spacesCnt / tabSize);\n spacesCnt = spacesCnt % tabSize;\n for (var i = 0; i < tabsCnt; i++) {\n result += '\\t';\n }\n }\n for (var i = 0; i < spacesCnt; i++) {\n result += ' ';\n }\n return result;\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport * as strings from '../../../base/common/strings';\nimport { Range } from '../../common/core/range';\nimport { Selection } from '../../common/core/selection';\nimport { LanguageConfigurationRegistry } from '../../common/modes/languageConfigurationRegistry';\nimport { ShiftCommand } from '../../common/commands/shiftCommand';\nimport * as IndentUtil from '../indentation/indentUtils';\nimport { IndentAction } from '../../common/modes/languageConfiguration';\nvar MoveLinesCommand = /** @class */ (function () {\n function MoveLinesCommand(selection, isMovingDown, autoIndent) {\n this._selection = selection;\n this._isMovingDown = isMovingDown;\n this._autoIndent = autoIndent;\n this._moveEndLineSelectionShrink = false;\n }\n MoveLinesCommand.prototype.getEditOperations = function (model, builder) {\n var modelLineCount = model.getLineCount();\n if (this._isMovingDown && this._selection.endLineNumber === modelLineCount) {\n return;\n }\n if (!this._isMovingDown && this._selection.startLineNumber === 1) {\n return;\n }\n this._moveEndPositionDown = false;\n var s = this._selection;\n if (s.startLineNumber < s.endLineNumber && s.endColumn === 1) {\n this._moveEndPositionDown = true;\n s = s.setEndPosition(s.endLineNumber - 1, model.getLineMaxColumn(s.endLineNumber - 1));\n }\n var tabSize = model.getOptions().tabSize;\n var insertSpaces = model.getOptions().insertSpaces;\n var indentConverter = this.buildIndentConverter(tabSize);\n var virtualModel = {\n getLineTokens: function (lineNumber) {\n return model.getLineTokens(lineNumber);\n },\n getLanguageIdentifier: function () {\n return model.getLanguageIdentifier();\n },\n getLanguageIdAtPosition: function (lineNumber, column) {\n return model.getLanguageIdAtPosition(lineNumber, column);\n },\n getLineContent: null,\n };\n if (s.startLineNumber === s.endLineNumber && model.getLineMaxColumn(s.startLineNumber) === 1) {\n // Current line is empty\n var lineNumber = s.startLineNumber;\n var otherLineNumber = (this._isMovingDown ? lineNumber + 1 : lineNumber - 1);\n if (model.getLineMaxColumn(otherLineNumber) === 1) {\n // Other line number is empty too, so no editing is needed\n // Add a no-op to force running by the model\n builder.addEditOperation(new Range(1, 1, 1, 1), null);\n }\n else {\n // Type content from other line number on line number\n builder.addEditOperation(new Range(lineNumber, 1, lineNumber, 1), model.getLineContent(otherLineNumber));\n // Remove content from other line number\n builder.addEditOperation(new Range(otherLineNumber, 1, otherLineNumber, model.getLineMaxColumn(otherLineNumber)), null);\n }\n // Track selection at the other line number\n s = new Selection(otherLineNumber, 1, otherLineNumber, 1);\n }\n else {\n var movingLineNumber_1;\n var movingLineText = void 0;\n if (this._isMovingDown) {\n movingLineNumber_1 = s.endLineNumber + 1;\n movingLineText = model.getLineContent(movingLineNumber_1);\n // Delete line that needs to be moved\n builder.addEditOperation(new Range(movingLineNumber_1 - 1, model.getLineMaxColumn(movingLineNumber_1 - 1), movingLineNumber_1, model.getLineMaxColumn(movingLineNumber_1)), null);\n var insertingText_1 = movingLineText;\n if (this.shouldAutoIndent(model, s)) {\n var movingLineMatchResult = this.matchEnterRule(model, indentConverter, tabSize, movingLineNumber_1, s.startLineNumber - 1);\n // if s.startLineNumber - 1 matches onEnter rule, we still honor that.\n if (movingLineMatchResult !== null) {\n var oldIndentation = strings.getLeadingWhitespace(model.getLineContent(movingLineNumber_1));\n var newSpaceCnt = movingLineMatchResult + IndentUtil.getSpaceCnt(oldIndentation, tabSize);\n var newIndentation = IndentUtil.generateIndent(newSpaceCnt, tabSize, insertSpaces);\n insertingText_1 = newIndentation + this.trimLeft(movingLineText);\n }\n else {\n // no enter rule matches, let's check indentatin rules then.\n virtualModel.getLineContent = function (lineNumber) {\n if (lineNumber === s.startLineNumber) {\n return model.getLineContent(movingLineNumber_1);\n }\n else {\n return model.getLineContent(lineNumber);\n }\n };\n var indentOfMovingLine = LanguageConfigurationRegistry.getGoodIndentForLine(virtualModel, model.getLanguageIdAtPosition(movingLineNumber_1, 1), s.startLineNumber, indentConverter);\n if (indentOfMovingLine !== null) {\n var oldIndentation = strings.getLeadingWhitespace(model.getLineContent(movingLineNumber_1));\n var newSpaceCnt = IndentUtil.getSpaceCnt(indentOfMovingLine, tabSize);\n var oldSpaceCnt = IndentUtil.getSpaceCnt(oldIndentation, tabSize);\n if (newSpaceCnt !== oldSpaceCnt) {\n var newIndentation = IndentUtil.generateIndent(newSpaceCnt, tabSize, insertSpaces);\n insertingText_1 = newIndentation + this.trimLeft(movingLineText);\n }\n }\n }\n // add edit operations for moving line first to make sure it's executed after we make indentation change\n // to s.startLineNumber\n builder.addEditOperation(new Range(s.startLineNumber, 1, s.startLineNumber, 1), insertingText_1 + '\\n');\n var ret = this.matchEnterRule(model, indentConverter, tabSize, s.startLineNumber, s.startLineNumber, insertingText_1);\n // check if the line being moved before matches onEnter rules, if so let's adjust the indentation by onEnter rules.\n if (ret !== null) {\n if (ret !== 0) {\n this.getIndentEditsOfMovingBlock(model, builder, s, tabSize, insertSpaces, ret);\n }\n }\n else {\n // it doesn't match onEnter rules, let's check indentation rules then.\n virtualModel.getLineContent = function (lineNumber) {\n if (lineNumber === s.startLineNumber) {\n return insertingText_1;\n }\n else if (lineNumber >= s.startLineNumber + 1 && lineNumber <= s.endLineNumber + 1) {\n return model.getLineContent(lineNumber - 1);\n }\n else {\n return model.getLineContent(lineNumber);\n }\n };\n var newIndentatOfMovingBlock = LanguageConfigurationRegistry.getGoodIndentForLine(virtualModel, model.getLanguageIdAtPosition(movingLineNumber_1, 1), s.startLineNumber + 1, indentConverter);\n if (newIndentatOfMovingBlock !== null) {\n var oldIndentation = strings.getLeadingWhitespace(model.getLineContent(s.startLineNumber));\n var newSpaceCnt = IndentUtil.getSpaceCnt(newIndentatOfMovingBlock, tabSize);\n var oldSpaceCnt = IndentUtil.getSpaceCnt(oldIndentation, tabSize);\n if (newSpaceCnt !== oldSpaceCnt) {\n var spaceCntOffset = newSpaceCnt - oldSpaceCnt;\n this.getIndentEditsOfMovingBlock(model, builder, s, tabSize, insertSpaces, spaceCntOffset);\n }\n }\n }\n }\n else {\n // Insert line that needs to be moved before\n builder.addEditOperation(new Range(s.startLineNumber, 1, s.startLineNumber, 1), insertingText_1 + '\\n');\n }\n }\n else {\n movingLineNumber_1 = s.startLineNumber - 1;\n movingLineText = model.getLineContent(movingLineNumber_1);\n // Delete line that needs to be moved\n builder.addEditOperation(new Range(movingLineNumber_1, 1, movingLineNumber_1 + 1, 1), null);\n // Insert line that needs to be moved after\n builder.addEditOperation(new Range(s.endLineNumber, model.getLineMaxColumn(s.endLineNumber), s.endLineNumber, model.getLineMaxColumn(s.endLineNumber)), '\\n' + movingLineText);\n if (this.shouldAutoIndent(model, s)) {\n virtualModel.getLineContent = function (lineNumber) {\n if (lineNumber === movingLineNumber_1) {\n return model.getLineContent(s.startLineNumber);\n }\n else {\n return model.getLineContent(lineNumber);\n }\n };\n var ret = this.matchEnterRule(model, indentConverter, tabSize, s.startLineNumber, s.startLineNumber - 2);\n // check if s.startLineNumber - 2 matches onEnter rules, if so adjust the moving block by onEnter rules.\n if (ret !== null) {\n if (ret !== 0) {\n this.getIndentEditsOfMovingBlock(model, builder, s, tabSize, insertSpaces, ret);\n }\n }\n else {\n // it doesn't match any onEnter rule, let's check indentation rules then.\n var indentOfFirstLine = LanguageConfigurationRegistry.getGoodIndentForLine(virtualModel, model.getLanguageIdAtPosition(s.startLineNumber, 1), movingLineNumber_1, indentConverter);\n if (indentOfFirstLine !== null) {\n // adjust the indentation of the moving block\n var oldIndent = strings.getLeadingWhitespace(model.getLineContent(s.startLineNumber));\n var newSpaceCnt = IndentUtil.getSpaceCnt(indentOfFirstLine, tabSize);\n var oldSpaceCnt = IndentUtil.getSpaceCnt(oldIndent, tabSize);\n if (newSpaceCnt !== oldSpaceCnt) {\n var spaceCntOffset = newSpaceCnt - oldSpaceCnt;\n this.getIndentEditsOfMovingBlock(model, builder, s, tabSize, insertSpaces, spaceCntOffset);\n }\n }\n }\n }\n }\n }\n this._selectionId = builder.trackSelection(s);\n };\n MoveLinesCommand.prototype.buildIndentConverter = function (tabSize) {\n return {\n shiftIndent: function (indentation) {\n var desiredIndentCount = ShiftCommand.shiftIndentCount(indentation, indentation.length + 1, tabSize);\n var newIndentation = '';\n for (var i = 0; i < desiredIndentCount; i++) {\n newIndentation += '\\t';\n }\n return newIndentation;\n },\n unshiftIndent: function (indentation) {\n var desiredIndentCount = ShiftCommand.unshiftIndentCount(indentation, indentation.length + 1, tabSize);\n var newIndentation = '';\n for (var i = 0; i < desiredIndentCount; i++) {\n newIndentation += '\\t';\n }\n return newIndentation;\n }\n };\n };\n MoveLinesCommand.prototype.matchEnterRule = function (model, indentConverter, tabSize, line, oneLineAbove, oneLineAboveText) {\n var validPrecedingLine = oneLineAbove;\n while (validPrecedingLine >= 1) {\n // ship empty lines as empty lines just inherit indentation\n var lineContent = void 0;\n if (validPrecedingLine === oneLineAbove && oneLineAboveText !== undefined) {\n lineContent = oneLineAboveText;\n }\n else {\n lineContent = model.getLineContent(validPrecedingLine);\n }\n var nonWhitespaceIdx = strings.lastNonWhitespaceIndex(lineContent);\n if (nonWhitespaceIdx >= 0) {\n break;\n }\n validPrecedingLine--;\n }\n if (validPrecedingLine < 1 || line > model.getLineCount()) {\n return null;\n }\n var maxColumn = model.getLineMaxColumn(validPrecedingLine);\n var enter = LanguageConfigurationRegistry.getEnterAction(model, new Range(validPrecedingLine, maxColumn, validPrecedingLine, maxColumn));\n if (enter) {\n var enterPrefix = enter.indentation;\n var enterAction = enter.enterAction;\n if (enterAction.indentAction === IndentAction.None) {\n enterPrefix = enter.indentation + enterAction.appendText;\n }\n else if (enterAction.indentAction === IndentAction.Indent) {\n enterPrefix = enter.indentation + enterAction.appendText;\n }\n else if (enterAction.indentAction === IndentAction.IndentOutdent) {\n enterPrefix = enter.indentation;\n }\n else if (enterAction.indentAction === IndentAction.Outdent) {\n enterPrefix = indentConverter.unshiftIndent(enter.indentation) + enterAction.appendText;\n }\n var movingLineText = model.getLineContent(line);\n if (this.trimLeft(movingLineText).indexOf(this.trimLeft(enterPrefix)) >= 0) {\n var oldIndentation = strings.getLeadingWhitespace(model.getLineContent(line));\n var newIndentation = strings.getLeadingWhitespace(enterPrefix);\n var indentMetadataOfMovelingLine = LanguageConfigurationRegistry.getIndentMetadata(model, line);\n if (indentMetadataOfMovelingLine & 2 /* DECREASE_MASK */) {\n newIndentation = indentConverter.unshiftIndent(newIndentation);\n }\n var newSpaceCnt = IndentUtil.getSpaceCnt(newIndentation, tabSize);\n var oldSpaceCnt = IndentUtil.getSpaceCnt(oldIndentation, tabSize);\n return newSpaceCnt - oldSpaceCnt;\n }\n }\n return null;\n };\n MoveLinesCommand.prototype.trimLeft = function (str) {\n return str.replace(/^\\s+/, '');\n };\n MoveLinesCommand.prototype.shouldAutoIndent = function (model, selection) {\n if (!this._autoIndent) {\n return false;\n }\n // if it's not easy to tokenize, we stop auto indent.\n if (!model.isCheapToTokenize(selection.startLineNumber)) {\n return false;\n }\n var languageAtSelectionStart = model.getLanguageIdAtPosition(selection.startLineNumber, 1);\n var languageAtSelectionEnd = model.getLanguageIdAtPosition(selection.endLineNumber, 1);\n if (languageAtSelectionStart !== languageAtSelectionEnd) {\n return false;\n }\n if (LanguageConfigurationRegistry.getIndentRulesSupport(languageAtSelectionStart) === null) {\n return false;\n }\n return true;\n };\n MoveLinesCommand.prototype.getIndentEditsOfMovingBlock = function (model, builder, s, tabSize, insertSpaces, offset) {\n for (var i = s.startLineNumber; i <= s.endLineNumber; i++) {\n var lineContent = model.getLineContent(i);\n var originalIndent = strings.getLeadingWhitespace(lineContent);\n var originalSpacesCnt = IndentUtil.getSpaceCnt(originalIndent, tabSize);\n var newSpacesCnt = originalSpacesCnt + offset;\n var newIndent = IndentUtil.generateIndent(newSpacesCnt, tabSize, insertSpaces);\n if (newIndent !== originalIndent) {\n builder.addEditOperation(new Range(i, 1, i, originalIndent.length + 1), newIndent);\n if (i === s.endLineNumber && s.endColumn <= originalIndent.length + 1 && newIndent === '') {\n // as users select part of the original indent white spaces\n // when we adjust the indentation of endLine, we should adjust the cursor position as well.\n this._moveEndLineSelectionShrink = true;\n }\n }\n }\n };\n MoveLinesCommand.prototype.computeCursorState = function (model, helper) {\n var result = helper.getTrackedSelection(this._selectionId);\n if (this._moveEndPositionDown) {\n result = result.setEndPosition(result.endLineNumber + 1, 1);\n }\n if (this._moveEndLineSelectionShrink && result.startLineNumber < result.endLineNumber) {\n result = result.setEndPosition(result.endLineNumber, 2);\n }\n return result;\n };\n return MoveLinesCommand;\n}());\nexport { MoveLinesCommand };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport * as nls from '../../../nls';\nimport { KeyChord } from '../../../base/common/keyCodes';\nimport { SortLinesCommand } from './sortLinesCommand';\nimport { EditOperation } from '../../common/core/editOperation';\nimport { TrimTrailingWhitespaceCommand } from '../../common/commands/trimTrailingWhitespaceCommand';\nimport { EditorContextKeys } from '../../common/editorContextKeys';\nimport { ReplaceCommand, ReplaceCommandThatPreservesSelection } from '../../common/commands/replaceCommand';\nimport { Range } from '../../common/core/range';\nimport { Selection } from '../../common/core/selection';\nimport { Position } from '../../common/core/position';\nimport { registerEditorAction, EditorAction } from '../../browser/editorExtensions';\nimport { CopyLinesCommand } from './copyLinesCommand';\nimport { DeleteLinesCommand } from './deleteLinesCommand';\nimport { MoveLinesCommand } from './moveLinesCommand';\nimport { TypeOperations } from '../../common/controller/cursorTypeOperations';\nimport { CoreEditingCommands } from '../../browser/controller/coreCommands';\nimport { MenuId } from '../../../platform/actions/common/actions';\n// copy lines\nvar AbstractCopyLinesAction = /** @class */ (function (_super) {\n __extends(AbstractCopyLinesAction, _super);\n function AbstractCopyLinesAction(down, opts) {\n var _this = _super.call(this, opts) || this;\n _this.down = down;\n return _this;\n }\n AbstractCopyLinesAction.prototype.run = function (_accessor, editor) {\n var commands = [];\n var selections = editor.getSelections();\n for (var i = 0; i < selections.length; i++) {\n commands.push(new CopyLinesCommand(selections[i], this.down));\n }\n editor.pushUndoStop();\n editor.executeCommands(this.id, commands);\n editor.pushUndoStop();\n };\n return AbstractCopyLinesAction;\n}(EditorAction));\nvar CopyLinesUpAction = /** @class */ (function (_super) {\n __extends(CopyLinesUpAction, _super);\n function CopyLinesUpAction() {\n return _super.call(this, false, {\n id: 'editor.action.copyLinesUpAction',\n label: nls.localize('lines.copyUp', \"Copy Line Up\"),\n alias: 'Copy Line Up',\n precondition: EditorContextKeys.writable,\n kbOpts: {\n kbExpr: EditorContextKeys.editorTextFocus,\n primary: 512 /* Alt */ | 1024 /* Shift */ | 16 /* UpArrow */,\n linux: { primary: 2048 /* CtrlCmd */ | 512 /* Alt */ | 1024 /* Shift */ | 16 /* UpArrow */ },\n weight: 100 /* EditorContrib */\n },\n menubarOpts: {\n menuId: MenuId.MenubarSelectionMenu,\n group: '2_line',\n title: nls.localize({ key: 'miCopyLinesUp', comment: ['&& denotes a mnemonic'] }, \"&&Copy Line Up\"),\n order: 1\n }\n }) || this;\n }\n return CopyLinesUpAction;\n}(AbstractCopyLinesAction));\nvar CopyLinesDownAction = /** @class */ (function (_super) {\n __extends(CopyLinesDownAction, _super);\n function CopyLinesDownAction() {\n return _super.call(this, true, {\n id: 'editor.action.copyLinesDownAction',\n label: nls.localize('lines.copyDown', \"Copy Line Down\"),\n alias: 'Copy Line Down',\n precondition: EditorContextKeys.writable,\n kbOpts: {\n kbExpr: EditorContextKeys.editorTextFocus,\n primary: 512 /* Alt */ | 1024 /* Shift */ | 18 /* DownArrow */,\n linux: { primary: 2048 /* CtrlCmd */ | 512 /* Alt */ | 1024 /* Shift */ | 18 /* DownArrow */ },\n weight: 100 /* EditorContrib */\n },\n menubarOpts: {\n menuId: MenuId.MenubarSelectionMenu,\n group: '2_line',\n title: nls.localize({ key: 'miCopyLinesDown', comment: ['&& denotes a mnemonic'] }, \"Co&&py Line Down\"),\n order: 2\n }\n }) || this;\n }\n return CopyLinesDownAction;\n}(AbstractCopyLinesAction));\n// move lines\nvar AbstractMoveLinesAction = /** @class */ (function (_super) {\n __extends(AbstractMoveLinesAction, _super);\n function AbstractMoveLinesAction(down, opts) {\n var _this = _super.call(this, opts) || this;\n _this.down = down;\n return _this;\n }\n AbstractMoveLinesAction.prototype.run = function (_accessor, editor) {\n var commands = [];\n var selections = editor.getSelections();\n var autoIndent = editor.getConfiguration().autoIndent;\n for (var i = 0; i < selections.length; i++) {\n commands.push(new MoveLinesCommand(selections[i], this.down, autoIndent));\n }\n editor.pushUndoStop();\n editor.executeCommands(this.id, commands);\n editor.pushUndoStop();\n };\n return AbstractMoveLinesAction;\n}(EditorAction));\nvar MoveLinesUpAction = /** @class */ (function (_super) {\n __extends(MoveLinesUpAction, _super);\n function MoveLinesUpAction() {\n return _super.call(this, false, {\n id: 'editor.action.moveLinesUpAction',\n label: nls.localize('lines.moveUp', \"Move Line Up\"),\n alias: 'Move Line Up',\n precondition: EditorContextKeys.writable,\n kbOpts: {\n kbExpr: EditorContextKeys.editorTextFocus,\n primary: 512 /* Alt */ | 16 /* UpArrow */,\n linux: { primary: 512 /* Alt */ | 16 /* UpArrow */ },\n weight: 100 /* EditorContrib */\n },\n menubarOpts: {\n menuId: MenuId.MenubarSelectionMenu,\n group: '2_line',\n title: nls.localize({ key: 'miMoveLinesUp', comment: ['&& denotes a mnemonic'] }, \"Mo&&ve Line Up\"),\n order: 3\n }\n }) || this;\n }\n return MoveLinesUpAction;\n}(AbstractMoveLinesAction));\nvar MoveLinesDownAction = /** @class */ (function (_super) {\n __extends(MoveLinesDownAction, _super);\n function MoveLinesDownAction() {\n return _super.call(this, true, {\n id: 'editor.action.moveLinesDownAction',\n label: nls.localize('lines.moveDown', \"Move Line Down\"),\n alias: 'Move Line Down',\n precondition: EditorContextKeys.writable,\n kbOpts: {\n kbExpr: EditorContextKeys.editorTextFocus,\n primary: 512 /* Alt */ | 18 /* DownArrow */,\n linux: { primary: 512 /* Alt */ | 18 /* DownArrow */ },\n weight: 100 /* EditorContrib */\n },\n menubarOpts: {\n menuId: MenuId.MenubarSelectionMenu,\n group: '2_line',\n title: nls.localize({ key: 'miMoveLinesDown', comment: ['&& denotes a mnemonic'] }, \"Move &&Line Down\"),\n order: 4\n }\n }) || this;\n }\n return MoveLinesDownAction;\n}(AbstractMoveLinesAction));\nvar AbstractSortLinesAction = /** @class */ (function (_super) {\n __extends(AbstractSortLinesAction, _super);\n function AbstractSortLinesAction(descending, opts) {\n var _this = _super.call(this, opts) || this;\n _this.descending = descending;\n return _this;\n }\n AbstractSortLinesAction.prototype.run = function (_accessor, editor) {\n var selections = editor.getSelections();\n for (var i = 0, len = selections.length; i < len; i++) {\n var selection = selections[i];\n if (!SortLinesCommand.canRun(editor.getModel(), selection, this.descending)) {\n return;\n }\n }\n var commands = [];\n for (var i = 0, len = selections.length; i < len; i++) {\n commands[i] = new SortLinesCommand(selections[i], this.descending);\n }\n editor.pushUndoStop();\n editor.executeCommands(this.id, commands);\n editor.pushUndoStop();\n };\n return AbstractSortLinesAction;\n}(EditorAction));\nexport { AbstractSortLinesAction };\nvar SortLinesAscendingAction = /** @class */ (function (_super) {\n __extends(SortLinesAscendingAction, _super);\n function SortLinesAscendingAction() {\n return _super.call(this, false, {\n id: 'editor.action.sortLinesAscending',\n label: nls.localize('lines.sortAscending', \"Sort Lines Ascending\"),\n alias: 'Sort Lines Ascending',\n precondition: EditorContextKeys.writable\n }) || this;\n }\n return SortLinesAscendingAction;\n}(AbstractSortLinesAction));\nexport { SortLinesAscendingAction };\nvar SortLinesDescendingAction = /** @class */ (function (_super) {\n __extends(SortLinesDescendingAction, _super);\n function SortLinesDescendingAction() {\n return _super.call(this, true, {\n id: 'editor.action.sortLinesDescending',\n label: nls.localize('lines.sortDescending', \"Sort Lines Descending\"),\n alias: 'Sort Lines Descending',\n precondition: EditorContextKeys.writable\n }) || this;\n }\n return SortLinesDescendingAction;\n}(AbstractSortLinesAction));\nexport { SortLinesDescendingAction };\nvar TrimTrailingWhitespaceAction = /** @class */ (function (_super) {\n __extends(TrimTrailingWhitespaceAction, _super);\n function TrimTrailingWhitespaceAction() {\n return _super.call(this, {\n id: TrimTrailingWhitespaceAction.ID,\n label: nls.localize('lines.trimTrailingWhitespace', \"Trim Trailing Whitespace\"),\n alias: 'Trim Trailing Whitespace',\n precondition: EditorContextKeys.writable,\n kbOpts: {\n kbExpr: EditorContextKeys.editorTextFocus,\n primary: KeyChord(2048 /* CtrlCmd */ | 41 /* KEY_K */, 2048 /* CtrlCmd */ | 54 /* KEY_X */),\n weight: 100 /* EditorContrib */\n }\n }) || this;\n }\n TrimTrailingWhitespaceAction.prototype.run = function (_accessor, editor, args) {\n var cursors = [];\n if (args.reason === 'auto-save') {\n // See https://github.com/editorconfig/editorconfig-vscode/issues/47\n // It is very convenient for the editor config extension to invoke this action.\n // So, if we get a reason:'auto-save' passed in, let's preserve cursor positions.\n cursors = editor.getSelections().map(function (s) { return new Position(s.positionLineNumber, s.positionColumn); });\n }\n var command = new TrimTrailingWhitespaceCommand(editor.getSelection(), cursors);\n editor.pushUndoStop();\n editor.executeCommands(this.id, [command]);\n editor.pushUndoStop();\n };\n TrimTrailingWhitespaceAction.ID = 'editor.action.trimTrailingWhitespace';\n return TrimTrailingWhitespaceAction;\n}(EditorAction));\nexport { TrimTrailingWhitespaceAction };\nvar DeleteLinesAction = /** @class */ (function (_super) {\n __extends(DeleteLinesAction, _super);\n function DeleteLinesAction() {\n return _super.call(this, {\n id: 'editor.action.deleteLines',\n label: nls.localize('lines.delete', \"Delete Line\"),\n alias: 'Delete Line',\n precondition: EditorContextKeys.writable,\n kbOpts: {\n kbExpr: EditorContextKeys.textInputFocus,\n primary: 2048 /* CtrlCmd */ | 1024 /* Shift */ | 41 /* KEY_K */,\n weight: 100 /* EditorContrib */\n }\n }) || this;\n }\n DeleteLinesAction.prototype.run = function (_accessor, editor) {\n var ops = this._getLinesToRemove(editor);\n // Finally, construct the delete lines commands\n var commands = ops.map(function (op) {\n return new DeleteLinesCommand(op.startLineNumber, op.endLineNumber, op.positionColumn);\n });\n editor.pushUndoStop();\n editor.executeCommands(this.id, commands);\n editor.pushUndoStop();\n };\n DeleteLinesAction.prototype._getLinesToRemove = function (editor) {\n // Construct delete operations\n var operations = editor.getSelections().map(function (s) {\n var endLineNumber = s.endLineNumber;\n if (s.startLineNumber < s.endLineNumber && s.endColumn === 1) {\n endLineNumber -= 1;\n }\n return {\n startLineNumber: s.startLineNumber,\n endLineNumber: endLineNumber,\n positionColumn: s.positionColumn\n };\n });\n // Sort delete operations\n operations.sort(function (a, b) {\n return a.startLineNumber - b.startLineNumber;\n });\n // Merge delete operations on consecutive lines\n var mergedOperations = [];\n var previousOperation = operations[0];\n for (var i = 1; i < operations.length; i++) {\n if (previousOperation.endLineNumber + 1 === operations[i].startLineNumber) {\n // Merge current operations into the previous one\n previousOperation.endLineNumber = operations[i].endLineNumber;\n }\n else {\n // Push previous operation\n mergedOperations.push(previousOperation);\n previousOperation = operations[i];\n }\n }\n // Push the last operation\n mergedOperations.push(previousOperation);\n return mergedOperations;\n };\n return DeleteLinesAction;\n}(EditorAction));\nvar IndentLinesAction = /** @class */ (function (_super) {\n __extends(IndentLinesAction, _super);\n function IndentLinesAction() {\n return _super.call(this, {\n id: 'editor.action.indentLines',\n label: nls.localize('lines.indent', \"Indent Line\"),\n alias: 'Indent Line',\n precondition: EditorContextKeys.writable,\n kbOpts: {\n kbExpr: EditorContextKeys.editorTextFocus,\n primary: 2048 /* CtrlCmd */ | 89 /* US_CLOSE_SQUARE_BRACKET */,\n weight: 100 /* EditorContrib */\n }\n }) || this;\n }\n IndentLinesAction.prototype.run = function (_accessor, editor) {\n editor.pushUndoStop();\n editor.executeCommands(this.id, TypeOperations.indent(editor._getCursorConfiguration(), editor.getModel(), editor.getSelections()));\n editor.pushUndoStop();\n };\n return IndentLinesAction;\n}(EditorAction));\nexport { IndentLinesAction };\nvar OutdentLinesAction = /** @class */ (function (_super) {\n __extends(OutdentLinesAction, _super);\n function OutdentLinesAction() {\n return _super.call(this, {\n id: 'editor.action.outdentLines',\n label: nls.localize('lines.outdent', \"Outdent Line\"),\n alias: 'Outdent Line',\n precondition: EditorContextKeys.writable,\n kbOpts: {\n kbExpr: EditorContextKeys.editorTextFocus,\n primary: 2048 /* CtrlCmd */ | 87 /* US_OPEN_SQUARE_BRACKET */,\n weight: 100 /* EditorContrib */\n }\n }) || this;\n }\n OutdentLinesAction.prototype.run = function (_accessor, editor) {\n CoreEditingCommands.Outdent.runEditorCommand(null, editor, null);\n };\n return OutdentLinesAction;\n}(EditorAction));\nvar InsertLineBeforeAction = /** @class */ (function (_super) {\n __extends(InsertLineBeforeAction, _super);\n function InsertLineBeforeAction() {\n return _super.call(this, {\n id: 'editor.action.insertLineBefore',\n label: nls.localize('lines.insertBefore', \"Insert Line Above\"),\n alias: 'Insert Line Above',\n precondition: EditorContextKeys.writable,\n kbOpts: {\n kbExpr: EditorContextKeys.editorTextFocus,\n primary: 2048 /* CtrlCmd */ | 1024 /* Shift */ | 3 /* Enter */,\n weight: 100 /* EditorContrib */\n }\n }) || this;\n }\n InsertLineBeforeAction.prototype.run = function (_accessor, editor) {\n editor.pushUndoStop();\n editor.executeCommands(this.id, TypeOperations.lineInsertBefore(editor._getCursorConfiguration(), editor.getModel(), editor.getSelections()));\n };\n return InsertLineBeforeAction;\n}(EditorAction));\nexport { InsertLineBeforeAction };\nvar InsertLineAfterAction = /** @class */ (function (_super) {\n __extends(InsertLineAfterAction, _super);\n function InsertLineAfterAction() {\n return _super.call(this, {\n id: 'editor.action.insertLineAfter',\n label: nls.localize('lines.insertAfter', \"Insert Line Below\"),\n alias: 'Insert Line Below',\n precondition: EditorContextKeys.writable,\n kbOpts: {\n kbExpr: EditorContextKeys.editorTextFocus,\n primary: 2048 /* CtrlCmd */ | 3 /* Enter */,\n weight: 100 /* EditorContrib */\n }\n }) || this;\n }\n InsertLineAfterAction.prototype.run = function (_accessor, editor) {\n editor.pushUndoStop();\n editor.executeCommands(this.id, TypeOperations.lineInsertAfter(editor._getCursorConfiguration(), editor.getModel(), editor.getSelections()));\n };\n return InsertLineAfterAction;\n}(EditorAction));\nexport { InsertLineAfterAction };\nvar AbstractDeleteAllToBoundaryAction = /** @class */ (function (_super) {\n __extends(AbstractDeleteAllToBoundaryAction, _super);\n function AbstractDeleteAllToBoundaryAction() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n AbstractDeleteAllToBoundaryAction.prototype.run = function (_accessor, editor) {\n var primaryCursor = editor.getSelection();\n var rangesToDelete = this._getRangesToDelete(editor);\n // merge overlapping selections\n var effectiveRanges = [];\n for (var i = 0, count = rangesToDelete.length - 1; i < count; i++) {\n var range = rangesToDelete[i];\n var nextRange = rangesToDelete[i + 1];\n if (Range.intersectRanges(range, nextRange) === null) {\n effectiveRanges.push(range);\n }\n else {\n rangesToDelete[i + 1] = Range.plusRange(range, nextRange);\n }\n }\n effectiveRanges.push(rangesToDelete[rangesToDelete.length - 1]);\n var endCursorState = this._getEndCursorState(primaryCursor, effectiveRanges);\n var edits = effectiveRanges.map(function (range) {\n return EditOperation.replace(range, '');\n });\n editor.pushUndoStop();\n editor.executeEdits(this.id, edits, endCursorState);\n editor.pushUndoStop();\n };\n return AbstractDeleteAllToBoundaryAction;\n}(EditorAction));\nexport { AbstractDeleteAllToBoundaryAction };\nvar DeleteAllLeftAction = /** @class */ (function (_super) {\n __extends(DeleteAllLeftAction, _super);\n function DeleteAllLeftAction() {\n return _super.call(this, {\n id: 'deleteAllLeft',\n label: nls.localize('lines.deleteAllLeft', \"Delete All Left\"),\n alias: 'Delete All Left',\n precondition: EditorContextKeys.writable,\n kbOpts: {\n kbExpr: EditorContextKeys.textInputFocus,\n primary: null,\n mac: { primary: 2048 /* CtrlCmd */ | 1 /* Backspace */ },\n weight: 100 /* EditorContrib */\n }\n }) || this;\n }\n DeleteAllLeftAction.prototype._getEndCursorState = function (primaryCursor, rangesToDelete) {\n var endPrimaryCursor;\n var endCursorState = [];\n var deletedLines = 0;\n rangesToDelete.forEach(function (range) {\n var endCursor;\n if (range.endColumn === 1 && deletedLines > 0) {\n var newStartLine = range.startLineNumber - deletedLines;\n endCursor = new Selection(newStartLine, range.startColumn, newStartLine, range.startColumn);\n }\n else {\n endCursor = new Selection(range.startLineNumber, range.startColumn, range.startLineNumber, range.startColumn);\n }\n deletedLines += range.endLineNumber - range.startLineNumber;\n if (range.intersectRanges(primaryCursor)) {\n endPrimaryCursor = endCursor;\n }\n else {\n endCursorState.push(endCursor);\n }\n });\n if (endPrimaryCursor) {\n endCursorState.unshift(endPrimaryCursor);\n }\n return endCursorState;\n };\n DeleteAllLeftAction.prototype._getRangesToDelete = function (editor) {\n var rangesToDelete = editor.getSelections();\n var model = editor.getModel();\n rangesToDelete.sort(Range.compareRangesUsingStarts);\n rangesToDelete = rangesToDelete.map(function (selection) {\n if (selection.isEmpty()) {\n if (selection.startColumn === 1) {\n var deleteFromLine = Math.max(1, selection.startLineNumber - 1);\n var deleteFromColumn = selection.startLineNumber === 1 ? 1 : model.getLineContent(deleteFromLine).length + 1;\n return new Range(deleteFromLine, deleteFromColumn, selection.startLineNumber, 1);\n }\n else {\n return new Range(selection.startLineNumber, 1, selection.startLineNumber, selection.startColumn);\n }\n }\n else {\n return selection;\n }\n });\n return rangesToDelete;\n };\n return DeleteAllLeftAction;\n}(AbstractDeleteAllToBoundaryAction));\nexport { DeleteAllLeftAction };\nvar DeleteAllRightAction = /** @class */ (function (_super) {\n __extends(DeleteAllRightAction, _super);\n function DeleteAllRightAction() {\n return _super.call(this, {\n id: 'deleteAllRight',\n label: nls.localize('lines.deleteAllRight', \"Delete All Right\"),\n alias: 'Delete All Right',\n precondition: EditorContextKeys.writable,\n kbOpts: {\n kbExpr: EditorContextKeys.textInputFocus,\n primary: null,\n mac: { primary: 256 /* WinCtrl */ | 41 /* KEY_K */, secondary: [2048 /* CtrlCmd */ | 20 /* Delete */] },\n weight: 100 /* EditorContrib */\n }\n }) || this;\n }\n DeleteAllRightAction.prototype._getEndCursorState = function (primaryCursor, rangesToDelete) {\n var endPrimaryCursor;\n var endCursorState = [];\n for (var i = 0, len = rangesToDelete.length, offset = 0; i < len; i++) {\n var range = rangesToDelete[i];\n var endCursor = new Selection(range.startLineNumber - offset, range.startColumn, range.startLineNumber - offset, range.startColumn);\n if (range.intersectRanges(primaryCursor)) {\n endPrimaryCursor = endCursor;\n }\n else {\n endCursorState.push(endCursor);\n }\n }\n if (endPrimaryCursor) {\n endCursorState.unshift(endPrimaryCursor);\n }\n return endCursorState;\n };\n DeleteAllRightAction.prototype._getRangesToDelete = function (editor) {\n var model = editor.getModel();\n var rangesToDelete = editor.getSelections().map(function (sel) {\n if (sel.isEmpty()) {\n var maxColumn = model.getLineMaxColumn(sel.startLineNumber);\n if (sel.startColumn === maxColumn) {\n return new Range(sel.startLineNumber, sel.startColumn, sel.startLineNumber + 1, 1);\n }\n else {\n return new Range(sel.startLineNumber, sel.startColumn, sel.startLineNumber, maxColumn);\n }\n }\n return sel;\n });\n rangesToDelete.sort(Range.compareRangesUsingStarts);\n return rangesToDelete;\n };\n return DeleteAllRightAction;\n}(AbstractDeleteAllToBoundaryAction));\nexport { DeleteAllRightAction };\nvar JoinLinesAction = /** @class */ (function (_super) {\n __extends(JoinLinesAction, _super);\n function JoinLinesAction() {\n return _super.call(this, {\n id: 'editor.action.joinLines',\n label: nls.localize('lines.joinLines', \"Join Lines\"),\n alias: 'Join Lines',\n precondition: EditorContextKeys.writable,\n kbOpts: {\n kbExpr: EditorContextKeys.editorTextFocus,\n primary: 0,\n mac: { primary: 256 /* WinCtrl */ | 40 /* KEY_J */ },\n weight: 100 /* EditorContrib */\n }\n }) || this;\n }\n JoinLinesAction.prototype.run = function (_accessor, editor) {\n var selections = editor.getSelections();\n var primaryCursor = editor.getSelection();\n selections.sort(Range.compareRangesUsingStarts);\n var reducedSelections = [];\n var lastSelection = selections.reduce(function (previousValue, currentValue) {\n if (previousValue.isEmpty()) {\n if (previousValue.endLineNumber === currentValue.startLineNumber) {\n if (primaryCursor.equalsSelection(previousValue)) {\n primaryCursor = currentValue;\n }\n return currentValue;\n }\n if (currentValue.startLineNumber > previousValue.endLineNumber + 1) {\n reducedSelections.push(previousValue);\n return currentValue;\n }\n else {\n return new Selection(previousValue.startLineNumber, previousValue.startColumn, currentValue.endLineNumber, currentValue.endColumn);\n }\n }\n else {\n if (currentValue.startLineNumber > previousValue.endLineNumber) {\n reducedSelections.push(previousValue);\n return currentValue;\n }\n else {\n return new Selection(previousValue.startLineNumber, previousValue.startColumn, currentValue.endLineNumber, currentValue.endColumn);\n }\n }\n });\n reducedSelections.push(lastSelection);\n var model = editor.getModel();\n var edits = [];\n var endCursorState = [];\n var endPrimaryCursor = primaryCursor;\n var lineOffset = 0;\n for (var i = 0, len = reducedSelections.length; i < len; i++) {\n var selection = reducedSelections[i];\n var startLineNumber = selection.startLineNumber;\n var startColumn = 1;\n var columnDeltaOffset = 0;\n var endLineNumber = void 0, endColumn = void 0;\n var selectionEndPositionOffset = model.getLineContent(selection.endLineNumber).length - selection.endColumn;\n if (selection.isEmpty() || selection.startLineNumber === selection.endLineNumber) {\n var position = selection.getStartPosition();\n if (position.lineNumber < model.getLineCount()) {\n endLineNumber = startLineNumber + 1;\n endColumn = model.getLineMaxColumn(endLineNumber);\n }\n else {\n endLineNumber = position.lineNumber;\n endColumn = model.getLineMaxColumn(position.lineNumber);\n }\n }\n else {\n endLineNumber = selection.endLineNumber;\n endColumn = model.getLineMaxColumn(endLineNumber);\n }\n var trimmedLinesContent = model.getLineContent(startLineNumber);\n for (var i_1 = startLineNumber + 1; i_1 <= endLineNumber; i_1++) {\n var lineText = model.getLineContent(i_1);\n var firstNonWhitespaceIdx = model.getLineFirstNonWhitespaceColumn(i_1);\n if (firstNonWhitespaceIdx >= 1) {\n var insertSpace = true;\n if (trimmedLinesContent === '') {\n insertSpace = false;\n }\n if (insertSpace && (trimmedLinesContent.charAt(trimmedLinesContent.length - 1) === ' ' ||\n trimmedLinesContent.charAt(trimmedLinesContent.length - 1) === '\\t')) {\n insertSpace = false;\n trimmedLinesContent = trimmedLinesContent.replace(/[\\s\\uFEFF\\xA0]+$/g, ' ');\n }\n var lineTextWithoutIndent = lineText.substr(firstNonWhitespaceIdx - 1);\n trimmedLinesContent += (insertSpace ? ' ' : '') + lineTextWithoutIndent;\n if (insertSpace) {\n columnDeltaOffset = lineTextWithoutIndent.length + 1;\n }\n else {\n columnDeltaOffset = lineTextWithoutIndent.length;\n }\n }\n else {\n columnDeltaOffset = 0;\n }\n }\n var deleteSelection = new Range(startLineNumber, startColumn, endLineNumber, endColumn);\n if (!deleteSelection.isEmpty()) {\n var resultSelection = void 0;\n if (selection.isEmpty()) {\n edits.push(EditOperation.replace(deleteSelection, trimmedLinesContent));\n resultSelection = new Selection(deleteSelection.startLineNumber - lineOffset, trimmedLinesContent.length - columnDeltaOffset + 1, startLineNumber - lineOffset, trimmedLinesContent.length - columnDeltaOffset + 1);\n }\n else {\n if (selection.startLineNumber === selection.endLineNumber) {\n edits.push(EditOperation.replace(deleteSelection, trimmedLinesContent));\n resultSelection = new Selection(selection.startLineNumber - lineOffset, selection.startColumn, selection.endLineNumber - lineOffset, selection.endColumn);\n }\n else {\n edits.push(EditOperation.replace(deleteSelection, trimmedLinesContent));\n resultSelection = new Selection(selection.startLineNumber - lineOffset, selection.startColumn, selection.startLineNumber - lineOffset, trimmedLinesContent.length - selectionEndPositionOffset);\n }\n }\n if (Range.intersectRanges(deleteSelection, primaryCursor) !== null) {\n endPrimaryCursor = resultSelection;\n }\n else {\n endCursorState.push(resultSelection);\n }\n }\n lineOffset += deleteSelection.endLineNumber - deleteSelection.startLineNumber;\n }\n endCursorState.unshift(endPrimaryCursor);\n editor.pushUndoStop();\n editor.executeEdits(this.id, edits, endCursorState);\n editor.pushUndoStop();\n };\n return JoinLinesAction;\n}(EditorAction));\nexport { JoinLinesAction };\nvar TransposeAction = /** @class */ (function (_super) {\n __extends(TransposeAction, _super);\n function TransposeAction() {\n return _super.call(this, {\n id: 'editor.action.transpose',\n label: nls.localize('editor.transpose', \"Transpose characters around the cursor\"),\n alias: 'Transpose characters around the cursor',\n precondition: EditorContextKeys.writable\n }) || this;\n }\n TransposeAction.prototype.run = function (_accessor, editor) {\n var selections = editor.getSelections();\n var model = editor.getModel();\n var commands = [];\n for (var i = 0, len = selections.length; i < len; i++) {\n var selection = selections[i];\n if (!selection.isEmpty()) {\n continue;\n }\n var cursor = selection.getStartPosition();\n var maxColumn = model.getLineMaxColumn(cursor.lineNumber);\n if (cursor.column >= maxColumn) {\n if (cursor.lineNumber === model.getLineCount()) {\n continue;\n }\n // The cursor is at the end of current line and current line is not empty\n // then we transpose the character before the cursor and the line break if there is any following line.\n var deleteSelection = new Range(cursor.lineNumber, Math.max(1, cursor.column - 1), cursor.lineNumber + 1, 1);\n var chars = model.getValueInRange(deleteSelection).split('').reverse().join('');\n commands.push(new ReplaceCommand(new Selection(cursor.lineNumber, Math.max(1, cursor.column - 1), cursor.lineNumber + 1, 1), chars));\n }\n else {\n var deleteSelection = new Range(cursor.lineNumber, Math.max(1, cursor.column - 1), cursor.lineNumber, cursor.column + 1);\n var chars = model.getValueInRange(deleteSelection).split('').reverse().join('');\n commands.push(new ReplaceCommandThatPreservesSelection(deleteSelection, chars, new Selection(cursor.lineNumber, cursor.column + 1, cursor.lineNumber, cursor.column + 1)));\n }\n }\n editor.pushUndoStop();\n editor.executeCommands(this.id, commands);\n editor.pushUndoStop();\n };\n return TransposeAction;\n}(EditorAction));\nexport { TransposeAction };\nvar AbstractCaseAction = /** @class */ (function (_super) {\n __extends(AbstractCaseAction, _super);\n function AbstractCaseAction() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n AbstractCaseAction.prototype.run = function (_accessor, editor) {\n var selections = editor.getSelections();\n var model = editor.getModel();\n var commands = [];\n for (var i = 0, len = selections.length; i < len; i++) {\n var selection = selections[i];\n if (selection.isEmpty()) {\n var cursor = selection.getStartPosition();\n var word = model.getWordAtPosition(cursor);\n if (!word) {\n continue;\n }\n var wordRange = new Range(cursor.lineNumber, word.startColumn, cursor.lineNumber, word.endColumn);\n var text = model.getValueInRange(wordRange);\n commands.push(new ReplaceCommandThatPreservesSelection(wordRange, this._modifyText(text), new Selection(cursor.lineNumber, cursor.column, cursor.lineNumber, cursor.column)));\n }\n else {\n var text = model.getValueInRange(selection);\n commands.push(new ReplaceCommandThatPreservesSelection(selection, this._modifyText(text), selection));\n }\n }\n editor.pushUndoStop();\n editor.executeCommands(this.id, commands);\n editor.pushUndoStop();\n };\n return AbstractCaseAction;\n}(EditorAction));\nexport { AbstractCaseAction };\nvar UpperCaseAction = /** @class */ (function (_super) {\n __extends(UpperCaseAction, _super);\n function UpperCaseAction() {\n return _super.call(this, {\n id: 'editor.action.transformToUppercase',\n label: nls.localize('editor.transformToUppercase', \"Transform to Uppercase\"),\n alias: 'Transform to Uppercase',\n precondition: EditorContextKeys.writable\n }) || this;\n }\n UpperCaseAction.prototype._modifyText = function (text) {\n return text.toLocaleUpperCase();\n };\n return UpperCaseAction;\n}(AbstractCaseAction));\nexport { UpperCaseAction };\nvar LowerCaseAction = /** @class */ (function (_super) {\n __extends(LowerCaseAction, _super);\n function LowerCaseAction() {\n return _super.call(this, {\n id: 'editor.action.transformToLowercase',\n label: nls.localize('editor.transformToLowercase', \"Transform to Lowercase\"),\n alias: 'Transform to Lowercase',\n precondition: EditorContextKeys.writable\n }) || this;\n }\n LowerCaseAction.prototype._modifyText = function (text) {\n return text.toLocaleLowerCase();\n };\n return LowerCaseAction;\n}(AbstractCaseAction));\nexport { LowerCaseAction };\nregisterEditorAction(CopyLinesUpAction);\nregisterEditorAction(CopyLinesDownAction);\nregisterEditorAction(MoveLinesUpAction);\nregisterEditorAction(MoveLinesDownAction);\nregisterEditorAction(SortLinesAscendingAction);\nregisterEditorAction(SortLinesDescendingAction);\nregisterEditorAction(TrimTrailingWhitespaceAction);\nregisterEditorAction(DeleteLinesAction);\nregisterEditorAction(IndentLinesAction);\nregisterEditorAction(OutdentLinesAction);\nregisterEditorAction(InsertLineBeforeAction);\nregisterEditorAction(InsertLineAfterAction);\nregisterEditorAction(DeleteAllLeftAction);\nregisterEditorAction(DeleteAllRightAction);\nregisterEditorAction(JoinLinesAction);\nregisterEditorAction(TransposeAction);\nregisterEditorAction(UpperCaseAction);\nregisterEditorAction(LowerCaseAction);\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport { onUnexpectedExternalError } from '../../../base/common/errors';\nimport URI from '../../../base/common/uri';\nimport { TPromise } from '../../../base/common/winjs.base';\nimport { Range } from '../../common/core/range';\nimport { LinkProviderRegistry } from '../../common/modes';\nimport { asWinJsPromise } from '../../../base/common/async';\nimport { CommandsRegistry } from '../../../platform/commands/common/commands';\nimport { IModelService } from '../../common/services/modelService';\nimport { CancellationToken } from '../../../base/common/cancellation';\nvar Link = /** @class */ (function () {\n function Link(link, provider) {\n this._link = link;\n this._provider = provider;\n }\n Link.prototype.toJSON = function () {\n return {\n range: this.range,\n url: this.url\n };\n };\n Object.defineProperty(Link.prototype, \"range\", {\n get: function () {\n return this._link.range;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Link.prototype, \"url\", {\n get: function () {\n return this._link.url;\n },\n enumerable: true,\n configurable: true\n });\n Link.prototype.resolve = function () {\n var _this = this;\n if (this._link.url) {\n try {\n return TPromise.as(URI.parse(this._link.url));\n }\n catch (e) {\n return TPromise.wrapError(new Error('invalid'));\n }\n }\n if (typeof this._provider.resolveLink === 'function') {\n return asWinJsPromise(function (token) { return _this._provider.resolveLink(_this._link, token); }).then(function (value) {\n _this._link = value || _this._link;\n if (_this._link.url) {\n // recurse\n return _this.resolve();\n }\n return TPromise.wrapError(new Error('missing'));\n });\n }\n return TPromise.wrapError(new Error('missing'));\n };\n return Link;\n}());\nexport { Link };\nexport function getLinks(model, token) {\n var links = [];\n // ask all providers for links in parallel\n var promises = LinkProviderRegistry.ordered(model).reverse().map(function (provider) {\n return Promise.resolve(provider.provideLinks(model, token)).then(function (result) {\n if (Array.isArray(result)) {\n var newLinks = result.map(function (link) { return new Link(link, provider); });\n links = union(links, newLinks);\n }\n }, onUnexpectedExternalError);\n });\n return Promise.all(promises).then(function () {\n return links;\n });\n}\nfunction union(oldLinks, newLinks) {\n // reunite oldLinks with newLinks and remove duplicates\n var result = [];\n var oldIndex;\n var oldLen;\n var newIndex;\n var newLen;\n for (oldIndex = 0, newIndex = 0, oldLen = oldLinks.length, newLen = newLinks.length; oldIndex < oldLen && newIndex < newLen;) {\n var oldLink = oldLinks[oldIndex];\n var newLink = newLinks[newIndex];\n if (Range.areIntersectingOrTouching(oldLink.range, newLink.range)) {\n // Remove the oldLink\n oldIndex++;\n continue;\n }\n var comparisonResult = Range.compareRangesUsingStarts(oldLink.range, newLink.range);\n if (comparisonResult < 0) {\n // oldLink is before\n result.push(oldLink);\n oldIndex++;\n }\n else {\n // newLink is before\n result.push(newLink);\n newIndex++;\n }\n }\n for (; oldIndex < oldLen; oldIndex++) {\n result.push(oldLinks[oldIndex]);\n }\n for (; newIndex < newLen; newIndex++) {\n result.push(newLinks[newIndex]);\n }\n return result;\n}\nCommandsRegistry.registerCommand('_executeLinkProvider', function (accessor) {\n var args = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n args[_i - 1] = arguments[_i];\n }\n var uri = args[0];\n if (!(uri instanceof URI)) {\n return undefined;\n }\n var model = accessor.get(IModelService).getModel(uri);\n if (!model) {\n return undefined;\n }\n return getLinks(model, CancellationToken.None);\n});\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __param = (this && this.__param) || function (paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nimport './links.css';\nimport * as nls from '../../../nls';\nimport { onUnexpectedError } from '../../../base/common/errors';\nimport * as platform from '../../../base/common/platform';\nimport { IOpenerService } from '../../../platform/opener/common/opener';\nimport { registerEditorAction, registerEditorContribution, EditorAction } from '../../browser/editorExtensions';\nimport { LinkProviderRegistry } from '../../common/modes';\nimport { MouseTargetType } from '../../browser/editorBrowser';\nimport { getLinks } from './getLinks';\nimport { dispose } from '../../../base/common/lifecycle';\nimport { registerThemingParticipant } from '../../../platform/theme/common/themeService';\nimport { editorActiveLinkForeground } from '../../../platform/theme/common/colorRegistry';\nimport { ModelDecorationOptions } from '../../common/model/textModel';\nimport { ClickLinkGesture } from '../goToDefinition/clickLinkGesture';\nimport { MarkdownString } from '../../../base/common/htmlContent';\nimport { TrackedRangeStickiness } from '../../common/model';\nimport { INotificationService } from '../../../platform/notification/common/notification';\nimport * as async from '../../../base/common/async';\nvar HOVER_MESSAGE_GENERAL_META = new MarkdownString().appendText(platform.isMacintosh\n ? nls.localize('links.navigate.mac', \"Cmd + click to follow link\")\n : nls.localize('links.navigate', \"Ctrl + click to follow link\"));\nvar HOVER_MESSAGE_COMMAND_META = new MarkdownString().appendText(platform.isMacintosh\n ? nls.localize('links.command.mac', \"Cmd + click to execute command\")\n : nls.localize('links.command', \"Ctrl + click to execute command\"));\nvar HOVER_MESSAGE_GENERAL_ALT = new MarkdownString().appendText(platform.isMacintosh\n ? nls.localize('links.navigate.al.mac', \"Option + click to follow link\")\n : nls.localize('links.navigate.al', \"Alt + click to follow link\"));\nvar HOVER_MESSAGE_COMMAND_ALT = new MarkdownString().appendText(platform.isMacintosh\n ? nls.localize('links.command.al.mac', \"Option + click to execute command\")\n : nls.localize('links.command.al', \"Alt + click to execute command\"));\nvar decoration = {\n meta: ModelDecorationOptions.register({\n stickiness: TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges,\n inlineClassName: 'detected-link',\n hoverMessage: HOVER_MESSAGE_GENERAL_META\n }),\n metaActive: ModelDecorationOptions.register({\n stickiness: TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges,\n inlineClassName: 'detected-link-active',\n hoverMessage: HOVER_MESSAGE_GENERAL_META\n }),\n alt: ModelDecorationOptions.register({\n stickiness: TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges,\n inlineClassName: 'detected-link',\n hoverMessage: HOVER_MESSAGE_GENERAL_ALT\n }),\n altActive: ModelDecorationOptions.register({\n stickiness: TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges,\n inlineClassName: 'detected-link-active',\n hoverMessage: HOVER_MESSAGE_GENERAL_ALT\n }),\n altCommand: ModelDecorationOptions.register({\n stickiness: TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges,\n inlineClassName: 'detected-link',\n hoverMessage: HOVER_MESSAGE_COMMAND_ALT\n }),\n altCommandActive: ModelDecorationOptions.register({\n stickiness: TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges,\n inlineClassName: 'detected-link-active',\n hoverMessage: HOVER_MESSAGE_COMMAND_ALT\n }),\n metaCommand: ModelDecorationOptions.register({\n stickiness: TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges,\n inlineClassName: 'detected-link',\n hoverMessage: HOVER_MESSAGE_COMMAND_META\n }),\n metaCommandActive: ModelDecorationOptions.register({\n stickiness: TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges,\n inlineClassName: 'detected-link-active',\n hoverMessage: HOVER_MESSAGE_COMMAND_META\n }),\n};\nvar LinkOccurrence = /** @class */ (function () {\n function LinkOccurrence(link, decorationId) {\n this.link = link;\n this.decorationId = decorationId;\n }\n LinkOccurrence.decoration = function (link, useMetaKey) {\n return {\n range: link.range,\n options: LinkOccurrence._getOptions(link, useMetaKey, false)\n };\n };\n LinkOccurrence._getOptions = function (link, useMetaKey, isActive) {\n if (/^command:/i.test(link.url)) {\n if (useMetaKey) {\n return (isActive ? decoration.metaCommandActive : decoration.metaCommand);\n }\n else {\n return (isActive ? decoration.altCommandActive : decoration.altCommand);\n }\n }\n else {\n if (useMetaKey) {\n return (isActive ? decoration.metaActive : decoration.meta);\n }\n else {\n return (isActive ? decoration.altActive : decoration.alt);\n }\n }\n };\n LinkOccurrence.prototype.activate = function (changeAccessor, useMetaKey) {\n changeAccessor.changeDecorationOptions(this.decorationId, LinkOccurrence._getOptions(this.link, useMetaKey, true));\n };\n LinkOccurrence.prototype.deactivate = function (changeAccessor, useMetaKey) {\n changeAccessor.changeDecorationOptions(this.decorationId, LinkOccurrence._getOptions(this.link, useMetaKey, false));\n };\n return LinkOccurrence;\n}());\nvar LinkDetector = /** @class */ (function () {\n function LinkDetector(editor, openerService, notificationService) {\n var _this = this;\n this.editor = editor;\n this.openerService = openerService;\n this.notificationService = notificationService;\n this.listenersToRemove = [];\n var clickLinkGesture = new ClickLinkGesture(editor);\n this.listenersToRemove.push(clickLinkGesture);\n this.listenersToRemove.push(clickLinkGesture.onMouseMoveOrRelevantKeyDown(function (_a) {\n var mouseEvent = _a[0], keyboardEvent = _a[1];\n _this._onEditorMouseMove(mouseEvent, keyboardEvent);\n }));\n this.listenersToRemove.push(clickLinkGesture.onExecute(function (e) {\n _this.onEditorMouseUp(e);\n }));\n this.listenersToRemove.push(clickLinkGesture.onCancel(function (e) {\n _this.cleanUpActiveLinkDecoration();\n }));\n this.enabled = editor.getConfiguration().contribInfo.links;\n this.listenersToRemove.push(editor.onDidChangeConfiguration(function (e) {\n var enabled = editor.getConfiguration().contribInfo.links;\n if (_this.enabled === enabled) {\n // No change in our configuration option\n return;\n }\n _this.enabled = enabled;\n // Remove any links (for the getting disabled case)\n _this.updateDecorations([]);\n // Stop any computation (for the getting disabled case)\n _this.stop();\n // Start computing (for the getting enabled case)\n _this.beginCompute();\n }));\n this.listenersToRemove.push(editor.onDidChangeModelContent(function (e) { return _this.onChange(); }));\n this.listenersToRemove.push(editor.onDidChangeModel(function (e) { return _this.onModelChanged(); }));\n this.listenersToRemove.push(editor.onDidChangeModelLanguage(function (e) { return _this.onModelModeChanged(); }));\n this.listenersToRemove.push(LinkProviderRegistry.onDidChange(function (e) { return _this.onModelModeChanged(); }));\n this.timeout = new async.TimeoutTimer();\n this.computePromise = null;\n this.currentOccurrences = {};\n this.activeLinkDecorationId = null;\n this.beginCompute();\n }\n LinkDetector.get = function (editor) {\n return editor.getContribution(LinkDetector.ID);\n };\n LinkDetector.prototype.getId = function () {\n return LinkDetector.ID;\n };\n LinkDetector.prototype.onModelChanged = function () {\n this.currentOccurrences = {};\n this.activeLinkDecorationId = null;\n this.stop();\n this.beginCompute();\n };\n LinkDetector.prototype.onModelModeChanged = function () {\n this.stop();\n this.beginCompute();\n };\n LinkDetector.prototype.onChange = function () {\n var _this = this;\n this.timeout.setIfNotSet(function () { return _this.beginCompute(); }, LinkDetector.RECOMPUTE_TIME);\n };\n LinkDetector.prototype.beginCompute = function () {\n return __awaiter(this, void 0, void 0, function () {\n var links, err_1;\n var _this = this;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n if (!this.editor.getModel() || !this.enabled) {\n return [2 /*return*/];\n }\n if (!LinkProviderRegistry.has(this.editor.getModel())) {\n return [2 /*return*/];\n }\n this.computePromise = async.createCancelablePromise(function (token) { return getLinks(_this.editor.getModel(), token); });\n _a.label = 1;\n case 1:\n _a.trys.push([1, 3, 4, 5]);\n return [4 /*yield*/, this.computePromise];\n case 2:\n links = _a.sent();\n this.updateDecorations(links);\n return [3 /*break*/, 5];\n case 3:\n err_1 = _a.sent();\n onUnexpectedError(err_1);\n return [3 /*break*/, 5];\n case 4:\n this.computePromise = null;\n return [7 /*endfinally*/];\n case 5: return [2 /*return*/];\n }\n });\n });\n };\n LinkDetector.prototype.updateDecorations = function (links) {\n var useMetaKey = (this.editor.getConfiguration().multiCursorModifier === 'altKey');\n var oldDecorations = [];\n var keys = Object.keys(this.currentOccurrences);\n for (var i = 0, len = keys.length; i < len; i++) {\n var decorationId = keys[i];\n var occurance = this.currentOccurrences[decorationId];\n oldDecorations.push(occurance.decorationId);\n }\n var newDecorations = [];\n if (links) {\n // Not sure why this is sometimes null\n for (var i = 0; i < links.length; i++) {\n newDecorations.push(LinkOccurrence.decoration(links[i], useMetaKey));\n }\n }\n var decorations = this.editor.deltaDecorations(oldDecorations, newDecorations);\n this.currentOccurrences = {};\n this.activeLinkDecorationId = null;\n for (var i = 0, len = decorations.length; i < len; i++) {\n var occurance = new LinkOccurrence(links[i], decorations[i]);\n this.currentOccurrences[occurance.decorationId] = occurance;\n }\n };\n LinkDetector.prototype._onEditorMouseMove = function (mouseEvent, withKey) {\n var _this = this;\n var useMetaKey = (this.editor.getConfiguration().multiCursorModifier === 'altKey');\n if (this.isEnabled(mouseEvent, withKey)) {\n this.cleanUpActiveLinkDecoration(); // always remove previous link decoration as their can only be one\n var occurrence_1 = this.getLinkOccurrence(mouseEvent.target.position);\n if (occurrence_1) {\n this.editor.changeDecorations(function (changeAccessor) {\n occurrence_1.activate(changeAccessor, useMetaKey);\n _this.activeLinkDecorationId = occurrence_1.decorationId;\n });\n }\n }\n else {\n this.cleanUpActiveLinkDecoration();\n }\n };\n LinkDetector.prototype.cleanUpActiveLinkDecoration = function () {\n var useMetaKey = (this.editor.getConfiguration().multiCursorModifier === 'altKey');\n if (this.activeLinkDecorationId) {\n var occurrence_2 = this.currentOccurrences[this.activeLinkDecorationId];\n if (occurrence_2) {\n this.editor.changeDecorations(function (changeAccessor) {\n occurrence_2.deactivate(changeAccessor, useMetaKey);\n });\n }\n this.activeLinkDecorationId = null;\n }\n };\n LinkDetector.prototype.onEditorMouseUp = function (mouseEvent) {\n if (!this.isEnabled(mouseEvent)) {\n return;\n }\n var occurrence = this.getLinkOccurrence(mouseEvent.target.position);\n if (!occurrence) {\n return;\n }\n this.openLinkOccurrence(occurrence, mouseEvent.hasSideBySideModifier);\n };\n LinkDetector.prototype.openLinkOccurrence = function (occurrence, openToSide) {\n var _this = this;\n if (!this.openerService) {\n return;\n }\n var link = occurrence.link;\n link.resolve().then(function (uri) {\n // open the uri\n return _this.openerService.open(uri, { openToSide: openToSide });\n }, function (err) {\n // different error cases\n if (err === 'invalid') {\n _this.notificationService.warn(nls.localize('invalid.url', 'Failed to open this link because it is not well-formed: {0}', link.url));\n }\n else if (err === 'missing') {\n _this.notificationService.warn(nls.localize('missing.url', 'Failed to open this link because its target is missing.'));\n }\n else {\n onUnexpectedError(err);\n }\n }).done(null, onUnexpectedError);\n };\n LinkDetector.prototype.getLinkOccurrence = function (position) {\n var decorations = this.editor.getModel().getDecorationsInRange({\n startLineNumber: position.lineNumber,\n startColumn: position.column,\n endLineNumber: position.lineNumber,\n endColumn: position.column\n }, 0, true);\n for (var i = 0; i < decorations.length; i++) {\n var decoration_1 = decorations[i];\n var currentOccurrence = this.currentOccurrences[decoration_1.id];\n if (currentOccurrence) {\n return currentOccurrence;\n }\n }\n return null;\n };\n LinkDetector.prototype.isEnabled = function (mouseEvent, withKey) {\n return (mouseEvent.target.type === MouseTargetType.CONTENT_TEXT\n && (mouseEvent.hasTriggerModifier || (withKey && withKey.keyCodeIsTriggerKey)));\n };\n LinkDetector.prototype.stop = function () {\n this.timeout.cancel();\n if (this.computePromise) {\n this.computePromise.cancel();\n this.computePromise = null;\n }\n };\n LinkDetector.prototype.dispose = function () {\n this.listenersToRemove = dispose(this.listenersToRemove);\n this.stop();\n this.timeout.dispose();\n };\n LinkDetector.ID = 'editor.linkDetector';\n LinkDetector.RECOMPUTE_TIME = 1000; // ms\n LinkDetector = __decorate([\n __param(1, IOpenerService),\n __param(2, INotificationService)\n ], LinkDetector);\n return LinkDetector;\n}());\nvar OpenLinkAction = /** @class */ (function (_super) {\n __extends(OpenLinkAction, _super);\n function OpenLinkAction() {\n return _super.call(this, {\n id: 'editor.action.openLink',\n label: nls.localize('label', \"Open Link\"),\n alias: 'Open Link',\n precondition: null\n }) || this;\n }\n OpenLinkAction.prototype.run = function (accessor, editor) {\n var linkDetector = LinkDetector.get(editor);\n if (!linkDetector) {\n return;\n }\n var selections = editor.getSelections();\n for (var _i = 0, selections_1 = selections; _i < selections_1.length; _i++) {\n var sel = selections_1[_i];\n var link = linkDetector.getLinkOccurrence(sel.getEndPosition());\n if (link) {\n linkDetector.openLinkOccurrence(link, false);\n }\n }\n };\n return OpenLinkAction;\n}(EditorAction));\nregisterEditorContribution(LinkDetector);\nregisterEditorAction(OpenLinkAction);\nregisterThemingParticipant(function (theme, collector) {\n var activeLinkForeground = theme.getColor(editorActiveLinkForeground);\n if (activeLinkForeground) {\n collector.addRule(\".monaco-editor .detected-link-active { color: \" + activeLinkForeground + \" !important; }\");\n }\n});\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport * as nls from '../../../nls';\nimport { Disposable, dispose } from '../../../base/common/lifecycle';\nimport { KeyChord } from '../../../base/common/keyCodes';\nimport { RunOnceScheduler } from '../../../base/common/async';\nimport { TrackedRangeStickiness, OverviewRulerLane } from '../../common/model';\nimport { EditorContextKeys } from '../../common/editorContextKeys';\nimport { registerEditorAction, registerEditorContribution, EditorAction } from '../../browser/editorExtensions';\nimport { Range } from '../../common/core/range';\nimport { Selection } from '../../common/core/selection';\nimport { CursorChangeReason } from '../../common/controller/cursorEvents';\nimport { CursorMoveCommands } from '../../common/controller/cursorMoveCommands';\nimport { DocumentHighlightProviderRegistry } from '../../common/modes';\nimport { CommonFindController } from '../find/findController';\nimport { ModelDecorationOptions } from '../../common/model/textModel';\nimport { overviewRulerSelectionHighlightForeground } from '../../../platform/theme/common/colorRegistry';\nimport { themeColorFromId } from '../../../platform/theme/common/themeService';\nimport { MenuId } from '../../../platform/actions/common/actions';\nvar InsertCursorAbove = /** @class */ (function (_super) {\n __extends(InsertCursorAbove, _super);\n function InsertCursorAbove() {\n return _super.call(this, {\n id: 'editor.action.insertCursorAbove',\n label: nls.localize('mutlicursor.insertAbove', \"Add Cursor Above\"),\n alias: 'Add Cursor Above',\n precondition: null,\n kbOpts: {\n kbExpr: EditorContextKeys.editorTextFocus,\n primary: 2048 /* CtrlCmd */ | 512 /* Alt */ | 16 /* UpArrow */,\n linux: {\n primary: 1024 /* Shift */ | 512 /* Alt */ | 16 /* UpArrow */,\n secondary: [2048 /* CtrlCmd */ | 1024 /* Shift */ | 16 /* UpArrow */]\n },\n weight: 100 /* EditorContrib */\n },\n menubarOpts: {\n menuId: MenuId.MenubarSelectionMenu,\n group: '3_multi',\n title: nls.localize({ key: 'miInsertCursorAbove', comment: ['&& denotes a mnemonic'] }, \"&&Add Cursor Above\"),\n order: 2\n }\n }) || this;\n }\n InsertCursorAbove.prototype.run = function (accessor, editor, args) {\n var useLogicalLine = (args && args.logicalLine === true);\n var cursors = editor._getCursors();\n var context = cursors.context;\n if (context.config.readOnly) {\n return;\n }\n context.model.pushStackElement();\n cursors.setStates(args.source, CursorChangeReason.Explicit, CursorMoveCommands.addCursorUp(context, cursors.getAll(), useLogicalLine));\n cursors.reveal(true, 1 /* TopMost */, 0 /* Smooth */);\n };\n return InsertCursorAbove;\n}(EditorAction));\nexport { InsertCursorAbove };\nvar InsertCursorBelow = /** @class */ (function (_super) {\n __extends(InsertCursorBelow, _super);\n function InsertCursorBelow() {\n return _super.call(this, {\n id: 'editor.action.insertCursorBelow',\n label: nls.localize('mutlicursor.insertBelow', \"Add Cursor Below\"),\n alias: 'Add Cursor Below',\n precondition: null,\n kbOpts: {\n kbExpr: EditorContextKeys.editorTextFocus,\n primary: 2048 /* CtrlCmd */ | 512 /* Alt */ | 18 /* DownArrow */,\n linux: {\n primary: 1024 /* Shift */ | 512 /* Alt */ | 18 /* DownArrow */,\n secondary: [2048 /* CtrlCmd */ | 1024 /* Shift */ | 18 /* DownArrow */]\n },\n weight: 100 /* EditorContrib */\n },\n menubarOpts: {\n menuId: MenuId.MenubarSelectionMenu,\n group: '3_multi',\n title: nls.localize({ key: 'miInsertCursorBelow', comment: ['&& denotes a mnemonic'] }, \"A&&dd Cursor Below\"),\n order: 3\n }\n }) || this;\n }\n InsertCursorBelow.prototype.run = function (accessor, editor, args) {\n var useLogicalLine = (args && args.logicalLine === true);\n var cursors = editor._getCursors();\n var context = cursors.context;\n if (context.config.readOnly) {\n return;\n }\n context.model.pushStackElement();\n cursors.setStates(args.source, CursorChangeReason.Explicit, CursorMoveCommands.addCursorDown(context, cursors.getAll(), useLogicalLine));\n cursors.reveal(true, 2 /* BottomMost */, 0 /* Smooth */);\n };\n return InsertCursorBelow;\n}(EditorAction));\nexport { InsertCursorBelow };\nvar InsertCursorAtEndOfEachLineSelected = /** @class */ (function (_super) {\n __extends(InsertCursorAtEndOfEachLineSelected, _super);\n function InsertCursorAtEndOfEachLineSelected() {\n return _super.call(this, {\n id: 'editor.action.insertCursorAtEndOfEachLineSelected',\n label: nls.localize('mutlicursor.insertAtEndOfEachLineSelected', \"Add Cursors to Line Ends\"),\n alias: 'Add Cursors to Line Ends',\n precondition: null,\n kbOpts: {\n kbExpr: EditorContextKeys.editorTextFocus,\n primary: 1024 /* Shift */ | 512 /* Alt */ | 39 /* KEY_I */,\n weight: 100 /* EditorContrib */\n },\n menubarOpts: {\n menuId: MenuId.MenubarSelectionMenu,\n group: '3_multi',\n title: nls.localize({ key: 'miInsertCursorAtEndOfEachLineSelected', comment: ['&& denotes a mnemonic'] }, \"Add C&&ursors to Line Ends\"),\n order: 4\n }\n }) || this;\n }\n InsertCursorAtEndOfEachLineSelected.prototype.getCursorsForSelection = function (selection, model, result) {\n if (selection.isEmpty()) {\n return;\n }\n for (var i = selection.startLineNumber; i < selection.endLineNumber; i++) {\n var currentLineMaxColumn = model.getLineMaxColumn(i);\n result.push(new Selection(i, currentLineMaxColumn, i, currentLineMaxColumn));\n }\n if (selection.endColumn > 1) {\n result.push(new Selection(selection.endLineNumber, selection.endColumn, selection.endLineNumber, selection.endColumn));\n }\n };\n InsertCursorAtEndOfEachLineSelected.prototype.run = function (accessor, editor) {\n var _this = this;\n var model = editor.getModel();\n var selections = editor.getSelections();\n var newSelections = [];\n selections.forEach(function (sel) { return _this.getCursorsForSelection(sel, model, newSelections); });\n if (newSelections.length > 0) {\n editor.setSelections(newSelections);\n }\n };\n return InsertCursorAtEndOfEachLineSelected;\n}(EditorAction));\nvar MultiCursorSessionResult = /** @class */ (function () {\n function MultiCursorSessionResult(selections, revealRange, revealScrollType) {\n this.selections = selections;\n this.revealRange = revealRange;\n this.revealScrollType = revealScrollType;\n }\n return MultiCursorSessionResult;\n}());\nexport { MultiCursorSessionResult };\nvar MultiCursorSession = /** @class */ (function () {\n function MultiCursorSession(_editor, findController, isDisconnectedFromFindController, searchText, wholeWord, matchCase, currentMatch) {\n this._editor = _editor;\n this.findController = findController;\n this.isDisconnectedFromFindController = isDisconnectedFromFindController;\n this.searchText = searchText;\n this.wholeWord = wholeWord;\n this.matchCase = matchCase;\n this.currentMatch = currentMatch;\n }\n MultiCursorSession.create = function (editor, findController) {\n var findState = findController.getState();\n // Find widget owns entirely what we search for if:\n // - focus is not in the editor (i.e. it is in the find widget)\n // - and the search widget is visible\n // - and the search string is non-empty\n if (!editor.hasTextFocus() && findState.isRevealed && findState.searchString.length > 0) {\n // Find widget owns what is searched for\n return new MultiCursorSession(editor, findController, false, findState.searchString, findState.wholeWord, findState.matchCase, null);\n }\n // Otherwise, the selection gives the search text, and the find widget gives the search settings\n // The exception is the find state disassociation case: when beginning with a single, collapsed selection\n var isDisconnectedFromFindController = false;\n var wholeWord;\n var matchCase;\n var selections = editor.getSelections();\n if (selections.length === 1 && selections[0].isEmpty()) {\n isDisconnectedFromFindController = true;\n wholeWord = true;\n matchCase = true;\n }\n else {\n wholeWord = findState.wholeWord;\n matchCase = findState.matchCase;\n }\n // Selection owns what is searched for\n var s = editor.getSelection();\n var searchText;\n var currentMatch = null;\n if (s.isEmpty()) {\n // selection is empty => expand to current word\n var word = editor.getModel().getWordAtPosition(s.getStartPosition());\n if (!word) {\n return null;\n }\n searchText = word.word;\n currentMatch = new Selection(s.startLineNumber, word.startColumn, s.startLineNumber, word.endColumn);\n }\n else {\n searchText = editor.getModel().getValueInRange(s).replace(/\\r\\n/g, '\\n');\n }\n return new MultiCursorSession(editor, findController, isDisconnectedFromFindController, searchText, wholeWord, matchCase, currentMatch);\n };\n MultiCursorSession.prototype.addSelectionToNextFindMatch = function () {\n var nextMatch = this._getNextMatch();\n if (!nextMatch) {\n return null;\n }\n var allSelections = this._editor.getSelections();\n return new MultiCursorSessionResult(allSelections.concat(nextMatch), nextMatch, 0 /* Smooth */);\n };\n MultiCursorSession.prototype.moveSelectionToNextFindMatch = function () {\n var nextMatch = this._getNextMatch();\n if (!nextMatch) {\n return null;\n }\n var allSelections = this._editor.getSelections();\n return new MultiCursorSessionResult(allSelections.slice(0, allSelections.length - 1).concat(nextMatch), nextMatch, 0 /* Smooth */);\n };\n MultiCursorSession.prototype._getNextMatch = function () {\n if (this.currentMatch) {\n var result = this.currentMatch;\n this.currentMatch = null;\n return result;\n }\n this.findController.highlightFindOptions();\n var allSelections = this._editor.getSelections();\n var lastAddedSelection = allSelections[allSelections.length - 1];\n var nextMatch = this._editor.getModel().findNextMatch(this.searchText, lastAddedSelection.getEndPosition(), false, this.matchCase, this.wholeWord ? this._editor.getConfiguration().wordSeparators : null, false);\n if (!nextMatch) {\n return null;\n }\n return new Selection(nextMatch.range.startLineNumber, nextMatch.range.startColumn, nextMatch.range.endLineNumber, nextMatch.range.endColumn);\n };\n MultiCursorSession.prototype.addSelectionToPreviousFindMatch = function () {\n var previousMatch = this._getPreviousMatch();\n if (!previousMatch) {\n return null;\n }\n var allSelections = this._editor.getSelections();\n return new MultiCursorSessionResult(allSelections.concat(previousMatch), previousMatch, 0 /* Smooth */);\n };\n MultiCursorSession.prototype.moveSelectionToPreviousFindMatch = function () {\n var previousMatch = this._getPreviousMatch();\n if (!previousMatch) {\n return null;\n }\n var allSelections = this._editor.getSelections();\n return new MultiCursorSessionResult(allSelections.slice(0, allSelections.length - 1).concat(previousMatch), previousMatch, 0 /* Smooth */);\n };\n MultiCursorSession.prototype._getPreviousMatch = function () {\n if (this.currentMatch) {\n var result = this.currentMatch;\n this.currentMatch = null;\n return result;\n }\n this.findController.highlightFindOptions();\n var allSelections = this._editor.getSelections();\n var lastAddedSelection = allSelections[allSelections.length - 1];\n var previousMatch = this._editor.getModel().findPreviousMatch(this.searchText, lastAddedSelection.getStartPosition(), false, this.matchCase, this.wholeWord ? this._editor.getConfiguration().wordSeparators : null, false);\n if (!previousMatch) {\n return null;\n }\n return new Selection(previousMatch.range.startLineNumber, previousMatch.range.startColumn, previousMatch.range.endLineNumber, previousMatch.range.endColumn);\n };\n MultiCursorSession.prototype.selectAll = function () {\n this.findController.highlightFindOptions();\n return this._editor.getModel().findMatches(this.searchText, true, false, this.matchCase, this.wholeWord ? this._editor.getConfiguration().wordSeparators : null, false, 1073741824 /* MAX_SAFE_SMALL_INTEGER */);\n };\n return MultiCursorSession;\n}());\nexport { MultiCursorSession };\nvar MultiCursorSelectionController = /** @class */ (function (_super) {\n __extends(MultiCursorSelectionController, _super);\n function MultiCursorSelectionController(editor) {\n var _this = _super.call(this) || this;\n _this._editor = editor;\n _this._ignoreSelectionChange = false;\n _this._session = null;\n _this._sessionDispose = [];\n return _this;\n }\n MultiCursorSelectionController.get = function (editor) {\n return editor.getContribution(MultiCursorSelectionController.ID);\n };\n MultiCursorSelectionController.prototype.dispose = function () {\n this._endSession();\n _super.prototype.dispose.call(this);\n };\n MultiCursorSelectionController.prototype.getId = function () {\n return MultiCursorSelectionController.ID;\n };\n MultiCursorSelectionController.prototype._beginSessionIfNeeded = function (findController) {\n var _this = this;\n if (!this._session) {\n // Create a new session\n var session = MultiCursorSession.create(this._editor, findController);\n if (!session) {\n return;\n }\n this._session = session;\n var newState = { searchString: this._session.searchText };\n if (this._session.isDisconnectedFromFindController) {\n newState.wholeWordOverride = 1 /* True */;\n newState.matchCaseOverride = 1 /* True */;\n newState.isRegexOverride = 2 /* False */;\n }\n findController.getState().change(newState, false);\n this._sessionDispose = [\n this._editor.onDidChangeCursorSelection(function (e) {\n if (_this._ignoreSelectionChange) {\n return;\n }\n _this._endSession();\n }),\n this._editor.onDidBlurEditorText(function () {\n _this._endSession();\n }),\n findController.getState().onFindReplaceStateChange(function (e) {\n if (e.matchCase || e.wholeWord) {\n _this._endSession();\n }\n })\n ];\n }\n };\n MultiCursorSelectionController.prototype._endSession = function () {\n this._sessionDispose = dispose(this._sessionDispose);\n if (this._session && this._session.isDisconnectedFromFindController) {\n var newState = {\n wholeWordOverride: 0 /* NotSet */,\n matchCaseOverride: 0 /* NotSet */,\n isRegexOverride: 0 /* NotSet */,\n };\n this._session.findController.getState().change(newState, false);\n }\n this._session = null;\n };\n MultiCursorSelectionController.prototype._setSelections = function (selections) {\n this._ignoreSelectionChange = true;\n this._editor.setSelections(selections);\n this._ignoreSelectionChange = false;\n };\n MultiCursorSelectionController.prototype._expandEmptyToWord = function (model, selection) {\n if (!selection.isEmpty()) {\n return selection;\n }\n var word = model.getWordAtPosition(selection.getStartPosition());\n if (!word) {\n return selection;\n }\n return new Selection(selection.startLineNumber, word.startColumn, selection.startLineNumber, word.endColumn);\n };\n MultiCursorSelectionController.prototype._applySessionResult = function (result) {\n if (!result) {\n return;\n }\n this._setSelections(result.selections);\n if (result.revealRange) {\n this._editor.revealRangeInCenterIfOutsideViewport(result.revealRange, result.revealScrollType);\n }\n };\n MultiCursorSelectionController.prototype.getSession = function (findController) {\n return this._session;\n };\n MultiCursorSelectionController.prototype.addSelectionToNextFindMatch = function (findController) {\n if (!this._session) {\n // If there are multiple cursors, handle the case where they do not all select the same text.\n var allSelections = this._editor.getSelections();\n if (allSelections.length > 1) {\n var findState = findController.getState();\n var matchCase = findState.matchCase;\n var selectionsContainSameText = modelRangesContainSameText(this._editor.getModel(), allSelections, matchCase);\n if (!selectionsContainSameText) {\n var model = this._editor.getModel();\n var resultingSelections = [];\n for (var i = 0, len = allSelections.length; i < len; i++) {\n resultingSelections[i] = this._expandEmptyToWord(model, allSelections[i]);\n }\n this._editor.setSelections(resultingSelections);\n return;\n }\n }\n }\n this._beginSessionIfNeeded(findController);\n if (this._session) {\n this._applySessionResult(this._session.addSelectionToNextFindMatch());\n }\n };\n MultiCursorSelectionController.prototype.addSelectionToPreviousFindMatch = function (findController) {\n this._beginSessionIfNeeded(findController);\n if (this._session) {\n this._applySessionResult(this._session.addSelectionToPreviousFindMatch());\n }\n };\n MultiCursorSelectionController.prototype.moveSelectionToNextFindMatch = function (findController) {\n this._beginSessionIfNeeded(findController);\n if (this._session) {\n this._applySessionResult(this._session.moveSelectionToNextFindMatch());\n }\n };\n MultiCursorSelectionController.prototype.moveSelectionToPreviousFindMatch = function (findController) {\n this._beginSessionIfNeeded(findController);\n if (this._session) {\n this._applySessionResult(this._session.moveSelectionToPreviousFindMatch());\n }\n };\n MultiCursorSelectionController.prototype.selectAll = function (findController) {\n var matches = null;\n var findState = findController.getState();\n // Special case: find widget owns entirely what we search for if:\n // - focus is not in the editor (i.e. it is in the find widget)\n // - and the search widget is visible\n // - and the search string is non-empty\n // - and we're searching for a regex\n if (findState.isRevealed && findState.searchString.length > 0 && findState.isRegex) {\n matches = this._editor.getModel().findMatches(findState.searchString, true, findState.isRegex, findState.matchCase, findState.wholeWord ? this._editor.getConfiguration().wordSeparators : null, false, 1073741824 /* MAX_SAFE_SMALL_INTEGER */);\n }\n else {\n this._beginSessionIfNeeded(findController);\n if (!this._session) {\n return;\n }\n matches = this._session.selectAll();\n }\n if (matches.length > 0) {\n var editorSelection = this._editor.getSelection();\n // Have the primary cursor remain the one where the action was invoked\n for (var i = 0, len = matches.length; i < len; i++) {\n var match = matches[i];\n var intersection = match.range.intersectRanges(editorSelection);\n if (intersection) {\n // bingo!\n matches[i] = matches[0];\n matches[0] = match;\n break;\n }\n }\n this._setSelections(matches.map(function (m) { return new Selection(m.range.startLineNumber, m.range.startColumn, m.range.endLineNumber, m.range.endColumn); }));\n }\n };\n MultiCursorSelectionController.ID = 'editor.contrib.multiCursorController';\n return MultiCursorSelectionController;\n}(Disposable));\nexport { MultiCursorSelectionController };\nvar MultiCursorSelectionControllerAction = /** @class */ (function (_super) {\n __extends(MultiCursorSelectionControllerAction, _super);\n function MultiCursorSelectionControllerAction() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n MultiCursorSelectionControllerAction.prototype.run = function (accessor, editor) {\n var multiCursorController = MultiCursorSelectionController.get(editor);\n if (!multiCursorController) {\n return;\n }\n var findController = CommonFindController.get(editor);\n if (!findController) {\n return null;\n }\n this._run(multiCursorController, findController);\n };\n return MultiCursorSelectionControllerAction;\n}(EditorAction));\nexport { MultiCursorSelectionControllerAction };\nvar AddSelectionToNextFindMatchAction = /** @class */ (function (_super) {\n __extends(AddSelectionToNextFindMatchAction, _super);\n function AddSelectionToNextFindMatchAction() {\n return _super.call(this, {\n id: 'editor.action.addSelectionToNextFindMatch',\n label: nls.localize('addSelectionToNextFindMatch', \"Add Selection To Next Find Match\"),\n alias: 'Add Selection To Next Find Match',\n precondition: null,\n kbOpts: {\n kbExpr: EditorContextKeys.focus,\n primary: 2048 /* CtrlCmd */ | 34 /* KEY_D */,\n weight: 100 /* EditorContrib */\n },\n menubarOpts: {\n menuId: MenuId.MenubarSelectionMenu,\n group: '3_multi',\n title: nls.localize({ key: 'miAddSelectionToNextFindMatch', comment: ['&& denotes a mnemonic'] }, \"Add &&Next Occurrence\"),\n order: 5\n }\n }) || this;\n }\n AddSelectionToNextFindMatchAction.prototype._run = function (multiCursorController, findController) {\n multiCursorController.addSelectionToNextFindMatch(findController);\n };\n return AddSelectionToNextFindMatchAction;\n}(MultiCursorSelectionControllerAction));\nexport { AddSelectionToNextFindMatchAction };\nvar AddSelectionToPreviousFindMatchAction = /** @class */ (function (_super) {\n __extends(AddSelectionToPreviousFindMatchAction, _super);\n function AddSelectionToPreviousFindMatchAction() {\n return _super.call(this, {\n id: 'editor.action.addSelectionToPreviousFindMatch',\n label: nls.localize('addSelectionToPreviousFindMatch', \"Add Selection To Previous Find Match\"),\n alias: 'Add Selection To Previous Find Match',\n precondition: null,\n menubarOpts: {\n menuId: MenuId.MenubarSelectionMenu,\n group: '3_multi',\n title: nls.localize({ key: 'miAddSelectionToPreviousFindMatch', comment: ['&& denotes a mnemonic'] }, \"Add P&&revious Occurrence\"),\n order: 6\n }\n }) || this;\n }\n AddSelectionToPreviousFindMatchAction.prototype._run = function (multiCursorController, findController) {\n multiCursorController.addSelectionToPreviousFindMatch(findController);\n };\n return AddSelectionToPreviousFindMatchAction;\n}(MultiCursorSelectionControllerAction));\nexport { AddSelectionToPreviousFindMatchAction };\nvar MoveSelectionToNextFindMatchAction = /** @class */ (function (_super) {\n __extends(MoveSelectionToNextFindMatchAction, _super);\n function MoveSelectionToNextFindMatchAction() {\n return _super.call(this, {\n id: 'editor.action.moveSelectionToNextFindMatch',\n label: nls.localize('moveSelectionToNextFindMatch', \"Move Last Selection To Next Find Match\"),\n alias: 'Move Last Selection To Next Find Match',\n precondition: null,\n kbOpts: {\n kbExpr: EditorContextKeys.focus,\n primary: KeyChord(2048 /* CtrlCmd */ | 41 /* KEY_K */, 2048 /* CtrlCmd */ | 34 /* KEY_D */),\n weight: 100 /* EditorContrib */\n }\n }) || this;\n }\n MoveSelectionToNextFindMatchAction.prototype._run = function (multiCursorController, findController) {\n multiCursorController.moveSelectionToNextFindMatch(findController);\n };\n return MoveSelectionToNextFindMatchAction;\n}(MultiCursorSelectionControllerAction));\nexport { MoveSelectionToNextFindMatchAction };\nvar MoveSelectionToPreviousFindMatchAction = /** @class */ (function (_super) {\n __extends(MoveSelectionToPreviousFindMatchAction, _super);\n function MoveSelectionToPreviousFindMatchAction() {\n return _super.call(this, {\n id: 'editor.action.moveSelectionToPreviousFindMatch',\n label: nls.localize('moveSelectionToPreviousFindMatch', \"Move Last Selection To Previous Find Match\"),\n alias: 'Move Last Selection To Previous Find Match',\n precondition: null\n }) || this;\n }\n MoveSelectionToPreviousFindMatchAction.prototype._run = function (multiCursorController, findController) {\n multiCursorController.moveSelectionToPreviousFindMatch(findController);\n };\n return MoveSelectionToPreviousFindMatchAction;\n}(MultiCursorSelectionControllerAction));\nexport { MoveSelectionToPreviousFindMatchAction };\nvar SelectHighlightsAction = /** @class */ (function (_super) {\n __extends(SelectHighlightsAction, _super);\n function SelectHighlightsAction() {\n return _super.call(this, {\n id: 'editor.action.selectHighlights',\n label: nls.localize('selectAllOccurrencesOfFindMatch', \"Select All Occurrences of Find Match\"),\n alias: 'Select All Occurrences of Find Match',\n precondition: null,\n kbOpts: {\n kbExpr: EditorContextKeys.focus,\n primary: 2048 /* CtrlCmd */ | 1024 /* Shift */ | 42 /* KEY_L */,\n weight: 100 /* EditorContrib */\n },\n menubarOpts: {\n menuId: MenuId.MenubarSelectionMenu,\n group: '3_multi',\n title: nls.localize({ key: 'miSelectHighlights', comment: ['&& denotes a mnemonic'] }, \"Select All &&Occurrences\"),\n order: 7\n }\n }) || this;\n }\n SelectHighlightsAction.prototype._run = function (multiCursorController, findController) {\n multiCursorController.selectAll(findController);\n };\n return SelectHighlightsAction;\n}(MultiCursorSelectionControllerAction));\nexport { SelectHighlightsAction };\nvar CompatChangeAll = /** @class */ (function (_super) {\n __extends(CompatChangeAll, _super);\n function CompatChangeAll() {\n return _super.call(this, {\n id: 'editor.action.changeAll',\n label: nls.localize('changeAll.label', \"Change All Occurrences\"),\n alias: 'Change All Occurrences',\n precondition: EditorContextKeys.writable,\n kbOpts: {\n kbExpr: EditorContextKeys.editorTextFocus,\n primary: 2048 /* CtrlCmd */ | 60 /* F2 */,\n weight: 100 /* EditorContrib */\n },\n menuOpts: {\n group: '1_modification',\n order: 1.2\n }\n }) || this;\n }\n CompatChangeAll.prototype._run = function (multiCursorController, findController) {\n multiCursorController.selectAll(findController);\n };\n return CompatChangeAll;\n}(MultiCursorSelectionControllerAction));\nexport { CompatChangeAll };\nvar SelectionHighlighterState = /** @class */ (function () {\n function SelectionHighlighterState(lastWordUnderCursor, searchText, matchCase, wordSeparators) {\n this.lastWordUnderCursor = lastWordUnderCursor;\n this.searchText = searchText;\n this.matchCase = matchCase;\n this.wordSeparators = wordSeparators;\n }\n /**\n * Everything equals except for `lastWordUnderCursor`\n */\n SelectionHighlighterState.softEquals = function (a, b) {\n if (!a && !b) {\n return true;\n }\n if (!a || !b) {\n return false;\n }\n return (a.searchText === b.searchText\n && a.matchCase === b.matchCase\n && a.wordSeparators === b.wordSeparators);\n };\n return SelectionHighlighterState;\n}());\nvar SelectionHighlighter = /** @class */ (function (_super) {\n __extends(SelectionHighlighter, _super);\n function SelectionHighlighter(editor) {\n var _this = _super.call(this) || this;\n _this.editor = editor;\n _this._isEnabled = editor.getConfiguration().contribInfo.selectionHighlight;\n _this.decorations = [];\n _this.updateSoon = _this._register(new RunOnceScheduler(function () { return _this._update(); }, 300));\n _this.state = null;\n _this._register(editor.onDidChangeConfiguration(function (e) {\n _this._isEnabled = editor.getConfiguration().contribInfo.selectionHighlight;\n }));\n _this._register(editor.onDidChangeCursorSelection(function (e) {\n if (!_this._isEnabled) {\n // Early exit if nothing needs to be done!\n // Leave some form of early exit check here if you wish to continue being a cursor position change listener ;)\n return;\n }\n if (e.selection.isEmpty()) {\n if (e.reason === CursorChangeReason.Explicit) {\n if (_this.state && (!_this.state.lastWordUnderCursor || !_this.state.lastWordUnderCursor.containsPosition(e.selection.getStartPosition()))) {\n // no longer valid\n _this._setState(null);\n }\n _this.updateSoon.schedule();\n }\n else {\n _this._setState(null);\n }\n }\n else {\n _this._update();\n }\n }));\n _this._register(editor.onDidChangeModel(function (e) {\n _this._setState(null);\n }));\n _this._register(CommonFindController.get(editor).getState().onFindReplaceStateChange(function (e) {\n _this._update();\n }));\n return _this;\n }\n SelectionHighlighter.prototype.getId = function () {\n return SelectionHighlighter.ID;\n };\n SelectionHighlighter.prototype._update = function () {\n this._setState(SelectionHighlighter._createState(this._isEnabled, this.editor));\n };\n SelectionHighlighter._createState = function (isEnabled, editor) {\n if (!isEnabled) {\n return null;\n }\n var model = editor.getModel();\n if (!model) {\n return null;\n }\n var s = editor.getSelection();\n if (s.startLineNumber !== s.endLineNumber) {\n // multiline forbidden for perf reasons\n return null;\n }\n var multiCursorController = MultiCursorSelectionController.get(editor);\n if (!multiCursorController) {\n return null;\n }\n var findController = CommonFindController.get(editor);\n if (!findController) {\n return null;\n }\n var r = multiCursorController.getSession(findController);\n if (!r) {\n var allSelections = editor.getSelections();\n if (allSelections.length > 1) {\n var findState_1 = findController.getState();\n var matchCase = findState_1.matchCase;\n var selectionsContainSameText = modelRangesContainSameText(editor.getModel(), allSelections, matchCase);\n if (!selectionsContainSameText) {\n return null;\n }\n }\n r = MultiCursorSession.create(editor, findController);\n }\n if (!r) {\n return null;\n }\n var lastWordUnderCursor = null;\n var hasFindOccurrences = DocumentHighlightProviderRegistry.has(model);\n if (r.currentMatch) {\n // This is an empty selection\n if (hasFindOccurrences) {\n // Do not interfere with semantic word highlighting in the no selection case\n return null;\n }\n var config = editor.getConfiguration();\n if (!config.contribInfo.occurrencesHighlight) {\n return null;\n }\n lastWordUnderCursor = r.currentMatch;\n }\n if (/^[ \\t]+$/.test(r.searchText)) {\n // whitespace only selection\n return null;\n }\n if (r.searchText.length > 200) {\n // very long selection\n return null;\n }\n // TODO: better handling of this case\n var findState = findController.getState();\n var caseSensitive = findState.matchCase;\n // Return early if the find widget shows the exact same matches\n if (findState.isRevealed) {\n var findStateSearchString = findState.searchString;\n if (!caseSensitive) {\n findStateSearchString = findStateSearchString.toLowerCase();\n }\n var mySearchString = r.searchText;\n if (!caseSensitive) {\n mySearchString = mySearchString.toLowerCase();\n }\n if (findStateSearchString === mySearchString && r.matchCase === findState.matchCase && r.wholeWord === findState.wholeWord && !findState.isRegex) {\n return null;\n }\n }\n return new SelectionHighlighterState(lastWordUnderCursor, r.searchText, r.matchCase, r.wholeWord ? editor.getConfiguration().wordSeparators : null);\n };\n SelectionHighlighter.prototype._setState = function (state) {\n if (SelectionHighlighterState.softEquals(this.state, state)) {\n this.state = state;\n return;\n }\n this.state = state;\n if (!this.state) {\n this.decorations = this.editor.deltaDecorations(this.decorations, []);\n return;\n }\n var model = this.editor.getModel();\n if (model.isTooLargeForTokenization()) {\n // the file is too large, so searching word under cursor in the whole document takes is blocking the UI.\n return;\n }\n var hasFindOccurrences = DocumentHighlightProviderRegistry.has(model);\n var allMatches = model.findMatches(this.state.searchText, true, false, this.state.matchCase, this.state.wordSeparators, false).map(function (m) { return m.range; });\n allMatches.sort(Range.compareRangesUsingStarts);\n var selections = this.editor.getSelections();\n selections.sort(Range.compareRangesUsingStarts);\n // do not overlap with selection (issue #64 and #512)\n var matches = [];\n for (var i = 0, j = 0, len = allMatches.length, lenJ = selections.length; i < len;) {\n var match = allMatches[i];\n if (j >= lenJ) {\n // finished all editor selections\n matches.push(match);\n i++;\n }\n else {\n var cmp = Range.compareRangesUsingStarts(match, selections[j]);\n if (cmp < 0) {\n // match is before sel\n if (selections[j].isEmpty() || !Range.areIntersecting(match, selections[j])) {\n matches.push(match);\n }\n i++;\n }\n else if (cmp > 0) {\n // sel is before match\n j++;\n }\n else {\n // sel is equal to match\n i++;\n j++;\n }\n }\n }\n var decorations = matches.map(function (r) {\n return {\n range: r,\n // Show in overviewRuler only if model has no semantic highlighting\n options: (hasFindOccurrences ? SelectionHighlighter._SELECTION_HIGHLIGHT : SelectionHighlighter._SELECTION_HIGHLIGHT_OVERVIEW)\n };\n });\n this.decorations = this.editor.deltaDecorations(this.decorations, decorations);\n };\n SelectionHighlighter.prototype.dispose = function () {\n this._setState(null);\n _super.prototype.dispose.call(this);\n };\n SelectionHighlighter.ID = 'editor.contrib.selectionHighlighter';\n SelectionHighlighter._SELECTION_HIGHLIGHT_OVERVIEW = ModelDecorationOptions.register({\n stickiness: TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges,\n className: 'selectionHighlight',\n overviewRuler: {\n color: themeColorFromId(overviewRulerSelectionHighlightForeground),\n darkColor: themeColorFromId(overviewRulerSelectionHighlightForeground),\n position: OverviewRulerLane.Center\n }\n });\n SelectionHighlighter._SELECTION_HIGHLIGHT = ModelDecorationOptions.register({\n stickiness: TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges,\n className: 'selectionHighlight',\n });\n return SelectionHighlighter;\n}(Disposable));\nexport { SelectionHighlighter };\nfunction modelRangesContainSameText(model, ranges, matchCase) {\n var selectedText = getValueInRange(model, ranges[0], !matchCase);\n for (var i = 1, len = ranges.length; i < len; i++) {\n var range = ranges[i];\n if (range.isEmpty()) {\n return false;\n }\n var thisSelectedText = getValueInRange(model, range, !matchCase);\n if (selectedText !== thisSelectedText) {\n return false;\n }\n }\n return true;\n}\nfunction getValueInRange(model, range, toLowerCase) {\n var text = model.getValueInRange(range);\n return (toLowerCase ? text.toLowerCase() : text);\n}\nregisterEditorContribution(MultiCursorSelectionController);\nregisterEditorContribution(SelectionHighlighter);\nregisterEditorAction(InsertCursorAbove);\nregisterEditorAction(InsertCursorBelow);\nregisterEditorAction(InsertCursorAtEndOfEachLineSelected);\nregisterEditorAction(AddSelectionToNextFindMatchAction);\nregisterEditorAction(AddSelectionToPreviousFindMatchAction);\nregisterEditorAction(MoveSelectionToNextFindMatchAction);\nregisterEditorAction(MoveSelectionToPreviousFindMatchAction);\nregisterEditorAction(SelectHighlightsAction);\nregisterEditorAction(CompatChangeAll);\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { first2 } from '../../../base/common/async';\nimport { onUnexpectedExternalError } from '../../../base/common/errors';\nimport { registerDefaultLanguageCommand } from '../../browser/editorExtensions';\nimport { SignatureHelpProviderRegistry } from '../../common/modes';\nimport { RawContextKey } from '../../../platform/contextkey/common/contextkey';\nimport { CancellationToken } from '../../../base/common/cancellation';\nexport var Context = {\n Visible: new RawContextKey('parameterHintsVisible', false),\n MultipleSignatures: new RawContextKey('parameterHintsMultipleSignatures', false),\n};\nexport function provideSignatureHelp(model, position, token) {\n var supports = SignatureHelpProviderRegistry.ordered(model);\n return first2(supports.map(function (support) { return function () {\n return Promise.resolve(support.provideSignatureHelp(model, position, token)).catch(onUnexpectedExternalError);\n }; }));\n}\nregisterDefaultLanguageCommand('_executeSignatureHelpProvider', function (model, position) { return provideSignatureHelp(model, position, CancellationToken.None); });\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __param = (this && this.__param) || function (paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n};\nimport './parameterHints.css';\nimport * as nls from '../../../nls';\nimport { dispose, Disposable } from '../../../base/common/lifecycle';\nimport { TPromise } from '../../../base/common/winjs.base';\nimport * as dom from '../../../base/browser/dom';\nimport * as aria from '../../../base/browser/ui/aria/aria';\nimport { SignatureHelpProviderRegistry } from '../../common/modes';\nimport { ContentWidgetPositionPreference } from '../../browser/editorBrowser';\nimport { RunOnceScheduler, createCancelablePromise } from '../../../base/common/async';\nimport { onUnexpectedError } from '../../../base/common/errors';\nimport { Emitter, chain } from '../../../base/common/event';\nimport { domEvent, stop } from '../../../base/browser/event';\nimport { IContextKeyService } from '../../../platform/contextkey/common/contextkey';\nimport { Context, provideSignatureHelp } from './provideSignatureHelp';\nimport { DomScrollableElement } from '../../../base/browser/ui/scrollbar/scrollableElement';\nimport { CharacterSet } from '../../common/core/characterClassifier';\nimport { registerThemingParticipant, HIGH_CONTRAST } from '../../../platform/theme/common/themeService';\nimport { editorHoverBackground, editorHoverBorder, textLinkForeground, textCodeBlockBackground } from '../../../platform/theme/common/colorRegistry';\nimport { IOpenerService } from '../../../platform/opener/common/opener';\nimport { IModeService } from '../../common/services/modeService';\nimport { MarkdownRenderer } from '../markdown/markdownRenderer';\nvar $ = dom.$;\nvar ParameterHintsModel = /** @class */ (function (_super) {\n __extends(ParameterHintsModel, _super);\n function ParameterHintsModel(editor) {\n var _this = _super.call(this) || this;\n _this._onHint = _this._register(new Emitter());\n _this.onHint = _this._onHint.event;\n _this._onCancel = _this._register(new Emitter());\n _this.onCancel = _this._onCancel.event;\n _this.editor = editor;\n _this.enabled = false;\n _this.triggerCharactersListeners = [];\n _this.throttledDelayer = new RunOnceScheduler(function () { return _this.doTrigger(); }, ParameterHintsModel.DELAY);\n _this.active = false;\n _this._register(_this.editor.onDidChangeConfiguration(function () { return _this.onEditorConfigurationChange(); }));\n _this._register(_this.editor.onDidChangeModel(function (e) { return _this.onModelChanged(); }));\n _this._register(_this.editor.onDidChangeModelLanguage(function (_) { return _this.onModelChanged(); }));\n _this._register(_this.editor.onDidChangeCursorSelection(function (e) { return _this.onCursorChange(e); }));\n _this._register(_this.editor.onDidChangeModelContent(function (e) { return _this.onModelContentChange(); }));\n _this._register(SignatureHelpProviderRegistry.onDidChange(_this.onModelChanged, _this));\n _this.onEditorConfigurationChange();\n _this.onModelChanged();\n return _this;\n }\n ParameterHintsModel.prototype.cancel = function (silent) {\n if (silent === void 0) { silent = false; }\n this.active = false;\n this.throttledDelayer.cancel();\n if (!silent) {\n this._onCancel.fire(void 0);\n }\n if (this.provideSignatureHelpRequest) {\n this.provideSignatureHelpRequest.cancel();\n this.provideSignatureHelpRequest = undefined;\n }\n };\n ParameterHintsModel.prototype.trigger = function (delay) {\n if (delay === void 0) { delay = ParameterHintsModel.DELAY; }\n if (!SignatureHelpProviderRegistry.has(this.editor.getModel())) {\n return;\n }\n this.cancel(true);\n return this.throttledDelayer.schedule(delay);\n };\n ParameterHintsModel.prototype.doTrigger = function () {\n var _this = this;\n if (this.provideSignatureHelpRequest) {\n this.provideSignatureHelpRequest.cancel();\n }\n this.provideSignatureHelpRequest = createCancelablePromise(function (token) { return provideSignatureHelp(_this.editor.getModel(), _this.editor.getPosition(), token); });\n this.provideSignatureHelpRequest.then(function (result) {\n if (!result || !result.signatures || result.signatures.length === 0) {\n _this.cancel();\n _this._onCancel.fire(void 0);\n return false;\n }\n _this.active = true;\n var event = { hints: result };\n _this._onHint.fire(event);\n return true;\n }).catch(onUnexpectedError);\n };\n ParameterHintsModel.prototype.isTriggered = function () {\n return this.active || this.throttledDelayer.isScheduled();\n };\n ParameterHintsModel.prototype.onModelChanged = function () {\n var _this = this;\n this.cancel();\n this.triggerCharactersListeners = dispose(this.triggerCharactersListeners);\n var model = this.editor.getModel();\n if (!model) {\n return;\n }\n var triggerChars = new CharacterSet();\n for (var _i = 0, _a = SignatureHelpProviderRegistry.ordered(model); _i < _a.length; _i++) {\n var support = _a[_i];\n if (Array.isArray(support.signatureHelpTriggerCharacters)) {\n for (var _b = 0, _c = support.signatureHelpTriggerCharacters; _b < _c.length; _b++) {\n var ch = _c[_b];\n triggerChars.add(ch.charCodeAt(0));\n }\n }\n }\n this.triggerCharactersListeners.push(this.editor.onDidType(function (text) {\n if (!_this.enabled) {\n return;\n }\n if (triggerChars.has(text.charCodeAt(text.length - 1))) {\n _this.trigger();\n }\n }));\n };\n ParameterHintsModel.prototype.onCursorChange = function (e) {\n if (e.source === 'mouse') {\n this.cancel();\n }\n else if (this.isTriggered()) {\n this.trigger();\n }\n };\n ParameterHintsModel.prototype.onModelContentChange = function () {\n if (this.isTriggered()) {\n this.trigger();\n }\n };\n ParameterHintsModel.prototype.onEditorConfigurationChange = function () {\n this.enabled = this.editor.getConfiguration().contribInfo.parameterHints;\n if (!this.enabled) {\n this.cancel();\n }\n };\n ParameterHintsModel.prototype.dispose = function () {\n this.cancel(true);\n this.triggerCharactersListeners = dispose(this.triggerCharactersListeners);\n _super.prototype.dispose.call(this);\n };\n ParameterHintsModel.DELAY = 120; // ms\n return ParameterHintsModel;\n}(Disposable));\nexport { ParameterHintsModel };\nvar ParameterHintsWidget = /** @class */ (function () {\n function ParameterHintsWidget(editor, contextKeyService, openerService, modeService) {\n var _this = this;\n this.editor = editor;\n // Editor.IContentWidget.allowEditorOverflow\n this.allowEditorOverflow = true;\n this.markdownRenderer = new MarkdownRenderer(editor, modeService, openerService);\n this.model = new ParameterHintsModel(editor);\n this.keyVisible = Context.Visible.bindTo(contextKeyService);\n this.keyMultipleSignatures = Context.MultipleSignatures.bindTo(contextKeyService);\n this.visible = false;\n this.disposables = [];\n this.disposables.push(this.model.onHint(function (e) {\n _this.show();\n _this.hints = e.hints;\n _this.currentSignature = e.hints.activeSignature;\n _this.render();\n }));\n this.disposables.push(this.model.onCancel(function () {\n _this.hide();\n }));\n }\n ParameterHintsWidget.prototype.createParamaterHintDOMNodes = function () {\n var _this = this;\n this.element = $('.editor-widget.parameter-hints-widget');\n var wrapper = dom.append(this.element, $('.wrapper'));\n var buttons = dom.append(wrapper, $('.buttons'));\n var previous = dom.append(buttons, $('.button.previous'));\n var next = dom.append(buttons, $('.button.next'));\n var onPreviousClick = stop(domEvent(previous, 'click'));\n onPreviousClick(this.previous, this, this.disposables);\n var onNextClick = stop(domEvent(next, 'click'));\n onNextClick(this.next, this, this.disposables);\n this.overloads = dom.append(wrapper, $('.overloads'));\n var body = $('.body');\n this.scrollbar = new DomScrollableElement(body, {});\n this.disposables.push(this.scrollbar);\n wrapper.appendChild(this.scrollbar.getDomNode());\n this.signature = dom.append(body, $('.signature'));\n this.docs = dom.append(body, $('.docs'));\n this.currentSignature = 0;\n this.editor.addContentWidget(this);\n this.hide();\n this.disposables.push(this.editor.onDidChangeCursorSelection(function (e) {\n if (_this.visible) {\n _this.editor.layoutContentWidget(_this);\n }\n }));\n var updateFont = function () {\n var fontInfo = _this.editor.getConfiguration().fontInfo;\n _this.element.style.fontSize = fontInfo.fontSize + \"px\";\n };\n updateFont();\n chain(this.editor.onDidChangeConfiguration.bind(this.editor))\n .filter(function (e) { return e.fontInfo; })\n .on(updateFont, null, this.disposables);\n this.disposables.push(this.editor.onDidLayoutChange(function (e) { return _this.updateMaxHeight(); }));\n this.updateMaxHeight();\n };\n ParameterHintsWidget.prototype.show = function () {\n var _this = this;\n if (!this.model || this.visible) {\n return;\n }\n if (!this.element) {\n this.createParamaterHintDOMNodes();\n }\n this.keyVisible.set(true);\n this.visible = true;\n TPromise.timeout(100).done(function () { return dom.addClass(_this.element, 'visible'); });\n this.editor.layoutContentWidget(this);\n };\n ParameterHintsWidget.prototype.hide = function () {\n if (!this.model || !this.visible) {\n return;\n }\n if (!this.element) {\n this.createParamaterHintDOMNodes();\n }\n this.keyVisible.reset();\n this.visible = false;\n this.hints = null;\n this.announcedLabel = null;\n dom.removeClass(this.element, 'visible');\n this.editor.layoutContentWidget(this);\n };\n ParameterHintsWidget.prototype.getPosition = function () {\n if (this.visible) {\n return {\n position: this.editor.getPosition(),\n preference: [ContentWidgetPositionPreference.ABOVE, ContentWidgetPositionPreference.BELOW]\n };\n }\n return null;\n };\n ParameterHintsWidget.prototype.render = function () {\n var multiple = this.hints.signatures.length > 1;\n dom.toggleClass(this.element, 'multiple', multiple);\n this.keyMultipleSignatures.set(multiple);\n this.signature.innerHTML = '';\n this.docs.innerHTML = '';\n var signature = this.hints.signatures[this.currentSignature];\n if (!signature) {\n return;\n }\n var code = dom.append(this.signature, $('.code'));\n var hasParameters = signature.parameters.length > 0;\n var fontInfo = this.editor.getConfiguration().fontInfo;\n code.style.fontSize = fontInfo.fontSize + \"px\";\n code.style.fontFamily = fontInfo.fontFamily;\n if (!hasParameters) {\n var label = dom.append(code, $('span'));\n label.textContent = signature.label;\n }\n else {\n this.renderParameters(code, signature, this.hints.activeParameter);\n }\n dispose(this.renderDisposeables);\n this.renderDisposeables = [];\n var activeParameter = signature.parameters[this.hints.activeParameter];\n if (activeParameter && activeParameter.documentation) {\n var documentation = $('span.documentation');\n if (typeof activeParameter.documentation === 'string') {\n documentation.textContent = activeParameter.documentation;\n }\n else {\n var renderedContents = this.markdownRenderer.render(activeParameter.documentation);\n dom.addClass(renderedContents.element, 'markdown-docs');\n this.renderDisposeables.push(renderedContents);\n documentation.appendChild(renderedContents.element);\n }\n dom.append(this.docs, $('p', null, documentation));\n }\n dom.toggleClass(this.signature, 'has-docs', !!signature.documentation);\n if (typeof signature.documentation === 'string') {\n dom.append(this.docs, $('p', null, signature.documentation));\n }\n else {\n var renderedContents = this.markdownRenderer.render(signature.documentation);\n dom.addClass(renderedContents.element, 'markdown-docs');\n this.renderDisposeables.push(renderedContents);\n dom.append(this.docs, renderedContents.element);\n }\n var currentOverload = String(this.currentSignature + 1);\n if (this.hints.signatures.length < 10) {\n currentOverload += \"/\" + this.hints.signatures.length;\n }\n this.overloads.textContent = currentOverload;\n if (activeParameter) {\n var labelToAnnounce = activeParameter.label;\n // Select method gets called on every user type while parameter hints are visible.\n // We do not want to spam the user with same announcements, so we only announce if the current parameter changed.\n if (this.announcedLabel !== labelToAnnounce) {\n aria.alert(nls.localize('hint', \"{0}, hint\", labelToAnnounce));\n this.announcedLabel = labelToAnnounce;\n }\n }\n this.editor.layoutContentWidget(this);\n this.scrollbar.scanDomNode();\n };\n ParameterHintsWidget.prototype.renderParameters = function (parent, signature, currentParameter) {\n var end = signature.label.length;\n var idx = 0;\n var element;\n for (var i = signature.parameters.length - 1; i >= 0; i--) {\n var parameter = signature.parameters[i];\n idx = signature.label.lastIndexOf(parameter.label, end - 1);\n var signatureLabelOffset = 0;\n var signatureLabelEnd = 0;\n if (idx >= 0) {\n signatureLabelOffset = idx;\n signatureLabelEnd = idx + parameter.label.length;\n }\n // non parameter part\n element = document.createElement('span');\n element.textContent = signature.label.substring(signatureLabelEnd, end);\n dom.prepend(parent, element);\n // parameter part\n element = document.createElement('span');\n element.className = \"parameter \" + (i === currentParameter ? 'active' : '');\n element.textContent = signature.label.substring(signatureLabelOffset, signatureLabelEnd);\n dom.prepend(parent, element);\n end = signatureLabelOffset;\n }\n // non parameter part\n element = document.createElement('span');\n element.textContent = signature.label.substring(0, end);\n dom.prepend(parent, element);\n };\n // private select(position: number): void {\n // \tconst signature = this.signatureViews[position];\n // \tif (!signature) {\n // \t\treturn;\n // \t}\n // \tthis.signatures.style.height = `${ signature.height }px`;\n // \tthis.signatures.scrollTop = signature.top;\n // \tlet overloads = '' + (position + 1);\n // \tif (this.signatureViews.length < 10) {\n // \t\toverloads += '/' + this.signatureViews.length;\n // \t}\n // \tthis.overloads.textContent = overloads;\n // \tif (this.hints && this.hints.signatures[position].parameters[this.hints.activeParameter]) {\n // \t\tconst labelToAnnounce = this.hints.signatures[position].parameters[this.hints.activeParameter].label;\n // \t\t// Select method gets called on every user type while parameter hints are visible.\n // \t\t// We do not want to spam the user with same announcements, so we only announce if the current parameter changed.\n // \t\tif (this.announcedLabel !== labelToAnnounce) {\n // \t\t\taria.alert(nls.localize('hint', \"{0}, hint\", labelToAnnounce));\n // \t\t\tthis.announcedLabel = labelToAnnounce;\n // \t\t}\n // \t}\n // \tthis.editor.layoutContentWidget(this);\n // }\n ParameterHintsWidget.prototype.next = function () {\n var length = this.hints.signatures.length;\n var last = (this.currentSignature % length) === (length - 1);\n // If there is only one signature, or we're on last signature of list\n if (length < 2 || last) {\n this.cancel();\n return false;\n }\n this.currentSignature++;\n this.render();\n return true;\n };\n ParameterHintsWidget.prototype.previous = function () {\n var length = this.hints.signatures.length;\n var first = this.currentSignature === 0;\n if (length < 2 || first) {\n this.cancel();\n return false;\n }\n this.currentSignature--;\n this.render();\n return true;\n };\n ParameterHintsWidget.prototype.cancel = function () {\n this.model.cancel();\n };\n ParameterHintsWidget.prototype.getDomNode = function () {\n return this.element;\n };\n ParameterHintsWidget.prototype.getId = function () {\n return ParameterHintsWidget.ID;\n };\n ParameterHintsWidget.prototype.trigger = function () {\n this.model.trigger(0);\n };\n ParameterHintsWidget.prototype.updateMaxHeight = function () {\n var height = Math.max(this.editor.getLayoutInfo().height / 4, 250);\n this.element.style.maxHeight = height + \"px\";\n };\n ParameterHintsWidget.prototype.dispose = function () {\n this.disposables = dispose(this.disposables);\n this.renderDisposeables = dispose(this.renderDisposeables);\n if (this.model) {\n this.model.dispose();\n this.model = null;\n }\n };\n ParameterHintsWidget.ID = 'editor.widget.parameterHintsWidget';\n ParameterHintsWidget = __decorate([\n __param(1, IContextKeyService),\n __param(2, IOpenerService),\n __param(3, IModeService)\n ], ParameterHintsWidget);\n return ParameterHintsWidget;\n}());\nexport { ParameterHintsWidget };\nregisterThemingParticipant(function (theme, collector) {\n var border = theme.getColor(editorHoverBorder);\n if (border) {\n var borderWidth = theme.type === HIGH_CONTRAST ? 2 : 1;\n collector.addRule(\".monaco-editor .parameter-hints-widget { border: \" + borderWidth + \"px solid \" + border + \"; }\");\n collector.addRule(\".monaco-editor .parameter-hints-widget.multiple .body { border-left: 1px solid \" + border.transparent(0.5) + \"; }\");\n collector.addRule(\".monaco-editor .parameter-hints-widget .signature.has-docs { border-bottom: 1px solid \" + border.transparent(0.5) + \"; }\");\n }\n var background = theme.getColor(editorHoverBackground);\n if (background) {\n collector.addRule(\".monaco-editor .parameter-hints-widget { background-color: \" + background + \"; }\");\n }\n var link = theme.getColor(textLinkForeground);\n if (link) {\n collector.addRule(\".monaco-editor .parameter-hints-widget a { color: \" + link + \"; }\");\n }\n var codeBackground = theme.getColor(textCodeBlockBackground);\n if (codeBackground) {\n collector.addRule(\".monaco-editor .parameter-hints-widget code { background-color: \" + codeBackground + \"; }\");\n }\n});\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __param = (this && this.__param) || function (paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n};\nimport * as nls from '../../../nls';\nimport { dispose } from '../../../base/common/lifecycle';\nimport { IInstantiationService } from '../../../platform/instantiation/common/instantiation';\nimport { EditorContextKeys } from '../../common/editorContextKeys';\nimport { ContextKeyExpr } from '../../../platform/contextkey/common/contextkey';\nimport { registerEditorAction, registerEditorContribution, EditorAction, EditorCommand, registerEditorCommand } from '../../browser/editorExtensions';\nimport { ParameterHintsWidget } from './parameterHintsWidget';\nimport { Context } from './provideSignatureHelp';\nvar ParameterHintsController = /** @class */ (function () {\n function ParameterHintsController(editor, instantiationService) {\n this.editor = editor;\n this.widget = instantiationService.createInstance(ParameterHintsWidget, this.editor);\n }\n ParameterHintsController.get = function (editor) {\n return editor.getContribution(ParameterHintsController.ID);\n };\n ParameterHintsController.prototype.getId = function () {\n return ParameterHintsController.ID;\n };\n ParameterHintsController.prototype.cancel = function () {\n this.widget.cancel();\n };\n ParameterHintsController.prototype.previous = function () {\n this.widget.previous();\n };\n ParameterHintsController.prototype.next = function () {\n this.widget.next();\n };\n ParameterHintsController.prototype.trigger = function () {\n this.widget.trigger();\n };\n ParameterHintsController.prototype.dispose = function () {\n this.widget = dispose(this.widget);\n };\n ParameterHintsController.ID = 'editor.controller.parameterHints';\n ParameterHintsController = __decorate([\n __param(1, IInstantiationService)\n ], ParameterHintsController);\n return ParameterHintsController;\n}());\nvar TriggerParameterHintsAction = /** @class */ (function (_super) {\n __extends(TriggerParameterHintsAction, _super);\n function TriggerParameterHintsAction() {\n return _super.call(this, {\n id: 'editor.action.triggerParameterHints',\n label: nls.localize('parameterHints.trigger.label', \"Trigger Parameter Hints\"),\n alias: 'Trigger Parameter Hints',\n precondition: EditorContextKeys.hasSignatureHelpProvider,\n kbOpts: {\n kbExpr: EditorContextKeys.editorTextFocus,\n primary: 2048 /* CtrlCmd */ | 1024 /* Shift */ | 10 /* Space */,\n weight: 100 /* EditorContrib */\n }\n }) || this;\n }\n TriggerParameterHintsAction.prototype.run = function (accessor, editor) {\n var controller = ParameterHintsController.get(editor);\n if (controller) {\n controller.trigger();\n }\n };\n return TriggerParameterHintsAction;\n}(EditorAction));\nexport { TriggerParameterHintsAction };\nregisterEditorContribution(ParameterHintsController);\nregisterEditorAction(TriggerParameterHintsAction);\nvar weight = 100 /* EditorContrib */ + 75;\nvar ParameterHintsCommand = EditorCommand.bindToContribution(ParameterHintsController.get);\nregisterEditorCommand(new ParameterHintsCommand({\n id: 'closeParameterHints',\n precondition: Context.Visible,\n handler: function (x) { return x.cancel(); },\n kbOpts: {\n weight: weight,\n kbExpr: EditorContextKeys.editorTextFocus,\n primary: 9 /* Escape */,\n secondary: [1024 /* Shift */ | 9 /* Escape */]\n }\n}));\nregisterEditorCommand(new ParameterHintsCommand({\n id: 'showPrevParameterHint',\n precondition: ContextKeyExpr.and(Context.Visible, Context.MultipleSignatures),\n handler: function (x) { return x.previous(); },\n kbOpts: {\n weight: weight,\n kbExpr: EditorContextKeys.editorTextFocus,\n primary: 16 /* UpArrow */,\n secondary: [512 /* Alt */ | 16 /* UpArrow */],\n mac: { primary: 16 /* UpArrow */, secondary: [512 /* Alt */ | 16 /* UpArrow */, 256 /* WinCtrl */ | 46 /* KEY_P */] }\n }\n}));\nregisterEditorCommand(new ParameterHintsCommand({\n id: 'showNextParameterHint',\n precondition: ContextKeyExpr.and(Context.Visible, Context.MultipleSignatures),\n handler: function (x) { return x.next(); },\n kbOpts: {\n weight: weight,\n kbExpr: EditorContextKeys.editorTextFocus,\n primary: 18 /* DownArrow */,\n secondary: [512 /* Alt */ | 18 /* DownArrow */],\n mac: { primary: 18 /* DownArrow */, secondary: [512 /* Alt */ | 18 /* DownArrow */, 256 /* WinCtrl */ | 44 /* KEY_N */] }\n }\n}));\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport { createDecorator } from '../../../platform/instantiation/common/instantiation';\nexport var IBulkEditService = createDecorator('IWorkspaceEditService');\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { startsWith } from '../../../base/common/strings';\nvar CodeActionKind = /** @class */ (function () {\n function CodeActionKind(value) {\n this.value = value;\n }\n CodeActionKind.prototype.contains = function (other) {\n return this.value === other || startsWith(other, this.value + CodeActionKind.sep);\n };\n CodeActionKind.sep = '.';\n CodeActionKind.Empty = new CodeActionKind('');\n CodeActionKind.Refactor = new CodeActionKind('refactor');\n CodeActionKind.Source = new CodeActionKind('source');\n CodeActionKind.SourceOrganizeImports = new CodeActionKind('source.organizeImports');\n return CodeActionKind;\n}());\nexport { CodeActionKind };\nexport var CodeActionAutoApply;\n(function (CodeActionAutoApply) {\n CodeActionAutoApply[CodeActionAutoApply[\"IfSingle\"] = 1] = \"IfSingle\";\n CodeActionAutoApply[CodeActionAutoApply[\"First\"] = 2] = \"First\";\n CodeActionAutoApply[CodeActionAutoApply[\"Never\"] = 3] = \"Never\";\n})(CodeActionAutoApply || (CodeActionAutoApply = {}));\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { flatten, isFalsyOrEmpty, mergeSort } from '../../../base/common/arrays';\nimport { asWinJsPromise } from '../../../base/common/async';\nimport { CancellationToken } from '../../../base/common/cancellation';\nimport { illegalArgument, isPromiseCanceledError, onUnexpectedExternalError } from '../../../base/common/errors';\nimport URI from '../../../base/common/uri';\nimport { registerLanguageCommand } from '../../browser/editorExtensions';\nimport { Range } from '../../common/core/range';\nimport { CodeActionProviderRegistry, CodeActionTrigger as CodeActionTriggerKind } from '../../common/modes';\nimport { IModelService } from '../../common/services/modelService';\nimport { CodeActionKind } from './codeActionTrigger';\nexport function getCodeActions(model, rangeOrSelection, trigger, token) {\n if (token === void 0) { token = CancellationToken.None; }\n var codeActionContext = {\n only: trigger && trigger.filter && trigger.filter.kind ? trigger.filter.kind.value : undefined,\n trigger: trigger && trigger.type === 'manual' ? CodeActionTriggerKind.Manual : CodeActionTriggerKind.Automatic\n };\n var promises = CodeActionProviderRegistry.all(model).map(function (support) {\n return asWinJsPromise(function (token) { return support.provideCodeActions(model, rangeOrSelection, codeActionContext, token); }).then(function (providedCodeActions) {\n if (!Array.isArray(providedCodeActions)) {\n return [];\n }\n return providedCodeActions.filter(function (action) { return isValidAction(trigger && trigger.filter, action); });\n }, function (err) {\n if (isPromiseCanceledError(err)) {\n throw err;\n }\n onUnexpectedExternalError(err);\n return [];\n });\n });\n return Promise.all(promises)\n .then(flatten)\n .then(function (allCodeActions) { return mergeSort(allCodeActions, codeActionsComparator); });\n}\nfunction isValidAction(filter, action) {\n if (!action) {\n return false;\n }\n // Filter out actions by kind\n if (filter && filter.kind && (!action.kind || !filter.kind.contains(action.kind))) {\n return false;\n }\n // Don't return source actions unless they are explicitly requested\n if (action.kind && CodeActionKind.Source.contains(action.kind) && (!filter || !filter.includeSourceActions)) {\n return false;\n }\n return true;\n}\nfunction codeActionsComparator(a, b) {\n var aHasDiags = !isFalsyOrEmpty(a.diagnostics);\n var bHasDiags = !isFalsyOrEmpty(b.diagnostics);\n if (aHasDiags) {\n if (bHasDiags) {\n return a.diagnostics[0].message.localeCompare(b.diagnostics[0].message);\n }\n else {\n return -1;\n }\n }\n else if (bHasDiags) {\n return 1;\n }\n else {\n return 0; // both have no diagnostics\n }\n}\nregisterLanguageCommand('_executeCodeActionProvider', function (accessor, args) {\n var resource = args.resource, range = args.range;\n if (!(resource instanceof URI) || !Range.isIRange(range)) {\n throw illegalArgument();\n }\n var model = accessor.get(IModelService).getModel(resource);\n if (!model) {\n throw illegalArgument();\n }\n return getCodeActions(model, model.validateRange(range), { type: 'manual', filter: { includeSourceActions: true } });\n});\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { createCancelablePromise } from '../../../base/common/async';\nimport { debounceEvent, Emitter } from '../../../base/common/event';\nimport { dispose } from '../../../base/common/lifecycle';\nimport { TPromise } from '../../../base/common/winjs.base';\nimport { Range } from '../../common/core/range';\nimport { CodeActionProviderRegistry } from '../../common/modes';\nimport { RawContextKey } from '../../../platform/contextkey/common/contextkey';\nimport { getCodeActions } from './codeAction';\nexport var SUPPORTED_CODE_ACTIONS = new RawContextKey('supportedCodeAction', '');\nvar CodeActionOracle = /** @class */ (function () {\n function CodeActionOracle(_editor, _markerService, _signalChange, delay, _progressService) {\n if (delay === void 0) { delay = 250; }\n var _this = this;\n this._editor = _editor;\n this._markerService = _markerService;\n this._signalChange = _signalChange;\n this._progressService = _progressService;\n this._disposables = [];\n this._disposables.push(debounceEvent(this._markerService.onMarkerChanged, function (last, cur) { return last ? last.concat(cur) : cur; }, delay / 2)(function (e) { return _this._onMarkerChanges(e); }), debounceEvent(this._editor.onDidChangeCursorPosition, function (last, cur) { return cur; }, delay)(function (e) { return _this._onCursorChange(); }));\n }\n CodeActionOracle.prototype.dispose = function () {\n this._disposables = dispose(this._disposables);\n };\n CodeActionOracle.prototype.trigger = function (trigger) {\n var selection = this._getRangeOfSelectionUnlessWhitespaceEnclosed(trigger);\n return this._createEventAndSignalChange(trigger, selection);\n };\n CodeActionOracle.prototype._onMarkerChanges = function (resources) {\n var uri = this._editor.getModel().uri;\n for (var _i = 0, resources_1 = resources; _i < resources_1.length; _i++) {\n var resource = resources_1[_i];\n if (resource.toString() === uri.toString()) {\n this.trigger({ type: 'auto' });\n return;\n }\n }\n };\n CodeActionOracle.prototype._onCursorChange = function () {\n this.trigger({ type: 'auto' });\n };\n CodeActionOracle.prototype._getRangeOfMarker = function (selection) {\n var model = this._editor.getModel();\n for (var _i = 0, _a = this._markerService.read({ resource: model.uri }); _i < _a.length; _i++) {\n var marker = _a[_i];\n if (Range.intersectRanges(marker, selection)) {\n return Range.lift(marker);\n }\n }\n return undefined;\n };\n CodeActionOracle.prototype._getRangeOfSelectionUnlessWhitespaceEnclosed = function (trigger) {\n var model = this._editor.getModel();\n var selection = this._editor.getSelection();\n if (selection.isEmpty() && !(trigger.filter && trigger.filter.includeSourceActions)) {\n var _a = selection.getPosition(), lineNumber = _a.lineNumber, column = _a.column;\n var line = model.getLineContent(lineNumber);\n if (line.length === 0) {\n // empty line\n return undefined;\n }\n else if (column === 1) {\n // look only right\n if (/\\s/.test(line[0])) {\n return undefined;\n }\n }\n else if (column === model.getLineMaxColumn(lineNumber)) {\n // look only left\n if (/\\s/.test(line[line.length - 1])) {\n return undefined;\n }\n }\n else {\n // look left and right\n if (/\\s/.test(line[column - 2]) && /\\s/.test(line[column - 1])) {\n return undefined;\n }\n }\n }\n return selection;\n };\n CodeActionOracle.prototype._createEventAndSignalChange = function (trigger, selection) {\n if (!selection) {\n // cancel\n this._signalChange({\n trigger: trigger,\n rangeOrSelection: undefined,\n position: undefined,\n actions: undefined,\n });\n return TPromise.as(undefined);\n }\n else {\n var model_1 = this._editor.getModel();\n var markerRange = this._getRangeOfMarker(selection);\n var position = markerRange ? markerRange.getStartPosition() : selection.getStartPosition();\n var actions = createCancelablePromise(function (token) { return getCodeActions(model_1, selection, trigger, token); });\n if (this._progressService && trigger.type === 'manual') {\n this._progressService.showWhile(TPromise.wrap(actions), 250);\n }\n this._signalChange({\n trigger: trigger,\n rangeOrSelection: selection,\n position: position,\n actions: actions\n });\n return actions;\n }\n };\n return CodeActionOracle;\n}());\nexport { CodeActionOracle };\nvar CodeActionModel = /** @class */ (function () {\n function CodeActionModel(editor, markerService, contextKeyService, _progressService) {\n var _this = this;\n this._progressService = _progressService;\n this._onDidChangeFixes = new Emitter();\n this._disposables = [];\n this._editor = editor;\n this._markerService = markerService;\n this._supportedCodeActions = SUPPORTED_CODE_ACTIONS.bindTo(contextKeyService);\n this._disposables.push(this._editor.onDidChangeModel(function () { return _this._update(); }));\n this._disposables.push(this._editor.onDidChangeModelLanguage(function () { return _this._update(); }));\n this._disposables.push(CodeActionProviderRegistry.onDidChange(this._update, this));\n this._update();\n }\n CodeActionModel.prototype.dispose = function () {\n this._disposables = dispose(this._disposables);\n dispose(this._codeActionOracle);\n };\n Object.defineProperty(CodeActionModel.prototype, \"onDidChangeFixes\", {\n get: function () {\n return this._onDidChangeFixes.event;\n },\n enumerable: true,\n configurable: true\n });\n CodeActionModel.prototype._update = function () {\n var _this = this;\n if (this._codeActionOracle) {\n this._codeActionOracle.dispose();\n this._codeActionOracle = undefined;\n this._onDidChangeFixes.fire(undefined);\n }\n if (this._editor.getModel()\n && CodeActionProviderRegistry.has(this._editor.getModel())\n && !this._editor.getConfiguration().readOnly) {\n var supportedActions = [];\n for (var _i = 0, _a = CodeActionProviderRegistry.all(this._editor.getModel()); _i < _a.length; _i++) {\n var provider = _a[_i];\n if (Array.isArray(provider.providedCodeActionKinds)) {\n supportedActions.push.apply(supportedActions, provider.providedCodeActionKinds);\n }\n }\n this._supportedCodeActions.set(supportedActions.join(' '));\n this._codeActionOracle = new CodeActionOracle(this._editor, this._markerService, function (p) { return _this._onDidChangeFixes.fire(p); }, undefined, this._progressService);\n this._codeActionOracle.trigger({ type: 'auto' });\n }\n else {\n this._supportedCodeActions.reset();\n }\n };\n CodeActionModel.prototype.trigger = function (trigger) {\n if (this._codeActionOracle) {\n return this._codeActionOracle.trigger(trigger);\n }\n return TPromise.as(undefined);\n };\n return CodeActionModel;\n}());\nexport { CodeActionModel };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { getDomNodePagePosition } from '../../../base/browser/dom';\nimport { Action } from '../../../base/common/actions';\nimport { always } from '../../../base/common/async';\nimport { canceled } from '../../../base/common/errors';\nimport { Emitter } from '../../../base/common/event';\nimport { TPromise } from '../../../base/common/winjs.base';\nimport { Position } from '../../common/core/position';\nvar CodeActionContextMenu = /** @class */ (function () {\n function CodeActionContextMenu(_editor, _contextMenuService, _onApplyCodeAction) {\n this._editor = _editor;\n this._contextMenuService = _contextMenuService;\n this._onApplyCodeAction = _onApplyCodeAction;\n this._onDidExecuteCodeAction = new Emitter();\n this.onDidExecuteCodeAction = this._onDidExecuteCodeAction.event;\n }\n CodeActionContextMenu.prototype.show = function (fixes, at) {\n var _this = this;\n var actions = fixes.then(function (value) {\n return value.map(function (action) {\n return new Action(action.command ? action.command.id : action.title, action.title, undefined, true, function () {\n return always(_this._onApplyCodeAction(action), function () { return _this._onDidExecuteCodeAction.fire(undefined); });\n });\n });\n }).then(function (actions) {\n if (!_this._editor.getDomNode()) {\n // cancel when editor went off-dom\n return TPromise.wrapError(canceled());\n }\n return actions;\n });\n this._contextMenuService.showContextMenu({\n getAnchor: function () {\n if (Position.isIPosition(at)) {\n at = _this._toCoords(at);\n }\n return at;\n },\n getActions: function () { return TPromise.wrap(actions); },\n onHide: function () {\n _this._visible = false;\n _this._editor.focus();\n },\n autoSelectFirstItem: true\n });\n };\n Object.defineProperty(CodeActionContextMenu.prototype, \"isVisible\", {\n get: function () {\n return this._visible;\n },\n enumerable: true,\n configurable: true\n });\n CodeActionContextMenu.prototype._toCoords = function (position) {\n this._editor.revealPosition(position, 1 /* Immediate */);\n this._editor.render();\n // Translate to absolute editor position\n var cursorCoords = this._editor.getScrolledVisiblePosition(this._editor.getPosition());\n var editorCoords = getDomNodePagePosition(this._editor.getDomNode());\n var x = editorCoords.left + cursorCoords.left;\n var y = editorCoords.top + cursorCoords.top + cursorCoords.height;\n return { x: x, y: y };\n };\n return CodeActionContextMenu;\n}());\nexport { CodeActionContextMenu };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport * as dom from '../../../base/browser/dom';\nimport { GlobalMouseMoveMonitor, standardMouseMoveMerger } from '../../../base/browser/globalMouseMoveMonitor';\nimport { CancellationTokenSource } from '../../../base/common/cancellation';\nimport { Emitter } from '../../../base/common/event';\nimport { dispose } from '../../../base/common/lifecycle';\nimport './lightBulbWidget.css';\nimport { ContentWidgetPositionPreference } from '../../browser/editorBrowser';\nimport { TextModel } from '../../common/model/textModel';\nimport { CodeActionKind } from './codeActionTrigger';\nvar LightBulbWidget = /** @class */ (function () {\n function LightBulbWidget(editor) {\n var _this = this;\n this._disposables = [];\n this._onClick = new Emitter();\n this.onClick = this._onClick.event;\n this._futureFixes = new CancellationTokenSource();\n this._domNode = document.createElement('div');\n this._domNode.className = 'lightbulb-glyph';\n this._editor = editor;\n this._editor.addContentWidget(this);\n this._disposables.push(this._editor.onDidChangeModel(function (_) { return _this._futureFixes.cancel(); }));\n this._disposables.push(this._editor.onDidChangeModelLanguage(function (_) { return _this._futureFixes.cancel(); }));\n this._disposables.push(this._editor.onDidChangeModelContent(function (_) {\n // cancel when the line in question has been removed\n if (_this._model && _this.model.position.lineNumber >= _this._editor.getModel().getLineCount()) {\n _this._futureFixes.cancel();\n }\n }));\n this._disposables.push(dom.addStandardDisposableListener(this._domNode, 'click', function (e) {\n // Make sure that focus / cursor location is not lost when clicking widget icon\n _this._editor.focus();\n // a bit of extra work to make sure the menu\n // doesn't cover the line-text\n var _a = dom.getDomNodePagePosition(_this._domNode), top = _a.top, height = _a.height;\n var lineHeight = _this._editor.getConfiguration().lineHeight;\n var pad = Math.floor(lineHeight / 3);\n if (_this._position && _this._position.position.lineNumber < _this._model.position.lineNumber) {\n pad += lineHeight;\n }\n _this._onClick.fire({\n x: e.posx,\n y: top + height + pad\n });\n }));\n this._disposables.push(dom.addDisposableListener(this._domNode, 'mouseenter', function (e) {\n if ((e.buttons & 1) !== 1) {\n return;\n }\n // mouse enters lightbulb while the primary/left button\n // is being pressed -> hide the lightbulb and block future\n // showings until mouse is released\n _this.hide();\n var monitor = new GlobalMouseMoveMonitor();\n monitor.startMonitoring(standardMouseMoveMerger, function () { }, function () {\n monitor.dispose();\n });\n }));\n this._disposables.push(this._editor.onDidChangeConfiguration(function (e) {\n // hide when told to do so\n if (e.contribInfo && !_this._editor.getConfiguration().contribInfo.lightbulbEnabled) {\n _this.hide();\n }\n }));\n }\n LightBulbWidget.prototype.dispose = function () {\n dispose(this._disposables);\n this._editor.removeContentWidget(this);\n };\n LightBulbWidget.prototype.getId = function () {\n return 'LightBulbWidget';\n };\n LightBulbWidget.prototype.getDomNode = function () {\n return this._domNode;\n };\n LightBulbWidget.prototype.getPosition = function () {\n return this._position;\n };\n Object.defineProperty(LightBulbWidget.prototype, \"model\", {\n get: function () {\n return this._model;\n },\n set: function (value) {\n var _this = this;\n if (this._position && (!value.position || this._position.position.lineNumber !== value.position.lineNumber)) {\n // hide when getting a 'hide'-request or when currently\n // showing on another line\n this.hide();\n }\n else if (this._futureFixes) {\n // cancel pending show request in any case\n this._futureFixes.cancel();\n }\n this._futureFixes = new CancellationTokenSource();\n var token = this._futureFixes.token;\n this._model = value;\n var selection = this._model.rangeOrSelection;\n this._model.actions.then(function (fixes) {\n if (!token.isCancellationRequested && fixes && fixes.length > 0) {\n if (selection.isEmpty() && fixes.every(function (fix) { return fix.kind && CodeActionKind.Refactor.contains(fix.kind); })) {\n _this.hide();\n }\n else {\n _this._show();\n }\n }\n else {\n _this.hide();\n }\n }).catch(function (err) {\n _this.hide();\n });\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(LightBulbWidget.prototype, \"title\", {\n get: function () {\n return this._domNode.title;\n },\n set: function (value) {\n this._domNode.title = value;\n },\n enumerable: true,\n configurable: true\n });\n LightBulbWidget.prototype._show = function () {\n var config = this._editor.getConfiguration();\n if (!config.contribInfo.lightbulbEnabled) {\n return;\n }\n var lineNumber = this._model.position.lineNumber;\n var model = this._editor.getModel();\n if (!model) {\n return;\n }\n var tabSize = model.getOptions().tabSize;\n var lineContent = model.getLineContent(lineNumber);\n var indent = TextModel.computeIndentLevel(lineContent, tabSize);\n var lineHasSpace = config.fontInfo.spaceWidth * indent > 22;\n var effectiveLineNumber = lineNumber;\n if (!lineHasSpace) {\n if (lineNumber > 1) {\n effectiveLineNumber -= 1;\n }\n else {\n effectiveLineNumber += 1;\n }\n }\n this._position = {\n position: { lineNumber: effectiveLineNumber, column: 1 },\n preference: LightBulbWidget._posPref\n };\n this._editor.layoutContentWidget(this);\n };\n LightBulbWidget.prototype.hide = function () {\n this._position = null;\n this._model = null;\n this._futureFixes.cancel();\n this._editor.layoutContentWidget(this);\n };\n LightBulbWidget._posPref = [ContentWidgetPositionPreference.EXACT];\n return LightBulbWidget;\n}());\nexport { LightBulbWidget };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __param = (this && this.__param) || function (paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nimport { dispose } from '../../../base/common/lifecycle';\nimport { escapeRegExpCharacters } from '../../../base/common/strings';\nimport { TPromise } from '../../../base/common/winjs.base';\nimport { EditorAction, EditorCommand } from '../../browser/editorExtensions';\nimport { IBulkEditService } from '../../browser/services/bulkEditService';\nimport { EditorContextKeys } from '../../common/editorContextKeys';\nimport { MessageController } from '../message/messageController';\nimport * as nls from '../../../nls';\nimport { ICommandService } from '../../../platform/commands/common/commands';\nimport { ContextKeyExpr, IContextKeyService } from '../../../platform/contextkey/common/contextkey';\nimport { IContextMenuService } from '../../../platform/contextview/browser/contextView';\nimport { IKeybindingService } from '../../../platform/keybinding/common/keybinding';\nimport { IMarkerService } from '../../../platform/markers/common/markers';\nimport { IProgressService } from '../../../platform/progress/common/progress';\nimport { CodeActionModel, SUPPORTED_CODE_ACTIONS } from './codeActionModel';\nimport { CodeActionAutoApply, CodeActionKind } from './codeActionTrigger';\nimport { CodeActionContextMenu } from './codeActionWidget';\nimport { LightBulbWidget } from './lightBulbWidget';\nimport { onUnexpectedError } from '../../../base/common/errors';\nfunction contextKeyForSupportedActions(kind) {\n return ContextKeyExpr.regex(SUPPORTED_CODE_ACTIONS.keys()[0], new RegExp('(\\\\s|^)' + escapeRegExpCharacters(kind.value) + '\\\\b'));\n}\nvar QuickFixController = /** @class */ (function () {\n function QuickFixController(editor, markerService, contextKeyService, progressService, contextMenuService, _commandService, _keybindingService, _bulkEditService) {\n var _this = this;\n this._commandService = _commandService;\n this._keybindingService = _keybindingService;\n this._bulkEditService = _bulkEditService;\n this._disposables = [];\n this._editor = editor;\n this._model = new CodeActionModel(this._editor, markerService, contextKeyService, progressService);\n this._codeActionContextMenu = new CodeActionContextMenu(editor, contextMenuService, function (action) { return _this._onApplyCodeAction(action); });\n this._lightBulbWidget = new LightBulbWidget(editor);\n this._updateLightBulbTitle();\n this._disposables.push(this._codeActionContextMenu.onDidExecuteCodeAction(function (_) { return _this._model.trigger({ type: 'auto', filter: {} }); }), this._lightBulbWidget.onClick(this._handleLightBulbSelect, this), this._model.onDidChangeFixes(function (e) { return _this._onCodeActionsEvent(e); }), this._keybindingService.onDidUpdateKeybindings(this._updateLightBulbTitle, this));\n }\n QuickFixController.get = function (editor) {\n return editor.getContribution(QuickFixController.ID);\n };\n QuickFixController.prototype.dispose = function () {\n this._model.dispose();\n dispose(this._disposables);\n };\n QuickFixController.prototype._onCodeActionsEvent = function (e) {\n var _this = this;\n if (this._activeRequest) {\n this._activeRequest.cancel();\n this._activeRequest = undefined;\n }\n if (e && e.actions) {\n this._activeRequest = e.actions;\n }\n if (e && e.actions && e.trigger.filter && e.trigger.filter.kind) {\n // Triggered for specific scope\n // Apply if we only have one action or requested autoApply, otherwise show menu\n e.actions.then(function (fixes) {\n if (e.trigger.autoApply === CodeActionAutoApply.First || (e.trigger.autoApply === CodeActionAutoApply.IfSingle && fixes.length === 1)) {\n _this._onApplyCodeAction(fixes[0]);\n }\n else {\n _this._codeActionContextMenu.show(e.actions, e.position);\n }\n }).catch(onUnexpectedError);\n return;\n }\n if (e && e.trigger.type === 'manual') {\n this._codeActionContextMenu.show(e.actions, e.position);\n }\n else if (e && e.actions) {\n // auto magically triggered\n // * update an existing list of code actions\n // * manage light bulb\n if (this._codeActionContextMenu.isVisible) {\n this._codeActionContextMenu.show(e.actions, e.position);\n }\n else {\n this._lightBulbWidget.model = e;\n }\n }\n else {\n this._lightBulbWidget.hide();\n }\n };\n QuickFixController.prototype.getId = function () {\n return QuickFixController.ID;\n };\n QuickFixController.prototype._handleLightBulbSelect = function (coords) {\n if (this._lightBulbWidget.model.actions) {\n this._codeActionContextMenu.show(this._lightBulbWidget.model.actions, coords);\n }\n };\n QuickFixController.prototype.triggerFromEditorSelection = function (filter, autoApply) {\n return this._model.trigger({ type: 'manual', filter: filter, autoApply: autoApply });\n };\n QuickFixController.prototype._updateLightBulbTitle = function () {\n var kb = this._keybindingService.lookupKeybinding(QuickFixAction.Id);\n var title;\n if (kb) {\n title = nls.localize('quickFixWithKb', \"Show Fixes ({0})\", kb.getLabel());\n }\n else {\n title = nls.localize('quickFix', \"Show Fixes\");\n }\n this._lightBulbWidget.title = title;\n };\n QuickFixController.prototype._onApplyCodeAction = function (action) {\n return TPromise.wrap(applyCodeAction(action, this._bulkEditService, this._commandService, this._editor));\n };\n QuickFixController.ID = 'editor.contrib.quickFixController';\n QuickFixController = __decorate([\n __param(1, IMarkerService),\n __param(2, IContextKeyService),\n __param(3, IProgressService),\n __param(4, IContextMenuService),\n __param(5, ICommandService),\n __param(6, IKeybindingService),\n __param(7, IBulkEditService)\n ], QuickFixController);\n return QuickFixController;\n}());\nexport { QuickFixController };\nexport function applyCodeAction(action, bulkEditService, commandService, editor) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n if (!action.edit) return [3 /*break*/, 2];\n return [4 /*yield*/, bulkEditService.apply(action.edit, { editor: editor })];\n case 1:\n _a.sent();\n _a.label = 2;\n case 2:\n if (!action.command) return [3 /*break*/, 4];\n return [4 /*yield*/, commandService.executeCommand.apply(commandService, [action.command.id].concat(action.command.arguments))];\n case 3:\n _a.sent();\n _a.label = 4;\n case 4: return [2 /*return*/];\n }\n });\n });\n}\nfunction showCodeActionsForEditorSelection(editor, notAvailableMessage, filter, autoApply) {\n var controller = QuickFixController.get(editor);\n if (!controller) {\n return;\n }\n var pos = editor.getPosition();\n controller.triggerFromEditorSelection(filter, autoApply).then(function (codeActions) {\n if (!codeActions || !codeActions.length) {\n MessageController.get(editor).showMessage(notAvailableMessage, pos);\n }\n });\n}\nvar QuickFixAction = /** @class */ (function (_super) {\n __extends(QuickFixAction, _super);\n function QuickFixAction() {\n return _super.call(this, {\n id: QuickFixAction.Id,\n label: nls.localize('quickfix.trigger.label', \"Quick Fix...\"),\n alias: 'Quick Fix',\n precondition: ContextKeyExpr.and(EditorContextKeys.writable, EditorContextKeys.hasCodeActionsProvider),\n kbOpts: {\n kbExpr: EditorContextKeys.editorTextFocus,\n primary: 2048 /* CtrlCmd */ | 84 /* US_DOT */,\n weight: 100 /* EditorContrib */\n }\n }) || this;\n }\n QuickFixAction.prototype.run = function (_accessor, editor) {\n return showCodeActionsForEditorSelection(editor, nls.localize('editor.action.quickFix.noneMessage', \"No code actions available\"));\n };\n QuickFixAction.Id = 'editor.action.quickFix';\n return QuickFixAction;\n}(EditorAction));\nexport { QuickFixAction };\nvar CodeActionCommandArgs = /** @class */ (function () {\n function CodeActionCommandArgs(kind, apply) {\n this.kind = kind;\n this.apply = apply;\n }\n CodeActionCommandArgs.fromUser = function (arg) {\n if (!arg || typeof arg !== 'object') {\n return new CodeActionCommandArgs(CodeActionKind.Empty, CodeActionAutoApply.IfSingle);\n }\n return new CodeActionCommandArgs(CodeActionCommandArgs.getKindFromUser(arg), CodeActionCommandArgs.getApplyFromUser(arg));\n };\n CodeActionCommandArgs.getApplyFromUser = function (arg) {\n switch (typeof arg.apply === 'string' ? arg.apply.toLowerCase() : '') {\n case 'first':\n return CodeActionAutoApply.First;\n case 'never':\n return CodeActionAutoApply.Never;\n case 'ifsingle':\n default:\n return CodeActionAutoApply.IfSingle;\n }\n };\n CodeActionCommandArgs.getKindFromUser = function (arg) {\n return typeof arg.kind === 'string'\n ? new CodeActionKind(arg.kind)\n : CodeActionKind.Empty;\n };\n return CodeActionCommandArgs;\n}());\nvar CodeActionCommand = /** @class */ (function (_super) {\n __extends(CodeActionCommand, _super);\n function CodeActionCommand() {\n return _super.call(this, {\n id: CodeActionCommand.Id,\n precondition: ContextKeyExpr.and(EditorContextKeys.writable, EditorContextKeys.hasCodeActionsProvider)\n }) || this;\n }\n CodeActionCommand.prototype.runEditorCommand = function (_accessor, editor, userArg) {\n var args = CodeActionCommandArgs.fromUser(userArg);\n return showCodeActionsForEditorSelection(editor, nls.localize('editor.action.quickFix.noneMessage', \"No code actions available\"), { kind: args.kind, includeSourceActions: true }, args.apply);\n };\n CodeActionCommand.Id = 'editor.action.codeAction';\n return CodeActionCommand;\n}(EditorCommand));\nexport { CodeActionCommand };\nvar RefactorAction = /** @class */ (function (_super) {\n __extends(RefactorAction, _super);\n function RefactorAction() {\n return _super.call(this, {\n id: RefactorAction.Id,\n label: nls.localize('refactor.label', \"Refactor...\"),\n alias: 'Refactor',\n precondition: ContextKeyExpr.and(EditorContextKeys.writable, EditorContextKeys.hasCodeActionsProvider),\n kbOpts: {\n kbExpr: EditorContextKeys.editorTextFocus,\n primary: 2048 /* CtrlCmd */ | 1024 /* Shift */ | 48 /* KEY_R */,\n mac: {\n primary: 256 /* WinCtrl */ | 1024 /* Shift */ | 48 /* KEY_R */\n },\n weight: 100 /* EditorContrib */\n },\n menuOpts: {\n group: '1_modification',\n order: 2,\n when: ContextKeyExpr.and(EditorContextKeys.writable, contextKeyForSupportedActions(CodeActionKind.Refactor)),\n }\n }) || this;\n }\n RefactorAction.prototype.run = function (_accessor, editor) {\n return showCodeActionsForEditorSelection(editor, nls.localize('editor.action.refactor.noneMessage', \"No refactorings available\"), { kind: CodeActionKind.Refactor }, CodeActionAutoApply.Never);\n };\n RefactorAction.Id = 'editor.action.refactor';\n return RefactorAction;\n}(EditorAction));\nexport { RefactorAction };\nvar SourceAction = /** @class */ (function (_super) {\n __extends(SourceAction, _super);\n function SourceAction() {\n return _super.call(this, {\n id: SourceAction.Id,\n label: nls.localize('source.label', \"Source Action...\"),\n alias: 'Source Action',\n precondition: ContextKeyExpr.and(EditorContextKeys.writable, EditorContextKeys.hasCodeActionsProvider),\n menuOpts: {\n group: '1_modification',\n order: 2.1,\n when: ContextKeyExpr.and(EditorContextKeys.writable, contextKeyForSupportedActions(CodeActionKind.Source)),\n }\n }) || this;\n }\n SourceAction.prototype.run = function (_accessor, editor) {\n return showCodeActionsForEditorSelection(editor, nls.localize('editor.action.source.noneMessage', \"No source actions available\"), { kind: CodeActionKind.Source, includeSourceActions: true }, CodeActionAutoApply.Never);\n };\n SourceAction.Id = 'editor.action.sourceAction';\n return SourceAction;\n}(EditorAction));\nexport { SourceAction };\nvar OrganizeImportsAction = /** @class */ (function (_super) {\n __extends(OrganizeImportsAction, _super);\n function OrganizeImportsAction() {\n return _super.call(this, {\n id: OrganizeImportsAction.Id,\n label: nls.localize('organizeImports.label', \"Organize Imports\"),\n alias: 'Organize Imports',\n precondition: ContextKeyExpr.and(EditorContextKeys.writable, contextKeyForSupportedActions(CodeActionKind.SourceOrganizeImports)),\n kbOpts: {\n kbExpr: EditorContextKeys.editorTextFocus,\n primary: 1024 /* Shift */ | 512 /* Alt */ | 45 /* KEY_O */,\n weight: 100 /* EditorContrib */\n }\n }) || this;\n }\n OrganizeImportsAction.prototype.run = function (_accessor, editor) {\n return showCodeActionsForEditorSelection(editor, nls.localize('editor.action.organize.noneMessage', \"No organize imports action available\"), { kind: CodeActionKind.SourceOrganizeImports, includeSourceActions: true }, CodeActionAutoApply.IfSingle);\n };\n OrganizeImportsAction.Id = 'editor.action.organizeImports';\n return OrganizeImportsAction;\n}(EditorAction));\nexport { OrganizeImportsAction };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { registerEditorAction, registerEditorCommand, registerEditorContribution } from '../../browser/editorExtensions';\nimport { CodeActionCommand, OrganizeImportsAction, QuickFixAction, QuickFixController, RefactorAction, SourceAction } from './codeActionCommands';\nregisterEditorContribution(QuickFixController);\nregisterEditorAction(QuickFixAction);\nregisterEditorAction(RefactorAction);\nregisterEditorAction(SourceAction);\nregisterEditorAction(OrganizeImportsAction);\nregisterEditorCommand(new CodeActionCommand());\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __param = (this && this.__param) || function (paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n};\nimport * as nls from '../../../nls';\nimport { TPromise } from '../../../base/common/winjs.base';\nimport { IContextKeyService, ContextKeyExpr } from '../../../platform/contextkey/common/contextkey';\nimport { KeybindingsRegistry } from '../../../platform/keybinding/common/keybindingsRegistry';\nimport { Position } from '../../common/core/position';\nimport { registerEditorAction, EditorAction, registerEditorContribution, registerDefaultLanguageCommand } from '../../browser/editorExtensions';\nimport { ReferenceProviderRegistry } from '../../common/modes';\nimport { Range } from '../../common/core/range';\nimport { PeekContext, getOuterEditor } from './peekViewWidget';\nimport { ReferencesController, ctxReferenceSearchVisible } from './referencesController';\nimport { ReferencesModel, OneReference } from './referencesModel';\nimport { asWinJsPromise, createCancelablePromise } from '../../../base/common/async';\nimport { onUnexpectedExternalError } from '../../../base/common/errors';\nimport { EditorContextKeys } from '../../common/editorContextKeys';\nimport { EmbeddedCodeEditorWidget } from '../../browser/widget/embeddedCodeEditorWidget';\nimport { isCodeEditor } from '../../browser/editorBrowser';\nimport { IListService } from '../../../platform/list/browser/listService';\nimport { ctxReferenceWidgetSearchTreeFocused } from './referencesWidget';\nimport { CommandsRegistry } from '../../../platform/commands/common/commands';\nimport URI from '../../../base/common/uri';\nimport { ICodeEditorService } from '../../browser/services/codeEditorService';\nimport { CancellationToken } from '../../../base/common/cancellation';\nexport var defaultReferenceSearchOptions = {\n getMetaTitle: function (model) {\n return model.references.length > 1 && nls.localize('meta.titleReference', \" – {0} references\", model.references.length);\n }\n};\nvar ReferenceController = /** @class */ (function () {\n function ReferenceController(editor, contextKeyService) {\n if (editor instanceof EmbeddedCodeEditorWidget) {\n PeekContext.inPeekEditor.bindTo(contextKeyService);\n }\n }\n ReferenceController.prototype.dispose = function () {\n };\n ReferenceController.prototype.getId = function () {\n return ReferenceController.ID;\n };\n ReferenceController.ID = 'editor.contrib.referenceController';\n ReferenceController = __decorate([\n __param(1, IContextKeyService)\n ], ReferenceController);\n return ReferenceController;\n}());\nexport { ReferenceController };\nvar ReferenceAction = /** @class */ (function (_super) {\n __extends(ReferenceAction, _super);\n function ReferenceAction() {\n return _super.call(this, {\n id: 'editor.action.referenceSearch.trigger',\n label: nls.localize('references.action.label', \"Find All References\"),\n alias: 'Find All References',\n precondition: ContextKeyExpr.and(EditorContextKeys.hasReferenceProvider, PeekContext.notInPeekEditor, EditorContextKeys.isInEmbeddedEditor.toNegated()),\n kbOpts: {\n kbExpr: EditorContextKeys.editorTextFocus,\n primary: 1024 /* Shift */ | 70 /* F12 */,\n weight: 100 /* EditorContrib */\n },\n menuOpts: {\n group: 'navigation',\n order: 1.5\n }\n }) || this;\n }\n ReferenceAction.prototype.run = function (accessor, editor) {\n var controller = ReferencesController.get(editor);\n if (!controller) {\n return;\n }\n var range = editor.getSelection();\n var model = editor.getModel();\n var references = createCancelablePromise(function (token) { return provideReferences(model, range.getStartPosition(), token).then(function (references) { return new ReferencesModel(references); }); });\n controller.toggleWidget(range, references, defaultReferenceSearchOptions);\n };\n return ReferenceAction;\n}(EditorAction));\nexport { ReferenceAction };\nregisterEditorContribution(ReferenceController);\nregisterEditorAction(ReferenceAction);\nvar findReferencesCommand = function (accessor, resource, position) {\n if (!(resource instanceof URI)) {\n throw new Error('illegal argument, uri');\n }\n if (!position) {\n throw new Error('illegal argument, position');\n }\n var codeEditorService = accessor.get(ICodeEditorService);\n return codeEditorService.openCodeEditor({ resource: resource }, codeEditorService.getFocusedCodeEditor()).then(function (control) {\n if (!isCodeEditor(control)) {\n return undefined;\n }\n var controller = ReferencesController.get(control);\n if (!controller) {\n return undefined;\n }\n var references = createCancelablePromise(function (token) { return provideReferences(control.getModel(), Position.lift(position), token).then(function (references) { return new ReferencesModel(references); }); });\n var range = new Range(position.lineNumber, position.column, position.lineNumber, position.column);\n return TPromise.as(controller.toggleWidget(range, references, defaultReferenceSearchOptions));\n });\n};\nvar showReferencesCommand = function (accessor, resource, position, references) {\n if (!(resource instanceof URI)) {\n throw new Error('illegal argument, uri expected');\n }\n var codeEditorService = accessor.get(ICodeEditorService);\n return codeEditorService.openCodeEditor({ resource: resource }, codeEditorService.getFocusedCodeEditor()).then(function (control) {\n if (!isCodeEditor(control)) {\n return undefined;\n }\n var controller = ReferencesController.get(control);\n if (!controller) {\n return undefined;\n }\n return TPromise.as(controller.toggleWidget(new Range(position.lineNumber, position.column, position.lineNumber, position.column), createCancelablePromise(function (_) { return Promise.resolve(new ReferencesModel(references)); }), defaultReferenceSearchOptions)).then(function () { return true; });\n });\n};\n// register commands\nCommandsRegistry.registerCommand({\n id: 'editor.action.findReferences',\n handler: findReferencesCommand\n});\nCommandsRegistry.registerCommand({\n id: 'editor.action.showReferences',\n handler: showReferencesCommand,\n description: {\n description: 'Show references at a position in a file',\n args: [\n { name: 'uri', description: 'The text document in which to show references', constraint: URI },\n { name: 'position', description: 'The position at which to show', constraint: Position.isIPosition },\n { name: 'locations', description: 'An array of locations.', constraint: Array },\n ]\n }\n});\nfunction closeActiveReferenceSearch(accessor, args) {\n withController(accessor, function (controller) { return controller.closeWidget(); });\n}\nfunction openReferenceToSide(accessor, args) {\n var listService = accessor.get(IListService);\n var focus = listService.lastFocusedList && listService.lastFocusedList.getFocus();\n if (focus instanceof OneReference) {\n withController(accessor, function (controller) { return controller.openReference(focus, true); });\n }\n}\nfunction withController(accessor, fn) {\n var outerEditor = getOuterEditor(accessor);\n if (!outerEditor) {\n return;\n }\n var controller = ReferencesController.get(outerEditor);\n if (!controller) {\n return;\n }\n fn(controller);\n}\nKeybindingsRegistry.registerCommandAndKeybindingRule({\n id: 'goToNextReference',\n weight: 200 /* WorkbenchContrib */ + 50,\n primary: 62 /* F4 */,\n when: ctxReferenceSearchVisible,\n handler: function (accessor) {\n withController(accessor, function (controller) {\n controller.goToNextOrPreviousReference(true);\n });\n }\n});\nKeybindingsRegistry.registerCommandAndKeybindingRule({\n id: 'goToNextReferenceFromEmbeddedEditor',\n weight: 100 /* EditorContrib */ + 50,\n primary: 62 /* F4 */,\n when: PeekContext.inPeekEditor,\n handler: function (accessor) {\n withController(accessor, function (controller) {\n controller.goToNextOrPreviousReference(true);\n });\n }\n});\nKeybindingsRegistry.registerCommandAndKeybindingRule({\n id: 'goToPreviousReference',\n weight: 200 /* WorkbenchContrib */ + 50,\n primary: 1024 /* Shift */ | 62 /* F4 */,\n when: ctxReferenceSearchVisible,\n handler: function (accessor) {\n withController(accessor, function (controller) {\n controller.goToNextOrPreviousReference(false);\n });\n }\n});\nKeybindingsRegistry.registerCommandAndKeybindingRule({\n id: 'goToPreviousReferenceFromEmbeddedEditor',\n weight: 100 /* EditorContrib */ + 50,\n primary: 1024 /* Shift */ | 62 /* F4 */,\n when: PeekContext.inPeekEditor,\n handler: function (accessor) {\n withController(accessor, function (controller) {\n controller.goToNextOrPreviousReference(false);\n });\n }\n});\nKeybindingsRegistry.registerCommandAndKeybindingRule({\n id: 'closeReferenceSearch',\n weight: 200 /* WorkbenchContrib */ + 50,\n primary: 9 /* Escape */,\n secondary: [1024 /* Shift */ | 9 /* Escape */],\n when: ContextKeyExpr.and(ctxReferenceSearchVisible, ContextKeyExpr.not('config.editor.stablePeek')),\n handler: closeActiveReferenceSearch\n});\nKeybindingsRegistry.registerCommandAndKeybindingRule({\n id: 'closeReferenceSearchEditor',\n weight: 100 /* EditorContrib */ - 101,\n primary: 9 /* Escape */,\n secondary: [1024 /* Shift */ | 9 /* Escape */],\n when: ContextKeyExpr.and(PeekContext.inPeekEditor, ContextKeyExpr.not('config.editor.stablePeek')),\n handler: closeActiveReferenceSearch\n});\nKeybindingsRegistry.registerCommandAndKeybindingRule({\n id: 'openReferenceToSide',\n weight: 100 /* EditorContrib */,\n primary: 2048 /* CtrlCmd */ | 3 /* Enter */,\n mac: {\n primary: 256 /* WinCtrl */ | 3 /* Enter */\n },\n when: ContextKeyExpr.and(ctxReferenceSearchVisible, ctxReferenceWidgetSearchTreeFocused),\n handler: openReferenceToSide\n});\nexport function provideReferences(model, position, token) {\n // collect references from all providers\n var promises = ReferenceProviderRegistry.ordered(model).map(function (provider) {\n return asWinJsPromise(function (token) {\n return provider.provideReferences(model, position, { includeDeclaration: true }, token);\n }).then(function (result) {\n if (Array.isArray(result)) {\n return result;\n }\n return undefined;\n }, function (err) {\n onUnexpectedExternalError(err);\n });\n });\n return Promise.all(promises).then(function (references) {\n var result = [];\n for (var _i = 0, references_1 = references; _i < references_1.length; _i++) {\n var ref = references_1[_i];\n if (ref) {\n result.push.apply(result, ref);\n }\n }\n return result;\n });\n}\nregisterDefaultLanguageCommand('_executeReferenceProvider', function (model, position) { return provideReferences(model, position, CancellationToken.None); });\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __param = (this && this.__param) || function (paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n};\nimport './renameInputField.css';\nimport { localize } from '../../../nls';\nimport { dispose } from '../../../base/common/lifecycle';\nimport { TPromise } from '../../../base/common/winjs.base';\nimport { Range } from '../../common/core/range';\nimport { ContentWidgetPositionPreference } from '../../browser/editorBrowser';\nimport { IThemeService } from '../../../platform/theme/common/themeService';\nimport { inputBackground, inputBorder, inputForeground, widgetShadow } from '../../../platform/theme/common/colorRegistry';\nimport { Position } from '../../common/core/position';\nvar RenameInputField = /** @class */ (function () {\n function RenameInputField(editor, themeService) {\n var _this = this;\n this.themeService = themeService;\n this._disposables = [];\n // Editor.IContentWidget.allowEditorOverflow\n this.allowEditorOverflow = true;\n this._currentAcceptInput = null;\n this._currentCancelInput = null;\n this._editor = editor;\n this._editor.addContentWidget(this);\n this._disposables.push(editor.onDidChangeConfiguration(function (e) {\n if (e.fontInfo) {\n _this.updateFont();\n }\n }));\n this._disposables.push(themeService.onThemeChange(function (theme) { return _this.onThemeChange(theme); }));\n }\n RenameInputField.prototype.onThemeChange = function (theme) {\n this.updateStyles(theme);\n };\n RenameInputField.prototype.dispose = function () {\n this._disposables = dispose(this._disposables);\n this._editor.removeContentWidget(this);\n };\n RenameInputField.prototype.getId = function () {\n return '__renameInputWidget';\n };\n RenameInputField.prototype.getDomNode = function () {\n if (!this._domNode) {\n this._inputField = document.createElement('input');\n this._inputField.className = 'rename-input';\n this._inputField.type = 'text';\n this._inputField.setAttribute('aria-label', localize('renameAriaLabel', \"Rename input. Type new name and press Enter to commit.\"));\n this._domNode = document.createElement('div');\n this._domNode.style.height = this._editor.getConfiguration().lineHeight + \"px\";\n this._domNode.className = 'monaco-editor rename-box';\n this._domNode.appendChild(this._inputField);\n this.updateFont();\n this.updateStyles(this.themeService.getTheme());\n }\n return this._domNode;\n };\n RenameInputField.prototype.updateStyles = function (theme) {\n if (!this._inputField) {\n return;\n }\n var background = theme.getColor(inputBackground);\n var foreground = theme.getColor(inputForeground);\n var widgetShadowColor = theme.getColor(widgetShadow);\n var border = theme.getColor(inputBorder);\n this._inputField.style.backgroundColor = background ? background.toString() : null;\n this._inputField.style.color = foreground ? foreground.toString() : null;\n this._inputField.style.borderWidth = border ? '1px' : '0px';\n this._inputField.style.borderStyle = border ? 'solid' : 'none';\n this._inputField.style.borderColor = border ? border.toString() : 'none';\n this._domNode.style.boxShadow = widgetShadowColor ? \" 0 2px 8px \" + widgetShadowColor : null;\n };\n RenameInputField.prototype.updateFont = function () {\n if (!this._inputField) {\n return;\n }\n var fontInfo = this._editor.getConfiguration().fontInfo;\n this._inputField.style.fontFamily = fontInfo.fontFamily;\n this._inputField.style.fontWeight = fontInfo.fontWeight;\n this._inputField.style.fontSize = fontInfo.fontSize + \"px\";\n };\n RenameInputField.prototype.getPosition = function () {\n return this._visible\n ? { position: this._position, preference: [ContentWidgetPositionPreference.BELOW, ContentWidgetPositionPreference.ABOVE] }\n : null;\n };\n RenameInputField.prototype.acceptInput = function () {\n if (this._currentAcceptInput) {\n this._currentAcceptInput();\n }\n };\n RenameInputField.prototype.cancelInput = function (focusEditor) {\n if (this._currentCancelInput) {\n this._currentCancelInput(focusEditor);\n }\n };\n RenameInputField.prototype.getInput = function (where, value, selectionStart, selectionEnd) {\n var _this = this;\n this._position = new Position(where.startLineNumber, where.startColumn);\n this._inputField.value = value;\n this._inputField.setAttribute('selectionStart', selectionStart.toString());\n this._inputField.setAttribute('selectionEnd', selectionEnd.toString());\n this._inputField.size = Math.max((where.endColumn - where.startColumn) * 1.1, 20);\n var disposeOnDone = [], always;\n always = function () {\n dispose(disposeOnDone);\n _this._hide();\n };\n return new TPromise(function (resolve) {\n _this._currentCancelInput = function (focusEditor) {\n _this._currentAcceptInput = null;\n _this._currentCancelInput = null;\n resolve(focusEditor);\n return true;\n };\n _this._currentAcceptInput = function () {\n if (_this._inputField.value.trim().length === 0 || _this._inputField.value === value) {\n // empty or whitespace only or not changed\n _this.cancelInput(true);\n return;\n }\n _this._currentAcceptInput = null;\n _this._currentCancelInput = null;\n resolve(_this._inputField.value);\n };\n var onCursorChanged = function () {\n if (!Range.containsPosition(where, _this._editor.getPosition())) {\n _this.cancelInput(true);\n }\n };\n disposeOnDone.push(_this._editor.onDidChangeCursorSelection(onCursorChanged));\n disposeOnDone.push(_this._editor.onDidBlurEditorWidget(function () { return _this.cancelInput(false); }));\n _this._show();\n }, function () {\n _this._currentCancelInput(true);\n }).then(function (newValue) {\n always();\n return newValue;\n }, function (err) {\n always();\n return TPromise.wrapError(err);\n });\n };\n RenameInputField.prototype._show = function () {\n var _this = this;\n this._editor.revealLineInCenterIfOutsideViewport(this._position.lineNumber, 0 /* Smooth */);\n this._visible = true;\n this._editor.layoutContentWidget(this);\n setTimeout(function () {\n _this._inputField.focus();\n _this._inputField.setSelectionRange(parseInt(_this._inputField.getAttribute('selectionStart')), parseInt(_this._inputField.getAttribute('selectionEnd')));\n }, 100);\n };\n RenameInputField.prototype._hide = function () {\n this._visible = false;\n this._editor.layoutContentWidget(this);\n };\n RenameInputField = __decorate([\n __param(1, IThemeService)\n ], RenameInputField);\n return RenameInputField;\n}());\nexport default RenameInputField;\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __param = (this && this.__param) || function (paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nimport * as nls from '../../../nls';\nimport { illegalArgument, onUnexpectedError } from '../../../base/common/errors';\nimport { TPromise } from '../../../base/common/winjs.base';\nimport { RawContextKey, IContextKeyService, ContextKeyExpr } from '../../../platform/contextkey/common/contextkey';\nimport { IProgressService } from '../../../platform/progress/common/progress';\nimport { registerEditorAction, registerEditorContribution, EditorAction, EditorCommand, registerEditorCommand, registerDefaultLanguageCommand } from '../../browser/editorExtensions';\nimport { EditorContextKeys } from '../../common/editorContextKeys';\nimport RenameInputField from './renameInputField';\nimport { IThemeService } from '../../../platform/theme/common/themeService';\nimport { asWinJsPromise } from '../../../base/common/async';\nimport { RenameProviderRegistry } from '../../common/modes';\nimport { Position } from '../../common/core/position';\nimport { alert } from '../../../base/browser/ui/aria/aria';\nimport { Range } from '../../common/core/range';\nimport { MessageController } from '../message/messageController';\nimport { EditorState } from '../../browser/core/editorState';\nimport { INotificationService } from '../../../platform/notification/common/notification';\nimport { IBulkEditService } from '../../browser/services/bulkEditService';\nimport URI from '../../../base/common/uri';\nimport { ICodeEditorService } from '../../browser/services/codeEditorService';\nvar RenameSkeleton = /** @class */ (function () {\n function RenameSkeleton(model, position) {\n this.model = model;\n this.position = position;\n this._provider = RenameProviderRegistry.ordered(model);\n }\n RenameSkeleton.prototype.hasProvider = function () {\n return this._provider.length > 0;\n };\n RenameSkeleton.prototype.resolveRenameLocation = function () {\n return __awaiter(this, void 0, void 0, function () {\n var provider, res, word;\n var _this = this;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n provider = this._provider[0];\n if (!provider.resolveRenameLocation) return [3 /*break*/, 2];\n return [4 /*yield*/, asWinJsPromise(function (token) { return provider.resolveRenameLocation(_this.model, _this.position, token); })];\n case 1:\n res = _a.sent();\n _a.label = 2;\n case 2:\n if (!res) {\n word = this.model.getWordAtPosition(this.position);\n if (word) {\n res = {\n range: new Range(this.position.lineNumber, word.startColumn, this.position.lineNumber, word.endColumn),\n text: word.word\n };\n }\n }\n return [2 /*return*/, res];\n }\n });\n });\n };\n RenameSkeleton.prototype.provideRenameEdits = function (newName, i, rejects, position) {\n if (i === void 0) { i = 0; }\n if (rejects === void 0) { rejects = []; }\n if (position === void 0) { position = this.position; }\n return __awaiter(this, void 0, void 0, function () {\n var provider, result;\n var _this = this;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n if (i >= this._provider.length) {\n return [2 /*return*/, {\n edits: undefined,\n rejectReason: rejects.join('\\n')\n }];\n }\n provider = this._provider[i];\n return [4 /*yield*/, asWinJsPromise(function (token) { return provider.provideRenameEdits(_this.model, _this.position, newName, token); })];\n case 1:\n result = _a.sent();\n if (!result) {\n return [2 /*return*/, this.provideRenameEdits(newName, i + 1, rejects.concat(nls.localize('no result', \"No result.\")))];\n }\n else if (result.rejectReason) {\n return [2 /*return*/, this.provideRenameEdits(newName, i + 1, rejects.concat(result.rejectReason))];\n }\n return [2 /*return*/, result];\n }\n });\n });\n };\n return RenameSkeleton;\n}());\nexport function rename(model, position, newName) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, new RenameSkeleton(model, position).provideRenameEdits(newName)];\n });\n });\n}\n// --- register actions and commands\nvar CONTEXT_RENAME_INPUT_VISIBLE = new RawContextKey('renameInputVisible', false);\nvar RenameController = /** @class */ (function () {\n function RenameController(editor, _notificationService, _bulkEditService, _progressService, contextKeyService, themeService) {\n this.editor = editor;\n this._notificationService = _notificationService;\n this._bulkEditService = _bulkEditService;\n this._progressService = _progressService;\n this._renameInputField = new RenameInputField(editor, themeService);\n this._renameInputVisible = CONTEXT_RENAME_INPUT_VISIBLE.bindTo(contextKeyService);\n }\n RenameController.get = function (editor) {\n return editor.getContribution(RenameController.ID);\n };\n RenameController.prototype.dispose = function () {\n this._renameInputField.dispose();\n };\n RenameController.prototype.getId = function () {\n return RenameController.ID;\n };\n RenameController.prototype.run = function () {\n return __awaiter(this, void 0, void 0, function () {\n var position, skeleton, loc, e_1, selection, selectionStart, selectionEnd;\n var _this = this;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n position = this.editor.getPosition();\n skeleton = new RenameSkeleton(this.editor.getModel(), position);\n if (!skeleton.hasProvider()) {\n return [2 /*return*/, undefined];\n }\n _a.label = 1;\n case 1:\n _a.trys.push([1, 3, , 4]);\n return [4 /*yield*/, skeleton.resolveRenameLocation()];\n case 2:\n loc = _a.sent();\n return [3 /*break*/, 4];\n case 3:\n e_1 = _a.sent();\n MessageController.get(this.editor).showMessage(e_1, position);\n return [2 /*return*/, undefined];\n case 4:\n if (!loc) {\n return [2 /*return*/, undefined];\n }\n selection = this.editor.getSelection();\n selectionStart = 0;\n selectionEnd = loc.text.length;\n if (!Range.isEmpty(selection) && !Range.spansMultipleLines(selection) && Range.containsRange(loc.range, selection)) {\n selectionStart = Math.max(0, selection.startColumn - loc.range.startColumn);\n selectionEnd = Math.min(loc.range.endColumn, selection.endColumn) - loc.range.startColumn;\n }\n this._renameInputVisible.set(true);\n return [2 /*return*/, this._renameInputField.getInput(loc.range, loc.text, selectionStart, selectionEnd).then(function (newNameOrFocusFlag) {\n _this._renameInputVisible.reset();\n if (typeof newNameOrFocusFlag === 'boolean') {\n if (newNameOrFocusFlag) {\n _this.editor.focus();\n }\n return undefined;\n }\n _this.editor.focus();\n var state = new EditorState(_this.editor, 4 /* Position */ | 1 /* Value */ | 2 /* Selection */ | 8 /* Scroll */);\n var renameOperation = TPromise.wrap(skeleton.provideRenameEdits(newNameOrFocusFlag, 0, [], Range.lift(loc.range).getStartPosition()).then(function (result) {\n if (result.rejectReason) {\n if (state.validate(_this.editor)) {\n MessageController.get(_this.editor).showMessage(result.rejectReason, _this.editor.getPosition());\n }\n else {\n _this._notificationService.info(result.rejectReason);\n }\n return undefined;\n }\n return _this._bulkEditService.apply(result, { editor: _this.editor }).then(function (result) {\n // alert\n if (result.ariaSummary) {\n alert(nls.localize('aria', \"Successfully renamed '{0}' to '{1}'. Summary: {2}\", loc.text, newNameOrFocusFlag, result.ariaSummary));\n }\n });\n }, function (err) {\n _this._notificationService.error(nls.localize('rename.failed', \"Rename failed to execute.\"));\n return TPromise.wrapError(err);\n }));\n _this._progressService.showWhile(renameOperation, 250);\n return renameOperation;\n }, function (err) {\n _this._renameInputVisible.reset();\n return TPromise.wrapError(err);\n })];\n }\n });\n });\n };\n RenameController.prototype.acceptRenameInput = function () {\n this._renameInputField.acceptInput();\n };\n RenameController.prototype.cancelRenameInput = function () {\n this._renameInputField.cancelInput(true);\n };\n RenameController.ID = 'editor.contrib.renameController';\n RenameController = __decorate([\n __param(1, INotificationService),\n __param(2, IBulkEditService),\n __param(3, IProgressService),\n __param(4, IContextKeyService),\n __param(5, IThemeService)\n ], RenameController);\n return RenameController;\n}());\n// ---- action implementation\nvar RenameAction = /** @class */ (function (_super) {\n __extends(RenameAction, _super);\n function RenameAction() {\n return _super.call(this, {\n id: 'editor.action.rename',\n label: nls.localize('rename.label', \"Rename Symbol\"),\n alias: 'Rename Symbol',\n precondition: ContextKeyExpr.and(EditorContextKeys.writable, EditorContextKeys.hasRenameProvider),\n kbOpts: {\n kbExpr: EditorContextKeys.editorTextFocus,\n primary: 60 /* F2 */,\n weight: 100 /* EditorContrib */\n },\n menuOpts: {\n group: '1_modification',\n order: 1.1\n }\n }) || this;\n }\n RenameAction.prototype.runCommand = function (accessor, args) {\n var _this = this;\n var editorService = accessor.get(ICodeEditorService);\n var _a = args || [undefined, undefined], uri = _a[0], pos = _a[1];\n if (URI.isUri(uri) && Position.isIPosition(pos)) {\n return editorService.openCodeEditor({ resource: uri }, editorService.getActiveCodeEditor()).then(function (editor) {\n editor.setPosition(pos);\n editor.invokeWithinContext(function (accessor) {\n _this.reportTelemetry(accessor, editor);\n return _this.run(accessor, editor);\n });\n }, onUnexpectedError);\n }\n return _super.prototype.runCommand.call(this, accessor, args);\n };\n RenameAction.prototype.run = function (accessor, editor) {\n var controller = RenameController.get(editor);\n if (controller) {\n return TPromise.wrap(controller.run());\n }\n return undefined;\n };\n return RenameAction;\n}(EditorAction));\nexport { RenameAction };\nregisterEditorContribution(RenameController);\nregisterEditorAction(RenameAction);\nvar RenameCommand = EditorCommand.bindToContribution(RenameController.get);\nregisterEditorCommand(new RenameCommand({\n id: 'acceptRenameInput',\n precondition: CONTEXT_RENAME_INPUT_VISIBLE,\n handler: function (x) { return x.acceptRenameInput(); },\n kbOpts: {\n weight: 100 /* EditorContrib */ + 99,\n kbExpr: EditorContextKeys.focus,\n primary: 3 /* Enter */\n }\n}));\nregisterEditorCommand(new RenameCommand({\n id: 'cancelRenameInput',\n precondition: CONTEXT_RENAME_INPUT_VISIBLE,\n handler: function (x) { return x.cancelRenameInput(); },\n kbOpts: {\n weight: 100 /* EditorContrib */ + 99,\n kbExpr: EditorContextKeys.focus,\n primary: 9 /* Escape */,\n secondary: [1024 /* Shift */ | 9 /* Escape */]\n }\n}));\n// ---- api bridge command\nregisterDefaultLanguageCommand('_executeDocumentRenameProvider', function (model, position, args) {\n var newName = args.newName;\n if (typeof newName !== 'string') {\n throw illegalArgument('newName');\n }\n return rename(model, position, newName);\n});\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { Range } from '../../common/core/range';\nimport { ignoreBracketsInToken } from '../../common/modes/supports';\nimport { BracketsUtils } from '../../common/modes/supports/richEditBrackets';\nimport { LanguageConfigurationRegistry } from '../../common/modes/languageConfigurationRegistry';\nvar Node = /** @class */ (function () {\n function Node() {\n }\n Object.defineProperty(Node.prototype, \"range\", {\n get: function () {\n return new Range(this.start.lineNumber, this.start.column, this.end.lineNumber, this.end.column);\n },\n enumerable: true,\n configurable: true\n });\n return Node;\n}());\nexport { Node };\nvar NodeList = /** @class */ (function (_super) {\n __extends(NodeList, _super);\n function NodeList() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Object.defineProperty(NodeList.prototype, \"hasChildren\", {\n get: function () {\n return this.children && this.children.length > 0;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(NodeList.prototype, \"isEmpty\", {\n get: function () {\n return !this.hasChildren && !this.parent;\n },\n enumerable: true,\n configurable: true\n });\n NodeList.prototype.append = function (node) {\n if (!node) {\n return false;\n }\n node.parent = this;\n if (!this.children) {\n this.children = [];\n }\n if (node instanceof NodeList) {\n if (node.children) {\n this.children.push.apply(this.children, node.children);\n }\n }\n else {\n this.children.push(node);\n }\n return true;\n };\n return NodeList;\n}(Node));\nexport { NodeList };\nvar Block = /** @class */ (function (_super) {\n __extends(Block, _super);\n function Block() {\n var _this = _super.call(this) || this;\n _this.elements = new NodeList();\n _this.elements.parent = _this;\n return _this;\n }\n return Block;\n}(Node));\nexport { Block };\nvar Token = /** @class */ (function () {\n function Token(range, bracket, bracketType) {\n this.range = range;\n this.bracket = bracket;\n this.bracketType = bracketType;\n }\n return Token;\n}());\nfunction newNode(token) {\n var node = new Node();\n node.start = token.range.getStartPosition();\n node.end = token.range.getEndPosition();\n return node;\n}\nvar RawToken = /** @class */ (function () {\n function RawToken(source, tokenIndex, lineNumber) {\n this.lineNumber = lineNumber;\n this.lineText = source.getLineContent();\n this.startOffset = source.getStartOffset(tokenIndex);\n this.endOffset = source.getEndOffset(tokenIndex);\n this.type = source.getStandardTokenType(tokenIndex);\n this.languageId = source.getLanguageId(tokenIndex);\n }\n return RawToken;\n}());\nvar ModelRawTokenScanner = /** @class */ (function () {\n function ModelRawTokenScanner(model) {\n this._model = model;\n this._lineCount = this._model.getLineCount();\n this._versionId = this._model.getVersionId();\n this._lineNumber = 0;\n this._tokenIndex = 0;\n this._lineTokens = null;\n this._advance();\n }\n ModelRawTokenScanner.prototype._advance = function () {\n if (this._lineTokens) {\n this._tokenIndex++;\n if (this._tokenIndex >= this._lineTokens.getCount()) {\n this._lineTokens = null;\n }\n }\n while (this._lineNumber < this._lineCount && !this._lineTokens) {\n this._lineNumber++;\n this._model.forceTokenization(this._lineNumber);\n this._lineTokens = this._model.getLineTokens(this._lineNumber);\n this._tokenIndex = 0;\n if (this._lineTokens.getCount() === 0) {\n // Skip empty lines\n this._lineTokens = null;\n }\n }\n };\n ModelRawTokenScanner.prototype.next = function () {\n if (!this._lineTokens) {\n return null;\n }\n if (this._model.getVersionId() !== this._versionId) {\n return null;\n }\n var result = new RawToken(this._lineTokens, this._tokenIndex, this._lineNumber);\n this._advance();\n return result;\n };\n return ModelRawTokenScanner;\n}());\nvar TokenScanner = /** @class */ (function () {\n function TokenScanner(model) {\n this._rawTokenScanner = new ModelRawTokenScanner(model);\n this._nextBuff = [];\n this._cachedLanguageBrackets = null;\n this._cachedLanguageId = -1;\n }\n TokenScanner.prototype.next = function () {\n if (this._nextBuff.length > 0) {\n return this._nextBuff.shift();\n }\n var token = this._rawTokenScanner.next();\n if (!token) {\n return null;\n }\n var lineNumber = token.lineNumber;\n var lineText = token.lineText;\n var tokenType = token.type;\n var startOffset = token.startOffset;\n var endOffset = token.endOffset;\n if (this._cachedLanguageId !== token.languageId) {\n this._cachedLanguageId = token.languageId;\n this._cachedLanguageBrackets = LanguageConfigurationRegistry.getBracketsSupport(this._cachedLanguageId);\n }\n var modeBrackets = this._cachedLanguageBrackets;\n if (!modeBrackets || ignoreBracketsInToken(tokenType)) {\n return new Token(new Range(lineNumber, startOffset + 1, lineNumber, endOffset + 1), 0 /* None */, null);\n }\n var foundBracket;\n do {\n foundBracket = BracketsUtils.findNextBracketInToken(modeBrackets.forwardRegex, lineNumber, lineText, startOffset, endOffset);\n if (foundBracket) {\n var foundBracketStartOffset = foundBracket.startColumn - 1;\n var foundBracketEndOffset = foundBracket.endColumn - 1;\n if (startOffset < foundBracketStartOffset) {\n // there is some text before this bracket in this token\n this._nextBuff.push(new Token(new Range(lineNumber, startOffset + 1, lineNumber, foundBracketStartOffset + 1), 0 /* None */, null));\n }\n var bracketText = lineText.substring(foundBracketStartOffset, foundBracketEndOffset);\n bracketText = bracketText.toLowerCase();\n var bracketData = modeBrackets.textIsBracket[bracketText];\n var bracketIsOpen = modeBrackets.textIsOpenBracket[bracketText];\n this._nextBuff.push(new Token(new Range(lineNumber, foundBracketStartOffset + 1, lineNumber, foundBracketEndOffset + 1), bracketIsOpen ? 1 /* Open */ : -1 /* Close */, bracketData.languageIdentifier.language + \";\" + bracketData.open + \";\" + bracketData.close));\n startOffset = foundBracketEndOffset;\n }\n } while (foundBracket);\n if (startOffset < endOffset) {\n // there is some remaining none-bracket text in this token\n this._nextBuff.push(new Token(new Range(lineNumber, startOffset + 1, lineNumber, endOffset + 1), 0 /* None */, null));\n }\n return this._nextBuff.shift();\n };\n return TokenScanner;\n}());\nvar TokenTreeBuilder = /** @class */ (function () {\n function TokenTreeBuilder(model) {\n this._stack = [];\n this._scanner = new TokenScanner(model);\n }\n TokenTreeBuilder.prototype.build = function () {\n var node = new NodeList();\n while (node.append(this._line() || this._any())) {\n // accept all\n }\n return node;\n };\n TokenTreeBuilder.prototype._accept = function (condt) {\n var token = this._stack.pop() || this._scanner.next();\n if (!token) {\n return false;\n }\n var accepted = condt(token);\n if (!accepted) {\n this._stack.push(token);\n this._currentToken = null;\n }\n else {\n this._currentToken = token;\n //\t\t\tconsole.log('accepted: ' + token.__debugContent);\n }\n return accepted;\n };\n TokenTreeBuilder.prototype._peek = function (condt) {\n var ret = false;\n this._accept(function (info) {\n ret = condt(info);\n return false;\n });\n return ret;\n };\n TokenTreeBuilder.prototype._line = function () {\n var node = new NodeList();\n var lineNumber;\n // capture current linenumber\n this._peek(function (info) {\n lineNumber = info.range.startLineNumber;\n return false;\n });\n while (this._peek(function (info) { return info.range.startLineNumber === lineNumber; })\n && node.append(this._token() || this._block())) {\n // all children that started on this line\n }\n if (!node.children || node.children.length === 0) {\n return null;\n }\n else if (node.children.length === 1) {\n return node.children[0];\n }\n else {\n return node;\n }\n };\n TokenTreeBuilder.prototype._token = function () {\n if (!this._accept(function (token) { return token.bracket === 0 /* None */; })) {\n return null;\n }\n return newNode(this._currentToken);\n };\n TokenTreeBuilder.prototype._block = function () {\n var bracketType;\n var accepted;\n accepted = this._accept(function (token) {\n bracketType = token.bracketType;\n return token.bracket === 1 /* Open */;\n });\n if (!accepted) {\n return null;\n }\n var bracket = new Block();\n bracket.open = newNode(this._currentToken);\n while (bracket.elements.append(this._line())) {\n // inside brackets\n }\n if (!this._accept(function (token) { return token.bracket === -1 /* Close */ && token.bracketType === bracketType; })) {\n // missing closing bracket -> return just a node list\n var nodelist = new NodeList();\n nodelist.append(bracket.open);\n nodelist.append(bracket.elements);\n return nodelist;\n }\n bracket.close = newNode(this._currentToken);\n return bracket;\n };\n TokenTreeBuilder.prototype._any = function () {\n if (!this._accept(function (_) { return true; })) {\n return null;\n }\n return newNode(this._currentToken);\n };\n return TokenTreeBuilder;\n}());\n/**\n * Parses this grammar:\n *\tgrammer = { line }\n *\tline = { block | \"token\" }\n *\tblock = \"open_bracket\" { line } \"close_bracket\"\n */\nexport function build(model) {\n var node = new TokenTreeBuilder(model).build();\n return node;\n}\nexport function find(node, position) {\n if (node instanceof NodeList && node.isEmpty) {\n return null;\n }\n if (!Range.containsPosition(node.range, position)) {\n return null;\n }\n var result;\n if (node instanceof NodeList) {\n if (node.hasChildren) {\n for (var i = 0, len = node.children.length; i < len && !result; i++) {\n result = find(node.children[i], position);\n }\n }\n }\n else if (node instanceof Block) {\n result = find(node.open, position) || find(node.elements, position) || find(node.close, position);\n }\n return result || node;\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __param = (this && this.__param) || function (paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n};\nimport { TPromise } from '../../../base/common/winjs.base';\nimport { Range } from '../../common/core/range';\nimport { IModelService } from '../../common/services/modelService';\nimport { build, find } from './tokenTree';\nvar TokenSelectionSupport = /** @class */ (function () {\n function TokenSelectionSupport(modelService) {\n this._modelService = modelService;\n }\n TokenSelectionSupport.prototype.getRangesToPosition = function (resource, position) {\n return TPromise.as(this.getRangesToPositionSync(resource, position));\n };\n TokenSelectionSupport.prototype.getRangesToPositionSync = function (resource, position) {\n var model = this._modelService.getModel(resource);\n var entries = [];\n if (model) {\n this._doGetRangesToPosition(model, position).forEach(function (range) {\n entries.push({\n type: void 0,\n range: range\n });\n });\n }\n return entries;\n };\n TokenSelectionSupport.prototype._doGetRangesToPosition = function (model, position) {\n var tree = build(model);\n var node;\n var lastRange;\n node = find(tree, position);\n var ranges = [];\n while (node) {\n if (!lastRange || !Range.equalsRange(lastRange, node.range)) {\n ranges.push(node.range);\n }\n lastRange = node.range;\n node = node.parent;\n }\n ranges = ranges.reverse();\n return ranges;\n };\n TokenSelectionSupport = __decorate([\n __param(0, IModelService)\n ], TokenSelectionSupport);\n return TokenSelectionSupport;\n}());\nexport { TokenSelectionSupport };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __param = (this && this.__param) || function (paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n};\nimport * as nls from '../../../nls';\nimport * as arrays from '../../../base/common/arrays';\nimport { TPromise } from '../../../base/common/winjs.base';\nimport { IInstantiationService } from '../../../platform/instantiation/common/instantiation';\nimport { Range } from '../../common/core/range';\nimport { EditorContextKeys } from '../../common/editorContextKeys';\nimport { registerEditorAction, EditorAction, registerEditorContribution } from '../../browser/editorExtensions';\nimport { TokenSelectionSupport } from './tokenSelectionSupport';\nimport { MenuId } from '../../../platform/actions/common/actions';\n// --- selection state machine\nvar State = /** @class */ (function () {\n function State(editor) {\n this.editor = editor;\n this.next = null;\n this.previous = null;\n this.selection = editor.getSelection();\n }\n return State;\n}());\n// -- action implementation\nvar SmartSelectController = /** @class */ (function () {\n function SmartSelectController(editor, instantiationService) {\n this.editor = editor;\n this._tokenSelectionSupport = instantiationService.createInstance(TokenSelectionSupport);\n this._state = null;\n this._ignoreSelection = false;\n }\n SmartSelectController.get = function (editor) {\n return editor.getContribution(SmartSelectController.ID);\n };\n SmartSelectController.prototype.dispose = function () {\n };\n SmartSelectController.prototype.getId = function () {\n return SmartSelectController.ID;\n };\n SmartSelectController.prototype.run = function (forward) {\n var _this = this;\n var selection = this.editor.getSelection();\n var model = this.editor.getModel();\n // forget about current state\n if (this._state) {\n if (this._state.editor !== this.editor) {\n this._state = null;\n }\n }\n var promise = TPromise.as(null);\n if (!this._state) {\n promise = this._tokenSelectionSupport.getRangesToPosition(model.uri, selection.getStartPosition()).then(function (elements) {\n if (arrays.isFalsyOrEmpty(elements)) {\n return;\n }\n var lastState;\n elements.filter(function (element) {\n // filter ranges inside the selection\n var selection = _this.editor.getSelection();\n var range = new Range(element.range.startLineNumber, element.range.startColumn, element.range.endLineNumber, element.range.endColumn);\n return range.containsPosition(selection.getStartPosition()) && range.containsPosition(selection.getEndPosition());\n }).forEach(function (element) {\n // create ranges\n var range = element.range;\n var state = new State(_this.editor);\n state.selection = new Range(range.startLineNumber, range.startColumn, range.endLineNumber, range.endColumn);\n if (lastState) {\n state.next = lastState;\n lastState.previous = state;\n }\n lastState = state;\n });\n // insert current selection\n var editorState = new State(_this.editor);\n editorState.next = lastState;\n if (lastState) {\n lastState.previous = editorState;\n }\n _this._state = editorState;\n // listen to caret move and forget about state\n var unhook = _this.editor.onDidChangeCursorPosition(function (e) {\n if (_this._ignoreSelection) {\n return;\n }\n _this._state = null;\n unhook.dispose();\n });\n });\n }\n return promise.then(function () {\n if (!_this._state) {\n return;\n }\n _this._state = forward ? _this._state.next : _this._state.previous;\n if (!_this._state) {\n return;\n }\n _this._ignoreSelection = true;\n try {\n _this.editor.setSelection(_this._state.selection);\n }\n finally {\n _this._ignoreSelection = false;\n }\n return;\n });\n };\n SmartSelectController.ID = 'editor.contrib.smartSelectController';\n SmartSelectController = __decorate([\n __param(1, IInstantiationService)\n ], SmartSelectController);\n return SmartSelectController;\n}());\nvar AbstractSmartSelect = /** @class */ (function (_super) {\n __extends(AbstractSmartSelect, _super);\n function AbstractSmartSelect(forward, opts) {\n var _this = _super.call(this, opts) || this;\n _this._forward = forward;\n return _this;\n }\n AbstractSmartSelect.prototype.run = function (accessor, editor) {\n var controller = SmartSelectController.get(editor);\n if (controller) {\n return controller.run(this._forward);\n }\n return undefined;\n };\n return AbstractSmartSelect;\n}(EditorAction));\nvar GrowSelectionAction = /** @class */ (function (_super) {\n __extends(GrowSelectionAction, _super);\n function GrowSelectionAction() {\n return _super.call(this, true, {\n id: 'editor.action.smartSelect.grow',\n label: nls.localize('smartSelect.grow', \"Expand Select\"),\n alias: 'Expand Select',\n precondition: null,\n kbOpts: {\n kbExpr: EditorContextKeys.editorTextFocus,\n primary: 1024 /* Shift */ | 512 /* Alt */ | 17 /* RightArrow */,\n mac: { primary: 2048 /* CtrlCmd */ | 256 /* WinCtrl */ | 1024 /* Shift */ | 17 /* RightArrow */ },\n weight: 100 /* EditorContrib */\n },\n menubarOpts: {\n menuId: MenuId.MenubarSelectionMenu,\n group: '1_basic',\n title: nls.localize({ key: 'miSmartSelectGrow', comment: ['&& denotes a mnemonic'] }, \"&&Expand Selection\"),\n order: 2\n }\n }) || this;\n }\n return GrowSelectionAction;\n}(AbstractSmartSelect));\nvar ShrinkSelectionAction = /** @class */ (function (_super) {\n __extends(ShrinkSelectionAction, _super);\n function ShrinkSelectionAction() {\n return _super.call(this, false, {\n id: 'editor.action.smartSelect.shrink',\n label: nls.localize('smartSelect.shrink', \"Shrink Select\"),\n alias: 'Shrink Select',\n precondition: null,\n kbOpts: {\n kbExpr: EditorContextKeys.editorTextFocus,\n primary: 1024 /* Shift */ | 512 /* Alt */ | 15 /* LeftArrow */,\n mac: { primary: 2048 /* CtrlCmd */ | 256 /* WinCtrl */ | 1024 /* Shift */ | 15 /* LeftArrow */ },\n weight: 100 /* EditorContrib */\n },\n menubarOpts: {\n menuId: MenuId.MenubarSelectionMenu,\n group: '1_basic',\n title: nls.localize({ key: 'miSmartSelectShrink', comment: ['&& denotes a mnemonic'] }, \"&&Shrink Selection\"),\n order: 3\n }\n }) || this;\n }\n return ShrinkSelectionAction;\n}(AbstractSmartSelect));\nregisterEditorContribution(SmartSelectController);\nregisterEditorAction(GrowSelectionAction);\nregisterEditorAction(ShrinkSelectionAction);\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar _a;\nvar Scanner = /** @class */ (function () {\n function Scanner() {\n this.text('');\n }\n Scanner.isDigitCharacter = function (ch) {\n return ch >= 48 /* Digit0 */ && ch <= 57 /* Digit9 */;\n };\n Scanner.isVariableCharacter = function (ch) {\n return ch === 95 /* Underline */\n || (ch >= 97 /* a */ && ch <= 122 /* z */)\n || (ch >= 65 /* A */ && ch <= 90 /* Z */);\n };\n Scanner.prototype.text = function (value) {\n this.value = value;\n this.pos = 0;\n };\n Scanner.prototype.tokenText = function (token) {\n return this.value.substr(token.pos, token.len);\n };\n Scanner.prototype.next = function () {\n if (this.pos >= this.value.length) {\n return { type: 14 /* EOF */, pos: this.pos, len: 0 };\n }\n var pos = this.pos;\n var len = 0;\n var ch = this.value.charCodeAt(pos);\n var type;\n // static types\n type = Scanner._table[ch];\n if (typeof type === 'number') {\n this.pos += 1;\n return { type: type, pos: pos, len: 1 };\n }\n // number\n if (Scanner.isDigitCharacter(ch)) {\n type = 8 /* Int */;\n do {\n len += 1;\n ch = this.value.charCodeAt(pos + len);\n } while (Scanner.isDigitCharacter(ch));\n this.pos += len;\n return { type: type, pos: pos, len: len };\n }\n // variable name\n if (Scanner.isVariableCharacter(ch)) {\n type = 9 /* VariableName */;\n do {\n ch = this.value.charCodeAt(pos + (++len));\n } while (Scanner.isVariableCharacter(ch) || Scanner.isDigitCharacter(ch));\n this.pos += len;\n return { type: type, pos: pos, len: len };\n }\n // format\n type = 10 /* Format */;\n do {\n len += 1;\n ch = this.value.charCodeAt(pos + len);\n } while (!isNaN(ch)\n && typeof Scanner._table[ch] === 'undefined' // not static token\n && !Scanner.isDigitCharacter(ch) // not number\n && !Scanner.isVariableCharacter(ch) // not variable\n );\n this.pos += len;\n return { type: type, pos: pos, len: len };\n };\n Scanner._table = (_a = {},\n _a[36 /* DollarSign */] = 0 /* Dollar */,\n _a[58 /* Colon */] = 1 /* Colon */,\n _a[44 /* Comma */] = 2 /* Comma */,\n _a[123 /* OpenCurlyBrace */] = 3 /* CurlyOpen */,\n _a[125 /* CloseCurlyBrace */] = 4 /* CurlyClose */,\n _a[92 /* Backslash */] = 5 /* Backslash */,\n _a[47 /* Slash */] = 6 /* Forwardslash */,\n _a[124 /* Pipe */] = 7 /* Pipe */,\n _a[43 /* Plus */] = 11 /* Plus */,\n _a[45 /* Dash */] = 12 /* Dash */,\n _a[63 /* QuestionMark */] = 13 /* QuestionMark */,\n _a);\n return Scanner;\n}());\nexport { Scanner };\nvar Marker = /** @class */ (function () {\n function Marker() {\n this._children = [];\n }\n Marker.prototype.appendChild = function (child) {\n if (child instanceof Text && this._children[this._children.length - 1] instanceof Text) {\n // this and previous child are text -> merge them\n this._children[this._children.length - 1].value += child.value;\n }\n else {\n // normal adoption of child\n child.parent = this;\n this._children.push(child);\n }\n return this;\n };\n Marker.prototype.replace = function (child, others) {\n var parent = child.parent;\n var idx = parent.children.indexOf(child);\n var newChildren = parent.children.slice(0);\n newChildren.splice.apply(newChildren, [idx, 1].concat(others));\n parent._children = newChildren;\n others.forEach(function (node) { return node.parent = parent; });\n };\n Object.defineProperty(Marker.prototype, \"children\", {\n get: function () {\n return this._children;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Marker.prototype, \"snippet\", {\n get: function () {\n var candidate = this;\n while (true) {\n if (!candidate) {\n return undefined;\n }\n if (candidate instanceof TextmateSnippet) {\n return candidate;\n }\n candidate = candidate.parent;\n }\n },\n enumerable: true,\n configurable: true\n });\n Marker.prototype.toString = function () {\n return this.children.reduce(function (prev, cur) { return prev + cur.toString(); }, '');\n };\n Marker.prototype.len = function () {\n return 0;\n };\n return Marker;\n}());\nexport { Marker };\nvar Text = /** @class */ (function (_super) {\n __extends(Text, _super);\n function Text(value) {\n var _this_1 = _super.call(this) || this;\n _this_1.value = value;\n return _this_1;\n }\n Text.prototype.toString = function () {\n return this.value;\n };\n Text.prototype.len = function () {\n return this.value.length;\n };\n Text.prototype.clone = function () {\n return new Text(this.value);\n };\n return Text;\n}(Marker));\nexport { Text };\nvar TransformableMarker = /** @class */ (function (_super) {\n __extends(TransformableMarker, _super);\n function TransformableMarker() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return TransformableMarker;\n}(Marker));\nexport { TransformableMarker };\nvar Placeholder = /** @class */ (function (_super) {\n __extends(Placeholder, _super);\n function Placeholder(index) {\n var _this_1 = _super.call(this) || this;\n _this_1.index = index;\n return _this_1;\n }\n Placeholder.compareByIndex = function (a, b) {\n if (a.index === b.index) {\n return 0;\n }\n else if (a.isFinalTabstop) {\n return 1;\n }\n else if (b.isFinalTabstop) {\n return -1;\n }\n else if (a.index < b.index) {\n return -1;\n }\n else if (a.index > b.index) {\n return 1;\n }\n else {\n return 0;\n }\n };\n Object.defineProperty(Placeholder.prototype, \"isFinalTabstop\", {\n get: function () {\n return this.index === 0;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Placeholder.prototype, \"choice\", {\n get: function () {\n return this._children.length === 1 && this._children[0] instanceof Choice\n ? this._children[0]\n : undefined;\n },\n enumerable: true,\n configurable: true\n });\n Placeholder.prototype.clone = function () {\n var ret = new Placeholder(this.index);\n if (this.transform) {\n ret.transform = this.transform.clone();\n }\n ret._children = this.children.map(function (child) { return child.clone(); });\n return ret;\n };\n return Placeholder;\n}(TransformableMarker));\nexport { Placeholder };\nvar Choice = /** @class */ (function (_super) {\n __extends(Choice, _super);\n function Choice() {\n var _this_1 = _super !== null && _super.apply(this, arguments) || this;\n _this_1.options = [];\n return _this_1;\n }\n Choice.prototype.appendChild = function (marker) {\n if (marker instanceof Text) {\n marker.parent = this;\n this.options.push(marker);\n }\n return this;\n };\n Choice.prototype.toString = function () {\n return this.options[0].value;\n };\n Choice.prototype.len = function () {\n return this.options[0].len();\n };\n Choice.prototype.clone = function () {\n var ret = new Choice();\n this.options.forEach(ret.appendChild, ret);\n return ret;\n };\n return Choice;\n}(Marker));\nexport { Choice };\nvar Transform = /** @class */ (function (_super) {\n __extends(Transform, _super);\n function Transform() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Transform.prototype.resolve = function (value) {\n var _this = this;\n return value.replace(this.regexp, function () {\n var ret = '';\n for (var _i = 0, _a = _this._children; _i < _a.length; _i++) {\n var marker = _a[_i];\n if (marker instanceof FormatString) {\n var value_1 = arguments.length - 2 > marker.index ? arguments[marker.index] : '';\n value_1 = marker.resolve(value_1);\n ret += value_1;\n }\n else {\n ret += marker.toString();\n }\n }\n return ret;\n });\n };\n Transform.prototype.toString = function () {\n return '';\n };\n Transform.prototype.clone = function () {\n var ret = new Transform();\n ret.regexp = new RegExp(this.regexp.source, '' + (this.regexp.ignoreCase ? 'i' : '') + (this.regexp.global ? 'g' : ''));\n ret._children = this.children.map(function (child) { return child.clone(); });\n return ret;\n };\n return Transform;\n}(Marker));\nexport { Transform };\nvar FormatString = /** @class */ (function (_super) {\n __extends(FormatString, _super);\n function FormatString(index, shorthandName, ifValue, elseValue) {\n var _this_1 = _super.call(this) || this;\n _this_1.index = index;\n _this_1.shorthandName = shorthandName;\n _this_1.ifValue = ifValue;\n _this_1.elseValue = elseValue;\n return _this_1;\n }\n FormatString.prototype.resolve = function (value) {\n if (this.shorthandName === 'upcase') {\n return !value ? '' : value.toLocaleUpperCase();\n }\n else if (this.shorthandName === 'downcase') {\n return !value ? '' : value.toLocaleLowerCase();\n }\n else if (this.shorthandName === 'capitalize') {\n return !value ? '' : (value[0].toLocaleUpperCase() + value.substr(1));\n }\n else if (Boolean(value) && typeof this.ifValue === 'string') {\n return this.ifValue;\n }\n else if (!Boolean(value) && typeof this.elseValue === 'string') {\n return this.elseValue;\n }\n else {\n return value || '';\n }\n };\n FormatString.prototype.clone = function () {\n var ret = new FormatString(this.index, this.shorthandName, this.ifValue, this.elseValue);\n return ret;\n };\n return FormatString;\n}(Marker));\nexport { FormatString };\nvar Variable = /** @class */ (function (_super) {\n __extends(Variable, _super);\n function Variable(name) {\n var _this_1 = _super.call(this) || this;\n _this_1.name = name;\n return _this_1;\n }\n Variable.prototype.resolve = function (resolver) {\n var value = resolver.resolve(this);\n if (this.transform) {\n value = this.transform.resolve(value || '');\n }\n if (value !== undefined) {\n this._children = [new Text(value)];\n return true;\n }\n return false;\n };\n Variable.prototype.clone = function () {\n var ret = new Variable(this.name);\n if (this.transform) {\n ret.transform = this.transform.clone();\n }\n ret._children = this.children.map(function (child) { return child.clone(); });\n return ret;\n };\n return Variable;\n}(TransformableMarker));\nexport { Variable };\nfunction walk(marker, visitor) {\n var stack = marker.slice();\n while (stack.length > 0) {\n var marker_1 = stack.shift();\n var recurse = visitor(marker_1);\n if (!recurse) {\n break;\n }\n stack.unshift.apply(stack, marker_1.children);\n }\n}\nvar TextmateSnippet = /** @class */ (function (_super) {\n __extends(TextmateSnippet, _super);\n function TextmateSnippet() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Object.defineProperty(TextmateSnippet.prototype, \"placeholderInfo\", {\n get: function () {\n if (!this._placeholders) {\n // fill in placeholders\n var all_1 = [];\n var last_1;\n this.walk(function (candidate) {\n if (candidate instanceof Placeholder) {\n all_1.push(candidate);\n last_1 = !last_1 || last_1.index < candidate.index ? candidate : last_1;\n }\n return true;\n });\n this._placeholders = { all: all_1, last: last_1 };\n }\n return this._placeholders;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(TextmateSnippet.prototype, \"placeholders\", {\n get: function () {\n var all = this.placeholderInfo.all;\n return all;\n },\n enumerable: true,\n configurable: true\n });\n TextmateSnippet.prototype.offset = function (marker) {\n var pos = 0;\n var found = false;\n this.walk(function (candidate) {\n if (candidate === marker) {\n found = true;\n return false;\n }\n pos += candidate.len();\n return true;\n });\n if (!found) {\n return -1;\n }\n return pos;\n };\n TextmateSnippet.prototype.fullLen = function (marker) {\n var ret = 0;\n walk([marker], function (marker) {\n ret += marker.len();\n return true;\n });\n return ret;\n };\n TextmateSnippet.prototype.enclosingPlaceholders = function (placeholder) {\n var ret = [];\n var parent = placeholder.parent;\n while (parent) {\n if (parent instanceof Placeholder) {\n ret.push(parent);\n }\n parent = parent.parent;\n }\n return ret;\n };\n TextmateSnippet.prototype.resolveVariables = function (resolver) {\n var _this_1 = this;\n this.walk(function (candidate) {\n if (candidate instanceof Variable) {\n if (candidate.resolve(resolver)) {\n _this_1._placeholders = undefined;\n }\n }\n return true;\n });\n return this;\n };\n TextmateSnippet.prototype.appendChild = function (child) {\n this._placeholders = undefined;\n return _super.prototype.appendChild.call(this, child);\n };\n TextmateSnippet.prototype.replace = function (child, others) {\n this._placeholders = undefined;\n return _super.prototype.replace.call(this, child, others);\n };\n TextmateSnippet.prototype.clone = function () {\n var ret = new TextmateSnippet();\n this._children = this.children.map(function (child) { return child.clone(); });\n return ret;\n };\n TextmateSnippet.prototype.walk = function (visitor) {\n walk(this.children, visitor);\n };\n return TextmateSnippet;\n}(Marker));\nexport { TextmateSnippet };\nvar SnippetParser = /** @class */ (function () {\n function SnippetParser() {\n this._scanner = new Scanner();\n }\n SnippetParser.escape = function (value) {\n return value.replace(/\\$|}|\\\\/g, '\\\\$&');\n };\n SnippetParser.prototype.parse = function (value, insertFinalTabstop, enforceFinalTabstop) {\n this._scanner.text(value);\n this._token = this._scanner.next();\n var snippet = new TextmateSnippet();\n while (this._parse(snippet)) {\n // nothing\n }\n // fill in values for placeholders. the first placeholder of an index\n // that has a value defines the value for all placeholders with that index\n var placeholderDefaultValues = new Map();\n var incompletePlaceholders = [];\n var placeholderCount = 0;\n snippet.walk(function (marker) {\n if (marker instanceof Placeholder) {\n placeholderCount += 1;\n if (marker.isFinalTabstop) {\n placeholderDefaultValues.set(0, undefined);\n }\n else if (!placeholderDefaultValues.has(marker.index) && marker.children.length > 0) {\n placeholderDefaultValues.set(marker.index, marker.children);\n }\n else {\n incompletePlaceholders.push(marker);\n }\n }\n return true;\n });\n for (var _i = 0, incompletePlaceholders_1 = incompletePlaceholders; _i < incompletePlaceholders_1.length; _i++) {\n var placeholder = incompletePlaceholders_1[_i];\n if (placeholderDefaultValues.has(placeholder.index)) {\n var clone = new Placeholder(placeholder.index);\n clone.transform = placeholder.transform;\n for (var _a = 0, _b = placeholderDefaultValues.get(placeholder.index); _a < _b.length; _a++) {\n var child = _b[_a];\n clone.appendChild(child.clone());\n }\n snippet.replace(placeholder, [clone]);\n }\n }\n if (!enforceFinalTabstop) {\n enforceFinalTabstop = placeholderCount > 0 && insertFinalTabstop;\n }\n if (!placeholderDefaultValues.has(0) && enforceFinalTabstop) {\n // the snippet uses placeholders but has no\n // final tabstop defined -> insert at the end\n snippet.appendChild(new Placeholder(0));\n }\n return snippet;\n };\n SnippetParser.prototype._accept = function (type, value) {\n if (type === undefined || this._token.type === type) {\n var ret = !value ? true : this._scanner.tokenText(this._token);\n this._token = this._scanner.next();\n return ret;\n }\n return false;\n };\n SnippetParser.prototype._backTo = function (token) {\n this._scanner.pos = token.pos + token.len;\n this._token = token;\n return false;\n };\n SnippetParser.prototype._until = function (type) {\n if (this._token.type === 14 /* EOF */) {\n return false;\n }\n var start = this._token;\n while (this._token.type !== type) {\n this._token = this._scanner.next();\n if (this._token.type === 14 /* EOF */) {\n return false;\n }\n }\n var value = this._scanner.value.substring(start.pos, this._token.pos);\n this._token = this._scanner.next();\n return value;\n };\n SnippetParser.prototype._parse = function (marker) {\n return this._parseEscaped(marker)\n || this._parseTabstopOrVariableName(marker)\n || this._parseComplexPlaceholder(marker)\n || this._parseComplexVariable(marker)\n || this._parseAnything(marker);\n };\n // \\$, \\\\, \\} -> just text\n SnippetParser.prototype._parseEscaped = function (marker) {\n var value;\n if (value = this._accept(5 /* Backslash */, true)) {\n // saw a backslash, append escaped token or that backslash\n value = this._accept(0 /* Dollar */, true)\n || this._accept(4 /* CurlyClose */, true)\n || this._accept(5 /* Backslash */, true)\n || value;\n marker.appendChild(new Text(value));\n return true;\n }\n return false;\n };\n // $foo -> variable, $1 -> tabstop\n SnippetParser.prototype._parseTabstopOrVariableName = function (parent) {\n var value;\n var token = this._token;\n var match = this._accept(0 /* Dollar */)\n && (value = this._accept(9 /* VariableName */, true) || this._accept(8 /* Int */, true));\n if (!match) {\n return this._backTo(token);\n }\n parent.appendChild(/^\\d+$/.test(value)\n ? new Placeholder(Number(value))\n : new Variable(value));\n return true;\n };\n // ${1:}, ${1} -> placeholder\n SnippetParser.prototype._parseComplexPlaceholder = function (parent) {\n var index;\n var token = this._token;\n var match = this._accept(0 /* Dollar */)\n && this._accept(3 /* CurlyOpen */)\n && (index = this._accept(8 /* Int */, true));\n if (!match) {\n return this._backTo(token);\n }\n var placeholder = new Placeholder(Number(index));\n if (this._accept(1 /* Colon */)) {\n // ${1:}\n while (true) {\n // ...} -> done\n if (this._accept(4 /* CurlyClose */)) {\n parent.appendChild(placeholder);\n return true;\n }\n if (this._parse(placeholder)) {\n continue;\n }\n // fallback\n parent.appendChild(new Text('${' + index + ':'));\n placeholder.children.forEach(parent.appendChild, parent);\n return true;\n }\n }\n else if (placeholder.index > 0 && this._accept(7 /* Pipe */)) {\n // ${1|one,two,three|}\n var choice = new Choice();\n while (true) {\n if (this._parseChoiceElement(choice)) {\n if (this._accept(2 /* Comma */)) {\n // opt, -> more\n continue;\n }\n if (this._accept(7 /* Pipe */)) {\n placeholder.appendChild(choice);\n if (this._accept(4 /* CurlyClose */)) {\n // ..|} -> done\n parent.appendChild(placeholder);\n return true;\n }\n }\n }\n this._backTo(token);\n return false;\n }\n }\n else if (this._accept(6 /* Forwardslash */)) {\n // ${1///}\n if (this._parseTransform(placeholder)) {\n parent.appendChild(placeholder);\n return true;\n }\n this._backTo(token);\n return false;\n }\n else if (this._accept(4 /* CurlyClose */)) {\n // ${1}\n parent.appendChild(placeholder);\n return true;\n }\n else {\n // ${1 <- missing curly or colon\n return this._backTo(token);\n }\n };\n SnippetParser.prototype._parseChoiceElement = function (parent) {\n var token = this._token;\n var values = [];\n while (true) {\n if (this._token.type === 2 /* Comma */ || this._token.type === 7 /* Pipe */) {\n break;\n }\n var value = void 0;\n if (value = this._accept(5 /* Backslash */, true)) {\n // \\, or \\|\n value = this._accept(2 /* Comma */, true)\n || this._accept(7 /* Pipe */, true)\n || value;\n }\n else {\n value = this._accept(undefined, true);\n }\n if (!value) {\n // EOF\n this._backTo(token);\n return false;\n }\n values.push(value);\n }\n if (values.length === 0) {\n this._backTo(token);\n return false;\n }\n parent.appendChild(new Text(values.join('')));\n return true;\n };\n // ${foo:}, ${foo} -> variable\n SnippetParser.prototype._parseComplexVariable = function (parent) {\n var name;\n var token = this._token;\n var match = this._accept(0 /* Dollar */)\n && this._accept(3 /* CurlyOpen */)\n && (name = this._accept(9 /* VariableName */, true));\n if (!match) {\n return this._backTo(token);\n }\n var variable = new Variable(name);\n if (this._accept(1 /* Colon */)) {\n // ${foo:}\n while (true) {\n // ...} -> done\n if (this._accept(4 /* CurlyClose */)) {\n parent.appendChild(variable);\n return true;\n }\n if (this._parse(variable)) {\n continue;\n }\n // fallback\n parent.appendChild(new Text('${' + name + ':'));\n variable.children.forEach(parent.appendChild, parent);\n return true;\n }\n }\n else if (this._accept(6 /* Forwardslash */)) {\n // ${foo///}\n if (this._parseTransform(variable)) {\n parent.appendChild(variable);\n return true;\n }\n this._backTo(token);\n return false;\n }\n else if (this._accept(4 /* CurlyClose */)) {\n // ${foo}\n parent.appendChild(variable);\n return true;\n }\n else {\n // ${foo <- missing curly or colon\n return this._backTo(token);\n }\n };\n SnippetParser.prototype._parseTransform = function (parent) {\n // ...//}\n var transform = new Transform();\n var regexValue = '';\n var regexOptions = '';\n // (1) /regex\n while (true) {\n if (this._accept(6 /* Forwardslash */)) {\n break;\n }\n var escaped = void 0;\n if (escaped = this._accept(5 /* Backslash */, true)) {\n escaped = this._accept(6 /* Forwardslash */, true) || escaped;\n regexValue += escaped;\n continue;\n }\n if (this._token.type !== 14 /* EOF */) {\n regexValue += this._accept(undefined, true);\n continue;\n }\n return false;\n }\n // (2) /format\n while (true) {\n if (this._accept(6 /* Forwardslash */)) {\n break;\n }\n var escaped = void 0;\n if (escaped = this._accept(5 /* Backslash */, true)) {\n escaped = this._accept(6 /* Forwardslash */, true) || escaped;\n transform.appendChild(new Text(escaped));\n continue;\n }\n if (this._parseFormatString(transform) || this._parseAnything(transform)) {\n continue;\n }\n return false;\n }\n // (3) /option\n while (true) {\n if (this._accept(4 /* CurlyClose */)) {\n break;\n }\n if (this._token.type !== 14 /* EOF */) {\n regexOptions += this._accept(undefined, true);\n continue;\n }\n return false;\n }\n try {\n transform.regexp = new RegExp(regexValue, regexOptions);\n }\n catch (e) {\n // invalid regexp\n return false;\n }\n parent.transform = transform;\n return true;\n };\n SnippetParser.prototype._parseFormatString = function (parent) {\n var token = this._token;\n if (!this._accept(0 /* Dollar */)) {\n return false;\n }\n var complex = false;\n if (this._accept(3 /* CurlyOpen */)) {\n complex = true;\n }\n var index = this._accept(8 /* Int */, true);\n if (!index) {\n this._backTo(token);\n return false;\n }\n else if (!complex) {\n // $1\n parent.appendChild(new FormatString(Number(index)));\n return true;\n }\n else if (this._accept(4 /* CurlyClose */)) {\n // ${1}\n parent.appendChild(new FormatString(Number(index)));\n return true;\n }\n else if (!this._accept(1 /* Colon */)) {\n this._backTo(token);\n return false;\n }\n if (this._accept(6 /* Forwardslash */)) {\n // ${1:/upcase}\n var shorthand = this._accept(9 /* VariableName */, true);\n if (!shorthand || !this._accept(4 /* CurlyClose */)) {\n this._backTo(token);\n return false;\n }\n else {\n parent.appendChild(new FormatString(Number(index), shorthand));\n return true;\n }\n }\n else if (this._accept(11 /* Plus */)) {\n // ${1:+}\n var ifValue = this._until(4 /* CurlyClose */);\n if (ifValue) {\n parent.appendChild(new FormatString(Number(index), undefined, ifValue, undefined));\n return true;\n }\n }\n else if (this._accept(12 /* Dash */)) {\n // ${2:-}\n var elseValue = this._until(4 /* CurlyClose */);\n if (elseValue) {\n parent.appendChild(new FormatString(Number(index), undefined, undefined, elseValue));\n return true;\n }\n }\n else if (this._accept(13 /* QuestionMark */)) {\n // ${2:?:}\n var ifValue = this._until(1 /* Colon */);\n if (ifValue) {\n var elseValue = this._until(4 /* CurlyClose */);\n if (elseValue) {\n parent.appendChild(new FormatString(Number(index), undefined, ifValue, elseValue));\n return true;\n }\n }\n }\n else {\n // ${1:}\n var elseValue = this._until(4 /* CurlyClose */);\n if (elseValue) {\n parent.appendChild(new FormatString(Number(index), undefined, undefined, elseValue));\n return true;\n }\n }\n this._backTo(token);\n return false;\n };\n SnippetParser.prototype._parseAnything = function (marker) {\n if (this._token.type !== 14 /* EOF */) {\n marker.appendChild(new Text(this._scanner.tokenText(this._token)));\n this._accept(undefined);\n return true;\n }\n return false;\n };\n return SnippetParser;\n}());\nexport { SnippetParser };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { first2 } from '../../../base/common/async';\nimport { isFalsyOrEmpty } from '../../../base/common/arrays';\nimport { compareIgnoreCase } from '../../../base/common/strings';\nimport { assign } from '../../../base/common/objects';\nimport { onUnexpectedExternalError } from '../../../base/common/errors';\nimport { registerDefaultLanguageCommand } from '../../browser/editorExtensions';\nimport { SuggestRegistry, SuggestTriggerKind } from '../../common/modes';\nimport { RawContextKey } from '../../../platform/contextkey/common/contextkey';\nimport { CancellationToken } from '../../../base/common/cancellation';\nexport var Context = {\n Visible: new RawContextKey('suggestWidgetVisible', false),\n MultipleSuggestions: new RawContextKey('suggestWidgetMultipleSuggestions', false),\n MakesTextEdit: new RawContextKey('suggestionMakesTextEdit', true),\n AcceptOnKey: new RawContextKey('suggestionSupportsAcceptOnKey', true),\n AcceptSuggestionsOnEnter: new RawContextKey('acceptSuggestionOnEnter', true)\n};\nvar _snippetSuggestSupport;\nexport function getSnippetSuggestSupport() {\n return _snippetSuggestSupport;\n}\nexport function provideSuggestionItems(model, position, snippetConfig, onlyFrom, context, token) {\n if (snippetConfig === void 0) { snippetConfig = 'bottom'; }\n if (token === void 0) { token = CancellationToken.None; }\n var allSuggestions = [];\n var acceptSuggestion = createSuggesionFilter(snippetConfig);\n position = position.clone();\n // get provider groups, always add snippet suggestion provider\n var supports = SuggestRegistry.orderedGroups(model);\n // add snippets provider unless turned off\n if (snippetConfig !== 'none' && _snippetSuggestSupport) {\n supports.unshift([_snippetSuggestSupport]);\n }\n var suggestConext = context || { triggerKind: SuggestTriggerKind.Invoke };\n // add suggestions from contributed providers - providers are ordered in groups of\n // equal score and once a group produces a result the process stops\n var hasResult = false;\n var factory = supports.map(function (supports) { return function () {\n // for each support in the group ask for suggestions\n return Promise.all(supports.map(function (support) {\n if (!isFalsyOrEmpty(onlyFrom) && onlyFrom.indexOf(support) < 0) {\n return undefined;\n }\n return Promise.resolve(support.provideCompletionItems(model, position, suggestConext, token)).then(function (container) {\n var len = allSuggestions.length;\n if (container && !isFalsyOrEmpty(container.suggestions)) {\n for (var _i = 0, _a = container.suggestions; _i < _a.length; _i++) {\n var suggestion = _a[_i];\n if (acceptSuggestion(suggestion)) {\n fixOverwriteBeforeAfter(suggestion, container);\n allSuggestions.push({\n position: position,\n container: container,\n suggestion: suggestion,\n support: support,\n resolve: createSuggestionResolver(support, suggestion, model, position)\n });\n }\n }\n }\n if (len !== allSuggestions.length && support !== _snippetSuggestSupport) {\n hasResult = true;\n }\n }, onUnexpectedExternalError);\n }));\n }; });\n var result = first2(factory, function () { return hasResult; }).then(function () { return allSuggestions.sort(getSuggestionComparator(snippetConfig)); });\n // result.then(items => {\n // \tconsole.log(model.getWordUntilPosition(position), items.map(item => `${item.suggestion.label}, type=${item.suggestion.type}, incomplete?${item.container.incomplete}, overwriteBefore=${item.suggestion.overwriteBefore}`));\n // \treturn items;\n // }, err => {\n // \tconsole.warn(model.getWordUntilPosition(position), err);\n // });\n return result;\n}\nfunction fixOverwriteBeforeAfter(suggestion, container) {\n if (typeof suggestion.overwriteBefore !== 'number') {\n suggestion.overwriteBefore = 0;\n }\n if (typeof suggestion.overwriteAfter !== 'number' || suggestion.overwriteAfter < 0) {\n suggestion.overwriteAfter = 0;\n }\n}\nfunction createSuggestionResolver(provider, suggestion, model, position) {\n return function (token) {\n if (typeof provider.resolveCompletionItem === 'function') {\n return Promise.resolve(provider.resolveCompletionItem(model, position, suggestion, token)).then(function (value) { assign(suggestion, value); });\n }\n else {\n return Promise.resolve(void 0);\n }\n };\n}\nfunction createSuggesionFilter(snippetConfig) {\n if (snippetConfig === 'none') {\n return function (suggestion) { return suggestion.type !== 'snippet'; };\n }\n else {\n return function () { return true; };\n }\n}\nfunction defaultComparator(a, b) {\n var ret = 0;\n // check with 'sortText'\n if (typeof a.suggestion.sortText === 'string' && typeof b.suggestion.sortText === 'string') {\n ret = compareIgnoreCase(a.suggestion.sortText, b.suggestion.sortText);\n }\n // check with 'label'\n if (ret === 0) {\n ret = compareIgnoreCase(a.suggestion.label, b.suggestion.label);\n }\n // check with 'type' and lower snippets\n if (ret === 0 && a.suggestion.type !== b.suggestion.type) {\n if (a.suggestion.type === 'snippet') {\n ret = 1;\n }\n else if (b.suggestion.type === 'snippet') {\n ret = -1;\n }\n }\n return ret;\n}\nfunction snippetUpComparator(a, b) {\n if (a.suggestion.type !== b.suggestion.type) {\n if (a.suggestion.type === 'snippet') {\n return -1;\n }\n else if (b.suggestion.type === 'snippet') {\n return 1;\n }\n }\n return defaultComparator(a, b);\n}\nfunction snippetDownComparator(a, b) {\n if (a.suggestion.type !== b.suggestion.type) {\n if (a.suggestion.type === 'snippet') {\n return 1;\n }\n else if (b.suggestion.type === 'snippet') {\n return -1;\n }\n }\n return defaultComparator(a, b);\n}\nexport function getSuggestionComparator(snippetConfig) {\n if (snippetConfig === 'top') {\n return snippetUpComparator;\n }\n else if (snippetConfig === 'bottom') {\n return snippetDownComparator;\n }\n else {\n return defaultComparator;\n }\n}\nregisterDefaultLanguageCommand('_executeCompletionItemProvider', function (model, position, args) {\n var result = {\n incomplete: false,\n suggestions: []\n };\n var resolving = [];\n var maxItemsToResolve = args['maxItemsToResolve'] || 0;\n return provideSuggestionItems(model, position).then(function (items) {\n for (var _i = 0, items_1 = items; _i < items_1.length; _i++) {\n var item = items_1[_i];\n if (resolving.length < maxItemsToResolve) {\n resolving.push(item.resolve(CancellationToken.None));\n }\n result.incomplete = result.incomplete || item.container.incomplete;\n result.suggestions.push(item.suggestion);\n }\n }).then(function () {\n return Promise.all(resolving);\n }).then(function () {\n return result;\n });\n});\nvar _provider = new /** @class */ (function () {\n function class_1() {\n this.onlyOnceSuggestions = [];\n }\n class_1.prototype.provideCompletionItems = function () {\n var suggestions = this.onlyOnceSuggestions.slice(0);\n var result = { suggestions: suggestions };\n this.onlyOnceSuggestions.length = 0;\n return result;\n };\n return class_1;\n}());\nSuggestRegistry.register('*', _provider);\nexport function showSimpleSuggestions(editor, suggestions) {\n setTimeout(function () {\n var _a;\n (_a = _provider.onlyOnceSuggestions).push.apply(_a, suggestions);\n editor.getContribution('editor.contrib.suggestController').triggerSuggest([_provider]);\n }, 0);\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport * as nls from '../../../nls';\nimport { basename, dirname } from '../../../base/common/paths';\nimport { Text } from './snippetParser';\nimport { getLeadingWhitespace, commonPrefixLength, isFalsyOrWhitespace, pad } from '../../../base/common/strings';\nvar CompositeSnippetVariableResolver = /** @class */ (function () {\n function CompositeSnippetVariableResolver(_delegates) {\n this._delegates = _delegates;\n //\n }\n CompositeSnippetVariableResolver.prototype.resolve = function (variable) {\n for (var _i = 0, _a = this._delegates; _i < _a.length; _i++) {\n var delegate = _a[_i];\n var value = delegate.resolve(variable);\n if (value !== void 0) {\n return value;\n }\n }\n return undefined;\n };\n return CompositeSnippetVariableResolver;\n}());\nexport { CompositeSnippetVariableResolver };\nvar SelectionBasedVariableResolver = /** @class */ (function () {\n function SelectionBasedVariableResolver(_model, _selection) {\n this._model = _model;\n this._selection = _selection;\n //\n }\n SelectionBasedVariableResolver.prototype.resolve = function (variable) {\n var name = variable.name;\n if (name === 'SELECTION' || name === 'TM_SELECTED_TEXT') {\n var value = this._model.getValueInRange(this._selection) || undefined;\n if (value && this._selection.startLineNumber !== this._selection.endLineNumber) {\n // Selection is a multiline string which we indentation we now\n // need to adjust. We compare the indentation of this variable\n // with the indentation at the editor position and add potential\n // extra indentation to the value\n var line = this._model.getLineContent(this._selection.startLineNumber);\n var lineLeadingWhitespace = getLeadingWhitespace(line, 0, this._selection.startColumn - 1);\n var varLeadingWhitespace_1 = lineLeadingWhitespace;\n variable.snippet.walk(function (marker) {\n if (marker === variable) {\n return false;\n }\n if (marker instanceof Text) {\n varLeadingWhitespace_1 = getLeadingWhitespace(marker.value.split(/\\r\\n|\\r|\\n/).pop());\n }\n return true;\n });\n var whitespaceCommonLength_1 = commonPrefixLength(varLeadingWhitespace_1, lineLeadingWhitespace);\n value = value.replace(/(\\r\\n|\\r|\\n)(.*)/g, function (m, newline, rest) { return \"\" + newline + varLeadingWhitespace_1.substr(whitespaceCommonLength_1) + rest; });\n }\n return value;\n }\n else if (name === 'TM_CURRENT_LINE') {\n return this._model.getLineContent(this._selection.positionLineNumber);\n }\n else if (name === 'TM_CURRENT_WORD') {\n var info = this._model.getWordAtPosition({\n lineNumber: this._selection.positionLineNumber,\n column: this._selection.positionColumn\n });\n return info && info.word || undefined;\n }\n else if (name === 'TM_LINE_INDEX') {\n return String(this._selection.positionLineNumber - 1);\n }\n else if (name === 'TM_LINE_NUMBER') {\n return String(this._selection.positionLineNumber);\n }\n return undefined;\n };\n return SelectionBasedVariableResolver;\n}());\nexport { SelectionBasedVariableResolver };\nvar ModelBasedVariableResolver = /** @class */ (function () {\n function ModelBasedVariableResolver(_model) {\n this._model = _model;\n //\n }\n ModelBasedVariableResolver.prototype.resolve = function (variable) {\n var name = variable.name;\n if (name === 'TM_FILENAME') {\n return basename(this._model.uri.fsPath);\n }\n else if (name === 'TM_FILENAME_BASE') {\n var name_1 = basename(this._model.uri.fsPath);\n var idx = name_1.lastIndexOf('.');\n if (idx <= 0) {\n return name_1;\n }\n else {\n return name_1.slice(0, idx);\n }\n }\n else if (name === 'TM_DIRECTORY') {\n var dir = dirname(this._model.uri.fsPath);\n return dir !== '.' ? dir : '';\n }\n else if (name === 'TM_FILEPATH') {\n return this._model.uri.fsPath;\n }\n return undefined;\n };\n return ModelBasedVariableResolver;\n}());\nexport { ModelBasedVariableResolver };\nvar ClipboardBasedVariableResolver = /** @class */ (function () {\n function ClipboardBasedVariableResolver(_clipboardService, _selectionIdx, _selectionCount) {\n this._clipboardService = _clipboardService;\n this._selectionIdx = _selectionIdx;\n this._selectionCount = _selectionCount;\n //\n }\n ClipboardBasedVariableResolver.prototype.resolve = function (variable) {\n if (variable.name !== 'CLIPBOARD' || !this._clipboardService) {\n return undefined;\n }\n var text = this._clipboardService.readText();\n if (!text) {\n return undefined;\n }\n var lines = text.split(/\\r\\n|\\n|\\r/).filter(function (s) { return !isFalsyOrWhitespace(s); });\n if (lines.length === this._selectionCount) {\n return lines[this._selectionIdx];\n }\n else {\n return text;\n }\n };\n return ClipboardBasedVariableResolver;\n}());\nexport { ClipboardBasedVariableResolver };\nvar TimeBasedVariableResolver = /** @class */ (function () {\n function TimeBasedVariableResolver() {\n }\n TimeBasedVariableResolver.prototype.resolve = function (variable) {\n var name = variable.name;\n if (name === 'CURRENT_YEAR') {\n return String(new Date().getFullYear());\n }\n else if (name === 'CURRENT_YEAR_SHORT') {\n return String(new Date().getFullYear()).slice(-2);\n }\n else if (name === 'CURRENT_MONTH') {\n return pad((new Date().getMonth().valueOf() + 1), 2);\n }\n else if (name === 'CURRENT_DATE') {\n return pad(new Date().getDate().valueOf(), 2);\n }\n else if (name === 'CURRENT_HOUR') {\n return pad(new Date().getHours().valueOf(), 2);\n }\n else if (name === 'CURRENT_MINUTE') {\n return pad(new Date().getMinutes().valueOf(), 2);\n }\n else if (name === 'CURRENT_SECOND') {\n return pad(new Date().getSeconds().valueOf(), 2);\n }\n else if (name === 'CURRENT_DAY_NAME') {\n return TimeBasedVariableResolver.dayNames[new Date().getDay()];\n }\n else if (name === 'CURRENT_DAY_NAME_SHORT') {\n return TimeBasedVariableResolver.dayNamesShort[new Date().getDay()];\n }\n else if (name === 'CURRENT_MONTH_NAME') {\n return TimeBasedVariableResolver.monthNames[new Date().getMonth()];\n }\n else if (name === 'CURRENT_MONTH_NAME_SHORT') {\n return TimeBasedVariableResolver.monthNamesShort[new Date().getMonth()];\n }\n return undefined;\n };\n TimeBasedVariableResolver.dayNames = [nls.localize('Sunday', \"Sunday\"), nls.localize('Monday', \"Monday\"), nls.localize('Tuesday', \"Tuesday\"), nls.localize('Wednesday', \"Wednesday\"), nls.localize('Thursday', \"Thursday\"), nls.localize('Friday', \"Friday\"), nls.localize('Saturday', \"Saturday\")];\n TimeBasedVariableResolver.dayNamesShort = [nls.localize('SundayShort', \"Sun\"), nls.localize('MondayShort', \"Mon\"), nls.localize('TuesdayShort', \"Tue\"), nls.localize('WednesdayShort', \"Wed\"), nls.localize('ThursdayShort', \"Thu\"), nls.localize('FridayShort', \"Fri\"), nls.localize('SaturdayShort', \"Sat\")];\n TimeBasedVariableResolver.monthNames = [nls.localize('January', \"January\"), nls.localize('February', \"February\"), nls.localize('March', \"March\"), nls.localize('April', \"April\"), nls.localize('May', \"May\"), nls.localize('June', \"June\"), nls.localize('July', \"July\"), nls.localize('August', \"August\"), nls.localize('September', \"September\"), nls.localize('October', \"October\"), nls.localize('November', \"November\"), nls.localize('December', \"December\")];\n TimeBasedVariableResolver.monthNamesShort = [nls.localize('JanuaryShort', \"Jan\"), nls.localize('FebruaryShort', \"Feb\"), nls.localize('MarchShort', \"Mar\"), nls.localize('AprilShort', \"Apr\"), nls.localize('MayShort', \"May\"), nls.localize('JuneShort', \"Jun\"), nls.localize('JulyShort', \"Jul\"), nls.localize('AugustShort', \"Aug\"), nls.localize('SeptemberShort', \"Sep\"), nls.localize('OctoberShort', \"Oct\"), nls.localize('NovemberShort', \"Nov\"), nls.localize('DecemberShort', \"Dec\")];\n return TimeBasedVariableResolver;\n}());\nexport { TimeBasedVariableResolver };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport './snippetSession.css';\nimport { getLeadingWhitespace } from '../../../base/common/strings';\nimport { TrackedRangeStickiness } from '../../common/model';\nimport { EditOperation } from '../../common/core/editOperation';\nimport { Placeholder, Choice, Text, SnippetParser } from './snippetParser';\nimport { Selection } from '../../common/core/selection';\nimport { Range } from '../../common/core/range';\nimport { groupBy } from '../../../base/common/arrays';\nimport { dispose } from '../../../base/common/lifecycle';\nimport { SelectionBasedVariableResolver, CompositeSnippetVariableResolver, ModelBasedVariableResolver, ClipboardBasedVariableResolver, TimeBasedVariableResolver } from './snippetVariables';\nimport { ModelDecorationOptions } from '../../common/model/textModel';\nimport { IClipboardService } from '../../../platform/clipboard/common/clipboardService';\nimport { optional } from '../../../platform/instantiation/common/instantiation';\nvar OneSnippet = /** @class */ (function () {\n function OneSnippet(editor, snippet, offset) {\n this._nestingLevel = 1;\n this._editor = editor;\n this._snippet = snippet;\n this._offset = offset;\n this._placeholderGroups = groupBy(snippet.placeholders, Placeholder.compareByIndex);\n this._placeholderGroupsIdx = -1;\n }\n OneSnippet.prototype.dispose = function () {\n if (this._placeholderDecorations) {\n var toRemove_1 = [];\n this._placeholderDecorations.forEach(function (handle) { return toRemove_1.push(handle); });\n this._editor.deltaDecorations(toRemove_1, []);\n }\n this._placeholderGroups.length = 0;\n };\n OneSnippet.prototype._initDecorations = function () {\n var _this = this;\n if (this._placeholderDecorations) {\n // already initialized\n return;\n }\n this._placeholderDecorations = new Map();\n var model = this._editor.getModel();\n this._editor.changeDecorations(function (accessor) {\n // create a decoration for each placeholder\n for (var _i = 0, _a = _this._snippet.placeholders; _i < _a.length; _i++) {\n var placeholder = _a[_i];\n var placeholderOffset = _this._snippet.offset(placeholder);\n var placeholderLen = _this._snippet.fullLen(placeholder);\n var range = Range.fromPositions(model.getPositionAt(_this._offset + placeholderOffset), model.getPositionAt(_this._offset + placeholderOffset + placeholderLen));\n var options = placeholder.isFinalTabstop ? OneSnippet._decor.inactiveFinal : OneSnippet._decor.inactive;\n var handle = accessor.addDecoration(range, options);\n _this._placeholderDecorations.set(placeholder, handle);\n }\n });\n };\n OneSnippet.prototype.move = function (fwd) {\n var _this = this;\n this._initDecorations();\n // Transform placeholder text if necessary\n if (this._placeholderGroupsIdx >= 0) {\n var operations = [];\n for (var _i = 0, _a = this._placeholderGroups[this._placeholderGroupsIdx]; _i < _a.length; _i++) {\n var placeholder = _a[_i];\n // Check if the placeholder has a transformation\n if (placeholder.transform) {\n var id = this._placeholderDecorations.get(placeholder);\n var range = this._editor.getModel().getDecorationRange(id);\n var currentValue = this._editor.getModel().getValueInRange(range);\n operations.push(EditOperation.replaceMove(range, placeholder.transform.resolve(currentValue)));\n }\n }\n if (operations.length > 0) {\n this._editor.executeEdits('snippet.placeholderTransform', operations);\n }\n }\n if (fwd === true && this._placeholderGroupsIdx < this._placeholderGroups.length - 1) {\n this._placeholderGroupsIdx += 1;\n }\n else if (fwd === false && this._placeholderGroupsIdx > 0) {\n this._placeholderGroupsIdx -= 1;\n }\n else {\n // the selection of the current placeholder might\n // not acurate any more -> simply restore it\n }\n return this._editor.getModel().changeDecorations(function (accessor) {\n var activePlaceholders = new Set();\n // change stickiness to always grow when typing at its edges\n // because these decorations represent the currently active\n // tabstop.\n // Special case #1: reaching the final tabstop\n // Special case #2: placeholders enclosing active placeholders\n var selections = [];\n for (var _i = 0, _a = _this._placeholderGroups[_this._placeholderGroupsIdx]; _i < _a.length; _i++) {\n var placeholder = _a[_i];\n var id = _this._placeholderDecorations.get(placeholder);\n var range = _this._editor.getModel().getDecorationRange(id);\n selections.push(new Selection(range.startLineNumber, range.startColumn, range.endLineNumber, range.endColumn));\n accessor.changeDecorationOptions(id, placeholder.isFinalTabstop ? OneSnippet._decor.activeFinal : OneSnippet._decor.active);\n activePlaceholders.add(placeholder);\n for (var _b = 0, _c = _this._snippet.enclosingPlaceholders(placeholder); _b < _c.length; _b++) {\n var enclosingPlaceholder = _c[_b];\n var id_1 = _this._placeholderDecorations.get(enclosingPlaceholder);\n accessor.changeDecorationOptions(id_1, enclosingPlaceholder.isFinalTabstop ? OneSnippet._decor.activeFinal : OneSnippet._decor.active);\n activePlaceholders.add(enclosingPlaceholder);\n }\n }\n // change stickness to never grow when typing at its edges\n // so that in-active tabstops never grow\n _this._placeholderDecorations.forEach(function (id, placeholder) {\n if (!activePlaceholders.has(placeholder)) {\n accessor.changeDecorationOptions(id, placeholder.isFinalTabstop ? OneSnippet._decor.inactiveFinal : OneSnippet._decor.inactive);\n }\n });\n return selections;\n });\n };\n Object.defineProperty(OneSnippet.prototype, \"isAtFirstPlaceholder\", {\n get: function () {\n return this._placeholderGroupsIdx <= 0 || this._placeholderGroups.length === 0;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(OneSnippet.prototype, \"isAtLastPlaceholder\", {\n get: function () {\n return this._placeholderGroupsIdx === this._placeholderGroups.length - 1;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(OneSnippet.prototype, \"hasPlaceholder\", {\n get: function () {\n return this._snippet.placeholders.length > 0;\n },\n enumerable: true,\n configurable: true\n });\n OneSnippet.prototype.computePossibleSelections = function () {\n var result = new Map();\n for (var _i = 0, _a = this._placeholderGroups; _i < _a.length; _i++) {\n var placeholdersWithEqualIndex = _a[_i];\n var ranges = void 0;\n for (var _b = 0, placeholdersWithEqualIndex_1 = placeholdersWithEqualIndex; _b < placeholdersWithEqualIndex_1.length; _b++) {\n var placeholder = placeholdersWithEqualIndex_1[_b];\n if (placeholder.isFinalTabstop) {\n // ignore those\n break;\n }\n if (!ranges) {\n ranges = [];\n result.set(placeholder.index, ranges);\n }\n var id = this._placeholderDecorations.get(placeholder);\n var range = this._editor.getModel().getDecorationRange(id);\n if (!range) {\n // one of the placeholder lost its decoration and\n // therefore we bail out and pretend the placeholder\n // (with its mirrors) doesn't exist anymore.\n result.delete(placeholder.index);\n break;\n }\n ranges.push(range);\n }\n }\n return result;\n };\n Object.defineProperty(OneSnippet.prototype, \"choice\", {\n get: function () {\n return this._placeholderGroups[this._placeholderGroupsIdx][0].choice;\n },\n enumerable: true,\n configurable: true\n });\n OneSnippet.prototype.merge = function (others) {\n var _this = this;\n var model = this._editor.getModel();\n this._nestingLevel *= 10;\n this._editor.changeDecorations(function (accessor) {\n // For each active placeholder take one snippet and merge it\n // in that the placeholder (can be many for `$1foo$1foo`). Because\n // everything is sorted by editor selection we can simply remove\n // elements from the beginning of the array\n for (var _i = 0, _a = _this._placeholderGroups[_this._placeholderGroupsIdx]; _i < _a.length; _i++) {\n var placeholder = _a[_i];\n var nested = others.shift();\n console.assert(!nested._placeholderDecorations);\n // Massage placeholder-indicies of the nested snippet to be\n // sorted right after the insertion point. This ensures we move\n // through the placeholders in the correct order\n for (var _b = 0, _c = nested._snippet.placeholderInfo.all; _b < _c.length; _b++) {\n var nestedPlaceholder = _c[_b];\n if (nestedPlaceholder.isFinalTabstop) {\n nestedPlaceholder.index = placeholder.index + ((nested._snippet.placeholderInfo.last.index + 1) / _this._nestingLevel);\n }\n else {\n nestedPlaceholder.index = placeholder.index + (nestedPlaceholder.index / _this._nestingLevel);\n }\n }\n _this._snippet.replace(placeholder, nested._snippet.children);\n // Remove the placeholder at which position are inserting\n // the snippet and also remove its decoration.\n var id = _this._placeholderDecorations.get(placeholder);\n accessor.removeDecoration(id);\n _this._placeholderDecorations.delete(placeholder);\n // For each *new* placeholder we create decoration to monitor\n // how and if it grows/shrinks.\n for (var _d = 0, _e = nested._snippet.placeholders; _d < _e.length; _d++) {\n var placeholder_1 = _e[_d];\n var placeholderOffset = nested._snippet.offset(placeholder_1);\n var placeholderLen = nested._snippet.fullLen(placeholder_1);\n var range = Range.fromPositions(model.getPositionAt(nested._offset + placeholderOffset), model.getPositionAt(nested._offset + placeholderOffset + placeholderLen));\n var handle = accessor.addDecoration(range, OneSnippet._decor.inactive);\n _this._placeholderDecorations.set(placeholder_1, handle);\n }\n }\n // Last, re-create the placeholder groups by sorting placeholders by their index.\n _this._placeholderGroups = groupBy(_this._snippet.placeholders, Placeholder.compareByIndex);\n });\n };\n OneSnippet._decor = {\n active: ModelDecorationOptions.register({ stickiness: TrackedRangeStickiness.AlwaysGrowsWhenTypingAtEdges, className: 'snippet-placeholder' }),\n inactive: ModelDecorationOptions.register({ stickiness: TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges, className: 'snippet-placeholder' }),\n activeFinal: ModelDecorationOptions.register({ stickiness: TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges, className: 'finish-snippet-placeholder' }),\n inactiveFinal: ModelDecorationOptions.register({ stickiness: TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges, className: 'finish-snippet-placeholder' }),\n };\n return OneSnippet;\n}());\nexport { OneSnippet };\nvar SnippetSession = /** @class */ (function () {\n function SnippetSession(editor, template, overwriteBefore, overwriteAfter) {\n if (overwriteBefore === void 0) { overwriteBefore = 0; }\n if (overwriteAfter === void 0) { overwriteAfter = 0; }\n this._templateMerges = [];\n this._snippets = [];\n this._editor = editor;\n this._template = template;\n this._overwriteBefore = overwriteBefore;\n this._overwriteAfter = overwriteAfter;\n }\n SnippetSession.adjustWhitespace2 = function (model, position, snippet) {\n var line = model.getLineContent(position.lineNumber);\n var lineLeadingWhitespace = getLeadingWhitespace(line, 0, position.column - 1);\n snippet.walk(function (marker) {\n if (marker instanceof Text && !(marker.parent instanceof Choice)) {\n // adjust indentation of text markers, except for choise elements\n // which get adjusted when being selected\n var lines = marker.value.split(/\\r\\n|\\r|\\n/);\n for (var i = 1; i < lines.length; i++) {\n var templateLeadingWhitespace = getLeadingWhitespace(lines[i]);\n lines[i] = model.normalizeIndentation(lineLeadingWhitespace + templateLeadingWhitespace) + lines[i].substr(templateLeadingWhitespace.length);\n }\n var newValue = lines.join(model.getEOL());\n if (newValue !== marker.value) {\n marker.parent.replace(marker, [new Text(newValue)]);\n }\n }\n return true;\n });\n };\n SnippetSession.adjustSelection = function (model, selection, overwriteBefore, overwriteAfter) {\n if (overwriteBefore !== 0 || overwriteAfter !== 0) {\n // overwrite[Before|After] is compute using the position, not the whole\n // selection. therefore we adjust the selection around that position\n var positionLineNumber = selection.positionLineNumber, positionColumn = selection.positionColumn;\n var positionColumnBefore = positionColumn - overwriteBefore;\n var positionColumnAfter = positionColumn + overwriteAfter;\n var range = model.validateRange({\n startLineNumber: positionLineNumber,\n startColumn: positionColumnBefore,\n endLineNumber: positionLineNumber,\n endColumn: positionColumnAfter\n });\n selection = Selection.createWithDirection(range.startLineNumber, range.startColumn, range.endLineNumber, range.endColumn, selection.getDirection());\n }\n return selection;\n };\n SnippetSession.createEditsAndSnippets = function (editor, template, overwriteBefore, overwriteAfter, enforceFinalTabstop) {\n var model = editor.getModel();\n var edits = [];\n var snippets = [];\n var modelBasedVariableResolver = new ModelBasedVariableResolver(model);\n var clipboardService = editor.invokeWithinContext(function (accessor) { return accessor.get(IClipboardService, optional); });\n var delta = 0;\n // know what text the overwrite[Before|After] extensions\n // of the primary curser have selected because only when\n // secondary selections extend to the same text we can grow them\n var firstBeforeText = model.getValueInRange(SnippetSession.adjustSelection(model, editor.getSelection(), overwriteBefore, 0));\n var firstAfterText = model.getValueInRange(SnippetSession.adjustSelection(model, editor.getSelection(), 0, overwriteAfter));\n // sort selections by their start position but remeber\n // the original index. that allows you to create correct\n // offset-based selection logic without changing the\n // primary selection\n var indexedSelections = editor.getSelections()\n .map(function (selection, idx) { return ({ selection: selection, idx: idx }); })\n .sort(function (a, b) { return Range.compareRangesUsingStarts(a.selection, b.selection); });\n for (var _i = 0, indexedSelections_1 = indexedSelections; _i < indexedSelections_1.length; _i++) {\n var _a = indexedSelections_1[_i], selection = _a.selection, idx = _a.idx;\n // extend selection with the `overwriteBefore` and `overwriteAfter` and then\n // compare if this matches the extensions of the primary selection\n var extensionBefore = SnippetSession.adjustSelection(model, selection, overwriteBefore, 0);\n var extensionAfter = SnippetSession.adjustSelection(model, selection, 0, overwriteAfter);\n if (firstBeforeText !== model.getValueInRange(extensionBefore)) {\n extensionBefore = selection;\n }\n if (firstAfterText !== model.getValueInRange(extensionAfter)) {\n extensionAfter = selection;\n }\n // merge the before and after selection into one\n var snippetSelection = selection\n .setStartPosition(extensionBefore.startLineNumber, extensionBefore.startColumn)\n .setEndPosition(extensionAfter.endLineNumber, extensionAfter.endColumn);\n var snippet = new SnippetParser().parse(template, true, enforceFinalTabstop);\n // adjust the template string to match the indentation and\n // whitespace rules of this insert location (can be different for each cursor)\n var start = snippetSelection.getStartPosition();\n SnippetSession.adjustWhitespace2(model, start, snippet);\n snippet.resolveVariables(new CompositeSnippetVariableResolver([\n modelBasedVariableResolver,\n new ClipboardBasedVariableResolver(clipboardService, idx, indexedSelections.length),\n new SelectionBasedVariableResolver(model, selection),\n new TimeBasedVariableResolver\n ]));\n var offset = model.getOffsetAt(start) + delta;\n delta += snippet.toString().length - model.getValueLengthInRange(snippetSelection);\n // store snippets with the index of their originating selection.\n // that ensures the primiary cursor stays primary despite not being\n // the one with lowest start position\n edits[idx] = EditOperation.replace(snippetSelection, snippet.toString());\n snippets[idx] = new OneSnippet(editor, snippet, offset);\n }\n return { edits: edits, snippets: snippets };\n };\n SnippetSession.prototype.dispose = function () {\n dispose(this._snippets);\n };\n SnippetSession.prototype._logInfo = function () {\n return \"template=\\\"\" + this._template + \"\\\", merged_templates=\\\"\" + this._templateMerges.join(' -> ') + \"\\\"\";\n };\n SnippetSession.prototype.insert = function () {\n var _this = this;\n var model = this._editor.getModel();\n // make insert edit and start with first selections\n var _a = SnippetSession.createEditsAndSnippets(this._editor, this._template, this._overwriteBefore, this._overwriteAfter, false), edits = _a.edits, snippets = _a.snippets;\n this._snippets = snippets;\n var selections = model.pushEditOperations(this._editor.getSelections(), edits, function (undoEdits) {\n if (_this._snippets[0].hasPlaceholder) {\n return _this._move(true);\n }\n else {\n return undoEdits.map(function (edit) { return Selection.fromPositions(edit.range.getEndPosition()); });\n }\n });\n this._editor.setSelections(selections);\n this._editor.revealRange(selections[0]);\n };\n SnippetSession.prototype.merge = function (template, overwriteBefore, overwriteAfter) {\n var _this = this;\n if (overwriteBefore === void 0) { overwriteBefore = 0; }\n if (overwriteAfter === void 0) { overwriteAfter = 0; }\n this._templateMerges.push([this._snippets[0]._nestingLevel, this._snippets[0]._placeholderGroupsIdx, template]);\n var _a = SnippetSession.createEditsAndSnippets(this._editor, template, overwriteBefore, overwriteAfter, true), edits = _a.edits, snippets = _a.snippets;\n this._editor.setSelections(this._editor.getModel().pushEditOperations(this._editor.getSelections(), edits, function (undoEdits) {\n for (var _i = 0, _a = _this._snippets; _i < _a.length; _i++) {\n var snippet = _a[_i];\n snippet.merge(snippets);\n }\n console.assert(snippets.length === 0);\n if (_this._snippets[0].hasPlaceholder) {\n return _this._move(undefined);\n }\n else {\n return undoEdits.map(function (edit) { return Selection.fromPositions(edit.range.getEndPosition()); });\n }\n }));\n };\n SnippetSession.prototype.next = function () {\n var newSelections = this._move(true);\n this._editor.setSelections(newSelections);\n this._editor.revealPositionInCenterIfOutsideViewport(newSelections[0].getPosition());\n };\n SnippetSession.prototype.prev = function () {\n var newSelections = this._move(false);\n this._editor.setSelections(newSelections);\n this._editor.revealPositionInCenterIfOutsideViewport(newSelections[0].getPosition());\n };\n SnippetSession.prototype._move = function (fwd) {\n var selections = [];\n for (var _i = 0, _a = this._snippets; _i < _a.length; _i++) {\n var snippet = _a[_i];\n var oneSelection = snippet.move(fwd);\n selections.push.apply(selections, oneSelection);\n }\n return selections;\n };\n Object.defineProperty(SnippetSession.prototype, \"isAtFirstPlaceholder\", {\n get: function () {\n return this._snippets[0].isAtFirstPlaceholder;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(SnippetSession.prototype, \"isAtLastPlaceholder\", {\n get: function () {\n return this._snippets[0].isAtLastPlaceholder;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(SnippetSession.prototype, \"hasPlaceholder\", {\n get: function () {\n return this._snippets[0].hasPlaceholder;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(SnippetSession.prototype, \"choice\", {\n get: function () {\n return this._snippets[0].choice;\n },\n enumerable: true,\n configurable: true\n });\n SnippetSession.prototype.isSelectionWithinPlaceholders = function () {\n if (!this.hasPlaceholder) {\n return false;\n }\n var selections = this._editor.getSelections();\n if (selections.length < this._snippets.length) {\n // this means we started snippet mode with N\n // selections and have M (N > M) selections.\n // So one snippet is without selection -> cancel\n return false;\n }\n var allPossibleSelections;\n var _loop_1 = function (snippet) {\n var possibleSelections = snippet.computePossibleSelections();\n // for the first snippet find the placeholder (and its ranges)\n // that contain at least one selection. for all remaining snippets\n // the same placeholder (and their ranges) must be used.\n if (!allPossibleSelections) {\n allPossibleSelections = new Map();\n possibleSelections.forEach(function (ranges, index) {\n ranges.sort(Range.compareRangesUsingStarts);\n for (var _i = 0, selections_1 = selections; _i < selections_1.length; _i++) {\n var selection = selections_1[_i];\n if (ranges[0].containsRange(selection)) {\n allPossibleSelections.set(index, []);\n break;\n }\n }\n });\n }\n if (allPossibleSelections.size === 0) {\n return { value: false };\n }\n // add selections from 'this' snippet so that we know all\n // selections for this placeholder\n allPossibleSelections.forEach(function (array, index) {\n array.push.apply(array, possibleSelections.get(index));\n });\n };\n for (var _i = 0, _a = this._snippets; _i < _a.length; _i++) {\n var snippet = _a[_i];\n var state_1 = _loop_1(snippet);\n if (typeof state_1 === \"object\")\n return state_1.value;\n }\n // sort selections (and later placeholder-ranges). then walk both\n // arrays and make sure the placeholder-ranges contain the corresponding\n // selection\n selections.sort(Range.compareRangesUsingStarts);\n allPossibleSelections.forEach(function (ranges, index) {\n if (ranges.length !== selections.length) {\n allPossibleSelections.delete(index);\n return;\n }\n ranges.sort(Range.compareRangesUsingStarts);\n for (var i = 0; i < ranges.length; i++) {\n if (!ranges[i].containsRange(selections[i])) {\n allPossibleSelections.delete(index);\n return;\n }\n }\n });\n // from all possible selections we have deleted those\n // that don't match with the current selection. if we don't\n // have any left, we don't have a selection anymore\n return allPossibleSelections.size > 0;\n };\n return SnippetSession;\n}());\nexport { SnippetSession };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport { createDecorator as createServiceDecorator } from '../../instantiation/common/instantiation';\nexport var ILogService = createServiceDecorator('logService');\nvar NullLogService = /** @class */ (function () {\n function NullLogService() {\n }\n NullLogService.prototype.trace = function (message) {\n var args = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n args[_i - 1] = arguments[_i];\n }\n };\n NullLogService.prototype.error = function (message) {\n var args = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n args[_i - 1] = arguments[_i];\n }\n };\n NullLogService.prototype.dispose = function () { };\n return NullLogService;\n}());\nexport { NullLogService };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __param = (this && this.__param) || function (paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n};\nimport { RawContextKey, IContextKeyService, ContextKeyExpr } from '../../../platform/contextkey/common/contextkey';\nimport { registerEditorContribution, EditorCommand, registerEditorCommand } from '../../browser/editorExtensions';\nimport { dispose } from '../../../base/common/lifecycle';\nimport { SnippetSession } from './snippetSession';\nimport { EditorContextKeys } from '../../common/editorContextKeys';\nimport { showSimpleSuggestions } from '../suggest/suggest';\nimport { Selection } from '../../common/core/selection';\nimport { repeat } from '../../../base/common/strings';\nimport { ILogService } from '../../../platform/log/common/log';\nvar SnippetController2 = /** @class */ (function () {\n function SnippetController2(_editor, _logService, contextKeyService) {\n this._editor = _editor;\n this._logService = _logService;\n this._snippetListener = [];\n this._inSnippet = SnippetController2.InSnippetMode.bindTo(contextKeyService);\n this._hasNextTabstop = SnippetController2.HasNextTabstop.bindTo(contextKeyService);\n this._hasPrevTabstop = SnippetController2.HasPrevTabstop.bindTo(contextKeyService);\n }\n SnippetController2.get = function (editor) {\n return editor.getContribution('snippetController2');\n };\n SnippetController2.prototype.dispose = function () {\n this._inSnippet.reset();\n this._hasPrevTabstop.reset();\n this._hasNextTabstop.reset();\n dispose(this._session);\n };\n SnippetController2.prototype.getId = function () {\n return 'snippetController2';\n };\n SnippetController2.prototype.insert = function (template, overwriteBefore, overwriteAfter, undoStopBefore, undoStopAfter) {\n if (overwriteBefore === void 0) { overwriteBefore = 0; }\n if (overwriteAfter === void 0) { overwriteAfter = 0; }\n if (undoStopBefore === void 0) { undoStopBefore = true; }\n if (undoStopAfter === void 0) { undoStopAfter = true; }\n // this is here to find out more about the yet-not-understood\n // error that sometimes happens when we fail to inserted a nested\n // snippet\n try {\n this._doInsert(template, overwriteBefore, overwriteAfter, undoStopBefore, undoStopAfter);\n }\n catch (e) {\n this.cancel();\n this._logService.error(e);\n this._logService.error('snippet_error');\n this._logService.error('insert_template=', template);\n this._logService.error('existing_template=', this._session ? this._session._logInfo() : '');\n }\n };\n SnippetController2.prototype._doInsert = function (template, overwriteBefore, overwriteAfter, undoStopBefore, undoStopAfter) {\n var _this = this;\n if (overwriteBefore === void 0) { overwriteBefore = 0; }\n if (overwriteAfter === void 0) { overwriteAfter = 0; }\n if (undoStopBefore === void 0) { undoStopBefore = true; }\n if (undoStopAfter === void 0) { undoStopAfter = true; }\n // don't listen while inserting the snippet\n // as that is the inflight state causing cancelation\n this._snippetListener = dispose(this._snippetListener);\n if (undoStopBefore) {\n this._editor.getModel().pushStackElement();\n }\n if (!this._session) {\n this._modelVersionId = this._editor.getModel().getAlternativeVersionId();\n this._session = new SnippetSession(this._editor, template, overwriteBefore, overwriteAfter);\n this._session.insert();\n }\n else {\n this._session.merge(template, overwriteBefore, overwriteAfter);\n }\n if (undoStopAfter) {\n this._editor.getModel().pushStackElement();\n }\n this._updateState();\n this._snippetListener = [\n this._editor.onDidChangeModelContent(function (e) { return e.isFlush && _this.cancel(); }),\n this._editor.onDidChangeModel(function () { return _this.cancel(); }),\n this._editor.onDidChangeCursorSelection(function () { return _this._updateState(); })\n ];\n };\n SnippetController2.prototype._updateState = function () {\n if (!this._session) {\n // canceled in the meanwhile\n return;\n }\n if (this._modelVersionId === this._editor.getModel().getAlternativeVersionId()) {\n // undo until the 'before' state happened\n // and makes use cancel snippet mode\n return this.cancel();\n }\n if (!this._session.hasPlaceholder) {\n // don't listen for selection changes and don't\n // update context keys when the snippet is plain text\n return this.cancel();\n }\n if (this._session.isAtLastPlaceholder || !this._session.isSelectionWithinPlaceholders()) {\n return this.cancel();\n }\n this._inSnippet.set(true);\n this._hasPrevTabstop.set(!this._session.isAtFirstPlaceholder);\n this._hasNextTabstop.set(!this._session.isAtLastPlaceholder);\n this._handleChoice();\n };\n SnippetController2.prototype._handleChoice = function () {\n var choice = this._session.choice;\n if (!choice) {\n this._currentChoice = undefined;\n return;\n }\n if (this._currentChoice !== choice) {\n this._currentChoice = choice;\n this._editor.setSelections(this._editor.getSelections()\n .map(function (s) { return Selection.fromPositions(s.getStartPosition()); }));\n var first_1 = choice.options[0];\n showSimpleSuggestions(this._editor, choice.options.map(function (option, i) {\n // let before = choice.options.slice(0, i);\n // let after = choice.options.slice(i);\n return {\n type: 'value',\n label: option.value,\n insertText: option.value,\n // insertText: `\\${1|${after.concat(before).join(',')}|}$0`,\n // snippetType: 'textmate',\n sortText: repeat('a', i),\n overwriteAfter: first_1.value.length\n };\n }));\n }\n };\n SnippetController2.prototype.finish = function () {\n while (this._inSnippet.get()) {\n this.next();\n }\n };\n SnippetController2.prototype.cancel = function () {\n this._inSnippet.reset();\n this._hasPrevTabstop.reset();\n this._hasNextTabstop.reset();\n dispose(this._snippetListener);\n dispose(this._session);\n this._session = undefined;\n this._modelVersionId = -1;\n };\n SnippetController2.prototype.prev = function () {\n this._session.prev();\n this._updateState();\n };\n SnippetController2.prototype.next = function () {\n this._session.next();\n this._updateState();\n };\n SnippetController2.prototype.isInSnippet = function () {\n return this._inSnippet.get();\n };\n SnippetController2.InSnippetMode = new RawContextKey('inSnippetMode', false);\n SnippetController2.HasNextTabstop = new RawContextKey('hasNextTabstop', false);\n SnippetController2.HasPrevTabstop = new RawContextKey('hasPrevTabstop', false);\n SnippetController2 = __decorate([\n __param(1, ILogService),\n __param(2, IContextKeyService)\n ], SnippetController2);\n return SnippetController2;\n}());\nexport { SnippetController2 };\nregisterEditorContribution(SnippetController2);\nvar CommandCtor = EditorCommand.bindToContribution(SnippetController2.get);\nregisterEditorCommand(new CommandCtor({\n id: 'jumpToNextSnippetPlaceholder',\n precondition: ContextKeyExpr.and(SnippetController2.InSnippetMode, SnippetController2.HasNextTabstop),\n handler: function (ctrl) { return ctrl.next(); },\n kbOpts: {\n weight: 100 /* EditorContrib */ + 30,\n kbExpr: EditorContextKeys.editorTextFocus,\n primary: 2 /* Tab */\n }\n}));\nregisterEditorCommand(new CommandCtor({\n id: 'jumpToPrevSnippetPlaceholder',\n precondition: ContextKeyExpr.and(SnippetController2.InSnippetMode, SnippetController2.HasPrevTabstop),\n handler: function (ctrl) { return ctrl.prev(); },\n kbOpts: {\n weight: 100 /* EditorContrib */ + 30,\n kbExpr: EditorContextKeys.editorTextFocus,\n primary: 1024 /* Shift */ | 2 /* Tab */\n }\n}));\nregisterEditorCommand(new CommandCtor({\n id: 'leaveSnippet',\n precondition: SnippetController2.InSnippetMode,\n handler: function (ctrl) { return ctrl.cancel(); },\n kbOpts: {\n weight: 100 /* EditorContrib */ + 30,\n kbExpr: EditorContextKeys.editorTextFocus,\n primary: 9 /* Escape */,\n secondary: [1024 /* Shift */ | 9 /* Escape */]\n }\n}));\nregisterEditorCommand(new CommandCtor({\n id: 'acceptSnippet',\n precondition: SnippetController2.InSnippetMode,\n handler: function (ctrl) { return ctrl.finish(); },\n}));\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport * as strings from './strings';\nimport { LRUCache } from './map';\n// Combined filters\n/**\n * @returns A filter which combines the provided set\n * of filters with an or. The *first* filters that\n * matches defined the return value of the returned\n * filter.\n */\nexport function or() {\n var filter = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n filter[_i] = arguments[_i];\n }\n return function (word, wordToMatchAgainst) {\n for (var i = 0, len = filter.length; i < len; i++) {\n var match = filter[i](word, wordToMatchAgainst);\n if (match) {\n return match;\n }\n }\n return null;\n };\n}\nexport var matchesPrefix = _matchesPrefix.bind(undefined, true);\nfunction _matchesPrefix(ignoreCase, word, wordToMatchAgainst) {\n if (!wordToMatchAgainst || wordToMatchAgainst.length < word.length) {\n return null;\n }\n var matches;\n if (ignoreCase) {\n matches = strings.startsWithIgnoreCase(wordToMatchAgainst, word);\n }\n else {\n matches = wordToMatchAgainst.indexOf(word) === 0;\n }\n if (!matches) {\n return null;\n }\n return word.length > 0 ? [{ start: 0, end: word.length }] : [];\n}\n// Contiguous Substring\nexport function matchesContiguousSubString(word, wordToMatchAgainst) {\n var index = wordToMatchAgainst.toLowerCase().indexOf(word.toLowerCase());\n if (index === -1) {\n return null;\n }\n return [{ start: index, end: index + word.length }];\n}\n// Substring\nexport function matchesSubString(word, wordToMatchAgainst) {\n return _matchesSubString(word.toLowerCase(), wordToMatchAgainst.toLowerCase(), 0, 0);\n}\nfunction _matchesSubString(word, wordToMatchAgainst, i, j) {\n if (i === word.length) {\n return [];\n }\n else if (j === wordToMatchAgainst.length) {\n return null;\n }\n else {\n if (word[i] === wordToMatchAgainst[j]) {\n var result = null;\n if (result = _matchesSubString(word, wordToMatchAgainst, i + 1, j + 1)) {\n return join({ start: j, end: j + 1 }, result);\n }\n return null;\n }\n return _matchesSubString(word, wordToMatchAgainst, i, j + 1);\n }\n}\n// CamelCase\nfunction isLower(code) {\n return 97 /* a */ <= code && code <= 122 /* z */;\n}\nexport function isUpper(code) {\n return 65 /* A */ <= code && code <= 90 /* Z */;\n}\nfunction isNumber(code) {\n return 48 /* Digit0 */ <= code && code <= 57 /* Digit9 */;\n}\nfunction isWhitespace(code) {\n return (code === 32 /* Space */\n || code === 9 /* Tab */\n || code === 10 /* LineFeed */\n || code === 13 /* CarriageReturn */);\n}\nfunction isAlphanumeric(code) {\n return isLower(code) || isUpper(code) || isNumber(code);\n}\nfunction join(head, tail) {\n if (tail.length === 0) {\n tail = [head];\n }\n else if (head.end === tail[0].start) {\n tail[0].start = head.start;\n }\n else {\n tail.unshift(head);\n }\n return tail;\n}\nfunction nextAnchor(camelCaseWord, start) {\n for (var i = start; i < camelCaseWord.length; i++) {\n var c = camelCaseWord.charCodeAt(i);\n if (isUpper(c) || isNumber(c) || (i > 0 && !isAlphanumeric(camelCaseWord.charCodeAt(i - 1)))) {\n return i;\n }\n }\n return camelCaseWord.length;\n}\nfunction _matchesCamelCase(word, camelCaseWord, i, j) {\n if (i === word.length) {\n return [];\n }\n else if (j === camelCaseWord.length) {\n return null;\n }\n else if (word[i] !== camelCaseWord[j].toLowerCase()) {\n return null;\n }\n else {\n var result = null;\n var nextUpperIndex = j + 1;\n result = _matchesCamelCase(word, camelCaseWord, i + 1, j + 1);\n while (!result && (nextUpperIndex = nextAnchor(camelCaseWord, nextUpperIndex)) < camelCaseWord.length) {\n result = _matchesCamelCase(word, camelCaseWord, i + 1, nextUpperIndex);\n nextUpperIndex++;\n }\n return result === null ? null : join({ start: j, end: j + 1 }, result);\n }\n}\n// Heuristic to avoid computing camel case matcher for words that don't\n// look like camelCaseWords.\nfunction analyzeCamelCaseWord(word) {\n var upper = 0, lower = 0, alpha = 0, numeric = 0, code = 0;\n for (var i = 0; i < word.length; i++) {\n code = word.charCodeAt(i);\n if (isUpper(code)) {\n upper++;\n }\n if (isLower(code)) {\n lower++;\n }\n if (isAlphanumeric(code)) {\n alpha++;\n }\n if (isNumber(code)) {\n numeric++;\n }\n }\n var upperPercent = upper / word.length;\n var lowerPercent = lower / word.length;\n var alphaPercent = alpha / word.length;\n var numericPercent = numeric / word.length;\n return { upperPercent: upperPercent, lowerPercent: lowerPercent, alphaPercent: alphaPercent, numericPercent: numericPercent };\n}\nfunction isUpperCaseWord(analysis) {\n var upperPercent = analysis.upperPercent, lowerPercent = analysis.lowerPercent;\n return lowerPercent === 0 && upperPercent > 0.6;\n}\nfunction isCamelCaseWord(analysis) {\n var upperPercent = analysis.upperPercent, lowerPercent = analysis.lowerPercent, alphaPercent = analysis.alphaPercent, numericPercent = analysis.numericPercent;\n return lowerPercent > 0.2 && upperPercent < 0.8 && alphaPercent > 0.6 && numericPercent < 0.2;\n}\n// Heuristic to avoid computing camel case matcher for words that don't\n// look like camel case patterns.\nfunction isCamelCasePattern(word) {\n var upper = 0, lower = 0, code = 0, whitespace = 0;\n for (var i = 0; i < word.length; i++) {\n code = word.charCodeAt(i);\n if (isUpper(code)) {\n upper++;\n }\n if (isLower(code)) {\n lower++;\n }\n if (isWhitespace(code)) {\n whitespace++;\n }\n }\n if ((upper === 0 || lower === 0) && whitespace === 0) {\n return word.length <= 30;\n }\n else {\n return upper <= 5;\n }\n}\nexport function matchesCamelCase(word, camelCaseWord) {\n if (!camelCaseWord) {\n return null;\n }\n camelCaseWord = camelCaseWord.trim();\n if (camelCaseWord.length === 0) {\n return null;\n }\n if (!isCamelCasePattern(word)) {\n return null;\n }\n if (camelCaseWord.length > 60) {\n return null;\n }\n var analysis = analyzeCamelCaseWord(camelCaseWord);\n if (!isCamelCaseWord(analysis)) {\n if (!isUpperCaseWord(analysis)) {\n return null;\n }\n camelCaseWord = camelCaseWord.toLowerCase();\n }\n var result = null;\n var i = 0;\n word = word.toLowerCase();\n while (i < camelCaseWord.length && (result = _matchesCamelCase(word, camelCaseWord, 0, i)) === null) {\n i = nextAnchor(camelCaseWord, i + 1);\n }\n return result;\n}\n// Fuzzy\nexport var fuzzyContiguousFilter = or(matchesPrefix, matchesCamelCase, matchesContiguousSubString);\nvar fuzzySeparateFilter = or(matchesPrefix, matchesCamelCase, matchesSubString);\nvar fuzzyRegExpCache = new LRUCache(10000); // bounded to 10000 elements\nexport function matchesFuzzy(word, wordToMatchAgainst, enableSeparateSubstringMatching) {\n if (enableSeparateSubstringMatching === void 0) { enableSeparateSubstringMatching = false; }\n if (typeof word !== 'string' || typeof wordToMatchAgainst !== 'string') {\n return null; // return early for invalid input\n }\n // Form RegExp for wildcard matches\n var regexp = fuzzyRegExpCache.get(word);\n if (!regexp) {\n regexp = new RegExp(strings.convertSimple2RegExpPattern(word), 'i');\n fuzzyRegExpCache.set(word, regexp);\n }\n // RegExp Filter\n var match = regexp.exec(wordToMatchAgainst);\n if (match) {\n return [{ start: match.index, end: match.index + match[0].length }];\n }\n // Default Filter\n return enableSeparateSubstringMatching ? fuzzySeparateFilter(word, wordToMatchAgainst) : fuzzyContiguousFilter(word, wordToMatchAgainst);\n}\nexport function anyScore(pattern, word, patternMaxWhitespaceIgnore) {\n pattern = pattern.toLowerCase();\n word = word.toLowerCase();\n var matches = [];\n var idx = 0;\n for (var pos = 0; pos < pattern.length; ++pos) {\n var thisIdx = word.indexOf(pattern.charAt(pos), idx);\n if (thisIdx >= 0) {\n matches.push(thisIdx);\n idx = thisIdx + 1;\n }\n }\n return [matches.length, matches];\n}\n//#region --- fuzzyScore ---\nexport function createMatches(position) {\n var ret = [];\n if (!position) {\n return ret;\n }\n var last;\n for (var _i = 0, position_1 = position; _i < position_1.length; _i++) {\n var pos = position_1[_i];\n if (last && last.end === pos) {\n last.end += 1;\n }\n else {\n last = { start: pos, end: pos + 1 };\n ret.push(last);\n }\n }\n return ret;\n}\nfunction initTable() {\n var table = [];\n var row = [0];\n for (var i = 1; i <= 100; i++) {\n row.push(-i);\n }\n for (var i = 0; i <= 100; i++) {\n var thisRow = row.slice(0);\n thisRow[0] = -i;\n table.push(thisRow);\n }\n return table;\n}\nvar _table = initTable();\nvar _scores = initTable();\nvar _arrows = initTable();\nvar _debug = false;\nfunction printTable(table, pattern, patternLen, word, wordLen) {\n function pad(s, n, pad) {\n if (pad === void 0) { pad = ' '; }\n while (s.length < n) {\n s = pad + s;\n }\n return s;\n }\n var ret = \" | |\" + word.split('').map(function (c) { return pad(c, 3); }).join('|') + \"\\n\";\n for (var i = 0; i <= patternLen; i++) {\n if (i === 0) {\n ret += ' |';\n }\n else {\n ret += pattern[i - 1] + \"|\";\n }\n ret += table[i].slice(0, wordLen + 1).map(function (n) { return pad(n.toString(), 3); }).join('|') + '\\n';\n }\n return ret;\n}\nfunction isSeparatorAtPos(value, index) {\n if (index < 0 || index >= value.length) {\n return false;\n }\n var code = value.charCodeAt(index);\n switch (code) {\n case 95 /* Underline */:\n case 45 /* Dash */:\n case 46 /* Period */:\n case 32 /* Space */:\n case 47 /* Slash */:\n case 92 /* Backslash */:\n case 39 /* SingleQuote */:\n case 34 /* DoubleQuote */:\n case 58 /* Colon */:\n return true;\n default:\n return false;\n }\n}\nfunction isWhitespaceAtPos(value, index) {\n if (index < 0 || index >= value.length) {\n return false;\n }\n var code = value.charCodeAt(index);\n switch (code) {\n case 32 /* Space */:\n case 9 /* Tab */:\n return true;\n default:\n return false;\n }\n}\nexport function fuzzyScore(pattern, word, patternMaxWhitespaceIgnore, firstMatchCanBeWeak) {\n var patternLen = pattern.length > 100 ? 100 : pattern.length;\n var wordLen = word.length > 100 ? 100 : word.length;\n // Check for leading whitespace in the pattern and\n // start matching just after that position. This is\n // like `pattern = pattern.rtrim()` but doesn't create\n // a new string\n var patternStartPos = 0;\n if (patternMaxWhitespaceIgnore === undefined) {\n patternMaxWhitespaceIgnore = patternLen;\n }\n while (patternStartPos < patternMaxWhitespaceIgnore) {\n if (isWhitespaceAtPos(pattern, patternStartPos)) {\n patternStartPos += 1;\n }\n else {\n break;\n }\n }\n if (patternStartPos === patternLen) {\n return [-100, []];\n }\n if (patternLen > wordLen) {\n return undefined;\n }\n var lowPattern = pattern.toLowerCase();\n var lowWord = word.toLowerCase();\n var patternPos = patternStartPos;\n var wordPos = 0;\n // Run a simple check if the characters of pattern occur\n // (in order) at all in word. If that isn't the case we\n // stop because no match will be possible\n while (patternPos < patternLen && wordPos < wordLen) {\n if (lowPattern[patternPos] === lowWord[wordPos]) {\n patternPos += 1;\n }\n wordPos += 1;\n }\n if (patternPos !== patternLen) {\n return undefined;\n }\n // There will be a mach, fill in tables\n for (patternPos = patternStartPos + 1; patternPos <= patternLen; patternPos++) {\n for (wordPos = 1; wordPos <= wordLen; wordPos++) {\n var score = -1;\n var lowWordChar = lowWord[wordPos - 1];\n if (lowPattern[patternPos - 1] === lowWordChar) {\n if (wordPos === (patternPos - patternStartPos)) {\n // common prefix: `foobar <-> foobaz`\n if (pattern[patternPos - 1] === word[wordPos - 1]) {\n score = 7;\n }\n else {\n score = 5;\n }\n }\n else if (lowWordChar !== word[wordPos - 1] && (wordPos === 1 || lowWord[wordPos - 2] === word[wordPos - 2])) {\n // hitting upper-case: `foo <-> forOthers`\n if (pattern[patternPos - 1] === word[wordPos - 1]) {\n score = 7;\n }\n else {\n score = 5;\n }\n }\n else if (isSeparatorAtPos(lowWord, wordPos - 2) || isWhitespaceAtPos(lowWord, wordPos - 2)) {\n // post separator: `foo <-> bar_foo`\n score = 5;\n }\n else {\n score = 1;\n }\n }\n _scores[patternPos][wordPos] = score;\n var diag = _table[patternPos - 1][wordPos - 1] + (score > 1 ? 1 : score);\n var top_1 = _table[patternPos - 1][wordPos] + -1;\n var left = _table[patternPos][wordPos - 1] + -1;\n if (left >= top_1) {\n // left or diag\n if (left > diag) {\n _table[patternPos][wordPos] = left;\n _arrows[patternPos][wordPos] = 4 /* Left */;\n }\n else if (left === diag) {\n _table[patternPos][wordPos] = left;\n _arrows[patternPos][wordPos] = 4 /* Left */ | 2 /* Diag */;\n }\n else {\n _table[patternPos][wordPos] = diag;\n _arrows[patternPos][wordPos] = 2 /* Diag */;\n }\n }\n else {\n // top or diag\n if (top_1 > diag) {\n _table[patternPos][wordPos] = top_1;\n _arrows[patternPos][wordPos] = 1 /* Top */;\n }\n else if (top_1 === diag) {\n _table[patternPos][wordPos] = top_1;\n _arrows[patternPos][wordPos] = 1 /* Top */ | 2 /* Diag */;\n }\n else {\n _table[patternPos][wordPos] = diag;\n _arrows[patternPos][wordPos] = 2 /* Diag */;\n }\n }\n }\n }\n if (_debug) {\n console.log(printTable(_table, pattern, patternLen, word, wordLen));\n console.log(printTable(_arrows, pattern, patternLen, word, wordLen));\n console.log(printTable(_scores, pattern, patternLen, word, wordLen));\n }\n // _bucket is an array of [PrefixArray] we use to keep\n // track of scores and matches. After calling `_findAllMatches`\n // the best match (if available) is the first item in the array\n _matchesCount = 0;\n _topScore = -100;\n _patternStartPos = patternStartPos;\n _firstMatchCanBeWeak = firstMatchCanBeWeak;\n _findAllMatches(patternLen, wordLen, patternLen === wordLen ? 1 : 0, new LazyArray(), false);\n if (_matchesCount === 0) {\n return undefined;\n }\n return [_topScore, _topMatch.toArray()];\n}\nvar _matchesCount = 0;\nvar _topMatch;\nvar _topScore = 0;\nvar _patternStartPos = 0;\nvar _firstMatchCanBeWeak = false;\nfunction _findAllMatches(patternPos, wordPos, total, matches, lastMatched) {\n if (_matchesCount >= 10 || total < -25) {\n // stop when having already 10 results, or\n // when a potential alignment as already 5 gaps\n return;\n }\n var simpleMatchCount = 0;\n while (patternPos > _patternStartPos && wordPos > 0) {\n var score = _scores[patternPos][wordPos];\n var arrow = _arrows[patternPos][wordPos];\n if (arrow === 4 /* Left */) {\n // left\n wordPos -= 1;\n if (lastMatched) {\n total -= 5; // new gap penalty\n }\n else if (!matches.isEmpty()) {\n total -= 1; // gap penalty after first match\n }\n lastMatched = false;\n simpleMatchCount = 0;\n }\n else if (arrow & 2 /* Diag */) {\n if (arrow & 4 /* Left */) {\n // left\n _findAllMatches(patternPos, wordPos - 1, !matches.isEmpty() ? total - 1 : total, // gap penalty after first match\n matches.slice(), lastMatched);\n }\n // diag\n total += score;\n patternPos -= 1;\n wordPos -= 1;\n matches.unshift(wordPos);\n lastMatched = true;\n // count simple matches and boost a row of\n // simple matches when they yield in a\n // strong match.\n if (score === 1) {\n simpleMatchCount += 1;\n if (patternPos === _patternStartPos && !_firstMatchCanBeWeak) {\n // when the first match is a weak\n // match we discard it\n return undefined;\n }\n }\n else {\n // boost\n total += 1 + (simpleMatchCount * (score - 1));\n simpleMatchCount = 0;\n }\n }\n else {\n return undefined;\n }\n }\n total -= wordPos >= 3 ? 9 : wordPos * 3; // late start penalty\n // dynamically keep track of the current top score\n // and insert the current best score at head, the rest at tail\n _matchesCount += 1;\n if (total > _topScore) {\n _topScore = total;\n _topMatch = matches;\n }\n}\nvar LazyArray = /** @class */ (function () {\n function LazyArray() {\n }\n LazyArray.prototype.isEmpty = function () {\n return !this._data && (!this._parent || this._parent.isEmpty());\n };\n LazyArray.prototype.unshift = function (n) {\n if (!this._data) {\n this._data = [n];\n }\n else {\n this._data.unshift(n);\n }\n };\n LazyArray.prototype.slice = function () {\n var ret = new LazyArray();\n ret._parent = this;\n ret._parentLen = this._data ? this._data.length : 0;\n return ret;\n };\n LazyArray.prototype.toArray = function () {\n if (!this._data) {\n return this._parent.toArray();\n }\n var bucket = [];\n var element = this;\n while (element) {\n if (element._parent && element._parent._data) {\n bucket.push(element._parent._data.slice(element._parent._data.length - element._parentLen));\n }\n element = element._parent;\n }\n return Array.prototype.concat.apply(this._data, bucket);\n };\n return LazyArray;\n}());\n//#endregion\n//#region --- graceful ---\nexport function fuzzyScoreGracefulAggressive(pattern, word, patternMaxWhitespaceIgnore) {\n return fuzzyScoreWithPermutations(pattern, word, true, patternMaxWhitespaceIgnore);\n}\nfunction fuzzyScoreWithPermutations(pattern, word, aggressive, patternMaxWhitespaceIgnore) {\n var top = fuzzyScore(pattern, word, patternMaxWhitespaceIgnore);\n if (top && !aggressive) {\n // when using the original pattern yield a result we`\n // return it unless we are aggressive and try to find\n // a better alignment, e.g. `cno` -> `^co^ns^ole` or `^c^o^nsole`.\n return top;\n }\n if (pattern.length >= 3) {\n // When the pattern is long enough then try a few (max 7)\n // permutations of the pattern to find a better match. The\n // permutations only swap neighbouring characters, e.g\n // `cnoso` becomes `conso`, `cnsoo`, `cnoos`.\n var tries = Math.min(7, pattern.length - 1);\n for (var patternPos = 1; patternPos < tries; patternPos++) {\n var newPattern = nextTypoPermutation(pattern, patternPos);\n if (newPattern) {\n var candidate = fuzzyScore(newPattern, word, patternMaxWhitespaceIgnore);\n if (candidate) {\n candidate[0] -= 3; // permutation penalty\n if (!top || candidate[0] > top[0]) {\n top = candidate;\n }\n }\n }\n }\n }\n return top;\n}\nfunction nextTypoPermutation(pattern, patternPos) {\n if (patternPos + 1 >= pattern.length) {\n return undefined;\n }\n var swap1 = pattern[patternPos];\n var swap2 = pattern[patternPos + 1];\n if (swap1 === swap2) {\n return undefined;\n }\n return pattern.slice(0, patternPos)\n + swap2\n + swap1\n + pattern.slice(patternPos + 2);\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport { fuzzyScore, fuzzyScoreGracefulAggressive, anyScore } from '../../../base/common/filters';\nimport { isDisposable } from '../../../base/common/lifecycle';\nimport { EDITOR_DEFAULTS } from '../../common/config/editorOptions';\nvar LineContext = /** @class */ (function () {\n function LineContext() {\n }\n return LineContext;\n}());\nexport { LineContext };\nvar CompletionModel = /** @class */ (function () {\n function CompletionModel(items, column, lineContext, options) {\n if (options === void 0) { options = EDITOR_DEFAULTS.contribInfo.suggest; }\n this._snippetCompareFn = CompletionModel._compareCompletionItems;\n this._items = items;\n this._column = column;\n this._options = options;\n this._refilterKind = 1 /* All */;\n this._lineContext = lineContext;\n if (options.snippets === 'top') {\n this._snippetCompareFn = CompletionModel._compareCompletionItemsSnippetsUp;\n }\n else if (options.snippets === 'bottom') {\n this._snippetCompareFn = CompletionModel._compareCompletionItemsSnippetsDown;\n }\n }\n CompletionModel.prototype.dispose = function () {\n var seen = new Set();\n for (var _i = 0, _a = this._items; _i < _a.length; _i++) {\n var container = _a[_i].container;\n if (!seen.has(container)) {\n seen.add(container);\n if (isDisposable(container)) {\n container.dispose();\n }\n }\n }\n };\n Object.defineProperty(CompletionModel.prototype, \"lineContext\", {\n get: function () {\n return this._lineContext;\n },\n set: function (value) {\n if (this._lineContext.leadingLineContent !== value.leadingLineContent\n || this._lineContext.characterCountDelta !== value.characterCountDelta) {\n this._refilterKind = this._lineContext.characterCountDelta < value.characterCountDelta && this._filteredItems ? 2 /* Incr */ : 1 /* All */;\n this._lineContext = value;\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(CompletionModel.prototype, \"items\", {\n get: function () {\n this._ensureCachedState();\n return this._filteredItems;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(CompletionModel.prototype, \"incomplete\", {\n get: function () {\n this._ensureCachedState();\n return this._isIncomplete;\n },\n enumerable: true,\n configurable: true\n });\n CompletionModel.prototype.adopt = function (except) {\n var res = new Array();\n for (var i = 0; i < this._items.length;) {\n if (!except.has(this._items[i].support)) {\n res.push(this._items[i]);\n // unordered removed\n this._items[i] = this._items[this._items.length - 1];\n this._items.pop();\n }\n else {\n // continue with next item\n i++;\n }\n }\n this._refilterKind = 1 /* All */;\n return res;\n };\n Object.defineProperty(CompletionModel.prototype, \"stats\", {\n get: function () {\n this._ensureCachedState();\n return this._stats;\n },\n enumerable: true,\n configurable: true\n });\n CompletionModel.prototype._ensureCachedState = function () {\n if (this._refilterKind !== 0 /* Nothing */) {\n this._createCachedState();\n }\n };\n CompletionModel.prototype._createCachedState = function () {\n this._isIncomplete = new Set();\n this._stats = { suggestionCount: 0, snippetCount: 0, textCount: 0 };\n var _a = this._lineContext, leadingLineContent = _a.leadingLineContent, characterCountDelta = _a.characterCountDelta;\n var word = '';\n // incrementally filter less\n var source = this._refilterKind === 1 /* All */ ? this._items : this._filteredItems;\n var target = [];\n // picks a score function based on the number of\n // items that we have to score/filter and based on the\n // user-configuration\n var scoreFn = (!this._options.filterGraceful || source.length > 2000) ? fuzzyScore : fuzzyScoreGracefulAggressive;\n for (var i = 0; i < source.length; i++) {\n var item = source[i];\n var suggestion = item.suggestion, container = item.container;\n // collect those supports that signaled having\n // an incomplete result\n if (container.incomplete) {\n this._isIncomplete.add(item.support);\n }\n // 'word' is that remainder of the current line that we\n // filter and score against. In theory each suggestion uses a\n // different word, but in practice not - that's why we cache\n var wordLen = suggestion.overwriteBefore + characterCountDelta - (item.position.column - this._column);\n if (word.length !== wordLen) {\n word = wordLen === 0 ? '' : leadingLineContent.slice(-wordLen);\n }\n // remember the word against which this item was\n // scored\n item.word = word;\n if (wordLen === 0) {\n // when there is nothing to score against, don't\n // event try to do. Use a const rank and rely on\n // the fallback-sort using the initial sort order.\n // use a score of `-100` because that is out of the\n // bound of values `fuzzyScore` will return\n item.score = -100;\n item.matches = undefined;\n }\n else if (typeof suggestion.filterText === 'string') {\n // when there is a `filterText` it must match the `word`.\n // if it matches we check with the label to compute highlights\n // and if that doesn't yield a result we have no highlights,\n // despite having the match\n var match = scoreFn(word, suggestion.filterText, suggestion.overwriteBefore);\n if (!match) {\n continue;\n }\n item.score = match[0];\n item.matches = (fuzzyScore(word, suggestion.label) || anyScore(word, suggestion.label))[1];\n }\n else {\n // by default match `word` against the `label`\n var match = scoreFn(word, suggestion.label, suggestion.overwriteBefore);\n if (match) {\n item.score = match[0];\n item.matches = match[1];\n }\n else {\n continue;\n }\n }\n item.idx = i;\n target.push(item);\n // update stats\n this._stats.suggestionCount++;\n switch (suggestion.type) {\n case 'snippet':\n this._stats.snippetCount++;\n break;\n case 'text':\n this._stats.textCount++;\n break;\n }\n }\n this._filteredItems = target.sort(this._snippetCompareFn);\n this._refilterKind = 0 /* Nothing */;\n };\n CompletionModel._compareCompletionItems = function (a, b) {\n if (a.score > b.score) {\n return -1;\n }\n else if (a.score < b.score) {\n return 1;\n }\n else if (a.idx < b.idx) {\n return -1;\n }\n else if (a.idx > b.idx) {\n return 1;\n }\n else {\n return 0;\n }\n };\n CompletionModel._compareCompletionItemsSnippetsDown = function (a, b) {\n if (a.suggestion.type !== b.suggestion.type) {\n if (a.suggestion.type === 'snippet') {\n return 1;\n }\n else if (b.suggestion.type === 'snippet') {\n return -1;\n }\n }\n return CompletionModel._compareCompletionItems(a, b);\n };\n CompletionModel._compareCompletionItemsSnippetsUp = function (a, b) {\n if (a.suggestion.type !== b.suggestion.type) {\n if (a.suggestion.type === 'snippet') {\n return -1;\n }\n else if (b.suggestion.type === 'snippet') {\n return 1;\n }\n }\n return CompletionModel._compareCompletionItems(a, b);\n };\n return CompletionModel;\n}());\nexport { CompletionModel };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport { isFalsyOrEmpty } from '../../../base/common/arrays';\nimport { TimeoutTimer, createCancelablePromise } from '../../../base/common/async';\nimport { onUnexpectedError } from '../../../base/common/errors';\nimport { Emitter } from '../../../base/common/event';\nimport { dispose } from '../../../base/common/lifecycle';\nimport { values } from '../../../base/common/map';\nimport { CursorChangeReason } from '../../common/controller/cursorEvents';\nimport { Selection } from '../../common/core/selection';\nimport { SuggestRegistry, SuggestTriggerKind } from '../../common/modes';\nimport { CompletionModel } from './completionModel';\nimport { getSuggestionComparator, provideSuggestionItems, getSnippetSuggestSupport } from './suggest';\nimport { SnippetController2 } from '../snippet/snippetController2';\nvar LineContext = /** @class */ (function () {\n function LineContext(model, position, auto) {\n this.leadingLineContent = model.getLineContent(position.lineNumber).substr(0, position.column - 1);\n this.leadingWord = model.getWordUntilPosition(position);\n this.lineNumber = position.lineNumber;\n this.column = position.column;\n this.auto = auto;\n }\n LineContext.shouldAutoTrigger = function (editor) {\n var model = editor.getModel();\n if (!model) {\n return false;\n }\n var pos = editor.getPosition();\n model.tokenizeIfCheap(pos.lineNumber);\n var word = model.getWordAtPosition(pos);\n if (!word) {\n return false;\n }\n if (word.endColumn !== pos.column) {\n return false;\n }\n if (!isNaN(Number(word.word))) {\n return false;\n }\n return true;\n };\n return LineContext;\n}());\nexport { LineContext };\nvar SuggestModel = /** @class */ (function () {\n function SuggestModel(editor) {\n var _this = this;\n this._toDispose = [];\n this._triggerQuickSuggest = new TimeoutTimer();\n this._triggerRefilter = new TimeoutTimer();\n this._onDidCancel = new Emitter();\n this._onDidTrigger = new Emitter();\n this._onDidSuggest = new Emitter();\n this.onDidCancel = this._onDidCancel.event;\n this.onDidTrigger = this._onDidTrigger.event;\n this.onDidSuggest = this._onDidSuggest.event;\n this._editor = editor;\n this._state = 0 /* Idle */;\n this._requestPromise = null;\n this._completionModel = null;\n this._context = null;\n this._currentSelection = this._editor.getSelection() || new Selection(1, 1, 1, 1);\n // wire up various listeners\n this._toDispose.push(this._editor.onDidChangeModel(function () {\n _this._updateTriggerCharacters();\n _this.cancel();\n }));\n this._toDispose.push(this._editor.onDidChangeModelLanguage(function () {\n _this._updateTriggerCharacters();\n _this.cancel();\n }));\n this._toDispose.push(this._editor.onDidChangeConfiguration(function () {\n _this._updateTriggerCharacters();\n _this._updateQuickSuggest();\n }));\n this._toDispose.push(SuggestRegistry.onDidChange(function () {\n _this._updateTriggerCharacters();\n _this._updateActiveSuggestSession();\n }));\n this._toDispose.push(this._editor.onDidChangeCursorSelection(function (e) {\n _this._onCursorChange(e);\n }));\n this._toDispose.push(this._editor.onDidChangeModelContent(function (e) {\n _this._refilterCompletionItems();\n }));\n this._updateTriggerCharacters();\n this._updateQuickSuggest();\n }\n SuggestModel.prototype.dispose = function () {\n dispose([this._onDidCancel, this._onDidSuggest, this._onDidTrigger, this._triggerCharacterListener, this._triggerQuickSuggest, this._triggerRefilter]);\n this._toDispose = dispose(this._toDispose);\n dispose(this._completionModel);\n this.cancel();\n };\n // --- handle configuration & precondition changes\n SuggestModel.prototype._updateQuickSuggest = function () {\n this._quickSuggestDelay = this._editor.getConfiguration().contribInfo.quickSuggestionsDelay;\n if (isNaN(this._quickSuggestDelay) || (!this._quickSuggestDelay && this._quickSuggestDelay !== 0) || this._quickSuggestDelay < 0) {\n this._quickSuggestDelay = 10;\n }\n };\n SuggestModel.prototype._updateTriggerCharacters = function () {\n var _this = this;\n dispose(this._triggerCharacterListener);\n if (this._editor.getConfiguration().readOnly\n || !this._editor.getModel()\n || !this._editor.getConfiguration().contribInfo.suggestOnTriggerCharacters) {\n return;\n }\n var supportsByTriggerCharacter = Object.create(null);\n for (var _i = 0, _a = SuggestRegistry.all(this._editor.getModel()); _i < _a.length; _i++) {\n var support = _a[_i];\n if (isFalsyOrEmpty(support.triggerCharacters)) {\n continue;\n }\n for (var _b = 0, _c = support.triggerCharacters; _b < _c.length; _b++) {\n var ch = _c[_b];\n var set = supportsByTriggerCharacter[ch];\n if (!set) {\n set = supportsByTriggerCharacter[ch] = new Set();\n set.add(getSnippetSuggestSupport());\n }\n set.add(support);\n }\n }\n this._triggerCharacterListener = this._editor.onDidType(function (text) {\n var lastChar = text.charAt(text.length - 1);\n var supports = supportsByTriggerCharacter[lastChar];\n if (supports) {\n // keep existing items that where not computed by the\n // supports/providers that want to trigger now\n var items = _this._completionModel ? _this._completionModel.adopt(supports) : undefined;\n _this.trigger({ auto: true, triggerCharacter: lastChar }, Boolean(_this._completionModel), values(supports), items);\n }\n });\n };\n Object.defineProperty(SuggestModel.prototype, \"state\", {\n // --- trigger/retrigger/cancel suggest\n get: function () {\n return this._state;\n },\n enumerable: true,\n configurable: true\n });\n SuggestModel.prototype.cancel = function (retrigger) {\n if (retrigger === void 0) { retrigger = false; }\n this._triggerRefilter.cancel();\n if (this._triggerQuickSuggest) {\n this._triggerQuickSuggest.cancel();\n }\n if (this._requestPromise) {\n this._requestPromise.cancel();\n this._requestPromise = null;\n }\n this._state = 0 /* Idle */;\n dispose(this._completionModel);\n this._completionModel = null;\n this._context = null;\n this._onDidCancel.fire({ retrigger: retrigger });\n };\n SuggestModel.prototype._updateActiveSuggestSession = function () {\n if (this._state !== 0 /* Idle */) {\n if (!SuggestRegistry.has(this._editor.getModel())) {\n this.cancel();\n }\n else {\n this.trigger({ auto: this._state === 2 /* Auto */ }, true);\n }\n }\n };\n SuggestModel.prototype._onCursorChange = function (e) {\n var _this = this;\n var prevSelection = this._currentSelection;\n this._currentSelection = this._editor.getSelection();\n if (!e.selection.isEmpty()\n || e.reason !== CursorChangeReason.NotSet\n || (e.source !== 'keyboard' && e.source !== 'deleteLeft')) {\n // Early exit if nothing needs to be done!\n // Leave some form of early exit check here if you wish to continue being a cursor position change listener ;)\n if (this._state !== 0 /* Idle */) {\n this.cancel();\n }\n return;\n }\n if (!SuggestRegistry.has(this._editor.getModel())) {\n return;\n }\n var model = this._editor.getModel();\n if (!model) {\n return;\n }\n if (this._state === 0 /* Idle */) {\n if (this._editor.getConfiguration().contribInfo.quickSuggestions === false) {\n // not enabled\n return;\n }\n if (!prevSelection.containsRange(this._currentSelection) && !prevSelection.getEndPosition().isBeforeOrEqual(this._currentSelection.getPosition())) {\n // cursor didn't move RIGHT\n return;\n }\n if (this._editor.getConfiguration().contribInfo.suggest.snippetsPreventQuickSuggestions && SnippetController2.get(this._editor).isInSnippet()) {\n // no quick suggestion when in snippet mode\n return;\n }\n this.cancel();\n this._triggerQuickSuggest.cancelAndSet(function () {\n if (!LineContext.shouldAutoTrigger(_this._editor)) {\n return;\n }\n var model = _this._editor.getModel();\n var pos = _this._editor.getPosition();\n if (!model) {\n return;\n }\n // validate enabled now\n var quickSuggestions = _this._editor.getConfiguration().contribInfo.quickSuggestions;\n if (quickSuggestions === false) {\n return;\n }\n else if (quickSuggestions === true) {\n // all good\n }\n else {\n // Check the type of the token that triggered this\n model.tokenizeIfCheap(pos.lineNumber);\n var lineTokens = model.getLineTokens(pos.lineNumber);\n var tokenType = lineTokens.getStandardTokenType(lineTokens.findTokenIndexAtOffset(Math.max(pos.column - 1 - 1, 0)));\n var inValidScope = quickSuggestions.other && tokenType === 0 /* Other */\n || quickSuggestions.comments && tokenType === 1 /* Comment */\n || quickSuggestions.strings && tokenType === 2 /* String */;\n if (!inValidScope) {\n return;\n }\n }\n // we made it till here -> trigger now\n _this.trigger({ auto: true });\n }, this._quickSuggestDelay);\n }\n };\n SuggestModel.prototype._refilterCompletionItems = function () {\n var _this = this;\n if (this._state === 0 /* Idle */) {\n return;\n }\n var model = this._editor.getModel();\n if (model) {\n // refine active suggestion\n this._triggerRefilter.cancelAndSet(function () {\n var position = _this._editor.getPosition();\n var ctx = new LineContext(model, position, _this._state === 2 /* Auto */);\n _this._onNewContext(ctx);\n }, 25);\n }\n };\n SuggestModel.prototype.trigger = function (context, retrigger, onlyFrom, existingItems) {\n var _this = this;\n if (retrigger === void 0) { retrigger = false; }\n var model = this._editor.getModel();\n if (!model) {\n return;\n }\n var auto = context.auto;\n var ctx = new LineContext(model, this._editor.getPosition(), auto);\n // Cancel previous requests, change state & update UI\n this.cancel(retrigger);\n this._state = auto ? 2 /* Auto */ : 1 /* Manual */;\n this._onDidTrigger.fire({ auto: auto });\n // Capture context when request was sent\n this._context = ctx;\n // Build context for request\n var suggestCtx;\n if (context.triggerCharacter) {\n suggestCtx = {\n triggerKind: SuggestTriggerKind.TriggerCharacter,\n triggerCharacter: context.triggerCharacter\n };\n }\n else if (onlyFrom && onlyFrom.length) {\n suggestCtx = { triggerKind: SuggestTriggerKind.TriggerForIncompleteCompletions };\n }\n else {\n suggestCtx = { triggerKind: SuggestTriggerKind.Invoke };\n }\n this._requestPromise = createCancelablePromise(function (token) { return provideSuggestionItems(model, _this._editor.getPosition(), _this._editor.getConfiguration().contribInfo.suggest.snippets, onlyFrom, suggestCtx, token); });\n this._requestPromise.then(function (items) {\n _this._requestPromise = null;\n if (_this._state === 0 /* Idle */) {\n return;\n }\n var model = _this._editor.getModel();\n if (!model) {\n return;\n }\n if (!isFalsyOrEmpty(existingItems)) {\n var cmpFn = getSuggestionComparator(_this._editor.getConfiguration().contribInfo.suggest.snippets);\n items = items.concat(existingItems).sort(cmpFn);\n }\n var ctx = new LineContext(model, _this._editor.getPosition(), auto);\n dispose(_this._completionModel);\n _this._completionModel = new CompletionModel(items, _this._context.column, {\n leadingLineContent: ctx.leadingLineContent,\n characterCountDelta: _this._context ? ctx.column - _this._context.column : 0\n }, _this._editor.getConfiguration().contribInfo.suggest);\n _this._onNewContext(ctx);\n }).catch(onUnexpectedError);\n };\n SuggestModel.prototype._onNewContext = function (ctx) {\n if (!this._context) {\n // happens when 24x7 IntelliSense is enabled and still in its delay\n return;\n }\n if (ctx.lineNumber !== this._context.lineNumber) {\n // e.g. happens when pressing Enter while IntelliSense is computed\n this.cancel();\n return;\n }\n if (ctx.leadingWord.startColumn < this._context.leadingWord.startColumn) {\n // happens when the current word gets outdented\n this.cancel();\n return;\n }\n if (ctx.column < this._context.column) {\n // typed -> moved cursor LEFT -> retrigger if still on a word\n if (ctx.leadingWord.word) {\n this.trigger({ auto: this._context.auto }, true);\n }\n else {\n this.cancel();\n }\n return;\n }\n if (!this._completionModel) {\n // happens when IntelliSense is not yet computed\n return;\n }\n if (ctx.column > this._context.column && this._completionModel.incomplete.size > 0 && ctx.leadingWord.word.length !== 0) {\n // typed -> moved cursor RIGHT & incomple model & still on a word -> retrigger\n var incomplete = this._completionModel.incomplete;\n var adopted = this._completionModel.adopt(incomplete);\n this.trigger({ auto: this._state === 2 /* Auto */ }, true, values(incomplete), adopted);\n }\n else {\n // typed -> moved cursor RIGHT -> update UI\n var oldLineContext = this._completionModel.lineContext;\n var isFrozen = false;\n this._completionModel.lineContext = {\n leadingLineContent: ctx.leadingLineContent,\n characterCountDelta: ctx.column - this._context.column\n };\n if (this._completionModel.items.length === 0) {\n if (LineContext.shouldAutoTrigger(this._editor) && this._context.leadingWord.endColumn < ctx.leadingWord.startColumn) {\n // retrigger when heading into a new word\n this.trigger({ auto: this._context.auto }, true);\n return;\n }\n if (!this._context.auto) {\n // freeze when IntelliSense was manually requested\n this._completionModel.lineContext = oldLineContext;\n isFrozen = this._completionModel.items.length > 0;\n if (isFrozen && ctx.leadingWord.word.length === 0) {\n // there were results before but now there aren't\n // and also we are not on a word anymore -> cancel\n this.cancel();\n return;\n }\n }\n else {\n // nothing left\n this.cancel();\n return;\n }\n }\n this._onDidSuggest.fire({\n completionModel: this._completionModel,\n auto: this._context.auto,\n isFrozen: isFrozen,\n });\n }\n };\n return SuggestModel;\n}());\nexport { SuggestModel };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n/**\n * Returns the intersection between two ranges as a range itself.\n * Returns `{ start: 0, end: 0 }` if the intersection is empty.\n */\nexport function intersect(one, other) {\n if (one.start >= other.end || other.start >= one.end) {\n return { start: 0, end: 0 };\n }\n var start = Math.max(one.start, other.start);\n var end = Math.min(one.end, other.end);\n if (end - start <= 0) {\n return { start: 0, end: 0 };\n }\n return { start: start, end: end };\n}\nexport function isEmpty(range) {\n return range.end - range.start <= 0;\n}\nexport function relativeComplement(one, other) {\n var result = [];\n var first = { start: one.start, end: Math.min(other.start, one.end) };\n var second = { start: Math.max(other.end, one.start), end: one.end };\n if (!isEmpty(first)) {\n result.push(first);\n }\n if (!isEmpty(second)) {\n result.push(second);\n }\n return result;\n}\n/**\n * Returns the intersection between a ranged group and a range.\n * Returns `[]` if the intersection is empty.\n */\nexport function groupIntersect(range, groups) {\n var result = [];\n for (var _i = 0, groups_1 = groups; _i < groups_1.length; _i++) {\n var r = groups_1[_i];\n if (range.start >= r.range.end) {\n continue;\n }\n if (range.end < r.range.start) {\n break;\n }\n var intersection = intersect(range, r.range);\n if (isEmpty(intersection)) {\n continue;\n }\n result.push({\n range: intersection,\n size: r.size\n });\n }\n return result;\n}\n/**\n * Shifts a range by that `much`.\n */\nexport function shift(_a, much) {\n var start = _a.start, end = _a.end;\n return { start: start + much, end: end + much };\n}\n/**\n * Consolidates a collection of ranged groups.\n *\n * Consolidation is the process of merging consecutive ranged groups\n * that share the same `size`.\n */\nexport function consolidate(groups) {\n var result = [];\n var previousGroup = null;\n for (var _i = 0, groups_2 = groups; _i < groups_2.length; _i++) {\n var group = groups_2[_i];\n var start = group.range.start;\n var end = group.range.end;\n var size = group.size;\n if (previousGroup && size === previousGroup.size) {\n previousGroup.range.end = end;\n continue;\n }\n previousGroup = { range: { start: start, end: end }, size: size };\n result.push(previousGroup);\n }\n return result;\n}\n/**\n * Concatenates several collections of ranged groups into a single\n * collection.\n */\nfunction concat() {\n var groups = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n groups[_i] = arguments[_i];\n }\n return consolidate(groups.reduce(function (r, g) { return r.concat(g); }, []));\n}\nvar RangeMap = /** @class */ (function () {\n function RangeMap() {\n this.groups = [];\n this._size = 0;\n }\n RangeMap.prototype.splice = function (index, deleteCount) {\n var items = [];\n for (var _i = 2; _i < arguments.length; _i++) {\n items[_i - 2] = arguments[_i];\n }\n var diff = items.length - deleteCount;\n var before = groupIntersect({ start: 0, end: index }, this.groups);\n var after = groupIntersect({ start: index + deleteCount, end: Number.POSITIVE_INFINITY }, this.groups)\n .map(function (g) { return ({ range: shift(g.range, diff), size: g.size }); });\n var middle = items.map(function (item, i) { return ({\n range: { start: index + i, end: index + i + 1 },\n size: item.size\n }); });\n this.groups = concat(before, middle, after);\n this._size = this.groups.reduce(function (t, g) { return t + (g.size * (g.range.end - g.range.start)); }, 0);\n };\n Object.defineProperty(RangeMap.prototype, \"count\", {\n /**\n * Returns the number of items in the range map.\n */\n get: function () {\n var len = this.groups.length;\n if (!len) {\n return 0;\n }\n return this.groups[len - 1].range.end;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(RangeMap.prototype, \"size\", {\n /**\n * Returns the sum of the sizes of all items in the range map.\n */\n get: function () {\n return this._size;\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Returns the index of the item at the given position.\n */\n RangeMap.prototype.indexAt = function (position) {\n if (position < 0) {\n return -1;\n }\n var index = 0;\n var size = 0;\n for (var _i = 0, _a = this.groups; _i < _a.length; _i++) {\n var group = _a[_i];\n var count = group.range.end - group.range.start;\n var newSize = size + (count * group.size);\n if (position < newSize) {\n return index + Math.floor((position - size) / group.size);\n }\n index += count;\n size = newSize;\n }\n return index;\n };\n /**\n * Returns the index of the item right after the item at the\n * index of the given position.\n */\n RangeMap.prototype.indexAfter = function (position) {\n return Math.min(this.indexAt(position) + 1, this.count);\n };\n /**\n * Returns the start position of the item at the given index.\n */\n RangeMap.prototype.positionAt = function (index) {\n if (index < 0) {\n return -1;\n }\n var position = 0;\n var count = 0;\n for (var _i = 0, _a = this.groups; _i < _a.length; _i++) {\n var group = _a[_i];\n var groupCount = group.range.end - group.range.start;\n var newCount = count + groupCount;\n if (index < newCount) {\n return position + ((index - count) * group.size);\n }\n position += groupCount * group.size;\n count = newCount;\n }\n return -1;\n };\n RangeMap.prototype.dispose = function () {\n this.groups = null;\n };\n return RangeMap;\n}());\nexport { RangeMap };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { $, removeClass } from '../../dom';\nfunction removeFromParent(element) {\n try {\n element.parentElement.removeChild(element);\n }\n catch (e) {\n // this will throw if this happens due to a blur event, nasty business\n }\n}\nvar RowCache = /** @class */ (function () {\n function RowCache(renderers) {\n this.renderers = renderers;\n this.cache = new Map();\n }\n /**\n * Returns a row either by creating a new one or reusing\n * a previously released row which shares the same templateId.\n */\n RowCache.prototype.alloc = function (templateId) {\n var result = this.getTemplateCache(templateId).pop();\n if (!result) {\n var domNode = $('.monaco-list-row');\n var renderer = this.renderers.get(templateId);\n var templateData = renderer.renderTemplate(domNode);\n result = { domNode: domNode, templateId: templateId, templateData: templateData };\n }\n return result;\n };\n /**\n * Releases the row for eventual reuse.\n */\n RowCache.prototype.release = function (row) {\n if (!row) {\n return;\n }\n this.releaseRow(row);\n };\n RowCache.prototype.releaseRow = function (row) {\n var domNode = row.domNode, templateId = row.templateId;\n removeClass(domNode, 'scrolling');\n removeFromParent(domNode);\n var cache = this.getTemplateCache(templateId);\n cache.push(row);\n };\n RowCache.prototype.getTemplateCache = function (templateId) {\n var result = this.cache.get(templateId);\n if (!result) {\n result = [];\n this.cache.set(templateId, result);\n }\n return result;\n };\n RowCache.prototype.garbageCollect = function () {\n var _this = this;\n if (!this.renderers) {\n return;\n }\n this.cache.forEach(function (cachedRows, templateId) {\n for (var _i = 0, cachedRows_1 = cachedRows; _i < cachedRows_1.length; _i++) {\n var cachedRow = cachedRows_1[_i];\n var renderer = _this.renderers.get(templateId);\n renderer.disposeTemplate(cachedRow.templateData);\n cachedRow.domNode = null;\n cachedRow.templateData = null;\n }\n });\n this.cache.clear();\n };\n RowCache.prototype.dispose = function () {\n this.garbageCollect();\n this.cache.clear();\n this.renderers = null;\n };\n return RowCache;\n}());\nexport { RowCache };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { getOrDefault } from '../../../common/objects';\nimport { dispose } from '../../../common/lifecycle';\nimport { Gesture, EventType as TouchEventType } from '../../touch';\nimport * as DOM from '../../dom';\nimport { mapEvent, filterEvent } from '../../../common/event';\nimport { domEvent } from '../../event';\nimport { ScrollableElement } from '../scrollbar/scrollableElement';\nimport { ScrollbarVisibility } from '../../../common/scrollable';\nimport { RangeMap, relativeComplement, intersect, shift } from './rangeMap';\nimport { RowCache } from './rowCache';\nimport { isWindows } from '../../../common/platform';\nimport * as browser from '../../browser';\nimport { memoize } from '../../../common/decorators';\nimport { DragMouseEvent } from '../../mouseEvent';\nfunction canUseTranslate3d() {\n if (browser.isFirefox) {\n return false;\n }\n if (browser.getZoomLevel() !== 0) {\n return false;\n }\n return true;\n}\nvar DefaultOptions = {\n useShadows: true,\n verticalScrollMode: ScrollbarVisibility.Auto\n};\nvar ListView = /** @class */ (function () {\n function ListView(container, virtualDelegate, renderers, options) {\n if (options === void 0) { options = DefaultOptions; }\n this.virtualDelegate = virtualDelegate;\n this.renderers = new Map();\n this.splicing = false;\n this.items = [];\n this.itemId = 0;\n this.rangeMap = new RangeMap();\n for (var _i = 0, renderers_1 = renderers; _i < renderers_1.length; _i++) {\n var renderer = renderers_1[_i];\n this.renderers.set(renderer.templateId, renderer);\n }\n this.cache = new RowCache(this.renderers);\n this.lastRenderTop = 0;\n this.lastRenderHeight = 0;\n this._domNode = document.createElement('div');\n this._domNode.className = 'monaco-list';\n this.rowsContainer = document.createElement('div');\n this.rowsContainer.className = 'monaco-list-rows';\n Gesture.addTarget(this.rowsContainer);\n this.scrollableElement = new ScrollableElement(this.rowsContainer, {\n alwaysConsumeMouseWheel: true,\n horizontal: ScrollbarVisibility.Hidden,\n vertical: getOrDefault(options, function (o) { return o.verticalScrollMode; }, DefaultOptions.verticalScrollMode),\n useShadows: getOrDefault(options, function (o) { return o.useShadows; }, DefaultOptions.useShadows)\n });\n this._domNode.appendChild(this.scrollableElement.getDomNode());\n container.appendChild(this._domNode);\n this.disposables = [this.rangeMap, this.gesture, this.scrollableElement, this.cache];\n this.scrollableElement.onScroll(this.onScroll, this, this.disposables);\n domEvent(this.rowsContainer, TouchEventType.Change)(this.onTouchChange, this, this.disposables);\n // Prevent the monaco-scrollable-element from scrolling\n // https://github.com/Microsoft/vscode/issues/44181\n domEvent(this.scrollableElement.getDomNode(), 'scroll')(function (e) { return e.target.scrollTop = 0; }, null, this.disposables);\n var onDragOver = mapEvent(domEvent(this.rowsContainer, 'dragover'), function (e) { return new DragMouseEvent(e); });\n onDragOver(this.onDragOver, this, this.disposables);\n this.layout();\n }\n Object.defineProperty(ListView.prototype, \"domNode\", {\n get: function () {\n return this._domNode;\n },\n enumerable: true,\n configurable: true\n });\n ListView.prototype.splice = function (start, deleteCount, elements) {\n if (elements === void 0) { elements = []; }\n if (this.splicing) {\n throw new Error('Can\\'t run recursive splices.');\n }\n this.splicing = true;\n try {\n return this._splice(start, deleteCount, elements);\n }\n finally {\n this.splicing = false;\n }\n };\n ListView.prototype._splice = function (start, deleteCount, elements) {\n var _this = this;\n if (elements === void 0) { elements = []; }\n var _a, _b;\n var previousRenderRange = this.getRenderRange(this.lastRenderTop, this.lastRenderHeight);\n var deleteRange = { start: start, end: start + deleteCount };\n var removeRange = intersect(previousRenderRange, deleteRange);\n for (var i = removeRange.start; i < removeRange.end; i++) {\n this.removeItemFromDOM(i);\n }\n var previousRestRange = { start: start + deleteCount, end: this.items.length };\n var previousRenderedRestRange = intersect(previousRestRange, previousRenderRange);\n var previousUnrenderedRestRanges = relativeComplement(previousRestRange, previousRenderRange);\n var inserted = elements.map(function (element) { return ({\n id: String(_this.itemId++),\n element: element,\n size: _this.virtualDelegate.getHeight(element),\n templateId: _this.virtualDelegate.getTemplateId(element),\n row: null\n }); });\n (_a = this.rangeMap).splice.apply(_a, [start, deleteCount].concat(inserted));\n var deleted = (_b = this.items).splice.apply(_b, [start, deleteCount].concat(inserted));\n var delta = elements.length - deleteCount;\n var renderRange = this.getRenderRange(this.lastRenderTop, this.lastRenderHeight);\n var renderedRestRange = shift(previousRenderedRestRange, delta);\n var updateRange = intersect(renderRange, renderedRestRange);\n for (var i = updateRange.start; i < updateRange.end; i++) {\n this.updateItemInDOM(this.items[i], i);\n }\n var removeRanges = relativeComplement(renderedRestRange, renderRange);\n for (var r = 0; r < removeRanges.length; r++) {\n var removeRange_1 = removeRanges[r];\n for (var i = removeRange_1.start; i < removeRange_1.end; i++) {\n this.removeItemFromDOM(i);\n }\n }\n var unrenderedRestRanges = previousUnrenderedRestRanges.map(function (r) { return shift(r, delta); });\n var elementsRange = { start: start, end: start + elements.length };\n var insertRanges = [elementsRange].concat(unrenderedRestRanges).map(function (r) { return intersect(renderRange, r); });\n var beforeElement = this.getNextToLastElement(insertRanges);\n for (var r = 0; r < insertRanges.length; r++) {\n var insertRange = insertRanges[r];\n for (var i = insertRange.start; i < insertRange.end; i++) {\n this.insertItemInDOM(i, beforeElement);\n }\n }\n var scrollHeight = this.getContentHeight();\n this.rowsContainer.style.height = scrollHeight + \"px\";\n this.scrollableElement.setScrollDimensions({ scrollHeight: scrollHeight });\n return deleted.map(function (i) { return i.element; });\n };\n Object.defineProperty(ListView.prototype, \"length\", {\n get: function () {\n return this.items.length;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ListView.prototype, \"renderHeight\", {\n get: function () {\n var scrollDimensions = this.scrollableElement.getScrollDimensions();\n return scrollDimensions.height;\n },\n enumerable: true,\n configurable: true\n });\n ListView.prototype.element = function (index) {\n return this.items[index].element;\n };\n ListView.prototype.domElement = function (index) {\n var row = this.items[index].row;\n return row && row.domNode;\n };\n ListView.prototype.elementHeight = function (index) {\n return this.items[index].size;\n };\n ListView.prototype.elementTop = function (index) {\n return this.rangeMap.positionAt(index);\n };\n ListView.prototype.indexAt = function (position) {\n return this.rangeMap.indexAt(position);\n };\n ListView.prototype.indexAfter = function (position) {\n return this.rangeMap.indexAfter(position);\n };\n ListView.prototype.layout = function (height) {\n this.scrollableElement.setScrollDimensions({\n height: height || DOM.getContentHeight(this._domNode)\n });\n };\n // Render\n ListView.prototype.render = function (renderTop, renderHeight) {\n var previousRenderRange = this.getRenderRange(this.lastRenderTop, this.lastRenderHeight);\n var renderRange = this.getRenderRange(renderTop, renderHeight);\n var rangesToInsert = relativeComplement(renderRange, previousRenderRange);\n var rangesToRemove = relativeComplement(previousRenderRange, renderRange);\n var beforeElement = this.getNextToLastElement(rangesToInsert);\n for (var _i = 0, rangesToInsert_1 = rangesToInsert; _i < rangesToInsert_1.length; _i++) {\n var range = rangesToInsert_1[_i];\n for (var i = range.start; i < range.end; i++) {\n this.insertItemInDOM(i, beforeElement);\n }\n }\n for (var _a = 0, rangesToRemove_1 = rangesToRemove; _a < rangesToRemove_1.length; _a++) {\n var range = rangesToRemove_1[_a];\n for (var i = range.start; i < range.end; i++) {\n this.removeItemFromDOM(i);\n }\n }\n if (canUseTranslate3d() && !isWindows /* Windows: translate3d breaks subpixel-antialias (ClearType) unless a background is defined */) {\n var transform = \"translate3d(0px, -\" + renderTop + \"px, 0px)\";\n this.rowsContainer.style.transform = transform;\n this.rowsContainer.style.webkitTransform = transform;\n }\n else {\n this.rowsContainer.style.top = \"-\" + renderTop + \"px\";\n }\n this.lastRenderTop = renderTop;\n this.lastRenderHeight = renderHeight;\n };\n // DOM operations\n ListView.prototype.insertItemInDOM = function (index, beforeElement) {\n var item = this.items[index];\n if (!item.row) {\n item.row = this.cache.alloc(item.templateId);\n }\n if (!item.row.domNode.parentElement) {\n if (beforeElement) {\n this.rowsContainer.insertBefore(item.row.domNode, beforeElement);\n }\n else {\n this.rowsContainer.appendChild(item.row.domNode);\n }\n }\n item.row.domNode.style.height = item.size + \"px\";\n this.updateItemInDOM(item, index);\n var renderer = this.renderers.get(item.templateId);\n renderer.renderElement(item.element, index, item.row.templateData);\n };\n ListView.prototype.updateItemInDOM = function (item, index) {\n item.row.domNode.style.top = this.elementTop(index) + \"px\";\n item.row.domNode.setAttribute('data-index', \"\" + index);\n item.row.domNode.setAttribute('data-last-element', index === this.length - 1 ? 'true' : 'false');\n item.row.domNode.setAttribute('aria-setsize', \"\" + this.length);\n item.row.domNode.setAttribute('aria-posinset', \"\" + (index + 1));\n };\n ListView.prototype.removeItemFromDOM = function (index) {\n var item = this.items[index];\n var renderer = this.renderers.get(item.templateId);\n if (renderer.disposeElement) {\n renderer.disposeElement(item.element, index, item.row.templateData);\n }\n this.cache.release(item.row);\n item.row = null;\n };\n ListView.prototype.getContentHeight = function () {\n return this.rangeMap.size;\n };\n ListView.prototype.getScrollTop = function () {\n var scrollPosition = this.scrollableElement.getScrollPosition();\n return scrollPosition.scrollTop;\n };\n ListView.prototype.setScrollTop = function (scrollTop) {\n this.scrollableElement.setScrollPosition({ scrollTop: scrollTop });\n };\n Object.defineProperty(ListView.prototype, \"scrollTop\", {\n get: function () {\n return this.getScrollTop();\n },\n set: function (scrollTop) {\n this.setScrollTop(scrollTop);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ListView.prototype, \"onMouseClick\", {\n // Events\n get: function () {\n var _this = this;\n return filterEvent(mapEvent(domEvent(this.domNode, 'click'), function (e) { return _this.toMouseEvent(e); }), function (e) { return e.index >= 0; });\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ListView.prototype, \"onMouseDblClick\", {\n get: function () {\n var _this = this;\n return filterEvent(mapEvent(domEvent(this.domNode, 'dblclick'), function (e) { return _this.toMouseEvent(e); }), function (e) { return e.index >= 0; });\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ListView.prototype, \"onMouseDown\", {\n get: function () {\n var _this = this;\n return filterEvent(mapEvent(domEvent(this.domNode, 'mousedown'), function (e) { return _this.toMouseEvent(e); }), function (e) { return e.index >= 0; });\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ListView.prototype, \"onContextMenu\", {\n get: function () {\n var _this = this;\n return filterEvent(mapEvent(domEvent(this.domNode, 'contextmenu'), function (e) { return _this.toMouseEvent(e); }), function (e) { return e.index >= 0; });\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ListView.prototype, \"onTouchStart\", {\n get: function () {\n var _this = this;\n return filterEvent(mapEvent(domEvent(this.domNode, 'touchstart'), function (e) { return _this.toTouchEvent(e); }), function (e) { return e.index >= 0; });\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ListView.prototype, \"onTap\", {\n get: function () {\n var _this = this;\n return filterEvent(mapEvent(domEvent(this.rowsContainer, TouchEventType.Tap), function (e) { return _this.toGestureEvent(e); }), function (e) { return e.index >= 0; });\n },\n enumerable: true,\n configurable: true\n });\n ListView.prototype.toMouseEvent = function (browserEvent) {\n var index = this.getItemIndexFromEventTarget(browserEvent.target);\n var item = index < 0 ? undefined : this.items[index];\n var element = item && item.element;\n return { browserEvent: browserEvent, index: index, element: element };\n };\n ListView.prototype.toTouchEvent = function (browserEvent) {\n var index = this.getItemIndexFromEventTarget(browserEvent.target);\n var item = index < 0 ? undefined : this.items[index];\n var element = item && item.element;\n return { browserEvent: browserEvent, index: index, element: element };\n };\n ListView.prototype.toGestureEvent = function (browserEvent) {\n var index = this.getItemIndexFromEventTarget(browserEvent.initialTarget);\n var item = index < 0 ? undefined : this.items[index];\n var element = item && item.element;\n return { browserEvent: browserEvent, index: index, element: element };\n };\n ListView.prototype.onScroll = function (e) {\n try {\n this.render(e.scrollTop, e.height);\n }\n catch (err) {\n console.log('Got bad scroll event:', e);\n throw err;\n }\n };\n ListView.prototype.onTouchChange = function (event) {\n event.preventDefault();\n event.stopPropagation();\n this.scrollTop -= event.translationY;\n };\n ListView.prototype.onDragOver = function (event) {\n this.setupDragAndDropScrollInterval();\n this.dragAndDropMouseY = event.posy;\n };\n ListView.prototype.setupDragAndDropScrollInterval = function () {\n var _this = this;\n var viewTop = DOM.getTopLeftOffset(this._domNode).top;\n if (!this.dragAndDropScrollInterval) {\n this.dragAndDropScrollInterval = window.setInterval(function () {\n if (_this.dragAndDropMouseY === undefined) {\n return;\n }\n var diff = _this.dragAndDropMouseY - viewTop;\n var scrollDiff = 0;\n var upperLimit = _this.renderHeight - 35;\n if (diff < 35) {\n scrollDiff = Math.max(-14, 0.2 * (diff - 35));\n }\n else if (diff > upperLimit) {\n scrollDiff = Math.min(14, 0.2 * (diff - upperLimit));\n }\n _this.scrollTop += scrollDiff;\n }, 10);\n this.cancelDragAndDropScrollTimeout();\n this.dragAndDropScrollTimeout = window.setTimeout(function () {\n _this.cancelDragAndDropScrollInterval();\n _this.dragAndDropScrollTimeout = null;\n }, 1000);\n }\n };\n ListView.prototype.cancelDragAndDropScrollInterval = function () {\n if (this.dragAndDropScrollInterval) {\n window.clearInterval(this.dragAndDropScrollInterval);\n this.dragAndDropScrollInterval = null;\n }\n this.cancelDragAndDropScrollTimeout();\n };\n ListView.prototype.cancelDragAndDropScrollTimeout = function () {\n if (this.dragAndDropScrollTimeout) {\n window.clearTimeout(this.dragAndDropScrollTimeout);\n this.dragAndDropScrollTimeout = null;\n }\n };\n // Util\n ListView.prototype.getItemIndexFromEventTarget = function (target) {\n while (target instanceof HTMLElement && target !== this.rowsContainer) {\n var element = target;\n var rawIndex = element.getAttribute('data-index');\n if (rawIndex) {\n var index = Number(rawIndex);\n if (!isNaN(index)) {\n return index;\n }\n }\n target = element.parentElement;\n }\n return -1;\n };\n ListView.prototype.getRenderRange = function (renderTop, renderHeight) {\n return {\n start: this.rangeMap.indexAt(renderTop),\n end: this.rangeMap.indexAfter(renderTop + renderHeight - 1)\n };\n };\n ListView.prototype.getNextToLastElement = function (ranges) {\n var lastRange = ranges[ranges.length - 1];\n if (!lastRange) {\n return null;\n }\n var nextToLastItem = this.items[lastRange.end];\n if (!nextToLastItem) {\n return null;\n }\n if (!nextToLastItem.row) {\n return null;\n }\n return nextToLastItem.row.domNode;\n };\n // Dispose\n ListView.prototype.dispose = function () {\n if (this.items) {\n for (var _i = 0, _a = this.items; _i < _a.length; _i++) {\n var item = _a[_i];\n if (item.row) {\n var renderer = this.renderers.get(item.row.templateId);\n renderer.disposeTemplate(item.row.templateData);\n item.row = null;\n }\n }\n this.items = null;\n }\n if (this._domNode && this._domNode.parentElement) {\n this._domNode.parentNode.removeChild(this._domNode);\n this._domNode = null;\n }\n this.disposables = dispose(this.disposables);\n };\n __decorate([\n memoize\n ], ListView.prototype, \"onMouseClick\", null);\n __decorate([\n memoize\n ], ListView.prototype, \"onMouseDblClick\", null);\n __decorate([\n memoize\n ], ListView.prototype, \"onMouseDown\", null);\n __decorate([\n memoize\n ], ListView.prototype, \"onContextMenu\", null);\n __decorate([\n memoize\n ], ListView.prototype, \"onTouchStart\", null);\n __decorate([\n memoize\n ], ListView.prototype, \"onTap\", null);\n return ListView;\n}());\nexport { ListView };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar CombinedSpliceable = /** @class */ (function () {\n function CombinedSpliceable(spliceables) {\n this.spliceables = spliceables;\n }\n CombinedSpliceable.prototype.splice = function (start, deleteCount, elements) {\n this.spliceables.forEach(function (s) { return s.splice(start, deleteCount, elements); });\n };\n return CombinedSpliceable;\n}());\nexport { CombinedSpliceable };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport './list.css';\nimport { localize } from '../../../../nls';\nimport { dispose } from '../../../common/lifecycle';\nimport { isNumber } from '../../../common/types';\nimport { range, firstIndex } from '../../../common/arrays';\nimport { memoize } from '../../../common/decorators';\nimport * as DOM from '../../dom';\nimport * as platform from '../../../common/platform';\nimport { Gesture } from '../../touch';\nimport { StandardKeyboardEvent } from '../../keyboardEvent';\nimport { Event, Emitter, EventBufferer, chain, mapEvent, anyEvent } from '../../../common/event';\nimport { domEvent } from '../../event';\nimport { ListView } from './listView';\nimport { Color } from '../../../common/color';\nimport { mixin } from '../../../common/objects';\nimport { CombinedSpliceable } from './splice';\nimport { clamp } from '../../../common/numbers';\nvar TraitRenderer = /** @class */ (function () {\n function TraitRenderer(trait) {\n this.trait = trait;\n this.renderedElements = [];\n }\n Object.defineProperty(TraitRenderer.prototype, \"templateId\", {\n get: function () {\n return \"template:\" + this.trait.trait;\n },\n enumerable: true,\n configurable: true\n });\n TraitRenderer.prototype.renderTemplate = function (container) {\n return container;\n };\n TraitRenderer.prototype.renderElement = function (element, index, templateData) {\n var renderedElementIndex = firstIndex(this.renderedElements, function (el) { return el.templateData === templateData; });\n if (renderedElementIndex >= 0) {\n var rendered = this.renderedElements[renderedElementIndex];\n this.trait.unrender(templateData);\n rendered.index = index;\n }\n else {\n var rendered = { index: index, templateData: templateData };\n this.renderedElements.push(rendered);\n }\n this.trait.renderIndex(index, templateData);\n };\n TraitRenderer.prototype.disposeElement = function () {\n // noop\n };\n TraitRenderer.prototype.splice = function (start, deleteCount, insertCount) {\n var rendered = [];\n for (var i = 0; i < this.renderedElements.length; i++) {\n var renderedElement = this.renderedElements[i];\n if (renderedElement.index < start) {\n rendered.push(renderedElement);\n }\n else if (renderedElement.index >= start + deleteCount) {\n rendered.push({\n index: renderedElement.index + insertCount - deleteCount,\n templateData: renderedElement.templateData\n });\n }\n }\n this.renderedElements = rendered;\n };\n TraitRenderer.prototype.renderIndexes = function (indexes) {\n for (var _i = 0, _a = this.renderedElements; _i < _a.length; _i++) {\n var _b = _a[_i], index = _b.index, templateData = _b.templateData;\n if (indexes.indexOf(index) > -1) {\n this.trait.renderIndex(index, templateData);\n }\n }\n };\n TraitRenderer.prototype.disposeTemplate = function (templateData) {\n var index = firstIndex(this.renderedElements, function (el) { return el.templateData === templateData; });\n if (index < 0) {\n return;\n }\n this.renderedElements.splice(index, 1);\n };\n return TraitRenderer;\n}());\nvar Trait = /** @class */ (function () {\n function Trait(_trait) {\n this._trait = _trait;\n this._onChange = new Emitter();\n this.indexes = [];\n }\n Object.defineProperty(Trait.prototype, \"onChange\", {\n get: function () { return this._onChange.event; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Trait.prototype, \"trait\", {\n get: function () { return this._trait; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Trait.prototype, \"renderer\", {\n get: function () {\n return new TraitRenderer(this);\n },\n enumerable: true,\n configurable: true\n });\n Trait.prototype.splice = function (start, deleteCount, elements) {\n var diff = elements.length - deleteCount;\n var end = start + deleteCount;\n var indexes = this.indexes.filter(function (i) { return i < start; }).concat(elements.map(function (hasTrait, i) { return hasTrait ? i + start : -1; }).filter(function (i) { return i !== -1; }), this.indexes.filter(function (i) { return i >= end; }).map(function (i) { return i + diff; }));\n this.renderer.splice(start, deleteCount, elements.length);\n this.set(indexes);\n };\n Trait.prototype.renderIndex = function (index, container) {\n DOM.toggleClass(container, this._trait, this.contains(index));\n };\n Trait.prototype.unrender = function (container) {\n DOM.removeClass(container, this._trait);\n };\n /**\n * Sets the indexes which should have this trait.\n *\n * @param indexes Indexes which should have this trait.\n * @return The old indexes which had this trait.\n */\n Trait.prototype.set = function (indexes) {\n var result = this.indexes;\n this.indexes = indexes;\n var toRender = disjunction(result, indexes);\n this.renderer.renderIndexes(toRender);\n this._onChange.fire({ indexes: indexes });\n return result;\n };\n Trait.prototype.get = function () {\n return this.indexes;\n };\n Trait.prototype.contains = function (index) {\n return this.indexes.some(function (i) { return i === index; });\n };\n Trait.prototype.dispose = function () {\n this.indexes = null;\n this._onChange = dispose(this._onChange);\n };\n __decorate([\n memoize\n ], Trait.prototype, \"renderer\", null);\n return Trait;\n}());\nvar FocusTrait = /** @class */ (function (_super) {\n __extends(FocusTrait, _super);\n function FocusTrait(getDomId) {\n var _this = _super.call(this, 'focused') || this;\n _this.getDomId = getDomId;\n return _this;\n }\n FocusTrait.prototype.renderIndex = function (index, container) {\n _super.prototype.renderIndex.call(this, index, container);\n container.setAttribute('role', 'treeitem');\n container.setAttribute('id', this.getDomId(index));\n };\n return FocusTrait;\n}(Trait));\n/**\n * The TraitSpliceable is used as a util class to be able\n * to preserve traits across splice calls, given an identity\n * provider.\n */\nvar TraitSpliceable = /** @class */ (function () {\n function TraitSpliceable(trait, view, getId) {\n this.trait = trait;\n this.view = view;\n this.getId = getId;\n }\n TraitSpliceable.prototype.splice = function (start, deleteCount, elements) {\n var _this = this;\n if (!this.getId) {\n return this.trait.splice(start, deleteCount, elements.map(function (e) { return false; }));\n }\n var pastElementsWithTrait = this.trait.get().map(function (i) { return _this.getId(_this.view.element(i)); });\n var elementsWithTrait = elements.map(function (e) { return pastElementsWithTrait.indexOf(_this.getId(e)) > -1; });\n this.trait.splice(start, deleteCount, elementsWithTrait);\n };\n return TraitSpliceable;\n}());\nfunction isInputElement(e) {\n return e.tagName === 'INPUT' || e.tagName === 'TEXTAREA';\n}\nvar KeyboardController = /** @class */ (function () {\n function KeyboardController(list, view, options) {\n this.list = list;\n this.view = view;\n var multipleSelectionSupport = !(options.multipleSelectionSupport === false);\n this.disposables = [];\n this.openController = options.openController || DefaultOpenController;\n var onKeyDown = chain(domEvent(view.domNode, 'keydown'))\n .filter(function (e) { return !isInputElement(e.target); })\n .map(function (e) { return new StandardKeyboardEvent(e); });\n onKeyDown.filter(function (e) { return e.keyCode === 3 /* Enter */; }).on(this.onEnter, this, this.disposables);\n onKeyDown.filter(function (e) { return e.keyCode === 16 /* UpArrow */; }).on(this.onUpArrow, this, this.disposables);\n onKeyDown.filter(function (e) { return e.keyCode === 18 /* DownArrow */; }).on(this.onDownArrow, this, this.disposables);\n onKeyDown.filter(function (e) { return e.keyCode === 11 /* PageUp */; }).on(this.onPageUpArrow, this, this.disposables);\n onKeyDown.filter(function (e) { return e.keyCode === 12 /* PageDown */; }).on(this.onPageDownArrow, this, this.disposables);\n onKeyDown.filter(function (e) { return e.keyCode === 9 /* Escape */; }).on(this.onEscape, this, this.disposables);\n if (multipleSelectionSupport) {\n onKeyDown.filter(function (e) { return (platform.isMacintosh ? e.metaKey : e.ctrlKey) && e.keyCode === 31 /* KEY_A */; }).on(this.onCtrlA, this, this.disposables);\n }\n }\n KeyboardController.prototype.onEnter = function (e) {\n e.preventDefault();\n e.stopPropagation();\n this.list.setSelection(this.list.getFocus());\n if (this.openController.shouldOpen(e.browserEvent)) {\n this.list.open(this.list.getFocus(), e.browserEvent);\n }\n };\n KeyboardController.prototype.onUpArrow = function (e) {\n e.preventDefault();\n e.stopPropagation();\n this.list.focusPrevious();\n this.list.reveal(this.list.getFocus()[0]);\n this.view.domNode.focus();\n };\n KeyboardController.prototype.onDownArrow = function (e) {\n e.preventDefault();\n e.stopPropagation();\n this.list.focusNext();\n this.list.reveal(this.list.getFocus()[0]);\n this.view.domNode.focus();\n };\n KeyboardController.prototype.onPageUpArrow = function (e) {\n e.preventDefault();\n e.stopPropagation();\n this.list.focusPreviousPage();\n this.list.reveal(this.list.getFocus()[0]);\n this.view.domNode.focus();\n };\n KeyboardController.prototype.onPageDownArrow = function (e) {\n e.preventDefault();\n e.stopPropagation();\n this.list.focusNextPage();\n this.list.reveal(this.list.getFocus()[0]);\n this.view.domNode.focus();\n };\n KeyboardController.prototype.onCtrlA = function (e) {\n e.preventDefault();\n e.stopPropagation();\n this.list.setSelection(range(this.list.length));\n this.view.domNode.focus();\n };\n KeyboardController.prototype.onEscape = function (e) {\n e.preventDefault();\n e.stopPropagation();\n this.list.setSelection([]);\n this.view.domNode.focus();\n };\n KeyboardController.prototype.dispose = function () {\n this.disposables = dispose(this.disposables);\n };\n return KeyboardController;\n}());\nvar DOMFocusController = /** @class */ (function () {\n function DOMFocusController(list, view) {\n this.list = list;\n this.view = view;\n this.disposables = [];\n this.disposables = [];\n var onKeyDown = chain(domEvent(view.domNode, 'keydown'))\n .filter(function (e) { return !isInputElement(e.target); })\n .map(function (e) { return new StandardKeyboardEvent(e); });\n onKeyDown.filter(function (e) { return e.keyCode === 2 /* Tab */ && !e.ctrlKey && !e.metaKey && !e.shiftKey && !e.altKey; })\n .on(this.onTab, this, this.disposables);\n }\n DOMFocusController.prototype.onTab = function (e) {\n if (e.target !== this.view.domNode) {\n return;\n }\n var focus = this.list.getFocus();\n if (focus.length === 0) {\n return;\n }\n var focusedDomElement = this.view.domElement(focus[0]);\n var tabIndexElement = focusedDomElement.querySelector('[tabIndex]');\n if (!tabIndexElement || !(tabIndexElement instanceof HTMLElement)) {\n return;\n }\n var style = window.getComputedStyle(tabIndexElement);\n if (style.visibility === 'hidden' || style.display === 'none') {\n return;\n }\n e.preventDefault();\n e.stopPropagation();\n tabIndexElement.focus();\n };\n DOMFocusController.prototype.dispose = function () {\n this.disposables = dispose(this.disposables);\n };\n return DOMFocusController;\n}());\nexport function isSelectionSingleChangeEvent(event) {\n return platform.isMacintosh ? event.browserEvent.metaKey : event.browserEvent.ctrlKey;\n}\nexport function isSelectionRangeChangeEvent(event) {\n return event.browserEvent.shiftKey;\n}\nfunction isMouseRightClick(event) {\n return event instanceof MouseEvent && event.button === 2;\n}\nvar DefaultMultipleSelectionContoller = {\n isSelectionSingleChangeEvent: isSelectionSingleChangeEvent,\n isSelectionRangeChangeEvent: isSelectionRangeChangeEvent\n};\nvar DefaultOpenController = {\n shouldOpen: function (event) {\n if (event instanceof MouseEvent) {\n return !isMouseRightClick(event);\n }\n return true;\n }\n};\nvar MouseController = /** @class */ (function () {\n function MouseController(list, view, options) {\n if (options === void 0) { options = {}; }\n this.list = list;\n this.view = view;\n this.options = options;\n this.didJustPressContextMenuKey = false;\n this.disposables = [];\n this.multipleSelectionSupport = !(options.multipleSelectionSupport === false);\n if (this.multipleSelectionSupport) {\n this.multipleSelectionController = options.multipleSelectionController || DefaultMultipleSelectionContoller;\n }\n this.openController = options.openController || DefaultOpenController;\n view.onMouseDown(this.onMouseDown, this, this.disposables);\n view.onMouseClick(this.onPointer, this, this.disposables);\n view.onMouseDblClick(this.onDoubleClick, this, this.disposables);\n view.onTouchStart(this.onMouseDown, this, this.disposables);\n view.onTap(this.onPointer, this, this.disposables);\n Gesture.addTarget(view.domNode);\n }\n Object.defineProperty(MouseController.prototype, \"onContextMenu\", {\n get: function () {\n var _this = this;\n var fromKeydown = chain(domEvent(this.view.domNode, 'keydown'))\n .map(function (e) { return new StandardKeyboardEvent(e); })\n .filter(function (e) { return _this.didJustPressContextMenuKey = e.keyCode === 58 /* ContextMenu */ || (e.shiftKey && e.keyCode === 68 /* F10 */); })\n .filter(function (e) { e.preventDefault(); e.stopPropagation(); return false; })\n .event;\n var fromKeyup = chain(domEvent(this.view.domNode, 'keyup'))\n .filter(function () {\n var didJustPressContextMenuKey = _this.didJustPressContextMenuKey;\n _this.didJustPressContextMenuKey = false;\n return didJustPressContextMenuKey;\n })\n .filter(function () { return _this.list.getFocus().length > 0; })\n .map(function () {\n var index = _this.list.getFocus()[0];\n var element = _this.view.element(index);\n var anchor = _this.view.domElement(index);\n return { index: index, element: element, anchor: anchor };\n })\n .filter(function (_a) {\n var anchor = _a.anchor;\n return !!anchor;\n })\n .event;\n var fromMouse = chain(this.view.onContextMenu)\n .filter(function () { return !_this.didJustPressContextMenuKey; })\n .map(function (_a) {\n var element = _a.element, index = _a.index, browserEvent = _a.browserEvent;\n return ({ element: element, index: index, anchor: { x: browserEvent.clientX + 1, y: browserEvent.clientY } });\n })\n .event;\n return anyEvent(fromKeydown, fromKeyup, fromMouse);\n },\n enumerable: true,\n configurable: true\n });\n MouseController.prototype.isSelectionSingleChangeEvent = function (event) {\n if (this.multipleSelectionController) {\n return this.multipleSelectionController.isSelectionSingleChangeEvent(event);\n }\n return platform.isMacintosh ? event.browserEvent.metaKey : event.browserEvent.ctrlKey;\n };\n MouseController.prototype.isSelectionRangeChangeEvent = function (event) {\n if (this.multipleSelectionController) {\n return this.multipleSelectionController.isSelectionRangeChangeEvent(event);\n }\n return event.browserEvent.shiftKey;\n };\n MouseController.prototype.isSelectionChangeEvent = function (event) {\n return this.isSelectionSingleChangeEvent(event) || this.isSelectionRangeChangeEvent(event);\n };\n MouseController.prototype.onMouseDown = function (e) {\n if (this.options.focusOnMouseDown === false) {\n e.browserEvent.preventDefault();\n e.browserEvent.stopPropagation();\n }\n else if (document.activeElement !== e.browserEvent.target) {\n this.view.domNode.focus();\n }\n var reference = this.list.getFocus()[0];\n var selection = this.list.getSelection();\n reference = reference === undefined ? selection[0] : reference;\n if (this.multipleSelectionSupport && this.isSelectionRangeChangeEvent(e)) {\n return this.changeSelection(e, reference);\n }\n var focus = e.index;\n if (selection.every(function (s) { return s !== focus; })) {\n this.list.setFocus([focus]);\n }\n if (this.multipleSelectionSupport && this.isSelectionChangeEvent(e)) {\n return this.changeSelection(e, reference);\n }\n if (this.options.selectOnMouseDown && !isMouseRightClick(e.browserEvent)) {\n this.list.setSelection([focus]);\n if (this.openController.shouldOpen(e.browserEvent)) {\n this.list.open([focus], e.browserEvent);\n }\n }\n };\n MouseController.prototype.onPointer = function (e) {\n if (this.multipleSelectionSupport && this.isSelectionChangeEvent(e)) {\n return;\n }\n if (!this.options.selectOnMouseDown) {\n var focus_1 = this.list.getFocus();\n this.list.setSelection(focus_1);\n if (this.openController.shouldOpen(e.browserEvent)) {\n this.list.open(focus_1, e.browserEvent);\n }\n }\n };\n MouseController.prototype.onDoubleClick = function (e) {\n if (this.multipleSelectionSupport && this.isSelectionChangeEvent(e)) {\n return;\n }\n var focus = this.list.getFocus();\n this.list.setSelection(focus);\n this.list.pin(focus);\n };\n MouseController.prototype.changeSelection = function (e, reference) {\n var focus = e.index;\n if (this.isSelectionRangeChangeEvent(e) && reference !== undefined) {\n var min = Math.min(reference, focus);\n var max = Math.max(reference, focus);\n var rangeSelection = range(min, max + 1);\n var selection = this.list.getSelection();\n var contiguousRange = getContiguousRangeContaining(disjunction(selection, [reference]), reference);\n if (contiguousRange.length === 0) {\n return;\n }\n var newSelection = disjunction(rangeSelection, relativeComplement(selection, contiguousRange));\n this.list.setSelection(newSelection);\n }\n else if (this.isSelectionSingleChangeEvent(e)) {\n var selection = this.list.getSelection();\n var newSelection = selection.filter(function (i) { return i !== focus; });\n if (selection.length === newSelection.length) {\n this.list.setSelection(newSelection.concat([focus]));\n }\n else {\n this.list.setSelection(newSelection);\n }\n }\n };\n MouseController.prototype.dispose = function () {\n this.disposables = dispose(this.disposables);\n };\n __decorate([\n memoize\n ], MouseController.prototype, \"onContextMenu\", null);\n return MouseController;\n}());\nvar DefaultStyleController = /** @class */ (function () {\n function DefaultStyleController(styleElement, selectorSuffix) {\n this.styleElement = styleElement;\n this.selectorSuffix = selectorSuffix;\n }\n DefaultStyleController.prototype.style = function (styles) {\n var suffix = this.selectorSuffix ? \".\" + this.selectorSuffix : '';\n var content = [];\n if (styles.listFocusBackground) {\n content.push(\".monaco-list\" + suffix + \":focus .monaco-list-row.focused { background-color: \" + styles.listFocusBackground + \"; }\");\n content.push(\".monaco-list\" + suffix + \":focus .monaco-list-row.focused:hover { background-color: \" + styles.listFocusBackground + \"; }\"); // overwrite :hover style in this case!\n }\n if (styles.listFocusForeground) {\n content.push(\".monaco-list\" + suffix + \":focus .monaco-list-row.focused { color: \" + styles.listFocusForeground + \"; }\");\n }\n if (styles.listActiveSelectionBackground) {\n content.push(\".monaco-list\" + suffix + \":focus .monaco-list-row.selected { background-color: \" + styles.listActiveSelectionBackground + \"; }\");\n content.push(\".monaco-list\" + suffix + \":focus .monaco-list-row.selected:hover { background-color: \" + styles.listActiveSelectionBackground + \"; }\"); // overwrite :hover style in this case!\n }\n if (styles.listActiveSelectionForeground) {\n content.push(\".monaco-list\" + suffix + \":focus .monaco-list-row.selected { color: \" + styles.listActiveSelectionForeground + \"; }\");\n }\n if (styles.listFocusAndSelectionBackground) {\n content.push(\".monaco-list\" + suffix + \":focus .monaco-list-row.selected.focused { background-color: \" + styles.listFocusAndSelectionBackground + \"; }\");\n }\n if (styles.listFocusAndSelectionForeground) {\n content.push(\".monaco-list\" + suffix + \":focus .monaco-list-row.selected.focused { color: \" + styles.listFocusAndSelectionForeground + \"; }\");\n }\n if (styles.listInactiveFocusBackground) {\n content.push(\".monaco-list\" + suffix + \" .monaco-list-row.focused { background-color: \" + styles.listInactiveFocusBackground + \"; }\");\n content.push(\".monaco-list\" + suffix + \" .monaco-list-row.focused:hover { background-color: \" + styles.listInactiveFocusBackground + \"; }\"); // overwrite :hover style in this case!\n }\n if (styles.listInactiveSelectionBackground) {\n content.push(\".monaco-list\" + suffix + \" .monaco-list-row.selected { background-color: \" + styles.listInactiveSelectionBackground + \"; }\");\n content.push(\".monaco-list\" + suffix + \" .monaco-list-row.selected:hover { background-color: \" + styles.listInactiveSelectionBackground + \"; }\"); // overwrite :hover style in this case!\n }\n if (styles.listInactiveSelectionForeground) {\n content.push(\".monaco-list\" + suffix + \" .monaco-list-row.selected { color: \" + styles.listInactiveSelectionForeground + \"; }\");\n }\n if (styles.listHoverBackground) {\n content.push(\".monaco-list\" + suffix + \" .monaco-list-row:hover { background-color: \" + styles.listHoverBackground + \"; }\");\n }\n if (styles.listHoverForeground) {\n content.push(\".monaco-list\" + suffix + \" .monaco-list-row:hover { color: \" + styles.listHoverForeground + \"; }\");\n }\n if (styles.listSelectionOutline) {\n content.push(\".monaco-list\" + suffix + \" .monaco-list-row.selected { outline: 1px dotted \" + styles.listSelectionOutline + \"; outline-offset: -1px; }\");\n }\n if (styles.listFocusOutline) {\n content.push(\".monaco-list\" + suffix + \":focus .monaco-list-row.focused { outline: 1px solid \" + styles.listFocusOutline + \"; outline-offset: -1px; }\");\n }\n if (styles.listInactiveFocusOutline) {\n content.push(\".monaco-list\" + suffix + \" .monaco-list-row.focused { outline: 1px dotted \" + styles.listInactiveFocusOutline + \"; outline-offset: -1px; }\");\n }\n if (styles.listHoverOutline) {\n content.push(\".monaco-list\" + suffix + \" .monaco-list-row:hover { outline: 1px dashed \" + styles.listHoverOutline + \"; outline-offset: -1px; }\");\n }\n var newStyles = content.join('\\n');\n if (newStyles !== this.styleElement.innerHTML) {\n this.styleElement.innerHTML = newStyles;\n }\n };\n return DefaultStyleController;\n}());\nexport { DefaultStyleController };\nvar defaultStyles = {\n listFocusBackground: Color.fromHex('#073655'),\n listActiveSelectionBackground: Color.fromHex('#0E639C'),\n listActiveSelectionForeground: Color.fromHex('#FFFFFF'),\n listFocusAndSelectionBackground: Color.fromHex('#094771'),\n listFocusAndSelectionForeground: Color.fromHex('#FFFFFF'),\n listInactiveSelectionBackground: Color.fromHex('#3F3F46'),\n listHoverBackground: Color.fromHex('#2A2D2E'),\n listDropBackground: Color.fromHex('#383B3D')\n};\nvar DefaultOptions = {\n keyboardSupport: true,\n mouseSupport: true,\n multipleSelectionSupport: true\n};\n// TODO@Joao: move these utils into a SortedArray class\nfunction getContiguousRangeContaining(range, value) {\n var index = range.indexOf(value);\n if (index === -1) {\n return [];\n }\n var result = [];\n var i = index - 1;\n while (i >= 0 && range[i] === value - (index - i)) {\n result.push(range[i--]);\n }\n result.reverse();\n i = index;\n while (i < range.length && range[i] === value + (i - index)) {\n result.push(range[i++]);\n }\n return result;\n}\n/**\n * Given two sorted collections of numbers, returns the intersection\n * betweem them (OR).\n */\nfunction disjunction(one, other) {\n var result = [];\n var i = 0, j = 0;\n while (i < one.length || j < other.length) {\n if (i >= one.length) {\n result.push(other[j++]);\n }\n else if (j >= other.length) {\n result.push(one[i++]);\n }\n else if (one[i] === other[j]) {\n result.push(one[i]);\n i++;\n j++;\n continue;\n }\n else if (one[i] < other[j]) {\n result.push(one[i++]);\n }\n else {\n result.push(other[j++]);\n }\n }\n return result;\n}\n/**\n * Given two sorted collections of numbers, returns the relative\n * complement between them (XOR).\n */\nfunction relativeComplement(one, other) {\n var result = [];\n var i = 0, j = 0;\n while (i < one.length || j < other.length) {\n if (i >= one.length) {\n result.push(other[j++]);\n }\n else if (j >= other.length) {\n result.push(one[i++]);\n }\n else if (one[i] === other[j]) {\n i++;\n j++;\n continue;\n }\n else if (one[i] < other[j]) {\n result.push(one[i++]);\n }\n else {\n j++;\n }\n }\n return result;\n}\nvar numericSort = function (a, b) { return a - b; };\nvar PipelineRenderer = /** @class */ (function () {\n function PipelineRenderer(_templateId, renderers) {\n this._templateId = _templateId;\n this.renderers = renderers;\n }\n Object.defineProperty(PipelineRenderer.prototype, \"templateId\", {\n get: function () {\n return this._templateId;\n },\n enumerable: true,\n configurable: true\n });\n PipelineRenderer.prototype.renderTemplate = function (container) {\n return this.renderers.map(function (r) { return r.renderTemplate(container); });\n };\n PipelineRenderer.prototype.renderElement = function (element, index, templateData) {\n var i = 0;\n for (var _i = 0, _a = this.renderers; _i < _a.length; _i++) {\n var renderer = _a[_i];\n renderer.renderElement(element, index, templateData[i++]);\n }\n };\n PipelineRenderer.prototype.disposeElement = function (element, index, templateData) {\n var i = 0;\n for (var _i = 0, _a = this.renderers; _i < _a.length; _i++) {\n var renderer = _a[_i];\n renderer.disposeElement(element, index, templateData[i++]);\n }\n };\n PipelineRenderer.prototype.disposeTemplate = function (templateData) {\n var i = 0;\n for (var _i = 0, _a = this.renderers; _i < _a.length; _i++) {\n var renderer = _a[_i];\n renderer.disposeTemplate(templateData[i++]);\n }\n };\n return PipelineRenderer;\n}());\nvar List = /** @class */ (function () {\n function List(container, virtualDelegate, renderers, options) {\n if (options === void 0) { options = DefaultOptions; }\n var _this = this;\n this.idPrefix = \"list_id_\" + ++List.InstanceCount;\n this.eventBufferer = new EventBufferer();\n this.onContextMenu = Event.None;\n this._onOpen = new Emitter();\n this._onPin = new Emitter();\n this._onDidDispose = new Emitter();\n this.focus = new FocusTrait(function (i) { return _this.getElementDomId(i); });\n this.selection = new Trait('selected');\n mixin(options, defaultStyles, false);\n renderers = renderers.map(function (r) { return new PipelineRenderer(r.templateId, [_this.focus.renderer, _this.selection.renderer, r]); });\n this.view = new ListView(container, virtualDelegate, renderers, options);\n this.view.domNode.setAttribute('role', 'tree');\n DOM.addClass(this.view.domNode, this.idPrefix);\n this.view.domNode.tabIndex = 0;\n this.styleElement = DOM.createStyleSheet(this.view.domNode);\n this.styleController = options.styleController;\n if (!this.styleController) {\n this.styleController = new DefaultStyleController(this.styleElement, this.idPrefix);\n }\n this.spliceable = new CombinedSpliceable([\n new TraitSpliceable(this.focus, this.view, options.identityProvider),\n new TraitSpliceable(this.selection, this.view, options.identityProvider),\n this.view\n ]);\n this.disposables = [this.focus, this.selection, this.view, this._onDidDispose];\n this.onDidFocus = mapEvent(domEvent(this.view.domNode, 'focus', true), function () { return null; });\n this.onDidBlur = mapEvent(domEvent(this.view.domNode, 'blur', true), function () { return null; });\n this.disposables.push(new DOMFocusController(this, this.view));\n if (typeof options.keyboardSupport !== 'boolean' || options.keyboardSupport) {\n var controller = new KeyboardController(this, this.view, options);\n this.disposables.push(controller);\n }\n if (typeof options.mouseSupport !== 'boolean' || options.mouseSupport) {\n this.mouseController = new MouseController(this, this.view, options);\n this.disposables.push(this.mouseController);\n this.onContextMenu = this.mouseController.onContextMenu;\n }\n this.onFocusChange(this._onFocusChange, this, this.disposables);\n this.onSelectionChange(this._onSelectionChange, this, this.disposables);\n if (options.ariaLabel) {\n this.view.domNode.setAttribute('aria-label', localize('aria list', \"{0}. Use the navigation keys to navigate.\", options.ariaLabel));\n }\n this.style(options);\n }\n Object.defineProperty(List.prototype, \"onFocusChange\", {\n get: function () {\n var _this = this;\n return mapEvent(this.eventBufferer.wrapEvent(this.focus.onChange), function (e) { return _this.toListEvent(e); });\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(List.prototype, \"onSelectionChange\", {\n get: function () {\n var _this = this;\n return mapEvent(this.eventBufferer.wrapEvent(this.selection.onChange), function (e) { return _this.toListEvent(e); });\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(List.prototype, \"onDidDispose\", {\n get: function () { return this._onDidDispose.event; },\n enumerable: true,\n configurable: true\n });\n List.prototype.splice = function (start, deleteCount, elements) {\n var _this = this;\n if (elements === void 0) { elements = []; }\n if (start < 0 || start > this.view.length) {\n throw new Error(\"Invalid start index: \" + start);\n }\n if (deleteCount < 0) {\n throw new Error(\"Invalid delete count: \" + deleteCount);\n }\n if (deleteCount === 0 && elements.length === 0) {\n return;\n }\n this.eventBufferer.bufferEvents(function () { return _this.spliceable.splice(start, deleteCount, elements); });\n };\n Object.defineProperty(List.prototype, \"length\", {\n get: function () {\n return this.view.length;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(List.prototype, \"contentHeight\", {\n get: function () {\n return this.view.getContentHeight();\n },\n enumerable: true,\n configurable: true\n });\n List.prototype.layout = function (height) {\n this.view.layout(height);\n };\n List.prototype.setSelection = function (indexes) {\n for (var _i = 0, indexes_1 = indexes; _i < indexes_1.length; _i++) {\n var index = indexes_1[_i];\n if (index < 0 || index >= this.length) {\n throw new Error(\"Invalid index \" + index);\n }\n }\n indexes = indexes.sort(numericSort);\n this.selection.set(indexes);\n };\n List.prototype.getSelection = function () {\n return this.selection.get();\n };\n List.prototype.setFocus = function (indexes) {\n for (var _i = 0, indexes_2 = indexes; _i < indexes_2.length; _i++) {\n var index = indexes_2[_i];\n if (index < 0 || index >= this.length) {\n throw new Error(\"Invalid index \" + index);\n }\n }\n indexes = indexes.sort(numericSort);\n this.focus.set(indexes);\n };\n List.prototype.focusNext = function (n, loop) {\n if (n === void 0) { n = 1; }\n if (loop === void 0) { loop = false; }\n if (this.length === 0) {\n return;\n }\n var focus = this.focus.get();\n var index = focus.length > 0 ? focus[0] + n : 0;\n this.setFocus(loop ? [index % this.length] : [Math.min(index, this.length - 1)]);\n };\n List.prototype.focusPrevious = function (n, loop) {\n if (n === void 0) { n = 1; }\n if (loop === void 0) { loop = false; }\n if (this.length === 0) {\n return;\n }\n var focus = this.focus.get();\n var index = focus.length > 0 ? focus[0] - n : 0;\n if (loop && index < 0) {\n index = (this.length + (index % this.length)) % this.length;\n }\n this.setFocus([Math.max(index, 0)]);\n };\n List.prototype.focusNextPage = function () {\n var _this = this;\n var lastPageIndex = this.view.indexAt(this.view.getScrollTop() + this.view.renderHeight);\n lastPageIndex = lastPageIndex === 0 ? 0 : lastPageIndex - 1;\n var lastPageElement = this.view.element(lastPageIndex);\n var currentlyFocusedElement = this.getFocusedElements()[0];\n if (currentlyFocusedElement !== lastPageElement) {\n this.setFocus([lastPageIndex]);\n }\n else {\n var previousScrollTop = this.view.getScrollTop();\n this.view.setScrollTop(previousScrollTop + this.view.renderHeight - this.view.elementHeight(lastPageIndex));\n if (this.view.getScrollTop() !== previousScrollTop) {\n // Let the scroll event listener run\n setTimeout(function () { return _this.focusNextPage(); }, 0);\n }\n }\n };\n List.prototype.focusPreviousPage = function () {\n var _this = this;\n var firstPageIndex;\n var scrollTop = this.view.getScrollTop();\n if (scrollTop === 0) {\n firstPageIndex = this.view.indexAt(scrollTop);\n }\n else {\n firstPageIndex = this.view.indexAfter(scrollTop - 1);\n }\n var firstPageElement = this.view.element(firstPageIndex);\n var currentlyFocusedElement = this.getFocusedElements()[0];\n if (currentlyFocusedElement !== firstPageElement) {\n this.setFocus([firstPageIndex]);\n }\n else {\n var previousScrollTop = scrollTop;\n this.view.setScrollTop(scrollTop - this.view.renderHeight);\n if (this.view.getScrollTop() !== previousScrollTop) {\n // Let the scroll event listener run\n setTimeout(function () { return _this.focusPreviousPage(); }, 0);\n }\n }\n };\n List.prototype.focusLast = function () {\n if (this.length === 0) {\n return;\n }\n this.setFocus([this.length - 1]);\n };\n List.prototype.focusFirst = function () {\n if (this.length === 0) {\n return;\n }\n this.setFocus([0]);\n };\n List.prototype.getFocus = function () {\n return this.focus.get();\n };\n List.prototype.getFocusedElements = function () {\n var _this = this;\n return this.getFocus().map(function (i) { return _this.view.element(i); });\n };\n List.prototype.reveal = function (index, relativeTop) {\n if (index < 0 || index >= this.length) {\n throw new Error(\"Invalid index \" + index);\n }\n var scrollTop = this.view.getScrollTop();\n var elementTop = this.view.elementTop(index);\n var elementHeight = this.view.elementHeight(index);\n if (isNumber(relativeTop)) {\n // y = mx + b\n var m = elementHeight - this.view.renderHeight;\n this.view.setScrollTop(m * clamp(relativeTop, 0, 1) + elementTop);\n }\n else {\n var viewItemBottom = elementTop + elementHeight;\n var wrapperBottom = scrollTop + this.view.renderHeight;\n if (elementTop < scrollTop) {\n this.view.setScrollTop(elementTop);\n }\n else if (viewItemBottom >= wrapperBottom) {\n this.view.setScrollTop(viewItemBottom - this.view.renderHeight);\n }\n }\n };\n List.prototype.getElementDomId = function (index) {\n return this.idPrefix + \"_\" + index;\n };\n List.prototype.isDOMFocused = function () {\n return this.view.domNode === document.activeElement;\n };\n List.prototype.getHTMLElement = function () {\n return this.view.domNode;\n };\n List.prototype.open = function (indexes, browserEvent) {\n var _this = this;\n for (var _i = 0, indexes_3 = indexes; _i < indexes_3.length; _i++) {\n var index = indexes_3[_i];\n if (index < 0 || index >= this.length) {\n throw new Error(\"Invalid index \" + index);\n }\n }\n this._onOpen.fire({ indexes: indexes, elements: indexes.map(function (i) { return _this.view.element(i); }), browserEvent: browserEvent });\n };\n List.prototype.pin = function (indexes) {\n for (var _i = 0, indexes_4 = indexes; _i < indexes_4.length; _i++) {\n var index = indexes_4[_i];\n if (index < 0 || index >= this.length) {\n throw new Error(\"Invalid index \" + index);\n }\n }\n this._onPin.fire(indexes);\n };\n List.prototype.style = function (styles) {\n this.styleController.style(styles);\n };\n List.prototype.toListEvent = function (_a) {\n var _this = this;\n var indexes = _a.indexes;\n return { indexes: indexes, elements: indexes.map(function (i) { return _this.view.element(i); }) };\n };\n List.prototype._onFocusChange = function () {\n var focus = this.focus.get();\n if (focus.length > 0) {\n this.view.domNode.setAttribute('aria-activedescendant', this.getElementDomId(focus[0]));\n }\n else {\n this.view.domNode.removeAttribute('aria-activedescendant');\n }\n this.view.domNode.setAttribute('role', 'tree');\n DOM.toggleClass(this.view.domNode, 'element-focused', focus.length > 0);\n };\n List.prototype._onSelectionChange = function () {\n var selection = this.selection.get();\n DOM.toggleClass(this.view.domNode, 'selection-none', selection.length === 0);\n DOM.toggleClass(this.view.domNode, 'selection-single', selection.length === 1);\n DOM.toggleClass(this.view.domNode, 'selection-multiple', selection.length > 1);\n };\n List.prototype.dispose = function () {\n this._onDidDispose.fire();\n this.disposables = dispose(this.disposables);\n };\n List.InstanceCount = 0;\n __decorate([\n memoize\n ], List.prototype, \"onFocusChange\", null);\n __decorate([\n memoize\n ], List.prototype, \"onSelectionChange\", null);\n return List;\n}());\nexport { List };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nexport function clamp(value, min, max) {\n return Math.min(Math.max(value, min), max);\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar __assign = (this && this.__assign) || Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n};\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __param = (this && this.__param) || function (paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n};\nimport './media/suggest.css';\nimport * as nls from '../../../nls';\nimport { createMatches } from '../../../base/common/filters';\nimport * as strings from '../../../base/common/strings';\nimport { Emitter, chain } from '../../../base/common/event';\nimport { onUnexpectedError } from '../../../base/common/errors';\nimport { dispose, toDisposable } from '../../../base/common/lifecycle';\nimport { addClass, append, $, hide, removeClass, show, toggleClass, getDomNodePagePosition, hasClass } from '../../../base/browser/dom';\nimport { HighlightedLabel } from '../../../base/browser/ui/highlightedlabel/highlightedLabel';\nimport { List } from '../../../base/browser/ui/list/listWidget';\nimport { DomScrollableElement } from '../../../base/browser/ui/scrollbar/scrollableElement';\nimport { IKeybindingService } from '../../../platform/keybinding/common/keybinding';\nimport { IContextKeyService } from '../../../platform/contextkey/common/contextkey';\nimport { ContentWidgetPositionPreference } from '../../browser/editorBrowser';\nimport { Context as SuggestContext } from './suggest';\nimport { alert } from '../../../base/browser/ui/aria/aria';\nimport { ITelemetryService } from '../../../platform/telemetry/common/telemetry';\nimport { attachListStyler } from '../../../platform/theme/common/styler';\nimport { IThemeService, registerThemingParticipant } from '../../../platform/theme/common/themeService';\nimport { registerColor, editorWidgetBackground, listFocusBackground, activeContrastBorder, listHighlightForeground, editorForeground, editorWidgetBorder, focusBorder, textLinkForeground, textCodeBlockBackground } from '../../../platform/theme/common/colorRegistry';\nimport { IStorageService, StorageScope } from '../../../platform/storage/common/storage';\nimport { MarkdownRenderer } from '../markdown/markdownRenderer';\nimport { IModeService } from '../../common/services/modeService';\nimport { IOpenerService } from '../../../platform/opener/common/opener';\nimport { TimeoutTimer, createCancelablePromise } from '../../../base/common/async';\nimport { CancellationToken } from '../../../base/common/cancellation';\nvar sticky = false; // for development purposes\nvar expandSuggestionDocsByDefault = false;\nvar maxSuggestionsToShow = 12;\n/**\n * Suggest widget colors\n */\nexport var editorSuggestWidgetBackground = registerColor('editorSuggestWidget.background', { dark: editorWidgetBackground, light: editorWidgetBackground, hc: editorWidgetBackground }, nls.localize('editorSuggestWidgetBackground', 'Background color of the suggest widget.'));\nexport var editorSuggestWidgetBorder = registerColor('editorSuggestWidget.border', { dark: editorWidgetBorder, light: editorWidgetBorder, hc: editorWidgetBorder }, nls.localize('editorSuggestWidgetBorder', 'Border color of the suggest widget.'));\nexport var editorSuggestWidgetForeground = registerColor('editorSuggestWidget.foreground', { dark: editorForeground, light: editorForeground, hc: editorForeground }, nls.localize('editorSuggestWidgetForeground', 'Foreground color of the suggest widget.'));\nexport var editorSuggestWidgetSelectedBackground = registerColor('editorSuggestWidget.selectedBackground', { dark: listFocusBackground, light: listFocusBackground, hc: listFocusBackground }, nls.localize('editorSuggestWidgetSelectedBackground', 'Background color of the selected entry in the suggest widget.'));\nexport var editorSuggestWidgetHighlightForeground = registerColor('editorSuggestWidget.highlightForeground', { dark: listHighlightForeground, light: listHighlightForeground, hc: listHighlightForeground }, nls.localize('editorSuggestWidgetHighlightForeground', 'Color of the match highlights in the suggest widget.'));\nvar colorRegExp = /^(#([\\da-f]{3}){1,2}|(rgb|hsl)a\\(\\s*(\\d{1,3}%?\\s*,\\s*){3}(1|0?\\.\\d+)\\)|(rgb|hsl)\\(\\s*\\d{1,3}%?(\\s*,\\s*\\d{1,3}%?){2}\\s*\\))$/i;\nfunction matchesColor(text) {\n return text && text.match(colorRegExp) ? text : null;\n}\nfunction canExpandCompletionItem(item) {\n if (!item) {\n return false;\n }\n var suggestion = item.suggestion;\n if (suggestion.documentation) {\n return true;\n }\n return (suggestion.detail && suggestion.detail !== suggestion.label);\n}\nvar Renderer = /** @class */ (function () {\n function Renderer(widget, editor, triggerKeybindingLabel) {\n this.widget = widget;\n this.editor = editor;\n this.triggerKeybindingLabel = triggerKeybindingLabel;\n }\n Object.defineProperty(Renderer.prototype, \"templateId\", {\n get: function () {\n return 'suggestion';\n },\n enumerable: true,\n configurable: true\n });\n Renderer.prototype.renderTemplate = function (container) {\n var _this = this;\n var data = Object.create(null);\n data.disposables = [];\n data.root = container;\n data.icon = append(container, $('.icon'));\n data.colorspan = append(data.icon, $('span.colorspan'));\n var text = append(container, $('.contents'));\n var main = append(text, $('.main'));\n data.highlightedLabel = new HighlightedLabel(main);\n data.disposables.push(data.highlightedLabel);\n data.typeLabel = append(main, $('span.type-label'));\n data.readMore = append(main, $('span.readMore'));\n data.readMore.title = nls.localize('readMore', \"Read More...{0}\", this.triggerKeybindingLabel);\n var configureFont = function () {\n var configuration = _this.editor.getConfiguration();\n var fontFamily = configuration.fontInfo.fontFamily;\n var fontSize = configuration.contribInfo.suggestFontSize || configuration.fontInfo.fontSize;\n var lineHeight = configuration.contribInfo.suggestLineHeight || configuration.fontInfo.lineHeight;\n var fontSizePx = fontSize + \"px\";\n var lineHeightPx = lineHeight + \"px\";\n data.root.style.fontSize = fontSizePx;\n main.style.fontFamily = fontFamily;\n main.style.lineHeight = lineHeightPx;\n data.icon.style.height = lineHeightPx;\n data.icon.style.width = lineHeightPx;\n data.readMore.style.height = lineHeightPx;\n data.readMore.style.width = lineHeightPx;\n };\n configureFont();\n chain(this.editor.onDidChangeConfiguration.bind(this.editor))\n .filter(function (e) { return e.fontInfo || e.contribInfo; })\n .on(configureFont, null, data.disposables);\n return data;\n };\n Renderer.prototype.renderElement = function (element, index, templateData) {\n var _this = this;\n var data = templateData;\n var suggestion = element.suggestion;\n if (canExpandCompletionItem(element)) {\n data.root.setAttribute('aria-label', nls.localize('suggestionWithDetailsAriaLabel', \"{0}, suggestion, has details\", suggestion.label));\n }\n else {\n data.root.setAttribute('aria-label', nls.localize('suggestionAriaLabel', \"{0}, suggestion\", suggestion.label));\n }\n data.icon.className = 'icon ' + suggestion.type;\n data.colorspan.style.backgroundColor = '';\n if (suggestion.type === 'color') {\n var color = matchesColor(suggestion.label) || typeof suggestion.documentation === 'string' && matchesColor(suggestion.documentation);\n if (color) {\n data.icon.className = 'icon customcolor';\n data.colorspan.style.backgroundColor = color;\n }\n }\n data.highlightedLabel.set(suggestion.label, createMatches(element.matches), '', true);\n // data.highlightedLabel.set(`${suggestion.label} <${element.score}=score(${element.word}, ${suggestion.filterText || suggestion.label})>`, createMatches(element.matches));\n data.typeLabel.textContent = (suggestion.detail || '').replace(/\\n.*$/m, '');\n if (canExpandCompletionItem(element)) {\n show(data.readMore);\n data.readMore.onmousedown = function (e) {\n e.stopPropagation();\n e.preventDefault();\n };\n data.readMore.onclick = function (e) {\n e.stopPropagation();\n e.preventDefault();\n _this.widget.toggleDetails();\n };\n }\n else {\n hide(data.readMore);\n data.readMore.onmousedown = null;\n data.readMore.onclick = null;\n }\n };\n Renderer.prototype.disposeElement = function () {\n // noop\n };\n Renderer.prototype.disposeTemplate = function (templateData) {\n templateData.disposables = dispose(templateData.disposables);\n };\n return Renderer;\n}());\nvar SuggestionDetails = /** @class */ (function () {\n function SuggestionDetails(container, widget, editor, markdownRenderer, triggerKeybindingLabel) {\n var _this = this;\n this.widget = widget;\n this.editor = editor;\n this.markdownRenderer = markdownRenderer;\n this.triggerKeybindingLabel = triggerKeybindingLabel;\n this.borderWidth = 1;\n this.disposables = [];\n this.el = append(container, $('.details'));\n this.disposables.push(toDisposable(function () { return container.removeChild(_this.el); }));\n this.body = $('.body');\n this.scrollbar = new DomScrollableElement(this.body, {});\n append(this.el, this.scrollbar.getDomNode());\n this.disposables.push(this.scrollbar);\n this.header = append(this.body, $('.header'));\n this.close = append(this.header, $('span.close'));\n this.close.title = nls.localize('readLess', \"Read less...{0}\", this.triggerKeybindingLabel);\n this.type = append(this.header, $('p.type'));\n this.docs = append(this.body, $('p.docs'));\n this.ariaLabel = null;\n this.configureFont();\n chain(this.editor.onDidChangeConfiguration.bind(this.editor))\n .filter(function (e) { return e.fontInfo; })\n .on(this.configureFont, this, this.disposables);\n markdownRenderer.onDidRenderCodeBlock(function () { return _this.scrollbar.scanDomNode(); }, this, this.disposables);\n }\n Object.defineProperty(SuggestionDetails.prototype, \"element\", {\n get: function () {\n return this.el;\n },\n enumerable: true,\n configurable: true\n });\n SuggestionDetails.prototype.render = function (item) {\n var _this = this;\n this.renderDisposeable = dispose(this.renderDisposeable);\n if (!item || !canExpandCompletionItem(item)) {\n this.type.textContent = '';\n this.docs.textContent = '';\n addClass(this.el, 'no-docs');\n this.ariaLabel = null;\n return;\n }\n removeClass(this.el, 'no-docs');\n if (typeof item.suggestion.documentation === 'string') {\n removeClass(this.docs, 'markdown-docs');\n this.docs.textContent = item.suggestion.documentation;\n }\n else {\n addClass(this.docs, 'markdown-docs');\n this.docs.innerHTML = '';\n var renderedContents = this.markdownRenderer.render(item.suggestion.documentation);\n this.renderDisposeable = renderedContents;\n this.docs.appendChild(renderedContents.element);\n }\n if (item.suggestion.detail) {\n this.type.innerText = item.suggestion.detail;\n show(this.type);\n }\n else {\n this.type.innerText = '';\n hide(this.type);\n }\n this.el.style.height = this.header.offsetHeight + this.docs.offsetHeight + (this.borderWidth * 2) + 'px';\n this.close.onmousedown = function (e) {\n e.preventDefault();\n e.stopPropagation();\n };\n this.close.onclick = function (e) {\n e.preventDefault();\n e.stopPropagation();\n _this.widget.toggleDetails();\n };\n this.body.scrollTop = 0;\n this.scrollbar.scanDomNode();\n this.ariaLabel = strings.format('{0}\\n{1}\\n{2}', item.suggestion.label || '', item.suggestion.detail || '', item.suggestion.documentation || '');\n };\n SuggestionDetails.prototype.getAriaLabel = function () {\n return this.ariaLabel;\n };\n SuggestionDetails.prototype.scrollDown = function (much) {\n if (much === void 0) { much = 8; }\n this.body.scrollTop += much;\n };\n SuggestionDetails.prototype.scrollUp = function (much) {\n if (much === void 0) { much = 8; }\n this.body.scrollTop -= much;\n };\n SuggestionDetails.prototype.scrollTop = function () {\n this.body.scrollTop = 0;\n };\n SuggestionDetails.prototype.scrollBottom = function () {\n this.body.scrollTop = this.body.scrollHeight;\n };\n SuggestionDetails.prototype.pageDown = function () {\n this.scrollDown(80);\n };\n SuggestionDetails.prototype.pageUp = function () {\n this.scrollUp(80);\n };\n SuggestionDetails.prototype.setBorderWidth = function (width) {\n this.borderWidth = width;\n };\n SuggestionDetails.prototype.configureFont = function () {\n var configuration = this.editor.getConfiguration();\n var fontFamily = configuration.fontInfo.fontFamily;\n var fontSize = configuration.contribInfo.suggestFontSize || configuration.fontInfo.fontSize;\n var lineHeight = configuration.contribInfo.suggestLineHeight || configuration.fontInfo.lineHeight;\n var fontSizePx = fontSize + \"px\";\n var lineHeightPx = lineHeight + \"px\";\n this.el.style.fontSize = fontSizePx;\n this.type.style.fontFamily = fontFamily;\n this.close.style.height = lineHeightPx;\n this.close.style.width = lineHeightPx;\n };\n SuggestionDetails.prototype.dispose = function () {\n this.disposables = dispose(this.disposables);\n this.renderDisposeable = dispose(this.renderDisposeable);\n };\n return SuggestionDetails;\n}());\nvar SuggestWidget = /** @class */ (function () {\n function SuggestWidget(editor, telemetryService, contextKeyService, themeService, storageService, keybindingService, modeService, openerService) {\n var _this = this;\n this.editor = editor;\n this.telemetryService = telemetryService;\n // Editor.IContentWidget.allowEditorOverflow\n this.allowEditorOverflow = true;\n this.ignoreFocusEvents = false;\n this.editorBlurTimeout = new TimeoutTimer();\n this.showTimeout = new TimeoutTimer();\n this.onDidSelectEmitter = new Emitter();\n this.onDidFocusEmitter = new Emitter();\n this.onDidHideEmitter = new Emitter();\n this.onDidShowEmitter = new Emitter();\n this.onDidSelect = this.onDidSelectEmitter.event;\n this.onDidFocus = this.onDidFocusEmitter.event;\n this.onDidHide = this.onDidHideEmitter.event;\n this.onDidShow = this.onDidShowEmitter.event;\n this.maxWidgetWidth = 660;\n this.listWidth = 330;\n this.storageServiceAvailable = true;\n this.expandSuggestionDocs = false;\n this.firstFocusInCurrentList = false;\n var kb = keybindingService.lookupKeybinding('editor.action.triggerSuggest');\n var triggerKeybindingLabel = !kb ? '' : \" (\" + kb.getLabel() + \")\";\n var markdownRenderer = new MarkdownRenderer(editor, modeService, openerService);\n this.isAuto = false;\n this.focusedItem = null;\n this.storageService = storageService;\n if (this.expandDocsSettingFromStorage() === undefined) {\n this.storageService.store('expandSuggestionDocs', expandSuggestionDocsByDefault, StorageScope.GLOBAL);\n if (this.expandDocsSettingFromStorage() === undefined) {\n this.storageServiceAvailable = false;\n }\n }\n this.element = $('.editor-widget.suggest-widget');\n if (!this.editor.getConfiguration().contribInfo.iconsInSuggestions) {\n addClass(this.element, 'no-icons');\n }\n this.messageElement = append(this.element, $('.message'));\n this.listElement = append(this.element, $('.tree'));\n this.details = new SuggestionDetails(this.element, this, this.editor, markdownRenderer, triggerKeybindingLabel);\n var renderer = new Renderer(this, this.editor, triggerKeybindingLabel);\n this.list = new List(this.listElement, this, [renderer], {\n useShadows: false,\n selectOnMouseDown: true,\n focusOnMouseDown: false,\n openController: { shouldOpen: function () { return false; } }\n });\n this.toDispose = [\n attachListStyler(this.list, themeService, {\n listInactiveFocusBackground: editorSuggestWidgetSelectedBackground,\n listInactiveFocusOutline: activeContrastBorder\n }),\n themeService.onThemeChange(function (t) { return _this.onThemeChange(t); }),\n editor.onDidBlurEditorText(function () { return _this.onEditorBlur(); }),\n editor.onDidLayoutChange(function () { return _this.onEditorLayoutChange(); }),\n this.list.onSelectionChange(function (e) { return _this.onListSelection(e); }),\n this.list.onFocusChange(function (e) { return _this.onListFocus(e); }),\n this.editor.onDidChangeCursorSelection(function () { return _this.onCursorSelectionChanged(); })\n ];\n this.suggestWidgetVisible = SuggestContext.Visible.bindTo(contextKeyService);\n this.suggestWidgetMultipleSuggestions = SuggestContext.MultipleSuggestions.bindTo(contextKeyService);\n this.suggestionSupportsAutoAccept = SuggestContext.AcceptOnKey.bindTo(contextKeyService);\n this.editor.addContentWidget(this);\n this.setState(0 /* Hidden */);\n this.onThemeChange(themeService.getTheme());\n }\n SuggestWidget.prototype.onCursorSelectionChanged = function () {\n if (this.state === 0 /* Hidden */) {\n return;\n }\n this.editor.layoutContentWidget(this);\n };\n SuggestWidget.prototype.onEditorBlur = function () {\n var _this = this;\n if (sticky) {\n return;\n }\n this.editorBlurTimeout.cancelAndSet(function () {\n if (!_this.editor.hasTextFocus()) {\n _this.setState(0 /* Hidden */);\n }\n }, 150);\n };\n SuggestWidget.prototype.onEditorLayoutChange = function () {\n if ((this.state === 3 /* Open */ || this.state === 5 /* Details */) && this.expandDocsSettingFromStorage()) {\n this.expandSideOrBelow();\n }\n };\n SuggestWidget.prototype.onListSelection = function (e) {\n var _this = this;\n if (!e.elements.length) {\n return;\n }\n var item = e.elements[0];\n var index = e.indexes[0];\n item.resolve(CancellationToken.None).then(function () {\n _this.onDidSelectEmitter.fire({ item: item, index: index, model: _this.completionModel });\n alert(nls.localize('suggestionAriaAccepted', \"{0}, accepted\", item.suggestion.label));\n _this.editor.focus();\n });\n };\n SuggestWidget.prototype._getSuggestionAriaAlertLabel = function (item) {\n if (canExpandCompletionItem(item)) {\n return nls.localize('ariaCurrentSuggestionWithDetails', \"{0}, suggestion, has details\", item.suggestion.label);\n }\n else {\n return nls.localize('ariaCurrentSuggestion', \"{0}, suggestion\", item.suggestion.label);\n }\n };\n SuggestWidget.prototype._ariaAlert = function (newAriaAlertLabel) {\n if (this._lastAriaAlertLabel === newAriaAlertLabel) {\n return;\n }\n this._lastAriaAlertLabel = newAriaAlertLabel;\n if (this._lastAriaAlertLabel) {\n alert(this._lastAriaAlertLabel);\n }\n };\n SuggestWidget.prototype.onThemeChange = function (theme) {\n var backgroundColor = theme.getColor(editorSuggestWidgetBackground);\n if (backgroundColor) {\n this.listElement.style.backgroundColor = backgroundColor.toString();\n this.details.element.style.backgroundColor = backgroundColor.toString();\n this.messageElement.style.backgroundColor = backgroundColor.toString();\n }\n var borderColor = theme.getColor(editorSuggestWidgetBorder);\n if (borderColor) {\n this.listElement.style.borderColor = borderColor.toString();\n this.details.element.style.borderColor = borderColor.toString();\n this.messageElement.style.borderColor = borderColor.toString();\n this.detailsBorderColor = borderColor.toString();\n }\n var focusBorderColor = theme.getColor(focusBorder);\n if (focusBorderColor) {\n this.detailsFocusBorderColor = focusBorderColor.toString();\n }\n this.details.setBorderWidth(theme.type === 'hc' ? 2 : 1);\n };\n SuggestWidget.prototype.onListFocus = function (e) {\n var _this = this;\n if (this.ignoreFocusEvents) {\n return;\n }\n if (!e.elements.length) {\n if (this.currentSuggestionDetails) {\n this.currentSuggestionDetails.cancel();\n this.currentSuggestionDetails = null;\n this.focusedItem = null;\n }\n this._ariaAlert(null);\n return;\n }\n var item = e.elements[0];\n this._ariaAlert(this._getSuggestionAriaAlertLabel(item));\n this.firstFocusInCurrentList = !this.focusedItem;\n if (item === this.focusedItem) {\n return;\n }\n if (this.currentSuggestionDetails) {\n this.currentSuggestionDetails.cancel();\n this.currentSuggestionDetails = null;\n }\n var index = e.indexes[0];\n this.suggestionSupportsAutoAccept.set(!item.suggestion.noAutoAccept);\n this.focusedItem = item;\n this.list.reveal(index);\n this.currentSuggestionDetails = createCancelablePromise(function (token) { return item.resolve(token); });\n this.currentSuggestionDetails.then(function () {\n // item can have extra information, so re-render\n _this.ignoreFocusEvents = true;\n _this.list.splice(index, 1, [item]);\n _this.list.setFocus([index]);\n _this.ignoreFocusEvents = false;\n if (_this.expandDocsSettingFromStorage()) {\n _this.showDetails();\n }\n else {\n removeClass(_this.element, 'docs-side');\n }\n }).catch(onUnexpectedError).then(function () {\n if (_this.focusedItem === item) {\n _this.currentSuggestionDetails = null;\n }\n });\n // emit an event\n this.onDidFocusEmitter.fire({ item: item, index: index, model: this.completionModel });\n };\n SuggestWidget.prototype.setState = function (state) {\n if (!this.element) {\n return;\n }\n var stateChanged = this.state !== state;\n this.state = state;\n toggleClass(this.element, 'frozen', state === 4 /* Frozen */);\n switch (state) {\n case 0 /* Hidden */:\n hide(this.messageElement, this.details.element, this.listElement);\n this.hide();\n this.listHeight = 0;\n if (stateChanged) {\n this.list.splice(0, this.list.length);\n }\n this.focusedItem = null;\n break;\n case 1 /* Loading */:\n this.messageElement.textContent = SuggestWidget.LOADING_MESSAGE;\n hide(this.listElement, this.details.element);\n show(this.messageElement);\n removeClass(this.element, 'docs-side');\n this.show();\n this.focusedItem = null;\n break;\n case 2 /* Empty */:\n this.messageElement.textContent = SuggestWidget.NO_SUGGESTIONS_MESSAGE;\n hide(this.listElement, this.details.element);\n show(this.messageElement);\n removeClass(this.element, 'docs-side');\n this.show();\n this.focusedItem = null;\n break;\n case 3 /* Open */:\n hide(this.messageElement);\n show(this.listElement);\n this.show();\n break;\n case 4 /* Frozen */:\n hide(this.messageElement);\n show(this.listElement);\n this.show();\n break;\n case 5 /* Details */:\n hide(this.messageElement);\n show(this.details.element, this.listElement);\n this.show();\n this._ariaAlert(this.details.getAriaLabel());\n break;\n }\n };\n SuggestWidget.prototype.showTriggered = function (auto) {\n var _this = this;\n if (this.state !== 0 /* Hidden */) {\n return;\n }\n this.isAuto = !!auto;\n if (!this.isAuto) {\n this.loadingTimeout = setTimeout(function () {\n _this.loadingTimeout = null;\n _this.setState(1 /* Loading */);\n }, 50);\n }\n };\n SuggestWidget.prototype.showSuggestions = function (completionModel, selectionIndex, isFrozen, isAuto) {\n if (this.loadingTimeout) {\n clearTimeout(this.loadingTimeout);\n this.loadingTimeout = null;\n }\n if (this.completionModel !== completionModel) {\n this.completionModel = completionModel;\n }\n if (isFrozen && this.state !== 2 /* Empty */ && this.state !== 0 /* Hidden */) {\n this.setState(4 /* Frozen */);\n return;\n }\n var visibleCount = this.completionModel.items.length;\n var isEmpty = visibleCount === 0;\n this.suggestWidgetMultipleSuggestions.set(visibleCount > 1);\n if (isEmpty) {\n if (isAuto) {\n this.setState(0 /* Hidden */);\n }\n else {\n this.setState(2 /* Empty */);\n }\n this.completionModel = null;\n }\n else {\n var stats = this.completionModel.stats;\n stats['wasAutomaticallyTriggered'] = !!isAuto;\n /* __GDPR__\n \"suggestWidget\" : {\n \"wasAutomaticallyTriggered\" : { \"classification\": \"SystemMetaData\", \"purpose\": \"FeatureInsight\", \"isMeasurement\": true },\n \"${include}\": [\n \"${ICompletionStats}\",\n \"${EditorTelemetryData}\"\n ]\n }\n */\n this.telemetryService.publicLog('suggestWidget', __assign({}, stats, this.editor.getTelemetryData()));\n this.list.splice(0, this.list.length, this.completionModel.items);\n if (isFrozen) {\n this.setState(4 /* Frozen */);\n }\n else {\n this.setState(3 /* Open */);\n }\n this.list.reveal(selectionIndex, selectionIndex);\n this.list.setFocus([selectionIndex]);\n // Reset focus border\n if (this.detailsBorderColor) {\n this.details.element.style.borderColor = this.detailsBorderColor;\n }\n }\n };\n SuggestWidget.prototype.selectNextPage = function () {\n switch (this.state) {\n case 0 /* Hidden */:\n return false;\n case 5 /* Details */:\n this.details.pageDown();\n return true;\n case 1 /* Loading */:\n return !this.isAuto;\n default:\n this.list.focusNextPage();\n return true;\n }\n };\n SuggestWidget.prototype.selectNext = function () {\n switch (this.state) {\n case 0 /* Hidden */:\n return false;\n case 1 /* Loading */:\n return !this.isAuto;\n default:\n this.list.focusNext(1, true);\n return true;\n }\n };\n SuggestWidget.prototype.selectLast = function () {\n switch (this.state) {\n case 0 /* Hidden */:\n return false;\n case 5 /* Details */:\n this.details.scrollBottom();\n return true;\n case 1 /* Loading */:\n return !this.isAuto;\n default:\n this.list.focusLast();\n return true;\n }\n };\n SuggestWidget.prototype.selectPreviousPage = function () {\n switch (this.state) {\n case 0 /* Hidden */:\n return false;\n case 5 /* Details */:\n this.details.pageUp();\n return true;\n case 1 /* Loading */:\n return !this.isAuto;\n default:\n this.list.focusPreviousPage();\n return true;\n }\n };\n SuggestWidget.prototype.selectPrevious = function () {\n switch (this.state) {\n case 0 /* Hidden */:\n return false;\n case 1 /* Loading */:\n return !this.isAuto;\n default:\n this.list.focusPrevious(1, true);\n return false;\n }\n };\n SuggestWidget.prototype.selectFirst = function () {\n switch (this.state) {\n case 0 /* Hidden */:\n return false;\n case 5 /* Details */:\n this.details.scrollTop();\n return true;\n case 1 /* Loading */:\n return !this.isAuto;\n default:\n this.list.focusFirst();\n return true;\n }\n };\n SuggestWidget.prototype.getFocusedItem = function () {\n if (this.state !== 0 /* Hidden */\n && this.state !== 2 /* Empty */\n && this.state !== 1 /* Loading */) {\n return {\n item: this.list.getFocusedElements()[0],\n index: this.list.getFocus()[0],\n model: this.completionModel\n };\n }\n return undefined;\n };\n SuggestWidget.prototype.toggleDetailsFocus = function () {\n if (this.state === 5 /* Details */) {\n this.setState(3 /* Open */);\n if (this.detailsBorderColor) {\n this.details.element.style.borderColor = this.detailsBorderColor;\n }\n }\n else if (this.state === 3 /* Open */ && this.expandDocsSettingFromStorage()) {\n this.setState(5 /* Details */);\n if (this.detailsFocusBorderColor) {\n this.details.element.style.borderColor = this.detailsFocusBorderColor;\n }\n }\n /* __GDPR__\n \"suggestWidget:toggleDetailsFocus\" : {\n \"${include}\": [\n \"${EditorTelemetryData}\"\n ]\n }\n */\n this.telemetryService.publicLog('suggestWidget:toggleDetailsFocus', this.editor.getTelemetryData());\n };\n SuggestWidget.prototype.toggleDetails = function () {\n if (!canExpandCompletionItem(this.list.getFocusedElements()[0])) {\n return;\n }\n if (this.expandDocsSettingFromStorage()) {\n this.updateExpandDocsSetting(false);\n hide(this.details.element);\n removeClass(this.element, 'docs-side');\n removeClass(this.element, 'docs-below');\n this.editor.layoutContentWidget(this);\n /* __GDPR__\n \"suggestWidget:collapseDetails\" : {\n \"${include}\": [\n \"${EditorTelemetryData}\"\n ]\n }\n */\n this.telemetryService.publicLog('suggestWidget:collapseDetails', this.editor.getTelemetryData());\n }\n else {\n if (this.state !== 3 /* Open */ && this.state !== 5 /* Details */ && this.state !== 4 /* Frozen */) {\n return;\n }\n this.updateExpandDocsSetting(true);\n this.showDetails();\n /* __GDPR__\n \"suggestWidget:expandDetails\" : {\n \"${include}\": [\n \"${EditorTelemetryData}\"\n ]\n }\n */\n this.telemetryService.publicLog('suggestWidget:expandDetails', this.editor.getTelemetryData());\n }\n };\n SuggestWidget.prototype.showDetails = function () {\n this.expandSideOrBelow();\n show(this.details.element);\n this.details.render(this.list.getFocusedElements()[0]);\n this.details.element.style.maxHeight = this.maxWidgetHeight + 'px';\n // Reset margin-top that was set as Fix for #26416\n this.listElement.style.marginTop = '0px';\n // with docs showing up widget width/height may change, so reposition the widget\n this.editor.layoutContentWidget(this);\n this.adjustDocsPosition();\n this.editor.focus();\n this._ariaAlert(this.details.getAriaLabel());\n };\n SuggestWidget.prototype.show = function () {\n var _this = this;\n var newHeight = this.updateListHeight();\n if (newHeight !== this.listHeight) {\n this.editor.layoutContentWidget(this);\n this.listHeight = newHeight;\n }\n this.suggestWidgetVisible.set(true);\n this.showTimeout.cancelAndSet(function () {\n addClass(_this.element, 'visible');\n _this.onDidShowEmitter.fire(_this);\n }, 100);\n };\n SuggestWidget.prototype.hide = function () {\n this.suggestWidgetVisible.reset();\n this.suggestWidgetMultipleSuggestions.reset();\n removeClass(this.element, 'visible');\n };\n SuggestWidget.prototype.hideWidget = function () {\n clearTimeout(this.loadingTimeout);\n this.setState(0 /* Hidden */);\n this.onDidHideEmitter.fire(this);\n };\n SuggestWidget.prototype.getPosition = function () {\n if (this.state === 0 /* Hidden */) {\n return null;\n }\n return {\n position: this.editor.getPosition(),\n preference: [ContentWidgetPositionPreference.BELOW, ContentWidgetPositionPreference.ABOVE]\n };\n };\n SuggestWidget.prototype.getDomNode = function () {\n return this.element;\n };\n SuggestWidget.prototype.getId = function () {\n return SuggestWidget.ID;\n };\n SuggestWidget.prototype.updateListHeight = function () {\n var height = 0;\n if (this.state === 2 /* Empty */ || this.state === 1 /* Loading */) {\n height = this.unfocusedHeight;\n }\n else {\n var suggestionCount = this.list.contentHeight / this.unfocusedHeight;\n height = Math.min(suggestionCount, maxSuggestionsToShow) * this.unfocusedHeight;\n }\n this.element.style.lineHeight = this.unfocusedHeight + \"px\";\n this.listElement.style.height = height + \"px\";\n this.list.layout(height);\n return height;\n };\n SuggestWidget.prototype.adjustDocsPosition = function () {\n var lineHeight = this.editor.getConfiguration().fontInfo.lineHeight;\n var cursorCoords = this.editor.getScrolledVisiblePosition(this.editor.getPosition());\n var editorCoords = getDomNodePagePosition(this.editor.getDomNode());\n var cursorX = editorCoords.left + cursorCoords.left;\n var cursorY = editorCoords.top + cursorCoords.top + cursorCoords.height;\n var widgetCoords = getDomNodePagePosition(this.element);\n var widgetX = widgetCoords.left;\n var widgetY = widgetCoords.top;\n if (widgetX < cursorX - this.listWidth) {\n // Widget is too far to the left of cursor, swap list and docs\n addClass(this.element, 'list-right');\n }\n else {\n removeClass(this.element, 'list-right');\n }\n // Compare top of the cursor (cursorY - lineheight) with widgetTop to determine if\n // margin-top needs to be applied on list to make it appear right above the cursor\n // Cannot compare cursorY directly as it may be a few decimals off due to zoooming\n if (hasClass(this.element, 'docs-side')\n && cursorY - lineHeight > widgetY\n && this.details.element.offsetHeight > this.listElement.offsetHeight) {\n // Fix for #26416\n // Docs is bigger than list and widget is above cursor, apply margin-top so that list appears right above cursor\n this.listElement.style.marginTop = this.details.element.offsetHeight - this.listElement.offsetHeight + \"px\";\n }\n };\n SuggestWidget.prototype.expandSideOrBelow = function () {\n if (!canExpandCompletionItem(this.focusedItem) && this.firstFocusInCurrentList) {\n removeClass(this.element, 'docs-side');\n removeClass(this.element, 'docs-below');\n return;\n }\n var matches = this.element.style.maxWidth.match(/(\\d+)px/);\n if (!matches || Number(matches[1]) < this.maxWidgetWidth) {\n addClass(this.element, 'docs-below');\n removeClass(this.element, 'docs-side');\n }\n else if (canExpandCompletionItem(this.focusedItem)) {\n addClass(this.element, 'docs-side');\n removeClass(this.element, 'docs-below');\n }\n };\n Object.defineProperty(SuggestWidget.prototype, \"maxWidgetHeight\", {\n // Heights\n get: function () {\n return this.unfocusedHeight * maxSuggestionsToShow;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(SuggestWidget.prototype, \"unfocusedHeight\", {\n get: function () {\n var configuration = this.editor.getConfiguration();\n return configuration.contribInfo.suggestLineHeight || configuration.fontInfo.lineHeight;\n },\n enumerable: true,\n configurable: true\n });\n // IDelegate\n SuggestWidget.prototype.getHeight = function (element) {\n return this.unfocusedHeight;\n };\n SuggestWidget.prototype.getTemplateId = function (element) {\n return 'suggestion';\n };\n // Monaco Editor does not have a storage service\n SuggestWidget.prototype.expandDocsSettingFromStorage = function () {\n if (this.storageServiceAvailable) {\n return this.storageService.getBoolean('expandSuggestionDocs', StorageScope.GLOBAL);\n }\n else {\n return this.expandSuggestionDocs;\n }\n };\n // Monaco Editor does not have a storage service\n SuggestWidget.prototype.updateExpandDocsSetting = function (value) {\n if (this.storageServiceAvailable) {\n this.storageService.store('expandSuggestionDocs', value, StorageScope.GLOBAL);\n }\n else {\n this.expandSuggestionDocs = value;\n }\n };\n SuggestWidget.prototype.dispose = function () {\n this.state = null;\n this.suggestionSupportsAutoAccept = null;\n this.currentSuggestionDetails = null;\n this.focusedItem = null;\n this.element = null;\n this.messageElement = null;\n this.listElement = null;\n this.details.dispose();\n this.details = null;\n this.list.dispose();\n this.list = null;\n this.toDispose = dispose(this.toDispose);\n if (this.loadingTimeout) {\n clearTimeout(this.loadingTimeout);\n this.loadingTimeout = null;\n }\n this.editorBlurTimeout.dispose();\n this.showTimeout.dispose();\n };\n SuggestWidget.ID = 'editor.widget.suggestWidget';\n SuggestWidget.LOADING_MESSAGE = nls.localize('suggestWidget.loading', \"Loading...\");\n SuggestWidget.NO_SUGGESTIONS_MESSAGE = nls.localize('suggestWidget.noSuggestions', \"No suggestions.\");\n SuggestWidget = __decorate([\n __param(1, ITelemetryService),\n __param(2, IContextKeyService),\n __param(3, IThemeService),\n __param(4, IStorageService),\n __param(5, IKeybindingService),\n __param(6, IModeService),\n __param(7, IOpenerService)\n ], SuggestWidget);\n return SuggestWidget;\n}());\nexport { SuggestWidget };\nregisterThemingParticipant(function (theme, collector) {\n var matchHighlight = theme.getColor(editorSuggestWidgetHighlightForeground);\n if (matchHighlight) {\n collector.addRule(\".monaco-editor .suggest-widget .monaco-list .monaco-list-row .monaco-highlighted-label .highlight { color: \" + matchHighlight + \"; }\");\n }\n var foreground = theme.getColor(editorSuggestWidgetForeground);\n if (foreground) {\n collector.addRule(\".monaco-editor .suggest-widget { color: \" + foreground + \"; }\");\n }\n var link = theme.getColor(textLinkForeground);\n if (link) {\n collector.addRule(\".monaco-editor .suggest-widget a { color: \" + link + \"; }\");\n }\n var codeBackground = theme.getColor(textCodeBlockBackground);\n if (codeBackground) {\n collector.addRule(\".monaco-editor .suggest-widget code { background-color: \" + codeBackground + \"; }\");\n }\n});\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __param = (this && this.__param) || function (paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n};\nimport { LRUCache, TernarySearchTree } from '../../../base/common/map';\nimport { IStorageService, StorageScope } from '../../../platform/storage/common/storage';\nimport { RunOnceScheduler } from '../../../base/common/async';\nvar Memory = /** @class */ (function () {\n function Memory() {\n }\n Memory.prototype.select = function (model, pos, items) {\n if (items.length === 0) {\n return 0;\n }\n var topScore = items[0].score;\n for (var i = 1; i < items.length; i++) {\n var _a = items[i], score = _a.score, suggestion = _a.suggestion;\n if (score !== topScore) {\n // stop when leaving the group of top matches\n break;\n }\n if (suggestion.preselect) {\n // stop when seeing an auto-select-item\n return i;\n }\n }\n return 0;\n };\n return Memory;\n}());\nexport { Memory };\nvar NoMemory = /** @class */ (function (_super) {\n __extends(NoMemory, _super);\n function NoMemory() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n NoMemory.prototype.memorize = function (model, pos, item) {\n // no-op\n };\n NoMemory.prototype.toJSON = function () {\n return undefined;\n };\n NoMemory.prototype.fromJSON = function () {\n //\n };\n return NoMemory;\n}(Memory));\nexport { NoMemory };\nvar LRUMemory = /** @class */ (function (_super) {\n __extends(LRUMemory, _super);\n function LRUMemory() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this._cache = new LRUCache(300, .66);\n _this._seq = 0;\n return _this;\n }\n LRUMemory.prototype.memorize = function (model, pos, item) {\n var label = item.suggestion.label;\n var key = model.getLanguageIdentifier().language + \"/\" + label;\n this._cache.set(key, {\n touch: this._seq++,\n type: item.suggestion.type,\n insertText: item.suggestion.insertText\n });\n };\n LRUMemory.prototype.select = function (model, pos, items) {\n // in order of completions, select the first\n // that has been used in the past\n var word = model.getWordUntilPosition(pos).word;\n if (word.length !== 0) {\n return _super.prototype.select.call(this, model, pos, items);\n }\n var lineSuffix = model.getLineContent(pos.lineNumber).substr(pos.column - 10, pos.column - 1);\n if (/\\s$/.test(lineSuffix)) {\n return _super.prototype.select.call(this, model, pos, items);\n }\n var res = -1;\n var seq = -1;\n for (var i = 0; i < items.length; i++) {\n var suggestion = items[i].suggestion;\n var key = model.getLanguageIdentifier().language + \"/\" + suggestion.label;\n var item = this._cache.get(key);\n if (item && item.touch > seq && item.type === suggestion.type && item.insertText === suggestion.insertText) {\n seq = item.touch;\n res = i;\n }\n }\n if (res === -1) {\n return _super.prototype.select.call(this, model, pos, items);\n }\n else {\n return res;\n }\n };\n LRUMemory.prototype.toJSON = function () {\n var data = [];\n this._cache.forEach(function (value, key) {\n data.push([key, value]);\n });\n return data;\n };\n LRUMemory.prototype.fromJSON = function (data) {\n this._cache.clear();\n var seq = 0;\n for (var _i = 0, data_1 = data; _i < data_1.length; _i++) {\n var _a = data_1[_i], key = _a[0], value = _a[1];\n value.touch = seq;\n this._cache.set(key, value);\n }\n this._seq = this._cache.size;\n };\n return LRUMemory;\n}(Memory));\nexport { LRUMemory };\nvar PrefixMemory = /** @class */ (function (_super) {\n __extends(PrefixMemory, _super);\n function PrefixMemory() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this._trie = TernarySearchTree.forStrings();\n _this._seq = 0;\n return _this;\n }\n PrefixMemory.prototype.memorize = function (model, pos, item) {\n var word = model.getWordUntilPosition(pos).word;\n var key = model.getLanguageIdentifier().language + \"/\" + word;\n this._trie.set(key, {\n type: item.suggestion.type,\n insertText: item.suggestion.insertText,\n touch: this._seq++\n });\n };\n PrefixMemory.prototype.select = function (model, pos, items) {\n var word = model.getWordUntilPosition(pos).word;\n if (!word) {\n return _super.prototype.select.call(this, model, pos, items);\n }\n var key = model.getLanguageIdentifier().language + \"/\" + word;\n var item = this._trie.get(key);\n if (!item) {\n item = this._trie.findSubstr(key);\n }\n if (item) {\n for (var i = 0; i < items.length; i++) {\n var _a = items[i].suggestion, type = _a.type, insertText = _a.insertText;\n if (type === item.type && insertText === item.insertText) {\n return i;\n }\n }\n }\n return _super.prototype.select.call(this, model, pos, items);\n };\n PrefixMemory.prototype.toJSON = function () {\n var entries = [];\n this._trie.forEach(function (value, key) { return entries.push([key, value]); });\n // sort by last recently used (touch), then\n // take the top 200 item and normalize their\n // touch\n entries\n .sort(function (a, b) { return -(a[1].touch - b[1].touch); })\n .forEach(function (value, i) { return value[1].touch = i; });\n return entries.slice(0, 200);\n };\n PrefixMemory.prototype.fromJSON = function (data) {\n this._trie.clear();\n if (data.length > 0) {\n this._seq = data[0][1].touch + 1;\n for (var _i = 0, data_2 = data; _i < data_2.length; _i++) {\n var _a = data_2[_i], key = _a[0], value = _a[1];\n this._trie.set(key, value);\n }\n }\n };\n return PrefixMemory;\n}(Memory));\nexport { PrefixMemory };\nvar SuggestMemories = /** @class */ (function () {\n function SuggestMemories(mode, _storageService) {\n var _this = this;\n this._storageService = _storageService;\n this._storagePrefix = 'suggest/memories';\n this._persistSoon = new RunOnceScheduler(function () { return _this._flush(); }, 3000);\n this.setMode(mode);\n }\n SuggestMemories.prototype.setMode = function (mode) {\n if (this._mode === mode) {\n return;\n }\n this._mode = mode;\n this._strategy = mode === 'recentlyUsedByPrefix' ? new PrefixMemory() : mode === 'recentlyUsed' ? new LRUMemory() : new NoMemory();\n try {\n var raw = this._storageService.get(this._storagePrefix + \"/\" + this._mode, StorageScope.WORKSPACE);\n if (raw) {\n this._strategy.fromJSON(JSON.parse(raw));\n }\n }\n catch (e) {\n // things can go wrong with JSON...\n }\n };\n SuggestMemories.prototype.memorize = function (model, pos, item) {\n this._strategy.memorize(model, pos, item);\n this._persistSoon.schedule();\n };\n SuggestMemories.prototype.select = function (model, pos, items) {\n return this._strategy.select(model, pos, items);\n };\n SuggestMemories.prototype._flush = function () {\n var raw = JSON.stringify(this._strategy);\n this._storageService.store(this._storagePrefix + \"/\" + this._mode, raw, StorageScope.WORKSPACE);\n };\n SuggestMemories = __decorate([\n __param(1, IStorageService)\n ], SuggestMemories);\n return SuggestMemories;\n}());\nexport { SuggestMemories };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __param = (this && this.__param) || function (paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n};\nimport * as nls from '../../../nls';\nimport { onUnexpectedError } from '../../../base/common/errors';\nimport { isFalsyOrEmpty } from '../../../base/common/arrays';\nimport { dispose } from '../../../base/common/lifecycle';\nimport { IInstantiationService } from '../../../platform/instantiation/common/instantiation';\nimport { ContextKeyExpr, IContextKeyService } from '../../../platform/contextkey/common/contextkey';\nimport { ICommandService } from '../../../platform/commands/common/commands';\nimport { EditorContextKeys } from '../../common/editorContextKeys';\nimport { registerEditorAction, registerEditorContribution, EditorAction, EditorCommand, registerEditorCommand } from '../../browser/editorExtensions';\nimport { alert } from '../../../base/browser/ui/aria/aria';\nimport { EditOperation } from '../../common/core/editOperation';\nimport { Range } from '../../common/core/range';\nimport { SnippetParser } from '../snippet/snippetParser';\nimport { SnippetController2 } from '../snippet/snippetController2';\nimport { Context as SuggestContext } from './suggest';\nimport { SuggestModel } from './suggestModel';\nimport { SuggestWidget } from './suggestWidget';\nimport { SuggestMemories } from './suggestMemory';\nvar AcceptOnCharacterOracle = /** @class */ (function () {\n function AcceptOnCharacterOracle(editor, widget, accept) {\n var _this = this;\n this._disposables = [];\n this._activeAcceptCharacters = new Set();\n this._disposables.push(widget.onDidShow(function () { return _this._onItem(widget.getFocusedItem()); }));\n this._disposables.push(widget.onDidFocus(this._onItem, this));\n this._disposables.push(widget.onDidHide(this.reset, this));\n this._disposables.push(editor.onWillType(function (text) {\n if (_this._activeItem) {\n var ch = text[text.length - 1];\n if (_this._activeAcceptCharacters.has(ch) && editor.getConfiguration().contribInfo.acceptSuggestionOnCommitCharacter) {\n accept(_this._activeItem);\n }\n }\n }));\n }\n AcceptOnCharacterOracle.prototype._onItem = function (selected) {\n if (!selected || isFalsyOrEmpty(selected.item.suggestion.commitCharacters)) {\n this.reset();\n return;\n }\n this._activeItem = selected;\n this._activeAcceptCharacters.clear();\n for (var _i = 0, _a = selected.item.suggestion.commitCharacters; _i < _a.length; _i++) {\n var ch = _a[_i];\n if (ch.length > 0) {\n this._activeAcceptCharacters.add(ch[0]);\n }\n }\n };\n AcceptOnCharacterOracle.prototype.reset = function () {\n this._activeItem = undefined;\n };\n AcceptOnCharacterOracle.prototype.dispose = function () {\n dispose(this._disposables);\n };\n return AcceptOnCharacterOracle;\n}());\nvar SuggestController = /** @class */ (function () {\n function SuggestController(_editor, _commandService, _contextKeyService, _instantiationService) {\n var _this = this;\n this._editor = _editor;\n this._commandService = _commandService;\n this._contextKeyService = _contextKeyService;\n this._instantiationService = _instantiationService;\n this._toDispose = [];\n this._model = new SuggestModel(this._editor);\n this._memory = _instantiationService.createInstance(SuggestMemories, this._editor.getConfiguration().contribInfo.suggestSelection);\n this._toDispose.push(this._model.onDidTrigger(function (e) {\n if (!_this._widget) {\n _this._createSuggestWidget();\n }\n _this._widget.showTriggered(e.auto);\n }));\n this._toDispose.push(this._model.onDidSuggest(function (e) {\n var index = _this._memory.select(_this._editor.getModel(), _this._editor.getPosition(), e.completionModel.items);\n _this._widget.showSuggestions(e.completionModel, index, e.isFrozen, e.auto);\n }));\n this._toDispose.push(this._model.onDidCancel(function (e) {\n if (_this._widget && !e.retrigger) {\n _this._widget.hideWidget();\n }\n }));\n // Manage the acceptSuggestionsOnEnter context key\n var acceptSuggestionsOnEnter = SuggestContext.AcceptSuggestionsOnEnter.bindTo(_contextKeyService);\n var updateFromConfig = function () {\n var _a = _this._editor.getConfiguration().contribInfo, acceptSuggestionOnEnter = _a.acceptSuggestionOnEnter, suggestSelection = _a.suggestSelection;\n acceptSuggestionsOnEnter.set(acceptSuggestionOnEnter === 'on' || acceptSuggestionOnEnter === 'smart');\n _this._memory.setMode(suggestSelection);\n };\n this._toDispose.push(this._editor.onDidChangeConfiguration(function (e) { return updateFromConfig(); }));\n updateFromConfig();\n }\n SuggestController.get = function (editor) {\n return editor.getContribution(SuggestController.ID);\n };\n SuggestController.prototype._createSuggestWidget = function () {\n var _this = this;\n this._widget = this._instantiationService.createInstance(SuggestWidget, this._editor);\n this._toDispose.push(this._widget.onDidSelect(this._onDidSelectItem, this));\n // Wire up logic to accept a suggestion on certain characters\n var autoAcceptOracle = new AcceptOnCharacterOracle(this._editor, this._widget, function (item) { return _this._onDidSelectItem(item); });\n this._toDispose.push(autoAcceptOracle, this._model.onDidSuggest(function (e) {\n if (e.completionModel.items.length === 0) {\n autoAcceptOracle.reset();\n }\n }));\n var makesTextEdit = SuggestContext.MakesTextEdit.bindTo(this._contextKeyService);\n this._toDispose.push(this._widget.onDidFocus(function (_a) {\n var item = _a.item;\n var position = _this._editor.getPosition();\n var startColumn = item.position.column - item.suggestion.overwriteBefore;\n var endColumn = position.column;\n var value = true;\n if (_this._editor.getConfiguration().contribInfo.acceptSuggestionOnEnter === 'smart'\n && _this._model.state === 2 /* Auto */\n && !item.suggestion.command\n && !item.suggestion.additionalTextEdits\n && item.suggestion.snippetType !== 'textmate'\n && endColumn - startColumn === item.suggestion.insertText.length) {\n var oldText = _this._editor.getModel().getValueInRange({\n startLineNumber: position.lineNumber,\n startColumn: startColumn,\n endLineNumber: position.lineNumber,\n endColumn: endColumn\n });\n value = oldText !== item.suggestion.insertText;\n }\n makesTextEdit.set(value);\n }));\n this._toDispose.push({\n dispose: function () { makesTextEdit.reset(); }\n });\n };\n SuggestController.prototype.getId = function () {\n return SuggestController.ID;\n };\n SuggestController.prototype.dispose = function () {\n this._toDispose = dispose(this._toDispose);\n if (this._widget) {\n this._widget.dispose();\n this._widget = null;\n }\n if (this._model) {\n this._model.dispose();\n this._model = null;\n }\n };\n SuggestController.prototype._onDidSelectItem = function (event) {\n var _a;\n if (!event || !event.item) {\n this._model.cancel();\n return;\n }\n var _b = event.item, suggestion = _b.suggestion, position = _b.position;\n var editorColumn = this._editor.getPosition().column;\n var columnDelta = editorColumn - position.column;\n // pushing undo stops *before* additional text edits and\n // *after* the main edit\n this._editor.pushUndoStop();\n if (Array.isArray(suggestion.additionalTextEdits)) {\n this._editor.executeEdits('suggestController.additionalTextEdits', suggestion.additionalTextEdits.map(function (edit) { return EditOperation.replace(Range.lift(edit.range), edit.text); }));\n }\n // keep item in memory\n this._memory.memorize(this._editor.getModel(), this._editor.getPosition(), event.item);\n var insertText = suggestion.insertText;\n if (suggestion.snippetType !== 'textmate') {\n insertText = SnippetParser.escape(insertText);\n }\n SnippetController2.get(this._editor).insert(insertText, suggestion.overwriteBefore + columnDelta, suggestion.overwriteAfter, false, false);\n this._editor.pushUndoStop();\n if (!suggestion.command) {\n // done\n this._model.cancel();\n }\n else if (suggestion.command.id === TriggerSuggestAction.id) {\n // retigger\n this._model.trigger({ auto: true }, true);\n }\n else {\n // exec command, done\n (_a = this._commandService).executeCommand.apply(_a, [suggestion.command.id].concat(suggestion.command.arguments)).done(undefined, onUnexpectedError);\n this._model.cancel();\n }\n this._alertCompletionItem(event.item);\n };\n SuggestController.prototype._alertCompletionItem = function (_a) {\n var suggestion = _a.suggestion;\n var msg = nls.localize('arai.alert.snippet', \"Accepting '{0}' did insert the following text: {1}\", suggestion.label, suggestion.insertText);\n alert(msg);\n };\n SuggestController.prototype.triggerSuggest = function (onlyFrom) {\n this._model.trigger({ auto: false }, false, onlyFrom);\n this._editor.revealLine(this._editor.getPosition().lineNumber, 0 /* Smooth */);\n this._editor.focus();\n };\n SuggestController.prototype.acceptSelectedSuggestion = function () {\n if (this._widget) {\n var item = this._widget.getFocusedItem();\n this._onDidSelectItem(item);\n }\n };\n SuggestController.prototype.cancelSuggestWidget = function () {\n if (this._widget) {\n this._model.cancel();\n this._widget.hideWidget();\n }\n };\n SuggestController.prototype.selectNextSuggestion = function () {\n if (this._widget) {\n this._widget.selectNext();\n }\n };\n SuggestController.prototype.selectNextPageSuggestion = function () {\n if (this._widget) {\n this._widget.selectNextPage();\n }\n };\n SuggestController.prototype.selectLastSuggestion = function () {\n if (this._widget) {\n this._widget.selectLast();\n }\n };\n SuggestController.prototype.selectPrevSuggestion = function () {\n if (this._widget) {\n this._widget.selectPrevious();\n }\n };\n SuggestController.prototype.selectPrevPageSuggestion = function () {\n if (this._widget) {\n this._widget.selectPreviousPage();\n }\n };\n SuggestController.prototype.selectFirstSuggestion = function () {\n if (this._widget) {\n this._widget.selectFirst();\n }\n };\n SuggestController.prototype.toggleSuggestionDetails = function () {\n if (this._widget) {\n this._widget.toggleDetails();\n }\n };\n SuggestController.prototype.toggleSuggestionFocus = function () {\n if (this._widget) {\n this._widget.toggleDetailsFocus();\n }\n };\n SuggestController.ID = 'editor.contrib.suggestController';\n SuggestController = __decorate([\n __param(1, ICommandService),\n __param(2, IContextKeyService),\n __param(3, IInstantiationService)\n ], SuggestController);\n return SuggestController;\n}());\nexport { SuggestController };\nvar TriggerSuggestAction = /** @class */ (function (_super) {\n __extends(TriggerSuggestAction, _super);\n function TriggerSuggestAction() {\n return _super.call(this, {\n id: TriggerSuggestAction.id,\n label: nls.localize('suggest.trigger.label', \"Trigger Suggest\"),\n alias: 'Trigger Suggest',\n precondition: ContextKeyExpr.and(EditorContextKeys.writable, EditorContextKeys.hasCompletionItemProvider),\n kbOpts: {\n kbExpr: EditorContextKeys.textInputFocus,\n primary: 2048 /* CtrlCmd */ | 10 /* Space */,\n mac: { primary: 256 /* WinCtrl */ | 10 /* Space */ },\n weight: 100 /* EditorContrib */\n }\n }) || this;\n }\n TriggerSuggestAction.prototype.run = function (accessor, editor) {\n var controller = SuggestController.get(editor);\n if (!controller) {\n return;\n }\n controller.triggerSuggest();\n };\n TriggerSuggestAction.id = 'editor.action.triggerSuggest';\n return TriggerSuggestAction;\n}(EditorAction));\nexport { TriggerSuggestAction };\nregisterEditorContribution(SuggestController);\nregisterEditorAction(TriggerSuggestAction);\nvar weight = 100 /* EditorContrib */ + 90;\nvar SuggestCommand = EditorCommand.bindToContribution(SuggestController.get);\nregisterEditorCommand(new SuggestCommand({\n id: 'acceptSelectedSuggestion',\n precondition: SuggestContext.Visible,\n handler: function (x) { return x.acceptSelectedSuggestion(); },\n kbOpts: {\n weight: weight,\n kbExpr: EditorContextKeys.textInputFocus,\n primary: 2 /* Tab */\n }\n}));\nregisterEditorCommand(new SuggestCommand({\n id: 'acceptSelectedSuggestionOnEnter',\n precondition: SuggestContext.Visible,\n handler: function (x) { return x.acceptSelectedSuggestion(); },\n kbOpts: {\n weight: weight,\n kbExpr: ContextKeyExpr.and(EditorContextKeys.textInputFocus, SuggestContext.AcceptSuggestionsOnEnter, SuggestContext.MakesTextEdit),\n primary: 3 /* Enter */\n }\n}));\nregisterEditorCommand(new SuggestCommand({\n id: 'hideSuggestWidget',\n precondition: SuggestContext.Visible,\n handler: function (x) { return x.cancelSuggestWidget(); },\n kbOpts: {\n weight: weight,\n kbExpr: EditorContextKeys.textInputFocus,\n primary: 9 /* Escape */,\n secondary: [1024 /* Shift */ | 9 /* Escape */]\n }\n}));\nregisterEditorCommand(new SuggestCommand({\n id: 'selectNextSuggestion',\n precondition: ContextKeyExpr.and(SuggestContext.Visible, SuggestContext.MultipleSuggestions),\n handler: function (c) { return c.selectNextSuggestion(); },\n kbOpts: {\n weight: weight,\n kbExpr: EditorContextKeys.textInputFocus,\n primary: 18 /* DownArrow */,\n secondary: [2048 /* CtrlCmd */ | 18 /* DownArrow */],\n mac: { primary: 18 /* DownArrow */, secondary: [2048 /* CtrlCmd */ | 18 /* DownArrow */, 256 /* WinCtrl */ | 44 /* KEY_N */] }\n }\n}));\nregisterEditorCommand(new SuggestCommand({\n id: 'selectNextPageSuggestion',\n precondition: ContextKeyExpr.and(SuggestContext.Visible, SuggestContext.MultipleSuggestions),\n handler: function (c) { return c.selectNextPageSuggestion(); },\n kbOpts: {\n weight: weight,\n kbExpr: EditorContextKeys.textInputFocus,\n primary: 12 /* PageDown */,\n secondary: [2048 /* CtrlCmd */ | 12 /* PageDown */]\n }\n}));\nregisterEditorCommand(new SuggestCommand({\n id: 'selectLastSuggestion',\n precondition: ContextKeyExpr.and(SuggestContext.Visible, SuggestContext.MultipleSuggestions),\n handler: function (c) { return c.selectLastSuggestion(); }\n}));\nregisterEditorCommand(new SuggestCommand({\n id: 'selectPrevSuggestion',\n precondition: ContextKeyExpr.and(SuggestContext.Visible, SuggestContext.MultipleSuggestions),\n handler: function (c) { return c.selectPrevSuggestion(); },\n kbOpts: {\n weight: weight,\n kbExpr: EditorContextKeys.textInputFocus,\n primary: 16 /* UpArrow */,\n secondary: [2048 /* CtrlCmd */ | 16 /* UpArrow */],\n mac: { primary: 16 /* UpArrow */, secondary: [2048 /* CtrlCmd */ | 16 /* UpArrow */, 256 /* WinCtrl */ | 46 /* KEY_P */] }\n }\n}));\nregisterEditorCommand(new SuggestCommand({\n id: 'selectPrevPageSuggestion',\n precondition: ContextKeyExpr.and(SuggestContext.Visible, SuggestContext.MultipleSuggestions),\n handler: function (c) { return c.selectPrevPageSuggestion(); },\n kbOpts: {\n weight: weight,\n kbExpr: EditorContextKeys.textInputFocus,\n primary: 11 /* PageUp */,\n secondary: [2048 /* CtrlCmd */ | 11 /* PageUp */]\n }\n}));\nregisterEditorCommand(new SuggestCommand({\n id: 'selectFirstSuggestion',\n precondition: ContextKeyExpr.and(SuggestContext.Visible, SuggestContext.MultipleSuggestions),\n handler: function (c) { return c.selectFirstSuggestion(); }\n}));\nregisterEditorCommand(new SuggestCommand({\n id: 'toggleSuggestionDetails',\n precondition: SuggestContext.Visible,\n handler: function (x) { return x.toggleSuggestionDetails(); },\n kbOpts: {\n weight: weight,\n kbExpr: EditorContextKeys.textInputFocus,\n primary: 2048 /* CtrlCmd */ | 10 /* Space */,\n mac: { primary: 256 /* WinCtrl */ | 10 /* Space */ }\n }\n}));\nregisterEditorCommand(new SuggestCommand({\n id: 'toggleSuggestionFocus',\n precondition: SuggestContext.Visible,\n handler: function (x) { return x.toggleSuggestionFocus(); },\n kbOpts: {\n weight: weight,\n kbExpr: EditorContextKeys.textInputFocus,\n primary: 2048 /* CtrlCmd */ | 512 /* Alt */ | 10 /* Space */,\n mac: { primary: 256 /* WinCtrl */ | 512 /* Alt */ | 10 /* Space */ }\n }\n}));\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport * as nls from '../../../nls';\nimport { registerEditorAction, EditorAction } from '../../browser/editorExtensions';\nimport { TabFocus } from '../../common/config/commonEditorConfig';\nvar ToggleTabFocusModeAction = /** @class */ (function (_super) {\n __extends(ToggleTabFocusModeAction, _super);\n function ToggleTabFocusModeAction() {\n return _super.call(this, {\n id: ToggleTabFocusModeAction.ID,\n label: nls.localize({ key: 'toggle.tabMovesFocus', comment: ['Turn on/off use of tab key for moving focus around VS Code'] }, \"Toggle Tab Key Moves Focus\"),\n alias: 'Toggle Tab Key Moves Focus',\n precondition: null,\n kbOpts: {\n kbExpr: null,\n primary: 2048 /* CtrlCmd */ | 43 /* KEY_M */,\n mac: { primary: 256 /* WinCtrl */ | 1024 /* Shift */ | 43 /* KEY_M */ },\n weight: 100 /* EditorContrib */\n }\n }) || this;\n }\n ToggleTabFocusModeAction.prototype.run = function (accessor, editor) {\n var oldValue = TabFocus.getTabFocusMode();\n TabFocus.setTabFocusMode(!oldValue);\n };\n ToggleTabFocusModeAction.ID = 'editor.action.toggleTabFocusMode';\n return ToggleTabFocusModeAction;\n}(EditorAction));\nexport { ToggleTabFocusModeAction };\nregisterEditorAction(ToggleTabFocusModeAction);\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __param = (this && this.__param) || function (paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n};\nimport * as nls from '../../../nls';\nimport { first2, createCancelablePromise } from '../../../base/common/async';\nimport { onUnexpectedExternalError, onUnexpectedError } from '../../../base/common/errors';\nimport { Range } from '../../common/core/range';\nimport { registerEditorContribution, EditorAction, registerEditorAction, registerDefaultLanguageCommand } from '../../browser/editorExtensions';\nimport { DocumentHighlightKind, DocumentHighlightProviderRegistry } from '../../common/modes';\nimport { dispose } from '../../../base/common/lifecycle';\nimport { registerColor, editorSelectionHighlight, overviewRulerSelectionHighlightForeground, activeContrastBorder, editorSelectionHighlightBorder } from '../../../platform/theme/common/colorRegistry';\nimport { registerThemingParticipant, themeColorFromId } from '../../../platform/theme/common/themeService';\nimport { CursorChangeReason } from '../../common/controller/cursorEvents';\nimport { ModelDecorationOptions } from '../../common/model/textModel';\nimport { IContextKeyService, RawContextKey } from '../../../platform/contextkey/common/contextkey';\nimport { EditorContextKeys } from '../../common/editorContextKeys';\nimport { firstIndex, isFalsyOrEmpty } from '../../../base/common/arrays';\nimport { TrackedRangeStickiness, OverviewRulerLane } from '../../common/model';\nimport { CancellationToken } from '../../../base/common/cancellation';\nexport var editorWordHighlight = registerColor('editor.wordHighlightBackground', { dark: '#575757B8', light: '#57575740', hc: null }, nls.localize('wordHighlight', 'Background color of a symbol during read-access, like reading a variable. The color must not be opaque to not hide underlying decorations.'), true);\nexport var editorWordHighlightStrong = registerColor('editor.wordHighlightStrongBackground', { dark: '#004972B8', light: '#0e639c40', hc: null }, nls.localize('wordHighlightStrong', 'Background color of a symbol during write-access, like writing to a variable. The color must not be opaque to not hide underlying decorations.'), true);\nexport var editorWordHighlightBorder = registerColor('editor.wordHighlightBorder', { light: null, dark: null, hc: activeContrastBorder }, nls.localize('wordHighlightBorder', 'Border color of a symbol during read-access, like reading a variable.'));\nexport var editorWordHighlightStrongBorder = registerColor('editor.wordHighlightStrongBorder', { light: null, dark: null, hc: activeContrastBorder }, nls.localize('wordHighlightStrongBorder', 'Border color of a symbol during write-access, like writing to a variable.'));\nexport var overviewRulerWordHighlightForeground = registerColor('editorOverviewRuler.wordHighlightForeground', { dark: '#A0A0A0CC', light: '#A0A0A0CC', hc: '#A0A0A0CC' }, nls.localize('overviewRulerWordHighlightForeground', 'Overview ruler marker color for symbol highlights. The color must not be opaque to not hide underlying decorations.'), true);\nexport var overviewRulerWordHighlightStrongForeground = registerColor('editorOverviewRuler.wordHighlightStrongForeground', { dark: '#C0A0C0CC', light: '#C0A0C0CC', hc: '#C0A0C0CC' }, nls.localize('overviewRulerWordHighlightStrongForeground', 'Overview ruler marker color for write-access symbol highlights. The color must not be opaque to not hide underlying decorations.'), true);\nexport var ctxHasWordHighlights = new RawContextKey('hasWordHighlights', false);\nexport function getOccurrencesAtPosition(model, position, token) {\n var orderedByScore = DocumentHighlightProviderRegistry.ordered(model);\n // in order of score ask the occurrences provider\n // until someone response with a good result\n // (good = none empty array)\n return first2(orderedByScore.map(function (provider) { return function () {\n return Promise.resolve(provider.provideDocumentHighlights(model, position, token))\n .then(undefined, onUnexpectedExternalError);\n }; }), function (result) { return !isFalsyOrEmpty(result); });\n}\nregisterDefaultLanguageCommand('_executeDocumentHighlights', function (model, position) { return getOccurrencesAtPosition(model, position, CancellationToken.None); });\nvar WordHighlighter = /** @class */ (function () {\n function WordHighlighter(editor, contextKeyService) {\n var _this = this;\n this.workerRequestTokenId = 0;\n this.workerRequest = null;\n this.workerRequestCompleted = false;\n this.workerRequestValue = [];\n this.lastCursorPositionChangeTime = 0;\n this.renderDecorationsTimer = -1;\n this.editor = editor;\n this._hasWordHighlights = ctxHasWordHighlights.bindTo(contextKeyService);\n this._ignorePositionChangeEvent = false;\n this.occurrencesHighlight = this.editor.getConfiguration().contribInfo.occurrencesHighlight;\n this.model = this.editor.getModel();\n this.toUnhook = [];\n this.toUnhook.push(editor.onDidChangeCursorPosition(function (e) {\n if (_this._ignorePositionChangeEvent) {\n // We are changing the position => ignore this event\n return;\n }\n if (!_this.occurrencesHighlight) {\n // Early exit if nothing needs to be done!\n // Leave some form of early exit check here if you wish to continue being a cursor position change listener ;)\n return;\n }\n _this._onPositionChanged(e);\n }));\n this.toUnhook.push(editor.onDidChangeModel(function (e) {\n _this._stopAll();\n _this.model = _this.editor.getModel();\n }));\n this.toUnhook.push(editor.onDidChangeModelContent(function (e) {\n _this._stopAll();\n }));\n this.toUnhook.push(editor.onDidChangeConfiguration(function (e) {\n var newValue = _this.editor.getConfiguration().contribInfo.occurrencesHighlight;\n if (_this.occurrencesHighlight !== newValue) {\n _this.occurrencesHighlight = newValue;\n _this._stopAll();\n }\n }));\n this._lastWordRange = null;\n this._decorationIds = [];\n this.workerRequestTokenId = 0;\n this.workerRequest = null;\n this.workerRequestCompleted = false;\n this.lastCursorPositionChangeTime = 0;\n this.renderDecorationsTimer = -1;\n }\n WordHighlighter.prototype.hasDecorations = function () {\n return (this._decorationIds.length > 0);\n };\n WordHighlighter.prototype.restore = function () {\n if (!this.occurrencesHighlight) {\n return;\n }\n this._run();\n };\n WordHighlighter.prototype._getSortedHighlights = function () {\n var _this = this;\n return this._decorationIds\n .map(function (id) { return _this.model.getDecorationRange(id); })\n .sort(Range.compareRangesUsingStarts);\n };\n WordHighlighter.prototype.moveNext = function () {\n var _this = this;\n var highlights = this._getSortedHighlights();\n var index = firstIndex(highlights, function (range) { return range.containsPosition(_this.editor.getPosition()); });\n var newIndex = ((index + 1) % highlights.length);\n var dest = highlights[newIndex];\n try {\n this._ignorePositionChangeEvent = true;\n this.editor.setPosition(dest.getStartPosition());\n this.editor.revealRangeInCenterIfOutsideViewport(dest);\n }\n finally {\n this._ignorePositionChangeEvent = false;\n }\n };\n WordHighlighter.prototype.moveBack = function () {\n var _this = this;\n var highlights = this._getSortedHighlights();\n var index = firstIndex(highlights, function (range) { return range.containsPosition(_this.editor.getPosition()); });\n var newIndex = ((index - 1 + highlights.length) % highlights.length);\n var dest = highlights[newIndex];\n try {\n this._ignorePositionChangeEvent = true;\n this.editor.setPosition(dest.getStartPosition());\n this.editor.revealRangeInCenterIfOutsideViewport(dest);\n }\n finally {\n this._ignorePositionChangeEvent = false;\n }\n };\n WordHighlighter.prototype._removeDecorations = function () {\n if (this._decorationIds.length > 0) {\n // remove decorations\n this._decorationIds = this.editor.deltaDecorations(this._decorationIds, []);\n this._hasWordHighlights.set(false);\n }\n };\n WordHighlighter.prototype._stopAll = function () {\n this._lastWordRange = null;\n // Remove any existing decorations\n this._removeDecorations();\n // Cancel any renderDecorationsTimer\n if (this.renderDecorationsTimer !== -1) {\n clearTimeout(this.renderDecorationsTimer);\n this.renderDecorationsTimer = -1;\n }\n // Cancel any worker request\n if (this.workerRequest !== null) {\n this.workerRequest.cancel();\n this.workerRequest = null;\n }\n // Invalidate any worker request callback\n if (!this.workerRequestCompleted) {\n this.workerRequestTokenId++;\n this.workerRequestCompleted = true;\n }\n };\n WordHighlighter.prototype._onPositionChanged = function (e) {\n // disabled\n if (!this.occurrencesHighlight) {\n this._stopAll();\n return;\n }\n // ignore typing & other\n if (e.reason !== CursorChangeReason.Explicit) {\n this._stopAll();\n return;\n }\n this._run();\n };\n WordHighlighter.prototype._run = function () {\n var _this = this;\n // no providers for this model\n if (!DocumentHighlightProviderRegistry.has(this.model)) {\n this._stopAll();\n return;\n }\n var editorSelection = this.editor.getSelection();\n // ignore multiline selection\n if (editorSelection.startLineNumber !== editorSelection.endLineNumber) {\n this._stopAll();\n return;\n }\n var lineNumber = editorSelection.startLineNumber;\n var startColumn = editorSelection.startColumn;\n var endColumn = editorSelection.endColumn;\n var word = this.model.getWordAtPosition({\n lineNumber: lineNumber,\n column: startColumn\n });\n // The selection must be inside a word or surround one word at most\n if (!word || word.startColumn > startColumn || word.endColumn < endColumn) {\n this._stopAll();\n return;\n }\n // All the effort below is trying to achieve this:\n // - when cursor is moved to a word, trigger immediately a findOccurrences request\n // - 250ms later after the last cursor move event, render the occurrences\n // - no flickering!\n var currentWordRange = new Range(lineNumber, word.startColumn, lineNumber, word.endColumn);\n var workerRequestIsValid = this._lastWordRange && this._lastWordRange.equalsRange(currentWordRange);\n // Even if we are on a different word, if that word is in the decorations ranges, the request is still valid\n // (Same symbol)\n for (var i = 0, len = this._decorationIds.length; !workerRequestIsValid && i < len; i++) {\n var range = this.model.getDecorationRange(this._decorationIds[i]);\n if (range && range.startLineNumber === lineNumber) {\n if (range.startColumn <= startColumn && range.endColumn >= endColumn) {\n workerRequestIsValid = true;\n }\n }\n }\n // There are 4 cases:\n // a) old workerRequest is valid & completed, renderDecorationsTimer fired\n // b) old workerRequest is valid & completed, renderDecorationsTimer not fired\n // c) old workerRequest is valid, but not completed\n // d) old workerRequest is not valid\n // For a) no action is needed\n // For c), member 'lastCursorPositionChangeTime' will be used when installing the timer so no action is needed\n this.lastCursorPositionChangeTime = (new Date()).getTime();\n if (workerRequestIsValid) {\n if (this.workerRequestCompleted && this.renderDecorationsTimer !== -1) {\n // case b)\n // Delay the firing of renderDecorationsTimer by an extra 250 ms\n clearTimeout(this.renderDecorationsTimer);\n this.renderDecorationsTimer = -1;\n this._beginRenderDecorations();\n }\n }\n else {\n // case d)\n // Stop all previous actions and start fresh\n this._stopAll();\n var myRequestId_1 = ++this.workerRequestTokenId;\n this.workerRequestCompleted = false;\n this.workerRequest = createCancelablePromise(function (token) { return getOccurrencesAtPosition(_this.model, _this.editor.getPosition(), token); });\n this.workerRequest.then(function (data) {\n if (myRequestId_1 === _this.workerRequestTokenId) {\n _this.workerRequestCompleted = true;\n _this.workerRequestValue = data || [];\n _this._beginRenderDecorations();\n }\n }, onUnexpectedError);\n }\n this._lastWordRange = currentWordRange;\n };\n WordHighlighter.prototype._beginRenderDecorations = function () {\n var _this = this;\n var currentTime = (new Date()).getTime();\n var minimumRenderTime = this.lastCursorPositionChangeTime + 250;\n if (currentTime >= minimumRenderTime) {\n // Synchronous\n this.renderDecorationsTimer = -1;\n this.renderDecorations();\n }\n else {\n // Asynchronous\n this.renderDecorationsTimer = setTimeout(function () {\n _this.renderDecorations();\n }, (minimumRenderTime - currentTime));\n }\n };\n WordHighlighter.prototype.renderDecorations = function () {\n this.renderDecorationsTimer = -1;\n var decorations = [];\n for (var i = 0, len = this.workerRequestValue.length; i < len; i++) {\n var info = this.workerRequestValue[i];\n decorations.push({\n range: info.range,\n options: WordHighlighter._getDecorationOptions(info.kind)\n });\n }\n this._decorationIds = this.editor.deltaDecorations(this._decorationIds, decorations);\n this._hasWordHighlights.set(this.hasDecorations());\n };\n WordHighlighter._getDecorationOptions = function (kind) {\n if (kind === DocumentHighlightKind.Write) {\n return this._WRITE_OPTIONS;\n }\n else if (kind === DocumentHighlightKind.Text) {\n return this._TEXT_OPTIONS;\n }\n else {\n return this._REGULAR_OPTIONS;\n }\n };\n WordHighlighter.prototype.dispose = function () {\n this._stopAll();\n this.toUnhook = dispose(this.toUnhook);\n };\n WordHighlighter._WRITE_OPTIONS = ModelDecorationOptions.register({\n stickiness: TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges,\n className: 'wordHighlightStrong',\n overviewRuler: {\n color: themeColorFromId(overviewRulerWordHighlightStrongForeground),\n darkColor: themeColorFromId(overviewRulerWordHighlightStrongForeground),\n position: OverviewRulerLane.Center\n }\n });\n WordHighlighter._TEXT_OPTIONS = ModelDecorationOptions.register({\n stickiness: TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges,\n className: 'selectionHighlight',\n overviewRuler: {\n color: themeColorFromId(overviewRulerSelectionHighlightForeground),\n darkColor: themeColorFromId(overviewRulerSelectionHighlightForeground),\n position: OverviewRulerLane.Center\n }\n });\n WordHighlighter._REGULAR_OPTIONS = ModelDecorationOptions.register({\n stickiness: TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges,\n className: 'wordHighlight',\n overviewRuler: {\n color: themeColorFromId(overviewRulerWordHighlightForeground),\n darkColor: themeColorFromId(overviewRulerWordHighlightForeground),\n position: OverviewRulerLane.Center\n }\n });\n return WordHighlighter;\n}());\nvar WordHighlighterContribution = /** @class */ (function () {\n function WordHighlighterContribution(editor, contextKeyService) {\n this.wordHighligher = new WordHighlighter(editor, contextKeyService);\n }\n WordHighlighterContribution.get = function (editor) {\n return editor.getContribution(WordHighlighterContribution.ID);\n };\n WordHighlighterContribution.prototype.getId = function () {\n return WordHighlighterContribution.ID;\n };\n WordHighlighterContribution.prototype.saveViewState = function () {\n if (this.wordHighligher.hasDecorations()) {\n return true;\n }\n return false;\n };\n WordHighlighterContribution.prototype.moveNext = function () {\n this.wordHighligher.moveNext();\n };\n WordHighlighterContribution.prototype.moveBack = function () {\n this.wordHighligher.moveBack();\n };\n WordHighlighterContribution.prototype.restoreViewState = function (state) {\n if (state) {\n this.wordHighligher.restore();\n }\n };\n WordHighlighterContribution.prototype.dispose = function () {\n this.wordHighligher.dispose();\n };\n WordHighlighterContribution.ID = 'editor.contrib.wordHighlighter';\n WordHighlighterContribution = __decorate([\n __param(1, IContextKeyService)\n ], WordHighlighterContribution);\n return WordHighlighterContribution;\n}());\nvar WordHighlightNavigationAction = /** @class */ (function (_super) {\n __extends(WordHighlightNavigationAction, _super);\n function WordHighlightNavigationAction(next, opts) {\n var _this = _super.call(this, opts) || this;\n _this._isNext = next;\n return _this;\n }\n WordHighlightNavigationAction.prototype.run = function (accessor, editor) {\n var controller = WordHighlighterContribution.get(editor);\n if (!controller) {\n return;\n }\n if (this._isNext) {\n controller.moveNext();\n }\n else {\n controller.moveBack();\n }\n };\n return WordHighlightNavigationAction;\n}(EditorAction));\nvar NextWordHighlightAction = /** @class */ (function (_super) {\n __extends(NextWordHighlightAction, _super);\n function NextWordHighlightAction() {\n return _super.call(this, true, {\n id: 'editor.action.wordHighlight.next',\n label: nls.localize('wordHighlight.next.label', \"Go to Next Symbol Highlight\"),\n alias: 'Go to Next Symbol Highlight',\n precondition: ctxHasWordHighlights,\n kbOpts: {\n kbExpr: EditorContextKeys.editorTextFocus,\n primary: 65 /* F7 */,\n weight: 100 /* EditorContrib */\n }\n }) || this;\n }\n return NextWordHighlightAction;\n}(WordHighlightNavigationAction));\nvar PrevWordHighlightAction = /** @class */ (function (_super) {\n __extends(PrevWordHighlightAction, _super);\n function PrevWordHighlightAction() {\n return _super.call(this, false, {\n id: 'editor.action.wordHighlight.prev',\n label: nls.localize('wordHighlight.previous.label', \"Go to Previous Symbol Highlight\"),\n alias: 'Go to Previous Symbol Highlight',\n precondition: ctxHasWordHighlights,\n kbOpts: {\n kbExpr: EditorContextKeys.editorTextFocus,\n primary: 1024 /* Shift */ | 65 /* F7 */,\n weight: 100 /* EditorContrib */\n }\n }) || this;\n }\n return PrevWordHighlightAction;\n}(WordHighlightNavigationAction));\nregisterEditorContribution(WordHighlighterContribution);\nregisterEditorAction(NextWordHighlightAction);\nregisterEditorAction(PrevWordHighlightAction);\nregisterThemingParticipant(function (theme, collector) {\n var selectionHighlight = theme.getColor(editorSelectionHighlight);\n if (selectionHighlight) {\n collector.addRule(\".monaco-editor .focused .selectionHighlight { background-color: \" + selectionHighlight + \"; }\");\n collector.addRule(\".monaco-editor .selectionHighlight { background-color: \" + selectionHighlight.transparent(0.5) + \"; }\");\n }\n var wordHighlight = theme.getColor(editorWordHighlight);\n if (wordHighlight) {\n collector.addRule(\".monaco-editor .wordHighlight { background-color: \" + wordHighlight + \"; }\");\n }\n var wordHighlightStrong = theme.getColor(editorWordHighlightStrong);\n if (wordHighlightStrong) {\n collector.addRule(\".monaco-editor .wordHighlightStrong { background-color: \" + wordHighlightStrong + \"; }\");\n }\n var selectionHighlightBorder = theme.getColor(editorSelectionHighlightBorder);\n if (selectionHighlightBorder) {\n collector.addRule(\".monaco-editor .selectionHighlight { border: 1px \" + (theme.type === 'hc' ? 'dotted' : 'solid') + \" \" + selectionHighlightBorder + \"; box-sizing: border-box; }\");\n }\n var wordHighlightBorder = theme.getColor(editorWordHighlightBorder);\n if (wordHighlightBorder) {\n collector.addRule(\".monaco-editor .wordHighlight { border: 1px \" + (theme.type === 'hc' ? 'dashed' : 'solid') + \" \" + wordHighlightBorder + \"; box-sizing: border-box; }\");\n }\n var wordHighlightStrongBorder = theme.getColor(editorWordHighlightStrongBorder);\n if (wordHighlightStrongBorder) {\n collector.addRule(\".monaco-editor .wordHighlightStrong { border: 1px \" + (theme.type === 'hc' ? 'dashed' : 'solid') + \" \" + wordHighlightStrongBorder + \"; box-sizing: border-box; }\");\n }\n});\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { EditorContextKeys } from '../../common/editorContextKeys';\nimport { Selection } from '../../common/core/selection';\nimport { registerEditorCommand, EditorCommand } from '../../browser/editorExtensions';\nimport { Position } from '../../common/core/position';\nimport { Range } from '../../common/core/range';\nimport { WordOperations } from '../../common/controller/cursorWordOperations';\nimport { ReplaceCommand } from '../../common/commands/replaceCommand';\nimport { getMapForWordSeparators } from '../../common/controller/wordCharacterClassifier';\nimport { CursorState } from '../../common/controller/cursorCommon';\nimport { CursorChangeReason } from '../../common/controller/cursorEvents';\nvar MoveWordCommand = /** @class */ (function (_super) {\n __extends(MoveWordCommand, _super);\n function MoveWordCommand(opts) {\n var _this = _super.call(this, opts) || this;\n _this._inSelectionMode = opts.inSelectionMode;\n _this._wordNavigationType = opts.wordNavigationType;\n return _this;\n }\n MoveWordCommand.prototype.runEditorCommand = function (accessor, editor, args) {\n var _this = this;\n var config = editor.getConfiguration();\n var wordSeparators = getMapForWordSeparators(config.wordSeparators);\n var model = editor.getModel();\n var selections = editor.getSelections();\n var result = selections.map(function (sel) {\n var inPosition = new Position(sel.positionLineNumber, sel.positionColumn);\n var outPosition = _this._move(wordSeparators, model, inPosition, _this._wordNavigationType);\n return _this._moveTo(sel, outPosition, _this._inSelectionMode);\n });\n editor._getCursors().setStates('moveWordCommand', CursorChangeReason.NotSet, result.map(function (r) { return CursorState.fromModelSelection(r); }));\n if (result.length === 1) {\n var pos = new Position(result[0].positionLineNumber, result[0].positionColumn);\n editor.revealPosition(pos, 0 /* Smooth */);\n }\n };\n MoveWordCommand.prototype._moveTo = function (from, to, inSelectionMode) {\n if (inSelectionMode) {\n // move just position\n return new Selection(from.selectionStartLineNumber, from.selectionStartColumn, to.lineNumber, to.column);\n }\n else {\n // move everything\n return new Selection(to.lineNumber, to.column, to.lineNumber, to.column);\n }\n };\n return MoveWordCommand;\n}(EditorCommand));\nexport { MoveWordCommand };\nvar WordLeftCommand = /** @class */ (function (_super) {\n __extends(WordLeftCommand, _super);\n function WordLeftCommand() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n WordLeftCommand.prototype._move = function (wordSeparators, model, position, wordNavigationType) {\n return WordOperations.moveWordLeft(wordSeparators, model, position, wordNavigationType);\n };\n return WordLeftCommand;\n}(MoveWordCommand));\nexport { WordLeftCommand };\nvar WordRightCommand = /** @class */ (function (_super) {\n __extends(WordRightCommand, _super);\n function WordRightCommand() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n WordRightCommand.prototype._move = function (wordSeparators, model, position, wordNavigationType) {\n return WordOperations.moveWordRight(wordSeparators, model, position, wordNavigationType);\n };\n return WordRightCommand;\n}(MoveWordCommand));\nexport { WordRightCommand };\nvar CursorWordStartLeft = /** @class */ (function (_super) {\n __extends(CursorWordStartLeft, _super);\n function CursorWordStartLeft() {\n return _super.call(this, {\n inSelectionMode: false,\n wordNavigationType: 0 /* WordStart */,\n id: 'cursorWordStartLeft',\n precondition: null,\n kbOpts: {\n kbExpr: EditorContextKeys.textInputFocus,\n primary: 2048 /* CtrlCmd */ | 15 /* LeftArrow */,\n mac: { primary: 512 /* Alt */ | 15 /* LeftArrow */ },\n weight: 100 /* EditorContrib */\n }\n }) || this;\n }\n return CursorWordStartLeft;\n}(WordLeftCommand));\nexport { CursorWordStartLeft };\nvar CursorWordEndLeft = /** @class */ (function (_super) {\n __extends(CursorWordEndLeft, _super);\n function CursorWordEndLeft() {\n return _super.call(this, {\n inSelectionMode: false,\n wordNavigationType: 1 /* WordEnd */,\n id: 'cursorWordEndLeft',\n precondition: null\n }) || this;\n }\n return CursorWordEndLeft;\n}(WordLeftCommand));\nexport { CursorWordEndLeft };\nvar CursorWordLeft = /** @class */ (function (_super) {\n __extends(CursorWordLeft, _super);\n function CursorWordLeft() {\n return _super.call(this, {\n inSelectionMode: false,\n wordNavigationType: 0 /* WordStart */,\n id: 'cursorWordLeft',\n precondition: null\n }) || this;\n }\n return CursorWordLeft;\n}(WordLeftCommand));\nexport { CursorWordLeft };\nvar CursorWordStartLeftSelect = /** @class */ (function (_super) {\n __extends(CursorWordStartLeftSelect, _super);\n function CursorWordStartLeftSelect() {\n return _super.call(this, {\n inSelectionMode: true,\n wordNavigationType: 0 /* WordStart */,\n id: 'cursorWordStartLeftSelect',\n precondition: null,\n kbOpts: {\n kbExpr: EditorContextKeys.textInputFocus,\n primary: 2048 /* CtrlCmd */ | 1024 /* Shift */ | 15 /* LeftArrow */,\n mac: { primary: 512 /* Alt */ | 1024 /* Shift */ | 15 /* LeftArrow */ },\n weight: 100 /* EditorContrib */\n }\n }) || this;\n }\n return CursorWordStartLeftSelect;\n}(WordLeftCommand));\nexport { CursorWordStartLeftSelect };\nvar CursorWordEndLeftSelect = /** @class */ (function (_super) {\n __extends(CursorWordEndLeftSelect, _super);\n function CursorWordEndLeftSelect() {\n return _super.call(this, {\n inSelectionMode: true,\n wordNavigationType: 1 /* WordEnd */,\n id: 'cursorWordEndLeftSelect',\n precondition: null\n }) || this;\n }\n return CursorWordEndLeftSelect;\n}(WordLeftCommand));\nexport { CursorWordEndLeftSelect };\nvar CursorWordLeftSelect = /** @class */ (function (_super) {\n __extends(CursorWordLeftSelect, _super);\n function CursorWordLeftSelect() {\n return _super.call(this, {\n inSelectionMode: true,\n wordNavigationType: 0 /* WordStart */,\n id: 'cursorWordLeftSelect',\n precondition: null\n }) || this;\n }\n return CursorWordLeftSelect;\n}(WordLeftCommand));\nexport { CursorWordLeftSelect };\nvar CursorWordStartRight = /** @class */ (function (_super) {\n __extends(CursorWordStartRight, _super);\n function CursorWordStartRight() {\n return _super.call(this, {\n inSelectionMode: false,\n wordNavigationType: 0 /* WordStart */,\n id: 'cursorWordStartRight',\n precondition: null\n }) || this;\n }\n return CursorWordStartRight;\n}(WordRightCommand));\nexport { CursorWordStartRight };\nvar CursorWordEndRight = /** @class */ (function (_super) {\n __extends(CursorWordEndRight, _super);\n function CursorWordEndRight() {\n return _super.call(this, {\n inSelectionMode: false,\n wordNavigationType: 1 /* WordEnd */,\n id: 'cursorWordEndRight',\n precondition: null,\n kbOpts: {\n kbExpr: EditorContextKeys.textInputFocus,\n primary: 2048 /* CtrlCmd */ | 17 /* RightArrow */,\n mac: { primary: 512 /* Alt */ | 17 /* RightArrow */ },\n weight: 100 /* EditorContrib */\n }\n }) || this;\n }\n return CursorWordEndRight;\n}(WordRightCommand));\nexport { CursorWordEndRight };\nvar CursorWordRight = /** @class */ (function (_super) {\n __extends(CursorWordRight, _super);\n function CursorWordRight() {\n return _super.call(this, {\n inSelectionMode: false,\n wordNavigationType: 1 /* WordEnd */,\n id: 'cursorWordRight',\n precondition: null\n }) || this;\n }\n return CursorWordRight;\n}(WordRightCommand));\nexport { CursorWordRight };\nvar CursorWordStartRightSelect = /** @class */ (function (_super) {\n __extends(CursorWordStartRightSelect, _super);\n function CursorWordStartRightSelect() {\n return _super.call(this, {\n inSelectionMode: true,\n wordNavigationType: 0 /* WordStart */,\n id: 'cursorWordStartRightSelect',\n precondition: null\n }) || this;\n }\n return CursorWordStartRightSelect;\n}(WordRightCommand));\nexport { CursorWordStartRightSelect };\nvar CursorWordEndRightSelect = /** @class */ (function (_super) {\n __extends(CursorWordEndRightSelect, _super);\n function CursorWordEndRightSelect() {\n return _super.call(this, {\n inSelectionMode: true,\n wordNavigationType: 1 /* WordEnd */,\n id: 'cursorWordEndRightSelect',\n precondition: null,\n kbOpts: {\n kbExpr: EditorContextKeys.textInputFocus,\n primary: 2048 /* CtrlCmd */ | 1024 /* Shift */ | 17 /* RightArrow */,\n mac: { primary: 512 /* Alt */ | 1024 /* Shift */ | 17 /* RightArrow */ },\n weight: 100 /* EditorContrib */\n }\n }) || this;\n }\n return CursorWordEndRightSelect;\n}(WordRightCommand));\nexport { CursorWordEndRightSelect };\nvar CursorWordRightSelect = /** @class */ (function (_super) {\n __extends(CursorWordRightSelect, _super);\n function CursorWordRightSelect() {\n return _super.call(this, {\n inSelectionMode: true,\n wordNavigationType: 1 /* WordEnd */,\n id: 'cursorWordRightSelect',\n precondition: null\n }) || this;\n }\n return CursorWordRightSelect;\n}(WordRightCommand));\nexport { CursorWordRightSelect };\nvar DeleteWordCommand = /** @class */ (function (_super) {\n __extends(DeleteWordCommand, _super);\n function DeleteWordCommand(opts) {\n var _this = _super.call(this, opts) || this;\n _this._whitespaceHeuristics = opts.whitespaceHeuristics;\n _this._wordNavigationType = opts.wordNavigationType;\n return _this;\n }\n DeleteWordCommand.prototype.runEditorCommand = function (accessor, editor, args) {\n var _this = this;\n var config = editor.getConfiguration();\n var wordSeparators = getMapForWordSeparators(config.wordSeparators);\n var model = editor.getModel();\n var selections = editor.getSelections();\n var commands = selections.map(function (sel) {\n var deleteRange = _this._delete(wordSeparators, model, sel, _this._whitespaceHeuristics, _this._wordNavigationType);\n return new ReplaceCommand(deleteRange, '');\n });\n editor.pushUndoStop();\n editor.executeCommands(this.id, commands);\n editor.pushUndoStop();\n };\n return DeleteWordCommand;\n}(EditorCommand));\nexport { DeleteWordCommand };\nvar DeleteWordLeftCommand = /** @class */ (function (_super) {\n __extends(DeleteWordLeftCommand, _super);\n function DeleteWordLeftCommand() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n DeleteWordLeftCommand.prototype._delete = function (wordSeparators, model, selection, whitespaceHeuristics, wordNavigationType) {\n var r = WordOperations.deleteWordLeft(wordSeparators, model, selection, whitespaceHeuristics, wordNavigationType);\n if (r) {\n return r;\n }\n return new Range(1, 1, 1, 1);\n };\n return DeleteWordLeftCommand;\n}(DeleteWordCommand));\nexport { DeleteWordLeftCommand };\nvar DeleteWordRightCommand = /** @class */ (function (_super) {\n __extends(DeleteWordRightCommand, _super);\n function DeleteWordRightCommand() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n DeleteWordRightCommand.prototype._delete = function (wordSeparators, model, selection, whitespaceHeuristics, wordNavigationType) {\n var r = WordOperations.deleteWordRight(wordSeparators, model, selection, whitespaceHeuristics, wordNavigationType);\n if (r) {\n return r;\n }\n var lineCount = model.getLineCount();\n var maxColumn = model.getLineMaxColumn(lineCount);\n return new Range(lineCount, maxColumn, lineCount, maxColumn);\n };\n return DeleteWordRightCommand;\n}(DeleteWordCommand));\nexport { DeleteWordRightCommand };\nvar DeleteWordStartLeft = /** @class */ (function (_super) {\n __extends(DeleteWordStartLeft, _super);\n function DeleteWordStartLeft() {\n return _super.call(this, {\n whitespaceHeuristics: false,\n wordNavigationType: 0 /* WordStart */,\n id: 'deleteWordStartLeft',\n precondition: EditorContextKeys.writable\n }) || this;\n }\n return DeleteWordStartLeft;\n}(DeleteWordLeftCommand));\nexport { DeleteWordStartLeft };\nvar DeleteWordEndLeft = /** @class */ (function (_super) {\n __extends(DeleteWordEndLeft, _super);\n function DeleteWordEndLeft() {\n return _super.call(this, {\n whitespaceHeuristics: false,\n wordNavigationType: 1 /* WordEnd */,\n id: 'deleteWordEndLeft',\n precondition: EditorContextKeys.writable\n }) || this;\n }\n return DeleteWordEndLeft;\n}(DeleteWordLeftCommand));\nexport { DeleteWordEndLeft };\nvar DeleteWordLeft = /** @class */ (function (_super) {\n __extends(DeleteWordLeft, _super);\n function DeleteWordLeft() {\n return _super.call(this, {\n whitespaceHeuristics: true,\n wordNavigationType: 0 /* WordStart */,\n id: 'deleteWordLeft',\n precondition: EditorContextKeys.writable,\n kbOpts: {\n kbExpr: EditorContextKeys.textInputFocus,\n primary: 2048 /* CtrlCmd */ | 1 /* Backspace */,\n mac: { primary: 512 /* Alt */ | 1 /* Backspace */ },\n weight: 100 /* EditorContrib */\n }\n }) || this;\n }\n return DeleteWordLeft;\n}(DeleteWordLeftCommand));\nexport { DeleteWordLeft };\nvar DeleteWordStartRight = /** @class */ (function (_super) {\n __extends(DeleteWordStartRight, _super);\n function DeleteWordStartRight() {\n return _super.call(this, {\n whitespaceHeuristics: false,\n wordNavigationType: 0 /* WordStart */,\n id: 'deleteWordStartRight',\n precondition: EditorContextKeys.writable\n }) || this;\n }\n return DeleteWordStartRight;\n}(DeleteWordRightCommand));\nexport { DeleteWordStartRight };\nvar DeleteWordEndRight = /** @class */ (function (_super) {\n __extends(DeleteWordEndRight, _super);\n function DeleteWordEndRight() {\n return _super.call(this, {\n whitespaceHeuristics: false,\n wordNavigationType: 1 /* WordEnd */,\n id: 'deleteWordEndRight',\n precondition: EditorContextKeys.writable\n }) || this;\n }\n return DeleteWordEndRight;\n}(DeleteWordRightCommand));\nexport { DeleteWordEndRight };\nvar DeleteWordRight = /** @class */ (function (_super) {\n __extends(DeleteWordRight, _super);\n function DeleteWordRight() {\n return _super.call(this, {\n whitespaceHeuristics: true,\n wordNavigationType: 1 /* WordEnd */,\n id: 'deleteWordRight',\n precondition: EditorContextKeys.writable,\n kbOpts: {\n kbExpr: EditorContextKeys.textInputFocus,\n primary: 2048 /* CtrlCmd */ | 20 /* Delete */,\n mac: { primary: 512 /* Alt */ | 20 /* Delete */ },\n weight: 100 /* EditorContrib */\n }\n }) || this;\n }\n return DeleteWordRight;\n}(DeleteWordRightCommand));\nexport { DeleteWordRight };\nregisterEditorCommand(new CursorWordStartLeft());\nregisterEditorCommand(new CursorWordEndLeft());\nregisterEditorCommand(new CursorWordLeft());\nregisterEditorCommand(new CursorWordStartLeftSelect());\nregisterEditorCommand(new CursorWordEndLeftSelect());\nregisterEditorCommand(new CursorWordLeftSelect());\nregisterEditorCommand(new CursorWordStartRight());\nregisterEditorCommand(new CursorWordEndRight());\nregisterEditorCommand(new CursorWordRight());\nregisterEditorCommand(new CursorWordStartRightSelect());\nregisterEditorCommand(new CursorWordEndRightSelect());\nregisterEditorCommand(new CursorWordRightSelect());\nregisterEditorCommand(new DeleteWordStartLeft());\nregisterEditorCommand(new DeleteWordEndLeft());\nregisterEditorCommand(new DeleteWordLeft());\nregisterEditorCommand(new DeleteWordStartRight());\nregisterEditorCommand(new DeleteWordEndRight());\nregisterEditorCommand(new DeleteWordRight());\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { EditorContextKeys } from '../../common/editorContextKeys';\nimport { registerEditorCommand } from '../../browser/editorExtensions';\nimport { Range } from '../../common/core/range';\nimport { WordPartOperations } from '../../common/controller/cursorWordOperations';\nimport { DeleteWordCommand, MoveWordCommand } from '../wordOperations/wordOperations';\nimport { CommandsRegistry } from '../../../platform/commands/common/commands';\nvar DeleteWordPartLeft = /** @class */ (function (_super) {\n __extends(DeleteWordPartLeft, _super);\n function DeleteWordPartLeft() {\n return _super.call(this, {\n whitespaceHeuristics: true,\n wordNavigationType: 0 /* WordStart */,\n id: 'deleteWordPartLeft',\n precondition: EditorContextKeys.writable,\n kbOpts: {\n kbExpr: EditorContextKeys.textInputFocus,\n primary: 0,\n mac: { primary: 256 /* WinCtrl */ | 512 /* Alt */ | 1 /* Backspace */ },\n weight: 100 /* EditorContrib */\n }\n }) || this;\n }\n DeleteWordPartLeft.prototype._delete = function (wordSeparators, model, selection, whitespaceHeuristics, wordNavigationType) {\n var r = WordPartOperations.deleteWordPartLeft(wordSeparators, model, selection, whitespaceHeuristics, wordNavigationType);\n if (r) {\n return r;\n }\n return new Range(1, 1, 1, 1);\n };\n return DeleteWordPartLeft;\n}(DeleteWordCommand));\nexport { DeleteWordPartLeft };\nvar DeleteWordPartRight = /** @class */ (function (_super) {\n __extends(DeleteWordPartRight, _super);\n function DeleteWordPartRight() {\n return _super.call(this, {\n whitespaceHeuristics: true,\n wordNavigationType: 1 /* WordEnd */,\n id: 'deleteWordPartRight',\n precondition: EditorContextKeys.writable,\n kbOpts: {\n kbExpr: EditorContextKeys.textInputFocus,\n primary: 0,\n mac: { primary: 256 /* WinCtrl */ | 512 /* Alt */ | 20 /* Delete */ },\n weight: 100 /* EditorContrib */\n }\n }) || this;\n }\n DeleteWordPartRight.prototype._delete = function (wordSeparators, model, selection, whitespaceHeuristics, wordNavigationType) {\n var r = WordPartOperations.deleteWordPartRight(wordSeparators, model, selection, whitespaceHeuristics, wordNavigationType);\n if (r) {\n return r;\n }\n var lineCount = model.getLineCount();\n var maxColumn = model.getLineMaxColumn(lineCount);\n return new Range(lineCount, maxColumn, lineCount, maxColumn);\n };\n return DeleteWordPartRight;\n}(DeleteWordCommand));\nexport { DeleteWordPartRight };\nvar WordPartLeftCommand = /** @class */ (function (_super) {\n __extends(WordPartLeftCommand, _super);\n function WordPartLeftCommand() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n WordPartLeftCommand.prototype._move = function (wordSeparators, model, position, wordNavigationType) {\n return WordPartOperations.moveWordPartLeft(wordSeparators, model, position, wordNavigationType);\n };\n return WordPartLeftCommand;\n}(MoveWordCommand));\nexport { WordPartLeftCommand };\nvar CursorWordPartLeft = /** @class */ (function (_super) {\n __extends(CursorWordPartLeft, _super);\n function CursorWordPartLeft() {\n return _super.call(this, {\n inSelectionMode: false,\n wordNavigationType: 0 /* WordStart */,\n id: 'cursorWordPartLeft',\n precondition: null,\n kbOpts: {\n kbExpr: EditorContextKeys.textInputFocus,\n primary: 0,\n mac: { primary: 256 /* WinCtrl */ | 512 /* Alt */ | 15 /* LeftArrow */ },\n weight: 100 /* EditorContrib */\n }\n }) || this;\n }\n return CursorWordPartLeft;\n}(WordPartLeftCommand));\nexport { CursorWordPartLeft };\n// Register previous id for compatibility purposes\nCommandsRegistry.registerCommandAlias('cursorWordPartStartLeft', 'cursorWordPartLeft');\nvar CursorWordPartLeftSelect = /** @class */ (function (_super) {\n __extends(CursorWordPartLeftSelect, _super);\n function CursorWordPartLeftSelect() {\n return _super.call(this, {\n inSelectionMode: true,\n wordNavigationType: 0 /* WordStart */,\n id: 'cursorWordPartLeftSelect',\n precondition: null,\n kbOpts: {\n kbExpr: EditorContextKeys.textInputFocus,\n primary: 0,\n mac: { primary: 256 /* WinCtrl */ | 512 /* Alt */ | 1024 /* Shift */ | 15 /* LeftArrow */ },\n weight: 100 /* EditorContrib */\n }\n }) || this;\n }\n return CursorWordPartLeftSelect;\n}(WordPartLeftCommand));\nexport { CursorWordPartLeftSelect };\n// Register previous id for compatibility purposes\nCommandsRegistry.registerCommandAlias('cursorWordPartStartLeftSelect', 'cursorWordPartLeftSelect');\nvar WordPartRightCommand = /** @class */ (function (_super) {\n __extends(WordPartRightCommand, _super);\n function WordPartRightCommand() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n WordPartRightCommand.prototype._move = function (wordSeparators, model, position, wordNavigationType) {\n return WordPartOperations.moveWordPartRight(wordSeparators, model, position, wordNavigationType);\n };\n return WordPartRightCommand;\n}(MoveWordCommand));\nexport { WordPartRightCommand };\nvar CursorWordPartRight = /** @class */ (function (_super) {\n __extends(CursorWordPartRight, _super);\n function CursorWordPartRight() {\n return _super.call(this, {\n inSelectionMode: false,\n wordNavigationType: 1 /* WordEnd */,\n id: 'cursorWordPartRight',\n precondition: null,\n kbOpts: {\n kbExpr: EditorContextKeys.textInputFocus,\n primary: 0,\n mac: { primary: 256 /* WinCtrl */ | 512 /* Alt */ | 17 /* RightArrow */ },\n weight: 100 /* EditorContrib */\n }\n }) || this;\n }\n return CursorWordPartRight;\n}(WordPartRightCommand));\nexport { CursorWordPartRight };\nvar CursorWordPartRightSelect = /** @class */ (function (_super) {\n __extends(CursorWordPartRightSelect, _super);\n function CursorWordPartRightSelect() {\n return _super.call(this, {\n inSelectionMode: true,\n wordNavigationType: 1 /* WordEnd */,\n id: 'cursorWordPartRightSelect',\n precondition: null,\n kbOpts: {\n kbExpr: EditorContextKeys.textInputFocus,\n primary: 0,\n mac: { primary: 256 /* WinCtrl */ | 512 /* Alt */ | 1024 /* Shift */ | 17 /* RightArrow */ },\n weight: 100 /* EditorContrib */\n }\n }) || this;\n }\n return CursorWordPartRightSelect;\n}(WordPartRightCommand));\nexport { CursorWordPartRightSelect };\nregisterEditorCommand(new DeleteWordPartLeft());\nregisterEditorCommand(new DeleteWordPartRight());\nregisterEditorCommand(new CursorWordPartLeft());\nregisterEditorCommand(new CursorWordPartLeftSelect());\nregisterEditorCommand(new CursorWordPartRight());\nregisterEditorCommand(new CursorWordPartRightSelect());\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __param = (this && this.__param) || function (paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n};\nimport './accessibilityHelp.css';\nimport * as nls from '../../../../nls';\nimport { Disposable } from '../../../../base/common/lifecycle';\nimport * as strings from '../../../../base/common/strings';\nimport * as dom from '../../../../base/browser/dom';\nimport { renderFormattedText } from '../../../../base/browser/htmlContentRenderer';\nimport { createFastDomNode } from '../../../../base/browser/fastDomNode';\nimport { Widget } from '../../../../base/browser/ui/widget';\nimport { IInstantiationService } from '../../../../platform/instantiation/common/instantiation';\nimport { IKeybindingService } from '../../../../platform/keybinding/common/keybinding';\nimport { RawContextKey, IContextKeyService } from '../../../../platform/contextkey/common/contextkey';\nimport { EditorContextKeys } from '../../../common/editorContextKeys';\nimport { registerEditorAction, registerEditorContribution, EditorAction, EditorCommand, registerEditorCommand } from '../../../browser/editorExtensions';\nimport { ToggleTabFocusModeAction } from '../../../contrib/toggleTabFocusMode/toggleTabFocusMode';\nimport { registerThemingParticipant } from '../../../../platform/theme/common/themeService';\nimport { editorWidgetBackground, widgetShadow, contrastBorder } from '../../../../platform/theme/common/colorRegistry';\nimport * as platform from '../../../../base/common/platform';\nimport { alert } from '../../../../base/browser/ui/aria/aria';\nimport { IOpenerService } from '../../../../platform/opener/common/opener';\nimport URI from '../../../../base/common/uri';\nimport * as browser from '../../../../base/browser/browser';\nvar CONTEXT_ACCESSIBILITY_WIDGET_VISIBLE = new RawContextKey('accessibilityHelpWidgetVisible', false);\nvar AccessibilityHelpController = /** @class */ (function (_super) {\n __extends(AccessibilityHelpController, _super);\n function AccessibilityHelpController(editor, instantiationService) {\n var _this = _super.call(this) || this;\n _this._editor = editor;\n _this._widget = _this._register(instantiationService.createInstance(AccessibilityHelpWidget, _this._editor));\n return _this;\n }\n AccessibilityHelpController.get = function (editor) {\n return editor.getContribution(AccessibilityHelpController.ID);\n };\n AccessibilityHelpController.prototype.getId = function () {\n return AccessibilityHelpController.ID;\n };\n AccessibilityHelpController.prototype.show = function () {\n this._widget.show();\n };\n AccessibilityHelpController.prototype.hide = function () {\n this._widget.hide();\n };\n AccessibilityHelpController.ID = 'editor.contrib.accessibilityHelpController';\n AccessibilityHelpController = __decorate([\n __param(1, IInstantiationService)\n ], AccessibilityHelpController);\n return AccessibilityHelpController;\n}(Disposable));\nvar nlsNoSelection = nls.localize(\"noSelection\", \"No selection\");\nvar nlsSingleSelectionRange = nls.localize(\"singleSelectionRange\", \"Line {0}, Column {1} ({2} selected)\");\nvar nlsSingleSelection = nls.localize(\"singleSelection\", \"Line {0}, Column {1}\");\nvar nlsMultiSelectionRange = nls.localize(\"multiSelectionRange\", \"{0} selections ({1} characters selected)\");\nvar nlsMultiSelection = nls.localize(\"multiSelection\", \"{0} selections\");\nfunction getSelectionLabel(selections, charactersSelected) {\n if (!selections || selections.length === 0) {\n return nlsNoSelection;\n }\n if (selections.length === 1) {\n if (charactersSelected) {\n return strings.format(nlsSingleSelectionRange, selections[0].positionLineNumber, selections[0].positionColumn, charactersSelected);\n }\n return strings.format(nlsSingleSelection, selections[0].positionLineNumber, selections[0].positionColumn);\n }\n if (charactersSelected) {\n return strings.format(nlsMultiSelectionRange, selections.length, charactersSelected);\n }\n if (selections.length > 0) {\n return strings.format(nlsMultiSelection, selections.length);\n }\n return null;\n}\nvar AccessibilityHelpWidget = /** @class */ (function (_super) {\n __extends(AccessibilityHelpWidget, _super);\n function AccessibilityHelpWidget(editor, _contextKeyService, _keybindingService, _openerService) {\n var _this = _super.call(this) || this;\n _this._contextKeyService = _contextKeyService;\n _this._keybindingService = _keybindingService;\n _this._openerService = _openerService;\n _this._editor = editor;\n _this._isVisibleKey = CONTEXT_ACCESSIBILITY_WIDGET_VISIBLE.bindTo(_this._contextKeyService);\n _this._domNode = createFastDomNode(document.createElement('div'));\n _this._domNode.setClassName('accessibilityHelpWidget');\n _this._domNode.setDisplay('none');\n _this._domNode.setAttribute('role', 'dialog');\n _this._domNode.setAttribute('aria-hidden', 'true');\n _this._contentDomNode = createFastDomNode(document.createElement('div'));\n _this._contentDomNode.setAttribute('role', 'document');\n _this._domNode.appendChild(_this._contentDomNode);\n _this._isVisible = false;\n _this._register(_this._editor.onDidLayoutChange(function () {\n if (_this._isVisible) {\n _this._layout();\n }\n }));\n // Intentionally not configurable!\n _this._register(dom.addStandardDisposableListener(_this._contentDomNode.domNode, 'keydown', function (e) {\n if (!_this._isVisible) {\n return;\n }\n if (e.equals(2048 /* CtrlCmd */ | 35 /* KEY_E */)) {\n alert(nls.localize(\"emergencyConfOn\", \"Now changing the setting `accessibilitySupport` to 'on'.\"));\n _this._editor.updateOptions({\n accessibilitySupport: 'on'\n });\n dom.clearNode(_this._contentDomNode.domNode);\n _this._buildContent();\n _this._contentDomNode.domNode.focus();\n e.preventDefault();\n e.stopPropagation();\n }\n if (e.equals(2048 /* CtrlCmd */ | 38 /* KEY_H */)) {\n alert(nls.localize(\"openingDocs\", \"Now opening the Editor Accessibility documentation page.\"));\n var url = _this._editor.getRawConfiguration().accessibilityHelpUrl;\n if (typeof url === 'undefined') {\n url = 'https://go.microsoft.com/fwlink/?linkid=852450';\n }\n _this._openerService.open(URI.parse(url));\n e.preventDefault();\n e.stopPropagation();\n }\n }));\n _this.onblur(_this._contentDomNode.domNode, function () {\n _this.hide();\n });\n _this._editor.addOverlayWidget(_this);\n return _this;\n }\n AccessibilityHelpWidget.prototype.dispose = function () {\n this._editor.removeOverlayWidget(this);\n _super.prototype.dispose.call(this);\n };\n AccessibilityHelpWidget.prototype.getId = function () {\n return AccessibilityHelpWidget.ID;\n };\n AccessibilityHelpWidget.prototype.getDomNode = function () {\n return this._domNode.domNode;\n };\n AccessibilityHelpWidget.prototype.getPosition = function () {\n return {\n preference: null\n };\n };\n AccessibilityHelpWidget.prototype.show = function () {\n if (this._isVisible) {\n return;\n }\n this._isVisible = true;\n this._isVisibleKey.set(true);\n this._layout();\n this._domNode.setDisplay('block');\n this._domNode.setAttribute('aria-hidden', 'false');\n this._contentDomNode.domNode.tabIndex = 0;\n this._buildContent();\n this._contentDomNode.domNode.focus();\n };\n AccessibilityHelpWidget.prototype._descriptionForCommand = function (commandId, msg, noKbMsg) {\n var kb = this._keybindingService.lookupKeybinding(commandId);\n if (kb) {\n return strings.format(msg, kb.getAriaLabel());\n }\n return strings.format(noKbMsg, commandId);\n };\n AccessibilityHelpWidget.prototype._buildContent = function () {\n var opts = this._editor.getConfiguration();\n var selections = this._editor.getSelections();\n var charactersSelected = 0;\n if (selections) {\n var model_1 = this._editor.getModel();\n if (model_1) {\n selections.forEach(function (selection) {\n charactersSelected += model_1.getValueLengthInRange(selection);\n });\n }\n }\n var text = getSelectionLabel(selections, charactersSelected);\n if (opts.wrappingInfo.inDiffEditor) {\n if (opts.readOnly) {\n text += nls.localize(\"readonlyDiffEditor\", \" in a read-only pane of a diff editor.\");\n }\n else {\n text += nls.localize(\"editableDiffEditor\", \" in a pane of a diff editor.\");\n }\n }\n else {\n if (opts.readOnly) {\n text += nls.localize(\"readonlyEditor\", \" in a read-only code editor\");\n }\n else {\n text += nls.localize(\"editableEditor\", \" in a code editor\");\n }\n }\n switch (opts.accessibilitySupport) {\n case 0 /* Unknown */:\n var turnOnMessage = (platform.isMacintosh\n ? nls.localize(\"changeConfigToOnMac\", \"To configure the editor to be optimized for usage with a Screen Reader press Command+E now.\")\n : nls.localize(\"changeConfigToOnWinLinux\", \"To configure the editor to be optimized for usage with a Screen Reader press Control+E now.\"));\n text += '\\n\\n - ' + turnOnMessage;\n break;\n case 2 /* Enabled */:\n text += '\\n\\n - ' + nls.localize(\"auto_on\", \"The editor is configured to be optimized for usage with a Screen Reader.\");\n break;\n case 1 /* Disabled */:\n text += '\\n\\n - ' + nls.localize(\"auto_off\", \"The editor is configured to never be optimized for usage with a Screen Reader, which is not the case at this time.\");\n text += ' ' + turnOnMessage;\n break;\n }\n var NLS_TAB_FOCUS_MODE_ON = nls.localize(\"tabFocusModeOnMsg\", \"Pressing Tab in the current editor will move focus to the next focusable element. Toggle this behavior by pressing {0}.\");\n var NLS_TAB_FOCUS_MODE_ON_NO_KB = nls.localize(\"tabFocusModeOnMsgNoKb\", \"Pressing Tab in the current editor will move focus to the next focusable element. The command {0} is currently not triggerable by a keybinding.\");\n var NLS_TAB_FOCUS_MODE_OFF = nls.localize(\"tabFocusModeOffMsg\", \"Pressing Tab in the current editor will insert the tab character. Toggle this behavior by pressing {0}.\");\n var NLS_TAB_FOCUS_MODE_OFF_NO_KB = nls.localize(\"tabFocusModeOffMsgNoKb\", \"Pressing Tab in the current editor will insert the tab character. The command {0} is currently not triggerable by a keybinding.\");\n if (opts.tabFocusMode) {\n text += '\\n\\n - ' + this._descriptionForCommand(ToggleTabFocusModeAction.ID, NLS_TAB_FOCUS_MODE_ON, NLS_TAB_FOCUS_MODE_ON_NO_KB);\n }\n else {\n text += '\\n\\n - ' + this._descriptionForCommand(ToggleTabFocusModeAction.ID, NLS_TAB_FOCUS_MODE_OFF, NLS_TAB_FOCUS_MODE_OFF_NO_KB);\n }\n var openDocMessage = (platform.isMacintosh\n ? nls.localize(\"openDocMac\", \"Press Command+H now to open a browser window with more information related to editor accessibility.\")\n : nls.localize(\"openDocWinLinux\", \"Press Control+H now to open a browser window with more information related to editor accessibility.\"));\n text += '\\n\\n - ' + openDocMessage;\n text += '\\n\\n' + nls.localize(\"outroMsg\", \"You can dismiss this tooltip and return to the editor by pressing Escape or Shift+Escape.\");\n this._contentDomNode.domNode.appendChild(renderFormattedText(text));\n // Per https://www.w3.org/TR/wai-aria/roles#document, Authors SHOULD provide a title or label for documents\n this._contentDomNode.domNode.setAttribute('aria-label', text);\n };\n AccessibilityHelpWidget.prototype.hide = function () {\n if (!this._isVisible) {\n return;\n }\n this._isVisible = false;\n this._isVisibleKey.reset();\n this._domNode.setDisplay('none');\n this._domNode.setAttribute('aria-hidden', 'true');\n this._contentDomNode.domNode.tabIndex = -1;\n dom.clearNode(this._contentDomNode.domNode);\n this._editor.focus();\n };\n AccessibilityHelpWidget.prototype._layout = function () {\n var editorLayout = this._editor.getLayoutInfo();\n var w = Math.max(5, Math.min(AccessibilityHelpWidget.WIDTH, editorLayout.width - 40));\n var h = Math.max(5, Math.min(AccessibilityHelpWidget.HEIGHT, editorLayout.height - 40));\n this._domNode.setWidth(w);\n this._domNode.setHeight(h);\n var top = Math.round((editorLayout.height - h) / 2);\n this._domNode.setTop(top);\n var left = Math.round((editorLayout.width - w) / 2);\n this._domNode.setLeft(left);\n };\n AccessibilityHelpWidget.ID = 'editor.contrib.accessibilityHelpWidget';\n AccessibilityHelpWidget.WIDTH = 500;\n AccessibilityHelpWidget.HEIGHT = 300;\n AccessibilityHelpWidget = __decorate([\n __param(1, IContextKeyService),\n __param(2, IKeybindingService),\n __param(3, IOpenerService)\n ], AccessibilityHelpWidget);\n return AccessibilityHelpWidget;\n}(Widget));\nvar ShowAccessibilityHelpAction = /** @class */ (function (_super) {\n __extends(ShowAccessibilityHelpAction, _super);\n function ShowAccessibilityHelpAction() {\n return _super.call(this, {\n id: 'editor.action.showAccessibilityHelp',\n label: nls.localize(\"ShowAccessibilityHelpAction\", \"Show Accessibility Help\"),\n alias: 'Show Accessibility Help',\n precondition: null,\n kbOpts: {\n kbExpr: EditorContextKeys.focus,\n primary: (browser.isIE ? 2048 /* CtrlCmd */ | 59 /* F1 */ : 512 /* Alt */ | 59 /* F1 */),\n weight: 100 /* EditorContrib */\n }\n }) || this;\n }\n ShowAccessibilityHelpAction.prototype.run = function (accessor, editor) {\n var controller = AccessibilityHelpController.get(editor);\n if (controller) {\n controller.show();\n }\n };\n return ShowAccessibilityHelpAction;\n}(EditorAction));\nregisterEditorContribution(AccessibilityHelpController);\nregisterEditorAction(ShowAccessibilityHelpAction);\nvar AccessibilityHelpCommand = EditorCommand.bindToContribution(AccessibilityHelpController.get);\nregisterEditorCommand(new AccessibilityHelpCommand({\n id: 'closeAccessibilityHelp',\n precondition: CONTEXT_ACCESSIBILITY_WIDGET_VISIBLE,\n handler: function (x) { return x.hide(); },\n kbOpts: {\n weight: 100 /* EditorContrib */ + 100,\n kbExpr: EditorContextKeys.focus,\n primary: 9 /* Escape */,\n secondary: [1024 /* Shift */ | 9 /* Escape */]\n }\n}));\nregisterThemingParticipant(function (theme, collector) {\n var widgetBackground = theme.getColor(editorWidgetBackground);\n if (widgetBackground) {\n collector.addRule(\".monaco-editor .accessibilityHelpWidget { background-color: \" + widgetBackground + \"; }\");\n }\n var widgetShadowColor = theme.getColor(widgetShadow);\n if (widgetShadowColor) {\n collector.addRule(\".monaco-editor .accessibilityHelpWidget { box-shadow: 0 2px 8px \" + widgetShadowColor + \"; }\");\n }\n var hcBorder = theme.getColor(contrastBorder);\n if (hcBorder) {\n collector.addRule(\".monaco-editor .accessibilityHelpWidget { border: 2px solid \" + hcBorder + \"; }\");\n }\n});\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport { createDecorator } from '../../../platform/instantiation/common/instantiation';\nexport var IStandaloneThemeService = createDecorator('themeService');\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __param = (this && this.__param) || function (paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n};\nimport './inspectTokens.css';\nimport * as nls from '../../../../nls';\nimport { Disposable } from '../../../../base/common/lifecycle';\nimport { escape } from '../../../../base/common/strings';\nimport { registerEditorAction, registerEditorContribution, EditorAction } from '../../../browser/editorExtensions';\nimport { ContentWidgetPositionPreference } from '../../../browser/editorBrowser';\nimport { IModeService } from '../../../common/services/modeService';\nimport { TokenizationRegistry, TokenMetadata } from '../../../common/modes';\nimport { IStandaloneThemeService } from '../../common/standaloneThemeService';\nimport { NULL_STATE, nullTokenize, nullTokenize2 } from '../../../common/modes/nullMode';\nimport { Color } from '../../../../base/common/color';\nimport { registerThemingParticipant, HIGH_CONTRAST } from '../../../../platform/theme/common/themeService';\nimport { editorHoverBackground, editorHoverBorder } from '../../../../platform/theme/common/colorRegistry';\nvar InspectTokensController = /** @class */ (function (_super) {\n __extends(InspectTokensController, _super);\n function InspectTokensController(editor, standaloneColorService, modeService) {\n var _this = _super.call(this) || this;\n _this._editor = editor;\n _this._standaloneThemeService = standaloneColorService;\n _this._modeService = modeService;\n _this._widget = null;\n _this._register(_this._editor.onDidChangeModel(function (e) { return _this.stop(); }));\n _this._register(_this._editor.onDidChangeModelLanguage(function (e) { return _this.stop(); }));\n _this._register(TokenizationRegistry.onDidChange(function (e) { return _this.stop(); }));\n return _this;\n }\n InspectTokensController.get = function (editor) {\n return editor.getContribution(InspectTokensController.ID);\n };\n InspectTokensController.prototype.getId = function () {\n return InspectTokensController.ID;\n };\n InspectTokensController.prototype.dispose = function () {\n this.stop();\n _super.prototype.dispose.call(this);\n };\n InspectTokensController.prototype.launch = function () {\n if (this._widget) {\n return;\n }\n if (!this._editor.getModel()) {\n return;\n }\n this._widget = new InspectTokensWidget(this._editor, this._standaloneThemeService, this._modeService);\n };\n InspectTokensController.prototype.stop = function () {\n if (this._widget) {\n this._widget.dispose();\n this._widget = null;\n }\n };\n InspectTokensController.ID = 'editor.contrib.inspectTokens';\n InspectTokensController = __decorate([\n __param(1, IStandaloneThemeService),\n __param(2, IModeService)\n ], InspectTokensController);\n return InspectTokensController;\n}(Disposable));\nvar InspectTokens = /** @class */ (function (_super) {\n __extends(InspectTokens, _super);\n function InspectTokens() {\n return _super.call(this, {\n id: 'editor.action.inspectTokens',\n label: nls.localize('inspectTokens', \"Developer: Inspect Tokens\"),\n alias: 'Developer: Inspect Tokens',\n precondition: null\n }) || this;\n }\n InspectTokens.prototype.run = function (accessor, editor) {\n var controller = InspectTokensController.get(editor);\n if (controller) {\n controller.launch();\n }\n };\n return InspectTokens;\n}(EditorAction));\nfunction renderTokenText(tokenText) {\n var result = '';\n for (var charIndex = 0, len = tokenText.length; charIndex < len; charIndex++) {\n var charCode = tokenText.charCodeAt(charIndex);\n switch (charCode) {\n case 9 /* Tab */:\n result += '→';\n break;\n case 32 /* Space */:\n result += '·';\n break;\n case 60 /* LessThan */:\n result += '<';\n break;\n case 62 /* GreaterThan */:\n result += '>';\n break;\n case 38 /* Ampersand */:\n result += '&';\n break;\n default:\n result += String.fromCharCode(charCode);\n }\n }\n return result;\n}\nfunction getSafeTokenizationSupport(languageIdentifier) {\n var tokenizationSupport = TokenizationRegistry.get(languageIdentifier.language);\n if (tokenizationSupport) {\n return tokenizationSupport;\n }\n return {\n getInitialState: function () { return NULL_STATE; },\n tokenize: function (line, state, deltaOffset) { return nullTokenize(languageIdentifier.language, line, state, deltaOffset); },\n tokenize2: function (line, state, deltaOffset) { return nullTokenize2(languageIdentifier.id, line, state, deltaOffset); }\n };\n}\nvar InspectTokensWidget = /** @class */ (function (_super) {\n __extends(InspectTokensWidget, _super);\n function InspectTokensWidget(editor, standaloneThemeService, modeService) {\n var _this = _super.call(this) || this;\n // Editor.IContentWidget.allowEditorOverflow\n _this.allowEditorOverflow = true;\n _this._editor = editor;\n _this._modeService = modeService;\n _this._model = _this._editor.getModel();\n _this._domNode = document.createElement('div');\n _this._domNode.className = 'tokens-inspect-widget';\n _this._tokenizationSupport = getSafeTokenizationSupport(_this._model.getLanguageIdentifier());\n _this._compute(_this._editor.getPosition());\n _this._register(_this._editor.onDidChangeCursorPosition(function (e) { return _this._compute(_this._editor.getPosition()); }));\n _this._editor.addContentWidget(_this);\n return _this;\n }\n InspectTokensWidget.prototype.dispose = function () {\n this._editor.removeContentWidget(this);\n _super.prototype.dispose.call(this);\n };\n InspectTokensWidget.prototype.getId = function () {\n return InspectTokensWidget._ID;\n };\n InspectTokensWidget.prototype._compute = function (position) {\n var data = this._getTokensAtLine(position.lineNumber);\n var token1Index = 0;\n for (var i = data.tokens1.length - 1; i >= 0; i--) {\n var t = data.tokens1[i];\n if (position.column - 1 >= t.offset) {\n token1Index = i;\n break;\n }\n }\n var token2Index = 0;\n for (var i = (data.tokens2.length >>> 1); i >= 0; i--) {\n if (position.column - 1 >= data.tokens2[(i << 1)]) {\n token2Index = i;\n break;\n }\n }\n var result = '';\n var lineContent = this._model.getLineContent(position.lineNumber);\n var tokenText = '';\n if (token1Index < data.tokens1.length) {\n var tokenStartIndex = data.tokens1[token1Index].offset;\n var tokenEndIndex = token1Index + 1 < data.tokens1.length ? data.tokens1[token1Index + 1].offset : lineContent.length;\n tokenText = lineContent.substring(tokenStartIndex, tokenEndIndex);\n }\n result += \"

    \" + renderTokenText(tokenText) + \"(\" + tokenText.length + \" \" + (tokenText.length === 1 ? 'char' : 'chars') + \")

    \";\n result += \"
    \";\n var metadata = this._decodeMetadata(data.tokens2[(token2Index << 1) + 1]);\n result += \"\";\n result += \"\";\n result += \"\";\n result += \"\";\n result += \"\";\n result += \"\";\n result += \"\";\n result += \"
    \";\n if (token1Index < data.tokens1.length) {\n result += \"\" + escape(data.tokens1[token1Index].type) + \"\";\n }\n this._domNode.innerHTML = result;\n this._editor.layoutContentWidget(this);\n };\n InspectTokensWidget.prototype._decodeMetadata = function (metadata) {\n var colorMap = TokenizationRegistry.getColorMap();\n var languageId = TokenMetadata.getLanguageId(metadata);\n var tokenType = TokenMetadata.getTokenType(metadata);\n var fontStyle = TokenMetadata.getFontStyle(metadata);\n var foreground = TokenMetadata.getForeground(metadata);\n var background = TokenMetadata.getBackground(metadata);\n return {\n languageIdentifier: this._modeService.getLanguageIdentifier(languageId),\n tokenType: tokenType,\n fontStyle: fontStyle,\n foreground: colorMap[foreground],\n background: colorMap[background]\n };\n };\n InspectTokensWidget.prototype._tokenTypeToString = function (tokenType) {\n switch (tokenType) {\n case 0 /* Other */: return 'Other';\n case 1 /* Comment */: return 'Comment';\n case 2 /* String */: return 'String';\n case 4 /* RegEx */: return 'RegEx';\n }\n return '??';\n };\n InspectTokensWidget.prototype._fontStyleToString = function (fontStyle) {\n var r = '';\n if (fontStyle & 1 /* Italic */) {\n r += 'italic ';\n }\n if (fontStyle & 2 /* Bold */) {\n r += 'bold ';\n }\n if (fontStyle & 4 /* Underline */) {\n r += 'underline ';\n }\n if (r.length === 0) {\n r = '---';\n }\n return r;\n };\n InspectTokensWidget.prototype._getTokensAtLine = function (lineNumber) {\n var stateBeforeLine = this._getStateBeforeLine(lineNumber);\n var tokenizationResult1 = this._tokenizationSupport.tokenize(this._model.getLineContent(lineNumber), stateBeforeLine, 0);\n var tokenizationResult2 = this._tokenizationSupport.tokenize2(this._model.getLineContent(lineNumber), stateBeforeLine, 0);\n return {\n startState: stateBeforeLine,\n tokens1: tokenizationResult1.tokens,\n tokens2: tokenizationResult2.tokens,\n endState: tokenizationResult1.endState\n };\n };\n InspectTokensWidget.prototype._getStateBeforeLine = function (lineNumber) {\n var state = this._tokenizationSupport.getInitialState();\n for (var i = 1; i < lineNumber; i++) {\n var tokenizationResult = this._tokenizationSupport.tokenize(this._model.getLineContent(i), state, 0);\n state = tokenizationResult.endState;\n }\n return state;\n };\n InspectTokensWidget.prototype.getDomNode = function () {\n return this._domNode;\n };\n InspectTokensWidget.prototype.getPosition = function () {\n return {\n position: this._editor.getPosition(),\n preference: [ContentWidgetPositionPreference.BELOW, ContentWidgetPositionPreference.ABOVE]\n };\n };\n InspectTokensWidget._ID = 'editor.contrib.inspectTokensWidget';\n return InspectTokensWidget;\n}(Disposable));\nregisterEditorContribution(InspectTokensController);\nregisterEditorAction(InspectTokens);\nregisterThemingParticipant(function (theme, collector) {\n var border = theme.getColor(editorHoverBorder);\n if (border) {\n var borderWidth = theme.type === HIGH_CONTRAST ? 2 : 1;\n collector.addRule(\".monaco-editor .tokens-inspect-widget { border: \" + borderWidth + \"px solid \" + border + \"; }\");\n collector.addRule(\".monaco-editor .tokens-inspect-widget .tokens-inspect-separator { background-color: \" + border + \"; }\");\n }\n var background = theme.getColor(editorHoverBackground);\n if (background) {\n collector.addRule(\".monaco-editor .tokens-inspect-widget { background-color: \" + background + \"; }\");\n }\n});\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport './iPadShowKeyboard.css';\nimport { dispose } from '../../../../base/common/lifecycle';\nimport * as browser from '../../../../base/browser/browser';\nimport * as dom from '../../../../base/browser/dom';\nimport { OverlayWidgetPositionPreference } from '../../../browser/editorBrowser';\nimport { registerEditorContribution } from '../../../browser/editorExtensions';\nvar IPadShowKeyboard = /** @class */ (function () {\n function IPadShowKeyboard(editor) {\n var _this = this;\n this.editor = editor;\n this.toDispose = [];\n if (browser.isIPad) {\n this.toDispose.push(editor.onDidChangeConfiguration(function () { return _this.update(); }));\n this.update();\n }\n }\n IPadShowKeyboard.prototype.update = function () {\n var hasWidget = (!!this.widget);\n var shouldHaveWidget = (!this.editor.getConfiguration().readOnly);\n if (!hasWidget && shouldHaveWidget) {\n this.widget = new ShowKeyboardWidget(this.editor);\n }\n else if (hasWidget && !shouldHaveWidget) {\n this.widget.dispose();\n this.widget = null;\n }\n };\n IPadShowKeyboard.prototype.getId = function () {\n return IPadShowKeyboard.ID;\n };\n IPadShowKeyboard.prototype.dispose = function () {\n this.toDispose = dispose(this.toDispose);\n if (this.widget) {\n this.widget.dispose();\n this.widget = null;\n }\n };\n IPadShowKeyboard.ID = 'editor.contrib.iPadShowKeyboard';\n return IPadShowKeyboard;\n}());\nexport { IPadShowKeyboard };\nvar ShowKeyboardWidget = /** @class */ (function () {\n function ShowKeyboardWidget(editor) {\n var _this = this;\n this.editor = editor;\n this._domNode = document.createElement('textarea');\n this._domNode.className = 'iPadShowKeyboard';\n this._toDispose = [];\n this._toDispose.push(dom.addDisposableListener(this._domNode, 'touchstart', function (e) {\n _this.editor.focus();\n }));\n this._toDispose.push(dom.addDisposableListener(this._domNode, 'focus', function (e) {\n _this.editor.focus();\n }));\n this.editor.addOverlayWidget(this);\n }\n ShowKeyboardWidget.prototype.dispose = function () {\n this.editor.removeOverlayWidget(this);\n this._toDispose = dispose(this._toDispose);\n };\n // ----- IOverlayWidget API\n ShowKeyboardWidget.prototype.getId = function () {\n return ShowKeyboardWidget.ID;\n };\n ShowKeyboardWidget.prototype.getDomNode = function () {\n return this._domNode;\n };\n ShowKeyboardWidget.prototype.getPosition = function () {\n return {\n preference: OverlayWidgetPositionPreference.BOTTOM_RIGHT_CORNER\n };\n };\n ShowKeyboardWidget.ID = 'editor.contrib.ShowKeyboardWidget';\n return ShowKeyboardWidget;\n}());\nregisterEditorContribution(IPadShowKeyboard);\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport * as nls from '../../nls';\nvar ModifierLabelProvider = /** @class */ (function () {\n function ModifierLabelProvider(mac, windows, linux) {\n if (linux === void 0) { linux = windows; }\n this.modifierLabels = [null];\n this.modifierLabels[2 /* Macintosh */] = mac;\n this.modifierLabels[1 /* Windows */] = windows;\n this.modifierLabels[3 /* Linux */] = linux;\n }\n ModifierLabelProvider.prototype.toLabel = function (firstPartMod, firstPartKey, chordPartMod, chordPartKey, OS) {\n if (firstPartKey === null && chordPartKey === null) {\n return null;\n }\n return _asString(firstPartMod, firstPartKey, chordPartMod, chordPartKey, this.modifierLabels[OS]);\n };\n return ModifierLabelProvider;\n}());\nexport { ModifierLabelProvider };\n/**\n * A label provider that prints modifiers in a suitable format for displaying in the UI.\n */\nexport var UILabelProvider = new ModifierLabelProvider({\n ctrlKey: '⌃',\n shiftKey: '⇧',\n altKey: '⌥',\n metaKey: '⌘',\n separator: '',\n}, {\n ctrlKey: nls.localize({ key: 'ctrlKey', comment: ['This is the short form for the Control key on the keyboard'] }, \"Ctrl\"),\n shiftKey: nls.localize({ key: 'shiftKey', comment: ['This is the short form for the Shift key on the keyboard'] }, \"Shift\"),\n altKey: nls.localize({ key: 'altKey', comment: ['This is the short form for the Alt key on the keyboard'] }, \"Alt\"),\n metaKey: nls.localize({ key: 'windowsKey', comment: ['This is the short form for the Windows key on the keyboard'] }, \"Windows\"),\n separator: '+',\n}, {\n ctrlKey: nls.localize({ key: 'ctrlKey', comment: ['This is the short form for the Control key on the keyboard'] }, \"Ctrl\"),\n shiftKey: nls.localize({ key: 'shiftKey', comment: ['This is the short form for the Shift key on the keyboard'] }, \"Shift\"),\n altKey: nls.localize({ key: 'altKey', comment: ['This is the short form for the Alt key on the keyboard'] }, \"Alt\"),\n metaKey: nls.localize({ key: 'superKey', comment: ['This is the short form for the Super key on the keyboard'] }, \"Super\"),\n separator: '+',\n});\n/**\n * A label provider that prints modifiers in a suitable format for ARIA.\n */\nexport var AriaLabelProvider = new ModifierLabelProvider({\n ctrlKey: nls.localize({ key: 'ctrlKey.long', comment: ['This is the long form for the Control key on the keyboard'] }, \"Control\"),\n shiftKey: nls.localize({ key: 'shiftKey.long', comment: ['This is the long form for the Shift key on the keyboard'] }, \"Shift\"),\n altKey: nls.localize({ key: 'altKey.long', comment: ['This is the long form for the Alt key on the keyboard'] }, \"Alt\"),\n metaKey: nls.localize({ key: 'cmdKey.long', comment: ['This is the long form for the Command key on the keyboard'] }, \"Command\"),\n separator: '+',\n}, {\n ctrlKey: nls.localize({ key: 'ctrlKey.long', comment: ['This is the long form for the Control key on the keyboard'] }, \"Control\"),\n shiftKey: nls.localize({ key: 'shiftKey.long', comment: ['This is the long form for the Shift key on the keyboard'] }, \"Shift\"),\n altKey: nls.localize({ key: 'altKey.long', comment: ['This is the long form for the Alt key on the keyboard'] }, \"Alt\"),\n metaKey: nls.localize({ key: 'windowsKey.long', comment: ['This is the long form for the Windows key on the keyboard'] }, \"Windows\"),\n separator: '+',\n}, {\n ctrlKey: nls.localize({ key: 'ctrlKey.long', comment: ['This is the long form for the Control key on the keyboard'] }, \"Control\"),\n shiftKey: nls.localize({ key: 'shiftKey.long', comment: ['This is the long form for the Shift key on the keyboard'] }, \"Shift\"),\n altKey: nls.localize({ key: 'altKey.long', comment: ['This is the long form for the Alt key on the keyboard'] }, \"Alt\"),\n metaKey: nls.localize({ key: 'superKey.long', comment: ['This is the long form for the Super key on the keyboard'] }, \"Super\"),\n separator: '+',\n});\nfunction _simpleAsString(modifiers, key, labels) {\n if (key === null) {\n return '';\n }\n var result = [];\n // translate modifier keys: Ctrl-Shift-Alt-Meta\n if (modifiers.ctrlKey) {\n result.push(labels.ctrlKey);\n }\n if (modifiers.shiftKey) {\n result.push(labels.shiftKey);\n }\n if (modifiers.altKey) {\n result.push(labels.altKey);\n }\n if (modifiers.metaKey) {\n result.push(labels.metaKey);\n }\n // the actual key\n result.push(key);\n return result.join(labels.separator);\n}\nfunction _asString(firstPartMod, firstPartKey, chordPartMod, chordPartKey, labels) {\n var result = _simpleAsString(firstPartMod, firstPartKey, labels);\n if (chordPartKey !== null) {\n result += ' ';\n result += _simpleAsString(chordPartMod, chordPartKey, labels);\n }\n return result;\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport './keybindingLabel.css';\nimport { equals } from '../../../common/objects';\nimport { UILabelProvider } from '../../../common/keybindingLabels';\nimport * as dom from '../../dom';\nvar $ = dom.$;\nvar KeybindingLabel = /** @class */ (function () {\n function KeybindingLabel(container, os) {\n this.os = os;\n this.domNode = dom.append(container, $('.monaco-keybinding'));\n this.didEverRender = false;\n container.appendChild(this.domNode);\n }\n KeybindingLabel.prototype.set = function (keybinding, matches) {\n if (this.didEverRender && this.keybinding === keybinding && KeybindingLabel.areSame(this.matches, matches)) {\n return;\n }\n this.keybinding = keybinding;\n this.matches = matches;\n this.render();\n };\n KeybindingLabel.prototype.render = function () {\n dom.clearNode(this.domNode);\n if (this.keybinding) {\n var _a = this.keybinding.getParts(), firstPart = _a[0], chordPart = _a[1];\n if (firstPart) {\n this.renderPart(this.domNode, firstPart, this.matches ? this.matches.firstPart : null);\n }\n if (chordPart) {\n dom.append(this.domNode, $('span.monaco-keybinding-key-chord-separator', null, ' '));\n this.renderPart(this.domNode, chordPart, this.matches ? this.matches.chordPart : null);\n }\n this.domNode.title = this.keybinding.getAriaLabel();\n }\n this.didEverRender = true;\n };\n KeybindingLabel.prototype.renderPart = function (parent, part, match) {\n var modifierLabels = UILabelProvider.modifierLabels[this.os];\n if (part.ctrlKey) {\n this.renderKey(parent, modifierLabels.ctrlKey, match && match.ctrlKey, modifierLabels.separator);\n }\n if (part.shiftKey) {\n this.renderKey(parent, modifierLabels.shiftKey, match && match.shiftKey, modifierLabels.separator);\n }\n if (part.altKey) {\n this.renderKey(parent, modifierLabels.altKey, match && match.altKey, modifierLabels.separator);\n }\n if (part.metaKey) {\n this.renderKey(parent, modifierLabels.metaKey, match && match.metaKey, modifierLabels.separator);\n }\n var keyLabel = part.keyLabel;\n if (keyLabel) {\n this.renderKey(parent, keyLabel, match && match.keyCode, '');\n }\n };\n KeybindingLabel.prototype.renderKey = function (parent, label, highlight, separator) {\n dom.append(parent, $('span.monaco-keybinding-key' + (highlight ? '.highlight' : ''), null, label));\n if (separator) {\n dom.append(parent, $('span.monaco-keybinding-key-separator', null, separator));\n }\n };\n KeybindingLabel.prototype.dispose = function () {\n this.keybinding = null;\n };\n KeybindingLabel.areSame = function (a, b) {\n if (a === b || (!a && !b)) {\n return true;\n }\n return !!a && !!b && equals(a.firstPart, b.firstPart) && equals(a.chordPart, b.chordPart);\n };\n return KeybindingLabel;\n}());\nexport { KeybindingLabel };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nexport var Mode;\n(function (Mode) {\n Mode[Mode[\"PREVIEW\"] = 0] = \"PREVIEW\";\n Mode[Mode[\"OPEN\"] = 1] = \"OPEN\";\n Mode[Mode[\"OPEN_IN_BACKGROUND\"] = 2] = \"OPEN_IN_BACKGROUND\";\n})(Mode || (Mode = {}));\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport * as nls from '../../../../nls';\nimport { TPromise } from '../../../common/winjs.base';\nimport { IconLabel } from '../../../browser/ui/iconLabel/iconLabel';\nimport { ActionBar } from '../../../browser/ui/actionbar/actionbar';\nimport { HighlightedLabel } from '../../../browser/ui/highlightedlabel/highlightedLabel';\nimport * as DOM from '../../../browser/dom';\nimport { KeybindingLabel } from '../../../browser/ui/keybindingLabel/keybindingLabel';\nimport { OS } from '../../../common/platform';\nvar IDS = 0;\nvar QuickOpenEntry = /** @class */ (function () {\n function QuickOpenEntry(highlights) {\n if (highlights === void 0) { highlights = []; }\n this.id = (IDS++).toString();\n this.labelHighlights = highlights;\n this.descriptionHighlights = [];\n }\n /**\n * A unique identifier for the entry\n */\n QuickOpenEntry.prototype.getId = function () {\n return this.id;\n };\n /**\n * The label of the entry to identify it from others in the list\n */\n QuickOpenEntry.prototype.getLabel = function () {\n return null;\n };\n /**\n * The options for the label to use for this entry\n */\n QuickOpenEntry.prototype.getLabelOptions = function () {\n return null;\n };\n /**\n * The label of the entry to use when a screen reader wants to read about the entry\n */\n QuickOpenEntry.prototype.getAriaLabel = function () {\n return [this.getLabel(), this.getDescription(), this.getDetail()]\n .filter(function (s) { return !!s; })\n .join(', ');\n };\n /**\n * Detail information about the entry that is optional and can be shown below the label\n */\n QuickOpenEntry.prototype.getDetail = function () {\n return null;\n };\n /**\n * The icon of the entry to identify it from others in the list\n */\n QuickOpenEntry.prototype.getIcon = function () {\n return null;\n };\n /**\n * A secondary description that is optional and can be shown right to the label\n */\n QuickOpenEntry.prototype.getDescription = function () {\n return null;\n };\n /**\n * A tooltip to show when hovering over the entry.\n */\n QuickOpenEntry.prototype.getTooltip = function () {\n return null;\n };\n /**\n * A tooltip to show when hovering over the description portion of the entry.\n */\n QuickOpenEntry.prototype.getDescriptionTooltip = function () {\n return null;\n };\n /**\n * An optional keybinding to show for an entry.\n */\n QuickOpenEntry.prototype.getKeybinding = function () {\n return null;\n };\n /**\n * Allows to reuse the same model while filtering. Hidden entries will not show up in the viewer.\n */\n QuickOpenEntry.prototype.isHidden = function () {\n return this.hidden;\n };\n /**\n * Allows to set highlight ranges that should show up for the entry label and optionally description if set.\n */\n QuickOpenEntry.prototype.setHighlights = function (labelHighlights, descriptionHighlights, detailHighlights) {\n this.labelHighlights = labelHighlights;\n this.descriptionHighlights = descriptionHighlights;\n this.detailHighlights = detailHighlights;\n };\n /**\n * Allows to return highlight ranges that should show up for the entry label and description.\n */\n QuickOpenEntry.prototype.getHighlights = function () {\n return [this.labelHighlights, this.descriptionHighlights, this.detailHighlights];\n };\n /**\n * Called when the entry is selected for opening. Returns a boolean value indicating if an action was performed or not.\n * The mode parameter gives an indication if the element is previewed (using arrow keys) or opened.\n *\n * The context parameter provides additional context information how the run was triggered.\n */\n QuickOpenEntry.prototype.run = function (mode, context) {\n return false;\n };\n return QuickOpenEntry;\n}());\nexport { QuickOpenEntry };\nvar QuickOpenEntryGroup = /** @class */ (function (_super) {\n __extends(QuickOpenEntryGroup, _super);\n function QuickOpenEntryGroup(entry, groupLabel, withBorder) {\n var _this = _super.call(this) || this;\n _this.entry = entry;\n _this.groupLabel = groupLabel;\n _this.withBorder = withBorder;\n return _this;\n }\n /**\n * The label of the group or null if none.\n */\n QuickOpenEntryGroup.prototype.getGroupLabel = function () {\n return this.groupLabel;\n };\n QuickOpenEntryGroup.prototype.setGroupLabel = function (groupLabel) {\n this.groupLabel = groupLabel;\n };\n /**\n * Whether to show a border on top of the group entry or not.\n */\n QuickOpenEntryGroup.prototype.showBorder = function () {\n return this.withBorder;\n };\n QuickOpenEntryGroup.prototype.setShowBorder = function (showBorder) {\n this.withBorder = showBorder;\n };\n QuickOpenEntryGroup.prototype.getLabel = function () {\n return this.entry ? this.entry.getLabel() : _super.prototype.getLabel.call(this);\n };\n QuickOpenEntryGroup.prototype.getLabelOptions = function () {\n return this.entry ? this.entry.getLabelOptions() : _super.prototype.getLabelOptions.call(this);\n };\n QuickOpenEntryGroup.prototype.getAriaLabel = function () {\n return this.entry ? this.entry.getAriaLabel() : _super.prototype.getAriaLabel.call(this);\n };\n QuickOpenEntryGroup.prototype.getDetail = function () {\n return this.entry ? this.entry.getDetail() : _super.prototype.getDetail.call(this);\n };\n QuickOpenEntryGroup.prototype.getIcon = function () {\n return this.entry ? this.entry.getIcon() : _super.prototype.getIcon.call(this);\n };\n QuickOpenEntryGroup.prototype.getDescription = function () {\n return this.entry ? this.entry.getDescription() : _super.prototype.getDescription.call(this);\n };\n QuickOpenEntryGroup.prototype.getHighlights = function () {\n return this.entry ? this.entry.getHighlights() : _super.prototype.getHighlights.call(this);\n };\n QuickOpenEntryGroup.prototype.isHidden = function () {\n return this.entry ? this.entry.isHidden() : _super.prototype.isHidden.call(this);\n };\n QuickOpenEntryGroup.prototype.setHighlights = function (labelHighlights, descriptionHighlights, detailHighlights) {\n this.entry ? this.entry.setHighlights(labelHighlights, descriptionHighlights, detailHighlights) : _super.prototype.setHighlights.call(this, labelHighlights, descriptionHighlights, detailHighlights);\n };\n QuickOpenEntryGroup.prototype.run = function (mode, context) {\n return this.entry ? this.entry.run(mode, context) : _super.prototype.run.call(this, mode, context);\n };\n return QuickOpenEntryGroup;\n}(QuickOpenEntry));\nexport { QuickOpenEntryGroup };\nvar NoActionProvider = /** @class */ (function () {\n function NoActionProvider() {\n }\n NoActionProvider.prototype.hasActions = function (tree, element) {\n return false;\n };\n NoActionProvider.prototype.getActions = function (tree, element) {\n return TPromise.as(null);\n };\n return NoActionProvider;\n}());\nvar templateEntry = 'quickOpenEntry';\nvar templateEntryGroup = 'quickOpenEntryGroup';\nvar Renderer = /** @class */ (function () {\n function Renderer(actionProvider, actionRunner) {\n if (actionProvider === void 0) { actionProvider = new NoActionProvider(); }\n if (actionRunner === void 0) { actionRunner = null; }\n this.actionProvider = actionProvider;\n this.actionRunner = actionRunner;\n }\n Renderer.prototype.getHeight = function (entry) {\n if (entry.getDetail()) {\n return 44;\n }\n return 22;\n };\n Renderer.prototype.getTemplateId = function (entry) {\n if (entry instanceof QuickOpenEntryGroup) {\n return templateEntryGroup;\n }\n return templateEntry;\n };\n Renderer.prototype.renderTemplate = function (templateId, container, styles) {\n var entryContainer = document.createElement('div');\n DOM.addClass(entryContainer, 'sub-content');\n container.appendChild(entryContainer);\n // Entry\n var row1 = DOM.$('.quick-open-row');\n var row2 = DOM.$('.quick-open-row');\n var entry = DOM.$('.quick-open-entry', null, row1, row2);\n entryContainer.appendChild(entry);\n // Icon\n var icon = document.createElement('span');\n row1.appendChild(icon);\n // Label\n var label = new IconLabel(row1, { supportHighlights: true, supportDescriptionHighlights: true });\n // Keybinding\n var keybindingContainer = document.createElement('span');\n row1.appendChild(keybindingContainer);\n DOM.addClass(keybindingContainer, 'quick-open-entry-keybinding');\n var keybinding = new KeybindingLabel(keybindingContainer, OS);\n // Detail\n var detailContainer = document.createElement('div');\n row2.appendChild(detailContainer);\n DOM.addClass(detailContainer, 'quick-open-entry-meta');\n var detail = new HighlightedLabel(detailContainer);\n // Entry Group\n var group;\n if (templateId === templateEntryGroup) {\n group = document.createElement('div');\n DOM.addClass(group, 'results-group');\n container.appendChild(group);\n }\n // Actions\n DOM.addClass(container, 'actions');\n var actionBarContainer = document.createElement('div');\n DOM.addClass(actionBarContainer, 'primary-action-bar');\n container.appendChild(actionBarContainer);\n var actionBar = new ActionBar(actionBarContainer, {\n actionRunner: this.actionRunner\n });\n return {\n container: container,\n entry: entry,\n icon: icon,\n label: label,\n detail: detail,\n keybinding: keybinding,\n group: group,\n actionBar: actionBar\n };\n };\n Renderer.prototype.renderElement = function (entry, templateId, data, styles) {\n // Action Bar\n if (this.actionProvider.hasActions(null, entry)) {\n DOM.addClass(data.container, 'has-actions');\n }\n else {\n DOM.removeClass(data.container, 'has-actions');\n }\n data.actionBar.context = entry; // make sure the context is the current element\n this.actionProvider.getActions(null, entry).then(function (actions) {\n if (data.actionBar.isEmpty() && actions && actions.length > 0) {\n data.actionBar.push(actions, { icon: true, label: false });\n }\n else if (!data.actionBar.isEmpty() && (!actions || actions.length === 0)) {\n data.actionBar.clear();\n }\n });\n // Entry group class\n if (entry instanceof QuickOpenEntryGroup && entry.getGroupLabel()) {\n DOM.addClass(data.container, 'has-group-label');\n }\n else {\n DOM.removeClass(data.container, 'has-group-label');\n }\n // Entry group\n if (entry instanceof QuickOpenEntryGroup) {\n var group = entry;\n var groupData = data;\n // Border\n if (group.showBorder()) {\n DOM.addClass(groupData.container, 'results-group-separator');\n groupData.container.style.borderTopColor = styles.pickerGroupBorder.toString();\n }\n else {\n DOM.removeClass(groupData.container, 'results-group-separator');\n groupData.container.style.borderTopColor = null;\n }\n // Group Label\n var groupLabel = group.getGroupLabel() || '';\n groupData.group.textContent = groupLabel;\n groupData.group.style.color = styles.pickerGroupForeground.toString();\n }\n // Normal Entry\n if (entry instanceof QuickOpenEntry) {\n var _a = entry.getHighlights(), labelHighlights = _a[0], descriptionHighlights = _a[1], detailHighlights = _a[2];\n // Icon\n var iconClass = entry.getIcon() ? ('quick-open-entry-icon ' + entry.getIcon()) : '';\n data.icon.className = iconClass;\n // Label\n var options = entry.getLabelOptions() || Object.create(null);\n options.matches = labelHighlights || [];\n options.title = entry.getTooltip();\n options.descriptionTitle = entry.getDescriptionTooltip() || entry.getDescription(); // tooltip over description because it could overflow\n options.descriptionMatches = descriptionHighlights || [];\n data.label.setValue(entry.getLabel(), entry.getDescription(), options);\n // Meta\n data.detail.set(entry.getDetail(), detailHighlights);\n // Keybinding\n data.keybinding.set(entry.getKeybinding(), null);\n }\n };\n Renderer.prototype.disposeTemplate = function (templateId, templateData) {\n var data = templateData;\n data.actionBar.dispose();\n data.actionBar = null;\n data.container = null;\n data.entry = null;\n data.keybinding.dispose();\n data.keybinding = null;\n data.detail.dispose();\n data.detail = null;\n data.group = null;\n data.icon = null;\n data.label.dispose();\n data.label = null;\n };\n return Renderer;\n}());\nvar QuickOpenModel = /** @class */ (function () {\n function QuickOpenModel(entries, actionProvider) {\n if (entries === void 0) { entries = []; }\n if (actionProvider === void 0) { actionProvider = new NoActionProvider(); }\n this._entries = entries;\n this._dataSource = this;\n this._renderer = new Renderer(actionProvider);\n this._filter = this;\n this._runner = this;\n this._accessibilityProvider = this;\n }\n Object.defineProperty(QuickOpenModel.prototype, \"entries\", {\n get: function () { return this._entries; },\n set: function (entries) {\n this._entries = entries;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(QuickOpenModel.prototype, \"dataSource\", {\n get: function () { return this._dataSource; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(QuickOpenModel.prototype, \"renderer\", {\n get: function () { return this._renderer; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(QuickOpenModel.prototype, \"filter\", {\n get: function () { return this._filter; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(QuickOpenModel.prototype, \"runner\", {\n get: function () { return this._runner; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(QuickOpenModel.prototype, \"accessibilityProvider\", {\n get: function () { return this._accessibilityProvider; },\n enumerable: true,\n configurable: true\n });\n QuickOpenModel.prototype.getId = function (entry) {\n return entry.getId();\n };\n QuickOpenModel.prototype.getLabel = function (entry) {\n return entry.getLabel();\n };\n QuickOpenModel.prototype.getAriaLabel = function (entry) {\n var ariaLabel = entry.getAriaLabel();\n if (ariaLabel) {\n return nls.localize('quickOpenAriaLabelEntry', \"{0}, picker\", entry.getAriaLabel());\n }\n return nls.localize('quickOpenAriaLabel', \"picker\");\n };\n QuickOpenModel.prototype.isVisible = function (entry) {\n return !entry.isHidden();\n };\n QuickOpenModel.prototype.run = function (entry, mode, context) {\n return entry.run(mode, context);\n };\n return QuickOpenModel;\n}());\nexport { QuickOpenModel };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport './quickopen.css';\nimport * as nls from '../../../../nls';\nimport { TPromise } from '../../../common/winjs.base';\nimport * as platform from '../../../common/platform';\nimport * as types from '../../../common/types';\nimport * as errors from '../../../common/errors';\nimport { Mode } from '../common/quickOpen';\nimport { Filter, Renderer, DataSource, AccessibilityProvider } from './quickOpenViewer';\nimport { $ } from '../../../browser/builder';\nimport { InputBox } from '../../../browser/ui/inputbox/inputBox';\nimport { Tree } from '../../tree/browser/treeImpl';\nimport { ProgressBar } from '../../../browser/ui/progressbar/progressbar';\nimport { StandardKeyboardEvent } from '../../../browser/keyboardEvent';\nimport { DefaultController, ClickBehavior } from '../../tree/browser/treeDefaults';\nimport * as DOM from '../../../browser/dom';\nimport { Disposable } from '../../../common/lifecycle';\nimport { ScrollbarVisibility } from '../../../common/scrollable';\nimport { Color } from '../../../common/color';\nimport { mixin } from '../../../common/objects';\nimport { StandardMouseEvent } from '../../../browser/mouseEvent';\nvar QuickOpenController = /** @class */ (function (_super) {\n __extends(QuickOpenController, _super);\n function QuickOpenController() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n QuickOpenController.prototype.onContextMenu = function (tree, element, event) {\n if (platform.isMacintosh) {\n return this.onLeftClick(tree, element, event); // https://github.com/Microsoft/vscode/issues/1011\n }\n return _super.prototype.onContextMenu.call(this, tree, element, event);\n };\n return QuickOpenController;\n}(DefaultController));\nexport { QuickOpenController };\nexport var HideReason;\n(function (HideReason) {\n HideReason[HideReason[\"ELEMENT_SELECTED\"] = 0] = \"ELEMENT_SELECTED\";\n HideReason[HideReason[\"FOCUS_LOST\"] = 1] = \"FOCUS_LOST\";\n HideReason[HideReason[\"CANCELED\"] = 2] = \"CANCELED\";\n})(HideReason || (HideReason = {}));\nvar defaultStyles = {\n background: Color.fromHex('#1E1E1E'),\n foreground: Color.fromHex('#CCCCCC'),\n pickerGroupForeground: Color.fromHex('#0097FB'),\n pickerGroupBorder: Color.fromHex('#3F3F46'),\n widgetShadow: Color.fromHex('#000000'),\n progressBarBackground: Color.fromHex('#0E70C0')\n};\nvar DEFAULT_INPUT_ARIA_LABEL = nls.localize('quickOpenAriaLabel', \"Quick picker. Type to narrow down results.\");\nvar QuickOpenWidget = /** @class */ (function (_super) {\n __extends(QuickOpenWidget, _super);\n function QuickOpenWidget(container, callbacks, options) {\n var _this = _super.call(this) || this;\n _this.isDisposed = false;\n _this.container = container;\n _this.callbacks = callbacks;\n _this.options = options;\n _this.styles = options || Object.create(null);\n mixin(_this.styles, defaultStyles, false);\n _this.model = null;\n return _this;\n }\n QuickOpenWidget.prototype.getModel = function () {\n return this.model;\n };\n QuickOpenWidget.prototype.create = function () {\n var _this = this;\n this.builder = $().div(function (div) {\n // Eventing\n div.on(DOM.EventType.KEY_DOWN, function (e) {\n var keyboardEvent = new StandardKeyboardEvent(e);\n if (keyboardEvent.keyCode === 9 /* Escape */) {\n DOM.EventHelper.stop(e, true);\n _this.hide(HideReason.CANCELED);\n }\n else if (keyboardEvent.keyCode === 2 /* Tab */ && !keyboardEvent.altKey && !keyboardEvent.ctrlKey && !keyboardEvent.metaKey) {\n var stops = e.currentTarget.querySelectorAll('input, .monaco-tree, .monaco-tree-row.focused .action-label.icon');\n if (keyboardEvent.shiftKey && keyboardEvent.target === stops[0]) {\n DOM.EventHelper.stop(e, true);\n stops[stops.length - 1].focus();\n }\n else if (!keyboardEvent.shiftKey && keyboardEvent.target === stops[stops.length - 1]) {\n DOM.EventHelper.stop(e, true);\n stops[0].focus();\n }\n }\n })\n .on(DOM.EventType.CONTEXT_MENU, function (e) { return DOM.EventHelper.stop(e, true); }) // Do this to fix an issue on Mac where the menu goes into the way\n .on(DOM.EventType.FOCUS, function (e) { return _this.gainingFocus(); }, null, true)\n .on(DOM.EventType.BLUR, function (e) { return _this.loosingFocus(e); }, null, true);\n // Progress Bar\n _this.progressBar = _this._register(new ProgressBar(div.clone(), { progressBarBackground: _this.styles.progressBarBackground }));\n _this.progressBar.hide();\n // Input Field\n div.div({ 'class': 'quick-open-input' }, function (inputContainer) {\n _this.inputContainer = inputContainer;\n _this.inputBox = _this._register(new InputBox(inputContainer.getHTMLElement(), null, {\n placeholder: _this.options.inputPlaceHolder || '',\n ariaLabel: DEFAULT_INPUT_ARIA_LABEL,\n inputBackground: _this.styles.inputBackground,\n inputForeground: _this.styles.inputForeground,\n inputBorder: _this.styles.inputBorder,\n inputValidationInfoBackground: _this.styles.inputValidationInfoBackground,\n inputValidationInfoBorder: _this.styles.inputValidationInfoBorder,\n inputValidationWarningBackground: _this.styles.inputValidationWarningBackground,\n inputValidationWarningBorder: _this.styles.inputValidationWarningBorder,\n inputValidationErrorBackground: _this.styles.inputValidationErrorBackground,\n inputValidationErrorBorder: _this.styles.inputValidationErrorBorder\n }));\n // ARIA\n _this.inputElement = _this.inputBox.inputElement;\n _this.inputElement.setAttribute('role', 'combobox');\n _this.inputElement.setAttribute('aria-haspopup', 'false');\n _this.inputElement.setAttribute('aria-autocomplete', 'list');\n DOM.addDisposableListener(_this.inputBox.inputElement, DOM.EventType.KEY_DOWN, function (e) {\n var keyboardEvent = new StandardKeyboardEvent(e);\n var shouldOpenInBackground = _this.shouldOpenInBackground(keyboardEvent);\n // Do not handle Tab: It is used to navigate between elements without mouse\n if (keyboardEvent.keyCode === 2 /* Tab */) {\n return;\n }\n // Pass tree navigation keys to the tree but leave focus in input field\n else if (keyboardEvent.keyCode === 18 /* DownArrow */ || keyboardEvent.keyCode === 16 /* UpArrow */ || keyboardEvent.keyCode === 12 /* PageDown */ || keyboardEvent.keyCode === 11 /* PageUp */) {\n DOM.EventHelper.stop(e, true);\n _this.navigateInTree(keyboardEvent.keyCode, keyboardEvent.shiftKey);\n // Position cursor at the end of input to allow right arrow (open in background)\n // to function immediately unless the user has made a selection\n if (_this.inputBox.inputElement.selectionStart === _this.inputBox.inputElement.selectionEnd) {\n _this.inputBox.inputElement.selectionStart = _this.inputBox.value.length;\n }\n }\n // Select element on Enter or on Arrow-Right if we are at the end of the input\n else if (keyboardEvent.keyCode === 3 /* Enter */ || shouldOpenInBackground) {\n DOM.EventHelper.stop(e, true);\n var focus_1 = _this.tree.getFocus();\n if (focus_1) {\n _this.elementSelected(focus_1, e, shouldOpenInBackground ? Mode.OPEN_IN_BACKGROUND : Mode.OPEN);\n }\n }\n });\n DOM.addDisposableListener(_this.inputBox.inputElement, DOM.EventType.INPUT, function (e) {\n _this.onType();\n });\n });\n // Result count for screen readers\n _this.resultCount = div.div({\n 'class': 'quick-open-result-count',\n 'aria-live': 'polite'\n }).clone();\n // Tree\n _this.treeContainer = div.div({\n 'class': 'quick-open-tree'\n }, function (div) {\n var createTree = _this.options.treeCreator || (function (container, config, opts) { return new Tree(container, config, opts); });\n _this.tree = _this._register(createTree(div.getHTMLElement(), {\n dataSource: new DataSource(_this),\n controller: new QuickOpenController({ clickBehavior: ClickBehavior.ON_MOUSE_UP, keyboardSupport: _this.options.keyboardSupport }),\n renderer: (_this.renderer = new Renderer(_this, _this.styles)),\n filter: new Filter(_this),\n accessibilityProvider: new AccessibilityProvider(_this)\n }, {\n twistiePixels: 11,\n indentPixels: 0,\n alwaysFocused: true,\n verticalScrollMode: ScrollbarVisibility.Visible,\n horizontalScrollMode: ScrollbarVisibility.Hidden,\n ariaLabel: nls.localize('treeAriaLabel', \"Quick Picker\"),\n keyboardSupport: _this.options.keyboardSupport,\n preventRootFocus: false\n }));\n _this.treeElement = _this.tree.getHTMLElement();\n // Handle Focus and Selection event\n _this._register(_this.tree.onDidChangeFocus(function (event) {\n _this.elementFocused(event.focus, event);\n }));\n _this._register(_this.tree.onDidChangeSelection(function (event) {\n if (event.selection && event.selection.length > 0) {\n var mouseEvent = event.payload && event.payload.originalEvent instanceof StandardMouseEvent ? event.payload.originalEvent : void 0;\n var shouldOpenInBackground = mouseEvent ? _this.shouldOpenInBackground(mouseEvent) : false;\n _this.elementSelected(event.selection[0], event, shouldOpenInBackground ? Mode.OPEN_IN_BACKGROUND : Mode.OPEN);\n }\n }));\n }).\n on(DOM.EventType.KEY_DOWN, function (e) {\n var keyboardEvent = new StandardKeyboardEvent(e);\n // Only handle when in quick navigation mode\n if (!_this.quickNavigateConfiguration) {\n return;\n }\n // Support keyboard navigation in quick navigation mode\n if (keyboardEvent.keyCode === 18 /* DownArrow */ || keyboardEvent.keyCode === 16 /* UpArrow */ || keyboardEvent.keyCode === 12 /* PageDown */ || keyboardEvent.keyCode === 11 /* PageUp */) {\n DOM.EventHelper.stop(e, true);\n _this.navigateInTree(keyboardEvent.keyCode);\n }\n }).\n on(DOM.EventType.KEY_UP, function (e) {\n var keyboardEvent = new StandardKeyboardEvent(e);\n var keyCode = keyboardEvent.keyCode;\n // Only handle when in quick navigation mode\n if (!_this.quickNavigateConfiguration) {\n return;\n }\n // Select element when keys are pressed that signal it\n var quickNavKeys = _this.quickNavigateConfiguration.keybindings;\n var wasTriggerKeyPressed = keyCode === 3 /* Enter */ || quickNavKeys.some(function (k) {\n var _a = k.getParts(), firstPart = _a[0], chordPart = _a[1];\n if (chordPart) {\n return false;\n }\n if (firstPart.shiftKey && keyCode === 4 /* Shift */) {\n if (keyboardEvent.ctrlKey || keyboardEvent.altKey || keyboardEvent.metaKey) {\n return false; // this is an optimistic check for the shift key being used to navigate back in quick open\n }\n return true;\n }\n if (firstPart.altKey && keyCode === 6 /* Alt */) {\n return true;\n }\n if (firstPart.ctrlKey && keyCode === 5 /* Ctrl */) {\n return true;\n }\n if (firstPart.metaKey && keyCode === 57 /* Meta */) {\n return true;\n }\n return false;\n });\n if (wasTriggerKeyPressed) {\n var focus_2 = _this.tree.getFocus();\n if (focus_2) {\n _this.elementSelected(focus_2, e);\n }\n }\n }).\n clone();\n })\n // Widget Attributes\n .addClass('monaco-quick-open-widget')\n .build(this.container);\n // Support layout\n if (this.layoutDimensions) {\n this.layout(this.layoutDimensions);\n }\n this.applyStyles();\n // Allows focus to switch to next/previous entry after tab into an actionbar item\n DOM.addDisposableListener(this.treeContainer.getHTMLElement(), DOM.EventType.KEY_DOWN, function (e) {\n var keyboardEvent = new StandardKeyboardEvent(e);\n // Only handle when not in quick navigation mode\n if (_this.quickNavigateConfiguration) {\n return;\n }\n if (keyboardEvent.keyCode === 18 /* DownArrow */ || keyboardEvent.keyCode === 16 /* UpArrow */ || keyboardEvent.keyCode === 12 /* PageDown */ || keyboardEvent.keyCode === 11 /* PageUp */) {\n DOM.EventHelper.stop(e, true);\n _this.navigateInTree(keyboardEvent.keyCode, keyboardEvent.shiftKey);\n _this.treeElement.focus();\n }\n });\n return this.builder.getHTMLElement();\n };\n QuickOpenWidget.prototype.style = function (styles) {\n this.styles = styles;\n this.applyStyles();\n };\n QuickOpenWidget.prototype.applyStyles = function () {\n if (this.builder) {\n var foreground = this.styles.foreground ? this.styles.foreground.toString() : null;\n var background = this.styles.background ? this.styles.background.toString() : null;\n var borderColor = this.styles.borderColor ? this.styles.borderColor.toString() : null;\n var widgetShadow = this.styles.widgetShadow ? this.styles.widgetShadow.toString() : null;\n this.builder.style('color', foreground);\n this.builder.style('background-color', background);\n this.builder.style('border-color', borderColor);\n this.builder.style('border-width', borderColor ? '1px' : null);\n this.builder.style('border-style', borderColor ? 'solid' : null);\n this.builder.style('box-shadow', widgetShadow ? \"0 5px 8px \" + widgetShadow : null);\n }\n if (this.progressBar) {\n this.progressBar.style({\n progressBarBackground: this.styles.progressBarBackground\n });\n }\n if (this.inputBox) {\n this.inputBox.style({\n inputBackground: this.styles.inputBackground,\n inputForeground: this.styles.inputForeground,\n inputBorder: this.styles.inputBorder,\n inputValidationInfoBackground: this.styles.inputValidationInfoBackground,\n inputValidationInfoBorder: this.styles.inputValidationInfoBorder,\n inputValidationWarningBackground: this.styles.inputValidationWarningBackground,\n inputValidationWarningBorder: this.styles.inputValidationWarningBorder,\n inputValidationErrorBackground: this.styles.inputValidationErrorBackground,\n inputValidationErrorBorder: this.styles.inputValidationErrorBorder\n });\n }\n if (this.tree && !this.options.treeCreator) {\n this.tree.style(this.styles);\n }\n if (this.renderer) {\n this.renderer.updateStyles(this.styles);\n }\n };\n QuickOpenWidget.prototype.shouldOpenInBackground = function (e) {\n // Keyboard\n if (e instanceof StandardKeyboardEvent) {\n if (e.keyCode !== 17 /* RightArrow */) {\n return false; // only for right arrow\n }\n if (e.metaKey || e.ctrlKey || e.shiftKey || e.altKey) {\n return false; // no modifiers allowed\n }\n // validate the cursor is at the end of the input and there is no selection,\n // and if not prevent opening in the background such as the selection can be changed\n var element = this.inputBox.inputElement;\n return element.selectionEnd === this.inputBox.value.length && element.selectionStart === element.selectionEnd;\n }\n // Mouse\n return e.middleButton;\n };\n QuickOpenWidget.prototype.onType = function () {\n var value = this.inputBox.value;\n // Adjust help text as needed if present\n if (this.helpText) {\n if (value) {\n this.helpText.hide();\n }\n else {\n this.helpText.show();\n }\n }\n // Send to callbacks\n this.callbacks.onType(value);\n };\n QuickOpenWidget.prototype.navigateInTree = function (keyCode, isShift) {\n var model = this.tree.getInput();\n var entries = model ? model.entries : [];\n var oldFocus = this.tree.getFocus();\n // Normal Navigation\n switch (keyCode) {\n case 18 /* DownArrow */:\n this.tree.focusNext();\n break;\n case 16 /* UpArrow */:\n this.tree.focusPrevious();\n break;\n case 12 /* PageDown */:\n this.tree.focusNextPage();\n break;\n case 11 /* PageUp */:\n this.tree.focusPreviousPage();\n break;\n case 2 /* Tab */:\n if (isShift) {\n this.tree.focusPrevious();\n }\n else {\n this.tree.focusNext();\n }\n break;\n }\n var newFocus = this.tree.getFocus();\n // Support cycle-through navigation if focus did not change\n if (entries.length > 1 && oldFocus === newFocus) {\n // Up from no entry or first entry goes down to last\n if (keyCode === 16 /* UpArrow */ || (keyCode === 2 /* Tab */ && isShift)) {\n this.tree.focusLast();\n }\n // Down from last entry goes to up to first\n else if (keyCode === 18 /* DownArrow */ || keyCode === 2 /* Tab */ && !isShift) {\n this.tree.focusFirst();\n }\n }\n // Reveal\n newFocus = this.tree.getFocus();\n if (newFocus) {\n this.tree.reveal(newFocus).done(null, errors.onUnexpectedError);\n }\n };\n QuickOpenWidget.prototype.elementFocused = function (value, event) {\n if (!value || !this.isVisible()) {\n return;\n }\n // ARIA\n this.inputElement.setAttribute('aria-activedescendant', this.treeElement.getAttribute('aria-activedescendant'));\n var context = { event: event, keymods: this.extractKeyMods(event), quickNavigateConfiguration: this.quickNavigateConfiguration };\n this.model.runner.run(value, Mode.PREVIEW, context);\n };\n QuickOpenWidget.prototype.elementSelected = function (value, event, preferredMode) {\n var hide = true;\n // Trigger open of element on selection\n if (this.isVisible()) {\n var mode = preferredMode || Mode.OPEN;\n var context = { event: event, keymods: this.extractKeyMods(event), quickNavigateConfiguration: this.quickNavigateConfiguration };\n hide = this.model.runner.run(value, mode, context);\n }\n // Hide if command was run successfully\n if (hide) {\n this.hide(HideReason.ELEMENT_SELECTED);\n }\n };\n QuickOpenWidget.prototype.extractKeyMods = function (event) {\n return {\n ctrlCmd: event && (event.ctrlKey || event.metaKey || (event.payload && event.payload.originalEvent && (event.payload.originalEvent.ctrlKey || event.payload.originalEvent.metaKey))),\n alt: event && (event.altKey || (event.payload && event.payload.originalEvent && event.payload.originalEvent.altKey))\n };\n };\n QuickOpenWidget.prototype.show = function (param, options) {\n this.visible = true;\n this.isLoosingFocus = false;\n this.quickNavigateConfiguration = options ? options.quickNavigateConfiguration : void 0;\n // Adjust UI for quick navigate mode\n if (this.quickNavigateConfiguration) {\n this.inputContainer.hide();\n this.builder.show();\n this.tree.domFocus();\n }\n // Otherwise use normal UI\n else {\n this.inputContainer.show();\n this.builder.show();\n this.inputBox.focus();\n }\n // Adjust Help text for IE\n if (this.helpText) {\n if (this.quickNavigateConfiguration || types.isString(param)) {\n this.helpText.hide();\n }\n else {\n this.helpText.show();\n }\n }\n // Show based on param\n if (types.isString(param)) {\n this.doShowWithPrefix(param);\n }\n else {\n this.doShowWithInput(param, options && options.autoFocus ? options.autoFocus : {});\n }\n // Respect selectAll option\n if (options && options.inputSelection && !this.quickNavigateConfiguration) {\n this.inputBox.select(options.inputSelection);\n }\n if (this.callbacks.onShow) {\n this.callbacks.onShow();\n }\n };\n QuickOpenWidget.prototype.doShowWithPrefix = function (prefix) {\n this.inputBox.value = prefix;\n this.callbacks.onType(prefix);\n };\n QuickOpenWidget.prototype.doShowWithInput = function (input, autoFocus) {\n this.setInput(input, autoFocus);\n };\n QuickOpenWidget.prototype.setInputAndLayout = function (input, autoFocus) {\n var _this = this;\n this.treeContainer.style({ height: this.getHeight(input) + \"px\" });\n this.tree.setInput(null).then(function () {\n _this.model = input;\n // ARIA\n _this.inputElement.setAttribute('aria-haspopup', String(input && input.entries && input.entries.length > 0));\n return _this.tree.setInput(input);\n }).done(function () {\n // Indicate entries to tree\n _this.tree.layout();\n var entries = input ? input.entries.filter(function (e) { return _this.isElementVisible(input, e); }) : [];\n _this.updateResultCount(entries.length);\n // Handle auto focus\n if (entries.length) {\n _this.autoFocus(input, entries, autoFocus);\n }\n }, errors.onUnexpectedError);\n };\n QuickOpenWidget.prototype.isElementVisible = function (input, e) {\n if (!input.filter) {\n return true;\n }\n return input.filter.isVisible(e);\n };\n QuickOpenWidget.prototype.autoFocus = function (input, entries, autoFocus) {\n if (autoFocus === void 0) { autoFocus = {}; }\n // First check for auto focus of prefix matches\n if (autoFocus.autoFocusPrefixMatch) {\n var caseSensitiveMatch = void 0;\n var caseInsensitiveMatch = void 0;\n var prefix = autoFocus.autoFocusPrefixMatch;\n var lowerCasePrefix = prefix.toLowerCase();\n for (var i = 0; i < entries.length; i++) {\n var entry = entries[i];\n var label = input.dataSource.getLabel(entry);\n if (!caseSensitiveMatch && label.indexOf(prefix) === 0) {\n caseSensitiveMatch = entry;\n }\n else if (!caseInsensitiveMatch && label.toLowerCase().indexOf(lowerCasePrefix) === 0) {\n caseInsensitiveMatch = entry;\n }\n if (caseSensitiveMatch && caseInsensitiveMatch) {\n break;\n }\n }\n var entryToFocus = caseSensitiveMatch || caseInsensitiveMatch;\n if (entryToFocus) {\n this.tree.setFocus(entryToFocus);\n this.tree.reveal(entryToFocus, 0.5).done(null, errors.onUnexpectedError);\n return;\n }\n }\n // Second check for auto focus of first entry\n if (autoFocus.autoFocusFirstEntry) {\n this.tree.focusFirst();\n this.tree.reveal(this.tree.getFocus()).done(null, errors.onUnexpectedError);\n }\n // Third check for specific index option\n else if (typeof autoFocus.autoFocusIndex === 'number') {\n if (entries.length > autoFocus.autoFocusIndex) {\n this.tree.focusNth(autoFocus.autoFocusIndex);\n this.tree.reveal(this.tree.getFocus()).done(null, errors.onUnexpectedError);\n }\n }\n // Check for auto focus of second entry\n else if (autoFocus.autoFocusSecondEntry) {\n if (entries.length > 1) {\n this.tree.focusNth(1);\n }\n }\n // Finally check for auto focus of last entry\n else if (autoFocus.autoFocusLastEntry) {\n if (entries.length > 1) {\n this.tree.focusLast();\n }\n }\n };\n QuickOpenWidget.prototype.getHeight = function (input) {\n var _this = this;\n var renderer = input.renderer;\n if (!input) {\n var itemHeight = renderer.getHeight(null);\n return this.options.minItemsToShow ? this.options.minItemsToShow * itemHeight : 0;\n }\n var height = 0;\n var preferredItemsHeight;\n if (this.layoutDimensions && this.layoutDimensions.height) {\n preferredItemsHeight = (this.layoutDimensions.height - 50 /* subtract height of input field (30px) and some spacing (drop shadow) to fit */) * 0.40 /* max 40% of screen */;\n }\n if (!preferredItemsHeight || preferredItemsHeight > QuickOpenWidget.MAX_ITEMS_HEIGHT) {\n preferredItemsHeight = QuickOpenWidget.MAX_ITEMS_HEIGHT;\n }\n var entries = input.entries.filter(function (e) { return _this.isElementVisible(input, e); });\n var maxEntries = this.options.maxItemsToShow || entries.length;\n for (var i = 0; i < maxEntries && i < entries.length; i++) {\n var entryHeight = renderer.getHeight(entries[i]);\n if (height + entryHeight <= preferredItemsHeight) {\n height += entryHeight;\n }\n else {\n break;\n }\n }\n return height;\n };\n QuickOpenWidget.prototype.updateResultCount = function (count) {\n this.resultCount.text(nls.localize({ key: 'quickInput.visibleCount', comment: ['This tells the user how many items are shown in a list of items to select from. The items can be anything. Currently not visible, but read by screen readers.'] }, \"{0} Results\", count));\n };\n QuickOpenWidget.prototype.hide = function (reason) {\n if (!this.isVisible()) {\n return;\n }\n this.visible = false;\n this.builder.hide();\n this.builder.domBlur();\n // Clear input field and clear tree\n this.inputBox.value = '';\n this.tree.setInput(null);\n // ARIA\n this.inputElement.setAttribute('aria-haspopup', 'false');\n // Reset Tree Height\n this.treeContainer.style({ height: (this.options.minItemsToShow ? this.options.minItemsToShow * 22 : 0) + 'px' });\n // Clear any running Progress\n this.progressBar.stop().hide();\n // Clear Focus\n if (this.tree.isDOMFocused()) {\n this.tree.domBlur();\n }\n else if (this.inputBox.hasFocus()) {\n this.inputBox.blur();\n }\n // Callbacks\n if (reason === HideReason.ELEMENT_SELECTED) {\n this.callbacks.onOk();\n }\n else {\n this.callbacks.onCancel();\n }\n if (this.callbacks.onHide) {\n this.callbacks.onHide(reason);\n }\n };\n QuickOpenWidget.prototype.setInput = function (input, autoFocus, ariaLabel) {\n if (!this.isVisible()) {\n return;\n }\n // If the input changes, indicate this to the tree\n if (!!this.getInput()) {\n this.onInputChanging();\n }\n // Adapt tree height to entries and apply input\n this.setInputAndLayout(input, autoFocus);\n // Apply ARIA\n if (this.inputBox) {\n this.inputBox.setAriaLabel(ariaLabel || DEFAULT_INPUT_ARIA_LABEL);\n }\n };\n QuickOpenWidget.prototype.onInputChanging = function () {\n var _this = this;\n if (this.inputChangingTimeoutHandle) {\n clearTimeout(this.inputChangingTimeoutHandle);\n this.inputChangingTimeoutHandle = null;\n }\n // when the input is changing in quick open, we indicate this as CSS class to the widget\n // for a certain timeout. this helps reducing some hectic UI updates when input changes quickly\n this.builder.addClass('content-changing');\n this.inputChangingTimeoutHandle = setTimeout(function () {\n _this.builder.removeClass('content-changing');\n }, 500);\n };\n QuickOpenWidget.prototype.getInput = function () {\n return this.tree.getInput();\n };\n QuickOpenWidget.prototype.isVisible = function () {\n return this.visible;\n };\n QuickOpenWidget.prototype.layout = function (dimension) {\n this.layoutDimensions = dimension;\n // Apply to quick open width (height is dynamic by number of items to show)\n var quickOpenWidth = Math.min(this.layoutDimensions.width * 0.62 /* golden cut */, QuickOpenWidget.MAX_WIDTH);\n if (this.builder) {\n // quick open\n this.builder.style({\n width: quickOpenWidth + 'px',\n marginLeft: '-' + (quickOpenWidth / 2) + 'px'\n });\n // input field\n this.inputContainer.style({\n width: (quickOpenWidth - 12) + 'px'\n });\n }\n };\n QuickOpenWidget.prototype.gainingFocus = function () {\n this.isLoosingFocus = false;\n };\n QuickOpenWidget.prototype.loosingFocus = function (e) {\n var _this = this;\n if (!this.isVisible()) {\n return;\n }\n var relatedTarget = e.relatedTarget;\n if (!this.quickNavigateConfiguration && DOM.isAncestor(relatedTarget, this.builder.getHTMLElement())) {\n return; // user clicked somewhere into quick open widget, do not close thereby\n }\n this.isLoosingFocus = true;\n TPromise.timeout(0).then(function () {\n if (!_this.isLoosingFocus) {\n return;\n }\n if (_this.isDisposed) {\n return;\n }\n var veto = _this.callbacks.onFocusLost && _this.callbacks.onFocusLost();\n if (!veto) {\n _this.hide(HideReason.FOCUS_LOST);\n }\n });\n };\n QuickOpenWidget.prototype.dispose = function () {\n _super.prototype.dispose.call(this);\n this.isDisposed = true;\n };\n QuickOpenWidget.MAX_WIDTH = 600; // Max total width of quick open widget\n QuickOpenWidget.MAX_ITEMS_HEIGHT = 20 * 22; // Max height of item list below input field\n return QuickOpenWidget;\n}(Disposable));\nexport { QuickOpenWidget };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { TPromise } from '../../../common/winjs.base';\nimport { isFunction } from '../../../common/types';\nvar DataSource = /** @class */ (function () {\n function DataSource(arg) {\n this.modelProvider = isFunction(arg.getModel) ? arg : { getModel: function () { return arg; } };\n }\n DataSource.prototype.getId = function (tree, element) {\n if (!element) {\n return null;\n }\n var model = this.modelProvider.getModel();\n return model === element ? '__root__' : model.dataSource.getId(element);\n };\n DataSource.prototype.hasChildren = function (tree, element) {\n var model = this.modelProvider.getModel();\n return model && model === element && model.entries.length > 0;\n };\n DataSource.prototype.getChildren = function (tree, element) {\n var model = this.modelProvider.getModel();\n return TPromise.as(model === element ? model.entries : []);\n };\n DataSource.prototype.getParent = function (tree, element) {\n return TPromise.as(null);\n };\n return DataSource;\n}());\nexport { DataSource };\nvar AccessibilityProvider = /** @class */ (function () {\n function AccessibilityProvider(modelProvider) {\n this.modelProvider = modelProvider;\n }\n AccessibilityProvider.prototype.getAriaLabel = function (tree, element) {\n var model = this.modelProvider.getModel();\n return model.accessibilityProvider && model.accessibilityProvider.getAriaLabel(element);\n };\n AccessibilityProvider.prototype.getPosInSet = function (tree, element) {\n var model = this.modelProvider.getModel();\n return String(model.entries.indexOf(element) + 1);\n };\n AccessibilityProvider.prototype.getSetSize = function () {\n var model = this.modelProvider.getModel();\n return String(model.entries.length);\n };\n return AccessibilityProvider;\n}());\nexport { AccessibilityProvider };\nvar Filter = /** @class */ (function () {\n function Filter(modelProvider) {\n this.modelProvider = modelProvider;\n }\n Filter.prototype.isVisible = function (tree, element) {\n var model = this.modelProvider.getModel();\n if (!model.filter) {\n return true;\n }\n return model.filter.isVisible(element);\n };\n return Filter;\n}());\nexport { Filter };\nvar Renderer = /** @class */ (function () {\n function Renderer(modelProvider, styles) {\n this.modelProvider = modelProvider;\n this.styles = styles;\n }\n Renderer.prototype.updateStyles = function (styles) {\n this.styles = styles;\n };\n Renderer.prototype.getHeight = function (tree, element) {\n var model = this.modelProvider.getModel();\n return model.renderer.getHeight(element);\n };\n Renderer.prototype.getTemplateId = function (tree, element) {\n var model = this.modelProvider.getModel();\n return model.renderer.getTemplateId(element);\n };\n Renderer.prototype.renderTemplate = function (tree, templateId, container) {\n var model = this.modelProvider.getModel();\n return model.renderer.renderTemplate(templateId, container, this.styles);\n };\n Renderer.prototype.renderElement = function (tree, element, templateId, templateData) {\n var model = this.modelProvider.getModel();\n model.renderer.renderElement(element, templateId, templateData, this.styles);\n };\n Renderer.prototype.disposeTemplate = function (tree, templateId, templateData) {\n var model = this.modelProvider.getModel();\n model.renderer.disposeTemplate(templateId, templateData);\n };\n return Renderer;\n}());\nexport { Renderer };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport './progressbar.css';\nimport { TPromise } from '../../../common/winjs.base';\nimport { $ } from '../../builder';\nimport * as DOM from '../../dom';\nimport { Disposable } from '../../../common/lifecycle';\nimport { Color } from '../../../common/color';\nimport { mixin } from '../../../common/objects';\nvar css_done = 'done';\nvar css_active = 'active';\nvar css_infinite = 'infinite';\nvar css_discrete = 'discrete';\nvar css_progress_container = 'monaco-progress-container';\nvar css_progress_bit = 'progress-bit';\nvar defaultOpts = {\n progressBarBackground: Color.fromHex('#0E70C0')\n};\n/**\n * A progress bar with support for infinite or discrete progress.\n */\nvar ProgressBar = /** @class */ (function (_super) {\n __extends(ProgressBar, _super);\n function ProgressBar(container, options) {\n var _this = _super.call(this) || this;\n _this.options = options || Object.create(null);\n mixin(_this.options, defaultOpts, false);\n _this.workedVal = 0;\n _this.progressBarBackground = _this.options.progressBarBackground;\n _this.create(container);\n return _this;\n }\n ProgressBar.prototype.create = function (container) {\n var _this = this;\n $(container).div({ 'class': css_progress_container }, function (builder) {\n _this.element = builder.clone();\n builder.div({ 'class': css_progress_bit }).on([DOM.EventType.ANIMATION_START, DOM.EventType.ANIMATION_END, DOM.EventType.ANIMATION_ITERATION], function (e) {\n switch (e.type) {\n case DOM.EventType.ANIMATION_ITERATION:\n if (_this.animationStopToken) {\n _this.animationStopToken(null);\n }\n break;\n }\n }, _this.toDispose);\n _this.bit = builder.getHTMLElement();\n });\n this.applyStyles();\n };\n ProgressBar.prototype.off = function () {\n this.bit.style.width = 'inherit';\n this.bit.style.opacity = '1';\n this.element.removeClass(css_active);\n this.element.removeClass(css_infinite);\n this.element.removeClass(css_discrete);\n this.workedVal = 0;\n this.totalWork = undefined;\n };\n /**\n * Stops the progressbar from showing any progress instantly without fading out.\n */\n ProgressBar.prototype.stop = function () {\n return this.doDone(false);\n };\n ProgressBar.prototype.doDone = function (delayed) {\n var _this = this;\n this.element.addClass(css_done);\n // let it grow to 100% width and hide afterwards\n if (!this.element.hasClass(css_infinite)) {\n this.bit.style.width = 'inherit';\n if (delayed) {\n TPromise.timeout(200).then(function () { return _this.off(); });\n }\n else {\n this.off();\n }\n }\n // let it fade out and hide afterwards\n else {\n this.bit.style.opacity = '0';\n if (delayed) {\n TPromise.timeout(200).then(function () { return _this.off(); });\n }\n else {\n this.off();\n }\n }\n return this;\n };\n ProgressBar.prototype.hide = function () {\n this.element.hide();\n };\n ProgressBar.prototype.style = function (styles) {\n this.progressBarBackground = styles.progressBarBackground;\n this.applyStyles();\n };\n ProgressBar.prototype.applyStyles = function () {\n if (this.bit) {\n var background = this.progressBarBackground ? this.progressBarBackground.toString() : null;\n this.bit.style.backgroundColor = background;\n }\n };\n return ProgressBar;\n}(Disposable));\nexport { ProgressBar };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport { QuickOpenWidget } from '../../../../base/parts/quickopen/browser/quickOpenWidget';\nimport { OverlayWidgetPositionPreference } from '../../../browser/editorBrowser';\nimport { attachQuickOpenStyler } from '../../../../platform/theme/common/styler';\nimport { foreground } from '../../../../platform/theme/common/colorRegistry';\nimport { Dimension } from '../../../../base/browser/dom';\nvar QuickOpenEditorWidget = /** @class */ (function () {\n function QuickOpenEditorWidget(codeEditor, onOk, onCancel, onType, configuration, themeService) {\n this.codeEditor = codeEditor;\n this.themeService = themeService;\n this.create(onOk, onCancel, onType, configuration);\n }\n QuickOpenEditorWidget.prototype.create = function (onOk, onCancel, onType, configuration) {\n this.domNode = document.createElement('div');\n this.quickOpenWidget = new QuickOpenWidget(this.domNode, {\n onOk: onOk,\n onCancel: onCancel,\n onType: onType\n }, {\n inputPlaceHolder: null,\n inputAriaLabel: configuration.inputAriaLabel,\n keyboardSupport: true\n });\n this.styler = attachQuickOpenStyler(this.quickOpenWidget, this.themeService, {\n pickerGroupForeground: foreground\n });\n this.quickOpenWidget.create();\n this.codeEditor.addOverlayWidget(this);\n };\n QuickOpenEditorWidget.prototype.setInput = function (model, focus) {\n this.quickOpenWidget.setInput(model, focus);\n };\n QuickOpenEditorWidget.prototype.getId = function () {\n return QuickOpenEditorWidget.ID;\n };\n QuickOpenEditorWidget.prototype.getDomNode = function () {\n return this.domNode;\n };\n QuickOpenEditorWidget.prototype.destroy = function () {\n this.codeEditor.removeOverlayWidget(this);\n this.quickOpenWidget.dispose();\n this.styler.dispose();\n };\n QuickOpenEditorWidget.prototype.show = function (value) {\n this.visible = true;\n var editorLayout = this.codeEditor.getLayoutInfo();\n if (editorLayout) {\n this.quickOpenWidget.layout(new Dimension(editorLayout.width, editorLayout.height));\n }\n this.quickOpenWidget.show(value);\n this.codeEditor.layoutOverlayWidget(this);\n };\n QuickOpenEditorWidget.prototype.getPosition = function () {\n if (this.visible) {\n return {\n preference: OverlayWidgetPositionPreference.TOP_CENTER\n };\n }\n return null;\n };\n QuickOpenEditorWidget.ID = 'editor.contrib.quickOpenEditorWidget';\n return QuickOpenEditorWidget;\n}());\nexport { QuickOpenEditorWidget };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __param = (this && this.__param) || function (paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n};\nimport { QuickOpenEditorWidget } from './quickOpenEditorWidget';\nimport { registerEditorContribution, EditorAction } from '../../../browser/editorExtensions';\nimport { IThemeService } from '../../../../platform/theme/common/themeService';\nimport { ModelDecorationOptions } from '../../../common/model/textModel';\nvar QuickOpenController = /** @class */ (function () {\n function QuickOpenController(editor, themeService) {\n this.themeService = themeService;\n this.editor = editor;\n }\n QuickOpenController.get = function (editor) {\n return editor.getContribution(QuickOpenController.ID);\n };\n QuickOpenController.prototype.getId = function () {\n return QuickOpenController.ID;\n };\n QuickOpenController.prototype.dispose = function () {\n // Dispose widget\n if (this.widget) {\n this.widget.destroy();\n this.widget = null;\n }\n };\n QuickOpenController.prototype.run = function (opts) {\n var _this = this;\n if (this.widget) {\n this.widget.destroy();\n this.widget = null;\n }\n // Create goto line widget\n var onClose = function (canceled) {\n // Clear Highlight Decorations if present\n _this.clearDecorations();\n // Restore selection if canceled\n if (canceled && _this.lastKnownEditorSelection) {\n _this.editor.setSelection(_this.lastKnownEditorSelection);\n _this.editor.revealRangeInCenterIfOutsideViewport(_this.lastKnownEditorSelection, 0 /* Smooth */);\n }\n _this.lastKnownEditorSelection = null;\n _this.editor.focus();\n };\n this.widget = new QuickOpenEditorWidget(this.editor, function () { return onClose(false); }, function () { return onClose(true); }, function (value) {\n _this.widget.setInput(opts.getModel(value), opts.getAutoFocus(value));\n }, {\n inputAriaLabel: opts.inputAriaLabel\n }, this.themeService);\n // Remember selection to be able to restore on cancel\n if (!this.lastKnownEditorSelection) {\n this.lastKnownEditorSelection = this.editor.getSelection();\n }\n // Show\n this.widget.show('');\n };\n QuickOpenController.prototype.decorateLine = function (range, editor) {\n var oldDecorations = [];\n if (this.rangeHighlightDecorationId) {\n oldDecorations.push(this.rangeHighlightDecorationId);\n this.rangeHighlightDecorationId = null;\n }\n var newDecorations = [\n {\n range: range,\n options: QuickOpenController._RANGE_HIGHLIGHT_DECORATION\n }\n ];\n var decorations = editor.deltaDecorations(oldDecorations, newDecorations);\n this.rangeHighlightDecorationId = decorations[0];\n };\n QuickOpenController.prototype.clearDecorations = function () {\n if (this.rangeHighlightDecorationId) {\n this.editor.deltaDecorations([this.rangeHighlightDecorationId], []);\n this.rangeHighlightDecorationId = null;\n }\n };\n QuickOpenController.ID = 'editor.controller.quickOpenController';\n QuickOpenController._RANGE_HIGHLIGHT_DECORATION = ModelDecorationOptions.register({\n className: 'rangeHighlight',\n isWholeLine: true\n });\n QuickOpenController = __decorate([\n __param(1, IThemeService)\n ], QuickOpenController);\n return QuickOpenController;\n}());\nexport { QuickOpenController };\n/**\n * Base class for providing quick open in the editor.\n */\nvar BaseEditorQuickOpenAction = /** @class */ (function (_super) {\n __extends(BaseEditorQuickOpenAction, _super);\n function BaseEditorQuickOpenAction(inputAriaLabel, opts) {\n var _this = _super.call(this, opts) || this;\n _this._inputAriaLabel = inputAriaLabel;\n return _this;\n }\n BaseEditorQuickOpenAction.prototype.getController = function (editor) {\n return QuickOpenController.get(editor);\n };\n BaseEditorQuickOpenAction.prototype._show = function (controller, opts) {\n controller.run({\n inputAriaLabel: this._inputAriaLabel,\n getModel: function (value) { return opts.getModel(value); },\n getAutoFocus: function (searchValue) { return opts.getAutoFocus(searchValue); }\n });\n };\n return BaseEditorQuickOpenAction;\n}(EditorAction));\nexport { BaseEditorQuickOpenAction };\nregisterEditorContribution(QuickOpenController);\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport { illegalArgument, onUnexpectedExternalError } from '../../../base/common/errors';\nimport URI from '../../../base/common/uri';\nimport { TPromise } from '../../../base/common/winjs.base';\nimport { Range } from '../../common/core/range';\nimport { registerLanguageCommand } from '../../browser/editorExtensions';\nimport { DocumentSymbolProviderRegistry } from '../../common/modes';\nimport { IModelService } from '../../common/services/modelService';\nimport { asWinJsPromise } from '../../../base/common/async';\nexport function getDocumentSymbols(model) {\n var roots = [];\n var promises = DocumentSymbolProviderRegistry.all(model).map(function (support) {\n return asWinJsPromise(function (token) { return support.provideDocumentSymbols(model, token); }).then(function (result) {\n if (Array.isArray(result)) {\n roots.push.apply(roots, result);\n }\n }, function (err) {\n onUnexpectedExternalError(err);\n });\n });\n return TPromise.join(promises).then(function () {\n var flatEntries = [];\n flatten(flatEntries, roots, '');\n flatEntries.sort(compareEntriesUsingStart);\n return flatEntries;\n });\n}\nfunction compareEntriesUsingStart(a, b) {\n return Range.compareRangesUsingStarts(a.range, b.range);\n}\nfunction flatten(bucket, entries, overrideContainerLabel) {\n for (var _i = 0, entries_1 = entries; _i < entries_1.length; _i++) {\n var entry = entries_1[_i];\n bucket.push({\n kind: entry.kind,\n name: entry.name,\n detail: entry.detail,\n containerName: entry.containerName || overrideContainerLabel,\n range: entry.range,\n selectionRange: entry.selectionRange,\n children: undefined,\n });\n if (entry.children) {\n flatten(bucket, entry.children, entry.name);\n }\n }\n}\nregisterLanguageCommand('_executeDocumentSymbolProvider', function (accessor, args) {\n var resource = args.resource;\n if (!(resource instanceof URI)) {\n throw illegalArgument('resource');\n }\n var model = accessor.get(IModelService).getModel(resource);\n if (!model) {\n throw illegalArgument('resource');\n }\n return getDocumentSymbols(model);\n});\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport './quickOutline.css';\nimport * as nls from '../../../../nls';\nimport { matchesFuzzy } from '../../../../base/common/filters';\nimport * as strings from '../../../../base/common/strings';\nimport { QuickOpenEntryGroup, QuickOpenModel } from '../../../../base/parts/quickopen/browser/quickOpenModel';\nimport { Mode } from '../../../../base/parts/quickopen/common/quickOpen';\nimport { EditorContextKeys } from '../../../common/editorContextKeys';\nimport { DocumentSymbolProviderRegistry, symbolKindToCssClass } from '../../../common/modes';\nimport { BaseEditorQuickOpenAction } from './editorQuickOpen';\nimport { getDocumentSymbols } from '../../../contrib/quickOpen/quickOpen';\nimport { registerEditorAction } from '../../../browser/editorExtensions';\nimport { Range } from '../../../common/core/range';\nvar SCOPE_PREFIX = ':';\nvar SymbolEntry = /** @class */ (function (_super) {\n __extends(SymbolEntry, _super);\n function SymbolEntry(name, type, description, range, highlights, editor, decorator) {\n var _this = _super.call(this) || this;\n _this.name = name;\n _this.type = type;\n _this.description = description;\n _this.range = range;\n _this.setHighlights(highlights);\n _this.editor = editor;\n _this.decorator = decorator;\n return _this;\n }\n SymbolEntry.prototype.getLabel = function () {\n return this.name;\n };\n SymbolEntry.prototype.getAriaLabel = function () {\n return nls.localize('entryAriaLabel', \"{0}, symbols\", this.name);\n };\n SymbolEntry.prototype.getIcon = function () {\n return this.type;\n };\n SymbolEntry.prototype.getDescription = function () {\n return this.description;\n };\n SymbolEntry.prototype.getType = function () {\n return this.type;\n };\n SymbolEntry.prototype.getRange = function () {\n return this.range;\n };\n SymbolEntry.prototype.run = function (mode, context) {\n if (mode === Mode.OPEN) {\n return this.runOpen(context);\n }\n return this.runPreview();\n };\n SymbolEntry.prototype.runOpen = function (context) {\n // Apply selection and focus\n var range = this.toSelection();\n this.editor.setSelection(range);\n this.editor.revealRangeInCenter(range, 0 /* Smooth */);\n this.editor.focus();\n return true;\n };\n SymbolEntry.prototype.runPreview = function () {\n // Select Outline Position\n var range = this.toSelection();\n this.editor.revealRangeInCenter(range, 0 /* Smooth */);\n // Decorate if possible\n this.decorator.decorateLine(this.range, this.editor);\n return false;\n };\n SymbolEntry.prototype.toSelection = function () {\n return new Range(this.range.startLineNumber, this.range.startColumn || 1, this.range.startLineNumber, this.range.startColumn || 1);\n };\n return SymbolEntry;\n}(QuickOpenEntryGroup));\nexport { SymbolEntry };\nvar QuickOutlineAction = /** @class */ (function (_super) {\n __extends(QuickOutlineAction, _super);\n function QuickOutlineAction() {\n return _super.call(this, nls.localize('quickOutlineActionInput', \"Type the name of an identifier you wish to navigate to\"), {\n id: 'editor.action.quickOutline',\n label: nls.localize('QuickOutlineAction.label', \"Go to Symbol...\"),\n alias: 'Go to Symbol...',\n precondition: EditorContextKeys.hasDocumentSymbolProvider,\n kbOpts: {\n kbExpr: EditorContextKeys.focus,\n primary: 2048 /* CtrlCmd */ | 1024 /* Shift */ | 45 /* KEY_O */,\n weight: 100 /* EditorContrib */\n },\n menuOpts: {\n group: 'navigation',\n order: 3\n }\n }) || this;\n }\n QuickOutlineAction.prototype.run = function (accessor, editor) {\n var _this = this;\n var model = editor.getModel();\n if (!DocumentSymbolProviderRegistry.has(model)) {\n return null;\n }\n // Resolve outline\n return getDocumentSymbols(model).then(function (result) {\n if (result.length === 0) {\n return;\n }\n _this._run(editor, result);\n });\n };\n QuickOutlineAction.prototype._run = function (editor, result) {\n var _this = this;\n this._show(this.getController(editor), {\n getModel: function (value) {\n return new QuickOpenModel(_this.toQuickOpenEntries(editor, result, value));\n },\n getAutoFocus: function (searchValue) {\n // Remove any type pattern (:) from search value as needed\n if (searchValue.indexOf(SCOPE_PREFIX) === 0) {\n searchValue = searchValue.substr(SCOPE_PREFIX.length);\n }\n return {\n autoFocusPrefixMatch: searchValue,\n autoFocusFirstEntry: !!searchValue\n };\n }\n });\n };\n QuickOutlineAction.prototype.symbolEntry = function (name, type, description, range, highlights, editor, decorator) {\n return new SymbolEntry(name, type, description, Range.lift(range), highlights, editor, decorator);\n };\n QuickOutlineAction.prototype.toQuickOpenEntries = function (editor, flattened, searchValue) {\n var controller = this.getController(editor);\n var results = [];\n // Convert to Entries\n var normalizedSearchValue = searchValue;\n if (searchValue.indexOf(SCOPE_PREFIX) === 0) {\n normalizedSearchValue = normalizedSearchValue.substr(SCOPE_PREFIX.length);\n }\n for (var i = 0; i < flattened.length; i++) {\n var element = flattened[i];\n var label = strings.trim(element.name);\n // Check for meatch\n var highlights = matchesFuzzy(normalizedSearchValue, label);\n if (highlights) {\n // Show parent scope as description\n var description = null;\n if (element.containerName) {\n description = element.containerName;\n }\n // Add\n results.push(this.symbolEntry(label, symbolKindToCssClass(element.kind), description, element.range, highlights, editor, controller));\n }\n }\n // Sort properly if actually searching\n if (searchValue) {\n if (searchValue.indexOf(SCOPE_PREFIX) === 0) {\n results = results.sort(this.sortScoped.bind(this, searchValue.toLowerCase()));\n }\n else {\n results = results.sort(this.sortNormal.bind(this, searchValue.toLowerCase()));\n }\n }\n // Mark all type groups\n if (results.length > 0 && searchValue.indexOf(SCOPE_PREFIX) === 0) {\n var currentType = null;\n var currentResult = null;\n var typeCounter = 0;\n for (var i = 0; i < results.length; i++) {\n var result = results[i];\n // Found new type\n if (currentType !== result.getType()) {\n // Update previous result with count\n if (currentResult) {\n currentResult.setGroupLabel(this.typeToLabel(currentType, typeCounter));\n }\n currentType = result.getType();\n currentResult = result;\n typeCounter = 1;\n result.setShowBorder(i > 0);\n }\n // Existing type, keep counting\n else {\n typeCounter++;\n }\n }\n // Update previous result with count\n if (currentResult) {\n currentResult.setGroupLabel(this.typeToLabel(currentType, typeCounter));\n }\n }\n // Mark first entry as outline\n else if (results.length > 0) {\n results[0].setGroupLabel(nls.localize('symbols', \"symbols ({0})\", results.length));\n }\n return results;\n };\n QuickOutlineAction.prototype.typeToLabel = function (type, count) {\n switch (type) {\n case 'module': return nls.localize('modules', \"modules ({0})\", count);\n case 'class': return nls.localize('class', \"classes ({0})\", count);\n case 'interface': return nls.localize('interface', \"interfaces ({0})\", count);\n case 'method': return nls.localize('method', \"methods ({0})\", count);\n case 'function': return nls.localize('function', \"functions ({0})\", count);\n case 'property': return nls.localize('property', \"properties ({0})\", count);\n case 'variable': return nls.localize('variable', \"variables ({0})\", count);\n case 'var': return nls.localize('variable2', \"variables ({0})\", count);\n case 'constructor': return nls.localize('_constructor', \"constructors ({0})\", count);\n case 'call': return nls.localize('call', \"calls ({0})\", count);\n }\n return type;\n };\n QuickOutlineAction.prototype.sortNormal = function (searchValue, elementA, elementB) {\n var elementAName = elementA.getLabel().toLowerCase();\n var elementBName = elementB.getLabel().toLowerCase();\n // Compare by name\n var r = elementAName.localeCompare(elementBName);\n if (r !== 0) {\n return r;\n }\n // If name identical sort by range instead\n var elementARange = elementA.getRange();\n var elementBRange = elementB.getRange();\n return elementARange.startLineNumber - elementBRange.startLineNumber;\n };\n QuickOutlineAction.prototype.sortScoped = function (searchValue, elementA, elementB) {\n // Remove scope char\n searchValue = searchValue.substr(SCOPE_PREFIX.length);\n // Sort by type first if scoped search\n var elementAType = elementA.getType();\n var elementBType = elementB.getType();\n var r = elementAType.localeCompare(elementBType);\n if (r !== 0) {\n return r;\n }\n // Special sort when searching in scoped mode\n if (searchValue) {\n var elementAName = elementA.getLabel().toLowerCase();\n var elementBName = elementB.getLabel().toLowerCase();\n // Compare by name\n var r_1 = elementAName.localeCompare(elementBName);\n if (r_1 !== 0) {\n return r_1;\n }\n }\n // Default to sort by range\n var elementARange = elementA.getRange();\n var elementBRange = elementB.getRange();\n return elementARange.startLineNumber - elementBRange.startLineNumber;\n };\n return QuickOutlineAction;\n}(BaseEditorQuickOpenAction));\nexport { QuickOutlineAction };\nregisterEditorAction(QuickOutlineAction);\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport './gotoLine.css';\nimport * as nls from '../../../../nls';\nimport { QuickOpenEntry, QuickOpenModel } from '../../../../base/parts/quickopen/browser/quickOpenModel';\nimport { Mode } from '../../../../base/parts/quickopen/common/quickOpen';\nimport { EditorContextKeys } from '../../../common/editorContextKeys';\nimport { isCodeEditor } from '../../../browser/editorBrowser';\nimport { BaseEditorQuickOpenAction } from './editorQuickOpen';\nimport { registerEditorAction } from '../../../browser/editorExtensions';\nimport { Position } from '../../../common/core/position';\nimport { Range } from '../../../common/core/range';\nvar GotoLineEntry = /** @class */ (function (_super) {\n __extends(GotoLineEntry, _super);\n function GotoLineEntry(line, editor, decorator) {\n var _this = _super.call(this) || this;\n _this.editor = editor;\n _this.decorator = decorator;\n _this._parseResult = _this._parseInput(line);\n return _this;\n }\n GotoLineEntry.prototype._parseInput = function (line) {\n var numbers = line.split(',').map(function (part) { return parseInt(part, 10); }).filter(function (part) { return !isNaN(part); }), position;\n if (numbers.length === 0) {\n position = new Position(-1, -1);\n }\n else if (numbers.length === 1) {\n position = new Position(numbers[0], 1);\n }\n else {\n position = new Position(numbers[0], numbers[1]);\n }\n var model;\n if (isCodeEditor(this.editor)) {\n model = this.editor.getModel();\n }\n else {\n model = this.editor.getModel().modified;\n }\n var isValid = model.validatePosition(position).equals(position), label;\n if (isValid) {\n if (position.column && position.column > 1) {\n label = nls.localize('gotoLineLabelValidLineAndColumn', \"Go to line {0} and character {1}\", position.lineNumber, position.column);\n }\n else {\n label = nls.localize('gotoLineLabelValidLine', \"Go to line {0}\", position.lineNumber, position.column);\n }\n }\n else if (position.lineNumber < 1 || position.lineNumber > model.getLineCount()) {\n label = nls.localize('gotoLineLabelEmptyWithLineLimit', \"Type a line number between 1 and {0} to navigate to\", model.getLineCount());\n }\n else {\n label = nls.localize('gotoLineLabelEmptyWithLineAndColumnLimit', \"Type a character between 1 and {0} to navigate to\", model.getLineMaxColumn(position.lineNumber));\n }\n return {\n position: position,\n isValid: isValid,\n label: label\n };\n };\n GotoLineEntry.prototype.getLabel = function () {\n return this._parseResult.label;\n };\n GotoLineEntry.prototype.getAriaLabel = function () {\n return nls.localize('gotoLineAriaLabel', \"Go to line {0}\", this._parseResult.label);\n };\n GotoLineEntry.prototype.run = function (mode, context) {\n if (mode === Mode.OPEN) {\n return this.runOpen();\n }\n return this.runPreview();\n };\n GotoLineEntry.prototype.runOpen = function () {\n // No-op if range is not valid\n if (!this._parseResult.isValid) {\n return false;\n }\n // Apply selection and focus\n var range = this.toSelection();\n this.editor.setSelection(range);\n this.editor.revealRangeInCenter(range, 0 /* Smooth */);\n this.editor.focus();\n return true;\n };\n GotoLineEntry.prototype.runPreview = function () {\n // No-op if range is not valid\n if (!this._parseResult.isValid) {\n this.decorator.clearDecorations();\n return false;\n }\n // Select Line Position\n var range = this.toSelection();\n this.editor.revealRangeInCenter(range, 0 /* Smooth */);\n // Decorate if possible\n this.decorator.decorateLine(range, this.editor);\n return false;\n };\n GotoLineEntry.prototype.toSelection = function () {\n return new Range(this._parseResult.position.lineNumber, this._parseResult.position.column, this._parseResult.position.lineNumber, this._parseResult.position.column);\n };\n return GotoLineEntry;\n}(QuickOpenEntry));\nexport { GotoLineEntry };\nvar GotoLineAction = /** @class */ (function (_super) {\n __extends(GotoLineAction, _super);\n function GotoLineAction() {\n return _super.call(this, nls.localize('gotoLineActionInput', \"Type a line number, followed by an optional colon and a character number to navigate to\"), {\n id: 'editor.action.gotoLine',\n label: nls.localize('GotoLineAction.label', \"Go to Line...\"),\n alias: 'Go to Line...',\n precondition: null,\n kbOpts: {\n kbExpr: EditorContextKeys.focus,\n primary: 2048 /* CtrlCmd */ | 37 /* KEY_G */,\n mac: { primary: 256 /* WinCtrl */ | 37 /* KEY_G */ },\n weight: 100 /* EditorContrib */\n }\n }) || this;\n }\n GotoLineAction.prototype.run = function (accessor, editor) {\n var _this = this;\n this._show(this.getController(editor), {\n getModel: function (value) {\n return new QuickOpenModel([new GotoLineEntry(value, editor, _this.getController(editor))]);\n },\n getAutoFocus: function (searchValue) {\n return {\n autoFocusFirstEntry: searchValue.length > 0\n };\n }\n });\n };\n return GotoLineAction;\n}(BaseEditorQuickOpenAction));\nexport { GotoLineAction };\nregisterEditorAction(GotoLineAction);\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport * as nls from '../../../../nls';\nimport { onUnexpectedError } from '../../../../base/common/errors';\nimport { matchesFuzzy } from '../../../../base/common/filters';\nimport { TPromise } from '../../../../base/common/winjs.base';\nimport { QuickOpenEntryGroup, QuickOpenModel } from '../../../../base/parts/quickopen/browser/quickOpenModel';\nimport { Mode } from '../../../../base/parts/quickopen/common/quickOpen';\nimport { IKeybindingService } from '../../../../platform/keybinding/common/keybinding';\nimport { EditorContextKeys } from '../../../common/editorContextKeys';\nimport { BaseEditorQuickOpenAction } from './editorQuickOpen';\nimport { registerEditorAction } from '../../../browser/editorExtensions';\nimport * as browser from '../../../../base/browser/browser';\nvar EditorActionCommandEntry = /** @class */ (function (_super) {\n __extends(EditorActionCommandEntry, _super);\n function EditorActionCommandEntry(key, highlights, action, editor) {\n var _this = _super.call(this) || this;\n _this.key = key;\n _this.setHighlights(highlights);\n _this.action = action;\n _this.editor = editor;\n return _this;\n }\n EditorActionCommandEntry.prototype.getLabel = function () {\n return this.action.label;\n };\n EditorActionCommandEntry.prototype.getAriaLabel = function () {\n return nls.localize('ariaLabelEntry', \"{0}, commands\", this.getLabel());\n };\n EditorActionCommandEntry.prototype.getGroupLabel = function () {\n return this.key;\n };\n EditorActionCommandEntry.prototype.run = function (mode, context) {\n var _this = this;\n if (mode === Mode.OPEN) {\n // Use a timeout to give the quick open widget a chance to close itself first\n TPromise.timeout(50).done(function () {\n // Some actions are enabled only when editor has focus\n _this.editor.focus();\n try {\n var promise = _this.action.run() || TPromise.as(null);\n promise.done(null, onUnexpectedError);\n }\n catch (error) {\n onUnexpectedError(error);\n }\n }, onUnexpectedError);\n return true;\n }\n return false;\n };\n return EditorActionCommandEntry;\n}(QuickOpenEntryGroup));\nexport { EditorActionCommandEntry };\nvar QuickCommandAction = /** @class */ (function (_super) {\n __extends(QuickCommandAction, _super);\n function QuickCommandAction() {\n return _super.call(this, nls.localize('quickCommandActionInput', \"Type the name of an action you want to execute\"), {\n id: 'editor.action.quickCommand',\n label: nls.localize('QuickCommandAction.label', \"Command Palette\"),\n alias: 'Command Palette',\n precondition: null,\n kbOpts: {\n kbExpr: EditorContextKeys.focus,\n primary: (browser.isIE ? 512 /* Alt */ | 59 /* F1 */ : 59 /* F1 */),\n weight: 100 /* EditorContrib */\n },\n menuOpts: {\n group: 'z_commands',\n order: 1\n }\n }) || this;\n }\n QuickCommandAction.prototype.run = function (accessor, editor) {\n var _this = this;\n var keybindingService = accessor.get(IKeybindingService);\n this._show(this.getController(editor), {\n getModel: function (value) {\n return new QuickOpenModel(_this._editorActionsToEntries(keybindingService, editor, value));\n },\n getAutoFocus: function (searchValue) {\n return {\n autoFocusFirstEntry: true,\n autoFocusPrefixMatch: searchValue\n };\n }\n });\n };\n QuickCommandAction.prototype._sort = function (elementA, elementB) {\n var elementAName = elementA.getLabel().toLowerCase();\n var elementBName = elementB.getLabel().toLowerCase();\n return elementAName.localeCompare(elementBName);\n };\n QuickCommandAction.prototype._editorActionsToEntries = function (keybindingService, editor, searchValue) {\n var actions = editor.getSupportedActions();\n var entries = [];\n for (var i = 0; i < actions.length; i++) {\n var action = actions[i];\n var keybind = keybindingService.lookupKeybinding(action.id);\n if (action.label) {\n var highlights = matchesFuzzy(searchValue, action.label);\n if (highlights) {\n entries.push(new EditorActionCommandEntry(keybind ? keybind.getLabel() : '', highlights, action, editor));\n }\n }\n }\n // Sort by name\n entries = entries.sort(this._sort);\n return entries;\n };\n return QuickCommandAction;\n}(BaseEditorQuickOpenAction));\nexport { QuickCommandAction };\nregisterEditorAction(QuickCommandAction);\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport * as nls from '../../../../nls';\nimport { registerEditorAction, EditorAction } from '../../../browser/editorExtensions';\nimport { IStandaloneThemeService } from '../../common/standaloneThemeService';\nvar ToggleHighContrast = /** @class */ (function (_super) {\n __extends(ToggleHighContrast, _super);\n function ToggleHighContrast() {\n var _this = _super.call(this, {\n id: 'editor.action.toggleHighContrast',\n label: nls.localize('toggleHighContrast', \"Toggle High Contrast Theme\"),\n alias: 'Toggle High Contrast Theme',\n precondition: null\n }) || this;\n _this._originalThemeName = null;\n return _this;\n }\n ToggleHighContrast.prototype.run = function (accessor, editor) {\n var standaloneThemeService = accessor.get(IStandaloneThemeService);\n if (this._originalThemeName) {\n // We must toggle back to the integrator's theme\n standaloneThemeService.setTheme(this._originalThemeName);\n this._originalThemeName = null;\n }\n else {\n this._originalThemeName = standaloneThemeService.getTheme().themeName;\n standaloneThemeService.setTheme('hc-black');\n }\n };\n return ToggleHighContrast;\n}(EditorAction));\nregisterEditorAction(ToggleHighContrast);\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __param = (this && this.__param) || function (paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n};\nimport { ICodeEditorService } from '../../../browser/services/codeEditorService';\nimport { IInstantiationService } from '../../../../platform/instantiation/common/instantiation';\nimport { IContextKeyService } from '../../../../platform/contextkey/common/contextkey';\nimport { IConfigurationService } from '../../../../platform/configuration/common/configuration';\nimport { IStorageService } from '../../../../platform/storage/common/storage';\nimport { registerEditorContribution } from '../../../browser/editorExtensions';\nimport { INotificationService } from '../../../../platform/notification/common/notification';\nimport { ReferencesController } from '../../../contrib/referenceSearch/referencesController';\nvar StandaloneReferencesController = /** @class */ (function (_super) {\n __extends(StandaloneReferencesController, _super);\n function StandaloneReferencesController(editor, contextKeyService, editorService, notificationService, instantiationService, storageService, configurationService) {\n return _super.call(this, true, editor, contextKeyService, editorService, notificationService, instantiationService, storageService, configurationService) || this;\n }\n StandaloneReferencesController = __decorate([\n __param(1, IContextKeyService),\n __param(2, ICodeEditorService),\n __param(3, INotificationService),\n __param(4, IInstantiationService),\n __param(5, IStorageService),\n __param(6, IConfigurationService)\n ], StandaloneReferencesController);\n return StandaloneReferencesController;\n}(ReferencesController));\nexport { StandaloneReferencesController };\nregisterEditorContribution(StandaloneReferencesController);\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport { Emitter } from '../../../base/common/event';\nimport { KeyChord } from '../../../base/common/keyCodes';\nimport { Position } from '../core/position';\nimport { Range } from '../core/range';\nimport { Selection, SelectionDirection } from '../core/selection';\nimport { TPromise } from '../../../base/common/winjs.base';\nimport { CancellationTokenSource } from '../../../base/common/cancellation';\nimport { Token } from '../core/token';\nimport URI from '../../../base/common/uri';\n// --------------------------------------------\n// This is repeated here so it can be exported\n// because TS inlines const enums\n// --------------------------------------------\nexport var MarkerTag;\n(function (MarkerTag) {\n MarkerTag[MarkerTag[\"Unnecessary\"] = 1] = \"Unnecessary\";\n})(MarkerTag || (MarkerTag = {}));\nexport var MarkerSeverity;\n(function (MarkerSeverity) {\n MarkerSeverity[MarkerSeverity[\"Hint\"] = 1] = \"Hint\";\n MarkerSeverity[MarkerSeverity[\"Info\"] = 2] = \"Info\";\n MarkerSeverity[MarkerSeverity[\"Warning\"] = 4] = \"Warning\";\n MarkerSeverity[MarkerSeverity[\"Error\"] = 8] = \"Error\";\n})(MarkerSeverity || (MarkerSeverity = {}));\n// --------------------------------------------\n// This is repeated here so it can be exported\n// because TS inlines const enums\n// --------------------------------------------\nvar KeyMod = /** @class */ (function () {\n function KeyMod() {\n }\n KeyMod.chord = function (firstPart, secondPart) {\n return KeyChord(firstPart, secondPart);\n };\n KeyMod.CtrlCmd = 2048 /* CtrlCmd */;\n KeyMod.Shift = 1024 /* Shift */;\n KeyMod.Alt = 512 /* Alt */;\n KeyMod.WinCtrl = 256 /* WinCtrl */;\n return KeyMod;\n}());\nexport { KeyMod };\n// --------------------------------------------\n// This is repeated here so it can be exported\n// because TS inlines const enums\n// --------------------------------------------\n/**\n * Virtual Key Codes, the value does not hold any inherent meaning.\n * Inspired somewhat from https://msdn.microsoft.com/en-us/library/windows/desktop/dd375731(v=vs.85).aspx\n * But these are \"more general\", as they should work across browsers & OS`s.\n */\nexport var KeyCode;\n(function (KeyCode) {\n /**\n * Placed first to cover the 0 value of the enum.\n */\n KeyCode[KeyCode[\"Unknown\"] = 0] = \"Unknown\";\n KeyCode[KeyCode[\"Backspace\"] = 1] = \"Backspace\";\n KeyCode[KeyCode[\"Tab\"] = 2] = \"Tab\";\n KeyCode[KeyCode[\"Enter\"] = 3] = \"Enter\";\n KeyCode[KeyCode[\"Shift\"] = 4] = \"Shift\";\n KeyCode[KeyCode[\"Ctrl\"] = 5] = \"Ctrl\";\n KeyCode[KeyCode[\"Alt\"] = 6] = \"Alt\";\n KeyCode[KeyCode[\"PauseBreak\"] = 7] = \"PauseBreak\";\n KeyCode[KeyCode[\"CapsLock\"] = 8] = \"CapsLock\";\n KeyCode[KeyCode[\"Escape\"] = 9] = \"Escape\";\n KeyCode[KeyCode[\"Space\"] = 10] = \"Space\";\n KeyCode[KeyCode[\"PageUp\"] = 11] = \"PageUp\";\n KeyCode[KeyCode[\"PageDown\"] = 12] = \"PageDown\";\n KeyCode[KeyCode[\"End\"] = 13] = \"End\";\n KeyCode[KeyCode[\"Home\"] = 14] = \"Home\";\n KeyCode[KeyCode[\"LeftArrow\"] = 15] = \"LeftArrow\";\n KeyCode[KeyCode[\"UpArrow\"] = 16] = \"UpArrow\";\n KeyCode[KeyCode[\"RightArrow\"] = 17] = \"RightArrow\";\n KeyCode[KeyCode[\"DownArrow\"] = 18] = \"DownArrow\";\n KeyCode[KeyCode[\"Insert\"] = 19] = \"Insert\";\n KeyCode[KeyCode[\"Delete\"] = 20] = \"Delete\";\n KeyCode[KeyCode[\"KEY_0\"] = 21] = \"KEY_0\";\n KeyCode[KeyCode[\"KEY_1\"] = 22] = \"KEY_1\";\n KeyCode[KeyCode[\"KEY_2\"] = 23] = \"KEY_2\";\n KeyCode[KeyCode[\"KEY_3\"] = 24] = \"KEY_3\";\n KeyCode[KeyCode[\"KEY_4\"] = 25] = \"KEY_4\";\n KeyCode[KeyCode[\"KEY_5\"] = 26] = \"KEY_5\";\n KeyCode[KeyCode[\"KEY_6\"] = 27] = \"KEY_6\";\n KeyCode[KeyCode[\"KEY_7\"] = 28] = \"KEY_7\";\n KeyCode[KeyCode[\"KEY_8\"] = 29] = \"KEY_8\";\n KeyCode[KeyCode[\"KEY_9\"] = 30] = \"KEY_9\";\n KeyCode[KeyCode[\"KEY_A\"] = 31] = \"KEY_A\";\n KeyCode[KeyCode[\"KEY_B\"] = 32] = \"KEY_B\";\n KeyCode[KeyCode[\"KEY_C\"] = 33] = \"KEY_C\";\n KeyCode[KeyCode[\"KEY_D\"] = 34] = \"KEY_D\";\n KeyCode[KeyCode[\"KEY_E\"] = 35] = \"KEY_E\";\n KeyCode[KeyCode[\"KEY_F\"] = 36] = \"KEY_F\";\n KeyCode[KeyCode[\"KEY_G\"] = 37] = \"KEY_G\";\n KeyCode[KeyCode[\"KEY_H\"] = 38] = \"KEY_H\";\n KeyCode[KeyCode[\"KEY_I\"] = 39] = \"KEY_I\";\n KeyCode[KeyCode[\"KEY_J\"] = 40] = \"KEY_J\";\n KeyCode[KeyCode[\"KEY_K\"] = 41] = \"KEY_K\";\n KeyCode[KeyCode[\"KEY_L\"] = 42] = \"KEY_L\";\n KeyCode[KeyCode[\"KEY_M\"] = 43] = \"KEY_M\";\n KeyCode[KeyCode[\"KEY_N\"] = 44] = \"KEY_N\";\n KeyCode[KeyCode[\"KEY_O\"] = 45] = \"KEY_O\";\n KeyCode[KeyCode[\"KEY_P\"] = 46] = \"KEY_P\";\n KeyCode[KeyCode[\"KEY_Q\"] = 47] = \"KEY_Q\";\n KeyCode[KeyCode[\"KEY_R\"] = 48] = \"KEY_R\";\n KeyCode[KeyCode[\"KEY_S\"] = 49] = \"KEY_S\";\n KeyCode[KeyCode[\"KEY_T\"] = 50] = \"KEY_T\";\n KeyCode[KeyCode[\"KEY_U\"] = 51] = \"KEY_U\";\n KeyCode[KeyCode[\"KEY_V\"] = 52] = \"KEY_V\";\n KeyCode[KeyCode[\"KEY_W\"] = 53] = \"KEY_W\";\n KeyCode[KeyCode[\"KEY_X\"] = 54] = \"KEY_X\";\n KeyCode[KeyCode[\"KEY_Y\"] = 55] = \"KEY_Y\";\n KeyCode[KeyCode[\"KEY_Z\"] = 56] = \"KEY_Z\";\n KeyCode[KeyCode[\"Meta\"] = 57] = \"Meta\";\n KeyCode[KeyCode[\"ContextMenu\"] = 58] = \"ContextMenu\";\n KeyCode[KeyCode[\"F1\"] = 59] = \"F1\";\n KeyCode[KeyCode[\"F2\"] = 60] = \"F2\";\n KeyCode[KeyCode[\"F3\"] = 61] = \"F3\";\n KeyCode[KeyCode[\"F4\"] = 62] = \"F4\";\n KeyCode[KeyCode[\"F5\"] = 63] = \"F5\";\n KeyCode[KeyCode[\"F6\"] = 64] = \"F6\";\n KeyCode[KeyCode[\"F7\"] = 65] = \"F7\";\n KeyCode[KeyCode[\"F8\"] = 66] = \"F8\";\n KeyCode[KeyCode[\"F9\"] = 67] = \"F9\";\n KeyCode[KeyCode[\"F10\"] = 68] = \"F10\";\n KeyCode[KeyCode[\"F11\"] = 69] = \"F11\";\n KeyCode[KeyCode[\"F12\"] = 70] = \"F12\";\n KeyCode[KeyCode[\"F13\"] = 71] = \"F13\";\n KeyCode[KeyCode[\"F14\"] = 72] = \"F14\";\n KeyCode[KeyCode[\"F15\"] = 73] = \"F15\";\n KeyCode[KeyCode[\"F16\"] = 74] = \"F16\";\n KeyCode[KeyCode[\"F17\"] = 75] = \"F17\";\n KeyCode[KeyCode[\"F18\"] = 76] = \"F18\";\n KeyCode[KeyCode[\"F19\"] = 77] = \"F19\";\n KeyCode[KeyCode[\"NumLock\"] = 78] = \"NumLock\";\n KeyCode[KeyCode[\"ScrollLock\"] = 79] = \"ScrollLock\";\n /**\n * Used for miscellaneous characters; it can vary by keyboard.\n * For the US standard keyboard, the ';:' key\n */\n KeyCode[KeyCode[\"US_SEMICOLON\"] = 80] = \"US_SEMICOLON\";\n /**\n * For any country/region, the '+' key\n * For the US standard keyboard, the '=+' key\n */\n KeyCode[KeyCode[\"US_EQUAL\"] = 81] = \"US_EQUAL\";\n /**\n * For any country/region, the ',' key\n * For the US standard keyboard, the ',<' key\n */\n KeyCode[KeyCode[\"US_COMMA\"] = 82] = \"US_COMMA\";\n /**\n * For any country/region, the '-' key\n * For the US standard keyboard, the '-_' key\n */\n KeyCode[KeyCode[\"US_MINUS\"] = 83] = \"US_MINUS\";\n /**\n * For any country/region, the '.' key\n * For the US standard keyboard, the '.>' key\n */\n KeyCode[KeyCode[\"US_DOT\"] = 84] = \"US_DOT\";\n /**\n * Used for miscellaneous characters; it can vary by keyboard.\n * For the US standard keyboard, the '/?' key\n */\n KeyCode[KeyCode[\"US_SLASH\"] = 85] = \"US_SLASH\";\n /**\n * Used for miscellaneous characters; it can vary by keyboard.\n * For the US standard keyboard, the '`~' key\n */\n KeyCode[KeyCode[\"US_BACKTICK\"] = 86] = \"US_BACKTICK\";\n /**\n * Used for miscellaneous characters; it can vary by keyboard.\n * For the US standard keyboard, the '[{' key\n */\n KeyCode[KeyCode[\"US_OPEN_SQUARE_BRACKET\"] = 87] = \"US_OPEN_SQUARE_BRACKET\";\n /**\n * Used for miscellaneous characters; it can vary by keyboard.\n * For the US standard keyboard, the '\\|' key\n */\n KeyCode[KeyCode[\"US_BACKSLASH\"] = 88] = \"US_BACKSLASH\";\n /**\n * Used for miscellaneous characters; it can vary by keyboard.\n * For the US standard keyboard, the ']}' key\n */\n KeyCode[KeyCode[\"US_CLOSE_SQUARE_BRACKET\"] = 89] = \"US_CLOSE_SQUARE_BRACKET\";\n /**\n * Used for miscellaneous characters; it can vary by keyboard.\n * For the US standard keyboard, the ''\"' key\n */\n KeyCode[KeyCode[\"US_QUOTE\"] = 90] = \"US_QUOTE\";\n /**\n * Used for miscellaneous characters; it can vary by keyboard.\n */\n KeyCode[KeyCode[\"OEM_8\"] = 91] = \"OEM_8\";\n /**\n * Either the angle bracket key or the backslash key on the RT 102-key keyboard.\n */\n KeyCode[KeyCode[\"OEM_102\"] = 92] = \"OEM_102\";\n KeyCode[KeyCode[\"NUMPAD_0\"] = 93] = \"NUMPAD_0\";\n KeyCode[KeyCode[\"NUMPAD_1\"] = 94] = \"NUMPAD_1\";\n KeyCode[KeyCode[\"NUMPAD_2\"] = 95] = \"NUMPAD_2\";\n KeyCode[KeyCode[\"NUMPAD_3\"] = 96] = \"NUMPAD_3\";\n KeyCode[KeyCode[\"NUMPAD_4\"] = 97] = \"NUMPAD_4\";\n KeyCode[KeyCode[\"NUMPAD_5\"] = 98] = \"NUMPAD_5\";\n KeyCode[KeyCode[\"NUMPAD_6\"] = 99] = \"NUMPAD_6\";\n KeyCode[KeyCode[\"NUMPAD_7\"] = 100] = \"NUMPAD_7\";\n KeyCode[KeyCode[\"NUMPAD_8\"] = 101] = \"NUMPAD_8\";\n KeyCode[KeyCode[\"NUMPAD_9\"] = 102] = \"NUMPAD_9\";\n KeyCode[KeyCode[\"NUMPAD_MULTIPLY\"] = 103] = \"NUMPAD_MULTIPLY\";\n KeyCode[KeyCode[\"NUMPAD_ADD\"] = 104] = \"NUMPAD_ADD\";\n KeyCode[KeyCode[\"NUMPAD_SEPARATOR\"] = 105] = \"NUMPAD_SEPARATOR\";\n KeyCode[KeyCode[\"NUMPAD_SUBTRACT\"] = 106] = \"NUMPAD_SUBTRACT\";\n KeyCode[KeyCode[\"NUMPAD_DECIMAL\"] = 107] = \"NUMPAD_DECIMAL\";\n KeyCode[KeyCode[\"NUMPAD_DIVIDE\"] = 108] = \"NUMPAD_DIVIDE\";\n /**\n * Cover all key codes when IME is processing input.\n */\n KeyCode[KeyCode[\"KEY_IN_COMPOSITION\"] = 109] = \"KEY_IN_COMPOSITION\";\n KeyCode[KeyCode[\"ABNT_C1\"] = 110] = \"ABNT_C1\";\n KeyCode[KeyCode[\"ABNT_C2\"] = 111] = \"ABNT_C2\";\n /**\n * Placed last to cover the length of the enum.\n * Please do not depend on this value!\n */\n KeyCode[KeyCode[\"MAX_VALUE\"] = 112] = \"MAX_VALUE\";\n})(KeyCode || (KeyCode = {}));\nexport function createMonacoBaseAPI() {\n return {\n editor: undefined,\n languages: undefined,\n CancellationTokenSource: CancellationTokenSource,\n Emitter: Emitter,\n KeyCode: KeyCode,\n KeyMod: KeyMod,\n Position: Position,\n Range: Range,\n Selection: Selection,\n SelectionDirection: SelectionDirection,\n MarkerSeverity: MarkerSeverity,\n MarkerTag: MarkerTag,\n Promise: TPromise,\n Uri: URI,\n Token: Token\n };\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport * as nls from '../../../nls';\nimport { Disposable } from '../../../base/common/lifecycle';\nimport { Event, Emitter } from '../../../base/common/event';\nimport { IntervalTimer } from '../../../base/common/async';\nvar AbstractKeybindingService = /** @class */ (function (_super) {\n __extends(AbstractKeybindingService, _super);\n function AbstractKeybindingService(contextKeyService, commandService, telemetryService, notificationService, statusService) {\n var _this = _super.call(this) || this;\n _this._contextKeyService = contextKeyService;\n _this._commandService = commandService;\n _this._telemetryService = telemetryService;\n _this._statusService = statusService;\n _this._notificationService = notificationService;\n _this._currentChord = null;\n _this._currentChordChecker = new IntervalTimer();\n _this._currentChordStatusMessage = null;\n _this._onDidUpdateKeybindings = _this._register(new Emitter());\n return _this;\n }\n AbstractKeybindingService.prototype.dispose = function () {\n _super.prototype.dispose.call(this);\n };\n Object.defineProperty(AbstractKeybindingService.prototype, \"onDidUpdateKeybindings\", {\n get: function () {\n return this._onDidUpdateKeybindings ? this._onDidUpdateKeybindings.event : Event.None; // Sinon stubbing walks properties on prototype\n },\n enumerable: true,\n configurable: true\n });\n AbstractKeybindingService.prototype.lookupKeybinding = function (commandId) {\n var result = this._getResolver().lookupPrimaryKeybinding(commandId);\n if (!result) {\n return null;\n }\n return result.resolvedKeybinding;\n };\n AbstractKeybindingService.prototype._enterChordMode = function (firstPart, keypressLabel) {\n var _this = this;\n this._currentChord = {\n keypress: firstPart,\n label: keypressLabel\n };\n if (this._statusService) {\n this._currentChordStatusMessage = this._statusService.setStatusMessage(nls.localize('first.chord', \"({0}) was pressed. Waiting for second key of chord...\", keypressLabel));\n }\n var chordEnterTime = Date.now();\n this._currentChordChecker.cancelAndSet(function () {\n if (!_this._documentHasFocus()) {\n // Focus has been lost => leave chord mode\n _this._leaveChordMode();\n return;\n }\n if (Date.now() - chordEnterTime > 5000) {\n // 5 seconds elapsed => leave chord mode\n _this._leaveChordMode();\n }\n }, 500);\n };\n AbstractKeybindingService.prototype._leaveChordMode = function () {\n if (this._currentChordStatusMessage) {\n this._currentChordStatusMessage.dispose();\n this._currentChordStatusMessage = null;\n }\n this._currentChordChecker.cancel();\n this._currentChord = null;\n };\n AbstractKeybindingService.prototype._dispatch = function (e, target) {\n var _this = this;\n var shouldPreventDefault = false;\n var keybinding = this.resolveKeyboardEvent(e);\n if (keybinding.isChord()) {\n console.warn('Unexpected keyboard event mapped to a chord');\n return null;\n }\n var firstPart = keybinding.getDispatchParts()[0];\n if (firstPart === null) {\n // cannot be dispatched, probably only modifier keys\n return shouldPreventDefault;\n }\n var contextValue = this._contextKeyService.getContext(target);\n var currentChord = this._currentChord ? this._currentChord.keypress : null;\n var keypressLabel = keybinding.getLabel();\n var resolveResult = this._getResolver().resolve(contextValue, currentChord, firstPart);\n if (resolveResult && resolveResult.enterChord) {\n shouldPreventDefault = true;\n this._enterChordMode(firstPart, keypressLabel);\n return shouldPreventDefault;\n }\n if (this._statusService && this._currentChord) {\n if (!resolveResult || !resolveResult.commandId) {\n this._statusService.setStatusMessage(nls.localize('missing.chord', \"The key combination ({0}, {1}) is not a command.\", this._currentChord.label, keypressLabel), 10 * 1000 /* 10s */);\n shouldPreventDefault = true;\n }\n }\n this._leaveChordMode();\n if (resolveResult && resolveResult.commandId) {\n if (!resolveResult.bubble) {\n shouldPreventDefault = true;\n }\n if (typeof resolveResult.commandArgs === 'undefined') {\n this._commandService.executeCommand(resolveResult.commandId).done(undefined, function (err) { return _this._notificationService.warn(err); });\n }\n else {\n this._commandService.executeCommand(resolveResult.commandId, resolveResult.commandArgs).done(undefined, function (err) { return _this._notificationService.warn(err); });\n }\n /* __GDPR__\n \"workbenchActionExecuted\" : {\n \"id\" : { \"classification\": \"SystemMetaData\", \"purpose\": \"FeatureInsight\" },\n \"from\": { \"classification\": \"SystemMetaData\", \"purpose\": \"FeatureInsight\" }\n }\n */\n this._telemetryService.publicLog('workbenchActionExecuted', { id: resolveResult.commandId, from: 'keybinding' });\n }\n return shouldPreventDefault;\n };\n return AbstractKeybindingService;\n}(Disposable));\nexport { AbstractKeybindingService };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { ResolvedKeybinding, ResolvedKeybindingPart, KeyCodeUtils } from '../../../base/common/keyCodes';\nimport { UILabelProvider, AriaLabelProvider } from '../../../base/common/keybindingLabels';\n/**\n * Do not instantiate. Use KeybindingService to get a ResolvedKeybinding seeded with information about the current kb layout.\n */\nvar USLayoutResolvedKeybinding = /** @class */ (function (_super) {\n __extends(USLayoutResolvedKeybinding, _super);\n function USLayoutResolvedKeybinding(actual, OS) {\n var _this = _super.call(this) || this;\n _this._os = OS;\n if (actual === null) {\n throw new Error(\"Invalid USLayoutResolvedKeybinding\");\n }\n else if (actual.type === 2 /* Chord */) {\n _this._firstPart = actual.firstPart;\n _this._chordPart = actual.chordPart;\n }\n else {\n _this._firstPart = actual;\n _this._chordPart = null;\n }\n return _this;\n }\n USLayoutResolvedKeybinding.prototype._keyCodeToUILabel = function (keyCode) {\n if (this._os === 2 /* Macintosh */) {\n switch (keyCode) {\n case 15 /* LeftArrow */:\n return '←';\n case 16 /* UpArrow */:\n return '↑';\n case 17 /* RightArrow */:\n return '→';\n case 18 /* DownArrow */:\n return '↓';\n }\n }\n return KeyCodeUtils.toString(keyCode);\n };\n USLayoutResolvedKeybinding.prototype._getUILabelForKeybinding = function (keybinding) {\n if (!keybinding) {\n return null;\n }\n if (keybinding.isDuplicateModifierCase()) {\n return '';\n }\n return this._keyCodeToUILabel(keybinding.keyCode);\n };\n USLayoutResolvedKeybinding.prototype.getLabel = function () {\n var firstPart = this._getUILabelForKeybinding(this._firstPart);\n var chordPart = this._getUILabelForKeybinding(this._chordPart);\n return UILabelProvider.toLabel(this._firstPart, firstPart, this._chordPart, chordPart, this._os);\n };\n USLayoutResolvedKeybinding.prototype._getAriaLabelForKeybinding = function (keybinding) {\n if (!keybinding) {\n return null;\n }\n if (keybinding.isDuplicateModifierCase()) {\n return '';\n }\n return KeyCodeUtils.toString(keybinding.keyCode);\n };\n USLayoutResolvedKeybinding.prototype.getAriaLabel = function () {\n var firstPart = this._getAriaLabelForKeybinding(this._firstPart);\n var chordPart = this._getAriaLabelForKeybinding(this._chordPart);\n return AriaLabelProvider.toLabel(this._firstPart, firstPart, this._chordPart, chordPart, this._os);\n };\n USLayoutResolvedKeybinding.prototype.isChord = function () {\n return (this._chordPart ? true : false);\n };\n USLayoutResolvedKeybinding.prototype.getParts = function () {\n return [\n this._toResolvedKeybindingPart(this._firstPart),\n this._toResolvedKeybindingPart(this._chordPart)\n ];\n };\n USLayoutResolvedKeybinding.prototype._toResolvedKeybindingPart = function (keybinding) {\n if (!keybinding) {\n return null;\n }\n return new ResolvedKeybindingPart(keybinding.ctrlKey, keybinding.shiftKey, keybinding.altKey, keybinding.metaKey, this._getUILabelForKeybinding(keybinding), this._getAriaLabelForKeybinding(keybinding));\n };\n USLayoutResolvedKeybinding.prototype.getDispatchParts = function () {\n var firstPart = this._firstPart ? USLayoutResolvedKeybinding.getDispatchStr(this._firstPart) : null;\n var chordPart = this._chordPart ? USLayoutResolvedKeybinding.getDispatchStr(this._chordPart) : null;\n return [firstPart, chordPart];\n };\n USLayoutResolvedKeybinding.getDispatchStr = function (keybinding) {\n if (keybinding.isModifierKey()) {\n return null;\n }\n var result = '';\n if (keybinding.ctrlKey) {\n result += 'ctrl+';\n }\n if (keybinding.shiftKey) {\n result += 'shift+';\n }\n if (keybinding.altKey) {\n result += 'alt+';\n }\n if (keybinding.metaKey) {\n result += 'meta+';\n }\n result += KeyCodeUtils.toString(keybinding.keyCode);\n return result;\n };\n return USLayoutResolvedKeybinding;\n}(ResolvedKeybinding));\nexport { USLayoutResolvedKeybinding };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport { ContextKeyAndExpr } from '../../contextkey/common/contextkey';\nvar KeybindingResolver = /** @class */ (function () {\n function KeybindingResolver(defaultKeybindings, overrides) {\n this._defaultKeybindings = defaultKeybindings;\n this._defaultBoundCommands = new Map();\n for (var i = 0, len = defaultKeybindings.length; i < len; i++) {\n var command = defaultKeybindings[i].command;\n this._defaultBoundCommands.set(command, true);\n }\n this._map = new Map();\n this._lookupMap = new Map();\n this._keybindings = KeybindingResolver.combine(defaultKeybindings, overrides);\n for (var i = 0, len = this._keybindings.length; i < len; i++) {\n var k = this._keybindings[i];\n if (k.keypressFirstPart === null) {\n // unbound\n continue;\n }\n this._addKeyPress(k.keypressFirstPart, k);\n }\n }\n KeybindingResolver._isTargetedForRemoval = function (defaultKb, keypressFirstPart, keypressChordPart, command, when) {\n if (defaultKb.command !== command) {\n return false;\n }\n if (keypressFirstPart && defaultKb.keypressFirstPart !== keypressFirstPart) {\n return false;\n }\n if (keypressChordPart && defaultKb.keypressChordPart !== keypressChordPart) {\n return false;\n }\n if (when) {\n if (!defaultKb.when) {\n return false;\n }\n if (!when.equals(defaultKb.when)) {\n return false;\n }\n }\n return true;\n };\n /**\n * Looks for rules containing -command in `overrides` and removes them directly from `defaults`.\n */\n KeybindingResolver.combine = function (defaults, rawOverrides) {\n defaults = defaults.slice(0);\n var overrides = [];\n for (var i = 0, len = rawOverrides.length; i < len; i++) {\n var override = rawOverrides[i];\n if (!override.command || override.command.length === 0 || override.command.charAt(0) !== '-') {\n overrides.push(override);\n continue;\n }\n var command = override.command.substr(1);\n var keypressFirstPart = override.keypressFirstPart;\n var keypressChordPart = override.keypressChordPart;\n var when = override.when;\n for (var j = defaults.length - 1; j >= 0; j--) {\n if (this._isTargetedForRemoval(defaults[j], keypressFirstPart, keypressChordPart, command, when)) {\n defaults.splice(j, 1);\n }\n }\n }\n return defaults.concat(overrides);\n };\n KeybindingResolver.prototype._addKeyPress = function (keypress, item) {\n var conflicts = this._map.get(keypress);\n if (typeof conflicts === 'undefined') {\n // There is no conflict so far\n this._map.set(keypress, [item]);\n this._addToLookupMap(item);\n return;\n }\n for (var i = conflicts.length - 1; i >= 0; i--) {\n var conflict = conflicts[i];\n if (conflict.command === item.command) {\n continue;\n }\n var conflictIsChord = (conflict.keypressChordPart !== null);\n var itemIsChord = (item.keypressChordPart !== null);\n if (conflictIsChord && itemIsChord && conflict.keypressChordPart !== item.keypressChordPart) {\n // The conflict only shares the chord start with this command\n continue;\n }\n if (KeybindingResolver.whenIsEntirelyIncluded(conflict.when, item.when)) {\n // `item` completely overwrites `conflict`\n // Remove conflict from the lookupMap\n this._removeFromLookupMap(conflict);\n }\n }\n conflicts.push(item);\n this._addToLookupMap(item);\n };\n KeybindingResolver.prototype._addToLookupMap = function (item) {\n if (!item.command) {\n return;\n }\n var arr = this._lookupMap.get(item.command);\n if (typeof arr === 'undefined') {\n arr = [item];\n this._lookupMap.set(item.command, arr);\n }\n else {\n arr.push(item);\n }\n };\n KeybindingResolver.prototype._removeFromLookupMap = function (item) {\n var arr = this._lookupMap.get(item.command);\n if (typeof arr === 'undefined') {\n return;\n }\n for (var i = 0, len = arr.length; i < len; i++) {\n if (arr[i] === item) {\n arr.splice(i, 1);\n return;\n }\n }\n };\n /**\n * Returns true if it is provable `a` implies `b`.\n * **Precondition**: Assumes `a` and `b` are normalized!\n */\n KeybindingResolver.whenIsEntirelyIncluded = function (a, b) {\n if (!b) {\n return true;\n }\n if (!a) {\n return false;\n }\n var aExpressions = ((a instanceof ContextKeyAndExpr) ? a.expr : [a]);\n var bExpressions = ((b instanceof ContextKeyAndExpr) ? b.expr : [b]);\n var aIndex = 0;\n for (var bIndex = 0; bIndex < bExpressions.length; bIndex++) {\n var bExpr = bExpressions[bIndex];\n var bExprMatched = false;\n while (!bExprMatched && aIndex < aExpressions.length) {\n var aExpr = aExpressions[aIndex];\n if (aExpr.equals(bExpr)) {\n bExprMatched = true;\n }\n aIndex++;\n }\n if (!bExprMatched) {\n return false;\n }\n }\n return true;\n };\n KeybindingResolver.prototype.lookupPrimaryKeybinding = function (commandId) {\n var items = this._lookupMap.get(commandId);\n if (typeof items === 'undefined' || items.length === 0) {\n return null;\n }\n return items[items.length - 1];\n };\n KeybindingResolver.prototype.resolve = function (context, currentChord, keypress) {\n var lookupMap = null;\n if (currentChord !== null) {\n // Fetch all chord bindings for `currentChord`\n var candidates = this._map.get(currentChord);\n if (typeof candidates === 'undefined') {\n // No chords starting with `currentChord`\n return null;\n }\n lookupMap = [];\n for (var i = 0, len = candidates.length; i < len; i++) {\n var candidate = candidates[i];\n if (candidate.keypressChordPart === keypress) {\n lookupMap.push(candidate);\n }\n }\n }\n else {\n var candidates = this._map.get(keypress);\n if (typeof candidates === 'undefined') {\n // No bindings with `keypress`\n return null;\n }\n lookupMap = candidates;\n }\n var result = this._findCommand(context, lookupMap);\n if (!result) {\n return null;\n }\n if (currentChord === null && result.keypressChordPart !== null) {\n return {\n enterChord: true,\n commandId: null,\n commandArgs: null,\n bubble: false\n };\n }\n return {\n enterChord: false,\n commandId: result.command,\n commandArgs: result.commandArgs,\n bubble: result.bubble\n };\n };\n KeybindingResolver.prototype._findCommand = function (context, matches) {\n for (var i = matches.length - 1; i >= 0; i--) {\n var k = matches[i];\n if (!KeybindingResolver.contextMatchesRules(context, k.when)) {\n continue;\n }\n return k;\n }\n return null;\n };\n KeybindingResolver.contextMatchesRules = function (context, rules) {\n if (!rules) {\n return true;\n }\n return rules.evaluate(context);\n };\n return KeybindingResolver;\n}());\nexport { KeybindingResolver };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { ResourceMap } from '../../../base/common/map';\nimport * as arrays from '../../../base/common/arrays';\nimport * as types from '../../../base/common/types';\nimport * as objects from '../../../base/common/objects';\nimport { OVERRIDE_PROPERTY_PATTERN } from './configurationRegistry';\nimport { overrideIdentifierFromKey, addToValueTree, toValuesTree, getConfigurationValue, getDefaultValues, getConfigurationKeys, removeFromValueTree } from './configuration';\nvar ConfigurationModel = /** @class */ (function () {\n function ConfigurationModel(_contents, _keys, _overrides) {\n if (_contents === void 0) { _contents = {}; }\n if (_keys === void 0) { _keys = []; }\n if (_overrides === void 0) { _overrides = []; }\n this._contents = _contents;\n this._keys = _keys;\n this._overrides = _overrides;\n this.isFrozen = false;\n }\n Object.defineProperty(ConfigurationModel.prototype, \"contents\", {\n get: function () {\n return this.checkAndFreeze(this._contents);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ConfigurationModel.prototype, \"overrides\", {\n get: function () {\n return this.checkAndFreeze(this._overrides);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ConfigurationModel.prototype, \"keys\", {\n get: function () {\n return this.checkAndFreeze(this._keys);\n },\n enumerable: true,\n configurable: true\n });\n ConfigurationModel.prototype.getValue = function (section) {\n return section ? getConfigurationValue(this.contents, section) : this.contents;\n };\n ConfigurationModel.prototype.override = function (identifier) {\n var overrideContents = this.getContentsForOverrideIdentifer(identifier);\n if (!overrideContents || typeof overrideContents !== 'object' || !Object.keys(overrideContents).length) {\n // If there are no valid overrides, return self\n return this;\n }\n var contents = {};\n for (var _i = 0, _a = arrays.distinct(Object.keys(this.contents).concat(Object.keys(overrideContents))); _i < _a.length; _i++) {\n var key = _a[_i];\n var contentsForKey = this.contents[key];\n var overrideContentsForKey = overrideContents[key];\n // If there are override contents for the key, clone and merge otherwise use base contents\n if (overrideContentsForKey) {\n // Clone and merge only if base contents and override contents are of type object otherwise just override\n if (typeof contentsForKey === 'object' && typeof overrideContentsForKey === 'object') {\n contentsForKey = objects.deepClone(contentsForKey);\n this.mergeContents(contentsForKey, overrideContentsForKey);\n }\n else {\n contentsForKey = overrideContentsForKey;\n }\n }\n contents[key] = contentsForKey;\n }\n return new ConfigurationModel(contents);\n };\n ConfigurationModel.prototype.merge = function () {\n var others = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n others[_i] = arguments[_i];\n }\n var contents = objects.deepClone(this.contents);\n var overrides = objects.deepClone(this.overrides);\n var keys = this.keys.slice();\n for (var _a = 0, others_1 = others; _a < others_1.length; _a++) {\n var other = others_1[_a];\n this.mergeContents(contents, other.contents);\n var _loop_1 = function (otherOverride) {\n var override = overrides.filter(function (o) { return arrays.equals(o.identifiers, otherOverride.identifiers); })[0];\n if (override) {\n this_1.mergeContents(override.contents, otherOverride.contents);\n }\n else {\n overrides.push(objects.deepClone(otherOverride));\n }\n };\n var this_1 = this;\n for (var _b = 0, _c = other.overrides; _b < _c.length; _b++) {\n var otherOverride = _c[_b];\n _loop_1(otherOverride);\n }\n for (var _d = 0, _e = other.keys; _d < _e.length; _d++) {\n var key = _e[_d];\n if (keys.indexOf(key) === -1) {\n keys.push(key);\n }\n }\n }\n return new ConfigurationModel(contents, keys, overrides);\n };\n ConfigurationModel.prototype.freeze = function () {\n this.isFrozen = true;\n return this;\n };\n ConfigurationModel.prototype.mergeContents = function (source, target) {\n for (var _i = 0, _a = Object.keys(target); _i < _a.length; _i++) {\n var key = _a[_i];\n if (key in source) {\n if (types.isObject(source[key]) && types.isObject(target[key])) {\n this.mergeContents(source[key], target[key]);\n continue;\n }\n }\n source[key] = objects.deepClone(target[key]);\n }\n };\n ConfigurationModel.prototype.checkAndFreeze = function (data) {\n if (this.isFrozen && !Object.isFrozen(data)) {\n return objects.deepFreeze(data);\n }\n return data;\n };\n ConfigurationModel.prototype.getContentsForOverrideIdentifer = function (identifier) {\n for (var _i = 0, _a = this.overrides; _i < _a.length; _i++) {\n var override = _a[_i];\n if (override.identifiers.indexOf(identifier) !== -1) {\n return override.contents;\n }\n }\n return null;\n };\n ConfigurationModel.prototype.toJSON = function () {\n return {\n contents: this.contents,\n overrides: this.overrides,\n keys: this.keys\n };\n };\n // Update methods\n ConfigurationModel.prototype.setValue = function (key, value) {\n this.addKey(key);\n addToValueTree(this.contents, key, value, function (e) { throw new Error(e); });\n };\n ConfigurationModel.prototype.removeValue = function (key) {\n if (this.removeKey(key)) {\n removeFromValueTree(this.contents, key);\n }\n };\n ConfigurationModel.prototype.addKey = function (key) {\n var index = this.keys.length;\n for (var i = 0; i < index; i++) {\n if (key.indexOf(this.keys[i]) === 0) {\n index = i;\n }\n }\n this.keys.splice(index, 1, key);\n };\n ConfigurationModel.prototype.removeKey = function (key) {\n var index = this.keys.indexOf(key);\n if (index !== -1) {\n this.keys.splice(index, 1);\n return true;\n }\n return false;\n };\n return ConfigurationModel;\n}());\nexport { ConfigurationModel };\nvar DefaultConfigurationModel = /** @class */ (function (_super) {\n __extends(DefaultConfigurationModel, _super);\n function DefaultConfigurationModel() {\n var _this = this;\n var contents = getDefaultValues();\n var keys = getConfigurationKeys();\n var overrides = [];\n for (var _i = 0, _a = Object.keys(contents); _i < _a.length; _i++) {\n var key = _a[_i];\n if (OVERRIDE_PROPERTY_PATTERN.test(key)) {\n overrides.push({\n identifiers: [overrideIdentifierFromKey(key).trim()],\n contents: toValuesTree(contents[key], function (message) { return console.error(\"Conflict in default settings file: \" + message); })\n });\n }\n }\n _this = _super.call(this, contents, keys, overrides) || this;\n return _this;\n }\n return DefaultConfigurationModel;\n}(ConfigurationModel));\nexport { DefaultConfigurationModel };\nvar Configuration = /** @class */ (function () {\n function Configuration(_defaultConfiguration, _userConfiguration, _workspaceConfiguration, _folderConfigurations, _memoryConfiguration, _memoryConfigurationByResource, _freeze) {\n if (_workspaceConfiguration === void 0) { _workspaceConfiguration = new ConfigurationModel(); }\n if (_folderConfigurations === void 0) { _folderConfigurations = new ResourceMap(); }\n if (_memoryConfiguration === void 0) { _memoryConfiguration = new ConfigurationModel(); }\n if (_memoryConfigurationByResource === void 0) { _memoryConfigurationByResource = new ResourceMap(); }\n if (_freeze === void 0) { _freeze = true; }\n this._defaultConfiguration = _defaultConfiguration;\n this._userConfiguration = _userConfiguration;\n this._workspaceConfiguration = _workspaceConfiguration;\n this._folderConfigurations = _folderConfigurations;\n this._memoryConfiguration = _memoryConfiguration;\n this._memoryConfigurationByResource = _memoryConfigurationByResource;\n this._freeze = _freeze;\n this._workspaceConsolidatedConfiguration = null;\n this._foldersConsolidatedConfigurations = new ResourceMap();\n }\n Configuration.prototype.getValue = function (section, overrides, workspace) {\n var consolidateConfigurationModel = this.getConsolidateConfigurationModel(overrides, workspace);\n return consolidateConfigurationModel.getValue(section);\n };\n Configuration.prototype.updateValue = function (key, value, overrides) {\n if (overrides === void 0) { overrides = {}; }\n var memoryConfiguration;\n if (overrides.resource) {\n memoryConfiguration = this._memoryConfigurationByResource.get(overrides.resource);\n if (!memoryConfiguration) {\n memoryConfiguration = new ConfigurationModel();\n this._memoryConfigurationByResource.set(overrides.resource, memoryConfiguration);\n }\n }\n else {\n memoryConfiguration = this._memoryConfiguration;\n }\n if (value === void 0) {\n memoryConfiguration.removeValue(key);\n }\n else {\n memoryConfiguration.setValue(key, value);\n }\n if (!overrides.resource) {\n this._workspaceConsolidatedConfiguration = null;\n }\n };\n Configuration.prototype.getConsolidateConfigurationModel = function (overrides, workspace) {\n var configurationModel = this.getConsolidatedConfigurationModelForResource(overrides, workspace);\n return overrides.overrideIdentifier ? configurationModel.override(overrides.overrideIdentifier) : configurationModel;\n };\n Configuration.prototype.getConsolidatedConfigurationModelForResource = function (_a, workspace) {\n var resource = _a.resource;\n var consolidateConfiguration = this.getWorkspaceConsolidatedConfiguration();\n if (workspace && resource) {\n var root = workspace.getFolder(resource);\n if (root) {\n consolidateConfiguration = this.getFolderConsolidatedConfiguration(root.uri) || consolidateConfiguration;\n }\n var memoryConfigurationForResource = this._memoryConfigurationByResource.get(resource);\n if (memoryConfigurationForResource) {\n consolidateConfiguration = consolidateConfiguration.merge(memoryConfigurationForResource);\n }\n }\n return consolidateConfiguration;\n };\n Configuration.prototype.getWorkspaceConsolidatedConfiguration = function () {\n if (!this._workspaceConsolidatedConfiguration) {\n this._workspaceConsolidatedConfiguration = this._defaultConfiguration.merge(this._userConfiguration, this._workspaceConfiguration, this._memoryConfiguration);\n if (this._freeze) {\n this._workspaceConfiguration = this._workspaceConfiguration.freeze();\n }\n }\n return this._workspaceConsolidatedConfiguration;\n };\n Configuration.prototype.getFolderConsolidatedConfiguration = function (folder) {\n var folderConsolidatedConfiguration = this._foldersConsolidatedConfigurations.get(folder);\n if (!folderConsolidatedConfiguration) {\n var workspaceConsolidateConfiguration = this.getWorkspaceConsolidatedConfiguration();\n var folderConfiguration = this._folderConfigurations.get(folder);\n if (folderConfiguration) {\n folderConsolidatedConfiguration = workspaceConsolidateConfiguration.merge(folderConfiguration);\n if (this._freeze) {\n folderConsolidatedConfiguration = folderConsolidatedConfiguration.freeze();\n }\n this._foldersConsolidatedConfigurations.set(folder, folderConsolidatedConfiguration);\n }\n else {\n folderConsolidatedConfiguration = workspaceConsolidateConfiguration;\n }\n }\n return folderConsolidatedConfiguration;\n };\n return Configuration;\n}());\nexport { Configuration };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __param = (this && this.__param) || function (paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n};\nimport { Emitter } from '../../../base/common/event';\nimport { dispose } from '../../../base/common/lifecycle';\nimport { IContextKeyService } from '../../contextkey/common/contextkey';\nimport { MenuRegistry, MenuItemAction, SubmenuItemAction, isIMenuItem } from './actions';\nimport { ICommandService } from '../../commands/common/commands';\nvar Menu = /** @class */ (function () {\n function Menu(id, startupSignal, _commandService, _contextKeyService) {\n var _this = this;\n this._commandService = _commandService;\n this._contextKeyService = _contextKeyService;\n this._menuGroups = [];\n this._disposables = [];\n this._onDidChange = new Emitter();\n startupSignal.then(function (_) {\n var menuItems = MenuRegistry.getMenuItems(id);\n var keysFilter = new Set();\n var group;\n menuItems.sort(Menu._compareMenuItems);\n for (var _i = 0, menuItems_1 = menuItems; _i < menuItems_1.length; _i++) {\n var item = menuItems_1[_i];\n // group by groupId\n var groupName = item.group;\n if (!group || group[0] !== groupName) {\n group = [groupName, []];\n _this._menuGroups.push(group);\n }\n group[1].push(item);\n // keep keys for eventing\n Menu._fillInKbExprKeys(item.when, keysFilter);\n }\n // subscribe to context changes\n _this._disposables.push(_this._contextKeyService.onDidChangeContext(function (event) {\n if (event.affectsSome(keysFilter)) {\n _this._onDidChange.fire();\n }\n }));\n _this._onDidChange.fire(_this);\n });\n }\n Menu.prototype.dispose = function () {\n this._disposables = dispose(this._disposables);\n this._onDidChange.dispose();\n };\n Menu.prototype.getActions = function (options) {\n var result = [];\n for (var _i = 0, _a = this._menuGroups; _i < _a.length; _i++) {\n var group = _a[_i];\n var id = group[0], items = group[1];\n var activeActions = [];\n for (var _b = 0, items_1 = items; _b < items_1.length; _b++) {\n var item = items_1[_b];\n if (this._contextKeyService.contextMatchesRules(item.when)) {\n var action = isIMenuItem(item) ? new MenuItemAction(item.command, item.alt, options, this._contextKeyService, this._commandService) : new SubmenuItemAction(item);\n action.order = item.order; //TODO@Ben order is menu item property, not an action property\n activeActions.push(action);\n }\n }\n if (activeActions.length > 0) {\n result.push([id, activeActions]);\n }\n }\n return result;\n };\n Menu._fillInKbExprKeys = function (exp, set) {\n if (exp) {\n for (var _i = 0, _a = exp.keys(); _i < _a.length; _i++) {\n var key = _a[_i];\n set.add(key);\n }\n }\n };\n Menu._compareMenuItems = function (a, b) {\n var aGroup = a.group;\n var bGroup = b.group;\n if (aGroup !== bGroup) {\n // Falsy groups come last\n if (!aGroup) {\n return 1;\n }\n else if (!bGroup) {\n return -1;\n }\n // 'navigation' group comes first\n if (aGroup === 'navigation') {\n return -1;\n }\n else if (bGroup === 'navigation') {\n return 1;\n }\n // lexical sort for groups\n var value = aGroup.localeCompare(bGroup);\n if (value !== 0) {\n return value;\n }\n }\n // sort on priority - default is 0\n var aPrio = a.order || 0;\n var bPrio = b.order || 0;\n if (aPrio < bPrio) {\n return -1;\n }\n else if (aPrio > bPrio) {\n return 1;\n }\n // sort on titles\n var aTitle = typeof a.command.title === 'string' ? a.command.title : a.command.title.value;\n var bTitle = typeof b.command.title === 'string' ? b.command.title : b.command.title.value;\n return aTitle.localeCompare(bTitle);\n };\n Menu = __decorate([\n __param(2, ICommandService),\n __param(3, IContextKeyService)\n ], Menu);\n return Menu;\n}());\nexport { Menu };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar ResolvedKeybindingItem = /** @class */ (function () {\n function ResolvedKeybindingItem(resolvedKeybinding, command, commandArgs, when, isDefault) {\n this.resolvedKeybinding = resolvedKeybinding;\n if (resolvedKeybinding) {\n var _a = resolvedKeybinding.getDispatchParts(), keypressFirstPart = _a[0], keypressChordPart = _a[1];\n this.keypressFirstPart = keypressFirstPart;\n this.keypressChordPart = keypressChordPart;\n }\n else {\n this.keypressFirstPart = null;\n this.keypressChordPart = null;\n }\n this.bubble = (command ? command.charCodeAt(0) === 94 /* Caret */ : false);\n this.command = this.bubble ? command.substr(1) : command;\n this.commandArgs = commandArgs;\n this.when = when;\n this.isDefault = isDefault;\n }\n return ResolvedKeybindingItem;\n}());\nexport { ResolvedKeybindingItem };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport Severity from '../../../base/common/severity';\nimport URI from '../../../base/common/uri';\nimport { TPromise } from '../../../base/common/winjs.base';\nimport { CommandsRegistry } from '../../../platform/commands/common/commands';\nimport { AbstractKeybindingService } from '../../../platform/keybinding/common/abstractKeybindingService';\nimport { USLayoutResolvedKeybinding } from '../../../platform/keybinding/common/usLayoutResolvedKeybinding';\nimport { KeybindingResolver } from '../../../platform/keybinding/common/keybindingResolver';\nimport { KeybindingSource } from '../../../platform/keybinding/common/keybinding';\nimport { WorkspaceFolder } from '../../../platform/workspace/common/workspace';\nimport { isCodeEditor } from '../../browser/editorBrowser';\nimport { Emitter } from '../../../base/common/event';\nimport { Configuration, DefaultConfigurationModel, ConfigurationModel } from '../../../platform/configuration/common/configurationModels';\nimport { ImmortalReference, combinedDisposable, toDisposable } from '../../../base/common/lifecycle';\nimport * as dom from '../../../base/browser/dom';\nimport { StandardKeyboardEvent } from '../../../base/browser/keyboardEvent';\nimport { KeybindingsRegistry } from '../../../platform/keybinding/common/keybindingsRegistry';\nimport { Menu } from '../../../platform/actions/common/menu';\nimport { createKeybinding, SimpleKeybinding } from '../../../base/common/keyCodes';\nimport { ResolvedKeybindingItem } from '../../../platform/keybinding/common/resolvedKeybindingItem';\nimport { OS } from '../../../base/common/platform';\nimport { Range } from '../../common/core/range';\nimport { NoOpNotification } from '../../../platform/notification/common/notification';\nimport { Position as Pos } from '../../common/core/position';\nimport { isEditorConfigurationKey, isDiffEditorConfigurationKey } from '../../common/config/commonEditorConfig';\nimport { isResourceTextEdit } from '../../common/modes';\nimport { EditOperation } from '../../common/core/editOperation';\nimport { localize } from '../../../nls';\nvar SimpleModel = /** @class */ (function () {\n function SimpleModel(model) {\n this.model = model;\n this._onDispose = new Emitter();\n }\n Object.defineProperty(SimpleModel.prototype, \"textEditorModel\", {\n get: function () {\n return this.model;\n },\n enumerable: true,\n configurable: true\n });\n SimpleModel.prototype.dispose = function () {\n this._onDispose.fire();\n };\n return SimpleModel;\n}());\nexport { SimpleModel };\nfunction withTypedEditor(widget, codeEditorCallback, diffEditorCallback) {\n if (isCodeEditor(widget)) {\n // Single Editor\n return codeEditorCallback(widget);\n }\n else {\n // Diff Editor\n return diffEditorCallback(widget);\n }\n}\nvar SimpleEditorModelResolverService = /** @class */ (function () {\n function SimpleEditorModelResolverService() {\n }\n SimpleEditorModelResolverService.prototype.setEditor = function (editor) {\n this.editor = editor;\n };\n SimpleEditorModelResolverService.prototype.createModelReference = function (resource) {\n var _this = this;\n var model;\n model = withTypedEditor(this.editor, function (editor) { return _this.findModel(editor, resource); }, function (diffEditor) { return _this.findModel(diffEditor.getOriginalEditor(), resource) || _this.findModel(diffEditor.getModifiedEditor(), resource); });\n if (!model) {\n return TPromise.as(new ImmortalReference(null));\n }\n return TPromise.as(new ImmortalReference(new SimpleModel(model)));\n };\n SimpleEditorModelResolverService.prototype.findModel = function (editor, resource) {\n var model = editor.getModel();\n if (model.uri.toString() !== resource.toString()) {\n return null;\n }\n return model;\n };\n return SimpleEditorModelResolverService;\n}());\nexport { SimpleEditorModelResolverService };\nvar SimpleProgressService = /** @class */ (function () {\n function SimpleProgressService() {\n }\n SimpleProgressService.prototype.showWhile = function (promise, delay) {\n return null;\n };\n return SimpleProgressService;\n}());\nexport { SimpleProgressService };\nvar SimpleDialogService = /** @class */ (function () {\n function SimpleDialogService() {\n }\n return SimpleDialogService;\n}());\nexport { SimpleDialogService };\nvar SimpleNotificationService = /** @class */ (function () {\n function SimpleNotificationService() {\n }\n SimpleNotificationService.prototype.info = function (message) {\n return this.notify({ severity: Severity.Info, message: message });\n };\n SimpleNotificationService.prototype.warn = function (message) {\n return this.notify({ severity: Severity.Warning, message: message });\n };\n SimpleNotificationService.prototype.error = function (error) {\n return this.notify({ severity: Severity.Error, message: error });\n };\n SimpleNotificationService.prototype.notify = function (notification) {\n switch (notification.severity) {\n case Severity.Error:\n console.error(notification.message);\n break;\n case Severity.Warning:\n console.warn(notification.message);\n break;\n default:\n console.log(notification.message);\n break;\n }\n return SimpleNotificationService.NO_OP;\n };\n SimpleNotificationService.NO_OP = new NoOpNotification();\n return SimpleNotificationService;\n}());\nexport { SimpleNotificationService };\nvar StandaloneCommandService = /** @class */ (function () {\n function StandaloneCommandService(instantiationService) {\n this._onWillExecuteCommand = new Emitter();\n this._instantiationService = instantiationService;\n this._dynamicCommands = Object.create(null);\n }\n StandaloneCommandService.prototype.addCommand = function (command) {\n var _this = this;\n var id = command.id;\n this._dynamicCommands[id] = command;\n return toDisposable(function () {\n delete _this._dynamicCommands[id];\n });\n };\n StandaloneCommandService.prototype.executeCommand = function (id) {\n var args = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n args[_i - 1] = arguments[_i];\n }\n var command = (CommandsRegistry.getCommand(id) || this._dynamicCommands[id]);\n if (!command) {\n return TPromise.wrapError(new Error(\"command '\" + id + \"' not found\"));\n }\n try {\n this._onWillExecuteCommand.fire({ commandId: id });\n var result = this._instantiationService.invokeFunction.apply(this._instantiationService, [command.handler].concat(args));\n return TPromise.as(result);\n }\n catch (err) {\n return TPromise.wrapError(err);\n }\n };\n return StandaloneCommandService;\n}());\nexport { StandaloneCommandService };\nvar StandaloneKeybindingService = /** @class */ (function (_super) {\n __extends(StandaloneKeybindingService, _super);\n function StandaloneKeybindingService(contextKeyService, commandService, telemetryService, notificationService, domNode) {\n var _this = _super.call(this, contextKeyService, commandService, telemetryService, notificationService) || this;\n _this._cachedResolver = null;\n _this._dynamicKeybindings = [];\n _this._register(dom.addDisposableListener(domNode, dom.EventType.KEY_DOWN, function (e) {\n var keyEvent = new StandardKeyboardEvent(e);\n var shouldPreventDefault = _this._dispatch(keyEvent, keyEvent.target);\n if (shouldPreventDefault) {\n keyEvent.preventDefault();\n }\n }));\n return _this;\n }\n StandaloneKeybindingService.prototype.addDynamicKeybinding = function (commandId, keybinding, handler, when) {\n var _this = this;\n var toDispose = [];\n this._dynamicKeybindings.push({\n keybinding: createKeybinding(keybinding, OS),\n command: commandId,\n when: when,\n weight1: 1000,\n weight2: 0\n });\n toDispose.push(toDisposable(function () {\n for (var i = 0; i < _this._dynamicKeybindings.length; i++) {\n var kb = _this._dynamicKeybindings[i];\n if (kb.command === commandId) {\n _this._dynamicKeybindings.splice(i, 1);\n _this.updateResolver({ source: KeybindingSource.Default });\n return;\n }\n }\n }));\n var commandService = this._commandService;\n if (commandService instanceof StandaloneCommandService) {\n toDispose.push(commandService.addCommand({\n id: commandId,\n handler: handler\n }));\n }\n else {\n throw new Error('Unknown command service!');\n }\n this.updateResolver({ source: KeybindingSource.Default });\n return combinedDisposable(toDispose);\n };\n StandaloneKeybindingService.prototype.updateResolver = function (event) {\n this._cachedResolver = null;\n this._onDidUpdateKeybindings.fire(event);\n };\n StandaloneKeybindingService.prototype._getResolver = function () {\n if (!this._cachedResolver) {\n var defaults = this._toNormalizedKeybindingItems(KeybindingsRegistry.getDefaultKeybindings(), true);\n var overrides = this._toNormalizedKeybindingItems(this._dynamicKeybindings, false);\n this._cachedResolver = new KeybindingResolver(defaults, overrides);\n }\n return this._cachedResolver;\n };\n StandaloneKeybindingService.prototype._documentHasFocus = function () {\n return document.hasFocus();\n };\n StandaloneKeybindingService.prototype._toNormalizedKeybindingItems = function (items, isDefault) {\n var result = [], resultLen = 0;\n for (var i = 0, len = items.length; i < len; i++) {\n var item = items[i];\n var when = (item.when ? item.when.normalize() : null);\n var keybinding = item.keybinding;\n if (!keybinding) {\n // This might be a removal keybinding item in user settings => accept it\n result[resultLen++] = new ResolvedKeybindingItem(null, item.command, item.commandArgs, when, isDefault);\n }\n else {\n var resolvedKeybindings = this.resolveKeybinding(keybinding);\n for (var j = 0; j < resolvedKeybindings.length; j++) {\n result[resultLen++] = new ResolvedKeybindingItem(resolvedKeybindings[j], item.command, item.commandArgs, when, isDefault);\n }\n }\n }\n return result;\n };\n StandaloneKeybindingService.prototype.resolveKeybinding = function (keybinding) {\n return [new USLayoutResolvedKeybinding(keybinding, OS)];\n };\n StandaloneKeybindingService.prototype.resolveKeyboardEvent = function (keyboardEvent) {\n var keybinding = new SimpleKeybinding(keyboardEvent.ctrlKey, keyboardEvent.shiftKey, keyboardEvent.altKey, keyboardEvent.metaKey, keyboardEvent.keyCode);\n return new USLayoutResolvedKeybinding(keybinding, OS);\n };\n return StandaloneKeybindingService;\n}(AbstractKeybindingService));\nexport { StandaloneKeybindingService };\nfunction isConfigurationOverrides(thing) {\n return thing\n && typeof thing === 'object'\n && (!thing.overrideIdentifier || typeof thing.overrideIdentifier === 'string')\n && (!thing.resource || thing.resource instanceof URI);\n}\nvar SimpleConfigurationService = /** @class */ (function () {\n function SimpleConfigurationService() {\n this._onDidChangeConfiguration = new Emitter();\n this.onDidChangeConfiguration = this._onDidChangeConfiguration.event;\n this._configuration = new Configuration(new DefaultConfigurationModel(), new ConfigurationModel());\n }\n SimpleConfigurationService.prototype.configuration = function () {\n return this._configuration;\n };\n SimpleConfigurationService.prototype.getValue = function (arg1, arg2) {\n var section = typeof arg1 === 'string' ? arg1 : void 0;\n var overrides = isConfigurationOverrides(arg1) ? arg1 : isConfigurationOverrides(arg2) ? arg2 : {};\n return this.configuration().getValue(section, overrides, null);\n };\n SimpleConfigurationService.prototype.updateValue = function (key, value, arg3, arg4) {\n this.configuration().updateValue(key, value);\n return TPromise.as(null);\n };\n return SimpleConfigurationService;\n}());\nexport { SimpleConfigurationService };\nvar SimpleResourceConfigurationService = /** @class */ (function () {\n function SimpleResourceConfigurationService(configurationService) {\n var _this = this;\n this.configurationService = configurationService;\n this._onDidChangeConfigurationEmitter = new Emitter();\n this.configurationService.onDidChangeConfiguration(function (e) {\n _this._onDidChangeConfigurationEmitter.fire(e);\n });\n }\n SimpleResourceConfigurationService.prototype.getValue = function (resource, arg2, arg3) {\n var position = Pos.isIPosition(arg2) ? arg2 : null;\n var section = position ? (typeof arg3 === 'string' ? arg3 : void 0) : (typeof arg2 === 'string' ? arg2 : void 0);\n return this.configurationService.getValue(section);\n };\n return SimpleResourceConfigurationService;\n}());\nexport { SimpleResourceConfigurationService };\nvar SimpleMenuService = /** @class */ (function () {\n function SimpleMenuService(commandService) {\n this._commandService = commandService;\n }\n SimpleMenuService.prototype.createMenu = function (id, contextKeyService) {\n return new Menu(id, TPromise.as(true), this._commandService, contextKeyService);\n };\n return SimpleMenuService;\n}());\nexport { SimpleMenuService };\nvar StandaloneTelemetryService = /** @class */ (function () {\n function StandaloneTelemetryService() {\n }\n StandaloneTelemetryService.prototype.publicLog = function (eventName, data) {\n return TPromise.wrap(null);\n };\n return StandaloneTelemetryService;\n}());\nexport { StandaloneTelemetryService };\nvar SimpleWorkspaceContextService = /** @class */ (function () {\n function SimpleWorkspaceContextService() {\n var resource = URI.from({ scheme: SimpleWorkspaceContextService.SCHEME, authority: 'model', path: '/' });\n this.workspace = { id: '4064f6ec-cb38-4ad0-af64-ee6467e63c82', folders: [new WorkspaceFolder({ uri: resource, name: '', index: 0 })], name: resource.fsPath };\n }\n SimpleWorkspaceContextService.prototype.getWorkspace = function () {\n return this.workspace;\n };\n SimpleWorkspaceContextService.prototype.getWorkspaceFolder = function (resource) {\n return resource && resource.scheme === SimpleWorkspaceContextService.SCHEME ? this.workspace.folders[0] : void 0;\n };\n return SimpleWorkspaceContextService;\n}());\nexport { SimpleWorkspaceContextService };\nexport function applyConfigurationValues(configurationService, source, isDiffEditor) {\n if (!source) {\n return;\n }\n if (!(configurationService instanceof SimpleConfigurationService)) {\n return;\n }\n Object.keys(source).forEach(function (key) {\n if (isEditorConfigurationKey(key)) {\n configurationService.updateValue(\"editor.\" + key, source[key]);\n }\n if (isDiffEditor && isDiffEditorConfigurationKey(key)) {\n configurationService.updateValue(\"diffEditor.\" + key, source[key]);\n }\n });\n}\nvar SimpleBulkEditService = /** @class */ (function () {\n function SimpleBulkEditService(_modelService) {\n this._modelService = _modelService;\n //\n }\n SimpleBulkEditService.prototype.apply = function (workspaceEdit, options) {\n var edits = new Map();\n for (var _i = 0, _a = workspaceEdit.edits; _i < _a.length; _i++) {\n var edit = _a[_i];\n if (!isResourceTextEdit(edit)) {\n return TPromise.wrapError(new Error('bad edit - only text edits are supported'));\n }\n var model = this._modelService.getModel(edit.resource);\n if (!model) {\n return TPromise.wrapError(new Error('bad edit - model not found'));\n }\n var array = edits.get(model);\n if (!array) {\n array = [];\n }\n edits.set(model, array.concat(edit.edits));\n }\n var totalEdits = 0;\n var totalFiles = 0;\n edits.forEach(function (edits, model) {\n model.applyEdits(edits.map(function (edit) { return EditOperation.replaceMove(Range.lift(edit.range), edit.text); }));\n totalFiles += 1;\n totalEdits += edits.length;\n });\n return TPromise.as({\n selection: undefined,\n ariaSummary: localize('summary', 'Made {0} edits in {1} files', totalEdits, totalFiles)\n });\n };\n return SimpleBulkEditService;\n}());\nexport { SimpleBulkEditService };\nvar SimpleUriDisplayService = /** @class */ (function () {\n function SimpleUriDisplayService() {\n }\n SimpleUriDisplayService.prototype.getLabel = function (resource, relative) {\n if (resource.scheme === 'file') {\n return resource.fsPath;\n }\n return resource.path;\n };\n return SimpleUriDisplayService;\n}());\nexport { SimpleUriDisplayService };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __param = (this && this.__param) || function (paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n};\nimport { Disposable, combinedDisposable, toDisposable } from '../../../base/common/lifecycle';\nimport { TPromise } from '../../../base/common/winjs.base';\nimport { IContextViewService } from '../../../platform/contextview/browser/contextView';\nimport { IInstantiationService } from '../../../platform/instantiation/common/instantiation';\nimport { CommandsRegistry, ICommandService } from '../../../platform/commands/common/commands';\nimport { IKeybindingService } from '../../../platform/keybinding/common/keybinding';\nimport { ContextKeyExpr, IContextKeyService } from '../../../platform/contextkey/common/contextkey';\nimport { ICodeEditorService } from '../../browser/services/codeEditorService';\nimport { IEditorWorkerService } from '../../common/services/editorWorkerService';\nimport { StandaloneKeybindingService, applyConfigurationValues } from './simpleServices';\nimport { CodeEditorWidget } from '../../browser/widget/codeEditorWidget';\nimport { DiffEditorWidget } from '../../browser/widget/diffEditorWidget';\nimport { IStandaloneThemeService } from '../common/standaloneThemeService';\nimport { InternalEditorAction } from '../../common/editorAction';\nimport { MenuId, MenuRegistry } from '../../../platform/actions/common/actions';\nimport { IThemeService } from '../../../platform/theme/common/themeService';\nimport * as aria from '../../../base/browser/ui/aria/aria';\nimport * as nls from '../../../nls';\nimport * as browser from '../../../base/browser/browser';\nimport { INotificationService } from '../../../platform/notification/common/notification';\nimport { IConfigurationService } from '../../../platform/configuration/common/configuration';\nvar LAST_GENERATED_COMMAND_ID = 0;\nvar ariaDomNodeCreated = false;\nfunction createAriaDomNode() {\n if (ariaDomNodeCreated) {\n return;\n }\n ariaDomNodeCreated = true;\n aria.setARIAContainer(document.body);\n}\n/**\n * A code editor to be used both by the standalone editor and the standalone diff editor.\n */\nvar StandaloneCodeEditor = /** @class */ (function (_super) {\n __extends(StandaloneCodeEditor, _super);\n function StandaloneCodeEditor(domElement, options, instantiationService, codeEditorService, commandService, contextKeyService, keybindingService, themeService, notificationService) {\n var _this = this;\n options = options || {};\n options.ariaLabel = options.ariaLabel || nls.localize('editorViewAccessibleLabel', \"Editor content\");\n options.ariaLabel = options.ariaLabel + ';' + (browser.isIE\n ? nls.localize('accessibilityHelpMessageIE', \"Press Ctrl+F1 for Accessibility Options.\")\n : nls.localize('accessibilityHelpMessage', \"Press Alt+F1 for Accessibility Options.\"));\n _this = _super.call(this, domElement, options, {}, instantiationService, codeEditorService, commandService, contextKeyService, themeService, notificationService) || this;\n if (keybindingService instanceof StandaloneKeybindingService) {\n _this._standaloneKeybindingService = keybindingService;\n }\n // Create the ARIA dom node as soon as the first editor is instantiated\n createAriaDomNode();\n return _this;\n }\n StandaloneCodeEditor.prototype.addCommand = function (keybinding, handler, context) {\n if (!this._standaloneKeybindingService) {\n console.warn('Cannot add command because the editor is configured with an unrecognized KeybindingService');\n return null;\n }\n var commandId = 'DYNAMIC_' + (++LAST_GENERATED_COMMAND_ID);\n var whenExpression = ContextKeyExpr.deserialize(context);\n this._standaloneKeybindingService.addDynamicKeybinding(commandId, keybinding, handler, whenExpression);\n return commandId;\n };\n StandaloneCodeEditor.prototype.createContextKey = function (key, defaultValue) {\n return this._contextKeyService.createKey(key, defaultValue);\n };\n StandaloneCodeEditor.prototype.addAction = function (_descriptor) {\n var _this = this;\n if ((typeof _descriptor.id !== 'string') || (typeof _descriptor.label !== 'string') || (typeof _descriptor.run !== 'function')) {\n throw new Error('Invalid action descriptor, `id`, `label` and `run` are required properties!');\n }\n if (!this._standaloneKeybindingService) {\n console.warn('Cannot add keybinding because the editor is configured with an unrecognized KeybindingService');\n return Disposable.None;\n }\n // Read descriptor options\n var id = _descriptor.id;\n var label = _descriptor.label;\n var precondition = ContextKeyExpr.and(ContextKeyExpr.equals('editorId', this.getId()), ContextKeyExpr.deserialize(_descriptor.precondition));\n var keybindings = _descriptor.keybindings;\n var keybindingsWhen = ContextKeyExpr.and(precondition, ContextKeyExpr.deserialize(_descriptor.keybindingContext));\n var contextMenuGroupId = _descriptor.contextMenuGroupId || null;\n var contextMenuOrder = _descriptor.contextMenuOrder || 0;\n var run = function () {\n var r = _descriptor.run(_this);\n return r ? r : TPromise.as(void 0);\n };\n var toDispose = [];\n // Generate a unique id to allow the same descriptor.id across multiple editor instances\n var uniqueId = this.getId() + ':' + id;\n // Register the command\n toDispose.push(CommandsRegistry.registerCommand(uniqueId, run));\n // Register the context menu item\n if (contextMenuGroupId) {\n var menuItem = {\n command: {\n id: uniqueId,\n title: label\n },\n when: precondition,\n group: contextMenuGroupId,\n order: contextMenuOrder\n };\n toDispose.push(MenuRegistry.appendMenuItem(MenuId.EditorContext, menuItem));\n }\n // Register the keybindings\n if (Array.isArray(keybindings)) {\n toDispose = toDispose.concat(keybindings.map(function (kb) {\n return _this._standaloneKeybindingService.addDynamicKeybinding(uniqueId, kb, run, keybindingsWhen);\n }));\n }\n // Finally, register an internal editor action\n var internalAction = new InternalEditorAction(uniqueId, label, label, precondition, run, this._contextKeyService);\n // Store it under the original id, such that trigger with the original id will work\n this._actions[id] = internalAction;\n toDispose.push(toDisposable(function () {\n delete _this._actions[id];\n }));\n return combinedDisposable(toDispose);\n };\n StandaloneCodeEditor = __decorate([\n __param(2, IInstantiationService),\n __param(3, ICodeEditorService),\n __param(4, ICommandService),\n __param(5, IContextKeyService),\n __param(6, IKeybindingService),\n __param(7, IThemeService),\n __param(8, INotificationService)\n ], StandaloneCodeEditor);\n return StandaloneCodeEditor;\n}(CodeEditorWidget));\nexport { StandaloneCodeEditor };\nvar StandaloneEditor = /** @class */ (function (_super) {\n __extends(StandaloneEditor, _super);\n function StandaloneEditor(domElement, options, toDispose, instantiationService, codeEditorService, commandService, contextKeyService, keybindingService, contextViewService, themeService, notificationService, configurationService) {\n var _this = this;\n applyConfigurationValues(configurationService, options, false);\n options = options || {};\n if (typeof options.theme === 'string') {\n themeService.setTheme(options.theme);\n }\n var model = options.model;\n delete options.model;\n _this = _super.call(this, domElement, options, instantiationService, codeEditorService, commandService, contextKeyService, keybindingService, themeService, notificationService) || this;\n _this._contextViewService = contextViewService;\n _this._configurationService = configurationService;\n _this._register(toDispose);\n if (typeof model === 'undefined') {\n model = self.monaco.editor.createModel(options.value || '', options.language || 'text/plain');\n _this._ownsModel = true;\n }\n else {\n _this._ownsModel = false;\n }\n _this._attachModel(model);\n if (model) {\n var e = {\n oldModelUrl: null,\n newModelUrl: model.uri\n };\n _this._onDidChangeModel.fire(e);\n }\n return _this;\n }\n StandaloneEditor.prototype.dispose = function () {\n _super.prototype.dispose.call(this);\n };\n StandaloneEditor.prototype.updateOptions = function (newOptions) {\n applyConfigurationValues(this._configurationService, newOptions, false);\n _super.prototype.updateOptions.call(this, newOptions);\n };\n StandaloneEditor.prototype._attachModel = function (model) {\n _super.prototype._attachModel.call(this, model);\n if (this._view) {\n this._contextViewService.setContainer(this._view.domNode.domNode);\n }\n };\n StandaloneEditor.prototype._postDetachModelCleanup = function (detachedModel) {\n _super.prototype._postDetachModelCleanup.call(this, detachedModel);\n if (detachedModel && this._ownsModel) {\n detachedModel.dispose();\n this._ownsModel = false;\n }\n };\n StandaloneEditor = __decorate([\n __param(3, IInstantiationService),\n __param(4, ICodeEditorService),\n __param(5, ICommandService),\n __param(6, IContextKeyService),\n __param(7, IKeybindingService),\n __param(8, IContextViewService),\n __param(9, IStandaloneThemeService),\n __param(10, INotificationService),\n __param(11, IConfigurationService)\n ], StandaloneEditor);\n return StandaloneEditor;\n}(StandaloneCodeEditor));\nexport { StandaloneEditor };\nvar StandaloneDiffEditor = /** @class */ (function (_super) {\n __extends(StandaloneDiffEditor, _super);\n function StandaloneDiffEditor(domElement, options, toDispose, instantiationService, contextKeyService, keybindingService, contextViewService, editorWorkerService, codeEditorService, themeService, notificationService, configurationService) {\n var _this = this;\n applyConfigurationValues(configurationService, options, true);\n options = options || {};\n if (typeof options.theme === 'string') {\n options.theme = themeService.setTheme(options.theme);\n }\n _this = _super.call(this, domElement, options, editorWorkerService, contextKeyService, instantiationService, codeEditorService, themeService, notificationService) || this;\n _this._contextViewService = contextViewService;\n _this._configurationService = configurationService;\n _this._register(toDispose);\n _this._contextViewService.setContainer(_this._containerDomElement);\n return _this;\n }\n StandaloneDiffEditor.prototype.dispose = function () {\n _super.prototype.dispose.call(this);\n };\n StandaloneDiffEditor.prototype.updateOptions = function (newOptions) {\n applyConfigurationValues(this._configurationService, newOptions, true);\n _super.prototype.updateOptions.call(this, newOptions);\n };\n StandaloneDiffEditor.prototype._createInnerEditor = function (instantiationService, container, options) {\n return instantiationService.createInstance(StandaloneCodeEditor, container, options);\n };\n StandaloneDiffEditor.prototype.getOriginalEditor = function () {\n return _super.prototype.getOriginalEditor.call(this);\n };\n StandaloneDiffEditor.prototype.getModifiedEditor = function () {\n return _super.prototype.getModifiedEditor.call(this);\n };\n StandaloneDiffEditor.prototype.addCommand = function (keybinding, handler, context) {\n return this.getModifiedEditor().addCommand(keybinding, handler, context);\n };\n StandaloneDiffEditor.prototype.createContextKey = function (key, defaultValue) {\n return this.getModifiedEditor().createContextKey(key, defaultValue);\n };\n StandaloneDiffEditor.prototype.addAction = function (descriptor) {\n return this.getModifiedEditor().addAction(descriptor);\n };\n StandaloneDiffEditor = __decorate([\n __param(3, IInstantiationService),\n __param(4, IContextKeyService),\n __param(5, IKeybindingService),\n __param(6, IContextViewService),\n __param(7, IEditorWorkerService),\n __param(8, ICodeEditorService),\n __param(9, IStandaloneThemeService),\n __param(10, INotificationService),\n __param(11, IConfigurationService)\n ], StandaloneDiffEditor);\n return StandaloneDiffEditor;\n}(DiffEditorWidget));\nexport { StandaloneDiffEditor };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport './menu.css';\nimport * as nls from '../../../../nls';\nimport { Action } from '../../../common/actions';\nimport { ActionBar, ActionsOrientation, Separator, ActionItem, BaseActionItem } from '../actionbar/actionbar';\nimport { addClass, EventType, EventHelper, removeTabIndexAndUpdateFocus, isAncestor } from '../../dom';\nimport { StandardKeyboardEvent } from '../../keyboardEvent';\nimport { $ } from '../../builder';\nimport { RunOnceScheduler } from '../../../common/async';\nvar SubmenuAction = /** @class */ (function (_super) {\n __extends(SubmenuAction, _super);\n function SubmenuAction(label, entries, cssClass) {\n var _this = _super.call(this, !!cssClass ? cssClass : 'submenu', label, '', true) || this;\n _this.entries = entries;\n return _this;\n }\n return SubmenuAction;\n}(Action));\nexport { SubmenuAction };\nvar Menu = /** @class */ (function () {\n function Menu(container, actions, options) {\n if (options === void 0) { options = {}; }\n var _this = this;\n addClass(container, 'monaco-menu-container');\n container.setAttribute('role', 'presentation');\n var menuContainer = document.createElement('div');\n addClass(menuContainer, 'monaco-menu');\n menuContainer.setAttribute('role', 'presentation');\n container.appendChild(menuContainer);\n var parentData = {\n parent: this\n };\n this.actionBar = new ActionBar(menuContainer, {\n orientation: ActionsOrientation.VERTICAL,\n actionItemProvider: function (action) { return _this.doGetActionItem(action, options, parentData); },\n context: options.context,\n actionRunner: options.actionRunner,\n isMenu: true,\n ariaLabel: options.ariaLabel\n });\n this.actionBar.push(actions, { icon: true, label: true, isMenu: true });\n }\n Menu.prototype.doGetActionItem = function (action, options, parentData) {\n if (action instanceof Separator) {\n return new ActionItem(options.context, action, { icon: true });\n }\n else if (action instanceof SubmenuAction) {\n return new SubmenuActionItem(action, action.entries, parentData, options);\n }\n else {\n var menuItemOptions = {};\n if (options.getKeyBinding) {\n var keybinding = options.getKeyBinding(action);\n if (keybinding) {\n menuItemOptions.keybinding = keybinding.getLabel();\n }\n }\n return new MenuActionItem(options.context, action, menuItemOptions);\n }\n };\n Object.defineProperty(Menu.prototype, \"onDidCancel\", {\n get: function () {\n return this.actionBar.onDidCancel;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Menu.prototype, \"onDidBlur\", {\n get: function () {\n return this.actionBar.onDidBlur;\n },\n enumerable: true,\n configurable: true\n });\n Menu.prototype.focus = function (selectFirst) {\n if (selectFirst === void 0) { selectFirst = true; }\n if (this.actionBar) {\n this.actionBar.focus(selectFirst);\n }\n };\n Menu.prototype.dispose = function () {\n if (this.actionBar) {\n this.actionBar.dispose();\n this.actionBar = null;\n }\n if (this.listener) {\n this.listener.dispose();\n this.listener = null;\n }\n };\n return Menu;\n}());\nexport { Menu };\nvar MenuActionItem = /** @class */ (function (_super) {\n __extends(MenuActionItem, _super);\n function MenuActionItem(ctx, action, options) {\n if (options === void 0) { options = {}; }\n var _this = this;\n options.isMenu = true;\n _this = _super.call(this, action, action, options) || this;\n _this.options = options;\n _this.options.icon = options.icon !== undefined ? options.icon : false;\n _this.options.label = options.label !== undefined ? options.label : true;\n _this.cssClass = '';\n return _this;\n }\n MenuActionItem.prototype.render = function (container) {\n _super.prototype.render.call(this, container);\n this.$e = $('a.action-menu-item').appendTo(this.builder);\n if (this._action.id === Separator.ID) {\n // A separator is a presentation item\n this.$e.attr({ role: 'presentation' });\n }\n else {\n this.$e.attr({ role: 'menuitem' });\n }\n this.$label = $('span.action-label').appendTo(this.$e);\n if (this.options.label && this.options.keybinding) {\n $('span.keybinding').text(this.options.keybinding).appendTo(this.$e);\n }\n this._updateClass();\n this._updateLabel();\n this._updateTooltip();\n this._updateEnabled();\n this._updateChecked();\n };\n MenuActionItem.prototype._updateLabel = function () {\n if (this.options.label) {\n var label = this.getAction().label;\n if (label) {\n var matches = MenuActionItem.MNEMONIC_REGEX.exec(label);\n if (matches && matches.length === 2) {\n var mnemonic = matches[1];\n var ariaLabel = label.replace(MenuActionItem.MNEMONIC_REGEX, mnemonic);\n this.$e.getHTMLElement().accessKey = mnemonic.toLocaleLowerCase();\n this.$label.attr('aria-label', ariaLabel);\n }\n else {\n this.$label.attr('aria-label', label);\n }\n label = label.replace(MenuActionItem.MNEMONIC_REGEX, '$1\\u0332');\n }\n this.$label.text(label);\n }\n };\n MenuActionItem.prototype._updateTooltip = function () {\n var title = null;\n if (this.getAction().tooltip) {\n title = this.getAction().tooltip;\n }\n else if (!this.options.label && this.getAction().label && this.options.icon) {\n title = this.getAction().label;\n if (this.options.keybinding) {\n title = nls.localize({ key: 'titleLabel', comment: ['action title', 'action keybinding'] }, \"{0} ({1})\", title, this.options.keybinding);\n }\n }\n if (title) {\n this.$e.attr({ title: title });\n }\n };\n MenuActionItem.prototype._updateClass = function () {\n if (this.cssClass) {\n this.$e.removeClass(this.cssClass);\n }\n if (this.options.icon) {\n this.cssClass = this.getAction().class;\n this.$label.addClass('icon');\n if (this.cssClass) {\n this.$label.addClass(this.cssClass);\n }\n this._updateEnabled();\n }\n else {\n this.$label.removeClass('icon');\n }\n };\n MenuActionItem.prototype._updateEnabled = function () {\n if (this.getAction().enabled) {\n this.builder.removeClass('disabled');\n this.$e.removeClass('disabled');\n this.$e.attr({ tabindex: 0 });\n }\n else {\n this.builder.addClass('disabled');\n this.$e.addClass('disabled');\n removeTabIndexAndUpdateFocus(this.$e.getHTMLElement());\n }\n };\n MenuActionItem.prototype._updateChecked = function () {\n if (this.getAction().checked) {\n this.$label.addClass('checked');\n }\n else {\n this.$label.removeClass('checked');\n }\n };\n MenuActionItem.MNEMONIC_REGEX = /&&(.)/g;\n return MenuActionItem;\n}(BaseActionItem));\nvar SubmenuActionItem = /** @class */ (function (_super) {\n __extends(SubmenuActionItem, _super);\n function SubmenuActionItem(action, submenuActions, parentData, submenuOptions) {\n var _this = _super.call(this, action, action, { label: true, isMenu: true }) || this;\n _this.submenuActions = submenuActions;\n _this.parentData = parentData;\n _this.submenuOptions = submenuOptions;\n _this.showScheduler = new RunOnceScheduler(function () {\n if (_this.mouseOver) {\n _this.cleanupExistingSubmenu(false);\n _this.createSubmenu(false);\n }\n }, 250);\n _this.hideScheduler = new RunOnceScheduler(function () {\n if ((!isAncestor(document.activeElement, _this.builder.getHTMLElement()) && _this.parentData.submenu === _this.mysubmenu)) {\n _this.parentData.parent.focus(false);\n _this.cleanupExistingSubmenu(true);\n }\n }, 750);\n return _this;\n }\n SubmenuActionItem.prototype.render = function (container) {\n var _this = this;\n _super.prototype.render.call(this, container);\n this.$e.addClass('monaco-submenu-item');\n this.$e.attr('aria-haspopup', 'true');\n $('span.submenu-indicator').text('\\u25B6').appendTo(this.$e);\n $(this.builder).on(EventType.KEY_UP, function (e) {\n var event = new StandardKeyboardEvent(e);\n if (event.equals(17 /* RightArrow */)) {\n EventHelper.stop(e, true);\n _this.createSubmenu(true);\n }\n });\n $(this.builder).on(EventType.KEY_DOWN, function (e) {\n var event = new StandardKeyboardEvent(e);\n if (event.equals(17 /* RightArrow */)) {\n EventHelper.stop(e, true);\n }\n });\n $(this.builder).on(EventType.MOUSE_OVER, function (e) {\n if (!_this.mouseOver) {\n _this.mouseOver = true;\n _this.showScheduler.schedule();\n }\n });\n $(this.builder).on(EventType.MOUSE_LEAVE, function (e) {\n _this.mouseOver = false;\n });\n $(this.builder).on(EventType.FOCUS_OUT, function (e) {\n if (!isAncestor(document.activeElement, _this.builder.getHTMLElement())) {\n _this.hideScheduler.schedule();\n }\n });\n };\n SubmenuActionItem.prototype.onClick = function (e) {\n // stop clicking from trying to run an action\n EventHelper.stop(e, true);\n this.createSubmenu(false);\n };\n SubmenuActionItem.prototype.cleanupExistingSubmenu = function (force) {\n if (this.parentData.submenu && (force || (this.parentData.submenu !== this.mysubmenu))) {\n this.parentData.submenu.dispose();\n this.parentData.submenu = null;\n if (this.submenuContainer) {\n this.submenuContainer.dispose();\n this.submenuContainer = null;\n }\n }\n };\n SubmenuActionItem.prototype.createSubmenu = function (selectFirstItem) {\n var _this = this;\n if (selectFirstItem === void 0) { selectFirstItem = true; }\n if (!this.parentData.submenu) {\n this.submenuContainer = $(this.builder).div({ class: 'monaco-submenu menubar-menu-items-holder context-view' });\n $(this.submenuContainer).style({\n 'left': $(this.builder).getClientArea().width + \"px\"\n });\n $(this.submenuContainer).on(EventType.KEY_UP, function (e) {\n var event = new StandardKeyboardEvent(e);\n if (event.equals(15 /* LeftArrow */)) {\n EventHelper.stop(e, true);\n _this.parentData.parent.focus();\n _this.parentData.submenu.dispose();\n _this.parentData.submenu = null;\n _this.submenuContainer.dispose();\n _this.submenuContainer = null;\n }\n });\n $(this.submenuContainer).on(EventType.KEY_DOWN, function (e) {\n var event = new StandardKeyboardEvent(e);\n if (event.equals(15 /* LeftArrow */)) {\n EventHelper.stop(e, true);\n }\n });\n this.parentData.submenu = new Menu(this.submenuContainer.getHTMLElement(), this.submenuActions, this.submenuOptions);\n this.parentData.submenu.focus(selectFirstItem);\n this.mysubmenu = this.parentData.submenu;\n }\n else {\n this.parentData.submenu.focus(false);\n }\n };\n SubmenuActionItem.prototype.dispose = function () {\n _super.prototype.dispose.call(this);\n this.hideScheduler.dispose();\n if (this.mysubmenu) {\n this.mysubmenu.dispose();\n this.mysubmenu = null;\n }\n if (this.submenuContainer) {\n this.submenuContainer.dispose();\n this.submenuContainer = null;\n }\n };\n return SubmenuActionItem;\n}(MenuActionItem));\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport './contextMenuHandler.css';\nimport { $ } from '../../../base/browser/builder';\nimport { combinedDisposable } from '../../../base/common/lifecycle';\nimport { StandardMouseEvent } from '../../../base/browser/mouseEvent';\nimport { ActionRunner } from '../../../base/common/actions';\nimport { Menu } from '../../../base/browser/ui/menu/menu';\nvar ContextMenuHandler = /** @class */ (function () {\n function ContextMenuHandler(element, contextViewService, telemetryService, notificationService) {\n this.setContainer(element);\n this.contextViewService = contextViewService;\n this.telemetryService = telemetryService;\n this.notificationService = notificationService;\n this.menuContainerElement = null;\n }\n ContextMenuHandler.prototype.setContainer = function (container) {\n var _this = this;\n if (this.$el) {\n this.$el.off(['click', 'mousedown']);\n this.$el = null;\n }\n if (container) {\n this.$el = $(container);\n this.$el.on('mousedown', function (e) { return _this.onMouseDown(e); });\n }\n };\n ContextMenuHandler.prototype.showContextMenu = function (delegate) {\n var _this = this;\n delegate.getActions().done(function (actions) {\n if (!actions.length) {\n return; // Don't render an empty context menu\n }\n _this.contextViewService.showContextView({\n getAnchor: function () { return delegate.getAnchor(); },\n canRelayout: false,\n render: function (container) {\n _this.menuContainerElement = container;\n var className = delegate.getMenuClassName ? delegate.getMenuClassName() : '';\n if (className) {\n container.className += ' ' + className;\n }\n var menuDisposables = [];\n var actionRunner = delegate.actionRunner || new ActionRunner();\n actionRunner.onDidBeforeRun(_this.onActionRun, _this, menuDisposables);\n actionRunner.onDidRun(_this.onDidActionRun, _this, menuDisposables);\n var menu = new Menu(container, actions, {\n actionItemProvider: delegate.getActionItem,\n context: delegate.getActionsContext ? delegate.getActionsContext() : null,\n actionRunner: actionRunner,\n getKeyBinding: delegate.getKeyBinding\n });\n menu.onDidCancel(function () { return _this.contextViewService.hideContextView(true); }, null, menuDisposables);\n menu.onDidBlur(function () { return _this.contextViewService.hideContextView(true); }, null, menuDisposables);\n menu.focus(!!delegate.autoSelectFirstItem);\n return combinedDisposable(menuDisposables.concat([menu]));\n },\n onHide: function (didCancel) {\n if (delegate.onHide) {\n delegate.onHide(didCancel);\n }\n _this.menuContainerElement = null;\n }\n });\n });\n };\n ContextMenuHandler.prototype.onActionRun = function (e) {\n if (this.telemetryService) {\n /* __GDPR__\n \"workbenchActionExecuted\" : {\n \"id\" : { \"classification\": \"SystemMetaData\", \"purpose\": \"FeatureInsight\" },\n \"from\": { \"classification\": \"SystemMetaData\", \"purpose\": \"FeatureInsight\" }\n }\n */\n this.telemetryService.publicLog('workbenchActionExecuted', { id: e.action.id, from: 'contextMenu' });\n }\n this.contextViewService.hideContextView(false);\n };\n ContextMenuHandler.prototype.onDidActionRun = function (e) {\n if (e.error && this.notificationService) {\n this.notificationService.error(e.error);\n }\n };\n ContextMenuHandler.prototype.onMouseDown = function (e) {\n if (!this.menuContainerElement) {\n return;\n }\n var event = new StandardMouseEvent(e);\n var element = event.target;\n while (element) {\n if (element === this.menuContainerElement) {\n return;\n }\n element = element.parentElement;\n }\n this.contextViewService.hideContextView();\n };\n ContextMenuHandler.prototype.dispose = function () {\n this.setContainer(null);\n };\n return ContextMenuHandler;\n}());\nexport { ContextMenuHandler };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport { ContextMenuHandler } from './contextMenuHandler';\nimport { Emitter } from '../../../base/common/event';\nvar ContextMenuService = /** @class */ (function () {\n function ContextMenuService(container, telemetryService, notificationService, contextViewService) {\n this._onDidContextMenu = new Emitter();\n this.contextMenuHandler = new ContextMenuHandler(container, contextViewService, telemetryService, notificationService);\n }\n ContextMenuService.prototype.dispose = function () {\n this.contextMenuHandler.dispose();\n };\n // ContextMenu\n ContextMenuService.prototype.showContextMenu = function (delegate) {\n this.contextMenuHandler.showContextMenu(delegate);\n this._onDidContextMenu.fire();\n };\n return ContextMenuService;\n}());\nexport { ContextMenuService };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __param = (this && this.__param) || function (paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n};\nimport { ContextView } from '../../../base/browser/ui/contextview/contextview';\nimport { ITelemetryService } from '../../telemetry/common/telemetry';\nimport { ILogService } from '../../log/common/log';\nvar ContextViewService = /** @class */ (function () {\n function ContextViewService(container, telemetryService, logService) {\n this.logService = logService;\n this.contextView = new ContextView(container);\n }\n ContextViewService.prototype.dispose = function () {\n this.contextView.dispose();\n };\n // ContextView\n ContextViewService.prototype.setContainer = function (container) {\n this.logService.trace('ContextViewService#setContainer');\n this.contextView.setContainer(container);\n };\n ContextViewService.prototype.showContextView = function (delegate) {\n this.logService.trace('ContextViewService#showContextView');\n this.contextView.show(delegate);\n };\n ContextViewService.prototype.layout = function () {\n this.contextView.layout();\n };\n ContextViewService.prototype.hideContextView = function (data) {\n this.logService.trace('ContextViewService#hideContextView');\n this.contextView.hide(data);\n };\n ContextViewService = __decorate([\n __param(1, ITelemetryService),\n __param(2, ILogService)\n ], ContextViewService);\n return ContextViewService;\n}());\nexport { ContextViewService };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\n/**\n * Iterates over each entry in the provided set. The iterator allows\n * to remove elements and will stop when the callback returns {{false}}.\n */\nexport function forEach(from, callback) {\n var _loop_1 = function (key) {\n if (hasOwnProperty.call(from, key)) {\n var result = callback({ key: key, value: from[key] }, function () {\n delete from[key];\n });\n if (result === false) {\n return { value: void 0 };\n }\n }\n };\n for (var key in from) {\n var state_1 = _loop_1(key);\n if (typeof state_1 === \"object\")\n return state_1.value;\n }\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport { isEmptyObject } from './types';\nimport { forEach } from './collections';\nfunction newNode(data) {\n return {\n data: data,\n incoming: Object.create(null),\n outgoing: Object.create(null)\n };\n}\nvar Graph = /** @class */ (function () {\n function Graph(_hashFn) {\n this._hashFn = _hashFn;\n this._nodes = Object.create(null);\n // empty\n }\n Graph.prototype.roots = function () {\n var ret = [];\n forEach(this._nodes, function (entry) {\n if (isEmptyObject(entry.value.outgoing)) {\n ret.push(entry.value);\n }\n });\n return ret;\n };\n Graph.prototype.insertEdge = function (from, to) {\n var fromNode = this.lookupOrInsertNode(from), toNode = this.lookupOrInsertNode(to);\n fromNode.outgoing[this._hashFn(to)] = toNode;\n toNode.incoming[this._hashFn(from)] = fromNode;\n };\n Graph.prototype.removeNode = function (data) {\n var key = this._hashFn(data);\n delete this._nodes[key];\n forEach(this._nodes, function (entry) {\n delete entry.value.outgoing[key];\n delete entry.value.incoming[key];\n });\n };\n Graph.prototype.lookupOrInsertNode = function (data) {\n var key = this._hashFn(data);\n var node = this._nodes[key];\n if (!node) {\n node = newNode(data);\n this._nodes[key] = node;\n }\n return node;\n };\n Object.defineProperty(Graph.prototype, \"length\", {\n get: function () {\n return Object.keys(this._nodes).length;\n },\n enumerable: true,\n configurable: true\n });\n Graph.prototype.toString = function () {\n var data = [];\n forEach(this._nodes, function (entry) {\n data.push(entry.key + \", (incoming)[\" + Object.keys(entry.value.incoming).join(', ') + \"], (outgoing)[\" + Object.keys(entry.value.outgoing).join(',') + \"]\");\n });\n return data.join('\\n');\n };\n return Graph;\n}());\nexport { Graph };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport { isFalsyOrEmpty } from '../../../base/common/arrays';\nimport { Schemas } from '../../../base/common/network';\nimport { isEmptyObject } from '../../../base/common/types';\nimport { Emitter, debounceEvent } from '../../../base/common/event';\nimport { MarkerSeverity } from './markers';\nvar MapMap;\n(function (MapMap) {\n function get(map, key1, key2) {\n if (map[key1]) {\n return map[key1][key2];\n }\n return undefined;\n }\n MapMap.get = get;\n function set(map, key1, key2, value) {\n if (!map[key1]) {\n map[key1] = Object.create(null);\n }\n map[key1][key2] = value;\n }\n MapMap.set = set;\n function remove(map, key1, key2) {\n if (map[key1] && map[key1][key2]) {\n delete map[key1][key2];\n if (isEmptyObject(map[key1])) {\n delete map[key1];\n }\n return true;\n }\n return false;\n }\n MapMap.remove = remove;\n})(MapMap || (MapMap = {}));\nvar MarkerStats = /** @class */ (function () {\n function MarkerStats(service) {\n this.errors = 0;\n this.infos = 0;\n this.warnings = 0;\n this.unknowns = 0;\n this._data = Object.create(null);\n this._service = service;\n this._subscription = service.onMarkerChanged(this._update, this);\n }\n MarkerStats.prototype.dispose = function () {\n this._subscription.dispose();\n this._data = undefined;\n };\n MarkerStats.prototype._update = function (resources) {\n for (var _i = 0, resources_1 = resources; _i < resources_1.length; _i++) {\n var resource = resources_1[_i];\n var key = resource.toString();\n var oldStats = this._data[key];\n if (oldStats) {\n this._substract(oldStats);\n }\n var newStats = this._resourceStats(resource);\n this._add(newStats);\n this._data[key] = newStats;\n }\n };\n MarkerStats.prototype._resourceStats = function (resource) {\n var result = { errors: 0, warnings: 0, infos: 0, unknowns: 0 };\n // TODO this is a hack\n if (resource.scheme === Schemas.inMemory || resource.scheme === Schemas.walkThrough || resource.scheme === Schemas.walkThroughSnippet) {\n return result;\n }\n for (var _i = 0, _a = this._service.read({ resource: resource }); _i < _a.length; _i++) {\n var severity = _a[_i].severity;\n if (severity === MarkerSeverity.Error) {\n result.errors += 1;\n }\n else if (severity === MarkerSeverity.Warning) {\n result.warnings += 1;\n }\n else if (severity === MarkerSeverity.Info) {\n result.infos += 1;\n }\n else {\n result.unknowns += 1;\n }\n }\n return result;\n };\n MarkerStats.prototype._substract = function (op) {\n this.errors -= op.errors;\n this.warnings -= op.warnings;\n this.infos -= op.infos;\n this.unknowns -= op.unknowns;\n };\n MarkerStats.prototype._add = function (op) {\n this.errors += op.errors;\n this.warnings += op.warnings;\n this.infos += op.infos;\n this.unknowns += op.unknowns;\n };\n return MarkerStats;\n}());\nvar MarkerService = /** @class */ (function () {\n function MarkerService() {\n this._onMarkerChanged = new Emitter();\n this._onMarkerChangedEvent = debounceEvent(this._onMarkerChanged.event, MarkerService._debouncer, 0);\n this._byResource = Object.create(null);\n this._byOwner = Object.create(null);\n this._stats = new MarkerStats(this);\n }\n MarkerService.prototype.dispose = function () {\n this._stats.dispose();\n };\n Object.defineProperty(MarkerService.prototype, \"onMarkerChanged\", {\n get: function () {\n return this._onMarkerChangedEvent;\n },\n enumerable: true,\n configurable: true\n });\n MarkerService.prototype.remove = function (owner, resources) {\n if (!isFalsyOrEmpty(resources)) {\n for (var _i = 0, resources_2 = resources; _i < resources_2.length; _i++) {\n var resource = resources_2[_i];\n this.changeOne(owner, resource, undefined);\n }\n }\n };\n MarkerService.prototype.changeOne = function (owner, resource, markerData) {\n if (isFalsyOrEmpty(markerData)) {\n // remove marker for this (owner,resource)-tuple\n var a = MapMap.remove(this._byResource, resource.toString(), owner);\n var b = MapMap.remove(this._byOwner, owner, resource.toString());\n if (a !== b) {\n throw new Error('invalid marker service state');\n }\n if (a && b) {\n this._onMarkerChanged.fire([resource]);\n }\n }\n else {\n // insert marker for this (owner,resource)-tuple\n var markers = [];\n for (var _i = 0, markerData_1 = markerData; _i < markerData_1.length; _i++) {\n var data = markerData_1[_i];\n var marker = MarkerService._toMarker(owner, resource, data);\n if (marker) {\n markers.push(marker);\n }\n }\n MapMap.set(this._byResource, resource.toString(), owner, markers);\n MapMap.set(this._byOwner, owner, resource.toString(), markers);\n this._onMarkerChanged.fire([resource]);\n }\n };\n MarkerService._toMarker = function (owner, resource, data) {\n var code = data.code, severity = data.severity, message = data.message, source = data.source, startLineNumber = data.startLineNumber, startColumn = data.startColumn, endLineNumber = data.endLineNumber, endColumn = data.endColumn, relatedInformation = data.relatedInformation, tags = data.tags;\n if (!message) {\n return undefined;\n }\n // santize data\n code = code || null;\n startLineNumber = startLineNumber > 0 ? startLineNumber : 1;\n startColumn = startColumn > 0 ? startColumn : 1;\n endLineNumber = endLineNumber >= startLineNumber ? endLineNumber : startLineNumber;\n endColumn = endColumn > 0 ? endColumn : startColumn;\n return {\n resource: resource,\n owner: owner,\n code: code,\n severity: severity,\n message: message,\n source: source,\n startLineNumber: startLineNumber,\n startColumn: startColumn,\n endLineNumber: endLineNumber,\n endColumn: endColumn,\n relatedInformation: relatedInformation,\n tags: tags,\n };\n };\n MarkerService.prototype.read = function (filter) {\n if (filter === void 0) { filter = Object.create(null); }\n var owner = filter.owner, resource = filter.resource, severities = filter.severities, take = filter.take;\n if (!take || take < 0) {\n take = -1;\n }\n if (owner && resource) {\n // exactly one owner AND resource\n var data = MapMap.get(this._byResource, resource.toString(), owner);\n if (!data) {\n return [];\n }\n else {\n var result = [];\n for (var _i = 0, data_1 = data; _i < data_1.length; _i++) {\n var marker = data_1[_i];\n if (MarkerService._accept(marker, severities)) {\n var newLen = result.push(marker);\n if (take > 0 && newLen === take) {\n break;\n }\n }\n }\n return result;\n }\n }\n else if (!owner && !resource) {\n // all\n var result = [];\n for (var key1 in this._byResource) {\n for (var key2 in this._byResource[key1]) {\n for (var _a = 0, _b = this._byResource[key1][key2]; _a < _b.length; _a++) {\n var data = _b[_a];\n if (MarkerService._accept(data, severities)) {\n var newLen = result.push(data);\n if (take > 0 && newLen === take) {\n return result;\n }\n }\n }\n }\n }\n return result;\n }\n else {\n // of one resource OR owner\n var map = owner\n ? this._byOwner[owner]\n : this._byResource[resource.toString()];\n if (!map) {\n return [];\n }\n var result = [];\n for (var key in map) {\n for (var _c = 0, _d = map[key]; _c < _d.length; _c++) {\n var data = _d[_c];\n if (MarkerService._accept(data, severities)) {\n var newLen = result.push(data);\n if (take > 0 && newLen === take) {\n return result;\n }\n }\n }\n }\n return result;\n }\n };\n MarkerService._accept = function (marker, severities) {\n return severities === void 0 || (severities & marker.severity) === marker.severity;\n };\n MarkerService._debouncer = function (last, event) {\n if (!last) {\n MarkerService._dedupeMap = Object.create(null);\n last = [];\n }\n for (var _i = 0, event_1 = event; _i < event_1.length; _i++) {\n var uri = event_1[_i];\n if (MarkerService._dedupeMap[uri.toString()] === void 0) {\n MarkerService._dedupeMap[uri.toString()] = true;\n last.push(uri);\n }\n }\n return last;\n };\n return MarkerService;\n}());\nexport { MarkerService };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar SyncDescriptor = /** @class */ (function () {\n function SyncDescriptor(ctor) {\n var _staticArguments = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n _staticArguments[_i - 1] = arguments[_i];\n }\n this.ctor = ctor;\n this.staticArguments = _staticArguments;\n }\n return SyncDescriptor;\n}());\nexport { SyncDescriptor };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport { illegalState } from '../../../base/common/errors';\nimport { create } from '../../../base/common/types';\nimport * as assert from '../../../base/common/assert';\nimport { Graph } from '../../../base/common/graph';\nimport { SyncDescriptor } from './descriptors';\nimport { IInstantiationService, _util, optional } from './instantiation';\nimport { ServiceCollection } from './serviceCollection';\nvar InstantiationService = /** @class */ (function () {\n function InstantiationService(services, strict) {\n if (services === void 0) { services = new ServiceCollection(); }\n if (strict === void 0) { strict = false; }\n this._services = services;\n this._strict = strict;\n this._services.set(IInstantiationService, this);\n }\n InstantiationService.prototype.createChild = function (services) {\n var _this = this;\n this._services.forEach(function (id, thing) {\n if (services.has(id)) {\n return;\n }\n // If we copy descriptors we might end up with\n // multiple instances of the same service\n if (thing instanceof SyncDescriptor) {\n thing = _this._createAndCacheServiceInstance(id, thing);\n }\n services.set(id, thing);\n });\n return new InstantiationService(services, this._strict);\n };\n InstantiationService.prototype.invokeFunction = function (signature) {\n var _this = this;\n var args = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n args[_i - 1] = arguments[_i];\n }\n var accessor;\n try {\n accessor = {\n get: function (id, isOptional) {\n var result = _this._getOrCreateServiceInstance(id);\n if (!result && isOptional !== optional) {\n throw new Error(\"[invokeFunction] unknown service '\" + id + \"'\");\n }\n return result;\n }\n };\n return signature.apply(undefined, [accessor].concat(args));\n }\n finally {\n accessor.get = function () {\n throw illegalState('service accessor is only valid during the invocation of its target method');\n };\n }\n };\n InstantiationService.prototype.createInstance = function (param) {\n var rest = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n rest[_i - 1] = arguments[_i];\n }\n if (param instanceof SyncDescriptor) {\n // sync\n return this._createInstance(param, rest);\n }\n else {\n // sync, just ctor\n return this._createInstance(new SyncDescriptor(param), rest);\n }\n };\n InstantiationService.prototype._createInstance = function (desc, args) {\n // arguments given by createInstance-call and/or the descriptor\n var staticArgs = desc.staticArguments.concat(args);\n // arguments defined by service decorators\n var serviceDependencies = _util.getServiceDependencies(desc.ctor).sort(function (a, b) { return a.index - b.index; });\n var serviceArgs = [];\n for (var _i = 0, serviceDependencies_1 = serviceDependencies; _i < serviceDependencies_1.length; _i++) {\n var dependency = serviceDependencies_1[_i];\n var service = this._getOrCreateServiceInstance(dependency.id);\n if (!service && this._strict && !dependency.optional) {\n throw new Error(\"[createInstance] \" + desc.ctor.name + \" depends on UNKNOWN service \" + dependency.id + \".\");\n }\n serviceArgs.push(service);\n }\n var firstServiceArgPos = serviceDependencies.length > 0 ? serviceDependencies[0].index : staticArgs.length;\n // check for argument mismatches, adjust static args if needed\n if (staticArgs.length !== firstServiceArgPos) {\n console.warn(\"[createInstance] First service dependency of \" + desc.ctor.name + \" at position \" + (firstServiceArgPos + 1) + \" conflicts with \" + staticArgs.length + \" static arguments\");\n var delta = firstServiceArgPos - staticArgs.length;\n if (delta > 0) {\n staticArgs = staticArgs.concat(new Array(delta));\n }\n else {\n staticArgs = staticArgs.slice(0, firstServiceArgPos);\n }\n }\n // // check for missing args\n // for (let i = 0; i < serviceArgs.length; i++) {\n // \tif (!serviceArgs[i]) {\n // \t\tconsole.warn(`${desc.ctor.name} MISSES service dependency ${serviceDependencies[i].id}`, new Error().stack);\n // \t}\n // }\n // now create the instance\n var argArray = [desc.ctor];\n argArray.push.apply(argArray, staticArgs);\n argArray.push.apply(argArray, serviceArgs);\n return create.apply(null, argArray);\n };\n InstantiationService.prototype._getOrCreateServiceInstance = function (id) {\n var thing = this._services.get(id);\n if (thing instanceof SyncDescriptor) {\n return this._createAndCacheServiceInstance(id, thing);\n }\n else {\n return thing;\n }\n };\n InstantiationService.prototype._createAndCacheServiceInstance = function (id, desc) {\n assert.ok(this._services.get(id) instanceof SyncDescriptor);\n var graph = new Graph(function (data) { return data.id.toString(); });\n function throwCycleError() {\n var err = new Error('[createInstance] cyclic dependency between services');\n err.message = graph.toString();\n throw err;\n }\n var count = 0;\n var stack = [{ id: id, desc: desc }];\n while (stack.length) {\n var item = stack.pop();\n graph.lookupOrInsertNode(item);\n // TODO@joh use the graph to find a cycle\n // a weak heuristic for cycle checks\n if (count++ > 100) {\n throwCycleError();\n }\n // check all dependencies for existence and if the need to be created first\n var dependencies = _util.getServiceDependencies(item.desc.ctor);\n for (var _i = 0, dependencies_1 = dependencies; _i < dependencies_1.length; _i++) {\n var dependency = dependencies_1[_i];\n var instanceOrDesc = this._services.get(dependency.id);\n if (!instanceOrDesc) {\n console.warn(\"[createInstance] \" + id + \" depends on \" + dependency.id + \" which is NOT registered.\");\n }\n if (instanceOrDesc instanceof SyncDescriptor) {\n var d = { id: dependency.id, desc: instanceOrDesc };\n graph.insertEdge(item, d);\n stack.push(d);\n }\n }\n }\n while (true) {\n var roots = graph.roots();\n // if there is no more roots but still\n // nodes in the graph we have a cycle\n if (roots.length === 0) {\n if (graph.length !== 0) {\n throwCycleError();\n }\n break;\n }\n for (var _a = 0, roots_1 = roots; _a < roots_1.length; _a++) {\n var root = roots_1[_a];\n // create instance and overwrite the service collections\n var instance = this._createInstance(root.data.desc, []);\n this._services.set(root.data.id, instance);\n graph.removeNode(root.data);\n }\n }\n return this._services.get(id);\n };\n return InstantiationService;\n}());\nexport { InstantiationService };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { transformErrorForSerialization } from '../errors';\nimport { Disposable } from '../lifecycle';\nimport { TPromise } from '../winjs.base';\nimport { ShallowCancelThenPromise } from '../async';\nimport { isWeb } from '../platform';\nvar INITIALIZE = '$initialize';\nvar webWorkerWarningLogged = false;\nexport function logOnceWebWorkerWarning(err) {\n if (!isWeb) {\n // running tests\n return;\n }\n if (!webWorkerWarningLogged) {\n webWorkerWarningLogged = true;\n console.warn('Could not create web worker(s). Falling back to loading web worker code in main thread, which might cause UI freezes. Please see https://github.com/Microsoft/monaco-editor#faq');\n }\n console.warn(err.message);\n}\nvar SimpleWorkerProtocol = /** @class */ (function () {\n function SimpleWorkerProtocol(handler) {\n this._workerId = -1;\n this._handler = handler;\n this._lastSentReq = 0;\n this._pendingReplies = Object.create(null);\n }\n SimpleWorkerProtocol.prototype.setWorkerId = function (workerId) {\n this._workerId = workerId;\n };\n SimpleWorkerProtocol.prototype.sendMessage = function (method, args) {\n var req = String(++this._lastSentReq);\n var reply = {\n c: null,\n e: null\n };\n var result = new TPromise(function (c, e) {\n reply.c = c;\n reply.e = e;\n }, function () {\n // Cancel not supported\n });\n this._pendingReplies[req] = reply;\n this._send({\n vsWorker: this._workerId,\n req: req,\n method: method,\n args: args\n });\n return result;\n };\n SimpleWorkerProtocol.prototype.handleMessage = function (serializedMessage) {\n var message;\n try {\n message = JSON.parse(serializedMessage);\n }\n catch (e) {\n // nothing\n }\n if (!message || !message.vsWorker) {\n return;\n }\n if (this._workerId !== -1 && message.vsWorker !== this._workerId) {\n return;\n }\n this._handleMessage(message);\n };\n SimpleWorkerProtocol.prototype._handleMessage = function (msg) {\n var _this = this;\n if (msg.seq) {\n var replyMessage = msg;\n if (!this._pendingReplies[replyMessage.seq]) {\n console.warn('Got reply to unknown seq');\n return;\n }\n var reply = this._pendingReplies[replyMessage.seq];\n delete this._pendingReplies[replyMessage.seq];\n if (replyMessage.err) {\n var err = replyMessage.err;\n if (replyMessage.err.$isError) {\n err = new Error();\n err.name = replyMessage.err.name;\n err.message = replyMessage.err.message;\n err.stack = replyMessage.err.stack;\n }\n reply.e(err);\n return;\n }\n reply.c(replyMessage.res);\n return;\n }\n var requestMessage = msg;\n var req = requestMessage.req;\n var result = this._handler.handleMessage(requestMessage.method, requestMessage.args);\n result.then(function (r) {\n _this._send({\n vsWorker: _this._workerId,\n seq: req,\n res: r,\n err: undefined\n });\n }, function (e) {\n if (e.detail instanceof Error) {\n // Loading errors have a detail property that points to the actual error\n e.detail = transformErrorForSerialization(e.detail);\n }\n _this._send({\n vsWorker: _this._workerId,\n seq: req,\n res: undefined,\n err: transformErrorForSerialization(e)\n });\n });\n };\n SimpleWorkerProtocol.prototype._send = function (msg) {\n var strMsg = JSON.stringify(msg);\n // console.log('SENDING: ' + strMsg);\n this._handler.sendMessage(strMsg);\n };\n return SimpleWorkerProtocol;\n}());\n/**\n * Main thread side\n */\nvar SimpleWorkerClient = /** @class */ (function (_super) {\n __extends(SimpleWorkerClient, _super);\n function SimpleWorkerClient(workerFactory, moduleId) {\n var _this = _super.call(this) || this;\n var lazyProxyFulfill = null;\n var lazyProxyReject = null;\n _this._worker = _this._register(workerFactory.create('vs/base/common/worker/simpleWorker', function (msg) {\n _this._protocol.handleMessage(msg);\n }, function (err) {\n // in Firefox, web workers fail lazily :(\n // we will reject the proxy\n lazyProxyReject(err);\n }));\n _this._protocol = new SimpleWorkerProtocol({\n sendMessage: function (msg) {\n _this._worker.postMessage(msg);\n },\n handleMessage: function (method, args) {\n // Intentionally not supporting worker -> main requests\n return TPromise.as(null);\n }\n });\n _this._protocol.setWorkerId(_this._worker.getId());\n // Gather loader configuration\n var loaderConfiguration = null;\n if (typeof self.require !== 'undefined' && typeof self.require.getConfig === 'function') {\n // Get the configuration from the Monaco AMD Loader\n loaderConfiguration = self.require.getConfig();\n }\n else if (typeof self.requirejs !== 'undefined') {\n // Get the configuration from requirejs\n loaderConfiguration = self.requirejs.s.contexts._.config;\n }\n _this._lazyProxy = new TPromise(function (c, e) {\n lazyProxyFulfill = c;\n lazyProxyReject = e;\n }, function () { });\n // Send initialize message\n _this._onModuleLoaded = _this._protocol.sendMessage(INITIALIZE, [\n _this._worker.getId(),\n moduleId,\n loaderConfiguration\n ]);\n _this._onModuleLoaded.then(function (availableMethods) {\n var proxy = {};\n for (var i = 0; i < availableMethods.length; i++) {\n proxy[availableMethods[i]] = createProxyMethod(availableMethods[i], proxyMethodRequest);\n }\n lazyProxyFulfill(proxy);\n }, function (e) {\n lazyProxyReject(e);\n _this._onError('Worker failed to load ' + moduleId, e);\n });\n // Create proxy to loaded code\n var proxyMethodRequest = function (method, args) {\n return _this._request(method, args);\n };\n var createProxyMethod = function (method, proxyMethodRequest) {\n return function () {\n var args = Array.prototype.slice.call(arguments, 0);\n return proxyMethodRequest(method, args);\n };\n };\n return _this;\n }\n SimpleWorkerClient.prototype.getProxyObject = function () {\n // Do not allow chaining promises to cancel the proxy creation\n return new ShallowCancelThenPromise(this._lazyProxy);\n };\n SimpleWorkerClient.prototype._request = function (method, args) {\n var _this = this;\n return new TPromise(function (c, e) {\n _this._onModuleLoaded.then(function () {\n _this._protocol.sendMessage(method, args).then(c, e);\n }, e);\n }, function () {\n // Cancel intentionally not supported\n });\n };\n SimpleWorkerClient.prototype._onError = function (message, error) {\n console.error(message);\n console.info(error);\n };\n return SimpleWorkerClient;\n}(Disposable));\nexport { SimpleWorkerClient };\n/**\n * Worker side\n */\nvar SimpleWorkerServer = /** @class */ (function () {\n function SimpleWorkerServer(postSerializedMessage, requestHandler) {\n var _this = this;\n this._requestHandler = requestHandler;\n this._protocol = new SimpleWorkerProtocol({\n sendMessage: function (msg) {\n postSerializedMessage(msg);\n },\n handleMessage: function (method, args) { return _this._handleMessage(method, args); }\n });\n }\n SimpleWorkerServer.prototype.onmessage = function (msg) {\n this._protocol.handleMessage(msg);\n };\n SimpleWorkerServer.prototype._handleMessage = function (method, args) {\n if (method === INITIALIZE) {\n return this.initialize(args[0], args[1], args[2]);\n }\n if (!this._requestHandler || typeof this._requestHandler[method] !== 'function') {\n return TPromise.wrapError(new Error('Missing requestHandler or method: ' + method));\n }\n try {\n return TPromise.as(this._requestHandler[method].apply(this._requestHandler, args));\n }\n catch (e) {\n return TPromise.wrapError(e);\n }\n };\n SimpleWorkerServer.prototype.initialize = function (workerId, moduleId, loaderConfig) {\n var _this = this;\n this._protocol.setWorkerId(workerId);\n if (this._requestHandler) {\n // static request handler\n var methods = [];\n for (var prop in this._requestHandler) {\n if (typeof this._requestHandler[prop] === 'function') {\n methods.push(prop);\n }\n }\n return TPromise.as(methods);\n }\n if (loaderConfig) {\n // Remove 'baseUrl', handling it is beyond scope for now\n if (typeof loaderConfig.baseUrl !== 'undefined') {\n delete loaderConfig['baseUrl'];\n }\n if (typeof loaderConfig.paths !== 'undefined') {\n if (typeof loaderConfig.paths.vs !== 'undefined') {\n delete loaderConfig.paths['vs'];\n }\n }\n // Since this is in a web worker, enable catching errors\n loaderConfig.catchError = true;\n self.require.config(loaderConfig);\n }\n var cc;\n var ee;\n var r = new TPromise(function (c, e) {\n cc = c;\n ee = e;\n });\n // Use the global require to be sure to get the global config\n self.require([moduleId], function () {\n var result = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n result[_i] = arguments[_i];\n }\n var handlerModule = result[0];\n _this._requestHandler = handlerModule.create();\n var methods = [];\n for (var prop in _this._requestHandler) {\n if (typeof _this._requestHandler[prop] === 'function') {\n methods.push(prop);\n }\n }\n cc(methods);\n }, ee);\n return r;\n };\n return SimpleWorkerServer;\n}());\nexport { SimpleWorkerServer };\n/**\n * Called on the worker side\n */\nexport function create(postMessage) {\n return new SimpleWorkerServer(postMessage, null);\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport { globals } from '../common/platform';\nimport { logOnceWebWorkerWarning } from '../common/worker/simpleWorker';\nfunction getWorker(workerId, label) {\n // Option for hosts to overwrite the worker script (used in the standalone editor)\n if (globals.MonacoEnvironment) {\n if (typeof globals.MonacoEnvironment.getWorker === 'function') {\n return globals.MonacoEnvironment.getWorker(workerId, label);\n }\n if (typeof globals.MonacoEnvironment.getWorkerUrl === 'function') {\n return new Worker(globals.MonacoEnvironment.getWorkerUrl(workerId, label));\n }\n }\n // ESM-comment-begin\n // \tif (typeof require === 'function') {\n // \t\treturn new Worker(require.toUrl('./' + workerId) + '#' + label);\n // \t}\n // ESM-comment-end\n throw new Error(\"You must define a function MonacoEnvironment.getWorkerUrl or MonacoEnvironment.getWorker\");\n}\n/**\n * A worker that uses HTML5 web workers so that is has\n * its own global scope and its own thread.\n */\nvar WebWorker = /** @class */ (function () {\n function WebWorker(moduleId, id, label, onMessageCallback, onErrorCallback) {\n this.id = id;\n this.worker = getWorker('workerMain.js', label);\n this.postMessage(moduleId);\n this.worker.onmessage = function (ev) {\n onMessageCallback(ev.data);\n };\n if (typeof this.worker.addEventListener === 'function') {\n this.worker.addEventListener('error', onErrorCallback);\n }\n }\n WebWorker.prototype.getId = function () {\n return this.id;\n };\n WebWorker.prototype.postMessage = function (msg) {\n if (this.worker) {\n this.worker.postMessage(msg);\n }\n };\n WebWorker.prototype.dispose = function () {\n this.worker.terminate();\n this.worker = null;\n };\n return WebWorker;\n}());\nvar DefaultWorkerFactory = /** @class */ (function () {\n function DefaultWorkerFactory(label) {\n this._label = label;\n this._webWorkerFailedBeforeError = false;\n }\n DefaultWorkerFactory.prototype.create = function (moduleId, onMessageCallback, onErrorCallback) {\n var _this = this;\n var workerId = (++DefaultWorkerFactory.LAST_WORKER_ID);\n if (this._webWorkerFailedBeforeError) {\n throw this._webWorkerFailedBeforeError;\n }\n return new WebWorker(moduleId, workerId, this._label || 'anonymous' + workerId, onMessageCallback, function (err) {\n logOnceWebWorkerWarning(err);\n _this._webWorkerFailedBeforeError = err;\n onErrorCallback(err);\n });\n };\n DefaultWorkerFactory.LAST_WORKER_ID = 0;\n return DefaultWorkerFactory;\n}());\nexport { DefaultWorkerFactory };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport { LcsDiff } from '../../../base/common/diff/diff';\nimport * as strings from '../../../base/common/strings';\nvar MAXIMUM_RUN_TIME = 5000; // 5 seconds\nvar MINIMUM_MATCHING_CHARACTER_LENGTH = 3;\nfunction computeDiff(originalSequence, modifiedSequence, continueProcessingPredicate, pretty) {\n var diffAlgo = new LcsDiff(originalSequence, modifiedSequence, continueProcessingPredicate);\n return diffAlgo.ComputeDiff(pretty);\n}\nvar LineMarkerSequence = /** @class */ (function () {\n function LineMarkerSequence(lines) {\n var startColumns = [];\n var endColumns = [];\n for (var i = 0, length_1 = lines.length; i < length_1; i++) {\n startColumns[i] = LineMarkerSequence._getFirstNonBlankColumn(lines[i], 1);\n endColumns[i] = LineMarkerSequence._getLastNonBlankColumn(lines[i], 1);\n }\n this._lines = lines;\n this._startColumns = startColumns;\n this._endColumns = endColumns;\n }\n LineMarkerSequence.prototype.getLength = function () {\n return this._lines.length;\n };\n LineMarkerSequence.prototype.getElementAtIndex = function (i) {\n return this._lines[i].substring(this._startColumns[i] - 1, this._endColumns[i] - 1);\n };\n LineMarkerSequence.prototype.getStartLineNumber = function (i) {\n return i + 1;\n };\n LineMarkerSequence.prototype.getEndLineNumber = function (i) {\n return i + 1;\n };\n LineMarkerSequence._getFirstNonBlankColumn = function (txt, defaultValue) {\n var r = strings.firstNonWhitespaceIndex(txt);\n if (r === -1) {\n return defaultValue;\n }\n return r + 1;\n };\n LineMarkerSequence._getLastNonBlankColumn = function (txt, defaultValue) {\n var r = strings.lastNonWhitespaceIndex(txt);\n if (r === -1) {\n return defaultValue;\n }\n return r + 2;\n };\n LineMarkerSequence.prototype.getCharSequence = function (shouldIgnoreTrimWhitespace, startIndex, endIndex) {\n var charCodes = [];\n var lineNumbers = [];\n var columns = [];\n var len = 0;\n for (var index = startIndex; index <= endIndex; index++) {\n var lineContent = this._lines[index];\n var startColumn = (shouldIgnoreTrimWhitespace ? this._startColumns[index] : 1);\n var endColumn = (shouldIgnoreTrimWhitespace ? this._endColumns[index] : lineContent.length + 1);\n for (var col = startColumn; col < endColumn; col++) {\n charCodes[len] = lineContent.charCodeAt(col - 1);\n lineNumbers[len] = index + 1;\n columns[len] = col;\n len++;\n }\n }\n return new CharSequence(charCodes, lineNumbers, columns);\n };\n return LineMarkerSequence;\n}());\nvar CharSequence = /** @class */ (function () {\n function CharSequence(charCodes, lineNumbers, columns) {\n this._charCodes = charCodes;\n this._lineNumbers = lineNumbers;\n this._columns = columns;\n }\n CharSequence.prototype.getLength = function () {\n return this._charCodes.length;\n };\n CharSequence.prototype.getElementAtIndex = function (i) {\n return this._charCodes[i];\n };\n CharSequence.prototype.getStartLineNumber = function (i) {\n return this._lineNumbers[i];\n };\n CharSequence.prototype.getStartColumn = function (i) {\n return this._columns[i];\n };\n CharSequence.prototype.getEndLineNumber = function (i) {\n return this._lineNumbers[i];\n };\n CharSequence.prototype.getEndColumn = function (i) {\n return this._columns[i] + 1;\n };\n return CharSequence;\n}());\nvar CharChange = /** @class */ (function () {\n function CharChange(originalStartLineNumber, originalStartColumn, originalEndLineNumber, originalEndColumn, modifiedStartLineNumber, modifiedStartColumn, modifiedEndLineNumber, modifiedEndColumn) {\n this.originalStartLineNumber = originalStartLineNumber;\n this.originalStartColumn = originalStartColumn;\n this.originalEndLineNumber = originalEndLineNumber;\n this.originalEndColumn = originalEndColumn;\n this.modifiedStartLineNumber = modifiedStartLineNumber;\n this.modifiedStartColumn = modifiedStartColumn;\n this.modifiedEndLineNumber = modifiedEndLineNumber;\n this.modifiedEndColumn = modifiedEndColumn;\n }\n CharChange.createFromDiffChange = function (diffChange, originalCharSequence, modifiedCharSequence) {\n var originalStartLineNumber;\n var originalStartColumn;\n var originalEndLineNumber;\n var originalEndColumn;\n var modifiedStartLineNumber;\n var modifiedStartColumn;\n var modifiedEndLineNumber;\n var modifiedEndColumn;\n if (diffChange.originalLength === 0) {\n originalStartLineNumber = 0;\n originalStartColumn = 0;\n originalEndLineNumber = 0;\n originalEndColumn = 0;\n }\n else {\n originalStartLineNumber = originalCharSequence.getStartLineNumber(diffChange.originalStart);\n originalStartColumn = originalCharSequence.getStartColumn(diffChange.originalStart);\n originalEndLineNumber = originalCharSequence.getEndLineNumber(diffChange.originalStart + diffChange.originalLength - 1);\n originalEndColumn = originalCharSequence.getEndColumn(diffChange.originalStart + diffChange.originalLength - 1);\n }\n if (diffChange.modifiedLength === 0) {\n modifiedStartLineNumber = 0;\n modifiedStartColumn = 0;\n modifiedEndLineNumber = 0;\n modifiedEndColumn = 0;\n }\n else {\n modifiedStartLineNumber = modifiedCharSequence.getStartLineNumber(diffChange.modifiedStart);\n modifiedStartColumn = modifiedCharSequence.getStartColumn(diffChange.modifiedStart);\n modifiedEndLineNumber = modifiedCharSequence.getEndLineNumber(diffChange.modifiedStart + diffChange.modifiedLength - 1);\n modifiedEndColumn = modifiedCharSequence.getEndColumn(diffChange.modifiedStart + diffChange.modifiedLength - 1);\n }\n return new CharChange(originalStartLineNumber, originalStartColumn, originalEndLineNumber, originalEndColumn, modifiedStartLineNumber, modifiedStartColumn, modifiedEndLineNumber, modifiedEndColumn);\n };\n return CharChange;\n}());\nfunction postProcessCharChanges(rawChanges) {\n if (rawChanges.length <= 1) {\n return rawChanges;\n }\n var result = [rawChanges[0]];\n var prevChange = result[0];\n for (var i = 1, len = rawChanges.length; i < len; i++) {\n var currChange = rawChanges[i];\n var originalMatchingLength = currChange.originalStart - (prevChange.originalStart + prevChange.originalLength);\n var modifiedMatchingLength = currChange.modifiedStart - (prevChange.modifiedStart + prevChange.modifiedLength);\n // Both of the above should be equal, but the continueProcessingPredicate may prevent this from being true\n var matchingLength = Math.min(originalMatchingLength, modifiedMatchingLength);\n if (matchingLength < MINIMUM_MATCHING_CHARACTER_LENGTH) {\n // Merge the current change into the previous one\n prevChange.originalLength = (currChange.originalStart + currChange.originalLength) - prevChange.originalStart;\n prevChange.modifiedLength = (currChange.modifiedStart + currChange.modifiedLength) - prevChange.modifiedStart;\n }\n else {\n // Add the current change\n result.push(currChange);\n prevChange = currChange;\n }\n }\n return result;\n}\nvar LineChange = /** @class */ (function () {\n function LineChange(originalStartLineNumber, originalEndLineNumber, modifiedStartLineNumber, modifiedEndLineNumber, charChanges) {\n this.originalStartLineNumber = originalStartLineNumber;\n this.originalEndLineNumber = originalEndLineNumber;\n this.modifiedStartLineNumber = modifiedStartLineNumber;\n this.modifiedEndLineNumber = modifiedEndLineNumber;\n this.charChanges = charChanges;\n }\n LineChange.createFromDiffResult = function (shouldIgnoreTrimWhitespace, diffChange, originalLineSequence, modifiedLineSequence, continueProcessingPredicate, shouldComputeCharChanges, shouldPostProcessCharChanges) {\n var originalStartLineNumber;\n var originalEndLineNumber;\n var modifiedStartLineNumber;\n var modifiedEndLineNumber;\n var charChanges;\n if (diffChange.originalLength === 0) {\n originalStartLineNumber = originalLineSequence.getStartLineNumber(diffChange.originalStart) - 1;\n originalEndLineNumber = 0;\n }\n else {\n originalStartLineNumber = originalLineSequence.getStartLineNumber(diffChange.originalStart);\n originalEndLineNumber = originalLineSequence.getEndLineNumber(diffChange.originalStart + diffChange.originalLength - 1);\n }\n if (diffChange.modifiedLength === 0) {\n modifiedStartLineNumber = modifiedLineSequence.getStartLineNumber(diffChange.modifiedStart) - 1;\n modifiedEndLineNumber = 0;\n }\n else {\n modifiedStartLineNumber = modifiedLineSequence.getStartLineNumber(diffChange.modifiedStart);\n modifiedEndLineNumber = modifiedLineSequence.getEndLineNumber(diffChange.modifiedStart + diffChange.modifiedLength - 1);\n }\n if (shouldComputeCharChanges && diffChange.originalLength !== 0 && diffChange.modifiedLength !== 0 && continueProcessingPredicate()) {\n var originalCharSequence = originalLineSequence.getCharSequence(shouldIgnoreTrimWhitespace, diffChange.originalStart, diffChange.originalStart + diffChange.originalLength - 1);\n var modifiedCharSequence = modifiedLineSequence.getCharSequence(shouldIgnoreTrimWhitespace, diffChange.modifiedStart, diffChange.modifiedStart + diffChange.modifiedLength - 1);\n var rawChanges = computeDiff(originalCharSequence, modifiedCharSequence, continueProcessingPredicate, true);\n if (shouldPostProcessCharChanges) {\n rawChanges = postProcessCharChanges(rawChanges);\n }\n charChanges = [];\n for (var i = 0, length_2 = rawChanges.length; i < length_2; i++) {\n charChanges.push(CharChange.createFromDiffChange(rawChanges[i], originalCharSequence, modifiedCharSequence));\n }\n }\n return new LineChange(originalStartLineNumber, originalEndLineNumber, modifiedStartLineNumber, modifiedEndLineNumber, charChanges);\n };\n return LineChange;\n}());\nvar DiffComputer = /** @class */ (function () {\n function DiffComputer(originalLines, modifiedLines, opts) {\n this.shouldComputeCharChanges = opts.shouldComputeCharChanges;\n this.shouldPostProcessCharChanges = opts.shouldPostProcessCharChanges;\n this.shouldIgnoreTrimWhitespace = opts.shouldIgnoreTrimWhitespace;\n this.shouldMakePrettyDiff = opts.shouldMakePrettyDiff;\n this.maximumRunTimeMs = MAXIMUM_RUN_TIME;\n this.originalLines = originalLines;\n this.modifiedLines = modifiedLines;\n this.original = new LineMarkerSequence(originalLines);\n this.modified = new LineMarkerSequence(modifiedLines);\n }\n DiffComputer.prototype.computeDiff = function () {\n if (this.original.getLength() === 1 && this.original.getElementAtIndex(0).length === 0) {\n // empty original => fast path\n return [{\n originalStartLineNumber: 1,\n originalEndLineNumber: 1,\n modifiedStartLineNumber: 1,\n modifiedEndLineNumber: this.modified.getLength(),\n charChanges: [{\n modifiedEndColumn: 0,\n modifiedEndLineNumber: 0,\n modifiedStartColumn: 0,\n modifiedStartLineNumber: 0,\n originalEndColumn: 0,\n originalEndLineNumber: 0,\n originalStartColumn: 0,\n originalStartLineNumber: 0\n }]\n }];\n }\n if (this.modified.getLength() === 1 && this.modified.getElementAtIndex(0).length === 0) {\n // empty modified => fast path\n return [{\n originalStartLineNumber: 1,\n originalEndLineNumber: this.original.getLength(),\n modifiedStartLineNumber: 1,\n modifiedEndLineNumber: 1,\n charChanges: [{\n modifiedEndColumn: 0,\n modifiedEndLineNumber: 0,\n modifiedStartColumn: 0,\n modifiedStartLineNumber: 0,\n originalEndColumn: 0,\n originalEndLineNumber: 0,\n originalStartColumn: 0,\n originalStartLineNumber: 0\n }]\n }];\n }\n this.computationStartTime = (new Date()).getTime();\n var rawChanges = computeDiff(this.original, this.modified, this._continueProcessingPredicate.bind(this), this.shouldMakePrettyDiff);\n // The diff is always computed with ignoring trim whitespace\n // This ensures we get the prettiest diff\n if (this.shouldIgnoreTrimWhitespace) {\n var lineChanges = [];\n for (var i = 0, length_3 = rawChanges.length; i < length_3; i++) {\n lineChanges.push(LineChange.createFromDiffResult(this.shouldIgnoreTrimWhitespace, rawChanges[i], this.original, this.modified, this._continueProcessingPredicate.bind(this), this.shouldComputeCharChanges, this.shouldPostProcessCharChanges));\n }\n return lineChanges;\n }\n // Need to post-process and introduce changes where the trim whitespace is different\n // Note that we are looping starting at -1 to also cover the lines before the first change\n var result = [];\n var originalLineIndex = 0;\n var modifiedLineIndex = 0;\n for (var i = -1 /* !!!! */, len = rawChanges.length; i < len; i++) {\n var nextChange = (i + 1 < len ? rawChanges[i + 1] : null);\n var originalStop = (nextChange ? nextChange.originalStart : this.originalLines.length);\n var modifiedStop = (nextChange ? nextChange.modifiedStart : this.modifiedLines.length);\n while (originalLineIndex < originalStop && modifiedLineIndex < modifiedStop) {\n var originalLine = this.originalLines[originalLineIndex];\n var modifiedLine = this.modifiedLines[modifiedLineIndex];\n if (originalLine !== modifiedLine) {\n // These lines differ only in trim whitespace\n // Check the leading whitespace\n {\n var originalStartColumn = LineMarkerSequence._getFirstNonBlankColumn(originalLine, 1);\n var modifiedStartColumn = LineMarkerSequence._getFirstNonBlankColumn(modifiedLine, 1);\n while (originalStartColumn > 1 && modifiedStartColumn > 1) {\n var originalChar = originalLine.charCodeAt(originalStartColumn - 2);\n var modifiedChar = modifiedLine.charCodeAt(modifiedStartColumn - 2);\n if (originalChar !== modifiedChar) {\n break;\n }\n originalStartColumn--;\n modifiedStartColumn--;\n }\n if (originalStartColumn > 1 || modifiedStartColumn > 1) {\n this._pushTrimWhitespaceCharChange(result, originalLineIndex + 1, 1, originalStartColumn, modifiedLineIndex + 1, 1, modifiedStartColumn);\n }\n }\n // Check the trailing whitespace\n {\n var originalEndColumn = LineMarkerSequence._getLastNonBlankColumn(originalLine, 1);\n var modifiedEndColumn = LineMarkerSequence._getLastNonBlankColumn(modifiedLine, 1);\n var originalMaxColumn = originalLine.length + 1;\n var modifiedMaxColumn = modifiedLine.length + 1;\n while (originalEndColumn < originalMaxColumn && modifiedEndColumn < modifiedMaxColumn) {\n var originalChar = originalLine.charCodeAt(originalEndColumn - 1);\n var modifiedChar = originalLine.charCodeAt(modifiedEndColumn - 1);\n if (originalChar !== modifiedChar) {\n break;\n }\n originalEndColumn++;\n modifiedEndColumn++;\n }\n if (originalEndColumn < originalMaxColumn || modifiedEndColumn < modifiedMaxColumn) {\n this._pushTrimWhitespaceCharChange(result, originalLineIndex + 1, originalEndColumn, originalMaxColumn, modifiedLineIndex + 1, modifiedEndColumn, modifiedMaxColumn);\n }\n }\n }\n originalLineIndex++;\n modifiedLineIndex++;\n }\n if (nextChange) {\n // Emit the actual change\n result.push(LineChange.createFromDiffResult(this.shouldIgnoreTrimWhitespace, nextChange, this.original, this.modified, this._continueProcessingPredicate.bind(this), this.shouldComputeCharChanges, this.shouldPostProcessCharChanges));\n originalLineIndex += nextChange.originalLength;\n modifiedLineIndex += nextChange.modifiedLength;\n }\n }\n return result;\n };\n DiffComputer.prototype._pushTrimWhitespaceCharChange = function (result, originalLineNumber, originalStartColumn, originalEndColumn, modifiedLineNumber, modifiedStartColumn, modifiedEndColumn) {\n if (this._mergeTrimWhitespaceCharChange(result, originalLineNumber, originalStartColumn, originalEndColumn, modifiedLineNumber, modifiedStartColumn, modifiedEndColumn)) {\n // Merged into previous\n return;\n }\n var charChanges;\n if (this.shouldComputeCharChanges) {\n charChanges = [new CharChange(originalLineNumber, originalStartColumn, originalLineNumber, originalEndColumn, modifiedLineNumber, modifiedStartColumn, modifiedLineNumber, modifiedEndColumn)];\n }\n result.push(new LineChange(originalLineNumber, originalLineNumber, modifiedLineNumber, modifiedLineNumber, charChanges));\n };\n DiffComputer.prototype._mergeTrimWhitespaceCharChange = function (result, originalLineNumber, originalStartColumn, originalEndColumn, modifiedLineNumber, modifiedStartColumn, modifiedEndColumn) {\n var len = result.length;\n if (len === 0) {\n return false;\n }\n var prevChange = result[len - 1];\n if (prevChange.originalEndLineNumber === 0 || prevChange.modifiedEndLineNumber === 0) {\n // Don't merge with inserts/deletes\n return false;\n }\n if (prevChange.originalEndLineNumber + 1 === originalLineNumber && prevChange.modifiedEndLineNumber + 1 === modifiedLineNumber) {\n prevChange.originalEndLineNumber = originalLineNumber;\n prevChange.modifiedEndLineNumber = modifiedLineNumber;\n if (this.shouldComputeCharChanges) {\n prevChange.charChanges.push(new CharChange(originalLineNumber, originalStartColumn, originalLineNumber, originalEndColumn, modifiedLineNumber, modifiedStartColumn, modifiedLineNumber, modifiedEndColumn));\n }\n return true;\n }\n return false;\n };\n DiffComputer.prototype._continueProcessingPredicate = function () {\n if (this.maximumRunTimeMs === 0) {\n return true;\n }\n var now = (new Date()).getTime();\n return now - this.computationStartTime < this.maximumRunTimeMs;\n };\n return DiffComputer;\n}());\nexport { DiffComputer };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport { PrefixSumComputer } from '../viewModel/prefixSumComputer';\nimport { Position } from '../core/position';\nvar MirrorTextModel = /** @class */ (function () {\n function MirrorTextModel(uri, lines, eol, versionId) {\n this._uri = uri;\n this._lines = lines;\n this._eol = eol;\n this._versionId = versionId;\n }\n MirrorTextModel.prototype.dispose = function () {\n this._lines.length = 0;\n };\n MirrorTextModel.prototype.getText = function () {\n return this._lines.join(this._eol);\n };\n MirrorTextModel.prototype.onEvents = function (e) {\n if (e.eol && e.eol !== this._eol) {\n this._eol = e.eol;\n this._lineStarts = null;\n }\n // Update my lines\n var changes = e.changes;\n for (var i = 0, len = changes.length; i < len; i++) {\n var change = changes[i];\n this._acceptDeleteRange(change.range);\n this._acceptInsertText(new Position(change.range.startLineNumber, change.range.startColumn), change.text);\n }\n this._versionId = e.versionId;\n };\n MirrorTextModel.prototype._ensureLineStarts = function () {\n if (!this._lineStarts) {\n var eolLength = this._eol.length;\n var linesLength = this._lines.length;\n var lineStartValues = new Uint32Array(linesLength);\n for (var i = 0; i < linesLength; i++) {\n lineStartValues[i] = this._lines[i].length + eolLength;\n }\n this._lineStarts = new PrefixSumComputer(lineStartValues);\n }\n };\n /**\n * All changes to a line's text go through this method\n */\n MirrorTextModel.prototype._setLineText = function (lineIndex, newValue) {\n this._lines[lineIndex] = newValue;\n if (this._lineStarts) {\n // update prefix sum\n this._lineStarts.changeValue(lineIndex, this._lines[lineIndex].length + this._eol.length);\n }\n };\n MirrorTextModel.prototype._acceptDeleteRange = function (range) {\n if (range.startLineNumber === range.endLineNumber) {\n if (range.startColumn === range.endColumn) {\n // Nothing to delete\n return;\n }\n // Delete text on the affected line\n this._setLineText(range.startLineNumber - 1, this._lines[range.startLineNumber - 1].substring(0, range.startColumn - 1)\n + this._lines[range.startLineNumber - 1].substring(range.endColumn - 1));\n return;\n }\n // Take remaining text on last line and append it to remaining text on first line\n this._setLineText(range.startLineNumber - 1, this._lines[range.startLineNumber - 1].substring(0, range.startColumn - 1)\n + this._lines[range.endLineNumber - 1].substring(range.endColumn - 1));\n // Delete middle lines\n this._lines.splice(range.startLineNumber, range.endLineNumber - range.startLineNumber);\n if (this._lineStarts) {\n // update prefix sum\n this._lineStarts.removeValues(range.startLineNumber, range.endLineNumber - range.startLineNumber);\n }\n };\n MirrorTextModel.prototype._acceptInsertText = function (position, insertText) {\n if (insertText.length === 0) {\n // Nothing to insert\n return;\n }\n var insertLines = insertText.split(/\\r\\n|\\r|\\n/);\n if (insertLines.length === 1) {\n // Inserting text on one line\n this._setLineText(position.lineNumber - 1, this._lines[position.lineNumber - 1].substring(0, position.column - 1)\n + insertLines[0]\n + this._lines[position.lineNumber - 1].substring(position.column - 1));\n return;\n }\n // Append overflowing text from first line to the end of text to insert\n insertLines[insertLines.length - 1] += this._lines[position.lineNumber - 1].substring(position.column - 1);\n // Delete overflowing text from first line and insert text on first line\n this._setLineText(position.lineNumber - 1, this._lines[position.lineNumber - 1].substring(0, position.column - 1)\n + insertLines[0]);\n // Insert new lines & store lengths\n var newLengths = new Uint32Array(insertLines.length - 1);\n for (var i = 1; i < insertLines.length; i++) {\n this._lines.splice(position.lineNumber + i - 1, 0, insertLines[i]);\n newLengths[i - 1] = insertLines[i].length + this._eol.length;\n }\n if (this._lineStarts) {\n // update prefix sum\n this._lineStarts.insertValues(position.lineNumber, newLengths);\n }\n };\n return MirrorTextModel;\n}());\nexport { MirrorTextModel };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport { CharacterClassifier } from '../core/characterClassifier';\nimport { Uint8Matrix } from '../core/uint';\nvar StateMachine = /** @class */ (function () {\n function StateMachine(edges) {\n var maxCharCode = 0;\n var maxState = 0 /* Invalid */;\n for (var i = 0, len = edges.length; i < len; i++) {\n var _a = edges[i], from = _a[0], chCode = _a[1], to = _a[2];\n if (chCode > maxCharCode) {\n maxCharCode = chCode;\n }\n if (from > maxState) {\n maxState = from;\n }\n if (to > maxState) {\n maxState = to;\n }\n }\n maxCharCode++;\n maxState++;\n var states = new Uint8Matrix(maxState, maxCharCode, 0 /* Invalid */);\n for (var i = 0, len = edges.length; i < len; i++) {\n var _b = edges[i], from = _b[0], chCode = _b[1], to = _b[2];\n states.set(from, chCode, to);\n }\n this._states = states;\n this._maxCharCode = maxCharCode;\n }\n StateMachine.prototype.nextState = function (currentState, chCode) {\n if (chCode < 0 || chCode >= this._maxCharCode) {\n return 0 /* Invalid */;\n }\n return this._states.get(currentState, chCode);\n };\n return StateMachine;\n}());\n// State machine for http:// or https:// or file://\nvar _stateMachine = null;\nfunction getStateMachine() {\n if (_stateMachine === null) {\n _stateMachine = new StateMachine([\n [1 /* Start */, 104 /* h */, 2 /* H */],\n [1 /* Start */, 72 /* H */, 2 /* H */],\n [1 /* Start */, 102 /* f */, 6 /* F */],\n [1 /* Start */, 70 /* F */, 6 /* F */],\n [2 /* H */, 116 /* t */, 3 /* HT */],\n [2 /* H */, 84 /* T */, 3 /* HT */],\n [3 /* HT */, 116 /* t */, 4 /* HTT */],\n [3 /* HT */, 84 /* T */, 4 /* HTT */],\n [4 /* HTT */, 112 /* p */, 5 /* HTTP */],\n [4 /* HTT */, 80 /* P */, 5 /* HTTP */],\n [5 /* HTTP */, 115 /* s */, 9 /* BeforeColon */],\n [5 /* HTTP */, 83 /* S */, 9 /* BeforeColon */],\n [5 /* HTTP */, 58 /* Colon */, 10 /* AfterColon */],\n [6 /* F */, 105 /* i */, 7 /* FI */],\n [6 /* F */, 73 /* I */, 7 /* FI */],\n [7 /* FI */, 108 /* l */, 8 /* FIL */],\n [7 /* FI */, 76 /* L */, 8 /* FIL */],\n [8 /* FIL */, 101 /* e */, 9 /* BeforeColon */],\n [8 /* FIL */, 69 /* E */, 9 /* BeforeColon */],\n [9 /* BeforeColon */, 58 /* Colon */, 10 /* AfterColon */],\n [10 /* AfterColon */, 47 /* Slash */, 11 /* AlmostThere */],\n [11 /* AlmostThere */, 47 /* Slash */, 12 /* End */],\n ]);\n }\n return _stateMachine;\n}\nvar _classifier = null;\nfunction getClassifier() {\n if (_classifier === null) {\n _classifier = new CharacterClassifier(0 /* None */);\n var FORCE_TERMINATION_CHARACTERS = ' \\t<>\\'\\\"、。。、,.:;?!@#$%&*‘“〈《「『【〔([{「」}])〕】』」》〉”’`~…';\n for (var i = 0; i < FORCE_TERMINATION_CHARACTERS.length; i++) {\n _classifier.set(FORCE_TERMINATION_CHARACTERS.charCodeAt(i), 1 /* ForceTermination */);\n }\n var CANNOT_END_WITH_CHARACTERS = '.,;';\n for (var i = 0; i < CANNOT_END_WITH_CHARACTERS.length; i++) {\n _classifier.set(CANNOT_END_WITH_CHARACTERS.charCodeAt(i), 2 /* CannotEndIn */);\n }\n }\n return _classifier;\n}\nvar LinkComputer = /** @class */ (function () {\n function LinkComputer() {\n }\n LinkComputer._createLink = function (classifier, line, lineNumber, linkBeginIndex, linkEndIndex) {\n // Do not allow to end link in certain characters...\n var lastIncludedCharIndex = linkEndIndex - 1;\n do {\n var chCode = line.charCodeAt(lastIncludedCharIndex);\n var chClass = classifier.get(chCode);\n if (chClass !== 2 /* CannotEndIn */) {\n break;\n }\n lastIncludedCharIndex--;\n } while (lastIncludedCharIndex > linkBeginIndex);\n // Handle links enclosed in parens, square brackets and curlys.\n if (linkBeginIndex > 0) {\n var charCodeBeforeLink = line.charCodeAt(linkBeginIndex - 1);\n var lastCharCodeInLink = line.charCodeAt(lastIncludedCharIndex);\n if ((charCodeBeforeLink === 40 /* OpenParen */ && lastCharCodeInLink === 41 /* CloseParen */)\n || (charCodeBeforeLink === 91 /* OpenSquareBracket */ && lastCharCodeInLink === 93 /* CloseSquareBracket */)\n || (charCodeBeforeLink === 123 /* OpenCurlyBrace */ && lastCharCodeInLink === 125 /* CloseCurlyBrace */)) {\n // Do not end in ) if ( is before the link start\n // Do not end in ] if [ is before the link start\n // Do not end in } if { is before the link start\n lastIncludedCharIndex--;\n }\n }\n return {\n range: {\n startLineNumber: lineNumber,\n startColumn: linkBeginIndex + 1,\n endLineNumber: lineNumber,\n endColumn: lastIncludedCharIndex + 2\n },\n url: line.substring(linkBeginIndex, lastIncludedCharIndex + 1)\n };\n };\n LinkComputer.computeLinks = function (model) {\n var stateMachine = getStateMachine();\n var classifier = getClassifier();\n var result = [];\n for (var i = 1, lineCount = model.getLineCount(); i <= lineCount; i++) {\n var line = model.getLineContent(i);\n var len = line.length;\n var j = 0;\n var linkBeginIndex = 0;\n var linkBeginChCode = 0;\n var state = 1 /* Start */;\n var hasOpenParens = false;\n var hasOpenSquareBracket = false;\n var hasOpenCurlyBracket = false;\n while (j < len) {\n var resetStateMachine = false;\n var chCode = line.charCodeAt(j);\n if (state === 13 /* Accept */) {\n var chClass = void 0;\n switch (chCode) {\n case 40 /* OpenParen */:\n hasOpenParens = true;\n chClass = 0 /* None */;\n break;\n case 41 /* CloseParen */:\n chClass = (hasOpenParens ? 0 /* None */ : 1 /* ForceTermination */);\n break;\n case 91 /* OpenSquareBracket */:\n hasOpenSquareBracket = true;\n chClass = 0 /* None */;\n break;\n case 93 /* CloseSquareBracket */:\n chClass = (hasOpenSquareBracket ? 0 /* None */ : 1 /* ForceTermination */);\n break;\n case 123 /* OpenCurlyBrace */:\n hasOpenCurlyBracket = true;\n chClass = 0 /* None */;\n break;\n case 125 /* CloseCurlyBrace */:\n chClass = (hasOpenCurlyBracket ? 0 /* None */ : 1 /* ForceTermination */);\n break;\n /* The following three rules make it that ' or \" or ` are allowed inside links if the link began with a different one */\n case 39 /* SingleQuote */:\n chClass = (linkBeginChCode === 34 /* DoubleQuote */ || linkBeginChCode === 96 /* BackTick */) ? 0 /* None */ : 1 /* ForceTermination */;\n break;\n case 34 /* DoubleQuote */:\n chClass = (linkBeginChCode === 39 /* SingleQuote */ || linkBeginChCode === 96 /* BackTick */) ? 0 /* None */ : 1 /* ForceTermination */;\n break;\n case 96 /* BackTick */:\n chClass = (linkBeginChCode === 39 /* SingleQuote */ || linkBeginChCode === 34 /* DoubleQuote */) ? 0 /* None */ : 1 /* ForceTermination */;\n break;\n default:\n chClass = classifier.get(chCode);\n }\n // Check if character terminates link\n if (chClass === 1 /* ForceTermination */) {\n result.push(LinkComputer._createLink(classifier, line, i, linkBeginIndex, j));\n resetStateMachine = true;\n }\n }\n else if (state === 12 /* End */) {\n var chClass = classifier.get(chCode);\n // Check if character terminates link\n if (chClass === 1 /* ForceTermination */) {\n resetStateMachine = true;\n }\n else {\n state = 13 /* Accept */;\n }\n }\n else {\n state = stateMachine.nextState(state, chCode);\n if (state === 0 /* Invalid */) {\n resetStateMachine = true;\n }\n }\n if (resetStateMachine) {\n state = 1 /* Start */;\n hasOpenParens = false;\n hasOpenSquareBracket = false;\n hasOpenCurlyBracket = false;\n // Record where the link started\n linkBeginIndex = j + 1;\n linkBeginChCode = chCode;\n }\n j++;\n }\n if (state === 13 /* Accept */) {\n result.push(LinkComputer._createLink(classifier, line, i, linkBeginIndex, len));\n }\n }\n return result;\n };\n return LinkComputer;\n}());\n/**\n * Returns an array of all links contains in the provided\n * document. *Note* that this operation is computational\n * expensive and should not run in the UI thread.\n */\nexport function computeLinks(model) {\n if (!model || typeof model.getLineCount !== 'function' || typeof model.getLineContent !== 'function') {\n // Unknown caller!\n return [];\n }\n return LinkComputer.computeLinks(model);\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar BasicInplaceReplace = /** @class */ (function () {\n function BasicInplaceReplace() {\n this._defaultValueSet = [\n ['true', 'false'],\n ['True', 'False'],\n ['Private', 'Public', 'Friend', 'ReadOnly', 'Partial', 'Protected', 'WriteOnly'],\n ['public', 'protected', 'private'],\n ];\n }\n BasicInplaceReplace.prototype.navigateValueSet = function (range1, text1, range2, text2, up) {\n if (range1 && text1) {\n var result = this.doNavigateValueSet(text1, up);\n if (result) {\n return {\n range: range1,\n value: result\n };\n }\n }\n if (range2 && text2) {\n var result = this.doNavigateValueSet(text2, up);\n if (result) {\n return {\n range: range2,\n value: result\n };\n }\n }\n return null;\n };\n BasicInplaceReplace.prototype.doNavigateValueSet = function (text, up) {\n var numberResult = this.numberReplace(text, up);\n if (numberResult !== null) {\n return numberResult;\n }\n return this.textReplace(text, up);\n };\n BasicInplaceReplace.prototype.numberReplace = function (value, up) {\n var precision = Math.pow(10, value.length - (value.lastIndexOf('.') + 1));\n var n1 = Number(value);\n var n2 = parseFloat(value);\n if (!isNaN(n1) && !isNaN(n2) && n1 === n2) {\n if (n1 === 0 && !up) {\n return null; // don't do negative\n //\t\t\t} else if(n1 === 9 && up) {\n //\t\t\t\treturn null; // don't insert 10 into a number\n }\n else {\n n1 = Math.floor(n1 * precision);\n n1 += up ? precision : -precision;\n return String(n1 / precision);\n }\n }\n return null;\n };\n BasicInplaceReplace.prototype.textReplace = function (value, up) {\n return this.valueSetsReplace(this._defaultValueSet, value, up);\n };\n BasicInplaceReplace.prototype.valueSetsReplace = function (valueSets, value, up) {\n var result = null;\n for (var i = 0, len = valueSets.length; result === null && i < len; i++) {\n result = this.valueSetReplace(valueSets[i], value, up);\n }\n return result;\n };\n BasicInplaceReplace.prototype.valueSetReplace = function (valueSet, value, up) {\n var idx = valueSet.indexOf(value);\n if (idx >= 0) {\n idx += up ? +1 : -1;\n if (idx < 0) {\n idx = valueSet.length - 1;\n }\n else {\n idx %= valueSet.length;\n }\n return valueSet[idx];\n }\n return null;\n };\n BasicInplaceReplace.INSTANCE = new BasicInplaceReplace();\n return BasicInplaceReplace;\n}());\nexport { BasicInplaceReplace };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport URI from '../../../base/common/uri';\nimport { TPromise } from '../../../base/common/winjs.base';\nimport { Range } from '../core/range';\nimport { DiffComputer } from '../diff/diffComputer';\nimport { stringDiff } from '../../../base/common/diff/diff';\nimport { Position } from '../core/position';\nimport { MirrorTextModel as BaseMirrorModel } from '../model/mirrorTextModel';\nimport { computeLinks } from '../modes/linkComputer';\nimport { BasicInplaceReplace } from '../modes/supports/inplaceReplaceSupport';\nimport { getWordAtText, ensureValidWordDefinition } from '../model/wordHelper';\nimport { createMonacoBaseAPI } from '../standalone/standaloneBase';\nimport { globals } from '../../../base/common/platform';\n/**\n * @internal\n */\nvar MirrorModel = /** @class */ (function (_super) {\n __extends(MirrorModel, _super);\n function MirrorModel() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Object.defineProperty(MirrorModel.prototype, \"uri\", {\n get: function () {\n return this._uri;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(MirrorModel.prototype, \"version\", {\n get: function () {\n return this._versionId;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(MirrorModel.prototype, \"eol\", {\n get: function () {\n return this._eol;\n },\n enumerable: true,\n configurable: true\n });\n MirrorModel.prototype.getValue = function () {\n return this.getText();\n };\n MirrorModel.prototype.getLinesContent = function () {\n return this._lines.slice(0);\n };\n MirrorModel.prototype.getLineCount = function () {\n return this._lines.length;\n };\n MirrorModel.prototype.getLineContent = function (lineNumber) {\n return this._lines[lineNumber - 1];\n };\n MirrorModel.prototype.getWordAtPosition = function (position, wordDefinition) {\n var wordAtText = getWordAtText(position.column, ensureValidWordDefinition(wordDefinition), this._lines[position.lineNumber - 1], 0);\n if (wordAtText) {\n return new Range(position.lineNumber, wordAtText.startColumn, position.lineNumber, wordAtText.endColumn);\n }\n return null;\n };\n MirrorModel.prototype.getWordUntilPosition = function (position, wordDefinition) {\n var wordAtPosition = this.getWordAtPosition(position, wordDefinition);\n if (!wordAtPosition) {\n return {\n word: '',\n startColumn: position.column,\n endColumn: position.column\n };\n }\n return {\n word: this._lines[position.lineNumber - 1].substring(wordAtPosition.startColumn - 1, position.column - 1),\n startColumn: wordAtPosition.startColumn,\n endColumn: position.column\n };\n };\n MirrorModel.prototype.createWordIterator = function (wordDefinition) {\n var _this = this;\n var obj = {\n done: false,\n value: ''\n };\n var lineNumber = 0;\n var lineText;\n var wordRangesIdx = 0;\n var wordRanges = [];\n var next = function () {\n if (wordRangesIdx < wordRanges.length) {\n obj.done = false;\n obj.value = lineText.substring(wordRanges[wordRangesIdx].start, wordRanges[wordRangesIdx].end);\n wordRangesIdx += 1;\n }\n else if (lineNumber >= _this._lines.length) {\n obj.done = true;\n obj.value = undefined;\n }\n else {\n lineText = _this._lines[lineNumber];\n wordRanges = _this._wordenize(lineText, wordDefinition);\n wordRangesIdx = 0;\n lineNumber += 1;\n return next();\n }\n return obj;\n };\n return { next: next };\n };\n MirrorModel.prototype._wordenize = function (content, wordDefinition) {\n var result = [];\n var match;\n wordDefinition.lastIndex = 0; // reset lastIndex just to be sure\n while (match = wordDefinition.exec(content)) {\n if (match[0].length === 0) {\n // it did match the empty string\n break;\n }\n result.push({ start: match.index, end: match.index + match[0].length });\n }\n return result;\n };\n MirrorModel.prototype.getValueInRange = function (range) {\n range = this._validateRange(range);\n if (range.startLineNumber === range.endLineNumber) {\n return this._lines[range.startLineNumber - 1].substring(range.startColumn - 1, range.endColumn - 1);\n }\n var lineEnding = this._eol;\n var startLineIndex = range.startLineNumber - 1;\n var endLineIndex = range.endLineNumber - 1;\n var resultLines = [];\n resultLines.push(this._lines[startLineIndex].substring(range.startColumn - 1));\n for (var i = startLineIndex + 1; i < endLineIndex; i++) {\n resultLines.push(this._lines[i]);\n }\n resultLines.push(this._lines[endLineIndex].substring(0, range.endColumn - 1));\n return resultLines.join(lineEnding);\n };\n MirrorModel.prototype.offsetAt = function (position) {\n position = this._validatePosition(position);\n this._ensureLineStarts();\n return this._lineStarts.getAccumulatedValue(position.lineNumber - 2) + (position.column - 1);\n };\n MirrorModel.prototype.positionAt = function (offset) {\n offset = Math.floor(offset);\n offset = Math.max(0, offset);\n this._ensureLineStarts();\n var out = this._lineStarts.getIndexOf(offset);\n var lineLength = this._lines[out.index].length;\n // Ensure we return a valid position\n return {\n lineNumber: 1 + out.index,\n column: 1 + Math.min(out.remainder, lineLength)\n };\n };\n MirrorModel.prototype._validateRange = function (range) {\n var start = this._validatePosition({ lineNumber: range.startLineNumber, column: range.startColumn });\n var end = this._validatePosition({ lineNumber: range.endLineNumber, column: range.endColumn });\n if (start.lineNumber !== range.startLineNumber\n || start.column !== range.startColumn\n || end.lineNumber !== range.endLineNumber\n || end.column !== range.endColumn) {\n return {\n startLineNumber: start.lineNumber,\n startColumn: start.column,\n endLineNumber: end.lineNumber,\n endColumn: end.column\n };\n }\n return range;\n };\n MirrorModel.prototype._validatePosition = function (position) {\n if (!Position.isIPosition(position)) {\n throw new Error('bad position');\n }\n var lineNumber = position.lineNumber, column = position.column;\n var hasChanged = false;\n if (lineNumber < 1) {\n lineNumber = 1;\n column = 1;\n hasChanged = true;\n }\n else if (lineNumber > this._lines.length) {\n lineNumber = this._lines.length;\n column = this._lines[lineNumber - 1].length + 1;\n hasChanged = true;\n }\n else {\n var maxCharacter = this._lines[lineNumber - 1].length + 1;\n if (column < 1) {\n column = 1;\n hasChanged = true;\n }\n else if (column > maxCharacter) {\n column = maxCharacter;\n hasChanged = true;\n }\n }\n if (!hasChanged) {\n return position;\n }\n else {\n return { lineNumber: lineNumber, column: column };\n }\n };\n return MirrorModel;\n}(BaseMirrorModel));\n/**\n * @internal\n */\nvar BaseEditorSimpleWorker = /** @class */ (function () {\n function BaseEditorSimpleWorker(foreignModuleFactory) {\n this._foreignModuleFactory = foreignModuleFactory;\n this._foreignModule = null;\n }\n // ---- BEGIN diff --------------------------------------------------------------------------\n BaseEditorSimpleWorker.prototype.computeDiff = function (originalUrl, modifiedUrl, ignoreTrimWhitespace) {\n var original = this._getModel(originalUrl);\n var modified = this._getModel(modifiedUrl);\n if (!original || !modified) {\n return null;\n }\n var originalLines = original.getLinesContent();\n var modifiedLines = modified.getLinesContent();\n var diffComputer = new DiffComputer(originalLines, modifiedLines, {\n shouldComputeCharChanges: true,\n shouldPostProcessCharChanges: true,\n shouldIgnoreTrimWhitespace: ignoreTrimWhitespace,\n shouldMakePrettyDiff: true\n });\n return TPromise.as(diffComputer.computeDiff());\n };\n BaseEditorSimpleWorker.prototype.computeMoreMinimalEdits = function (modelUrl, edits) {\n var model = this._getModel(modelUrl);\n if (!model) {\n return TPromise.as(edits);\n }\n var result = [];\n var lastEol;\n for (var _i = 0, edits_1 = edits; _i < edits_1.length; _i++) {\n var _a = edits_1[_i], range = _a.range, text = _a.text, eol = _a.eol;\n if (typeof eol === 'number') {\n lastEol = eol;\n }\n if (!range) {\n // eol-change only\n continue;\n }\n var original = model.getValueInRange(range);\n text = text.replace(/\\r\\n|\\n|\\r/g, model.eol);\n if (original === text) {\n // noop\n continue;\n }\n // make sure diff won't take too long\n if (Math.max(text.length, original.length) > BaseEditorSimpleWorker._diffLimit) {\n result.push({ range: range, text: text });\n continue;\n }\n // compute diff between original and edit.text\n var changes = stringDiff(original, text, false);\n var editOffset = model.offsetAt(Range.lift(range).getStartPosition());\n for (var _b = 0, changes_1 = changes; _b < changes_1.length; _b++) {\n var change = changes_1[_b];\n var start = model.positionAt(editOffset + change.originalStart);\n var end = model.positionAt(editOffset + change.originalStart + change.originalLength);\n var newEdit = {\n text: text.substr(change.modifiedStart, change.modifiedLength),\n range: { startLineNumber: start.lineNumber, startColumn: start.column, endLineNumber: end.lineNumber, endColumn: end.column }\n };\n if (model.getValueInRange(newEdit.range) !== newEdit.text) {\n result.push(newEdit);\n }\n }\n }\n if (typeof lastEol === 'number') {\n result.push({ eol: lastEol, text: undefined, range: undefined });\n }\n return TPromise.as(result);\n };\n // ---- END minimal edits ---------------------------------------------------------------\n BaseEditorSimpleWorker.prototype.computeLinks = function (modelUrl) {\n var model = this._getModel(modelUrl);\n if (!model) {\n return null;\n }\n return TPromise.as(computeLinks(model));\n };\n BaseEditorSimpleWorker.prototype.textualSuggest = function (modelUrl, position, wordDef, wordDefFlags) {\n var model = this._getModel(modelUrl);\n if (model) {\n var suggestions = [];\n var wordDefRegExp = new RegExp(wordDef, wordDefFlags);\n var currentWord = model.getWordUntilPosition(position, wordDefRegExp).word;\n var seen = Object.create(null);\n seen[currentWord] = true;\n for (var iter = model.createWordIterator(wordDefRegExp), e = iter.next(); !e.done && suggestions.length <= BaseEditorSimpleWorker._suggestionsLimit; e = iter.next()) {\n var word = e.value;\n if (seen[word]) {\n continue;\n }\n seen[word] = true;\n if (!isNaN(Number(word))) {\n continue;\n }\n suggestions.push({\n type: 'text',\n label: word,\n insertText: word,\n noAutoAccept: true,\n overwriteBefore: currentWord.length\n });\n }\n return TPromise.as({ suggestions: suggestions });\n }\n return undefined;\n };\n // ---- END suggest --------------------------------------------------------------------------\n BaseEditorSimpleWorker.prototype.navigateValueSet = function (modelUrl, range, up, wordDef, wordDefFlags) {\n var model = this._getModel(modelUrl);\n if (!model) {\n return null;\n }\n var wordDefRegExp = new RegExp(wordDef, wordDefFlags);\n if (range.startColumn === range.endColumn) {\n range = {\n startLineNumber: range.startLineNumber,\n startColumn: range.startColumn,\n endLineNumber: range.endLineNumber,\n endColumn: range.endColumn + 1\n };\n }\n var selectionText = model.getValueInRange(range);\n var wordRange = model.getWordAtPosition({ lineNumber: range.startLineNumber, column: range.startColumn }, wordDefRegExp);\n var word = null;\n if (wordRange !== null) {\n word = model.getValueInRange(wordRange);\n }\n var result = BasicInplaceReplace.INSTANCE.navigateValueSet(range, selectionText, wordRange, word, up);\n return TPromise.as(result);\n };\n // ---- BEGIN foreign module support --------------------------------------------------------------------------\n BaseEditorSimpleWorker.prototype.loadForeignModule = function (moduleId, createData) {\n var _this = this;\n var ctx = {\n getMirrorModels: function () {\n return _this._getModels();\n }\n };\n if (this._foreignModuleFactory) {\n this._foreignModule = this._foreignModuleFactory(ctx, createData);\n // static foreing module\n var methods = [];\n for (var prop in this._foreignModule) {\n if (typeof this._foreignModule[prop] === 'function') {\n methods.push(prop);\n }\n }\n return TPromise.as(methods);\n }\n // ESM-comment-begin\n // \t\treturn new TPromise((c, e) => {\n // \t\t\trequire([moduleId], (foreignModule: { create: IForeignModuleFactory }) => {\n // \t\t\t\tthis._foreignModule = foreignModule.create(ctx, createData);\n // \n // \t\t\t\tlet methods: string[] = [];\n // \t\t\t\tfor (let prop in this._foreignModule) {\n // \t\t\t\t\tif (typeof this._foreignModule[prop] === 'function') {\n // \t\t\t\t\t\tmethods.push(prop);\n // \t\t\t\t\t}\n // \t\t\t\t}\n // \n // \t\t\t\tc(methods);\n // \n // \t\t\t}, e);\n // \t\t});\n // ESM-comment-end\n // ESM-uncomment-begin\n return TPromise.wrapError(new Error(\"Unexpected usage\"));\n // ESM-uncomment-end\n };\n // foreign method request\n BaseEditorSimpleWorker.prototype.fmr = function (method, args) {\n if (!this._foreignModule || typeof this._foreignModule[method] !== 'function') {\n return TPromise.wrapError(new Error('Missing requestHandler or method: ' + method));\n }\n try {\n return TPromise.as(this._foreignModule[method].apply(this._foreignModule, args));\n }\n catch (e) {\n return TPromise.wrapError(e);\n }\n };\n // ---- END diff --------------------------------------------------------------------------\n // ---- BEGIN minimal edits ---------------------------------------------------------------\n BaseEditorSimpleWorker._diffLimit = 10000;\n // ---- BEGIN suggest --------------------------------------------------------------------------\n BaseEditorSimpleWorker._suggestionsLimit = 10000;\n return BaseEditorSimpleWorker;\n}());\nexport { BaseEditorSimpleWorker };\n/**\n * @internal\n */\nvar EditorSimpleWorkerImpl = /** @class */ (function (_super) {\n __extends(EditorSimpleWorkerImpl, _super);\n function EditorSimpleWorkerImpl(foreignModuleFactory) {\n var _this = _super.call(this, foreignModuleFactory) || this;\n _this._models = Object.create(null);\n return _this;\n }\n EditorSimpleWorkerImpl.prototype.dispose = function () {\n this._models = Object.create(null);\n };\n EditorSimpleWorkerImpl.prototype._getModel = function (uri) {\n return this._models[uri];\n };\n EditorSimpleWorkerImpl.prototype._getModels = function () {\n var _this = this;\n var all = [];\n Object.keys(this._models).forEach(function (key) { return all.push(_this._models[key]); });\n return all;\n };\n EditorSimpleWorkerImpl.prototype.acceptNewModel = function (data) {\n this._models[data.url] = new MirrorModel(URI.parse(data.url), data.lines, data.EOL, data.versionId);\n };\n EditorSimpleWorkerImpl.prototype.acceptModelChanged = function (strURL, e) {\n if (!this._models[strURL]) {\n return;\n }\n var model = this._models[strURL];\n model.onEvents(e);\n };\n EditorSimpleWorkerImpl.prototype.acceptRemovedModel = function (strURL) {\n if (!this._models[strURL]) {\n return;\n }\n delete this._models[strURL];\n };\n return EditorSimpleWorkerImpl;\n}(BaseEditorSimpleWorker));\nexport { EditorSimpleWorkerImpl };\n/**\n * Called on the worker side\n * @internal\n */\nexport function create() {\n return new EditorSimpleWorkerImpl(null);\n}\nif (typeof importScripts === 'function') {\n // Running in a web worker\n globals.monaco = createMonacoBaseAPI();\n}\n","import { createDecorator } from '../../../platform/instantiation/common/instantiation';\nexport var ITextResourceConfigurationService = createDecorator('textResourceConfigurationService');\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __param = (this && this.__param) || function (paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n};\nimport { IntervalTimer, ShallowCancelThenPromise, wireCancellationToken } from '../../../base/common/async';\nimport { Disposable, dispose, toDisposable } from '../../../base/common/lifecycle';\nimport { TPromise } from '../../../base/common/winjs.base';\nimport { SimpleWorkerClient, logOnceWebWorkerWarning } from '../../../base/common/worker/simpleWorker';\nimport { DefaultWorkerFactory } from '../../../base/worker/defaultWorkerFactory';\nimport * as modes from '../modes';\nimport { IModelService } from './modelService';\nimport { EditorSimpleWorkerImpl } from './editorSimpleWorker';\nimport { LanguageConfigurationRegistry } from '../modes/languageConfigurationRegistry';\nimport { ITextResourceConfigurationService } from './resourceConfiguration';\n/**\n * Stop syncing a model to the worker if it was not needed for 1 min.\n */\nvar STOP_SYNC_MODEL_DELTA_TIME_MS = 60 * 1000;\n/**\n * Stop the worker if it was not needed for 5 min.\n */\nvar STOP_WORKER_DELTA_TIME_MS = 5 * 60 * 1000;\nfunction canSyncModel(modelService, resource) {\n var model = modelService.getModel(resource);\n if (!model) {\n return false;\n }\n if (model.isTooLargeForSyncing()) {\n return false;\n }\n return true;\n}\nvar EditorWorkerServiceImpl = /** @class */ (function (_super) {\n __extends(EditorWorkerServiceImpl, _super);\n function EditorWorkerServiceImpl(modelService, configurationService) {\n var _this = _super.call(this) || this;\n _this._modelService = modelService;\n _this._workerManager = _this._register(new WorkerManager(_this._modelService));\n // todo@joh make sure this happens only once\n _this._register(modes.LinkProviderRegistry.register('*', {\n provideLinks: function (model, token) {\n if (!canSyncModel(_this._modelService, model.uri)) {\n return TPromise.as([]); // File too large\n }\n return wireCancellationToken(token, _this._workerManager.withWorker().then(function (client) { return client.computeLinks(model.uri); }));\n }\n }));\n _this._register(modes.SuggestRegistry.register('*', new WordBasedCompletionItemProvider(_this._workerManager, configurationService, _this._modelService)));\n return _this;\n }\n EditorWorkerServiceImpl.prototype.dispose = function () {\n _super.prototype.dispose.call(this);\n };\n EditorWorkerServiceImpl.prototype.canComputeDiff = function (original, modified) {\n return (canSyncModel(this._modelService, original) && canSyncModel(this._modelService, modified));\n };\n EditorWorkerServiceImpl.prototype.computeDiff = function (original, modified, ignoreTrimWhitespace) {\n return this._workerManager.withWorker().then(function (client) { return client.computeDiff(original, modified, ignoreTrimWhitespace); });\n };\n EditorWorkerServiceImpl.prototype.computeMoreMinimalEdits = function (resource, edits) {\n if (!Array.isArray(edits) || edits.length === 0) {\n return TPromise.as(edits);\n }\n else {\n if (!canSyncModel(this._modelService, resource)) {\n return TPromise.as(edits); // File too large\n }\n return this._workerManager.withWorker().then(function (client) { return client.computeMoreMinimalEdits(resource, edits); });\n }\n };\n EditorWorkerServiceImpl.prototype.canNavigateValueSet = function (resource) {\n return (canSyncModel(this._modelService, resource));\n };\n EditorWorkerServiceImpl.prototype.navigateValueSet = function (resource, range, up) {\n return this._workerManager.withWorker().then(function (client) { return client.navigateValueSet(resource, range, up); });\n };\n EditorWorkerServiceImpl = __decorate([\n __param(0, IModelService),\n __param(1, ITextResourceConfigurationService)\n ], EditorWorkerServiceImpl);\n return EditorWorkerServiceImpl;\n}(Disposable));\nexport { EditorWorkerServiceImpl };\nvar WordBasedCompletionItemProvider = /** @class */ (function () {\n function WordBasedCompletionItemProvider(workerManager, configurationService, modelService) {\n this._workerManager = workerManager;\n this._configurationService = configurationService;\n this._modelService = modelService;\n }\n WordBasedCompletionItemProvider.prototype.provideCompletionItems = function (model, position) {\n var wordBasedSuggestions = this._configurationService.getValue(model.uri, position, 'editor').wordBasedSuggestions;\n if (!wordBasedSuggestions) {\n return undefined;\n }\n if (!canSyncModel(this._modelService, model.uri)) {\n return undefined; // File too large\n }\n return this._workerManager.withWorker().then(function (client) { return client.textualSuggest(model.uri, position); });\n };\n return WordBasedCompletionItemProvider;\n}());\nvar WorkerManager = /** @class */ (function (_super) {\n __extends(WorkerManager, _super);\n function WorkerManager(modelService) {\n var _this = _super.call(this) || this;\n _this._modelService = modelService;\n _this._editorWorkerClient = null;\n var stopWorkerInterval = _this._register(new IntervalTimer());\n stopWorkerInterval.cancelAndSet(function () { return _this._checkStopIdleWorker(); }, Math.round(STOP_WORKER_DELTA_TIME_MS / 2));\n _this._register(_this._modelService.onModelRemoved(function (_) { return _this._checkStopEmptyWorker(); }));\n return _this;\n }\n WorkerManager.prototype.dispose = function () {\n if (this._editorWorkerClient) {\n this._editorWorkerClient.dispose();\n this._editorWorkerClient = null;\n }\n _super.prototype.dispose.call(this);\n };\n /**\n * Check if the model service has no more models and stop the worker if that is the case.\n */\n WorkerManager.prototype._checkStopEmptyWorker = function () {\n if (!this._editorWorkerClient) {\n return;\n }\n var models = this._modelService.getModels();\n if (models.length === 0) {\n // There are no more models => nothing possible for me to do\n this._editorWorkerClient.dispose();\n this._editorWorkerClient = null;\n }\n };\n /**\n * Check if the worker has been idle for a while and then stop it.\n */\n WorkerManager.prototype._checkStopIdleWorker = function () {\n if (!this._editorWorkerClient) {\n return;\n }\n var timeSinceLastWorkerUsedTime = (new Date()).getTime() - this._lastWorkerUsedTime;\n if (timeSinceLastWorkerUsedTime > STOP_WORKER_DELTA_TIME_MS) {\n this._editorWorkerClient.dispose();\n this._editorWorkerClient = null;\n }\n };\n WorkerManager.prototype.withWorker = function () {\n this._lastWorkerUsedTime = (new Date()).getTime();\n if (!this._editorWorkerClient) {\n this._editorWorkerClient = new EditorWorkerClient(this._modelService, 'editorWorkerService');\n }\n return TPromise.as(this._editorWorkerClient);\n };\n return WorkerManager;\n}(Disposable));\nvar EditorModelManager = /** @class */ (function (_super) {\n __extends(EditorModelManager, _super);\n function EditorModelManager(proxy, modelService, keepIdleModels) {\n var _this = _super.call(this) || this;\n _this._syncedModels = Object.create(null);\n _this._syncedModelsLastUsedTime = Object.create(null);\n _this._proxy = proxy;\n _this._modelService = modelService;\n if (!keepIdleModels) {\n var timer = new IntervalTimer();\n timer.cancelAndSet(function () { return _this._checkStopModelSync(); }, Math.round(STOP_SYNC_MODEL_DELTA_TIME_MS / 2));\n _this._register(timer);\n }\n return _this;\n }\n EditorModelManager.prototype.dispose = function () {\n for (var modelUrl in this._syncedModels) {\n dispose(this._syncedModels[modelUrl]);\n }\n this._syncedModels = Object.create(null);\n this._syncedModelsLastUsedTime = Object.create(null);\n _super.prototype.dispose.call(this);\n };\n EditorModelManager.prototype.esureSyncedResources = function (resources) {\n for (var i = 0; i < resources.length; i++) {\n var resource = resources[i];\n var resourceStr = resource.toString();\n if (!this._syncedModels[resourceStr]) {\n this._beginModelSync(resource);\n }\n if (this._syncedModels[resourceStr]) {\n this._syncedModelsLastUsedTime[resourceStr] = (new Date()).getTime();\n }\n }\n };\n EditorModelManager.prototype._checkStopModelSync = function () {\n var currentTime = (new Date()).getTime();\n var toRemove = [];\n for (var modelUrl in this._syncedModelsLastUsedTime) {\n var elapsedTime = currentTime - this._syncedModelsLastUsedTime[modelUrl];\n if (elapsedTime > STOP_SYNC_MODEL_DELTA_TIME_MS) {\n toRemove.push(modelUrl);\n }\n }\n for (var i = 0; i < toRemove.length; i++) {\n this._stopModelSync(toRemove[i]);\n }\n };\n EditorModelManager.prototype._beginModelSync = function (resource) {\n var _this = this;\n var model = this._modelService.getModel(resource);\n if (!model) {\n return;\n }\n if (model.isTooLargeForSyncing()) {\n return;\n }\n var modelUrl = resource.toString();\n this._proxy.acceptNewModel({\n url: model.uri.toString(),\n lines: model.getLinesContent(),\n EOL: model.getEOL(),\n versionId: model.getVersionId()\n });\n var toDispose = [];\n toDispose.push(model.onDidChangeContent(function (e) {\n _this._proxy.acceptModelChanged(modelUrl.toString(), e);\n }));\n toDispose.push(model.onWillDispose(function () {\n _this._stopModelSync(modelUrl);\n }));\n toDispose.push(toDisposable(function () {\n _this._proxy.acceptRemovedModel(modelUrl);\n }));\n this._syncedModels[modelUrl] = toDispose;\n };\n EditorModelManager.prototype._stopModelSync = function (modelUrl) {\n var toDispose = this._syncedModels[modelUrl];\n delete this._syncedModels[modelUrl];\n delete this._syncedModelsLastUsedTime[modelUrl];\n dispose(toDispose);\n };\n return EditorModelManager;\n}(Disposable));\nvar SynchronousWorkerClient = /** @class */ (function () {\n function SynchronousWorkerClient(instance) {\n this._instance = instance;\n this._proxyObj = TPromise.as(this._instance);\n }\n SynchronousWorkerClient.prototype.dispose = function () {\n this._instance.dispose();\n this._instance = null;\n this._proxyObj = null;\n };\n SynchronousWorkerClient.prototype.getProxyObject = function () {\n return new ShallowCancelThenPromise(this._proxyObj);\n };\n return SynchronousWorkerClient;\n}());\nvar EditorWorkerClient = /** @class */ (function (_super) {\n __extends(EditorWorkerClient, _super);\n function EditorWorkerClient(modelService, label) {\n var _this = _super.call(this) || this;\n _this._modelService = modelService;\n _this._workerFactory = new DefaultWorkerFactory(label);\n _this._worker = null;\n _this._modelManager = null;\n return _this;\n }\n EditorWorkerClient.prototype._getOrCreateWorker = function () {\n if (!this._worker) {\n try {\n this._worker = this._register(new SimpleWorkerClient(this._workerFactory, 'vs/editor/common/services/editorSimpleWorker'));\n }\n catch (err) {\n logOnceWebWorkerWarning(err);\n this._worker = new SynchronousWorkerClient(new EditorSimpleWorkerImpl(null));\n }\n }\n return this._worker;\n };\n EditorWorkerClient.prototype._getProxy = function () {\n var _this = this;\n return new ShallowCancelThenPromise(this._getOrCreateWorker().getProxyObject().then(null, function (err) {\n logOnceWebWorkerWarning(err);\n _this._worker = new SynchronousWorkerClient(new EditorSimpleWorkerImpl(null));\n return _this._getOrCreateWorker().getProxyObject();\n }));\n };\n EditorWorkerClient.prototype._getOrCreateModelManager = function (proxy) {\n if (!this._modelManager) {\n this._modelManager = this._register(new EditorModelManager(proxy, this._modelService, false));\n }\n return this._modelManager;\n };\n EditorWorkerClient.prototype._withSyncedResources = function (resources) {\n var _this = this;\n return this._getProxy().then(function (proxy) {\n _this._getOrCreateModelManager(proxy).esureSyncedResources(resources);\n return proxy;\n });\n };\n EditorWorkerClient.prototype.computeDiff = function (original, modified, ignoreTrimWhitespace) {\n return this._withSyncedResources([original, modified]).then(function (proxy) {\n return proxy.computeDiff(original.toString(), modified.toString(), ignoreTrimWhitespace);\n });\n };\n EditorWorkerClient.prototype.computeMoreMinimalEdits = function (resource, edits) {\n return this._withSyncedResources([resource]).then(function (proxy) {\n return proxy.computeMoreMinimalEdits(resource.toString(), edits);\n });\n };\n EditorWorkerClient.prototype.computeLinks = function (resource) {\n return this._withSyncedResources([resource]).then(function (proxy) {\n return proxy.computeLinks(resource.toString());\n });\n };\n EditorWorkerClient.prototype.textualSuggest = function (resource, position) {\n var _this = this;\n return this._withSyncedResources([resource]).then(function (proxy) {\n var model = _this._modelService.getModel(resource);\n if (!model) {\n return null;\n }\n var wordDefRegExp = LanguageConfigurationRegistry.getWordDefinition(model.getLanguageIdentifier().id);\n var wordDef = wordDefRegExp.source;\n var wordDefFlags = (wordDefRegExp.global ? 'g' : '') + (wordDefRegExp.ignoreCase ? 'i' : '') + (wordDefRegExp.multiline ? 'm' : '');\n return proxy.textualSuggest(resource.toString(), position, wordDef, wordDefFlags);\n });\n };\n EditorWorkerClient.prototype.navigateValueSet = function (resource, range, up) {\n var _this = this;\n return this._withSyncedResources([resource]).then(function (proxy) {\n var model = _this._modelService.getModel(resource);\n if (!model) {\n return null;\n }\n var wordDefRegExp = LanguageConfigurationRegistry.getWordDefinition(model.getLanguageIdentifier().id);\n var wordDef = wordDefRegExp.source;\n var wordDefFlags = (wordDefRegExp.global ? 'g' : '') + (wordDefRegExp.ignoreCase ? 'i' : '') + (wordDefRegExp.multiline ? 'm' : '');\n return proxy.navigateValueSet(resource.toString(), range, up, wordDef, wordDefFlags);\n });\n };\n return EditorWorkerClient;\n}(Disposable));\nexport { EditorWorkerClient };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar FrankensteinMode = /** @class */ (function () {\n function FrankensteinMode(languageIdentifier) {\n this._languageIdentifier = languageIdentifier;\n }\n FrankensteinMode.prototype.getId = function () {\n return this._languageIdentifier.language;\n };\n FrankensteinMode.prototype.getLanguageIdentifier = function () {\n return this._languageIdentifier;\n };\n return FrankensteinMode;\n}());\nexport { FrankensteinMode };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport * as paths from './paths';\nimport * as strings from './strings';\nimport { match } from './glob';\nexport var MIME_TEXT = 'text/plain';\nexport var MIME_UNKNOWN = 'application/unknown';\nvar registeredAssociations = [];\nvar nonUserRegisteredAssociations = [];\nvar userRegisteredAssociations = [];\n/**\n * Associate a text mime to the registry.\n */\nexport function registerTextMime(association, warnOnOverwrite) {\n if (warnOnOverwrite === void 0) { warnOnOverwrite = false; }\n // Register\n var associationItem = toTextMimeAssociationItem(association);\n registeredAssociations.push(associationItem);\n if (!associationItem.userConfigured) {\n nonUserRegisteredAssociations.push(associationItem);\n }\n else {\n userRegisteredAssociations.push(associationItem);\n }\n // Check for conflicts unless this is a user configured association\n if (warnOnOverwrite && !associationItem.userConfigured) {\n registeredAssociations.forEach(function (a) {\n if (a.mime === associationItem.mime || a.userConfigured) {\n return; // same mime or userConfigured is ok\n }\n if (associationItem.extension && a.extension === associationItem.extension) {\n console.warn(\"Overwriting extension <<\" + associationItem.extension + \">> to now point to mime <<\" + associationItem.mime + \">>\");\n }\n if (associationItem.filename && a.filename === associationItem.filename) {\n console.warn(\"Overwriting filename <<\" + associationItem.filename + \">> to now point to mime <<\" + associationItem.mime + \">>\");\n }\n if (associationItem.filepattern && a.filepattern === associationItem.filepattern) {\n console.warn(\"Overwriting filepattern <<\" + associationItem.filepattern + \">> to now point to mime <<\" + associationItem.mime + \">>\");\n }\n if (associationItem.firstline && a.firstline === associationItem.firstline) {\n console.warn(\"Overwriting firstline <<\" + associationItem.firstline + \">> to now point to mime <<\" + associationItem.mime + \">>\");\n }\n });\n }\n}\nfunction toTextMimeAssociationItem(association) {\n return {\n id: association.id,\n mime: association.mime,\n filename: association.filename,\n extension: association.extension,\n filepattern: association.filepattern,\n firstline: association.firstline,\n userConfigured: association.userConfigured,\n filenameLowercase: association.filename ? association.filename.toLowerCase() : void 0,\n extensionLowercase: association.extension ? association.extension.toLowerCase() : void 0,\n filepatternLowercase: association.filepattern ? association.filepattern.toLowerCase() : void 0,\n filepatternOnPath: association.filepattern ? association.filepattern.indexOf(paths.sep) >= 0 : false\n };\n}\n/**\n * Given a file, return the best matching mime type for it\n */\nexport function guessMimeTypes(path, firstLine) {\n if (!path) {\n return [MIME_UNKNOWN];\n }\n path = path.toLowerCase();\n var filename = paths.basename(path);\n // 1.) User configured mappings have highest priority\n var configuredMime = guessMimeTypeByPath(path, filename, userRegisteredAssociations);\n if (configuredMime) {\n return [configuredMime, MIME_TEXT];\n }\n // 2.) Registered mappings have middle priority\n var registeredMime = guessMimeTypeByPath(path, filename, nonUserRegisteredAssociations);\n if (registeredMime) {\n return [registeredMime, MIME_TEXT];\n }\n // 3.) Firstline has lowest priority\n if (firstLine) {\n var firstlineMime = guessMimeTypeByFirstline(firstLine);\n if (firstlineMime) {\n return [firstlineMime, MIME_TEXT];\n }\n }\n return [MIME_UNKNOWN];\n}\nfunction guessMimeTypeByPath(path, filename, associations) {\n var filenameMatch;\n var patternMatch;\n var extensionMatch;\n // We want to prioritize associations based on the order they are registered so that the last registered\n // association wins over all other. This is for https://github.com/Microsoft/vscode/issues/20074\n for (var i = associations.length - 1; i >= 0; i--) {\n var association = associations[i];\n // First exact name match\n if (filename === association.filenameLowercase) {\n filenameMatch = association;\n break; // take it!\n }\n // Longest pattern match\n if (association.filepattern) {\n if (!patternMatch || association.filepattern.length > patternMatch.filepattern.length) {\n var target = association.filepatternOnPath ? path : filename; // match on full path if pattern contains path separator\n if (match(association.filepatternLowercase, target)) {\n patternMatch = association;\n }\n }\n }\n // Longest extension match\n if (association.extension) {\n if (!extensionMatch || association.extension.length > extensionMatch.extension.length) {\n if (strings.endsWith(filename, association.extensionLowercase)) {\n extensionMatch = association;\n }\n }\n }\n }\n // 1.) Exact name match has second highest prio\n if (filenameMatch) {\n return filenameMatch.mime;\n }\n // 2.) Match on pattern\n if (patternMatch) {\n return patternMatch.mime;\n }\n // 3.) Match on extension comes next\n if (extensionMatch) {\n return extensionMatch.mime;\n }\n return null;\n}\nfunction guessMimeTypeByFirstline(firstLine) {\n if (strings.startsWithUTF8BOM(firstLine)) {\n firstLine = firstLine.substr(1);\n }\n if (firstLine.length > 0) {\n for (var i = 0; i < registeredAssociations.length; ++i) {\n var association = registeredAssociations[i];\n if (!association.firstline) {\n continue;\n }\n var matches = firstLine.match(association.firstline);\n if (matches && matches.length > 0) {\n return association.mime;\n }\n }\n }\n return null;\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport * as nls from '../../../nls';\nimport { Emitter } from '../../../base/common/event';\nimport { Registry } from '../../../platform/registry/common/platform';\nimport { LanguageConfigurationRegistry } from './languageConfigurationRegistry';\nimport { LanguageIdentifier } from '../modes';\n// Define extension point ids\nexport var Extensions = {\n ModesRegistry: 'editor.modesRegistry'\n};\nvar EditorModesRegistry = /** @class */ (function () {\n function EditorModesRegistry() {\n this._onDidAddLanguages = new Emitter();\n this.onDidAddLanguages = this._onDidAddLanguages.event;\n this._languages = [];\n }\n // --- languages\n EditorModesRegistry.prototype.registerLanguage = function (def) {\n this._languages.push(def);\n this._onDidAddLanguages.fire([def]);\n };\n EditorModesRegistry.prototype.getLanguages = function () {\n return this._languages.slice(0);\n };\n return EditorModesRegistry;\n}());\nexport { EditorModesRegistry };\nexport var ModesRegistry = new EditorModesRegistry();\nRegistry.add(Extensions.ModesRegistry, ModesRegistry);\nexport var PLAINTEXT_MODE_ID = 'plaintext';\nexport var PLAINTEXT_LANGUAGE_IDENTIFIER = new LanguageIdentifier(PLAINTEXT_MODE_ID, 1 /* PlainText */);\nModesRegistry.registerLanguage({\n id: PLAINTEXT_MODE_ID,\n extensions: ['.txt', '.gitignore'],\n aliases: [nls.localize('plainText.alias', \"Plain Text\"), 'text'],\n mimetypes: ['text/plain']\n});\nLanguageConfigurationRegistry.register(PLAINTEXT_LANGUAGE_IDENTIFIER, {\n brackets: [\n ['(', ')'],\n ['[', ']'],\n ['{', '}'],\n ]\n});\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport { onUnexpectedError } from '../../../base/common/errors';\nimport * as mime from '../../../base/common/mime';\nimport * as strings from '../../../base/common/strings';\nimport { Registry } from '../../../platform/registry/common/platform';\nimport { ModesRegistry } from '../modes/modesRegistry';\nimport { LanguageIdentifier } from '../modes';\nimport { NULL_MODE_ID, NULL_LANGUAGE_IDENTIFIER } from '../modes/nullMode';\nimport { Extensions } from '../../../platform/configuration/common/configurationRegistry';\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar LanguagesRegistry = /** @class */ (function () {\n function LanguagesRegistry(useModesRegistry, warnOnOverwrite) {\n if (useModesRegistry === void 0) { useModesRegistry = true; }\n if (warnOnOverwrite === void 0) { warnOnOverwrite = false; }\n var _this = this;\n this._nextLanguageId = 1;\n this._languages = {};\n this._mimeTypesMap = {};\n this._nameMap = {};\n this._lowercaseNameMap = {};\n this._languageIds = [];\n this._warnOnOverwrite = warnOnOverwrite;\n if (useModesRegistry) {\n this._registerLanguages(ModesRegistry.getLanguages());\n ModesRegistry.onDidAddLanguages(function (m) { return _this._registerLanguages(m); });\n }\n }\n LanguagesRegistry.prototype._registerLanguages = function (desc) {\n var _this = this;\n if (desc.length === 0) {\n return;\n }\n for (var i = 0; i < desc.length; i++) {\n this._registerLanguage(desc[i]);\n }\n // Rebuild fast path maps\n this._mimeTypesMap = {};\n this._nameMap = {};\n this._lowercaseNameMap = {};\n Object.keys(this._languages).forEach(function (langId) {\n var language = _this._languages[langId];\n if (language.name) {\n _this._nameMap[language.name] = language.identifier;\n }\n language.aliases.forEach(function (alias) {\n _this._lowercaseNameMap[alias.toLowerCase()] = language.identifier;\n });\n language.mimetypes.forEach(function (mimetype) {\n _this._mimeTypesMap[mimetype] = language.identifier;\n });\n });\n Registry.as(Extensions.Configuration).registerOverrideIdentifiers(ModesRegistry.getLanguages().map(function (language) { return language.id; }));\n };\n LanguagesRegistry.prototype._registerLanguage = function (lang) {\n var langId = lang.id;\n var resolvedLanguage = null;\n if (hasOwnProperty.call(this._languages, langId)) {\n resolvedLanguage = this._languages[langId];\n }\n else {\n var languageId = this._nextLanguageId++;\n resolvedLanguage = {\n identifier: new LanguageIdentifier(langId, languageId),\n name: null,\n mimetypes: [],\n aliases: [],\n extensions: [],\n filenames: [],\n configurationFiles: []\n };\n this._languageIds[languageId] = langId;\n this._languages[langId] = resolvedLanguage;\n }\n this._mergeLanguage(resolvedLanguage, lang);\n };\n LanguagesRegistry.prototype._mergeLanguage = function (resolvedLanguage, lang) {\n var _a;\n var langId = lang.id;\n var primaryMime = null;\n if (Array.isArray(lang.mimetypes) && lang.mimetypes.length > 0) {\n (_a = resolvedLanguage.mimetypes).push.apply(_a, lang.mimetypes);\n primaryMime = lang.mimetypes[0];\n }\n if (!primaryMime) {\n primaryMime = \"text/x-\" + langId;\n resolvedLanguage.mimetypes.push(primaryMime);\n }\n if (Array.isArray(lang.extensions)) {\n for (var _i = 0, _b = lang.extensions; _i < _b.length; _i++) {\n var extension = _b[_i];\n mime.registerTextMime({ id: langId, mime: primaryMime, extension: extension }, this._warnOnOverwrite);\n resolvedLanguage.extensions.push(extension);\n }\n }\n if (Array.isArray(lang.filenames)) {\n for (var _c = 0, _d = lang.filenames; _c < _d.length; _c++) {\n var filename = _d[_c];\n mime.registerTextMime({ id: langId, mime: primaryMime, filename: filename }, this._warnOnOverwrite);\n resolvedLanguage.filenames.push(filename);\n }\n }\n if (Array.isArray(lang.filenamePatterns)) {\n for (var _e = 0, _f = lang.filenamePatterns; _e < _f.length; _e++) {\n var filenamePattern = _f[_e];\n mime.registerTextMime({ id: langId, mime: primaryMime, filepattern: filenamePattern }, this._warnOnOverwrite);\n }\n }\n if (typeof lang.firstLine === 'string' && lang.firstLine.length > 0) {\n var firstLineRegexStr = lang.firstLine;\n if (firstLineRegexStr.charAt(0) !== '^') {\n firstLineRegexStr = '^' + firstLineRegexStr;\n }\n try {\n var firstLineRegex = new RegExp(firstLineRegexStr);\n if (!strings.regExpLeadsToEndlessLoop(firstLineRegex)) {\n mime.registerTextMime({ id: langId, mime: primaryMime, firstline: firstLineRegex }, this._warnOnOverwrite);\n }\n }\n catch (err) {\n // Most likely, the regex was bad\n onUnexpectedError(err);\n }\n }\n resolvedLanguage.aliases.push(langId);\n var langAliases = null;\n if (typeof lang.aliases !== 'undefined' && Array.isArray(lang.aliases)) {\n if (lang.aliases.length === 0) {\n // signal that this language should not get a name\n langAliases = [null];\n }\n else {\n langAliases = lang.aliases;\n }\n }\n if (langAliases !== null) {\n for (var i = 0; i < langAliases.length; i++) {\n if (!langAliases[i] || langAliases[i].length === 0) {\n continue;\n }\n resolvedLanguage.aliases.push(langAliases[i]);\n }\n }\n var containsAliases = (langAliases !== null && langAliases.length > 0);\n if (containsAliases && langAliases[0] === null) {\n // signal that this language should not get a name\n }\n else {\n var bestName = (containsAliases ? langAliases[0] : null) || langId;\n if (containsAliases || !resolvedLanguage.name) {\n resolvedLanguage.name = bestName;\n }\n }\n if (lang.configuration) {\n resolvedLanguage.configurationFiles.push(lang.configuration);\n }\n };\n LanguagesRegistry.prototype.isRegisteredMode = function (mimetypeOrModeId) {\n // Is this a known mime type ?\n if (hasOwnProperty.call(this._mimeTypesMap, mimetypeOrModeId)) {\n return true;\n }\n // Is this a known mode id ?\n return hasOwnProperty.call(this._languages, mimetypeOrModeId);\n };\n LanguagesRegistry.prototype.getModeIdForLanguageNameLowercase = function (languageNameLower) {\n if (!hasOwnProperty.call(this._lowercaseNameMap, languageNameLower)) {\n return null;\n }\n return this._lowercaseNameMap[languageNameLower].language;\n };\n LanguagesRegistry.prototype.extractModeIds = function (commaSeparatedMimetypesOrCommaSeparatedIds) {\n var _this = this;\n if (!commaSeparatedMimetypesOrCommaSeparatedIds) {\n return [];\n }\n return (commaSeparatedMimetypesOrCommaSeparatedIds.\n split(',').\n map(function (mimeTypeOrId) { return mimeTypeOrId.trim(); }).\n map(function (mimeTypeOrId) {\n if (hasOwnProperty.call(_this._mimeTypesMap, mimeTypeOrId)) {\n return _this._mimeTypesMap[mimeTypeOrId].language;\n }\n return mimeTypeOrId;\n }).\n filter(function (modeId) {\n return hasOwnProperty.call(_this._languages, modeId);\n }));\n };\n LanguagesRegistry.prototype.getLanguageIdentifier = function (_modeId) {\n if (_modeId === NULL_MODE_ID || _modeId === 0 /* Null */) {\n return NULL_LANGUAGE_IDENTIFIER;\n }\n var modeId;\n if (typeof _modeId === 'string') {\n modeId = _modeId;\n }\n else {\n modeId = this._languageIds[_modeId];\n if (!modeId) {\n return null;\n }\n }\n if (!hasOwnProperty.call(this._languages, modeId)) {\n return null;\n }\n return this._languages[modeId].identifier;\n };\n LanguagesRegistry.prototype.getModeIdsFromFilenameOrFirstLine = function (filename, firstLine) {\n if (!filename && !firstLine) {\n return [];\n }\n var mimeTypes = mime.guessMimeTypes(filename, firstLine);\n return this.extractModeIds(mimeTypes.join(','));\n };\n return LanguagesRegistry;\n}());\nexport { LanguagesRegistry };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport { onUnexpectedError } from '../../../base/common/errors';\nimport { Emitter } from '../../../base/common/event';\nimport { TPromise } from '../../../base/common/winjs.base';\nimport { FrankensteinMode } from '../modes/abstractMode';\nimport { LanguagesRegistry } from './languagesRegistry';\nvar ModeServiceImpl = /** @class */ (function () {\n function ModeServiceImpl(warnOnOverwrite) {\n if (warnOnOverwrite === void 0) { warnOnOverwrite = false; }\n this._onDidCreateMode = new Emitter();\n this.onDidCreateMode = this._onDidCreateMode.event;\n this._instantiatedModes = {};\n this._registry = new LanguagesRegistry(true, warnOnOverwrite);\n }\n ModeServiceImpl.prototype._onReady = function () {\n return TPromise.as(true);\n };\n ModeServiceImpl.prototype.isRegisteredMode = function (mimetypeOrModeId) {\n return this._registry.isRegisteredMode(mimetypeOrModeId);\n };\n ModeServiceImpl.prototype.getModeIdForLanguageName = function (alias) {\n return this._registry.getModeIdForLanguageNameLowercase(alias);\n };\n ModeServiceImpl.prototype.getModeIdByFilenameOrFirstLine = function (filename, firstLine) {\n var modeIds = this._registry.getModeIdsFromFilenameOrFirstLine(filename, firstLine);\n if (modeIds.length > 0) {\n return modeIds[0];\n }\n return null;\n };\n ModeServiceImpl.prototype.getModeId = function (commaSeparatedMimetypesOrCommaSeparatedIds) {\n var modeIds = this._registry.extractModeIds(commaSeparatedMimetypesOrCommaSeparatedIds);\n if (modeIds.length > 0) {\n return modeIds[0];\n }\n return null;\n };\n ModeServiceImpl.prototype.getLanguageIdentifier = function (modeId) {\n return this._registry.getLanguageIdentifier(modeId);\n };\n // --- instantiation\n ModeServiceImpl.prototype.getMode = function (commaSeparatedMimetypesOrCommaSeparatedIds) {\n var modeIds = this._registry.extractModeIds(commaSeparatedMimetypesOrCommaSeparatedIds);\n var isPlainText = false;\n for (var i = 0; i < modeIds.length; i++) {\n if (this._instantiatedModes.hasOwnProperty(modeIds[i])) {\n return this._instantiatedModes[modeIds[i]];\n }\n isPlainText = isPlainText || (modeIds[i] === 'plaintext');\n }\n if (isPlainText) {\n // Try to do it synchronously\n var r_1 = null;\n this.getOrCreateMode(commaSeparatedMimetypesOrCommaSeparatedIds).then(function (mode) {\n r_1 = mode;\n }).done(null, onUnexpectedError);\n return r_1;\n }\n return null;\n };\n ModeServiceImpl.prototype.getOrCreateMode = function (commaSeparatedMimetypesOrCommaSeparatedIds) {\n var _this = this;\n return this._onReady().then(function () {\n var modeId = _this.getModeId(commaSeparatedMimetypesOrCommaSeparatedIds);\n // Fall back to plain text if no mode was found\n return _this._getOrCreateMode(modeId || 'plaintext');\n });\n };\n ModeServiceImpl.prototype.getOrCreateModeByFilenameOrFirstLine = function (filename, firstLine) {\n var _this = this;\n return this._onReady().then(function () {\n var modeId = _this.getModeIdByFilenameOrFirstLine(filename, firstLine);\n // Fall back to plain text if no mode was found\n return _this._getOrCreateMode(modeId || 'plaintext');\n });\n };\n ModeServiceImpl.prototype._getOrCreateMode = function (modeId) {\n if (!this._instantiatedModes.hasOwnProperty(modeId)) {\n var languageIdentifier = this.getLanguageIdentifier(modeId);\n this._instantiatedModes[modeId] = new FrankensteinMode(languageIdentifier);\n this._onDidCreateMode.fire(this._instantiatedModes[modeId]);\n }\n return this._instantiatedModes[modeId];\n };\n return ModeServiceImpl;\n}());\nexport { ModeServiceImpl };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __param = (this && this.__param) || function (paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n};\nimport * as nls from '../../../nls';\nimport * as network from '../../../base/common/network';\nimport { Emitter } from '../../../base/common/event';\nimport { MarkdownString } from '../../../base/common/htmlContent';\nimport { dispose } from '../../../base/common/lifecycle';\nimport { TPromise } from '../../../base/common/winjs.base';\nimport { IMarkerService, MarkerSeverity, MarkerTag } from '../../../platform/markers/common/markers';\nimport { Range } from '../core/range';\nimport { TextModel } from '../model/textModel';\nimport * as platform from '../../../base/common/platform';\nimport { IConfigurationService } from '../../../platform/configuration/common/configuration';\nimport { EDITOR_MODEL_DEFAULTS } from '../config/editorOptions';\nimport { PLAINTEXT_LANGUAGE_IDENTIFIER } from '../modes/modesRegistry';\nimport { themeColorFromId } from '../../../platform/theme/common/themeService';\nimport { overviewRulerWarning, overviewRulerError, overviewRulerInfo } from '../view/editorColorRegistry';\nimport { TrackedRangeStickiness, OverviewRulerLane, DefaultEndOfLine } from '../model';\nimport { isFalsyOrEmpty } from '../../../base/common/arrays';\nimport { basename } from '../../../base/common/paths';\nfunction MODEL_ID(resource) {\n return resource.toString();\n}\nvar ModelData = /** @class */ (function () {\n function ModelData(model, onWillDispose, onDidChangeLanguage) {\n this.model = model;\n this._markerDecorations = [];\n this._modelEventListeners = [];\n this._modelEventListeners.push(model.onWillDispose(function () { return onWillDispose(model); }));\n this._modelEventListeners.push(model.onDidChangeLanguage(function (e) { return onDidChangeLanguage(model, e); }));\n }\n ModelData.prototype.dispose = function () {\n this._markerDecorations = this.model.deltaDecorations(this._markerDecorations, []);\n this._modelEventListeners = dispose(this._modelEventListeners);\n this.model = null;\n };\n ModelData.prototype.acceptMarkerDecorations = function (newDecorations) {\n this._markerDecorations = this.model.deltaDecorations(this._markerDecorations, newDecorations);\n };\n return ModelData;\n}());\nvar ModelMarkerHandler = /** @class */ (function () {\n function ModelMarkerHandler() {\n }\n ModelMarkerHandler.setMarkers = function (modelData, markerService) {\n var _this = this;\n // Limit to the first 500 errors/warnings\n var markers = markerService.read({ resource: modelData.model.uri, take: 500 });\n var newModelDecorations = markers.map(function (marker) {\n return {\n range: _this._createDecorationRange(modelData.model, marker),\n options: _this._createDecorationOption(marker)\n };\n });\n modelData.acceptMarkerDecorations(newModelDecorations);\n };\n ModelMarkerHandler._createDecorationRange = function (model, rawMarker) {\n var ret = Range.lift(rawMarker);\n if (rawMarker.severity === MarkerSeverity.Hint && Range.spansMultipleLines(ret)) {\n // never render hints on multiple lines\n ret = ret.setEndPosition(ret.startLineNumber, ret.startColumn);\n }\n ret = model.validateRange(ret);\n if (ret.isEmpty()) {\n var word = model.getWordAtPosition(ret.getStartPosition());\n if (word) {\n ret = new Range(ret.startLineNumber, word.startColumn, ret.endLineNumber, word.endColumn);\n }\n else {\n var maxColumn = model.getLineLastNonWhitespaceColumn(ret.startLineNumber) ||\n model.getLineMaxColumn(ret.startLineNumber);\n if (maxColumn === 1) {\n // empty line\n // console.warn('marker on empty line:', marker);\n }\n else if (ret.endColumn >= maxColumn) {\n // behind eol\n ret = new Range(ret.startLineNumber, maxColumn - 1, ret.endLineNumber, maxColumn);\n }\n else {\n // extend marker to width = 1\n ret = new Range(ret.startLineNumber, ret.startColumn, ret.endLineNumber, ret.endColumn + 1);\n }\n }\n }\n else if (rawMarker.endColumn === Number.MAX_VALUE && rawMarker.startColumn === 1 && ret.startLineNumber === ret.endLineNumber) {\n var minColumn = model.getLineFirstNonWhitespaceColumn(rawMarker.startLineNumber);\n if (minColumn < ret.endColumn) {\n ret = new Range(ret.startLineNumber, minColumn, ret.endLineNumber, ret.endColumn);\n rawMarker.startColumn = minColumn;\n }\n }\n return ret;\n };\n ModelMarkerHandler._createDecorationOption = function (marker) {\n var className;\n var color;\n var darkColor;\n var zIndex;\n var inlineClassName;\n switch (marker.severity) {\n case MarkerSeverity.Hint:\n if (marker.tags && marker.tags.indexOf(MarkerTag.Unnecessary) >= 0) {\n className = \"squiggly-unnecessary\" /* EditorUnnecessaryDecoration */;\n }\n else {\n className = \"squiggly-hint\" /* EditorHintDecoration */;\n }\n zIndex = 0;\n break;\n case MarkerSeverity.Warning:\n className = \"squiggly-warning\" /* EditorWarningDecoration */;\n color = themeColorFromId(overviewRulerWarning);\n darkColor = themeColorFromId(overviewRulerWarning);\n zIndex = 20;\n break;\n case MarkerSeverity.Info:\n className = \"squiggly-info\" /* EditorInfoDecoration */;\n color = themeColorFromId(overviewRulerInfo);\n darkColor = themeColorFromId(overviewRulerInfo);\n zIndex = 10;\n break;\n case MarkerSeverity.Error:\n default:\n className = \"squiggly-error\" /* EditorErrorDecoration */;\n color = themeColorFromId(overviewRulerError);\n darkColor = themeColorFromId(overviewRulerError);\n zIndex = 30;\n break;\n }\n if (marker.tags) {\n if (marker.tags.indexOf(MarkerTag.Unnecessary) !== -1) {\n inlineClassName = \"squiggly-inline-unnecessary\" /* EditorUnnecessaryInlineDecoration */;\n }\n }\n var hoverMessage = null;\n var message = marker.message, source = marker.source, relatedInformation = marker.relatedInformation;\n if (typeof message === 'string') {\n message = message.trim();\n if (source) {\n if (/\\n/g.test(message)) {\n message = nls.localize('diagAndSourceMultiline', \"[{0}]\\n{1}\", source, message);\n }\n else {\n message = nls.localize('diagAndSource', \"[{0}] {1}\", source, message);\n }\n }\n hoverMessage = new MarkdownString().appendCodeblock('_', message);\n if (!isFalsyOrEmpty(relatedInformation)) {\n hoverMessage.appendMarkdown('\\n');\n for (var _i = 0, relatedInformation_1 = relatedInformation; _i < relatedInformation_1.length; _i++) {\n var _a = relatedInformation_1[_i], message_1 = _a.message, resource = _a.resource, startLineNumber = _a.startLineNumber, startColumn = _a.startColumn;\n hoverMessage.appendMarkdown(\"* [\" + basename(resource.path) + \"(\" + startLineNumber + \", \" + startColumn + \")](\" + resource.toString(false) + \"#\" + startLineNumber + \",\" + startColumn + \"): \");\n hoverMessage.appendText(\"\" + message_1);\n hoverMessage.appendMarkdown('\\n');\n }\n hoverMessage.appendMarkdown('\\n');\n }\n }\n return {\n stickiness: TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges,\n className: className,\n hoverMessage: hoverMessage,\n showIfCollapsed: true,\n overviewRuler: {\n color: color,\n darkColor: darkColor,\n position: OverviewRulerLane.Right\n },\n zIndex: zIndex,\n inlineClassName: inlineClassName,\n };\n };\n return ModelMarkerHandler;\n}());\nvar DEFAULT_EOL = (platform.isLinux || platform.isMacintosh) ? DefaultEndOfLine.LF : DefaultEndOfLine.CRLF;\nvar ModelServiceImpl = /** @class */ (function () {\n function ModelServiceImpl(markerService, configurationService) {\n var _this = this;\n this._markerService = markerService;\n this._configurationService = configurationService;\n this._models = {};\n this._modelCreationOptionsByLanguageAndResource = Object.create(null);\n this._onModelAdded = new Emitter();\n this._onModelRemoved = new Emitter();\n this._onModelModeChanged = new Emitter();\n if (this._markerService) {\n this._markerServiceSubscription = this._markerService.onMarkerChanged(this._handleMarkerChange, this);\n }\n this._configurationServiceSubscription = this._configurationService.onDidChangeConfiguration(function (e) { return _this._updateModelOptions(); });\n this._updateModelOptions();\n }\n ModelServiceImpl._readModelOptions = function (config, isForSimpleWidget) {\n var tabSize = EDITOR_MODEL_DEFAULTS.tabSize;\n if (config.editor && typeof config.editor.tabSize !== 'undefined') {\n var parsedTabSize = parseInt(config.editor.tabSize, 10);\n if (!isNaN(parsedTabSize)) {\n tabSize = parsedTabSize;\n }\n if (tabSize < 1) {\n tabSize = 1;\n }\n }\n var insertSpaces = EDITOR_MODEL_DEFAULTS.insertSpaces;\n if (config.editor && typeof config.editor.insertSpaces !== 'undefined') {\n insertSpaces = (config.editor.insertSpaces === 'false' ? false : Boolean(config.editor.insertSpaces));\n }\n var newDefaultEOL = DEFAULT_EOL;\n var eol = config.files && config.files.eol;\n if (eol === '\\r\\n') {\n newDefaultEOL = DefaultEndOfLine.CRLF;\n }\n else if (eol === '\\n') {\n newDefaultEOL = DefaultEndOfLine.LF;\n }\n var trimAutoWhitespace = EDITOR_MODEL_DEFAULTS.trimAutoWhitespace;\n if (config.editor && typeof config.editor.trimAutoWhitespace !== 'undefined') {\n trimAutoWhitespace = (config.editor.trimAutoWhitespace === 'false' ? false : Boolean(config.editor.trimAutoWhitespace));\n }\n var detectIndentation = EDITOR_MODEL_DEFAULTS.detectIndentation;\n if (config.editor && typeof config.editor.detectIndentation !== 'undefined') {\n detectIndentation = (config.editor.detectIndentation === 'false' ? false : Boolean(config.editor.detectIndentation));\n }\n var largeFileOptimizations = EDITOR_MODEL_DEFAULTS.largeFileOptimizations;\n if (config.editor && typeof config.editor.largeFileOptimizations !== 'undefined') {\n largeFileOptimizations = (config.editor.largeFileOptimizations === 'false' ? false : Boolean(config.editor.largeFileOptimizations));\n }\n return {\n isForSimpleWidget: isForSimpleWidget,\n tabSize: tabSize,\n insertSpaces: insertSpaces,\n detectIndentation: detectIndentation,\n defaultEOL: newDefaultEOL,\n trimAutoWhitespace: trimAutoWhitespace,\n largeFileOptimizations: largeFileOptimizations\n };\n };\n ModelServiceImpl.prototype.getCreationOptions = function (language, resource, isForSimpleWidget) {\n var creationOptions = this._modelCreationOptionsByLanguageAndResource[language + resource];\n if (!creationOptions) {\n creationOptions = ModelServiceImpl._readModelOptions(this._configurationService.getValue({ overrideIdentifier: language, resource: resource }), isForSimpleWidget);\n this._modelCreationOptionsByLanguageAndResource[language + resource] = creationOptions;\n }\n return creationOptions;\n };\n ModelServiceImpl.prototype._updateModelOptions = function () {\n var oldOptionsByLanguageAndResource = this._modelCreationOptionsByLanguageAndResource;\n this._modelCreationOptionsByLanguageAndResource = Object.create(null);\n // Update options on all models\n var keys = Object.keys(this._models);\n for (var i = 0, len = keys.length; i < len; i++) {\n var modelId = keys[i];\n var modelData = this._models[modelId];\n var language = modelData.model.getLanguageIdentifier().language;\n var uri = modelData.model.uri;\n var oldOptions = oldOptionsByLanguageAndResource[language + uri];\n var newOptions = this.getCreationOptions(language, uri, modelData.model.isForSimpleWidget);\n ModelServiceImpl._setModelOptionsForModel(modelData.model, newOptions, oldOptions);\n }\n };\n ModelServiceImpl._setModelOptionsForModel = function (model, newOptions, currentOptions) {\n if (currentOptions\n && (currentOptions.detectIndentation === newOptions.detectIndentation)\n && (currentOptions.insertSpaces === newOptions.insertSpaces)\n && (currentOptions.tabSize === newOptions.tabSize)\n && (currentOptions.trimAutoWhitespace === newOptions.trimAutoWhitespace)) {\n // Same indent opts, no need to touch the model\n return;\n }\n if (newOptions.detectIndentation) {\n model.detectIndentation(newOptions.insertSpaces, newOptions.tabSize);\n model.updateOptions({\n trimAutoWhitespace: newOptions.trimAutoWhitespace\n });\n }\n else {\n model.updateOptions({\n insertSpaces: newOptions.insertSpaces,\n tabSize: newOptions.tabSize,\n trimAutoWhitespace: newOptions.trimAutoWhitespace\n });\n }\n };\n ModelServiceImpl.prototype.dispose = function () {\n if (this._markerServiceSubscription) {\n this._markerServiceSubscription.dispose();\n }\n this._configurationServiceSubscription.dispose();\n };\n ModelServiceImpl.prototype._handleMarkerChange = function (changedResources) {\n var _this = this;\n changedResources.forEach(function (resource) {\n var modelId = MODEL_ID(resource);\n var modelData = _this._models[modelId];\n if (!modelData) {\n return;\n }\n ModelMarkerHandler.setMarkers(modelData, _this._markerService);\n });\n };\n ModelServiceImpl.prototype._cleanUp = function (model) {\n var _this = this;\n // clean up markers for internal, transient models\n if (model.uri.scheme === network.Schemas.inMemory\n || model.uri.scheme === network.Schemas.internal\n || model.uri.scheme === network.Schemas.vscode) {\n if (this._markerService) {\n this._markerService.read({ resource: model.uri }).map(function (marker) { return marker.owner; }).forEach(function (owner) { return _this._markerService.remove(owner, [model.uri]); });\n }\n }\n // clean up cache\n delete this._modelCreationOptionsByLanguageAndResource[model.getLanguageIdentifier().language + model.uri];\n };\n // --- begin IModelService\n ModelServiceImpl.prototype._createModelData = function (value, languageIdentifier, resource, isForSimpleWidget) {\n var _this = this;\n // create & save the model\n var options = this.getCreationOptions(languageIdentifier.language, resource, isForSimpleWidget);\n var model = new TextModel(value, options, languageIdentifier, resource);\n var modelId = MODEL_ID(model.uri);\n if (this._models[modelId]) {\n // There already exists a model with this id => this is a programmer error\n throw new Error('ModelService: Cannot add model because it already exists!');\n }\n var modelData = new ModelData(model, function (model) { return _this._onWillDispose(model); }, function (model, e) { return _this._onDidChangeLanguage(model, e); });\n this._models[modelId] = modelData;\n return modelData;\n };\n ModelServiceImpl.prototype.createModel = function (value, modeOrPromise, resource, isForSimpleWidget) {\n if (isForSimpleWidget === void 0) { isForSimpleWidget = false; }\n var modelData;\n if (!modeOrPromise || TPromise.is(modeOrPromise)) {\n modelData = this._createModelData(value, PLAINTEXT_LANGUAGE_IDENTIFIER, resource, isForSimpleWidget);\n this.setMode(modelData.model, modeOrPromise);\n }\n else {\n modelData = this._createModelData(value, modeOrPromise.getLanguageIdentifier(), resource, isForSimpleWidget);\n }\n // handle markers (marker service => model)\n if (this._markerService) {\n ModelMarkerHandler.setMarkers(modelData, this._markerService);\n }\n this._onModelAdded.fire(modelData.model);\n return modelData.model;\n };\n ModelServiceImpl.prototype.setMode = function (model, modeOrPromise) {\n if (!modeOrPromise) {\n return;\n }\n if (TPromise.is(modeOrPromise)) {\n modeOrPromise.then(function (mode) {\n if (!model.isDisposed()) {\n model.setMode(mode.getLanguageIdentifier());\n }\n });\n }\n else {\n model.setMode(modeOrPromise.getLanguageIdentifier());\n }\n };\n ModelServiceImpl.prototype.getModels = function () {\n var ret = [];\n var keys = Object.keys(this._models);\n for (var i = 0, len = keys.length; i < len; i++) {\n var modelId = keys[i];\n ret.push(this._models[modelId].model);\n }\n return ret;\n };\n ModelServiceImpl.prototype.getModel = function (resource) {\n var modelId = MODEL_ID(resource);\n var modelData = this._models[modelId];\n if (!modelData) {\n return null;\n }\n return modelData.model;\n };\n Object.defineProperty(ModelServiceImpl.prototype, \"onModelAdded\", {\n get: function () {\n return this._onModelAdded ? this._onModelAdded.event : null;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ModelServiceImpl.prototype, \"onModelRemoved\", {\n get: function () {\n return this._onModelRemoved ? this._onModelRemoved.event : null;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ModelServiceImpl.prototype, \"onModelModeChanged\", {\n get: function () {\n return this._onModelModeChanged ? this._onModelModeChanged.event : null;\n },\n enumerable: true,\n configurable: true\n });\n // --- end IModelService\n ModelServiceImpl.prototype._onWillDispose = function (model) {\n var modelId = MODEL_ID(model.uri);\n var modelData = this._models[modelId];\n delete this._models[modelId];\n modelData.dispose();\n this._cleanUp(model);\n this._onModelRemoved.fire(model);\n };\n ModelServiceImpl.prototype._onDidChangeLanguage = function (model, e) {\n var oldModeId = e.oldLanguage;\n var newModeId = model.getLanguageIdentifier().language;\n var oldOptions = this.getCreationOptions(oldModeId, model.uri, model.isForSimpleWidget);\n var newOptions = this.getCreationOptions(newModeId, model.uri, model.isForSimpleWidget);\n ModelServiceImpl._setModelOptionsForModel(model, newOptions, oldOptions);\n this._onModelModeChanged.fire({ model: model, oldModeId: oldModeId });\n };\n ModelServiceImpl = __decorate([\n __param(0, IMarkerService),\n __param(1, IConfigurationService)\n ], ModelServiceImpl);\n return ModelServiceImpl;\n}());\nexport { ModelServiceImpl };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport { Emitter } from '../../../base/common/event';\nvar AbstractCodeEditorService = /** @class */ (function () {\n function AbstractCodeEditorService() {\n this._codeEditors = Object.create(null);\n this._diffEditors = Object.create(null);\n this._onCodeEditorAdd = new Emitter();\n this._onCodeEditorRemove = new Emitter();\n this._onDiffEditorAdd = new Emitter();\n this._onDiffEditorRemove = new Emitter();\n }\n AbstractCodeEditorService.prototype.addCodeEditor = function (editor) {\n this._codeEditors[editor.getId()] = editor;\n this._onCodeEditorAdd.fire(editor);\n };\n Object.defineProperty(AbstractCodeEditorService.prototype, \"onCodeEditorAdd\", {\n get: function () {\n return this._onCodeEditorAdd.event;\n },\n enumerable: true,\n configurable: true\n });\n AbstractCodeEditorService.prototype.removeCodeEditor = function (editor) {\n if (delete this._codeEditors[editor.getId()]) {\n this._onCodeEditorRemove.fire(editor);\n }\n };\n AbstractCodeEditorService.prototype.listCodeEditors = function () {\n var _this = this;\n return Object.keys(this._codeEditors).map(function (id) { return _this._codeEditors[id]; });\n };\n AbstractCodeEditorService.prototype.addDiffEditor = function (editor) {\n this._diffEditors[editor.getId()] = editor;\n this._onDiffEditorAdd.fire(editor);\n };\n AbstractCodeEditorService.prototype.removeDiffEditor = function (editor) {\n if (delete this._diffEditors[editor.getId()]) {\n this._onDiffEditorRemove.fire(editor);\n }\n };\n AbstractCodeEditorService.prototype.listDiffEditors = function () {\n var _this = this;\n return Object.keys(this._diffEditors).map(function (id) { return _this._diffEditors[id]; });\n };\n AbstractCodeEditorService.prototype.getFocusedCodeEditor = function () {\n var editorWithWidgetFocus = null;\n var editors = this.listCodeEditors();\n for (var i = 0; i < editors.length; i++) {\n var editor = editors[i];\n if (editor.hasTextFocus()) {\n // bingo!\n return editor;\n }\n if (editor.hasWidgetFocus()) {\n editorWithWidgetFocus = editor;\n }\n }\n return editorWithWidgetFocus;\n };\n return AbstractCodeEditorService;\n}());\nexport { AbstractCodeEditorService };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __param = (this && this.__param) || function (paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n};\nimport * as strings from '../../../base/common/strings';\nimport URI from '../../../base/common/uri';\nimport * as dom from '../../../base/browser/dom';\nimport { isThemeColor } from '../../common/editorCommon';\nimport { OverviewRulerLane } from '../../common/model';\nimport { AbstractCodeEditorService } from './abstractCodeEditorService';\nimport { dispose as disposeAll } from '../../../base/common/lifecycle';\nimport { IThemeService } from '../../../platform/theme/common/themeService';\nvar CodeEditorServiceImpl = /** @class */ (function (_super) {\n __extends(CodeEditorServiceImpl, _super);\n function CodeEditorServiceImpl(themeService, styleSheet) {\n if (styleSheet === void 0) { styleSheet = dom.createStyleSheet(); }\n var _this = _super.call(this) || this;\n _this._styleSheet = styleSheet;\n _this._decorationOptionProviders = Object.create(null);\n _this._themeService = themeService;\n return _this;\n }\n CodeEditorServiceImpl.prototype.registerDecorationType = function (key, options, parentTypeKey) {\n var provider = this._decorationOptionProviders[key];\n if (!provider) {\n var providerArgs = {\n styleSheet: this._styleSheet,\n key: key,\n parentTypeKey: parentTypeKey,\n options: options || Object.create(null)\n };\n if (!parentTypeKey) {\n provider = new DecorationTypeOptionsProvider(this._themeService, providerArgs);\n }\n else {\n provider = new DecorationSubTypeOptionsProvider(this._themeService, providerArgs);\n }\n this._decorationOptionProviders[key] = provider;\n }\n provider.refCount++;\n };\n CodeEditorServiceImpl.prototype.removeDecorationType = function (key) {\n var provider = this._decorationOptionProviders[key];\n if (provider) {\n provider.refCount--;\n if (provider.refCount <= 0) {\n delete this._decorationOptionProviders[key];\n provider.dispose();\n this.listCodeEditors().forEach(function (ed) { return ed.removeDecorations(key); });\n }\n }\n };\n CodeEditorServiceImpl.prototype.resolveDecorationOptions = function (decorationTypeKey, writable) {\n var provider = this._decorationOptionProviders[decorationTypeKey];\n if (!provider) {\n throw new Error('Unknown decoration type key: ' + decorationTypeKey);\n }\n return provider.getOptions(this, writable);\n };\n CodeEditorServiceImpl = __decorate([\n __param(0, IThemeService)\n ], CodeEditorServiceImpl);\n return CodeEditorServiceImpl;\n}(AbstractCodeEditorService));\nexport { CodeEditorServiceImpl };\nvar DecorationSubTypeOptionsProvider = /** @class */ (function () {\n function DecorationSubTypeOptionsProvider(themeService, providerArgs) {\n this._parentTypeKey = providerArgs.parentTypeKey;\n this.refCount = 0;\n this._beforeContentRules = new DecorationCSSRules(3 /* BeforeContentClassName */, providerArgs, themeService);\n this._afterContentRules = new DecorationCSSRules(4 /* AfterContentClassName */, providerArgs, themeService);\n }\n DecorationSubTypeOptionsProvider.prototype.getOptions = function (codeEditorService, writable) {\n var options = codeEditorService.resolveDecorationOptions(this._parentTypeKey, true);\n if (this._beforeContentRules) {\n options.beforeContentClassName = this._beforeContentRules.className;\n }\n if (this._afterContentRules) {\n options.afterContentClassName = this._afterContentRules.className;\n }\n return options;\n };\n DecorationSubTypeOptionsProvider.prototype.dispose = function () {\n if (this._beforeContentRules) {\n this._beforeContentRules.dispose();\n this._beforeContentRules = null;\n }\n if (this._afterContentRules) {\n this._afterContentRules.dispose();\n this._afterContentRules = null;\n }\n };\n return DecorationSubTypeOptionsProvider;\n}());\nvar DecorationTypeOptionsProvider = /** @class */ (function () {\n function DecorationTypeOptionsProvider(themeService, providerArgs) {\n var _this = this;\n this.refCount = 0;\n this._disposables = [];\n var createCSSRules = function (type) {\n var rules = new DecorationCSSRules(type, providerArgs, themeService);\n if (rules.hasContent) {\n _this._disposables.push(rules);\n return rules.className;\n }\n return void 0;\n };\n var createInlineCSSRules = function (type) {\n var rules = new DecorationCSSRules(type, providerArgs, themeService);\n if (rules.hasContent) {\n _this._disposables.push(rules);\n return { className: rules.className, hasLetterSpacing: rules.hasLetterSpacing };\n }\n return null;\n };\n this.className = createCSSRules(0 /* ClassName */);\n var inlineData = createInlineCSSRules(1 /* InlineClassName */);\n if (inlineData) {\n this.inlineClassName = inlineData.className;\n this.inlineClassNameAffectsLetterSpacing = inlineData.hasLetterSpacing;\n }\n this.beforeContentClassName = createCSSRules(3 /* BeforeContentClassName */);\n this.afterContentClassName = createCSSRules(4 /* AfterContentClassName */);\n this.glyphMarginClassName = createCSSRules(2 /* GlyphMarginClassName */);\n var options = providerArgs.options;\n this.isWholeLine = Boolean(options.isWholeLine);\n this.stickiness = options.rangeBehavior;\n var lightOverviewRulerColor = options.light && options.light.overviewRulerColor || options.overviewRulerColor;\n var darkOverviewRulerColor = options.dark && options.dark.overviewRulerColor || options.overviewRulerColor;\n if (typeof lightOverviewRulerColor !== 'undefined'\n || typeof darkOverviewRulerColor !== 'undefined') {\n this.overviewRuler = {\n color: lightOverviewRulerColor || darkOverviewRulerColor,\n darkColor: darkOverviewRulerColor || lightOverviewRulerColor,\n position: options.overviewRulerLane || OverviewRulerLane.Center\n };\n }\n }\n DecorationTypeOptionsProvider.prototype.getOptions = function (codeEditorService, writable) {\n if (!writable) {\n return this;\n }\n return {\n inlineClassName: this.inlineClassName,\n beforeContentClassName: this.beforeContentClassName,\n afterContentClassName: this.afterContentClassName,\n className: this.className,\n glyphMarginClassName: this.glyphMarginClassName,\n isWholeLine: this.isWholeLine,\n overviewRuler: this.overviewRuler,\n stickiness: this.stickiness\n };\n };\n DecorationTypeOptionsProvider.prototype.dispose = function () {\n this._disposables = disposeAll(this._disposables);\n };\n return DecorationTypeOptionsProvider;\n}());\nvar _CSS_MAP = {\n color: 'color:{0} !important;',\n opacity: 'opacity:{0}; will-change: opacity;',\n backgroundColor: 'background-color:{0};',\n outline: 'outline:{0};',\n outlineColor: 'outline-color:{0};',\n outlineStyle: 'outline-style:{0};',\n outlineWidth: 'outline-width:{0};',\n border: 'border:{0};',\n borderColor: 'border-color:{0};',\n borderRadius: 'border-radius:{0};',\n borderSpacing: 'border-spacing:{0};',\n borderStyle: 'border-style:{0};',\n borderWidth: 'border-width:{0};',\n fontStyle: 'font-style:{0};',\n fontWeight: 'font-weight:{0};',\n textDecoration: 'text-decoration:{0};',\n cursor: 'cursor:{0};',\n letterSpacing: 'letter-spacing:{0};',\n gutterIconPath: 'background:url(\\'{0}\\') center center no-repeat;',\n gutterIconSize: 'background-size:{0};',\n contentText: 'content:\\'{0}\\';',\n contentIconPath: 'content:url(\\'{0}\\');',\n margin: 'margin:{0};',\n width: 'width:{0};',\n height: 'height:{0};'\n};\nvar DecorationCSSRules = /** @class */ (function () {\n function DecorationCSSRules(ruleType, providerArgs, themeService) {\n var _this = this;\n this._theme = themeService.getTheme();\n this._ruleType = ruleType;\n this._providerArgs = providerArgs;\n this._usesThemeColors = false;\n this._hasContent = false;\n this._hasLetterSpacing = false;\n var className = CSSNameHelper.getClassName(this._providerArgs.key, ruleType);\n if (this._providerArgs.parentTypeKey) {\n className = className + ' ' + CSSNameHelper.getClassName(this._providerArgs.parentTypeKey, ruleType);\n }\n this._className = className;\n this._unThemedSelector = CSSNameHelper.getSelector(this._providerArgs.key, this._providerArgs.parentTypeKey, ruleType);\n this._buildCSS();\n if (this._usesThemeColors) {\n this._themeListener = themeService.onThemeChange(function (theme) {\n _this._theme = themeService.getTheme();\n _this._removeCSS();\n _this._buildCSS();\n });\n }\n }\n DecorationCSSRules.prototype.dispose = function () {\n if (this._hasContent) {\n this._removeCSS();\n this._hasContent = false;\n }\n if (this._themeListener) {\n this._themeListener.dispose();\n this._themeListener = null;\n }\n };\n Object.defineProperty(DecorationCSSRules.prototype, \"hasContent\", {\n get: function () {\n return this._hasContent;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(DecorationCSSRules.prototype, \"hasLetterSpacing\", {\n get: function () {\n return this._hasLetterSpacing;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(DecorationCSSRules.prototype, \"className\", {\n get: function () {\n return this._className;\n },\n enumerable: true,\n configurable: true\n });\n DecorationCSSRules.prototype._buildCSS = function () {\n var options = this._providerArgs.options;\n var unthemedCSS, lightCSS, darkCSS;\n switch (this._ruleType) {\n case 0 /* ClassName */:\n unthemedCSS = this.getCSSTextForModelDecorationClassName(options);\n lightCSS = this.getCSSTextForModelDecorationClassName(options.light);\n darkCSS = this.getCSSTextForModelDecorationClassName(options.dark);\n break;\n case 1 /* InlineClassName */:\n unthemedCSS = this.getCSSTextForModelDecorationInlineClassName(options);\n lightCSS = this.getCSSTextForModelDecorationInlineClassName(options.light);\n darkCSS = this.getCSSTextForModelDecorationInlineClassName(options.dark);\n break;\n case 2 /* GlyphMarginClassName */:\n unthemedCSS = this.getCSSTextForModelDecorationGlyphMarginClassName(options);\n lightCSS = this.getCSSTextForModelDecorationGlyphMarginClassName(options.light);\n darkCSS = this.getCSSTextForModelDecorationGlyphMarginClassName(options.dark);\n break;\n case 3 /* BeforeContentClassName */:\n unthemedCSS = this.getCSSTextForModelDecorationContentClassName(options.before);\n lightCSS = this.getCSSTextForModelDecorationContentClassName(options.light && options.light.before);\n darkCSS = this.getCSSTextForModelDecorationContentClassName(options.dark && options.dark.before);\n break;\n case 4 /* AfterContentClassName */:\n unthemedCSS = this.getCSSTextForModelDecorationContentClassName(options.after);\n lightCSS = this.getCSSTextForModelDecorationContentClassName(options.light && options.light.after);\n darkCSS = this.getCSSTextForModelDecorationContentClassName(options.dark && options.dark.after);\n break;\n default:\n throw new Error('Unknown rule type: ' + this._ruleType);\n }\n var sheet = this._providerArgs.styleSheet.sheet;\n var hasContent = false;\n if (unthemedCSS.length > 0) {\n sheet.insertRule(this._unThemedSelector + \" {\" + unthemedCSS + \"}\", 0);\n hasContent = true;\n }\n if (lightCSS.length > 0) {\n sheet.insertRule(\".vs\" + this._unThemedSelector + \" {\" + lightCSS + \"}\", 0);\n hasContent = true;\n }\n if (darkCSS.length > 0) {\n sheet.insertRule(\".vs-dark\" + this._unThemedSelector + \", .hc-black\" + this._unThemedSelector + \" {\" + darkCSS + \"}\", 0);\n hasContent = true;\n }\n this._hasContent = hasContent;\n };\n DecorationCSSRules.prototype._removeCSS = function () {\n dom.removeCSSRulesContainingSelector(this._unThemedSelector, this._providerArgs.styleSheet);\n };\n /**\n * Build the CSS for decorations styled via `className`.\n */\n DecorationCSSRules.prototype.getCSSTextForModelDecorationClassName = function (opts) {\n if (!opts) {\n return '';\n }\n var cssTextArr = [];\n this.collectCSSText(opts, ['backgroundColor'], cssTextArr);\n this.collectCSSText(opts, ['outline', 'outlineColor', 'outlineStyle', 'outlineWidth'], cssTextArr);\n this.collectBorderSettingsCSSText(opts, cssTextArr);\n return cssTextArr.join('');\n };\n /**\n * Build the CSS for decorations styled via `inlineClassName`.\n */\n DecorationCSSRules.prototype.getCSSTextForModelDecorationInlineClassName = function (opts) {\n if (!opts) {\n return '';\n }\n var cssTextArr = [];\n this.collectCSSText(opts, ['fontStyle', 'fontWeight', 'textDecoration', 'cursor', 'color', 'opacity', 'letterSpacing'], cssTextArr);\n if (opts.letterSpacing) {\n this._hasLetterSpacing = true;\n }\n return cssTextArr.join('');\n };\n /**\n * Build the CSS for decorations styled before or after content.\n */\n DecorationCSSRules.prototype.getCSSTextForModelDecorationContentClassName = function (opts) {\n if (!opts) {\n return '';\n }\n var cssTextArr = [];\n if (typeof opts !== 'undefined') {\n this.collectBorderSettingsCSSText(opts, cssTextArr);\n if (typeof opts.contentIconPath !== 'undefined') {\n if (typeof opts.contentIconPath === 'string') {\n cssTextArr.push(strings.format(_CSS_MAP.contentIconPath, URI.file(opts.contentIconPath).toString().replace(/'/g, '%27')));\n }\n else {\n cssTextArr.push(strings.format(_CSS_MAP.contentIconPath, URI.revive(opts.contentIconPath).toString(true).replace(/'/g, '%27')));\n }\n }\n if (typeof opts.contentText === 'string') {\n var truncated = opts.contentText.match(/^.*$/m)[0]; // only take first line\n var escaped = truncated.replace(/['\\\\]/g, '\\\\$&');\n cssTextArr.push(strings.format(_CSS_MAP.contentText, escaped));\n }\n this.collectCSSText(opts, ['fontStyle', 'fontWeight', 'textDecoration', 'color', 'opacity', 'backgroundColor', 'margin'], cssTextArr);\n if (this.collectCSSText(opts, ['width', 'height'], cssTextArr)) {\n cssTextArr.push('display:inline-block;');\n }\n }\n return cssTextArr.join('');\n };\n /**\n * Build the CSS for decorations styled via `glpyhMarginClassName`.\n */\n DecorationCSSRules.prototype.getCSSTextForModelDecorationGlyphMarginClassName = function (opts) {\n if (!opts) {\n return '';\n }\n var cssTextArr = [];\n if (typeof opts.gutterIconPath !== 'undefined') {\n if (typeof opts.gutterIconPath === 'string') {\n cssTextArr.push(strings.format(_CSS_MAP.gutterIconPath, URI.file(opts.gutterIconPath).toString()));\n }\n else {\n cssTextArr.push(strings.format(_CSS_MAP.gutterIconPath, URI.revive(opts.gutterIconPath).toString(true).replace(/'/g, '%27')));\n }\n if (typeof opts.gutterIconSize !== 'undefined') {\n cssTextArr.push(strings.format(_CSS_MAP.gutterIconSize, opts.gutterIconSize));\n }\n }\n return cssTextArr.join('');\n };\n DecorationCSSRules.prototype.collectBorderSettingsCSSText = function (opts, cssTextArr) {\n if (this.collectCSSText(opts, ['border', 'borderColor', 'borderRadius', 'borderSpacing', 'borderStyle', 'borderWidth'], cssTextArr)) {\n cssTextArr.push(strings.format('box-sizing: border-box;'));\n return true;\n }\n return false;\n };\n DecorationCSSRules.prototype.collectCSSText = function (opts, properties, cssTextArr) {\n var lenBefore = cssTextArr.length;\n for (var _i = 0, properties_1 = properties; _i < properties_1.length; _i++) {\n var property = properties_1[_i];\n var value = this.resolveValue(opts[property]);\n if (typeof value === 'string') {\n cssTextArr.push(strings.format(_CSS_MAP[property], value));\n }\n }\n return cssTextArr.length !== lenBefore;\n };\n DecorationCSSRules.prototype.resolveValue = function (value) {\n if (isThemeColor(value)) {\n this._usesThemeColors = true;\n var color = this._theme.getColor(value.id);\n if (color) {\n return color.toString();\n }\n return 'transparent';\n }\n return value;\n };\n return DecorationCSSRules;\n}());\nvar CSSNameHelper = /** @class */ (function () {\n function CSSNameHelper() {\n }\n CSSNameHelper.getClassName = function (key, type) {\n return 'ced-' + key + '-' + type;\n };\n CSSNameHelper.getSelector = function (key, parentKey, ruleType) {\n var selector = '.monaco-editor .' + this.getClassName(key, ruleType);\n if (parentKey) {\n selector = selector + '.' + this.getClassName(parentKey, ruleType);\n }\n if (ruleType === 3 /* BeforeContentClassName */) {\n selector += '::before';\n }\n else if (ruleType === 4 /* AfterContentClassName */) {\n selector += '::after';\n }\n return selector;\n };\n return CSSNameHelper;\n}());\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { TPromise } from '../../../base/common/winjs.base';\nimport { CodeEditorServiceImpl } from '../../browser/services/codeEditorServiceImpl';\nimport { windowOpenNoOpener } from '../../../base/browser/dom';\nimport { Schemas } from '../../../base/common/network';\nvar StandaloneCodeEditorServiceImpl = /** @class */ (function (_super) {\n __extends(StandaloneCodeEditorServiceImpl, _super);\n function StandaloneCodeEditorServiceImpl() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n StandaloneCodeEditorServiceImpl.prototype.getActiveCodeEditor = function () {\n return null; // not supported in the standalone case\n };\n StandaloneCodeEditorServiceImpl.prototype.openCodeEditor = function (input, source, sideBySide) {\n if (!source) {\n return TPromise.as(null);\n }\n return TPromise.as(this.doOpenEditor(source, input));\n };\n StandaloneCodeEditorServiceImpl.prototype.doOpenEditor = function (editor, input) {\n var model = this.findModel(editor, input.resource);\n if (!model) {\n if (input.resource) {\n var schema = input.resource.scheme;\n if (schema === Schemas.http || schema === Schemas.https) {\n // This is a fully qualified http or https URL\n windowOpenNoOpener(input.resource.toString());\n return editor;\n }\n }\n return null;\n }\n var selection = input.options.selection;\n if (selection) {\n if (typeof selection.endLineNumber === 'number' && typeof selection.endColumn === 'number') {\n editor.setSelection(selection);\n editor.revealRangeInCenter(selection, 1 /* Immediate */);\n }\n else {\n var pos = {\n lineNumber: selection.startLineNumber,\n column: selection.startColumn\n };\n editor.setPosition(pos);\n editor.revealPositionInCenter(pos, 1 /* Immediate */);\n }\n }\n return editor;\n };\n StandaloneCodeEditorServiceImpl.prototype.findModel = function (editor, resource) {\n var model = editor.getModel();\n if (model.uri.toString() !== resource.toString()) {\n return null;\n }\n return model;\n };\n return StandaloneCodeEditorServiceImpl;\n}(CodeEditorServiceImpl));\nexport { StandaloneCodeEditorServiceImpl };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __param = (this && this.__param) || function (paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n};\nimport { dispose } from '../../../base/common/lifecycle';\nimport { CommandsRegistry } from '../../commands/common/commands';\nimport { KeybindingResolver } from '../../keybinding/common/keybindingResolver';\nimport { IContextKeyService, SET_CONTEXT_COMMAND_ID } from '../common/contextkey';\nimport { IConfigurationService, ConfigurationTarget } from '../../configuration/common/configuration';\nimport { Emitter, debounceEvent } from '../../../base/common/event';\nvar KEYBINDING_CONTEXT_ATTR = 'data-keybinding-context';\nvar Context = /** @class */ (function () {\n function Context(id, parent) {\n this._id = id;\n this._parent = parent;\n this._value = Object.create(null);\n this._value['_contextId'] = id;\n }\n Context.prototype.setValue = function (key, value) {\n // console.log('SET ' + key + ' = ' + value + ' ON ' + this._id);\n if (this._value[key] !== value) {\n this._value[key] = value;\n return true;\n }\n return false;\n };\n Context.prototype.removeValue = function (key) {\n // console.log('REMOVE ' + key + ' FROM ' + this._id);\n if (key in this._value) {\n delete this._value[key];\n return true;\n }\n return false;\n };\n Context.prototype.getValue = function (key) {\n var ret = this._value[key];\n if (typeof ret === 'undefined' && this._parent) {\n return this._parent.getValue(key);\n }\n return ret;\n };\n return Context;\n}());\nexport { Context };\nvar ConfigAwareContextValuesContainer = /** @class */ (function (_super) {\n __extends(ConfigAwareContextValuesContainer, _super);\n function ConfigAwareContextValuesContainer(id, configurationService, emitter) {\n var _this = _super.call(this, id, null) || this;\n _this._emitter = emitter;\n _this._configurationService = configurationService;\n _this._subscription = configurationService.onDidChangeConfiguration(_this._onConfigurationUpdated, _this);\n _this._initFromConfiguration();\n return _this;\n }\n ConfigAwareContextValuesContainer.prototype.dispose = function () {\n this._subscription.dispose();\n };\n ConfigAwareContextValuesContainer.prototype._onConfigurationUpdated = function (event) {\n if (event.source === ConfigurationTarget.DEFAULT) {\n // new setting, rebuild everything\n this._initFromConfiguration();\n }\n else {\n // update those that we know\n for (var _i = 0, _a = event.affectedKeys; _i < _a.length; _i++) {\n var configKey = _a[_i];\n var contextKey = \"config.\" + configKey;\n if (contextKey in this._value) {\n this._value[contextKey] = this._configurationService.getValue(configKey);\n this._emitter.fire(contextKey);\n }\n }\n }\n };\n ConfigAwareContextValuesContainer.prototype._initFromConfiguration = function () {\n var _this = this;\n var prefix = 'config.';\n var config = this._configurationService.getValue();\n var configKeys = Object.create(null);\n var configKeysChanged = [];\n // add new value from config\n var walk = function (obj, keys) {\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) {\n keys.push(key);\n var value = obj[key];\n if (typeof value === 'boolean') {\n var configKey = keys.join('.');\n var oldValue = _this._value[configKey];\n _this._value[configKey] = value;\n if (oldValue !== value) {\n configKeysChanged.push(configKey);\n configKeys[configKey] = true;\n }\n else {\n configKeys[configKey] = false;\n }\n }\n else if (typeof value === 'object') {\n walk(value, keys);\n }\n keys.pop();\n }\n }\n };\n walk(config, ['config']);\n // remove unused keys\n for (var key in this._value) {\n if (key.indexOf(prefix) === 0 && configKeys[key] === undefined) {\n delete this._value[key];\n configKeys[key] = true;\n configKeysChanged.push(key);\n }\n }\n // send events\n this._emitter.fire(configKeysChanged);\n };\n return ConfigAwareContextValuesContainer;\n}(Context));\nvar ContextKey = /** @class */ (function () {\n function ContextKey(parent, key, defaultValue) {\n this._parent = parent;\n this._key = key;\n this._defaultValue = defaultValue;\n this.reset();\n }\n ContextKey.prototype.set = function (value) {\n this._parent.setContext(this._key, value);\n };\n ContextKey.prototype.reset = function () {\n if (typeof this._defaultValue === 'undefined') {\n this._parent.removeContext(this._key);\n }\n else {\n this._parent.setContext(this._key, this._defaultValue);\n }\n };\n ContextKey.prototype.get = function () {\n return this._parent.getContextKeyValue(this._key);\n };\n return ContextKey;\n}());\nvar ContextKeyChangeEvent = /** @class */ (function () {\n function ContextKeyChangeEvent() {\n this._keys = [];\n }\n ContextKeyChangeEvent.prototype.collect = function (oneOrManyKeys) {\n this._keys = this._keys.concat(oneOrManyKeys);\n };\n ContextKeyChangeEvent.prototype.affectsSome = function (keys) {\n for (var _i = 0, _a = this._keys; _i < _a.length; _i++) {\n var key = _a[_i];\n if (keys.has(key)) {\n return true;\n }\n }\n return false;\n };\n return ContextKeyChangeEvent;\n}());\nexport { ContextKeyChangeEvent };\nvar AbstractContextKeyService = /** @class */ (function () {\n function AbstractContextKeyService(myContextId) {\n this._myContextId = myContextId;\n this._onDidChangeContextKey = new Emitter();\n }\n AbstractContextKeyService.prototype.createKey = function (key, defaultValue) {\n return new ContextKey(this, key, defaultValue);\n };\n Object.defineProperty(AbstractContextKeyService.prototype, \"onDidChangeContext\", {\n get: function () {\n if (!this._onDidChangeContext) {\n this._onDidChangeContext = debounceEvent(this._onDidChangeContextKey.event, function (prev, cur) {\n if (!prev) {\n prev = new ContextKeyChangeEvent();\n }\n prev.collect(cur);\n return prev;\n }, 25);\n }\n return this._onDidChangeContext;\n },\n enumerable: true,\n configurable: true\n });\n AbstractContextKeyService.prototype.createScoped = function (domNode) {\n return new ScopedContextKeyService(this, this._onDidChangeContextKey, domNode);\n };\n AbstractContextKeyService.prototype.contextMatchesRules = function (rules) {\n var context = this.getContextValuesContainer(this._myContextId);\n var result = KeybindingResolver.contextMatchesRules(context, rules);\n // console.group(rules.serialize() + ' -> ' + result);\n // rules.keys().forEach(key => { console.log(key, ctx[key]); });\n // console.groupEnd();\n return result;\n };\n AbstractContextKeyService.prototype.getContextKeyValue = function (key) {\n return this.getContextValuesContainer(this._myContextId).getValue(key);\n };\n AbstractContextKeyService.prototype.setContext = function (key, value) {\n var myContext = this.getContextValuesContainer(this._myContextId);\n if (!myContext) {\n return;\n }\n if (myContext.setValue(key, value)) {\n this._onDidChangeContextKey.fire(key);\n }\n };\n AbstractContextKeyService.prototype.removeContext = function (key) {\n if (this.getContextValuesContainer(this._myContextId).removeValue(key)) {\n this._onDidChangeContextKey.fire(key);\n }\n };\n AbstractContextKeyService.prototype.getContext = function (target) {\n return this.getContextValuesContainer(findContextAttr(target));\n };\n return AbstractContextKeyService;\n}());\nexport { AbstractContextKeyService };\nvar ContextKeyService = /** @class */ (function (_super) {\n __extends(ContextKeyService, _super);\n function ContextKeyService(configurationService) {\n var _this = _super.call(this, 0) || this;\n _this._toDispose = [];\n _this._lastContextId = 0;\n _this._contexts = Object.create(null);\n var myContext = new ConfigAwareContextValuesContainer(_this._myContextId, configurationService, _this._onDidChangeContextKey);\n _this._contexts[String(_this._myContextId)] = myContext;\n _this._toDispose.push(myContext);\n return _this;\n // Uncomment this to see the contexts continuously logged\n // let lastLoggedValue: string = null;\n // setInterval(() => {\n // \tlet values = Object.keys(this._contexts).map((key) => this._contexts[key]);\n // \tlet logValue = values.map(v => JSON.stringify(v._value, null, '\\t')).join('\\n');\n // \tif (lastLoggedValue !== logValue) {\n // \t\tlastLoggedValue = logValue;\n // \t\tconsole.log(lastLoggedValue);\n // \t}\n // }, 2000);\n }\n ContextKeyService.prototype.dispose = function () {\n this._toDispose = dispose(this._toDispose);\n };\n ContextKeyService.prototype.getContextValuesContainer = function (contextId) {\n return this._contexts[String(contextId)];\n };\n ContextKeyService.prototype.createChildContext = function (parentContextId) {\n if (parentContextId === void 0) { parentContextId = this._myContextId; }\n var id = (++this._lastContextId);\n this._contexts[String(id)] = new Context(id, this.getContextValuesContainer(parentContextId));\n return id;\n };\n ContextKeyService.prototype.disposeContext = function (contextId) {\n delete this._contexts[String(contextId)];\n };\n ContextKeyService = __decorate([\n __param(0, IConfigurationService)\n ], ContextKeyService);\n return ContextKeyService;\n}(AbstractContextKeyService));\nexport { ContextKeyService };\nvar ScopedContextKeyService = /** @class */ (function (_super) {\n __extends(ScopedContextKeyService, _super);\n function ScopedContextKeyService(parent, emitter, domNode) {\n var _this = _super.call(this, parent.createChildContext()) || this;\n _this._parent = parent;\n _this._onDidChangeContextKey = emitter;\n if (domNode) {\n _this._domNode = domNode;\n _this._domNode.setAttribute(KEYBINDING_CONTEXT_ATTR, String(_this._myContextId));\n }\n return _this;\n }\n ScopedContextKeyService.prototype.dispose = function () {\n this._parent.disposeContext(this._myContextId);\n if (this._domNode) {\n this._domNode.removeAttribute(KEYBINDING_CONTEXT_ATTR);\n this._domNode = undefined;\n }\n };\n Object.defineProperty(ScopedContextKeyService.prototype, \"onDidChangeContext\", {\n get: function () {\n return this._parent.onDidChangeContext;\n },\n enumerable: true,\n configurable: true\n });\n ScopedContextKeyService.prototype.getContextValuesContainer = function (contextId) {\n return this._parent.getContextValuesContainer(contextId);\n };\n ScopedContextKeyService.prototype.createChildContext = function (parentContextId) {\n if (parentContextId === void 0) { parentContextId = this._myContextId; }\n return this._parent.createChildContext(parentContextId);\n };\n ScopedContextKeyService.prototype.disposeContext = function (contextId) {\n this._parent.disposeContext(contextId);\n };\n return ScopedContextKeyService;\n}(AbstractContextKeyService));\nfunction findContextAttr(domNode) {\n while (domNode) {\n if (domNode.hasAttribute(KEYBINDING_CONTEXT_ATTR)) {\n return parseInt(domNode.getAttribute(KEYBINDING_CONTEXT_ATTR), 10);\n }\n domNode = domNode.parentElement;\n }\n return 0;\n}\nCommandsRegistry.registerCommand(SET_CONTEXT_COMMAND_ID, function (accessor, contextKey, contextValue) {\n accessor.get(IContextKeyService).createKey(String(contextKey), contextValue);\n});\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport { Color } from '../../../../base/common/color';\nvar ParsedTokenThemeRule = /** @class */ (function () {\n function ParsedTokenThemeRule(token, index, fontStyle, foreground, background) {\n this.token = token;\n this.index = index;\n this.fontStyle = fontStyle;\n this.foreground = foreground;\n this.background = background;\n }\n return ParsedTokenThemeRule;\n}());\nexport { ParsedTokenThemeRule };\n/**\n * Parse a raw theme into rules.\n */\nexport function parseTokenTheme(source) {\n if (!source || !Array.isArray(source)) {\n return [];\n }\n var result = [], resultLen = 0;\n for (var i = 0, len = source.length; i < len; i++) {\n var entry = source[i];\n var fontStyle = -1 /* NotSet */;\n if (typeof entry.fontStyle === 'string') {\n fontStyle = 0 /* None */;\n var segments = entry.fontStyle.split(' ');\n for (var j = 0, lenJ = segments.length; j < lenJ; j++) {\n var segment = segments[j];\n switch (segment) {\n case 'italic':\n fontStyle = fontStyle | 1 /* Italic */;\n break;\n case 'bold':\n fontStyle = fontStyle | 2 /* Bold */;\n break;\n case 'underline':\n fontStyle = fontStyle | 4 /* Underline */;\n break;\n }\n }\n }\n var foreground = null;\n if (typeof entry.foreground === 'string') {\n foreground = entry.foreground;\n }\n var background = null;\n if (typeof entry.background === 'string') {\n background = entry.background;\n }\n result[resultLen++] = new ParsedTokenThemeRule(entry.token || '', i, fontStyle, foreground, background);\n }\n return result;\n}\n/**\n * Resolve rules (i.e. inheritance).\n */\nfunction resolveParsedTokenThemeRules(parsedThemeRules, customTokenColors) {\n // Sort rules lexicographically, and then by index if necessary\n parsedThemeRules.sort(function (a, b) {\n var r = strcmp(a.token, b.token);\n if (r !== 0) {\n return r;\n }\n return a.index - b.index;\n });\n // Determine defaults\n var defaultFontStyle = 0 /* None */;\n var defaultForeground = '000000';\n var defaultBackground = 'ffffff';\n while (parsedThemeRules.length >= 1 && parsedThemeRules[0].token === '') {\n var incomingDefaults = parsedThemeRules.shift();\n if (incomingDefaults.fontStyle !== -1 /* NotSet */) {\n defaultFontStyle = incomingDefaults.fontStyle;\n }\n if (incomingDefaults.foreground !== null) {\n defaultForeground = incomingDefaults.foreground;\n }\n if (incomingDefaults.background !== null) {\n defaultBackground = incomingDefaults.background;\n }\n }\n var colorMap = new ColorMap();\n // start with token colors from custom token themes\n for (var _i = 0, customTokenColors_1 = customTokenColors; _i < customTokenColors_1.length; _i++) {\n var color = customTokenColors_1[_i];\n colorMap.getId(color);\n }\n var foregroundColorId = colorMap.getId(defaultForeground);\n var backgroundColorId = colorMap.getId(defaultBackground);\n var defaults = new ThemeTrieElementRule(defaultFontStyle, foregroundColorId, backgroundColorId);\n var root = new ThemeTrieElement(defaults);\n for (var i = 0, len = parsedThemeRules.length; i < len; i++) {\n var rule = parsedThemeRules[i];\n root.insert(rule.token, rule.fontStyle, colorMap.getId(rule.foreground), colorMap.getId(rule.background));\n }\n return new TokenTheme(colorMap, root);\n}\nvar colorRegExp = /^#?([0-9A-Fa-f]{6})([0-9A-Fa-f]{2})?$/;\nvar ColorMap = /** @class */ (function () {\n function ColorMap() {\n this._lastColorId = 0;\n this._id2color = [];\n this._color2id = new Map();\n }\n ColorMap.prototype.getId = function (color) {\n if (color === null) {\n return 0;\n }\n var match = color.match(colorRegExp);\n if (!match) {\n throw new Error('Illegal value for token color: ' + color);\n }\n color = match[1].toUpperCase();\n var value = this._color2id.get(color);\n if (value) {\n return value;\n }\n value = ++this._lastColorId;\n this._color2id.set(color, value);\n this._id2color[value] = Color.fromHex('#' + color);\n return value;\n };\n ColorMap.prototype.getColorMap = function () {\n return this._id2color.slice(0);\n };\n return ColorMap;\n}());\nexport { ColorMap };\nvar TokenTheme = /** @class */ (function () {\n function TokenTheme(colorMap, root) {\n this._colorMap = colorMap;\n this._root = root;\n this._cache = new Map();\n }\n TokenTheme.createFromRawTokenTheme = function (source, customTokenColors) {\n return this.createFromParsedTokenTheme(parseTokenTheme(source), customTokenColors);\n };\n TokenTheme.createFromParsedTokenTheme = function (source, customTokenColors) {\n return resolveParsedTokenThemeRules(source, customTokenColors);\n };\n TokenTheme.prototype.getColorMap = function () {\n return this._colorMap.getColorMap();\n };\n TokenTheme.prototype._match = function (token) {\n return this._root.match(token);\n };\n TokenTheme.prototype.match = function (languageId, token) {\n // The cache contains the metadata without the language bits set.\n var result = this._cache.get(token);\n if (typeof result === 'undefined') {\n var rule = this._match(token);\n var standardToken = toStandardTokenType(token);\n result = (rule.metadata\n | (standardToken << 8 /* TOKEN_TYPE_OFFSET */)) >>> 0;\n this._cache.set(token, result);\n }\n return (result\n | (languageId << 0 /* LANGUAGEID_OFFSET */)) >>> 0;\n };\n return TokenTheme;\n}());\nexport { TokenTheme };\nvar STANDARD_TOKEN_TYPE_REGEXP = /\\b(comment|string|regex)\\b/;\nexport function toStandardTokenType(tokenType) {\n var m = tokenType.match(STANDARD_TOKEN_TYPE_REGEXP);\n if (!m) {\n return 0 /* Other */;\n }\n switch (m[1]) {\n case 'comment':\n return 1 /* Comment */;\n case 'string':\n return 2 /* String */;\n case 'regex':\n return 4 /* RegEx */;\n }\n throw new Error('Unexpected match for standard token type!');\n}\nexport function strcmp(a, b) {\n if (a < b) {\n return -1;\n }\n if (a > b) {\n return 1;\n }\n return 0;\n}\nvar ThemeTrieElementRule = /** @class */ (function () {\n function ThemeTrieElementRule(fontStyle, foreground, background) {\n this._fontStyle = fontStyle;\n this._foreground = foreground;\n this._background = background;\n this.metadata = ((this._fontStyle << 11 /* FONT_STYLE_OFFSET */)\n | (this._foreground << 14 /* FOREGROUND_OFFSET */)\n | (this._background << 23 /* BACKGROUND_OFFSET */)) >>> 0;\n }\n ThemeTrieElementRule.prototype.clone = function () {\n return new ThemeTrieElementRule(this._fontStyle, this._foreground, this._background);\n };\n ThemeTrieElementRule.prototype.acceptOverwrite = function (fontStyle, foreground, background) {\n if (fontStyle !== -1 /* NotSet */) {\n this._fontStyle = fontStyle;\n }\n if (foreground !== 0 /* None */) {\n this._foreground = foreground;\n }\n if (background !== 0 /* None */) {\n this._background = background;\n }\n this.metadata = ((this._fontStyle << 11 /* FONT_STYLE_OFFSET */)\n | (this._foreground << 14 /* FOREGROUND_OFFSET */)\n | (this._background << 23 /* BACKGROUND_OFFSET */)) >>> 0;\n };\n return ThemeTrieElementRule;\n}());\nexport { ThemeTrieElementRule };\nvar ThemeTrieElement = /** @class */ (function () {\n function ThemeTrieElement(mainRule) {\n this._mainRule = mainRule;\n this._children = new Map();\n }\n ThemeTrieElement.prototype.match = function (token) {\n if (token === '') {\n return this._mainRule;\n }\n var dotIndex = token.indexOf('.');\n var head;\n var tail;\n if (dotIndex === -1) {\n head = token;\n tail = '';\n }\n else {\n head = token.substring(0, dotIndex);\n tail = token.substring(dotIndex + 1);\n }\n var child = this._children.get(head);\n if (typeof child !== 'undefined') {\n return child.match(tail);\n }\n return this._mainRule;\n };\n ThemeTrieElement.prototype.insert = function (token, fontStyle, foreground, background) {\n if (token === '') {\n // Merge into the main rule\n this._mainRule.acceptOverwrite(fontStyle, foreground, background);\n return;\n }\n var dotIndex = token.indexOf('.');\n var head;\n var tail;\n if (dotIndex === -1) {\n head = token;\n tail = '';\n }\n else {\n head = token.substring(0, dotIndex);\n tail = token.substring(dotIndex + 1);\n }\n var child = this._children.get(head);\n if (typeof child === 'undefined') {\n child = new ThemeTrieElement(this._mainRule.clone());\n this._children.set(head, child);\n }\n child.insert(tail, fontStyle, foreground, background);\n };\n return ThemeTrieElement;\n}());\nexport { ThemeTrieElement };\nexport function generateTokensCSSForColorMap(colorMap) {\n var rules = [];\n for (var i = 1, len = colorMap.length; i < len; i++) {\n var color = colorMap[i];\n rules[i] = \".mtk\" + i + \" { color: \" + color + \"; }\";\n }\n rules.push('.mtki { font-style: italic; }');\n rules.push('.mtkb { font-weight: bold; }');\n rules.push('.mtku { text-decoration: underline; text-underline-position: under; }');\n return rules.join('\\n');\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar _a, _b, _c;\nimport { editorBackground, editorForeground, editorSelectionHighlight, editorInactiveSelection } from '../../../platform/theme/common/colorRegistry';\nimport { editorIndentGuides, editorActiveIndentGuides } from '../../common/view/editorColorRegistry';\n/* -------------------------------- Begin vs theme -------------------------------- */\nexport var vs = {\n base: 'vs',\n inherit: false,\n rules: [\n { token: '', foreground: '000000', background: 'fffffe' },\n { token: 'invalid', foreground: 'cd3131' },\n { token: 'emphasis', fontStyle: 'italic' },\n { token: 'strong', fontStyle: 'bold' },\n { token: 'variable', foreground: '001188' },\n { token: 'variable.predefined', foreground: '4864AA' },\n { token: 'constant', foreground: 'dd0000' },\n { token: 'comment', foreground: '008000' },\n { token: 'number', foreground: '09885A' },\n { token: 'number.hex', foreground: '3030c0' },\n { token: 'regexp', foreground: '800000' },\n { token: 'annotation', foreground: '808080' },\n { token: 'type', foreground: '008080' },\n { token: 'delimiter', foreground: '000000' },\n { token: 'delimiter.html', foreground: '383838' },\n { token: 'delimiter.xml', foreground: '0000FF' },\n { token: 'tag', foreground: '800000' },\n { token: 'tag.id.pug', foreground: '4F76AC' },\n { token: 'tag.class.pug', foreground: '4F76AC' },\n { token: 'meta.scss', foreground: '800000' },\n { token: 'metatag', foreground: 'e00000' },\n { token: 'metatag.content.html', foreground: 'FF0000' },\n { token: 'metatag.html', foreground: '808080' },\n { token: 'metatag.xml', foreground: '808080' },\n { token: 'metatag.php', fontStyle: 'bold' },\n { token: 'key', foreground: '863B00' },\n { token: 'string.key.json', foreground: 'A31515' },\n { token: 'string.value.json', foreground: '0451A5' },\n { token: 'attribute.name', foreground: 'FF0000' },\n { token: 'attribute.value', foreground: '0451A5' },\n { token: 'attribute.value.number', foreground: '09885A' },\n { token: 'attribute.value.unit', foreground: '09885A' },\n { token: 'attribute.value.html', foreground: '0000FF' },\n { token: 'attribute.value.xml', foreground: '0000FF' },\n { token: 'string', foreground: 'A31515' },\n { token: 'string.html', foreground: '0000FF' },\n { token: 'string.sql', foreground: 'FF0000' },\n { token: 'string.yaml', foreground: '0451A5' },\n { token: 'keyword', foreground: '0000FF' },\n { token: 'keyword.json', foreground: '0451A5' },\n { token: 'keyword.flow', foreground: 'AF00DB' },\n { token: 'keyword.flow.scss', foreground: '0000FF' },\n { token: 'operator.scss', foreground: '666666' },\n { token: 'operator.sql', foreground: '778899' },\n { token: 'operator.swift', foreground: '666666' },\n { token: 'predefined.sql', foreground: 'FF00FF' },\n ],\n colors: (_a = {},\n _a[editorBackground] = '#FFFFFE',\n _a[editorForeground] = '#000000',\n _a[editorInactiveSelection] = '#E5EBF1',\n _a[editorIndentGuides] = '#D3D3D3',\n _a[editorActiveIndentGuides] = '#939393',\n _a[editorSelectionHighlight] = '#ADD6FF4D',\n _a)\n};\n/* -------------------------------- End vs theme -------------------------------- */\n/* -------------------------------- Begin vs-dark theme -------------------------------- */\nexport var vs_dark = {\n base: 'vs-dark',\n inherit: false,\n rules: [\n { token: '', foreground: 'D4D4D4', background: '1E1E1E' },\n { token: 'invalid', foreground: 'f44747' },\n { token: 'emphasis', fontStyle: 'italic' },\n { token: 'strong', fontStyle: 'bold' },\n { token: 'variable', foreground: '74B0DF' },\n { token: 'variable.predefined', foreground: '4864AA' },\n { token: 'variable.parameter', foreground: '9CDCFE' },\n { token: 'constant', foreground: '569CD6' },\n { token: 'comment', foreground: '608B4E' },\n { token: 'number', foreground: 'B5CEA8' },\n { token: 'number.hex', foreground: '5BB498' },\n { token: 'regexp', foreground: 'B46695' },\n { token: 'annotation', foreground: 'cc6666' },\n { token: 'type', foreground: '3DC9B0' },\n { token: 'delimiter', foreground: 'DCDCDC' },\n { token: 'delimiter.html', foreground: '808080' },\n { token: 'delimiter.xml', foreground: '808080' },\n { token: 'tag', foreground: '569CD6' },\n { token: 'tag.id.pug', foreground: '4F76AC' },\n { token: 'tag.class.pug', foreground: '4F76AC' },\n { token: 'meta.scss', foreground: 'A79873' },\n { token: 'meta.tag', foreground: 'CE9178' },\n { token: 'metatag', foreground: 'DD6A6F' },\n { token: 'metatag.content.html', foreground: '9CDCFE' },\n { token: 'metatag.html', foreground: '569CD6' },\n { token: 'metatag.xml', foreground: '569CD6' },\n { token: 'metatag.php', fontStyle: 'bold' },\n { token: 'key', foreground: '9CDCFE' },\n { token: 'string.key.json', foreground: '9CDCFE' },\n { token: 'string.value.json', foreground: 'CE9178' },\n { token: 'attribute.name', foreground: '9CDCFE' },\n { token: 'attribute.value', foreground: 'CE9178' },\n { token: 'attribute.value.number.css', foreground: 'B5CEA8' },\n { token: 'attribute.value.unit.css', foreground: 'B5CEA8' },\n { token: 'attribute.value.hex.css', foreground: 'D4D4D4' },\n { token: 'string', foreground: 'CE9178' },\n { token: 'string.sql', foreground: 'FF0000' },\n { token: 'keyword', foreground: '569CD6' },\n { token: 'keyword.flow', foreground: 'C586C0' },\n { token: 'keyword.json', foreground: 'CE9178' },\n { token: 'keyword.flow.scss', foreground: '569CD6' },\n { token: 'operator.scss', foreground: '909090' },\n { token: 'operator.sql', foreground: '778899' },\n { token: 'operator.swift', foreground: '909090' },\n { token: 'predefined.sql', foreground: 'FF00FF' },\n ],\n colors: (_b = {},\n _b[editorBackground] = '#1E1E1E',\n _b[editorForeground] = '#D4D4D4',\n _b[editorInactiveSelection] = '#3A3D41',\n _b[editorIndentGuides] = '#404040',\n _b[editorActiveIndentGuides] = '#707070',\n _b[editorSelectionHighlight] = '#ADD6FF26',\n _b)\n};\n/* -------------------------------- End vs-dark theme -------------------------------- */\n/* -------------------------------- Begin hc-black theme -------------------------------- */\nexport var hc_black = {\n base: 'hc-black',\n inherit: false,\n rules: [\n { token: '', foreground: 'FFFFFF', background: '000000' },\n { token: 'invalid', foreground: 'f44747' },\n { token: 'emphasis', fontStyle: 'italic' },\n { token: 'strong', fontStyle: 'bold' },\n { token: 'variable', foreground: '1AEBFF' },\n { token: 'variable.parameter', foreground: '9CDCFE' },\n { token: 'constant', foreground: '569CD6' },\n { token: 'comment', foreground: '608B4E' },\n { token: 'number', foreground: 'FFFFFF' },\n { token: 'regexp', foreground: 'C0C0C0' },\n { token: 'annotation', foreground: '569CD6' },\n { token: 'type', foreground: '3DC9B0' },\n { token: 'delimiter', foreground: 'FFFF00' },\n { token: 'delimiter.html', foreground: 'FFFF00' },\n { token: 'tag', foreground: '569CD6' },\n { token: 'tag.id.pug', foreground: '4F76AC' },\n { token: 'tag.class.pug', foreground: '4F76AC' },\n { token: 'meta', foreground: 'D4D4D4' },\n { token: 'meta.tag', foreground: 'CE9178' },\n { token: 'metatag', foreground: '569CD6' },\n { token: 'metatag.content.html', foreground: '1AEBFF' },\n { token: 'metatag.html', foreground: '569CD6' },\n { token: 'metatag.xml', foreground: '569CD6' },\n { token: 'metatag.php', fontStyle: 'bold' },\n { token: 'key', foreground: '9CDCFE' },\n { token: 'string.key', foreground: '9CDCFE' },\n { token: 'string.value', foreground: 'CE9178' },\n { token: 'attribute.name', foreground: '569CD6' },\n { token: 'attribute.value', foreground: '3FF23F' },\n { token: 'string', foreground: 'CE9178' },\n { token: 'string.sql', foreground: 'FF0000' },\n { token: 'keyword', foreground: '569CD6' },\n { token: 'keyword.flow', foreground: 'C586C0' },\n { token: 'operator.sql', foreground: '778899' },\n { token: 'operator.swift', foreground: '909090' },\n { token: 'predefined.sql', foreground: 'FF00FF' },\n ],\n colors: (_c = {},\n _c[editorBackground] = '#000000',\n _c[editorForeground] = '#FFFFFF',\n _c[editorIndentGuides] = '#FFFFFF',\n _c[editorActiveIndentGuides] = '#FFFFFF',\n _c)\n};\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport { TokenTheme, generateTokensCSSForColorMap } from '../../common/modes/supports/tokenization';\nimport { vs, vs_dark, hc_black } from '../common/themes';\nimport * as dom from '../../../base/browser/dom';\nimport { TokenizationRegistry } from '../../common/modes';\nimport { Color } from '../../../base/common/color';\nimport { Extensions } from '../../../platform/theme/common/colorRegistry';\nimport { Extensions as ThemingExtensions } from '../../../platform/theme/common/themeService';\nimport { Registry } from '../../../platform/registry/common/platform';\nimport { Emitter } from '../../../base/common/event';\nvar VS_THEME_NAME = 'vs';\nvar VS_DARK_THEME_NAME = 'vs-dark';\nvar HC_BLACK_THEME_NAME = 'hc-black';\nvar colorRegistry = Registry.as(Extensions.ColorContribution);\nvar themingRegistry = Registry.as(ThemingExtensions.ThemingContribution);\nvar StandaloneTheme = /** @class */ (function () {\n function StandaloneTheme(name, standaloneThemeData) {\n this.themeData = standaloneThemeData;\n var base = standaloneThemeData.base;\n if (name.length > 0) {\n this.id = base + ' ' + name;\n this.themeName = name;\n }\n else {\n this.id = base;\n this.themeName = base;\n }\n this.colors = null;\n this.defaultColors = Object.create(null);\n this._tokenTheme = null;\n }\n Object.defineProperty(StandaloneTheme.prototype, \"base\", {\n get: function () {\n return this.themeData.base;\n },\n enumerable: true,\n configurable: true\n });\n StandaloneTheme.prototype.notifyBaseUpdated = function () {\n if (this.themeData.inherit) {\n this.colors = null;\n this._tokenTheme = null;\n }\n };\n StandaloneTheme.prototype.getColors = function () {\n if (!this.colors) {\n var colors = Object.create(null);\n for (var id in this.themeData.colors) {\n colors[id] = Color.fromHex(this.themeData.colors[id]);\n }\n if (this.themeData.inherit) {\n var baseData = getBuiltinRules(this.themeData.base);\n for (var id in baseData.colors) {\n if (!colors[id]) {\n colors[id] = Color.fromHex(baseData.colors[id]);\n }\n }\n }\n this.colors = colors;\n }\n return this.colors;\n };\n StandaloneTheme.prototype.getColor = function (colorId, useDefault) {\n var color = this.getColors()[colorId];\n if (color) {\n return color;\n }\n if (useDefault !== false) {\n return this.getDefault(colorId);\n }\n return null;\n };\n StandaloneTheme.prototype.getDefault = function (colorId) {\n var color = this.defaultColors[colorId];\n if (color) {\n return color;\n }\n color = colorRegistry.resolveDefaultColor(colorId, this);\n this.defaultColors[colorId] = color;\n return color;\n };\n StandaloneTheme.prototype.defines = function (colorId) {\n return Object.prototype.hasOwnProperty.call(this.getColors(), colorId);\n };\n Object.defineProperty(StandaloneTheme.prototype, \"type\", {\n get: function () {\n switch (this.base) {\n case VS_THEME_NAME: return 'light';\n case HC_BLACK_THEME_NAME: return 'hc';\n default: return 'dark';\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(StandaloneTheme.prototype, \"tokenTheme\", {\n get: function () {\n if (!this._tokenTheme) {\n var rules = [];\n var encodedTokensColors = [];\n if (this.themeData.inherit) {\n var baseData = getBuiltinRules(this.themeData.base);\n rules = baseData.rules;\n if (baseData.encodedTokensColors) {\n encodedTokensColors = baseData.encodedTokensColors;\n }\n }\n rules = rules.concat(this.themeData.rules);\n if (this.themeData.encodedTokensColors) {\n encodedTokensColors = this.themeData.encodedTokensColors;\n }\n this._tokenTheme = TokenTheme.createFromRawTokenTheme(rules, encodedTokensColors);\n }\n return this._tokenTheme;\n },\n enumerable: true,\n configurable: true\n });\n return StandaloneTheme;\n}());\nfunction isBuiltinTheme(themeName) {\n return (themeName === VS_THEME_NAME\n || themeName === VS_DARK_THEME_NAME\n || themeName === HC_BLACK_THEME_NAME);\n}\nfunction getBuiltinRules(builtinTheme) {\n switch (builtinTheme) {\n case VS_THEME_NAME:\n return vs;\n case VS_DARK_THEME_NAME:\n return vs_dark;\n case HC_BLACK_THEME_NAME:\n return hc_black;\n }\n}\nfunction newBuiltInTheme(builtinTheme) {\n var themeData = getBuiltinRules(builtinTheme);\n return new StandaloneTheme(builtinTheme, themeData);\n}\nvar StandaloneThemeServiceImpl = /** @class */ (function () {\n function StandaloneThemeServiceImpl() {\n this.environment = Object.create(null);\n this._onThemeChange = new Emitter();\n this._knownThemes = new Map();\n this._knownThemes.set(VS_THEME_NAME, newBuiltInTheme(VS_THEME_NAME));\n this._knownThemes.set(VS_DARK_THEME_NAME, newBuiltInTheme(VS_DARK_THEME_NAME));\n this._knownThemes.set(HC_BLACK_THEME_NAME, newBuiltInTheme(HC_BLACK_THEME_NAME));\n this._styleElement = dom.createStyleSheet();\n this._styleElement.className = 'monaco-colors';\n this.setTheme(VS_THEME_NAME);\n }\n Object.defineProperty(StandaloneThemeServiceImpl.prototype, \"onThemeChange\", {\n get: function () {\n return this._onThemeChange.event;\n },\n enumerable: true,\n configurable: true\n });\n StandaloneThemeServiceImpl.prototype.defineTheme = function (themeName, themeData) {\n if (!/^[a-z0-9\\-]+$/i.test(themeName)) {\n throw new Error('Illegal theme name!');\n }\n if (!isBuiltinTheme(themeData.base) && !isBuiltinTheme(themeName)) {\n throw new Error('Illegal theme base!');\n }\n // set or replace theme\n this._knownThemes.set(themeName, new StandaloneTheme(themeName, themeData));\n if (isBuiltinTheme(themeName)) {\n this._knownThemes.forEach(function (theme) {\n if (theme.base === themeName) {\n theme.notifyBaseUpdated();\n }\n });\n }\n if (this._theme && this._theme.themeName === themeName) {\n this.setTheme(themeName); // refresh theme\n }\n };\n StandaloneThemeServiceImpl.prototype.getTheme = function () {\n return this._theme;\n };\n StandaloneThemeServiceImpl.prototype.setTheme = function (themeName) {\n var _this = this;\n var theme;\n if (this._knownThemes.has(themeName)) {\n theme = this._knownThemes.get(themeName);\n }\n else {\n theme = this._knownThemes.get(VS_THEME_NAME);\n }\n this._theme = theme;\n var cssRules = [];\n var hasRule = {};\n var ruleCollector = {\n addRule: function (rule) {\n if (!hasRule[rule]) {\n cssRules.push(rule);\n hasRule[rule] = true;\n }\n }\n };\n themingRegistry.getThemingParticipants().forEach(function (p) { return p(theme, ruleCollector, _this.environment); });\n var tokenTheme = theme.tokenTheme;\n var colorMap = tokenTheme.getColorMap();\n ruleCollector.addRule(generateTokensCSSForColorMap(colorMap));\n this._styleElement.innerHTML = cssRules.join('\\n');\n TokenizationRegistry.setColorMap(colorMap);\n this._onThemeChange.fire(theme);\n return theme.id;\n };\n return StandaloneThemeServiceImpl;\n}());\nexport { StandaloneThemeServiceImpl };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { Disposable } from '../../../base/common/lifecycle';\nimport { IConfigurationService } from '../../../platform/configuration/common/configuration';\nimport { ContextMenuService } from '../../../platform/contextview/browser/contextMenuService';\nimport { IContextMenuService, IContextViewService } from '../../../platform/contextview/browser/contextView';\nimport { ContextViewService } from '../../../platform/contextview/browser/contextViewService';\nimport { createDecorator, IInstantiationService } from '../../../platform/instantiation/common/instantiation';\nimport { InstantiationService } from '../../../platform/instantiation/common/instantiationService';\nimport { ServiceCollection } from '../../../platform/instantiation/common/serviceCollection';\nimport { ICommandService } from '../../../platform/commands/common/commands';\nimport { IKeybindingService } from '../../../platform/keybinding/common/keybinding';\nimport { IContextKeyService } from '../../../platform/contextkey/common/contextkey';\nimport { MarkerService } from '../../../platform/markers/common/markerService';\nimport { IMarkerService } from '../../../platform/markers/common/markers';\nimport { IProgressService } from '../../../platform/progress/common/progress';\nimport { IStorageService, NullStorageService } from '../../../platform/storage/common/storage';\nimport { ITelemetryService } from '../../../platform/telemetry/common/telemetry';\nimport { IWorkspaceContextService } from '../../../platform/workspace/common/workspace';\nimport { ICodeEditorService } from '../../browser/services/codeEditorService';\nimport { IEditorWorkerService } from '../../common/services/editorWorkerService';\nimport { EditorWorkerServiceImpl } from '../../common/services/editorWorkerServiceImpl';\nimport { ITextResourceConfigurationService } from '../../common/services/resourceConfiguration';\nimport { IModeService } from '../../common/services/modeService';\nimport { ModeServiceImpl } from '../../common/services/modeServiceImpl';\nimport { IModelService } from '../../common/services/modelService';\nimport { ModelServiceImpl } from '../../common/services/modelServiceImpl';\nimport { StandaloneCodeEditorServiceImpl } from './standaloneCodeServiceImpl';\nimport { SimpleConfigurationService, SimpleResourceConfigurationService, SimpleMenuService, SimpleProgressService, StandaloneCommandService, StandaloneKeybindingService, SimpleNotificationService, StandaloneTelemetryService, SimpleWorkspaceContextService, SimpleDialogService, SimpleBulkEditService, SimpleUriDisplayService } from './simpleServices';\nimport { ContextKeyService } from '../../../platform/contextkey/browser/contextKeyService';\nimport { IMenuService } from '../../../platform/actions/common/actions';\nimport { IStandaloneThemeService } from '../common/standaloneThemeService';\nimport { StandaloneThemeServiceImpl } from './standaloneThemeServiceImpl';\nimport { ILogService, NullLogService } from '../../../platform/log/common/log';\nimport { INotificationService } from '../../../platform/notification/common/notification';\nimport { IDialogService } from '../../../platform/dialogs/common/dialogs';\nimport { IListService, ListService } from '../../../platform/list/browser/listService';\nimport { IBulkEditService } from '../../browser/services/bulkEditService';\nimport { IUriDisplayService } from '../../../platform/uriDisplay/common/uriDisplay';\nexport var StaticServices;\n(function (StaticServices) {\n var _serviceCollection = new ServiceCollection();\n var LazyStaticService = /** @class */ (function () {\n function LazyStaticService(serviceId, factory) {\n this._serviceId = serviceId;\n this._factory = factory;\n this._value = null;\n }\n Object.defineProperty(LazyStaticService.prototype, \"id\", {\n get: function () { return this._serviceId; },\n enumerable: true,\n configurable: true\n });\n LazyStaticService.prototype.get = function (overrides) {\n if (!this._value) {\n if (overrides) {\n this._value = overrides[this._serviceId.toString()];\n }\n if (!this._value) {\n this._value = this._factory(overrides);\n }\n if (!this._value) {\n throw new Error('Service ' + this._serviceId + ' is missing!');\n }\n _serviceCollection.set(this._serviceId, this._value);\n }\n return this._value;\n };\n return LazyStaticService;\n }());\n StaticServices.LazyStaticService = LazyStaticService;\n var _all = [];\n function define(serviceId, factory) {\n var r = new LazyStaticService(serviceId, factory);\n _all.push(r);\n return r;\n }\n function init(overrides) {\n // Create a fresh service collection\n var result = new ServiceCollection();\n // Initialize the service collection with the overrides\n for (var serviceId in overrides) {\n if (overrides.hasOwnProperty(serviceId)) {\n result.set(createDecorator(serviceId), overrides[serviceId]);\n }\n }\n // Make sure the same static services are present in all service collections\n _all.forEach(function (service) { return result.set(service.id, service.get(overrides)); });\n // Ensure the collection gets the correct instantiation service\n var instantiationService = new InstantiationService(result, true);\n result.set(IInstantiationService, instantiationService);\n return [result, instantiationService];\n }\n StaticServices.init = init;\n StaticServices.instantiationService = define(IInstantiationService, function () { return new InstantiationService(_serviceCollection, true); });\n var configurationServiceImpl = new SimpleConfigurationService();\n StaticServices.configurationService = define(IConfigurationService, function () { return configurationServiceImpl; });\n StaticServices.resourceConfigurationService = define(ITextResourceConfigurationService, function () { return new SimpleResourceConfigurationService(configurationServiceImpl); });\n StaticServices.contextService = define(IWorkspaceContextService, function () { return new SimpleWorkspaceContextService(); });\n StaticServices.uriDisplayService = define(IUriDisplayService, function () { return new SimpleUriDisplayService(); });\n StaticServices.telemetryService = define(ITelemetryService, function () { return new StandaloneTelemetryService(); });\n StaticServices.dialogService = define(IDialogService, function () { return new SimpleDialogService(); });\n StaticServices.notificationService = define(INotificationService, function () { return new SimpleNotificationService(); });\n StaticServices.markerService = define(IMarkerService, function () { return new MarkerService(); });\n StaticServices.modeService = define(IModeService, function (o) { return new ModeServiceImpl(); });\n StaticServices.modelService = define(IModelService, function (o) { return new ModelServiceImpl(StaticServices.markerService.get(o), StaticServices.configurationService.get(o)); });\n StaticServices.editorWorkerService = define(IEditorWorkerService, function (o) { return new EditorWorkerServiceImpl(StaticServices.modelService.get(o), StaticServices.resourceConfigurationService.get(o)); });\n StaticServices.standaloneThemeService = define(IStandaloneThemeService, function () { return new StandaloneThemeServiceImpl(); });\n StaticServices.codeEditorService = define(ICodeEditorService, function (o) { return new StandaloneCodeEditorServiceImpl(StaticServices.standaloneThemeService.get(o)); });\n StaticServices.progressService = define(IProgressService, function () { return new SimpleProgressService(); });\n StaticServices.storageService = define(IStorageService, function () { return NullStorageService; });\n StaticServices.logService = define(ILogService, function () { return new NullLogService(); });\n})(StaticServices || (StaticServices = {}));\nvar DynamicStandaloneServices = /** @class */ (function (_super) {\n __extends(DynamicStandaloneServices, _super);\n function DynamicStandaloneServices(domElement, overrides) {\n var _this = _super.call(this) || this;\n var _a = StaticServices.init(overrides), _serviceCollection = _a[0], _instantiationService = _a[1];\n _this._serviceCollection = _serviceCollection;\n _this._instantiationService = _instantiationService;\n var configurationService = _this.get(IConfigurationService);\n var notificationService = _this.get(INotificationService);\n var telemetryService = _this.get(ITelemetryService);\n var ensure = function (serviceId, factory) {\n var value = null;\n if (overrides) {\n value = overrides[serviceId.toString()];\n }\n if (!value) {\n value = factory();\n }\n _this._serviceCollection.set(serviceId, value);\n return value;\n };\n var contextKeyService = ensure(IContextKeyService, function () { return _this._register(new ContextKeyService(configurationService)); });\n ensure(IListService, function () { return new ListService(contextKeyService); });\n var commandService = ensure(ICommandService, function () { return new StandaloneCommandService(_this._instantiationService); });\n ensure(IKeybindingService, function () { return _this._register(new StandaloneKeybindingService(contextKeyService, commandService, telemetryService, notificationService, domElement)); });\n var contextViewService = ensure(IContextViewService, function () { return _this._register(new ContextViewService(domElement, telemetryService, new NullLogService())); });\n ensure(IContextMenuService, function () { return _this._register(new ContextMenuService(domElement, telemetryService, notificationService, contextViewService)); });\n ensure(IMenuService, function () { return new SimpleMenuService(commandService); });\n ensure(IBulkEditService, function () { return new SimpleBulkEditService(StaticServices.modelService.get(IModelService)); });\n return _this;\n }\n DynamicStandaloneServices.prototype.get = function (serviceId) {\n var r = this._serviceCollection.get(serviceId);\n if (!r) {\n throw new Error('Missing service ' + serviceId);\n }\n return r;\n };\n DynamicStandaloneServices.prototype.set = function (serviceId, instance) {\n this._serviceCollection.set(serviceId, instance);\n };\n DynamicStandaloneServices.prototype.has = function (serviceId) {\n return this._serviceCollection.has(serviceId);\n };\n return DynamicStandaloneServices;\n}(Disposable));\nexport { DynamicStandaloneServices };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport { createDecorator } from '../../instantiation/common/instantiation';\nexport var IDialogService = createDecorator('dialogService');\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport URI from './uri';\nexport function parse(text) {\n var data = JSON.parse(text);\n data = revive(data, 0);\n return data;\n}\nexport function revive(obj, depth) {\n if (!obj || depth > 200) {\n return obj;\n }\n if (typeof obj === 'object') {\n switch (obj.$mid) {\n case 1: return URI.revive(obj);\n case 2: return new RegExp(obj.source, obj.flags);\n }\n // walk object (or array)\n for (var key in obj) {\n if (Object.hasOwnProperty.call(obj, key)) {\n obj[key] = revive(obj[key], depth + 1);\n }\n }\n }\n return obj;\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport { TPromise } from '../../../base/common/winjs.base';\nexport var NullTelemetryService = new /** @class */ (function () {\n function class_1() {\n }\n class_1.prototype.publicLog = function (eventName, data) {\n return TPromise.wrap(null);\n };\n class_1.prototype.getTelemetryInfo = function () {\n return TPromise.wrap({\n instanceId: 'someValue.instanceId',\n sessionId: 'someValue.sessionId',\n machineId: 'someValue.machineId'\n });\n };\n return class_1;\n}());\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __param = (this && this.__param) || function (paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n};\nimport * as dom from '../../../base/browser/dom';\nimport { parse } from '../../../base/common/marshalling';\nimport { Schemas } from '../../../base/common/network';\nimport { TPromise } from '../../../base/common/winjs.base';\nimport { ICodeEditorService } from './codeEditorService';\nimport { normalize } from '../../../base/common/paths';\nimport { ICommandService, CommandsRegistry } from '../../../platform/commands/common/commands';\nimport { ITelemetryService } from '../../../platform/telemetry/common/telemetry';\nimport { optional } from '../../../platform/instantiation/common/instantiation';\nimport { NullTelemetryService } from '../../../platform/telemetry/common/telemetryUtils';\nvar OpenerService = /** @class */ (function () {\n function OpenerService(_editorService, _commandService, _telemetryService) {\n if (_telemetryService === void 0) { _telemetryService = NullTelemetryService; }\n this._editorService = _editorService;\n this._commandService = _commandService;\n this._telemetryService = _telemetryService;\n //\n }\n OpenerService.prototype.open = function (resource, options) {\n var _a;\n /* __GDPR__\n \"openerService\" : {\n \"scheme\" : { \"classification\": \"SystemMetaData\", \"purpose\": \"FeatureInsight\" }\n }\n */\n this._telemetryService.publicLog('openerService', { scheme: resource.scheme });\n var scheme = resource.scheme, path = resource.path, query = resource.query, fragment = resource.fragment;\n var promise = TPromise.wrap(void 0);\n if (scheme === Schemas.http || scheme === Schemas.https || scheme === Schemas.mailto) {\n // open http or default mail application\n dom.windowOpenNoOpener(resource.toString(true));\n }\n else if (scheme === 'command' && CommandsRegistry.getCommand(path)) {\n // execute as command\n var args = [];\n try {\n args = parse(query);\n if (!Array.isArray(args)) {\n args = [args];\n }\n }\n catch (e) {\n //\n }\n promise = (_a = this._commandService).executeCommand.apply(_a, [path].concat(args));\n }\n else {\n var selection = void 0;\n var match = /^L?(\\d+)(?:,(\\d+))?/.exec(fragment);\n if (match) {\n // support file:///some/file.js#73,84\n // support file:///some/file.js#L73\n selection = {\n startLineNumber: parseInt(match[1]),\n startColumn: match[2] ? parseInt(match[2]) : 1\n };\n // remove fragment\n resource = resource.with({ fragment: '' });\n }\n if (!resource.scheme) {\n // we cannot handle those\n return TPromise.as(undefined);\n }\n else if (resource.scheme === Schemas.file) {\n resource = resource.with({ path: normalize(resource.path) }); // workaround for non-normalized paths (https://github.com/Microsoft/vscode/issues/12954)\n }\n promise = this._editorService.openCodeEditor({ resource: resource, options: { selection: selection, } }, this._editorService.getFocusedCodeEditor(), options && options.openToSide);\n }\n return promise;\n };\n OpenerService = __decorate([\n __param(0, ICodeEditorService),\n __param(1, ICommandService),\n __param(2, optional(ITelemetryService))\n ], OpenerService);\n return OpenerService;\n}());\nexport { OpenerService };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport { TPromise } from '../../../base/common/winjs.base';\nimport { TokenizationRegistry } from '../../common/modes';\nimport { renderViewLine2 as renderViewLine, RenderLineInput } from '../../common/viewLayout/viewLineRenderer';\nimport { LineTokens } from '../../common/core/lineTokens';\nimport * as strings from '../../../base/common/strings';\nimport { ViewLineRenderingData } from '../../common/viewModel/viewModel';\nvar Colorizer = /** @class */ (function () {\n function Colorizer() {\n }\n Colorizer.colorizeElement = function (themeService, modeService, domNode, options) {\n options = options || {};\n var theme = options.theme || 'vs';\n var mimeType = options.mimeType || domNode.getAttribute('lang') || domNode.getAttribute('data-lang');\n if (!mimeType) {\n console.error('Mode not detected');\n return undefined;\n }\n themeService.setTheme(theme);\n var text = domNode.firstChild.nodeValue;\n domNode.className += ' ' + theme;\n var render = function (str) {\n domNode.innerHTML = str;\n };\n return this.colorize(modeService, text, mimeType, options).then(render, function (err) { return console.error(err); });\n };\n Colorizer._tokenizationSupportChangedPromise = function (language) {\n var listener = null;\n var stopListening = function () {\n if (listener) {\n listener.dispose();\n listener = null;\n }\n };\n return new TPromise(function (c, e) {\n listener = TokenizationRegistry.onDidChange(function (e) {\n if (e.changedLanguages.indexOf(language) >= 0) {\n stopListening();\n c(void 0);\n }\n });\n }, stopListening);\n };\n Colorizer.colorize = function (modeService, text, mimeType, options) {\n if (strings.startsWithUTF8BOM(text)) {\n text = text.substr(1);\n }\n var lines = text.split(/\\r\\n|\\r|\\n/);\n var language = modeService.getModeId(mimeType);\n options = options || {};\n if (typeof options.tabSize === 'undefined') {\n options.tabSize = 4;\n }\n // Send out the event to create the mode\n modeService.getOrCreateMode(language);\n var tokenizationSupport = TokenizationRegistry.get(language);\n if (tokenizationSupport) {\n return TPromise.as(_colorize(lines, options.tabSize, tokenizationSupport));\n }\n // wait 500ms for mode to load, then give up\n return TPromise.any([this._tokenizationSupportChangedPromise(language), TPromise.timeout(500)]).then(function (_) {\n var tokenizationSupport = TokenizationRegistry.get(language);\n if (tokenizationSupport) {\n return _colorize(lines, options.tabSize, tokenizationSupport);\n }\n return _fakeColorize(lines, options.tabSize);\n });\n };\n Colorizer.colorizeLine = function (line, mightContainNonBasicASCII, mightContainRTL, tokens, tabSize) {\n if (tabSize === void 0) { tabSize = 4; }\n var isBasicASCII = ViewLineRenderingData.isBasicASCII(line, mightContainNonBasicASCII);\n var containsRTL = ViewLineRenderingData.containsRTL(line, isBasicASCII, mightContainRTL);\n var renderResult = renderViewLine(new RenderLineInput(false, line, false, isBasicASCII, containsRTL, 0, tokens, [], tabSize, 0, -1, 'none', false, false));\n return renderResult.html;\n };\n Colorizer.colorizeModelLine = function (model, lineNumber, tabSize) {\n if (tabSize === void 0) { tabSize = 4; }\n var content = model.getLineContent(lineNumber);\n model.forceTokenization(lineNumber);\n var tokens = model.getLineTokens(lineNumber);\n var inflatedTokens = tokens.inflate();\n return this.colorizeLine(content, model.mightContainNonBasicASCII(), model.mightContainRTL(), inflatedTokens, tabSize);\n };\n return Colorizer;\n}());\nexport { Colorizer };\nfunction _colorize(lines, tabSize, tokenizationSupport) {\n return _actualColorize(lines, tabSize, tokenizationSupport);\n}\nfunction _fakeColorize(lines, tabSize) {\n var html = [];\n var defaultMetadata = ((0 /* None */ << 11 /* FONT_STYLE_OFFSET */)\n | (1 /* DefaultForeground */ << 14 /* FOREGROUND_OFFSET */)\n | (2 /* DefaultBackground */ << 23 /* BACKGROUND_OFFSET */)) >>> 0;\n var tokens = new Uint32Array(2);\n tokens[0] = 0;\n tokens[1] = defaultMetadata;\n for (var i = 0, length_1 = lines.length; i < length_1; i++) {\n var line = lines[i];\n tokens[0] = line.length;\n var lineTokens = new LineTokens(tokens, line);\n var isBasicASCII = ViewLineRenderingData.isBasicASCII(line, /* check for basic ASCII */ true);\n var containsRTL = ViewLineRenderingData.containsRTL(line, isBasicASCII, /* check for RTL */ true);\n var renderResult = renderViewLine(new RenderLineInput(false, line, false, isBasicASCII, containsRTL, 0, lineTokens, [], tabSize, 0, -1, 'none', false, false));\n html = html.concat(renderResult.html);\n html.push('
    ');\n }\n return html.join('');\n}\nfunction _actualColorize(lines, tabSize, tokenizationSupport) {\n var html = [];\n var state = tokenizationSupport.getInitialState();\n for (var i = 0, length_2 = lines.length; i < length_2; i++) {\n var line = lines[i];\n var tokenizeResult = tokenizationSupport.tokenize2(line, state, 0);\n LineTokens.convertToEndOffset(tokenizeResult.tokens, line.length);\n var lineTokens = new LineTokens(tokenizeResult.tokens, line);\n var isBasicASCII = ViewLineRenderingData.isBasicASCII(line, /* check for basic ASCII */ true);\n var containsRTL = ViewLineRenderingData.containsRTL(line, isBasicASCII, /* check for RTL */ true);\n var renderResult = renderViewLine(new RenderLineInput(false, line, false, isBasicASCII, containsRTL, 0, lineTokens.inflate(), [], tabSize, 0, -1, 'none', false, false));\n html = html.concat(renderResult.html);\n html.push('
    ');\n state = tokenizeResult.endState;\n }\n return html.join('');\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { ShallowCancelThenPromise } from '../../../base/common/async';\nimport { EditorWorkerClient } from './editorWorkerServiceImpl';\n/**\n * Create a new web worker that has model syncing capabilities built in.\n * Specify an AMD module to load that will `create` an object that will be proxied.\n */\nexport function createWebWorker(modelService, opts) {\n return new MonacoWebWorkerImpl(modelService, opts);\n}\nvar MonacoWebWorkerImpl = /** @class */ (function (_super) {\n __extends(MonacoWebWorkerImpl, _super);\n function MonacoWebWorkerImpl(modelService, opts) {\n var _this = _super.call(this, modelService, opts.label) || this;\n _this._foreignModuleId = opts.moduleId;\n _this._foreignModuleCreateData = opts.createData || null;\n _this._foreignProxy = null;\n return _this;\n }\n MonacoWebWorkerImpl.prototype._getForeignProxy = function () {\n var _this = this;\n if (!this._foreignProxy) {\n this._foreignProxy = new ShallowCancelThenPromise(this._getProxy().then(function (proxy) {\n return proxy.loadForeignModule(_this._foreignModuleId, _this._foreignModuleCreateData).then(function (foreignMethods) {\n _this._foreignModuleId = null;\n _this._foreignModuleCreateData = null;\n var proxyMethodRequest = function (method, args) {\n return proxy.fmr(method, args);\n };\n var createProxyMethod = function (method, proxyMethodRequest) {\n return function () {\n var args = Array.prototype.slice.call(arguments, 0);\n return proxyMethodRequest(method, args);\n };\n };\n var foreignProxy = {};\n for (var i = 0; i < foreignMethods.length; i++) {\n foreignProxy[foreignMethods[i]] = createProxyMethod(foreignMethods[i], proxyMethodRequest);\n }\n return foreignProxy;\n });\n }));\n }\n return this._foreignProxy;\n };\n MonacoWebWorkerImpl.prototype.getProxy = function () {\n return this._getForeignProxy();\n };\n MonacoWebWorkerImpl.prototype.withSyncedResources = function (resources) {\n var _this = this;\n return this._withSyncedResources(resources).then(function (_) { return _this.getProxy(); });\n };\n return MonacoWebWorkerImpl;\n}(EditorWorkerClient));\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport './standalone-tokens.css';\nimport * as editorCommon from '../../common/editorCommon';\nimport { ContentWidgetPositionPreference, OverlayWidgetPositionPreference, MouseTargetType } from '../../browser/editorBrowser';\nimport { StandaloneEditor, StandaloneDiffEditor } from './standaloneCodeEditor';\nimport { ScrollbarVisibility } from '../../../base/common/scrollable';\nimport { DynamicStandaloneServices, StaticServices } from './standaloneServices';\nimport { OpenerService } from '../../browser/services/openerService';\nimport { IOpenerService } from '../../../platform/opener/common/opener';\nimport { Colorizer } from './colorizer';\nimport { SimpleEditorModelResolverService } from './simpleServices';\nimport * as modes from '../../common/modes';\nimport { createWebWorker as actualCreateWebWorker } from '../../common/services/webWorker';\nimport { DiffNavigator } from '../../browser/widget/diffNavigator';\nimport { ICommandService } from '../../../platform/commands/common/commands';\nimport { IContextViewService } from '../../../platform/contextview/browser/contextView';\nimport { IInstantiationService } from '../../../platform/instantiation/common/instantiation';\nimport { IKeybindingService } from '../../../platform/keybinding/common/keybinding';\nimport { IContextKeyService } from '../../../platform/contextkey/common/contextkey';\nimport { ICodeEditorService } from '../../browser/services/codeEditorService';\nimport { IEditorWorkerService } from '../../common/services/editorWorkerService';\nimport { ITextModelService } from '../../common/services/resolverService';\nimport { NULL_STATE, nullTokenize } from '../../common/modes/nullMode';\nimport { IStandaloneThemeService } from '../common/standaloneThemeService';\nimport { FontInfo, BareFontInfo } from '../../common/config/fontInfo';\nimport * as editorOptions from '../../common/config/editorOptions';\nimport { CursorChangeReason } from '../../common/controller/cursorEvents';\nimport { OverviewRulerLane, EndOfLinePreference, DefaultEndOfLine, EndOfLineSequence, TrackedRangeStickiness, TextModelResolvedOptions, FindMatch } from '../../common/model';\nimport { INotificationService } from '../../../platform/notification/common/notification';\nimport { IConfigurationService } from '../../../platform/configuration/common/configuration';\nfunction withAllStandaloneServices(domElement, override, callback) {\n var services = new DynamicStandaloneServices(domElement, override);\n var simpleEditorModelResolverService = null;\n if (!services.has(ITextModelService)) {\n simpleEditorModelResolverService = new SimpleEditorModelResolverService();\n services.set(ITextModelService, simpleEditorModelResolverService);\n }\n if (!services.has(IOpenerService)) {\n services.set(IOpenerService, new OpenerService(services.get(ICodeEditorService), services.get(ICommandService)));\n }\n var result = callback(services);\n if (simpleEditorModelResolverService) {\n simpleEditorModelResolverService.setEditor(result);\n }\n return result;\n}\n/**\n * Create a new editor under `domElement`.\n * `domElement` should be empty (not contain other dom nodes).\n * The editor will read the size of `domElement`.\n */\nexport function create(domElement, options, override) {\n return withAllStandaloneServices(domElement, override, function (services) {\n return new StandaloneEditor(domElement, options, services, services.get(IInstantiationService), services.get(ICodeEditorService), services.get(ICommandService), services.get(IContextKeyService), services.get(IKeybindingService), services.get(IContextViewService), services.get(IStandaloneThemeService), services.get(INotificationService), services.get(IConfigurationService));\n });\n}\n/**\n * Emitted when an editor is created.\n * Creating a diff editor might cause this listener to be invoked with the two editors.\n * @event\n */\nexport function onDidCreateEditor(listener) {\n return StaticServices.codeEditorService.get().onCodeEditorAdd(function (editor) {\n listener(editor);\n });\n}\n/**\n * Create a new diff editor under `domElement`.\n * `domElement` should be empty (not contain other dom nodes).\n * The editor will read the size of `domElement`.\n */\nexport function createDiffEditor(domElement, options, override) {\n return withAllStandaloneServices(domElement, override, function (services) {\n return new StandaloneDiffEditor(domElement, options, services, services.get(IInstantiationService), services.get(IContextKeyService), services.get(IKeybindingService), services.get(IContextViewService), services.get(IEditorWorkerService), services.get(ICodeEditorService), services.get(IStandaloneThemeService), services.get(INotificationService), services.get(IConfigurationService));\n });\n}\nexport function createDiffNavigator(diffEditor, opts) {\n return new DiffNavigator(diffEditor, opts);\n}\nfunction doCreateModel(value, mode, uri) {\n return StaticServices.modelService.get().createModel(value, mode, uri);\n}\n/**\n * Create a new editor model.\n * You can specify the language that should be set for this model or let the language be inferred from the `uri`.\n */\nexport function createModel(value, language, uri) {\n value = value || '';\n if (!language) {\n var path = uri ? uri.path : null;\n var firstLF = value.indexOf('\\n');\n var firstLine = value;\n if (firstLF !== -1) {\n firstLine = value.substring(0, firstLF);\n }\n return doCreateModel(value, StaticServices.modeService.get().getOrCreateModeByFilenameOrFirstLine(path, firstLine), uri);\n }\n return doCreateModel(value, StaticServices.modeService.get().getOrCreateMode(language), uri);\n}\n/**\n * Change the language for a model.\n */\nexport function setModelLanguage(model, languageId) {\n StaticServices.modelService.get().setMode(model, StaticServices.modeService.get().getOrCreateMode(languageId));\n}\n/**\n * Set the markers for a model.\n */\nexport function setModelMarkers(model, owner, markers) {\n if (model) {\n StaticServices.markerService.get().changeOne(owner, model.uri, markers);\n }\n}\n/**\n * Get markers for owner and/or resource\n * @returns {IMarker[]} list of markers\n * @param filter\n */\nexport function getModelMarkers(filter) {\n return StaticServices.markerService.get().read(filter);\n}\n/**\n * Get the model that has `uri` if it exists.\n */\nexport function getModel(uri) {\n return StaticServices.modelService.get().getModel(uri);\n}\n/**\n * Get all the created models.\n */\nexport function getModels() {\n return StaticServices.modelService.get().getModels();\n}\n/**\n * Emitted when a model is created.\n * @event\n */\nexport function onDidCreateModel(listener) {\n return StaticServices.modelService.get().onModelAdded(listener);\n}\n/**\n * Emitted right before a model is disposed.\n * @event\n */\nexport function onWillDisposeModel(listener) {\n return StaticServices.modelService.get().onModelRemoved(listener);\n}\n/**\n * Emitted when a different language is set to a model.\n * @event\n */\nexport function onDidChangeModelLanguage(listener) {\n return StaticServices.modelService.get().onModelModeChanged(function (e) {\n listener({\n model: e.model,\n oldLanguage: e.oldModeId\n });\n });\n}\n/**\n * Create a new web worker that has model syncing capabilities built in.\n * Specify an AMD module to load that will `create` an object that will be proxied.\n */\nexport function createWebWorker(opts) {\n return actualCreateWebWorker(StaticServices.modelService.get(), opts);\n}\n/**\n * Colorize the contents of `domNode` using attribute `data-lang`.\n */\nexport function colorizeElement(domNode, options) {\n return Colorizer.colorizeElement(StaticServices.standaloneThemeService.get(), StaticServices.modeService.get(), domNode, options);\n}\n/**\n * Colorize `text` using language `languageId`.\n */\nexport function colorize(text, languageId, options) {\n return Colorizer.colorize(StaticServices.modeService.get(), text, languageId, options);\n}\n/**\n * Colorize a line in a model.\n */\nexport function colorizeModelLine(model, lineNumber, tabSize) {\n if (tabSize === void 0) { tabSize = 4; }\n return Colorizer.colorizeModelLine(model, lineNumber, tabSize);\n}\n/**\n * @internal\n */\nfunction getSafeTokenizationSupport(language) {\n var tokenizationSupport = modes.TokenizationRegistry.get(language);\n if (tokenizationSupport) {\n return tokenizationSupport;\n }\n return {\n getInitialState: function () { return NULL_STATE; },\n tokenize: function (line, state, deltaOffset) { return nullTokenize(language, line, state, deltaOffset); },\n tokenize2: undefined,\n };\n}\n/**\n * Tokenize `text` using language `languageId`\n */\nexport function tokenize(text, languageId) {\n var modeService = StaticServices.modeService.get();\n // Needed in order to get the mode registered for subsequent look-ups\n modeService.getOrCreateMode(languageId);\n var tokenizationSupport = getSafeTokenizationSupport(languageId);\n var lines = text.split(/\\r\\n|\\r|\\n/);\n var result = [];\n var state = tokenizationSupport.getInitialState();\n for (var i = 0, len = lines.length; i < len; i++) {\n var line = lines[i];\n var tokenizationResult = tokenizationSupport.tokenize(line, state, 0);\n result[i] = tokenizationResult.tokens;\n state = tokenizationResult.endState;\n }\n return result;\n}\n/**\n * Define a new theme or updte an existing theme.\n */\nexport function defineTheme(themeName, themeData) {\n StaticServices.standaloneThemeService.get().defineTheme(themeName, themeData);\n}\n/**\n * Switches to a theme.\n */\nexport function setTheme(themeName) {\n StaticServices.standaloneThemeService.get().setTheme(themeName);\n}\n/**\n * @internal\n * --------------------------------------------\n * This is repeated here so it can be exported\n * because TS inlines const enums\n * --------------------------------------------\n */\nvar ScrollType;\n(function (ScrollType) {\n ScrollType[ScrollType[\"Smooth\"] = 0] = \"Smooth\";\n ScrollType[ScrollType[\"Immediate\"] = 1] = \"Immediate\";\n})(ScrollType || (ScrollType = {}));\n/**\n * @internal\n * --------------------------------------------\n * This is repeated here so it can be exported\n * because TS inlines const enums\n * --------------------------------------------\n */\nvar RenderLineNumbersType;\n(function (RenderLineNumbersType) {\n RenderLineNumbersType[RenderLineNumbersType[\"Off\"] = 0] = \"Off\";\n RenderLineNumbersType[RenderLineNumbersType[\"On\"] = 1] = \"On\";\n RenderLineNumbersType[RenderLineNumbersType[\"Relative\"] = 2] = \"Relative\";\n RenderLineNumbersType[RenderLineNumbersType[\"Interval\"] = 3] = \"Interval\";\n RenderLineNumbersType[RenderLineNumbersType[\"Custom\"] = 4] = \"Custom\";\n})(RenderLineNumbersType || (RenderLineNumbersType = {}));\n/**\n * @internal\n */\nexport function createMonacoEditorAPI() {\n return {\n // methods\n create: create,\n onDidCreateEditor: onDidCreateEditor,\n createDiffEditor: createDiffEditor,\n createDiffNavigator: createDiffNavigator,\n createModel: createModel,\n setModelLanguage: setModelLanguage,\n setModelMarkers: setModelMarkers,\n getModelMarkers: getModelMarkers,\n getModels: getModels,\n getModel: getModel,\n onDidCreateModel: onDidCreateModel,\n onWillDisposeModel: onWillDisposeModel,\n onDidChangeModelLanguage: onDidChangeModelLanguage,\n createWebWorker: createWebWorker,\n colorizeElement: colorizeElement,\n colorize: colorize,\n colorizeModelLine: colorizeModelLine,\n tokenize: tokenize,\n defineTheme: defineTheme,\n setTheme: setTheme,\n // enums\n ScrollbarVisibility: ScrollbarVisibility,\n WrappingIndent: editorOptions.WrappingIndent,\n OverviewRulerLane: OverviewRulerLane,\n EndOfLinePreference: EndOfLinePreference,\n DefaultEndOfLine: DefaultEndOfLine,\n EndOfLineSequence: EndOfLineSequence,\n TrackedRangeStickiness: TrackedRangeStickiness,\n CursorChangeReason: CursorChangeReason,\n MouseTargetType: MouseTargetType,\n TextEditorCursorStyle: editorOptions.TextEditorCursorStyle,\n TextEditorCursorBlinkingStyle: editorOptions.TextEditorCursorBlinkingStyle,\n ContentWidgetPositionPreference: ContentWidgetPositionPreference,\n OverlayWidgetPositionPreference: OverlayWidgetPositionPreference,\n RenderMinimap: editorOptions.RenderMinimap,\n ScrollType: ScrollType,\n RenderLineNumbersType: RenderLineNumbersType,\n // classes\n InternalEditorOptions: editorOptions.InternalEditorOptions,\n BareFontInfo: BareFontInfo,\n FontInfo: FontInfo,\n TextModelResolvedOptions: TextModelResolvedOptions,\n FindMatch: FindMatch,\n // vars\n EditorType: editorCommon.EditorType\n };\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nexport function isFuzzyActionArr(what) {\n return (Array.isArray(what));\n}\nexport function isFuzzyAction(what) {\n return !isFuzzyActionArr(what);\n}\nexport function isString(what) {\n return (typeof what === 'string');\n}\nexport function isIAction(what) {\n return !isString(what);\n}\n// Small helper functions\n/**\n * Is a string null, undefined, or empty?\n */\nexport function empty(s) {\n return (s ? false : true);\n}\n/**\n * Puts a string to lower case if 'ignoreCase' is set.\n */\nexport function fixCase(lexer, str) {\n return (lexer.ignoreCase && str ? str.toLowerCase() : str);\n}\n/**\n * Ensures there are no bad characters in a CSS token class.\n */\nexport function sanitize(s) {\n return s.replace(/[&<>'\"_]/g, '-'); // used on all output token CSS classes\n}\n// Logging\n/**\n * Logs a message.\n */\nexport function log(lexer, msg) {\n console.log(lexer.languageId + \": \" + msg);\n}\n// Throwing errors\n/**\n * Throws error. May actually just log the error and continue.\n */\nexport function throwError(lexer, msg) {\n throw new Error(lexer.languageId + \": \" + msg);\n}\n// Helper functions for rule finding and substitution\n/**\n * substituteMatches is used on lexer strings and can substitutes predefined patterns:\n * \t\t$$ => $\n * \t\t$# => id\n * \t\t$n => matched entry n\n * \t\t@attr => contents of lexer[attr]\n *\n * See documentation for more info\n */\nexport function substituteMatches(lexer, str, id, matches, state) {\n var re = /\\$((\\$)|(#)|(\\d\\d?)|[sS](\\d\\d?)|@(\\w+))/g;\n var stateMatches = null;\n return str.replace(re, function (full, sub, dollar, hash, n, s, attr, ofs, total) {\n if (!empty(dollar)) {\n return '$'; // $$\n }\n if (!empty(hash)) {\n return fixCase(lexer, id); // default $#\n }\n if (!empty(n) && n < matches.length) {\n return fixCase(lexer, matches[n]); // $n\n }\n if (!empty(attr) && lexer && typeof (lexer[attr]) === 'string') {\n return lexer[attr]; //@attribute\n }\n if (stateMatches === null) { // split state on demand\n stateMatches = state.split('.');\n stateMatches.unshift(state);\n }\n if (!empty(s) && s < stateMatches.length) {\n return fixCase(lexer, stateMatches[s]); //$Sn\n }\n return '';\n });\n}\n/**\n * Find the tokenizer rules for a specific state (i.e. next action)\n */\nexport function findRules(lexer, state) {\n while (state && state.length > 0) {\n var rules = lexer.tokenizer[state];\n if (rules) {\n return rules;\n }\n var idx = state.lastIndexOf('.');\n if (idx < 0) {\n state = null; // no further parent\n }\n else {\n state = state.substr(0, idx);\n }\n }\n return null;\n}\n/**\n * Is a certain state defined? In contrast to 'findRules' this works on a ILexerMin.\n * This is used during compilation where we may know the defined states\n * but not yet whether the corresponding rules are correct.\n */\nexport function stateExists(lexer, state) {\n while (state && state.length > 0) {\n var exist = lexer.stateNames[state];\n if (exist) {\n return true;\n }\n var idx = state.lastIndexOf('.');\n if (idx < 0) {\n state = null; // no further parent\n }\n else {\n state = state.substr(0, idx);\n }\n }\n return false;\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\n/*\n * This module only exports 'compile' which compiles a JSON language definition\n * into a typed and checked ILexer definition.\n */\nimport * as objects from '../../../../base/common/objects';\nimport * as monarchCommon from './monarchCommon';\n/*\n * Type helpers\n *\n * Note: this is just for sanity checks on the JSON description which is\n * helpful for the programmer. No checks are done anymore once the lexer is\n * already 'compiled and checked'.\n *\n */\nfunction isArrayOf(elemType, obj) {\n if (!obj) {\n return false;\n }\n if (!(Array.isArray(obj))) {\n return false;\n }\n for (var idx in obj) {\n if (obj.hasOwnProperty(idx)) {\n if (!(elemType(obj[idx]))) {\n return false;\n }\n }\n }\n return true;\n}\nfunction bool(prop, def, onerr) {\n if (typeof (prop) === 'boolean') {\n return prop;\n }\n if (onerr && (prop || def === undefined)) {\n onerr(); // type is wrong, or there is no default\n }\n return (def === undefined ? null : def);\n}\nfunction string(prop, def, onerr) {\n if (typeof (prop) === 'string') {\n return prop;\n }\n if (onerr && (prop || def === undefined)) {\n onerr(); // type is wrong, or there is no default\n }\n return (def === undefined ? null : def);\n}\n// Lexer helpers\n/**\n * Compiles a regular expression string, adding the 'i' flag if 'ignoreCase' is set.\n * Also replaces @\\w+ or sequences with the content of the specified attribute\n */\nfunction compileRegExp(lexer, str) {\n if (typeof (str) !== 'string') {\n return null;\n }\n var n = 0;\n while (str.indexOf('@') >= 0 && n < 5) { // at most 5 expansions\n n++;\n str = str.replace(/@(\\w+)/g, function (s, attr) {\n var sub = '';\n if (typeof (lexer[attr]) === 'string') {\n sub = lexer[attr];\n }\n else if (lexer[attr] && lexer[attr] instanceof RegExp) {\n sub = lexer[attr].source;\n }\n else {\n if (lexer[attr] === undefined) {\n monarchCommon.throwError(lexer, 'language definition does not contain attribute \\'' + attr + '\\', used at: ' + str);\n }\n else {\n monarchCommon.throwError(lexer, 'attribute reference \\'' + attr + '\\' must be a string, used at: ' + str);\n }\n }\n return (monarchCommon.empty(sub) ? '' : '(?:' + sub + ')');\n });\n }\n return new RegExp(str, (lexer.ignoreCase ? 'i' : ''));\n}\n/**\n * Compiles guard functions for case matches.\n * This compiles 'cases' attributes into efficient match functions.\n *\n */\nfunction selectScrutinee(id, matches, state, num) {\n if (num < 0) {\n return id;\n }\n if (num < matches.length) {\n return matches[num];\n }\n if (num >= 100) {\n num = num - 100;\n var parts = state.split('.');\n parts.unshift(state);\n if (num < parts.length) {\n return parts[num];\n }\n }\n return null;\n}\nfunction createGuard(lexer, ruleName, tkey, val) {\n // get the scrutinee and pattern\n var scrut = -1; // -1: $!, 0-99: $n, 100+n: $Sn\n var oppat = tkey;\n var matches = tkey.match(/^\\$(([sS]?)(\\d\\d?)|#)(.*)$/);\n if (matches) {\n if (matches[3]) { // if digits\n scrut = parseInt(matches[3]);\n if (matches[2]) {\n scrut = scrut + 100; // if [sS] present\n }\n }\n oppat = matches[4];\n }\n // get operator\n var op = '~';\n var pat = oppat;\n if (!oppat || oppat.length === 0) {\n op = '!=';\n pat = '';\n }\n else if (/^\\w*$/.test(pat)) { // just a word\n op = '==';\n }\n else {\n matches = oppat.match(/^(@|!@|~|!~|==|!=)(.*)$/);\n if (matches) {\n op = matches[1];\n pat = matches[2];\n }\n }\n // set the tester function\n var tester;\n // special case a regexp that matches just words\n if ((op === '~' || op === '!~') && /^(\\w|\\|)*$/.test(pat)) {\n var inWords_1 = objects.createKeywordMatcher(pat.split('|'), lexer.ignoreCase);\n tester = function (s) { return (op === '~' ? inWords_1(s) : !inWords_1(s)); };\n }\n else if (op === '@' || op === '!@') {\n var words = lexer[pat];\n if (!words) {\n monarchCommon.throwError(lexer, 'the @ match target \\'' + pat + '\\' is not defined, in rule: ' + ruleName);\n }\n if (!(isArrayOf(function (elem) { return (typeof (elem) === 'string'); }, words))) {\n monarchCommon.throwError(lexer, 'the @ match target \\'' + pat + '\\' must be an array of strings, in rule: ' + ruleName);\n }\n var inWords_2 = objects.createKeywordMatcher(words, lexer.ignoreCase);\n tester = function (s) { return (op === '@' ? inWords_2(s) : !inWords_2(s)); };\n }\n else if (op === '~' || op === '!~') {\n if (pat.indexOf('$') < 0) {\n // precompile regular expression\n var re_1 = compileRegExp(lexer, '^' + pat + '$');\n tester = function (s) { return (op === '~' ? re_1.test(s) : !re_1.test(s)); };\n }\n else {\n tester = function (s, id, matches, state) {\n var re = compileRegExp(lexer, '^' + monarchCommon.substituteMatches(lexer, pat, id, matches, state) + '$');\n return re.test(s);\n };\n }\n }\n else { // if (op==='==' || op==='!=') {\n if (pat.indexOf('$') < 0) {\n var patx_1 = monarchCommon.fixCase(lexer, pat);\n tester = function (s) { return (op === '==' ? s === patx_1 : s !== patx_1); };\n }\n else {\n var patx_2 = monarchCommon.fixCase(lexer, pat);\n tester = function (s, id, matches, state, eos) {\n var patexp = monarchCommon.substituteMatches(lexer, patx_2, id, matches, state);\n return (op === '==' ? s === patexp : s !== patexp);\n };\n }\n }\n // return the branch object\n if (scrut === -1) {\n return {\n name: tkey, value: val, test: function (id, matches, state, eos) {\n return tester(id, id, matches, state, eos);\n }\n };\n }\n else {\n return {\n name: tkey, value: val, test: function (id, matches, state, eos) {\n var scrutinee = selectScrutinee(id, matches, state, scrut);\n return tester(!scrutinee ? '' : scrutinee, id, matches, state, eos);\n }\n };\n }\n}\n/**\n * Compiles an action: i.e. optimize regular expressions and case matches\n * and do many sanity checks.\n *\n * This is called only during compilation but if the lexer definition\n * contains user functions as actions (which is usually not allowed), then this\n * may be called during lexing. It is important therefore to compile common cases efficiently\n */\nfunction compileAction(lexer, ruleName, action) {\n if (!action) {\n return { token: '' };\n }\n else if (typeof (action) === 'string') {\n return action; // { token: action };\n }\n else if (action.token || action.token === '') {\n if (typeof (action.token) !== 'string') {\n monarchCommon.throwError(lexer, 'a \\'token\\' attribute must be of type string, in rule: ' + ruleName);\n return { token: '' };\n }\n else {\n // only copy specific typed fields (only happens once during compile Lexer)\n var newAction = { token: action.token };\n if (action.token.indexOf('$') >= 0) {\n newAction.tokenSubst = true;\n }\n if (typeof (action.bracket) === 'string') {\n if (action.bracket === '@open') {\n newAction.bracket = 1 /* Open */;\n }\n else if (action.bracket === '@close') {\n newAction.bracket = -1 /* Close */;\n }\n else {\n monarchCommon.throwError(lexer, 'a \\'bracket\\' attribute must be either \\'@open\\' or \\'@close\\', in rule: ' + ruleName);\n }\n }\n if (action.next) {\n if (typeof (action.next) !== 'string') {\n monarchCommon.throwError(lexer, 'the next state must be a string value in rule: ' + ruleName);\n }\n else {\n var next = action.next;\n if (!/^(@pop|@push|@popall)$/.test(next)) {\n if (next[0] === '@') {\n next = next.substr(1); // peel off starting @ sign\n }\n if (next.indexOf('$') < 0) { // no dollar substitution, we can check if the state exists\n if (!monarchCommon.stateExists(lexer, monarchCommon.substituteMatches(lexer, next, '', [], ''))) {\n monarchCommon.throwError(lexer, 'the next state \\'' + action.next + '\\' is not defined in rule: ' + ruleName);\n }\n }\n }\n newAction.next = next;\n }\n }\n if (typeof (action.goBack) === 'number') {\n newAction.goBack = action.goBack;\n }\n if (typeof (action.switchTo) === 'string') {\n newAction.switchTo = action.switchTo;\n }\n if (typeof (action.log) === 'string') {\n newAction.log = action.log;\n }\n if (typeof (action.nextEmbedded) === 'string') {\n newAction.nextEmbedded = action.nextEmbedded;\n lexer.usesEmbedded = true;\n }\n return newAction;\n }\n }\n else if (Array.isArray(action)) {\n var results = [];\n for (var idx in action) {\n if (action.hasOwnProperty(idx)) {\n results[idx] = compileAction(lexer, ruleName, action[idx]);\n }\n }\n return { group: results };\n }\n else if (action.cases) {\n // build an array of test cases\n var cases_1 = [];\n // for each case, push a test function and result value\n for (var tkey in action.cases) {\n if (action.cases.hasOwnProperty(tkey)) {\n var val = compileAction(lexer, ruleName, action.cases[tkey]);\n // what kind of case\n if (tkey === '@default' || tkey === '@' || tkey === '') {\n cases_1.push({ test: null, value: val, name: tkey });\n }\n else if (tkey === '@eos') {\n cases_1.push({ test: function (id, matches, state, eos) { return eos; }, value: val, name: tkey });\n }\n else {\n cases_1.push(createGuard(lexer, ruleName, tkey, val)); // call separate function to avoid local variable capture\n }\n }\n }\n // create a matching function\n var def_1 = lexer.defaultToken;\n return {\n test: function (id, matches, state, eos) {\n for (var idx in cases_1) {\n if (cases_1.hasOwnProperty(idx)) {\n var didmatch = (!cases_1[idx].test || cases_1[idx].test(id, matches, state, eos));\n if (didmatch) {\n return cases_1[idx].value;\n }\n }\n }\n return def_1;\n }\n };\n }\n else {\n monarchCommon.throwError(lexer, 'an action must be a string, an object with a \\'token\\' or \\'cases\\' attribute, or an array of actions; in rule: ' + ruleName);\n return '';\n }\n}\n/**\n * Helper class for creating matching rules\n */\nvar Rule = /** @class */ (function () {\n function Rule(name) {\n this.regex = new RegExp('');\n this.action = { token: '' };\n this.matchOnlyAtLineStart = false;\n this.name = '';\n this.name = name;\n }\n Rule.prototype.setRegex = function (lexer, re) {\n var sregex;\n if (typeof (re) === 'string') {\n sregex = re;\n }\n else if (re instanceof RegExp) {\n sregex = re.source;\n }\n else {\n monarchCommon.throwError(lexer, 'rules must start with a match string or regular expression: ' + this.name);\n }\n this.matchOnlyAtLineStart = (sregex.length > 0 && sregex[0] === '^');\n this.name = this.name + ': ' + sregex;\n this.regex = compileRegExp(lexer, '^(?:' + (this.matchOnlyAtLineStart ? sregex.substr(1) : sregex) + ')');\n };\n Rule.prototype.setAction = function (lexer, act) {\n this.action = compileAction(lexer, this.name, act);\n };\n return Rule;\n}());\n/**\n * Compiles a json description function into json where all regular expressions,\n * case matches etc, are compiled and all include rules are expanded.\n * We also compile the bracket definitions, supply defaults, and do many sanity checks.\n * If the 'jsonStrict' parameter is 'false', we allow at certain locations\n * regular expression objects and functions that get called during lexing.\n * (Currently we have no samples that need this so perhaps we should always have\n * jsonStrict to true).\n */\nexport function compile(languageId, json) {\n if (!json || typeof (json) !== 'object') {\n throw new Error('Monarch: expecting a language definition object');\n }\n // Create our lexer\n var lexer = {};\n lexer.languageId = languageId;\n lexer.noThrow = false; // raise exceptions during compilation\n lexer.maxStack = 100;\n // Set standard fields: be defensive about types\n lexer.start = string(json.start);\n lexer.ignoreCase = bool(json.ignoreCase, false);\n lexer.tokenPostfix = string(json.tokenPostfix, '.' + lexer.languageId);\n lexer.defaultToken = string(json.defaultToken, 'source', function () { monarchCommon.throwError(lexer, 'the \\'defaultToken\\' must be a string'); });\n lexer.usesEmbedded = false; // becomes true if we find a nextEmbedded action\n // For calling compileAction later on\n var lexerMin = json;\n lexerMin.languageId = languageId;\n lexerMin.ignoreCase = lexer.ignoreCase;\n lexerMin.noThrow = lexer.noThrow;\n lexerMin.usesEmbedded = lexer.usesEmbedded;\n lexerMin.stateNames = json.tokenizer;\n lexerMin.defaultToken = lexer.defaultToken;\n // Compile an array of rules into newrules where RegExp objects are created.\n function addRules(state, newrules, rules) {\n for (var idx in rules) {\n if (rules.hasOwnProperty(idx)) {\n var rule = rules[idx];\n var include = rule.include;\n if (include) {\n if (typeof (include) !== 'string') {\n monarchCommon.throwError(lexer, 'an \\'include\\' attribute must be a string at: ' + state);\n }\n if (include[0] === '@') {\n include = include.substr(1); // peel off starting @\n }\n if (!json.tokenizer[include]) {\n monarchCommon.throwError(lexer, 'include target \\'' + include + '\\' is not defined at: ' + state);\n }\n addRules(state + '.' + include, newrules, json.tokenizer[include]);\n }\n else {\n var newrule = new Rule(state);\n // Set up new rule attributes\n if (Array.isArray(rule) && rule.length >= 1 && rule.length <= 3) {\n newrule.setRegex(lexerMin, rule[0]);\n if (rule.length >= 3) {\n if (typeof (rule[1]) === 'string') {\n newrule.setAction(lexerMin, { token: rule[1], next: rule[2] });\n }\n else if (typeof (rule[1]) === 'object') {\n var rule1 = rule[1];\n rule1.next = rule[2];\n newrule.setAction(lexerMin, rule1);\n }\n else {\n monarchCommon.throwError(lexer, 'a next state as the last element of a rule can only be given if the action is either an object or a string, at: ' + state);\n }\n }\n else {\n newrule.setAction(lexerMin, rule[1]);\n }\n }\n else {\n if (!rule.regex) {\n monarchCommon.throwError(lexer, 'a rule must either be an array, or an object with a \\'regex\\' or \\'include\\' field at: ' + state);\n }\n if (rule.name) {\n newrule.name = string(rule.name);\n }\n if (rule.matchOnlyAtStart) {\n newrule.matchOnlyAtLineStart = bool(rule.matchOnlyAtLineStart);\n }\n newrule.setRegex(lexerMin, rule.regex);\n newrule.setAction(lexerMin, rule.action);\n }\n newrules.push(newrule);\n }\n }\n }\n }\n // compile the tokenizer rules\n if (!json.tokenizer || typeof (json.tokenizer) !== 'object') {\n monarchCommon.throwError(lexer, 'a language definition must define the \\'tokenizer\\' attribute as an object');\n }\n lexer.tokenizer = [];\n for (var key in json.tokenizer) {\n if (json.tokenizer.hasOwnProperty(key)) {\n if (!lexer.start) {\n lexer.start = key;\n }\n var rules = json.tokenizer[key];\n lexer.tokenizer[key] = new Array();\n addRules('tokenizer.' + key, lexer.tokenizer[key], rules);\n }\n }\n lexer.usesEmbedded = lexerMin.usesEmbedded; // can be set during compileAction\n // Set simple brackets\n if (json.brackets) {\n if (!(Array.isArray(json.brackets))) {\n monarchCommon.throwError(lexer, 'the \\'brackets\\' attribute must be defined as an array');\n }\n }\n else {\n json.brackets = [\n { open: '{', close: '}', token: 'delimiter.curly' },\n { open: '[', close: ']', token: 'delimiter.square' },\n { open: '(', close: ')', token: 'delimiter.parenthesis' },\n { open: '<', close: '>', token: 'delimiter.angle' }\n ];\n }\n var brackets = [];\n for (var bracketIdx in json.brackets) {\n if (json.brackets.hasOwnProperty(bracketIdx)) {\n var desc = json.brackets[bracketIdx];\n if (desc && Array.isArray(desc) && desc.length === 3) {\n desc = { token: desc[2], open: desc[0], close: desc[1] };\n }\n if (desc.open === desc.close) {\n monarchCommon.throwError(lexer, 'open and close brackets in a \\'brackets\\' attribute must be different: ' + desc.open +\n '\\n hint: use the \\'bracket\\' attribute if matching on equal brackets is required.');\n }\n if (typeof (desc.open) === 'string' && typeof (desc.token) === 'string') {\n brackets.push({\n token: string(desc.token) + lexer.tokenPostfix,\n open: monarchCommon.fixCase(lexer, string(desc.open)),\n close: monarchCommon.fixCase(lexer, string(desc.close))\n });\n }\n else {\n monarchCommon.throwError(lexer, 'every element in the \\'brackets\\' array must be a \\'{open,close,token}\\' object or array');\n }\n }\n }\n lexer.brackets = brackets;\n // Disable throw so the syntax highlighter goes, no matter what\n lexer.noThrow = true;\n return lexer;\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport * as modes from '../../../common/modes';\nimport * as monarchCommon from './monarchCommon';\nimport { Token, TokenizationResult, TokenizationResult2 } from '../../../common/core/token';\nimport { NULL_STATE, NULL_MODE_ID } from '../../../common/modes/nullMode';\nvar CACHE_STACK_DEPTH = 5;\n/**\n * Reuse the same stack elements up to a certain depth.\n */\nvar MonarchStackElementFactory = /** @class */ (function () {\n function MonarchStackElementFactory(maxCacheDepth) {\n this._maxCacheDepth = maxCacheDepth;\n this._entries = Object.create(null);\n }\n MonarchStackElementFactory.create = function (parent, state) {\n return this._INSTANCE.create(parent, state);\n };\n MonarchStackElementFactory.prototype.create = function (parent, state) {\n if (parent !== null && parent.depth >= this._maxCacheDepth) {\n // no caching above a certain depth\n return new MonarchStackElement(parent, state);\n }\n var stackElementId = MonarchStackElement.getStackElementId(parent);\n if (stackElementId.length > 0) {\n stackElementId += '|';\n }\n stackElementId += state;\n var result = this._entries[stackElementId];\n if (result) {\n return result;\n }\n result = new MonarchStackElement(parent, state);\n this._entries[stackElementId] = result;\n return result;\n };\n MonarchStackElementFactory._INSTANCE = new MonarchStackElementFactory(CACHE_STACK_DEPTH);\n return MonarchStackElementFactory;\n}());\nvar MonarchStackElement = /** @class */ (function () {\n function MonarchStackElement(parent, state) {\n this.parent = parent;\n this.state = state;\n this.depth = (this.parent ? this.parent.depth : 0) + 1;\n }\n MonarchStackElement.getStackElementId = function (element) {\n var result = '';\n while (element !== null) {\n if (result.length > 0) {\n result += '|';\n }\n result += element.state;\n element = element.parent;\n }\n return result;\n };\n MonarchStackElement._equals = function (a, b) {\n while (a !== null && b !== null) {\n if (a === b) {\n return true;\n }\n if (a.state !== b.state) {\n return false;\n }\n a = a.parent;\n b = b.parent;\n }\n if (a === null && b === null) {\n return true;\n }\n return false;\n };\n MonarchStackElement.prototype.equals = function (other) {\n return MonarchStackElement._equals(this, other);\n };\n MonarchStackElement.prototype.push = function (state) {\n return MonarchStackElementFactory.create(this, state);\n };\n MonarchStackElement.prototype.pop = function () {\n return this.parent;\n };\n MonarchStackElement.prototype.popall = function () {\n var result = this;\n while (result.parent) {\n result = result.parent;\n }\n return result;\n };\n MonarchStackElement.prototype.switchTo = function (state) {\n return MonarchStackElementFactory.create(this.parent, state);\n };\n return MonarchStackElement;\n}());\nvar EmbeddedModeData = /** @class */ (function () {\n function EmbeddedModeData(modeId, state) {\n this.modeId = modeId;\n this.state = state;\n }\n EmbeddedModeData.prototype.equals = function (other) {\n return (this.modeId === other.modeId\n && this.state.equals(other.state));\n };\n EmbeddedModeData.prototype.clone = function () {\n var stateClone = this.state.clone();\n // save an object\n if (stateClone === this.state) {\n return this;\n }\n return new EmbeddedModeData(this.modeId, this.state);\n };\n return EmbeddedModeData;\n}());\n/**\n * Reuse the same line states up to a certain depth.\n */\nvar MonarchLineStateFactory = /** @class */ (function () {\n function MonarchLineStateFactory(maxCacheDepth) {\n this._maxCacheDepth = maxCacheDepth;\n this._entries = Object.create(null);\n }\n MonarchLineStateFactory.create = function (stack, embeddedModeData) {\n return this._INSTANCE.create(stack, embeddedModeData);\n };\n MonarchLineStateFactory.prototype.create = function (stack, embeddedModeData) {\n if (embeddedModeData !== null) {\n // no caching when embedding\n return new MonarchLineState(stack, embeddedModeData);\n }\n if (stack !== null && stack.depth >= this._maxCacheDepth) {\n // no caching above a certain depth\n return new MonarchLineState(stack, embeddedModeData);\n }\n var stackElementId = MonarchStackElement.getStackElementId(stack);\n var result = this._entries[stackElementId];\n if (result) {\n return result;\n }\n result = new MonarchLineState(stack, null);\n this._entries[stackElementId] = result;\n return result;\n };\n MonarchLineStateFactory._INSTANCE = new MonarchLineStateFactory(CACHE_STACK_DEPTH);\n return MonarchLineStateFactory;\n}());\nvar MonarchLineState = /** @class */ (function () {\n function MonarchLineState(stack, embeddedModeData) {\n this.stack = stack;\n this.embeddedModeData = embeddedModeData;\n }\n MonarchLineState.prototype.clone = function () {\n var embeddedModeDataClone = this.embeddedModeData ? this.embeddedModeData.clone() : null;\n // save an object\n if (embeddedModeDataClone === this.embeddedModeData) {\n return this;\n }\n return MonarchLineStateFactory.create(this.stack, this.embeddedModeData);\n };\n MonarchLineState.prototype.equals = function (other) {\n if (!(other instanceof MonarchLineState)) {\n return false;\n }\n if (!this.stack.equals(other.stack)) {\n return false;\n }\n if (this.embeddedModeData === null && other.embeddedModeData === null) {\n return true;\n }\n if (this.embeddedModeData === null || other.embeddedModeData === null) {\n return false;\n }\n return this.embeddedModeData.equals(other.embeddedModeData);\n };\n return MonarchLineState;\n}());\nvar hasOwnProperty = Object.hasOwnProperty;\nvar MonarchClassicTokensCollector = /** @class */ (function () {\n function MonarchClassicTokensCollector() {\n this._tokens = [];\n this._language = null;\n this._lastTokenType = null;\n this._lastTokenLanguage = null;\n }\n MonarchClassicTokensCollector.prototype.enterMode = function (startOffset, modeId) {\n this._language = modeId;\n };\n MonarchClassicTokensCollector.prototype.emit = function (startOffset, type) {\n if (this._lastTokenType === type && this._lastTokenLanguage === this._language) {\n return;\n }\n this._lastTokenType = type;\n this._lastTokenLanguage = this._language;\n this._tokens.push(new Token(startOffset, type, this._language));\n };\n MonarchClassicTokensCollector.prototype.nestedModeTokenize = function (embeddedModeLine, embeddedModeData, offsetDelta) {\n var nestedModeId = embeddedModeData.modeId;\n var embeddedModeState = embeddedModeData.state;\n var nestedModeTokenizationSupport = modes.TokenizationRegistry.get(nestedModeId);\n if (!nestedModeTokenizationSupport) {\n this.enterMode(offsetDelta, nestedModeId);\n this.emit(offsetDelta, '');\n return embeddedModeState;\n }\n var nestedResult = nestedModeTokenizationSupport.tokenize(embeddedModeLine, embeddedModeState, offsetDelta);\n this._tokens = this._tokens.concat(nestedResult.tokens);\n this._lastTokenType = null;\n this._lastTokenLanguage = null;\n this._language = null;\n return nestedResult.endState;\n };\n MonarchClassicTokensCollector.prototype.finalize = function (endState) {\n return new TokenizationResult(this._tokens, endState);\n };\n return MonarchClassicTokensCollector;\n}());\nvar MonarchModernTokensCollector = /** @class */ (function () {\n function MonarchModernTokensCollector(modeService, theme) {\n this._modeService = modeService;\n this._theme = theme;\n this._prependTokens = null;\n this._tokens = [];\n this._currentLanguageId = 0 /* Null */;\n this._lastTokenMetadata = 0;\n }\n MonarchModernTokensCollector.prototype.enterMode = function (startOffset, modeId) {\n this._currentLanguageId = this._modeService.getLanguageIdentifier(modeId).id;\n };\n MonarchModernTokensCollector.prototype.emit = function (startOffset, type) {\n var metadata = this._theme.match(this._currentLanguageId, type);\n if (this._lastTokenMetadata === metadata) {\n return;\n }\n this._lastTokenMetadata = metadata;\n this._tokens.push(startOffset);\n this._tokens.push(metadata);\n };\n MonarchModernTokensCollector._merge = function (a, b, c) {\n var aLen = (a !== null ? a.length : 0);\n var bLen = b.length;\n var cLen = (c !== null ? c.length : 0);\n if (aLen === 0 && bLen === 0 && cLen === 0) {\n return new Uint32Array(0);\n }\n if (aLen === 0 && bLen === 0) {\n return c;\n }\n if (bLen === 0 && cLen === 0) {\n return a;\n }\n var result = new Uint32Array(aLen + bLen + cLen);\n if (a !== null) {\n result.set(a);\n }\n for (var i = 0; i < bLen; i++) {\n result[aLen + i] = b[i];\n }\n if (c !== null) {\n result.set(c, aLen + bLen);\n }\n return result;\n };\n MonarchModernTokensCollector.prototype.nestedModeTokenize = function (embeddedModeLine, embeddedModeData, offsetDelta) {\n var nestedModeId = embeddedModeData.modeId;\n var embeddedModeState = embeddedModeData.state;\n var nestedModeTokenizationSupport = modes.TokenizationRegistry.get(nestedModeId);\n if (!nestedModeTokenizationSupport) {\n this.enterMode(offsetDelta, nestedModeId);\n this.emit(offsetDelta, '');\n return embeddedModeState;\n }\n var nestedResult = nestedModeTokenizationSupport.tokenize2(embeddedModeLine, embeddedModeState, offsetDelta);\n this._prependTokens = MonarchModernTokensCollector._merge(this._prependTokens, this._tokens, nestedResult.tokens);\n this._tokens = [];\n this._currentLanguageId = 0;\n this._lastTokenMetadata = 0;\n return nestedResult.endState;\n };\n MonarchModernTokensCollector.prototype.finalize = function (endState) {\n return new TokenizationResult2(MonarchModernTokensCollector._merge(this._prependTokens, this._tokens, null), endState);\n };\n return MonarchModernTokensCollector;\n}());\nvar MonarchTokenizer = /** @class */ (function () {\n function MonarchTokenizer(modeService, standaloneThemeService, modeId, lexer) {\n var _this = this;\n this._modeService = modeService;\n this._standaloneThemeService = standaloneThemeService;\n this._modeId = modeId;\n this._lexer = lexer;\n this._embeddedModes = Object.create(null);\n // Set up listening for embedded modes\n var emitting = false;\n this._tokenizationRegistryListener = modes.TokenizationRegistry.onDidChange(function (e) {\n if (emitting) {\n return;\n }\n var isOneOfMyEmbeddedModes = false;\n for (var i = 0, len = e.changedLanguages.length; i < len; i++) {\n var language = e.changedLanguages[i];\n if (_this._embeddedModes[language]) {\n isOneOfMyEmbeddedModes = true;\n break;\n }\n }\n if (isOneOfMyEmbeddedModes) {\n emitting = true;\n modes.TokenizationRegistry.fire([_this._modeId]);\n emitting = false;\n }\n });\n }\n MonarchTokenizer.prototype.dispose = function () {\n this._tokenizationRegistryListener.dispose();\n };\n MonarchTokenizer.prototype.getInitialState = function () {\n var rootState = MonarchStackElementFactory.create(null, this._lexer.start);\n return MonarchLineStateFactory.create(rootState, null);\n };\n MonarchTokenizer.prototype.tokenize = function (line, lineState, offsetDelta) {\n var tokensCollector = new MonarchClassicTokensCollector();\n var endLineState = this._tokenize(line, lineState, offsetDelta, tokensCollector);\n return tokensCollector.finalize(endLineState);\n };\n MonarchTokenizer.prototype.tokenize2 = function (line, lineState, offsetDelta) {\n var tokensCollector = new MonarchModernTokensCollector(this._modeService, this._standaloneThemeService.getTheme().tokenTheme);\n var endLineState = this._tokenize(line, lineState, offsetDelta, tokensCollector);\n return tokensCollector.finalize(endLineState);\n };\n MonarchTokenizer.prototype._tokenize = function (line, lineState, offsetDelta, collector) {\n if (lineState.embeddedModeData) {\n return this._nestedTokenize(line, lineState, offsetDelta, collector);\n }\n else {\n return this._myTokenize(line, lineState, offsetDelta, collector);\n }\n };\n MonarchTokenizer.prototype._findLeavingNestedModeOffset = function (line, state) {\n var rules = this._lexer.tokenizer[state.stack.state];\n if (!rules) {\n rules = monarchCommon.findRules(this._lexer, state.stack.state); // do parent matching\n if (!rules) {\n monarchCommon.throwError(this._lexer, 'tokenizer state is not defined: ' + state.stack.state);\n }\n }\n var popOffset = -1;\n var hasEmbeddedPopRule = false;\n for (var idx in rules) {\n if (!hasOwnProperty.call(rules, idx)) {\n continue;\n }\n var rule = rules[idx];\n if (!monarchCommon.isIAction(rule.action) || rule.action.nextEmbedded !== '@pop') {\n continue;\n }\n hasEmbeddedPopRule = true;\n var regex = rule.regex;\n var regexSource = rule.regex.source;\n if (regexSource.substr(0, 4) === '^(?:' && regexSource.substr(regexSource.length - 1, 1) === ')') {\n regex = new RegExp(regexSource.substr(4, regexSource.length - 5), regex.ignoreCase ? 'i' : '');\n }\n var result = line.search(regex);\n if (result === -1) {\n continue;\n }\n if (popOffset === -1 || result < popOffset) {\n popOffset = result;\n }\n }\n if (!hasEmbeddedPopRule) {\n monarchCommon.throwError(this._lexer, 'no rule containing nextEmbedded: \"@pop\" in tokenizer embedded state: ' + state.stack.state);\n }\n return popOffset;\n };\n MonarchTokenizer.prototype._nestedTokenize = function (line, lineState, offsetDelta, tokensCollector) {\n var popOffset = this._findLeavingNestedModeOffset(line, lineState);\n if (popOffset === -1) {\n // tokenization will not leave nested mode\n var nestedEndState = tokensCollector.nestedModeTokenize(line, lineState.embeddedModeData, offsetDelta);\n return MonarchLineStateFactory.create(lineState.stack, new EmbeddedModeData(lineState.embeddedModeData.modeId, nestedEndState));\n }\n var nestedModeLine = line.substring(0, popOffset);\n if (nestedModeLine.length > 0) {\n // tokenize with the nested mode\n tokensCollector.nestedModeTokenize(nestedModeLine, lineState.embeddedModeData, offsetDelta);\n }\n var restOfTheLine = line.substring(popOffset);\n return this._myTokenize(restOfTheLine, lineState, offsetDelta + popOffset, tokensCollector);\n };\n MonarchTokenizer.prototype._myTokenize = function (line, lineState, offsetDelta, tokensCollector) {\n tokensCollector.enterMode(offsetDelta, this._modeId);\n var lineLength = line.length;\n var embeddedModeData = lineState.embeddedModeData;\n var stack = lineState.stack;\n var pos = 0;\n // regular expression group matching\n // these never need cloning or equality since they are only used within a line match\n var groupActions = null;\n var groupMatches = null;\n var groupMatched = null;\n var groupRule = null;\n while (pos < lineLength) {\n var pos0 = pos;\n var stackLen0 = stack.depth;\n var groupLen0 = groupActions ? groupActions.length : 0;\n var state = stack.state;\n var matches = null;\n var matched = null;\n var action = null;\n var rule = null;\n var enteringEmbeddedMode = null;\n // check if we need to process group matches first\n if (groupActions) {\n matches = groupMatches;\n matched = groupMatched.shift();\n action = groupActions.shift();\n rule = groupRule;\n // cleanup if necessary\n if (groupActions.length === 0) {\n groupActions = null;\n groupMatches = null;\n groupMatched = null;\n groupRule = null;\n }\n }\n else {\n // otherwise we match on the token stream\n if (pos >= lineLength) {\n // nothing to do\n break;\n }\n // get the rules for this state\n var rules = this._lexer.tokenizer[state];\n if (!rules) {\n rules = monarchCommon.findRules(this._lexer, state); // do parent matching\n if (!rules) {\n monarchCommon.throwError(this._lexer, 'tokenizer state is not defined: ' + state);\n }\n }\n // try each rule until we match\n var restOfLine = line.substr(pos);\n for (var idx in rules) {\n if (hasOwnProperty.call(rules, idx)) {\n var rule_1 = rules[idx];\n if (pos === 0 || !rule_1.matchOnlyAtLineStart) {\n matches = restOfLine.match(rule_1.regex);\n if (matches) {\n matched = matches[0];\n action = rule_1.action;\n break;\n }\n }\n }\n }\n }\n // We matched 'rule' with 'matches' and 'action'\n if (!matches) {\n matches = [''];\n matched = '';\n }\n if (!action) {\n // bad: we didn't match anything, and there is no action to take\n // we need to advance the stream or we get progress trouble\n if (pos < lineLength) {\n matches = [line.charAt(pos)];\n matched = matches[0];\n }\n action = this._lexer.defaultToken;\n }\n // advance stream\n pos += matched.length;\n // maybe call action function (used for 'cases')\n while (monarchCommon.isFuzzyAction(action) && monarchCommon.isIAction(action) && action.test) {\n action = action.test(matched, matches, state, pos === lineLength);\n }\n var result = null;\n // set the result: either a string or an array of actions\n if (typeof action === 'string' || Array.isArray(action)) {\n result = action;\n }\n else if (action.group) {\n result = action.group;\n }\n else if (action.token !== null && action.token !== undefined) {\n // do $n replacements?\n if (action.tokenSubst) {\n result = monarchCommon.substituteMatches(this._lexer, action.token, matched, matches, state);\n }\n else {\n result = action.token;\n }\n // enter embedded mode?\n if (action.nextEmbedded) {\n if (action.nextEmbedded === '@pop') {\n if (!embeddedModeData) {\n monarchCommon.throwError(this._lexer, 'cannot pop embedded mode if not inside one');\n }\n embeddedModeData = null;\n }\n else if (embeddedModeData) {\n monarchCommon.throwError(this._lexer, 'cannot enter embedded mode from within an embedded mode');\n }\n else {\n enteringEmbeddedMode = monarchCommon.substituteMatches(this._lexer, action.nextEmbedded, matched, matches, state);\n }\n }\n // state transformations\n if (action.goBack) { // back up the stream..\n pos = Math.max(0, pos - action.goBack);\n }\n if (action.switchTo && typeof action.switchTo === 'string') {\n var nextState = monarchCommon.substituteMatches(this._lexer, action.switchTo, matched, matches, state); // switch state without a push...\n if (nextState[0] === '@') {\n nextState = nextState.substr(1); // peel off starting '@'\n }\n if (!monarchCommon.findRules(this._lexer, nextState)) {\n monarchCommon.throwError(this._lexer, 'trying to switch to a state \\'' + nextState + '\\' that is undefined in rule: ' + rule.name);\n }\n else {\n stack = stack.switchTo(nextState);\n }\n }\n else if (action.transform && typeof action.transform === 'function') {\n monarchCommon.throwError(this._lexer, 'action.transform not supported');\n }\n else if (action.next) {\n if (action.next === '@push') {\n if (stack.depth >= this._lexer.maxStack) {\n monarchCommon.throwError(this._lexer, 'maximum tokenizer stack size reached: [' +\n stack.state + ',' + stack.parent.state + ',...]');\n }\n else {\n stack = stack.push(state);\n }\n }\n else if (action.next === '@pop') {\n if (stack.depth <= 1) {\n monarchCommon.throwError(this._lexer, 'trying to pop an empty stack in rule: ' + rule.name);\n }\n else {\n stack = stack.pop();\n }\n }\n else if (action.next === '@popall') {\n stack = stack.popall();\n }\n else {\n var nextState = monarchCommon.substituteMatches(this._lexer, action.next, matched, matches, state);\n if (nextState[0] === '@') {\n nextState = nextState.substr(1); // peel off starting '@'\n }\n if (!monarchCommon.findRules(this._lexer, nextState)) {\n monarchCommon.throwError(this._lexer, 'trying to set a next state \\'' + nextState + '\\' that is undefined in rule: ' + rule.name);\n }\n else {\n stack = stack.push(nextState);\n }\n }\n }\n if (action.log && typeof (action.log) === 'string') {\n monarchCommon.log(this._lexer, this._lexer.languageId + ': ' + monarchCommon.substituteMatches(this._lexer, action.log, matched, matches, state));\n }\n }\n // check result\n if (result === null) {\n monarchCommon.throwError(this._lexer, 'lexer rule has no well-defined action in rule: ' + rule.name);\n }\n // is the result a group match?\n if (Array.isArray(result)) {\n if (groupActions && groupActions.length > 0) {\n monarchCommon.throwError(this._lexer, 'groups cannot be nested: ' + rule.name);\n }\n if (matches.length !== result.length + 1) {\n monarchCommon.throwError(this._lexer, 'matched number of groups does not match the number of actions in rule: ' + rule.name);\n }\n var totalLen = 0;\n for (var i = 1; i < matches.length; i++) {\n totalLen += matches[i].length;\n }\n if (totalLen !== matched.length) {\n monarchCommon.throwError(this._lexer, 'with groups, all characters should be matched in consecutive groups in rule: ' + rule.name);\n }\n groupMatches = matches;\n groupMatched = matches.slice(1);\n groupActions = result.slice(0);\n groupRule = rule;\n pos -= matched.length;\n // call recursively to initiate first result match\n continue;\n }\n else {\n // regular result\n // check for '@rematch'\n if (result === '@rematch') {\n pos -= matched.length;\n matched = ''; // better set the next state too..\n matches = null;\n result = '';\n }\n // check progress\n if (matched.length === 0) {\n if (stackLen0 !== stack.depth || state !== stack.state || (!groupActions ? 0 : groupActions.length) !== groupLen0) {\n continue;\n }\n else {\n monarchCommon.throwError(this._lexer, 'no progress in tokenizer in rule: ' + rule.name);\n pos = lineLength; // must make progress or editor loops\n }\n }\n // return the result (and check for brace matching)\n // todo: for efficiency we could pre-sanitize tokenPostfix and substitutions\n var tokenType = null;\n if (monarchCommon.isString(result) && result.indexOf('@brackets') === 0) {\n var rest = result.substr('@brackets'.length);\n var bracket = findBracket(this._lexer, matched);\n if (!bracket) {\n monarchCommon.throwError(this._lexer, '@brackets token returned but no bracket defined as: ' + matched);\n bracket = { token: '', bracketType: 0 /* None */ };\n }\n tokenType = monarchCommon.sanitize(bracket.token + rest);\n }\n else {\n var token = (result === '' ? '' : result + this._lexer.tokenPostfix);\n tokenType = monarchCommon.sanitize(token);\n }\n tokensCollector.emit(pos0 + offsetDelta, tokenType);\n }\n if (enteringEmbeddedMode !== null) {\n // substitute language alias to known modes to support syntax highlighting\n var enteringEmbeddedModeId = this._modeService.getModeIdForLanguageName(enteringEmbeddedMode);\n if (enteringEmbeddedModeId) {\n enteringEmbeddedMode = enteringEmbeddedModeId;\n }\n var embeddedModeData_1 = this._getNestedEmbeddedModeData(enteringEmbeddedMode);\n if (pos < lineLength) {\n // there is content from the embedded mode on this line\n var restOfLine = line.substr(pos);\n return this._nestedTokenize(restOfLine, MonarchLineStateFactory.create(stack, embeddedModeData_1), offsetDelta + pos, tokensCollector);\n }\n else {\n return MonarchLineStateFactory.create(stack, embeddedModeData_1);\n }\n }\n }\n return MonarchLineStateFactory.create(stack, embeddedModeData);\n };\n MonarchTokenizer.prototype._getNestedEmbeddedModeData = function (mimetypeOrModeId) {\n var nestedMode = this._locateMode(mimetypeOrModeId);\n if (nestedMode) {\n var tokenizationSupport = modes.TokenizationRegistry.get(nestedMode.getId());\n if (tokenizationSupport) {\n return new EmbeddedModeData(nestedMode.getId(), tokenizationSupport.getInitialState());\n }\n }\n var nestedModeId = nestedMode ? nestedMode.getId() : NULL_MODE_ID;\n return new EmbeddedModeData(nestedModeId, NULL_STATE);\n };\n MonarchTokenizer.prototype._locateMode = function (mimetypeOrModeId) {\n if (!mimetypeOrModeId || !this._modeService.isRegisteredMode(mimetypeOrModeId)) {\n return null;\n }\n var modeId = this._modeService.getModeId(mimetypeOrModeId);\n // Fire mode loading event\n this._modeService.getOrCreateMode(modeId);\n var mode = this._modeService.getMode(modeId);\n if (mode) {\n // Re-emit tokenizationSupport change events from all modes that I ever embedded\n this._embeddedModes[modeId] = true;\n return mode;\n }\n this._embeddedModes[modeId] = true;\n return null;\n };\n return MonarchTokenizer;\n}());\n/**\n * Searches for a bracket in the 'brackets' attribute that matches the input.\n */\nfunction findBracket(lexer, matched) {\n if (!matched) {\n return null;\n }\n matched = monarchCommon.fixCase(lexer, matched);\n var brackets = lexer.brackets;\n for (var i = 0; i < brackets.length; i++) {\n var bracket = brackets[i];\n if (bracket.open === matched) {\n return { token: bracket.token, bracketType: 1 /* Open */ };\n }\n else if (bracket.close === matched) {\n return { token: bracket.token, bracketType: -1 /* Close */ };\n }\n }\n return null;\n}\nexport function createTokenizationSupport(modeService, standaloneThemeService, modeId, lexer) {\n return new MonarchTokenizer(modeService, standaloneThemeService, modeId, lexer);\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport { TPromise } from '../../../base/common/winjs.base';\nimport { ModesRegistry } from '../../common/modes/modesRegistry';\nimport { StaticServices } from './standaloneServices';\nimport * as modes from '../../common/modes';\nimport { IndentAction } from '../../common/modes/languageConfiguration';\nimport { Position } from '../../common/core/position';\nimport { Range } from '../../common/core/range';\nimport { toThenable } from '../../../base/common/async';\nimport { compile } from '../common/monarch/monarchCompile';\nimport { createTokenizationSupport } from '../common/monarch/monarchLexer';\nimport { LanguageConfigurationRegistry } from '../../common/modes/languageConfigurationRegistry';\nimport { Token, TokenizationResult, TokenizationResult2 } from '../../common/core/token';\n/**\n * Register information about a new language.\n */\nexport function register(language) {\n ModesRegistry.registerLanguage(language);\n}\n/**\n * Get the information of all the registered languages.\n */\nexport function getLanguages() {\n var result = [];\n result = result.concat(ModesRegistry.getLanguages());\n return result;\n}\nexport function getEncodedLanguageId(languageId) {\n var lid = StaticServices.modeService.get().getLanguageIdentifier(languageId);\n return lid && lid.id;\n}\n/**\n * An event emitted when a language is first time needed (e.g. a model has it set).\n * @event\n */\nexport function onLanguage(languageId, callback) {\n var disposable = StaticServices.modeService.get().onDidCreateMode(function (mode) {\n if (mode.getId() === languageId) {\n // stop listening\n disposable.dispose();\n // invoke actual listener\n callback();\n }\n });\n return disposable;\n}\n/**\n * Set the editing configuration for a language.\n */\nexport function setLanguageConfiguration(languageId, configuration) {\n var languageIdentifier = StaticServices.modeService.get().getLanguageIdentifier(languageId);\n if (!languageIdentifier) {\n throw new Error(\"Cannot set configuration for unknown language \" + languageId);\n }\n return LanguageConfigurationRegistry.register(languageIdentifier, configuration);\n}\n/**\n * @internal\n */\nvar EncodedTokenizationSupport2Adapter = /** @class */ (function () {\n function EncodedTokenizationSupport2Adapter(actual) {\n this._actual = actual;\n }\n EncodedTokenizationSupport2Adapter.prototype.getInitialState = function () {\n return this._actual.getInitialState();\n };\n EncodedTokenizationSupport2Adapter.prototype.tokenize = function (line, state, offsetDelta) {\n throw new Error('Not supported!');\n };\n EncodedTokenizationSupport2Adapter.prototype.tokenize2 = function (line, state) {\n var result = this._actual.tokenizeEncoded(line, state);\n return new TokenizationResult2(result.tokens, result.endState);\n };\n return EncodedTokenizationSupport2Adapter;\n}());\nexport { EncodedTokenizationSupport2Adapter };\n/**\n * @internal\n */\nvar TokenizationSupport2Adapter = /** @class */ (function () {\n function TokenizationSupport2Adapter(standaloneThemeService, languageIdentifier, actual) {\n this._standaloneThemeService = standaloneThemeService;\n this._languageIdentifier = languageIdentifier;\n this._actual = actual;\n }\n TokenizationSupport2Adapter.prototype.getInitialState = function () {\n return this._actual.getInitialState();\n };\n TokenizationSupport2Adapter.prototype._toClassicTokens = function (tokens, language, offsetDelta) {\n var result = [];\n var previousStartIndex = 0;\n for (var i = 0, len = tokens.length; i < len; i++) {\n var t = tokens[i];\n var startIndex = t.startIndex;\n // Prevent issues stemming from a buggy external tokenizer.\n if (i === 0) {\n // Force first token to start at first index!\n startIndex = 0;\n }\n else if (startIndex < previousStartIndex) {\n // Force tokens to be after one another!\n startIndex = previousStartIndex;\n }\n result[i] = new Token(startIndex + offsetDelta, t.scopes, language);\n previousStartIndex = startIndex;\n }\n return result;\n };\n TokenizationSupport2Adapter.prototype.tokenize = function (line, state, offsetDelta) {\n var actualResult = this._actual.tokenize(line, state);\n var tokens = this._toClassicTokens(actualResult.tokens, this._languageIdentifier.language, offsetDelta);\n var endState;\n // try to save an object if possible\n if (actualResult.endState.equals(state)) {\n endState = state;\n }\n else {\n endState = actualResult.endState;\n }\n return new TokenizationResult(tokens, endState);\n };\n TokenizationSupport2Adapter.prototype._toBinaryTokens = function (tokens, offsetDelta) {\n var languageId = this._languageIdentifier.id;\n var tokenTheme = this._standaloneThemeService.getTheme().tokenTheme;\n var result = [], resultLen = 0;\n var previousStartIndex = 0;\n for (var i = 0, len = tokens.length; i < len; i++) {\n var t = tokens[i];\n var metadata = tokenTheme.match(languageId, t.scopes);\n if (resultLen > 0 && result[resultLen - 1] === metadata) {\n // same metadata\n continue;\n }\n var startIndex = t.startIndex;\n // Prevent issues stemming from a buggy external tokenizer.\n if (i === 0) {\n // Force first token to start at first index!\n startIndex = 0;\n }\n else if (startIndex < previousStartIndex) {\n // Force tokens to be after one another!\n startIndex = previousStartIndex;\n }\n result[resultLen++] = startIndex + offsetDelta;\n result[resultLen++] = metadata;\n previousStartIndex = startIndex;\n }\n var actualResult = new Uint32Array(resultLen);\n for (var i = 0; i < resultLen; i++) {\n actualResult[i] = result[i];\n }\n return actualResult;\n };\n TokenizationSupport2Adapter.prototype.tokenize2 = function (line, state, offsetDelta) {\n var actualResult = this._actual.tokenize(line, state);\n var tokens = this._toBinaryTokens(actualResult.tokens, offsetDelta);\n var endState;\n // try to save an object if possible\n if (actualResult.endState.equals(state)) {\n endState = state;\n }\n else {\n endState = actualResult.endState;\n }\n return new TokenizationResult2(tokens, endState);\n };\n return TokenizationSupport2Adapter;\n}());\nexport { TokenizationSupport2Adapter };\nfunction isEncodedTokensProvider(provider) {\n return provider['tokenizeEncoded'];\n}\n/**\n * Set the tokens provider for a language (manual implementation).\n */\nexport function setTokensProvider(languageId, provider) {\n var languageIdentifier = StaticServices.modeService.get().getLanguageIdentifier(languageId);\n if (!languageIdentifier) {\n throw new Error(\"Cannot set tokens provider for unknown language \" + languageId);\n }\n var adapter;\n if (isEncodedTokensProvider(provider)) {\n adapter = new EncodedTokenizationSupport2Adapter(provider);\n }\n else {\n adapter = new TokenizationSupport2Adapter(StaticServices.standaloneThemeService.get(), languageIdentifier, provider);\n }\n return modes.TokenizationRegistry.register(languageId, adapter);\n}\n/**\n * Set the tokens provider for a language (monarch implementation).\n */\nexport function setMonarchTokensProvider(languageId, languageDef) {\n var lexer = compile(languageId, languageDef);\n var adapter = createTokenizationSupport(StaticServices.modeService.get(), StaticServices.standaloneThemeService.get(), languageId, lexer);\n return modes.TokenizationRegistry.register(languageId, adapter);\n}\n/**\n * Register a reference provider (used by e.g. reference search).\n */\nexport function registerReferenceProvider(languageId, provider) {\n return modes.ReferenceProviderRegistry.register(languageId, provider);\n}\n/**\n * Register a rename provider (used by e.g. rename symbol).\n */\nexport function registerRenameProvider(languageId, provider) {\n return modes.RenameProviderRegistry.register(languageId, provider);\n}\n/**\n * Register a signature help provider (used by e.g. paremeter hints).\n */\nexport function registerSignatureHelpProvider(languageId, provider) {\n return modes.SignatureHelpProviderRegistry.register(languageId, provider);\n}\n/**\n * Register a hover provider (used by e.g. editor hover).\n */\nexport function registerHoverProvider(languageId, provider) {\n return modes.HoverProviderRegistry.register(languageId, {\n provideHover: function (model, position, token) {\n var word = model.getWordAtPosition(position);\n return toThenable(provider.provideHover(model, position, token)).then(function (value) {\n if (!value) {\n return undefined;\n }\n if (!value.range && word) {\n value.range = new Range(position.lineNumber, word.startColumn, position.lineNumber, word.endColumn);\n }\n if (!value.range) {\n value.range = new Range(position.lineNumber, position.column, position.lineNumber, position.column);\n }\n return value;\n });\n }\n });\n}\n/**\n * Register a document symbol provider (used by e.g. outline).\n */\nexport function registerDocumentSymbolProvider(languageId, provider) {\n return modes.DocumentSymbolProviderRegistry.register(languageId, provider);\n}\n/**\n * Register a document highlight provider (used by e.g. highlight occurrences).\n */\nexport function registerDocumentHighlightProvider(languageId, provider) {\n return modes.DocumentHighlightProviderRegistry.register(languageId, provider);\n}\n/**\n * Register a definition provider (used by e.g. go to definition).\n */\nexport function registerDefinitionProvider(languageId, provider) {\n return modes.DefinitionProviderRegistry.register(languageId, provider);\n}\n/**\n * Register a implementation provider (used by e.g. go to implementation).\n */\nexport function registerImplementationProvider(languageId, provider) {\n return modes.ImplementationProviderRegistry.register(languageId, provider);\n}\n/**\n * Register a type definition provider (used by e.g. go to type definition).\n */\nexport function registerTypeDefinitionProvider(languageId, provider) {\n return modes.TypeDefinitionProviderRegistry.register(languageId, provider);\n}\n/**\n * Register a code lens provider (used by e.g. inline code lenses).\n */\nexport function registerCodeLensProvider(languageId, provider) {\n return modes.CodeLensProviderRegistry.register(languageId, provider);\n}\n/**\n * Register a code action provider (used by e.g. quick fix).\n */\nexport function registerCodeActionProvider(languageId, provider) {\n return modes.CodeActionProviderRegistry.register(languageId, {\n provideCodeActions: function (model, range, context, token) {\n var markers = StaticServices.markerService.get().read({ resource: model.uri }).filter(function (m) {\n return Range.areIntersectingOrTouching(m, range);\n });\n return provider.provideCodeActions(model, range, { markers: markers, only: context.only }, token);\n }\n });\n}\n/**\n * Register a formatter that can handle only entire models.\n */\nexport function registerDocumentFormattingEditProvider(languageId, provider) {\n return modes.DocumentFormattingEditProviderRegistry.register(languageId, provider);\n}\n/**\n * Register a formatter that can handle a range inside a model.\n */\nexport function registerDocumentRangeFormattingEditProvider(languageId, provider) {\n return modes.DocumentRangeFormattingEditProviderRegistry.register(languageId, provider);\n}\n/**\n * Register a formatter than can do formatting as the user types.\n */\nexport function registerOnTypeFormattingEditProvider(languageId, provider) {\n return modes.OnTypeFormattingEditProviderRegistry.register(languageId, provider);\n}\n/**\n * Register a link provider that can find links in text.\n */\nexport function registerLinkProvider(languageId, provider) {\n return modes.LinkProviderRegistry.register(languageId, provider);\n}\n/**\n * Register a completion item provider (use by e.g. suggestions).\n */\nexport function registerCompletionItemProvider(languageId, provider) {\n var adapter = new SuggestAdapter(provider);\n return modes.SuggestRegistry.register(languageId, {\n triggerCharacters: provider.triggerCharacters,\n provideCompletionItems: function (model, position, context, token) {\n return adapter.provideCompletionItems(model, position, context, token);\n },\n resolveCompletionItem: function (model, position, suggestion, token) {\n return adapter.resolveCompletionItem(model, position, suggestion, token);\n }\n });\n}\n/**\n * Register a document color provider (used by Color Picker, Color Decorator).\n */\nexport function registerColorProvider(languageId, provider) {\n return modes.ColorProviderRegistry.register(languageId, provider);\n}\n/**\n * Register a folding range provider\n */\nexport function registerFoldingRangeProvider(languageId, provider) {\n return modes.FoldingRangeProviderRegistry.register(languageId, provider);\n}\n/**\n * Completion item kinds.\n */\nexport var CompletionItemKind;\n(function (CompletionItemKind) {\n CompletionItemKind[CompletionItemKind[\"Text\"] = 0] = \"Text\";\n CompletionItemKind[CompletionItemKind[\"Method\"] = 1] = \"Method\";\n CompletionItemKind[CompletionItemKind[\"Function\"] = 2] = \"Function\";\n CompletionItemKind[CompletionItemKind[\"Constructor\"] = 3] = \"Constructor\";\n CompletionItemKind[CompletionItemKind[\"Field\"] = 4] = \"Field\";\n CompletionItemKind[CompletionItemKind[\"Variable\"] = 5] = \"Variable\";\n CompletionItemKind[CompletionItemKind[\"Class\"] = 6] = \"Class\";\n CompletionItemKind[CompletionItemKind[\"Interface\"] = 7] = \"Interface\";\n CompletionItemKind[CompletionItemKind[\"Module\"] = 8] = \"Module\";\n CompletionItemKind[CompletionItemKind[\"Property\"] = 9] = \"Property\";\n CompletionItemKind[CompletionItemKind[\"Unit\"] = 10] = \"Unit\";\n CompletionItemKind[CompletionItemKind[\"Value\"] = 11] = \"Value\";\n CompletionItemKind[CompletionItemKind[\"Enum\"] = 12] = \"Enum\";\n CompletionItemKind[CompletionItemKind[\"Keyword\"] = 13] = \"Keyword\";\n CompletionItemKind[CompletionItemKind[\"Snippet\"] = 14] = \"Snippet\";\n CompletionItemKind[CompletionItemKind[\"Color\"] = 15] = \"Color\";\n CompletionItemKind[CompletionItemKind[\"File\"] = 16] = \"File\";\n CompletionItemKind[CompletionItemKind[\"Reference\"] = 17] = \"Reference\";\n CompletionItemKind[CompletionItemKind[\"Folder\"] = 18] = \"Folder\";\n})(CompletionItemKind || (CompletionItemKind = {}));\nfunction convertKind(kind) {\n switch (kind) {\n case CompletionItemKind.Method: return 'method';\n case CompletionItemKind.Function: return 'function';\n case CompletionItemKind.Constructor: return 'constructor';\n case CompletionItemKind.Field: return 'field';\n case CompletionItemKind.Variable: return 'variable';\n case CompletionItemKind.Class: return 'class';\n case CompletionItemKind.Interface: return 'interface';\n case CompletionItemKind.Module: return 'module';\n case CompletionItemKind.Property: return 'property';\n case CompletionItemKind.Unit: return 'unit';\n case CompletionItemKind.Value: return 'value';\n case CompletionItemKind.Enum: return 'enum';\n case CompletionItemKind.Keyword: return 'keyword';\n case CompletionItemKind.Snippet: return 'snippet';\n case CompletionItemKind.Text: return 'text';\n case CompletionItemKind.Color: return 'color';\n case CompletionItemKind.File: return 'file';\n case CompletionItemKind.Reference: return 'reference';\n case CompletionItemKind.Folder: return 'folder';\n }\n return 'property';\n}\nvar SuggestAdapter = /** @class */ (function () {\n function SuggestAdapter(provider) {\n this._provider = provider;\n }\n SuggestAdapter.from = function (item, position, wordStartPos) {\n var suggestion = {\n _actual: item,\n label: item.label,\n insertText: item.label,\n type: convertKind(item.kind),\n detail: item.detail,\n documentation: item.documentation,\n command: item.command,\n sortText: item.sortText,\n filterText: item.filterText,\n snippetType: 'internal',\n additionalTextEdits: item.additionalTextEdits,\n commitCharacters: item.commitCharacters\n };\n var editRange = item.textEdit ? item.textEdit.range : item.range;\n if (editRange) {\n var isSingleLine = (editRange.startLineNumber === editRange.endLineNumber);\n // invalid text edit\n if (!isSingleLine || editRange.startLineNumber !== position.lineNumber) {\n console.warn('INVALID range, must be single line and on the same line');\n return null;\n }\n // insert the text of the edit and create a dedicated\n // suggestion-container with overwrite[Before|After]\n suggestion.overwriteBefore = position.column - editRange.startColumn;\n suggestion.overwriteAfter = editRange.endColumn - position.column;\n }\n else {\n suggestion.overwriteBefore = position.column - wordStartPos.column;\n suggestion.overwriteAfter = 0;\n }\n if (item.textEdit) {\n suggestion.insertText = item.textEdit.text;\n }\n else if (typeof item.insertText === 'object' && typeof item.insertText.value === 'string') {\n suggestion.insertText = item.insertText.value;\n suggestion.snippetType = 'textmate';\n }\n else if (typeof item.insertText === 'string') {\n suggestion.insertText = item.insertText;\n }\n return suggestion;\n };\n SuggestAdapter.prototype.provideCompletionItems = function (model, position, context, token) {\n var result = this._provider.provideCompletionItems(model, position, token, context);\n return toThenable(result).then(function (value) {\n var result = {\n suggestions: []\n };\n // default text edit start\n var wordStartPos = position;\n var word = model.getWordUntilPosition(position);\n if (word) {\n wordStartPos = new Position(wordStartPos.lineNumber, word.startColumn);\n }\n var list;\n if (Array.isArray(value)) {\n list = {\n items: value,\n isIncomplete: false\n };\n }\n else if (typeof value === 'object' && Array.isArray(value.items)) {\n list = value;\n result.incomplete = list.isIncomplete;\n }\n else if (!value) {\n // undefined and null are valid results\n return undefined;\n }\n else {\n // warn about everything else\n console.warn('INVALID result from completion provider. expected CompletionItem-array or CompletionList but got:', value);\n }\n for (var i = 0; i < list.items.length; i++) {\n var item = list.items[i];\n var suggestion = SuggestAdapter.from(item, position, wordStartPos);\n if (suggestion) {\n result.suggestions.push(suggestion);\n }\n }\n return result;\n });\n };\n SuggestAdapter.prototype.resolveCompletionItem = function (model, position, suggestion, token) {\n if (typeof this._provider.resolveCompletionItem !== 'function') {\n return TPromise.as(suggestion);\n }\n var item = suggestion._actual;\n if (!item) {\n return TPromise.as(suggestion);\n }\n return toThenable(this._provider.resolveCompletionItem(item, token)).then(function (resolvedItem) {\n var wordStartPos = position;\n var word = model.getWordUntilPosition(position);\n if (word) {\n wordStartPos = new Position(wordStartPos.lineNumber, word.startColumn);\n }\n return SuggestAdapter.from(resolvedItem, position, wordStartPos);\n });\n };\n return SuggestAdapter;\n}());\n/**\n * @internal\n */\nexport function createMonacoLanguagesAPI() {\n return {\n register: register,\n getLanguages: getLanguages,\n onLanguage: onLanguage,\n getEncodedLanguageId: getEncodedLanguageId,\n // provider methods\n setLanguageConfiguration: setLanguageConfiguration,\n setTokensProvider: setTokensProvider,\n setMonarchTokensProvider: setMonarchTokensProvider,\n registerReferenceProvider: registerReferenceProvider,\n registerRenameProvider: registerRenameProvider,\n registerCompletionItemProvider: registerCompletionItemProvider,\n registerSignatureHelpProvider: registerSignatureHelpProvider,\n registerHoverProvider: registerHoverProvider,\n registerDocumentSymbolProvider: registerDocumentSymbolProvider,\n registerDocumentHighlightProvider: registerDocumentHighlightProvider,\n registerDefinitionProvider: registerDefinitionProvider,\n registerImplementationProvider: registerImplementationProvider,\n registerTypeDefinitionProvider: registerTypeDefinitionProvider,\n registerCodeLensProvider: registerCodeLensProvider,\n registerCodeActionProvider: registerCodeActionProvider,\n registerDocumentFormattingEditProvider: registerDocumentFormattingEditProvider,\n registerDocumentRangeFormattingEditProvider: registerDocumentRangeFormattingEditProvider,\n registerOnTypeFormattingEditProvider: registerOnTypeFormattingEditProvider,\n registerLinkProvider: registerLinkProvider,\n registerColorProvider: registerColorProvider,\n registerFoldingRangeProvider: registerFoldingRangeProvider,\n // enums\n DocumentHighlightKind: modes.DocumentHighlightKind,\n CompletionItemKind: CompletionItemKind,\n SymbolKind: modes.SymbolKind,\n IndentAction: IndentAction,\n SuggestTriggerKind: modes.SuggestTriggerKind,\n FoldingRangeKind: modes.FoldingRangeKind\n };\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { Promise as WinJSPromise } from './winjs.base';\nimport * as platform from './platform';\n/**\n * A polyfill for the native promises. The implementation is based on\n * WinJS promises but tries to gap differences between winjs promises\n * and native promises.\n */\nvar PolyfillPromise = /** @class */ (function () {\n function PolyfillPromise(initOrPromise) {\n if (WinJSPromise.is(initOrPromise)) {\n this._winjsPromise = initOrPromise;\n }\n else {\n this._winjsPromise = new WinJSPromise(function (resolve, reject) {\n var initializing = true;\n initOrPromise(function (value) {\n if (!initializing) {\n resolve(value);\n }\n else {\n platform.setImmediate(function () { return resolve(value); });\n }\n }, function (err) {\n if (!initializing) {\n reject(err);\n }\n else {\n platform.setImmediate(function () { return reject(err); });\n }\n });\n initializing = false;\n });\n }\n }\n PolyfillPromise.all = function (thenables) {\n return new PolyfillPromise(WinJSPromise.join(thenables).then(null, function (values) {\n // WinJSPromise returns a sparse array whereas\n // native promises return the *first* error\n for (var key in values) {\n if (values.hasOwnProperty(key)) {\n return values[key];\n }\n }\n }));\n };\n PolyfillPromise.race = function (thenables) {\n // WinJSPromise returns `{ key: , value: }`\n // from the `any` call and Promise.race just wants the value\n return new PolyfillPromise(WinJSPromise.any(thenables).then(function (entry) { return entry.value; }, function (err) { return err.value; }));\n };\n PolyfillPromise.resolve = function (value) {\n return new PolyfillPromise(WinJSPromise.wrap(value));\n };\n PolyfillPromise.reject = function (value) {\n return new PolyfillPromise(WinJSPromise.wrapError(value));\n };\n PolyfillPromise.prototype.then = function (onFulfilled, onRejected) {\n var sync = true;\n var promise = new PolyfillPromise(this._winjsPromise.then(onFulfilled && function (value) {\n if (!sync) {\n onFulfilled(value);\n }\n else {\n platform.setImmediate(function () { return onFulfilled(value); });\n }\n }, onRejected && function (err) {\n if (!sync) {\n onRejected(err);\n }\n else {\n platform.setImmediate(function () { return onRejected(err); });\n }\n }));\n sync = false;\n return promise;\n };\n PolyfillPromise.prototype.catch = function (onRejected) {\n return this.then(null, onRejected);\n };\n return PolyfillPromise;\n}());\nexport { PolyfillPromise };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport { createMonacoBaseAPI } from './common/standalone/standaloneBase';\nimport { createMonacoEditorAPI } from './standalone/browser/standaloneEditor';\nimport { createMonacoLanguagesAPI } from './standalone/browser/standaloneLanguages';\nimport { EDITOR_DEFAULTS, WrappingIndent } from './common/config/editorOptions';\nimport { PolyfillPromise } from '../base/common/winjs.polyfill.promise';\nvar global = self;\n// When missing, polyfill the native promise\n// with our winjs-based polyfill\nif (typeof global.Promise === 'undefined') {\n global.Promise = PolyfillPromise;\n}\n// Set defaults for standalone editor\nEDITOR_DEFAULTS.wrappingIndent = WrappingIndent.None;\nEDITOR_DEFAULTS.viewInfo.glyphMargin = false;\nEDITOR_DEFAULTS.autoIndent = false;\nvar api = createMonacoBaseAPI();\napi.editor = createMonacoEditorAPI();\napi.languages = createMonacoLanguagesAPI();\nexport var CancellationTokenSource = api.CancellationTokenSource;\nexport var Emitter = api.Emitter;\nexport var KeyCode = api.KeyCode;\nexport var KeyMod = api.KeyMod;\nexport var Position = api.Position;\nexport var Range = api.Range;\nexport var Selection = api.Selection;\nexport var SelectionDirection = api.SelectionDirection;\nexport var MarkerSeverity = api.MarkerSeverity;\nexport var MarkerTag = api.MarkerTag;\nexport var Promise = api.Promise;\nexport var Uri = api.Uri;\nexport var Token = api.Token;\nexport var editor = api.editor;\nexport var languages = api.languages;\nglobal.monaco = api;\nif (typeof global.require !== 'undefined' && typeof global.require.config === 'function') {\n global.require.config({\n ignoreDuplicateModules: [\n 'vscode-languageserver-types',\n 'vscode-languageserver-types/main',\n 'vscode-nls',\n 'vscode-nls/vscode-nls',\n 'jsonc-parser',\n 'jsonc-parser/main',\n 'vscode-uri',\n 'vscode-uri/index'\n ]\n });\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nfunction _format(message, args) {\n var result;\n if (args.length === 0) {\n result = message;\n }\n else {\n result = message.replace(/\\{(\\d+)\\}/g, function (match, rest) {\n var index = rest[0];\n return typeof args[index] !== 'undefined' ? args[index] : match;\n });\n }\n return result;\n}\nexport function localize(data, message) {\n var args = [];\n for (var _i = 2; _i < arguments.length; _i++) {\n args[_i - 2] = arguments[_i];\n }\n return _format(message, args);\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\n// ------ internal util\nexport var _util;\n(function (_util) {\n _util.serviceIds = new Map();\n _util.DI_TARGET = '$di$target';\n _util.DI_DEPENDENCIES = '$di$dependencies';\n function getServiceDependencies(ctor) {\n return ctor[_util.DI_DEPENDENCIES] || [];\n }\n _util.getServiceDependencies = getServiceDependencies;\n})(_util || (_util = {}));\nexport var IInstantiationService = createDecorator('instantiationService');\nfunction storeServiceDependency(id, target, index, optional) {\n if (target[_util.DI_TARGET] === target) {\n target[_util.DI_DEPENDENCIES].push({ id: id, index: index, optional: optional });\n }\n else {\n target[_util.DI_DEPENDENCIES] = [{ id: id, index: index, optional: optional }];\n target[_util.DI_TARGET] = target;\n }\n}\n/**\n * A *only* valid way to create a {{ServiceIdentifier}}.\n */\nexport function createDecorator(serviceId) {\n if (_util.serviceIds.has(serviceId)) {\n return _util.serviceIds.get(serviceId);\n }\n var id = function (target, key, index) {\n if (arguments.length !== 3) {\n throw new Error('@IServiceName-decorator can only be used to decorate a parameter');\n }\n storeServiceDependency(id, target, index, false);\n };\n id.toString = function () { return serviceId; };\n _util.serviceIds.set(serviceId, id);\n return id;\n}\n/**\n * Mark a service dependency as optional.\n */\nexport function optional(serviceIdentifier) {\n return function (target, key, index) {\n if (arguments.length !== 3) {\n throw new Error('@optional-decorator can only be used to decorate a parameter');\n }\n storeServiceDependency(serviceIdentifier, target, index, true);\n };\n}\n","/* --------------------------------------------------------------------------------------------\n * Copyright (c) 2018 TypeFox GmbH (http://www.typefox.io). All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n * ------------------------------------------------------------------------------------------ */\n'use strict';\n\nimport {\n Message, MessageType as RPCMessageType,\n RequestType, RequestType0, RequestHandler, RequestHandler0, GenericRequestHandler,\n NotificationType, NotificationType0,\n NotificationHandler, NotificationHandler0, GenericNotificationHandler,\n Trace, Tracer, CancellationToken, MessageConnection\n} from 'vscode-jsonrpc';\n\nimport {\n InitializeRequest, InitializeParams, InitializeResult,\n ShutdownRequest, ExitNotification,\n LogMessageNotification, LogMessageParams,\n ShowMessageNotification, ShowMessageParams,\n TelemetryEventNotification,\n DidChangeConfigurationNotification, DidChangeConfigurationParams,\n DidOpenTextDocumentNotification, DidOpenTextDocumentParams,\n DidChangeTextDocumentNotification, DidChangeTextDocumentParams,\n DidCloseTextDocumentNotification, DidCloseTextDocumentParams,\n DidSaveTextDocumentNotification, DidSaveTextDocumentParams,\n DidChangeWatchedFilesNotification, DidChangeWatchedFilesParams,\n PublishDiagnosticsNotification, PublishDiagnosticsParams,\n} from 'vscode-languageserver-protocol/lib/main';\n\nimport * as Is from 'vscode-languageserver-protocol/lib/utils/is';\n\nimport { OutputChannel } from \"./services\";\n\nexport interface IConnection {\n\n listen(): void;\n\n sendRequest(type: RequestType0, token?: CancellationToken): Thenable;\n sendRequest(type: RequestType, params: P, token?: CancellationToken): Thenable;\n sendRequest(method: string, token?: CancellationToken): Thenable;\n sendRequest(method: string, param: any, token?: CancellationToken): Thenable;\n sendRequest(type: string | RPCMessageType, ...params: any[]): Thenable;\n\n onRequest(type: RequestType0, handler: RequestHandler0): void;\n onRequest(type: RequestType, handler: RequestHandler): void;\n onRequest(method: string, handler: GenericRequestHandler): void;\n onRequest(method: string | RPCMessageType, handler: GenericRequestHandler): void;\n\n sendNotification(type: NotificationType0): void;\n sendNotification(type: NotificationType, params?: P): void;\n sendNotification(method: string): void;\n sendNotification(method: string, params: any): void;\n sendNotification(method: string | RPCMessageType, params?: any): void;\n\n onNotification(type: NotificationType0, handler: NotificationHandler0): void;\n onNotification(type: NotificationType, handler: NotificationHandler

    ): void;\n onNotification(method: string, handler: GenericNotificationHandler): void;\n onNotification(method: string | RPCMessageType, handler: GenericNotificationHandler): void;\n\n trace(value: Trace, tracer: Tracer, sendNotification?: boolean): void;\n\n initialize(params: InitializeParams): Thenable;\n shutdown(): Thenable;\n exit(): void;\n\n onLogMessage(handle: NotificationHandler): void;\n onShowMessage(handler: NotificationHandler): void;\n onTelemetry(handler: NotificationHandler): void;\n\n didChangeConfiguration(params: DidChangeConfigurationParams): void;\n didChangeWatchedFiles(params: DidChangeWatchedFilesParams): void;\n\n didOpenTextDocument(params: DidOpenTextDocumentParams): void;\n didChangeTextDocument(params: DidChangeTextDocumentParams): void;\n didCloseTextDocument(params: DidCloseTextDocumentParams): void;\n didSaveTextDocument(params: DidSaveTextDocumentParams): void;\n onDiagnostics(handler: NotificationHandler): void;\n\n dispose(): void;\n}\n\nexport interface ConnectionErrorHandler {\n (error: Error, message: Message | undefined, count: number | undefined): void;\n}\nexport interface ConnectionCloseHandler {\n (): void;\n}\nexport interface IConnectionProvider {\n get(errorHandler: ConnectionErrorHandler, closeHandler: ConnectionCloseHandler, outputChannel: OutputChannel | undefined): Thenable;\n}\nexport function createConnection(connection: MessageConnection, errorHandler: ConnectionErrorHandler, closeHandler: ConnectionCloseHandler): IConnection {\n connection.onError((data) => { errorHandler(data[0], data[1], data[2]) });\n connection.onClose(closeHandler);\n return {\n\n listen: (): void => connection.listen(),\n\n sendRequest: (type: string | RPCMessageType, ...params: any[]): Thenable => connection.sendRequest(Is.string(type) ? type : type.method, ...params),\n onRequest: (type: string | RPCMessageType, handler: GenericRequestHandler): void => connection.onRequest(Is.string(type) ? type : type.method, handler),\n\n sendNotification: (type: string | RPCMessageType, params?: any): void => connection.sendNotification(Is.string(type) ? type : type.method, params),\n onNotification: (type: string | RPCMessageType, handler: GenericNotificationHandler): void => connection.onNotification(Is.string(type) ? type : type.method, handler),\n\n trace: (value: Trace, tracer: Tracer, sendNotification: boolean = false): void => connection.trace(value, tracer, sendNotification),\n\n initialize: (params: InitializeParams) => connection.sendRequest(InitializeRequest.type, params),\n shutdown: () => connection.sendRequest(ShutdownRequest.type, undefined),\n exit: () => connection.sendNotification(ExitNotification.type),\n\n onLogMessage: (handler: NotificationHandler) => connection.onNotification(LogMessageNotification.type, handler),\n onShowMessage: (handler: NotificationHandler) => connection.onNotification(ShowMessageNotification.type, handler),\n onTelemetry: (handler: NotificationHandler) => connection.onNotification(TelemetryEventNotification.type, handler),\n\n didChangeConfiguration: (params: DidChangeConfigurationParams) => connection.sendNotification(DidChangeConfigurationNotification.type, params),\n didChangeWatchedFiles: (params: DidChangeWatchedFilesParams) => connection.sendNotification(DidChangeWatchedFilesNotification.type, params),\n\n didOpenTextDocument: (params: DidOpenTextDocumentParams) => connection.sendNotification(DidOpenTextDocumentNotification.type, params),\n didChangeTextDocument: (params: DidChangeTextDocumentParams) => connection.sendNotification(DidChangeTextDocumentNotification.type, params),\n didCloseTextDocument: (params: DidCloseTextDocumentParams) => connection.sendNotification(DidCloseTextDocumentNotification.type, params),\n didSaveTextDocument: (params: DidSaveTextDocumentParams) => connection.sendNotification(DidSaveTextDocumentNotification.type, params),\n\n onDiagnostics: (handler: NotificationHandler) => connection.onNotification(PublishDiagnosticsNotification.type, handler),\n\n dispose: () => connection.dispose()\n };\n}","/* --------------------------------------------------------------------------------------------\n * Copyright (c) 2018 TypeFox GmbH (http://www.typefox.io). All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n * ------------------------------------------------------------------------------------------ */\nimport { MessageActionItem, MessageType, Window, OutputChannel } from './services';\n\nexport class ConsoleWindow implements Window {\n protected readonly channels = new Map();\n showMessage(type: MessageType, message: string, ...actions: T[]): Thenable {\n if (type === MessageType.Error) {\n console.error(message);\n }\n if (type === MessageType.Warning) {\n console.warn(message);\n }\n if (type === MessageType.Info) {\n console.info(message);\n }\n if (type === MessageType.Log) {\n console.log(message);\n }\n return Promise.resolve(undefined);\n }\n createOutputChannel(name: string): OutputChannel {\n const existing = this.channels.get(name);\n if (existing) {\n return existing;\n }\n const channel: OutputChannel = {\n append(value: string): void {\n console.log(name + ': ' + value);\n },\n appendLine(line: string): void {\n console.log(name + ': ' + line);\n },\n show(): void {\n // no-op\n },\n dispose(): void {\n // no-op\n }\n }\n this.channels.set(name, channel)\n return channel;\n }\n}","/* --------------------------------------------------------------------------------------------\n * Copyright (c) 2018 TypeFox GmbH (http://www.typefox.io). All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n * ------------------------------------------------------------------------------------------ */\nimport { Disposable } from './services';\n\nexport {\n Disposable\n}\n\nexport class DisposableCollection implements Disposable {\n protected readonly disposables: Disposable[] = [];\n\n dispose(): void {\n while (this.disposables.length !== 0) {\n this.disposables.pop()!.dispose();\n }\n }\n\n push(disposable: Disposable): Disposable {\n const disposables = this.disposables;\n disposables.push(disposable);\n return {\n dispose(): void {\n const index = disposables.indexOf(disposable);\n if (index !== -1) {\n disposables.splice(index, 1);\n }\n }\n }\n }\n\n}","/* --------------------------------------------------------------------------------------------\n * Copyright (c) 2018 TypeFox GmbH (http://www.typefox.io). All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n * ------------------------------------------------------------------------------------------ */\nexport * from './disposable';\nexport * from './services';\nexport * from './connection';\nexport * from './monaco-language-client';\nexport * from './monaco-commands';\nexport * from './console-window';\nexport * from './monaco-languages';\nexport * from './monaco-workspace';\nexport * from './monaco-services';\nexport * from './monaco-converter';\n","/* --------------------------------------------------------------------------------------------\n * Copyright (c) 2018 TypeFox GmbH (http://www.typefox.io). All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n * ------------------------------------------------------------------------------------------ */\nimport { Commands, Disposable } from './services';\n\nexport class MonacoCommands implements Commands {\n\n public constructor(protected readonly editor: monaco.editor.IStandaloneCodeEditor) { }\n\n public registerCommand(command: string, callback: (...args: any[]) => any, thisArg?: any): Disposable {\n return this.editor._commandService.addCommand({\n id: command,\n handler: (_accessor: any, ...args: any[]) => callback(...args)\n });\n }\n}\n","/* --------------------------------------------------------------------------------------------\n * Copyright (c) 2018 TypeFox GmbH (http://www.typefox.io). All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n * ------------------------------------------------------------------------------------------ */\nimport * as Is from 'vscode-languageserver-protocol/lib/utils/is';\nimport {\n CodeActionParams, CodeLensParams,\n DocumentFormattingParams, DocumentOnTypeFormattingParams,\n DocumentRangeFormattingParams, ReferenceParams,\n RenameParams, TextDocumentPositionParams,\n Position, TextDocumentIdentifier, CompletionItem, CompletionList,\n CompletionParams, CompletionContext, CompletionTriggerKind,\n InsertTextFormat, Range, Diagnostic, CompletionItemKind,\n Hover, SignatureHelp, SignatureInformation, ParameterInformation,\n Definition, Location, DocumentHighlight, DocumentHighlightKind,\n SymbolInformation, DocumentSymbolParams, CodeActionContext, DiagnosticSeverity,\n Command, CodeLens, FormattingOptions, TextEdit, WorkspaceEdit, DocumentLinkParams, DocumentLink,\n MarkedString, MarkupContent, ColorInformation, ColorPresentation, FoldingRange, FoldingRangeKind,\n DiagnosticRelatedInformation, MarkupKind, SymbolKind, DocumentSymbol, CodeAction\n} from './services';\nimport IReadOnlyModel = monaco.editor.IReadOnlyModel;\n\nexport type RecursivePartial = {\n [P in keyof T]?: RecursivePartial;\n};\n\nexport interface ProtocolDocumentLink extends monaco.languages.ILink {\n data?: any;\n}\nexport namespace ProtocolDocumentLink {\n export function is(item: any): item is ProtocolDocumentLink {\n return !!item && 'data' in item;\n }\n}\n\nexport interface ProtocolCodeLens extends monaco.languages.ICodeLensSymbol {\n data?: any;\n}\nexport namespace ProtocolCodeLens {\n export function is(item: any): item is ProtocolCodeLens {\n return !!item && 'data' in item;\n }\n}\n\nexport interface ProtocolCompletionItem extends monaco.languages.CompletionItem {\n data?: any;\n fromEdit?: boolean;\n documentationFormat?: string;\n originalItemKind?: CompletionItemKind;\n deprecated?: boolean;\n}\nexport namespace ProtocolCompletionItem {\n export function is(item: any): item is ProtocolCompletionItem {\n return !!item && 'data' in item;\n }\n}\n\nexport class MonacoToProtocolConverter {\n asPosition(lineNumber: undefined | null, column: undefined | null): {};\n asPosition(lineNumber: number, column: undefined | null): Pick;\n asPosition(lineNumber: undefined | null, column: number): Pick;\n asPosition(lineNumber: number, column: number): Position;\n asPosition(lineNumber: number | undefined | null, column: number | undefined | null): Partial;\n asPosition(lineNumber: number | undefined | null, column: number | undefined | null): Partial {\n const line = lineNumber === undefined || lineNumber === null ? undefined : lineNumber - 1;\n const character = column === undefined || column === null ? undefined : column - 1;\n return {\n line, character\n };\n }\n\n asRange(range: null): null;\n asRange(range: undefined): undefined;\n asRange(range: monaco.IRange): Range;\n asRange(range: monaco.IRange | undefined): Range | undefined;\n asRange(range: monaco.IRange | null): Range | null;\n asRange(range: Partial): RecursivePartial;\n asRange(range: Partial | undefined): RecursivePartial | undefined;\n asRange(range: Partial | null): RecursivePartial | null;\n asRange(range: Partial | undefined | null): RecursivePartial | undefined | null {\n if (range === undefined) {\n return undefined;\n }\n if (range === null) {\n return null;\n }\n const start = this.asPosition(range.startLineNumber, range.startColumn);\n const end = this.asPosition(range.endLineNumber, range.endColumn);\n return {\n start, end\n };\n }\n\n asTextDocumentIdentifier(model: IReadOnlyModel): TextDocumentIdentifier {\n return {\n uri: model.uri.toString()\n }\n }\n\n asTextDocumentPositionParams(model: IReadOnlyModel, position: monaco.Position): TextDocumentPositionParams {\n return {\n textDocument: this.asTextDocumentIdentifier(model),\n position: this.asPosition(position.lineNumber, position.column)\n };\n }\n\n asCompletionParams(model: IReadOnlyModel, position: monaco.Position, context: monaco.languages.CompletionContext): CompletionParams {\n return Object.assign(this.asTextDocumentPositionParams(model, position), {\n context: this.asCompletionContext(context)\n });\n }\n\n asCompletionContext(context: monaco.languages.CompletionContext): CompletionContext {\n return {\n triggerKind: this.asTriggerKind(context.triggerKind),\n triggerCharacter: context.triggerCharacter\n }\n }\n\n asTriggerKind(triggerKind: monaco.languages.SuggestTriggerKind): CompletionTriggerKind {\n switch (triggerKind) {\n case monaco.languages.SuggestTriggerKind.TriggerCharacter:\n return CompletionTriggerKind.TriggerCharacter;\n case monaco.languages.SuggestTriggerKind.TriggerForIncompleteCompletions:\n return CompletionTriggerKind.TriggerForIncompleteCompletions;\n default:\n return CompletionTriggerKind.Invoked;\n }\n }\n\n asCompletionItem(item: monaco.languages.CompletionItem): CompletionItem {\n const result: CompletionItem = { label: item.label };\n const protocolItem = ProtocolCompletionItem.is(item) ? item : undefined;\n if (item.detail) { result.detail = item.detail; }\n // We only send items back we created. So this can't be something else than\n // a string right now.\n if (item.documentation) {\n if (!protocolItem || !protocolItem.documentationFormat) {\n result.documentation = item.documentation as string;\n } else {\n result.documentation = this.asDocumentation(protocolItem.documentationFormat, item.documentation);\n }\n }\n if (item.filterText) { result.filterText = item.filterText; }\n this.fillPrimaryInsertText(result, item as ProtocolCompletionItem);\n if (Is.number(item.kind)) {\n result.kind = this.asCompletionItemKind(item.kind, protocolItem && protocolItem.originalItemKind);\n }\n if (item.sortText) { result.sortText = item.sortText; }\n if (item.additionalTextEdits) { result.additionalTextEdits = this.asTextEdits(item.additionalTextEdits); }\n if (item.command) { result.command = this.asCommand(item.command); }\n if (item.commitCharacters) { result.commitCharacters = item.commitCharacters.slice(); }\n if (item.command) { result.command = this.asCommand(item.command); }\n // TODO if (item.preselect === true || item.preselect === false) { result.preselect = item.preselect; }\n if (protocolItem) {\n if (protocolItem.data !== undefined) {\n result.data = protocolItem.data;\n }\n if (protocolItem.deprecated === true || protocolItem.deprecated === false) {\n result.deprecated = protocolItem.deprecated;\n }\n }\n return result;\n }\n\n protected asCompletionItemKind(value: monaco.languages.CompletionItemKind, original: CompletionItemKind | undefined): CompletionItemKind {\n if (original !== undefined) {\n return original;\n }\n return value + 1 as CompletionItemKind;\n }\n\n protected asDocumentation(format: string, documentation: string | monaco.IMarkdownString): string | MarkupContent {\n switch (format) {\n case MarkupKind.PlainText:\n return { kind: format, value: documentation as string };\n case MarkupKind.Markdown:\n return { kind: format, value: (documentation as monaco.IMarkdownString).value };\n default:\n return `Unsupported Markup content received. Kind is: ${format}`;\n }\n }\n\n protected fillPrimaryInsertText(target: CompletionItem, source: ProtocolCompletionItem): void {\n let format: InsertTextFormat = InsertTextFormat.PlainText;\n let text: string | undefined;\n let range: Range | undefined;\n if (source.textEdit) {\n text = source.textEdit.text;\n range = this.asRange(source.textEdit.range);\n } else if (typeof source.insertText === 'string') {\n text = source.insertText;\n } else if (source.insertText) {\n format = InsertTextFormat.Snippet;\n text = source.insertText.value;\n }\n if (source.range) {\n range = this.asRange(source.range);\n }\n\n target.insertTextFormat = format;\n if (source.fromEdit && text && range) {\n target.textEdit = { newText: text, range: range };\n } else {\n target.insertText = text;\n }\n }\n\n asTextEdit(edit: monaco.editor.ISingleEditOperation): TextEdit {\n const range = this.asRange(edit.range)!;\n return {\n range,\n newText: edit.text\n }\n }\n\n asTextEdits(items: monaco.editor.ISingleEditOperation[]): TextEdit[];\n asTextEdits(items: undefined | null): undefined;\n asTextEdits(items: monaco.editor.ISingleEditOperation[] | undefined | null): TextEdit[] | undefined;\n asTextEdits(items: monaco.editor.ISingleEditOperation[] | undefined | null): TextEdit[] | undefined {\n if (!items) {\n return undefined;\n }\n return items.map(item => this.asTextEdit(item));\n }\n\n asReferenceParams(model: IReadOnlyModel, position: monaco.Position, options: { includeDeclaration: boolean; }): ReferenceParams {\n return {\n textDocument: this.asTextDocumentIdentifier(model),\n position: this.asPosition(position.lineNumber, position.column),\n context: { includeDeclaration: options.includeDeclaration }\n };\n }\n\n asDocumentSymbolParams(model: IReadOnlyModel): DocumentSymbolParams {\n return {\n textDocument: this.asTextDocumentIdentifier(model)\n }\n }\n\n asCodeLensParams(model: IReadOnlyModel): CodeLensParams {\n return {\n textDocument: this.asTextDocumentIdentifier(model)\n }\n }\n\n asDiagnosticSeverity(value: monaco.MarkerSeverity): DiagnosticSeverity | undefined {\n switch (value) {\n case monaco.MarkerSeverity.Error:\n return DiagnosticSeverity.Error;\n case monaco.MarkerSeverity.Warning:\n return DiagnosticSeverity.Warning;\n case monaco.MarkerSeverity.Info:\n return DiagnosticSeverity.Information;\n case monaco.MarkerSeverity.Hint:\n return DiagnosticSeverity.Hint;\n }\n return undefined;\n }\n\n asDiagnostic(marker: monaco.editor.IMarkerData): Diagnostic {\n const range = this.asRange(new monaco.Range(marker.startLineNumber, marker.startColumn, marker.endLineNumber, marker.endColumn))\n const severity = this.asDiagnosticSeverity(marker.severity);\n return Diagnostic.create(range, marker.message, severity, marker.code, marker.source);\n }\n\n asDiagnostics(markers: monaco.editor.IMarkerData[]): Diagnostic[] {\n if (markers === void 0 || markers === null) {\n return markers;\n }\n return markers.map(marker => this.asDiagnostic(marker));\n }\n\n asCodeActionContext(context: monaco.languages.CodeActionContext): CodeActionContext {\n if (context === void 0 || context === null) {\n return context;\n }\n const diagnostics = this.asDiagnostics(context.markers);\n return CodeActionContext.create(diagnostics, Is.string(context.only) ? [context.only] : undefined);\n }\n\n asCodeActionParams(model: IReadOnlyModel, range: monaco.Range, context: monaco.languages.CodeActionContext): CodeActionParams {\n return {\n textDocument: this.asTextDocumentIdentifier(model),\n range: this.asRange(range),\n context: this.asCodeActionContext(context)\n }\n }\n\n asCommand(item: monaco.languages.Command | undefined | null): Command | undefined {\n if (item) {\n let args = item.arguments || [];\n return Command.create(item.title, item.id, ...args);\n }\n return undefined;\n }\n\n asCodeLens(item: monaco.languages.ICodeLensSymbol): CodeLens {\n let result = CodeLens.create(this.asRange(item.range));\n if (item.command) { result.command = this.asCommand(item.command); }\n if (ProtocolCodeLens.is(item)) {\n if (item.data) { result.data = item.data };\n }\n return result;\n }\n\n asFormattingOptions(options: monaco.languages.FormattingOptions): FormattingOptions {\n return { tabSize: options.tabSize, insertSpaces: options.insertSpaces };\n }\n\n asDocumentFormattingParams(model: IReadOnlyModel, options: monaco.languages.FormattingOptions): DocumentFormattingParams {\n return {\n textDocument: this.asTextDocumentIdentifier(model),\n options: this.asFormattingOptions(options)\n }\n }\n\n asDocumentRangeFormattingParams(model: IReadOnlyModel, range: monaco.Range, options: monaco.languages.FormattingOptions): DocumentRangeFormattingParams {\n return {\n textDocument: this.asTextDocumentIdentifier(model),\n range: this.asRange(range),\n options: this.asFormattingOptions(options)\n }\n }\n\n asDocumentOnTypeFormattingParams(model: IReadOnlyModel, position: monaco.IPosition, ch: string, options: monaco.languages.FormattingOptions): DocumentOnTypeFormattingParams {\n return {\n textDocument: this.asTextDocumentIdentifier(model),\n position: this.asPosition(position.lineNumber, position.column),\n ch,\n options: this.asFormattingOptions(options)\n }\n }\n\n asRenameParams(model: IReadOnlyModel, position: monaco.IPosition, newName: string): RenameParams {\n return {\n textDocument: this.asTextDocumentIdentifier(model),\n position: this.asPosition(position.lineNumber, position.column),\n newName\n }\n }\n\n asDocumentLinkParams(model: IReadOnlyModel): DocumentLinkParams {\n return {\n textDocument: this.asTextDocumentIdentifier(model)\n }\n }\n\n asDocumentLink(item: monaco.languages.ILink): DocumentLink {\n let result = DocumentLink.create(this.asRange(item.range));\n if (item.url) { result.target = item.url; }\n if (ProtocolDocumentLink.is(item) && item.data) {\n result.data = item.data;\n }\n return result;\n }\n}\n\nexport class ProtocolToMonacoConverter {\n\n asResourceEdits(resource: monaco.Uri, edits: TextEdit[], modelVersionId?: number): monaco.languages.ResourceTextEdit {\n return {\n resource: resource,\n edits: this.asTextEdits(edits),\n modelVersionId\n }\n }\n\n asWorkspaceEdit(item: WorkspaceEdit): monaco.languages.WorkspaceEdit;\n asWorkspaceEdit(item: undefined | null): undefined;\n asWorkspaceEdit(item: WorkspaceEdit | undefined | null): monaco.languages.WorkspaceEdit | undefined;\n asWorkspaceEdit(item: WorkspaceEdit | undefined | null): monaco.languages.WorkspaceEdit | undefined {\n if (!item) {\n return undefined;\n }\n const edits: monaco.languages.ResourceTextEdit[] = [];\n if (item.documentChanges) {\n for (const change of item.documentChanges) {\n const resource = monaco.Uri.parse(change.textDocument.uri);\n const version = typeof change.textDocument.version === 'number' ? change.textDocument.version : undefined;\n edits.push(this.asResourceEdits(resource, change.edits, version));\n }\n } else if (item.changes) {\n for (const key of Object.keys(item.changes)) {\n const resource = monaco.Uri.parse(key);\n edits.push(this.asResourceEdits(resource, item.changes[key]));\n }\n }\n return {\n edits\n };\n }\n\n asTextEdit(edit: TextEdit): monaco.languages.TextEdit;\n asTextEdit(edit: undefined | null): undefined;\n asTextEdit(edit: TextEdit | undefined | null): undefined;\n asTextEdit(edit: TextEdit | undefined | null): monaco.languages.TextEdit | undefined {\n if (!edit) {\n return undefined;\n }\n const range = this.asRange(edit.range)!;\n return {\n range,\n text: edit.newText\n }\n }\n\n asTextEdits(items: TextEdit[]): monaco.editor.ISingleEditOperation[];\n asTextEdits(items: undefined | null): undefined;\n asTextEdits(items: TextEdit[] | undefined | null): monaco.editor.ISingleEditOperation[] | undefined;\n asTextEdits(items: TextEdit[] | undefined | null): monaco.editor.ISingleEditOperation[] | undefined {\n if (!items) {\n return undefined;\n }\n return items.map(item => this.asTextEdit(item));\n }\n\n asCodeLens(item: CodeLens): monaco.languages.ICodeLensSymbol;\n asCodeLens(item: undefined | null): undefined;\n asCodeLens(item: CodeLens | undefined | null): monaco.languages.ICodeLensSymbol | undefined;\n asCodeLens(item: CodeLens | undefined | null): monaco.languages.ICodeLensSymbol | undefined {\n if (!item) {\n return undefined;\n }\n const range = this.asRange(item.range);\n let result = { range };\n if (item.command) { result.command = this.asCommand(item.command); }\n if (item.data !== void 0 && item.data !== null) { result.data = item.data; }\n return result;\n }\n\n asCodeLenses(items: CodeLens[]): monaco.languages.ICodeLensSymbol[];\n asCodeLenses(items: undefined | null): undefined;\n asCodeLenses(items: CodeLens[] | undefined | null): monaco.languages.ICodeLensSymbol[] | undefined;\n asCodeLenses(items: CodeLens[] | undefined | null): monaco.languages.ICodeLensSymbol[] | undefined {\n if (!items) {\n return undefined;\n }\n return items.map((codeLens) => this.asCodeLens(codeLens));\n }\n\n asCodeActions(actions: (Command | CodeAction)[]): monaco.languages.CodeAction[] {\n return actions.map(action => this.asCodeAction(action));\n }\n\n asCodeAction(item: Command | CodeAction): monaco.languages.CodeAction {\n if (CodeAction.is(item)) {\n return {\n title: item.title,\n command: this.asCommand(item.command),\n edit: this.asWorkspaceEdit(item.edit),\n diagnostics: this.asDiagnostics(item.diagnostics),\n kind: item.kind\n };\n }\n return {\n command: {\n id: item.command,\n title: item.title,\n arguments: item.arguments\n },\n title: item.title\n };\n }\n\n asCommand(command: Command): monaco.languages.Command;\n asCommand(command: undefined): undefined;\n asCommand(command: Command | undefined): monaco.languages.Command | undefined;\n asCommand(command: Command | undefined): monaco.languages.Command | undefined {\n if (!command) {\n return undefined;\n }\n return {\n id: command.command,\n title: command.title,\n arguments: command.arguments\n };\n }\n\n asDocumentSymbol(value: DocumentSymbol): monaco.languages.DocumentSymbol {\n const children = value.children && value.children.map(c => this.asDocumentSymbol(c));\n return {\n name: value.name,\n detail: value.detail || \"\",\n kind: this.asSymbolKind(value.kind),\n range: this.asRange(value.range),\n selectionRange: this.asRange(value.selectionRange),\n children\n };\n }\n\n asDocumentSymbols(values: SymbolInformation[] | DocumentSymbol[]): monaco.languages.DocumentSymbol[] {\n if (DocumentSymbol.is(values[0])) {\n return (values as DocumentSymbol[]).map(s => this.asDocumentSymbol(s));\n }\n return this.asSymbolInformations(values as SymbolInformation[]);\n }\n\n asSymbolInformations(values: SymbolInformation[], uri?: monaco.Uri): monaco.languages.DocumentSymbol[];\n asSymbolInformations(values: undefined | null, uri?: monaco.Uri): undefined;\n asSymbolInformations(values: SymbolInformation[] | undefined | null, uri?: monaco.Uri): monaco.languages.DocumentSymbol[] | undefined;\n asSymbolInformations(values: SymbolInformation[] | undefined | null, uri?: monaco.Uri): monaco.languages.DocumentSymbol[] | undefined {\n if (!values) {\n return undefined;\n }\n return values.map(information => this.asSymbolInformation(information, uri));\n }\n\n asSymbolInformation(item: SymbolInformation, uri?: monaco.Uri): monaco.languages.DocumentSymbol {\n const location = this.asLocation(uri ? { ...item.location, uri: uri.toString() } : item.location);\n return {\n name: item.name,\n detail: '',\n containerName: item.containerName,\n kind: this.asSymbolKind(item.kind),\n range: location.range,\n selectionRange: location.range\n };\n }\n\n asSymbolKind(item: SymbolKind): monaco.languages.SymbolKind {\n if (item <= SymbolKind.TypeParameter) {\n // Symbol kind is one based in the protocol and zero based in code.\n return item - 1;\n }\n return monaco.languages.SymbolKind.Property;\n }\n\n asDocumentHighlights(values: DocumentHighlight[]): monaco.languages.DocumentHighlight[];\n asDocumentHighlights(values: undefined | null): undefined;\n asDocumentHighlights(values: DocumentHighlight[] | undefined | null): monaco.languages.DocumentHighlight[] | undefined;\n asDocumentHighlights(values: DocumentHighlight[] | undefined | null): monaco.languages.DocumentHighlight[] | undefined {\n if (!values) {\n return undefined;\n }\n return values.map(item => this.asDocumentHighlight(item));\n }\n\n asDocumentHighlight(item: DocumentHighlight): monaco.languages.DocumentHighlight {\n const range = this.asRange(item.range)!;\n const kind = Is.number(item.kind) ? this.asDocumentHighlightKind(item.kind) : undefined!;\n return { range, kind };\n }\n\n asDocumentHighlightKind(item: number): monaco.languages.DocumentHighlightKind {\n switch (item) {\n case DocumentHighlightKind.Text:\n return monaco.languages.DocumentHighlightKind.Text;\n case DocumentHighlightKind.Read:\n return monaco.languages.DocumentHighlightKind.Read;\n case DocumentHighlightKind.Write:\n return monaco.languages.DocumentHighlightKind.Write;\n }\n return monaco.languages.DocumentHighlightKind.Text;\n }\n\n asReferences(values: Location[]): monaco.languages.Location[];\n asReferences(values: undefined | null): monaco.languages.Location[] | undefined;\n asReferences(values: Location[] | undefined | null): monaco.languages.Location[] | undefined;\n asReferences(values: Location[] | undefined | null): monaco.languages.Location[] | undefined {\n if (!values) {\n return undefined;\n }\n return values.map(location => this.asLocation(location));\n }\n\n asDefinitionResult(item: Definition): monaco.languages.Definition;\n asDefinitionResult(item: undefined | null): undefined;\n asDefinitionResult(item: Definition | undefined | null): monaco.languages.Definition | undefined;\n asDefinitionResult(item: Definition | undefined | null): monaco.languages.Definition | undefined {\n if (!item) {\n return undefined;\n }\n if (Is.array(item)) {\n return item.map((location) => this.asLocation(location));\n } else {\n return this.asLocation(item);\n }\n }\n\n asLocation(item: Location): monaco.languages.Location;\n asLocation(item: undefined | null): undefined;\n asLocation(item: Location | undefined | null): monaco.languages.Location | undefined;\n asLocation(item: Location | undefined | null): monaco.languages.Location | undefined {\n if (!item) {\n return undefined;\n }\n const uri = monaco.Uri.parse(item.uri);\n const range = this.asRange(item.range)!;\n return {\n uri, range\n }\n }\n\n asSignatureHelp(item: undefined | null): undefined;\n asSignatureHelp(item: SignatureHelp): monaco.languages.SignatureHelp;\n asSignatureHelp(item: SignatureHelp | undefined | null): monaco.languages.SignatureHelp | undefined;\n asSignatureHelp(item: SignatureHelp | undefined | null): monaco.languages.SignatureHelp | undefined {\n if (!item) {\n return undefined;\n }\n let result = {};\n if (Is.number(item.activeSignature)) {\n result.activeSignature = item.activeSignature;\n } else {\n // activeSignature was optional in the past\n result.activeSignature = 0;\n }\n if (Is.number(item.activeParameter)) {\n result.activeParameter = item.activeParameter;\n } else {\n // activeParameter was optional in the past\n result.activeParameter = 0;\n }\n if (item.signatures) {\n result.signatures = this.asSignatureInformations(item.signatures);\n } else {\n result.signatures = [];\n }\n return result;\n }\n\n asSignatureInformations(items: SignatureInformation[]): monaco.languages.SignatureInformation[] {\n return items.map(item => this.asSignatureInformation(item));\n }\n\n asSignatureInformation(item: SignatureInformation): monaco.languages.SignatureInformation {\n let result = { label: item.label };\n if (item.documentation) { result.documentation = this.asDocumentation(item.documentation); }\n if (item.parameters) {\n result.parameters = this.asParameterInformations(item.parameters);\n } else {\n result.parameters = [];\n }\n return result;\n }\n\n asParameterInformations(item: ParameterInformation[]): monaco.languages.ParameterInformation[] {\n return item.map(item => this.asParameterInformation(item));\n }\n\n asParameterInformation(item: ParameterInformation): monaco.languages.ParameterInformation {\n let result = { label: item.label };\n if (item.documentation) { result.documentation = this.asDocumentation(item.documentation) };\n return result;\n }\n\n asHover(hover: Hover): monaco.languages.Hover;\n asHover(hover: undefined | null): undefined;\n asHover(hover: Hover | undefined | null): monaco.languages.Hover | undefined;\n asHover(hover: Hover | undefined | null): monaco.languages.Hover | undefined {\n if (!hover) {\n return undefined;\n }\n return {\n contents: this.asHoverContent(hover.contents),\n range: this.asRange(hover.range)\n };\n }\n\n asHoverContent(contents: MarkedString | MarkedString[] | MarkupContent): monaco.IMarkdownString[] {\n if (Array.isArray(contents)) {\n return contents.map(content => this.asMarkdownString(content));\n }\n return [this.asMarkdownString(contents)];\n }\n\n asDocumentation(value: string | MarkupContent): string | monaco.IMarkdownString {\n if (Is.string(value)) {\n return value;\n }\n if (value.kind === MarkupKind.PlainText) {\n return value.value;\n }\n return this.asMarkdownString(value);\n }\n\n asMarkdownString(content: MarkedString | MarkupContent): monaco.IMarkdownString {\n if (MarkupContent.is(content)) {\n return {\n value: content.value\n };\n }\n if (Is.string(content)) {\n return { value: content };\n }\n const { language, value } = content;\n return {\n value: '```' + language + '\\n' + value + '\\n```'\n };\n }\n\n asSeverity(severity?: number): monaco.MarkerSeverity {\n if (severity === 1) {\n return monaco.MarkerSeverity.Error;\n }\n if (severity === 2) {\n return monaco.MarkerSeverity.Warning;\n }\n if (severity === 3) {\n return monaco.MarkerSeverity.Info;\n }\n return monaco.MarkerSeverity.Hint;\n }\n\n asDiagnostics(diagnostics: undefined): undefined;\n asDiagnostics(diagnostics: Diagnostic[]): monaco.editor.IMarkerData[];\n asDiagnostics(diagnostics: Diagnostic[] | undefined): monaco.editor.IMarkerData[] | undefined;\n asDiagnostics(diagnostics: Diagnostic[] | undefined): monaco.editor.IMarkerData[] | undefined {\n if (!diagnostics) {\n return undefined;\n }\n return diagnostics.map(diagnostic => this.asDiagnostic(diagnostic));\n }\n\n asDiagnostic(diagnostic: Diagnostic): monaco.editor.IMarkerData {\n return {\n code: typeof diagnostic.code === \"number\" ? diagnostic.code.toString() : diagnostic.code,\n severity: this.asSeverity(diagnostic.severity),\n message: diagnostic.message,\n source: diagnostic.source,\n startLineNumber: diagnostic.range.start.line + 1,\n startColumn: diagnostic.range.start.character + 1,\n endLineNumber: diagnostic.range.end.line + 1,\n endColumn: diagnostic.range.end.character + 1,\n relatedInformation: this.asRelatedInformations(diagnostic.relatedInformation)\n }\n }\n\n asRelatedInformations(relatedInformation?: DiagnosticRelatedInformation[]): monaco.editor.IRelatedInformation[] | undefined {\n if (!relatedInformation) {\n return undefined;\n }\n return relatedInformation.map(item => this.asRelatedInformation(item));\n }\n\n asRelatedInformation(relatedInformation: DiagnosticRelatedInformation): monaco.editor.IRelatedInformation {\n return {\n resource: monaco.Uri.parse(relatedInformation.location.uri),\n startLineNumber: relatedInformation.location.range.start.line + 1,\n startColumn: relatedInformation.location.range.start.character + 1,\n endLineNumber: relatedInformation.location.range.end.line + 1,\n endColumn: relatedInformation.location.range.end.character + 1,\n message: relatedInformation.message\n }\n }\n\n asCompletionResult(result: CompletionItem[] | CompletionList | null | undefined): monaco.languages.CompletionList {\n if (!result) {\n return {\n isIncomplete: false,\n items: []\n }\n }\n if (Array.isArray(result)) {\n const items = result.map(item => this.asCompletionItem(item));\n return {\n isIncomplete: false,\n items\n }\n }\n return {\n isIncomplete: result.isIncomplete,\n items: result.items.map(this.asCompletionItem.bind(this))\n }\n }\n\n asCompletionItem(item: CompletionItem): ProtocolCompletionItem {\n const result = { label: item.label };\n if (item.detail) { result.detail = item.detail; }\n if (item.documentation) {\n result.documentation = this.asDocumentation(item.documentation);\n result.documentationFormat = Is.string(item.documentation) ? undefined : item.documentation.kind;\n };\n if (item.filterText) { result.filterText = item.filterText; }\n let insertText = this.asCompletionInsertText(item);\n if (insertText) {\n result.insertText = insertText.text;\n result.range = insertText.range;\n result.fromEdit = insertText.fromEdit;\n }\n if (Is.number(item.kind)) {\n let [itemKind, original] = this.asCompletionItemKind(item.kind);\n result.kind = itemKind;\n if (original) {\n result.originalItemKind = original;\n }\n }\n if (item.sortText) { result.sortText = item.sortText; }\n if (item.additionalTextEdits) { result.additionalTextEdits = this.asTextEdits(item.additionalTextEdits); }\n if (Is.stringArray(item.commitCharacters)) { result.commitCharacters = item.commitCharacters.slice(); }\n if (item.command) { result.command = this.asCommand(item.command); }\n if (item.deprecated === true || item.deprecated === false) { result.deprecated = item.deprecated; }\n // TODO if (item.preselect === true || item.preselect === false) { result.preselect = item.preselect; }\n if (item.data !== undefined) { result.data = item.data; }\n return result;\n }\n\n asCompletionItemKind(value: CompletionItemKind): [monaco.languages.CompletionItemKind, CompletionItemKind | undefined] {\n // Protocol item kind is 1 based, codes item kind is zero based.\n if (CompletionItemKind.Text <= value && value <= CompletionItemKind.TypeParameter) {\n return [value - 1, undefined];\n };\n return [CompletionItemKind.Text, value];\n }\n\n asCompletionInsertText(item: CompletionItem): { text: string | monaco.languages.SnippetString, range?: monaco.Range, fromEdit: boolean } | undefined {\n if (item.textEdit) {\n const range = this.asRange(item.textEdit.range)!;\n const value = item.textEdit.newText;\n const text = item.insertTextFormat === InsertTextFormat.Snippet ? { value } : value;\n return {\n text, range, fromEdit: true\n };\n }\n if (item.insertText) {\n const value = item.insertText;\n const text = item.insertTextFormat === InsertTextFormat.Snippet ? { value } : value;\n return { text, fromEdit: false };\n }\n return undefined;\n }\n\n asDocumentLinks(documentLinks: DocumentLink[]): ProtocolDocumentLink[] {\n return documentLinks.map(link => this.asDocumentLink(link));\n }\n\n asDocumentLink(documentLink: DocumentLink): ProtocolDocumentLink {\n return {\n range: this.asRange(documentLink.range),\n url: documentLink.target,\n data: documentLink.data\n };\n }\n\n asRange(range: null): null;\n asRange(range: undefined): undefined;\n asRange(range: Range): monaco.Range;\n asRange(range: Range | undefined): monaco.Range | undefined;\n asRange(range: Range | null): monaco.Range | null;\n asRange(range: RecursivePartial): Partial;\n asRange(range: RecursivePartial | undefined): monaco.Range | Partial | undefined;\n asRange(range: RecursivePartial | null): monaco.Range | Partial | null;\n asRange(range: RecursivePartial | undefined | null): monaco.Range | Partial | undefined | null {\n if (range === undefined) {\n return undefined;\n }\n if (range === null) {\n return null;\n }\n const start = this.asPosition(range.start);\n const end = this.asPosition(range.end);\n if (start instanceof monaco.Position && end instanceof monaco.Position) {\n return new monaco.Range(start.lineNumber, start.column, end.lineNumber, end.column);\n }\n const startLineNumber = !start || start.lineNumber === undefined ? undefined : start.lineNumber;\n const startColumn = !start || start.column === undefined ? undefined : start.column;\n const endLineNumber = !end || end.lineNumber === undefined ? undefined : end.lineNumber;\n const endColumn = !end || end.column === undefined ? undefined : end.column;\n return { startLineNumber, startColumn, endLineNumber, endColumn };\n }\n\n asPosition(position: null): null;\n asPosition(position: undefined): undefined;\n asPosition(position: Position): monaco.Position;\n asPosition(position: Position | undefined): monaco.Position | undefined;\n asPosition(position: Position | null): monaco.Position | null;\n asPosition(position: Partial): Partial;\n asPosition(position: Partial | undefined): monaco.Position | Partial | undefined;\n asPosition(position: Partial | null): monaco.Position | Partial | null;\n asPosition(position: Partial | undefined | null): monaco.Position | Partial | undefined | null {\n if (position === undefined) {\n return undefined;\n }\n if (position === null) {\n return null;\n }\n const { line, character } = position;\n const lineNumber = line === undefined ? undefined : line + 1;\n const column = character === undefined ? undefined : character + 1;\n if (lineNumber !== undefined && column !== undefined) {\n return new monaco.Position(lineNumber, column);\n }\n return { lineNumber, column };\n }\n\n asColorInformations(items: ColorInformation[]): monaco.languages.IColorInformation[] {\n return items.map(item => this.asColorInformation(item));\n }\n\n asColorInformation(item: ColorInformation): monaco.languages.IColorInformation {\n return {\n range: this.asRange(item.range),\n color: item.color\n }\n }\n\n asColorPresentations(items: ColorPresentation[]): monaco.languages.IColorPresentation[] {\n return items.map(item => this.asColorPresentation(item));\n }\n\n asColorPresentation(item: ColorPresentation): monaco.languages.IColorPresentation {\n return {\n label: item.label,\n textEdit: this.asTextEdit(item.textEdit),\n additionalTextEdits: this.asTextEdits(item.additionalTextEdits)\n }\n }\n\n asFoldingRanges(items: undefined | null): undefined | null;\n asFoldingRanges(items: FoldingRange[]): monaco.languages.FoldingRange[];\n asFoldingRanges(items: FoldingRange[] | undefined | null): monaco.languages.FoldingRange[] | undefined | null {\n if (!items) {\n return items;\n }\n return items.map(item => this.asFoldingRange(item));\n }\n\n asFoldingRange(item: FoldingRange): monaco.languages.FoldingRange {\n return {\n start: item.startLine + 1,\n end: item.endLine + 1,\n kind: this.asFoldingRangeKind(item.kind)\n };\n }\n\n asFoldingRangeKind(kind?: string): monaco.languages.FoldingRangeKind | undefined {\n if (kind) {\n switch (kind) {\n case FoldingRangeKind.Comment:\n return monaco.languages.FoldingRangeKind.Comment;\n case FoldingRangeKind.Imports:\n return monaco.languages.FoldingRangeKind.Imports;\n case FoldingRangeKind.Region:\n return monaco.languages.FoldingRangeKind.Region;\n };\n }\n return undefined;\n }\n\n}\n","/* --------------------------------------------------------------------------------------------\n * Copyright (c) 2018 TypeFox GmbH (http://www.typefox.io). All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n * ------------------------------------------------------------------------------------------ */\nimport { DiagnosticCollection, Diagnostic } from './services';\nimport { DisposableCollection, Disposable } from './disposable';\nimport { ProtocolToMonacoConverter } from './monaco-converter';\nimport IModel = monaco.editor.IModel;\nimport IMarkerData = monaco.editor.IMarkerData;\n\nexport class MonacoDiagnosticCollection implements DiagnosticCollection {\n\n protected readonly diagnostics = new Map();\n protected readonly toDispose = new DisposableCollection();\n\n constructor(\n protected readonly name: string,\n protected readonly p2m: ProtocolToMonacoConverter) {\n }\n\n dispose() {\n this.toDispose.dispose();\n }\n\n get(uri: string): Diagnostic[] {\n const diagnostics = this.diagnostics.get(uri);\n return !!diagnostics ? diagnostics.diagnostics : [];\n }\n\n set(uri: string, diagnostics: Diagnostic[]): void {\n const existing = this.diagnostics.get(uri);\n if (existing) {\n existing.diagnostics = diagnostics;\n } else {\n const modelDiagnostics = new MonacoModelDiagnostics(uri, diagnostics, this.name, this.p2m);\n this.diagnostics.set(uri, modelDiagnostics);\n this.toDispose.push(Disposable.create(() => {\n this.diagnostics.delete(uri);\n modelDiagnostics.dispose();\n }));\n }\n }\n\n}\n\nexport class MonacoModelDiagnostics implements Disposable {\n readonly uri: monaco.Uri;\n protected _markers: IMarkerData[] = [];\n protected _diagnostics: Diagnostic[] = [];\n constructor(\n uri: string,\n diagnostics: Diagnostic[],\n readonly owner: string,\n protected readonly p2m: ProtocolToMonacoConverter\n ) {\n this.uri = monaco.Uri.parse(uri);\n this.diagnostics = diagnostics;\n monaco.editor.onDidCreateModel(model => this.doUpdateModelMarkers(model));\n }\n\n set diagnostics(diagnostics: Diagnostic[]) {\n this._diagnostics = diagnostics;\n this._markers = this.p2m.asDiagnostics(diagnostics);\n this.updateModelMarkers();\n }\n\n get diagnostics(): Diagnostic[] {\n return this._diagnostics;\n }\n\n get markers(): ReadonlyArray {\n return this._markers;\n }\n\n dispose(): void {\n this._markers = [];\n this.updateModelMarkers();\n }\n\n updateModelMarkers(): void {\n const model = monaco.editor.getModel(this.uri);\n this.doUpdateModelMarkers(model);\n }\n\n protected doUpdateModelMarkers(model: IModel | undefined): void {\n if (model && this.uri.toString() === model.uri.toString()) {\n monaco.editor.setModelMarkers(model, this.owner, this._markers);\n }\n }\n}\n","/* --------------------------------------------------------------------------------------------\n * Copyright (c) 2018 TypeFox GmbH (http://www.typefox.io). All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n * ------------------------------------------------------------------------------------------ */\nimport {\n BaseLanguageClient, MessageTransports, LanguageClientOptions, CompletionParams, WillSaveTextDocumentParams,\n} from \"vscode-base-languageclient/lib/client\";\nimport { TypeDefinitionFeature } from \"vscode-base-languageclient/lib/typeDefinition\";\nimport { ImplementationFeature } from \"vscode-base-languageclient/lib/implementation\";\nimport { ColorProviderFeature } from \"vscode-base-languageclient/lib/colorProvider\";\nimport { WorkspaceFoldersFeature } from \"vscode-base-languageclient/lib/workspaceFolders\";\nimport { FoldingRangeFeature } from \"vscode-base-languageclient/lib/foldingRange\";\nimport * as p2c from 'vscode-base-languageclient/lib/protocolConverter';\nimport * as c2p from 'vscode-base-languageclient/lib/codeConverter';\nimport { IConnectionProvider, IConnection } from './connection';\n\nexport * from 'vscode-base-languageclient/lib/client';\n\nexport class MonacoLanguageClient extends BaseLanguageClient {\n\n static bypassConversion = (result: any) => result || undefined;\n\n protected readonly connectionProvider: IConnectionProvider;\n\n constructor({ id, name, clientOptions, connectionProvider }: MonacoLanguageClient.Options) {\n super(id || name.toLowerCase(), name, clientOptions);\n this.connectionProvider = connectionProvider;\n (this as any).createConnection = this.doCreateConnection.bind(this);\n\n // bypass LSP <=> VS Code conversion\n const self: {\n _p2c: p2c.Converter,\n _c2p: c2p.Converter\n } = this as any;\n self._p2c = new Proxy(self._p2c, {\n get: (target: any, prop: string) => {\n if (prop === 'asUri') {\n return target[prop];\n }\n return MonacoLanguageClient.bypassConversion;\n }\n });\n self._c2p = new Proxy(self._c2p, {\n get: (target: c2p.Converter, prop: string) => {\n if (prop === 'asUri') {\n return target[prop];\n }\n if (prop === 'asCompletionParams') {\n return (textDocument: any, position: any, context: any): CompletionParams => {\n return {\n textDocument: target.asTextDocumentIdentifier(textDocument),\n position,\n context\n }\n }\n }\n if (prop === 'asWillSaveTextDocumentParams') {\n return (event: any): WillSaveTextDocumentParams => {\n return {\n textDocument: target.asTextDocumentIdentifier(event.document),\n reason: event.reason\n }\n }\n }\n if (prop.endsWith('Params')) {\n return (target as any)[prop];\n }\n return MonacoLanguageClient.bypassConversion;\n }\n });\n }\n\n protected doCreateConnection(): Thenable {\n const errorHandler = (this as any).handleConnectionError.bind(this);\n const closeHandler = this.handleConnectionClosed.bind(this);\n return this.connectionProvider.get(errorHandler, closeHandler, this.outputChannel);\n }\n\n protected createMessageTransports(encoding: string): Thenable {\n throw new Error('Unsupported');\n }\n\n protected registerBuiltinFeatures(): void {\n super.registerBuiltinFeatures();\n this.registerFeature(new TypeDefinitionFeature(this));\n this.registerFeature(new ImplementationFeature(this));\n this.registerFeature(new ColorProviderFeature(this));\n this.registerFeature(new WorkspaceFoldersFeature(this));\n\n const foldingRangeFeature = new FoldingRangeFeature(this);\n foldingRangeFeature['asFoldingRanges'] = MonacoLanguageClient.bypassConversion;\n this.registerFeature(foldingRangeFeature);\n }\n\n}\nexport namespace MonacoLanguageClient {\n export interface Options {\n name: string;\n id?: string;\n clientOptions: LanguageClientOptions;\n connectionProvider: IConnectionProvider;\n }\n}\n","/* --------------------------------------------------------------------------------------------\n * Copyright (c) 2018 TypeFox GmbH (http://www.typefox.io). All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n * ------------------------------------------------------------------------------------------ */\nimport globToRegExp = require('glob-to-regexp');\nimport {\n Languages, DiagnosticCollection, CompletionItemProvider, DocumentIdentifier, HoverProvider,\n SignatureHelpProvider, DefinitionProvider, ReferenceProvider, DocumentHighlightProvider,\n DocumentSymbolProvider, CodeActionProvider, CodeLensProvider, DocumentFormattingEditProvider, DocumentRangeFormattingEditProvider, OnTypeFormattingEditProvider, RenameProvider,\n DocumentFilter, DocumentSelector, DocumentLinkProvider, ImplementationProvider, TypeDefinitionProvider, DocumentColorProvider,\n FoldingRangeProvider\n} from \"./services\";\nimport { MonacoDiagnosticCollection } from './monaco-diagnostic-collection';\nimport { ProtocolToMonacoConverter, MonacoToProtocolConverter } from './monaco-converter';\nimport { DisposableCollection, Disposable } from './disposable';\n\nexport interface MonacoModelIdentifier {\n uri: monaco.Uri;\n languageId: string;\n}\n\nexport namespace MonacoModelIdentifier {\n export function fromDocument(document: DocumentIdentifier): MonacoModelIdentifier {\n return {\n uri: monaco.Uri.parse(document.uri),\n languageId: document.languageId\n }\n }\n export function fromModel(model: monaco.editor.IReadOnlyModel): MonacoModelIdentifier {\n return {\n uri: model.uri,\n languageId: model.getModeId()\n }\n }\n}\n\nexport function testGlob(pattern: string, value: string): boolean {\n const regExp = globToRegExp(pattern, {\n extended: true,\n globstar: true\n });\n return regExp.test(value);\n}\n\nexport function getLanguages(): string[] {\n const languages = [];\n for (const language of monaco.languages.getLanguages().map(l => l.id)) {\n if (languages.indexOf(language) === -1) {\n languages.push(language);\n }\n }\n return languages;\n}\n\nexport class MonacoLanguages implements Languages {\n\n constructor(\n protected readonly p2m: ProtocolToMonacoConverter,\n protected readonly m2p: MonacoToProtocolConverter\n ) { }\n\n match(selector: DocumentSelector, document: DocumentIdentifier): boolean {\n return this.matchModel(selector, MonacoModelIdentifier.fromDocument(document));\n }\n\n createDiagnosticCollection(name?: string): DiagnosticCollection {\n return new MonacoDiagnosticCollection(name || 'default', this.p2m);\n }\n\n registerCompletionItemProvider(selector: DocumentSelector, provider: CompletionItemProvider, ...triggerCharacters: string[]): Disposable {\n const completionProvider = this.createCompletionProvider(selector, provider, ...triggerCharacters);\n const providers = new DisposableCollection();\n for (const language of getLanguages()) {\n if (this.matchLanguage(selector, language)) {\n providers.push(monaco.languages.registerCompletionItemProvider(language, completionProvider))\n }\n };\n return providers;\n }\n\n protected createCompletionProvider(selector: DocumentSelector, provider: CompletionItemProvider, ...triggerCharacters: string[]): monaco.languages.CompletionItemProvider {\n return {\n triggerCharacters,\n provideCompletionItems: (model, position, token, context) => {\n if (!this.matchModel(selector, MonacoModelIdentifier.fromModel(model))) {\n return [];\n }\n const params = this.m2p.asCompletionParams(model, position, context);\n return provider.provideCompletionItems(params, token).then(result => this.p2m.asCompletionResult(result));\n },\n resolveCompletionItem: provider.resolveCompletionItem ? (item, token) => {\n const protocolItem = this.m2p.asCompletionItem(item);\n return provider.resolveCompletionItem!(protocolItem, token).then(resolvedItem => {\n const resolvedCompletionItem = this.p2m.asCompletionItem(resolvedItem);\n Object.assign(item, resolvedCompletionItem);\n return item;\n });\n } : undefined\n };\n }\n\n registerHoverProvider(selector: DocumentSelector, provider: HoverProvider): Disposable {\n const hoverProvider = this.createHoverProvider(selector, provider);\n const providers = new DisposableCollection();\n for (const language of getLanguages()) {\n if (this.matchLanguage(selector, language)) {\n providers.push(monaco.languages.registerHoverProvider(language, hoverProvider));\n }\n }\n return providers;\n }\n\n protected createHoverProvider(selector: DocumentSelector, provider: HoverProvider): monaco.languages.HoverProvider {\n return {\n provideHover: (model, position, token) => {\n if (!this.matchModel(selector, MonacoModelIdentifier.fromModel(model))) {\n return undefined!;\n }\n const params = this.m2p.asTextDocumentPositionParams(model, position);\n return provider.provideHover(params, token).then(hover => this.p2m.asHover(hover));\n }\n }\n }\n\n registerSignatureHelpProvider(selector: DocumentSelector, provider: SignatureHelpProvider, ...triggerCharacters: string[]): Disposable {\n const signatureHelpProvider = this.createSignatureHelpProvider(selector, provider, ...triggerCharacters);\n const providers = new DisposableCollection();\n for (const language of getLanguages()) {\n if (this.matchLanguage(selector, language)) {\n providers.push(monaco.languages.registerSignatureHelpProvider(language, signatureHelpProvider));\n }\n }\n return providers;\n }\n\n protected createSignatureHelpProvider(selector: DocumentSelector, provider: SignatureHelpProvider, ...triggerCharacters: string[]): monaco.languages.SignatureHelpProvider {\n const signatureHelpTriggerCharacters = triggerCharacters;\n return {\n signatureHelpTriggerCharacters,\n provideSignatureHelp: (model, position, token) => {\n if (!this.matchModel(selector, MonacoModelIdentifier.fromModel(model))) {\n return undefined!;\n }\n const params = this.m2p.asTextDocumentPositionParams(model, position);\n return provider.provideSignatureHelp(params, token).then(signatureHelp => this.p2m.asSignatureHelp(signatureHelp));\n }\n }\n }\n\n registerDefinitionProvider(selector: DocumentSelector, provider: DefinitionProvider): Disposable {\n const definitionProvider = this.createDefinitionProvider(selector, provider);\n const providers = new DisposableCollection();\n for (const language of getLanguages()) {\n if (this.matchLanguage(selector, language)) {\n providers.push(monaco.languages.registerDefinitionProvider(language, definitionProvider));\n }\n }\n return providers;\n }\n\n protected createDefinitionProvider(selector: DocumentSelector, provider: DefinitionProvider): monaco.languages.DefinitionProvider {\n return {\n provideDefinition: (model, position, token) => {\n if (!this.matchModel(selector, MonacoModelIdentifier.fromModel(model))) {\n return undefined!;\n }\n const params = this.m2p.asTextDocumentPositionParams(model, position);\n return provider.provideDefinition(params, token).then(result => this.p2m.asDefinitionResult(result));\n }\n }\n }\n\n registerReferenceProvider(selector: DocumentSelector, provider: ReferenceProvider): Disposable {\n const referenceProvider = this.createReferenceProvider(selector, provider);\n const providers = new DisposableCollection();\n for (const language of getLanguages()) {\n if (this.matchLanguage(selector, language)) {\n providers.push(monaco.languages.registerReferenceProvider(language, referenceProvider));\n }\n }\n return providers;\n }\n\n protected createReferenceProvider(selector: DocumentSelector, provider: ReferenceProvider): monaco.languages.ReferenceProvider {\n return {\n provideReferences: (model, position, context, token) => {\n if (!this.matchModel(selector, MonacoModelIdentifier.fromModel(model))) {\n return [];\n }\n const params = this.m2p.asReferenceParams(model, position, context);\n return provider.provideReferences(params, token).then(result => this.p2m.asReferences(result));\n }\n }\n }\n\n registerDocumentHighlightProvider(selector: DocumentSelector, provider: DocumentHighlightProvider): Disposable {\n const documentHighlightProvider = this.createDocumentHighlightProvider(selector, provider);\n const providers = new DisposableCollection();\n for (const language of getLanguages()) {\n if (this.matchLanguage(selector, language)) {\n providers.push(monaco.languages.registerDocumentHighlightProvider(language, documentHighlightProvider));\n }\n }\n return providers;\n }\n\n protected createDocumentHighlightProvider(selector: DocumentSelector, provider: DocumentHighlightProvider): monaco.languages.DocumentHighlightProvider {\n return {\n provideDocumentHighlights: (model, position, token) => {\n if (!this.matchModel(selector, MonacoModelIdentifier.fromModel(model))) {\n return [];\n }\n const params = this.m2p.asTextDocumentPositionParams(model, position);\n return provider.provideDocumentHighlights(params, token).then(result => this.p2m.asDocumentHighlights(result));\n }\n }\n }\n\n registerDocumentSymbolProvider(selector: DocumentSelector, provider: DocumentSymbolProvider): Disposable {\n const documentSymbolProvider = this.createDocumentSymbolProvider(selector, provider);\n const providers = new DisposableCollection();\n for (const language of getLanguages()) {\n if (this.matchLanguage(selector, language)) {\n providers.push(monaco.languages.registerDocumentSymbolProvider(language, documentSymbolProvider));\n }\n }\n return providers;\n }\n\n protected createDocumentSymbolProvider(selector: DocumentSelector, provider: DocumentSymbolProvider): monaco.languages.DocumentSymbolProvider {\n return {\n provideDocumentSymbols: (model, token) => {\n if (!this.matchModel(selector, MonacoModelIdentifier.fromModel(model))) {\n return [];\n }\n const params = this.m2p.asDocumentSymbolParams(model);\n return provider.provideDocumentSymbols(params, token).then(result => this.p2m.asDocumentSymbols(result))\n }\n }\n }\n\n registerCodeActionsProvider(selector: DocumentSelector, provider: CodeActionProvider): Disposable {\n const codeActionProvider = this.createCodeActionProvider(selector, provider);\n const providers = new DisposableCollection();\n for (const language of getLanguages()) {\n if (this.matchLanguage(selector, language)) {\n providers.push(monaco.languages.registerCodeActionProvider(language, codeActionProvider));\n }\n }\n return providers;\n }\n\n protected createCodeActionProvider(selector: DocumentSelector, provider: CodeActionProvider): monaco.languages.CodeActionProvider {\n return {\n provideCodeActions: (model, range, context, token) => {\n if (!this.matchModel(selector, MonacoModelIdentifier.fromModel(model))) {\n return [];\n }\n const params = this.m2p.asCodeActionParams(model, range, context);\n return provider.provideCodeActions(params, token).then(result => this.p2m.asCodeActions(result));\n }\n }\n }\n\n registerCodeLensProvider(selector: DocumentSelector, provider: CodeLensProvider): Disposable {\n const codeLensProvider = this.createCodeLensProvider(selector, provider);\n const providers = new DisposableCollection();\n for (const language of getLanguages()) {\n if (this.matchLanguage(selector, language)) {\n providers.push(monaco.languages.registerCodeLensProvider(language, codeLensProvider));\n }\n }\n return providers;\n }\n\n protected createCodeLensProvider(selector: DocumentSelector, provider: CodeLensProvider): monaco.languages.CodeLensProvider {\n return {\n provideCodeLenses: (model, token) => {\n if (!this.matchModel(selector, MonacoModelIdentifier.fromModel(model))) {\n return [];\n }\n const params = this.m2p.asCodeLensParams(model);\n return provider.provideCodeLenses(params, token).then(result => this.p2m.asCodeLenses(result))\n },\n resolveCodeLens: provider.resolveCodeLens ? (model, codeLens, token) => {\n if (!this.matchModel(selector, MonacoModelIdentifier.fromModel(model))) {\n return codeLens;\n }\n const protocolCodeLens = this.m2p.asCodeLens(codeLens);\n return provider.resolveCodeLens!(protocolCodeLens, token).then(result => {\n const resolvedCodeLens = this.p2m.asCodeLens(result);\n Object.assign(codeLens, resolvedCodeLens);\n return codeLens;\n });\n } : ((m, codeLens, t) => codeLens)\n }\n }\n\n registerDocumentFormattingEditProvider(selector: DocumentSelector, provider: DocumentFormattingEditProvider): Disposable {\n const documentFormattingEditProvider = this.createDocumentFormattingEditProvider(selector, provider);\n const providers = new DisposableCollection();\n for (const language of getLanguages()) {\n if (this.matchLanguage(selector, language)) {\n providers.push(monaco.languages.registerDocumentFormattingEditProvider(language, documentFormattingEditProvider));\n }\n }\n return providers;\n }\n\n protected createDocumentFormattingEditProvider(selector: DocumentSelector, provider: DocumentFormattingEditProvider): monaco.languages.DocumentFormattingEditProvider {\n return {\n provideDocumentFormattingEdits: (model, options, token) => {\n if (!this.matchModel(selector, MonacoModelIdentifier.fromModel(model))) {\n return [];\n }\n const params = this.m2p.asDocumentFormattingParams(model, options);\n return provider.provideDocumentFormattingEdits(params, token).then(result => this.p2m.asTextEdits(result))\n }\n }\n }\n\n registerDocumentRangeFormattingEditProvider(selector: DocumentSelector, provider: DocumentRangeFormattingEditProvider): Disposable {\n const documentRangeFormattingEditProvider = this.createDocumentRangeFormattingEditProvider(selector, provider);\n const providers = new DisposableCollection();\n for (const language of getLanguages()) {\n if (this.matchLanguage(selector, language)) {\n providers.push(monaco.languages.registerDocumentRangeFormattingEditProvider(language, documentRangeFormattingEditProvider));\n }\n }\n return providers;\n }\n\n createDocumentRangeFormattingEditProvider(selector: DocumentSelector, provider: DocumentRangeFormattingEditProvider): monaco.languages.DocumentRangeFormattingEditProvider {\n return {\n provideDocumentRangeFormattingEdits: (model, range, options, token) => {\n if (!this.matchModel(selector, MonacoModelIdentifier.fromModel(model))) {\n return [];\n }\n const params = this.m2p.asDocumentRangeFormattingParams(model, range, options);\n return provider.provideDocumentRangeFormattingEdits(params, token).then(result => this.p2m.asTextEdits(result))\n }\n }\n }\n\n registerOnTypeFormattingEditProvider(selector: DocumentSelector, provider: OnTypeFormattingEditProvider, firstTriggerCharacter: string, ...moreTriggerCharacter: string[]): Disposable {\n const onTypeFormattingEditProvider = this.createOnTypeFormattingEditProvider(selector, provider, firstTriggerCharacter, ...moreTriggerCharacter);\n const providers = new DisposableCollection();\n for (const language of getLanguages()) {\n if (this.matchLanguage(selector, language)) {\n providers.push(monaco.languages.registerOnTypeFormattingEditProvider(language, onTypeFormattingEditProvider));\n }\n }\n return providers;\n }\n\n protected createOnTypeFormattingEditProvider(selector: DocumentSelector, provider: OnTypeFormattingEditProvider, firstTriggerCharacter: string, ...moreTriggerCharacter: string[]): monaco.languages.OnTypeFormattingEditProvider {\n const autoFormatTriggerCharacters = [firstTriggerCharacter].concat(moreTriggerCharacter)\n return {\n autoFormatTriggerCharacters,\n provideOnTypeFormattingEdits: (model, position, ch, options, token) => {\n if (!this.matchModel(selector, MonacoModelIdentifier.fromModel(model))) {\n return [];\n }\n const params = this.m2p.asDocumentOnTypeFormattingParams(model, position, ch, options);\n return provider.provideOnTypeFormattingEdits(params, token).then(result => this.p2m.asTextEdits(result))\n }\n }\n }\n\n registerRenameProvider(selector: DocumentSelector, provider: RenameProvider): Disposable {\n const renameProvider = this.createRenameProvider(selector, provider);\n const providers = new DisposableCollection();\n for (const language of getLanguages()) {\n if (this.matchLanguage(selector, language)) {\n providers.push(monaco.languages.registerRenameProvider(language, renameProvider));\n }\n }\n return providers;\n }\n\n protected createRenameProvider(selector: DocumentSelector, provider: RenameProvider): monaco.languages.RenameProvider {\n return {\n provideRenameEdits: (model, position, newName, token) => {\n if (!this.matchModel(selector, MonacoModelIdentifier.fromModel(model))) {\n return undefined!;\n }\n const params = this.m2p.asRenameParams(model, position, newName);\n return provider.provideRenameEdits(params, token).then(result => this.p2m.asWorkspaceEdit(result))\n }\n }\n }\n\n registerDocumentLinkProvider(selector: DocumentSelector, provider: DocumentLinkProvider): Disposable {\n const linkProvider = this.createDocumentLinkProvider(selector, provider);\n const providers = new DisposableCollection();\n for (const language of getLanguages()) {\n if (this.matchLanguage(selector, language)) {\n providers.push(monaco.languages.registerLinkProvider(language, linkProvider));\n }\n }\n return providers;\n }\n\n protected createDocumentLinkProvider(selector: DocumentSelector, provider: DocumentLinkProvider): monaco.languages.LinkProvider {\n return {\n provideLinks: (model, token) => {\n if (!this.matchModel(selector, MonacoModelIdentifier.fromModel(model))) {\n return undefined!;\n }\n const params = this.m2p.asDocumentLinkParams(model);\n return provider.provideDocumentLinks(params, token).then(result => this.p2m.asDocumentLinks(result));\n },\n\n resolveLink: (link: monaco.languages.ILink, token) => {\n // resolve the link if the provider supports it\n // and the link doesn't have a url set\n if (provider.resolveDocumentLink && (link.url === null || link.url === undefined)) {\n const documentLink = this.m2p.asDocumentLink(link);\n return provider.resolveDocumentLink(documentLink, token).then(result => {\n const resolvedLink = this.p2m.asDocumentLink(result);\n Object.assign(link, resolvedLink);\n return link;\n });\n }\n return link;\n }\n }\n }\n\n registerImplementationProvider(selector: DocumentSelector, provider: ImplementationProvider): Disposable {\n const implementationProvider = this.createImplementationProvider(selector, provider);\n const providers = new DisposableCollection();\n for (const language of getLanguages()) {\n if (this.matchLanguage(selector, language)) {\n providers.push(monaco.languages.registerImplementationProvider(language, implementationProvider));\n }\n }\n return providers;\n }\n\n protected createImplementationProvider(selector: DocumentSelector, provider: ImplementationProvider): monaco.languages.ImplementationProvider {\n return {\n provideImplementation: (model, position, token) => {\n if (!this.matchModel(selector, MonacoModelIdentifier.fromModel(model))) {\n return undefined!;\n }\n const params = this.m2p.asTextDocumentPositionParams(model, position);\n return provider.provideImplementation(params, token).then(result => this.p2m.asDefinitionResult(result));\n }\n }\n }\n\n registerTypeDefinitionProvider(selector: DocumentSelector, provider: TypeDefinitionProvider): Disposable {\n const typeDefinitionProvider = this.createTypeDefinitionProvider(selector, provider);\n const providers = new DisposableCollection();\n for (const language of getLanguages()) {\n if (this.matchLanguage(selector, language)) {\n providers.push(monaco.languages.registerTypeDefinitionProvider(language, typeDefinitionProvider));\n }\n }\n return providers;\n }\n\n protected createTypeDefinitionProvider(selector: DocumentSelector, provider: TypeDefinitionProvider): monaco.languages.TypeDefinitionProvider {\n return {\n provideTypeDefinition: (model, position, token) => {\n if (!this.matchModel(selector, MonacoModelIdentifier.fromModel(model))) {\n return undefined!;\n }\n const params = this.m2p.asTextDocumentPositionParams(model, position);\n return provider.provideTypeDefinition(params, token).then(result => this.p2m.asDefinitionResult(result));\n }\n }\n }\n\n registerColorProvider(selector: DocumentSelector, provider: DocumentColorProvider): Disposable {\n const documentColorProvider = this.createDocumentColorProvider(selector, provider);\n const providers = new DisposableCollection();\n for (const language of getLanguages()) {\n if (this.matchLanguage(selector, language)) {\n providers.push(monaco.languages.registerColorProvider(language, documentColorProvider));\n }\n }\n return providers;\n }\n\n protected createDocumentColorProvider(selector: DocumentSelector, provider: DocumentColorProvider): monaco.languages.DocumentColorProvider {\n return {\n provideDocumentColors: (model, token) => {\n if (!this.matchModel(selector, MonacoModelIdentifier.fromModel(model))) {\n return [];\n }\n const textDocument = this.m2p.asTextDocumentIdentifier(model);\n return provider.provideDocumentColors({ textDocument }, token).then(result => this.p2m.asColorInformations(result));\n },\n provideColorPresentations: (model, info, token) => {\n if (!this.matchModel(selector, MonacoModelIdentifier.fromModel(model))) {\n return [];\n }\n const textDocument = this.m2p.asTextDocumentIdentifier(model);\n const range = this.m2p.asRange(info.range);\n return provider.provideColorPresentations({\n textDocument,\n color: info.color,\n range\n }, token).then(result => this.p2m.asColorPresentations(result))\n }\n }\n }\n\n registerFoldingRangeProvider(selector: DocumentSelector, provider: FoldingRangeProvider): Disposable {\n const foldingRangeProvider = this.createFoldingRangeProvider(selector, provider);\n const providers = new DisposableCollection();\n for (const language of getLanguages()) {\n if (this.matchLanguage(selector, language)) {\n providers.push(monaco.languages.registerFoldingRangeProvider(language, foldingRangeProvider));\n }\n }\n return providers;\n }\n\n protected createFoldingRangeProvider(selector: DocumentSelector, provider: FoldingRangeProvider): monaco.languages.FoldingRangeProvider {\n return {\n provideFoldingRanges: (model, context, token) => {\n if (!this.matchModel(selector, MonacoModelIdentifier.fromModel(model))) {\n return [];\n }\n const textDocument = this.m2p.asTextDocumentIdentifier(model);\n return provider.provideFoldingRanges({\n textDocument\n }, token).then(result => this.p2m.asFoldingRanges(result));\n }\n }\n }\n\n protected matchModel(selector: string | DocumentFilter | DocumentSelector, model: MonacoModelIdentifier): boolean {\n if (Array.isArray(selector)) {\n return selector.some(filter => this.matchModel(filter, model));\n }\n if (DocumentFilter.is(selector)) {\n if (!!selector.language && selector.language !== model.languageId) {\n return false;\n }\n if (!!selector.scheme && selector.scheme !== model.uri.scheme) {\n return false;\n }\n if (!!selector.pattern && !testGlob(selector.pattern, model.uri.path)) {\n return false;\n }\n return true;\n }\n return selector === model.languageId;\n }\n\n protected matchLanguage(selector: string | DocumentFilter | DocumentSelector, languageId: string): boolean {\n if (Array.isArray(selector)) {\n return selector.some(filter => this.matchLanguage(filter, languageId));\n }\n\n if (DocumentFilter.is(selector)) {\n return !selector.language || selector.language === languageId;\n }\n\n return selector === languageId;\n }\n\n}\n","/* --------------------------------------------------------------------------------------------\n * Copyright (c) 2018 TypeFox GmbH (http://www.typefox.io). All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n * ------------------------------------------------------------------------------------------ */\nimport { MonacoToProtocolConverter, ProtocolToMonacoConverter } from \"./monaco-converter\";\nimport { MonacoCommands } from './monaco-commands';\nimport { MonacoLanguages } from \"./monaco-languages\";\nimport { MonacoWorkspace } from \"./monaco-workspace\";\nimport { ConsoleWindow } from \"./console-window\";\nimport { Services } from \"./services\";\n\nexport interface MonacoServices extends Services {\n commands: MonacoCommands\n languages: MonacoLanguages\n workspace: MonacoWorkspace\n window: ConsoleWindow\n}\nexport namespace MonacoServices {\n export interface Options {\n rootUri?: string\n }\n export type Provider = () => MonacoServices;\n export function create(editor: monaco.editor.IStandaloneCodeEditor, options: Options = {}): MonacoServices {\n const m2p = new MonacoToProtocolConverter();\n const p2m = new ProtocolToMonacoConverter();\n return {\n commands: new MonacoCommands(editor),\n languages: new MonacoLanguages(p2m, m2p),\n workspace: new MonacoWorkspace(p2m, m2p, options.rootUri),\n window: new ConsoleWindow()\n }\n }\n export function install(editor: monaco.editor.IStandaloneCodeEditor, options: Options = {}): MonacoServices {\n const services = create(editor, options);\n Services.install(services);\n return services;\n }\n export function get(): MonacoServices {\n return Services.get() as MonacoServices;\n }\n}","/* --------------------------------------------------------------------------------------------\n * Copyright (c) 2018 TypeFox GmbH (http://www.typefox.io). All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n * ------------------------------------------------------------------------------------------ */\nimport { MonacoToProtocolConverter, ProtocolToMonacoConverter } from './monaco-converter';\nimport { Workspace, WorkspaceEdit, TextDocumentDidChangeEvent, TextDocument, Event, Emitter } from './services';\nimport IModel = monaco.editor.IModel;\nimport IIdentifiedSingleEditOperation = monaco.editor.IIdentifiedSingleEditOperation;\n\nexport class MonacoWorkspace implements Workspace {\n\n protected readonly documents = new Map();\n protected readonly onDidOpenTextDocumentEmitter = new Emitter();\n protected readonly onDidCloseTextDocumentEmitter = new Emitter();\n protected readonly onDidChangeTextDocumentEmitter = new Emitter();\n\n constructor(\n protected readonly p2m: ProtocolToMonacoConverter,\n protected readonly m2p: MonacoToProtocolConverter,\n protected _rootUri: string | null = null) {\n for (const model of monaco.editor.getModels()) {\n this.addModel(model);\n }\n monaco.editor.onDidCreateModel(model => this.addModel(model));\n monaco.editor.onWillDisposeModel(model => this.removeModel(model));\n }\n\n get rootUri() {\n return this._rootUri;\n }\n\n protected removeModel(model: IModel): void {\n const uri = model.uri.toString();\n const document = this.documents.get(uri);\n if (document) {\n this.documents.delete(uri);\n this.onDidCloseTextDocumentEmitter.fire(document);\n }\n }\n\n protected addModel(model: IModel): void {\n const uri = model.uri.toString();\n const document = this.setModel(uri, model);\n this.onDidOpenTextDocumentEmitter.fire(document)\n model.onDidChangeContent(event =>\n this.onDidChangeContent(uri, model, event)\n );\n }\n\n protected onDidChangeContent(uri: string, model: IModel, event: monaco.editor.IModelContentChangedEvent) {\n const textDocument = this.setModel(uri, model);\n const contentChanges = [];\n for (const change of event.changes) {\n const range = this.m2p.asRange(change.range);\n const rangeLength = change.rangeLength;\n const text = change.text;\n contentChanges.push({ range, rangeLength, text });\n }\n this.onDidChangeTextDocumentEmitter.fire({\n textDocument,\n contentChanges\n });\n }\n\n protected setModel(uri: string, model: IModel): TextDocument {\n const document = TextDocument.create(uri, model.getModeId(), model.getVersionId(), model.getValue());\n this.documents.set(uri, document);\n return document;\n }\n\n get textDocuments(): TextDocument[] {\n return Array.from(this.documents.values());\n }\n\n get onDidOpenTextDocument(): Event {\n return this.onDidOpenTextDocumentEmitter.event;\n }\n\n get onDidCloseTextDocument(): Event {\n return this.onDidCloseTextDocumentEmitter.event;\n }\n\n get onDidChangeTextDocument(): Event {\n return this.onDidChangeTextDocumentEmitter.event;\n }\n\n public applyEdit(workspaceEdit: WorkspaceEdit): Promise {\n const edit: monaco.languages.WorkspaceEdit = this.p2m.asWorkspaceEdit(workspaceEdit);\n\n // Collect all referenced models\n const models: {[uri: string]: monaco.editor.IModel} = edit.edits.reduce(\n (acc: {[uri: string]: monaco.editor.IModel}, currentEdit) => {\n const textEdit = currentEdit as monaco.languages.ResourceTextEdit;\n acc[textEdit.resource.toString()] = monaco.editor.getModel(textEdit.resource);\n return acc;\n }, {}\n );\n\n // If any of the models do not exist, refuse to apply the edit.\n if (!Object.keys(models).map(uri => models[uri]).every(model => !!model)) {\n return Promise.resolve(false);\n }\n\n // Group edits by resource so we can batch them when applying\n const editsByResource: {[uri: string]: IIdentifiedSingleEditOperation[]} = edit.edits.reduce(\n (acc: {[uri: string]: IIdentifiedSingleEditOperation[]}, currentEdit) => {\n const textEdit = currentEdit as monaco.languages.ResourceTextEdit;\n const uri = textEdit.resource.toString();\n if (!(uri in acc)) {\n acc[uri] = [];\n }\n const operations = textEdit.edits.map(edit => {\n return {\n range: monaco.Range.lift(edit.range),\n text: edit.text\n }\n });\n acc[uri].push(...operations);\n return acc;\n }, {}\n );\n\n // Apply edits for each resource\n Object.keys(editsByResource).forEach(uri => {\n models[uri].pushEditOperations(\n [], // Do not try and preserve editor selections.\n editsByResource[uri].map(resourceEdit => {\n return {\n identifier: {major: 1, minor: 0},\n range: resourceEdit.range,\n text: resourceEdit.text,\n forceMoveMarkers: true,\n };\n }),\n () => [], // Do not try and preserve editor selections.\n );\n });\n return Promise.resolve(true);\n }\n\n}\n","/* --------------------------------------------------------------------------------------------\n * Copyright (c) 2018 TypeFox GmbH (http://www.typefox.io). All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n * ------------------------------------------------------------------------------------------ */\n'use strict';\n\nimport {\n DocumentSelector, MessageActionItem, MessageType,\n TextDocumentPositionParams, ReferenceParams, CodeActionParams, CodeLensParams, DocumentFormattingParams,\n DocumentRangeFormattingParams, DocumentOnTypeFormattingParams, RenameParams, DocumentLinkParams,\n WorkspaceClientCapabilities, DidChangeTextDocumentParams, Diagnostic, TextDocument, CompletionItem, CompletionList,\n Hover, SignatureHelp, Definition, Location, DocumentHighlight,\n SymbolInformation, Command, CodeLens, TextEdit, WorkspaceEdit,\n DocumentLink, TextDocumentSaveReason, DocumentSymbolParams,\n WorkspaceSymbolParams, TextDocumentContentChangeEvent, CompletionParams,\n ColorInformation, ColorPresentation, DocumentColorParams, ColorPresentationParams,\n FoldingRange, FoldingRangeRequestParam, DocumentFilter, DocumentSymbol, CodeAction\n} from 'vscode-languageserver-protocol/lib/main';\n\nimport {\n Disposable, CancellationToken, Event, Emitter\n} from 'vscode-jsonrpc';\n\nimport Uri from 'vscode-uri';\n\nexport {\n Disposable, CancellationToken, Event, Emitter\n}\nexport * from 'vscode-languageserver-protocol/lib/main';\n\nexport interface Services {\n languages: Languages;\n workspace: Workspace;\n commands?: Commands;\n window?: Window;\n}\nexport namespace Services {\n const global = window as any;\n const symbol = Symbol('Services');\n export type Provider = () => Services;\n export const get: Provider = () => {\n const services = global[symbol];\n if (!services) {\n throw new Error('Language Client services has not been installed');\n }\n return services;\n }\n export function install(services: Services): void {\n if (global[symbol]) {\n console.error(new Error('Language Client services has been overriden'));\n }\n global[symbol] = services;\n }\n}\n\nexport function isDocumentSelector(selector: any): selector is DocumentSelector {\n if (!selector || !Array.isArray(selector)) {\n return false;\n }\n return selector.every(value => typeof value === 'string' || DocumentFilter.is(value));\n}\n\nexport interface DiagnosticCollection extends Disposable {\n set(uri: string, diagnostics: Diagnostic[]): void;\n}\n\nexport interface CompletionItemProvider {\n provideCompletionItems(params: CompletionParams, token: CancellationToken): Thenable;\n resolveCompletionItem?(item: CompletionItem, token: CancellationToken): Thenable;\n}\n\nexport interface HoverProvider {\n provideHover(params: TextDocumentPositionParams, token: CancellationToken): Thenable;\n}\n\nexport interface SignatureHelpProvider {\n provideSignatureHelp(params: TextDocumentPositionParams, token: CancellationToken): Thenable;\n}\n\nexport interface DefinitionProvider {\n provideDefinition(params: TextDocumentPositionParams, token: CancellationToken): Thenable;\n}\n\nexport interface ReferenceProvider {\n provideReferences(params: ReferenceParams, token: CancellationToken): Thenable;\n}\n\nexport interface DocumentHighlightProvider {\n provideDocumentHighlights(params: TextDocumentPositionParams, token: CancellationToken): Thenable;\n}\n\nexport interface DocumentSymbolProvider {\n provideDocumentSymbols(params: DocumentSymbolParams, token: CancellationToken): Thenable;\n}\n\nexport interface WorkspaceSymbolProvider {\n provideWorkspaceSymbols(params: WorkspaceSymbolParams, token: CancellationToken): Thenable;\n}\n\nexport interface CodeActionProvider {\n provideCodeActions(params: CodeActionParams, token: CancellationToken): Thenable<(Command| CodeAction)[]>;\n}\n\nexport interface CodeLensProvider {\n provideCodeLenses(params: CodeLensParams, token: CancellationToken): Thenable;\n resolveCodeLens?(codeLens: CodeLens, token: CancellationToken): Thenable;\n}\n\nexport interface DocumentFormattingEditProvider {\n provideDocumentFormattingEdits(params: DocumentFormattingParams, token: CancellationToken): Thenable;\n}\n\nexport interface DocumentRangeFormattingEditProvider {\n provideDocumentRangeFormattingEdits(params: DocumentRangeFormattingParams, token: CancellationToken): Thenable;\n}\n\nexport interface OnTypeFormattingEditProvider {\n provideOnTypeFormattingEdits(params: DocumentOnTypeFormattingParams, token: CancellationToken): Thenable;\n}\n\nexport interface RenameProvider {\n provideRenameEdits(params: RenameParams, token: CancellationToken): Thenable;\n}\n\nexport interface DocumentLinkProvider {\n provideDocumentLinks(params: DocumentLinkParams, token: CancellationToken): Thenable;\n resolveDocumentLink?(link: DocumentLink, token: CancellationToken): Thenable;\n}\n\nexport interface DocumentIdentifier {\n uri: string;\n languageId: string;\n}\nexport namespace DocumentIdentifier {\n export function is(arg: any): arg is DocumentIdentifier {\n return !!arg && ('uri' in arg) && ('languageId' in arg);\n }\n}\n\nexport interface ImplementationProvider {\n provideImplementation(params: TextDocumentPositionParams, token: CancellationToken): Thenable;\n}\n\nexport interface TypeDefinitionProvider {\n provideTypeDefinition(params: TextDocumentPositionParams, token: CancellationToken): Thenable;\n}\n\nexport interface DocumentColorProvider {\n provideDocumentColors(params: DocumentColorParams, token: CancellationToken): Thenable;\n provideColorPresentations(params: ColorPresentationParams, token: CancellationToken): Thenable;\n}\n\nexport interface FoldingRangeProvider {\n provideFoldingRanges(params: FoldingRangeRequestParam, token: CancellationToken): Thenable;\n}\n\nexport interface Languages {\n match(selector: DocumentSelector, document: DocumentIdentifier): boolean;\n createDiagnosticCollection?(name?: string): DiagnosticCollection;\n registerCompletionItemProvider?(selector: DocumentSelector, provider: CompletionItemProvider, ...triggerCharacters: string[]): Disposable;\n registerHoverProvider?(selector: DocumentSelector, provider: HoverProvider): Disposable;\n registerSignatureHelpProvider?(selector: DocumentSelector, provider: SignatureHelpProvider, ...triggerCharacters: string[]): Disposable;\n registerDefinitionProvider?(selector: DocumentSelector, provider: DefinitionProvider): Disposable;\n registerReferenceProvider?(selector: DocumentSelector, provider: ReferenceProvider): Disposable;\n registerDocumentHighlightProvider?(selector: DocumentSelector, provider: DocumentHighlightProvider): Disposable;\n registerDocumentSymbolProvider?(selector: DocumentSelector, provider: DocumentSymbolProvider): Disposable;\n registerWorkspaceSymbolProvider?(provider: WorkspaceSymbolProvider): Disposable;\n registerCodeActionsProvider?(selector: DocumentSelector, provider: CodeActionProvider): Disposable;\n registerCodeLensProvider?(selector: DocumentSelector, provider: CodeLensProvider): Disposable;\n registerDocumentFormattingEditProvider?(selector: DocumentSelector, provider: DocumentFormattingEditProvider): Disposable;\n registerDocumentRangeFormattingEditProvider?(selector: DocumentSelector, provider: DocumentRangeFormattingEditProvider): Disposable;\n registerOnTypeFormattingEditProvider?(selector: DocumentSelector, provider: OnTypeFormattingEditProvider, firstTriggerCharacter: string, ...moreTriggerCharacter: string[]): Disposable;\n registerRenameProvider?(selector: DocumentSelector, provider: RenameProvider): Disposable;\n registerDocumentLinkProvider?(selector: DocumentSelector, provider: DocumentLinkProvider): Disposable;\n registerImplementationProvider?(selector: DocumentSelector, provider: ImplementationProvider): Disposable;\n registerTypeDefinitionProvider?(selector: DocumentSelector, provider: TypeDefinitionProvider): Disposable;\n registerColorProvider?(selector: DocumentSelector, provider: DocumentColorProvider): Disposable;\n registerFoldingRangeProvider?(selector: DocumentSelector, provider: FoldingRangeProvider): Disposable;\n}\n\nexport interface TextDocumentDidChangeEvent {\n readonly textDocument: TextDocument;\n readonly contentChanges: TextDocumentContentChangeEvent[];\n}\n\nexport interface TextDocumentWillSaveEvent {\n readonly textDocument: TextDocument;\n readonly reason: TextDocumentSaveReason;\n waitUntil?(thenable: Thenable): void;\n}\n\nexport enum ConfigurationTarget {\n Global = 1,\n Workspace = 2,\n WorkspaceFolder = 3\n}\n\nexport interface WorkspaceConfiguration {\n toJSON(): any;\n get(section: string): T | undefined;\n get(section: string, defaultValue: T): T;\n has(section: string): boolean;\n readonly [key: string]: any;\n}\n\nexport interface FileSystemWatcher extends Disposable {\n readonly onDidCreate: Event;\n readonly onDidChange: Event;\n readonly onDidDelete: Event;\n}\n\nexport interface ConfigurationChangeEvent {\n affectsConfiguration(section: string): boolean;\n}\nexport interface Configurations {\n getConfiguration(section?: string, resource?: string): WorkspaceConfiguration;\n readonly onDidChangeConfiguration: Event;\n}\n\nexport interface Workspace {\n readonly capabilities?: WorkspaceClientCapabilities;\n readonly rootPath?: string | null;\n readonly rootUri: string | null;\n readonly textDocuments: TextDocument[];\n readonly onDidOpenTextDocument: Event;\n readonly onDidCloseTextDocument: Event;\n readonly onDidChangeTextDocument: Event;\n readonly configurations?: Configurations;\n readonly onWillSaveTextDocument?: Event;\n readonly onDidSaveTextDocument?: Event;\n applyEdit(changes: WorkspaceEdit): Thenable;\n createFileSystemWatcher?(globPattern: string, ignoreCreateEvents?: boolean, ignoreChangeEvents?: boolean, ignoreDeleteEvents?: boolean): FileSystemWatcher;\n}\n\nexport interface Commands {\n registerCommand(command: string, callback: (...args: any[]) => any, thisArg?: any): Disposable;\n}\n\nexport interface OutputChannel extends Disposable {\n append(value: string): void;\n appendLine(line: string): void;\n show(preserveFocus?: boolean): void;\n}\n\nexport interface Window {\n showMessage(type: MessageType, message: string, ...actions: T[]): Thenable;\n createOutputChannel?(name: string): OutputChannel;\n}","/* --------------------------------------------------------------------------------------------\n * Copyright (c) 2018 TypeFox GmbH (http://www.typefox.io). All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n * ------------------------------------------------------------------------------------------ */\n\nimport * as vscode from \"vscode\";\nimport URI from \"vscode-uri\"\nimport { Disposable } from \"./disposable\";\nimport {\n Services, Event, Diagnostic, WorkspaceEdit, isDocumentSelector,\n MessageActionItem, MessageType, OutputChannel, CompletionTriggerKind, DocumentIdentifier\n} from \"./services\";\n\nexport function createVSCodeApi(servicesProvider: Services.Provider): typeof vscode {\n const unsupported = () => { throw new Error('unsupported') };\n const Uri: typeof vscode.Uri = URI;\n class CompletionItem implements vscode.CompletionItem {\n constructor(public label: string, public kind?: vscode.CompletionItemKind) { }\n }\n class CodeLens implements vscode.CodeLens {\n constructor(\n public range: vscode.Range,\n public command?: vscode.Command\n ) { }\n\n get isResolved(): boolean {\n return !!this.command;\n }\n }\n class DocumentLink implements vscode.DocumentLink {\n constructor(public range: vscode.Range, public target?: vscode.Uri) { }\n }\n class CodeActionKind implements vscode.CodeActionKind {\n static Empty = new CodeActionKind();\n static QuickFix = new CodeActionKind('quickfix');\n static Refactor = new CodeActionKind('refactor');\n static RefactorExtract = new CodeActionKind('refactor.extract');\n static RefactorInline = new CodeActionKind('refactor.inline');\n static RefactorRewrite = new CodeActionKind('refactor.rewrite');\n static Source = new CodeActionKind('source');\n static SourceOrganizeImports = new CodeActionKind('source.organizeImports');\n private constructor(readonly value?: string) { }\n append = unsupported\n contains = unsupported\n }\n const workspace: typeof vscode.workspace = {\n createFileSystemWatcher(globPattern, ignoreCreateEvents, ignoreChangeEvents, ignoreDeleteEvents): vscode.FileSystemWatcher {\n const services = servicesProvider();\n if (typeof globPattern !== 'string') {\n throw new Error('unsupported');\n }\n if (services.workspace.createFileSystemWatcher) {\n const watcher = services.workspace.createFileSystemWatcher(globPattern, ignoreCreateEvents, ignoreChangeEvents, ignoreDeleteEvents);\n return Object.assign(watcher, {\n ignoreCreateEvents: !!ignoreCreateEvents,\n ignoreChangeEvents: !!ignoreChangeEvents,\n ignoreDeleteEvents: !!ignoreDeleteEvents,\n });\n }\n return {\n ignoreCreateEvents: !!ignoreCreateEvents,\n ignoreChangeEvents: !!ignoreChangeEvents,\n ignoreDeleteEvents: !!ignoreDeleteEvents,\n onDidCreate: Event.None,\n onDidChange: Event.None,\n onDidDelete: Event.None,\n dispose: () => { }\n }\n },\n applyEdit: async (edit) => {\n const services = servicesProvider();\n if (WorkspaceEdit.is(edit)) {\n return services.workspace.applyEdit(edit);\n }\n throw new Error('unsupported');\n },\n getConfiguration(section, resource): vscode.WorkspaceConfiguration {\n const { workspace } = servicesProvider();\n const configuration = workspace.configurations ?\n workspace.configurations.getConfiguration(section, resource ? resource.toString() : undefined) :\n undefined;\n const result: vscode.WorkspaceConfiguration = {\n get: (section: string, defaultValue?: any) => {\n return configuration ? configuration.get(section, defaultValue) : defaultValue;\n },\n has: (section: string) => {\n return configuration ? configuration.has(section) : false;\n },\n inspect: unsupported,\n update: unsupported\n };\n return Object.assign(result, {\n toJSON: () => configuration ? configuration.toJSON() : undefined\n });\n },\n get onDidChangeConfiguration(): typeof vscode.workspace.onDidChangeConfiguration {\n const services = servicesProvider();\n if (services.workspace.configurations) {\n return services.workspace.configurations.onDidChangeConfiguration;\n }\n return Event.None;\n },\n get workspaceFolders(): typeof vscode.workspace.workspaceFolders {\n const services = servicesProvider();\n const rootUri = services.workspace.rootUri;\n if (!rootUri) {\n return undefined;\n }\n const uri = Uri.parse(rootUri);\n return [{\n uri,\n index: 0,\n name: uri.toString()\n }];\n },\n get textDocuments(): typeof vscode.workspace.textDocuments {\n const services = servicesProvider();\n return services.workspace.textDocuments as any;\n },\n get onDidOpenTextDocument(): typeof vscode.workspace.onDidOpenTextDocument {\n const services = servicesProvider();\n return services.workspace.onDidOpenTextDocument as any;\n },\n get onDidCloseTextDocument(): typeof vscode.workspace.onDidCloseTextDocument {\n const services = servicesProvider();\n return services.workspace.onDidCloseTextDocument as any;\n },\n get onDidChangeTextDocument(): typeof vscode.workspace.onDidChangeTextDocument {\n const services = servicesProvider();\n return (listener: (e: vscode.TextDocumentChangeEvent) => any, thisArgs?: any, disposables?: Disposable[]): Disposable => {\n return services.workspace.onDidChangeTextDocument(({ textDocument, contentChanges }) => {\n const l: (e: vscode.TextDocumentChangeEvent) => any = listener.bind(thisArgs);\n l({\n document: textDocument,\n contentChanges: contentChanges\n });\n }, undefined, disposables);\n }\n },\n get onWillSaveTextDocument(): typeof vscode.workspace.onWillSaveTextDocument {\n const services = servicesProvider();\n const onWillSaveTextDocument = services.workspace.onWillSaveTextDocument;\n if (!onWillSaveTextDocument) {\n return Event.None;\n }\n return (listener: (e: vscode.TextDocumentWillSaveEvent) => any, thisArgs?: any, disposables?: Disposable[]): Disposable => {\n return onWillSaveTextDocument(({ textDocument, reason, waitUntil }) => {\n const l: (e: vscode.TextDocumentWillSaveEvent) => any = listener.bind(thisArgs);\n l({\n document: textDocument,\n reason: reason,\n waitUntil: (edits: Thenable) => {\n if (waitUntil) {\n waitUntil(edits);\n }\n }\n });\n }, undefined, disposables);\n }\n },\n get onDidSaveTextDocument(): typeof vscode.workspace.onDidSaveTextDocument {\n const services = servicesProvider();\n return (services.workspace.onDidSaveTextDocument as any) || Event.None;\n },\n onDidChangeWorkspaceFolders: Event.None,\n getWorkspaceFolder: unsupported,\n asRelativePath: unsupported,\n updateWorkspaceFolders: unsupported,\n findFiles: unsupported,\n saveAll: unsupported,\n openTextDocument: unsupported,\n registerTextDocumentContentProvider: unsupported,\n registerTaskProvider: unsupported,\n registerFileSystemProvider: unsupported,\n rootPath: undefined,\n name: undefined\n };\n const languages: typeof vscode.languages = {\n match(selector, document): number {\n if (!isDocumentSelector(selector)) {\n throw new Error('unexpected selector: ' + JSON.stringify(selector));\n }\n if (!DocumentIdentifier.is(document)) {\n throw new Error('unexpected document: ' + JSON.stringify(document));\n }\n const services = servicesProvider();\n const result = services.languages.match(selector, document);\n return result ? 1 : 0;\n },\n createDiagnosticCollection(name?: string): vscode.DiagnosticCollection {\n const services = servicesProvider();\n const collection = services.languages.createDiagnosticCollection ?\n services.languages.createDiagnosticCollection(name) : undefined;\n return {\n name: name || 'default',\n set(arg0: vscode.Uri | [vscode.Uri, vscode.Diagnostic[] | undefined][], arg1?: vscode.Diagnostic[] | undefined): void {\n if (collection) {\n if (arg1) {\n collection.set(arg0.toString(), arg1 as Diagnostic[]);\n } else {\n collection.set(arg0.toString(), []);\n }\n }\n },\n dispose(): void {\n if (collection) {\n collection.dispose();\n }\n },\n delete: unsupported,\n clear: unsupported,\n forEach: unsupported,\n get: unsupported,\n has: unsupported\n }\n },\n registerCompletionItemProvider(selector, provider, ...triggerCharacters) {\n if (!isDocumentSelector(selector)) {\n throw new Error('unexpected selector: ' + JSON.stringify(selector));\n }\n const { languages } = servicesProvider();\n if (!languages.registerCompletionItemProvider) {\n return Disposable.create(() => { });\n }\n const resolveCompletionItem = provider.resolveCompletionItem;\n return languages.registerCompletionItemProvider(selector, {\n provideCompletionItems({ textDocument, position, context }, token) {\n return provider.provideCompletionItems(textDocument, position, token, context || {\n triggerKind: CompletionTriggerKind.Invoked\n }) as any;\n },\n resolveCompletionItem: resolveCompletionItem ? (item, token) => {\n return resolveCompletionItem(item as any, token) as any;\n } : undefined\n }, ...triggerCharacters);\n },\n registerCodeActionsProvider(selector, provider) {\n if (!isDocumentSelector(selector)) {\n throw new Error('unexpected selector: ' + JSON.stringify(selector));\n }\n const { languages } = servicesProvider();\n if (!languages.registerCodeActionsProvider) {\n return Disposable.create(() => { });\n }\n return languages.registerCodeActionsProvider(selector, {\n provideCodeActions({ textDocument, range, context }, token) {\n return provider.provideCodeActions(textDocument, range, context, token) as any;\n }\n });\n },\n registerCodeLensProvider(selector, provider) {\n if (!isDocumentSelector(selector)) {\n throw new Error('unexpected selector: ' + JSON.stringify(selector));\n }\n const { languages } = servicesProvider();\n if (!languages.registerCodeLensProvider) {\n return Disposable.create(() => { });\n }\n const resolveCodeLens = provider.resolveCodeLens;\n return languages.registerCodeLensProvider(selector, {\n provideCodeLenses({ textDocument }, token) {\n return provider.provideCodeLenses(textDocument, token) as any;\n },\n resolveCodeLens: resolveCodeLens ? (codeLens, token) => {\n return resolveCodeLens(codeLens, token) as any;\n } : undefined\n });\n },\n registerDefinitionProvider(selector, provider) {\n if (!isDocumentSelector(selector)) {\n throw new Error('unexpected selector: ' + JSON.stringify(selector));\n }\n const { languages } = servicesProvider();\n if (!languages.registerDefinitionProvider) {\n return Disposable.create(() => { });\n }\n return languages.registerDefinitionProvider(selector, {\n provideDefinition({ textDocument, position }, token) {\n return provider.provideDefinition(textDocument, position, token) as any;\n }\n });\n },\n registerImplementationProvider(selector, provider) {\n if (!isDocumentSelector(selector)) {\n throw new Error('unexpected selector: ' + JSON.stringify(selector));\n }\n const { languages } = servicesProvider();\n if (!languages.registerImplementationProvider) {\n return Disposable.create(() => { });\n }\n return languages.registerImplementationProvider(selector, {\n provideImplementation({ textDocument, position }, token) {\n return provider.provideImplementation(textDocument, position, token) as any;\n }\n });\n },\n registerTypeDefinitionProvider(selector, provider) {\n if (!isDocumentSelector(selector)) {\n throw new Error('unexpected selector: ' + JSON.stringify(selector));\n }\n const { languages } = servicesProvider();\n if (!languages.registerTypeDefinitionProvider) {\n return Disposable.create(() => { });\n }\n return languages.registerTypeDefinitionProvider(selector, {\n provideTypeDefinition({ textDocument, position }, token) {\n return provider.provideTypeDefinition(textDocument, position, token) as any;\n }\n });\n },\n registerHoverProvider(selector, provider) {\n if (!isDocumentSelector(selector)) {\n throw new Error('unexpected selector: ' + JSON.stringify(selector));\n }\n const { languages } = servicesProvider();\n if (languages.registerHoverProvider) {\n return languages.registerHoverProvider(selector, {\n provideHover({ textDocument, position }, token) {\n return provider.provideHover(textDocument, position, token) as any;\n }\n });\n }\n return Disposable.create(() => { });\n },\n registerDocumentHighlightProvider(selector, provider) {\n if (!isDocumentSelector(selector)) {\n throw new Error('unexpected selector: ' + JSON.stringify(selector));\n }\n const { languages } = servicesProvider();\n if (!languages.registerDocumentHighlightProvider) {\n return Disposable.create(() => { });\n }\n return languages.registerDocumentHighlightProvider(selector, {\n provideDocumentHighlights({ textDocument, position }, token) {\n return provider.provideDocumentHighlights(textDocument, position, token) as any;\n }\n });\n },\n registerDocumentSymbolProvider(selector, provider) {\n if (!isDocumentSelector(selector)) {\n throw new Error('unexpected selector: ' + JSON.stringify(selector));\n }\n const { languages } = servicesProvider();\n if (!languages.registerDocumentSymbolProvider) {\n return Disposable.create(() => { });\n }\n return languages.registerDocumentSymbolProvider(selector, {\n provideDocumentSymbols({ textDocument }, token) {\n return provider.provideDocumentSymbols(textDocument, token) as any;\n }\n });\n },\n registerWorkspaceSymbolProvider(provider) {\n const { languages } = servicesProvider();\n if (!languages.registerWorkspaceSymbolProvider) {\n return Disposable.create(() => { });\n }\n return languages.registerWorkspaceSymbolProvider({\n provideWorkspaceSymbols({ query }, token) {\n return provider.provideWorkspaceSymbols(query, token) as any;\n }\n });\n },\n registerReferenceProvider(selector, provider) {\n if (!isDocumentSelector(selector)) {\n throw new Error('unexpected selector: ' + JSON.stringify(selector));\n }\n const { languages } = servicesProvider();\n if (!languages.registerReferenceProvider) {\n return Disposable.create(() => { });\n }\n return languages.registerReferenceProvider(selector, {\n provideReferences({ textDocument, position, context }, token) {\n return provider.provideReferences(textDocument, position, context, token) as any\n }\n });\n },\n registerRenameProvider(selector, provider) {\n if (!isDocumentSelector(selector)) {\n throw new Error('unexpected selector: ' + JSON.stringify(selector));\n }\n const { languages } = servicesProvider();\n if (!languages.registerRenameProvider) {\n return Disposable.create(() => { });\n }\n return languages.registerRenameProvider(selector, {\n provideRenameEdits({ textDocument, position, newName }, token) {\n return provider.provideRenameEdits(textDocument, position, newName, token) as any\n }\n });\n },\n registerDocumentFormattingEditProvider(selector, provider) {\n if (!isDocumentSelector(selector)) {\n throw new Error('unexpected selector: ' + JSON.stringify(selector));\n }\n const { languages } = servicesProvider();\n if (!languages.registerDocumentFormattingEditProvider) {\n return Disposable.create(() => { });\n }\n return languages.registerDocumentFormattingEditProvider(selector, {\n provideDocumentFormattingEdits({ textDocument, options }, token) {\n return provider.provideDocumentFormattingEdits(textDocument, options, token) as any\n }\n });\n },\n registerDocumentRangeFormattingEditProvider(selector, provider) {\n if (!isDocumentSelector(selector)) {\n throw new Error('unexpected selector: ' + JSON.stringify(selector));\n }\n const { languages } = servicesProvider();\n if (!languages.registerDocumentRangeFormattingEditProvider) {\n return Disposable.create(() => { });\n }\n return languages.registerDocumentRangeFormattingEditProvider(selector, {\n provideDocumentRangeFormattingEdits({ textDocument, range, options }, token) {\n return provider.provideDocumentRangeFormattingEdits(textDocument, range, options, token) as any\n }\n });\n },\n registerOnTypeFormattingEditProvider(selector, provider, firstTriggerCharacter, ...moreTriggerCharacter) {\n if (!isDocumentSelector(selector)) {\n throw new Error('unexpected selector: ' + JSON.stringify(selector));\n }\n const { languages } = servicesProvider();\n if (!languages.registerOnTypeFormattingEditProvider) {\n return Disposable.create(() => { });\n }\n return languages.registerOnTypeFormattingEditProvider(selector, {\n provideOnTypeFormattingEdits({ textDocument, position, ch, options }, token) {\n return provider.provideOnTypeFormattingEdits(textDocument, position, ch, options, token) as any\n }\n }, firstTriggerCharacter, ...moreTriggerCharacter);\n },\n registerSignatureHelpProvider(selector, provider, ...triggerCharacter) {\n if (!isDocumentSelector(selector)) {\n throw new Error('unexpected selector: ' + JSON.stringify(selector));\n }\n const { languages } = servicesProvider();\n if (!languages.registerSignatureHelpProvider) {\n return Disposable.create(() => { });\n }\n return languages.registerSignatureHelpProvider(selector, {\n provideSignatureHelp({ textDocument, position }, token) {\n return provider.provideSignatureHelp(textDocument, position, token) as any\n }\n }, ...triggerCharacter);\n },\n registerDocumentLinkProvider(selector, provider) {\n if (!isDocumentSelector(selector)) {\n throw new Error('unexpected selector: ' + JSON.stringify(selector));\n }\n const { languages } = servicesProvider();\n if (!languages.registerDocumentLinkProvider) {\n return Disposable.create(() => { });\n }\n const resolveDocumentLink = provider.resolveDocumentLink;\n return languages.registerDocumentLinkProvider(selector, {\n provideDocumentLinks({ textDocument }, token) {\n return provider.provideDocumentLinks(textDocument, token) as any\n },\n resolveDocumentLink: resolveDocumentLink ? (link, token) => {\n return resolveDocumentLink(link, token) as any\n } : undefined\n });\n },\n registerColorProvider(selector, provider) {\n if (!isDocumentSelector(selector)) {\n throw new Error('unexpected selector: ' + JSON.stringify(selector));\n }\n const { languages } = servicesProvider();\n if (!languages.registerColorProvider) {\n return Disposable.create(() => { });\n }\n return languages.registerColorProvider(selector, {\n provideDocumentColors({ textDocument }, token) {\n return provider.provideDocumentColors(textDocument, token) as any\n },\n provideColorPresentations({ textDocument, color, range }, token) {\n return provider.provideColorPresentations(color, {\n document: textDocument,\n range: range\n }, token) as any\n }\n });\n },\n registerFoldingRangeProvider(selector, provider) {\n if (!isDocumentSelector(selector)) {\n throw new Error('unexpected selector: ' + JSON.stringify(selector));\n }\n const { languages } = servicesProvider();\n if (!languages.registerFoldingRangeProvider) {\n return Disposable.create(() => { });\n }\n return languages.registerFoldingRangeProvider(selector, {\n provideFoldingRanges({ textDocument }, token) {\n return provider.provideFoldingRanges(textDocument, {}, token) as any;\n }\n });\n },\n getLanguages: unsupported,\n getDiagnostics: unsupported,\n setLanguageConfiguration: unsupported,\n onDidChangeDiagnostics: unsupported\n };\n function showMessage(type: MessageType, arg0: any, arg1: any): Thenable {\n if (typeof arg0 !== \"string\") {\n throw new Error('unexpected message: ' + JSON.stringify(arg0));\n }\n const message = arg0;\n if (arg1 !== undefined && !Array.isArray(arg1)) {\n throw new Error('unexpected actions: ' + JSON.stringify(arg1));\n }\n const actions = arg1 || [];\n const { window } = servicesProvider();\n if (!window) {\n return Promise.resolve(undefined);\n }\n return window.showMessage(type, message, ...actions);\n }\n const window: typeof vscode.window = {\n showInformationMessage: showMessage.bind(undefined, MessageType.Info),\n showWarningMessage: showMessage.bind(undefined, MessageType.Warning),\n showErrorMessage: showMessage.bind(undefined, MessageType.Error),\n createOutputChannel(name: string): vscode.OutputChannel {\n const { window } = servicesProvider();\n const createOutputChannel = window ? window.createOutputChannel : undefined;\n const channel: OutputChannel = createOutputChannel ? createOutputChannel.bind(window)(name) : undefined;\n return {\n name,\n append: channel.append.bind(channel),\n appendLine: channel.appendLine.bind(channel),\n clear: unsupported,\n show: channel.show.bind(channel),\n hide: unsupported,\n dispose: channel.dispose.bind(channel)\n }\n },\n showTextDocument: unsupported,\n createTextEditorDecorationType: unsupported,\n showQuickPick: unsupported,\n showWorkspaceFolderPick: unsupported,\n showOpenDialog: unsupported,\n showSaveDialog: unsupported,\n showInputBox: unsupported,\n createWebviewPanel: unsupported,\n setStatusBarMessage: unsupported,\n withScmProgress: unsupported,\n withProgress: unsupported,\n createStatusBarItem: unsupported,\n createTerminal: unsupported,\n registerTreeDataProvider: unsupported,\n createTreeView: unsupported,\n registerWebviewPanelSerializer: unsupported,\n get activeTextEditor() {\n return unsupported();\n },\n get visibleTextEditors() {\n return unsupported();\n },\n onDidChangeActiveTextEditor: unsupported,\n onDidChangeVisibleTextEditors: unsupported,\n onDidChangeTextEditorSelection: unsupported,\n onDidChangeTextEditorVisibleRanges: unsupported,\n onDidChangeTextEditorOptions: unsupported,\n onDidChangeTextEditorViewColumn: unsupported,\n onDidCloseTerminal: unsupported,\n get state() {\n return unsupported();\n },\n onDidChangeWindowState: unsupported\n };\n const commands: typeof vscode.commands = {\n registerCommand(command, callback, thisArg): Disposable {\n const { commands } = servicesProvider();\n if (!commands) {\n return Disposable.create(() => { });\n }\n return commands.registerCommand(command, callback, thisArg);\n },\n registerTextEditorCommand: unsupported,\n executeCommand: unsupported,\n getCommands: unsupported\n };\n class CodeDisposable implements vscode.Disposable {\n constructor(public callOnDispose: Function) { }\n dispose() {\n this.callOnDispose();\n }\n }\n return {\n workspace,\n languages,\n window,\n commands,\n Uri,\n CompletionItem,\n CodeLens,\n DocumentLink,\n CodeActionKind,\n Disposable: CodeDisposable\n } as any;\n}\n","/* --------------------------------------------------------------------------------------------\n * Copyright (c) 2018 TypeFox GmbH (http://www.typefox.io). All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n * ------------------------------------------------------------------------------------------ */\nimport { createVSCodeApi } from \"./vscode-api\";\nimport { Services } from \"./services\";\n\nexport = createVSCodeApi(Services.get);","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n'use strict';\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar events_1 = require(\"./events\");\r\nvar Is = require(\"./is\");\r\nvar CancellationToken;\r\n(function (CancellationToken) {\r\n CancellationToken.None = Object.freeze({\r\n isCancellationRequested: false,\r\n onCancellationRequested: events_1.Event.None\r\n });\r\n CancellationToken.Cancelled = Object.freeze({\r\n isCancellationRequested: true,\r\n onCancellationRequested: events_1.Event.None\r\n });\r\n function is(value) {\r\n var candidate = value;\r\n return candidate && (candidate === CancellationToken.None\r\n || candidate === CancellationToken.Cancelled\r\n || (Is.boolean(candidate.isCancellationRequested) && !!candidate.onCancellationRequested));\r\n }\r\n CancellationToken.is = is;\r\n})(CancellationToken = exports.CancellationToken || (exports.CancellationToken = {}));\r\nvar shortcutEvent = Object.freeze(function (callback, context) {\r\n var handle = setTimeout(callback.bind(context), 0);\r\n return { dispose: function () { clearTimeout(handle); } };\r\n});\r\nvar MutableToken = /** @class */ (function () {\r\n function MutableToken() {\r\n this._isCancelled = false;\r\n }\r\n MutableToken.prototype.cancel = function () {\r\n if (!this._isCancelled) {\r\n this._isCancelled = true;\r\n if (this._emitter) {\r\n this._emitter.fire(undefined);\r\n this._emitter = undefined;\r\n }\r\n }\r\n };\r\n Object.defineProperty(MutableToken.prototype, \"isCancellationRequested\", {\r\n get: function () {\r\n return this._isCancelled;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(MutableToken.prototype, \"onCancellationRequested\", {\r\n get: function () {\r\n if (this._isCancelled) {\r\n return shortcutEvent;\r\n }\r\n if (!this._emitter) {\r\n this._emitter = new events_1.Emitter();\r\n }\r\n return this._emitter.event;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n return MutableToken;\r\n}());\r\nvar CancellationTokenSource = /** @class */ (function () {\r\n function CancellationTokenSource() {\r\n }\r\n Object.defineProperty(CancellationTokenSource.prototype, \"token\", {\r\n get: function () {\r\n if (!this._token) {\r\n // be lazy and create the token only when\r\n // actually needed\r\n this._token = new MutableToken();\r\n }\r\n return this._token;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n CancellationTokenSource.prototype.cancel = function () {\r\n if (!this._token) {\r\n // save an object by returning the default\r\n // cancelled token when cancellation happens\r\n // before someone asks for the token\r\n this._token = CancellationToken.Cancelled;\r\n }\r\n else {\r\n this._token.cancel();\r\n }\r\n };\r\n CancellationTokenSource.prototype.dispose = function () {\r\n this.cancel();\r\n };\r\n return CancellationTokenSource;\r\n}());\r\nexports.CancellationTokenSource = CancellationTokenSource;\r\n","/* --------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n * ------------------------------------------------------------------------------------------ */\r\n'use strict';\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar Disposable;\r\n(function (Disposable) {\r\n function create(func) {\r\n return {\r\n dispose: func\r\n };\r\n }\r\n Disposable.create = create;\r\n})(Disposable = exports.Disposable || (exports.Disposable = {}));\r\nvar Event;\r\n(function (Event) {\r\n var _disposable = { dispose: function () { } };\r\n Event.None = function () { return _disposable; };\r\n})(Event = exports.Event || (exports.Event = {}));\r\nvar CallbackList = /** @class */ (function () {\r\n function CallbackList() {\r\n }\r\n CallbackList.prototype.add = function (callback, context, bucket) {\r\n var _this = this;\r\n if (context === void 0) { context = null; }\r\n if (!this._callbacks) {\r\n this._callbacks = [];\r\n this._contexts = [];\r\n }\r\n this._callbacks.push(callback);\r\n this._contexts.push(context);\r\n if (Array.isArray(bucket)) {\r\n bucket.push({ dispose: function () { return _this.remove(callback, context); } });\r\n }\r\n };\r\n CallbackList.prototype.remove = function (callback, context) {\r\n if (context === void 0) { context = null; }\r\n if (!this._callbacks) {\r\n return;\r\n }\r\n var foundCallbackWithDifferentContext = false;\r\n for (var i = 0, len = this._callbacks.length; i < len; i++) {\r\n if (this._callbacks[i] === callback) {\r\n if (this._contexts[i] === context) {\r\n // callback & context match => remove it\r\n this._callbacks.splice(i, 1);\r\n this._contexts.splice(i, 1);\r\n return;\r\n }\r\n else {\r\n foundCallbackWithDifferentContext = true;\r\n }\r\n }\r\n }\r\n if (foundCallbackWithDifferentContext) {\r\n throw new Error('When adding a listener with a context, you should remove it with the same context');\r\n }\r\n };\r\n CallbackList.prototype.invoke = function () {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n if (!this._callbacks) {\r\n return [];\r\n }\r\n var ret = [], callbacks = this._callbacks.slice(0), contexts = this._contexts.slice(0);\r\n for (var i = 0, len = callbacks.length; i < len; i++) {\r\n try {\r\n ret.push(callbacks[i].apply(contexts[i], args));\r\n }\r\n catch (e) {\r\n console.error(e);\r\n }\r\n }\r\n return ret;\r\n };\r\n CallbackList.prototype.isEmpty = function () {\r\n return !this._callbacks || this._callbacks.length === 0;\r\n };\r\n CallbackList.prototype.dispose = function () {\r\n this._callbacks = undefined;\r\n this._contexts = undefined;\r\n };\r\n return CallbackList;\r\n}());\r\nvar Emitter = /** @class */ (function () {\r\n function Emitter(_options) {\r\n this._options = _options;\r\n }\r\n Object.defineProperty(Emitter.prototype, \"event\", {\r\n /**\r\n * For the public to allow to subscribe\r\n * to events from this Emitter\r\n */\r\n get: function () {\r\n var _this = this;\r\n if (!this._event) {\r\n this._event = function (listener, thisArgs, disposables) {\r\n if (!_this._callbacks) {\r\n _this._callbacks = new CallbackList();\r\n }\r\n if (_this._options && _this._options.onFirstListenerAdd && _this._callbacks.isEmpty()) {\r\n _this._options.onFirstListenerAdd(_this);\r\n }\r\n _this._callbacks.add(listener, thisArgs);\r\n var result;\r\n result = {\r\n dispose: function () {\r\n _this._callbacks.remove(listener, thisArgs);\r\n result.dispose = Emitter._noop;\r\n if (_this._options && _this._options.onLastListenerRemove && _this._callbacks.isEmpty()) {\r\n _this._options.onLastListenerRemove(_this);\r\n }\r\n }\r\n };\r\n if (Array.isArray(disposables)) {\r\n disposables.push(result);\r\n }\r\n return result;\r\n };\r\n }\r\n return this._event;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * To be kept private to fire an event to\r\n * subscribers\r\n */\r\n Emitter.prototype.fire = function (event) {\r\n if (this._callbacks) {\r\n this._callbacks.invoke.call(this._callbacks, event);\r\n }\r\n };\r\n Emitter.prototype.dispose = function () {\r\n if (this._callbacks) {\r\n this._callbacks.dispose();\r\n this._callbacks = undefined;\r\n }\r\n };\r\n Emitter._noop = function () { };\r\n return Emitter;\r\n}());\r\nexports.Emitter = Emitter;\r\n","/* --------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n * ------------------------------------------------------------------------------------------ */\r\n'use strict';\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar toString = Object.prototype.toString;\r\nfunction boolean(value) {\r\n return value === true || value === false;\r\n}\r\nexports.boolean = boolean;\r\nfunction string(value) {\r\n return toString.call(value) === '[object String]';\r\n}\r\nexports.string = string;\r\nfunction number(value) {\r\n return toString.call(value) === '[object Number]';\r\n}\r\nexports.number = number;\r\nfunction error(value) {\r\n return toString.call(value) === '[object Error]';\r\n}\r\nexports.error = error;\r\nfunction func(value) {\r\n return toString.call(value) === '[object Function]';\r\n}\r\nexports.func = func;\r\nfunction array(value) {\r\n return Array.isArray(value);\r\n}\r\nexports.array = array;\r\nfunction stringArray(value) {\r\n return array(value) && value.every(function (elem) { return string(elem); });\r\n}\r\nexports.stringArray = stringArray;\r\n","\"use strict\";\r\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar Touch;\r\n(function (Touch) {\r\n Touch.None = 0;\r\n Touch.First = 1;\r\n Touch.Last = 2;\r\n})(Touch = exports.Touch || (exports.Touch = {}));\r\nvar LinkedMap = /** @class */ (function () {\r\n function LinkedMap() {\r\n this._map = new Map();\r\n this._head = undefined;\r\n this._tail = undefined;\r\n this._size = 0;\r\n }\r\n LinkedMap.prototype.clear = function () {\r\n this._map.clear();\r\n this._head = undefined;\r\n this._tail = undefined;\r\n this._size = 0;\r\n };\r\n LinkedMap.prototype.isEmpty = function () {\r\n return !this._head && !this._tail;\r\n };\r\n Object.defineProperty(LinkedMap.prototype, \"size\", {\r\n get: function () {\r\n return this._size;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n LinkedMap.prototype.has = function (key) {\r\n return this._map.has(key);\r\n };\r\n LinkedMap.prototype.get = function (key) {\r\n var item = this._map.get(key);\r\n if (!item) {\r\n return undefined;\r\n }\r\n return item.value;\r\n };\r\n LinkedMap.prototype.set = function (key, value, touch) {\r\n if (touch === void 0) { touch = Touch.None; }\r\n var item = this._map.get(key);\r\n if (item) {\r\n item.value = value;\r\n if (touch !== Touch.None) {\r\n this.touch(item, touch);\r\n }\r\n }\r\n else {\r\n item = { key: key, value: value, next: undefined, previous: undefined };\r\n switch (touch) {\r\n case Touch.None:\r\n this.addItemLast(item);\r\n break;\r\n case Touch.First:\r\n this.addItemFirst(item);\r\n break;\r\n case Touch.Last:\r\n this.addItemLast(item);\r\n break;\r\n default:\r\n this.addItemLast(item);\r\n break;\r\n }\r\n this._map.set(key, item);\r\n this._size++;\r\n }\r\n };\r\n LinkedMap.prototype.delete = function (key) {\r\n var item = this._map.get(key);\r\n if (!item) {\r\n return false;\r\n }\r\n this._map.delete(key);\r\n this.removeItem(item);\r\n this._size--;\r\n return true;\r\n };\r\n LinkedMap.prototype.shift = function () {\r\n if (!this._head && !this._tail) {\r\n return undefined;\r\n }\r\n if (!this._head || !this._tail) {\r\n throw new Error('Invalid list');\r\n }\r\n var item = this._head;\r\n this._map.delete(item.key);\r\n this.removeItem(item);\r\n this._size--;\r\n return item.value;\r\n };\r\n LinkedMap.prototype.forEach = function (callbackfn, thisArg) {\r\n var current = this._head;\r\n while (current) {\r\n if (thisArg) {\r\n callbackfn.bind(thisArg)(current.value, current.key, this);\r\n }\r\n else {\r\n callbackfn(current.value, current.key, this);\r\n }\r\n current = current.next;\r\n }\r\n };\r\n LinkedMap.prototype.forEachReverse = function (callbackfn, thisArg) {\r\n var current = this._tail;\r\n while (current) {\r\n if (thisArg) {\r\n callbackfn.bind(thisArg)(current.value, current.key, this);\r\n }\r\n else {\r\n callbackfn(current.value, current.key, this);\r\n }\r\n current = current.previous;\r\n }\r\n };\r\n LinkedMap.prototype.values = function () {\r\n var result = [];\r\n var current = this._head;\r\n while (current) {\r\n result.push(current.value);\r\n current = current.next;\r\n }\r\n return result;\r\n };\r\n LinkedMap.prototype.keys = function () {\r\n var result = [];\r\n var current = this._head;\r\n while (current) {\r\n result.push(current.key);\r\n current = current.next;\r\n }\r\n return result;\r\n };\r\n /* JSON RPC run on es5 which has no Symbol.iterator\r\n public keys(): IterableIterator {\r\n let current = this._head;\r\n let iterator: IterableIterator = {\r\n [Symbol.iterator]() {\r\n return iterator;\r\n },\r\n next():IteratorResult {\r\n if (current) {\r\n let result = { value: current.key, done: false };\r\n current = current.next;\r\n return result;\r\n } else {\r\n return { value: undefined, done: true };\r\n }\r\n }\r\n };\r\n return iterator;\r\n }\r\n\r\n public values(): IterableIterator {\r\n let current = this._head;\r\n let iterator: IterableIterator = {\r\n [Symbol.iterator]() {\r\n return iterator;\r\n },\r\n next():IteratorResult {\r\n if (current) {\r\n let result = { value: current.value, done: false };\r\n current = current.next;\r\n return result;\r\n } else {\r\n return { value: undefined, done: true };\r\n }\r\n }\r\n };\r\n return iterator;\r\n }\r\n */\r\n LinkedMap.prototype.addItemFirst = function (item) {\r\n // First time Insert\r\n if (!this._head && !this._tail) {\r\n this._tail = item;\r\n }\r\n else if (!this._head) {\r\n throw new Error('Invalid list');\r\n }\r\n else {\r\n item.next = this._head;\r\n this._head.previous = item;\r\n }\r\n this._head = item;\r\n };\r\n LinkedMap.prototype.addItemLast = function (item) {\r\n // First time Insert\r\n if (!this._head && !this._tail) {\r\n this._head = item;\r\n }\r\n else if (!this._tail) {\r\n throw new Error('Invalid list');\r\n }\r\n else {\r\n item.previous = this._tail;\r\n this._tail.next = item;\r\n }\r\n this._tail = item;\r\n };\r\n LinkedMap.prototype.removeItem = function (item) {\r\n if (item === this._head && item === this._tail) {\r\n this._head = undefined;\r\n this._tail = undefined;\r\n }\r\n else if (item === this._head) {\r\n this._head = item.next;\r\n }\r\n else if (item === this._tail) {\r\n this._tail = item.previous;\r\n }\r\n else {\r\n var next = item.next;\r\n var previous = item.previous;\r\n if (!next || !previous) {\r\n throw new Error('Invalid list');\r\n }\r\n next.previous = previous;\r\n previous.next = next;\r\n }\r\n };\r\n LinkedMap.prototype.touch = function (item, touch) {\r\n if (!this._head || !this._tail) {\r\n throw new Error('Invalid list');\r\n }\r\n if ((touch !== Touch.First && touch !== Touch.Last)) {\r\n return;\r\n }\r\n if (touch === Touch.First) {\r\n if (item === this._head) {\r\n return;\r\n }\r\n var next = item.next;\r\n var previous = item.previous;\r\n // Unlink the item\r\n if (item === this._tail) {\r\n // previous must be defined since item was not head but is tail\r\n // So there are more than on item in the map\r\n previous.next = undefined;\r\n this._tail = previous;\r\n }\r\n else {\r\n // Both next and previous are not undefined since item was neither head nor tail.\r\n next.previous = previous;\r\n previous.next = next;\r\n }\r\n // Insert the node at head\r\n item.previous = undefined;\r\n item.next = this._head;\r\n this._head.previous = item;\r\n this._head = item;\r\n }\r\n else if (touch === Touch.Last) {\r\n if (item === this._tail) {\r\n return;\r\n }\r\n var next = item.next;\r\n var previous = item.previous;\r\n // Unlink the item.\r\n if (item === this._head) {\r\n // next must be defined since item was not tail but is head\r\n // So there are more than on item in the map\r\n next.previous = undefined;\r\n this._head = next;\r\n }\r\n else {\r\n // Both next and previous are not undefined since item was neither head nor tail.\r\n next.previous = previous;\r\n previous.next = next;\r\n }\r\n item.next = undefined;\r\n item.previous = this._tail;\r\n this._tail.next = item;\r\n this._tail = item;\r\n }\r\n };\r\n return LinkedMap;\r\n}());\r\nexports.LinkedMap = LinkedMap;\r\n","/* --------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n * ------------------------------------------------------------------------------------------ */\r\n/// \r\n'use strict';\r\nvar __extends = (this && this.__extends) || (function () {\r\n var extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return function (d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\nfunction __export(m) {\r\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar Is = require(\"./is\");\r\nvar messages_1 = require(\"./messages\");\r\nexports.RequestType = messages_1.RequestType;\r\nexports.RequestType0 = messages_1.RequestType0;\r\nexports.RequestType1 = messages_1.RequestType1;\r\nexports.RequestType2 = messages_1.RequestType2;\r\nexports.RequestType3 = messages_1.RequestType3;\r\nexports.RequestType4 = messages_1.RequestType4;\r\nexports.RequestType5 = messages_1.RequestType5;\r\nexports.RequestType6 = messages_1.RequestType6;\r\nexports.RequestType7 = messages_1.RequestType7;\r\nexports.RequestType8 = messages_1.RequestType8;\r\nexports.RequestType9 = messages_1.RequestType9;\r\nexports.ResponseError = messages_1.ResponseError;\r\nexports.ErrorCodes = messages_1.ErrorCodes;\r\nexports.NotificationType = messages_1.NotificationType;\r\nexports.NotificationType0 = messages_1.NotificationType0;\r\nexports.NotificationType1 = messages_1.NotificationType1;\r\nexports.NotificationType2 = messages_1.NotificationType2;\r\nexports.NotificationType3 = messages_1.NotificationType3;\r\nexports.NotificationType4 = messages_1.NotificationType4;\r\nexports.NotificationType5 = messages_1.NotificationType5;\r\nexports.NotificationType6 = messages_1.NotificationType6;\r\nexports.NotificationType7 = messages_1.NotificationType7;\r\nexports.NotificationType8 = messages_1.NotificationType8;\r\nexports.NotificationType9 = messages_1.NotificationType9;\r\nvar messageReader_1 = require(\"./messageReader\");\r\nexports.MessageReader = messageReader_1.MessageReader;\r\nexports.StreamMessageReader = messageReader_1.StreamMessageReader;\r\nexports.IPCMessageReader = messageReader_1.IPCMessageReader;\r\nexports.SocketMessageReader = messageReader_1.SocketMessageReader;\r\nvar messageWriter_1 = require(\"./messageWriter\");\r\nexports.MessageWriter = messageWriter_1.MessageWriter;\r\nexports.StreamMessageWriter = messageWriter_1.StreamMessageWriter;\r\nexports.IPCMessageWriter = messageWriter_1.IPCMessageWriter;\r\nexports.SocketMessageWriter = messageWriter_1.SocketMessageWriter;\r\nvar events_1 = require(\"./events\");\r\nexports.Disposable = events_1.Disposable;\r\nexports.Event = events_1.Event;\r\nexports.Emitter = events_1.Emitter;\r\nvar cancellation_1 = require(\"./cancellation\");\r\nexports.CancellationTokenSource = cancellation_1.CancellationTokenSource;\r\nexports.CancellationToken = cancellation_1.CancellationToken;\r\nvar linkedMap_1 = require(\"./linkedMap\");\r\n__export(require(\"./pipeSupport\"));\r\n__export(require(\"./socketSupport\"));\r\nvar CancelNotification;\r\n(function (CancelNotification) {\r\n CancelNotification.type = new messages_1.NotificationType('$/cancelRequest');\r\n})(CancelNotification || (CancelNotification = {}));\r\nexports.NullLogger = Object.freeze({\r\n error: function () { },\r\n warn: function () { },\r\n info: function () { },\r\n log: function () { }\r\n});\r\nvar Trace;\r\n(function (Trace) {\r\n Trace[Trace[\"Off\"] = 0] = \"Off\";\r\n Trace[Trace[\"Messages\"] = 1] = \"Messages\";\r\n Trace[Trace[\"Verbose\"] = 2] = \"Verbose\";\r\n})(Trace = exports.Trace || (exports.Trace = {}));\r\n(function (Trace) {\r\n function fromString(value) {\r\n value = value.toLowerCase();\r\n switch (value) {\r\n case 'off':\r\n return Trace.Off;\r\n case 'messages':\r\n return Trace.Messages;\r\n case 'verbose':\r\n return Trace.Verbose;\r\n default:\r\n return Trace.Off;\r\n }\r\n }\r\n Trace.fromString = fromString;\r\n function toString(value) {\r\n switch (value) {\r\n case Trace.Off:\r\n return 'off';\r\n case Trace.Messages:\r\n return 'messages';\r\n case Trace.Verbose:\r\n return 'verbose';\r\n default:\r\n return 'off';\r\n }\r\n }\r\n Trace.toString = toString;\r\n})(Trace = exports.Trace || (exports.Trace = {}));\r\nvar SetTraceNotification;\r\n(function (SetTraceNotification) {\r\n SetTraceNotification.type = new messages_1.NotificationType('$/setTraceNotification');\r\n})(SetTraceNotification = exports.SetTraceNotification || (exports.SetTraceNotification = {}));\r\nvar LogTraceNotification;\r\n(function (LogTraceNotification) {\r\n LogTraceNotification.type = new messages_1.NotificationType('$/logTraceNotification');\r\n})(LogTraceNotification = exports.LogTraceNotification || (exports.LogTraceNotification = {}));\r\nvar ConnectionErrors;\r\n(function (ConnectionErrors) {\r\n /**\r\n * The connection is closed.\r\n */\r\n ConnectionErrors[ConnectionErrors[\"Closed\"] = 1] = \"Closed\";\r\n /**\r\n * The connection got disposed.\r\n */\r\n ConnectionErrors[ConnectionErrors[\"Disposed\"] = 2] = \"Disposed\";\r\n /**\r\n * The connection is already in listening mode.\r\n */\r\n ConnectionErrors[ConnectionErrors[\"AlreadyListening\"] = 3] = \"AlreadyListening\";\r\n})(ConnectionErrors = exports.ConnectionErrors || (exports.ConnectionErrors = {}));\r\nvar ConnectionError = /** @class */ (function (_super) {\r\n __extends(ConnectionError, _super);\r\n function ConnectionError(code, message) {\r\n var _this = _super.call(this, message) || this;\r\n _this.code = code;\r\n Object.setPrototypeOf(_this, ConnectionError.prototype);\r\n return _this;\r\n }\r\n return ConnectionError;\r\n}(Error));\r\nexports.ConnectionError = ConnectionError;\r\nvar ConnectionStrategy;\r\n(function (ConnectionStrategy) {\r\n function is(value) {\r\n var candidate = value;\r\n return candidate && Is.func(candidate.cancelUndispatched);\r\n }\r\n ConnectionStrategy.is = is;\r\n})(ConnectionStrategy = exports.ConnectionStrategy || (exports.ConnectionStrategy = {}));\r\nvar ConnectionState;\r\n(function (ConnectionState) {\r\n ConnectionState[ConnectionState[\"New\"] = 1] = \"New\";\r\n ConnectionState[ConnectionState[\"Listening\"] = 2] = \"Listening\";\r\n ConnectionState[ConnectionState[\"Closed\"] = 3] = \"Closed\";\r\n ConnectionState[ConnectionState[\"Disposed\"] = 4] = \"Disposed\";\r\n})(ConnectionState || (ConnectionState = {}));\r\nfunction _createMessageConnection(messageReader, messageWriter, logger, strategy) {\r\n var sequenceNumber = 0;\r\n var notificationSquenceNumber = 0;\r\n var unknownResponseSquenceNumber = 0;\r\n var version = '2.0';\r\n var starRequestHandler = undefined;\r\n var requestHandlers = Object.create(null);\r\n var starNotificationHandler = undefined;\r\n var notificationHandlers = Object.create(null);\r\n var timer;\r\n var messageQueue = new linkedMap_1.LinkedMap();\r\n var responsePromises = Object.create(null);\r\n var requestTokens = Object.create(null);\r\n var trace = Trace.Off;\r\n var tracer;\r\n var state = ConnectionState.New;\r\n var errorEmitter = new events_1.Emitter();\r\n var closeEmitter = new events_1.Emitter();\r\n var unhandledNotificationEmitter = new events_1.Emitter();\r\n var disposeEmitter = new events_1.Emitter();\r\n function createRequestQueueKey(id) {\r\n return 'req-' + id.toString();\r\n }\r\n function createResponseQueueKey(id) {\r\n if (id === null) {\r\n return 'res-unknown-' + (++unknownResponseSquenceNumber).toString();\r\n }\r\n else {\r\n return 'res-' + id.toString();\r\n }\r\n }\r\n function createNotificationQueueKey() {\r\n return 'not-' + (++notificationSquenceNumber).toString();\r\n }\r\n function addMessageToQueue(queue, message) {\r\n if (messages_1.isRequestMessage(message)) {\r\n queue.set(createRequestQueueKey(message.id), message);\r\n }\r\n else if (messages_1.isResponseMessage(message)) {\r\n queue.set(createResponseQueueKey(message.id), message);\r\n }\r\n else {\r\n queue.set(createNotificationQueueKey(), message);\r\n }\r\n }\r\n function cancelUndispatched(_message) {\r\n return undefined;\r\n }\r\n function isListening() {\r\n return state === ConnectionState.Listening;\r\n }\r\n function isClosed() {\r\n return state === ConnectionState.Closed;\r\n }\r\n function isDisposed() {\r\n return state === ConnectionState.Disposed;\r\n }\r\n function closeHandler() {\r\n if (state === ConnectionState.New || state === ConnectionState.Listening) {\r\n state = ConnectionState.Closed;\r\n closeEmitter.fire(undefined);\r\n }\r\n // If the connection is disposed don't sent close events.\r\n }\r\n ;\r\n function readErrorHandler(error) {\r\n errorEmitter.fire([error, undefined, undefined]);\r\n }\r\n function writeErrorHandler(data) {\r\n errorEmitter.fire(data);\r\n }\r\n messageReader.onClose(closeHandler);\r\n messageReader.onError(readErrorHandler);\r\n messageWriter.onClose(closeHandler);\r\n messageWriter.onError(writeErrorHandler);\r\n function triggerMessageQueue() {\r\n if (timer || messageQueue.size === 0) {\r\n return;\r\n }\r\n timer = setImmediate(function () {\r\n timer = undefined;\r\n processMessageQueue();\r\n });\r\n }\r\n function processMessageQueue() {\r\n if (messageQueue.size === 0) {\r\n return;\r\n }\r\n var message = messageQueue.shift();\r\n try {\r\n if (messages_1.isRequestMessage(message)) {\r\n handleRequest(message);\r\n }\r\n else if (messages_1.isNotificationMessage(message)) {\r\n handleNotification(message);\r\n }\r\n else if (messages_1.isResponseMessage(message)) {\r\n handleResponse(message);\r\n }\r\n else {\r\n handleInvalidMessage(message);\r\n }\r\n }\r\n finally {\r\n triggerMessageQueue();\r\n }\r\n }\r\n var callback = function (message) {\r\n try {\r\n // We have received a cancellation message. Check if the message is still in the queue\r\n // and cancel it if allowed to do so.\r\n if (messages_1.isNotificationMessage(message) && message.method === CancelNotification.type.method) {\r\n var key = createRequestQueueKey(message.params.id);\r\n var toCancel = messageQueue.get(key);\r\n if (messages_1.isRequestMessage(toCancel)) {\r\n var response = strategy && strategy.cancelUndispatched ? strategy.cancelUndispatched(toCancel, cancelUndispatched) : cancelUndispatched(toCancel);\r\n if (response && (response.error !== void 0 || response.result !== void 0)) {\r\n messageQueue.delete(key);\r\n response.id = toCancel.id;\r\n traceSendingResponse(response, message.method, Date.now());\r\n messageWriter.write(response);\r\n return;\r\n }\r\n }\r\n }\r\n addMessageToQueue(messageQueue, message);\r\n }\r\n finally {\r\n triggerMessageQueue();\r\n }\r\n };\r\n function handleRequest(requestMessage) {\r\n if (isDisposed()) {\r\n // we return here silently since we fired an event when the\r\n // connection got disposed.\r\n return;\r\n }\r\n function reply(resultOrError, method, startTime) {\r\n var message = {\r\n jsonrpc: version,\r\n id: requestMessage.id\r\n };\r\n if (resultOrError instanceof messages_1.ResponseError) {\r\n message.error = resultOrError.toJson();\r\n }\r\n else {\r\n message.result = resultOrError === void 0 ? null : resultOrError;\r\n }\r\n traceSendingResponse(message, method, startTime);\r\n messageWriter.write(message);\r\n }\r\n function replyError(error, method, startTime) {\r\n var message = {\r\n jsonrpc: version,\r\n id: requestMessage.id,\r\n error: error.toJson()\r\n };\r\n traceSendingResponse(message, method, startTime);\r\n messageWriter.write(message);\r\n }\r\n function replySuccess(result, method, startTime) {\r\n // The JSON RPC defines that a response must either have a result or an error\r\n // So we can't treat undefined as a valid response result.\r\n if (result === void 0) {\r\n result = null;\r\n }\r\n var message = {\r\n jsonrpc: version,\r\n id: requestMessage.id,\r\n result: result\r\n };\r\n traceSendingResponse(message, method, startTime);\r\n messageWriter.write(message);\r\n }\r\n traceReceivedRequest(requestMessage);\r\n var element = requestHandlers[requestMessage.method];\r\n var type;\r\n var requestHandler;\r\n if (element) {\r\n type = element.type;\r\n requestHandler = element.handler;\r\n }\r\n var startTime = Date.now();\r\n if (requestHandler || starRequestHandler) {\r\n var cancellationSource = new cancellation_1.CancellationTokenSource();\r\n var tokenKey_1 = String(requestMessage.id);\r\n requestTokens[tokenKey_1] = cancellationSource;\r\n try {\r\n var handlerResult = void 0;\r\n if (requestMessage.params === void 0 || (type !== void 0 && type.numberOfParams === 0)) {\r\n handlerResult = requestHandler\r\n ? requestHandler(cancellationSource.token)\r\n : starRequestHandler(requestMessage.method, cancellationSource.token);\r\n }\r\n else if (Is.array(requestMessage.params) && (type === void 0 || type.numberOfParams > 1)) {\r\n handlerResult = requestHandler\r\n ? requestHandler.apply(void 0, requestMessage.params.concat([cancellationSource.token])) : starRequestHandler.apply(void 0, [requestMessage.method].concat(requestMessage.params, [cancellationSource.token]));\r\n }\r\n else {\r\n handlerResult = requestHandler\r\n ? requestHandler(requestMessage.params, cancellationSource.token)\r\n : starRequestHandler(requestMessage.method, requestMessage.params, cancellationSource.token);\r\n }\r\n var promise = handlerResult;\r\n if (!handlerResult) {\r\n delete requestTokens[tokenKey_1];\r\n replySuccess(handlerResult, requestMessage.method, startTime);\r\n }\r\n else if (promise.then) {\r\n promise.then(function (resultOrError) {\r\n delete requestTokens[tokenKey_1];\r\n reply(resultOrError, requestMessage.method, startTime);\r\n }, function (error) {\r\n delete requestTokens[tokenKey_1];\r\n if (error instanceof messages_1.ResponseError) {\r\n replyError(error, requestMessage.method, startTime);\r\n }\r\n else if (error && Is.string(error.message)) {\r\n replyError(new messages_1.ResponseError(messages_1.ErrorCodes.InternalError, \"Request \" + requestMessage.method + \" failed with message: \" + error.message), requestMessage.method, startTime);\r\n }\r\n else {\r\n replyError(new messages_1.ResponseError(messages_1.ErrorCodes.InternalError, \"Request \" + requestMessage.method + \" failed unexpectedly without providing any details.\"), requestMessage.method, startTime);\r\n }\r\n });\r\n }\r\n else {\r\n delete requestTokens[tokenKey_1];\r\n reply(handlerResult, requestMessage.method, startTime);\r\n }\r\n }\r\n catch (error) {\r\n delete requestTokens[tokenKey_1];\r\n if (error instanceof messages_1.ResponseError) {\r\n reply(error, requestMessage.method, startTime);\r\n }\r\n else if (error && Is.string(error.message)) {\r\n replyError(new messages_1.ResponseError(messages_1.ErrorCodes.InternalError, \"Request \" + requestMessage.method + \" failed with message: \" + error.message), requestMessage.method, startTime);\r\n }\r\n else {\r\n replyError(new messages_1.ResponseError(messages_1.ErrorCodes.InternalError, \"Request \" + requestMessage.method + \" failed unexpectedly without providing any details.\"), requestMessage.method, startTime);\r\n }\r\n }\r\n }\r\n else {\r\n replyError(new messages_1.ResponseError(messages_1.ErrorCodes.MethodNotFound, \"Unhandled method \" + requestMessage.method), requestMessage.method, startTime);\r\n }\r\n }\r\n function handleResponse(responseMessage) {\r\n if (isDisposed()) {\r\n // See handle request.\r\n return;\r\n }\r\n if (responseMessage.id === null) {\r\n if (responseMessage.error) {\r\n logger.error(\"Received response message without id: Error is: \\n\" + JSON.stringify(responseMessage.error, undefined, 4));\r\n }\r\n else {\r\n logger.error(\"Received response message without id. No further error information provided.\");\r\n }\r\n }\r\n else {\r\n var key = String(responseMessage.id);\r\n var responsePromise = responsePromises[key];\r\n traceReceivedResponse(responseMessage, responsePromise);\r\n if (responsePromise) {\r\n delete responsePromises[key];\r\n try {\r\n if (responseMessage.error) {\r\n var error = responseMessage.error;\r\n responsePromise.reject(new messages_1.ResponseError(error.code, error.message, error.data));\r\n }\r\n else if (responseMessage.result !== void 0) {\r\n responsePromise.resolve(responseMessage.result);\r\n }\r\n else {\r\n throw new Error('Should never happen.');\r\n }\r\n }\r\n catch (error) {\r\n if (error.message) {\r\n logger.error(\"Response handler '\" + responsePromise.method + \"' failed with message: \" + error.message);\r\n }\r\n else {\r\n logger.error(\"Response handler '\" + responsePromise.method + \"' failed unexpectedly.\");\r\n }\r\n }\r\n }\r\n }\r\n }\r\n function handleNotification(message) {\r\n if (isDisposed()) {\r\n // See handle request.\r\n return;\r\n }\r\n var type = undefined;\r\n var notificationHandler;\r\n if (message.method === CancelNotification.type.method) {\r\n notificationHandler = function (params) {\r\n var id = params.id;\r\n var source = requestTokens[String(id)];\r\n if (source) {\r\n source.cancel();\r\n }\r\n };\r\n }\r\n else {\r\n var element = notificationHandlers[message.method];\r\n if (element) {\r\n notificationHandler = element.handler;\r\n type = element.type;\r\n }\r\n }\r\n if (notificationHandler || starNotificationHandler) {\r\n try {\r\n traceReceivedNotification(message);\r\n if (message.params === void 0 || (type !== void 0 && type.numberOfParams === 0)) {\r\n notificationHandler ? notificationHandler() : starNotificationHandler(message.method);\r\n }\r\n else if (Is.array(message.params) && (type === void 0 || type.numberOfParams > 1)) {\r\n notificationHandler ? notificationHandler.apply(void 0, message.params) : starNotificationHandler.apply(void 0, [message.method].concat(message.params));\r\n }\r\n else {\r\n notificationHandler ? notificationHandler(message.params) : starNotificationHandler(message.method, message.params);\r\n }\r\n }\r\n catch (error) {\r\n if (error.message) {\r\n logger.error(\"Notification handler '\" + message.method + \"' failed with message: \" + error.message);\r\n }\r\n else {\r\n logger.error(\"Notification handler '\" + message.method + \"' failed unexpectedly.\");\r\n }\r\n }\r\n }\r\n else {\r\n unhandledNotificationEmitter.fire(message);\r\n }\r\n }\r\n function handleInvalidMessage(message) {\r\n if (!message) {\r\n logger.error('Received empty message.');\r\n return;\r\n }\r\n logger.error(\"Received message which is neither a response nor a notification message:\\n\" + JSON.stringify(message, null, 4));\r\n // Test whether we find an id to reject the promise\r\n var responseMessage = message;\r\n if (Is.string(responseMessage.id) || Is.number(responseMessage.id)) {\r\n var key = String(responseMessage.id);\r\n var responseHandler = responsePromises[key];\r\n if (responseHandler) {\r\n responseHandler.reject(new Error('The received response has neither a result nor an error property.'));\r\n }\r\n }\r\n }\r\n function traceSendingRequest(message) {\r\n if (trace === Trace.Off || !tracer) {\r\n return;\r\n }\r\n var data = undefined;\r\n if (trace === Trace.Verbose && message.params) {\r\n data = \"Params: \" + JSON.stringify(message.params, null, 4) + \"\\n\\n\";\r\n }\r\n tracer.log(\"Sending request '\" + message.method + \" - (\" + message.id + \")'.\", data);\r\n }\r\n function traceSendNotification(message) {\r\n if (trace === Trace.Off || !tracer) {\r\n return;\r\n }\r\n var data = undefined;\r\n if (trace === Trace.Verbose) {\r\n if (message.params) {\r\n data = \"Params: \" + JSON.stringify(message.params, null, 4) + \"\\n\\n\";\r\n }\r\n else {\r\n data = 'No parameters provided.\\n\\n';\r\n }\r\n }\r\n tracer.log(\"Sending notification '\" + message.method + \"'.\", data);\r\n }\r\n function traceSendingResponse(message, method, startTime) {\r\n if (trace === Trace.Off || !tracer) {\r\n return;\r\n }\r\n var data = undefined;\r\n if (trace === Trace.Verbose) {\r\n if (message.error && message.error.data) {\r\n data = \"Error data: \" + JSON.stringify(message.error.data, null, 4) + \"\\n\\n\";\r\n }\r\n else {\r\n if (message.result) {\r\n data = \"Result: \" + JSON.stringify(message.result, null, 4) + \"\\n\\n\";\r\n }\r\n else if (message.error === void 0) {\r\n data = 'No result returned.\\n\\n';\r\n }\r\n }\r\n }\r\n tracer.log(\"Sending response '\" + method + \" - (\" + message.id + \")'. Processing request took \" + (Date.now() - startTime) + \"ms\", data);\r\n }\r\n function traceReceivedRequest(message) {\r\n if (trace === Trace.Off || !tracer) {\r\n return;\r\n }\r\n var data = undefined;\r\n if (trace === Trace.Verbose && message.params) {\r\n data = \"Params: \" + JSON.stringify(message.params, null, 4) + \"\\n\\n\";\r\n }\r\n tracer.log(\"Received request '\" + message.method + \" - (\" + message.id + \")'.\", data);\r\n }\r\n function traceReceivedNotification(message) {\r\n if (trace === Trace.Off || !tracer || message.method === LogTraceNotification.type.method) {\r\n return;\r\n }\r\n var data = undefined;\r\n if (trace === Trace.Verbose) {\r\n if (message.params) {\r\n data = \"Params: \" + JSON.stringify(message.params, null, 4) + \"\\n\\n\";\r\n }\r\n else {\r\n data = 'No parameters provided.\\n\\n';\r\n }\r\n }\r\n tracer.log(\"Received notification '\" + message.method + \"'.\", data);\r\n }\r\n function traceReceivedResponse(message, responsePromise) {\r\n if (trace === Trace.Off || !tracer) {\r\n return;\r\n }\r\n var data = undefined;\r\n if (trace === Trace.Verbose) {\r\n if (message.error && message.error.data) {\r\n data = \"Error data: \" + JSON.stringify(message.error.data, null, 4) + \"\\n\\n\";\r\n }\r\n else {\r\n if (message.result) {\r\n data = \"Result: \" + JSON.stringify(message.result, null, 4) + \"\\n\\n\";\r\n }\r\n else if (message.error === void 0) {\r\n data = 'No result returned.\\n\\n';\r\n }\r\n }\r\n }\r\n if (responsePromise) {\r\n var error = message.error ? \" Request failed: \" + message.error.message + \" (\" + message.error.code + \").\" : '';\r\n tracer.log(\"Received response '\" + responsePromise.method + \" - (\" + message.id + \")' in \" + (Date.now() - responsePromise.timerStart) + \"ms.\" + error, data);\r\n }\r\n else {\r\n tracer.log(\"Received response \" + message.id + \" without active response promise.\", data);\r\n }\r\n }\r\n function throwIfClosedOrDisposed() {\r\n if (isClosed()) {\r\n throw new ConnectionError(ConnectionErrors.Closed, 'Connection is closed.');\r\n }\r\n if (isDisposed()) {\r\n throw new ConnectionError(ConnectionErrors.Disposed, 'Connection is disposed.');\r\n }\r\n }\r\n function throwIfListening() {\r\n if (isListening()) {\r\n throw new ConnectionError(ConnectionErrors.AlreadyListening, 'Connection is already listening');\r\n }\r\n }\r\n function throwIfNotListening() {\r\n if (!isListening()) {\r\n throw new Error('Call listen() first.');\r\n }\r\n }\r\n function undefinedToNull(param) {\r\n if (param === void 0) {\r\n return null;\r\n }\r\n else {\r\n return param;\r\n }\r\n }\r\n function computeMessageParams(type, params) {\r\n var result;\r\n var numberOfParams = type.numberOfParams;\r\n switch (numberOfParams) {\r\n case 0:\r\n result = null;\r\n break;\r\n case 1:\r\n result = undefinedToNull(params[0]);\r\n break;\r\n default:\r\n result = [];\r\n for (var i = 0; i < params.length && i < numberOfParams; i++) {\r\n result.push(undefinedToNull(params[i]));\r\n }\r\n if (params.length < numberOfParams) {\r\n for (var i = params.length; i < numberOfParams; i++) {\r\n result.push(null);\r\n }\r\n }\r\n break;\r\n }\r\n return result;\r\n }\r\n var connection = {\r\n sendNotification: function (type) {\r\n var params = [];\r\n for (var _i = 1; _i < arguments.length; _i++) {\r\n params[_i - 1] = arguments[_i];\r\n }\r\n throwIfClosedOrDisposed();\r\n var method;\r\n var messageParams;\r\n if (Is.string(type)) {\r\n method = type;\r\n switch (params.length) {\r\n case 0:\r\n messageParams = null;\r\n break;\r\n case 1:\r\n messageParams = params[0];\r\n break;\r\n default:\r\n messageParams = params;\r\n break;\r\n }\r\n }\r\n else {\r\n method = type.method;\r\n messageParams = computeMessageParams(type, params);\r\n }\r\n var notificationMessage = {\r\n jsonrpc: version,\r\n method: method,\r\n params: messageParams\r\n };\r\n traceSendNotification(notificationMessage);\r\n messageWriter.write(notificationMessage);\r\n },\r\n onNotification: function (type, handler) {\r\n throwIfClosedOrDisposed();\r\n if (Is.func(type)) {\r\n starNotificationHandler = type;\r\n }\r\n else if (handler) {\r\n if (Is.string(type)) {\r\n notificationHandlers[type] = { type: undefined, handler: handler };\r\n }\r\n else {\r\n notificationHandlers[type.method] = { type: type, handler: handler };\r\n }\r\n }\r\n },\r\n sendRequest: function (type) {\r\n var params = [];\r\n for (var _i = 1; _i < arguments.length; _i++) {\r\n params[_i - 1] = arguments[_i];\r\n }\r\n throwIfClosedOrDisposed();\r\n throwIfNotListening();\r\n var method;\r\n var messageParams;\r\n var token = undefined;\r\n if (Is.string(type)) {\r\n method = type;\r\n switch (params.length) {\r\n case 0:\r\n messageParams = null;\r\n break;\r\n case 1:\r\n // The cancellation token is optional so it can also be undefined.\r\n if (cancellation_1.CancellationToken.is(params[0])) {\r\n messageParams = null;\r\n token = params[0];\r\n }\r\n else {\r\n messageParams = undefinedToNull(params[0]);\r\n }\r\n break;\r\n default:\r\n var last = params.length - 1;\r\n if (cancellation_1.CancellationToken.is(params[last])) {\r\n token = params[last];\r\n if (params.length === 2) {\r\n messageParams = undefinedToNull(params[0]);\r\n }\r\n else {\r\n messageParams = params.slice(0, last).map(function (value) { return undefinedToNull(value); });\r\n }\r\n }\r\n else {\r\n messageParams = params.map(function (value) { return undefinedToNull(value); });\r\n }\r\n break;\r\n }\r\n }\r\n else {\r\n method = type.method;\r\n messageParams = computeMessageParams(type, params);\r\n var numberOfParams = type.numberOfParams;\r\n token = cancellation_1.CancellationToken.is(params[numberOfParams]) ? params[numberOfParams] : undefined;\r\n }\r\n var id = sequenceNumber++;\r\n var result = new Promise(function (resolve, reject) {\r\n var requestMessage = {\r\n jsonrpc: version,\r\n id: id,\r\n method: method,\r\n params: messageParams\r\n };\r\n var responsePromise = { method: method, timerStart: Date.now(), resolve: resolve, reject: reject };\r\n traceSendingRequest(requestMessage);\r\n try {\r\n messageWriter.write(requestMessage);\r\n }\r\n catch (e) {\r\n // Writing the message failed. So we need to reject the promise.\r\n responsePromise.reject(new messages_1.ResponseError(messages_1.ErrorCodes.MessageWriteError, e.message ? e.message : 'Unknown reason'));\r\n responsePromise = null;\r\n }\r\n if (responsePromise) {\r\n responsePromises[String(id)] = responsePromise;\r\n }\r\n });\r\n if (token) {\r\n token.onCancellationRequested(function () {\r\n connection.sendNotification(CancelNotification.type, { id: id });\r\n });\r\n }\r\n return result;\r\n },\r\n onRequest: function (type, handler) {\r\n throwIfClosedOrDisposed();\r\n if (Is.func(type)) {\r\n starRequestHandler = type;\r\n }\r\n else if (handler) {\r\n if (Is.string(type)) {\r\n requestHandlers[type] = { type: undefined, handler: handler };\r\n }\r\n else {\r\n requestHandlers[type.method] = { type: type, handler: handler };\r\n }\r\n }\r\n },\r\n trace: function (_value, _tracer, sendNotification) {\r\n if (sendNotification === void 0) { sendNotification = false; }\r\n trace = _value;\r\n if (trace === Trace.Off) {\r\n tracer = undefined;\r\n }\r\n else {\r\n tracer = _tracer;\r\n }\r\n if (sendNotification && !isClosed() && !isDisposed()) {\r\n connection.sendNotification(SetTraceNotification.type, { value: Trace.toString(_value) });\r\n }\r\n },\r\n onError: errorEmitter.event,\r\n onClose: closeEmitter.event,\r\n onUnhandledNotification: unhandledNotificationEmitter.event,\r\n onDispose: disposeEmitter.event,\r\n dispose: function () {\r\n if (isDisposed()) {\r\n return;\r\n }\r\n state = ConnectionState.Disposed;\r\n disposeEmitter.fire(undefined);\r\n var error = new Error('Connection got disposed.');\r\n Object.keys(responsePromises).forEach(function (key) {\r\n responsePromises[key].reject(error);\r\n });\r\n responsePromises = Object.create(null);\r\n requestTokens = Object.create(null);\r\n messageQueue = new linkedMap_1.LinkedMap();\r\n // Test for backwards compatibility\r\n if (Is.func(messageWriter.dispose)) {\r\n messageWriter.dispose();\r\n }\r\n if (Is.func(messageReader.dispose)) {\r\n messageReader.dispose();\r\n }\r\n },\r\n listen: function () {\r\n throwIfClosedOrDisposed();\r\n throwIfListening();\r\n state = ConnectionState.Listening;\r\n messageReader.listen(callback);\r\n },\r\n inspect: function () {\r\n console.log(\"inspect\");\r\n }\r\n };\r\n connection.onNotification(LogTraceNotification.type, function (params) {\r\n if (trace === Trace.Off || !tracer) {\r\n return;\r\n }\r\n tracer.log(params.message, trace === Trace.Verbose ? params.verbose : undefined);\r\n });\r\n return connection;\r\n}\r\nfunction isMessageReader(value) {\r\n return value.listen !== void 0 && value.read === void 0;\r\n}\r\nfunction isMessageWriter(value) {\r\n return value.write !== void 0 && value.end === void 0;\r\n}\r\nfunction createMessageConnection(input, output, logger, strategy) {\r\n if (!logger) {\r\n logger = exports.NullLogger;\r\n }\r\n var reader = isMessageReader(input) ? input : new messageReader_1.StreamMessageReader(input);\r\n var writer = isMessageWriter(output) ? output : new messageWriter_1.StreamMessageWriter(output);\r\n return _createMessageConnection(reader, writer, logger, strategy);\r\n}\r\nexports.createMessageConnection = createMessageConnection;\r\n","/* --------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n * ------------------------------------------------------------------------------------------ */\r\n'use strict';\r\nvar __extends = (this && this.__extends) || (function () {\r\n var extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return function (d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar events_1 = require(\"./events\");\r\nvar Is = require(\"./is\");\r\nvar DefaultSize = 8192;\r\nvar CR = new Buffer('\\r', 'ascii')[0];\r\nvar LF = new Buffer('\\n', 'ascii')[0];\r\nvar CRLF = '\\r\\n';\r\nvar MessageBuffer = /** @class */ (function () {\r\n function MessageBuffer(encoding) {\r\n if (encoding === void 0) { encoding = 'utf8'; }\r\n this.encoding = encoding;\r\n this.index = 0;\r\n this.buffer = new Buffer(DefaultSize);\r\n }\r\n MessageBuffer.prototype.append = function (chunk) {\r\n var toAppend = chunk;\r\n if (typeof (chunk) === 'string') {\r\n var str = chunk;\r\n var bufferLen = Buffer.byteLength(str, this.encoding);\r\n toAppend = new Buffer(bufferLen);\r\n toAppend.write(str, 0, bufferLen, this.encoding);\r\n }\r\n if (this.buffer.length - this.index >= toAppend.length) {\r\n toAppend.copy(this.buffer, this.index, 0, toAppend.length);\r\n }\r\n else {\r\n var newSize = (Math.ceil((this.index + toAppend.length) / DefaultSize) + 1) * DefaultSize;\r\n if (this.index === 0) {\r\n this.buffer = new Buffer(newSize);\r\n toAppend.copy(this.buffer, 0, 0, toAppend.length);\r\n }\r\n else {\r\n this.buffer = Buffer.concat([this.buffer.slice(0, this.index), toAppend], newSize);\r\n }\r\n }\r\n this.index += toAppend.length;\r\n };\r\n MessageBuffer.prototype.tryReadHeaders = function () {\r\n var result = undefined;\r\n var current = 0;\r\n while (current + 3 < this.index && (this.buffer[current] !== CR || this.buffer[current + 1] !== LF || this.buffer[current + 2] !== CR || this.buffer[current + 3] !== LF)) {\r\n current++;\r\n }\r\n // No header / body separator found (e.g CRLFCRLF)\r\n if (current + 3 >= this.index) {\r\n return result;\r\n }\r\n result = Object.create(null);\r\n var headers = this.buffer.toString('ascii', 0, current).split(CRLF);\r\n headers.forEach(function (header) {\r\n var index = header.indexOf(':');\r\n if (index === -1) {\r\n throw new Error('Message header must separate key and value using :');\r\n }\r\n var key = header.substr(0, index);\r\n var value = header.substr(index + 1).trim();\r\n result[key] = value;\r\n });\r\n var nextStart = current + 4;\r\n this.buffer = this.buffer.slice(nextStart);\r\n this.index = this.index - nextStart;\r\n return result;\r\n };\r\n MessageBuffer.prototype.tryReadContent = function (length) {\r\n if (this.index < length) {\r\n return null;\r\n }\r\n var result = this.buffer.toString(this.encoding, 0, length);\r\n var nextStart = length;\r\n this.buffer.copy(this.buffer, 0, nextStart);\r\n this.index = this.index - nextStart;\r\n return result;\r\n };\r\n Object.defineProperty(MessageBuffer.prototype, \"numberOfBytes\", {\r\n get: function () {\r\n return this.index;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n return MessageBuffer;\r\n}());\r\nvar MessageReader;\r\n(function (MessageReader) {\r\n function is(value) {\r\n var candidate = value;\r\n return candidate && Is.func(candidate.listen) && Is.func(candidate.dispose) &&\r\n Is.func(candidate.onError) && Is.func(candidate.onClose) && Is.func(candidate.onPartialMessage);\r\n }\r\n MessageReader.is = is;\r\n})(MessageReader = exports.MessageReader || (exports.MessageReader = {}));\r\nvar AbstractMessageReader = /** @class */ (function () {\r\n function AbstractMessageReader() {\r\n this.errorEmitter = new events_1.Emitter();\r\n this.closeEmitter = new events_1.Emitter();\r\n this.partialMessageEmitter = new events_1.Emitter();\r\n }\r\n AbstractMessageReader.prototype.dispose = function () {\r\n this.errorEmitter.dispose();\r\n this.closeEmitter.dispose();\r\n };\r\n Object.defineProperty(AbstractMessageReader.prototype, \"onError\", {\r\n get: function () {\r\n return this.errorEmitter.event;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n AbstractMessageReader.prototype.fireError = function (error) {\r\n this.errorEmitter.fire(this.asError(error));\r\n };\r\n Object.defineProperty(AbstractMessageReader.prototype, \"onClose\", {\r\n get: function () {\r\n return this.closeEmitter.event;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n AbstractMessageReader.prototype.fireClose = function () {\r\n this.closeEmitter.fire(undefined);\r\n };\r\n Object.defineProperty(AbstractMessageReader.prototype, \"onPartialMessage\", {\r\n get: function () {\r\n return this.partialMessageEmitter.event;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n AbstractMessageReader.prototype.firePartialMessage = function (info) {\r\n this.partialMessageEmitter.fire(info);\r\n };\r\n AbstractMessageReader.prototype.asError = function (error) {\r\n if (error instanceof Error) {\r\n return error;\r\n }\r\n else {\r\n return new Error(\"Reader recevied error. Reason: \" + (Is.string(error.message) ? error.message : 'unknown'));\r\n }\r\n };\r\n return AbstractMessageReader;\r\n}());\r\nexports.AbstractMessageReader = AbstractMessageReader;\r\nvar StreamMessageReader = /** @class */ (function (_super) {\r\n __extends(StreamMessageReader, _super);\r\n function StreamMessageReader(readable, encoding) {\r\n if (encoding === void 0) { encoding = 'utf8'; }\r\n var _this = _super.call(this) || this;\r\n _this.readable = readable;\r\n _this.buffer = new MessageBuffer(encoding);\r\n _this._partialMessageTimeout = 10000;\r\n return _this;\r\n }\r\n Object.defineProperty(StreamMessageReader.prototype, \"partialMessageTimeout\", {\r\n get: function () {\r\n return this._partialMessageTimeout;\r\n },\r\n set: function (timeout) {\r\n this._partialMessageTimeout = timeout;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n StreamMessageReader.prototype.listen = function (callback) {\r\n var _this = this;\r\n this.nextMessageLength = -1;\r\n this.messageToken = 0;\r\n this.partialMessageTimer = undefined;\r\n this.callback = callback;\r\n this.readable.on('data', function (data) {\r\n _this.onData(data);\r\n });\r\n this.readable.on('error', function (error) { return _this.fireError(error); });\r\n this.readable.on('close', function () { return _this.fireClose(); });\r\n };\r\n StreamMessageReader.prototype.onData = function (data) {\r\n this.buffer.append(data);\r\n while (true) {\r\n if (this.nextMessageLength === -1) {\r\n var headers = this.buffer.tryReadHeaders();\r\n if (!headers) {\r\n return;\r\n }\r\n var contentLength = headers['Content-Length'];\r\n if (!contentLength) {\r\n throw new Error('Header must provide a Content-Length property.');\r\n }\r\n var length = parseInt(contentLength);\r\n if (isNaN(length)) {\r\n throw new Error('Content-Length value must be a number.');\r\n }\r\n this.nextMessageLength = length;\r\n // Take the encoding form the header. For compatibility\r\n // treat both utf-8 and utf8 as node utf8\r\n }\r\n var msg = this.buffer.tryReadContent(this.nextMessageLength);\r\n if (msg === null) {\r\n /** We haven't recevied the full message yet. */\r\n this.setPartialMessageTimer();\r\n return;\r\n }\r\n this.clearPartialMessageTimer();\r\n this.nextMessageLength = -1;\r\n this.messageToken++;\r\n var json = JSON.parse(msg);\r\n this.callback(json);\r\n }\r\n };\r\n StreamMessageReader.prototype.clearPartialMessageTimer = function () {\r\n if (this.partialMessageTimer) {\r\n clearTimeout(this.partialMessageTimer);\r\n this.partialMessageTimer = undefined;\r\n }\r\n };\r\n StreamMessageReader.prototype.setPartialMessageTimer = function () {\r\n var _this = this;\r\n this.clearPartialMessageTimer();\r\n if (this._partialMessageTimeout <= 0) {\r\n return;\r\n }\r\n this.partialMessageTimer = setTimeout(function (token, timeout) {\r\n _this.partialMessageTimer = undefined;\r\n if (token === _this.messageToken) {\r\n _this.firePartialMessage({ messageToken: token, waitingTime: timeout });\r\n _this.setPartialMessageTimer();\r\n }\r\n }, this._partialMessageTimeout, this.messageToken, this._partialMessageTimeout);\r\n };\r\n return StreamMessageReader;\r\n}(AbstractMessageReader));\r\nexports.StreamMessageReader = StreamMessageReader;\r\nvar IPCMessageReader = /** @class */ (function (_super) {\r\n __extends(IPCMessageReader, _super);\r\n function IPCMessageReader(process) {\r\n var _this = _super.call(this) || this;\r\n _this.process = process;\r\n var eventEmitter = _this.process;\r\n eventEmitter.on('error', function (error) { return _this.fireError(error); });\r\n eventEmitter.on('close', function () { return _this.fireClose(); });\r\n return _this;\r\n }\r\n IPCMessageReader.prototype.listen = function (callback) {\r\n this.process.on('message', callback);\r\n };\r\n return IPCMessageReader;\r\n}(AbstractMessageReader));\r\nexports.IPCMessageReader = IPCMessageReader;\r\nvar SocketMessageReader = /** @class */ (function (_super) {\r\n __extends(SocketMessageReader, _super);\r\n function SocketMessageReader(socket, encoding) {\r\n if (encoding === void 0) { encoding = 'utf-8'; }\r\n return _super.call(this, socket, encoding) || this;\r\n }\r\n return SocketMessageReader;\r\n}(StreamMessageReader));\r\nexports.SocketMessageReader = SocketMessageReader;\r\n","/* --------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n * ------------------------------------------------------------------------------------------ */\r\n'use strict';\r\nvar __extends = (this && this.__extends) || (function () {\r\n var extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return function (d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar events_1 = require(\"./events\");\r\nvar Is = require(\"./is\");\r\nvar ContentLength = 'Content-Length: ';\r\nvar CRLF = '\\r\\n';\r\nvar MessageWriter;\r\n(function (MessageWriter) {\r\n function is(value) {\r\n var candidate = value;\r\n return candidate && Is.func(candidate.dispose) && Is.func(candidate.onClose) &&\r\n Is.func(candidate.onError) && Is.func(candidate.write);\r\n }\r\n MessageWriter.is = is;\r\n})(MessageWriter = exports.MessageWriter || (exports.MessageWriter = {}));\r\nvar AbstractMessageWriter = /** @class */ (function () {\r\n function AbstractMessageWriter() {\r\n this.errorEmitter = new events_1.Emitter();\r\n this.closeEmitter = new events_1.Emitter();\r\n }\r\n AbstractMessageWriter.prototype.dispose = function () {\r\n this.errorEmitter.dispose();\r\n this.closeEmitter.dispose();\r\n };\r\n Object.defineProperty(AbstractMessageWriter.prototype, \"onError\", {\r\n get: function () {\r\n return this.errorEmitter.event;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n AbstractMessageWriter.prototype.fireError = function (error, message, count) {\r\n this.errorEmitter.fire([this.asError(error), message, count]);\r\n };\r\n Object.defineProperty(AbstractMessageWriter.prototype, \"onClose\", {\r\n get: function () {\r\n return this.closeEmitter.event;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n AbstractMessageWriter.prototype.fireClose = function () {\r\n this.closeEmitter.fire(undefined);\r\n };\r\n AbstractMessageWriter.prototype.asError = function (error) {\r\n if (error instanceof Error) {\r\n return error;\r\n }\r\n else {\r\n return new Error(\"Writer recevied error. Reason: \" + (Is.string(error.message) ? error.message : 'unknown'));\r\n }\r\n };\r\n return AbstractMessageWriter;\r\n}());\r\nexports.AbstractMessageWriter = AbstractMessageWriter;\r\nvar StreamMessageWriter = /** @class */ (function (_super) {\r\n __extends(StreamMessageWriter, _super);\r\n function StreamMessageWriter(writable, encoding) {\r\n if (encoding === void 0) { encoding = 'utf8'; }\r\n var _this = _super.call(this) || this;\r\n _this.writable = writable;\r\n _this.encoding = encoding;\r\n _this.errorCount = 0;\r\n _this.writable.on('error', function (error) { return _this.fireError(error); });\r\n _this.writable.on('close', function () { return _this.fireClose(); });\r\n return _this;\r\n }\r\n StreamMessageWriter.prototype.write = function (msg) {\r\n var json = JSON.stringify(msg);\r\n var contentLength = Buffer.byteLength(json, this.encoding);\r\n var headers = [\r\n ContentLength, contentLength.toString(), CRLF,\r\n CRLF\r\n ];\r\n try {\r\n // Header must be written in ASCII encoding\r\n this.writable.write(headers.join(''), 'ascii');\r\n // Now write the content. This can be written in any encoding\r\n this.writable.write(json, this.encoding);\r\n this.errorCount = 0;\r\n }\r\n catch (error) {\r\n this.errorCount++;\r\n this.fireError(error, msg, this.errorCount);\r\n }\r\n };\r\n return StreamMessageWriter;\r\n}(AbstractMessageWriter));\r\nexports.StreamMessageWriter = StreamMessageWriter;\r\nvar IPCMessageWriter = /** @class */ (function (_super) {\r\n __extends(IPCMessageWriter, _super);\r\n function IPCMessageWriter(process) {\r\n var _this = _super.call(this) || this;\r\n _this.process = process;\r\n _this.errorCount = 0;\r\n _this.queue = [];\r\n _this.sending = false;\r\n var eventEmitter = _this.process;\r\n eventEmitter.on('error', function (error) { return _this.fireError(error); });\r\n eventEmitter.on('close', function () { return _this.fireClose; });\r\n return _this;\r\n }\r\n IPCMessageWriter.prototype.write = function (msg) {\r\n if (!this.sending && this.queue.length === 0) {\r\n // See https://github.com/nodejs/node/issues/7657\r\n this.doWriteMessage(msg);\r\n }\r\n else {\r\n this.queue.push(msg);\r\n }\r\n };\r\n IPCMessageWriter.prototype.doWriteMessage = function (msg) {\r\n var _this = this;\r\n try {\r\n if (this.process.send) {\r\n this.sending = true;\r\n this.process.send(msg, undefined, undefined, function (error) {\r\n _this.sending = false;\r\n if (error) {\r\n _this.errorCount++;\r\n _this.fireError(error, msg, _this.errorCount);\r\n }\r\n else {\r\n _this.errorCount = 0;\r\n }\r\n if (_this.queue.length > 0) {\r\n _this.doWriteMessage(_this.queue.shift());\r\n }\r\n });\r\n }\r\n }\r\n catch (error) {\r\n this.errorCount++;\r\n this.fireError(error, msg, this.errorCount);\r\n }\r\n };\r\n return IPCMessageWriter;\r\n}(AbstractMessageWriter));\r\nexports.IPCMessageWriter = IPCMessageWriter;\r\nvar SocketMessageWriter = /** @class */ (function (_super) {\r\n __extends(SocketMessageWriter, _super);\r\n function SocketMessageWriter(socket, encoding) {\r\n if (encoding === void 0) { encoding = 'utf8'; }\r\n var _this = _super.call(this) || this;\r\n _this.socket = socket;\r\n _this.queue = [];\r\n _this.sending = false;\r\n _this.encoding = encoding;\r\n _this.errorCount = 0;\r\n _this.socket.on('error', function (error) { return _this.fireError(error); });\r\n _this.socket.on('close', function () { return _this.fireClose(); });\r\n return _this;\r\n }\r\n SocketMessageWriter.prototype.write = function (msg) {\r\n if (!this.sending && this.queue.length === 0) {\r\n // See https://github.com/nodejs/node/issues/7657\r\n this.doWriteMessage(msg);\r\n }\r\n else {\r\n this.queue.push(msg);\r\n }\r\n };\r\n SocketMessageWriter.prototype.doWriteMessage = function (msg) {\r\n var _this = this;\r\n var json = JSON.stringify(msg);\r\n var contentLength = Buffer.byteLength(json, this.encoding);\r\n var headers = [\r\n ContentLength, contentLength.toString(), CRLF,\r\n CRLF\r\n ];\r\n try {\r\n // Header must be written in ASCII encoding\r\n this.sending = true;\r\n this.socket.write(headers.join(''), 'ascii', function (error) {\r\n if (error) {\r\n _this.handleError(error, msg);\r\n }\r\n try {\r\n // Now write the content. This can be written in any encoding\r\n _this.socket.write(json, _this.encoding, function (error) {\r\n _this.sending = false;\r\n if (error) {\r\n _this.handleError(error, msg);\r\n }\r\n else {\r\n _this.errorCount = 0;\r\n }\r\n if (_this.queue.length > 0) {\r\n _this.doWriteMessage(_this.queue.shift());\r\n }\r\n });\r\n }\r\n catch (error) {\r\n _this.handleError(error, msg);\r\n }\r\n });\r\n }\r\n catch (error) {\r\n this.handleError(error, msg);\r\n }\r\n };\r\n SocketMessageWriter.prototype.handleError = function (error, msg) {\r\n this.errorCount++;\r\n this.fireError(error, msg, this.errorCount);\r\n };\r\n return SocketMessageWriter;\r\n}(AbstractMessageWriter));\r\nexports.SocketMessageWriter = SocketMessageWriter;\r\n","/* --------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n * ------------------------------------------------------------------------------------------ */\r\n'use strict';\r\nvar __extends = (this && this.__extends) || (function () {\r\n var extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return function (d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar is = require(\"./is\");\r\n/**\r\n * Predefined error codes.\r\n */\r\nvar ErrorCodes;\r\n(function (ErrorCodes) {\r\n // Defined by JSON RPC\r\n ErrorCodes.ParseError = -32700;\r\n ErrorCodes.InvalidRequest = -32600;\r\n ErrorCodes.MethodNotFound = -32601;\r\n ErrorCodes.InvalidParams = -32602;\r\n ErrorCodes.InternalError = -32603;\r\n ErrorCodes.serverErrorStart = -32099;\r\n ErrorCodes.serverErrorEnd = -32000;\r\n ErrorCodes.ServerNotInitialized = -32002;\r\n ErrorCodes.UnknownErrorCode = -32001;\r\n // Defined by the protocol.\r\n ErrorCodes.RequestCancelled = -32800;\r\n // Defined by VSCode library.\r\n ErrorCodes.MessageWriteError = 1;\r\n ErrorCodes.MessageReadError = 2;\r\n})(ErrorCodes = exports.ErrorCodes || (exports.ErrorCodes = {}));\r\n/**\r\n * An error object return in a response in case a request\r\n * has failed.\r\n */\r\nvar ResponseError = /** @class */ (function (_super) {\r\n __extends(ResponseError, _super);\r\n function ResponseError(code, message, data) {\r\n var _this = _super.call(this, message) || this;\r\n _this.code = is.number(code) ? code : ErrorCodes.UnknownErrorCode;\r\n _this.data = data;\r\n Object.setPrototypeOf(_this, ResponseError.prototype);\r\n return _this;\r\n }\r\n ResponseError.prototype.toJson = function () {\r\n return {\r\n code: this.code,\r\n message: this.message,\r\n data: this.data,\r\n };\r\n };\r\n return ResponseError;\r\n}(Error));\r\nexports.ResponseError = ResponseError;\r\n/**\r\n * An abstract implementation of a MessageType.\r\n */\r\nvar AbstractMessageType = /** @class */ (function () {\r\n function AbstractMessageType(_method, _numberOfParams) {\r\n this._method = _method;\r\n this._numberOfParams = _numberOfParams;\r\n }\r\n Object.defineProperty(AbstractMessageType.prototype, \"method\", {\r\n get: function () {\r\n return this._method;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(AbstractMessageType.prototype, \"numberOfParams\", {\r\n get: function () {\r\n return this._numberOfParams;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n return AbstractMessageType;\r\n}());\r\nexports.AbstractMessageType = AbstractMessageType;\r\n/**\r\n * Classes to type request response pairs\r\n */\r\nvar RequestType0 = /** @class */ (function (_super) {\r\n __extends(RequestType0, _super);\r\n function RequestType0(method) {\r\n var _this = _super.call(this, method, 0) || this;\r\n _this._ = undefined;\r\n return _this;\r\n }\r\n return RequestType0;\r\n}(AbstractMessageType));\r\nexports.RequestType0 = RequestType0;\r\nvar RequestType = /** @class */ (function (_super) {\r\n __extends(RequestType, _super);\r\n function RequestType(method) {\r\n var _this = _super.call(this, method, 1) || this;\r\n _this._ = undefined;\r\n return _this;\r\n }\r\n return RequestType;\r\n}(AbstractMessageType));\r\nexports.RequestType = RequestType;\r\nvar RequestType1 = /** @class */ (function (_super) {\r\n __extends(RequestType1, _super);\r\n function RequestType1(method) {\r\n var _this = _super.call(this, method, 1) || this;\r\n _this._ = undefined;\r\n return _this;\r\n }\r\n return RequestType1;\r\n}(AbstractMessageType));\r\nexports.RequestType1 = RequestType1;\r\nvar RequestType2 = /** @class */ (function (_super) {\r\n __extends(RequestType2, _super);\r\n function RequestType2(method) {\r\n var _this = _super.call(this, method, 2) || this;\r\n _this._ = undefined;\r\n return _this;\r\n }\r\n return RequestType2;\r\n}(AbstractMessageType));\r\nexports.RequestType2 = RequestType2;\r\nvar RequestType3 = /** @class */ (function (_super) {\r\n __extends(RequestType3, _super);\r\n function RequestType3(method) {\r\n var _this = _super.call(this, method, 3) || this;\r\n _this._ = undefined;\r\n return _this;\r\n }\r\n return RequestType3;\r\n}(AbstractMessageType));\r\nexports.RequestType3 = RequestType3;\r\nvar RequestType4 = /** @class */ (function (_super) {\r\n __extends(RequestType4, _super);\r\n function RequestType4(method) {\r\n var _this = _super.call(this, method, 4) || this;\r\n _this._ = undefined;\r\n return _this;\r\n }\r\n return RequestType4;\r\n}(AbstractMessageType));\r\nexports.RequestType4 = RequestType4;\r\nvar RequestType5 = /** @class */ (function (_super) {\r\n __extends(RequestType5, _super);\r\n function RequestType5(method) {\r\n var _this = _super.call(this, method, 5) || this;\r\n _this._ = undefined;\r\n return _this;\r\n }\r\n return RequestType5;\r\n}(AbstractMessageType));\r\nexports.RequestType5 = RequestType5;\r\nvar RequestType6 = /** @class */ (function (_super) {\r\n __extends(RequestType6, _super);\r\n function RequestType6(method) {\r\n var _this = _super.call(this, method, 6) || this;\r\n _this._ = undefined;\r\n return _this;\r\n }\r\n return RequestType6;\r\n}(AbstractMessageType));\r\nexports.RequestType6 = RequestType6;\r\nvar RequestType7 = /** @class */ (function (_super) {\r\n __extends(RequestType7, _super);\r\n function RequestType7(method) {\r\n var _this = _super.call(this, method, 7) || this;\r\n _this._ = undefined;\r\n return _this;\r\n }\r\n return RequestType7;\r\n}(AbstractMessageType));\r\nexports.RequestType7 = RequestType7;\r\nvar RequestType8 = /** @class */ (function (_super) {\r\n __extends(RequestType8, _super);\r\n function RequestType8(method) {\r\n var _this = _super.call(this, method, 8) || this;\r\n _this._ = undefined;\r\n return _this;\r\n }\r\n return RequestType8;\r\n}(AbstractMessageType));\r\nexports.RequestType8 = RequestType8;\r\nvar RequestType9 = /** @class */ (function (_super) {\r\n __extends(RequestType9, _super);\r\n function RequestType9(method) {\r\n var _this = _super.call(this, method, 9) || this;\r\n _this._ = undefined;\r\n return _this;\r\n }\r\n return RequestType9;\r\n}(AbstractMessageType));\r\nexports.RequestType9 = RequestType9;\r\nvar NotificationType = /** @class */ (function (_super) {\r\n __extends(NotificationType, _super);\r\n function NotificationType(method) {\r\n var _this = _super.call(this, method, 1) || this;\r\n _this._ = undefined;\r\n return _this;\r\n }\r\n return NotificationType;\r\n}(AbstractMessageType));\r\nexports.NotificationType = NotificationType;\r\nvar NotificationType0 = /** @class */ (function (_super) {\r\n __extends(NotificationType0, _super);\r\n function NotificationType0(method) {\r\n var _this = _super.call(this, method, 0) || this;\r\n _this._ = undefined;\r\n return _this;\r\n }\r\n return NotificationType0;\r\n}(AbstractMessageType));\r\nexports.NotificationType0 = NotificationType0;\r\nvar NotificationType1 = /** @class */ (function (_super) {\r\n __extends(NotificationType1, _super);\r\n function NotificationType1(method) {\r\n var _this = _super.call(this, method, 1) || this;\r\n _this._ = undefined;\r\n return _this;\r\n }\r\n return NotificationType1;\r\n}(AbstractMessageType));\r\nexports.NotificationType1 = NotificationType1;\r\nvar NotificationType2 = /** @class */ (function (_super) {\r\n __extends(NotificationType2, _super);\r\n function NotificationType2(method) {\r\n var _this = _super.call(this, method, 2) || this;\r\n _this._ = undefined;\r\n return _this;\r\n }\r\n return NotificationType2;\r\n}(AbstractMessageType));\r\nexports.NotificationType2 = NotificationType2;\r\nvar NotificationType3 = /** @class */ (function (_super) {\r\n __extends(NotificationType3, _super);\r\n function NotificationType3(method) {\r\n var _this = _super.call(this, method, 3) || this;\r\n _this._ = undefined;\r\n return _this;\r\n }\r\n return NotificationType3;\r\n}(AbstractMessageType));\r\nexports.NotificationType3 = NotificationType3;\r\nvar NotificationType4 = /** @class */ (function (_super) {\r\n __extends(NotificationType4, _super);\r\n function NotificationType4(method) {\r\n var _this = _super.call(this, method, 4) || this;\r\n _this._ = undefined;\r\n return _this;\r\n }\r\n return NotificationType4;\r\n}(AbstractMessageType));\r\nexports.NotificationType4 = NotificationType4;\r\nvar NotificationType5 = /** @class */ (function (_super) {\r\n __extends(NotificationType5, _super);\r\n function NotificationType5(method) {\r\n var _this = _super.call(this, method, 5) || this;\r\n _this._ = undefined;\r\n return _this;\r\n }\r\n return NotificationType5;\r\n}(AbstractMessageType));\r\nexports.NotificationType5 = NotificationType5;\r\nvar NotificationType6 = /** @class */ (function (_super) {\r\n __extends(NotificationType6, _super);\r\n function NotificationType6(method) {\r\n var _this = _super.call(this, method, 6) || this;\r\n _this._ = undefined;\r\n return _this;\r\n }\r\n return NotificationType6;\r\n}(AbstractMessageType));\r\nexports.NotificationType6 = NotificationType6;\r\nvar NotificationType7 = /** @class */ (function (_super) {\r\n __extends(NotificationType7, _super);\r\n function NotificationType7(method) {\r\n var _this = _super.call(this, method, 7) || this;\r\n _this._ = undefined;\r\n return _this;\r\n }\r\n return NotificationType7;\r\n}(AbstractMessageType));\r\nexports.NotificationType7 = NotificationType7;\r\nvar NotificationType8 = /** @class */ (function (_super) {\r\n __extends(NotificationType8, _super);\r\n function NotificationType8(method) {\r\n var _this = _super.call(this, method, 8) || this;\r\n _this._ = undefined;\r\n return _this;\r\n }\r\n return NotificationType8;\r\n}(AbstractMessageType));\r\nexports.NotificationType8 = NotificationType8;\r\nvar NotificationType9 = /** @class */ (function (_super) {\r\n __extends(NotificationType9, _super);\r\n function NotificationType9(method) {\r\n var _this = _super.call(this, method, 9) || this;\r\n _this._ = undefined;\r\n return _this;\r\n }\r\n return NotificationType9;\r\n}(AbstractMessageType));\r\nexports.NotificationType9 = NotificationType9;\r\n/**\r\n * Tests if the given message is a request message\r\n */\r\nfunction isRequestMessage(message) {\r\n var candidate = message;\r\n return candidate && is.string(candidate.method) && (is.string(candidate.id) || is.number(candidate.id));\r\n}\r\nexports.isRequestMessage = isRequestMessage;\r\n/**\r\n * Tests if the given message is a notification message\r\n */\r\nfunction isNotificationMessage(message) {\r\n var candidate = message;\r\n return candidate && is.string(candidate.method) && message.id === void 0;\r\n}\r\nexports.isNotificationMessage = isNotificationMessage;\r\n/**\r\n * Tests if the given message is a response message\r\n */\r\nfunction isResponseMessage(message) {\r\n var candidate = message;\r\n return candidate && (candidate.result !== void 0 || !!candidate.error) && (is.string(candidate.id) || is.number(candidate.id) || candidate.id === null);\r\n}\r\nexports.isResponseMessage = isResponseMessage;\r\n","/* --------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n * ------------------------------------------------------------------------------------------ */\r\n'use strict';\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar path_1 = require(\"path\");\r\nvar os_1 = require(\"os\");\r\nvar crypto_1 = require(\"crypto\");\r\nvar net_1 = require(\"net\");\r\nvar messageReader_1 = require(\"./messageReader\");\r\nvar messageWriter_1 = require(\"./messageWriter\");\r\nfunction generateRandomPipeName() {\r\n var randomSuffix = crypto_1.randomBytes(21).toString('hex');\r\n if (process.platform === 'win32') {\r\n return \"\\\\\\\\.\\\\pipe\\\\vscode-jsonrpc-\" + randomSuffix + \"-sock\";\r\n }\r\n else {\r\n // Mac/Unix: use socket file\r\n return path_1.join(os_1.tmpdir(), \"vscode-\" + randomSuffix + \".sock\");\r\n }\r\n}\r\nexports.generateRandomPipeName = generateRandomPipeName;\r\nfunction createClientPipeTransport(pipeName, encoding) {\r\n if (encoding === void 0) { encoding = 'utf-8'; }\r\n var connectResolve;\r\n var connected = new Promise(function (resolve, _reject) {\r\n connectResolve = resolve;\r\n });\r\n return new Promise(function (resolve, reject) {\r\n var server = net_1.createServer(function (socket) {\r\n server.close();\r\n connectResolve([\r\n new messageReader_1.SocketMessageReader(socket, encoding),\r\n new messageWriter_1.SocketMessageWriter(socket, encoding)\r\n ]);\r\n });\r\n server.on('error', reject);\r\n server.listen(pipeName, function () {\r\n server.removeListener('error', reject);\r\n resolve({\r\n onConnected: function () { return connected; }\r\n });\r\n });\r\n });\r\n}\r\nexports.createClientPipeTransport = createClientPipeTransport;\r\nfunction createServerPipeTransport(pipeName, encoding) {\r\n if (encoding === void 0) { encoding = 'utf-8'; }\r\n var socket = net_1.createConnection(pipeName);\r\n return [\r\n new messageReader_1.SocketMessageReader(socket, encoding),\r\n new messageWriter_1.SocketMessageWriter(socket, encoding)\r\n ];\r\n}\r\nexports.createServerPipeTransport = createServerPipeTransport;\r\n","/* --------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n * ------------------------------------------------------------------------------------------ */\r\n'use strict';\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar net_1 = require(\"net\");\r\nvar messageReader_1 = require(\"./messageReader\");\r\nvar messageWriter_1 = require(\"./messageWriter\");\r\nfunction createClientSocketTransport(port, encoding) {\r\n if (encoding === void 0) { encoding = 'utf-8'; }\r\n var connectResolve;\r\n var connected = new Promise(function (resolve, _reject) {\r\n connectResolve = resolve;\r\n });\r\n return new Promise(function (resolve, reject) {\r\n var server = net_1.createServer(function (socket) {\r\n server.close();\r\n connectResolve([\r\n new messageReader_1.SocketMessageReader(socket, encoding),\r\n new messageWriter_1.SocketMessageWriter(socket, encoding)\r\n ]);\r\n });\r\n server.on('error', reject);\r\n server.listen(port, '127.0.0.1', function () {\r\n server.removeListener('error', reject);\r\n resolve({\r\n onConnected: function () { return connected; }\r\n });\r\n });\r\n });\r\n}\r\nexports.createClientSocketTransport = createClientSocketTransport;\r\nfunction createServerSocketTransport(port, encoding) {\r\n if (encoding === void 0) { encoding = 'utf-8'; }\r\n var socket = net_1.createConnection(port, '127.0.0.1');\r\n return [\r\n new messageReader_1.SocketMessageReader(socket, encoding),\r\n new messageWriter_1.SocketMessageWriter(socket, encoding)\r\n ];\r\n}\r\nexports.createServerSocketTransport = createServerSocketTransport;\r\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports[\"default\"] = exports.Vim = void 0;\n\nvar _cm_adapter = _interopRequireDefault(require(\"../cm_adapter\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\nvar Pos = _cm_adapter[\"default\"].Pos;\n\nfunction transformCursor(cm, range) {\n var vim = cm.state.vim;\n if (!vim || vim.insertMode) return range.head;\n var head = vim.sel.head;\n if (!head) return range.head;\n\n if (vim.visualBlock) {\n if (range.head.line != head.line) {\n return;\n }\n }\n\n if (range.from() == range.anchor && !range.empty()) {\n if (range.head.line == head.line && range.head.ch != head.ch) return new Pos(range.head.line, range.head.ch - 1);\n }\n\n return range.head;\n}\n\nvar defaultKeymap = [// Key to key mapping. This goes first to make it possible to override\n// existing mappings.\n{\n keys: \"\",\n type: \"keyToKey\",\n toKeys: \"h\"\n}, {\n keys: \"\",\n type: \"keyToKey\",\n toKeys: \"l\"\n}, {\n keys: \"\",\n type: \"keyToKey\",\n toKeys: \"k\"\n}, {\n keys: \"\",\n type: \"keyToKey\",\n toKeys: \"j\"\n}, {\n keys: \"g\",\n type: \"keyToKey\",\n toKeys: \"gk\"\n}, {\n keys: \"g\",\n type: \"keyToKey\",\n toKeys: \"gj\"\n}, {\n keys: \"\",\n type: \"keyToKey\",\n toKeys: \"l\"\n}, {\n keys: \"\",\n type: \"keyToKey\",\n toKeys: \"h\",\n context: \"normal\"\n}, {\n keys: \"\",\n type: \"keyToKey\",\n toKeys: \"x\",\n context: \"normal\"\n}, {\n keys: \"\",\n type: \"keyToKey\",\n toKeys: \"W\"\n}, {\n keys: \"\",\n type: \"keyToKey\",\n toKeys: \"B\",\n context: \"normal\"\n}, {\n keys: \"\",\n type: \"keyToKey\",\n toKeys: \"w\"\n}, {\n keys: \"\",\n type: \"keyToKey\",\n toKeys: \"b\",\n context: \"normal\"\n}, {\n keys: \"\",\n type: \"keyToKey\",\n toKeys: \"j\"\n}, {\n keys: \"\",\n type: \"keyToKey\",\n toKeys: \"k\"\n}, {\n keys: \"\",\n type: \"keyToKey\",\n toKeys: \"\"\n}, {\n keys: \"\",\n type: \"keyToKey\",\n toKeys: \"\"\n}, {\n keys: \"\",\n type: \"keyToKey\",\n toKeys: \"\",\n context: \"insert\"\n}, {\n keys: \"\",\n type: \"keyToKey\",\n toKeys: \"\",\n context: \"insert\"\n}, {\n keys: \"s\",\n type: \"keyToKey\",\n toKeys: \"cl\",\n context: \"normal\"\n}, {\n keys: \"s\",\n type: \"keyToKey\",\n toKeys: \"c\",\n context: \"visual\"\n}, {\n keys: \"S\",\n type: \"keyToKey\",\n toKeys: \"cc\",\n context: \"normal\"\n}, {\n keys: \"S\",\n type: \"keyToKey\",\n toKeys: \"VdO\",\n context: \"visual\"\n}, {\n keys: \"\",\n type: \"keyToKey\",\n toKeys: \"0\"\n}, {\n keys: \"\",\n type: \"keyToKey\",\n toKeys: \"$\"\n}, {\n keys: \"\",\n type: \"keyToKey\",\n toKeys: \"\"\n}, {\n keys: \"\",\n type: \"keyToKey\",\n toKeys: \"\"\n}, {\n keys: \"\",\n type: \"keyToKey\",\n toKeys: \"j^\",\n context: \"normal\"\n}, {\n keys: \"\",\n type: \"keyToKey\",\n toKeys: \"i\",\n context: \"normal\"\n}, {\n keys: \"\",\n type: \"action\",\n action: \"toggleOverwrite\",\n context: \"insert\"\n}, // Motions\n{\n keys: \"H\",\n type: \"motion\",\n motion: \"moveToTopLine\",\n motionArgs: {\n linewise: true,\n toJumplist: true\n }\n}, {\n keys: \"M\",\n type: \"motion\",\n motion: \"moveToMiddleLine\",\n motionArgs: {\n linewise: true,\n toJumplist: true\n }\n}, {\n keys: \"L\",\n type: \"motion\",\n motion: \"moveToBottomLine\",\n motionArgs: {\n linewise: true,\n toJumplist: true\n }\n}, {\n keys: \"h\",\n type: \"motion\",\n motion: \"moveByCharacters\",\n motionArgs: {\n forward: false\n }\n}, {\n keys: \"l\",\n type: \"motion\",\n motion: \"moveByCharacters\",\n motionArgs: {\n forward: true\n }\n}, {\n keys: \"j\",\n type: \"motion\",\n motion: \"moveByLines\",\n motionArgs: {\n forward: true,\n linewise: true\n }\n}, {\n keys: \"k\",\n type: \"motion\",\n motion: \"moveByLines\",\n motionArgs: {\n forward: false,\n linewise: true\n }\n}, {\n keys: \"gj\",\n type: \"motion\",\n motion: \"moveByDisplayLines\",\n motionArgs: {\n forward: true\n }\n}, {\n keys: \"gk\",\n type: \"motion\",\n motion: \"moveByDisplayLines\",\n motionArgs: {\n forward: false\n }\n}, {\n keys: \"w\",\n type: \"motion\",\n motion: \"moveByWords\",\n motionArgs: {\n forward: true,\n wordEnd: false\n }\n}, {\n keys: \"W\",\n type: \"motion\",\n motion: \"moveByWords\",\n motionArgs: {\n forward: true,\n wordEnd: false,\n bigWord: true\n }\n}, {\n keys: \"e\",\n type: \"motion\",\n motion: \"moveByWords\",\n motionArgs: {\n forward: true,\n wordEnd: true,\n inclusive: true\n }\n}, {\n keys: \"E\",\n type: \"motion\",\n motion: \"moveByWords\",\n motionArgs: {\n forward: true,\n wordEnd: true,\n bigWord: true,\n inclusive: true\n }\n}, {\n keys: \"b\",\n type: \"motion\",\n motion: \"moveByWords\",\n motionArgs: {\n forward: false,\n wordEnd: false\n }\n}, {\n keys: \"B\",\n type: \"motion\",\n motion: \"moveByWords\",\n motionArgs: {\n forward: false,\n wordEnd: false,\n bigWord: true\n }\n}, {\n keys: \"ge\",\n type: \"motion\",\n motion: \"moveByWords\",\n motionArgs: {\n forward: false,\n wordEnd: true,\n inclusive: true\n }\n}, {\n keys: \"gE\",\n type: \"motion\",\n motion: \"moveByWords\",\n motionArgs: {\n forward: false,\n wordEnd: true,\n bigWord: true,\n inclusive: true\n }\n}, {\n keys: \"{\",\n type: \"motion\",\n motion: \"moveByParagraph\",\n motionArgs: {\n forward: false,\n toJumplist: true\n }\n}, {\n keys: \"}\",\n type: \"motion\",\n motion: \"moveByParagraph\",\n motionArgs: {\n forward: true,\n toJumplist: true\n }\n}, {\n keys: \"(\",\n type: \"motion\",\n motion: \"moveBySentence\",\n motionArgs: {\n forward: false\n }\n}, {\n keys: \")\",\n type: \"motion\",\n motion: \"moveBySentence\",\n motionArgs: {\n forward: true\n }\n}, {\n keys: \"\",\n type: \"motion\",\n motion: \"moveByPage\",\n motionArgs: {\n forward: true\n }\n}, {\n keys: \"\",\n type: \"motion\",\n motion: \"moveByPage\",\n motionArgs: {\n forward: false\n }\n}, {\n keys: \"\",\n type: \"motion\",\n motion: \"moveByScroll\",\n motionArgs: {\n forward: true,\n explicitRepeat: true\n }\n}, {\n keys: \"\",\n type: \"motion\",\n motion: \"moveByScroll\",\n motionArgs: {\n forward: false,\n explicitRepeat: true\n }\n}, {\n keys: \"gg\",\n type: \"motion\",\n motion: \"moveToLineOrEdgeOfDocument\",\n motionArgs: {\n forward: false,\n explicitRepeat: true,\n linewise: true,\n toJumplist: true\n }\n}, {\n keys: \"G\",\n type: \"motion\",\n motion: \"moveToLineOrEdgeOfDocument\",\n motionArgs: {\n forward: true,\n explicitRepeat: true,\n linewise: true,\n toJumplist: true\n }\n}, {\n keys: \"g$\",\n type: \"motion\",\n motion: \"moveToEndOfDisplayLine\"\n}, {\n keys: \"g^\",\n type: \"motion\",\n motion: \"moveToStartOfDisplayLine\"\n}, {\n keys: \"g0\",\n type: \"motion\",\n motion: \"moveToStartOfDisplayLine\"\n}, {\n keys: \"0\",\n type: \"motion\",\n motion: \"moveToStartOfLine\"\n}, {\n keys: \"^\",\n type: \"motion\",\n motion: \"moveToFirstNonWhiteSpaceCharacter\"\n}, {\n keys: \"+\",\n type: \"motion\",\n motion: \"moveByLines\",\n motionArgs: {\n forward: true,\n toFirstChar: true\n }\n}, {\n keys: \"-\",\n type: \"motion\",\n motion: \"moveByLines\",\n motionArgs: {\n forward: false,\n toFirstChar: true\n }\n}, {\n keys: \"_\",\n type: \"motion\",\n motion: \"moveByLines\",\n motionArgs: {\n forward: true,\n toFirstChar: true,\n repeatOffset: -1\n }\n}, {\n keys: \"$\",\n type: \"motion\",\n motion: \"moveToEol\",\n motionArgs: {\n inclusive: true\n }\n}, {\n keys: \"%\",\n type: \"motion\",\n motion: \"moveToMatchedSymbol\",\n motionArgs: {\n inclusive: true,\n toJumplist: true\n }\n}, {\n keys: \"f\",\n type: \"motion\",\n motion: \"moveToCharacter\",\n motionArgs: {\n forward: true,\n inclusive: true\n }\n}, {\n keys: \"F\",\n type: \"motion\",\n motion: \"moveToCharacter\",\n motionArgs: {\n forward: false\n }\n}, {\n keys: \"t\",\n type: \"motion\",\n motion: \"moveTillCharacter\",\n motionArgs: {\n forward: true,\n inclusive: true\n }\n}, {\n keys: \"T\",\n type: \"motion\",\n motion: \"moveTillCharacter\",\n motionArgs: {\n forward: false\n }\n}, {\n keys: \";\",\n type: \"motion\",\n motion: \"repeatLastCharacterSearch\",\n motionArgs: {\n forward: true\n }\n}, {\n keys: \",\",\n type: \"motion\",\n motion: \"repeatLastCharacterSearch\",\n motionArgs: {\n forward: false\n }\n}, {\n keys: \"'\",\n type: \"motion\",\n motion: \"goToMark\",\n motionArgs: {\n toJumplist: true,\n linewise: true\n }\n}, {\n keys: \"`\",\n type: \"motion\",\n motion: \"goToMark\",\n motionArgs: {\n toJumplist: true\n }\n}, {\n keys: \"]`\",\n type: \"motion\",\n motion: \"jumpToMark\",\n motionArgs: {\n forward: true\n }\n}, {\n keys: \"[`\",\n type: \"motion\",\n motion: \"jumpToMark\",\n motionArgs: {\n forward: false\n }\n}, {\n keys: \"]'\",\n type: \"motion\",\n motion: \"jumpToMark\",\n motionArgs: {\n forward: true,\n linewise: true\n }\n}, {\n keys: \"['\",\n type: \"motion\",\n motion: \"jumpToMark\",\n motionArgs: {\n forward: false,\n linewise: true\n }\n}, // the next two aren't motions but must come before more general motion declarations\n{\n keys: \"]p\",\n type: \"action\",\n action: \"paste\",\n isEdit: true,\n actionArgs: {\n after: true,\n isEdit: true,\n matchIndent: true\n }\n}, {\n keys: \"[p\",\n type: \"action\",\n action: \"paste\",\n isEdit: true,\n actionArgs: {\n after: false,\n isEdit: true,\n matchIndent: true\n }\n}, {\n keys: \"]\",\n type: \"motion\",\n motion: \"moveToSymbol\",\n motionArgs: {\n forward: true,\n toJumplist: true\n }\n}, {\n keys: \"[\",\n type: \"motion\",\n motion: \"moveToSymbol\",\n motionArgs: {\n forward: false,\n toJumplist: true\n }\n}, {\n keys: \"|\",\n type: \"motion\",\n motion: \"moveToColumn\"\n}, {\n keys: \"o\",\n type: \"motion\",\n motion: \"moveToOtherHighlightedEnd\",\n context: \"visual\"\n}, {\n keys: \"O\",\n type: \"motion\",\n motion: \"moveToOtherHighlightedEnd\",\n motionArgs: {\n sameLine: true\n },\n context: \"visual\"\n}, // Operators\n{\n keys: \"d\",\n type: \"operator\",\n operator: \"delete\"\n}, {\n keys: \"y\",\n type: \"operator\",\n operator: \"yank\"\n}, {\n keys: \"c\",\n type: \"operator\",\n operator: \"change\"\n}, {\n keys: \"=\",\n type: \"operator\",\n operator: \"indentAuto\"\n}, {\n keys: \">\",\n type: \"operator\",\n operator: \"indent\",\n operatorArgs: {\n indentRight: true\n }\n}, {\n keys: \"<\",\n type: \"operator\",\n operator: \"indent\",\n operatorArgs: {\n indentRight: false\n }\n}, {\n keys: \"g~\",\n type: \"operator\",\n operator: \"changeCase\"\n}, {\n keys: \"gu\",\n type: \"operator\",\n operator: \"changeCase\",\n operatorArgs: {\n toLower: true\n },\n isEdit: true\n}, {\n keys: \"gU\",\n type: \"operator\",\n operator: \"changeCase\",\n operatorArgs: {\n toLower: false\n },\n isEdit: true\n}, {\n keys: \"n\",\n type: \"motion\",\n motion: \"findNext\",\n motionArgs: {\n forward: true,\n toJumplist: true\n }\n}, {\n keys: \"N\",\n type: \"motion\",\n motion: \"findNext\",\n motionArgs: {\n forward: false,\n toJumplist: true\n }\n}, {\n keys: \"gn\",\n type: \"motion\",\n motion: \"findAndSelectNextInclusive\",\n motionArgs: {\n forward: true\n }\n}, {\n keys: \"gN\",\n type: \"motion\",\n motion: \"findAndSelectNextInclusive\",\n motionArgs: {\n forward: false\n }\n}, // Operator-Motion dual commands\n{\n keys: \"x\",\n type: \"operatorMotion\",\n operator: \"delete\",\n motion: \"moveByCharacters\",\n motionArgs: {\n forward: true\n },\n operatorMotionArgs: {\n visualLine: false\n }\n}, {\n keys: \"X\",\n type: \"operatorMotion\",\n operator: \"delete\",\n motion: \"moveByCharacters\",\n motionArgs: {\n forward: false\n },\n operatorMotionArgs: {\n visualLine: true\n }\n}, {\n keys: \"D\",\n type: \"operatorMotion\",\n operator: \"delete\",\n motion: \"moveToEol\",\n motionArgs: {\n inclusive: true\n },\n context: \"normal\"\n}, {\n keys: \"D\",\n type: \"operator\",\n operator: \"delete\",\n operatorArgs: {\n linewise: true\n },\n context: \"visual\"\n}, {\n keys: \"Y\",\n type: \"operatorMotion\",\n operator: \"yank\",\n motion: \"expandToLine\",\n motionArgs: {\n linewise: true\n },\n context: \"normal\"\n}, {\n keys: \"Y\",\n type: \"operator\",\n operator: \"yank\",\n operatorArgs: {\n linewise: true\n },\n context: \"visual\"\n}, {\n keys: \"C\",\n type: \"operatorMotion\",\n operator: \"change\",\n motion: \"moveToEol\",\n motionArgs: {\n inclusive: true\n },\n context: \"normal\"\n}, {\n keys: \"C\",\n type: \"operator\",\n operator: \"change\",\n operatorArgs: {\n linewise: true\n },\n context: \"visual\"\n}, {\n keys: \"~\",\n type: \"operatorMotion\",\n operator: \"changeCase\",\n motion: \"moveByCharacters\",\n motionArgs: {\n forward: true\n },\n operatorArgs: {\n shouldMoveCursor: true\n },\n context: \"normal\"\n}, {\n keys: \"~\",\n type: \"operator\",\n operator: \"changeCase\",\n context: \"visual\"\n}, {\n keys: \"\",\n type: \"operatorMotion\",\n operator: \"delete\",\n motion: \"moveToStartOfLine\",\n context: \"insert\"\n}, {\n keys: \"\",\n type: \"operatorMotion\",\n operator: \"delete\",\n motion: \"moveByWords\",\n motionArgs: {\n forward: false,\n wordEnd: false\n },\n context: \"insert\"\n}, //ignore C-w in normal mode\n{\n keys: \"\",\n type: \"idle\",\n context: \"normal\"\n}, // Actions\n{\n keys: \"\",\n type: \"action\",\n action: \"jumpListWalk\",\n actionArgs: {\n forward: true\n }\n}, {\n keys: \"\",\n type: \"action\",\n action: \"jumpListWalk\",\n actionArgs: {\n forward: false\n }\n}, {\n keys: \"\",\n type: \"action\",\n action: \"scroll\",\n actionArgs: {\n forward: true,\n linewise: true\n }\n}, {\n keys: \"\",\n type: \"action\",\n action: \"scroll\",\n actionArgs: {\n forward: false,\n linewise: true\n }\n}, {\n keys: \"a\",\n type: \"action\",\n action: \"enterInsertMode\",\n isEdit: true,\n actionArgs: {\n insertAt: \"charAfter\"\n },\n context: \"normal\"\n}, {\n keys: \"A\",\n type: \"action\",\n action: \"enterInsertMode\",\n isEdit: true,\n actionArgs: {\n insertAt: \"eol\"\n },\n context: \"normal\"\n}, {\n keys: \"A\",\n type: \"action\",\n action: \"enterInsertMode\",\n isEdit: true,\n actionArgs: {\n insertAt: \"endOfSelectedArea\"\n },\n context: \"visual\"\n}, {\n keys: \"i\",\n type: \"action\",\n action: \"enterInsertMode\",\n isEdit: true,\n actionArgs: {\n insertAt: \"inplace\"\n },\n context: \"normal\"\n}, {\n keys: \"gi\",\n type: \"action\",\n action: \"enterInsertMode\",\n isEdit: true,\n actionArgs: {\n insertAt: \"lastEdit\"\n },\n context: \"normal\"\n}, {\n keys: \"I\",\n type: \"action\",\n action: \"enterInsertMode\",\n isEdit: true,\n actionArgs: {\n insertAt: \"firstNonBlank\"\n },\n context: \"normal\"\n}, {\n keys: \"gI\",\n type: \"action\",\n action: \"enterInsertMode\",\n isEdit: true,\n actionArgs: {\n insertAt: \"bol\"\n },\n context: \"normal\"\n}, {\n keys: \"I\",\n type: \"action\",\n action: \"enterInsertMode\",\n isEdit: true,\n actionArgs: {\n insertAt: \"startOfSelectedArea\"\n },\n context: \"visual\"\n}, {\n keys: \"o\",\n type: \"action\",\n action: \"newLineAndEnterInsertMode\",\n isEdit: true,\n interlaceInsertRepeat: true,\n actionArgs: {\n after: true\n },\n context: \"normal\"\n}, {\n keys: \"O\",\n type: \"action\",\n action: \"newLineAndEnterInsertMode\",\n isEdit: true,\n interlaceInsertRepeat: true,\n actionArgs: {\n after: false\n },\n context: \"normal\"\n}, {\n keys: \"v\",\n type: \"action\",\n action: \"toggleVisualMode\"\n}, {\n keys: \"V\",\n type: \"action\",\n action: \"toggleVisualMode\",\n actionArgs: {\n linewise: true\n }\n}, {\n keys: \"\",\n type: \"action\",\n action: \"toggleVisualMode\",\n actionArgs: {\n blockwise: true\n }\n}, {\n keys: \"\",\n type: \"action\",\n action: \"toggleVisualMode\",\n actionArgs: {\n blockwise: true\n }\n}, {\n keys: \"gv\",\n type: \"action\",\n action: \"reselectLastSelection\"\n}, {\n keys: \"J\",\n type: \"action\",\n action: \"joinLines\",\n isEdit: true\n}, {\n keys: \"gJ\",\n type: \"action\",\n action: \"joinLines\",\n actionArgs: {\n keepSpaces: true\n },\n isEdit: true\n}, {\n keys: \"p\",\n type: \"action\",\n action: \"paste\",\n isEdit: true,\n actionArgs: {\n after: true,\n isEdit: true\n }\n}, {\n keys: \"P\",\n type: \"action\",\n action: \"paste\",\n isEdit: true,\n actionArgs: {\n after: false,\n isEdit: true\n }\n}, {\n keys: \"r\",\n type: \"action\",\n action: \"replace\",\n isEdit: true\n}, {\n keys: \"@\",\n type: \"action\",\n action: \"replayMacro\"\n}, {\n keys: \"q\",\n type: \"action\",\n action: \"enterMacroRecordMode\"\n}, // Handle Replace-mode as a special case of insert mode.\n{\n keys: \"R\",\n type: \"action\",\n action: \"enterInsertMode\",\n isEdit: true,\n actionArgs: {\n replace: true\n },\n context: \"normal\"\n}, {\n keys: \"R\",\n type: \"operator\",\n operator: \"change\",\n operatorArgs: {\n linewise: true,\n fullLine: true\n },\n context: \"visual\",\n exitVisualBlock: true\n}, {\n keys: \"u\",\n type: \"action\",\n action: \"undo\",\n context: \"normal\"\n}, {\n keys: \"u\",\n type: \"operator\",\n operator: \"changeCase\",\n operatorArgs: {\n toLower: true\n },\n context: \"visual\",\n isEdit: true\n}, {\n keys: \"U\",\n type: \"operator\",\n operator: \"changeCase\",\n operatorArgs: {\n toLower: false\n },\n context: \"visual\",\n isEdit: true\n}, {\n keys: \"\",\n type: \"action\",\n action: \"redo\"\n}, {\n keys: \"m\",\n type: \"action\",\n action: \"setMark\"\n}, {\n keys: '\"',\n type: \"action\",\n action: \"setRegister\"\n}, {\n keys: \"zz\",\n type: \"action\",\n action: \"scrollToCursor\",\n actionArgs: {\n position: \"center\"\n }\n}, {\n keys: \"z.\",\n type: \"action\",\n action: \"scrollToCursor\",\n actionArgs: {\n position: \"center\"\n },\n motion: \"moveToFirstNonWhiteSpaceCharacter\"\n}, {\n keys: \"zt\",\n type: \"action\",\n action: \"scrollToCursor\",\n actionArgs: {\n position: \"top\"\n }\n}, {\n keys: \"z\",\n type: \"action\",\n action: \"scrollToCursor\",\n actionArgs: {\n position: \"top\"\n },\n motion: \"moveToFirstNonWhiteSpaceCharacter\"\n}, {\n keys: \"z-\",\n type: \"action\",\n action: \"scrollToCursor\",\n actionArgs: {\n position: \"bottom\"\n }\n}, {\n keys: \"zb\",\n type: \"action\",\n action: \"scrollToCursor\",\n actionArgs: {\n position: \"bottom\"\n },\n motion: \"moveToFirstNonWhiteSpaceCharacter\"\n}, {\n keys: \".\",\n type: \"action\",\n action: \"repeatLastEdit\"\n}, {\n keys: \"\",\n type: \"action\",\n action: \"incrementNumberToken\",\n isEdit: true,\n actionArgs: {\n increase: true,\n backtrack: false\n }\n}, {\n keys: \"\",\n type: \"action\",\n action: \"incrementNumberToken\",\n isEdit: true,\n actionArgs: {\n increase: false,\n backtrack: false\n }\n}, {\n keys: \"\",\n type: \"action\",\n action: \"indent\",\n actionArgs: {\n indentRight: true\n },\n context: \"insert\"\n}, {\n keys: \"\",\n type: \"action\",\n action: \"indent\",\n actionArgs: {\n indentRight: false\n },\n context: \"insert\"\n}, // Text object motions\n{\n keys: \"a\",\n type: \"motion\",\n motion: \"textObjectManipulation\"\n}, {\n keys: \"i\",\n type: \"motion\",\n motion: \"textObjectManipulation\",\n motionArgs: {\n textObjectInner: true\n }\n}, // Search\n{\n keys: \"/\",\n type: \"search\",\n searchArgs: {\n forward: true,\n querySrc: \"prompt\",\n toJumplist: true\n }\n}, {\n keys: \"?\",\n type: \"search\",\n searchArgs: {\n forward: false,\n querySrc: \"prompt\",\n toJumplist: true\n }\n}, {\n keys: \"*\",\n type: \"search\",\n searchArgs: {\n forward: true,\n querySrc: \"wordUnderCursor\",\n wholeWordOnly: true,\n toJumplist: true\n }\n}, {\n keys: \"#\",\n type: \"search\",\n searchArgs: {\n forward: false,\n querySrc: \"wordUnderCursor\",\n wholeWordOnly: true,\n toJumplist: true\n }\n}, {\n keys: \"g*\",\n type: \"search\",\n searchArgs: {\n forward: true,\n querySrc: \"wordUnderCursor\",\n toJumplist: true\n }\n}, {\n keys: \"g#\",\n type: \"search\",\n searchArgs: {\n forward: false,\n querySrc: \"wordUnderCursor\",\n toJumplist: true\n }\n}, // Ex command\n{\n keys: \":\",\n type: \"ex\"\n}];\nvar defaultKeymapLength = defaultKeymap.length;\n/**\n * Ex commands\n * Care must be taken when adding to the default Ex command map. For any\n * pair of commands that have a shared prefix, at least one of their\n * shortNames must not match the prefix of the other command.\n */\n\nvar defaultExCommandMap = [{\n name: \"colorscheme\",\n shortName: \"colo\"\n}, {\n name: \"map\"\n}, {\n name: \"imap\",\n shortName: \"im\"\n}, {\n name: \"nmap\",\n shortName: \"nm\"\n}, {\n name: \"vmap\",\n shortName: \"vm\"\n}, {\n name: \"unmap\"\n}, {\n name: \"write\",\n shortName: \"w\"\n}, {\n name: \"undo\",\n shortName: \"u\"\n}, {\n name: \"redo\",\n shortName: \"red\"\n}, {\n name: \"set\",\n shortName: \"se\"\n}, {\n name: \"setlocal\",\n shortName: \"setl\"\n}, {\n name: \"setglobal\",\n shortName: \"setg\"\n}, {\n name: \"sort\",\n shortName: \"sor\"\n}, {\n name: \"substitute\",\n shortName: \"s\",\n possiblyAsync: true\n}, {\n name: \"nohlsearch\",\n shortName: \"noh\"\n}, {\n name: \"yank\",\n shortName: \"y\"\n}, {\n name: \"delmarks\",\n shortName: \"delm\"\n}, {\n name: \"registers\",\n shortName: \"reg\",\n excludeFromCommandHistory: true\n}, {\n name: \"vglobal\",\n shortName: \"v\"\n}, {\n name: \"global\",\n shortName: \"g\"\n}];\n\nvar Vim = function Vim() {\n function enterVimMode(cm) {\n cm.setOption(\"disableInput\", true);\n cm.setOption(\"showCursorWhenSelecting\", false);\n\n _cm_adapter[\"default\"].signal(cm, \"vim-mode-change\", {\n mode: \"normal\"\n });\n\n cm.on(\"cursorActivity\", onCursorActivity);\n maybeInitVimState(cm); // CodeMirror.on(cm.getInputField(), 'paste', getOnPasteFn(cm));\n\n cm.enterVimMode();\n }\n\n function leaveVimMode(cm) {\n cm.setOption(\"disableInput\", false);\n cm.off(\"cursorActivity\", onCursorActivity); // CodeMirror.off(cm.getInputField(), 'paste', getOnPasteFn(cm));\n\n cm.state.vim = null;\n if (highlightTimeout) clearTimeout(highlightTimeout);\n cm.leaveVimMode();\n }\n\n function detachVimMap(cm, next) {\n cm.attached = false;\n\n if (this == _cm_adapter[\"default\"].keyMap.vim) {\n cm.options.$customCursor = null; // CodeMirror.rmClass(cm.getWrapperElement(), \"cm-fat-cursor\");\n }\n\n if (!next || next.attach != attachVimMap) leaveVimMode(cm);\n }\n\n function attachVimMap(cm, prev) {\n if (this == _cm_adapter[\"default\"].keyMap.vim) {\n cm.attached = true;\n if (cm.curOp) cm.curOp.selectionChanged = true;\n cm.options.$customCursor = transformCursor;\n }\n\n if (!prev || prev.attach != attachVimMap) enterVimMode(cm);\n } // Deprecated, simply setting the keymap works again.\n\n\n _cm_adapter[\"default\"].defineOption(\"vimMode\", false, function (cm, val, prev) {\n if (val && cm.getOption(\"keyMap\") != \"vim\") cm.setOption(\"keyMap\", \"vim\");else if (!val && prev != _cm_adapter[\"default\"].Init && /^vim/.test(cm.getOption(\"keyMap\"))) cm.setOption(\"keyMap\", \"default\");\n });\n\n function cmKey(key, cm) {\n if (!cm) {\n return undefined;\n }\n\n if (this[key]) {\n return this[key];\n }\n\n var vimKey = cmKeyToVimKey(key);\n\n if (!vimKey) {\n return false;\n }\n\n var cmd = vimApi.findKey(cm, vimKey);\n\n if (typeof cmd == \"function\") {\n _cm_adapter[\"default\"].signal(cm, \"vim-keypress\", vimKey);\n }\n\n return cmd;\n }\n\n var modifiers = {\n Shift: \"S\",\n Ctrl: \"C\",\n Alt: \"A\",\n Cmd: \"D\",\n Mod: \"A\",\n CapsLock: \"\"\n };\n var specialKeys = {\n Enter: \"CR\",\n Backspace: \"BS\",\n Delete: \"Del\",\n Insert: \"Ins\"\n };\n\n function cmKeyToVimKey(key) {\n if (key.charAt(0) == \"'\") {\n // Keypress character binding of format \"'a'\"\n return key.charAt(1);\n }\n\n if (key === \"AltGraph\") {\n return false;\n }\n\n var pieces = key.split(/-(?!$)/);\n var lastPiece = pieces[pieces.length - 1];\n\n if (pieces.length == 1 && pieces[0].length == 1) {\n // No-modifier bindings use literal character bindings above. Skip.\n return false;\n } else if (pieces.length == 2 && pieces[0] == \"Shift\" && lastPiece.length == 1) {\n // Ignore Shift+char bindings as they should be handled by literal character.\n return false;\n }\n\n var hasCharacter = false;\n\n for (var i = 0; i < pieces.length; i++) {\n var piece = pieces[i];\n\n if (piece in modifiers) {\n pieces[i] = modifiers[piece];\n } else {\n hasCharacter = true;\n }\n\n if (piece in specialKeys) {\n pieces[i] = specialKeys[piece];\n }\n }\n\n if (!hasCharacter) {\n // Vim does not support modifier only keys.\n return false;\n } // TODO: Current bindings expect the character to be lower case, but\n // it looks like vim key notation uses upper case.\n\n\n if (isUpperCase(lastPiece)) {\n pieces[pieces.length - 1] = lastPiece.toLowerCase();\n }\n\n return \"<\" + pieces.join(\"-\") + \">\";\n } // function getOnPasteFn(cm) {\n // var vim = cm.state.vim;\n // if (!vim.onPasteFn) {\n // vim.onPasteFn = function () {\n // if (!vim.insertMode) {\n // cm.setCursor(offsetCursor(cm.getCursor(), 0, 1));\n // actions.enterInsertMode(cm, {}, vim);\n // }\n // };\n // }\n // return vim.onPasteFn;\n // }\n\n\n var numberRegex = /[\\d]/;\n var wordCharTest = [_cm_adapter[\"default\"].isWordChar, function (ch) {\n return ch && !_cm_adapter[\"default\"].isWordChar(ch) && !/\\s/.test(ch);\n }],\n bigWordCharTest = [function (ch) {\n return /\\S/.test(ch);\n }];\n\n function makeKeyRange(start, size) {\n var keys = [];\n\n for (var i = start; i < start + size; i++) {\n keys.push(String.fromCharCode(i));\n }\n\n return keys;\n }\n\n var upperCaseAlphabet = makeKeyRange(65, 26);\n var lowerCaseAlphabet = makeKeyRange(97, 26);\n var numbers = makeKeyRange(48, 10);\n var validMarks = [].concat(upperCaseAlphabet, lowerCaseAlphabet, numbers, [\"<\", \">\"]);\n var validRegisters = [].concat(upperCaseAlphabet, lowerCaseAlphabet, numbers, [\"-\", '\"', \".\", \":\", \"_\", \"/\"]);\n var upperCaseChars;\n\n try {\n upperCaseChars = new RegExp(\"^[\\\\p{Lu}]$\", \"u\");\n } catch (_) {\n upperCaseChars = /^[A-Z]$/;\n }\n\n function isLine(cm, line) {\n return line >= cm.firstLine() && line <= cm.lastLine();\n }\n\n function isLowerCase(k) {\n return /^[a-z]$/.test(k);\n }\n\n function isMatchableSymbol(k) {\n return \"()[]{}\".indexOf(k) != -1;\n }\n\n function isNumber(k) {\n return numberRegex.test(k);\n }\n\n function isUpperCase(k) {\n return upperCaseChars.test(k);\n }\n\n function isWhiteSpaceString(k) {\n return /^\\s*$/.test(k);\n }\n\n function isEndOfSentenceSymbol(k) {\n return \".?!\".indexOf(k) != -1;\n }\n\n function inArray(val, arr) {\n for (var i = 0; i < arr.length; i++) {\n if (arr[i] == val) {\n return true;\n }\n }\n\n return false;\n }\n\n var options = {};\n\n function defineOption(name, defaultValue, type, aliases, callback) {\n if (defaultValue === undefined && !callback) {\n throw Error(\"defaultValue is required unless callback is provided\");\n }\n\n if (!type) {\n type = \"string\";\n }\n\n options[name] = {\n type: type,\n defaultValue: defaultValue,\n callback: callback\n };\n\n if (aliases) {\n for (var i = 0; i < aliases.length; i++) {\n options[aliases[i]] = options[name];\n }\n }\n\n if (defaultValue) {\n setOption(name, defaultValue);\n }\n }\n\n function setOption(name, value, cm, cfg) {\n var option = options[name];\n cfg = cfg || {};\n var scope = cfg.scope;\n\n if (!option) {\n return new Error(\"Unknown option: \" + name);\n }\n\n if (option.type == \"boolean\") {\n if (value && value !== true) {\n return new Error(\"Invalid argument: \" + name + \"=\" + value);\n } else if (value !== false) {\n // Boolean options are set to true if value is not defined.\n value = true;\n }\n }\n\n if (option.callback) {\n if (scope !== \"local\") {\n option.callback(value, undefined);\n }\n\n if (scope !== \"global\" && cm) {\n option.callback(value, cm);\n }\n } else {\n if (scope !== \"local\") {\n option.value = option.type == \"boolean\" ? !!value : value;\n }\n\n if (scope !== \"global\" && cm) {\n cm.state.vim.options[name] = {\n value: value\n };\n }\n }\n }\n\n function getOption(name, cm, cfg) {\n var option = options[name];\n cfg = cfg || {};\n var scope = cfg.scope;\n\n if (!option) {\n return new Error(\"Unknown option: \" + name);\n }\n\n if (option.callback) {\n var local = cm && option.callback(undefined, cm);\n\n if (scope !== \"global\" && local !== undefined) {\n return local;\n }\n\n if (scope !== \"local\") {\n return option.callback();\n }\n\n return;\n } else {\n var local = scope !== \"global\" && cm && cm.state.vim.options[name];\n return (local || scope !== \"local\" && option || {}).value;\n }\n }\n\n defineOption(\"filetype\", undefined, \"string\", [\"ft\"], function (name, cm) {\n // Option is local. Do nothing for global.\n if (cm === undefined) {\n return;\n } // The 'filetype' option proxies to the CodeMirror 'mode' option.\n\n\n if (name === undefined) {\n var mode = cm.getOption(\"mode\");\n return mode == \"null\" ? \"\" : mode;\n } else {\n var mode = name == \"\" ? \"null\" : name;\n cm.setOption(\"mode\", mode);\n }\n });\n\n var createCircularJumpList = function createCircularJumpList() {\n var size = 100;\n var pointer = -1;\n var head = 0;\n var tail = 0;\n var buffer = new Array(size);\n\n function add(cm, oldCur, newCur) {\n var current = pointer % size;\n var curMark = buffer[current];\n\n function useNextSlot(cursor) {\n var next = ++pointer % size;\n var trashMark = buffer[next];\n\n if (trashMark) {\n trashMark.clear();\n }\n\n buffer[next] = cm.setBookmark(cursor);\n }\n\n if (curMark) {\n var markPos = curMark.find(); // avoid recording redundant cursor position\n\n if (markPos && !cursorEqual(markPos, oldCur)) {\n useNextSlot(oldCur);\n }\n } else {\n useNextSlot(oldCur);\n }\n\n useNextSlot(newCur);\n head = pointer;\n tail = pointer - size + 1;\n\n if (tail < 0) {\n tail = 0;\n }\n }\n\n function move(cm, offset) {\n pointer += offset;\n\n if (pointer > head) {\n pointer = head;\n } else if (pointer < tail) {\n pointer = tail;\n }\n\n var mark = buffer[(size + pointer) % size]; // skip marks that are temporarily removed from text buffer\n\n if (mark && !mark.find()) {\n var inc = offset > 0 ? 1 : -1;\n var newCur;\n var oldCur = cm.getCursor();\n\n do {\n pointer += inc;\n mark = buffer[(size + pointer) % size]; // skip marks that are the same as current position\n\n if (mark && (newCur = mark.find()) && !cursorEqual(oldCur, newCur)) {\n break;\n }\n } while (pointer < head && pointer > tail);\n }\n\n return mark;\n }\n\n function find(cm, offset) {\n var oldPointer = pointer;\n var mark = move(cm, offset);\n pointer = oldPointer;\n return mark && mark.find();\n }\n\n return {\n cachedCursor: undefined,\n //used for # and * jumps\n add: add,\n find: find,\n move: move\n };\n }; // Returns an object to track the changes associated insert mode. It\n // clones the object that is passed in, or creates an empty object one if\n // none is provided.\n\n\n var createInsertModeChanges = function createInsertModeChanges(c) {\n if (c) {\n // Copy construction\n return {\n changes: c.changes,\n expectCursorActivityForChange: c.expectCursorActivityForChange\n };\n }\n\n return {\n // Change list\n changes: [],\n // Set to true on change, false on cursorActivity.\n expectCursorActivityForChange: false\n };\n };\n\n function MacroModeState() {\n this.latestRegister = undefined;\n this.isPlaying = false;\n this.isRecording = false;\n this.replaySearchQueries = [];\n this.onRecordingDone = undefined;\n this.lastInsertModeChanges = createInsertModeChanges();\n }\n\n MacroModeState.prototype = {\n exitMacroRecordMode: function exitMacroRecordMode() {\n var macroModeState = vimGlobalState.macroModeState;\n\n if (macroModeState.onRecordingDone) {\n macroModeState.onRecordingDone(); // close dialog\n }\n\n macroModeState.onRecordingDone = undefined;\n macroModeState.isRecording = false;\n },\n enterMacroRecordMode: function enterMacroRecordMode(cm, registerName) {\n var register = vimGlobalState.registerController.getRegister(registerName);\n\n if (register) {\n register.clear();\n this.latestRegister = registerName;\n\n if (cm.openDialog) {\n this.onRecordingDone = cm.openDialog(document.createTextNode(\"(recording)[\" + registerName + \"]\"), null, {\n bottom: true\n });\n }\n\n this.isRecording = true;\n }\n }\n };\n\n function maybeInitVimState(cm) {\n if (!cm.state.vim) {\n // Store instance state in the CodeMirror object.\n cm.state.vim = {\n inputState: new InputState(),\n // Vim's input state that triggered the last edit, used to repeat\n // motions and operators with '.'.\n lastEditInputState: undefined,\n // Vim's action command before the last edit, used to repeat actions\n // with '.' and insert mode repeat.\n lastEditActionCommand: undefined,\n // When using jk for navigation, if you move from a longer line to a\n // shorter line, the cursor may clip to the end of the shorter line.\n // If j is pressed again and cursor goes to the next line, the\n // cursor should go back to its horizontal position on the longer\n // line if it can. This is to keep track of the horizontal position.\n lastHPos: -1,\n // Doing the same with screen-position for gj/gk\n lastHSPos: -1,\n // The last motion command run. Cleared if a non-motion command gets\n // executed in between.\n lastMotion: null,\n marks: {},\n insertMode: false,\n // Repeat count for changes made in insert mode, triggered by key\n // sequences like 3,i. Only exists when insertMode is true.\n insertModeRepeat: undefined,\n visualMode: false,\n // If we are in visual line mode. No effect if visualMode is false.\n visualLine: false,\n visualBlock: false,\n lastSelection: null,\n lastPastedText: null,\n sel: {},\n // Buffer-local/window-local values of vim options.\n options: {}\n };\n }\n\n return cm.state.vim;\n }\n\n var vimGlobalState;\n\n function resetVimGlobalState() {\n vimGlobalState = {\n // The current search query.\n searchQuery: null,\n // Whether we are searching backwards.\n searchIsReversed: false,\n // Replace part of the last substituted pattern\n lastSubstituteReplacePart: undefined,\n jumpList: createCircularJumpList(),\n macroModeState: new MacroModeState(),\n // Recording latest f, t, F or T motion command.\n lastCharacterSearch: {\n increment: 0,\n forward: true,\n selectedCharacter: \"\"\n },\n registerController: new RegisterController({}),\n // search history buffer\n searchHistoryController: new HistoryController(),\n // ex Command history buffer\n exCommandHistoryController: new HistoryController()\n };\n\n for (var optionName in options) {\n var option = options[optionName];\n option.value = option.defaultValue;\n }\n }\n\n var lastInsertModeKeyTimer;\n var vimApi = {\n buildKeyMap: function buildKeyMap() {// TODO: Convert keymap into dictionary format for fast lookup.\n },\n // Testing hook, though it might be useful to expose the register\n // controller anyway.\n getRegisterController: function getRegisterController() {\n return vimGlobalState.registerController;\n },\n // Testing hook.\n resetVimGlobalState_: resetVimGlobalState,\n // Testing hook.\n getVimGlobalState_: function getVimGlobalState_() {\n return vimGlobalState;\n },\n // Testing hook.\n maybeInitVimState_: maybeInitVimState,\n suppressErrorLogging: false,\n InsertModeKey: InsertModeKey,\n map: function map(lhs, rhs, ctx) {\n // Add user defined key bindings.\n exCommandDispatcher.map(lhs, rhs, ctx);\n },\n unmap: function unmap(lhs, ctx) {\n return exCommandDispatcher.unmap(lhs, ctx);\n },\n // Non-recursive map function.\n // NOTE: This will not create mappings to key maps that aren't present\n // in the default key map. See TODO at bottom of function.\n noremap: function noremap(lhs, rhs, ctx) {\n function toCtxArray(ctx) {\n return ctx ? [ctx] : [\"normal\", \"insert\", \"visual\"];\n }\n\n var ctxsToMap = toCtxArray(ctx); // Look through all actual defaults to find a map candidate.\n\n var actualLength = defaultKeymap.length,\n origLength = defaultKeymapLength;\n\n for (var i = actualLength - origLength; i < actualLength && ctxsToMap.length; i++) {\n var mapping = defaultKeymap[i]; // Omit mappings that operate in the wrong context(s) and those of invalid type.\n\n if (mapping.keys == rhs && (!ctx || !mapping.context || mapping.context === ctx) && mapping.type.substr(0, 2) !== \"ex\" && mapping.type.substr(0, 3) !== \"key\") {\n // Make a shallow copy of the original keymap entry.\n var newMapping = {};\n\n for (var key in mapping) {\n newMapping[key] = mapping[key];\n } // Modify it point to the new mapping with the proper context.\n\n\n newMapping.keys = lhs;\n\n if (ctx && !newMapping.context) {\n newMapping.context = ctx;\n } // Add it to the keymap with a higher priority than the original.\n\n\n this._mapCommand(newMapping); // Record the mapped contexts as complete.\n\n\n var mappedCtxs = toCtxArray(mapping.context);\n ctxsToMap = ctxsToMap.filter(function (el) {\n return mappedCtxs.indexOf(el) === -1;\n });\n }\n } // TODO: Create non-recursive keyToKey mappings for the unmapped contexts once those exist.\n\n },\n // Remove all user-defined mappings for the provided context.\n mapclear: function mapclear(ctx) {\n // Partition the existing keymap into user-defined and true defaults.\n var actualLength = defaultKeymap.length,\n origLength = defaultKeymapLength;\n var userKeymap = defaultKeymap.slice(0, actualLength - origLength);\n defaultKeymap = defaultKeymap.slice(actualLength - origLength);\n\n if (ctx) {\n // If a specific context is being cleared, we need to keep mappings\n // from all other contexts.\n for (var i = userKeymap.length - 1; i >= 0; i--) {\n var mapping = userKeymap[i];\n\n if (ctx !== mapping.context) {\n if (mapping.context) {\n this._mapCommand(mapping);\n } else {\n // `mapping` applies to all contexts so create keymap copies\n // for each context except the one being cleared.\n var contexts = [\"normal\", \"insert\", \"visual\"];\n\n for (var j in contexts) {\n if (contexts[j] !== ctx) {\n var newMapping = {};\n\n for (var key in mapping) {\n newMapping[key] = mapping[key];\n }\n\n newMapping.context = contexts[j];\n\n this._mapCommand(newMapping);\n }\n }\n }\n }\n }\n }\n },\n // TODO: Expose setOption and getOption as instance methods. Need to decide how to namespace\n // them, or somehow make them work with the existing CodeMirror setOption/getOption API.\n setOption: setOption,\n getOption: getOption,\n defineOption: defineOption,\n defineEx: function defineEx(name, prefix, func) {\n if (!prefix) {\n prefix = name;\n } else if (name.indexOf(prefix) !== 0) {\n throw new Error('(Vim.defineEx) \"' + prefix + '\" is not a prefix of \"' + name + '\", command not registered');\n }\n\n exCommands[name] = func;\n exCommandDispatcher.commandMap_[prefix] = {\n name: name,\n shortName: prefix,\n type: \"api\"\n };\n },\n handleKey: function handleKey(cm, key, origin) {\n var command = this.findKey(cm, key, origin);\n\n if (typeof command === \"function\") {\n return command();\n }\n },\n\n /**\n * This is the outermost function called by CodeMirror, after keys have\n * been mapped to their Vim equivalents.\n *\n * Finds a command based on the key (and cached keys if there is a\n * multi-key sequence). Returns `undefined` if no key is matched, a noop\n * function if a partial match is found (multi-key), and a function to\n * execute the bound command if a a key is matched. The function always\n * returns true.\n */\n findKey: function findKey(cm, key, origin) {\n var vim = maybeInitVimState(cm);\n\n function handleMacroRecording() {\n var macroModeState = vimGlobalState.macroModeState;\n\n if (macroModeState.isRecording) {\n if (key == \"q\") {\n macroModeState.exitMacroRecordMode();\n clearInputState(cm);\n return true;\n }\n\n if (origin != \"mapping\") {\n logKey(macroModeState, key);\n }\n }\n }\n\n function handleEsc() {\n if (key == \"\") {\n if (vim.visualMode) {\n // Get back to normal mode.\n exitVisualMode(cm);\n } else if (vim.insertMode) {\n // Get back to normal mode.\n exitInsertMode(cm);\n } else {\n // We're already in normal mode. Let '' be handled normally.\n return;\n }\n\n clearInputState(cm);\n return true;\n }\n }\n\n function doKeyToKey(keys) {\n // TODO: prevent infinite recursion.\n var match;\n\n while (keys) {\n // Pull off one command key, which is either a single character\n // or a special sequence wrapped in '<' and '>', e.g. ''.\n match = /<\\w+-.+?>|<\\w+>|./.exec(keys);\n key = match[0];\n keys = keys.substring(match.index + key.length);\n vimApi.handleKey(cm, key, \"mapping\");\n }\n }\n\n function handleKeyInsertMode() {\n if (handleEsc()) {\n return true;\n }\n\n var keys = vim.inputState.keyBuffer = vim.inputState.keyBuffer + key;\n var keysAreChars = key.length == 1;\n var match = commandDispatcher.matchCommand(keys, defaultKeymap, vim.inputState, \"insert\"); // Need to check all key substrings in insert mode.\n\n while (keys.length > 1 && match.type != \"full\") {\n var keys = vim.inputState.keyBuffer = keys.slice(1);\n var thisMatch = commandDispatcher.matchCommand(keys, defaultKeymap, vim.inputState, \"insert\");\n\n if (thisMatch.type != \"none\") {\n match = thisMatch;\n }\n }\n\n if (match.type == \"none\") {\n clearInputState(cm);\n return false;\n } else if (match.type == \"partial\") {\n if (lastInsertModeKeyTimer) {\n window.clearTimeout(lastInsertModeKeyTimer);\n }\n\n lastInsertModeKeyTimer = window.setTimeout(function () {\n if (vim.insertMode && vim.inputState.keyBuffer) {\n clearInputState(cm);\n }\n }, getOption(\"insertModeEscKeysTimeout\"));\n return !keysAreChars;\n }\n\n if (lastInsertModeKeyTimer) {\n window.clearTimeout(lastInsertModeKeyTimer);\n }\n\n if (keysAreChars) {\n var selections = cm.listSelections();\n\n for (var i = 0; i < selections.length; i++) {\n var here = selections[i].head;\n cm.replaceRange(\"\", offsetCursor(here, 0, -(keys.length - 1)), here, \"+input\");\n }\n\n vimGlobalState.macroModeState.lastInsertModeChanges.changes.pop();\n }\n\n clearInputState(cm);\n return match.command;\n }\n\n function handleKeyNonInsertMode() {\n if (handleMacroRecording() || handleEsc()) {\n return true;\n }\n\n var keys = vim.inputState.keyBuffer = vim.inputState.keyBuffer + key;\n\n if (/^[1-9]\\d*$/.test(keys)) {\n return true;\n }\n\n var keysMatcher = /^(\\d*)(.*)$/.exec(keys);\n\n if (!keysMatcher) {\n clearInputState(cm);\n return false;\n }\n\n var context = vim.visualMode ? \"visual\" : \"normal\";\n var mainKey = keysMatcher[2] || keysMatcher[1];\n\n if (vim.inputState.operatorShortcut && vim.inputState.operatorShortcut.slice(-1) == mainKey) {\n // multikey operators act linewise by repeating only the last character\n mainKey = vim.inputState.operatorShortcut;\n }\n\n var match = commandDispatcher.matchCommand(mainKey, defaultKeymap, vim.inputState, context);\n\n if (match.type == \"none\") {\n clearInputState(cm);\n return false;\n } else if (match.type == \"partial\") {\n return true;\n }\n\n vim.inputState.keyBuffer = \"\";\n var keysMatcher = /^(\\d*)(.*)$/.exec(keys);\n\n if (keysMatcher[1] && keysMatcher[1] != \"0\") {\n vim.inputState.pushRepeatDigit(keysMatcher[1]);\n }\n\n return match.command;\n }\n\n var command;\n\n if (vim.insertMode) {\n command = handleKeyInsertMode();\n } else {\n command = handleKeyNonInsertMode();\n }\n\n if (command === false) {\n return !vim.insertMode && key.length === 1 ? function () {\n return true;\n } : undefined;\n } else if (command === true) {\n // TODO: Look into using CodeMirror's multi-key handling.\n // Return no-op since we are caching the key. Counts as handled, but\n // don't want act on it just yet.\n return function () {\n return true;\n };\n } else {\n return function () {\n return cm.operation(function () {\n cm.curOp.isVimOp = true;\n\n try {\n if (command.type == \"keyToKey\") {\n doKeyToKey(command.toKeys);\n } else {\n commandDispatcher.processCommand(cm, vim, command);\n }\n } catch (e) {\n // clear VIM state in case it's in a bad state.\n cm.state.vim = undefined;\n maybeInitVimState(cm);\n\n if (!vimApi.suppressErrorLogging) {\n console[\"log\"](e);\n }\n\n throw e;\n }\n\n return true;\n });\n };\n }\n },\n handleEx: function handleEx(cm, input) {\n exCommandDispatcher.processCommand(cm, input);\n },\n defineMotion: defineMotion,\n defineAction: defineAction,\n defineOperator: defineOperator,\n mapCommand: mapCommand,\n _mapCommand: _mapCommand,\n defineRegister: defineRegister,\n exitVisualMode: exitVisualMode,\n exitInsertMode: exitInsertMode\n }; // Represents the current input state.\n\n function InputState() {\n this.prefixRepeat = [];\n this.motionRepeat = [];\n this.operator = null;\n this.operatorArgs = null;\n this.motion = null;\n this.motionArgs = null;\n this.keyBuffer = []; // For matching multi-key commands.\n\n this.registerName = null; // Defaults to the unnamed register.\n }\n\n InputState.prototype.pushRepeatDigit = function (n) {\n if (!this.operator) {\n this.prefixRepeat = this.prefixRepeat.concat(n);\n } else {\n this.motionRepeat = this.motionRepeat.concat(n);\n }\n };\n\n InputState.prototype.getRepeat = function () {\n var repeat = 0;\n\n if (this.prefixRepeat.length > 0 || this.motionRepeat.length > 0) {\n repeat = 1;\n\n if (this.prefixRepeat.length > 0) {\n repeat *= parseInt(this.prefixRepeat.join(\"\"), 10);\n }\n\n if (this.motionRepeat.length > 0) {\n repeat *= parseInt(this.motionRepeat.join(\"\"), 10);\n }\n }\n\n return repeat;\n };\n\n function clearInputState(cm, reason) {\n cm.state.vim.inputState = new InputState();\n\n _cm_adapter[\"default\"].signal(cm, \"vim-command-done\", reason);\n }\n /*\n * Register stores information about copy and paste registers. Besides\n * text, a register must store whether it is linewise (i.e., when it is\n * pasted, should it insert itself into a new line, or should the text be\n * inserted at the cursor position.)\n */\n\n\n function Register(text, linewise, blockwise) {\n this.clear();\n this.keyBuffer = [text || \"\"];\n this.insertModeChanges = [];\n this.searchQueries = [];\n this.linewise = !!linewise;\n this.blockwise = !!blockwise;\n }\n\n Register.prototype = {\n setText: function setText(text, linewise, blockwise) {\n this.keyBuffer = [text || \"\"];\n this.linewise = !!linewise;\n this.blockwise = !!blockwise;\n },\n pushText: function pushText(text, linewise) {\n // if this register has ever been set to linewise, use linewise.\n if (linewise) {\n if (!this.linewise) {\n this.keyBuffer.push(\"\\n\");\n }\n\n this.linewise = true;\n }\n\n this.keyBuffer.push(text);\n },\n pushInsertModeChanges: function pushInsertModeChanges(changes) {\n this.insertModeChanges.push(createInsertModeChanges(changes));\n },\n pushSearchQuery: function pushSearchQuery(query) {\n this.searchQueries.push(query);\n },\n clear: function clear() {\n this.keyBuffer = [];\n this.insertModeChanges = [];\n this.searchQueries = [];\n this.linewise = false;\n },\n toString: function toString() {\n return this.keyBuffer.join(\"\");\n }\n };\n /**\n * Defines an external register.\n *\n * The name should be a single character that will be used to reference the register.\n * The register should support setText, pushText, clear, and toString(). See Register\n * for a reference implementation.\n */\n\n function defineRegister(name, register) {\n var registers = vimGlobalState.registerController.registers;\n\n if (!name || name.length != 1) {\n throw Error(\"Register name must be 1 character\");\n }\n\n if (registers[name]) {\n throw Error(\"Register already defined \" + name);\n }\n\n registers[name] = register;\n validRegisters.push(name);\n }\n /*\n * vim registers allow you to keep many independent copy and paste buffers.\n * See http://usevim.com/2012/04/13/registers/ for an introduction.\n *\n * RegisterController keeps the state of all the registers. An initial\n * state may be passed in. The unnamed register '\"' will always be\n * overridden.\n */\n\n\n function RegisterController(registers) {\n this.registers = registers;\n this.unnamedRegister = registers['\"'] = new Register();\n registers[\".\"] = new Register();\n registers[\":\"] = new Register();\n registers[\"/\"] = new Register();\n }\n\n RegisterController.prototype = {\n pushText: function pushText(registerName, operator, text, linewise, blockwise) {\n // The black hole register, \"_, means delete/yank to nowhere.\n if (registerName === \"_\") return;\n\n if (linewise && text.charAt(text.length - 1) !== \"\\n\") {\n text += \"\\n\";\n } // Lowercase and uppercase registers refer to the same register.\n // Uppercase just means append.\n\n\n var register = this.isValidRegister(registerName) ? this.getRegister(registerName) : null; // if no register/an invalid register was specified, things go to the\n // default registers\n\n if (!register) {\n switch (operator) {\n case \"yank\":\n // The 0 register contains the text from the most recent yank.\n this.registers[\"0\"] = new Register(text, linewise, blockwise);\n break;\n\n case \"delete\":\n case \"change\":\n if (text.indexOf(\"\\n\") == -1) {\n // Delete less than 1 line. Update the small delete register.\n this.registers[\"-\"] = new Register(text, linewise);\n } else {\n // Shift down the contents of the numbered registers and put the\n // deleted text into register 1.\n this.shiftNumericRegisters_();\n this.registers[\"1\"] = new Register(text, linewise);\n }\n\n break;\n } // Make sure the unnamed register is set to what just happened\n\n\n this.unnamedRegister.setText(text, linewise, blockwise);\n return;\n } // If we've gotten to this point, we've actually specified a register\n\n\n var append = isUpperCase(registerName);\n\n if (append) {\n register.pushText(text, linewise);\n } else {\n register.setText(text, linewise, blockwise);\n } // The unnamed register always has the same value as the last used\n // register.\n\n\n this.unnamedRegister.setText(register.toString(), linewise);\n },\n // Gets the register named @name. If one of @name doesn't already exist,\n // create it. If @name is invalid, return the unnamedRegister.\n getRegister: function getRegister(name) {\n if (!this.isValidRegister(name)) {\n return this.unnamedRegister;\n }\n\n name = name.toLowerCase();\n\n if (!this.registers[name]) {\n this.registers[name] = new Register();\n }\n\n return this.registers[name];\n },\n isValidRegister: function isValidRegister(name) {\n return name && inArray(name, validRegisters);\n },\n shiftNumericRegisters_: function shiftNumericRegisters_() {\n for (var i = 9; i >= 2; i--) {\n this.registers[i] = this.getRegister(\"\" + (i - 1));\n }\n }\n };\n\n function HistoryController() {\n this.historyBuffer = [];\n this.iterator = 0;\n this.initialPrefix = null;\n }\n\n HistoryController.prototype = {\n // the input argument here acts a user entered prefix for a small time\n // until we start autocompletion in which case it is the autocompleted.\n nextMatch: function nextMatch(input, up) {\n var historyBuffer = this.historyBuffer;\n var dir = up ? -1 : 1;\n if (this.initialPrefix === null) this.initialPrefix = input;\n\n for (var i = this.iterator + dir; up ? i >= 0 : i < historyBuffer.length; i += dir) {\n var element = historyBuffer[i];\n\n for (var j = 0; j <= element.length; j++) {\n if (this.initialPrefix == element.substring(0, j)) {\n this.iterator = i;\n return element;\n }\n }\n } // should return the user input in case we reach the end of buffer.\n\n\n if (i >= historyBuffer.length) {\n this.iterator = historyBuffer.length;\n return this.initialPrefix;\n } // return the last autocompleted query or exCommand as it is.\n\n\n if (i < 0) return input;\n },\n pushInput: function pushInput(input) {\n var index = this.historyBuffer.indexOf(input);\n if (index > -1) this.historyBuffer.splice(index, 1);\n if (input.length) this.historyBuffer.push(input);\n },\n reset: function reset() {\n this.initialPrefix = null;\n this.iterator = this.historyBuffer.length;\n }\n };\n var commandDispatcher = {\n matchCommand: function matchCommand(keys, keyMap, inputState, context) {\n var matches = commandMatches(keys, keyMap, context, inputState);\n\n if (!matches.full && !matches.partial) {\n return {\n type: \"none\"\n };\n } else if (!matches.full && matches.partial) {\n return {\n type: \"partial\"\n };\n }\n\n var bestMatch;\n\n for (var i = 0; i < matches.full.length; i++) {\n var match = matches.full[i];\n\n if (!bestMatch) {\n bestMatch = match;\n }\n }\n\n if (bestMatch.keys.slice(-11) == \"\") {\n var character = lastChar(keys);\n if (!character) return {\n type: \"none\"\n };\n inputState.selectedCharacter = character;\n }\n\n return {\n type: \"full\",\n command: bestMatch\n };\n },\n processCommand: function processCommand(cm, vim, command) {\n vim.inputState.repeatOverride = command.repeatOverride;\n\n switch (command.type) {\n case \"motion\":\n this.processMotion(cm, vim, command);\n break;\n\n case \"operator\":\n this.processOperator(cm, vim, command);\n break;\n\n case \"operatorMotion\":\n this.processOperatorMotion(cm, vim, command);\n break;\n\n case \"action\":\n this.processAction(cm, vim, command);\n break;\n\n case \"search\":\n this.processSearch(cm, vim, command);\n break;\n\n case \"ex\":\n case \"keyToEx\":\n this.processEx(cm, vim, command);\n break;\n\n default:\n break;\n }\n },\n processMotion: function processMotion(cm, vim, command) {\n vim.inputState.motion = command.motion;\n vim.inputState.motionArgs = copyArgs(command.motionArgs);\n this.evalInput(cm, vim);\n },\n processOperator: function processOperator(cm, vim, command) {\n var inputState = vim.inputState;\n\n if (inputState.operator) {\n if (inputState.operator == command.operator) {\n // Typing an operator twice like 'dd' makes the operator operate\n // linewise\n inputState.motion = \"expandToLine\";\n inputState.motionArgs = {\n linewise: true\n };\n this.evalInput(cm, vim);\n return;\n } else {\n // 2 different operators in a row doesn't make sense.\n clearInputState(cm);\n }\n }\n\n inputState.operator = command.operator;\n inputState.operatorArgs = copyArgs(command.operatorArgs);\n\n if (command.keys.length > 1) {\n inputState.operatorShortcut = command.keys;\n }\n\n if (command.exitVisualBlock) {\n vim.visualBlock = false;\n updateCmSelection(cm);\n }\n\n if (vim.visualMode) {\n // Operating on a selection in visual mode. We don't need a motion.\n this.evalInput(cm, vim);\n }\n },\n processOperatorMotion: function processOperatorMotion(cm, vim, command) {\n var visualMode = vim.visualMode;\n var operatorMotionArgs = copyArgs(command.operatorMotionArgs);\n\n if (operatorMotionArgs) {\n // Operator motions may have special behavior in visual mode.\n if (visualMode && operatorMotionArgs.visualLine) {\n vim.visualLine = true;\n }\n }\n\n this.processOperator(cm, vim, command);\n\n if (!visualMode) {\n this.processMotion(cm, vim, command);\n }\n },\n processAction: function processAction(cm, vim, command) {\n var inputState = vim.inputState;\n var repeat = inputState.getRepeat();\n var repeatIsExplicit = !!repeat;\n var actionArgs = copyArgs(command.actionArgs) || {};\n\n if (inputState.selectedCharacter) {\n actionArgs.selectedCharacter = inputState.selectedCharacter;\n } // Actions may or may not have motions and operators. Do these first.\n\n\n if (command.operator) {\n this.processOperator(cm, vim, command);\n }\n\n if (command.motion) {\n this.processMotion(cm, vim, command);\n }\n\n if (command.motion || command.operator) {\n this.evalInput(cm, vim);\n }\n\n actionArgs.repeat = repeat || 1;\n actionArgs.repeatIsExplicit = repeatIsExplicit;\n actionArgs.registerName = inputState.registerName;\n clearInputState(cm);\n vim.lastMotion = null;\n\n if (command.isEdit) {\n this.recordLastEdit(vim, inputState, command);\n }\n\n actions[command.action](cm, actionArgs, vim);\n },\n processSearch: function processSearch(cm, vim, command) {\n if (!cm.getSearchCursor) {\n // Search depends on SearchCursor.\n return;\n }\n\n var forward = command.searchArgs.forward;\n var wholeWordOnly = command.searchArgs.wholeWordOnly;\n getSearchState(cm).setReversed(!forward);\n var promptPrefix = forward ? \"/\" : \"?\";\n var originalQuery = getSearchState(cm).getQuery();\n var originalScrollPos = cm.getScrollInfo();\n\n function handleQuery(query, ignoreCase, smartCase) {\n vimGlobalState.searchHistoryController.pushInput(query);\n vimGlobalState.searchHistoryController.reset();\n\n try {\n updateSearchQuery(cm, query, ignoreCase, smartCase);\n } catch (e) {\n showConfirm(cm, \"Invalid regex: \" + query);\n clearInputState(cm);\n return;\n }\n\n commandDispatcher.processMotion(cm, vim, {\n type: \"motion\",\n motion: \"findNext\",\n motionArgs: {\n forward: true,\n toJumplist: command.searchArgs.toJumplist\n }\n });\n }\n\n function onPromptClose(query) {\n cm.scrollTo(originalScrollPos.left, originalScrollPos.top);\n handleQuery(query, true\n /** ignoreCase */\n , true\n /** smartCase */\n );\n var macroModeState = vimGlobalState.macroModeState;\n\n if (macroModeState.isRecording) {\n logSearchQuery(macroModeState, query);\n }\n }\n\n function onPromptKeyUp(e, query, close) {\n var keyName = _cm_adapter[\"default\"].keyName(e),\n up,\n offset;\n\n if (keyName == \"Up\" || keyName == \"Down\") {\n up = keyName == \"Up\" ? true : false;\n offset = e.target ? e.target.selectionEnd : 0;\n query = vimGlobalState.searchHistoryController.nextMatch(query, up) || \"\";\n close(query);\n if (offset && e.target) e.target.selectionEnd = e.target.selectionStart = Math.min(offset, e.target.value.length);\n } else {\n if (keyName != \"Left\" && keyName != \"Right\" && keyName != \"Ctrl\" && keyName != \"Alt\" && keyName != \"Shift\") vimGlobalState.searchHistoryController.reset();\n }\n\n var parsedQuery;\n\n try {\n parsedQuery = updateSearchQuery(cm, query, true\n /** ignoreCase */\n , true\n /** smartCase */\n );\n } catch (e) {// Swallow bad regexes for incremental search.\n }\n\n if (parsedQuery) {\n cm.scrollIntoView(_findNext(cm, !forward, parsedQuery), 30);\n } else {\n clearSearchHighlight(cm);\n cm.scrollTo(originalScrollPos.left, originalScrollPos.top);\n }\n }\n\n function onPromptKeyDown(e, query, close) {\n var keyName = _cm_adapter[\"default\"].keyName(e);\n\n if (keyName == \"Esc\" || keyName == \"Ctrl-C\" || keyName == \"Ctrl-[\" || keyName == \"Backspace\" && query == \"\") {\n vimGlobalState.searchHistoryController.pushInput(query);\n vimGlobalState.searchHistoryController.reset();\n updateSearchQuery(cm, originalQuery);\n clearSearchHighlight(cm);\n cm.scrollTo(originalScrollPos.left, originalScrollPos.top);\n\n _cm_adapter[\"default\"].e_stop(e);\n\n clearInputState(cm);\n close();\n cm.focus();\n } else if (keyName == \"Up\" || keyName == \"Down\") {\n _cm_adapter[\"default\"].e_stop(e);\n } else if (keyName == \"Ctrl-U\") {\n // Ctrl-U clears input.\n _cm_adapter[\"default\"].e_stop(e);\n\n close(\"\");\n }\n }\n\n switch (command.searchArgs.querySrc) {\n case \"prompt\":\n var macroModeState = vimGlobalState.macroModeState;\n\n if (macroModeState.isPlaying) {\n var query = macroModeState.replaySearchQueries.shift();\n handleQuery(query, true\n /** ignoreCase */\n , false\n /** smartCase */\n );\n } else {\n showPrompt(cm, {\n onClose: onPromptClose,\n prefix: promptPrefix,\n desc: \"(JavaScript regexp)\",\n onKeyUp: onPromptKeyUp,\n onKeyDown: onPromptKeyDown\n });\n }\n\n break;\n\n case \"wordUnderCursor\":\n var word = expandWordUnderCursor(cm, false\n /** inclusive */\n , true\n /** forward */\n , false\n /** bigWord */\n , true\n /** noSymbol */\n );\n var isKeyword = true;\n\n if (!word) {\n word = expandWordUnderCursor(cm, false\n /** inclusive */\n , true\n /** forward */\n , false\n /** bigWord */\n , false\n /** noSymbol */\n );\n isKeyword = false;\n }\n\n if (!word) {\n return;\n }\n\n var query = cm.getLine(word.start.line).substring(word.start.ch, word.end.ch);\n\n if (isKeyword && wholeWordOnly) {\n query = \"\\\\b\" + query + \"\\\\b\";\n } else {\n query = escapeRegex(query);\n } // cachedCursor is used to save the old position of the cursor\n // when * or # causes vim to seek for the nearest word and shift\n // the cursor before entering the motion.\n\n\n vimGlobalState.jumpList.cachedCursor = cm.getCursor();\n cm.setCursor(word.start);\n handleQuery(query, true\n /** ignoreCase */\n , false\n /** smartCase */\n );\n break;\n }\n },\n processEx: function processEx(cm, vim, command) {\n function onPromptClose(input) {\n // Give the prompt some time to close so that if processCommand shows\n // an error, the elements don't overlap.\n vimGlobalState.exCommandHistoryController.pushInput(input);\n vimGlobalState.exCommandHistoryController.reset();\n exCommandDispatcher.processCommand(cm, input);\n }\n\n function onPromptKeyDown(e, input, close) {\n var keyName = _cm_adapter[\"default\"].keyName(e),\n up,\n offset;\n\n if (keyName == \"Esc\" || keyName == \"Ctrl-C\" || keyName == \"Ctrl-[\" || keyName == \"Backspace\" && input == \"\") {\n vimGlobalState.exCommandHistoryController.pushInput(input);\n vimGlobalState.exCommandHistoryController.reset();\n\n _cm_adapter[\"default\"].e_stop(e);\n\n clearInputState(cm);\n close();\n cm.focus();\n }\n\n if (keyName == \"Up\" || keyName == \"Down\") {\n _cm_adapter[\"default\"].e_stop(e);\n\n up = keyName == \"Up\" ? true : false;\n offset = e.target ? e.target.selectionEnd : 0;\n input = vimGlobalState.exCommandHistoryController.nextMatch(input, up) || \"\";\n close(input);\n if (offset && e.target) e.target.selectionEnd = e.target.selectionStart = Math.min(offset, e.target.value.length);\n } else if (keyName == \"Ctrl-U\") {\n // Ctrl-U clears input.\n _cm_adapter[\"default\"].e_stop(e);\n\n close(\"\");\n } else {\n if (keyName != \"Left\" && keyName != \"Right\" && keyName != \"Ctrl\" && keyName != \"Alt\" && keyName != \"Shift\") vimGlobalState.exCommandHistoryController.reset();\n }\n }\n\n if (command.type == \"keyToEx\") {\n // Handle user defined Ex to Ex mappings\n exCommandDispatcher.processCommand(cm, command.exArgs.input);\n } else {\n if (vim.visualMode) {\n showPrompt(cm, {\n onClose: onPromptClose,\n prefix: \":\",\n value: \"'<,'>\",\n onKeyDown: onPromptKeyDown,\n selectValueOnOpen: false\n });\n } else {\n showPrompt(cm, {\n onClose: onPromptClose,\n prefix: \":\",\n onKeyDown: onPromptKeyDown\n });\n }\n }\n },\n evalInput: function evalInput(cm, vim) {\n // If the motion command is set, execute both the operator and motion.\n // Otherwise return.\n var inputState = vim.inputState;\n var motion = inputState.motion;\n var motionArgs = inputState.motionArgs || {};\n var operator = inputState.operator;\n var operatorArgs = inputState.operatorArgs || {};\n var registerName = inputState.registerName;\n var sel = vim.sel; // TODO: Make sure cm and vim selections are identical outside visual mode.\n\n var origHead = copyCursor(vim.visualMode ? clipCursorToContent(cm, sel.head) : cm.getCursor(\"head\"));\n var origAnchor = copyCursor(vim.visualMode ? clipCursorToContent(cm, sel.anchor) : cm.getCursor(\"anchor\"));\n var oldHead = copyCursor(origHead);\n var oldAnchor = copyCursor(origAnchor);\n var newHead, newAnchor;\n var repeat;\n\n if (operator) {\n this.recordLastEdit(vim, inputState);\n }\n\n if (inputState.repeatOverride !== undefined) {\n // If repeatOverride is specified, that takes precedence over the\n // input state's repeat. Used by Ex mode and can be user defined.\n repeat = inputState.repeatOverride;\n } else {\n repeat = inputState.getRepeat();\n }\n\n if (repeat > 0 && motionArgs.explicitRepeat) {\n motionArgs.repeatIsExplicit = true;\n } else if (motionArgs.noRepeat || !motionArgs.explicitRepeat && repeat === 0) {\n repeat = 1;\n motionArgs.repeatIsExplicit = false;\n }\n\n if (inputState.selectedCharacter) {\n // If there is a character input, stick it in all of the arg arrays.\n motionArgs.selectedCharacter = operatorArgs.selectedCharacter = inputState.selectedCharacter;\n }\n\n motionArgs.repeat = repeat;\n clearInputState(cm);\n\n if (motion) {\n var motionResult = motions[motion](cm, origHead, motionArgs, vim, inputState);\n vim.lastMotion = motions[motion];\n\n if (!motionResult) {\n return;\n }\n\n if (motionArgs.toJumplist) {\n var jumpList = vimGlobalState.jumpList; // if the current motion is # or *, use cachedCursor\n\n var cachedCursor = jumpList.cachedCursor;\n\n if (cachedCursor) {\n recordJumpPosition(cm, cachedCursor, motionResult);\n delete jumpList.cachedCursor;\n } else {\n recordJumpPosition(cm, origHead, motionResult);\n }\n }\n\n if (motionResult instanceof Array) {\n newAnchor = motionResult[0];\n newHead = motionResult[1];\n } else {\n newHead = motionResult;\n } // TODO: Handle null returns from motion commands better.\n\n\n if (!newHead) {\n newHead = copyCursor(origHead);\n }\n\n if (vim.visualMode) {\n if (!(vim.visualBlock && newHead.ch === Infinity)) {\n newHead = clipCursorToContent(cm, newHead);\n }\n\n if (newAnchor) {\n newAnchor = clipCursorToContent(cm, newAnchor);\n }\n\n newAnchor = newAnchor || oldAnchor;\n sel.anchor = newAnchor;\n sel.head = newHead;\n updateCmSelection(cm);\n updateMark(cm, vim, \"<\", cursorIsBefore(newAnchor, newHead) ? newAnchor : newHead);\n updateMark(cm, vim, \">\", cursorIsBefore(newAnchor, newHead) ? newHead : newAnchor);\n } else if (!operator) {\n newHead = clipCursorToContent(cm, newHead);\n cm.setCursor(newHead.line, newHead.ch);\n }\n }\n\n if (operator) {\n if (operatorArgs.lastSel) {\n // Replaying a visual mode operation\n newAnchor = oldAnchor;\n var lastSel = operatorArgs.lastSel;\n var lineOffset = Math.abs(lastSel.head.line - lastSel.anchor.line);\n var chOffset = Math.abs(lastSel.head.ch - lastSel.anchor.ch);\n\n if (lastSel.visualLine) {\n // Linewise Visual mode: The same number of lines.\n newHead = new Pos(oldAnchor.line + lineOffset, oldAnchor.ch);\n } else if (lastSel.visualBlock) {\n // Blockwise Visual mode: The same number of lines and columns.\n newHead = new Pos(oldAnchor.line + lineOffset, oldAnchor.ch + chOffset);\n } else if (lastSel.head.line == lastSel.anchor.line) {\n // Normal Visual mode within one line: The same number of characters.\n newHead = new Pos(oldAnchor.line, oldAnchor.ch + chOffset);\n } else {\n // Normal Visual mode with several lines: The same number of lines, in the\n // last line the same number of characters as in the last line the last time.\n newHead = new Pos(oldAnchor.line + lineOffset, oldAnchor.ch);\n }\n\n vim.visualMode = true;\n vim.visualLine = lastSel.visualLine;\n vim.visualBlock = lastSel.visualBlock;\n sel = vim.sel = {\n anchor: newAnchor,\n head: newHead\n };\n updateCmSelection(cm);\n } else if (vim.visualMode) {\n operatorArgs.lastSel = {\n anchor: copyCursor(sel.anchor),\n head: copyCursor(sel.head),\n visualBlock: vim.visualBlock,\n visualLine: vim.visualLine\n };\n }\n\n var curStart, curEnd, linewise, mode;\n var cmSel;\n\n if (vim.visualMode) {\n // Init visual op\n curStart = cursorMin(sel.head, sel.anchor);\n curEnd = cursorMax(sel.head, sel.anchor);\n linewise = vim.visualLine || operatorArgs.linewise;\n mode = vim.visualBlock ? \"block\" : linewise ? \"line\" : \"char\";\n cmSel = makeCmSelection(cm, {\n anchor: curStart,\n head: curEnd\n }, mode);\n\n if (linewise) {\n var ranges = cmSel.ranges;\n\n if (mode == \"block\") {\n // Linewise operators in visual block mode extend to end of line\n for (var i = 0; i < ranges.length; i++) {\n ranges[i].head.ch = lineLength(cm, ranges[i].head.line);\n }\n } else if (mode == \"line\") {\n ranges[0].head = new Pos(ranges[0].head.line + 1, 0);\n }\n }\n } else {\n // Init motion op\n curStart = copyCursor(newAnchor || oldAnchor);\n curEnd = copyCursor(newHead || oldHead);\n\n if (cursorIsBefore(curEnd, curStart)) {\n var tmp = curStart;\n curStart = curEnd;\n curEnd = tmp;\n }\n\n linewise = motionArgs.linewise || operatorArgs.linewise;\n\n if (linewise) {\n // Expand selection to entire line.\n expandSelectionToLine(cm, curStart, curEnd);\n } else if (motionArgs.forward) {\n // Clip to trailing newlines only if the motion goes forward.\n clipToLine(cm, curStart, curEnd);\n }\n\n mode = \"char\";\n var exclusive = !motionArgs.inclusive || linewise;\n cmSel = makeCmSelection(cm, {\n anchor: curStart,\n head: curEnd\n }, mode, exclusive);\n }\n\n cm.setSelections(cmSel.ranges, cmSel.primary);\n vim.lastMotion = null;\n operatorArgs.repeat = repeat; // For indent in visual mode.\n\n operatorArgs.registerName = registerName; // Keep track of linewise as it affects how paste and change behave.\n\n operatorArgs.linewise = linewise;\n var operatorMoveTo = operators[operator](cm, operatorArgs, cmSel.ranges, oldAnchor, newHead);\n\n if (vim.visualMode) {\n exitVisualMode(cm, operatorMoveTo != null);\n }\n\n if (operatorMoveTo) {\n cm.setCursor(operatorMoveTo);\n }\n }\n },\n recordLastEdit: function recordLastEdit(vim, inputState, actionCommand) {\n var macroModeState = vimGlobalState.macroModeState;\n\n if (macroModeState.isPlaying) {\n return;\n }\n\n vim.lastEditInputState = inputState;\n vim.lastEditActionCommand = actionCommand;\n macroModeState.lastInsertModeChanges.changes = [];\n macroModeState.lastInsertModeChanges.expectCursorActivityForChange = false;\n macroModeState.lastInsertModeChanges.visualBlock = vim.visualBlock ? vim.sel.head.line - vim.sel.anchor.line : 0;\n }\n };\n /**\n * typedef {Object{line:number,ch:number}} Cursor An object containing the\n * position of the cursor.\n */\n // All of the functions below return Cursor objects.\n\n var motions = {\n moveToTopLine: function moveToTopLine(cm, _head, motionArgs) {\n var line = getUserVisibleLines(cm).top + motionArgs.repeat - 1;\n return new Pos(line, findFirstNonWhiteSpaceCharacter(cm.getLine(line)));\n },\n moveToMiddleLine: function moveToMiddleLine(cm) {\n var range = getUserVisibleLines(cm);\n var line = Math.floor((range.top + range.bottom) * 0.5);\n return new Pos(line, findFirstNonWhiteSpaceCharacter(cm.getLine(line)));\n },\n moveToBottomLine: function moveToBottomLine(cm, _head, motionArgs) {\n var line = getUserVisibleLines(cm).bottom - motionArgs.repeat + 1;\n return new Pos(line, findFirstNonWhiteSpaceCharacter(cm.getLine(line)));\n },\n expandToLine: function expandToLine(_cm, head, motionArgs) {\n // Expands forward to end of line, and then to next line if repeat is\n // >1. Does not handle backward motion!\n var cur = head;\n return new Pos(cur.line + motionArgs.repeat - 1, Infinity);\n },\n findNext: function findNext(cm, _head, motionArgs) {\n var state = getSearchState(cm);\n var query = state.getQuery();\n\n if (!query) {\n return;\n }\n\n var prev = !motionArgs.forward; // If search is initiated with ? instead of /, negate direction.\n\n prev = state.isReversed() ? !prev : prev;\n highlightSearchMatches(cm, query);\n return _findNext(cm, prev\n /** prev */\n , query, motionArgs.repeat);\n },\n\n /**\n * Find and select the next occurrence of the search query. If the cursor is currently\n * within a match, then find and select the current match. Otherwise, find the next occurrence in the\n * appropriate direction.\n *\n * This differs from `findNext` in the following ways:\n *\n * 1. Instead of only returning the \"from\", this returns a \"from\", \"to\" range.\n * 2. If the cursor is currently inside a search match, this selects the current match\n * instead of the next match.\n * 3. If there is no associated operator, this will turn on visual mode.\n */\n findAndSelectNextInclusive: function findAndSelectNextInclusive(cm, _head, motionArgs, vim, prevInputState) {\n var state = getSearchState(cm);\n var query = state.getQuery();\n\n if (!query) {\n return;\n }\n\n var prev = !motionArgs.forward;\n prev = state.isReversed() ? !prev : prev; // next: [from, to] | null\n\n var next = findNextFromAndToInclusive(cm, prev, query, motionArgs.repeat, vim); // No matches.\n\n if (!next) {\n return;\n } // If there's an operator that will be executed, return the selection.\n\n\n if (prevInputState.operator) {\n return next;\n } // At this point, we know that there is no accompanying operator -- let's\n // deal with visual mode in order to select an appropriate match.\n\n\n var from = next[0]; // For whatever reason, when we use the \"to\" as returned by searchcursor.js directly,\n // the resulting selection is extended by 1 char. Let's shrink it so that only the\n // match is selected.\n\n var to = new Pos(next[1].line, next[1].ch - 1);\n\n if (vim.visualMode) {\n // If we were in visualLine or visualBlock mode, get out of it.\n if (vim.visualLine || vim.visualBlock) {\n vim.visualLine = false;\n vim.visualBlock = false;\n\n _cm_adapter[\"default\"].signal(cm, \"vim-mode-change\", {\n mode: \"visual\",\n subMode: \"\"\n });\n } // If we're currently in visual mode, we should extend the selection to include\n // the search result.\n\n\n var anchor = vim.sel.anchor;\n\n if (anchor) {\n if (state.isReversed()) {\n if (motionArgs.forward) {\n return [anchor, from];\n }\n\n return [anchor, to];\n } else {\n if (motionArgs.forward) {\n return [anchor, to];\n }\n\n return [anchor, from];\n }\n }\n } else {\n // Let's turn visual mode on.\n vim.visualMode = true;\n vim.visualLine = false;\n vim.visualBlock = false;\n\n _cm_adapter[\"default\"].signal(cm, \"vim-mode-change\", {\n mode: \"visual\",\n subMode: \"\"\n });\n }\n\n return prev ? [to, from] : [from, to];\n },\n goToMark: function goToMark(cm, _head, motionArgs, vim) {\n var pos = getMarkPos(cm, vim, motionArgs.selectedCharacter);\n\n if (pos) {\n return motionArgs.linewise ? {\n line: pos.line,\n ch: findFirstNonWhiteSpaceCharacter(cm.getLine(pos.line))\n } : pos;\n }\n\n return null;\n },\n moveToOtherHighlightedEnd: function moveToOtherHighlightedEnd(cm, _head, motionArgs, vim) {\n if (vim.visualBlock && motionArgs.sameLine) {\n var sel = vim.sel;\n return [clipCursorToContent(cm, new Pos(sel.anchor.line, sel.head.ch)), clipCursorToContent(cm, new Pos(sel.head.line, sel.anchor.ch))];\n } else {\n return [vim.sel.head, vim.sel.anchor];\n }\n },\n jumpToMark: function jumpToMark(cm, head, motionArgs, vim) {\n var best = head;\n\n for (var i = 0; i < motionArgs.repeat; i++) {\n var cursor = best;\n\n for (var key in vim.marks) {\n if (!isLowerCase(key)) {\n continue;\n }\n\n var mark = vim.marks[key].find();\n var isWrongDirection = motionArgs.forward ? cursorIsBefore(mark, cursor) : cursorIsBefore(cursor, mark);\n\n if (isWrongDirection) {\n continue;\n }\n\n if (motionArgs.linewise && mark.line == cursor.line) {\n continue;\n }\n\n var equal = cursorEqual(cursor, best);\n var between = motionArgs.forward ? cursorIsBetween(cursor, mark, best) : cursorIsBetween(best, mark, cursor);\n\n if (equal || between) {\n best = mark;\n }\n }\n }\n\n if (motionArgs.linewise) {\n // Vim places the cursor on the first non-whitespace character of\n // the line if there is one, else it places the cursor at the end\n // of the line, regardless of whether a mark was found.\n best = new Pos(best.line, findFirstNonWhiteSpaceCharacter(cm.getLine(best.line)));\n }\n\n return best;\n },\n moveByCharacters: function moveByCharacters(_cm, head, motionArgs) {\n var cur = head;\n var repeat = motionArgs.repeat;\n var ch = motionArgs.forward ? cur.ch + repeat : cur.ch - repeat;\n return new Pos(cur.line, ch);\n },\n moveByLines: function moveByLines(cm, head, motionArgs, vim) {\n var cur = head;\n var endCh = cur.ch; // Depending what our last motion was, we may want to do different\n // things. If our last motion was moving vertically, we want to\n // preserve the HPos from our last horizontal move. If our last motion\n // was going to the end of a line, moving vertically we should go to\n // the end of the line, etc.\n\n switch (vim.lastMotion) {\n case this.moveByLines:\n case this.moveByDisplayLines:\n case this.moveByScroll:\n case this.moveToColumn:\n case this.moveToEol:\n endCh = vim.lastHPos;\n break;\n\n default:\n vim.lastHPos = endCh;\n }\n\n var repeat = motionArgs.repeat + (motionArgs.repeatOffset || 0);\n var line = motionArgs.forward ? cur.line + repeat : cur.line - repeat;\n var first = cm.firstLine();\n var last = cm.lastLine();\n var posV = cm.findPosV(cur, motionArgs.forward ? repeat : -repeat, \"line\", vim.lastHSPos);\n var hasMarkedText = motionArgs.forward ? posV.line > line : posV.line < line;\n\n if (hasMarkedText) {\n line = posV.line;\n endCh = posV.ch;\n } // Vim go to line begin or line end when cursor at first/last line and\n // move to previous/next line is triggered.\n\n\n if (line < first && cur.line == first) {\n return this.moveToStartOfLine(cm, head, motionArgs, vim);\n } else if (line > last && cur.line == last) {\n return _moveToEol(cm, head, motionArgs, vim, true);\n }\n\n if (motionArgs.toFirstChar) {\n endCh = findFirstNonWhiteSpaceCharacter(cm.getLine(line));\n vim.lastHPos = endCh;\n }\n\n vim.lastHSPos = cm.charCoords(new Pos(line, endCh), \"div\").left;\n return new Pos(line, endCh);\n },\n moveByDisplayLines: function moveByDisplayLines(cm, head, motionArgs, vim) {\n var cur = head;\n\n switch (vim.lastMotion) {\n case this.moveByDisplayLines:\n case this.moveByScroll:\n case this.moveByLines:\n case this.moveToColumn:\n case this.moveToEol:\n break;\n\n default:\n vim.lastHSPos = cm.charCoords(cur, \"div\").left;\n }\n\n var repeat = motionArgs.repeat;\n var res = cm.findPosV(cur, motionArgs.forward ? repeat : -repeat, \"line\", vim.lastHSPos);\n\n if (res.hitSide) {\n if (motionArgs.forward) {\n var lastCharCoords = cm.charCoords(res, \"div\");\n var goalCoords = {\n top: lastCharCoords.top + 8,\n left: vim.lastHSPos\n };\n var res = cm.coordsChar(goalCoords, \"div\");\n } else {\n var resCoords = cm.charCoords(new Pos(cm.firstLine(), 0), \"div\");\n resCoords.left = vim.lastHSPos;\n res = cm.coordsChar(resCoords, \"div\");\n }\n }\n\n vim.lastHPos = res.ch;\n return res;\n },\n moveByPage: function moveByPage(cm, head, motionArgs) {\n // CodeMirror only exposes functions that move the cursor page down, so\n // doing this bad hack to move the cursor and move it back. evalInput\n // will move the cursor to where it should be in the end.\n var curStart = head;\n var repeat = motionArgs.repeat;\n return cm.findPosV(curStart, motionArgs.forward ? repeat : -repeat, \"page\");\n },\n moveByParagraph: function moveByParagraph(cm, head, motionArgs) {\n var dir = motionArgs.forward ? 1 : -1;\n return findParagraph(cm, head, motionArgs.repeat, dir);\n },\n moveBySentence: function moveBySentence(cm, head, motionArgs) {\n var dir = motionArgs.forward ? 1 : -1;\n return findSentence(cm, head, motionArgs.repeat, dir);\n },\n moveByScroll: function moveByScroll(cm, head, motionArgs, vim) {\n var scrollbox = cm.getScrollInfo();\n var curEnd = null;\n var repeat = motionArgs.repeat;\n\n if (!repeat) {\n repeat = scrollbox.clientHeight / (2 * cm.defaultTextHeight());\n }\n\n var orig = cm.charCoords(head, \"local\");\n motionArgs.repeat = repeat;\n var curEnd = motions.moveByDisplayLines(cm, head, motionArgs, vim);\n\n if (!curEnd) {\n return null;\n }\n\n var dest = cm.charCoords(curEnd, \"local\");\n cm.scrollTo(null, scrollbox.top + dest.top - orig.top);\n return curEnd;\n },\n moveByWords: function moveByWords(cm, head, motionArgs) {\n return moveToWord(cm, head, motionArgs.repeat, !!motionArgs.forward, !!motionArgs.wordEnd, !!motionArgs.bigWord);\n },\n moveTillCharacter: function moveTillCharacter(cm, _head, motionArgs) {\n var repeat = motionArgs.repeat;\n\n var curEnd = _moveToCharacter(cm, repeat, motionArgs.forward, motionArgs.selectedCharacter);\n\n var increment = motionArgs.forward ? -1 : 1;\n recordLastCharacterSearch(increment, motionArgs);\n if (!curEnd) return null;\n curEnd.ch += increment;\n return curEnd;\n },\n moveToCharacter: function moveToCharacter(cm, head, motionArgs) {\n var repeat = motionArgs.repeat;\n recordLastCharacterSearch(0, motionArgs);\n return _moveToCharacter(cm, repeat, motionArgs.forward, motionArgs.selectedCharacter) || head;\n },\n moveToSymbol: function moveToSymbol(cm, head, motionArgs) {\n var repeat = motionArgs.repeat;\n return findSymbol(cm, repeat, motionArgs.forward, motionArgs.selectedCharacter) || head;\n },\n moveToColumn: function moveToColumn(cm, head, motionArgs, vim) {\n var repeat = motionArgs.repeat; // repeat is equivalent to which column we want to move to!\n\n vim.lastHPos = repeat - 1;\n vim.lastHSPos = cm.charCoords(head, \"div\").left;\n return _moveToColumn(cm, repeat);\n },\n moveToEol: function moveToEol(cm, head, motionArgs, vim) {\n return _moveToEol(cm, head, motionArgs, vim, false);\n },\n moveToFirstNonWhiteSpaceCharacter: function moveToFirstNonWhiteSpaceCharacter(cm, head) {\n // Go to the start of the line where the text begins, or the end for\n // whitespace-only lines\n var cursor = head;\n return new Pos(cursor.line, findFirstNonWhiteSpaceCharacter(cm.getLine(cursor.line)));\n },\n moveToMatchedSymbol: function moveToMatchedSymbol(cm, head) {\n var cursor = head;\n var line = cursor.line;\n var ch = cursor.ch;\n var lineText = cm.getLine(line); // var symbol;\n // for (; ch < lineText.length; ch++) {\n // symbol = lineText.charAt(ch);\n // if (symbol && isMatchableSymbol(symbol)) {\n // var style = cm.getTokenTypeAt(new Pos(line, ch + 1));\n // if (style !== \"string\" && style !== \"comment\") {\n // break;\n // }\n // }\n // }\n\n if (ch < lineText.length) {\n // Only include angle brackets in analysis if they are being matched.\n var re = ch === \"<\" || ch === \">\" ? /[(){}[\\]<>]/ : /[(){}[\\]]/;\n var matched = cm.findMatchingBracket(new Pos(line, ch), {\n bracketRegex: re\n });\n return matched.to;\n } else {\n return cursor;\n }\n },\n moveToStartOfLine: function moveToStartOfLine(_cm, head) {\n return new Pos(head.line, 0);\n },\n moveToLineOrEdgeOfDocument: function moveToLineOrEdgeOfDocument(cm, _head, motionArgs) {\n var lineNum = motionArgs.forward ? cm.lastLine() : cm.firstLine();\n\n if (motionArgs.repeatIsExplicit) {\n lineNum = motionArgs.repeat - cm.getOption(\"firstLineNumber\");\n }\n\n return new Pos(lineNum, findFirstNonWhiteSpaceCharacter(cm.getLine(lineNum)));\n },\n moveToStartOfDisplayLine: function moveToStartOfDisplayLine(cm) {\n cm.execCommand(\"goLineLeft\");\n return cm.getCursor();\n },\n moveToEndOfDisplayLine: function moveToEndOfDisplayLine(cm) {\n cm.execCommand(\"goLineRight\");\n var head = cm.getCursor();\n if (head.sticky == \"before\") head.ch--;\n return head;\n },\n textObjectManipulation: function textObjectManipulation(cm, head, motionArgs, vim) {\n // TODO: lots of possible exceptions that can be thrown here. Try da(\n // outside of a () block.\n var mirroredPairs = {\n \"(\": \")\",\n \")\": \"(\",\n \"{\": \"}\",\n \"}\": \"{\",\n \"[\": \"]\",\n \"]\": \"[\",\n \"<\": \">\",\n \">\": \"<\"\n };\n var selfPaired = {\n \"'\": true,\n '\"': true,\n \"`\": true\n };\n var character = motionArgs.selectedCharacter; // 'b' refers to '()' block.\n // 'B' refers to '{}' block.\n\n if (character == \"b\") {\n character = \"(\";\n } else if (character == \"B\") {\n character = \"{\";\n } // Inclusive is the difference between a and i\n // TODO: Instead of using the additional text object map to perform text\n // object operations, merge the map into the defaultKeyMap and use\n // motionArgs to define behavior. Define separate entries for 'aw',\n // 'iw', 'a[', 'i[', etc.\n\n\n var inclusive = !motionArgs.textObjectInner;\n var tmp;\n\n if (mirroredPairs[character]) {\n tmp = selectCompanionObject(cm, head, character, inclusive);\n } else if (selfPaired[character]) {\n tmp = findBeginningAndEnd(cm, head, character, inclusive);\n } else if (character === \"W\") {\n tmp = expandWordUnderCursor(cm, inclusive, true\n /** forward */\n , true\n /** bigWord */\n );\n } else if (character === \"w\") {\n tmp = expandWordUnderCursor(cm, inclusive, true\n /** forward */\n , false\n /** bigWord */\n );\n } else if (character === \"p\") {\n tmp = findParagraph(cm, head, motionArgs.repeat, 0, inclusive);\n motionArgs.linewise = true;\n\n if (vim.visualMode) {\n if (!vim.visualLine) {\n vim.visualLine = true;\n }\n } else {\n var operatorArgs = vim.inputState.operatorArgs;\n\n if (operatorArgs) {\n operatorArgs.linewise = true;\n }\n\n tmp.end.line--;\n }\n } else if (character === \"t\") {\n tmp = expandTagUnderCursor(cm, head, inclusive);\n } else {\n // No text object defined for this, don't move.\n return null;\n }\n\n if (!cm.state.vim.visualMode) {\n return [tmp.start, tmp.end];\n } else {\n return expandSelection(cm, tmp.start, tmp.end);\n }\n },\n repeatLastCharacterSearch: function repeatLastCharacterSearch(cm, head, motionArgs) {\n var lastSearch = vimGlobalState.lastCharacterSearch;\n var repeat = motionArgs.repeat;\n var forward = motionArgs.forward === lastSearch.forward;\n var increment = (lastSearch.increment ? 1 : 0) * (forward ? -1 : 1);\n cm.moveH(-increment, \"char\");\n motionArgs.inclusive = forward ? true : false;\n\n var curEnd = _moveToCharacter(cm, repeat, forward, lastSearch.selectedCharacter);\n\n if (!curEnd) {\n cm.moveH(increment, \"char\");\n return head;\n }\n\n curEnd.ch += increment;\n return curEnd;\n }\n };\n\n function defineMotion(name, fn) {\n motions[name] = fn;\n }\n\n function fillArray(val, times) {\n var arr = [];\n\n for (var i = 0; i < times; i++) {\n arr.push(val);\n }\n\n return arr;\n }\n /**\n * An operator acts on a text selection. It receives the list of selections\n * as input. The corresponding CodeMirror selection is guaranteed to\n * match the input selection.\n */\n\n\n var operators = {\n change: function change(cm, args, ranges) {\n var finalHead, text;\n var vim = cm.state.vim;\n var anchor = ranges[0].anchor,\n head = ranges[0].head;\n\n if (!vim.visualMode) {\n text = cm.getRange(anchor, head);\n var lastState = vim.lastEditInputState || {};\n\n if (lastState.motion == \"moveByWords\" && !isWhiteSpaceString(text)) {\n // Exclude trailing whitespace if the range is not all whitespace.\n var match = /\\s+$/.exec(text);\n\n if (match && lastState.motionArgs && lastState.motionArgs.forward) {\n head = offsetCursor(head, 0, -match[0].length);\n text = text.slice(0, -match[0].length);\n }\n }\n\n var prevLineEnd = new Pos(anchor.line - 1, Number.MAX_VALUE);\n var wasLastLine = cm.firstLine() == cm.lastLine();\n\n if (head.line > cm.lastLine() && args.linewise && !wasLastLine) {\n cm.replaceRange(\"\", prevLineEnd, head);\n } else {\n cm.replaceRange(\"\", anchor, head);\n }\n\n if (args.linewise) {\n // Push the next line back down, if there is a next line.\n if (!wasLastLine) {\n cm.setCursor(prevLineEnd);\n\n _cm_adapter[\"default\"].commands.newlineAndIndent(cm);\n } // make sure cursor ends up at the end of the line.\n\n\n anchor.ch = Number.MAX_VALUE;\n }\n\n finalHead = anchor;\n } else if (args.fullLine) {\n head.ch = Number.MAX_VALUE;\n head.line--;\n cm.setSelection(anchor, head);\n text = cm.getSelection();\n cm.replaceSelections(\"\");\n finalHead = anchor;\n } else {\n text = cm.getSelection();\n var replacement = fillArray(\"\", ranges.length);\n cm.replaceSelections(replacement);\n finalHead = cursorMin(ranges[0].head, ranges[0].anchor);\n }\n\n vimGlobalState.registerController.pushText(args.registerName, \"change\", text, args.linewise, ranges.length > 1);\n actions.enterInsertMode(cm, {\n head: finalHead\n }, cm.state.vim);\n },\n // delete is a javascript keyword.\n \"delete\": function _delete(cm, args, ranges) {\n // Add to the undo stack explicitly so that this delete is recorded as a\n // specific action instead of being bundled with generic other edits.\n cm.pushUndoStop();\n var finalHead, text;\n var vim = cm.state.vim;\n\n if (!vim.visualBlock) {\n var anchor = ranges[0].anchor,\n head = ranges[0].head;\n\n if (args.linewise && head.line != cm.firstLine() && anchor.line == cm.lastLine() && anchor.line == head.line - 1) {\n // Special case for dd on last line (and first line).\n if (anchor.line == cm.firstLine()) {\n anchor.ch = 0;\n } else {\n anchor = new Pos(anchor.line - 1, lineLength(cm, anchor.line - 1));\n }\n }\n\n text = cm.getRange(anchor, head);\n cm.replaceRange(\"\", anchor, head);\n finalHead = anchor;\n\n if (args.linewise) {\n finalHead = motions.moveToFirstNonWhiteSpaceCharacter(cm, anchor);\n }\n } else {\n text = cm.getSelection();\n var replacement = fillArray(\"\", ranges.length);\n cm.replaceSelections(replacement);\n finalHead = cursorMin(ranges[0].head, ranges[0].anchor);\n }\n\n vimGlobalState.registerController.pushText(args.registerName, \"delete\", text, args.linewise, vim.visualBlock);\n return clipCursorToContent(cm, finalHead);\n },\n indent: function indent(cm, args, ranges) {\n var vim = cm.state.vim;\n var startLine = ranges[0].anchor.line;\n var endLine = vim.visualBlock ? ranges[ranges.length - 1].anchor.line : ranges[0].head.line; // In visual mode, n> shifts the selection right n times, instead of\n // shifting n lines right once.\n\n var repeat = vim.visualMode ? args.repeat : 1;\n\n if (args.linewise) {\n // The only way to delete a newline is to delete until the start of\n // the next line, so in linewise mode evalInput will include the next\n // line. We don't want this in indent, so we go back a line.\n endLine--;\n }\n\n cm.pushUndoStop();\n\n for (var i = startLine; i <= endLine; i++) {\n for (var j = 0; j < repeat; j++) {\n cm.indentLine(i, args.indentRight);\n }\n }\n\n cm.pushUndoStop();\n return motions.moveToFirstNonWhiteSpaceCharacter(cm, ranges[0].anchor);\n },\n indentAuto: function indentAuto(cm, _args, ranges) {\n cm.execCommand(\"indentAuto\");\n return motions.moveToFirstNonWhiteSpaceCharacter(cm, ranges[0].anchor);\n },\n changeCase: function changeCase(cm, args, ranges, oldAnchor, newHead) {\n var selections = cm.getSelections();\n var swapped = [];\n var toLower = args.toLower;\n\n for (var j = 0; j < selections.length; j++) {\n var toSwap = selections[j];\n var text = \"\";\n\n if (toLower === true) {\n text = toSwap.toLowerCase();\n } else if (toLower === false) {\n text = toSwap.toUpperCase();\n } else {\n for (var i = 0; i < toSwap.length; i++) {\n var character = toSwap.charAt(i);\n text += isUpperCase(character) ? character.toLowerCase() : character.toUpperCase();\n }\n }\n\n swapped.push(text);\n }\n\n cm.replaceSelections(swapped);\n\n if (args.shouldMoveCursor) {\n return newHead;\n } else if (!cm.state.vim.visualMode && args.linewise && ranges[0].anchor.line + 1 == ranges[0].head.line) {\n return motions.moveToFirstNonWhiteSpaceCharacter(cm, oldAnchor);\n } else if (args.linewise) {\n return oldAnchor;\n } else {\n return cursorMin(ranges[0].anchor, ranges[0].head);\n }\n },\n yank: function yank(cm, args, ranges, oldAnchor) {\n var vim = cm.state.vim;\n var text = cm.getSelection();\n var endPos = vim.visualMode ? cursorMin(vim.sel.anchor, vim.sel.head, ranges[0].head, ranges[0].anchor) : oldAnchor;\n vimGlobalState.registerController.pushText(args.registerName, \"yank\", text, args.linewise, vim.visualBlock);\n return endPos;\n }\n };\n\n function defineOperator(name, fn) {\n operators[name] = fn;\n }\n\n var actions = {\n jumpListWalk: function jumpListWalk(cm, actionArgs, vim) {\n if (vim.visualMode) {\n return;\n }\n\n var repeat = actionArgs.repeat;\n var forward = actionArgs.forward;\n var jumpList = vimGlobalState.jumpList;\n var mark = jumpList.move(cm, forward ? repeat : -repeat);\n var markPos = mark ? mark.find() : undefined;\n markPos = markPos ? markPos : cm.getCursor();\n cm.setCursor(markPos);\n },\n scroll: function scroll(cm, actionArgs, vim) {\n if (vim.visualMode) {\n return;\n }\n\n var repeat = actionArgs.repeat || 1;\n var lineHeight = cm.defaultTextHeight();\n var top = cm.getScrollInfo().top;\n var delta = lineHeight * repeat;\n var newPos = actionArgs.forward ? top + delta : top - delta;\n var cursor = copyCursor(cm.getCursor());\n var cursorCoords = cm.charCoords(cursor, \"local\");\n\n if (actionArgs.forward) {\n if (newPos > cursorCoords.top) {\n cursor.line += (newPos - cursorCoords.top) / lineHeight;\n cursor.line = Math.ceil(cursor.line);\n cm.setCursor(cursor);\n cursorCoords = cm.charCoords(cursor, \"local\");\n cm.scrollTo(null, cursorCoords.top);\n } else {\n // Cursor stays within bounds. Just reposition the scroll window.\n cm.scrollTo(null, newPos);\n }\n } else {\n var newBottom = newPos + cm.getScrollInfo().clientHeight;\n\n if (newBottom < cursorCoords.bottom) {\n cursor.line -= (cursorCoords.bottom - newBottom) / lineHeight;\n cursor.line = Math.floor(cursor.line);\n cm.setCursor(cursor);\n cursorCoords = cm.charCoords(cursor, \"local\");\n cm.scrollTo(null, cursorCoords.bottom - cm.getScrollInfo().clientHeight);\n } else {\n // Cursor stays within bounds. Just reposition the scroll window.\n cm.scrollTo(null, newPos);\n }\n }\n },\n scrollToCursor: function scrollToCursor(cm, actionArgs) {\n var lineNum = cm.getCursor().line;\n var charCoords = cm.charCoords(new Pos(lineNum, 0), \"local\");\n var height = cm.getScrollInfo().clientHeight;\n var y = charCoords.top;\n var lineHeight = charCoords.bottom - y;\n\n switch (actionArgs.position) {\n case \"center\":\n y = y - height / 2 + lineHeight;\n break;\n\n case \"bottom\":\n y = y - height + lineHeight;\n break;\n } // cm.scrollTo(null, y);\n\n\n cm.moveCurrentLineTo(y);\n },\n replayMacro: function replayMacro(cm, actionArgs, vim) {\n var registerName = actionArgs.selectedCharacter;\n var repeat = actionArgs.repeat;\n var macroModeState = vimGlobalState.macroModeState;\n\n if (registerName == \"@\") {\n registerName = macroModeState.latestRegister;\n } else {\n macroModeState.latestRegister = registerName;\n }\n\n while (repeat--) {\n executeMacroRegister(cm, vim, macroModeState, registerName);\n }\n },\n enterMacroRecordMode: function enterMacroRecordMode(cm, actionArgs) {\n var macroModeState = vimGlobalState.macroModeState;\n var registerName = actionArgs.selectedCharacter;\n\n if (vimGlobalState.registerController.isValidRegister(registerName)) {\n macroModeState.enterMacroRecordMode(cm, registerName);\n }\n },\n toggleOverwrite: function toggleOverwrite(cm) {\n if (!cm.state.overwrite) {\n cm.toggleOverwrite(true);\n cm.setOption(\"keyMap\", \"vim-replace\");\n\n _cm_adapter[\"default\"].signal(cm, \"vim-mode-change\", {\n mode: \"replace\"\n });\n } else {\n cm.toggleOverwrite(false);\n cm.setOption(\"keyMap\", \"vim-insert\");\n\n _cm_adapter[\"default\"].signal(cm, \"vim-mode-change\", {\n mode: \"insert\"\n });\n }\n },\n enterInsertMode: function enterInsertMode(cm, actionArgs, vim) {\n if (cm.getOption(\"readOnly\")) {\n return;\n }\n\n vim.insertMode = true;\n vim.insertModeRepeat = actionArgs && actionArgs.repeat || 1;\n var insertAt = actionArgs ? actionArgs.insertAt : null;\n var sel = vim.sel;\n var head = actionArgs.head || cm.getCursor(\"head\");\n var height = cm.listSelections().length;\n\n if (insertAt == \"eol\") {\n head = new Pos(head.line, lineLength(cm, head.line));\n } else if (insertAt == \"bol\") {\n head = new Pos(head.line, 0);\n } else if (insertAt == \"charAfter\") {\n head = offsetCursor(head, 0, 1);\n } else if (insertAt == \"firstNonBlank\") {\n head = motions.moveToFirstNonWhiteSpaceCharacter(cm, head);\n } else if (insertAt == \"startOfSelectedArea\") {\n if (!vim.visualMode) return;\n\n if (!vim.visualBlock) {\n if (sel.head.line < sel.anchor.line) {\n head = sel.head;\n } else {\n head = new Pos(sel.anchor.line, 0);\n }\n } else {\n head = new Pos(Math.min(sel.head.line, sel.anchor.line), Math.min(sel.head.ch, sel.anchor.ch));\n height = Math.abs(sel.head.line - sel.anchor.line) + 1;\n }\n } else if (insertAt == \"endOfSelectedArea\") {\n if (!vim.visualMode) return;\n\n if (!vim.visualBlock) {\n if (sel.head.line >= sel.anchor.line) {\n head = offsetCursor(sel.head, 0, 1);\n } else {\n head = new Pos(sel.anchor.line, 0);\n }\n } else {\n head = new Pos(Math.min(sel.head.line, sel.anchor.line), Math.max(sel.head.ch, sel.anchor.ch) + 1);\n height = Math.abs(sel.head.line - sel.anchor.line) + 1;\n }\n } else if (insertAt == \"inplace\") {\n if (vim.visualMode) {\n return;\n }\n } else if (insertAt == \"lastEdit\") {\n head = getLastEditPos(cm) || head;\n }\n\n cm.setOption(\"disableInput\", false);\n\n if (actionArgs && actionArgs.replace) {\n // Handle Replace-mode as a special case of insert mode.\n cm.toggleOverwrite(true);\n cm.setOption(\"keyMap\", \"vim-replace\");\n\n _cm_adapter[\"default\"].signal(cm, \"vim-mode-change\", {\n mode: \"replace\"\n });\n } else {\n cm.toggleOverwrite(false);\n cm.setOption(\"keyMap\", \"vim-insert\");\n\n _cm_adapter[\"default\"].signal(cm, \"vim-mode-change\", {\n mode: \"insert\"\n });\n }\n\n if (!vimGlobalState.macroModeState.isPlaying) {\n // Only record if not replaying.\n cm.on(\"change\", onChange);\n\n _cm_adapter[\"default\"].on(cm.getInputField(), \"keydown\", onKeyEventTargetKeyDown);\n }\n\n if (vim.visualMode) {\n exitVisualMode(cm);\n }\n\n selectForInsert(cm, head, height);\n },\n toggleVisualMode: function toggleVisualMode(cm, actionArgs, vim) {\n var repeat = actionArgs.repeat;\n var anchor = cm.getCursor();\n var head; // TODO: The repeat should actually select number of characters/lines\n // equal to the repeat times the size of the previous visual\n // operation.\n\n if (!vim.visualMode) {\n // Entering visual mode\n vim.visualMode = true;\n vim.visualLine = !!actionArgs.linewise;\n vim.visualBlock = !!actionArgs.blockwise;\n head = clipCursorToContent(cm, new Pos(anchor.line, anchor.ch + repeat - 1));\n vim.sel = {\n anchor: anchor,\n head: head\n };\n\n _cm_adapter[\"default\"].signal(cm, \"vim-mode-change\", {\n mode: \"visual\",\n subMode: vim.visualLine ? \"linewise\" : vim.visualBlock ? \"blockwise\" : \"\"\n });\n\n updateCmSelection(cm);\n updateMark(cm, vim, \"<\", cursorMin(anchor, head));\n updateMark(cm, vim, \">\", cursorMax(anchor, head));\n } else if (vim.visualLine ^ actionArgs.linewise || vim.visualBlock ^ actionArgs.blockwise) {\n // Toggling between modes\n vim.visualLine = !!actionArgs.linewise;\n vim.visualBlock = !!actionArgs.blockwise;\n\n _cm_adapter[\"default\"].signal(cm, \"vim-mode-change\", {\n mode: \"visual\",\n subMode: vim.visualLine ? \"linewise\" : vim.visualBlock ? \"blockwise\" : \"\"\n });\n\n updateCmSelection(cm);\n } else {\n exitVisualMode(cm);\n }\n },\n reselectLastSelection: function reselectLastSelection(cm, _actionArgs, vim) {\n var lastSelection = vim.lastSelection;\n\n if (vim.visualMode) {\n updateLastSelection(cm, vim);\n }\n\n if (lastSelection) {\n var anchor = lastSelection.anchorMark.find();\n var head = lastSelection.headMark.find();\n\n if (!anchor || !head) {\n // If the marks have been destroyed due to edits, do nothing.\n return;\n }\n\n vim.sel = {\n anchor: anchor,\n head: head\n };\n vim.visualMode = true;\n vim.visualLine = lastSelection.visualLine;\n vim.visualBlock = lastSelection.visualBlock;\n updateCmSelection(cm);\n updateMark(cm, vim, \"<\", cursorMin(anchor, head));\n updateMark(cm, vim, \">\", cursorMax(anchor, head));\n\n _cm_adapter[\"default\"].signal(cm, \"vim-mode-change\", {\n mode: \"visual\",\n subMode: vim.visualLine ? \"linewise\" : vim.visualBlock ? \"blockwise\" : \"\"\n });\n }\n },\n joinLines: function joinLines(cm, actionArgs, vim) {\n var curStart, curEnd;\n\n if (vim.visualMode) {\n curStart = cm.getCursor(\"anchor\");\n curEnd = cm.getCursor(\"head\");\n\n if (cursorIsBefore(curEnd, curStart)) {\n var tmp = curEnd;\n curEnd = curStart;\n curStart = tmp;\n }\n\n curEnd.ch = lineLength(cm, curEnd.line) - 1;\n } else {\n // Repeat is the number of lines to join. Minimum 2 lines.\n var repeat = Math.max(actionArgs.repeat, 2);\n curStart = cm.getCursor();\n curEnd = clipCursorToContent(cm, new Pos(curStart.line + repeat - 1, Infinity));\n }\n\n var finalCh = 0;\n\n for (var i = curStart.line; i < curEnd.line; i++) {\n finalCh = lineLength(cm, curStart.line);\n var tmp = new Pos(curStart.line + 1, lineLength(cm, curStart.line + 1));\n var text = cm.getRange(curStart, tmp);\n text = actionArgs.keepSpaces ? text.replace(/\\n\\r?/g, \"\") : text.replace(/\\n\\s*/g, \" \");\n cm.replaceRange(text, curStart, tmp);\n }\n\n var curFinalPos = new Pos(curStart.line, finalCh);\n\n if (vim.visualMode) {\n exitVisualMode(cm, false);\n }\n\n cm.setCursor(curFinalPos);\n },\n newLineAndEnterInsertMode: function newLineAndEnterInsertMode(cm, actionArgs, vim) {\n if (cm.getOption(\"readOnly\")) {\n return;\n }\n\n vim.insertMode = true;\n var insertAt = copyCursor(cm.getCursor());\n\n if (insertAt.line === cm.firstLine() && !actionArgs.after) {\n // Special case for inserting newline before start of document.\n cm.replaceRange(\"\\n\", new Pos(cm.firstLine(), 0));\n cm.setCursor(cm.firstLine(), 0);\n } else {\n insertAt.line = actionArgs.after ? insertAt.line : insertAt.line - 1;\n insertAt.ch = lineLength(cm, insertAt.line);\n cm.setCursor(insertAt);\n var newlineFn = _cm_adapter[\"default\"].commands.newlineAndIndentContinueComment || _cm_adapter[\"default\"].commands.newlineAndIndent;\n newlineFn(cm);\n }\n\n this.enterInsertMode(cm, {\n repeat: actionArgs.repeat\n }, vim);\n },\n paste: function paste(cm, actionArgs, vim) {\n var cur = copyCursor(cm.getCursor());\n var register = vimGlobalState.registerController.getRegister(actionArgs.registerName);\n var text = register.toString();\n\n if (!text) {\n return;\n }\n\n if (actionArgs.matchIndent) {\n var tabSize = cm.getOption(\"tabSize\"); // length that considers tabs and tabSize\n\n var whitespaceLength = function whitespaceLength(str) {\n var tabs = str.split(\"\\t\").length - 1;\n var spaces = str.split(\" \").length - 1;\n return tabs * tabSize + spaces * 1;\n };\n\n var currentLine = cm.getLine(cm.getCursor().line);\n var indent = whitespaceLength(currentLine.match(/^\\s*/)[0]); // chomp last newline b/c don't want it to match /^\\s*/gm\n\n var chompedText = text.replace(/\\n$/, \"\");\n var wasChomped = text !== chompedText;\n var firstIndent = whitespaceLength(text.match(/^\\s*/)[0]);\n var text = chompedText.replace(/^\\s*/gm, function (wspace) {\n var newIndent = indent + (whitespaceLength(wspace) - firstIndent);\n\n if (newIndent < 0) {\n return \"\";\n } else if (cm.getOption(\"indentWithTabs\")) {\n var quotient = Math.floor(newIndent / tabSize);\n return Array(quotient + 1).join(\"\\t\");\n } else {\n return Array(newIndent + 1).join(\" \");\n }\n });\n text += wasChomped ? \"\\n\" : \"\";\n }\n\n if (actionArgs.repeat > 1) {\n var text = Array(actionArgs.repeat + 1).join(text);\n }\n\n var linewise = register.linewise;\n var blockwise = register.blockwise;\n\n if (blockwise) {\n text = text.split(\"\\n\");\n\n if (linewise) {\n text.pop();\n }\n\n for (var i = 0; i < text.length; i++) {\n text[i] = text[i] == \"\" ? \" \" : text[i];\n }\n\n cur.ch += actionArgs.after ? 1 : 0;\n cur.ch = Math.min(lineLength(cm, cur.line), cur.ch);\n } else if (linewise) {\n if (vim.visualMode) {\n text = vim.visualLine ? text.slice(0, -1) : \"\\n\" + text.slice(0, text.length - 1) + \"\\n\";\n } else if (actionArgs.after) {\n // Move the newline at the end to the start instead, and paste just\n // before the newline character of the line we are on right now.\n text = \"\\n\" + text.slice(0, text.length - 1);\n cur.ch = lineLength(cm, cur.line);\n } else {\n cur.ch = 0;\n }\n } else {\n cur.ch += actionArgs.after ? 1 : 0;\n }\n\n var curPosFinal;\n var idx;\n\n if (vim.visualMode) {\n // save the pasted text for reselection if the need arises\n vim.lastPastedText = text;\n var lastSelectionCurEnd;\n var selectedArea = getSelectedAreaRange(cm, vim);\n var selectionStart = selectedArea[0];\n var selectionEnd = selectedArea[1];\n var selectedText = cm.getSelection();\n var selections = cm.listSelections();\n var emptyStrings = new Array(selections.length).join(\"1\").split(\"1\"); // save the curEnd marker before it get cleared due to cm.replaceRange.\n\n if (vim.lastSelection) {\n lastSelectionCurEnd = vim.lastSelection.headMark.find();\n } // push the previously selected text to unnamed register\n\n\n vimGlobalState.registerController.unnamedRegister.setText(selectedText);\n\n if (blockwise) {\n // first delete the selected text\n cm.replaceSelections(emptyStrings); // Set new selections as per the block length of the yanked text\n\n selectionEnd = new Pos(selectionStart.line + text.length - 1, selectionStart.ch);\n cm.setCursor(selectionStart);\n selectBlock(cm, selectionEnd);\n cm.replaceSelections(text);\n curPosFinal = selectionStart;\n } else if (vim.visualBlock) {\n cm.replaceSelections(emptyStrings);\n cm.setCursor(selectionStart);\n cm.replaceRange(text, selectionStart, selectionStart);\n curPosFinal = selectionStart;\n } else {\n cm.replaceRange(text, selectionStart, selectionEnd);\n curPosFinal = cm.posFromIndex(cm.indexFromPos(selectionStart) + text.length - 1);\n } // restore the the curEnd marker\n\n\n if (lastSelectionCurEnd) {\n vim.lastSelection.headMark = cm.setBookmark(lastSelectionCurEnd);\n }\n\n if (linewise) {\n curPosFinal.ch = 0;\n }\n } else {\n if (blockwise) {\n cm.setCursor(cur);\n\n for (var i = 0; i < text.length; i++) {\n var line = cur.line + i;\n\n if (line > cm.lastLine()) {\n cm.replaceRange(\"\\n\", new Pos(line, 0));\n }\n\n var lastCh = lineLength(cm, line);\n\n if (lastCh < cur.ch) {\n extendLineToColumn(cm, line, cur.ch);\n }\n }\n\n cm.setCursor(cur);\n selectBlock(cm, new Pos(cur.line + text.length - 1, cur.ch));\n cm.replaceSelections(text);\n curPosFinal = cur;\n } else {\n cm.replaceRange(text, cur); // Now fine tune the cursor to where we want it.\n\n if (linewise && actionArgs.after) {\n curPosFinal = new Pos(cur.line + 1, findFirstNonWhiteSpaceCharacter(cm.getLine(cur.line + 1)));\n } else if (linewise && !actionArgs.after) {\n curPosFinal = new Pos(cur.line, findFirstNonWhiteSpaceCharacter(cm.getLine(cur.line)));\n } else if (!linewise && actionArgs.after) {\n idx = cm.indexFromPos(cur);\n curPosFinal = cm.posFromIndex(idx + text.length - 1);\n } else {\n idx = cm.indexFromPos(cur);\n curPosFinal = cm.posFromIndex(idx + text.length);\n }\n }\n }\n\n if (vim.visualMode) {\n exitVisualMode(cm, false);\n }\n\n cm.setCursor(curPosFinal);\n },\n undo: function undo(cm, actionArgs) {\n cm.operation(function () {\n repeatFn(cm, _cm_adapter[\"default\"].commands.undo, actionArgs.repeat)();\n cm.setCursor(cm.getCursor(\"anchor\"));\n });\n },\n redo: function redo(cm, actionArgs) {\n repeatFn(cm, _cm_adapter[\"default\"].commands.redo, actionArgs.repeat)();\n },\n setRegister: function setRegister(_cm, actionArgs, vim) {\n vim.inputState.registerName = actionArgs.selectedCharacter;\n },\n setMark: function setMark(cm, actionArgs, vim) {\n var markName = actionArgs.selectedCharacter;\n updateMark(cm, vim, markName, cm.getCursor());\n },\n replace: function replace(cm, actionArgs, vim) {\n var replaceWith = actionArgs.selectedCharacter;\n var curStart = cm.getCursor();\n var replaceTo;\n var curEnd;\n var selections = cm.listSelections();\n\n if (vim.visualMode) {\n curStart = cm.getCursor(\"start\");\n curEnd = cm.getCursor(\"end\");\n } else {\n var line = cm.getLine(curStart.line);\n replaceTo = curStart.ch + actionArgs.repeat;\n\n if (replaceTo > line.length) {\n replaceTo = line.length;\n }\n\n curEnd = new Pos(curStart.line, replaceTo);\n }\n\n if (replaceWith == \"\\n\") {\n if (!vim.visualMode) cm.replaceRange(\"\", curStart, curEnd); // special case, where vim help says to replace by just one line-break\n\n (_cm_adapter[\"default\"].commands.newlineAndIndentContinueComment || _cm_adapter[\"default\"].commands.newlineAndIndent)(cm);\n } else {\n var replaceWithStr = cm.getRange(curStart, curEnd); //replace all characters in range by selected, but keep linebreaks\n\n replaceWithStr = replaceWithStr.replace(/[^\\n]/g, replaceWith);\n\n if (vim.visualBlock) {\n // Tabs are split in visua block before replacing\n var spaces = new Array(cm.getOption(\"tabSize\") + 1).join(\" \");\n replaceWithStr = cm.getSelection();\n replaceWithStr = replaceWithStr.replace(/\\t/g, spaces).replace(/[^\\n]/g, replaceWith).split(\"\\n\");\n cm.replaceSelections(replaceWithStr);\n } else {\n cm.replaceRange(replaceWithStr, curStart, curEnd);\n }\n\n if (vim.visualMode) {\n curStart = cursorIsBefore(selections[0].anchor, selections[0].head) ? selections[0].anchor : selections[0].head;\n cm.setCursor(curStart);\n exitVisualMode(cm, false);\n } else {\n cm.setCursor(offsetCursor(curEnd, 0, -1));\n }\n }\n },\n incrementNumberToken: function incrementNumberToken(cm, actionArgs) {\n var cur = cm.getCursor();\n var lineStr = cm.getLine(cur.line);\n var re = /(-?)(?:(0x)([\\da-f]+)|(0b|0|)(\\d+))/gi;\n var match;\n var start;\n var end;\n var numberStr;\n\n while ((match = re.exec(lineStr)) !== null) {\n start = match.index;\n end = start + match[0].length;\n if (cur.ch < end) break;\n }\n\n if (!actionArgs.backtrack && end <= cur.ch) return;\n\n if (match) {\n var baseStr = match[2] || match[4];\n var digits = match[3] || match[5];\n var increment = actionArgs.increase ? 1 : -1;\n var base = {\n \"0b\": 2,\n 0: 8,\n \"\": 10,\n \"0x\": 16\n }[baseStr.toLowerCase()];\n var number = parseInt(match[1] + digits, base) + increment * actionArgs.repeat;\n numberStr = number.toString(base);\n var zeroPadding = baseStr ? new Array(digits.length - numberStr.length + 1 + match[1].length).join(\"0\") : \"\";\n\n if (numberStr.charAt(0) === \"-\") {\n numberStr = \"-\" + baseStr + zeroPadding + numberStr.substr(1);\n } else {\n numberStr = baseStr + zeroPadding + numberStr;\n }\n\n var from = new Pos(cur.line, start);\n var to = new Pos(cur.line, end);\n cm.replaceRange(numberStr, from, to);\n } else {\n return;\n }\n\n cm.setCursor(new Pos(cur.line, start + numberStr.length - 1));\n },\n repeatLastEdit: function repeatLastEdit(cm, actionArgs, vim) {\n var lastEditInputState = vim.lastEditInputState;\n\n if (!lastEditInputState) {\n return;\n }\n\n var repeat = actionArgs.repeat;\n\n if (repeat && actionArgs.repeatIsExplicit) {\n vim.lastEditInputState.repeatOverride = repeat;\n } else {\n repeat = vim.lastEditInputState.repeatOverride || repeat;\n }\n\n _repeatLastEdit(cm, vim, repeat, false\n /** repeatForInsert */\n );\n },\n indent: function indent(cm, actionArgs) {\n cm.indentLine(cm.getCursor().line, actionArgs.indentRight);\n },\n exitInsertMode: exitInsertMode\n };\n\n function defineAction(name, fn) {\n actions[name] = fn;\n }\n /*\n * Below are miscellaneous utility functions used by vim.js\n */\n\n /**\n * Clips cursor to ensure that line is within the buffer's range\n * If includeLineBreak is true, then allow cur.ch == lineLength.\n */\n\n\n function clipCursorToContent(cm, cur) {\n var vim = cm.state.vim;\n var includeLineBreak = vim.insertMode || vim.visualMode;\n var line = Math.min(Math.max(cm.firstLine(), cur.line), cm.lastLine());\n var maxCh = lineLength(cm, line) - 1 + !!includeLineBreak;\n var ch = Math.min(Math.max(0, cur.ch), maxCh);\n return new Pos(line, ch);\n }\n\n function copyArgs(args) {\n var ret = {};\n\n for (var prop in args) {\n if (args.hasOwnProperty(prop)) {\n ret[prop] = args[prop];\n }\n }\n\n return ret;\n }\n\n function offsetCursor(cur, offsetLine, offsetCh) {\n if (_typeof(offsetLine) === \"object\") {\n offsetCh = offsetLine.ch;\n offsetLine = offsetLine.line;\n }\n\n return new Pos(cur.line + offsetLine, cur.ch + offsetCh);\n }\n\n function commandMatches(keys, keyMap, context, inputState) {\n // Partial matches are not applied. They inform the key handler\n // that the current key sequence is a subsequence of a valid key\n // sequence, so that the key buffer is not cleared.\n var match,\n partial = [],\n full = [];\n\n for (var i = 0; i < keyMap.length; i++) {\n var command = keyMap[i];\n\n if (context == \"insert\" && command.context != \"insert\" || command.context && command.context != context || inputState.operator && command.type == \"action\" || !(match = commandMatch(keys, command.keys))) {\n continue;\n }\n\n if (match == \"partial\") {\n partial.push(command);\n }\n\n if (match == \"full\") {\n full.push(command);\n }\n }\n\n return {\n partial: partial.length && partial,\n full: full.length && full\n };\n }\n\n function commandMatch(pressed, mapped) {\n if (mapped.slice(-11) == \"\") {\n // Last character matches anything.\n var prefixLen = mapped.length - 11;\n var pressedPrefix = pressed.slice(0, prefixLen);\n var mappedPrefix = mapped.slice(0, prefixLen);\n return pressedPrefix == mappedPrefix && pressed.length > prefixLen ? \"full\" : mappedPrefix.indexOf(pressedPrefix) == 0 ? \"partial\" : false;\n } else {\n return pressed == mapped ? \"full\" : mapped.indexOf(pressed) == 0 ? \"partial\" : false;\n }\n }\n\n function lastChar(keys) {\n var match = /^.*(<[^>]+>)$/.exec(keys);\n var selectedCharacter = match ? match[1] : keys.slice(-1);\n\n if (selectedCharacter.length > 1) {\n switch (selectedCharacter) {\n case \"\":\n selectedCharacter = \"\\n\";\n break;\n\n case \"\":\n selectedCharacter = \" \";\n break;\n\n default:\n selectedCharacter = \"\";\n break;\n }\n }\n\n return selectedCharacter;\n }\n\n function repeatFn(cm, fn, repeat) {\n return function () {\n for (var i = 0; i < repeat; i++) {\n fn(cm);\n }\n };\n }\n\n function copyCursor(cur) {\n return new Pos(cur.line, cur.ch);\n }\n\n function cursorEqual(cur1, cur2) {\n return cur1.ch == cur2.ch && cur1.line == cur2.line;\n }\n\n function cursorIsBefore(cur1, cur2) {\n if (cur1.line < cur2.line) {\n return true;\n }\n\n if (cur1.line == cur2.line && cur1.ch < cur2.ch) {\n return true;\n }\n\n return false;\n }\n\n function cursorMin(cur1, cur2) {\n if (arguments.length > 2) {\n cur2 = cursorMin.apply(undefined, Array.prototype.slice.call(arguments, 1));\n }\n\n return cursorIsBefore(cur1, cur2) ? cur1 : cur2;\n }\n\n function cursorMax(cur1, cur2) {\n if (arguments.length > 2) {\n cur2 = cursorMax.apply(undefined, Array.prototype.slice.call(arguments, 1));\n }\n\n return cursorIsBefore(cur1, cur2) ? cur2 : cur1;\n }\n\n function cursorIsBetween(cur1, cur2, cur3) {\n // returns true if cur2 is between cur1 and cur3.\n var cur1before2 = cursorIsBefore(cur1, cur2);\n var cur2before3 = cursorIsBefore(cur2, cur3);\n return cur1before2 && cur2before3;\n }\n\n function lineLength(cm, lineNum) {\n return cm.getLine(lineNum).length;\n }\n\n function trim(s) {\n if (s.trim) {\n return s.trim();\n }\n\n return s.replace(/^\\s+|\\s+$/g, \"\");\n }\n\n function escapeRegex(s) {\n return s.replace(/([.?*+$\\[\\]\\/\\\\(){}|\\-])/g, \"\\\\$1\");\n }\n\n function extendLineToColumn(cm, lineNum, column) {\n var endCh = lineLength(cm, lineNum);\n var spaces = new Array(column - endCh + 1).join(\" \");\n cm.setCursor(new Pos(lineNum, endCh));\n cm.replaceRange(spaces, cm.getCursor());\n } // This functions selects a rectangular block\n // of text with selectionEnd as any of its corner\n // Height of block:\n // Difference in selectionEnd.line and first/last selection.line\n // Width of the block:\n // Distance between selectionEnd.ch and any(first considered here) selection.ch\n\n\n function selectBlock(cm, selectionEnd) {\n var selections = [],\n ranges = cm.listSelections();\n var head = copyCursor(cm.clipPos(selectionEnd));\n var isClipped = !cursorEqual(selectionEnd, head);\n var curHead = cm.getCursor(\"head\");\n var primIndex = getIndex(ranges, curHead);\n var wasClipped = cursorEqual(ranges[primIndex].head, ranges[primIndex].anchor);\n var max = ranges.length - 1;\n var index = max - primIndex > primIndex ? max : 0;\n var base = ranges[index].anchor;\n var firstLine = Math.min(base.line, head.line);\n var lastLine = Math.max(base.line, head.line);\n var baseCh = base.ch,\n headCh = head.ch;\n var dir = ranges[index].head.ch - baseCh;\n var newDir = headCh - baseCh;\n\n if (dir > 0 && newDir <= 0) {\n baseCh++;\n\n if (!isClipped) {\n headCh--;\n }\n } else if (dir < 0 && newDir >= 0) {\n baseCh--;\n\n if (!wasClipped) {\n headCh++;\n }\n } else if (dir < 0 && newDir == -1) {\n baseCh--;\n headCh++;\n }\n\n for (var line = firstLine; line <= lastLine; line++) {\n var range = {\n anchor: new Pos(line, baseCh),\n head: new Pos(line, headCh)\n };\n selections.push(range);\n }\n\n cm.setSelections(selections);\n selectionEnd.ch = headCh;\n base.ch = baseCh;\n return base;\n }\n\n function selectForInsert(cm, head, height) {\n var sel = [];\n\n for (var i = 0; i < height; i++) {\n var lineHead = offsetCursor(head, i, 0);\n sel.push({\n anchor: lineHead,\n head: lineHead\n });\n }\n\n cm.setSelections(sel, 0);\n } // getIndex returns the index of the cursor in the selections.\n\n\n function getIndex(ranges, cursor, end) {\n for (var i = 0; i < ranges.length; i++) {\n var atAnchor = end != \"head\" && cursorEqual(ranges[i].anchor, cursor);\n var atHead = end != \"anchor\" && cursorEqual(ranges[i].head, cursor);\n\n if (atAnchor || atHead) {\n return i;\n }\n }\n\n return -1;\n }\n\n function getSelectedAreaRange(cm, vim) {\n var lastSelection = vim.lastSelection;\n\n var getCurrentSelectedAreaRange = function getCurrentSelectedAreaRange() {\n var selections = cm.listSelections();\n var start = selections[0];\n var end = selections[selections.length - 1];\n var selectionStart = cursorIsBefore(start.anchor, start.head) ? start.anchor : start.head;\n var selectionEnd = cursorIsBefore(end.anchor, end.head) ? end.head : end.anchor;\n return [selectionStart, selectionEnd];\n };\n\n var getLastSelectedAreaRange = function getLastSelectedAreaRange() {\n var selectionStart = cm.getCursor();\n var selectionEnd = cm.getCursor();\n var block = lastSelection.visualBlock;\n\n if (block) {\n var width = block.width;\n var height = block.height;\n selectionEnd = new Pos(selectionStart.line + height, selectionStart.ch + width);\n var selections = []; // selectBlock creates a 'proper' rectangular block.\n // We do not want that in all cases, so we manually set selections.\n\n for (var i = selectionStart.line; i < selectionEnd.line; i++) {\n var anchor = new Pos(i, selectionStart.ch);\n var head = new Pos(i, selectionEnd.ch);\n var range = {\n anchor: anchor,\n head: head\n };\n selections.push(range);\n }\n\n cm.setSelections(selections);\n } else {\n var start = lastSelection.anchorMark.find();\n var end = lastSelection.headMark.find();\n var line = end.line - start.line;\n var ch = end.ch - start.ch;\n selectionEnd = {\n line: selectionEnd.line + line,\n ch: line ? selectionEnd.ch : ch + selectionEnd.ch\n };\n\n if (lastSelection.visualLine) {\n selectionStart = new Pos(selectionStart.line, 0);\n selectionEnd = new Pos(selectionEnd.line, lineLength(cm, selectionEnd.line));\n }\n\n cm.setSelection(selectionStart, selectionEnd);\n }\n\n return [selectionStart, selectionEnd];\n };\n\n if (!vim.visualMode) {\n // In case of replaying the action.\n return getLastSelectedAreaRange();\n } else {\n return getCurrentSelectedAreaRange();\n }\n } // Updates the previous selection with the current selection's values. This\n // should only be called in visual mode.\n\n\n function updateLastSelection(cm, vim) {\n var anchor = vim.sel.anchor;\n var head = vim.sel.head; // To accommodate the effect of lastPastedText in the last selection\n\n if (vim.lastPastedText) {\n head = cm.posFromIndex(cm.indexFromPos(anchor) + vim.lastPastedText.length);\n vim.lastPastedText = null;\n }\n\n vim.lastSelection = {\n anchorMark: cm.setBookmark(anchor),\n headMark: cm.setBookmark(head),\n anchor: copyCursor(anchor),\n head: copyCursor(head),\n visualMode: vim.visualMode,\n visualLine: vim.visualLine,\n visualBlock: vim.visualBlock\n };\n }\n\n function expandSelection(cm, start, end) {\n var sel = cm.state.vim.sel;\n var head = sel.head;\n var anchor = sel.anchor;\n var tmp;\n\n if (cursorIsBefore(end, start)) {\n tmp = end;\n end = start;\n start = tmp;\n }\n\n if (cursorIsBefore(head, anchor)) {\n head = cursorMin(start, head);\n anchor = cursorMax(anchor, end);\n } else {\n anchor = cursorMin(start, anchor);\n head = cursorMax(head, end);\n head = offsetCursor(head, 0, -1);\n\n if (head.ch == -1 && head.line != cm.firstLine()) {\n head = new Pos(head.line - 1, lineLength(cm, head.line - 1));\n }\n }\n\n return [anchor, head];\n }\n /**\n * Updates the CodeMirror selection to match the provided vim selection.\n * If no arguments are given, it uses the current vim selection state.\n */\n\n\n function updateCmSelection(cm, sel, mode) {\n var vim = cm.state.vim;\n sel = sel || vim.sel;\n var mode = mode || vim.visualLine ? \"line\" : vim.visualBlock ? \"block\" : \"char\";\n var cmSel = makeCmSelection(cm, sel, mode);\n cm.setSelections(cmSel.ranges, cmSel.primary);\n }\n\n function makeCmSelection(cm, sel, mode, exclusive) {\n var head = copyCursor(sel.head);\n var anchor = copyCursor(sel.anchor);\n\n if (mode == \"char\") {\n var headOffset = !exclusive && !cursorIsBefore(sel.head, sel.anchor) ? 1 : 0;\n var anchorOffset = cursorIsBefore(sel.head, sel.anchor) ? 1 : 0;\n head = offsetCursor(sel.head, 0, headOffset);\n anchor = offsetCursor(sel.anchor, 0, anchorOffset);\n return {\n ranges: [{\n anchor: anchor,\n head: head\n }],\n primary: 0\n };\n } else if (mode == \"line\") {\n if (!cursorIsBefore(sel.head, sel.anchor)) {\n anchor.ch = 0;\n var lastLine = cm.lastLine();\n\n if (head.line > lastLine) {\n head.line = lastLine;\n }\n\n head.ch = lineLength(cm, head.line);\n } else {\n head.ch = 0;\n anchor.ch = lineLength(cm, anchor.line);\n }\n\n return {\n ranges: [{\n anchor: anchor,\n head: head\n }],\n primary: 0\n };\n } else if (mode == \"block\") {\n var top = Math.min(anchor.line, head.line),\n fromCh = anchor.ch,\n bottom = Math.max(anchor.line, head.line),\n toCh = head.ch;\n\n if (fromCh < toCh) {\n toCh += 1;\n } else {\n fromCh += 1;\n }\n\n var height = bottom - top + 1;\n var primary = head.line == top ? 0 : height - 1;\n var ranges = [];\n\n for (var i = 0; i < height; i++) {\n ranges.push({\n anchor: new Pos(top + i, fromCh),\n head: new Pos(top + i, toCh)\n });\n }\n\n return {\n ranges: ranges,\n primary: primary\n };\n }\n }\n\n function getHead(cm) {\n var cur = cm.getCursor(\"head\");\n\n if (cm.getSelection().length == 1) {\n // Small corner case when only 1 character is selected. The \"real\"\n // head is the left of head and anchor.\n cur = cursorMin(cur, cm.getCursor(\"anchor\"));\n }\n\n return cur;\n }\n /**\n * If moveHead is set to false, the CodeMirror selection will not be\n * touched. The caller assumes the responsibility of putting the cursor\n * in the right place.\n */\n\n\n function exitVisualMode(cm, moveHead) {\n var vim = cm.state.vim;\n\n if (moveHead !== false) {\n cm.setCursor(clipCursorToContent(cm, vim.sel.head));\n }\n\n updateLastSelection(cm, vim);\n vim.visualMode = false;\n vim.visualLine = false;\n vim.visualBlock = false;\n if (!vim.insertMode) _cm_adapter[\"default\"].signal(cm, \"vim-mode-change\", {\n mode: \"normal\"\n });\n } // Remove any trailing newlines from the selection. For\n // example, with the caret at the start of the last word on the line,\n // 'dw' should word, but not the newline, while 'w' should advance the\n // caret to the first character of the next line.\n\n\n function clipToLine(cm, curStart, curEnd) {\n var selection = cm.getRange(curStart, curEnd); // Only clip if the selection ends with trailing newline + whitespace\n\n if (/\\n\\s*$/.test(selection)) {\n var lines = selection.split(\"\\n\"); // We know this is all whitespace.\n\n lines.pop(); // Cases:\n // 1. Last word is an empty line - do not clip the trailing '\\n'\n // 2. Last word is not an empty line - clip the trailing '\\n'\n\n var line; // Find the line containing the last word, and clip all whitespace up\n // to it.\n\n for (var line = lines.pop(); lines.length > 0 && line && isWhiteSpaceString(line); line = lines.pop()) {\n curEnd.line--;\n curEnd.ch = 0;\n } // If the last word is not an empty line, clip an additional newline\n\n\n if (line) {\n curEnd.line--;\n curEnd.ch = lineLength(cm, curEnd.line);\n } else {\n curEnd.ch = 0;\n }\n }\n } // Expand the selection to line ends.\n\n\n function expandSelectionToLine(_cm, curStart, curEnd) {\n curStart.ch = 0;\n curEnd.ch = 0;\n curEnd.line++;\n }\n\n function findFirstNonWhiteSpaceCharacter(text) {\n if (!text) {\n return 0;\n }\n\n var firstNonWS = text.search(/\\S/);\n return firstNonWS == -1 ? text.length : firstNonWS;\n }\n\n function expandWordUnderCursor(cm, inclusive, _forward, bigWord, noSymbol) {\n var cur = getHead(cm);\n var line = cm.getLine(cur.line);\n var idx = cur.ch; // Seek to first word or non-whitespace character, depending on if\n // noSymbol is true.\n\n var test = noSymbol ? wordCharTest[0] : bigWordCharTest[0];\n\n while (!test(line.charAt(idx))) {\n idx++;\n\n if (idx >= line.length) {\n return null;\n }\n }\n\n if (bigWord) {\n test = bigWordCharTest[0];\n } else {\n test = wordCharTest[0];\n\n if (!test(line.charAt(idx))) {\n test = wordCharTest[1];\n }\n }\n\n var end = idx,\n start = idx;\n\n while (test(line.charAt(end)) && end < line.length) {\n end++;\n }\n\n while (test(line.charAt(start)) && start >= 0) {\n start--;\n }\n\n start++;\n\n if (inclusive) {\n // If present, include all whitespace after word.\n // Otherwise, include all whitespace before word, except indentation.\n var wordEnd = end;\n\n while (/\\s/.test(line.charAt(end)) && end < line.length) {\n end++;\n }\n\n if (wordEnd == end) {\n var wordStart = start;\n\n while (/\\s/.test(line.charAt(start - 1)) && start > 0) {\n start--;\n }\n\n if (!start) {\n start = wordStart;\n }\n }\n }\n\n return {\n start: new Pos(cur.line, start),\n end: new Pos(cur.line, end)\n };\n }\n /**\n * Depends on the following:\n *\n * - editor mode should be htmlmixedmode / xml\n * - mode/xml/xml.js should be loaded\n * - addon/fold/xml-fold.js should be loaded\n *\n * If any of the above requirements are not true, this function noops.\n *\n * This is _NOT_ a 100% accurate implementation of vim tag text objects.\n * The following caveats apply (based off cursory testing, I'm sure there\n * are other discrepancies):\n *\n * - Does not work inside comments:\n * ```\n * \n * ```\n * - Does not work when tags have different cases:\n * ```\n *

    broken
    \n * ```\n * - Does not work when cursor is inside a broken tag:\n * ```\n *
    \n * ```\n */\n\n\n function expandTagUnderCursor(cm, head, inclusive) {\n var cur = head;\n\n if (!_cm_adapter[\"default\"].findMatchingTag || !_cm_adapter[\"default\"].findEnclosingTag) {\n return {\n start: cur,\n end: cur\n };\n }\n\n var tags = _cm_adapter[\"default\"].findMatchingTag(cm, head) || _cm_adapter[\"default\"].findEnclosingTag(cm, head);\n\n if (!tags || !tags.open || !tags.close) {\n return {\n start: cur,\n end: cur\n };\n }\n\n if (inclusive) {\n return {\n start: tags.open.from,\n end: tags.close.to\n };\n }\n\n return {\n start: tags.open.to,\n end: tags.close.from\n };\n }\n\n function recordJumpPosition(cm, oldCur, newCur) {\n if (!cursorEqual(oldCur, newCur)) {\n vimGlobalState.jumpList.add(cm, oldCur, newCur);\n }\n }\n\n function recordLastCharacterSearch(increment, args) {\n vimGlobalState.lastCharacterSearch.increment = increment;\n vimGlobalState.lastCharacterSearch.forward = args.forward;\n vimGlobalState.lastCharacterSearch.selectedCharacter = args.selectedCharacter;\n }\n\n var symbolToMode = {\n \"(\": \"bracket\",\n \")\": \"bracket\",\n \"{\": \"bracket\",\n \"}\": \"bracket\",\n \"[\": \"section\",\n \"]\": \"section\",\n \"*\": \"comment\",\n \"/\": \"comment\",\n m: \"method\",\n M: \"method\",\n \"#\": \"preprocess\"\n };\n var findSymbolModes = {\n bracket: {\n isComplete: function isComplete(state) {\n if (state.nextCh === state.symb) {\n state.depth++;\n if (state.depth >= 1) return true;\n } else if (state.nextCh === state.reverseSymb) {\n state.depth--;\n }\n\n return false;\n }\n },\n section: {\n init: function init(state) {\n state.curMoveThrough = true;\n state.symb = (state.forward ? \"]\" : \"[\") === state.symb ? \"{\" : \"}\";\n },\n isComplete: function isComplete(state) {\n return state.index === 0 && state.nextCh === state.symb;\n }\n },\n comment: {\n isComplete: function isComplete(state) {\n var found = state.lastCh === \"*\" && state.nextCh === \"/\";\n state.lastCh = state.nextCh;\n return found;\n }\n },\n // TODO: The original Vim implementation only operates on level 1 and 2.\n // The current implementation doesn't check for code block level and\n // therefore it operates on any levels.\n method: {\n init: function init(state) {\n state.symb = state.symb === \"m\" ? \"{\" : \"}\";\n state.reverseSymb = state.symb === \"{\" ? \"}\" : \"{\";\n },\n isComplete: function isComplete(state) {\n if (state.nextCh === state.symb) return true;\n return false;\n }\n },\n preprocess: {\n init: function init(state) {\n state.index = 0;\n },\n isComplete: function isComplete(state) {\n if (state.nextCh === \"#\") {\n var token = state.lineText.match(/^#(\\w+)/)[1];\n\n if (token === \"endif\") {\n if (state.forward && state.depth === 0) {\n return true;\n }\n\n state.depth++;\n } else if (token === \"if\") {\n if (!state.forward && state.depth === 0) {\n return true;\n }\n\n state.depth--;\n }\n\n if (token === \"else\" && state.depth === 0) return true;\n }\n\n return false;\n }\n }\n };\n\n function findSymbol(cm, repeat, forward, symb) {\n var cur = copyCursor(cm.getCursor());\n var increment = forward ? 1 : -1;\n var endLine = forward ? cm.lineCount() : -1;\n var curCh = cur.ch;\n var line = cur.line;\n var lineText = cm.getLine(line);\n var state = {\n lineText: lineText,\n nextCh: lineText.charAt(curCh),\n lastCh: null,\n index: curCh,\n symb: symb,\n reverseSymb: (forward ? {\n \")\": \"(\",\n \"}\": \"{\"\n } : {\n \"(\": \")\",\n \"{\": \"}\"\n })[symb],\n forward: forward,\n depth: 0,\n curMoveThrough: false\n };\n var mode = symbolToMode[symb];\n if (!mode) return cur;\n var init = findSymbolModes[mode].init;\n var isComplete = findSymbolModes[mode].isComplete;\n\n if (init) {\n init(state);\n }\n\n while (line !== endLine && repeat) {\n state.index += increment;\n state.nextCh = state.lineText.charAt(state.index);\n\n if (!state.nextCh) {\n line += increment;\n state.lineText = cm.getLine(line) || \"\";\n\n if (increment > 0) {\n state.index = 0;\n } else {\n var lineLen = state.lineText.length;\n state.index = lineLen > 0 ? lineLen - 1 : 0;\n }\n\n state.nextCh = state.lineText.charAt(state.index);\n }\n\n if (isComplete(state)) {\n cur.line = line;\n cur.ch = state.index;\n repeat--;\n }\n }\n\n if (state.nextCh || state.curMoveThrough) {\n return new Pos(line, state.index);\n }\n\n return cur;\n }\n /*\n * Returns the boundaries of the next word. If the cursor in the middle of\n * the word, then returns the boundaries of the current word, starting at\n * the cursor. If the cursor is at the start/end of a word, and we are going\n * forward/backward, respectively, find the boundaries of the next word.\n *\n * @param {CodeMirror} cm CodeMirror object.\n * @param {Cursor} cur The cursor position.\n * @param {boolean} forward True to search forward. False to search\n * backward.\n * @param {boolean} bigWord True if punctuation count as part of the word.\n * False if only [a-zA-Z0-9] characters count as part of the word.\n * @param {boolean} emptyLineIsWord True if empty lines should be treated\n * as words.\n * @return {Object{from:number, to:number, line: number}} The boundaries of\n * the word, or null if there are no more words.\n */\n\n\n function findWord(cm, cur, forward, bigWord, emptyLineIsWord) {\n var lineNum = cur.line;\n var pos = cur.ch;\n var line = cm.getLine(lineNum);\n var dir = forward ? 1 : -1;\n var charTests = bigWord ? bigWordCharTest : wordCharTest;\n\n if (emptyLineIsWord && line == \"\") {\n lineNum += dir;\n line = cm.getLine(lineNum);\n\n if (!isLine(cm, lineNum)) {\n return null;\n }\n\n pos = forward ? 0 : line.length;\n }\n\n while (true) {\n if (emptyLineIsWord && line == \"\") {\n return {\n from: 0,\n to: 0,\n line: lineNum\n };\n }\n\n var stop = dir > 0 ? line.length : -1;\n var wordStart = stop,\n wordEnd = stop; // Find bounds of next word.\n\n while (pos != stop) {\n var foundWord = false;\n\n for (var i = 0; i < charTests.length && !foundWord; ++i) {\n if (charTests[i](line.charAt(pos))) {\n wordStart = pos; // Advance to end of word.\n\n while (pos != stop && charTests[i](line.charAt(pos))) {\n pos += dir;\n }\n\n wordEnd = pos;\n foundWord = wordStart != wordEnd;\n\n if (wordStart == cur.ch && lineNum == cur.line && wordEnd == wordStart + dir) {\n // We started at the end of a word. Find the next one.\n continue;\n } else {\n return {\n from: Math.min(wordStart, wordEnd + 1),\n to: Math.max(wordStart, wordEnd),\n line: lineNum\n };\n }\n }\n }\n\n if (!foundWord) {\n pos += dir;\n }\n } // Advance to next/prev line.\n\n\n lineNum += dir;\n\n if (!isLine(cm, lineNum)) {\n return null;\n }\n\n line = cm.getLine(lineNum);\n pos = dir > 0 ? 0 : line.length;\n }\n }\n /**\n * @param {CodeMirror} cm CodeMirror object.\n * @param {Pos} cur The position to start from.\n * @param {int} repeat Number of words to move past.\n * @param {boolean} forward True to search forward. False to search\n * backward.\n * @param {boolean} wordEnd True to move to end of word. False to move to\n * beginning of word.\n * @param {boolean} bigWord True if punctuation count as part of the word.\n * False if only alphabet characters count as part of the word.\n * @return {Cursor} The position the cursor should move to.\n */\n\n\n function moveToWord(cm, cur, repeat, forward, wordEnd, bigWord) {\n var curStart = copyCursor(cur);\n var words = [];\n\n if (forward && !wordEnd || !forward && wordEnd) {\n repeat++;\n } // For 'e', empty lines are not considered words, go figure.\n\n\n var emptyLineIsWord = !(forward && wordEnd);\n\n for (var i = 0; i < repeat; i++) {\n var word = findWord(cm, cur, forward, bigWord, emptyLineIsWord);\n\n if (!word) {\n var eodCh = lineLength(cm, cm.lastLine());\n words.push(forward ? {\n line: cm.lastLine(),\n from: eodCh,\n to: eodCh\n } : {\n line: 0,\n from: 0,\n to: 0\n });\n break;\n }\n\n words.push(word);\n cur = new Pos(word.line, forward ? word.to - 1 : word.from);\n }\n\n var shortCircuit = words.length != repeat;\n var firstWord = words[0];\n var lastWord = words.pop();\n\n if (forward && !wordEnd) {\n // w\n if (!shortCircuit && (firstWord.from != curStart.ch || firstWord.line != curStart.line)) {\n // We did not start in the middle of a word. Discard the extra word at the end.\n lastWord = words.pop();\n }\n\n return new Pos(lastWord.line, lastWord.from);\n } else if (forward && wordEnd) {\n return new Pos(lastWord.line, lastWord.to - 1);\n } else if (!forward && wordEnd) {\n // ge\n if (!shortCircuit && (firstWord.to != curStart.ch || firstWord.line != curStart.line)) {\n // We did not start in the middle of a word. Discard the extra word at the end.\n lastWord = words.pop();\n }\n\n return new Pos(lastWord.line, lastWord.to);\n } else {\n // b\n return new Pos(lastWord.line, lastWord.from);\n }\n }\n\n function _moveToEol(cm, head, motionArgs, vim, keepHPos) {\n var cur = head;\n var retval = new Pos(cur.line + motionArgs.repeat - 1, Infinity);\n var end = cm.clipPos(retval);\n end.ch--;\n\n if (!keepHPos) {\n vim.lastHPos = Infinity;\n vim.lastHSPos = cm.charCoords(end, \"div\").left;\n }\n\n return retval;\n }\n\n function _moveToCharacter(cm, repeat, forward, character) {\n var cur = cm.getCursor();\n var start = cur.ch;\n var idx;\n\n for (var i = 0; i < repeat; i++) {\n var line = cm.getLine(cur.line);\n idx = charIdxInLine(start, line, character, forward, true);\n\n if (idx == -1) {\n return null;\n }\n\n start = idx;\n }\n\n return new Pos(cm.getCursor().line, idx);\n }\n\n function _moveToColumn(cm, repeat) {\n // repeat is always >= 1, so repeat - 1 always corresponds\n // to the column we want to go to.\n var line = cm.getCursor().line;\n return clipCursorToContent(cm, new Pos(line, repeat - 1));\n }\n\n function updateMark(cm, vim, markName, pos) {\n if (!inArray(markName, validMarks)) {\n return;\n }\n\n if (vim.marks[markName]) {\n vim.marks[markName].clear();\n }\n\n vim.marks[markName] = cm.setBookmark(pos);\n }\n\n function charIdxInLine(start, line, character, forward, includeChar) {\n // Search for char in line.\n // motion_options: {forward, includeChar}\n // If includeChar = true, include it too.\n // If forward = true, search forward, else search backwards.\n // If char is not found on this line, do nothing\n var idx;\n\n if (forward) {\n idx = line.indexOf(character, start + 1);\n\n if (idx != -1 && !includeChar) {\n idx -= 1;\n }\n } else {\n idx = line.lastIndexOf(character, start - 1);\n\n if (idx != -1 && !includeChar) {\n idx += 1;\n }\n }\n\n return idx;\n }\n\n function findParagraph(cm, head, repeat, dir, inclusive) {\n var line = head.line;\n var min = cm.firstLine();\n var max = cm.lastLine();\n var start,\n end,\n i = line;\n\n function isEmpty(i) {\n return !cm.getLine(i);\n }\n\n function isBoundary(i, dir, any) {\n if (any) {\n return isEmpty(i) != isEmpty(i + dir);\n }\n\n return !isEmpty(i) && isEmpty(i + dir);\n }\n\n if (dir) {\n while (min <= i && i <= max && repeat > 0) {\n if (isBoundary(i, dir)) {\n repeat--;\n }\n\n i += dir;\n }\n\n return new Pos(i, 0);\n }\n\n var vim = cm.state.vim;\n\n if (vim.visualLine && isBoundary(line, 1, true)) {\n var anchor = vim.sel.anchor;\n\n if (isBoundary(anchor.line, -1, true)) {\n if (!inclusive || anchor.line != line) {\n line += 1;\n }\n }\n }\n\n var startState = isEmpty(line);\n\n for (i = line; i <= max && repeat; i++) {\n if (isBoundary(i, 1, true)) {\n if (!inclusive || isEmpty(i) != startState) {\n repeat--;\n }\n }\n }\n\n end = new Pos(i, 0); // select boundary before paragraph for the last one\n\n if (i > max && !startState) {\n startState = true;\n } else {\n inclusive = false;\n }\n\n for (i = line; i > min; i--) {\n if (!inclusive || isEmpty(i) == startState || i == line) {\n if (isBoundary(i, -1, true)) {\n break;\n }\n }\n }\n\n start = new Pos(i, 0);\n return {\n start: start,\n end: end\n };\n }\n\n function findSentence(cm, cur, repeat, dir) {\n /*\n Takes an index object\n {\n line: the line string,\n ln: line number,\n pos: index in line,\n dir: direction of traversal (-1 or 1)\n }\n and modifies the line, ln, and pos members to represent the\n next valid position or sets them to null if there are\n no more valid positions.\n */\n function nextChar(cm, idx) {\n if (idx.pos + idx.dir < 0 || idx.pos + idx.dir >= idx.line.length) {\n idx.ln += idx.dir;\n\n if (!isLine(cm, idx.ln)) {\n idx.line = null;\n idx.ln = null;\n idx.pos = null;\n return;\n }\n\n idx.line = cm.getLine(idx.ln);\n idx.pos = idx.dir > 0 ? 0 : idx.line.length - 1;\n } else {\n idx.pos += idx.dir;\n }\n }\n /*\n Performs one iteration of traversal in forward direction\n Returns an index object of the new location\n */\n\n\n function forward(cm, ln, pos, dir) {\n var line = cm.getLine(ln);\n var stop = line === \"\";\n var curr = {\n line: line,\n ln: ln,\n pos: pos,\n dir: dir\n };\n var last_valid = {\n ln: curr.ln,\n pos: curr.pos\n };\n var skip_empty_lines = curr.line === \"\"; // Move one step to skip character we start on\n\n nextChar(cm, curr);\n\n while (curr.line !== null) {\n last_valid.ln = curr.ln;\n last_valid.pos = curr.pos;\n\n if (curr.line === \"\" && !skip_empty_lines) {\n return {\n ln: curr.ln,\n pos: curr.pos\n };\n } else if (stop && curr.line !== \"\" && !isWhiteSpaceString(curr.line[curr.pos])) {\n return {\n ln: curr.ln,\n pos: curr.pos\n };\n } else if (isEndOfSentenceSymbol(curr.line[curr.pos]) && !stop && (curr.pos === curr.line.length - 1 || isWhiteSpaceString(curr.line[curr.pos + 1]))) {\n stop = true;\n }\n\n nextChar(cm, curr);\n }\n /*\n Set the position to the last non whitespace character on the last\n valid line in the case that we reach the end of the document.\n */\n\n\n var line = cm.getLine(last_valid.ln);\n last_valid.pos = 0;\n\n for (var i = line.length - 1; i >= 0; --i) {\n if (!isWhiteSpaceString(line[i])) {\n last_valid.pos = i;\n break;\n }\n }\n\n return last_valid;\n }\n /*\n Performs one iteration of traversal in reverse direction\n Returns an index object of the new location\n */\n\n\n function reverse(cm, ln, pos, dir) {\n var line = cm.getLine(ln);\n var curr = {\n line: line,\n ln: ln,\n pos: pos,\n dir: dir\n };\n var last_valid = {\n ln: curr.ln,\n pos: null\n };\n var skip_empty_lines = curr.line === \"\"; // Move one step to skip character we start on\n\n nextChar(cm, curr);\n\n while (curr.line !== null) {\n if (curr.line === \"\" && !skip_empty_lines) {\n if (last_valid.pos !== null) {\n return last_valid;\n } else {\n return {\n ln: curr.ln,\n pos: curr.pos\n };\n }\n } else if (isEndOfSentenceSymbol(curr.line[curr.pos]) && last_valid.pos !== null && !(curr.ln === last_valid.ln && curr.pos + 1 === last_valid.pos)) {\n return last_valid;\n } else if (curr.line !== \"\" && !isWhiteSpaceString(curr.line[curr.pos])) {\n skip_empty_lines = false;\n last_valid = {\n ln: curr.ln,\n pos: curr.pos\n };\n }\n\n nextChar(cm, curr);\n }\n /*\n Set the position to the first non whitespace character on the last\n valid line in the case that we reach the beginning of the document.\n */\n\n\n var line = cm.getLine(last_valid.ln);\n last_valid.pos = 0;\n\n for (var i = 0; i < line.length; ++i) {\n if (!isWhiteSpaceString(line[i])) {\n last_valid.pos = i;\n break;\n }\n }\n\n return last_valid;\n }\n\n var curr_index = {\n ln: cur.line,\n pos: cur.ch\n };\n\n while (repeat > 0) {\n if (dir < 0) {\n curr_index = reverse(cm, curr_index.ln, curr_index.pos, dir);\n } else {\n curr_index = forward(cm, curr_index.ln, curr_index.pos, dir);\n }\n\n repeat--;\n }\n\n return new Pos(curr_index.ln, curr_index.pos);\n } // TODO: perhaps this finagling of start and end positions belongs\n // in codemirror/replaceRange?\n\n\n function selectCompanionObject(cm, head, symb, inclusive) {\n var cur = head,\n start,\n end;\n var bracketRegexp = {\n \"(\": /[()]/,\n \")\": /[()]/,\n \"[\": /[[\\]]/,\n \"]\": /[[\\]]/,\n \"{\": /[{}]/,\n \"}\": /[{}]/,\n \"<\": /[<>]/,\n \">\": /[<>]/\n }[symb];\n var openSym = {\n \"(\": \"(\",\n \")\": \"(\",\n \"[\": \"[\",\n \"]\": \"[\",\n \"{\": \"{\",\n \"}\": \"{\",\n \"<\": \"<\",\n \">\": \"<\"\n }[symb];\n var curChar = cm.getLine(cur.line).charAt(cur.ch); // Due to the behavior of scanForBracket, we need to add an offset if the\n // cursor is on a matching open bracket.\n\n var offset = curChar === openSym ? 1 : 0;\n start = cm.scanForBracket(new Pos(cur.line, cur.ch + offset), -1, undefined, {\n bracketRegex: bracketRegexp\n });\n end = cm.scanForBracket(new Pos(cur.line, cur.ch + offset), 1, undefined, {\n bracketRegex: bracketRegexp\n });\n\n if (!start || !end) {\n return {\n start: cur,\n end: cur\n };\n }\n\n start = start.pos;\n end = end.pos;\n\n if (start.line == end.line && start.ch > end.ch || start.line > end.line) {\n var tmp = start;\n start = end;\n end = tmp;\n }\n\n if (inclusive) {\n end.ch += 1;\n } else {\n start.ch += 1;\n }\n\n return {\n start: start,\n end: end\n };\n } // Takes in a symbol and a cursor and tries to simulate text objects that\n // have identical opening and closing symbols\n // TODO support across multiple lines\n\n\n function findBeginningAndEnd(cm, head, symb, inclusive) {\n var cur = copyCursor(head);\n var line = cm.getLine(cur.line);\n var chars = line.split(\"\");\n var start, end, i, len;\n var firstIndex = chars.indexOf(symb); // the decision tree is to always look backwards for the beginning first,\n // but if the cursor is in front of the first instance of the symb,\n // then move the cursor forward\n\n if (cur.ch < firstIndex) {\n cur.ch = firstIndex; // Why is this line even here???\n // cm.setCursor(cur.line, firstIndex+1);\n } // otherwise if the cursor is currently on the closing symbol\n else if (firstIndex < cur.ch && chars[cur.ch] == symb) {\n end = cur.ch; // assign end to the current cursor\n\n --cur.ch; // make sure to look backwards\n } // if we're currently on the symbol, we've got a start\n\n\n if (chars[cur.ch] == symb && !end) {\n start = cur.ch + 1; // assign start to ahead of the cursor\n } else {\n // go backwards to find the start\n for (i = cur.ch; i > -1 && !start; i--) {\n if (chars[i] == symb) {\n start = i + 1;\n }\n }\n } // look forwards for the end symbol\n\n\n if (start && !end) {\n for (i = start, len = chars.length; i < len && !end; i++) {\n if (chars[i] == symb) {\n end = i;\n }\n }\n } // nothing found\n\n\n if (!start || !end) {\n return {\n start: cur,\n end: cur\n };\n } // include the symbols\n\n\n if (inclusive) {\n --start;\n ++end;\n }\n\n return {\n start: new Pos(cur.line, start),\n end: new Pos(cur.line, end)\n };\n } // Search functions\n\n\n defineOption(\"pcre\", true, \"boolean\");\n\n function SearchState() {}\n\n SearchState.prototype = {\n getQuery: function getQuery() {\n return vimGlobalState.query;\n },\n setQuery: function setQuery(query) {\n vimGlobalState.query = query;\n },\n getOverlay: function getOverlay() {\n return this.searchOverlay;\n },\n setOverlay: function setOverlay(overlay) {\n this.searchOverlay = overlay;\n },\n isReversed: function isReversed() {\n return vimGlobalState.isReversed;\n },\n setReversed: function setReversed(reversed) {\n vimGlobalState.isReversed = reversed;\n },\n getScrollbarAnnotate: function getScrollbarAnnotate() {\n return this.annotate;\n },\n setScrollbarAnnotate: function setScrollbarAnnotate(annotate) {\n this.annotate = annotate;\n }\n };\n\n function getSearchState(cm) {\n var vim = cm.state.vim;\n return vim.searchState_ || (vim.searchState_ = new SearchState());\n }\n\n function splitBySlash(argString) {\n return splitBySeparator(argString, \"/\");\n }\n\n function findUnescapedSlashes(argString) {\n return findUnescapedSeparators(argString, \"/\");\n }\n\n function splitBySeparator(argString, separator) {\n var slashes = findUnescapedSeparators(argString, separator) || [];\n if (!slashes.length) return [];\n var tokens = []; // in case of strings like foo/bar\n\n if (slashes[0] !== 0) return;\n\n for (var i = 0; i < slashes.length; i++) {\n if (typeof slashes[i] == \"number\") tokens.push(argString.substring(slashes[i] + 1, slashes[i + 1]));\n }\n\n return tokens;\n }\n\n function findUnescapedSeparators(str, separator) {\n if (!separator) separator = \"/\";\n var escapeNextChar = false;\n var slashes = [];\n\n for (var i = 0; i < str.length; i++) {\n var c = str.charAt(i);\n\n if (!escapeNextChar && c == separator) {\n slashes.push(i);\n }\n\n escapeNextChar = !escapeNextChar && c == \"\\\\\";\n }\n\n return slashes;\n } // Translates a search string from ex (vim) syntax into javascript form.\n\n\n function translateRegex(str) {\n // When these match, add a '\\' if unescaped or remove one if escaped.\n var specials = \"|(){\"; // Remove, but never add, a '\\' for these.\n\n var unescape = \"}\";\n var escapeNextChar = false;\n var out = [];\n\n for (var i = -1; i < str.length; i++) {\n var c = str.charAt(i) || \"\";\n var n = str.charAt(i + 1) || \"\";\n var specialComesNext = n && specials.indexOf(n) != -1;\n\n if (escapeNextChar) {\n if (c !== \"\\\\\" || !specialComesNext) {\n out.push(c);\n }\n\n escapeNextChar = false;\n } else {\n if (c === \"\\\\\") {\n escapeNextChar = true; // Treat the unescape list as special for removing, but not adding '\\'.\n\n if (n && unescape.indexOf(n) != -1) {\n specialComesNext = true;\n } // Not passing this test means removing a '\\'.\n\n\n if (!specialComesNext || n === \"\\\\\") {\n out.push(c);\n }\n } else {\n out.push(c);\n\n if (specialComesNext && n !== \"\\\\\") {\n out.push(\"\\\\\");\n }\n }\n }\n }\n\n return out.join(\"\");\n } // Translates the replace part of a search and replace from ex (vim) syntax into\n // javascript form. Similar to translateRegex, but additionally fixes back references\n // (translates '\\[0..9]' to '$[0..9]') and follows different rules for escaping '$'.\n\n\n var charUnescapes = {\n \"\\\\n\": \"\\n\",\n \"\\\\r\": \"\\r\",\n \"\\\\t\": \"\\t\"\n };\n\n function translateRegexReplace(str) {\n var escapeNextChar = false;\n var out = [];\n\n for (var i = -1; i < str.length; i++) {\n var c = str.charAt(i) || \"\";\n var n = str.charAt(i + 1) || \"\";\n\n if (charUnescapes[c + n]) {\n out.push(charUnescapes[c + n]);\n i++;\n } else if (escapeNextChar) {\n // At any point in the loop, escapeNextChar is true if the previous\n // character was a '\\' and was not escaped.\n out.push(c);\n escapeNextChar = false;\n } else {\n if (c === \"\\\\\") {\n escapeNextChar = true;\n\n if (isNumber(n) || n === \"$\") {\n out.push(\"$\");\n } else if (n !== \"/\" && n !== \"\\\\\") {\n out.push(\"\\\\\");\n }\n } else {\n if (c === \"$\") {\n out.push(\"$\");\n }\n\n out.push(c);\n\n if (n === \"/\") {\n out.push(\"\\\\\");\n }\n }\n }\n }\n\n return out.join(\"\");\n } // Unescape \\ and / in the replace part, for PCRE mode.\n\n\n var unescapes = {\n \"\\\\/\": \"/\",\n \"\\\\\\\\\": \"\\\\\",\n \"\\\\n\": \"\\n\",\n \"\\\\r\": \"\\r\",\n \"\\\\t\": \"\\t\",\n \"\\\\&\": \"&\"\n };\n\n function unescapeRegexReplace(str) {\n var stream = new _cm_adapter[\"default\"].StringStream(str);\n var output = [];\n\n while (!stream.eol()) {\n // Search for \\.\n while (stream.peek() && stream.peek() != \"\\\\\") {\n output.push(stream.next());\n }\n\n var matched = false;\n\n for (var matcher in unescapes) {\n if (stream.match(matcher, true)) {\n matched = true;\n output.push(unescapes[matcher]);\n break;\n }\n }\n\n if (!matched) {\n // Don't change anything\n output.push(stream.next());\n }\n }\n\n return output.join(\"\");\n }\n /**\n * Extract the regular expression from the query and return a Regexp object.\n * Returns null if the query is blank.\n * If ignoreCase is passed in, the Regexp object will have the 'i' flag set.\n * If smartCase is passed in, and the query contains upper case letters,\n * then ignoreCase is overridden, and the 'i' flag will not be set.\n * If the query contains the /i in the flag part of the regular expression,\n * then both ignoreCase and smartCase are ignored, and 'i' will be passed\n * through to the Regex object.\n */\n\n\n function parseQuery(query, ignoreCase, smartCase) {\n // First update the last search register\n var lastSearchRegister = vimGlobalState.registerController.getRegister(\"/\");\n lastSearchRegister.setText(query); // Check if the query is already a regex.\n\n if (query instanceof RegExp) {\n return query;\n } // First try to extract regex + flags from the input. If no flags found,\n // extract just the regex. IE does not accept flags directly defined in\n // the regex string in the form /regex/flags\n\n\n var slashes = findUnescapedSlashes(query);\n var regexPart;\n var forceIgnoreCase;\n\n if (!slashes.length) {\n // Query looks like 'regexp'\n regexPart = query;\n } else {\n // Query looks like 'regexp/...'\n regexPart = query.substring(0, slashes[0]);\n var flagsPart = query.substring(slashes[0]);\n forceIgnoreCase = flagsPart.indexOf(\"i\") != -1;\n }\n\n if (!regexPart) {\n return null;\n }\n\n if (!getOption(\"pcre\")) {\n regexPart = translateRegex(regexPart);\n }\n\n if (smartCase) {\n ignoreCase = /^[^A-Z]*$/.test(regexPart);\n }\n\n var regexp = new RegExp(regexPart, ignoreCase || forceIgnoreCase ? \"im\" : \"m\");\n return regexp;\n }\n /**\n * dom - Document Object Manipulator\n * Usage:\n * dom(''|[, ...{|<$styles>}||''])\n * Examples:\n * dom('div', {id:'xyz'}, dom('p', 'CM rocks!', {$color:'red'}))\n * dom(document.head, dom('script', 'alert(\"hello!\")'))\n * Not supported:\n * dom('p', ['arrays are objects'], Error('objects specify attributes'))\n */\n\n\n function dom(n) {\n if (typeof n === \"string\") n = document.createElement(n);\n\n for (var a, i = 1; i < arguments.length; i++) {\n if (!(a = arguments[i])) continue;\n if (_typeof(a) !== \"object\") a = document.createTextNode(a);\n if (a.nodeType) n.appendChild(a);else for (var key in a) {\n if (!Object.prototype.hasOwnProperty.call(a, key)) continue;\n if (key[0] === \"$\") n.style[key.slice(1)] = a[key];else n.setAttribute(key, a[key]);\n }\n }\n\n return n;\n }\n\n function showConfirm(cm, template) {\n var pre = dom(\"pre\", {\n $color: \"red\",\n \"class\": \"cm-vim-message\"\n }, template);\n\n if (cm.openNotification) {\n cm.openNotification(pre, {\n bottom: true,\n duration: 5000\n });\n } else {\n alert(pre.innerText);\n }\n }\n\n function makePrompt(prefix, desc) {\n return dom(document.createDocumentFragment(), dom(\"span\", {\n $fontFamily: \"monospace\",\n $whiteSpace: \"pre\"\n }, prefix, dom(\"input\", {\n type: \"text\",\n autocorrect: \"off\",\n autocapitalize: \"off\",\n spellcheck: \"false\"\n })), desc && dom(\"span\", {\n $color: \"#888\"\n }, desc));\n }\n\n function showPrompt(cm, options) {\n var template = makePrompt(options.prefix, options.desc);\n\n if (cm.openDialog) {\n cm.openDialog(template, options.onClose, {\n onKeyDown: options.onKeyDown,\n onKeyUp: options.onKeyUp,\n bottom: true,\n selectValueOnOpen: false,\n value: options.value\n });\n } else {\n var shortText = \"\";\n if (typeof options.prefix != \"string\" && options.prefix) shortText += options.prefix.textContent;\n if (options.desc) shortText += \" \" + options.desc;\n options.onClose(prompt(shortText, \"\"));\n }\n }\n\n function regexEqual(r1, r2) {\n if (r1 instanceof RegExp && r2 instanceof RegExp) {\n var props = [\"global\", \"multiline\", \"ignoreCase\", \"source\"];\n\n for (var i = 0; i < props.length; i++) {\n var prop = props[i];\n\n if (r1[prop] !== r2[prop]) {\n return false;\n }\n }\n\n return true;\n }\n\n return false;\n } // Returns true if the query is valid.\n\n\n function updateSearchQuery(cm, rawQuery, ignoreCase, smartCase) {\n if (!rawQuery) {\n return;\n }\n\n var state = getSearchState(cm);\n var query = parseQuery(rawQuery, !!ignoreCase, !!smartCase);\n\n if (!query) {\n return;\n }\n\n highlightSearchMatches(cm, query);\n\n if (regexEqual(query, state.getQuery())) {\n return query;\n }\n\n state.setQuery(query);\n return query;\n }\n\n function searchOverlay(query) {\n if (query.source.charAt(0) == \"^\") {\n var matchSol = true;\n }\n\n return {\n token: function token(stream) {\n if (matchSol && !stream.sol()) {\n stream.skipToEnd();\n return;\n }\n\n var match = stream.match(query, false);\n\n if (match) {\n if (match[0].length == 0) {\n // Matched empty string, skip to next.\n stream.next();\n return \"searching\";\n }\n\n if (!stream.sol()) {\n // Backtrack 1 to match \\b\n stream.backUp(1);\n\n if (!query.exec(stream.next() + match[0])) {\n stream.next();\n return null;\n }\n }\n\n stream.match(query);\n return \"searching\";\n }\n\n while (!stream.eol()) {\n stream.next();\n if (stream.match(query, false)) break;\n }\n },\n query: query\n };\n }\n\n var highlightTimeout = 0;\n\n function highlightSearchMatches(cm, query) {\n clearTimeout(highlightTimeout);\n highlightTimeout = setTimeout(function () {\n if (!cm.state.vim) return;\n var searchState = getSearchState(cm);\n var overlay = searchState.getOverlay();\n\n if (!overlay || query != overlay.query) {\n if (overlay) {\n cm.removeOverlay(overlay);\n }\n\n overlay = searchOverlay(query);\n cm.addOverlay(overlay);\n\n if (cm.showMatchesOnScrollbar) {\n if (searchState.getScrollbarAnnotate()) {\n searchState.getScrollbarAnnotate().clear();\n }\n\n searchState.setScrollbarAnnotate(cm.showMatchesOnScrollbar(query));\n }\n\n searchState.setOverlay(overlay);\n }\n }, 50);\n }\n\n function _findNext(cm, prev, query, repeat) {\n if (repeat === undefined) {\n repeat = 1;\n }\n\n return cm.operation(function () {\n var pos = cm.getCursor();\n var cursor = cm.getSearchCursor(query, pos);\n\n for (var i = 0; i < repeat; i++) {\n var found = cursor.find(prev);\n\n if (i == 0 && found && cursorEqual(cursor.from(), pos)) {\n var lastEndPos = prev ? cursor.from() : cursor.to();\n found = cursor.find(prev);\n\n if (found && !found[0] && cursorEqual(cursor.from(), lastEndPos)) {\n if (cm.getLine(lastEndPos.line).length == lastEndPos.ch) found = cursor.find(prev);\n }\n }\n\n if (!found) {\n // SearchCursor may have returned null because it hit EOF, wrap\n // around and try again.\n cursor = cm.getSearchCursor(query, prev ? new Pos(cm.lastLine()) : new Pos(cm.firstLine(), 0));\n\n if (!cursor.find(prev)) {\n return;\n }\n }\n }\n\n return cursor.from();\n });\n }\n /**\n * Pretty much the same as `findNext`, except for the following differences:\n *\n * 1. Before starting the search, move to the previous search. This way if our cursor is\n * already inside a match, we should return the current match.\n * 2. Rather than only returning the cursor's from, we return the cursor's from and to as a tuple.\n */\n\n\n function findNextFromAndToInclusive(cm, prev, query, repeat, vim) {\n if (repeat === undefined) {\n repeat = 1;\n }\n\n return cm.operation(function () {\n var pos = cm.getCursor();\n var cursor = cm.getSearchCursor(query, pos); // Go back one result to ensure that if the cursor is currently a match, we keep it.\n\n var found = cursor.find(!prev); // If we haven't moved, go back one more (similar to if i==0 logic in findNext).\n\n if (!vim.visualMode && found && cursorEqual(cursor.from(), pos)) {\n cursor.find(!prev);\n }\n\n for (var i = 0; i < repeat; i++) {\n found = cursor.find(prev);\n\n if (!found) {\n // SearchCursor may have returned null because it hit EOF, wrap\n // around and try again.\n cursor = cm.getSearchCursor(query, prev ? new Pos(cm.lastLine()) : new Pos(cm.firstLine(), 0));\n\n if (!cursor.find(prev)) {\n return;\n }\n }\n }\n\n return [cursor.from(), cursor.to()];\n });\n }\n\n function clearSearchHighlight(cm) {\n var state = getSearchState(cm);\n cm.removeOverlay(getSearchState(cm).getOverlay());\n state.setOverlay(null);\n\n if (state.getScrollbarAnnotate()) {\n state.getScrollbarAnnotate().clear();\n state.setScrollbarAnnotate(null);\n }\n }\n /**\n * Check if pos is in the specified range, INCLUSIVE.\n * Range can be specified with 1 or 2 arguments.\n * If the first range argument is an array, treat it as an array of line\n * numbers. Match pos against any of the lines.\n * If the first range argument is a number,\n * if there is only 1 range argument, check if pos has the same line\n * number\n * if there are 2 range arguments, then check if pos is in between the two\n * range arguments.\n */\n\n\n function isInRange(pos, start, end) {\n if (typeof pos != \"number\") {\n // Assume it is a cursor position. Get the line number.\n pos = pos.line;\n }\n\n if (start instanceof Array) {\n return inArray(pos, start);\n } else {\n if (typeof end == \"number\") {\n return pos >= start && pos <= end;\n } else {\n return pos == start;\n }\n }\n }\n\n function getUserVisibleLines(cm) {\n var scrollInfo = cm.getScrollInfo();\n var occludeToleranceTop = 6;\n var occludeToleranceBottom = 10;\n var from = cm.coordsChar({\n left: 0,\n top: occludeToleranceTop + scrollInfo.top\n }, \"local\");\n var bottomY = scrollInfo.clientHeight - occludeToleranceBottom + scrollInfo.top;\n var to = cm.coordsChar({\n left: 0,\n top: bottomY\n }, \"local\");\n return {\n top: from.line,\n bottom: to.line\n };\n }\n\n function getMarkPos(cm, vim, markName) {\n if (markName == \"'\" || markName == \"`\") {\n return vimGlobalState.jumpList.find(cm, -1) || new Pos(0, 0);\n } else if (markName == \".\") {\n return getLastEditPos(cm);\n }\n\n var mark = vim.marks[markName];\n return mark && mark.find();\n }\n\n function getLastEditPos(cm) {\n var done = cm.doc.history.done;\n\n for (var i = done.length; i--;) {\n if (done[i].changes) {\n return copyCursor(done[i].changes[0].to);\n }\n }\n }\n\n var ExCommandDispatcher = function ExCommandDispatcher() {\n this.buildCommandMap_();\n };\n\n ExCommandDispatcher.prototype = {\n processCommand: function processCommand(cm, input, opt_params) {\n var that = this;\n cm.operation(function () {\n cm.curOp.isVimOp = true;\n\n that._processCommand(cm, input, opt_params);\n });\n },\n _processCommand: function _processCommand(cm, input, opt_params) {\n var vim = cm.state.vim;\n var commandHistoryRegister = vimGlobalState.registerController.getRegister(\":\");\n var previousCommand = commandHistoryRegister.toString();\n\n if (vim.visualMode) {\n exitVisualMode(cm);\n }\n\n var inputStream = new _cm_adapter[\"default\"].StringStream(input); // update \": with the latest command whether valid or invalid\n\n commandHistoryRegister.setText(input);\n var params = opt_params || {};\n params.input = input;\n\n try {\n this.parseInput_(cm, inputStream, params);\n } catch (e) {\n showConfirm(cm, e.toString());\n throw e;\n }\n\n var command;\n var commandName;\n\n if (!params.commandName) {\n // If only a line range is defined, move to the line.\n if (params.line !== undefined) {\n commandName = \"move\";\n }\n } else {\n command = this.matchCommand_(params.commandName);\n\n if (command) {\n commandName = command.name;\n\n if (command.excludeFromCommandHistory) {\n commandHistoryRegister.setText(previousCommand);\n }\n\n this.parseCommandArgs_(inputStream, params, command);\n\n if (command.type == \"exToKey\") {\n // Handle Ex to Key mapping.\n for (var i = 0; i < command.toKeys.length; i++) {\n vimApi.handleKey(cm, command.toKeys[i], \"mapping\");\n }\n\n return;\n } else if (command.type == \"exToEx\") {\n // Handle Ex to Ex mapping.\n this.processCommand(cm, command.toInput);\n return;\n }\n }\n }\n\n if (!commandName) {\n showConfirm(cm, 'Not an editor command \":' + input + '\"');\n return;\n }\n\n try {\n exCommands[commandName](cm, params); // Possibly asynchronous commands (e.g. substitute, which might have a\n // user confirmation), are responsible for calling the callback when\n // done. All others have it taken care of for them here.\n\n if ((!command || !command.possiblyAsync) && params.callback) {\n params.callback();\n }\n } catch (e) {\n showConfirm(cm, e.toString());\n throw e;\n }\n },\n parseInput_: function parseInput_(cm, inputStream, result) {\n inputStream.eatWhile(\":\"); // Parse range.\n\n if (inputStream.eat(\"%\")) {\n result.line = cm.firstLine();\n result.lineEnd = cm.lastLine();\n } else {\n result.line = this.parseLineSpec_(cm, inputStream);\n\n if (result.line !== undefined && inputStream.eat(\",\")) {\n result.lineEnd = this.parseLineSpec_(cm, inputStream);\n }\n } // Parse command name.\n\n\n var commandMatch = inputStream.match(/^(\\w+|!!|@@|[!#&*<=>@~])/);\n\n if (commandMatch) {\n result.commandName = commandMatch[1];\n } else {\n result.commandName = inputStream.match(/.*/)[0];\n }\n\n return result;\n },\n parseLineSpec_: function parseLineSpec_(cm, inputStream) {\n var numberMatch = inputStream.match(/^(\\d+)/);\n\n if (numberMatch) {\n // Absolute line number plus offset (N+M or N-M) is probably a typo,\n // not something the user actually wanted. (NB: vim does allow this.)\n return parseInt(numberMatch[1], 10) - 1;\n }\n\n switch (inputStream.next()) {\n case \".\":\n return this.parseLineSpecOffset_(inputStream, cm.getCursor().line);\n\n case \"$\":\n return this.parseLineSpecOffset_(inputStream, cm.lastLine());\n\n case \"'\":\n var markName = inputStream.next();\n var markPos = getMarkPos(cm, cm.state.vim, markName);\n if (!markPos) throw new Error(\"Mark not set\");\n return this.parseLineSpecOffset_(inputStream, markPos.line);\n\n case \"-\":\n case \"+\":\n inputStream.backUp(1); // Offset is relative to current line if not otherwise specified.\n\n return this.parseLineSpecOffset_(inputStream, cm.getCursor().line);\n\n default:\n inputStream.backUp(1);\n return undefined;\n }\n },\n parseLineSpecOffset_: function parseLineSpecOffset_(inputStream, line) {\n var offsetMatch = inputStream.match(/^([+-])?(\\d+)/);\n\n if (offsetMatch) {\n var offset = parseInt(offsetMatch[2], 10);\n\n if (offsetMatch[1] == \"-\") {\n line -= offset;\n } else {\n line += offset;\n }\n }\n\n return line;\n },\n parseCommandArgs_: function parseCommandArgs_(inputStream, params, command) {\n if (inputStream.eol()) {\n return;\n }\n\n params.argString = inputStream.match(/.*/)[0]; // Parse command-line arguments\n\n var delim = command.argDelimiter || /\\s+/;\n var args = trim(params.argString).split(delim);\n\n if (args.length && args[0]) {\n params.args = args;\n }\n },\n matchCommand_: function matchCommand_(commandName) {\n // Return the command in the command map that matches the shortest\n // prefix of the passed in command name. The match is guaranteed to be\n // unambiguous if the defaultExCommandMap's shortNames are set up\n // correctly. (see @code{defaultExCommandMap}).\n for (var i = commandName.length; i > 0; i--) {\n var prefix = commandName.substring(0, i);\n\n if (this.commandMap_[prefix]) {\n var command = this.commandMap_[prefix];\n\n if (command.name.indexOf(commandName) === 0) {\n return command;\n }\n }\n }\n\n return null;\n },\n buildCommandMap_: function buildCommandMap_() {\n this.commandMap_ = {};\n\n for (var i = 0; i < defaultExCommandMap.length; i++) {\n var command = defaultExCommandMap[i];\n var key = command.shortName || command.name;\n this.commandMap_[key] = command;\n }\n },\n map: function map(lhs, rhs, ctx) {\n if (lhs != \":\" && lhs.charAt(0) == \":\") {\n if (ctx) {\n throw Error(\"Mode not supported for ex mappings\");\n }\n\n var commandName = lhs.substring(1);\n\n if (rhs != \":\" && rhs.charAt(0) == \":\") {\n // Ex to Ex mapping\n this.commandMap_[commandName] = {\n name: commandName,\n type: \"exToEx\",\n toInput: rhs.substring(1),\n user: true\n };\n } else {\n // Ex to key mapping\n this.commandMap_[commandName] = {\n name: commandName,\n type: \"exToKey\",\n toKeys: rhs,\n user: true\n };\n }\n } else {\n if (rhs != \":\" && rhs.charAt(0) == \":\") {\n // Key to Ex mapping.\n var mapping = {\n keys: lhs,\n type: \"keyToEx\",\n exArgs: {\n input: rhs.substring(1)\n }\n };\n\n if (ctx) {\n mapping.context = ctx;\n }\n\n defaultKeymap.unshift(mapping);\n } else {\n // Key to key mapping\n var mapping = {\n keys: lhs,\n type: \"keyToKey\",\n toKeys: rhs\n };\n\n if (ctx) {\n mapping.context = ctx;\n }\n\n defaultKeymap.unshift(mapping);\n }\n }\n },\n unmap: function unmap(lhs, ctx) {\n if (lhs != \":\" && lhs.charAt(0) == \":\") {\n // Ex to Ex or Ex to key mapping\n if (ctx) {\n throw Error(\"Mode not supported for ex mappings\");\n }\n\n var commandName = lhs.substring(1);\n\n if (this.commandMap_[commandName] && this.commandMap_[commandName].user) {\n delete this.commandMap_[commandName];\n return true;\n }\n } else {\n // Key to Ex or key to key mapping\n var keys = lhs;\n\n for (var i = 0; i < defaultKeymap.length; i++) {\n if (keys == defaultKeymap[i].keys && defaultKeymap[i].context === ctx) {\n defaultKeymap.splice(i, 1);\n return true;\n }\n }\n }\n }\n };\n var exCommands = {\n colorscheme: function colorscheme(cm, params) {\n if (!params.args || params.args.length < 1) {\n showConfirm(cm, cm.getOption(\"theme\"));\n return;\n }\n\n cm.setOption(\"theme\", params.args[0]);\n },\n map: function map(cm, params, ctx) {\n var mapArgs = params.args;\n\n if (!mapArgs || mapArgs.length < 2) {\n if (cm) {\n showConfirm(cm, \"Invalid mapping: \" + params.input);\n }\n\n return;\n }\n\n exCommandDispatcher.map(mapArgs[0], mapArgs[1], ctx);\n },\n imap: function imap(cm, params) {\n this.map(cm, params, \"insert\");\n },\n nmap: function nmap(cm, params) {\n this.map(cm, params, \"normal\");\n },\n vmap: function vmap(cm, params) {\n this.map(cm, params, \"visual\");\n },\n unmap: function unmap(cm, params, ctx) {\n var mapArgs = params.args;\n\n if (!mapArgs || mapArgs.length < 1 || !exCommandDispatcher.unmap(mapArgs[0], ctx)) {\n if (cm) {\n showConfirm(cm, \"No such mapping: \" + params.input);\n }\n }\n },\n move: function move(cm, params) {\n commandDispatcher.processCommand(cm, cm.state.vim, {\n type: \"motion\",\n motion: \"moveToLineOrEdgeOfDocument\",\n motionArgs: {\n forward: false,\n explicitRepeat: true,\n linewise: true\n },\n repeatOverride: params.line + 1\n });\n },\n set: function set(cm, params) {\n var setArgs = params.args; // Options passed through to the setOption/getOption calls. May be passed in by the\n // local/global versions of the set command\n\n var setCfg = params.setCfg || {};\n\n if (!setArgs || setArgs.length < 1) {\n if (cm) {\n showConfirm(cm, \"Invalid mapping: \" + params.input);\n }\n\n return;\n }\n\n var expr = setArgs[0].split(\"=\");\n var optionName = expr[0];\n var value = expr[1];\n var forceGet = false;\n\n if (optionName.charAt(optionName.length - 1) == \"?\") {\n // If post-fixed with ?, then the set is actually a get.\n if (value) {\n throw Error(\"Trailing characters: \" + params.argString);\n }\n\n optionName = optionName.substring(0, optionName.length - 1);\n forceGet = true;\n }\n\n if (value === undefined && optionName.substring(0, 2) == \"no\") {\n // To set boolean options to false, the option name is prefixed with\n // 'no'.\n optionName = optionName.substring(2);\n value = false;\n }\n\n var optionIsBoolean = options[optionName] && options[optionName].type == \"boolean\";\n\n if (optionIsBoolean && value == undefined) {\n // Calling set with a boolean option sets it to true.\n value = true;\n } // If no value is provided, then we assume this is a get.\n\n\n if (!optionIsBoolean && value === undefined || forceGet) {\n var oldValue = getOption(optionName, cm, setCfg);\n\n if (oldValue instanceof Error) {\n showConfirm(cm, oldValue.message);\n } else if (oldValue === true || oldValue === false) {\n showConfirm(cm, \" \" + (oldValue ? \"\" : \"no\") + optionName);\n } else {\n showConfirm(cm, \" \" + optionName + \"=\" + oldValue);\n }\n } else {\n var setOptionReturn = setOption(optionName, value, cm, setCfg);\n\n if (setOptionReturn instanceof Error) {\n showConfirm(cm, setOptionReturn.message);\n }\n }\n },\n setlocal: function setlocal(cm, params) {\n // setCfg is passed through to setOption\n params.setCfg = {\n scope: \"local\"\n };\n this.set(cm, params);\n },\n setglobal: function setglobal(cm, params) {\n // setCfg is passed through to setOption\n params.setCfg = {\n scope: \"global\"\n };\n this.set(cm, params);\n },\n registers: function registers(cm, params) {\n var regArgs = params.args;\n var registers = vimGlobalState.registerController.registers;\n var regInfo = \"----------Registers----------\\n\\n\";\n\n if (!regArgs) {\n for (var registerName in registers) {\n var text = registers[registerName].toString();\n\n if (text.length) {\n regInfo += '\"' + registerName + \" \" + text + \"\\n\";\n }\n }\n } else {\n var registerName;\n regArgs = regArgs.join(\"\");\n\n for (var i = 0; i < regArgs.length; i++) {\n registerName = regArgs.charAt(i);\n\n if (!vimGlobalState.registerController.isValidRegister(registerName)) {\n continue;\n }\n\n var register = registers[registerName] || new Register();\n regInfo += '\"' + registerName + \" \" + register.toString() + \"\\n\";\n }\n }\n\n showConfirm(cm, regInfo);\n },\n sort: function sort(cm, params) {\n var reverse, ignoreCase, unique, number, pattern;\n\n function parseArgs() {\n if (params.argString) {\n var args = new _cm_adapter[\"default\"].StringStream(params.argString);\n\n if (args.eat(\"!\")) {\n reverse = true;\n }\n\n if (args.eol()) {\n return;\n }\n\n if (!args.eatSpace()) {\n return \"Invalid arguments\";\n }\n\n var opts = args.match(/([dinuox]+)?\\s*(\\/.+\\/)?\\s*/);\n\n if (!opts && !args.eol()) {\n return \"Invalid arguments\";\n }\n\n if (opts[1]) {\n ignoreCase = opts[1].indexOf(\"i\") != -1;\n unique = opts[1].indexOf(\"u\") != -1;\n var decimal = opts[1].indexOf(\"d\") != -1 || opts[1].indexOf(\"n\") != -1 && 1;\n var hex = opts[1].indexOf(\"x\") != -1 && 1;\n var octal = opts[1].indexOf(\"o\") != -1 && 1;\n\n if (decimal + hex + octal > 1) {\n return \"Invalid arguments\";\n }\n\n number = decimal && \"decimal\" || hex && \"hex\" || octal && \"octal\";\n }\n\n if (opts[2]) {\n pattern = new RegExp(opts[2].substr(1, opts[2].length - 2), ignoreCase ? \"i\" : \"\");\n }\n }\n }\n\n var err = parseArgs();\n\n if (err) {\n showConfirm(cm, err + \": \" + params.argString);\n return;\n }\n\n var lineStart = params.line || cm.firstLine();\n var lineEnd = params.lineEnd || params.line || cm.lastLine();\n\n if (lineStart == lineEnd) {\n return;\n }\n\n var curStart = new Pos(lineStart, 0);\n var curEnd = new Pos(lineEnd, lineLength(cm, lineEnd));\n var text = cm.getRange(curStart, curEnd).split(\"\\n\");\n var numberRegex = pattern ? pattern : number == \"decimal\" ? /(-?)([\\d]+)/ : number == \"hex\" ? /(-?)(?:0x)?([0-9a-f]+)/i : number == \"octal\" ? /([0-7]+)/ : null;\n var radix = number == \"decimal\" ? 10 : number == \"hex\" ? 16 : number == \"octal\" ? 8 : null;\n var numPart = [],\n textPart = [];\n\n if (number || pattern) {\n for (var i = 0; i < text.length; i++) {\n var matchPart = pattern ? text[i].match(pattern) : null;\n\n if (matchPart && matchPart[0] != \"\") {\n numPart.push(matchPart);\n } else if (!pattern && numberRegex.exec(text[i])) {\n numPart.push(text[i]);\n } else {\n textPart.push(text[i]);\n }\n }\n } else {\n textPart = text;\n }\n\n function compareFn(a, b) {\n if (reverse) {\n var tmp;\n tmp = a;\n a = b;\n b = tmp;\n }\n\n if (ignoreCase) {\n a = a.toLowerCase();\n b = b.toLowerCase();\n }\n\n var anum = number && numberRegex.exec(a);\n var bnum = number && numberRegex.exec(b);\n\n if (!anum) {\n return a < b ? -1 : 1;\n }\n\n anum = parseInt((anum[1] + anum[2]).toLowerCase(), radix);\n bnum = parseInt((bnum[1] + bnum[2]).toLowerCase(), radix);\n return anum - bnum;\n }\n\n function comparePatternFn(a, b) {\n if (reverse) {\n var tmp;\n tmp = a;\n a = b;\n b = tmp;\n }\n\n if (ignoreCase) {\n a[0] = a[0].toLowerCase();\n b[0] = b[0].toLowerCase();\n }\n\n return a[0] < b[0] ? -1 : 1;\n }\n\n numPart.sort(pattern ? comparePatternFn : compareFn);\n\n if (pattern) {\n for (var i = 0; i < numPart.length; i++) {\n numPart[i] = numPart[i].input;\n }\n } else if (!number) {\n textPart.sort(compareFn);\n }\n\n text = !reverse ? textPart.concat(numPart) : numPart.concat(textPart);\n\n if (unique) {\n // Remove duplicate lines\n var textOld = text;\n var lastLine;\n text = [];\n\n for (var i = 0; i < textOld.length; i++) {\n if (textOld[i] != lastLine) {\n text.push(textOld[i]);\n }\n\n lastLine = textOld[i];\n }\n }\n\n cm.replaceRange(text.join(\"\\n\"), curStart, curEnd);\n },\n vglobal: function vglobal(cm, params) {\n // global inspects params.commandName\n this.global(cm, params);\n },\n global: function global(cm, params) {\n // a global command is of the form\n // :[range]g/pattern/[cmd]\n // argString holds the string /pattern/[cmd]\n var argString = params.argString;\n\n if (!argString) {\n showConfirm(cm, \"Regular Expression missing from global\");\n return;\n }\n\n var inverted = params.commandName[0] === \"v\"; // range is specified here\n\n var lineStart = params.line !== undefined ? params.line : cm.firstLine();\n var lineEnd = params.lineEnd || params.line || cm.lastLine(); // get the tokens from argString\n\n var tokens = splitBySlash(argString);\n var regexPart = argString,\n cmd;\n\n if (tokens.length) {\n regexPart = tokens[0];\n cmd = tokens.slice(1, tokens.length).join(\"/\");\n }\n\n if (regexPart) {\n // If regex part is empty, then use the previous query. Otherwise\n // use the regex part as the new query.\n try {\n updateSearchQuery(cm, regexPart, true\n /** ignoreCase */\n , true\n /** smartCase */\n );\n } catch (e) {\n showConfirm(cm, \"Invalid regex: \" + regexPart);\n return;\n }\n } // now that we have the regexPart, search for regex matches in the\n // specified range of lines\n\n\n var query = getSearchState(cm).getQuery();\n var matchedLines = [];\n\n for (var i = lineStart; i <= lineEnd; i++) {\n var line = cm.getLineHandle(i);\n var matched = query.test(line.text);\n\n if (matched !== inverted) {\n matchedLines.push(cmd ? line : line.text);\n }\n } // if there is no [cmd], just display the list of matched lines\n\n\n if (!cmd) {\n showConfirm(cm, matchedLines.join(\"\\n\"));\n return;\n }\n\n var index = 0;\n\n var nextCommand = function nextCommand() {\n if (index < matchedLines.length) {\n var line = matchedLines[index++];\n var lineNum = cm.getLineNumber(line);\n\n if (lineNum == null) {\n nextCommand();\n return;\n }\n\n var command = lineNum + 1 + cmd;\n exCommandDispatcher.processCommand(cm, command, {\n callback: nextCommand\n });\n }\n };\n\n nextCommand();\n },\n substitute: function substitute(cm, params) {\n if (!cm.getSearchCursor) {\n throw new Error(\"Search feature not available. Requires searchcursor.js or \" + \"any other getSearchCursor implementation.\");\n }\n\n var argString = params.argString;\n var tokens = argString ? splitBySeparator(argString, argString[0]) : [];\n var regexPart,\n replacePart = \"\",\n trailing,\n flagsPart,\n count;\n var confirm = false; // Whether to confirm each replace.\n\n var global = false; // True to replace all instances on a line, false to replace only 1.\n\n if (tokens.length) {\n regexPart = tokens[0];\n\n if (getOption(\"pcre\") && regexPart !== \"\") {\n regexPart = new RegExp(regexPart).source; //normalize not escaped characters\n }\n\n replacePart = tokens[1];\n\n if (replacePart !== undefined) {\n if (getOption(\"pcre\")) {\n replacePart = unescapeRegexReplace(replacePart.replace(/([^\\\\])&/g, \"$1$$&\"));\n } else {\n replacePart = translateRegexReplace(replacePart);\n }\n\n vimGlobalState.lastSubstituteReplacePart = replacePart;\n }\n\n trailing = tokens[2] ? tokens[2].split(\" \") : [];\n } else {\n // either the argString is empty or its of the form ' hello/world'\n // actually splitBySlash returns a list of tokens\n // only if the string starts with a '/'\n if (argString && argString.length) {\n showConfirm(cm, \"Substitutions should be of the form \" + \":s/pattern/replace/\");\n return;\n }\n } // After the 3rd slash, we can have flags followed by a space followed\n // by count.\n\n\n if (trailing) {\n flagsPart = trailing[0];\n count = parseInt(trailing[1]);\n\n if (flagsPart) {\n if (flagsPart.indexOf(\"c\") != -1) {\n confirm = true;\n }\n\n if (flagsPart.indexOf(\"g\") != -1) {\n global = true;\n }\n\n if (getOption(\"pcre\")) {\n regexPart = regexPart + \"/\" + flagsPart;\n } else {\n regexPart = regexPart.replace(/\\//g, \"\\\\/\") + \"/\" + flagsPart;\n }\n }\n }\n\n if (regexPart) {\n // If regex part is empty, then use the previous query. Otherwise use\n // the regex part as the new query.\n try {\n updateSearchQuery(cm, regexPart, true\n /** ignoreCase */\n , true\n /** smartCase */\n );\n } catch (e) {\n showConfirm(cm, \"Invalid regex: \" + regexPart);\n return;\n }\n }\n\n replacePart = replacePart || vimGlobalState.lastSubstituteReplacePart;\n\n if (replacePart === undefined) {\n showConfirm(cm, \"No previous substitute regular expression\");\n return;\n }\n\n var state = getSearchState(cm);\n var query = state.getQuery();\n var lineStart = params.line !== undefined ? params.line : cm.getCursor().line;\n var lineEnd = params.lineEnd || lineStart;\n\n if (lineStart == cm.firstLine() && lineEnd == cm.lastLine()) {\n lineEnd = Infinity;\n }\n\n if (count) {\n lineStart = lineEnd;\n lineEnd = lineStart + count - 1;\n }\n\n var startPos = clipCursorToContent(cm, new Pos(lineStart, 0));\n var cursor = cm.getSearchCursor(query, startPos);\n cm.pushUndoStop();\n doReplace(cm, confirm, global, lineStart, lineEnd, cursor, query, replacePart, params.callback);\n },\n redo: _cm_adapter[\"default\"].commands.redo,\n undo: _cm_adapter[\"default\"].commands.undo,\n write: function write(cm) {\n if (_cm_adapter[\"default\"].commands.save) {\n // If a save command is defined, call it.\n _cm_adapter[\"default\"].commands.save(cm);\n } else if (cm.save) {\n // Saves to text area if no save command is defined and cm.save() is available.\n cm.save();\n }\n },\n nohlsearch: function nohlsearch(cm) {\n clearSearchHighlight(cm);\n },\n yank: function yank(cm) {\n var cur = copyCursor(cm.getCursor());\n var line = cur.line;\n var lineText = cm.getLine(line);\n vimGlobalState.registerController.pushText(\"0\", \"yank\", lineText, true, true);\n },\n delmarks: function delmarks(cm, params) {\n if (!params.argString || !trim(params.argString)) {\n showConfirm(cm, \"Argument required\");\n return;\n }\n\n var state = cm.state.vim;\n var stream = new _cm_adapter[\"default\"].StringStream(trim(params.argString));\n\n while (!stream.eol()) {\n stream.eatSpace(); // Record the streams position at the beginning of the loop for use\n // in error messages.\n\n var count = stream.pos;\n\n if (!stream.match(/[a-zA-Z]/, false)) {\n showConfirm(cm, \"Invalid argument: \" + params.argString.substring(count));\n return;\n }\n\n var sym = stream.next(); // Check if this symbol is part of a range\n\n if (stream.match(\"-\", true)) {\n // This symbol is part of a range.\n // The range must terminate at an alphabetic character.\n if (!stream.match(/[a-zA-Z]/, false)) {\n showConfirm(cm, \"Invalid argument: \" + params.argString.substring(count));\n return;\n }\n\n var startMark = sym;\n var finishMark = stream.next(); // The range must terminate at an alphabetic character which\n // shares the same case as the start of the range.\n\n if (isLowerCase(startMark) && isLowerCase(finishMark) || isUpperCase(startMark) && isUpperCase(finishMark)) {\n var start = startMark.charCodeAt(0);\n var finish = finishMark.charCodeAt(0);\n\n if (start >= finish) {\n showConfirm(cm, \"Invalid argument: \" + params.argString.substring(count));\n return;\n } // Because marks are always ASCII values, and we have\n // determined that they are the same case, we can use\n // their char codes to iterate through the defined range.\n\n\n for (var j = 0; j <= finish - start; j++) {\n var mark = String.fromCharCode(start + j);\n delete state.marks[mark];\n }\n } else {\n showConfirm(cm, \"Invalid argument: \" + startMark + \"-\");\n return;\n }\n } else {\n // This symbol is a valid mark, and is not part of a range.\n delete state.marks[sym];\n }\n }\n }\n };\n var exCommandDispatcher = new ExCommandDispatcher();\n /**\n * @param {CodeMirror} cm CodeMirror instance we are in.\n * @param {boolean} confirm Whether to confirm each replace.\n * @param {Cursor} lineStart Line to start replacing from.\n * @param {Cursor} lineEnd Line to stop replacing at.\n * @param {RegExp} query Query for performing matches with.\n * @param {string} replaceWith Text to replace matches with. May contain $1,\n * $2, etc for replacing captured groups using JavaScript replace.\n * @param {function()} callback A callback for when the replace is done.\n */\n\n function doReplace(cm, confirm, global, lineStart, lineEnd, searchCursor, query, replaceWith, callback) {\n // Set up all the functions.\n cm.state.vim.exMode = true;\n var done = false;\n var lastPos, modifiedLineNumber, joined;\n\n function replaceAll() {\n cm.operation(function () {\n while (!done) {\n replace();\n next();\n }\n\n stop();\n });\n }\n\n function replace() {\n var text = cm.getRange(searchCursor.from(), searchCursor.to());\n var newText = text.replace(query, replaceWith);\n var unmodifiedLineNumber = searchCursor.to().line;\n searchCursor.replace(newText);\n modifiedLineNumber = searchCursor.to().line;\n lineEnd += modifiedLineNumber - unmodifiedLineNumber;\n joined = modifiedLineNumber < unmodifiedLineNumber;\n }\n\n function findNextValidMatch() {\n var lastMatchTo = lastPos && copyCursor(searchCursor.to());\n var match = searchCursor.findNext();\n\n if (match && !match[0] && lastMatchTo && cursorEqual(searchCursor.from(), lastMatchTo)) {\n match = searchCursor.findNext();\n }\n\n return match;\n }\n\n function next() {\n // The below only loops to skip over multiple occurrences on the same\n // line when 'global' is not true.\n while (findNextValidMatch() && isInRange(searchCursor.from(), lineStart, lineEnd)) {\n if (!global && searchCursor.from().line == modifiedLineNumber && !joined) {\n continue;\n }\n\n cm.scrollIntoView(searchCursor.from(), 30);\n cm.setSelection(searchCursor.from(), searchCursor.to());\n lastPos = searchCursor.from();\n done = false;\n return;\n }\n\n done = true;\n }\n\n function stop(close) {\n if (close) {\n close();\n }\n\n cm.focus();\n\n if (lastPos) {\n cm.setCursor(lastPos);\n var vim = cm.state.vim;\n vim.exMode = false;\n vim.lastHPos = vim.lastHSPos = lastPos.ch;\n }\n\n if (callback) {\n callback();\n }\n }\n\n function onPromptKeyDown(e, _value, close) {\n // Swallow all keys.\n _cm_adapter[\"default\"].e_stop(e);\n\n var keyName = _cm_adapter[\"default\"].keyName(e);\n\n switch (keyName) {\n case \"Y\":\n replace();\n next();\n break;\n\n case \"N\":\n next();\n break;\n\n case \"A\":\n // replaceAll contains a call to close of its own. We don't want it\n // to fire too early or multiple times.\n var savedCallback = callback;\n callback = undefined;\n cm.operation(replaceAll);\n callback = savedCallback;\n break;\n\n case \"L\":\n replace();\n // fall through and exit.\n\n case \"Q\":\n case \"Esc\":\n case \"Ctrl-C\":\n case \"Ctrl-[\":\n stop(close);\n break;\n }\n\n if (done) {\n stop(close);\n }\n\n return true;\n } // Actually do replace.\n\n\n next();\n\n if (done) {\n showConfirm(cm, \"No matches for \" + query.source);\n return;\n }\n\n if (!confirm) {\n replaceAll();\n\n if (callback) {\n callback();\n }\n\n return;\n }\n\n showPrompt(cm, {\n prefix: dom(\"span\", \"replace with \", dom(\"strong\", replaceWith), \" (y/n/a/q/l)\"),\n onKeyDown: onPromptKeyDown\n });\n }\n\n _cm_adapter[\"default\"].keyMap.vim = {\n attach: attachVimMap,\n detach: detachVimMap,\n call: cmKey\n };\n\n function exitInsertMode(cm) {\n var vim = cm.state.vim;\n var macroModeState = vimGlobalState.macroModeState;\n var insertModeChangeRegister = vimGlobalState.registerController.getRegister(\".\");\n var isPlaying = macroModeState.isPlaying;\n var lastChange = macroModeState.lastInsertModeChanges;\n\n if (!isPlaying) {\n cm.off(\"change\", onChange);\n\n _cm_adapter[\"default\"].off(cm.getInputField(), \"keydown\", onKeyEventTargetKeyDown);\n }\n\n if (!isPlaying && vim.insertModeRepeat > 1) {\n // Perform insert mode repeat for commands like 3,a and 3,o.\n _repeatLastEdit(cm, vim, vim.insertModeRepeat - 1, true\n /** repeatForInsert */\n );\n\n vim.lastEditInputState.repeatOverride = vim.insertModeRepeat;\n }\n\n delete vim.insertModeRepeat;\n vim.insertMode = false;\n cm.setCursor(cm.getCursor().line, cm.getCursor().ch - 1);\n cm.setOption(\"keyMap\", \"vim\");\n cm.setOption(\"disableInput\", true);\n cm.toggleOverwrite(false); // exit replace mode if we were in it.\n // update the \". register before exiting insert mode\n\n insertModeChangeRegister.setText(lastChange.changes.join(\"\"));\n\n _cm_adapter[\"default\"].signal(cm, \"vim-mode-change\", {\n mode: \"normal\"\n });\n\n if (macroModeState.isRecording) {\n logInsertModeChange(macroModeState);\n }\n\n cm.enterVimMode();\n }\n\n function _mapCommand(command) {\n defaultKeymap.unshift(command);\n }\n\n function mapCommand(keys, type, name, args, extra) {\n var command = {\n keys: keys,\n type: type\n };\n command[type] = name;\n command[type + \"Args\"] = args;\n\n for (var key in extra) {\n command[key] = extra[key];\n }\n\n _mapCommand(command);\n } // The timeout in milliseconds for the two-character ESC keymap should be\n // adjusted according to your typing speed to prevent false positives.\n\n\n defineOption(\"insertModeEscKeysTimeout\", 200, \"number\");\n _cm_adapter[\"default\"].keyMap[\"vim-insert\"] = {\n // TODO: override navigation keys so that Esc will cancel automatic\n // indentation from o, O, i_\n fallthrough: [\"default\"],\n attach: attachVimMap,\n detach: detachVimMap,\n call: cmKey\n };\n _cm_adapter[\"default\"].keyMap[\"vim-replace\"] = {\n Backspace: \"goCharLeft\",\n fallthrough: [\"vim-insert\"],\n attach: attachVimMap,\n detach: detachVimMap,\n call: cmKey\n };\n\n function executeMacroRegister(cm, vim, macroModeState, registerName) {\n var register = vimGlobalState.registerController.getRegister(registerName);\n\n if (registerName == \":\") {\n // Read-only register containing last Ex command.\n if (register.keyBuffer[0]) {\n exCommandDispatcher.processCommand(cm, register.keyBuffer[0]);\n }\n\n macroModeState.isPlaying = false;\n return;\n }\n\n var keyBuffer = register.keyBuffer;\n var imc = 0;\n macroModeState.isPlaying = true;\n macroModeState.replaySearchQueries = register.searchQueries.slice(0);\n\n for (var i = 0; i < keyBuffer.length; i++) {\n var text = keyBuffer[i];\n var match, key;\n\n while (text) {\n // Pull off one command key, which is either a single character\n // or a special sequence wrapped in '<' and '>', e.g. ''.\n match = /<\\w+-.+?>|<\\w+>|./.exec(text);\n key = match[0];\n text = text.substring(match.index + key.length);\n vimApi.handleKey(cm, key, \"macro\");\n\n if (vim.insertMode) {\n var changes = register.insertModeChanges[imc++].changes;\n vimGlobalState.macroModeState.lastInsertModeChanges.changes = changes;\n repeatInsertModeChanges(cm, changes, 1);\n exitInsertMode(cm);\n }\n }\n }\n\n macroModeState.isPlaying = false;\n }\n\n function logKey(macroModeState, key) {\n if (macroModeState.isPlaying) {\n return;\n }\n\n var registerName = macroModeState.latestRegister;\n var register = vimGlobalState.registerController.getRegister(registerName);\n\n if (register) {\n register.pushText(key);\n }\n }\n\n function logInsertModeChange(macroModeState) {\n if (macroModeState.isPlaying) {\n return;\n }\n\n var registerName = macroModeState.latestRegister;\n var register = vimGlobalState.registerController.getRegister(registerName);\n\n if (register && register.pushInsertModeChanges) {\n register.pushInsertModeChanges(macroModeState.lastInsertModeChanges);\n }\n }\n\n function logSearchQuery(macroModeState, query) {\n if (macroModeState.isPlaying) {\n return;\n }\n\n var registerName = macroModeState.latestRegister;\n var register = vimGlobalState.registerController.getRegister(registerName);\n\n if (register && register.pushSearchQuery) {\n register.pushSearchQuery(query);\n }\n }\n /**\n * Listens for changes made in insert mode.\n * Should only be active in insert mode.\n */\n\n\n function onChange(cm, changeObj) {\n var macroModeState = vimGlobalState.macroModeState;\n var lastChange = macroModeState.lastInsertModeChanges;\n\n if (!macroModeState.isPlaying) {\n while (changeObj) {\n lastChange.expectCursorActivityForChange = true;\n\n if (lastChange.ignoreCount > 1) {\n lastChange.ignoreCount--;\n } else if (changeObj.origin == \"+input\" || changeObj.origin == \"paste\" || changeObj.origin === undefined\n /* only in testing */\n ) {\n var selectionCount = cm.listSelections().length;\n if (selectionCount > 1) lastChange.ignoreCount = selectionCount;\n var text = changeObj.text.join(\"\\n\");\n\n if (lastChange.maybeReset) {\n lastChange.changes = [];\n lastChange.maybeReset = false;\n }\n\n if (text) {\n if (cm.state.overwrite && !/\\n/.test(text)) {\n lastChange.changes.push([text]);\n } else {\n lastChange.changes.push(text);\n }\n }\n } // Change objects may be chained with next.\n\n\n changeObj = changeObj.next;\n }\n }\n }\n /**\n * Listens for any kind of cursor activity on CodeMirror.\n */\n\n\n function onCursorActivity(cm) {\n var vim = cm.state.vim;\n\n if (vim.insertMode) {\n // Tracking cursor activity in insert mode (for macro support).\n var macroModeState = vimGlobalState.macroModeState;\n\n if (macroModeState.isPlaying) {\n return;\n }\n\n var lastChange = macroModeState.lastInsertModeChanges;\n\n if (lastChange.expectCursorActivityForChange) {\n lastChange.expectCursorActivityForChange = false;\n } else {\n // Cursor moved outside the context of an edit. Reset the change.\n lastChange.maybeReset = true;\n }\n } else if (!cm.curOp.isVimOp) {\n handleExternalSelection(cm, vim);\n }\n }\n\n function handleExternalSelection(cm, vim) {\n var anchor = cm.getCursor(\"anchor\");\n var head = cm.getCursor(\"head\"); // Enter or exit visual mode to match mouse selection.\n\n if (vim.visualMode && !cm.somethingSelected()) {\n exitVisualMode(cm, false);\n } else if (!vim.visualMode && !vim.insertMode && cm.somethingSelected()) {\n vim.visualMode = true;\n vim.visualLine = false;\n\n _cm_adapter[\"default\"].signal(cm, \"vim-mode-change\", {\n mode: \"visual\"\n });\n }\n\n if (vim.visualMode) {\n // Bind CodeMirror selection model to vim selection model.\n // Mouse selections are considered visual characterwise.\n var headOffset = !cursorIsBefore(head, anchor) ? -1 : 0;\n var anchorOffset = cursorIsBefore(head, anchor) ? -1 : 0;\n head = offsetCursor(head, 0, headOffset);\n anchor = offsetCursor(anchor, 0, anchorOffset);\n vim.sel = {\n anchor: anchor,\n head: head\n };\n updateMark(cm, vim, \"<\", cursorMin(head, anchor));\n updateMark(cm, vim, \">\", cursorMax(head, anchor));\n } else if (!vim.insertMode) {\n // Reset lastHPos if selection was modified by something outside of vim mode e.g. by mouse.\n vim.lastHPos = cm.getCursor().ch;\n }\n }\n /** Wrapper for special keys pressed in insert mode */\n\n\n function InsertModeKey(keyName) {\n this.keyName = keyName;\n }\n /**\n * Handles raw key down events from the text area.\n * - Should only be active in insert mode.\n * - For recording deletes in insert mode.\n */\n\n\n function onKeyEventTargetKeyDown(e) {\n var macroModeState = vimGlobalState.macroModeState;\n var lastChange = macroModeState.lastInsertModeChanges;\n\n var keyName = _cm_adapter[\"default\"].keyName(e);\n\n if (!keyName) {\n return;\n }\n\n function onKeyFound() {\n if (lastChange.maybeReset) {\n lastChange.changes = [];\n lastChange.maybeReset = false;\n }\n\n lastChange.changes.push(new InsertModeKey(keyName));\n return true;\n }\n\n if (keyName.indexOf(\"Delete\") != -1 || keyName.indexOf(\"Backspace\") != -1) {\n _cm_adapter[\"default\"].lookupKey(keyName, \"vim-insert\", onKeyFound);\n }\n }\n /**\n * Repeats the last edit, which includes exactly 1 command and at most 1\n * insert. Operator and motion commands are read from lastEditInputState,\n * while action commands are read from lastEditActionCommand.\n *\n * If repeatForInsert is true, then the function was called by\n * exitInsertMode to repeat the insert mode changes the user just made. The\n * corresponding enterInsertMode call was made with a count.\n */\n\n\n function _repeatLastEdit(cm, vim, repeat, repeatForInsert) {\n var macroModeState = vimGlobalState.macroModeState;\n macroModeState.isPlaying = true;\n var isAction = !!vim.lastEditActionCommand;\n var cachedInputState = vim.inputState;\n\n function repeatCommand() {\n if (isAction) {\n commandDispatcher.processAction(cm, vim, vim.lastEditActionCommand);\n } else {\n commandDispatcher.evalInput(cm, vim);\n }\n }\n\n function repeatInsert(repeat) {\n if (macroModeState.lastInsertModeChanges.changes.length > 0) {\n // For some reason, repeat cw in desktop VIM does not repeat\n // insert mode changes. Will conform to that behavior.\n repeat = !vim.lastEditActionCommand ? 1 : repeat;\n var changeObject = macroModeState.lastInsertModeChanges;\n repeatInsertModeChanges(cm, changeObject.changes, repeat);\n }\n }\n\n vim.inputState = vim.lastEditInputState;\n\n if (isAction && vim.lastEditActionCommand.interlaceInsertRepeat) {\n // o and O repeat have to be interlaced with insert repeats so that the\n // insertions appear on separate lines instead of the last line.\n for (var i = 0; i < repeat; i++) {\n repeatCommand();\n repeatInsert(1);\n }\n } else {\n if (!repeatForInsert) {\n // Hack to get the cursor to end up at the right place. If I is\n // repeated in insert mode repeat, cursor will be 1 insert\n // change set left of where it should be.\n repeatCommand();\n }\n\n repeatInsert(repeat);\n }\n\n vim.inputState = cachedInputState;\n\n if (vim.insertMode && !repeatForInsert) {\n // Don't exit insert mode twice. If repeatForInsert is set, then we\n // were called by an exitInsertMode call lower on the stack.\n exitInsertMode(cm);\n }\n\n macroModeState.isPlaying = false;\n }\n\n function repeatInsertModeChanges(cm, changes, repeat) {\n function keyHandler(binding) {\n if (typeof binding == \"string\") {\n _cm_adapter[\"default\"].commands[binding](cm);\n } else {\n binding(cm);\n }\n\n return true;\n }\n\n var head = cm.getCursor(\"head\");\n var visualBlock = vimGlobalState.macroModeState.lastInsertModeChanges.visualBlock;\n\n if (visualBlock) {\n // Set up block selection again for repeating the changes.\n selectForInsert(cm, head, visualBlock + 1);\n repeat = cm.listSelections().length;\n cm.setCursor(head);\n }\n\n for (var i = 0; i < repeat; i++) {\n if (visualBlock) {\n cm.setCursor(offsetCursor(head, i, 0));\n }\n\n for (var j = 0; j < changes.length; j++) {\n var change = changes[j];\n\n if (change instanceof InsertModeKey) {\n _cm_adapter[\"default\"].lookupKey(change.keyName, \"vim-insert\", keyHandler);\n } else if (typeof change == \"string\") {\n window.cm = cm;\n cm.replaceSelections(change);\n } else {\n var start = cm.getCursor();\n var end = offsetCursor(start, 0, change[0].length);\n cm.replaceRange(change[0], start, end);\n cm.setCursor(end);\n }\n }\n }\n\n if (visualBlock) {\n cm.setCursor(offsetCursor(head, 0, 1));\n }\n }\n\n resetVimGlobalState();\n return vimApi;\n}; // Initialize Vim and make it available as an API.\n\n\nexports.Vim = Vim;\n_cm_adapter[\"default\"].Vim = Vim();\nvar _default = _cm_adapter[\"default\"];\nexports[\"default\"] = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports[\"default\"] = void 0;\n\nvar _monacoEditor = require(\"monaco-editor\");\n\nvar _shiftCommand = require(\"monaco-editor/esm/vs/editor/common/commands/shiftCommand\");\n\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nvar VerticalRevealType = {\n Bottom: 4\n}; // for monaco 0.19.x where x < 3\n\nvar EditorOptConstants = {\n readOnly: 65,\n cursorWidth: 20,\n fontInfo: 32\n};\nvar nonASCIISingleCaseWordChar = /[\\u00df\\u0587\\u0590-\\u05f4\\u0600-\\u06ff\\u3040-\\u309f\\u30a0-\\u30ff\\u3400-\\u4db5\\u4e00-\\u9fcc\\uac00-\\ud7af]/;\n\nfunction isWordCharBasic(ch) {\n return /\\w/.test(ch) || ch > \"\\x80\" && (ch.toUpperCase() != ch.toLowerCase() || nonASCIISingleCaseWordChar.test(ch));\n}\n\nfunction Pos(line, column) {\n if (!(this instanceof Pos)) {\n return new Pos(line, column);\n }\n\n this.line = line;\n this.ch = column;\n}\n\nfunction signal(cm, signal, args) {\n cm.dispatch(signal, args);\n}\n\nfunction dummy(key) {\n return function () {// console.log(key, 'dummy function called with', Array.prototype.slice.call(arguments));\n };\n}\n\nvar doFold, noFold;\n\nif (String.prototype.normalize) {\n doFold = function doFold(str) {\n return str.normalize(\"NFD\").toLowerCase();\n };\n\n noFold = function noFold(str) {\n return str.normalize(\"NFD\");\n };\n} else {\n doFold = function doFold(str) {\n return str.toLowerCase();\n };\n\n noFold = function noFold(str) {\n return str;\n };\n}\n\nvar StringStream = function StringStream(string, tabSize) {\n this.pos = this.start = 0;\n this.string = string;\n this.tabSize = tabSize || 8;\n this.lastColumnPos = this.lastColumnValue = 0;\n this.lineStart = 0;\n};\n\nStringStream.prototype = {\n eol: function eol() {\n return this.pos >= this.string.length;\n },\n sol: function sol() {\n return this.pos == this.lineStart;\n },\n peek: function peek() {\n return this.string.charAt(this.pos) || undefined;\n },\n next: function next() {\n if (this.pos < this.string.length) return this.string.charAt(this.pos++);\n },\n eat: function eat(match) {\n var ch = this.string.charAt(this.pos);\n if (typeof match == \"string\") var ok = ch == match;else var ok = ch && (match.test ? match.test(ch) : match(ch));\n\n if (ok) {\n ++this.pos;\n return ch;\n }\n },\n eatWhile: function eatWhile(match) {\n var start = this.pos;\n\n while (this.eat(match)) {}\n\n return this.pos > start;\n },\n eatSpace: function eatSpace() {\n var start = this.pos;\n\n while (/[\\s\\u00a0]/.test(this.string.charAt(this.pos))) {\n ++this.pos;\n }\n\n return this.pos > start;\n },\n skipToEnd: function skipToEnd() {\n this.pos = this.string.length;\n },\n skipTo: function skipTo(ch) {\n var found = this.string.indexOf(ch, this.pos);\n\n if (found > -1) {\n this.pos = found;\n return true;\n }\n },\n backUp: function backUp(n) {\n this.pos -= n;\n },\n column: function column() {\n throw \"not implemented\";\n },\n indentation: function indentation() {\n throw \"not implemented\";\n },\n match: function match(pattern, consume, caseInsensitive) {\n if (typeof pattern == \"string\") {\n var cased = function cased(str) {\n return caseInsensitive ? str.toLowerCase() : str;\n };\n\n var substr = this.string.substr(this.pos, pattern.length);\n\n if (cased(substr) == cased(pattern)) {\n if (consume !== false) this.pos += pattern.length;\n return true;\n }\n } else {\n var match = this.string.slice(this.pos).match(pattern);\n if (match && match.index > 0) return null;\n if (match && consume !== false) this.pos += match[0].length;\n return match;\n }\n },\n current: function current() {\n return this.string.slice(this.start, this.pos);\n },\n hideFirstChars: function hideFirstChars(n, inner) {\n this.lineStart += n;\n\n try {\n return inner();\n } finally {\n this.lineStart -= n;\n }\n }\n};\n\nfunction toCmPos(pos) {\n return new Pos(pos.lineNumber - 1, pos.column - 1);\n}\n\nfunction toMonacoPos(pos) {\n return new _monacoEditor.Position(pos.line + 1, pos.ch + 1);\n}\n\nvar Marker = /*#__PURE__*/function () {\n function Marker(cm, id, line, ch) {\n _classCallCheck(this, Marker);\n\n this.cm = cm;\n this.id = id;\n this.lineNumber = line + 1;\n this.column = ch + 1;\n cm.marks[this.id] = this;\n }\n\n _createClass(Marker, [{\n key: \"clear\",\n value: function clear() {\n delete this.cm.marks[this.id];\n }\n }, {\n key: \"find\",\n value: function find() {\n return toCmPos(this);\n }\n }]);\n\n return Marker;\n}();\n\nfunction monacoToCmKey(e) {\n var skip = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n var addQuotes = true;\n var keyName = _monacoEditor.KeyCode[e.keyCode];\n\n if (e.key) {\n keyName = e.key;\n addQuotes = false;\n }\n\n var key = keyName;\n var skipOnlyShiftCheck = skip;\n\n switch (e.keyCode) {\n case _monacoEditor.KeyCode.Shift:\n case _monacoEditor.KeyCode.Meta:\n case _monacoEditor.KeyCode.Alt:\n case _monacoEditor.KeyCode.Ctrl:\n return key;\n\n case _monacoEditor.KeyCode.Escape:\n skipOnlyShiftCheck = true;\n key = \"Esc\";\n break;\n\n case _monacoEditor.KeyCode.Space:\n skipOnlyShiftCheck = true;\n break;\n } // `Key` check for monaco >= 0.30.0\n\n\n if (keyName.startsWith(\"Key\") || keyName.startsWith(\"KEY_\")) {\n key = keyName[keyName.length - 1].toLowerCase();\n } else if (keyName.startsWith(\"Digit\")) {\n key = keyName.slice(5, 6);\n } else if (keyName.startsWith(\"Numpad\")) {\n key = keyName.slice(6, 7);\n } else if (keyName.endsWith(\"Arrow\")) {\n skipOnlyShiftCheck = true;\n key = keyName.substring(0, keyName.length - 5);\n } else if (keyName.startsWith(\"US_\") || // `Bracket` check for monaco >= 0.30.0\n keyName.startsWith(\"Bracket\") || !key) {\n key = e.browserEvent.key;\n }\n\n if (!skipOnlyShiftCheck && !e.altKey && !e.ctrlKey && !e.metaKey) {\n key = e.key || e.browserEvent.key;\n } else {\n if (e.altKey) {\n key = \"Alt-\".concat(key);\n }\n\n if (e.ctrlKey) {\n key = \"Ctrl-\".concat(key);\n }\n\n if (e.metaKey) {\n key = \"Meta-\".concat(key);\n }\n\n if (e.shiftKey) {\n key = \"Shift-\".concat(key);\n }\n }\n\n if (key.length === 1 && addQuotes) {\n key = \"'\".concat(key, \"'\");\n }\n\n return key;\n}\n\nvar CMAdapter = /*#__PURE__*/function () {\n function CMAdapter(editor) {\n _classCallCheck(this, CMAdapter);\n\n _initialiseProps.call(this);\n\n this.editor = editor;\n this.state = {\n keyMap: \"vim\"\n };\n this.marks = {};\n this.$uid = 0;\n this.disposables = [];\n this.listeners = {};\n this.curOp = {};\n this.attached = false;\n this.statusBar = null;\n this.options = {};\n this.addLocalListeners();\n this.ctxInsert = this.editor.createContextKey(\"insertMode\", true);\n }\n\n _createClass(CMAdapter, [{\n key: \"attach\",\n value: function attach() {\n CMAdapter.keyMap.vim.attach(this);\n }\n }, {\n key: \"addLocalListeners\",\n value: function addLocalListeners() {\n this.disposables.push(this.editor.onDidChangeCursorPosition(this.handleCursorChange), this.editor.onDidChangeModelContent(this.handleChange), this.editor.onKeyDown(this.handleKeyDown));\n }\n }, {\n key: \"handleReplaceMode\",\n value: function handleReplaceMode(key, e) {\n var fromReplace = false;\n var _char = key;\n var pos = this.editor.getPosition();\n var range = new _monacoEditor.Range(pos.lineNumber, pos.column, pos.lineNumber, pos.column + 1);\n var forceMoveMarkers = true;\n\n if (key.startsWith(\"'\")) {\n _char = key[1];\n } else if (_char === \"Enter\") {\n _char = \"\\n\";\n } else if (_char === \"Backspace\") {\n var lastItem = this.replaceStack.pop();\n\n if (!lastItem) {\n return;\n }\n\n fromReplace = true;\n _char = lastItem;\n range = new _monacoEditor.Range(pos.lineNumber, pos.column, pos.lineNumber, pos.column - 1);\n } else {\n return;\n }\n\n e.preventDefault();\n e.stopPropagation();\n\n if (!this.replaceStack) {\n this.replaceStack = [];\n }\n\n if (!fromReplace) {\n this.replaceStack.push(this.editor.getModel().getValueInRange(range));\n }\n\n this.editor.executeEdits(\"vim\", [{\n text: _char,\n range: range,\n forceMoveMarkers: forceMoveMarkers\n }]);\n\n if (fromReplace) {\n this.editor.setPosition(range.getStartPosition());\n }\n }\n }, {\n key: \"setOption\",\n value: function setOption(key, value) {\n this.state[key] = value;\n\n if (key === \"theme\") {\n _monacoEditor.editor.setTheme(value);\n }\n }\n }, {\n key: \"getConfiguration\",\n value: function getConfiguration() {\n var editor = this.editor;\n var opts = EditorOptConstants;\n\n if (typeof editor.getConfiguration === \"function\") {\n return editor.getConfiguration();\n } else if (\"EditorOption\" in _monacoEditor.editor) {\n // for monaco 0.19.3 onwards\n opts = _monacoEditor.editor.EditorOption;\n }\n\n return {\n readOnly: editor.getOption(opts.readOnly),\n viewInfo: {\n cursorWidth: editor.getOption(opts.cursorWidth)\n },\n fontInfo: editor.getOption(opts.fontInfo)\n };\n }\n }, {\n key: \"getOption\",\n value: function getOption(key) {\n if (key === \"readOnly\") {\n return this.getConfiguration().readOnly;\n } else if (key === \"firstLineNumber\") {\n return this.firstLine() + 1;\n } else if (key === \"indentWithTabs\") {\n return !this.editor.getModel().getOptions().insertSpaces;\n } else {\n if (typeof this.editor.getConfiguration === \"function\") {\n return this.editor.getRawConfiguration()[key];\n }\n\n return this.editor.getRawOptions()[key];\n }\n }\n }, {\n key: \"dispatch\",\n value: function dispatch(signal) {\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n var listeners = this.listeners[signal];\n\n if (!listeners) {\n return;\n }\n\n listeners.forEach(function (handler) {\n return handler.apply(void 0, args);\n });\n }\n }, {\n key: \"on\",\n value: function on(event, handler) {\n if (!this.listeners[event]) {\n this.listeners[event] = [];\n }\n\n this.listeners[event].push(handler);\n }\n }, {\n key: \"off\",\n value: function off(event, handler) {\n var listeners = this.listeners[event];\n\n if (!listeners) {\n return;\n }\n\n this.listeners[event] = listeners.filter(function (l) {\n return l !== handler;\n });\n }\n }, {\n key: \"firstLine\",\n value: function firstLine() {\n return 0;\n }\n }, {\n key: \"lastLine\",\n value: function lastLine() {\n return this.lineCount() - 1;\n }\n }, {\n key: \"lineCount\",\n value: function lineCount() {\n return this.editor.getModel().getLineCount();\n }\n }, {\n key: \"defaultTextHeight\",\n value: function defaultTextHeight() {\n return 1;\n }\n }, {\n key: \"getLine\",\n value: function getLine(line) {\n if (line < 0) {\n return \"\";\n }\n\n var model = this.editor.getModel();\n var maxLines = model.getLineCount();\n\n if (line + 1 > maxLines) {\n line = maxLines - 1;\n }\n\n return this.editor.getModel().getLineContent(line + 1);\n }\n }, {\n key: \"getAnchorForSelection\",\n value: function getAnchorForSelection(selection) {\n if (selection.isEmpty()) {\n return selection.getPosition();\n }\n\n var selDir = selection.getDirection();\n return selDir === _monacoEditor.SelectionDirection.LTR ? selection.getStartPosition() : selection.getEndPosition();\n }\n }, {\n key: \"getHeadForSelection\",\n value: function getHeadForSelection(selection) {\n if (selection.isEmpty()) {\n return selection.getPosition();\n }\n\n var selDir = selection.getDirection();\n return selDir === _monacoEditor.SelectionDirection.LTR ? selection.getEndPosition() : selection.getStartPosition();\n }\n }, {\n key: \"getCursor\",\n value: function getCursor() {\n var type = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;\n\n if (!type) {\n return toCmPos(this.editor.getPosition());\n }\n\n var sel = this.editor.getSelection();\n var pos;\n\n if (sel.isEmpty()) {\n pos = sel.getPosition();\n } else if (type === \"anchor\") {\n pos = this.getAnchorForSelection(sel);\n } else {\n pos = this.getHeadForSelection(sel);\n }\n\n return toCmPos(pos);\n }\n }, {\n key: \"getRange\",\n value: function getRange(start, end) {\n var p1 = toMonacoPos(start);\n var p2 = toMonacoPos(end);\n return this.editor.getModel().getValueInRange(_monacoEditor.Range.fromPositions(p1, p2));\n }\n }, {\n key: \"getSelection\",\n value: function getSelection() {\n var list = [];\n var editor = this.editor;\n editor.getSelections().map(function (sel) {\n list.push(editor.getModel().getValueInRange(sel));\n });\n return list.join(\"\\n\");\n }\n }, {\n key: \"replaceRange\",\n value: function replaceRange(text, start, end) {\n var p1 = toMonacoPos(start);\n var p2 = !end ? p1 : toMonacoPos(end);\n this.editor.executeEdits(\"vim\", [{\n text: text,\n range: _monacoEditor.Range.fromPositions(p1, p2)\n }]); // @TODO - Check if this breaks any other expectation\n\n this.pushUndoStop();\n }\n }, {\n key: \"pushUndoStop\",\n value: function pushUndoStop() {\n this.editor.pushUndoStop();\n }\n }, {\n key: \"setCursor\",\n value: function setCursor(line, ch) {\n var pos = line;\n\n if (_typeof(line) !== \"object\") {\n pos = {};\n pos.line = line;\n pos.ch = ch;\n }\n\n var monacoPos = this.editor.getModel().validatePosition(toMonacoPos(pos));\n this.editor.setPosition(toMonacoPos(pos));\n this.editor.revealPosition(monacoPos);\n }\n }, {\n key: \"somethingSelected\",\n value: function somethingSelected() {\n return !this.editor.getSelection().isEmpty();\n }\n }, {\n key: \"operation\",\n value: function operation(fn, force) {\n return fn();\n }\n }, {\n key: \"listSelections\",\n value: function listSelections() {\n var _this = this;\n\n var selections = this.editor.getSelections();\n\n if (!selections.length || this.inVirtualSelectionMode) {\n return [{\n anchor: this.getCursor(\"anchor\"),\n head: this.getCursor(\"head\")\n }];\n }\n\n return selections.map(function (sel) {\n var pos = sel.getPosition();\n var start = sel.getStartPosition();\n var end = sel.getEndPosition();\n return {\n anchor: _this.clipPos(toCmPos(_this.getAnchorForSelection(sel))),\n head: _this.clipPos(toCmPos(_this.getHeadForSelection(sel)))\n };\n });\n }\n }, {\n key: \"focus\",\n value: function focus() {\n this.editor.focus();\n }\n }, {\n key: \"setSelections\",\n value: function setSelections(selections, primIndex) {\n var hasSel = !!this.editor.getSelections().length;\n var sels = selections.map(function (sel, index) {\n var anchor = sel.anchor,\n head = sel.head;\n\n if (hasSel) {\n return _monacoEditor.Selection.fromPositions(toMonacoPos(anchor), toMonacoPos(head));\n } else {\n return _monacoEditor.Selection.fromPositions(toMonacoPos(head), toMonacoPos(anchor));\n }\n });\n\n if (!primIndex) {} else if (sels[primIndex]) {\n sels.push(sels.splice(primIndex, 1)[0]);\n }\n\n if (!sels.length) {\n return;\n }\n\n var sel = sels[0];\n var posToReveal;\n\n if (sel.getDirection() === _monacoEditor.SelectionDirection.LTR) {\n posToReveal = sel.getEndPosition();\n } else {\n posToReveal = sel.getStartPosition();\n }\n\n this.editor.setSelections(sels);\n this.editor.revealPosition(posToReveal);\n }\n }, {\n key: \"setSelection\",\n value: function setSelection(frm, to) {\n var range = _monacoEditor.Range.fromPositions(toMonacoPos(frm), toMonacoPos(to));\n\n this.editor.setSelection(range);\n }\n }, {\n key: \"getSelections\",\n value: function getSelections() {\n var editor = this.editor;\n return editor.getSelections().map(function (sel) {\n return editor.getModel().getValueInRange(sel);\n });\n }\n }, {\n key: \"replaceSelections\",\n value: function replaceSelections(texts) {\n var editor = this.editor;\n editor.getSelections().forEach(function (sel, index) {\n editor.executeEdits(\"vim\", [{\n range: sel,\n text: texts[index],\n forceMoveMarkers: false\n }]);\n });\n }\n }, {\n key: \"toggleOverwrite\",\n value: function toggleOverwrite(toggle) {\n if (toggle) {\n this.enterVimMode();\n this.replaceMode = true;\n } else {\n this.leaveVimMode();\n this.replaceMode = false;\n this.replaceStack = [];\n }\n }\n }, {\n key: \"charCoords\",\n value: function charCoords(pos, mode) {\n return {\n top: pos.line,\n left: pos.ch\n };\n }\n }, {\n key: \"coordsChar\",\n value: function coordsChar(pos, mode) {\n if (mode === \"local\") {}\n }\n }, {\n key: \"clipPos\",\n value: function clipPos(p) {\n var pos = this.editor.getModel().validatePosition(toMonacoPos(p));\n return toCmPos(pos);\n }\n }, {\n key: \"setBookmark\",\n value: function setBookmark(cursor, options) {\n var bm = new Marker(this, this.$uid++, cursor.line, cursor.ch);\n\n if (!options || !options.insertLeft) {\n bm.$insertRight = true;\n }\n\n this.marks[bm.id] = bm;\n return bm;\n }\n }, {\n key: \"getScrollInfo\",\n value: function getScrollInfo() {\n var editor = this.editor;\n\n var _editor$getVisibleRan = editor.getVisibleRanges(),\n _editor$getVisibleRan2 = _slicedToArray(_editor$getVisibleRan, 1),\n range = _editor$getVisibleRan2[0];\n\n return {\n left: 0,\n top: range.startLineNumber - 1,\n height: editor.getModel().getLineCount(),\n clientHeight: range.endLineNumber - range.startLineNumber + 1\n };\n }\n }, {\n key: \"triggerEditorAction\",\n value: function triggerEditorAction(action) {\n this.editor.trigger(\"vim\", action);\n }\n }, {\n key: \"dispose\",\n value: function dispose() {\n this.dispatch(\"dispose\");\n this.removeOverlay();\n\n if (CMAdapter.keyMap.vim) {\n CMAdapter.keyMap.vim.detach(this);\n }\n\n this.disposables.forEach(function (d) {\n return d.dispose();\n });\n }\n }, {\n key: \"getInputField\",\n value: function getInputField() {}\n }, {\n key: \"getWrapperElement\",\n value: function getWrapperElement() {}\n }, {\n key: \"enterVimMode\",\n value: function enterVimMode() {\n var toVim = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;\n this.ctxInsert.set(false);\n var config = this.getConfiguration();\n this.initialCursorWidth = config.viewInfo.cursorWidth || 0;\n this.editor.updateOptions({\n cursorWidth: config.fontInfo.typicalFullwidthCharacterWidth,\n cursorBlinking: \"solid\"\n });\n }\n }, {\n key: \"leaveVimMode\",\n value: function leaveVimMode() {\n this.ctxInsert.set(true);\n this.editor.updateOptions({\n cursorWidth: this.initialCursorWidth || 0,\n cursorBlinking: \"blink\"\n });\n }\n }, {\n key: \"virtualSelectionMode\",\n value: function virtualSelectionMode() {\n return this.inVirtualSelectionMode;\n }\n }, {\n key: \"markText\",\n value: function markText() {\n // only used for fat-cursor, not needed\n return {\n clear: function clear() {},\n find: function find() {}\n };\n }\n }, {\n key: \"getUserVisibleLines\",\n value: function getUserVisibleLines() {\n var ranges = this.editor.getVisibleRanges();\n\n if (!ranges.length) {\n return {\n top: 0,\n bottom: 0\n };\n }\n\n var res = {\n top: Infinity,\n bottom: 0\n };\n ranges.reduce(function (acc, range) {\n if (range.startLineNumber < acc.top) {\n acc.top = range.startLineNumber;\n }\n\n if (range.endLineNumber > acc.bottom) {\n acc.bottom = range.endLineNumber;\n }\n\n return acc;\n }, res);\n res.top -= 1;\n res.bottom -= 1;\n return res;\n }\n }, {\n key: \"findPosV\",\n value: function findPosV(startPos, amount, unit) {\n var editor = this.editor;\n var finalAmount = amount;\n var finalUnit = unit;\n var pos = toMonacoPos(startPos);\n\n if (unit === \"page\") {\n var editorHeight = editor.getLayoutInfo().height;\n var lineHeight = this.getConfiguration().fontInfo.lineHeight;\n finalAmount = finalAmount * Math.floor(editorHeight / lineHeight);\n finalUnit = \"line\";\n }\n\n if (finalUnit === \"line\") {\n pos.lineNumber += finalAmount;\n }\n\n return toCmPos(pos);\n }\n }, {\n key: \"findMatchingBracket\",\n value: function findMatchingBracket(pos) {\n var mPos = toMonacoPos(pos);\n var model = this.editor.getModel();\n var res; // for monaco versions >= 0.28.0\n\n if (model.bracketPairs) {\n res = model.bracketPairs.matchBracket(mPos);\n } else {\n var _model$matchBracket;\n\n res = (_model$matchBracket = model.matchBracket) === null || _model$matchBracket === void 0 ? void 0 : _model$matchBracket.call(model, mPos);\n }\n\n if (!res || !(res.length === 2)) {\n return {\n to: null\n };\n }\n\n return {\n to: toCmPos(res[1].getStartPosition())\n };\n }\n }, {\n key: \"findFirstNonWhiteSpaceCharacter\",\n value: function findFirstNonWhiteSpaceCharacter(line) {\n return this.editor.getModel().getLineFirstNonWhitespaceColumn(line + 1) - 1;\n }\n }, {\n key: \"scrollTo\",\n value: function scrollTo(x, y) {\n if (!x && !y) {\n return;\n }\n\n if (!x) {\n if (y < 0) {\n y = this.editor.getPosition().lineNumber - y;\n }\n\n this.editor.setScrollTop(this.editor.getTopForLineNumber(y + 1));\n }\n }\n }, {\n key: \"moveCurrentLineTo\",\n value: function moveCurrentLineTo(viewPosition) {\n var _editor$_revealRange;\n\n var editor = this.editor;\n var pos = editor.getPosition();\n\n var range = _monacoEditor.Range.fromPositions(pos, pos);\n\n switch (viewPosition) {\n case \"top\":\n editor.revealRangeAtTop(range);\n return;\n\n case \"center\":\n editor.revealRangeInCenter(range);\n return;\n\n case \"bottom\":\n // private api. no other way\n (_editor$_revealRange = editor._revealRange) === null || _editor$_revealRange === void 0 ? void 0 : _editor$_revealRange.call(editor, range, VerticalRevealType.Bottom);\n return;\n }\n }\n }, {\n key: \"getSearchCursor\",\n value: function getSearchCursor(query, pos) {\n var matchCase = false;\n var isRegex = false;\n\n if (query instanceof RegExp && !query.global) {\n matchCase = !query.ignoreCase;\n query = query.source;\n isRegex = true;\n }\n\n if (pos.ch == undefined) pos.ch = Number.MAX_VALUE;\n var monacoPos = toMonacoPos(pos);\n var context = this;\n var editor = this.editor;\n var lastSearch = null;\n var model = editor.getModel();\n var matches = model.findMatches(query, false, isRegex, matchCase) || [];\n return {\n getMatches: function getMatches() {\n return matches;\n },\n findNext: function findNext() {\n return this.find(false);\n },\n findPrevious: function findPrevious() {\n return this.find(true);\n },\n jumpTo: function jumpTo(index) {\n if (!matches || !matches.length) {\n return false;\n }\n\n var match = matches[index];\n lastSearch = match.range;\n context.highlightRanges([lastSearch], \"currentFindMatch\");\n context.highlightRanges(matches.map(function (m) {\n return m.range;\n }).filter(function (r) {\n return !r.equalsRange(lastSearch);\n }));\n return lastSearch;\n },\n find: function find(back) {\n if (!matches || !matches.length) {\n return false;\n }\n\n var match;\n\n if (back) {\n var _pos = lastSearch ? lastSearch.getStartPosition() : monacoPos;\n\n match = model.findPreviousMatch(query, _pos, isRegex, matchCase);\n\n if (!match || !match.range.getStartPosition().isBeforeOrEqual(_pos)) {\n return false;\n }\n } else {\n var _pos2 = lastSearch ? model.getPositionAt(model.getOffsetAt(lastSearch.getStartPosition()) + 1) : monacoPos;\n\n match = model.findNextMatch(query, _pos2, isRegex, matchCase);\n\n if (!match || !_pos2.isBeforeOrEqual(match.range.getStartPosition())) {\n return false;\n }\n }\n\n lastSearch = match.range;\n context.highlightRanges([lastSearch], \"currentFindMatch\");\n context.highlightRanges(matches.map(function (m) {\n return m.range;\n }).filter(function (r) {\n return !r.equalsRange(lastSearch);\n }));\n return lastSearch;\n },\n from: function from() {\n return lastSearch && toCmPos(lastSearch.getStartPosition());\n },\n to: function to() {\n return lastSearch && toCmPos(lastSearch.getEndPosition());\n },\n replace: function replace(text) {\n if (lastSearch) {\n editor.executeEdits(\"vim\", [{\n range: lastSearch,\n text: text,\n forceMoveMarkers: true\n }]);\n lastSearch.setEndPosition(editor.getPosition());\n editor.setPosition(lastSearch.getStartPosition());\n }\n }\n };\n }\n }, {\n key: \"highlightRanges\",\n value: function highlightRanges(ranges) {\n var className = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : \"findMatch\";\n var decorationKey = \"decoration\".concat(className);\n this[decorationKey] = this.editor.deltaDecorations(this[decorationKey] || [], ranges.map(function (range) {\n return {\n range: range,\n options: {\n stickiness: _monacoEditor.editor.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges,\n zIndex: 13,\n className: className,\n showIfCollapsed: true\n }\n };\n }));\n return this[decorationKey];\n }\n }, {\n key: \"addOverlay\",\n value: function addOverlay(_ref, hasBoundary, style) {\n var query = _ref.query;\n var matchCase = false;\n var isRegex = false;\n\n if (query && query instanceof RegExp && !query.global) {\n isRegex = true;\n matchCase = !query.ignoreCase;\n query = query.source;\n }\n\n var match = this.editor.getModel().findNextMatch(query, this.editor.getPosition(), isRegex, matchCase);\n\n if (!match || !match.range) {\n return;\n }\n\n this.highlightRanges([match.range]);\n }\n }, {\n key: \"removeOverlay\",\n value: function removeOverlay() {\n var _this2 = this;\n\n [\"currentFindMatch\", \"findMatch\"].forEach(function (key) {\n _this2.editor.deltaDecorations(_this2[\"decoration\".concat(key)] || [], []);\n });\n }\n }, {\n key: \"scrollIntoView\",\n value: function scrollIntoView(pos) {\n if (!pos) {\n return;\n }\n\n this.editor.revealPosition(toMonacoPos(pos));\n }\n }, {\n key: \"moveH\",\n value: function moveH(units, type) {\n if (type !== \"char\") {\n return;\n }\n\n var pos = this.editor.getPosition();\n this.editor.setPosition(new _monacoEditor.Position(pos.lineNumber, pos.column + units));\n }\n }, {\n key: \"scanForBracket\",\n value: function scanForBracket(pos, dir, dd, config) {\n var bracketRegex = config.bracketRegex;\n var mPos = toMonacoPos(pos);\n var model = this.editor.getModel();\n var searchFunc = (dir === -1 ? model.findPreviousMatch : model.findNextMatch).bind(model);\n var stack = [];\n var iterations = 0;\n\n while (true) {\n if (iterations > 10) {\n // Searched too far, give up.\n return undefined;\n }\n\n var match = searchFunc(bracketRegex.source, mPos, true, true, null, true);\n var thisBracket = match.matches[0];\n\n if (match === undefined) {\n return undefined;\n }\n\n var matchingBracket = CMAdapter.matchingBrackets[thisBracket];\n\n if (matchingBracket && matchingBracket.charAt(1) === \">\" == dir > 0) {\n stack.push(thisBracket);\n } else if (stack.length === 0) {\n var res = match.range.getStartPosition();\n return {\n pos: toCmPos(res)\n };\n } else {\n stack.pop();\n }\n\n mPos = model.getPositionAt(model.getOffsetAt(match.range.getStartPosition()) + dir);\n iterations += 1;\n }\n }\n }, {\n key: \"indexFromPos\",\n value: function indexFromPos(pos) {\n return this.editor.getModel().getOffsetAt(toMonacoPos(pos));\n }\n }, {\n key: \"posFromIndex\",\n value: function posFromIndex(offset) {\n return toCmPos(this.editor.getModel().getPositionAt(offset));\n }\n }, {\n key: \"indentLine\",\n value: function indentLine(line) {\n var indentRight = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n var editor = this.editor;\n var cursorConfig; // Monaco >= 0.21.x\n\n if (editor._getViewModel) {\n cursorConfig = editor._getViewModel().cursorConfig;\n } else {\n cursorConfig = editor._getCursors().context.config;\n }\n\n var pos = new _monacoEditor.Position(line + 1, 1);\n\n var sel = _monacoEditor.Selection.fromPositions(pos, pos); // no other way than to use internal apis to preserve the undoStack for a batch of indents\n\n\n editor.executeCommand(\"vim\", new _shiftCommand.ShiftCommand(sel, {\n isUnshift: !indentRight,\n tabSize: cursorConfig.tabSize,\n indentSize: cursorConfig.indentSize,\n insertSpaces: cursorConfig.insertSpaces,\n useTabStops: cursorConfig.useTabStops,\n autoIndent: cursorConfig.autoIndent\n }));\n }\n }, {\n key: \"setStatusBar\",\n value: function setStatusBar(statusBar) {\n this.statusBar = statusBar;\n }\n }, {\n key: \"openDialog\",\n value: function openDialog(html, callback, options) {\n if (!this.statusBar) {\n return;\n }\n\n return this.statusBar.setSec(html, callback, options);\n }\n }, {\n key: \"openNotification\",\n value: function openNotification(html) {\n if (!this.statusBar) {\n return;\n }\n\n this.statusBar.showNotification(html);\n }\n }, {\n key: \"smartIndent\",\n value: function smartIndent() {\n // Only works if a formatter is added for the current language.\n // reindentselectedlines does not work here.\n this.editor.getAction(\"editor.action.formatSelection\").run();\n }\n }, {\n key: \"moveCursorTo\",\n value: function moveCursorTo(to) {\n var newPos = this.editor.getPosition();\n\n if (to === \"start\") {\n newPos.column = 1;\n } else if (to === \"end\") {\n newPos.column = this.editor.getModel().getLineMaxColumn(newPos.lineNumber);\n }\n\n this.editor.setPosition(newPos);\n }\n }, {\n key: \"execCommand\",\n value: function execCommand(command) {\n switch (command) {\n case \"goLineLeft\":\n this.moveCursorTo(\"start\");\n break;\n\n case \"goLineRight\":\n this.moveCursorTo(\"end\");\n break;\n\n case \"indentAuto\":\n this.smartIndent();\n break;\n }\n }\n }]);\n\n return CMAdapter;\n}();\n\nCMAdapter.Pos = Pos;\nCMAdapter.signal = signal;\nCMAdapter.on = dummy(\"on\");\nCMAdapter.off = dummy(\"off\");\nCMAdapter.addClass = dummy(\"addClass\");\nCMAdapter.rmClass = dummy(\"rmClass\");\nCMAdapter.defineOption = dummy(\"defineOption\");\nCMAdapter.keyMap = {\n \"default\": function _default(key) {\n return function (cm) {\n return true;\n };\n }\n};\nCMAdapter.matchingBrackets = {\n \"(\": \")>\",\n \")\": \"(<\",\n \"[\": \"]>\",\n \"]\": \"[<\",\n \"{\": \"}>\",\n \"}\": \"{<\",\n \"<\": \">>\",\n \">\": \"<<\"\n};\nCMAdapter.isWordChar = isWordCharBasic;\nCMAdapter.keyName = monacoToCmKey;\nCMAdapter.StringStream = StringStream;\n\nCMAdapter.e_stop = function (e) {\n if (e.stopPropagation) {\n e.stopPropagation();\n } else {\n e.cancelBubble = true;\n }\n\n CMAdapter.e_preventDefault(e);\n return false;\n};\n\nCMAdapter.e_preventDefault = function (e) {\n if (e.preventDefault) {\n e.preventDefault();\n\n if (e.browserEvent) {\n e.browserEvent.preventDefault();\n }\n } else {\n e.returnValue = false;\n }\n\n return false;\n};\n\nCMAdapter.commands = {\n redo: function redo(cm) {\n cm.editor.getModel().redo();\n },\n undo: function undo(cm) {\n cm.editor.getModel().undo();\n },\n newlineAndIndent: function newlineAndIndent(cm) {\n cm.triggerEditorAction(\"editor.action.insertLineAfter\");\n }\n};\n\nCMAdapter.lookupKey = function lookupKey(key, map, handle) {\n if (typeof map === \"string\") {\n map = CMAdapter.keyMap[map];\n }\n\n var found = typeof map == \"function\" ? map(key) : map[key];\n if (found === false) return \"nothing\";\n if (found === \"...\") return \"multi\";\n if (found != null && handle(found)) return \"handled\";\n\n if (map.fallthrough) {\n if (!Array.isArray(map.fallthrough)) return lookupKey(key, map.fallthrough, handle);\n\n for (var i = 0; i < map.fallthrough.length; i++) {\n var result = lookupKey(key, map.fallthrough[i], handle);\n if (result) return result;\n }\n }\n};\n\nCMAdapter.defineExtension = function (name, fn) {\n CMAdapter.prototype[name] = fn;\n};\n\nvar _initialiseProps = function _initialiseProps() {\n var _this3 = this;\n\n this.handleKeyDown = function (e) {\n // Allow previously registered keydown listeners to handle the event and\n // prevent this extension from also handling it.\n if (e.browserEvent.defaultPrevented & e.keyCode !== _monacoEditor.KeyCode.Escape) {\n return;\n }\n\n if (!_this3.attached) {\n return;\n }\n\n var key = monacoToCmKey(e);\n\n if (_this3.replaceMode) {\n _this3.handleReplaceMode(key, e);\n }\n\n if (!key) {\n return;\n }\n\n var keymap = _this3.state.keyMap;\n\n if (CMAdapter.keyMap[keymap] && CMAdapter.keyMap[keymap].call) {\n var cmd = CMAdapter.keyMap[keymap].call(key, _this3);\n\n if (cmd) {\n e.preventDefault();\n e.stopPropagation();\n\n try {\n cmd();\n } catch (err) {\n console.error(err);\n }\n }\n }\n };\n\n this.handleCursorChange = function (e) {\n var position = e.position,\n source = e.source;\n var editor = _this3.editor;\n var selection = editor.getSelection();\n\n if (!_this3.ctxInsert.get() && e.source === \"mouse\" && selection.isEmpty()) {\n var maxCol = editor.getModel().getLineMaxColumn(position.lineNumber);\n\n if (e.position.column === maxCol) {\n editor.setPosition(new _monacoEditor.Position(e.position.lineNumber, maxCol - 1));\n return;\n }\n }\n\n _this3.dispatch(\"cursorActivity\", _this3, e);\n };\n\n this.handleChange = function (e) {\n var changes = e.changes;\n var change = {\n text: changes.reduce(function (acc, change) {\n acc.push(change.text);\n return acc;\n }, []),\n origin: \"+input\"\n };\n var curOp = _this3.curOp = _this3.curOp || {};\n\n if (!curOp.changeHandlers) {\n curOp.changeHandlers = _this3.listeners[\"change\"] && _this3.listeners[\"change\"].slice();\n }\n\n if (_this3.virtualSelectionMode()) {\n return;\n }\n\n if (!curOp.lastChange) {\n curOp.lastChange = curOp.change = change;\n } else {\n curOp.lastChange.next = curOp.lastChange = change;\n }\n\n _this3.dispatch(\"change\", _this3, change);\n };\n};\n\nvar _default2 = CMAdapter;\nexports[\"default\"] = _default2;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"StatusBar\", {\n enumerable: true,\n get: function get() {\n return _statusbar[\"default\"];\n }\n});\nObject.defineProperty(exports, \"VimMode\", {\n enumerable: true,\n get: function get() {\n return _keymap_vim[\"default\"];\n }\n});\nexports.initVimMode = initVimMode;\n\nvar _keymap_vim = _interopRequireDefault(require(\"./cm/keymap_vim\"));\n\nvar _statusbar = _interopRequireDefault(require(\"./statusbar\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n\nfunction initVimMode(editor) {\n var statusbarNode = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n var StatusBarClass = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : _statusbar[\"default\"];\n var sanitizer = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;\n var vimAdapter = new _keymap_vim[\"default\"](editor);\n\n if (!statusbarNode) {\n vimAdapter.attach();\n return vimAdapter;\n }\n\n var statusBar = new StatusBarClass(statusbarNode, editor, sanitizer);\n var keyBuffer = \"\";\n vimAdapter.on(\"vim-mode-change\", function (mode) {\n statusBar.setMode(mode);\n });\n vimAdapter.on(\"vim-keypress\", function (key) {\n if (key === \":\") {\n keyBuffer = \"\";\n } else {\n keyBuffer += key;\n }\n\n statusBar.setKeyBuffer(keyBuffer);\n });\n vimAdapter.on(\"vim-command-done\", function () {\n keyBuffer = \"\";\n statusBar.setKeyBuffer(keyBuffer);\n });\n vimAdapter.on(\"dispose\", function () {\n statusBar.toggleVisibility(false);\n statusBar.closeInput();\n statusBar.clear();\n });\n statusBar.toggleVisibility(true);\n vimAdapter.setStatusBar(statusBar);\n vimAdapter.attach();\n return vimAdapter;\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports[\"default\"] = void 0;\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nvar VimStatusBar = /*#__PURE__*/function () {\n function VimStatusBar(node, editor) {\n var _this = this;\n\n var sanitizer = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;\n\n _classCallCheck(this, VimStatusBar);\n\n this.closeInput = function () {\n _this.removeInputListeners();\n\n _this.input = null;\n\n _this.setSec(\"\");\n\n if (_this.editor) {\n _this.editor.focus();\n }\n };\n\n this.clear = function () {\n _this.setInnerHtml_(_this.node, \"\");\n };\n\n this.inputKeyUp = function (e) {\n var options = _this.input.options;\n\n if (options && options.onKeyUp) {\n options.onKeyUp(e, e.target.value, _this.closeInput);\n }\n };\n\n this.inputKeyInput = function (e) {\n var options = _this.input.options;\n\n if (options && options.onKeyInput) {\n options.onKeyUp(e, e.target.value, _this.closeInput);\n }\n };\n\n this.inputBlur = function () {\n var options = _this.input.options;\n\n if (options.closeOnBlur) {\n _this.closeInput();\n }\n };\n\n this.inputKeyDown = function (e) {\n var _this$input = _this.input,\n options = _this$input.options,\n callback = _this$input.callback;\n\n if (options && options.onKeyDown && options.onKeyDown(e, e.target.value, _this.closeInput)) {\n return;\n }\n\n if (e.keyCode === 27 || options && options.closeOnEnter !== false && e.keyCode == 13) {\n _this.input.node.blur();\n\n e.stopPropagation();\n\n _this.closeInput();\n }\n\n if (e.keyCode === 13 && callback) {\n e.stopPropagation();\n e.preventDefault();\n callback(e.target.value);\n }\n };\n\n this.node = node;\n this.modeInfoNode = document.createElement(\"span\");\n this.secInfoNode = document.createElement(\"span\");\n this.notifNode = document.createElement(\"span\");\n this.notifNode.className = \"vim-notification\";\n this.keyInfoNode = document.createElement(\"span\");\n this.keyInfoNode.setAttribute(\"style\", \"float: right\");\n this.node.appendChild(this.modeInfoNode);\n this.node.appendChild(this.secInfoNode);\n this.node.appendChild(this.notifNode);\n this.node.appendChild(this.keyInfoNode);\n this.toggleVisibility(false);\n this.editor = editor;\n this.sanitizer = sanitizer;\n }\n\n _createClass(VimStatusBar, [{\n key: \"setMode\",\n value: function setMode(ev) {\n if (ev.mode === \"visual\") {\n if (ev.subMode === \"linewise\") {\n this.setText(\"--VISUAL LINE--\");\n } else if (ev.subMode === \"blockwise\") {\n this.setText(\"--VISUAL BLOCK--\");\n } else {\n this.setText(\"--VISUAL--\");\n }\n\n return;\n }\n\n this.setText(\"--\".concat(ev.mode.toUpperCase(), \"--\"));\n }\n }, {\n key: \"setKeyBuffer\",\n value: function setKeyBuffer(key) {\n this.keyInfoNode.textContent = key;\n }\n }, {\n key: \"setSec\",\n value: function setSec(text, callback, options) {\n this.notifNode.textContent = \"\";\n\n if (text === undefined) {\n return this.closeInput;\n }\n\n this.setInnerHtml_(this.secInfoNode, text);\n var input = this.secInfoNode.querySelector(\"input\");\n\n if (input) {\n input.focus();\n this.input = {\n callback: callback,\n options: options,\n node: input\n };\n\n if (options) {\n if (options.selectValueOnOpen) {\n input.select();\n }\n\n if (options.value) {\n input.value = options.value;\n }\n }\n\n this.addInputListeners();\n }\n\n return this.closeInput;\n }\n }, {\n key: \"setText\",\n value: function setText(text) {\n this.modeInfoNode.textContent = text;\n }\n }, {\n key: \"toggleVisibility\",\n value: function toggleVisibility(toggle) {\n if (toggle) {\n this.node.style.display = \"block\";\n } else {\n this.node.style.display = \"none\";\n }\n\n if (this.input) {\n this.removeInputListeners();\n }\n\n clearInterval(this.notifTimeout);\n }\n }, {\n key: \"addInputListeners\",\n value: function addInputListeners() {\n var node = this.input.node;\n node.addEventListener(\"keyup\", this.inputKeyUp);\n node.addEventListener(\"keydown\", this.inputKeyDown);\n node.addEventListener(\"input\", this.inputKeyInput);\n node.addEventListener(\"blur\", this.inputBlur);\n }\n }, {\n key: \"removeInputListeners\",\n value: function removeInputListeners() {\n if (!this.input || !this.input.node) {\n return;\n }\n\n var node = this.input.node;\n node.removeEventListener(\"keyup\", this.inputKeyUp);\n node.removeEventListener(\"keydown\", this.inputKeyDown);\n node.removeEventListener(\"input\", this.inputKeyInput);\n node.removeEventListener(\"blur\", this.inputBlur);\n }\n }, {\n key: \"showNotification\",\n value: function showNotification(text) {\n var _this2 = this;\n\n var sp = document.createElement(\"span\");\n this.setInnerHtml_(sp, text);\n this.notifNode.textContent = sp.textContent;\n this.notifTimeout = setTimeout(function () {\n _this2.notifNode.textContent = \"\";\n }, 5000);\n }\n }, {\n key: \"setInnerHtml_\",\n value: function setInnerHtml_(element, htmlContents) {\n // Clear out previous contents first.\n while (element.childNodes.length) {\n element.removeChild(element.childNodes[0]);\n }\n\n if (!htmlContents) {\n return;\n }\n\n if (this.sanitizer) {\n element.appendChild(this.sanitizer(htmlContents));\n } else {\n element.appendChild(htmlContents);\n }\n }\n }]);\n\n return VimStatusBar;\n}();\n\nexports[\"default\"] = VimStatusBar;","exports.endianness = function () { return 'LE' };\n\nexports.hostname = function () {\n if (typeof location !== 'undefined') {\n return location.hostname\n }\n else return '';\n};\n\nexports.loadavg = function () { return [] };\n\nexports.uptime = function () { return 0 };\n\nexports.freemem = function () {\n return Number.MAX_VALUE;\n};\n\nexports.totalmem = function () {\n return Number.MAX_VALUE;\n};\n\nexports.cpus = function () { return [] };\n\nexports.type = function () { return 'Browser' };\n\nexports.release = function () {\n if (typeof navigator !== 'undefined') {\n return navigator.appVersion;\n }\n return '';\n};\n\nexports.networkInterfaces\n= exports.getNetworkInterfaces\n= function () { return {} };\n\nexports.arch = function () { return 'javascript' };\n\nexports.platform = function () { return 'browser' };\n\nexports.tmpdir = exports.tmpDir = function () {\n return '/tmp';\n};\n\nexports.EOL = '\\n';\n\nexports.homedir = function () {\n\treturn '/'\n};\n","// from https://github.com/indutny/self-signed/blob/gh-pages/lib/asn1.js\n// Fedor, you are amazing.\n\n'use strict';\n\nvar asn1 = require('asn1.js');\n\nexports.certificate = require('./certificate');\n\nvar RSAPrivateKey = asn1.define('RSAPrivateKey', function () {\n\tthis.seq().obj(\n\t\tthis.key('version')['int'](),\n\t\tthis.key('modulus')['int'](),\n\t\tthis.key('publicExponent')['int'](),\n\t\tthis.key('privateExponent')['int'](),\n\t\tthis.key('prime1')['int'](),\n\t\tthis.key('prime2')['int'](),\n\t\tthis.key('exponent1')['int'](),\n\t\tthis.key('exponent2')['int'](),\n\t\tthis.key('coefficient')['int']()\n\t);\n});\nexports.RSAPrivateKey = RSAPrivateKey;\n\nvar RSAPublicKey = asn1.define('RSAPublicKey', function () {\n\tthis.seq().obj(\n\t\tthis.key('modulus')['int'](),\n\t\tthis.key('publicExponent')['int']()\n\t);\n});\nexports.RSAPublicKey = RSAPublicKey;\n\nvar AlgorithmIdentifier = asn1.define('AlgorithmIdentifier', function () {\n\tthis.seq().obj(\n\t\tthis.key('algorithm').objid(),\n\t\tthis.key('none').null_().optional(),\n\t\tthis.key('curve').objid().optional(),\n\t\tthis.key('params').seq().obj(\n\t\t\tthis.key('p')['int'](),\n\t\t\tthis.key('q')['int'](),\n\t\t\tthis.key('g')['int']()\n\t\t).optional()\n\t);\n});\n\nvar PublicKey = asn1.define('SubjectPublicKeyInfo', function () {\n\tthis.seq().obj(\n\t\tthis.key('algorithm').use(AlgorithmIdentifier),\n\t\tthis.key('subjectPublicKey').bitstr()\n\t);\n});\nexports.PublicKey = PublicKey;\n\nvar PrivateKeyInfo = asn1.define('PrivateKeyInfo', function () {\n\tthis.seq().obj(\n\t\tthis.key('version')['int'](),\n\t\tthis.key('algorithm').use(AlgorithmIdentifier),\n\t\tthis.key('subjectPrivateKey').octstr()\n\t);\n});\nexports.PrivateKey = PrivateKeyInfo;\nvar EncryptedPrivateKeyInfo = asn1.define('EncryptedPrivateKeyInfo', function () {\n\tthis.seq().obj(\n\t\tthis.key('algorithm').seq().obj(\n\t\t\tthis.key('id').objid(),\n\t\t\tthis.key('decrypt').seq().obj(\n\t\t\t\tthis.key('kde').seq().obj(\n\t\t\t\t\tthis.key('id').objid(),\n\t\t\t\t\tthis.key('kdeparams').seq().obj(\n\t\t\t\t\t\tthis.key('salt').octstr(),\n\t\t\t\t\t\tthis.key('iters')['int']()\n\t\t\t\t\t)\n\t\t\t\t),\n\t\t\t\tthis.key('cipher').seq().obj(\n\t\t\t\t\tthis.key('algo').objid(),\n\t\t\t\t\tthis.key('iv').octstr()\n\t\t\t\t)\n\t\t\t)\n\t\t),\n\t\tthis.key('subjectPrivateKey').octstr()\n\t);\n});\n\nexports.EncryptedPrivateKey = EncryptedPrivateKeyInfo;\n\nvar DSAPrivateKey = asn1.define('DSAPrivateKey', function () {\n\tthis.seq().obj(\n\t\tthis.key('version')['int'](),\n\t\tthis.key('p')['int'](),\n\t\tthis.key('q')['int'](),\n\t\tthis.key('g')['int'](),\n\t\tthis.key('pub_key')['int'](),\n\t\tthis.key('priv_key')['int']()\n\t);\n});\nexports.DSAPrivateKey = DSAPrivateKey;\n\nexports.DSAparam = asn1.define('DSAparam', function () {\n\tthis['int']();\n});\n\nvar ECParameters = asn1.define('ECParameters', function () {\n\tthis.choice({\n\t\tnamedCurve: this.objid()\n\t});\n});\n\nvar ECPrivateKey = asn1.define('ECPrivateKey', function () {\n\tthis.seq().obj(\n\t\tthis.key('version')['int'](),\n\t\tthis.key('privateKey').octstr(),\n\t\tthis.key('parameters').optional().explicit(0).use(ECParameters),\n\t\tthis.key('publicKey').optional().explicit(1).bitstr()\n\t);\n});\nexports.ECPrivateKey = ECPrivateKey;\n\nexports.signature = asn1.define('signature', function () {\n\tthis.seq().obj(\n\t\tthis.key('r')['int'](),\n\t\tthis.key('s')['int']()\n\t);\n});\n","// from https://github.com/Rantanen/node-dtls/blob/25a7dc861bda38cfeac93a723500eea4f0ac2e86/Certificate.js\n// thanks to @Rantanen\n\n'use strict';\n\nvar asn = require('asn1.js');\n\nvar Time = asn.define('Time', function () {\n\tthis.choice({\n\t\tutcTime: this.utctime(),\n\t\tgeneralTime: this.gentime()\n\t});\n});\n\nvar AttributeTypeValue = asn.define('AttributeTypeValue', function () {\n\tthis.seq().obj(\n\t\tthis.key('type').objid(),\n\t\tthis.key('value').any()\n\t);\n});\n\nvar AlgorithmIdentifier = asn.define('AlgorithmIdentifier', function () {\n\tthis.seq().obj(\n\t\tthis.key('algorithm').objid(),\n\t\tthis.key('parameters').optional(),\n\t\tthis.key('curve').objid().optional()\n\t);\n});\n\nvar SubjectPublicKeyInfo = asn.define('SubjectPublicKeyInfo', function () {\n\tthis.seq().obj(\n\t\tthis.key('algorithm').use(AlgorithmIdentifier),\n\t\tthis.key('subjectPublicKey').bitstr()\n\t);\n});\n\nvar RelativeDistinguishedName = asn.define('RelativeDistinguishedName', function () {\n\tthis.setof(AttributeTypeValue);\n});\n\nvar RDNSequence = asn.define('RDNSequence', function () {\n\tthis.seqof(RelativeDistinguishedName);\n});\n\nvar Name = asn.define('Name', function () {\n\tthis.choice({\n\t\trdnSequence: this.use(RDNSequence)\n\t});\n});\n\nvar Validity = asn.define('Validity', function () {\n\tthis.seq().obj(\n\t\tthis.key('notBefore').use(Time),\n\t\tthis.key('notAfter').use(Time)\n\t);\n});\n\nvar Extension = asn.define('Extension', function () {\n\tthis.seq().obj(\n\t\tthis.key('extnID').objid(),\n\t\tthis.key('critical').bool().def(false),\n\t\tthis.key('extnValue').octstr()\n\t);\n});\n\nvar TBSCertificate = asn.define('TBSCertificate', function () {\n\tthis.seq().obj(\n\t\tthis.key('version').explicit(0)['int']().optional(),\n\t\tthis.key('serialNumber')['int'](),\n\t\tthis.key('signature').use(AlgorithmIdentifier),\n\t\tthis.key('issuer').use(Name),\n\t\tthis.key('validity').use(Validity),\n\t\tthis.key('subject').use(Name),\n\t\tthis.key('subjectPublicKeyInfo').use(SubjectPublicKeyInfo),\n\t\tthis.key('issuerUniqueID').implicit(1).bitstr().optional(),\n\t\tthis.key('subjectUniqueID').implicit(2).bitstr().optional(),\n\t\tthis.key('extensions').explicit(3).seqof(Extension).optional()\n\t);\n});\n\nvar X509Certificate = asn.define('X509Certificate', function () {\n\tthis.seq().obj(\n\t\tthis.key('tbsCertificate').use(TBSCertificate),\n\t\tthis.key('signatureAlgorithm').use(AlgorithmIdentifier),\n\t\tthis.key('signatureValue').bitstr()\n\t);\n});\n\nmodule.exports = X509Certificate;\n","'use strict';\n\n// adapted from https://github.com/apatil/pemstrip\nvar findProc = /Proc-Type: 4,ENCRYPTED[\\n\\r]+DEK-Info: AES-((?:128)|(?:192)|(?:256))-CBC,([0-9A-H]+)[\\n\\r]+([0-9A-z\\n\\r+/=]+)[\\n\\r]+/m;\nvar startRegex = /^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----/m;\nvar fullRegex = /^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----([0-9A-z\\n\\r+/=]+)-----END \\1-----$/m;\nvar evp = require('evp_bytestokey');\nvar ciphers = require('browserify-aes');\nvar Buffer = require('safe-buffer').Buffer;\nmodule.exports = function (okey, password) {\n\tvar key = okey.toString();\n\tvar match = key.match(findProc);\n\tvar decrypted;\n\tif (!match) {\n\t\tvar match2 = key.match(fullRegex);\n\t\tdecrypted = Buffer.from(match2[2].replace(/[\\r\\n]/g, ''), 'base64');\n\t} else {\n\t\tvar suite = 'aes' + match[1];\n\t\tvar iv = Buffer.from(match[2], 'hex');\n\t\tvar cipherText = Buffer.from(match[3].replace(/[\\r\\n]/g, ''), 'base64');\n\t\tvar cipherKey = evp(password, iv.slice(0, 8), parseInt(match[1], 10)).key;\n\t\tvar out = [];\n\t\tvar cipher = ciphers.createDecipheriv(suite, cipherKey, iv);\n\t\tout.push(cipher.update(cipherText));\n\t\tout.push(cipher['final']());\n\t\tdecrypted = Buffer.concat(out);\n\t}\n\tvar tag = key.match(startRegex)[1];\n\treturn {\n\t\ttag: tag,\n\t\tdata: decrypted\n\t};\n};\n","'use strict';\n\nvar asn1 = require('./asn1');\nvar aesid = require('./aesid.json');\nvar fixProc = require('./fixProc');\nvar ciphers = require('browserify-aes');\nvar compat = require('pbkdf2');\nvar Buffer = require('safe-buffer').Buffer;\n\nfunction decrypt(data, password) {\n\tvar salt = data.algorithm.decrypt.kde.kdeparams.salt;\n\tvar iters = parseInt(data.algorithm.decrypt.kde.kdeparams.iters.toString(), 10);\n\tvar algo = aesid[data.algorithm.decrypt.cipher.algo.join('.')];\n\tvar iv = data.algorithm.decrypt.cipher.iv;\n\tvar cipherText = data.subjectPrivateKey;\n\tvar keylen = parseInt(algo.split('-')[1], 10) / 8;\n\tvar key = compat.pbkdf2Sync(password, salt, iters, keylen, 'sha1');\n\tvar cipher = ciphers.createDecipheriv(algo, key, iv);\n\tvar out = [];\n\tout.push(cipher.update(cipherText));\n\tout.push(cipher['final']());\n\treturn Buffer.concat(out);\n}\n\nfunction parseKeys(buffer) {\n\tvar password;\n\tif (typeof buffer === 'object' && !Buffer.isBuffer(buffer)) {\n\t\tpassword = buffer.passphrase;\n\t\tbuffer = buffer.key;\n\t}\n\tif (typeof buffer === 'string') {\n\t\tbuffer = Buffer.from(buffer);\n\t}\n\n\tvar stripped = fixProc(buffer, password);\n\n\tvar type = stripped.tag;\n\tvar data = stripped.data;\n\tvar subtype, ndata;\n\tswitch (type) {\n\t\tcase 'CERTIFICATE':\n\t\t\tndata = asn1.certificate.decode(data, 'der').tbsCertificate.subjectPublicKeyInfo;\n\t\t\t// falls through\n\t\tcase 'PUBLIC KEY':\n\t\t\tif (!ndata) {\n\t\t\t\tndata = asn1.PublicKey.decode(data, 'der');\n\t\t\t}\n\t\t\tsubtype = ndata.algorithm.algorithm.join('.');\n\t\t\tswitch (subtype) {\n\t\t\t\tcase '1.2.840.113549.1.1.1':\n\t\t\t\t\treturn asn1.RSAPublicKey.decode(ndata.subjectPublicKey.data, 'der');\n\t\t\t\tcase '1.2.840.10045.2.1':\n\t\t\t\t\tndata.subjectPrivateKey = ndata.subjectPublicKey;\n\t\t\t\t\treturn {\n\t\t\t\t\t\ttype: 'ec',\n\t\t\t\t\t\tdata: ndata\n\t\t\t\t\t};\n\t\t\t\tcase '1.2.840.10040.4.1':\n\t\t\t\t\tndata.algorithm.params.pub_key = asn1.DSAparam.decode(ndata.subjectPublicKey.data, 'der');\n\t\t\t\t\treturn {\n\t\t\t\t\t\ttype: 'dsa',\n\t\t\t\t\t\tdata: ndata.algorithm.params\n\t\t\t\t\t};\n\t\t\t\tdefault: throw new Error('unknown key id ' + subtype);\n\t\t\t}\n\t\t\t// throw new Error('unknown key type ' + type)\n\t\tcase 'ENCRYPTED PRIVATE KEY':\n\t\t\tdata = asn1.EncryptedPrivateKey.decode(data, 'der');\n\t\t\tdata = decrypt(data, password);\n\t\t\t// falls through\n\t\tcase 'PRIVATE KEY':\n\t\t\tndata = asn1.PrivateKey.decode(data, 'der');\n\t\t\tsubtype = ndata.algorithm.algorithm.join('.');\n\t\t\tswitch (subtype) {\n\t\t\t\tcase '1.2.840.113549.1.1.1':\n\t\t\t\t\treturn asn1.RSAPrivateKey.decode(ndata.subjectPrivateKey, 'der');\n\t\t\t\tcase '1.2.840.10045.2.1':\n\t\t\t\t\treturn {\n\t\t\t\t\t\tcurve: ndata.algorithm.curve,\n\t\t\t\t\t\tprivateKey: asn1.ECPrivateKey.decode(ndata.subjectPrivateKey, 'der').privateKey\n\t\t\t\t\t};\n\t\t\t\tcase '1.2.840.10040.4.1':\n\t\t\t\t\tndata.algorithm.params.priv_key = asn1.DSAparam.decode(ndata.subjectPrivateKey, 'der');\n\t\t\t\t\treturn {\n\t\t\t\t\t\ttype: 'dsa',\n\t\t\t\t\t\tparams: ndata.algorithm.params\n\t\t\t\t\t};\n\t\t\t\tdefault: throw new Error('unknown key id ' + subtype);\n\t\t\t}\n\t\t\t// throw new Error('unknown key type ' + type)\n\t\tcase 'RSA PUBLIC KEY':\n\t\t\treturn asn1.RSAPublicKey.decode(data, 'der');\n\t\tcase 'RSA PRIVATE KEY':\n\t\t\treturn asn1.RSAPrivateKey.decode(data, 'der');\n\t\tcase 'DSA PRIVATE KEY':\n\t\t\treturn {\n\t\t\t\ttype: 'dsa',\n\t\t\t\tparams: asn1.DSAPrivateKey.decode(data, 'der')\n\t\t\t};\n\t\tcase 'EC PRIVATE KEY':\n\t\t\tdata = asn1.ECPrivateKey.decode(data, 'der');\n\t\t\treturn {\n\t\t\t\tcurve: data.parameters.value,\n\t\t\t\tprivateKey: data.privateKey\n\t\t\t};\n\t\tdefault: throw new Error('unknown key type ' + type);\n\t}\n}\nparseKeys.signature = asn1.signature;\n\nmodule.exports = parseKeys;\n","/*! safe-buffer. MIT License. Feross Aboukhadijeh */\n/* eslint-disable node/no-deprecated-api */\nvar buffer = require('buffer')\nvar Buffer = buffer.Buffer\n\n// alternative to using Object.keys for old browsers\nfunction copyProps (src, dst) {\n for (var key in src) {\n dst[key] = src[key]\n }\n}\nif (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) {\n module.exports = buffer\n} else {\n // Copy properties from require('buffer')\n copyProps(buffer, exports)\n exports.Buffer = SafeBuffer\n}\n\nfunction SafeBuffer (arg, encodingOrOffset, length) {\n return Buffer(arg, encodingOrOffset, length)\n}\n\nSafeBuffer.prototype = Object.create(Buffer.prototype)\n\n// Copy static methods from Buffer\ncopyProps(Buffer, SafeBuffer)\n\nSafeBuffer.from = function (arg, encodingOrOffset, length) {\n if (typeof arg === 'number') {\n throw new TypeError('Argument must not be a number')\n }\n return Buffer(arg, encodingOrOffset, length)\n}\n\nSafeBuffer.alloc = function (size, fill, encoding) {\n if (typeof size !== 'number') {\n throw new TypeError('Argument must be a number')\n }\n var buf = Buffer(size)\n if (fill !== undefined) {\n if (typeof encoding === 'string') {\n buf.fill(fill, encoding)\n } else {\n buf.fill(fill)\n }\n } else {\n buf.fill(0)\n }\n return buf\n}\n\nSafeBuffer.allocUnsafe = function (size) {\n if (typeof size !== 'number') {\n throw new TypeError('Argument must be a number')\n }\n return Buffer(size)\n}\n\nSafeBuffer.allocUnsafeSlow = function (size) {\n if (typeof size !== 'number') {\n throw new TypeError('Argument must be a number')\n }\n return buffer.SlowBuffer(size)\n}\n","// 'path' module extracted from Node.js v8.11.1 (only the posix part)\n// transplited with Babel\n\n// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\nfunction assertPath(path) {\n if (typeof path !== 'string') {\n throw new TypeError('Path must be a string. Received ' + JSON.stringify(path));\n }\n}\n\n// Resolves . and .. elements in a path with directory names\nfunction normalizeStringPosix(path, allowAboveRoot) {\n var res = '';\n var lastSegmentLength = 0;\n var lastSlash = -1;\n var dots = 0;\n var code;\n for (var i = 0; i <= path.length; ++i) {\n if (i < path.length)\n code = path.charCodeAt(i);\n else if (code === 47 /*/*/)\n break;\n else\n code = 47 /*/*/;\n if (code === 47 /*/*/) {\n if (lastSlash === i - 1 || dots === 1) {\n // NOOP\n } else if (lastSlash !== i - 1 && dots === 2) {\n if (res.length < 2 || lastSegmentLength !== 2 || res.charCodeAt(res.length - 1) !== 46 /*.*/ || res.charCodeAt(res.length - 2) !== 46 /*.*/) {\n if (res.length > 2) {\n var lastSlashIndex = res.lastIndexOf('/');\n if (lastSlashIndex !== res.length - 1) {\n if (lastSlashIndex === -1) {\n res = '';\n lastSegmentLength = 0;\n } else {\n res = res.slice(0, lastSlashIndex);\n lastSegmentLength = res.length - 1 - res.lastIndexOf('/');\n }\n lastSlash = i;\n dots = 0;\n continue;\n }\n } else if (res.length === 2 || res.length === 1) {\n res = '';\n lastSegmentLength = 0;\n lastSlash = i;\n dots = 0;\n continue;\n }\n }\n if (allowAboveRoot) {\n if (res.length > 0)\n res += '/..';\n else\n res = '..';\n lastSegmentLength = 2;\n }\n } else {\n if (res.length > 0)\n res += '/' + path.slice(lastSlash + 1, i);\n else\n res = path.slice(lastSlash + 1, i);\n lastSegmentLength = i - lastSlash - 1;\n }\n lastSlash = i;\n dots = 0;\n } else if (code === 46 /*.*/ && dots !== -1) {\n ++dots;\n } else {\n dots = -1;\n }\n }\n return res;\n}\n\nfunction _format(sep, pathObject) {\n var dir = pathObject.dir || pathObject.root;\n var base = pathObject.base || (pathObject.name || '') + (pathObject.ext || '');\n if (!dir) {\n return base;\n }\n if (dir === pathObject.root) {\n return dir + base;\n }\n return dir + sep + base;\n}\n\nvar posix = {\n // path.resolve([from ...], to)\n resolve: function resolve() {\n var resolvedPath = '';\n var resolvedAbsolute = false;\n var cwd;\n\n for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) {\n var path;\n if (i >= 0)\n path = arguments[i];\n else {\n if (cwd === undefined)\n cwd = process.cwd();\n path = cwd;\n }\n\n assertPath(path);\n\n // Skip empty entries\n if (path.length === 0) {\n continue;\n }\n\n resolvedPath = path + '/' + resolvedPath;\n resolvedAbsolute = path.charCodeAt(0) === 47 /*/*/;\n }\n\n // At this point the path should be resolved to a full absolute path, but\n // handle relative paths to be safe (might happen when process.cwd() fails)\n\n // Normalize the path\n resolvedPath = normalizeStringPosix(resolvedPath, !resolvedAbsolute);\n\n if (resolvedAbsolute) {\n if (resolvedPath.length > 0)\n return '/' + resolvedPath;\n else\n return '/';\n } else if (resolvedPath.length > 0) {\n return resolvedPath;\n } else {\n return '.';\n }\n },\n\n normalize: function normalize(path) {\n assertPath(path);\n\n if (path.length === 0) return '.';\n\n var isAbsolute = path.charCodeAt(0) === 47 /*/*/;\n var trailingSeparator = path.charCodeAt(path.length - 1) === 47 /*/*/;\n\n // Normalize the path\n path = normalizeStringPosix(path, !isAbsolute);\n\n if (path.length === 0 && !isAbsolute) path = '.';\n if (path.length > 0 && trailingSeparator) path += '/';\n\n if (isAbsolute) return '/' + path;\n return path;\n },\n\n isAbsolute: function isAbsolute(path) {\n assertPath(path);\n return path.length > 0 && path.charCodeAt(0) === 47 /*/*/;\n },\n\n join: function join() {\n if (arguments.length === 0)\n return '.';\n var joined;\n for (var i = 0; i < arguments.length; ++i) {\n var arg = arguments[i];\n assertPath(arg);\n if (arg.length > 0) {\n if (joined === undefined)\n joined = arg;\n else\n joined += '/' + arg;\n }\n }\n if (joined === undefined)\n return '.';\n return posix.normalize(joined);\n },\n\n relative: function relative(from, to) {\n assertPath(from);\n assertPath(to);\n\n if (from === to) return '';\n\n from = posix.resolve(from);\n to = posix.resolve(to);\n\n if (from === to) return '';\n\n // Trim any leading backslashes\n var fromStart = 1;\n for (; fromStart < from.length; ++fromStart) {\n if (from.charCodeAt(fromStart) !== 47 /*/*/)\n break;\n }\n var fromEnd = from.length;\n var fromLen = fromEnd - fromStart;\n\n // Trim any leading backslashes\n var toStart = 1;\n for (; toStart < to.length; ++toStart) {\n if (to.charCodeAt(toStart) !== 47 /*/*/)\n break;\n }\n var toEnd = to.length;\n var toLen = toEnd - toStart;\n\n // Compare paths to find the longest common path from root\n var length = fromLen < toLen ? fromLen : toLen;\n var lastCommonSep = -1;\n var i = 0;\n for (; i <= length; ++i) {\n if (i === length) {\n if (toLen > length) {\n if (to.charCodeAt(toStart + i) === 47 /*/*/) {\n // We get here if `from` is the exact base path for `to`.\n // For example: from='/foo/bar'; to='/foo/bar/baz'\n return to.slice(toStart + i + 1);\n } else if (i === 0) {\n // We get here if `from` is the root\n // For example: from='/'; to='/foo'\n return to.slice(toStart + i);\n }\n } else if (fromLen > length) {\n if (from.charCodeAt(fromStart + i) === 47 /*/*/) {\n // We get here if `to` is the exact base path for `from`.\n // For example: from='/foo/bar/baz'; to='/foo/bar'\n lastCommonSep = i;\n } else if (i === 0) {\n // We get here if `to` is the root.\n // For example: from='/foo'; to='/'\n lastCommonSep = 0;\n }\n }\n break;\n }\n var fromCode = from.charCodeAt(fromStart + i);\n var toCode = to.charCodeAt(toStart + i);\n if (fromCode !== toCode)\n break;\n else if (fromCode === 47 /*/*/)\n lastCommonSep = i;\n }\n\n var out = '';\n // Generate the relative path based on the path difference between `to`\n // and `from`\n for (i = fromStart + lastCommonSep + 1; i <= fromEnd; ++i) {\n if (i === fromEnd || from.charCodeAt(i) === 47 /*/*/) {\n if (out.length === 0)\n out += '..';\n else\n out += '/..';\n }\n }\n\n // Lastly, append the rest of the destination (`to`) path that comes after\n // the common path parts\n if (out.length > 0)\n return out + to.slice(toStart + lastCommonSep);\n else {\n toStart += lastCommonSep;\n if (to.charCodeAt(toStart) === 47 /*/*/)\n ++toStart;\n return to.slice(toStart);\n }\n },\n\n _makeLong: function _makeLong(path) {\n return path;\n },\n\n dirname: function dirname(path) {\n assertPath(path);\n if (path.length === 0) return '.';\n var code = path.charCodeAt(0);\n var hasRoot = code === 47 /*/*/;\n var end = -1;\n var matchedSlash = true;\n for (var i = path.length - 1; i >= 1; --i) {\n code = path.charCodeAt(i);\n if (code === 47 /*/*/) {\n if (!matchedSlash) {\n end = i;\n break;\n }\n } else {\n // We saw the first non-path separator\n matchedSlash = false;\n }\n }\n\n if (end === -1) return hasRoot ? '/' : '.';\n if (hasRoot && end === 1) return '//';\n return path.slice(0, end);\n },\n\n basename: function basename(path, ext) {\n if (ext !== undefined && typeof ext !== 'string') throw new TypeError('\"ext\" argument must be a string');\n assertPath(path);\n\n var start = 0;\n var end = -1;\n var matchedSlash = true;\n var i;\n\n if (ext !== undefined && ext.length > 0 && ext.length <= path.length) {\n if (ext.length === path.length && ext === path) return '';\n var extIdx = ext.length - 1;\n var firstNonSlashEnd = -1;\n for (i = path.length - 1; i >= 0; --i) {\n var code = path.charCodeAt(i);\n if (code === 47 /*/*/) {\n // If we reached a path separator that was not part of a set of path\n // separators at the end of the string, stop now\n if (!matchedSlash) {\n start = i + 1;\n break;\n }\n } else {\n if (firstNonSlashEnd === -1) {\n // We saw the first non-path separator, remember this index in case\n // we need it if the extension ends up not matching\n matchedSlash = false;\n firstNonSlashEnd = i + 1;\n }\n if (extIdx >= 0) {\n // Try to match the explicit extension\n if (code === ext.charCodeAt(extIdx)) {\n if (--extIdx === -1) {\n // We matched the extension, so mark this as the end of our path\n // component\n end = i;\n }\n } else {\n // Extension does not match, so our result is the entire path\n // component\n extIdx = -1;\n end = firstNonSlashEnd;\n }\n }\n }\n }\n\n if (start === end) end = firstNonSlashEnd;else if (end === -1) end = path.length;\n return path.slice(start, end);\n } else {\n for (i = path.length - 1; i >= 0; --i) {\n if (path.charCodeAt(i) === 47 /*/*/) {\n // If we reached a path separator that was not part of a set of path\n // separators at the end of the string, stop now\n if (!matchedSlash) {\n start = i + 1;\n break;\n }\n } else if (end === -1) {\n // We saw the first non-path separator, mark this as the end of our\n // path component\n matchedSlash = false;\n end = i + 1;\n }\n }\n\n if (end === -1) return '';\n return path.slice(start, end);\n }\n },\n\n extname: function extname(path) {\n assertPath(path);\n var startDot = -1;\n var startPart = 0;\n var end = -1;\n var matchedSlash = true;\n // Track the state of characters (if any) we see before our first dot and\n // after any path separator we find\n var preDotState = 0;\n for (var i = path.length - 1; i >= 0; --i) {\n var code = path.charCodeAt(i);\n if (code === 47 /*/*/) {\n // If we reached a path separator that was not part of a set of path\n // separators at the end of the string, stop now\n if (!matchedSlash) {\n startPart = i + 1;\n break;\n }\n continue;\n }\n if (end === -1) {\n // We saw the first non-path separator, mark this as the end of our\n // extension\n matchedSlash = false;\n end = i + 1;\n }\n if (code === 46 /*.*/) {\n // If this is our first dot, mark it as the start of our extension\n if (startDot === -1)\n startDot = i;\n else if (preDotState !== 1)\n preDotState = 1;\n } else if (startDot !== -1) {\n // We saw a non-dot and non-path separator before our dot, so we should\n // have a good chance at having a non-empty extension\n preDotState = -1;\n }\n }\n\n if (startDot === -1 || end === -1 ||\n // We saw a non-dot character immediately before the dot\n preDotState === 0 ||\n // The (right-most) trimmed path component is exactly '..'\n preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) {\n return '';\n }\n return path.slice(startDot, end);\n },\n\n format: function format(pathObject) {\n if (pathObject === null || typeof pathObject !== 'object') {\n throw new TypeError('The \"pathObject\" argument must be of type Object. Received type ' + typeof pathObject);\n }\n return _format('/', pathObject);\n },\n\n parse: function parse(path) {\n assertPath(path);\n\n var ret = { root: '', dir: '', base: '', ext: '', name: '' };\n if (path.length === 0) return ret;\n var code = path.charCodeAt(0);\n var isAbsolute = code === 47 /*/*/;\n var start;\n if (isAbsolute) {\n ret.root = '/';\n start = 1;\n } else {\n start = 0;\n }\n var startDot = -1;\n var startPart = 0;\n var end = -1;\n var matchedSlash = true;\n var i = path.length - 1;\n\n // Track the state of characters (if any) we see before our first dot and\n // after any path separator we find\n var preDotState = 0;\n\n // Get non-dir info\n for (; i >= start; --i) {\n code = path.charCodeAt(i);\n if (code === 47 /*/*/) {\n // If we reached a path separator that was not part of a set of path\n // separators at the end of the string, stop now\n if (!matchedSlash) {\n startPart = i + 1;\n break;\n }\n continue;\n }\n if (end === -1) {\n // We saw the first non-path separator, mark this as the end of our\n // extension\n matchedSlash = false;\n end = i + 1;\n }\n if (code === 46 /*.*/) {\n // If this is our first dot, mark it as the start of our extension\n if (startDot === -1) startDot = i;else if (preDotState !== 1) preDotState = 1;\n } else if (startDot !== -1) {\n // We saw a non-dot and non-path separator before our dot, so we should\n // have a good chance at having a non-empty extension\n preDotState = -1;\n }\n }\n\n if (startDot === -1 || end === -1 ||\n // We saw a non-dot character immediately before the dot\n preDotState === 0 ||\n // The (right-most) trimmed path component is exactly '..'\n preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) {\n if (end !== -1) {\n if (startPart === 0 && isAbsolute) ret.base = ret.name = path.slice(1, end);else ret.base = ret.name = path.slice(startPart, end);\n }\n } else {\n if (startPart === 0 && isAbsolute) {\n ret.name = path.slice(1, startDot);\n ret.base = path.slice(1, end);\n } else {\n ret.name = path.slice(startPart, startDot);\n ret.base = path.slice(startPart, end);\n }\n ret.ext = path.slice(startDot, end);\n }\n\n if (startPart > 0) ret.dir = path.slice(0, startPart - 1);else if (isAbsolute) ret.dir = '/';\n\n return ret;\n },\n\n sep: '/',\n delimiter: ':',\n win32: null,\n posix: null\n};\n\nposix.posix = posix;\n\nmodule.exports = posix;\n","exports.pbkdf2 = require('./lib/async')\nexports.pbkdf2Sync = require('./lib/sync')\n","var Buffer = require('safe-buffer').Buffer\n\nvar checkParameters = require('./precondition')\nvar defaultEncoding = require('./default-encoding')\nvar sync = require('./sync')\nvar toBuffer = require('./to-buffer')\n\nvar ZERO_BUF\nvar subtle = global.crypto && global.crypto.subtle\nvar toBrowser = {\n sha: 'SHA-1',\n 'sha-1': 'SHA-1',\n sha1: 'SHA-1',\n sha256: 'SHA-256',\n 'sha-256': 'SHA-256',\n sha384: 'SHA-384',\n 'sha-384': 'SHA-384',\n 'sha-512': 'SHA-512',\n sha512: 'SHA-512'\n}\nvar checks = []\nfunction checkNative (algo) {\n if (global.process && !global.process.browser) {\n return Promise.resolve(false)\n }\n if (!subtle || !subtle.importKey || !subtle.deriveBits) {\n return Promise.resolve(false)\n }\n if (checks[algo] !== undefined) {\n return checks[algo]\n }\n ZERO_BUF = ZERO_BUF || Buffer.alloc(8)\n var prom = browserPbkdf2(ZERO_BUF, ZERO_BUF, 10, 128, algo)\n .then(function () {\n return true\n }).catch(function () {\n return false\n })\n checks[algo] = prom\n return prom\n}\nvar nextTick\nfunction getNextTick () {\n if (nextTick) {\n return nextTick\n }\n if (global.process && global.process.nextTick) {\n nextTick = global.process.nextTick\n } else if (global.queueMicrotask) {\n nextTick = global.queueMicrotask\n } else if (global.setImmediate) {\n nextTick = global.setImmediate\n } else {\n nextTick = global.setTimeout\n }\n return nextTick\n}\nfunction browserPbkdf2 (password, salt, iterations, length, algo) {\n return subtle.importKey(\n 'raw', password, { name: 'PBKDF2' }, false, ['deriveBits']\n ).then(function (key) {\n return subtle.deriveBits({\n name: 'PBKDF2',\n salt: salt,\n iterations: iterations,\n hash: {\n name: algo\n }\n }, key, length << 3)\n }).then(function (res) {\n return Buffer.from(res)\n })\n}\n\nfunction resolvePromise (promise, callback) {\n promise.then(function (out) {\n getNextTick()(function () {\n callback(null, out)\n })\n }, function (e) {\n getNextTick()(function () {\n callback(e)\n })\n })\n}\nmodule.exports = function (password, salt, iterations, keylen, digest, callback) {\n if (typeof digest === 'function') {\n callback = digest\n digest = undefined\n }\n\n digest = digest || 'sha1'\n var algo = toBrowser[digest.toLowerCase()]\n\n if (!algo || typeof global.Promise !== 'function') {\n getNextTick()(function () {\n var out\n try {\n out = sync(password, salt, iterations, keylen, digest)\n } catch (e) {\n return callback(e)\n }\n callback(null, out)\n })\n return\n }\n\n checkParameters(iterations, keylen)\n password = toBuffer(password, defaultEncoding, 'Password')\n salt = toBuffer(salt, defaultEncoding, 'Salt')\n if (typeof callback !== 'function') throw new Error('No callback provided to pbkdf2')\n\n resolvePromise(checkNative(algo).then(function (resp) {\n if (resp) return browserPbkdf2(password, salt, iterations, keylen, algo)\n\n return sync(password, salt, iterations, keylen, digest)\n }), callback)\n}\n","var defaultEncoding\n/* istanbul ignore next */\nif (global.process && global.process.browser) {\n defaultEncoding = 'utf-8'\n} else if (global.process && global.process.version) {\n var pVersionMajor = parseInt(process.version.split('.')[0].slice(1), 10)\n\n defaultEncoding = pVersionMajor >= 6 ? 'utf-8' : 'binary'\n} else {\n defaultEncoding = 'utf-8'\n}\nmodule.exports = defaultEncoding\n","var MAX_ALLOC = Math.pow(2, 30) - 1 // default in iojs\n\nmodule.exports = function (iterations, keylen) {\n if (typeof iterations !== 'number') {\n throw new TypeError('Iterations not a number')\n }\n\n if (iterations < 0) {\n throw new TypeError('Bad iterations')\n }\n\n if (typeof keylen !== 'number') {\n throw new TypeError('Key length not a number')\n }\n\n if (keylen < 0 || keylen > MAX_ALLOC || keylen !== keylen) { /* eslint no-self-compare: 0 */\n throw new TypeError('Bad key length')\n }\n}\n","var md5 = require('create-hash/md5')\nvar RIPEMD160 = require('ripemd160')\nvar sha = require('sha.js')\nvar Buffer = require('safe-buffer').Buffer\n\nvar checkParameters = require('./precondition')\nvar defaultEncoding = require('./default-encoding')\nvar toBuffer = require('./to-buffer')\n\nvar ZEROS = Buffer.alloc(128)\nvar sizes = {\n md5: 16,\n sha1: 20,\n sha224: 28,\n sha256: 32,\n sha384: 48,\n sha512: 64,\n rmd160: 20,\n ripemd160: 20\n}\n\nfunction Hmac (alg, key, saltLen) {\n var hash = getDigest(alg)\n var blocksize = (alg === 'sha512' || alg === 'sha384') ? 128 : 64\n\n if (key.length > blocksize) {\n key = hash(key)\n } else if (key.length < blocksize) {\n key = Buffer.concat([key, ZEROS], blocksize)\n }\n\n var ipad = Buffer.allocUnsafe(blocksize + sizes[alg])\n var opad = Buffer.allocUnsafe(blocksize + sizes[alg])\n for (var i = 0; i < blocksize; i++) {\n ipad[i] = key[i] ^ 0x36\n opad[i] = key[i] ^ 0x5C\n }\n\n var ipad1 = Buffer.allocUnsafe(blocksize + saltLen + 4)\n ipad.copy(ipad1, 0, 0, blocksize)\n this.ipad1 = ipad1\n this.ipad2 = ipad\n this.opad = opad\n this.alg = alg\n this.blocksize = blocksize\n this.hash = hash\n this.size = sizes[alg]\n}\n\nHmac.prototype.run = function (data, ipad) {\n data.copy(ipad, this.blocksize)\n var h = this.hash(ipad)\n h.copy(this.opad, this.blocksize)\n return this.hash(this.opad)\n}\n\nfunction getDigest (alg) {\n function shaFunc (data) {\n return sha(alg).update(data).digest()\n }\n function rmd160Func (data) {\n return new RIPEMD160().update(data).digest()\n }\n\n if (alg === 'rmd160' || alg === 'ripemd160') return rmd160Func\n if (alg === 'md5') return md5\n return shaFunc\n}\n\nfunction pbkdf2 (password, salt, iterations, keylen, digest) {\n checkParameters(iterations, keylen)\n password = toBuffer(password, defaultEncoding, 'Password')\n salt = toBuffer(salt, defaultEncoding, 'Salt')\n\n digest = digest || 'sha1'\n\n var hmac = new Hmac(digest, password, salt.length)\n\n var DK = Buffer.allocUnsafe(keylen)\n var block1 = Buffer.allocUnsafe(salt.length + 4)\n salt.copy(block1, 0, 0, salt.length)\n\n var destPos = 0\n var hLen = sizes[digest]\n var l = Math.ceil(keylen / hLen)\n\n for (var i = 1; i <= l; i++) {\n block1.writeUInt32BE(i, salt.length)\n\n var T = hmac.run(block1, hmac.ipad1)\n var U = T\n\n for (var j = 1; j < iterations; j++) {\n U = hmac.run(U, hmac.ipad2)\n for (var k = 0; k < hLen; k++) T[k] ^= U[k]\n }\n\n T.copy(DK, destPos)\n destPos += hLen\n }\n\n return DK\n}\n\nmodule.exports = pbkdf2\n","var Buffer = require('safe-buffer').Buffer\n\nmodule.exports = function (thing, encoding, name) {\n if (Buffer.isBuffer(thing)) {\n return thing\n } else if (typeof thing === 'string') {\n return Buffer.from(thing, encoding)\n } else if (ArrayBuffer.isView(thing)) {\n return Buffer.from(thing.buffer)\n } else {\n throw new TypeError(name + ' must be a string, a Buffer, a typed array or a DataView')\n }\n}\n","'use strict';\n\nif (typeof process === 'undefined' ||\n !process.version ||\n process.version.indexOf('v0.') === 0 ||\n process.version.indexOf('v1.') === 0 && process.version.indexOf('v1.8.') !== 0) {\n module.exports = { nextTick: nextTick };\n} else {\n module.exports = process\n}\n\nfunction nextTick(fn, arg1, arg2, arg3) {\n if (typeof fn !== 'function') {\n throw new TypeError('\"callback\" argument must be a function');\n }\n var len = arguments.length;\n var args, i;\n switch (len) {\n case 0:\n case 1:\n return process.nextTick(fn);\n case 2:\n return process.nextTick(function afterTickOne() {\n fn.call(null, arg1);\n });\n case 3:\n return process.nextTick(function afterTickTwo() {\n fn.call(null, arg1, arg2);\n });\n case 4:\n return process.nextTick(function afterTickThree() {\n fn.call(null, arg1, arg2, arg3);\n });\n default:\n args = new Array(len - 1);\n i = 0;\n while (i < args.length) {\n args[i++] = arguments[i];\n }\n return process.nextTick(function afterTick() {\n fn.apply(null, args);\n });\n }\n}\n\n","// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n throw new Error('clearTimeout has not been defined');\n}\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n} ())\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch(e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch(e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n\n\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\n\nprocess.listeners = function (name) { return [] }\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n","exports.publicEncrypt = require('./publicEncrypt')\nexports.privateDecrypt = require('./privateDecrypt')\n\nexports.privateEncrypt = function privateEncrypt (key, buf) {\n return exports.publicEncrypt(key, buf, true)\n}\n\nexports.publicDecrypt = function publicDecrypt (key, buf) {\n return exports.privateDecrypt(key, buf, true)\n}\n","var createHash = require('create-hash')\nvar Buffer = require('safe-buffer').Buffer\n\nmodule.exports = function (seed, len) {\n var t = Buffer.alloc(0)\n var i = 0\n var c\n while (t.length < len) {\n c = i2ops(i++)\n t = Buffer.concat([t, createHash('sha1').update(seed).update(c).digest()])\n }\n return t.slice(0, len)\n}\n\nfunction i2ops (c) {\n var out = Buffer.allocUnsafe(4)\n out.writeUInt32BE(c, 0)\n return out\n}\n","(function (module, exports) {\n 'use strict';\n\n // Utils\n function assert (val, msg) {\n if (!val) throw new Error(msg || 'Assertion failed');\n }\n\n // Could use `inherits` module, but don't want to move from single file\n // architecture yet.\n function inherits (ctor, superCtor) {\n ctor.super_ = superCtor;\n var TempCtor = function () {};\n TempCtor.prototype = superCtor.prototype;\n ctor.prototype = new TempCtor();\n ctor.prototype.constructor = ctor;\n }\n\n // BN\n\n function BN (number, base, endian) {\n if (BN.isBN(number)) {\n return number;\n }\n\n this.negative = 0;\n this.words = null;\n this.length = 0;\n\n // Reduction context\n this.red = null;\n\n if (number !== null) {\n if (base === 'le' || base === 'be') {\n endian = base;\n base = 10;\n }\n\n this._init(number || 0, base || 10, endian || 'be');\n }\n }\n if (typeof module === 'object') {\n module.exports = BN;\n } else {\n exports.BN = BN;\n }\n\n BN.BN = BN;\n BN.wordSize = 26;\n\n var Buffer;\n try {\n if (typeof window !== 'undefined' && typeof window.Buffer !== 'undefined') {\n Buffer = window.Buffer;\n } else {\n Buffer = require('buffer').Buffer;\n }\n } catch (e) {\n }\n\n BN.isBN = function isBN (num) {\n if (num instanceof BN) {\n return true;\n }\n\n return num !== null && typeof num === 'object' &&\n num.constructor.wordSize === BN.wordSize && Array.isArray(num.words);\n };\n\n BN.max = function max (left, right) {\n if (left.cmp(right) > 0) return left;\n return right;\n };\n\n BN.min = function min (left, right) {\n if (left.cmp(right) < 0) return left;\n return right;\n };\n\n BN.prototype._init = function init (number, base, endian) {\n if (typeof number === 'number') {\n return this._initNumber(number, base, endian);\n }\n\n if (typeof number === 'object') {\n return this._initArray(number, base, endian);\n }\n\n if (base === 'hex') {\n base = 16;\n }\n assert(base === (base | 0) && base >= 2 && base <= 36);\n\n number = number.toString().replace(/\\s+/g, '');\n var start = 0;\n if (number[0] === '-') {\n start++;\n this.negative = 1;\n }\n\n if (start < number.length) {\n if (base === 16) {\n this._parseHex(number, start, endian);\n } else {\n this._parseBase(number, base, start);\n if (endian === 'le') {\n this._initArray(this.toArray(), base, endian);\n }\n }\n }\n };\n\n BN.prototype._initNumber = function _initNumber (number, base, endian) {\n if (number < 0) {\n this.negative = 1;\n number = -number;\n }\n if (number < 0x4000000) {\n this.words = [ number & 0x3ffffff ];\n this.length = 1;\n } else if (number < 0x10000000000000) {\n this.words = [\n number & 0x3ffffff,\n (number / 0x4000000) & 0x3ffffff\n ];\n this.length = 2;\n } else {\n assert(number < 0x20000000000000); // 2 ^ 53 (unsafe)\n this.words = [\n number & 0x3ffffff,\n (number / 0x4000000) & 0x3ffffff,\n 1\n ];\n this.length = 3;\n }\n\n if (endian !== 'le') return;\n\n // Reverse the bytes\n this._initArray(this.toArray(), base, endian);\n };\n\n BN.prototype._initArray = function _initArray (number, base, endian) {\n // Perhaps a Uint8Array\n assert(typeof number.length === 'number');\n if (number.length <= 0) {\n this.words = [ 0 ];\n this.length = 1;\n return this;\n }\n\n this.length = Math.ceil(number.length / 3);\n this.words = new Array(this.length);\n for (var i = 0; i < this.length; i++) {\n this.words[i] = 0;\n }\n\n var j, w;\n var off = 0;\n if (endian === 'be') {\n for (i = number.length - 1, j = 0; i >= 0; i -= 3) {\n w = number[i] | (number[i - 1] << 8) | (number[i - 2] << 16);\n this.words[j] |= (w << off) & 0x3ffffff;\n this.words[j + 1] = (w >>> (26 - off)) & 0x3ffffff;\n off += 24;\n if (off >= 26) {\n off -= 26;\n j++;\n }\n }\n } else if (endian === 'le') {\n for (i = 0, j = 0; i < number.length; i += 3) {\n w = number[i] | (number[i + 1] << 8) | (number[i + 2] << 16);\n this.words[j] |= (w << off) & 0x3ffffff;\n this.words[j + 1] = (w >>> (26 - off)) & 0x3ffffff;\n off += 24;\n if (off >= 26) {\n off -= 26;\n j++;\n }\n }\n }\n return this.strip();\n };\n\n function parseHex4Bits (string, index) {\n var c = string.charCodeAt(index);\n // 'A' - 'F'\n if (c >= 65 && c <= 70) {\n return c - 55;\n // 'a' - 'f'\n } else if (c >= 97 && c <= 102) {\n return c - 87;\n // '0' - '9'\n } else {\n return (c - 48) & 0xf;\n }\n }\n\n function parseHexByte (string, lowerBound, index) {\n var r = parseHex4Bits(string, index);\n if (index - 1 >= lowerBound) {\n r |= parseHex4Bits(string, index - 1) << 4;\n }\n return r;\n }\n\n BN.prototype._parseHex = function _parseHex (number, start, endian) {\n // Create possibly bigger array to ensure that it fits the number\n this.length = Math.ceil((number.length - start) / 6);\n this.words = new Array(this.length);\n for (var i = 0; i < this.length; i++) {\n this.words[i] = 0;\n }\n\n // 24-bits chunks\n var off = 0;\n var j = 0;\n\n var w;\n if (endian === 'be') {\n for (i = number.length - 1; i >= start; i -= 2) {\n w = parseHexByte(number, start, i) << off;\n this.words[j] |= w & 0x3ffffff;\n if (off >= 18) {\n off -= 18;\n j += 1;\n this.words[j] |= w >>> 26;\n } else {\n off += 8;\n }\n }\n } else {\n var parseLength = number.length - start;\n for (i = parseLength % 2 === 0 ? start + 1 : start; i < number.length; i += 2) {\n w = parseHexByte(number, start, i) << off;\n this.words[j] |= w & 0x3ffffff;\n if (off >= 18) {\n off -= 18;\n j += 1;\n this.words[j] |= w >>> 26;\n } else {\n off += 8;\n }\n }\n }\n\n this.strip();\n };\n\n function parseBase (str, start, end, mul) {\n var r = 0;\n var len = Math.min(str.length, end);\n for (var i = start; i < len; i++) {\n var c = str.charCodeAt(i) - 48;\n\n r *= mul;\n\n // 'a'\n if (c >= 49) {\n r += c - 49 + 0xa;\n\n // 'A'\n } else if (c >= 17) {\n r += c - 17 + 0xa;\n\n // '0' - '9'\n } else {\n r += c;\n }\n }\n return r;\n }\n\n BN.prototype._parseBase = function _parseBase (number, base, start) {\n // Initialize as zero\n this.words = [ 0 ];\n this.length = 1;\n\n // Find length of limb in base\n for (var limbLen = 0, limbPow = 1; limbPow <= 0x3ffffff; limbPow *= base) {\n limbLen++;\n }\n limbLen--;\n limbPow = (limbPow / base) | 0;\n\n var total = number.length - start;\n var mod = total % limbLen;\n var end = Math.min(total, total - mod) + start;\n\n var word = 0;\n for (var i = start; i < end; i += limbLen) {\n word = parseBase(number, i, i + limbLen, base);\n\n this.imuln(limbPow);\n if (this.words[0] + word < 0x4000000) {\n this.words[0] += word;\n } else {\n this._iaddn(word);\n }\n }\n\n if (mod !== 0) {\n var pow = 1;\n word = parseBase(number, i, number.length, base);\n\n for (i = 0; i < mod; i++) {\n pow *= base;\n }\n\n this.imuln(pow);\n if (this.words[0] + word < 0x4000000) {\n this.words[0] += word;\n } else {\n this._iaddn(word);\n }\n }\n\n this.strip();\n };\n\n BN.prototype.copy = function copy (dest) {\n dest.words = new Array(this.length);\n for (var i = 0; i < this.length; i++) {\n dest.words[i] = this.words[i];\n }\n dest.length = this.length;\n dest.negative = this.negative;\n dest.red = this.red;\n };\n\n BN.prototype.clone = function clone () {\n var r = new BN(null);\n this.copy(r);\n return r;\n };\n\n BN.prototype._expand = function _expand (size) {\n while (this.length < size) {\n this.words[this.length++] = 0;\n }\n return this;\n };\n\n // Remove leading `0` from `this`\n BN.prototype.strip = function strip () {\n while (this.length > 1 && this.words[this.length - 1] === 0) {\n this.length--;\n }\n return this._normSign();\n };\n\n BN.prototype._normSign = function _normSign () {\n // -0 = 0\n if (this.length === 1 && this.words[0] === 0) {\n this.negative = 0;\n }\n return this;\n };\n\n BN.prototype.inspect = function inspect () {\n return (this.red ? '';\n };\n\n /*\n\n var zeros = [];\n var groupSizes = [];\n var groupBases = [];\n\n var s = '';\n var i = -1;\n while (++i < BN.wordSize) {\n zeros[i] = s;\n s += '0';\n }\n groupSizes[0] = 0;\n groupSizes[1] = 0;\n groupBases[0] = 0;\n groupBases[1] = 0;\n var base = 2 - 1;\n while (++base < 36 + 1) {\n var groupSize = 0;\n var groupBase = 1;\n while (groupBase < (1 << BN.wordSize) / base) {\n groupBase *= base;\n groupSize += 1;\n }\n groupSizes[base] = groupSize;\n groupBases[base] = groupBase;\n }\n\n */\n\n var zeros = [\n '',\n '0',\n '00',\n '000',\n '0000',\n '00000',\n '000000',\n '0000000',\n '00000000',\n '000000000',\n '0000000000',\n '00000000000',\n '000000000000',\n '0000000000000',\n '00000000000000',\n '000000000000000',\n '0000000000000000',\n '00000000000000000',\n '000000000000000000',\n '0000000000000000000',\n '00000000000000000000',\n '000000000000000000000',\n '0000000000000000000000',\n '00000000000000000000000',\n '000000000000000000000000',\n '0000000000000000000000000'\n ];\n\n var groupSizes = [\n 0, 0,\n 25, 16, 12, 11, 10, 9, 8,\n 8, 7, 7, 7, 7, 6, 6,\n 6, 6, 6, 6, 6, 5, 5,\n 5, 5, 5, 5, 5, 5, 5,\n 5, 5, 5, 5, 5, 5, 5\n ];\n\n var groupBases = [\n 0, 0,\n 33554432, 43046721, 16777216, 48828125, 60466176, 40353607, 16777216,\n 43046721, 10000000, 19487171, 35831808, 62748517, 7529536, 11390625,\n 16777216, 24137569, 34012224, 47045881, 64000000, 4084101, 5153632,\n 6436343, 7962624, 9765625, 11881376, 14348907, 17210368, 20511149,\n 24300000, 28629151, 33554432, 39135393, 45435424, 52521875, 60466176\n ];\n\n BN.prototype.toString = function toString (base, padding) {\n base = base || 10;\n padding = padding | 0 || 1;\n\n var out;\n if (base === 16 || base === 'hex') {\n out = '';\n var off = 0;\n var carry = 0;\n for (var i = 0; i < this.length; i++) {\n var w = this.words[i];\n var word = (((w << off) | carry) & 0xffffff).toString(16);\n carry = (w >>> (24 - off)) & 0xffffff;\n if (carry !== 0 || i !== this.length - 1) {\n out = zeros[6 - word.length] + word + out;\n } else {\n out = word + out;\n }\n off += 2;\n if (off >= 26) {\n off -= 26;\n i--;\n }\n }\n if (carry !== 0) {\n out = carry.toString(16) + out;\n }\n while (out.length % padding !== 0) {\n out = '0' + out;\n }\n if (this.negative !== 0) {\n out = '-' + out;\n }\n return out;\n }\n\n if (base === (base | 0) && base >= 2 && base <= 36) {\n // var groupSize = Math.floor(BN.wordSize * Math.LN2 / Math.log(base));\n var groupSize = groupSizes[base];\n // var groupBase = Math.pow(base, groupSize);\n var groupBase = groupBases[base];\n out = '';\n var c = this.clone();\n c.negative = 0;\n while (!c.isZero()) {\n var r = c.modn(groupBase).toString(base);\n c = c.idivn(groupBase);\n\n if (!c.isZero()) {\n out = zeros[groupSize - r.length] + r + out;\n } else {\n out = r + out;\n }\n }\n if (this.isZero()) {\n out = '0' + out;\n }\n while (out.length % padding !== 0) {\n out = '0' + out;\n }\n if (this.negative !== 0) {\n out = '-' + out;\n }\n return out;\n }\n\n assert(false, 'Base should be between 2 and 36');\n };\n\n BN.prototype.toNumber = function toNumber () {\n var ret = this.words[0];\n if (this.length === 2) {\n ret += this.words[1] * 0x4000000;\n } else if (this.length === 3 && this.words[2] === 0x01) {\n // NOTE: at this stage it is known that the top bit is set\n ret += 0x10000000000000 + (this.words[1] * 0x4000000);\n } else if (this.length > 2) {\n assert(false, 'Number can only safely store up to 53 bits');\n }\n return (this.negative !== 0) ? -ret : ret;\n };\n\n BN.prototype.toJSON = function toJSON () {\n return this.toString(16);\n };\n\n BN.prototype.toBuffer = function toBuffer (endian, length) {\n assert(typeof Buffer !== 'undefined');\n return this.toArrayLike(Buffer, endian, length);\n };\n\n BN.prototype.toArray = function toArray (endian, length) {\n return this.toArrayLike(Array, endian, length);\n };\n\n BN.prototype.toArrayLike = function toArrayLike (ArrayType, endian, length) {\n var byteLength = this.byteLength();\n var reqLength = length || Math.max(1, byteLength);\n assert(byteLength <= reqLength, 'byte array longer than desired length');\n assert(reqLength > 0, 'Requested array length <= 0');\n\n this.strip();\n var littleEndian = endian === 'le';\n var res = new ArrayType(reqLength);\n\n var b, i;\n var q = this.clone();\n if (!littleEndian) {\n // Assume big-endian\n for (i = 0; i < reqLength - byteLength; i++) {\n res[i] = 0;\n }\n\n for (i = 0; !q.isZero(); i++) {\n b = q.andln(0xff);\n q.iushrn(8);\n\n res[reqLength - i - 1] = b;\n }\n } else {\n for (i = 0; !q.isZero(); i++) {\n b = q.andln(0xff);\n q.iushrn(8);\n\n res[i] = b;\n }\n\n for (; i < reqLength; i++) {\n res[i] = 0;\n }\n }\n\n return res;\n };\n\n if (Math.clz32) {\n BN.prototype._countBits = function _countBits (w) {\n return 32 - Math.clz32(w);\n };\n } else {\n BN.prototype._countBits = function _countBits (w) {\n var t = w;\n var r = 0;\n if (t >= 0x1000) {\n r += 13;\n t >>>= 13;\n }\n if (t >= 0x40) {\n r += 7;\n t >>>= 7;\n }\n if (t >= 0x8) {\n r += 4;\n t >>>= 4;\n }\n if (t >= 0x02) {\n r += 2;\n t >>>= 2;\n }\n return r + t;\n };\n }\n\n BN.prototype._zeroBits = function _zeroBits (w) {\n // Short-cut\n if (w === 0) return 26;\n\n var t = w;\n var r = 0;\n if ((t & 0x1fff) === 0) {\n r += 13;\n t >>>= 13;\n }\n if ((t & 0x7f) === 0) {\n r += 7;\n t >>>= 7;\n }\n if ((t & 0xf) === 0) {\n r += 4;\n t >>>= 4;\n }\n if ((t & 0x3) === 0) {\n r += 2;\n t >>>= 2;\n }\n if ((t & 0x1) === 0) {\n r++;\n }\n return r;\n };\n\n // Return number of used bits in a BN\n BN.prototype.bitLength = function bitLength () {\n var w = this.words[this.length - 1];\n var hi = this._countBits(w);\n return (this.length - 1) * 26 + hi;\n };\n\n function toBitArray (num) {\n var w = new Array(num.bitLength());\n\n for (var bit = 0; bit < w.length; bit++) {\n var off = (bit / 26) | 0;\n var wbit = bit % 26;\n\n w[bit] = (num.words[off] & (1 << wbit)) >>> wbit;\n }\n\n return w;\n }\n\n // Number of trailing zero bits\n BN.prototype.zeroBits = function zeroBits () {\n if (this.isZero()) return 0;\n\n var r = 0;\n for (var i = 0; i < this.length; i++) {\n var b = this._zeroBits(this.words[i]);\n r += b;\n if (b !== 26) break;\n }\n return r;\n };\n\n BN.prototype.byteLength = function byteLength () {\n return Math.ceil(this.bitLength() / 8);\n };\n\n BN.prototype.toTwos = function toTwos (width) {\n if (this.negative !== 0) {\n return this.abs().inotn(width).iaddn(1);\n }\n return this.clone();\n };\n\n BN.prototype.fromTwos = function fromTwos (width) {\n if (this.testn(width - 1)) {\n return this.notn(width).iaddn(1).ineg();\n }\n return this.clone();\n };\n\n BN.prototype.isNeg = function isNeg () {\n return this.negative !== 0;\n };\n\n // Return negative clone of `this`\n BN.prototype.neg = function neg () {\n return this.clone().ineg();\n };\n\n BN.prototype.ineg = function ineg () {\n if (!this.isZero()) {\n this.negative ^= 1;\n }\n\n return this;\n };\n\n // Or `num` with `this` in-place\n BN.prototype.iuor = function iuor (num) {\n while (this.length < num.length) {\n this.words[this.length++] = 0;\n }\n\n for (var i = 0; i < num.length; i++) {\n this.words[i] = this.words[i] | num.words[i];\n }\n\n return this.strip();\n };\n\n BN.prototype.ior = function ior (num) {\n assert((this.negative | num.negative) === 0);\n return this.iuor(num);\n };\n\n // Or `num` with `this`\n BN.prototype.or = function or (num) {\n if (this.length > num.length) return this.clone().ior(num);\n return num.clone().ior(this);\n };\n\n BN.prototype.uor = function uor (num) {\n if (this.length > num.length) return this.clone().iuor(num);\n return num.clone().iuor(this);\n };\n\n // And `num` with `this` in-place\n BN.prototype.iuand = function iuand (num) {\n // b = min-length(num, this)\n var b;\n if (this.length > num.length) {\n b = num;\n } else {\n b = this;\n }\n\n for (var i = 0; i < b.length; i++) {\n this.words[i] = this.words[i] & num.words[i];\n }\n\n this.length = b.length;\n\n return this.strip();\n };\n\n BN.prototype.iand = function iand (num) {\n assert((this.negative | num.negative) === 0);\n return this.iuand(num);\n };\n\n // And `num` with `this`\n BN.prototype.and = function and (num) {\n if (this.length > num.length) return this.clone().iand(num);\n return num.clone().iand(this);\n };\n\n BN.prototype.uand = function uand (num) {\n if (this.length > num.length) return this.clone().iuand(num);\n return num.clone().iuand(this);\n };\n\n // Xor `num` with `this` in-place\n BN.prototype.iuxor = function iuxor (num) {\n // a.length > b.length\n var a;\n var b;\n if (this.length > num.length) {\n a = this;\n b = num;\n } else {\n a = num;\n b = this;\n }\n\n for (var i = 0; i < b.length; i++) {\n this.words[i] = a.words[i] ^ b.words[i];\n }\n\n if (this !== a) {\n for (; i < a.length; i++) {\n this.words[i] = a.words[i];\n }\n }\n\n this.length = a.length;\n\n return this.strip();\n };\n\n BN.prototype.ixor = function ixor (num) {\n assert((this.negative | num.negative) === 0);\n return this.iuxor(num);\n };\n\n // Xor `num` with `this`\n BN.prototype.xor = function xor (num) {\n if (this.length > num.length) return this.clone().ixor(num);\n return num.clone().ixor(this);\n };\n\n BN.prototype.uxor = function uxor (num) {\n if (this.length > num.length) return this.clone().iuxor(num);\n return num.clone().iuxor(this);\n };\n\n // Not ``this`` with ``width`` bitwidth\n BN.prototype.inotn = function inotn (width) {\n assert(typeof width === 'number' && width >= 0);\n\n var bytesNeeded = Math.ceil(width / 26) | 0;\n var bitsLeft = width % 26;\n\n // Extend the buffer with leading zeroes\n this._expand(bytesNeeded);\n\n if (bitsLeft > 0) {\n bytesNeeded--;\n }\n\n // Handle complete words\n for (var i = 0; i < bytesNeeded; i++) {\n this.words[i] = ~this.words[i] & 0x3ffffff;\n }\n\n // Handle the residue\n if (bitsLeft > 0) {\n this.words[i] = ~this.words[i] & (0x3ffffff >> (26 - bitsLeft));\n }\n\n // And remove leading zeroes\n return this.strip();\n };\n\n BN.prototype.notn = function notn (width) {\n return this.clone().inotn(width);\n };\n\n // Set `bit` of `this`\n BN.prototype.setn = function setn (bit, val) {\n assert(typeof bit === 'number' && bit >= 0);\n\n var off = (bit / 26) | 0;\n var wbit = bit % 26;\n\n this._expand(off + 1);\n\n if (val) {\n this.words[off] = this.words[off] | (1 << wbit);\n } else {\n this.words[off] = this.words[off] & ~(1 << wbit);\n }\n\n return this.strip();\n };\n\n // Add `num` to `this` in-place\n BN.prototype.iadd = function iadd (num) {\n var r;\n\n // negative + positive\n if (this.negative !== 0 && num.negative === 0) {\n this.negative = 0;\n r = this.isub(num);\n this.negative ^= 1;\n return this._normSign();\n\n // positive + negative\n } else if (this.negative === 0 && num.negative !== 0) {\n num.negative = 0;\n r = this.isub(num);\n num.negative = 1;\n return r._normSign();\n }\n\n // a.length > b.length\n var a, b;\n if (this.length > num.length) {\n a = this;\n b = num;\n } else {\n a = num;\n b = this;\n }\n\n var carry = 0;\n for (var i = 0; i < b.length; i++) {\n r = (a.words[i] | 0) + (b.words[i] | 0) + carry;\n this.words[i] = r & 0x3ffffff;\n carry = r >>> 26;\n }\n for (; carry !== 0 && i < a.length; i++) {\n r = (a.words[i] | 0) + carry;\n this.words[i] = r & 0x3ffffff;\n carry = r >>> 26;\n }\n\n this.length = a.length;\n if (carry !== 0) {\n this.words[this.length] = carry;\n this.length++;\n // Copy the rest of the words\n } else if (a !== this) {\n for (; i < a.length; i++) {\n this.words[i] = a.words[i];\n }\n }\n\n return this;\n };\n\n // Add `num` to `this`\n BN.prototype.add = function add (num) {\n var res;\n if (num.negative !== 0 && this.negative === 0) {\n num.negative = 0;\n res = this.sub(num);\n num.negative ^= 1;\n return res;\n } else if (num.negative === 0 && this.negative !== 0) {\n this.negative = 0;\n res = num.sub(this);\n this.negative = 1;\n return res;\n }\n\n if (this.length > num.length) return this.clone().iadd(num);\n\n return num.clone().iadd(this);\n };\n\n // Subtract `num` from `this` in-place\n BN.prototype.isub = function isub (num) {\n // this - (-num) = this + num\n if (num.negative !== 0) {\n num.negative = 0;\n var r = this.iadd(num);\n num.negative = 1;\n return r._normSign();\n\n // -this - num = -(this + num)\n } else if (this.negative !== 0) {\n this.negative = 0;\n this.iadd(num);\n this.negative = 1;\n return this._normSign();\n }\n\n // At this point both numbers are positive\n var cmp = this.cmp(num);\n\n // Optimization - zeroify\n if (cmp === 0) {\n this.negative = 0;\n this.length = 1;\n this.words[0] = 0;\n return this;\n }\n\n // a > b\n var a, b;\n if (cmp > 0) {\n a = this;\n b = num;\n } else {\n a = num;\n b = this;\n }\n\n var carry = 0;\n for (var i = 0; i < b.length; i++) {\n r = (a.words[i] | 0) - (b.words[i] | 0) + carry;\n carry = r >> 26;\n this.words[i] = r & 0x3ffffff;\n }\n for (; carry !== 0 && i < a.length; i++) {\n r = (a.words[i] | 0) + carry;\n carry = r >> 26;\n this.words[i] = r & 0x3ffffff;\n }\n\n // Copy rest of the words\n if (carry === 0 && i < a.length && a !== this) {\n for (; i < a.length; i++) {\n this.words[i] = a.words[i];\n }\n }\n\n this.length = Math.max(this.length, i);\n\n if (a !== this) {\n this.negative = 1;\n }\n\n return this.strip();\n };\n\n // Subtract `num` from `this`\n BN.prototype.sub = function sub (num) {\n return this.clone().isub(num);\n };\n\n function smallMulTo (self, num, out) {\n out.negative = num.negative ^ self.negative;\n var len = (self.length + num.length) | 0;\n out.length = len;\n len = (len - 1) | 0;\n\n // Peel one iteration (compiler can't do it, because of code complexity)\n var a = self.words[0] | 0;\n var b = num.words[0] | 0;\n var r = a * b;\n\n var lo = r & 0x3ffffff;\n var carry = (r / 0x4000000) | 0;\n out.words[0] = lo;\n\n for (var k = 1; k < len; k++) {\n // Sum all words with the same `i + j = k` and accumulate `ncarry`,\n // note that ncarry could be >= 0x3ffffff\n var ncarry = carry >>> 26;\n var rword = carry & 0x3ffffff;\n var maxJ = Math.min(k, num.length - 1);\n for (var j = Math.max(0, k - self.length + 1); j <= maxJ; j++) {\n var i = (k - j) | 0;\n a = self.words[i] | 0;\n b = num.words[j] | 0;\n r = a * b + rword;\n ncarry += (r / 0x4000000) | 0;\n rword = r & 0x3ffffff;\n }\n out.words[k] = rword | 0;\n carry = ncarry | 0;\n }\n if (carry !== 0) {\n out.words[k] = carry | 0;\n } else {\n out.length--;\n }\n\n return out.strip();\n }\n\n // TODO(indutny): it may be reasonable to omit it for users who don't need\n // to work with 256-bit numbers, otherwise it gives 20% improvement for 256-bit\n // multiplication (like elliptic secp256k1).\n var comb10MulTo = function comb10MulTo (self, num, out) {\n var a = self.words;\n var b = num.words;\n var o = out.words;\n var c = 0;\n var lo;\n var mid;\n var hi;\n var a0 = a[0] | 0;\n var al0 = a0 & 0x1fff;\n var ah0 = a0 >>> 13;\n var a1 = a[1] | 0;\n var al1 = a1 & 0x1fff;\n var ah1 = a1 >>> 13;\n var a2 = a[2] | 0;\n var al2 = a2 & 0x1fff;\n var ah2 = a2 >>> 13;\n var a3 = a[3] | 0;\n var al3 = a3 & 0x1fff;\n var ah3 = a3 >>> 13;\n var a4 = a[4] | 0;\n var al4 = a4 & 0x1fff;\n var ah4 = a4 >>> 13;\n var a5 = a[5] | 0;\n var al5 = a5 & 0x1fff;\n var ah5 = a5 >>> 13;\n var a6 = a[6] | 0;\n var al6 = a6 & 0x1fff;\n var ah6 = a6 >>> 13;\n var a7 = a[7] | 0;\n var al7 = a7 & 0x1fff;\n var ah7 = a7 >>> 13;\n var a8 = a[8] | 0;\n var al8 = a8 & 0x1fff;\n var ah8 = a8 >>> 13;\n var a9 = a[9] | 0;\n var al9 = a9 & 0x1fff;\n var ah9 = a9 >>> 13;\n var b0 = b[0] | 0;\n var bl0 = b0 & 0x1fff;\n var bh0 = b0 >>> 13;\n var b1 = b[1] | 0;\n var bl1 = b1 & 0x1fff;\n var bh1 = b1 >>> 13;\n var b2 = b[2] | 0;\n var bl2 = b2 & 0x1fff;\n var bh2 = b2 >>> 13;\n var b3 = b[3] | 0;\n var bl3 = b3 & 0x1fff;\n var bh3 = b3 >>> 13;\n var b4 = b[4] | 0;\n var bl4 = b4 & 0x1fff;\n var bh4 = b4 >>> 13;\n var b5 = b[5] | 0;\n var bl5 = b5 & 0x1fff;\n var bh5 = b5 >>> 13;\n var b6 = b[6] | 0;\n var bl6 = b6 & 0x1fff;\n var bh6 = b6 >>> 13;\n var b7 = b[7] | 0;\n var bl7 = b7 & 0x1fff;\n var bh7 = b7 >>> 13;\n var b8 = b[8] | 0;\n var bl8 = b8 & 0x1fff;\n var bh8 = b8 >>> 13;\n var b9 = b[9] | 0;\n var bl9 = b9 & 0x1fff;\n var bh9 = b9 >>> 13;\n\n out.negative = self.negative ^ num.negative;\n out.length = 19;\n /* k = 0 */\n lo = Math.imul(al0, bl0);\n mid = Math.imul(al0, bh0);\n mid = (mid + Math.imul(ah0, bl0)) | 0;\n hi = Math.imul(ah0, bh0);\n var w0 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w0 >>> 26)) | 0;\n w0 &= 0x3ffffff;\n /* k = 1 */\n lo = Math.imul(al1, bl0);\n mid = Math.imul(al1, bh0);\n mid = (mid + Math.imul(ah1, bl0)) | 0;\n hi = Math.imul(ah1, bh0);\n lo = (lo + Math.imul(al0, bl1)) | 0;\n mid = (mid + Math.imul(al0, bh1)) | 0;\n mid = (mid + Math.imul(ah0, bl1)) | 0;\n hi = (hi + Math.imul(ah0, bh1)) | 0;\n var w1 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w1 >>> 26)) | 0;\n w1 &= 0x3ffffff;\n /* k = 2 */\n lo = Math.imul(al2, bl0);\n mid = Math.imul(al2, bh0);\n mid = (mid + Math.imul(ah2, bl0)) | 0;\n hi = Math.imul(ah2, bh0);\n lo = (lo + Math.imul(al1, bl1)) | 0;\n mid = (mid + Math.imul(al1, bh1)) | 0;\n mid = (mid + Math.imul(ah1, bl1)) | 0;\n hi = (hi + Math.imul(ah1, bh1)) | 0;\n lo = (lo + Math.imul(al0, bl2)) | 0;\n mid = (mid + Math.imul(al0, bh2)) | 0;\n mid = (mid + Math.imul(ah0, bl2)) | 0;\n hi = (hi + Math.imul(ah0, bh2)) | 0;\n var w2 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w2 >>> 26)) | 0;\n w2 &= 0x3ffffff;\n /* k = 3 */\n lo = Math.imul(al3, bl0);\n mid = Math.imul(al3, bh0);\n mid = (mid + Math.imul(ah3, bl0)) | 0;\n hi = Math.imul(ah3, bh0);\n lo = (lo + Math.imul(al2, bl1)) | 0;\n mid = (mid + Math.imul(al2, bh1)) | 0;\n mid = (mid + Math.imul(ah2, bl1)) | 0;\n hi = (hi + Math.imul(ah2, bh1)) | 0;\n lo = (lo + Math.imul(al1, bl2)) | 0;\n mid = (mid + Math.imul(al1, bh2)) | 0;\n mid = (mid + Math.imul(ah1, bl2)) | 0;\n hi = (hi + Math.imul(ah1, bh2)) | 0;\n lo = (lo + Math.imul(al0, bl3)) | 0;\n mid = (mid + Math.imul(al0, bh3)) | 0;\n mid = (mid + Math.imul(ah0, bl3)) | 0;\n hi = (hi + Math.imul(ah0, bh3)) | 0;\n var w3 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w3 >>> 26)) | 0;\n w3 &= 0x3ffffff;\n /* k = 4 */\n lo = Math.imul(al4, bl0);\n mid = Math.imul(al4, bh0);\n mid = (mid + Math.imul(ah4, bl0)) | 0;\n hi = Math.imul(ah4, bh0);\n lo = (lo + Math.imul(al3, bl1)) | 0;\n mid = (mid + Math.imul(al3, bh1)) | 0;\n mid = (mid + Math.imul(ah3, bl1)) | 0;\n hi = (hi + Math.imul(ah3, bh1)) | 0;\n lo = (lo + Math.imul(al2, bl2)) | 0;\n mid = (mid + Math.imul(al2, bh2)) | 0;\n mid = (mid + Math.imul(ah2, bl2)) | 0;\n hi = (hi + Math.imul(ah2, bh2)) | 0;\n lo = (lo + Math.imul(al1, bl3)) | 0;\n mid = (mid + Math.imul(al1, bh3)) | 0;\n mid = (mid + Math.imul(ah1, bl3)) | 0;\n hi = (hi + Math.imul(ah1, bh3)) | 0;\n lo = (lo + Math.imul(al0, bl4)) | 0;\n mid = (mid + Math.imul(al0, bh4)) | 0;\n mid = (mid + Math.imul(ah0, bl4)) | 0;\n hi = (hi + Math.imul(ah0, bh4)) | 0;\n var w4 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w4 >>> 26)) | 0;\n w4 &= 0x3ffffff;\n /* k = 5 */\n lo = Math.imul(al5, bl0);\n mid = Math.imul(al5, bh0);\n mid = (mid + Math.imul(ah5, bl0)) | 0;\n hi = Math.imul(ah5, bh0);\n lo = (lo + Math.imul(al4, bl1)) | 0;\n mid = (mid + Math.imul(al4, bh1)) | 0;\n mid = (mid + Math.imul(ah4, bl1)) | 0;\n hi = (hi + Math.imul(ah4, bh1)) | 0;\n lo = (lo + Math.imul(al3, bl2)) | 0;\n mid = (mid + Math.imul(al3, bh2)) | 0;\n mid = (mid + Math.imul(ah3, bl2)) | 0;\n hi = (hi + Math.imul(ah3, bh2)) | 0;\n lo = (lo + Math.imul(al2, bl3)) | 0;\n mid = (mid + Math.imul(al2, bh3)) | 0;\n mid = (mid + Math.imul(ah2, bl3)) | 0;\n hi = (hi + Math.imul(ah2, bh3)) | 0;\n lo = (lo + Math.imul(al1, bl4)) | 0;\n mid = (mid + Math.imul(al1, bh4)) | 0;\n mid = (mid + Math.imul(ah1, bl4)) | 0;\n hi = (hi + Math.imul(ah1, bh4)) | 0;\n lo = (lo + Math.imul(al0, bl5)) | 0;\n mid = (mid + Math.imul(al0, bh5)) | 0;\n mid = (mid + Math.imul(ah0, bl5)) | 0;\n hi = (hi + Math.imul(ah0, bh5)) | 0;\n var w5 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w5 >>> 26)) | 0;\n w5 &= 0x3ffffff;\n /* k = 6 */\n lo = Math.imul(al6, bl0);\n mid = Math.imul(al6, bh0);\n mid = (mid + Math.imul(ah6, bl0)) | 0;\n hi = Math.imul(ah6, bh0);\n lo = (lo + Math.imul(al5, bl1)) | 0;\n mid = (mid + Math.imul(al5, bh1)) | 0;\n mid = (mid + Math.imul(ah5, bl1)) | 0;\n hi = (hi + Math.imul(ah5, bh1)) | 0;\n lo = (lo + Math.imul(al4, bl2)) | 0;\n mid = (mid + Math.imul(al4, bh2)) | 0;\n mid = (mid + Math.imul(ah4, bl2)) | 0;\n hi = (hi + Math.imul(ah4, bh2)) | 0;\n lo = (lo + Math.imul(al3, bl3)) | 0;\n mid = (mid + Math.imul(al3, bh3)) | 0;\n mid = (mid + Math.imul(ah3, bl3)) | 0;\n hi = (hi + Math.imul(ah3, bh3)) | 0;\n lo = (lo + Math.imul(al2, bl4)) | 0;\n mid = (mid + Math.imul(al2, bh4)) | 0;\n mid = (mid + Math.imul(ah2, bl4)) | 0;\n hi = (hi + Math.imul(ah2, bh4)) | 0;\n lo = (lo + Math.imul(al1, bl5)) | 0;\n mid = (mid + Math.imul(al1, bh5)) | 0;\n mid = (mid + Math.imul(ah1, bl5)) | 0;\n hi = (hi + Math.imul(ah1, bh5)) | 0;\n lo = (lo + Math.imul(al0, bl6)) | 0;\n mid = (mid + Math.imul(al0, bh6)) | 0;\n mid = (mid + Math.imul(ah0, bl6)) | 0;\n hi = (hi + Math.imul(ah0, bh6)) | 0;\n var w6 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w6 >>> 26)) | 0;\n w6 &= 0x3ffffff;\n /* k = 7 */\n lo = Math.imul(al7, bl0);\n mid = Math.imul(al7, bh0);\n mid = (mid + Math.imul(ah7, bl0)) | 0;\n hi = Math.imul(ah7, bh0);\n lo = (lo + Math.imul(al6, bl1)) | 0;\n mid = (mid + Math.imul(al6, bh1)) | 0;\n mid = (mid + Math.imul(ah6, bl1)) | 0;\n hi = (hi + Math.imul(ah6, bh1)) | 0;\n lo = (lo + Math.imul(al5, bl2)) | 0;\n mid = (mid + Math.imul(al5, bh2)) | 0;\n mid = (mid + Math.imul(ah5, bl2)) | 0;\n hi = (hi + Math.imul(ah5, bh2)) | 0;\n lo = (lo + Math.imul(al4, bl3)) | 0;\n mid = (mid + Math.imul(al4, bh3)) | 0;\n mid = (mid + Math.imul(ah4, bl3)) | 0;\n hi = (hi + Math.imul(ah4, bh3)) | 0;\n lo = (lo + Math.imul(al3, bl4)) | 0;\n mid = (mid + Math.imul(al3, bh4)) | 0;\n mid = (mid + Math.imul(ah3, bl4)) | 0;\n hi = (hi + Math.imul(ah3, bh4)) | 0;\n lo = (lo + Math.imul(al2, bl5)) | 0;\n mid = (mid + Math.imul(al2, bh5)) | 0;\n mid = (mid + Math.imul(ah2, bl5)) | 0;\n hi = (hi + Math.imul(ah2, bh5)) | 0;\n lo = (lo + Math.imul(al1, bl6)) | 0;\n mid = (mid + Math.imul(al1, bh6)) | 0;\n mid = (mid + Math.imul(ah1, bl6)) | 0;\n hi = (hi + Math.imul(ah1, bh6)) | 0;\n lo = (lo + Math.imul(al0, bl7)) | 0;\n mid = (mid + Math.imul(al0, bh7)) | 0;\n mid = (mid + Math.imul(ah0, bl7)) | 0;\n hi = (hi + Math.imul(ah0, bh7)) | 0;\n var w7 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w7 >>> 26)) | 0;\n w7 &= 0x3ffffff;\n /* k = 8 */\n lo = Math.imul(al8, bl0);\n mid = Math.imul(al8, bh0);\n mid = (mid + Math.imul(ah8, bl0)) | 0;\n hi = Math.imul(ah8, bh0);\n lo = (lo + Math.imul(al7, bl1)) | 0;\n mid = (mid + Math.imul(al7, bh1)) | 0;\n mid = (mid + Math.imul(ah7, bl1)) | 0;\n hi = (hi + Math.imul(ah7, bh1)) | 0;\n lo = (lo + Math.imul(al6, bl2)) | 0;\n mid = (mid + Math.imul(al6, bh2)) | 0;\n mid = (mid + Math.imul(ah6, bl2)) | 0;\n hi = (hi + Math.imul(ah6, bh2)) | 0;\n lo = (lo + Math.imul(al5, bl3)) | 0;\n mid = (mid + Math.imul(al5, bh3)) | 0;\n mid = (mid + Math.imul(ah5, bl3)) | 0;\n hi = (hi + Math.imul(ah5, bh3)) | 0;\n lo = (lo + Math.imul(al4, bl4)) | 0;\n mid = (mid + Math.imul(al4, bh4)) | 0;\n mid = (mid + Math.imul(ah4, bl4)) | 0;\n hi = (hi + Math.imul(ah4, bh4)) | 0;\n lo = (lo + Math.imul(al3, bl5)) | 0;\n mid = (mid + Math.imul(al3, bh5)) | 0;\n mid = (mid + Math.imul(ah3, bl5)) | 0;\n hi = (hi + Math.imul(ah3, bh5)) | 0;\n lo = (lo + Math.imul(al2, bl6)) | 0;\n mid = (mid + Math.imul(al2, bh6)) | 0;\n mid = (mid + Math.imul(ah2, bl6)) | 0;\n hi = (hi + Math.imul(ah2, bh6)) | 0;\n lo = (lo + Math.imul(al1, bl7)) | 0;\n mid = (mid + Math.imul(al1, bh7)) | 0;\n mid = (mid + Math.imul(ah1, bl7)) | 0;\n hi = (hi + Math.imul(ah1, bh7)) | 0;\n lo = (lo + Math.imul(al0, bl8)) | 0;\n mid = (mid + Math.imul(al0, bh8)) | 0;\n mid = (mid + Math.imul(ah0, bl8)) | 0;\n hi = (hi + Math.imul(ah0, bh8)) | 0;\n var w8 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w8 >>> 26)) | 0;\n w8 &= 0x3ffffff;\n /* k = 9 */\n lo = Math.imul(al9, bl0);\n mid = Math.imul(al9, bh0);\n mid = (mid + Math.imul(ah9, bl0)) | 0;\n hi = Math.imul(ah9, bh0);\n lo = (lo + Math.imul(al8, bl1)) | 0;\n mid = (mid + Math.imul(al8, bh1)) | 0;\n mid = (mid + Math.imul(ah8, bl1)) | 0;\n hi = (hi + Math.imul(ah8, bh1)) | 0;\n lo = (lo + Math.imul(al7, bl2)) | 0;\n mid = (mid + Math.imul(al7, bh2)) | 0;\n mid = (mid + Math.imul(ah7, bl2)) | 0;\n hi = (hi + Math.imul(ah7, bh2)) | 0;\n lo = (lo + Math.imul(al6, bl3)) | 0;\n mid = (mid + Math.imul(al6, bh3)) | 0;\n mid = (mid + Math.imul(ah6, bl3)) | 0;\n hi = (hi + Math.imul(ah6, bh3)) | 0;\n lo = (lo + Math.imul(al5, bl4)) | 0;\n mid = (mid + Math.imul(al5, bh4)) | 0;\n mid = (mid + Math.imul(ah5, bl4)) | 0;\n hi = (hi + Math.imul(ah5, bh4)) | 0;\n lo = (lo + Math.imul(al4, bl5)) | 0;\n mid = (mid + Math.imul(al4, bh5)) | 0;\n mid = (mid + Math.imul(ah4, bl5)) | 0;\n hi = (hi + Math.imul(ah4, bh5)) | 0;\n lo = (lo + Math.imul(al3, bl6)) | 0;\n mid = (mid + Math.imul(al3, bh6)) | 0;\n mid = (mid + Math.imul(ah3, bl6)) | 0;\n hi = (hi + Math.imul(ah3, bh6)) | 0;\n lo = (lo + Math.imul(al2, bl7)) | 0;\n mid = (mid + Math.imul(al2, bh7)) | 0;\n mid = (mid + Math.imul(ah2, bl7)) | 0;\n hi = (hi + Math.imul(ah2, bh7)) | 0;\n lo = (lo + Math.imul(al1, bl8)) | 0;\n mid = (mid + Math.imul(al1, bh8)) | 0;\n mid = (mid + Math.imul(ah1, bl8)) | 0;\n hi = (hi + Math.imul(ah1, bh8)) | 0;\n lo = (lo + Math.imul(al0, bl9)) | 0;\n mid = (mid + Math.imul(al0, bh9)) | 0;\n mid = (mid + Math.imul(ah0, bl9)) | 0;\n hi = (hi + Math.imul(ah0, bh9)) | 0;\n var w9 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w9 >>> 26)) | 0;\n w9 &= 0x3ffffff;\n /* k = 10 */\n lo = Math.imul(al9, bl1);\n mid = Math.imul(al9, bh1);\n mid = (mid + Math.imul(ah9, bl1)) | 0;\n hi = Math.imul(ah9, bh1);\n lo = (lo + Math.imul(al8, bl2)) | 0;\n mid = (mid + Math.imul(al8, bh2)) | 0;\n mid = (mid + Math.imul(ah8, bl2)) | 0;\n hi = (hi + Math.imul(ah8, bh2)) | 0;\n lo = (lo + Math.imul(al7, bl3)) | 0;\n mid = (mid + Math.imul(al7, bh3)) | 0;\n mid = (mid + Math.imul(ah7, bl3)) | 0;\n hi = (hi + Math.imul(ah7, bh3)) | 0;\n lo = (lo + Math.imul(al6, bl4)) | 0;\n mid = (mid + Math.imul(al6, bh4)) | 0;\n mid = (mid + Math.imul(ah6, bl4)) | 0;\n hi = (hi + Math.imul(ah6, bh4)) | 0;\n lo = (lo + Math.imul(al5, bl5)) | 0;\n mid = (mid + Math.imul(al5, bh5)) | 0;\n mid = (mid + Math.imul(ah5, bl5)) | 0;\n hi = (hi + Math.imul(ah5, bh5)) | 0;\n lo = (lo + Math.imul(al4, bl6)) | 0;\n mid = (mid + Math.imul(al4, bh6)) | 0;\n mid = (mid + Math.imul(ah4, bl6)) | 0;\n hi = (hi + Math.imul(ah4, bh6)) | 0;\n lo = (lo + Math.imul(al3, bl7)) | 0;\n mid = (mid + Math.imul(al3, bh7)) | 0;\n mid = (mid + Math.imul(ah3, bl7)) | 0;\n hi = (hi + Math.imul(ah3, bh7)) | 0;\n lo = (lo + Math.imul(al2, bl8)) | 0;\n mid = (mid + Math.imul(al2, bh8)) | 0;\n mid = (mid + Math.imul(ah2, bl8)) | 0;\n hi = (hi + Math.imul(ah2, bh8)) | 0;\n lo = (lo + Math.imul(al1, bl9)) | 0;\n mid = (mid + Math.imul(al1, bh9)) | 0;\n mid = (mid + Math.imul(ah1, bl9)) | 0;\n hi = (hi + Math.imul(ah1, bh9)) | 0;\n var w10 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w10 >>> 26)) | 0;\n w10 &= 0x3ffffff;\n /* k = 11 */\n lo = Math.imul(al9, bl2);\n mid = Math.imul(al9, bh2);\n mid = (mid + Math.imul(ah9, bl2)) | 0;\n hi = Math.imul(ah9, bh2);\n lo = (lo + Math.imul(al8, bl3)) | 0;\n mid = (mid + Math.imul(al8, bh3)) | 0;\n mid = (mid + Math.imul(ah8, bl3)) | 0;\n hi = (hi + Math.imul(ah8, bh3)) | 0;\n lo = (lo + Math.imul(al7, bl4)) | 0;\n mid = (mid + Math.imul(al7, bh4)) | 0;\n mid = (mid + Math.imul(ah7, bl4)) | 0;\n hi = (hi + Math.imul(ah7, bh4)) | 0;\n lo = (lo + Math.imul(al6, bl5)) | 0;\n mid = (mid + Math.imul(al6, bh5)) | 0;\n mid = (mid + Math.imul(ah6, bl5)) | 0;\n hi = (hi + Math.imul(ah6, bh5)) | 0;\n lo = (lo + Math.imul(al5, bl6)) | 0;\n mid = (mid + Math.imul(al5, bh6)) | 0;\n mid = (mid + Math.imul(ah5, bl6)) | 0;\n hi = (hi + Math.imul(ah5, bh6)) | 0;\n lo = (lo + Math.imul(al4, bl7)) | 0;\n mid = (mid + Math.imul(al4, bh7)) | 0;\n mid = (mid + Math.imul(ah4, bl7)) | 0;\n hi = (hi + Math.imul(ah4, bh7)) | 0;\n lo = (lo + Math.imul(al3, bl8)) | 0;\n mid = (mid + Math.imul(al3, bh8)) | 0;\n mid = (mid + Math.imul(ah3, bl8)) | 0;\n hi = (hi + Math.imul(ah3, bh8)) | 0;\n lo = (lo + Math.imul(al2, bl9)) | 0;\n mid = (mid + Math.imul(al2, bh9)) | 0;\n mid = (mid + Math.imul(ah2, bl9)) | 0;\n hi = (hi + Math.imul(ah2, bh9)) | 0;\n var w11 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w11 >>> 26)) | 0;\n w11 &= 0x3ffffff;\n /* k = 12 */\n lo = Math.imul(al9, bl3);\n mid = Math.imul(al9, bh3);\n mid = (mid + Math.imul(ah9, bl3)) | 0;\n hi = Math.imul(ah9, bh3);\n lo = (lo + Math.imul(al8, bl4)) | 0;\n mid = (mid + Math.imul(al8, bh4)) | 0;\n mid = (mid + Math.imul(ah8, bl4)) | 0;\n hi = (hi + Math.imul(ah8, bh4)) | 0;\n lo = (lo + Math.imul(al7, bl5)) | 0;\n mid = (mid + Math.imul(al7, bh5)) | 0;\n mid = (mid + Math.imul(ah7, bl5)) | 0;\n hi = (hi + Math.imul(ah7, bh5)) | 0;\n lo = (lo + Math.imul(al6, bl6)) | 0;\n mid = (mid + Math.imul(al6, bh6)) | 0;\n mid = (mid + Math.imul(ah6, bl6)) | 0;\n hi = (hi + Math.imul(ah6, bh6)) | 0;\n lo = (lo + Math.imul(al5, bl7)) | 0;\n mid = (mid + Math.imul(al5, bh7)) | 0;\n mid = (mid + Math.imul(ah5, bl7)) | 0;\n hi = (hi + Math.imul(ah5, bh7)) | 0;\n lo = (lo + Math.imul(al4, bl8)) | 0;\n mid = (mid + Math.imul(al4, bh8)) | 0;\n mid = (mid + Math.imul(ah4, bl8)) | 0;\n hi = (hi + Math.imul(ah4, bh8)) | 0;\n lo = (lo + Math.imul(al3, bl9)) | 0;\n mid = (mid + Math.imul(al3, bh9)) | 0;\n mid = (mid + Math.imul(ah3, bl9)) | 0;\n hi = (hi + Math.imul(ah3, bh9)) | 0;\n var w12 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w12 >>> 26)) | 0;\n w12 &= 0x3ffffff;\n /* k = 13 */\n lo = Math.imul(al9, bl4);\n mid = Math.imul(al9, bh4);\n mid = (mid + Math.imul(ah9, bl4)) | 0;\n hi = Math.imul(ah9, bh4);\n lo = (lo + Math.imul(al8, bl5)) | 0;\n mid = (mid + Math.imul(al8, bh5)) | 0;\n mid = (mid + Math.imul(ah8, bl5)) | 0;\n hi = (hi + Math.imul(ah8, bh5)) | 0;\n lo = (lo + Math.imul(al7, bl6)) | 0;\n mid = (mid + Math.imul(al7, bh6)) | 0;\n mid = (mid + Math.imul(ah7, bl6)) | 0;\n hi = (hi + Math.imul(ah7, bh6)) | 0;\n lo = (lo + Math.imul(al6, bl7)) | 0;\n mid = (mid + Math.imul(al6, bh7)) | 0;\n mid = (mid + Math.imul(ah6, bl7)) | 0;\n hi = (hi + Math.imul(ah6, bh7)) | 0;\n lo = (lo + Math.imul(al5, bl8)) | 0;\n mid = (mid + Math.imul(al5, bh8)) | 0;\n mid = (mid + Math.imul(ah5, bl8)) | 0;\n hi = (hi + Math.imul(ah5, bh8)) | 0;\n lo = (lo + Math.imul(al4, bl9)) | 0;\n mid = (mid + Math.imul(al4, bh9)) | 0;\n mid = (mid + Math.imul(ah4, bl9)) | 0;\n hi = (hi + Math.imul(ah4, bh9)) | 0;\n var w13 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w13 >>> 26)) | 0;\n w13 &= 0x3ffffff;\n /* k = 14 */\n lo = Math.imul(al9, bl5);\n mid = Math.imul(al9, bh5);\n mid = (mid + Math.imul(ah9, bl5)) | 0;\n hi = Math.imul(ah9, bh5);\n lo = (lo + Math.imul(al8, bl6)) | 0;\n mid = (mid + Math.imul(al8, bh6)) | 0;\n mid = (mid + Math.imul(ah8, bl6)) | 0;\n hi = (hi + Math.imul(ah8, bh6)) | 0;\n lo = (lo + Math.imul(al7, bl7)) | 0;\n mid = (mid + Math.imul(al7, bh7)) | 0;\n mid = (mid + Math.imul(ah7, bl7)) | 0;\n hi = (hi + Math.imul(ah7, bh7)) | 0;\n lo = (lo + Math.imul(al6, bl8)) | 0;\n mid = (mid + Math.imul(al6, bh8)) | 0;\n mid = (mid + Math.imul(ah6, bl8)) | 0;\n hi = (hi + Math.imul(ah6, bh8)) | 0;\n lo = (lo + Math.imul(al5, bl9)) | 0;\n mid = (mid + Math.imul(al5, bh9)) | 0;\n mid = (mid + Math.imul(ah5, bl9)) | 0;\n hi = (hi + Math.imul(ah5, bh9)) | 0;\n var w14 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w14 >>> 26)) | 0;\n w14 &= 0x3ffffff;\n /* k = 15 */\n lo = Math.imul(al9, bl6);\n mid = Math.imul(al9, bh6);\n mid = (mid + Math.imul(ah9, bl6)) | 0;\n hi = Math.imul(ah9, bh6);\n lo = (lo + Math.imul(al8, bl7)) | 0;\n mid = (mid + Math.imul(al8, bh7)) | 0;\n mid = (mid + Math.imul(ah8, bl7)) | 0;\n hi = (hi + Math.imul(ah8, bh7)) | 0;\n lo = (lo + Math.imul(al7, bl8)) | 0;\n mid = (mid + Math.imul(al7, bh8)) | 0;\n mid = (mid + Math.imul(ah7, bl8)) | 0;\n hi = (hi + Math.imul(ah7, bh8)) | 0;\n lo = (lo + Math.imul(al6, bl9)) | 0;\n mid = (mid + Math.imul(al6, bh9)) | 0;\n mid = (mid + Math.imul(ah6, bl9)) | 0;\n hi = (hi + Math.imul(ah6, bh9)) | 0;\n var w15 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w15 >>> 26)) | 0;\n w15 &= 0x3ffffff;\n /* k = 16 */\n lo = Math.imul(al9, bl7);\n mid = Math.imul(al9, bh7);\n mid = (mid + Math.imul(ah9, bl7)) | 0;\n hi = Math.imul(ah9, bh7);\n lo = (lo + Math.imul(al8, bl8)) | 0;\n mid = (mid + Math.imul(al8, bh8)) | 0;\n mid = (mid + Math.imul(ah8, bl8)) | 0;\n hi = (hi + Math.imul(ah8, bh8)) | 0;\n lo = (lo + Math.imul(al7, bl9)) | 0;\n mid = (mid + Math.imul(al7, bh9)) | 0;\n mid = (mid + Math.imul(ah7, bl9)) | 0;\n hi = (hi + Math.imul(ah7, bh9)) | 0;\n var w16 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w16 >>> 26)) | 0;\n w16 &= 0x3ffffff;\n /* k = 17 */\n lo = Math.imul(al9, bl8);\n mid = Math.imul(al9, bh8);\n mid = (mid + Math.imul(ah9, bl8)) | 0;\n hi = Math.imul(ah9, bh8);\n lo = (lo + Math.imul(al8, bl9)) | 0;\n mid = (mid + Math.imul(al8, bh9)) | 0;\n mid = (mid + Math.imul(ah8, bl9)) | 0;\n hi = (hi + Math.imul(ah8, bh9)) | 0;\n var w17 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w17 >>> 26)) | 0;\n w17 &= 0x3ffffff;\n /* k = 18 */\n lo = Math.imul(al9, bl9);\n mid = Math.imul(al9, bh9);\n mid = (mid + Math.imul(ah9, bl9)) | 0;\n hi = Math.imul(ah9, bh9);\n var w18 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w18 >>> 26)) | 0;\n w18 &= 0x3ffffff;\n o[0] = w0;\n o[1] = w1;\n o[2] = w2;\n o[3] = w3;\n o[4] = w4;\n o[5] = w5;\n o[6] = w6;\n o[7] = w7;\n o[8] = w8;\n o[9] = w9;\n o[10] = w10;\n o[11] = w11;\n o[12] = w12;\n o[13] = w13;\n o[14] = w14;\n o[15] = w15;\n o[16] = w16;\n o[17] = w17;\n o[18] = w18;\n if (c !== 0) {\n o[19] = c;\n out.length++;\n }\n return out;\n };\n\n // Polyfill comb\n if (!Math.imul) {\n comb10MulTo = smallMulTo;\n }\n\n function bigMulTo (self, num, out) {\n out.negative = num.negative ^ self.negative;\n out.length = self.length + num.length;\n\n var carry = 0;\n var hncarry = 0;\n for (var k = 0; k < out.length - 1; k++) {\n // Sum all words with the same `i + j = k` and accumulate `ncarry`,\n // note that ncarry could be >= 0x3ffffff\n var ncarry = hncarry;\n hncarry = 0;\n var rword = carry & 0x3ffffff;\n var maxJ = Math.min(k, num.length - 1);\n for (var j = Math.max(0, k - self.length + 1); j <= maxJ; j++) {\n var i = k - j;\n var a = self.words[i] | 0;\n var b = num.words[j] | 0;\n var r = a * b;\n\n var lo = r & 0x3ffffff;\n ncarry = (ncarry + ((r / 0x4000000) | 0)) | 0;\n lo = (lo + rword) | 0;\n rword = lo & 0x3ffffff;\n ncarry = (ncarry + (lo >>> 26)) | 0;\n\n hncarry += ncarry >>> 26;\n ncarry &= 0x3ffffff;\n }\n out.words[k] = rword;\n carry = ncarry;\n ncarry = hncarry;\n }\n if (carry !== 0) {\n out.words[k] = carry;\n } else {\n out.length--;\n }\n\n return out.strip();\n }\n\n function jumboMulTo (self, num, out) {\n var fftm = new FFTM();\n return fftm.mulp(self, num, out);\n }\n\n BN.prototype.mulTo = function mulTo (num, out) {\n var res;\n var len = this.length + num.length;\n if (this.length === 10 && num.length === 10) {\n res = comb10MulTo(this, num, out);\n } else if (len < 63) {\n res = smallMulTo(this, num, out);\n } else if (len < 1024) {\n res = bigMulTo(this, num, out);\n } else {\n res = jumboMulTo(this, num, out);\n }\n\n return res;\n };\n\n // Cooley-Tukey algorithm for FFT\n // slightly revisited to rely on looping instead of recursion\n\n function FFTM (x, y) {\n this.x = x;\n this.y = y;\n }\n\n FFTM.prototype.makeRBT = function makeRBT (N) {\n var t = new Array(N);\n var l = BN.prototype._countBits(N) - 1;\n for (var i = 0; i < N; i++) {\n t[i] = this.revBin(i, l, N);\n }\n\n return t;\n };\n\n // Returns binary-reversed representation of `x`\n FFTM.prototype.revBin = function revBin (x, l, N) {\n if (x === 0 || x === N - 1) return x;\n\n var rb = 0;\n for (var i = 0; i < l; i++) {\n rb |= (x & 1) << (l - i - 1);\n x >>= 1;\n }\n\n return rb;\n };\n\n // Performs \"tweedling\" phase, therefore 'emulating'\n // behaviour of the recursive algorithm\n FFTM.prototype.permute = function permute (rbt, rws, iws, rtws, itws, N) {\n for (var i = 0; i < N; i++) {\n rtws[i] = rws[rbt[i]];\n itws[i] = iws[rbt[i]];\n }\n };\n\n FFTM.prototype.transform = function transform (rws, iws, rtws, itws, N, rbt) {\n this.permute(rbt, rws, iws, rtws, itws, N);\n\n for (var s = 1; s < N; s <<= 1) {\n var l = s << 1;\n\n var rtwdf = Math.cos(2 * Math.PI / l);\n var itwdf = Math.sin(2 * Math.PI / l);\n\n for (var p = 0; p < N; p += l) {\n var rtwdf_ = rtwdf;\n var itwdf_ = itwdf;\n\n for (var j = 0; j < s; j++) {\n var re = rtws[p + j];\n var ie = itws[p + j];\n\n var ro = rtws[p + j + s];\n var io = itws[p + j + s];\n\n var rx = rtwdf_ * ro - itwdf_ * io;\n\n io = rtwdf_ * io + itwdf_ * ro;\n ro = rx;\n\n rtws[p + j] = re + ro;\n itws[p + j] = ie + io;\n\n rtws[p + j + s] = re - ro;\n itws[p + j + s] = ie - io;\n\n /* jshint maxdepth : false */\n if (j !== l) {\n rx = rtwdf * rtwdf_ - itwdf * itwdf_;\n\n itwdf_ = rtwdf * itwdf_ + itwdf * rtwdf_;\n rtwdf_ = rx;\n }\n }\n }\n }\n };\n\n FFTM.prototype.guessLen13b = function guessLen13b (n, m) {\n var N = Math.max(m, n) | 1;\n var odd = N & 1;\n var i = 0;\n for (N = N / 2 | 0; N; N = N >>> 1) {\n i++;\n }\n\n return 1 << i + 1 + odd;\n };\n\n FFTM.prototype.conjugate = function conjugate (rws, iws, N) {\n if (N <= 1) return;\n\n for (var i = 0; i < N / 2; i++) {\n var t = rws[i];\n\n rws[i] = rws[N - i - 1];\n rws[N - i - 1] = t;\n\n t = iws[i];\n\n iws[i] = -iws[N - i - 1];\n iws[N - i - 1] = -t;\n }\n };\n\n FFTM.prototype.normalize13b = function normalize13b (ws, N) {\n var carry = 0;\n for (var i = 0; i < N / 2; i++) {\n var w = Math.round(ws[2 * i + 1] / N) * 0x2000 +\n Math.round(ws[2 * i] / N) +\n carry;\n\n ws[i] = w & 0x3ffffff;\n\n if (w < 0x4000000) {\n carry = 0;\n } else {\n carry = w / 0x4000000 | 0;\n }\n }\n\n return ws;\n };\n\n FFTM.prototype.convert13b = function convert13b (ws, len, rws, N) {\n var carry = 0;\n for (var i = 0; i < len; i++) {\n carry = carry + (ws[i] | 0);\n\n rws[2 * i] = carry & 0x1fff; carry = carry >>> 13;\n rws[2 * i + 1] = carry & 0x1fff; carry = carry >>> 13;\n }\n\n // Pad with zeroes\n for (i = 2 * len; i < N; ++i) {\n rws[i] = 0;\n }\n\n assert(carry === 0);\n assert((carry & ~0x1fff) === 0);\n };\n\n FFTM.prototype.stub = function stub (N) {\n var ph = new Array(N);\n for (var i = 0; i < N; i++) {\n ph[i] = 0;\n }\n\n return ph;\n };\n\n FFTM.prototype.mulp = function mulp (x, y, out) {\n var N = 2 * this.guessLen13b(x.length, y.length);\n\n var rbt = this.makeRBT(N);\n\n var _ = this.stub(N);\n\n var rws = new Array(N);\n var rwst = new Array(N);\n var iwst = new Array(N);\n\n var nrws = new Array(N);\n var nrwst = new Array(N);\n var niwst = new Array(N);\n\n var rmws = out.words;\n rmws.length = N;\n\n this.convert13b(x.words, x.length, rws, N);\n this.convert13b(y.words, y.length, nrws, N);\n\n this.transform(rws, _, rwst, iwst, N, rbt);\n this.transform(nrws, _, nrwst, niwst, N, rbt);\n\n for (var i = 0; i < N; i++) {\n var rx = rwst[i] * nrwst[i] - iwst[i] * niwst[i];\n iwst[i] = rwst[i] * niwst[i] + iwst[i] * nrwst[i];\n rwst[i] = rx;\n }\n\n this.conjugate(rwst, iwst, N);\n this.transform(rwst, iwst, rmws, _, N, rbt);\n this.conjugate(rmws, _, N);\n this.normalize13b(rmws, N);\n\n out.negative = x.negative ^ y.negative;\n out.length = x.length + y.length;\n return out.strip();\n };\n\n // Multiply `this` by `num`\n BN.prototype.mul = function mul (num) {\n var out = new BN(null);\n out.words = new Array(this.length + num.length);\n return this.mulTo(num, out);\n };\n\n // Multiply employing FFT\n BN.prototype.mulf = function mulf (num) {\n var out = new BN(null);\n out.words = new Array(this.length + num.length);\n return jumboMulTo(this, num, out);\n };\n\n // In-place Multiplication\n BN.prototype.imul = function imul (num) {\n return this.clone().mulTo(num, this);\n };\n\n BN.prototype.imuln = function imuln (num) {\n assert(typeof num === 'number');\n assert(num < 0x4000000);\n\n // Carry\n var carry = 0;\n for (var i = 0; i < this.length; i++) {\n var w = (this.words[i] | 0) * num;\n var lo = (w & 0x3ffffff) + (carry & 0x3ffffff);\n carry >>= 26;\n carry += (w / 0x4000000) | 0;\n // NOTE: lo is 27bit maximum\n carry += lo >>> 26;\n this.words[i] = lo & 0x3ffffff;\n }\n\n if (carry !== 0) {\n this.words[i] = carry;\n this.length++;\n }\n\n return this;\n };\n\n BN.prototype.muln = function muln (num) {\n return this.clone().imuln(num);\n };\n\n // `this` * `this`\n BN.prototype.sqr = function sqr () {\n return this.mul(this);\n };\n\n // `this` * `this` in-place\n BN.prototype.isqr = function isqr () {\n return this.imul(this.clone());\n };\n\n // Math.pow(`this`, `num`)\n BN.prototype.pow = function pow (num) {\n var w = toBitArray(num);\n if (w.length === 0) return new BN(1);\n\n // Skip leading zeroes\n var res = this;\n for (var i = 0; i < w.length; i++, res = res.sqr()) {\n if (w[i] !== 0) break;\n }\n\n if (++i < w.length) {\n for (var q = res.sqr(); i < w.length; i++, q = q.sqr()) {\n if (w[i] === 0) continue;\n\n res = res.mul(q);\n }\n }\n\n return res;\n };\n\n // Shift-left in-place\n BN.prototype.iushln = function iushln (bits) {\n assert(typeof bits === 'number' && bits >= 0);\n var r = bits % 26;\n var s = (bits - r) / 26;\n var carryMask = (0x3ffffff >>> (26 - r)) << (26 - r);\n var i;\n\n if (r !== 0) {\n var carry = 0;\n\n for (i = 0; i < this.length; i++) {\n var newCarry = this.words[i] & carryMask;\n var c = ((this.words[i] | 0) - newCarry) << r;\n this.words[i] = c | carry;\n carry = newCarry >>> (26 - r);\n }\n\n if (carry) {\n this.words[i] = carry;\n this.length++;\n }\n }\n\n if (s !== 0) {\n for (i = this.length - 1; i >= 0; i--) {\n this.words[i + s] = this.words[i];\n }\n\n for (i = 0; i < s; i++) {\n this.words[i] = 0;\n }\n\n this.length += s;\n }\n\n return this.strip();\n };\n\n BN.prototype.ishln = function ishln (bits) {\n // TODO(indutny): implement me\n assert(this.negative === 0);\n return this.iushln(bits);\n };\n\n // Shift-right in-place\n // NOTE: `hint` is a lowest bit before trailing zeroes\n // NOTE: if `extended` is present - it will be filled with destroyed bits\n BN.prototype.iushrn = function iushrn (bits, hint, extended) {\n assert(typeof bits === 'number' && bits >= 0);\n var h;\n if (hint) {\n h = (hint - (hint % 26)) / 26;\n } else {\n h = 0;\n }\n\n var r = bits % 26;\n var s = Math.min((bits - r) / 26, this.length);\n var mask = 0x3ffffff ^ ((0x3ffffff >>> r) << r);\n var maskedWords = extended;\n\n h -= s;\n h = Math.max(0, h);\n\n // Extended mode, copy masked part\n if (maskedWords) {\n for (var i = 0; i < s; i++) {\n maskedWords.words[i] = this.words[i];\n }\n maskedWords.length = s;\n }\n\n if (s === 0) {\n // No-op, we should not move anything at all\n } else if (this.length > s) {\n this.length -= s;\n for (i = 0; i < this.length; i++) {\n this.words[i] = this.words[i + s];\n }\n } else {\n this.words[0] = 0;\n this.length = 1;\n }\n\n var carry = 0;\n for (i = this.length - 1; i >= 0 && (carry !== 0 || i >= h); i--) {\n var word = this.words[i] | 0;\n this.words[i] = (carry << (26 - r)) | (word >>> r);\n carry = word & mask;\n }\n\n // Push carried bits as a mask\n if (maskedWords && carry !== 0) {\n maskedWords.words[maskedWords.length++] = carry;\n }\n\n if (this.length === 0) {\n this.words[0] = 0;\n this.length = 1;\n }\n\n return this.strip();\n };\n\n BN.prototype.ishrn = function ishrn (bits, hint, extended) {\n // TODO(indutny): implement me\n assert(this.negative === 0);\n return this.iushrn(bits, hint, extended);\n };\n\n // Shift-left\n BN.prototype.shln = function shln (bits) {\n return this.clone().ishln(bits);\n };\n\n BN.prototype.ushln = function ushln (bits) {\n return this.clone().iushln(bits);\n };\n\n // Shift-right\n BN.prototype.shrn = function shrn (bits) {\n return this.clone().ishrn(bits);\n };\n\n BN.prototype.ushrn = function ushrn (bits) {\n return this.clone().iushrn(bits);\n };\n\n // Test if n bit is set\n BN.prototype.testn = function testn (bit) {\n assert(typeof bit === 'number' && bit >= 0);\n var r = bit % 26;\n var s = (bit - r) / 26;\n var q = 1 << r;\n\n // Fast case: bit is much higher than all existing words\n if (this.length <= s) return false;\n\n // Check bit and return\n var w = this.words[s];\n\n return !!(w & q);\n };\n\n // Return only lowers bits of number (in-place)\n BN.prototype.imaskn = function imaskn (bits) {\n assert(typeof bits === 'number' && bits >= 0);\n var r = bits % 26;\n var s = (bits - r) / 26;\n\n assert(this.negative === 0, 'imaskn works only with positive numbers');\n\n if (this.length <= s) {\n return this;\n }\n\n if (r !== 0) {\n s++;\n }\n this.length = Math.min(s, this.length);\n\n if (r !== 0) {\n var mask = 0x3ffffff ^ ((0x3ffffff >>> r) << r);\n this.words[this.length - 1] &= mask;\n }\n\n return this.strip();\n };\n\n // Return only lowers bits of number\n BN.prototype.maskn = function maskn (bits) {\n return this.clone().imaskn(bits);\n };\n\n // Add plain number `num` to `this`\n BN.prototype.iaddn = function iaddn (num) {\n assert(typeof num === 'number');\n assert(num < 0x4000000);\n if (num < 0) return this.isubn(-num);\n\n // Possible sign change\n if (this.negative !== 0) {\n if (this.length === 1 && (this.words[0] | 0) < num) {\n this.words[0] = num - (this.words[0] | 0);\n this.negative = 0;\n return this;\n }\n\n this.negative = 0;\n this.isubn(num);\n this.negative = 1;\n return this;\n }\n\n // Add without checks\n return this._iaddn(num);\n };\n\n BN.prototype._iaddn = function _iaddn (num) {\n this.words[0] += num;\n\n // Carry\n for (var i = 0; i < this.length && this.words[i] >= 0x4000000; i++) {\n this.words[i] -= 0x4000000;\n if (i === this.length - 1) {\n this.words[i + 1] = 1;\n } else {\n this.words[i + 1]++;\n }\n }\n this.length = Math.max(this.length, i + 1);\n\n return this;\n };\n\n // Subtract plain number `num` from `this`\n BN.prototype.isubn = function isubn (num) {\n assert(typeof num === 'number');\n assert(num < 0x4000000);\n if (num < 0) return this.iaddn(-num);\n\n if (this.negative !== 0) {\n this.negative = 0;\n this.iaddn(num);\n this.negative = 1;\n return this;\n }\n\n this.words[0] -= num;\n\n if (this.length === 1 && this.words[0] < 0) {\n this.words[0] = -this.words[0];\n this.negative = 1;\n } else {\n // Carry\n for (var i = 0; i < this.length && this.words[i] < 0; i++) {\n this.words[i] += 0x4000000;\n this.words[i + 1] -= 1;\n }\n }\n\n return this.strip();\n };\n\n BN.prototype.addn = function addn (num) {\n return this.clone().iaddn(num);\n };\n\n BN.prototype.subn = function subn (num) {\n return this.clone().isubn(num);\n };\n\n BN.prototype.iabs = function iabs () {\n this.negative = 0;\n\n return this;\n };\n\n BN.prototype.abs = function abs () {\n return this.clone().iabs();\n };\n\n BN.prototype._ishlnsubmul = function _ishlnsubmul (num, mul, shift) {\n var len = num.length + shift;\n var i;\n\n this._expand(len);\n\n var w;\n var carry = 0;\n for (i = 0; i < num.length; i++) {\n w = (this.words[i + shift] | 0) + carry;\n var right = (num.words[i] | 0) * mul;\n w -= right & 0x3ffffff;\n carry = (w >> 26) - ((right / 0x4000000) | 0);\n this.words[i + shift] = w & 0x3ffffff;\n }\n for (; i < this.length - shift; i++) {\n w = (this.words[i + shift] | 0) + carry;\n carry = w >> 26;\n this.words[i + shift] = w & 0x3ffffff;\n }\n\n if (carry === 0) return this.strip();\n\n // Subtraction overflow\n assert(carry === -1);\n carry = 0;\n for (i = 0; i < this.length; i++) {\n w = -(this.words[i] | 0) + carry;\n carry = w >> 26;\n this.words[i] = w & 0x3ffffff;\n }\n this.negative = 1;\n\n return this.strip();\n };\n\n BN.prototype._wordDiv = function _wordDiv (num, mode) {\n var shift = this.length - num.length;\n\n var a = this.clone();\n var b = num;\n\n // Normalize\n var bhi = b.words[b.length - 1] | 0;\n var bhiBits = this._countBits(bhi);\n shift = 26 - bhiBits;\n if (shift !== 0) {\n b = b.ushln(shift);\n a.iushln(shift);\n bhi = b.words[b.length - 1] | 0;\n }\n\n // Initialize quotient\n var m = a.length - b.length;\n var q;\n\n if (mode !== 'mod') {\n q = new BN(null);\n q.length = m + 1;\n q.words = new Array(q.length);\n for (var i = 0; i < q.length; i++) {\n q.words[i] = 0;\n }\n }\n\n var diff = a.clone()._ishlnsubmul(b, 1, m);\n if (diff.negative === 0) {\n a = diff;\n if (q) {\n q.words[m] = 1;\n }\n }\n\n for (var j = m - 1; j >= 0; j--) {\n var qj = (a.words[b.length + j] | 0) * 0x4000000 +\n (a.words[b.length + j - 1] | 0);\n\n // NOTE: (qj / bhi) is (0x3ffffff * 0x4000000 + 0x3ffffff) / 0x2000000 max\n // (0x7ffffff)\n qj = Math.min((qj / bhi) | 0, 0x3ffffff);\n\n a._ishlnsubmul(b, qj, j);\n while (a.negative !== 0) {\n qj--;\n a.negative = 0;\n a._ishlnsubmul(b, 1, j);\n if (!a.isZero()) {\n a.negative ^= 1;\n }\n }\n if (q) {\n q.words[j] = qj;\n }\n }\n if (q) {\n q.strip();\n }\n a.strip();\n\n // Denormalize\n if (mode !== 'div' && shift !== 0) {\n a.iushrn(shift);\n }\n\n return {\n div: q || null,\n mod: a\n };\n };\n\n // NOTE: 1) `mode` can be set to `mod` to request mod only,\n // to `div` to request div only, or be absent to\n // request both div & mod\n // 2) `positive` is true if unsigned mod is requested\n BN.prototype.divmod = function divmod (num, mode, positive) {\n assert(!num.isZero());\n\n if (this.isZero()) {\n return {\n div: new BN(0),\n mod: new BN(0)\n };\n }\n\n var div, mod, res;\n if (this.negative !== 0 && num.negative === 0) {\n res = this.neg().divmod(num, mode);\n\n if (mode !== 'mod') {\n div = res.div.neg();\n }\n\n if (mode !== 'div') {\n mod = res.mod.neg();\n if (positive && mod.negative !== 0) {\n mod.iadd(num);\n }\n }\n\n return {\n div: div,\n mod: mod\n };\n }\n\n if (this.negative === 0 && num.negative !== 0) {\n res = this.divmod(num.neg(), mode);\n\n if (mode !== 'mod') {\n div = res.div.neg();\n }\n\n return {\n div: div,\n mod: res.mod\n };\n }\n\n if ((this.negative & num.negative) !== 0) {\n res = this.neg().divmod(num.neg(), mode);\n\n if (mode !== 'div') {\n mod = res.mod.neg();\n if (positive && mod.negative !== 0) {\n mod.isub(num);\n }\n }\n\n return {\n div: res.div,\n mod: mod\n };\n }\n\n // Both numbers are positive at this point\n\n // Strip both numbers to approximate shift value\n if (num.length > this.length || this.cmp(num) < 0) {\n return {\n div: new BN(0),\n mod: this\n };\n }\n\n // Very short reduction\n if (num.length === 1) {\n if (mode === 'div') {\n return {\n div: this.divn(num.words[0]),\n mod: null\n };\n }\n\n if (mode === 'mod') {\n return {\n div: null,\n mod: new BN(this.modn(num.words[0]))\n };\n }\n\n return {\n div: this.divn(num.words[0]),\n mod: new BN(this.modn(num.words[0]))\n };\n }\n\n return this._wordDiv(num, mode);\n };\n\n // Find `this` / `num`\n BN.prototype.div = function div (num) {\n return this.divmod(num, 'div', false).div;\n };\n\n // Find `this` % `num`\n BN.prototype.mod = function mod (num) {\n return this.divmod(num, 'mod', false).mod;\n };\n\n BN.prototype.umod = function umod (num) {\n return this.divmod(num, 'mod', true).mod;\n };\n\n // Find Round(`this` / `num`)\n BN.prototype.divRound = function divRound (num) {\n var dm = this.divmod(num);\n\n // Fast case - exact division\n if (dm.mod.isZero()) return dm.div;\n\n var mod = dm.div.negative !== 0 ? dm.mod.isub(num) : dm.mod;\n\n var half = num.ushrn(1);\n var r2 = num.andln(1);\n var cmp = mod.cmp(half);\n\n // Round down\n if (cmp < 0 || r2 === 1 && cmp === 0) return dm.div;\n\n // Round up\n return dm.div.negative !== 0 ? dm.div.isubn(1) : dm.div.iaddn(1);\n };\n\n BN.prototype.modn = function modn (num) {\n assert(num <= 0x3ffffff);\n var p = (1 << 26) % num;\n\n var acc = 0;\n for (var i = this.length - 1; i >= 0; i--) {\n acc = (p * acc + (this.words[i] | 0)) % num;\n }\n\n return acc;\n };\n\n // In-place division by number\n BN.prototype.idivn = function idivn (num) {\n assert(num <= 0x3ffffff);\n\n var carry = 0;\n for (var i = this.length - 1; i >= 0; i--) {\n var w = (this.words[i] | 0) + carry * 0x4000000;\n this.words[i] = (w / num) | 0;\n carry = w % num;\n }\n\n return this.strip();\n };\n\n BN.prototype.divn = function divn (num) {\n return this.clone().idivn(num);\n };\n\n BN.prototype.egcd = function egcd (p) {\n assert(p.negative === 0);\n assert(!p.isZero());\n\n var x = this;\n var y = p.clone();\n\n if (x.negative !== 0) {\n x = x.umod(p);\n } else {\n x = x.clone();\n }\n\n // A * x + B * y = x\n var A = new BN(1);\n var B = new BN(0);\n\n // C * x + D * y = y\n var C = new BN(0);\n var D = new BN(1);\n\n var g = 0;\n\n while (x.isEven() && y.isEven()) {\n x.iushrn(1);\n y.iushrn(1);\n ++g;\n }\n\n var yp = y.clone();\n var xp = x.clone();\n\n while (!x.isZero()) {\n for (var i = 0, im = 1; (x.words[0] & im) === 0 && i < 26; ++i, im <<= 1);\n if (i > 0) {\n x.iushrn(i);\n while (i-- > 0) {\n if (A.isOdd() || B.isOdd()) {\n A.iadd(yp);\n B.isub(xp);\n }\n\n A.iushrn(1);\n B.iushrn(1);\n }\n }\n\n for (var j = 0, jm = 1; (y.words[0] & jm) === 0 && j < 26; ++j, jm <<= 1);\n if (j > 0) {\n y.iushrn(j);\n while (j-- > 0) {\n if (C.isOdd() || D.isOdd()) {\n C.iadd(yp);\n D.isub(xp);\n }\n\n C.iushrn(1);\n D.iushrn(1);\n }\n }\n\n if (x.cmp(y) >= 0) {\n x.isub(y);\n A.isub(C);\n B.isub(D);\n } else {\n y.isub(x);\n C.isub(A);\n D.isub(B);\n }\n }\n\n return {\n a: C,\n b: D,\n gcd: y.iushln(g)\n };\n };\n\n // This is reduced incarnation of the binary EEA\n // above, designated to invert members of the\n // _prime_ fields F(p) at a maximal speed\n BN.prototype._invmp = function _invmp (p) {\n assert(p.negative === 0);\n assert(!p.isZero());\n\n var a = this;\n var b = p.clone();\n\n if (a.negative !== 0) {\n a = a.umod(p);\n } else {\n a = a.clone();\n }\n\n var x1 = new BN(1);\n var x2 = new BN(0);\n\n var delta = b.clone();\n\n while (a.cmpn(1) > 0 && b.cmpn(1) > 0) {\n for (var i = 0, im = 1; (a.words[0] & im) === 0 && i < 26; ++i, im <<= 1);\n if (i > 0) {\n a.iushrn(i);\n while (i-- > 0) {\n if (x1.isOdd()) {\n x1.iadd(delta);\n }\n\n x1.iushrn(1);\n }\n }\n\n for (var j = 0, jm = 1; (b.words[0] & jm) === 0 && j < 26; ++j, jm <<= 1);\n if (j > 0) {\n b.iushrn(j);\n while (j-- > 0) {\n if (x2.isOdd()) {\n x2.iadd(delta);\n }\n\n x2.iushrn(1);\n }\n }\n\n if (a.cmp(b) >= 0) {\n a.isub(b);\n x1.isub(x2);\n } else {\n b.isub(a);\n x2.isub(x1);\n }\n }\n\n var res;\n if (a.cmpn(1) === 0) {\n res = x1;\n } else {\n res = x2;\n }\n\n if (res.cmpn(0) < 0) {\n res.iadd(p);\n }\n\n return res;\n };\n\n BN.prototype.gcd = function gcd (num) {\n if (this.isZero()) return num.abs();\n if (num.isZero()) return this.abs();\n\n var a = this.clone();\n var b = num.clone();\n a.negative = 0;\n b.negative = 0;\n\n // Remove common factor of two\n for (var shift = 0; a.isEven() && b.isEven(); shift++) {\n a.iushrn(1);\n b.iushrn(1);\n }\n\n do {\n while (a.isEven()) {\n a.iushrn(1);\n }\n while (b.isEven()) {\n b.iushrn(1);\n }\n\n var r = a.cmp(b);\n if (r < 0) {\n // Swap `a` and `b` to make `a` always bigger than `b`\n var t = a;\n a = b;\n b = t;\n } else if (r === 0 || b.cmpn(1) === 0) {\n break;\n }\n\n a.isub(b);\n } while (true);\n\n return b.iushln(shift);\n };\n\n // Invert number in the field F(num)\n BN.prototype.invm = function invm (num) {\n return this.egcd(num).a.umod(num);\n };\n\n BN.prototype.isEven = function isEven () {\n return (this.words[0] & 1) === 0;\n };\n\n BN.prototype.isOdd = function isOdd () {\n return (this.words[0] & 1) === 1;\n };\n\n // And first word and num\n BN.prototype.andln = function andln (num) {\n return this.words[0] & num;\n };\n\n // Increment at the bit position in-line\n BN.prototype.bincn = function bincn (bit) {\n assert(typeof bit === 'number');\n var r = bit % 26;\n var s = (bit - r) / 26;\n var q = 1 << r;\n\n // Fast case: bit is much higher than all existing words\n if (this.length <= s) {\n this._expand(s + 1);\n this.words[s] |= q;\n return this;\n }\n\n // Add bit and propagate, if needed\n var carry = q;\n for (var i = s; carry !== 0 && i < this.length; i++) {\n var w = this.words[i] | 0;\n w += carry;\n carry = w >>> 26;\n w &= 0x3ffffff;\n this.words[i] = w;\n }\n if (carry !== 0) {\n this.words[i] = carry;\n this.length++;\n }\n return this;\n };\n\n BN.prototype.isZero = function isZero () {\n return this.length === 1 && this.words[0] === 0;\n };\n\n BN.prototype.cmpn = function cmpn (num) {\n var negative = num < 0;\n\n if (this.negative !== 0 && !negative) return -1;\n if (this.negative === 0 && negative) return 1;\n\n this.strip();\n\n var res;\n if (this.length > 1) {\n res = 1;\n } else {\n if (negative) {\n num = -num;\n }\n\n assert(num <= 0x3ffffff, 'Number is too big');\n\n var w = this.words[0] | 0;\n res = w === num ? 0 : w < num ? -1 : 1;\n }\n if (this.negative !== 0) return -res | 0;\n return res;\n };\n\n // Compare two numbers and return:\n // 1 - if `this` > `num`\n // 0 - if `this` == `num`\n // -1 - if `this` < `num`\n BN.prototype.cmp = function cmp (num) {\n if (this.negative !== 0 && num.negative === 0) return -1;\n if (this.negative === 0 && num.negative !== 0) return 1;\n\n var res = this.ucmp(num);\n if (this.negative !== 0) return -res | 0;\n return res;\n };\n\n // Unsigned comparison\n BN.prototype.ucmp = function ucmp (num) {\n // At this point both numbers have the same sign\n if (this.length > num.length) return 1;\n if (this.length < num.length) return -1;\n\n var res = 0;\n for (var i = this.length - 1; i >= 0; i--) {\n var a = this.words[i] | 0;\n var b = num.words[i] | 0;\n\n if (a === b) continue;\n if (a < b) {\n res = -1;\n } else if (a > b) {\n res = 1;\n }\n break;\n }\n return res;\n };\n\n BN.prototype.gtn = function gtn (num) {\n return this.cmpn(num) === 1;\n };\n\n BN.prototype.gt = function gt (num) {\n return this.cmp(num) === 1;\n };\n\n BN.prototype.gten = function gten (num) {\n return this.cmpn(num) >= 0;\n };\n\n BN.prototype.gte = function gte (num) {\n return this.cmp(num) >= 0;\n };\n\n BN.prototype.ltn = function ltn (num) {\n return this.cmpn(num) === -1;\n };\n\n BN.prototype.lt = function lt (num) {\n return this.cmp(num) === -1;\n };\n\n BN.prototype.lten = function lten (num) {\n return this.cmpn(num) <= 0;\n };\n\n BN.prototype.lte = function lte (num) {\n return this.cmp(num) <= 0;\n };\n\n BN.prototype.eqn = function eqn (num) {\n return this.cmpn(num) === 0;\n };\n\n BN.prototype.eq = function eq (num) {\n return this.cmp(num) === 0;\n };\n\n //\n // A reduce context, could be using montgomery or something better, depending\n // on the `m` itself.\n //\n BN.red = function red (num) {\n return new Red(num);\n };\n\n BN.prototype.toRed = function toRed (ctx) {\n assert(!this.red, 'Already a number in reduction context');\n assert(this.negative === 0, 'red works only with positives');\n return ctx.convertTo(this)._forceRed(ctx);\n };\n\n BN.prototype.fromRed = function fromRed () {\n assert(this.red, 'fromRed works only with numbers in reduction context');\n return this.red.convertFrom(this);\n };\n\n BN.prototype._forceRed = function _forceRed (ctx) {\n this.red = ctx;\n return this;\n };\n\n BN.prototype.forceRed = function forceRed (ctx) {\n assert(!this.red, 'Already a number in reduction context');\n return this._forceRed(ctx);\n };\n\n BN.prototype.redAdd = function redAdd (num) {\n assert(this.red, 'redAdd works only with red numbers');\n return this.red.add(this, num);\n };\n\n BN.prototype.redIAdd = function redIAdd (num) {\n assert(this.red, 'redIAdd works only with red numbers');\n return this.red.iadd(this, num);\n };\n\n BN.prototype.redSub = function redSub (num) {\n assert(this.red, 'redSub works only with red numbers');\n return this.red.sub(this, num);\n };\n\n BN.prototype.redISub = function redISub (num) {\n assert(this.red, 'redISub works only with red numbers');\n return this.red.isub(this, num);\n };\n\n BN.prototype.redShl = function redShl (num) {\n assert(this.red, 'redShl works only with red numbers');\n return this.red.shl(this, num);\n };\n\n BN.prototype.redMul = function redMul (num) {\n assert(this.red, 'redMul works only with red numbers');\n this.red._verify2(this, num);\n return this.red.mul(this, num);\n };\n\n BN.prototype.redIMul = function redIMul (num) {\n assert(this.red, 'redMul works only with red numbers');\n this.red._verify2(this, num);\n return this.red.imul(this, num);\n };\n\n BN.prototype.redSqr = function redSqr () {\n assert(this.red, 'redSqr works only with red numbers');\n this.red._verify1(this);\n return this.red.sqr(this);\n };\n\n BN.prototype.redISqr = function redISqr () {\n assert(this.red, 'redISqr works only with red numbers');\n this.red._verify1(this);\n return this.red.isqr(this);\n };\n\n // Square root over p\n BN.prototype.redSqrt = function redSqrt () {\n assert(this.red, 'redSqrt works only with red numbers');\n this.red._verify1(this);\n return this.red.sqrt(this);\n };\n\n BN.prototype.redInvm = function redInvm () {\n assert(this.red, 'redInvm works only with red numbers');\n this.red._verify1(this);\n return this.red.invm(this);\n };\n\n // Return negative clone of `this` % `red modulo`\n BN.prototype.redNeg = function redNeg () {\n assert(this.red, 'redNeg works only with red numbers');\n this.red._verify1(this);\n return this.red.neg(this);\n };\n\n BN.prototype.redPow = function redPow (num) {\n assert(this.red && !num.red, 'redPow(normalNum)');\n this.red._verify1(this);\n return this.red.pow(this, num);\n };\n\n // Prime numbers with efficient reduction\n var primes = {\n k256: null,\n p224: null,\n p192: null,\n p25519: null\n };\n\n // Pseudo-Mersenne prime\n function MPrime (name, p) {\n // P = 2 ^ N - K\n this.name = name;\n this.p = new BN(p, 16);\n this.n = this.p.bitLength();\n this.k = new BN(1).iushln(this.n).isub(this.p);\n\n this.tmp = this._tmp();\n }\n\n MPrime.prototype._tmp = function _tmp () {\n var tmp = new BN(null);\n tmp.words = new Array(Math.ceil(this.n / 13));\n return tmp;\n };\n\n MPrime.prototype.ireduce = function ireduce (num) {\n // Assumes that `num` is less than `P^2`\n // num = HI * (2 ^ N - K) + HI * K + LO = HI * K + LO (mod P)\n var r = num;\n var rlen;\n\n do {\n this.split(r, this.tmp);\n r = this.imulK(r);\n r = r.iadd(this.tmp);\n rlen = r.bitLength();\n } while (rlen > this.n);\n\n var cmp = rlen < this.n ? -1 : r.ucmp(this.p);\n if (cmp === 0) {\n r.words[0] = 0;\n r.length = 1;\n } else if (cmp > 0) {\n r.isub(this.p);\n } else {\n if (r.strip !== undefined) {\n // r is BN v4 instance\n r.strip();\n } else {\n // r is BN v5 instance\n r._strip();\n }\n }\n\n return r;\n };\n\n MPrime.prototype.split = function split (input, out) {\n input.iushrn(this.n, 0, out);\n };\n\n MPrime.prototype.imulK = function imulK (num) {\n return num.imul(this.k);\n };\n\n function K256 () {\n MPrime.call(\n this,\n 'k256',\n 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f');\n }\n inherits(K256, MPrime);\n\n K256.prototype.split = function split (input, output) {\n // 256 = 9 * 26 + 22\n var mask = 0x3fffff;\n\n var outLen = Math.min(input.length, 9);\n for (var i = 0; i < outLen; i++) {\n output.words[i] = input.words[i];\n }\n output.length = outLen;\n\n if (input.length <= 9) {\n input.words[0] = 0;\n input.length = 1;\n return;\n }\n\n // Shift by 9 limbs\n var prev = input.words[9];\n output.words[output.length++] = prev & mask;\n\n for (i = 10; i < input.length; i++) {\n var next = input.words[i] | 0;\n input.words[i - 10] = ((next & mask) << 4) | (prev >>> 22);\n prev = next;\n }\n prev >>>= 22;\n input.words[i - 10] = prev;\n if (prev === 0 && input.length > 10) {\n input.length -= 10;\n } else {\n input.length -= 9;\n }\n };\n\n K256.prototype.imulK = function imulK (num) {\n // K = 0x1000003d1 = [ 0x40, 0x3d1 ]\n num.words[num.length] = 0;\n num.words[num.length + 1] = 0;\n num.length += 2;\n\n // bounded at: 0x40 * 0x3ffffff + 0x3d0 = 0x100000390\n var lo = 0;\n for (var i = 0; i < num.length; i++) {\n var w = num.words[i] | 0;\n lo += w * 0x3d1;\n num.words[i] = lo & 0x3ffffff;\n lo = w * 0x40 + ((lo / 0x4000000) | 0);\n }\n\n // Fast length reduction\n if (num.words[num.length - 1] === 0) {\n num.length--;\n if (num.words[num.length - 1] === 0) {\n num.length--;\n }\n }\n return num;\n };\n\n function P224 () {\n MPrime.call(\n this,\n 'p224',\n 'ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001');\n }\n inherits(P224, MPrime);\n\n function P192 () {\n MPrime.call(\n this,\n 'p192',\n 'ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff');\n }\n inherits(P192, MPrime);\n\n function P25519 () {\n // 2 ^ 255 - 19\n MPrime.call(\n this,\n '25519',\n '7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed');\n }\n inherits(P25519, MPrime);\n\n P25519.prototype.imulK = function imulK (num) {\n // K = 0x13\n var carry = 0;\n for (var i = 0; i < num.length; i++) {\n var hi = (num.words[i] | 0) * 0x13 + carry;\n var lo = hi & 0x3ffffff;\n hi >>>= 26;\n\n num.words[i] = lo;\n carry = hi;\n }\n if (carry !== 0) {\n num.words[num.length++] = carry;\n }\n return num;\n };\n\n // Exported mostly for testing purposes, use plain name instead\n BN._prime = function prime (name) {\n // Cached version of prime\n if (primes[name]) return primes[name];\n\n var prime;\n if (name === 'k256') {\n prime = new K256();\n } else if (name === 'p224') {\n prime = new P224();\n } else if (name === 'p192') {\n prime = new P192();\n } else if (name === 'p25519') {\n prime = new P25519();\n } else {\n throw new Error('Unknown prime ' + name);\n }\n primes[name] = prime;\n\n return prime;\n };\n\n //\n // Base reduction engine\n //\n function Red (m) {\n if (typeof m === 'string') {\n var prime = BN._prime(m);\n this.m = prime.p;\n this.prime = prime;\n } else {\n assert(m.gtn(1), 'modulus must be greater than 1');\n this.m = m;\n this.prime = null;\n }\n }\n\n Red.prototype._verify1 = function _verify1 (a) {\n assert(a.negative === 0, 'red works only with positives');\n assert(a.red, 'red works only with red numbers');\n };\n\n Red.prototype._verify2 = function _verify2 (a, b) {\n assert((a.negative | b.negative) === 0, 'red works only with positives');\n assert(a.red && a.red === b.red,\n 'red works only with red numbers');\n };\n\n Red.prototype.imod = function imod (a) {\n if (this.prime) return this.prime.ireduce(a)._forceRed(this);\n return a.umod(this.m)._forceRed(this);\n };\n\n Red.prototype.neg = function neg (a) {\n if (a.isZero()) {\n return a.clone();\n }\n\n return this.m.sub(a)._forceRed(this);\n };\n\n Red.prototype.add = function add (a, b) {\n this._verify2(a, b);\n\n var res = a.add(b);\n if (res.cmp(this.m) >= 0) {\n res.isub(this.m);\n }\n return res._forceRed(this);\n };\n\n Red.prototype.iadd = function iadd (a, b) {\n this._verify2(a, b);\n\n var res = a.iadd(b);\n if (res.cmp(this.m) >= 0) {\n res.isub(this.m);\n }\n return res;\n };\n\n Red.prototype.sub = function sub (a, b) {\n this._verify2(a, b);\n\n var res = a.sub(b);\n if (res.cmpn(0) < 0) {\n res.iadd(this.m);\n }\n return res._forceRed(this);\n };\n\n Red.prototype.isub = function isub (a, b) {\n this._verify2(a, b);\n\n var res = a.isub(b);\n if (res.cmpn(0) < 0) {\n res.iadd(this.m);\n }\n return res;\n };\n\n Red.prototype.shl = function shl (a, num) {\n this._verify1(a);\n return this.imod(a.ushln(num));\n };\n\n Red.prototype.imul = function imul (a, b) {\n this._verify2(a, b);\n return this.imod(a.imul(b));\n };\n\n Red.prototype.mul = function mul (a, b) {\n this._verify2(a, b);\n return this.imod(a.mul(b));\n };\n\n Red.prototype.isqr = function isqr (a) {\n return this.imul(a, a.clone());\n };\n\n Red.prototype.sqr = function sqr (a) {\n return this.mul(a, a);\n };\n\n Red.prototype.sqrt = function sqrt (a) {\n if (a.isZero()) return a.clone();\n\n var mod3 = this.m.andln(3);\n assert(mod3 % 2 === 1);\n\n // Fast case\n if (mod3 === 3) {\n var pow = this.m.add(new BN(1)).iushrn(2);\n return this.pow(a, pow);\n }\n\n // Tonelli-Shanks algorithm (Totally unoptimized and slow)\n //\n // Find Q and S, that Q * 2 ^ S = (P - 1)\n var q = this.m.subn(1);\n var s = 0;\n while (!q.isZero() && q.andln(1) === 0) {\n s++;\n q.iushrn(1);\n }\n assert(!q.isZero());\n\n var one = new BN(1).toRed(this);\n var nOne = one.redNeg();\n\n // Find quadratic non-residue\n // NOTE: Max is such because of generalized Riemann hypothesis.\n var lpow = this.m.subn(1).iushrn(1);\n var z = this.m.bitLength();\n z = new BN(2 * z * z).toRed(this);\n\n while (this.pow(z, lpow).cmp(nOne) !== 0) {\n z.redIAdd(nOne);\n }\n\n var c = this.pow(z, q);\n var r = this.pow(a, q.addn(1).iushrn(1));\n var t = this.pow(a, q);\n var m = s;\n while (t.cmp(one) !== 0) {\n var tmp = t;\n for (var i = 0; tmp.cmp(one) !== 0; i++) {\n tmp = tmp.redSqr();\n }\n assert(i < m);\n var b = this.pow(c, new BN(1).iushln(m - i - 1));\n\n r = r.redMul(b);\n c = b.redSqr();\n t = t.redMul(c);\n m = i;\n }\n\n return r;\n };\n\n Red.prototype.invm = function invm (a) {\n var inv = a._invmp(this.m);\n if (inv.negative !== 0) {\n inv.negative = 0;\n return this.imod(inv).redNeg();\n } else {\n return this.imod(inv);\n }\n };\n\n Red.prototype.pow = function pow (a, num) {\n if (num.isZero()) return new BN(1).toRed(this);\n if (num.cmpn(1) === 0) return a.clone();\n\n var windowSize = 4;\n var wnd = new Array(1 << windowSize);\n wnd[0] = new BN(1).toRed(this);\n wnd[1] = a;\n for (var i = 2; i < wnd.length; i++) {\n wnd[i] = this.mul(wnd[i - 1], a);\n }\n\n var res = wnd[0];\n var current = 0;\n var currentLen = 0;\n var start = num.bitLength() % 26;\n if (start === 0) {\n start = 26;\n }\n\n for (i = num.length - 1; i >= 0; i--) {\n var word = num.words[i];\n for (var j = start - 1; j >= 0; j--) {\n var bit = (word >> j) & 1;\n if (res !== wnd[0]) {\n res = this.sqr(res);\n }\n\n if (bit === 0 && current === 0) {\n currentLen = 0;\n continue;\n }\n\n current <<= 1;\n current |= bit;\n currentLen++;\n if (currentLen !== windowSize && (i !== 0 || j !== 0)) continue;\n\n res = this.mul(res, wnd[current]);\n currentLen = 0;\n current = 0;\n }\n start = 26;\n }\n\n return res;\n };\n\n Red.prototype.convertTo = function convertTo (num) {\n var r = num.umod(this.m);\n\n return r === num ? r.clone() : r;\n };\n\n Red.prototype.convertFrom = function convertFrom (num) {\n var res = num.clone();\n res.red = null;\n return res;\n };\n\n //\n // Montgomery method engine\n //\n\n BN.mont = function mont (num) {\n return new Mont(num);\n };\n\n function Mont (m) {\n Red.call(this, m);\n\n this.shift = this.m.bitLength();\n if (this.shift % 26 !== 0) {\n this.shift += 26 - (this.shift % 26);\n }\n\n this.r = new BN(1).iushln(this.shift);\n this.r2 = this.imod(this.r.sqr());\n this.rinv = this.r._invmp(this.m);\n\n this.minv = this.rinv.mul(this.r).isubn(1).div(this.m);\n this.minv = this.minv.umod(this.r);\n this.minv = this.r.sub(this.minv);\n }\n inherits(Mont, Red);\n\n Mont.prototype.convertTo = function convertTo (num) {\n return this.imod(num.ushln(this.shift));\n };\n\n Mont.prototype.convertFrom = function convertFrom (num) {\n var r = this.imod(num.mul(this.rinv));\n r.red = null;\n return r;\n };\n\n Mont.prototype.imul = function imul (a, b) {\n if (a.isZero() || b.isZero()) {\n a.words[0] = 0;\n a.length = 1;\n return a;\n }\n\n var t = a.imul(b);\n var c = t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m);\n var u = t.isub(c).iushrn(this.shift);\n var res = u;\n\n if (u.cmp(this.m) >= 0) {\n res = u.isub(this.m);\n } else if (u.cmpn(0) < 0) {\n res = u.iadd(this.m);\n }\n\n return res._forceRed(this);\n };\n\n Mont.prototype.mul = function mul (a, b) {\n if (a.isZero() || b.isZero()) return new BN(0)._forceRed(this);\n\n var t = a.mul(b);\n var c = t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m);\n var u = t.isub(c).iushrn(this.shift);\n var res = u;\n if (u.cmp(this.m) >= 0) {\n res = u.isub(this.m);\n } else if (u.cmpn(0) < 0) {\n res = u.iadd(this.m);\n }\n\n return res._forceRed(this);\n };\n\n Mont.prototype.invm = function invm (a) {\n // (AR)^-1 * R^2 = (A^-1 * R^-1) * R^2 = A^-1 * R\n var res = this.imod(a._invmp(this.m).mul(this.r2));\n return res._forceRed(this);\n };\n})(typeof module === 'undefined' || module, this);\n","var parseKeys = require('parse-asn1')\nvar mgf = require('./mgf')\nvar xor = require('./xor')\nvar BN = require('bn.js')\nvar crt = require('browserify-rsa')\nvar createHash = require('create-hash')\nvar withPublic = require('./withPublic')\nvar Buffer = require('safe-buffer').Buffer\n\nmodule.exports = function privateDecrypt (privateKey, enc, reverse) {\n var padding\n if (privateKey.padding) {\n padding = privateKey.padding\n } else if (reverse) {\n padding = 1\n } else {\n padding = 4\n }\n\n var key = parseKeys(privateKey)\n var k = key.modulus.byteLength()\n if (enc.length > k || new BN(enc).cmp(key.modulus) >= 0) {\n throw new Error('decryption error')\n }\n var msg\n if (reverse) {\n msg = withPublic(new BN(enc), key)\n } else {\n msg = crt(enc, key)\n }\n var zBuffer = Buffer.alloc(k - msg.length)\n msg = Buffer.concat([zBuffer, msg], k)\n if (padding === 4) {\n return oaep(key, msg)\n } else if (padding === 1) {\n return pkcs1(key, msg, reverse)\n } else if (padding === 3) {\n return msg\n } else {\n throw new Error('unknown padding')\n }\n}\n\nfunction oaep (key, msg) {\n var k = key.modulus.byteLength()\n var iHash = createHash('sha1').update(Buffer.alloc(0)).digest()\n var hLen = iHash.length\n if (msg[0] !== 0) {\n throw new Error('decryption error')\n }\n var maskedSeed = msg.slice(1, hLen + 1)\n var maskedDb = msg.slice(hLen + 1)\n var seed = xor(maskedSeed, mgf(maskedDb, hLen))\n var db = xor(maskedDb, mgf(seed, k - hLen - 1))\n if (compare(iHash, db.slice(0, hLen))) {\n throw new Error('decryption error')\n }\n var i = hLen\n while (db[i] === 0) {\n i++\n }\n if (db[i++] !== 1) {\n throw new Error('decryption error')\n }\n return db.slice(i)\n}\n\nfunction pkcs1 (key, msg, reverse) {\n var p1 = msg.slice(0, 2)\n var i = 2\n var status = 0\n while (msg[i++] !== 0) {\n if (i >= msg.length) {\n status++\n break\n }\n }\n var ps = msg.slice(2, i - 1)\n\n if ((p1.toString('hex') !== '0002' && !reverse) || (p1.toString('hex') !== '0001' && reverse)) {\n status++\n }\n if (ps.length < 8) {\n status++\n }\n if (status) {\n throw new Error('decryption error')\n }\n return msg.slice(i)\n}\nfunction compare (a, b) {\n a = Buffer.from(a)\n b = Buffer.from(b)\n var dif = 0\n var len = a.length\n if (a.length !== b.length) {\n dif++\n len = Math.min(a.length, b.length)\n }\n var i = -1\n while (++i < len) {\n dif += (a[i] ^ b[i])\n }\n return dif\n}\n","var parseKeys = require('parse-asn1')\nvar randomBytes = require('randombytes')\nvar createHash = require('create-hash')\nvar mgf = require('./mgf')\nvar xor = require('./xor')\nvar BN = require('bn.js')\nvar withPublic = require('./withPublic')\nvar crt = require('browserify-rsa')\nvar Buffer = require('safe-buffer').Buffer\n\nmodule.exports = function publicEncrypt (publicKey, msg, reverse) {\n var padding\n if (publicKey.padding) {\n padding = publicKey.padding\n } else if (reverse) {\n padding = 1\n } else {\n padding = 4\n }\n var key = parseKeys(publicKey)\n var paddedMsg\n if (padding === 4) {\n paddedMsg = oaep(key, msg)\n } else if (padding === 1) {\n paddedMsg = pkcs1(key, msg, reverse)\n } else if (padding === 3) {\n paddedMsg = new BN(msg)\n if (paddedMsg.cmp(key.modulus) >= 0) {\n throw new Error('data too long for modulus')\n }\n } else {\n throw new Error('unknown padding')\n }\n if (reverse) {\n return crt(paddedMsg, key)\n } else {\n return withPublic(paddedMsg, key)\n }\n}\n\nfunction oaep (key, msg) {\n var k = key.modulus.byteLength()\n var mLen = msg.length\n var iHash = createHash('sha1').update(Buffer.alloc(0)).digest()\n var hLen = iHash.length\n var hLen2 = 2 * hLen\n if (mLen > k - hLen2 - 2) {\n throw new Error('message too long')\n }\n var ps = Buffer.alloc(k - mLen - hLen2 - 2)\n var dblen = k - hLen - 1\n var seed = randomBytes(hLen)\n var maskedDb = xor(Buffer.concat([iHash, ps, Buffer.alloc(1, 1), msg], dblen), mgf(seed, dblen))\n var maskedSeed = xor(seed, mgf(maskedDb, hLen))\n return new BN(Buffer.concat([Buffer.alloc(1), maskedSeed, maskedDb], k))\n}\nfunction pkcs1 (key, msg, reverse) {\n var mLen = msg.length\n var k = key.modulus.byteLength()\n if (mLen > k - 11) {\n throw new Error('message too long')\n }\n var ps\n if (reverse) {\n ps = Buffer.alloc(k - mLen - 3, 0xff)\n } else {\n ps = nonZero(k - mLen - 3)\n }\n return new BN(Buffer.concat([Buffer.from([0, reverse ? 1 : 2]), ps, Buffer.alloc(1), msg], k))\n}\nfunction nonZero (len) {\n var out = Buffer.allocUnsafe(len)\n var i = 0\n var cache = randomBytes(len * 2)\n var cur = 0\n var num\n while (i < len) {\n if (cur === cache.length) {\n cache = randomBytes(len * 2)\n cur = 0\n }\n num = cache[cur++]\n if (num) {\n out[i++] = num\n }\n }\n return out\n}\n","var BN = require('bn.js')\nvar Buffer = require('safe-buffer').Buffer\n\nfunction withPublic (paddedMsg, key) {\n return Buffer.from(paddedMsg\n .toRed(BN.mont(key.modulus))\n .redPow(new BN(key.publicExponent))\n .fromRed()\n .toArray())\n}\n\nmodule.exports = withPublic\n","module.exports = function xor (a, b) {\n var len = a.length\n var i = -1\n while (++i < len) {\n a[i] ^= b[i]\n }\n return a\n}\n","'use strict'\n\n// limit of Crypto.getRandomValues()\n// https://developer.mozilla.org/en-US/docs/Web/API/Crypto/getRandomValues\nvar MAX_BYTES = 65536\n\n// Node supports requesting up to this number of bytes\n// https://github.com/nodejs/node/blob/master/lib/internal/crypto/random.js#L48\nvar MAX_UINT32 = 4294967295\n\nfunction oldBrowser () {\n throw new Error('Secure random number generation is not supported by this browser.\\nUse Chrome, Firefox or Internet Explorer 11')\n}\n\nvar Buffer = require('safe-buffer').Buffer\nvar crypto = global.crypto || global.msCrypto\n\nif (crypto && crypto.getRandomValues) {\n module.exports = randomBytes\n} else {\n module.exports = oldBrowser\n}\n\nfunction randomBytes (size, cb) {\n // phantomjs needs to throw\n if (size > MAX_UINT32) throw new RangeError('requested too many random bytes')\n\n var bytes = Buffer.allocUnsafe(size)\n\n if (size > 0) { // getRandomValues fails on IE if size == 0\n if (size > MAX_BYTES) { // this is the max bytes crypto.getRandomValues\n // can do at once see https://developer.mozilla.org/en-US/docs/Web/API/window.crypto.getRandomValues\n for (var generated = 0; generated < size; generated += MAX_BYTES) {\n // buffer.slice automatically checks if the end is past the end of\n // the buffer so we don't have to here\n crypto.getRandomValues(bytes.slice(generated, generated + MAX_BYTES))\n }\n } else {\n crypto.getRandomValues(bytes)\n }\n }\n\n if (typeof cb === 'function') {\n return process.nextTick(function () {\n cb(null, bytes)\n })\n }\n\n return bytes\n}\n","'use strict'\n\nfunction oldBrowser () {\n throw new Error('secure random number generation not supported by this browser\\nuse chrome, FireFox or Internet Explorer 11')\n}\nvar safeBuffer = require('safe-buffer')\nvar randombytes = require('randombytes')\nvar Buffer = safeBuffer.Buffer\nvar kBufferMaxLength = safeBuffer.kMaxLength\nvar crypto = global.crypto || global.msCrypto\nvar kMaxUint32 = Math.pow(2, 32) - 1\nfunction assertOffset (offset, length) {\n if (typeof offset !== 'number' || offset !== offset) { // eslint-disable-line no-self-compare\n throw new TypeError('offset must be a number')\n }\n\n if (offset > kMaxUint32 || offset < 0) {\n throw new TypeError('offset must be a uint32')\n }\n\n if (offset > kBufferMaxLength || offset > length) {\n throw new RangeError('offset out of range')\n }\n}\n\nfunction assertSize (size, offset, length) {\n if (typeof size !== 'number' || size !== size) { // eslint-disable-line no-self-compare\n throw new TypeError('size must be a number')\n }\n\n if (size > kMaxUint32 || size < 0) {\n throw new TypeError('size must be a uint32')\n }\n\n if (size + offset > length || size > kBufferMaxLength) {\n throw new RangeError('buffer too small')\n }\n}\nif ((crypto && crypto.getRandomValues) || !process.browser) {\n exports.randomFill = randomFill\n exports.randomFillSync = randomFillSync\n} else {\n exports.randomFill = oldBrowser\n exports.randomFillSync = oldBrowser\n}\nfunction randomFill (buf, offset, size, cb) {\n if (!Buffer.isBuffer(buf) && !(buf instanceof global.Uint8Array)) {\n throw new TypeError('\"buf\" argument must be a Buffer or Uint8Array')\n }\n\n if (typeof offset === 'function') {\n cb = offset\n offset = 0\n size = buf.length\n } else if (typeof size === 'function') {\n cb = size\n size = buf.length - offset\n } else if (typeof cb !== 'function') {\n throw new TypeError('\"cb\" argument must be a function')\n }\n assertOffset(offset, buf.length)\n assertSize(size, offset, buf.length)\n return actualFill(buf, offset, size, cb)\n}\n\nfunction actualFill (buf, offset, size, cb) {\n if (process.browser) {\n var ourBuf = buf.buffer\n var uint = new Uint8Array(ourBuf, offset, size)\n crypto.getRandomValues(uint)\n if (cb) {\n process.nextTick(function () {\n cb(null, buf)\n })\n return\n }\n return buf\n }\n if (cb) {\n randombytes(size, function (err, bytes) {\n if (err) {\n return cb(err)\n }\n bytes.copy(buf, offset)\n cb(null, buf)\n })\n return\n }\n var bytes = randombytes(size)\n bytes.copy(buf, offset)\n return buf\n}\nfunction randomFillSync (buf, offset, size) {\n if (typeof offset === 'undefined') {\n offset = 0\n }\n if (!Buffer.isBuffer(buf) && !(buf instanceof global.Uint8Array)) {\n throw new TypeError('\"buf\" argument must be a Buffer or Uint8Array')\n }\n\n assertOffset(offset, buf.length)\n\n if (size === undefined) size = buf.length - offset\n\n assertSize(size, offset, buf.length)\n\n return actualFill(buf, offset, size)\n}\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n// a duplex stream is just a stream that is both readable and writable.\n// Since JS doesn't have multiple prototypal inheritance, this class\n// prototypally inherits from Readable, and then parasitically from\n// Writable.\n\n'use strict';\n\n/**/\n\nvar pna = require('process-nextick-args');\n/**/\n\n/**/\nvar objectKeys = Object.keys || function (obj) {\n var keys = [];\n for (var key in obj) {\n keys.push(key);\n }return keys;\n};\n/**/\n\nmodule.exports = Duplex;\n\n/**/\nvar util = Object.create(require('core-util-is'));\nutil.inherits = require('inherits');\n/**/\n\nvar Readable = require('./_stream_readable');\nvar Writable = require('./_stream_writable');\n\nutil.inherits(Duplex, Readable);\n\n{\n // avoid scope creep, the keys array can then be collected\n var keys = objectKeys(Writable.prototype);\n for (var v = 0; v < keys.length; v++) {\n var method = keys[v];\n if (!Duplex.prototype[method]) Duplex.prototype[method] = Writable.prototype[method];\n }\n}\n\nfunction Duplex(options) {\n if (!(this instanceof Duplex)) return new Duplex(options);\n\n Readable.call(this, options);\n Writable.call(this, options);\n\n if (options && options.readable === false) this.readable = false;\n\n if (options && options.writable === false) this.writable = false;\n\n this.allowHalfOpen = true;\n if (options && options.allowHalfOpen === false) this.allowHalfOpen = false;\n\n this.once('end', onend);\n}\n\nObject.defineProperty(Duplex.prototype, 'writableHighWaterMark', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function () {\n return this._writableState.highWaterMark;\n }\n});\n\n// the no-half-open enforcer\nfunction onend() {\n // if we allow half-open state, or if the writable side ended,\n // then we're ok.\n if (this.allowHalfOpen || this._writableState.ended) return;\n\n // no more data can be written.\n // But allow more writes to happen in this tick.\n pna.nextTick(onEndNT, this);\n}\n\nfunction onEndNT(self) {\n self.end();\n}\n\nObject.defineProperty(Duplex.prototype, 'destroyed', {\n get: function () {\n if (this._readableState === undefined || this._writableState === undefined) {\n return false;\n }\n return this._readableState.destroyed && this._writableState.destroyed;\n },\n set: function (value) {\n // we ignore the value if the stream\n // has not been initialized yet\n if (this._readableState === undefined || this._writableState === undefined) {\n return;\n }\n\n // backward compatibility, the user is explicitly\n // managing destroyed\n this._readableState.destroyed = value;\n this._writableState.destroyed = value;\n }\n});\n\nDuplex.prototype._destroy = function (err, cb) {\n this.push(null);\n this.end();\n\n pna.nextTick(cb, err);\n};","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n// a passthrough stream.\n// basically just the most minimal sort of Transform stream.\n// Every written chunk gets output as-is.\n\n'use strict';\n\nmodule.exports = PassThrough;\n\nvar Transform = require('./_stream_transform');\n\n/**/\nvar util = Object.create(require('core-util-is'));\nutil.inherits = require('inherits');\n/**/\n\nutil.inherits(PassThrough, Transform);\n\nfunction PassThrough(options) {\n if (!(this instanceof PassThrough)) return new PassThrough(options);\n\n Transform.call(this, options);\n}\n\nPassThrough.prototype._transform = function (chunk, encoding, cb) {\n cb(null, chunk);\n};","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\n/**/\n\nvar pna = require('process-nextick-args');\n/**/\n\nmodule.exports = Readable;\n\n/**/\nvar isArray = require('isarray');\n/**/\n\n/**/\nvar Duplex;\n/**/\n\nReadable.ReadableState = ReadableState;\n\n/**/\nvar EE = require('events').EventEmitter;\n\nvar EElistenerCount = function (emitter, type) {\n return emitter.listeners(type).length;\n};\n/**/\n\n/**/\nvar Stream = require('./internal/streams/stream');\n/**/\n\n/**/\n\nvar Buffer = require('safe-buffer').Buffer;\nvar OurUint8Array = (typeof global !== 'undefined' ? global : typeof window !== 'undefined' ? window : typeof self !== 'undefined' ? self : {}).Uint8Array || function () {};\nfunction _uint8ArrayToBuffer(chunk) {\n return Buffer.from(chunk);\n}\nfunction _isUint8Array(obj) {\n return Buffer.isBuffer(obj) || obj instanceof OurUint8Array;\n}\n\n/**/\n\n/**/\nvar util = Object.create(require('core-util-is'));\nutil.inherits = require('inherits');\n/**/\n\n/**/\nvar debugUtil = require('util');\nvar debug = void 0;\nif (debugUtil && debugUtil.debuglog) {\n debug = debugUtil.debuglog('stream');\n} else {\n debug = function () {};\n}\n/**/\n\nvar BufferList = require('./internal/streams/BufferList');\nvar destroyImpl = require('./internal/streams/destroy');\nvar StringDecoder;\n\nutil.inherits(Readable, Stream);\n\nvar kProxyEvents = ['error', 'close', 'destroy', 'pause', 'resume'];\n\nfunction prependListener(emitter, event, fn) {\n // Sadly this is not cacheable as some libraries bundle their own\n // event emitter implementation with them.\n if (typeof emitter.prependListener === 'function') return emitter.prependListener(event, fn);\n\n // This is a hack to make sure that our error handler is attached before any\n // userland ones. NEVER DO THIS. This is here only because this code needs\n // to continue to work with older versions of Node.js that do not include\n // the prependListener() method. The goal is to eventually remove this hack.\n if (!emitter._events || !emitter._events[event]) emitter.on(event, fn);else if (isArray(emitter._events[event])) emitter._events[event].unshift(fn);else emitter._events[event] = [fn, emitter._events[event]];\n}\n\nfunction ReadableState(options, stream) {\n Duplex = Duplex || require('./_stream_duplex');\n\n options = options || {};\n\n // Duplex streams are both readable and writable, but share\n // the same options object.\n // However, some cases require setting options to different\n // values for the readable and the writable sides of the duplex stream.\n // These options can be provided separately as readableXXX and writableXXX.\n var isDuplex = stream instanceof Duplex;\n\n // object stream flag. Used to make read(n) ignore n and to\n // make all the buffer merging and length checks go away\n this.objectMode = !!options.objectMode;\n\n if (isDuplex) this.objectMode = this.objectMode || !!options.readableObjectMode;\n\n // the point at which it stops calling _read() to fill the buffer\n // Note: 0 is a valid value, means \"don't call _read preemptively ever\"\n var hwm = options.highWaterMark;\n var readableHwm = options.readableHighWaterMark;\n var defaultHwm = this.objectMode ? 16 : 16 * 1024;\n\n if (hwm || hwm === 0) this.highWaterMark = hwm;else if (isDuplex && (readableHwm || readableHwm === 0)) this.highWaterMark = readableHwm;else this.highWaterMark = defaultHwm;\n\n // cast to ints.\n this.highWaterMark = Math.floor(this.highWaterMark);\n\n // A linked list is used to store data chunks instead of an array because the\n // linked list can remove elements from the beginning faster than\n // array.shift()\n this.buffer = new BufferList();\n this.length = 0;\n this.pipes = null;\n this.pipesCount = 0;\n this.flowing = null;\n this.ended = false;\n this.endEmitted = false;\n this.reading = false;\n\n // a flag to be able to tell if the event 'readable'/'data' is emitted\n // immediately, or on a later tick. We set this to true at first, because\n // any actions that shouldn't happen until \"later\" should generally also\n // not happen before the first read call.\n this.sync = true;\n\n // whenever we return null, then we set a flag to say\n // that we're awaiting a 'readable' event emission.\n this.needReadable = false;\n this.emittedReadable = false;\n this.readableListening = false;\n this.resumeScheduled = false;\n\n // has it been destroyed\n this.destroyed = false;\n\n // Crypto is kind of old and crusty. Historically, its default string\n // encoding is 'binary' so we have to make this configurable.\n // Everything else in the universe uses 'utf8', though.\n this.defaultEncoding = options.defaultEncoding || 'utf8';\n\n // the number of writers that are awaiting a drain event in .pipe()s\n this.awaitDrain = 0;\n\n // if true, a maybeReadMore has been scheduled\n this.readingMore = false;\n\n this.decoder = null;\n this.encoding = null;\n if (options.encoding) {\n if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder;\n this.decoder = new StringDecoder(options.encoding);\n this.encoding = options.encoding;\n }\n}\n\nfunction Readable(options) {\n Duplex = Duplex || require('./_stream_duplex');\n\n if (!(this instanceof Readable)) return new Readable(options);\n\n this._readableState = new ReadableState(options, this);\n\n // legacy\n this.readable = true;\n\n if (options) {\n if (typeof options.read === 'function') this._read = options.read;\n\n if (typeof options.destroy === 'function') this._destroy = options.destroy;\n }\n\n Stream.call(this);\n}\n\nObject.defineProperty(Readable.prototype, 'destroyed', {\n get: function () {\n if (this._readableState === undefined) {\n return false;\n }\n return this._readableState.destroyed;\n },\n set: function (value) {\n // we ignore the value if the stream\n // has not been initialized yet\n if (!this._readableState) {\n return;\n }\n\n // backward compatibility, the user is explicitly\n // managing destroyed\n this._readableState.destroyed = value;\n }\n});\n\nReadable.prototype.destroy = destroyImpl.destroy;\nReadable.prototype._undestroy = destroyImpl.undestroy;\nReadable.prototype._destroy = function (err, cb) {\n this.push(null);\n cb(err);\n};\n\n// Manually shove something into the read() buffer.\n// This returns true if the highWaterMark has not been hit yet,\n// similar to how Writable.write() returns true if you should\n// write() some more.\nReadable.prototype.push = function (chunk, encoding) {\n var state = this._readableState;\n var skipChunkCheck;\n\n if (!state.objectMode) {\n if (typeof chunk === 'string') {\n encoding = encoding || state.defaultEncoding;\n if (encoding !== state.encoding) {\n chunk = Buffer.from(chunk, encoding);\n encoding = '';\n }\n skipChunkCheck = true;\n }\n } else {\n skipChunkCheck = true;\n }\n\n return readableAddChunk(this, chunk, encoding, false, skipChunkCheck);\n};\n\n// Unshift should *always* be something directly out of read()\nReadable.prototype.unshift = function (chunk) {\n return readableAddChunk(this, chunk, null, true, false);\n};\n\nfunction readableAddChunk(stream, chunk, encoding, addToFront, skipChunkCheck) {\n var state = stream._readableState;\n if (chunk === null) {\n state.reading = false;\n onEofChunk(stream, state);\n } else {\n var er;\n if (!skipChunkCheck) er = chunkInvalid(state, chunk);\n if (er) {\n stream.emit('error', er);\n } else if (state.objectMode || chunk && chunk.length > 0) {\n if (typeof chunk !== 'string' && !state.objectMode && Object.getPrototypeOf(chunk) !== Buffer.prototype) {\n chunk = _uint8ArrayToBuffer(chunk);\n }\n\n if (addToFront) {\n if (state.endEmitted) stream.emit('error', new Error('stream.unshift() after end event'));else addChunk(stream, state, chunk, true);\n } else if (state.ended) {\n stream.emit('error', new Error('stream.push() after EOF'));\n } else {\n state.reading = false;\n if (state.decoder && !encoding) {\n chunk = state.decoder.write(chunk);\n if (state.objectMode || chunk.length !== 0) addChunk(stream, state, chunk, false);else maybeReadMore(stream, state);\n } else {\n addChunk(stream, state, chunk, false);\n }\n }\n } else if (!addToFront) {\n state.reading = false;\n }\n }\n\n return needMoreData(state);\n}\n\nfunction addChunk(stream, state, chunk, addToFront) {\n if (state.flowing && state.length === 0 && !state.sync) {\n stream.emit('data', chunk);\n stream.read(0);\n } else {\n // update the buffer info.\n state.length += state.objectMode ? 1 : chunk.length;\n if (addToFront) state.buffer.unshift(chunk);else state.buffer.push(chunk);\n\n if (state.needReadable) emitReadable(stream);\n }\n maybeReadMore(stream, state);\n}\n\nfunction chunkInvalid(state, chunk) {\n var er;\n if (!_isUint8Array(chunk) && typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {\n er = new TypeError('Invalid non-string/buffer chunk');\n }\n return er;\n}\n\n// if it's past the high water mark, we can push in some more.\n// Also, if we have no data yet, we can stand some\n// more bytes. This is to work around cases where hwm=0,\n// such as the repl. Also, if the push() triggered a\n// readable event, and the user called read(largeNumber) such that\n// needReadable was set, then we ought to push more, so that another\n// 'readable' event will be triggered.\nfunction needMoreData(state) {\n return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);\n}\n\nReadable.prototype.isPaused = function () {\n return this._readableState.flowing === false;\n};\n\n// backwards compatibility.\nReadable.prototype.setEncoding = function (enc) {\n if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder;\n this._readableState.decoder = new StringDecoder(enc);\n this._readableState.encoding = enc;\n return this;\n};\n\n// Don't raise the hwm > 8MB\nvar MAX_HWM = 0x800000;\nfunction computeNewHighWaterMark(n) {\n if (n >= MAX_HWM) {\n n = MAX_HWM;\n } else {\n // Get the next highest power of 2 to prevent increasing hwm excessively in\n // tiny amounts\n n--;\n n |= n >>> 1;\n n |= n >>> 2;\n n |= n >>> 4;\n n |= n >>> 8;\n n |= n >>> 16;\n n++;\n }\n return n;\n}\n\n// This function is designed to be inlinable, so please take care when making\n// changes to the function body.\nfunction howMuchToRead(n, state) {\n if (n <= 0 || state.length === 0 && state.ended) return 0;\n if (state.objectMode) return 1;\n if (n !== n) {\n // Only flow one buffer at a time\n if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length;\n }\n // If we're asking for more than the current hwm, then raise the hwm.\n if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n);\n if (n <= state.length) return n;\n // Don't have enough\n if (!state.ended) {\n state.needReadable = true;\n return 0;\n }\n return state.length;\n}\n\n// you can override either this method, or the async _read(n) below.\nReadable.prototype.read = function (n) {\n debug('read', n);\n n = parseInt(n, 10);\n var state = this._readableState;\n var nOrig = n;\n\n if (n !== 0) state.emittedReadable = false;\n\n // if we're doing read(0) to trigger a readable event, but we\n // already have a bunch of data in the buffer, then just trigger\n // the 'readable' event and move on.\n if (n === 0 && state.needReadable && (state.length >= state.highWaterMark || state.ended)) {\n debug('read: emitReadable', state.length, state.ended);\n if (state.length === 0 && state.ended) endReadable(this);else emitReadable(this);\n return null;\n }\n\n n = howMuchToRead(n, state);\n\n // if we've ended, and we're now clear, then finish it up.\n if (n === 0 && state.ended) {\n if (state.length === 0) endReadable(this);\n return null;\n }\n\n // All the actual chunk generation logic needs to be\n // *below* the call to _read. The reason is that in certain\n // synthetic stream cases, such as passthrough streams, _read\n // may be a completely synchronous operation which may change\n // the state of the read buffer, providing enough data when\n // before there was *not* enough.\n //\n // So, the steps are:\n // 1. Figure out what the state of things will be after we do\n // a read from the buffer.\n //\n // 2. If that resulting state will trigger a _read, then call _read.\n // Note that this may be asynchronous, or synchronous. Yes, it is\n // deeply ugly to write APIs this way, but that still doesn't mean\n // that the Readable class should behave improperly, as streams are\n // designed to be sync/async agnostic.\n // Take note if the _read call is sync or async (ie, if the read call\n // has returned yet), so that we know whether or not it's safe to emit\n // 'readable' etc.\n //\n // 3. Actually pull the requested chunks out of the buffer and return.\n\n // if we need a readable event, then we need to do some reading.\n var doRead = state.needReadable;\n debug('need readable', doRead);\n\n // if we currently have less than the highWaterMark, then also read some\n if (state.length === 0 || state.length - n < state.highWaterMark) {\n doRead = true;\n debug('length less than watermark', doRead);\n }\n\n // however, if we've ended, then there's no point, and if we're already\n // reading, then it's unnecessary.\n if (state.ended || state.reading) {\n doRead = false;\n debug('reading or ended', doRead);\n } else if (doRead) {\n debug('do read');\n state.reading = true;\n state.sync = true;\n // if the length is currently zero, then we *need* a readable event.\n if (state.length === 0) state.needReadable = true;\n // call internal read method\n this._read(state.highWaterMark);\n state.sync = false;\n // If _read pushed data synchronously, then `reading` will be false,\n // and we need to re-evaluate how much data we can return to the user.\n if (!state.reading) n = howMuchToRead(nOrig, state);\n }\n\n var ret;\n if (n > 0) ret = fromList(n, state);else ret = null;\n\n if (ret === null) {\n state.needReadable = true;\n n = 0;\n } else {\n state.length -= n;\n }\n\n if (state.length === 0) {\n // If we have nothing in the buffer, then we want to know\n // as soon as we *do* get something into the buffer.\n if (!state.ended) state.needReadable = true;\n\n // If we tried to read() past the EOF, then emit end on the next tick.\n if (nOrig !== n && state.ended) endReadable(this);\n }\n\n if (ret !== null) this.emit('data', ret);\n\n return ret;\n};\n\nfunction onEofChunk(stream, state) {\n if (state.ended) return;\n if (state.decoder) {\n var chunk = state.decoder.end();\n if (chunk && chunk.length) {\n state.buffer.push(chunk);\n state.length += state.objectMode ? 1 : chunk.length;\n }\n }\n state.ended = true;\n\n // emit 'readable' now to make sure it gets picked up.\n emitReadable(stream);\n}\n\n// Don't emit readable right away in sync mode, because this can trigger\n// another read() call => stack overflow. This way, it might trigger\n// a nextTick recursion warning, but that's not so bad.\nfunction emitReadable(stream) {\n var state = stream._readableState;\n state.needReadable = false;\n if (!state.emittedReadable) {\n debug('emitReadable', state.flowing);\n state.emittedReadable = true;\n if (state.sync) pna.nextTick(emitReadable_, stream);else emitReadable_(stream);\n }\n}\n\nfunction emitReadable_(stream) {\n debug('emit readable');\n stream.emit('readable');\n flow(stream);\n}\n\n// at this point, the user has presumably seen the 'readable' event,\n// and called read() to consume some data. that may have triggered\n// in turn another _read(n) call, in which case reading = true if\n// it's in progress.\n// However, if we're not ended, or reading, and the length < hwm,\n// then go ahead and try to read some more preemptively.\nfunction maybeReadMore(stream, state) {\n if (!state.readingMore) {\n state.readingMore = true;\n pna.nextTick(maybeReadMore_, stream, state);\n }\n}\n\nfunction maybeReadMore_(stream, state) {\n var len = state.length;\n while (!state.reading && !state.flowing && !state.ended && state.length < state.highWaterMark) {\n debug('maybeReadMore read 0');\n stream.read(0);\n if (len === state.length)\n // didn't get any data, stop spinning.\n break;else len = state.length;\n }\n state.readingMore = false;\n}\n\n// abstract method. to be overridden in specific implementation classes.\n// call cb(er, data) where data is <= n in length.\n// for virtual (non-string, non-buffer) streams, \"length\" is somewhat\n// arbitrary, and perhaps not very meaningful.\nReadable.prototype._read = function (n) {\n this.emit('error', new Error('_read() is not implemented'));\n};\n\nReadable.prototype.pipe = function (dest, pipeOpts) {\n var src = this;\n var state = this._readableState;\n\n switch (state.pipesCount) {\n case 0:\n state.pipes = dest;\n break;\n case 1:\n state.pipes = [state.pipes, dest];\n break;\n default:\n state.pipes.push(dest);\n break;\n }\n state.pipesCount += 1;\n debug('pipe count=%d opts=%j', state.pipesCount, pipeOpts);\n\n var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process.stdout && dest !== process.stderr;\n\n var endFn = doEnd ? onend : unpipe;\n if (state.endEmitted) pna.nextTick(endFn);else src.once('end', endFn);\n\n dest.on('unpipe', onunpipe);\n function onunpipe(readable, unpipeInfo) {\n debug('onunpipe');\n if (readable === src) {\n if (unpipeInfo && unpipeInfo.hasUnpiped === false) {\n unpipeInfo.hasUnpiped = true;\n cleanup();\n }\n }\n }\n\n function onend() {\n debug('onend');\n dest.end();\n }\n\n // when the dest drains, it reduces the awaitDrain counter\n // on the source. This would be more elegant with a .once()\n // handler in flow(), but adding and removing repeatedly is\n // too slow.\n var ondrain = pipeOnDrain(src);\n dest.on('drain', ondrain);\n\n var cleanedUp = false;\n function cleanup() {\n debug('cleanup');\n // cleanup event handlers once the pipe is broken\n dest.removeListener('close', onclose);\n dest.removeListener('finish', onfinish);\n dest.removeListener('drain', ondrain);\n dest.removeListener('error', onerror);\n dest.removeListener('unpipe', onunpipe);\n src.removeListener('end', onend);\n src.removeListener('end', unpipe);\n src.removeListener('data', ondata);\n\n cleanedUp = true;\n\n // if the reader is waiting for a drain event from this\n // specific writer, then it would cause it to never start\n // flowing again.\n // So, if this is awaiting a drain, then we just call it now.\n // If we don't know, then assume that we are waiting for one.\n if (state.awaitDrain && (!dest._writableState || dest._writableState.needDrain)) ondrain();\n }\n\n // If the user pushes more data while we're writing to dest then we'll end up\n // in ondata again. However, we only want to increase awaitDrain once because\n // dest will only emit one 'drain' event for the multiple writes.\n // => Introduce a guard on increasing awaitDrain.\n var increasedAwaitDrain = false;\n src.on('data', ondata);\n function ondata(chunk) {\n debug('ondata');\n increasedAwaitDrain = false;\n var ret = dest.write(chunk);\n if (false === ret && !increasedAwaitDrain) {\n // If the user unpiped during `dest.write()`, it is possible\n // to get stuck in a permanently paused state if that write\n // also returned false.\n // => Check whether `dest` is still a piping destination.\n if ((state.pipesCount === 1 && state.pipes === dest || state.pipesCount > 1 && indexOf(state.pipes, dest) !== -1) && !cleanedUp) {\n debug('false write response, pause', state.awaitDrain);\n state.awaitDrain++;\n increasedAwaitDrain = true;\n }\n src.pause();\n }\n }\n\n // if the dest has an error, then stop piping into it.\n // however, don't suppress the throwing behavior for this.\n function onerror(er) {\n debug('onerror', er);\n unpipe();\n dest.removeListener('error', onerror);\n if (EElistenerCount(dest, 'error') === 0) dest.emit('error', er);\n }\n\n // Make sure our error handler is attached before userland ones.\n prependListener(dest, 'error', onerror);\n\n // Both close and finish should trigger unpipe, but only once.\n function onclose() {\n dest.removeListener('finish', onfinish);\n unpipe();\n }\n dest.once('close', onclose);\n function onfinish() {\n debug('onfinish');\n dest.removeListener('close', onclose);\n unpipe();\n }\n dest.once('finish', onfinish);\n\n function unpipe() {\n debug('unpipe');\n src.unpipe(dest);\n }\n\n // tell the dest that it's being piped to\n dest.emit('pipe', src);\n\n // start the flow if it hasn't been started already.\n if (!state.flowing) {\n debug('pipe resume');\n src.resume();\n }\n\n return dest;\n};\n\nfunction pipeOnDrain(src) {\n return function () {\n var state = src._readableState;\n debug('pipeOnDrain', state.awaitDrain);\n if (state.awaitDrain) state.awaitDrain--;\n if (state.awaitDrain === 0 && EElistenerCount(src, 'data')) {\n state.flowing = true;\n flow(src);\n }\n };\n}\n\nReadable.prototype.unpipe = function (dest) {\n var state = this._readableState;\n var unpipeInfo = { hasUnpiped: false };\n\n // if we're not piping anywhere, then do nothing.\n if (state.pipesCount === 0) return this;\n\n // just one destination. most common case.\n if (state.pipesCount === 1) {\n // passed in one, but it's not the right one.\n if (dest && dest !== state.pipes) return this;\n\n if (!dest) dest = state.pipes;\n\n // got a match.\n state.pipes = null;\n state.pipesCount = 0;\n state.flowing = false;\n if (dest) dest.emit('unpipe', this, unpipeInfo);\n return this;\n }\n\n // slow case. multiple pipe destinations.\n\n if (!dest) {\n // remove all.\n var dests = state.pipes;\n var len = state.pipesCount;\n state.pipes = null;\n state.pipesCount = 0;\n state.flowing = false;\n\n for (var i = 0; i < len; i++) {\n dests[i].emit('unpipe', this, { hasUnpiped: false });\n }return this;\n }\n\n // try to find the right one.\n var index = indexOf(state.pipes, dest);\n if (index === -1) return this;\n\n state.pipes.splice(index, 1);\n state.pipesCount -= 1;\n if (state.pipesCount === 1) state.pipes = state.pipes[0];\n\n dest.emit('unpipe', this, unpipeInfo);\n\n return this;\n};\n\n// set up data events if they are asked for\n// Ensure readable listeners eventually get something\nReadable.prototype.on = function (ev, fn) {\n var res = Stream.prototype.on.call(this, ev, fn);\n\n if (ev === 'data') {\n // Start flowing on next tick if stream isn't explicitly paused\n if (this._readableState.flowing !== false) this.resume();\n } else if (ev === 'readable') {\n var state = this._readableState;\n if (!state.endEmitted && !state.readableListening) {\n state.readableListening = state.needReadable = true;\n state.emittedReadable = false;\n if (!state.reading) {\n pna.nextTick(nReadingNextTick, this);\n } else if (state.length) {\n emitReadable(this);\n }\n }\n }\n\n return res;\n};\nReadable.prototype.addListener = Readable.prototype.on;\n\nfunction nReadingNextTick(self) {\n debug('readable nexttick read 0');\n self.read(0);\n}\n\n// pause() and resume() are remnants of the legacy readable stream API\n// If the user uses them, then switch into old mode.\nReadable.prototype.resume = function () {\n var state = this._readableState;\n if (!state.flowing) {\n debug('resume');\n state.flowing = true;\n resume(this, state);\n }\n return this;\n};\n\nfunction resume(stream, state) {\n if (!state.resumeScheduled) {\n state.resumeScheduled = true;\n pna.nextTick(resume_, stream, state);\n }\n}\n\nfunction resume_(stream, state) {\n if (!state.reading) {\n debug('resume read 0');\n stream.read(0);\n }\n\n state.resumeScheduled = false;\n state.awaitDrain = 0;\n stream.emit('resume');\n flow(stream);\n if (state.flowing && !state.reading) stream.read(0);\n}\n\nReadable.prototype.pause = function () {\n debug('call pause flowing=%j', this._readableState.flowing);\n if (false !== this._readableState.flowing) {\n debug('pause');\n this._readableState.flowing = false;\n this.emit('pause');\n }\n return this;\n};\n\nfunction flow(stream) {\n var state = stream._readableState;\n debug('flow', state.flowing);\n while (state.flowing && stream.read() !== null) {}\n}\n\n// wrap an old-style stream as the async data source.\n// This is *not* part of the readable stream interface.\n// It is an ugly unfortunate mess of history.\nReadable.prototype.wrap = function (stream) {\n var _this = this;\n\n var state = this._readableState;\n var paused = false;\n\n stream.on('end', function () {\n debug('wrapped end');\n if (state.decoder && !state.ended) {\n var chunk = state.decoder.end();\n if (chunk && chunk.length) _this.push(chunk);\n }\n\n _this.push(null);\n });\n\n stream.on('data', function (chunk) {\n debug('wrapped data');\n if (state.decoder) chunk = state.decoder.write(chunk);\n\n // don't skip over falsy values in objectMode\n if (state.objectMode && (chunk === null || chunk === undefined)) return;else if (!state.objectMode && (!chunk || !chunk.length)) return;\n\n var ret = _this.push(chunk);\n if (!ret) {\n paused = true;\n stream.pause();\n }\n });\n\n // proxy all the other methods.\n // important when wrapping filters and duplexes.\n for (var i in stream) {\n if (this[i] === undefined && typeof stream[i] === 'function') {\n this[i] = function (method) {\n return function () {\n return stream[method].apply(stream, arguments);\n };\n }(i);\n }\n }\n\n // proxy certain important events.\n for (var n = 0; n < kProxyEvents.length; n++) {\n stream.on(kProxyEvents[n], this.emit.bind(this, kProxyEvents[n]));\n }\n\n // when we try to consume some more bytes, simply unpause the\n // underlying stream.\n this._read = function (n) {\n debug('wrapped _read', n);\n if (paused) {\n paused = false;\n stream.resume();\n }\n };\n\n return this;\n};\n\nObject.defineProperty(Readable.prototype, 'readableHighWaterMark', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function () {\n return this._readableState.highWaterMark;\n }\n});\n\n// exposed for testing purposes only.\nReadable._fromList = fromList;\n\n// Pluck off n bytes from an array of buffers.\n// Length is the combined lengths of all the buffers in the list.\n// This function is designed to be inlinable, so please take care when making\n// changes to the function body.\nfunction fromList(n, state) {\n // nothing buffered\n if (state.length === 0) return null;\n\n var ret;\n if (state.objectMode) ret = state.buffer.shift();else if (!n || n >= state.length) {\n // read it all, truncate the list\n if (state.decoder) ret = state.buffer.join('');else if (state.buffer.length === 1) ret = state.buffer.head.data;else ret = state.buffer.concat(state.length);\n state.buffer.clear();\n } else {\n // read part of list\n ret = fromListPartial(n, state.buffer, state.decoder);\n }\n\n return ret;\n}\n\n// Extracts only enough buffered data to satisfy the amount requested.\n// This function is designed to be inlinable, so please take care when making\n// changes to the function body.\nfunction fromListPartial(n, list, hasStrings) {\n var ret;\n if (n < list.head.data.length) {\n // slice is the same for buffers and strings\n ret = list.head.data.slice(0, n);\n list.head.data = list.head.data.slice(n);\n } else if (n === list.head.data.length) {\n // first chunk is a perfect match\n ret = list.shift();\n } else {\n // result spans more than one buffer\n ret = hasStrings ? copyFromBufferString(n, list) : copyFromBuffer(n, list);\n }\n return ret;\n}\n\n// Copies a specified amount of characters from the list of buffered data\n// chunks.\n// This function is designed to be inlinable, so please take care when making\n// changes to the function body.\nfunction copyFromBufferString(n, list) {\n var p = list.head;\n var c = 1;\n var ret = p.data;\n n -= ret.length;\n while (p = p.next) {\n var str = p.data;\n var nb = n > str.length ? str.length : n;\n if (nb === str.length) ret += str;else ret += str.slice(0, n);\n n -= nb;\n if (n === 0) {\n if (nb === str.length) {\n ++c;\n if (p.next) list.head = p.next;else list.head = list.tail = null;\n } else {\n list.head = p;\n p.data = str.slice(nb);\n }\n break;\n }\n ++c;\n }\n list.length -= c;\n return ret;\n}\n\n// Copies a specified amount of bytes from the list of buffered data chunks.\n// This function is designed to be inlinable, so please take care when making\n// changes to the function body.\nfunction copyFromBuffer(n, list) {\n var ret = Buffer.allocUnsafe(n);\n var p = list.head;\n var c = 1;\n p.data.copy(ret);\n n -= p.data.length;\n while (p = p.next) {\n var buf = p.data;\n var nb = n > buf.length ? buf.length : n;\n buf.copy(ret, ret.length - n, 0, nb);\n n -= nb;\n if (n === 0) {\n if (nb === buf.length) {\n ++c;\n if (p.next) list.head = p.next;else list.head = list.tail = null;\n } else {\n list.head = p;\n p.data = buf.slice(nb);\n }\n break;\n }\n ++c;\n }\n list.length -= c;\n return ret;\n}\n\nfunction endReadable(stream) {\n var state = stream._readableState;\n\n // If we get here before consuming all the bytes, then that is a\n // bug in node. Should never happen.\n if (state.length > 0) throw new Error('\"endReadable()\" called on non-empty stream');\n\n if (!state.endEmitted) {\n state.ended = true;\n pna.nextTick(endReadableNT, state, stream);\n }\n}\n\nfunction endReadableNT(state, stream) {\n // Check that we didn't get one last unshift.\n if (!state.endEmitted && state.length === 0) {\n state.endEmitted = true;\n stream.readable = false;\n stream.emit('end');\n }\n}\n\nfunction indexOf(xs, x) {\n for (var i = 0, l = xs.length; i < l; i++) {\n if (xs[i] === x) return i;\n }\n return -1;\n}","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n// a transform stream is a readable/writable stream where you do\n// something with the data. Sometimes it's called a \"filter\",\n// but that's not a great name for it, since that implies a thing where\n// some bits pass through, and others are simply ignored. (That would\n// be a valid example of a transform, of course.)\n//\n// While the output is causally related to the input, it's not a\n// necessarily symmetric or synchronous transformation. For example,\n// a zlib stream might take multiple plain-text writes(), and then\n// emit a single compressed chunk some time in the future.\n//\n// Here's how this works:\n//\n// The Transform stream has all the aspects of the readable and writable\n// stream classes. When you write(chunk), that calls _write(chunk,cb)\n// internally, and returns false if there's a lot of pending writes\n// buffered up. When you call read(), that calls _read(n) until\n// there's enough pending readable data buffered up.\n//\n// In a transform stream, the written data is placed in a buffer. When\n// _read(n) is called, it transforms the queued up data, calling the\n// buffered _write cb's as it consumes chunks. If consuming a single\n// written chunk would result in multiple output chunks, then the first\n// outputted bit calls the readcb, and subsequent chunks just go into\n// the read buffer, and will cause it to emit 'readable' if necessary.\n//\n// This way, back-pressure is actually determined by the reading side,\n// since _read has to be called to start processing a new chunk. However,\n// a pathological inflate type of transform can cause excessive buffering\n// here. For example, imagine a stream where every byte of input is\n// interpreted as an integer from 0-255, and then results in that many\n// bytes of output. Writing the 4 bytes {ff,ff,ff,ff} would result in\n// 1kb of data being output. In this case, you could write a very small\n// amount of input, and end up with a very large amount of output. In\n// such a pathological inflating mechanism, there'd be no way to tell\n// the system to stop doing the transform. A single 4MB write could\n// cause the system to run out of memory.\n//\n// However, even in such a pathological case, only a single written chunk\n// would be consumed, and then the rest would wait (un-transformed) until\n// the results of the previous transformed chunk were consumed.\n\n'use strict';\n\nmodule.exports = Transform;\n\nvar Duplex = require('./_stream_duplex');\n\n/**/\nvar util = Object.create(require('core-util-is'));\nutil.inherits = require('inherits');\n/**/\n\nutil.inherits(Transform, Duplex);\n\nfunction afterTransform(er, data) {\n var ts = this._transformState;\n ts.transforming = false;\n\n var cb = ts.writecb;\n\n if (!cb) {\n return this.emit('error', new Error('write callback called multiple times'));\n }\n\n ts.writechunk = null;\n ts.writecb = null;\n\n if (data != null) // single equals check for both `null` and `undefined`\n this.push(data);\n\n cb(er);\n\n var rs = this._readableState;\n rs.reading = false;\n if (rs.needReadable || rs.length < rs.highWaterMark) {\n this._read(rs.highWaterMark);\n }\n}\n\nfunction Transform(options) {\n if (!(this instanceof Transform)) return new Transform(options);\n\n Duplex.call(this, options);\n\n this._transformState = {\n afterTransform: afterTransform.bind(this),\n needTransform: false,\n transforming: false,\n writecb: null,\n writechunk: null,\n writeencoding: null\n };\n\n // start out asking for a readable event once data is transformed.\n this._readableState.needReadable = true;\n\n // we have implemented the _read method, and done the other things\n // that Readable wants before the first _read call, so unset the\n // sync guard flag.\n this._readableState.sync = false;\n\n if (options) {\n if (typeof options.transform === 'function') this._transform = options.transform;\n\n if (typeof options.flush === 'function') this._flush = options.flush;\n }\n\n // When the writable side finishes, then flush out anything remaining.\n this.on('prefinish', prefinish);\n}\n\nfunction prefinish() {\n var _this = this;\n\n if (typeof this._flush === 'function') {\n this._flush(function (er, data) {\n done(_this, er, data);\n });\n } else {\n done(this, null, null);\n }\n}\n\nTransform.prototype.push = function (chunk, encoding) {\n this._transformState.needTransform = false;\n return Duplex.prototype.push.call(this, chunk, encoding);\n};\n\n// This is the part where you do stuff!\n// override this function in implementation classes.\n// 'chunk' is an input chunk.\n//\n// Call `push(newChunk)` to pass along transformed output\n// to the readable side. You may call 'push' zero or more times.\n//\n// Call `cb(err)` when you are done with this chunk. If you pass\n// an error, then that'll put the hurt on the whole operation. If you\n// never call cb(), then you'll never get another chunk.\nTransform.prototype._transform = function (chunk, encoding, cb) {\n throw new Error('_transform() is not implemented');\n};\n\nTransform.prototype._write = function (chunk, encoding, cb) {\n var ts = this._transformState;\n ts.writecb = cb;\n ts.writechunk = chunk;\n ts.writeencoding = encoding;\n if (!ts.transforming) {\n var rs = this._readableState;\n if (ts.needTransform || rs.needReadable || rs.length < rs.highWaterMark) this._read(rs.highWaterMark);\n }\n};\n\n// Doesn't matter what the args are here.\n// _transform does all the work.\n// That we got here means that the readable side wants more data.\nTransform.prototype._read = function (n) {\n var ts = this._transformState;\n\n if (ts.writechunk !== null && ts.writecb && !ts.transforming) {\n ts.transforming = true;\n this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform);\n } else {\n // mark that we need a transform, so that any data that comes in\n // will get processed, now that we've asked for it.\n ts.needTransform = true;\n }\n};\n\nTransform.prototype._destroy = function (err, cb) {\n var _this2 = this;\n\n Duplex.prototype._destroy.call(this, err, function (err2) {\n cb(err2);\n _this2.emit('close');\n });\n};\n\nfunction done(stream, er, data) {\n if (er) return stream.emit('error', er);\n\n if (data != null) // single equals check for both `null` and `undefined`\n stream.push(data);\n\n // if there's nothing in the write buffer, then that means\n // that nothing more will ever be provided\n if (stream._writableState.length) throw new Error('Calling transform done when ws.length != 0');\n\n if (stream._transformState.transforming) throw new Error('Calling transform done when still transforming');\n\n return stream.push(null);\n}","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n// A bit simpler than readable streams.\n// Implement an async ._write(chunk, encoding, cb), and it'll handle all\n// the drain event emission and buffering.\n\n'use strict';\n\n/**/\n\nvar pna = require('process-nextick-args');\n/**/\n\nmodule.exports = Writable;\n\n/* */\nfunction WriteReq(chunk, encoding, cb) {\n this.chunk = chunk;\n this.encoding = encoding;\n this.callback = cb;\n this.next = null;\n}\n\n// It seems a linked list but it is not\n// there will be only 2 of these for each stream\nfunction CorkedRequest(state) {\n var _this = this;\n\n this.next = null;\n this.entry = null;\n this.finish = function () {\n onCorkedFinish(_this, state);\n };\n}\n/* */\n\n/**/\nvar asyncWrite = !process.browser && ['v0.10', 'v0.9.'].indexOf(process.version.slice(0, 5)) > -1 ? setImmediate : pna.nextTick;\n/**/\n\n/**/\nvar Duplex;\n/**/\n\nWritable.WritableState = WritableState;\n\n/**/\nvar util = Object.create(require('core-util-is'));\nutil.inherits = require('inherits');\n/**/\n\n/**/\nvar internalUtil = {\n deprecate: require('util-deprecate')\n};\n/**/\n\n/**/\nvar Stream = require('./internal/streams/stream');\n/**/\n\n/**/\n\nvar Buffer = require('safe-buffer').Buffer;\nvar OurUint8Array = (typeof global !== 'undefined' ? global : typeof window !== 'undefined' ? window : typeof self !== 'undefined' ? self : {}).Uint8Array || function () {};\nfunction _uint8ArrayToBuffer(chunk) {\n return Buffer.from(chunk);\n}\nfunction _isUint8Array(obj) {\n return Buffer.isBuffer(obj) || obj instanceof OurUint8Array;\n}\n\n/**/\n\nvar destroyImpl = require('./internal/streams/destroy');\n\nutil.inherits(Writable, Stream);\n\nfunction nop() {}\n\nfunction WritableState(options, stream) {\n Duplex = Duplex || require('./_stream_duplex');\n\n options = options || {};\n\n // Duplex streams are both readable and writable, but share\n // the same options object.\n // However, some cases require setting options to different\n // values for the readable and the writable sides of the duplex stream.\n // These options can be provided separately as readableXXX and writableXXX.\n var isDuplex = stream instanceof Duplex;\n\n // object stream flag to indicate whether or not this stream\n // contains buffers or objects.\n this.objectMode = !!options.objectMode;\n\n if (isDuplex) this.objectMode = this.objectMode || !!options.writableObjectMode;\n\n // the point at which write() starts returning false\n // Note: 0 is a valid value, means that we always return false if\n // the entire buffer is not flushed immediately on write()\n var hwm = options.highWaterMark;\n var writableHwm = options.writableHighWaterMark;\n var defaultHwm = this.objectMode ? 16 : 16 * 1024;\n\n if (hwm || hwm === 0) this.highWaterMark = hwm;else if (isDuplex && (writableHwm || writableHwm === 0)) this.highWaterMark = writableHwm;else this.highWaterMark = defaultHwm;\n\n // cast to ints.\n this.highWaterMark = Math.floor(this.highWaterMark);\n\n // if _final has been called\n this.finalCalled = false;\n\n // drain event flag.\n this.needDrain = false;\n // at the start of calling end()\n this.ending = false;\n // when end() has been called, and returned\n this.ended = false;\n // when 'finish' is emitted\n this.finished = false;\n\n // has it been destroyed\n this.destroyed = false;\n\n // should we decode strings into buffers before passing to _write?\n // this is here so that some node-core streams can optimize string\n // handling at a lower level.\n var noDecode = options.decodeStrings === false;\n this.decodeStrings = !noDecode;\n\n // Crypto is kind of old and crusty. Historically, its default string\n // encoding is 'binary' so we have to make this configurable.\n // Everything else in the universe uses 'utf8', though.\n this.defaultEncoding = options.defaultEncoding || 'utf8';\n\n // not an actual buffer we keep track of, but a measurement\n // of how much we're waiting to get pushed to some underlying\n // socket or file.\n this.length = 0;\n\n // a flag to see when we're in the middle of a write.\n this.writing = false;\n\n // when true all writes will be buffered until .uncork() call\n this.corked = 0;\n\n // a flag to be able to tell if the onwrite cb is called immediately,\n // or on a later tick. We set this to true at first, because any\n // actions that shouldn't happen until \"later\" should generally also\n // not happen before the first write call.\n this.sync = true;\n\n // a flag to know if we're processing previously buffered items, which\n // may call the _write() callback in the same tick, so that we don't\n // end up in an overlapped onwrite situation.\n this.bufferProcessing = false;\n\n // the callback that's passed to _write(chunk,cb)\n this.onwrite = function (er) {\n onwrite(stream, er);\n };\n\n // the callback that the user supplies to write(chunk,encoding,cb)\n this.writecb = null;\n\n // the amount that is being written when _write is called.\n this.writelen = 0;\n\n this.bufferedRequest = null;\n this.lastBufferedRequest = null;\n\n // number of pending user-supplied write callbacks\n // this must be 0 before 'finish' can be emitted\n this.pendingcb = 0;\n\n // emit prefinish if the only thing we're waiting for is _write cbs\n // This is relevant for synchronous Transform streams\n this.prefinished = false;\n\n // True if the error was already emitted and should not be thrown again\n this.errorEmitted = false;\n\n // count buffered requests\n this.bufferedRequestCount = 0;\n\n // allocate the first CorkedRequest, there is always\n // one allocated and free to use, and we maintain at most two\n this.corkedRequestsFree = new CorkedRequest(this);\n}\n\nWritableState.prototype.getBuffer = function getBuffer() {\n var current = this.bufferedRequest;\n var out = [];\n while (current) {\n out.push(current);\n current = current.next;\n }\n return out;\n};\n\n(function () {\n try {\n Object.defineProperty(WritableState.prototype, 'buffer', {\n get: internalUtil.deprecate(function () {\n return this.getBuffer();\n }, '_writableState.buffer is deprecated. Use _writableState.getBuffer ' + 'instead.', 'DEP0003')\n });\n } catch (_) {}\n})();\n\n// Test _writableState for inheritance to account for Duplex streams,\n// whose prototype chain only points to Readable.\nvar realHasInstance;\nif (typeof Symbol === 'function' && Symbol.hasInstance && typeof Function.prototype[Symbol.hasInstance] === 'function') {\n realHasInstance = Function.prototype[Symbol.hasInstance];\n Object.defineProperty(Writable, Symbol.hasInstance, {\n value: function (object) {\n if (realHasInstance.call(this, object)) return true;\n if (this !== Writable) return false;\n\n return object && object._writableState instanceof WritableState;\n }\n });\n} else {\n realHasInstance = function (object) {\n return object instanceof this;\n };\n}\n\nfunction Writable(options) {\n Duplex = Duplex || require('./_stream_duplex');\n\n // Writable ctor is applied to Duplexes, too.\n // `realHasInstance` is necessary because using plain `instanceof`\n // would return false, as no `_writableState` property is attached.\n\n // Trying to use the custom `instanceof` for Writable here will also break the\n // Node.js LazyTransform implementation, which has a non-trivial getter for\n // `_writableState` that would lead to infinite recursion.\n if (!realHasInstance.call(Writable, this) && !(this instanceof Duplex)) {\n return new Writable(options);\n }\n\n this._writableState = new WritableState(options, this);\n\n // legacy.\n this.writable = true;\n\n if (options) {\n if (typeof options.write === 'function') this._write = options.write;\n\n if (typeof options.writev === 'function') this._writev = options.writev;\n\n if (typeof options.destroy === 'function') this._destroy = options.destroy;\n\n if (typeof options.final === 'function') this._final = options.final;\n }\n\n Stream.call(this);\n}\n\n// Otherwise people can pipe Writable streams, which is just wrong.\nWritable.prototype.pipe = function () {\n this.emit('error', new Error('Cannot pipe, not readable'));\n};\n\nfunction writeAfterEnd(stream, cb) {\n var er = new Error('write after end');\n // TODO: defer error events consistently everywhere, not just the cb\n stream.emit('error', er);\n pna.nextTick(cb, er);\n}\n\n// Checks that a user-supplied chunk is valid, especially for the particular\n// mode the stream is in. Currently this means that `null` is never accepted\n// and undefined/non-string values are only allowed in object mode.\nfunction validChunk(stream, state, chunk, cb) {\n var valid = true;\n var er = false;\n\n if (chunk === null) {\n er = new TypeError('May not write null values to stream');\n } else if (typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {\n er = new TypeError('Invalid non-string/buffer chunk');\n }\n if (er) {\n stream.emit('error', er);\n pna.nextTick(cb, er);\n valid = false;\n }\n return valid;\n}\n\nWritable.prototype.write = function (chunk, encoding, cb) {\n var state = this._writableState;\n var ret = false;\n var isBuf = !state.objectMode && _isUint8Array(chunk);\n\n if (isBuf && !Buffer.isBuffer(chunk)) {\n chunk = _uint8ArrayToBuffer(chunk);\n }\n\n if (typeof encoding === 'function') {\n cb = encoding;\n encoding = null;\n }\n\n if (isBuf) encoding = 'buffer';else if (!encoding) encoding = state.defaultEncoding;\n\n if (typeof cb !== 'function') cb = nop;\n\n if (state.ended) writeAfterEnd(this, cb);else if (isBuf || validChunk(this, state, chunk, cb)) {\n state.pendingcb++;\n ret = writeOrBuffer(this, state, isBuf, chunk, encoding, cb);\n }\n\n return ret;\n};\n\nWritable.prototype.cork = function () {\n var state = this._writableState;\n\n state.corked++;\n};\n\nWritable.prototype.uncork = function () {\n var state = this._writableState;\n\n if (state.corked) {\n state.corked--;\n\n if (!state.writing && !state.corked && !state.bufferProcessing && state.bufferedRequest) clearBuffer(this, state);\n }\n};\n\nWritable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) {\n // node::ParseEncoding() requires lower case.\n if (typeof encoding === 'string') encoding = encoding.toLowerCase();\n if (!(['hex', 'utf8', 'utf-8', 'ascii', 'binary', 'base64', 'ucs2', 'ucs-2', 'utf16le', 'utf-16le', 'raw'].indexOf((encoding + '').toLowerCase()) > -1)) throw new TypeError('Unknown encoding: ' + encoding);\n this._writableState.defaultEncoding = encoding;\n return this;\n};\n\nfunction decodeChunk(state, chunk, encoding) {\n if (!state.objectMode && state.decodeStrings !== false && typeof chunk === 'string') {\n chunk = Buffer.from(chunk, encoding);\n }\n return chunk;\n}\n\nObject.defineProperty(Writable.prototype, 'writableHighWaterMark', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function () {\n return this._writableState.highWaterMark;\n }\n});\n\n// if we're already writing something, then just put this\n// in the queue, and wait our turn. Otherwise, call _write\n// If we return false, then we need a drain event, so set that flag.\nfunction writeOrBuffer(stream, state, isBuf, chunk, encoding, cb) {\n if (!isBuf) {\n var newChunk = decodeChunk(state, chunk, encoding);\n if (chunk !== newChunk) {\n isBuf = true;\n encoding = 'buffer';\n chunk = newChunk;\n }\n }\n var len = state.objectMode ? 1 : chunk.length;\n\n state.length += len;\n\n var ret = state.length < state.highWaterMark;\n // we must ensure that previous needDrain will not be reset to false.\n if (!ret) state.needDrain = true;\n\n if (state.writing || state.corked) {\n var last = state.lastBufferedRequest;\n state.lastBufferedRequest = {\n chunk: chunk,\n encoding: encoding,\n isBuf: isBuf,\n callback: cb,\n next: null\n };\n if (last) {\n last.next = state.lastBufferedRequest;\n } else {\n state.bufferedRequest = state.lastBufferedRequest;\n }\n state.bufferedRequestCount += 1;\n } else {\n doWrite(stream, state, false, len, chunk, encoding, cb);\n }\n\n return ret;\n}\n\nfunction doWrite(stream, state, writev, len, chunk, encoding, cb) {\n state.writelen = len;\n state.writecb = cb;\n state.writing = true;\n state.sync = true;\n if (writev) stream._writev(chunk, state.onwrite);else stream._write(chunk, encoding, state.onwrite);\n state.sync = false;\n}\n\nfunction onwriteError(stream, state, sync, er, cb) {\n --state.pendingcb;\n\n if (sync) {\n // defer the callback if we are being called synchronously\n // to avoid piling up things on the stack\n pna.nextTick(cb, er);\n // this can emit finish, and it will always happen\n // after error\n pna.nextTick(finishMaybe, stream, state);\n stream._writableState.errorEmitted = true;\n stream.emit('error', er);\n } else {\n // the caller expect this to happen before if\n // it is async\n cb(er);\n stream._writableState.errorEmitted = true;\n stream.emit('error', er);\n // this can emit finish, but finish must\n // always follow error\n finishMaybe(stream, state);\n }\n}\n\nfunction onwriteStateUpdate(state) {\n state.writing = false;\n state.writecb = null;\n state.length -= state.writelen;\n state.writelen = 0;\n}\n\nfunction onwrite(stream, er) {\n var state = stream._writableState;\n var sync = state.sync;\n var cb = state.writecb;\n\n onwriteStateUpdate(state);\n\n if (er) onwriteError(stream, state, sync, er, cb);else {\n // Check if we're actually ready to finish, but don't emit yet\n var finished = needFinish(state);\n\n if (!finished && !state.corked && !state.bufferProcessing && state.bufferedRequest) {\n clearBuffer(stream, state);\n }\n\n if (sync) {\n /**/\n asyncWrite(afterWrite, stream, state, finished, cb);\n /**/\n } else {\n afterWrite(stream, state, finished, cb);\n }\n }\n}\n\nfunction afterWrite(stream, state, finished, cb) {\n if (!finished) onwriteDrain(stream, state);\n state.pendingcb--;\n cb();\n finishMaybe(stream, state);\n}\n\n// Must force callback to be called on nextTick, so that we don't\n// emit 'drain' before the write() consumer gets the 'false' return\n// value, and has a chance to attach a 'drain' listener.\nfunction onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n}\n\n// if there's something in the buffer waiting, then process it\nfunction clearBuffer(stream, state) {\n state.bufferProcessing = true;\n var entry = state.bufferedRequest;\n\n if (stream._writev && entry && entry.next) {\n // Fast case, write everything using _writev()\n var l = state.bufferedRequestCount;\n var buffer = new Array(l);\n var holder = state.corkedRequestsFree;\n holder.entry = entry;\n\n var count = 0;\n var allBuffers = true;\n while (entry) {\n buffer[count] = entry;\n if (!entry.isBuf) allBuffers = false;\n entry = entry.next;\n count += 1;\n }\n buffer.allBuffers = allBuffers;\n\n doWrite(stream, state, true, state.length, buffer, '', holder.finish);\n\n // doWrite is almost always async, defer these to save a bit of time\n // as the hot path ends with doWrite\n state.pendingcb++;\n state.lastBufferedRequest = null;\n if (holder.next) {\n state.corkedRequestsFree = holder.next;\n holder.next = null;\n } else {\n state.corkedRequestsFree = new CorkedRequest(state);\n }\n state.bufferedRequestCount = 0;\n } else {\n // Slow case, write chunks one-by-one\n while (entry) {\n var chunk = entry.chunk;\n var encoding = entry.encoding;\n var cb = entry.callback;\n var len = state.objectMode ? 1 : chunk.length;\n\n doWrite(stream, state, false, len, chunk, encoding, cb);\n entry = entry.next;\n state.bufferedRequestCount--;\n // if we didn't call the onwrite immediately, then\n // it means that we need to wait until it does.\n // also, that means that the chunk and cb are currently\n // being processed, so move the buffer counter past them.\n if (state.writing) {\n break;\n }\n }\n\n if (entry === null) state.lastBufferedRequest = null;\n }\n\n state.bufferedRequest = entry;\n state.bufferProcessing = false;\n}\n\nWritable.prototype._write = function (chunk, encoding, cb) {\n cb(new Error('_write() is not implemented'));\n};\n\nWritable.prototype._writev = null;\n\nWritable.prototype.end = function (chunk, encoding, cb) {\n var state = this._writableState;\n\n if (typeof chunk === 'function') {\n cb = chunk;\n chunk = null;\n encoding = null;\n } else if (typeof encoding === 'function') {\n cb = encoding;\n encoding = null;\n }\n\n if (chunk !== null && chunk !== undefined) this.write(chunk, encoding);\n\n // .end() fully uncorks\n if (state.corked) {\n state.corked = 1;\n this.uncork();\n }\n\n // ignore unnecessary end() calls.\n if (!state.ending) endWritable(this, state, cb);\n};\n\nfunction needFinish(state) {\n return state.ending && state.length === 0 && state.bufferedRequest === null && !state.finished && !state.writing;\n}\nfunction callFinal(stream, state) {\n stream._final(function (err) {\n state.pendingcb--;\n if (err) {\n stream.emit('error', err);\n }\n state.prefinished = true;\n stream.emit('prefinish');\n finishMaybe(stream, state);\n });\n}\nfunction prefinish(stream, state) {\n if (!state.prefinished && !state.finalCalled) {\n if (typeof stream._final === 'function') {\n state.pendingcb++;\n state.finalCalled = true;\n pna.nextTick(callFinal, stream, state);\n } else {\n state.prefinished = true;\n stream.emit('prefinish');\n }\n }\n}\n\nfunction finishMaybe(stream, state) {\n var need = needFinish(state);\n if (need) {\n prefinish(stream, state);\n if (state.pendingcb === 0) {\n state.finished = true;\n stream.emit('finish');\n }\n }\n return need;\n}\n\nfunction endWritable(stream, state, cb) {\n state.ending = true;\n finishMaybe(stream, state);\n if (cb) {\n if (state.finished) pna.nextTick(cb);else stream.once('finish', cb);\n }\n state.ended = true;\n stream.writable = false;\n}\n\nfunction onCorkedFinish(corkReq, state, err) {\n var entry = corkReq.entry;\n corkReq.entry = null;\n while (entry) {\n var cb = entry.callback;\n state.pendingcb--;\n cb(err);\n entry = entry.next;\n }\n\n // reuse the free corkReq.\n state.corkedRequestsFree.next = corkReq;\n}\n\nObject.defineProperty(Writable.prototype, 'destroyed', {\n get: function () {\n if (this._writableState === undefined) {\n return false;\n }\n return this._writableState.destroyed;\n },\n set: function (value) {\n // we ignore the value if the stream\n // has not been initialized yet\n if (!this._writableState) {\n return;\n }\n\n // backward compatibility, the user is explicitly\n // managing destroyed\n this._writableState.destroyed = value;\n }\n});\n\nWritable.prototype.destroy = destroyImpl.destroy;\nWritable.prototype._undestroy = destroyImpl.undestroy;\nWritable.prototype._destroy = function (err, cb) {\n this.end();\n cb(err);\n};","'use strict';\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar Buffer = require('safe-buffer').Buffer;\nvar util = require('util');\n\nfunction copyBuffer(src, target, offset) {\n src.copy(target, offset);\n}\n\nmodule.exports = function () {\n function BufferList() {\n _classCallCheck(this, BufferList);\n\n this.head = null;\n this.tail = null;\n this.length = 0;\n }\n\n BufferList.prototype.push = function push(v) {\n var entry = { data: v, next: null };\n if (this.length > 0) this.tail.next = entry;else this.head = entry;\n this.tail = entry;\n ++this.length;\n };\n\n BufferList.prototype.unshift = function unshift(v) {\n var entry = { data: v, next: this.head };\n if (this.length === 0) this.tail = entry;\n this.head = entry;\n ++this.length;\n };\n\n BufferList.prototype.shift = function shift() {\n if (this.length === 0) return;\n var ret = this.head.data;\n if (this.length === 1) this.head = this.tail = null;else this.head = this.head.next;\n --this.length;\n return ret;\n };\n\n BufferList.prototype.clear = function clear() {\n this.head = this.tail = null;\n this.length = 0;\n };\n\n BufferList.prototype.join = function join(s) {\n if (this.length === 0) return '';\n var p = this.head;\n var ret = '' + p.data;\n while (p = p.next) {\n ret += s + p.data;\n }return ret;\n };\n\n BufferList.prototype.concat = function concat(n) {\n if (this.length === 0) return Buffer.alloc(0);\n var ret = Buffer.allocUnsafe(n >>> 0);\n var p = this.head;\n var i = 0;\n while (p) {\n copyBuffer(p.data, ret, i);\n i += p.data.length;\n p = p.next;\n }\n return ret;\n };\n\n return BufferList;\n}();\n\nif (util && util.inspect && util.inspect.custom) {\n module.exports.prototype[util.inspect.custom] = function () {\n var obj = util.inspect({ length: this.length });\n return this.constructor.name + ' ' + obj;\n };\n}","'use strict';\n\n/**/\n\nvar pna = require('process-nextick-args');\n/**/\n\n// undocumented cb() API, needed for core, not for public API\nfunction destroy(err, cb) {\n var _this = this;\n\n var readableDestroyed = this._readableState && this._readableState.destroyed;\n var writableDestroyed = this._writableState && this._writableState.destroyed;\n\n if (readableDestroyed || writableDestroyed) {\n if (cb) {\n cb(err);\n } else if (err) {\n if (!this._writableState) {\n pna.nextTick(emitErrorNT, this, err);\n } else if (!this._writableState.errorEmitted) {\n this._writableState.errorEmitted = true;\n pna.nextTick(emitErrorNT, this, err);\n }\n }\n\n return this;\n }\n\n // we set destroyed to true before firing error callbacks in order\n // to make it re-entrance safe in case destroy() is called within callbacks\n\n if (this._readableState) {\n this._readableState.destroyed = true;\n }\n\n // if this is a duplex stream mark the writable part as destroyed as well\n if (this._writableState) {\n this._writableState.destroyed = true;\n }\n\n this._destroy(err || null, function (err) {\n if (!cb && err) {\n if (!_this._writableState) {\n pna.nextTick(emitErrorNT, _this, err);\n } else if (!_this._writableState.errorEmitted) {\n _this._writableState.errorEmitted = true;\n pna.nextTick(emitErrorNT, _this, err);\n }\n } else if (cb) {\n cb(err);\n }\n });\n\n return this;\n}\n\nfunction undestroy() {\n if (this._readableState) {\n this._readableState.destroyed = false;\n this._readableState.reading = false;\n this._readableState.ended = false;\n this._readableState.endEmitted = false;\n }\n\n if (this._writableState) {\n this._writableState.destroyed = false;\n this._writableState.ended = false;\n this._writableState.ending = false;\n this._writableState.finalCalled = false;\n this._writableState.prefinished = false;\n this._writableState.finished = false;\n this._writableState.errorEmitted = false;\n }\n}\n\nfunction emitErrorNT(self, err) {\n self.emit('error', err);\n}\n\nmodule.exports = {\n destroy: destroy,\n undestroy: undestroy\n};","module.exports = require('events').EventEmitter;\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\n/**/\n\nvar Buffer = require('safe-buffer').Buffer;\n/**/\n\nvar isEncoding = Buffer.isEncoding || function (encoding) {\n encoding = '' + encoding;\n switch (encoding && encoding.toLowerCase()) {\n case 'hex':case 'utf8':case 'utf-8':case 'ascii':case 'binary':case 'base64':case 'ucs2':case 'ucs-2':case 'utf16le':case 'utf-16le':case 'raw':\n return true;\n default:\n return false;\n }\n};\n\nfunction _normalizeEncoding(enc) {\n if (!enc) return 'utf8';\n var retried;\n while (true) {\n switch (enc) {\n case 'utf8':\n case 'utf-8':\n return 'utf8';\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return 'utf16le';\n case 'latin1':\n case 'binary':\n return 'latin1';\n case 'base64':\n case 'ascii':\n case 'hex':\n return enc;\n default:\n if (retried) return; // undefined\n enc = ('' + enc).toLowerCase();\n retried = true;\n }\n }\n};\n\n// Do not cache `Buffer.isEncoding` when checking encoding names as some\n// modules monkey-patch it to support additional encodings\nfunction normalizeEncoding(enc) {\n var nenc = _normalizeEncoding(enc);\n if (typeof nenc !== 'string' && (Buffer.isEncoding === isEncoding || !isEncoding(enc))) throw new Error('Unknown encoding: ' + enc);\n return nenc || enc;\n}\n\n// StringDecoder provides an interface for efficiently splitting a series of\n// buffers into a series of JS strings without breaking apart multi-byte\n// characters.\nexports.StringDecoder = StringDecoder;\nfunction StringDecoder(encoding) {\n this.encoding = normalizeEncoding(encoding);\n var nb;\n switch (this.encoding) {\n case 'utf16le':\n this.text = utf16Text;\n this.end = utf16End;\n nb = 4;\n break;\n case 'utf8':\n this.fillLast = utf8FillLast;\n nb = 4;\n break;\n case 'base64':\n this.text = base64Text;\n this.end = base64End;\n nb = 3;\n break;\n default:\n this.write = simpleWrite;\n this.end = simpleEnd;\n return;\n }\n this.lastNeed = 0;\n this.lastTotal = 0;\n this.lastChar = Buffer.allocUnsafe(nb);\n}\n\nStringDecoder.prototype.write = function (buf) {\n if (buf.length === 0) return '';\n var r;\n var i;\n if (this.lastNeed) {\n r = this.fillLast(buf);\n if (r === undefined) return '';\n i = this.lastNeed;\n this.lastNeed = 0;\n } else {\n i = 0;\n }\n if (i < buf.length) return r ? r + this.text(buf, i) : this.text(buf, i);\n return r || '';\n};\n\nStringDecoder.prototype.end = utf8End;\n\n// Returns only complete characters in a Buffer\nStringDecoder.prototype.text = utf8Text;\n\n// Attempts to complete a partial non-UTF-8 character using bytes from a Buffer\nStringDecoder.prototype.fillLast = function (buf) {\n if (this.lastNeed <= buf.length) {\n buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, this.lastNeed);\n return this.lastChar.toString(this.encoding, 0, this.lastTotal);\n }\n buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, buf.length);\n this.lastNeed -= buf.length;\n};\n\n// Checks the type of a UTF-8 byte, whether it's ASCII, a leading byte, or a\n// continuation byte. If an invalid byte is detected, -2 is returned.\nfunction utf8CheckByte(byte) {\n if (byte <= 0x7F) return 0;else if (byte >> 5 === 0x06) return 2;else if (byte >> 4 === 0x0E) return 3;else if (byte >> 3 === 0x1E) return 4;\n return byte >> 6 === 0x02 ? -1 : -2;\n}\n\n// Checks at most 3 bytes at the end of a Buffer in order to detect an\n// incomplete multi-byte UTF-8 character. The total number of bytes (2, 3, or 4)\n// needed to complete the UTF-8 character (if applicable) are returned.\nfunction utf8CheckIncomplete(self, buf, i) {\n var j = buf.length - 1;\n if (j < i) return 0;\n var nb = utf8CheckByte(buf[j]);\n if (nb >= 0) {\n if (nb > 0) self.lastNeed = nb - 1;\n return nb;\n }\n if (--j < i || nb === -2) return 0;\n nb = utf8CheckByte(buf[j]);\n if (nb >= 0) {\n if (nb > 0) self.lastNeed = nb - 2;\n return nb;\n }\n if (--j < i || nb === -2) return 0;\n nb = utf8CheckByte(buf[j]);\n if (nb >= 0) {\n if (nb > 0) {\n if (nb === 2) nb = 0;else self.lastNeed = nb - 3;\n }\n return nb;\n }\n return 0;\n}\n\n// Validates as many continuation bytes for a multi-byte UTF-8 character as\n// needed or are available. If we see a non-continuation byte where we expect\n// one, we \"replace\" the validated continuation bytes we've seen so far with\n// a single UTF-8 replacement character ('\\ufffd'), to match v8's UTF-8 decoding\n// behavior. The continuation byte check is included three times in the case\n// where all of the continuation bytes for a character exist in the same buffer.\n// It is also done this way as a slight performance increase instead of using a\n// loop.\nfunction utf8CheckExtraBytes(self, buf, p) {\n if ((buf[0] & 0xC0) !== 0x80) {\n self.lastNeed = 0;\n return '\\ufffd';\n }\n if (self.lastNeed > 1 && buf.length > 1) {\n if ((buf[1] & 0xC0) !== 0x80) {\n self.lastNeed = 1;\n return '\\ufffd';\n }\n if (self.lastNeed > 2 && buf.length > 2) {\n if ((buf[2] & 0xC0) !== 0x80) {\n self.lastNeed = 2;\n return '\\ufffd';\n }\n }\n }\n}\n\n// Attempts to complete a multi-byte UTF-8 character using bytes from a Buffer.\nfunction utf8FillLast(buf) {\n var p = this.lastTotal - this.lastNeed;\n var r = utf8CheckExtraBytes(this, buf, p);\n if (r !== undefined) return r;\n if (this.lastNeed <= buf.length) {\n buf.copy(this.lastChar, p, 0, this.lastNeed);\n return this.lastChar.toString(this.encoding, 0, this.lastTotal);\n }\n buf.copy(this.lastChar, p, 0, buf.length);\n this.lastNeed -= buf.length;\n}\n\n// Returns all complete UTF-8 characters in a Buffer. If the Buffer ended on a\n// partial character, the character's bytes are buffered until the required\n// number of bytes are available.\nfunction utf8Text(buf, i) {\n var total = utf8CheckIncomplete(this, buf, i);\n if (!this.lastNeed) return buf.toString('utf8', i);\n this.lastTotal = total;\n var end = buf.length - (total - this.lastNeed);\n buf.copy(this.lastChar, 0, end);\n return buf.toString('utf8', i, end);\n}\n\n// For UTF-8, a replacement character is added when ending on a partial\n// character.\nfunction utf8End(buf) {\n var r = buf && buf.length ? this.write(buf) : '';\n if (this.lastNeed) return r + '\\ufffd';\n return r;\n}\n\n// UTF-16LE typically needs two bytes per character, but even if we have an even\n// number of bytes available, we need to check if we end on a leading/high\n// surrogate. In that case, we need to wait for the next two bytes in order to\n// decode the last character properly.\nfunction utf16Text(buf, i) {\n if ((buf.length - i) % 2 === 0) {\n var r = buf.toString('utf16le', i);\n if (r) {\n var c = r.charCodeAt(r.length - 1);\n if (c >= 0xD800 && c <= 0xDBFF) {\n this.lastNeed = 2;\n this.lastTotal = 4;\n this.lastChar[0] = buf[buf.length - 2];\n this.lastChar[1] = buf[buf.length - 1];\n return r.slice(0, -1);\n }\n }\n return r;\n }\n this.lastNeed = 1;\n this.lastTotal = 2;\n this.lastChar[0] = buf[buf.length - 1];\n return buf.toString('utf16le', i, buf.length - 1);\n}\n\n// For UTF-16LE we do not explicitly append special replacement characters if we\n// end on a partial character, we simply let v8 handle that.\nfunction utf16End(buf) {\n var r = buf && buf.length ? this.write(buf) : '';\n if (this.lastNeed) {\n var end = this.lastTotal - this.lastNeed;\n return r + this.lastChar.toString('utf16le', 0, end);\n }\n return r;\n}\n\nfunction base64Text(buf, i) {\n var n = (buf.length - i) % 3;\n if (n === 0) return buf.toString('base64', i);\n this.lastNeed = 3 - n;\n this.lastTotal = 3;\n if (n === 1) {\n this.lastChar[0] = buf[buf.length - 1];\n } else {\n this.lastChar[0] = buf[buf.length - 2];\n this.lastChar[1] = buf[buf.length - 1];\n }\n return buf.toString('base64', i, buf.length - n);\n}\n\nfunction base64End(buf) {\n var r = buf && buf.length ? this.write(buf) : '';\n if (this.lastNeed) return r + this.lastChar.toString('base64', 0, 3 - this.lastNeed);\n return r;\n}\n\n// Pass bytes on through for single-byte encodings (e.g. ascii, latin1, hex)\nfunction simpleWrite(buf) {\n return buf.toString(this.encoding);\n}\n\nfunction simpleEnd(buf) {\n return buf && buf.length ? this.write(buf) : '';\n}","exports = module.exports = require('./lib/_stream_readable.js');\nexports.Stream = exports;\nexports.Readable = exports;\nexports.Writable = require('./lib/_stream_writable.js');\nexports.Duplex = require('./lib/_stream_duplex.js');\nexports.Transform = require('./lib/_stream_transform.js');\nexports.PassThrough = require('./lib/_stream_passthrough.js');\n","'use strict'\nvar Buffer = require('buffer').Buffer\nvar inherits = require('inherits')\nvar HashBase = require('hash-base')\n\nvar ARRAY16 = new Array(16)\n\nvar zl = [\n 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,\n 7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8,\n 3, 10, 14, 4, 9, 15, 8, 1, 2, 7, 0, 6, 13, 11, 5, 12,\n 1, 9, 11, 10, 0, 8, 12, 4, 13, 3, 7, 15, 14, 5, 6, 2,\n 4, 0, 5, 9, 7, 12, 2, 10, 14, 1, 3, 8, 11, 6, 15, 13\n]\n\nvar zr = [\n 5, 14, 7, 0, 9, 2, 11, 4, 13, 6, 15, 8, 1, 10, 3, 12,\n 6, 11, 3, 7, 0, 13, 5, 10, 14, 15, 8, 12, 4, 9, 1, 2,\n 15, 5, 1, 3, 7, 14, 6, 9, 11, 8, 12, 2, 10, 0, 4, 13,\n 8, 6, 4, 1, 3, 11, 15, 0, 5, 12, 2, 13, 9, 7, 10, 14,\n 12, 15, 10, 4, 1, 5, 8, 7, 6, 2, 13, 14, 0, 3, 9, 11\n]\n\nvar sl = [\n 11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8,\n 7, 6, 8, 13, 11, 9, 7, 15, 7, 12, 15, 9, 11, 7, 13, 12,\n 11, 13, 6, 7, 14, 9, 13, 15, 14, 8, 13, 6, 5, 12, 7, 5,\n 11, 12, 14, 15, 14, 15, 9, 8, 9, 14, 5, 6, 8, 6, 5, 12,\n 9, 15, 5, 11, 6, 8, 13, 12, 5, 12, 13, 14, 11, 8, 5, 6\n]\n\nvar sr = [\n 8, 9, 9, 11, 13, 15, 15, 5, 7, 7, 8, 11, 14, 14, 12, 6,\n 9, 13, 15, 7, 12, 8, 9, 11, 7, 7, 12, 7, 6, 15, 13, 11,\n 9, 7, 15, 11, 8, 6, 6, 14, 12, 13, 5, 14, 13, 13, 7, 5,\n 15, 5, 8, 11, 14, 14, 6, 14, 6, 9, 12, 9, 12, 5, 15, 8,\n 8, 5, 12, 9, 12, 5, 14, 6, 8, 13, 6, 5, 15, 13, 11, 11\n]\n\nvar hl = [0x00000000, 0x5a827999, 0x6ed9eba1, 0x8f1bbcdc, 0xa953fd4e]\nvar hr = [0x50a28be6, 0x5c4dd124, 0x6d703ef3, 0x7a6d76e9, 0x00000000]\n\nfunction RIPEMD160 () {\n HashBase.call(this, 64)\n\n // state\n this._a = 0x67452301\n this._b = 0xefcdab89\n this._c = 0x98badcfe\n this._d = 0x10325476\n this._e = 0xc3d2e1f0\n}\n\ninherits(RIPEMD160, HashBase)\n\nRIPEMD160.prototype._update = function () {\n var words = ARRAY16\n for (var j = 0; j < 16; ++j) words[j] = this._block.readInt32LE(j * 4)\n\n var al = this._a | 0\n var bl = this._b | 0\n var cl = this._c | 0\n var dl = this._d | 0\n var el = this._e | 0\n\n var ar = this._a | 0\n var br = this._b | 0\n var cr = this._c | 0\n var dr = this._d | 0\n var er = this._e | 0\n\n // computation\n for (var i = 0; i < 80; i += 1) {\n var tl\n var tr\n if (i < 16) {\n tl = fn1(al, bl, cl, dl, el, words[zl[i]], hl[0], sl[i])\n tr = fn5(ar, br, cr, dr, er, words[zr[i]], hr[0], sr[i])\n } else if (i < 32) {\n tl = fn2(al, bl, cl, dl, el, words[zl[i]], hl[1], sl[i])\n tr = fn4(ar, br, cr, dr, er, words[zr[i]], hr[1], sr[i])\n } else if (i < 48) {\n tl = fn3(al, bl, cl, dl, el, words[zl[i]], hl[2], sl[i])\n tr = fn3(ar, br, cr, dr, er, words[zr[i]], hr[2], sr[i])\n } else if (i < 64) {\n tl = fn4(al, bl, cl, dl, el, words[zl[i]], hl[3], sl[i])\n tr = fn2(ar, br, cr, dr, er, words[zr[i]], hr[3], sr[i])\n } else { // if (i<80) {\n tl = fn5(al, bl, cl, dl, el, words[zl[i]], hl[4], sl[i])\n tr = fn1(ar, br, cr, dr, er, words[zr[i]], hr[4], sr[i])\n }\n\n al = el\n el = dl\n dl = rotl(cl, 10)\n cl = bl\n bl = tl\n\n ar = er\n er = dr\n dr = rotl(cr, 10)\n cr = br\n br = tr\n }\n\n // update state\n var t = (this._b + cl + dr) | 0\n this._b = (this._c + dl + er) | 0\n this._c = (this._d + el + ar) | 0\n this._d = (this._e + al + br) | 0\n this._e = (this._a + bl + cr) | 0\n this._a = t\n}\n\nRIPEMD160.prototype._digest = function () {\n // create padding and handle blocks\n this._block[this._blockOffset++] = 0x80\n if (this._blockOffset > 56) {\n this._block.fill(0, this._blockOffset, 64)\n this._update()\n this._blockOffset = 0\n }\n\n this._block.fill(0, this._blockOffset, 56)\n this._block.writeUInt32LE(this._length[0], 56)\n this._block.writeUInt32LE(this._length[1], 60)\n this._update()\n\n // produce result\n var buffer = Buffer.alloc ? Buffer.alloc(20) : new Buffer(20)\n buffer.writeInt32LE(this._a, 0)\n buffer.writeInt32LE(this._b, 4)\n buffer.writeInt32LE(this._c, 8)\n buffer.writeInt32LE(this._d, 12)\n buffer.writeInt32LE(this._e, 16)\n return buffer\n}\n\nfunction rotl (x, n) {\n return (x << n) | (x >>> (32 - n))\n}\n\nfunction fn1 (a, b, c, d, e, m, k, s) {\n return (rotl((a + (b ^ c ^ d) + m + k) | 0, s) + e) | 0\n}\n\nfunction fn2 (a, b, c, d, e, m, k, s) {\n return (rotl((a + ((b & c) | ((~b) & d)) + m + k) | 0, s) + e) | 0\n}\n\nfunction fn3 (a, b, c, d, e, m, k, s) {\n return (rotl((a + ((b | (~c)) ^ d) + m + k) | 0, s) + e) | 0\n}\n\nfunction fn4 (a, b, c, d, e, m, k, s) {\n return (rotl((a + ((b & d) | (c & (~d))) + m + k) | 0, s) + e) | 0\n}\n\nfunction fn5 (a, b, c, d, e, m, k, s) {\n return (rotl((a + (b ^ (c | (~d))) + m + k) | 0, s) + e) | 0\n}\n\nmodule.exports = RIPEMD160\n","/* eslint-disable node/no-deprecated-api */\nvar buffer = require('buffer')\nvar Buffer = buffer.Buffer\n\n// alternative to using Object.keys for old browsers\nfunction copyProps (src, dst) {\n for (var key in src) {\n dst[key] = src[key]\n }\n}\nif (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) {\n module.exports = buffer\n} else {\n // Copy properties from require('buffer')\n copyProps(buffer, exports)\n exports.Buffer = SafeBuffer\n}\n\nfunction SafeBuffer (arg, encodingOrOffset, length) {\n return Buffer(arg, encodingOrOffset, length)\n}\n\n// Copy static methods from Buffer\ncopyProps(Buffer, SafeBuffer)\n\nSafeBuffer.from = function (arg, encodingOrOffset, length) {\n if (typeof arg === 'number') {\n throw new TypeError('Argument must not be a number')\n }\n return Buffer(arg, encodingOrOffset, length)\n}\n\nSafeBuffer.alloc = function (size, fill, encoding) {\n if (typeof size !== 'number') {\n throw new TypeError('Argument must be a number')\n }\n var buf = Buffer(size)\n if (fill !== undefined) {\n if (typeof encoding === 'string') {\n buf.fill(fill, encoding)\n } else {\n buf.fill(fill)\n }\n } else {\n buf.fill(0)\n }\n return buf\n}\n\nSafeBuffer.allocUnsafe = function (size) {\n if (typeof size !== 'number') {\n throw new TypeError('Argument must be a number')\n }\n return Buffer(size)\n}\n\nSafeBuffer.allocUnsafeSlow = function (size) {\n if (typeof size !== 'number') {\n throw new TypeError('Argument must be a number')\n }\n return buffer.SlowBuffer(size)\n}\n","(function (global, undefined) {\n \"use strict\";\n\n if (global.setImmediate) {\n return;\n }\n\n var nextHandle = 1; // Spec says greater than zero\n var tasksByHandle = {};\n var currentlyRunningATask = false;\n var doc = global.document;\n var registerImmediate;\n\n function setImmediate(callback) {\n // Callback can either be a function or a string\n if (typeof callback !== \"function\") {\n callback = new Function(\"\" + callback);\n }\n // Copy function arguments\n var args = new Array(arguments.length - 1);\n for (var i = 0; i < args.length; i++) {\n args[i] = arguments[i + 1];\n }\n // Store and register the task\n var task = { callback: callback, args: args };\n tasksByHandle[nextHandle] = task;\n registerImmediate(nextHandle);\n return nextHandle++;\n }\n\n function clearImmediate(handle) {\n delete tasksByHandle[handle];\n }\n\n function run(task) {\n var callback = task.callback;\n var args = task.args;\n switch (args.length) {\n case 0:\n callback();\n break;\n case 1:\n callback(args[0]);\n break;\n case 2:\n callback(args[0], args[1]);\n break;\n case 3:\n callback(args[0], args[1], args[2]);\n break;\n default:\n callback.apply(undefined, args);\n break;\n }\n }\n\n function runIfPresent(handle) {\n // From the spec: \"Wait until any invocations of this algorithm started before this one have completed.\"\n // So if we're currently running a task, we'll need to delay this invocation.\n if (currentlyRunningATask) {\n // Delay by doing a setTimeout. setImmediate was tried instead, but in Firefox 7 it generated a\n // \"too much recursion\" error.\n setTimeout(runIfPresent, 0, handle);\n } else {\n var task = tasksByHandle[handle];\n if (task) {\n currentlyRunningATask = true;\n try {\n run(task);\n } finally {\n clearImmediate(handle);\n currentlyRunningATask = false;\n }\n }\n }\n }\n\n function installNextTickImplementation() {\n registerImmediate = function(handle) {\n process.nextTick(function () { runIfPresent(handle); });\n };\n }\n\n function canUsePostMessage() {\n // The test against `importScripts` prevents this implementation from being installed inside a web worker,\n // where `global.postMessage` means something completely different and can't be used for this purpose.\n if (global.postMessage && !global.importScripts) {\n var postMessageIsAsynchronous = true;\n var oldOnMessage = global.onmessage;\n global.onmessage = function() {\n postMessageIsAsynchronous = false;\n };\n global.postMessage(\"\", \"*\");\n global.onmessage = oldOnMessage;\n return postMessageIsAsynchronous;\n }\n }\n\n function installPostMessageImplementation() {\n // Installs an event handler on `global` for the `message` event: see\n // * https://developer.mozilla.org/en/DOM/window.postMessage\n // * http://www.whatwg.org/specs/web-apps/current-work/multipage/comms.html#crossDocumentMessages\n\n var messagePrefix = \"setImmediate$\" + Math.random() + \"$\";\n var onGlobalMessage = function(event) {\n if (event.source === global &&\n typeof event.data === \"string\" &&\n event.data.indexOf(messagePrefix) === 0) {\n runIfPresent(+event.data.slice(messagePrefix.length));\n }\n };\n\n if (global.addEventListener) {\n global.addEventListener(\"message\", onGlobalMessage, false);\n } else {\n global.attachEvent(\"onmessage\", onGlobalMessage);\n }\n\n registerImmediate = function(handle) {\n global.postMessage(messagePrefix + handle, \"*\");\n };\n }\n\n function installMessageChannelImplementation() {\n var channel = new MessageChannel();\n channel.port1.onmessage = function(event) {\n var handle = event.data;\n runIfPresent(handle);\n };\n\n registerImmediate = function(handle) {\n channel.port2.postMessage(handle);\n };\n }\n\n function installReadyStateChangeImplementation() {\n var html = doc.documentElement;\n registerImmediate = function(handle) {\n // Create a